summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-07-09 16:09:18 +0200
committerHarald Welte <laforge@gnumonks.org>2010-07-09 16:09:18 +0200
commit903a15fc26e225c2559c98eba362e29f09de3d2c (patch)
tree5680b3c68a728df86092a5b8a4756625724025c3
import source code of Vovida GSML project (from www.vovida.org)HEADgsml-1_0master
This is the source code as it was published on vovida.org a couple of years ago. The filename was gsml-1_0.tar.bz2
-rw-r--r--LICENSE.txt135
-rw-r--r--Scrubbed_File_List.txt54
-rw-r--r--data/mnet/Common/Alarm/Makefile47
-rw-r--r--data/mnet/Common/Alarm/include/AlarmTask.h151
-rw-r--r--data/mnet/Common/Alarm/include/alarm.h168
-rw-r--r--data/mnet/Common/Alarm/include/alarm_interface.h127
-rw-r--r--data/mnet/Common/Alarm/src/Makefile44
-rw-r--r--data/mnet/Common/Alarm/src/alarm_diskFile.cpp198
-rw-r--r--data/mnet/Common/Alarm/src/alarm_event.cpp196
-rw-r--r--data/mnet/Common/Alarm/src/alarm_main.cpp187
-rw-r--r--data/mnet/Common/Alarm/src/alarm_message.cpp101
-rw-r--r--data/mnet/Common/Alarm/src/alarm_modules.cpp441
-rw-r--r--data/mnet/Common/Alarm/src/alarm_socket.cpp445
-rw-r--r--data/mnet/Common/Alarm/src/alarm_sysCmd.cpp173
-rw-r--r--data/mnet/Common/Java/AlarmApplet/Alarm.java102
-rw-r--r--data/mnet/Common/Java/AlarmApplet/AlarmStatusApplet.java139
-rw-r--r--data/mnet/Common/Java/AlarmApplet/AlarmStatusData.java139
-rw-r--r--data/mnet/Common/Java/AlarmApplet/AlarmStatusPanel.java53
-rw-r--r--data/mnet/Common/Java/AlarmApplet/AlarmStatusTable.java221
-rw-r--r--data/mnet/Common/Java/AlarmApplet/AlarmStatusTableModel.java34
-rw-r--r--data/mnet/Common/Java/AlarmApplet/AlarmStatusTablePopupMenu.java126
-rw-r--r--data/mnet/Common/Java/AlarmApplet/AlarmTCPThread.java469
-rw-r--r--data/mnet/Common/Java/AlarmApplet/FilterFrame.java337
-rw-r--r--data/mnet/Common/Java/AlarmApplet/FilterObject.java35
-rw-r--r--data/mnet/Common/Java/AlarmApplet/Makefile41
-rw-r--r--data/mnet/Common/Java/AlarmApplet/com/jetcell/MibWM/Makefile40
-rw-r--r--data/mnet/Common/Java/Images/Jetcelllogo.jpgbin0 -> 4437 bytes
-rw-r--r--data/mnet/Common/Java/Images/app_icon.GIFbin0 -> 8585 bytes
-rw-r--r--data/mnet/Common/Java/Images/app_icon2.GIFbin0 -> 13151 bytes
-rw-r--r--data/mnet/Common/Java/Images/cisco.JPGbin0 -> 14010 bytes
-rw-r--r--data/mnet/Common/Java/Images/cisco2.JPGbin0 -> 11456 bytes
-rw-r--r--data/mnet/Common/Java/Images/ciscologo.jpgbin0 -> 4437 bytes
-rw-r--r--data/mnet/Common/Java/Images/clear.gifbin0 -> 370 bytes
-rw-r--r--data/mnet/Common/Java/Images/cowbell.wavbin0 -> 1398 bytes
-rw-r--r--data/mnet/Common/Java/Images/critical.gifbin0 -> 341 bytes
-rw-r--r--data/mnet/Common/Java/Images/filler.gifbin0 -> 76 bytes
-rw-r--r--data/mnet/Common/Java/Images/gmc.jpgbin0 -> 6954 bytes
-rw-r--r--data/mnet/Common/Java/Images/grey.gifbin0 -> 145 bytes
-rw-r--r--data/mnet/Common/Java/Images/indeterminate.gifbin0 -> 477 bytes
-rw-r--r--data/mnet/Common/Java/Images/indeterminate2.gifbin0 -> 145 bytes
-rw-r--r--data/mnet/Common/Java/Images/information.gifbin0 -> 897 bytes
-rw-r--r--data/mnet/Common/Java/Images/line-01.gifbin0 -> 6199 bytes
-rw-r--r--data/mnet/Common/Java/Images/line-02.gifbin0 -> 6308 bytes
-rw-r--r--data/mnet/Common/Java/Images/logo.gifbin0 -> 1231 bytes
-rw-r--r--data/mnet/Common/Java/Images/logo.jpgbin0 -> 4437 bytes
-rw-r--r--data/mnet/Common/Java/Images/logo1.gifbin0 -> 1231 bytes
-rw-r--r--data/mnet/Common/Java/Images/major.gifbin0 -> 341 bytes
-rw-r--r--data/mnet/Common/Java/Images/minor.gifbin0 -> 337 bytes
-rw-r--r--data/mnet/Common/Java/Images/minus.gifbin0 -> 840 bytes
-rw-r--r--data/mnet/Common/Java/Images/normal.gifbin0 -> 370 bytes
-rw-r--r--data/mnet/Common/Java/Images/notify.wavbin0 -> 119384 bytes
-rw-r--r--data/mnet/Common/Java/Images/plus.gifbin0 -> 845 bytes
-rw-r--r--data/mnet/Common/Java/Images/scritical.gifbin0 -> 341 bytes
-rw-r--r--data/mnet/Common/Java/Images/sinformation.gifbin0 -> 897 bytes
-rw-r--r--data/mnet/Common/Java/Images/smajor.gifbin0 -> 341 bytes
-rw-r--r--data/mnet/Common/Java/Images/sminor.gifbin0 -> 337 bytes
-rw-r--r--data/mnet/Common/Java/Images/undrkunstrukson.gifbin0 -> 29257 bytes
-rw-r--r--data/mnet/Common/Java/Images/vipercell.gifbin0 -> 21761 bytes
-rw-r--r--data/mnet/Common/Java/Images/wireless.jpgbin0 -> 47266 bytes
-rw-r--r--data/mnet/Common/Java/Images/wireless1.JPGbin0 -> 5825 bytes
-rw-r--r--data/mnet/Common/Java/Java/AlarmApplet.java177
-rw-r--r--data/mnet/Common/Java/Java/AlarmCommThread.java121
-rw-r--r--data/mnet/Common/Java/Java/ConfigApplet.java53
-rw-r--r--data/mnet/Common/Java/Java/ConfigAppletBeanInfo.java70
-rw-r--r--data/mnet/Common/Java/Java/Makefile69
-rw-r--r--data/mnet/Common/Java/Java/SubscriberApplet.java58
-rw-r--r--data/mnet/Common/Java/Java/SubscriberAppletBeanInfo.java69
-rw-r--r--data/mnet/Common/Java/Makefile58
-rw-r--r--data/mnet/Common/Java/Text/AlarmCode.English154
-rw-r--r--data/mnet/Common/Java/com/jetcell/MibWM/AlarmData.java216
-rw-r--r--data/mnet/Common/Java/com/jetcell/MibWM/AlarmMessageMap.java131
-rw-r--r--data/mnet/Common/Java/com/jetcell/MibWM/AlarmPanel.java467
-rw-r--r--data/mnet/Common/Java/com/jetcell/MibWM/AlarmTable.java588
-rw-r--r--data/mnet/Common/Java/com/jetcell/MibWM/AlarmTableModel.java43
-rw-r--r--data/mnet/Common/Java/com/jetcell/MibWM/AlarmTablePopupMenu.java218
-rw-r--r--data/mnet/Common/Java/com/jetcell/MibWM/AlarmTableSorter.java97
-rw-r--r--data/mnet/Common/Java/com/jetcell/MibWM/BaseTable.java312
-rw-r--r--data/mnet/Common/Java/com/jetcell/MibWM/ImageLoader.java136
-rw-r--r--data/mnet/Common/Java/com/jetcell/MibWM/Makefile38
-rw-r--r--data/mnet/Common/Java/com/jetcell/MibWM/TableMap.java104
-rw-r--r--data/mnet/Common/Java/com/jetcell/MibWM/TablePopupMenu.java195
-rw-r--r--data/mnet/Common/Java/com/jetcell/MibWM/TableSorter.java360
-rw-r--r--data/mnet/Common/Java/com/jetcell/MibWM/TextClipboard.java80
-rw-r--r--data/mnet/Common/Java/com/jetcell/MibWM/TextComponentPopupMenu.java280
-rw-r--r--data/mnet/Common/Java/com/jetcell/MibWM/Util.java779
-rw-r--r--data/mnet/Common/Java/com/jetcell/MibWM/WMTextField.java156
-rw-r--r--data/mnet/Common/Java/java.mk60
-rw-r--r--data/mnet/Common/Os/Makefile28
-rw-r--r--data/mnet/Common/Os/include/JCMsgQDefs.h40
-rw-r--r--data/mnet/Common/Os/loadmodule/LoadModule.cpp195
-rw-r--r--data/mnet/Common/Os/loadmodule/Makefile62
-rw-r--r--data/mnet/Common/Os/src/JCCTimer.cpp91
-rw-r--r--data/mnet/Common/Os/src/JCModule.cpp470
-rw-r--r--data/mnet/Common/Os/src/JCMsgQueue.cpp197
-rw-r--r--data/mnet/Common/Os/src/JCMutex.cpp43
-rw-r--r--data/mnet/Common/Os/src/JCTask.cpp193
-rw-r--r--data/mnet/Common/Os/src/Makefile62
-rw-r--r--data/mnet/Common/Os/test/Makefile65
-rw-r--r--data/mnet/Common/Os/test/MsgQTest.cpp91
-rw-r--r--data/mnet/Common/Pm/Makefile47
-rw-r--r--data/mnet/Common/Pm/src/Makefile61
-rw-r--r--data/mnet/Common/Pm/src/pm_common.cpp406
-rw-r--r--data/mnet/Common/apm/include/apmdefs.h51
-rw-r--r--data/mnet/Common/bssgp/Makefile47
-rw-r--r--data/mnet/Common/bssgp/src/Makefile61
-rw-r--r--data/mnet/Common/bssgp/src/bssgp_decoder.cpp2520
-rw-r--r--data/mnet/Common/bssgp/src/bssgp_encoder.cpp1814
-rw-r--r--data/mnet/Common/bssgp/src/bssgp_ie_decoder.cpp2818
-rw-r--r--data/mnet/Common/bssgp/src/bssgp_ie_encoder.cpp2295
-rw-r--r--data/mnet/Common/bssgp/src/bssgp_net.cpp442
-rw-r--r--data/mnet/Common/bssgp/src/bssgp_util.cpp424
-rw-r--r--data/mnet/Common/bssgp/win32test/bssgpwin32.cpp524
-rw-r--r--data/mnet/Common/bssgp/win32test/gprstest/gprstest.mak238
-rw-r--r--data/mnet/Common/cdr/Makefile47
-rw-r--r--data/mnet/Common/cdr/certificate/Readme.txt2
-rw-r--r--data/mnet/Common/cdr/certificate/ca.pem18
-rw-r--r--data/mnet/Common/cdr/certificate/ca_cert/cakey.pem18
-rw-r--r--data/mnet/Common/cdr/certificate/cdrpwd.datbin0 -> 32 bytes
-rw-r--r--data/mnet/Common/cdr/certificate/cert.pem50
-rw-r--r--data/mnet/Common/cdr/certificate/key.pem18
-rw-r--r--data/mnet/Common/cdr/include/CdrBase.h179
-rw-r--r--data/mnet/Common/cdr/include/CdrCommon.h132
-rw-r--r--data/mnet/Common/cdr/include/CdrInterface.h87
-rw-r--r--data/mnet/Common/cdr/include/CdrModule.h200
-rw-r--r--data/mnet/Common/cdr/include/CdrMsg.h112
-rw-r--r--data/mnet/Common/cdr/include/CdrRef.h38
-rw-r--r--data/mnet/Common/cdr/include/CdrRefSem.h42
-rw-r--r--data/mnet/Common/cdr/include/CdrRemClientSocket.h61
-rw-r--r--data/mnet/Common/cdr/include/CdrShellIntf.h39
-rw-r--r--data/mnet/Common/cdr/include/ConnList.h98
-rw-r--r--data/mnet/Common/cdr/include/msgProc.h47
-rw-r--r--data/mnet/Common/cdr/src/CdrRef.cpp49
-rw-r--r--data/mnet/Common/cdr/src/Makefile61
-rw-r--r--data/mnet/Common/cdr/src/readme.txt1
-rw-r--r--data/mnet/Common/cdr/src_client/CdrApi.cpp159
-rw-r--r--data/mnet/Common/cdr/src_client/CdrBase.cpp222
-rw-r--r--data/mnet/Common/cdr/src_client/CdrMain.cpp212
-rw-r--r--data/mnet/Common/cdr/src_client/CdrModule.cpp521
-rw-r--r--data/mnet/Common/cdr/src_client/CdrRefSem.cpp42
-rw-r--r--data/mnet/Common/cdr/src_client/CdrRemClientSocket.cpp71
-rw-r--r--data/mnet/Common/cdr/src_client/CdrSSA.cpp124
-rw-r--r--data/mnet/Common/cdr/src_client/CdrSystem.cpp98
-rw-r--r--data/mnet/Common/cdr/src_client/Makefile61
-rw-r--r--data/mnet/Common/cdr/src_client/readme.txt1
-rw-r--r--data/mnet/Common/cdr/src_server/ConnList.cpp177
-rw-r--r--data/mnet/Common/cdr/src_server/Makefile62
-rw-r--r--data/mnet/Common/cdr/src_test/simulator.cpp278
-rw-r--r--data/mnet/Common/cli/Makefile47
-rw-r--r--data/mnet/Common/cli/include/address.h188
-rw-r--r--data/mnet/Common/cli/include/cfg_end.h49
-rw-r--r--data/mnet/Common/cli/include/cfg_exit.h42
-rw-r--r--data/mnet/Common/cli/include/cli_parser_api.h18
-rw-r--r--data/mnet/Common/cli/include/cli_parser_private.h11
-rw-r--r--data/mnet/Common/cli/include/cli_private.h114
-rw-r--r--data/mnet/Common/cli/include/config.h389
-rw-r--r--data/mnet/Common/cli/include/debug.h70
-rw-r--r--data/mnet/Common/cli/include/debug_macros.h70
-rw-r--r--data/mnet/Common/cli/include/defs.h127
-rw-r--r--data/mnet/Common/cli/include/exec_clear.h47
-rw-r--r--data/mnet/Common/cli/include/exec_configure.h47
-rw-r--r--data/mnet/Common/cli/include/exec_debug.h46
-rw-r--r--data/mnet/Common/cli/include/exec_debug_all.h41
-rw-r--r--data/mnet/Common/cli/include/exec_disable.h55
-rw-r--r--data/mnet/Common/cli/include/exec_enable.h58
-rw-r--r--data/mnet/Common/cli/include/exec_exit.h45
-rw-r--r--data/mnet/Common/cli/include/exec_help.h44
-rw-r--r--data/mnet/Common/cli/include/exec_show.h35
-rw-r--r--data/mnet/Common/cli/include/exec_undebug.h33
-rw-r--r--data/mnet/Common/cli/include/imc.h538
-rw-r--r--data/mnet/Common/cli/include/imsg.h179
-rw-r--r--data/mnet/Common/cli/include/macros.h652
-rw-r--r--data/mnet/Common/cli/include/mutex.h23
-rw-r--r--data/mnet/Common/cli/include/nv.h21
-rw-r--r--data/mnet/Common/cli/include/parser.h263
-rw-r--r--data/mnet/Common/cli/include/parser_ModNum.h13
-rw-r--r--data/mnet/Common/cli/include/parser_actions.h591
-rw-r--r--data/mnet/Common/cli/include/parser_api.h13
-rw-r--r--data/mnet/Common/cli/include/parser_commands.h27
-rw-r--r--data/mnet/Common/cli/include/parser_debug.h36
-rw-r--r--data/mnet/Common/cli/include/parser_debug_flags.h13
-rw-r--r--data/mnet/Common/cli/include/parser_defs_config.h28
-rw-r--r--data/mnet/Common/cli/include/parser_defs_exec.h86
-rw-r--r--data/mnet/Common/cli/include/parser_errno.h53
-rw-r--r--data/mnet/Common/cli/include/parser_if.h135
-rw-r--r--data/mnet/Common/cli/include/parser_init.h38
-rw-r--r--data/mnet/Common/cli/include/parser_input.h84
-rw-r--r--data/mnet/Common/cli/include/parser_modes.h8
-rw-r--r--data/mnet/Common/cli/include/parser_privilege.h19
-rw-r--r--data/mnet/Common/cli/include/parser_sim.h33
-rw-r--r--data/mnet/Common/cli/include/parser_util.h21
-rw-r--r--data/mnet/Common/cli/include/parsertypes.h145
-rw-r--r--data/mnet/Common/cli/include/platdef.h229
-rw-r--r--data/mnet/Common/cli/include/pstypes.h82
-rw-r--r--data/mnet/Common/cli/include/psvxif.h252
-rw-r--r--data/mnet/Common/cli/include/sys_debug.h20
-rw-r--r--data/mnet/Common/cli/include/ttyutil.h88
-rw-r--r--data/mnet/Common/cli/include/vxworks_cfg_chain.h157
-rw-r--r--data/mnet/Common/cli/include/vxworks_exec_chain.h229
-rw-r--r--data/mnet/Common/cli/include/vxworks_show_chain.h145
-rw-r--r--data/mnet/Common/cli/src/Makefile63
-rw-r--r--data/mnet/Common/cli/src/basic_exec_chain.c733
-rw-r--r--data/mnet/Common/cli/src/cfg_chain.c360
-rw-r--r--data/mnet/Common/cli/src/chain.c267
-rw-r--r--data/mnet/Common/cli/src/cli_parser_init.c379
-rw-r--r--data/mnet/Common/cli/src/cli_shellLib.c729
-rw-r--r--data/mnet/Common/cli/src/command2.c635
-rw-r--r--data/mnet/Common/cli/src/command_chain.c73
-rw-r--r--data/mnet/Common/cli/src/debug.c342
-rw-r--r--data/mnet/Common/cli/src/exec.c389
-rw-r--r--data/mnet/Common/cli/src/exec_chain.c160
-rw-r--r--data/mnet/Common/cli/src/imc.c513
-rw-r--r--data/mnet/Common/cli/src/imsg.c138
-rw-r--r--data/mnet/Common/cli/src/ip_address.c958
-rw-r--r--data/mnet/Common/cli/src/parser.c2062
-rw-r--r--data/mnet/Common/cli/src/parser_actions.c3486
-rw-r--r--data/mnet/Common/cli/src/parser_input.c1432
-rw-r--r--data/mnet/Common/cli/src/parser_modes.c534
-rw-r--r--data/mnet/Common/cli/src/parser_print.c687
-rw-r--r--data/mnet/Common/cli/src/parser_printf.c981
-rw-r--r--data/mnet/Common/cli/src/parser_privilege.c322
-rw-r--r--data/mnet/Common/cli/src/parser_util.c268
-rw-r--r--data/mnet/Common/cli/src/queue.c513
-rw-r--r--data/mnet/Common/cli/src/show_chain.c220
-rw-r--r--data/mnet/Common/cli/src/sys_debug.c261
-rw-r--r--data/mnet/Common/cli/src/usrScript.c73
-rw-r--r--data/mnet/Common/cli/src/util.c866
-rw-r--r--data/mnet/Common/cli/vxsh/Makefile103
-rw-r--r--data/mnet/Common/cli/vxsh/vxsh.c9
-rw-r--r--data/mnet/Common/gglink/Makefile47
-rw-r--r--data/mnet/Common/gglink/src/Makefile61
-rw-r--r--data/mnet/Common/gglink/src/gglink.cpp1178
-rw-r--r--data/mnet/Common/include/CdrDbg.h130
-rw-r--r--data/mnet/Common/include/JCErr.h60
-rw-r--r--data/mnet/Common/include/JCStdDef.h103
-rw-r--r--data/mnet/Common/include/MnetProductId.h102
-rw-r--r--data/mnet/Common/include/NetBuffer.h118
-rw-r--r--data/mnet/Common/include/Os/JCCTimer.h117
-rw-r--r--data/mnet/Common/include/Os/JCModule.h88
-rw-r--r--data/mnet/Common/include/Os/JCMsgQueue.h91
-rw-r--r--data/mnet/Common/include/Os/JCMutex.h44
-rw-r--r--data/mnet/Common/include/Os/JCTask.h131
-rw-r--r--data/mnet/Common/include/Pm/pm_common.h209
-rw-r--r--data/mnet/Common/include/SmsPP/smspp_inf.h84
-rw-r--r--data/mnet/Common/include/VCLOGGING.H283
-rw-r--r--data/mnet/Common/include/bssgp/bssgp_api.h600
-rw-r--r--data/mnet/Common/include/bssgp/bssgp_decoder.h68
-rw-r--r--data/mnet/Common/include/bssgp/bssgp_encoder.h69
-rw-r--r--data/mnet/Common/include/bssgp/bssgp_ie_decoder.h77
-rw-r--r--data/mnet/Common/include/bssgp/bssgp_ie_encoder.h75
-rw-r--r--data/mnet/Common/include/bssgp/bssgp_net.h83
-rw-r--r--data/mnet/Common/include/bssgp/bssgp_prot.h180
-rw-r--r--data/mnet/Common/include/bssgp/bssgp_unitdata.h221
-rw-r--r--data/mnet/Common/include/bssgp/bssgp_util.h97
-rw-r--r--data/mnet/Common/include/cdr/CdrSSA.h77
-rw-r--r--data/mnet/Common/include/dbgfunc.h40
-rw-r--r--data/mnet/Common/include/defs.h127
-rw-r--r--data/mnet/Common/include/gglink/gglink_api.h336
-rw-r--r--data/mnet/Common/include/gplink/gplink_prot.h62
-rw-r--r--data/mnet/Common/include/gprsdefs.h34
-rw-r--r--data/mnet/Common/include/oam_api.h323
-rw-r--r--data/mnet/Common/include/oam_trap.h93
-rw-r--r--data/mnet/Common/include/socket/GenClientSocket.h79
-rw-r--r--data/mnet/Common/include/socket/GenSecServerSocket.h59
-rw-r--r--data/mnet/Common/include/socket/GenServerSocket.h74
-rw-r--r--data/mnet/Common/include/socket/GenSocket.h131
-rw-r--r--data/mnet/Common/include/socket/GenSocketSSL.h218
-rw-r--r--data/mnet/Common/include/socket/SslIntf.h41
-rw-r--r--data/mnet/Common/include/subsc/SubscGPRSInfoType.h69
-rw-r--r--data/mnet/Common/include/subsc/SubscINProfileType.h47
-rw-r--r--data/mnet/Common/include/subsc/SubscInfoType.h619
-rw-r--r--data/mnet/Common/include/subsc/SubscInfoUtil.h254
-rw-r--r--data/mnet/Common/include/table.h121
-rw-r--r--data/mnet/Common/include/vxTemplate/vxTemplateIF.h33
-rw-r--r--data/mnet/Common/logging/Makefile47
-rw-r--r--data/mnet/Common/logging/src/Makefile61
-rw-r--r--data/mnet/Common/logging/src/debug.cpp140
-rw-r--r--data/mnet/Common/logging/src/logging.cpp901
-rw-r--r--data/mnet/Common/netBuffer/Makefile34
-rw-r--r--data/mnet/Common/netBuffer/src/Makefile61
-rw-r--r--data/mnet/Common/netBuffer/src/NetBuffer.cpp407
-rw-r--r--data/mnet/Common/rsa/src_stub/makefile61
-rw-r--r--data/mnet/Common/rsa/src_stub/ssl_stub.c257
-rw-r--r--data/mnet/Common/snmp/Asn1/mnet-traps.mib0
-rw-r--r--data/mnet/Common/snmp/Makefile47
-rw-r--r--data/mnet/Common/snmp/src/Makefile63
-rw-r--r--data/mnet/Common/snmp/src/api_init.c85
-rw-r--r--data/mnet/Common/snmp/src/link_list.c316
-rw-r--r--data/mnet/Common/snmp/src/oam_api.c1274
-rw-r--r--data/mnet/Common/snmp/src/snmpLocalIoLib.c327
-rw-r--r--data/mnet/Common/snmp/src/snmp_fileio.c492
-rw-r--r--data/mnet/Common/snmp/src/snmp_trap.c437
-rw-r--r--data/mnet/Common/snmp/src/table.c1129
-rw-r--r--data/mnet/Common/snmp/src/vipermib.c1768
-rw-r--r--data/mnet/Common/socket/Makefile47
-rw-r--r--data/mnet/Common/socket/include/CallBackSSL.h35
-rw-r--r--data/mnet/Common/socket/src/GenClientSocket.cpp236
-rw-r--r--data/mnet/Common/socket/src/GenSecServerSocket.cpp110
-rw-r--r--data/mnet/Common/socket/src/GenServerSocket.cpp210
-rw-r--r--data/mnet/Common/socket/src/GenSocket.cpp403
-rw-r--r--data/mnet/Common/socket/src/GenSocketSSL.cpp167
-rw-r--r--data/mnet/Common/socket/src/Makefile61
-rw-r--r--data/mnet/Common/socket/src_ssl/GenSocketSSL_lib.cpp968
-rw-r--r--data/mnet/Common/socket/src_ssl/Makefile61
-rw-r--r--data/mnet/Common/socket/src_ssl/ssl_intf.cpp235
-rw-r--r--data/mnet/Common/socket/src_stub/GenSocketSSL_stub.cpp95
-rw-r--r--data/mnet/Common/socket/src_stub/Makefile61
-rw-r--r--data/mnet/Common/socket/src_stub/ssl_intf.cpp23
-rw-r--r--data/mnet/Common/subsc/Makefile47
-rw-r--r--data/mnet/Common/subsc/src/Makefile61
-rw-r--r--data/mnet/Common/subsc/src/SubscInfo.cpp200
-rw-r--r--data/mnet/Common/subsc/src/SubscInfoMsgDecoder.cpp610
-rw-r--r--data/mnet/Common/subsc/src/SubscInfoMsgEncoder.cpp459
-rw-r--r--data/mnet/Common/subsc/src/SubscInfoUtil.cpp1814
-rw-r--r--data/mnet/Common/vxTemplate/Makefile47
-rw-r--r--data/mnet/Common/vxTemplate/include/vxTemplate.h33
-rw-r--r--data/mnet/Common/vxTemplate/src/Makefile61
-rw-r--r--data/mnet/Common/vxTemplate/src/vxTemplate.c34
-rw-r--r--data/mnet/GP10/Common_To_VOB/Dsp/Dsptypes.h74
-rw-r--r--data/mnet/GP10/Common_To_VOB/Dsp/dsphmsg.h557
-rw-r--r--data/mnet/GP10/Dsp/Diags/Makefile23
-rw-r--r--data/mnet/GP10/Dsp/Diags/loopback.c625
-rw-r--r--data/mnet/GP10/Dsp/Driver/EMIF.H191
-rw-r--r--data/mnet/GP10/Dsp/Driver/Makefile23
-rw-r--r--data/mnet/GP10/Dsp/Driver/TIMER.H247
-rw-r--r--data/mnet/GP10/Dsp/Makefile52
-rw-r--r--data/mnet/GP10/Dsp/asynchctrl/Makefile24
-rw-r--r--data/mnet/GP10/Dsp/asynchctrl/ccchmsg.c233
-rw-r--r--data/mnet/GP10/Dsp/asynchctrl/dcchmsg.c1167
-rw-r--r--data/mnet/GP10/Dsp/asynchctrl/diagmsg.c387
-rw-r--r--data/mnet/GP10/Dsp/asynchctrl/oammsg.c463
-rw-r--r--data/mnet/GP10/Dsp/asynchctrl/pdchmsg.c969
-rw-r--r--data/mnet/GP10/Dsp/asynchctrl/rrmsg.c354
-rw-r--r--data/mnet/GP10/Dsp/asynchctrl/tchmsg.c176
-rw-r--r--data/mnet/GP10/Dsp/asynchctrl/trxmsg.c674
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/Makefile114
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/burst/burst.c220
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/burst/burst.h63
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/burst/mod2asm.asm627
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/burst/mod2asm.sa373
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/burst/mod2spb.c306
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/burst/mod2spb_tab.h110
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/burst/mod4spb.c259
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/burst/mod4spb_tab.h109
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/chcodec/INTLEAV.ASM816
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/chcodec/Siddetect.c99
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/chcodec/Vitgsm.asm326
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/chcodec/bfi.c105
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/chcodec/chcodesubs.asm901
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/chcodec/codec.h231
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/chcodec/codecs.c1709
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/chcodec/fileio.c144
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/chcodec/intleavs.c1012
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/chcodec/sbjcodecs.c790
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/chcodec/testproto.h50
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/chcodec/topcodec.c2214
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod-asm/c6xsupport.h106
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod-asm/dem_aprotos.h159
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod-asm/dem_const.h266
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod-asm/dem_globs.h208
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod-asm/dem_protos.h97
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod-asm/demsubs.asm4047
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod-asm/demtop.c626
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod-asm/training.h101
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod-c/c6xsupport.h106
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod-c/dem_const.h266
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod-c/dem_globs.h208
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod-c/dem_protos.h97
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod-c/demodSubC.c982
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod-c/demodTop.c449
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod-c/training.h101
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod/BERTEST.H58
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod/DEMODC.C758
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod/DEMTOP.c627
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod/c6xsupport.h86
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod/dem_aprotos.h178
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod/dem_const.h280
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod/dem_globs.h253
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod/dem_protos.h84
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod/demodSubC.c977
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod/demodTop.c432
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod/demsubs.asm3150
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod/training.h86
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/demod/viteq.asm441
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/include/bbdata.h111
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/include/bbproto.h9
-rw-r--r--data/mnet/GP10/Dsp/bbdataproc/include/bbtypes.h358
-rw-r--r--data/mnet/GP10/Dsp/btsdsp.cmd134
-rw-r--r--data/mnet/GP10/Dsp/dsp.mak241
-rw-r--r--data/mnet/GP10/Dsp/dsp.mk33
-rw-r--r--data/mnet/GP10/Dsp/include/DSP6201.H111
-rw-r--r--data/mnet/GP10/Dsp/include/DSPCOMM.H68
-rw-r--r--data/mnet/GP10/Dsp/include/HPI.H62
-rw-r--r--data/mnet/GP10/Dsp/include/agcdata.h51
-rw-r--r--data/mnet/GP10/Dsp/include/agctypes.h70
-rw-r--r--data/mnet/GP10/Dsp/include/comdata.h56
-rw-r--r--data/mnet/GP10/Dsp/include/comtypes.h34
-rw-r--r--data/mnet/GP10/Dsp/include/diagdata.h44
-rw-r--r--data/mnet/GP10/Dsp/include/diagtypes.h123
-rw-r--r--data/mnet/GP10/Dsp/include/dma.h511
-rw-r--r--data/mnet/GP10/Dsp/include/dsperrs.h45
-rw-r--r--data/mnet/GP10/Dsp/include/dsprotyp.h288
-rw-r--r--data/mnet/GP10/Dsp/include/gsmdata.h155
-rw-r--r--data/mnet/GP10/Dsp/include/gsmtypes.h1056
-rw-r--r--data/mnet/GP10/Dsp/include/intr.h277
-rw-r--r--data/mnet/GP10/Dsp/include/l1config.h37
-rw-r--r--data/mnet/GP10/Dsp/include/makefile1
-rw-r--r--data/mnet/GP10/Dsp/include/mcbsp.h547
-rw-r--r--data/mnet/GP10/Dsp/include/oamdata.h62
-rw-r--r--data/mnet/GP10/Dsp/include/oamtypes.h113
-rw-r--r--data/mnet/GP10/Dsp/include/regs.h225
-rw-r--r--data/mnet/GP10/Dsp/include/rrmsg.h35
-rw-r--r--data/mnet/GP10/Dsp/init.gel15
-rw-r--r--data/mnet/GP10/Dsp/peripherals/Makefile23
-rw-r--r--data/mnet/GP10/Dsp/peripherals/init_hw2.c230
-rw-r--r--data/mnet/GP10/Dsp/shared/DSPMAINT.C137
-rw-r--r--data/mnet/GP10/Dsp/shared/DSPMH.C144
-rw-r--r--data/mnet/GP10/Dsp/shared/Dspinit.c197
-rw-r--r--data/mnet/GP10/Dsp/shared/HPI.C225
-rw-r--r--data/mnet/GP10/Dsp/shared/Makefile25
-rw-r--r--data/mnet/GP10/Dsp/shared/Msgstub.C322
-rw-r--r--data/mnet/GP10/Dsp/shared/QUEUE.C240
-rw-r--r--data/mnet/GP10/Dsp/shared/dspmain.c255
-rw-r--r--data/mnet/GP10/Dsp/shared/dspvector.asm49
-rw-r--r--data/mnet/GP10/Dsp/shared/exmem.c27
-rw-r--r--data/mnet/GP10/Dsp/shared/fileio.c143
-rw-r--r--data/mnet/GP10/Dsp/shared/hpirx.c17
-rw-r--r--data/mnet/GP10/Dsp/shared/hpitx.c17
-rw-r--r--data/mnet/GP10/Dsp/shared/inmem.c27
-rw-r--r--data/mnet/GP10/Dsp/shared/miscfunc.c329
-rw-r--r--data/mnet/GP10/Dsp/shared/report.c560
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/Makefile129
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/accum.c1183
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/agc.c155
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/bcch.c347
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/burstisr.c562
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/decryptopt.asm90
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/dynpwrctrl.c366
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/encrypt.c727
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/encryptA51A52.asm605
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/encryptA51only.asm353
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/encryptA52only.asm430
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/encryptNone.asm178
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/encryptsubs.asm599
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/frameisr.c241
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/frmsync.c496
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/groupini.c695
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/grouptbl.c693
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/hoProc.c1029
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/pagch.c583
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/pbcch.c384
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/pdch.c1623
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/rtscheck.c133
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/sacch.c987
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/sdcch.c344
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/syncmsg.c958
-rw-r--r--data/mnet/GP10/Dsp/synchctrl/tch.c980
-rw-r--r--data/mnet/GP10/Host/Alarm/Alarm.dsp158
-rw-r--r--data/mnet/GP10/Host/Alarm/Alarm.dsw29
-rw-r--r--data/mnet/GP10/Host/Alarm/AlarmCode.English128
-rw-r--r--data/mnet/GP10/Host/Alarm/AlarmTool/AlarmCode.cpp272
-rw-r--r--data/mnet/GP10/Host/Alarm/AlarmTool/AlarmTool.dsp105
-rw-r--r--data/mnet/GP10/Host/Alarm/AlarmTool/AlarmTool.dsw29
-rw-r--r--data/mnet/GP10/Host/Alarm/AlarmTool/Makefile89
-rw-r--r--data/mnet/GP10/Host/Alarm/Makefile20
-rw-r--r--data/mnet/GP10/Host/Alarm/Test/Makefile29
-rw-r--r--data/mnet/GP10/Host/Alarm/include/alarm_prodSpec.h54
-rw-r--r--data/mnet/GP10/Host/Alarm/src/Makefile51
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/._default1
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/.include-config-180
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/.modules-config-10
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/.target-config-11
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/MakeBootrom.exebin0 -> 196660 bytes
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/Makefile130
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/README65
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/ataDrv.c1583
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/bootflash.c843
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/bootflash.h84
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/bootflash.obin0 -> 7508 bytes
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/bootrom_build.txt37
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/bootrom_updating.txt33
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/ds2401.c224
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/i2c.c901
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/i2c.h138
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/nvRam.c750
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/nvRam.h97
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/nvram2.obin0 -> 1672 bytes
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/romInit.s1009
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/sysALib.s170
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/sysLib.c1168
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/sysUser.c763
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/sysUser.h93
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/target.nr185
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/target.txt264
-rw-r--r--data/mnet/GP10/Host/Cdc_bsp/viperBoot_uncmp.hex31155
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_const.h109
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_data.h36
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_head.h29
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_intf.h255
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_jetrtp.h23
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_proto.h80
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_table.h108
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_types.h23
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/Mch/MCHDefs.h84
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/Mch/MCHIntf.h52
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/Mch/post.h43
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/Pm/pm_class.h111
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/Pm/pmdefs.h28
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/Rlc_mac/RlcMacIntf.h104
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Common.h164
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Complete_Msg.h56
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Detect_Msg.h55
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Failure_Msg.h62
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Ie.h606
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Request_Ack_Msg.h67
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Request_Msg.h91
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/CCH323Util.h56
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/CCHalfCall.h394
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/CCHandover.h641
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/CCInt.h52
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/CCMsgAnal.h55
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/CCSessionHandler.h286
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/CCTypes.h97
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/CCUtil.h127
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/CCconfig.h75
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/CallConfig.h133
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/CallLeg.h276
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/HOCallLeg.h107
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/HOHalfCall.h237
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/SMSLeg.h146
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/SmsCommonDef.h49
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/SmsHalfCall.h200
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/SmsHandler.h54
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/SmsMsgBuilder.h89
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/cc_util_ext.h24
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/hortp.h36
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cc/smqueue.h122
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cdcUtils/CPU_Mon.h37
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cdcUtils/CPU_Mon_IF.h36
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cdcUtils/auxPort.h74
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cdcUtils/cdcUtils.h41
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cdcUtils/drfInterface.h100
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cdc_bsp/bootflash.h84
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cdc_bsp/i2c.h138
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cdc_bsp/nvRam.h97
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cdc_bsp/readme.txt16
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cdc_bsp/sysuser.h93
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/cdr/CdrVoiceCall.h115
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/grr/grr_const.h293
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/grr/grr_data.h118
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/grr/grr_head.h55
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/grr/grr_import.h20
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/grr/grr_intf.h106
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/grr/grr_marco.h24
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/grr/grr_oamif.h662
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/grr/grr_proto.h242
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/grr/grr_struct.h57
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/grr/grr_type.h95
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/include/AlarmCode.h435
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/include/GP10Err.h51
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/include/GP10MsgTypes.h76
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/include/GP10OsTune.h140
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/include/MnetModuleId.h88
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/include/mibhand.h63
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/include/mibleaf.h1270
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/include/mibtags.h951
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/include/socdefs.h42
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/include/vipermib.h979
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/include/vipertbl.h334
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/JCCComIE.h79
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/JCCComMsg.h299
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/JCCEHoMsg.h160
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/JCCEvent.h244
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/JCCHoMsg.h269
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/JCCL3Msg.h49
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/JCCLog.h78
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/JCCState.h192
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/JCCTimer.h83
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/JCCUtil.h56
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/JCCVCmsg.h34
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/JCCbcCb.h95
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/JcVcToVc.h136
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/LUDB.h176
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/LUDBApi.h181
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/LUDBConfig.h33
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/LUDBInstance.h43
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/LUDBMmMsgProc.h45
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/readme.txt21
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/jcc/viperchannel.h73
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/l1proxy/l1proxy.h64
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/l1proxy/l1proxyhpi.h48
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/mm/MMConfig.h77
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/mm/MMInt.h56
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/rm/debug.h38
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/rm/rm_ccintf.h18
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/rm/rm_const.h331
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/rm/rm_data.h100
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/rm/rm_extdef.h94
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/rm/rm_head.h60
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/rm/rm_import.h58
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/rm/rm_itcmsg.h77
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/rm/rm_marco.h34
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/rm/rm_oamif.h722
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/rm/rm_prim.h43
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/rm/rm_proto.h196
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/rm/rm_struct.h129
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/rm/rm_types.h20
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/rm/rml1_intf.h45
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/rm/sys_init.h30
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/voip/exchange.h296
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/voip/exchangeho.h241
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/voip/jetrtp.h368
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/voip/mncalxfr.h122
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/voip/vblink.h220
-rw-r--r--data/mnet/GP10/Host/Common_To_Host/voip/voipapi.h349
-rw-r--r--data/mnet/GP10/Host/CsuNew/Makefile16
-rw-r--r--data/mnet/GP10/Host/CsuNew/include/cc_user.datbin0 -> 920 bytes
-rw-r--r--data/mnet/GP10/Host/CsuNew/src/Makefile52
-rw-r--r--data/mnet/GP10/Host/CsuNew/src/csu_conn.cpp782
-rw-r--r--data/mnet/GP10/Host/CsuNew/src/csu_cutil.cpp782
-rw-r--r--data/mnet/GP10/Host/CsuNew/src/csu_glob.cpp33
-rw-r--r--data/mnet/GP10/Host/CsuNew/src/csu_pass.cpp716
-rw-r--r--data/mnet/GP10/Host/CsuNew/src/csu_reg.cpp450
-rw-r--r--data/mnet/GP10/Host/CsuNew/src/csu_rutil.cpp166
-rw-r--r--data/mnet/GP10/Host/CsuNew/src/csu_sema.cpp37
-rw-r--r--data/mnet/GP10/Host/CsuNew/src/csu_table.cpp189
-rw-r--r--data/mnet/GP10/Host/CsuNew/src/csu_test.cpp4393
-rw-r--r--data/mnet/GP10/Host/CsuNew/test/csutest07384
-rw-r--r--data/mnet/GP10/Host/CsuNew/test/csutest07691
-rw-r--r--data/mnet/GP10/Host/Fpga/cdcimfpga.rbfbin0 -> 116521 bytes
-rw-r--r--data/mnet/GP10/Host/Fpga/fpga.rbfbin0 -> 101512 bytes
-rw-r--r--data/mnet/GP10/Host/Http/Makefile16
-rw-r--r--data/mnet/GP10/Host/Http/ViperCellMibBrowser.wch4
-rw-r--r--data/mnet/GP10/Host/Http/ViperCellMibBrowser.wcpbin0 -> 166344 bytes
-rw-r--r--data/mnet/GP10/Host/Http/ViperCellMibBrowser.wcs19
-rw-r--r--data/mnet/GP10/Host/Http/ViperCellMibBrowser.wct5321
-rw-r--r--data/mnet/GP10/Host/Http/ViperCellMibBrowser.wcv38
-rw-r--r--data/mnet/GP10/Host/Http/include/http.h90
-rw-r--r--data/mnet/GP10/Host/Http/include/options_x.h36
-rw-r--r--data/mnet/GP10/Host/Http/src/Makefile216
-rw-r--r--data/mnet/GP10/Host/Http/src/ignition_x.c18
-rw-r--r--data/mnet/GP10/Host/Makefile13
-rw-r--r--data/mnet/GP10/Host/Mch/Makefile16
-rw-r--r--data/mnet/GP10/Host/Mch/applet/DialogLayout.java179
-rw-r--r--data/mnet/GP10/Host/Mch/applet/Makefile71
-rw-r--r--data/mnet/GP10/Host/Mch/applet/MchCommThread.java111
-rw-r--r--data/mnet/GP10/Host/Mch/applet/ResponseTextArea.java40
-rw-r--r--data/mnet/GP10/Host/Mch/applet/mch.htm16
-rw-r--r--data/mnet/GP10/Host/Mch/applet/mch.vjpbin0 -> 3834 bytes
-rw-r--r--data/mnet/GP10/Host/Mch/applet/mchControl.java177
-rw-r--r--data/mnet/GP10/Host/Mch/doc/Diagnostics_and_Test_Design_Spec.docbin0 -> 185344 bytes
-rw-r--r--data/mnet/GP10/Host/Mch/doc/Maintenance_Command_Handler_Design_Spec.docbin0 -> 260608 bytes
-rw-r--r--data/mnet/GP10/Host/Mch/include/CdcDiags.h612
-rw-r--r--data/mnet/GP10/Host/Mch/include/Diagnostic.h348
-rw-r--r--data/mnet/GP10/Host/Mch/include/DspDiags.h929
-rw-r--r--data/mnet/GP10/Host/Mch/include/MCHCommand.h534
-rw-r--r--data/mnet/GP10/Host/Mch/include/MCHConfig.h34
-rw-r--r--data/mnet/GP10/Host/Mch/include/MCHInit.h29
-rw-r--r--data/mnet/GP10/Host/Mch/include/MCHTask.h159
-rw-r--r--data/mnet/GP10/Host/Mch/include/SysDiags.h662
-rw-r--r--data/mnet/GP10/Host/Mch/post/860MemTest.cpp50
-rw-r--r--data/mnet/GP10/Host/Mch/post/Makefile61
-rw-r--r--data/mnet/GP10/Host/Mch/post/pontest.cpp474
-rw-r--r--data/mnet/GP10/Host/Mch/src/CdcDiags.cpp1535
-rw-r--r--data/mnet/GP10/Host/Mch/src/Diagnostic.cpp575
-rw-r--r--data/mnet/GP10/Host/Mch/src/DspDiags.cpp2552
-rw-r--r--data/mnet/GP10/Host/Mch/src/MCHCommand.cpp700
-rw-r--r--data/mnet/GP10/Host/Mch/src/MCHTask.cpp573
-rw-r--r--data/mnet/GP10/Host/Mch/src/Makefile52
-rw-r--r--data/mnet/GP10/Host/Mch/src/SysDiags.cpp1404
-rw-r--r--data/mnet/GP10/Host/Mch/src/dspTest.cpp280
-rw-r--r--data/mnet/GP10/Host/Mch/src_api/MCHIntf.cpp176
-rw-r--r--data/mnet/GP10/Host/Mch/src_api/Makefile53
-rw-r--r--data/mnet/GP10/Host/Mch/src_init/MCHInit.cpp24
-rw-r--r--data/mnet/GP10/Host/Mch/src_init/Makefile52
-rw-r--r--data/mnet/GP10/Host/Pm/makefile16
-rw-r--r--data/mnet/GP10/Host/Pm/src/makefile53
-rw-r--r--data/mnet/GP10/Host/Pm/src/pm_class.cpp730
-rw-r--r--data/mnet/GP10/Host/Pm/src/pm_task.cpp292
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/Makefile17
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/DLDataBlockPool.h74
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/DLRlcLink.h138
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/DLSignallingMsgQueue.h52
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/DLTbf.h107
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/DynamicAllocationStruct.h135
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/FixedAllocationStruct.h114
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/IeBase.h49
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MacHeader.h570
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MeasurementMappingStruct.h53
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MsgBase.h96
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MsgPacketAccessReject.h134
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MsgPacketCellChangeFailure.h83
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MsgPacketCellChangeOrder.h138
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MsgPacketControlAcknowledgement.h81
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MsgPacketDownlinkAckNack.h96
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MsgPacketDownlinkAssignment.h133
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MsgPacketDownlinkDummyControlBlock.h68
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MsgPacketMobileTBFStatus.h81
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MsgPacketPDCHRelease.h67
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MsgPacketPagingRequest.h114
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MsgPacketPollingRequest.h83
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MsgPacketPowerCtlTimingAdvance.h90
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MsgPacketResourceRequest.h109
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MsgPacketTBFRelease.h88
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MsgPacketTimeslotReconfigure.h159
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MsgPacketUplinkAckNack.h105
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MsgPacketUplinkAssignment.h183
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/MsgPacketUplinkDummyControlBlock.h63
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/NCMeasurementStruct.h94
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/RlcMacCommon.h64
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/RlcMacConfig.h34
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/RlcMacMsgType.h143
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/RlcMacResult.h42
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/RlcMacTask.h187
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ScheduleAllocationInfo.h204
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ScheduleInfo.h97
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ScheduleQueue.h82
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/SingleBlockAllocationStruct.h76
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/TAITable.h47
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/TSPool.h213
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/Tbf.h83
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/TbfPool.h84
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/Timeslot.h178
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ULDataBlockPool.h74
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ULRlcLink.h114
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ULTbf.h95
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/USFTable.h50
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/bitstream.h129
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieARFCN.h68
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieARFCNIndexList.h64
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieAccessType.h66
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieAckNackDescription.h95
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieAllocationBitMap.h61
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieBSIC.h68
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieBtsPowerCtlMode.h64
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieChangeMark.h68
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieChannelCodingCommand.h88
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieChannelNeeded.h66
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieChannelRequestDescription.h66
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieFrequencyParameters.h105
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieGPRSMobileAllocation.h68
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieGlobalPacketTimingAdvance.h136
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieGlobalPowerControlParms.h192
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieGlobalTFI.h85
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieHSN.h67
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieLSAParameters.h76
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieMABitMap.h60
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieMACMode.h66
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieMAFreqList.h97
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieMAIO.h67
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieMANumber.h67
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieMSRadioAccessCapability.h169
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieMobileIdentity.h79
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieNLN.h59
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/iePO.h58
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/iePRMode.h64
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/iePTMSI.h68
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/iePacketReqRef.h74
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/iePacketTimingAdvance.h106
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/iePageMode.h66
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/iePersistenceLevel.h65
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/iePowerControlParameters.h78
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieRFLNumberList.h64
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieRLCBlocksGranted.h59
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieRLCMode.h65
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieStartFrameNum.h109
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieTFI.h69
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieTLLI.h69
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieTMSI.h68
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieTQI.h60
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieTSC.h67
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieTimeslotAllocation.h58
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/ieeMLPPPriority.h71
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/include/msgL1.h505
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/DLDataBlockPool.cpp117
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/DLRlcLink.cpp1712
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/DLSignallingMsgQueue.cpp69
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/DLTbf.cpp222
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/DynamicAllocationStruct.cpp307
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/FixedAllocationStruct.cpp239
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MacAllocation.cpp1385
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MacHeader.cpp481
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MacScheduler.cpp1197
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/Makefile52
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MeasurementMappingStruct.cpp71
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MsgBase.cpp46
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MsgPacketAccessReject.cpp231
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MsgPacketCellChangeFailure.cpp111
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MsgPacketCellChangeOrder.cpp214
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MsgPacketControlAcknowledgement.cpp97
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MsgPacketDownlinkAckNack.cpp157
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MsgPacketDownlinkAssignment.cpp318
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MsgPacketDownlinkDummyControlBlock.cpp98
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MsgPacketMobileTBFStatus.cpp114
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MsgPacketPDCHRelease.cpp99
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MsgPacketPagingRequest.cpp258
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MsgPacketPollingRequest.cpp155
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MsgPacketPowerCtlTimingAdvance.cpp213
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MsgPacketResourceRequest.cpp219
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MsgPacketTBFRelease.cpp140
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MsgPacketTimeslotReconfigure.cpp302
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MsgPacketUplinkAckNack.cpp216
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MsgPacketUplinkAssignment.cpp347
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MsgPacketUplinkDummyControlBlock.cpp67
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/MultislotConfigurationGenerator.cpp180
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/NCMeasurementStruct.cpp102
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/RlcMacL1Proc.cpp1360
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/RlcMacMsgProc.cpp355
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/RlcMacMsgType.cpp133
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/RlcMacOamProc.cpp253
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/RlcMacRmMdProc.cpp141
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/RlcMacShow.cpp107
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/RlcMacTask.cpp404
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ScheduleAllocationInfo.cpp373
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ScheduleInfo.cpp56
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ScheduleQueue.cpp694
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/SingleBlockAllocationStruct.cpp141
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/TAITable.cpp76
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/TSPool.cpp469
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/Tbf.cpp21
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/TbfPool.cpp423
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/Timeslot.cpp42
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ULDataBlockPool.cpp120
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ULRlcLink.cpp1104
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ULTbf.cpp160
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/USFTable.cpp75
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/bitstream.cpp278
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieARFCN.cpp80
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieARFCNIndexList.cpp95
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieAccessType.cpp61
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieAckNackDescription.cpp110
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieAllocationBitMap.cpp92
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieBSIC.cpp82
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieBtsPowerCtlMode.cpp63
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieChangeMark.cpp75
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieChannelCodingCommand.cpp65
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieChannelNeeded.cpp65
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieChannelRequestDescription.cpp85
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieFrequencyParameters.cpp159
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieGPRSMobileAllocation.cpp115
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieGlobalPacketTimingAdvance.cpp113
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieGlobalPowerControlParms.cpp91
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieGlobalTFI.cpp94
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieHSN.cpp58
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieLSAParameters.cpp141
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieMABitMap.cpp98
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieMACMode.cpp65
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieMAFreqList.cpp750
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieMAIO.cpp58
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieMANumber.cpp58
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieMSRadioAccessCapability.cpp448
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieMobileIdentity.cpp177
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieNLN.cpp58
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/iePO.cpp57
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/iePRMode.cpp63
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/iePTMSI.cpp57
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/iePacketReqRef.cpp72
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/iePacketTimingAdvance.cpp95
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/iePageMode.cpp65
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/iePersistenceLevel.cpp64
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/iePowerControlParameters.cpp114
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieRFLNumberList.cpp95
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieRLCBlocksGranted.cpp58
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieRLCMode.cpp86
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieStartFrameNum.cpp80
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieTFI.cpp79
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieTLLI.cpp79
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieTMSI.cpp57
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieTQI.cpp58
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieTSC.cpp58
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieTimeslotAllocation.cpp69
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/ieeMLPPPriority.cpp70
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/msgL1Decode.cpp295
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src/msgL1Encode.cpp303
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src_api/Makefile52
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src_api/RlcMacIntf.cpp577
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src_init/Makefile52
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/src_init/RlcMacInit.cpp21
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/test/Makefile52
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/test/MsgTest.cpp1041
-rw-r--r--data/mnet/GP10/Host/Rlc_mac/test/testStart21
-rw-r--r--data/mnet/GP10/Host/Root/Makefile16
-rw-r--r--data/mnet/GP10/Host/Root/include/RootTask.h55
-rw-r--r--data/mnet/GP10/Host/Root/src/Makefile52
-rw-r--r--data/mnet/GP10/Host/Root/src/RootTask.cpp601
-rw-r--r--data/mnet/GP10/Host/Root/src_api/Makefile52
-rw-r--r--data/mnet/GP10/Host/Root/src_api/SystemModules.cpp57
-rw-r--r--data/mnet/GP10/Host/Scripts/DSPTest31
-rw-r--r--data/mnet/GP10/Host/Scripts/README62
-rw-r--r--data/mnet/GP10/Host/Scripts/iosinit.ini9
-rw-r--r--data/mnet/GP10/Host/Scripts/iosinit_crypto.ini9
-rw-r--r--data/mnet/GP10/Host/Scripts/module_list61
-rw-r--r--data/mnet/GP10/Host/Scripts/module_list_crypto62
-rw-r--r--data/mnet/GP10/Host/Scripts/oamStart29
-rw-r--r--data/mnet/GP10/Host/Scripts/oam_module_list19
-rw-r--r--data/mnet/GP10/Host/Scripts/showall.txt7
-rw-r--r--data/mnet/GP10/Host/Scripts/viperStart55
-rw-r--r--data/mnet/GP10/Host/Scripts/viperStartCdc159
-rw-r--r--data/mnet/GP10/Host/Scripts/viperStartCdcim59
-rw-r--r--data/mnet/GP10/Host/Scripts/viperStart_crypto58
-rw-r--r--data/mnet/GP10/Host/TcpServer/Makefile16
-rw-r--r--data/mnet/GP10/Host/TcpServer/Src/Makefile52
-rw-r--r--data/mnet/GP10/Host/TimeSync/Makefile16
-rw-r--r--data/mnet/GP10/Host/TimeSync/src/Makefile52
-rw-r--r--data/mnet/GP10/Host/ViperBase/admin.c2267
-rw-r--r--data/mnet/GP10/Host/ViperBase/admin.h210
-rw-r--r--data/mnet/GP10/Host/ViperBase/exchange.c240
-rw-r--r--data/mnet/GP10/Host/ViperBase/exchange.h144
-rw-r--r--data/mnet/GP10/Host/ViperBase/gateways.txt4
-rw-r--r--data/mnet/GP10/Host/ViperBase/hlr.txt17
-rw-r--r--data/mnet/GP10/Host/ViperBase/init.c203
-rw-r--r--data/mnet/GP10/Host/ViperBase/init.h26
-rw-r--r--data/mnet/GP10/Host/ViperBase/ipphones.txt11
-rw-r--r--data/mnet/GP10/Host/ViperBase/jccall.c246
-rw-r--r--data/mnet/GP10/Host/ViperBase/jccall.h45
-rw-r--r--data/mnet/GP10/Host/ViperBase/jcras.c523
-rw-r--r--data/mnet/GP10/Host/ViperBase/jcras.h45
-rw-r--r--data/mnet/GP10/Host/ViperBase/jcvbase.datbin0 -> 1444 bytes
-rw-r--r--data/mnet/GP10/Host/ViperBase/main.c46
-rw-r--r--data/mnet/GP10/Host/ViperBase/platform.c692
-rw-r--r--data/mnet/GP10/Host/ViperBase/support.c615
-rw-r--r--data/mnet/GP10/Host/ViperBase/support.h188
-rw-r--r--data/mnet/GP10/Host/ViperWatch/Images/Jetcelllogo.jpgbin0 -> 9513 bytes
-rw-r--r--data/mnet/GP10/Host/ViperWatch/Images/animated_vipercell.gifbin0 -> 21761 bytes
-rw-r--r--data/mnet/GP10/Host/ViperWatch/Images/ciscologo.jpgbin0 -> 4437 bytes
-rw-r--r--data/mnet/GP10/Host/ViperWatch/Images/filler.gifbin0 -> 76 bytes
-rw-r--r--data/mnet/GP10/Host/ViperWatch/Images/gp10.jpgbin0 -> 7540 bytes
-rw-r--r--data/mnet/GP10/Host/ViperWatch/Images/minus.gifbin0 -> 840 bytes
-rw-r--r--data/mnet/GP10/Host/ViperWatch/Images/plus.gifbin0 -> 845 bytes
-rw-r--r--data/mnet/GP10/Host/ViperWatch/Images/sp_close.gifbin0 -> 466 bytes
-rw-r--r--data/mnet/GP10/Host/ViperWatch/Images/vipercell.gifbin0 -> 11144 bytes
-rw-r--r--data/mnet/GP10/Host/ViperWatch/Introduction.htm21
-rw-r--r--data/mnet/GP10/Host/ViperWatch/Java/AlarmApplet.classbin0 -> 4284 bytes
-rw-r--r--data/mnet/GP10/Host/ViperWatch/Java/AlarmCommThread.classbin0 -> 2737 bytes
-rw-r--r--data/mnet/GP10/Host/ViperWatch/Java/MibWM.jarbin0 -> 137110 bytes
-rw-r--r--data/mnet/GP10/Host/ViperWatch/Text/AlarmCode.English115
-rw-r--r--data/mnet/GP10/Host/ViperWatch/adjcell_handover_package.htm289
-rw-r--r--data/mnet/GP10/Host/ViperWatch/adjcell_reslection_package.htm155
-rw-r--r--data/mnet/GP10/Host/ViperWatch/adjcent_cell_mgmt_overview.htm28
-rw-r--r--data/mnet/GP10/Host/ViperWatch/alarm.htm21
-rw-r--r--data/mnet/GP10/Host/ViperWatch/alarm_detail.htm136
-rw-r--r--data/mnet/GP10/Host/ViperWatch/apaIndexPage.htm41
-rw-r--r--data/mnet/GP10/Host/ViperWatch/apa_clock_source_frequency_table.htm69
-rw-r--r--data/mnet/GP10/Host/ViperWatch/apa_invalid_frequency_table.htm69
-rw-r--r--data/mnet/GP10/Host/ViperWatch/apa_page.htm44
-rw-r--r--data/mnet/GP10/Host/ViperWatch/arfcn_rssi_clock_control_table.htm92
-rw-r--r--data/mnet/GP10/Host/ViperWatch/arfcn_rssi_function.htm117
-rw-r--r--data/mnet/GP10/Host/ViperWatch/attem_immi_assign.htm88
-rw-r--r--data/mnet/GP10/Host/ViperWatch/automatic_parameter_allocation.htm102
-rw-r--r--data/mnet/GP10/Host/ViperWatch/bottom_frame.htm25
-rw-r--r--data/mnet/GP10/Host/ViperWatch/bts_basic_package.htm310
-rw-r--r--data/mnet/GP10/Host/ViperWatch/bts_ccch_config_package.htm162
-rw-r--r--data/mnet/GP10/Host/ViperWatch/bts_cell_allocaiton_table.htm95
-rw-r--r--data/mnet/GP10/Host/ViperWatch/bts_cell_allocaiton_table.old.htm190
-rw-r--r--data/mnet/GP10/Host/ViperWatch/bts_options_package.htm288
-rw-r--r--data/mnet/GP10/Host/ViperWatch/bts_timers_package.htm519
-rw-r--r--data/mnet/GP10/Host/ViperWatch/call_config_data.htm100
-rw-r--r--data/mnet/GP10/Host/ViperWatch/call_control_measurement.htm221
-rw-r--r--data/mnet/GP10/Host/ViperWatch/call_measurement_overview.htm30
-rw-r--r--data/mnet/GP10/Host/ViperWatch/cdc_board.htm74
-rw-r--r--data/mnet/GP10/Host/ViperWatch/cdr_timer.htm83
-rw-r--r--data/mnet/GP10/Host/ViperWatch/cell_config_mgmt.htm39
-rw-r--r--data/mnet/GP10/Host/ViperWatch/cell_measurement.htm217
-rw-r--r--data/mnet/GP10/Host/ViperWatch/cell_measurement_overview.htm30
-rw-r--r--data/mnet/GP10/Host/ViperWatch/cli.htm80
-rw-r--r--data/mnet/GP10/Host/ViperWatch/clock_card.htm119
-rw-r--r--data/mnet/GP10/Host/ViperWatch/dual_trx_card.htm149
-rw-r--r--data/mnet/GP10/Host/ViperWatch/export_import.htm142
-rw-r--r--data/mnet/GP10/Host/ViperWatch/external_handover.htm81
-rw-r--r--data/mnet/GP10/Host/ViperWatch/external_power_supply.htm109
-rw-r--r--data/mnet/GP10/Host/ViperWatch/feature_control.htm184
-rw-r--r--data/mnet/GP10/Host/ViperWatch/feedback.htm67
-rw-r--r--data/mnet/GP10/Host/ViperWatch/frequency_hopping.htm88
-rw-r--r--data/mnet/GP10/Host/ViperWatch/gprs_basic_package.htm127
-rw-r--r--data/mnet/GP10/Host/ViperWatch/gprs_interface_bssgp.htm232
-rw-r--r--data/mnet/GP10/Host/ViperWatch/gprs_interface_overview.htm34
-rw-r--r--data/mnet/GP10/Host/ViperWatch/gprs_interface_rlcmac.htm128
-rw-r--r--data/mnet/GP10/Host/ViperWatch/gprs_interface_rss1.htm305
-rw-r--r--data/mnet/GP10/Host/ViperWatch/gprs_interface_rss2.htm274
-rw-r--r--data/mnet/GP10/Host/ViperWatch/gprs_interface_rss_freq_table.htm154
-rw-r--r--data/mnet/GP10/Host/ViperWatch/gprs_measurement_package.htm152
-rw-r--r--data/mnet/GP10/Host/ViperWatch/gprs_options_package.htm297
-rw-r--r--data/mnet/GP10/Host/ViperWatch/gprs_overview.htm38
-rw-r--r--data/mnet/GP10/Host/ViperWatch/gprs_rss_overview.htm34
-rw-r--r--data/mnet/GP10/Host/ViperWatch/gps_card.htm111
-rw-r--r--data/mnet/GP10/Host/ViperWatch/h323_parameters.htm115
-rw-r--r--data/mnet/GP10/Host/ViperWatch/handover_control_mgmt_overview.htm70
-rw-r--r--data/mnet/GP10/Host/ViperWatch/handover_control_package.htm175
-rw-r--r--data/mnet/GP10/Host/ViperWatch/handover_timer.htm119
-rw-r--r--data/mnet/GP10/Host/ViperWatch/help.htm39
-rw-r--r--data/mnet/GP10/Host/ViperWatch/hep.htm43
-rw-r--r--data/mnet/GP10/Host/ViperWatch/ho_averaging_parameters.htm572
-rw-r--r--data/mnet/GP10/Host/ViperWatch/ho_interface_averaging_parameters.htm406
-rw-r--r--data/mnet/GP10/Host/ViperWatch/ho_threshold_parameters.htm852
-rw-r--r--data/mnet/GP10/Host/ViperWatch/htlm_alarm.htm184
-rw-r--r--data/mnet/GP10/Host/ViperWatch/index.htm28
-rw-r--r--data/mnet/GP10/Host/ViperWatch/js/common.js37
-rw-r--r--data/mnet/GP10/Host/ViperWatch/js/form.js152
-rw-r--r--data/mnet/GP10/Host/ViperWatch/js/integer.js159
-rw-r--r--data/mnet/GP10/Host/ViperWatch/js/ip.js109
-rw-r--r--data/mnet/GP10/Host/ViperWatch/js/link.js14
-rw-r--r--data/mnet/GP10/Host/ViperWatch/js/perCause.js65
-rw-r--r--data/mnet/GP10/Host/ViperWatch/js/state.js223
-rw-r--r--data/mnet/GP10/Host/ViperWatch/last_error.htm92
-rw-r--r--data/mnet/GP10/Host/ViperWatch/layer2_timer.htm138
-rw-r--r--data/mnet/GP10/Host/ViperWatch/layer3_timer.htm118
-rw-r--r--data/mnet/GP10/Host/ViperWatch/left_frame.htm387
-rw-r--r--data/mnet/GP10/Host/ViperWatch/logout.htm27
-rw-r--r--data/mnet/GP10/Host/ViperWatch/maintenance.htm49
-rw-r--r--data/mnet/GP10/Host/ViperWatch/mch.htm11
-rw-r--r--data/mnet/GP10/Host/ViperWatch/mib_flush.htm71
-rw-r--r--data/mnet/GP10/Host/ViperWatch/mobility_config_data.htm104
-rw-r--r--data/mnet/GP10/Host/ViperWatch/mobility_config_data.old.htm184
-rw-r--r--data/mnet/GP10/Host/ViperWatch/oam_config_data.htm153
-rw-r--r--data/mnet/GP10/Host/ViperWatch/pc_averaging_parameters.htm379
-rw-r--r--data/mnet/GP10/Host/ViperWatch/pc_threshold_parameters.htm908
-rw-r--r--data/mnet/GP10/Host/ViperWatch/power_card.htm82
-rw-r--r--data/mnet/GP10/Host/ViperWatch/power_control_mgmt_overview.htm70
-rw-r--r--data/mnet/GP10/Host/ViperWatch/power_control_package.htm340
-rw-r--r--data/mnet/GP10/Host/ViperWatch/proto_config_mgmt.htm34
-rw-r--r--data/mnet/GP10/Host/ViperWatch/radio_parameters.htm2348
-rw-r--r--data/mnet/GP10/Host/ViperWatch/radio_resource_config_data.htm94
-rw-r--r--data/mnet/GP10/Host/ViperWatch/radio_resource_config_data.htm.old.htm2130
-rw-r--r--data/mnet/GP10/Host/ViperWatch/reboot.htm82
-rw-r--r--data/mnet/GP10/Host/ViperWatch/rf1_package.htm151
-rw-r--r--data/mnet/GP10/Host/ViperWatch/rf2_package.htm139
-rw-r--r--data/mnet/GP10/Host/ViperWatch/ssl_conf.htm132
-rw-r--r--data/mnet/GP10/Host/ViperWatch/status_page.htm51
-rw-r--r--data/mnet/GP10/Host/ViperWatch/succ_immi_assi.htm86
-rw-r--r--data/mnet/GP10/Host/ViperWatch/test.htm97
-rw-r--r--data/mnet/GP10/Host/ViperWatch/top_frame.htm112
-rw-r--r--data/mnet/GP10/Host/ViperWatch/trx1_package.htm288
-rw-r--r--data/mnet/GP10/Host/ViperWatch/trx2_package.htm213
-rw-r--r--data/mnet/GP10/Host/ViperWatch/user_add.htm128
-rw-r--r--data/mnet/GP10/Host/ViperWatch/user_chg.htm127
-rw-r--r--data/mnet/GP10/Host/ViperWatch/user_del.htm98
-rw-r--r--data/mnet/GP10/Host/ViperWatch/user_mgmt.htm79
-rw-r--r--data/mnet/GP10/Host/ViperWatch/user_status.htm23
-rw-r--r--data/mnet/GP10/Host/ViperWatch/viper_cell_gsm_mib.htm58
-rw-r--r--data/mnet/GP10/Host/ViperWatch/vipercell_config_overview.htm70
-rw-r--r--data/mnet/GP10/Host/ViperWatch/vipercell_gsm_mib.htm36
-rw-r--r--data/mnet/GP10/Host/ViperWatch/vipercell_h323_overview.htm70
-rw-r--r--data/mnet/GP10/Host/ViperWatch/vipercell_maintenance_overview.htm70
-rw-r--r--data/mnet/GP10/Host/ViperWatch/vipercell_mgmt_info.htm184
-rw-r--r--data/mnet/GP10/Host/ViperWatch/vipercell_specific.htm30
-rw-r--r--data/mnet/GP10/Host/ViperWatch/vipercell_specific_overview.htm70
-rw-r--r--data/mnet/GP10/Host/ViperWatch/welcome.htm175
-rw-r--r--data/mnet/GP10/Host/bssgp/Makefile17
-rw-r--r--data/mnet/GP10/Host/bssgp/src/Makefile52
-rw-r--r--data/mnet/GP10/Host/bssgp/src/bssgp_api_gp.cpp413
-rw-r--r--data/mnet/GP10/Host/bssgp/src_api/Makefile52
-rw-r--r--data/mnet/GP10/Host/bssgp/src_api/bssgp_api.cpp379
-rw-r--r--data/mnet/GP10/Host/bssgp/src_api/bssgp_unitdata.cpp1288
-rw-r--r--data/mnet/GP10/Host/cc/Makefile18
-rw-r--r--data/mnet/GP10/Host/cc/cc.dsp402
-rw-r--r--data/mnet/GP10/Host/cc/src/A_Handover_Common.cpp133
-rw-r--r--data/mnet/GP10/Host/cc/src/A_Handover_Complete_Msg.cpp99
-rw-r--r--data/mnet/GP10/Host/cc/src/A_Handover_Detect_Msg.cpp80
-rw-r--r--data/mnet/GP10/Host/cc/src/A_Handover_Failure_Msg.cpp180
-rw-r--r--data/mnet/GP10/Host/cc/src/A_Handover_Ie.cpp1335
-rw-r--r--data/mnet/GP10/Host/cc/src/A_Handover_Request_Ack_Msg.cpp235
-rw-r--r--data/mnet/GP10/Host/cc/src/A_Handover_Request_Msg.cpp600
-rw-r--r--data/mnet/GP10/Host/cc/src/CCBldMSMsg.cpp523
-rw-r--r--data/mnet/GP10/Host/cc/src/CCExtHoTrgHnd.cpp3591
-rw-r--r--data/mnet/GP10/Host/cc/src/CCH323Util.cpp413
-rw-r--r--data/mnet/GP10/Host/cc/src/CCHalfCall.cpp563
-rw-r--r--data/mnet/GP10/Host/cc/src/CCHandover.cpp2191
-rw-r--r--data/mnet/GP10/Host/cc/src/CCHndUtil.cpp168
-rw-r--r--data/mnet/GP10/Host/cc/src/CCHoSrcHnd.cpp2922
-rw-r--r--data/mnet/GP10/Host/cc/src/CCHoSrcHndExt.cpp2350
-rw-r--r--data/mnet/GP10/Host/cc/src/CCHoTrgHnd.cpp704
-rw-r--r--data/mnet/GP10/Host/cc/src/CCMobExtHnd.cpp1422
-rw-r--r--data/mnet/GP10/Host/cc/src/CCMobIntHnd.cpp696
-rw-r--r--data/mnet/GP10/Host/cc/src/CCMobRemHnd.cpp870
-rw-r--r--data/mnet/GP10/Host/cc/src/CCMsgAnal.cpp356
-rw-r--r--data/mnet/GP10/Host/cc/src/CCOamHnd.cpp768
-rw-r--r--data/mnet/GP10/Host/cc/src/CCSessionHandler.cpp3580
-rw-r--r--data/mnet/GP10/Host/cc/src/CCTask.cpp1995
-rw-r--r--data/mnet/GP10/Host/cc/src/CCUtil.cpp222
-rw-r--r--data/mnet/GP10/Host/cc/src/CCconfig.cpp62
-rw-r--r--data/mnet/GP10/Host/cc/src/CallConfig.cpp73
-rw-r--r--data/mnet/GP10/Host/cc/src/CallLeg.cpp558
-rw-r--r--data/mnet/GP10/Host/cc/src/CallTask.cpp358
-rw-r--r--data/mnet/GP10/Host/cc/src/CissCallLeg.cpp262
-rw-r--r--data/mnet/GP10/Host/cc/src/HOCallLeg.cpp353
-rw-r--r--data/mnet/GP10/Host/cc/src/HOHalfCall.cpp808
-rw-r--r--data/mnet/GP10/Host/cc/src/Makefile52
-rw-r--r--data/mnet/GP10/Host/cc/src/SmsCommon.cpp53
-rw-r--r--data/mnet/GP10/Host/cc/src/SmsFsm.cpp222
-rw-r--r--data/mnet/GP10/Host/cc/src/SmsHalfCall.cpp263
-rw-r--r--data/mnet/GP10/Host/cc/src/SmsHandlers.cpp537
-rw-r--r--data/mnet/GP10/Host/cc/src/SmsLeg.cpp405
-rw-r--r--data/mnet/GP10/Host/cc/src/SmsMsgBuilder.cpp368
-rw-r--r--data/mnet/GP10/Host/cc/src/hortp.cpp217
-rw-r--r--data/mnet/GP10/Host/cc/src/smqueue.cpp120
-rw-r--r--data/mnet/GP10/Host/cc/src_api/CCMobUtil.cpp124
-rw-r--r--data/mnet/GP10/Host/cc/src_api/CCapiH323.cpp450
-rw-r--r--data/mnet/GP10/Host/cc/src_api/CCapiViperLink.cpp150
-rw-r--r--data/mnet/GP10/Host/cc/src_api/Makefile52
-rw-r--r--data/mnet/GP10/Host/cc/src_api/SmsVblink.cpp169
-rw-r--r--data/mnet/GP10/Host/cc/src_api/ccutil2.cpp201
-rw-r--r--data/mnet/GP10/Host/cc/src_init/CCinit.cpp30
-rw-r--r--data/mnet/GP10/Host/cc/src_init/Makefile52
-rw-r--r--data/mnet/GP10/Host/cc/test/CCtestUpdateVC.cpp54
-rw-r--r--data/mnet/GP10/Host/cc/test/ForC.h83
-rw-r--r--data/mnet/GP10/Host/cc/test/Makefile52
-rw-r--r--data/mnet/GP10/Host/cc/test/ccVarTest.cpp441
-rw-r--r--data/mnet/GP10/Host/cc/test/closeLogFile5
-rw-r--r--data/mnet/GP10/Host/cc/test/disconnecTerm18
-rw-r--r--data/mnet/GP10/Host/cc/test/disconnectOrig17
-rw-r--r--data/mnet/GP10/Host/cc/test/integ101
-rw-r--r--data/mnet/GP10/Host/cc/test/kill37
-rw-r--r--data/mnet/GP10/Host/cc/test/makeOrigCall23
-rw-r--r--data/mnet/GP10/Host/cc/test/makeTermCall27
-rw-r--r--data/mnet/GP10/Host/cc/test/setLogFile8
-rw-r--r--data/mnet/GP10/Host/cc/test/test1.zipbin0 -> 8355 bytes
-rw-r--r--data/mnet/GP10/Host/cdcUtils/Makefile16
-rw-r--r--data/mnet/GP10/Host/cdcUtils/aux_port/Makefile52
-rw-r--r--data/mnet/GP10/Host/cdcUtils/aux_port/auxPort.c80
-rw-r--r--data/mnet/GP10/Host/cdcUtils/cdcUtils/CPU_Mon.c612
-rw-r--r--data/mnet/GP10/Host/cdcUtils/cdcUtils/Makefile52
-rw-r--r--data/mnet/GP10/Host/cdcUtils/cdcUtils/cdcUtils.c617
-rw-r--r--data/mnet/GP10/Host/cdcUtils/cdcUtils/oamHwInfoSet.c189
-rw-r--r--data/mnet/GP10/Host/cdcUtils/clkInterface/Makefile52
-rw-r--r--data/mnet/GP10/Host/cdcUtils/clkInterface/clkInterface.c1221
-rw-r--r--data/mnet/GP10/Host/cdcUtils/coff_loader/Makefile53
-rw-r--r--data/mnet/GP10/Host/cdcUtils/coff_loader/cload.c1929
-rw-r--r--data/mnet/GP10/Host/cdcUtils/coff_loader/coff.c462
-rw-r--r--data/mnet/GP10/Host/cdcUtils/drfInterface/Makefile52
-rw-r--r--data/mnet/GP10/Host/cdcUtils/drfInterface/drfInterface.c1477
-rw-r--r--data/mnet/GP10/Host/cdcUtils/fpgaConfig/Makefile52
-rw-r--r--data/mnet/GP10/Host/cdcUtils/fpgaConfig/fpgaConfig.c154
-rw-r--r--data/mnet/GP10/Host/cdcUtils/include/clkInterface.h68
-rw-r--r--data/mnet/GP10/Host/cdcUtils/include/cload.h106
-rw-r--r--data/mnet/GP10/Host/cdcUtils/include/coff.h590
-rw-r--r--data/mnet/GP10/Host/cdcUtils/include/coffdefs.h232
-rw-r--r--data/mnet/GP10/Host/cdcUtils/include/header.h35
-rw-r--r--data/mnet/GP10/Host/cdcUtils/include/params.h277
-rw-r--r--data/mnet/GP10/Host/cdcUtils/include/proto.h13
-rw-r--r--data/mnet/GP10/Host/cdcUtils/include/version.h27
-rw-r--r--data/mnet/GP10/Host/cdr/Makefile18
-rw-r--r--data/mnet/GP10/Host/cdr/cdr.dsp280
-rw-r--r--data/mnet/GP10/Host/cdr/include/StdAfx.h42
-rw-r--r--data/mnet/GP10/Host/cdr/include/cdrdefs.h49
-rw-r--r--data/mnet/GP10/Host/cdr/src/CdrInit.cpp81
-rw-r--r--data/mnet/GP10/Host/cdr/src/CdrVoiceCall.cpp328
-rw-r--r--data/mnet/GP10/Host/cdr/src/Makefile53
-rw-r--r--data/mnet/GP10/Host/cli/Makefile16
-rw-r--r--data/mnet/GP10/Host/cli/include/cfg_adjcell.h197
-rw-r--r--data/mnet/GP10/Host/cli/include/cfg_adjcell_exit.h12
-rw-r--r--data/mnet/GP10/Host/cli/include/cfg_bts_basic.h225
-rw-r--r--data/mnet/GP10/Host/cli/include/cfg_bts_exit.h11
-rw-r--r--data/mnet/GP10/Host/cli/include/cfg_bts_options.h169
-rw-r--r--data/mnet/GP10/Host/cli/include/cfg_ccch.h189
-rw-r--r--data/mnet/GP10/Host/cli/include/cfg_ccch_exit.h11
-rw-r--r--data/mnet/GP10/Host/cli/include/cfg_cell_exit.h11
-rw-r--r--data/mnet/GP10/Host/cli/include/cfg_mspwr_ctrl.h229
-rw-r--r--data/mnet/GP10/Host/cli/include/cfg_proto_exit.h11
-rw-r--r--data/mnet/GP10/Host/cli/include/cfg_sys_feat.h86
-rw-r--r--data/mnet/GP10/Host/cli/include/cfg_sys_info.h297
-rw-r--r--data/mnet/GP10/Host/cli/include/cfg_timers.h190
-rw-r--r--data/mnet/GP10/Host/cli/include/cfg_trx.h144
-rw-r--r--data/mnet/GP10/Host/cli/include/cfg_trx_exit.h11
-rw-r--r--data/mnet/GP10/Host/cli/include/cfg_voip.h88
-rw-r--r--data/mnet/GP10/Host/cli/include/exec_debug_gp10.h212
-rw-r--r--data/mnet/GP10/Host/cli/include/exec_diag_cmd.h363
-rw-r--r--data/mnet/GP10/Host/cli/include/exec_module.h192
-rw-r--r--data/mnet/GP10/Host/cli/include/exec_show_conf.h10
-rw-r--r--data/mnet/GP10/Host/cli/include/exec_show_mod.h119
-rw-r--r--data/mnet/GP10/Host/cli/src/Makefile52
-rw-r--r--data/mnet/GP10/Host/cli/src/adjcell_chain.c215
-rw-r--r--data/mnet/GP10/Host/cli/src/bts_basic_chain.c230
-rw-r--r--data/mnet/GP10/Host/cli/src/ccch_chain.c137
-rw-r--r--data/mnet/GP10/Host/cli/src/diag_chain.c336
-rw-r--r--data/mnet/GP10/Host/cli/src/proto_chain.c150
-rw-r--r--data/mnet/GP10/Host/cli/src/sys_info_chain.c871
-rw-r--r--data/mnet/GP10/Host/cli/src/trx_chain.c167
-rw-r--r--data/mnet/GP10/Host/depend.tcl27
-rw-r--r--data/mnet/GP10/Host/gp10_Template/Makefile17
-rw-r--r--data/mnet/GP10/Host/gp10_Template/include/gp10_template.h33
-rw-r--r--data/mnet/GP10/Host/gp10_Template/src/Makefile52
-rw-r--r--data/mnet/GP10/Host/gp10_Template/src/gp10_template.c34
-rw-r--r--data/mnet/GP10/Host/grr/Makefile16
-rw-r--r--data/mnet/GP10/Host/grr/src/Makefile52
-rw-r--r--data/mnet/GP10/Host/grr/src/grr_DspUtil.cpp237
-rw-r--r--data/mnet/GP10/Host/grr/src/grr_GetOamMib.cpp592
-rw-r--r--data/mnet/GP10/Host/grr/src/grr_OamUtil.cpp358
-rw-r--r--data/mnet/GP10/Host/grr/src/grr_PassOamMib.cpp753
-rw-r--r--data/mnet/GP10/Host/grr/src/grr_ProcDspMsg.cpp202
-rw-r--r--data/mnet/GP10/Host/grr/src/grr_ProcGrrMsg.cpp68
-rw-r--r--data/mnet/GP10/Host/grr/src/grr_ProcOamMsg.cpp991
-rw-r--r--data/mnet/GP10/Host/grr/src/grr_ProcRlcMsg.cpp140
-rw-r--r--data/mnet/GP10/Host/grr/src/grr_ProcRrmMsg.cpp142
-rw-r--r--data/mnet/GP10/Host/grr/src/grr_ProcUtil.cpp105
-rw-r--r--data/mnet/GP10/Host/grr/src/grr_RadioCtrl.cpp722
-rw-r--r--data/mnet/GP10/Host/grr/src/grr_SendDspMsg.cpp259
-rw-r--r--data/mnet/GP10/Host/grr/src/grr_SetOamMib.cpp234
-rw-r--r--data/mnet/GP10/Host/grr/src/grr_SysInfo.cpp369
-rw-r--r--data/mnet/GP10/Host/grr/src/grr_Task.cpp212
-rw-r--r--data/mnet/GP10/Host/grr/src/grr_TestUtil.cpp1087
-rw-r--r--data/mnet/GP10/Host/grr/src/grr_init.cpp550
-rw-r--r--data/mnet/GP10/Host/grr/src_api/Makefile52
-rw-r--r--data/mnet/GP10/Host/grr/src_api/grr_intf.cpp508
-rw-r--r--data/mnet/GP10/Host/grr/src_init/Makefile52
-rw-r--r--data/mnet/GP10/Host/grr/src_init/grr_glob.cpp206
-rw-r--r--data/mnet/GP10/Host/gslink/Makefile17
-rw-r--r--data/mnet/GP10/Host/gslink/include/gslink.h78
-rw-r--r--data/mnet/GP10/Host/gslink/src/Makefile52
-rw-r--r--data/mnet/GP10/Host/gslink/src/gslink.cpp814
-rw-r--r--data/mnet/GP10/Host/jcc/Makefile16
-rw-r--r--data/mnet/GP10/Host/jcc/docs/LUDB.docbin0 -> 803840 bytes
-rw-r--r--data/mnet/GP10/Host/jcc/include/JCC_ED.h53
-rw-r--r--data/mnet/GP10/Host/jcc/include/LUDBOamMsgProc.h31
-rw-r--r--data/mnet/GP10/Host/jcc/include/LUDBTimerProc.h28
-rw-r--r--data/mnet/GP10/Host/jcc/include/LUDBVoipMsgProc.h40
-rw-r--r--data/mnet/GP10/Host/jcc/include/LudbHashTbl.h48
-rw-r--r--data/mnet/GP10/Host/jcc/include/LudbLinkedList.h72
-rw-r--r--data/mnet/GP10/Host/jcc/jvc_api/JCCbcCb.cpp377
-rw-r--r--data/mnet/GP10/Host/jcc/jvc_api/JcVctoVc.cpp213
-rw-r--r--data/mnet/GP10/Host/jcc/jvc_api/Makefile52
-rw-r--r--data/mnet/GP10/Host/jcc/jvc_api/viperchannel.cpp247
-rw-r--r--data/mnet/GP10/Host/jcc/src/JCC_ED.cpp397
-rw-r--r--data/mnet/GP10/Host/jcc/src/LUDBMmMsgProc.cpp470
-rw-r--r--data/mnet/GP10/Host/jcc/src/LUDBOamMsgProc.cpp88
-rw-r--r--data/mnet/GP10/Host/jcc/src/LUDBTask.cpp207
-rw-r--r--data/mnet/GP10/Host/jcc/src/LUDBTimerProc.cpp84
-rw-r--r--data/mnet/GP10/Host/jcc/src/LUDBVoipMsgProc.cpp714
-rw-r--r--data/mnet/GP10/Host/jcc/src/Makefile52
-rw-r--r--data/mnet/GP10/Host/jcc/src_api/JCCLog.cpp107
-rw-r--r--data/mnet/GP10/Host/jcc/src_api/JCCTimer.cpp95
-rw-r--r--data/mnet/GP10/Host/jcc/src_api/JCCUtil.cpp97
-rw-r--r--data/mnet/GP10/Host/jcc/src_api/LUDBInstance.cpp774
-rw-r--r--data/mnet/GP10/Host/jcc/src_api/LudbHashTbl.cpp135
-rw-r--r--data/mnet/GP10/Host/jcc/src_api/LudbLinkedList.cpp230
-rw-r--r--data/mnet/GP10/Host/jcc/src_api/Makefile52
-rw-r--r--data/mnet/GP10/Host/jcc/src_api/SubscInfoTest.cpp187
-rw-r--r--data/mnet/GP10/Host/jcc/src_api/ludbapi.cpp949
-rw-r--r--data/mnet/GP10/Host/l1proxy/Makefile16
-rw-r--r--data/mnet/GP10/Host/l1proxy/Src_init/Makefile52
-rw-r--r--data/mnet/GP10/Host/l1proxy/Src_init/l1proxy_init.cpp64
-rw-r--r--data/mnet/GP10/Host/l1proxy/include/cc_user.datbin0 -> 920 bytes
-rw-r--r--data/mnet/GP10/Host/l1proxy/include/foo.h17
-rw-r--r--data/mnet/GP10/Host/l1proxy/src/Makefile52
-rw-r--r--data/mnet/GP10/Host/l1proxy/src/l1MsMsgProc.cpp780
-rw-r--r--data/mnet/GP10/Host/l1proxy/src/l1diags.cpp960
-rw-r--r--data/mnet/GP10/Host/l1proxy/src/l1proxy.cpp976
-rw-r--r--data/mnet/GP10/Host/l1proxy/test/env.bat4
-rw-r--r--data/mnet/GP10/Host/l1proxy/test/ld6
-rw-r--r--data/mnet/GP10/Host/l1proxy/test/loop8
-rw-r--r--data/mnet/GP10/Host/l1proxy/test/msg0.c18
-rw-r--r--data/mnet/GP10/Host/l1proxy/test/msg1.c22
-rw-r--r--data/mnet/GP10/Host/l1proxy/test/start4
-rw-r--r--data/mnet/GP10/Host/logging/Makefile16
-rw-r--r--data/mnet/GP10/Host/logging/doc/logging.docbin0 -> 192000 bytes
-rw-r--r--data/mnet/GP10/Host/logging/src/Makefile52
-rw-r--r--data/mnet/GP10/Host/logging/src/logtask.cpp104
-rw-r--r--data/mnet/GP10/Host/mib.datbin0 -> 44061 bytes
-rw-r--r--data/mnet/GP10/Host/mib.txt941
-rw-r--r--data/mnet/GP10/Host/mm/Makefile16
-rw-r--r--data/mnet/GP10/Host/mm/include/MMBssgpMsgProc.h30
-rw-r--r--data/mnet/GP10/Host/mm/include/MMCcMsgProc.h42
-rw-r--r--data/mnet/GP10/Host/mm/include/MMLudbMsgProc.h45
-rw-r--r--data/mnet/GP10/Host/mm/include/MMMdMsgProc.h103
-rw-r--r--data/mnet/GP10/Host/mm/include/MMOamMsgProc.h30
-rw-r--r--data/mnet/GP10/Host/mm/include/MMPmProc.h38
-rw-r--r--data/mnet/GP10/Host/mm/include/MMRmMsgProc.h48
-rw-r--r--data/mnet/GP10/Host/mm/include/MMSendMsg.h50
-rw-r--r--data/mnet/GP10/Host/mm/include/MMSysCmdProc.h33
-rw-r--r--data/mnet/GP10/Host/mm/include/MMTask.h30
-rw-r--r--data/mnet/GP10/Host/mm/include/MMTimerProc.h39
-rw-r--r--data/mnet/GP10/Host/mm/include/MMTypes.h129
-rw-r--r--data/mnet/GP10/Host/mm/include/MMUtil.h53
-rw-r--r--data/mnet/GP10/Host/mm/include/MMVblinkMsgProc.h28
-rw-r--r--data/mnet/GP10/Host/mm/src/MMBssgpMsgProc.cpp170
-rw-r--r--data/mnet/GP10/Host/mm/src/MMCcMsgProc.cpp349
-rw-r--r--data/mnet/GP10/Host/mm/src/MMConfig.cpp314
-rw-r--r--data/mnet/GP10/Host/mm/src/MMLudbMsgProc.cpp518
-rw-r--r--data/mnet/GP10/Host/mm/src/MMMdMsgProc.cpp1399
-rw-r--r--data/mnet/GP10/Host/mm/src/MMOamMsgProc.cpp142
-rw-r--r--data/mnet/GP10/Host/mm/src/MMPmProc.cpp108
-rw-r--r--data/mnet/GP10/Host/mm/src/MMRmMsgProc.cpp615
-rw-r--r--data/mnet/GP10/Host/mm/src/MMSendMsg.cpp269
-rw-r--r--data/mnet/GP10/Host/mm/src/MMSysCmdProc.cpp107
-rw-r--r--data/mnet/GP10/Host/mm/src/MMTask.cpp321
-rw-r--r--data/mnet/GP10/Host/mm/src/MMTimerProc.cpp128
-rw-r--r--data/mnet/GP10/Host/mm/src/MMUtil.cpp487
-rw-r--r--data/mnet/GP10/Host/mm/src/MMVBLinkMsgProc.cpp160
-rw-r--r--data/mnet/GP10/Host/mm/src/Makefile52
-rw-r--r--data/mnet/GP10/Host/mm/src_api/MMapiH323.cpp52
-rw-r--r--data/mnet/GP10/Host/mm/src_api/Makefile52
-rw-r--r--data/mnet/GP10/Host/mm/src_init/MMinit.cpp32
-rw-r--r--data/mnet/GP10/Host/mm/src_init/Makefile52
-rw-r--r--data/mnet/GP10/Host/rm/Docs/CallFlowPreAlphaV0.2.pptbin0 -> 328192 bytes
-rw-r--r--data/mnet/GP10/Host/rm/Docs/ModuleRMV01.rtf4508
-rw-r--r--data/mnet/GP10/Host/rm/Docs/Q931cause.doc0
-rw-r--r--data/mnet/GP10/Host/rm/Makefile16
-rw-r--r--data/mnet/GP10/Host/rm/Shell.log_9812101080
-rw-r--r--data/mnet/GP10/Host/rm/Src/Makefile52
-rw-r--r--data/mnet/GP10/Host/rm/Src/cmdlogact5
-rw-r--r--data/mnet/GP10/Host/rm/Src/intg_CellCfg.cpp45
-rw-r--r--data/mnet/GP10/Host/rm/Src/intg_ClearRmChans.cpp68
-rw-r--r--data/mnet/GP10/Host/rm/Src/intg_SendAsyncHoReqToDsp.cpp37
-rw-r--r--data/mnet/GP10/Host/rm/Src/intg_SendCbCmd.cpp77
-rw-r--r--data/mnet/GP10/Host/rm/Src/intg_SendChanActivation.cpp61
-rw-r--r--data/mnet/GP10/Host/rm/Src/intg_SendChanDeActivation.cpp32
-rw-r--r--data/mnet/GP10/Host/rm/Src/intg_SendDisc.cpp44
-rw-r--r--data/mnet/GP10/Host/rm/Src/intg_SendPhConnIndToLapdm.cpp112
-rw-r--r--data/mnet/GP10/Host/rm/Src/intg_SendPhRaIndToLapdm.cpp48
-rw-r--r--data/mnet/GP10/Host/rm/Src/intg_SendPhyInfo.cpp34
-rw-r--r--data/mnet/GP10/Host/rm/Src/intg_SendRrRelReqToRm.cpp50
-rw-r--r--data/mnet/GP10/Host/rm/Src/intg_SendSabmLup.cpp63
-rw-r--r--data/mnet/GP10/Host/rm/Src/intg_SetDlSG.cpp36
-rw-r--r--data/mnet/GP10/Host/rm/Src/intg_SetGsmCodec.cpp35
-rw-r--r--data/mnet/GP10/Host/rm/Src/intg_SetUlSG.cpp37
-rw-r--r--data/mnet/GP10/Host/rm/Src/intg_ShowRmChans.cpp55
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_AllocSmCtxt.cpp172
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_ChanReq.cpp302
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_ConfigTrxSlots.cpp83
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_DlRaInd.cpp85
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_EntryIdTestPrint.cpp46
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_GetImsiMod100.cpp27
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_GetIrtEntryId.cpp56
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_HoReq.cpp225
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_InitAll.cpp694
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_InitIrt.cpp199
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_InitIrtTestPrint.cpp188
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_InitLAPDm.cpp223
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_InitLAPDmTestPrint.cpp54
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_InitRmTestPrint.cpp138
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_MdlErrRptCauseRel.cpp85
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_OamGetGsmData.cpp908
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_OamGetRmConfigData.cpp33
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_OamRegTrapVars.cpp2028
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_OamSendHoNCellToDsp.cpp119
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_OamSendHoSCellToDsp.cpp137
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_OamSendPcToDsp.cpp80
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_OamSendPwrRedStepToDsp.cpp70
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_PopulateSI2.cpp60
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_PopulateSI3.cpp92
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_PopulateSI4.cpp89
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_PopulateSI5.cpp46
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_PopulateSI6.cpp58
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_ProcClassMarkIE.cpp72
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_ProcMeasRes.cpp40
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_RetrvConfigFromOam.cpp105
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_RrEstReq.cpp52
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_RslReleasel.cpp393
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_S0Null.cpp22
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_S10TrafficModeEstablished.cpp216
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_S11TrafficChanSuspendig.cpp212
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_S1RmRunning.cpp233
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_S2ActivatingSigTrafficChan.cpp147
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_S3SigChanActivated.cpp142
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_S4TrafficChanActivated.cpp203
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_S4TrafficChanActivated.cpp.old158
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_S5SigModeEstablished.cpp527
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_S6ActivatingTrafficMode.cpp95
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_S7ReleasingSigTrafficChan.cpp134
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_S8TrafficModeActivated.cpp271
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_S9DeactivatingSigTrafficChan.cpp420
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendAllSystemInfosToBcchTrx.cpp26
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendAsyncHoRequired.cpp84
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendChanActivation.cpp58
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendChanAssignComplete.cpp40
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendChanModeModify.cpp96
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendChanRelease.cpp83
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendConfigFpgaToTrx.cpp47
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendDeactivateSacch.cpp36
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendHandoverCommand.cpp37
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendHoComplete.cpp43
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendHoFailure.cpp42
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendHoReqAck.cpp111
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendHoReqNAck.cpp35
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendImmAssign.cpp143
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendModeModify.cpp41
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendPagingRequestType1.cpp135
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendPagingRsp.cpp86
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendRfChanRelease.cpp35
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendRrRelCnf.cpp31
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendRrRelInd.cpp32
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendSacchFillingSI5.cpp119
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendSacchFillingSI6.cpp73
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendSetDGainToTrx.cpp40
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendSetUGainToTrx.cpp39
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendSlotActivateToTrx.cpp76
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendSynchInfoToBcchTrx.cpp42
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendSystemInfo2ToBcchTrx.cpp71
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendSystemInfo3ToBcchTrx.cpp71
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendSystemInfo4ToBcchTrx.cpp71
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendTrxConfigToTrx.cpp44
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SendTuneSynthToTrx.cpp141
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SolvePagingGroup.cpp32
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_StartTimer.cpp107
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_StopTimer.cpp91
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_SysCmd.cpp50
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_Task.cpp38
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_TestPrintOamRmConfigData.cpp149
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_TestPrintOamRmStdGsmData.cpp370
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_TimerExpired.cpp41
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_UmMmMsgTestPrint.cpp64
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_WaitForL1Bootstrap.cpp38
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_WaitForL1Rsp.cpp76
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_WaitForSlotActivateRsp.cpp71
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_despatch.cpp124
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_glob.cpp98
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_initL1.cpp121
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_initRm.cpp339
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_main.cpp601
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_msgQReceive.cpp24
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_oamif.cpp65
-rw-r--r--data/mnet/GP10/Host/rm/Src/rm_smscb.cpp249
-rw-r--r--data/mnet/GP10/Host/rm/Src_api/Makefile52
-rw-r--r--data/mnet/GP10/Host/rm/Src_api/api_SendMsgFromRmToCc.cpp48
-rw-r--r--data/mnet/GP10/Host/rm/Src_api/api_SendMsgFromRmToMm.cpp46
-rw-r--r--data/mnet/GP10/Host/rm/Src_api/l1rm_intf.cpp115
-rw-r--r--data/mnet/GP10/Host/rm/Src_api/rm_EntryIdVsTrxSlot.cpp296
-rw-r--r--data/mnet/GP10/Host/rm/Src_init/Makefile52
-rw-r--r--data/mnet/GP10/Host/rm/Src_init/debug.cpp76
-rw-r--r--data/mnet/GP10/Host/rm/Src_init/sys_init.cpp111
-rw-r--r--data/mnet/GP10/Host/rm/include/api_SendMsgFromRmToMm.h17
-rw-r--r--data/mnet/GP10/Host/rm/include/cc_user.datbin0 -> 920 bytes
-rw-r--r--data/mnet/GP10/Host/rm/include/debug.new.h78
-rw-r--r--data/mnet/GP10/Host/rm/include/rm_l1msg.h132
-rw-r--r--data/mnet/GP10/Host/rm/test/Makefile16
-rw-r--r--data/mnet/GP10/Host/rm/test/ctdt.c22
-rw-r--r--data/mnet/GP10/Host/rm/test/defs.bsp143
-rw-r--r--data/mnet/GP10/Host/rm/test/defs.x86-win3271
-rw-r--r--data/mnet/GP10/Host/rm/test/integ35
-rw-r--r--data/mnet/GP10/Host/rm/test/kill6
-rw-r--r--data/mnet/GP10/Host/rm/test/make.I80486gnu48
-rw-r--r--data/mnet/GP10/Host/rm/test/redirect4
-rw-r--r--data/mnet/GP10/Host/rm/test/rules.bsp582
-rw-r--r--data/mnet/GP10/Host/rm/test/sysinfo.log1230
-rw-r--r--data/mnet/GP10/Host/snmp/Asn1/vipercell.mib8370
-rw-r--r--data/mnet/GP10/Host/snmp/Asn1/vipercfg.mib783
-rw-r--r--data/mnet/GP10/Host/snmp/MIBS/10-1-2-103-mib.datbin0 -> 15038 bytes
-rw-r--r--data/mnet/GP10/Host/snmp/MIBS/10-1-2-104-mib.datbin0 -> 15038 bytes
-rw-r--r--data/mnet/GP10/Host/snmp/MIBS/10-1-2-106-mib.datbin0 -> 15038 bytes
-rw-r--r--data/mnet/GP10/Host/snmp/Makefile18
-rw-r--r--data/mnet/GP10/Host/snmp/include/version.h23
-rw-r--r--data/mnet/GP10/Host/snmp/snmp.dsp188
-rw-r--r--data/mnet/GP10/Host/snmp/src/Makefile154
-rw-r--r--data/mnet/GP10/Host/snmp/src/mib_init.c58
-rw-r--r--data/mnet/GP10/Host/snmp/src/testMib.c301
-rw-r--r--data/mnet/GP10/Host/snmp/src/vipertbl.c947
-rw-r--r--data/mnet/GP10/Host/snmp/test/Makefile22
-rw-r--r--data/mnet/GP10/Host/snmp/test/demoApp.c176
-rw-r--r--data/mnet/GP10/Host/socket/Makefile17
-rw-r--r--data/mnet/GP10/Host/socket/src/Makefile52
-rw-r--r--data/mnet/GP10/Host/sslc/Makefile19
-rw-r--r--data/mnet/GP10/Host/sslc/src/Makefile52
-rw-r--r--data/mnet/GP10/Host/subsc/Makefile16
-rw-r--r--data/mnet/GP10/Host/subsc/src/makefile51
-rw-r--r--data/mnet/GP10/Host/version.txt27
-rw-r--r--data/mnet/GP10/Host/vipercell.cfg2
-rw-r--r--data/mnet/GP10/Host/voip/include/ccb.h553
-rw-r--r--data/mnet/GP10/Host/voip/include/eventhandlers.h246
-rw-r--r--data/mnet/GP10/Host/voip/include/h323interface.h87
-rw-r--r--data/mnet/GP10/Host/voip/include/h323sm.h30
-rw-r--r--data/mnet/GP10/Host/voip/include/h323task.h58
-rw-r--r--data/mnet/GP10/Host/voip/include/rtptask.h67
-rw-r--r--data/mnet/GP10/Host/voip/include/smroutines.h75
-rw-r--r--data/mnet/GP10/Host/voip/include/util.h72
-rw-r--r--data/mnet/GP10/Host/voip/include/viperip.h113
-rw-r--r--data/mnet/GP10/Host/voip/include/vipermem.h30
-rw-r--r--data/mnet/GP10/Host/voip/makefile16
-rw-r--r--data/mnet/GP10/Host/voip/rtp/Makefile52
-rw-r--r--data/mnet/GP10/Host/voip/rtp/jetrtp.cpp1445
-rw-r--r--data/mnet/GP10/Host/voip/rtp/viperip.cpp512
-rw-r--r--data/mnet/GP10/Host/voip/src/Makefile59
-rw-r--r--data/mnet/GP10/Host/voip/src/ccb.cpp201
-rw-r--r--data/mnet/GP10/Host/voip/src/eventhandlers.cpp1775
-rw-r--r--data/mnet/GP10/Host/voip/src/h323interface.cpp915
-rw-r--r--data/mnet/GP10/Host/voip/src/h323sm.cpp765
-rw-r--r--data/mnet/GP10/Host/voip/src/h323task.cpp1094
-rw-r--r--data/mnet/GP10/Host/voip/src/rtptask.cpp232
-rw-r--r--data/mnet/GP10/Host/voip/src/smroutines.cpp2565
-rw-r--r--data/mnet/GP10/Host/voip/src/util.cpp1189
-rw-r--r--data/mnet/GP10/Host/voip/src/vblink.cpp3658
-rw-r--r--data/mnet/GP10/Host/voip/src/vipermem.cpp46
-rw-r--r--data/mnet/GP10/Host/voip/src/voipapi.cpp461
-rw-r--r--data/mnet/GP10/Makefile184
-rw-r--r--data/mnet/GP10/l3defs.mk176
1482 files changed, 398521 insertions, 0 deletions
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..4cc74ed
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,135 @@
+Cisco-style Mozilla Public License 1.1
+
+1. Definitions.
+
+1.1. "Commercial Use" means distribution or otherwise making the Covered Code available to a third party.
+
+1.2. ''Contributor'' means each entity that creates or contributes to the creation of Modifications.
+
+1.3. ''Contributor Version'' means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor.
+
+1.4. ''Covered Code'' means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof.
+
+1.5. ''Electronic Distribution Mechanism'' means a mechanism generally accepted in the software development community for the electronic transfer of data.
+
+1.6. ''Executable'' means Covered Code in any form other than Source Code.
+
+1.7. ''Initial Developer'' means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A.
+
+1.8. ''Larger Work'' means a work which combines Covered Code or portions thereof with code not governed by the terms of this License.
+
+1.9. ''License'' means this document.
+
+1.9.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
+
+1.9. ''Modifications'' means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is:
+
+A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications.
+
+B. Any new file that contains any part of the Original Code or previous Modifications.
+
+1.10. ''Original Code'' means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License.
+
+1.11."Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
+
+1.12. ''Source Code'' means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge.
+
+1.13. "You'' (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You'' includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control'' means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
+
+2. Source Code License.
+
+2.1. The Initial Developer Grant. The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims:
+
+(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and
+
+(b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof).
+
+(c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License.
+
+(d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices.
+
+2.2. Contributor Grant. Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and
+
+(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
+
+(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code.
+
+(d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5.
+
+3.2. Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party.
+
+3.3. Description of Modifications. You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code.
+
+3.4. Intellectual Property Matters
+
+(a) Third Party Claims. If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL'' which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained.
+
+(b) Contributor APIs. If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file.
+
+(c) Representations. Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License.
+
+3.5. Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
+
+3 .6. Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
+
+3.7. Larger Works.You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code.
+
+4. Inability to Comply Due to Statute or Regulation. If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
+
+5. Application of this License. This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code.
+
+6. Versions of the License.
+
+6.1. New Versions. Netscape Communications Corporation (''Netscape'') may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number.
+
+6.2. Effect of New Versions. Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netscape. No one other than Netscape has the right to modify the terms applicable to Covered Code created under this License.
+
+6.3. Derivative Works. If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases ''Mozilla'', ''MOZILLAPL'', ''MOZPL'', ''Netscape'', "MPL", ''NPL'' “Cisco”, “Cisco Systems, Inc.” “Cisco Systems”, “Cisco MPL” or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the Cisco-style MPL. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.)
+
+7. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS'' BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+8. TERMINATION.
+
+8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
+
+8.2. If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that:
+
+(a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above.
+
+(b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant.
+
+8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license.
+
+8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination.
+
+9. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+10. U.S. GOVERNMENT END USERS. The Covered Code is a ''commercial item,'' as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of ''commercial computer software'' and ''commercial computer software documentation,'' as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein.
+
+11. MISCELLANEOUS. This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License.
+
+12. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
+
+13. MULTIPLE-LICENSED CODE. Initial Developer may designate portions of the Covered Code as Multiple-Licensed. Multiple-Licensed means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the NPL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A.
+
+----------
+
+EXHIBIT A
+
+Cisco-style Mozilla Public License.
+
+``The contents of this file are subject to the Cisco-style Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at _vovida.org_
+
+Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
+
+The Original Code is _all code in the zip file labelled _gsml-1_0.zip_.
+
+The Initial Developer of the Original Code is __Cisco Systems, Inc___. Portions created by __Cisco Systems, Inc_ are Copyright (C) __2005_ __Cisco Systems, Inc_. All Rights Reserved.
+
+Contributor(s): _Cisco Systems, Inc and James Forster___.
diff --git a/Scrubbed_File_List.txt b/Scrubbed_File_List.txt
new file mode 100644
index 0000000..663bfb8
--- /dev/null
+++ b/Scrubbed_File_List.txt
@@ -0,0 +1,54 @@
+
+The following files were 'scrubbed' from the archived Cisco codebase due to questions about re-distribution rights.
+
+
+Common\apm\include\msgDefs.h:// (c) Copyright JetCell 2000
+Common\apm\include\msgProc.h:// (c) Copyright JetCell 1998
+Common\apm\src\debug.cpp:// (c) Copyright JetCell 1998
+Common\bssgp\win32test\dbgout.cpp: * Copyright JetCell, Inc. 1999-2000 All rights reserved *
+Common\bssgp\win32test\dbgout.h: * Copyright JetCell, Inc. 1999-2000 All rights reserved *
+Common\cdr\include\FTClient.h:// (c) Copyright JetCell 2000
+Common\cdr\src_server\FTClient.cpp:// (c) Copyright JetCell 2000
+Common\Pm\src\socketutil.cpp:// (c) Copyright JetCell 1998
+GP10\Dsp\Driver\Drv6x.c:/* (C) Copyright 1997,1998 by DNA Enterprises, Inc. */
+GP10\Dsp\include\COMMON.H:/* (C) Copyright 1997,1998 by DNA Enterprises, Inc. */
+GP10\Dsp\include\DMA_UTIL.H:/* (C) Copyright 1997,1998 by DNA Enterprises, Inc. */
+GP10\Dsp\include\MCBSPDRV.H:/* (C) Copyright 1997,1998 by DNA Enterprises, Inc. */
+GP10\Host\Alarm\Test\alarm_test.cpp:* (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+GP10\Host\Cdc_bsp\ads860.h:/* Copyright 1984-1997 Wind River Systems, Inc. */
+GP10\Host\Cdc_bsp\ataDrv.c:/* Copyright 1989-1998 Wind River Systems, Inc. */
+GP10\Host\Cdc_bsp\cdcim.h:/* Copyright 1984-1997 Wind River Systems, Inc. */
+GP10\Host\Cdc_bsp\config.h:/* Copyright 1984-1997 Wind River Systems, Inc. */
+GP10\Host\Cdc_bsp\configdb.h: * Copyright 1984-1996 Wind River Systems, Inc.
+GP10\Host\Cdc_bsp\configNet.h:/* Copyright 1984-1998 Wind River Systems, Inc. */
+GP10\Host\Cdc_bsp\motfecend.c:/* Copyright 1989-1998 Wind River Systems, Inc. */
+GP10\Host\Cdc_bsp\sysLib.c:/* Copyright 1984-1997 Wind River Systems, Inc. */
+GP10\Host\Cdc_bsp\sysSerial.c:/* Copyright 1984-1996 Wind River Systems, Inc. */
+GP10\Host\Common_To_Host\include\logmodules.h: * Copyright JetCell, Inc. 1999-2000 All rights reserved *
+GP10\Host\Common_To_Host\Logging\VCLOGGING.H: * Copyright JetCell, Inc. All rights reserved *
+GP10\Host\Common_To_Host\Logging\VcModules.h: * Copyright JetCell, Inc. 1999-2000 All rights reserved *
+GP10\Host\Common_To_Host\TcpServer\TcpSrvApi.h:* (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+GP10\Host\Http\include\enum_tab.h: * Copyright (C) 1998 Rapid Logic, Inc.
+GP10\Host\Http\include\http_feedback.h:* (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+GP10\Host\Http\include\options.h: * Copyright (C) 1998 Rapid Logic, Inc.
+GP10\Host\Http\src\http_event.c:* (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+GP10\Host\Http\src\http_feedback.c:* (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+GP10\Host\Http\src\http_main.c:* (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+GP10\Host\Http\src\http_oamOperation.c:* (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+GP10\Host\Http\src\http_post.c:* (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+GP10\Host\Http\src\http_security.c:* (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+GP10\Host\Http\src\ignition.c: * Copyright (C) 1999 Rapid Logic, Inc.
+GP10\Host\Http\src\main.c:* Copyright (C) 1998 Rapid Logic, Inc.
+GP10\Host\l1proxy\include\cdcim.h:/* Copyright 1984-1997 Wind River Systems, Inc. */
+GP10\Host\logging\src\l3MsLog.cpp:// (c) Copyright JetCell 1998
+GP10\Host\TcpServer\Include\queue.h:* (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+GP10\Host\TcpServer\Src\queue.cpp:* (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+GP10\Host\TcpServer\Src\TcpServer.cpp:* (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+GP10\Host\TimeSync\src\time_userTime.cpp:* (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+GP10\Host\voip\include\gkadd.h:* Copyright RADVision 1998. *
+GP10\Host\voip\include\gkcci.h:* Copyright RADVision 1998. *
+GP10\Host\voip\include\gklrqi.h:* Copyright RADVision 1998. *
+GP10\Host\voip\include\gkmain.h:* Copyright RADVision 1998. *
+GP10\Host\voip\include\gkrgi.h:* Copyright RADVision 1998. *
+GP10\Host\voip\include\gkstorage.h:* Copyright RADVision 1998. *
+GP10\Host\voip\include\gkTypes.h:* Copyright RADVision 1998. *
diff --git a/data/mnet/Common/Alarm/Makefile b/data/mnet/Common/Alarm/Makefile
new file mode 100644
index 0000000..cad5689
--- /dev/null
+++ b/data/mnet/Common/Alarm/Makefile
@@ -0,0 +1,47 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+# (OPTIONAL) Append REPLACE - Replaces the List of directories
+# to be used in the SUBDIRS variable
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src REPLACE=src
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+SUBDIRS = src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+VOBDIR = $(TOP_OF_VOB)/$(VOB)
+
+# Allows a sub-set of the source code directories to be used
+
+ifneq ($(REPLACE),)
+ SUBDIRS = $(REPLACE)
+endif
+
+include $(VOBDIR)/l3defs.mk
+
+
diff --git a/data/mnet/Common/Alarm/include/AlarmTask.h b/data/mnet/Common/Alarm/include/AlarmTask.h
new file mode 100644
index 0000000..09bb68c
--- /dev/null
+++ b/data/mnet/Common/Alarm/include/AlarmTask.h
@@ -0,0 +1,151 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : AlarmTask.h */
+/* Author(s) : Bhawani Sapkota */
+/* Create Date : 9/18/2000 */
+/* Description : This file contains Alarm task routines */
+/* */
+/*********************************************************************/
+/* REVISION HISTORY
+/*___________________________________________________________________*/
+/*----------+--------+-----------------------------------------------*/
+/* Name | Date | Reason */
+/*----------+--------+-----------------------------------------------*/
+/* Bhawani |09/28/00| Initial Draft */
+/*----------+--------+-----------------------------------------------*/
+/*********************************************************************/
+
+#ifndef _ALARMTASK_H_
+#define _ALARMTASK_H_ /* include once only */
+
+#include "Alarm.h"
+
+
+/* Include product specific code here */
+#if defined (MNET_PRODUCT_SPECIFIC_GS)
+#include "GSOsTune.h"
+#elif defined (MNET_PRODUCT_SPECIFIC_GMC)
+#include "vclogging.h"
+#elif defined (MNET_PRODUCT_SPECIFIC_GP10)
+#include "Logging/vclogging.h"
+#endif
+
+typedef struct _AlarmEntry_t
+{
+ AlarmCode_t code; // last error code
+ int id; // first alarm ID
+ Alarm_severity_t severity; // severity
+ ubyte4 utc; // outstanding since this time
+ int count;
+ struct _AlarmEntry_t *next;
+}AlarmEntry_t;
+
+
+class AlarmTask:public JCTask {
+public:
+
+ AlarmTask(char *);
+ ~AlarmTask();
+
+ int InitAlarmTask();
+
+ static int bootupTimeoutHandler();
+ static int entryPoint();
+
+ static int AlarmMain(void);
+ static char *srcName();
+
+ static AlarmTask *theAlarmTask;
+
+ // disk operation
+ STATUS saveAlarm(const char* msg);
+ STATUS renameOldLogFile();
+ STATUS getLastId(unsigned long *id);
+ int generateNextId();
+
+ AlarmEntry_t *findAlarmEntry(MNET_MODULE_ID mid, AlarmCode_t errorCode);
+ bool addAlarmEntry(MNET_MODULE_ID mid, MibTag moduleErrorTag, AlarmCode_t code, char *arg1=NULL, char *arg2=NULL);
+ bool delAlarmEntry(MNET_MODULE_ID mid, MibTag moduleErrorTag, AlarmCode_t code);
+ EnableDisableState_t updateOperationalState();
+
+
+ // module handling
+ AlarmCode_t getMdlStatus(MNET_MODULE_ID mid);
+ AlarmEntry_t *allocEntry(MNET_MODULE_ID id);
+
+ void printStatus();
+ void getOutstandingAlarmCount(ubyte1 &, ubyte1 &, ubyte1 &);
+
+ // message q operation
+ JC_STATUS msgqSend( unsigned int msgType, char * buffer, unsigned int nBytes);
+ JC_STATUS alarmSend(InterModuleAlarmMsgType_t mtype,
+ MNET_MODULE_ID mid,
+ MibTag moduleErrorTag=0,
+ AlarmCode_t alarm_code=EC_COMMON_NOERROR,
+ char *arg1=NULL,
+ char *arg2=NULL
+ );
+
+ //AMS Operation
+ bool sendSummaryUpdateToAms();
+ void reportNewAlarm(int id, MNET_MODULE_ID mid, AlarmCode_t ecode,
+ Alarm_severity_t severity, char * arg1=0, char * arg2=0);
+
+ //Operational State Management
+ EnableDisableState_t getOperationState();
+ void setOperationState(EnableDisableState_t opstate );
+
+ // Mib access control status
+ EnableDisableState_t getMibAcessControlState();
+ void setMibAcessControlState(EnableDisableState_t opstate);
+
+ void updateModuleLastError(MNET_MODULE_ID mid, MibTag moduleErrorTag);
+ void setModuleLastError(MibTag moduleErrorTag, AlarmCode_t alarm_code);
+
+ // startup and quit
+ void quit();
+ int startup();
+ void closeSocket();
+
+
+private:
+ JCMsgQueue *jcMsgQ;
+ JCCTimer *initTimer;
+ char *_mnetbase; /* holds MNET_BASE environment variable */
+ char *_logfilename; /* holds absolute path of the logfilename */
+
+ char *_sourceName; /* holds the source name */
+ char *_sourceType; /* type of the source (Gp, Gmc, Itp, */
+
+ char *_msgRecvBuff; /* holds received message */
+ AlarmEntry_t *_ms[MNET_MAX_MODULE_IDS]; /* current module Alarm Status */
+ AlarmEntry_t *_ap; /* Alarm pools */
+
+ int _statistics[2][Alarm_max_severity];
+
+ void populateSourceName();
+
+ //status variables
+ bool _quit;
+ bool _mibAccessState;
+
+ static bool isOneCreated;
+
+ // Disallow the following functions
+ AlarmTask();
+ AlarmTask(const AlarmTask&);
+ AlarmTask& operator=(const AlarmTask&);
+ int operator== (const AlarmTask&) const;
+};
+
+
+#endif
diff --git a/data/mnet/Common/Alarm/include/alarm.h b/data/mnet/Common/Alarm/include/alarm.h
new file mode 100644
index 0000000..ba5edd0
--- /dev/null
+++ b/data/mnet/Common/Alarm/include/alarm.h
@@ -0,0 +1,168 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : AlarmTask.h */
+/* Author(s) : Bhawani Sapkota */
+/* Create Date : 9/18/2000 */
+/* Description : This file contains alarm task basic defination */
+/* routines */
+/* */
+/*********************************************************************/
+/* REVISION HISTORY
+/*___________________________________________________________________*/
+/*----------+--------+-----------------------------------------------*/
+/* Name | Date | Reason */
+/*----------+--------+-----------------------------------------------*/
+/* Bhawani |07/14/00| Initial Draft */
+/* Bhawani |11/20/00| resturctured to share among GP, GMS and GS */
+/*----------+--------+-----------------------------------------------*/
+/*********************************************************************/
+
+
+#if !defined(_ALARM_H_)
+#define _ALARM_H_
+
+#include "AlarmCode.h"
+#include "Os/JCMsgQueue.h"
+#include "Os/JCModule.h"
+#include "Os/JCCTimer.h"
+#include "Os/JCTask.h"
+
+#include "alarm_prodSpec.h"
+
+typedef unsigned short ubyte2;
+typedef unsigned long ubyte4;
+typedef unsigned char ubyte1;
+
+typedef short sbyte2;
+typedef long sbyte4;
+
+
+#define ALARM_q_maxMsgs 32
+#define ALARM_q_maxMsgLength 100
+#define ALARM_q_option MSG_Q_PRIORITY
+#define ALARM_q_timeout 18000 /* 5 minutes */
+
+#define ALARM_task_name "tAlarm"
+#define ALARM_mib_lock_timeout 7200 /* 2 minutes */
+
+#define ALARM_record_length 70
+#define ALARM_max_records 58
+#define ALARM_max_outstanding 50
+
+
+/* It is assumeed that current working directory is ViperCall */
+
+#define ALARM_logFile "/Alarm/alarm.log"
+#define ALARM_logFileMaxSize 128
+#define ALARM_dirChar '/'
+
+#define ALARM_maxMsgSize 1024
+#define ALARM_defaultRecvBuffer 128
+#define ALARM_optionalArgSize 40
+
+
+#define ALARM_monStation "QSEvent"
+#define ALARM_mchResponse "mchResponse"
+
+typedef enum Alarm_severity
+{
+ Alarm_critical=0,
+ Alarm_major,
+ Alarm_minor,
+ Alarm_info,
+ Alarm_max_severity
+} Alarm_severity_t;
+
+
+typedef enum
+{
+ InterModuleAlarmMsgTypeClearAlarm = 0,
+ InterModuleAlarmMsgTypeRaiseAlarm,
+ InterModuleAlarmMsgTypeShutdown,
+ InterModuleAlarmMsgTypeReboot
+}InterModuleAlarmMsgType_t;
+
+
+typedef struct
+{
+ ubyte1 senderId; /* message originator */
+ InterModuleAlarmMsgType_t msgType; /* message type (MT_TRAP) */
+ MNET_MODULE_ID srcModuleId; /* Alarm source module ID */
+ MibTag errorTag; /* This module's ErrorTag */
+ AlarmCode_t code; /* Alarm code */
+ char arg1[ALARM_optionalArgSize]; /* argument 1 */
+ char arg2[ALARM_optionalArgSize]; /* argument 2 */
+}InterModuleAlarmMsg_t;
+
+
+typedef enum
+{
+ stateDisabled=0,
+ stateEnabled=1
+} EnableDisableState_t;
+
+
+/* Printing and sending to logging module */
+void alarm_print(char *format, ...);
+
+#ifdef _UT
+void HexDumper(ubyte1 *buffer, int length);
+#define alarm_debug(XX) printf("[ALARM TRACE] %s ->", fname); alarm_print XX
+#define alarm_error(XX) printf("[Alarm Error] %s ->", fname); alarm_print XX
+#define alarm_warning(XX) printf("[Alarm Warning] %s ->", fname); alarm_print XX
+#define alarm_dump(x,y); HexDumper(x, y);
+#define alarm_fenter(XX); static char fname[] = XX;
+#define alarm_fexit();
+#else
+#define alarm_fenter(XXX); \
+ DBG_FUNC(XXX, MY_LOGID); \
+ DBG_ENTER(); \
+
+#define alarm_fexit(); DBG_LEAVE();
+
+#define alarm_debug(XX) DBG_TRACE XX
+#define alarm_error(XX) DBG_ERROR XX
+#define alarm_warning(XX) DBG_WARNING XX
+#define alarm_dump(x,y); DBG_HEXDUMP(x,y);
+#endif
+
+
+/* defined at alarm_main module */
+int alarmTask();
+int alarm_taskCreate();
+void alarm_taskQuit ();
+void alarm_msgPrint(char *format, ...);
+void alarm_rebootHandler ( int startType );
+
+
+/* In file alarm_modules.cpp */
+void alarm_rptMdlStatus(int id, int mid, int ecode, int severity=Alarm_critical,
+ char* arg1= (char *) NULL, char* arg2= (char *) NULL);
+void alarm_printStatus();
+
+
+/* In file alarm_message.cpp */
+void alarm_processMsg(char *inComingMsg);
+
+/* It will go to alarm_event.cpp */
+void alarm_clientMsg (char *, short, unsigned long);
+void alarm_broadcast(const char *msg);
+int alarm_generateNextId();
+
+
+/* alarm_diskFile.cpp */
+STATUS alarm_renameOldLogFile();
+
+/* TimeSync api from Time Sync module */
+extern void time_syncTime();
+
+#endif
diff --git a/data/mnet/Common/Alarm/include/alarm_interface.h b/data/mnet/Common/Alarm/include/alarm_interface.h
new file mode 100644
index 0000000..9d30b45
--- /dev/null
+++ b/data/mnet/Common/Alarm/include/alarm_interface.h
@@ -0,0 +1,127 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : AlarmTask.h */
+/* Author(s) : Bhawani Sapkota */
+/* Create Date : 9/18/2000 */
+/* Description : This file contains interface defination between */
+/* Alarm Source (GP, GMC, GS) and Alarm Monitoring */
+/* Server (APM1) */
+/* */
+/*********************************************************************/
+/* REVISION HISTORY
+/*___________________________________________________________________*/
+/*----------+--------+-----------------------------------------------*/
+/* Name | Date | Reason */
+/*----------+--------+-----------------------------------------------*/
+/* Bhawani |07/14/00| Initial Draft */
+/* Bhawani |11/20/00| resturctured to share among GP, GMS and GS */
+/* Bhawani |12/05/00| Added UDP server and client port so that the */
+/* | | server and clients can reside on the same IP */
+/* Bhawani |12/05/00| swaped the server and client port to make the */
+/* | | original port as the server port. */
+/*----------+--------+-----------------------------------------------*/
+/*********************************************************************/
+
+
+#if !defined(_ALARM_INTERFACE_H_)
+#define _ALARM_INTERFACE_H_
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#define ALARM_viperCellNameMaxSize 41
+#define ALARM_viperCellIpMaxSize 16
+#define ALARM_unknownAlarmId 0x00
+
+/* Alarm Server's IP address is Gate Keeper's IP address */
+
+/* Alarm Client/Server's Universal UPD ports */
+#define ALARM_interfaceUdpPortClient 12791
+#define ALARM_interfaceUdpPortServer 11788
+
+#define ALARM_periodicUpdateInterval 300 /* seconds */
+
+
+/* Alarm Source Type */
+#define ALARM_srcTypViperCell 128
+#define ALARM_srcTypViperBase 129
+
+
+/* Alarm Message Type */
+#define ALARM_msgTypSummaryUpdate 1
+#define ALARM_msgTypAlarmEvent 2
+
+typedef char sbyte1;
+typedef short sbyte2;
+typedef long sbyte4;
+
+typedef unsigned char ubyte1;
+typedef unsigned short ubyte2;
+typedef unsigned long ubyte4;
+
+/* Message header */
+typedef struct AlarmInterfaceMsgHeader_{
+ ubyte1 alarmSrcType;
+ ubyte1 alarmMsgType;
+ ubyte2 alarmMsgLen;
+}AlarmInterfaceMsgHeader;
+
+#define ALARM_interfaceMsgHdrLen 4
+
+/* Summary update data */
+typedef struct AlarmSummaryUpdateData_{
+ ubyte4 alarmSrcIp;
+ sbyte1 alarmSrcName[ALARM_viperCellNameMaxSize];
+ ubyte1 alarmCriticalCount;
+ ubyte1 alarmMajorCount;
+ ubyte1 alarmMinorCount;
+}AlarmSummaryUpdateData;
+
+#define ALARM_summaryUpdateDataLen (7 + ALARM_viperCellNameMaxSize)
+#define ALARM_summaryUpdateMsgLen (ALARM_interfaceMsgHdrLen + ALARM_summaryUpdateDataLen + sizeof(long))
+
+#define ALARM_eventDataLen (28 + ALARM_viperCellNameMaxSize)
+#define ALARM_eventMsgLen (ALARM_interfaceMsgHdrLen + ALARM_eventDataLen + sizeof(long))
+
+
+/* Stubs for new event data */
+typedef struct AlarmEventData_ {
+ ubyte4 alarmId;
+ ubyte4 alarmCode;
+ ubyte4 alarmTimestamp;
+ ubyte4 alarmSrcIp;
+ sbyte1 alarmSrcModuleName[ALARM_viperCellNameMaxSize];
+ ubyte4 alarmSrcModuleId;
+ ubyte4 opt1;
+ ubyte4 opt2;
+}AlarmEventData;
+
+
+/* Alarm Complete message */
+typedef long Align;
+typedef struct Alarm
+{
+ AlarmInterfaceMsgHeader hdr;
+ union {
+ AlarmSummaryUpdateData summaryUpdateData;
+ AlarmEventData eventData;
+ }body;
+ Align x;
+}AlarmViperCellToAmsMsg;
+
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* _ALARM_INTERFACE_H_ */
diff --git a/data/mnet/Common/Alarm/src/Makefile b/data/mnet/Common/Alarm/src/Makefile
new file mode 100644
index 0000000..146a01d
--- /dev/null
+++ b/data/mnet/Common/Alarm/src/Makefile
@@ -0,0 +1,44 @@
+
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+# Name of this App's Directory
+THIS_APP_DIR = Alarm
+
+VOB2DIR = $(TOP_OF_VOB)\..\$(VOB)
+BINDIR = ..\bin
+
+include $(VOB2DIR)\l3defs.mk
+
+all: $(MODULE_OBJS)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
diff --git a/data/mnet/Common/Alarm/src/alarm_diskFile.cpp b/data/mnet/Common/Alarm/src/alarm_diskFile.cpp
new file mode 100644
index 0000000..e7d2564
--- /dev/null
+++ b/data/mnet/Common/Alarm/src/alarm_diskFile.cpp
@@ -0,0 +1,198 @@
+
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : AlarmTask.h */
+/* Author(s) : Bhawani Sapkota */
+/* Create Date : 07/11/99 */
+/* Description : This file contains routines to perform disk I/O to */
+/* save alarm to the disk file. */
+/* */
+/*********************************************************************/
+/* REVISION HISTORY
+/*___________________________________________________________________*/
+/*----------+--------+-----------------------------------------------*/
+/* Name | Date | Reason */
+/*----------+--------+-----------------------------------------------*/
+/* Bhawani |09/28/00| Initial Draft */
+/* Bhawani |11/20/00| resturctured to share among GP, GMS and GS */
+/*----------+--------+-----------------------------------------------*/
+/*********************************************************************/
+#include "AlarmTask.h"
+
+#include "dirent.h"
+#include "stat.h"
+#include "time.h"
+#include "string.h"
+static unsigned long CyclicFileRecordIndex = 0;
+
+STATUS AlarmTask::saveAlarm(const char* msg)
+{
+ FILE *alarmfd;
+
+ alarm_fenter("AlarmTask::saveAlarm");
+
+ // Opens for reading and writing;
+ alarmfd = fopen(_logfilename, "r+");
+ if (alarmfd == NULL)
+ {
+ alarm_error(("Could not open alarm log file %s (Reason: %s)\n", _logfilename, strerror(errno)));
+ alarm_fexit();
+ return ERROR;
+ }
+
+ long fpos = ALARM_record_length*CyclicFileRecordIndex++;
+ CyclicFileRecordIndex = CyclicFileRecordIndex%ALARM_max_records;
+
+ fseek(alarmfd, fpos, SEEK_SET);
+
+ fputs(msg, alarmfd);
+ fclose(alarmfd);
+ alarm_debug(("Alarm Message successfully saved\n"));
+ alarm_fexit();
+ return OK;
+}
+
+STATUS AlarmTask::renameOldLogFile()
+{
+ struct stat fileStat;
+
+ alarm_fenter("alarm_renameOldLogFile");
+
+ /* check if old Alarrm log file exists */
+ if (stat (_logfilename, &fileStat) == OK)
+ {
+ /* The file exist */
+ struct tm localTime;
+ struct tm *ltime = &localTime;
+ time_t longTime;
+ char *pdest;
+ char newFileName[ALARM_logFileMaxSize];
+
+ longTime = time(NULL);
+
+ ltime = localtime(&longTime);
+
+ strcpy(newFileName, _logfilename);
+
+ /* Assumes that file name is long enough */
+ pdest = strrchr(newFileName, ALARM_dirChar);
+ if( pdest != NULL )
+ {
+ sprintf(pdest+1, "AlarmLogAsOf_%d-%d-%d,%d:%d", ltime->tm_mon+1, ltime->tm_mday,
+ ltime->tm_year+1900,ltime->tm_hour, ltime->tm_min);
+ } else {
+ sprintf(newFileName, "AlarmLogAsOf_%d-%d-%d,%d:%d", ltime->tm_mon+1, ltime->tm_mday,
+ ltime->tm_year+1900,ltime->tm_hour, ltime->tm_min);
+ }
+ alarm_debug(("Renaming %s file to %s\n", _logfilename, newFileName));
+ if (rename(_logfilename, newFileName) == ERROR)
+ {
+
+ /* rename failed */
+ FILE *alarmfd;
+
+ alarm_error(("Could not rename old file (Reason: %s)\n", strerror(errno)));
+ alarm_warning(("Truncating the old alarm file: %s\n", _logfilename));
+
+ alarmfd = fopen(_logfilename, "w");
+ if (alarmfd == NULL)
+ {
+ alarm_error(("Could not truncate file(Reason: %s)\n",strerror(errno)));
+ } else {
+ fclose(alarmfd);
+ }
+
+ } else {
+ alarm_debug(("Old alarm file successfully renamed to %s\n", newFileName));
+ }
+
+ } else {
+ alarm_warning(("Old alarm log file \"%s\" does not exist.\n", _logfilename));
+ }
+
+ alarm_fexit();
+ return OK;
+
+}
+
+
+STATUS AlarmTask::getLastId(unsigned long *id)
+{
+ FILE *alarmfd;
+ struct stat statBuff;
+ alarm_fenter("AlarmTask::getLastId");
+ STATUS status;
+
+
+ status = stat(_logfilename, &statBuff);
+
+
+ if ( status == ERROR // file does not exist
+ || statBuff.st_size == 0 // newly created
+ || statBuff.st_size % ALARM_record_length != 0 // corrupt file
+ || statBuff.st_size > ALARM_max_records*ALARM_record_length // corrupt file
+ )
+ {
+ // if size is a zero, there was no alarm file
+ *id = 1;
+ CyclicFileRecordIndex = 0;
+ alarmfd = fopen(_logfilename, "w"); // truncate file
+ if (alarmfd != NULL)
+ fclose(alarmfd);
+ else
+ {
+ alarm_error(("Could not create %s for writing: %s\n", _logfilename, strerror(errno)));
+ }
+
+ } else {
+
+ alarm_debug(("Current Alarm disk file size = %d\n", statBuff.st_size));
+
+ if (statBuff.st_size < ALARM_max_records*ALARM_record_length)
+ {
+
+ // the size less then max size
+ CyclicFileRecordIndex = statBuff.st_size / ALARM_record_length;
+ *id = CyclicFileRecordIndex+1;
+ } else {
+ unsigned long id1, id2, i;
+
+ alarmfd= fopen(_logfilename, "r");
+ if (alarmfd == NULL)
+ {
+ alarm_error(("Cannot open() Alarm disk file %s to read (Reason: %s)\n", _logfilename, strerror(errno)));
+ *id =1;
+ CyclicFileRecordIndex = 0;
+ status = ERROR;
+ } else {
+ // file is ALARM_max_records*ALARM_record_length size
+ fseek(alarmfd, 0, SEEK_SET);
+ fscanf(alarmfd, "%u", &id1);
+ for(i=1; i< ALARM_max_records; i++)
+ {
+ fseek(alarmfd, i*ALARM_record_length, SEEK_SET);
+ fscanf(alarmfd, "%u", &id2);
+ if(id1> id2)
+ {
+ break;
+ } else {
+ id1 = id2;
+ }
+ }
+ CyclicFileRecordIndex = i % ALARM_max_records;
+ *id = id1+1;
+ }
+ }
+ }
+ alarm_fexit();
+ return status;
+}
diff --git a/data/mnet/Common/Alarm/src/alarm_event.cpp b/data/mnet/Common/Alarm/src/alarm_event.cpp
new file mode 100644
index 0000000..1fb3713
--- /dev/null
+++ b/data/mnet/Common/Alarm/src/alarm_event.cpp
@@ -0,0 +1,196 @@
+
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : AlarmTask.h */
+/* Author(s) : Bhawani Sapkota */
+/* Create Date : 07/11/99 */
+/* Description : contains alarm module message that interact with */
+/* other module . */
+/* */
+/*********************************************************************/
+/* REVISION HISTORY
+/*___________________________________________________________________*/
+/*----------+--------+-----------------------------------------------*/
+/* Name | Date | Reason */
+/*----------+--------+-----------------------------------------------*/
+/* Bhawani |07/11/99| Initial Draft */
+/* Bhawani |11/20/00| resturctured to share among GP, GMS and GS */
+/*----------+--------+-----------------------------------------------*/
+
+#ifndef _ALARM_EVENT_CPP_
+#define _ALARM_EVENT_CPP_
+
+#include "AlarmTask.h"
+
+void alarm_clientMsg ( char * message, // the message from the client
+ short size, // size of the message
+ unsigned long clientId // unique client ID of the requester client
+ )
+{
+
+ alarm_fenter("alarm_clientMsg");
+ alarm_debug(("Message receive from client (ID = %d)", clientId));
+ alarm_debug(("%s\n", message));
+ alarm_fexit();
+}
+
+
+void alarm_broadcast(const char *msg)
+{
+ int len;
+ alarm_fenter("alarm_broadcast");
+ fflush(stdout);
+
+ len = strlen(msg);
+ //TcpSrvSendResponse(msg, len, kAlarmGpName);
+ alarm_debug(("Alarm message was sent\n"));
+ alarm_fexit();
+}
+
+JC_STATUS AlarmTask::msgqSend(unsigned int msgType, char * buffer, unsigned int nBytes)
+{
+ return jcMsgQ->JCMsgQSend(this->jcMsgQ, msgType, MY_MODULE_ID, buffer, nBytes, JC_NO_WAIT, JC_MSG_Q_FIFO);
+}
+
+
+JC_STATUS AlarmTask::alarmSend
+ (
+ InterModuleAlarmMsgType_t mtype,
+ MNET_MODULE_ID mid,
+ MibTag moduleErrorTag,
+ AlarmCode_t alarm_code,
+ char *arg1,
+ char *arg2
+ )
+{
+ InterModuleAlarmMsg_t alarmMsg;
+
+ memset(&alarmMsg, 0, sizeof(InterModuleAlarmMsg_t));
+
+ alarmMsg.errorTag = moduleErrorTag;
+ alarmMsg.code = alarm_code;
+ alarmMsg.senderId = (ubyte1) MY_MODULE_ID;
+ alarmMsg.msgType = mtype;
+ alarmMsg.srcModuleId = mid;
+
+ if (NULL != arg1)
+ {
+ strncpy(alarmMsg.arg1, arg1, ALARM_optionalArgSize-1);
+ }
+
+ if (NULL != arg2)
+ {
+ strncpy(alarmMsg.arg2, arg2, ALARM_optionalArgSize-1);
+ }
+
+ return AlarmTask::theAlarmTask->msgqSend
+ (InterModuleAlarmMsgTypeRaiseAlarm,
+ (char *) &alarmMsg,
+ sizeof(InterModuleAlarmMsg_t));
+
+}
+
+extern "C" JC_STATUS alarm_raise(MNET_MODULE_ID mid, MibTag moduleErrorTag, AlarmCode_t alarm_code)
+{
+ return AlarmTask::theAlarmTask->alarmSend(InterModuleAlarmMsgTypeRaiseAlarm, mid, moduleErrorTag, alarm_code);
+
+}
+
+extern "C" JC_STATUS alarm_raise_args(MNET_MODULE_ID mid, MibTag moduleErrorTag, AlarmCode_t alarm_code, int arg1, int arg2)
+{
+ char pszArg1[ALARM_optionalArgSize];
+ char pszArg2[ALARM_optionalArgSize];
+ sprintf (pszArg1, "%d", arg1);
+ sprintf (pszArg2, "%d", arg2);
+
+ return AlarmTask::theAlarmTask->alarmSend(InterModuleAlarmMsgTypeRaiseAlarm, mid, moduleErrorTag, alarm_code, pszArg1, pszArg2);
+
+}
+
+extern "C" JC_STATUS alarm_clear(MNET_MODULE_ID mid, MibTag moduleErrorTag, AlarmCode_t alarm_code)
+{
+ return AlarmTask::theAlarmTask->alarmSend(InterModuleAlarmMsgTypeClearAlarm, mid, moduleErrorTag, alarm_code);
+}
+
+EnableDisableState_t AlarmTask::getOperationState()
+{
+ long opState;
+ oam_getMibIntVar(MY_MIB_OPERATION_STATE, &opState);
+ return (EnableDisableState_t) opState;
+}
+
+
+
+void AlarmTask::setOperationState(EnableDisableState_t opstate )
+{
+ EnableDisableState_t state = getOperationState();
+
+ if(state != opstate)
+ {
+ oam_setMibIntVar(MY_MODULE_ID, MY_MIB_OPERATION_STATE, opstate);
+ }
+}
+
+
+EnableDisableState_t AlarmTask::getMibAcessControlState()
+{
+ long opState;
+ oam_getMibIntVar(MY_MIB_ACCESS_CONTROL_TAG, &opState);
+ return (EnableDisableState_t) opState;
+}
+
+
+void AlarmTask::setMibAcessControlState(EnableDisableState_t opstate )
+{
+ EnableDisableState_t state = getMibAcessControlState();
+ alarm_fenter("AlarmTask::setMibAcessControlState");
+
+ if(state != opstate)
+ {
+ oam_setMibIntVar(MY_MODULE_ID, MY_MIB_ACCESS_CONTROL_TAG, opstate);
+ }
+
+ // local mib status
+ _mibAccessState = (opstate == stateEnabled);
+
+ if (_mibAccessState)
+ {
+ // This is the first time
+ initTimer->cancelTimer();
+ alarm_debug (("Mib access is now enabled\n"));
+ }
+ alarm_fexit();
+}
+
+void AlarmTask::setModuleLastError(MibTag moduleErrorTag, AlarmCode_t alarm_code)
+{
+ oam_setMibIntVar(MY_MODULE_ID, moduleErrorTag, alarm_code);
+}
+
+void AlarmTask::populateSourceName()
+{
+ const int kDisplayStringSize = 256;
+ char name[kDisplayStringSize];
+
+ memset(name, 0, kDisplayStringSize);
+ oam_getMibByteAry(MY_MIB_SOURCE_NAME, (ubyte1 *) name, kDisplayStringSize-1);
+ _sourceName = new char[strlen(name+1)];
+ strcpy(_sourceName, name);
+}
+
+char * AlarmTask::srcName()
+{
+ return theAlarmTask->_sourceName;
+}
+
+
+#endif /* _ALARM_EVENT_CPP_ */ \ No newline at end of file
diff --git a/data/mnet/Common/Alarm/src/alarm_main.cpp b/data/mnet/Common/Alarm/src/alarm_main.cpp
new file mode 100644
index 0000000..19682dc
--- /dev/null
+++ b/data/mnet/Common/Alarm/src/alarm_main.cpp
@@ -0,0 +1,187 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : AlarmTask.h */
+/* Author(s) : Bhawani Sapkota */
+/* Create Date : 9/18/2000 */
+/* Description : This file contains main routines for the alarm task */
+/* */
+/*********************************************************************/
+/* REVISION HISTORY
+/*___________________________________________________________________*/
+/*----------+--------+-----------------------------------------------*/
+/* Name | Date | Reason */
+/*----------+--------+-----------------------------------------------*/
+/* Bhawani |09/28/00| Initial Draft */
+/* Bhawani |11/20/00| resturctured to share among GP, GMS and GS */
+/*----------+--------+-----------------------------------------------*/
+/*********************************************************************/
+
+
+#include "AlarmTask.h"
+#include "ctype.h"
+
+#if defined( _TCP_SERVER_EXIST)
+#include "TcpServer/TcpSrvApi.h"
+#endif
+
+AlarmTask * AlarmTask::theAlarmTask = NULL;
+
+bool AlarmTask::isOneCreated = false;
+
+AlarmTask::~AlarmTask()
+{
+ alarm_fenter("AlarmTask::~AlarmTask");
+ alarm_debug(("Alarm Task instance is being deleted"));
+ delete jcMsgQ;
+ delete initTimer;
+ alarm_fexit();
+}
+
+int AlarmTask::entryPoint()
+{
+
+ return theAlarmTask->startup();
+
+}
+
+int AlarmTask::startup()
+{
+ int status;
+ unsigned int msgType;
+ MNET_MODULE_ID senderId;
+ unsigned int recvMsgsize;
+
+
+ alarm_fenter("alarmTask");
+
+ // Rename the old alarm file
+ // alarm_renameOldLogFile();
+
+#if defined( _TCP_SERVER_EXIST)
+
+ // Register TCP server call back function
+ TcpSrvRegHand(kAlarmGpName, // Client Group Name (<= kClientGpNameMax)
+ alarm_clientMsg); // Function pointer to be called
+
+#endif
+
+ /* now go into the message loop */
+ JCTaskEnterLoop();
+ _quit = false;
+
+ while(_quit == false)
+ {
+
+ /* get message from queue; if necessary wait for a maximum of ALARM_q_timeout ticks */
+ status = jcMsgQ->JCMsgQReceive(&jcMsgQ, &msgType, &senderId, _msgRecvBuff, &recvMsgsize, ALARM_q_timeout);
+ if (status == ERROR)
+ {
+ if (errno == S_objLib_OBJ_TIMEOUT)
+ {
+
+ /* Send heartbeat message to AMS in case it was down and now it has been up */
+ sendSummaryUpdateToAms();
+ continue;
+ }
+
+ }
+ else
+ {
+
+ alarm_processMsg(_msgRecvBuff);
+ sendSummaryUpdateToAms();
+ }
+ }
+
+ JCTaskNormExit();
+
+ closeSocket();
+
+ isOneCreated = false;
+ //delete theAlarmTask;
+ theAlarmTask = NULL;
+
+ /* The application need to unsunscribe trap before exiting. */
+ alarm_debug(("Alarm Task is exiting ... \n"));
+ alarm_fexit();
+ return OK;
+}
+
+
+/* print alarm messages */
+void alarm_print(char *format, ...)
+{
+ va_list marker;
+ va_start( marker, format ); /* Initialize variable arguments. */
+ vprintf(format, marker);
+ fflush(stdout);
+ va_end( marker ); /* Reset variable arguments. */
+ return;
+
+}
+
+#ifdef _UT
+void HexDumper(ubyte1 *buffer, int length )
+/*++ Purpose:
+Put the inbound data in a hex dump format
+Arguments:
+buffer - points to the extension control block
+length - specifies the number of bytes to dump --*/
+{
+ int size;
+ int i;
+ int dwPos = 0;
+ while (length > 0) {
+ //
+ // Take min of 16 or length
+ //
+ size = min(16, length );
+ //
+ // Build text line
+ //
+ printf(" %04X ", dwPos );
+ for (i = 0; i < size; i++)
+ {
+ printf("%02X ", buffer[i] );
+ }
+ //
+ // Add spaces for short lines
+ //
+ while (i < 16)
+ {
+ printf(" " );
+ i++;
+ }
+ //
+ // Add ASCII chars
+ //
+ for (i = 0; i < size; i++)
+ {
+ if (isprint(buffer[i]))
+ {
+ printf("%c", buffer[i] );
+ } else {
+ printf("." );
+ }
+ }
+
+ printf("\n");
+ //
+ // Advance positions
+ //
+ length -= size;
+ dwPos += size;
+ buffer += size;
+ }
+}
+#endif /* _UT */
+
diff --git a/data/mnet/Common/Alarm/src/alarm_message.cpp b/data/mnet/Common/Alarm/src/alarm_message.cpp
new file mode 100644
index 0000000..a629ba6
--- /dev/null
+++ b/data/mnet/Common/Alarm/src/alarm_message.cpp
@@ -0,0 +1,101 @@
+
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : AlarmTask.h */
+/* Author(s) : Bhawani Sapkota */
+/* Create Date : 9/18/2000 */
+/* Description : This file contains alarm task message processing */
+/* routines */
+/* */
+/*********************************************************************/
+/* REVISION HISTORY
+/*___________________________________________________________________*/
+/*----------+--------+-----------------------------------------------*/
+/* Name | Date | Reason */
+/*----------+--------+-----------------------------------------------*/
+/* Bhawani |07/14/00| Initial Draft */
+/* Bhawani |11/20/00| resturctured to share among GP, GMS and GS */
+/*----------+--------+-----------------------------------------------*/
+/*********************************************************************/
+
+
+
+#ifndef _ALARM_MESSAGE_CPP_
+#define _ALARM_MESSAGE_CPP_
+
+#include "AlarmTask.h"
+
+
+void alarm_processTrap(TrapMsg *trapMsg)
+{
+ /* The Oam Message */
+ MibTag tag = trapMsg->mibTag;
+ int table = MIB_TBL(tag);
+ int mid = MIB_ITM(tag) - 1; // need to do this
+
+ alarm_fenter("alarm_processOamMsg");
+
+ alarm_fexit();
+ return;
+}
+
+void alarm_processAlarmMsg(InterModuleAlarmMsg_t * alarmMsg)
+{
+ alarm_fenter("alarm_processAlarmMsg");
+ switch(alarmMsg->msgType)
+ {
+
+ case InterModuleAlarmMsgTypeClearAlarm:
+ AlarmTask::theAlarmTask->delAlarmEntry(alarmMsg->srcModuleId, alarmMsg->errorTag, alarmMsg->code);
+ break;
+
+ case InterModuleAlarmMsgTypeRaiseAlarm:
+ AlarmTask::theAlarmTask->addAlarmEntry(alarmMsg->srcModuleId, alarmMsg->errorTag, alarmMsg->code, alarmMsg->arg1, alarmMsg->arg2);
+ break;
+
+ case InterModuleAlarmMsgTypeShutdown:
+ AlarmTask::theAlarmTask->quit();
+ break;
+
+ case InterModuleAlarmMsgTypeReboot:
+ AlarmTask::theAlarmTask->quit();
+ break;
+
+ default:
+ alarm_warning(("Not recognized alarm message type (message type = %d)", alarmMsg->msgType));
+ break;
+ }
+ alarm_fexit();
+ return;
+}
+
+void alarm_processMsg(char *inComingMsg)
+{
+ /* process the trap message here*/
+ alarm_fenter("alarm_processMsg");
+ alarm_debug(("A new message has just arrived.\n"));
+
+ switch(inComingMsg[0])
+ {
+ case MNET_MODULE_SNMP:
+ alarm_processTrap((TrapMsg *) inComingMsg);
+ break;
+ case MY_MODULE_ID:
+ alarm_processAlarmMsg((InterModuleAlarmMsg_t *) inComingMsg);
+ break;
+ default:
+ alarm_error(("Message from unsupported module (ID = %d)\n", inComingMsg[0]));
+ }
+ alarm_fexit();
+}
+
+#endif /* _ALARM_MESSAGE_CPP_ */ \ No newline at end of file
diff --git a/data/mnet/Common/Alarm/src/alarm_modules.cpp b/data/mnet/Common/Alarm/src/alarm_modules.cpp
new file mode 100644
index 0000000..3d3fb6f
--- /dev/null
+++ b/data/mnet/Common/Alarm/src/alarm_modules.cpp
@@ -0,0 +1,441 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : AlarmTask.h */
+/* Author(s) : Bhawani Sapkota */
+/* Create Date : 9/18/2000 */
+/* Description : This file contains alarm task module handling */
+/* routines */
+/* */
+/*********************************************************************/
+/* REVISION HISTORY
+/*___________________________________________________________________*/
+/*----------+--------+-----------------------------------------------*/
+/* Name | Date | Reason */
+/*----------+--------+-----------------------------------------------*/
+/* Bhawani |07/14/00| Initial Draft */
+/* Bhawani |11/20/00| resturctured to share among GP, GMS and GS */
+/*----------+--------+-----------------------------------------------*/
+/*********************************************************************/
+
+#ifndef _ALARM_MODULE_CPP_
+#define _ALARM_MODULE_CPP_
+
+#include "AlarmTask.h"
+#include <time.h>
+
+Alarm_severity_t getSeverity(AlarmCode_t acode)
+{
+ Alarm_severity_t severity = Alarm_info;
+ int tmp = (acode & 0xFFFF);
+
+
+ if (tmp < ALARM_CRITICAL_START_POINT)
+ {
+ severity = Alarm_info;
+ } else if (tmp < ALARM_MAJOR_START_POINT) {
+ severity = Alarm_critical;
+ } else if (tmp < ALARM_MINOR_START_POINT) {
+ severity = Alarm_major;
+ } else if (tmp < ALARM_INFO_START_POINT) {
+ severity = Alarm_minor;
+ } else {
+ severity = Alarm_info;
+ }
+ return severity;
+}
+
+
+int AlarmTask::generateNextId()
+{
+ alarm_fenter("AlarmTask::generateNextId");
+ static unsigned long id = 0;
+
+ if(id == 0)
+ {
+ getLastId( &id);
+ alarm_debug(("Last Module ID = %d\n", id ));
+ }
+ alarm_fexit();
+ return id++;
+}
+
+
+AlarmCode_t AlarmTask::getMdlStatus(MNET_MODULE_ID mid)
+{
+ if (mid >=0 && mid < MNET_MAX_MODULE_IDS)
+ {
+ if (_ms[mid])
+ return (_ap[mid].code);
+ }
+ return EC_COMMON_NOERROR;
+}
+
+AlarmEntry_t *AlarmTask::allocEntry(MNET_MODULE_ID mid)
+{
+ int i = 0;
+
+ while ( _ap[i].code != EC_COMMON_NOERROR)
+ {
+ if ( i == ALARM_max_outstanding)
+ return NULL;
+ i++;
+ }
+
+
+ _ap[i].next = NULL;
+ if (mid >=0 && mid < MNET_MAX_MODULE_IDS)
+ {
+ if (_ms[mid] == NULL)
+ {
+ _ms[mid] = &_ap[i];
+ }
+ else
+ {
+ AlarmEntry_t * tmpentry = _ms[mid];
+
+ while ( tmpentry->next != NULL)
+ tmpentry = tmpentry->next;
+
+ tmpentry->next = &_ap[i];
+ }
+ return &_ap[i];
+ }
+ return NULL;
+}
+
+EnableDisableState_t AlarmTask::updateOperationalState()
+{
+ int i = 0;
+ EnableDisableState_t state = stateEnabled;
+
+ while ((state == stateEnabled) && (i < MNET_MAX_MODULE_IDS))
+ {
+ AlarmEntry_t * tmpentry = _ms[i];
+ while(tmpentry)
+ {
+ if (tmpentry->severity == Alarm_critical)
+ {
+ state = stateDisabled;
+ break;
+ }
+ tmpentry = tmpentry->next;
+ }
+ i++;
+ }
+ if ( (state == stateEnabled) && (i == MNET_MAX_MODULE_IDS))
+ {
+ // enable operational state
+ setOperationState(stateEnabled);
+
+ // set mib control state enable (in case this is first time)
+ if (_mibAccessState == false)
+ {
+ setMibAcessControlState(stateEnabled);
+ }
+
+ } else {
+ // disable operation state
+ setOperationState(stateDisabled);
+ }
+ return state;
+}
+
+
+void AlarmTask::updateModuleLastError(MNET_MODULE_ID mid, MibTag moduleErrorTag)
+{
+
+ AlarmEntry_t * curnode = _ms[mid];
+ AlarmCode_t errorcode = EC_COMMON_NOERROR;
+ alarm_fenter("AlarmTask::updateModuleLastError");
+
+ while(curnode)
+ {
+ errorcode = curnode->code;
+ curnode = curnode->next;
+ }
+
+ setModuleLastError(moduleErrorTag, errorcode);
+ alarm_fexit();
+}
+
+
+
+bool AlarmTask::addAlarmEntry(MNET_MODULE_ID mid, MibTag moduleErrorTag, AlarmCode_t errorCode, char *arg1, char *arg2)
+{
+ bool status = true;
+ Alarm_severity_t severity;
+ int id;
+ AlarmEntry_t *aentry;
+
+ alarm_fenter("addAlarmEntry");
+
+
+ aentry = findAlarmEntry(mid, errorCode);
+
+ if (aentry != NULL)
+ {
+ alarm_warning(("Alarm (code = 0x%06x) was raised %d times by %s, since UTC %s",
+ errorCode, ++aentry->count, GetMnetModuleName(mid), ctime(&aentry->utc)));
+ return true;
+ }
+
+ severity = getSeverity(errorCode);
+
+ if (severity < Alarm_max_severity)
+ {
+ _statistics[0][severity]++;
+ _statistics[1][severity]++;
+ }
+
+ switch (severity)
+ {
+ case Alarm_critical:
+ /* disable Network Elelemt Operational state if it is not already disabled */
+ setOperationState(stateDisabled);
+ case Alarm_major:
+ case Alarm_minor:
+ case Alarm_info:
+ aentry = allocEntry(mid);
+ id = generateNextId();
+
+ if (aentry )
+ {
+ aentry->count = 1;
+ aentry->code = errorCode;
+ aentry->id = id;
+ aentry->severity = severity;
+ aentry->utc = time(NULL);
+ } else {
+ alarm_error(("Too many alarm entries.\n"));
+ }
+
+ updateModuleLastError(mid, moduleErrorTag);
+ reportNewAlarm(id, mid, errorCode, severity, arg1, arg2);
+ break;
+
+ default:
+ alarm_error(("Illegle Severity code\n"));
+ break;
+ }
+ alarm_fexit();
+ return status;
+}
+
+
+AlarmEntry_t * AlarmTask::findAlarmEntry(MNET_MODULE_ID mid, AlarmCode_t errorCode)
+{
+ AlarmEntry_t * curnode = _ms[mid];
+
+ while (curnode )
+ {
+ if (curnode->code == errorCode)
+ return curnode;
+ curnode= curnode->next;
+ }
+ return NULL;
+}
+
+
+
+bool AlarmTask::delAlarmEntry(MNET_MODULE_ID mid, MibTag moduleErrorTag, AlarmCode_t errorCode)
+{
+ bool status = true;
+ char prevAlarm[20];
+ char prevId[20];
+ AlarmCode_t lastError = (AlarmCode_t) 0;
+ Alarm_severity_t severity;
+ int lastId = 0;
+
+ memset(prevAlarm, 0, 20);
+
+
+ if ((mid >=0) && (mid < MNET_MAX_MODULE_IDS))
+ {
+ AlarmEntry_t * curnode = _ms[mid];
+ AlarmEntry_t * prevnode = curnode;
+
+ if (errorCode == EC_COMMON_NOERROR)
+ {
+ // clear all the error for this module
+ _ms[mid] = NULL;
+ while (curnode )
+ {
+ prevnode = curnode;
+ curnode = curnode->next;
+
+ severity = getSeverity(prevnode->code);
+
+ if (severity < Alarm_max_severity)
+ {
+ _statistics[1][severity]--;
+ }
+ lastError = prevnode->code;
+ lastId = prevnode->id;
+ prevnode->code = EC_COMMON_NOERROR;
+ prevnode->next = NULL;
+ }
+ } else {
+
+ while (curnode && (curnode->code != errorCode))
+ {
+ prevnode = curnode;
+ curnode = curnode->next;
+ }
+
+ if (curnode)
+ {
+ if (curnode == prevnode)
+ {
+ // the first node
+ _ms[mid] = curnode->next;
+ } else {
+ prevnode->next = curnode->next;
+ }
+
+ severity = getSeverity(curnode->code);
+
+ if (severity < Alarm_max_severity)
+ {
+ _statistics[1][severity]--;
+ }
+ lastError = prevnode->code;
+ lastId = prevnode->id;
+ curnode->code = EC_COMMON_NOERROR;
+ curnode->next = NULL;
+ }
+ }
+ int id = generateNextId();
+ sprintf(prevAlarm,"%d", lastError);
+ sprintf(prevId, "%d", lastId);
+ reportNewAlarm(id, mid, EC_COMMON_NOERROR, Alarm_info, prevAlarm, prevId);
+ updateOperationalState();
+ updateModuleLastError(mid, moduleErrorTag);
+ } else {
+ status = false;
+ }
+ return status;
+}
+
+
+void AlarmTask::reportNewAlarm(int id, MNET_MODULE_ID mid, AlarmCode_t ecode, Alarm_severity_t severity,
+ char * arg1, char * arg2)
+{
+ extern bool alarm_sendAlarmEventToAms(ubyte4, ubyte4, ubyte4, ubyte4, char*, char*);
+
+ char strMsg[ALARM_maxMsgSize];
+ time_t ltime;
+ int posCount = 0;
+ alarm_fenter("AlarmTask::reportNewAlarm");
+
+
+ alarm_debug(("Formating alarm message to the GUI\n"));
+ memset((void *) strMsg,0,ALARM_maxMsgSize);
+ posCount += sprintf(strMsg + posCount, "%d|", id);
+
+ /* Get current local time */
+ time( &ltime );
+
+ posCount += sprintf(strMsg + posCount, "%ld|", ltime);
+ posCount += sprintf(strMsg + posCount, "%d|", severity);
+ posCount += sprintf(strMsg + posCount, "%d|", mid);
+ posCount += sprintf(strMsg + posCount, "%s|", GetMnetModuleName(mid));
+ posCount += sprintf(strMsg + posCount, "%d", ecode);
+
+ if (arg1 != NULL)
+ posCount += sprintf(strMsg + posCount, "|%s", arg1);
+ if(arg2 != NULL)
+ posCount += sprintf(strMsg + posCount, "|%s", arg2);
+
+ for (int i = posCount; i < ALARM_record_length-1; i++)
+ strMsg[i] = ' ';
+
+ strMsg[ALARM_record_length-1] = '\n';
+ strMsg[ALARM_record_length] = '\0';
+
+
+ // Broadcast message to all the Java Client Applets
+ alarm_broadcast(strMsg);
+
+ // we write to flash for all events
+ saveAlarm(strMsg);
+
+ // Send message to First AMS server
+ alarm_sendAlarmEventToAms(id, ecode, ltime, mid, arg1, arg2);
+
+ if (ecode == 0)
+ {
+ alarm_warning(("Alarm (Id = %d) in module \"%s\" has been cleared\n", id, GetMnetModuleName( mid)));
+ } else {
+ alarm_warning(("The module \"%s\" has raised an alarm (Id= %d, Code = %d)\n", GetMnetModuleName(mid), id, ecode));
+ }
+ alarm_fexit();
+
+}
+
+extern "C" void AlarmPrintStatus()
+{
+
+ AlarmTask::theAlarmTask->printStatus();
+
+}
+
+void AlarmTask::printStatus()
+{
+ int i;
+ AlarmEntry_t * tmpentry;
+
+ printf("\nNetwork Element Operational State: %d\n", getOperationState());
+ printf("Mib Access Status: %d\n", _mibAccessState);
+
+ printf("\nAlarm Statistics:\n");
+ printf("Total Alarms in this session:\n");
+ printf("\tCritical: %d\n", _statistics[0][Alarm_critical]);
+ printf("\tMajor: %d\n", _statistics[0][Alarm_major]);
+ printf("\tMinor: %d\n", _statistics[0][Alarm_minor]);
+ printf("\tInformational: %d\n", _statistics[0][Alarm_info]);
+
+ printf("Total Outstanding Alarms:\n");
+ printf("\tCritical: %d\n", _statistics[1][Alarm_critical]);
+ printf("\tMajor: %d\n", _statistics[1][Alarm_major]);
+ printf("\tMinor: %d\n", _statistics[1][Alarm_minor]);
+
+ if (_statistics[1][Alarm_critical]
+ + _statistics[1][Alarm_major]
+ + _statistics[1][Alarm_minor])
+ {
+ printf("%20s%20s\n", "MODULE NAME", "Outstanding Alarms");
+ printf("%20s%20s\n", "===========", "===================");
+ for(i=0; i< MNET_MAX_MODULE_IDS; i++)
+ {
+ if (_ms[i])
+ {
+ tmpentry = _ms[i];
+ printf("%20s ", GetMnetModuleName((MNET_MODULE_ID)i));
+ while(tmpentry)
+ {
+ printf(" %06x", tmpentry->code);
+ tmpentry = tmpentry->next;
+ }
+ printf("\n");
+ }
+ }
+ }
+}
+
+void AlarmTask::getOutstandingAlarmCount(ubyte1 &critical, ubyte1 &major, ubyte1 &minor)
+{
+ critical = _statistics[1][Alarm_critical];
+ major= _statistics[1][Alarm_major];
+ minor= _statistics[1][Alarm_minor];
+}
+
+#endif /* _ALARM_MODULE_CPP_ */
diff --git a/data/mnet/Common/Alarm/src/alarm_socket.cpp b/data/mnet/Common/Alarm/src/alarm_socket.cpp
new file mode 100644
index 0000000..12706c6
--- /dev/null
+++ b/data/mnet/Common/Alarm/src/alarm_socket.cpp
@@ -0,0 +1,445 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : AlarmTask.h */
+/* Author(s) : Bhawani Sapkota */
+/* Create Date : 9/18/2000 */
+/* Description : This file contains alarm task socket handling */
+/* routines */
+/* */
+/*********************************************************************/
+/* REVISION HISTORY
+/*___________________________________________________________________*/
+/*----------+--------+-----------------------------------------------*/
+/* Name | Date | Reason */
+/*----------+--------+-----------------------------------------------*/
+/* Bhawani |07/14/00| Initial Draft */
+/* Bhawani |11/20/00| resturctured to share among GP, GMS and GS */
+/* Bhawani |03/10/01| Added alarm_raiseForGp10 Api */
+/*----------+--------+-----------------------------------------------*/
+/*********************************************************************/
+
+
+#ifndef _ALARM_SOCKET_CPP_
+#define _ALARM_SOCKET_CPP_
+
+#include "AlarmTask.h"
+
+#include "alarm_interface.h"
+#include <time.h>
+#include <selectLib.h>
+
+typedef int OS_SPECIFIC_SOCKET_HANDLE;
+
+/*-----------------------------------------------------------------------*/
+
+static OS_SPECIFIC_SOCKET_HANDLE SOCKET_UdpCreate()
+{
+ alarm_fenter("SOCKET_UdpCreate");
+
+ OS_SPECIFIC_SOCKET_HANDLE soc = socket(AF_INET, SOCK_DGRAM, 0);
+
+ if (ERROR == soc)
+ {
+ alarm_error(("Could not open datagram socket %s\n", strerror(errno)));
+ }
+
+ alarm_fexit();
+ return soc;
+}
+
+
+/*-----------------------------------------------------------------------*/
+
+static bool SOCKET_UdpBind(OS_SPECIFIC_SOCKET_HANDLE soc, ubyte2 port)
+{
+ struct sockaddr_in LocalAddr;
+ bool status = true;
+ alarm_fenter("SOCKET_UdpBind");
+
+
+
+ /* ask the system to allocate a port and bind to INADDR_ANY */
+ memset(&LocalAddr, 0x00, sizeof(LocalAddr));
+
+ /* get system to allocate a port number by binding a host address */
+ LocalAddr.sin_family = AF_INET;
+ LocalAddr.sin_addr.s_addr = htonl(INADDR_ANY);
+ LocalAddr.sin_port = htons(port);
+
+ /* bind socket to local address */
+ if (ERROR == bind(soc, (struct sockaddr *) &LocalAddr, sizeof(LocalAddr)))
+ {
+ alarm_error(("Could not bind datagram socket to port %d: %s\n", port, strerror(errno)));
+ status = false;
+
+ }
+
+ alarm_fexit();
+ return status;
+}
+
+/*-----------------------------------------------------------------------*/
+
+static bool SOCKET_SetRecvBuffer(OS_SPECIFIC_SOCKET_HANDLE soc, int nBytes)
+{
+ alarm_fenter("SOCKET_SetRecvBuffer");
+ bool status = true;
+
+ if (ERROR == setsockopt(soc, SOL_SOCKET, SO_RCVBUF, (char *) &nBytes, sizeof(int)))
+ {
+
+ alarm_error(("Could not set Receive buffer to %d\n", nBytes));
+ status = false;
+ }
+ alarm_fexit();
+ return status;
+}
+
+
+/*-----------------------------------------------------------------------*/
+
+void SOCKET_UdpClearRecvQ(OS_SPECIFIC_SOCKET_HANDLE sock)
+{
+ struct timeval timeout;
+ fd_set readFdSet;
+ static char buffer[512];
+ int bufferlen = 512;
+ struct sockaddr_in Addr;
+ int iAddrLen;
+
+
+ alarm_fenter("SOCKET_UdpClearInQueue");
+
+
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 0;
+
+ FD_ZERO(&readFdSet);
+ FD_SET(sock, &readFdSet);
+
+
+ if(select(FD_SETSIZE, &readFdSet, NULL, NULL, &timeout) > 0)
+ {
+ /* Socket is ready for reading */
+
+ bufferlen = recvfrom(sock, buffer, bufferlen, 0, (struct sockaddr *)&Addr, &iAddrLen);
+ if (bufferlen > 0)
+ {
+ alarm_warning (("Cleared %d bytes of unexpected data from %s:%u\n",
+ bufferlen, inet_ntoa(Addr.sin_addr), Addr.sin_port));
+ }
+ }
+ alarm_fexit();
+}
+
+/*-----------------------------------------------------------------------*/
+
+extern bool
+SOCKET_UdpSendTo(OS_SPECIFIC_SOCKET_HANDLE sock,
+ struct sockaddr_in *pAddrTo,
+ char *message,
+ ubyte4 msglen)
+{
+ alarm_fenter("SOCKET_UdpSendTo");
+ bool status = true;
+ char pszIPbuf[20];
+
+
+ if (ERROR == sendto(sock, message, msglen, 0,
+ (struct sockaddr *) pAddrTo,
+ sizeof(struct sockaddr)) )
+ {
+ status = false;
+ }
+ inet_ntoa_b(pAddrTo->sin_addr, pszIPbuf);
+ alarm_debug(( "Sending %d bytes to Alarm server (ip=%s, port=%d) \n", msglen, pszIPbuf, ntohs(pAddrTo->sin_port)));
+ alarm_dump((ubyte1 *) message, msglen);
+
+ // clear any message in the incoming queue
+ SOCKET_UdpClearRecvQ(sock);
+
+ alarm_fexit();
+ return status;
+}
+
+/*-----------------------------------------------------------------------*/
+
+extern bool
+SOCKET_UdpReceive(OS_SPECIFIC_SOCKET_HANDLE sock,
+ char *msg,
+ ubyte4 *msgSize,
+ ubyte4 *peerAddr)
+{
+ struct sockaddr_in pAddr;
+ int iAddrLen;
+ int retval = recvfrom(sock, msg, *msgSize, 0, (struct sockaddr *)&pAddr, &iAddrLen );
+
+ if (retval == ERROR)
+ {
+ *msgSize = 0;
+ return false;
+ }
+
+ *msgSize = retval;
+ *peerAddr = pAddr.sin_addr.s_addr;
+ return true;
+}
+
+
+/*-----------------------------------------------------------------------*/
+
+extern bool SOCKET_Close(OS_SPECIFIC_SOCKET_HANDLE sock)
+{
+ bool retval = true;
+ alarm_fenter("SOCKET_Close");
+
+ if (ERROR == close(sock) )
+ {
+ alarm_error(("Could not close socket %s\n", strerror(errno)));
+ retval = false;
+ }
+
+ alarm_fexit();
+ return retval;
+}
+
+/*-----------------------------------------------------------------------*/
+
+ubyte4 GetHostAddress(char *pszHostName)
+{
+
+ return hostGetByName ( pszHostName );
+
+}
+
+/*-----------------------------------------------------------------------*/
+
+static ubyte4 GetLocalHostAddress()
+{
+#define MAX_PATH 80
+ char szHostName[MAX_PATH];
+ ubyte4 ulHostAddr = 0;
+
+ if (ERROR != gethostname(szHostName, MAX_PATH-1))
+ ulHostAddr = GetHostAddress ( szHostName );
+
+ return (ulHostAddr);
+}
+
+/*-----------------------------------------------------------------------*/
+
+static bool initialized = false;
+/*
+static AlarmViperCellToAmsMsg amsMsg;
+*/
+static struct sockaddr_in addrTo;
+static OS_SPECIFIC_SOCKET_HANDLE sock;
+
+bool
+initSocketAndMsgHdr()
+{
+ char pszIpBuf[20];
+ alarm_fenter("initSocketAndMsgHdr");
+
+ if (!initialized)
+ {
+ int ip;
+ /* 1. prepare udp socket */
+ sock = SOCKET_UdpCreate();
+
+ if (sock == ERROR)
+ {
+ alarm_fexit();
+ return false;
+ }
+
+ if (SOCKET_UdpBind(sock, ALARM_interfaceUdpPortClient) != true)
+ {
+ SOCKET_Close(sock);
+ alarm_fexit();
+ return false;
+
+ }
+
+ /* 2. get IP address from MIB */
+
+ if (oam_getMibIntVar(MY_MIB_APM1_IP_ADDRESS, (long *) &ip) != STATUS_OK)
+ {
+ // alarm_error(("Unable to get alarm server's IP from the MIB\n"));
+ SOCKET_Close(sock);
+ return false;
+ }
+
+ /* 3. prepare the the server's address */
+ memset (&addrTo, 0, sizeof(sockaddr_in));
+
+ addrTo.sin_family = AF_INET;
+ addrTo.sin_addr.s_addr = ip;
+ addrTo.sin_port = htons((ubyte2)ALARM_interfaceUdpPortServer);
+
+ inet_ntoa_b( addrTo.sin_addr, pszIpBuf);
+
+ /* Set small receive buffer */
+ SOCKET_SetRecvBuffer(sock, ALARM_defaultRecvBuffer);
+
+ alarm_debug (("APM1 server: ip = %s, port=%d\n", pszIpBuf, ALARM_interfaceUdpPortServer));
+ initialized = true;
+ }
+ alarm_fexit();
+ return true;
+}
+
+/*-----------------------------------------------------------------------*/
+
+bool
+alarm_sendAlarmEventToAms(ubyte4 id, ubyte4 code, ubyte4 timestamp, ubyte4 moduleId, char* opt1, char* opt2)
+{
+ AlarmViperCellToAmsMsg amsMsg;
+ ubyte4 opt;
+
+ alarm_fenter("alarm_sendAlarmMsgToAms");
+
+ if (!initSocketAndMsgHdr())
+ {
+ alarm_fexit();
+ return false;
+ }
+
+ memset(&amsMsg, 0, sizeof(AlarmViperCellToAmsMsg));
+
+ amsMsg.hdr.alarmSrcType = (ubyte1) MY_PRODUCT_ID;
+ amsMsg.hdr.alarmMsgType = ALARM_msgTypAlarmEvent;
+ amsMsg.hdr.alarmMsgLen = htons(sizeof(AlarmEventData));
+
+ strncpy(amsMsg.body.eventData.alarmSrcModuleName, GetMnetModuleName((MNET_MODULE_ID)moduleId),
+ ALARM_viperCellNameMaxSize);
+ amsMsg.body.eventData.alarmSrcIp = GetLocalHostAddress();
+
+ amsMsg.body.eventData.alarmId = htonl(id);
+ amsMsg.body.eventData.alarmCode = htonl(code);
+ amsMsg.body.eventData.alarmTimestamp = htonl(timestamp);
+ amsMsg.body.eventData.alarmSrcModuleId = htonl(moduleId);
+ if (NULL != opt1)
+ {
+ opt = atoi(opt1);
+ amsMsg.body.eventData.opt1 = htonl(opt);
+ }
+
+ if (NULL != opt1)
+ {
+ opt = atoi(opt2);
+ amsMsg.body.eventData.opt2 = htonl(opt);
+ }
+ SOCKET_UdpSendTo(sock, &addrTo, (char *) &amsMsg, ALARM_eventMsgLen);
+
+ alarm_fexit();
+ return true;
+
+}
+
+/*-----------------------------------------------------------------------*/
+#ifdef MNET_PRODUCT_SPECIFIC_GMC
+
+JC_STATUS alarm_raiseForGp10
+(
+ MNET_MODULE_ID mid, /* Gp10 source module ID */
+ AlarmCode_t alarm_code, /* Gp10 Alarm code */
+ unsigned long ip, /* GP10 IP address */
+ char *sourceName /* GP10's official name */
+ )
+{
+ AlarmViperCellToAmsMsg amsMsg;
+ const int MODULE_VBLINK = 0x11; /* ViperBase - ViperCell link client */
+ static char gp10SrcName[] = "VBLink"; /* GP10's Module name */
+
+ alarm_fenter("alarm_raiseForGp10");
+
+ if (!initSocketAndMsgHdr())
+ {
+ alarm_fexit();
+ return JC_ERROR;
+ }
+
+
+ memset(&amsMsg, 0, sizeof(AlarmViperCellToAmsMsg));
+
+ amsMsg.hdr.alarmSrcType = (ubyte1) MNET_PRODUCT_GP10;
+ amsMsg.hdr.alarmMsgType = ALARM_msgTypAlarmEvent;
+ amsMsg.hdr.alarmMsgLen = htons(sizeof(AlarmEventData));
+
+ strncpy(amsMsg.body.eventData.alarmSrcModuleName, gp10SrcName, ALARM_viperCellNameMaxSize);
+ amsMsg.body.eventData.alarmSrcIp = ip;
+
+ amsMsg.body.eventData.alarmId = htonl(ALARM_unknownAlarmId);
+ amsMsg.body.eventData.alarmCode = htonl(alarm_code);
+ amsMsg.body.eventData.alarmTimestamp = htonl(time(NULL));
+ amsMsg.body.eventData.alarmSrcModuleId = htonl(mid);
+ SOCKET_UdpSendTo(sock, &addrTo, (char *) &amsMsg, ALARM_eventMsgLen);
+
+ alarm_fexit();
+ return true;
+
+}
+
+#endif
+
+/*-----------------------------------------------------------------------*/
+
+bool AlarmTask::sendSummaryUpdateToAms()
+{
+ AlarmViperCellToAmsMsg amsMsg;
+
+ alarm_fenter("AlarmTask::sendSummaryUpdateToAms");
+ ubyte1 critical, major, minor;
+
+ if (!initSocketAndMsgHdr())
+ {
+ alarm_fexit();
+ return false;
+ }
+
+ /* 4. initialize the fixed fields */
+ memset(&amsMsg, 0, sizeof(AlarmViperCellToAmsMsg));
+
+ // populate the header
+ amsMsg.hdr.alarmSrcType = ALARM_srcTypViperCell;
+ amsMsg.hdr.alarmMsgType = ALARM_msgTypSummaryUpdate;
+ amsMsg.hdr.alarmMsgLen = htons(sizeof(AlarmSummaryUpdateData));
+
+ strncpy(amsMsg.body.summaryUpdateData.alarmSrcName, AlarmTask::srcName(),
+ ALARM_viperCellNameMaxSize);
+ amsMsg.body.summaryUpdateData.alarmSrcIp = GetLocalHostAddress();
+
+ getOutstandingAlarmCount(critical, major, minor);
+ amsMsg.body.summaryUpdateData.alarmCriticalCount = critical;
+ amsMsg.body.summaryUpdateData.alarmMajorCount = major;
+ amsMsg.body.summaryUpdateData.alarmMinorCount = minor;
+ SOCKET_UdpSendTo(sock, &addrTo, (char *) &amsMsg, ALARM_summaryUpdateMsgLen);
+
+ alarm_fexit();
+ return true;
+}
+
+
+void AlarmTask::quit ()
+{
+ _quit = true;
+}
+
+void AlarmTask::closeSocket ()
+{
+ initialized = false;
+ SOCKET_Close(sock);
+}
+
+
+#endif /* _ALARM_SOCKET_CPP_ */
diff --git a/data/mnet/Common/Alarm/src/alarm_sysCmd.cpp b/data/mnet/Common/Alarm/src/alarm_sysCmd.cpp
new file mode 100644
index 0000000..ba2ce56
--- /dev/null
+++ b/data/mnet/Common/Alarm/src/alarm_sysCmd.cpp
@@ -0,0 +1,173 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : AlarmTask.h */
+/* Author(s) : Bhawani Sapkota */
+/* Create Date : 9/18/2000 */
+/* Description : This file contains alarm task syscommand handling */
+/* routines */
+/* */
+/*********************************************************************/
+/* REVISION HISTORY
+/*___________________________________________________________________*/
+/*----------+--------+-----------------------------------------------*/
+/* Name | Date | Reason */
+/*----------+--------+-----------------------------------------------*/
+/* Bhawani |07/14/00| Initial Draft */
+/* Bhawani |11/20/00| resturctured to share among GP, GMS and GS */
+/* Bhawani |03/09/01| Changed alarm log directory to match others */
+/*----------+--------+-----------------------------------------------*/
+/*********************************************************************/
+
+
+#ifndef __ALARM_SYSCMD_CPP__
+#define __ALARM_SYSCMD_CPP__
+
+#include "AlarmTask.h"
+
+/*
+*********************************************************************
+** Global variables
+********************************************************************
+*/
+
+/* Initialize the alarm task */
+
+AlarmTask::AlarmTask(char *name): JCTask(name)
+{
+ alarm_fenter("AlarmTask::AlarmTask");
+ if (isOneCreated == false)
+ {
+ int size, i,j;
+
+ // Initialize the message queue first
+ jcMsgQ = new JCMsgQueue(ALARM_q_maxMsgs, ALARM_q_maxMsgLength, MSG_Q_FIFO);
+
+#ifdef MNET_PRODUCT_SPECIFIC_GP10
+ // Initialize the timer
+ initTimer = new JCCTimer( (FUNCPTR ) &AlarmTask::bootupTimeoutHandler);
+ initTimer->setTimer(ALARM_mib_lock_timeout);
+#else
+ _mibAccessState = stateEnabled;
+#endif
+
+ // message receive buffer
+ _msgRecvBuff = new char[ALARM_q_maxMsgLength];
+
+ _mnetbase = getenv( "MNET_BASE" );
+
+ // compute the log file size
+ size = strlen(_mnetbase) + strlen(ALARM_logFile) + 1;
+ _logfilename = new char[size];
+ sprintf(_logfilename, "%s%s", _mnetbase, ALARM_logFile);
+
+ // initialize the module status table
+ for (i = 0; i < MNET_MAX_MODULE_IDS; i++)
+ _ms[i] = NULL;
+
+
+ // initialize the alarm pool
+ _ap = new AlarmEntry_t[ALARM_max_outstanding];
+ for (i =0; i <ALARM_max_outstanding; i++)
+ {
+ _ap[i].code = EC_COMMON_NOERROR;
+ _ap[i].next = NULL;
+ }
+
+ for (i=0; i <2; i++)
+ for (j=0; j< Alarm_max_severity; j++)
+ _statistics[i][j] = 0;
+
+ theAlarmTask = this;
+ populateSourceName();
+ isOneCreated = true;
+ }
+ alarm_fexit();
+}
+
+int AlarmTask::bootupTimeoutHandler()
+{
+ alarm_fenter("alarm_bootupTimeoutHandler");
+
+ /* The timer has expired and mib access needs to be enabled. */
+ theAlarmTask->setMibAcessControlState(stateEnabled);
+ alarm_warning(("The system did not complete reboot. Mib access has been re-enabled\n"));
+ alarm_fexit();
+ return 0;
+}
+
+
+int SysCommand_Alarm (T_SYS_CMD action)
+{
+ char *home;
+ JC_STATUS status = OK;
+
+ alarm_fenter("SysCommand_Alarm");
+ switch(action)
+ {
+ case SYS_SHUTDOWN:
+ break;
+
+ case SYS_REBOOT:
+ alarm_warning(("Reboot notification has been received\n"));
+ AlarmTask::theAlarmTask->alarmSend(InterModuleAlarmMsgTypeReboot, MY_MODULE_ID);
+ break;
+
+ case SYS_START:
+ alarm_debug(("Alarm initialization has been invoked\n"));
+
+ /* Get the value of the MNET_BASE environment variable. */
+ home = getenv( "MNET_BASE" );
+
+ if( home == NULL )
+ {
+ alarm_error(("Environment variable \"MNET_BASE\" must be defined!!\n"));
+ alarm_fexit();
+ return ERROR;
+ }
+ {
+ AlarmTask *mytask = new AlarmTask(ALARM_task_name);
+
+#ifdef MNET_PRODUCT_SPECIFIC_GP10
+ /* block the mib access */
+ mytask->setMibAcessControlState(stateDisabled);
+#endif
+
+ status = mytask->JCTaskSpawn(
+ ALARM_TASK_PRIORITY,
+ ALARM_TASK_OPTION,
+ ALARM_TASK_STACK_SIZE,
+ (FUNCPTR) AlarmTask::entryPoint,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ MY_MODULE_ID, JC_CRITICAL_TASK);
+
+ if(status == JC_ERROR)
+ {
+ alarm_error(("Alarm task spawn failure\n"));
+ status = ERROR;
+ }
+
+ }
+ break;
+
+ default:
+ alarm_warning(("Unknown SysCommand: %d\n", action));
+ status = ERROR;
+ break;
+ }
+ alarm_fexit();
+ return status;
+
+}
+
+#endif /* __ALARM_SYSCMD_CPP__ */
+
+
diff --git a/data/mnet/Common/Java/AlarmApplet/Alarm.java b/data/mnet/Common/Java/AlarmApplet/Alarm.java
new file mode 100644
index 0000000..cdf4b61
--- /dev/null
+++ b/data/mnet/Common/Java/AlarmApplet/Alarm.java
@@ -0,0 +1,102 @@
+
+
+import java.awt.*;
+import java.awt.event.*;
+import java.lang.String;
+import javax.swing.*;
+import javax.swing.event.*;
+import java.net.UnknownHostException;
+import com.jetcell.MibWM.*;
+import java.net.*;
+
+
+public class Alarm{
+ public AlarmPanel alarmPanel = null;
+ JFrame f = null;
+ AlarmTCPThread commObj = null;
+ FilterFrame filterFrame = null;
+ public final static int AM_APPLET_PORT2 = 11798;
+ JPanel jpanel = null;
+
+ // Shrinivas 23rd Apr 01
+ public Alarm(String viperbaseIp, final String vipercellIp){
+ // Shrinivas end
+ JButton setFilterButton = new JButton("Set Filter");
+ final Dimension d = new JFrame().getToolkit().getScreenSize();
+ if (f == null){
+ alarmPanel = new AlarmPanel(viperbaseIp);
+ jpanel = alarmPanel.createPanel();
+ alarmPanel.setViperCellIp(vipercellIp);//passing on viperCellIp to panel
+ JPanel southPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
+ southPanel.add(setFilterButton);
+
+ f = new JFrame("Alarm List for source: "+vipercellIp);
+ // Shrinivas 23rd Apr 01
+ f.addWindowListener(new WindowAdapter(){
+ public void windowClosing(WindowEvent evt){
+ AlarmStatusTable.removeAlarmSrcIp(vipercellIp);
+ destroy();
+ }
+ });
+ // Shrinivas end
+ if(Util.applet == null){
+ f.setIconImage(Toolkit.getDefaultToolkit().getImage("../Images/app_icon.gif"));
+ }
+ else{
+ String iconPath = Util.applet.getCodeBase().toString();
+ iconPath += "Images/app_icon.gif";
+ URL iconPathURL = null;
+ try{
+ iconPathURL = new URL(iconPath);
+ }
+ catch(MalformedURLException exc){
+ System.out.println("Bad URL.");
+ }
+ System.out.println(iconPathURL);
+ f.setIconImage(Toolkit.getDefaultToolkit().getImage(iconPathURL));
+ }
+
+ f.getContentPane().setLayout(new BorderLayout());
+ f.getContentPane().add(southPanel,BorderLayout.SOUTH);
+ f.getContentPane().add(jpanel,BorderLayout.CENTER);
+ f.setBounds(0,0, 720,400);
+ f.setLocation(d.width/5,d.height/5);
+ f.setVisible(true);
+ }
+ else
+ f.setVisible(true);
+
+ if (commObj == null)
+ commObj = new AlarmTCPThread(viperbaseIp, AM_APPLET_PORT2);
+ commObj.startReadThread(alarmPanel, vipercellIp, true);
+
+ setFilterButton.addActionListener(new ActionListener(){
+ public void actionPerformed(ActionEvent evt){
+ AlarmStatusApplet.logDM("Launch filter screen");
+ filterFrame = new FilterFrame(alarmPanel);
+ filterFrame.setLocation(d.width/4,d.width/5);
+ if(Util.applet == null){
+ filterFrame.setTitle("Filter for user : " + AlarmTCPThread.user.toUpperCase());
+ }
+ else{
+ filterFrame.setTitle("Filter Screen");
+ }
+ filterFrame.setResizable(false);
+ filterFrame.setVisible(true);
+ }
+ });
+
+ }
+
+ public void start(String vipercellIp){
+ f.setTitle("Alarm List for source: "+vipercellIp);
+ f.setVisible(true);
+ alarmPanel.setViperCellIp(vipercellIp);//passing on viperCellIp to panel
+ commObj.startReadThread(alarmPanel, vipercellIp, false);
+ }
+
+ public void destroy(){
+ System.out.println("Destroy method has been called");
+ commObj.finishReadThread();
+ }
+}
diff --git a/data/mnet/Common/Java/AlarmApplet/AlarmStatusApplet.java b/data/mnet/Common/Java/AlarmApplet/AlarmStatusApplet.java
new file mode 100644
index 0000000..cd3af38
--- /dev/null
+++ b/data/mnet/Common/Java/AlarmApplet/AlarmStatusApplet.java
@@ -0,0 +1,139 @@
+/*
+ * AlarmStatusApplet.java
+ * Kevin Lim
+ * 03/20/00
+ */
+
+import com.jetcell.MibWM.*;
+import java.applet.Applet;
+import java.awt.*;
+import java.awt.event.*;
+import java.util.Calendar;
+import java.lang.String;
+import javax.swing.*;
+import javax.swing.text.Document;
+import javax.swing.event.*;import java.net.*;
+import java.net.UnknownHostException;
+
+public class AlarmStatusApplet extends JApplet{
+
+ public static String ip = null;
+ public static int port = 11798; /*11800;*/
+ AlarmStatusPanel alarmPanel = null;
+ JFrame f = null;
+ static AlarmTCPThread commObj = null;
+
+ public static boolean isDebug = false;
+
+ public void init(){
+ Util.applet = this;
+ String newin = getParameter("NEWWINDOW");
+ ip = getParameter("HOST");
+ port = Integer.parseInt(getParameter("PORT"));
+
+ createUIPanel(newin);
+ }
+ // changes by Shrinivas : the code under this method were under the above init() method
+ // earlier. Function split was done so that the code could run both as an applet and an application
+ protected void createUIPanel(String newin){
+ alarmPanel = new AlarmStatusPanel();
+ if (f != null){
+ f.setVisible(true);
+ }
+ else {
+ if (newin != null){
+ System.out.println("NEWWINDOW VALUE = " +newin);
+ if(newin.equals("FALSE") || newin.equals("false")){
+ getContentPane().setLayout(new BorderLayout());
+ getContentPane().add(alarmPanel.createPanel(this),BorderLayout.CENTER);
+ }
+ else {
+ f = new JFrame("Alarm Status List for " + ip);
+ f.setIconImage(Toolkit.getDefaultToolkit().getImage("../Images/app_icon.gif"));
+ f.getContentPane().setLayout(new BorderLayout());
+ f.getContentPane().add(alarmPanel.createPanel(this));
+ f.setBounds(0,0, 720,400);
+ f.setVisible(true);
+ }
+ }
+ else {
+ System.out.println("Please set NEWWINDOW parameter to TRUE or FALSE");
+ System.out.println("Assuming - no new window");
+ getContentPane().setLayout(new BorderLayout());
+ getContentPane().add(alarmPanel.createPanel(this),BorderLayout.CENTER);
+ }
+ }
+
+ commObj = new AlarmTCPThread(ip, port);
+ commObj.startReadThread(alarmPanel);
+ }
+
+ public void start(){
+ System.out.println("Applet started");
+ }
+
+ public void stop(){
+ System.out.println("Applet stopped");
+ if (commObj != null){
+ commObj.finishReadThread();
+ commObj = null;
+ }
+ }
+
+ public void destroy(){
+ System.out.println("Destroy method has been called");
+ }
+
+ public void sendRemoveReq(AlarmStatusData data){
+ commObj.sendRemoveReq(data);
+ }
+
+ public void sendUpdateReq(){
+ commObj.sendUpdateReq();
+ }
+
+ public static void logDM(String message){
+ if(isDebug){
+ System.out.println(message);
+ }
+ }
+
+ public static void stopAPM1(){
+ if(commObj != null)
+ commObj.finishReadThread();
+ }
+
+ public static void startAPM1(String ipStr,boolean debug,String user){
+
+ isDebug = debug;
+ final JFrame frame = new JFrame();
+
+ try {
+ InetAddress.getByName(ipStr);
+ }
+ catch (UnknownHostException ex) {
+ JOptionPane.showMessageDialog(frame,"Invalid Host ID:","Error",JOptionPane.ERROR_MESSAGE);
+ return;
+ }
+ ip = ipStr;
+ final JApplet applet = new AlarmStatusApplet();
+ ((AlarmStatusApplet)applet).createUIPanel("false");
+ AlarmTCPThread.user = user;
+ frame.setContentPane(applet.getContentPane());
+ frame.setBounds(0,0, 720,400);
+ frame.setTitle("Alarm Status List for " + ip);
+ frame.setIconImage(Toolkit.getDefaultToolkit().getImage("../Images/app_icon.gif"));
+ Dimension d = new JFrame().getToolkit().getScreenSize();
+ frame.setLocation(d.width/10,d.height/10);
+ frame.setVisible(true);
+ frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
+
+ frame.addWindowListener(new WindowAdapter() {
+ public void windowClosed(WindowEvent e){
+ applet.stop();
+ }
+ });
+
+ }
+}
+
diff --git a/data/mnet/Common/Java/AlarmApplet/AlarmStatusData.java b/data/mnet/Common/Java/AlarmApplet/AlarmStatusData.java
new file mode 100644
index 0000000..f989f88
--- /dev/null
+++ b/data/mnet/Common/Java/AlarmApplet/AlarmStatusData.java
@@ -0,0 +1,139 @@
+/*
+ * AlarmStatusData.java
+ * Kevin Lim
+ * 03/20/00
+ */
+
+import java.util.StringTokenizer;
+
+public class AlarmStatusData
+{
+ final static byte ALARM_SRC_TYPE_VC = (byte)128;
+ final static byte ALARM_SRC_TYPE_VB = (byte)129;
+
+ String source_type;
+ String source_ip;
+ String source_name;
+ String critical;
+ String major;
+ String minor;
+
+ public AlarmStatusData( String source_type, String source_ip, String source_name,
+ String critical, String major, String minor)
+ {
+ this.source_type = source_type;
+ this.source_ip = source_ip;
+ this.source_name = source_name;
+ this.critical = critical;
+ this.major = major;
+ this.minor = minor;
+ }
+
+ public AlarmStatusData(byte[] msg){
+ int i = AlarmTCPThread.ALARM_HEAD_SRC_TYPE_POS;
+ extractSrcType (msg, i);
+ i = AlarmTCPThread.ALARM_MSG_HEADER_LEN;
+ extractSrcIP (msg, i);
+ i += AlarmTCPThread.ALARM_MSG_SRC_IP_SIZE;
+ extractSrcName (msg, i);
+ i += AlarmTCPThread.ALARM_MSG_SRC_NAME_SIZE;
+ extractCriCount(msg, i);
+ i += AlarmTCPThread.ALARM_MSG_CRITICAL_SIZE;
+ extractMajCount(msg, i);
+ i += AlarmTCPThread.ALARM_MSG_MAJOR_SIZE;
+ extractMinCount(msg, i);
+
+ }
+
+ public byte[] getSrcIPByte(){
+ byte[] ip = new byte[AlarmTCPThread.ALARM_MSG_SRC_IP_SIZE];
+
+ StringTokenizer st = new StringTokenizer(source_ip, ".");
+ if(st.countTokens() != 4){
+ System.out.println("Error on getSrcIPByte: ip token count");
+ return null;
+ }
+ else{
+ int i = 0;
+ while (st.hasMoreTokens()) {
+ ip[i++] = (byte) Integer.parseInt(st.nextToken());
+ }
+ }
+ return ip;
+ }
+
+ public byte getSrcTypeByte(){
+ byte type = (byte)0xFF;
+ if(source_type.equals("ViperCell"))
+ type = AlarmStatusData.ALARM_SRC_TYPE_VC;
+ else if(source_type.equals("ViperBase"))
+ type = AlarmStatusData.ALARM_SRC_TYPE_VB;
+ return type;
+ }
+
+ public int extractSrcType(byte[] msg, int i){
+ switch(msg[i]){
+ case AlarmStatusData.ALARM_SRC_TYPE_VC:
+ this.source_type = new String("ViperCell");
+ break;
+ case AlarmStatusData.ALARM_SRC_TYPE_VB:
+ this.source_type = new String("ViperBase");
+ break;
+ default:
+ this.source_type = new String("Unknown");
+ }
+ return (int)msg[i];
+ }
+
+ public void extractSrcIP(byte[] msg, int i) {
+ int h1 = (int)msg[i] & 0x00FF;
+ int h2 = (int)msg[i+1] & 0x00FF;
+ int h3 = (int)msg[i+2] & 0x00FF;
+ int h4 = (int)msg[i+3] & 0x00FF;
+ this.source_ip = "" + (new Integer(h1)).toString() +
+ "." + (new Integer(h2)).toString() +
+ "." + (new Integer(h3)).toString() +
+ "." + (new Integer(h4)).toString();
+ }
+
+ public void extractSrcName(byte[] msg, int i){
+ byte[] name = new byte[AlarmTCPThread.ALARM_MSG_SRC_NAME_SIZE];
+ for(int j=0; j<AlarmTCPThread.ALARM_MSG_SRC_NAME_SIZE; j++)
+ name[j] = msg[i+j];
+ this.source_name = (new String(name)).trim();
+ }
+
+ public void extractCriCount(byte[] msg, int i){
+ this.critical = (new Integer((int)msg[i] & 0x00FF)).toString();
+ }
+
+ public void extractMajCount(byte[] msg, int i){
+ this.major = (new Integer((int)msg[i] & 0x00FF)).toString();
+ }
+
+ public void extractMinCount(byte[] msg, int i){
+ this.minor = (new Integer((int)msg[i] & 0x00FF)).toString();
+ }
+
+ public void dump(){
+ System.out.println("*****************************");
+ System.out.println("Source Type : " + source_type);
+ System.out.println("Source IP : " + source_ip);
+ System.out.println("Source Name : " + source_name);
+ System.out.println("Critical Count: " + critical);
+ System.out.println("Major Count : " + major);
+ System.out.println("Minor Count : " + minor);
+ System.out.println("*****************************");
+ }
+
+ public static void main(String[] argv){
+ byte[] msg = { (byte)128, 1, 0, 48, 10, 1, 2, (byte)250,
+ (byte)'V', (byte)'i', (byte)'p', (byte)'e', (byte)'r', (byte)'1', 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3 };
+ AlarmStatusData data = new AlarmStatusData(msg);
+ data.dump();
+ }
+
+}
+
diff --git a/data/mnet/Common/Java/AlarmApplet/AlarmStatusPanel.java b/data/mnet/Common/Java/AlarmApplet/AlarmStatusPanel.java
new file mode 100644
index 0000000..c4c0efd
--- /dev/null
+++ b/data/mnet/Common/Java/AlarmApplet/AlarmStatusPanel.java
@@ -0,0 +1,53 @@
+/*
+ * AlarmStatusPanel.java
+ * Kevin Lim
+ * 03/20/00
+ */
+
+
+import javax.swing.*;
+import javax.swing.border.*;
+import javax.swing.table.*;
+import java.awt.event.*;
+import javax.swing.text.Document;
+import javax.swing.event.*;
+import java.net.UnknownHostException;
+import java.awt.*;
+import java.util.*;
+
+public class AlarmStatusPanel{
+ static String host = null;
+ AlarmStatusTable alarmStatusTable = null;
+ JLabel statLabel = null;
+
+ public AlarmStatusPanel(){
+ }
+
+ public JPanel createPanel(JApplet applet){
+ JPanel panel = new JPanel();
+ panel.setBorder(new EmptyBorder(5, 5, 5, 5));
+ panel.setLayout(new BorderLayout());
+ AlarmStatusTableModel model = new AlarmStatusTableModel();
+ alarmStatusTable = new AlarmStatusTable(model, applet);
+ JScrollPane scroller= new JScrollPane( alarmStatusTable,
+ JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED ,
+ JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+ panel.add(scroller, BorderLayout.CENTER);
+ statLabel = new JLabel("Server Status");
+ panel.add(statLabel, BorderLayout.SOUTH);
+ return panel;
+ }
+
+ public void addEvent(AlarmStatusData alarm){
+ alarmStatusTable.setAlarmStatusData(alarm);
+ }
+
+ public void dispStatus(String status){
+ statLabel.setText(status);
+ }
+
+ public void clearEvents() {
+ alarmStatusTable.RemoveAll();
+ }
+}
+
diff --git a/data/mnet/Common/Java/AlarmApplet/AlarmStatusTable.java b/data/mnet/Common/Java/AlarmApplet/AlarmStatusTable.java
new file mode 100644
index 0000000..ec23f91
--- /dev/null
+++ b/data/mnet/Common/Java/AlarmApplet/AlarmStatusTable.java
@@ -0,0 +1,221 @@
+/*
+ * AlarmStatusTable
+ * Kevin Lim
+ * 03/20/00
+ */
+
+
+
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.JTable;
+import javax.swing.table.*;
+import javax.swing.event.*;
+import java.util.Hashtable;
+import java.awt.*;
+import java.io.*;
+import java.net.*;
+import java.applet.*;
+import com.jetcell.MibWM.Util;
+// Shrinivas 23rd Apr 01
+import java.util.*;
+// Shrinivas end
+public class AlarmStatusTable extends JTable {
+
+ DefaultTableModel model;
+ JPopupMenu popupMenu = null;
+ JApplet applet = null;
+ // Shrinivas 23rd Apr 01
+ //Alarm alarm = null;
+ static Vector alarmSrcIpList = null;
+ // Shrinivas end
+ final int [] columnMinWidth = { 30, 60, 30, 30, 30, 0};
+ final int [] columnMaxWidth = {200, 150, 150, 150, 150, 0};
+ Hashtable alarmHashTable = null;
+
+ public AlarmStatusTable(DefaultTableModel model, JApplet applet){
+ super(model);
+ // Shrinivas 23rd Apr 01
+ alarmSrcIpList = new Vector(8,3);
+ // Shrinivas end
+ popupMenu = AlarmStatusTablePopupMenu.getPopupMenu();
+ this.applet = applet;
+
+ addMouseListener(new MouseHandler(this));
+ alarmHashTable = new Hashtable();
+ for (int i=0; i < model.getColumnCount(); i++ )
+ setColumnWidth(i, columnMinWidth[i], columnMaxWidth[i]);
+ TableColumnModel colModel = getColumnModel();
+ colModel.getColumn(AlarmStatusTableModel.CRITICAL).setCellRenderer(new CountCellRenderer());
+ colModel.getColumn(AlarmStatusTableModel.MAJOR).setCellRenderer(new CountCellRenderer());
+ colModel.getColumn(AlarmStatusTableModel.MINOR).setCellRenderer(new CountCellRenderer());
+
+ setRowSelectionAllowed(true);
+ setColumnSelectionAllowed(false);
+ setSelectionMode( ListSelectionModel.SINGLE_SELECTION );
+ setShowGrid(true);
+ setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
+ getTableHeader().setReorderingAllowed(false);
+ }
+
+ public void setColumnWidth(int columnIndex, int minWidth, int maxWidth){
+ TableColumn column = (TableColumn)getColumn(getColumnName(columnIndex));
+ column.setMinWidth(minWidth);
+ column.setMaxWidth(maxWidth);
+ }
+
+ public boolean isCellEditable(int i, int j){
+ return false;
+ }
+
+ public AlarmStatusData getAlarmStatusData(String source_ip){
+ if (alarmHashTable != null)
+ return (AlarmStatusData) alarmHashTable.get(source_ip);
+ return null;
+ }
+
+ public int rowAlarmStatusData(String source_ip){
+ int row_count = ((DefaultTableModel)getModel()).getRowCount();
+ for(int i=0; i<row_count; i++){
+ String ip = (String)getValueAt(i, AlarmStatusTableModel.SRC_IP);
+ if(ip.equals(source_ip))
+ return i;
+ }
+ return -1;
+ }
+
+ public void setAlarmStatusData(AlarmStatusData alarm){
+ int row_index;
+ if (getAlarmStatusData(alarm.source_ip) != null){
+ alarmHashTable.remove(alarm.source_ip);
+ alarmHashTable.put(alarm.source_ip, alarm);
+ row_index = rowAlarmStatusData(alarm.source_ip);
+ setValueAt(alarm.source_ip, row_index, AlarmStatusTableModel.SRC_IP);
+ setValueAt(alarm.source_name, row_index, AlarmStatusTableModel.SRC_NAME);
+ setValueAt(alarm.critical, row_index, AlarmStatusTableModel.CRITICAL);
+ setValueAt(alarm.major, row_index, AlarmStatusTableModel.MAJOR);
+ setValueAt(alarm.minor, row_index, AlarmStatusTableModel.MINOR);
+ }
+ else{
+ alarmHashTable.put(alarm.source_ip, alarm);
+ row_index = ((DefaultTableModel)getModel()).getRowCount();
+ Object [] row = new Object[AlarmStatusTableModel.NUM_COL];
+ row[AlarmStatusTableModel.SRC_IP] = alarm.source_ip;
+ row[AlarmStatusTableModel.SRC_NAME] = alarm.source_name;
+ row[AlarmStatusTableModel.CRITICAL] = alarm.critical;
+ row[AlarmStatusTableModel.MAJOR] = alarm.major;
+ row[AlarmStatusTableModel.MINOR] = alarm.minor;
+ ((DefaultTableModel)getModel()).insertRow(row_index, row);
+ }
+ }
+
+ // Shrinivas 23rd Apr 01
+ public static void removeAlarmSrcIp(String ip){
+ alarmSrcIpList.remove(ip);
+ }
+ // Shrinivas end
+ public void OpenEvent(){
+ int selectedRow = getSelectedRow();
+ if(selectedRow == -1){
+ System.out.println("Open Event: no selection made");
+ return;
+ }
+ String ip = (String)getValueAt(selectedRow, AlarmStatusTableModel.SRC_IP);
+ //System.out.println("Open Event: " +ip);
+ // Shrinivas 23rd Apr 01
+ if(alarmSrcIpList.contains(ip)){
+ return;
+ }
+ else{
+ alarmSrcIpList.add(ip);
+ }
+ Alarm alarmList = new Alarm(AlarmStatusApplet.ip, ip);
+ /*if (alarm == null){
+ alarm = new Alarm(AlarmStatusApplet.ip, ip);
+ }
+ else
+ alarm.start(ip); */
+ // Shrinivas end
+ } // end OpenEvent()
+
+ public void Remove(){
+ int selectedRow = getSelectedRow();
+ if(selectedRow == -1){
+ System.out.println("Remove Event: no selection made");
+ return;
+ }
+ String ip = (String)getValueAt(selectedRow, AlarmStatusTableModel.SRC_IP);
+ System.out.println("Remove Event: " +ip);
+ AlarmStatusData data = getAlarmStatusData(ip);
+ if(data == null){
+ System.out.println("Remove Event: data not found");
+ }
+ else{
+ alarmHashTable.remove(ip);
+ int row_index = rowAlarmStatusData(ip);
+ ((DefaultTableModel)getModel()).removeRow(row_index);
+ }
+ ((AlarmStatusApplet)applet).sendRemoveReq(data);
+ }
+
+ public void RemoveAll(){
+ int row_count = ((DefaultTableModel)getModel()).getRowCount();
+ while(row_count != 0){
+ String ip = (String)getValueAt(0, AlarmStatusTableModel.SRC_IP);
+ alarmHashTable.remove(ip);
+ ((DefaultTableModel)getModel()).removeRow(0);
+ row_count = ((DefaultTableModel)getModel()).getRowCount();
+ }
+ }
+
+ public void Refresh(){
+ ((AlarmStatusApplet)applet).sendUpdateReq();
+ }
+
+
+ class MouseHandler extends MouseAdapter{
+ public AlarmStatusTable table;
+
+ public MouseHandler(AlarmStatusTable table){
+ this.table = table;
+ }
+
+ public void mouseReleased(MouseEvent e){
+ if (e.getClickCount() == 2 ){
+ OpenEvent();
+ }
+
+ if ( e.isPopupTrigger()){
+ // changes by Shrinivas on 17th Oct 2k
+ System.out.println("Event : Popup menu");
+ int selectedRow = rowAtPoint(new Point(e.getX(),e.getY()));
+ setRowSelectionInterval(selectedRow,selectedRow);
+ // end of changes
+ popupMenu.show(table, e.getX(), e.getY());
+ }
+ }
+ }
+
+ class CountCellRenderer extends JLabel implements TableCellRenderer{
+ Font defaultFont = new Font("Helvetica", Font.BOLD,12);
+ Font empFont = new Font("TimesRoman", Font.BOLD,18);
+
+ public CountCellRenderer(){
+ super("Unknown");
+ setHorizontalAlignment(JLabel.CENTER);
+ }
+
+ public Component getTableCellRendererComponent( JTable table,
+ Object value,
+ boolean isSelected,
+ boolean hasFocus,
+ int row,
+ int column ){
+ setText((String)value);
+
+ return this;
+ }
+ }
+
+}
+
diff --git a/data/mnet/Common/Java/AlarmApplet/AlarmStatusTableModel.java b/data/mnet/Common/Java/AlarmApplet/AlarmStatusTableModel.java
new file mode 100644
index 0000000..85aa726
--- /dev/null
+++ b/data/mnet/Common/Java/AlarmApplet/AlarmStatusTableModel.java
@@ -0,0 +1,34 @@
+/*
+ * AlarmStatusTableModel.java
+ * Kevin Lim
+ * 03/20/00
+ */
+
+
+
+import javax.swing.*;
+import javax.swing.table.*;
+import java.awt.event.*;
+import java.awt.*;
+import java.util.*;
+
+public class AlarmStatusTableModel extends DefaultTableModel
+
+
+{
+ final static int SRC_IP = 0;
+ final static int SRC_NAME = 1;
+ final static int CRITICAL = 2;
+ final static int MAJOR = 3;
+ final static int MINOR = 4;
+
+ static String ColumnTitle[] = {"Source IP", "Source Name", "Critical Alarm", "Major Alarm", "Minor Alarm"};
+ final static int NUM_COL = ColumnTitle.length;
+
+ public AlarmStatusTableModel()
+ {
+ super(ColumnTitle, 0);
+ }
+}
+
+
diff --git a/data/mnet/Common/Java/AlarmApplet/AlarmStatusTablePopupMenu.java b/data/mnet/Common/Java/AlarmApplet/AlarmStatusTablePopupMenu.java
new file mode 100644
index 0000000..e91f3f4
--- /dev/null
+++ b/data/mnet/Common/Java/AlarmApplet/AlarmStatusTablePopupMenu.java
@@ -0,0 +1,126 @@
+/*
+ * AlarmStatusTablePopupMenu.java
+ * Kevin Lim
+ * 03/20/00
+ */
+
+
+
+import java.util.*;
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.text.*;
+
+public class AlarmStatusTablePopupMenu extends JPopupMenu implements ActionListener{
+ static JMenuItem openMenuItem;
+ static JMenuItem removeMenuItem;
+ static JMenuItem refreshMenuItem;
+ static boolean iconsLoaded = false;
+ protected static AlarmStatusTablePopupMenu popupMenu = new AlarmStatusTablePopupMenu();
+ static AlarmStatusTable invoker ;
+ static int x;
+ static int y;
+
+
+ /**
+ * You cannot instantiate this class. Use getPopupMenu() to get
+ * a shared instance!
+ */
+ protected AlarmStatusTablePopupMenu(){
+
+ openMenuItem = new JMenuItem(new String("Open Alarm"));
+ openMenuItem.setMnemonic('O');
+ openMenuItem.registerKeyboardAction(null, KeyStroke.getKeyStroke('O', Event.ALT_MASK, false),
+ JComponent.WHEN_IN_FOCUSED_WINDOW);
+ openMenuItem.setHorizontalTextPosition(SwingConstants.RIGHT);
+ openMenuItem.setHorizontalAlignment(SwingConstants.LEFT);
+ openMenuItem.addActionListener(this);
+ add(openMenuItem);
+
+ removeMenuItem = new JMenuItem(new String("Remove"));
+ removeMenuItem.setMnemonic('m');
+ removeMenuItem.registerKeyboardAction(null, KeyStroke.getKeyStroke('m', Event.ALT_MASK, false),
+ JComponent.WHEN_IN_FOCUSED_WINDOW);
+ removeMenuItem.setHorizontalTextPosition(SwingConstants.RIGHT);
+ removeMenuItem.setHorizontalAlignment(SwingConstants.LEFT);
+ removeMenuItem.addActionListener(this);
+ add(removeMenuItem);
+
+ // Shrinivas 20th Apr 01
+ /*refreshMenuItem = new JMenuItem(new String("Refresh"));
+ refreshMenuItem.setMnemonic('R');
+ refreshMenuItem.registerKeyboardAction(null, KeyStroke.getKeyStroke('R', Event.ALT_MASK, false),
+ JComponent.WHEN_IN_FOCUSED_WINDOW);
+ refreshMenuItem.setHorizontalTextPosition(SwingConstants.RIGHT);
+ refreshMenuItem.setHorizontalAlignment(SwingConstants.LEFT);
+ refreshMenuItem.addActionListener(this);
+ add(refreshMenuItem);*/
+ // Shrinivas end
+ }
+
+
+ /**
+ * returns shared instance of popupMenu
+ */
+ public static AlarmStatusTablePopupMenu getPopupMenu(){
+ return popupMenu;
+ }
+
+
+ /**
+ * update to use difference icons later!
+ */
+ void loadIcons(){
+ }
+
+
+ /**
+ * update to use shared clipboard access later
+ */
+ public void actionPerformed(ActionEvent e){
+ Object obj = e.getSource();
+ String selection = null;
+
+ if (obj == openMenuItem) {
+ invoker.OpenEvent();
+ }
+ else if (obj == removeMenuItem) {
+ invoker.Remove();
+ }
+ else if (obj == refreshMenuItem) {
+ invoker.Refresh();
+ }
+ }
+
+
+ /**
+ * force JTable only later
+ */
+ public void show(Component c, int x, int y){
+ invoker = (AlarmStatusTable)c;
+
+ Point p = new Point(x,y);
+ int row = invoker.rowAtPoint(p);
+ int col = invoker.columnAtPoint(p);
+
+ this.x = x;
+ this.y = y;
+ super.show(c,x,y);
+ }
+
+
+ void disableMenu() {
+ openMenuItem.setEnabled(false);
+ removeMenuItem.setEnabled(false);
+ refreshMenuItem.setEnabled(false);
+ }
+
+
+ void enableMenu(){
+ openMenuItem.setEnabled(true);
+ removeMenuItem.setEnabled(true);
+ refreshMenuItem.setEnabled(true);
+ }
+}
+
diff --git a/data/mnet/Common/Java/AlarmApplet/AlarmTCPThread.java b/data/mnet/Common/Java/AlarmApplet/AlarmTCPThread.java
new file mode 100644
index 0000000..3a4ed0d
--- /dev/null
+++ b/data/mnet/Common/Java/AlarmApplet/AlarmTCPThread.java
@@ -0,0 +1,469 @@
+
+/*
+ * AlarmTCPThread.java
+ * Kevin Lim
+ * 03/21/00
+ */
+
+
+
+import java.net.*;
+import java.io.*;
+import javax.swing.*;
+import javax.swing.*;
+import javax.swing.text.Document;
+import javax.swing.event.*;
+import com.jetcell.MibWM.*;
+
+public class AlarmTCPThread extends Thread{
+
+ static private boolean FILTER = false;
+ private String filterVipercellIp = null;
+
+ static final int MAX_IN_BUF_SIZE = 4096;
+ static final int MAX_MSG_BUF_SIZE = 1024;
+ static final int ALARM_HEAD_SRC_TYPE_POS = 0;
+ static final int ALARM_HEAD_MSG_TYPE_POS = 1;
+ static final int ALARM_HEAD_MSG_SIZE_POS = 2;
+ static final int ALARM_MSG_HEADER_LEN = 4;
+ static final int ALARM_MSG_SRC_IP_SIZE = 4;
+ static final int ALARM_MSG_SRC_NAME_SIZE = 41;
+ static final int ALARM_MSG_CRITICAL_SIZE = 1;
+ static final int ALARM_MSG_MAJOR_SIZE = 1;
+ static final int ALARM_MSG_MINOR_SIZE = 1;
+
+ static final byte ALARM_MSG_TYPE_UPDATE_REQ = 1;
+ static final byte ALARM_MSG_TYPE_UPDATE_RSP = 2;
+ static final byte ALARM_MSG_TYPE_REMOVE_REQ = 3;
+ static final byte ALARM_MSG_TYPE_EVENT_REQ = 4;
+ static final byte ALARM_MSG_TYPE_EVENT_RSP = 5;
+ static final byte ALARM_MSG_TYPE_ACK = 6;
+
+ static final byte ALARM_MSG_SRC_TYPE_APPLET = (byte)0xFF;
+
+static final int MAX_MODULE_SPECIC_ALARM = 0xFFFF;
+ static final int ALARM_CRITICAL_START_POINT = 0x0001;
+ static final int ALARM_MAJOR_START_POINT = 0x0100;
+ static final int ALARM_MINOR_START_POINT = 0x0800;
+ static final int ALARM_INFO_START_POINT = 0x1000;
+ static final int ALARM_CRITICAL = 0;
+ static final int ALARM_MAJOR = 1;
+ static final int ALARM_MINOR = 2;
+ static final int ALARM_INFO = 3;
+ public static String user = null;
+
+ Socket socket;
+ String host;
+ int port;
+ int appletVipercellIp = 0;
+ int msgVipercellIp = 0;
+ AlarmStatusPanel panel = null;
+ AlarmPanel alarmPanel = null;
+ AlarmData alarmData = null;
+ BufferedInputStream in = null;
+ InputStreamReader isr = null;
+ public static BufferedOutputStream out = null;
+ boolean running;
+
+ public AlarmTCPThread(String host, int port) {
+ this.host = host;
+ this.port = port;
+ System.out.println("Connecting to the Server " + host + " at port " + port);
+ try {
+ socket = new Socket(host, port);
+ } catch(IOException e) {
+ System.out.println("Could not connect to the Server");
+ socket = null;
+ }
+ if(socket != null){
+ try {
+ in = new BufferedInputStream(socket.getInputStream()); // reading is done to byte arrays
+ out = new BufferedOutputStream(socket.getOutputStream()); // writing is done from byte arrays
+ out.flush();
+ } catch(IOException e) {
+ System.out.println("IO exception in AlarmTCPThread: ");
+ close_socket();
+ }
+ }
+ }
+
+ public void sendRemoveReq(AlarmStatusData data)
+ {
+ if(out == null) return;
+ try {
+ byte[] msg = {ALARM_MSG_SRC_TYPE_APPLET,
+ ALARM_MSG_TYPE_REMOVE_REQ,
+ 0, 5, 0, 0, 0, 0, 0};
+ int i = AlarmTCPThread.ALARM_MSG_HEADER_LEN;
+ byte[] ip_addr = data.getSrcIPByte();
+ if(ip_addr == null){
+ System.out.println("Error on sendRemoveReq: getSrcIPByte failed");
+ return;
+ }
+ for(int j=0; j<AlarmTCPThread.ALARM_MSG_SRC_IP_SIZE; j++){
+ msg[i++] = ip_addr[j];
+ System.out.println("ip_addr "+ip_addr[j]);
+ }
+ byte type = data.getSrcTypeByte();
+ if(type == (byte)0xFF){
+ System.out.println("Error on sendRemoveReq: getSrcTypeByte returned unknown");
+ return;
+ }
+ msg[i++] = type;
+ out.write(msg, 0, i);
+ out.flush();
+ } catch(IOException ioe) {
+ System.out.println("IO exception in AlarmTCPThread:send "+ioe);
+ }
+ }
+
+ public void sendUpdateReq(){
+ if(out == null) return;
+ try {
+ byte[] msg = {ALARM_MSG_SRC_TYPE_APPLET,
+ ALARM_MSG_TYPE_UPDATE_REQ,
+ 0, 0};
+ out.write(msg, 0, ALARM_MSG_HEADER_LEN);
+ out.flush();
+ } catch(IOException ioe) {
+ System.out.println("IO exception in AlarmTCPThread:send "+ioe);
+ }
+ }
+
+ // send alarm event msg update request to AlarmServer
+ static public void sendEventReq(String vipercellIp){
+ int index = 0;
+ String tmpStr = vipercellIp;
+ String valueStr;
+ Short [] ip = new Short[4];
+ if (out == null)
+ return;
+
+ // converting IP string into 4 octets
+ for (int i = 0; i < 4; i++){
+ index = tmpStr.indexOf(".");
+ valueStr = i == 3 ? tmpStr : tmpStr.substring(0, index);
+ ip[i] = new Short(valueStr);
+ tmpStr = tmpStr.substring(index + 1);
+ }
+
+ try {
+ byte[] msg = {ALARM_MSG_SRC_TYPE_APPLET,
+ ALARM_MSG_TYPE_EVENT_REQ,
+ 0x00, 0x04, // length of data
+ ip[0].byteValue(), ip[1].byteValue(), ip[2].byteValue(),
+ ip[3].byteValue()};
+ out.write(msg, 0, ALARM_MSG_HEADER_LEN + 4);
+ out.flush();
+ }
+ catch(IOException ioe) {
+ System.out.println("IO exception in AlarmTCPThread:send "+ioe);
+ }
+ FILTER = false;
+ }
+
+ public static void sendAck(String srcIp,String alarmId,String recordNum){
+ int index = 0;
+ String tmpStr = srcIp;
+ String valueStr;
+ Short [] ip = new Short[4];
+
+ byte aid[] = new byte[4];
+ byte rec[] = new byte[4];
+
+
+ // converting IP string into 4 octets
+ for (int i = 0; i < 4; i++){
+ index = tmpStr.indexOf(".");
+ valueStr = i == 3 ? tmpStr : tmpStr.substring(0, index);
+ ip[i] = new Short(valueStr);
+ tmpStr = tmpStr.substring(index + 1);
+ }
+
+ // converting alarmID to bytes
+ aid = AlarmTCPThread.extractBytes(alarmId);
+ rec = AlarmTCPThread.extractBytes(recordNum);
+
+ try {
+ byte[] msg = {ALARM_MSG_SRC_TYPE_APPLET,
+ ALARM_MSG_TYPE_ACK,
+ 0x00, 0x0c, // length of data
+ ip[0].byteValue(), ip[1].byteValue(), ip[2].byteValue(),
+ ip[3].byteValue(),
+ aid[3],aid[2],aid[1],aid[0],
+ rec[3],rec[2],rec[1],rec[0]};
+ out.write(msg, 0, msg.length);
+ out.flush();
+ }
+ catch(IOException ioe) {
+ AlarmStatusApplet.logDM("IO exception in AlarmTCPThread: ack "+ioe);
+ }
+ }
+
+ public static byte[] extractBytes(String s){
+
+ byte store[] = new byte[4];
+ int intValue = Integer.parseInt(s);
+
+ store[0] = (byte)(intValue & 0x000000ff);
+ store[1] = (byte)((intValue >> 8) & 0x000000ff);
+ store[2] = (byte)((intValue >> 16) & 0x000000ff);
+ store[3] = (byte)((intValue >> 24) & 0x000000ff);
+
+ return store;
+ }
+
+ public void alarmMsgHandler(byte[] msg) {
+ int index = AlarmTCPThread.ALARM_HEAD_MSG_TYPE_POS;
+ switch(msg[index]){
+ case ALARM_MSG_TYPE_UPDATE_RSP:
+ if (panel != null)
+ {
+ AlarmStatusData alarm = new AlarmStatusData(msg);
+ panel.addEvent(alarm);
+ }
+ break;
+ case ALARM_MSG_TYPE_EVENT_RSP:
+ if (alarmPanel != null)
+ {
+ try {
+ alarmData = new AlarmData(parseEventData(msg));
+ }
+ catch(Exception e) {}
+ if (appletVipercellIp == msgVipercellIp){
+ alarmPanel.addEvent(alarmData);
+ }
+ }
+ break;
+ default:
+ System.out.println("Unknown message received "+(int)msg[index]);
+ int size = 0x00FF & (int)msg[AlarmTCPThread.ALARM_HEAD_MSG_SIZE_POS];
+ size = (size << 8) | (0x00FF & (int)msg[AlarmTCPThread.ALARM_HEAD_MSG_SIZE_POS+1]);
+ size += AlarmTCPThread.ALARM_MSG_HEADER_LEN;
+ if(size > AlarmTCPThread.MAX_MSG_BUF_SIZE) size = AlarmTCPThread.MAX_MSG_BUF_SIZE;
+ for(int i=0; i<size; i++) System.out.print(" " + (int)(msg[i] & 0x00FF));
+ System.out.println(" ");
+ }
+ }
+
+ public void close_socket() {
+ if(socket != null){
+ try {
+ socket.close();
+ System.out.println("closing socket at third window level...");
+ }
+ catch(IOException e) {
+ System.out.println("Couldn't close socket " + e);
+ }
+ }
+ }
+
+ public void reconnect() {
+ boolean done = false;
+ while(!done){
+ try {
+ if (panel != null)
+ panel.dispStatus("Attempting to reconnect to the Server...");
+ socket = new Socket(host, port);
+ done = true;
+ if (panel != null)
+ panel.dispStatus("Server on-line");
+ }
+ catch(IOException e) {
+ if (panel != null)
+ panel.dispStatus("Server off-line");
+ }
+ try {
+ sleep(1000);
+ }
+ catch (InterruptedException ie) {
+ System.out.println(" Interrupted Excution = " + ie);
+ }
+ }
+ if(socket != null){
+ try {
+ in = new BufferedInputStream(socket.getInputStream()); // reading is done to byte arrays
+ out = new BufferedOutputStream(socket.getOutputStream()); // writing is done from byte arrays
+ out.flush();
+ if (panel != null) {
+ panel.clearEvents();
+ sendUpdateReq();
+ }
+ }
+ catch(IOException e) {
+ System.out.println("IO exception in AlarmTCPThread: ");
+ close_socket();
+ }
+ }
+ }
+
+ public void run() {
+ // Shrinivas 01 June 01
+ if(socket == null && running ) reconnect();
+ byte[] buf = new byte[AlarmTCPThread.MAX_IN_BUF_SIZE];
+ byte[] msg = new byte[AlarmTCPThread.MAX_MSG_BUF_SIZE];
+ running = true;
+ int readBytes;
+ int index;
+ int msg_size;
+ int header_size = AlarmTCPThread.ALARM_MSG_HEADER_LEN;
+ while(running){
+ try {
+ readBytes = in.read(buf, 0, AlarmTCPThread.MAX_IN_BUF_SIZE);
+ if(readBytes == -1){
+ System.out.println("End of stream reached!");
+ close_socket();
+ // Shrinivas 01 June 01'
+ if(running){
+ reconnect();
+ }
+ // Shrinivas end
+ }
+ index = 0;
+ while ((index + header_size) <= readBytes){ // while there are msg at least size of header
+ msg_size = 0x00FF & (int)buf[index+AlarmTCPThread.ALARM_HEAD_MSG_SIZE_POS];
+ msg_size = (msg_size << 8)
+ | (0x00FF & (int)buf[index+AlarmTCPThread.ALARM_HEAD_MSG_SIZE_POS+1]);
+ if((header_size + msg_size) <= (readBytes - index)){ // about to copy msg within valid range
+ for(int i=0; i<(header_size + msg_size); i++){
+ msg[i] = buf[index++];
+ }
+ AlarmStatusApplet.logDM("Received msg with length: " + msg_size);
+ alarmMsgHandler(msg);
+ }
+ else{
+ System.out.println("Length Err. Msg Length specified : "+msg_size);
+ System.out.println("Length Err. Bytes left in read buf: "+(readBytes - index));
+ index = readBytes; // finish while
+ }
+ }
+ }
+ catch(IOException e) {
+ close_socket();
+ if(running != false){
+ reconnect();
+ }
+ System.out.println("Stopping thread.");
+ }
+ }
+ }
+
+ public void startReadThread(AlarmStatusPanel panel){
+ this.panel = panel;
+ start();
+ panel.dispStatus("Server on-line");
+ sendUpdateReq();
+ }
+
+ public void startReadThread(AlarmPanel panel, String vipercellIp, boolean startThread){
+ alarmPanel = panel;
+ alarmPanel.removeAllEvents();
+ setAppletVipercellIp(vipercellIp);
+ if (startThread)
+ start();
+ this.filterVipercellIp = vipercellIp;
+ sendEventReq(vipercellIp);
+ }
+
+ public void finishReadThread(){
+ System.out.println("TCP thread is being shutdown");
+ running = false;
+ close_socket();
+ stop();
+ }
+
+ private void setAppletVipercellIp(String vipercellIp){
+ String valueStr;
+ Short octetVal;
+ String tmpStr = vipercellIp;
+ int index = 0;
+ appletVipercellIp = 0;
+ for (int i = 0; i < 4; i++)
+ {
+ index = tmpStr.indexOf(".");
+ valueStr = i == 3 ? tmpStr : tmpStr.substring(0, index);
+ if (i > 1) // we use only last two octets
+ {
+ octetVal = new Short(valueStr);
+ if (i == 2)
+ appletVipercellIp = octetVal.shortValue() << 8;
+ else
+ appletVipercellIp += octetVal.shortValue();
+ }
+ tmpStr = tmpStr.substring(index + 1);
+ }
+ }
+
+ private int extractNumber(byte[] msg, int pos){
+ return ((msg[pos] << 24 & 0xff000000) +
+ (msg[pos+1] << 16 & 0xff0000) +
+ (msg[pos+2] << 8 & 0xff00) +
+ (msg[pos+3] & 0xff));
+ }
+
+ private int extractIp(byte[] msg, int pos){
+ // for now, we are only extracting last 2 octets of an IP address
+ return((msg[pos+2] << 8 & 0xff00) + (msg[pos+3] & 0xff));
+ }
+
+ public String extractSrcIP(byte[] msg, int i){
+ int h1 = (int)msg[i] & 0x00FF;
+ int h2 = (int)msg[i+1] & 0x00FF;
+ int h3 = (int)msg[i+2] & 0x00FF;
+ int h4 = (int)msg[i+3] & 0x00FF;
+ String source_ip = "" + (new Integer(h1)).toString() +
+ "." + (new Integer(h2)).toString() +
+ "." + (new Integer(h3)).toString() +
+ "." + (new Integer(h4)).toString();
+
+ return source_ip;
+ }
+
+ private int getSeverity(int errorCode){
+ int severity;
+
+ if (errorCode == 0)
+ return ALARM_INFO;
+
+ int tmp = (errorCode & MAX_MODULE_SPECIC_ALARM);
+ if (tmp < ALARM_MAJOR_START_POINT)
+ {
+ severity = ALARM_CRITICAL;
+ } else if (tmp < ALARM_MINOR_START_POINT) {
+ severity = ALARM_MAJOR;
+ } else if (tmp < ALARM_INFO_START_POINT) {
+ severity = ALARM_MINOR;
+ } else {
+ severity = ALARM_INFO;
+ }
+ return severity;
+ }
+
+ private String parseEventData(byte[] msg) {
+ int id = extractNumber(msg, 4);
+ int code = extractNumber(msg, 8);
+ int severity = getSeverity(code);
+ int timestamp = extractNumber(msg, 12);
+ int srcIp = extractIp(msg, 16);
+
+ String srcIpString = extractSrcIP(msg, 16);
+
+ if (0 == appletVipercellIp){
+ appletVipercellIp = srcIp;
+ msgVipercellIp = srcIp;
+ }
+ else
+ msgVipercellIp = srcIp;
+ int srcModule = extractNumber(msg, 64);
+ int opt1 = extractNumber(msg, 68);
+ int opt2 = extractNumber(msg, 72);
+ int ack = extractNumber(msg,76);
+ int recNumber = extractNumber(msg,80);
+ String srcName = new String(msg, 20, 41);
+ srcName = srcName.trim();
+ String eventData = new String(id+"|"+timestamp+"|"+severity+"|"+srcModule+"|"+
+ srcName+"|"+code+"|"+opt1+"|"+opt2+"|"+srcIpString+"|"+ack+"|"+recNumber+"|");
+ return eventData;
+ }
+}
+
diff --git a/data/mnet/Common/Java/AlarmApplet/FilterFrame.java b/data/mnet/Common/Java/AlarmApplet/FilterFrame.java
new file mode 100644
index 0000000..c130ca4
--- /dev/null
+++ b/data/mnet/Common/Java/AlarmApplet/FilterFrame.java
@@ -0,0 +1,337 @@
+import java.awt.*;
+import javax.swing.*;
+import java.awt.event.*;
+import javax.swing.UIManager.*;
+import java.net.*;
+
+import com.jetcell.MibWM.*;
+
+ public class FilterFrame extends JFrame{
+
+ final FilterFrame ff = this;
+
+ Container contentPane = null;
+ JPanel centerPanel = null;
+ JPanel southPanel = null;
+
+ // Labels
+ JLabel alarms = null;
+ JLabel time = null;
+ JLabel severity = null;
+ JLabel acknowledge = null;
+
+ // Combo Boxes
+ JComboBox alarmCombo = new JComboBox();
+ JComboBox timeCombo = new JComboBox();
+ JComboBox severityCombo = new JComboBox();
+ JComboBox acknowledgeCombo = new JComboBox();
+
+ // Reference to "AlarmPanel"
+ AlarmPanel alarmPanel = null;
+
+ public static FilterObject filterObject = null;
+ public static FilterObject tempFilterObject = null;
+
+ public FilterFrame(){
+ if(Util.applet == null){
+ setIconImage(Toolkit.getDefaultToolkit().getImage("../Images/app_icon.gif"));
+ }
+ else{
+ String iconPath = Util.applet.getCodeBase().toString();
+ iconPath += "Images/app_icon.gif";
+ URL iconPathURL = null;
+ try{
+ iconPathURL = new URL(iconPath);
+ }
+ catch(MalformedURLException exc){
+ System.out.println("Bad URL.");
+ }
+ System.out.println(iconPathURL);
+ setIconImage(Toolkit.getDefaultToolkit().getImage(iconPathURL));
+ }
+ }
+
+ public FilterFrame(AlarmPanel panel){
+ this.alarmPanel = panel;
+ if(tempFilterObject == null)
+ tempFilterObject = filterObject;
+ try{
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ }
+ catch(Exception ex){
+ System.out.println("Error setting Look and Feel for Filter frame");
+ }
+ if(Util.applet == null){
+ setIconImage(Toolkit.getDefaultToolkit().getImage("../Images/app_icon.gif"));
+ }
+ else{
+ String iconPath = Util.applet.getCodeBase().toString();
+ iconPath += "Images/app_icon.gif";
+ URL iconPathURL = null;
+ try{
+ iconPathURL = new URL(iconPath);
+ }
+ catch(MalformedURLException exc){
+ System.out.println("Bad URL.");
+ }
+ System.out.println(iconPathURL);
+ setIconImage(Toolkit.getDefaultToolkit().getImage(iconPathURL));
+ }
+ JButton ok = new JButton(" OK ");
+ JButton cancel = new JButton("CANCEL");
+ JButton saveDefault = new JButton("Save As Default");
+ contentPane = getContentPane();
+ getCenterPanel(tempFilterObject);
+ if(tempFilterObject != null){
+ mapFilterOnFrame(tempFilterObject);
+ }
+ southPanel = new JPanel();
+ southPanel.setLayout(new FlowLayout(FlowLayout.CENTER));
+ southPanel.add(ok);
+ southPanel.add(cancel);
+ if(Util.applet == null){
+ southPanel.add(saveDefault);
+ }
+
+ contentPane.add(centerPanel,BorderLayout.CENTER);
+ contentPane.add(southPanel,BorderLayout.SOUTH);
+ setSize(400,200);
+ addWindowListener(new windowListener());
+
+ ok.addActionListener(new ActionListener(){
+ public void actionPerformed(ActionEvent evt){
+ AlarmStatusApplet.logDM("Handle filter selection");
+ handleFilterSave();
+ }
+ });
+
+ cancel.addActionListener(new ActionListener(){
+ public void actionPerformed(ActionEvent evt){
+ dispose();
+ AlarmStatusApplet.logDM("No filter selection");
+ }
+ });
+
+ saveDefault.addActionListener(new ActionListener(){
+ public void actionPerformed(ActionEvent evt){
+ handleFilterSave();
+ filterObject = tempFilterObject;
+
+ }
+ });
+
+ }
+
+ public void handleFilterSave(){
+
+ // alarms selected
+ tempFilterObject = new FilterObject();
+ String alarms = (String)alarmCombo.getSelectedItem();
+ if(alarms.equals("All")){
+ tempFilterObject.NUM_ALARMS = FilterObject.NONE;
+ }
+ else{
+ try{
+ tempFilterObject.NUM_ALARMS = Integer.parseInt(alarms);
+ }
+ catch(NumberFormatException nfex){
+ JOptionPane.showMessageDialog(ff,"Bad Alarm number criteria.Default value assumed. ","Invalid number",JOptionPane.ERROR_MESSAGE);
+ tempFilterObject.NUM_ALARMS = FilterObject.NONE;
+ }
+ }
+
+ // time selected
+ int timeIndex = timeCombo.getSelectedIndex();
+
+ if(timeIndex == 1){
+ tempFilterObject.TIME = FilterObject.MIN_15;
+ }
+ else if(timeIndex == 2){
+ tempFilterObject.TIME = FilterObject.HR_1;
+ }
+ else if(timeIndex == 3){
+ tempFilterObject.TIME = FilterObject.HR_12;
+ }
+ else if(timeIndex == 4){
+ tempFilterObject.TIME = FilterObject.HR_24;
+ }
+ else
+ tempFilterObject.TIME = FilterObject.NONE;
+
+ // severity selected
+ int severityIndex = severityCombo.getSelectedIndex();
+
+ if(severityIndex == 1){
+ tempFilterObject.SEVERITY = FilterObject.CRITICAL;
+ }
+ else if(severityIndex == 2){
+ tempFilterObject.SEVERITY = FilterObject.MAJOR;
+ }
+ else if(severityIndex == 3){
+ tempFilterObject.SEVERITY = FilterObject.MINOR;
+ }
+ else
+ tempFilterObject.SEVERITY = FilterObject.NULL;
+
+ // acknowledge selected
+ int ackIndex = acknowledgeCombo.getSelectedIndex();
+ if(ackIndex == 1){
+ tempFilterObject.ACKNOWLEDGE = FilterObject.ALL_ACK;
+ }
+ else if(ackIndex == 2){
+ tempFilterObject.ACKNOWLEDGE = FilterObject.NO_ACK;
+ }
+ else
+ tempFilterObject.ACKNOWLEDGE = FilterObject.NONE;
+ this.dispose();
+ // Ananth
+ /*if (tempFilterObject.NUM_ALARMS == FilterObject.NONE &&
+ tempFilterObject.SEVERITY == FilterObject.NULL &&
+ tempFilterObject.TIME == FilterObject.NONE &&
+ tempFilterObject.ACKNOWLEDGE == FilterObject.NONE){
+ Util.setBorderTitle("Alarm List");
+ }
+ else{
+ Util.setBorderTitle("Alarm List (Filtered)");
+ }*/
+
+ if(alarmPanel!=null){
+ alarmPanel.handleFilterEvent(tempFilterObject);
+ alarmPanel.getAlarmTable().Refresh();
+ }
+ else{
+ filterObject = tempFilterObject;
+ }
+
+ }
+
+ private void mapFilterOnFrame(FilterObject tempFilterObject){
+
+ if(tempFilterObject.NUM_ALARMS != FilterObject.NONE){
+ String alarms = Integer.toString(tempFilterObject.NUM_ALARMS);
+ alarmCombo.getEditor().setItem(alarms);
+ }
+ else{
+ alarmCombo.setSelectedIndex(0);
+ }
+
+ if(tempFilterObject.TIME != FilterObject.NONE){
+
+ if(tempFilterObject.TIME == FilterObject.MIN_15)
+ timeCombo.setSelectedIndex(1);
+ else if(tempFilterObject.TIME == FilterObject.HR_1)
+ timeCombo.setSelectedIndex(2);
+ else if(tempFilterObject.TIME == FilterObject.HR_12)
+ timeCombo.setSelectedIndex(3);
+ else if(tempFilterObject.TIME == FilterObject.HR_24)
+ timeCombo.setSelectedIndex(4);
+ }
+ else{
+ timeCombo.setSelectedIndex(0);
+ }
+
+ if(!tempFilterObject.SEVERITY.equals(FilterObject.NULL)){
+
+ if(tempFilterObject.SEVERITY.equals(FilterObject.CRITICAL))
+ severityCombo.setSelectedIndex(1);
+ else if(tempFilterObject.SEVERITY.equals(FilterObject.MAJOR))
+ severityCombo.setSelectedIndex(2);
+ else if(tempFilterObject.SEVERITY.equals(FilterObject.MINOR))
+ severityCombo.setSelectedIndex(3);
+ }
+ else{
+ severityCombo.setSelectedIndex(0);
+ }
+
+ if(tempFilterObject.ACKNOWLEDGE != FilterObject.NONE){
+
+ if(tempFilterObject.ACKNOWLEDGE == FilterObject.ALL_ACK)
+ acknowledgeCombo.setSelectedIndex(1);
+ else if(tempFilterObject.ACKNOWLEDGE == FilterObject.NO_ACK)
+ acknowledgeCombo.setSelectedIndex(2);
+ }
+ else{
+ acknowledgeCombo.setSelectedIndex(0);
+ }
+ }
+
+ public JPanel getCenterPanel(FilterObject filterObj){
+
+ centerPanel = Util.makeBorderPanel("Filter Screen");
+ centerPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
+ alarms = new JLabel(" Alarms ");
+ alarms.setToolTipText("Check to set Alarm filter / Uncheck to set Default (All)");
+ time = new JLabel(" Time ");
+ time.setToolTipText("Check to set Time filter / Uncheck to set Default(All)");
+ severity = new JLabel(" Severity ");
+ severity.setToolTipText("Check to set Severity filter / Uncheck to set Default (All)");
+ acknowledge = new JLabel(" Acknowledge ");
+ acknowledge.setToolTipText("Check to set Acknowledge filter / Uncheck to set Default (All)");
+
+ // Alarms
+ alarmCombo.setPreferredSize(new Dimension(50,20));
+ alarmCombo.setEditable(true);
+ alarmCombo.addItem("All");
+ for(int i=1;i<=20;i++){
+ alarmCombo.addItem(Integer.toString(i));
+ }
+
+ // Time
+ timeCombo.addItem("All");
+ timeCombo.addItem("15 mins");
+ timeCombo.addItem("1 hour");
+ timeCombo.addItem("12 hours");
+ timeCombo.addItem("24 hours");
+
+ // Severity
+ severityCombo.addItem("All");
+ severityCombo.addItem("Critical");
+ severityCombo.addItem("Critical-Major");
+ severityCombo.addItem("Critical-Minor");
+
+ // Acknowledge
+ acknowledgeCombo.addItem("All");
+ acknowledgeCombo.addItem("Acknowledged");
+ acknowledgeCombo.addItem("Unacknowledged");
+
+ // Alarms
+ final JPanel p1 = new JPanel();
+ p1.setLayout(new FlowLayout(FlowLayout.LEFT));
+ p1.add(alarms);
+ p1.add(alarmCombo);
+ p1.add(acknowledge);
+ p1.add(acknowledgeCombo);
+
+
+ // Time
+ final JPanel p2 = new JPanel();
+ p2.setLayout(new FlowLayout(FlowLayout.LEFT));
+ p2.add(severity);
+ p2.add(severityCombo);
+ p2.add(time);
+ p2.add(timeCombo);
+
+ // Severity
+
+ // Acknowledge
+
+
+ centerPanel.add(p1);
+
+ centerPanel.add(p2);
+
+ if(filterObj != null){
+ mapFilterOnFrame(filterObj);
+ }
+ return centerPanel;
+ }
+
+
+ class windowListener extends WindowAdapter{
+ public void windowClosing(WindowEvent evt){
+ dispose();
+ AlarmStatusApplet.logDM("Closing Filter Screen");
+ }
+ }
+
+ }
diff --git a/data/mnet/Common/Java/AlarmApplet/FilterObject.java b/data/mnet/Common/Java/AlarmApplet/FilterObject.java
new file mode 100644
index 0000000..dc7f403
--- /dev/null
+++ b/data/mnet/Common/Java/AlarmApplet/FilterObject.java
@@ -0,0 +1,35 @@
+import java.io.Serializable;
+
+public class FilterObject implements Serializable{
+
+ // filter criteria
+ public int NUM_ALARMS;
+ public int TIME;
+ public String SEVERITY;
+ public int ACKNOWLEDGE;
+
+ public static int NONE = 0;
+
+ // Alarm number constants
+ public static int N1 = 2;
+ public static int N2 = 4;
+ public static int N3 = 6;
+ public static int N4 = 8;
+
+ // Severtiy constants
+ public static String CRITICAL = "CRITICAL";
+ public static String MAJOR = "MAJOR";
+ public static String MINOR = "MINOR";
+ public static String WARNING = "WARNING";
+ public static String NULL = "NULL";
+
+ // Ack constants
+ public static int NO_ACK = 1;
+ public static int ALL_ACK = 2;
+
+ // Time stamp constants
+ public static int MIN_15 = 1;
+ public static int HR_1 = 2;
+ public static int HR_12 = 3;
+ public static int HR_24 = 4;
+}
diff --git a/data/mnet/Common/Java/AlarmApplet/Makefile b/data/mnet/Common/Java/AlarmApplet/Makefile
new file mode 100644
index 0000000..24ded19
--- /dev/null
+++ b/data/mnet/Common/Java/AlarmApplet/Makefile
@@ -0,0 +1,41 @@
+####################################################################
+#
+# FILE NAME: Makefile
+#
+# DESCRIPTION: This makefile creates the vipercell related class
+# files
+# COMPONENTS:
+#
+#
+# NOTES:
+#
+# (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+#
+# REVISION HISTORY
+#__________________________________________________________________
+#----------+--------+----------------------------------------------
+# Name | Date | Reason
+#----------+--------+----------------------------------------------
+# Kevin Lim|03/28/00| Initial Draft
+#----------+--------+----------------------------------------------
+####################################################################
+#/
+
+CODEBASE = ..
+ALARMARCH = $(CODEBASE)\Java\AlarmStatus.jar
+
+include $(CODEBASE)\java.mk
+
+
+all: $(CLASS_LIST) $(ALARMARCH)
+
+$(ALARMARCH):
+ $(JAR) cvf $@ *.class com\jetcell\MibWM\*.class
+
+clean:
+ -$(RM) *.class
+
+cleanall:
+ -$(RM) *.class
+ -$(RM) $(ALARMARCH)
+
diff --git a/data/mnet/Common/Java/AlarmApplet/com/jetcell/MibWM/Makefile b/data/mnet/Common/Java/AlarmApplet/com/jetcell/MibWM/Makefile
new file mode 100644
index 0000000..e8c30ce
--- /dev/null
+++ b/data/mnet/Common/Java/AlarmApplet/com/jetcell/MibWM/Makefile
@@ -0,0 +1,40 @@
+####################################################################
+#
+# FILE NAME: Makefile
+#
+# DESCRIPTION: This makefile creates the vipercell related class
+# files
+# COMPONENTS:
+#
+#
+# NOTES:
+#
+# (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+#
+# REVISION HISTORY
+#__________________________________________________________________
+#----------+--------+----------------------------------------------
+# Name | Date | Reason
+#----------+--------+----------------------------------------------
+# Bhawani |11/28/99| Initial Draft
+#----------+--------+----------------------------------------------
+####################################################################
+#/
+
+CODEBASE = ../../../../
+
+
+include $(CODEBASE)/java.mk
+
+
+all: $(CLASS_LIST)
+
+
+clean:
+ -$(RM) *.java
+ -$(RM) *.class
+
+cleanall:
+ -$(RM) *.java
+ -$(RM) *.class
+
diff --git a/data/mnet/Common/Java/Images/Jetcelllogo.jpg b/data/mnet/Common/Java/Images/Jetcelllogo.jpg
new file mode 100644
index 0000000..dc936c9
--- /dev/null
+++ b/data/mnet/Common/Java/Images/Jetcelllogo.jpg
Binary files differ
diff --git a/data/mnet/Common/Java/Images/app_icon.GIF b/data/mnet/Common/Java/Images/app_icon.GIF
new file mode 100644
index 0000000..cee2081
--- /dev/null
+++ b/data/mnet/Common/Java/Images/app_icon.GIF
Binary files differ
diff --git a/data/mnet/Common/Java/Images/app_icon2.GIF b/data/mnet/Common/Java/Images/app_icon2.GIF
new file mode 100644
index 0000000..7f57c5b
--- /dev/null
+++ b/data/mnet/Common/Java/Images/app_icon2.GIF
Binary files differ
diff --git a/data/mnet/Common/Java/Images/cisco.JPG b/data/mnet/Common/Java/Images/cisco.JPG
new file mode 100644
index 0000000..a844554
--- /dev/null
+++ b/data/mnet/Common/Java/Images/cisco.JPG
Binary files differ
diff --git a/data/mnet/Common/Java/Images/cisco2.JPG b/data/mnet/Common/Java/Images/cisco2.JPG
new file mode 100644
index 0000000..510359d
--- /dev/null
+++ b/data/mnet/Common/Java/Images/cisco2.JPG
Binary files differ
diff --git a/data/mnet/Common/Java/Images/ciscologo.jpg b/data/mnet/Common/Java/Images/ciscologo.jpg
new file mode 100644
index 0000000..dc936c9
--- /dev/null
+++ b/data/mnet/Common/Java/Images/ciscologo.jpg
Binary files differ
diff --git a/data/mnet/Common/Java/Images/clear.gif b/data/mnet/Common/Java/Images/clear.gif
new file mode 100644
index 0000000..2664824
--- /dev/null
+++ b/data/mnet/Common/Java/Images/clear.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/cowbell.wav b/data/mnet/Common/Java/Images/cowbell.wav
new file mode 100644
index 0000000..425bfdb
--- /dev/null
+++ b/data/mnet/Common/Java/Images/cowbell.wav
Binary files differ
diff --git a/data/mnet/Common/Java/Images/critical.gif b/data/mnet/Common/Java/Images/critical.gif
new file mode 100644
index 0000000..5a5e633
--- /dev/null
+++ b/data/mnet/Common/Java/Images/critical.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/filler.gif b/data/mnet/Common/Java/Images/filler.gif
new file mode 100644
index 0000000..b169fb1
--- /dev/null
+++ b/data/mnet/Common/Java/Images/filler.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/gmc.jpg b/data/mnet/Common/Java/Images/gmc.jpg
new file mode 100644
index 0000000..4ce4188
--- /dev/null
+++ b/data/mnet/Common/Java/Images/gmc.jpg
Binary files differ
diff --git a/data/mnet/Common/Java/Images/grey.gif b/data/mnet/Common/Java/Images/grey.gif
new file mode 100644
index 0000000..62f0955
--- /dev/null
+++ b/data/mnet/Common/Java/Images/grey.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/indeterminate.gif b/data/mnet/Common/Java/Images/indeterminate.gif
new file mode 100644
index 0000000..fa6781d
--- /dev/null
+++ b/data/mnet/Common/Java/Images/indeterminate.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/indeterminate2.gif b/data/mnet/Common/Java/Images/indeterminate2.gif
new file mode 100644
index 0000000..62f0955
--- /dev/null
+++ b/data/mnet/Common/Java/Images/indeterminate2.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/information.gif b/data/mnet/Common/Java/Images/information.gif
new file mode 100644
index 0000000..8b4657e
--- /dev/null
+++ b/data/mnet/Common/Java/Images/information.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/line-01.gif b/data/mnet/Common/Java/Images/line-01.gif
new file mode 100644
index 0000000..691a18d
--- /dev/null
+++ b/data/mnet/Common/Java/Images/line-01.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/line-02.gif b/data/mnet/Common/Java/Images/line-02.gif
new file mode 100644
index 0000000..a40c5a7
--- /dev/null
+++ b/data/mnet/Common/Java/Images/line-02.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/logo.gif b/data/mnet/Common/Java/Images/logo.gif
new file mode 100644
index 0000000..2356666
--- /dev/null
+++ b/data/mnet/Common/Java/Images/logo.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/logo.jpg b/data/mnet/Common/Java/Images/logo.jpg
new file mode 100644
index 0000000..dc936c9
--- /dev/null
+++ b/data/mnet/Common/Java/Images/logo.jpg
Binary files differ
diff --git a/data/mnet/Common/Java/Images/logo1.gif b/data/mnet/Common/Java/Images/logo1.gif
new file mode 100644
index 0000000..2356666
--- /dev/null
+++ b/data/mnet/Common/Java/Images/logo1.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/major.gif b/data/mnet/Common/Java/Images/major.gif
new file mode 100644
index 0000000..97257cd
--- /dev/null
+++ b/data/mnet/Common/Java/Images/major.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/minor.gif b/data/mnet/Common/Java/Images/minor.gif
new file mode 100644
index 0000000..8855fde
--- /dev/null
+++ b/data/mnet/Common/Java/Images/minor.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/minus.gif b/data/mnet/Common/Java/Images/minus.gif
new file mode 100644
index 0000000..5442059
--- /dev/null
+++ b/data/mnet/Common/Java/Images/minus.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/normal.gif b/data/mnet/Common/Java/Images/normal.gif
new file mode 100644
index 0000000..2664824
--- /dev/null
+++ b/data/mnet/Common/Java/Images/normal.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/notify.wav b/data/mnet/Common/Java/Images/notify.wav
new file mode 100644
index 0000000..726bc0d
--- /dev/null
+++ b/data/mnet/Common/Java/Images/notify.wav
Binary files differ
diff --git a/data/mnet/Common/Java/Images/plus.gif b/data/mnet/Common/Java/Images/plus.gif
new file mode 100644
index 0000000..91c5db9
--- /dev/null
+++ b/data/mnet/Common/Java/Images/plus.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/scritical.gif b/data/mnet/Common/Java/Images/scritical.gif
new file mode 100644
index 0000000..5a5e633
--- /dev/null
+++ b/data/mnet/Common/Java/Images/scritical.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/sinformation.gif b/data/mnet/Common/Java/Images/sinformation.gif
new file mode 100644
index 0000000..8b4657e
--- /dev/null
+++ b/data/mnet/Common/Java/Images/sinformation.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/smajor.gif b/data/mnet/Common/Java/Images/smajor.gif
new file mode 100644
index 0000000..97257cd
--- /dev/null
+++ b/data/mnet/Common/Java/Images/smajor.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/sminor.gif b/data/mnet/Common/Java/Images/sminor.gif
new file mode 100644
index 0000000..8855fde
--- /dev/null
+++ b/data/mnet/Common/Java/Images/sminor.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/undrkunstrukson.gif b/data/mnet/Common/Java/Images/undrkunstrukson.gif
new file mode 100644
index 0000000..99e41a3
--- /dev/null
+++ b/data/mnet/Common/Java/Images/undrkunstrukson.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/vipercell.gif b/data/mnet/Common/Java/Images/vipercell.gif
new file mode 100644
index 0000000..129d52a
--- /dev/null
+++ b/data/mnet/Common/Java/Images/vipercell.gif
Binary files differ
diff --git a/data/mnet/Common/Java/Images/wireless.jpg b/data/mnet/Common/Java/Images/wireless.jpg
new file mode 100644
index 0000000..cea2d88
--- /dev/null
+++ b/data/mnet/Common/Java/Images/wireless.jpg
Binary files differ
diff --git a/data/mnet/Common/Java/Images/wireless1.JPG b/data/mnet/Common/Java/Images/wireless1.JPG
new file mode 100644
index 0000000..5f28e19
--- /dev/null
+++ b/data/mnet/Common/Java/Images/wireless1.JPG
Binary files differ
diff --git a/data/mnet/Common/Java/Java/AlarmApplet.java b/data/mnet/Common/Java/Java/AlarmApplet.java
new file mode 100644
index 0000000..9d4e171
--- /dev/null
+++ b/data/mnet/Common/Java/Java/AlarmApplet.java
@@ -0,0 +1,177 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Class : AlarmApplet
+// Desc :
+// Author : George Zhao
+// Hist : 06/17/1999 Initial Creation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+package Java;
+
+import java.applet.Applet;
+import java.awt.*;
+import java.util.Calendar;
+import java.lang.String;
+import javax.swing.*;
+import javax.swing.text.Document;
+import javax.swing.event.*;
+import java.net.UnknownHostException;
+import com.jetcell.MibWM.*;
+
+public class AlarmApplet extends JApplet implements DocumentListener
+{
+ public static String ip = null;
+ JTextField eventField = null;
+ AlarmPanel alarmPanel = null;
+ JFrame f = null;
+ AlarmCommThread commObj;
+ public final static short TCP_SERVER_PORT = 10977;
+
+
+
+ public void init()
+ {
+ Util.applet = this;
+ Util.debug = true;
+ eventField = new JTextField();
+ Document doc = eventField.getDocument();
+ doc.addDocumentListener(this);
+
+ /*
+ setBrokerOptions();
+ Broker.addMagicMarkup("QSEvent", "java.lang.String", false);
+ RlBeanProperty beanProp = Broker.wrapBeanProperty(eventField, "text", java.lang.String.class);
+ Broker.bindMarkupToBeanProperty("QSEvent", "", null, beanProp, true, false, true, null);
+ */
+
+ if(getParameter("TEST") != null)
+ {
+ String event1="1111|123456789|0|123|RRM|0|op1|op2";
+ String event2="1111|4321999|1|123|RRM|1|op1";
+ String event3="1111|3432213|3|123|RRM|2";
+ eventField.setText(event1);
+ eventField.setText(event2);
+ eventField.setText(event3);
+ } else {
+ commObj = new AlarmCommThread(getCodeBase().getHost(), TCP_SERVER_PORT);
+ commObj.startReadThread(eventField);
+ }
+
+ alarmPanel = new AlarmPanel();
+ String newin = getParameter("NEWINDOW");
+ if (f != null)
+ {
+ f.setVisible(true);
+ }
+ else {
+ if (newin != null)
+ {
+ System.out.println("NEWINDOW VALUE = " +newin);
+ if(newin.equals("FALSE") || newin.equals("false"))
+ {
+ getContentPane().setLayout(new BorderLayout());
+ getContentPane().setBackground(Color.white);
+ setBackground(Color.white);
+ getContentPane().add(alarmPanel.createPanel(),BorderLayout.CENTER);
+ }
+ else {
+ f = new JFrame("Alarm List for ViperCell: "+ip);
+ f.getContentPane().setLayout(new BorderLayout());
+ f.getContentPane().add(alarmPanel.createPanel());
+ f.setBounds(0,0, 720,400);
+ f.setVisible(true);
+ }
+ }
+ else {
+ System.out.println("Please set NEWINDOW parameter to TRUE or FALSE");
+ }
+ }
+
+ try
+ {
+ getRootPane().putClientProperty("defeatSystemEventQueueCheck", Boolean.TRUE);
+ UIManager.setLookAndFeel( "com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
+ SwingUtilities.updateComponentTreeUI(this);
+ }
+ catch(Exception ex)
+ {
+ //Util.showDialog(f, ex.toString(), "Error", JOptionPane.ERROR_MESSAGE);
+ }
+ }
+
+ public void start()
+ {
+ }
+
+ public void stop()
+ {
+ }
+
+ public void destroy()
+ {
+ commObj.finishReadThread();
+ System.out.println("Destroy method has been called");
+ }
+
+ public void changedUpdate(DocumentEvent e)
+ {
+ }
+
+ public void insertUpdate(DocumentEvent e)
+ {
+ /*
+ System.out.println("insertUpdate");
+ java.util.Random r = new java.util.Random();
+ Calendar d = Calendar.getInstance();
+ */
+ String alarmId = eventField.getText();
+ System.out.println("Receiving Alarm: "+alarmId);
+
+ // for test only. -gz
+ /*
+ int eventId = Integer.parseInt(alarmId.substring(alarmId.indexOf('r')+2, alarmId.length()));
+
+ String severity = null;
+
+ try {
+ d.add(Calendar.SECOND, java.lang.Math.abs(r.nextInt()));
+ if (eventId-eventId/3*3 == 0)
+ severity = new String("Critical");
+ else if (eventId-eventId/3*3 == 1)
+ severity = new String("Minor");
+ else if (eventId - eventId/3*3 == 2)
+ severity = new String("Info");
+ String date = d.getTime().toString();
+ String object = "Object_"+String.valueOf(java.lang.Math.abs(r.nextInt()));
+ String message = eventField.getText();
+
+ //AlarmData alarm = new AlarmData(String.valueOf(eventId), date, severity, null, object, message, null);
+
+ AlarmData alarm = new AlarmData(alarmId);
+ alarmPanel.addEvent(alarm);
+ Thread.sleep(1000);
+ System.out.println("Event: " +alarmId);
+ }
+ catch(Exception ex)
+ {
+ System.out.println(ex);
+ ex.printStackTrace();
+ }
+ */
+
+ if(!alarmId.startsWith("Event Number"))
+ {
+ try {
+ AlarmData alarm = new AlarmData(alarmId);
+ alarmPanel.addEvent(alarm);
+ }
+ catch(Exception ex) {}
+ }
+ }
+
+ public void removeUpdate(DocumentEvent e)
+ {
+ }
+}
+//$History:$ \ No newline at end of file
diff --git a/data/mnet/Common/Java/Java/AlarmCommThread.java b/data/mnet/Common/Java/Java/AlarmCommThread.java
new file mode 100644
index 0000000..cd9721b
--- /dev/null
+++ b/data/mnet/Common/Java/Java/AlarmCommThread.java
@@ -0,0 +1,121 @@
+////////////////////////////////////////////////////////////////////////////
+//
+// FILE NAME: AlarmCommThread.java
+//
+// DESCRIPTION: This file contains a class that allow the applet to
+// communicate with the Tcp Server at the ViperCell
+// COMPONENTS:
+//
+//
+// NOTES:
+//
+// (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+//
+// REVISION HISTORY
+//__________________________________________________________________
+//----------+--------+----------------------------------------------
+// Name | Date | Reason
+//----------+--------+----------------------------------------------
+// Bhawani |2/08/00 | Initial Draft
+//----------+--------+----------------------------------------------
+//////////////////////////////////////////////////////////////////////////
+//
+
+package Java;
+
+import java.net.*;
+import java.io.*;
+import javax.swing.*;
+import javax.swing.*;
+import javax.swing.text.Document;
+import javax.swing.event.*;
+
+
+
+public class AlarmCommThread extends Thread {
+ private Socket socket;
+ private BufferedReader in;
+ private PrintWriter out;
+ private JTextField p_eventField;
+ private boolean running;
+
+ public AlarmCommThread(String addr, short port) {
+ System.out.println("Initializing TCP/Ip socket environment");
+ try {
+ socket = new Socket(addr, port);
+ } catch(IOException e) {
+ // If the creation of the socket fails,
+ // nothing needs to be cleaned up.
+ System.out.println("Could not connect to the Server" + addr + "at port " + port + ": " + socket);
+ }
+ try {
+ in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
+ // Enable auto-flush:
+ out = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));
+ // register client's message group
+ out.print("AlarmAsyncUpdate");
+ out.flush();
+
+ // digest the hello message
+ String str = in.readLine();
+ System.out.println("Server's Greeting: " + str);
+ } catch(IOException e) {
+ // The socket should be closed on any
+ // failures other than the socket
+ // constructor:
+ System.out.println("IO error in AlarmCommThread: ");
+ try {
+ socket.close();
+ } catch(IOException e2) {}
+ }
+ // Otherwise the socket will be closed by
+ // the run() method of the thread.
+ }
+
+ public void send(String str)
+ {
+ out.print(str);
+ out.flush();
+ }
+
+ public void startReadThread(JTextField eventField)
+ {
+
+ p_eventField = eventField;
+ start();
+ }
+ public void run() {
+ try {
+ running = true;
+ while (running) {
+ if(in.ready())
+ {
+ String str = in.readLine();
+ this.p_eventField.setText(str);
+ } else {
+ try {
+ this.sleep(100);
+ } catch (InterruptedException ie) {
+ System.out.println(" Interrupted Excution = " + ie);
+ }
+ }
+ }
+ } catch(IOException e3) {
+ System.out.println(" IO expection at read thread" + e3 );
+ } finally {
+ // Always close it:
+ try {
+ System.out.println("Socket is closing");
+ socket.close();
+ } catch(IOException e) {}
+ // Ending this thread
+ }
+ }
+
+ public void finishReadThread()
+ {
+ System.out.println("The read thread is being shutdown");
+ running = false;
+ }
+}
+
diff --git a/data/mnet/Common/Java/Java/ConfigApplet.java b/data/mnet/Common/Java/Java/ConfigApplet.java
new file mode 100644
index 0000000..2b82c7e
--- /dev/null
+++ b/data/mnet/Common/Java/Java/ConfigApplet.java
@@ -0,0 +1,53 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Class : ConfigApplet
+// Desc :
+// Author : George Zhao
+// Hist : 08/25/1999 Initial Creation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+package Java;
+
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.table.*;
+import javax.swing.event.*;
+import java.util.Hashtable;
+import java.awt.*;
+import com.jetcell.MibWM.*;
+import com.jetcell.MibWM.ViperBase.*;
+
+public class ConfigApplet extends JApplet
+{
+
+ public void init()
+ {
+ try {
+ String host = getParameter("HOST");
+ int port = Integer.parseInt(getParameter("PORT"));
+ Configuration base = new Configuration(host, port);
+ getContentPane().setLayout(new BorderLayout());
+ getContentPane().setBackground(Color.white);
+ setBackground(Color.white);
+ getContentPane().add(base.mainPanel,BorderLayout.CENTER);
+ }
+ catch(Exception e)
+ {
+ System.out.println("Exception : "+ e.toString());
+ }
+ }
+
+ public void start()
+ {
+ }
+
+ public void stop()
+ {
+ }
+
+ public void destroy()
+ {
+ }
+}
+//$History:$ \ No newline at end of file
diff --git a/data/mnet/Common/Java/Java/ConfigAppletBeanInfo.java b/data/mnet/Common/Java/Java/ConfigAppletBeanInfo.java
new file mode 100644
index 0000000..dc23ed8
--- /dev/null
+++ b/data/mnet/Common/Java/Java/ConfigAppletBeanInfo.java
@@ -0,0 +1,70 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// Class : ConfigAppletBeanInfo
+// Desc :
+// Author : George Zhao
+// Hist : 08/27/1999 Initial Creation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+package Java;
+
+import java.beans.*;
+import java.beans.SimpleBeanInfo;
+
+public class ConfigAppletBeanInfo extends java.beans.SimpleBeanInfo
+{
+ public ConfigAppletBeanInfo()
+ {
+ }
+
+ /**
+ * Gets a BeanInfo for the superclass of this bean.
+ * @return BeanInfo[] containing this bean's superclass BeanInfo
+ */
+ public BeanInfo[] getAdditionalBeanInfo()
+ {
+ try
+ {
+ BeanInfo[] bi = new BeanInfo[1];
+ bi[0] = Introspector.getBeanInfo(beanClass.getSuperclass());
+ return bi;
+ }
+ catch (IntrospectionException e)
+ {
+ throw new Error(e.toString());
+ }
+ }
+
+ /**
+ * Gets the BeanDescriptor for this bean.
+ * @return an object of type BeanDescriptor
+ * @see java.beans.BeanDescriptor
+ */
+ public BeanDescriptor getBeanDescriptor()
+ {
+ BeanDescriptor bd = new BeanDescriptor(beanClass);
+ return bd;
+ }
+
+ /**
+ * Gets an image that may be used to visually represent this bean
+ * (in the toolbar, on a form, etc).
+ * @param iconKind the type of icon desired, one of: BeanInfo.ICON_MONO_16x16,
+ * BeanInfo.ICON_COLOR_16x16, BeanInfo.ICON_MONO_32x32, or BeanInfo.ICON_COLOR_32x32.
+ * @return an image for this bean
+ * @see BeanInfo#ICON_MONO_16x16
+ * @see BeanInfo#ICON_COLOR_16x16
+ * @see BeanInfo#ICON_MONO_32x32
+ * @see BeanInfo#ICON_COLOR_32x32
+ */
+ public java.awt.Image getIcon(int nIconKind)
+ {
+ java.awt.Image img = null;
+ return img;
+ }
+
+ private final Class beanClass = ConfigApplet.class;
+}
+
+//$History:$ \ No newline at end of file
diff --git a/data/mnet/Common/Java/Java/Makefile b/data/mnet/Common/Java/Java/Makefile
new file mode 100644
index 0000000..b1ea6c2
--- /dev/null
+++ b/data/mnet/Common/Java/Java/Makefile
@@ -0,0 +1,69 @@
+####################################################################
+#
+# FILE NAME: Makefile
+#
+# DESCRIPTION: This makefile creates the common class files and the
+# common jar file.
+#
+# COMPONENTS:
+#
+#
+# NOTES:
+#
+# (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+#
+# REVISION HISTORY
+#__________________________________________________________________
+#----------+--------+----------------------------------------------
+# Name | Date | Reason
+#----------+--------+----------------------------------------------
+# Bhawani |11/28/99| Initial Draft
+# Kevin Lim|03/28/00| add AlarmStatus.jar
+#----------+--------+----------------------------------------------
+####################################################################
+#/
+
+CODEBASE = ..
+include $(CODEBASE)/java.mk
+
+MIBWMPATH = $(CODEBASE)/com/jetcell/MibWM
+VIPERCELL = $(MIBWMPATH)
+VIPERBASE = $(MIBWMPATH)/ViperBase
+ALARMPATH = $(CODEBASE)/AlarmApplet
+
+MIBWM = ./MibWM.jar
+ALARMARCH = ./AlarmStatus.jar
+
+
+VIPERCELL_JAVA = $(wildcard $(VIPERCELL)/*.java)
+VIPERCELL_CLASS = $(subst /,/, $(VIPERCELL_JAVA:.java=.class))
+
+VIPERBASE_JAVA = GudbData.java EncodeMessage.java \
+ Configuration.java RoamingNumberTable.java
+
+VIPERBASE_TMP = $(VIPERBASE_JAVA:.java=.class)
+VIPERBASE_CLASS = $(foreach file, $(VIPERBASE_TMP), $(VIPERBASE)/$(file))
+
+all: $(MIBWM) $(CLASS_LIST) $(ALARMARCH)
+
+
+$(MIBWM): $(VIPERCELL_CLASS) $(VIPERBASE_CLASS)
+ @$(RM) $@
+ $(MAKE) -C $(CODEBASE) mibwm
+
+$(ALARMARCH): $(ALARMPATH)/*.class
+ @$(RM) $@
+ $(MAKE) -C $(CODEBASE) alarm
+
+viperCell:
+ $(MAKE) -C $(VIPERCELL) all
+
+viperBase:
+ $(MAKE) -C $(VIPERBASE) all
+
+cleanall:
+ -$(RM) $(subst /,\, $(VIPERBASE)/*.class)
+ -$(RM) $(subst /,\, $(MIBWM) $(CLASS_LIST))
+
+
+
diff --git a/data/mnet/Common/Java/Java/SubscriberApplet.java b/data/mnet/Common/Java/Java/SubscriberApplet.java
new file mode 100644
index 0000000..8f7aedc
--- /dev/null
+++ b/data/mnet/Common/Java/Java/SubscriberApplet.java
@@ -0,0 +1,58 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Class : SubscriberApplet
+// Desc :
+// Author : George Zhao
+// Hist : 08/25/1999 Initial Creation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+package Java;
+
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.table.*;
+import javax.swing.event.*;
+import java.util.Hashtable;
+import java.awt.*;
+import com.jetcell.MibWM.*;
+import com.jetcell.MibWM.ViperBase.*;
+
+
+public class SubscriberApplet extends JApplet
+{
+
+
+ public void init()
+ {
+ try {
+ String host = getParameter("HOST");
+ int port = Integer.parseInt(getParameter("PORT"));
+ //test. -begin
+ Subscriber sub = new Subscriber(host, port);
+ //Subscriber sub = new Subscriber();
+ // test. -end.
+ getContentPane().setLayout(new BorderLayout());
+ getContentPane().setBackground(Color.white);
+ setBackground(Color.white);
+ getContentPane().add(((Subscriber)sub).mainPanel ,BorderLayout.CENTER);
+ }
+ catch(Exception e)
+ {
+ System.out.println("Exception : " +e.toString());
+ }
+ }
+
+ public void start()
+ {
+ }
+
+ public void stop()
+ {
+ }
+
+ public void destroy()
+ {
+ }
+}
+//$History:$ \ No newline at end of file
diff --git a/data/mnet/Common/Java/Java/SubscriberAppletBeanInfo.java b/data/mnet/Common/Java/Java/SubscriberAppletBeanInfo.java
new file mode 100644
index 0000000..0386ffb
--- /dev/null
+++ b/data/mnet/Common/Java/Java/SubscriberAppletBeanInfo.java
@@ -0,0 +1,69 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// Class : SubscriberAppletBeanInfo
+// Desc :
+// Author : George Zhao
+// Hist : 08/27/1999 Initial Creation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+package Java;
+
+import java.beans.*;
+import java.beans.SimpleBeanInfo;
+
+public class SubscriberAppletBeanInfo extends java.beans.SimpleBeanInfo
+{
+ public SubscriberAppletBeanInfo()
+ {
+ }
+
+ /**
+ * Gets a BeanInfo for the superclass of this bean.
+ * @return BeanInfo[] containing this bean's superclass BeanInfo
+ */
+ public BeanInfo[] getAdditionalBeanInfo()
+ {
+ try
+ {
+ BeanInfo[] bi = new BeanInfo[1];
+ bi[0] = Introspector.getBeanInfo(beanClass.getSuperclass());
+ return bi;
+ }
+ catch (IntrospectionException e)
+ {
+ throw new Error(e.toString());
+ }
+ }
+
+ /**
+ * Gets the BeanDescriptor for this bean.
+ * @return an object of type BeanDescriptor
+ * @see java.beans.BeanDescriptor
+ */
+ public BeanDescriptor getBeanDescriptor()
+ {
+ BeanDescriptor bd = new BeanDescriptor(beanClass);
+ return bd;
+ }
+
+ /**
+ * Gets an image that may be used to visually represent this bean
+ * (in the toolbar, on a form, etc).
+ * @param iconKind the type of icon desired, one of: BeanInfo.ICON_MONO_16x16,
+ * BeanInfo.ICON_COLOR_16x16, BeanInfo.ICON_MONO_32x32, or BeanInfo.ICON_COLOR_32x32.
+ * @return an image for this bean
+ * @see BeanInfo#ICON_MONO_16x16
+ * @see BeanInfo#ICON_COLOR_16x16
+ * @see BeanInfo#ICON_MONO_32x32
+ * @see BeanInfo#ICON_COLOR_32x32
+ */
+ public java.awt.Image getIcon(int nIconKind)
+ {
+ java.awt.Image img = null;
+ return img;
+ }
+
+ private final Class beanClass = SubscriberApplet.class;
+}
+//$History:$ \ No newline at end of file
diff --git a/data/mnet/Common/Java/Makefile b/data/mnet/Common/Java/Makefile
new file mode 100644
index 0000000..2e8b2bb
--- /dev/null
+++ b/data/mnet/Common/Java/Makefile
@@ -0,0 +1,58 @@
+####################################################################
+#
+# FILE NAME: Makefile
+#
+# DESCRIPTION: This is root make file that genetates java classes
+# and jar file.
+#
+# COMPONENTS:
+#
+#
+# NOTES:
+#
+# (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+#
+# REVISION HISTORY
+#__________________________________________________________________
+#----------+--------+----------------------------------------------
+# Name | Date | Reason
+#----------+--------+----------------------------------------------
+# Bhawani |11/28/99| Iniitial Draft
+# Kevin Lim|03/28/00| added AlarmStatusApplet
+#----------+--------+----------------------------------------------
+####################################################################
+
+CODEBASE = .
+include $(CODEBASE)/java.mk
+VIPERCELL = $(MIBWMPATH)
+VIPERBASE = $(MIBWMPATH)/ViperBase
+PACKPATH = $(ALARMAPPLETDIR)\com\jetcell\MibWM
+
+MIBWM = ./Java/MibWM.jar
+ALARMARCH = ./Java/AlarmStatus.jar
+
+all:
+ $(CP) $(MIBWMPATH)\*.java $(PACKPATH)
+
+ $(MAKE) -C $(ALARMAPPLETDIR) all
+
+alarm: $(ALARMARCH)
+
+$(ALARMARCH):
+ $(CP) AlarmApplet\AlarmStatus.jar Java\AlarmStatus.jar
+
+# mibwm: $(MIBWM)
+
+$(MIBWM): ./Java/AlarmCommThread.class
+# $(JAR) cvf $@ $(VIPERCELL)/*.class $(VIPERBASE)/*.class ./Java/AlarmCommThread.class
+ $(JAR) cvf $@ $(VIPERCELL)/*.class ./Java/AlarmCommThread.class
+
+
+cleanall:
+ $(MAKE) -C $(ALARMAPPLETDIR) cleanall
+ $(MAKE) -C $(PACKPATH) cleanall
+ $(MAKE) -C $(COMMON) cleanall
+
+
+
+
diff --git a/data/mnet/Common/Java/Text/AlarmCode.English b/data/mnet/Common/Java/Text/AlarmCode.English
new file mode 100644
index 0000000..8f79150
--- /dev/null
+++ b/data/mnet/Common/Java/Text/AlarmCode.English
@@ -0,0 +1,154 @@
+// AlarmCode.English
+// Copyright (C) 2000 Cisco Systems, Inc.
+// All rights reserved
+// WARNING: This file is automatically generated by an AlarmCode tool
+// Any changes made to this file will be overwritten by
+// subsequent uses of the tool.
+//
+// ALARM_ERROR_CODE | "ALARM_SYNOPSIS" | "ALARM_DETAIL_MESSAGE"
+ 0 | Module alarm with ID %2 has cleared | The alarm ID %2 (error code %1) was cleared by module %module. The operational state of GSM Port depends on alarm status from all modules.
+ 131074 | First DSP/FPGA Hardware Failure | Bit clock at the first DSP/Fpga is not functioning. GSM Port must be rebooted to recover from this situation.
+ 131075 | Second DSP/FPGA Hardware Failure | Bit clock at the second DSP/Fpga is not functioning. GSM Port must be rebooted to recover from this situation.
+ 131076 | First DSP not responding | Link between RM and first DSP is broken. GSM Port must be rebooted to recover from this situation.
+ 131077 | Second DSP not responding | Link between RM and second DSP is broken. GSM Port can function in a reduced-Capacity mode if the first DSP can function properly. GSM Port must be rebooted to recover from this situation.
+ 131078 | Cell Broadcast Channel unusable | Cell broadcast channel initialization failed. Cell broadcast will not be supported until the next reboot. This channel, however, does not affect the operational state of the GSM Port.
+ 131079 | No usable traffic channel | Initialization of all the traffic channels failed. Please unlock them if they are locked. If the their admin state is already unlocked, please reboot the system.
+ 131080 | No TRX enabled | Initialization of both TRX failed. Please unlock them if they are locked. If the their admin state is already unlocked, please reboot the system.
+ 131081 | Illegal Configuration - No BCCH Channel | No BCCH channel combination is specified in the MIB. Please check the first TRX configuration through GP Manager.
+ 131082 | Illegal Configuration - Unsupported Channel | Unsupported channel combination is detected in the MIB. Please check both first and second TRX configuration through GP Manager
+ 131083 | Illegal Configuration - Two BCCH Channel | Only one BCCH channel is supported at this time but two BCCH channel configuration found. Please correct this problem through GP Manager.
+ 131084 | Illegal Configuration - Too many Channel Combination I | Too many channel combination I configuration found. Please correct this problem through GP Manager.
+ 131085 | Illegal Configuration - Multiple BCCH Channels | Only one BCCH channel is supported at this time but more than two BCCH channels have been configured. Please correct this problem through GP Manager.
+ 131086 | System Call Failure - Watchdog timer create | RM module detects failure in creating WatchDog Timer which is essential for proper software operation. GSM Port must be rebooted to recover from this situation.
+ 131087 | System Call Failure - Message queue receive | RM module encountered failure in receiving message. GSM Port must be rebooted to recover from this situation.
+ 131088 | OAM Api Failure | Could not set a field of a MIB table entry.
+ 131089 | Oam Api Failure | Could not set a MIB integer variable.
+ 131090 | RF board not detected | Failed to detect RF board. Please check if it is there.
+ 135169 | GSM Port Locked | The GSM Port was locked successfully. Existing calls (if any) were aborted. No new calls can be made through GSM Port.
+ 135170 | GSM Port Unlocked | The GSM Port was unlocked successfully. GSM Port can accept new calls if its operational state is enabled.
+ 135171 | GSM Port Shutting Down | The GSM Port is being shutdown. No new calls can be made through GSM Port. Existing calls are maintained until terminates normally.
+ 135172 | First TRX Locked | The first TRX was locked successfully. Locking of first TRX is equivalent of locking of GSM Port. Existing calls (if any) were aborted. No new calls can be made through GSM Port.
+ 135173 | Second TRX Locked | The second TRX was locked successfully. Existing calls (if any) were aborted. No new calls will be made through this TRX.
+ 135174 | First TRX Unlocked | The first TRX was unlocked successfully. New calls can be made through this TRX.
+ 135175 | Second TRX Unlocked | The second TRX was unlocked successfully. New calls can be made through this TRX.
+ 135176 | First TRX shutting down | The first TRX is being shutting down. Shutting down first TRX is equivalent of shutting down GSM Port. No new calls can be made through GSM Port. Existing calls are maintained until terminates normally.
+ 135177 | Second TRX shutting down | The second TRX is being shutting down. No new calls can be made through this TRX. Existing calls are maintained until terminates normally.
+ 135178 | First TRX Time Slot 0 locked | Locking of Time Slot 0 of first TRX is equivalent of locking GSM Port. Existing calls (if any) were aborted. No new calls can be made through GSM Port.
+ 135179 | First TRX Time Slot 1 locked | Time slot 1 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135180 | First TRX Time Slot 2 locked | Time slot 2 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135181 | First TRX Time Slot 3 locked | Time slot 3 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135182 | First TRX Time Slot 4 locked | Time slot 4 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135183 | First TRX Time Slot 5 locked | Time slot 5 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135184 | First TRX Time Slot 6 locked | Time slot 6 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135185 | First TRX Time Slot 7 locked | Time slot 7 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135186 | Second TRX Time Slot 0 locked | Time slot 0 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135187 | Second TRX Time Slot 1 locked | Time slot 1 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135188 | Second TRX Time Slot 2 locked | Time slot 2 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135189 | Second TRX Time Slot 3 locked | Time slot 3 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135190 | Second TRX Time Slot 4 locked | Time slot 4 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135191 | Second TRX Time Slot 5 locked | Time slot 5 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135192 | Second TRX Time Slot 6 locked | Time slot 6 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135193 | Second TRX Time Slot 7 locked | Time slot 7 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135194 | First TRX Time Slot 0 Unlocked | Time slot 0 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135195 | First TRX Time Slot 1 Unlocked | Time slot 1 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135196 | First TRX Time Slot 2 Unlocked | Time slot 2 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135197 | First TRX Time Slot 3 Unlocked | Time slot 3 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135198 | First TRX Time Slot 4 Unlocked | Time slot 4 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135199 | First TRX Time Slot 5 Unlocked | Time slot 5 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135200 | First TRX Time Slot 6 Unlocked | Time slot 6 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135201 | First TRX Time Slot 7 Unlocked | Time slot 7 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135202 | Second TRX Time Slot 0 Unlocked | Time slot 0 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135203 | Second TRX Time Slot 1 Unlocked | Time slot 1 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135204 | Second TRX Time Slot 2 Unlocked | Time slot 2 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135205 | Second TRX Time Slot 3 Unlocked | Time slot 3 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135206 | Second TRX Time Slot 4 Unlocked | Time slot 4 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135207 | Second TRX Time Slot 5 Unlocked | Time slot 5 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135208 | Second TRX Time Slot 6 Unlocked | Time slot 6 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135209 | Second TRX Time Slot 7 Unlocked | Time slot 7 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135210 | First TRX Time Slot 0 shutting down | Time slot 0 of the first TRX is being shutdown. Shutting down Time Slot 0 of First TRX is equivalent of shutting down GSM Port. Existing calls will be maintained until terminate normally. No new calls can be made through GSM Port.
+ 135211 | First TRX Time Slot 1 shutting down | Time slot 1 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135212 | First TRX Time Slot 2 shutting down | Time slot 2 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135213 | First TRX Time Slot 3 shutting down | Time slot 3 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135214 | First TRX Time Slot 4 shutting down | Time slot 4 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135215 | First TRX Time Slot 5 shutting down | Time slot 5 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135216 | First TRX Time Slot 6 shutting down | Time slot 6 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135217 | First TRX Time Slot 7 shutting down | Time slot 7 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135218 | Second TRX Time Slot 0 shutting down | Time slot 0 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135219 | Second TRX Time Slot 1 shutting down | Time slot 1 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135220 | Second TRX Time Slot 2 shutting down | Time slot 2 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135221 | Second TRX Time Slot 3 shutting down | Time slot 3 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135222 | Second TRX Time Slot 4 shutting down | Time slot 4 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135223 | Second TRX Time Slot 5 shutting down | Time slot 5 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135224 | Second TRX Time Slot 6 shutting down | Time slot 6 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135225 | Second TRX Time Slot 7 shutting down | Time slot 7 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135226 | Radio for the first TRX is off | Radio for the first TRX is off
+ 135227 | Radio for the second TRX is off | Radio for the second TRX is off
+ 135228 | RM detects corrupted Layer 1 message | RM module detected a corrupted message from Layer 1.
+ 327681 | LAPDm Internal Failure | Data corruption in the LAPDm Layer software. The system needs a reboot
+ 327936 | LAPDm Resource Exhausted | LAPDm Layer ran out of available frame buffer. This is most likely caused by radio link problem with MS.
+ 462848 | (Re)Load MIB | New MIB have been loaded on %1. You most likely need to reboot the GSM Port
+ 462850 | MIB save option Change - Timer enabled | MIB save timer has been disabled on %1.
+ 462849 | MIB save option Change - Timer disabled | MIB save timer has been disabled on %1.
+ 462851 | MIB Option Change - Duplicate save allowed | MIB save option change on %1.
+ 462852 | MIB option change - Duplicate save not allowed | Duplicate saving of the MIB is now disabled. This will improve the response time of the set operation at GP Manager
+ 458753 | GSM Port Operator-Initiated Reboot | The operator has initiated a reboot on %1. GSM Port will reboot within a few seconds.
+ 524289 | GMC Link Down | Detected link lost to GMC. Please check the operational status of GMC and the physical network connectivity between GMC and GSM Port.
+ 917505 | MPC SRAM test failure | MCH Module's Test results indicates that there was a failure in MPC SRAM Test.
+ 917506 | DSP0 internal data RAM test failure | MCH Module's Post Test results indicates that there was a failure in DSP0's internal data RAM Test.
+ 917507 | DSP1 internal data RAM test failure | MCH Module's Post Test results indicates that there was a failure in DSP1's internal data RAM Test.
+ 917508 | DSP0 internal program RAM test failure | MCH Module's Post Test results indicates that there was a failure in DSP0's internal program RAM Test.
+ 917509 | DSP1 internal program RAM test failure | MCH Module's Post Test results indicates that there was a failure in DSP1's internal program RAM Test.
+ 917510 | DSP0 external RAM test failure | MCH Module's Post Test results indicates that there was a failure in DSP0's external RAM Test.
+ 917511 | DSP1 external RAM test failure | MCH Module's Post Test results indicates that there was a failure in DSP1's external RAM Test.
+ 917512 | FPGA0 test failure | MCH Module's Post Test results indicates that there was a failure in FPGA0 Test.
+ 917513 | FPGA1 test failure | MCH Module's Post Test results indicates that there was a failure in FPGA1 Test.
+ 917514 | I2C test failure | MCH Module's Post Test results indicates that there was a failure in I2C Test.
+ 917515 | ViperTask startup delay detected | One or more ViperTask has a delay on startup, reporting readiness late.
+ 917516 | SysCommand_xxx symbol not found | One or more module's SysCommand_xxx() function symbol is not found. Check module loading logs.
+ 917517 | Critical Task suspension detected | Critical Task suspension from ModuleId %1 detected.
+ 917518 | Critical exit abnormally detected | Critical Task abnormally exited from ModuleID %1 detected.
+ 917519 | LoadModule failure | Loading module object codes had problems. Check startup logs.
+ 917761 | Non-Critical Task suspension detected | Non-Critical Task suspension from ModuleId %1 detected.
+ 917762 | Non-Critical exit abnormally detected | Non-Critical Task abnormally exited from ModuleID %1 detected.
+ 16711681 | Module booting up | Module %module is booting up now
+ 16711682 | Module shutting down | Module %module is shutting down now
+ 16711683 | Out of Internal Memory Error | The GSM Port ran out of memory. Module %module did not complete its intended operation. GSM Port must be rebooted to recover from this situation.
+ 16711684 | System Internal Error | GSM Port software system encountered an unexpected error, which resulted in data corruption. GSM Port must be rebooted to recover from this situation.
+ 16711685 | Reboot Started | The GSM Port is rebooting now.
+ 17039362 | GMC Link Down | Could not get a list of active GP10s from GMC. The link is down. Please verify if the GMC is up and running at the localhost
+ 17039617 | CBC Index File Read Failure | Either CBC index file is missing or it is not readable.
+ 17039618 | CBC Message File Read Failure | CBC message file could not be completely read and decoded. Some of the previously scheduled messages may have been lost.
+ 17236226 | ITP link is down | Verify: 1) network connection to ITP; 2) whether ITP is running
+ 17236227 | Roaming number not available | Add more roaming numbers
+ 17236229 | Can't save config file | Check available space on hard drive
+ 17236230 | Can't open config file | jcvbase.dat is missing or damaged. Note: created after first configuration changes
+ 17236228 | Duplicated GP CellID | Two GPs with the same CellID. Change CellID on GP. Check the error logs for details.
+ 17235970 | Internal failure to initialize | GMC can't initialize. Try power off reboot first. See error log for more details
+ 17236231 | GP Disconnected | Check GP status and network connection
+ 17236232 | Can't open translations data file for reading | Check if vnxlndb.dat is missing or has wrong permissions. vnxlndb.dat file is not needed if no previous translations data exists. It will be created after the first changes.
+ 17236233 | Error during translations data file read | vnxlndb.dat may be corrupted. Try to import a known good ASCII translations data file, if available, through the Translations Manager.
+ 17236234 | Can't open translations data file for writing | Check if vnxlndb.dat has wrong permissions. If not, try rebooting the GMC.
+ 17236235 | Can't save translations data file changes | Check available space on the hard drive. Try to export current data to an ASCII translations data file from the Translations Manager for backup. Try rebooting GMC if this failure is repeated. Try importing the backed up ASCII file after GMC reboot.
+ 17235971 | Can't get OS resources for Translations | Try rebooting the GMC.
+ 17236236 | IN link down | Check that the IN server and connectivity are Ok
+ 17236237 | No Heartbeat on IN link | Check that the IN server is OK
+ 17367042 | Tones&Announcements Application failed to initialize | Validate the configuration information for the Tones & Announcements.
+ 17367298 | Announcements configuration problem for Tones&Announcements. | (Either) no announcements are configured (or) Configuration data is incorrect. Ensure the name & presence of announcement files in the right directory(/sd0/gmc/IVR)
+ 17432578 | CDR Server failed to start off. | Ensure that SNMP daemon is running and initialized
+ 17432834 | CCS did not recognize CDR Server name. | Add this CDR/MNET name to CCS config file(cdr2.conf) and restart CCS.
+ 17432835 | The communication between CDR Server and CCS is lost. | Ensure that CCS is running.
+ 17436674 | File Tranmission problem between CDR Server and CCS.Retramsmitting file. | No correction mechanism required.
+ 17301506 | APM Server failed to start off. | Ensure that SNMP daemon is running and initialized
+ 17301762 | APM Server name not recognized by CAPS. | Add this APM/MNET name to CAPS through the CAM.
+ 17498113 | ViperTask startup delay detected | One or more ViperTask has a delay on startup, reporting readiness late.
+ 17498114 | SysCommand_xxx symbol not found | One or more module's SysCommand_xxx() function symbol is not found. Check module loading logs.
+ 17498115 | Critical Task suspension detected | Critical Task suspension from ModuleId %1 detected.
+ 17498116 | Critical exit abnormally detected | Critical Task abnormally exited from ModuleID %1 detected.
+ 17498117 | LoadModule failure | Loading module object codes had problems. Check startup logs.
+ 17498369 | Non-Critical Task suspension detected | Non-Critical Task suspension from ModuleId %1 detected.
+ 17498370 | Non-Critical exit abnormally detected | Non-Critical Task abnormally exited from ModuleID %1 detected.
+ 33488897 | Module booting up | Module %module is booting up now
+ 33488898 | Module shutting down | Module %module is shutting down now
+ 33488899 | Out of Internal Memory Error | The GSM Port ran out of memory. Module %module did not complete its intended operation. GSM Port must be rebooted to recover from this situation.
+ 33488900 | System Internal Error | GSM Port software system encountered an unexpected error, which resulted in data corruption. GSM Port must be rebooted to recover from this situation.
+ 33488901 | Reboot Started | The GSM Port is rebooting now. \ No newline at end of file
diff --git a/data/mnet/Common/Java/com/jetcell/MibWM/AlarmData.java b/data/mnet/Common/Java/com/jetcell/MibWM/AlarmData.java
new file mode 100644
index 0000000..403a8bb
--- /dev/null
+++ b/data/mnet/Common/Java/com/jetcell/MibWM/AlarmData.java
@@ -0,0 +1,216 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Class : AlarmData
+// Desc :
+// Author : George Zhao
+// Hist : 06/17/1999 Initial Creation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+package com.jetcell.MibWM;
+
+import javax.swing.*;
+import javax.swing.table.*;
+import java.awt.event.*;
+import java.text.*;
+import java.awt.*;
+import java.util.*;
+public class AlarmData
+{
+ static int AlarmIndex = 0;
+
+ String alarmId;
+ String timestamp;
+ String severity;
+ String objectId;
+ String object;
+ String errorNo;
+ String subject;
+ String message;
+ Integer alarmIndex;
+ String optional1;
+ String optional2;
+ String acknowledge;
+ String recordNumber;
+ String srcIp;
+ static int NUM_REQUIRED_FIELDS = 8;
+ static int NUM_OPTIONAL_FIELDS = 3;
+ static int OP1 = 6;
+ static int OP2 = 7;
+ static int SRCIP = 8;
+ static int ACK = 9;
+ static int REC_NUM = 10;
+ static final String OP1Field = "%1";
+ static final String OP2Field = "%2";
+ static final String OPModule = "%module";
+ static String[] AlarmSeverity = { "Critical",
+ "Major",
+ "Minor",
+ "Information"
+ };
+
+ public static SimpleDateFormat formatter = new SimpleDateFormat( "yyyy/MM/dd HH:mm:ss z" );
+
+ public static SimpleDateFormat myFormatter = new SimpleDateFormat("dd.MM.yyyy/HH:mm:ss");
+
+ static final char dilim = '|';
+
+ public AlarmData( String alarmId, String timestamp, String severity,
+ String objectId, String object, String subject, String message)
+ {
+ this.alarmId = alarmId;
+ this.timestamp = timestamp;
+ this.severity = severity;
+ this.objectId = objectId;
+ this.object = object;
+ this.subject = subject;
+ this.message = message;
+ }
+
+ public AlarmData(String event) throws Exception
+ {
+ // event are in the format of:
+ // eventId|timestamp|severity|objectid|object name|event no |optional 1 |optional 2 | optional 3
+ String[] values = new String[NUM_REQUIRED_FIELDS+NUM_OPTIONAL_FIELDS];
+
+
+ int index = 0;
+ int pos = 0;
+ int i = 0;
+ boolean end = false;
+ while(!end)
+ {
+ index = event.indexOf(dilim, pos);
+ if (index == -1)
+ {
+ index = event.length();
+ end = true;
+ continue;
+ }
+ values[i++] = event.substring(pos,index);
+ pos = index+1;
+ }
+
+ try {
+ alarmId = values[0].trim();
+
+ timestamp = formatter.format(new Date(1000*Long.parseLong(Util.trimSpaces(values[1]))));
+ //timestamp = Util.trimSpaces(values[1]);
+ if(Util.debug)
+ {
+ System.out.println("values[1] " + values[1]);
+ System.out.println("Util.trimSpaces(values[1])) " + Util.trimSpaces(values[1]));
+ System.out.println("Long.parseLong(Util.trimSpaces(values[1])) " + Long.parseLong(Util.trimSpaces(values[1])));
+ Date d = new Date(1000*Long.parseLong(Util.trimSpaces(values[1])));
+ System.out.println("date " + d.toString());
+ System.out.println("date.gettime() "+d.getTime());
+ }
+
+ severity = AlarmSeverity[Integer.parseInt(Util.trimSpaces(values[2]))];
+ objectId = values[3].trim();
+ object = values[4];
+ errorNo = values[5].trim();
+ int error = Integer.parseInt(errorNo);
+ Vector alarmMsg = AlarmMessageMap.Get(error);
+ subject = (String) alarmMsg.elementAt(AlarmMessageMap.SUBJECT);
+ message = (String) alarmMsg.elementAt(AlarmMessageMap.MESSAGE);
+ alarmIndex = new Integer(AlarmIndex++);
+ subject = Replace(subject, object, OPModule);
+ message = Replace(message, object, OPModule);
+
+ optional1 = values[OP1].trim();
+ optional2 = values[OP2].trim();
+ srcIp = values[SRCIP].trim();
+ acknowledge = values[ACK].trim();
+ recordNumber = values[REC_NUM].trim();
+
+ if(values[OP1] != null)
+ {
+ optional1 = values[OP1];
+ subject = Replace(subject, optional1, OP1Field);
+ message = Replace(message, optional1, OP1Field);
+ }
+
+ if(values[OP2] != null)
+ {
+ optional2 = values[OP2];
+ subject = Replace(subject, optional2, OP2Field);
+ message = Replace(message, optional2, OP2Field);
+ }
+ }
+ catch(Exception e)
+ {
+ System.out.println("Invalid error No. " +errorNo);
+ e.printStackTrace();
+ throw e;
+ }
+ }
+
+
+ public Object getValueAt(int column)
+ {
+ switch (column)
+ {
+ case AlarmTableModel.ALARMID:
+ return alarmId;
+ case AlarmTableModel.TIMESTAMP:
+ return timestamp;
+ case AlarmTableModel.SEVERITY:
+ return severity;
+ case AlarmTableModel.OBJECT:
+ return object;
+ case AlarmTableModel.SUBJECT:
+ return subject;
+ default:
+ return "Unknown";
+ }
+ }
+
+ public void dump()
+ {
+ if(Util.debug)
+ {
+ System.out.println("Alarm ID : " +alarmId);
+ System.out.println("Timestamp : " +timestamp);
+ System.out.println("Severity : " +severity);
+ System.out.println("Object ID : " +objectId);
+ System.out.println("Object : " +object);
+ System.out.println("Error No : " +errorNo);
+ System.out.println("Subject : " +subject);
+ System.out.println("Message : " +message);
+ System.out.println("Optional1 : " +optional1);
+ System.out.println("Optional2 : " +optional2);
+ System.out.println("Index: " +alarmIndex);
+ }
+ }
+
+ String Replace(String field, String opfield, String op)
+ {
+ String message = null;
+ int pos = field.indexOf(op);
+ if(pos != -1) message = field.substring(0, pos) + opfield + field.substring(pos+op.length(), field.length());
+ else message = field;
+ return message;
+ }
+
+ public static void main(String[] argv)
+ {
+ // alarmId|timestamp|severity|objectId|objectName|error code|op 1| op 2
+ String event1="12323|10:23:34 1999|Critical|123|RRM|0|op1|op2";
+ String event2="12323|10:23:34 1999|Critical|123|RRM|1|op1";
+ String event3="12323|10:23:34 1999|Critical|123|RRM|2";
+
+ try {
+ AlarmData data = new AlarmData(event1);
+ data.dump();
+ data = new AlarmData(event2);
+ data.dump();
+ data = new AlarmData(event3);
+ data.dump();
+ }
+ catch(Exception e) {}
+ }
+
+}
+
+//$History:$
diff --git a/data/mnet/Common/Java/com/jetcell/MibWM/AlarmMessageMap.java b/data/mnet/Common/Java/com/jetcell/MibWM/AlarmMessageMap.java
new file mode 100644
index 0000000..939f006
--- /dev/null
+++ b/data/mnet/Common/Java/com/jetcell/MibWM/AlarmMessageMap.java
@@ -0,0 +1,131 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Class : AlarmMessageMap
+// Desc :
+// Author : George Zhao
+// Hist : 06/17/1999 Initial Creation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+package com.jetcell.MibWM;
+
+import java.awt.event.*;
+import java.awt.*;
+import java.util.*;
+import java.io.*;
+import java.net.URL;
+import Java.AlarmApplet;
+
+abstract class AlarmMessageMap
+{
+ static String file = "Text/AlarmCode.English";
+ static String Comments = "//";
+ static String delim = "|";
+ static Hashtable alarmTable = null;
+ static final int SUBJECT = 0;
+ static final int MESSAGE = 1;
+ static final int VECTOR_SIZE= 2;
+ static final int LENGTH = 3;
+ static boolean readfile = false;
+
+ static String[] ErrorCode = {
+ "0|subect for alarm code 0| detail message for alarm code 0 wdsdsa fdsafdsafs adfdsa fdsafsad fsaf sadfdsaf sadfdsfsa fds dfsa asfa sfasf asdf sadfasfadf sa fasf asfa dsaf asasfdsafa a afasdfdsaf dsafds afitsdfsfdsafsdfsafjksa;lkfjsalkfjsaf;lksajfsaklfsa;lkfasjfa;lksjfsadlkfjas;lkfjsfalksfjsa;lkfjsafkljdsfkldsafjdskfjflksajflksfj;safjas;lfjsafjsaklfsajflkdsafjsalkfah optional field %1",
+ "1|subect for alarm code 1| detail message for alarm code 1 ddsfsdfsafsfaskf;lsjflsfskdl fjsalkfsaflksafwith optional field %1",
+ "2|subect for alarm code 2| detail message for alarm code 2 with optional field %1"
+ };
+
+
+ static Vector Get(long errorNo)
+ {
+ if (alarmTable == null)
+ {
+ Init();
+ }
+
+ Vector object = (Vector) alarmTable.get(new Long(errorNo));
+ if (object == null)
+ {
+ object = new Vector();
+ object.addElement(new String("No entry for data file for error code " +errorNo));
+ object.addElement(new String("No entry for data file for error code " +errorNo));
+ }
+ return object;
+ }
+
+ static void Init()
+ {
+ alarmTable = new Hashtable();
+ URL cfg_url;
+
+ try {
+ if(Util.applet != null) {
+ System.out.println("Running applet");
+ System.out.println("codebase : " + Util.applet.getCodeBase());
+ System.out.println("documentbase : " + Util.applet.getDocumentBase());
+ System.out.println("file : " + Util.applet.getCodeBase().getFile());
+ //BufferedReader in = new BufferedReader(new FileReader(new File(Util.applet.getDocumentBase().getFile(), file)));
+ cfg_url = new URL(Util.applet.getCodeBase()+file);
+ //cfg_url = new URL("http://"+ ((AlarmApplet)Util.applet).ip+"/"+file);
+ }
+ else {
+ System.out.println("Running application");
+ String sep = System.getProperty("file.separator");
+ String pwd = "file:"+".."+sep+"Text"+sep+"AlarmCode.English";
+ cfg_url = new URL(pwd);
+ }
+ System.out.println("Open File: " +cfg_url);
+ BufferedReader in = new BufferedReader(new InputStreamReader(cfg_url.openStream()));
+ String line = null;
+ while( (line = in.readLine()) != null)
+ {
+ ProcessErrorCode(line);
+ readfile = true;
+ }
+ }
+ catch(FileNotFoundException e)
+ {
+ System.out.println(e.toString());
+ System.out.println("Cannot open alarm code file " + file);
+ }
+ catch(IOException ex)
+ {
+ System.out.println("IO Exception: " + ex.toString());
+ }
+
+ if(!readfile)
+ {
+ for(int i=0; i< ErrorCode.length; i++)
+ {
+ ProcessErrorCode(ErrorCode[i]);
+ }
+ }
+ }
+
+ static void ProcessErrorCode(String line)
+ {
+ if(line.startsWith(Comments)) return;
+
+ StringTokenizer token = new StringTokenizer(line, delim);
+ if(token.countTokens() != LENGTH)
+ {
+ return;
+ }
+
+ Long errorNo = new Long(Util.trimSpaces(token.nextToken(delim)));
+ Vector alarmMsg = new Vector(VECTOR_SIZE);
+ alarmMsg.insertElementAt(token.nextToken(delim), SUBJECT);
+ alarmMsg.insertElementAt(token.nextToken(delim), MESSAGE);
+
+ alarmTable.put(errorNo, alarmMsg);
+ }
+
+ static void dump()
+ {
+ if(Util.debug)
+ for (Enumeration e = alarmTable.elements() ; e.hasMoreElements() ;) {
+ System.out.println(e.nextElement());
+ }
+ }
+
+}
+//$History:$
diff --git a/data/mnet/Common/Java/com/jetcell/MibWM/AlarmPanel.java b/data/mnet/Common/Java/com/jetcell/MibWM/AlarmPanel.java
new file mode 100644
index 0000000..192f3f0
--- /dev/null
+++ b/data/mnet/Common/Java/com/jetcell/MibWM/AlarmPanel.java
@@ -0,0 +1,467 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Class : AlarmPanel
+// Desc :
+// Author : George Zhao
+// Hist : 04/27/1999 Initial Creation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+package com.jetcell.MibWM;
+
+import javax.swing.*;
+import javax.swing.table.*;
+import java.awt.event.*;
+import javax.swing.text.Document;
+import javax.swing.event.*;
+import java.net.UnknownHostException;
+import java.awt.*;
+import java.util.*;
+import rl.clbroker.Broker;
+import rl.clbroker.RlBeanProperty;
+import rl.clbroker.RlError;
+
+import FilterObject;
+import FilterFrame;
+import java.text.*;
+import AlarmStatusApplet;
+
+public class AlarmPanel implements DocumentListener,Cloneable{
+ static String host = null;
+ JPanel mainPanel = null;
+ AlarmTable alarmTable = null;
+
+ FilterObject filterObject = null;
+ int alarmFilterCount = 0;
+ Date filterDate = null;
+ Date alarmDate = null;
+ SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss z");
+ String viperCellIp = null; // gp10 ip for this panel.
+
+ private static JTextField eventField = null;
+
+ public AlarmPanel(){
+ filterObject = FilterFrame.filterObject;
+ AlarmMessageMap.Init();
+ /*
+ Thread t = new LoadFileThread();
+ t.start();
+ */
+ if(Util.applet == null)
+ {
+ System.out.println("Running as application");
+ Document doc = eventField.getDocument();
+ doc.addDocumentListener(this);
+ }
+ }
+
+ // Instantiated from another applet
+ public AlarmPanel(String viperbaseIp){
+ filterObject = FilterFrame.filterObject;
+ host = viperbaseIp;
+ AlarmMessageMap.Init();
+ }
+ public void setViperCellIp(String viperCell){
+ this.viperCellIp = viperCell;
+ alarmTable.setViperCellIp(viperCell);
+ }
+
+ public AlarmTable getAlarmTable(){
+ return alarmTable;
+ }
+ public JPanel createPanel(){
+ JPanel panel;
+ panel = Util.makeBorderPanel("Alarm List");
+ //Ananth
+ /*if (filterObject.NUM_ALARMS == FilterObject.NONE &&
+ filterObject.SEVERITY == FilterObject.NULL &&
+ filterObject.TIME == FilterObject.NONE &&
+ filterObject.ACKNOWLEDGE == FilterObject.NONE){
+ panel = Util.makeBorderPanel("Alarm List");
+ }
+ else{
+ panel = Util.makeBorderPanel("Alarm List (Filtered)");
+ }*/
+ panel.setLayout(new BorderLayout());
+ AlarmTableModel model = new AlarmTableModel();
+ alarmTable = new AlarmTable(model);
+ alarmTable.setViperCellIp(viperCellIp);
+ JScrollPane scroller= new JScrollPane( alarmTable,
+ JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED ,
+ JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+ panel.add(scroller, BorderLayout.CENTER);
+
+ if (host == null) // applet is run against GP10 instead of GMC
+ alarmTable.Refresh();
+ return panel;
+ }
+
+ public void removeRows(int start,int end){
+ DefaultTableModel model = (DefaultTableModel)alarmTable.getSorter().getModel();
+ AlarmTableSorter sorter = alarmTable.getSorter();
+ int row = 0;
+ int indexAtRow = 0;
+ AlarmStatusApplet.logDM("Row : " + row + " Index : " + indexAtRow);
+
+ for(int i = 0;i < (end-start); i++){
+ row = model.getRowCount();
+ indexAtRow = alarmTable.getSorter().getIndexAtRow(row-1);
+ AlarmStatusApplet.logDM("Row : " + row + " Index : " + indexAtRow);
+ sorter.filteredRemoveRow(row-1);
+ }
+ }
+
+
+ public void handleFilterEvent(FilterObject filter){
+
+ DefaultTableModel model = (DefaultTableModel)alarmTable.getModel();
+ AlarmTableSorter sorter = alarmTable.getSorter();
+ this.filterObject = filter;
+ int rowCount = model.getRowCount();
+ String severity = null;
+ String date = null;
+ Boolean acknowledge = null;
+
+ // filtering num of Alarms
+ if(filterObject.NUM_ALARMS != FilterObject.NONE){
+ AlarmStatusApplet.logDM("Filtering num: of Alarms");
+ if(rowCount > filterObject.NUM_ALARMS){
+ AlarmStatusApplet.logDM("Filtering no: of Alarms");
+ removeRows(filterObject.NUM_ALARMS,rowCount);
+ }
+ }
+
+ int newRowCount = model.getRowCount();
+ MyCalendar myCalendar = new MyCalendar();
+ filterDate = myCalendar.calculateDate();
+
+
+ for(int i=0;i<newRowCount;i++){
+ // filtering Severity
+ if(!filterObject.SEVERITY.equals(FilterObject.NULL)){
+ AlarmStatusApplet.logDM("Filtering severity");
+ severity = (String)model.getValueAt(i,AlarmTableModel.SEVERITY);
+ if(filterObject.SEVERITY.equals(FilterObject.CRITICAL)){
+ if(!severity.toUpperCase().equals(filterObject.CRITICAL)){
+ sorter.filteredRemoveRow(i);
+ i--;
+ newRowCount--;
+ continue;
+ }
+ }
+ else if(filterObject.SEVERITY.equals(FilterObject.MAJOR)){
+ if(!(severity.toUpperCase().equals(filterObject.CRITICAL)
+ || severity.toUpperCase().equals(filterObject.MAJOR))){
+ sorter.filteredRemoveRow(i);
+ i--;
+ newRowCount--;
+ continue;
+ }
+ }
+ else if(filterObject.SEVERITY.equals(FilterObject.MINOR)){
+ if(!(severity.toUpperCase().equals(filterObject.CRITICAL)
+ || severity.toUpperCase().equals(filterObject.MAJOR)
+ || severity.toUpperCase().equals(filterObject.MINOR))){
+ sorter.filteredRemoveRow(i);
+ i--;
+ newRowCount--;
+ continue;
+ }
+ }
+
+ }
+
+ // filtering Date/Time
+ if(!(filterObject.TIME == FilterObject.NONE)){
+ AlarmStatusApplet.logDM("Checking timestamp");
+ date = (String)model.getValueAt(i,AlarmTableModel.TIMESTAMP);
+ try{
+ alarmDate = formatter.parse(date);
+ }
+ catch(ParseException ex){
+ System.out.println("Cudn't parse date ...");
+ }
+ if(!alarmDate.after(filterDate)){
+ sorter.filteredRemoveRow(i);
+ i--;
+ newRowCount--;
+ continue;
+ }
+ }
+
+ // filtering Ack
+ if(!(filterObject.ACKNOWLEDGE == FilterObject.NONE)){
+ AlarmStatusApplet.logDM("Filtering ack");
+ acknowledge = (Boolean)model.getValueAt(i,AlarmTableModel.ACK);
+ if(filterObject.ACKNOWLEDGE == FilterObject.NO_ACK){
+ if(acknowledge.booleanValue()){
+ sorter.filteredRemoveRow(i);
+ i--;
+ newRowCount--;
+ }
+ continue;
+ }
+ else if(filterObject.ACKNOWLEDGE == FilterObject.ALL_ACK){
+ if(!acknowledge.booleanValue()){
+ sorter.filteredRemoveRow(i);
+ i--;
+ newRowCount--;
+ }
+ continue;
+ }
+ }
+ } // end "for loop"
+
+ // addEvent(alarm);
+ }
+
+ public void addEvent(AlarmData alarm){
+ String severity;
+ Boolean acknowledge;
+ int ack;
+ String date;
+ DefaultTableModel model = (DefaultTableModel)alarmTable.getModel();
+
+ if(filterObject != null){
+
+ // filtering Severity
+ if(!filterObject.SEVERITY.equals(FilterObject.NULL)){
+ AlarmStatusApplet.logDM("Filtering severity");
+ severity = alarm.severity;
+ if(filterObject.SEVERITY.equals(FilterObject.CRITICAL)){
+ if(!severity.toUpperCase().equals(filterObject.CRITICAL)){
+ return;
+ }
+ }
+ else if(filterObject.SEVERITY.equals(FilterObject.MAJOR)){
+ if(!(severity.toUpperCase().equals(filterObject.CRITICAL)
+ || severity.toUpperCase().equals(filterObject.MAJOR))){
+ return;
+ }
+ }
+ else if(filterObject.SEVERITY.equals(FilterObject.MINOR)){
+ if(!(severity.toUpperCase().equals(filterObject.CRITICAL)
+ || severity.toUpperCase().equals(filterObject.MAJOR)
+ || severity.toUpperCase().equals(filterObject.MINOR))){
+ return;
+ }
+ }
+ }
+
+ // filtering Ack
+ ack = Integer.parseInt(alarm.acknowledge);
+ if(ack == 0){
+ acknowledge = new Boolean(false);
+ }
+ else{
+ acknowledge = new Boolean(true);
+ }
+ if(!(filterObject.ACKNOWLEDGE == FilterObject.NONE)){
+ AlarmStatusApplet.logDM("Filtering ack");
+ if(filterObject.ACKNOWLEDGE == FilterObject.NO_ACK){
+ if(acknowledge.booleanValue()){
+ return;
+ }
+ }
+ else if(filterObject.ACKNOWLEDGE == FilterObject.ALL_ACK){
+ if(!acknowledge.booleanValue()){
+ return;
+ }
+ }
+ }
+
+ // filtering Date/Time
+ MyCalendar myCalendar = new MyCalendar();
+ filterDate = myCalendar.calculateDate();
+
+ if(!(filterObject.TIME == FilterObject.NONE)){
+
+ AlarmStatusApplet.logDM("Checking timestamp");
+ date = alarm.timestamp;
+ try{
+ alarmDate = formatter.parse(date);
+ }
+ catch(ParseException ex){
+ System.out.println("Cudn't parse date ...");
+ }
+ if(!alarmDate.after(filterDate)){
+ return;
+ }
+ }
+
+ // Shrinivas 05 jun 01'
+ // filtering NUM_ALARMS
+ if(filterObject.NUM_ALARMS != FilterObject.NONE){
+ int rowCount = model.getRowCount();
+ AlarmStatusApplet.logDM("Filtering num: of Alarms");
+ if(rowCount > filterObject.NUM_ALARMS-1){
+ AlarmStatusApplet.logDM("Filtering no: of Alarms");
+ removeRows(filterObject.NUM_ALARMS-1,rowCount);
+ }
+ }
+ // Shrinivas end
+ }
+
+
+ Object [] row = new Object[AlarmTableModel.NUM_COL];
+ row[AlarmTableModel.INDEX] = alarm.alarmIndex;
+ row[AlarmTableModel.READ] = new Boolean(false);
+ row[AlarmTableModel.ALARMID] = alarm.alarmId;
+ row[AlarmTableModel.TIMESTAMP] = alarm.timestamp;
+ row[AlarmTableModel.SEVERITY] = alarm.severity;
+ row[AlarmTableModel.OBJECT] = alarm.object;
+ row[AlarmTableModel.SUBJECT] = alarm.subject;
+
+ if(Integer.parseInt(alarm.acknowledge) == 0)
+ row[AlarmTableModel.ACK] = new Boolean(false);
+ else
+ row[AlarmTableModel.ACK] = new Boolean(true);
+
+ ((DefaultTableModel)alarmTable.getModel()).insertRow(0, row);
+ alarmTable.setAlarmData(alarm);
+
+ }
+
+ public void removeAllEvents()
+ {
+ while (((DefaultTableModel)alarmTable.getModel()).getRowCount() > 0)
+ ((DefaultTableModel)alarmTable.getModel()).removeRow(0);
+ }
+
+ static public void main(String[] argv)
+ {
+ eventField = new JTextField();
+ host = argv[0];
+ try
+ {
+ boolean useTCP = true;
+ int portNum = 80;
+ int maxLen = 4096;
+
+ System.out.println("Connect to " + host + " prot " +portNum);
+ Broker.setOptions(host, portNum, maxLen, useTCP);
+
+ }
+ catch(UnknownHostException e) { e.printStackTrace(); }
+ Broker.addMagicMarkup("QSEvent", "java.lang.String", false);
+ RlBeanProperty beanProp = Broker.wrapBeanProperty(eventField, "text", java.lang.String.class);
+ Broker.bindMarkupToBeanProperty("QSEvent", "", null, beanProp, true, false, true, null);
+ Broker.start();
+ JFrame f = new JFrame("ViperCell Event List");
+ f.addWindowListener(new WindowAdapter() {
+ public void windowClosing(WindowEvent e)
+ {
+ System.exit(1);
+ }
+ });
+ f.getContentPane().setLayout(new BorderLayout());
+ AlarmPanel base = new AlarmPanel();
+ f.getContentPane().add(base.createPanel());
+ f.setBounds(0,0, 720,400);
+ try
+ {
+ UIManager.setLookAndFeel( "com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
+ SwingUtilities.updateComponentTreeUI(f);
+ }
+ catch(Exception ex)
+ {
+ Util.showDialog(f, ex.toString(), "Error", JOptionPane.ERROR_MESSAGE);
+ }
+ f.setVisible(true);
+
+ /*
+ Random r = new Random();
+ Calendar d = Calendar.getInstance();
+
+ String severity = null;
+
+ for(int i=0; i<20; i++)
+ {
+ try {
+ d.add(Calendar.SECOND, java.lang.Math.abs(r.nextInt()));
+ if (i-i/3*3 == 0)
+ severity = new String("Critical");
+ else if (i-i/3 == 1)
+ severity = new String("Minor");
+ else if (i - i/3*3 == 2)
+ severity = new String("Info");
+ String date = d.getTime().toString();
+ String object = "Object_"+String.valueOf(java.lang.Math.abs(r.nextInt()));
+ String message = " Event messages ....";
+
+ AlarmData alarm = new AlarmData(String.valueOf(i), date, severity, null, object, message, null);
+ base.addEvent(alarm);
+ Thread.sleep(10000);
+ System.out.println("Event: " +i);
+ }
+ catch(Exception e)
+ {}
+ }
+ */
+
+
+ }
+
+ public void changedUpdate(DocumentEvent e)
+ {
+ }
+
+ public void insertUpdate(DocumentEvent e)
+ {
+ String alarmId = eventField.getText();
+ alarmId.trim();
+ System.out.println("Receiving Alarm: " + alarmId);
+
+ if(!alarmId.startsWith("Event Number"))
+ {
+ try {
+ AlarmData alarm = new AlarmData(alarmId);
+ addEvent(alarm);
+ }
+ catch(Exception ex) {}
+ }
+ }
+
+ public void removeUpdate(DocumentEvent e)
+ {
+ }
+
+ class LoadFileThread extends Thread
+ {
+ public void run()
+ {
+ AlarmMessageMap.Init();
+ }
+ }
+
+ class MyCalendar extends GregorianCalendar{
+
+ public Date calculateDate(){
+
+ MyCalendar myCalen = new MyCalendar();
+ long currentMillis = myCalen.getTimeInMillis();
+ long temp;
+ Date pDate = null;
+
+ if(filterObject.TIME == FilterObject.MIN_15){
+ temp = 15 * 60 * 1000;
+ pDate = new Date(currentMillis - temp);
+ }
+ else if(filterObject.TIME == FilterObject.HR_1){
+ temp = 60 * 60 * 1000;
+ pDate = new Date(currentMillis - temp);
+ }
+ else if(filterObject.TIME == FilterObject.HR_12){
+ temp = (12 * 60 ) * 60 * 1000;
+ pDate = new Date(currentMillis - temp);
+ }
+ else if(filterObject.TIME == FilterObject.HR_24){
+ temp = (24 * 60 ) * 60 * 1000;
+ pDate = new Date(currentMillis - temp);
+ }
+ return pDate;
+ }
+ }
+}
+
+//$History:$
diff --git a/data/mnet/Common/Java/com/jetcell/MibWM/AlarmTable.java b/data/mnet/Common/Java/com/jetcell/MibWM/AlarmTable.java
new file mode 100644
index 0000000..1e5490d
--- /dev/null
+++ b/data/mnet/Common/Java/com/jetcell/MibWM/AlarmTable.java
@@ -0,0 +1,588 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Class : AlarmTable
+// Desc :
+// Author : George Zhao
+// Hist : 06/17/1999 Initial Creation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+package com.jetcell.MibWM;
+
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.table.*;
+import javax.swing.event.*;
+import java.util.Hashtable;
+import java.awt.*;
+import java.io.*;
+import java.awt.image.*;
+import java.net.*;
+import AlarmTCPThread;
+
+public class AlarmTable extends JTable {
+
+ DefaultTableModel model;
+ JPopupMenu popupMenu = null;
+
+ final int [] columnMinWidth = {25, 30, 150, 50, 80, 250, 0,25};
+ final int [] columnMaxWidth = {40, 60, 200, 100, 150, 800, 0,40};
+
+ AlarmTableSorter sorter = null;
+ Hashtable alarmHashTable = null;
+ DetailFrame detailFrame = new DetailFrame();
+ String viperCellIp = null;
+
+ public AlarmTable(DefaultTableModel model)
+ {
+ super(model);
+ popupMenu = AlarmTablePopupMenu.getPopupMenu();
+
+ sorter = new AlarmTableSorter(model);
+ super.setModel( sorter );
+ addMouseListener(new MouseHandler(this));
+ alarmHashTable = new Hashtable();
+ for (int i=0; i < model.getColumnCount(); i++ )
+ setColumnWidth(i, columnMinWidth[i], columnMaxWidth[i]);
+ TableColumnModel colModel = getColumnModel();
+ colModel.getColumn(AlarmTableModel.READ).setCellRenderer(new ReadCellRenderer());
+ colModel.getColumn(AlarmTableModel.SEVERITY).setCellRenderer(new SeverityRenderer());
+ colModel.getColumn(AlarmTableModel.ACK).setCellRenderer(new ReadCellRenderer());
+
+ setRowSelectionAllowed(true);
+ setColumnSelectionAllowed(false);
+ setSelectionMode( ListSelectionModel.SINGLE_SELECTION );
+ setShowGrid(true);
+ setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
+ setShowVerticalLines(false);
+ setGridColor(new Color(153,153,255));
+ }
+
+
+ public AlarmTableSorter getSorter(){
+ return this.sorter;
+ }
+ public void setViperCellIp(String viperCell){
+ this.viperCellIp = viperCell;
+ }
+
+ public void setColumnWidth(int columnIndex, int minWidth, int maxWidth)
+ {
+ TableColumn column = (TableColumn)getColumn(getColumnName(columnIndex));
+
+ column.setMinWidth(minWidth);
+ column.setMaxWidth(maxWidth);
+ }
+
+ public boolean isCellEditable(int i, int j)
+ {
+ return false;
+ }
+
+
+ public AlarmData getAlarmData(Integer index)
+ {
+ if (alarmHashTable != null)
+ return (AlarmData) alarmHashTable.get(index);
+ return null;
+ }
+
+ public void setAlarmData(AlarmData alarmdata){
+ if(AlarmMessageMap.readfile){
+ alarmHashTable.put(alarmdata.alarmIndex, alarmdata);
+ }
+ }
+
+ public void OpenEvent()
+ {
+ Integer index = (Integer)getValueAt(getSelectedRow(), AlarmTableModel.INDEX);
+ System.out.println("Open Event: " +index);
+ AlarmData data = (AlarmData) alarmHashTable.get(index);
+ data.dump();
+ detailFrame.setData(data);
+ Dimension d = new JFrame().getToolkit().getScreenSize();
+ detailFrame.setLocation(d.width/4,d.height/3);
+ detailFrame.setResizable(false);
+ if(Util.applet == null){
+ detailFrame.setIconImage(Toolkit.getDefaultToolkit().getImage("../Images/app_icon.gif"));
+ }
+ else{
+ String iconPath = Util.applet.getCodeBase().toString();
+ iconPath += "Images/app_icon.gif";
+ URL iconPathURL = null;
+ try{
+ iconPathURL = new URL(iconPath);
+ }
+ catch(MalformedURLException exc){
+ System.out.println("Bad URL.");
+ }
+ System.out.println(iconPathURL);
+ detailFrame.setIconImage(Toolkit.getDefaultToolkit().getImage(iconPathURL));
+ }
+ //detailFrame.setIconImage(Toolkit.getDefaultToolkit().getImage("../Images/app_icon.gif"));
+ detailFrame.setVisible(true);
+ setValueAt(new Boolean(true), getSelectedRow(), AlarmTableModel.READ);
+ }
+
+ public void RemoveAllEvents()
+ {
+ System.out.println("Remove All");
+ while( getRowCount()> 0)
+ {
+ ((DefaultTableModel) getModel()).removeRow(0);
+ }
+ }
+
+ public void RemoveInfoEvents()
+ {
+ System.out.println("Remvoe Info");
+ sorter.reallocateIndexes();
+ sorter.sortByColumn(AlarmTableModel.ALARMID, false);
+ for (int i=0; i< getRowCount(); i++)
+ {
+ if (((String) getValueAt(i, AlarmTableModel.SEVERITY)).equals("Info"))
+ {
+ System.out.println("removing row " + i);
+ ((DefaultTableModel) getModel()).removeRow(i);
+ }
+ }
+ }
+
+ public void RemoveReadEvents()
+ {
+ System.out.println("RemoveRead");
+ sorter.reallocateIndexes();
+ sorter.sortByColumn(AlarmTableModel.READ, false);
+ for (int i=0; i< getRowCount(); i++)
+ {
+ if (((Boolean) getValueAt(i, AlarmTableModel.READ)).booleanValue())
+ {
+ System.out.println("removing row " + i);
+ ((DefaultTableModel) getModel()).removeRow(i);
+ i--;
+ }
+ }
+ }
+
+ public void RemoveEvent()
+ {
+ String alarmId = (String)getValueAt(getSelectedRow(), AlarmTableModel.INDEX);
+ System.out.println("Remove Event: " +alarmId);
+ sorter.reallocateIndexes();
+ sorter.sortByColumn(AlarmTableModel.ALARMID, false);
+ for (int i=0; i< getRowCount(); i++)
+ {
+ if (((String) getValueAt(i, AlarmTableModel.INDEX)).equals(alarmId))
+ {
+ System.out.println("removing row " + i);
+ ((DefaultTableModel) getModel()).removeRow(i);
+ break;
+ }
+ }
+ }
+
+
+ public void Refresh(){
+ RemoveAllEvents();
+ java.net.URL cfg_url = null;
+
+ // Shrinivas Feb 28th
+ AlarmTCPThread.sendEventReq(viperCellIp);
+
+ /*if(Util.applet == null){
+ AlarmTCPThread.sendEventReq(viperCellIp);
+ }
+ // original applet code : Refresh logic as it was before
+ else{
+ try {
+ if(Util.applet != null)
+ cfg_url = new java.net.URL(Util.applet.getDocumentBase()+"Text/alarm.log");
+ else
+ cfg_url = new java.net.URL("http://"+AlarmPanel.host+"/Text/alarm.log");
+ System.out.println("Open File: " +cfg_url);
+ java.io.BufferedReader in = new java.io.BufferedReader(new InputStreamReader(cfg_url.openStream()));
+ String line = null;
+ while( (line = in.readLine()) != null){
+ try {
+ System.out.println("Line : " +line);
+ AlarmData alarm = new AlarmData(line);
+ setAlarmData(alarm);
+ Object [] row = new Object[AlarmTableModel.NUM_COL];
+ row[AlarmTableModel.INDEX] = alarm.alarmIndex;
+ row[AlarmTableModel.READ] = new Boolean(false);
+ row[AlarmTableModel.ALARMID] = alarm.alarmId;
+ row[AlarmTableModel.TIMESTAMP] = alarm.timestamp;
+ row[AlarmTableModel.SEVERITY] = alarm.severity;
+ row[AlarmTableModel.OBJECT] = alarm.object;
+ row[AlarmTableModel.SUBJECT] = alarm.subject;
+
+ ((DefaultTableModel)getModel()).insertRow(0, row);
+ }
+ catch(Exception ex) {}
+ }
+ }
+ catch(FileNotFoundException e){
+ System.out.println(e.toString());
+ System.out.println("Cannot open alarm code file Text/alarm.log");
+ }
+ catch(IOException ex){
+ System.out.println("IO Exception: " + ex.toString());
+ }
+ }*/
+
+ // Shrinivas end
+ }
+
+ public void Acknowledge(){
+ Integer index = (Integer)getValueAt(getSelectedRow(), AlarmTableModel.INDEX);
+ AlarmData data = (AlarmData) alarmHashTable.get(index);
+ if(data == null)
+ System.out.println("unable to get Alarm data");
+ AlarmTCPThread.sendAck(data.srcIp,data.alarmId,data.recordNumber);
+ setValueAt(new Boolean(true), getSelectedRow(), AlarmTableModel.ACK);
+ }
+
+ class MouseHandler extends MouseAdapter
+ {
+ AlarmTable holder = null;
+ public MouseHandler(AlarmTable table){
+ this.holder = table;
+ }
+ public void mouseReleased(MouseEvent e){
+ if (e.getClickCount() == 2 )
+ {
+ System.out.println("Process Double click");
+ OpenEvent();
+ }
+
+ if ( e.isPopupTrigger()){
+ int selectedRow = rowAtPoint(new Point(e.getX(),e.getY()));
+ setRowSelectionInterval(selectedRow,selectedRow);
+
+ popupMenu.show(holder, e.getX(), e.getY());
+ }
+ }
+ }
+
+ class ReadCellRenderer extends JCheckBox implements TableCellRenderer
+ {
+ Color mHighlightedBackground = (Color) (new Color(0, 0, 255)).darker().darker();
+ Color mDefaultBackground = SystemColor.window;
+ public ReadCellRenderer()
+ {
+ setBackground(Color.white);
+ setHorizontalAlignment(JLabel.CENTER);
+ }
+
+ public Component getTableCellRendererComponent( JTable table,
+ Object value,
+ boolean isSelected,
+ boolean hasFocus,
+ int row,
+ int column )
+ {
+ Boolean b = (Boolean) value;
+
+ if(b != null){
+ setSelected(b.booleanValue());
+
+ }
+
+ return this;
+ }
+ }
+
+ class SeverityRenderer extends JLabel implements TableCellRenderer
+ {
+ Color mHighlightedBackground = (Color) (new Color(0, 0, 255)).darker().darker();
+ Color mDefaultBackground = SystemColor.window;
+ Font defaultFont = new Font("Helvetica", Font.BOLD,12);
+ Font empFont = new Font("TimesRoman", Font.BOLD,18);
+ ImageIcon severityIcon = null;
+ ImageIcon criticalIcon = null;
+ ImageIcon majorIcon = null;
+ ImageIcon minorIcon = null;
+ ImageIcon infoIcon = null;
+
+ public SeverityRenderer(){
+ super("");
+ loadIcons();
+ setHorizontalAlignment(JLabel.CENTER);
+ }
+
+ private void loadIcons(){
+ String fileSep = System.getProperty("file.separator");
+ String codeBase = null;
+ String imagePath = "file:" +".."+fileSep+"Images"+fileSep;
+ String imageFile = null;
+ if(Util.applet != null){
+ codeBase = Util.applet.getCodeBase().toString();
+ System.out.println(codeBase);
+ }
+ try{
+ if(Util.applet != null){
+ imageFile = codeBase + "Images/scritical.gif";
+ }
+ else{
+ imageFile = imagePath+"scritical.gif";
+ }
+ criticalIcon = new ImageIcon(new URL(imageFile));
+
+ if(Util.applet != null){
+ imageFile = codeBase + "Images/smajor.gif";
+ }
+ else
+ imageFile = imagePath+"smajor.gif";
+ majorIcon = new ImageIcon(new URL(imageFile));
+
+ if(Util.applet != null){
+ imageFile = codeBase + "Images/sminor.gif";
+ }
+ else
+ imageFile = imagePath+"sminor.gif";
+ minorIcon = new ImageIcon(new URL(imageFile));
+
+ if(Util.applet != null){
+ imageFile = codeBase + "Images/sinformation.gif";
+ }
+ else
+ imageFile = imagePath + "sinformation.gif";
+ infoIcon = new ImageIcon(new URL(imageFile));
+ }
+ catch(MalformedURLException malEx){
+ System.out.println("Bad URL");
+ }
+ }
+
+ public Component getTableCellRendererComponent( JTable table,
+ Object value,
+ boolean isSelected,
+ boolean hasFocus,
+ int row,
+ int column ){
+
+ String severity = (String) value;
+
+ if(value != null){
+ if(severity.equals(AlarmData.AlarmSeverity[0])) {
+ setIcon(criticalIcon);
+ criticalIcon.setImageObserver(new CellImageObserver(table, row, column));
+ }
+ else if(severity.equals(AlarmData.AlarmSeverity[1])){
+ setIcon(majorIcon);
+ majorIcon.setImageObserver(new CellImageObserver(table, row, column));
+ }
+ else if (severity.equals(AlarmData.AlarmSeverity[2])){
+ setIcon(minorIcon);
+ minorIcon.setImageObserver(new CellImageObserver(table, row, column));
+ }
+ else if (severity.equals(AlarmData.AlarmSeverity[3])){
+ setIcon(infoIcon);
+ infoIcon.setImageObserver(new CellImageObserver(table, row, column));
+ }
+ }
+
+ if (isSelected){
+ setBackground(mHighlightedBackground);
+ }
+ else{
+ setBackground(mDefaultBackground);
+ }
+
+ return this;
+ }
+ }
+
+ class CellImageObserver implements ImageObserver {
+ JTable table;
+ int row;
+ int col;
+
+ CellImageObserver(JTable table,int row, int col) {
+ this.table = table;
+ this.row = row;
+ this.col = col;
+ }
+
+ public boolean imageUpdate(Image img, int flags,int x, int y, int w, int h){
+ if ((flags & (FRAMEBITS|ALLBITS)) != 0) {
+ Rectangle rect = table.getCellRect(row,col,false);
+ table.repaint(rect);
+ }
+ return (flags & (ALLBITS|ABORT)) == 0;
+ }
+ }
+
+
+ class DetailFrame extends JFrame implements ActionListener
+ {
+ JPanel mainPanel = null;
+ final int WIDTH = 520;
+ final int HEIGHT = 360;
+ final int rows = 4;
+ final int columns = 40;
+
+ JTextField alarmIdField = Util.makeTextField(false);
+ JTextField severityField = Util.makeTextField(false);
+ JTextField timestampField = Util.makeTextField(false);
+ JTextField objectField = Util.makeTextField(false);
+ JTextField subjectField = Util.makeTextField(false);
+ JTextArea messageArea = Util.makeTextArea(rows, columns, false);
+ JButton closeButton = new JButton("Close");
+
+ public DetailFrame ()
+ {
+ mainPanel = createPanel();
+ getContentPane().add(mainPanel, BorderLayout.CENTER);
+ pack();
+ setSize(getPreferredSize());
+ addWindowListener(new WindowAdapter() {
+ public void windowClosing(WindowEvent e)
+ {
+ close();
+ }
+ });
+ closeButton.addActionListener(this);
+ try
+ {
+ UIManager.setLookAndFeel( "com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
+ SwingUtilities.updateComponentTreeUI(this);
+ }
+ catch(Exception ex)
+ {
+ Util.showDialog(this, ex.toString(), "Error", JOptionPane.ERROR_MESSAGE);
+ }
+ }
+
+ public JPanel createPanel()
+ {
+ JPanel panel = Util.makeBorderPanel();
+ panel.setLayout(new BorderLayout(0, 0));
+ panel.add(makeDetailPanel(), BorderLayout.CENTER);
+ panel.add(makeMessagePanel(), BorderLayout.SOUTH);
+ return panel;
+ }
+
+ JPanel makeDetailPanel()
+ {
+ JPanel panel = Util.makeBorderPanel("Event Data");
+ GridBagConstraints gbc;
+ GridBagLayout gridbag = new GridBagLayout();
+ gbc = new GridBagConstraints();
+ JLabel label;
+ panel.setLayout(gridbag);
+
+ label = new JLabel("Event ID ", JLabel.RIGHT);
+ label.setToolTipText("Alarm ID");
+ Util.constrain(label, panel, gbc, 0,0,1,1,
+ GridBagConstraints.VERTICAL,GridBagConstraints.WEST,
+ 0.0,0.0,0,5,5,0);
+
+ Util.constrain(alarmIdField, panel, gbc, 1,0,1,1,
+ GridBagConstraints.HORIZONTAL,GridBagConstraints.WEST,
+ 100.0,100.0,0,5,5,0);
+
+ label = new JLabel("Severity ",JLabel.RIGHT);
+ label.setToolTipText("Severity of the Event");
+ Util.constrain(label, panel, gbc, 2,0,1,1,
+ GridBagConstraints.VERTICAL,GridBagConstraints.WEST,
+ 0.0,0.0,0,5,5,0);
+
+ Util.constrain(severityField, panel, gbc, 3,0,1,1,
+ GridBagConstraints.HORIZONTAL,GridBagConstraints.WEST,
+ 100.0,100.0,0,5,5,0);
+
+ label = new JLabel("Time Stamp ",JLabel.RIGHT);
+ label.setToolTipText("Event time stamp");
+ Util.constrain(label, panel, gbc, 0,1,1,1,
+ GridBagConstraints.VERTICAL,GridBagConstraints.WEST,
+ 0.0,0.0,0,5,5,0);
+
+ Util.constrain(timestampField, panel, gbc, 1,1,1,1,
+ GridBagConstraints.HORIZONTAL,GridBagConstraints.WEST,
+ 100.0,100.0,0,5,5,0);
+
+ label = new JLabel("Object ",JLabel.RIGHT);
+ label.setToolTipText("Name of the object that generated this event");
+ Util.constrain(label, panel, gbc, 2,1,1,1,
+ GridBagConstraints.VERTICAL,GridBagConstraints.WEST,
+ 0.0,0.0,0,5,5,0);
+
+ Util.constrain(objectField, panel, gbc, 3,1,1,1,
+ GridBagConstraints.HORIZONTAL,GridBagConstraints.WEST,
+ 100.0,100.0,0,5,5,0);
+
+ label = new JLabel("Subject ",JLabel.RIGHT);
+ label.setToolTipText("Subject of the Event");
+ Util.constrain(label, panel, gbc, 0,2,1,1,
+ GridBagConstraints.VERTICAL,GridBagConstraints.WEST,
+ 0.0,0.0,0,5,5,0);
+
+ Util.constrain(subjectField, panel, gbc, 1,2,3,1,
+ GridBagConstraints.HORIZONTAL,GridBagConstraints.WEST,
+ 100.0,100.0,0,5,5,0);
+
+
+ return panel;
+ }
+
+ JPanel makeMessagePanel()
+ {
+ JPanel panel = Util.makeEmptyBorderPanel();
+ panel.setLayout(new BorderLayout(0,0));
+ panel.add(messageAreaPanel(), BorderLayout.CENTER);
+ panel.add(makeButtonPanel(), BorderLayout.SOUTH);
+ return panel;
+ }
+
+ JPanel messageAreaPanel()
+ {
+ JPanel panel = Util.makeBorderPanel("Message");
+ panel.setLayout(new BorderLayout(0,0));
+ messageArea.setLineWrap(true);
+ messageArea.setWrapStyleWord(true);
+ JScrollPane scroller = new JScrollPane(messageArea);
+ panel.add(scroller, BorderLayout.CENTER);
+ return panel;
+ }
+
+ JPanel makeButtonPanel()
+ {
+ JPanel panel = new JPanel();
+ panel.setLayout(new FlowLayout());
+ panel.add(closeButton);
+ return panel;
+ }
+
+ public Dimension getPreferredSize()
+ {
+ return new Dimension(WIDTH, HEIGHT);
+ }
+
+ public void actionPerformed(ActionEvent event)
+ {
+
+ Object obj = event.getSource();
+ if (obj == closeButton)
+ close();
+ }
+
+ public void close()
+ {
+ setVisible(false);
+ }
+
+ public void setData(AlarmData data)
+ {
+ setTitle("Event Detail for Event Id: " +data.alarmId);
+ alarmIdField.setText(data.alarmId);
+ severityField.setText(data.severity);
+ timestampField.setText(data.timestamp);
+ objectField.setText(data.object);
+ subjectField.setText(data.subject);
+ messageArea.setText(data.message);
+ }
+ }
+
+}
+//$History:$
diff --git a/data/mnet/Common/Java/com/jetcell/MibWM/AlarmTableModel.java b/data/mnet/Common/Java/com/jetcell/MibWM/AlarmTableModel.java
new file mode 100644
index 0000000..0123885
--- /dev/null
+++ b/data/mnet/Common/Java/com/jetcell/MibWM/AlarmTableModel.java
@@ -0,0 +1,43 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Class : AlarmTableModel
+// Desc :
+// Author : George Zhao
+// Hist : 06/17/1999 Initial Creation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+package com.jetcell.MibWM;
+
+import javax.swing.*;
+import javax.swing.table.*;
+import java.awt.event.*;
+import java.awt.*;
+import java.util.*;
+
+public class AlarmTableModel extends DefaultTableModel
+
+
+{
+ final static int INDEX = 6;
+ final static int READ = 0;
+ final static int ALARMID = 1;
+ final static int TIMESTAMP = 2;
+ final static int SEVERITY = 3;
+ final static int OBJECT = 4;
+ final static int SUBJECT = 5;
+ final static int MESSAGE = 6;
+ final static int ACK = 7;
+
+
+ static String ColumnTitle[] = {"Read", "Alarm ID", "Time Stamp", "Severity", "Object", "Message Subject", "","Ack"};
+ final static int NUM_COL = ColumnTitle.length;
+
+ public AlarmTableModel()
+ {
+ super(ColumnTitle, 0);
+ }
+}
+
+
+//$History:$
diff --git a/data/mnet/Common/Java/com/jetcell/MibWM/AlarmTablePopupMenu.java b/data/mnet/Common/Java/com/jetcell/MibWM/AlarmTablePopupMenu.java
new file mode 100644
index 0000000..4002b40
--- /dev/null
+++ b/data/mnet/Common/Java/com/jetcell/MibWM/AlarmTablePopupMenu.java
@@ -0,0 +1,218 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Class : AlarmTablePopupMenu
+// Desc :
+// Author : George Zhao
+// Hist : 06/17/1999 Initial Creation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+package com.jetcell.MibWM;
+
+import java.util.*;
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.text.*;
+import javax.swing.table.*;
+
+public class AlarmTablePopupMenu extends JPopupMenu implements ActionListener
+{
+ static JMenuItem openMenuItem;
+ static JMenuItem removeMenuItem;
+ static JMenuItem removeAllMenuItem;
+ static JMenuItem removeReadMenuItem;
+ static JMenuItem removeInfoMenuItem;
+ static JMenuItem refreshMenuItem;
+ static JMenuItem acknowledgeMenuItem;
+
+ static boolean iconsLoaded = false;
+ protected static AlarmTablePopupMenu popupMenu = new AlarmTablePopupMenu();
+
+ static AlarmTable invoker ;
+
+ static int x;
+ static int y;
+
+
+ /**
+ * You cannot instantiate this class. Use getPopupMenu() to get
+ * a shared instance!
+ */
+ protected AlarmTablePopupMenu()
+ {
+ openMenuItem = Util.makeMenuItem("Open Event",'O');
+ openMenuItem.setHorizontalTextPosition(SwingConstants.RIGHT);
+ openMenuItem.setHorizontalAlignment(SwingConstants.LEFT);
+ openMenuItem.addActionListener(this);
+ add(openMenuItem);
+ addSeparator();
+
+
+ /*
+ removeMenuItem = Util.makeMenuItem("Remove Event",'R');
+ removeMenuItem.setHorizontalTextPosition(SwingConstants.RIGHT);
+ removeMenuItem.setHorizontalAlignment(SwingConstants.LEFT);
+ removeMenuItem.addActionListener(this);
+ add(removeMenuItem);
+ addSeparator();
+
+ removeAllMenuItem = Util.makeMenuItem("Remove All Events", 'A');
+ removeAllMenuItem.setHorizontalTextPosition(SwingConstants.RIGHT);
+ removeAllMenuItem.setHorizontalAlignment(SwingConstants.LEFT);
+ removeAllMenuItem.addActionListener(this);
+ add(removeAllMenuItem);
+
+ removeReadMenuItem = Util.makeMenuItem("Remove Read Events", 'E');
+ removeReadMenuItem.setHorizontalTextPosition(SwingConstants.RIGHT);
+ removeReadMenuItem.setHorizontalAlignment(SwingConstants.LEFT);
+ removeReadMenuItem.addActionListener(this);
+ add(removeReadMenuItem);
+
+ removeInfoMenuItem = Util.makeMenuItem("Remove Clear Events", 'C');
+ removeInfoMenuItem.setHorizontalTextPosition(SwingConstants.RIGHT);
+ removeInfoMenuItem.setHorizontalAlignment(SwingConstants.LEFT);
+ removeInfoMenuItem.addActionListener(this);
+ add(removeInfoMenuItem);*/
+
+ // Shrinivas 20th Apr 01
+ /*addSeparator();
+ refreshMenuItem = Util.makeMenuItem("Refresh", 'R');
+ refreshMenuItem.setHorizontalTextPosition(SwingConstants.RIGHT);
+ refreshMenuItem.setHorizontalAlignment(SwingConstants.LEFT);
+ refreshMenuItem.addActionListener(this);
+ add(refreshMenuItem);*/
+ // Shrinivas 20th Apr 01
+
+ addSeparator();
+ addSeparator();
+ acknowledgeMenuItem = Util.makeMenuItem("Acknowledge", 'A');
+ acknowledgeMenuItem.setHorizontalTextPosition(SwingConstants.RIGHT);
+ acknowledgeMenuItem.setHorizontalAlignment(SwingConstants.LEFT);
+ acknowledgeMenuItem.addActionListener(this);
+ add(acknowledgeMenuItem);
+ }
+
+
+ /**
+ * returns shared instance of popupMenu
+ */
+ public static AlarmTablePopupMenu getPopupMenu()
+ {
+ return popupMenu;
+ }
+
+
+ /**
+ * update to use difference icons later!
+ */
+ void loadIcons()
+ {
+ openMenuItem.setIcon(new ImageIcon(ImageLoader.loadImage("opengray.gif")));
+ removeAllMenuItem.setIcon(new ImageIcon(ImageLoader.loadImage("delete.gif")));
+ removeReadMenuItem.setIcon(new ImageIcon(ImageLoader.loadImage("delete.gif")));
+ removeInfoMenuItem.setIcon(new ImageIcon(ImageLoader.loadImage("delete.gif")));
+ refreshMenuItem.setIcon(new ImageIcon(ImageLoader.loadImage("reset.gif")));
+ }
+
+
+ /**
+ * update to use shared clipboard access later
+ */
+ public void actionPerformed(ActionEvent e)
+ {
+ Object obj = e.getSource();
+ String selection = null;
+
+ if (obj == openMenuItem)
+ {
+ invoker.OpenEvent();
+ }
+ else if (obj == removeMenuItem)
+ {
+ invoker.RemoveEvent();
+ }
+ else if (obj == removeAllMenuItem)
+ {
+ invoker.RemoveAllEvents();
+ }
+ else if (obj == removeReadMenuItem)
+ {
+ invoker.RemoveReadEvents();
+ }
+ else if (obj == removeInfoMenuItem)
+ {
+ invoker.RemoveInfoEvents();
+ }
+ else if (obj == refreshMenuItem){
+ invoker.Refresh();
+ }
+ else if (obj == acknowledgeMenuItem){
+ invoker.Acknowledge();
+ }
+
+ }
+
+
+ /**
+ * force JTable only later
+ */
+ public void show(Component c, int x, int y)
+ {
+ invoker = (AlarmTable)c;
+ /*
+ if (iconsLoaded == false)
+ {
+ loadIcons();
+ iconsLoaded = true;
+ }
+ */
+
+
+ Point p = new Point(x,y);
+ int row = invoker.rowAtPoint(p);
+ int col = invoker.columnAtPoint(p);
+
+ /*
+ if ((row >= 0) && (col >= 0))
+ enableMenu();
+ else
+ {
+ disableMenu();
+ return;
+ }
+ */
+
+ DefaultTableModel model = (DefaultTableModel)invoker.getModel();
+ Boolean acknowledge = (Boolean) model.getValueAt(row,AlarmTableModel.ACK);
+ if(acknowledge.booleanValue()){
+ acknowledgeMenuItem.setEnabled(false);
+ }
+ else{
+ acknowledgeMenuItem.setEnabled(true);
+ }
+ this.x = x;
+ this.y = y;
+ super.show(c,x,y);
+ }
+
+
+ void disableMenu()
+ {
+ openMenuItem.setEnabled(false);
+ removeAllMenuItem.setEnabled(false);
+ removeReadMenuItem.setEnabled(false);
+ removeInfoMenuItem.setEnabled(false);
+ }
+
+
+ void enableMenu()
+ {
+ openMenuItem.setEnabled(true);
+ removeAllMenuItem.setEnabled(true);
+ removeReadMenuItem.setEnabled(true);
+ removeInfoMenuItem.setEnabled(true);
+ }
+}
+
+//$History:$
diff --git a/data/mnet/Common/Java/com/jetcell/MibWM/AlarmTableSorter.java b/data/mnet/Common/Java/com/jetcell/MibWM/AlarmTableSorter.java
new file mode 100644
index 0000000..ead2e89
--- /dev/null
+++ b/data/mnet/Common/Java/com/jetcell/MibWM/AlarmTableSorter.java
@@ -0,0 +1,97 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Class : AlarmTableSorter
+// Desc : table sorter for Order explorer request table.
+// Author : George Zhao
+// Hist : June 18, 1999
+//
+//////////////////////////////////////////////////////////////////////////////
+
+package com.jetcell.MibWM;
+
+import java.awt.*;
+import java.util.*;
+import javax.swing.table.*;
+
+
+
+class AlarmTableSorter extends TableSorter
+{
+ public AlarmTableSorter (TableModel model)
+ {
+ super (model);
+ }
+
+ public int compareRowsByColumn(int row1, int row2, int column)
+ {
+ TableModel data = model;
+
+ // Check for nulls
+
+ Object o1 = data.getValueAt(row1, column);
+ Object o2 = data.getValueAt(row2, column);
+
+ // If both values are null return 0
+ if (o1 == null && o2 == null) {
+ return 0;
+ }
+ else if (o1 == null) { // Define null less than everything.
+ return -1;
+ }
+ else if (o2 == null) {
+ return 1;
+ }
+
+ try {
+ if (column == AlarmTableModel.ALARMID ) {
+
+ float id1 = (new Float (((String)data.getValueAt(row1, AlarmTableModel.ALARMID)).trim())).floatValue();
+ float id2 = (new Float (((String)data.getValueAt(row2, AlarmTableModel.ALARMID)).trim())).floatValue();
+
+
+ if (id1 < id2)
+ return -1;
+ else if (id1 > id2)
+ return 1;
+ else
+ return 0;
+ }
+ else if (column == AlarmTableModel.READ)
+ {
+ boolean b1 = ((Boolean) data.getValueAt(row1, column)).booleanValue();
+ boolean b2 = ((Boolean) data.getValueAt(row2, column)).booleanValue();
+
+ if(b1 && !b2) return -1;
+ else if(!b1 && b2) return 1;
+ else return 0;
+ }
+ else if (column == AlarmTableModel.ACK)
+ {
+ boolean b1 = ((Boolean) data.getValueAt(row1, column)).booleanValue();
+ boolean b2 = ((Boolean) data.getValueAt(row2, column)).booleanValue();
+
+ if(b1 && !b2) return -1;
+ else if(!b1 && b2) return 1;
+ else return 0;
+ }
+ else {
+ String s1 = (String)data.getValueAt(row1, column);
+ String s2 = (String)data.getValueAt(row2, column);
+ int result = s1.compareTo(s2);
+
+ if (result < 0)
+ return -1;
+ else if (result > 0)
+ return 1;
+ else return 0;
+ }
+ }
+ catch (NumberFormatException e)
+ {
+ System.out.println(e);
+ }
+
+ return 0;
+ }
+}
+//$History:$
diff --git a/data/mnet/Common/Java/com/jetcell/MibWM/BaseTable.java b/data/mnet/Common/Java/com/jetcell/MibWM/BaseTable.java
new file mode 100644
index 0000000..c9559f3
--- /dev/null
+++ b/data/mnet/Common/Java/com/jetcell/MibWM/BaseTable.java
@@ -0,0 +1,312 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Class : BaseTable
+// Desc :
+// Author : George Zhao
+// Hist : 06/17/1999 Initial Creation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+package com.jetcell.MibWM;
+
+import java.util.*;
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.border.*;
+import javax.swing.table.*;
+import javax.swing.event.*;
+
+public class BaseTable extends JTable
+{
+ static final int KEY_UP = 1;
+ static final int KEY_DOWN = 2;
+ static final int KEY_HOME = 3;
+ static final int KEY_END = 4;
+ static final int KEY_PGUP = 5;
+ static final int KEY_PGDN = 6;
+
+ JTableHeader tableHeader;
+ TableModel model;
+ TableSorter sorter;
+ static JPopupMenu popupMenu;
+
+ public BaseTable()
+ {
+ super();
+ modTable();
+ }
+
+ public BaseTable(Object[][] data, Object[] cols)
+ {
+ super(data,cols);
+ modTable();
+
+ }
+
+ public BaseTable(TableModel dm)
+ {
+ super();
+ model = dm;
+ modTable();
+ }
+
+
+ public BaseTable(TableModel dm, TableColumnModel cm)
+ {
+ super(dm, cm);
+ model = dm;
+ modTable();
+ }
+
+
+ public BaseTable(TableModel dm, TableColumnModel cm, ListSelectionModel sm)
+ {
+ super(dm, cm, sm);
+ model = dm;
+ modTable();
+ }
+
+
+ public BaseTable(int numRows, int numColumns)
+ {
+ super(numRows, numColumns);
+ modTable();
+ }
+
+
+ public BaseTable(Vector rowData, Vector columnNames)
+ {
+ super(rowData, columnNames);
+ modTable();
+ }
+
+ public void setPopupMenu (JPopupMenu popupMenu)
+ {
+ this.popupMenu = popupMenu;
+ }
+
+ public JPopupMenu getPopupMenu()
+ {
+ return popupMenu;
+ }
+
+
+ void modTable()
+ {
+ addKeyboardHooks();
+ addHeaderHooks();
+
+ popupMenu = TablePopupMenu.getPopupMenu();
+ add(popupMenu);
+ addMouseListener(new MouseHandler() );
+ }
+
+
+ void addHeaderHooks()
+ {
+ if( model != null )
+ {
+ sorter = new TableSorter( model );
+ sorter.addMouseListenerToHeaderInTable( this );
+ super.setModel( sorter );
+ }
+
+ }
+
+ public boolean isCellEditable(int i, int j)
+ {
+ return false;
+ }
+
+ public void makeCurrentRowVisible()
+ {
+ scrollRectToVisible(getCellRect(getSelectedRow(),0 , true));
+ }
+
+ public void selectFirstRow()
+ {
+ getSelectionModel().setSelectionInterval(0,0);
+ }
+
+ void addKeyboardHooks()
+ {
+ //debug("adding table hooks");
+ int criteria;
+ criteria = WHEN_IN_FOCUSED_WINDOW;
+ //criteria = WHEN_FOCUSED;
+ registerKeyboardAction(new TableKeyboardHandler(KEY_UP) , KeyStroke.getKeyStroke(KeyEvent.VK_UP,0), criteria);
+ registerKeyboardAction(new TableKeyboardHandler(KEY_DOWN), KeyStroke.getKeyStroke(KeyEvent.VK_DOWN,0), criteria);
+ registerKeyboardAction(new TableKeyboardHandler(KEY_HOME), KeyStroke.getKeyStroke(KeyEvent.VK_HOME,0), criteria);
+ registerKeyboardAction(new TableKeyboardHandler(KEY_END) , KeyStroke.getKeyStroke(KeyEvent.VK_END,0), criteria);
+ registerKeyboardAction(new TableKeyboardHandler(KEY_PGUP), KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP,0), criteria);
+ registerKeyboardAction(new TableKeyboardHandler(KEY_PGDN), KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN,0), criteria);
+ }
+
+ class TableKeyboardHandler extends AbstractAction
+ {
+ int key;
+ int pageInc = 5; // fix later to found out number of visible rows!
+ int row;
+ int lastRow;
+
+ public TableKeyboardHandler(int key)
+ {
+ this.key = key;
+ }
+
+ public void actionPerformed(ActionEvent e)
+ {
+ switch(key)
+ {
+ case KEY_UP :
+ //debug("Up arrow");
+ row = getSelectedRow();
+ if (row <= 0)
+ getToolkit().beep();
+ else
+ {
+ row=row-1;
+ setRowSelectionInterval (row,row);
+ updateUI();
+ }
+ break;
+
+ case KEY_DOWN :
+ //debug("Down arrow");
+ row = getSelectedRow();
+ if ((row == getRowCount()-1) || (row < 0))
+ getToolkit().beep();
+ else
+ {
+ row++;
+ setRowSelectionInterval (row,row);
+ updateUI();
+ }
+ break;
+
+ case KEY_HOME :
+ //debug("Home key");
+ row = getSelectedRow();
+ if (row <= 0)
+ getToolkit().beep();
+ else
+ {
+ setRowSelectionInterval (0,0);
+ updateUI();
+ }
+ break;
+
+ case KEY_END :
+ //debug("End key");
+ lastRow = getRowCount()-1;
+ row = getSelectedRow();
+ if ((row == lastRow) || (row < 0))
+ getToolkit().beep();
+ else
+ {
+ setRowSelectionInterval (lastRow,lastRow);
+ updateUI();
+ }
+ break;
+
+ case KEY_PGUP :
+ //debug("Page up");
+ row = getSelectedRow();
+ if (row <= 0)
+ getToolkit().beep();
+ else if (row-pageInc <= 0)
+ {
+ setRowSelectionInterval (0,0);
+ updateUI();
+ }
+ else
+ {
+ row=row-pageInc;
+ setRowSelectionInterval (row,row);
+ updateUI();
+ }
+ break;
+
+ case KEY_PGDN :
+ //debug("Page down");
+ int lastRow = getRowCount()-1;
+ row = getSelectedRow();
+ if ((row == lastRow) || (row < 0))
+ getToolkit().beep();
+ else if (row+pageInc >= lastRow)
+ {
+ setRowSelectionInterval (lastRow,lastRow);
+ updateUI();
+ }
+ else
+ {
+ row+=pageInc;
+ setRowSelectionInterval (row,row);
+ updateUI();
+ }
+ break;
+
+ default :
+ System.out.println("Key not handled " + key);
+ break;
+ }
+
+ makeCurrentRowVisible();
+ }
+
+ }
+
+
+ class MouseHandler extends MouseAdapter
+ {
+ public void mouseReleased(MouseEvent e)
+ {
+ if ( e.isPopupTrigger())
+ {
+ popupMenu.show(BaseTable.this, e.getX(), e.getY());
+ }
+ }
+ }
+
+ public void setScrollPane(JScrollPane p)
+ {
+ // only here for compatibility with drop1 code. remove later!
+ }
+
+ public void setColumnWidth(int columnIndex, int minWidth, int maxWidth)
+ {
+ TableColumn column = (TableColumn) getColumn( getColumnName( columnIndex ) );
+
+ column.setMinWidth(minWidth);
+ column.setMaxWidth(maxWidth);
+ }
+
+ public String getDataFromTable( int col )
+ {
+ if ( getRowCount() > 0 )
+ {
+ int row = getSelectedRow();
+
+ if (row < 0)
+ {
+ setRowSelectionInterval(0,0);
+ row = getSelectedRow();
+ }
+
+ return (String) getModel().getValueAt( row, col );
+ }
+ else
+ return "";
+ }
+
+ public void setColumnHeaderTitle( int column, String value )
+ {
+ DefaultTableColumnModel cm = (DefaultTableColumnModel)getColumnModel();
+ TableColumn tc = cm.getColumn( column );
+ tc.setHeaderValue( value );
+ }
+
+
+}
+//$History:$ \ No newline at end of file
diff --git a/data/mnet/Common/Java/com/jetcell/MibWM/ImageLoader.java b/data/mnet/Common/Java/com/jetcell/MibWM/ImageLoader.java
new file mode 100644
index 0000000..62111f2
--- /dev/null
+++ b/data/mnet/Common/Java/com/jetcell/MibWM/ImageLoader.java
@@ -0,0 +1,136 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Class : ImageLoader
+// Desc : Use to load images from the Images directory.
+// Author : George Zhao
+// History: April 22, 1999 Intial Creation.
+//////////////////////////////////////////////////////////////////////////////
+
+package com.jetcell.MibWM;
+
+import java.awt.*;
+import java.net.*;
+import java.util.*;
+import javax.swing.*;
+import com.jetcell.MibWM.Images.ImageStub;
+
+public class ImageLoader
+{
+ private static Hashtable imageCache = new Hashtable();
+
+
+ /**
+ * load image from com/jetcell/MibWM/Images
+ */
+ public synchronized static Image loadImage(String filename)
+ {
+ Image image = null;
+
+ /*
+ if (ImageLoader.imageInCache(filename))
+ image = ImageLoader.getImageFromCache(filename);
+ else*/
+ {
+ if ( Util.applet != null )
+ {
+
+ /**
+ * load using applet method
+ */
+
+ try {
+ URL url = new URL(Util.applet.getCodeBase()+ "com/jetcell/MibWM/Images/" + filename);
+ image = Util.applet.getImage(url);
+ }
+ catch(Exception e) {}
+ //image = Util.applet.getImage(Util.applet.getCodeBase(), "com/jetcell/MibWM/Images/" + filename);
+
+
+ if (image == null) System.out.println("Image is NULL: " +filename);
+ }
+ else
+ {
+ /**
+ * load using application method
+ */
+
+ URL url = new ImageStub().getClass().getResource(filename);
+
+ Toolkit tk = java.awt.Toolkit.getDefaultToolkit();
+
+ try
+ {
+ image = tk.createImage((java.awt.image.ImageProducer) url.getContent());
+ }
+ catch (java.io.IOException e)
+ {
+ System.out.println("[ImageLoader] " + e.toString());
+ }
+ }
+
+ /**
+ * block while waiting for image to load
+ */
+
+ if (image != null)
+ {
+ MediaTracker tracker = new MediaTracker(new Component() {} );
+ tracker.addImage(image, 0);
+ try
+ {
+ tracker.waitForID(0);
+ }
+ catch (InterruptedException e)
+ {
+ System.out.println("[ImageLoader] " + e.toString());
+ }
+
+ /**
+ * add to cache
+ */
+ ImageLoader.putImageInCache(filename, image);
+ }
+ }
+
+ return image;
+ }
+
+
+ /**
+ * load icon from com/mci/vdds/Images
+ */
+ public synchronized static ImageIcon loadIcon(String filename)
+ {
+ return new ImageIcon(loadImage(filename));
+ }
+
+ private static boolean imageInCache(String filename)
+ {
+ if (imageCache.containsKey(filename))
+ return true;
+ else
+ return false;
+ }
+
+ private static Image getImageFromCache(String filename)
+ {
+ return (Image)imageCache.get(filename);
+ }
+
+ private static void putImageInCache(String filename, Image image)
+ {
+ imageCache.put(filename, image);
+ }
+
+ public static void main(String argv[])
+ {
+ JFrame f = new JFrame();
+ ImageIcon icon = ImageLoader.loadIcon("closed.gif");
+ JButton b = new JButton(icon);
+ System.out.println("after new messagepanel");
+ f.setBounds(0,0,100,100);
+ f.getContentPane().add(b);
+ f.setVisible(true);
+ }
+}
+//$History:$ \ No newline at end of file
diff --git a/data/mnet/Common/Java/com/jetcell/MibWM/Makefile b/data/mnet/Common/Java/com/jetcell/MibWM/Makefile
new file mode 100644
index 0000000..2bf2ffa
--- /dev/null
+++ b/data/mnet/Common/Java/com/jetcell/MibWM/Makefile
@@ -0,0 +1,38 @@
+####################################################################
+#
+# FILE NAME: Makefile
+#
+# DESCRIPTION: This makefile creates the vipercell related class
+# files
+# COMPONENTS:
+#
+#
+# NOTES:
+#
+# (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+#
+# REVISION HISTORY
+#__________________________________________________________________
+#----------+--------+----------------------------------------------
+# Name | Date | Reason
+#----------+--------+----------------------------------------------
+# Bhawani |11/28/99| Initial Draft
+#----------+--------+----------------------------------------------
+####################################################################
+#/
+
+CODEBASE = ../../..
+
+
+include $(CODEBASE)/java.mk
+
+
+all: $(CLASS_LIST)
+
+
+clean:
+ $(RM) *.class
+
+cleanall:
+ $(RM) *.class
+
diff --git a/data/mnet/Common/Java/com/jetcell/MibWM/TableMap.java b/data/mnet/Common/Java/com/jetcell/MibWM/TableMap.java
new file mode 100644
index 0000000..cdbb4e3
--- /dev/null
+++ b/data/mnet/Common/Java/com/jetcell/MibWM/TableMap.java
@@ -0,0 +1,104 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Class : TableMap
+// Desc :
+// Author : George Zhao
+// Hist : 06/17/1999 Initial Creation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+ * based on Sun TableMap. -gz
+ * @version 1.4 12/17/97
+ * @author Philip Milne */
+
+package com.jetcell.MibWM;
+
+import javax.swing.table.*;
+import javax.swing.event.TableModelListener;
+import javax.swing.event.TableModelEvent;
+
+public class TableMap extends DefaultTableModel implements TableModelListener
+{
+ protected TableModel model;
+
+ public TableModel getModel() {
+ return model;
+ }
+
+ public void setModel(TableModel model) {
+ this.model = model;
+ model.addTableModelListener(this);
+ }
+
+ // By default, Implement TableModel by forwarding all messages
+ // to the model.
+
+ public Object getValueAt(int aRow, int aColumn) {
+ return model.getValueAt(aRow, aColumn);
+ }
+
+ public void setValueAt(Object aValue, int aRow, int aColumn) {
+ model.setValueAt(aValue, aRow, aColumn);
+ }
+
+ public int getRowCount() {
+ return (model == null) ? 0 : model.getRowCount();
+ }
+
+ public int getColumnCount() {
+ return (model == null) ? 0 : model.getColumnCount();
+ }
+
+ public String getColumnName(int aColumn) {
+ return model.getColumnName(aColumn);
+ }
+
+ public Class getColumnClass(int aColumn)
+ {
+ if (model.getColumnCount() == 0)
+ return model.getColumnClass(aColumn);
+
+ Object value = model.getValueAt(0,aColumn);
+ return value == null ? Object.class : value.getClass();
+ }
+
+ public boolean isCellEditable(int row, int column) {
+ return model.isCellEditable(row, column);
+ }
+
+ public void addColumn(Object col)
+ {
+ if ( model instanceof DefaultTableModel )
+ ( (DefaultTableModel)model).addColumn( col );
+ else
+ throw new RuntimeException("ERROR: Subclass of DefaultTableModel required.");
+
+ }
+
+
+ public void addRow(Object rowData[])
+ {
+ ( (DefaultTableModel)model).addRow( rowData );
+ }
+
+ public void removeRow(int rowIndex)
+ {
+ ( (DefaultTableModel)model).removeRow( rowIndex );
+ }
+
+ //
+ // Implementation of the TableModelListener interface,
+ //
+
+ // By default forward all events to all the listeners.
+ public void tableChanged(TableModelEvent e) {
+ fireTableChanged(e);
+ }
+
+ public void insertRow(int row, Object rowData[])
+ {
+ ( (DefaultTableModel)model).insertRow(row, rowData);
+ }
+}
+//$History:$ \ No newline at end of file
diff --git a/data/mnet/Common/Java/com/jetcell/MibWM/TablePopupMenu.java b/data/mnet/Common/Java/com/jetcell/MibWM/TablePopupMenu.java
new file mode 100644
index 0000000..2df4e3e
--- /dev/null
+++ b/data/mnet/Common/Java/com/jetcell/MibWM/TablePopupMenu.java
@@ -0,0 +1,195 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Class : TablePopupMenu
+// Desc :
+// Author : George Zhao
+// Hist : 06/17/1999 Initial Creation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+package com.jetcell.MibWM;
+
+import java.util.*;
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.text.*;
+
+public class TablePopupMenu extends JPopupMenu implements ActionListener
+{
+ static JMenuItem copyCellMenuItem;
+ static JMenuItem copyRowMenuItem;
+ static JMenuItem copyColumnMenuItem;
+ static JMenuItem copyTableMenuItem;
+
+ static boolean iconsLoaded = false;
+ static JTable invoker ;
+
+ static int x;
+ static int y;
+
+ protected static TablePopupMenu popupMenu = new TablePopupMenu();
+
+
+ /**
+ * You cannot instantiate this class. Use getPopupMenu() to get
+ * a shared instance!
+ */
+ protected TablePopupMenu()
+ {
+ copyCellMenuItem = Util.makeMenuItem("Copy Cell",'C');
+ copyCellMenuItem.setHorizontalTextPosition(SwingConstants.RIGHT);
+ copyCellMenuItem.setHorizontalAlignment(SwingConstants.LEFT);
+ copyCellMenuItem.addActionListener(this);
+ add(copyCellMenuItem);
+
+ copyRowMenuItem = Util.makeMenuItem("Copy Row", 'R');
+ copyRowMenuItem.setHorizontalTextPosition(SwingConstants.RIGHT);
+ copyRowMenuItem.setHorizontalAlignment(SwingConstants.LEFT);
+ copyRowMenuItem.addActionListener(this);
+ add(copyRowMenuItem);
+
+ copyColumnMenuItem = Util.makeMenuItem("Copy Column", 'L');
+ copyColumnMenuItem.setHorizontalTextPosition(SwingConstants.RIGHT);
+ copyColumnMenuItem.setHorizontalAlignment(SwingConstants.LEFT);
+ copyColumnMenuItem.addActionListener(this);
+ add(copyColumnMenuItem);
+
+ copyTableMenuItem = Util.makeMenuItem("Copy Table", 'T');
+ copyTableMenuItem.setHorizontalTextPosition(SwingConstants.RIGHT);
+ copyTableMenuItem.setHorizontalAlignment(SwingConstants.LEFT);
+ copyTableMenuItem.addActionListener(this);
+ add(copyTableMenuItem);
+ }
+
+
+ /**
+ * returns shared instance of popupMenu
+ */
+ public static TablePopupMenu getPopupMenu()
+ {
+ return popupMenu;
+ }
+
+
+ /**
+ * update to use difference icons later!
+ */
+ void loadIcons()
+ {
+ if(Util.applet == null)
+ {
+ copyCellMenuItem.setIcon(new ImageIcon(ImageLoader.loadImage("copy.gif")));
+ copyRowMenuItem.setIcon(new ImageIcon(ImageLoader.loadImage("copy.gif")));
+ copyColumnMenuItem.setIcon(new ImageIcon(ImageLoader.loadImage("copy.gif")));
+ copyTableMenuItem.setIcon(new ImageIcon(ImageLoader.loadImage("copy.gif")));
+ }
+ }
+
+
+ /**
+ * update to use shared clipboard access later
+ */
+ public void actionPerformed(ActionEvent e)
+ {
+ Object obj = e.getSource();
+
+ Point p = new Point(x,y);
+ int row = invoker.rowAtPoint(p);
+ int col = invoker.columnAtPoint(p);
+
+ String selection = null;
+
+ if (obj == copyCellMenuItem)
+ {
+ selection = invoker.getValueAt(row,col).toString();
+ }
+ else if (obj == copyRowMenuItem)
+ {
+ for(int i=0; i < invoker.getColumnCount(); i++)
+ {
+ Object cell = invoker.getValueAt(row,i);
+ if (cell != null)
+ selection += cell.toString() + " ";
+ }
+ }
+ else if (obj == copyColumnMenuItem)
+ {
+ for(int i=0; i < invoker.getRowCount(); i++)
+ {
+ Object cell = invoker.getValueAt(i,col);
+ if (cell != null)
+ selection += cell.toString() + " ";
+ }
+ }
+ else if (obj == copyTableMenuItem)
+ {
+ for(int i=0; i < invoker.getRowCount(); i++)
+ {
+ for(int j=0; j < invoker.getColumnCount(); j++)
+ {
+ Object cell = invoker.getValueAt(i,j);
+ if (cell != null)
+ selection += cell.toString() + " ";
+ }
+
+ selection += "\n";
+ }
+ }
+
+
+ TextClipboard.setText(selection);
+
+ }
+
+
+ /**
+ * force JTable only later
+ */
+ public void show(Component c, int x, int y)
+ {
+ invoker = (JTable)c;
+
+ if (iconsLoaded == false)
+ {
+ loadIcons();
+ iconsLoaded = true;
+ }
+
+ Point p = new Point(x,y);
+ int row = invoker.rowAtPoint(p);
+ int col = invoker.columnAtPoint(p);
+
+ if ((row >= 0) && (col >= 0))
+ enableMenu();
+ else
+ {
+ disableMenu();
+ return;
+ }
+
+ this.x = x;
+ this.y = y;
+ super.show(c,x,y);
+ }
+
+
+ void disableMenu()
+ {
+ copyCellMenuItem.setEnabled(false);
+ copyRowMenuItem.setEnabled(false);
+ copyColumnMenuItem.setEnabled(false);
+ copyTableMenuItem.setEnabled(false);
+ }
+
+
+ void enableMenu()
+ {
+ copyCellMenuItem.setEnabled(true);
+ copyRowMenuItem.setEnabled(true);
+ copyColumnMenuItem.setEnabled(true);
+ copyTableMenuItem.setEnabled(true);
+ }
+}
+
+//$History:$ \ No newline at end of file
diff --git a/data/mnet/Common/Java/com/jetcell/MibWM/TableSorter.java b/data/mnet/Common/Java/com/jetcell/MibWM/TableSorter.java
new file mode 100644
index 0000000..51324bb
--- /dev/null
+++ b/data/mnet/Common/Java/com/jetcell/MibWM/TableSorter.java
@@ -0,0 +1,360 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Class : TableSorter
+// Desc :
+// Author : George Zhao
+// Hist : 06/17/1999 Initial Creation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+/**
+ * based on Sun TableSorter. -gz
+ * @version 1.5 12/17/97
+ * @author Philip Milne
+ */
+
+package com.jetcell.MibWM;
+
+import java.util.*;
+
+import javax.swing.table.TableModel;
+import javax.swing.event.TableModelEvent;
+
+// Imports for picking up mouse events from the JTable.
+
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.InputEvent;
+import javax.swing.JTable;
+import javax.swing.table.JTableHeader;
+import javax.swing.table.TableColumn;
+import javax.swing.table.TableColumnModel;
+
+public class TableSorter extends TableMap
+{
+ int indexes[];
+ Vector sortingColumns = new Vector();
+ boolean ascending = true;
+ int compares;
+ int sortByColumnInd = 1;
+
+ public TableSorter()
+ {
+ indexes = new int[0]; // For consistency.
+ }
+
+ public TableSorter(TableModel model)
+ {
+ setModel(model);
+ }
+
+ public void setModel(TableModel model) {
+ super.setModel(model);
+ reallocateIndexes();
+ }
+
+ public int compareRowsByColumn(int row1, int row2, int column)
+ {
+ Class type = model.getColumnClass(column);
+
+ TableModel data = model;
+
+ // Check for nulls
+
+ Object o1 = data.getValueAt(row1, column);
+ Object o2 = data.getValueAt(row2, column);
+
+ // If both values are null return 0
+ if (o1 == null && o2 == null) {
+ return 0;
+ }
+ else if (o1 == null) { // Define null less than everything.
+ return -1;
+ }
+ else if (o2 == null) {
+ return 1;
+ }
+
+/* We copy all returned values from the getValue call in case
+an optimised model is reusing one object to return many values.
+The Number subclasses in the JDK are immutable and so will not be used in
+this way but other subclasses of Number might want to do this to save
+space and avoid unnecessary heap allocation.
+*/
+ if (type.getSuperclass() == java.lang.Number.class)
+ {
+ Number n1 = (Number)data.getValueAt(row1, column);
+ double d1 = n1.doubleValue();
+ Number n2 = (Number)data.getValueAt(row2, column);
+ double d2 = n2.doubleValue();
+
+ if (d1 < d2)
+ return -1;
+ else if (d1 > d2)
+ return 1;
+ else
+ return 0;
+ }
+ else if (type == java.util.Date.class)
+ {
+ Date d1 = (Date)data.getValueAt(row1, column);
+ long n1 = d1.getTime();
+ Date d2 = (Date)data.getValueAt(row2, column);
+ long n2 = d2.getTime();
+
+ if (n1 < n2)
+ return -1;
+ else if (n1 > n2)
+ return 1;
+ else return 0;
+ }
+ else if (type == String.class)
+ {
+ String s1 = (String)data.getValueAt(row1, column);
+ String s2 = (String)data.getValueAt(row2, column);
+ int result = s1.compareTo(s2);
+
+ if (result < 0)
+ return -1;
+ else if (result > 0)
+ return 1;
+ else return 0;
+ }
+ else if (type == Boolean.class)
+ {
+ Boolean bool1 = (Boolean)data.getValueAt(row1, column);
+ boolean b1 = bool1.booleanValue();
+ Boolean bool2 = (Boolean)data.getValueAt(row2, column);
+ boolean b2 = bool2.booleanValue();
+
+ if (b1 == b2)
+ return 0;
+ else if (b1) // Define false < true
+ return 1;
+ else
+ return -1;
+ }
+ else
+ {
+ Object v1 = data.getValueAt(row1, column);
+ String s1 = v1.toString();
+ Object v2 = data.getValueAt(row2, column);
+ String s2 = v2.toString();
+ int result = s1.compareTo(s2);
+
+ if (result < 0)
+ return -1;
+ else if (result > 0)
+ return 1;
+ else return 0;
+ }
+ }
+
+ public int compare(int row1, int row2)
+ {
+ compares++;
+ for(int level = 0; level < sortingColumns.size(); level++)
+ {
+ Integer column = (Integer)sortingColumns.elementAt(level);
+ int result = compareRowsByColumn(row1, row2, column.intValue());
+ if (result != 0)
+ return ascending ? result : -result;
+ }
+ return 0;
+ }
+
+ public void reallocateIndexes()
+ {
+ int rowCount = model.getRowCount();
+ // Set up a new array of indexes with the right number of elements
+ // for the new data model.
+ indexes = new int[rowCount];
+
+ // Initialise with the identity mapping.
+ for(int row = 0; row < rowCount; row++)
+ indexes[row] = row;
+ }
+
+ public void tableChanged(TableModelEvent e)
+ {
+ reallocateIndexes();
+ super.tableChanged(e);
+ sortByColumnInd();
+ }
+
+ public void checkModel()
+ {
+ if ( indexes.length == 0 )
+ reallocateIndexes();
+
+ if (indexes.length != model.getRowCount()) {
+ System.out.println("Sorter not informed of a change in model.");
+ }
+ }
+
+ public void sort(Object sender)
+ {
+ checkModel();
+
+ compares = 0;
+ // n2sort();
+ // qsort(0, indexes.length-1);
+ shuttlesort((int[])indexes.clone(), indexes, 0, indexes.length);
+ }
+
+ public void n2sort() {
+ for(int i = 0; i < getRowCount(); i++) {
+ for(int j = i+1; j < getRowCount(); j++) {
+ if (compare(indexes[i], indexes[j]) == -1) {
+ swap(i, j);
+ }
+ }
+ }
+ }
+
+ // This is a home-grown implementation which we have not had time
+ // to research - it may perform poorly in some circumstances. It
+ // requires twice the space of an in-place algorithm and makes
+ // NlogN assigments shuttling the values between the two
+ // arrays. The number of compares appears to vary between N-1 and
+ // NlogN depending on the initial order but the main reason for
+ // using it here is that, unlike qsort, it is stable.
+ public void shuttlesort(int from[], int to[], int low, int high) {
+ if (high - low < 2) {
+ return;
+ }
+ int middle = (low + high)/2;
+ shuttlesort(to, from, low, middle);
+ shuttlesort(to, from, middle, high);
+
+ int p = low;
+ int q = middle;
+
+ /* This is an optional short-cut; at each recursive call,
+ check to see if the elements in this subset are already
+ ordered. If so, no further comparisons are needed; the
+ sub-array can just be copied. The array must be copied rather
+ than assigned otherwise sister calls in the recursion might
+ get out of sinc. When the number of elements is three they
+ are partitioned so that the first set, [low, mid), has one
+ element and and the second, [mid, high), has two. We skip the
+ optimisation when the number of elements is three or less as
+ the first compare in the normal merge will produce the same
+ sequence of steps. This optimisation seems to be worthwhile
+ for partially ordered lists but some analysis is needed to
+ find out how the performance drops to Nlog(N) as the initial
+ order diminishes - it may drop very quickly. */
+
+ if (high - low >= 4 && compare(from[middle-1], from[middle]) <= 0) {
+ for (int i = low; i < high; i++) {
+ to[i] = from[i];
+ }
+ return;
+ }
+
+ // A normal merge.
+
+ for(int i = low; i < high; i++) {
+ if (q >= high || (p < middle && compare(from[p], from[q]) <= 0)) {
+ to[i] = from[p++];
+ }
+ else {
+ to[i] = from[q++];
+ }
+ }
+ }
+
+ public void swap(int i, int j) {
+ int tmp = indexes[i];
+ indexes[i] = indexes[j];
+ indexes[j] = tmp;
+ }
+
+ public boolean getAscending()
+ {
+ return ascending;
+ }
+
+ // The mapping only affects the contents of the data rows.
+ // Pass all requests to these rows through the mapping array: "indexes".
+
+ public Object getValueAt(int aRow, int aColumn)
+ {
+ checkModel();
+ if (aRow >= 0 && aRow <model.getRowCount())
+ return model.getValueAt(indexes[aRow], aColumn);
+ return null;
+ }
+
+ public void setValueAt(Object aValue, int aRow, int aColumn)
+ {
+ checkModel();
+ model.setValueAt(aValue, indexes[aRow], aColumn);
+ }
+
+ public void sortByColumn(int column) {
+ sortByColumn(column, true);
+ }
+
+ public void sortByColumn(int column, boolean ascending) {
+ this.ascending = ascending;
+ sortingColumns.removeAllElements();
+ sortingColumns.addElement(new Integer(column));
+ sort(this);
+ super.tableChanged(new TableModelEvent(this));
+ }
+
+ // There is no-where else to put this.
+ // Add a mouse listener to the Table to trigger a table sort
+ // when a column heading is clicked in the JTable.
+ public void addMouseListenerToHeaderInTable(JTable table) {
+ final TableSorter sorter = this;
+ final JTable tableView = table;
+ tableView.setColumnSelectionAllowed(false);
+ MouseAdapter listMouseListener = new MouseAdapter() {
+ public void mouseClicked(MouseEvent e) {
+ TableColumnModel columnModel = tableView.getColumnModel();
+ int viewColumn = columnModel.getColumnIndexAtX(e.getX());
+ sortByColumnInd = tableView.convertColumnIndexToModel(viewColumn);
+ if(e.getClickCount() == 1 && sortByColumnInd != -1) {
+ int shiftPressed = e.getModifiers()&InputEvent.SHIFT_MASK;
+ //boolean ascending = (shiftPressed == 0);
+ boolean ascending = getAscending();
+ sorter.sortByColumn(sortByColumnInd, ascending);
+ }
+ }
+ };
+ JTableHeader th = tableView.getTableHeader();
+ th.addMouseListener(listMouseListener);
+ }
+
+ public void sortByColumnInd(){
+ sortByColumn(sortByColumnInd);
+ }
+ public void filteredRemoveRow(int row){
+ checkModel();
+ super.removeRow(indexes[row]);
+ }
+
+ public int getIndexAtRow(int row){
+ return indexes[row];
+ }
+}
+
+
+// $Log: TableSorter.java,v $
+// Revision 1.2 1999-12-21 13:35:06-08 klim
+// Fixes sorting reset problem
+//
+// Revision 1.1 1999-11-28 22:51:20-08 bsapkota
+// Initial revision
+//
+//
+// Rev 1.6 Jun 23 1998 12:13:00 GZHAO
+//add boundary check.
+//
+// Rev 1.5 Jun 02 1998 14:11:22 GZHAO
+//toggle the ascending for table sort.
+//
+// Rev 1.4 Jun 02 1998 12:52:10 GZHAO
+//modify System.out to Debug.out.
diff --git a/data/mnet/Common/Java/com/jetcell/MibWM/TextClipboard.java b/data/mnet/Common/Java/com/jetcell/MibWM/TextClipboard.java
new file mode 100644
index 0000000..a7876db
--- /dev/null
+++ b/data/mnet/Common/Java/com/jetcell/MibWM/TextClipboard.java
@@ -0,0 +1,80 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Class : TextClipboard
+// Desc : Clipboard abstraction for working in both applet and application
+// Author : George Zhao
+// Created: 6/8/98
+//
+//////////////////////////////////////////////////////////////////////////////
+
+package com.jetcell.MibWM;
+
+import java.io.*;
+import java.awt.*;
+import java.awt.datatransfer.*;
+
+public abstract class TextClipboard
+{
+ private static String clipboard;
+
+ private static ClipboardOwner defaultClipboardOwner = new ClipboardObserver();
+
+ static class ClipboardObserver implements ClipboardOwner
+ {
+ public void lostOwnership(Clipboard clipboard, Transferable contents)
+ {
+ }
+ }
+
+
+ /**
+ * Set the value of the clipboard
+ * @param s string value
+ */
+ public static synchronized void setText(String s)
+ {
+ if (s == null)
+ s = "";
+
+ if (Util.applet != null)
+ clipboard = s;
+ else
+ Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(s), defaultClipboardOwner);
+ }
+
+
+ /**
+ * Get the string contents of the clipboard
+ */
+ public static synchronized String getText()
+ {
+ if (Util.applet != null)
+ return clipboard;
+ else
+ {
+ String s = null;
+ Transferable t = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(defaultClipboardOwner);
+ if (t == null)
+ return "";
+ else
+ try
+ {
+ s = (String)(t.getTransferData(DataFlavor.stringFlavor));
+ }
+ catch (UnsupportedFlavorException e)
+ {
+ System.out.println(e);
+ }
+ catch (IOException e)
+ {
+ System.out.println(e);
+ }
+ finally
+ {
+ return s;
+ }
+ }
+ }
+}
+
+//$History:$ \ No newline at end of file
diff --git a/data/mnet/Common/Java/com/jetcell/MibWM/TextComponentPopupMenu.java b/data/mnet/Common/Java/com/jetcell/MibWM/TextComponentPopupMenu.java
new file mode 100644
index 0000000..a653722
--- /dev/null
+++ b/data/mnet/Common/Java/com/jetcell/MibWM/TextComponentPopupMenu.java
@@ -0,0 +1,280 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Class : TextComponentPopupMenu
+// Desc : Specialized popup menu for subclasses of JTextComponent
+// Author : George Zhao
+//
+//////////////////////////////////////////////////////////////////////////////
+
+package com.jetcell.MibWM;
+
+import java.util.*;
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.text.*;
+
+/**
+ * Custom popup menu for subclasses of JTextComponent. Includes cut,copy,paste,
+ * paste recent, and delete.
+ *
+ * @see VDDSTextField
+ * @version 1.0
+ * @author Semir Patel
+ */
+
+public class TextComponentPopupMenu extends JPopupMenu implements ActionListener
+{
+ /**
+ * Maximum number of elements in Paste Recent submenu
+ */
+ static final int RECENT_LIST_SIZE = 4;
+
+
+ /**
+ * Popup menu items
+ */
+ static JMenuItem cutMenuItem;
+ static JMenuItem copyMenuItem;
+ static JMenuItem pasteMenuItem;
+ static JMenu pasteRecentMenu;
+ static JMenuItem deleteMenuItem;
+ static JMenuItem descriptionMenuItem;
+
+ static boolean iconsLoaded = false;
+
+ /**
+ * JTextComponent that invokes this popup menu
+ */
+ static JTextComponent invoker;
+
+
+ /**
+ * Starting and ending selection indices for the text component
+ */
+ static int start;
+ static int end;
+
+ /**
+ * shared instance of popup menu
+ */
+ protected static TextComponentPopupMenu popupMenu = new TextComponentPopupMenu();
+
+
+ private TextComponentPopupMenu()
+ {
+ cutMenuItem = Util.makeMenuItem("Cut",'t');
+ cutMenuItem.setHorizontalTextPosition(SwingConstants.RIGHT);
+ cutMenuItem.setHorizontalAlignment(SwingConstants.LEFT);
+ cutMenuItem.addActionListener(this);
+ add(cutMenuItem);
+
+ copyMenuItem = Util.makeMenuItem("Copy",'C');
+ copyMenuItem.setHorizontalTextPosition(SwingConstants.RIGHT);
+ copyMenuItem.setHorizontalAlignment(SwingConstants.LEFT);
+ copyMenuItem.addActionListener(this);
+ add(copyMenuItem);
+
+ pasteMenuItem = Util.makeMenuItem("Paste",'P');
+ pasteMenuItem.setHorizontalTextPosition(SwingConstants.RIGHT);
+ pasteMenuItem.setHorizontalAlignment(SwingConstants.LEFT);
+ pasteMenuItem.addActionListener(this);
+ add(pasteMenuItem);
+
+ pasteRecentMenu = new JMenu("Paste Recent");
+ pasteRecentMenu.setHorizontalTextPosition(SwingConstants.RIGHT);
+ pasteRecentMenu.setHorizontalAlignment(SwingConstants.LEFT);
+ pasteRecentMenu.registerKeyboardAction(null, KeyStroke.getKeyStroke('R',java.awt.Event.ALT_MASK,false),
+ JComponent.WHEN_IN_FOCUSED_WINDOW);
+ add(pasteRecentMenu);
+
+ deleteMenuItem = Util.makeMenuItem("Delete",'D');
+ deleteMenuItem.setHorizontalTextPosition(SwingConstants.RIGHT);
+ deleteMenuItem.setHorizontalAlignment(SwingConstants.LEFT);
+ deleteMenuItem.addActionListener(this);
+ add(deleteMenuItem);
+
+ addSeparator();
+ descriptionMenuItem = Util.makeMenuItem("Description", 'P');
+ descriptionMenuItem.setHorizontalTextPosition(SwingConstants.RIGHT);
+ descriptionMenuItem.setHorizontalAlignment(SwingConstants.LEFT);
+ descriptionMenuItem.addActionListener(this);
+ add(descriptionMenuItem);
+ }
+
+
+ /**
+ * accessor for shared instance of popup menu
+ */
+ public static TextComponentPopupMenu getPopupMenu()
+ {
+ return popupMenu;
+ }
+
+ void loadIcons()
+ {
+ cutMenuItem.setIcon(new ImageIcon(ImageLoader.loadImage("cut.gif")));
+ copyMenuItem.setIcon(new ImageIcon(ImageLoader.loadImage("copy.gif")));
+ pasteMenuItem.setIcon(new ImageIcon(ImageLoader.loadImage("paste.gif")));
+ pasteRecentMenu.setIcon(new ImageIcon(ImageLoader.loadImage("pasterecent.gif")));
+ deleteMenuItem.setIcon(new ImageIcon(ImageLoader.loadImage("delete.gif")));
+ }
+
+ /**
+ * Action listener for menu items
+ */
+ public void actionPerformed(ActionEvent e)
+ {
+ if (e.getSource() == cutMenuItem)
+ {
+ invoker.select(start,end);
+ TextClipboard.setText(invoker.getSelectedText());
+ invoker.replaceSelection("");
+ }
+ else if (e.getSource() == copyMenuItem)
+ {
+ invoker.select(start,end);
+ TextClipboard.setText(invoker.getSelectedText());
+ }
+ else if (e.getSource() == pasteMenuItem)
+ {
+ invoker.replaceSelection(TextClipboard.getText());
+ }
+ else if (e.getSource() == deleteMenuItem)
+ {
+ invoker.select(start,end);
+ invoker.replaceSelection("");
+ }
+ else if (e.getSource() == descriptionMenuItem)
+ {
+ /*
+ JOptionPane.showMessageDialog(Util.browser,
+ "Description of this field, range, detail meaning etc goes here.",
+ "Description", JOptionPane.INFORMATION_MESSAGE);
+ */
+ }
+ else if (e.getSource() instanceof JMenuItem)
+ {
+ invoker.select(start,end);
+ invoker.replaceSelection(((JMenuItem)e.getSource()).getText());
+ }
+
+ }
+
+ /**
+ * Shows popup menu at specified coords with text component selection info
+ * @param c Invoker
+ * @param x Absolute x location
+ * @param y Absolute y location
+ * @param start Start index of selection
+ * @param end End index of selection
+ */
+ public void show(Component c, int x, int y, int start, int end)
+ {
+ this.start = start;
+ this.end = end;
+ show(c,x,y);
+ }
+
+ public void show(Component c, int x, int y)
+ {
+ if (iconsLoaded == false)
+ {
+ loadIcons();
+ iconsLoaded = true;
+ }
+
+ if (c instanceof JTextComponent)
+ {
+ invoker = (JTextComponent)c;
+ int len = invoker.getText().length();
+ if (!invoker.isEditable())
+ {
+ cutMenuItem.setEnabled(false);
+ pasteMenuItem.setEnabled(false);
+ pasteRecentMenu.setEnabled(false);
+ deleteMenuItem.setEnabled(false);
+
+ if (len > 0)
+ copyMenuItem.setEnabled(true);
+ else
+ copyMenuItem.setEnabled(false);
+ }
+ else
+ {
+ if ((len > 0) && (start != end))
+ {
+ cutMenuItem.setEnabled(true);
+ copyMenuItem.setEnabled(true);
+ deleteMenuItem.setEnabled(true);
+ }
+ else
+ {
+ cutMenuItem.setEnabled(false);
+ copyMenuItem.setEnabled(false);
+ deleteMenuItem.setEnabled(false);
+ }
+
+ pasteMenuItem.setEnabled(true);
+
+ if (pasteRecentMenu.getMenuComponentCount() > 0)
+ pasteRecentMenu.setEnabled(true);
+ else
+ pasteRecentMenu.setEnabled(false);
+ }
+
+ super.show(invoker,x,y);
+ }
+ }
+
+ /**
+ * Adds entry to Paste Recent menu. List works like FIFO queue.
+ * @param s String to add to the paste recent menu
+ */
+ void addToMostRecentList(String s)
+ {
+ int cnt = pasteRecentMenu.getItemCount();
+
+ for (int i=0; i<cnt; i++)
+ if (pasteRecentMenu.getItem(i).getText().equals(s))
+ return;
+
+ if (cnt < RECENT_LIST_SIZE)
+ {
+ JMenuItem menuItem = Util.makeMenuItem();
+ pasteRecentMenu.add(menuItem);
+ menuItem.addActionListener(this);
+ cnt = pasteRecentMenu.getMenuComponentCount();
+
+ if (cnt == 1)
+ pasteRecentMenu.getItem(0).setText(s);
+ else
+ {
+ for (int i=cnt-1; i>=1; i--)
+ pasteRecentMenu.getItem(i).setText(pasteRecentMenu.getItem(i-1).getText());
+ pasteRecentMenu.getItem(0).setText(s);
+ }
+
+ }
+ else
+ {
+ for (int i=cnt-1; i>=1; i--)
+ pasteRecentMenu.getItem(i).setText(pasteRecentMenu.getItem(i-1).getText());
+ pasteRecentMenu.getItem(0).setText(s);
+ }
+ }
+
+ public void setVisible(boolean b)
+ {
+ /**
+ * Workaround for swing 0.7 bug.
+ * Get rid of visible submenu if showing
+ */
+ if (b == false)
+ pasteRecentMenu.setPopupMenuVisible(false);
+
+ super.setVisible(b);
+ }
+
+}
+//$History:$ \ No newline at end of file
diff --git a/data/mnet/Common/Java/com/jetcell/MibWM/Util.java b/data/mnet/Common/Java/com/jetcell/MibWM/Util.java
new file mode 100644
index 0000000..9612b8e
--- /dev/null
+++ b/data/mnet/Common/Java/com/jetcell/MibWM/Util.java
@@ -0,0 +1,779 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Class : Util
+// Desc : Utility class for MIB Web Management
+// Author : George Zhao
+// History: April 22, 1999
+//
+//////////////////////////////////////////////////////////////////////////////
+
+package com.jetcell.MibWM;
+
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.border.*;
+import javax.swing.text.*;
+import javax.swing.event.*;
+
+import java.applet.*;
+import java.util.*;
+
+
+public abstract class Util
+{
+ public static TitledBorder titleBorder;
+ static JPanel p;
+ public static Applet applet = null;
+
+ //undo
+ public static boolean debug = false;
+
+ public static final int BORDER_INSET = 5;
+
+ public static final Border EMPTY_BORDER_STYLE = new EmptyBorder(BORDER_INSET, BORDER_INSET, BORDER_INSET, BORDER_INSET);
+ public static final Border BORDER_STYLE = new CompoundBorder(new EmptyBorder(BORDER_INSET, BORDER_INSET, BORDER_INSET, BORDER_INSET),
+ new CompoundBorder(new EtchedBorder(Color.gray, Color.white),
+ new EmptyBorder(BORDER_INSET, BORDER_INSET, BORDER_INSET, BORDER_INSET)));
+
+ static final int BUTTON_TOP = 1;
+ static final int BUTTON_BOTTOM = 1;
+ static final int BUTTON_LEFT = 1;
+ static final int BUTTON_RIGHT = 1;
+ /**
+ * The default number of characters for text field.
+ */
+ public static int TEXTFIELD_NUM_CHARS = 12;
+
+ /**
+ * The default number of characters for text field.
+ */
+ public static int DATEFIELD_NUM_CHARS = 10;
+
+ /**
+ * The default number of characters for text field.
+ */
+ public static int TIMEFIELD_NUM_CHARS = 12;
+
+ /**
+ * Creates a popup menu with items in an array of string.
+ * No action listener is to be added for this method.
+ * @param items an array of String for the menu items
+ */
+ public static PopupMenu makePopupMenu(String[] items)
+ {
+ PopupMenu popup = new PopupMenu();
+ for (int i=0; i < items.length; i++) {
+ popup.add(new MenuItem(items[i]));
+ }
+ MenuItem mItem = new MenuItem("Copy");
+ popup.add(mItem);
+ return popup;
+ }
+
+ /**
+ * Creates a menu with a name of your choice, items in an array of strings, acttionCommands being
+ * items with spaces trimmed, and an action listener for all items.
+ * @param menuName the name of the menu
+ * @param items an array of String for the items
+ * @param listener action listener
+ */
+ public static JMenu makeMenu(String menuName, char hotkey, String[] items, ActionListener listener)
+ {
+ JMenu menu = makeMenu(menuName, hotkey);
+ JMenu submenu = null;
+ JMenuItem menuItem = null;
+ String itemString;
+ String queryName;
+ String submenuItems;
+ int comma;
+
+ for (int i=0; i < items.length; i++) {
+ //parse the items string
+ int index;
+ if ( (index = items[i].indexOf(":")) >= 0 ) {
+ //has submenu
+ queryName = items[i].substring(0,index).trim();
+ submenu = makeMenu( queryName );
+ submenuItems = items[i].substring(index+1).trim();
+ while ( submenuItems.length() > 0 ) {
+ comma = submenuItems.indexOf(",");
+ if ( comma >= 0 ) {
+ itemString = submenuItems.substring(0, comma).trim();
+ submenuItems = submenuItems.substring(comma+1).trim();
+ } else {
+ itemString = submenuItems;
+ submenuItems = "";
+ }
+ menuItem = makeMenuItem(itemString);
+ menuItem.setActionCommand( trimSpaces(queryName + ":" + itemString) );
+ if ( listener != null ) {
+ menuItem.addActionListener( listener );
+ }
+ submenu.add(menuItem);
+ }
+ menu.add( submenu );
+ } else { //no submenu
+ menuItem = makeMenuItem(items[i]);
+ menuItem.setActionCommand( trimSpaces(items[i]) );
+ if ( listener != null ) {
+ menuItem.addActionListener( listener );
+ }
+ menu.add( menuItem );
+ }
+ }
+ return menu;
+ }
+
+ /**
+ * Creates a menu with a name of your choice, items and action commands in an array of strings,
+ * and an action listener for all items.
+ * @param menuName the name of the menu
+ * @param items an array of String for the items
+ * @param commands action commands in an array of strings
+ * @param listener action listener
+ */
+ public static JMenu makeMenu(String menuName, char hotkey, String[] items, String[] commands, ActionListener listener)
+ {
+ JMenu menu = makeMenu(menuName, hotkey);
+ int index;
+ for (int i=0; i < items.length; i++) {
+ if ( (index = items[i].indexOf("_") ) >= 0 ) {
+ JMenu subMenu = makeMenu(items[i].substring(0, index));
+ JMenuItem item = makeMenuItem(items[i].substring(index+1) );
+ if ( listener != null ) {
+ item.addActionListener( listener );
+ }
+ subMenu.add(item);
+ menu.add(subMenu);
+ } else {
+ JMenuItem menuItem = makeMenuItem(items[i]);
+ menuItem.setActionCommand( commands[i] );
+ if ( listener != null )
+ menuItem.addActionListener( listener );
+ menu.add( menuItem );
+ }
+ }
+ return menu;
+ }
+
+ public static JMenu makeMenu(String name)
+ {
+ JMenu menu = new JMenu(name);
+ return menu;
+ }
+
+ public static JMenu makeMenu (String name, char mnemonic)
+ {
+ JMenu menu = new JMenu(name);
+ menu.setMnemonic(mnemonic);
+
+ return menu;
+ }
+
+
+
+ /**
+ * Creates a Swing label with preferred size and Style Guide conforming attributes
+ * @param text the text of Label
+ */
+ public static JLabel makeLabel(String text)
+ {
+ JLabel label = new JLabel(text,JLabel.RIGHT);
+ //label.setSize(label.getPreferredSize());
+ label.setVerticalAlignment(SwingConstants.CENTER);
+ return label;
+ }
+
+ /**
+ * Creates a label with alignment
+ * @param text the text of Label
+ * @alignment alignment horizontal alignment - JLabel.{LEFT,RIGHT,CENTER}
+ */
+ public static JLabel makeLabel(String text, int alignment)
+ {
+ JLabel label = makeLabel(text);
+ label.setHorizontalAlignment(alignment);
+ return label;
+ }
+
+ public static JLabel makeLabel(String text, char hotkey)
+ {
+ JLabel label = makeLabel(text);
+ label.setDisplayedMnemonic(hotkey);
+ return label;
+ }
+
+ public static JLabel makeLabel(String text, char hotkey, int alignment)
+ {
+ JLabel label = makeLabel(text, alignment);
+ label.setDisplayedMnemonic(hotkey);
+ return label;
+ }
+
+ public static JLabel makeLabel(String text, char hotkey, Component target)
+ {
+ JLabel label = makeLabel(text, hotkey);
+ label.setLabelFor(target);
+ return label;
+ }
+
+ public static JLabel makeLabel(String text, char hotkey, Component target, int alignment)
+ {
+ JLabel label = makeLabel(text, hotkey, target);
+ label.setHorizontalAlignment(alignment);
+ return label;
+ }
+
+ public static JTextField makeTextField()
+ {
+ return makeTextField(TEXTFIELD_NUM_CHARS);
+ }
+
+ /**
+ * Creates an non-editable Swing text field for holding numChars characters
+ * @param numChars holding numChars characters in width
+ */
+ public static JTextField makeTextField(int numChars)
+ {
+ return makeTextField("", numChars, false);
+ }
+
+ /**
+ * Creates a non-editable Swing text field with content text and default width
+ * @param text the text of field
+ */
+ public static JTextField makeTextField(String text)
+ {
+ return makeTextField(text, TEXTFIELD_NUM_CHARS, false);
+ }
+
+ /**
+ * Creates a Swing text field with intial content text, numChars in width, editable as set
+ * @param text the text of field
+ * @param numChars holding numChars characters for width
+ * @param editable to set editable or not
+ */
+ public static JTextField makeTextField(String text, int numChars, boolean editable)
+ {
+ WMTextField textField = new WMTextField( text, numChars );
+ textField.setEditable(editable);
+ return textField;
+ }
+
+ /**
+ * Creates a Swing text field with intial content text, numChars in width, editable as set
+ * @param dateDocument the date formating document
+ * @param text the text of field
+ * @param numChars holding numChars characters for width
+ * @param editable to set editable or not
+ */
+ /*
+ public static JTextField makeTextField( Document dateDocument, String text, int numChars, boolean editable)
+ {
+ JTextField textField = new WMTextField( dateDocument, text, numChars);
+ textField.setEditable(editable);
+ return textField;
+ }
+ */
+
+ /**
+ * Creates a Swing non-editable text field with intial content text, numChars in width
+ * @param text the text of field
+ * @param numChars holding numChars characters for width
+ */
+ public static JTextField makeTextField(String text, int numChars)
+ {
+ return makeTextField(text, numChars, false);
+ }
+
+ /**
+ * Creates a Swing text field with editability settable
+ * @param editable to set editable or not
+ */
+ public static JTextField makeTextField(boolean editable)
+ {
+ return makeTextField("", TEXTFIELD_NUM_CHARS, editable);
+ }
+
+ public static JTextField makeTextField(boolean editable, String markup)
+ {
+ WMTextField field= (WMTextField) makeTextField("", TEXTFIELD_NUM_CHARS, editable);
+ field.setMagicMarkup(markup);
+ return field;
+ }
+
+ /**
+ * Creates a Swing text field with editability settable and with numChars in width
+ * @param numChars holding numChars characters for width
+ * @param editable to set editable or not
+ */
+ public static JTextField makeTextField(int numChars, boolean editable)
+ {
+ return makeTextField("", numChars, editable);
+ }
+
+
+ /**
+ * Creates a Swing button
+ * @param text the text on the button
+ */
+ public static JButton makeButton(String text)
+ {
+ JButton button = new JButton(text);
+ button.setMargin(new Insets(BUTTON_TOP,BUTTON_BOTTOM,BUTTON_LEFT,BUTTON_RIGHT));
+ return button;
+ }
+
+ /**
+ * Creates a Swing button with shortcut
+ * @param text the text on the button
+ * @param hotkey mnemonic character (underlined)
+ */
+ public static JButton makeButton(String text, char hotkey)
+ {
+ JButton button = makeButton(text);
+ button.registerKeyboardAction(null, KeyStroke.getKeyStroke(hotkey,java.awt.Event.ALT_MASK,false),
+ JComponent.WHEN_IN_FOCUSED_WINDOW);
+ button.setMnemonic(hotkey);
+ return button;
+ }
+
+ /**
+ * Creates a Swing button with shortcut and tooltip
+ * @param text the text on the button
+ * @param hotkey mnemonic character (underlined)
+ * @param tooltip text for the button's tooltip
+ */
+ public static JButton makeButton(String text, char hotkey, String tooltip)
+ {
+ JButton button = makeButton(text);
+ button.setMnemonic(hotkey);
+ button.setToolTipText(tooltip);
+ return button;
+ }
+
+
+ /**
+ * Creates a Swing button with shortcut, tooltip, and listener
+ * @param text the text on the button
+ * @param hotkey mnemonic character (underlined)
+ * @param tooltip text for the button's tooltip
+ * @param listener actionlistener
+ */
+ public static JButton makeButton(String text, char hotkey, String tooltip, ActionListener listener)
+ {
+ JButton button = makeButton(text, hotkey, tooltip);
+ button.addActionListener(listener);
+ return button;
+ }
+
+ /**
+ * Create a JButton with Icon
+ * @param text the text on the button
+ * @param icon the image on the button
+ */
+ public static JButton makeButton(String text, ImageIcon icon)
+ {
+ JButton button = new JButton(text, icon);
+ button.setMargin(new Insets(BUTTON_TOP,BUTTON_BOTTOM,BUTTON_LEFT,BUTTON_RIGHT));
+ return button;
+ }
+
+ /**
+ * create JButton with icon and hot key
+ */
+ public static JButton makeButton(String text, ImageIcon icon, char hotkey)
+ {
+ JButton button = makeButton(text, icon);
+ button.setMnemonic(hotkey);
+ return button;
+ }
+
+ /**
+ * create JButton with icon, hotkey and tooltip
+ * @param text
+ * @param icon
+ * @param hotkey
+ * @param tooltip
+ */
+ public static JButton makeButton(String text, ImageIcon icon, char hotkey, String tooltip)
+ {
+ JButton button = makeButton(text, icon, hotkey);
+ button.setToolTipText(tooltip);
+ return button;
+ }
+
+ /**
+ * create JButton with icon, hotkey and tooltip, and listener
+ * @param text
+ * @param icon
+ * @param hotkey
+ * @param tooltip
+ * @param listener
+ */
+ public static JButton makeButton(String text, ImageIcon icon, char hotkey, String tooltip, ActionListener listener)
+ {
+ JButton button = makeButton(text, icon, hotkey, tooltip);
+ button.addActionListener(listener);
+ return button;
+ }
+
+
+ /**
+ * create JButton with icon and tooltip
+ */
+ public static JButton makeButton(ImageIcon icon, String tooltip)
+ {
+ JButton button = new JButton(icon);
+ button.setMargin(new Insets(BUTTON_TOP,BUTTON_BOTTOM,BUTTON_LEFT,BUTTON_RIGHT));
+ button.setToolTipText(tooltip);
+ return button;
+ }
+
+ /**
+ * Creates a Swing panel
+ */
+ public static JPanel makePanel()
+ {
+ JPanel p = new JPanel();
+ return p;
+ }
+
+ /**
+ * Creates a panel with layout
+ */
+ public static JPanel makePanel(LayoutManager layout)
+ {
+ JPanel p = makePanel();
+ p.setLayout(layout);
+ return p;
+ }
+
+ /**
+ * Creates a Swing bordered panel
+ * @param title the title of the border
+ */
+ public static JPanel makeBorderPanel(String title)
+ {
+ p = makePanel();
+ p.setBorder(BORDER_STYLE);
+ titleBorder = new TitledBorder(p.getBorder(), title);
+ p.setBorder(titleBorder);
+ return p;
+ }
+ public static void setBorderTitle(String title){
+ System.out.println("setting title" + title);
+ titleBorder.setTitle(title);
+ p.validate();
+ }
+
+ public static String getBorderTitle(){
+ return titleBorder.getTitle();
+ }
+
+ /**
+ * Creates a Swing bordered panel with layout
+ * @param title the title of the border
+ * @param layout layout
+ */
+ public static JPanel makeBorderPanel(String title, LayoutManager layout)
+ {
+ JPanel p = makeBorderPanel(title);
+ p.setLayout(layout);
+ return p;
+ }
+
+
+ /**
+ * Creates a Swing bordered panel with no title
+ */
+ public static JPanel makeBorderPanel()
+ {
+ return makeBorderPanel("");
+ }
+
+
+ /**
+ * Creates a Swing bordered panel with NO border
+ * Why this ? to add the space of border to line up with other bordered panels
+ */
+ public static JPanel makeEmptyBorderPanel()
+ {
+ JPanel p = makePanel();
+ p.setBorder(EMPTY_BORDER_STYLE);
+ return p;
+ }
+
+ /**
+ * Creates a Swing bordered panel with NO border
+ * Is this different from makeEmptyBorderPanel ?
+ * To be answered....
+ */
+ public static JPanel makeHugeEmptyBorderPanel()
+ {
+ JPanel p = makePanel();
+ p.setBorder(new CompoundBorder(EMPTY_BORDER_STYLE,
+ EMPTY_BORDER_STYLE));
+ return p;
+ }
+
+ /**
+ * Remove all space characters in a given string.
+ * @param s the string to be trimmed
+ */
+ public static String trimSpaces(String s)
+ {
+ String r="";
+ if ( s == null )
+ return null;
+
+ for (int i=0; i < s.length(); i++)
+ if ( s.charAt(i) != ' ' )
+ r = r + s.charAt(i);
+
+ return r;
+ }
+
+
+ /**
+ * Makes a JRadioButton showing text with key as the accelerator
+ * @param text the text of the button
+ * @param key the accelerator key
+ */
+ public static JRadioButton makeRadioButton(String text, char key)
+ {
+ JRadioButton rb = new JRadioButton(text);
+ rb.setMnemonic(key);
+ return rb;
+ }
+
+
+ /**
+ * Makes a JRadioButton showing text without key accelerator
+ * @param text the text of the button
+ */
+ public static JRadioButton makeRadioButton(String text)
+ {
+ JRadioButton rb = new JRadioButton(text);
+ return rb;
+ }
+
+ public static JTextArea makeTextArea(int r, int c, boolean editable)
+ {
+ JTextArea area = new JTextArea(r,c);
+ area.setEditable(editable);
+
+ return area;
+ }
+
+
+ public static JTextArea makeTextArea()
+ {
+ return makeTextArea("");
+ }
+
+ /**
+ * Makes a text area with a populated string
+ * @param text populate area with string
+ */
+ public static JTextArea makeTextArea(String s)
+ {
+ return new JTextArea(s);
+ }
+
+ public static JComboBox makeComboBox(boolean editable)
+ {
+ JComboBox cb = new JComboBox();
+ cb.setEditable( editable );
+ return cb;
+ }
+
+
+ /**
+ * Makes a JComboBox with an array of String for items with default size
+ * @param items an array of strings
+ * @param selectedItemIndex the index of the item to be selected by default
+ * @param editable editable or not
+ */
+ public static JComboBox makeComboBox(String[] items, int selectedItemIndex,
+ boolean editable)
+ {
+ return makeComboBox(items, selectedItemIndex, editable, null);
+ }
+
+ /**
+ * Makes a JComboBox with an array of String for items
+ * @param items an array of strings
+ * @param selectedItemIndex the index of the item to be selected by default
+ * @param editable editable or not
+ * @param dimension the dimension of the box
+ */
+ public static JComboBox makeComboBox(String[] items, int selectedItemIndex,
+ boolean editable, Dimension dimension)
+ {
+ JComboBox cb = new JComboBox();
+ for (int i=0; i < items.length; i++)
+ cb.addItem(items[i]);
+
+ cb.setEditable( editable );
+ cb.setSelectedItem( items[selectedItemIndex] );
+ if ( dimension != null )
+ cb.setPreferredSize( dimension );
+
+ return cb;
+ }
+
+ /**
+ * Makes an empty menu item.
+ */
+ public static JMenuItem makeMenuItem()
+ {
+ return makeMenuItem("");
+ }
+
+ /**
+ * Makes a menu item with an icon.
+ * @param icon image icon
+ */
+ public static JMenuItem makeMenuItem(Icon icon)
+ {
+ JMenuItem m = makeMenuItem();
+ m.setIcon(icon);
+ return m;
+ }
+
+ /**
+ * Makes a menu item with a label and icon.
+ * @param text menu label
+ * @param icon image icon
+ */
+ public static JMenuItem makeMenuItem(String text,Icon icon)
+ {
+ JMenuItem m = makeMenuItem(text);
+ m.setIcon(icon);
+ return m;
+ }
+
+ /**
+ * Makes a menu item with a label and shortcut key.
+ * @param text menu label
+ * @param mnemonic underlined character in label
+ */
+ public static JMenuItem makeMenuItem(String text, char mnemonic)
+ {
+ JMenuItem m = makeMenuItem(text);
+ m.setMnemonic(mnemonic);
+ m.registerKeyboardAction(null, KeyStroke.getKeyStroke(mnemonic,java.awt.Event.ALT_MASK,false),
+ JComponent.WHEN_IN_FOCUSED_WINDOW);
+ return m;
+ }
+
+ /**
+ * Makes a menu item with a label
+ * @param text menu label
+ */
+ public static JMenuItem makeMenuItem(String text)
+ {
+ return new JMenuItem(text);
+ }
+
+ public static JMenuItem makeMenuItem(String text, Icon icon, char mnemonic)
+ {
+ JMenuItem m = new JMenuItem(icon);
+ m.setText(text);
+ m.setMnemonic(mnemonic);
+
+ return m;
+ }
+
+
+ /**
+ * Makes a text area that looks like a multiline
+ * wrapping label that word wraps
+ * @param initial value of textarea
+ */
+ public static JTextArea makeWrappingLabel(String s)
+ {
+ JTextArea ta = new JTextArea(s);
+ ta.setLineWrap(true);
+ //ta.setWrapStyleWord(true);
+ ta.setOpaque(false);
+ ta.setEditable(false);
+ ta.setBorder(new EmptyBorder(0,0,0,0));
+ ta.setSelectionColor(UIManager.getDefaults().getColor("Label.background"));
+ ta.setFont(UIManager.getDefaults().getFont("Label.font"));
+ return ta;
+ }
+
+ static public void constrain(Component component, Container container, GridBagConstraints gbc,
+ int grid_x, int grid_y, int grid_width, int grid_height,
+ int fill, int anchor, double weight_x, double weight_y,
+ int top, int left, int bottom, int right)
+ {
+ gbc.gridx = grid_x;
+ gbc.gridy = grid_y;
+ gbc.gridwidth = grid_width;
+ gbc.gridheight = grid_height;
+ gbc.fill = fill;
+ gbc.anchor = anchor;
+ gbc.weightx = weight_x;
+ gbc.weighty = weight_y;
+ if (top+bottom+left+right > 0)
+ gbc.insets = new Insets(top, left, bottom, right);
+
+ ((GridBagLayout)container.getLayout()).setConstraints(component, gbc);
+ container.add(component);
+ }
+
+ static public void showDialog(JFrame frame, String message, String title, int type)
+ {
+ JOptionPane.showMessageDialog(frame, message, title, type);
+ }
+
+ static public void showDialog(String message, String title)
+ {
+ showDialog(message, title, JOptionPane.INFORMATION_MESSAGE);
+ }
+
+ static public void showDialog(String message, String title, int type)
+ {
+ showDialog(new JFrame(), message, title, type);
+ }
+
+ static public void showDialog(String message)
+ {
+ showDialog(message, "");
+ }
+
+ static public void showDialog(Exception e)
+ {
+ showDialog(e.toString(), "Exception");
+ }
+
+ static public String average(Vector v)
+ {
+ int sum =0;
+ for(int i=0; i< v.size(); i++)
+ {
+ try {
+ sum += Integer.parseInt((String) v.elementAt(i));
+ }
+ catch(Exception e) {}
+
+ }
+
+ return String.valueOf(sum/v.size());
+ }
+
+ static public boolean IsDigit(String s)
+ {
+ for (int i=0; i< s.length(); i++)
+ {
+ if (!Character.isDigit(s.charAt(i)))
+ return false;
+ }
+ return true;
+ }
+}
+//$History:$
diff --git a/data/mnet/Common/Java/com/jetcell/MibWM/WMTextField.java b/data/mnet/Common/Java/com/jetcell/MibWM/WMTextField.java
new file mode 100644
index 0000000..ff7ca7e
--- /dev/null
+++ b/data/mnet/Common/Java/com/jetcell/MibWM/WMTextField.java
@@ -0,0 +1,156 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Class : WMTextField
+// Desc : TextField widget for Web Management Browser
+// Author : George Zhao
+// History: April 22, 1999 Initial Creation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+package com.jetcell.MibWM;
+
+import java.util.*;
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+
+/**
+ * Subclass of JTextfield that add a right mouse button triggered
+ * popupmenu for cut/copy/paste/delete functionality.
+ *
+ * @see TextComponentPopupMenu
+ * @version 1.0
+ * @author George Zhao
+ */
+
+public class WMTextField extends JTextField implements FocusListener
+{
+ static TextComponentPopupMenu popupMenu = TextComponentPopupMenu.getPopupMenu();
+
+ /**
+ * Previous value is tracked to make sure duplicates don't make it into
+ * the paste recent menu.
+ */
+ String previousValue="";
+ String magicMarkup = "";
+
+ public WMTextField()
+ {
+ super();
+ init();
+ }
+
+ public WMTextField(String text)
+ {
+ super(text);
+ init();
+ }
+
+ public WMTextField(int columns)
+ {
+ super(columns);
+ init();
+ }
+
+ public WMTextField(String text, int columns)
+ {
+ super(text,columns);
+ init();
+ }
+
+ /**
+ * Adds focusListener to textfield
+ */
+ void init()
+ {
+ addFocusListener(this);
+ //{{INIT_CONTROLS
+ //}}
+ }
+
+
+ public void focusGained(FocusEvent e) {};
+
+ /**
+ * Listens for focusLost event to trigger updates to
+ * the paste recent popup menu
+ * @param e FocusEvent
+ */
+ public void focusLost(FocusEvent e)
+ {
+ String value = getTrimmedText();
+ if ((value.length() > 0) && (!value.equals(previousValue)))
+ {
+ previousValue = value;
+ popupMenu.addToMostRecentList(value);
+ }
+ }
+
+ /**
+ * Captures right mouse button mouse events to invoke popup menu.
+ * @param e MouseEvent
+ */
+ public void processMouseEvent(MouseEvent e)
+ {
+ if (e.getModifiers() == InputEvent.BUTTON3_MASK)
+ {
+ if (e.isPopupTrigger())
+ {
+ popupMenu.show(e.getComponent(),
+ e.getX(),
+ e.getY(),
+ getSelectionStart(),
+ getSelectionEnd());
+ }
+ }
+ else
+ super.processMouseEvent(e);
+ }
+
+ /**
+ * Returns text without with leading and trailing spaces
+ */
+ public String getTrimmedText()
+ {
+ return getText().trim();
+ }
+
+ /**
+ * Sets the text. Keeps track of previous value.
+ */
+ public void setText(String s)
+ {
+ super.setText(s);
+ previousValue = s;
+ repaint();
+ }
+
+ /**
+ * Swing bug - force repaint on setEditable() to refresh color
+ */
+ public void setEditable(boolean b)
+ {
+ super.setEditable(b);
+ if(b) {
+ //setBackground(UIManager.getDefaults().getColor("TextField.background"));
+ setBackground(Color.white);
+ }
+ else {
+ //setBackground(UIManager.getDefaults().getColor("Label.background"));
+ setBackground(Color.lightGray);
+ }
+ repaint();
+ }
+
+ public void setMagicMarkup(String markup)
+ {
+ magicMarkup = markup;
+ }
+
+ public String getMagicMarkup()
+ {
+ return magicMarkup;
+ }
+}
+
+//$History:$ \ No newline at end of file
diff --git a/data/mnet/Common/Java/java.mk b/data/mnet/Common/Java/java.mk
new file mode 100644
index 0000000..7bf6cf7
--- /dev/null
+++ b/data/mnet/Common/Java/java.mk
@@ -0,0 +1,60 @@
+####################################################################
+#
+# FILE NAME: Java.mk
+#
+# DESCRIPTION: This file needs to be included by every makefile that
+# compiles Java source files.
+#
+# COMPONENTS:
+#
+#
+# NOTES:
+#
+# (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+#
+# REVISION HISTORY
+#__________________________________________________________________
+#----------+--------+----------------------------------------------
+# Name | Date | Reason
+#----------+--------+----------------------------------------------
+# Bhawani |11/28/99| Iniitial Draft
+#----------+--------+----------------------------------------------
+####################################################################
+#/
+
+# Hard-coded path should point to the network drive
+RLROOT = ..\..\..\THIRD_PARTY\OamTools
+RLROOT2 = ..\..\THIRD_PARTY\OamTools
+RLIROOT = $(RLROOT)\rl
+RLIROOT2 = $(RLROOT2)\rl
+JDKROOT = $(CODEBASE)\..\..\THIRD_PARTY\OamTools\jdk1.3
+
+RM = del
+CP = copy
+
+MIBWMPATH = $(CODEBASE)\com\jetcell\MibWM
+VIPERCELL = $(MIBWMPATH)
+VIPERBASE = $(MIBWMPATH)\ViperBase
+COMMON = $(CODEBASE)\Java
+OUTPUTDIR = $(CODEBASE)\..\..\GMC\GMCManager
+ALARMAPPLETDIR = $(CODEBASE)\AlarmApplet
+
+ifeq ($(SOURCE_LIST),)
+ SOURCE_LIST = $(wildcard *.java)
+
+endif
+
+CLASS_LIST = $(SOURCE_LIST:.java=.class)
+
+# java compiler and archive maker
+JAR = $(JDKROOT)\bin\jar.exe
+JAVAC = $(JDKROOT)\bin\javac.exe
+
+CLASSPATH = .;$(ALARMAPPLETDIR);$(CODEBASE);$(JDKROOT)/lib;$(JDKROOT)/lib/classes.zip;$(RLROOT);/$(RLIROOT)/jcit/symbeans.jar;$(RLIROOT)/jcit/Jars/Gauges.jar;$(RLIROOT)/jcit/Jars/RLBeans.jar
+
+
+# rule to compile Java source files
+%.class : %.java
+# - @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(JAVAC) -classpath $(CLASSPATH) $(subst /,\, $<)
+
diff --git a/data/mnet/Common/Os/Makefile b/data/mnet/Common/Os/Makefile
new file mode 100644
index 0000000..9347a18
--- /dev/null
+++ b/data/mnet/Common/Os/Makefile
@@ -0,0 +1,28 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1: make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2: make all VOB=GP10 APPDIR=Host\vxTemplate\bin -
+# Places .o file(s) in VOB/$(APPDIR) directory.
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+SUBDIRS = src loadmodule
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+VOBDIR = $(TOP_OF_VOB)\$(VOB)
+
+include $(VOBDIR)\l3defs.mk
+
+
diff --git a/data/mnet/Common/Os/include/JCMsgQDefs.h b/data/mnet/Common/Os/include/JCMsgQDefs.h
new file mode 100644
index 0000000..45e2730
--- /dev/null
+++ b/data/mnet/Common/Os/include/JCMsgQDefs.h
@@ -0,0 +1,40 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCMsgQDefs.h
+// Author(s) : Tim Olson
+// Create Date : 9/18/2000
+// Description :
+//
+// *******************************************************************
+#ifndef _JCMSGQDEFS_H_
+#define _JCMSGQDEFS_H_ /* include once only */
+
+#include "Os/JCMsgQueue.h"
+#include "MnetModuleId.h"
+
+
+/* THIS IS FOR MESSAGE QUEUE INTERNAL ONLY!!!! */
+
+typedef struct jc_msg_hdr {
+ JCMsgQueue *rplyQ; /* identifier of queue to which to reply,
+ if any */
+ unsigned int msgType; /* module dependent message type */
+ MNET_MODULE_ID modId; /* module ID of sender */
+ int bytes; /* size of associated data */
+ } JC_MSG_HDR;
+/* data follows header */
+
+
+#define JC_MSG_HDR_SIZE sizeof(JC_MSG_HDR)
+
+
+#endif
diff --git a/data/mnet/Common/Os/loadmodule/LoadModule.cpp b/data/mnet/Common/Os/loadmodule/LoadModule.cpp
new file mode 100644
index 0000000..a339b48
--- /dev/null
+++ b/data/mnet/Common/Os/loadmodule/LoadModule.cpp
@@ -0,0 +1,195 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : LoadModule.cpp
+// Author(s) : Kevin Lim
+// Create Date : 04-14-99
+// Description : Functions to load modules
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+#include "vxWorks.h"
+#include "dosFsLib.h"
+#include "loadLib.h"
+#include "ioLib.h"
+#include "stdio.h"
+#include "string.h"
+
+#ifdef GMC_VOB_SPECIFIC
+#include <oam_api.h>
+#include <vipermib.h>
+#endif /* GMC_VOB_SPECIFIC */
+
+#define UNIX_FILE_EOFS
+
+#ifdef UNIX_FILE_EOFS
+#define EOL_TRUNC_LEN 1
+#else
+#define EOL_TRUNC_LEN 2
+#endif
+
+// *******************************************************************
+int viperLoad(char * filename)
+{
+ int fd;
+ MODULE_ID mId;
+
+#ifdef NEVER // changed from GMC_VOB_SPECIFIC by oleg
+ Ss7Type* networkType;
+ char* fn;
+
+ if ((fn = strstr(filename, "gmccpapp.out"))
+ != NULL)
+ {
+ if( NULL != ( networkType = (Ss7Type*)oam_getMibAddress( MIB_ss7NetworkType ) ))
+ {
+
+ if (*networkType == ansi)
+ {
+ printf ("Mib returned ansi for loading.\n");
+ strcpy(fn, "gmccpapp-ansi.out");
+ }
+ else
+ {
+ printf ("Mib returned itu for loading.\n");
+ strcpy(fn, "gmccpapp-itu.out");
+ }
+ }
+ else
+ {
+ printf ("Major Error reading network type from the Mib. Cannot load GMC CP.\n");
+ return (-1);
+ }
+ }
+
+#endif /* GMC_VOB_SPECIFIC */
+
+ printf("Loading %s\n", filename);
+ fd = open (filename, 0, 0);
+ if(fd == ERROR)
+ {
+ // error on open object file
+ printf("[loadMod] Fatal Error on fopen(%s) return ERROR\n", filename);
+ return ERROR;
+ }
+ mId = loadModule (fd, LOAD_ALL_SYMBOLS);
+ if(mId == NULL)
+ {
+ // error on loading module
+ printf("[loadMod] Fatal Error on loadModule() return NULL\n");
+ return (-1);
+ }
+ close (fd);
+ return (int)mId;
+}
+
+// *******************************************************************
+#define VIPER_MAX_BASE_PREFIX 100
+#define VIPER_MAX_MODULE_LINE 180
+// *******************************************************************
+extern "C"
+{
+void viperLoadList(char * filename, char * base, int append)
+{
+ char base_line[VIPER_MAX_MODULE_LINE];
+ char line[VIPER_MAX_MODULE_LINE];
+ FILE * fd;
+ char * lp;
+ int base_len = strlen(base);
+ int i, line_len;
+ bool done = false;
+
+ if(base_len > VIPER_MAX_BASE_PREFIX){
+ printf("[viperLoadList] base string too long %d\n", base_len);
+ return;
+ }
+ else{
+ for(i=0; i<base_len; i++) base_line[i] = base[i];
+ base_line[i]='/';
+ base_len++;
+ }
+
+ if(append){
+ int filename_len = strlen(filename);
+ if((base_len+filename_len)>VIPER_MAX_MODULE_LINE){
+ printf("[viperLoadList] base + module list name too long: %d\n", base_line+filename_len);
+ printf("%s%s\n", base_line, filename);
+ return;
+ }
+ for(i=0; i<filename_len; i++) base_line[base_len+i] = filename[i];
+ // mark null
+ base_line[base_len+i] = '\0';
+ fd = fopen(base_line, "r");
+ if(fd == NULL){
+ printf("[viperLoadList] Error on openning module list file: %s\n", base_line);
+ return;
+ }
+ else{
+ printf("[viperLoadList] Loading modules from: %s\n", base_line);
+ }
+ }
+ else{
+ fd = fopen(filename, "r");
+ if(fd == NULL){
+ printf("[viperLoadList] Error on openning module list file: %s\n", filename);
+ return;
+ }
+ else{
+ printf("[viperLoadList] Loading modules from: %s\n", filename);
+ }
+ }
+
+ while(!done){
+ lp = fgets(line, 80, fd);
+ if(lp == NULL){
+ done = true;
+ }
+ else{ // parse the line
+ line_len = strlen(lp);
+ if(lp[0] == '#'){ // do not append base
+ if(line_len>VIPER_MAX_MODULE_LINE){
+ printf("[viperLoadList] module line too long: %d\n", line_len);
+ printf("%s\n", line);
+ fclose(fd);
+ return;
+ }
+ // mark null at eol
+ lp[line_len-EOL_TRUNC_LEN] = '\0';
+ viperLoad(&line[1]); // exclude #
+ }
+ else if(lp[0] == '!'){ // comment fields
+ printf("%s", lp);
+ }
+ else if(line_len<3){ // probably blank line
+
+ }
+ else{ //append to the line
+ if((base_len+line_len)>VIPER_MAX_MODULE_LINE){
+ printf("[viperLoadList] base + module line too long: %d\n", base_line+line_len);
+ printf("%s%s\n", base_line, line);
+ fclose(fd);
+ return;
+ }
+ for(i=0; i<line_len; i++) base_line[base_len+i] = lp[i];
+ // mark null
+ base_line[base_len+i-EOL_TRUNC_LEN] = '\0';
+ viperLoad(base_line);
+ }
+ } // end parse
+ }
+ fclose(fd);
+}
+}
+
+
diff --git a/data/mnet/Common/Os/loadmodule/Makefile b/data/mnet/Common/Os/loadmodule/Makefile
new file mode 100644
index 0000000..5eeffdb
--- /dev/null
+++ b/data/mnet/Common/Os/loadmodule/Makefile
@@ -0,0 +1,62 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+# Name of this App's Directory
+COMMON_APP_DIR = loadmodule
+
+VOB2DIR = $(TOP_OF_VOB)\..\$(VOB)
+BINDIR = ..\bin
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\$(COMMON_APP_DIR).out
+else
+ MY_OUTPUT = $(OBJDIR)\$(COMMON_APP_DIR).out
+endif
+
+include $(VOB2DIR)\l3defs.mk
+
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) -r -o $@.tmp $(MODULE_OBJS)
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
diff --git a/data/mnet/Common/Os/src/JCCTimer.cpp b/data/mnet/Common/Os/src/JCCTimer.cpp
new file mode 100644
index 0000000..d2de948
--- /dev/null
+++ b/data/mnet/Common/Os/src/JCCTimer.cpp
@@ -0,0 +1,91 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCCTimer.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 10-19-98
+// Description : interface specification for - JCCTimer
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include <stdio.h>
+#include "Os/JCCTimer.h"
+
+extern "C" int sysClkRateGet (void);
+
+#define JCCLog printf
+
+int JCCTimer::tickPerSec = sysClkRateGet();
+
+
+void JCCTimer::cancelTimer()
+{
+ if (timerSet_ == true)
+ {
+ wdCancel(timerId_);
+ timerSet_ = false;
+ }
+}
+
+JCCTimer::~JCCTimer()
+{
+ wdDelete(timerId_);
+}
+
+JCCTimer::JCCTimer (FUNCPTR fPtr ,
+ int timerData)
+ :timerData_(timerData),
+ funcPtr_ (fPtr) ,
+ timerSet_ (false)
+{
+ init ();
+}
+
+
+JCCTimer::JCCTimer (FUNCPTR fPtr)
+ :timerData_(-1) ,
+ funcPtr_ (fPtr) ,
+ timerSet_ (false)
+{
+ init ();
+}
+
+
+void JCCTimer::setTimer(int howLong)
+{
+ if (timerSet_ == true)
+ {
+ cancelTimer();
+ }
+
+ wdStart(timerId_, howLong, funcPtr_, timerData_);
+
+ timerSet_ = true;
+}
+
+
+void JCCTimer::init()
+{
+ if (!tickPerSec)
+ tickPerSec = sysClkRateGet ();
+
+ if ((timerId_ = wdCreate()) == NULL)
+ {
+ // Handle Operating System Resource Allocation Error
+ JCCLog("JCC Error - Operating System Resource Allocation Error:\n");
+ JCCLog(" - WatchDog Timer could not be created.\n");
+ }
+}
+
diff --git a/data/mnet/Common/Os/src/JCModule.cpp b/data/mnet/Common/Os/src/JCModule.cpp
new file mode 100644
index 0000000..a94a73b
--- /dev/null
+++ b/data/mnet/Common/Os/src/JCModule.cpp
@@ -0,0 +1,470 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCModule.cpp
+// Author(s) : Tim Olson
+// Create Date : 10/18/2000
+// Description :
+//
+// *******************************************************************
+
+#include <stdio.h>
+#include <errNoLib.h>
+#include <string.h>
+#include <ioLib.h>
+#include <dbgLib.h>
+#include <usrLib.h>
+#include "Os/JCModule.h"
+#include "AlarmCode.h"
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCModule constructor
+**
+** PURPOSE: Initialize data members for JCModule object.
+**
+** INPUT PARAMETERS: id - module id
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+JCModule::JCModule
+(
+ MNET_MODULE_ID id,
+ JC_SYSCMD_FUNC cmdFunc,
+ char *cmdFuncStr
+) : modId(id), numRun(0), numSub(0)
+{
+ char *name = GetMnetModuleName(id);
+ if (name)
+ {
+ modName = new char[strlen(name) + 1];
+ if (modName)
+ {
+ strcpy(modName, name);
+ }
+ else
+ {
+ printf("JCModule::JCModule ERROR: Unable to allocate memory\n");
+ }
+ }
+ else
+ {
+ modName = 0;
+ }
+
+
+ if (!TestSym(cmdFuncStr))
+ {
+ syscmd = cmdFunc;
+ isModuleLoaded = TRUE;
+ }
+ else
+ {
+ isModuleLoaded = FALSE;
+ }
+
+ for (int i=0; i < MAX_NUM_SUB_TASKS; i++)
+ {
+ tasks[i] = 0;
+ }
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCModule destructor
+**
+** PURPOSE: Delete data members for JCModule object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+JCModule::~JCModule ()
+{
+ delete [] modName;
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCModule InsertTaskInfo
+**
+** PURPOSE: InsertTaskInfo adds the task object to the list of tasks
+** currently running under this module.
+**
+** INPUT PARAMETERS: id - module id
+** pTask - pointer to the new task object
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void JCModule::InsertTaskInfo(MNET_MODULE_ID id, JCTask *pTask)
+{
+ for (int j=0; j < MNET_MAX_MODULE_IDS; j++)
+ {
+ if (systemModules[j])
+ {
+ if (systemModules[j]->modId == id)
+ {
+ for (int i=0; i < MAX_NUM_SUB_TASKS; i++)
+ {
+ if (!systemModules[j]->tasks[i])
+ {
+ systemModules[j]->tasks[i] = pTask;
+ systemModules[j]->numSub++;
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+}
+
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCModule StartModule
+**
+** PURPOSE: StartModule sends a SYS_START system command to the module.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): TRUE - if module is loaded
+** FALSE - if module is not loaded
+**
+**----------------------------------------------------------------------------*/
+bool JCModule::StartModule()
+{
+ bool ret = FALSE;
+
+ if (isModuleLoaded)
+ {
+ if (!numRun)
+ {
+ printf("SysCommand(SYS_START): %s\n", modName);
+
+ syscmd(SYS_START);
+ numRun++;
+ }
+ else
+ {
+ printf("Module %d already started\n", modId);
+ }
+ ret = TRUE;
+ }
+
+ return(ret);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCModule ShutdownModule
+**
+** PURPOSE: StartModule sends a SYS_SHUTDOWN system command to the module.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void JCModule::ShutdownModule()
+{
+ if (isModuleLoaded)
+ {
+ printf("SysCommand(SYS_SHUTDOWN): %s\n", modName);
+ syscmd(SYS_SHUTDOWN);
+ }
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCModule RebootModule
+**
+** PURPOSE: StartModule sends a SYS_REBOOT system command to the module.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void JCModule::RebootModule()
+{
+ if (isModuleLoaded)
+ {
+ printf("SysCommand(SYS_REBOOT): %s\n", modName);
+ syscmd(SYS_REBOOT);
+ }
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCModule CheckModule
+**
+** PURPOSE: CheckModule verifies that all tasks associated with this module
+** are currently running.
+**
+** INPUT PARAMETERS: pTask - if problems a pointer to the troubled task
+** with the highest criticality
+**
+** RETURN VALUE(S): SYSTEM_MODULE_STATUS
+**
+**----------------------------------------------------------------------------*/
+SYSTEM_MODULE_STATUS JCModule::CheckModule(JCTask **pTask)
+{
+ SYSTEM_MODULE_STATUS retCode = MODULE_OK;
+ *pTask = 0;
+ if (isModuleLoaded)
+ {
+ char *tName;
+ for(int i=0; i < numSub; i++){
+ // check for exit abnormal
+ tName = taskName(tasks[i]->GetTaskId());
+ if(tName == NULL)
+ {
+ printf("Alert! found missing task(%s)\n", tasks[i]->GetTaskName());
+
+ if (!*pTask)
+ {
+ retCode = TASK_MISSING;
+ *pTask = tasks[i];
+ }
+ else if ((tasks[i]->GetTaskImportance() == JC_CRITICAL_TASK) &&
+ ((*pTask)->GetTaskImportance() == JC_NON_CRITICAL_TASK))
+ {
+ retCode = TASK_MISSING;
+ *pTask = tasks[i];
+ }
+ }
+ // check for suspended
+ else if(taskIsSuspended(tasks[i]->GetTaskId()))
+ {
+ char coreFileName[128];
+ char *pMnetBase;
+ int coreFd = ERROR;
+ int stdoutFd, stderrFd;
+
+ // Create a core file for this task.
+ pMnetBase = getenv("MNET_BASE");
+
+ if (pMnetBase && !tasks[i]->GetTaskAlarmStatus())
+ {
+ strcpy(coreFileName, pMnetBase);
+ strcat(coreFileName, "\\");
+ strcat(coreFileName, tasks[i]->GetTaskName());
+ strcat(coreFileName, ".dmp");
+
+ // If the file was created replace stdout and stderr with the
+ // file descriptor for the task core file.
+ if ((coreFd = creat(coreFileName, O_RDWR)) != ERROR)
+ {
+ stdoutFd = ioGlobalStdGet(1);
+ stderrFd = ioGlobalStdGet(2);
+ ioGlobalStdSet(1, coreFd);
+ ioGlobalStdSet(2, coreFd);
+ }
+ }
+
+ printf("Alert! found suspended task(%s)\n", tasks[i]->GetTaskName());
+ tt(tasks[i]->GetTaskId());
+ ti(tasks[i]->GetTaskId());
+ tasks[i]->ExecuteCoreDumpFunc();
+
+ // If a core file was created then return stdout and stderr.
+ if (coreFd != ERROR)
+ {
+ ioGlobalStdSet(1, stdoutFd);
+ ioGlobalStdSet(2, stderrFd);
+ close(coreFd);
+ printf("Alert! found suspended task(%s)\n", tasks[i]->GetTaskName());
+ tt(tasks[i]->GetTaskId());
+ ti(tasks[i]->GetTaskId());
+ tasks[i]->ExecuteCoreDumpFunc();
+ }
+
+ if (!*pTask)
+ {
+ retCode = TASK_SUSPENDED;
+ *pTask = tasks[i];
+ }
+ else if ((tasks[i]->GetTaskImportance() == JC_CRITICAL_TASK) &&
+ ((*pTask)->GetTaskImportance() == JC_NON_CRITICAL_TASK))
+ {
+ retCode = TASK_SUSPENDED;
+ *pTask = tasks[i];
+ }
+ }
+ }
+ }
+
+ return(retCode);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCModule AllTasksInMainLoop
+**
+** PURPOSE: Check to see if all tasks are in the main loop.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): TRUE - all in main
+** FALSE - not all tasks in main loop
+**
+**----------------------------------------------------------------------------*/
+bool JCModule::AllTasksInMainLoop()
+{
+ for (int i=0; i < MNET_MAX_MODULE_IDS; i++)
+ {
+ if (systemModules[i])
+ {
+ for (int j=0; j < MAX_NUM_SUB_TASKS; j++)
+ {
+ if (systemModules[i]->tasks[j])
+ {
+ if (systemModules[i]->tasks[j]->GetTaskStatus() != JC_TASK_LOOP)
+ {
+ return (FALSE);
+ }
+ }
+ }
+ }
+ }
+
+ return (TRUE);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCModule ShowModuleStat
+**
+** PURPOSE: Display module status.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+extern "C"
+{
+void ShellShowModuleStat()
+{
+ JCModule::ShowModuleStat();
+}
+}
+
+void JCModule::ShowModuleStat()
+{
+ int totalTasks, totalInit, totalIdle, totalLoop, totalExit, totalUnknown;
+
+ printf ("System Module Status\n");
+
+ for (int i=0; i < MNET_MAX_MODULE_IDS; i++)
+ {
+ if (systemModules[i])
+ {
+ totalTasks = 0;
+ totalInit = 0;
+ totalIdle = 0;
+ totalLoop = 0;
+ totalExit = 0;
+ totalUnknown = 0;
+
+ for (int j=0; j < MAX_NUM_SUB_TASKS; j++)
+ {
+ if (systemModules[i]->tasks[j])
+ {
+ totalTasks++;
+ switch (systemModules[i]->tasks[j]->GetTaskStatus())
+ {
+ case JC_TASK_IDLE :
+ totalIdle++;
+ break;
+ case JC_TASK_INIT :
+ totalInit++;
+ break;
+ case JC_TASK_LOOP :
+ totalLoop++;
+ break;
+ case JC_TASK_EXIT :
+ totalExit++;
+ break;
+ default :
+ totalUnknown++;
+ }
+ }
+ }
+ printf("\tModule - %s\n", systemModules[i]->modName);
+ printf("\t\tTotalTasks(%d) Idle(%d) Init(%d) Loop(%d) Exit(%d) Unknown(%d)\n",
+ totalTasks, totalIdle, totalInit, totalLoop, totalExit, totalUnknown);
+ }
+ }
+
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCModule CheckSym
+**
+** PURPOSE: CheckSym does a string compare to see if against the symbol.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): 0 - string match
+** 1 - no string match
+**
+**----------------------------------------------------------------------------*/
+int JCModule::CheckSym(char *name, int val, SYM_TYPE type, int arg, UINT16 group)
+{
+ if(strstr(name, (char *)arg))
+ {
+ return 0; // exit symEach
+ }
+ return 1; // continue
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCModule TestSym
+**
+** PURPOSE: Loop through each symbol in the symbol table testing if the
+** string given matches a valid symbol.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): 0 - symbol found
+** 1 - symbol not found
+**
+**----------------------------------------------------------------------------*/
+int JCModule::TestSym(char *str)
+{
+ SYMBOL *symbol = symEach(sysSymTbl, (FUNCPTR)JCModule::CheckSym, (int)str);
+
+ if(symbol) return 0;
+ else
+ {
+ printf("[WARNING] function not found from symbol table: %s\n", str);
+ return 1;
+ }
+}
diff --git a/data/mnet/Common/Os/src/JCMsgQueue.cpp b/data/mnet/Common/Os/src/JCMsgQueue.cpp
new file mode 100644
index 0000000..f58a9b2
--- /dev/null
+++ b/data/mnet/Common/Os/src/JCMsgQueue.cpp
@@ -0,0 +1,197 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCMsgQueue.cpp
+// Author(s) : Tim Olson
+// Create Date : 10/18/2000
+// Description :
+//
+// *******************************************************************
+//
+// Revision history:
+// ===================================================================
+// Igal | 11/30/00 | Fixed incorrect max message size acceptable by the queue
+// -------------------------------------------------------------------
+//
+//
+
+#include <stdio.h>
+#include <errNoLib.h>
+#include <string.h>
+#include "Os/JCMsgQueue.h"
+#include "JCMsgQDefs.h"
+
+#define PADDING 4
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCMsgQueue constructor
+**
+** PURPOSE: Initialize data members for JCMsgQueue object. A message
+** queue for the native operating system will be created.
+**
+** INPUT PARAMETERS: maxMsgs - max msgs that can be queued
+** maxMsgLength - max bytes in a msg
+** options - message queue options (MSG_Q_FIFO or
+** MSG_Q_PRIORITY)
+**
+** RETURN VALUE(S): none
+** Note: If the message queue cannot be created msgQId will be set to NULL
+**
+**----------------------------------------------------------------------------*/
+JCMsgQueue::JCMsgQueue
+(
+ int maxMsgs, /* max msgs that can be queued */
+ int maxMsgLength, /* max bytes in a msg */
+ int options /* message queue options */
+) : msgQMaxLen(maxMsgLength+PADDING)
+{
+ if (!(msgQId = msgQCreate(maxMsgs, msgQMaxLen + JC_MSG_HDR_SIZE, options)))
+ {
+ printf("Error creating message queue %s\n", errnoGet());
+ }
+
+ if (!(msgQSndBuf = new char[msgQMaxLen + JC_MSG_HDR_SIZE]))
+ {
+ printf("Error: unable to allocate msg buffer memory\n");
+ }
+
+ if (!(msgQRcvBuf = new char[msgQMaxLen + JC_MSG_HDR_SIZE]))
+ {
+ printf("Error: unable to allocate msg buffer memory\n");
+ }
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCMsgQueue destructor
+**
+** PURPOSE: Delete data members for JCMsgQueue object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+JCMsgQueue::~JCMsgQueue ()
+{
+ if (msgQDelete(msgQId) != OK)
+ {
+ printf("Error deleting message queue %s\n", errnoGet());
+ }
+
+ delete [] msgQSndBuf;
+ delete [] msgQRcvBuf;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCMsgQueue::JCMsgQSend
+**
+** PURPOSE: JCMsgQSend sends the specified message to the specified message
+** queue. The buffer given will be copied into a local send buffer prior
+** to sending the message.
+**
+** INPUT PARAMETERS: replyMsgQ - message queue to use for sending a reply
+** msgType - type of message being sent
+** modId - module ID of sender
+** buffer - message to send
+** nBytes - number of bytes in the message
+** timeout - ticks to wait
+** priority - priority of the message (normal or urgent)
+**
+** RETURN VALUE(S): JC_STATUS
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS JCMsgQueue::JCMsgQSend
+(
+ JCMsgQueue *replyMsgQ,
+ unsigned int msgType,
+ MNET_MODULE_ID modId,
+ char * buffer,
+ unsigned int nBytes,
+ int timeout,
+ int priority
+)
+{
+ // Verify a few parameters first.
+ if (nBytes && !buffer)
+ return JC_PARAM_INVALID;
+
+ if (nBytes > msgQMaxLen-PADDING)
+ return JC_MSG_LENGTH_ERROR;
+
+ // Build message in the receive message buffer for this queue.
+ JC_MSG_HDR *pMsg = (JC_MSG_HDR *)msgQSndBuf;
+
+ pMsg->rplyQ = replyMsgQ;
+ pMsg->msgType = msgType ;
+ pMsg->modId = modId ;
+ pMsg->bytes = nBytes ;
+ if (buffer)
+ memcpy (msgQSndBuf + JC_MSG_HDR_SIZE, buffer, nBytes);
+
+ return (msgQSend(msgQId, msgQSndBuf, nBytes + JC_MSG_HDR_SIZE, timeout, priority));
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCMsgQueue::JCMsgQReceive
+**
+** PURPOSE: JCMsgQReceive.
+**
+** INPUT PARAMETERS: replyMsgQ - message queue to use for sending a reply
+** msgType - type of message being sent
+** modId - module ID of sender
+** buffer - message to send
+** nBytes - number of bytes in the message
+** timeout - ticks to wait
+**
+** RETURN VALUE(S): number of bytes received
+**
+**----------------------------------------------------------------------------*/
+int JCMsgQueue::JCMsgQReceive
+(
+ JCMsgQueue **replyMsgQ,
+ unsigned int *msgType,
+ MNET_MODULE_ID *modId,
+ char * buffer,
+ unsigned int *nBytes,
+ int timeout
+)
+{
+ int bytesRcvd;
+
+ // Verify a few parameters first.
+ if ((!buffer) || (!replyMsgQ) || (!msgType) || (!nBytes))
+ return JC_PARAM_INVALID;
+
+
+ // Wait here for a message to arrive or timeout number of ticks to expire.
+ if ((bytesRcvd = msgQReceive(msgQId, msgQRcvBuf, msgQMaxLen + JC_MSG_HDR_SIZE,
+ timeout)) != ERROR)
+ {
+ // Access the message header at the start of the buffer.
+ JC_MSG_HDR *pMsg = (JC_MSG_HDR *)msgQRcvBuf;
+
+ *replyMsgQ = pMsg->rplyQ;
+ *msgType = pMsg->msgType;
+ *modId = pMsg->modId;
+ *nBytes = pMsg->bytes;
+
+ // Message contents should follow the message header.
+ memcpy(buffer, msgQRcvBuf + JC_MSG_HDR_SIZE, bytesRcvd - JC_MSG_HDR_SIZE);
+ }
+
+ return (bytesRcvd);
+}
diff --git a/data/mnet/Common/Os/src/JCMutex.cpp b/data/mnet/Common/Os/src/JCMutex.cpp
new file mode 100644
index 0000000..5077cf5
--- /dev/null
+++ b/data/mnet/Common/Os/src/JCMutex.cpp
@@ -0,0 +1,43 @@
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCMutex.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 11/06/00
+// Description : JCMutex class (Mutual-Exclusion Semapore) implementation
+//
+// *******************************************************************
+
+#include "Os\JCMutex.h"
+
+
+JCMutex::JCMutex ()
+{
+ semId_ = semMCreate (SEM_Q_PRIORITY | SEM_DELETE_SAFE | SEM_INVERSION_SAFE);
+}
+
+
+bool JCMutex::take ()
+{
+ return (semId_ && semTake (semId_, WAIT_FOREVER) == OK);
+}
+
+
+bool JCMutex::give ()
+{
+ return (semId_ && semGive (semId_) == OK);
+}
+
+
+JCMutex::~JCMutex ()
+{
+ semDelete (semId_);
+}
diff --git a/data/mnet/Common/Os/src/JCTask.cpp b/data/mnet/Common/Os/src/JCTask.cpp
new file mode 100644
index 0000000..8488da3
--- /dev/null
+++ b/data/mnet/Common/Os/src/JCTask.cpp
@@ -0,0 +1,193 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCTask.cpp
+// Author(s) : Tim Olson
+// Create Date : 10/18/2000
+// Description :
+//
+// *******************************************************************
+
+#include <stdio.h>
+#include <errNoLib.h>
+#include <string.h>
+#include "Os/JCTask.h"
+#include "Os/JCModule.h"
+
+SEM_ID *pMnetSyncSem;
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCTask constructor
+**
+** PURPOSE: Initialize data members for JCTask object.
+**
+** INPUT PARAMETERS: name - name of the task
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+JCTask::JCTask
+(
+ char *name /* name of the task */
+) : taskStatus(JC_TASK_IDLE), taskAlarmed(FALSE)
+{
+ if (name)
+ {
+ taskName = new char[strlen(name) + 1];
+ if (taskName)
+ {
+ strcpy(taskName, name);
+ }
+ else
+ {
+ printf("JCTask::JCTask ERROR: Unable to allocate memory\n");
+ }
+ }
+ else
+ {
+ taskName = 0;
+ }
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCTask destructor
+**
+** PURPOSE: Delete data members for JCTask object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+JCTask::~JCTask ()
+{
+ delete [] taskName;
+}
+
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCTask::JCTaskSpawn
+**
+** PURPOSE: Spawn a task.
+**
+** INPUT PARAMETERS: priority - (0-255)
+** options - option word
+** stackSize - size in bytes of stack
+** entryPt - entry point of task
+** arg1 - argument 1 passed to entryPt
+** arg2 - argument 1 passed to entryPt
+** arg3 - argument 1 passed to entryPt
+** arg4 - argument 1 passed to entryPt
+** arg5 - argument 1 passed to entryPt
+** arg6 - argument 1 passed to entryPt
+** arg7 - argument 1 passed to entryPt
+** arg8 - argument 1 passed to entryPt
+** arg9 - argument 1 passed to entryPt
+** arg10 - NOT AN ARGUMENT!!!! This parameter can be used
+** to pass a function pointer to a function that
+** will be called if the task is suspended.
+** modId - module id number
+** importance - critical or non-critical
+**
+** RETURN VALUE(S): taskId or ERROR
+**
+**----------------------------------------------------------------------------*/
+int JCTask::JCTaskSpawn
+(
+ int priority, /* priority of new task */
+ int options, /* task option word */
+ int stackSize, /* size (bytes) of stack needed plus name */
+ FUNCPTR entryPt, /* entry point of new task */
+ int arg1, /* 1st of 10 req'd task args to pass to func */
+ int arg2,
+ int arg3,
+ int arg4,
+ int arg5,
+ int arg6,
+ int arg7,
+ int arg8,
+ int arg9,
+ int arg10,
+ MNET_MODULE_ID modId,
+ JC_TASK_IMPORTANCE importance
+)
+{
+
+ JCModule::InsertTaskInfo(modId, this);
+ taskPri = priority;
+ taskOpt = options;
+ taskStackSize = stackSize;
+ taskEntryPt = entryPt;
+ taskArg1 = arg1;
+ taskArg2 = arg2;
+ taskArg3 = arg3;
+ taskArg4 = arg4;
+ taskArg5 = arg5;
+ taskArg6 = arg6;
+ taskArg7 = arg7;
+ taskArg8 = arg8;
+ taskArg9 = arg9;
+ taskArg10 = arg10;
+ taskImportance = importance;
+ moduleId = modId;
+ taskStatus = JC_TASK_INIT;
+ coreDumpFunc = (FUNCPTR)arg10;
+
+ taskId = taskSpawn(taskName, priority, options, stackSize, entryPt,
+ arg1, arg2, arg3, arg4, arg5,
+ arg6, arg7, arg8, arg9, 0);
+
+ return(taskId);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCTask::JCTaskEnterLoop()
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void JCTask::JCTaskEnterLoop()
+{
+ taskStatus = JC_TASK_LOOP;
+
+ // Spin here waiting for all other tasks to call enter loop.
+ if (pMnetSyncSem)
+ semBTake(*pMnetSyncSem, WAIT_FOREVER);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: JCTask::JCTaskNormExit()
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void JCTask::JCTaskNormExit()
+{
+ taskStatus = JC_TASK_EXIT;
+}
diff --git a/data/mnet/Common/Os/src/Makefile b/data/mnet/Common/Os/src/Makefile
new file mode 100644
index 0000000..e5c0242
--- /dev/null
+++ b/data/mnet/Common/Os/src/Makefile
@@ -0,0 +1,62 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+# Name of this App's Directory
+COMMON_APP_DIR = os
+
+VOB2DIR = $(TOP_OF_VOB)\..\$(VOB)
+BINDIR = ..\bin
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\$(COMMON_APP_DIR).out
+else
+ MY_OUTPUT = $(OBJDIR)\$(COMMON_APP_DIR).out
+endif
+
+include $(VOB2DIR)\l3defs.mk
+
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) -r -o $@.tmp $(MODULE_OBJS)
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
diff --git a/data/mnet/Common/Os/test/Makefile b/data/mnet/Common/Os/test/Makefile
new file mode 100644
index 0000000..2ca8e4a
--- /dev/null
+++ b/data/mnet/Common/Os/test/Makefile
@@ -0,0 +1,65 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# Name of this App's Directory
+COMMON_APP_DIR = Os
+
+VOB2DIR = $(TOP_OF_VOB)\$(VOB)
+BINDIR = ..\bin
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\OsTest.out
+else
+ MY_OUTPUT = $(OBJDIR)\OsTest.out
+endif
+
+include $(VOB2DIR)\l3defs.mk
+
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) -r -o $@.tmp $(MODULE_OBJS)
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+ifneq ($(APPDIR),)
+ $(CP) $(BINDIR)\*.o $(VOB2DIR)\$(APPDIR)\bin\*.o
+endif
+
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
diff --git a/data/mnet/Common/Os/test/MsgQTest.cpp b/data/mnet/Common/Os/test/MsgQTest.cpp
new file mode 100644
index 0000000..e762b40
--- /dev/null
+++ b/data/mnet/Common/Os/test/MsgQTest.cpp
@@ -0,0 +1,91 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MsgQTest.cpp
+// Author(s) : Tim Olson
+// Create Date : 10/18/2000
+// Description :
+//
+// *******************************************************************
+
+
+#include <stdio.h>
+#include "Os/JCMsgQueue.h"
+
+JCMsgQueue *pMsgQ;
+bool isTestComplete = FALSE;
+
+extern "C"
+{
+void InitializeQueue()
+{
+ pMsgQ = new JCMsgQueue(10, 256, JC_MSG_Q_FIFO);
+
+ if (pMsgQ->JCGetMsgQId() == 0)
+ {
+ printf("Error creating test message queue\n");
+ return;
+ }
+
+ JC_MSG_Q_ID replyMsgQ;
+ unsigned int msgType;
+ char buffer[256];
+ unsigned int nBytes;
+ MNET_MODULE_ID modId;
+
+ while (!isTestComplete)
+ {
+ JC_STATUS status;
+ if ((status = pMsgQ->JCMsgQReceive(&replyMsgQ, &msgType, &modId, buffer, &nBytes,
+ JC_WAIT_FOREVER)) == JC_OK)
+ {
+ printf("Received a test message!\n");
+ printf("\treplyMsgQ = %x\n", replyMsgQ);
+ printf("\tmsgType = %x\n", msgType);
+ printf("\tmodId = %x\n", modId);
+ printf("\tnBytes = %x\n", nBytes);
+ printf("\tbuffer = ");
+ for (int i=0; i < nBytes; i++)
+ printf("%02x ", buffer[i]);
+ printf("\n");
+ }
+ else
+ {
+ printf("Error receiving message - errcode %x\n", status);
+ }
+ }
+}
+
+
+
+void SendToQueue()
+{
+ char msg[256];
+ JC_STATUS status;
+
+ // build a test message
+ for (int i=0; i < 16; i++)
+ {
+ msg[i] = (char)i;
+ }
+
+ isTestComplete = TRUE;
+ unsigned int msgType = 13;
+ unsigned int msgLen = 16;
+
+ if ((status = pMsgQ->JCMsgQSend((JC_MSG_Q_ID)0xabcd0123, msgType, LOGGER, msg, msgLen, JC_WAIT_FOREVER,
+ JC_MSG_PRI_NORMAL)) != JC_OK)
+ {
+ printf("Error sending test message - errcode %x\n", status);
+ }
+}
+
+} \ No newline at end of file
diff --git a/data/mnet/Common/Pm/Makefile b/data/mnet/Common/Pm/Makefile
new file mode 100644
index 0000000..2466a80
--- /dev/null
+++ b/data/mnet/Common/Pm/Makefile
@@ -0,0 +1,47 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+# (OPTIONAL) Append REPLACE - Replaces the List of directories
+# to be used in the SUBDIRS variable
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src REPLACE="src_api src_debug"
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+SUBDIRS = src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..
+
+VOBDIR = $(TOP_OF_VOB)/../$(VOB)
+
+# Allows a sub-set of the source code directories to be used
+
+ifneq ($(REPLACE),)
+ SUBDIRS = $(REPLACE)
+endif
+
+include $(VOBDIR)\l3defs.mk
+
+
diff --git a/data/mnet/Common/Pm/src/Makefile b/data/mnet/Common/Pm/src/Makefile
new file mode 100644
index 0000000..303ab8f
--- /dev/null
+++ b/data/mnet/Common/Pm/src/Makefile
@@ -0,0 +1,61 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+# Name of this App's Directory
+THIS_APP_DIR = Pm
+
+VOB2DIR = $(TOP_OF_VOB)\..\$(VOB)
+BINDIR = ..\bin
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\pm.out
+else
+ MY_OUTPUT = $(OBJDIR)\pm_com.out
+endif
+
+include $(VOB2DIR)\l3defs.mk
+
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) -r -o $@.tmp $(MODULE_OBJS)
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
diff --git a/data/mnet/Common/Pm/src/pm_common.cpp b/data/mnet/Common/Pm/src/pm_common.cpp
new file mode 100644
index 0000000..817e905
--- /dev/null
+++ b/data/mnet/Common/Pm/src/pm_common.cpp
@@ -0,0 +1,406 @@
+#include <stdio.h>
+#include <string.h>
+#include <semlib.h>
+#include <tickLib.h>
+
+#include "defs.h"
+#ifndef UNIT_TEST_PMCLASS
+#include "vipermib.h"
+#endif
+#include "pm/pm_common.h"
+
+/*
+ * PM_BaseObject::takeSemaphore
+ */
+bool PM_BaseObject::takeSemaphore()
+{
+ if (m_semaphore != NULL)
+ semTake(m_semaphore,WAIT_FOREVER);
+ return(TRUE);
+}
+
+/*
+ * PM_BaseObject::giveSemaphore
+ */
+bool PM_BaseObject::giveSemaphore()
+{
+ if (m_semaphore != NULL)
+ semGive(m_semaphore);
+ return(TRUE);
+}
+
+/*
+ * PM_SimpleCounter::reset
+ */
+void PM_SimpleCounter::reset()
+{
+ takeSemaphore();
+ currentInterval=0;
+ maxValue[currentInterval] = value[currentInterval] = 0;
+ giveSemaphore();
+}
+
+/*
+ * PM_SimpleCounter::increment()
+ */
+bool PM_SimpleCounter::increment()
+{
+ takeSemaphore();
+ value[currentInterval]++;
+ if( maxValue[currentInterval] < value[currentInterval] ) {
+ maxValue[currentInterval] = value[currentInterval];
+ }
+ giveSemaphore();
+ return(TRUE);
+}
+
+
+/*
+ * PM_SimpleCounter::increment(int x)
+ */
+bool PM_SimpleCounter::increment(int x)
+{
+ takeSemaphore();
+ value[currentInterval] += x;
+ if( maxValue[currentInterval] < value[currentInterval] ) {
+ maxValue[currentInterval] = value[currentInterval];
+ }
+ giveSemaphore();
+ return(TRUE);
+}
+
+
+/*
+ * PM_SimpleCounter::decrement
+ */
+bool PM_SimpleCounter::decrement()
+{
+ takeSemaphore();
+ value[currentInterval]--;
+ giveSemaphore();
+ return(TRUE);
+}
+
+/*
+ * PM_SimpleCounter::getValue
+ */
+int PM_SimpleCounter::getValue()
+{
+ int return_value;
+ takeSemaphore();
+ return_value = value[currentInterval];
+ giveSemaphore();
+ return(return_value);
+
+}
+
+/*
+ * PM_SimpleCounter::setValue
+ */
+bool PM_SimpleCounter::setValue(int new_value)
+{
+ takeSemaphore();
+ value[currentInterval] = new_value;
+ if( maxValue[currentInterval] < value[currentInterval] ) {
+ maxValue[currentInterval] = value[currentInterval];
+ }
+ giveSemaphore();
+ return(TRUE);
+
+}
+
+
+/*
+ * PM_SimpleCounter::getMaxValue
+ */
+int PM_SimpleCounter::getMaxValue()
+{
+ int return_value=0,count;
+ takeSemaphore();
+ return_value = maxValue[currentInterval];
+ giveSemaphore();
+ return(return_value);
+
+}
+
+
+
+/*
+ * PM_SimpleCounter::advanceInterval
+ */
+void PM_SimpleCounter::advanceInterval()
+{
+ takeSemaphore();
+ if (++currentInterval >= PM_MAX_INTERVAL) {
+ currentInterval = 0;
+ }
+ maxValue[currentInterval] = value[currentInterval] = 0;
+ giveSemaphore();
+ return;
+}
+
+
+
+/*
+ * PM_PerCauseCounter::reset
+ */
+void PM_PerCauseCounter::reset()
+{
+ int count;
+ for(count=0;count<PM_MAX_CAUSES;count++){
+ perCauseCounter[count].reset();
+ }
+}
+
+
+/*
+ * PM_PerCauseCounter::getValue
+ */
+int PM_PerCauseCounter::getValue(CauseCode cause)
+{
+ if (cause < PM_MAX_CAUSES)
+ return(perCauseCounter[cause].getValue());
+ else
+ return(0);
+}
+
+
+/*
+ * PM_PerCauseCounter::advanceInterval
+ */
+void PM_PerCauseCounter::advanceInterval()
+{
+ int count;
+ for(count=0;count<PM_MAX_CAUSES;count++) {
+ perCauseCounter[count].advanceInterval();
+ }
+}
+
+/*
+ * PM_PerCauseCounter::increment
+ */
+bool PM_PerCauseCounter::increment(CauseCode cause)
+{
+ int index;
+
+ index = pm_map_cause_to_index(cause);
+
+ if (index < PM_CURRENT_MAX_CAUSES)
+ perCauseCounter[index].increment();
+ else printf("PM ERRRO: Invalid Cause Code %d passed in from API\n", (int) cause );
+}
+
+
+/*
+ * PM_PerCauseCounter::decrement
+ */
+bool PM_PerCauseCounter::decrement(CauseCode cause)
+{
+ int index;
+
+ index = pm_map_cause_to_index(cause);
+
+ if (index < PM_CURRENT_MAX_CAUSES)
+ perCauseCounter[index].decrement();
+ else printf("PM ERRRO: Invalid Cause Code %d passed in from API\n", (int) cause );
+}
+
+
+/*
+ * PM_StatisticCounter::reset
+ */
+void PM_StatisticCounter::reset()
+{
+ /*
+ * quicker way of cleaning up all the variables
+ * is to memset
+ */
+ takeSemaphore();
+ currentInterval = 0;
+ numRecords[currentInterval]=0;
+ for(int i=0;i< PM_MAX_RECORDS;i++) records[currentInterval][i]=0;
+ giveSemaphore();
+}
+
+
+/*
+ * PM_StatisticCounter::addRecord
+ */
+bool PM_StatisticCounter::addRecord(int value)
+{
+ takeSemaphore();
+ if (numRecords[currentInterval] >= PM_MAX_RECORDS) {
+ /*
+ * No more records can be added now
+ */
+ giveSemaphore();
+ return(FALSE);
+ }
+ records[currentInterval][numRecords[currentInterval]++] = value;
+ giveSemaphore();
+ return(TRUE);
+}
+
+
+/*
+ * PM_StatisticCounter::getMeanValue
+ */
+int PM_StatisticCounter::getMeanValue()
+{
+ int index,total=0;
+ takeSemaphore();
+ for(index=0;index<numRecords[currentInterval];index++) {
+ total += records[currentInterval][index];
+ }
+ giveSemaphore();
+ if (numRecords[currentInterval] == 0) return(0);
+ return(total / numRecords[currentInterval]);
+}
+
+
+/*
+ * PM_StatisticCounter::getMaxValue
+ */
+int PM_StatisticCounter::getMaxValue()
+{
+ int maxValue=0,index;
+ takeSemaphore();
+ for(index=0;index<numRecords[currentInterval];index++) {
+ if (records[currentInterval][index] > maxValue) {
+ maxValue = records[currentInterval][index];
+ }
+ }
+ giveSemaphore();
+ return(maxValue);
+}
+
+
+/*
+ * PM_StatisticCounter::advanceInterval
+ */
+void PM_StatisticCounter::advanceInterval()
+{
+ takeSemaphore();
+ int count,last_record;
+ BOOL not_zero=FALSE;
+
+ if (numRecords[currentInterval] != 0) {
+ last_record = records[currentInterval][numRecords[currentInterval]-1];
+ not_zero = TRUE;
+ }
+
+ if (++currentInterval >= PM_MAX_INTERVAL) {
+ currentInterval = 0;
+ }
+ for(count=0;count<PM_MAX_RECORDS;count++)
+ records[currentInterval][count] = 0;
+ numRecords[currentInterval]=0;
+ giveSemaphore();
+ if (not_zero) {
+ addRecord(last_record);
+ }
+}
+
+/*
+ * PM_AccumTimeCounter::reset
+ */
+void PM_AccumTimeCounter::reset()
+{
+ takeSemaphore();
+ currentInterval = 0;
+ for(int i=0;i< PM_MAX_INTERVAL;i++)
+ {
+ accumValue[i]=0;
+ lastStart[i]=0;
+ state[i]=false;
+ }
+ giveSemaphore();
+}
+
+/*
+ * PM_AccumTimeCounter::start
+ */
+void PM_AccumTimeCounter::start()
+{
+ // start the counter
+ takeSemaphore();
+ if( ! state[currentInterval]) {
+ lastStart[currentInterval]=tickGet();
+ state[currentInterval]=true;
+ }
+ giveSemaphore();
+}
+
+/*
+ * PM_AccumTimeCounter::stop
+ */
+void PM_AccumTimeCounter::stop()
+{
+ // stop the counter
+ takeSemaphore();
+ if( state[currentInterval]) {
+ accumValue[currentInterval] += (tickGet() - lastStart[currentInterval]);
+ state[currentInterval]=false;
+ }
+ giveSemaphore();
+}
+
+/*
+ * PM_AccumTimeCounter::getValue
+ */
+int PM_AccumTimeCounter::getValue()
+{
+ int value;
+ // start the counter
+ takeSemaphore();
+ if( state[currentInterval] ) {
+ // do not change the current state, return the last accumulated value plus the
+ // timer value up the now
+ value = accumValue[currentInterval] + tickGet() - lastStart[currentInterval];
+ giveSemaphore();
+ return value;
+ }
+ else
+ {
+ // timer is not running, the accumValue shoudl hold the correct data
+ value = accumValue[currentInterval];
+ giveSemaphore();
+ return value;
+ }
+
+}
+
+
+/*
+ * PM_AccumTimeCounter::advanceInterval
+ */
+void PM_AccumTimeCounter::advanceInterval()
+{
+ takeSemaphore();
+ int currentTick;
+ if( state[currentInterval] ) {
+ // timer is running
+ currentTick = tickGet();
+ accumValue[currentInterval] += (currentTick - lastStart[currentInterval]);
+ state[currentInterval]=false;
+ // advance the interval
+ currentInterval = (currentInterval + 1 ) % PM_MAX_INTERVAL;
+ // carry over the last interval's timer status and tick
+ lastStart[currentInterval] = currentTick;
+ accumValue[currentInterval] = 0;
+ state[currentInterval]=true;
+ } else {
+ // timer is NOT running, directly advance the interval
+ currentInterval = (currentInterval + 1 ) % PM_MAX_INTERVAL;
+ lastStart[currentInterval] = 0;
+ accumValue[currentInterval] = 0;
+ state[currentInterval]=false;
+ }
+ giveSemaphore();
+}
+
+
+
+
+
+
diff --git a/data/mnet/Common/apm/include/apmdefs.h b/data/mnet/Common/apm/include/apmdefs.h
new file mode 100644
index 0000000..71c8d7d
--- /dev/null
+++ b/data/mnet/Common/apm/include/apmdefs.h
@@ -0,0 +1,51 @@
+#ifndef __APMDEFS_H__
+#define __APMDEFS_H__
+
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : apmdefs.h
+// Author(s) : MindTree
+// Create Date : 3/12/00
+// Description : Common definitions to be used by APM
+//
+// *******************************************************************
+
+// this port numbers are used by PM and Alarm Module resp.
+#define PM_SERVER_PORT 11789
+#define AM_SERVER_PORT 11788
+
+// this new port numbers are used betw, APM1, APM2, APM2Gui ...
+
+//March 29 fix
+//#define APM2_SERVER_PORT 11795
+#define APM3_SERVER_PORT 11796
+#define APM_GUI_PORT 11797
+#define AM_APPLET_PORT 11798
+
+
+
+// TODO: this enumeration clashes with another definition
+// needs to be cleaned up by the next build
+typedef enum RET_STATUS{
+ STATUS_OK = 0 ,
+ STATUS_ERROR = -1
+ };
+
+//Used for Windows Services.
+#if defined(_WINDOWS_) || defined(WIN32)
+#define kMaxEventMsgLen 1024
+#define APP_APPROX_MAX_INIT_TIME 2000 /* milliseconds */
+typedef RET_STATUS STATUS;
+#endif
+
+
+#endif /* __APMDEFS_H__ */
diff --git a/data/mnet/Common/bssgp/Makefile b/data/mnet/Common/bssgp/Makefile
new file mode 100644
index 0000000..bd4611d
--- /dev/null
+++ b/data/mnet/Common/bssgp/Makefile
@@ -0,0 +1,47 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+# (OPTIONAL) Append REPLACE - Replaces the List of directories
+# to be used in the SUBDIRS variable
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src REPLACE=src
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+SUBDIRS = src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+VOBDIR = $(TOP_OF_VOB)\$(VOB)
+
+# Allows a sub-set of the source code directories to be used
+
+ifneq ($(REPLACE),)
+ SUBDIRS = $(REPLACE)
+endif
+
+include $(VOBDIR)\l3defs.mk
+
+
diff --git a/data/mnet/Common/bssgp/src/Makefile b/data/mnet/Common/bssgp/src/Makefile
new file mode 100644
index 0000000..a8da67c
--- /dev/null
+++ b/data/mnet/Common/bssgp/src/Makefile
@@ -0,0 +1,61 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# Name of this App's Directory
+THIS_APP_DIR = bssgp
+
+VOB2DIR = $(TOP_OF_VOB)\$(VOB)
+BINDIR = ..\bin
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\$(THIS_APP_DIR).out
+else
+ MY_OUTPUT = $(OBJDIR)\$(THIS_APP_DIR).out
+endif
+
+include $(VOB2DIR)\l3defs.mk
+
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) -r -o $@.tmp $(MODULE_OBJS)
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
diff --git a/data/mnet/Common/bssgp/src/bssgp_decoder.cpp b/data/mnet/Common/bssgp/src/bssgp_decoder.cpp
new file mode 100644
index 0000000..b12d340
--- /dev/null
+++ b/data/mnet/Common/bssgp/src/bssgp_decoder.cpp
@@ -0,0 +1,2520 @@
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : bssgp_decoder.cpp *
+ * *
+ * Description : Decoding functions for the BSS-GP layer module *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *--------------------------- Notes ----------------------------------------------------*
+ * References are to sections numbers of the BSSGP spec. (GSM 08.18) unless otherwise *
+ * indicated *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |10/10/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include "bssgp\bssgp_prot.h"
+#include "bssgp\bssgp_util.h"
+#include "bssgp\bssgp_decoder.h"
+#include "bssgp\bssgp_ie_decoder.h"
+#include "bssgp\bssgp_util.h"
+#include "bssgp\bssgp_api.h"
+#include "bssgp\bssgp_unitdata.h"
+
+
+/*
+ * MAIN TO DO: Use the incoming bool flag to see if we just need protocol decode functionality
+ * or if we need to actually process the msg
+ *
+ */
+
+
+
+/*
+ * bssgp_decode_msg
+ *
+ * Notes : entry point for packets sent through BSSGP, either from the
+ * IP network side or to the IP network side (in the latter
+ * case, it is being used more as a protocol decoder, with
+ * the boolean flag incoming set to FALSE)
+ */
+BOOL
+bssgp_decode_msg(UINT8 *msg,UINT16 msg_len,BOOL incoming,
+ BSSGP_NETWORK_QOS_LEVEL qos_level,BSSGP_BVCI bvci,BOOL *free_buff)
+{
+ DBG_FUNC("bssgp_decode_msg",BSSGP_LAYER);
+ DBG_ENTER();
+ BOOL status = FALSE;
+ UINT8 *byte;
+ UINT16 index = 0, pdu_len;
+
+ byte = (UINT8*)&msg[index];
+
+ pdu_len = msg_len - 1;
+
+
+ DBG_TRACE("PDU Type : %s",bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+
+ switch(*byte) {
+ case BSSGP_PDU_DL_UNITDATA: {
+ status = bssgp_decode_dl_unitdata(&msg[index],&pdu_len,qos_level);
+ *free_buff = TRUE;
+ }
+ break;
+
+ case BSSGP_PDU_UL_UNITDATA:{
+ status = bssgp_decode_ul_unitdata(&msg[index],&pdu_len,qos_level,bvci);
+ *free_buff = TRUE;
+ }
+ break;
+
+ case BSSGP_PDU_RA_CAP:{
+ status = bssgp_decode_radio_cap(&msg[index],&pdu_len,incoming);
+ *free_buff = TRUE;
+ }
+ break;
+ case BSSGP_PDU_PAGING_PS:{
+ status = bssgp_decode_paging_ps(&msg[index],&pdu_len,incoming);
+ *free_buff = TRUE;
+ }
+ break;
+
+ case BSSGP_PDU_RA_CAP_UPDATE:{
+ status = bssgp_decode_radio_cap_update(&msg[index],&pdu_len,incoming);
+ *free_buff = TRUE;
+ }
+ break;
+
+ case BSSGP_PDU_RA_CAP_UPDATE_ACK:{
+ status = bssgp_decode_radio_cap_update_ack(&msg[index],&pdu_len,incoming);
+ *free_buff = TRUE;
+ }
+ break;
+
+ case BSSGP_PDU_RADIO_STATUS:{
+ status = bssgp_decode_radio_status(&msg[index],&pdu_len,incoming);
+ *free_buff = TRUE;
+ }
+ break;
+
+ case BSSGP_PDU_SUSPEND:{
+ status = bssgp_decode_suspend(&msg[index],&pdu_len,incoming);
+ *free_buff = TRUE;
+ }
+ break;
+
+ case BSSGP_PDU_SUSPEND_ACK:{
+ status = bssgp_decode_suspend_ack(&msg[index],&pdu_len,incoming);
+ *free_buff = TRUE;
+ }
+ break;
+
+ case BSSGP_PDU_SUSPEND_NACK:{
+ status = bssgp_decode_suspend_nack(&msg[index],&pdu_len,incoming);
+ *free_buff = TRUE;
+ }
+ break;
+
+ case BSSGP_PDU_RESUME:{
+ status = bssgp_decode_resume(&msg[index],&pdu_len,incoming);
+ *free_buff = TRUE;
+ }
+ break;
+
+ case BSSGP_PDU_RESUME_ACK:{
+ status = bssgp_decode_resume_ack(&msg[index],&pdu_len,incoming);
+ *free_buff = TRUE;
+ }
+ break;
+
+ case BSSGP_PDU_RESUME_NACK:{
+ status = bssgp_decode_resume_nack(&msg[index],&pdu_len,incoming);
+ *free_buff = TRUE;
+ }
+ break;
+
+ case BSSGP_PDU_FLOW_CONTROL_MS:{
+ status = bssgp_decode_flow_control_ms(&msg[index],&pdu_len,incoming);
+ }
+ break;
+
+ case BSSGP_PDU_FLOW_CONTROL_MS_ACK:{
+ status = bssgp_decode_flow_control_ms_ack(&msg[index],&pdu_len,incoming);
+ }
+ break;
+
+ case BSSGP_PDU_FLUSH_LL:{
+ status = bssgp_decode_flush_ll(&msg[index],&pdu_len,incoming);
+ }
+ break;
+
+ case BSSGP_PDU_FLUSH_LL_ACK:{
+ status = bssgp_decode_flush_ll_ack(&msg[index],&pdu_len,incoming);
+ }
+ break;
+
+ case BSSGP_PDU_FLOW_CONTROL_BVC:{
+ status = bssgp_decode_flow_control_bvc(&msg[index],&pdu_len,incoming);
+ }
+ break;
+
+ case BSSGP_PDU_FLOW_CONTROL_BVC_ACK:{
+ status = bssgp_decode_flow_control_bvc_ack(&msg[index],&pdu_len,incoming);
+ }
+ break;
+ /*
+ case BSSGP_PDU_PTM_UNITDATA:{
+ status = bssgp_decode_ptm_unitdata(&msg[index],&pdu_len,incoming,qos_level);
+ }
+ break;
+
+ case BSSGP_PDU_PAGING_CS:{
+ status = bssgp_decode_paging_cs(&msg[index],&pdu_len,incoming);
+ }
+ break;*/
+
+ case BSSGP_PDU_BVC_BLOCK:{
+ status = bssgp_decode_block(&msg[index],&pdu_len,incoming);
+ }
+ break;
+
+ case BSSGP_PDU_BVC_BLOCK_ACK:{
+ status = bssgp_decode_block_ack(&msg[index],&pdu_len,incoming);
+ }
+ break;
+
+ case BSSGP_PDU_RESET:{
+ status = bssgp_decode_reset(&msg[index],&pdu_len,incoming);
+ }
+ break;
+
+ case BSSGP_PDU_RESET_ACK:{
+ status = bssgp_decode_reset_ack(&msg[index],&pdu_len,incoming);
+ }
+ break;
+
+ case BSSGP_PDU_UNBLOCK:{
+ status = bssgp_decode_unblock(&msg[index],&pdu_len,incoming);
+ }
+ break;
+
+ case BSSGP_PDU_UNBLOCK_ACK:{
+ status = bssgp_decode_unblock_ack(&msg[index],&pdu_len,incoming);
+ }
+ break;
+
+ case BSSGP_PDU_LLC_DISCARDED:{
+ status = bssgp_decode_llc_discarded(&msg[index],&pdu_len,incoming);
+ }
+ break;
+ /*
+ case BSSGP_PDU_SGSN_INVOKE_TRACE:{
+ status = bssgp_decode_invoke_trace(&msg[index],&pdu_len,incoming);
+ }
+ break;*/
+
+ case BSSGP_PDU_STATUS:{
+ status = bssgp_decode_status(&msg[index],&pdu_len,incoming);
+ }
+ break;
+
+ default:{
+ DBG_ERROR("Unknown PDU ! Error");
+ }
+ } /* End of switch pdu_type */
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+
+/*
+ * bssgp_decode_dl_unitdata
+ *
+ * # DL-Unitdata is from GS --> MS in direction
+ * # Decode functions are triggered on rx of data from the network side
+ * # Hence this function would be called only on the GP-10 platform;
+ * and we need to Q the unitdata onto the buffer Qs to be picked up by RLC
+ *
+ */
+BOOL
+bssgp_decode_dl_unitdata(UINT8 *msg,UINT16 *msg_len, BSSGP_NETWORK_QOS_LEVEL qos_level)
+{
+ DBG_FUNC("bssgp_decode_dl_unitdata",BSSGP_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_DL_UNITDATA_MSG dl_unitdata;
+
+
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_DL_UNITDATA) {
+ DBG_ERROR("PDU type no DL UNITDATA; %s type",bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ memset(&dl_unitdata,0,sizeof(dl_unitdata));
+
+ DBG_TRACE("Decoding DL-Unitdata message");
+
+ /* Decode the individual IE indicators */
+
+ bssgp_ie_decode_tlli(&dl_unitdata.tlli,&msg[index],&index, BSSGP_FORMAT_V);
+
+ bssgp_ie_decode_qos_profile(&dl_unitdata.qos_profile,&msg[index],&index, BSSGP_FORMAT_V);
+
+ bssgp_ie_decode_qos_params(&dl_unitdata.qos_params,&msg[index],&index);
+
+ bssgp_ie_decode_pdu_lifetime(&dl_unitdata.pdu_lifetime,&msg[index],&index);
+
+ while(index < *msg_len) {
+ byte = (UINT8*)&msg[index];
+ switch(*byte) {
+ case BSSGP_IEI_TLLI:{
+ bssgp_ie_decode_tlli(&dl_unitdata.tlli_old,&msg[index],&index, BSSGP_FORMAT_TLV);
+ }
+ break;
+
+ case BSSGP_IEI_IMSI:{
+ bssgp_ie_decode_imsi(&dl_unitdata.imsi,&msg[index],&index);
+ }
+ break;
+
+ case BSSGP_IEI_MS_RADIO_ACCESS_CAP:{
+ bssgp_ie_decode_ms_ra_cap(&dl_unitdata.radio_access_cap,&msg[index],&index);
+ }
+ break;
+
+ case BSSGP_IEI_DRX_PARAMS:{
+ bssgp_ie_decode_drx_params(&dl_unitdata.drx_params,&msg[index],&index);
+ }
+ break;
+
+ case BSSGP_IEI_ALIGNMENT_OCTETS:{
+ bssgp_ie_decode_alignment_octets(&msg[index],&index);
+ }
+ break;
+
+ case BSSGP_IEI_LSA_INFORMATION:{
+ bssgp_ie_decode_lsa_info(&dl_unitdata.lsa_info,&msg[index],&index);
+ }
+ break;
+
+ case BSSGP_IEI_LLC_PDU:{
+#ifdef WIN32
+ LLC_PDU pdu;
+ pdu.data = bssgp_ie_decode_llc_pdu_ext(&pdu.data_len,&msg[index],&index);
+ llcwin32_pdu_handler(pdu);
+#else
+ bssgp_ie_decode_llc_pdu(&dl_unitdata, &msg[index],&index);
+ bssgp_udt_put_buffer_in_q(dl_unitdata.tlli.tlli,qos_level,(UINT8*)dl_unitdata.pdu.data,dl_unitdata.pdu.data_len,
+ dl_unitdata);
+
+#endif
+ }
+ break;
+
+ default: {
+ DBG_ERROR("BSSGP: Invalid IEI found in DL-UNITDATA decode %#x\n", *byte);
+ DBG_LEAVE();
+ return (FALSE);
+ /* TO DO : Report error to BSSGP peer here */
+ }
+ break;
+ }/* end of switch */
+ } /* end of while */
+
+ /* TO DO : Need to check for mandatory IEs & do the needful */
+
+ *msg_len -= index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_decode_ul_unitdata
+ *
+ * # UL-Unitdata is from MS --> GS in direction
+ * # Decode functions are triggered on rx of data from the network side
+ * # Hence this function would be called only on the GS platform;
+ * and we need to pass on the unitdata to LLC (no need for Qing for Uplink)
+ */
+BOOL
+bssgp_decode_ul_unitdata(UINT8 *msg,UINT16 *msg_len,BSSGP_NETWORK_QOS_LEVEL qos_level,BSSGP_BVCI bvci)
+{
+ DBG_FUNC("bssgp_decode_ul_unitdata",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+ T_RIL3_IE_QOS_PROFILE_ID qos_profile;
+ RIL3_IE_CELL_IDENTIFIER cell_id;
+ RIL3_IE_LSA_IDENTIFIER_LIST lsa_id_list;
+ LLC_PDU pdu;
+ RIL3_TLLI tlli;
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_UL_UNITDATA) {
+ DBG_ERROR("PDU type not UL UNITDATA; %s type",bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+
+ DBG_TRACE("Decoding UL-Unitdata message");
+
+ bssgp_ie_decode_tlli(&tlli,&msg[index],&index, BSSGP_FORMAT_V);
+
+ bssgp_ie_decode_qos_profile(&qos_profile,&msg[index],&index, BSSGP_FORMAT_V);
+
+ while(index < *msg_len) {
+ byte = (UINT8*)&msg[index];
+ switch(*byte) {
+ case BSSGP_IEI_CELL_ID:{
+ bssgp_ie_decode_cell_id(&cell_id,&msg[index],&index);
+ }
+ break;
+
+ case BSSGP_IEI_ALIGNMENT_OCTETS:{
+ bssgp_ie_decode_alignment_octets(&msg[index],&index);
+ }
+ break;
+
+ case BSSGP_IEI_LSA_ID_LIST:{
+ bssgp_ie_decode_lsa_identifier_list(&lsa_id_list,&msg[index],&index);
+ }
+ break;
+
+ case BSSGP_IEI_LLC_PDU:{
+ pdu.data = bssgp_ie_decode_llc_pdu_ext(&pdu.data_len,&msg[index],&index);
+#if defined(MNET_GS)
+ /* Hate to wrap an ifdef; but no other way to retain most of the common code */
+ bssgp_api_send_ul_unitdata(tlli.tlli,cell_id.cell_id,cell_id.routing_area,pdu.data,pdu.data_len,bvci);
+#endif
+ }
+ break;
+ default: {
+ DBG_ERROR("BSSGP: Invalid IEI found in UL-UNITDATA decode %#x\n", *byte);
+ DBG_LEAVE();
+ return (FALSE);
+ /* TO DO : need to report error to peer BSSGP */
+ }
+ break;
+ } /* end of switch */
+ } /* end of while loop */
+
+
+ /* TO DO : Need to check for the presence of mandatory IEs */
+
+ *msg_len -= index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_decode_paging
+ *
+ * Paging PDU defined in 08.18:-
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | IMSI |
+ * | DRX Params |
+ * | BVCI |
+ * | Location Area |
+ * | Routing Area |
+ * | BSS Area Indication |
+ * | QoS Profile |
+ * | P-TMSI |
+ * |-------------------------|
+ *
+ * From GS --> GP-10
+ */
+BOOL
+bssgp_decode_paging_ps(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_paging_ps",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_PAGING_PS_MSG *paging_msg;
+
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* First check the PDU type */
+ if (*byte != (UINT8)BSSGP_PDU_PAGING_PS) {
+ DBG_ERROR("PDU not paging-ps msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_PAGING_PS;
+ paging_msg = (BSSGP_PAGING_PS_MSG*)&api_msg.msg.paging_ps;
+
+
+
+
+ paging_msg->imsi.ie_present = FALSE;
+ paging_msg->location_area.ie_present = FALSE;
+ paging_msg->routing_area.ie_present = FALSE;
+ paging_msg->drx_params.ie_present = FALSE;
+ paging_msg->qos_profile.ie_present = FALSE;
+ paging_msg->tmsi.ie_present = FALSE;
+ paging_msg->bvci.ie_present = FALSE;
+ paging_msg->bss_area.ie_present = FALSE;
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding Packet-Switched Paging message");
+
+ while (index < *msg_len) {
+ byte = (UINT8*)&msg[index];
+ switch (*byte) {
+
+ case BSSGP_IEI_IMSI: {
+ if (bssgp_ie_decode_imsi(&paging_msg->imsi,&msg[index],&index)) {
+ paging_msg->imsi.ie_present = TRUE;
+ }
+ else {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+ break;
+
+ case BSSGP_IEI_BVCI: {
+ if (bssgp_ie_decode_bvci(&paging_msg->bvci,&msg[index],&index)) {
+ }
+ else {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+ break;
+
+ case BSSGP_IEI_LOCATION_AREA:{
+ if (bssgp_ie_decode_location_area(&paging_msg->location_area,&msg[index],&index)) {
+ paging_msg->location_area.ie_present = TRUE;
+ }
+ else {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+ break;
+
+ case BSSGP_IEI_ROUTING_AREA:{
+ if(bssgp_ie_decode_routing_area(&paging_msg->routing_area,&msg[index],&index)) {
+ paging_msg->routing_area.ie_present = TRUE;
+ }
+ else {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+ break;
+
+ case BSSGP_IEI_BSS_AREA_IND:{
+ if(bssgp_ie_decode_bss_area_ind(&paging_msg->bss_area,&msg[index],&index)) {
+ paging_msg->bss_area.ie_present = TRUE;
+ }
+ else {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+ break;
+
+ case BSSGP_IEI_DRX_PARAMS:{
+ if(bssgp_ie_decode_drx_params(&paging_msg->drx_params,&msg[index],&index)) {
+ paging_msg->drx_params.ie_present = TRUE;
+ }
+ else {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+ break;
+
+ case BSSGP_IEI_QOS_PROFILE:{
+ if(bssgp_ie_decode_qos_profile(&paging_msg->qos_profile,&msg[index],&index, BSSGP_FORMAT_TLV)) {
+ paging_msg->qos_profile.ie_present = TRUE;
+ }
+ else {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+ break;
+
+ case BSSGP_IEI_TMSI:{
+ if (bssgp_ie_decode_tmsi(&paging_msg->tmsi,&msg[index],&index)) {
+ paging_msg->tmsi.ie_present = TRUE;
+ }
+ else {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+ break;
+
+ default: {
+ DBG_ERROR("BSSGP: Invalid IEI found in PAGING-PS decode %#x\n", *byte);
+ DBG_LEAVE();
+ return (FALSE);
+ /* TO DO : need to report error to peer BSSGP */
+ }
+ break;
+
+ } /* end of switch */
+ } /* End of while loop */
+
+ *msg_len -= index;
+ DBG_TRACE("Paging-PS message %d bytes length",index);
+
+#if defined(MNET_GP10)
+ if (!rm_bssgp_msg_callback(api_msg)) {
+ DBG_ERROR("GRR reports error on Packet-Switched paging msg");
+ }
+ else {
+ DBG_TRACE("Posted packet-switched paging msg to GRR successfully");
+ }
+
+#elif defined(MNET_GS)
+ DBG_ERROR("BSSGP: Unexpected PAGING PS message\n");
+ DBG_LEAVE();
+ return (FALSE);
+#endif
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+
+/*
+ * bssgp_decode_radio_status
+ *
+ * Radio Status PDU defined in 08.18:-
+ *
+ * |--------------|
+ * | PDU type |
+ * | TLLI |
+ * | TMSI |
+ * | IMSI |
+ * | Radio Cause |
+ * |--------------|
+ *
+ * From GP-10 to GS
+ */
+BOOL
+bssgp_decode_radio_status(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_radio_status",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_RADIO_STATUS_MSG *radio_status_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != (UINT8)BSSGP_PDU_RADIO_STATUS) {
+ DBG_ERROR("PDU not Radio Status msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_RADIO_STATUS;
+ radio_status_msg = (BSSGP_RADIO_STATUS_MSG*)&api_msg.msg.radio_status;
+
+
+
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding Radio Status message");
+
+ /* tlli */
+ if (msg[index] == BSSGP_IEI_TLLI)
+ {
+ if (!bssgp_ie_decode_tlli(&radio_status_msg->tlli,&msg[index],&index, BSSGP_FORMAT_TLV)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+ /* tmsi */
+ if (msg[index] == BSSGP_IEI_TMSI)
+ {
+ if (bssgp_ie_decode_tmsi(&radio_status_msg->tmsi,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+
+ /* imsi */
+ if (msg[index] == BSSGP_IEI_IMSI)
+ {
+ if (bssgp_ie_decode_imsi(&radio_status_msg->imsi,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+
+ /* cause */
+ if (bssgp_ie_decode_radio_cause(&radio_status_msg->cause,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ DBG_TRACE("Radio Status message %d bytes length",index);
+
+
+ *msg_len -= index;
+
+#if defined(MNET_GP10)
+ DBG_ERROR("BSSGP: Unexpected RADIO STATUS message\n");
+ DBG_LEAVE();
+ return (FALSE);
+#elif defined(MNET_GS)
+ if (!gmm_bssgp_msg_callback(api_msg)) {
+ DBG_ERROR("GMM reports error on Radio Status msg");
+ }
+ else {
+ DBG_TRACE("Posted Radio Status msg to GMM successfully");
+ }
+#endif
+
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_decode_suspend
+ *
+ * Suspend PDU defined in 08.18:-
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | TLLI |
+ * | Routing Area |
+ * |-------------------------|
+ *
+ * From GP-10 to GS
+ */
+BOOL
+bssgp_decode_suspend(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_suspend",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_SUSPEND_MSG *suspend_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_SUSPEND) {
+ DBG_ERROR("PDU not Suspend msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_SUSPEND;
+ suspend_msg = (BSSGP_SUSPEND_MSG*)&api_msg.msg.suspend;
+
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding Suspend message");
+
+ /* tlli */
+ if (!bssgp_ie_decode_tlli(&suspend_msg->tlli,&msg[index],&index, BSSGP_FORMAT_TLV)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* routing area */
+ if (!bssgp_ie_decode_routing_area(&suspend_msg->routing_area,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ DBG_TRACE("Suspend message %d bytes length",index);
+
+ *msg_len -= index;
+
+#if defined(MNET_GP10)
+ DBG_ERROR("BSSGP: Unexpected SUSPEND message\n");
+ DBG_LEAVE();
+ return (FALSE);
+#elif defined(MNET_GS)
+ if (!gmm_bssgp_msg_callback(api_msg)) {
+ DBG_ERROR("GMM reports error on Suspend msg");
+ }
+ else {
+ DBG_TRACE("Posted Suspend msg to GMM successfully");
+ }
+#endif
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_decode_suspend_ack
+ *
+ * Suspend Ack PDU defined in 08.18:-
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | TLLI |
+ * | Routing Area |
+ * | Suspend Ref Num. |
+ * | BVCI (prop. ext.) |
+ * |-------------------------|
+ *
+ * From GS --> GP-10
+ */
+BOOL
+bssgp_decode_suspend_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_suspend_ack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_SUSPEND_ACK_MSG *suspend_ack_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ if (*byte != (UINT8)BSSGP_PDU_SUSPEND_ACK) {
+ DBG_ERROR("PDU not Suspend-Ack msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_SUSPEND_ACK;
+ suspend_ack_msg = (BSSGP_SUSPEND_ACK_MSG*)&api_msg.msg.suspend_ack;
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding Suspend-Ack message");
+
+ /* tlli */
+ if (!bssgp_ie_decode_tlli(&suspend_ack_msg->tlli,&msg[index],&index, BSSGP_FORMAT_TLV)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ /* routing area */
+ if (!bssgp_ie_decode_routing_area(&suspend_ack_msg->routing_area,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ /* suspend ref num */
+ if (!bssgp_ie_decode_suspend_ref_num((UINT8*)&suspend_ack_msg->suspend_ref_num,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ *msg_len -= index;
+ DBG_TRACE("Suspend-Ack message %d bytes length",index);
+
+#if defined(MNET_GP10)
+ if (!gmm_bssgp_msg_callback(api_msg)) {
+ DBG_ERROR("GMM reports error on Suspend-Ack msg");
+ }
+ else {
+ DBG_TRACE("Posted Suspend-Ack msg to GMM successfully");
+ }
+#elif defined(MNET_GS)
+ DBG_ERROR("BSSGP: Unexpected SUSPEND ACK message\n");
+ DBG_LEAVE();
+ return (FALSE);
+#endif
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_decode_suspend_nack
+ *
+ * Suspend NAck PDU defined in 08.18:-
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | TLLI |
+ * | Routing Area |
+ * | Exception cause |
+ * | BVCI (prop. ext.) |
+ * |-------------------------|
+ *
+ * From GS --> GP-10
+ */
+BOOL
+bssgp_decode_suspend_nack(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_suspend_nack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_SUSPEND_NACK_MSG *suspend_nack_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != (UINT8)BSSGP_PDU_SUSPEND_NACK) {
+ DBG_ERROR("PDU not Suspend-Nack msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_SUSPEND_NACK;
+ suspend_nack_msg = (BSSGP_SUSPEND_NACK_MSG*)&api_msg.msg.suspend_nack;
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding Suspend-Nack message");
+
+ /* tlli */
+ if (!bssgp_ie_decode_tlli(&suspend_nack_msg->tlli,&msg[index],&index, BSSGP_FORMAT_TLV)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* routing area */
+ if (!bssgp_ie_decode_routing_area(&suspend_nack_msg->routing_area,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* exception cause */
+ if (msg[index] == BSSGP_IEI_CAUSE)
+ {
+ if (!bssgp_ie_decode_exception_cause(&suspend_nack_msg->exception_cause,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+
+ *msg_len -= index;
+ DBG_TRACE("Suspend-NAck message %d bytes length",index);
+
+#if defined(MNET_GP10)
+ if (!gmm_bssgp_msg_callback(api_msg)) {
+ DBG_ERROR("GMM reports error on Suspend-Nack msg");
+ }
+ else {
+ DBG_TRACE("Posted Suspend-Nack msg to GMM successfully");
+ }
+#elif defined(MNET_GS)
+ DBG_ERROR("BSSGP: Unexpected SUSPEND-NACK message\n");
+ DBG_LEAVE();
+ return (FALSE);
+#endif
+
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+
+/*
+ * bssgp_decode_resume
+ *
+ * Resume PDU defined in 08.18:-
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | TLLI |
+ * | Routing Area |
+ * | Suspend ref num. |
+ * |-------------------------|
+ *
+ * From GP-10 to GS
+ */
+BOOL
+bssgp_decode_resume(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_resume",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_RESUME_MSG *resume_msg;
+
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_RESUME) {
+ DBG_ERROR("PDU not Resume msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_RESUME;
+ resume_msg = (BSSGP_RESUME_MSG*)&api_msg.msg.resume;
+
+ DBG_TRACE("Decoding Resume message");
+
+ /* Decode the individual IE indicators */
+ /* tlli */
+ if (!bssgp_ie_decode_tlli(&resume_msg->tlli,&msg[index],&index, BSSGP_FORMAT_TLV)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* routing area */
+ if (!bssgp_ie_decode_routing_area(&resume_msg->routing_area,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* suspend ref num */
+ if (!bssgp_ie_decode_suspend_ref_num((UINT8*)&resume_msg->suspend_ref_num,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+
+ *msg_len -= index;
+ DBG_TRACE("Resume message %d bytes length",index);
+
+#if defined(MNET_GP10)
+ DBG_ERROR("BSSGP: Unexpected RESUME message\n");
+ DBG_LEAVE();
+ return (FALSE);
+#elif defined(MNET_GS)
+ if (!gmm_bssgp_msg_callback(api_msg)) {
+ DBG_ERROR("GMM reports error on Resume msg");
+ }
+ else {
+ DBG_TRACE("Posted Resume msg to GMM successfully");
+ }
+#endif
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_decode_resume_ack
+ *
+ * Resume-Ack PDU defined in 08.18:-
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | TLLI |
+ * | Routing Area |
+ * | BVCI (prop. ext.) |
+ * |-------------------------|
+ *
+ * From GS --> GP-10
+ */
+BOOL
+bssgp_decode_resume_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_resume_ack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_RESUME_ACK_MSG *resume_ack_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_RESUME_ACK) {
+ DBG_ERROR("PDU not Resume msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_RESUME_ACK;
+ resume_ack_msg = (BSSGP_RESUME_ACK_MSG*)&api_msg.msg.resume_ack;
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding Resume-Ack message");
+
+ /* tlli */
+ if (!bssgp_ie_decode_tlli(&resume_ack_msg->tlli,&msg[index],&index, BSSGP_FORMAT_TLV)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* routing area */
+ if (!bssgp_ie_decode_routing_area(&resume_ack_msg->routing_area,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ *msg_len -= index;
+ DBG_TRACE("Resume-Ack message %d bytes length",index);
+
+#if defined(MNET_GP10)
+ DBG_ERROR("BSSGP: Unexpected RESUME-ACK message\n");
+ DBG_LEAVE();
+ return (FALSE);
+#elif defined(MNET_GS)
+ if (!gmm_bssgp_msg_callback(api_msg)) {
+ DBG_ERROR("GMM reports error on Resume-Ack msg");
+ }
+ else {
+ DBG_TRACE("Posted Resume-Ack msg to GMM successfully");
+ }
+#endif
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_decode_resume_nack
+ *
+ * Resume-NAck PDU defined in 08.18:-
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | TLLI |
+ * | Routing Area |
+ * | Exception cause |
+ * |-------------------------|
+ *
+ * From GS --> GP-10
+ */
+BOOL
+bssgp_decode_resume_nack(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_resume_nack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_RESUME_NACK_MSG *resume_nack_msg;
+
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_RESUME_NACK) {
+ DBG_ERROR("PDU not Resume msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_RESUME_NACK;
+ resume_nack_msg = (BSSGP_RESUME_NACK_MSG*)&api_msg.msg.resume_nack;
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding Resume-NAck message");
+
+ /* tlli */
+ if (!bssgp_ie_decode_tlli(&resume_nack_msg->tlli,&msg[index],&index, BSSGP_FORMAT_TLV)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* routing area */
+ if (!bssgp_ie_decode_routing_area(&resume_nack_msg->routing_area,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* exception cause */
+ if (msg[index] == BSSGP_IEI_CAUSE)
+ {
+ if (!bssgp_ie_decode_exception_cause(&resume_nack_msg->exception_cause,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+
+ *msg_len -= index;
+ DBG_TRACE("Resume-NAck message %d bytes length",index);
+
+#if defined(MNET_GP10)
+ DBG_ERROR("BSSGP: Unexpected RESUME NACK message\n");
+ DBG_LEAVE();
+ return (FALSE);
+#elif defined(MNET_GS)
+ if (!gmm_bssgp_msg_callback(api_msg)) {
+ DBG_ERROR("GMM reports error on Resume-Nack msg");
+ }
+ else {
+ DBG_TRACE("Posted Resume-Nack msg to GMM successfully");
+ }
+#endif
+
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+
+/*
+ * bssgp_decode_location_update
+ *
+ * Location-Update PDU defined by
+ * Cisco-EWTBU (proprietary)
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | IMSI |
+ * | BVCI |
+ * | Location Area |
+ * | Routing Area |
+ * |-------------------------|
+ *
+ * From GS --> GP-10
+ */
+BOOL
+bssgp_decode_location_update(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_location_update",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_LOCATION_UPDATE_MSG *location_update_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_LOCATION_UPDATE) {
+ DBG_ERROR("PDU not Location-Update msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_LOCATION_UPDATE;
+ location_update_msg = (BSSGP_LOCATION_UPDATE_MSG*)&api_msg.msg.location_update;
+
+ /* Encode the individual IE indicators */
+ DBG_TRACE("Decoding Location-Update message");
+
+ /* imsi */
+ if (!bssgp_ie_decode_imsi(&location_update_msg->imsi,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* bvci */
+ if (!bssgp_ie_decode_bvci(&location_update_msg->bvci,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* location area */
+ if (!bssgp_ie_decode_location_area(&location_update_msg->location_area,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+
+ /* routing area */
+ if (!bssgp_ie_decode_routing_area(&location_update_msg->routing_area,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ *msg_len -= index;
+ DBG_TRACE("Location-Update message %d bytes length",index);
+
+#if defined(MNET_GP10)
+ if (!gmm_bssgp_msg_callback(api_msg)) {
+ DBG_ERROR("GMM reports error on Location Update msg");
+ }
+ else {
+ DBG_TRACE("Posted Location Update msg to GMM successfully");
+ }
+#elif defined(MNET_GS)
+ DBG_ERROR("BSSGP: Unexpected LOCATION UPDATE message\n");
+ DBG_LEAVE();
+ return (FALSE);
+#endif
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+/*
+ * bssgp_decode_location_update_ack
+ *
+ * Location-Update-Ack PDU defined by
+ * Cisco-EWTBU (proprietary)
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | IMSI |
+ * | Location Area |
+ * |-------------------------|
+ *
+ * From GP-10 to GS
+ */
+BOOL
+bssgp_decode_location_update_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_location_update_ack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_LOCATION_UPDATE_ACK_MSG *location_update_ack;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_LOCATION_UPDATE_ACK) {
+ DBG_ERROR("PDU not Location-Update-Ack msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_LOCATION_UPDATE_ACK;
+ location_update_ack = (BSSGP_LOCATION_UPDATE_ACK_MSG*)&api_msg.msg.location_update_ack;
+
+ /* Encode the individual IE indicators */
+ DBG_TRACE("Decoding Location-Update-Ack message");
+
+
+ /* imsi */
+ if (!bssgp_ie_decode_imsi(&location_update_ack->imsi,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* location area */
+ if (!bssgp_ie_decode_location_area(&location_update_ack->location_area,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ *msg_len -= index;
+ DBG_TRACE("Location-Update-Ack message %d bytes length",index);
+
+#if defined(MNET_GP10)
+ DBG_ERROR("BSSGP: Unexpected LOCATION UPDATE ACK message\n");
+ DBG_LEAVE();
+ return (FALSE);
+#elif defined(MNET_GS)
+ if (!gmm_bssgp_msg_callback(api_msg)) {
+ DBG_ERROR("GMM reports error on Location-Update-Ack msg");
+ }
+ else {
+ DBG_TRACE("Posted Location-Update-Ack msg to GMM successfully");
+ }
+#endif
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+/*
+ * bssgp_decode_location_update_nack
+ *
+ * Location-Update-NAck PDU defined by
+ * Cisco-EWTBU (proprietary)
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | IMSI |
+ * | Location Area |
+ * | Reject cause |
+ * |-------------------------|
+ *
+ * From GP-10 to GS
+ */
+BOOL
+bssgp_decode_location_update_nack(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_location_update_nack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_LOCATION_UPDATE_NACK_MSG *location_update_nack;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_LOCATION_UPDATE_NACK) {
+ DBG_ERROR("PDU not Location-Update-NAck msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_LOCATION_UPDATE_NACK;
+ location_update_nack= (BSSGP_LOCATION_UPDATE_NACK_MSG*)&api_msg.msg.location_update_nack;
+
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding Location-Update-NAck message");
+
+
+ /* imsi */
+ if (!bssgp_ie_decode_imsi(&location_update_nack->imsi,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* location area */
+ if (!bssgp_ie_decode_location_area(&location_update_nack->location_area,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+
+ /* reject cause */
+ if (!bssgp_ie_decode_reject_cause(&location_update_nack->reject_cause,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+
+ *msg_len -= index;
+ DBG_TRACE("Location-Update-NAck message %d bytes length",index);
+
+#if defined(MNET_GP10)
+ DBG_ERROR("BSSGP: Unexpected LOCATION UPDATE NACK message\n");
+ DBG_LEAVE();
+ return (FALSE);
+#elif defined(MNET_GS)
+ if (!gmm_bssgp_msg_callback(api_msg)) {
+ DBG_ERROR("GMM reports error on Location-Update-Nack msg");
+ }
+ else {
+ DBG_TRACE("Posted Location-Update-Nack msg to GMM successfully");
+ }
+#endif
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+
+/*
+ * bssgp_decode_radio_cap
+ *
+ * Radio-Access-Capability PDU defined in
+ * 08.18
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | TLLI |
+ * | MS Radio Access Cap |
+ * | BVCI (prop. ext.) |
+ * |-------------------------|
+ *
+ * From GS to GP-10
+ */
+BOOL
+bssgp_decode_radio_cap(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_radio_cap",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_RADIO_CAP_MSG *radio_cap;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_RA_CAP) {
+ DBG_ERROR("PDU not RA-Cap msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_RADIO_CAP;
+ radio_cap = (BSSGP_RADIO_CAP_MSG*)&api_msg.msg.radio_cap;
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding Radio-Access-Capability message");
+
+
+ /* tlli */
+ if (!bssgp_ie_decode_tlli(&radio_cap->tlli,&msg[index],&index, BSSGP_FORMAT_TLV)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* ra-cap */
+ if (!bssgp_ie_decode_ms_ra_cap(&radio_cap->ra_cap,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ *msg_len -= index;
+ DBG_TRACE("Radio-Access-Capability message %d bytes length",index);
+
+#if defined(MNET_GP10)
+ if (!gmm_bssgp_msg_callback(api_msg)) {
+ DBG_ERROR("GMM reports error on Radio-Access-Capability msg");
+ }
+ else {
+ DBG_TRACE("Posted Radio-Access-Capability msg to GMM successfully");
+ }
+#elif defined(MNET_GS)
+ DBG_ERROR("BSSGP: Unexpected RA-CAPABILITY message\n");
+ DBG_LEAVE();
+ return (FALSE);
+#endif
+
+ DBG_LEAVE();
+ return(TRUE);
+}
+
+
+/*
+ * bssgp_decode_radio_cap_update
+ *
+ * Radio-Access-Capability-Update PDU defined in
+ * 08.18
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | TLLI |
+ * | Tag |
+ * |-------------------------|
+ *
+ * From GP-10 to GS
+ */
+BOOL
+bssgp_decode_radio_cap_update(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_radio_cap_update",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_RADIO_CAP_UPDATE_MSG *radio_cap_update;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_RA_CAP_UPDATE) {
+ DBG_ERROR("PDU not RA-Cap-Update msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_RADIO_CAP_UPDATE;
+ radio_cap_update = (BSSGP_RADIO_CAP_UPDATE_MSG*)&api_msg.msg.radio_cap_update;
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding Radio-Access-Capability-Update message");
+
+ /* tlli */
+ if (!bssgp_ie_decode_tlli(&radio_cap_update->tlli,&msg[index],&index, BSSGP_FORMAT_TLV)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* tag */
+ if (!bssgp_ie_decode_tag(&radio_cap_update->tag,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ *msg_len -= index;
+ DBG_TRACE("Radio-Access-Capability-Update message %d bytes length",index);
+
+#if defined(MNET_GP10)
+ DBG_ERROR("BSSGP: Unexpected RA-CAPABILITY-UPDATE message\n");
+ DBG_LEAVE();
+ return (FALSE);
+#elif defined(MNET_GS)
+ if (!gmm_bssgp_msg_callback(api_msg)) {
+ DBG_ERROR("GMM reports error on Radio-Access-Capability-Update msg");
+ }
+ else {
+ DBG_TRACE("Posted Radio-Access-Capability-Update msg to GMM successfully");
+ }
+#endif
+
+ DBG_LEAVE();
+ return(TRUE);
+}
+
+
+/*
+ * bssgp_decode_radio_cap_update_ack
+ *
+ * Radio-Access-Capability-Update-ACK PDU defined in
+ * 08.18
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | TLLI |
+ * | Tag |
+ * | IMSI |
+ * | RA-Cap-Upd-Cause |
+ * | MS Radio Access Cap |
+ * | BVCI (prop. ext.) |
+ * |-------------------------|
+ *
+ * From GP-10 to GS
+ */
+BOOL
+bssgp_decode_radio_cap_update_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_radio_cap_update_ack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_RADIO_CAP_UPDATE_ACK_MSG *radio_cap_update_ack;
+
+ byte = (UINT8*)&msg[index];
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_RA_CAP_UPDATE_ACK) {
+ DBG_ERROR("PDU not RA-Cap-Update-Ack msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_RADIO_CAP_UPDATE_ACK;
+ radio_cap_update_ack= (BSSGP_RADIO_CAP_UPDATE_ACK_MSG*)&api_msg.msg.radio_cap_update_ack;
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding Radio-Access-Capability-Update-Ack message");
+
+ /* tlli */
+ if (!bssgp_ie_decode_tlli(&radio_cap_update_ack->tlli,&msg[index],&index, BSSGP_FORMAT_TLV)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* tag */
+ if (!bssgp_ie_decode_tag(&radio_cap_update_ack->tag,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+
+ /* imsi */
+ if (msg[index] == BSSGP_IEI_IMSI)
+ {
+ if (!bssgp_ie_decode_imsi(&radio_cap_update_ack->imsi,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+
+ /* RA-Cap-UPD-CAUSE */
+ if (!bssgp_ie_decode_ra_cap_update_cause(&radio_cap_update_ack->cause,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ if ((index < *msg_len) && (msg[index] == BSSGP_IEI_MS_RADIO_ACCESS_CAP))
+ {
+ if (!bssgp_ie_decode_ms_ra_cap(&radio_cap_update_ack->ra_cap,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+
+ *msg_len -= index;
+ DBG_TRACE("Radio-Access-Capability-Update-Ack message %d bytes length",index);
+
+#if defined(MNET_GP10)
+ DBG_ERROR("BSSGP: Unexpected RA-CAPABILITY-UPDATE-ACK message\n");
+ DBG_LEAVE();
+ return (FALSE);
+#elif defined(MNET_GS)
+ if (!gmm_bssgp_msg_callback(api_msg)) {
+ DBG_ERROR("GMM reports error on Radio-Access-Capability-Update-Ack msg");
+ }
+ else {
+ DBG_TRACE("Posted Radio-Access-Capability-Update-Ack msg to GMM successfully");
+ }
+#endif
+
+ DBG_LEAVE();
+ return(TRUE);
+}
+
+
+
+
+/*
+ * bssgp_decode_flow_control_ms
+ */
+BOOL
+bssgp_decode_flow_control_ms(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_flow_control_ms",BSSGP_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_FLOW_CONTROL_MS_MSG *flow_control_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_FLOW_CONTROL_MS) {
+ DBG_ERROR("PDU not Flow control MS msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_FLOW_CONTROL_MS;
+ flow_control_msg = (BSSGP_FLOW_CONTROL_MS_MSG*)&api_msg.msg.flow_control_ms;
+
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding Flow control MS message");
+
+ /* tlli */
+ if (!bssgp_ie_decode_tlli(&flow_control_msg->tlli,&msg[index],&index, BSSGP_FORMAT_TLV)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* tag */
+ if (!bssgp_ie_decode_tag(&flow_control_msg->tag,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* MS bucket size */
+ if (!bssgp_ie_decode_ms_bucket_size(&flow_control_msg->ms_bucket_size,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* Bucket leak rate */
+ if (!bssgp_ie_decode_bucket_leak_rate(&flow_control_msg->bucket_leak_rate,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ DBG_TRACE("Flow control MS message %d bytes length",index);
+
+ *msg_len -= index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+/*
+ * bssgp_decode_flow_control_ms_ack
+ */
+BOOL
+bssgp_decode_flow_control_ms_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_flow_control_ms_ack",BSSGP_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_FLOW_CONTROL_MS_ACK_MSG *flow_control_ack_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_FLOW_CONTROL_MS_ACK) {
+ DBG_ERROR("PDU not Flow control MS msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_FLOW_CONTROL_MS_ACK;
+ flow_control_ack_msg = (BSSGP_FLOW_CONTROL_MS_ACK_MSG*)&api_msg.msg.flow_control_ms_ack;
+
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding Flow control MS Ack message");
+
+ /* tlli */
+ if (!bssgp_ie_decode_tlli(&flow_control_ack_msg->tlli,&msg[index],&index, BSSGP_FORMAT_TLV)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* tag */
+ if (!bssgp_ie_decode_tag(&flow_control_ack_msg->tag,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ DBG_TRACE("Flow control MS Ack message %d bytes length",index);
+
+ *msg_len -= index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+/*
+ * bssgp_decode_flush_ll
+ */
+BOOL
+bssgp_decode_flush_ll(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_flush_ll",BSSGP_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_FLUSH_LL_MSG *flush_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_FLUSH_LL) {
+ DBG_ERROR("PDU not Flush LL msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_FLUSH_LL;
+ flush_msg = (BSSGP_FLUSH_LL_MSG*)&api_msg.msg.flush_ll;
+
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding Flush LL message");
+
+ /* tlli */
+ if (!bssgp_ie_decode_tlli(&flush_msg->tlli,&msg[index],&index, BSSGP_FORMAT_TLV)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* bvci old */
+ if (!bssgp_ie_decode_bvci(&flush_msg->bvci_old,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* bvci new */
+ if (msg[index] == BSSGP_IEI_BVCI)
+ {
+ if (!bssgp_ie_decode_bvci(&flush_msg->bvci_new,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+
+ DBG_TRACE("Flush LL message %d bytes length",index);
+
+ *msg_len -= index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+/*
+ * bssgp_decode_flush_ll_ack
+ */
+BOOL
+bssgp_decode_flush_ll_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_flush_ll_ack",BSSGP_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_FLUSH_LL_ACK_MSG *flush_ack_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_FLUSH_LL_ACK) {
+ DBG_ERROR("PDU not Flush LL Ack msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_FLUSH_LL_ACK;
+ flush_ack_msg = (BSSGP_FLUSH_LL_ACK_MSG*)&api_msg.msg.flush_ll_ack;
+
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding Flush LL Ack message");
+
+ /* tlli */
+ if (!bssgp_ie_decode_tlli(&flush_ack_msg->tlli,&msg[index],&index, BSSGP_FORMAT_TLV)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* Flush action */
+ if (!bssgp_ie_decode_flush_action(&flush_ack_msg->flush_action,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* bvci new */
+ if (msg[index] == BSSGP_IEI_BVCI)
+ {
+ if (!bssgp_ie_decode_bvci(&flush_ack_msg->bvci_new,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+
+ /* Number of octets affected */
+ if (!bssgp_ie_decode_num_octets_affected(&flush_ack_msg->num_octets,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ DBG_TRACE("Flush LL Ack message %d bytes length",index);
+
+ *msg_len -= index;
+
+ DBG_LEAVE();
+ return (TRUE);
+
+}
+
+
+/*
+ * bssgp_decode_llc_discarded
+ */
+BOOL
+bssgp_decode_llc_discarded(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_llc_discarded",BSSGP_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_LLC_DISCARDED_MSG *llc_discarded_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_FLUSH_LL) {
+ DBG_ERROR("PDU not Flush LL msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_LLC_DISCARDED;
+ llc_discarded_msg = (BSSGP_LLC_DISCARDED_MSG*)&api_msg.msg.llc_discarded;
+
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding LLC Discarded message");
+
+ /* tlli */
+ if (!bssgp_ie_decode_tlli(&llc_discarded_msg->tlli,&msg[index],&index, BSSGP_FORMAT_TLV)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* LLC Frames Discarded */
+ if (!bssgp_ie_decode_llc_frames_discarded(&llc_discarded_msg->num_frames,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* bvci */
+ if (!bssgp_ie_decode_bvci(&llc_discarded_msg->bvci,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* Number of octets affected */
+ if (!bssgp_ie_decode_num_octets_affected(&llc_discarded_msg->num_octets,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ DBG_TRACE("LLC Discarded message %d bytes length",index);
+
+ *msg_len -= index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_decode_flow_control_bvc
+ */
+BOOL
+bssgp_decode_flow_control_bvc(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_flow_control_bvc",BSSGP_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_FLOW_CONTROL_BVC_MSG *flow_control_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_FLOW_CONTROL_BVC) {
+ DBG_ERROR("PDU not Flow control BVC msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_FLOW_CONTROL_BVC;
+ flow_control_msg = (BSSGP_FLOW_CONTROL_BVC_MSG*)&api_msg.msg.flow_control_bvc;
+
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding Flow control BVC message");
+
+ /* tag */
+ if (!bssgp_ie_decode_tag(&flow_control_msg->tag,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* BVC bucket size */
+ if (!bssgp_ie_decode_bvc_bucket_size(&flow_control_msg->bvc_bucket_size,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* Bucket leak rate */
+ if (!bssgp_ie_decode_bucket_leak_rate(&flow_control_msg->bucket_leak_rate,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* Bmax default MS */
+ if (!bssgp_ie_decode_bmax_def_ms(&flow_control_msg->bmax,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* R default MS */
+ if (!bssgp_ie_decode_r_def_ms(&flow_control_msg->r_default,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* BVC measurement */
+ if (msg[index] == BSSGP_IEI_BVC_MEASUREMENT)
+ {
+ if (!bssgp_ie_decode_bvc_measurement(&flow_control_msg->bvc_meas,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+
+ DBG_TRACE("Flow control BVC message %d bytes length",index);
+
+ *msg_len -= index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_decode_flow_control_bvc_ack
+ */
+BOOL
+bssgp_decode_flow_control_bvc_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_flow_control_bvc_ack",BSSGP_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_FLOW_CONTROL_BVC_ACK_MSG *flow_control_ack_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_FLOW_CONTROL_BVC_ACK) {
+ DBG_ERROR("PDU not Flow control BVC Ack msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_FLOW_CONTROL_BVC_ACK;
+ flow_control_ack_msg = (BSSGP_FLOW_CONTROL_BVC_ACK_MSG*)&api_msg.msg.flow_control_bvc_ack;
+
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding Flow control BVC Ack message");
+
+ /* tag */
+ if (!bssgp_ie_decode_tag(&flow_control_ack_msg->tag,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ DBG_TRACE("Flow control BVC Ack message %d bytes length",index);
+
+ *msg_len -= index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_decode_block
+ */
+BOOL
+bssgp_decode_block(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_block",BSSGP_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_BVC_BLOCK_MSG *block_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_BVC_BLOCK) {
+ DBG_ERROR("PDU not BVC block msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_BVC_BLOCK;
+ block_msg = (BSSGP_BVC_BLOCK_MSG*)&api_msg.msg.bvc_block;
+
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding BVC block message");
+
+ /* bvci */
+ if (!bssgp_ie_decode_bvci(&block_msg->bvci,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* cause */
+ if (!bssgp_ie_decode_exception_cause(&block_msg->cause,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ DBG_TRACE("BVC block message %d bytes length",index);
+
+ *msg_len -= index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_decode_block_ack
+ */
+BOOL
+bssgp_decode_block_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_block_ack",BSSGP_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_BVC_BLOCK_ACK_MSG *block_ack_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_BVC_BLOCK_ACK) {
+ DBG_ERROR("PDU not BVC block msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_BVC_BLOCK_ACK;
+ block_ack_msg = (BSSGP_BVC_BLOCK_ACK_MSG*)&api_msg.msg.bvc_block_ack;
+
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding BVC block ack message");
+
+ /* bvci */
+ if (!bssgp_ie_decode_bvci(&block_ack_msg->bvci,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ DBG_TRACE("BVC block ack message %d bytes length",index);
+
+ *msg_len -= index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_decode_unblock
+ */
+BOOL
+bssgp_decode_unblock(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_unblock",BSSGP_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_BVC_UNBLOCK_MSG *unblock_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_UNBLOCK) {
+ DBG_ERROR("PDU not BVC unblock msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_BVC_UNBLOCK;
+ unblock_msg = (BSSGP_BVC_UNBLOCK_MSG*)&api_msg.msg.bvc_unblock;
+
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding BVC unblock message");
+
+ /* bvci */
+ if (!bssgp_ie_decode_bvci(&unblock_msg->bvci,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ DBG_TRACE("BVC unblock message %d bytes length",index);
+
+ *msg_len -= index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_decode_unblock_ack
+ */
+BOOL
+bssgp_decode_unblock_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_unblock_ack",BSSGP_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_BVC_UNBLOCK_ACK_MSG *unblock_ack_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_UNBLOCK_ACK) {
+ DBG_ERROR("PDU not BVC unblock msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_BVC_UNBLOCK_ACK;
+ unblock_ack_msg = (BSSGP_BVC_UNBLOCK_ACK_MSG*)&api_msg.msg.bvc_unblock_ack;
+
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding BVC unblock ack message");
+
+ /* bvci */
+ if (!bssgp_ie_decode_bvci(&unblock_ack_msg->bvci,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ DBG_TRACE("BVC unblock ack message %d bytes length",index);
+
+ *msg_len -= index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_decode_reset
+ */
+BOOL
+bssgp_decode_reset(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_reset",BSSGP_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_BVC_RESET_MSG *reset_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_RESET) {
+ DBG_ERROR("PDU not BVC reset msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_BVC_RESET;
+ reset_msg = (BSSGP_BVC_RESET_MSG*)&api_msg.msg.bvc_reset;
+
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding BVC reset message");
+
+ /* bvci */
+ if (!bssgp_ie_decode_bvci(&reset_msg->bvci,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* cause */
+ if (!bssgp_ie_decode_exception_cause(&reset_msg->cause,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* Cell identifier */
+ if (msg[index] == BSSGP_IEI_CELL_ID)
+ {
+ if (!bssgp_ie_decode_cell_id(&reset_msg->cell_id,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+
+ DBG_TRACE("BVC reset message %d bytes length",index);
+
+ *msg_len -= index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_decode_reset_ack
+ */
+BOOL
+bssgp_decode_reset_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_reset_ack",BSSGP_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_BVC_RESET_ACK_MSG *reset_ack_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_RESET_ACK) {
+ DBG_ERROR("PDU not BVC reset ack msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_BVC_RESET_ACK;
+ reset_ack_msg = (BSSGP_BVC_RESET_ACK_MSG*)&api_msg.msg.bvc_reset_ack;
+
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding BVC reset ack message");
+
+ /* bvci */
+ if (!bssgp_ie_decode_bvci(&reset_ack_msg->bvci,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* Cell identifier */
+ if (msg[index] == BSSGP_IEI_CELL_ID)
+ {
+ if (!bssgp_ie_decode_cell_id(&reset_ack_msg->cell_id,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+
+ DBG_TRACE("BVC reset ack message %d bytes length",index);
+
+ *msg_len -= index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_decode_status
+ */
+BOOL
+bssgp_decode_status(UINT8 *msg,UINT16 *msg_len, BOOL incoming)
+{
+ DBG_FUNC("bssgp_decode_status",BSSGP_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+ BSSGP_API_MSG api_msg;
+ BSSGP_BVC_STATUS_MSG *status_msg;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Check the PDU type */
+ if (*byte != BSSGP_PDU_STATUS) {
+ DBG_ERROR("PDU not BVC status msg, type %s!",
+ bssgp_util_get_pdu_type_str((BSSGP_PDU_TYPE)*byte));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Clean up an API msg so we have it handy */
+ memset(&api_msg,0,sizeof(api_msg));
+ api_msg.magic = BSSGP_MAGIC;
+ api_msg.msg_type = BSSGP_API_MSG_STATUS;
+ status_msg = (BSSGP_BVC_STATUS_MSG*)&api_msg.msg.bvc_reset_ack;
+
+
+ /* Decode the individual IE indicators */
+ DBG_TRACE("Decoding BVC status message");
+
+ /* cause */
+ if (!bssgp_ie_decode_exception_cause(&status_msg->cause,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+
+ /* bvci */
+ if (msg[index] == BSSGP_IEI_BVCI)
+ {
+ if (!bssgp_ie_decode_bvci(&status_msg->bvci,&msg[index],&index)) {
+ /* TODO : Report error to peer BSSGP here */
+ }
+ }
+
+ DBG_TRACE("BVC status message %d bytes length",index);
+
+ *msg_len -= index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
diff --git a/data/mnet/Common/bssgp/src/bssgp_encoder.cpp b/data/mnet/Common/bssgp/src/bssgp_encoder.cpp
new file mode 100644
index 0000000..9138b95
--- /dev/null
+++ b/data/mnet/Common/bssgp/src/bssgp_encoder.cpp
@@ -0,0 +1,1814 @@
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : bssgp_encoder.cpp *
+ * *
+ * Description : Encoding functions for the BSS-GP layer module *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *--------------------------- Notes ----------------------------------------------------*
+ * References are to sections numbers of the BSSGP spec. (GSM 08.18) unless otherwise *
+ * indicated *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |10/10/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include "bssgp/bssgp_prot.h"
+#include "bssgp/bssgp_util.h"
+#include "bssgp/bssgp_api.h"
+#include "bssgp/bssgp_encoder.h"
+#include "bssgp/bssgp_ie_encoder.h"
+
+extern BSSGP_CONFIGURATION bssgp_config;
+
+/*
+ * bssgp_encode_msg
+ *
+ */
+BOOL
+bssgp_encode_msg(BSSGP_API_MSG *api_msg,UINT8 *msg,UINT16 *msg_len,
+ BSSGP_NETWORK_QOS_LEVEL *qos_reqd, BOOL *tx_msg)
+{
+ DBG_FUNC("bssgp_encode_msg",BSSGP_LAYER);
+ DBG_ENTER();
+ BOOL status = FALSE;
+
+ switch(api_msg->msg_type) {
+ /* Downlink Unitdata */
+ case BSSGP_API_MSG_DL_UNITDATA:{
+ status = bssgp_encode_dl_unitdata(api_msg->msg.dl_unitdata,msg,msg_len,qos_reqd,
+ tx_msg);
+ }
+ break;
+ case BSSGP_API_MSG_UL_UNITDATA:{
+ status = bssgp_encode_ul_unitdata(api_msg->msg.ul_unitdata,msg,msg_len,qos_reqd,tx_msg);
+ }
+ break;
+ case BSSGP_API_MSG_PAGING_PS:{
+ status = bssgp_encode_paging_ps(api_msg->msg.paging_ps,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_API_MSG_RADIO_STATUS:{
+ status = bssgp_encode_radio_status(api_msg->msg.radio_status,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_API_MSG_SUSPEND:{
+ status = bssgp_encode_suspend(api_msg->msg.suspend,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_API_MSG_SUSPEND_ACK:{
+ status = bssgp_encode_suspend_ack(api_msg->msg.suspend_ack,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_API_MSG_SUSPEND_NACK:{
+ status = bssgp_encode_suspend_nack(api_msg->msg.suspend_nack,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_API_MSG_RESUME:{
+ status = bssgp_encode_resume(api_msg->msg.resume,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_API_MSG_RESUME_ACK:{
+ status = bssgp_encode_resume_ack(api_msg->msg.resume_ack,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_API_MSG_RESUME_NACK:{
+ status = bssgp_encode_resume_nack(api_msg->msg.resume_nack,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_API_MSG_LOCATION_UPDATE:{
+ status = bssgp_encode_location_update(api_msg->msg.location_update,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_API_MSG_LOCATION_UPDATE_ACK:{
+ status = bssgp_encode_location_update_ack(api_msg->msg.location_update_ack,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_API_MSG_LOCATION_UPDATE_NACK:{
+ status = bssgp_encode_location_update_nack(api_msg->msg.location_update_nack,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_API_MSG_RADIO_CAP:{
+ status = bssgp_encode_radio_cap(api_msg->msg.radio_cap,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_API_MSG_RADIO_CAP_UPDATE:{
+ status = bssgp_encode_radio_cap_update(api_msg->msg.radio_cap_update,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_API_MSG_RADIO_CAP_UPDATE_ACK:{
+ status = bssgp_encode_radio_cap_update_ack(api_msg->msg.radio_cap_update_ack,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_PDU_BVC_BLOCK:{
+ status = bssgp_encode_bvc_block(api_msg->msg.bvc_block,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_PDU_BVC_BLOCK_ACK:{
+ status = bssgp_encode_bvc_block_ack(api_msg->msg.bvc_block_ack,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_PDU_RESET:{
+ status = bssgp_encode_bvc_reset(api_msg->msg.bvc_reset,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_PDU_RESET_ACK:{
+ status = bssgp_encode_bvc_reset_ack(api_msg->msg.bvc_reset_ack,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_PDU_UNBLOCK:{
+ status = bssgp_encode_bvc_unblock(api_msg->msg.bvc_unblock,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_PDU_UNBLOCK_ACK:{
+ status = bssgp_encode_bvc_unblock_ack(api_msg->msg.bvc_unblock_ack,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_PDU_FLOW_CONTROL_BVC:{
+ status = bssgp_encode_flow_control_bvc(api_msg->msg.flow_control_bvc,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_PDU_FLOW_CONTROL_BVC_ACK:{
+ status = bssgp_encode_flow_control_bvc_ack(api_msg->msg.flow_control_bvc_ack,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_PDU_FLOW_CONTROL_MS:{
+ status = bssgp_encode_flow_control_ms(api_msg->msg.flow_control_ms,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_PDU_FLOW_CONTROL_MS_ACK:{
+ status = bssgp_encode_flow_control_ms_ack(api_msg->msg.flow_control_ms_ack,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_PDU_FLUSH_LL:{
+ status = bssgp_encode_flush_ll(api_msg->msg.flush_ll,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_PDU_FLUSH_LL_ACK:{
+ status = bssgp_encode_flush_ll_ack(api_msg->msg.flush_ll_ack,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_PDU_LLC_DISCARDED:{
+ status = bssgp_encode_llc_discarded(api_msg->msg.llc_discarded,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+ case BSSGP_PDU_STATUS:{
+ status = bssgp_encode_bvc_status(api_msg->msg.bvc_status,msg,msg_len);
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ *tx_msg = TRUE;
+ }
+ break;
+
+ default:{
+ DBG_WARNING("BSSGP: No encoder for msg type %#x\n",api_msg->msg_type);
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ break;
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+
+
+
+/*
+ * bssgp_encode_dl_unitdata
+ */
+BOOL
+bssgp_encode_dl_unitdata(BSSGP_DL_UNITDATA_MSG dl_unitdata_msg ,UINT8 *msg,
+ UINT16 *len, BSSGP_NETWORK_QOS_LEVEL *qos_reqd, BOOL *tx_msg)
+{
+ DBG_FUNC("bssgp_encode_dl_unitdata",BSSGP_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_DL_UNITDATA;
+
+ index++;
+
+ DBG_TRACE("Encoding DL-Unitdata message");
+
+ /* Encode the individual IE indicators */
+ /* tlli */
+ if (dl_unitdata_msg.tlli.ie_present) {
+ bssgp_ie_encode_tlli(dl_unitdata_msg.tlli,&msg[index],&index, BSSGP_FORMAT_V);
+ }
+ else
+ {
+ DBG_ERROR("BSSGP: TLLI(current) is manadatory in DL-UNITDATA\n");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ if (dl_unitdata_msg.qos_profile.ie_present) {
+ bssgp_ie_encode_qos_profile(dl_unitdata_msg.qos_profile,&msg[index],&index, BSSGP_FORMAT_V);
+ }
+ else
+ {
+ DBG_ERROR("BSSGP: QOS Profile is manadatory in DL-UNITDATA\n");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ if (dl_unitdata_msg.qos_params.ie_present) {
+ bssgp_ie_encode_qos_params(dl_unitdata_msg.qos_params,&msg[index],&index);
+ }
+ else
+ {
+ DBG_ERROR("BSSGP: QOS Params is manadatory in DL-UNITDATA\n");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ if (dl_unitdata_msg.pdu_lifetime.ie_present) {
+ bssgp_ie_encode_pdu_lifetime(dl_unitdata_msg.pdu_lifetime,&msg[index],&index);
+ }
+ else
+ {
+ DBG_ERROR("BSSGP: PDU Lifetim is manadatory in DL-UNITDATA\n");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ if (dl_unitdata_msg.radio_access_cap.ie_present) {
+ bssgp_ie_encode_ms_ra_cap(dl_unitdata_msg.radio_access_cap,&msg[index],&index);
+ }
+
+ if (dl_unitdata_msg.priority.ie_present) {
+ bssgp_ie_encode_priority(dl_unitdata_msg.priority,&msg[index],&index);
+ }
+
+ if (dl_unitdata_msg.drx_params.ie_present) {
+ bssgp_ie_encode_drx_params(dl_unitdata_msg.drx_params,&msg[index],&index);
+ }
+
+ if (dl_unitdata_msg.imsi.ie_present) {
+ bssgp_ie_encode_imsi(dl_unitdata_msg.imsi,&msg[index],&index);
+ }
+
+ if (dl_unitdata_msg.tlli_old.ie_present) {
+ bssgp_ie_encode_tlli(dl_unitdata_msg.tlli_old,&msg[index],&index, BSSGP_FORMAT_TLV);
+ }
+
+ if (dl_unitdata_msg.lsa_info.ie_present) {
+ /* align on a 4 byte boundary */
+ if (index % 4)
+ {
+ bssgp_ie_encode_alignment_octets(4 - (index % 4),&msg[index],&index);
+ }
+ bssgp_ie_encode_lsa_info(dl_unitdata_msg.lsa_info,&msg[index],&index);
+ }
+
+ bssgp_ie_encode_llc_pdu((UINT8*)dl_unitdata_msg.pdu.data,dl_unitdata_msg.pdu.data_len,&msg[index],&index);
+ bssgp_util_return_rx_buff((char*)dl_unitdata_msg.pdu.data);
+
+ if (dl_unitdata_msg.qos_profile.t_bit == SDU_CONTAINS_SIGNALLING) {
+ *qos_reqd = BSSGP_NETWORK_QOS_LEVEL_1;
+ }
+ else {
+ *qos_reqd = (BSSGP_NETWORK_QOS_LEVEL)dl_unitdata_msg.qos_profile.precedence_class;
+ }
+
+ *len += index;
+
+ /* FIXME : Check here if the Qs for this TLLI is backed up, otherwise out it goes */
+ *tx_msg = TRUE;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_encode_ul_unitdata
+ */
+BOOL
+bssgp_encode_ul_unitdata(BSSGP_UL_UNITDATA_MSG ul_unitdata_msg,UINT8 *msg,UINT16 *len,
+ BSSGP_NETWORK_QOS_LEVEL *qos_reqd, BOOL *tx_msg)
+{
+ DBG_FUNC("bssgp_encode_ul_unitdata",BSSGP_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_UL_UNITDATA;
+
+ index++;
+
+ DBG_TRACE("Encoding UL-Unitdata message");
+
+ /* Encode the individual IE indicators */
+ if (ul_unitdata_msg.tlli.ie_present) {
+ bssgp_ie_encode_tlli(ul_unitdata_msg.tlli,&msg[index],&index, BSSGP_FORMAT_V);
+ }
+ else
+ {
+ DBG_ERROR("BSSGP: TLLI is manadatory in UL-UNITDATA\n");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ if (ul_unitdata_msg.qos_profile.ie_present) {
+ bssgp_ie_encode_qos_profile(ul_unitdata_msg.qos_profile,&msg[index],&index, BSSGP_FORMAT_V);
+ }
+ else
+ {
+ DBG_ERROR("BSSGP: QOS Profile is manadatory in UL-UNITDATA\n");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+#if defined(MNET_GP10)
+ ul_unitdata_msg.cell_id.cell_id = bssgp_config.cell_id;
+ ul_unitdata_msg.cell_id.routing_area = bssgp_config.routing_area_id;
+ ul_unitdata_msg.cell_id.ie_present = TRUE;
+#endif
+ if (ul_unitdata_msg.cell_id.ie_present) {
+ bssgp_ie_encode_cell_id(ul_unitdata_msg.cell_id,&msg[index],&index);
+ }
+ else
+ {
+ DBG_ERROR("BSSGP: Cell Identifier is manadatory in UL-UNITDATA\n");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ if (ul_unitdata_msg.lsa_id_list.ie_present) {
+ /* align on a 4 byte boundary */
+ if (index % 4)
+ {
+ bssgp_ie_encode_alignment_octets(4 - (index % 4),&msg[index],&index);
+ }
+ bssgp_ie_encode_lsa_identifier_list(ul_unitdata_msg.lsa_id_list,&msg[index],&index);
+ }
+
+ bssgp_ie_encode_llc_pdu((UINT8*)ul_unitdata_msg.pdu.data,ul_unitdata_msg.pdu.data_len,&msg[index],&index);
+
+ /* Indicate the QoS level */
+ *qos_reqd = (BSSGP_NETWORK_QOS_LEVEL)ul_unitdata_msg.qos_profile.precedence_class;
+
+
+ /* For Uplink we dont need to Q anything */
+ *tx_msg = TRUE;
+
+ *len += index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_encode_paging
+ *
+ * Paging PDU defined in 08.18:-
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | IMSI |
+ * | DRX Params |
+ * | BVCI |
+ * | Location Area |
+ * | Routing Area |
+ * | BSS Area Indication |
+ * | QoS Profile |
+ * | P-TMSI |
+ * |-------------------------|
+ *
+ * From GS --> GP-10
+ */
+BOOL
+bssgp_encode_paging_ps(BSSGP_PAGING_PS_MSG paging_msg ,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_paging_ps",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_PAGING_PS;
+
+ index++;
+
+ DBG_TRACE("Encoding Packet-Switched Paging message");
+
+ /* Encode the individual IE indicators */
+ /* imsi */
+ if (paging_msg.imsi.ie_present) {
+ bssgp_ie_encode_imsi(paging_msg.imsi,&msg[index],&index);
+ }
+ else {
+ DBG_ERROR("Mandatory element IMSI not specified for paging-ps msg!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* drx params */
+ if (paging_msg.drx_params.ie_present)
+ bssgp_ie_encode_drx_params(paging_msg.drx_params,&msg[index],&index);
+
+ /* bvci */
+ if (paging_msg.bvci.ie_present)
+ bssgp_ie_encode_bvci(paging_msg.bvci,&msg[index],&index);
+
+ /* location area */
+ if (paging_msg.location_area.ie_present)
+ bssgp_ie_encode_location_area(paging_msg.location_area,&msg[index],&index);
+
+ /* routing area */
+ if (paging_msg.routing_area.ie_present)
+ bssgp_ie_encode_routing_area(paging_msg.routing_area,&msg[index],&index);
+
+ /* bss area indication */
+ if (paging_msg.bss_area.ie_present)
+ bssgp_ie_encode_bss_area_ind(paging_msg.bss_area,&msg[index],&index);
+
+ /* qos profile */
+ if (paging_msg.qos_profile.ie_present)
+ {
+ bssgp_ie_encode_qos_profile(paging_msg.qos_profile,&msg[index],&index, BSSGP_FORMAT_TLV);
+ }
+ else
+ {
+ DBG_ERROR("BSSGP: QOS Profile is manadatory in PAGING PS\n");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* tmsi */
+ if (paging_msg.tmsi.ie_present)
+ bssgp_ie_encode_tmsi(paging_msg.tmsi,&msg[index],&index);
+
+
+ *msg_len += index;
+ DBG_TRACE("Paging-PS message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+
+/*
+ * bssgp_encode_radio_status
+ *
+ * Radio Status PDU defined in 08.18:-
+ *
+ * |--------------|
+ * | PDU type |
+ * | TLLI |
+ * | TMSI |
+ * | IMSI |
+ * | Radio Cause |
+ * |--------------|
+ *
+ * From GP-10 to GS
+ */
+BOOL
+bssgp_encode_radio_status(BSSGP_RADIO_STATUS_MSG radio_status_msg ,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_radio_status",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_RADIO_STATUS;
+
+ index++;
+
+ DBG_TRACE("Encoding Radio Status message");
+
+ /* Encode the individual IE indicators */
+ /* tlli */
+ if (radio_status_msg.tlli.ie_present)
+ bssgp_ie_encode_tlli(radio_status_msg.tlli,&msg[index],&index, BSSGP_FORMAT_TLV);
+ /* tmsi */
+ if (radio_status_msg.tmsi.ie_present)
+ bssgp_ie_encode_tmsi(radio_status_msg.tmsi,&msg[index],&index);
+ /* imsi */
+ if (radio_status_msg.imsi.ie_present)
+ bssgp_ie_encode_imsi(radio_status_msg.imsi,&msg[index],&index);
+ /* cause */
+ bssgp_ie_encode_radio_cause(radio_status_msg.cause,&msg[index],&index);
+
+ *msg_len += index;
+
+ DBG_TRACE("Radio Status message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_encode_suspend
+ *
+ * Suspend PDU defined in 08.18:-
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | TLLI |
+ * | Routing Area |
+ * |-------------------------|
+ *
+ * From GP-10 to GS
+ */
+BOOL
+bssgp_encode_suspend(BSSGP_SUSPEND_MSG suspend_msg,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_suspend",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_SUSPEND;
+
+ index++;
+
+ DBG_TRACE("Encoding Suspend message");
+
+ /* Encode the individual IE indicators */
+ /* tlli */
+ bssgp_ie_encode_tlli(suspend_msg.tlli,&msg[index],&index, BSSGP_FORMAT_TLV);
+ /* routing area */
+ bssgp_ie_encode_routing_area(suspend_msg.routing_area,&msg[index],&index);
+
+ *msg_len = index;
+
+ DBG_TRACE("Suspend message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_encode_suspend_ack
+ *
+ * Suspend Ack PDU defined in 08.18:-
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | TLLI |
+ * | Routing Area |
+ * | Suspend Ref Num. |
+ * | BVCI (prop. ext.) |
+ * |-------------------------|
+ *
+ * From GS --> GP-10
+ */
+BOOL
+bssgp_encode_suspend_ack(BSSGP_SUSPEND_ACK_MSG suspend_ack_msg ,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_suspend_ack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_SUSPEND;
+
+ index++;
+
+ DBG_TRACE("Encoding Suspend-Ack message");
+
+ /* Encode the individual IE indicators */
+ /* tlli */
+ bssgp_ie_encode_tlli(suspend_ack_msg.tlli,&msg[index],&index, BSSGP_FORMAT_TLV);
+ /* routing area */
+ bssgp_ie_encode_routing_area(suspend_ack_msg.routing_area,&msg[index],&index);
+ /* suspend ref num */
+ bssgp_ie_encode_suspend_ref_num(suspend_ack_msg.suspend_ref_num,&msg[index],&index);
+
+ *msg_len += index;
+ DBG_TRACE("Suspend-Ack message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_encode_suspend_nack
+ *
+ * Suspend NAck PDU defined in 08.18:-
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | TLLI |
+ * | Routing Area |
+ * | Exception cause |
+ * | BVCI (prop. ext.) |
+ * |-------------------------|
+ *
+ * From GS --> GP-10
+ */
+BOOL
+bssgp_encode_suspend_nack(BSSGP_SUSPEND_NACK_MSG suspend_nack_msg ,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_suspend_nack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_SUSPEND;
+
+
+ DBG_TRACE("Encoding Suspend-Nack message");
+
+ /* Encode the individual IE indicators */
+ /* tlli */
+ bssgp_ie_encode_tlli(suspend_nack_msg.tlli,&msg[index],&index, BSSGP_FORMAT_TLV);
+ /* routing area */
+ bssgp_ie_encode_routing_area(suspend_nack_msg.routing_area,&msg[index],&index);
+ /* exception cause */
+ if (suspend_nack_msg.exception_cause.ie_present)
+ bssgp_ie_encode_exception_cause(suspend_nack_msg.exception_cause,&msg[index],&index);
+
+ *msg_len += index;
+ DBG_TRACE("Suspend-NAck message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+
+/*
+ * bssgp_encode_resume
+ *
+ * Resume PDU defined in 08.18:-
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | TLLI |
+ * | Routing Area |
+ * | Suspend ref num. |
+ * |-------------------------|
+ *
+ * From GP-10 to GS
+ */
+BOOL
+bssgp_encode_resume(BSSGP_RESUME_MSG resume_msg ,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_resume",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_RESUME;
+
+
+ DBG_TRACE("Encoding Resume message");
+
+ /* Encode the individual IE indicators */
+ /* tlli */
+ bssgp_ie_encode_tlli(resume_msg.tlli,&msg[index],&index, BSSGP_FORMAT_TLV);
+ /* routing area */
+ bssgp_ie_encode_routing_area(resume_msg.routing_area,&msg[index],&index);
+ /* suspend ref num */
+ bssgp_ie_encode_suspend_ref_num(resume_msg.suspend_ref_num,&msg[index],&index);
+
+ *msg_len += index;
+ DBG_TRACE("Resume message %d bytes length",index);
+
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_encode_resume_ack
+ *
+ * Resume-Ack PDU defined in 08.18:-
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | TLLI |
+ * | Routing Area |
+ * | BVCI (prop. ext.) |
+ * |-------------------------|
+ *
+ * From GS --> GP-10
+ */
+BOOL
+bssgp_encode_resume_ack(BSSGP_RESUME_ACK_MSG resume_ack_msg ,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_resume_ack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_RESUME_ACK;
+
+
+ DBG_TRACE("Encoding Resume-Ack message");
+
+ /* Encode the individual IE indicators */
+ /* tlli */
+ bssgp_ie_encode_tlli(resume_ack_msg.tlli,&msg[index],&index, BSSGP_FORMAT_TLV);
+ /* routing area */
+ bssgp_ie_encode_routing_area(resume_ack_msg.routing_area,&msg[index],&index);
+
+ *msg_len += index;
+ DBG_TRACE("Resume-Ack message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_encode_resume_nack
+ *
+ * Resume-NAck PDU defined in 08.18:-
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | TLLI |
+ * | Routing Area |
+ * | Exception cause |
+ * |-------------------------|
+ *
+ * From GS --> GP-10
+ */
+BOOL
+bssgp_encode_resume_nack(BSSGP_RESUME_NACK_MSG resume_nack_msg ,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_resume_nack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_RESUME_NACK;
+
+
+ DBG_TRACE("Encoding Resume-NAck message");
+
+ /* Encode the individual IE indicators */
+ /* tlli */
+ bssgp_ie_encode_tlli(resume_nack_msg.tlli,&msg[index],&index, BSSGP_FORMAT_TLV);
+ /* routing area */
+ bssgp_ie_encode_routing_area(resume_nack_msg.routing_area,&msg[index],&index);
+ /* exception cause */
+ if (resume_nack_msg.exception_cause.ie_present)
+ bssgp_ie_encode_exception_cause(resume_nack_msg.exception_cause,&msg[index],&index);
+
+ *msg_len += index;
+ DBG_TRACE("Resume-NAck message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+
+/*
+ * bssgp_encode_location_update
+ *
+ * Location-Update PDU defined by
+ * Cisco-EWTBU (proprietary)
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | IMSI |
+ * | BVCI |
+ * | Location Area |
+ * | Routing Area |
+ * |-------------------------|
+ *
+ * From GS --> GP-10
+ */
+BOOL
+bssgp_encode_location_update(BSSGP_LOCATION_UPDATE_MSG location_update_msg ,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_location_update",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_LOCATION_UPDATE;
+
+
+ DBG_TRACE("Encoding Location-Update message");
+
+
+ /* Encode the individual IE indicators */
+ /* imsi */
+ bssgp_ie_encode_imsi(location_update_msg.imsi,&msg[index],&index);
+
+ /* bvci */
+ bssgp_ie_encode_bvci(location_update_msg.bvci,&msg[index],&index);
+
+ /* location area */
+ bssgp_ie_encode_location_area(location_update_msg.location_area,&msg[index],&index);
+
+ /* routing area */
+ bssgp_ie_encode_routing_area(location_update_msg.routing_area,&msg[index],&index);
+
+
+ *msg_len += index;
+ DBG_TRACE("Location-Update message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+/*
+ * bssgp_encode_location_update_ack
+ *
+ * Location-Update-Ack PDU defined by
+ * Cisco-EWTBU (proprietary)
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | IMSI |
+ * | Location Area |
+ * |-------------------------|
+ *
+ * From GP-10 to GS
+ */
+BOOL
+bssgp_encode_location_update_ack(BSSGP_LOCATION_UPDATE_ACK_MSG location_update_ack ,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_location_update_ack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_LOCATION_UPDATE_ACK;
+
+ DBG_TRACE("Encoding Location-Update-Ack message");
+
+
+ /* Encode the individual IE indicators */
+ /* imsi */
+ bssgp_ie_encode_imsi(location_update_ack.imsi,&msg[index],&index);
+
+ /* location area */
+ bssgp_ie_encode_location_area(location_update_ack.location_area,&msg[index],&index);
+
+
+ *msg_len += index;
+ DBG_TRACE("Location-Update-Ack message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+/*
+ * bssgp_encode_location_update_nack
+ *
+ * Location-Update-NAck PDU defined by
+ * Cisco-EWTBU (proprietary)
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | IMSI |
+ * | Location Area |
+ * | Reject cause |
+ * |-------------------------|
+ *
+ * From GP-10 to GS
+ */
+BOOL
+bssgp_encode_location_update_nack(BSSGP_LOCATION_UPDATE_NACK_MSG location_update_nack ,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_location_update_nack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_LOCATION_UPDATE_NACK;
+
+ DBG_TRACE("Encoding Location-Update-NAck message");
+
+
+ /* Encode the individual IE indicators */
+ /* imsi */
+ bssgp_ie_encode_imsi(location_update_nack.imsi,&msg[index],&index);
+
+ /* location area */
+ bssgp_ie_encode_location_area(location_update_nack.location_area,&msg[index],&index);
+
+ /* reject cause */
+ bssgp_ie_encode_reject_cause(location_update_nack.reject_cause,&msg[index],&index);
+
+ *msg_len += index;
+ DBG_TRACE("Location-Update-NAck message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+
+/*
+ * bssgp_encode_radio_cap
+ *
+ * Radio-Access-Capability PDU defined in
+ * 08.18
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | TLLI |
+ * | MS Radio Access Cap |
+ * | BVCI (prop. ext.) |
+ * |-------------------------|
+ *
+ * From GS to GP-10
+ */
+BOOL
+bssgp_encode_radio_cap(BSSGP_RADIO_CAP_MSG radio_cap ,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_radio_cap",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_RA_CAP;
+ index++;
+
+ DBG_TRACE("Encoding Radio-Access-Capability message");
+
+
+ /* Encode the individual IE indicators */
+ /* tlli */
+ bssgp_ie_encode_tlli(radio_cap.tlli,&msg[index],&index, BSSGP_FORMAT_TLV);
+
+ /* ra-cap */
+ bssgp_ie_encode_ms_ra_cap(radio_cap.ra_cap,&msg[index],&index);
+
+ *msg_len += index;
+ DBG_TRACE("Radio-Access-Capability message %d bytes length",index);
+
+ DBG_LEAVE();
+ return(TRUE);
+}
+
+
+/*
+ * bssgp_encode_radio_cap_update
+ *
+ * Radio-Access-Capability-Update PDU defined in
+ * 08.18
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | TLLI |
+ * | bvci
+ |
+ * |-------------------------|
+ *
+ * From GP-10 to GS
+ */
+BOOL
+bssgp_encode_radio_cap_update(BSSGP_RADIO_CAP_UPDATE_MSG radio_cap_update ,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_radio_cap_update",BSSGP_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_RA_CAP_UPDATE;
+
+ DBG_TRACE("Encoding Radio-Access-Capability-Update message");
+
+ /* Encode the individual IE indicators */
+ /* tlli */
+ bssgp_ie_encode_tlli(radio_cap_update.tlli,&msg[index],&index, BSSGP_FORMAT_TLV);
+
+ /* tag */
+ bssgp_ie_encode_tag(radio_cap_update.tag,&msg[index],&index);
+
+ *msg_len += index;
+ DBG_TRACE("Radio-Access-Capability-Update message %d bytes length",index);
+
+ DBG_LEAVE();
+ return(TRUE);
+}
+
+
+/*
+ * bssgp_encode_radio_cap_update_ack
+ *
+ * Radio-Access-Capability-Update-ACK PDU defined in
+ * 08.18
+ *
+ * |-------------------------|
+ * | PDU Type |
+ * | TLLI |
+ * | Tag |
+ * | IMSI |
+ * | RA-Cap-Upd-Cause |
+ * | MS Radio Access Cap |
+ * | BVCI (prop. ext.) |
+ * |-------------------------|
+ *
+ * From GP-10 to GS
+ */
+BOOL
+bssgp_encode_radio_cap_update_ack(BSSGP_RADIO_CAP_UPDATE_ACK_MSG radio_cap_update_ack ,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_radio_cap_update_ack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_RA_CAP_UPDATE_ACK;
+
+ DBG_TRACE("Encoding Radio-Access-Capability-Update-Ack message");
+ /* Encode the individual IE indicators */
+ /* tlli */
+ bssgp_ie_encode_tlli(radio_cap_update_ack.tlli,&msg[index],&index, BSSGP_FORMAT_TLV);
+
+ /* tag */
+ bssgp_ie_encode_tag(radio_cap_update_ack.tag,&msg[index],&index);
+
+ /* imsi */
+ if (radio_cap_update_ack.imsi.ie_present)
+ bssgp_ie_encode_imsi(radio_cap_update_ack.imsi,&msg[index],&index);
+
+ /* RA-Cap-UPD-CAUSE */
+ bssgp_ie_encode_ra_cap_update_cause(radio_cap_update_ack.cause,&msg[index],&index);
+
+ /* RA-Cap */
+ if (radio_cap_update_ack.ra_cap.ie_present) {
+ bssgp_ie_encode_ms_ra_cap(radio_cap_update_ack.ra_cap,&msg[index],&index);
+ }
+ *msg_len += index;
+ DBG_TRACE("Radio-Access-Capability-Update-Ack message %d bytes length",index);
+
+ DBG_LEAVE();
+ return(TRUE);
+}
+
+
+
+
+
+
+/*
+ * bssgp_encode_flow_control_ms
+ */
+BOOL
+bssgp_encode_flow_control_ms(BSSGP_FLOW_CONTROL_MS_MSG flow_control_ms,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_flow_control_ms",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_FLOW_CONTROL_MS;
+
+ DBG_TRACE("Encoding Flow-Control-MS message");
+ /* Encode the individual IE indicators */
+ /* tlli */
+ if (flow_control_ms.tlli.ie_present)
+ {
+ bssgp_ie_encode_tlli(flow_control_ms.tlli,&msg[index],&index, BSSGP_FORMAT_TLV);
+ }
+ else {
+ DBG_ERROR("Mandatory element TLLI not specified for flow-control-ms msg!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* tag */
+ bssgp_ie_encode_tag(flow_control_ms.tag,&msg[index],&index);
+
+ /* MS Bucket Size */
+ bssgp_ie_encode_ms_bucket_size(flow_control_ms.ms_bucket_size,&msg[index],&index);
+
+ /* Bucket Leak Rate */
+ bssgp_ie_encode_bucket_leak_rate(flow_control_ms.bucket_leak_rate,&msg[index],&index);
+
+ *msg_len += index;
+ DBG_TRACE("Flow-Control-MS message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+/*
+ * bssgp_encode_flow_control_ms_ack
+ */
+BOOL
+bssgp_encode_flow_control_ms_ack(BSSGP_FLOW_CONTROL_MS_ACK_MSG flow_control_ms_ack,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_flow_control_ms_ack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_FLOW_CONTROL_MS_ACK;
+
+ DBG_TRACE("Encoding Flow-Control-MS-ACK message");
+ /* Encode the individual IE indicators */
+ /* tlli */
+ if (flow_control_ms_ack.tlli.ie_present)
+ {
+ bssgp_ie_encode_tlli(flow_control_ms_ack.tlli,&msg[index],&index, BSSGP_FORMAT_TLV);
+ }
+ else {
+ DBG_ERROR("Mandatory element TLLI not specified for flow-control-ms-ack msg!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* tag */
+ bssgp_ie_encode_tag(flow_control_ms_ack.tag,&msg[index],&index);
+
+ *msg_len += index;
+ DBG_TRACE("Flow-Control-MS-ACK message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+/*
+ * bssgp_encode_flush_ll
+ */
+BOOL
+bssgp_encode_flush_ll(BSSGP_FLUSH_LL_MSG flush_ll,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_flush_ll",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_FLUSH_LL;
+
+ DBG_TRACE("Encoding Flush-LL message");
+ /* Encode the individual IE indicators */
+ /* tlli */
+ if (flush_ll.tlli.ie_present)
+ {
+ bssgp_ie_encode_tlli(flush_ll.tlli,&msg[index],&index, BSSGP_FORMAT_TLV);
+ }
+ else {
+ DBG_ERROR("Mandatory element TLLI not specified for flush-ll msg!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* bvci (old) */
+ if (flush_ll.bvci_old.ie_present)
+ {
+ bssgp_ie_encode_bvci(flush_ll.bvci_old,&msg[index],&index);
+ }
+ else {
+ DBG_ERROR("Mandatory element BVCI (old) not specified for flush-ll msg!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* bvci (new) */
+ if (flush_ll.bvci_new.ie_present)
+ {
+ bssgp_ie_encode_bvci(flush_ll.bvci_new,&msg[index],&index);
+ }
+
+ *msg_len += index;
+ DBG_TRACE("Encoding Flush-LL message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+/*
+ * bssgp_encode_flush_ll_ack
+ */
+BOOL
+bssgp_encode_flush_ll_ack(BSSGP_FLUSH_LL_ACK_MSG flush_ll_ack,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_flush_ll_ack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_FLUSH_LL_ACK;
+
+ DBG_TRACE("Encoding Flush-LL-ACK message");
+ /* tlli */
+ if (flush_ll_ack.tlli.ie_present)
+ {
+ bssgp_ie_encode_tlli(flush_ll_ack.tlli,&msg[index],&index, BSSGP_FORMAT_TLV);
+ }
+ else {
+ DBG_ERROR("Mandatory element TLLI not specified for flush-ll-ack msg!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* flush action */
+ bssgp_ie_encode_flush_action(flush_ll_ack.flush_action,&msg[index],&index);
+
+ /* bvci (new) */
+ if (flush_ll_ack.bvci_new.ie_present)
+ {
+ bssgp_ie_encode_bvci(flush_ll_ack.bvci_new,&msg[index],&index);
+ }
+
+ *msg_len += index;
+ DBG_TRACE("Flush-LL-ACK message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+
+}
+
+/*
+ * bssgp_encode_llc_discarded
+ */
+BOOL
+bssgp_encode_llc_discarded(BSSGP_LLC_DISCARDED_MSG llc_discarded,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_llc_discarded",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_LLC_DISCARDED;
+
+ DBG_TRACE("Encoding LLC-Discarded message");
+ /* tlli */
+ if (llc_discarded.tlli.ie_present)
+ {
+ bssgp_ie_encode_tlli(llc_discarded.tlli,&msg[index],&index, BSSGP_FORMAT_TLV);
+ }
+ else {
+ DBG_ERROR("Mandatory element TLLI not specified for llc-discarded msg!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* LLC frames discarded */
+ bssgp_ie_encode_llc_frames_discarded(llc_discarded.num_frames,&msg[index],&index);
+
+ /* bvci */
+ if (llc_discarded.bvci.ie_present)
+ {
+ bssgp_ie_encode_bvci(llc_discarded.bvci,&msg[index],&index);
+ }
+ else {
+ DBG_ERROR("Mandatory element BVCI not specified for llc-discarded msg!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* number of octets deleted */
+ bssgp_ie_encode_num_octets_affected(llc_discarded.num_octets,&msg[index],&index);
+
+ *msg_len += index;
+ DBG_TRACE("LLC-Discarded message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_encode_flow_control_bvc
+ */
+BOOL
+bssgp_encode_flow_control_bvc(BSSGP_FLOW_CONTROL_BVC_MSG flow_control_bvc, UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_flow_control_bvc",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_FLOW_CONTROL_BVC;
+
+ DBG_TRACE("Encoding Flow-Control-BVC message");
+
+ /* tag */
+ bssgp_ie_encode_tag(flow_control_bvc.tag,&msg[index],&index);
+
+ /* BVC Bucket Size */
+ bssgp_ie_encode_bvc_bucket_size(flow_control_bvc.bvc_bucket_size,&msg[index],&index);
+
+ /* Bucket Leak Rate */
+ bssgp_ie_encode_bucket_leak_rate(flow_control_bvc.bucket_leak_rate,&msg[index],&index);
+
+ /* Bmax default ms */
+ bssgp_ie_encode_bmax_def_ms(flow_control_bvc.bmax,&msg[index],&index);
+
+ /* R_default_MS */
+ bssgp_ie_encode_r_def_ms(flow_control_bvc.r_default,&msg[index],&index);
+
+ /* BVC measurement */
+ if (flow_control_bvc.bvc_meas.ie_present)
+ bssgp_ie_encode_bvc_measurement(flow_control_bvc.bvc_meas,&msg[index],&index);
+
+ *msg_len += index;
+ DBG_TRACE("Flow-Control-BVC message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_encode_flow_control_bvc_ack
+ */
+BOOL
+bssgp_encode_flow_control_bvc_ack(BSSGP_FLOW_CONTROL_BVC_ACK_MSG flow_control_bvc_ack, UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_flow_control_bvc_ack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_FLOW_CONTROL_BVC_ACK;
+
+ DBG_TRACE("Encoding Flow-Control-BVC-ACK message");
+
+ /* tag */
+ bssgp_ie_encode_tag(flow_control_bvc_ack.tag,&msg[index],&index);
+
+ *msg_len += index;
+ DBG_TRACE("Flow-Control-BVC-ACK message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_encode_bvc_block
+ */
+BOOL
+bssgp_encode_bvc_block(BSSGP_BVC_BLOCK_MSG bvc_block,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_bvc_block",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_BVC_BLOCK;
+
+ DBG_TRACE("Encoding BVC-Block message");
+
+ /* bvci */
+ if (bvc_block.bvci.ie_present)
+ {
+ bssgp_ie_encode_bvci(bvc_block.bvci,&msg[index],&index);
+ }
+ else {
+ DBG_ERROR("Mandatory element BVCI not specified for bvc-block msg!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* cause */
+ if (bvc_block.cause.ie_present)
+ {
+ bssgp_ie_encode_exception_cause(bvc_block.cause,&msg[index],&index);
+ }
+ else {
+ DBG_ERROR("Mandatory element BVCI not specified for bvc-block msg!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ *msg_len += index;
+ DBG_TRACE("BVC-Block message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+
+}
+
+
+/*
+ * bssgp_encode_bvc_block_ack
+ */
+BOOL
+bssgp_encode_bvc_block_ack(BSSGP_BVC_BLOCK_ACK_MSG bvc_block_ack,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_bvc_block_ack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_BVC_BLOCK_ACK;
+
+ DBG_TRACE("Encoding BVC-Block-ACK message");
+
+ /* bvci */
+ if (bvc_block_ack.bvci.ie_present)
+ {
+ bssgp_ie_encode_bvci(bvc_block_ack.bvci,&msg[index],&index);
+ }
+ else {
+ DBG_ERROR("Mandatory element BVCI not specified for bvc-block-ack msg!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ *msg_len += index;
+ DBG_TRACE("BVC-Block-ACK message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+
+}
+
+
+/*
+ * bssgp_encode_bvc_unblock
+ */
+BOOL
+bssgp_encode_bvc_unblock(BSSGP_BVC_UNBLOCK_MSG bvc_unblock,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_bvc_unblock",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_UNBLOCK;
+
+ DBG_TRACE("Encoding BVC-Unblock message");
+
+ /* bvci */
+ if (bvc_unblock.bvci.ie_present)
+ {
+ bssgp_ie_encode_bvci(bvc_unblock.bvci,&msg[index],&index);
+ }
+ else {
+ DBG_ERROR("Mandatory element BVCI not specified for bvc-unblock msg!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ *msg_len += index;
+ DBG_TRACE("BVC-Unblock message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+
+}
+
+
+/*
+ * bssgp_encode_bvc_unblock_ack
+ */
+BOOL
+bssgp_encode_bvc_unblock_ack(BSSGP_BVC_UNBLOCK_ACK_MSG bvc_unblock_ack,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_bvc_unblock_ack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_UNBLOCK_ACK;
+
+ DBG_TRACE("Encoding BVC-Unblock-ACK message");
+
+ /* bvci */
+ if (bvc_unblock_ack.bvci.ie_present)
+ {
+ bssgp_ie_encode_bvci(bvc_unblock_ack.bvci,&msg[index],&index);
+ }
+ else {
+ DBG_ERROR("Mandatory element BVCI not specified for bvc-unblock-ack msg!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ *msg_len += index;
+ DBG_TRACE("BVC-Unblock-ACK message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+
+}
+
+
+/*
+ * bssgp_encode_bvc_reset
+ */
+BOOL
+bssgp_encode_bvc_reset(BSSGP_BVC_RESET_MSG bvc_reset,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_bvc_reset",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_RESET;
+
+ DBG_TRACE("Encoding BVC-Reset message");
+
+ /* bvci */
+ if (bvc_reset.bvci.ie_present)
+ {
+ bssgp_ie_encode_bvci(bvc_reset.bvci,&msg[index],&index);
+ }
+ else {
+ DBG_ERROR("Mandatory element BVCI not specified for bvc-reset msg!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* cause */
+ if (bvc_reset.cause.ie_present)
+ {
+ bssgp_ie_encode_exception_cause(bvc_reset.cause,&msg[index],&index);
+ }
+ else {
+ DBG_ERROR("Mandatory element BVCI not specified for bvc-reset msg!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* cell id */
+ if (bvc_reset.cell_id.ie_present) {
+ bssgp_ie_encode_cell_id(bvc_reset.cell_id,&msg[index],&index);
+ }
+
+ *msg_len += index;
+ DBG_TRACE("BVC-Reset message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+
+}
+
+
+/*
+ * bssgp_encode_bvc_reset_ack
+ */
+BOOL
+bssgp_encode_bvc_reset_ack(BSSGP_BVC_RESET_ACK_MSG bvc_reset_ack,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_bvc_reset_ack",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_RESET_ACK;
+
+ DBG_TRACE("Encoding BVC-Reset-Ack message");
+
+ /* bvci */
+ if (bvc_reset_ack.bvci.ie_present)
+ {
+ bssgp_ie_encode_bvci(bvc_reset_ack.bvci,&msg[index],&index);
+ }
+ else {
+ DBG_ERROR("Mandatory element BVCI not specified for bvc-reset-ack msg!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* cell id */
+ if (bvc_reset_ack.cell_id.ie_present) {
+ bssgp_ie_encode_cell_id(bvc_reset_ack.cell_id,&msg[index],&index);
+ }
+
+ *msg_len += index;
+ DBG_TRACE("BVC-Reset-Ack message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+
+}
+
+
+/*
+ * bssgp_encode_bvc_status
+ */
+BOOL
+bssgp_encode_bvc_status(BSSGP_BVC_STATUS_MSG bvc_status,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_encode_bvc_status",BSSGP_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = (UINT8*)&msg[index];
+ index++;
+
+ /* Set the PDU type */
+ *byte = (UINT8)BSSGP_PDU_STATUS;
+
+ DBG_TRACE("Encoding BVC-Status message");
+
+ /* cause */
+ if (bvc_status.cause.ie_present)
+ {
+ bssgp_ie_encode_exception_cause(bvc_status.cause,&msg[index],&index);
+ }
+ else {
+ DBG_ERROR("Mandatory element BVCI not specified for bvc-status msg!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* bvci */
+ if (bvc_status.bvci.ie_present)
+ {
+ bssgp_ie_encode_bvci(bvc_status.bvci,&msg[index],&index);
+ }
+ else {
+ DBG_ERROR("Mandatory element BVCI not specified for bvc-status msg!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ *msg_len += index;
+ DBG_TRACE("BVC-Status message %d bytes length",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+
+}
diff --git a/data/mnet/Common/bssgp/src/bssgp_ie_decoder.cpp b/data/mnet/Common/bssgp/src/bssgp_ie_decoder.cpp
new file mode 100644
index 0000000..a20f42a
--- /dev/null
+++ b/data/mnet/Common/bssgp/src/bssgp_ie_decoder.cpp
@@ -0,0 +1,2818 @@
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : bssgp_ie_decoder.cpp *
+ * *
+ * Description : Decoding functions for the BSS-GP layer module *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *--------------------------- Notes ----------------------------------------------------*
+ * References are to sections numbers of the BSSGP spec. (GSM 08.18) unless otherwise *
+ * indicated *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |10/10/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include "bssgp/bssgp_prot.h"
+#include "bssgp/bssgp_util.h"
+#include "bssgp/bssgp_ie_decoder.h"
+
+void HexDumper(UINT8 *buffer, int length );
+
+/*
+ * bssgp_ie_decode_alignment_octets
+ *
+ *----------------------------------------------------------
+ * 11.3.1 Alignment octets
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-4 spare octet
+ *
+ * The Alignment octets are used to align a subsequent IEI
+ * onto a 32 bit boundary.
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_alignment_octets(UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_alignment_octets",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_ALIGNMENT_OCTETS) {
+ DBG_ERROR("Alignment octets IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len > 3) {
+ DBG_ERROR("Alignment octets IEI length Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Just skip by length number of bytes */
+ index += iei_len;
+
+ DBG_TRACE("Alignment octets decoded; IEI length %d bytes",index);
+
+ *len += index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+/*
+ * bssgp_ie_decode_bmax_def_ms
+ *
+ *----------------------------------------------------------
+ * 11.3.2 Bmax default MS
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-4 Bmax
+ *
+ * The Bmax field is coded as in section GSM 08.18
+ * BVC Bucket Size/Bmax.
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_bmax_def_ms(UINT16 *bmax, UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_bmax_def_ms",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_BMAX_DEFAULT_MS) {
+ DBG_ERROR("BMAX DEFAULT MS IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT16)) {
+ DBG_ERROR("BMAX DEFAULT MS IEI length Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ *bmax = (msg[index++] << 8) | msg[index++];
+
+ DBG_TRACE("BMAX DEFAULT MS %d decoded; IEI length %d bytes",*bmax,index);
+
+ *len += index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+/*
+ * bssgp_ie_decode_bss_area_ind
+ *
+ *----------------------------------------------------------
+ * 11.3.3 BSS Area Indication
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 BSS indicator
+ *
+ * The coding of octet 2 is a binary number indicating
+ * the Length of the remaining element.
+ * The coding of octet 3 shall not be specified. The
+ * recipient shall ignore the value of this octet.
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_bss_area_ind(RIL3_BSS_AREA_INDICATION *bss_area, UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_bss_area_ind",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_BSS_AREA_IND) {
+ DBG_ERROR("BSS Area Indication IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT8)) {
+ DBG_ERROR("BSS Area Indication IEI length Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ // Just skip the bss area ind value since it is ignored.
+ index++;
+
+ DBG_TRACE("BSS Area Indication decoded; IEI length %d bytes",index);
+
+ *len += index;
+ bss_area->ie_present = TRUE;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+/*
+ * bssgp_ie_decode_bucket_leak_rate
+ *
+ *----------------------------------------------------------
+ * 11.3.4 Bucket Leak Rate (R)
+ * This information element indicates the leak rate (R)
+ * to be applied to a flow control bucket.
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 R Value (MSB)
+ * octet 4 R Value (LSB)
+ *
+ * The R field is the binary encoding of the rate
+ * information expressed in 100 bits/sec increments,
+ * starting from 0 x 100 bits/sec until 65535 x 100
+ * bits/sec (6 Mbps).
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_bucket_leak_rate(UINT16 *r_value, UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_bucket_leak_rate",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_BUCKET_LEAK_RATE) {
+ DBG_ERROR("Bucket Leak Rate IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT16)) {
+ DBG_ERROR("Bucket Leak Rate IEI length Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ *r_value = (msg[index++] << 8) | msg[index++];
+
+ DBG_TRACE("Bucket Leak Rate %d decoded; IEI length %d bytes",*r_value,index);
+
+ *len += index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+
+/*
+ * bssgp_ie_decode_bvc_bucket_size
+ *
+ *----------------------------------------------------------
+ * 11.3.5 BVC Bucket Size
+ * This information element indicates the maximum bucket
+ * size (Bmax) in octets for a BVC.
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Bmax (MSB)
+ * octet 4 Bmax (LSB)
+ *
+ * The Bmax field is the binary encoding of the bucket
+ * size information expressed in 100 octet increments,
+ * starting from 0 x 100 octets until 65535 x 100 octets
+ * (6 Mbytes).
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_bvc_bucket_size(UINT16 *bmax, UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_bvc_bucket_size",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_BVC_BUCKET_SIZE) {
+ DBG_ERROR("BVC Bucket Size IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT16)) {
+ DBG_ERROR("BVC Bucket Size IEI length Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ *bmax = (msg[index++] << 8) | msg[index++];
+
+ DBG_TRACE("BVC Bucket Size %d decoded; IEI length %d bytes",*bmax,index);
+
+ *len += index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+/*
+ * bssgp_ie_decode_bvci
+ *
+ *----------------------------------------------------------
+ * 11.3.6 BVCI (BSSGP Virtual Connection Identifier)
+ * The BVCI identifies a BVC. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-4 Unstructured value
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_bvci(RIL3_BVCI *bvci,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_bvci",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 *shorty;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_BVCI) {
+ DBG_ERROR("BVCI IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT16)) {
+ DBG_ERROR("BVCI IEI length Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ shorty = (UINT16*)&msg[index];
+ /* now we get bvci */
+ bvci->bvci = ntohs(*shorty);
+
+ index += sizeof(UINT16);
+
+ DBG_TRACE("BVCI %d decoded; IEI length %d bytes",bvci->bvci,index);
+
+ *len += index;
+
+ bvci->ie_present = TRUE;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+/*
+ * bssgp_ie_decode_bvc_measurement
+ *
+ *----------------------------------------------------------
+ * 11.3.7 BVC Measurement
+ * This information element describes average queuing
+ * delay for a BVC. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3,4 Delay Value (in centi-seconds)
+ *
+ * The Delay Value field is coded as a 16-bit integer
+ * value in units of centi-seconds (one hundredth of a
+ * second). This coding provides a range of over 10 minutes
+ * in increments of 10 msec. As a special case, the
+ * hexadecimal value 0xFFFF (decimal 65535) shall be
+ * interpreted as "infinite delay".
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_bvc_measurement(RIL3_BVC_MEASUREMENT *delay_val, UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_bvc_measurement",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_BVC_MEASUREMENT) {
+ DBG_ERROR("BVC Measurement IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT16)) {
+ DBG_ERROR("BVC Measurement IEI length Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ delay_val->bvc_meas = (msg[index++] << 8) | msg[index++];
+
+ DBG_TRACE("BVC Measurement %d decoded; IEI length %d bytes",delay_val->bvc_meas,index);
+
+ *len += index;
+ delay_val->ie_present = TRUE;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_ie_decode_exception_cause
+ *
+ *----------------------------------------------------------
+ * 11.3.8 Cause
+ * The Cause information element indicates the reason for
+ * an exception condition. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Cause value
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_exception_cause(RIL3_BSSGP_CAUSE *cause,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_exception_cause",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_CAUSE) {
+ DBG_ERROR("Exception cause IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT8)) {
+ DBG_ERROR("Exception cause IEI length Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ byte = &msg[index];
+ cause->cause = (BSSGP_EXCEPTION_CAUSE)*byte;
+ index++;
+
+ DBG_TRACE("Cause value %s decoded; IEI length %d bytes",
+ bssgp_util_get_exception_cause_str((BSSGP_EXCEPTION_CAUSE)cause->cause),
+ index);
+
+ *len += index;
+ cause->ie_present = TRUE;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+/*
+ * bssgp_ie_decode_cell_id
+ *
+ *----------------------------------------------------------
+ * 11.3.9 Cell Identifier
+ * This information element uniquely identifies one cell.
+ * The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octets 3-8 Octets 3 to 8 contain the value part
+ * (starting with octet 2) of the Routing Area
+ * Identification IE defined in GSM 04.08
+ * [11], not including GSM 04.08 IEI
+ * octets 9-10 Octets 9 and 10 contain the value part
+ * (starting with octet 2) of the Cell
+ * Identity IE defined in GSM 04.08 [11],
+ * not including GSM 04.08 IEI
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_cell_id(RIL3_IE_CELL_IDENTIFIER *cell_id,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_cell_id",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0,iei_len, *shorty, lac;
+
+ byte = &msg[index];
+ index++;
+
+ if (*byte != BSSGP_IEI_CELL_ID) {
+ DBG_ERROR("Invalid Cell Identifier IEI, %d value",*byte);
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != 8) {
+ DBG_ERROR("Cell Identifier IEI length Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /*
+ * From 04.08:
+ *
+ * The routing area identification information element is
+ * coded as shown in figure 10.5.130/GSM 04.08 and
+ * table 10.5.148/GSM 04.08.
+ * 8 7 6 5 4 3 2 1
+ * ------------------------------
+ * * MCC digit 2 * MCC digit 1 * octet 2
+ * ------------------------------
+ * * MNC digit 3 * MCC digit 3 * octet 3
+ * ------------------------------
+ * * MNC digit 2 * MNC digit 1 * octet 4
+ * ------------------------------
+ * * LAC * octet 5
+ * ------------------------------
+ * * LAC cont'd * octet 6
+ * ------------------------------
+ * * RAC * octet 7
+ * ------------------------------
+ *
+ *
+ */
+ cell_id->routing_area.mcc[0] = msg[index] & 0x0f;
+ cell_id->routing_area.mcc[1] = (msg[index] & 0xf0) >> 4;
+ index++;
+
+ cell_id->routing_area.mcc[2] = msg[index] & 0x0f;
+ cell_id->routing_area.mnc[2] = (msg[index] & 0xf0) >> 4;
+ index++;
+
+ cell_id->routing_area.mnc[0] = msg[index] & 0x0f;
+ cell_id->routing_area.mnc[1] = (msg[index] & 0xf0) >> 4;
+ index++;
+
+
+ memcpy(&lac,&msg[index],sizeof(UINT16));
+ cell_id->routing_area.lac = ntohs(lac);
+ index += sizeof(UINT16);
+
+ cell_id->routing_area.rac = msg[index];
+ index++;
+
+ shorty = (UINT16*)&msg[index];
+ cell_id->cell_id.value = ntohs(*shorty);
+ index += sizeof(UINT16);
+
+ DBG_TRACE("Cell Identifier IE length %d bytes",index);
+
+ DBG_TRACE("Cell Identifier :- MCC : %d%d%d ; MNC : %d%d(%x) ; LAC : %d ; RAC : %d\n"
+ "\tCell Identity : %d",
+ cell_id->routing_area.mcc[0], cell_id->routing_area.mcc[1], cell_id->routing_area.mcc[2],
+ cell_id->routing_area.mnc[0], cell_id->routing_area.mnc[1], cell_id->routing_area.mnc[2],
+ cell_id->routing_area.lac,
+ cell_id->routing_area.rac,
+ cell_id->cell_id.value);
+
+ cell_id->ie_present = TRUE;
+
+ *len += index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_ie_decode_channel_needed
+ *
+ *----------------------------------------------------------
+ * 11.3.10 Channel needed
+ * This information element is coded as defined in
+ * GSM 09.18. It is relevant to circuit-switched paging
+ * requests. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Rest of element coded as the value part of
+ * the Channel Needed PDU defined in GSM 09.18,
+ * not including GSM 09.18 IEI and GSM 09.18
+ * length indicator
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_channel_needed(UINT8 *val, UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_channel_needed",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_CHAN_NEEDED) {
+ DBG_ERROR("Channel Needed IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT8)) {
+ DBG_ERROR("Channel Needed IEI length Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ *val = msg[index++];
+
+ DBG_TRACE("Channel Needed %d decoded; IEI length %d bytes",*val,index);
+
+ *len += index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+/*
+ * bssgp_ie_decode_drx_params
+ *
+ *----------------------------------------------------------
+ * 11.3.11 DRX Parameters
+ * This information element contains MS specific DRX
+ * information. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-n Rest of element coded as the value part
+ * defined in GSM 04.08, not including GSM
+ * 04.08 IEI and GSM 04.08 octet length
+ * indicator
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_drx_params(T_CNI_RIL3_IE_DRX_PARAMETER *drx_params,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_drx_params",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_DRX_PARAMS) {
+ DBG_ERROR("DRX Parameters IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != (sizeof(UINT8)*2)) {
+ DBG_ERROR("DRX Parameters IEI length Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /*
+ *
+ * The value part of a DRX parameter information element
+ * is coded as shown in table 10.5.139/GSM 04.08.
+ * ------------------------------
+ * 8 7 6 5 | 4 | 3 2 1
+ * ------------------------------
+ * SPLIT PG CYCLE CODE octet 2
+ * ------------------------------
+ * 0 0 0 0 | SPL| non-DRXtimer octet 3
+ * ------------------------------
+ *
+ */
+
+ byte = &msg[index];
+ drx_params->split_pg_cycle_code = *byte;
+ index++;
+
+ byte = &msg[index];
+ if (*byte & 0x80) {
+ drx_params->split_on_CCCH = TRUE;
+ drx_params->non_drx_timer = (T_CNI_RIL3_IE_NON_DRX_TIMER_VALUE)(*byte & 0x7f);
+ DBG_TRACE("Decoded DRX params :- Split PG cycle code %d ; Split on CCCH ; Non-DRX timer %d",
+ drx_params->split_pg_cycle_code,drx_params->non_drx_timer);
+ }
+ else {
+ drx_params->non_drx_timer = (T_CNI_RIL3_IE_NON_DRX_TIMER_VALUE)*byte;
+ DBG_TRACE("Decoded DRX params :- Split PG cycle code %d ; Non-DRX timer %d",
+ drx_params->split_pg_cycle_code,drx_params->non_drx_timer);
+ }
+
+ index++;
+
+ *len += index;
+ drx_params->ie_present = TRUE;
+
+ DBG_TRACE("DRX Params IEI length %d bytes",index);
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+/*
+ * bssgp_ie_decode_emlpp_priority
+ *
+ *----------------------------------------------------------
+ * 11.3.12 eMLPP-Priority
+ * This element indicates the eMLPP-Priority of a PDU.
+ * The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Rest of element coded as the value part of
+ * the eMLPP-Priority IE defined in GSM 08.08,
+ * not including GSM 08.08 IEI and GSM 08.08
+ * length indicator
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_emlpp_priority(UINT8 *val, UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_emlpp_priority",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_EMLPP_PRIORITY) {
+ DBG_ERROR("eMLPP-Priority IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT8)) {
+ DBG_ERROR("eMLPP-Priority IEI length Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ *val = msg[index++];
+
+ DBG_TRACE("eMLPP-Priority %d decoded; IEI length %d bytes",*val,index);
+
+ *len += index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+/*
+ * bssgp_ie_decode_flush_action
+ *
+ *----------------------------------------------------------
+ * 11.3.13 Flush Action
+ * The Flush action information element indicates to the
+ * SGSN the action taken by the BSS in response to the
+ * flush request. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Action value
+ *
+ * Table 11.16: Action coding
+ * Action value semantics of coding
+ *
+ * Hexadecimal
+ *
+ * x00 LLC-PDU(s) deleted
+ * x01 LLC-PDU(s) transferred
+ *
+ * All values not explicitly shown are reserved for
+ * future use
+ *
+ *----------------------------------------------------------
+ */
+BOOL
+bssgp_ie_decode_flush_action(BSSGP_FLUSH_ACTION *action, UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_flush_action",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_FLUSH_ACTION) {
+ DBG_ERROR("Flush Action IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT8)) {
+ DBG_ERROR("Flush Action IEI length Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ *action = (BSSGP_FLUSH_ACTION)msg[index++];
+
+ DBG_TRACE("Flush Action %d decoded; IEI length %d bytes",*action,index);
+
+ *len += index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+/*
+ * bssgp_ie_decode_imsi
+ *
+ *----------------------------------------------------------
+ * 11.3.14 IMSI
+ * This information element contains the International
+ * Mobile Subscriber Identity. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator = length of remaining stuff
+ * octet 3-n Octets 3-n contain an IMSI coded as the
+ * value part (starting with octet 3) of the
+ * Mobile Identity IE defined in GSM 04.08,
+ * not including GSM 04.08 IEI and GSM 04.08
+ * length indicator
+ *
+ *----------------------------------------------------------
+ */
+BOOL
+bssgp_ie_decode_imsi(T_CNI_RIL3_IE_MOBILE_ID *imsi,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_ie_decode_imsi",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ int count;
+ UINT16 index = 0,iei_len;
+ char disp_buff[128], temp_buff[10];
+ bool oddDigits;
+
+ byte = &msg[index];
+
+ if (*byte != BSSGP_IEI_IMSI) {
+ DBG_ERROR("Invalid IMSI IEI");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+
+ /*
+ * Refer to GSM 04.08; the IEI has the following
+ * structure; but this octet would be the first
+ * for us
+ * +-----------------------------------------------*
+ * * *odd/ * *
+ * * Identity digit 1 *even * Type of identity* octet 3
+ * * *indic* *
+ * +-----------------------+-----------------------*
+ */
+
+ byte = &msg[index];
+
+ if ((*byte & 0x07) != CNI_RIL3_IMSI) {
+ DBG_ERROR("Invalid IMSI IEI; mobile ID type %d",(*byte & 0x07));
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ oddDigits = ((*byte & 0x08) >> 3);
+ imsi->ie_present = 1;
+ imsi->mobileIdType = CNI_RIL3_IMSI;
+
+ /* Now decode the first digit */
+ imsi->digits[0] = (*byte & 0xf0)>> 4;
+ imsi->numDigits = 1;
+
+ index++;
+ memset(disp_buff,0,128);
+ memset(temp_buff,0,10);
+ sprintf(disp_buff,"%d",imsi->digits[0]);
+
+ for(count=1;count<=(iei_len*2)-(2+oddDigits);count+=2) {
+ byte = &msg[index];
+ imsi->digits[count] = *byte & 0x0f;
+ imsi->digits[count+1] = ((*byte & 0xf0) >> 4);
+ index++;
+ imsi->numDigits += 2;
+ memset(temp_buff,0,10);
+ sprintf(temp_buff,"%d%d",imsi->digits[count],imsi->digits[count+1]);
+ strcat(disp_buff,temp_buff);
+ }
+ if (oddDigits == 0) {
+ /* one digit left over */
+ byte = &msg[index];
+ imsi->digits[count] = *byte & 0x0f;
+ imsi->numDigits++;
+ memset(temp_buff,0,10);
+ sprintf(temp_buff,"%d",imsi->digits[count]);
+ strcat(disp_buff,temp_buff);
+ index++;
+ }
+
+ *msg_len += index;
+ imsi->ie_present = TRUE;
+
+ DBG_TRACE("Decoded IMSI : %s; IEI length %d bytes",disp_buff,index);
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_ie_decode_llc_pdu
+ *
+ *----------------------------------------------------------
+ * 11.3.15 LLC-PDU
+ * This information element contains an LLC-PDU. The
+ * element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 LLC-PDU (first part)
+ * octet n LLC-PDU (last part)
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_llc_pdu(BSSGP_DL_UNITDATA_MSG *dl_unitdata,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_llc_pdu",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+ index++;
+
+ if (*byte != BSSGP_IEI_LLC_PDU) {
+ DBG_ERROR("IEI not LLC PDU, %d type !!",*byte);
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+
+ dl_unitdata->pdu.data_len = iei_len;
+
+ DBG_TRACE("Decoding LLC PDU of size %d",iei_len);
+
+ byte = &msg[index];
+
+ dl_unitdata->pdu.data = (UINT8*)bssgp_util_get_rx_buff(iei_len);
+
+ memcpy(dl_unitdata->pdu.data,byte,iei_len);
+
+ index += iei_len;
+
+ *len += index;
+
+ DBG_TRACE("Decoded LLC PDU - IEI length %d bytes",iei_len);
+ HexDumper(dl_unitdata->pdu.data, iei_len);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+/*
+ * bssgp_ie_decode_llc_pdu_ext
+ */
+UINT8 *
+bssgp_ie_decode_llc_pdu_ext(UINT16 *pdu_len,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_llc_pdu_ext",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+ index++;
+
+ if (*byte != BSSGP_IEI_LLC_PDU) {
+ DBG_ERROR("IEI not LLC PDU, %d type !!",*byte);
+ DBG_LEAVE();
+ return (NULL);
+ }
+
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+
+ *pdu_len = iei_len;
+
+ DBG_TRACE("Decoding LLC PDU of size %d",iei_len);
+
+ byte = &msg[index];
+
+ index += *pdu_len;
+
+ *len += index;
+
+ DBG_LEAVE();
+ return (byte);
+}
+
+
+
+
+
+/*
+ * bssgp_ie_decode_llc_frames_discarded
+ *
+ *----------------------------------------------------------
+ * 11.3.16 LLC Frames Discarded
+ * This element describes the number of LLC frames that
+ * have been discarded inside a BSS. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Number of frames discarded (in hex)
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_llc_frames_discarded(UINT8 *frames, UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_llc_frames_discarded",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_BSS_AREA_IND) {
+ DBG_ERROR("LLC Frames Discarded IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT8)) {
+ DBG_ERROR("LLC Frames Discarded IEI length Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ *frames = msg[index++];
+
+ DBG_TRACE("LLC Frames Discarded %d decoded; IEI length %d bytes",*frames,index);
+
+ *len += index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+/*
+ * bssgp_ie_decode_location_area
+ *
+ *----------------------------------------------------------
+ * 11.3.17 Location Area
+ * This element uniquely identifies one Location Area.
+ * The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octets 3-7 Octets 3 to 7 contain the value part
+ * (starting with octet 2) of the Location Area
+ * Identification IE defined in GSM 04.08 [11],
+ * not including GSM 04.08 IEI
+ *
+ * The coding of octet 2 is a binary number indicating the
+ * Length of the remaining element.
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_location_area(T_CNI_RIL3_IE_LOCATION_AREA_ID *location_area,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_location_area",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 lac, index = 0, iei_len;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_LOCATION_AREA) {
+ DBG_ERROR("Invalid location area IEI");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ index++;
+
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+
+ /*
+ * From 04.08:
+ * The Location Area Identification is a type 3 information element
+ * ith 6 octets length.
+ * 8 7 6 5 4 3 2 1
+ * +-----------------------------------------------*
+ * * * *
+ * * MCC digit 2 * MCC digit 1 * octet 2
+ * +-----------------------+-----------------------*
+ * * * *
+ * * MNC digit 3 * MCC digit 3 * octet 3
+ * +-----------------------+-----------------------*
+ * * * *
+ * * MNC digit 2 * MNC digit 1 * octet 4
+ * +-----------------------------------------------*
+ * * *
+ * * LAC * octet 5
+ * +-----------------------------------------------*
+ * * *
+ * * LAC (continued) * octet 6
+ * +-----------------------------------------------+
+ *
+ */
+ location_area->mcc[0] = msg[index] & 0x0f;
+ location_area->mcc[1] = (msg[index] & 0xf0) >> 4;
+ index++;
+
+ location_area->mcc[2] = msg[index] & 0x0f;
+ location_area->mnc[2] = (msg[index] & 0xf0) >> 4;
+ index++;
+
+ location_area->mnc[0] = msg[index] & 0x0f;
+ location_area->mnc[1] = (msg[index] & 0xf0) >> 4;
+ index++;
+
+ memcpy(&lac,&msg[index],sizeof(UINT16));
+ index += sizeof(UINT16);
+ location_area->lac = htons(lac);
+ location_area->ie_present = TRUE;
+
+ DBG_TRACE("Location Area :- MCC : %d%d%d ; MNC : %d%d(%x) ; LAC : %d",
+ location_area->mcc[0],location_area->mcc[1],location_area->mcc[2],
+ location_area->mnc[0],location_area->mnc[1],location_area->mnc[2],
+ location_area->lac);
+
+ *len += index;
+ DBG_TRACE("Location area IEI length %d bytes",index);
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+/*
+ * bssgp_ie_decode_lsa_identifier_list
+ *
+ *----------------------------------------------------------
+ * 11.3.18 LSA Identifier List
+ * This information element uniquely identifies LSAs. The
+ * element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-? Rest of element coded as in GSM 08.08, not
+ * including GSM 08.08 IEI and GSM 08.08 length
+ * indicator
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_lsa_identifier_list(RIL3_IE_LSA_IDENTIFIER_LIST *lsa_id_list,
+ UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_lsa_identifier_list",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+ INT16 num_lsa_ids;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_LSA_ID_LIST) {
+ DBG_ERROR("LSA Identifier List IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+
+ num_lsa_ids = (iei_len - 1) / 3;
+
+ lsa_id_list->num_lsa_ids = num_lsa_ids;
+
+ lsa_id_list->ep = msg[index++] & 0x1;
+
+ while (num_lsa_ids)
+ {
+ lsa_id_list->lsa_id[lsa_id_list->num_lsa_ids - num_lsa_ids] =
+ (msg[index++] << 16) | (msg[index++] << 8) | msg[index++];
+ num_lsa_ids--;
+ }
+
+ DBG_TRACE("LSA Identifier List; IEI length %d bytes",index);
+
+ *len += index;
+ lsa_id_list->ie_present = TRUE;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+/*
+ * bssgp_ie_decode_lsa_info
+ *
+ *----------------------------------------------------------
+ * 11.3.19 LSA Information
+ * This information element uniquely identifies LSAs, the
+ * priority of each LSA and the access right outside these
+ * LSAs. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-? Rest of element coded as in GSM 08.08, not
+ * including GSM 08.08 IEI and GSM 08.08
+ * length indicator
+ *
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_lsa_info(RIL3_IE_LSA_INFORMATION *lsa_info, UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_lsa_info",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+ INT16 num_lsas;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_ALIGNMENT_OCTETS) {
+ DBG_ERROR("LSA Information IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+
+ num_lsas = (iei_len - 1) / 4;
+
+ lsa_info->num_lsas = num_lsas;
+
+ lsa_info->lsa_only = msg[index++] & 0x1;
+
+ while (num_lsas)
+ {
+ lsa_info->lsa_ids[lsa_info->num_lsas - num_lsas].act = msg[index] & 0x20;
+ lsa_info->lsa_ids[lsa_info->num_lsas - num_lsas].pref = msg[index] & 0x10;
+ lsa_info->lsa_ids[lsa_info->num_lsas - num_lsas].priority = msg[index++] & 0x0f;
+ lsa_info->lsa_ids[lsa_info->num_lsas - num_lsas].lsa_id = (msg[index++] << 16) | (msg[index++] << 8) | msg[index++];
+ lsa_info->lsa_ids[lsa_info->num_lsas - num_lsas].present = TRUE;
+ num_lsas--;
+ }
+
+ DBG_TRACE("LSA Information; IEI length %d bytes",index);
+
+ *len += index;
+ lsa_info->ie_present = TRUE;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+
+/*
+ * bssgp_ie_decode_mobile_id
+ *
+ *----------------------------------------------------------
+ * 11.3.20 Mobile Id
+ * The element coding is:
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-n Octets 3-n contain either the IMSI, IMEISV
+ * or IMEI coded as the value part (starting
+ * with octet 3) of the Mobile Identity IE
+ * defined in GSM 04.08, not including GSM
+ * 04.08 IEI and GSM 04.08 length indcator
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_mobile_id(UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_mobile_id",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+ /* FIXME */
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_ie_decode_ms_bucket_size
+ *
+ *----------------------------------------------------------
+ * 11.3.21 MS Bucket Size
+ * This information element indicates an MS's bucket size
+ * (Bmax). The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-4 Bmax
+ *
+ * The Bmax field is coded as in section GSM 08.18 BVC Bucket
+ * Size/Bmax.
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_ms_bucket_size(UINT16 *bmax, UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_ms_bucket_size",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_MS_BUCKET_SIZE) {
+ DBG_ERROR("MS Bucket Size IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT16)) {
+ DBG_ERROR("MS Bucket Size IEI length Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ *bmax = (msg[index++] << 8) | msg[index++];
+
+ DBG_TRACE("MS Bucket Size %d decoded; IEI length %d bytes",*bmax,index);
+
+ *len += index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_ie_decode_ms_ra_cap
+ *
+ *----------------------------------------------------------
+ * 11.3.22 MS Radio Access Capability
+ * This information element contains the capabilities of
+ * the ME. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-14 Rest of element coded as the value part
+ * defined in GSM 04.08, not including GSM
+ * 04.08 IEI and GSM 04.08 octet length
+ * indicator.
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_ms_ra_cap(T_CNI_RIL3_IE_MS_RADIO_ACCESS_CAPABILITY *ra_cap,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_ms_ra_cap",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,count, iei_len;
+
+ byte = &msg[index];
+ index++;
+
+ if (*byte != BSSGP_IEI_MS_RADIO_ACCESS_CAP) {
+ DBG_ERROR("Invalid MS-Radio-Access-Capabilities IEI");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+
+
+
+ /*
+ * Although the spec 04.08 is pretty clear about the IE
+ * encoding, the encoding specified is quite messy &
+ * since we would be more or less dealing with ourselves,
+ * (read proprietary..snigger..) it is well worth it to
+ * rearrange the elements to pack it nicely... DSN.
+ * So packing would be as follows:-
+ *
+ * |---------------------------------------------------------------|
+ * | Number of Radio Access Capabilities | octet 1
+ * |---------------------------------------------------------------|
+ *
+ * After this, depending on above value there would be 5 octets per
+ * radio access capability packed as follows
+ *
+ * |---------------------------------------------------------------|
+ * | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
+ * |---------------------------------------------------------------|
+ * | Access Tech Type | RF Power Capabilities | octet n
+ * |---------------------------------------------------------------|
+ * | resvd | A5 Algorithms supported from 7 to 1 | octet n+1
+ * |---------------------------------------------------------------|
+ * | reserved | es | ps | vgcs | vbs | res | octet n+2
+ * |---------------------------------------------------------------|
+ * | pres | reserved | hscd multi-slot class | octet n+3
+ * |---------------------------------------------------------------|
+ * | pres | gprs multi-slot class | ExCap | pres | octet n+4
+ * |---------------------------------------------------------------|
+ * | switch measure switch value | switch measure value | octet n+5
+ * |---------------------------------------------------------------|
+ *
+ */
+
+ byte = &msg[index];
+ index++;
+ ra_cap->number_of_ra_capabilities = *byte;
+
+ if (iei_len != ((ra_cap->number_of_ra_capabilities*6*sizeof(UINT8))+sizeof(UINT8))) {
+ DBG_ERROR("MS-Radio-Access-Capability IEI length mismatch with number of capabilities, len %d, num %d",
+ iei_len,ra_cap->number_of_ra_capabilities);
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+
+ DBG_TRACE("Decoding %d number of Radio Access Capabilities",ra_cap->number_of_ra_capabilities);
+
+ for(count=0;count<ra_cap->number_of_ra_capabilities;count++) {
+ byte = &msg[index];
+ index++;
+ ra_cap->ms_ra_capability[count].rf_power_capability = (*byte & 0x07);
+ ra_cap->ms_ra_capability[count].access_technology_type =
+ (T_CNI_RIL3_ACCESS_TECHNOLOGY_TYPE)((*byte &0xf0) >> 4);
+
+ DBG_TRACE("Access Technology Type : %d, RF Power Capability %d",
+ ra_cap->ms_ra_capability[count].access_technology_type,
+ ra_cap->ms_ra_capability[count].rf_power_capability);
+
+ byte = &msg[index];
+ index++;
+ *byte = 0;
+ if (*byte & 0x01) {
+ ra_cap->ms_ra_capability[count].a5_1_algorithm = TRUE;
+ DBG_TRACE("Supports A5.1 algorithm");
+ }
+ if (*byte & 0x02) {
+ ra_cap->ms_ra_capability[count].a5_2_algorithm = TRUE;
+ DBG_TRACE("Supports A5.2 algorithm");
+ }
+ if (*byte & 0x04) {
+ ra_cap->ms_ra_capability[count].a5_3_algorithm = TRUE;
+ DBG_TRACE("Supports A5.3 algorithm");
+ }
+ if (*byte & 0x08) {
+ ra_cap->ms_ra_capability[count].a5_4_algorithm = TRUE;
+ DBG_TRACE("Supports A5.4 algorithm");
+ }
+ if (*byte & 0x10) {
+ ra_cap->ms_ra_capability[count].a5_5_algorithm = TRUE;
+ DBG_TRACE("Supports A5.5 algorithm");
+ }
+ if (*byte & 0x20) {
+ ra_cap->ms_ra_capability[count].a5_6_algorithm = TRUE;
+ DBG_TRACE("Supports A5.6 algorithm");
+ }
+ if (*byte & 0x40) {
+ ra_cap->ms_ra_capability[count].a5_7_algorithm = TRUE;
+ DBG_TRACE("Supports A5.7 algorithm");
+ }
+
+ byte = &msg[index];
+ index++;
+ *byte = 0;
+ if (*byte & 0x10) {
+ ra_cap->ms_ra_capability[count].es_ind = TRUE;
+ DBG_TRACE("ES Indicator");
+ }
+ if (*byte & 0x08) {
+ ra_cap->ms_ra_capability[count].ps = TRUE;
+ DBG_TRACE("PS");
+ }
+ if (*byte & 0x04) {
+ ra_cap->ms_ra_capability[count].vgcs = TRUE;
+ DBG_TRACE("VGCS");
+ }
+ if (*byte & 0x02) {
+ ra_cap->ms_ra_capability[count].vbs = TRUE;
+ DBG_TRACE("VBS");
+ }
+
+ ra_cap->ms_ra_capability[count].multislot_capability.present = TRUE;
+ byte = &msg[index];
+ index++;
+ ra_cap->ms_ra_capability[count].multislot_capability.hscsd_multi_slot_class = (*byte & 0x1f);
+ ra_cap->ms_ra_capability[count].multislot_capability.hscsd_param_present = (*byte >> 7);
+ if (ra_cap->ms_ra_capability[count].multislot_capability.hscsd_param_present)
+ DBG_TRACE("HSCSD Multi slot class %d",ra_cap->ms_ra_capability[count].multislot_capability.hscsd_multi_slot_class);
+ else
+ DBG_TRACE("HSCSD Multi slot class not present");
+
+ byte = &msg[index];
+ index++;
+ ra_cap->ms_ra_capability[count].multislot_capability.gprs_multi_slot_class = ((*byte >> 2) & 0x1f);
+ ra_cap->ms_ra_capability[count].multislot_capability.gprs_dynamic_allocation_capability = ((*byte >> 1) & 0x1);
+ ra_cap->ms_ra_capability[count].multislot_capability.gprs_params_present = (*byte >> 7);
+ ra_cap->ms_ra_capability[count].multislot_capability.sms_params_present = (*byte & 0x1);
+ if (ra_cap->ms_ra_capability[count].multislot_capability.gprs_params_present)
+ {
+ DBG_TRACE("GPRS Multi slot class %d",ra_cap->ms_ra_capability[count].multislot_capability.gprs_multi_slot_class);
+ DBG_TRACE("GPRS Ext dynamic allocation cap %d",ra_cap->ms_ra_capability[count].multislot_capability.gprs_dynamic_allocation_capability);
+ }
+ else
+ DBG_TRACE("GPRS Multi slot class not present");
+
+ byte = &msg[index];
+ index++;
+ ra_cap->ms_ra_capability[count].multislot_capability.switch_measure_value = (*byte & 0x0f);
+ ra_cap->ms_ra_capability[count].multislot_capability.switch_measure_switch_value = (*byte & 0xf0) >> 4;
+ if (ra_cap->ms_ra_capability[count].multislot_capability.sms_params_present)
+ DBG_TRACE("Switch measure value %d, Switch measure switch value %d",
+ ra_cap->ms_ra_capability[count].multislot_capability.switch_measure_value,
+ ra_cap->ms_ra_capability[count].multislot_capability.switch_measure_switch_value);
+ else
+ DBG_TRACE("Switch measure not present");
+ }
+
+ ra_cap->ie_present = TRUE;
+ *len += index;
+
+ DBG_TRACE("MS-Radio-Access-Capability IEI length %d bytes",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+/*
+ * bssgp_ie_decode_omc_id
+ *
+ *----------------------------------------------------------
+ * 11.3.23 OMC Id
+ * The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-22 For the OMC identity, see TS 12.20
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_omc_id(UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_omc_id",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ /* FIXME */
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+/*
+ * bssgp_ie_decode_pdu_in_error
+ *
+ *----------------------------------------------------------
+ * 11.3.24 PDU In Error
+ * The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-? Erroneous BSSGP PDU
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_pdu_in_error(UINT8 *llc_pdu,UINT16 *pdu_len,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_pdu_in_error",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+ index++;
+
+ if (*byte != BSSGP_IEI_PDU_IN_ERROR) {
+ DBG_ERROR("IEI not LLC PDU in Error, %d type !!",*byte);
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+
+ *pdu_len = iei_len;
+
+ DBG_TRACE("Decoding LLC PDU in error of size %d",iei_len);
+
+ byte = &msg[index];
+
+ memcpy(llc_pdu,byte,iei_len);
+
+ index += *pdu_len;
+
+ *len += index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_ie_decode_pdu_lifetime
+ *
+ *----------------------------------------------------------
+ * 11.3.25 PDU Lifetime
+ * This information element describes the PDU Lifetime
+ * for a PDU inside the BSS. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-4 Delay Value
+ *
+ * The Delay Value field is coded as in section GSM 08.18
+ * BVC Measurement/Delay Value.
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_pdu_lifetime(RIL3_IE_PDU_LIFETIME *delay, UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_pdu_lifetime",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_PDU_LIFETIME) {
+ DBG_ERROR("PDU Lifetime IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT16)) {
+ DBG_ERROR("PDU Lifetime IEI length Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ delay->pdu_lifetime = (msg[index++] << 8) | msg[index++];
+
+ DBG_TRACE("PDU Lifetime %d decoded; IEI length %d bytes",delay->pdu_lifetime,index);
+
+ *len += index;
+ delay->ie_present = TRUE;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+/*
+ * bssgp_ie_decode_priority
+ *
+ *----------------------------------------------------------
+ * 11.3.27 Priority
+ * This element indicates the priority of a PDU. The
+ * element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Rest of element coded as the value part of
+ * the Priority IE defined in GSM 08.08, not
+ * including GSM 08.08 IEI and GSM 08.08
+ * length indicator
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_priority(RIL3_IE_PRIORITY *priority, UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_priority",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_PRIORITY) {
+ DBG_ERROR("Priority IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT8)) {
+ DBG_ERROR("Priority IEI length Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ priority->priority = msg[index++];
+
+ DBG_TRACE("Priority %d decoded; IEI length %d bytes",priority->priority,index);
+
+ *len += index;
+ priority->ie_present = TRUE;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+
+
+
+
+/*
+ * bssgp_ie_decode_qos_params
+ *
+ *----------------------------------------------------------
+ * QoS Params (Cisco-EWTBU proprietary ext)
+ * This information element describes the QoS Params
+ * associated with a PDU. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Delay Class
+ * octet 4 Reliability Class
+ * octet 5 Precedence Class
+ * octet 6 Peak Throughput
+ * octet 7 Mean Throughput
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_qos_params(T_CNI_RIL3_IE_QOS *qos_params, UINT8 *msg, UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_qos_params",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0, iei_len;
+
+ byte = &msg[index];
+ index++;
+
+ if (*byte != BSSGP_IEI_QOS_PARAMS) {
+ DBG_ERROR("Invalid QoS Params IEI");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != (sizeof(UINT8)*5)) {
+ DBG_ERROR("Invalid QoS Params IEI Length, %d",iei_len);
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Delay Class */
+ byte = &msg[index];
+ qos_params->delay_class = (CNI_RIL3_QOS_DELAY_CLASS)*byte;
+ index++;
+ /* Reliability class */
+ byte = &msg[index];
+ qos_params->reliability_class = (CNI_RIL3_QOS_RELIABILITY_CLASS)*byte;
+ index++;
+ /* Precedence class */
+ byte = &msg[index];
+ qos_params->precedence_class = (CNI_RIL3_QOS_PRECEDENCE_CLASS)*byte;
+ index++;
+ /* Peak throughput */
+ byte = &msg[index];
+ qos_params->peak_throughput = (CNI_RIL3_QOS_PEAK_THROUGHPUT)*byte;
+ index++;
+ /* Mean throughput */
+ byte = &msg[index];
+ qos_params->mean_throughput = (CNI_RIL3_QOS_MEAN_THROUGHPUT)*byte;
+ index++;
+
+ qos_params->ie_present = TRUE;
+ DBG_TRACE("Decoded QoS params; Delay %d, Reliability %d, Precedence %d, Peak throughput %d & Mean throughput %d",
+ qos_params->delay_class,qos_params->reliability_class,qos_params->precedence_class,
+ qos_params->peak_throughput,qos_params->mean_throughput);
+ *len += index;
+ DBG_LEAVE();
+ return (FALSE);
+}
+
+
+/*
+ * bssgp_ie_decode_qos_profile
+ *
+ *----------------------------------------------------------
+ * 11.3.28 QoS Profile
+ * This information element describes the QoS Profile
+ * associated with a PDU. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-4 Peak bit rate provided by the network,
+ * coded as the value part in Bucket Leak
+ * Rate/R IE/ GSM 08.18 a)
+ * octet 5 SPARE C/R T A Precedence
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_qos_profile(T_RIL3_IE_QOS_PROFILE_ID *qos_profile,UINT8 *msg,UINT16 *len, BSSGP_IEI_FORMAT format)
+{
+ DBG_FUNC("bssgp_ie_decode_qos_profile",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ if (format == BSSGP_FORMAT_TLV)
+ {
+ UINT16 iei_len;
+
+ byte = &msg[index];
+ if (*byte != BSSGP_IEI_QOS_PROFILE) {
+ DBG_ERROR("Invalid QoS profile IEI");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ }
+
+ qos_profile->bucket_leak_rate[0] = msg[index];
+ index++;
+ qos_profile->bucket_leak_rate[1] = msg[index];
+ index++;
+
+
+ DBG_TRACE("Bucket Leak Rate %d:%d",qos_profile->bucket_leak_rate[0],
+ qos_profile->bucket_leak_rate[1]);
+
+ byte = &msg[index];
+ qos_profile->precedence_class = (CNI_RIL3_QOS_PRECEDENCE_CLASS)(*byte & 0x07);
+
+
+ if (*byte & 0x08) {
+ qos_profile->a_bit = RADIO_INT_USES_RLC_MAX_UDT;
+ DBG_TRACE("Radio interface uses RLC/MAC-UNITDATA functionality");
+ }
+ else {
+ qos_profile->a_bit = RADIO_INT_USES_RLC_MAC_ARQ;
+ DBG_TRACE("Radio interface uses RLC/MAC ARQ functionality");
+ }
+
+ if (*byte & 0x10) {
+ qos_profile->t_bit = SDU_CONTAINS_DATA;
+ DBG_TRACE("SDU contains Data");
+ }
+ else {
+ qos_profile->t_bit = SDU_CONTAINS_SIGNALLING;
+ DBG_TRACE("SDU contains Signalling (e.g. related to GMM)");
+ }
+
+ if (*byte & 0x20) {
+ qos_profile->cr_bit = SDU_LLC_ACK_SACK_ABSENT;
+ DBG_TRACE("SDU does NOT contain a LLC ACK or SACK command/response frame type");
+ }
+ else {
+ qos_profile->cr_bit = SDU_LLC_ACK_SACK_PRESENT;
+ DBG_TRACE("SDU contains LLC ACK or SACK command/response frame type");
+ }
+ qos_profile->ie_present = TRUE;
+ index++;
+ *len += index;
+ DBG_TRACE("QoS Profile IEI length %d bytes",index);
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+/*
+ * bssgp_ie_decode_radio_cause
+ *
+ *----------------------------------------------------------
+ * 11.3.29 Radio Cause
+ * This information element indicates the reason for an
+ * exception condition on the radio interface. The element
+ * coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Radio Cause value
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_radio_cause(T_RIL3_IE_RADIO_CAUSE_ID *radio_cause,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_radio_cause",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+ index++;
+
+ if (*byte != (UINT8)BSSGP_IEI_RADIO_CAUSE) {
+ DBG_ERROR("Invalid Radio Cause IEI");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT8)) {
+ DBG_ERROR("Invalid Radio Cause IEI length; %d",iei_len);
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ byte = &msg[index];
+ *radio_cause = (T_RIL3_IE_RADIO_CAUSE_ID)*byte;
+ index++;
+
+ DBG_TRACE("Decoded Radio cause : %s",
+ bssgp_util_get_radio_cause_str(*radio_cause));
+
+
+ DBG_TRACE("Radio Cause IEI length %d bytes",index);
+ *len += index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_ie_decode_ra_cap_update_cause
+ *
+ *----------------------------------------------------------
+ * 11.3.30 RA-Cap-UPD-Cause
+ * The RA-Cap-UPD-Cause indicates the success of the
+ * RA-CAPABILITY-UPDATE procedure or the reason of the
+ * failure. The element coding is:
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 RA-Cap-UPD Cause value
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_ra_cap_update_cause(RA_CAP_UPD_CAUSE *ra_cause,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_ra_cap_update_cause",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+ index++;
+
+ if (*byte != BSSGP_IEI_RA_CAP_UPD_CAUSE) {
+ DBG_ERROR("Error in Radio-Access-Capability-Update IEI");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT8)) {
+ DBG_ERROR("Error in Radio-Access-Capability-Update IEI length, %d",iei_len);
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ byte = &msg[index];
+ *ra_cause = (RA_CAP_UPD_CAUSE)*byte;
+ index++;
+
+ DBG_TRACE("Decoded Radio-Access-Capability-Update-Cause : %s",
+ bssgp_util_get_ra_cap_cause_str(*ra_cause));
+
+
+ DBG_TRACE("Radio-Access-Capability-Update-Cause IEI length %d bytes",index);
+ *len += index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_ie_decode_reject_cause
+ *
+ *----------------------------------------------------------
+ * Reject Cause (Cisco-EWTBU proprietary ext)
+ * This information element describes the reject cause
+ * for a Location Update Nack
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Reject cause
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_reject_cause(T_CNI_RIL3_IE_REJECT_CAUSE *reject_cause, UINT8 *msg, UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_reject_cause",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0, iei_len;
+
+ byte = &msg[index];
+ index++;
+
+ if (*byte != BSSGP_IEI_LA_REJECT_CAUSE) {
+ DBG_ERROR("Error in LA Reject cause IEI");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT8)) {
+ DBG_ERROR("Error in LA Reject cause IEI length, %d",iei_len);
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ byte = &msg[index];
+ index++;
+
+ reject_cause->causeValue = (T_CNI_RIL3_REJECT_CAUSE_VALUE)*byte;
+ reject_cause->ie_present = TRUE;
+
+ DBG_TRACE("Decoded Location Area Reject cause %d; IEI length %d",reject_cause->causeValue,index);
+ *len += index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+/*
+ * bssgp_ie_decode_routing_area
+ *
+ *----------------------------------------------------------
+ * 11.3.31 Routeing Area
+ * This element uniquely identifies one routeing area. The
+ * element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octets 3-8 Octets 3 to 8 contain the value part
+ * (starting with octet 2) of the Routing Area
+ * Identification IE defined in GSM 04.08 [11],
+ * not including GSM 04.08 IEI
+ *
+ * The coding of octet 2 is a binary number indicating the
+ * Length of the remaining element.
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_routing_area(T_CNI_RIL3_IE_ROUTING_AREA_ID *routing_area,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_routing_area",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 lac, index = 0, iei_len;
+
+ byte = &msg[index];
+ index++;
+
+ if (*byte != BSSGP_IEI_ROUTING_AREA) {
+ DBG_ERROR("Error in Routing Area IEI");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != (3+2+sizeof(UINT16))) {
+ DBG_ERROR("Error in Routing Area IEI length, %d",iei_len);
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /*
+ * From 04.08:
+ *
+ * The routing area identification information element is
+ * coded as shown in figure 10.5.130/GSM 04.08 and
+ * table 10.5.148/GSM 04.08.
+ * 8 7 6 5 4 3 2 1
+ * ------------------------------
+ * * MCC digit 2 * MCC digit 1 * octet 2
+ * ------------------------------
+ * * MNC digit 3 * MCC digit 3 * octet 3
+ * ------------------------------
+ * * MNC digit 2 * MNC digit 1 * octet 4
+ * ------------------------------
+ * * LAC * octet 5
+ * ------------------------------
+ * * LAC cont'd * octet 6
+ * ------------------------------
+ * * RAC * octet 7
+ * ------------------------------
+ *
+ *
+ */
+ routing_area->mcc[0] = msg[index] & 0x0f;
+ routing_area->mcc[1] = (msg[index] & 0xf0) >> 4;
+ index++;
+
+ routing_area->mcc[2] = msg[index] & 0x0f;
+ routing_area->mnc[2] = (msg[index] & 0xf0) >> 4;
+ index++;
+
+ routing_area->mnc[0] = msg[index] & 0x0f;
+ routing_area->mnc[1] = (msg[index] & 0xf0) >> 4;
+ index++;
+
+
+ memcpy(&lac,&msg[index],sizeof(UINT16));
+ routing_area->lac = ntohs(lac);
+ index += sizeof(UINT16);
+
+ routing_area->rac = msg[index];
+ index++;
+
+ routing_area->ie_present = TRUE;
+
+ DBG_TRACE("Routing Area :- MCC : %d%d%d ; MNC : %d%d(%x) ; LAC : %d ; RAC : %d",
+ routing_area->mcc[0],routing_area->mcc[1],routing_area->mcc[2],
+ routing_area->mnc[0],routing_area->mnc[1],routing_area->mnc[2],
+ routing_area->lac,routing_area->rac);
+
+ *len += index;
+ DBG_TRACE("Routing Area IEI length %d bytes",index);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+/*
+ * bssgp_ie_decode_r_def_ms
+ *
+ *----------------------------------------------------------
+ * 11.3.32 R_default_MS
+ * This information element indicates the default bucket
+ * leak rate (R) to be applied to a flow control bucket
+ * for an MS. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-4 R_default_MS value
+ *
+ * The R_default_MS field is coded as in section GSM 08.18
+ * Bucket Leak Rate /R Value.
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_r_def_ms(UINT16 *r_default,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_r_def_ms",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_BMAX_DEFAULT_MS) {
+ DBG_ERROR("R_Default_MS IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT16)) {
+ DBG_ERROR("R_Default_MS IEI length Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ *r_default = (msg[index++] << 8) | msg[index++];
+
+ DBG_TRACE("R_Default_MS %d decoded; IEI length %d bytes",*r_default,index);
+
+ *len += index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+/*
+ * bssgp_ie_decode_suspend_ref_num
+ *
+ *----------------------------------------------------------
+ * 11.3.33 Suspend Reference Number
+ * The Suspend Reference Number information element
+ * contains an un-formatted reference number for each
+ * suspend/resume transaction. The element coding is:
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Suspend Reference Number
+ *
+ * The Suspend Reference Number is an un-formatted 8 bit
+ * field.
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_suspend_ref_num(UINT8 *suspend_ref_num,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_suspend_ref_num",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+ index++;
+
+ if (*byte != BSSGP_IEI_SUSPEND_REF_NUM) {
+ DBG_ERROR("Invalid Suspend Ref number IEI");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT8)) {
+ DBG_ERROR("Invalid Suspend Ref number IEI length");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ byte = &msg[index];
+ index++;
+
+ *suspend_ref_num = *byte;
+
+ DBG_TRACE("Decoded Suspend Reference Number as %d; IEI length %d bytes",suspend_ref_num,index);
+
+ *len += index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+/*
+ * bssgp_ie_decode_tag
+ *
+ *----------------------------------------------------------
+ * 11.3.34 Tag
+ * This information element is used to correlate request
+ * and response PDUs. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Unstructured value
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_tag(UINT8 *tag,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_tag",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+ index++;
+
+ if (*byte != BSSGP_IEI_TAG) {
+ DBG_ERROR("Error in TAG IEI");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(UINT8)) {
+ DBG_ERROR("TAG IEI length invalid; %d value",iei_len);
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ byte = &msg[index];
+ index++;
+
+ *tag = *byte;
+
+ DBG_TRACE("Decoded tag as %d; IEI length %d bytes",*tag,index);
+
+ *len += index;
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+/*
+ * bssgp_ie_decode_tlli
+ *
+ *----------------------------------------------------------
+ * 11.3.35 Temporary logical link Identity (TLLI)
+ * The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-6 Rest of element coded as the value part of
+ * the TLLI information element in GSM 04.08,
+ * not including GSM 04.08 IEI.
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_tlli(RIL3_TLLI *tlli,UINT8 *msg,UINT16 *len, BSSGP_IEI_FORMAT format)
+{
+ DBG_FUNC("bssgp_ie_decode_tlli",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT16 index = 0;
+ UINT32 *shorty;
+
+ if (format == BSSGP_FORMAT_TLV)
+ {
+ UINT8 *byte;
+ UINT16 iei_len;
+
+ byte = &msg[index];
+ index++;
+
+ if (*byte != BSSGP_IEI_TLLI) {
+ DBG_ERROR("TLLI IEI invalid");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(TLLI)) {
+ DBG_ERROR("TLLI IEI length invalid, %d",iei_len);
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ }
+ shorty= (UINT32*)&msg[index];
+
+ /* now we get shorty ;-) */
+ tlli->tlli = ntohl(*shorty);
+ index += sizeof(UINT32);
+
+ *len += index;
+ tlli->ie_present = TRUE;
+
+ DBG_TRACE("Decoded TLLI %#x; IEI length %d bytes",tlli->tlli,index);
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_ie_decode_tmsi
+ *
+ *----------------------------------------------------------
+ * 11.3.36 Temporary Mobile Subscriber Identity (TMSI)
+ * The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-6 Rest of element coded as the value part of
+ * the TMSI/P-TMSI information element in
+ * GSM 04.08, not including GSM 04.08 IEI.
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_tmsi(T_CNI_RIL3_IE_MOBILE_ID *tmsi,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_tmsi",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+
+ UINT8 *byte;
+ unsigned long tmsi_val;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+ index++;
+
+ if (*byte != BSSGP_IEI_TMSI) {
+ DBG_ERROR("Error in TMSI IEI, invalid IEI type");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != sizeof(unsigned long)) {
+ DBG_ERROR("IEI length invalid for TMSI IEI; %d",iei_len);
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /*
+ * Refer to GSM 04.08; the IEI has the following
+ * structure
+ * 8 7 6 5 4 3 2 1
+ * +-----------------------------------------------+
+ * * TMSI/P-TMSI value * octet 2
+ * +-----------------------------------------------*
+ * * * octet 3
+ * * TMSI/P-TMSI value (contd) *
+ * +-----------------------------------------------*
+ * * * octet 4
+ * * TMSI/P-TMSI value (contd *
+ *+-----------------------------------------------*
+ * * * octet 5
+ * * TMSI/P-TMSI value (contd) *
+ * +-----------------------------------------------+
+ *
+ */
+
+ byte = &msg[index];
+ memcpy(&tmsi_val,byte,sizeof(unsigned long));
+ index += sizeof(unsigned long);
+
+ tmsi->tmsi = ntohl(tmsi_val);
+
+
+ tmsi->ie_present = TRUE;
+ tmsi->mobileIdType = CNI_RIL3_TMSI;
+
+ *len += index;
+ DBG_TRACE("Decoded TMSI : %ld; IEI length %d bytes",tmsi->tmsi,index);
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+/*
+ * bssgp_ie_decode_trace_ref
+ *
+ *----------------------------------------------------------
+ * 11.3.37 Trace Reference
+ * This element provides a trace reference number allocated
+ * by the triggering entity. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-4 Trace Reference
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_trace_ref(UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_trace_ref",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_ie_decode_trace_type
+ *
+ *----------------------------------------------------------
+ * 11.3.38 Trace Type
+ * This element provides the type of trace information to
+ * be recorded. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 This is coded as specified in Technical
+ * Specification GSM 12.08.
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_trace_type(UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_trace_type",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+/*
+ * bssgp_ie_decode_txn_id
+ *
+ *----------------------------------------------------------
+ * 11.3.39 TransactionId
+ * This element indicates a particular transaction within
+ * a trace. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-4 Transaction Id
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_txn_id(UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_ie_decode_trigger_id
+ *
+ *----------------------------------------------------------
+ * 11.3.40 Trigger Id
+ * This element provides the identity of the entity which
+ * initiated the trace. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-22 Entity Identity ( typically an OMC identity)
+ *
+ *----------------------------------------------------------
+ *
+ */
+BOOL
+bssgp_ie_decode_trigger_id(UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_trigger_id",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+/*
+ * bssgp_ie_decode_num_octets_affected
+ *
+ *----------------------------------------------------------
+ * 11.3.41 Number of octets affected
+ * This information element indicates, for an MS, the num
+ * of octets transferred or deleted by BSS. The element
+ * coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-5 number of octets transferred or deleted
+ *
+ * The number of octets transferred or deleted by the BSS
+ * may be higher than the maximum Bmax value (6553500).
+ * SGSN shall handle any value higher than 6553500 as the
+ * value 6553500.
+ *
+ *----------------------------------------------------------
+ * */
+BOOL
+bssgp_ie_decode_num_octets_affected(UINT32 *num, UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_decode_num_octets_affected",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0,iei_len;
+
+ byte = &msg[index];
+
+ if (*byte != (UINT8)BSSGP_IEI_NUM_OCTETS_AFFECTED) {
+ DBG_ERROR("Number of octets affected IEI Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ index++;
+
+ iei_len = bssgp_ie_decode_iei_length(&msg[index],&index);
+ if (iei_len != 3) {
+ DBG_ERROR("Number of octets affected length Invalid!");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ *num = (msg[index++] << 16) | (msg[index++] << 8) | msg[index++];
+
+ DBG_TRACE("Number of octets affected %d decoded; IEI length %d bytes",*num,index);
+
+ *len += index;
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+
+/*
+ * bssgp_ie_decode_iei_length
+ *
+ *----------------------------------------------------------
+ * The length indicator shall be included in all
+ * information elements having the TLV format.
+ * Information elements may be variable in length.
+ * The length indicator is one or two octet long, the
+ * second octet may be absent. This field consists of the
+ * field extension bit, 0/1 ext, and the length of the value
+ * field which follows, expressed in octets. The field
+ * extension bit enables extension of the length indicator
+ * to two octets.
+ * Bit 8 of the first octet is reserved for the field
+ * extension bit. If the field extension bit is set to 0
+ * (zero), then the second octet of the length indicator is
+ * present. If the field extension bit is set to 1 (one),
+ * then the first octet is the final octet of the length
+ * indicator.
+ * The length of the value field of the IE occupies the rest
+ * of the bits in the length indicator.
+ *
+ * 8 7 6 5 4 3 2 1
+ * octet 2 0/1 ext length
+ * octet 2a length
+ *
+ * Figure 10/GSM 08.16: Length indicator structure
+ * The BSS or SGSN shall not consider the presence of octet
+ * 2a in a received IE as an error when the IE is short
+ * enough for the length to be coded in octet 2 only.
+ *
+ *----------------------------------------------------------
+ *
+ */
+UINT16
+bssgp_ie_decode_iei_length(UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_ie_decode_iei_length",BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte = msg, lo,hi;
+ UINT16 iei_len=0;
+
+ if (*byte & 0x80) {
+ iei_len = *byte & 0x7f;
+ *msg_len += 1;
+ DBG_LEAVE();
+ return (iei_len);
+ }
+ lo = (*byte & 0x7f);
+
+ byte =(UINT8*)&msg[1];
+
+ hi = *byte;
+
+ iei_len = (hi * 128) + lo;
+
+ DBG_TRACE("IEI length octet 1 %d octet 2 %d, total %d",lo,hi,iei_len);
+ *msg_len += 2;
+
+ DBG_LEAVE();
+ return (iei_len);
+}
+
+
+void HexDumper(UINT8 *buffer, int length )
+{
+ int size;
+ int i;
+ int dwPos = 0;
+ static char line[255];
+ int pos;
+
+ DBG_FUNC("HexDumper", BSSGP_DECODER_LAYER);
+ DBG_ENTER();
+
+ while (length > 0)
+ {
+ //
+ // Take min of 16 or length
+ //
+ size = min(16, length );
+ //
+ // Build text line
+ //
+ pos = sprintf(line, " %04X ", dwPos );
+ for (i = 0; i < size; i++)
+ {
+ pos += sprintf(line+pos, "%02X ", buffer[i] );
+ }
+ //
+ // Add spaces for short lines
+ //
+ while (i < 16)
+ {
+ pos += sprintf(line+pos, " " );
+ i++;
+ }
+ //
+ // Add ASCII chars
+ //
+ for (i = 0; i < size; i++)
+ {
+ if (isprint(buffer[i]))
+ {
+ pos += sprintf(line+pos, "%c", buffer[i] );
+ } else {
+ pos += sprintf(line+pos, "." );
+ }
+ }
+
+ DBG_TRACE((line));
+
+ //
+ // Advance positions
+ //
+
+ length -= size;
+ dwPos += size;
+ buffer += size;
+ }
+ DBG_LEAVE();
+}
+
+
+
+
diff --git a/data/mnet/Common/bssgp/src/bssgp_ie_encoder.cpp b/data/mnet/Common/bssgp/src/bssgp_ie_encoder.cpp
new file mode 100644
index 0000000..b80cbdd
--- /dev/null
+++ b/data/mnet/Common/bssgp/src/bssgp_ie_encoder.cpp
@@ -0,0 +1,2295 @@
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : bssgp_ie_encoder.cpp *
+ * *
+ * Description : Functions for encoding all the individual IE indicators *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *--------------------------- Notes ----------------------------------------------------*
+ * References are to sections numbers of the BSSGP spec. (GSM 08.18) unless otherwise *
+ * indicated *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |10/10/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include "bssgp/bssgp_prot.h"
+#include "bssgp/bssgp_util.h"
+#include "bssgp/bssgp_ie_encoder.h"
+
+
+/*
+ * bssgp_ie_alignment_octets
+ *
+ *----------------------------------------------------------
+ * 11.3.1 Alignment Octets
+ *
+ * The Alignment Octets are used to align a subsequent IEI
+ * onto a 32 bit boundary.
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-5 spare octet
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_alignment_octets(UINT8 count,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_alignment_octets",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_ALIGNMENT_OCTETS;
+ index++;
+ DBG_TRACE("Encoding %d Alignment Octets\n", count);
+
+ bssgp_ie_encode_iei_length(count,&msg[index],&index);
+
+ index+=count;
+
+ DBG_TRACE("Alignemnt Octets IEI length %d bytes",index);
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+
+/*
+ * bssgp_ie_encode_bmax_def_ms
+ *
+ *----------------------------------------------------------
+ * 11.3.2 Bmax default MS
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-4 Bmax
+ *
+ * The Bmax field is coded as in section GSM 08.18
+ * BVC Bucket Size/Bmax.
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_bmax_def_ms(UINT16 bmax,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_bmax_def_ms",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_BMAX_DEFAULT_MS;
+ index++;
+ DBG_TRACE("Encoding Bmax default MS IE.");
+
+ bssgp_ie_encode_iei_length(sizeof(UINT16),&msg[index],&index);
+
+ msg[index++] = (UINT8)(bmax >> 8);
+ msg[index++] = (UINT8)(bmax);
+
+ DBG_TRACE("Bmax default MS IE length %d bytes",index);
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * bssgp_ie_encode_bss_area_ind
+ *
+ *----------------------------------------------------------
+ * 11.3.3 BSS Area Indication
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 BSS indicator
+ *
+ * The coding of octet 2 is a binary number indicating
+ * the Length of the remaining element.
+ * The coding of octet 3 shall not be specified. The
+ * recipient shall ignore the value of this octet.
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_bss_area_ind(RIL3_BSS_AREA_INDICATION bss_area,
+ UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_bss_area_ind",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_BSS_AREA_IND;
+ index++;
+ DBG_TRACE("Encoding BSS Area Indication IE.");
+
+ bssgp_ie_encode_iei_length(sizeof(UINT8),&msg[index],&index);
+
+ /* Just skip the actual value as it is ignored. */
+ index++;
+
+ DBG_TRACE("BSS Area Indication IE length %d bytes",index);
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * bssgp_ie_encode_bucket_leak_rate
+ *
+ *----------------------------------------------------------
+ * 11.3.4 Bucket Leak Rate (R)
+ * This information element indicates the leak rate (R)
+ * to be applied to a flow control bucket.
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 R Value (MSB)
+ * octet 4 R Value (LSB)
+ *
+ * The R field is the binary encoding of the rate
+ * information expressed in 100 bits/sec increments,
+ * starting from 0 x 100 bits/sec until 65535 x 100
+ * bits/sec (6 Mbps).
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_bucket_leak_rate(UINT16 leak_rate,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_bucket_leak_rate",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_BUCKET_LEAK_RATE;
+ index++;
+ DBG_TRACE("Encoding Bucket leak rate IE.");
+
+ bssgp_ie_encode_iei_length(sizeof(UINT16),&msg[index],&index);
+
+ msg[index++] = (UINT8)(leak_rate >> 8);
+ msg[index++] = (UINT8)(leak_rate);
+
+ DBG_TRACE("Bucket leak rate IE length %d bytes",index);
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+
+/*
+ * bssgp_ie_encode_bvc_bucket_size
+ *
+ *----------------------------------------------------------
+ * 11.3.5 BVC Bucket Size
+ * This information element indicates the maximum bucket
+ * size (Bmax) in octets for a BVC.
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Bmax (MSB)
+ * octet 4 Bmax (LSB)
+ *
+ * The Bmax field is the binary encoding of the bucket
+ * size information expressed in 100 octet increments,
+ * starting from 0 x 100 octets until 65535 x 100 octets
+ * (6 Mbytes).
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_bvc_bucket_size(UINT16 bucket_size,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_bvc_bucket_size",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_BVC_BUCKET_SIZE;
+ index++;
+ DBG_TRACE("Encoding BVC Bucket size IE.");
+
+ bssgp_ie_encode_iei_length(sizeof(UINT16),&msg[index],&index);
+
+ msg[index++] = (UINT8)(bucket_size >> 8);
+ msg[index++] = (UINT8)(bucket_size);
+
+ DBG_TRACE("BVC Bucket size IE length %d bytes",index);
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * bssgp_ie_encode_bvci
+ *
+ *----------------------------------------------------------
+ * 11.3.6 BVCI (BSSGP Virtual Connection Identifier)
+ * The BVCI identifies a BVC. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-4 Unstructured value
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_bvci(RIL3_BVCI bvci,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_bvci",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 *shorty;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_BVCI;
+ index++;
+
+ bssgp_ie_encode_iei_length(sizeof(UINT16),&msg[index],&index);
+
+ shorty = (UINT16*)&msg[index];
+ /* now we get shorty ;-) */
+ *shorty = htons(bvci.bvci);
+ memcpy(&msg[index],shorty,sizeof(UINT16));
+ index += 2;
+
+ DBG_TRACE("BVCI %d encoded; IEI length %d bytes",bvci.bvci,index);
+
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+/*
+ * bssgp_ie_encode_bvc_measurement
+ *
+ *----------------------------------------------------------
+ * 11.3.7 BVC Measurement
+ * This information element describes average queuing
+ * delay for a BVC. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3,4 Delay Value (in centi-seconds)
+ *
+ * The Delay Value field is coded as a 16-bit integer
+ * value in units of centi-seconds (one hundredth of a
+ * second). This coding provides a range of over 10 minutes
+ * in increments of 10 msec. As a special case, the
+ * hexadecimal value 0xFFFF (decimal 65535) shall be
+ * interpreted as "infinite delay".
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_bvc_measurement(RIL3_BVC_MEASUREMENT bvc_meas,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_bvc_measurement",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_BVC_MEASUREMENT;
+ index++;
+ DBG_TRACE("Encoding BVC measurement IE.");
+
+ bssgp_ie_encode_iei_length(sizeof(UINT16),&msg[index],&index);
+
+ msg[index++] = (UINT8)(bvc_meas.bvc_meas >> 8);
+ msg[index++] = (UINT8)(bvc_meas.bvc_meas);
+
+ DBG_TRACE("BVC measurement IE length %d bytes",index);
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+
+/*
+ * bssgp_ie_encode_cause
+ *
+ *----------------------------------------------------------
+ * 11.3.8 Cause
+ * The Cause information element indicates the reason for
+ * an exception condition. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Cause value
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_exception_cause(RIL3_BSSGP_CAUSE cause,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_cause",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_CAUSE;
+ index++;
+
+ bssgp_ie_encode_iei_length(sizeof(UINT8),&msg[index],&index);
+
+ byte = &msg[index];
+ *byte = (UINT8)cause.cause;
+ index++;
+
+ DBG_TRACE("Cause value %s encoded; IEI length %d bytes",
+ bssgp_util_get_exception_cause_str((BSSGP_EXCEPTION_CAUSE)cause.cause),
+ index);
+
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+/*
+ * bssgp_ie_encode_cell_id
+ *
+ *----------------------------------------------------------
+ * 11.3.9 Cell Identifier
+ * This information element uniquely identifies one cell.
+ * The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octets 3-8 Octets 3 to 8 contain the value part
+ * (starting with octet 2) of the Routing Area
+ * Identification IE defined in GSM 04.08
+ * [11], not including GSM 04.08 IEI
+ * octets 9-10 Octets 9 and 10 contain the value part
+ * (starting with octet 2) of the Cell
+ * Identity IE defined in GSM 04.08 [11],
+ * not including GSM 04.08 IEI
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_cell_id(RIL3_IE_CELL_IDENTIFIER cell_id,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_cell_id",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0, *shorty, lac;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_CELL_ID;
+ index++;
+
+ bssgp_ie_encode_iei_length(8,&msg[index],&index);
+
+ /*
+ * From 04.08:
+ *
+ * The routing area identification information element is
+ * coded as shown in figure 10.5.130/GSM 04.08 and
+ * table 10.5.148/GSM 04.08.
+ * 8 7 6 5 4 3 2 1
+ * ------------------------------
+ * * MCC digit 2 * MCC digit 1 * octet 2
+ * ------------------------------
+ * * MNC digit 3 * MCC digit 3 * octet 3
+ * ------------------------------
+ * * MNC digit 2 * MNC digit 1 * octet 4
+ * ------------------------------
+ * * LAC * octet 5
+ * ------------------------------
+ * * LAC cont'd * octet 6
+ * ------------------------------
+ * * RAC * octet 7
+ * ------------------------------
+ *
+ *
+ */
+
+ msg[index] = (cell_id.routing_area.mcc[1] << 4) | cell_id.routing_area.mcc[0] ;
+ index++;
+ msg[index] = (cell_id.routing_area.mnc[2] << 4) | cell_id.routing_area.mcc[2];
+ index++;
+ msg[index] = (cell_id.routing_area.mnc[1] << 4) | cell_id.routing_area.mnc[0];
+ index++;
+
+ lac = htons(cell_id.routing_area.lac);
+
+ memcpy(&msg[index],&lac,sizeof(UINT16));
+ index += sizeof(UINT16);
+
+ msg[index] = cell_id.routing_area.rac;
+ index++;
+
+ shorty = (UINT16*)&msg[index];
+ *shorty = (UINT16)htons(cell_id.cell_id.value);
+ index += sizeof(UINT16);
+
+ DBG_TRACE("Cell Identifier :- MCC : %d%d%d ; MNC : %d%d(%x) ; LAC : %d ; RAC : %d\n"
+ "\tCell Identity : %d",
+ cell_id.routing_area.mcc[0],cell_id.routing_area.mcc[1],cell_id.routing_area.mcc[2],
+ cell_id.routing_area.mnc[0],cell_id.routing_area.mnc[1],cell_id.routing_area.mnc[2],
+ cell_id.routing_area.lac,cell_id.routing_area.rac,cell_id.cell_id.value);
+
+ DBG_TRACE("Cell Identifier IE length %d bytes", index);
+
+ *len += index;
+
+
+ DBG_LEAVE();
+ return;
+}
+
+
+/*
+ * bssgp_ie_encode_channel_needed
+ *
+ *----------------------------------------------------------
+ * 11.3.10 Channel needed
+ * This information element is coded as defined in
+ * GSM 09.18. It is relevant to circuit-switched paging
+ * requests. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Rest of element coded as the value part of
+ * the Channel Needed PDU defined in GSM 09.18,
+ * not including GSM 09.18 IEI and GSM 09.18
+ * length indicator
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_channel_needed(UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_channel_needed",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+ /* FIXME */
+
+ DBG_LEAVE();
+ return;
+}
+
+/*
+ * bssgp_ie_encode_drx_params
+ *
+ *----------------------------------------------------------
+ * 11.3.11 DRX Parameters
+ * This information element contains MS specific DRX
+ * information. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-n Rest of element coded as the value part
+ * defined in GSM 04.08, not including GSM
+ * 04.08 IEI and GSM 04.08 octet length
+ * indicator
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_drx_params(T_CNI_RIL3_IE_DRX_PARAMETER drx_params,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_drx_params",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_DRX_PARAMS;
+ index++;
+
+ bssgp_ie_encode_iei_length((sizeof(UINT8)*2),&msg[index],&index);
+
+ /*
+ *
+ * The value part of a DRX parameter information element
+ * is coded as shown in table 10.5.139/GSM 04.08.
+ * ------------------------------
+ * 8 7 6 5 | 4 | 3 2 1
+ * ------------------------------
+ * SPLIT PG CYCLE CODE octet 2
+ * ------------------------------
+ * 0 0 0 0 | SPL| non-DRXtimer octet 3
+ * ------------------------------
+ *
+ */
+
+ byte = &msg[index];
+ *byte = drx_params.split_pg_cycle_code;
+ index++;
+
+
+ byte = &msg[index];
+ if (drx_params.split_on_CCCH) {
+ *byte = 0x80 | drx_params.non_drx_timer;
+ DBG_TRACE("Encoding DRX params :- Split PG cycle code %d ; Split on CCCH ; Non-DRX timer %d",
+ drx_params.split_pg_cycle_code,drx_params.non_drx_timer);
+ }
+ else {
+ *byte = drx_params.non_drx_timer;
+ DBG_TRACE("Encoding DRX params :- Split PG cycle code %d ; Non-DRX timer %d",
+ drx_params.split_pg_cycle_code,drx_params.non_drx_timer);
+ }
+ index++;
+
+ *len += index;
+ DBG_TRACE("DRX Params IEI length %d bytes",index);
+ DBG_LEAVE();
+ return;
+}
+
+/*
+ * bssgp_ie_encode_emlpp_priority
+ *
+ *----------------------------------------------------------
+ * 11.3.12 eMLPP-Priority
+ * This element indicates the eMLPP-Priority of a PDU.
+ * The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Rest of element coded as the value part of
+ * the eMLPP-Priority IE defined in GSM 08.08,
+ * not including GSM 08.08 IEI and GSM 08.08
+ * length indicator
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_emlpp_priority(UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_emlpp_priority",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+ /* FIXME */
+
+ DBG_LEAVE();
+ return;
+}
+
+/*
+ * bssgp_ie_encode_flush_action
+ *
+ *----------------------------------------------------------
+ * 11.3.13 Flush Action
+ * The Flush action information element indicates to the
+ * SGSN the action taken by the BSS in response to the
+ * flush request. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Action value
+ *
+ * Table 11.16: Action coding
+ * Action value semantics of coding
+ *
+ * Hexadecimal
+ *
+ * x00 LLC-PDU(s) deleted
+ * x01 LLC-PDU(s) transferred
+ *
+ * All values not explicitly shown are reserved for
+ * future use
+ *
+ *----------------------------------------------------------
+ */
+void
+bssgp_ie_encode_flush_action(BSSGP_FLUSH_ACTION flush_action,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_flush_action",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_FLUSH_ACTION;
+ index++;
+ DBG_TRACE("Encoding Flush action IE.");
+
+ bssgp_ie_encode_iei_length(sizeof(UINT8),&msg[index],&index);
+
+ msg[index++] = (UINT8) flush_action;
+
+ DBG_TRACE("Flush action IE length %d bytes",index);
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+/*
+ * bssgp_ie_encode_imsi
+ *
+ *----------------------------------------------------------
+ * 11.3.14 IMSI
+ * This information element contains the International
+ * Mobile Subscriber Identity. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator = length of remaining stuff
+ * octet 3-n Octets 3-n contain an IMSI coded as the
+ * value part (starting with octet 3) of the
+ * Mobile Identity IE defined in GSM 04.08,
+ * not including GSM 04.08 IEI and GSM 04.08
+ * length indicator
+ *
+ *----------------------------------------------------------
+ */
+void
+bssgp_ie_encode_imsi(T_CNI_RIL3_IE_MOBILE_ID imsi,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_ie_encode_imsi",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ div_t val;
+ int count;
+ UINT16 index = 0;
+ char disp_buff[128], temp_buff[10];
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_IMSI;
+ index++;
+
+ val = div(imsi.numDigits,2);
+
+ bssgp_ie_encode_iei_length((val.quot+1),&msg[index],&index);
+ /*
+ * Refer to GSM 04.08; the IEI has the following
+ * structure; but this octet would be the first
+ * for us
+ * +-----------------------------------------------*
+ * * *odd/ * *
+ * * Identity digit 1 *even * Type of identity* octet 3
+ * * *indic* *
+ * +-----------------------+-----------------------*
+ */
+
+ byte = &msg[index];
+ if (val.rem) {
+ /* Odd num of digits */
+ *byte = (0x08 | CNI_RIL3_IMSI);
+ }
+ else {
+ /* Even num of digits */
+ *byte = CNI_RIL3_IMSI;
+ }
+ memset(disp_buff,0,128);
+ sprintf(disp_buff,"%d",imsi.digits[0]);
+ /* Now encode the first digit */
+ *byte |= (imsi.digits[0] << 4) ;
+ index++;
+ for(count=1;count<=(imsi.numDigits-2);count=count+2) {
+ byte = &msg[index];
+ *byte = (imsi.digits[count]) | (imsi.digits[count+1] << 4);
+ index++;
+ memset(temp_buff,0,10);
+ sprintf(temp_buff,"%d%d",imsi.digits[count],imsi.digits[count+1]);
+ strcat(disp_buff,temp_buff);
+ }
+ if (count < imsi.numDigits) {
+ /* one digit left over */
+ byte = &msg[index];
+ *byte = imsi.digits[count];
+ memset(temp_buff,0,10);
+ sprintf(temp_buff,"%d",imsi.digits[count]);
+ strcat(disp_buff,temp_buff);
+ index++;
+ }
+
+ *msg_len += index;
+
+ DBG_TRACE("Encoded IMSI : %s; IEI length %d bytes",disp_buff,index);
+
+ DBG_LEAVE();
+ return;
+}
+
+
+/*
+ * bssgp_ie_encode_llc_pdu
+ *
+ *----------------------------------------------------------
+ * 11.3.15 LLC-PDU
+ * This information element contains an LLC-PDU. The
+ * element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 LLC-PDU (first part)
+ * octet n LLC-PDU (last part)
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_llc_pdu(UINT8 *llc_pdu, UINT16 pdu_len, UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_llc_pdu",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+ index++;
+
+ *byte = (UINT8)BSSGP_IEI_LLC_PDU;
+
+ bssgp_ie_encode_iei_length(pdu_len,&msg[index],&index);
+
+
+ memcpy(&msg[index],llc_pdu,pdu_len);
+
+
+ index += pdu_len;
+
+ *len += index;
+
+ DBG_TRACE("Encoded LLC PDU of size %d; IEI length %d",pdu_len,index);
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * bssgp_ie_encode_llc_frames_discarded
+ *
+ *----------------------------------------------------------
+ * 11.3.16 LLC Frames Discarded
+ * This element describes the number of LLC frames that
+ * have been discarded inside a BSS. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Number of frames discarded (in hex)
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_llc_frames_discarded(UINT8 num_frames,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_llc_frames_discarded",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_LLC_FRAMES_DISCARDED;
+ index++;
+ DBG_TRACE("Encoding llc frames discarded IE.");
+
+ bssgp_ie_encode_iei_length(sizeof(UINT8),&msg[index],&index);
+
+ msg[index++] = num_frames;
+
+ DBG_TRACE("llc frames discarded IE length %d bytes",index);
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * bssgp_ie_encode_location_area
+ *
+ *----------------------------------------------------------
+ * 11.3.17 Location Area
+ * This element uniquely identifies one Location Area.
+ * The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octets 3-7 Octets 3 to 7 contain the value part
+ * (starting with octet 2) of the Location Area
+ * Identification IE defined in GSM 04.08 [11],
+ * not including GSM 04.08 IEI
+ *
+ * The coding of octet 2 is a binary number indicating the
+ * Length of the remaining element.
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_location_area(T_CNI_RIL3_IE_LOCATION_AREA_ID location_area,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_location_area",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 lac, index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_LOCATION_AREA;
+ index++;
+
+
+ bssgp_ie_encode_iei_length((3+2+sizeof(UINT16)),&msg[index],&index);
+
+ /*
+ * From 04.08:
+ * The Location Area Identification is a type 3 information element
+ * ith 6 octets length.
+ * 8 7 6 5 4 3 2 1
+ * +-----------------------------------------------*
+ * * * *
+ * * MCC digit 2 * MCC digit 1 * octet 2
+ * +-----------------------+-----------------------*
+ * * * *
+ * * MNC digit 3 * MCC digit 3 * octet 3
+ * +-----------------------+-----------------------*
+ * * * *
+ * * MNC digit 2 * MNC digit 1 * octet 4
+ * +-----------------------------------------------*
+ * * *
+ * * LAC * octet 5
+ * +-----------------------------------------------*
+ * * *
+ * * LAC (continued) * octet 6
+ * +-----------------------------------------------+
+ *
+ */
+
+ msg[index] = (location_area.mcc[1] << 4) | location_area.mcc[0] ;
+ index++;
+ msg[index] = (location_area.mnc[2] << 4) | location_area.mcc[2];
+ index++;
+ msg[index] = (location_area.mnc[1] << 4) | location_area.mnc[0];
+ index++;
+
+ DBG_TRACE("Location Area :- MCC : %d%d%d ; MNC : %d%d(%x) ; LAC : %d",
+ location_area.mcc[0],location_area.mcc[1],location_area.mcc[2],
+ location_area.mnc[0],location_area.mnc[1],location_area.mnc[2],
+ location_area.lac);
+
+ lac = htons(location_area.lac);
+
+ memcpy(&msg[index],&lac,sizeof(UINT16));
+ index += sizeof(UINT16);
+
+ *len += index;
+ DBG_TRACE("Location area IEI length %d bytes",index);
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * bssgp_ie_encode_lsa_identifier_list
+ *
+ *----------------------------------------------------------
+ * 11.3.18 LSA Identifier List
+ * This information element uniquely identifies LSAs. The
+ * element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-? Rest of element coded as in GSM 08.08, not
+ * including GSM 08.08 IEI and GSM 08.08 length
+ * indicator
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_lsa_identifier_list(RIL3_IE_LSA_IDENTIFIER_LIST lsa_id_list,
+ UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_lsa_identifier_list",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+ INT16 num_lsa_ids;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_LSA_ID_LIST;
+ index++;
+ DBG_TRACE("Encoding LSA Identifier List IE\n");
+
+ bssgp_ie_encode_iei_length(lsa_id_list.num_lsa_ids*3 + 1,&msg[index],&index);
+
+ msg[index++] = (UINT8)(lsa_id_list.ep & 0x01);
+
+ num_lsa_ids = lsa_id_list.num_lsa_ids;
+ while (num_lsa_ids)
+ {
+ msg[index++] = (UINT8)(lsa_id_list.lsa_id[lsa_id_list.num_lsa_ids-num_lsa_ids] >> 16);
+ msg[index++] = (UINT8)(lsa_id_list.lsa_id[lsa_id_list.num_lsa_ids-num_lsa_ids] >> 8);
+ msg[index++] = (UINT8)(lsa_id_list.lsa_id[lsa_id_list.num_lsa_ids-num_lsa_ids]);
+ num_lsa_ids--;
+ }
+
+ DBG_TRACE("LSA Identifier IE length %d bytes",index);
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * bssgp_ie_encode_lsa_info
+ *
+ *----------------------------------------------------------
+ * 11.3.19 LSA Information
+ * This information element uniquely identifies LSAs, the
+ * priority of each LSA and the access right outside these
+ * LSAs. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-? Rest of element coded as in GSM 08.08, not
+ * including GSM 08.08 IEI and GSM 08.08
+ * length indicator
+ *
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_lsa_info(RIL3_IE_LSA_INFORMATION lsa_info,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_lsa_info",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+ INT16 num_lsas;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_LSA_INFORMATION;
+ index++;
+ DBG_TRACE("Encoding LSA Information IE\n");
+
+ bssgp_ie_encode_iei_length(lsa_info.num_lsas*4 + 1,&msg[index],&index);
+
+ msg[index++] = (UINT8)(lsa_info.lsa_only & 0x01);
+
+ num_lsas = lsa_info.num_lsas;
+ while (num_lsas)
+ {
+ msg[index++] = (lsa_info.lsa_ids[lsa_info.num_lsas-num_lsas].act << 5) |
+ (lsa_info.lsa_ids[lsa_info.num_lsas-num_lsas].pref << 4) |
+ (lsa_info.lsa_ids[lsa_info.num_lsas-num_lsas].priority);
+ msg[index++] = (UINT8)(lsa_info.lsa_ids[lsa_info.num_lsas-num_lsas].lsa_id >> 16);
+ msg[index++] = (UINT8)(lsa_info.lsa_ids[lsa_info.num_lsas-num_lsas].lsa_id >> 8);
+ msg[index++] = (UINT8)(lsa_info.lsa_ids[lsa_info.num_lsas-num_lsas].lsa_id);
+ num_lsas--;
+ }
+
+ DBG_TRACE("LSA Information IE length %d bytes",index);
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+
+/*
+ * bssgp_ie_encode_mobile_id
+ *
+ *----------------------------------------------------------
+ * 11.3.20 Mobile Id
+ * The element coding is:
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-n Octets 3-n contain either the IMSI, IMEISV
+ * or IMEI coded as the value part (starting
+ * with octet 3) of the Mobile Identity IE
+ * defined in GSM 04.08, not including GSM
+ * 04.08 IEI and GSM 04.08 length indcator
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_mobile_id(UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_mobile_id",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+ /* FIXME */
+
+ DBG_LEAVE();
+ return;
+}
+
+
+/*
+ * bssgp_ie_encode_ms_bucket_size
+ *
+ *----------------------------------------------------------
+ * 11.3.21 MS Bucket Size
+ * This information element indicates an MS's bucket size
+ * (Bmax). The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-4 Bmax
+ *
+ * The Bmax field is coded as in section GSM 08.18 BVC Bucket
+ * Size/Bmax.
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_ms_bucket_size(UINT16 bucket_size,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_ms_bucket_size",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_MS_BUCKET_SIZE;
+ index++;
+ DBG_TRACE("Encoding MS Bucket size IE.");
+
+ bssgp_ie_encode_iei_length(sizeof(UINT16),&msg[index],&index);
+
+ msg[index++] = (UINT8)(bucket_size >> 8);
+ msg[index++] = (UINT8)(bucket_size);
+
+ DBG_TRACE("MS Bucket size IE length %d bytes",index);
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+
+/*
+ * bssgp_ie_encode_ms_ra_cap
+ *
+ *----------------------------------------------------------
+ * 11.3.22 MS Radio Access Capability
+ * This information element contains the capabilities of
+ * the ME. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-14 Rest of element coded as the value part
+ * defined in GSM 04.08, not including GSM
+ * 04.08 IEI and GSM 04.08 octet length
+ * indicator.
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_ms_ra_cap(T_CNI_RIL3_IE_MS_RADIO_ACCESS_CAPABILITY ra_cap,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_ms_ra_cap",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0,count;
+
+ byte = &msg[index];
+ index++;
+
+ *byte = (UINT8)BSSGP_IEI_MS_RADIO_ACCESS_CAP;
+
+
+ bssgp_ie_encode_iei_length(((ra_cap.number_of_ra_capabilities*6*sizeof(UINT8))+sizeof(UINT8)),&msg[index],&index);
+
+
+ /*
+ * Although the spec 04.08 is pretty clear about the IE
+ * encoding, the encoding specified is quite messy &
+ * since we would be more or less dealing with ourselves,
+ * (read proprietary..snigger..) it is well worth it to
+ * rearrange the elements to pack it nicely... DSN.
+ * So packing would be as follows:-
+ *
+ * |---------------------------------------------------------------|
+ * | Number of Radio Access Capabilities | octet 1
+ * |---------------------------------------------------------------|
+ *
+ * After this, depending on above value there would be 5 octets per
+ * radio access capability packed as follows
+ *
+ * |---------------------------------------------------------------|
+ * | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
+ * |---------------------------------------------------------------|
+ * | Access Tech Type | RF Power Capabilities | octet n
+ * |---------------------------------------------------------------|
+ * | resvd | A5 Algorithms supported from 7 to 1 | octet n+1
+ * |---------------------------------------------------------------|
+ * | reserved | es | ps | vgcs | vbs | res | octet n+2
+ * |---------------------------------------------------------------|
+ * | pres | reserved | hscd multi-slot class | octet n+3
+ * |---------------------------------------------------------------|
+ * | pres | gprs multi-slot class | ExCap | pres | octet n+4
+ * |---------------------------------------------------------------|
+ * | switch measure switch value | switch measure value | octet n+5
+ * |---------------------------------------------------------------|
+ *
+ */
+
+ byte = &msg[index];
+ index++;
+ *byte = ra_cap.number_of_ra_capabilities;
+
+ DBG_TRACE("Encoding %d number of Radio Access Capabilities",ra_cap.number_of_ra_capabilities);
+
+ for(count=0;count<ra_cap.number_of_ra_capabilities;count++) {
+ byte = &msg[index];
+ index++;
+ *byte = ra_cap.ms_ra_capability[count].rf_power_capability;
+ *byte |= (ra_cap.ms_ra_capability[count].access_technology_type << 4);
+ DBG_TRACE("Access Technology Type : %d, RF Power Capability %d",
+ ra_cap.ms_ra_capability[count].access_technology_type,
+ ra_cap.ms_ra_capability[count].rf_power_capability);
+
+ byte = &msg[index];
+ index++;
+ *byte = 0;
+ if (ra_cap.ms_ra_capability[count].a5_1_algorithm) {
+ *byte |= 0x01;
+ DBG_TRACE("Supports A5.1 algorithm");
+ }
+ if (ra_cap.ms_ra_capability[count].a5_2_algorithm) {
+ *byte |= 0x02;
+ DBG_TRACE("Supports A5.2 algorithm");
+ }
+ if (ra_cap.ms_ra_capability[count].a5_3_algorithm) {
+ *byte |= 0x04;
+ DBG_TRACE("Supports A5.3 algorithm");
+ }
+ if (ra_cap.ms_ra_capability[count].a5_4_algorithm) {
+ *byte |= 0x08;
+ DBG_TRACE("Supports A5.4 algorithm");
+ }
+ if (ra_cap.ms_ra_capability[count].a5_5_algorithm) {
+ *byte |= 0x10;
+ DBG_TRACE("Supports A5.5 algorithm");
+ }
+ if (ra_cap.ms_ra_capability[count].a5_6_algorithm) {
+ *byte |= 0x20;
+ DBG_TRACE("Supports A5.6 algorithm");
+ }
+ if (ra_cap.ms_ra_capability[count].a5_7_algorithm) {
+ *byte |= 0x40;
+ DBG_TRACE("Supports A5.7 algorithm");
+ }
+
+ byte = &msg[index];
+ index++;
+ *byte = 0;
+ if (ra_cap.ms_ra_capability[count].es_ind) {
+ *byte |= 0x10;
+ DBG_TRACE("ES Indicator");
+ }
+ if (ra_cap.ms_ra_capability[count].ps) {
+ *byte |= 0x08;
+ DBG_TRACE("PS");
+ }
+ if (ra_cap.ms_ra_capability[count].vgcs) {
+ *byte |= 0x04;
+ DBG_TRACE("VGCS");
+ }
+ if (ra_cap.ms_ra_capability[count].vbs) {
+ *byte |= 0x02;
+ DBG_TRACE("VBS");
+ }
+
+ byte = &msg[index];
+ index++;
+ *byte = ra_cap.ms_ra_capability[count].multislot_capability.hscsd_multi_slot_class;
+ *byte |= (ra_cap.ms_ra_capability[count].multislot_capability.hscsd_param_present << 7);
+ if (ra_cap.ms_ra_capability[count].multislot_capability.hscsd_param_present)
+ DBG_TRACE("HSCSD Multi slot class %d",ra_cap.ms_ra_capability[count].multislot_capability.hscsd_multi_slot_class);
+ else
+ DBG_TRACE("HSCSD Multi slot class not present");
+
+ byte = &msg[index];
+ index++;
+ *byte = (ra_cap.ms_ra_capability[count].multislot_capability.gprs_multi_slot_class << 2);
+ *byte |= (ra_cap.ms_ra_capability[count].multislot_capability.gprs_params_present << 7);
+ *byte |= (ra_cap.ms_ra_capability[count].multislot_capability.gprs_dynamic_allocation_capability << 1);
+ *byte |= (ra_cap.ms_ra_capability[count].multislot_capability.sms_params_present);
+ if (ra_cap.ms_ra_capability[count].multislot_capability.gprs_params_present)
+ {
+ DBG_TRACE("GPRS Multi slot class %d",ra_cap.ms_ra_capability[count].multislot_capability.gprs_multi_slot_class);
+ DBG_TRACE("GPRS Ext dynamic allocation cap %d",ra_cap.ms_ra_capability[count].multislot_capability.gprs_dynamic_allocation_capability);
+ }
+ else
+ DBG_TRACE("GPRS Multi slot class not present");
+
+ byte = &msg[index];
+ index++;
+ *byte = ra_cap.ms_ra_capability[count].multislot_capability.switch_measure_value;
+ *byte |= (ra_cap.ms_ra_capability[count].multislot_capability.switch_measure_switch_value << 4);
+ if (ra_cap.ms_ra_capability[count].multislot_capability.sms_params_present)
+ DBG_TRACE("Switch measure value %d, Switch measure switch value %d",
+ ra_cap.ms_ra_capability[count].multislot_capability.switch_measure_value,
+ ra_cap.ms_ra_capability[count].multislot_capability.switch_measure_switch_value);
+ else
+ DBG_TRACE("Switch measure not present");
+ }
+
+ *len += index;
+
+ DBG_TRACE("MS-Radio-Access-Capability IEI length %d bytes",index);
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * bssgp_ie_encode_omc_id
+ *
+ *----------------------------------------------------------
+ * 11.3.23 OMC Id
+ * The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-22 For the OMC identity, see TS 12.20
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_omc_id(UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_omc_id",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ /* FIXME */
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * bssgp_ie_encode_pdu_in_error
+ *
+ *----------------------------------------------------------
+ * 11.3.24 PDU In Error
+ * The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-? Erroneous BSSGP PDU
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_pdu_in_error(BSSGP_PDU_TYPE pdu_type,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_pdu_in_error",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ /* FIXME : TODO */
+ DBG_LEAVE();
+ return;
+}
+
+
+/*
+ * bssgp_ie_encode_pdu_lifetime
+ *
+ *----------------------------------------------------------
+ * 11.3.25 PDU Lifetime
+ * This information element describes the PDU Lifetime
+ * for a PDU inside the BSS. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-4 Delay Value
+ *
+ * The Delay Value field is coded as in section GSM 08.18
+ * BVC Measurement/Delay Value.
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_pdu_lifetime(RIL3_IE_PDU_LIFETIME pdu_lifetime, UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_pdu_lifetime",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_PDU_LIFETIME;
+ index++;
+ DBG_TRACE("Encoding PDU Lifetime IE %#x\n", pdu_lifetime.pdu_lifetime);
+
+ bssgp_ie_encode_iei_length(sizeof(UINT16),&msg[index],&index);
+
+ msg[index++] = (UINT8)(pdu_lifetime.pdu_lifetime >> 8);
+ msg[index++] = (UINT8)(pdu_lifetime.pdu_lifetime);
+
+ DBG_TRACE("PDU Lifetime IEI length %d bytes",index);
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * bssgp_ie_encode_priority
+ *
+ *----------------------------------------------------------
+ * 11.3.27 Priority
+ * This element indicates the priority of a PDU. The
+ * element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Rest of element coded as the value part of
+ * the Priority IE defined in GSM 08.08, not
+ * including GSM 08.08 IEI and GSM 08.08
+ * length indicator
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_priority(RIL3_IE_PRIORITY priority,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_priority",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_PRIORITY;
+ index++;
+ DBG_TRACE("Encoding Priority IE %#x\n", priority.priority);
+
+ bssgp_ie_encode_iei_length(sizeof(UINT8),&msg[index],&index);
+
+ msg[index++] = priority.priority;
+
+ DBG_TRACE("Priority IEI length %d bytes",index);
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+
+/*
+ * bssgp_ie_encode_qos_params
+ *
+ *----------------------------------------------------------
+ * QoS Params (Cisco-EWTBU proprietary ext)
+ * This information element describes the QoS Params
+ * associated with a PDU. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Delay Class
+ * octet 4 Reliability Class
+ * octet 5 Precedence Class
+ * octet 6 Peak Throughput
+ * octet 7 Mean Throughput
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_qos_params(T_CNI_RIL3_IE_QOS qos_params, UINT8 *msg, UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_qos_params",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_QOS_PARAMS;
+ index++;
+
+
+ bssgp_ie_encode_iei_length((sizeof(UINT8)*5),&msg[index],&index);
+ /* Delay Class */
+ byte = &msg[index];
+ *byte = (UINT8)qos_params.delay_class;
+ index++;
+ /* Reliability class */
+ byte = &msg[index];
+ *byte = (UINT8)qos_params.reliability_class;
+ index++;
+ /* Precedence class */
+ byte = &msg[index];
+ *byte = (UINT8)qos_params.precedence_class;
+ index++;
+ /* Peak throughput */
+ byte = &msg[index];
+ *byte = (UINT8)qos_params.peak_throughput;
+ index++;
+ /* Mean throughput */
+ byte = &msg[index];
+ *byte = (UINT8)qos_params.mean_throughput;
+ index++;
+
+ DBG_TRACE("Encoded QoS params; Delay %d, Reliability %d, Precedence %d, Peak throughput %d & Mean throughput %d",
+ qos_params.delay_class,qos_params.reliability_class,qos_params.precedence_class,
+ qos_params.peak_throughput,qos_params.mean_throughput);
+ *len += index;
+ DBG_LEAVE();
+ return;
+}
+
+
+/*
+ * bssgp_ie_encode_qos_profile
+ *
+ *----------------------------------------------------------
+ * 11.3.28 QoS Profile
+ * This information element describes the QoS Profile
+ * associated with a PDU. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-4 Peak bit rate provided by the network,
+ * coded as the value part in Bucket Leak
+ * Rate/R IE/ GSM 08.18 a)
+ * octet 5 SPARE C/R T A Precedence
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_qos_profile(T_RIL3_IE_QOS_PROFILE_ID qos_profile,UINT8 *msg,UINT16 *len, BSSGP_IEI_FORMAT format)
+{
+ DBG_FUNC("bssgp_ie_encode_qos_profile",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ DBG_TRACE("Encoding QoS Profile");
+
+ if (format == BSSGP_FORMAT_TLV)
+ {
+ *byte = (UINT8)BSSGP_IEI_QOS_PROFILE;
+ index++;
+
+ bssgp_ie_encode_iei_length((sizeof(UINT16)+sizeof(UINT8)),&msg[index],&index);
+ }
+
+ msg[index] = qos_profile.bucket_leak_rate[0];
+ index++;
+ msg[index] = qos_profile.bucket_leak_rate[1];
+ index++;
+
+ byte = &msg[index];
+ *byte = qos_profile.precedence_class;
+ if (qos_profile.a_bit) {
+ *byte |= 0x08;
+ DBG_TRACE("Radio interface uses RLC/MAC-UNITDATA functionality");
+ }
+ else {
+ DBG_TRACE("Radio interface uses RLC/MAC ARQ functionality");
+ }
+
+ if (qos_profile.t_bit) {
+ *byte |= 0x10;
+ DBG_TRACE("SDU contains Data");
+ }
+ else {
+ DBG_TRACE("SDU contains Signalling (e.g. related to GMM)");
+ }
+
+ if (qos_profile.cr_bit) {
+ *byte |= 0x20;
+ DBG_TRACE("SDU does NOT contain a LLC ACK or SACK command/response frame type");
+ }
+ else {
+ DBG_TRACE("SDU contains LLC ACK or SACK command/response frame type");
+ }
+ index++;
+ *len += index;
+ DBG_TRACE("QoS Profile IEI length %d bytes",index);
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * bssgp_ie_encode_radio_cause
+ *
+ *----------------------------------------------------------
+ * 11.3.29 Radio Cause
+ * This information element indicates the reason for an
+ * exception condition on the radio interface. The element
+ * coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Radio Cause value
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_radio_cause(T_RIL3_IE_RADIO_CAUSE_ID radio_cause,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_radio_cause",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_RADIO_CAUSE;
+ index++;
+ DBG_TRACE("Encoding Radio cause : %s",
+ bssgp_util_get_radio_cause_str(radio_cause));
+
+ bssgp_ie_encode_iei_length(sizeof(UINT8),&msg[index],&index);
+
+ byte = &msg[index];
+ *byte = (UINT8)radio_cause;
+ index++;
+
+ DBG_TRACE("Radio Cause IEI length %d bytes",index);
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+
+/*
+ * bssgp_ie_encode_ra_cap_update_cause
+ *
+ *----------------------------------------------------------
+ * 11.3.30 RA-Cap-UPD-Cause
+ * The RA-Cap-UPD-Cause indicates the success of the
+ * RA-CAPABILITY-UPDATE procedure or the reason of the
+ * failure. The element coding is:
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 RA-Cap-UPD Cause value
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_ra_cap_update_cause(RA_CAP_UPD_CAUSE ra_cause,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_ra_cap_update_cause",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_RA_CAP_UPD_CAUSE;
+ index++;
+ DBG_TRACE("Encoding Radio-Access-Capability-Update-Cause : %s",
+ bssgp_util_get_ra_cap_cause_str(ra_cause));
+
+ bssgp_ie_encode_iei_length(sizeof(UINT8),&msg[index],&index);
+
+ byte = &msg[index];
+ *byte = (UINT8)ra_cause;
+ index++;
+
+ DBG_TRACE("Radio-Access-Capability-Update-Cause IEI length %d bytes",index);
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * bssgp_ie_encode_reject_cause
+ *
+ *----------------------------------------------------------
+ * Reject Cause (Cisco-EWTBU proprietary ext)
+ * This information element describes the reject cause
+ * for a Location Update Nack
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Reject cause
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_reject_cause(T_CNI_RIL3_IE_REJECT_CAUSE reject_cause, UINT8 *msg, UINT16 *len)
+{
+ DBG_FUNC("",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+ index++;
+
+ *byte = (UINT8)BSSGP_IEI_LA_REJECT_CAUSE;
+
+ bssgp_ie_encode_iei_length(sizeof(UINT8),&msg[index],&index);
+
+ byte = &msg[index];
+ index++;
+
+ *byte = (UINT8) reject_cause.causeValue;
+ DBG_TRACE("Encoded Location Area Reject cause %d; IEI length %d",reject_cause.causeValue,index);
+ *len += index;
+
+ DBG_LEAVE();
+}
+
+
+
+/*
+ * bssgp_ie_encode_routing_area
+ *
+ *----------------------------------------------------------
+ * 11.3.31 Routeing Area
+ * This element uniquely identifies one routeing area. The
+ * element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octets 3-8 Octets 3 to 8 contain the value part
+ * (starting with octet 2) of the Routing Area
+ * Identification IE defined in GSM 04.08 [11],
+ * not including GSM 04.08 IEI
+ *
+ * The coding of octet 2 is a binary number indicating the
+ * Length of the remaining element.
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_routing_area(T_CNI_RIL3_IE_ROUTING_AREA_ID routing_area,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_routing_area",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 lac, index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_ROUTING_AREA;
+ index++;
+
+ bssgp_ie_encode_iei_length((3+2+sizeof(UINT16)),&msg[index],&index);
+
+ /*
+ * From 04.08:
+ *
+ * The routing area identification information element is
+ * coded as shown in figure 10.5.130/GSM 04.08 and
+ * table 10.5.148/GSM 04.08.
+ * 8 7 6 5 4 3 2 1
+ * ------------------------------
+ * * MCC digit 2 * MCC digit 1 * octet 2
+ * ------------------------------
+ * * MNC digit 3 * MCC digit 3 * octet 3
+ * ------------------------------
+ * * MNC digit 2 * MNC digit 1 * octet 4
+ * ------------------------------
+ * * LAC * octet 5
+ * ------------------------------
+ * * LAC cont'd * octet 6
+ * ------------------------------
+ * * RAC * octet 7
+ * ------------------------------
+ *
+ *
+ */
+
+ msg[index] = (routing_area.mcc[1] << 4) | routing_area.mcc[0] ;
+ index++;
+ msg[index] = (routing_area.mnc[2] << 4) | routing_area.mcc[2];
+ index++;
+ msg[index] = (routing_area.mnc[1] << 4) | routing_area.mnc[0];
+ index++;
+
+ DBG_TRACE("Routing Area :- MCC : %d%d%d ; MNC : %d%d(%x) ; LAC : %d ; RAC : %d",
+ routing_area.mcc[0],routing_area.mcc[1],routing_area.mcc[2],
+ routing_area.mnc[0],routing_area.mnc[1],routing_area.mnc[2],
+ routing_area.lac,routing_area.rac);
+
+ lac = htons(routing_area.lac);
+
+ memcpy(&msg[index],&lac,sizeof(UINT16));
+ index += sizeof(UINT16);
+
+ msg[index] = routing_area.rac;
+ index++;
+
+ *len += index;
+ DBG_TRACE("Routing Area IEI length %d bytes",index);
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * bssgp_ie_encode_r_def_ms
+ *
+ *----------------------------------------------------------
+ * 11.3.32 R_default_MS
+ * This information element indicates the default bucket
+ * leak rate (R) to be applied to a flow control bucket
+ * for an MS. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-4 R_default_MS value
+ *
+ * The R_default_MS field is coded as in section GSM 08.18
+ * Bucket Leak Rate /R Value.
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_r_def_ms(UINT16 r_default,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_r_def_ms",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_R_DEFAULT_MS;
+ index++;
+ DBG_TRACE("Encoding R_default_MS IE.");
+
+ bssgp_ie_encode_iei_length(sizeof(UINT16),&msg[index],&index);
+
+ msg[index++] = (UINT8)(r_default >> 8);
+ msg[index++] = (UINT8)(r_default);
+
+ DBG_TRACE("R_default_MS IE length %d bytes",index);
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+/*
+ * bssgp_ie_encode_suspend_ref_num
+ *
+ *----------------------------------------------------------
+ * 11.3.33 Suspend Reference Number
+ * The Suspend Reference Number information element
+ * contains an un-formatted reference number for each
+ * suspend/resume transaction. The element coding is:
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Suspend Reference Number
+ *
+ * The Suspend Reference Number is an un-formatted 8 bit
+ * field.
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_suspend_ref_num(UINT8 suspend_ref_num,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_suspend_ref_num",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_SUSPEND_REF_NUM;
+ index++;
+
+ bssgp_ie_encode_iei_length(sizeof(UINT8),&msg[index],&index);
+ byte = &msg[index];
+
+ *byte = suspend_ref_num;
+ index++;
+
+ DBG_TRACE("Encoded Suspend Reference Number as %d; IEI length %d bytes",suspend_ref_num,index);
+
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * bssgp_ie_encode_tag
+ *
+ *----------------------------------------------------------
+ * 11.3.34 Tag
+ * This information element is used to correlate request
+ * and response PDUs. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 Unstructured value
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_tag(UINT8 tag,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_tag",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_TAG;
+ index++;
+
+ bssgp_ie_encode_iei_length(sizeof(UINT8),&msg[index],&index);
+ byte = &msg[index];
+
+ *byte = tag;
+ index++;
+
+ DBG_TRACE("Encoded tag as %d; IEI length %d bytes",tag,index);
+
+ *len += index;
+ DBG_LEAVE();
+ return;
+}
+
+/*
+ * bssgp_ie_encode_tlli
+ *
+ *----------------------------------------------------------
+ * 11.3.35 Temporary logical link Identity (TLLI)
+ * The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-6 Rest of element coded as the value part of
+ * the TLLI information element in GSM 04.08,
+ * not including GSM 04.08 IEI.
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_tlli(RIL3_TLLI tlli,UINT8 *msg,UINT16 *len, BSSGP_IEI_FORMAT format)
+{
+ DBG_FUNC("bssgp_ie_encode_tlli",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;UINT32 *shorty;
+
+ byte = &msg[index];
+
+ if (format == BSSGP_FORMAT_TLV)
+ {
+ *byte = (UINT8)BSSGP_IEI_TLLI;
+ index++;
+
+
+ bssgp_ie_encode_iei_length(sizeof(TLLI),&msg[index],&index);
+ }
+
+ shorty = (UINT32*)&msg[index];
+ /* now we get shorty ;-) */
+ *shorty = htonl(tlli.tlli);
+ index += sizeof(UINT32);
+
+ *len += index;
+ tlli.ie_present = TRUE;
+
+ DBG_TRACE("Encoded TLLI %#x IEI length %d bytes",tlli.tlli,index);
+ DBG_LEAVE();
+ return;
+}
+
+
+/*
+ * bssgp_ie_encode_tmsi
+ *
+ *----------------------------------------------------------
+ * 11.3.36 Temporary Mobile Subscriber Identity (TMSI)
+ * The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-6 Rest of element coded as the value part of
+ * the TMSI/P-TMSI information element in
+ * GSM 04.08, not including GSM 04.08 IEI.
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_tmsi(T_CNI_RIL3_IE_MOBILE_ID tmsi,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_tmsi",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+
+ UINT8 *byte;
+ unsigned long tmsi_val;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_TMSI;
+ index++;
+
+
+ bssgp_ie_encode_iei_length(sizeof(unsigned long),&msg[index],&index);
+
+ /*
+ * Refer to GSM 04.08; the IEI has the following
+ * structure
+ * 8 7 6 5 4 3 2 1
+ * +-----------------------------------------------+
+ * * TMSI/P-TMSI value * octet 2
+ * +-----------------------------------------------*
+ * * * octet 3
+ * * TMSI/P-TMSI value (contd) *
+ * +-----------------------------------------------*
+ * * * octet 4
+ * * TMSI/P-TMSI value (contd *
+ *+-----------------------------------------------*
+ * * * octet 5
+ * * TMSI/P-TMSI value (contd) *
+ * +-----------------------------------------------+
+ *
+ */
+
+ byte = &msg[index];
+
+ tmsi_val = htonl(tmsi.tmsi);
+
+
+ memcpy(byte,&tmsi_val,sizeof(unsigned long));
+ index += sizeof(unsigned long);
+
+ *len += index;
+ DBG_TRACE("Encoded TMSI : %ld; IEI length %d bytes",tmsi.tmsi,index);
+
+ DBG_LEAVE();
+ return;
+}
+
+/*
+ * bssgp_ie_encode_trace_ref
+ *
+ *----------------------------------------------------------
+ * 11.3.37 Trace Reference
+ * This element provides a trace reference number allocated
+ * by the triggering entity. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-4 Trace Reference
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_trace_ref(UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_trace_ref",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ DBG_LEAVE();
+ return;
+}
+
+
+/*
+ * bssgp_ie_encode_trace_type
+ *
+ *----------------------------------------------------------
+ * 11.3.38 Trace Type
+ * This element provides the type of trace information to
+ * be recorded. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3 This is coded as specified in Technical
+ * Specification GSM 12.08.
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_trace_type(UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_trace_type",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ DBG_LEAVE();
+ return;
+}
+
+/*
+ * bssgp_ie_encode_txn_id
+ *
+ *----------------------------------------------------------
+ * 11.3.39 TransactionId
+ * This element indicates a particular transaction within
+ * a trace. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-4 Transaction Id
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_txn_id(UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ DBG_LEAVE();
+ return;
+}
+
+
+/*
+ * bssgp_ie_encode_trigger_id
+ *
+ *----------------------------------------------------------
+ * 11.3.40 Trigger Id
+ * This element provides the identity of the entity which
+ * initiated the trace. The element coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-22 Entity Identity ( typically an OMC identity)
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_trigger_id(UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_trigger_id",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ DBG_LEAVE();
+ return;
+}
+
+/*
+ * bssgp_ie_encode_num_octets_affected
+ *
+ *----------------------------------------------------------
+ * 11.3.41 Number of octets affected
+ * This information element indicates, for an MS, the num
+ * of octets transferred or deleted by BSS. The element
+ * coding is:
+ *
+ * octet 1 IEI
+ * octet 2,2a Length Indicator
+ * octet 3-5 number of octets transferred or deleted
+ *
+ * The number of octets transferred or deleted by the BSS
+ * may be higher than the maximum Bmax value (6553500).
+ * SGSN shall handle any value higher than 6553500 as the
+ * value 6553500.
+ *
+ *----------------------------------------------------------
+ * */
+void
+bssgp_ie_encode_num_octets_affected(UINT32 num_octets,UINT8 *msg,UINT16 *len)
+{
+ DBG_FUNC("bssgp_ie_encode_num_octets_affected",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte;
+ UINT16 index = 0;
+
+ byte = &msg[index];
+
+ *byte = (UINT8)BSSGP_IEI_NUM_OCTETS_AFFECTED;
+ index++;
+ DBG_TRACE("Encoding Number of octets affected IE.");
+
+ bssgp_ie_encode_iei_length(3,&msg[index],&index);
+
+ msg[index++] = (UINT8)(num_octets >> 16);
+ msg[index++] = (UINT8)(num_octets >> 8);
+ msg[index++] = (UINT8)(num_octets);
+
+ DBG_TRACE("Number of octets affected IE length %d bytes",index);
+ *len += index;
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+
+
+
+/*
+ * bssgp_ie_encode_iei_length
+ *
+ *----------------------------------------------------------
+ * The length indicator shall be included in all
+ * information elements having the TLV format.
+ * Information elements may be variable in length.
+ * The length indicator is one or two octet long, the
+ * second octet may be absent. This field consists of the
+ * field extension bit, 0/1 ext, and the length of the value
+ * field which follows, expressed in octets. The field
+ * extension bit enables extension of the length indicator
+ * to two octets.
+ * Bit 8 of the first octet is reserved for the field
+ * extension bit. If the field extension bit is set to 0
+ * (zero), then the second octet of the length indicator is
+ * present. If the field extension bit is set to 1 (one),
+ * then the first octet is the final octet of the length
+ * indicator.
+ * The length of the value field of the IE occupies the rest
+ * of the bits in the length indicator.
+ *
+ * 8 7 6 5 4 3 2 1
+ * octet 2 0/1 ext length
+ * octet 2a length
+ *
+ * Figure 10/GSM 08.16: Length indicator structure
+ * The BSS or SGSN shall not consider the presence of octet
+ * 2a in a received IE as an error when the IE is short
+ * enough for the length to be coded in octet 2 only.
+ *
+ *----------------------------------------------------------
+ *
+ */
+void
+bssgp_ie_encode_iei_length(int iei_len,UINT8 *msg,UINT16 *msg_len)
+{
+ DBG_FUNC("bssgp_ie_encode_iei_length",BSSGP_ENCODER_LAYER);
+ DBG_ENTER();
+
+ UINT8 *byte = msg, byte_len=0;
+
+ if (iei_len < 128) {
+ byte_len = iei_len;
+ *byte = (0x80 | byte_len);
+ *msg_len += 1;
+ }
+ else {
+ div_t val;
+ val = div(iei_len,128);
+ byte_len = val.rem;
+ *byte = (0x7f & byte_len);
+ *msg_len += 1;
+ byte = &msg[1];
+ *byte = val.quot;
+ *msg_len += 1;
+ }
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
diff --git a/data/mnet/Common/bssgp/src/bssgp_net.cpp b/data/mnet/Common/bssgp/src/bssgp_net.cpp
new file mode 100644
index 0000000..447d63b
--- /dev/null
+++ b/data/mnet/Common/bssgp/src/bssgp_net.cpp
@@ -0,0 +1,442 @@
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : bssgp_net.cpp *
+ * *
+ * Description : Network handling functions for the BSS-GP layer module *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |10/10/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include "bssgp/bssgp_prot.h"
+#include "bssgp/bssgp_util.h"
+#include "bssgp/bssgp_api.h"
+#include "bssgp/bssgp_net.h"
+#include "bssgp/bssgp_decoder.h"
+
+#if (defined(MNET_GS) || defined(MNET_GP10))
+#include "os/JCTask.h"
+extern JCTask *g_bssgp_net_task;
+#endif
+
+
+extern BSSGP_NET_CONFIG bssgp_net_config;
+
+
+/*
+ * bssgp_net_initialize
+ */
+BOOL
+bssgp_net_initialize()
+{
+ DBG_FUNC("bssgp_net_initialize",BSSGP_NET_LAYER);
+ DBG_ENTER();
+ BOOL status = FALSE;
+ int count, ret_status, reverse_count;
+ struct sockaddr_in local_addr;
+
+ memset(&bssgp_net_config,0,sizeof(BSSGP_NET_CONFIG));
+
+ /* We need to get this from the MIB */
+ bssgp_net_config.base_port = 24240;
+
+ for(count=0;count<BSSGP_MAX_NETWORK_QOS_LEVELS;count++) {
+ bssgp_net_config.ports[count] = bssgp_net_config.base_port + count;
+ }
+
+ for(count=0;count<BSSGP_MAX_NETWORK_QOS_LEVELS;count++) {
+ bssgp_net_config.socks[count] = socket(AF_INET,SOCK_DGRAM,0);
+ if (bssgp_net_config.socks[count] == ERROR) {
+ DBG_ERROR("Unable to create socket # %d for BSSGP; error %d\n",count,errno);
+ for(reverse_count=count-1;reverse_count>=0;reverse_count--) {
+#ifdef WIN32
+ closesocket(bssgp_net_config.socks[reverse_count]);
+#elif defined(__VXWORKS__)
+ close(bssgp_net_config.socks[reverse_count]);
+#endif
+ }
+ DBG_LEAVE();
+ return (status);
+ }
+ /* now bind it to the specified port */
+ memset(&local_addr,0,sizeof(local_addr));
+ local_addr.sin_family = AF_INET;
+ local_addr.sin_port = htons(bssgp_net_config.ports[count]);
+#ifdef WIN32
+ local_addr.sin_addr.S_un.S_addr = INADDR_ANY;
+#elif defined(__VXWORKS__)
+ local_addr.sin_addr.s_addr = INADDR_ANY;
+#endif
+ ret_status = bind(bssgp_net_config.socks[count],(struct sockaddr *)&local_addr,sizeof(local_addr));
+ if (ret_status == ERROR) {
+ DBG_ERROR("Unable to bind socket # %d=%d to port %d; error %d\n",
+ bssgp_net_config.socks[count],count,bssgp_net_config.ports[count],errno);
+ for(reverse_count=count;reverse_count>=0;reverse_count--) {
+#ifdef WIN32
+ closesocket(bssgp_net_config.socks[reverse_count]);
+#elif defined(__VXWORKS__)
+ close(bssgp_net_config.socks[reverse_count]);
+#endif
+ }
+ DBG_LEAVE();
+ return (status);
+ }
+ }
+
+ if (bssgp_net_init_bvcis()) {
+ status = TRUE;
+ DBG_TRACE("Network initialized for BSSGP successfully\n");
+ bssgp_net_config.init_magic = BSSGP_MAGIC;
+ bssgp_net_config.continue_processing = TRUE;
+ }
+ else {
+ DBG_ERROR("Unable to initialize BVCIs for BSSGP!\n");
+ for(reverse_count=BSSGP_MAX_NETWORK_QOS_LEVELS;reverse_count>=0;reverse_count--) {
+#ifdef WIN32
+ closesocket(bssgp_net_config.socks[reverse_count]);
+#elif defined(__VXWORKS__)
+ close(bssgp_net_config.socks[reverse_count]);
+#endif
+ }
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+
+/*
+ * bssgp_net_task
+ */
+void
+bssgp_net_task()
+{
+ DBG_FUNC("bssgp_net_task",BSSGP_NET_LAYER);
+ DBG_ENTER();
+ fd_set read_set,select_set;
+ int count, select_status,no_rx_counter,ret_status;
+ unsigned long rx_bytes;
+ BOOL satisfied = FALSE;
+
+ if (bssgp_net_config.init_magic != BSSGP_MAGIC) {
+ DBG_ERROR("Cannot initialize BSSGP Net task without initializing module first, value %d!!\n",
+ bssgp_net_config.init_magic);
+ DBG_LEAVE();
+ return;
+ }
+
+ FD_ZERO(&read_set);
+
+ for(count=0;count<BSSGP_MAX_NETWORK_QOS_LEVELS;count++) {
+ FD_SET(bssgp_net_config.socks[count],&read_set);
+ }
+
+#if (defined(MNET_GS) || defined(MNET_GP10))
+ g_bssgp_net_task->JCTaskEnterLoop();
+#endif
+ while(bssgp_net_config.continue_processing) {
+ memcpy(&select_set,&read_set,sizeof(read_set));
+ if ((select_status = select(FD_SETSIZE, &select_set, 0,0,NULL)) == ERROR) {
+ DBG_ERROR("Error in select; %d!!\n",errno);
+ }
+ else {
+ /*
+ * Has data arrived on any socket ?
+ * we need to check by QoS Level
+ */
+ no_rx_counter = 0;
+ count = 0;
+ satisfied = FALSE;
+ while(!satisfied) {
+ rx_bytes = 0;
+#ifdef WIN32
+ ret_status = ioctlsocket(bssgp_net_config.socks[count],FIONREAD,&rx_bytes);
+#elif defined(__VXWORKS__)
+ ret_status = ioctl(bssgp_net_config.socks[count],FIONREAD,(int)&rx_bytes);
+#endif
+ if ((ret_status != ERROR) && (rx_bytes > 0)) {
+ bssgp_net_rx_handler(count,rx_bytes);
+ count=0;
+ no_rx_counter = 0;
+ }
+ else {
+ count++;
+ no_rx_counter++;
+ }
+ if (count == BSSGP_MAX_NETWORK_QOS_LEVELS) count = 0;
+ if (no_rx_counter == BSSGP_MAX_NETWORK_QOS_LEVELS) satisfied = TRUE;
+ }
+ }
+ }
+#if (defined(MNET_GS) || defined(MNET_GP10))
+ g_bssgp_net_task->JCTaskNormExit();
+#endif
+ DBG_LEAVE();
+ return;
+}
+
+
+
+
+
+/*
+ * bssgp_net_rx_handler
+ */
+void
+bssgp_net_rx_handler(int index,int rx_bytes)
+{
+ DBG_FUNC("bssgp_net_rx_handler",BSSGP_NET_LAYER);
+ DBG_ENTER();
+ UINT16 msg_len=0;
+ UINT8 *rx_buff;
+ struct sockaddr_in remote_addr;
+ int conn_socket,addr_size,ret_status;
+ BSSGP_BVCI bvci;
+ char peer_ip_addr[INET_ADDR_LEN];
+ BOOL free_buff = TRUE;
+
+ DBG_TRACE("QoS Level %d msg received\n",index);
+
+
+ rx_buff = (UINT8*)bssgp_util_get_rx_buff(rx_bytes);
+
+ if (!rx_buff)
+ {
+ DBG_ERROR("BSSGP: No receive buffer available for %d byte packet!\n", rx_bytes);
+ DBG_LEAVE();
+ return;
+ }
+
+ conn_socket = bssgp_net_config.socks[index];
+ addr_size = sizeof(remote_addr);
+
+ memset(&remote_addr,0,addr_size);
+ memset(peer_ip_addr,0,INET_ADDR_LEN);
+
+ ret_status = recvfrom(conn_socket,(char*)rx_buff,rx_bytes,0,
+ (struct sockaddr*)&remote_addr,&addr_size);
+ if (ret_status == ERROR) {
+ /* might want to send back msg to the peer
+ * reporting error
+ */
+ DBG_ERROR("Error receiving PDU; %d!\n",errno);
+ bssgp_util_return_rx_buff((char*)rx_buff);
+ }
+ else {
+#ifdef WIN32
+ strcpy(peer_ip_addr,inet_ntoa(remote_addr.sin_addr));
+#elif defined(__VXWORKS__)
+ inet_ntoa_b(remote_addr.sin_addr,peer_ip_addr);
+#endif
+ msg_len = ret_status;
+ DBG_TRACE("Received %d bytes of data from %s\n",msg_len,peer_ip_addr);
+ bvci = bssgp_net_get_bvci_by_ip(peer_ip_addr);
+ if (bvci == BSSGP_MAX_BVCI) {
+ DBG_ERROR("Received msg of %d bytes from %s, but BVCI not up yet, so discarding msg\n",
+ msg_len,peer_ip_addr);
+ bssgp_util_return_rx_buff((char*)rx_buff);
+ DBG_LEAVE();
+ return;
+ }
+
+ if (!bssgp_decode_msg(rx_buff,msg_len,TRUE,(BSSGP_NETWORK_QOS_LEVEL)index,bvci,&free_buff)) {
+ /* might want to send back msg to the peer
+ * reporting error
+ */
+ DBG_ERROR("Error in processing received PDU from BVCI %d!\n",bvci);
+ bssgp_util_return_rx_buff((char*)rx_buff);
+ }
+ else {
+ if (free_buff) {
+ bssgp_util_return_rx_buff((char*)rx_buff);
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * bssgp_net_init_bvcis
+ */
+BOOL
+bssgp_net_init_bvcis()
+{
+ DBG_FUNC("bssgp_net_init_bvcis",BSSGP_NET_LAYER);
+ DBG_ENTER();
+ BOOL status = FALSE;
+
+#if defined (MNET_GS)
+
+ status = TRUE;
+#elif defined (MNET_GP10)
+ /* get the address of the GS from the MIB */
+ status = TRUE;
+#endif
+
+ DBG_LEAVE();
+ return(status);
+}
+
+#if defined(MNET_GS)
+
+/*
+ ******************************************************************
+ * Network Functions specific to the GS Platform
+ ******************************************************************
+ */
+
+
+
+
+#elif defined(MNET_GP10)
+/*
+ ******************************************************************
+ * Network Functions specific to the GP-10 Platform
+ ******************************************************************
+ */
+
+#endif
+
+
+
+
+
+/*
+ * bssgp_net_tx_msg
+ */
+BOOL
+#if defined(MNET_GS)
+bssgp_net_tx_msg(BSSGP_BVCI bvci,BSSGP_NETWORK_QOS_LEVEL qos_level,UINT8 *msg,UINT16 msg_len)
+{
+ char peer_addr[20];
+
+ strcpy(peer_addr,bssgp_net_config.bvci_list[bvci].peer_ip_addr);
+
+#elif defined(MNET_GP10)
+bssgp_net_tx_msg(BSSGP_NETWORK_QOS_LEVEL qos_level,UINT8 *msg,UINT16 msg_len)
+{
+ char peer_addr[20];
+ strcpy(peer_addr,bssgp_net_config.bvci_list[BSSGP_ROOT_BVCI].peer_ip_addr);
+
+#elif defined(WIN32)
+bssgp_net_tx_msg(BSSGP_NETWORK_QOS_LEVEL qos_level,UINT8 *msg,UINT16 msg_len)
+{
+ char peer_addr[20];
+ strcpy(peer_addr,bssgp_net_config.bvci_list[BSSGP_ROOT_BVCI].peer_ip_addr);
+
+#endif
+ DBG_FUNC("bssgp_net_tx_msg",BSSGP_NET_LAYER);
+ DBG_ENTER();
+ struct sockaddr_in remote_addr;
+ int ret_status;
+ UINT16 peer_port;
+ int conn_socket;
+
+ peer_port = qos_level + bssgp_net_config.base_port;
+ conn_socket = bssgp_net_config.socks[qos_level];
+
+ memset(&remote_addr,0,sizeof(remote_addr));
+ remote_addr.sin_family = AF_INET;
+ remote_addr.sin_port = htons(peer_port);
+ remote_addr.sin_addr.s_addr = inet_addr(peer_addr);
+
+ ret_status = sendto(conn_socket,(char*)msg,msg_len,0,(struct sockaddr*)&remote_addr,sizeof(remote_addr));
+ if (ret_status != ERROR) {
+ DBG_TRACE("Sent %d bytes of data to %s:%d on QoS level %d\n",ret_status,peer_addr,peer_port,qos_level);
+ DBG_LEAVE();
+ return (TRUE);
+ }
+ else {
+ DBG_ERROR("Error sending data to %s on port %s; error %d\n",peer_addr,peer_port,errno);
+ DBG_LEAVE();
+ return (FALSE);
+ }
+}
+
+
+
+/*
+ * This function invoked from the Shell for testing only....
+ *
+ *
+ */
+
+extern "C" { int bssgp_net_add_test_bvci(char *peer_ip_addr, UINT16 cell_id,UINT8 rac); }
+
+int
+bssgp_net_add_test_bvci(char *peer_ip_addr, UINT16 cell_id,UINT8 rac)
+{
+ unsigned short count;
+
+ for (count=0;count<BSSGP_MAX_BVCI;count++) {
+ if (bssgp_net_config.bvci_list[count].used == FALSE) {
+ bssgp_net_config.bvci_list[count].used = TRUE;
+ strncpy(bssgp_net_config.bvci_list[count].peer_ip_addr,peer_ip_addr,20);
+ bssgp_net_config.bvci_list[count].cell_id.value = cell_id;
+ bssgp_net_config.bvci_list[count].routing_area_code = rac;
+ printf("Added test-bvci %s:%d\n",peer_ip_addr,cell_id);
+ return(0);
+ }
+ }
+ printf("No more BVCIs in pool!\n");
+ return (0);
+}
+
+
+extern "C" void
+bssgp_net_display_bvci(BSSGP_BVCI bvci)
+{
+ if (bssgp_net_config.bvci_list[bvci].used) {
+ printf("BVCI : %d\n",bvci);
+ printf("Peer IP Address : %s\n",bssgp_net_config.bvci_list[bvci].peer_ip_addr);
+ if (bssgp_net_config.bvci_list[bvci].cell_id.ie_present) {
+ printf("Cell-ID : %d\n",bssgp_net_config.bvci_list[bvci].cell_id.value);
+ printf("Routing Area Code : %d\n",bssgp_net_config.bvci_list[bvci].routing_area_code);
+ }
+ }
+ else {
+ printf("BVCI %d NOT used\n",bvci);
+ }
+
+}
+
+
+extern "C"
+int bssgp_net_show_all_bvci()
+{
+#if defined(MNET_GS)
+ int bvci_count=0,count;
+ printf("***************************************************************\n");
+ for (count=0;count<BSSGP_MAX_BVCI;count++) {
+ if (bssgp_net_config.bvci_list[count].used == TRUE) {
+ bssgp_net_display_bvci((BSSGP_BVCI)count);
+ bvci_count++;
+ }
+ }
+ printf("***************************************************************\n");
+ printf("Number of BVCI : %d\n",bvci_count);
+ printf("***************************************************************\n");
+#elif defined(MNET_GP10)
+ printf("***************************************************************\n");
+ bssgp_net_display_bvci(BSSGP_ROOT_BVCI);
+ printf("***************************************************************\n");
+#endif
+ return (0);
+}
+
+
diff --git a/data/mnet/Common/bssgp/src/bssgp_util.cpp b/data/mnet/Common/bssgp/src/bssgp_util.cpp
new file mode 100644
index 0000000..61db7d5
--- /dev/null
+++ b/data/mnet/Common/bssgp/src/bssgp_util.cpp
@@ -0,0 +1,424 @@
+/****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : bssgp_util.cpp *
+ * *
+ * Description : Utility functions for the BSS-GP layer/module *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |10/10/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "bssgp/bssgp_prot.h"
+#include "bssgp/bssgp_util.h"
+
+
+static char *unknown_str = "UNKNOWN TYPE";
+static char *resvd_str = "Reserved";
+
+/*
+ * bssgp_util_get_iei_str
+ */
+char *
+bssgp_util_get_iei_str(BSSGP_IEI_TYPE iei_type)
+{
+ static char *iei_str[] = {
+ "Alignment octets",
+ "Bmax default MS",
+ "BSS Area Indication",
+ "BVCI",
+ "BVC Bucket Size",
+ "BVC Measurement",
+ "Cause",
+ "Cell Identifier",
+ "Channel needed",
+ "DRX parameters",
+ "eMLPP Priority",
+ "Flush action",
+ "IMSI",
+ "LLC-PDU",
+ "LLC Frames discarded",
+ "Location area",
+ "Mobile Id",
+ "MS Bucket size",
+ "MS Radio Access capability",
+ "OMC Id",
+ "PDU in error",
+ "PDU Lifetime",
+ "Priority",
+ "QoS Profile",
+ "Radio Cause",
+ "RA-Cap-UPD-cause",
+ "Routing area",
+ "R_default_MS",
+ "Suspend reference number",
+ "Tag",
+ "TLLI",
+ "TMSI",
+ "Trace reference",
+ "Trace type",
+ "Transaction Id",
+ "Trigger Id",
+ "Number of octets affected",
+ "LSA Identifier list",
+ "LSA Information",
+ "QoS Parameters",
+ "Location Area Reject Cause"
+ };
+
+ if (iei_type < BSSGP_IEI_MAX_TYPES) {
+ return (iei_str[(int)iei_type]);
+ }
+ else {
+ return (unknown_str);
+ }
+}
+
+
+
+/*
+ * bssgp_util_get_pdu_type_str
+ */
+char *
+bssgp_util_get_pdu_type_str(BSSGP_PDU_TYPE pdu_type)
+{
+ static char pdu_type_str[128];
+ switch(pdu_type) {
+ case BSSGP_PDU_DL_UNITDATA:{
+ strncpy(pdu_type_str,"Downlink Unit Data",128);
+ }
+ break;
+
+ case BSSGP_PDU_UL_UNITDATA:{
+ strncpy(pdu_type_str,"Uplink Unit Data",128);
+ }
+ break;
+
+ case BSSGP_PDU_RA_CAP:{
+ strncpy(pdu_type_str,"Radio Access Capability",128);
+ }
+ break;
+
+ case BSSGP_PDU_PTM_UNITDATA:{
+ strncpy(pdu_type_str,"PTM Unit Data",128);
+ }
+ break;
+
+ case BSSGP_PDU_PAGING_PS:{
+ strncpy(pdu_type_str,"Paging PS",128);
+ }
+ break;
+
+ case BSSGP_PDU_PAGING_CS:{
+ strncpy(pdu_type_str,"Paging CS",128);
+ }
+ break;
+
+ case BSSGP_PDU_RA_CAP_UPDATE:{
+ strncpy(pdu_type_str,"Radio Access Capability Update",128);
+ }
+ break;
+
+ case BSSGP_PDU_RA_CAP_UPDATE_ACK:{
+ strncpy(pdu_type_str,"Radio Acess Capabilty Update ACK",128);
+ }
+ break;
+
+ case BSSGP_PDU_RADIO_STATUS:{
+ strncpy(pdu_type_str,"Radio Status",128);
+ }
+ break;
+
+ case BSSGP_PDU_SUSPEND:{
+ strncpy(pdu_type_str,"Suspend",128);
+ }
+ break;
+
+ case BSSGP_PDU_SUSPEND_ACK:{
+ strncpy(pdu_type_str,"Suspend ACK",128);
+ }
+ break;
+
+ case BSSGP_PDU_SUSPEND_NACK:{
+ strncpy(pdu_type_str,"Suspend NACK",128);
+ }
+ break;
+
+ case BSSGP_PDU_RESUME:{
+ strncpy(pdu_type_str,"Resume",128);
+ }
+ break;
+
+ case BSSGP_PDU_RESUME_ACK:{
+ strncpy(pdu_type_str,"Resume ACK",128);
+ }
+ break;
+
+ case BSSGP_PDU_RESUME_NACK:{
+ strncpy(pdu_type_str,"Resume NACK",128);
+ }
+ break;
+
+ case BSSGP_PDU_BVC_BLOCK:{
+ strncpy(pdu_type_str,"BVC Block",128);
+ }
+ break;
+
+ case BSSGP_PDU_BVC_BLOCK_ACK:{
+ strncpy(pdu_type_str,"BVC Block ACK",128);
+ }
+ break;
+
+ case BSSGP_PDU_RESET:{
+ strncpy(pdu_type_str,"Reset",128);
+ }
+ break;
+
+ case BSSGP_PDU_RESET_ACK:{
+ strncpy(pdu_type_str,"Reset ACK",128);
+ }
+ break;
+
+ case BSSGP_PDU_UNBLOCK:{
+ strncpy(pdu_type_str,"Unblock",128);
+ }
+ break;
+
+ case BSSGP_PDU_UNBLOCK_ACK:{
+ strncpy(pdu_type_str,"Unblock ACK",128);
+ }
+ break;
+
+ case BSSGP_PDU_FLOW_CONTROL_BVC:{
+ strncpy(pdu_type_str,"Flow Control BVC",128);
+ }
+ break;
+
+ case BSSGP_PDU_FLOW_CONTROL_BVC_ACK:{
+ strncpy(pdu_type_str,"Flow Control BVC ACK",128);
+ }
+ break;
+
+ case BSSGP_PDU_FLOW_CONTROL_MS:{
+ strncpy(pdu_type_str,"Flow Control MS",128);
+ }
+ break;
+
+ case BSSGP_PDU_FLOW_CONTROL_MS_ACK:{
+ strncpy(pdu_type_str,"Flow Control MS ACK",128);
+ }
+ break;
+
+ case BSSGP_PDU_FLUSH_LL:{
+ strncpy(pdu_type_str,"Flush LL",128);
+ }
+ break;
+
+ case BSSGP_PDU_FLUSH_LL_ACK:{
+ strncpy(pdu_type_str,"Flush LL ACK",128);
+ }
+ break;
+
+ case BSSGP_PDU_LLC_DISCARDED:{
+ strncpy(pdu_type_str,"LLC Discarded",128);
+ }
+ break;
+
+ case BSSGP_PDU_LOCATION_UPDATE:{
+ strncpy(pdu_type_str,"Location Update",128);
+ }
+ break;
+
+ case BSSGP_PDU_LOCATION_UPDATE_ACK:{
+ strncpy(pdu_type_str,"Location Update Ack",128);
+ }
+ break;
+
+ case BSSGP_PDU_LOCATION_UPDATE_NACK:{
+ strncpy(pdu_type_str,"Location Update Nack",128);
+ }
+ break;
+
+ case BSSGP_PDU_ROUTING_AREA_UPDATE:{
+ strncpy(pdu_type_str,"Routing Area Update",128);
+ }
+ break;
+
+ case BSSGP_PDU_SGSN_INVOKE_TRACE:{
+ strncpy(pdu_type_str,"Invoke Trace",128);
+ }
+ break;
+
+ case BSSGP_PDU_STATUS:{
+ strncpy(pdu_type_str,"Status",128);
+ }
+ break;
+
+ default:{
+ strncpy(pdu_type_str,"Unknown PDU Type",128);
+ }
+ break;
+ }
+ return (pdu_type_str);
+}
+
+
+
+
+
+
+/*
+ * bssgp_util_get_radio_cause_str
+ */
+char *
+bssgp_util_get_radio_cause_str(UINT8 radio_cause)
+{
+ static char radio_cause_str[128];
+ switch(radio_cause) {
+ case RADIO_CAUSE_MS_CONTACT_LOST: {
+ strncpy(radio_cause_str,"Radio contact lost with MS",128);
+ }
+ break;
+ case RADIO_CAUSE_LINK_QUALITY_INSUFFICIENT: {
+ strncpy(radio_cause_str,"Radio link quality insufficient to continue",128);
+ }
+ break;
+ case RADIO_CAUSE_CELL_RESELECTION_ORDERED: {
+ strncpy(radio_cause_str,"Cell reselection ordered",128);
+ }
+ break;
+ default: {
+ strncpy(radio_cause_str,"Unknown : Radio contact lost with MS",128);
+ }
+ break;
+ }
+ return (radio_cause_str);
+}
+
+
+/*
+ * bssgp_util_get_exception_cause_str
+ */
+char *
+bssgp_util_get_exception_cause_str(BSSGP_EXCEPTION_CAUSE cause)
+{
+ static char exception_cause_str[128];
+
+ switch(cause) {
+ case BSSGP_CAUSE_PROCESSOR_OVERLOAD: {
+ strncpy(exception_cause_str,"Processor overload",128);
+ }
+ break;
+ case BSSGP_CAUSE_EQUIPMENT_FAILURE: {
+ strncpy(exception_cause_str,"Equipment failure",128);
+ }
+ break;
+ case BSSGP_CAUSE_TRANSIT_NETWORK_FAILURE: {
+ strncpy(exception_cause_str,"Transit network failure",128);
+ }
+ break;
+ case BSSGP_CAUSE_CAPACITY_MODIFIED: {
+ strncpy(exception_cause_str,"Network service modified from 0 to greater",128);
+ }
+ break;
+ case BSSGP_CAUSE_UNKNOWN_MS: {
+ strncpy(exception_cause_str,"Unknown MS",128);
+ }
+ break;
+ case BSSGP_CAUSE_BVCI_UNKNOWN: {
+ strncpy(exception_cause_str,"BVCI unknown",128);
+ }
+ break;
+ case BSSGP_CAUSE_CELL_TRAFFIC_CONGESTION: {
+ strncpy(exception_cause_str,"Cell traffic congestion",128);
+ }
+ break;
+ case BSSGP_CAUSE_SGSN_CONGESTION: {
+ strncpy(exception_cause_str,"SGSN congestion",128);
+ }
+ break;
+ case BSSGP_CAUSE_OAM_INTERVENTION: {
+ strncpy(exception_cause_str,"O & M intervention",128);
+ }
+ break;
+ case BSSGP_CAUSE_BVCI_BLOCKED: {
+ strncpy(exception_cause_str,"BVCI blocked",128);
+ }
+ break;
+ case BSSGP_CAUSE_SEMANTICALLY_INCORRECT_PDU: {
+ strncpy(exception_cause_str,"Semantically incorrect PDU",128);
+ }
+ break;
+ case BSSGP_CAUSE_INVALID_MANDATORY_INFO: {
+ strncpy(exception_cause_str,"Invalid mandatory information",128);
+ }
+ break;
+ case BSSGP_CAUSE_MISSING_MANDATORY_IE: {
+ strncpy(exception_cause_str,"Missing mandatory IE",128);
+ }
+ break;
+ case BSSGP_CAUSE_MISSING_CONDITIONAL_IE: {
+ strncpy(exception_cause_str,"Missing conditional IE",128);
+ }
+ break;
+ case BSSGP_CAUSE_UNEXPECTED_CONDITIONAL_IE: {
+ strncpy(exception_cause_str,"Unexpected conditional IE",128);
+ }
+ break;
+ case BSSGP_CAUSE_CONDITIONAL_IE_ERROR: {
+ strncpy(exception_cause_str,"Conditional IE error",128);
+ }
+ break;
+ case BSSGP_CAUSE_PDU_NOT_COMPAT_PROTOCOL_STATE: {
+ strncpy(exception_cause_str,"PDU not compatible with protocol state",128);
+ }
+ break;
+ case BSSGP_CAUSE_PROTOCOL_ERROR_UNSPECIFIED:
+ default: {
+ strncpy(exception_cause_str,"Protocol error - unspecified",128);
+ }
+ break;
+ }
+ return (exception_cause_str);
+}
+
+
+/*
+ * bssgp_util_get_ra_cap_cause_str
+ */
+char *
+bssgp_util_get_ra_cap_cause_str(RA_CAP_UPD_CAUSE ra_cause)
+{
+ static char ra_cap_cause_str[128];
+ switch (ra_cause) {
+ case RA_CAP_UPD_CAUSE_IE_PRESENT:{
+ strncpy(ra_cap_cause_str,"OK, RA capability IE present",128);
+ }
+ break;
+ case RA_CAP_UPD_CAUSE_TLLI_UNKNOWN:{
+ strncpy(ra_cap_cause_str,"TLLI unknown in SGSN",128);
+ }
+ break;
+ case RA_CAP_UPD_CAUSE_NO_RA_CAP:{
+ strncpy(ra_cap_cause_str,"No RA capabilities available for this MS",128);
+ }
+ break;
+ default:{
+ strncpy(ra_cap_cause_str,"Unknown - TLLI unknown in SGSN",128);
+ }
+ break;
+ }
+ return (ra_cap_cause_str);
+}
+
+
+
diff --git a/data/mnet/Common/bssgp/win32test/bssgpwin32.cpp b/data/mnet/Common/bssgp/win32test/bssgpwin32.cpp
new file mode 100644
index 0000000..fcfe972
--- /dev/null
+++ b/data/mnet/Common/bssgp/win32test/bssgpwin32.cpp
@@ -0,0 +1,524 @@
+/****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : bssgpwin32.cpp *
+ * *
+ * Description : Win32 test program for the BSS-GP layer/module *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |10/10/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <windows.h>
+#include <winsock.h>
+#include "bssgp\bssgp_prot.h"
+#include "bssgp\bssgp_util.h"
+#include "bssgp\bssgp_decoder.h"
+#include "bssgp\bssgp_encoder.h"
+
+#include "bssgp\bssgp_api.h"
+#include "bssgp\bssgp_unitdata.h"
+#include "ril3\ril3_sm_msg.h"
+
+
+/* test-tool configuration struct */
+typedef struct {
+
+ char gs_ip_addr[32];
+ SOCKET msg_socket;
+ int msg_num;
+
+} BSSGPWIN32_CONFIG;
+
+
+
+/*
+ * The Enumeration of the test messages
+ */
+typedef enum {
+
+
+ GPRS_MIN_TEST_MSG_NUM = 0,
+ GPRS_TEST_MSG_SCRAP_UL_UNITDATA = 1,
+ GPRS_TEST_ATTACH_REQ_UL_UNITDATA = 2,
+
+ GPRS_MAX_TEST_MSGS
+
+} GPRS_TEST_MSG;
+
+
+/*
+ * Global variables
+ */
+unsigned short g_debug_level=0, g_debug_device=1; /* debug flags required by dbgout.cpp */
+BSSGPWIN32_CONFIG config;
+char llc_pdu [1500];
+
+
+/*
+ * Function prototypes
+ */
+BOOL socklib_open_sock(void);
+void socklib_close_sock(void);
+void socklib_send_data(UINT8 *msg,UINT16 len);
+void socklib_recv_data(UINT8 *msg,UINT16 *len);
+BOOL socklib_initialize(void);
+void socklib_shutdown(void);
+BOOL bssgpwin32_parse_command_line_arguments(int argc, char **argv);
+void bssgpwin32_display_usage(void);
+BOOL WINAPI ctrl_brk_handler(DWORD dwCtrlType);
+void bssgpwin32_set_test_msg(BSSGP_API_MSG *api_msg);
+
+
+unsigned char LlcFrameUIAttachReq [] =
+{ 0x41, 0xC0, 0x01, 0x08, 0x01, 0x01, 0x88, 0x01, 0x10, 0x07,
+ 0x05, 0x04, 0x21, 0x43, 0x65, 0xF7, 0x00, 0x11, 0x00, 0x00,
+ 0x01, 0x01, 0x05, 0x22, 0x63, 0x00, 0x20, 0x00, 0xB4, 0x5D,
+ 0x54
+};
+
+main(int argc, char **argv)
+{
+
+ BOOL status;
+ BSSGP_API_MSG api_msg;
+ UINT16 msg_len=0;
+ BSSGP_BVCI bvci;
+ BSSGP_NETWORK_QOS_LEVEL qos_reqd;
+ BOOL tx_msg=FALSE;
+ UINT8 tx_buff[1024], rx_buff[1024];
+
+ if (!bssgpwin32_parse_command_line_arguments(argc,argv)) {
+ printf("Invalid arguments!\n");
+ bssgpwin32_display_usage();
+ return(0);
+ }
+
+ if (!(SetConsoleCtrlHandler(ctrl_brk_handler,TRUE))) {
+ printf("Cannot set ctrl-break handler,aborting\n");
+ return(0);
+ }
+
+ if (!socklib_initialize()) {
+ printf("Unable to initialize Sockets library\n");
+ return(0);
+ }
+
+ if (!socklib_open_sock()) {
+ printf("Unable to create a socket\n");
+ socklib_shutdown();
+ return(0);
+ }
+
+
+ memset(&api_msg,0,sizeof(api_msg));
+
+ bssgpwin32_set_test_msg(&api_msg);
+
+
+ status = bssgp_encode_msg(&api_msg,tx_buff,&msg_len,
+ &bvci,&qos_reqd, &tx_msg);
+
+ if (!status) {
+ printf("Error encoding BSSGP message!\n");
+ socklib_close_sock();
+ socklib_shutdown();
+ return(0);
+ }
+
+ socklib_send_data((UINT8*)tx_buff,msg_len);
+
+ msg_len = 1024;
+
+ socklib_recv_data((UINT8*)rx_buff,&msg_len);
+
+
+ return (0);
+
+}
+
+
+
+
+/*
+ * socklib_open_sock
+ */
+BOOL
+socklib_open_sock()
+{
+ SOCKET conn_socket;
+ int status;
+ struct sockaddr_in local_addr, gs_addr;
+
+ conn_socket = socket(AF_INET,SOCK_DGRAM,0);
+ if (conn_socket == INVALID_SOCKET) {
+ printf("Unable to create a UDP socket, error %d\n",WSAGetLastError());
+ return(FALSE);
+ }
+
+ memset(&local_addr,0,sizeof(local_addr));
+ local_addr.sin_addr.S_un.S_addr = INADDR_ANY;
+ local_addr.sin_port = htons(24240);
+ local_addr.sin_family = AF_INET;
+
+ status = bind(conn_socket,(struct sockaddr*)&local_addr,sizeof(local_addr));
+ if (status == SOCKET_ERROR) {
+ printf("Unable to bind UDP socket, error %d\n",WSAGetLastError());
+ closesocket(conn_socket);
+ return(FALSE);
+ }
+
+ memset(&gs_addr,0,sizeof(gs_addr));
+ gs_addr.sin_addr.S_un.S_addr = inet_addr(config.gs_ip_addr);
+ gs_addr.sin_port = htons(24240);
+ gs_addr.sin_family = AF_INET;
+
+ status = connect(conn_socket,(struct sockaddr*)&gs_addr,sizeof(gs_addr));
+ if (status == SOCKET_ERROR) {
+ printf("Unable to connect UDP socket, error %d\n",WSAGetLastError());
+ closesocket(conn_socket);
+ return(FALSE);
+ }
+ printf("Setup IP path to GS server successfully\n");
+ config.msg_socket = conn_socket;
+ return (TRUE);
+
+}
+
+
+/*
+ * socklib_close_sock
+ */
+void
+socklib_close_sock()
+{
+ closesocket(config.msg_socket);
+}
+
+
+/*
+ * socklib_send_data
+ */
+void
+socklib_send_data(UINT8 *msg,UINT16 len)
+{
+ int status;
+
+ status = send(config.msg_socket,(char*)msg,len,0);
+ if (status == SOCKET_ERROR) {
+ printf("Unable to send data on UDP socket, error %d\n",WSAGetLastError());
+ }
+ else {
+ printf("Sent %d bytes of data on UDP socket\n",len);
+ }
+ return;
+}
+
+
+
+/*
+ * socklib_recv_data
+ */
+void
+socklib_recv_data(UINT8 *msg,UINT16 *len)
+{
+ int status;
+ BOOL free_buff=TRUE;
+
+ status = recv(config.msg_socket,(char*)msg,*len,0);
+ if (status == SOCKET_ERROR) {
+ printf("Unable to recv data on UDP socket, error %d\n",WSAGetLastError());
+ }
+ else {
+ printf("Received %d bytes of data on UDP socket;running it through BSSGP decoder\n",status);
+
+ if (!bssgp_decode_msg(msg,status,TRUE,(BSSGP_NETWORK_QOS_LEVEL)0,0,&free_buff)) {
+ printf("Error decoding BSSGP msg\n");
+ }
+
+ *len = status;
+ }
+ return;
+}
+
+
+
+
+
+/*
+ * socklib_initialize
+ */
+BOOL
+socklib_initialize()
+{
+ BOOL status = FALSE;
+ WORD wVersionRequested;
+ WSADATA wsaData;
+ int ret_status;
+ wVersionRequested = MAKEWORD( 2, 2 );
+
+ ret_status = WSAStartup( wVersionRequested, &wsaData );
+ if (ret_status != 0) {
+ status = FALSE;
+ }
+ else {
+ status = TRUE;
+ }
+ return(status);
+}
+
+
+
+/*
+ * socklib_shutdown
+ */
+void
+socklib_shutdown()
+{
+ WSACleanup();
+ return;
+}
+
+
+/*
+ * bssgpwin32_parse_command_line_arguments
+ */
+BOOL
+bssgpwin32_parse_command_line_arguments(int argc, char **argv)
+{
+ BOOL satisfied=FALSE;
+ BOOL ret_status = FALSE, msg_num_specified=FALSE,gs_ip_specified=FALSE;
+ int counter=1;
+ if (argc < 2) {
+ printf("Not enough arguments\n");
+ return ret_status;
+ }
+
+ while (!satisfied) {
+ if (stricmp(argv[counter],"-gs") == 0) {
+ if (argc < (counter+2)) goto bye_bye_jose;
+ strcpy(config.gs_ip_addr,argv[counter+1]);
+ gs_ip_specified=TRUE;
+ counter+=2;
+ }
+ else if (stricmp(argv[counter],"-msg") == 0) {
+ if (argc < (counter+2)) goto bye_bye_jose;
+ config.msg_num = atoi(argv[counter+1]);
+
+ if ( (config.msg_num <= GPRS_MIN_TEST_MSG_NUM) || (config.msg_num >= GPRS_MAX_TEST_MSGS)) {
+ printf("Unknown/Invalid message template # specified\n");
+ return (FALSE);
+ }
+ counter+=2;
+ msg_num_specified=TRUE;
+ }
+ else {
+ bye_bye_jose:printf("Invalid arguments!\n");
+ memset(&config,0,sizeof(config));
+ return ret_status;
+ }
+
+ if (counter == argc) satisfied = TRUE;
+ }
+ if (!gs_ip_specified) {
+ printf("Need to specify the GS ip address\n");
+ return (ret_status);
+ }
+
+ if (!msg_num_specified) {
+ printf("Need to specify the Message template number\n");
+ return (ret_status);
+ }
+ if (satisfied) ret_status = TRUE;
+
+ return (ret_status);
+}
+
+
+
+/*
+ * bssgpwin32_display_usage
+ */
+void
+bssgpwin32_display_usage()
+{
+ printf("\n");
+ printf("|*************** BSSGPWin32 Version 1.0 (c) Cisco 2000-2001 ***************************|\n");
+ printf("|---------------------------------------------------------------------------------------|\n");
+ printf("|>bssgp -gs <a.b.c.d> -msg x |\n");
+ printf("|---------------------------------------------------------------------------------------|\n");
+ printf("| -gs <a.b.c.d> : Use a.b.c.d as the GS IP address |\n");
+ printf("| -msg x : Send pre-defined message x |\n");
+ printf("|---------------------------------------------------------------------------------------|\n");
+ printf("\n");
+}
+
+
+/*
+ * ctrl_brk_handler
+ */
+BOOL WINAPI
+ctrl_brk_handler(DWORD dwCtrlType)
+{
+ printf("Ctrl-Break keys presses, exiting application\n");
+ closesocket(config.msg_socket);
+ return(TRUE);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+ * bssgpwin32_set_test_msg
+ *
+ * This function to be modified to add new test messages...
+ *
+ *
+ *
+ */
+void
+bssgpwin32_set_test_msg(BSSGP_API_MSG *api_msg)
+{
+ unsigned frameLength;
+
+ /*
+ * Most of these values are pretty much going to be the same
+ * for most test msgs, except the GMM<->GMM signalling msgs,
+ * and the person creating those test msgs needs to contact
+ * me first : Dinesh
+ */
+ api_msg->magic = BSSGP_MAGIC;
+ api_msg->msg_type = BSSGP_API_MSG_UL_UNITDATA;
+ api_msg->msg.ul_unitdata.bvci = 0;
+ api_msg->msg.ul_unitdata.cell_id.ie_present = TRUE;
+ api_msg->msg.ul_unitdata.cell_id.value = 21; /* dunno, some random cell id */
+ api_msg->msg.ul_unitdata.qos_profile.ie_present = TRUE;
+ api_msg->msg.ul_unitdata.qos_profile.bucket_leak_rate[0] = 1;
+ api_msg->msg.ul_unitdata.qos_profile.bucket_leak_rate[1] = 1;
+ api_msg->msg.ul_unitdata.qos_profile.precedence_class = CNI_RIL3_QOS_PRECEDENCE_CLASS_HIGH_PRIORITY;
+ api_msg->msg.ul_unitdata.qos_profile.a_bit = RADIO_INT_USES_RLC_MAX_UDT;
+ api_msg->msg.ul_unitdata.qos_profile.t_bit = SDU_CONTAINS_SIGNALLING;
+ api_msg->msg.ul_unitdata.qos_profile.cr_bit = SDU_LLC_ACK_SACK_ABSENT;
+
+ api_msg->msg.ul_unitdata.tlli = 1; /* for lack of a better choice ;-) */
+
+
+
+ /*
+ * Here is the part where you actually stick in the upper layer
+ * message (handcoded or otherwise) as a byte-stream....
+ * You also need to add your message template number to the enumeration
+ * at the beginning of this file called GPRS_TEST_MSG, and add that option
+ * to the switch statement below...
+ */
+
+ switch(config.msg_num) {
+
+ case GPRS_TEST_MSG_SCRAP_UL_UNITDATA: {
+ printf("Sending pre-defined message template #1 : Scrap UL-Unitdata\n");
+ memset(llc_pdu,'A',256);
+ api_msg->msg.ul_unitdata.pdu.data = (UINT8*)llc_pdu;
+ api_msg->msg.ul_unitdata.pdu.data_len = 256;
+
+ }
+ break;
+
+ case GPRS_TEST_ATTACH_REQ_UL_UNITDATA:
+
+ memset (llc_pdu, 0, 1500);
+ frameLength = (sizeof(LlcFrameUIAttachReq)/sizeof(LlcFrameUIAttachReq[0]));
+
+ printf ("Sending pre-defined message template #2: Attach Request (Frame length %d)\n",
+ frameLength);
+
+ memcpy (llc_pdu, LlcFrameUIAttachReq, frameLength);
+
+ api_msg->msg.ul_unitdata.pdu.data = (UINT8*)llc_pdu;
+ api_msg->msg.ul_unitdata.pdu.data_len = frameLength;
+
+ DbgHexDump ((unsigned char*)api_msg->msg.ul_unitdata.pdu.data, api_msg->msg.ul_unitdata.pdu.data_len);
+
+ break;
+
+ default: {
+ printf("Unknown message template # specified !!\n");
+ socklib_close_sock();
+ socklib_shutdown();
+ exit(0);
+ }
+ } /* End of switch */
+}
+
+
+
+/*
+ * bssgp_api_send_ul_unitdata
+ */
+void
+bssgp_api_send_ul_unitdata(TLLI tlli,T_CNI_RIL3_IE_CELL_ID cell_id,UINT8 *pdu_data,UINT16 pdu_len)
+{
+
+ printf("Do something here ;-) \n");
+}
+
+
+
+
+
+/*
+ * bssgp_util_get_rx_buff
+ */
+char *
+bssgp_util_get_rx_buff(int buff_size_reqd)
+{
+ char *return_buff=NULL;
+ return_buff = (char*)malloc(buff_size_reqd);
+ return (return_buff);
+}
+
+
+/*
+ * bssgp_util_return_rx_buff
+ */
+void
+bssgp_util_return_rx_buff(char *buff)
+{
+ free(buff);
+}
+
+
+
+
+/*
+ * llcwin32_pdu_handler
+ */
+void
+llcwin32_pdu_handler(LLC_PDU pdu)
+{
+ int count,index=0;
+ printf("LLC PDU of length %d\n",pdu.data_len);
+
+ DbgHexDump ((unsigned char*)pdu.data, pdu.data_len);
+
+ printf("End of LLC PDU\n");
+}
diff --git a/data/mnet/Common/bssgp/win32test/gprstest/gprstest.mak b/data/mnet/Common/bssgp/win32test/gprstest/gprstest.mak
new file mode 100644
index 0000000..cd07979
--- /dev/null
+++ b/data/mnet/Common/bssgp/win32test/gprstest/gprstest.mak
@@ -0,0 +1,238 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on gprstest.dsp
+!IF "$(CFG)" == ""
+CFG=gprstest - Win32 Debug
+!MESSAGE No configuration specified. Defaulting to gprstest - Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "gprstest - Win32 Release" && "$(CFG)" != "gprstest - Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "gprstest.mak" CFG="gprstest - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "gprstest - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "gprstest - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "gprstest - Win32 Release"
+
+OUTDIR=.\Release
+INTDIR=.\Release
+# Begin Custom Macros
+OutDir=.\Release
+# End Custom Macros
+
+ALL : "$(OUTDIR)\gprstest.exe"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\bssgp_decoder.obj"
+ -@erase "$(INTDIR)\bssgp_encoder.obj"
+ -@erase "$(INTDIR)\bssgp_ie_decoder.obj"
+ -@erase "$(INTDIR)\bssgp_ie_encoder.obj"
+ -@erase "$(INTDIR)\bssgp_unitdata.obj"
+ -@erase "$(INTDIR)\bssgp_util.obj"
+ -@erase "$(INTDIR)\bssgpwin32.obj"
+ -@erase "$(INTDIR)\dbgout.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(OUTDIR)\gprstest.exe"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\gprstest.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\gprstest.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\gprstest.pdb" /machine:I386 /out:"$(OUTDIR)\gprstest.exe"
+LINK32_OBJS= \
+ "$(INTDIR)\bssgp_util.obj" \
+ "$(INTDIR)\bssgp_encoder.obj" \
+ "$(INTDIR)\bssgp_ie_decoder.obj" \
+ "$(INTDIR)\bssgp_ie_encoder.obj" \
+ "$(INTDIR)\bssgp_unitdata.obj" \
+ "$(INTDIR)\bssgp_decoder.obj" \
+ "$(INTDIR)\dbgout.obj" \
+ "$(INTDIR)\bssgpwin32.obj"
+
+"$(OUTDIR)\gprstest.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "gprstest - Win32 Debug"
+
+OUTDIR=.
+INTDIR=.
+# Begin Custom Macros
+OutDir=.
+# End Custom Macros
+
+ALL : "$(OUTDIR)\gprstest.exe"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\bssgp_decoder.obj"
+ -@erase "$(INTDIR)\bssgp_encoder.obj"
+ -@erase "$(INTDIR)\bssgp_ie_decoder.obj"
+ -@erase "$(INTDIR)\bssgp_ie_encoder.obj"
+ -@erase "$(INTDIR)\bssgp_unitdata.obj"
+ -@erase "$(INTDIR)\bssgp_util.obj"
+ -@erase "$(INTDIR)\bssgpwin32.obj"
+ -@erase "$(INTDIR)\dbgout.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(OUTDIR)\gprstest.exe"
+ -@erase "$(OUTDIR)\gprstest.ilk"
+ -@erase "$(OUTDIR)\gprstest.pdb"
+
+CPP_PROJ=/nologo /MLd /W3 /Gm /GX /ZI /Od /I "\common\include" /I "\common\bssgp\win32test" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\gprstest.pch" /YX /FD /GZ /c
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\gprstest.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib wsock32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\gprstest.pdb" /debug /machine:I386 /out:"$(OUTDIR)\gprstest.exe" /pdbtype:sept
+LINK32_OBJS= \
+ "$(INTDIR)\bssgp_util.obj" \
+ "$(INTDIR)\bssgp_encoder.obj" \
+ "$(INTDIR)\bssgp_ie_decoder.obj" \
+ "$(INTDIR)\bssgp_ie_encoder.obj" \
+ "$(INTDIR)\bssgp_unitdata.obj" \
+ "$(INTDIR)\bssgp_decoder.obj" \
+ "$(INTDIR)\dbgout.obj" \
+ "$(INTDIR)\bssgpwin32.obj"
+
+"$(OUTDIR)\gprstest.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("gprstest.dep")
+!INCLUDE "gprstest.dep"
+!ELSE
+!MESSAGE Warning: cannot find "gprstest.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "gprstest - Win32 Release" || "$(CFG)" == "gprstest - Win32 Debug"
+SOURCE=..\..\src\bssgp_decoder.cpp
+
+!IF "$(CFG)" == "gprstest - Win32 Release"
+
+CPP_SWITCHES=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\gprstest.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+"$(INTDIR)\bssgp_decoder.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) @<<
+ $(CPP_SWITCHES) $(SOURCE)
+<<
+
+
+!ELSEIF "$(CFG)" == "gprstest - Win32 Debug"
+
+CPP_SWITCHES=/nologo /MLd /W3 /Gm /GX /ZI /Od /I "\common\include" /I "\common\bssgp\win32test" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\gprstest.pch" /YX /FD /GZ /c
+
+"$(INTDIR)\bssgp_decoder.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) @<<
+ $(CPP_SWITCHES) $(SOURCE)
+<<
+
+
+!ENDIF
+
+SOURCE=..\..\src\bssgp_encoder.cpp
+
+"$(INTDIR)\bssgp_encoder.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\src\bssgp_ie_decoder.cpp
+
+"$(INTDIR)\bssgp_ie_decoder.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\src\bssgp_ie_encoder.cpp
+
+"$(INTDIR)\bssgp_ie_encoder.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\src\bssgp_unitdata.cpp
+
+"$(INTDIR)\bssgp_unitdata.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\..\src\bssgp_util.cpp
+
+"$(INTDIR)\bssgp_util.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\bssgpwin32.cpp
+
+"$(INTDIR)\bssgpwin32.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+SOURCE=..\dbgout.cpp
+
+"$(INTDIR)\dbgout.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
+
+!ENDIF
+
diff --git a/data/mnet/Common/cdr/Makefile b/data/mnet/Common/cdr/Makefile
new file mode 100644
index 0000000..21cc2e2
--- /dev/null
+++ b/data/mnet/Common/cdr/Makefile
@@ -0,0 +1,47 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+# (OPTIONAL) Append REPLACE - Replaces the List of directories
+# to be used in the SUBDIRS variable
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src REPLACE="src_api src_debug"
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+SUBDIRS = src src_client src_server
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..
+
+VOBDIR = $(TOP_OF_VOB)/../$(VOB)
+
+# Allows a sub-set of the source code directories to be used
+
+ifneq ($(REPLACE),)
+ SUBDIRS = $(REPLACE)
+endif
+
+include $(VOBDIR)\l3defs.mk
+
+
diff --git a/data/mnet/Common/cdr/certificate/Readme.txt b/data/mnet/Common/cdr/certificate/Readme.txt
new file mode 100644
index 0000000..170c88b
--- /dev/null
+++ b/data/mnet/Common/cdr/certificate/Readme.txt
@@ -0,0 +1,2 @@
+This directory contains default certificate, key and password files for the MNET CDR subsystem.
+Encrypted password is "cdr_password". \ No newline at end of file
diff --git a/data/mnet/Common/cdr/certificate/ca.pem b/data/mnet/Common/cdr/certificate/ca.pem
new file mode 100644
index 0000000..5571166
--- /dev/null
+++ b/data/mnet/Common/cdr/certificate/ca.pem
@@ -0,0 +1,18 @@
+-----BEGIN CERTIFICATE-----
+MIIC0jCCAjugAwIBAgIBADANBgkqhkiG9w0BAQQFADCBrjELMAkGA1UEBhMCVVMx
+EzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcTCFNhbiBKb3NlMRwwGgYDVQQK
+ExNDSVNDTyBTeXN0ZW1zLCBJbmMuMQwwCgYDVQQLEwNNV0cxKTAnBgNVBAMTIENJ
+U0NPIE1ORVQgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MSAwHgYJKoZIhvcNAQkBFhFz
+dXBwb3J0QGNpc2NvLmNvbTAeFw0wMTA3MjQwMTU4MTZaFw0wMjA3MjQwMTU4MTZa
+MIGuMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMI
+U2FuIEpvc2UxHDAaBgNVBAoTE0NJU0NPIFN5c3RlbXMsIEluYy4xDDAKBgNVBAsT
+A01XRzEpMCcGA1UEAxMgQ0lTQ08gTU5FVCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkx
+IDAeBgkqhkiG9w0BCQEWEXN1cHBvcnRAY2lzY28uY29tMIGfMA0GCSqGSIb3DQEB
+AQUAA4GNADCBiQKBgQCz+izH0Rff1+xzN3QWcxAwLdhBagel0q5rsxuS5PZofSkx
+FVTFx00I759+bXrBVOGFki4M9vlhDscrihwnL5mH3Eh8U0HcB0ec9nPY0fGj5XZ0
+NLetHmoUoTyXR8sPxvR3iaLJSbftl5H9/LJLZ1ZWsQWxrm3wUGNNRAfYq2c9GQID
+AQABMA0GCSqGSIb3DQEBBAUAA4GBAENH4Ck+zskqIm6iTm1iS+b6R2JNiWXRsaib
+ANoq+D6lw0kT1hPvQ0DF9LgcaE+b3FeyI8afie3snSX+7OKDzo//hSpeXUxMBu7G
+mt43B7cNOVzIrADHJUSYdMwHZYLrS2HGHEkA71QAQJ7q9X+kVRBzbsFZftNFfiGk
+mrUxmRSi
+-----END CERTIFICATE-----
diff --git a/data/mnet/Common/cdr/certificate/ca_cert/cakey.pem b/data/mnet/Common/cdr/certificate/ca_cert/cakey.pem
new file mode 100644
index 0000000..95fa181
--- /dev/null
+++ b/data/mnet/Common/cdr/certificate/ca_cert/cakey.pem
@@ -0,0 +1,18 @@
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,63A6C5E14DF8F30B
+
+KumNLa3hHfOLuZU1It0ZSaMGFoRVyvzlt1BbmwP1r5IYZd7evHOOzrJsOhJ32UHY
+QVWmLgMEv+0FigRw8wqUhW8QT3Wohrd0kTEoxXPrENzK3K6g+/HlBvBhjci6BUjP
+HfE+qJ6dDsc/oIUTDqoZJwf+M8mlVvOzPALr979EdlFES8MrZj7hT0LLHO4xyhdn
+jSbgEbPimCR3AybuniPjpPHuNs2hGcQZ4lEZ/rl78OQIW3CLvqRWrZhZmuzzNMPx
+61vv/ezaX8iXdg5bkz34qE/2KNsmXH+wLRWkU9unYdoxisjhesvaRhNQKkQ6onBX
+jn8eDRHg+4ortHMQVWTETsPl/b3QVZXO4w6e1A08MVFhFiHt+uTEd/XP0wjgHICs
+llBcjPP90kOmRG8UJT0mwfUtsR26C3eZ5BUz2H8uxRRSPMU1Iwro4XvuD8Jtv9uU
+TJycEA+82BBfu94jEE4MLx+6h35mmf9HldaXb3ZONd9Ji34IBF+cp4+Wf3Fjsaj2
+k6FQO/ib4N3FZF8fEa/dcpbN1kBzXJTyy56i5wIskQHWe4yEgfT9NeBP/SyNG9KZ
+ZFaUR5Dqmuy2e2BG7TBC2dLDJ7q3SYGqTyi1S0Vp352kqKmwgNIi76nnZdWWcL4T
+Gt8WMEVpp+1rroXGHpliZ3GsN4AqdaT7IsEqWWk8fXiYlkYcKdjjzGWTQ96CBwz9
+KsL5eAqyRA2bnS+veUhEC5ZAzu7ATaDb+YmY2L+sa0jALqIw2Vw/JxM1FwuFvcp6
+e99uudN6LipqOolOs1aO5SAW2WeulfuNIrvNm2gabqKhpyNHU8oLPg==
+-----END RSA PRIVATE KEY-----
diff --git a/data/mnet/Common/cdr/certificate/cdrpwd.dat b/data/mnet/Common/cdr/certificate/cdrpwd.dat
new file mode 100644
index 0000000..7a3205c
--- /dev/null
+++ b/data/mnet/Common/cdr/certificate/cdrpwd.dat
Binary files differ
diff --git a/data/mnet/Common/cdr/certificate/cert.pem b/data/mnet/Common/cdr/certificate/cert.pem
new file mode 100644
index 0000000..68b7290
--- /dev/null
+++ b/data/mnet/Common/cdr/certificate/cert.pem
@@ -0,0 +1,50 @@
+Certificate:
+ Data:
+ Version: 1 (0x0)
+ Serial Number: 6503 (0x1967)
+ Signature Algorithm: md5WithRSAEncryption
+ Issuer: C=US, ST=California, L=San Jose, O=CISCO Systems, Inc., OU=MWG, CN=CISCO MNET Certificate Authority/Email=support@cisco.com
+ Validity
+ Not Before: Jul 24 01:58:18 2001 GMT
+ Not After : Jul 24 01:58:18 2002 GMT
+ Subject: C=US, ST=California, L=San Jose, O=CISCO Systems, Inc., OU=MWG, CN=CISCO MNET CDR USER/Email=support@cisco.com
+ Subject Public Key Info:
+ Public Key Algorithm: rsaEncryption
+ RSA Public Key: (1024 bit)
+ Modulus (1024 bit):
+ 00:e2:a5:09:d8:49:90:1e:0c:0e:ca:f7:e8:b5:b3:
+ 79:c3:d3:33:5d:25:3c:03:c2:9a:6e:4a:09:9c:c1:
+ cc:dc:34:3b:c9:0a:ef:84:45:05:ff:b3:5a:c6:73:
+ 33:9a:08:52:c5:7c:68:6e:f1:24:c9:7d:23:ad:9f:
+ a4:57:8b:63:07:21:bd:c9:f6:3f:b9:65:10:3f:8b:
+ 64:e7:44:d6:41:1e:c7:67:48:42:07:42:0a:df:a4:
+ 79:29:9a:ff:7a:ed:0a:68:e8:3b:eb:f0:e6:a7:bc:
+ 15:27:62:20:53:26:5b:0d:d9:21:f7:38:8d:36:7d:
+ 5d:28:65:a1:b6:9f:4e:24:b3
+ Exponent: 65537 (0x10001)
+ Signature Algorithm: md5WithRSAEncryption
+ 10:19:72:22:6a:94:00:a9:fd:cf:3f:ef:1a:d8:3c:c3:d0:7b:
+ c8:04:92:fe:d2:ef:34:f7:ba:f0:84:a2:34:77:89:c3:5e:7b:
+ 32:be:55:06:06:46:f8:93:72:20:13:d1:b9:4c:da:3b:77:70:
+ 9c:86:29:2d:d9:df:67:47:21:55:88:b8:08:08:bb:bc:33:ec:
+ 02:68:f6:5f:d1:e6:1b:2d:0a:bf:a2:c7:a1:f2:b4:cd:16:29:
+ 4d:55:f0:90:0b:2a:b2:52:1b:9e:6f:46:da:6b:a3:7b:a9:b8:
+ 2d:ad:00:8f:bc:b1:3a:72:b7:52:92:be:7c:31:5d:87:4d:b8:
+ f7:a2
+-----BEGIN CERTIFICATE-----
+MIICwTCCAioCAhlnMA0GCSqGSIb3DQEBBAUAMIGuMQswCQYDVQQGEwJVUzETMBEG
+A1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMIU2FuIEpvc2UxHDAaBgNVBAoTE0NJ
+U0NPIFN5c3RlbXMsIEluYy4xDDAKBgNVBAsTA01XRzEpMCcGA1UEAxMgQ0lTQ08g
+TU5FVCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxIDAeBgkqhkiG9w0BCQEWEXN1cHBv
+cnRAY2lzY28uY29tMB4XDTAxMDcyNDAxNTgxOFoXDTAyMDcyNDAxNTgxOFowgaEx
+CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhTYW4g
+Sm9zZTEcMBoGA1UEChMTQ0lTQ08gU3lzdGVtcywgSW5jLjEMMAoGA1UECxMDTVdH
+MRwwGgYDVQQDExNDSVNDTyBNTkVUIENEUiBVU0VSMSAwHgYJKoZIhvcNAQkBFhFz
+dXBwb3J0QGNpc2NvLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA4qUJ
+2EmQHgwOyvfotbN5w9MzXSU8A8KabkoJnMHM3DQ7yQrvhEUF/7NaxnMzmghSxXxo
+bvEkyX0jrZ+kV4tjByG9yfY/uWUQP4tk50TWQR7HZ0hCB0IK36R5KZr/eu0KaOg7
+6/Dmp7wVJ2IgUyZbDdkh9ziNNn1dKGWhtp9OJLMCAwEAATANBgkqhkiG9w0BAQQF
+AAOBgQAQGXIiapQAqf3PP+8a2DzD0HvIBJL+0u8097rwhKI0d4nDXnsyvlUGBkb4
+k3IgE9G5TNo7d3Cchikt2d9nRyFViLgICLu8M+wCaPZf0eYbLQq/oseh8rTNFilN
+VfCQCyqyUhueb0baa6N7qbgtrQCPvLE6crdSkr58MV2HTbj3og==
+-----END CERTIFICATE-----
diff --git a/data/mnet/Common/cdr/certificate/key.pem b/data/mnet/Common/cdr/certificate/key.pem
new file mode 100644
index 0000000..f3b1221
--- /dev/null
+++ b/data/mnet/Common/cdr/certificate/key.pem
@@ -0,0 +1,18 @@
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,9D40E0AEA9699CC6
+
+o0x1NO0OC0zVke5WybdCdgnBtIm5wagFNHUCgUyj2ONTSDVdr4Aj+Rwa1nZVcxKo
+P3Vs3Juv58dlBUiPuxep7+nFY/W5xlcmt8TCuZwFjQgD4caCHDQ50m2XWq9OJ18Q
+L9Xsytx+KHYFcR7g/zkCYXzVU2D5Z2Mvvdx/vbMllcbjC5pGz0OhfPSe2HfuTzgo
+mHpdy8MfexLjqvGVu+XWvNEb7BkR1LxfKoAo84sIZpT8WvonSQLp19qmY6U65iWu
+cMI2JIgAv+oMa5tbRh51jthrFyVDf2c1cMosVVlK118bQmUjqw816GzmI8ml2n25
+MgW2Zt0j7CSqKX9zqncHpuOxLru3SlwDG2LGhmWJtlAOkaSxdopPw+ZminpHBPyy
+/+xIkzGrPCu6E7nogrmnxnR1lFG80T8OAebsCbumMdvi2WIPNYnL+vhaW++NMXeM
+Fj62dVaIl0+ozM5vr/C/puaVYeBS1+2dZMA+w9eP3r2yp7gn+uQb9BlQrFVG55yJ
+1TInbpYGrD8K3RmMsnY6iL7QyhdsRpXgo/fJOEd/bH89a8Ajuq+wbWz1EX0q4QeD
+LuI+cDOjNt64cHbIFQlYEGUxzvH9+Wdc0aFgFFxpoFR8e+/p/9OVpj4kxJMFdcDI
+CBhyJjIOORC/RBpcquUN//KrlpOuR0kx9W2LRK5+ufotDOSEYKKHXlQPKOm+hSIt
+zFCr7qfSXF6ibDQfzLSaP1N6r9QdParx8cL3aOoaoR5Ke3Ti8kPzl7G4bpswsId2
+g/mwVPXrkoAWNt1PzKIOuZzZkywyvT6sEV5ucNqD6qWQc8cqG+CVAQ==
+-----END RSA PRIVATE KEY-----
diff --git a/data/mnet/Common/cdr/include/CdrBase.h b/data/mnet/Common/cdr/include/CdrBase.h
new file mode 100644
index 0000000..ffd97b1
--- /dev/null
+++ b/data/mnet/Common/cdr/include/CdrBase.h
@@ -0,0 +1,179 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+// CdrBase.h: interface for the CCdrBase class.
+//
+//////////////////////////////////////////////////////////////////////
+#ifndef _CDR_BASE_H_
+#define _CDR_BASE_H_
+
+#include <time.h>
+
+#include "CdrInterface.h"
+
+#include "subsc/SubscInfoType.h" // in common vob - klim 11/09/00
+#include "ril3/ril3msgheader.h"
+#include "ril3/ril3_common.h"
+#include "ril3/ie_cause.h"
+#include "ril3/ie_calling_bcd.h"
+#include "ril3/ie_called_bcd.h"
+
+
+#define CNI_RIL3_CAUSE_SUCCESS ((T_CNI_RIL3_CAUSE_VALUE)255)
+#define CDR_CURRENT_VERSION_NUM 2
+
+typedef ubyte4 T_CDR_EVENT_REFERENCE_NUMBER;
+
+
+// CDR data types
+typedef enum
+{
+ CDR_REC_NORM_RELEASE = 0,
+ CDR_REC_PARTIAL = 1,
+ CDR_REC_PARTIAL_REC_CALL_REESTABLISHMENT = 2,
+ CDR_REC_UNSUCCESSFUL_CALL_ATTEMPT = 3,
+ CDR_REC_STABLE_CALL_ABNORMAL_TERM = 4,
+ CDR_REC_CAMEL_INIT_CALL_RELEASE = 5
+
+} CdrRecCauseTerm_t;
+
+
+typedef enum {
+ CDR_RECORD_TYPE_MOC =0 ,
+ CDR_RECORD_TYPE_MTC =1 ,
+ CDR_RECORD_TYPE_MOSMS =6 ,
+ CDR_RECORD_TYPE_MTSMS =7 ,
+ CDR_RECORD_TYPE_SSA =10,
+ CDR_RECORD_TYPE_CTR =11,
+ CDR_RECORD_TYPE_INVALID =99,
+} T_CDR_RECORD_TYPE;
+
+
+typedef enum {
+ CDR_FIELD_NOT_SET = 0, // the field has not being set at all
+ CDR_FIELD_SET_AND_PRINTED = 1, // the field has been set and has been printed already
+ CDR_FIELD_SET_BUT_NOT_PRINT = 2 // the field has been set but never been printed yet.
+} T_CDR_FIELD_STATUS;
+
+
+// CDR Field E164
+class CCdrFieldE164
+{
+public:
+ T_CDR_FIELD_STATUS status ;
+ char buffer[23]; // pre-formated ascii string
+
+ void initialize () { buffer[0]='\0'; status=CDR_FIELD_NOT_SET;};
+ CCdrFieldE164() { initialize(); };
+ virtual ~CCdrFieldE164() {};
+ char * string ();
+ void set (T_SUBSC_IE_ISDN *p_e164);
+ void set (T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER *);
+ void set (T_CNI_RIL3_IE_CALLING_PARTY_BCD_NUMBER *);
+};
+
+// CDR Field IMSI
+class CCdrFieldIMSI
+{
+public:
+ T_CDR_FIELD_STATUS status ;
+ char buffer[16]; // pre-formated ascii string
+
+ void initialize () { buffer[0]='\0'; status=CDR_FIELD_NOT_SET;};
+ CCdrFieldIMSI() { initialize(); };
+ virtual ~CCdrFieldIMSI() {};
+ void set (T_SUBSC_IE_MOBILE_ID_IMSI *p_IMSI) ;
+ char * string ();
+};
+
+// CDR Field IMEI
+class CCdrFieldIMEI
+{
+public:
+ T_CDR_FIELD_STATUS status ;
+ char buffer[20]; // pre-formated ascii string
+
+ void initialize () { buffer[0]='\0'; status=CDR_FIELD_NOT_SET;};
+ CCdrFieldIMEI() { initialize();};
+ virtual ~CCdrFieldIMEI() {};
+ void set (T_CNI_RIL3_IE_MOBILE_ID *p_IMEI) ;
+ char * string ();
+};
+
+// CDR Field LACID
+class CCdrFieldLACID
+{
+public:
+ T_CDR_FIELD_STATUS status;
+ char buffer[20]; // pre-formated ascii string
+
+ void initialize () { buffer[0]='\0'; status=CDR_FIELD_NOT_SET;};
+ CCdrFieldLACID() { initialize();};
+ virtual ~CCdrFieldLACID() {};
+ void set (T_CNI_RIL3_IE_LOCATION_AREA_ID *p_la_id ,
+ T_CNI_RIL3_IE_CELL_ID *p_cell_id);
+ char * string ();
+};
+
+
+// CDR FIeld Date and Time
+class CCdrFieldDateTime
+{
+private:
+ time_t lTime ; // current system time (not UTC)
+ char buffer[16]; // pre-formated ascii string
+
+public:
+ T_CDR_FIELD_STATUS status;
+
+ CCdrFieldDateTime() { initialize();};
+ virtual ~CCdrFieldDateTime() {};
+
+ void initialize () { buffer[0] = '\0' ;
+ lTime = 0 ;
+ status = CDR_FIELD_NOT_SET;};
+ time_t getTime () { return (lTime); }
+ void stamp (); // stamp the current date and time into buffer
+ char * string ();
+};
+
+
+// CDR Base Class
+class CCdrBase
+{
+protected:
+ T_CDR_RECORD_TYPE record_type;
+ T_CDR_EVENT_REFERENCE_NUMBER event_ref_number;
+ CCdrFieldIMSI served_imsi;
+ CCdrFieldE164 served_msisdn;
+
+public:
+ unsigned short count;
+ CdrMessage_t cdr_msg;
+
+ CCdrBase();
+ virtual ~CCdrBase();
+
+ virtual void initialize ();
+
+ void setRecordType (T_CDR_RECORD_TYPE type) { cdr_msg.msgType=record_type=type; };
+ T_CDR_RECORD_TYPE getRecordType () { return record_type; };
+ void setServedIMSI (T_SUBSC_IE_MOBILE_ID_IMSI *p_imsi)
+ { served_imsi.set(p_imsi); };
+ void setServedMSISDN(T_SUBSC_IE_ISDN *p_msisdn)
+ { served_msisdn.set(p_msisdn); };
+ void printBaseFields(); // print all the fields into outbuffer
+ void generateRecord (); // send the record to the CDR client
+ T_CDR_EVENT_REFERENCE_NUMBER
+ getEventRefNumber() { return event_ref_number; };
+
+};
+
+
+// This class should NOT be used directly. This is a base class to derive
+// CTR, VoiceCall, SSA, and SMS records
+
+#endif // _CDR_BASE_H_ \ No newline at end of file
diff --git a/data/mnet/Common/cdr/include/CdrCommon.h b/data/mnet/Common/cdr/include/CdrCommon.h
new file mode 100644
index 0000000..9bf7fd9
--- /dev/null
+++ b/data/mnet/Common/cdr/include/CdrCommon.h
@@ -0,0 +1,132 @@
+#ifndef __CDRCOMMON_H__
+#define __CDRCOMMON_H__
+
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CdrCommon.h
+// Author(s) : Igal Gutkin
+// Create Date : 06/20/00
+// Description :
+//
+// *******************************************************************
+
+#include "defs.h"
+
+// TCP Port number for CDR client to CDR server level 1 connection
+#define AM_MAIN_SERVER_PORT 11790
+
+// TCP Port number for client connection to CDR server level 2
+//#define CDR_MAIN_CONTROL_PORT 11792
+//#define CDR_MAIN_DATA_PORT 11793
+#define CDR_IPC_PORT 11794
+
+#define CDR_HEADER_SIZE 1 // CDR header length
+
+#define CDR_MAX_HEADER_LEN 100
+#define CDR_MAX_DATA_LENGTH 1200
+#define CDR_MAX_RECORD_LEN (CDR_MAX_DATA_LENGTH+CDR_MAX_HEADER_LEN)
+
+
+#define CDR_GENERIC_MSG_TYPE (0x1A2B3C4DL)
+
+#define CDR_FIELD_DELIMETER ' '
+
+// CDR Reference definitions
+#define CDR_INVALID_REFERENCE (0)
+#define CDR_MIN_REFERENCE (1)
+#define CDR_MAX_REFERENCE (0xFFFF)
+
+// CDR Version numbers
+#define CDR_INVALID_FORMAT_VER 0
+#define CDR_FORMAT_VER_1 1
+#define CDR_FORMAT_VER_2 2
+#define CDR_FORMAT_VER_3 3
+#define CDR_FORMAT_VER_4 4
+#define CDR_FORMAT_VER_5 5
+
+//Cdr Error codes
+#define CDR_STATUS_OK SOCKET_STATUS_OK
+#define CDR_STATUS_MSG_TOO_LONG SOCKET_STATUS_MSG_TOO_LONG
+#define CDR_STATUS_TEMP_SOC_ERR SOCKET_STATUS_TEMP_SOC_ERR
+#define CDR_STATUS_FATAL_SOC_ERR SOCKET_STATUS_FATAL_SOC_ERR
+
+// Buffer lengths
+#define CTRL_SOC_RCV_BUFF_LEN (0x1000)
+#define CTRL_SOC_SND_BUFF_LEN (0x1000)
+#define DATA_SOC_RCV_BUFF_LEN (0x500)
+#define DATA_SOC_SND_BUFF_LEN (0x10000)
+
+typedef char CdrLogPool_t [CDR_MAX_RECORD_LEN ];
+typedef char CdrRecPool_t [CDR_MAX_DATA_LENGTH];
+
+
+// CDR password filename
+#define CDR_PWD_FILE_NAME "cdrpwd.dat"
+
+
+typedef enum
+{
+ SOCK_ERROR = SOC_STATUS_ERROR,
+ SOCK_NORMAL = 0,
+ SOCKET_CLOSED = 1,
+ FILE_FULL = 2,
+ REGISTER_TIMEOUT = 3,
+ STATUS_QUERY_TIMEOUT= 4,
+ FILE_ACK_TIMEOUT = 5,
+ DATA_TIMEOUT = 6,
+ SHUTDOWN_CLIENT = 7
+
+} CDR_SOCK_RESULT;
+
+enum RegisterCause
+{
+ INIT_CAUSE,
+ FILE_TRANSFER_CAUSE
+};
+
+typedef enum
+{
+ CURRENT ,
+ FINISHED,
+ UNACK ,
+ ACK
+}CDR_FILE_EXTENSIONS;
+
+typedef enum
+{
+ DELETE_ENTRY ,
+ ADD_ENTRY ,
+ WRITE_FILE_CLOSE_TIME ,
+ WRITE_FILE_TRANSFER_TIME ,
+ WRITE_FILE_TRANSFER_STATUS
+
+} CDR_TIMESTAMP_FILE_OP;
+
+struct timeStampRec
+{
+ char fileName[MAX_PATH-1];
+ bool fileTransfer;
+ ubyte4 fileOpenTime;
+ ubyte4 fileCloseTime;
+ ubyte4 fileTransferTime;
+
+};
+
+typedef struct
+{
+ struct timeStampRec* rec;
+ sbyte4 numEntries;
+
+} timeStampStruct;
+
+
+#endif //__CDRCOMMON_H__
diff --git a/data/mnet/Common/cdr/include/CdrInterface.h b/data/mnet/Common/cdr/include/CdrInterface.h
new file mode 100644
index 0000000..701216f
--- /dev/null
+++ b/data/mnet/Common/cdr/include/CdrInterface.h
@@ -0,0 +1,87 @@
+#ifndef CDR_INTERFACE_H
+#define CDR_INTERFACE_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc, 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CdrInterface.h
+// Author(s) : Igal Gutkin
+// Create Date : 07-25-00
+// Description : CDR module interface to the CDR application classes
+//
+// *******************************************************************
+
+#ifndef __CDRCOMMON_H__
+#include "CdrCommon.h"
+#endif //__CDRCOMMON_H__
+
+
+// CDR message storage
+typedef struct
+{
+ ubyte4 msgType;
+ CdrRecPool_t record ;
+} CdrMessage_t;
+
+
+#ifdef __cplusplus
+ extern "C"
+ {
+
+ // CDR control functions
+ /*-------------------------------------------------------------*/
+
+ // Stop CDR logging
+ void cdrStopLog ();
+
+ // Start/resume CDR logging
+ void cdrStartLog ();
+
+ // CDR info functions
+ bool cdrGetStatus ();
+
+ bool _cdrSwitchServer (LPSTR ipAddr);
+
+ // CDR user functions
+ /*-------------------------------------------------------------*/
+
+ // Return unique CDR reference number
+ ubyte4 cdrAllocateRef ();
+
+ // Provide the local host IP address (network byte order!!!)
+ ubyte4 cdrGetLocalIp ();
+
+ // Send log to CDR subsystem
+ bool cdrSendLog (CdrMessage_t *);
+
+ // Save CDR password to the file
+ bool cdrSavePwd (LPCSTR lpPasswd);
+ }
+
+#else
+
+ // CDR control functions
+ void cdrStopLog (void);
+ void cdrStartLog (int );
+ bool cdrGetStatus (void);
+ bool _cdrSwitchServer (LPSTR ipAddr);
+
+ // CDR user functions
+ ubyte4 cdrAllocateRef (void);
+ ubyte4 cdrGetLocalIp (void);
+ bool cdrSendLog (CdrMessage_t *);
+
+ bool cdrSavePwd (LPCSTR lpPasswd);
+
+#endif // __cplusplus
+
+
+#endif // CDR_INTERFACE_H \ No newline at end of file
diff --git a/data/mnet/Common/cdr/include/CdrModule.h b/data/mnet/Common/cdr/include/CdrModule.h
new file mode 100644
index 0000000..d03f45c
--- /dev/null
+++ b/data/mnet/Common/cdr/include/CdrModule.h
@@ -0,0 +1,200 @@
+#ifndef __CDCMODULE_H__
+#define __CDRMODULE_H__
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CdrModule.h
+// Author(s) : Igal Gutkin
+// Create Date : 10/02/00
+// Description : CDR module class interface
+// Call Detail Recording (CDR) Client
+// Call Detail Recording is split into two parts. Much
+// of the work is done through the api functions providing
+// access to the record classes. However, a separate task
+// is used to perform network IO that is required to forward
+// the records to CDR Server which can cause some delay.
+// Thus, potentially lengthy operations can be done in the
+// background at a lower priority than call processing.
+// *******************************************************************
+
+#include "Os\JCModule.h"
+#include "Os\JCMsgQueue.h"
+#include "Os\JCTask.h"
+
+#include <usrLib.h>
+
+#include "AlarmCode.h"
+
+#include "CdrShellIntf.h"
+
+#include "CdrInterface.h"
+#include "cdrdefs.h"
+
+#include "CdrRefSem.h"
+#include "CdrRemClientSocket.h"
+
+
+// system definitions
+
+#define CDR_MSG_Q_MAX 128 // max msgs that can be queued
+#define CDR_MSG_SIZE_MAX sizeof (CdrMessage_t) // max bytes in a msg
+#define CDR_Q_OPTIONS JC_MSG_Q_FIFO // system options
+
+
+class CdrModule
+{
+// methods
+ public:
+
+// CDR API functions. Used by the CDR record classes
+friend void cdrDataPrint ();
+friend void cdrStartLog ();
+friend void cdrStopLog ();
+friend bool cdrGetStatus ();
+friend bool cdrSendLog (CdrMessage_t* msg);
+friend ubyte4 cdrAllocateRef ();
+friend ubyte4 cdrGetLocalIp ();
+friend int SysCommand_CDR (T_SYS_CMD cmd);
+
+ // Main loop entry point
+ static bool mainTaskHandle();
+
+ // Main access interface
+ static CdrModule *getInstance () {return (pCdr_) ;}
+
+ // Encrypts & write CDR access password to the file
+ static bool savePwd (LPCSTR lpPasswd);
+
+ // Alarm handling
+ static void raiseSslAlarm ();
+ static void cleanSslAlarm ();
+
+ static void raiseModuleAlarm (AlarmCode_t code);
+ static void cleanModuleAlarm ();
+
+ // Print operational information
+ void printInfo ();
+
+ // Test whether the CDR module is properly initialized
+ bool isSet () {return (pMainQueue_ != NULL && pSoc_ != NULL);}
+
+ // Test whether there is a connection to CDR server
+ bool isConnected () {return (srvOnline_);}
+
+ ubyte4 getServerIp () {return (srvrIp_ );}
+ ubyte2 getServerPort () {return (srvrPort_ );}
+
+ // use for debug purpose only
+ bool switchServer (ubyte4 newSrvrIp);
+
+ bool enableExtraInfo () { bExtraInfo_ = true ; }
+ bool disableExtraInfo () { bExtraInfo_ = false; }
+
+ private:
+
+ // Constructors & Destructor
+ CdrModule ();
+ ~CdrModule ();
+
+
+ // Create the module instance
+ static void create ();
+
+ // System Root control interface
+ static int sysCmdHandler (T_SYS_CMD cmd);
+
+ static bool readPwd ();
+
+ static LPSTR getPswdFile ();
+
+ // Setup the module task(s) and queue(s)
+ bool start ();
+
+ // Load init data
+ bool loadData ();
+
+ // Send log to the CDR module
+ bool submitRec (CdrMessage_t* msg);
+
+ // receive Msg from the incoming Queue
+ bool getMsg ();
+
+ // Access the module input queue
+ JCMsgQueue *getCdrMainQ () {return (pMainQueue_);}
+
+ // Allocate new CDR reference number
+ ubyte4 getNewRef () {return (localRef_.allocateRef());}
+
+ // setup socket connection to the CDR server
+ bool socketInit ();
+
+ // re-establish socket connection to the CDR server
+ bool socketReset ();
+
+ // Logging control interface
+ void enable () {logStatus_ = true ;}
+ void disable () {logStatus_ = false ;}
+ bool getStatus () {return (logStatus_);}
+
+
+// data members
+ private:
+
+ // provides information about using SSL
+ static bool bUseSSL_ ,
+ bUseMibSSL_;
+
+ static bool bExtraInfo_;
+
+
+ static char sPasswd_[SSL_MAX_PASSWORD_LENGTH+2];
+
+ // pointer to the module instance
+ static CdrModule *pCdr_ ;
+
+ // module system elements
+ static JCMsgQueue *pMainQueue_;
+ JCTask mainTask_ ;
+ JCMsgQueue *pReplayQ_ ;
+
+ // Alarm code
+ static AlarmCode_t majorAlarmCode_,
+ infoAlarmCode_ ;
+
+ // Client socket to the server
+ CdrRemClientSocket *pSoc_ ;
+
+ // CDR server parameters
+ ubyte4 srvrIp_ ;
+ ubyte2 srvrPort_ ;
+
+ // Local reference allocator
+ CdrRefSem localRef_ ;
+
+ // CDR Logging status
+ bool logStatus_;
+
+ // Cdr connection indicator
+ bool srvOnline_;
+
+ unsigned sentRecs_ ;
+ unsigned lostRecs_ ;
+
+ // message handling
+ unsigned inMsgSize_;
+ unsigned inMsgType_;
+ CdrMessage_t inMsgBuf_ ;
+ MNET_MODULE_ID fromModId_;
+
+};
+
+
+#endif //__CDRMODULE_H__ \ No newline at end of file
diff --git a/data/mnet/Common/cdr/include/CdrMsg.h b/data/mnet/Common/cdr/include/CdrMsg.h
new file mode 100644
index 0000000..adb41d6
--- /dev/null
+++ b/data/mnet/Common/cdr/include/CdrMsg.h
@@ -0,0 +1,112 @@
+#ifndef _CDRMSG_H_
+#define _CDRMSG_H_
+
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CdrMsg.h
+// Author(s) : Sandeep A.
+// Create Date : 9/26/00
+// Description :
+//
+// *******************************************************************
+
+#include "msgProc.h"
+
+
+#define INPUT_SIZE 8192 // Ananth: need to revisit the size
+#define REGISTER_MSG_TYPE (0x10000021)
+#define REGISTER_ACK_MSG_TYPE (0x10000031)
+
+#define FILE_ACK_MSG_TYPE (0x10000051)
+#define STATUS_QUERY_MSG_TYPE (0x10000061)
+#define STATUS_RESPONSE_MSG_TYPE (0x10000071)
+#define IPC_FILE_FULL_MSG_TYPE (0x10000151)
+
+#define REGISTER_TIMEOUT_MSG_TYPE (0x10000201)
+#define FILE_ACK_TIMEOUT_MSG_TYPE (0x10000211)
+#define STATUS_QUERY_TIMEOUT_MSG_TYPE (0x10000221)
+#define DATA_TIMEOUT_MSG_TYPE (0x10000231)
+
+// New error codes
+#define CDR_STATUS_FILE_TRANSFER_ERROR 5
+#define CDR_STATUS_NON_FATAL_SEND_ERROR 6
+#define CDR_STATUS_FATAL_SEND_ERROR 7
+
+#define CDR_NAME_MAX_SIZE 32
+
+#define FILE_ERROR (~1)
+
+
+typedef struct
+{
+ ubyte4 cause;
+ sbyte cdr1Name[CDR_NAME_MAX_SIZE];
+} RegisterData_t;
+
+typedef struct
+{
+ ubyte4 cdr1Id;
+} RegisterAckData_t;
+
+
+typedef struct
+{
+ // ubyte4 lastValidFileId;
+} FileAckData_t;
+
+typedef struct
+{
+ ubyte4 lastValidFileId;
+} StatusResponseData_t;
+
+typedef struct
+{
+ ubyte4 cdr1Id;
+ ubyte4 fileId;
+ sbyte4 fileSize;
+ ubyte4 fileOpenTime;
+ ubyte4 fileCloseTime;
+} StatusQueryData_t;
+
+typedef struct CdrControlMsg_t
+{
+ ClientInterfaceMsgHeader_t hdr;
+ union {
+ RegisterData_t registerData;
+ RegisterAckData_t registerAckData;
+ FileAckData_t fileAckData;
+ StatusQueryData_t statusQueryData;
+ StatusResponseData_t statusResponseData;
+ }body;
+} CdrControlMsg;
+
+typedef struct
+{
+ ubyte4 cdr1Id;
+ sbyte inmsgPool[INPUT_SIZE - 4];
+} FirstData_t;
+
+typedef struct
+{
+ sbyte inmsgPool[INPUT_SIZE];
+} NextData_t;
+
+
+typedef struct CdrDataMsg_t
+{
+ union {
+ FirstData_t firstData;
+ NextData_t nextData;
+ }data;
+}CdrDataMsg;
+
+#endif
diff --git a/data/mnet/Common/cdr/include/CdrRef.h b/data/mnet/Common/cdr/include/CdrRef.h
new file mode 100644
index 0000000..4723474
--- /dev/null
+++ b/data/mnet/Common/cdr/include/CdrRef.h
@@ -0,0 +1,38 @@
+#ifndef __CDRREF_H__
+#define __CDRREF_H__
+
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// File : cdrRef.h
+// Author(s) : Igal Gutkin
+// Create Date : 06/20/00
+// Description : interface for the CdrRef class
+//
+// *******************************************************************
+
+#include "CdrCommon.h"
+
+class CdrRef
+{
+public:
+ CdrRef() {;}
+ virtual ~CdrRef() {;}
+
+ static ubyte4 allocateRef ();
+ static ubyte4 getLastRef ();
+
+// data members
+private:
+ static ubyte4 lastRefNum_;
+};
+
+
+#endif // __CDRREF_H__ \ No newline at end of file
diff --git a/data/mnet/Common/cdr/include/CdrRefSem.h b/data/mnet/Common/cdr/include/CdrRefSem.h
new file mode 100644
index 0000000..793f12c
--- /dev/null
+++ b/data/mnet/Common/cdr/include/CdrRefSem.h
@@ -0,0 +1,42 @@
+#ifndef __CDRREFSEM_H__
+#define __CDRREFSEM_H__
+
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// File : CdrRefSem.h
+// Author(s) : Igal Gutkin
+// Create Date : 11/08/00
+// Description : Interface for the CdrRefSem class
+// Provides semaphore protection in the multitask environment
+// *******************************************************************
+
+#include "Os\JCMutex.h"
+
+#include "CdrCommon.h"
+
+#include "CdrRef.h"
+
+class CdrRefSem : public CdrRef
+{
+public:
+ CdrRefSem () : CdrRef (), mutex_() {}
+ virtual ~CdrRefSem () {}
+
+ ubyte4 allocateRef ();
+
+// data members
+private:
+ // Preserves generation of unique CDR ref numbers
+ JCMutex mutex_;
+};
+
+
+#endif // __CDRREFSEM_H__ \ No newline at end of file
diff --git a/data/mnet/Common/cdr/include/CdrRemClientSocket.h b/data/mnet/Common/cdr/include/CdrRemClientSocket.h
new file mode 100644
index 0000000..3642373
--- /dev/null
+++ b/data/mnet/Common/cdr/include/CdrRemClientSocket.h
@@ -0,0 +1,61 @@
+#ifndef __CDRREMCLIENTSOCKET_H__
+#define __CDRREMCLIENTSOCKET_H__
+
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CdrRemClientSocket.h
+// Author(s) : Igal Gutkin
+// Create Date : 06/20/00
+// Description : interface for the CdrRemClientSocket class.
+//
+// *******************************************************************
+
+#include "socket\GenClientSocket.h"
+
+#include "msgProc.h"
+
+
+#define CDR_CLIENT_SOC_RCV_BUFF_LEN (0x500)
+#define CDR_CLIENT_SOC_SND_BUFF_LEN (0x1024)
+
+class CdrRemClientSocket : public GenClientSocket
+{
+public:
+
+ CdrRemClientSocket ()
+ : GenClientSocket (CDR_CLIENT_SOC_SND_BUFF_LEN, CDR_CLIENT_SOC_RCV_BUFF_LEN)
+ {;}
+
+ CdrRemClientSocket (bool bEnableSSL, bool bEnableEncryption = true)
+ : GenClientSocket (CDR_CLIENT_SOC_SND_BUFF_LEN,
+ CDR_CLIENT_SOC_RCV_BUFF_LEN,
+ bEnableSSL ,
+ bEnableEncryption ) { ; }
+
+ virtual
+ ~CdrRemClientSocket () { ; }
+
+ int sendData (LPSTR szData);
+
+protected:
+
+private:
+ void zapLog ();
+
+// data members
+private:
+
+ ClientMsg_t outMsg_;
+
+};
+
+#endif //__CDRREMCLIENTSOCKET_H__ \ No newline at end of file
diff --git a/data/mnet/Common/cdr/include/CdrShellIntf.h b/data/mnet/Common/cdr/include/CdrShellIntf.h
new file mode 100644
index 0000000..fe47d40
--- /dev/null
+++ b/data/mnet/Common/cdr/include/CdrShellIntf.h
@@ -0,0 +1,39 @@
+#ifndef __CDRSHELLINTF_H__
+#define __CDRSHELLINTF_H__
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc, 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CdrShellIntf.h
+// Author(s) : Igal Gutkin
+// Create Date : 11/21/00
+// Description : CDR module shell interface definitions
+//
+// *******************************************************************
+
+#ifdef __cplusplus
+ extern "C"
+ {
+ void CdrDataPrint ();
+ void CdrEnableExtraInfo ();
+ void CdrDisableExtraInfo ();
+ int SavePwdCdr (LPCSTR lpPasswd);
+ void _CdrSendDebug ();
+ }
+#else
+ void CdrDataPrint (void);
+ void CdrEnableExtraInfo (void);
+ void CdrDisableExtraInfo (void);
+ int SavePwdCdr (LPCSTR lpPasswd);
+ void _CdrSendDebug (void);
+#endif //__cplusplus
+
+
+#endif //__CDRSHELLINTF_H__ \ No newline at end of file
diff --git a/data/mnet/Common/cdr/include/ConnList.h b/data/mnet/Common/cdr/include/ConnList.h
new file mode 100644
index 0000000..dea5486
--- /dev/null
+++ b/data/mnet/Common/cdr/include/ConnList.h
@@ -0,0 +1,98 @@
+#ifndef _CONNLIST_H_
+#define _CONNLIST_H_
+
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : ConnList.h
+// Author(s) : Igal Gutkin
+// Create Date : 6/22/00
+// Description :
+//
+// *******************************************************************
+
+#include "socket\GenSocket.h"
+
+// Forward declarations
+class ClientConnectionList;
+class ClientConnListIterator;
+
+
+// *******************************************************************
+// Class ClientConnection
+// *******************************************************************
+class ClientConnection {
+public:
+ friend class ClientConnectionList;
+ friend class ClientConnListIterator;
+
+ ClientConnection (GenSocket&);
+
+ virtual ~ClientConnection ();
+
+ OS_SPECIFIC_SOCKET_HANDLE getSocket() {return (connSock_.getSocket());}
+ GenSocket *getClient() {return (&connSock_) ;}
+
+ int serveClient (const fd_set *set);
+
+
+private:
+ GenSocket & connSock_;
+ ClientConnection *next_ ;
+
+ // No default constructor
+ ClientConnection();
+};
+
+
+// *******************************************************************
+// Class ClientConnectionList
+// *******************************************************************
+class ClientConnectionList {
+public:
+ friend class ClientConnListIterator;
+
+ ClientConnectionList ();
+ ~ClientConnectionList();
+
+ SOC_STATUS InsertClientConnection (ClientConnection *pConn);
+ SOC_STATUS DeleteClientConnection (ClientConnection *pConn);
+
+private:
+ ClientConnection *pConnListHead_;
+};
+
+
+// *******************************************************************
+// Class ClientConnListIterator
+// *******************************************************************
+class ClientConnListIterator {
+public:
+ ClientConnListIterator (ClientConnectionList& List) : theList_(List)
+ { pClientConn_ = theList_.pConnListHead_; }
+ ~ClientConnListIterator() {}
+
+ void Reset() { pClientConn_ = theList_.pConnListHead_; }
+ ClientConnection *Next ()
+ {
+ ClientConnection *pCurrConn = pClientConn_;
+ return (pCurrConn ? (pClientConn_ = pCurrConn->next_) : pCurrConn);
+ }
+
+ ClientConnection *Current() { return pClientConn_;}
+
+private:
+ ClientConnection *pClientConn_;
+ ClientConnectionList& theList_ ;
+};
+
+
+#endif /* _CONNLIST_H_ */
diff --git a/data/mnet/Common/cdr/include/msgProc.h b/data/mnet/Common/cdr/include/msgProc.h
new file mode 100644
index 0000000..4b30fd1
--- /dev/null
+++ b/data/mnet/Common/cdr/include/msgProc.h
@@ -0,0 +1,47 @@
+#ifndef _MSGPROC_H_
+#define _MSGPROC_H_
+
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : msgProc.h
+// Author(s) : Igal Gutkin
+// Create Date : 6/21/00
+// Description :
+//
+// *******************************************************************
+
+
+
+/* CDR Message common header */
+typedef struct
+{
+ ubyte4 msgType; // reserved for the future use
+ ubyte4 dataLen;
+} ClientInterfaceMsgHeader_t;
+
+#define clientMsgHdrLen (sizeof(ClientInterfaceMsgHeader_t))
+
+
+typedef struct
+{
+ char logData [CDR_MAX_DATA_LENGTH];
+} ClientCdrData_t;
+
+
+typedef struct
+{
+ ClientInterfaceMsgHeader_t hdr;
+ ClientCdrData_t msg;
+} ClientMsg_t;
+
+
+#endif /* _MSGPROC_H_ */
diff --git a/data/mnet/Common/cdr/src/CdrRef.cpp b/data/mnet/Common/cdr/src/CdrRef.cpp
new file mode 100644
index 0000000..54a3641
--- /dev/null
+++ b/data/mnet/Common/cdr/src/CdrRef.cpp
@@ -0,0 +1,49 @@
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 2.0
+// File : CdrRef.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 06/20/00
+// Description : implementation of the CdrRef class.
+//
+// *******************************************************************
+
+#include "cdrRef.h"
+
+
+//////////////////////////////////////////////////////////////////////
+// Static Data members declarations
+//////////////////////////////////////////////////////////////////////
+
+ubyte4 CdrRef::lastRefNum_ = CDR_INVALID_REFERENCE;
+
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////
+// Primary behaviour methods
+//////////////////////////////////////////////////////////////////////
+
+ubyte4 CdrRef::allocateRef ()
+{
+ if (++lastRefNum_ > CDR_MAX_REFERENCE)
+ lastRefNum_ = CDR_MIN_REFERENCE;
+
+ return (lastRefNum_);
+}
+
+
+ubyte4 CdrRef::getLastRef()
+{
+ return (lastRefNum_);
+}
diff --git a/data/mnet/Common/cdr/src/Makefile b/data/mnet/Common/cdr/src/Makefile
new file mode 100644
index 0000000..ca246f8
--- /dev/null
+++ b/data/mnet/Common/cdr/src/Makefile
@@ -0,0 +1,61 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+# Name of this App's Directory
+THIS_APP_DIR = cdr
+
+VOB2DIR = $(TOP_OF_VOB)\..\$(VOB)
+BINDIR = ..\bin
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\cdr_com.out
+else
+ MY_OUTPUT = $(OBJDIR)\cdr_com.out
+endif
+
+include $(VOB2DIR)\l3defs.mk
+
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) -r -o $@.tmp $(MODULE_OBJS)
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
diff --git a/data/mnet/Common/cdr/src/readme.txt b/data/mnet/Common/cdr/src/readme.txt
new file mode 100644
index 0000000..8a52ae0
--- /dev/null
+++ b/data/mnet/Common/cdr/src/readme.txt
@@ -0,0 +1 @@
+This folder contains source files common to CDR Client and CRD Server applications.
diff --git a/data/mnet/Common/cdr/src_client/CdrApi.cpp b/data/mnet/Common/cdr/src_client/CdrApi.cpp
new file mode 100644
index 0000000..c4e6a8e
--- /dev/null
+++ b/data/mnet/Common/cdr/src_client/CdrApi.cpp
@@ -0,0 +1,159 @@
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 2.0
+// File : CdrApi.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 11/08/00
+// Description : Application interface for the CDR subsystem
+//
+// *******************************************************************
+
+#include "stdafx.h"
+
+#include "CdrModule.h"
+
+/*******************************************************************************
+ *
+ * cdrStartLog, cdrStopLog, cdrGetStatus
+ *
+ * These functions are used to turn CDR logging On/Off and check current
+ * logging status
+ *
+ ********************************************************************************/
+
+void cdrStartLog ()
+{
+ if (CdrModule::getInstance())
+ CdrModule::getInstance()->enable();
+}
+
+
+void cdrStopLog ()
+{
+ if (CdrModule::getInstance())
+ CdrModule::getInstance()->disable();
+}
+
+
+bool cdrGetStatus ()
+{
+ if (CdrModule::getInstance())
+ return (CdrModule::getInstance()->getStatus());
+}
+
+
+/*******************************************************************************
+ *
+ * cdrAllocateRef Allocate a Call Detail Record
+ *
+ * This function is used to allocate a CDR record. Since CDR records are
+ * stored in the application context only new CDR Reference number will
+ * be issued.
+ *
+ * Call: newRefNum = cdrAllocateRef()
+ *
+ * newRefNum - This is a unique 16 bit number that can be used
+ * to identify the record by.
+ * Note: After reaching max value (65,536), the number
+ * will wrap and we start re-using the reference numbers.
+ *
+ ******************************************************************************/
+ubyte4 cdrAllocateRef ()
+{
+ ubyte4 newRef = 0;
+
+ AM_FUNC ("cdrAllocateRef", LAYER_ID);
+ AM_ENTER();
+
+ if (CdrModule::getInstance())
+ newRef = CdrModule::getInstance()->getNewRef();
+
+ AM_LEAVE ();
+ return (newRef);
+}
+
+
+/*******************************************************************************
+ *
+ * cdrGetLocalIp Provides the local host IP address to the CDR classes
+ *
+ * This function is using cached value initialized during the init.
+ *
+ * Call : uIpAddrr = cdrGetLocalIp()
+ *
+ * Return value: NULL on error;
+ *
+ ******************************************************************************/
+ubyte4 cdrGetLocalIp ()
+{
+ return (htonl(GenSocket::getLocalHostAddress()));
+}
+
+
+/*******************************************************************************
+ *
+ * cdrSendLog API for sending prepared CDR log to the CDR subsystem
+ *
+ * This function is used to send CDR log from the application to CDR subsystem.
+ * Should be invoked only by the CDR base class
+ * being allocated.
+ *
+ * Call: result = cdrSendLog (&recordPool)
+ *
+ * Return Value: true if success, otherwise - false
+ *
+ ******************************************************************************/
+bool cdrSendLog (CdrMessage_t* msg)
+{
+ if (CdrModule::getInstance())
+ return (CdrModule::getInstance()->submitRec (msg));
+ else
+ return (false);
+}
+
+
+/*******************************************************************************
+ *
+ * _cdrSwitchServer API for changing CDR Server IP address
+ *
+ * This function should be used for changing CDR Server IP address
+ * for DEBUG purposes ONLY!!!
+ * Should be invoked only by the CDR base class being allocated.
+ *
+ * Call: result = _cdrSwitchServer (char* ipAddress)
+ *
+ * Input Parameter: string containing an (Ipv4) Internet Protocol dotted address
+ * Return Value : true if success, otherwise - false
+ *
+ ******************************************************************************/
+bool _cdrSwitchServer (LPSTR ipAddr)
+{
+ bool retVal = false ;
+ unsigned len = strlen(ipAddr);
+ ubyte4 srvrIp ;
+
+ if (len < 7 || len > 15)
+ {
+ printf ("Invalid IP address length.\n");
+ }
+ else if ((srvrIp=inet_addr(ipAddr)) == INADDR_NONE)
+ {
+ printf ("Invalid IP address (%s) is provided\n", ipAddr);
+ }
+ else
+ {
+ if (CdrModule::getInstance())
+ retVal = CdrModule::getInstance()->switchServer(srvrIp);
+ else
+ printf ("Cdr Client module is not allocated properly.\n");
+ }
+
+ return (retVal);
+} \ No newline at end of file
diff --git a/data/mnet/Common/cdr/src_client/CdrBase.cpp b/data/mnet/Common/cdr/src_client/CdrBase.cpp
new file mode 100644
index 0000000..158f6ae
--- /dev/null
+++ b/data/mnet/Common/cdr/src_client/CdrBase.cpp
@@ -0,0 +1,222 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+// CdrBase.cpp: implementation of the CCdrBase class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#include "StdAfx.h"
+
+#include "CdrBase.h"
+
+bool CDR_Enable_Debug = false;
+
+
+// CDR Field E164
+
+void CCdrFieldE164::set(T_SUBSC_IE_ISDN *p_e164)
+{
+ if (p_e164->num_digit)
+ {
+ p_e164->digits[ (p_e164->num_digit>MAX_NUM_SUBSC_ISDN)? MAX_NUM_SUBSC_ISDN : p_e164->num_digit]=0;
+ sprintf (buffer, "%02X%s", (p_e164->num_plan[0] & 0x7F), p_e164->digits);
+ status = CDR_FIELD_SET_BUT_NOT_PRINT;
+ }
+}
+
+void CCdrFieldE164::set (T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER *pNum)
+{
+ unsigned offset ,
+ index = 0,
+ numDigits = (pNum->numDigits > CNI_RIL3_MAX_BCD_DIGITS)
+ ? CNI_RIL3_MAX_BCD_DIGITS
+ : pNum->numDigits ;
+
+ // correction for zero lenght number
+ if (pNum->numDigits)
+ {
+ offset = sprintf (buffer, "%1X%1X", pNum->numberType, pNum->numberingPlan);
+
+ // print BCD digits
+ while (index < numDigits)
+ {
+ *(buffer + offset + index) = 0x30 + pNum->digits [index++];
+ }
+
+ *(buffer + offset + index) = '\0';
+
+ status=CDR_FIELD_SET_BUT_NOT_PRINT;
+ }
+}
+
+void CCdrFieldE164::set (T_CNI_RIL3_IE_CALLING_PARTY_BCD_NUMBER *pNum)
+{
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER shortForm;
+
+ shortForm.ie_present = pNum->ie_present ;
+ shortForm.numberType = pNum->numberType ;
+ shortForm.numberingPlan = pNum->numberingPlan;
+ shortForm.numDigits = pNum->numDigits ;
+ memcpy (shortForm.digits, pNum->digits, CNI_RIL3_MAX_BCD_DIGITS);
+
+ set (&shortForm);
+}
+
+
+char * CCdrFieldE164::string()
+{
+ status=CDR_FIELD_SET_AND_PRINTED;
+ return buffer;
+};
+
+
+// CDR Field IMSI
+
+void CCdrFieldIMSI::set(T_SUBSC_IE_MOBILE_ID_IMSI *p_IMSI)
+{
+ p_IMSI->imsi[ (p_IMSI->num_digit>MAX_NUM_SUBSC_IMSI) ? MAX_NUM_SUBSC_ISDN : p_IMSI->num_digit ]=0;
+ sprintf(buffer, "%s", p_IMSI->imsi);
+ status=CDR_FIELD_SET_BUT_NOT_PRINT;
+};
+
+char * CCdrFieldIMSI::string()
+{
+ status=CDR_FIELD_SET_AND_PRINTED;
+ return buffer;
+};
+
+void CCdrFieldIMEI::set (T_CNI_RIL3_IE_MOBILE_ID *pIMEI)
+{
+ unsigned index = 0;
+
+ // print BCD digits
+ while (index < 15)
+ {
+ buffer [index] = 0x30 + pIMEI->digits [index++];
+ }
+
+ buffer[index] = '\0';
+
+ status = CDR_FIELD_SET_BUT_NOT_PRINT;
+}
+
+
+char * CCdrFieldIMEI::string()
+{
+ status = CDR_FIELD_SET_AND_PRINTED;
+ return (buffer);
+}
+
+// CDR Field LACID
+
+void CCdrFieldLACID::set(T_CNI_RIL3_IE_LOCATION_AREA_ID *p_la_id, T_CNI_RIL3_IE_CELL_ID *p_cell_id)
+{
+ sprintf (buffer, "%1u%1u%1u%1u%1u%1x%04X%04X",
+ p_la_id->mcc[0], p_la_id->mcc[1], p_la_id->mcc[2],
+ p_la_id->mnc[0], p_la_id->mnc[1], ((unsigned)p_la_id->mnc[2] > 9) ? 0xF : p_la_id->mnc[2],
+ (unsigned short)p_la_id->lac , (unsigned short)p_cell_id->value);
+
+ status = CDR_FIELD_SET_BUT_NOT_PRINT;
+};
+
+char * CCdrFieldLACID::string()
+{
+ status = CDR_FIELD_SET_AND_PRINTED;
+ return buffer;
+};
+
+
+// CDR Field Date and Time
+
+void CCdrFieldDateTime::stamp()
+{
+ // The following time function comes from standard ANSI library.
+ // Therefore, the body of the code, including type/structure definition are
+ // the same for both Windows NT and VxWorks environment. No conditional
+ // compilation is needed between the two operating systems.
+
+ struct tm *gmt;
+
+ time (&lTime); // get local time
+ gmt = gmtime (&lTime); // convert to UTC time
+
+ // the final format is UTC time, YYMMDDhhmmss
+ sprintf(buffer,"%02d%02d%02d%02d%02d%02d",
+ gmt->tm_year % 100, // year since 1900
+ gmt->tm_mon + 1 , // month since Jan 0..11
+ gmt->tm_mday , // day of the month 1..31
+ gmt->tm_hour , // hours after midnight 0..23
+ gmt->tm_min , // minutes after hour 0..59
+ gmt->tm_sec // seconds after minutes 0..59
+ );
+
+ status = CDR_FIELD_SET_BUT_NOT_PRINT;
+}
+
+
+char * CCdrFieldDateTime::string()
+{
+ status=CDR_FIELD_SET_AND_PRINTED;
+ return buffer;
+};
+
+// CDR Base class
+void CCdrBase::initialize()
+{
+ count =0 ;
+ cdr_msg.record[0] ='\0';
+ record_type = CDR_RECORD_TYPE_INVALID;
+ event_ref_number = cdrAllocateRef () ;
+
+ served_imsi.initialize ();
+ served_msisdn.initialize ();
+}
+
+
+CCdrBase::CCdrBase()
+{
+ initialize();
+}
+
+CCdrBase::~CCdrBase()
+{
+}
+
+void CCdrBase::printBaseFields()
+{
+ // print all the fields of this class to the outbuffer
+ //
+ // A2=IP-address field of the recording entity
+ // A3=Event Reference Number
+ // A4=Served IMSI
+ // A5=Served MSISDN
+ // A6=CDR Format Version (current = 2)
+ // A7=Record Type
+ count+=sprintf(&cdr_msg.record[count],"A2=%08X", cdrGetLocalIp());
+ count+=sprintf(&cdr_msg.record[count],"%cA3=%d",CDR_FIELD_DELIMETER,event_ref_number);
+ if(served_imsi.status==CDR_FIELD_SET_BUT_NOT_PRINT)
+ count+=sprintf(&cdr_msg.record[count],"%cA4=%s",CDR_FIELD_DELIMETER,served_imsi.string());
+ if(served_msisdn.status==CDR_FIELD_SET_BUT_NOT_PRINT)
+ count+=sprintf(&cdr_msg.record[count],"%cA5=%s",CDR_FIELD_DELIMETER,served_msisdn.string());
+ count+=sprintf(&cdr_msg.record[count],"%cA6=%u",CDR_FIELD_DELIMETER, CDR_CURRENT_VERSION_NUM);
+ count+=sprintf(&cdr_msg.record[count],"%cA7=%d",CDR_FIELD_DELIMETER,(unsigned long)record_type);
+}
+
+
+void CCdrBase::generateRecord()
+{
+ // print to stdout under debug control flag
+ if(CDR_Enable_Debug) printf("%s\n", cdr_msg.record);
+
+ // send the record to the CDR client
+ cdrSendLog(&cdr_msg);
+
+ // reset the output buffer to its initial state
+ count=0;
+ cdr_msg.record[0]='\0';
+}
+
+
diff --git a/data/mnet/Common/cdr/src_client/CdrMain.cpp b/data/mnet/Common/cdr/src_client/CdrMain.cpp
new file mode 100644
index 0000000..057a92a
--- /dev/null
+++ b/data/mnet/Common/cdr/src_client/CdrMain.cpp
@@ -0,0 +1,212 @@
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems Inc., 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 2.0
+// Status : Under development
+// File : CdrMain.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 09-09-00
+// Description : CDR client module main task function implementation
+//
+// *******************************************************************
+
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "StdAfx.h"
+
+#include <msgQLib.h>
+
+#include "AlarmCode.h"
+
+#include "CdrModule.h"
+
+
+//////////////////////////////////////////////////////////////////////
+// Static data members
+//////////////////////////////////////////////////////////////////////
+bool CdrModule::bExtraInfo_ =
+#ifdef _AM_DEBUG_
+ true;
+#else
+ false;
+#endif // _AM_DEBUG_
+
+//////////////////////////////////////////////////////////////////////
+// Cdr task main loop functions
+//////////////////////////////////////////////////////////////////////
+
+bool CdrModule::mainTaskHandle ()
+{
+ int errorCode;
+ bool retVal = true;
+
+ CdrModule * module = CdrModule::getInstance();
+
+ AM_FUNC ("CdrModule::mainTaskHandle", LAYER_ID);
+ AM_ENTER();
+
+ if (module && pMainQueue_)
+ {
+ // Load system data
+ if ((retVal = module->loadData()) == false)
+ {
+ raiseModuleAlarm (EC_CDR_CLIENT_INIT_FAILED);
+ module->disable ();
+
+ // keep going in order to allow the user to update a MIB variable when MIB is not
+ // initialized properly
+ // AM_RETURN (retVal);
+ }
+ else
+ {
+ cleanModuleAlarm ();
+ cleanSslAlarm ();
+
+ // Setup CDR Server connection
+ if (!module->socketInit())
+ {
+ AM_TRACE (("CDR Client: Unable to establish link to CDR Server.\n"));
+ // Continue. Will try to establish connection later
+ }
+
+ AM_TRACE (("CDR Server IP address is set to %#08lx (%s)\n", module->srvrIp_,
+ GenSocket::getIp(module->srvrIp_) ));
+
+ if (bExtraInfo_)
+ module->printInfo ();
+ }
+
+ module->mainTask_.JCTaskEnterLoop();
+
+ while (true)
+ {
+ // Allow other tasks with the same priority to run before retriving the next
+ // message from the Queue.
+ taskDelay (NO_WAIT);
+
+ if (module->getMsg () == true)
+ {
+ AM_DEBUG (("CDR Client receivced a new message\n"));
+
+ if (!module->getStatus())
+ {
+ ++(module->lostRecs_);
+ AM_TRACE ( ("CDR Client: Logging is disabled. Discard the record %d.\n %s",
+ (module->sentRecs_+module->lostRecs_),
+ module->inMsgBuf_.record ) );
+ continue;
+ }
+
+ if (!module->isConnected() && !module->socketReset())
+ {
+ ++(module->lostRecs_);
+
+ raiseSslAlarm ();
+ raiseModuleAlarm (EC_CDR_CLIENT_UNABLE_CONNECT_SERVER);
+
+ AM_TRACE (("CDR Client: Failed connect to server. Discard the record %d:\n %s\n",
+ (module->sentRecs_+module->lostRecs_),
+ module->inMsgBuf_.record ));
+ continue;
+ }
+
+ cleanModuleAlarm ();
+ cleanSslAlarm ();
+
+ if (module->inMsgBuf_.msgType == CDR_GENERIC_MSG_TYPE)
+ {
+ AM_DEBUG (("CDR Client: Processing new log:\n%100s\n", module->inMsgBuf_.record));
+
+ errorCode = module->pSoc_->sendData (module->inMsgBuf_.record);
+
+ switch (errorCode)
+ {
+ case CDR_STATUS_OK:
+ ++(module->sentRecs_);
+ AM_TRACE (("CDR Client: Record %d sent successully\n",
+ (module->sentRecs_+module->lostRecs_)));
+ break;
+
+ case CDR_STATUS_MSG_TOO_LONG:
+ // message can't be sent over the network
+ ++(module->lostRecs_);
+ AM_WARNING (("CDR Client: Record is too long. Discard record %d.\n",
+ (module->sentRecs_+module->lostRecs_) ));
+ break;
+
+ case CDR_STATUS_FATAL_SOC_ERR:
+ // fatal socket error
+ // attempt to reconnect to the CDR server
+ AM_TRACE (("CDR Client: Server connection is broken. Attempt to reconnect.\n"));
+ if (!module->socketReset())
+ {
+ ++(module->lostRecs_);
+
+ cleanModuleAlarm ();
+ raiseModuleAlarm (EC_CDR_CLIENT_UNABLE_CONNECT_SERVER);
+
+ AM_TRACE (("CDR Client: Failed reconnect to server. Discard record %d.\n",
+ (module->sentRecs_+module->lostRecs_)));
+ break;
+ }
+ // break is omitted intentionally, continue to resend
+
+ case CDR_STATUS_TEMP_SOC_ERR:
+ // non-fatal error
+ // buffer overloading. It's possible to retry
+ if (module->pSoc_->sendData (module->inMsgBuf_.record) == CDR_STATUS_OK)
+ {
+ ++(module->sentRecs_);
+ AM_TRACE (("CDR Client: Record %d resent successully\n",
+ (module->sentRecs_+module->lostRecs_)) );
+ }
+ else
+ {
+ ++(module->lostRecs_);
+ AM_TRACE (("CDR Client: Record sending has failed. Discard record %d.\n",
+ (module->sentRecs_+module->lostRecs_)) ) ;
+ }
+ break;
+
+ default:
+ AM_TRACE (("CDR Client: Unknown return code %d from CdrRemClientSocket::sendData.\n",
+ errorCode));
+ break;
+ }
+ }
+ else
+ {
+ ++(module->lostRecs_);
+ AM_TRACE (("CDR Client: Unknown CDR Message type %lx. Discard record %d.\n",
+ module->inMsgBuf_.msgType, (module->sentRecs_+module->lostRecs_)));
+ }
+ }
+ else if (pMainQueue_)
+ { // Error on the Queue
+ AM_ERROR (("CDR Client: Error on CDR task queue read attempt.\n"));
+ }
+ else
+ { // Queue is deleted. Exit
+ break;
+ }
+ } // while
+
+ }
+ else
+ {
+ AM_ERROR (("CDR Client module is not initialised.\n"));
+ retVal = false;
+ }
+
+ AM_RETURN (retVal);
+}
+
diff --git a/data/mnet/Common/cdr/src_client/CdrModule.cpp b/data/mnet/Common/cdr/src_client/CdrModule.cpp
new file mode 100644
index 0000000..f3d8389
--- /dev/null
+++ b/data/mnet/Common/cdr/src_client/CdrModule.cpp
@@ -0,0 +1,521 @@
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CdrModule.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 10/02/00
+// Description : CDR client module class implementation
+//
+// *******************************************************************
+
+#include "StdAfx.h"
+
+#include "CdrModule.h"
+
+
+//////////////////////////////////////////////////////////////////////
+// Static Data members declarations
+//////////////////////////////////////////////////////////////////////
+
+CdrModule *CdrModule::pCdr_ = NULL ;
+JCMsgQueue *CdrModule::pMainQueue_= NULL ;
+
+// SSL related variables
+bool CdrModule::bUseSSL_ = false;
+bool CdrModule::bUseMibSSL_= false;
+char CdrModule::sPasswd_[SSL_MAX_PASSWORD_LENGTH+2] = "";
+
+AlarmCode_t CdrModule::majorAlarmCode_ = EC_NOERROR;
+AlarmCode_t CdrModule::infoAlarmCode_ = EC_NOERROR;
+
+
+//////////////////////////////////////////////////////////////////////
+// Constructors/Destructors
+//////////////////////////////////////////////////////////////////////
+
+CdrModule::CdrModule ()
+ : mainTask_ ("tCdrClient" ),
+ fromModId_ (MNET_MAX_MODULE_IDS),
+ srvrPort_ (AM_MAIN_SERVER_PORT),
+ pReplayQ_ (NULL ),
+ pSoc_ (NULL ),
+ logStatus_ (true ),
+ srvOnline_ (false),
+ srvrIp_ (0),
+ sentRecs_ (0),
+ lostRecs_ (0),
+ inMsgType_ (0),
+ inMsgSize_ (0),
+ localRef_ ( )
+{
+ pCdr_ = this;
+}
+
+
+CdrModule::~CdrModule ()
+{
+ int tId = mainTask_.GetTaskId();
+
+ // Suspend CDR task
+ if (tId)
+ taskSuspend (tId);
+
+ mainTask_.JCTaskNormExit();
+
+ // Close opened files, sockets and etc. before the shutdown
+
+ if (pMainQueue_)
+ delete pMainQueue_;
+
+ if (pSoc_)
+ delete pSoc_;
+
+ pMainQueue_ = NULL;
+ pCdr_ = NULL;
+ pSoc_ = NULL;
+
+ bUseSSL_ = false;
+ *sPasswd_ = '\0';
+}
+
+
+//////////////////////////////////////////////////////////////////////
+// Static methods
+//////////////////////////////////////////////////////////////////////
+
+void CdrModule::create ()
+{
+ if (!pCdr_)
+ { // Create a single CDR client module instance
+ new CdrModule ();
+ }
+}
+
+
+int CdrModule::sysCmdHandler (T_SYS_CMD sysCmd)
+{
+ int retVal = true;
+
+ AM_FUNC ("CdrModule::sysCmdHandler", LAYER_ID);
+ AM_ENTER();
+
+ switch (sysCmd)
+ {
+ case SYS_START:
+ printf ("[CDR client] Received start notification.\n");
+
+ create ();
+
+ if (pCdr_)
+ {
+ if ((retVal = pCdr_->start()) == false)
+ delete pCdr_;
+ }
+ break;
+
+ case SYS_SHUTDOWN:
+ printf ("[CDR client] Received system shutdown notification.\n");
+
+ if (pCdr_)
+ delete pCdr_;
+
+ break;
+
+ case SYS_REBOOT:
+
+ printf ("[CDR client] Reboot ready.\n");
+
+ if (pCdr_)
+ delete pCdr_;
+
+ break;
+
+ default:
+ printf ("[CDR client] Ignore unknown system command %d.\n", sysCmd);
+ break;
+ }
+
+ AM_RETURN (retVal);
+}
+
+
+
+//////////////////////////////////////////////////////////////////////
+// Public methods
+//////////////////////////////////////////////////////////////////////
+void CdrModule::printInfo ()
+{
+ SslError_t tmpError;
+
+ printf ("=====================================\n");
+ printf ("CDR Client logging is %s\n", (getStatus() ? "On" : "Off"));
+
+ printf ("CDR Client Security is%s supported, %s \n",
+ (pSoc_->isSupportSSL() ? "" : " not" ),
+ (pSoc_->isEnableSSL () ? "enabled" : "disabled"));
+
+ if (bExtraInfo_ && isSSL())
+ {
+ if ((tmpError = pSoc_->getError()) != SSL_NO_ERROR)
+ printf ("Last SSL error detected = %u\n", tmpError);
+ }
+
+ if (isSet())
+ {
+ if (bExtraInfo_)
+ {
+ printf ("CDR Client is initialized properly.\nCDR Server socket Info:\n");
+ pSoc_->printInfo();
+ }
+ else
+ {
+ printf ("CDR Client is initialized properly.\nCDR Server is set to %s\n",
+ GenSocket::getIp(getServerIp()) );
+ }
+
+ printf ("CDR stats: records sent %lu, records lost %lu\n",
+ sentRecs_, lostRecs_ );
+ }
+ else
+ {
+ printf ("CDR Socket is not initialized properly.\n");
+
+ printf ("CDR server address is set to (%s)\n",
+ GenSocket::getIp(getServerIp()) );
+ }
+
+ printf ("=====================================\n");
+}
+
+
+
+//////////////////////////////////////////////////////////////////////
+// Private methods
+//////////////////////////////////////////////////////////////////////
+
+bool CdrModule::start ()
+{
+ bool retVal = false;
+
+ AM_FUNC ("CdrModule::start", LAYER_ID);
+ AM_ENTER();
+
+ pMainQueue_ = new JCMsgQueue (CDR_MSG_Q_MAX , // max msgs that can be queued
+ CDR_MSG_SIZE_MAX, // max bytes in a msg
+ CDR_Q_OPTIONS ); // message queue options
+
+ // spawn CDR task(s)
+ if (pMainQueue_)
+ {
+ retVal = (mainTask_.JCTaskSpawn (CDR_TASK_PRIORITY ,
+ CDR_TASK_OPTION ,
+ CDR_TASK_STACK_SIZE ,
+ (FUNCPTR)mainTaskHandle,
+ 0, 0, 0, 0, 0, 0, 0 , 0, 0, 0,
+ CDR_MODULE_ID ,
+ JC_CRITICAL_TASK ) != 0);
+ }
+
+ AM_RETURN (retVal);
+}
+
+
+bool CdrModule::submitRec (CdrMessage_t* msg)
+{
+ bool retVal = false;
+ size_t recLen = strlen (msg->record);
+
+ AM_FUNC ("CdrModule::submitRec", LAYER_ID);
+ AM_ENTER ();
+
+ if (recLen >= CDR_HEADER_SIZE &&
+ recLen < CDR_MAX_DATA_LENGTH )
+ {
+ msg->msgType = CDR_GENERIC_MSG_TYPE ;
+ recLen += sizeof(msg->msgType) + 1;
+
+ retVal = (pMainQueue_->JCMsgQSend (pMainQueue_ ,
+ msg->msgType ,
+ CDR_MODULE_ID ,
+ (char *)msg ,
+ recLen ,
+ JC_WAIT_FOREVER ,
+ JC_MSG_PRI_NORMAL) == OK);
+ }
+ else
+ {
+ AM_TRACE (("Invalid record length %d. Discard message:\n %100s\n",
+ recLen, msg->record));
+ }
+
+ AM_RETURN (retVal);
+}
+
+
+bool CdrModule::getMsg ()
+{
+ // receive messages from the queue
+ return (pMainQueue_->JCMsgQReceive (&pReplayQ_ ,
+ (unsigned *)&inMsgType_,
+ &fromModId_ ,
+ (char * )&inMsgBuf_ ,
+ &inMsgSize_ ,
+ WAIT_FOREVER ) != ERROR);
+}
+
+
+bool CdrModule::socketInit ()
+{
+ bool retVal = false;
+ AM_FUNC ("CdrModule::socketInit", LAYER_ID);
+ AM_ENTER();
+
+ if (!pSoc_) // Create a socket
+ {
+ // Use SSL function only when both SSL MIB variable is true
+ // and socket library supports SSL
+ // bUseMibSSL_ is preset with the MIB value
+ bUseSSL_ = bUseMibSSL_ && GenSocketSSL::isSupportSSL();
+
+ AM_DEBUG (("Cdr Client%s using SSL\n", (bUseSSL_ ? "" : " is not") ));
+
+ // set password and initalize SSL Client context
+ if (bUseSSL_)
+ GenClientSocket::initSslContext (strlen(sPasswd_) ? sPasswd_ : NULL);
+
+ pSoc_ = new CdrRemClientSocket (bUseSSL_);
+ }
+
+ if (pSoc_)
+ {
+ retVal = pSoc_->connectServer(srvrIp_, srvrPort_);
+ srvOnline_ = retVal;
+
+ if (!srvOnline_)
+ raiseSslAlarm();
+
+#ifdef _AM_DEBUG_
+ pSoc_->printInfo ();
+#endif // _AM_DEBUG
+ }
+ else
+ {
+ AM_ERROR (("CDR Client: unable to initiate link to CDR Server on %s:%u\n",
+ GenSocket::getIp(srvrIp_), srvrPort_ ));
+ }
+
+ AM_RETURN (retVal);
+}
+
+
+bool CdrModule::socketReset ()
+{
+ bool retVal = false;
+
+ AM_FUNC ("CdrModule::socketReset", LAYER_ID);
+ AM_ENTER();
+
+ if (!pSoc_) // Create it upon need
+ retVal = socketInit ();
+ else
+ { // reset the server conection
+ retVal = pSoc_->reconnect();
+ }
+
+ srvOnline_ = retVal;
+
+ AM_TRACE (("CDR server reconnect result %d\n", retVal));
+
+ AM_RETURN (retVal);
+}
+
+
+// Raise alarm for the recognized SSL problems (only first time)
+void CdrModule::raiseSslAlarm ()
+{
+ AM_FUNC ("CdrModule::raiseSslAlarm", LAYER_ID);
+ AM_ENTER();
+
+ if (infoAlarmCode_ == EC_NOERROR)
+ {
+ switch (GenSocketSSL::getError())
+ {
+ case SSL_BAD_PASSWORD:
+ infoAlarmCode_ = EC_CDR_CLIENT_BAD_SSL_PASSWORD_FILE;
+ break;
+ case SSL_BAD_KEY:
+ infoAlarmCode_ = EC_CDR_CLIENT_BAD_SSL_KEY_FILE ;
+ break;
+ case SSL_BAD_CA_ERROR:
+ case SSL_BAD_USER_CERT:
+ infoAlarmCode_ = EC_CDR_CLIENT_BAD_LOCAL_CERTIFICATE;
+ break;
+ case SSL_BAD_PEER_CERT:
+ infoAlarmCode_ = EC_CDR_CLIENT_BAD_PEER_CERTIFICATE ;
+ break;
+ default:
+ // either non-SSL or unrecognized error
+ // will open general communication problem alarm only
+ break;
+ }
+
+ if (infoAlarmCode_ != EC_NOERROR)
+ {
+ AM_DEBUG (("Raise CDR SSL alarm %u\n", infoAlarmCode_));
+ alarm_raise (CDR_MODULE_ID, CDR_CLIENT_ALARM_ERRCODE, infoAlarmCode_);
+ }
+ }
+
+ AM_LEAVE();
+}
+
+
+// Clean SSL alarm if any
+void CdrModule::cleanSslAlarm ()
+{
+ if (infoAlarmCode_ != EC_NOERROR)
+ {
+ alarm_clear (CDR_MODULE_ID, CDR_CLIENT_ALARM_ERRCODE, infoAlarmCode_);
+ infoAlarmCode_ = EC_NOERROR;
+ }
+}
+
+
+void CdrModule::raiseModuleAlarm (AlarmCode_t code)
+{
+ // raise new CDR alarm
+ if (majorAlarmCode_ == EC_NOERROR)
+ {
+ majorAlarmCode_ = code;
+ alarm_raise (CDR_MODULE_ID, CDR_CLIENT_ALARM_ERRCODE, majorAlarmCode_);
+ }
+}
+
+
+void CdrModule::cleanModuleAlarm ()
+{
+ if (majorAlarmCode_ != EC_NOERROR)
+ {
+ alarm_clear (CDR_MODULE_ID, CDR_CLIENT_ALARM_ERRCODE, majorAlarmCode_);
+ majorAlarmCode_ = EC_NOERROR;
+ }
+}
+
+
+
+// This function should be used for debug purpose only
+bool CdrModule::switchServer (ubyte4 newSrvrIp)
+{
+ bool retVal = false;
+
+ AM_FUNC ("CdrModule::switchServer", LAYER_ID);
+ AM_ENTER();
+
+ srvrIp_ = newSrvrIp;
+
+ if (pSoc_) // Release connection to the old server
+ {
+ delete pSoc_;
+ pSoc_ = NULL;
+ }
+
+ if (retVal = socketInit())
+ {
+ AM_TRACE (("Connected to the new CDR server %s \n", GenSocket::getIp(srvrIp_)));
+ }
+ else
+ {
+ AM_TRACE (("Failed connect to the new CDR server %s \n", GenSocket::getIp(srvrIp_)));
+ }
+
+ AM_RETURN (retVal);
+}
+
+
+bool CdrModule::savePwd (LPCSTR lpPasswd)
+{
+ bool retVal = false;
+
+ AM_FUNC ("CdrModule::savePwd", LAYER_ID);
+ AM_ENTER();
+
+ if (GenSocketSSL::isSupportSSL())
+ {
+ retVal = encryptPassword (lpPasswd, getPswdFile());
+ }
+ else
+ {
+ AM_ERROR (("SSL is not supported.\n"));
+ }
+
+ AM_RETURN (retVal);
+}
+
+
+bool CdrModule::readPwd ()
+{
+ bool retVal = false;
+
+ AM_FUNC ("CdrModule::readPwd", LAYER_ID);
+ AM_ENTER();
+
+ // Read password from the password file
+ if (GenSocketSSL::isSupportSSL() && !GenSocketSSL::isPswdSet())
+ {
+ retVal = decryptPassword (sPasswd_, getPswdFile());
+
+#ifdef _AM_DEBUG_
+ AM_DEBUG (("SSL password is \"%s\" of length %u\n",
+ sPasswd_, strlen (sPasswd_) ));
+#endif // _AM_DEBUG
+ }
+
+ AM_RETURN (retVal);
+}
+
+
+LPSTR CdrModule::getPswdFile ()
+{
+ static char szFile [MAX_PATH] = "" ;
+ static bool bSet = false;
+
+ if (!bSet)
+ {
+ LPSTR pRoot = NULL;
+ size_t length = 0 ;
+
+ // Construct full pathname for the SSL password file
+ pRoot = getenv ("MNET_BASE");
+
+ if (!pRoot || !*pRoot || (strlen (pRoot) > MAX_PATH - 10))
+ {
+ pRoot = DEF_ROOT_DIR;
+ }
+
+ if (pRoot)
+ length = strlen(pRoot);
+
+ sprintf (szFile, "%s%c%s", pRoot, ((length) ? DIR_DELIMITER : '\0'), CDR_PWD_FILE_NAME);
+
+ bSet = true;
+ }
+
+ return (szFile);
+}
+
+
+// Interface for the HTTP module
+int SavePwdCdr (LPCSTR lpPasswd)
+{
+ return ((int)CdrModule::savePwd(lpPasswd));
+}
+
+
diff --git a/data/mnet/Common/cdr/src_client/CdrRefSem.cpp b/data/mnet/Common/cdr/src_client/CdrRefSem.cpp
new file mode 100644
index 0000000..e3e9a87
--- /dev/null
+++ b/data/mnet/Common/cdr/src_client/CdrRefSem.cpp
@@ -0,0 +1,42 @@
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 2.0
+// File : CdrRefSem.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 06/20/00
+// Description : implementation of the CdrRefSem class.
+//
+// *******************************************************************
+
+#include "CdrRefSem.h"
+
+
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////
+// Primary behaviour methods
+//////////////////////////////////////////////////////////////////////
+
+ubyte4 CdrRefSem::allocateRef ()
+{
+ ubyte4 newRef;
+
+ mutex_.take ();
+
+ newRef = CdrRef::allocateRef();
+
+ mutex_.give ();
+
+ return (newRef);
+}
diff --git a/data/mnet/Common/cdr/src_client/CdrRemClientSocket.cpp b/data/mnet/Common/cdr/src_client/CdrRemClientSocket.cpp
new file mode 100644
index 0000000..8a517c8
--- /dev/null
+++ b/data/mnet/Common/cdr/src_client/CdrRemClientSocket.cpp
@@ -0,0 +1,71 @@
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 2.0
+// Status : Under development
+// File : CdrRemClientSocket.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 06/20/00
+// Description : Implementation of the CdrRemClient class.
+//
+// *******************************************************************
+
+#include "StdAfx.h"
+#include "CdrCommon.h"
+
+#include "CdrRemClientSocket.h"
+
+
+//////////////////////////////////////////////////////////////////////
+// Primary behaviour methods
+//////////////////////////////////////////////////////////////////////
+
+int CdrRemClientSocket::sendData (LPSTR szData)
+{
+ AM_FUNC ("CdrRemClientSocket::sendData", LAYER_ID);
+ AM_ENTER ();
+
+ int retVal = CDR_STATUS_FATAL_SOC_ERR;
+ size_t inDataLen = strlen (szData) + 1; // correction for terminating '0'
+ int sentDataLen , socError;
+
+ if (inDataLen <= CDR_MAX_DATA_LENGTH)
+ {
+ // Prepare the message structure
+ outMsg_.hdr.msgType = htonl (CDR_GENERIC_MSG_TYPE);
+ outMsg_.hdr.dataLen = htonl (inDataLen);
+ memcpy (outMsg_.msg.logData, szData, inDataLen);
+
+ inDataLen +=clientMsgHdrLen;
+
+ retVal = tcpSend ((sbyte *)&outMsg_, inDataLen);
+ }
+ else
+ {
+ retVal = CDR_STATUS_MSG_TOO_LONG;
+
+ AM_TRACE (("CDR data length %u exciding maximum. Discard the record.\n",
+ inDataLen));
+ }
+
+ AM_RETURN (retVal);
+}
+
+
+//////////////////////////////////////////////////////////////////////
+// Service methods
+//////////////////////////////////////////////////////////////////////
+
+
+void CdrRemClientSocket::zapLog()
+{
+ memset ((char *)&outMsg_, 0, sizeof outMsg_);
+}
+
+
diff --git a/data/mnet/Common/cdr/src_client/CdrSSA.cpp b/data/mnet/Common/cdr/src_client/CdrSSA.cpp
new file mode 100644
index 0000000..271d75d
--- /dev/null
+++ b/data/mnet/Common/cdr/src_client/CdrSSA.cpp
@@ -0,0 +1,124 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+// CdrSSA.cpp: implementation of the CCdrSSA class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#include "StdAfx.h"
+
+#include "Cdr\CdrSSA.h"
+
+
+CCdrSSA::CCdrSSA()
+ : CCdrBase (),
+ isInit (true )
+{
+ initialize ();
+}
+
+CCdrSSA::~CCdrSSA()
+{
+}
+
+void CCdrSSA::initialize ()
+{
+ // skip in for the very first time when is called by the constructor
+ if (!isInit)
+ CCdrBase::initialize ();
+ else
+ isInit = false;
+
+ setRecordType (CDR_RECORD_TYPE_SSA);
+
+ basic_service_code = 0 ;
+ basic_service_selector = 0 ;
+ basic_service_set = false;
+ correlated_event_ref_number = 0 ;
+ correlated_event_ref_number_set = false;
+
+ redirected_dn.initialize ();
+ transfer_dn.initialize ();
+ translated_redirected_dn.initialize ();
+ translated_transfer_dn.initialize ();
+}
+
+void CCdrSSA::setBearerServiceCode(unsigned char code)
+{
+ basic_service_set=true;
+ basic_service_selector=1;
+ basic_service_code=code;
+}
+
+void CCdrSSA::setTeleServiceCode(unsigned char code)
+{
+ basic_service_set=true;
+ basic_service_selector=2;
+ basic_service_code=code;
+}
+
+void CCdrSSA::setCorrelatedEventRefNumber( T_CDR_EVENT_REFERENCE_NUMBER event_number)
+{
+ correlated_event_ref_number_set=true;
+ correlated_event_ref_number=event_number;
+}
+
+void CCdrSSA::setRedirectedNumber(T_SUBSC_IE_ISDN * p_DN) { redirected_dn.set(p_DN); }
+void CCdrSSA::setTranslatedRedirectedNumber(T_SUBSC_IE_ISDN * p_DN){ translated_redirected_dn.set(p_DN); }
+void CCdrSSA::setTransferNumber(T_SUBSC_IE_ISDN * p_DN) { transfer_dn.set(p_DN); }
+void CCdrSSA::setTranslatedTransferNumber(T_SUBSC_IE_ISDN * p_DN) { translated_transfer_dn.set(p_DN); }
+
+void CCdrSSA::generateRecord(
+ T_CDR_SS_ACTION ss_action,
+ unsigned char ss_code,
+ T_CNI_RIL3_CAUSE_VALUE ss_cause
+ )
+{
+ CCdrFieldDateTime ss_action_time;
+
+ // get current time
+ ss_action_time.stamp();
+
+ // first generate common header fields
+ printBaseFields();
+
+ // print all the fields of this class to the outbuffer
+ //
+ // K1=SS Action
+ // K2=SS Code
+ // K3=SS Cause
+ // T5=SS Action Time
+ // N5=Redirected Number
+ // N6=Translated Redirected Number
+ // N7=Transfer Number
+ // N8=Translated Transfer Number
+ // B1=Basic Service Code
+ // R1=Correlated Event Reference Number
+ //
+ count+=sprintf(&cdr_msg.record[count],"%cK1=%02X",CDR_FIELD_DELIMETER,(unsigned long)ss_action);
+ count+=sprintf(&cdr_msg.record[count],"%cK2=%02X",CDR_FIELD_DELIMETER, ss_code);
+ count+=sprintf(&cdr_msg.record[count],"%cK3=%03d" ,CDR_FIELD_DELIMETER, ss_cause);
+
+ count+=sprintf(&cdr_msg.record[count],"%cT5=%s",CDR_FIELD_DELIMETER,ss_action_time.string());
+
+ if(redirected_dn.status==CDR_FIELD_SET_BUT_NOT_PRINT)
+ count+=sprintf(&cdr_msg.record[count],"%cN5=%s",CDR_FIELD_DELIMETER,redirected_dn.string());
+ if(translated_redirected_dn.status==CDR_FIELD_SET_BUT_NOT_PRINT)
+ count+=sprintf(&cdr_msg.record[count],"%cN6=%s",CDR_FIELD_DELIMETER,translated_redirected_dn.string());
+ if(transfer_dn.status==CDR_FIELD_SET_BUT_NOT_PRINT)
+ count+=sprintf(&cdr_msg.record[count],"%cN7=%s",CDR_FIELD_DELIMETER,transfer_dn.string());
+ if(translated_transfer_dn.status==CDR_FIELD_SET_BUT_NOT_PRINT)
+ count+=sprintf(&cdr_msg.record[count],"%cN8=%s",CDR_FIELD_DELIMETER,translated_transfer_dn.string());
+ if(basic_service_set)
+ count+=sprintf(&cdr_msg.record[count],"%cB1=%1d%02X",CDR_FIELD_DELIMETER,
+ basic_service_selector, basic_service_code );
+ if(correlated_event_ref_number_set)
+ count+=sprintf(&cdr_msg.record[count],"%cR1=%d",CDR_FIELD_DELIMETER, correlated_event_ref_number );
+
+ // send the generated record off to the CDR client
+ CCdrBase::generateRecord();
+}
+
diff --git a/data/mnet/Common/cdr/src_client/CdrSystem.cpp b/data/mnet/Common/cdr/src_client/CdrSystem.cpp
new file mode 100644
index 0000000..6f7f55a
--- /dev/null
+++ b/data/mnet/Common/cdr/src_client/CdrSystem.cpp
@@ -0,0 +1,98 @@
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CdrSystem.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 10/02/00
+// Description : System interface for CDR module
+//
+// *******************************************************************
+
+
+#include "stdafx.h"
+
+#include "CdrModule.h"
+
+
+int SysCommand_CDR (T_SYS_CMD cmd)
+{
+ return (CdrModule::sysCmdHandler (cmd));
+}
+
+
+void CdrDataPrint ()
+{
+ CdrModule * pInst = CdrModule::getInstance();
+
+ if (pInst)
+ pInst->printInfo();
+ else
+ printf ("CDR module is not started.\n");
+}
+
+
+bool cdrSavePwd (LPCSTR lpPasswd)
+{
+ bool retVal = false;
+ CdrModule * pInst = CdrModule::getInstance();
+
+ if (pInst)
+ retVal = pInst->savePwd (lpPasswd);
+ else
+ printf ("CDR module is not started.\n");
+
+ return (retVal);
+}
+
+
+void CdrEnableExtraInfo ()
+{
+ CdrModule::getInstance()->enableExtraInfo();
+}
+
+
+void CdrDisableExtraInfo ()
+{
+ CdrModule::getInstance()->disableExtraInfo();
+}
+
+
+// CDR debug input
+void _CdrSendDebug ()
+{
+ static CdrMessage_t msg ;
+ sbyte szHostName[MAX_PATH] ;
+ ubyte4 uHostIp = 0;
+ int ch ;
+
+ struct tm *currTime;
+ time_t lTime ;
+
+ // get a local host name
+ if (gethostname (szHostName, sizeof(szHostName)) != SOC_STATUS_ERROR)
+ {
+ uHostIp = htonl (cdrGetLocalIp());
+ }
+ else
+ *szHostName = '\0';
+
+ msg.msgType = CDR_GENERIC_MSG_TYPE;
+
+ /* Obtain coordinated universal time: */
+ time (&lTime );
+ currTime = gmtime (&lTime);
+ sprintf ((char *)msg.record, "Test CDR log number %d from virtual client on host %s (%s), %s",
+ cdrAllocateRef(), szHostName, GenSocket::getIp(uHostIp), asctime(currTime));
+
+ printf ("Sending CDR log: %s\n", msg.record);
+
+ cdrSendLog (&msg);
+}
diff --git a/data/mnet/Common/cdr/src_client/Makefile b/data/mnet/Common/cdr/src_client/Makefile
new file mode 100644
index 0000000..252ec4a
--- /dev/null
+++ b/data/mnet/Common/cdr/src_client/Makefile
@@ -0,0 +1,61 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+# Name of this App's Directory
+THIS_APP_DIR = cdr
+
+VOB2DIR = $(TOP_OF_VOB)\..\$(VOB)
+BINDIR = ..\bin
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\cdr_client.out
+else
+ MY_OUTPUT = $(OBJDIR)\cdr_client.out
+endif
+
+include $(VOB2DIR)\l3defs.mk
+
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) -r -o $@.tmp $(MODULE_OBJS)
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
diff --git a/data/mnet/Common/cdr/src_client/readme.txt b/data/mnet/Common/cdr/src_client/readme.txt
new file mode 100644
index 0000000..de5c2c5
--- /dev/null
+++ b/data/mnet/Common/cdr/src_client/readme.txt
@@ -0,0 +1 @@
+This folder contains source files common for the CDR Client applications.
diff --git a/data/mnet/Common/cdr/src_server/ConnList.cpp b/data/mnet/Common/cdr/src_server/ConnList.cpp
new file mode 100644
index 0000000..8ea9a77
--- /dev/null
+++ b/data/mnet/Common/cdr/src_server/ConnList.cpp
@@ -0,0 +1,177 @@
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : ConnList.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 6/21/00
+// Description :
+//
+// *******************************************************************
+
+
+#include "stdAfx.h"
+#include "ConnList.h"
+
+// *******************************************************************
+// Class ClientConnection
+// *******************************************************************
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ClientConnection constructor
+**
+** PURPOSE: Save the socket for this connection and initialize the next
+** pointer to be null.
+**
+** INPUT PARAMETERS: sock - socket for the new client connection
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+ClientConnection::ClientConnection (GenSocket& Client)
+ : connSock_ (Client), next_ (NULL)
+{
+ ;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ClientConnection destructor
+**
+** PURPOSE: Delete ClientConnection data members.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+ClientConnection::~ClientConnection ()
+{
+ delete &connSock_;
+}
+
+
+int ClientConnection::serveClient (const fd_set *set)
+{
+ GenSocket * notInUse = NULL; // dummy value
+
+ return (getClient()->serve(set, notInUse));
+}
+
+
+
+// *******************************************************************
+// Class ClientConnectionList
+// *******************************************************************
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ClientConnectionList constructor
+**
+** PURPOSE: Initialize list to be null.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+ClientConnectionList::ClientConnectionList()
+{
+ pConnListHead_ = NULL;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ClientConnectionList destructor
+**
+** PURPOSE: Delete ClientConnectionList data members.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+ClientConnectionList::~ClientConnectionList()
+{
+ ClientConnection *pPrevConn, *pCurrConn = pConnListHead_;
+
+ while (pCurrConn)
+ {
+ pPrevConn = pCurrConn;
+ pCurrConn = pCurrConn->next_;
+ delete pPrevConn;
+ }
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: InsertClientConnection
+**
+** PURPOSE: Insert an client connection at the head of the list.
+**
+** INPUT PARAMETERS: pConn - pointer to the connection object to be added.
+**
+** RETURN VALUE(S): SOC_STATUS_OK - for success
+** SOC_STATUS_ERROR - for failure
+**
+**----------------------------------------------------------------------------*/
+SOC_STATUS ClientConnectionList::InsertClientConnection (ClientConnection *pConn)
+{
+ pConn->next_ = pConnListHead_;
+ pConnListHead_ = pConn;
+ return (SOC_STATUS_OK);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DeleteClientConnection
+**
+** PURPOSE: Remove an client connection from the list of client connections.
+** The socket is used as the identifier to locate the client connection.
+**
+** INPUT PARAMETERS: sock - socket for the desired client connection
+**
+** RETURN VALUE(S): SOC_STATUS_OK - for success
+** SOC_STATUS_ERROR - for failure
+**
+**----------------------------------------------------------------------------*/
+SOC_STATUS ClientConnectionList::DeleteClientConnection (ClientConnection *pConn)
+{
+ ClientConnection *pCurrConn, *pPrevConn;
+ OS_SPECIFIC_SOCKET_HANDLE Socket = pConn->getSocket();
+
+ pCurrConn = pPrevConn = pConnListHead_;
+
+ while (pCurrConn)
+ {
+ if (pCurrConn->connSock_.getSocket() == Socket)
+ {
+ if (pCurrConn == pConnListHead_)
+ {
+ pConnListHead_ = pCurrConn->next_;
+ }
+ else
+ {
+ pPrevConn->next_ = pCurrConn->next_;
+ }
+
+ delete pCurrConn;
+ break;
+ }
+
+ pPrevConn = pCurrConn;
+ pCurrConn = pCurrConn->next_;
+ }
+
+ return (SOC_STATUS_OK);
+}
diff --git a/data/mnet/Common/cdr/src_server/Makefile b/data/mnet/Common/cdr/src_server/Makefile
new file mode 100644
index 0000000..3c7aaeb
--- /dev/null
+++ b/data/mnet/Common/cdr/src_server/Makefile
@@ -0,0 +1,62 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+# Name of this App's Directory
+THIS_APP_DIR = cdrserver
+
+VOB2DIR = $(TOP_OF_VOB)\..\$(VOB)
+BINDIR = ..\bin
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\cdr_common_src_server.out
+else
+ MY_OUTPUT = $(OBJDIR)\cdr_common_src_server.out
+endif
+
+include $(VOB2DIR)\l3defs.mk
+CC_INCLUDE += -I$(COMMON_VOB_DIR)/os
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) -r -o $@.tmp $(MODULE_OBJS)
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
diff --git a/data/mnet/Common/cdr/src_test/simulator.cpp b/data/mnet/Common/cdr/src_test/simulator.cpp
new file mode 100644
index 0000000..fd723a0
--- /dev/null
+++ b/data/mnet/Common/cdr/src_test/simulator.cpp
@@ -0,0 +1,278 @@
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 2.0
+// File : simulator.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 08/28/01
+// Description : Cdr Client simulator
+//
+// *******************************************************************
+
+#include "stdafx.h"
+#include "Os\JCCTimer.h"
+#include "Os\JCMsgQueue.h"
+#include "Os\JCTask.h"
+
+#include "CdrModule.h"
+
+#define CDR_DEFAULT_PERIOD 10
+#define CDR_SIM_PIPE "/pipe/cdrSimPipe"
+
+#ifdef __cplusplus
+ extern "C"
+ {
+ bool _CdrInitTest ();
+ void _CdrCleanTest ();
+
+ bool _CdrStartTest (unsigned period = 0, unsigned num = 0);
+ void _CdrStopTest ();
+
+ void _CdrSimCallback ();
+ bool _CdrSimHandle ();
+
+ void _CdrTestStatus ();
+ void _CdrSimHelp ();
+
+ }
+#endif
+
+// CDR message resend timer
+static JCCTimer *pCdrSimTimer;
+static JCMsgQueue *pCdrSimQueue;
+static JCTask *pCdrSimTask ;
+
+static unsigned uTime = CDR_DEFAULT_PERIOD;
+
+static int iMaxTimes = 0,
+ iCount = 0;
+
+static bool bCdrSimSet = false,
+ bCdrTestStart = false;
+
+//===================================================================
+
+void _CdrSimHelp ()
+{
+ printf ("Cdr Client Simulator Commands:\n\
+ _CdrTestStatus - print simulation status\n\
+ _CdrInitTest - initialize simulator\n\
+ _CdrCleanTest - remove simulator\n\
+ _CdrStartTest - begin simulation\n\
+ Parameters : (period [in 100 mS], number of messages [0 - unlimited]\n\
+ _CdrStopTest - end simulation\n");
+}
+
+
+bool _CdrInitTest ()
+{
+ bool retVal = false;
+
+ if (bCdrSimSet)
+ {
+ printf ("CDR simulator is initialized already\n");
+ return (true);
+ }
+
+ if ((pCdrSimTimer = new JCCTimer((FUNCPTR)_CdrSimCallback)) != NULL)
+ {
+ if ((pCdrSimQueue = new JCMsgQueue (200 , // max num of msgs
+ sizeof (int) , // max size of a msg
+ JC_MSG_Q_FIFO )) // message queue options
+ != NULL)
+ { // create and spawn simulator task
+ if (pCdrSimTask = new JCTask ("tCdrSim"))
+ {
+ if (pCdrSimTask->JCTaskSpawn (100, 0, 5000 ,
+ (FUNCPTR)_CdrSimHandle,
+ 0, 0, 0, 0, 0 ,
+ 0, 0, 0, 0, 0 ,
+ CDR_MODULE_ID ,
+ JC_NON_CRITICAL_TASK ) != ERROR)
+ {
+ retVal = true;
+ bCdrSimSet = true;
+ }
+ }
+ }
+ }
+
+ if (!retVal)
+ {
+ printf ("Unable to start CDR Client Simulator\n");
+ _CdrCleanTest ();
+ }
+
+ return (retVal);
+}
+
+
+void _CdrCleanTest ()
+{
+ // kill timer
+ if (pCdrSimTimer)
+ {
+ _CdrStopTest ();
+ delete pCdrSimTimer;
+ pCdrSimTimer = NULL;
+ }
+
+ // kill task
+ if (pCdrSimTask)
+ {
+ int tId = pCdrSimTask->GetTaskId();
+
+ taskSuspend (tId);
+ taskDelete (tId);
+ delete pCdrSimTask;
+ pCdrSimTask = NULL;
+ }
+
+ // kill queue
+ if (pCdrSimQueue)
+ {
+ delete pCdrSimQueue;
+ pCdrSimQueue = NULL;
+ }
+
+ bCdrSimSet = false;
+}
+
+// use resolution of 100 mSec
+// number of attempts = 0 ==> unlimited till stop is called
+bool _CdrStartTest (unsigned period, unsigned num)
+{
+ bool retVal = false;
+
+ if (bCdrSimSet || (retVal=_CdrInitTest()) )
+ {
+ if (!bCdrTestStart)
+ {
+ uTime = (period) ? period : CDR_DEFAULT_PERIOD;
+ iMaxTimes = (int)num;
+
+ pCdrSimTimer->setTimerMSec (period);
+ bCdrTestStart = true;
+ retVal = true;
+ printf ("CDR Client simulation begin\n");
+ }
+ else
+ printf ("CDR Client simulator is already started\n");
+ }
+
+ return (retVal);
+}
+
+
+void _CdrStopTest ()
+{
+ if (bCdrSimSet)
+ {
+ pCdrSimTimer->cancelTimer();
+
+ iMaxTimes = 0;
+ iCount = 0;
+ bCdrTestStart = false ;
+ uTime = CDR_DEFAULT_PERIOD;
+ }
+}
+
+
+void _CdrTestStatus ()
+{
+ if (bCdrSimSet)
+ {
+ printf ("CDR Client Simulator is %s\n", ((bCdrTestStart) ? "running" : "stoped") );
+ }
+ else
+ printf ("CDR Client Simulator is not initialized\n");
+}
+
+
+//===================================================================
+
+// simulator task handler
+bool _CdrSimHandle ()
+{
+ bool keepGoing = true;
+ CdrMessage_t msg ;
+ sbyte szHostName[MAX_PATH];
+ ubyte4 uHostIp = 0;
+ struct tm *currTime ;
+ time_t lTime ;
+
+ JCMsgQueue *pReplayQ ;
+ unsigned inMsgType ,
+ inMsgSize ,
+ inMsgBuf ;
+
+ MNET_MODULE_ID fromModId;
+
+ // Spin here forever waiting for simulator activations
+ while (keepGoing)
+ {
+ if (pCdrSimQueue->JCMsgQReceive (&pReplayQ ,
+ &inMsgType ,
+ &fromModId ,
+ (char *)&inMsgBuf,
+ &inMsgSize ,
+ WAIT_FOREVER ) != ERROR)
+ {
+ if (!uHostIp)
+ {
+ msg.msgType = CDR_GENERIC_MSG_TYPE;
+
+ // get a local host name
+ if (gethostname (szHostName, sizeof(szHostName)) != SOC_STATUS_ERROR)
+ {
+ uHostIp = htonl (cdrGetLocalIp());
+ }
+ else
+ *szHostName = '\0';
+ }
+
+ /* Obtain coordinated universal time: */
+ time (&lTime);
+ currTime = gmtime (&lTime);
+ sprintf ((char *)msg.record, "Test log number %u [ref. %u] from a virtual client on host %s [%s], %s",
+ iCount, cdrAllocateRef(), szHostName, GenSocket::getIp(uHostIp), asctime(currTime) );
+
+ cdrSendLog (&msg);
+ }
+ }
+
+ return (true);
+}
+
+
+// timer ISR call back
+void _CdrSimCallback ()
+{
+ static CdrMessage_t msg ;
+ static sbyte szHostName[MAX_PATH];
+ static ubyte4 uHostIp = 0;
+
+ struct tm *currTime;
+ time_t lTime ;
+
+ if (!iMaxTimes || iCount < iMaxTimes)
+ {
+ ++iCount;
+
+ pCdrSimQueue->JCMsgQSend (pCdrSimQueue, 0, CDR_MODULE_ID, (char *)&iCount, sizeof iCount,
+ JC_NO_WAIT, JC_MSG_PRI_NORMAL);
+
+ pCdrSimTimer->setTimerMSec (uTime, iCount);
+ }
+ else
+ {
+ _CdrStopTest ();
+ }
+
+}
diff --git a/data/mnet/Common/cli/Makefile b/data/mnet/Common/cli/Makefile
new file mode 100644
index 0000000..ff0ff37
--- /dev/null
+++ b/data/mnet/Common/cli/Makefile
@@ -0,0 +1,47 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+# (OPTIONAL) Append REPLACE - Replaces the List of directories
+# to be used in the SUBDIRS variable
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src REPLACE="src_api src_debug"
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+SUBDIRS = src vxsh
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..
+
+VOBDIR = $(TOP_OF_VOB)/../$(VOB)
+
+# Allows a sub-set of the source code directories to be used
+
+ifneq ($(REPLACE),)
+ SUBDIRS = $(REPLACE)
+endif
+
+include $(VOBDIR)\l3defs.mk
+
+
diff --git a/data/mnet/Common/cli/include/address.h b/data/mnet/Common/cli/include/address.h
new file mode 100644
index 0000000..64ea31b
--- /dev/null
+++ b/data/mnet/Common/cli/include/address.h
@@ -0,0 +1,188 @@
+/* $Id: address.h,v 10.7 1999/08/17 01:05:18 sutton Exp $
+ * $Source: /export/sbcc/cepro/h/parser/address.h,v $
+ *------------------------------------------------------------------
+ * Cisco MicroWeb Server Version 2
+ *
+ * File: address.h
+ * Description: Address(es) Header
+ * Owner: Prasanna Parthasarathy
+ * Notes:
+ *
+ * Copyright (c) 1997 by cisco Systems, Inc.
+ * All rights reserved.
+ *------------------------------------------------------------------
+ * $Log: address.h,v $
+ * Revision 10.7 1999/08/17 01:05:18 sutton
+ * Replaced red-black tree implementation with IOS code.
+ * CSCdm75775: Assert in cepro_201b11_dbg_cus1
+ *
+ * Revision 10.6 1999/08/05 20:53:51 vernikov
+ * CSCdm69411: delete of defualt gateway from GUI is BAD
+ *
+ * Revision 10.5.14.2 1999/08/16 23:18:33 sutton
+ * Replaced red-black tree implementation with code from IOS.
+ * CSCdm75775: Assert in cepro_201b11_dbg_cus1
+ * Branch: ROBIN202BR
+ *
+ * Revision 10.5.14.1 1999/08/05 20:51:27 vernikov
+ * CSCdm69411: delete of defualt gateway from GUI is BAD
+ * Branch: ROBIN202BR
+ *
+ * Revision 10.5 1999/03/30 02:15:17 vernikov
+ * CSCdm08933: Need validation during configuration of certain address
+ * fields
+ *
+ * Revision 10.4 1999/02/19 09:55:45 loril
+ * CSCdm02735: Add hostname support & martian validation in cli & gui
+ * where needed
+ *
+ * Revision 10.3 1998/10/07 03:03:41 pradeep
+ * CSCdk50280: ICP CLI needes to be checked in
+ *
+ * Revision 10.2 1998/07/11 16:51:04 sutton
+ * Straighten out some of the spaghetti dependencies between modules.
+ * CSCdk13101: merge MicroServer and Cache Engine source trees
+ *
+ * Revision 10.1 1998/06/09 17:41:39 sutton
+ * code merge
+ *
+ * Revision 1.2 1997/10/09 18:14:14 pparthas
+ * First Attempt to cleanup dead-code to reduce code-size; Included debug
+ * scheme in place
+ *
+ * Revision 1.1 1997/06/25 00:36:54 pparthas
+ * Initial Commit
+ *
+ *------------------------------------------------------------------
+ * $Endlog$
+ */
+
+#ifndef __ADDRESS_H__
+#define __ADDRESS_H__
+
+
+#define CLASS_A_BIT 0x80000000 /* off for class A, on for B, C, D */
+#define CLASS_B_BIT 0x40000000 /* off for class B, on for C, D */
+#define CLASS_C_BIT 0x20000000 /* off for class C, on for D */
+#define CLASS_D_BIT 0x10000000 /* off for class D */
+
+#define CLASSA_BIT 0x80 /* off for class A, on for B, C, D */
+#define CLASSB_BIT 0x40 /* off for class B, on for C, D */
+#define CLASSC_BIT 0x20 /* off for class C, on for D */
+#define CLASSD_BIT 0x10 /* off for class D */
+
+#define CLASS_A_MASK 0xFF000000 /* mask for class A net */
+#define CLASS_B_MASK 0xFFFF0000 /* mask for class B net */
+#define CLASS_C_MASK 0xFFFFFF00 /* mask for class C net */
+#define CLASS_D_MASK 0x00000000 /* mask for class D net??? */
+
+#define CLASS_A_SHIFT 24 /* A: bits shift to make int */
+#define CLASS_B_SHIFT 16 /* B: bits shift to make int */
+#define CLASS_C_SHIFT 8 /* C: bits shift to make int */
+
+#define ADDR_ILLEGAL 0 /* illegal address */
+#define ADDR_IP 1 /* IP address */
+
+#define ADDRLEN_IP 4
+
+/*
+ * Flag bit definitions for use in martian() api
+ */
+#define MARTIAN_FLAG_IS_HOST 0x01 /* TRUE => ipaddr is a host */
+ /* FALSE => ipaddr may be a */
+ /* network address */
+#define MARTIAN_FLAG_MULTICAST_ALLOWED 0x02 /* TRUE => do not consider a */
+ /* CLASS D ipaddr */
+ /* a martian addr */
+ /* FALSE => do consider a */
+ /* CLASS D ipaddr */
+ /* a martian addr */
+
+/*
+ * Special networks and addresses.
+ */
+#define IP_LOOPBACK_NET 0x7f000000 /* 127.0.0.0 */
+#define MASK_HOST 0xffffffff /* 255.255.255.255 */
+#define IP_LIMITED_BROADCAST 0xffffffff /* 255.255.255.255 */
+#define IP_BSD_LIMITED_BROADCAST 0 /* 0.0.0.0 */
+#define IPADDR_ZERO ((ipaddrtype) 0) /* for use as a default address */
+
+
+union addresses {
+ ipaddrtype ip_address;
+};
+
+#define ip_addr addr.ip_address
+
+typedef struct addrtype_ {
+ uchar type;
+ uchar length;
+ union addresses addr;
+} addrtype;
+
+/* Structure and #defines used in parser_ipaddr_or_hostname() api */
+
+typedef struct ipAddr_ {
+ ipaddrtype ipAddrNetOrder; /* network byte order */
+ ipaddrtype ipAddrHostOrder; /* host byte order */
+ char ipAddrStr[INET_ADDR_LEN]; /* dotted-decimal string */
+} ipAddr_t, *pIpAddr_t;
+
+/* Values of flags as the calling parameter to parser_ipaddr_or_hostname() */
+
+#define IPADDR_CLI_PROCESSING 0x01 /* TRUE => processing for cli
+ * FALSE => processing for gui
+ */
+#define IPADDR_CLI_IN_HELP 0x02 /* Flag is valid only if
+ * IPADDR_CLI_HANDLING == TRUE
+ * TRUE => in cli help
+ * processing
+ * FALSE => not in cli help
+ * processing
+ */
+#define IPADDR_HOSTNAME_ALLOWED 0x04 /* TRUE => input string can
+ * be ipaddr or
+ * hostname
+ * FALSE => input string can
+ * an ipaddr only
+ */
+#define IPADDR_MARTIAN_TEST_REQUIRED 0x08 /* TRUE => do martian test
+ * FALSE => skip martian test
+ */
+#define IPADDR_MARTIAN_IS_HOST_ADDRESS 0x10 /* Flag is valid only if
+ * IPADDR_MARTIAN_TEST_REQUIRED
+ * == TRUE
+ * TRUE => input is host addr
+ * FALSE => input can be a
+ * network addr
+ */
+
+#define IPADDR_MARTIAN_MULTICAST_ALLOWED 0x20 /* Flag is valid only if
+ * IPADDR_MARTIAN_TEST_REQUIRED
+ * == TRUE
+ * TRUE => multicast addr
+ * wil not be
+ * consider a
+ * martian
+ * FALSE => multicast addr
+ * will be considered
+ * a martian
+ */
+
+#define IPADDR_DEFAULT_ROUTING 0x40 /* Flag is valid only for
+ * default routing
+ * if ip address is 0.0.0.0
+ */
+
+/* The default flags represent what the GUI uses in most cases. */
+
+#define IPADDR_GUI_DEFAULT_FLAGS (IPADDR_HOSTNAME_ALLOWED | \
+ IPADDR_MARTIAN_TEST_REQUIRED | \
+ IPADDR_MARTIAN_IS_HOST_ADDRESS)
+
+extern void ip_address_init( void );
+extern boolean good_address (ipaddrtype , ipaddrtype , boolean );
+extern boolean martian (ipaddrtype , ulong);
+extern int parser_ipaddr_or_hostname (char *, int *, ulong, pIpAddr_t, char **);
+extern int ValidateNetMask (ipaddrtype, char *, char **);
+#endif /* __ADDRESS_H__ */
diff --git a/data/mnet/Common/cli/include/cfg_end.h b/data/mnet/Common/cli/include/cfg_end.h
new file mode 100644
index 0000000..259e6e9
--- /dev/null
+++ b/data/mnet/Common/cli/include/cfg_end.h
@@ -0,0 +1,49 @@
+/* $Id: cfg_end.h,v 10.2 1998/12/30 18:13:01 sundars Exp $
+ * $Source: /export/sbcc/cepro/os/parser/src/cfg_end.h,v $
+ *------------------------------------------------------------------
+ * Cisco MicroWeb Server Version 2
+ *
+ * File: cfg_end.h
+ * Description: end - exit configuration mode
+ * Owner: Prasanna Parthasarathy
+ * Notes:
+ *
+ * Copyright (c) 1997 by cisco Systems, Inc.
+ * All rights reserved.
+ *------------------------------------------------------------------
+ * $Log: cfg_end.h,v $
+ * Revision 10.2 1998/12/30 18:13:01 sundars
+ * Fix help texts for CLI commands
+ * CSCdk69292: CLI Command Descriptions When Entering a ?-Part 2
+ *
+ * Revision 10.1 1998/06/10 20:41:51 sutton
+ * code merge
+ *
+ * Revision 1.4 1998/04/21 01:26:41 pparthas
+ * CLI Related changes / Undo log / Errno propagation
+ * CSCdj68847: CLI changes
+ *
+ * Revision 1.3 1997/08/04 19:28:27 pparthas
+ * Made 'end' from config mode a hidden command
+ *
+ * Revision 1.2 1997/05/14 22:12:01 pparthas
+ * Removed test_* files. Included some files for Show routines
+ * and cleaned-up file structure ( not source code ;-) )
+ *
+ *------------------------------------------------------------------
+ * $Endlog$
+ */
+
+/***************************************************************
+ * end
+ *
+ * exits from config mode
+ */
+
+EOLS (act_end_configure, exit_config_command, CMD_END);
+
+KEYWORD (end_configure, act_end_configure, ALTERNATE, "end",
+ "Exit configuration mode", PRIV_MIN);
+
+#undef ALTERNATE
+#define ALTERNATE end_configure
diff --git a/data/mnet/Common/cli/include/cfg_exit.h b/data/mnet/Common/cli/include/cfg_exit.h
new file mode 100644
index 0000000..722e2e4
--- /dev/null
+++ b/data/mnet/Common/cli/include/cfg_exit.h
@@ -0,0 +1,42 @@
+/* $Id: cfg_exit.h,v 10.2 1998/12/30 18:13:01 sundars Exp $
+ * $Source: /export/sbcc/cepro/os/parser/src/cfg_exit.h,v $
+ *------------------------------------------------------------------
+ * Cisco MicroWeb Server Version 2
+ *
+ * File: cfg_exit.h
+ * Description: exit - exit configuration mode
+ * Owner: Prasanna Parthasarathy
+ * Notes:
+ *
+ * Copyright (c) 1997 by cisco Systems, Inc.
+ * All rights reserved.
+ *------------------------------------------------------------------
+ * $Log: cfg_exit.h,v $
+ * Revision 10.2 1998/12/30 18:13:01 sundars
+ * Fix help texts for CLI commands
+ * CSCdk69292: CLI Command Descriptions When Entering a ?-Part 2
+ *
+ * Revision 10.1 1998/06/10 20:41:52 sutton
+ * code merge
+ *
+ * Revision 1.2 1997/05/14 22:12:02 pparthas
+ * Removed test_* files. Included some files for Show routines
+ * and cleaned-up file structure ( not source code ;-) )
+ *
+ *------------------------------------------------------------------
+ * $Endlog$
+ */
+
+/***************************************************************
+ * exit
+ *
+ * exits from config mode
+ */
+
+EOLS (act_exit_configure, exit_config_command, CMD_EXIT);
+
+KEYWORD (exit_configure, act_exit_configure, ALTERNATE,
+ "exit", "Exit configuration mode", PRIV_MIN);
+
+#undef ALTERNATE
+#define ALTERNATE exit_configure
diff --git a/data/mnet/Common/cli/include/cli_parser_api.h b/data/mnet/Common/cli/include/cli_parser_api.h
new file mode 100644
index 0000000..b1815aa
--- /dev/null
+++ b/data/mnet/Common/cli/include/cli_parser_api.h
@@ -0,0 +1,18 @@
+#ifndef __CLI_PARSER_API_H__
+#define __CLI_PARSER_API_H__
+
+/* exported by cli_parser_init.c */
+extern void CliParserInit();
+extern void CliIOInit (int);
+
+/* exported by debug.cpp */
+
+extern void debug_init();
+
+/* exported by command_chain.cpp */
+extern void command_parser_init();
+
+/* exported by exec_chain.cpp */
+extern void exec_parser_init();
+
+#endif /* __CLI_PARSER_API_H__ */
diff --git a/data/mnet/Common/cli/include/cli_parser_private.h b/data/mnet/Common/cli/include/cli_parser_private.h
new file mode 100644
index 0000000..31758f2
--- /dev/null
+++ b/data/mnet/Common/cli/include/cli_parser_private.h
@@ -0,0 +1,11 @@
+#ifndef __CLI_PARSER_PRIVATE_H__
+#define __CLI_PARSER_PRIVATE_H__
+
+#define PARSER_TASK_PRIORITY 150
+#define PARSER_TASK_OPTION 0
+#define PARSER_TASK_STACK_SIZE 20000
+#define DEBUG_CLI_PARSER 0
+
+#define DBG_PARSER(s) if (DEBUG_CLI_PARSER) printf(s);
+
+#endif /* __CLI_PARSER_PRIVATE_H__ */
diff --git a/data/mnet/Common/cli/include/cli_private.h b/data/mnet/Common/cli/include/cli_private.h
new file mode 100644
index 0000000..7b40c2a
--- /dev/null
+++ b/data/mnet/Common/cli/include/cli_private.h
@@ -0,0 +1,114 @@
+#ifndef __CLI_PRIVATE_H__
+#define __CLI_PRIVATE_H__
+
+typedef char tOCTET; /* signed octet */
+typedef unsigned char tUOCTET; /* unsigned octet */
+typedef int tINT; /* Integer */
+typedef short tOCTET2; /* signed 2 octets */
+typedef short s_size_t; /* signed size_t */
+typedef unsigned us_size_t; /* unsigned size_t */
+typedef long tOCTET4; /* signed 4 octets */
+typedef unsigned short tUOCTET2; /* unsigned 2 octets */
+typedef unsigned long tUOCTET4; /* unsigned 4 octets */
+typedef FILE tFILE;
+typedef int tTASKID;
+typedef int boolean;
+typedef uint32_t ipaddrtype;
+
+ /*
+ **
+ ** Basic data type pointers
+ **
+ */
+
+typedef char * tpOCTET;
+typedef unsigned char * tpUOCTET;
+typedef short * tpOCTET2;
+typedef long * tpOCTET4;
+typedef unsigned short * tpUOCTET2;
+typedef unsigned long * tpUOCTET4;
+
+/*
+ * libc data types
+ */
+typedef FILE * tpFILE;
+
+/*
+ * kernel data types
+ */
+typedef SEM_ID tSEMAPHORE; /* semaphore */
+typedef SEM_ID tCSEMAPHORE; /* counting semaphore */
+typedef SEM_ID tBSEMAPHORE; /* binary semaphore */
+typedef SEM_ID tMSEMAPHORE; /* mutex semaphore */
+
+/*
+ * missing from vxWorks' Posix types
+ */
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
+
+/*
+ * Cisco IOS compatibility
+ */
+typedef long long longlong;
+typedef unsigned int uint;
+typedef unsigned char uchar;
+typedef unsigned long ulong;
+typedef unsigned long long ulonglong;
+typedef unsigned long long sys_timestamp;
+
+/*
+ * Special values for data types
+ */
+#ifndef NULLP
+#define NULLP ((void *) 0)
+#endif
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+
+/*
+ * copied from dosfs/uvfatTypes.h
+ */
+
+typedef uid_t tUID;
+typedef gid_t tGID;
+typedef tOCTET2 tMODE;
+typedef unsigned long tDIRNUM, *tpDIRNUM;
+typedef tOCTET4 tCOMPATDWORD;
+
+
+#define INVALID_UID ((unsigned short)-1)
+#define INVALID_GID ((unsigned short)-1)
+#define INVALID_MODE -1
+#define INVALID_DIRNUM -1L
+#define INVALID_FLAGS -1L
+
+#define INIT_DIRNUM 0
+#define ROOTDIR_DIRNUM 1
+
+typedef tOCTET2 tACCESS;
+
+#define setuid setUid
+#define getuid getUid
+
+
+
+
+/*
+** vxWorks mutex semphore default flag
+*/
+#define PS_DEFAULT_MUTEX_SEM_FLAG \
+ (SEM_Q_PRIORITY | SEM_DELETE_SAFE | SEM_INVERSION_SAFE)
+#define PS_DEFAULT_BINARY_SEM_FLAG (SEM_Q_PRIORITY)
+#define PS_DEFAULT_COUNT_SEM_FLAG (SEM_Q_PRIORITY)
+#define PS_DEFAULT_BINARY_SEM_STAT (SEM_FULL)
+#define PS_DEFAULT_COUNT_SEM_COUNT 1
+
+#endif /* __CLI_PRIVATE_H_ */
diff --git a/data/mnet/Common/cli/include/config.h b/data/mnet/Common/cli/include/config.h
new file mode 100644
index 0000000..022e3ea
--- /dev/null
+++ b/data/mnet/Common/cli/include/config.h
@@ -0,0 +1,389 @@
+#ifndef __CONFIG_H__
+#define __CONFIG_H__
+
+#define SABUFSIZE 3000 /* buffer size for config from term */
+#define TOKLEN 85 /* maximum token length */
+#define WORD 0 /* gettoken should return a word */
+#define LINE 1 /* gettoken should return a line */
+
+
+/*
+ * flags used in csb->flags
+ */
+#define CONFIG_TERM 0x00000001 /* configuring from a terminal */
+#define CONFIG_ABORT 0x00000002 /* need to abort the config */
+#define CONFIG_DONE 0x00000004 /* config is done */
+#define CONFIG_HTTP 0x00000008 /* configuring from http */
+#define KEYWORD_MATCHED 0x00000010 /* keyword was matched */
+#define COMMAND_AUTHORIZE 0x00000020 /* expand command into nv_command */
+#define COMMAND_FUNCTION 0x00000040 /* substitute function on accept */
+#define HIDE_PASSWORDS 0x00000080 /* Don't print password during nvgen */
+#define PARSE_EMPTY_STRING 0x00000100 /* Try to parse empty string */
+#define CONFIG_PER_USER 0x00000200 /* Per-user configuration */
+#define CONFIG_CGI 0x00000400 /* configuring from http */
+#define COMMAND_COMPLETE 0x00000800 /* Indicate to I/O so it can do History */
+#define CONFIG_FILE 0x00001000 /* Copy Startup to Disk */
+#define TERMINAL_MODE 0x00002000 /* Indicate to Callback to leave at
+ * Terminal Mode */
+
+#define NOMEANSZERO 1 /* if "no", assume number 0 */
+#define NONULL 2 /* null args not allowed */
+#define NOMEANSMINUS 3 /* if "no", assume number -1 */
+#define NOMEANSNULL 4 /* if "no", assume null string */
+#define NULLMEANSDONE 5 /* if NULL, quiet error return */
+
+
+/*
+ * Methods for resolving protocol addresses and configuration information.
+ * Note that this list has grown to be used for lots more than resolving
+ * protocol addresses, however.
+ */
+enum RES {
+ RES_NULL, /* Not resolved */
+ RES_CONFIG, /* Configuration file */
+ RES_MANUAL, /* Manually set */
+ RES_NONVOL, /* Read from non-volatile RAM */
+ RES_PRIVATE_NONVOL, /* Read from private non-volatile RAM */
+ RES_WRITING_NONVOL /* Writing to non-volatile RAM */
+};
+
+
+
+/*
+ * RAMS : this was under ifdef of IOS_PARSER
+ */
+
+/*
+ * A list of file access methods.
+ * The bootstrap monitor knows about the TFTP, MOP, and FLASH codes,
+ * so don't change their values.
+ */
+typedef enum {
+ FILE_ACCESS_UNKNOWN = 0,
+ FILE_ACCESS_TFTP = 1,
+ FILE_ACCESS_FLASH = 3,
+ FILE_ACCESS_ROM = 4,
+ FILE_ACCESS_RCP = 5,
+ FILE_ACCESS_FTP = 8,
+} file_access_protocol;
+
+
+/*
+ * now define a generic named thing.
+ */
+typedef struct namedthingtype_ {
+ struct namedthingtype_ *next;
+ NAMEDTHINGMACRO
+ uchar data[1];
+} namedthingtype;
+
+/*
+ * RAMS : ifdef ended here
+ */
+
+
+
+
+
+
+/************************************************************************/
+/*********** START OF NEW PARSER STRUCTURE ******************************/
+/************************************************************************/
+
+
+#define PARSEBUF 256 /* Input buffer length */
+#define MAXTOKLEN 21 /* Maximum token length */
+#define MAXPROMPTLEN 30 /* Maximum prompt; prompt truncated to fit */
+
+/* Structure for saving blocks of character strings like comments,
+ * help output, and NV generation.
+ */
+typedef struct save_buf_ {
+ char *buf; /* The buffer itself */
+ int size; /* Size of the malloc'ed buffer area */
+ int used; /* Number of characters stored in the buffer */
+} save_buf;
+
+/*
+ *
+ */
+typedef struct ambig_struct_ {
+ char ambig[PARSEBUF];
+ char ambig_save[PARSEBUF];
+ int multiple_funcs;
+} ambig_struct;
+
+/* The 'transition' struct is the central data structure of the parser.
+ * A parse tree is built of transition nodes, each of which references
+ * an action routine (func() in the structure). The action routine
+ * will transition to the 'accept' node if the input was matched (or
+ * some other action was successful). The 'alternate' transition is taken
+ * if the action failed, and after the accepting node returns (recursion
+ * is currently used to transition between nodes). The 'args' variable
+ * may be used to pass additional parameters to the action routine. It is
+ * generally defined as one of several types of structures to allow passing
+ * multiple parameters.
+ *
+ * The parse_token() function handles transitioning between nodes.
+ */
+
+typedef void (*trans_func)(parseinfo *, transition *, const void * const);
+struct transition_ {
+ transition *accept;
+ transition *alternate;
+ const trans_func func;
+ const void * const args;
+};
+
+/*
+ * Dynamic transitions used for adding parse chains at run time
+ */
+typedef struct dynamic_transition_ dynamic_transition;
+struct dynamic_transition_ {
+ dynamic_transition *accept;
+ dynamic_transition *alternate;
+ const trans_func func;
+ const void *args;
+};
+
+typedef void (*command_func)(parseinfo *);
+
+/* The parseinfo struct is used by the parser routines for
+ * parameter storage between the parser and command action routines.
+ * The parser and action functions must agree as to where
+ * values are stored in this struct. Generally, this is
+ * in order in which the values appear in the input stream.
+ *
+ * Parser internal state info is also kept here.
+ */
+
+
+struct parseinfo_ {
+
+/*** Start of cleared area ***/
+
+/*** Note that csb_start_data is defined as txt1 below! ***/
+
+ /* Variable storage for parsed data being passed to functions */
+ char txt1[PARSEBUF], txt2[PARSEBUF], txt3[PARSEBUF]; /* String data */
+ char txt4[PARSEBUF], txt5[PARSEBUF], txt6[PARSEBUF]; /* String data */
+ char txt7[PARSEBUF], txt8[PARSEBUF]/*, txt9[PARSEBUF]*/; /* String data */
+
+ uint val1, val2, val3, val4, val5; /* Integer values */
+ uint val6, val7, val8, val9, val10;
+ uint val11, val12, val13, val14, val15;
+
+ addrtype addr1, addr2, addr3, addr4, addr5, addr6, addr7, addr8;
+
+ int interface;
+
+ void *vptr0, *vptr1;
+
+ void *udb1,*udb2;
+
+ boolean leave_subcommand;
+
+ parser_mode *pmp;
+
+ uint end_of_data; /* Dummy to mark end of data area */
+
+/*** End of cleared area ***/
+
+ /* The below two variables are used in determining the command action
+ * routine to execute.
+ * 'which' is the command type code passed in the EOL structure and is
+ * used by the called function to switch out to the command action routine.
+ * An example is CMD_CLEAR, which causes the clear_command() function to
+ * be called.
+ * 'func' is a function code which determines which of several command
+ * functions was requested. An example is CLEAR_VINES_ROUTE which is
+ * used by the clear_command() function to decide which action to take.
+ */
+
+ uint which; /* Which command type being executed */
+ uint func; /* Command function being executed */
+
+ boolean sense; /* FALSE if we parsed a 'no' prefix. Also
+ * FALSE if a 'default' prefix parsed
+ * because the off state is the default
+ * for most commands.
+ */
+
+ boolean set_to_default; /* TRUE if we parsed a 'default'
+ * prefix
+ */
+
+ int resolvemethod; /* Config source: term, mem, or net */
+ uint flags; /* misc flags */
+
+
+ char *batch_buf; /* Batch input buffer. NULL pointer if
+ * no batch buffer.
+ */
+
+ char *batch_offset; /* Current offset into batch buffer */
+
+ /* NV generation variables */
+ boolean nvgen; /* We're doing NV generation */
+ char nv_command[PARSEBUF]; /* The command being generated */
+
+ /* Structures for saving comments, help output, and NV generation */
+ save_buf comment_save, help_save;
+ int saved_help_used; /* How many bytes of help we've seen */
+
+ /* Parser internal state info */
+
+ /* The number of commands which matched the input stream,
+ * the function to call if only one matched, and a pointer to any
+ * additional parseinfo structures we created.
+ */
+ queuetype *tokenQ; /* Token processing queue. This is a
+ * push-down queue. The top of the
+ * stack is the next element to
+ * process.
+ */
+ ambig_struct visible_ambig;
+ ambig_struct hidden_ambig;
+
+ boolean command_visible; /* TRUE if current keyword is visible */
+ boolean unsupported; /* TRUE if current keyword is unsupported */
+
+ void (* action_func)(parseinfo *); /* Command function to call */
+ struct parseinfo_ *next; /* Next structure, or NULL */
+
+ int in_help; /* We're processing a help request */
+
+ uchar priv_set; /* If non-zero, then set keywords to
+ * this privilege level.
+ */
+
+ uchar priv; /* User's current privilege level */
+ uchar highest_priv; /* Highest keyword priv level parsed */
+ uchar last_priv; /* Privilege level of last keyword */
+ queuetype *privQ; /* stack of transitions that will have
+ * their privilege level changed */
+
+ queuetype *priv_nvgenQ; /* stack for doing NV generation */
+
+ int exit_all; /* Exit flag */
+
+ char prompt[MAXPROMPTLEN+1]; /* Command line prompt */
+ char line_buffer[PARSEBUF]; /* String being consumed */
+
+ char *line; /* Pointer to string being consumed */
+ int line_index; /* Current token ptr into line */
+ int error_index; /* Position of error in input line */
+ char *break_chars; /* Texti break character set */
+ char lastchar; /* last char read by readline() */
+ parser_mode *mode; /* Current parser mode */
+ command_func command_function; /* Substitute function on accept */
+
+ /* Microweb Specific Additions */
+ ushort MoreStatus; /* Who does 'more' etc. ? */
+ SEM_ID configSemId; /* Semaphore to hold for configuration */
+ boolean giveConfigSem; /* Easy access to release configuration
+ semaphore */
+
+ int inFd; /* Input 'fd' */
+ int outFd; /* Output 'fd' */
+ int savedFd; /* saved outFd when output is redirected */
+ void *pIndex; /* Used for 'more' kind of processing,
+ cookie */
+ long maxRecordCount; /* Used for 'more'; Maximum record count */
+ int moduleId; /* Who owns this CSB ? */
+
+
+ int uid; /* UID of the I/O Module */
+
+ int ioTaskId; /* Task Id of the I/O Module */
+ timer_t io_timer; /* io input timeout */
+ boolean return_val; /* return value for command */
+ int errno_val; /* error value for command */
+ void *userDataBlock[2];
+ /* struct parser_session *session; parser session, if one exists */
+
+};
+
+/* Start and end of variable area (for clearing purposes) */
+
+#define csb_start_data txt1 /* First address to clear */
+#define csb_end_data end_of_data /* Last address + 1 to clear */
+
+#define PFLAG_in_help in_help /* Help flag */
+#define PFLAG_nvgen nvgen /* NV gen flag */
+#define PFLAG_sense sense /* sense flag */
+#define PFLAG_which which /* which flag */
+
+#define PTXT_0 nv_command
+#define PTXT_1 txt1
+#define PTXT_2 txt2
+#define PTXT_3 txt3
+#define PTXT_4 txt4
+#define PTXT_5 txt5
+#define PTXT_6 txt6
+#define PTXT_7 txt7
+#define PTXT_8 txt8
+#define PTXT_9 txt9
+#define PTXT_prompt prompt
+#define PTXT_line line
+#define PTXT_break_chars break_chars
+
+#define PVPTR_0 vptr0
+#define PVPTR_1 vptr1
+
+
+#define PCHAR_lastchar lastchar
+
+#define PTYPE_int(num) val ## num /* Integer */
+#define PTYPE_char(num) PCHAR ## num
+#define PTYPE_string(num) PTXT_ ## num /* String */
+#define PTYPE_paddr(num) addr ## num /* Protocol address ptr */
+#define PTYPE_hwaddr(num) hwaddr ## num /* Hardware address ptr */
+#define PTYPE_maskedAddr(num) maskedAddr ## num /* masked address ptr */
+#define PTYPE_flag(num) PFLAG_ ## num /* Parser flags */
+#define PTYPE_vptr(num) PVPTR_ ## num /* Parser void* */
+#define PUDB_current1 userDataBlock[0]
+#define PUDB_current2 userDataBlock[1]
+#define PUDB_1 udb1
+#define PUDB_2 udb2
+#define PTYPE_udb(num) PUDB_ ## num /* User Defined data block ptr */
+
+
+#define PPTR_int
+#define PPTR_string
+#define PPTR_paddr &
+#define PPTR_hwaddr &
+#define PPTR_maskedAddr &
+#define PPTR_flag
+#define PPTR_vptr
+#define PPTR_udb
+
+#define GETOBJ(type,num) (PPTR_ ## type ## (csb->PTYPE_ ## type ## ( ## num ## )))
+#define SETOBJ(type,num) csb->PTYPE_ ## type ## ( ## num ## )
+#define ISOBJ(type,num) ((int) GETOBJ(type,num) != 0)
+
+/************************************************************************/
+/*********** END OF NEW PARSER STRUCTURE ********************************/
+/************************************************************************/
+
+/***********************************************************************
+ *
+ * Externs and Prototypes
+ *
+ ***********************************************************************/
+
+/*
+ * parser.c
+ */
+typedef boolean (*match_gen_func)(parseinfo *, char *, int *, void *,
+ int, uint, void *);
+typedef char * (*short_help_func)(parseinfo *, uint, void *);
+
+extern void parser_add_address(const uint, short_help_func, match_gen_func);
+extern void exit_config_submode(parseinfo *);
+extern void exit_config_modes(parseinfo *);
+extern void parse_configure (char *, int , int , uchar );
+extern void wait_for_system_load( void );
+extern boolean yes_or_no(const char *prompt, boolean def, boolean usedef);
+#endif __CONFIG_H__
+
diff --git a/data/mnet/Common/cli/include/debug.h b/data/mnet/Common/cli/include/debug.h
new file mode 100644
index 0000000..51e4229
--- /dev/null
+++ b/data/mnet/Common/cli/include/debug.h
@@ -0,0 +1,70 @@
+#ifndef __DEBUG_H__
+#define __DEBUG_H__
+
+
+
+#define MIN_DEBUG_LEVEL 1
+#define MAX_DEBUG_LEVEL 5
+
+/*
+ * debug_item_type defines a standard way of describing a debugging
+ * flag. Most protocols keep their debugging flags in special
+ * cells, which are pointed to by the members of arrays of entries
+ * of this type. The generic debugging support provides a few routines
+ * for dealing with such arrays. By convention, the end of an array
+ * is flagged by a null flag pointer.
+ */
+typedef struct debug_item_type_ {
+ boolean *var; /* Address of on/off flag */
+ char *txt; /* Descriptive text about what to debug */
+} debug_item_type;
+
+/* Initialize the debugging system */
+extern void debug_init(void);
+
+/*
+ * Determine whether "debug all" is in effect. When a new subsystem
+ * is initialized, it uses this routine to determine whether it should
+ * immediately turn on its debugging flags or not.
+ */
+extern boolean debug_all_p(void);
+
+/*
+ * Generic routine for "debug" parse chains to call. Only useful if you're
+ * using totally stock flags and arrays.
+ */
+extern void debug_command(parseinfo *csb);
+
+/* Routine to handle "debug all" and "undebug all" */
+extern void debug_all_cmd(parseinfo *csb);
+
+/* Routine that implements the "show debug" command */
+extern void show_debug(void);
+
+/*
+ * Display the value of a debugging flag in the common format used for
+ * all such flags.
+ */
+extern void debug_show_flag(boolean flag, char *text);
+
+/*
+ * Show a whole array of flags. The end of the array is marked by an
+ * entry with a null flag pointer.
+ */
+extern void debug_show_flags(const debug_item_type *array, const char *heading,
+ boolean printLevel );
+
+/*
+ * generic routine to call when anybody issues
+ * a "debug all" or "undebug all" command or
+ * whenever you want to set the state of all
+ * debug flags at once.
+ */
+
+extern void generic_debug_all (const debug_item_type *, boolean );
+extern void generic_debug_show (const debug_item_type *, const char* );
+extern STATUS generic_debug_init (const debug_item_type *, const char* );
+
+extern void debug_init( void );
+
+#endif __DEBUG_H__
diff --git a/data/mnet/Common/cli/include/debug_macros.h b/data/mnet/Common/cli/include/debug_macros.h
new file mode 100644
index 0000000..76a3dc7
--- /dev/null
+++ b/data/mnet/Common/cli/include/debug_macros.h
@@ -0,0 +1,70 @@
+
+
+/* This perverted abuse of the C preprocessor is designed to keep us from
+ * having to keep too many files consistent to make debugging DEBUG_FLAGs work.
+ * To make a standard debugging DEBUG_FLAG, we have to create 3 things:
+ *
+ * o A boolean flag variable (tested by the routines that print the actual
+ * debugging output)
+ *
+ * o An array element that associates that variable with a textual
+ * description (used by the parsing and printing routines to talk about
+ * the flag)
+ *
+ * o A symbolic name for the array index (used by parse chains to designate
+ * which flag is to be set or cleared within an array).
+ *
+ * Rather than ask a human being to type in all three definitions, we use
+ * the macros below and some include file hackery to create them all from
+ * the same data. If the magic symbol "__DECLARE_DEBUG_ARR__" is defined,
+ * we assume that whatever file includes us wants to actually declare
+ * initialized data... presumably we've been included by an xxx_debug.c
+ * module. If "__DECLARE_DEBUG_NUMS__" is defined instead, we assume
+ * that an include file wants to create the symbolic names for array
+ * offsets. If neither magic symbol is defined, we assume that an include
+ * file (probably the same one) wants to create external declarations
+ * for the booleans themselves, as well as an external declaration for
+ * the array.
+ *
+ * There are some instances in which a debug flag is defined that should
+ * not be declared by us; in such cases the DEBUG_FLAG_NO_DECL macro
+ * should be used, rather than the DEBUG_FLAG macro.
+ */
+
+/* We've probably been called before, so let's clean up what we did then */
+#undef DEBUG_ARRDECL
+#undef DEBUG_FLAG
+#undef DEBUG_ARRDONE
+#undef DEBUG_FLAG_NO_DECL
+
+#if defined(__DECLARE_DEBUG_ARR__)
+
+#define DEBUG_ARRDECL(arrname) const debug_item_type arrname[] = {
+#define DEBUG_FLAG(varname,codename,textname) {&varname, textname},
+#define DEBUG_FLAG_NO_DECL(varname,codename,textname) {&varname, textname},
+#define DEBUG_ARRDONE {(boolean *) NULL, (char *) NULL} };
+
+#elif defined(__DECLARE_DEBUG_NUMS__)
+
+#define DEBUG_ARRDECL(arrname) enum {
+#define DEBUG_FLAG(varname,codename,textname) codename,
+#define DEBUG_FLAG_NO_DECL(varname,codename,textname) codename,
+#define DEBUG_ARRDONE };
+
+#else
+
+#define DEBUG_ARRDECL(arrname) extern const debug_item_type arrname[];
+#if defined(__DECLARE_DEBUG_VARS__)
+#define DEBUG_FLAG(varname,codename,textname) boolean varname;
+#else
+#define DEBUG_FLAG(varname,codename,textname) extern boolean varname;
+#endif
+#define DEBUG_FLAG_NO_DECL(varname,codename,textname) /* Nothing */
+#define DEBUG_ARRDONE /* Nothing */
+
+#endif
+
+/* Some other include file might want to reuse us... */
+#undef __DECLARE_DEBUG_VARS__
+#undef __DECLARE_DEBUG_ARR__
+#undef __DECLARE_DEBUG_NUMS__
diff --git a/data/mnet/Common/cli/include/defs.h b/data/mnet/Common/cli/include/defs.h
new file mode 100644
index 0000000..aa88fc8
--- /dev/null
+++ b/data/mnet/Common/cli/include/defs.h
@@ -0,0 +1,127 @@
+#ifndef _PARSER_DEFS_H
+#define _PARSER_DEFS_H
+
+#ifdef NONE
+#undef NONE
+#endif
+
+#define pname(x) PARSER_ ## x
+#define pdecl(x) extern transition pname(x)
+#define lpdecl(x) extern dynamic_transition pname(x);
+
+#define CSBOFF(elem) ((int) &((parseinfo*)NULL)->elem)
+#define CSBVAR(csb, offset, type) ((type *) ((u_char*) csb + offset))
+
+extern transition PARSER_NONE;
+
+pdecl(no_alt);
+pdecl(link_point);
+pdecl(link_trans);
+
+/*
+ * List structure for parser extension
+ */
+typedef const struct {
+ uint type; /* Type code */
+ dynamic_transition *commands; /* Transition pointer */
+} parser_extension_request;
+
+/*
+ * Extending the parser.
+ * Some brave soul should turn this into an enum and rearrange things
+ * intelligently.
+ */
+enum {
+ PARSE_LIST_END=0, /* End of list - not a real code */
+ PARSE_ADD_EXEC_CMD,
+ PARSE_ADD_SHOW_CMD,
+ PARSE_ADD_CLEAR_CMD,
+ PARSE_ADD_DEBUG_CMD,
+ PARSE_ADD_TERM_CMD, /* "term xxx" commands, not saved */
+ PARSE_ADD_CFG_TOP_CMD, /* top level config commands */
+ PARSE_ADD_GLOBAL_CMD, /* global commands */
+ PARSE_ADD_PING_CMD, /* exec ping commands */
+ PARSE_ADD_COPY_CMD, /* copy commands */
+ PARSE_ADD_COPYFILE_CMD, /* copy file commands */
+ PARSE_ADD_CFG_LAST_CMD, /* top level config commands at end */
+ PARSE_ADD_CFG_CDP, /* Cisco Discovery Protocol */
+ PARSE_ADD_WRITE_CMD, /* to add dynamic write commands */
+ PARSE_ADD_CFG_FILE_CMD, /* to add config file command */
+ PARSE_ADD_COPY_RUNNING_CMD, /* extending copy running-config */
+ PARSE_ADD_COPY_STARTUP_CMD, /* extending copy startup-config */
+ PARSE_ADD_COPY_FLASH_CMD, /* extending copy flash */
+ PARSE_ADD_COPY_DISK_CMD, /* extending copy disk cmd */
+ PARSE_ADD_COPY_TFTP_CMD, /* extending copy tftp cmd */
+ PARSE_ADD_COPY_RUNNING_FILE_CMD, /* extending copy running-config */
+ PARSE_ADD_COPY_STARTUP_FILE_CMD, /* extending copy startup-config */
+ PARSE_ADD_COPY_FLASH_FILE_CMD, /* extending copy flash */
+ PARSE_ADD_COPY_RCP_FILE_CMD, /* extending copy rcp */
+ PARSE_ADD_COPY_TFTP_FILE_CMD, /* extending copy tftp cmd */
+ PARSE_ADD_ERASE_CMD, /* to add erase file cmd */
+ PARSE_ADD_CFG_LOG_CMD, /* syslog history config cmd */
+ PARSE_ADD_SHOW_LOG_CMD, /* syslog history show cmd */
+ PARSE_ADD_GLOBAL_EXIT, /* Global command exit */
+ PARSE_ADD_SHOW_TECHSUPPORT_CMD, /* show tech-support commands */
+ PARSE_ADD_SHOW_TECHSUPPORT_EXIT, /* show tech-support exit */
+ PARSE_ADD_SHOW_REV_CMD, /* show revision commands */
+ PARSE_ADD_CFG_INTERFACE_TOP_CMD, /* Config Interface commands */
+ PARSE_ADD_CFG_CELL_CMD, /* config cell mode commands */
+ PARSE_ADD_CFG_ADJCELL_CMD, /* config adjacent cell mode commands */
+ PARSE_ADD_CFG_PROTO_CMD, /* config protocol mode commands */
+ PARSE_ADD_SHOW_STATS_CMD, /* show statistics */
+ PARSE_ADD_CLEAR_STATS_CMD, /* clear statistics */
+ PARSE_ADD_CFG_DNS_BOOM_CLIENT_TOP_CMD,/* Config dns-boomerang client cmds */
+ PARSE_ADD_CFG_DNS_BOOM_SERVER_TOP_CMD,/* Config dns-boomerang server cmds */
+ PARSE_ADD_CFG_GP10_CELL,
+ PARSE_ADD_CFG_GP10_ADJCELL,
+ PARSE_ADD_CFG_GP10_PROTO,
+ PARSE_ADD_CFG_GP10_CELL_TRX,
+ PARSE_ADD_CFG_GP10_CELL_BTS,
+ PARSE_ADD_CFG_GP10_CELL_CCCH,
+ PARSE_ADD_CFG_GMC_CAPS, /* Config GMC CAPS Paramaters */
+ PARSE_ADD_CFG_GMC_CCS, /* Config GMC CCS Paramaters */
+ PARSE_ADD_CFG_GMC_SYNAXIS, /* Config GMC SYNAXIS Paramaters */
+ PARSE_ADD_EXEC_SMSCB_SCHEDULE, /* Exec commands for SMS-CB Schedule Messages */
+ PARSE_ADD_EXEC_SMSCB_CHANGE, /* Exec commands for SMS-CB Change Messages */
+ PARSE_ADD_CFG_GMC_ITP, /* Config GMC ITP Paramaters */
+ PARSE_ADD_CFG_GMC_ITP_PATH /* Config GMC ITP Path Paramaters */
+
+};
+
+#ifdef PARSER_DEBUG_LINKS
+#define parser_add_commands(def, trans, str)\
+ parser_add_commands_func(def, trans, str)
+#define parser_add_command_list(list, str)\
+ parser_add_command_list_func(list, str)
+#define parser_add_link_point(def, str, trans)\
+ parser_add_link_point_func(def, str, trans)
+#define parser_add_link_exit(def, str, trans)\
+ parser_add_link_exit_func(def, str, trans)
+
+extern boolean parser_add_commands_func(uint, dynamic_transition *, const char *);
+extern boolean parser_add_command_list_func(parser_extension_request *,
+ const char *);
+extern boolean parser_add_link_point_func(uint, const char *, transition *);
+extern boolean parser_add_link_exit_func(uint, const char *, transition *);
+#else /* PARSER_DEBUG_LINKS */
+#define parser_add_commands(def, trans, str)\
+ parser_add_commands_func(def, trans)
+#define parser_add_command_list(list, str)\
+ parser_add_command_list_func(list)
+#define parser_add_link_point(def, str, trans)\
+ parser_add_link_point_func(def, trans)
+#define parser_add_link_exit(def, str, trans)\
+ parser_add_link_exit_func(def, trans)
+
+extern boolean parser_add_commands_func(uint, dynamic_transition *);
+extern boolean parser_add_command_list_func(parser_extension_request *);
+extern boolean parser_add_link_point_func(uint, transition *);
+extern boolean parser_add_link_exit_func(uint, transition *);
+#endif /* PARSER_DEBUG_LINKS */
+
+/*
+ * True during reading of the configuration from NVRAM
+ */
+extern boolean systemloading;
+
+#endif /* _PARSER_DEFS_H */
diff --git a/data/mnet/Common/cli/include/exec_clear.h b/data/mnet/Common/cli/include/exec_clear.h
new file mode 100644
index 0000000..f2c0d61
--- /dev/null
+++ b/data/mnet/Common/cli/include/exec_clear.h
@@ -0,0 +1,47 @@
+/* $Id: exec_clear.h,v 10.2 1999/02/12 03:19:54 sundars Exp $
+ * $Source: /export/sbcc/cepro/os/parser/src/exec_clear.h,v $
+ *------------------------------------------------------------------
+ * Cisco MicroWeb Server Version 2
+ *
+ * File: exec_clear.h
+ * Description: clear - Reset Functions
+ * Owner: Prasanna Parthasarathy
+ * Notes:
+ *
+ * Copyright (c) 1997 by cisco Systems, Inc.
+ * All rights reserved.
+ *------------------------------------------------------------------
+ * $Log: exec_clear.h,v $
+ * Revision 10.2 1999/02/12 03:19:54 sundars
+ * create a customer debug build; remove lots of junk printfs from
+ * customer builds;disable wccp when we suspend a task due to
+ * panic/exception etc.
+ * CSCdk92101: Make cli as the default on development
+ *
+ * Revision 10.1 1998/06/10 20:41:58 sutton
+ * code merge
+ *
+ * Revision 1.3 1997/12/05 18:17:43 pparthas
+ * Unhide the 'clear' command
+ * CSCdj39802: A command to clear serial interfaces
+ *
+ * Revision 1.2 1997/05/14 22:12:04 pparthas
+ * Removed test_* files. Included some files for Show routines
+ * and cleaned-up file structure ( not source code ;-) )
+ *
+ *------------------------------------------------------------------
+ * $Endlog$
+ */
+/******************************************************************/
+#ifdef MNET_GP10
+EOLNS (exec_clear_help_eol, clear_help_command);
+PRIV_TEST(exec_clear_help, exec_clear_help_eol, NONE,
+ exec_clear_commands, PRIV_CONF | PRIV_HIDDEN );
+
+KEYWORD (exec_clear, exec_clear_help, ALTERNATE,
+ "clear", "Reset functions", PRIV_CONF | PRIV_HIDDEN);
+
+#undef ALTERNATE
+#define ALTERNATE exec_clear
+
+#endif
diff --git a/data/mnet/Common/cli/include/exec_configure.h b/data/mnet/Common/cli/include/exec_configure.h
new file mode 100644
index 0000000..4f7f888
--- /dev/null
+++ b/data/mnet/Common/cli/include/exec_configure.h
@@ -0,0 +1,47 @@
+
+/* $Id: exec_configure.h,v 10.1 1998/06/10 20:41:59 sutton Exp $
+ * $Source: /export/sbcc/cepro/os/parser/src/exec_configure.h,v $
+ *------------------------------------------------------------------
+ * Cisco MicroWeb Server Version 2
+ *
+ * File: exec_configure.h
+ * Description: configure commands
+ * Owner: Prasanna Parthasarathy
+ * Notes:
+ *
+ * Copyright (c) 1997 by cisco Systems, Inc.
+ * All rights reserved.
+ *------------------------------------------------------------------
+ * $Log: exec_configure.h,v $
+ * Revision 10.1 1998/06/10 20:41:59 sutton
+ * code merge
+ *
+ * Revision 1.4 1997/10/11 00:51:07 pparthas
+ * Reverted to configure terminal , except that 'terminal' is now hidden
+ *
+ * Revision 1.3 1997/10/09 18:14:15 pparthas
+ * First Attempt to cleanup dead-code to reduce code-size; Included debug
+ * scheme in place
+ *
+ * Revision 1.2 1997/05/14 22:12:05 pparthas
+ * Removed test_* files. Included some files for Show routines
+ * and cleaned-up file structure ( not source code ;-) )
+ *
+ *------------------------------------------------------------------
+ * $Endlog$
+ */
+
+
+/*************************************************************n
+ * configure
+ *
+ */
+
+EOLS (exec_config_term_eol, manual_configure, PARSER_CONF_TERM);
+KEYWORD (exec_config_term, exec_config_term_eol, exec_config_term_eol,
+ "terminal", "Configure from Terminal", PRIV_ROOT | PRIV_HIDDEN);
+KEYWORD (exec_configure, exec_config_term, ALTERNATE,
+ "configure", "Enter configuration mode", PRIV_ROOT);
+
+#undef ALTERNATE
+#define ALTERNATE exec_configure
diff --git a/data/mnet/Common/cli/include/exec_debug.h b/data/mnet/Common/cli/include/exec_debug.h
new file mode 100644
index 0000000..606a2c9
--- /dev/null
+++ b/data/mnet/Common/cli/include/exec_debug.h
@@ -0,0 +1,46 @@
+/* $Id: exec_debug.h,v 10.1 1998/06/10 20:42:01 sutton Exp $
+ * $Source: /export/sbcc/cepro/os/parser/src/exec_debug.h,v $
+ *------------------------------------------------------------------
+ * Cisco MicroWeb Server Version 2
+ *
+ * File: exec_debug.h
+ * Description: debug command support
+ * Owner: Prasanna Parthasarathy
+ * Notes:
+ *
+ * Copyright (c) 1997 by cisco Systems, Inc.
+ * All rights reserved.
+ *------------------------------------------------------------------
+ * $Log: exec_debug.h,v $
+ * Revision 10.1 1998/06/10 20:42:01 sutton
+ * code merge
+ *
+ * Revision 1.3 1998/04/21 01:26:41 pparthas
+ * CLI Related changes / Undo log / Errno propagation
+ * CSCdj68847: CLI changes
+ *
+ * Revision 1.2 1997/05/14 22:12:06 pparthas
+ * Removed test_* files. Included some files for Show routines
+ * and cleaned-up file structure ( not source code ;-) )
+ *
+ *------------------------------------------------------------------
+ * $Endlog$
+ */
+
+EOLNS (exec_debug_help_eol, debug_help_command);
+PRIV_TEST(exec_debug_help, exec_debug_help_eol, NONE,
+ exec_debug_commands, PRIV_USER | PRIV_HIDDEN);
+
+KEYWORD_ID(exec_debug_false, exec_debug_help, no_alt,
+ sense, FALSE,
+ "debug", "Disable debugging functions",
+ PRIV_OPR);
+KEYWORD (exec_debug_no, exec_debug_false, ALTERNATE,
+ "no", "Disable debugging functions", PRIV_OPR);
+
+KEYWORD_ID(exec_debug_true, exec_debug_help, exec_debug_no,
+ sense, TRUE,
+ "debug", "Debugging functions", PRIV_OPR);
+
+#undef ALTERNATE
+#define ALTERNATE exec_debug_true
diff --git a/data/mnet/Common/cli/include/exec_debug_all.h b/data/mnet/Common/cli/include/exec_debug_all.h
new file mode 100644
index 0000000..4d78558
--- /dev/null
+++ b/data/mnet/Common/cli/include/exec_debug_all.h
@@ -0,0 +1,41 @@
+/* $Id: exec_debug_all.h,v 10.1 1998/06/10 20:42:02 sutton Exp $
+ * $Source: /export/sbcc/cepro/os/parser/src/exec_debug_all.h,v $
+ *------------------------------------------------------------------
+ * Cisco MicroWeb Server Version 2
+ *
+ * File: exec_debug_all.h
+ * Description: debug all command support
+ * Owner: Prasanna Parthasarathy
+ * Notes:
+ *
+ * Copyright (c) 1997 by cisco Systems, Inc.
+ * All rights reserved.
+ *------------------------------------------------------------------
+ * $Log: exec_debug_all.h,v $
+ * Revision 10.1 1998/06/10 20:42:02 sutton
+ * code merge
+ *
+ * Revision 1.3 1998/04/03 21:21:59 pparthas
+ * Changed EOLS macro to EOLI macro
+ * CSCdj89287: make the CLI callable from TCL
+ *
+ * Revision 1.2 1997/05/14 22:12:07 pparthas
+ * Removed test_* files. Included some files for Show routines
+ * and cleaned-up file structure ( not source code ;-) )
+ *
+ *------------------------------------------------------------------
+ * $Endlog$
+ */
+/******************************************************************
+ * debug all
+ *
+
+EOLI (debug_all_eol, debug_all_cmd, 0);
+KEYWORD (debug_all, debug_all_eol, ALTERNATE,
+ "all", "Enable all debugging", PRIV_OPR);
+
+
+#undef ALTERNATE
+#define ALTERNATE debug_all
+
+*/ \ No newline at end of file
diff --git a/data/mnet/Common/cli/include/exec_disable.h b/data/mnet/Common/cli/include/exec_disable.h
new file mode 100644
index 0000000..9ceb7cf
--- /dev/null
+++ b/data/mnet/Common/cli/include/exec_disable.h
@@ -0,0 +1,55 @@
+/* $Id: exec_disable.h,v 10.2 1999/03/18 01:23:08 sundars Exp $
+ * $Source: /export/sbcc/cepro/os/parser/src/exec_disable.h,v $
+ *------------------------------------------------------------------
+ * Cisco MicroWeb Server Version 2
+ *
+ * File: exec_disable.h
+ * Description: disable command support
+ * Owner: Prasanna Parthasarathy
+ * Notes:
+ *
+ * Copyright (c) 1997 by cisco Systems, Inc.
+ * All rights reserved.
+ *------------------------------------------------------------------
+ * $Log: exec_disable.h,v $
+ * Revision 10.2 1999/03/18 01:23:08 sundars
+ * CSCdm02577: No Context sensitive help available for disable and enable
+ * CLI comma
+ *
+ * Revision 10.1 1998/06/10 20:42:02 sutton
+ * code merge
+ *
+ * Revision 1.6 1998/04/21 01:26:41 pparthas
+ * CLI Related changes / Undo log / Errno propagation
+ * CSCdj68847: CLI changes
+ *
+ * Revision 1.5 1998/03/18 04:34:53 sutton
+ * Initial release of CLI/TCL integration.
+ * Still missing -- sysconf commit, sysconf abort,
+ * and interrupt character processing.
+ * Also changed the output pager (More processing) to
+ * be much simpler and universal for all commands.
+ * CSCdj89287: make the CLI callable from TCL
+ *
+ * Revision 1.4 1997/10/09 18:14:17 pparthas
+ * First Attempt to cleanup dead-code to reduce code-size; Included debug
+ * scheme in place
+ *
+ * Revision 1.3 1997/09/27 04:30:57 pparthas
+ * Removed levels for 'disable' command
+ *
+ * Revision 1.2 1997/05/14 22:12:07 pparthas
+ * Removed test_* files. Included some files for Show routines
+ * and cleaned-up file structure ( not source code ;-) )
+ *
+ *------------------------------------------------------------------
+ * $Endlog$
+ */
+EOLI (exec_disable_endline, enable_command, CMD_DISABLE);
+KEYWORD_ID(exec_disable, exec_disable_endline, ALTERNATE,
+ OBJ(int,1), DEFAULT_PRIV,
+ "disable", "Turn off privileged commands",
+ PRIV_ROOT);
+
+#undef ALTERNATE
+#define ALTERNATE exec_disable
diff --git a/data/mnet/Common/cli/include/exec_enable.h b/data/mnet/Common/cli/include/exec_enable.h
new file mode 100644
index 0000000..b498b16
--- /dev/null
+++ b/data/mnet/Common/cli/include/exec_enable.h
@@ -0,0 +1,58 @@
+/* $Id: exec_enable.h,v 10.2 1999/03/18 01:23:09 sundars Exp $
+ * $Source: /export/sbcc/cepro/os/parser/src/exec_enable.h,v $
+ *------------------------------------------------------------------
+ * Cisco MicroWeb Server Version 2
+ *
+ * File: exec_enable.h
+ * Description: enable command
+ * Owner: Prasanna Parthasarathy
+ * Notes:
+ *
+ * Copyright (c) 1997 by cisco Systems, Inc.
+ * All rights reserved.
+ *------------------------------------------------------------------
+ * $Log: exec_enable.h,v $
+ * Revision 10.2 1999/03/18 01:23:09 sundars
+ * CSCdm02577: No Context sensitive help available for disable and enable
+ * CLI comma
+ *
+ * Revision 10.1 1998/06/10 20:42:03 sutton
+ * code merge
+ *
+ * Revision 1.6 1998/04/21 01:26:42 pparthas
+ * CLI Related changes / Undo log / Errno propagation
+ * CSCdj68847: CLI changes
+ *
+ * Revision 1.5 1998/03/18 04:34:53 sutton
+ * Initial release of CLI/TCL integration.
+ * Still missing -- sysconf commit, sysconf abort,
+ * and interrupt character processing.
+ * Also changed the output pager (More processing) to
+ * be much simpler and universal for all commands.
+ * CSCdj89287: make the CLI callable from TCL
+ *
+ * Revision 1.4 1997/10/09 18:14:17 pparthas
+ * First Attempt to cleanup dead-code to reduce code-size; Included debug
+ * scheme in place
+ *
+ * Revision 1.3 1997/08/16 04:52:53 pparthas
+ * For now, got rid of 'Privilege Levels' in 'enable' command
+ *
+ * Revision 1.2 1997/05/14 22:12:08 pparthas
+ * Removed test_* files. Included some files for Show routines
+ * and cleaned-up file structure ( not source code ;-) )
+ *
+ *------------------------------------------------------------------
+ * $Endlog$
+ */
+/****************************************************************
+ * enable
+ */
+EOLI (enable_endline, enable_command, CMD_ENABLE);
+KEYWORD_ID(enable, enable_endline, ALTERNATE,
+ OBJ(int,1), PRIV_MAX,
+ "enable", "Turn on privileged commands",
+ PRIV_MIN | PRIV_INTERACTIVE);
+
+#undef ALTERNATE
+#define ALTERNATE enable
diff --git a/data/mnet/Common/cli/include/exec_exit.h b/data/mnet/Common/cli/include/exec_exit.h
new file mode 100644
index 0000000..9aa900e
--- /dev/null
+++ b/data/mnet/Common/cli/include/exec_exit.h
@@ -0,0 +1,45 @@
+/* $Id: exec_exit.h,v 10.1 1998/06/10 20:42:04 sutton Exp $
+ * $Source: /export/sbcc/cepro/os/parser/src/exec_exit.h,v $
+ *------------------------------------------------------------------
+ * Cisco MicroWeb Server Version 2
+ *
+ * File: exec_exit.h
+ * Description: exit, quit - exit from the EXEC
+ * Owner: Prasanna Parthasarathy
+ * Notes:
+ *
+ * Copyright (c) 1997 by cisco Systems, Inc.
+ * All rights reserved.
+ *------------------------------------------------------------------
+ * $Log: exec_exit.h,v $
+ * Revision 10.1 1998/06/10 20:42:04 sutton
+ * code merge
+ *
+ * Revision 1.3 1998/03/18 04:34:54 sutton
+ * Initial release of CLI/TCL integration.
+ * Still missing -- sysconf commit, sysconf abort,
+ * and interrupt character processing.
+ * Also changed the output pager (More processing) to
+ * be much simpler and universal for all commands.
+ * CSCdj89287: make the CLI callable from TCL
+ *
+ * Revision 1.2 1997/05/14 22:12:09 pparthas
+ * Removed test_* files. Included some files for Show routines
+ * and cleaned-up file structure ( not source code ;-) )
+ *
+ *------------------------------------------------------------------
+ * $Endlog$
+ */
+/******************************************************************
+ * exit, quit - exit from the EXEC
+ */
+extern void Logout(parseinfo *csb);
+EOLI (exec_quit_eol, exit_exec_command, CMD_QUIT);
+EOLI (exec_exit_eol, Logout, CMD_EXIT);
+KEYWORD (exec_quit, exec_quit_eol, ALTERNATE,
+ "quit", "Exit from the EXEC", PRIV_MIN | PRIV_HIDDEN | PRIV_INTERACTIVE);
+KEYWORD (exec_exit, exec_exit_eol, exec_quit,
+ "exit", "Exit from the EXEC", PRIV_MIN | PRIV_INTERACTIVE);
+
+#undef ALTERNATE
+#define ALTERNATE exec_exit
diff --git a/data/mnet/Common/cli/include/exec_help.h b/data/mnet/Common/cli/include/exec_help.h
new file mode 100644
index 0000000..8226936
--- /dev/null
+++ b/data/mnet/Common/cli/include/exec_help.h
@@ -0,0 +1,44 @@
+/* $Id: exec_help.h,v 10.2 1998/12/30 18:13:02 sundars Exp $
+ * $Source: /export/sbcc/cepro/os/parser/src/exec_help.h,v $
+ *------------------------------------------------------------------
+ * Cisco MicroWeb Server Version 2
+ *
+ * File: exec_help.h
+ * Description: help command
+ * Owner: Prasanna Parthasarathy
+ * Notes:
+ *
+ * Copyright (c) 1997 by cisco Systems, Inc.
+ * All rights reserved.
+ *------------------------------------------------------------------
+ * $Log: exec_help.h,v $
+ * Revision 10.2 1998/12/30 18:13:02 sundars
+ * Fix help texts for CLI commands
+ * CSCdk69292: CLI Command Descriptions When Entering a ?-Part 2
+ *
+ * Revision 10.1 1998/06/10 20:42:04 sutton
+ * code merge
+ *
+ * Revision 1.3 1997/10/09 18:14:18 pparthas
+ * First Attempt to cleanup dead-code to reduce code-size; Included debug
+ * scheme in place
+ *
+ * Revision 1.2 1997/05/14 22:12:09 pparthas
+ * Removed test_* files. Included some files for Show routines
+ * and cleaned-up file structure ( not source code ;-) )
+ *
+ *------------------------------------------------------------------
+ * $Endlog$
+ */
+
+/******************************************************************
+ * help
+ */
+
+EOLNS (exec_help_eol, exec_help_command);
+KEYWORD (exec_help, exec_help_eol, ALTERNATE,
+ "help", "Assistance for command line interface",
+ PRIV_MIN );
+
+#undef ALTERNATE
+#define ALTERNATE exec_help
diff --git a/data/mnet/Common/cli/include/exec_show.h b/data/mnet/Common/cli/include/exec_show.h
new file mode 100644
index 0000000..6dbb727
--- /dev/null
+++ b/data/mnet/Common/cli/include/exec_show.h
@@ -0,0 +1,35 @@
+/* $Id: exec_show.h,v 10.1 1998/06/10 20:42:06 sutton Exp $
+ * $Source: /export/sbcc/cepro/os/parser/src/exec_show.h,v $
+ *------------------------------------------------------------------
+ * Cisco MicroWeb Server Version 2
+ *
+ * File: exec_show.h
+ * Description: show command
+ * Owner: Prasanna Parthasarathy
+ * Notes:
+ *
+ * Copyright (c) 1997 by cisco Systems, Inc.
+ * All rights reserved.
+ *------------------------------------------------------------------
+ * $Log: exec_show.h,v $
+ * Revision 10.1 1998/06/10 20:42:06 sutton
+ * code merge
+ *
+ * Revision 1.2 1997/05/14 22:12:10 pparthas
+ * Removed test_* files. Included some files for Show routines
+ * and cleaned-up file structure ( not source code ;-) )
+ *
+ *------------------------------------------------------------------
+ * $Endlog$
+ */
+
+/******************************************************************/
+EOLNS (exec_show_help_eol, show_help_command);
+PRIV_TEST(exec_show_help, no_alt, no_alt,
+ exec_show_commands, PRIV_MIN);
+
+KEYWORD (exec_show, exec_show_help, ALTERNATE,
+ "show", "Show running system information", PRIV_MIN);
+
+#undef ALTERNATE
+#define ALTERNATE exec_show
diff --git a/data/mnet/Common/cli/include/exec_undebug.h b/data/mnet/Common/cli/include/exec_undebug.h
new file mode 100644
index 0000000..623e37c
--- /dev/null
+++ b/data/mnet/Common/cli/include/exec_undebug.h
@@ -0,0 +1,33 @@
+/* $Id: exec_undebug.h,v 10.1 1998/06/10 20:42:17 sutton Exp $
+ * $Source: /export/sbcc/cepro/os/parser/src/exec_undebug.h,v $
+ *------------------------------------------------------------------
+ * Cisco MicroWeb Server Version 2
+ *
+ * File: exec_undebug.h
+ * Description: undebug command support
+ * Owner: Prasanna Parthasarathy
+ * Notes:
+ *
+ * Copyright (c) 1997 by cisco Systems, Inc.
+ * All rights reserved.
+ *------------------------------------------------------------------
+ * $Log: exec_undebug.h,v $
+ * Revision 10.1 1998/06/10 20:42:17 sutton
+ * code merge
+ *
+ * Revision 1.1 1998/04/21 01:57:17 pparthas
+ * CLI Changes
+ * CSCdj68847: CLI changes
+ *
+ *------------------------------------------------------------------
+ * $Endlog$
+ */
+
+/******************************************************************/
+KEYWORD_ID(exec_undebug, exec_debug_commands, ALTERNATE,
+ sense, FALSE,
+ "undebug", "Disable debugging functions (see also 'debug')",
+ PRIV_OPR);
+
+#undef ALTERNATE
+#define ALTERNATE exec_undebug
diff --git a/data/mnet/Common/cli/include/imc.h b/data/mnet/Common/cli/include/imc.h
new file mode 100644
index 0000000..ad6b5a0
--- /dev/null
+++ b/data/mnet/Common/cli/include/imc.h
@@ -0,0 +1,538 @@
+#ifndef _IMC_H_
+#define _IMC_H_
+
+/*
+===============================================================================
+
+ Modules have a request, indication, management queues that are anchored
+ in the IMC Queue Anchor.
+
+ IMC Q anchor block
+ ________
+ | |
+ | |------> MgmtQ
+ | |------> Expedited IndQ
+ | |------> Expedited ReqQ
+ | |------> ReqQ
+ | |------> IndQ
+ | |--|
+ |________| |
+ |
+ \|/ Next Module Anchor block
+
+===============================================================================
+*/
+
+#define MAX_IMC_COUNT 32
+
+
+
+struct imc_qanchor { /* IMC queue anchor */
+
+ NODE imc_element; /* List Element */
+ tSEMAPHORE semId; /* Couting Semaphore task is waiting on */
+ tUOCTET4 taskId; /* Task requesting IMC Services */
+ tOCTET4 workCount; /* Number of elements in Queues */
+ LIST pimc_mgmt; /* Management request queue */
+ LIST pimc_exp_ind; /* Expedited Indication queue */
+ LIST pimc_exp_req; /* Expedited request queue */
+ LIST pimc_ind; /* Normal Indication queue */
+ LIST pimc_req; /* Normal request queue */
+} ;
+
+typedef struct imc_qanchor tIMC_QANCHOR, *tpIMC_QANCHOR;
+
+/*
+ * Global Count Macro
+*/
+
+#define INCREMENT 1
+#define DECREMENT 2
+
+
+typedef enum IMC_QUEUE_TYPE {
+ MGMT_QUEUE = 0,
+ NREQ_QUEUE,
+ EREQ_QUEUE,
+ NIND_QUEUE,
+ EIND_QUEUE
+} IMC_QUEUE_TYPE;
+
+
+/* Convenience macro for mid queues */
+/* Use with caution by checking for NULL */
+
+#define mMID2Q(mid) pimcglp[(mid)]
+#define mMID2MGMT(mid) (&(mMID2Q((mid))->pimc_mgmt))
+#define mMID2EREQ(mid) (&(mMID2Q((mid))->pimc_exp_req))
+#define mMID2NREQ(mid) (&(mMID2Q((mid))->pimc_req))
+#define mMID2EIND(mid) (&(mMID2Q((mid))->pimc_exp_ind))
+#define mMID2NIND(mid) (&(mMID2Q((mid))->pimc_ind))
+#define mMID2SEM(mid) (mMID2Q((mid))->semId)
+
+#ifdef USE_IMC_MACROS
+
+#define mCHANGEGLOBALCOUNT(action) \
+ {\
+ if ( action == INCREMENT ) \
+ ++imc_global_count; \
+ else if ( action == DECREMENT ) {\
+ --imc_global_count; \
+ if ( imc_global_count < 0 ) { \
+ PSpanic("mCHANGEGLOBALCOUNT: Negative Count\n"); \
+ }\
+ }\
+ else { \
+ trace_Msg("\n%s: ", taskName( taskIdSelf() ));\
+ trace_Msg("mCHANGEGLOBALCOUNT:Invalid Action\n"); \
+ } \
+ }
+
+#define mTAKEINDEXSEM(which, rc ) \
+ { \
+ if ( PSsemTake( freeIndexSemId,WAIT_FOREVER ) == ERROR) { \
+ PSpanic("Could not Take freeIndex Semaphore\n"); \
+ rc = RC_ERR; \
+ } else \
+ rc = RC_OK; \
+ }
+
+#define mGIVEINDEXSEM( which ) \
+ { \
+ if ( PSsemGive( freeIndexSemId) == ERROR) { \
+ PSpanic("Could not Give freeIndex Semaphore\n"); \
+ } \
+ }
+
+#define mCHECKMODULEIMC( which, mid,rc) \
+ { \
+ if (pimcglp[(mid)] == NULL ) { \
+ trace_Msg("NULL IMC Anchor for Destination %ld\n", \
+ mid ); \
+ rc = RC_ERR; \
+ } else \
+ rc = RC_OK; \
+ }
+
+
+
+/*
+ * POST service interaction macros
+ * Interaction post Failed if rc != RC_OK
+ * pComSim->destid is module id of destination
+ */
+
+#define mPOST_SIM_NREQ(pComSim, rc) \
+ { \
+ if ( PSsemTake( freeIndexSemId,WAIT_FOREVER ) == ERROR) { \
+ PSpanic("mPOST_SIM_NREQ:Could not get semaphore\n"); \
+ rc = RC_ERR; \
+ } \
+ else if (pimcglp[(pComSim)->destid] == NULL ) { \
+ trace_Msg("NULL IMC Anchor for Destination %ld", \
+ (pComSim)->destid ); \
+ rc = RC_ERR; \
+ } \
+ else if ( (rc=lstAdd((mMID2NREQ((pComSim)->destid)), \
+ &(pComSim)->simq)) == RC_OK ) { \
+ ++((pimcglp[(pComSim)->destid])->workCount); \
+ mCHANGEGLOBALCOUNT( INCREMENT ); \
+ if ( PSsemGive(mMID2SEM((pComSim)->destid)) == ERROR ) { \
+ PSpanic("mPOST_SIM_NREQ:Could not give Task semaphore\n"); \
+ rc = RC_ERR; \
+ } \
+ } \
+ if ( PSsemGive( freeIndexSemId ) == ERROR) { \
+ PSpanic("mPOST_SIM_NREQ:Could not give Index semaphore\n"); \
+ rc = RC_ERR; \
+ } \
+ }
+
+#define mPOST_SIM_MGMT(pComSim, rc) \
+ { \
+ if ( PSsemTake( freeIndexSemId,WAIT_FOREVER ) == ERROR) { \
+ PSpanic("mPOST_SIM_MGMT:Could not get semaphore\n"); \
+ rc = RC_ERR; \
+ } \
+ else if ( (pimcglp[(pComSim)->destid] == NULL ) ) { \
+ trace_Msg("%s: ", taskName( taskIdSelf() ));\
+ trace_Msg("NULL IMC Anchor for Destination %ld" \
+ ,(pComSim)->destid ); \
+ rc = RC_ERR; \
+ } \
+ else if ( (rc=lstAdd((mMID2MGMT((pComSim)->destid)), \
+ &(pComSim)->simq)) == RC_OK ) { \
+ mCHANGEGLOBALCOUNT( INCREMENT ); \
+ ++((pimcglp[(pComSim)->destid])->workCount); \
+ if ( PSsemGive( mMID2SEM((pComSim)->destid))== ERROR ) { \
+ PSpanic("mPOST_SIM_MGMT:Could not give Task semaphore\n"); \
+ rc = RC_ERR; \
+ } \
+ } \
+ if ( PSsemGive( freeIndexSemId ) == ERROR) { \
+ PSpanic("mPOST_SIM_MGMT:Could not give Index semaphore\n"); \
+ rc = RC_ERR; \
+ } \
+ }
+
+/* Post Normal Indication Failed if rc != RC_OK */
+#define mPOST_SIM_NIND(pComSim, rc) \
+ { \
+ if (PSsemTake( freeIndexSemId,WAIT_FOREVER ) == ERROR) { \
+ PSpanic("mPOST_SIM_NIND:Could not get semaphore\n"); \
+ rc = RC_ERR; \
+ } \
+ else if (pimcglp[(pComSim)->destid] == NULL ) { \
+ trace_Msg("%s: ", taskName( taskIdSelf() ));\
+ trace_Msg("NULL IMC Anchor for Destination %ld", \
+ (pComSim)->destid ); \
+ rc = RC_ERR; \
+ } \
+ else if ( (rc=lstAdd((mMID2NIND((pComSim)->destid)), \
+ &((pComSim)->simq))) == RC_OK ) { \
+ ++((pimcglp[(pComSim)->destid])->workCount); \
+ mCHANGEGLOBALCOUNT( INCREMENT ); \
+ if ( PSsemGive( mMID2SEM((pComSim)->destid)) == ERROR ) { \
+ PSpanic("mPOST_SIM_NIND:Could not give Task semaphore\n"); \
+ rc = RC_ERR; \
+ } \
+ } \
+ if ( PSsemGive( freeIndexSemId ) == ERROR) { \
+ PSpanic("mPOST_SIM_NIND:Could not give Index semaphore\n"); \
+ rc = RC_ERR; \
+ } \
+ }
+
+/* Post Expedited Request Failed if rc != RC_OK */
+#define mPOST_SIM_EREQ(pComSim, rc) \
+ { \
+ if ( PSsemTake( freeIndexSemId,WAIT_FOREVER ) == ERROR) { \
+ PSpanic("mPOST_SIM_EREQ:Could not get semaphore\n"); \
+ rc = RC_ERR; \
+ } \
+ else if ( (pimcglp[(pComSim)->destid] == NULL ) ) { \
+ trace_Msg("%s: ", taskName( taskIdSelf() ));\
+ trace_Msg("NULL IMC Anchor for Destination %ld", \
+ (pComSim)->destid ); \
+ rc = RC_ERR; \
+ } \
+ else if ( (rc=lstAdd(mMID2EREQ((pComSim)->destid), \
+ &(pComSim)->simq)) == RC_OK ) { \
+ mCHANGEGLOBALCOUNT( INCREMENT ); \
+ ++((pimcglp[(pComSim)->destid])->workCount); \
+ if ( PSsemGive( mMID2SEM((pComSim)->destid)) == ERROR ) { \
+ PSpanic("mPOST_SIM_EREQ:Could not give Task semaphore\n"); \
+ rc = RC_ERR; \
+ } \
+ } \
+ if ( PSsemGive( freeIndexSemId ) == ERROR) { \
+ PSpanic("mPOST_SIM_EREQ:Could not give semaphore\n"); \
+ rc = RC_ERR; \
+ } \
+ }
+
+/* Post Expedited Indication Failed if rc != RC_OK */
+#define mPOST_SIM_EIND(pComSim, rc) \
+ { \
+ if ( PSsemTake( freeIndexSemId,WAIT_FOREVER ) == ERROR) { \
+ PSpanic("mPOST_SIM_EIND:Could not get semaphore\n"); \
+ rc = RC_ERR; \
+ } \
+ else if (pimcglp[(pComSim)->destid] == NULL ) { \
+ trace_Msg("%s: ", taskName( taskIdSelf() ));\
+ trace_Msg("NULL IMC Anchor for Destination %ld", \
+ (pComSim)->destid ); \
+ rc = RC_ERR; \
+ } \
+ if ( (rc=lstAdd(mMID2EIND((pComSim)->destid), \
+ &(pComSim)->simq)) == RC_OK ) { \
+ mCHANGEGLOBALCOUNT( INCREMENT ); \
+ ++((pimcglp[(pComSim)->destid])->workCount); \
+ if ( PSsemGive( mMID2SEM((pComSim)->destid)) == ERROR ) { \
+ PSpanic("mPOST_SIM_EIND:Could not give semaphore\n"); \
+ rc = RC_ERR; \
+ } \
+ } \
+ if ( PSsemGive( freeIndexSemId ) == ERROR) { \
+ PSpanic("mPOST_SIM_EIND:Could not give semaphore\n"); \
+ rc = RC_ERR; \
+ } \
+ }
+
+/*
+ * GET Service interactions for a module, Indications first
+ */
+
+
+/* Call with pComSim == NULLP , mid == module id */
+/* get Management requests, expedited indications and requests first,
+ * then the normal indications and requests */
+
+/* Get Management work only */
+#define mGET_MGMT_WORK_SIM(pComSim, mid) \
+ { \
+ if (PSsemTake(freeIndexSemId, WAIT_FOREVER ) == ERROR) { \
+ PSpanic("mGET_MGMT_WORK_SIM:Could not get semaphore\n"); \
+ } \
+ else if (pimcglp[(mid)] == NULL) { \
+ trace_Msg("mGET_MGMT_WORK_SIM:NULL IMC Anchor for Module %ld", \
+ (tUOCTET4)mid); \
+ pComSim = NULL; \
+ } \
+ else if (mMID2Q(mid)->workCount > 0 ) { \
+ tOCTET2 count = lstCount(mMID2MGMT(mid)); \
+ if (count < 0 ) { \
+ PSpanic("mGET_MGMT_WORK_SIM:Could not get count\n"); \
+ } \
+ else if ( count > 0 ){ \
+ pComSim = (tpCOMSIM)lstGet(mMID2MGMT(mid)); \
+ if (pComSim == NULL) { \
+ PSpanic("mGET_MGMT_WORK_SIM:NULL Sim Dequeued\n"); \
+ } \
+ mCHANGEGLOBALCOUNT( DECREMENT ); \
+ --((pimcglp[mid])->workCount); \
+ } \
+ } \
+ else { \
+ pComSim = NULL; \
+ } \
+ if ( PSsemGive( freeIndexSemId ) == ERROR) { \
+ PSpanic("mGET_MGMT_WORK_SIM:Could not give semaphore\n"); \
+ } \
+ }
+
+
+/* Get Normal Indication work only */
+
+#define mGET_NIND_WORK_SIM(pComSim, mid) \
+ { \
+ if ( PSsemTake(freeIndexSemId,WAIT_FOREVER ) == ERROR) { \
+ PSpanic("mGET_NIND_WORK_SIM:Could not get semaphore\n"); \
+ } \
+ else if ( mIS_THERE_WORK( (mid) ) ) { \
+ tOCTET2 count=lstCount(mMID2NIND((mid))); \
+ if (count < 0 ) { \
+ PSpanic("mGET_NIND_WORK_SIM:Could not get count\n"); \
+ }\
+ else if ( count > 0 ){ \
+ pComSim = (tpCOMSIM)lstGet(mMID2NIND(mid)); \
+ if (pComSim == NULL) { \
+ PSpanic("mGET_NIND_WORK_SIM:NULL Sim Dequeued\n"); \
+ } \
+ --((pimcglp[mid])->workCount); \
+ mCHANGEGLOBALCOUNT( DECREMENT ); \
+ } \
+ } else { \
+ pComSim = NULL; \
+ } \
+ if ( PSsemGive( freeIndexSemId ) == ERROR) { \
+ PSpanic("mGET_NIND_WORK_SIM:Could not give semaphore\n"); \
+ } \
+ }
+
+/* Get Expedited Indication work only */
+
+#define mGET_EIND_WORK_SIM(pComSim, mid) \
+ { \
+ if ( PSsemTake( freeIndexSemId,WAIT_FOREVER ) == ERROR) { \
+ PSpanic("mGET_EIND_WORK_SIM:Could not get semaphore\n"); \
+ } \
+ else if ( mIS_THERE_WORK( (mid) ) ) { \
+ tOCTET2 count=lstCount(mMID2EIND((mid))); \
+ if (count < 0 ) { \
+ PSpanic("mGET_EIND_WORK_SIM:Could not get count\n"); \
+ }\
+ else if ( count > 0 ){ \
+ pComSim = (tpCOMSIM)lstGet(mMID2EIND(mid)); \
+ if (pComSim == NULL) { \
+ trace_Msg("mGET_EIND_WORK_SIM:NULL Sim Dequeued\n"); \
+ } \
+ mCHANGEGLOBALCOUNT( DECREMENT ); \
+ --((pimcglp[mid])->workCount); \
+ } \
+ } else{ \
+ pComSim = NULL; \
+ } \
+ if ( PSsemGive( freeIndexSemId ) == ERROR) { \
+ PSpanic("mGET_EIND_WORK_SIM:Could not give semaphore\n"); \
+ } \
+ }
+
+/* Get Normal Request work only */
+
+#define mGET_NREQ_WORK_SIM(pComSim, mid) \
+ { \
+ if ( PSsemTake( freeIndexSemId,WAIT_FOREVER ) == ERROR) { \
+ PSpanic("mGET_NREQ_WORK_SIM:Could not get semaphore\n"); \
+ } \
+ else if ( mIS_THERE_WORK((mid))) { \
+ tOCTET2 count=lstCount(mMID2NREQ((mid))); \
+ if (count < 0 ) { \
+ PSpanic("mGET_NREQ_WORK_SIM:Could not get count\n"); \
+ } \
+ else if ( count > 0 ){ \
+ pComSim = (tpCOMSIM)lstCount(mMID2NREQ(mid)); \
+ if (pComSim == NULL) { \
+ PSpanic("mGET_NREQ_WORK_SIM:NULL Sim Dequeued\n"); \
+ } \
+ mCHANGEGLOBALCOUNT( DECREMENT ); \
+ --((pimcglp[mid])->workCount); \
+ } \
+ } else { \
+ pComSim = NULL; \
+ } \
+ if ( PSsemGive( freeIndexSemId ) == ERROR) { \
+ PSpanic("mGET_NREQ_WORK_SIM:Could not give semaphore\n"); \
+ } \
+ }
+
+/* Get Expedited Request work only */
+
+#define mGET_EREQ_WORK_SIM(pComSim, mid) \
+ { \
+ if ( PSsemTake( freeIndexSemId,WAIT_FOREVER ) == ERROR) { \
+ PSpanic("mGET_EREQ_WORK_SIM:Could not get semaphore\n"); \
+ } \
+ else if ( mIS_THERE_WORK((mid))) { \
+ tOCTET2 count=lstCount(mMID2EREQ((mid))); \
+ if (count < 0 ) { \
+ PSpanic("mGET_EREQ_WORK_SIM:Could not get count\n"); \
+ }\
+ else if ( count > 0 ){ \
+ pComSim = (tpCOMSIM)lstGet(mMID2EREQ(mid)); \
+ if (pComSim == NULL) { \
+ PSpanic("mGET_EREQ_WORK_SIM:NULL Sim Dequeued\n"); \
+ } \
+ mCHANGEGLOBALCOUNT( DECREMENT ); \
+ --((pimcglp[mid])->workCount); \
+ } \
+ } \
+ else { \
+ pComSim = NULL; \
+ } \
+ if ( PSsemGive( freeIndexSemId ) == ERROR) { \
+ PSpanic("mGET_EREQ_WORK_SIM:Could not give semaphore\n"); \
+ } \
+ }
+
+
+#else /* USE_IMC_MACROS */
+
+#define mCHANGEGLOBALCOUNT(action) \
+ imc_change_global_count( (action))
+
+#define mPOST_SIM_NREQ(pComSim, rc) \
+ rc = imc_post_sim( (pComSim), NREQ_QUEUE)
+
+#define mPOST_SIM_MGMT(pComSim, rc) \
+ rc = imc_post_sim( (pComSim), MGMT_QUEUE)
+
+/* Post Expedited Indication Failed if rc != RC_OK */
+#define mPOST_SIM_EIND(pComSim, rc) \
+ rc = imc_post_sim( (pComSim), EIND_QUEUE)
+
+/* Post Expedited Request Failed if rc != RC_OK */
+#define mPOST_SIM_EREQ(pComSim, rc) \
+ rc = imc_post_sim( (pComSim), EREQ_QUEUE)
+
+/* Post Normal Indication Failed if rc != RC_OK */
+#define mPOST_SIM_NIND(pComSim, rc) \
+ rc = imc_post_sim( (pComSim), NIND_QUEUE)
+
+/* Get Management work only */
+#define mGET_MGMT_WORK_SIM(pComSim, mid) \
+ imc_get_sim( &(pComSim), (mid), MGMT_QUEUE );
+
+/* Get Normal Indication work only */
+#define mGET_NIND_WORK_SIM(pComSim, mid) \
+ imc_get_sim( &(pComSim), (mid), NIND_QUEUE );
+
+/* Get Expedited Indication work only */
+#define mGET_EIND_WORK_SIM(pComSim, mid) \
+ imc_get_sim( &(pComSim), (mid), EIND_QUEUE );
+
+/* Get Normal Request work only */
+#define mGET_NREQ_WORK_SIM(pComSim, mid) \
+ imc_get_sim( &(pComSim), (mid), NREQ_QUEUE );
+
+/* Get Expedited Request work only */
+#define mGET_EREQ_WORK_SIM(pComSim, mid) \
+ imc_get_sim( &(pComSim), (mid), EREQ_QUEUE );
+
+
+#endif /* USE_IMC_MACROS */
+
+
+/* Get Request work only */
+
+#define mGET_REQ_WORK_SIM(pComSim, mid) \
+ { \
+ mGET_EREQ_WORK_SIM( pComSim, mid ); \
+ if ( pComSim == NULL ) { \
+ mGET_NREQ_WORK_SIM( pComSim, mid ); \
+ } \
+ }
+
+/* Get indication work only */
+
+#define mGET_IND_WORK_SIM(pComSim, mid) \
+ { \
+ mGET_EIND_WORK_SIM( pComSim, mid ); \
+ if ( pComSim == NULL ) { \
+ mGET_NIND_WORK_SIM( pComSim, mid ); \
+ } \
+ }
+
+
+
+/* Get Any work. Enforces a policy of servicing order */
+/* Management, Expedited Indication, Expedited Requests */
+/* Normal Indications, Normal Requests. The order given */
+/* is also exhaustive and hence can starve other queues */
+
+#define mGET_WORK_SIM(pComSim, mid) \
+ { \
+ mGET_MGMT_WORK_SIM( pComSim, mid ); \
+ if ( pComSim == NULL ) { \
+ mGET_EIND_WORK_SIM( pComSim, mid ); \
+ } \
+ if ( pComSim == NULL ){ \
+ mGET_EREQ_WORK_SIM( pComSim, mid ); \
+ } \
+ if ( pComSim == NULL ){ \
+ mGET_NREQ_WORK_SIM( pComSim, mid ); \
+ } \
+ if ( pComSim == NULL ){ \
+ mGET_NIND_WORK_SIM( pComSim, mid ); \
+ } \
+ }
+
+/* mIS_THERE_WORK(mid) returns TRUE or FALSE depending on whether there
+ is work for this module or not */
+
+#define mIS_THERE_WORK(mid) \
+ ( ( \
+ (mMID2Q((mid)) == NULL ) ? FALSE : \
+ (mMID2Q((mid))->workCount > 0 ) ? \
+ TRUE : FALSE ) )
+
+/* checks if there is work in any of the imc queues */
+
+#define mANY_WORK imc_global_count
+
+/* exported by imc.c */
+extern tOCTET4 imc_global_count; /* keeps track of the TOTAL number
+ of entries in the imc facility */
+extern LIST *pimcListHead; /* Pointer to IMC ListHead */
+extern tpIMC_QANCHOR pimcglp[MAX_IMC_COUNT];
+/* Global MUTEX Semaphores */
+extern tSEMAPHORE freeIndexSemId; /* Protect freeIndex and hence IMC */
+extern boolean imcInited;
+extern void imc_term(void);
+extern tOCTET2 imc_init( void );
+extern tOCTET2 imc_add( tpOCTET4 index, tSEMAPHORE semId, tTASKID taskId );
+extern tOCTET2 imc_remove( tUOCTET4 index );
+extern tOCTET2 imc_post_sim(tpCOMSIM , IMC_QUEUE_TYPE);
+extern void imc_get_sim( tpCOMSIM *, tUOCTET4 , IMC_QUEUE_TYPE);
+
+#endif /* _IMC_H_ */
diff --git a/data/mnet/Common/cli/include/imsg.h b/data/mnet/Common/cli/include/imsg.h
new file mode 100644
index 0000000..45f3cc2
--- /dev/null
+++ b/data/mnet/Common/cli/include/imsg.h
@@ -0,0 +1,179 @@
+#ifndef _IMSG_H_
+#define _IMSG_H_
+/*
+-------------------------------------------------------------------------------
+ The common service interaction header
+-------------------------------------------------------------------------------
+*/
+
+struct com_sim {
+ NODE simq; /* queue element */
+ tUOCTET4 ownership; /* if 0, it can be freed */
+ tUOCTET4 origid; /* originators module id */
+ tUOCTET4 destid; /* destination module id */
+ tUOCTET4 requestid; /* request id generated by orig.*/
+ tUOCTET4 serviceid; /* service interaction id */
+ tUOCTET4 status; /* carries return codes */
+ SEM_ID ownerSemId; /* Semaphore for ownership */
+ void *pLayerSim; /* pointer to module-specific sim */
+} ;
+
+typedef struct com_sim tCOMSIM, *tpCOMSIM;
+
+struct idval {
+ tOCTET4 id; /* Identifier */
+ void* value; /* Value */
+};
+
+typedef struct idval tIDVAL, *tpIDVAL;
+
+#define MAX_CFG_ID_VAL 5
+
+struct mgmt_sim {
+ tCOMSIM comsim; /* Common SIM */
+ tUOCTET4 nid;
+ tIDVAL idvals[MAX_CFG_ID_VAL];
+ boolean sense;
+ SEM_ID configSemId;
+ int inFd;
+ int outFd;
+};
+
+#define mGETID(pSim,index) (pSim)->idvals[(index)-1].id
+#define mGETVAL(pSim,index) (pSim)->idvals[(index)-1].value
+
+#define mSETID( pSim,index,id ) mID((pSim),(index)) = (id)
+#define mSETVAL( pSim,index,val ) mID((pSim),(index)) = (val)
+
+typedef struct mgmt_sim tMGMTSIM, *tpMGMTSIM;
+
+/*
+------------------------------------------------------------------------------
+ SIM manipulation macros
+------------------------------------------------------------------------------
+*/
+#define IMCcalloc(nelem, elemSize) PScalloc((nelem), (elemSize))
+#define IMCmalloc(elemSize) PSmalloc((elemSize))
+#define IMCrealloc(elemPtr, elemSize) PSrealloc((elemPtr), (elemSize))
+#define IMCfree(elemPtr) PSfree((elemPtr))
+
+
+
+#define mGETSIM(size) imsg_getsim( (size) )
+
+#define mFREEMGMTSIM(pSim) \
+ { \
+ mFREESIM( &(pSim->comsim) ); \
+ }
+#ifndef USE_IMC_MACROS
+#define mFREESIM(pSim) imsg_freesim( (pSim))
+#else
+#define mFREESIM(pSim) \
+ { \
+ if ( PSsemTake(((tpCOMSIM)(pSim))->ownerSemId,\
+ WAIT_FOREVER ) == ERROR ) { \
+ PSpanic("Could not Take Ownership Semaphore "); \
+ }\
+ else if ( ((tpCOMSIM)(pSim))->ownership == 0) { \
+ if( ((tpCOMSIM)(pSim))->pLayerSim ) \
+ PSfree(((tpCOMSIM)(pSim))->pLayerSim); \
+ PSsemDelete(((tpCOMSIM)(pSim))->ownerSemId); \
+ PSfree((tpCOMSIM)pSim);\
+ } else {\
+ --((tpCOMSIM)(pSim))->ownership;\
+ if (PSsemGive(((tpCOMSIM)(pSim))->ownerSemId) == ERROR ) {\
+ PSpanic("mFREESIM:Could not Give Ownership Semaphore\n"); \
+ }\
+ }\
+ }
+#endif /* USE_IMC_MACROS */
+
+#define mSIMCOPY(pDestsim, pSrcSim) \
+ { \
+ PSsemTake(((tpCOMSIM)(pSrcSim))->ownerSemId, WAIT_FOREVER ); \
+ ((tpCOMSIM)(pSrcSim))->ownership++; \
+ pDestSim = pSrcSim; \
+ PSsemGive(((tpCOMSIM)(pSrcSim))->ownerSemId); \
+ }
+
+#define mZEROSIM(pSim) imsg_zerosim( (pSim) )
+
+#define mFILL_COM_SIM( pComSim, origin, dest, service, request, pLayer,owner, \
+ moreStatus )\
+ { \
+ if ( !pComSim ) { \
+ PSpanic("NULL SIM in mFILL_COM_SIM\n"); \
+ } \
+ else { \
+ pComSim->ownership = owner; \
+ pComSim->origid = origin; \
+ pComSim->destid = dest; \
+ pComSim->requestid = request; \
+ pComSim->serviceid = service; \
+ pComSim->pLayerSim = pLayer; \
+ pComSim->status = moreStatus; \
+ } \
+ }
+
+#define mSIM_ORIG(pGsim) ((pGsim)->origid)
+#define mSIM_DEST(pGsim) ((pGsim)->destid)
+#define mSIM_REQ(pGsim) ((pGsim)->requestid)
+#define mSIM_SERV(pGsim) ((pGsim)->serviceid)
+
+
+
+/*
+-------------------------------------------------------------------------------
+ Service interaction codes for the various modules, bottom up
+ Recomended convention for 4 byte service code:
+
+ [0][1][2][3]
+
+ byte 0: service provider id
+ byte 1: direction 1: request, 2 indication
+ byte 2, 3 service class
+
+-------------------------------------------------------------------------------
+*/
+
+#define MODULE_MASK 0xF000
+#define DIRECTION_MASK 0x0200
+#define SERVICE_CLASS_MASK 0x00FF
+ /* service to module */
+
+#define REQ_MASK 0x0100 /* Request Mask */
+#define IND_MASK 0x0200 /* Indication Mask*/
+
+#define IS_REQUEST(serviceid) ((serviceid) & REQ_MASK )
+#define IS_INDICATION(serviceid) ((serviceid) & IND_MASK )
+
+
+/* Get moduleid from service id */
+#define S2L(serviceid) ( ((serviceid)&LAYER_MASK) >> 12 )
+
+/* Service interaction codes */
+#define TEST_MODULE 0x00 /* Test Module */
+#define SMTPCL_MODULE 0x01 /* SMTP Client Module */
+#define HTTP_MODULE 0x02 /* Http Module */
+#define PARSER_MODULE 0x03 /* Parser Module */
+#define TIMER_MODULE 0x04 /* timer service */
+#define ACL_MODULE 0x05 /* ACL Module */
+#define CAPS_MODULE 0x06 /* CAPS Module */
+
+#define LAST_MODULE CAPS_MODULE
+
+#define ASSIGN_MODULE_ID -1
+
+/*
+**
+** Intermodule service access points
+**
+*/
+/* exported by imsg.c */
+#ifndef USE_IMC_MACROS
+extern void imsg_freesim( tpCOMSIM );
+#endif
+extern tpCOMSIM imsg_getsim (tOCTET4 );
+extern void imsg_zerosim (tpCOMSIM );
+
+#endif /* _IMSG_H_ */
diff --git a/data/mnet/Common/cli/include/macros.h b/data/mnet/Common/cli/include/macros.h
new file mode 100644
index 0000000..8b7d73b
--- /dev/null
+++ b/data/mnet/Common/cli/include/macros.h
@@ -0,0 +1,652 @@
+#ifndef __MACROS_H
+#define __MACROS_H
+
+/*
+ * Common help strings
+ */
+extern const char parser_help_default_keyword[];
+extern const char parser_help_no_keyword[];
+extern const char parser_default_keyword[];
+extern const char parser_no_keyword[];
+
+
+#ifdef BOOT
+#define PHELP(str) NULL
+#else BOOT
+#define PHELP(str) str
+#endif BOOT
+
+#define OBJ(type,num) PTYPE_ ## type ## ( ## num ## )
+
+#define pfdecl(x) extern void x (parseinfo *)
+
+#define TRANS_PRIV(name, priv)\
+ static trans_priv P ## name =\
+ {\
+ (priv),\
+ (priv),\
+ TRANS_PRIV_FLAGS_SET(priv),\
+ 0\
+ }
+
+
+#define NOP(name, acc, alt)\
+ static transition pname(name) = {&pname(acc), &pname(alt),\
+ (trans_func) NOP_action, NULL}
+
+#define LINK_POINT(name, acc)\
+ static dynamic_transition pname(name) =\
+ {\
+ (dynamic_transition *)&pname(acc),\
+ (dynamic_transition *)&pname(link_point),\
+ (trans_func) NOP_action,\
+ NULL\
+ }
+
+#define LINK_TRANS(name, acc)\
+ static dynamic_transition pname(L ## name) =\
+ {\
+ (dynamic_transition *)&pname(NONE),\
+ (dynamic_transition *)&pname(link_trans),\
+ (trans_func) NOP_action,\
+ NULL\
+ };\
+ static transition pname(name) = {(transition *) &pname(L ## name),\
+ &pname(acc),\
+ (trans_func) NOP_action, NULL}
+
+#define LINK_EXIT(name, acc)\
+ LINK_TRANS(name, acc)
+
+#define NVGENS(name, acc, func, subfunc)\
+ pfdecl(func);\
+ static nvgens_struct L ## name = {func, subfunc};\
+ static transition pname(name) = {&pname(acc), NULL,\
+ (trans_func) nvgens_action, & L ## name}
+
+#define NVGENNS(name, acc, func)\
+ pfdecl(func);\
+ static transition pname(name) =\
+ {\
+ &pname(acc),\
+ NULL,\
+ (trans_func) nvgenns_action,\
+ func\
+ }
+
+#define EOLNS(name,func)\
+ pfdecl(func);\
+ static transition pname(name) =\
+ {\
+ NULL,\
+ NULL,\
+ (trans_func) eolns_action,\
+ func\
+ }
+
+#define EOLS(name,func,subfunc)\
+ pfdecl(func);\
+ static eols_struct L ## name = {func, subfunc};\
+ static transition pname(name) = {NULL, NULL, (trans_func) eols_action, & L ## name}
+
+#define EOLI(name,func,subfunc)\
+ pfdecl(func);\
+ static eols_struct L ## name = {func, subfunc};\
+ static transition pname(name) = {NULL, NULL, (trans_func) eoli_action, & L ## name}
+
+#define HELP(name,alt,str)\
+ static help_struct L ## name = {PHELP(str), NULL};\
+ static transition pname(name) = {NULL, &pname(alt), (trans_func) help_action, & L ## name}
+
+#define GENERAL_STRING(name, acc, alt, str, help, flags)\
+ static general_string_struct L ## name =\
+ {\
+ CSBOFF(str),\
+ PHELP(help),\
+ flags\
+ };\
+ static transition pname(name) =\
+ {\
+ &pname(acc),\
+ &pname(alt),\
+ (trans_func) general_string_action,\
+ & L ## name\
+ }
+
+/* A string delimited by whitespace. */
+#define STRING(name, acc, alt, str, help)\
+ GENERAL_STRING(name, acc, alt, str, help,\
+ STRING_QUOTED | STRING_HELP_CHECK)
+
+/* A string delimited by EOL. */
+#define TEXT(name, acc, alt, str, help)\
+ GENERAL_STRING(name, acc, alt, str, help,\
+ STRING_WS_OK | STRING_HELP_CHECK)
+
+/*
+ * Testing Macros
+ */
+
+/* ASSERT - assert that a C expression is true */
+
+#define TEST_EXPR(name, true, false, alt, expr)\
+ static boolean F ## name (parseinfo *csb, transition *mine)\
+ {\
+ return((expr) != 0);\
+ }\
+ static testexpr_struct L ## name = {&pname(false), F ## name};\
+ static transition pname(name) = {&pname(true), &pname(alt),\
+ (trans_func) testexpr_action, & L ## name}
+
+#define ASSERT(name, acc, alt, expr)\
+ TEST_EXPR(name, acc, NONE, alt, expr)
+
+#define IFELSE(name, if, else, expr)\
+ TEST_EXPR(name, if, else, NONE, expr)
+
+/* EVAL - always accept, and evaluate a C expression */
+
+#define EVAL(name,acc,expr)\
+ static void F ## name (parseinfo *csb, transition *mine)\
+ { expr;push_node(csb, mine->accept); }\
+ static transition pname(name) = {&pname(acc), NULL, (trans_func) F ## name, NULL}
+
+/* TESTVAR - test a variable relative to a constant value */
+
+#define TESTVAR(name, equal, notequal, lt, gt, alt, var, val)\
+ static test_struct L ## name = {CSBOFF(var), (uint) val,\
+ &pname(equal), &pname(notequal),\
+ &pname(lt), &pname(gt)};\
+ static transition pname(name) = {NULL, &pname(alt),\
+ (trans_func) test_action, & L ## name}
+
+
+/* Relations simpler than TESTVAR in its entirity */
+
+#define EQUAL(name, acc, alt, var, val)\
+ TESTVAR(name, acc, NONE, NONE, NONE, alt, var, val)
+#define NEQ(name, acc, alt, var, val)\
+ TESTVAR(name, NONE, acc, NONE, NONE, alt, var, val)
+#define SPLIT(name, acc, alt, var, val)\
+ TESTVAR(name, acc, alt, NONE, NONE, NONE, var, val)
+
+/* SET - always accept, setting a variable to a constant value */
+
+#define SET(name, acc, var, val)\
+ static set_struct L ## name = {CSBOFF(var), (uint) val};\
+ static transition pname(name) = {&pname(acc), NULL,\
+ (trans_func) set_action, & L ## name}
+
+/*
+ * KEYWORD is a complete token, with help, error handling and whitespace.o
+ * KEYWORD_OPTWS has optional trailing white-space.
+ * KEYWORD_NOWS has no trailing white-space.
+ * KEYWORD_MM takes an extra argument for the minimum number of chars required
+ * to match.
+ */
+
+#define GENERAL_KEYWORD(name,acc,alt,str,help,priv,var,val,match,flags)\
+ TRANS_PRIV(name, priv);\
+ static general_keyword_struct L ## name = {str, PHELP(help), & P ## name,\
+ var, val, match, flags};\
+ static transition pname(name) = {&pname(acc),&pname(alt),\
+ (trans_func) general_keyword_action, & L ## name}
+
+#define KEYWORD(name, acc, alt, str, help, priv)\
+ TRANS_PRIV(name, priv);\
+ static keyword_struct L ## name = {str, PHELP(help), & P ## name};\
+ static transition pname(name) = {&pname(acc), &pname(alt),\
+ (trans_func) keyword_action, & L ## name}
+
+#define KEYWORD_OPTWS(name,acc,alt,str,help, priv)\
+ TRANS_PRIV(name, priv);\
+ static keyword_struct L ## name = {str, PHELP(help), & P ## name};\
+ static transition pname(name) = {&pname(acc), &pname(alt),\
+ (trans_func) keyword_optws_action, & L ## name}
+
+#define KEYWORD_OPTIONS(name, acc, alt, options, var, priv, flags)\
+ TRANS_PRIV(name, priv);\
+ static keyword_option_struct L ## name =\
+ {\
+ options,\
+ CSBOFF(var),\
+ & P ## name,\
+ flags\
+ };\
+ static transition pname(name) =\
+ {\
+ &pname(acc),\
+ &pname(alt),\
+ (trans_func) keyword_option_action,\
+ & L ## name\
+ }
+
+#define KEYWORD_MM(name,acc,alt,str,help, priv, count)\
+ TRANS_PRIV(name, priv);\
+ static keyword_mm_struct L ## name = {str, PHELP(help), & P ## name, count};\
+ static transition pname(name) = {&pname(acc), &pname(alt),\
+ (trans_func) keyword_mm_action, & L ## name}
+
+#define KEYWORD_ID(name, acc, alt, var, val, str, help, priv)\
+ TRANS_PRIV(name, priv);\
+ static keyword_id_struct L ## name = {str,PHELP(help),&P##name,CSBOFF(var),val};\
+ static transition pname(name) = {&pname(acc), &pname(alt),\
+ (trans_func) keyword_id_action, & L ## name}
+/*
+ * If parse keyword
+ * var |= val
+ */
+#define KEYWORD_OR(name, acc, alt, var, val, str, help, priv)\
+ TRANS_PRIV(name, priv);\
+ static keyword_id_struct L ## name = {str,PHELP(help),&P##name,CSBOFF(var),val};\
+ static transition pname(name) = {&pname(acc), &pname(alt),\
+ (trans_func) keyword_orset_action, & L ## name}
+
+/*
+ * Number macros
+ */
+
+#define GENERAL_NUMBER(name,acc,alt,var,lower,upper,help,flags)\
+ static number_struct L ## name = {CSBOFF(var), lower, upper, PHELP(help), flags};\
+ static transition pname(name) =\
+ {&pname(acc), &pname(alt), (trans_func) general_number_action, & L##name}
+
+#define NUMBER(name, acc, alt, var, lower, upper, help)\
+ GENERAL_NUMBER(name, acc, alt, var, lower, upper, help,\
+ (NUMBER_HEX | HEX_ZEROX_OK | NUMBER_OCT | OCT_ZERO_OK |\
+ NUMBER_DEC | NUMBER_WS_OK | NUMBER_HELP_CHECK))
+
+#define DECIMAL(name, acc, alt, var, lower, upper, help)\
+ GENERAL_NUMBER(name, acc, alt, var, lower, upper, help,\
+ (NUMBER_DEC | NUMBER_WS_OK | NUMBER_HELP_CHECK))
+
+/* HEXADECIMAL matches an unsigned hex number, minimum one
+ * digit, and assigns it to a int. This function works on numbers
+ * which don't begin with '0x'. */
+
+#define HEXADECIMAL(name,acc,alt,var)\
+ GENERAL_NUMBER(name, acc, alt, var, 0, -1, NULL,\
+ (NUMBER_HEX | HEX_NO_ZEROX_OK | NUMBER_NO_WS_OK))
+
+#define HEXNUM(name, acc, alt, var, help)\
+ GENERAL_NUMBER(name, acc, alt, var, 0, -1, help,\
+ (NUMBER_HEX | HEX_NO_ZEROX_OK | NUMBER_WS_OK | NUMBER_HELP_CHECK))
+
+
+/*
+ * This is an OCTAL number, with help, error handling and
+ * whitespace
+ */
+#define OCTAL(name,acc,alt,var,help)\
+ GENERAL_NUMBER(name, acc, alt, var, 0, -1, help,\
+ (NUMBER_OCT | OCT_ZERO_OK | OCT_NO_ZERO_OK |\
+ NUMBER_WS_OK | NUMBER_HELP_CHECK))
+
+#define SIGNED_DEC(name,acc,alt,var,lower,upper,help)\
+ static signed_number_struct L ## name = {CSBOFF(var), lower, upper, PHELP(help)};\
+ static transition pname(name) =\
+ {&pname(acc), &pname(alt), (trans_func) signed_number_action, & L##name}
+
+/* NOPREFIX
+ * Go to 'accept' if there isn't a 'no' prefix.
+ * Consume the remainder of the input and go to 'alt' if there
+ * was a 'no' prefix. This is somewhat backwards from other macros
+ * in that the major action takes place before going to the alternate
+ * state, but it keeps the major thread of the command token chains
+ * similar to other tokens.
+ */
+#define NOPREFIX(name, acc, alt)\
+ static transition pname(name) = {&pname(acc), &pname(alt),\
+ (trans_func) noprefix_action, NULL}
+
+
+/* IPADDR gets an IP address and stores it in addr.
+ * IPADDR_NAME gets an IP address or hostname and
+ * converts to an address stored in addr.
+ */
+#define IPADDR_NAME(name, acc, alt, addr, help)\
+ static addrparse_struct L ## name = {CSBOFF(addr), PHELP(help), ADDR_IP,\
+ ADDR_NAME_LOOKUP};\
+ static transition pname(name) = {& pname(acc), & pname(alt),\
+ (trans_func) generic_addr_action, & L ## name}
+
+#define IPADDR(name,acc,alt,addr, help)\
+ static addrparse_nf_struct L ## name = {CSBOFF(addr), PHELP(help), ADDR_IP};\
+ static transition pname(name) = {& pname(acc), & pname(alt),\
+ (trans_func) generic_addr_noflag_action, & L ## name}
+
+
+/* DAY - A day of the week */
+
+#define DAY(name,acc,alt,var,help) \
+ static day_struct L ## name = {CSBOFF(var), PHELP(help)};\
+ static transition pname(name) =\
+ {&pname(acc), &pname(alt), (trans_func) day_action, & L##name}
+
+/* MONTH - A month of the year */
+
+#define MONTH(name,acc,alt,var,help) \
+ static month_struct L ## name = {CSBOFF(var), PHELP(help)};\
+ static transition pname(name) =\
+ {&pname(acc), &pname(alt), (trans_func) month_action, & L##name}
+
+#define GENERAL_TIME(name, acc, alt, var1, var2, var3, help)\
+ static timesec_struct L ## name =\
+ {\
+ var1,\
+ var2,\
+ var3,\
+ help\
+ };\
+ static transition pname(name) =\
+ {\
+ &pname(acc),\
+ &pname(alt),\
+ (trans_func) timesec_action,\
+ & L ## name\
+ }
+
+/* TIME - A time (24 hours, without seconds) */
+#define ATIME(name, acc, alt, var1, var2, help)\
+ GENERAL_TIME(name, acc, alt, CSBOFF(var1),\
+ CSBOFF(var2), MAXUINT, help)
+
+/* TIMESEC - A time (24 hours, with seconds) */
+#define TIMESEC(name, acc, alt, var1, var2, var3, help)\
+ GENERAL_TIME(name, acc, alt, CSBOFF(var1),\
+ CSBOFF(var2), CSBOFF(var3), help)
+
+#define TEST_MULTIPLE_FUNCS(name, equal, notequal, alt)\
+ static test_struct L ## name = {0, 0, &pname(equal), &pname(notequal), NULL, NULL};\
+ static transition pname(name) = {NULL, &pname(alt),\
+ (trans_func) multiple_funcs_action, & L ## name}
+
+#define PRIV_TEST(name, acc, fail, alt, priv)\
+ TRANS_PRIV(name, priv);\
+ static priv_struct L ## name = {& P ## name, &pname(fail)};\
+ static transition pname(name) = {&pname(acc), &pname(alt),\
+ (trans_func) priv_action, & L ## name}
+
+#define NVCOMMENT(name, acc)\
+ static transition pname(name) =\
+ {\
+ &pname(acc),\
+ &pname(NONE),\
+ (trans_func) comment_action,\
+ NULL\
+ }
+
+#define NO_OR_DEFAULT(name, acc, flags) \
+ SET (name ## setsense, acc, sense, FALSE); \
+ KEYWORD (name, name ## setsense, acc, \
+ parser_no_keyword, parser_help_no_keyword, flags);
+
+
+
+#define IPADDR_MASK(name, acc, alt, addr, mask, help)\
+ static ipaddrmask_struct L ## name = { CSBOFF(addr), CSBOFF(mask), help};\
+ static transition pname(name) = {& pname(acc), & pname(alt),\
+ (trans_func) ipaddrmask_action, & L ## name}
+
+#define IPMASK(name,acc,alt,mask, help)\
+ static ipmask_struct L ## name = {CSBOFF(mask), PHELP(help)};\
+ static transition pname(name) = {& pname(acc), & pname(alt),\
+ (trans_func) ipmask_action, & L ## name}
+
+#define FUNC(name, acc, func)\
+ pfdecl(func);\
+ static transition pname(name) = {&pname(acc), NULL, (trans_func) func_action, func}
+
+#ifdef IOS_PARSER
+
+#define WHITESPACE(name,acc,alt)\
+ static transition pname(name) = {&pname(acc), &pname(alt),\
+ (trans_func) whitespace_action, NULL}
+
+#define PRINT(name,acc,str)\
+ static print_struct L ## name = {str};\
+ static transition pname(name) = {&pname(acc), NULL, (trans_func) print_action, & L ## name}
+
+#define DISPLAY(name,acc,str)\
+ static help_struct L ## name = {PHELP(str), NULL};\
+ static transition pname(name) = {NULL, &pname(acc),\
+ (trans_func) display_action, & L ## name}
+
+#define VAR_STRING(name, acc, alt, str) \
+ GENERAL_STRING(name, acc, alt, str, NULL, STRING_QUOTED)
+
+#define CHARACTER(name,acc,alt,character)\
+ static char_struct L ## name = {character};\
+ static transition pname(name) = {&pname(acc), &pname(alt),\
+ (trans_func) char_action, & L ## name}
+
+#define CHAR8_NUMBER(name, acc, alt, var, help)\
+ static number_struct L ## name = {CSBOFF(var), 0, 255, PHELP(help), 0};\
+ static transition pname(name) = \
+ {&pname(acc), &pname(alt), (trans_func) char_number_action, & L ## name}
+
+#define FUNC(name, acc, func)\
+ pfdecl(func);\
+ static transition pname(name) = {&pname(acc), NULL, (trans_func) func_action, func}
+
+
+#define TXT_LINE(name, acc, alt, str)\
+ GENERAL_STRING(name, acc, alt, str, NULL, STRING_WS_OK)
+
+#define CHAR_NUMBER(name, acc, alt, var, help)\
+ static number_struct L ## name = {CSBOFF(var), 0, 127, PHELP(help), 0};\
+ static transition pname(name) = \
+ {&pname(acc), &pname(alt), (trans_func) char_number_action, & L ## name}
+
+#define TEST_BOOLEAN(name, nonzero, zero, alt, var)\
+ static test_bool_struct L ## name = {&var, &pname(zero), &pname(nonzero)};\
+ static transition pname(name) = {NULL, &pname(alt),\
+ (trans_func) test_boolean_action, & L ## name}
+
+#define TEST_INT(name, nonzero, zero, alt, var)\
+ static test_int_struct L ## name = {&var, &pname(zero), &pname(nonzero)};\
+ static transition pname(name) = {NULL, &pname(alt),\
+ (trans_func) test_int_action, & L ## name}
+
+#define TEST_FUNC(name, nonzero, zero, alt, func)\
+ static test_func_struct L ## name = {func, &pname(zero), &pname(nonzero)};\
+ static transition pname(name) = {NULL, &pname(alt),\
+ (trans_func) test_func_action, & L ## name}
+
+#define TEST_IDBSTATUS(name, true, false, alt, val)\
+ static test_idbstatus_struct L ## name = {&pname(false), val};\
+ static transition pname(name) = {&pname(true), &pname(alt),\
+ (trans_func) test_idbstatus_action, & L ## name}
+
+#define KEYWORD_DEBUG(name, acc, alt, var, val, str, help, priv)\
+ KEYWORD_ID(name, acc, alt, var, (uint) val, str, help, priv)
+
+#define KEYWORD_ID_MM(name, acc, alt, var, val, str, help, priv, count)\
+ TRANS_PRIV(name, priv);\
+ static keyword_id_mm_struct L ## name = {str,PHELP(help),&P##name,CSBOFF(var),val,count};\
+ static transition pname(name) = {&pname(acc), &pname(alt),\
+ (trans_func) keyword_id_mm_action, & L ## name}
+
+#define KEYWORD_TRANS(name, link, acc, alt, str, help, priv)\
+ LINK_TRANS(link, acc);\
+ TRANS_PRIV(name, priv);\
+ static keyword_struct L ## name =\
+ {\
+ str,\
+ PHELP(help),\
+ & P ## name\
+ };\
+ static transition pname(name) =\
+ {\
+ &pname(link),\
+ &pname(alt),\
+ (trans_func) keyword_trans_action,\
+ & L ## name\
+ }
+
+/*
+ * If !(var & val) and parse keyword
+ * var |= val
+ */
+#define KEYWORD_ORTEST(name, acc, alt, var, val, str, help, priv)\
+ TRANS_PRIV(name, priv);\
+ static keyword_id_struct L ## name = {str,PHELP(help),&P##name,CSBOFF(var),val};\
+ static transition pname(name) = {&pname(acc), &pname(alt),\
+ (trans_func) keyword_ortest_action, & L ## name}
+
+#define KEYWORD_OPTIONS(name, acc, alt, options, var, priv, flags)\
+ TRANS_PRIV(name, priv);\
+ static keyword_option_struct L ## name =\
+ {\
+ options,\
+ CSBOFF(var),\
+ & P ## name,\
+ flags\
+ };\
+ static transition pname(name) =\
+ {\
+ &pname(acc),\
+ &pname(alt),\
+ (trans_func) keyword_option_action,\
+ & L ## name\
+ }
+
+#define KEYWORD_NOWS(name,acc,alt,str,help, priv)\
+ TRANS_PRIV(name, priv);\
+ static keyword_struct L ## name = {str, PHELP(help), & P ## name};\
+ static transition pname(name) = {&pname(acc), &pname(alt),\
+ (trans_func) keyword_nows_action, & L ## name}
+
+
+#define PERMIT_DENY(name, acc, alt, var, priv)\
+ KEYWORD_OPTIONS(name, acc, alt, permitdeny_options, var, priv, 0);
+
+#define NUMBER_NV(name, acc, alt, var, lower, upper, help)\
+ GENERAL_NUMBER(name, acc, alt, var, lower, upper, help,\
+ (NUMBER_HEX | HEX_ZEROX_OK | NUMBER_OCT | OCT_ZERO_OK |\
+ NUMBER_DEC | NUMBER_WS_OK | NUMBER_HELP_CHECK |\
+ NUMBER_NV_RANGE))
+
+/* Handle a decimal number, without help and whitespace. */
+#define IDECIMAL(name,acc,alt,var,lower,upper)\
+ GENERAL_NUMBER(name, acc, alt, var, lower, upper, NULL,\
+ (NUMBER_DEC | NUMBER_NO_WS_OK))
+
+/* Handle a decimal number, without help and whitespace. */
+#define INUMBER(name,acc,alt,var,lower,upper)\
+ GENERAL_NUMBER(name, acc, alt, var, lower, upper, NULL,\
+ (NUMBER_HEX | HEX_ZEROX_OK | NUMBER_OCT | OCT_ZERO_OK |\
+ NUMBER_DEC | NUMBER_NO_WS_OK))
+
+/* HEXADECIMAL matches an unsigned hex number, minimum one
+ * digit, and assigns it to a int. This function works on numbers
+ * which don't begin with '0x'. */
+
+#define HEXADECIMAL(name,acc,alt,var)\
+ GENERAL_NUMBER(name, acc, alt, var, 0, -1, NULL,\
+ (NUMBER_HEX | HEX_NO_ZEROX_OK | NUMBER_NO_WS_OK))
+
+#define HEXNUM(name, acc, alt, var, help)\
+ GENERAL_NUMBER(name, acc, alt, var, 0, -1, help,\
+ (NUMBER_HEX | HEX_NO_ZEROX_OK | NUMBER_WS_OK | NUMBER_HELP_CHECK))
+
+#define HEXDIGIT(name, acc, alt, var, lower, upper, help)\
+ GENERAL_NUMBER(name, acc, alt, var, lower, upper, help,\
+ (NUMBER_HEX | HEX_NO_ZEROX_OK | NUMBER_WS_OK | NUMBER_HELP_CHECK))
+
+#define OPT_HEXNUM(name, acc, alt, var, help)\
+ GENERAL_NUMBER(name, acc, alt, var, 0, -1, help,\
+ (NUMBER_HEX | HEX_NO_ZEROX_OK | HEX_ZEROX_OK |\
+ NUMBER_WS_OK | NUMBER_HELP_CHECK))
+
+#define OPT_HEXDIGIT(name, acc, alt, var, lower, upper, help)\
+ GENERAL_NUMBER(name, acc, alt, var, lower, upper, help,\
+ (NUMBER_HEX | HEX_NO_ZEROX_OK | HEX_ZEROX_OK |\
+ NUMBER_WS_OK | NUMBER_HELP_CHECK))
+
+#define ZEROXHEXNUM(name, acc, alt, var, help)\
+ GENERAL_NUMBER(name, acc, alt, var, 0, -1, help,\
+ (NUMBER_HEX | HEX_ZEROX_OK | NUMBER_WS_OK | NUMBER_HELP_CHECK))
+
+/*
+ * IOCTAL matches an unsigned octal number, minimum one
+ * digit, and assigns it to a int
+ */
+#define IOCTAL(name,acc,alt,var)\
+ GENERAL_NUMBER(name, acc, alt, var, 0, -1, NULL,\
+ (NUMBER_OCT | OCT_ZERO_OK | OCT_NO_ZERO_OK |\
+ NUMBER_NO_WS_OK))
+
+#define NUMBER_FUNC(name, acc, alt, var, func, help)\
+ static number_func_struct L ## name =\
+ {CSBOFF(var), func, PHELP(help)};\
+ static transition pname(name) =\
+ {&pname(acc), &pname(alt), (trans_func) number_func_action, & L ## name}
+
+#define NUMBER_HELP_FUNC(name, acc, alt, var, func)\
+ static number_help_func_struct L ## name =\
+ {CSBOFF(var), func};\
+ static transition pname(name) =\
+ {&pname(acc), &pname(alt), (trans_func) number_help_func_action, & L ## name}
+
+
+#define GENERAL_PARAMS(name, alt, keyword, var, lower, upper, func, subfunc, keyhelp, varhelp, priv, flags)\
+ pfdecl(func);\
+ TRANS_PRIV(name, priv);\
+ static params_struct L ## name = {keyword, CSBOFF(var), lower, upper,\
+ func, subfunc, PHELP(keyhelp),\
+ PHELP(varhelp),\
+ & P ## name, flags};\
+ static transition pname(name) = {NULL, & pname(alt),\
+ (trans_func) params_action, & L ## name}
+
+#define PARAMS(name, alt, keyword, var, lower, upper, func, subfunc, keyhelp,varhelp,priv)\
+ GENERAL_PARAMS(name, alt, keyword, var, lower, upper, func,\
+ subfunc, keyhelp, varhelp, priv,\
+ (KEYWORD_WS_OK | KEYWORD_HELP_CHECK | NUMBER_DEC |\
+ NUMBER_WS_OK | NUMBER_HELP_CHECK))
+
+#define PARAMS_KEYONLY(name, alt, keyword, var, lower, upper, func, subfunc, keyhelp, varhelp, priv)\
+ GENERAL_PARAMS(name, alt, keyword, var, lower, upper, func,\
+ subfunc, keyhelp, varhelp, priv,\
+ (KEYWORD_WS_OK | KEYWORD_HELP_CHECK | NUMBER_DEC |\
+ NUMBER_WS_OK | NUMBER_HELP_CHECK | NO_NUMBER))
+
+#define IPMASK(name,acc,alt,mask, help)\
+ static ipmask_struct L ## name = {CSBOFF(mask), PHELP(help)};\
+ static transition pname(name) = {& pname(acc), & pname(alt),\
+ (trans_func) ipmask_action, & L ## name}
+
+#define IPADDR_MASK(name, acc, alt, addr, mask, help)\
+ static ipaddrmask_struct L ## name = { CSBOFF(addr), CSBOFF(mask), help};\
+ static transition pname(name) = {& pname(acc), & pname(alt),\
+ (trans_func) ipaddrmask_action, & L ## name}
+
+/* Negative 1 (-1), used as the wild-card in many protocols */
+#define NEG1(name, acc, alt, net, help)\
+ KEYWORD_ID(name, acc, alt, net, -1L, "-1", help, PRIV_MIN)
+
+
+#define ALT_HELPS(name,func,subfunc)\
+ pfdecl(func);\
+ static eols_struct L ## name = {func, subfunc};\
+ static transition pname(name) = {NULL, NULL, (trans_func) alt_helps_action, & L ## name}
+
+/*
+ * Hexadecimal data stream. Used in 'llc2 send' command.
+ */
+
+#define HEXDATA(name, acc, alt, buf, count, help, bufmax)\
+ static hexdata_struct L ## name = {CSBOFF(buf), CSBOFF(count),\
+ PHELP(help), bufmax};\
+ static transition pname(name) = {&pname(acc), &pname(alt),\
+ (trans_func) hexdata_action, & L ## name}
+
+#define KEYWORD_NEG(name,acc, alt,str,help, priv)\
+ SET(name ## setsense, acc , sense, FALSE); \
+ KEYWORD(name, name ## setsense, alt, str, help, priv)
+
+
+#endif /* IOS_PARSER */
+
+#endif /* __MACROS_H__ */
diff --git a/data/mnet/Common/cli/include/mutex.h b/data/mnet/Common/cli/include/mutex.h
new file mode 100644
index 0000000..2362fd9
--- /dev/null
+++ b/data/mnet/Common/cli/include/mutex.h
@@ -0,0 +1,23 @@
+
+#ifndef MUTEX_HEADER
+#define MUTEX_HEADER
+
+enum mutex_types {
+ USYNC_THREAD,
+ USYNC_PROCESS
+};
+
+#define USYNC_THREAD 0
+
+typedef struct semaphore mutex_t;
+
+mutex_t * MUTEX_CREATE(enum mutex_types a2, void * a3);
+int MUTEX_LOCK(mutex_t * pMutex);
+int MUTEX_UNLOCK(mutex_t * pMutex);
+
+#define mutex_create MUTEX_CREATE
+#define mutex_lock MUTEX_LOCK
+#define mutex_unlock MUTEX_UNLOCK
+
+#endif /* MUTEX_HEADER */
+
diff --git a/data/mnet/Common/cli/include/nv.h b/data/mnet/Common/cli/include/nv.h
new file mode 100644
index 0000000..40b927f
--- /dev/null
+++ b/data/mnet/Common/cli/include/nv.h
@@ -0,0 +1,21 @@
+#if !defined(__NV_H__)
+#define __NV_H__
+
+
+
+extern void nv_init(void);
+
+extern void nv_configure(uchar);
+extern int nv_current_to_nv (boolean vocal);
+extern char* nv_current_to_buffer(boolean, uchar, boolean);
+extern void nv_review(parseinfo *);
+
+extern STATUS write_nv_config_from_fd( int );
+
+extern void nv_add (boolean , char *, ...);
+extern void nv_write (boolean , char *, ...);
+extern int nv_erase(boolean);
+
+extern boolean ok_to_write_nv(void);
+
+#endif /* !defined(__NV_H__) */
diff --git a/data/mnet/Common/cli/include/parser.h b/data/mnet/Common/cli/include/parser.h
new file mode 100644
index 0000000..2037210
--- /dev/null
+++ b/data/mnet/Common/cli/include/parser.h
@@ -0,0 +1,263 @@
+#ifndef __PARSER_H__
+#define __PARSER_H__
+
+
+
+enum {
+ STACKMAKER_NAME =0,
+ STACKMAKER_MEMBER,
+};
+
+typedef struct parsenode_ {
+ struct parsenode_ *next; /* Next stack entry */
+ transition *node; /* The node */
+ int line_index; /* Where we are in the input buffer */
+ char nv_command[PARSEBUF]; /* The command generated to this point */
+ char visible_ambig[PARSEBUF]; /* Visible command ambiguity detection */
+ char hidden_ambig[PARSEBUF]; /* Hidden command Ambiguity detection */
+ boolean command_visible; /* TRUE if current keyword is visible */
+ boolean unsupported; /* TRUE if current keyword is unsupp. */
+ parser_mode *pmp; /* Parser mode */
+ boolean sense; /* FALSE if 'no' parsed. Also FALSE if 'default'
+ * parsed because the off state is the default for
+ * most commands. */
+ boolean set_to_default; /* TRUE if 'default' parsed */
+ boolean leave_subcommand;
+
+#ifdef BOOMERANG
+ /* save string info from csb into sub-mode csb's */
+ char save_txt[PARSEBUF];
+#endif /* BOOMERANG */
+ int interface;
+
+} parsenode;
+
+typedef struct callbackMsg {
+ parseinfo *csb;
+ tpPARSERSIM pSim;
+} tCALLBACKMSG, *tpCALLBACKMSG;
+
+/* extern chunk_type *parseinfo_chunks;*/
+
+extern parseinfo *get_csb(const char *);
+extern void free_csb(parseinfo **csb);
+struct idbtype_ *findidb(parseinfo *csb);
+extern void set_multiple_funcs(parseinfo *csb, int value);
+extern void increment_multiple_funcs(parseinfo *csb, char *str);
+extern int test_multiple_funcs(parseinfo *csb, char test, int value);
+extern int test_visible_multiple_funcs(parseinfo *csb, char test, int value);
+extern int test_invisible_multiple_funcs(parseinfo *csb, char test, int value);
+extern void print_multiple_funcs(parseinfo *csb);
+extern void report_error(parseinfo *, int, boolean);
+extern tOCTET2 parser_send_response( tpCOMSIM , char *, tUOCTET4 );
+extern void ParserCallbackInit( void );
+
+/* Return values from parse_cmd() used by report_error() */
+#define PARSE_ERROR_NOERR 0x0 /* Success */
+#define PARSE_ERROR_AMBIG 0x1 /* Ambiguous command */
+#define PARSE_ERROR_NOMATCH 0x2 /* True error; didn't match any command */
+#define PARSE_ERROR_UNKNOWN 0x4 /* Didn't match anything while doing help */
+#define PARSE_ERROR_ALIAS 0x8 /* Didn't match expanded alias */
+
+#define RC_CONT 1
+#define RC_MORE 2
+#define RC_NO_MORE 3
+#define RC_CANT_MORE 4
+#define RC_WAIT 5
+#define RC_BREAK 6
+#define RC_CFG_BREAK 7
+#define RC_TIMEOUT 8
+
+#define MORE_BUFFER 1
+#define MORE_FILE 2
+
+#define NON_UNIQUE 1 /* Non-unique token in help */
+#define PARSE_FAIL 2 /* Parse failed */
+
+/*
+ * Values for csb->in_help
+ */
+#define PARSER_NO_HELP 0
+#define PARSER_HELP 1<<0
+#define PARSER_COMMAND_COMPLETION 1<<1
+
+/*
+ * Values for mode volume
+ */
+#define MODE_VERBOSE 1
+#define MODE_SILENT 2
+
+/*
+ * Type of parser
+ */
+#define PARSER_CLI_DEFAULT 0
+#define PARSER_CLI_TCL 1
+#define PARSER_CLI_OVERRIDE 2
+
+
+#ifdef USE_PARSER_KMEM
+
+#define PARSERcalloc(nelem, elemSize) PSkcalloc((nelem), (elemSize), \
+ M_PARSER, M_WAITOK)
+#define PARSERmalloc(elemSize) PSkmalloc((elemSize), \
+ M_PARSER, M_WAITOK)
+#define PARSERrealloc(elemPtr, elemSize) PSkrealloc((elemPtr), (elemSize), \
+ M_PARSER, M_WAITOK)
+#define PARSERfree( elemPtr ) PSkfree( (elemPtr), M_PARSER )
+
+#else
+
+#define PARSERcalloc(nelem, elemSize) PScalloc((nelem), (elemSize))
+#define PARSERmalloc(elemSize) PSmalloc((elemSize))
+#define PARSERrealloc(elemPtr, elemSize) PSrealloc((elemPtr), (elemSize))
+#define PARSERfree(elemPtr) PSfree((elemPtr))
+
+#endif
+
+
+#define PARSER_ENTRY_LINK_POINT 1
+#define PARSER_EXIT_LINK_POINT 2
+
+/*
+ * Uncomment this define to add parser link point names for debugging
+ */
+/*#define PARSER_DEBUG_LINKS*/
+
+typedef struct chain_link_ {
+ uint id;
+#ifdef PARSER_DEBUG_LINKS
+ const char *name;
+#endif /* PARSER_DEBUG_LINKS */
+ dynamic_transition *link_point;
+ uint type;
+} chain_link;
+
+typedef struct chain_list_ {
+ struct chain_list_ *next;
+ chain_link cp;
+} chain_list;
+
+extern chain_link chain_gang[];
+extern SEM_ID parse_chain_sem;
+
+typedef void * (*mode_save_var_func)(parseinfo *);
+typedef void (*mode_reset_var_func)(parseinfo *, void *);
+typedef boolean (*mode_http_init_func)(parseinfo *);
+
+
+extern parser_mode *parser_add_mode(const char *, const char *, const char *,
+ boolean, boolean, const char *,
+ mode_save_var_func, mode_reset_var_func,
+ transition *,
+ mode_http_init_func);
+
+extern parser_mode *get_mode_tmp(const char *, const char *, const char *,
+ boolean, boolean,
+ transition *);
+extern void free_mode(parser_mode *);
+extern parser_mode *get_alt_mode(parser_mode *);
+extern void *mode_save_vars(parseinfo *);
+extern void mode_reset_vars(parseinfo *, void *);
+extern boolean priv_changed_in_mode(parser_mode *);
+extern void set_priv_changed_in_mode(parser_mode *, boolean);
+extern boolean mode_http_init(parseinfo *);
+extern int print_debug(char *, ... );
+
+/*
+ * The big well known parser modes
+ */
+extern parser_mode *exec_mode;
+extern parser_mode *config_mode;
+
+/*extern BOOT_PARAMS sysBootParams;*/
+
+/*
+ * Some extern declarations for variables
+ * defined in parser.c / parser_init.c
+ */
+extern SEM_ID systemloadingSemId;
+extern int terminalLength;
+extern int parserNullFd;
+extern FILE* parserNullFp;
+
+/*
+ * Miscellaneous routine declarations.
+ */
+void parse_token(parseinfo *);
+void push_node(parseinfo *, transition *);
+int parse_cmd(parseinfo *, tpPARSERSIM);
+boolean batch_input(parseinfo *, char *, int, char *, char *);
+void print_caret(int);
+void save_line_init(save_buf*);
+void save_line(parseinfo *, save_buf*, const char*, ...);
+int print_buf(save_buf, boolean, boolean, int *, long);
+extern void bad_parser_subcommand(parseinfo *, uint);
+char *last_config_time_string(void);
+char *last_write_mem_time_string(void);
+void note_write_mem_time(void);
+void free_csb_mem(parseinfo *);
+extern int cliShell_sync(void);
+
+/*
+ * Parser Mode functions
+ */
+extern void parser_modes_init(void);
+extern parser_mode *get_mode_byname(const char *, uint);
+extern boolean set_mode_byname(parser_mode **, const char *, uint);
+extern queuetype *get_mode_aliases(parser_mode *);
+extern queuetype *get_mode_defaliases(parser_mode *);
+extern const char *get_mode_prompt(parseinfo *);
+extern boolean test_mode_config_subcommand(parseinfo *);
+extern transition *get_mode_nv(parseinfo *);
+extern transition *get_mode_top(parser_mode *);
+extern const char *get_mode_name(parser_mode *);
+extern void display_mode_aliases(parseinfo *, parser_mode *);
+extern void parser_add_main_modes(void);
+
+/*
+ * Global parser debug variables
+ */
+extern boolean parser_help_debug;
+extern boolean parser_ambig_debug;
+extern boolean parser_mode_debug;
+extern boolean parser_priv_debug;
+
+/*
+ * Should we have a prompt in config mode.
+ */
+extern boolean config_prompt;
+extern char *nomemory;
+
+extern int doprnt (char *, tt_soc *, const char *, va_list , boolean );
+extern void printVersion( void );
+extern int getTftpInput( char *pTftpServer, char *pFileName );
+
+extern boolean queueempty_inline (queuetype *q);
+extern void enqueue(queuetype *, void *);
+extern void unqueue(queuetype *, void *);
+extern void queue_init(queuetype *, int);
+extern void *dequeue(queuetype *);
+extern void requeue(queuetype *, void *);
+extern void *peekqueuehead (queuetype* q);
+extern int queryqueuedepth(queuetype *);
+extern void insqueue(queuetype *, void *, void *);
+extern ushort ipcrc (ushort *p, int count);
+extern boolean name_verify( char *);
+#ifdef IOS_PARSER
+/*
+ * Global parser debug variables
+ */
+extern boolean parser_alias_debug;
+extern boolean parser_http_debug;
+
+extern boolean parser_link_point_exists(uint);
+
+void recurse_node(parseinfo *, transition *);
+extern void *p_dequeue(queuetype *);
+extern void p_enqueue (queuetype *, void *);
+extern void p_unqueue (queuetype *, void *);
+extern void *remqueue(queuetype *, void *, void *);
+#endif
+
+
+#endif /* __PARSER_H_ */
diff --git a/data/mnet/Common/cli/include/parser_ModNum.h b/data/mnet/Common/cli/include/parser_ModNum.h
new file mode 100644
index 0000000..ac5b812
--- /dev/null
+++ b/data/mnet/Common/cli/include/parser_ModNum.h
@@ -0,0 +1,13 @@
+/*
+ * vxWorks errno module number for parser
+ * See man pages: makeStatTbl(3), errnoLib(1), printErrno(2)
+ */
+#ifndef _PARSER_MODNUM_H
+#define _PARSER_MODNUM_H
+
+/*
+ * Module numbers 1-500 are reserved to vxWorks
+ */
+#define M_parser (501 << 16)
+
+#endif /* _PARSER_MODNUM_H */
diff --git a/data/mnet/Common/cli/include/parser_actions.h b/data/mnet/Common/cli/include/parser_actions.h
new file mode 100644
index 0000000..296be88
--- /dev/null
+++ b/data/mnet/Common/cli/include/parser_actions.h
@@ -0,0 +1,591 @@
+#ifndef __PARSER_ACTIONS_H__
+#define __PARSER_ACTIONS_H__
+
+/******************************************************************
+ * Macros
+ ******************************************************************/
+
+#define SHORTHELP_LEN 32
+
+#define isodigit(c) (((c) >= '0') && ((c) <= '7'))
+#define is_terminator(c) (((c)=='\0') || ((c)=='!') || ((c)==';'))
+#define CVHTOB(c) ((int) c - \
+ (((c >= '0') && (c <= '9')) ? \
+ '0' : \
+ (((c >= 'a') && (c <= 'f')) ? \
+ 'a'-10 : \
+ 'A'-10)))
+
+#define INVALID_NVGEN_CHECK\
+ if (csb->nvgen) {\
+ if (!csb->priv_set) {\
+ printf("ERROR:INVALID_NVGEN_CHECK\n");\
+ }\
+ return;\
+ }
+
+
+/******************************************************************
+ * Defines
+ ******************************************************************/
+
+/* Command completion flags */
+#define NO_COMMAND_COMPLETION 0
+#define SUPPORT_COMMAND_COMPLETION 1
+
+#define ADDR_PARSE(n) 0xf000+n
+
+#define ADDR_NAME_LOOKUP 0x00000001
+#define ADDR_LIL_ENDIAN 0x00000002
+#define ADDR_HOST_ADDR_ONLY 0x00000004
+#define ADDR_HOST_NET_ONLY 0x00000008
+#define ADDR_PROTO_ADDR 0x00000010
+#define ADDR_NO_SHORT_HELP 0x80000000
+#define ADDR_ALL 0xffffffff
+
+/* Flag values for number_struct types field. */
+
+#define NUMBER_HEX 0x00000001 /* hexadecimal number */
+#define NUMBER_OCT 0x00000002 /* octal number */
+#define NUMBER_DEC 0x00000004 /* decimal number */
+#define NO_NUMBER 0x00000008 /* don't parse number if !sense */
+#define HEX_ZEROX_OK 0x00000010 /* hex number can have '0x000' */
+#define HEX_NO_ZEROX_OK 0x00000020 /* hex number can have no '0x000' */
+#define HEX_ZEROX_MATCHED 0x00000040 /* hex number matched '0x000' */
+#define HEX_ZEROX_NOT_MATCHED 0x00000080 /* hex number didn't match '0x000'*/
+#define OCT_ZERO_OK 0x00000100 /* oct number can have '0' */
+#define OCT_NO_ZERO_OK 0x00000200 /* oct number can have no '0' */
+#define OCT_ZERO_MATCHED 0x00000400 /* oct number matched '0' */
+#define OCT_ZERO_NOT_MATCHED 0x00000800 /* oct number didn't match '0' */
+
+#define SIGNED_NUMBER 0x00001000 /* parse signed number */
+
+#define NUMBER_WS_OK 0x00100000 /* number can have whitespace */
+#define NUMBER_NO_WS_OK 0x00200000 /* number can have no whitespace */
+#define KEYWORD_WS_OK 0x00400000 /* keyword can have whitespace */
+#define KEYWORD_NO_WS_OK 0x00800000 /* keyword can have no whitespace */
+
+#define NUMBER_HELP_CHECK 0x01000000 /* give help */
+#define KEYWORD_HELP_CHECK 0x02000000 /* give help */
+
+#define KEYWORD_OR_SET 0x04000000 /* OR value instead of set */
+#define KEYWORD_TEST 0x08000000 /* Test value before parsing */
+#define NUMBER_NV_RANGE 0x10000000 /* Do NV of number range */
+
+#define STRING_WS_OK NUMBER_WS_OK /* Whitespace allowed in string */
+#define STRING_HELP_CHECK NUMBER_HELP_CHECK /* Provide help for string */
+#define STRING_QUOTED 0x20000000 /* Quotes aren't included */
+
+/*
+ * Command privileges. The privilege levels can be 1-255 (stored
+ * as uchar). Privilege level 0 is reserved
+ * to indicate that normal processing of keywords should
+ * be done. If 'priv_set' is non-zero, then the keywords which match
+ * should copy 'priv_set' into their 'priv' variable.
+ *
+ */
+
+/*
+ * Privilege level is stored in a unsigned integer broken
+ * down like the following.
+ *
+ * bits 0-3 current privilege level
+ * bits 4-7 original privilege level when privilege level has been changed
+ * bits 8 indicates current privilege level has changed
+ * bits 9-22 unused
+ * bits 23 indicate distilled configuration
+ * bits 24-31 privilege modification flags
+ *
+ */
+
+#define PRIV_MIN 0x0
+#define PRIV_NULL 0x0 /* PRIV level means nothing. */
+#define PRIV_USER 0x1 /* No special privileges */
+#define PRIV_OPR 0xf /* Operator */
+#define PRIV_CONF 0xf /* Allowed to do configuration */
+#define PRIV_ROOT 0xf /* The Supreme Administrator */
+#define PRIV_MAX 0xf
+#define PRIV_INTERACTIVE 0x00400000 /* Interactive command */
+#define PRIV_CHANGED 0x00000100 /* Privilege level has changed */
+#define PRIV_DISTILLED 0x00800000 /* Configuration to be distilled */
+#define PRIV_INTERNAL 0x01000000 /* Command "for internal use only" */
+#define PRIV_UNSUPPORTED 0x02000000 /* Hidden unsupported command */
+#define PRIV_USER_HIDDEN 0x04000000 /* Hidden command from disabled user */
+#define PRIV_SUBIF 0x08000000 /* Allowed on subinterfaces */
+#define PRIV_HIDDEN 0x10000000 /* Hidden commands. Subtree rooted at
+ * this keyword is not searched. */
+#define PRIV_DUPLICATE 0x20000000 /* Keyword is a duplicate for
+ * split parse chains */
+#define PRIV_NONVGEN 0x40000000 /* Keywords that do not NVGEN */
+#define PRIV_NOHELP 0x80000000 /* Keywords that do not provide help */
+#define DEFAULT_PRIV PRIV_USER /* Default user privilege level */
+
+#define PRIV_PSYNALC 0x00200000 /* Keywords that are not used by synalc */
+
+#define TRANS_PRIV_PRIV_MASK 0xf
+#define TRANS_PRIV_FLAGS_OFFSET 9
+#define TRANS_PRIV_FLAGS_GET(priv) ((priv) << TRANS_PRIV_FLAGS_OFFSET)
+#define TRANS_PRIV_FLAGS_SET(priv) ((priv) >> TRANS_PRIV_FLAGS_OFFSET)
+
+/*
+ *
+ */
+#define RMATCH_IP 0x00100000
+#define RMATCH_OSI 0x00200000
+#define RMATCH_NOVELL 0x00400000
+#define RMATCH_NONE 0x80000000
+
+#define RMATCH_ARGS 0x01000000
+#define RMATCH_NO_ARGS 0x02000000
+#define RMATCH_TAG_REQUIRED 0x04000000
+#define RMATCH_NO_TAG 0x08000000
+#define RMATCH_NO_KEY_HELP 0x10000000
+
+/******************************************************************
+ * Data Structures
+ ******************************************************************/
+
+
+typedef struct trans_priv_ {
+ uint cur_priv : 4;
+ uint def_priv : 4;
+ uint PACKED(flags : 23);
+ uint PACKED(priv_changed : 1);
+#ifdef OBJECT_4K
+ uint pad; /* see CSCdi32916, before eliminating this pad */
+#endif
+} trans_priv;
+
+typedef const struct general_keyword_struct_ {
+ const char *str; /* The string to match */
+ const char *help; /* Help string */
+ trans_priv *priv; /* Privilege and flags of this keyword */
+ int offset; /* CSB offset to store value if keyword matches */
+ uint val; /* Value to store */
+ int minmatch; /* min number of chars required to match */
+ uint flags; /* white space and help flags */
+} general_keyword_struct;
+
+typedef const struct keyword_struct_ {
+ const char *str;
+ const char *help;
+ trans_priv *priv;
+} keyword_struct;
+
+typedef const struct keyword_mm_struct_ {
+ const char *str;
+ const char *help;
+ trans_priv *priv;
+ int minmatch;
+} keyword_mm_struct;
+
+typedef const struct keyword_id_struct_ {
+ const char *str; /* The keyword */
+ const char *help; /* Help string for this keyword */
+ trans_priv *priv; /* Privilege of this keyword */
+ int offset; /* CSB offset to store value if keyword matches */
+ uint val; /* Value to store */
+} keyword_id_struct;
+
+typedef struct dynamic_number_struct_ {
+ int offset; /* CSB offset to store parsed number */
+ uint lower; /* Lower limit we'll accept */
+ uint upper; /* Upper limit */
+ const char *help; /* The long help string */
+ uint flags; /* flags: hex, octal, decimal allowed,
+ whitespace allowed, to help or not to help */
+} dynamic_number_struct;
+
+typedef const struct dynamic_number_struct_ number_struct;
+
+typedef const struct signed_number_struct_ {
+ int offset; /* CSB offset to store parsed number */
+ signed int lower; /* Lower limit we'll accept */
+ signed int upper; /* Upper limit */
+ const char *help; /* The long help string */
+} signed_number_struct;
+
+typedef void (*parser_number_func)(parseinfo *, uint *, uint *);
+
+
+
+
+
+typedef const struct keyword_id_mm_struct_ {
+ const char *str; /* The keyword */
+ const char *help; /* Help string for this keyword */
+ trans_priv *priv; /* Privilege of this keyword */
+ int offset; /* CSB offset to store value if keyword matches */
+ uint val; /* Value to store */
+ int minmatch; /* minimum number of char to match */
+} keyword_id_mm_struct;
+
+typedef const struct keyword_options_ {
+ const char *keyword;
+ const char *help;
+ uint val;
+} keyword_options;
+
+extern keyword_options permitdeny_options[];
+
+typedef const struct keyword_option_struct_ {
+ keyword_options *options;
+ uint offset;
+ trans_priv *priv;
+ uint flags;
+} keyword_option_struct;
+
+
+#ifdef IOS_PARSER
+
+typedef const struct number_func_struct_ {
+ int offset; /* CSB offset to store parsed number */
+ parser_number_func func; /* Function to call to set range */
+ const char *help; /* The long help string */
+} number_func_struct;
+
+typedef void (*parser_number_help_func)(parseinfo *, uint *, uint *,const char **);
+typedef const struct number_help_func_struct_ {
+ int offset; /* CSB offset to store parsed number */
+ parser_number_help_func func; /* Function to set range and help string */
+} number_help_func_struct;
+
+
+#define PARAMS_STRUCT_COMMON \
+ const char *str; /* Keyword to match */ \
+ int offset; /* CSB offset to store parsed number */ \
+ uint lower; /* Lower range of parsed number */ \
+ uint upper; /* Upper range of parsed number */ \
+ void *func; /* func to call if parse is successful */ \
+ int subfunc; /* Subfunction code */ \
+ const char *keyhelp;/* Keyword help string */ \
+ const char *varhelp;/* Variable help string */ \
+ trans_priv *priv; /* Privilege of the keyword */ \
+ uint flags; /* Look for trailing whitespace, no whitespace, etc */
+
+typedef const struct params_struct_ {
+ PARAMS_STRUCT_COMMON
+} params_struct;
+
+typedef const struct params_struct_alist {
+ PARAMS_STRUCT_COMMON
+ uint lower2; /* Lower range of alternate parsed number */
+ uint upper2; /* Upper range of alternate parsed number */
+} params_struct_alist;
+
+typedef const struct print_struct_ {
+ const char * str;
+} print_struct;
+
+typedef const struct char_struct_ {
+ const character;
+} char_struct;
+
+typedef const struct string_struct_ {
+ int offset; /* CSB offset to store parsed string */
+ const char *help; /* Help message for this string */
+} string_struct;
+
+typedef const struct test_bool_struct_ {
+ boolean *var; /* Pointer to the variable to be tested */
+ transition *zero; /* Go here if variable == NULL */
+ transition *nonzero; /* Go here if variable != NULL */
+} test_bool_struct;
+
+typedef const struct test_int_struct_ {
+ int *var; /* Pointer to the variable to be tested */
+ transition *zero; /* Go here if variable == NULL */
+ transition *nonzero; /* Go here if variable != NULL */
+} test_int_struct;
+
+typedef const struct test_func_struct_ {
+ boolean (* func)(void);
+ transition *zero; /* Go here if variable == NULL */
+ transition *nonzero; /* Go here if variable != NULL */
+} test_func_struct;
+
+typedef const struct test_line_struct_ {
+ uint type; /* bit field of valid line types */
+ transition *zero; /* Go here if line range is valid */
+ transition *nonzero; /* Go here if line range is invalid */
+} test_line_struct;
+
+typedef const struct hexdata_struct_ {
+ int bufoffset; /* CSB offset to store parsed hex bytes */
+ int numoffset; /* CSB offset for number of bytes stored */
+ const char *help; /* Help string for this address */
+ uint bufmax; /* number of bytes in output buffer */
+} hexdata_struct;
+
+typedef const struct char_struct2_ {
+ const char character;
+ const char *help;
+} char_struct2;
+
+/* TCP & UDP port information */
+
+typedef const struct portinfo_ {
+ ushort port; /* port number */
+ const char *str; /* port name */
+ const char *help; /* help string */
+ uchar minmatch; /* min match */
+} portinfo;
+
+typedef const struct portparse_struct_ {
+ int offset; /* CSB offset to store parsed port */
+} portparse_struct;
+
+/* New protocol name/address parsing scheme
+ *
+ * The specification of which protocols are valid for parsing is done
+ * using a string, interpreted as a series of two-character codes.
+ * My convension is that protocol groups are named with two capital
+ * letters, and individual protocols are named with a capital and
+ * a lowercase letter. However, this convension is nowhere enforced
+ * or relied on by code. It serves mearly to help me keep these
+ * names unique.
+ *
+ * Any changes to this list should be reflected in the link_names
+ * table in actions.c that maps codes (both individual and group)
+ * to names and LINK_... macros.
+ */
+
+#define PMATCH_EXCLUDE "E:" /* Exclude following protocols */
+#define PMATCH_INCLUDE "I:" /* Include following protocols */
+
+#define PMATCH_ALL "AL" /* All protocols */
+#define PMATCH_DGRAM "DG" /* All datagram protocols */
+
+#define PMATCH_CDP "Cd"
+#define PMATCH_IP "Ip"
+
+
+typedef const struct protoname_struct_ {
+ int variable; /* CSB offset to store parsed link type */
+ const char *match_spec; /* Specification of acceptable protocols */
+} protoname_struct;
+
+typedef const struct protoaddr_struct_ {
+ int num_offset;
+ int addr_offset;
+ const char *match_spec;
+} protoaddr_struct;
+
+
+#endif /* IOS_PARSER */
+
+
+
+
+
+typedef const struct help_struct_ {
+ const char *str;
+ transition *eol;
+} help_struct;
+
+typedef const struct general_string_struct_ {
+ int offset; /* CSB offset to store parsed string */
+ const char *help; /* Help message for this string */
+ uint flags; /* Flags affecting how string is parsed */
+} general_string_struct;
+
+typedef const struct set_struct_ {
+ int offset; /* CSB offset to store value */
+ uint val; /* Value to store */
+} set_struct;
+
+typedef const struct test_struct_ {
+ int offset; /* CSB offset to numeric variable to test */
+ uint val; /* The value to test it against */
+ transition *equal; /* Go here if == */
+ transition *notequal; /* Go here if != */
+ transition *lt; /* Go here if < */
+ transition *gt; /* Go here if > */
+} test_struct;
+
+typedef const struct eols_struct_ {
+ void *func;
+ int subfunc;
+} eols_struct;
+
+typedef const struct nvgens_struct_ {
+ void *func;
+ int subfunc;
+} nvgens_struct;
+
+typedef const struct addrparse_struct_ {
+ int offset; /* CSB offset to store parsed address */
+ const char *help; /* Help string for this address */
+ uint type; /* Type of addres to parse */
+ uint flag; /* How to parse (e.g. addr only, addr or hostname) */
+} addrparse_struct;
+
+
+/* Same thing as an addrparse_struct, except without the flag */
+typedef const struct addrparse_nf_struct_ {
+ int offset; /* CSB offset to store parsed address */
+ const char *help; /* Help string for this address */
+ uint type; /* Type of addres to parse */
+} addrparse_nf_struct;
+
+
+typedef const struct ipaddrparse_struct_ {
+ int offset; /* CSB offset to store parsed address */
+ const char *help; /* Help string for this address */
+ int host;
+ int flag;
+} ipaddrparse_struct;
+
+typedef const struct ipmask_struct_ {
+ int mask; /* CSB offset to store parsed mask */
+ const char *help; /* Help string */
+} ipmask_struct;
+
+typedef const struct ipaddrmask_struct_ {
+ int addr; /* CSB offset to store parsed address */
+ int mask; /* CSB offset to store parsed mask */
+ const char *help; /* Help string */
+} ipaddrmask_struct;
+
+
+/* Month of the year */
+
+typedef const struct month_struct_ {
+ int offset; /* CSB offset */
+ const char *help;
+} month_struct;
+
+/* Day of the week */
+
+typedef const struct day_struct_ {
+ int offset; /* CSB offset */
+ const char *help;
+} day_struct;
+
+typedef const struct timesec_struct_ {
+ int var1;
+ int var2;
+ int var3;
+ const char *help;
+} timesec_struct;
+
+typedef boolean (* testexpr_func)(parseinfo *, transition *);
+typedef const struct testexpr_struct_ {
+ transition *fal;
+ const testexpr_func func;
+} testexpr_struct;
+
+typedef struct addr_func_ {
+ uint addr_type;
+ short_help_func get_short_help;
+ match_gen_func func;
+} addr_func;
+
+typedef struct priv_struct_ {
+ trans_priv *priv;
+ transition *fail;
+} priv_struct;
+
+typedef const struct mode_struct_ {
+ int offset;
+ uint flags;
+} mode_struct;
+
+
+extern addr_func *addr_funcs;
+
+/******************************************************************
+ * Function prototypes
+ ******************************************************************/
+
+extern void nvgen_token(parseinfo *, transition *, const char *);
+boolean help_check(parseinfo *);
+void help_or_error(parseinfo *, int, const char *, boolean);
+boolean match_whitespace2(char *, int *, boolean);
+boolean match_number(parseinfo *, uint, uint, int *, uint *, uint, const char *);
+boolean match_decimal(char *, uint, uint, int *, ushort *);
+boolean match_hexadecimal(char *, int *, ushort *);
+boolean match_ulong_decimal(char *, ulong, ulong, int *, ulong *);
+boolean match_ulong_octal(char *, ulong, ulong, int *, ulong *);
+boolean match_ulong_hexadecimal(char *, ulong, ulong, int *, ulong *);
+boolean match_char(char *, int *, char);
+boolean get_name(char *buf, char *name, int *pi, int buflen);
+void save_ambig_string(parseinfo *, const char *, const char *);
+void save_help_long(parseinfo *, const char *, const char *, uint);
+uint copy_varstring(char *, char *, uint, uint);
+void multiple_funcs_action(parseinfo *, transition *, test_struct * const);
+void display_action(parseinfo *, transition *, help_struct * const);
+void NONE_action(parseinfo *);
+void no_alt_action(parseinfo *);
+void link_point_action(parseinfo *);
+void NOP_action(parseinfo *, transition *);
+void general_number_short_help_http(uint *, uint, uint, char *, boolean);
+void general_keyword_action(parseinfo *, transition *, general_keyword_struct * const);
+void keyword_action(parseinfo *, transition *, keyword_struct * const);
+void keyword_mm_action(parseinfo *, transition *, keyword_mm_struct * const);
+void keyword_id_action(parseinfo *, transition *, keyword_id_struct * const);
+void keyword_orset_action(parseinfo *, transition *, keyword_id_struct * const);
+void keyword_ortest_action(parseinfo *, transition *, keyword_id_struct * const);
+void keyword_optws_action(parseinfo *, transition *, keyword_struct * const);
+void eol_action(parseinfo *, transition *, void (*)(parseinfo *));
+void eols_action(parseinfo *, transition *, eols_struct * const);
+void eoli_action(parseinfo *, transition *, eols_struct * const);
+void eolns_action(parseinfo *, transition *, void (*)(parseinfo *));
+void help_action(parseinfo *, transition *, help_struct * const);
+void func_action(parseinfo *, transition *, void (*)(parseinfo *));
+void set_action(parseinfo *, transition *, set_struct * const);
+void test_action(parseinfo *, transition *, test_struct * const);
+void ipmask_action (parseinfo *, transition *, ipmask_struct * const);
+void ipaddrmask_action (parseinfo *, transition *, ipaddrmask_struct * const);
+void day_action(parseinfo *, transition *, day_struct * const);
+void month_action(parseinfo *, transition *, month_struct * const);
+void timesec_action(parseinfo *, transition *, timesec_struct * const);
+void nvgens_action(parseinfo *, transition *, nvgens_struct * const);
+void nvgenns_action(parseinfo *, transition *, void (*)(parseinfo *));
+void noprefix_action(parseinfo *, transition *);
+void general_number_action(parseinfo *, transition *, number_struct * const);
+void signed_number_action(parseinfo *, transition *, signed_number_struct * const);
+void generic_addr_action(parseinfo *, transition *, addrparse_struct * const);
+void generic_addr_noflag_action(parseinfo *, transition *, addrparse_nf_struct * const);
+boolean eol_check(parseinfo *);
+void priv_action(parseinfo *, transition *, priv_struct * const);
+void mode_action(parseinfo *, transition *, mode_struct *const);
+void comment_action(parseinfo *, transition *);
+void testexpr_action(parseinfo *, transition *, testexpr_struct * const);
+void general_string_action(parseinfo *, transition *, general_string_struct * const);
+boolean match_partial_keyword(parseinfo *, const char *, int *pi,
+ const char *, int, uint, uint);
+void keyword_option_action(parseinfo *, transition *, keyword_option_struct * const);
+
+#ifdef IOS_PARSER
+
+boolean match_octal(char *, uint, uint, int *, ushort *);
+boolean match_minusone(char *, int *);
+void general_number_short_help(uint *, uint, uint, char *);
+void whitespace_action(parseinfo *, transition *);
+void print_action(parseinfo *, transition *, print_struct * const);
+void char_action(parseinfo *, transition *, char_struct * const);
+void char_number_action(parseinfo *, transition *, number_struct * const);
+void test_boolean_action(parseinfo *, transition *, test_bool_struct * const);
+void test_int_action(parseinfo *, transition *, test_int_struct * const);
+void test_func_action(parseinfo *, transition *, test_func_struct * const);
+void number_func_action(parseinfo *, transition *, number_func_struct * const);
+void number_help_func_action(parseinfo *, transition *, number_help_func_struct * const);
+void hexdata_action(parseinfo *, transition *, hexdata_struct * const);
+void keyword_id_mm_action(parseinfo *, transition *, keyword_id_mm_struct * const);
+void alt_help_action(parseinfo *, transition *, void (*)(parseinfo *));
+void alt_helps_action(parseinfo *, transition *, eols_struct * const);
+void params_action(parseinfo *, transition *, params_struct * const);
+void params_action_alist(parseinfo *, transition *, params_struct_alist * const);
+void keyword_nows_action(parseinfo *, transition *, keyword_struct * const);
+
+void keyword_trans_action(parseinfo *, transition *, keyword_struct *const);
+
+#endif /* IOS_PARSER */
+#endif /* __PARSER_ACTIONS_H__ */
+
+
+
+
+
+
diff --git a/data/mnet/Common/cli/include/parser_api.h b/data/mnet/Common/cli/include/parser_api.h
new file mode 100644
index 0000000..de5dd96
--- /dev/null
+++ b/data/mnet/Common/cli/include/parser_api.h
@@ -0,0 +1,13 @@
+#ifndef __PARSER_ACTIONS_H__
+#define __PARSER_ACTIONS_H__
+
+
+/*
+ * parser_init.cpp exported routines
+ */
+extern void cli_parser_init (void);
+
+
+
+#endif /* __PARSER_ACTIONS_H__ */
+
diff --git a/data/mnet/Common/cli/include/parser_commands.h b/data/mnet/Common/cli/include/parser_commands.h
new file mode 100644
index 0000000..356c8b7
--- /dev/null
+++ b/data/mnet/Common/cli/include/parser_commands.h
@@ -0,0 +1,27 @@
+#ifndef __PARSER_COMMANDS_H__
+#define __PARSER_COMMANDS_H__
+
+extern boolean cfg_dirty( void );
+extern void write_memory( parseinfo *);
+extern void reload_command( parseinfo *);
+extern void exit_config_command( parseinfo *);
+extern void parser_help(parseinfo *);
+
+extern void capsGetIPAddress( char * );
+extern void capsGetIPGateway( char * );
+extern void capsGetIPNetmask( char * );
+extern void capsGetIPBroadcast( char * );
+
+
+extern int isTelnetdEnabled( void );
+extern int isHttpEnabled( void );
+extern int isFtpdEnabled( void );
+extern int isTftpdEnabled( void );
+extern int isCronEnabled( void );
+extern int isSyslogdEnabled( void );
+extern int isBootpdEnabled( void );
+extern int isRcpdEnabled( void );
+extern int getHttpPort( void );
+
+#endif /* __PARSER_COMMANDS_H_ */
+
diff --git a/data/mnet/Common/cli/include/parser_debug.h b/data/mnet/Common/cli/include/parser_debug.h
new file mode 100644
index 0000000..b6e1f3a
--- /dev/null
+++ b/data/mnet/Common/cli/include/parser_debug.h
@@ -0,0 +1,36 @@
+/* $Id: parser_debug.h,v 10.1 1998/06/11 22:03:31 sutton Exp $
+ * $Source: /export/sbcc/cepro/os/parser/src/parser_debug.h,v $
+ *------------------------------------------------------------------
+ * Cisco MicroWeb Server Version 2
+ *
+ * File: parser_debug.h
+ * Description: Parser Debug macros
+ * Owner: Prasanna Parthasarathy
+ * Notes:
+ *
+ * Copyright (c) 1997 by cisco Systems, Inc.
+ * All rights reserved.
+ *------------------------------------------------------------------
+ * $Log: parser_debug.h,v $
+ * Revision 10.1 1998/06/11 22:03:31 sutton
+ * code merge
+ *
+ * Revision 1.2 1997/05/14 22:12:19 pparthas
+ * Removed test_* files. Included some files for Show routines
+ * and cleaned-up file structure ( not source code ;-) )
+ *
+ *------------------------------------------------------------------
+ * $Endlog$
+ */
+
+/* Function to fire up parser debugging */
+extern void debug_parser_init(void);
+
+/*
+ * The actual debugging flags are defined in parser_debug_flags.h.
+ * We include that file twice, once to define the flags themselves
+ * and once to define the indices that the parser uses.
+ */
+#include "parser_debug_flags.h"
+#define __DECLARE_DEBUG_NUMS__
+#include "parser_debug_flags.h"
diff --git a/data/mnet/Common/cli/include/parser_debug_flags.h b/data/mnet/Common/cli/include/parser_debug_flags.h
new file mode 100644
index 0000000..7f7cecf
--- /dev/null
+++ b/data/mnet/Common/cli/include/parser_debug_flags.h
@@ -0,0 +1,13 @@
+#include <../include/debug_macros.h>
+
+/* Now define the actual flags and the array that points to them */
+DEBUG_ARRDECL(parser_debug_arr)
+
+DEBUG_FLAG(parser_ambig_debug,DEBUG_PARSER_AMBIG,"Parser ambiguity")
+DEBUG_FLAG(parser_help_debug,DEBUG_PARSER_HELP,"Help message")
+DEBUG_FLAG(parser_mode_debug,DEBUG_PARSER_MODE,"Parser mode")
+DEBUG_FLAG(parser_alias_debug,DEBUG_PARSER_ALIAS,"Parser aliases")
+DEBUG_FLAG(parser_priv_debug,DEBUG_PARSER_PRIV,"Privilege level")
+DEBUG_FLAG(parser_http_debug,DEBUG_PARSER_HTTP,"Parser HTTP processing")
+
+DEBUG_ARRDONE
diff --git a/data/mnet/Common/cli/include/parser_defs_config.h b/data/mnet/Common/cli/include/parser_defs_config.h
new file mode 100644
index 0000000..4d7aa2b
--- /dev/null
+++ b/data/mnet/Common/cli/include/parser_defs_config.h
@@ -0,0 +1,28 @@
+/* Terminal and line parameter defines */
+enum TERM_LINE_PARAMS {
+ TERM_LENGTH,
+ TERM_WIDTH,
+ TERM_MONITOR,
+};
+
+/* Configuration sources */
+#define PARSER_CONF_NONE 0 /* No source identified */
+#define PARSER_CONF_TERM 1 /* Config from terminal */
+#define PARSER_CONF_MEM 2 /* Config from NV memory */
+#define PARSER_CONF_NET 3 /* Config from a TFTP host */
+#define PARSER_CONF_OVERWRITE_NET 4 /* Config from a TFTP host and o
+verwrite config */
+#define PARSER_CONF_BATCH 5 /* Not from terminal */
+#define PARSER_CONF_HTTP 6 /* Config from HTTP server */
+
+
+/* Enable defines */
+#define ENABLE_PASSWORD 1
+#define ENABLE_SECRET 2
+
+/* How many characters to save at the end of config buffers to guarantee
+ * that "\nend" gets written.
+ */
+#define ENDSTRLEN 5
+
+#define MAXTTYLENGTH 512
diff --git a/data/mnet/Common/cli/include/parser_defs_exec.h b/data/mnet/Common/cli/include/parser_defs_exec.h
new file mode 100644
index 0000000..8c57b49
--- /dev/null
+++ b/data/mnet/Common/cli/include/parser_defs_exec.h
@@ -0,0 +1,86 @@
+/* Global commands */
+#define HISTORY 0
+#define HISTORY_ON 1
+#define HISTORY_OFF 2
+#define HISTORY_PRINT 3
+#define HISTORY_SIZE 4
+#define DUMP 5
+
+/* Exec and privileged command function defines */
+
+#define CMD_CONNECT_DEFAULT 1
+#define CMD_CONNECT_RLOGIN 2
+#define CMD_CONNECT_TELNET 3
+#define CMD_CONNECT_TN3270 4
+#define CMD_DISABLE 5
+#define CMD_ENABLE 6
+#define CMD_END 7 /* Analogous to exit, but is NVGEN'ed */
+#define CMD_EXIT 8
+#define CMD_QUIT 9
+
+/* Write command destinations */
+#define WRITE_UNUSED 0
+#define WRITE_CORE 1
+#define WRITE_ERASE 2
+#define WRITE_MEMORY 3
+#define WRITE_NETWORK 4
+#define WRITE_TERMINAL 5
+
+
+
+/* BEGIN FROM parser_defs_flash.h */
+
+/* Copy command defines */
+/* Source and destinations for copy command */
+#define COPY_UNUSED 0
+#define COPY_FLASH_TFTP 1
+#define COPY_TFTP_FLASH 2
+#define COPY_TFTP_BOOTFLASH 3
+#define COPY_BOOTFLASH_TFTP 4
+#define COPY_RUNNING_CONFIG_TFTP 5
+#define COPY_STARTUP_CONFIG_TFTP 6
+#define COPY_TFTP_RUNNING_CONFIG 7
+#define COPY_TFTP_STARTUP_CONFIG 8
+#define COPY_FFFFFFFF_FLASH 9 /* OBSOLETE */
+#define COPY_VERIFY_FLASH 10
+#define COPY_SSE_MEMORY 11
+#define COPY_ERASE_FLASH 12
+#define COPY_ERASE_BOOTFLASH 13
+#define COPY_VERIFY_BOOTFLASH 14
+#define COPY_MOP_FLASH 15
+#define COPY_MOP_BOOTFLASH 16
+#define COPY_FLASH_RCP 17
+#define COPY_RCP_FLASH 18
+#define COPY_RCP_BOOTFLASH 19
+#define COPY_BOOTFLASH_RCP 20
+#define COPY_RUNNING_CONFIG_RCP 21
+#define COPY_STARTUP_CONFIG_RCP 22
+#define COPY_RCP_RUNNING_CONFIG 23
+#define COPY_RCP_STARTUP_CONFIG 24
+#define COPY_RUNNING_CONFIG 25
+#define COPY_STARTUP_CONFIG 26
+#define COPY_TFTP 27
+#define COPY_RCP 28
+#define COPY_FLHLOG 29
+#define COPY_RUNNING_CONFIG_DISK 30
+#define COPY_STARTUP_CONFIG_DISK 31
+#define COPY_DISK_STARTUP_CONFIG 32
+#define COPY_DISK_FLASH 33
+#define COPY_FLASH_DISK 34
+#define COPY_DISK_TFTP 35
+#define COPY_TFTP_DISK 46
+#define COPY_DISK_DISK 47
+#define COPY_TECHSUPPORT_DISK 48
+#define COPY_TECHSUPPORT_TFTP 49
+
+#define COPY_DISK_BIOS 50
+
+/* END FROM parser_defs_flash.h */
+
+
+#define DEFAULT_PING_PACKETS 5
+
+#define SHOW_MEM_TERSE 1
+#define SHOW_MEM_FREE 2
+#define SHOW_MEM_PAGES 3
+
diff --git a/data/mnet/Common/cli/include/parser_errno.h b/data/mnet/Common/cli/include/parser_errno.h
new file mode 100644
index 0000000..bb25ccf
--- /dev/null
+++ b/data/mnet/Common/cli/include/parser_errno.h
@@ -0,0 +1,53 @@
+#ifndef _PARSER_ERRNO_H
+#define _PARSER_ERRNO_H
+
+#define S_parser_PROGRAMMING_ERROR (M_parser | 1)
+#define S_parser_NVRAM_WRITE_ERROR (M_parser | 2)
+#define S_parser_NVRAM_NULL_WRITE (M_parser | 3)
+#define S_parser_NVRAM_READ_ERROR (M_parser | 4)
+#define S_parser_NVRAM_BAD (M_parser | 5)
+#define S_parser_NVRAM_CRC_FAIL (M_parser | 6)
+#define S_parser_SYNTAX_AMBIGUOUS (M_parser | 7)
+#define S_parser_SYNTAX_UNKNOWN (M_parser | 8)
+#define S_parser_SYNTAX_INCOMPLETE (M_parser | 9)
+#define S_parser_SYNTAX_INVALID (M_parser | 10)
+#define S_parser_SYNTAX_NULL_STRING (M_parser | 11)
+#define S_parser_SYNTAX_INVALID_IPADDR_FORMAT (M_parser | 12)
+#define S_parser_SYNTAX_INVALID_HOSTNAME_FORMAT (M_parser | 13)
+#define S_parser_IPADDR_RESERVED (M_parser | 14)
+#define S_parser_IPADDR_NO_NAME_SERVER (M_parser | 15)
+#define S_parser_IPADDR_HOSTNAME_LOOKUP_FAILED (M_parser | 16)
+#define S_parser_RESOURCE_ALLOCATION_ERROR (M_parser | 17)
+
+#define S_parser_SYNTAX_INVALID_NETMASK_FORMAT (M_parser | 18)
+#define S_parser_SYNTAX_INVALID_NETMASK_CONTIGUOUS (M_parser | 19)
+#define S_parser_SYNTAX_INVALID_NETMASK_IPADDR_MISMATCH (M_parser | 20)
+
+/**************** ERROR CODE DOCUMENTATION ********************************
+
+S_parser_SYNTAX_NULL_STRING - input string is null
+S_parser_SYNTAX_INVALID_IPADDR_FORMAT - invalid dotted-decimal notation
+S_parser_SYNTAX_INVALID_HOSTNAME_FORMAT - invalid string for a hostname
+
+For parser_ipaddr_or_hostname() api, if the input flag had
+IPADDR_MARTIAN_TEST_REQUIRED as TRUE, the following error code
+is also possible.
+
+S_parser_IPADDR_RESERVED - the IP address is one of the reserved IP addresses
+
+For parser_ipaddr_or_hostname(0 api, if input flag had
+IPADDR_HOSTNAME_ALLOWED as TRUE, the folllowing error codes are also possible.
+
+S_parser_IPADDR_NO_NAME_SERVER - no ip name servers configured to do DNS lookup
+S_parser_IPADDR_HOSTNAME_LOOKUP_FAILED - DNS resolver failed on hostname lookup
+
+S_parser_RESOURCE_ALLOCATION_ERROR - internal error - unable to acquire resource
+
+
+S_parser_SYNTAX_INVALID_NETMASK_FORMAT - Netmask is malformed
+S_parser_SYNTAX_INVALID_NETMASK_CONTIGUOUS - Netmask binary format should
+ have contiguous 1
+
+******************************************************************************/
+
+#endif /* _PARSER_ERRNO_H */
diff --git a/data/mnet/Common/cli/include/parser_if.h b/data/mnet/Common/cli/include/parser_if.h
new file mode 100644
index 0000000..1a10371
--- /dev/null
+++ b/data/mnet/Common/cli/include/parser_if.h
@@ -0,0 +1,135 @@
+#ifndef __PARSER_IF_H__
+#define __PARSER_IF_H__
+
+
+#define CLI_MODULE_ID 100
+#define CLI_MAX_STRING_LEN 128
+
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <tyLib.h>
+#include <taskLib.h>
+#include <errnoLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <msgQLib.h>
+#include <sigLib.h>
+
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+#include <../include/parser_sim.h>
+#include <../include/parser.h>
+#include <../include/parser_defs_exec.h>
+#include <../include/parser_input.h>
+#include <../include/parser_sim.h>
+#include <../include/parser_util.h>
+#include <../include/parser_commands.h>
+#include <../include/nv.h>
+#include <../include/parser_errno.h>
+#include <../include/parser_ModNum.h>
+#include <../include/defs.h>
+#include <../include/parser_init.h>
+#include <../include/macros.h>
+#include <../include/parser_actions.h>
+
+static long nvgen_int;
+static char nvgen_string[CLI_MAX_STRING_LEN+1];
+
+#define SET_INT_MIB(mibtag,obj,def,string) if (csb->sense) {\
+ if (oam_setMibIntVar(CLI_MODULE_ID,mibtag,obj) !=STATUS_OK)\
+ printf(string);\
+ } else {\
+ if (oam_setMibIntVar(CLI_MODULE_ID,mibtag,def) !=STATUS_OK)\
+ printf(string);\
+ }
+
+#define NVGEN_INT_MIB(mibtag,string) if (csb->nvgen) {\
+ if (oam_getMibIntVar(mibtag,&nvgen_int) !=STATUS_OK) {\
+ printf(string);\
+ } else {\
+ printf("\n %s %d",csb->nv_command,nvgen_int);\
+ }\
+ return;\
+ }
+
+#define NVGEN_IP_MIB(mibtag,string) if (csb->nvgen) {\
+ if (oam_getMibIntVar(mibtag,&nvgen_int) !=STATUS_OK) {\
+ printf(string);\
+ } else {\
+ address_string(nvgen_int,nvgen_string);\
+ printf("\n %s %s",csb->nv_command,nvgen_string);\
+ }\
+ return;\
+ }
+
+#define NVADDGEN_INT_MIB(mibtag,string,first,last) if (csb->nvgen) {\
+ if (oam_getMibIntVar(mibtag,&nvgen_int) !=STATUS_OK) {\
+ printf(string);\
+ } else {\
+ if (first)\
+ printf("\n %s %d",csb->nv_command,nvgen_int);\
+ else\
+ printf(" %d",nvgen_int);\
+ }\
+ if (last)\
+ return;\
+ }
+
+#define NVGEN_STRING_MIB(mibtag,string) if (csb->nvgen) {\
+ if (oam_getMibByteAry(mibtag,nvgen_string,CLI_MAX_STRING_LEN) !=STATUS_OK) {\
+ printf(string);\
+ } else {\
+ printf("\n %s %s",csb->nv_command,nvgen_string);\
+ }\
+ return;\
+ }
+
+#define NVADDGEN_STRING_MIB(mibtag,string,first,last) if (csb->nvgen) {\
+ if (oam_getMibByteAry(mibtag,nvgen_string,CLI_MAX_STRING_LEN) !=STATUS_OK) {\
+ printf(string);\
+ } else {\
+ if (first)\
+ printf("\n %s %s",csb->nv_command,nvgen_string);\
+ else\
+ printf(" %s",nvgen_string);\
+ }\
+ if (last)\
+ return;\
+ }
+
+
+#define NVGEN_BOOL_MIB(mibtag,string) if (csb->nvgen) {\
+ if (oam_getMibIntVar(mibtag,&nvgen_int) !=STATUS_OK) {\
+ printf(string);\
+ } else {\
+ if (nvgen_int)\
+ printf("\n %s enable",csb->nv_command);\
+ else\
+ printf("\n no %s enable",csb->nv_command);\
+ }\
+ return;\
+ }
+
+#define NVGEN_TIMER_MIB(mibtag,timer) if (csb->nvgen) {\
+ oam_getMibIntVar(mibtag,&nvgen_int);\
+ printf("\n\t %s %s %d",csb->nv_command,timer,nvgen_int);\
+ return;\
+ }
+
+#define NVADDGEN_TIMER_MIB(mibtag,timer) if (csb->nvgen) {\
+ oam_getMibIntVar(mibtag,&nvgen_int);\
+ printf("\n\t %s %s %d",csb->nv_command,timer,nvgen_int);\
+ }
+
+#endif
diff --git a/data/mnet/Common/cli/include/parser_init.h b/data/mnet/Common/cli/include/parser_init.h
new file mode 100644
index 0000000..6da3562
--- /dev/null
+++ b/data/mnet/Common/cli/include/parser_init.h
@@ -0,0 +1,38 @@
+#ifndef __PARSER_INIT_H
+#define __PARSER_INIT_H
+
+
+
+#define MAXCSB 32
+
+/*
+ * Externals
+ */
+extern parser_mode *exec_mode;
+extern parser_mode *config_mode;
+
+extern void test_parser_init(void);
+extern void parser_pipe_init(void);
+extern void show_os_chain_init(void);
+extern void parser_modes_init(void);
+extern void command_parser_init(void);
+extern void exec_parser_init(void);
+extern void parse_pager_init(void);
+extern void parser_sema_init(void);
+extern void parser_task_init(void);
+extern void parser_iowork_init(void);
+extern void parser_configure(void);
+extern parseinfo* get_csb(const char*);
+extern void BuildPrompt(parseinfo *, tt_soc*);
+
+extern void console_main(void);
+extern void parser_init(void);
+extern void getPrompt( parseinfo*, char*, char* );
+extern void processCommand( tpPARSERSIM );
+
+extern boolean config_prompt;
+extern int consoleFd;
+extern void parser_check();
+
+extern tBSEMAPHORE configSemId;
+#endif __PARSER_INIT_H
diff --git a/data/mnet/Common/cli/include/parser_input.h b/data/mnet/Common/cli/include/parser_input.h
new file mode 100644
index 0000000..3faf1e1
--- /dev/null
+++ b/data/mnet/Common/cli/include/parser_input.h
@@ -0,0 +1,84 @@
+#ifndef __PARSER_INPUT_H__
+#define __PARSER_INPUT_H__
+
+
+/* This should be >= MAX_TELNET_SESSIONS in telnetLib.c
+ * so that all telnet sessions can monitor
+ */
+#define MAX_FDS 5
+
+#define LINES 24
+#define LENGTH_DEFAULT LINES
+
+#define MAX_USERNAME_LEN 256
+#define MAX_PASSWD_LEN 256
+#define MAX_RETRIES 3
+#define MAXHOSTNAMELEN 64
+
+
+#define DEFAULT_EXEC_TIMEOUT ( 10 * 60 )
+
+#define IO_SIGINT 0x01
+#define IO_EXEC_TIMEOUT 0x02
+#define IO_SIGFLAGS_DELETED 0x00001000
+#define MAX_HISTORY 5
+
+typedef struct ioInfo {
+ parseinfo *csb;
+ tCSEMAPHORE ioSemId;
+ tUOCTET4 ioModuleId;
+ tUOCTET4 requestId;
+ tUOCTET4 flags;
+ tUOCTET4 sockFd;
+ tpOCTET execHistory[MAX_HISTORY];
+ tpOCTET configHistory[MAX_HISTORY];
+} tIOINFO,*tpIOINFO;
+
+typedef enum {
+ IO_RAW_MODE = 0,
+ IO_LINE_MODE,
+ IO_ECHO_MODE
+} tTERMINALMODE;
+
+/* Extern Declarations */
+extern tCSEMAPHORE initSemId;
+extern int consoleFd;
+extern tINT fdArray[MAX_FDS];
+extern boolean cgipipeDone;
+extern tINT cgiStatus;
+extern tINT cgiMode;
+/*extern tUID cgiUid;*/
+extern char usrPrompt[];
+extern char passwdPrompt[];
+extern char loginErrMsg[];
+
+extern tOCTET2 registerFd( tINT );
+extern tOCTET2 unregisterFd( tINT );
+/*extern void io_work(tINT, tINT, boolean, tUID, SEM_ID, boolean );*/
+extern void cgi_io_work(tINT, tINT );
+extern tOCTET2 io_more_buffer( tINT, char *, time_t );
+extern void moreFileOrBuffer( int , parseinfo *, int, boolean , time_t );
+
+extern tINT ioSetTerminalMode( int, tTERMINALMODE ) ;
+extern void show_techsupport( parseinfo *) ;
+extern void startIOTimer( parseinfo *csb );
+extern void stopIOTimer( parseinfo *csb );
+extern STATUS setExecTimeout(parseinfo *csb );
+
+
+extern FUNCPTR cli_logoutf;
+extern int cli_logVar;
+extern int ShellTask;
+extern int SSHTask;
+extern int installedVxShell;
+extern int TelnetTask;
+extern int ConsoleTask;
+extern boolean ExitFlag;
+extern int infd;
+extern int outfd;
+extern BOOL defaultUserInUse;
+
+#define PARSE_ADD_BOOT_PARAM 50
+#define PARSE_ADD_VXSH_CHAIN 51
+
+#endif /* __PARSER_INPUT_H_ */
diff --git a/data/mnet/Common/cli/include/parser_modes.h b/data/mnet/Common/cli/include/parser_modes.h
new file mode 100644
index 0000000..e51bc99
--- /dev/null
+++ b/data/mnet/Common/cli/include/parser_modes.h
@@ -0,0 +1,8 @@
+#ifndef __PARSER_MODES_H
+#define __PARSER_MODES_H
+
+#define PARSER_MODE_NONE 0x0001
+#define PARSER_MODE_ALIASES 0x0002
+#define PARSER_MODE_PRIVILEGE 0x0004
+
+#endif
diff --git a/data/mnet/Common/cli/include/parser_privilege.h b/data/mnet/Common/cli/include/parser_privilege.h
new file mode 100644
index 0000000..fef59b7
--- /dev/null
+++ b/data/mnet/Common/cli/include/parser_privilege.h
@@ -0,0 +1,19 @@
+#ifndef __PARSER_PRIVILEGE_H__
+#define __PARSER_PRIVILEGE_H__
+
+typedef struct privq_ {
+ struct privq_ *next; /* Next queue entry */
+ trans_priv *priv; /* Priv pointer */
+} privq;
+
+typedef struct priv_nvgenq_ {
+ struct priv_nvgenq_ *next; /* Next queue entry */
+ uint level; /* Priv level */
+ char command[PARSEBUF]; /* Current command */
+} priv_nvgenq;
+
+
+extern void priv_push(parseinfo *, trans_priv *);
+extern boolean nvgen_privilege (parseinfo *, trans_priv *, const char *);
+
+#endif /* __PARSER_PRIVILEGE_H__ */
diff --git a/data/mnet/Common/cli/include/parser_sim.h b/data/mnet/Common/cli/include/parser_sim.h
new file mode 100644
index 0000000..66b6d5f
--- /dev/null
+++ b/data/mnet/Common/cli/include/parser_sim.h
@@ -0,0 +1,33 @@
+#ifndef __PARSER_SIM_H
+#define __PARSER_SIM_H
+
+typedef struct parser_sim {
+ tCOMSIM comsim; /* Generic Interaction Module */
+ tOCTET command[PARSEBUF]; /* Command to be processed */
+ tOCTET lastchar; /* For Help Processing */
+ void *index; /* For More Processing */
+ tOCTET4 maxCount; /* For More Processing */
+ parseinfo *csb; /* CSB of I/O Task */
+} tPARSERSIM, *tpPARSERSIM;
+
+
+#define mFILL_PARSER_SIM( pParserSim, Csb, origin, dest, service, request, \
+ cmd, Lastchar, Index, MaxCount ) \
+ { \
+ tpCOMSIM pComSim = &(pParserSim->comsim); \
+ strcpy( (pParserSim->command), cmd ); \
+ pParserSim->csb = Csb; \
+ pParserSim->lastchar = Lastchar; \
+ pParserSim->index = Index; \
+ pParserSim->maxCount = MaxCount; \
+ mFILL_COM_SIM( pComSim, origin, dest, service, request, NULL, 0, 0); \
+ }
+
+
+#define PARSER_CMD_PROC_REQ 0x3100
+#define PARSER_CMD_PROC_IND 0x3200
+
+#define IO_WAIT_COMPLETE_IND 0xF2FE
+#define IO_CMD_COMPLETE_IND 0xF2FF
+
+#endif /* __PARSER_SIM_H */
diff --git a/data/mnet/Common/cli/include/parser_util.h b/data/mnet/Common/cli/include/parser_util.h
new file mode 100644
index 0000000..0f3b306
--- /dev/null
+++ b/data/mnet/Common/cli/include/parser_util.h
@@ -0,0 +1,21 @@
+#ifndef __PARSER_UTIL_H__
+#define __PARSER_UTIL_H__
+
+#define FUNCARGS0(argArray)
+#define FUNCARGS1(argsArray) argsArray[0]
+#define FUNCARGS2(argsArray) FUNCARGS1((argsArray)) ## , ## \
+ argsArray[1]
+#define FUNCARGS3(argsArray) FUNCARGS2((argsArray)) ## , ## argsArray[2]
+#define FUNCARGS4(argsArray) FUNCARGS3((argsArray)) ## , ## argsArray[3]
+#define FUNCARGS5(argsArray) FUNCARGS4((argsArray)) ## , ## argsArray[4]
+
+#define ARGS(argsArray,numArgs) FUNCARGS##numArgs(argsArray)
+
+extern boolean null (const char *s);
+extern char *deblank( const char *);
+extern boolean yes_or_no( const char *, boolean, boolean );
+extern boolean confirm( char *);
+
+extern void parser_return(parseinfo *, int errno_val);
+
+#endif /* __PARSER_UTIL_H_ */
diff --git a/data/mnet/Common/cli/include/parsertypes.h b/data/mnet/Common/cli/include/parsertypes.h
new file mode 100644
index 0000000..fc05d4e
--- /dev/null
+++ b/data/mnet/Common/cli/include/parsertypes.h
@@ -0,0 +1,145 @@
+#ifndef __PARSERTYPES_H__
+#define __PARSERTYPES_H__
+
+/* A BIG KLUDGE */
+
+typedef void tt_soc;
+
+#define NULLTTY (( void *) -1 )
+
+/* Check parser_util.c */
+/* A BIG KLUDGE */
+
+#define SCREEN_WIDTH 80
+
+#define sstrncpy strncpy
+
+/* FROM parser_defbreaksets.h */
+
+/* Break character set for the exec and config command levels.
+ */
+#define EXEC_BREAKSET "\r\n?\t"
+#define CONFIG_BREAKSET "\r\n\032?\t"
+#define NVCONFIG_BREAKSET "\r\n"
+
+/* FROM parser_defbreaksets.h */
+
+
+/* FROM sys/h/globs.h */
+
+/*
+ * define data structure for named things.
+ * NAMEDTHINGMACRO defines those fields common to all named things.
+ * This allows common code to find named things in queues, and so on.
+ */
+
+#define NAMEDTHINGNAMELEN 20
+#define NAMEDTHINGMACRO \
+ char name[NAMEDTHINGNAMELEN+1];
+/* FROM sys/h/globs.h */
+
+
+#define NULLFUNC ((void *) 0)
+
+#define EXEC_MODE 1
+#define CONFIG_MODE 2
+/*
+ * Define forward references to major system types
+ */
+
+#define STRUCTURE_REF(str) typedef struct str ## _ str
+
+STRUCTURE_REF(nvtype); /* h/config.h */
+STRUCTURE_REF(nvtype_private); /* h/config.h */
+STRUCTURE_REF(parseinfo); /* h/config.h */
+STRUCTURE_REF(parser_mode); /* h/config.h */
+STRUCTURE_REF(parser_alias); /* h/config.h */
+
+/*
+ * Can't use STRUCTURE_REF for transition because
+ * it is a constant.
+ */
+typedef const struct transition_ transition; /* h/config.h */
+
+/*
+ * Type Definitions -- note that these are really compiler specific
+ */
+
+#if !defined(_SIZE_T) && !defined(_GCC_SIZE_T)
+#define _SIZE_T
+
+#ifdef __GNUC__
+#define _GCC_SIZE_T
+/*
+ typedef __typeof__ (sizeof (0)) size_t;
+*/
+#else
+typedef unsigned int size_t;
+#endif /* __GNUC__ */
+
+#endif /* _SIZE_T */
+
+#ifdef caddr_t
+#undef caddr_t
+typedef unsigned char *caddr_t;
+#endif
+
+/*
+ * Size specific defines
+ */
+typedef signed char int8;
+typedef signed short int16;
+typedef signed long int32;
+typedef signed long long int64;
+typedef unsigned char uint8;
+typedef unsigned short uint16;
+typedef unsigned long uint32;
+typedef unsigned long long uint64;
+typedef unsigned char tinybool;
+typedef void forktype;
+
+/*
+ * Queuetype data structure
+ */
+typedef struct queuetype_ {
+ void *qhead; /* head of queue */
+ void *qtail; /* tail of queue */
+ int count; /* possible count */
+ int maximum; /* maximum entries */
+} queuetype;
+
+
+#define QUEUESIZE(q) queuesize_inline(q)
+#define QUEUEFULL(q) queuefull_inline(q)
+#define QUEUEFULL_RESERVE(q, reserve) \
+ queuefull_reserve_inline(q, reserve)
+#define QUEUEEMPTY(q) queueempty_inline(q)
+#define QUEUEMAXIMUM(q) queuemax_inline(q)
+
+
+typedef struct nexthelper_ {
+ struct nexthelper_ *next;
+ unsigned char data[0];
+} nexthelper;
+
+
+/*
+ * Define the PACKED macro
+ */
+#if defined(__mips) || defined(__mc68000) || defined(__PPC__)
+#define PACKED(item) item __attribute__ ((packed))
+#else
+#define PACKED(item) item
+#endif
+
+#define MIN(a,b) (((a) < (b)) ? (a) : (b))
+#define MAX(a,b) (((a) > (b)) ? (a) : (b))
+
+#ifdef NOTHING
+#define max(a,b) (((a) > (b)) ? (a) : (b))
+#define min(a,b) (((a) < (b)) ? (a) : (b))
+#endif
+
+
+#endif __PARSERTYPES_H__
+
diff --git a/data/mnet/Common/cli/include/platdef.h b/data/mnet/Common/cli/include/platdef.h
new file mode 100644
index 0000000..1891efb
--- /dev/null
+++ b/data/mnet/Common/cli/include/platdef.h
@@ -0,0 +1,229 @@
+#ifndef _PLATDEF_H_
+#define _PLATDEF_H_
+
+#include <stddef.h> /* _LITTLE_ENDIAN, _BIG_ENDIAN */
+
+ /*
+ **
+ ** some basic defines
+ **
+ */
+
+#define NO_PROTECT 0
+#define PROTECT 1
+
+#define RC_NONE 0
+#define RC_OK OK
+#define RC_ERR ERROR
+
+#if 0
+#define _LITTLE_ENDIAN_ 1234
+#define _BIG_ENDIAN_ 4321
+#define LITTLE_ENDIAN _LITTLE_ENDIAN_
+#define BIG_ENDIAN _BIG_ENDIAN_
+
+#define BYTE_ORDER _BYTE_ORDER
+#endif
+#define LITTLE_ENDIAN _LITTLE_ENDIAN
+#define BIG_ENDIAN _BIG_ENDIAN
+
+#define _ASCII_CHAR_ abcd
+
+#define PRIVATE static /* local routines, can be changed to make some routines
+ visible for debugging */
+
+/*
+** INCLUDES
+*/
+
+/* common includes */
+
+
+
+/* system specific includes. They contain primitive data type definitions */
+
+
+#ifdef UNIX
+#ifdef SUNSOL24
+#define PStypeString ((tOCTET *) "Sun Solaris 2.4")
+#endif
+#include <psunif.h>
+#endif
+
+
+#ifdef VXWORKS
+#ifdef VXWORKS53
+#define PStypeString((tOCTET *) "vxWorks 5.3")
+#endif
+#endif
+
+ /*
+ **
+ ** Basic defines
+ **
+ */
+
+
+#ifndef BYTE_ORDER /* byte order should be defined in platform file */
+#error Unrecognized Platform
+#endif
+
+#ifndef CHAR_SET
+#error Unrecognized Platform
+#endif
+
+#define PSNONSTDIO 1
+#define PSSTDIO 0
+
+/*
+** Macros
+*/
+
+
+/* Data representation macros */
+
+ /*
+ **
+ ** Macros for data conversion are:
+ ** mPS_2OCTET_TO_NET: convert 2 octets to network format
+ ** mPS_4OCTET_TO_NET: convert 4 octets to network format
+ ** mPS_2OCTET_TO_HOST: convert 2 octets to host format
+ ** mPS_4OCTET_TO_HOST: convert 4 octets to host format
+ **
+ */
+
+#if (BYTE_ORDER == _BIG_ENDIAN_)
+
+#define mPS_2OCTET_TO_NET(pdest) \
+ (*(pdest))= ((*(pdest))<<8) \
+ | ( ((*(pdest))>>8) & 0x00ff)
+
+#define mPS_4OCTET_TO_NET(pdest) \
+ (*(pdest))= ( ((*(pdest))>>24) & 0x000000ff) \
+ | ((*(pdest))<<24) \
+ | (0x0000ff00 & ((*(pdest)) >> 8)) \
+ | ( 0x00ff0000 & ((*(pdest)) << 8))
+
+#define mPS_2OCTET_TO_HOST mPS_2OCTET_TO_NET
+
+#define mPS_4OCTET_TO_HOST mPS_4OCTET_TO_NET
+
+
+#else /* LITTLE_ENDIAN (this is the chosen network order) */
+
+#define mPS_2OCTET_TO_NET(pdest)
+#define mPS_4OCTET_TO_NET(pdest)
+#define mPS_2OCTET_TO_HOST(pdest)
+#define mPS_4OCTET_TO_HOST(pdest)
+
+#endif /* BIG_ENDIAN */
+
+
+#if (CHAR_SET == _ASCII_CHAR_SET_)
+
+#define mPS_OCTET_TO_HOST( pField, len)
+
+#define mPS_OCTET_TO_NET( pField, len)
+
+#else
+
+XXX not supported
+
+#endif /* CHAR_SET */
+
+
+
+/*
+** prototypes for remaining platform specific services
+*/
+
+
+/* Any platform specific initialization and auxilary functions */
+
+extern tOCTET2 PS_Init (tOCTET2 ioType, tOCTET4 hInst, tOCTET4 hPInst, void *cmdParam,
+ tOCTET2 nCmdShow);
+
+extern tOCTET2 PSWaitForEvent (tpEVENT pEvent, tOCTET4 *p1, tOCTET4 *p2, tOCTET4 *p3,
+ struct timeval *pTimeout);
+
+/* Timer Tic (hearbeat) Service Interface */
+
+
+extern tOCTET2 PS_TimerInit (void (*tickhandler)(tOCTET2 tick_gran));
+extern tOCTET2 PS_TimerTerm (void);
+extern tMSECTIME PS_MsecTime (void);
+extern tSECTIME PS_SecTime (void);
+extern char *PS_GetAscTime (void);
+
+ /*
+ **
+ ** Memory management and other macros defined in
+ ** platform specific include files
+ **
+ */
+
+
+ /*
+ **
+ ** Events
+ **
+ */
+
+extern tEVENT or_timer_event;
+extern tEVENT or_network_event;
+extern tEVENT ij_cr_event;
+extern tEVENT ij_cag_event;
+extern tEVENT ij_db_event;
+
+
+ /*
+ **
+ ** I/O, logging and tracing
+ **
+ */
+
+#ifndef PS_getopt
+extern int PS_getopt (int argc, tOCTET **argv, char *opts);
+#endif
+#ifndef PS_Printf
+extern void PS_Printf (char *lpszFormat);
+#endif
+extern void PS_ErrPrintf ( int errCode, const char *szFormat, ...);
+
+
+ /*
+ **
+ ** data buffer management
+ **
+ */
+
+tOCTET *PS_alloc_buf(tOCTET4 bufsz);
+tOCTET2 PS_Heap_Verify(char *pMem);
+void PS_free_buf(void *pBuf);
+
+
+/* Exit Function */
+
+void PS_AtExit(void (*func) (void));
+void PS_CleanUp(void);
+void PS_kickSched(void);
+
+/* Various status registration functions */
+
+void PS_Reg_Status(void (*func) (void));
+void PS_Reg_Trace(void (*func) (tOCTET2 type, tOCTET2 onOff));
+void PS_Rreg_GetNextServer(char * (*func) (char *server, tOCTET2 *selected));
+void PS_Rreg_SelectServer(tUOCTET2 (*func) (char *server));
+void PS_Reg_MaskFunc(void (*func) (void));
+
+#endif /* _PLATDEF_H */
+
+
+
+
+
+
+
+
+
+
diff --git a/data/mnet/Common/cli/include/pstypes.h b/data/mnet/Common/cli/include/pstypes.h
new file mode 100644
index 0000000..71ad0a2
--- /dev/null
+++ b/data/mnet/Common/cli/include/pstypes.h
@@ -0,0 +1,82 @@
+#ifndef _PSTYPES_H_
+#define _PSTYPES_H_
+
+
+typedef char tOCTET; /* signed octet */
+typedef unsigned char tUOCTET; /* unsigned octet */
+typedef int tINT; /* Integer */
+typedef short tOCTET2; /* signed 2 octets */
+typedef short s_size_t; /* signed size_t */
+typedef unsigned us_size_t; /* unsigned size_t */
+typedef long tOCTET4; /* signed 4 octets */
+typedef unsigned short tUOCTET2; /* unsigned 2 octets */
+typedef unsigned long tUOCTET4; /* unsigned 4 octets */
+typedef FILE tFILE;
+typedef int tTASKID;
+typedef int boolean;
+typedef uint32_t ipaddrtype;
+
+ /*
+ **
+ ** Basic data type pointers
+ **
+ */
+
+typedef char * tpOCTET;
+typedef unsigned char * tpUOCTET;
+typedef short * tpOCTET2;
+typedef long * tpOCTET4;
+typedef unsigned short * tpUOCTET2;
+typedef unsigned long * tpUOCTET4;
+
+/*
+ * libc data types
+ */
+typedef FILE * tpFILE;
+
+/*
+ * kernel data types
+ */
+typedef SEM_ID tSEMAPHORE; /* semaphore */
+typedef SEM_ID tCSEMAPHORE; /* counting semaphore */
+typedef SEM_ID tBSEMAPHORE; /* binary semaphore */
+typedef SEM_ID tMSEMAPHORE; /* mutex semaphore */
+
+/*
+ * missing from vxWorks' Posix types
+ */
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
+
+/*
+ * Cisco IOS compatibility
+ */
+typedef long long longlong;
+typedef unsigned int uint;
+typedef unsigned char uchar;
+typedef unsigned long ulong;
+typedef unsigned long long ulonglong;
+typedef unsigned long long sys_timestamp;
+
+/*
+ * Special values for data types
+ */
+#ifndef NULLP
+#define NULLP ((void *) 0)
+#endif
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#define PSmalloc(Size) malloc(Size)
+#define PScalloc(Num, Size) calloc(Num,Size)
+#define PSrealloc(Block,Size) realloc(Block,Size)
+#define PSfree(Block) free(Block)
+
+#endif
+
diff --git a/data/mnet/Common/cli/include/psvxif.h b/data/mnet/Common/cli/include/psvxif.h
new file mode 100644
index 0000000..360056e
--- /dev/null
+++ b/data/mnet/Common/cli/include/psvxif.h
@@ -0,0 +1,252 @@
+#ifndef _PSVXIF_H_
+#define _PSVXIF_H_
+
+
+ /*
+ **
+ ** Primitive data types and declarations
+ **
+ */
+
+
+#ifndef CHAR_SET
+#define CHAR_SET _ASCII_CHAR_
+#endif
+
+/*
+ * Borrowed from cdecl.h
+ */
+#if (defined(__STDC__) || defined(__cplusplus)) && !defined(__P)
+#define __P(x) x
+#endif
+
+/*
+ * Set BYTE_ORDER based on cpu family.
+ *
+ * This may need some adjustment if
+ * a cpu can do both byte orders.
+ */
+#ifndef BYTE_ORDER
+
+#if CPU_FAMILY == I80X86
+#define BYTE_ORDER LITTLE_ENDIAN
+
+#elif CPU_FAMILY == SIMNT
+#define BYTE_ORDER LITTLE_ENDIAN
+
+#elif CPU_FAMILY == PPC
+#define BYTE_ORDER BIG_ENDIAN
+
+#else
+#error Unrecognized Platform -- missing BYTE_ORDER
+#endif
+
+#endif /* BYTE_ORDER */
+
+
+/*
+** Make RC_OK and RC_ERROR to match vxworks OK and ERROR
+*/
+
+#ifdef RC_OK
+#undef RC_OK
+#endif
+#define RC_OK OK
+
+#ifdef RC_ERR
+#undef RC_ERR
+#endif
+#define RC_ERR ERROR
+
+#define SIGERR 0xFFFFFFFF
+
+ /*
+ **vxWorks data data types
+ **
+ */
+typedef SEM_B_STATE tSEMBSTAT;
+
+
+
+/*
+ * Task Stack Parameters
+ */
+
+typedef enum {
+ STACK_SIZE = 1,
+ STACK_MARGIN,
+ STACK_CURRENT
+} tSTACKPARAM;
+
+#define KERNEL_PID 1
+#define KERNEL_UID 1
+#define KERNEL_GID 1
+ /*
+ ** List Constant
+ */
+
+#define FIFO_LIST 1
+#define PRIORITY_LIST 2
+#define PROTECTED_LIST PROTECT
+#define UNPROTECTED_LIST NO_PROTECT
+#define BINARY_SEMAPHORE 1
+#define COUNT_SEMAPHORE 2
+#define MUTEX_SEMAPHORE 3
+
+ /*
+ ** vxWorks mutex semphore default flag
+ */
+#define PS_DEFAULT_MUTEX_SEM_FLAG \
+ (SEM_Q_PRIORITY | SEM_DELETE_SAFE | SEM_INVERSION_SAFE)
+#define PS_DEFAULT_BINARY_SEM_FLAG (SEM_Q_PRIORITY)
+#define PS_DEFAULT_COUNT_SEM_FLAG (SEM_Q_PRIORITY)
+#define PS_DEFAULT_BINARY_SEM_STAT (SEM_FULL)
+#define PS_DEFAULT_COUNT_SEM_COUNT 1
+
+
+/*
+ * Basic constants.
+ */
+#define MAXCHAR 0x7F /* largest positive 8-bit signed num */
+#define MAXUCHAR 0xFF /* largest positive 8-bit unsigned */
+#define MAXSHORT 0x7FFF /* largest positive 16-bit number */
+#define MAXUSHORT 0xFFFF /* largest positive 16-bit number */
+#define MAXINT 0x7FFFFFFFL /* largest positive 32-bit number */
+#define MAXUINT 0xFFFFFFFFL /* largest unsigned 32-bit number */
+#define MAXLONG MAXINT /* largest positive 32-bit number */
+#define MAXULONG MAXUINT /* largest unsigned 32-bit number */
+#define MINCHAR 0x80 /* smallest possible signed 8-bit */
+#define MINSHORT 0x8000 /* smallest possible signed 16-bit */
+#define MININT 0x80000000L /* smallest possible signed 32-bit */
+#define MINLONG MININT /* smallest possible signed 32-bit */
+
+
+ /*
+ ** vxWorks generic constants
+ */
+#define SEM_DEFAULT_TIMEOUT WAIT_FOREVER
+#define SEM_TIMEOUT_NOWAIT NO_WAIT
+ /*
+ **
+ ** Other data types
+ **
+ */
+
+#define tPROCID tOCTET4 /* process identifier */
+#define tPROCID tOCTET4 /* process identifier */
+#define tSEMTYPE tOCTET2 /* semaphore type */
+#define tEVENT tUOCTET2 /* event descriptor */
+#define tpEVENT tUOCTET2 * /* event pointer */
+#define tTIMER timer_t /* timer identifier */
+#define tTIME time_t
+#define tSECTIME tUOCTET4 /* time in seconds */
+#define tMSECTIME tUOCTET4 /* time in milliseconds */
+#define PS_TIMER_GRAN ( (tUOCTET4)50000 ) /* 50 msec */
+#define PS_MSECT_GRAN ( (PS_TIMER_GRAN)/( (tUOCTET4)1000 ) )/* gran in msec*/
+#define mMSEC_TO_TICKS(ms) ((ms)*sysClkRateGet()/1000)
+#define SOCKET int
+
+ /*
+ **
+ ** system resource limites
+ **
+ */
+
+#define MIN_SYS_MEM 25600 /* 25k */
+
+ /*
+ **normalized marcos
+ */
+
+#define PS_TASK_ARGS \
+(int a1,int a2,int a3,int a4,int a5,int a6,int a7,int a8,int a9,int a10)
+
+#define PStaskDelay taskDelay
+#define PStaskDelete taskDelete
+#define PStaskSuspend taskSuspend
+#define PStaskResume taskResume
+#define PStaskRestart taskRestart
+#define PStaskIdSelf taskIdSelf
+
+/*semphore stuff*/
+
+#define PSsemBCreate semBCreate
+#define PSsemCCreate semCCreate
+#define PSsemMCreate semMCreate
+#define PSsemGive semGive
+#define PSsemTake semTake
+#define PSsemGiveForce semGiveForce
+#define PSsemDelete semDelete
+#define PSsemInfo semInfo
+#define PSsemFlush semFlush
+
+/* Timer functions */
+
+#define PStimer_cancel timer_cancel
+#define PStimer_connect timer_connect
+#define PStimer_create timer_create
+#define PStimer_delete timer_delete
+#define PStimer_gettime timer_gettime
+#define PStimer_settime timer_settime
+#define PSclock_gettime clock_gettime
+
+#define PSprintf printf
+#define PS_Printf printf
+#define PSfprintf fprintf
+#define PSfopen fopen
+#define PSfclose fclose
+#define PSfputs fputs
+#define PSfgets fgets
+#define PSfscanf fscanf
+#define PSmemset(dest, val, len) memset(dest, val, len)
+#define PSmemcpy(dest, src, len) memcpy(dest, src, len)
+#define PSmemcmp(dest, src, len) memcmp(dest, src, len)
+#define PSmemmove(dest, src, len) memmove(dest, src, len)
+#define PSstrlen(src) strlen(src)
+#define PSstrrchr(dest, pat) strrchr(dest, pat)
+#define PSstrchr strchr
+#define PSstrdup strdup
+#define PSstrcmp(dest, src) strcmp(dest, src)
+#define PSstrncmp(dest, src, len) strncmp(dest, src, len)
+#define PSstrncasecmp(dest, src, len) strncasecmp(dest, src, len)
+#define PSstrstr strstr
+#define PSassert assert
+#define PStoupper toupper
+#define mPSATEXIT atexit
+
+#ifndef MEMCPY_DEBUG
+#define PSsprintf sprintf
+#define PSstrcat(dest, src) strcat(dest, src)
+#define PSstrncat(dest, src, len) strncat(dest, src, len)
+#define PSstrcpy(dest, src) strcpy(dest, src)
+#define PSstrncpy(dest, src, len) strncpy(dest, src, len)
+#endif /* MEMCPY_DEBUG */
+
+#define PSabs(x) ( ((x) < 0) ? -(x) : (x) )
+#define PSmin(x, y) ( ((x) < (y)) ? (x) : (y) )
+#define PSmax(x, y) ( ((x) < (y)) ? (y) : (x) )
+
+
+ /* For FileSystem / HTTPD
+ *
+ */
+
+#define mVOLNAME "/local"
+
+
+/*
+** more macros
+*/
+
+#define PS_MSEC_TO_TICK(sec) ( sec * sysClkRateGet() )
+#define PSabort() {abort_brp(); abort();}
+#define PSexit(i) {exit_brp();exit(i);}
+#define PSpanic(s) panic(s)
+#define mMYHOSTNAME
+
+
+typedef void (tFREEFUNC)(void *);
+typedef void (* tpFREEFUNC)(void *);
+
+#endif /* _PSVXIF_H_ */
+
diff --git a/data/mnet/Common/cli/include/sys_debug.h b/data/mnet/Common/cli/include/sys_debug.h
new file mode 100644
index 0000000..f0183b6
--- /dev/null
+++ b/data/mnet/Common/cli/include/sys_debug.h
@@ -0,0 +1,20 @@
+#ifndef __SYS_DEBUG_H
+#define __SYS_DEBUG_H
+
+typedef void (*DEBUG_ALL_FUNCTION_PTR)(boolean);
+typedef void (*DEBUG_SHOW_FUNCTION_PTR)(void);
+
+typedef struct {
+ NODE debugNode;
+ void *debugFunction;
+ debug_item_type *debug_items;
+ char *heading;
+} tDEBUG_FUNC_NODE;
+
+extern void sys_debug_init(void);
+extern void invoke_debug_all(boolean);
+extern void invoke_debug_show(void);
+extern STATUS add_debug_all(DEBUG_ALL_FUNCTION_PTR, const debug_item_type*);
+extern STATUS add_debug_show(DEBUG_SHOW_FUNCTION_PTR, const debug_item_type*,
+ const char*);
+#endif __SYS_DEBUG_H
diff --git a/data/mnet/Common/cli/include/ttyutil.h b/data/mnet/Common/cli/include/ttyutil.h
new file mode 100644
index 0000000..fc8bb64
--- /dev/null
+++ b/data/mnet/Common/cli/include/ttyutil.h
@@ -0,0 +1,88 @@
+#ifndef __TTYUTIL_H__
+#define __TTYUTIL_H__
+
+
+
+/* Special Characters Mapping */
+#define CH_NULL 0x00
+#define CH_SOH 0x01
+#define CH_STX 0x02
+#define CH_ETX 0x03
+#define CH_EOT 0x04
+#define CH_ENQ 0x05
+#define CH_ACK 0x06
+#define CH_BEL 0x07 /* the bell character */
+#define CH_BS 0x08
+#define CH_HT 0x09
+#define CH_NL 0x0A
+#define CH_VT 0x0B
+#define CH_NP 0x0C
+#define CH_CR 0x0D
+#define CH_SO 0x0E
+#define CH_SI 0x0F
+#define CH_DLE 0x10
+#define CH_DC1 0x11
+#define CH_DC2 0x12
+#define CH_DC3 0x13
+#define CH_DC4 0x14
+#define CH_NAK 0x15
+#define CH_SYN 0x16
+#define CH_ETB 0x17
+#define CH_CAN 0x18
+#define CH_EM 0x19
+#define CH_SUB 0x1A
+#define CH_ESC 0x1B
+#define CH_FS 0x1C
+#define CH_GS 0x1D
+#define CH_RS 0x1E
+#define CH_US 0x1F
+#define CH_SPC 0x20
+#define CH_DEL 0x7F
+
+#define CH_LT_SQ_BRACE 0x5B
+
+#define CH_EXT 0x80
+
+#define CH_CTRL_B 0x02
+#define CH_CTRL_C 0x03
+#define CH_CTRL_F 0x06
+#define CH_CTRL_N 0x0E
+#define CH_CTRL_P 0x10
+#define CH_CTRL_Z 0x1A
+
+typedef enum {
+ PRIMARY_TASK = 1,
+ SECONDARY_TASK
+} tTTYATTR;
+
+
+/*
+ * Primary/Secondary task abstraction
+ * for hierarchical distribution of signals.
+ */
+extern STATUS ttySignalSecondaryTasks(int fd, int signo);
+extern STATUS taskSetTtyAttr(int fd, tTTYATTR type, BOOL value);
+extern BOOL taskGetTtyAttr(int fd, tTTYATTR type);
+
+/*
+ * Manage list of control characters
+ */
+extern STATUS addSignalChar (int ch, int signo);
+extern STATUS removeSignalChar (int signo);
+
+/*
+ * Provides maintenance of per-task signal mask
+ */
+extern void defaultSignalHandler(int signo);
+
+extern STATUS setTaskSignalFlag (int tid, int signo, BOOL enable);
+extern BOOL isTaskSignalSet (int tid, int signo);
+extern uint32_t getTaskSignalMask (int tid);
+extern STATUS setTaskSignalMask (int tid, uint32_t sigMask);
+
+/*
+ * Quick check to see if a signal has been delivered to current task
+ */
+extern BOOL tty_signal(void);
+
+#endif
diff --git a/data/mnet/Common/cli/include/vxworks_cfg_chain.h b/data/mnet/Common/cli/include/vxworks_cfg_chain.h
new file mode 100644
index 0000000..55f8302
--- /dev/null
+++ b/data/mnet/Common/cli/include/vxworks_cfg_chain.h
@@ -0,0 +1,157 @@
+
+
+
+enum{
+ OTHER,
+ STARTUP_SCRIPT,
+ FLAGS,
+ TARGET_NAME,
+ FTP_PASSWD,
+ USER_NAME,
+ GATEWAY_IP,
+ HOST_IP,
+ BACK_IP,
+ ETHER_IP,
+ FILE_NAME,
+ HOST_NAME,
+ PROC_NUM,
+ UNIT_NUM,
+ BOOT_DEV,
+ EXIT_BOOT_MODE
+};
+
+/***********Boot change**********/
+
+EOLS (exec_bootparam_exit_eol,changeBootParams,EXIT_BOOT_MODE);
+KEYWORD (exec_bootparam_exit,exec_bootparam_exit_eol,no_alt,
+ "exit","Exit from boot param mode",PRIV_ROOT);
+
+EOLS (exec_bootparam_other_eol,changeBootParams,OTHER);
+STRING (exec_bootparam_other_string,exec_bootparam_other_eol,no_alt,OBJ(string,1),"Other");
+KEYWORD (exec_bootparam_other,exec_bootparam_other_string,exec_bootparam_exit,
+ "other","Other string used by applications",PRIV_ROOT);
+
+EOLS (exec_bootparam_script_name_eol,changeBootParams,STARTUP_SCRIPT);
+STRING (exec_bootparam_script_name,exec_bootparam_script_name_eol,no_alt,OBJ(string,1),"Script name");
+KEYWORD (exec_bootparam_script,exec_bootparam_script_name,exec_bootparam_other,
+ "startup_script","Start up script name with directory path",PRIV_ROOT);
+
+EOLS (exec_bootparam_flags_eol,changeBootParams,FLAGS);
+NUMBER (exec_bootparam_flags_number,exec_bootparam_flags_eol,no_alt,OBJ(int,1),0,100,"Flags");
+KEYWORD (exec_bootparam_flags,exec_bootparam_flags_number,exec_bootparam_script,
+ "flags","Flags (f)",PRIV_ROOT);
+
+
+EOLS (exec_bootparam_target_eol,changeBootParams,TARGET_NAME);
+STRING (exec_bootparam_target_name,exec_bootparam_target_eol,no_alt,OBJ(string,1),"Name");
+KEYWORD (exec_bootparam_target,exec_bootparam_target_name,exec_bootparam_flags,
+ "target_name","Target name (tn)",PRIV_ROOT);
+
+
+EOLS (exec_bootparam_ftp_passwd_eol,changeBootParams,FTP_PASSWD);
+STRING (exec_bootparam_ftp_passwd,exec_bootparam_ftp_passwd_eol,no_alt,OBJ(string,1),"Password");
+KEYWORD (exec_bootparam_ftp,exec_bootparam_ftp_passwd,exec_bootparam_target,
+ "ftp_password","Ftp password (pw)",PRIV_ROOT);
+
+EOLS (exec_bootparam_user_eol,changeBootParams,USER_NAME);
+STRING (exec_bootparam_user_name,exec_bootparam_user_eol,no_alt,OBJ(string,1),"Name");
+KEYWORD (exec_bootparam_user,exec_bootparam_user_name,exec_bootparam_ftp,
+ "user","User name",PRIV_ROOT);
+
+EOLS (exec_bootparam_gateway_inet_eol,changeBootParams,GATEWAY_IP);
+STRING (exec_bootparam_gateway_inet_ip,exec_bootparam_gateway_inet_eol,no_alt,OBJ(string,1),"Gateway inet (g)");
+KEYWORD (exec_bootparam_gateway_inet,exec_bootparam_gateway_inet_ip,exec_bootparam_user,
+ "gateway_inet","Gateway inet (g)",PRIV_ROOT);
+
+EOLS (exec_bootparam_host_inet_eol,changeBootParams,HOST_IP);
+STRING (exec_bootparam_host_inet_ip,exec_bootparam_host_inet_eol,no_alt,OBJ(string,1),"Host inet (h)");
+KEYWORD (exec_bootparam_host_inet,exec_bootparam_host_inet_ip,exec_bootparam_gateway_inet,
+ "host_inet","Host inet (h)",PRIV_ROOT);
+
+EOLS (exec_bootparam_inet_backplane_eol,changeBootParams,BACK_IP);
+STRING (exec_bootparam_inet_backplane_ip,exec_bootparam_inet_backplane_eol,no_alt,OBJ(string,1),"Inet on backplane (b)");
+KEYWORD (exec_bootparam_inet_backplane,exec_bootparam_inet_backplane_ip,exec_bootparam_host_inet,
+ "inet_on_backplane","Inet on backplane (b)",PRIV_ROOT);
+
+EOLS (exec_bootparam_inet_ethernet_eol,changeBootParams,ETHER_IP);
+STRING (exec_bootparam_inet_ethernet_ip,exec_bootparam_inet_ethernet_eol,no_alt,OBJ(string,1),"Inet on ethernet (e)");
+KEYWORD (exec_bootparam_inet_ethernet,exec_bootparam_inet_ethernet_ip,exec_bootparam_inet_backplane,
+ "inet_on_ethernet","Inet on ethernet (e)",PRIV_ROOT);
+
+EOLS (exec_boot_change_file_eol,changeBootParams,FILE_NAME);
+STRING (exec_bootparam_file_name,exec_boot_change_file_eol,no_alt,OBJ(string,1),"File name");
+KEYWORD (exec_bootparam_file,exec_bootparam_file_name,exec_bootparam_inet_ethernet,
+ "file_name","File name",PRIV_ROOT);
+
+EOLS (exec_boot_change_host_eol,changeBootParams,HOST_NAME);
+STRING (exec_bootparam_host_name,exec_boot_change_host_eol,no_alt,OBJ(string,1),"Host name");
+KEYWORD (exec_bootparam_host,exec_bootparam_host_name,exec_bootparam_file,
+ "host_name","Host name",PRIV_ROOT);
+
+EOLS (exec_boot_change_processor_eol,changeBootParams,PROC_NUM);
+NUMBER (exec_bootparam_processor_number,exec_boot_change_processor_eol,no_alt,OBJ(int,1),0,9,"Precessor number");
+KEYWORD (exec_bootparam_processor,exec_bootparam_processor_number,exec_bootparam_host,
+ "processor_number","Precessor number",PRIV_ROOT);
+
+EOLS (exec_bootparam_unit_eol,changeBootParams,UNIT_NUM);
+NUMBER (exec_bootparam_unit_number,exec_bootparam_unit_eol,no_alt,OBJ(int,1),0,9,"Unit number");
+KEYWORD (exec_bootparam_unit,exec_bootparam_unit_number,exec_bootparam_processor,
+ "unit_number","Unit number",PRIV_ROOT);
+
+EOLS (exec_bootparam_boot_device_eol,changeBootParams,BOOT_DEV);
+STRING (exec_bootparam_boot_device_name,exec_bootparam_boot_device_eol,no_alt,OBJ(string,1),"Device number");
+KEYWORD (exec_boot_change_boot_device,exec_bootparam_boot_device_name,exec_bootparam_unit,
+ "boot_device","Boot device",PRIV_ROOT);
+
+
+/*************** Boot change *********/
+
+/**************** Enable access to vxworks shell***************/
+EOLNS (cfg_vxsh_enable_eol,EnableVxsh);
+NVGENNS (cfg_vxsh_enable_nvgen,cfg_vxsh_enable_eol,EnableVxsh);
+KEYWORD (cfg_vxsh_enable,cfg_vxsh_enable_nvgen,no_alt,
+ "enable","Enable vxworks shell",PRIV_ROOT);
+
+KEYWORD (cfg_vxsh, cfg_vxsh_enable, no_alt,
+ "vxsh", "Enable vxworks shell", PRIV_ROOT | PRIV_HIDDEN);
+/************ Change password for existing user **********/
+EOLNS (cfg_change_passwd_eol,ChangePasswd);
+STRING (cfg_change_passwd_uname,cfg_change_passwd_eol,no_alt,OBJ(string ,1),"User name");
+NVGENNS (cfg_change_passwd_nvgen,cfg_change_passwd_uname,ChangePasswd);
+KEYWORD (cfg_change_passwd, cfg_change_passwd_nvgen, cfg_vxsh,
+ "change-passwd", "Change password for existing user", PRIV_ROOT);
+/******** Change boot parameters*****************/
+
+EOLNS (cfg_boot_change_eol,setBootParamsMode);
+NVGENNS (cfg_boot_change_nvgen,cfg_boot_change_eol,setBootParamsMode);
+KEYWORD (cfg_boot_change,cfg_boot_change_nvgen,cfg_change_passwd,
+ "boot-params","Change the boot parameters ",PRIV_ROOT);
+/******* Enable SSH access ***********/
+EOLNS (cfg_ssh_enable_eol, EnableSsh);
+NVGENNS (cfg_ssh_enable_nvgen,cfg_ssh_enable_eol,EnableSsh);
+KEYWORD (cfg_ssh_enable,cfg_ssh_enable_nvgen,no_alt,
+ "enable","Enable ssh",PRIV_ROOT);
+KEYWORD (cfg_ssh, cfg_ssh_enable, cfg_boot_change,
+ "ssh", "Enable SSH access", PRIV_ROOT );
+
+/******* Enable SSH access ***********/
+EOLNS (cfg_telnet_enable_eol, EnableTelnet);
+NVGENNS (cfg_telnet_enable_nvgen,cfg_telnet_enable_eol,EnableTelnet);
+KEYWORD (cfg_telnet_enable,cfg_telnet_enable_nvgen,no_alt,
+ "enable","Enable telnet",PRIV_ROOT);
+KEYWORD (cfg_telnet, cfg_telnet_enable, cfg_ssh,
+ "telnet", "Enable telnet access", PRIV_ROOT );
+
+
+
+/************* Add new system user ****************/
+
+EOLNS (cfg_user_name_eol, AddNewUser);
+NUMBER (cfg_user_name_level,cfg_user_name_eol,no_alt,OBJ(int,1),0,1,"User level(0 for super user and 1 for normal user,First user must be super user)");
+STRING (cfg_user_name_usrname,cfg_user_name_level,no_alt,OBJ(string,1),"User name");
+NVGENNS (cfg_user_name_usrname_nvgen,cfg_user_name_usrname,AddNewUser);
+KEYWORD (cfg_user_name, cfg_user_name_usrname_nvgen, cfg_telnet,
+ "username", "Add new system user", PRIV_ROOT);
+
+#undef ALTERNATE
+#define ALTERNATE cfg_user_name
diff --git a/data/mnet/Common/cli/include/vxworks_exec_chain.h b/data/mnet/Common/cli/include/vxworks_exec_chain.h
new file mode 100644
index 0000000..d425afd
--- /dev/null
+++ b/data/mnet/Common/cli/include/vxworks_exec_chain.h
@@ -0,0 +1,229 @@
+/************** Definitions ********************/
+#include "../include/macros.h"
+
+
+#define LongList 1
+#define NormalList 2
+extern BOOL vxsh_flag;
+
+ /*************** Definitions *********/
+
+
+keyword_options cli_month_options[] = {
+ {"january", "JANUARY", 1},
+ {"february", "FEBRUARY", 2},
+ {"march", "MARCH", 3},
+ {"april", "APRIL", 4},
+ {"may", "MAY", 5},
+ {"june", "JUNE", 6},
+ {"july", "JULY", 7},
+ {"august", "AUGUST", 8},
+ {"september", "SEPTEMBER", 9},
+ {"october", "OCTOBER", 10},
+ {"november", "NOVEMBER", 11},
+ {"december", "DECEMBER", 12},
+ { NULL, NULL, 0 }
+};
+
+
+keyword_options vxshell_options[]={
+ {"ldvxsh", "Load Vxworks shell",1 },
+ {"unldvxsh","Load Vxworks shell",2},
+ {"vxsh" ,"Invoke vxworks shell",3},
+ {NULL,NULL,0}
+};
+
+/*********************************/
+
+EOLNS(vxsh_command_string_eol,execVxshCommand);
+TEXT(vxsh_command_string,vxsh_command_string_eol,no_alt,OBJ(string,1),"Enter vxworks commands");
+/******************************* vxsh ************/
+EOLNS (exec_vxsh_eol, vxshCommand);
+STRING (exec_vxsh_string, exec_vxsh_eol, no_alt,OBJ(string,1), "file/env variable name");
+KEYWORD_ID (exec_vxsh_env, exec_vxsh_string, exec_vxsh_eol, OBJ(int,2), 2, "env","Environment variable",PRIV_ROOT);
+KEYWORD_ID (exec_vxsh_file, exec_vxsh_string, exec_vxsh_env,OBJ(int,2), 1, "file","File with directory path ", PRIV_ROOT);
+
+KEYWORD_OPTIONS (exec_vxsh, exec_vxsh_file,no_alt, vxshell_options,OBJ(int,1),PRIV_ROOT | PRIV_HIDDEN,0);
+
+ASSERT (exec_vxsh_option,exec_vxsh,no_alt,vxsh_flag);
+
+/******************/
+
+/************************ Load running configurations ****************************/
+EOLNS (exec_load_running_config_eol,loadRunning);
+KEYWORD (exec_load_running_config,exec_load_running_config_eol,exec_vxsh_option,
+ "load-runnning","Load running configurations", PRIV_ROOT);
+
+/************************ Save running configurations ****************************/
+EOLNS (exec_save_running_config_eol,saveRunning);
+KEYWORD (exec_save_running_config,exec_save_running_config_eol,exec_load_running_config,
+ "save-runnning","Save running configurations", PRIV_ROOT);
+
+/****************/
+/*****************/
+EOLNS (exec_print_file_eol,printFile);
+STRING (exec_print_file_name,exec_print_file_eol,no_alt,
+ OBJ(string,1),"Name of the file to be created");
+KEYWORD (exec_print_file,exec_print_file_name,exec_vxsh_option,
+ "print-file","Print the contents a file",PRIV_ROOT | PRIV_HIDDEN);
+
+/*********************/
+EOLNS (exec_create_eol,createFile);
+STRING (exec_create_file_name,exec_create_eol,no_alt,
+ OBJ(string,1),"Name of the file to be created");
+KEYWORD (exec_create_file,exec_create_file_name,exec_print_file,
+ "create-file","Create a file",PRIV_ROOT | PRIV_HIDDEN);
+
+/*************Set system clock ***********/
+EOLNS (cfg_clock_hour_min_secs_day_month_year_eol, ClockSet);
+NUMBER (cfg_clock_hour_min_secs_day_month_year,cfg_clock_hour_min_secs_day_month_year_eol,
+ no_alt,OBJ(int,6),2000,2050,"Year");
+KEYWORD_OPTIONS (cfg_clock_hour_min_secs_day_month, cfg_clock_hour_min_secs_day_month_year,
+ no_alt, cli_month_options, OBJ(int, 5),
+ PRIV_ROOT, 0);
+NUMBER (cfg_clock_hour_min_secs_day,cfg_clock_hour_min_secs_day_month,
+ cfg_clock_hour_min_secs_day_month_year_eol,OBJ(int,4),1,31,"Day of the month");
+NUMBER (cfg_clock_hour_min_secs,cfg_clock_hour_min_secs_day,no_alt,OBJ(int,3),0,59,"Seconds");
+
+NUMBER (cfg_clock_hour_min,cfg_clock_hour_min_secs,no_alt,OBJ(int,2),0,59,"Minutes");
+NUMBER (cfg_clock_hour,cfg_clock_hour_min,no_alt,OBJ(int,1),0,23,"Hour");
+KEYWORD (cfg_clock, cfg_clock_hour, exec_create_file,
+ "set-clock", "Configure clock", PRIV_ROOT);
+
+
+/*************Log out of shell ************/
+EOLNS (exec_logout_eol, Logout);
+KEYWORD (exec_logout, exec_logout_eol, cfg_clock,
+ "logout", "Log out of shell ", PRIV_ROOT | PRIV_HIDDEN);
+
+
+/************** Set an environment variable ***************/
+EOLNS (exec_setenv_eol, SetEnv);
+pdecl(exec_setenv_args_var_id);
+
+FUNC(exec_setenv_AcceptArg,exec_setenv_args_var_id, AcceptArg);
+
+STRING (exec_setenv_args_string,exec_setenv_AcceptArg,no_alt,OBJ(string,2),"String parameter(may be quoted)");
+KEYWORD_ID (exec_setenv_args_string_id, exec_setenv_args_string, exec_setenv_eol , OBJ(int,2), 3,
+ "string", "String parameter", PRIV_ROOT);
+
+STRING (exec_setenv_args_var,exec_setenv_AcceptArg,no_alt,OBJ(string,2),"variable name");
+KEYWORD_ID (exec_setenv_args_var_id, exec_setenv_args_var, exec_setenv_args_string_id, OBJ(int, 2),2,
+ "var", "Var parameter", PRIV_ROOT);
+
+STRING (exec_setenv_varname,exec_setenv_args_var_id,no_alt,OBJ(string,1),"Variable name");
+KEYWORD (exec_setenv, exec_setenv_varname, exec_logout,
+ "setenv", "Set an environment variable", PRIV_ROOT | PRIV_HIDDEN);
+
+/***********Invoke a function***********/
+
+EOLNS (exec_invoke_eol, Invoke);
+pdecl(exec_invoke_args_number_id);
+
+
+FUNC(exec_invoke_AcceptArg,exec_invoke_args_number_id, AcceptArg);
+
+
+STRING (exec_invoke_args_string,exec_invoke_AcceptArg,no_alt,OBJ(string,2),"String parameter(may be quoted)");
+KEYWORD_ID (exec_invoke_args_string_id, exec_invoke_args_string, exec_invoke_eol , OBJ(int,2), 3,
+ "string", "String parameter", PRIV_ROOT);
+
+STRING (exec_invoke_args_var,exec_invoke_AcceptArg,no_alt,OBJ(string,2),"Variable name");
+KEYWORD_ID (exec_invoke_args_var_id, exec_invoke_args_var, exec_invoke_args_string_id, OBJ(int, 2),2,
+ "var", "Variable parameter", PRIV_ROOT);
+
+NUMBER (exec_invoke_args_number,exec_invoke_AcceptArg,no_alt,OBJ(int,1),0,65256,"Int param value");
+KEYWORD_ID (exec_invoke_args_number_id, exec_invoke_args_number, exec_invoke_args_var_id, OBJ(int, 2),1,
+ "int", "Int parameter", PRIV_ROOT);
+
+STRING (exec_invoke_name,exec_invoke_args_number_id,no_alt,OBJ(string,1),"Function name");
+KEYWORD (exec_invoke, exec_invoke_name, exec_setenv,
+ "invoke", "Invoke a function ", PRIV_ROOT | PRIV_HIDDEN);
+
+/************** load an object module into memory ********************/
+EOLNS (exec_loadmodule_name_eol, LoadModule);
+STRING (exec_loadmodule_name,exec_loadmodule_name_eol,no_alt,OBJ(string,1),"Module name with correct directory path");
+KEYWORD (exec_loadmodule, exec_loadmodule_name, exec_invoke,
+ "load", "Load an object module into memory", PRIV_ROOT | PRIV_HIDDEN);
+
+
+/**************** Rename a file *************/
+EOLNS (exec_rename_command_eol, Rename);
+STRING (exec_rename_command_newfilename,exec_rename_command_eol,no_alt,OBJ(string,2),"New file name");
+STRING (exec_rename_command_filename,exec_rename_command_newfilename,no_alt,OBJ(string,1)," File name");
+KEYWORD (exec_rename_command, exec_rename_command_filename, exec_loadmodule,
+ "rename","Rename a file", PRIV_ROOT);
+
+/**************** copy a file *************/
+EOLNS (exec_copy_command_eol, Copy);
+STRING (exec_copy_command_destname,exec_copy_command_eol,no_alt,OBJ(string,2),"Destination file name");
+STRING (exec_copy_command_srcname,exec_copy_command_destname,no_alt,OBJ(string,1),"Source file name");
+KEYWORD (exec_copy_command, exec_copy_command_srcname, exec_rename_command,
+ "copy", "Copy a file", PRIV_ROOT);
+
+/**************** Delete a file *************/
+EOLNS (exec_delete_command_filename_eol, DeleteFile);
+STRING (exec_delete_command_filename,exec_delete_command_filename_eol,no_alt,OBJ(string,1),"Filename");
+KEYWORD (exec_delete_command, exec_delete_command_filename, exec_copy_command,
+ "delete", "Delete a file", PRIV_ROOT);
+
+/**************** Delete a directory *************/
+EOLNS (exec_rmdir_command_eol, RmDir);
+STRING (exec_rmdir_command_dirname,exec_rmdir_command_eol,no_alt,OBJ(string,1),"Directory name");
+KEYWORD (exec_rmdir_command, exec_rmdir_command_dirname, exec_delete_command,
+ "rmdir", "Delete a directory", PRIV_ROOT);
+
+/**************** Make a directory *************/
+EOLNS (exec_mkdir_command_eol, Mkdir);
+STRING (exec_mkdir_command_dirname,exec_mkdir_command_eol,no_alt,OBJ(string,1),"Directory name");
+KEYWORD (exec_mkdir_command, exec_mkdir_command_dirname, exec_rmdir_command,
+ "mkdir", "Make a directory", PRIV_ROOT);
+
+/**************** Reset network devices and transfer control to boot ROMs*************/
+EOLNS (exec_reload_command_eol, Reload);
+
+KEYWORD (exec_reload_command, exec_reload_command_eol, exec_mkdir_command,
+ "reload", "Reset network devices and transfer control to boot ROMs", PRIV_ROOT);
+
+
+/**************** Change directory *************/
+EOLNS (exec_cd_command_eol, ChangeDir);
+STRING (exec_cd_command_dirname,exec_cd_command_eol,no_alt,OBJ(string,1),"Directory name");
+KEYWORD (exec_cd_command, exec_cd_command_dirname, exec_reload_command,
+ "cd", "Change directory", PRIV_ROOT);
+
+
+/**************** List the contents of a directory ************/
+EOLS (exec_dir_command_eol, Dir,NormalList);
+
+EOLS (exec_dir_command_long_eol, Dir,LongList);
+
+KEYWORD (exec_long_list,exec_dir_command_long_eol,exec_dir_command_eol,"detail","Detailed listing of directory contents",PRIV_ROOT);
+STRING (exec_dirname,exec_long_list,exec_dir_command_eol,OBJ(string,1),"Directory name");
+KEYWORD (exec_dir_command, exec_dirname, exec_cd_command,
+ "dir", "List the contents of a directory", PRIV_ROOT);
+
+
+
+
+/*************Print the current default directory****************/
+EOLNS (exec_pwd_command_eol, Pwd);
+KEYWORD (exec_pwd_command, exec_pwd_command_eol, exec_dir_command,
+ "pwd", "Print the current working directory path", PRIV_ROOT);
+
+
+/*********** Test that a remote host is reachable ***********/
+EOLNS (exec_ping_command_eol, Ping);
+STRING(exec_ping_command_ipaddress,exec_ping_command_eol,no_alt,OBJ(string,1),"Ip address of host");
+KEYWORD (exec_test_command, exec_ping_command_ipaddress, exec_pwd_command,
+ "ping", "Test that a remote host is reachable", PRIV_ROOT);
+
+
+#undef ALTERNATE
+#define ALTERNATE exec_test_command
+
+
+
+
+
+
diff --git a/data/mnet/Common/cli/include/vxworks_show_chain.h b/data/mnet/Common/cli/include/vxworks_show_chain.h
new file mode 100644
index 0000000..8950ad7
--- /dev/null
+++ b/data/mnet/Common/cli/include/vxworks_show_chain.h
@@ -0,0 +1,145 @@
+
+
+/*************** definitions ******************/
+#define TASK_ALL 1
+#define TASK_GEN 2
+#define TASK_DETAIL 3
+#define TASK_SUMMARY 4
+#define NAME 5
+#define ALL 6
+#define SUMMARY 7
+#define DETAIL 8
+
+
+
+/******Shows the symbolic name of machine **********/
+EOLNS (show_host_eol,ShowHost);
+KEYWORD (show_host, show_host_eol, no_alt,"hostname", "Shows the symbolic name of machine", PRIV_MIN);
+
+
+/************** Shows environment variable *****************/
+
+EOLNS (show_env_name_eol,ShowEnv);
+STRING (show_env_name,show_env_name_eol,no_alt,OBJ(string,1),"Variable name");
+KEYWORD (show_env, show_env_name, show_host,"env", "Shows environment variable ", PRIV_MIN | PRIV_HIDDEN);
+
+/*****************look up a symbol by name******************/
+
+EOLS (show_symbol_name_eol,Show_Symbol,NAME);
+STRING (show_symbol_name,show_symbol_name_eol,no_alt,
+ OBJ(string,1),"Symbol name");
+KEYWORD (show_symbol, show_symbol_name,show_env,
+ "symbol", "Look up a symbol by name", PRIV_MIN | PRIV_HIDDEN);
+
+
+
+/***************** Shows the current status for loaded modules ******************/
+EOLS (show_module_name_all,Show_Module,ALL);
+
+EOLS (show_module_name_eol,Show_Module,NAME);
+STRING (show_module_name,show_module_name_eol,show_module_name_all,
+ OBJ(string,1),"Module name with correct directory path");
+KEYWORD (show_module, show_module_name,show_symbol,
+ "module", "Shows the current status for loaded modules ", PRIV_MIN);
+
+
+/************* Shows task information from Task control block *********/
+EOLS (show_task_all_eol,Show_Task,TASK_ALL);
+
+EOLS(show_tasks_general,Show_Task,TASK_GEN);
+
+EOLS (show_tasks_detail_eol,Show_Task,TASK_DETAIL);
+KEYWORD (show_tasks_detail,show_tasks_detail_eol,show_tasks_general,
+ "detail","Displays the task details",PRIV_MIN);
+
+EOLS (show_tasks_summary_eol, Show_Task,TASK_SUMMARY);
+KEYWORD (show_tasks_option,show_tasks_summary_eol,show_tasks_detail,
+ "summary","Displays task summary",PRIV_ROOT);
+
+HEXNUM (show_tasks_tid,show_tasks_option,show_task_all_eol,OBJ(int,1),"Task ID");
+KEYWORD (show_tasks, show_tasks_tid,show_module,
+ "task", "Shows task information from Task control block ", PRIV_MIN);
+
+
+/************* Shows a stack trace of a task *********/
+EOLNS (show_stack_trace_eol, Show_Stack_Trace);
+HEXNUM (show_stack_trace_tid,show_stack_trace_eol,no_alt,OBJ(int,1),"Task ID");
+KEYWORD (show_stack_trace, show_stack_trace_tid,show_tasks,
+ "stack", " Shows a stack trace of a task ", PRIV_MIN);
+
+
+/************* Shows list of system drivers *********/
+EOLNS (show_drivers_eol, Show_Drivers);
+KEYWORD (show_drivers, show_drivers_eol,show_stack_trace,
+ "drivers", " Shows list of system drivers", PRIV_MIN);
+
+/********Shows the list of devices in the system ****************/
+
+EOLNS (show_devices_eol, Show_Devices);
+KEYWORD (show_devices, show_devices_eol,show_drivers,
+ "devices", "Displays devices", PRIV_MIN);
+
+/************** Shows list of file descriptor names in the system**************/
+EOLNS (show_fd_eol, Show_Fd);
+KEYWORD (show_fd, show_fd_eol, show_devices,
+ "fd", "Shows list of file descriptor names in the system", PRIV_MIN);
+
+
+
+/************** Show ip **************/
+EOLNS (show_ip_route_eol,Show_ip_Route);
+KEYWORD (show_ip_route, show_ip_route_eol,no_alt,
+ "route", "Displays ip route", PRIV_MIN);
+
+EOLNS (show_ip_traffic_eol,Show_ip_Traffic);
+KEYWORD (show_ip_traffic, show_ip_traffic_eol, show_ip_route,
+ "traffic", "Displays ip traffic", PRIV_MIN);
+
+
+KEYWORD (show_ip, show_ip_traffic, show_fd,
+ "ip", "Shows ip route / traffic", PRIV_MIN);
+
+
+/************** Shows the attached network interfaces **************/
+EOLNS (show_interfaces_eol, Show_Interfaces);
+KEYWORD (show_interfaces, show_interfaces_eol, show_ip,
+ "interfaces", "Shows list of gp10 interfaces", PRIV_MIN);
+
+
+/************** Show users **************/
+EOLNS (show_users_eol, Show_Users);
+KEYWORD (show_users, show_users_eol, show_interfaces,
+ "users", "Shows list of system users", PRIV_MIN | PRIV_HIDDEN);
+
+
+/************** Show arp **************/
+EOLNS (show_arp_eol, Show_Arp);
+
+KEYWORD (show_arp, show_arp_eol, show_users,
+ "arp", "Shows entries in the system ARP table", PRIV_MIN);
+
+
+/******************* Show Clock ***************/
+EOLNS (show_clock_eol, Show_Clock);
+
+KEYWORD (show_clock, show_clock_eol, show_arp,
+ "clock", "Shows system clock", PRIV_MIN);
+
+
+
+/******************* Show memory ***************/
+EOLS (show_memory_detail_eols, Show_Memory,DETAIL);
+EOLS (show_memory_summary_eols,Show_Memory,SUMMARY);
+KEYWORD (show_memory_detail ,show_memory_detail_eols,no_alt,
+ "detail", "Shows system memory in detail", PRIV_MIN);
+KEYWORD (show_memory_summary,show_memory_summary_eols,show_memory_detail,
+ "summary", "Shows summary of system memory", PRIV_MIN);
+KEYWORD (show_memory, show_memory_summary, show_clock,
+ "memory", "Shows system memory partition blocks and statistics", PRIV_MIN);
+
+
+
+
+
+#undef ALTERNATE
+#define ALTERNATE show_memory
diff --git a/data/mnet/Common/cli/src/Makefile b/data/mnet/Common/cli/src/Makefile
new file mode 100644
index 0000000..32d915e
--- /dev/null
+++ b/data/mnet/Common/cli/src/Makefile
@@ -0,0 +1,63 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+# Name of this App's Directory
+THIS_APP_DIR = cli
+
+VOB2DIR = $(TOP_OF_VOB)\..\$(VOB)
+BINDIR = ..\bin
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\cli_com.out
+else
+ MY_OUTPUT = $(OBJDIR)\snmp_com.out
+endif
+
+
+include $(VOB2DIR)\l3defs.mk
+
+CC_INCLUDE += -I$(VOB2DIR)\Host
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) -r -o $@.tmp $(MODULE_OBJS)
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
diff --git a/data/mnet/Common/cli/src/basic_exec_chain.c b/data/mnet/Common/cli/src/basic_exec_chain.c
new file mode 100644
index 0000000..a3da367
--- /dev/null
+++ b/data/mnet/Common/cli/src/basic_exec_chain.c
@@ -0,0 +1,733 @@
+
+
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <stdio.h>
+#include <tyLib.h>
+#include <taskLib.h>
+#include <errnoLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <msgQLib.h>
+#include <sigLib.h>
+#include <usrLib.h>
+#include <rebootLib.h>
+#include <pingLib.h>
+#include <symLib.h>
+#include <dirent.h>
+#include <stat.h>
+
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+#include <../include/parser_sim.h>
+#include <../include/parser.h>
+#include <../include/parser_defs_exec.h>
+#include <../include/parser_input.h>
+#include <../include/parser_sim.h>
+#include <../include/parser_util.h>
+#include <../include/parser_commands.h>
+#include <../include/nv.h>
+#include <../include/parser_errno.h>
+#include <../include/parser_ModNum.h>
+#include <../include/defs.h>
+#include <../include/parser_init.h>
+#include <../include/macros.h>
+#include <../include/parser_actions.h>
+
+#define maxMessages 100
+BOOL ServerBreak;
+BOOL vxsh_flag=FALSE;
+BOOL load_running_config=FALSE;
+int backInFd;
+extern boolean doneAuth;
+
+/* Global Variables */
+
+static int num_of_args; /* To keep track of number of arguments entered by the user */
+
+
+#define ALTERNATE NONE
+#include "../include/vxworks_exec_chain.h"
+LINK_POINT(basic_exec_command, ALTERNATE);
+#undef ALTERNATE
+
+
+
+
+static parser_extension_request exec_chain_init_table[] = {
+ {PARSE_ADD_EXEC_CMD, &pname(basic_exec_command)},
+ {PARSE_ADD_VXSH_CHAIN, &pname(vxsh_command_string)},
+ {PARSE_LIST_END, NULL}
+};
+
+void init_vxsh_submode (void)
+{
+ parser_add_mode("vxsh", "vxsh",
+ "VXworks shell", TRUE, TRUE, "configure",
+ NULL, NULL, &pname(vxsh_command_string),NULL);
+}
+
+void ExecParserInit(void)
+{
+ parser_add_command_list(exec_chain_init_table, "basic exec commands");
+ init_vxsh_submode();
+
+}
+
+
+/**************************** Call back functions ***********************/
+
+/*** Test that a remote host is reachable ***/
+void Ping(parseinfo *csb){
+ ping(GETOBJ(string,1),1,0);
+}
+
+/****Print the current default directory ***/
+void Pwd(parseinfo *csb){
+ char buffer[512];
+ pwd();
+
+}
+/**** List the contents of a directory ***/
+void Dir(parseinfo *csb){
+
+ switch(csb->which){
+ case LongList:
+ if(strlen(GETOBJ(string,1)))
+ ls(GETOBJ(string,1),1);
+ else
+ ls(0,1);
+ break;
+ case NormalList:
+ if(strlen(GETOBJ(string,1)))
+ ls(GETOBJ(string,1),0);
+ else
+ ls(0,0);
+ break;
+ }
+
+}
+
+/*********** Change directory ********/
+void ChangeDir(parseinfo *csb){
+ struct stat fileStat;
+
+ stat (GETOBJ(string,1), &fileStat);
+ if (!S_ISDIR (fileStat.st_mode)){
+ printf ("%s No such directory exists\n", GETOBJ(string,1));
+ return;
+ }else
+ cd(GETOBJ(string,1));
+
+}
+
+/**** Make a directory **************/
+void Mkdir(parseinfo *csb){
+ mkdir(GETOBJ(string,1));
+}
+
+/**Reset network devices and transfer control to boot ROMs **/
+void Reload(parseinfo *csb){
+ char c;
+ printf("Do you want to reboot the system : [yes/no] ");
+ read(STD_IN,&c,1);
+ write(STD_OUT,"\n",1);
+ if(c!='y')
+ return;
+ else
+ write(STD_OUT,"System is rebooting\n",strlen("\nSystem is rebooting\n"));
+ taskDelay (sysClkRateGet ()*2);
+ reboot(0x04);
+}
+
+
+/**** Delete a directory ****/
+void RmDir(parseinfo *csb){
+ struct stat fileStat;
+
+ stat (GETOBJ(string,1), &fileStat);
+ if (!S_ISDIR (fileStat.st_mode)){
+ printf ("%s No such directory exists\n", GETOBJ(string,1));
+ return;
+ }
+ if(rmdir(GETOBJ(string,1)))
+ printf("\nDirectory is not empty .Could not be deleted\n");
+
+}
+
+/******* Delete a file ******/
+void DeleteFile(parseinfo *csb){
+ struct stat fileStat;
+
+ stat (GETOBJ(string,1), &fileStat);
+ if (S_ISDIR (fileStat.st_mode)){
+ printf ("%s is not a file\n", GETOBJ(string,1));
+ return;
+ }
+ if(rm(GETOBJ(string,1)))
+ printf("\nFile could not be deleted\n");
+
+}
+
+/******** copy a file *****/
+void Copy(parseinfo *csb) {
+ copy(GETOBJ(string,1),GETOBJ(string,2));
+}
+
+/****** Rename a file *******/
+void Rename(parseinfo *csb){
+ copy(GETOBJ(string,1),GETOBJ(string,2));
+ rm(GETOBJ(string,1));
+}
+
+/*** load an object module into memory ***/
+void LoadModule(parseinfo *csb){
+ ld(0,0,GETOBJ(string,1));
+
+}
+
+
+
+struct {
+ int type;
+ union {
+ int i;
+ char s[256];
+ }value;
+} argv[3];
+
+
+/*********** Invoke a function ***********/
+extern void *sysSymTbl;
+
+void Invoke(parseinfo *csb){
+
+ int (*f)();
+ char command[256];
+ SYM_TYPE type;
+ STATUS s;
+ f=0;
+
+#ifdef MNET_GP10
+ strcpy(command,GETOBJ(string,1));
+
+#else
+ strcpy(command,"_");
+ strcat(command,GETOBJ(string,1));
+#endif
+
+
+
+ s= symFindByName(sysSymTbl, command, (char **) &f, &type);
+ if((s == OK) && (f!=0) ){
+ switch(num_of_args)
+ {
+ case 0: (*f)(); break;
+ case 1:{
+
+ if(argv[0].type==0)(*f)(argv[0].value.i);
+ else (*f)(argv[0].value.s);
+ break;
+ }
+ case 2:{
+ switch(2*argv[0].type+argv[1].type){
+ case 0:(*f)(argv[0].value.i, argv[1].value.i); break;
+ case 1:(*f)(argv[0].value.i, argv[1].value.s); break;
+ case 2:(*f)(argv[0].value.s, argv[1].value.i); break;
+ case 3:(*f)(argv[0].value.s, argv[1].value.s); break;
+ }
+ break;
+ }
+ case 3:{
+ switch((4*argv[0].type+2*argv[1].type+argv[2].type)){
+ case 0:(*f)(argv[0].value.i, argv[1].value.i, argv[2].value.i); break;
+ case 1:(*f)(argv[0].value.i, argv[1].value.i, argv[2].value.s); break;
+ case 2:(*f)(argv[0].value.i, argv[1].value.s, argv[2].value.i); break;
+ case 3:(*f)(argv[0].value.i, argv[1].value.s, argv[2].value.s); break;
+ case 4:(*f)(argv[0].value.s, argv[1].value.i, argv[2].value.i); break;
+ case 5:(*f)(argv[0].value.s, argv[1].value.i, argv[2].value.s); break;
+ case 6:(*f)(argv[0].value.s, argv[1].value.s, argv[2].value.i); break;
+ case 7:(*f)(argv[0].value.s, argv[1].value.s, argv[2].value.s); break;
+ }
+ break;
+ }
+ default:printf("\nargc = %d\n",num_of_args); printf(" can not invoke functions with more parameters\n");
+ }
+ }else
+ printf("\nsymbol could not be found\n");
+ num_of_args=0;
+ return;
+}
+
+/************* Function to accept parameters from command line *********/
+void AcceptArg(parseinfo *csb){
+
+
+ if(num_of_args < 3) {
+ switch(GETOBJ(int,2))
+ {
+ case 1: {
+
+ argv[num_of_args].type=0;
+ argv[num_of_args].value.i= GETOBJ(int,1);
+ break;
+ }
+ case 2: {
+
+ argv[num_of_args].type=1;
+ strcpy((char *)argv[num_of_args].value.s, getenv(GETOBJ(string,2)));
+ break;
+ }
+ case 3: {
+
+ argv[num_of_args].type=1;
+ strcpy((char *)argv[num_of_args].value.s,(char*)GETOBJ(string,2));
+ break;
+ }
+ default :
+ printf(" unknown param\n");
+ }
+ num_of_args++;
+
+ }
+}
+
+
+
+/******** Set an environment variable *****/
+void SetEnv(parseinfo *csb){
+
+ char variable[1024];
+ int i;
+
+ strcpy(variable,GETOBJ(string,1));
+ strcat(variable,"=");
+ for(i=0;i<num_of_args;i++)
+ strcat(variable, argv[i].value.s);
+
+ num_of_args=0;
+
+ putenv(variable);
+
+}
+
+
+
+
+/***** Log out of shell ****/
+void Logout(parseinfo *csb){
+
+ if(ShellTask==ConsoleTask){
+ doneAuth = FALSE;
+ return;
+ }
+ if (ShellTask==TelnetTask || ShellTask == SSHTask)
+ ServerBreak=TRUE;
+ if(cli_logoutf)
+ (*cli_logoutf)(cli_logVar);
+ else
+ printf("\nLogout routine could not be found\n");
+}
+void logoutTask(void){
+
+ if(cli_logoutf)
+ (*cli_logoutf)(cli_logVar);
+
+}
+int shellTerminateCurrentSession(void){
+ int retVal=1;
+
+ if( ShellTask == ConsoleTask ){
+ doneAuth = FALSE;
+ return 0;
+ }
+ if ( ShellTask == TelnetTask || ShellTask == SSHTask){
+ ServerBreak=TRUE;
+
+ if(taskSpawn("tlogoutTask", 150, 0, 10000,(FUNCPTR)logoutTask,0,0,0,0,0,0,0,0,0,0)==ERROR)
+ retVal=1;
+ else
+ retVal=0;
+
+ }
+
+ do
+ taskDelay (sysClkRateGet ());
+ while (taskNameToId ("tlogoutTask") != ERROR);
+
+
+ return retVal;
+}
+
+
+#ifdef MNET_GMC
+ extern void rtc_write( const struct tm *);
+#endif
+
+/********* Clock set *********/
+void ClockSet(parseinfo *csb){
+
+ struct timespec tp;
+ char timeBuffer[128];
+
+ struct tm cli_gmtime;
+ clock_gettime(CLOCK_REALTIME,&tp);
+
+ if(gmtime_r( &(tp.tv_sec),&cli_gmtime )!=OK){
+ printf("\nCould not get the time\n");
+ return;
+ }
+ cli_gmtime.tm_hour=GETOBJ(int,1);
+ cli_gmtime.tm_min=GETOBJ(int,2);
+ cli_gmtime.tm_sec=GETOBJ(int,3);
+ if(GETOBJ(int,4)!=0){
+ cli_gmtime.tm_mday=GETOBJ(int,4);
+ cli_gmtime.tm_mon=GETOBJ(int,5)-1;
+ cli_gmtime.tm_year=GETOBJ(int,6)-1900;
+ cli_gmtime.tm_isdst=0;
+ }
+
+#ifdef MNET_GMC
+ rtc_write(&cli_gmtime);
+#endif
+
+ tp.tv_sec=mktime(&cli_gmtime);
+ tp.tv_nsec=0;
+ clock_settime(CLOCK_REALTIME,&tp);
+
+
+}
+
+extern FUNCPTR cli_logoutf;
+extern int cli_logVar;
+
+
+
+/*******************************/
+int vxpipe;
+int ptydev_m;
+MSG_Q_ID vxshQueueID;
+int workerTaskID;
+
+
+int readLine(int inFd,char* buffer){
+ char c;
+ int ret,i=0;
+ while(1){
+ ret = read(inFd, &c, 1);
+ if ( ret != 1 ) {buffer[i]='\0';return -1;}
+
+ if(c == '\n') { buffer[i]='\0'; return i; }
+ buffer[i++]=c;
+ }
+}
+void workTask(void){
+ char msg[PARSEBUF];
+ int msgLen;
+ STATUS (*myExecute)(char *);
+
+ myExecute=(FUNCPTR)shellGetVxExecute();
+
+ while(1){
+ msgLen = msgQReceive(vxshQueueID,msg,PARSEBUF, WAIT_FOREVER );
+ if(strlen(msg)!=0){
+ if(strcmp(msg,"exit")==0){
+ msgQDelete (vxshQueueID);
+ return;
+ }
+ msg[msgLen]=0;
+ (*myExecute)(msg);
+ }
+ }
+
+}
+void createWorkerTask(void){
+
+ vxshQueueID = msgQCreate( maxMessages, PARSEBUF, MSG_Q_FIFO);
+ if ( vxshQueueID == NULL ) {
+ printf("Cannot create callback message queue for vxshell\n");
+ return;
+ }
+ workerTaskID=taskSpawn("vxshWorkerTask",140, PARSER_TASK_OPTION, PARSER_TASK_STACK_SIZE,
+ (FUNCPTR)workTask, 0,0,0,0,0,0,0,0,0,0);
+
+}
+
+void cleanupWorkerTask(void){
+ if((workerTaskID=taskNameToId ("vxshWorkerTask") )!= ERROR){
+ taskDelete(workerTaskID);
+ }
+ msgQDelete (vxshQueueID);
+}
+
+void execVxShellScript
+ (
+ char *fileName
+ )
+ {
+ int old;
+ int newStdIn;
+ char command[PARSEBUF];
+ BOOL ret=FALSE;
+
+ newStdIn = open (fileName, O_RDONLY, 0);
+ if(newStdIn <0){
+ printf("\nCould not execute the script\n");
+ return;
+ }
+ createWorkerTask();
+ command[0]=0;
+ ret=readLine( newStdIn,command);
+ while( ret != -1 && strcmp(command,"exit") ){
+ if(strlen(command)!=0)
+ if(msgQSend(vxshQueueID,command,strlen(command),WAIT_FOREVER, MSG_PRI_NORMAL)==ERROR){
+ printf("\n Command could not be sent to the queue\n");
+ cleanupWorkerTask();
+ return;
+ }
+ command[0]=0;
+ ret=readLine( newStdIn,command);
+
+ }
+ msgQSend(vxshQueueID,"exit",strlen("exit"),WAIT_FOREVER, MSG_PRI_NORMAL);
+ close(newStdIn);
+
+ }
+
+
+
+void vxshCommand(parseinfo *csb){
+ int ret=-1;
+ int oldTaskInFd,oldTaskOutFd,oldGlobalInFd,oldGlobalOutFd;
+ switch(GETOBJ(int,1)){
+
+ case 1 : /*load vxshell */
+ if(!GETOBJ(int,2)){
+ printf("\nCould not load vxworks shell\n");
+ break;
+ }
+ if(GETOBJ(int,2)==1)
+ ret=shellLoadVxShell(GETOBJ(string,1));
+ else if(GETOBJ(int,2)==2)
+ ret=shellLoadVxShell(getenv(GETOBJ(string,1)));
+
+ if(!ret)
+ printf("\nCould not load vxworks shell\n");
+ else
+ installedVxShell=1;
+
+ break;
+
+ case 2 : /* unolad vxshell */
+ installedVxShell=0;
+ break;
+
+ case 3 : /* vxshell */
+
+ if(!isInstalledVxShell()){
+ printf("Vx Shell not installed\n");
+ return;
+ }
+ if(!vxsh_flag){
+ return;
+ }
+
+ if(GETOBJ(int,2)==NULL){
+ createWorkerTask();
+ set_mode_byname(&csb->mode,"vxsh",MODE_VERBOSE);
+ break;
+ }
+
+ oldGlobalOutFd = ioGlobalStdGet(STD_OUT);
+ oldGlobalInFd = ioGlobalStdGet(STD_IN);
+ oldTaskOutFd = ioTaskStdGet(0,STD_OUT);
+ oldTaskInFd = ioTaskStdGet(0,STD_IN);
+
+ if(GETOBJ(int,2)==1)
+ execVxShellScript(GETOBJ(string,1));
+ else
+ execVxShellScript(getenv(GETOBJ(string,1)));
+
+ do
+ taskDelay (sysClkRateGet ());
+ while (taskNameToId ("vxshWorkerTask") != ERROR);
+
+ ioGlobalStdSet(STD_OUT,oldGlobalOutFd);
+ ioGlobalStdSet(STD_IN,oldGlobalInFd);
+ ioTaskStdSet(0,STD_OUT,oldTaskOutFd);
+ ioTaskStdSet(0,STD_IN,oldTaskInFd);
+
+
+ break;
+ }
+}
+void execVxshCommand(parseinfo *csb){
+ int msgLen;
+ BOOL ret=FALSE;
+ STATUS (*myExecute)(char *);
+
+ myExecute=(FUNCPTR)shellGetVxExecute();
+
+ if(!GETOBJ(string,1)){
+ printf("\nCommand input error\n");
+ return;
+ }
+ if((msgLen=strlen(GETOBJ(string,1)))==0)
+ return;
+
+ if(strcmp(GETOBJ(string,1),"exit")==0){
+ cleanupWorkerTask();
+ csb->mode = exec_mode;
+ return;
+ }
+
+ if(msgQSend(vxshQueueID,GETOBJ(string,1),msgLen,WAIT_FOREVER, MSG_PRI_NORMAL)==ERROR){
+ printf("\n Command could not be sent to the queue\n");
+ return;
+ }
+
+}
+
+void createFile(parseinfo *csb){
+
+ struct stat fileStat;
+ char c;
+ BOOL create_flag=FALSE;
+
+ if(stat (GETOBJ(string,1), &fileStat)==ERROR){
+ create_flag=TRUE;
+ }else{
+ if (S_ISDIR (fileStat.st_mode))
+ create_flag=TRUE;
+ }
+
+ if(!create_flag){
+ printf("This file already exists.Do you want to overwrite [yes/no] ");
+ read(STD_IN,&c,1);
+ write(STD_OUT,"\n",1);
+ if(c!='y')
+ return;
+ }
+
+ if(GETOBJ(string,1)){
+ if(creat(GETOBJ(string,1),O_RDWR) == ERROR)
+ printf("\n File %s could not be created\n",GETOBJ(string,1));
+ else
+ printf("\n File %s created\n",GETOBJ(string,1));
+
+ }
+
+}
+
+void printFile(parseinfo *csb){
+
+ char c;
+ int ret,i=0;
+ int fileFd;
+
+ if(GETOBJ(string,1) == NULL){
+ printf("\n File could not be opend\n");
+ return;
+ }
+
+ fileFd = open(GETOBJ(string,1), O_RDONLY,0);
+ if(fileFd == -1){
+ printf("\n File %s could not be opend\n",GETOBJ(string,1));
+ return;
+ }
+
+ while(1){
+ ret = read(fileFd, &c, 1);
+ if ( ret <= 0 ) return;
+ write(STD_OUT,&c,1);
+ }
+
+
+
+}
+
+/******** Load and save configuration ************/
+
+void saveRunning (parseinfo *csb)
+{
+ parseinfo *nvcsb;
+ char filePath[128];
+ int fileFd,backTaskFd,backGlobalFd;
+
+#ifdef MNET_GP10
+ strcpy(filePath,getenv("VIPERCALL_BASE"));
+#else
+ strcpy(filePath,getenv("MNET_BASE"));
+#endif
+ printf("\n %s\n",filePath);
+ strcat(filePath,"/vx/configfile");
+ printf("\n %s\n",filePath);
+
+ fileFd = open (filePath, O_WRONLY | O_CREAT, 0644);
+ if (fileFd == -1)
+ {
+ printf("\n Could not open the file \n");
+ return;
+ }
+
+ nvcsb = get_csb("NV parser CSB");
+ if (csb == NULL) {
+ printf(nomemory);
+ return;
+ }
+ printf("\nBuilding configuration...\n");
+ nvcsb->nvgen = TRUE;
+ nvcsb->sense = TRUE;
+
+
+
+ backTaskFd = ioTaskStdGet (0,STD_OUT);
+ backGlobalFd = ioGlobalStdGet(STD_OUT);
+
+ ioGlobalStdSet(STD_OUT,fileFd);
+ ioTaskStdSet (0,STD_OUT,fileFd);
+
+ nvcsb->priv = PRIV_MAX;
+ nvcsb->priv_set = 0xf;
+ nvcsb->mode = config_mode;
+ push_node(nvcsb, get_mode_nv(nvcsb));
+ parse_token(nvcsb);
+ free_csb(&nvcsb);
+
+ ioGlobalStdSet(STD_OUT,backGlobalFd);
+ ioTaskStdSet (0,STD_OUT,backTaskFd);
+ close(fileFd);
+ }
+void loadRunning( parseinfo *csb ){
+ int fileFd;
+ char filePath[128];
+
+
+#ifdef MNET_GP10
+ strcpy(filePath,getenv("VIPERCALL_BASE"));
+#else
+ strcpy(filePath,getenv("MNET_BASE"));
+#endif
+ strcat(filePath,"/vx/configfile");
+
+ if((fileFd = open (filePath, O_RDONLY,0644))==-1){
+ printf("\nConfig file could not be opend\n");
+ return;
+ }
+ backInFd= csb->inFd;
+ csb->inFd=fileFd;
+ csb->mode=config_mode;
+ load_running_config=TRUE;
+
+}
diff --git a/data/mnet/Common/cli/src/cfg_chain.c b/data/mnet/Common/cli/src/cfg_chain.c
new file mode 100644
index 0000000..6106ce6
--- /dev/null
+++ b/data/mnet/Common/cli/src/cfg_chain.c
@@ -0,0 +1,360 @@
+
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <tyLib.h>
+#include <taskLib.h>
+#include <errnoLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <msgQLib.h>
+#include <sigLib.h>
+#include <usrLib.h>
+#include <bootLib.h>
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+#include <../include/parser_sim.h>
+#include <../include/parser.h>
+#include <../include/parser_defs_exec.h>
+#include <../include/parser_input.h>
+#include <../include/parser_sim.h>
+#include <../include/parser_util.h>
+#include <../include/parser_commands.h>
+#include <../include/nv.h>
+#include <../include/parser_errno.h>
+#include <../include/parser_ModNum.h>
+#include <../include/defs.h>
+#include <../include/parser_init.h>
+#include <../include/macros.h>
+#include <../include/parser_actions.h>
+
+
+#ifdef MNET_GP10
+#define BOOT_LINE_OFFSET 0x4200
+#else
+#define BOOT_LINE_OFFSET 0x1200
+#endif
+
+#define LOCAL_MEM_LOCAL_ADRS 0x00000000
+#define BOOT_LINE_ADRS ((char *) (LOCAL_MEM_LOCAL_ADRS+BOOT_LINE_OFFSET))
+
+static BOOT_PARAMS pBootParams;
+
+
+
+extern void ShowParserInit(void);
+extern void ExecParserInit(void);
+int sysUserGetUserLevelByName (char*);
+extern char current_user[];
+
+
+#define ALTERNATE NONE
+#include "../include/vxworks_cfg_chain.h"
+LINK_POINT(basic_cfg_command, ALTERNATE);
+#undef ALTERNATE
+
+
+static parser_mode *config_boot;
+static parser_extension_request basic_chain_init_table[] = {
+ {PARSE_ADD_CFG_TOP_CMD, &pname(basic_cfg_command)},
+ {PARSE_ADD_BOOT_PARAM, &pname(exec_boot_change_boot_device)},
+ {PARSE_LIST_END, NULL}
+};
+
+static void cli_submode_nvgen (parseinfo *csb,parser_mode *mode)
+{
+ parseinfo *nvcsb;
+
+ nvcsb = get_csb("NV parser CSB");
+ if (csb == NULL) {
+ printf(nomemory);
+ return;
+ }
+ nvcsb->nvgen = TRUE;
+ nvcsb->sense = TRUE;
+ nvcsb->priv = PRIV_MAX;
+ nvcsb->priv_set = 0xf;
+ nvcsb->mode = mode;
+ push_node(nvcsb, get_mode_nv(nvcsb));
+ parse_token(nvcsb);
+ free_csb(&nvcsb);
+}
+
+void init_boot_submode (void)
+{
+ config_boot=parser_add_mode("boot-params", "boot-params",
+ "boot Parameters", TRUE, TRUE, "configure",
+ NULL, NULL, &pname(exec_boot_change_boot_device),NULL);
+
+}
+
+
+extern void init_boot_submode(void);
+void BasicParserInit(void)
+{
+ parser_add_command_list(basic_chain_init_table, "basic commands");
+ ShowParserInit();
+ ExecParserInit();
+ init_boot_submode();
+
+}
+
+/********* Call back functions ****************/
+
+
+
+/******** Set host name ***************/
+void HostName(parseinfo *csb){
+ sethostname(GETOBJ(string,1),strlen(GETOBJ(string,1)));
+}
+
+
+/**************** Add new system user *************/
+void AddNewUser(parseinfo *csb){
+ char password[128];
+ char confirm_password[128];
+ STATUS retstat=ERROR;
+
+ if(csb->nvgen)
+ return;
+
+ if(sysUserGetUserLevelByName(current_user)!=0){
+ printf("\nRoot privillege required for this operation\n");
+ return;
+ }
+
+ if(csb->sense){
+ printf("Enter the password with minimum 8 characters\n");
+ if(getInput( STD_OUT,STD_IN,"password :", password, 127, TRUE )==FALSE){
+ printf("\n Could not read password \n");
+ return;
+ }
+ if(getInput( STD_OUT,STD_IN,"\nconfirm password :", confirm_password, 127, TRUE )==FALSE){
+ printf("\nCould not read password \n");
+ return;
+ }
+ if(strcmp(password,confirm_password)!=0)
+ {
+ printf("\nPasswords do not match\n");
+ return;
+ }
+ retstat=sysUserAdd(GETOBJ(string,1),(char*)password,GETOBJ(int,1));
+ if(retstat==ERROR)
+ printf("\nUser could not be added\n");
+ else
+ printf("\nAdded user successfully\n");
+
+ }else{
+ retstat=sysUserDelete(GETOBJ(string,1));
+ if(retstat==ERROR)
+ printf("\nUser %s could not be deleted \n", GETOBJ(string,1));
+ else
+ printf("\nDeleted user successfully\n");
+
+ }
+
+}
+
+/**********Enable SSH access *********/
+extern BOOL ssh_enable_flag;
+extern BOOL telnet_enable_flag;
+extern BOOL ssh_present;
+
+void EnableSsh(parseinfo *csb){
+ if(csb->nvgen){
+ if(ssh_enable_flag)
+ printf("\nssh enable\n");
+ return ;
+ }
+ if(!ssh_present){
+ printf("\nSSH is not supported\n");
+ return;
+ }
+
+ if(csb->sense){
+ ssh_enable_flag=TRUE;
+ }else{
+ if(!telnet_enable_flag)
+ printf("\nSSH and Telnet can't be disabled at same time\n");
+ else
+ ssh_enable_flag=FALSE;
+ }
+
+}
+/**********Enable telnet access *********/
+
+void EnableTelnet(parseinfo *csb){
+ if(csb->nvgen){
+ if(!telnet_enable_flag)
+ printf("\nno telnet enable\n");
+ return ;
+ }
+
+ if(csb->sense){
+ telnet_enable_flag=TRUE;
+ }else{
+ if(!ssh_enable_flag)
+ printf("\nTelnet and SSH can't be disabled at same time\n");
+ else
+ telnet_enable_flag=FALSE;
+ }
+
+}
+/*************** Change password for existing user ***************/
+void ChangePasswd(parseinfo *csb){
+ STATUS retstat=ERROR;
+ char password[128];
+ char new_password[128];
+
+ if(csb->nvgen)
+ return;
+
+ if( (GETOBJ(string,1)==NULL) ){
+ printf("\nPasswd could not be changed\n");
+ return;
+ }
+
+ if( (sysUserGetUserLevelByName(current_user)!=0) && strcmp(GETOBJ(string,1),current_user) != 0 ){
+ printf("\nRoot privillege required for this operation\n");
+ return;
+ }
+ if(getInput( STD_OUT,STD_IN,"Old password :", password, 127, TRUE )==FALSE){
+ printf("\n Could not read password \n");
+ return;
+ }
+ if(getInput( STD_OUT,STD_IN,"\nNew password :", new_password, 127, TRUE )==FALSE){
+ printf("\nCould not read password \n");
+ return;
+ }
+
+ retstat=sysUserPasswdChange( GETOBJ(string,1),password,new_password );
+ if(retstat==OK)
+ printf("\n Passwd changed succesfully\n");
+ else
+ printf("\n Passwd could not be changed\n");
+
+}
+extern BOOL vxsh_flag;
+void EnableVxsh(parseinfo *csb){
+
+ if(csb->nvgen)
+ return ;
+
+ if(csb->sense)
+ vxsh_flag = TRUE;
+ else
+ vxsh_flag = FALSE;
+
+}
+
+
+
+void readBootLine(void){
+ char bootString[256];
+ bootStringToStruct( (char *)BOOT_LINE_ADRS, &pBootParams);
+ bootStructToString ( bootString, &pBootParams);
+ strcpy((char *)BOOT_LINE_ADRS, bootString);
+}
+void setBootParamsMode(parseinfo *csb){
+
+ if (csb->nvgen) {
+ printf("\nboot-params");
+ cli_submode_nvgen(csb,config_boot);
+ }
+ readBootLine();
+ set_mode_byname(&csb->mode,"boot-params",MODE_VERBOSE);
+}
+
+extern void sysNvRamSet(char *,int,int);
+
+void changeBootParams(parseinfo *csb){
+ char bootString[256];
+ if(!GETOBJ(string,1) && !GETOBJ(int,1)){
+ printf("\ncould not change the parameter\n");
+ return;
+ }
+
+ if (csb->nvgen) {
+ bootStringToStruct( (char *)BOOT_LINE_ADRS, &pBootParams);
+
+ printf("\n\tboot_device %s",pBootParams.bootDev);
+ printf("\n\tprocessor_number %d",pBootParams.procNum);
+ printf("\n\tunit_number %d",pBootParams.unitNum);
+ printf("\n\thost_name %s",pBootParams.hostName);
+ printf("\n\tfile_name %s",pBootParams.bootFile);
+ printf("\n\tinet_on_ethernet %s",pBootParams.ead);
+ printf("\n\tinet_on_backplane %s",pBootParams.bad);
+ printf("\n\tgateway_inet %s",pBootParams.gad);
+ printf("\n\thost_inet %s",pBootParams.had);
+ printf("\n\tuser %s",pBootParams.usr);
+ printf("\n\tftp_password %s",pBootParams.passwd);
+ printf("\n\ttarget_name %s",pBootParams.targetName);
+ printf("\n\tflags %s",pBootParams.flags);
+ printf("\n\tstartup_script %s",pBootParams.startupScript);
+ printf("\n\tother %s",pBootParams.other);
+ }
+
+ switch(csb->which){
+ case EXIT_BOOT_MODE:
+ bootStructToString ( bootString, &pBootParams);
+ strcpy((char *)BOOT_LINE_ADRS, bootString);
+ sysNvRamSet((char *)BOOT_LINE_ADRS, strlen (bootString) + 1, 0);
+ set_mode_byname(&csb->mode,"configure",MODE_VERBOSE);
+ break;
+ case BOOT_DEV:
+ strcpy(pBootParams.bootDev,GETOBJ(string,1));
+ break;
+ case UNIT_NUM:
+ pBootParams.unitNum=GETOBJ(int,1);
+ break;
+ case PROC_NUM:
+ pBootParams.procNum=GETOBJ(int,1);
+ break;
+ case HOST_NAME:
+ strcpy(pBootParams.hostName,GETOBJ(string,1));
+ break;
+ case FILE_NAME:
+ strcpy(pBootParams.bootFile,GETOBJ(string,1));
+ break;
+ case ETHER_IP:
+ strcpy(pBootParams.ead,GETOBJ(string,1));
+ break;
+ case BACK_IP:
+ strcpy(pBootParams.bad,GETOBJ(string,1));
+ break;
+ case HOST_IP:
+ strcpy(pBootParams.had,GETOBJ(string,1));
+ break;
+ case GATEWAY_IP:
+ strcpy(pBootParams.gad,GETOBJ(string,1));
+ break;
+ case USER_NAME:
+ strcpy(pBootParams.usr,GETOBJ(string,1));
+ break;
+ case FTP_PASSWD:
+ strcpy(pBootParams.passwd,GETOBJ(string,1));
+ break;
+ case TARGET_NAME:
+ strcpy(pBootParams.targetName,GETOBJ(string,1));
+ break;
+ case FLAGS:
+ pBootParams.flags=GETOBJ(int,1);
+ break;
+ case STARTUP_SCRIPT:
+ strcpy(pBootParams.startupScript,GETOBJ(string,1));
+ break;
+ case OTHER:
+ strcpy(pBootParams.other,GETOBJ(string,1));
+ break;
+ }
+}
diff --git a/data/mnet/Common/cli/src/chain.c b/data/mnet/Common/cli/src/chain.c
new file mode 100644
index 0000000..0295600
--- /dev/null
+++ b/data/mnet/Common/cli/src/chain.c
@@ -0,0 +1,267 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <tyLib.h>
+#include <taskLib.h>
+#include <errnoLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <msgQLib.h>
+#include <sigLib.h>
+
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+#include <../include/parser_sim.h>
+#include <../include/parser.h>
+#include <../include/parser_defs_exec.h>
+#include <../include/parser_input.h>
+#include <../include/parser_sim.h>
+#include <../include/parser_util.h>
+#include <../include/parser_commands.h>
+#include <../include/nv.h>
+#include <../include/parser_errno.h>
+#include <../include/parser_ModNum.h>
+#include <../include/defs.h>
+#include <../include/parser_init.h>
+#include <../include/macros.h>
+#include <../include/parser_actions.h>
+/*#include <parser/parser_defs_config.h>
+ #include "exception.h" */
+
+enum {
+ TASK_DETAIL,
+ TASK_SUMMARY,
+ TASK_GEN
+};
+
+const char parser_help_default_keyword[] = "Set a command to its defaults";
+const char parser_help_no_keyword[] = "Negate a command or set its defaults";
+const char parser_default_keyword[] = "default";
+const char parser_no_keyword[] = "no";
+
+
+/* Global parser items */
+transition pname(NONE) = {NULL, NULL, (trans_func) NONE_action, NULL};
+transition pname(no_alt) = {NULL, NULL, (trans_func) no_alt_action, NULL};
+transition pname(link_point) = {NULL, NULL, (trans_func) link_point_action, NULL};
+transition pname(link_trans) = {NULL, NULL, (trans_func) NONE_action, NULL};
+
+/* Function for emitting comments about last config and NV update times */
+static void write_config_times (parseinfo *csb)
+{
+ if (csb->nvgen && !csb->priv_set) {
+ /*
+ *RAMS: commented this for now
+
+ nv_write(TRUE, "!"); */
+ }
+
+}
+
+/***************************************************
+ * Interface mode commands
+ */
+
+#ifdef a0
+
+#define ALTERNATE no_alt
+#include "os/ip/src/cfg_interface_exit.h"
+#include "os/ip/src/cfg_int_ip.h"
+#undef ALTERNATE
+
+#endif
+
+
+LINK_TRANS(top_configure_interface_extend_here, no_alt);
+NO_OR_DEFAULT(config_interface_no, top_configure_interface_extend_here,
+ PRIV_MIN | PRIV_NONVGEN);
+HELP(top_configure_interface, config_interface_no,
+ "Configure Interface commands:\n");
+
+/*********************************************************
+ * Clear commands.
+ */
+LINK_TRANS(exec_clear_extend_here, no_alt);
+
+#undef ALTERNATE
+#define ALTERNATE exec_clear_extend_here
+/*#include "../include/exec_clear_interface.h" */
+NOP (exec_clear_commands, ALTERNATE, NONE);
+
+
+/*********************************************************
+ * Debug commands.
+ * Linkage to here is from exec_commands/debug.h
+ */
+LINK_TRANS(exec_debug_extend_here, no_alt);
+
+#undef ALTERNATE
+#define ALTERNATE exec_debug_extend_here
+#include "../include/exec_debug_all.h"
+NOP (exec_debug_commands, ALTERNATE, NONE);
+
+
+/*********************************************************
+ * Show commands.
+ * Linkage to here is from exec_commands/show.h
+ */
+LINK_TRANS(exec_show_extend_here, no_alt);
+
+#undef ALTERNATE
+#define ALTERNATE exec_show_extend_here
+/*#include "../include/exec_show_configuration.h" */
+NOP (exec_show_commands, ALTERNATE, NONE);
+
+/*********************************************************
+ * Global commands that exist at all levels
+ * These always terminate at 'no_alt' and therefore
+ * must be referenced from the terminal states in
+ * each of the command sets.
+ *
+ * None of the global commands
+ * should have a 'no' prefix format.
+ */
+
+LINK_TRANS (global_extend_here, NONE);
+TESTVAR (globalcmd_start_no, NONE, global_extend_here,
+ NONE, NONE, NONE, sense, FALSE);
+TESTVAR (globalcmd_start, globalcmd_start_no, NONE,
+ NONE, NONE, no_alt, nvgen, FALSE);
+
+/*********************************************************
+ * configure commands from here down
+ */
+
+#undef ALTERNATE
+#define ALTERNATE globalcmd_start
+
+#include "../include/cfg_exit.h"
+#include "../include/cfg_end.h"
+NVCOMMENT(after_line_comment, ALTERNATE);
+LINK_TRANS(cfg_extend_last_here, after_line_comment);
+#undef ALTERNATE
+#define ALTERNATE cfg_extend_last_here
+/*#include "../include/cfg_exception.h" */
+/*#include "../include/cfg_term.h" */
+/*#include "../include/cfg_trusthost.h" */
+/*#include "../include/cfg_exec_timeout.h" */
+NVCOMMENT(cfg_extend_comment, ALTERNATE );
+LINK_TRANS(cfg_extend_here, cfg_extend_comment);
+#undef ALTERNATE
+#define ALTERNATE cfg_extend_here
+
+
+EVAL (config_times, ALTERNATE, write_config_times(csb));
+NVCOMMENT(first_comment, config_times);
+NO_OR_DEFAULT(config_no, first_comment, PRIV_MIN | PRIV_NONVGEN);
+HELP (top_configure, config_no, "Configure commands:\n");
+
+
+/*********************************************************
+ * Exec Commands
+ *
+ * If we're enabled, then include the priv_commands, otherwise, go
+ * to the global command set.
+ *
+ */
+
+LINK_TRANS(exec_extend_here, globalcmd_start);
+
+#undef ALTERNATE
+#define ALTERNATE exec_extend_here
+/*#include "../include/exec_ping.h" */
+#include "../include/exec_undebug.h"
+#include "../include/exec_debug.h"
+#include "../include/exec_exit.h"
+#include "../include/exec_show.h"
+/*#include "../include/exec_term.h" */
+/*#include "../include/exec_tclsh.h" */
+#include "../include/exec_clear.h"
+/*#include "../include/exec_traceroute.h"*/
+HELP (top, ALTERNATE, "Exec commands:\n");
+
+#ifdef PARSER_DEBUG_LINKS
+#define LINK(which,str,where,link)\
+ {which,str,((dynamic_transition *)&pname(where)),link},
+#else /* PARSER_DEBUG_LINKS */
+#define LINK(which,str,where,link)\
+ {which,((dynamic_transition *)&pname(where)),link},
+#endif /* PARSER_DEBUG_LINKS */
+
+chain_link chain_gang[] = {
+ LINK(PARSE_ADD_EXEC_CMD, "exec", exec_extend_here,
+ PARSER_ENTRY_LINK_POINT)
+ LINK(PARSE_ADD_SHOW_CMD, "show", exec_show_extend_here,
+ PARSER_ENTRY_LINK_POINT)
+ LINK(PARSE_ADD_DEBUG_CMD, "debug", exec_debug_extend_here,
+ PARSER_ENTRY_LINK_POINT)
+ LINK(PARSE_ADD_CLEAR_CMD, "clear", exec_clear_extend_here,
+ PARSER_ENTRY_LINK_POINT)
+ LINK(PARSE_ADD_CFG_TOP_CMD, "configuration", cfg_extend_here,
+ PARSER_ENTRY_LINK_POINT)
+ LINK(PARSE_ADD_CFG_INTERFACE_TOP_CMD, "interface",
+ top_configure_interface_extend_here,
+ PARSER_ENTRY_LINK_POINT)
+ LINK(PARSE_ADD_CFG_LAST_CMD, "end of top level configuration commands",
+ cfg_extend_last_here, PARSER_ENTRY_LINK_POINT)
+ LINK(PARSE_ADD_GLOBAL_CMD, "global", global_extend_here,
+ PARSER_ENTRY_LINK_POINT)
+
+
+ { PARSE_LIST_END,
+#ifdef PARSER_DEBUG_LINKS
+ NULL,
+#endif /* PARSER_DEBUG_LINKS */
+ NULL, 0}
+};
+
+
+
+
+
+/*
+ * chain.c common mode information
+ */
+
+parser_mode *exec_mode;
+parser_mode *config_mode;
+parser_mode *interface_mode;
+
+void parser_add_main_modes (void)
+{
+ exec_mode = parser_add_mode("exec", NULL, "Exec mode",
+ TRUE, TRUE, NULL, NULL, NULL,
+ &pname(top),
+ NULL );
+
+ config_mode = parser_add_mode("configure", "config",
+ "Global configuration mode",
+ TRUE, TRUE, NULL, NULL, NULL,
+ &pname(top_configure),
+ NULL);
+
+ interface_mode = parser_add_mode("interface", "config-if",
+ "Interface configuration mode",
+ TRUE, TRUE,
+ NULL, /* "configure", */
+ NULL, /* interface_save_var, */
+ NULL, /* interface_reset_var, */
+ &pname(top_configure_interface),
+ NULL);
+}
+
+
+void show_test_mnet(parseinfo *csb)
+{
+ printf("\n show command is integrated\n");
+}
diff --git a/data/mnet/Common/cli/src/cli_parser_init.c b/data/mnet/Common/cli/src/cli_parser_init.c
new file mode 100644
index 0000000..6a0d73e
--- /dev/null
+++ b/data/mnet/Common/cli/src/cli_parser_init.c
@@ -0,0 +1,379 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <taskLib.h>
+#include <tyLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/cli_parser_api.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+#include <../include/parser_sim.h>
+#include <../include/parser.h>
+
+static tCSEMAPHORE parserSemId;
+static tTASKID parserTaskId;
+
+SEM_ID systemloadingSemId = NULL;
+SEM_ID parse_chain_sem = NULL;
+extern int consoleFd;
+extern void BasicParserInit(void);
+
+
+#if 0
+#include "cli_private.h"
+
+#include <parser/parser_init.h>
+#include <parser/parser_sim.h>
+#include <parser/parser_actions.h>
+#include <imc/imc.h>
+#include <imc/imsg.h>
+#include <parser/nv.h>
+#include <parser/sys_debug.h>
+#include <parser/debug.h>
+#include <syslog.h>
+#include <h/os/bootflags.h>
+
+
+
+
+int terminalLength = LINES;
+int waitingTaskCount = 0;
+int parserNullFd = -1;
+
+FILE *parserNullFp = NULL;
+
+/* Extern Declarations */
+extern SEM_ID waitingSemId;
+extern SEM_ID rootBSemId;
+extern tCSEMAPHORE initSemId;
+extern void mace_chain_init(void);
+extern void sysconf_init(void);
+
+/* Prototypes */
+static void parser_process_request( tpCOMSIM );
+static void parser_process_response( tpCOMSIM , tINT);
+static void parser_work(void);
+
+
+
+
+
+
+void
+parser_configure(void)
+{
+ if ( sysBootParams.flags & BYPASS_NVRAM_CONFIG) {
+ printf("Bypassing NVRAM Configuration...\n");
+ } else {
+ printf("Configuring from NVRAM...\n");
+ nv_configure( PRIV_ROOT );
+ }
+}
+
+void
+parser_check(void)
+{
+ extern int ip_name_server_config_check(void);
+
+ /*
+ * check if all the required configuration has been done.
+ * if not, generate syslog messages
+ */
+ ip_name_server_config_check();
+}
+void parser_process_response( tpCOMSIM pComSim, tINT expectId )
+{
+
+ if (pComSim->requestid != expectId ) {
+ printf("Invalid Request Id obtained in Indication\n");
+ }
+
+ if ( pComSim->status != RC_OK ) {
+ printf("Invalid Status obtained\n");
+ }
+
+ if ( pComSim->pLayerSim ) {
+ printf("%s\n", (char *)(pComSim->pLayerSim));
+ }
+
+ return;
+
+}
+
+void parse_configure(char *buffer, int permanent,
+ int resolvemethod, uchar priv )
+{
+ tOCTET4 moduleId = ASSIGN_MODULE_ID;
+ boolean end_found;
+ parseinfo *csb;
+ tpCOMSIM pComSim = NULL;
+ tpPARSERSIM pSim = NULL;
+ int requestId = 0;
+ SEM_ID configparserSemId;
+
+ configparserSemId = semCCreate( _DEFAULT_COUNT_SEM_FLAG , 0 );
+ if ( imc_add( &moduleId, configparserSemId, taskIdSelf() ) == ERROR ) {
+ panic("Cannot add Parser Configuration to IMC\n");
+ }
+
+ csb = get_csb("Parser Configuration CSB");
+ if (csb == NULL) {
+ return;
+ }
+
+ csb->uid = 0; /* ROOT */
+ csb->priv = priv;
+ csb->resolvemethod = resolvemethod;
+ csb->mode = config_mode;
+ csb->break_chars = NVCONFIG_BREAKSET;
+ csb->batch_buf = buffer;
+ csb->batch_offset = buffer;
+ csb->flags = 0;
+ csb->inFd = csb->outFd = consoleFd;
+
+ end_found = FALSE;
+ while (batch_input(csb, csb->line, PARSEBUF,
+ csb->break_chars, &csb->lastchar)) {
+ if (*csb->line && (*csb->line != '!')) { /* Skip empty lines */
+
+ if ((strcmp(csb->line, "end") == 0) ||
+ (strcmp(csb->line, " end") == 0))
+ {
+ end_found = TRUE;
+ break;
+ }
+
+ pSim = (tpPARSERSIM ) mGETSIM( sizeof( tPARSERSIM ) );
+
+ if ( !pSim ) {
+ printf("Not enough memory.... please try later\n");
+ return;
+ }
+
+ mFILL_PARSER_SIM(pSim, csb, moduleId,
+ moduleId, PARSER_CMD_PROC_REQ, requestId,
+ csb->line, csb->lastchar, 0, 0 );
+
+ processCommand( pSim );
+
+ if ( semTake( configparserSemId, WAIT_FOREVER ) == ERROR ) {
+ panic("parser_work:Cannot wait on Parser Semaphore\n");
+ }
+
+ pComSim = NULL;
+
+ mGET_WORK_SIM( pComSim, moduleId );
+
+ if ( pComSim ) {
+ if ( IS_INDICATION(pComSim->serviceid)) {
+ parser_process_response( pComSim, requestId );
+ }
+ else if (IS_REQUEST(pComSim->serviceid)) {
+ printf("\nInvalid Request in Parser\n");
+ }
+ else
+ printf("\ntParser:Invalid Service Obtained\n");
+ mFREESIM( pComSim );
+ }
+ if ( semTake(csb->configSemId, WAIT_FOREVER) == ERROR )
+ panic("Cannot wait on CSB Configuration Semaphore\n");
+
+ requestId++;
+ }
+ }
+ if (!end_found) {
+ panic("Cannot complete Configuration!\n");
+ }
+
+ /* Mind our Free's & Q's */
+ free_csb(&csb);
+
+ semDelete( configparserSemId );
+
+ imc_remove( moduleId );
+
+}
+
+void wait_for_system_load( void )
+{
+ if ( semTake( waitingSemId, WAIT_FOREVER ) == ERROR ) {
+ printf("wait_for_system_load(%s): Cannot wait on waitingSemId\n",
+ _TASK_NAME);
+ return;
+ }
+
+ waitingTaskCount++;
+
+ if ( semGive( waitingSemId) == ERROR ) {
+ printf("wait_for_system_load(%s): Cannot Give waitingSemId\n",
+ PS_TASK_NAME);
+ }
+}
+
+
+void parser_svcinit(void)
+{
+ parser_sema_init();
+ parser_iowork_init();
+}
+
+void parser_configure(void)
+{
+ parser_callback_init();
+ parser_task_init();
+ parser_configure();
+}
+
+void parser_start(void)
+{
+ parser_check();
+}
+
+#endif
+
+void ProcessCommand ( tpPARSERSIM pParserSim )
+{
+ tOCTET2 error = PARSE_ERROR_NOERR;
+ char *line = pParserSim->command;
+ char lastchar = pParserSim->lastchar;
+ parseinfo *csb = pParserSim->csb;
+
+ if ( csb == NULL ) {
+ panic("processCommand : NULL CSB Obtained\n");
+ return;
+ }
+
+ if (lastchar == '?') {
+ csb->in_help = PARSER_HELP;
+ csb->lastchar = '?';
+ } else if (lastchar == '\t') {
+ csb->in_help = PARSER_COMMAND_COMPLETION;
+ csb->lastchar = '\t';
+ } else {
+ csb->in_help = PARSER_NO_HELP;
+ csb->lastchar = '\0';
+ }
+
+ strcpy(csb->line, line);
+ error = parse_cmd(csb, pParserSim);
+}
+
+void CliParserMain ( void )
+{
+
+ tpCOMSIM pComSim = NULL;
+
+ while ( 1 ) {
+ if ( semTake( parserSemId, WAIT_FOREVER ) == ERROR ) {
+ panic("parser_work:Cannot wait on Parser Semaphore\n");
+ }
+
+ pComSim = NULL;
+
+ mGET_WORK_SIM( pComSim, (tOCTET4)PARSER_MODULE );
+
+ if ( pComSim ) {
+ /* Check if it is Request or Indication */
+ if ( IS_INDICATION(pComSim->serviceid)) {
+ printf("Invalid Indication obtained in parser_work\n");
+ /* parser_send_response(pComSim, NULL, RC_ERR ); */
+ mFREESIM( pComSim );
+ }
+ else if (IS_REQUEST(pComSim->serviceid)) {
+ ProcessCommand(( tpPARSERSIM)pComSim);
+ }
+ else
+ printf("\ntParser:Invalid Service Obtained\n");
+ }
+ }
+}
+
+void ParserSemInit(void)
+{
+ tOCTET4 moduleId = PARSER_MODULE;
+
+ parse_chain_sem = semMCreate( PS_DEFAULT_MUTEX_SEM_FLAG ) ;
+ if ( parse_chain_sem == NULL ) {
+ panic("parser_init:Cannot create parse chain semaphore\n");
+ }
+
+ systemloadingSemId = semCCreate(PS_DEFAULT_COUNT_SEM_FLAG, 0 );
+ if ( systemloadingSemId == NULL) {
+ panic("Cannot create System Initialization Semaphore\n");
+ }
+
+ /* initSemId = semCCreate(PS_DEFAULT_COUNT_SEM_FLAG, 0); */
+
+ /* TO be removed */
+ if ( imc_init() != RC_OK ) {
+ panic("Cannot Initialize IMC\n");
+ }
+
+ parserSemId = semCCreate( PS_DEFAULT_COUNT_SEM_FLAG , 0 );
+ parserTaskId = taskIdSelf();
+
+ if ( imc_add( &moduleId, parserSemId, parserTaskId ) == ERROR ) {
+ panic("Cannot add Parser to IMC\n");
+ }
+
+}
+
+
+void ParserTaskInit (void)
+{
+ STATUS errcode = 0;
+
+ errcode = taskSpawn("tParser",PARSER_TASK_PRIORITY, PARSER_TASK_OPTION,
+ PARSER_TASK_STACK_SIZE,
+ (FUNCPTR)CliParserMain,0,0,0,0, 0, 0, 0, 0, 0, 0);
+
+
+ if (errcode == ERROR) {
+ printf("\nCLI Parser Task spawn failed");
+ }
+}
+
+void parser_init ( void )
+{
+ config_prompt = TRUE;
+
+ debug_init();
+ parser_modes_init();
+ command_parser_init();
+ exec_parser_init();
+
+ ip_address_init();
+ /*
+ * RAMS: commented this for now
+ show_os_chain_init();
+
+ nv_init();
+ sysconf_init();
+ */
+}
+
+
+void SysCommandCli (void)
+{
+ ParserSemInit ();
+ parser_init();
+ ParserTaskInit();
+ ParserCallbackInit();
+ BasicParserInit();
+#if 0
+ parser_iowork_init ();
+ parser_configure();
+ parser_check ();
+#endif
+}
diff --git a/data/mnet/Common/cli/src/cli_shellLib.c b/data/mnet/Common/cli/src/cli_shellLib.c
new file mode 100644
index 0000000..e06e57a
--- /dev/null
+++ b/data/mnet/Common/cli/src/cli_shellLib.c
@@ -0,0 +1,729 @@
+/********** File contains APIs used by telnet server and VxWorks to start or destroy the shell ***/
+
+#include "vxWorks.h" /* always first */
+#include <taskLib.h>
+#include "stdio.h"
+#include "ioLib.h"
+#include "symLib.h"
+#include "string.h"
+#include "loadLib.h"
+#include "usrLib.h"
+#include "sysLib.h"
+
+#include <../include/psvxif.h>
+/******* Global variables **********/
+
+char *shellTaskName="tShell";
+char *ios_shellTaskName="tShell";
+
+int shellTaskId;
+int ios_shellTaskId;
+
+int myShellTaskId;
+int myFd;
+int outfd,errfd,infd;
+BOOL ssh_enable_flag=FALSE;
+BOOL telnet_enable_flag=TRUE;
+BOOL ssh_present =FALSE;
+
+
+int ConsoleTask=0;
+int TelnetTask=1;
+int SSHTask =2;
+
+int ShellTask=0;
+
+FUNCPTR cli_logoutf=NULL;
+int cli_logVar=0;
+
+SEM_ID cli_semM;
+BOOL isLoggedOut=FALSE;
+extern SYMTAB_ID sysSymTbl;
+extern BOOL ServerBreak;
+
+int ParserCallBackTask[3];
+
+/******* external variables **********/
+extern int consoleFd; /* fd of initial console device */
+extern int CliIOInit (int,int,int,BOOL);
+extern int SysCommandCli(void) ;
+
+void logmsg(char* string);
+void logerr(char* string);
+void PrintMsg(char* Msg);
+int logfd;
+
+
+
+
+
+
+
+
+
+enum {
+ VX_SHELL,
+ IOS_SHELL
+};
+
+static currentShell=IOS_SHELL;
+
+BOOL ios_shellLock(BOOL request);
+STATUS ios_execute (char *line);
+STATUS ios_shellInit (int stackSize, int arg);
+void ios_shell (BOOL interactive);
+void ios_shellHistory (int size);
+void ios_shellLoginInstall (FUNCPTR logRtn, int logVar);
+void ios_shellLogout (void);
+void ios_shellLogoutInstall (FUNCPTR logRtn, int logVar);
+void ios_shellOrigStdSet (int which, int fd);
+void ios_shellPromptSet (char *newPrompt);
+void ios_shellRestart (BOOL staySecure);
+void ios_shellRestart (BOOL staySecure);
+
+
+
+BOOL shellLock(BOOL request);
+STATUS execute (char *line);
+STATUS shellInit (int stackSize, int arg);
+void shell (BOOL interactive);
+void shellHistory (int size);
+void shellLoginInstall (FUNCPTR logRtn, int logVar);
+void shellLogout (void);
+void shellLogoutInstall (FUNCPTR logRtn, int logVar);
+void shellOrigStdSet (int which, int fd);
+void shellPromptSet (char *newPrompt);
+void shellRestart (BOOL staySecure);
+void shellRestart (BOOL staySecure);
+
+
+
+
+enum {
+ SHELLLOCK_ID,
+ EXECUTE_ID,
+ SHELLINIT_ID,
+ SHELL_ID,
+ SHELLHISTORY_ID,
+ SHELLLOGININSTALL_ID,
+ SHELLLOGOUT_ID,
+ SHELLLOGOUTINSTALL_ID,
+ SHELLORIGSTDSET_ID,
+ SHELLPROMPTSET_ID,
+ SHELLRESTART_ID,
+ SHELLENDOFLIST_ID
+};
+
+typedef struct _stdShellVector {
+ char *shellTaskName;
+ int shellTaskId;
+ /*
+ void *shellLock;
+ void *execute;
+ void *shellInit;
+ void *shell;
+ void *shellHistory;
+ void *shellLoginInstall;
+ void *shellLogout;
+ void *shellLogoutInstall;
+ void *shellOrigStdSet;
+ void *shellPromptSet;
+ void *shellRestart;
+ void *shellendOfList;
+ */
+ void *symValue[12];
+
+}stdShellVector;
+
+#ifdef MNET_GP10
+char *stdShellNames[] = {
+ "shellLock",
+ "execute",
+ "shellInit",
+ "shell",
+ "shellHistory",
+ "shellLoginInstall",
+ "shellLogout",
+ "shellLogoutInstall",
+ "shellOrigStdSet",
+ "shellPromptSet",
+ "shellRestart",
+ 0
+};
+#else
+char *stdShellNames[] = {
+ "_shellLock",
+ "_execute",
+ "_shellInit",
+ "_shell",
+ "_shellHistory",
+ "_shellLoginInstall",
+ "_shellLogout",
+ "_shellLogoutInstall",
+ "_shellOrigStdSet",
+ "_shellPromptSet",
+ "_shellRestart",
+ 0
+};
+
+#endif
+
+static stdShellVector iosShellVector =
+{
+ "tShell",
+ 0,
+ {
+ ios_shellLock,
+ ios_execute,
+ ios_shellInit,
+ ios_shell,
+ ios_shellHistory,
+ ios_shellLoginInstall,
+ ios_shellLogout,
+ ios_shellLogoutInstall,
+ ios_shellOrigStdSet,
+ ios_shellPromptSet,
+ ios_shellRestart,
+ 0
+ }
+};
+
+static stdShellVector defaultShellVector =
+{
+ "tShell",
+ 0,
+ {
+ shellLock,
+ execute,
+ shellInit,
+ shell,
+ shellHistory,
+ shellLoginInstall,
+ shellLogout,
+ shellLogoutInstall,
+ shellOrigStdSet,
+ shellPromptSet,
+ shellRestart,
+ 0
+ }
+};
+
+static stdShellVector vxShellVector;
+static stdShellVector runShellVector=
+{
+ "tShell",
+ 0,
+ {
+ ios_shellLock,
+ ios_execute,
+ ios_shellInit,
+ ios_shell,
+ ios_shellHistory,
+ ios_shellLoginInstall,
+ ios_shellLogout,
+ ios_shellLogoutInstall,
+ ios_shellOrigStdSet,
+ ios_shellPromptSet,
+ ios_shellRestart,
+ 0
+ }
+};
+
+
+
+
+int installedVxShell=0;
+static void *vxShellSymValue;
+
+BOOL stdFindVxShellSymbol( char *name, int val, SYM_TYPE type, int arg, UINT16 group)
+{
+ if ( strcmp(name, (char *) arg) == 0 )
+ {
+ /*printf("found symbol %s in group %d\n", (char *)arg, (int) group);*/
+ if ( group != 0 )
+ {
+ vxShellSymValue=(void *)val;
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
+
+int shellLoadVxShell(char *file)
+{
+ MODULE_ID ret;
+ int next=0;
+
+
+ ret=ld(0,0,file);
+ if(ret==NULL){
+ return 0;
+ }
+
+ next=0;
+ while(stdShellNames[next]!=0){
+ vxShellSymValue=0;
+ symEach(sysSymTbl, stdFindVxShellSymbol, (int) stdShellNames[next]);
+ if(vxShellSymValue == 0)
+ return 0;
+ vxShellVector.symValue[next]=vxShellSymValue;
+ next++;
+ }
+ installedVxShell=1;
+ return 1;
+}
+
+int isInstalledVxShell()
+{
+ return installedVxShell;
+}
+
+void shellSetRunning(int shell)
+{
+ currentShell=shell;
+ if(shell == VX_SHELL)
+ runShellVector=vxShellVector;
+ else
+ runShellVector=iosShellVector;
+}
+
+int shellGetRunning()
+{
+ return currentShell;
+}
+
+void shellScriptAbort (void){
+ logmsg("shellScriptAbort\n");;
+}
+
+BOOL shellLock(BOOL request){
+ BOOL (*f)();
+
+ f=runShellVector.symValue[SHELLLOCK_ID];
+ return (*f)(request);
+}
+
+STATUS execute (char *line){
+
+ STATUS (*f)();
+
+ f=runShellVector.symValue[EXECUTE_ID];
+ return (*f)(line);
+
+}
+
+void *shellGetVxExecute()
+{
+
+ return vxShellVector.symValue[EXECUTE_ID];
+
+}
+
+STATUS shellInit (int stackSize, int arg){
+
+ STATUS (*f)();
+
+ f=runShellVector.symValue[SHELLINIT_ID];
+ return (*f)(stackSize, arg);
+
+}
+void shell (BOOL interactive){
+
+ void (*f)();
+
+ f=runShellVector.symValue[SHELL_ID];
+ (*f)(interactive);
+}
+
+void shellHistory (int size){
+
+ void (*f)();
+
+ f=runShellVector.symValue[SHELLHISTORY_ID];
+ (*f)(size);
+
+}
+
+void shellLoginInstall (FUNCPTR logRtn, int logVar){
+
+ void (*f)();
+
+ f=runShellVector.symValue[SHELLLOGININSTALL_ID];
+ (*f)(logRtn, logVar);
+
+}
+
+void shellLogout (void){
+
+ void (*f)();
+
+ f=runShellVector.symValue[SHELLLOGOUT_ID];
+ (*f)();
+}
+
+void shellLogoutInstall (FUNCPTR logRtn, int logVar){
+
+ void (*f)();
+
+ f=runShellVector.symValue[SHELLLOGOUTINSTALL_ID];
+ (*f)(logRtn, logVar);
+
+}
+
+void shellOrigStdSet (int which, int fd){
+
+ void (*f)();
+
+ f=runShellVector.symValue[SHELLORIGSTDSET_ID];
+ (*f)(which, fd);
+
+}
+
+void shellPromptSet (char *newPrompt){
+
+ void (*f)();
+
+ f=runShellVector.symValue[SHELLPROMPTSET_ID];
+ (*f)(newPrompt);
+}
+
+void shellRestart (BOOL staySecure){
+
+ void (*f)();
+
+ f=runShellVector.symValue[SHELLRESTART_ID];
+ (*f)(staySecure);
+}
+
+
+
+extern BOOL ExitFlag;
+
+void callbackRestart(){
+
+ int callbackTaskID;
+/* if(ServerBreak || ExitFlag)
+ return;*/
+ if(ServerBreak)
+ return;
+
+
+ if((callbackTaskID=taskNameToId ("tCallback0") )!= ERROR){
+ /*printMsg("\nTask 0 deleted\n");*/
+ taskDelete(callbackTaskID);
+ }
+ if((callbackTaskID=taskNameToId ("tCallback1") )!= ERROR){
+ /* printMsg("\nTask 1 deleted\n");*/
+ taskDelete(callbackTaskID);
+ }
+ if((callbackTaskID=taskNameToId ("tCallback2") )!= ERROR){
+ /* printMsg("\nTask 2 deleted\n");*/
+ taskDelete(callbackTaskID);
+ }
+ ParserCallbackInit();
+}
+
+
+/*****************Get the status of shell *********************/
+
+int shellGetCurrentStatus(char* status){
+ int retVal=0;
+ switch(ShellTask){
+ case 0 :
+ retVal=1;
+ if(status)
+ strcpy(status,"\nSystem is being accessed via Console connection\n");
+ break;
+ case 1 :
+ retVal=2;
+ if(status)
+ strcpy(status,"\nSystem is being accessed via Telnet connection\n");
+ break;
+ case 2 :
+ retVal=3;
+ if(status)
+ strcpy(status,"\nSystem is being accessed via SSH connection\n");
+ break;
+ default :
+ retVal=0;
+ if(status)
+ strcpy(status,"\nThere is no active CLI user in the system\n");
+ break;
+ }
+ return retVal;
+}
+
+
+
+/******** Locks the access to shell *********/
+BOOL ios_shellLock (BOOL request){
+
+
+
+ if(request==FALSE) {
+ ShellTask=ConsoleTask;
+ callbackRestart();
+ if(ServerBreak){
+ shellRestart(TRUE);
+ ServerBreak=FALSE;
+ }
+ return TRUE;
+ }else{
+ if(!telnet_enable_flag)
+ return FALSE;
+
+ if(ShellTask==SSHTask){
+ return FALSE;
+ }else{
+ callbackRestart();
+ ShellTask=TelnetTask;
+ return TRUE;
+ }
+ }
+}
+
+/**************/
+STATUS ios_execute (char *line){
+ logmsg("shellexecute\n");
+ return OK;
+ }
+
+
+
+extern void ParserCallbackRestart(int index);
+int tShell()
+{
+ char StatusOfTask[128];
+ int index;
+ for(;;){
+ /* for(index=0;index<3;index++){
+ if(taskStatusString(ParserCallBackTask[index],StatusOfTask)==ERROR)
+ ParserCallbackRestart(index);
+
+
+ }*/
+ taskDelay (sysClkRateGet ()*10);
+ }
+ return OK;
+}
+
+
+
+
+/*****************Shellinit******************
+Creates shell task for console
+*********************************************/
+
+STATUS ios_shellInit (int stackSize, int arg){
+
+ char taskName[100];
+
+ logerr("\nshellinit");
+
+
+ shellTaskId = taskSpawn("tShell", 200, 0, 10000,
+ (FUNCPTR)tShell,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,0,0,0,0);
+
+
+ sprintf(taskName, "shellInit - %d\n", shellTaskId);
+ logmsg(taskName);
+
+ outfd=errfd=infd=consoleFd;
+ ShellTask=ConsoleTask;
+
+ myShellTaskId=CliIOInit(infd,outfd,errfd,TRUE);
+ return OK;
+ }
+
+/*****************Shell******************/
+
+void ios_shell (BOOL interactive){
+ logmsg("shelllogout\n");
+ }
+
+
+
+/*****************ShellHistory******************/
+void ios_shellHistory (int size){
+ logmsg("shellHistory\n");;
+}
+
+static FUNCPTR loginf;
+
+
+
+
+/*****************shellLoginInstall******************/
+void ios_shellLoginInstall (FUNCPTR logRtn, int logVar){
+;
+}
+
+
+
+
+/*****************shellLogout******************/
+void ios_shellLogout (void){
+ myFd=consoleFd;
+ logmsg("shellLogout\n");
+ logerr("\nshellLogout\n");
+
+}
+
+
+
+
+
+/*****************shellLogoutInstall******************/
+void ios_shellLogoutInstall (FUNCPTR logRtn, int logVar){
+
+ logmsg("shellLogoutInstall\n");
+ cli_logoutf=logRtn;
+ cli_logVar=logVar;
+ logerr("\nshellLogoutInstall\n");
+}
+
+/*****************shellOrigStdSet******************/
+void ios_shellOrigStdSet (int which, int fd){
+
+ logmsg("shellOrigStdSet\n");
+ logerr("\nshellOrigStdSet\n");
+ if(which == STD_OUT) outfd=fd;
+ if(which == STD_IN) infd=fd;
+ if(which == STD_ERR) errfd=fd;
+}
+
+
+
+
+/*****************shellPromptSet******************/
+
+void ios_shellPromptSet (char *newPrompt){
+ logmsg("shellPromptSet\n");
+
+}
+
+
+extern void io_cleanup( int TaskID);
+
+/*****************shellRestart******************/
+void ios_shellRestart (BOOL staySecure){
+
+
+ if((myShellTaskId=taskNameToId ("tCli") )!= ERROR){
+ taskDelete(myShellTaskId);
+ io_cleanup(0);
+ }
+ myShellTaskId=CliIOInit(infd,outfd,errfd,TRUE);
+ switch(ShellTask){
+ case 0 :
+ printMsg("\nTask for console created\n");
+ break;
+ case 1 :
+ printMsg("\nTask for telnet session created\n");
+ break;
+ case 2 :
+ printMsg("\nTask for SSH session created\n");
+ break;
+ }
+
+}
+
+/*****************shellScriptAbort******************/
+void ios_shellScriptAbort (void){
+ logmsg("shellScriptAbort\n");;
+}
+
+BOOL isSSHEnabled(void){
+ return ssh_enable_flag;
+}
+
+
+
+BOOL SSHLock(void){
+/*
+ if(isLoggedOut==FALSE){
+ isLoggedOut=TRUE;
+ if(cli_logoutf){
+ isLoggedOut=FALSE;
+ (*cli_logoutf)(cli_logVar);
+ }
+ else{
+ isLoggedOut=FALSE;
+ }
+ }
+
+
+ logerr("\nLockForSSH exit\n");*/
+
+ if(cli_logoutf){
+ (*cli_logoutf)(cli_logVar);
+ }
+
+
+
+ return TRUE;
+}
+
+void LockForSSH(BOOL lock){
+ callbackRestart();
+ if(!lock){
+ ShellTask=ConsoleTask;
+ if(ServerBreak){
+ shellRestart(TRUE);
+ ServerBreak=FALSE;
+ }
+ return;
+ }
+
+ if(ShellTask!=TelnetTask){
+ ShellTask=SSHTask;
+ return;
+ }
+
+isLoggedOut=TRUE;
+/******************* If and only if ssh is preempting the telnet ****/
+ taskSpawn("tSSHLockTask", 150, 0, 10000,
+ (FUNCPTR)SSHLock,
+ 0,0,0,0,
+ 0,
+ 0,0,0,0,0);
+ do
+ taskDelay (sysClkRateGet ());
+ while (taskNameToId ("tSSHLockTask") != ERROR);
+
+ ShellTask=SSHTask;
+}
+
+
+
+
+void SshPresent(void){
+ ssh_present=TRUE;
+}
+
+void printMsg(char* Msg){
+
+write(consoleFd,Msg,strlen(Msg));
+
+}
+
+void logmsg(char* string){
+ return;
+write(consoleFd,string,strlen(string));
+}
+
+void logerr(char* string){
+return;
+ write(consoleFd,string,strlen(string));
+}
+
+
+
+
diff --git a/data/mnet/Common/cli/src/command2.c b/data/mnet/Common/cli/src/command2.c
new file mode 100644
index 0000000..c108262
--- /dev/null
+++ b/data/mnet/Common/cli/src/command2.c
@@ -0,0 +1,635 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <tyLib.h>
+#include <taskLib.h>
+#include <errnoLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <msgQLib.h>
+#include <sigLib.h>
+
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+#include <../include/parser_sim.h>
+#include <../include/parser.h>
+#include <../include/parser_defs_exec.h>
+#include <../include/parser_input.h>
+#include <../include/parser_sim.h>
+#include <../include/parser_util.h>
+#include <../include/parser_commands.h>
+#include <../include/nv.h>
+#include <../include/parser_actions.h>
+#include <../include/parser_defs_config.h>
+
+boolean config_dirty = FALSE;
+
+#if 0
+#include <parser/parser.h>
+#include <parser/parser_actions.h>
+#include <parser/parser_defs_exec.h>
+#include <parser/parser_defs_config.h>
+#include <parser/nv.h>
+#include <cenetdb.h>
+#include <dosfs_posix.h>
+#include "assert.h"
+#include <syslog.h>
+#include <dosfs/uvfatUsrApiExt.h>
+
+
+static STATUS write_running_to_file( int fd , uint);
+
+
+
+
+/*
+ * write_terminal
+ * Show the current configuration on the terminal
+ */
+
+void write_terminal (parseinfo *csb)
+{
+ size_t len, cc;
+ char *curcfg = NULL;
+
+ /*
+ * Dump the current configuration to our buffer
+ */
+ curcfg = nv_current_to_buffer(TRUE,
+ PRIV_MAX,
+ (csb->flags & HIDE_PASSWORDS));
+ if ( curcfg == NULL ) {
+ return;
+ }
+
+ printf("\nCurrent configuration:");
+ len = strlen(curcfg);
+ cc = fwrite(curcfg, 1, len, stdout);
+ assert(cc == len);
+ PARSERfree(curcfg);
+}
+
+
+/*
+ * nv_save_config_info()
+ * This function is called by GUI for saving configuration information
+ * to NVRAM
+ *
+ */
+
+void nv_save_config_info()
+{
+ syslog(LOG_NOTICE, "Configured from GUI");
+ write_memory(NULL);
+}
+
+
+/*
+ * write_erase
+ * Jacket for EXEC "write erase" command
+ */
+
+void write_erase (parseinfo *csb)
+{
+ (void) nv_erase(TRUE);
+ config_dirty = TRUE;
+}
+
+/*
+ * write_memory
+ * Jacket for EXEC "write memory" command
+ */
+
+void write_memory (parseinfo *csb)
+{
+ if (ok_to_write_nv()) {
+ (void) nv_current_to_nv(TRUE);
+ config_dirty = FALSE;
+ } else
+ printf("No action taken because command was not confirmed\n");
+}
+
+void ping_command (parseinfo *csb)
+{
+ char host[256];
+ int numpkts = GETOBJ(int, 1);
+
+ strncpy(host, GETOBJ(string,1), 256);
+
+
+ ping( host, numpkts, 0 );
+}
+
+
+/*
+ * cfg_dirty -- return status of config. If user has modified
+ * config and not saved then return true else return false
+ */
+boolean cfg_dirty (void)
+{
+ return(config_dirty);
+}
+
+
+
+
+/*
+ * Write the configuration to TFTP / DISK
+ */
+void write_config( parseinfo *csb )
+{
+ char fileName[MAX_FILENAME_LENGTH + 1 ];
+ char remoteFileName[PATH_MAX + 1] = "";
+ char tftpServerAddr[INET_ADDR_LEN + 1] = "";
+ char buffer[256] = "";
+
+ boolean tftpPut = FALSE;
+ boolean tftpGet = FALSE;
+
+ int fd = -1;
+ int error = 0;
+ int fileAccess = 0;
+
+ int status = OK;
+
+ /* For Disk Copy the file to open is the filename
+ * specified. For TFTP operation, need to create
+ * a temporary file locally and ask for Remote file
+ * name also
+ */
+ if ( ( csb->which == COPY_RUNNING_CONFIG_DISK ) ||
+ ( csb->which == COPY_STARTUP_CONFIG_DISK ) ||
+ ( csb->which == COPY_DISK_STARTUP_CONFIG )) {
+
+ strcpy(fileName, GETOBJ(string,1));
+
+ if ( strcmp(fileName,"") == 0 ) {
+ printf("Invalid Filename specfied\n");
+ return;
+ }
+ } else {
+ time_t current_time = 0;
+
+ /* Temporary Filename creation to prevent
+ * conflicts
+ */
+ if ( time( &current_time ) < 0 )
+ current_time = 0;
+ sprintf(fileName, mVOLNAME".tmp.%d.%ld", taskIdSelf(),
+ current_time);
+
+ startIOTimer(csb);
+ status = getTftpInput(tftpServerAddr, remoteFileName ) ;
+ if ( status != OK ) {
+ if ( status == RC_TIMEOUT ) {
+ setExecTimeout(csb);
+ stopIOTimer(csb);
+ }
+ return;
+ }
+ stopIOTimer(csb);
+ }
+
+ /*
+ * Make sure we do not create a file when we need
+ * data from file, like copy disk startup-config
+ */
+ if ( (csb->which == COPY_DISK_STARTUP_CONFIG ) ) {
+ fileAccess = O_RDWR;
+ } else {
+ fileAccess = O_RDWR | O_CREAT;
+ }
+
+ /* Open the local file */
+ if ( (fd = open(fileName, fileAccess , 0644)) < 0 ) {
+ if (!(tftpPut || tftpGet) )
+ printf("Cannot open file %s!\n", fileName);
+ else
+ printf("Cannot open temporary file for writing!\n");
+
+ return;
+ }
+
+ error = 0 ;
+
+ switch(csb->which ) {
+
+ case COPY_DISK_STARTUP_CONFIG:
+ printf("Writing Startup Configuration from %s...", fileName);
+ /*
+ * This is defined in nv_common.c. Writes the configuration
+ * from NVRAM to the file descriptor 'fd'
+ */
+ if ( write_nv_config_from_fd( fd ) == ERROR ) {
+ printf("[Failed]\n") ;
+ } else {
+ printf("[OK]\n");
+ printf("You need to reboot the box for the configuration to"
+ " take effect\n");
+ }
+ close(fd);
+ break;
+
+ case COPY_STARTUP_CONFIG_DISK:
+ printf("Writing startup configuration to %s...", fileName);
+ csb->flags |= CONFIG_FILE;
+ SETOBJ(int,2)= fd;
+ nv_review( csb );
+ csb->flags &= ~CONFIG_FILE;
+ if ( GETOBJ(int, 2) == FALSE )
+ printf("[OK]\n");
+ else
+ printf("[Failed]\n");
+ close( fd );
+ break;
+
+ case COPY_RUNNING_CONFIG_DISK:
+ printf("Writing Current configuration to %s...", fileName);
+ if ( write_running_to_file( fd , ( csb->flags & HIDE_PASSWORDS) )
+ == OK )
+ printf("[OK]\n");
+ else
+ printf("[Failed]\n");
+ close( fd );
+ break;
+
+ case COPY_RUNNING_CONFIG_TFTP:
+ printf("Writing Current configuration to %s:%s...", tftpServerAddr,
+ remoteFileName);
+ if ( write_running_to_file( fd, ( csb->flags & HIDE_PASSWORDS ) )
+ == ERROR ) {
+ printf("[Failed] ( Configuration creation error)\n");
+ error = TRUE;
+ }
+ close( fd );
+ tftpPut = TRUE;
+ tftpGet = FALSE;
+ break;
+
+ case COPY_TFTP_STARTUP_CONFIG:
+ /* The entire TFTP Operation is done at the end */
+ printf("Writing Startup Configuration from %s:%s...", tftpServerAddr,
+ remoteFileName);
+ tftpPut = FALSE;
+ tftpGet = TRUE;
+ break;
+
+ case COPY_STARTUP_CONFIG_TFTP:
+ printf("Writing Startup configuration to %s:%s...", tftpServerAddr,
+ remoteFileName);
+ csb->flags |= CONFIG_FILE;
+ SETOBJ(int,2)= fd;
+ nv_review( csb );
+ csb->flags &= ~CONFIG_FILE;
+ close( fd );
+ error = GETOBJ(int, 2);
+ tftpPut = TRUE;
+ tftpGet = FALSE;
+ break;
+
+ default:
+ break;
+
+ }
+
+ if ( tftpPut || tftpGet ) {
+
+ /* Determine if it is 'get' or 'put' operation */
+ strcpy(buffer, ( tftpPut == TRUE )?"put":"get");
+
+ if ( !error ) {
+
+ /* The local temporary file would not have been opened
+ * for TFTP GET Operation yet or would have been closed
+ * in case of TFTP PUT Operation
+ */
+ if ( (fd = open(fileName, O_RDWR | O_CREAT, 0644)) < 0 ) {
+ printf("[Failed] ( Temporary file creation error)\n");
+ } else if ( tftpCopy( tftpServerAddr, 0, remoteFileName,
+ buffer, "binary", fd ) == ERROR ) {
+ printf("[Failed] ( TFTP Error)\n");
+ } else if ( tftpGet == TRUE ) {
+
+ /* We close the 'fd' just to make sure the buffers are
+ * flushed to the file
+ */
+ close(fd);
+
+ /* Got the configuration file from TFTP Server. Need
+ * to update the startup-configuration from the
+ * temporary file
+ */
+ if (!((( fd = open(fileName, O_RDWR | O_CREAT, 0644)) > 0 ) &&
+ ( write_nv_config_from_fd(fd) == OK ))) {
+ printf("[Failed]\n");
+ } else {
+ printf("[OK]\n");
+ printf("You need to reboot the box for the configuration "
+ "to take effect\n");
+ }
+ } else
+ printf("[OK]\n");
+ }
+ close( fd );
+
+ /* Remove the temporary file */
+ if ( fileName )
+ remove( fileName );
+ }
+}
+
+/*
+ * Write the running configuration to a file with
+ * file descriptor fd
+ */
+static STATUS write_running_to_file( int fd , uint flags)
+{
+ char *curcfg = NULL;
+ STATUS result = ERROR;
+
+ /*
+ * Dump the current configuration to our buffer
+ */
+ curcfg = nv_current_to_buffer( FALSE, PRIV_MAX, flags ) ;
+
+
+ if ( curcfg != NULL ) {
+ if ( write(fd, curcfg, strlen(curcfg)) < strlen(curcfg)) {
+ result = ( ERROR ) ;
+ }
+ PARSERfree(curcfg);
+ result = OK;
+ }
+ return( result );
+}
+
+
+int getTftpInput( char *pTftpServer, char *pFileName )
+{
+ char server[256] = "";
+ char fileName[PATH_MAX + 1] = "";
+ char buffer[1024] = "";
+
+ struct hostent *pHostEnt = NULL;
+ struct hostent hostEntry;
+ struct in_addr serverAddr;
+
+ int nbytes = 0;
+ int error = 0;
+ u_long addr;
+
+
+ printf("TFTP Server Address: ");
+ if ( ( nbytes =
+ read( STD_IN, server, (sizeof(server) - 1)) ) <= 0) {
+ if ( errnoOfTaskGet(0) == S_ioLib_CANCELLED ) {
+ return( RC_TIMEOUT );
+ } else {
+ return(ERROR );
+ }
+ }
+
+ server[nbytes - 1] = '\0';
+
+ if ( nbytes >= 256 ) {
+ printf("Hostname too long\n");
+ return(ERROR);
+ }
+
+ /* Verify if the Server specified is valid
+ * Check first to see if it is HOSTNAME. If
+ * it is not valid, check to see if it is a
+ * HOSTADDRESS. If both fail, then it is considered
+ * an invalid address
+ */
+ if ( ( pHostEnt =
+ gethostbyname_r(server, &hostEntry, buffer,
+ sizeof(buffer), &error )) == NULL) {
+ if ( ( pHostEnt = gethostbyaddr_r((char *)&addr, 4, AF_INET,
+ &hostEntry, buffer,
+ sizeof(buffer),
+ &error )) == NULL ) {
+ printf("Cannot resolve the TFTP Server Address "
+ "(Errno %d)\n", error);
+ return(ERROR);
+ }
+ }
+
+ bcopy(pHostEnt->h_addr_list[0], (char *)&serverAddr,
+ pHostEnt->h_length);
+
+ inet_ntoa_b(serverAddr, pTftpServer);
+
+ printf("Remote Filename: ");
+ if ( ( nbytes =
+ read( STD_IN, fileName,
+ PATH_MAX ) ) <= 0) {
+ if ( errnoOfTaskGet(0) == S_ioLib_CANCELLED ) {
+ return( RC_TIMEOUT );
+ } else {
+ return(ERROR );
+ }
+ }
+ fileName[nbytes - 1] = '\0';
+
+ if ( nbytes > PATH_MAX ) {
+ printf("Filename too long\n");
+ return(ERROR);
+ }
+
+ strcpy(pFileName, fileName);
+
+ return(OK);
+}
+
+#ifdef INCLUDE_TRACEROUTE
+/************************************************
+ *
+ * func: traceroute_command
+ *
+ * desc: cli traceroute callback func
+ *
+ ************************************************/
+extern int traceroute(char *host);
+
+void traceroute_command (parseinfo *csb)
+{
+ addrtype *pHost = GETOBJ(paddr, 1);
+ char host[INET_ADDR_LEN + 1 ];
+ struct in_addr address;
+
+ if ( martian(ntohl(pHost->ip_addr), MARTIAN_FLAG_IS_HOST) == TRUE ) {
+ printf("Not a valid Host Address\n");
+ return;
+ }
+
+ address.s_addr = pHost->ip_addr;
+
+ inet_ntoa_b(address, host );
+
+ traceroute( host);
+ return;
+}
+#endif
+#endif
+
+void exit_config_command( parseinfo *csb )
+{
+ parser_mode *alt_mode;
+ char *username = NULL;
+ char unknown_name[]="Unknown";
+
+ csb->giveConfigSem = TRUE;
+ if (csb->nvgen) {
+ if (csb->which == CMD_END) {
+ /* Reset buffer size
+ * to always save room for "\nend".
+
+ nv_write(TRUE, "%s\n", csb->nv_command); */
+ }
+ return;
+ }
+ alt_mode = get_alt_mode(csb->mode);
+ while (alt_mode) {
+ (void) mode_save_vars(csb);
+ csb->mode = alt_mode;
+ alt_mode = get_alt_mode(csb->mode);
+ }
+
+ csb->mode = exec_mode;
+
+#if 0
+ /* RAMS commented this for now */
+ if (!systemloading) {
+
+ username = getNameByUid(csb->uid);
+ if (username == NULL)
+ username = unknown_name;
+
+ if (csb->inFd == consoleFd) {
+ syslog(LOG_NOTICE, "Configured from console by %s", username);
+ } else {
+ syslog(LOG_NOTICE, "Configured from telnet session by %s",
+ username);
+ }
+ }
+#endif
+}
+
+
+/*
+ * Display the '?' help text for the parser
+ */
+void
+parser_help(parseinfo *csb)
+{
+ csb->MoreStatus = print_buf(csb->help_save,
+ FALSE,
+ !(csb->flags & CONFIG_HTTP),
+ NULL,
+ 0
+ );
+ csb->help_save.used = 0;
+ csb->visible_ambig.ambig[0] = '\0';
+ csb->visible_ambig.ambig_save[0] = '\0';
+ csb->hidden_ambig.ambig[0] = '\0';
+ csb->hidden_ambig.ambig_save[0] = '\0';
+}
+
+
+/*
+ * enable_command
+ */
+
+void enable_command (parseinfo *csb)
+{
+ uint level = GETOBJ(int,1);
+
+ /*
+ * If this was really the disable command, turn off wizardliness
+ * and return.
+ */
+ if (csb->which == CMD_DISABLE) {
+ if (level <= csb->priv) {
+ csb->priv = level;
+ /* SET_PRIV(stdio->privilege, level); */
+ if (parser_priv_debug) {
+ printf("\nPrivilege level set to %d",level);
+ /* CUR_PRIV(stdio->privilege)); */
+
+ }
+ } else {
+ printf("\nNew privilege level must be "
+ "less than current privilege level");
+ }
+ return;
+ }
+ /*
+ * RAMS: commented this for now
+
+ if ( !( isSuperUser( csb->uid ) ) ) {
+ printf("You need administrative privilege to enter privileged mode\n");
+ } else {
+ csb->priv = level;
+ }
+ */
+ csb->priv = level;
+ return;
+}
+
+/*
+ * Write the configuration to TFTP / DISK
+ */
+void write_config( parseinfo *csb )
+{
+ printf("\n Write config called");
+}
+
+
+/*
+ * manual_configure
+ * Query user for configuration file
+ */
+void manual_configure (parseinfo *csb)
+{
+ csb->priv = 0xf;
+ /*
+ * If we are not doing a "conf term" ("conf net" or "conf mem"),
+ * and we are not root, dont' let through
+ */
+ if ((csb->which != PARSER_CONF_TERM) &&
+ (csb->priv != PRIV_ROOT)) {
+ printf("\nInvalid privileges");
+ return;
+ }
+
+
+ switch (csb->which) {
+
+ case PARSER_CONF_TERM:
+ csb->mode = config_mode;
+ printf("Enter configuration commands, one per line. "
+ "End with CNTL/Z\n\n");
+ csb->break_chars = CONFIG_BREAKSET;
+ csb->batch_buf = NULL;
+ csb->resolvemethod = RES_MANUAL;
+ csb->flags = CONFIG_TERM;
+ config_dirty = TRUE;
+ csb->giveConfigSem = TRUE;
+ return;
+
+ default:
+ bad_parser_subcommand(csb, csb->which);
+ break;
+ }
+}
diff --git a/data/mnet/Common/cli/src/command_chain.c b/data/mnet/Common/cli/src/command_chain.c
new file mode 100644
index 0000000..d85d8c0
--- /dev/null
+++ b/data/mnet/Common/cli/src/command_chain.c
@@ -0,0 +1,73 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <tyLib.h>
+#include <taskLib.h>
+#include <errnoLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <msgQLib.h>
+#include <sigLib.h>
+
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+#include <../include/parser_sim.h>
+#include <../include/parser.h>
+#include <../include/parser_defs_exec.h>
+#include <../include/parser_input.h>
+#include <../include/parser_sim.h>
+#include <../include/parser_util.h>
+#include <../include/parser_commands.h>
+#include <../include/nv.h>
+#include <../include/parser_errno.h>
+#include <../include/parser_ModNum.h>
+#include <../include/defs.h>
+#include <../include/parser_init.h>
+#include <../include/macros.h>
+#include <../include/parser_actions.h>
+#include <../include/parser_defs_config.h>
+
+/*
+ * Parse chains for Command exec commands
+ */
+#define ALTERNATE NONE
+#include "../include/exec_disable.h"
+#include "../include/exec_enable.h"
+#include "../include/exec_configure.h"
+/*#include "../include/exec_write.h" */
+LINK_POINT(command_exec_commands, ALTERNATE);
+#undef ALTERNATE
+
+#define ALTERNATE NONE
+/*#include "../include/exec_erase.h" */
+LINK_POINT(erase_commands, ALTERNATE);
+#undef ALTERNATE
+
+/*
+ * Parse chain registration array for Command
+ */
+static parser_extension_request command_chain_init_table[] = {
+ { PARSE_ADD_EXEC_CMD, &pname(command_exec_commands) },
+ { PARSE_ADD_ERASE_CMD, &pname(erase_commands) },
+ { PARSE_LIST_END, NULL }
+};
+
+
+/*
+ * command_parser_init - Initialize Command parser support
+ */
+void command_parser_init (void)
+{
+ parser_add_command_list(command_chain_init_table, "command");
+ return;
+}
diff --git a/data/mnet/Common/cli/src/debug.c b/data/mnet/Common/cli/src/debug.c
new file mode 100644
index 0000000..b8e2213
--- /dev/null
+++ b/data/mnet/Common/cli/src/debug.c
@@ -0,0 +1,342 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <lstLib.h>
+#include <stdlib.h>
+#include <inetLib.h>
+#include <timers.h>
+#include <ctype.h>
+#include <msgQLib.h>
+#include <sigLib.h>
+#include <logLib.h>
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+#include <../include/parser_sim.h>
+#include <../include/parser.h>
+#include <../include/parser_input.h>
+#include <../include/debug.h>
+#include <../include/sys_debug.h>
+#include <../include/parser_debug.h>
+#include <../include/mutex.h>
+
+
+#define __DECLARE_DEBUG_VARS__
+#include <../include/parser_debug_flags.h>
+
+/*
+ * debug_all_flag is set whenever "debug all" is in effect. Should be
+ * static, but I believe that screws up run-from-ROM in Cisco images...
+ * anyway, external users should use debug_all_p() to interrogate this
+ * flag.
+ */
+
+static boolean debug_all_flag = FALSE;
+extern mutex_t *pPrintDebugMutex;
+
+/*
+ * debug_init
+ * Initialize the debugging system
+ */
+
+void debug_init (void)
+{
+ debug_all_flag = FALSE;
+ sys_debug_init();
+}
+
+/*
+ * debug_all_p
+ * Tells the caller whether "debug all" is in effect. Used (at least) at
+ * subsystem initialization time to determine whether a subsystem should
+ * turn on all its debug flags.
+ */
+
+boolean debug_all_p (void)
+{
+ return(debug_all_flag);
+}
+
+
+/*
+ * debug_command
+ * Generic handler for all manner of "debug" and "undebug" commands.
+ * Any subsystem can use this routine to handle its debug flags as long
+ * as it uses an array of debug_item_type to describe them and as long
+ * as it sets up its parse chains correctly.
+ *
+ * csb->sense = TRUE for "debug", FALSE for "undebug".
+ * csb->which = index into flag definition array.
+ * GETOBJ(int,1) = mempointer to beginning of array...
+ */
+
+void debug_command (parseinfo *csb)
+{
+ int i;
+ const debug_item_type *debugarr;
+
+ debugarr = (debug_item_type *)GETOBJ(vptr,0);
+
+ if ( debugarr == NULL )
+ return;
+
+ /*
+ * Sanity check the index -- paranoia is truly a terrible scourge in
+ * these troubled times.
+ */
+ for (i=0; i < csb->which; i++) {
+ if (debugarr[i].var == NULL) {
+ bad_parser_subcommand(csb, csb->which);
+ return;
+ }
+ }
+ *(debugarr[csb->which].var) = csb->sense;
+
+ /* Confirm the change to the user */
+ debug_show_flag(*(debugarr[csb->which].var),
+ debugarr[csb->which].txt);
+}
+
+#if 0
+/*
+ * RAMS : commented this for now
+ */
+extern void debug_http_all();
+extern void debug_icp_all();
+extern void debug_log_all();
+extern void debug_translog_all();
+extern void debug_radius_all();
+extern void debug_tacacs_all();
+extern void debug_snmp_all();
+extern void debug_stat_all();
+extern void debug_wccp_all();
+extern void debug_wi_all();
+extern void debug_url_all();
+extern void debug_rule_all();
+extern void debug_sreg_all();
+extern void debug_https_all();
+extern void debug_authentication_all();
+#endif
+
+/*
+ * debug_all_cmd
+ * Handler for "debug all" and "undebug all". csb->sense is TRUE for "debug",
+ * FALSE for "undebug"
+ */
+
+void debug_all_cmd (parseinfo *csb)
+{
+ /* If we're about to start spewing huge amounts of debugging crap
+ * that might make the system unusable, make sure the user really
+ * wants it to happen...
+ */
+ if ((csb->sense) &&
+ (!yes_or_no("This may severely impact network performance. "
+ "Continue ",FALSE, TRUE )))
+ return;
+
+ debug_all_flag = csb->sense;
+
+ /* Declare an event so the subsystems can set their local flags */
+ invoke_debug_all(debug_all_flag);
+
+#if 0
+ /*
+ *RAMS: commented this for now
+ */
+ /* These modules haven't registered correctly */
+ /* This hack is the simplest way to fix the problem */
+ debug_http_all(csb->sense);
+ debug_icp_all(csb->sense);
+ debug_log_all(csb->sense);
+ debug_translog_all(csb->sense);
+ debug_radius_all(csb->sense);
+ debug_tacacs_all(csb->sense);
+ debug_snmp_all(csb->sense);
+ debug_stat_all(csb->sense);
+ debug_wccp_all(csb->sense);
+ debug_wi_all(csb->sense);
+ debug_url_all(csb->sense);
+ debug_rule_all(csb->sense);
+ debug_sreg_all(csb->sense);
+ debug_https_all(csb->sense);
+ debug_authentication_all(csb->sense);
+#endif
+ /* Confirm to the user */
+ printf("All possible debugging has been turned %s\n",
+ debug_all_flag ? "on" : "off");
+}
+
+/*
+ * show_debug
+ * Show the state of debugging everywhere in the system.
+ */
+
+void show_debug (void)
+{
+ if (debug_all_p()) {
+ printf("\"debug all\" is in effect.\n");
+ }
+ invoke_debug_show();
+}
+
+/*
+ * debug_show_flag
+ * Show the value of a single debugging flag in a standardized format.
+ * Used by subsystems that need to display individual flags, and when
+ * a flag is set or reset. The "flag" argument is the boolean value of
+ * the flag to display. "text" is a description of the debugging the
+ * flag controls.
+ */
+void debug_show_flag (boolean flag, char *text)
+{
+ printf("%s debugging is %s\n", text, flag ? "on" : "off");
+}
+
+/*
+ * debug_show_flags
+ * Show a whole array of flags. Called by subsystems do do their parts
+ * of "show debug". The "heading" argument contains a string that describes
+ * the category into which all the flags to be displayed fall. It will
+ * be displayed if and only if one or more of the flags is true. If the
+ * heading is non-null, all the flags under it will be indented.
+ */
+
+void debug_show_flags (const debug_item_type *array, const char *heading,
+ boolean printLevel )
+{
+ int i;
+ boolean hasheading = FALSE;
+ boolean hdisplayed = FALSE;
+ boolean printNewLine = FALSE;
+
+ if ((heading != NULL) && (*heading != '\0'))
+ hasheading = TRUE;
+ for (i = 0; array[i].var != (boolean *) NULL; i++) {
+ if (*(array[i].var)) {
+ if (hasheading && !hdisplayed) {
+ printf("%s:\n", heading);
+ hdisplayed = TRUE;
+ }
+ printf("%s%s debugging is %s", hasheading ? " " : "",
+ array[i].txt, (*array[i].var) ? "on" : "off");
+ printNewLine = TRUE;
+ if ( *(array[i].var) && printLevel ) {
+ printf(" (Level : %d)\n", *(array[i].var));
+ }
+ printf("\n");
+ }
+ }
+ if ( printNewLine )
+ printf("\n");
+}
+
+/*
+ * generic_debug_all
+ *
+ * a generic routine that <routine_name>_debug_all can call
+ * whenever anybody issues
+ * a "debug all" or "undebug all" command... or whenever you want to
+ * set the state of all the debug_items flags at once. The argument is
+ * TRUE for "debug all", FALSE for "undebug all".
+ */
+
+void generic_debug_all (const debug_item_type *debug_items, boolean flag)
+{
+ while (debug_items->var) {
+ *(debug_items->var) = flag;
+ debug_items++;
+ }
+}
+
+/*
+ * generic_debug_show
+ *
+ * a generic routine that <routine_name>_debug_show can call
+ * whenever anybody issues
+ * a "show debug" command...
+ */
+
+void generic_debug_show (const debug_item_type *debug_items,
+ const char* heading)
+{
+ debug_show_flags(debug_items, heading, FALSE );
+}
+
+
+STATUS generic_debug_init( const debug_item_type *debug_items ,
+ const char *heading )
+{
+
+ if ( add_debug_all(NULL, debug_items) == ERROR ) {
+ return(ERROR);
+ }
+ if ( add_debug_show(NULL, debug_items, heading) == ERROR ) {
+ return(ERROR);
+ }
+ return(OK);
+}
+
+
+int print_debug(char *fmt, ... )
+{
+ int fd = 0;
+ char *buffer = NULL;
+ int nbytes = 0;
+ va_list ap;
+ char *ptr = NULL;
+ /*
+ *following is commented by rams for now
+
+ mutex_lock (pPrintDebugMutex); */
+ va_start( ap, fmt );
+ nbytes = doprnt(NULL, NULL, fmt, ap, TRUE);
+
+ if ( nbytes > 0 ) {
+ buffer = ( char *)PARSERmalloc(sizeof(char) * (nbytes + 1)) ;
+ va_end( ap );
+ if ( buffer ) {
+ va_start( ap, fmt );
+ nbytes = doprnt(buffer, NULL, fmt, ap, TRUE);
+ va_end( ap );
+ } else {
+ /*
+ *following is commented by rams for now
+
+ mutex_unlock (pPrintDebugMutex); */
+ return(-1);
+ }
+ }
+
+ buffer[nbytes] = '\0';
+
+ /*
+ * RAMS: commented this for now
+ for ( fd = 0; fd < MAX_FDS ; fd++ ) {
+ if ( fdArray[fd] != 0 )
+ write( fdArray[fd], buffer, strlen(buffer) );
+ }
+ */
+
+ /* We need this to make sure that the buffer
+ * does not contain "\r\n" ( example SMTP Response )
+ *
+ * Syslog will filter out additional "\n"s
+ */
+ if ( (ptr = strchr(buffer, '\r') ) != NULL ) {
+ *ptr = ' ';
+ }
+ logMsg("%s",buffer,0,0,0,0,0);
+
+ PARSERfree( buffer );
+ /*
+ *following is commented by rams for now
+ mutex_unlock (pPrintDebugMutex); */
+
+ return(nbytes);
+}
diff --git a/data/mnet/Common/cli/src/exec.c b/data/mnet/Common/cli/src/exec.c
new file mode 100644
index 0000000..e1556a3
--- /dev/null
+++ b/data/mnet/Common/cli/src/exec.c
@@ -0,0 +1,389 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <tyLib.h>
+#include <taskLib.h>
+#include <errnoLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <msgQLib.h>
+#include <sigLib.h>
+
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+#include <../include/parser_sim.h>
+#include <../include/parser.h>
+#include <../include/parser_defs_exec.h>
+#include <../include/parser_input.h>
+#include <../include/parser_sim.h>
+#include <../include/parser_util.h>
+#include <../include/parser_commands.h>
+#include <../include/nv.h>
+#include <../include/parser_errno.h>
+#include <../include/parser_ModNum.h>
+#include <../include/defs.h>
+#include <../include/parser_init.h>
+#include <../include/macros.h>
+#include <../include/parser_actions.h>
+
+
+#if 0
+#include <parser/parser.h>
+#include <parser/parser_actions.h>
+#include <parser/parser_defs_config.h>
+#include <parser/parser_errno.h>
+#include <parser/parser_undo.h>
+#include <envLib.h>
+#include <dosfs/uvfatif.h>
+
+
+extern char **buildargv_k( char *, int *, int);
+extern tclMain( int, int, int, int, int, int, int, int );
+
+
+/* BuildPrompt
+ * Build promt at csb->prompt.
+ * This routine is global as it is used by SNA network management
+ */
+void BuildPrompt (parseinfo *csb, tt_soc *tty)
+{
+ int prompt_length; /* leftover length of prompt */
+
+ char Pprompt[MAXPROMPTLEN + 1];
+ char sHostName[MAXHOSTNAMELEN + 1];
+
+ gethostname(sHostName, sizeof(sHostName));
+
+ strncpy(Pprompt, sHostName, MAXPROMPTLEN);
+ Pprompt[MAXPROMPTLEN] = '\0';
+
+ if ( Pprompt[0] != '\0' ) {
+ ;
+ } else if ( sysBootParams.targetName &&
+ *(sysBootParams.targetName) ) {
+ strncpy(Pprompt, sysBootParams.targetName, MAXPROMPTLEN );
+ Pprompt[MAXPROMPTLEN] = '\0';
+ } else {
+ PSpanic("This Cannot be possible ? ? ? \n");
+ strcpy( Pprompt, "Cache Engine");
+ }
+
+ /* Build the prompt. */
+ if (config_prompt || (csb->mode == exec_mode) ||
+ !(csb->flags & CONFIG_TERM)) {
+ const char *src;
+ char *dst, trailer;
+
+ trailer = (csb->priv > PRIV_USER) ? '#' : '>';
+ dst = csb->prompt;
+ src = Pprompt;
+ prompt_length = MAXPROMPTLEN;
+ while (*src && prompt_length--) {
+ *dst++ = *src++;
+ }
+
+ /* dst += reg_invoke_parse_cli_prompt(tty->parse_cli_type,
+ csb, dst, &prompt_length);
+ */
+ src = get_mode_prompt(csb);
+ if (src && (prompt_length > 3)) {
+ prompt_length -= 3;
+ *dst++ = '(';
+ while (*src && prompt_length--) {
+ *dst++ = *src++;
+ }
+ *dst++ = ')';
+ } else {
+ /*
+ * Prompt is too long, so cut off end
+ */
+ if (prompt_length <= 0) {
+ dst = &csb->prompt[MAXPROMPTLEN-1];
+ }
+ }
+ *dst++ = trailer;
+ *dst = '\0';
+ } else {
+ csb->prompt[0] = '\0';
+ }
+}
+
+
+
+
+void terminalCmd( parseinfo *csb )
+{
+
+ int realOutFd = csb->savedFd;
+
+ csb->giveConfigSem = TRUE;
+
+ if ( csb->nvgen ) {
+ nv_write( ( ( csb->which == TERM_LENGTH) &&
+ ( terminalLength != LINES )) ,
+ "%s %d", csb->nv_command, terminalLength);
+ return;
+ }
+
+ if ( csb->which == TERM_LENGTH ) {
+ parse_undo(csb, "terminal length %d", terminalLength);
+ terminalLength = GETOBJ(int, 1);
+ return;
+ } else if ( csb->which == TERM_MONITOR) {
+ if ( realOutFd == consoleFd ) {
+ printf("Console is always monitored\n");
+ return;
+ }
+
+ if ( csb->sense ) {
+ if ( registerFd( realOutFd ) != RC_OK )
+ printf("Cannot monitor the terminal\n");
+ } else {
+ if ( unregisterFd( realOutFd ) != RC_OK );
+ printf("Cannot stop monitoring the terminal\n");
+ }
+ }
+}
+
+static void
+tclshTask(int argc, const char *const*argv, parseinfo *csb)
+{
+ SEM_ID sema;
+ long moduleId;
+ parseinfo *tclCsb;
+ char *uvfatBuffer = NULL;
+ tpUVFATFREEFUNC pFreeFunc = NULL;
+ char *pCwd = NULL;
+ tUID uid = csb->uid;
+ int err;
+ tCOMSIM *pComSim = NULL;
+ short rc = RC_OK;
+ int inFd = csb->inFd;
+ int outFd = csb->outFd;
+ extern int setenv(const char *, const char *);
+ extern int tclStart(int, const char *const *, const char *const*, const char *);
+
+ ioSetTerminalMode(inFd, IO_LINE_MODE);
+ ioTaskStdSet( 0, STD_IN, inFd );
+ ioTaskStdSet( 0, STD_OUT, outFd );
+ ioTaskStdSet( 0, STD_ERR, outFd );
+
+ if (setUid(uid) == FALSE) {
+ fprintf( stderr, "Invalid UID Obtained %d\n", uid);
+ fflush( stderr );
+ return;
+ }
+
+ moduleId = ASSIGN_MODULE_ID;
+ sema = PSsemCCreate(PS_DEFAULT_COUNT_SEM_FLAG, 0);
+ if (imc_add(&moduleId, sema, taskIdSelf()) == ERROR) {
+ PSpanic("Cannot add TCL Task to IMC\n");
+ }
+ if ( (tclCsb = get_csb("TCL CSB")) == NULL ) {
+ PSpanic("NULL CSB For TCL!!!!\n");
+ }
+
+ tclCsb->flags = CONFIG_TERM;
+ tclCsb->priv = csb->priv;
+ tclCsb->uid = csb->uid;
+ tclCsb->inFd = inFd;
+ tclCsb->outFd = outFd;
+ tclCsb->ioTaskId = csb->ioTaskId;
+ tclCsb->io_timer = csb->io_timer;
+ *(tclCsb->line) = '\0';
+
+ /* Get the current working directory of the I/O Source
+ */
+ pCwd = getTaskCWD_k( ((parseinfo*)csb)->ioTaskId, &pFreeFunc ) ;
+ if ( pCwd ) {
+ setCWD( pCwd );
+ pFreeFunc( pCwd );
+ pFreeFunc = NULL;
+ }
+
+ fflush( stdin ) ;
+ fflush( stdout ) ;
+
+ uvfatBuffer = getHomeDir_k(&pFreeFunc);
+ setenv( "HOME", (uvfatBuffer == NULL)?mVOLNAME:uvfatBuffer );
+ pFreeFunc( uvfatBuffer );
+ uvfatBuffer = NULL;
+ pFreeFunc = NULL;
+
+ uvfatBuffer = getNameByUid_k( uid , &pFreeFunc);
+ setenv( "USER", uvfatBuffer );
+ pFreeFunc( uvfatBuffer );
+ uvfatBuffer = NULL;
+ pFreeFunc = NULL;
+
+ err = tclStart(argc, argv, NULL, NULL);
+
+ /*
+ * Clean up the mess and
+ * Send a message back to the parser
+ * to let them know we are done.
+ */
+ if (csb != NULL) {
+ ((parseinfo *)csb)->MoreStatus = RC_OK ;
+ pComSim = NULL;
+ pComSim = mGETSIM( sizeof( tCOMSIM ) ) ;
+
+ if (pComSim == NULL)
+ {
+ printf("Not enough memory...please try later\n");
+ rc = RC_ERR;
+ }
+ else
+ {
+ mFILL_COM_SIM( pComSim, moduleId, \
+ ((parseinfo *)csb)->moduleId,
+ IO_WAIT_COMPLETE_IND, 0, NULL, 0, RC_OK );
+
+ mPOST_SIM_NIND( pComSim, rc );
+ }
+
+ free_csb(&(tclCsb));
+
+ if ( imc_remove( moduleId ) != RC_OK ) {
+ printf("tTcl: Cannot remove IMC \n");
+ }
+ if ( semDelete( sema ) == ERROR ) {
+ printf("tTcl: Could not delete TCL Semaphore\n");
+ }
+ sema = NULL;
+ tclCsb = NULL;
+ }
+
+ /* Check if we got to free the argv[] in our case */
+ if (argv != NULL) {
+
+ /* Free argv[argc - 1] till argv[0] */
+
+ while ( --argc >= 0 ) {
+ PSkfree( ((char **)argv)[argc], M_TCL);
+ }
+
+ PSkfree( (char **) argv, M_TCL );
+
+ }
+
+ /* Require this for CGI
+ * This effectively puts EOF in the FD which
+ * may be the terminating condition of 'fgets' or
+ * 'read'
+ */
+ if ( outFd ) {
+ ioctl(outFd, FIOCANCEL, 0);
+ write(outFd, "", 0 );
+ }
+}
+
+
+void tclshCommand( parseinfo *csb )
+{
+ char **argv = NULL;
+ int argc = 0;
+ char *pArg = GETOBJ(string, 1 );
+ char *temp = NULL;
+ int tid = 0;
+ char tname[20];
+
+ temp = PARSERmalloc((strlen(pArg) + strlen("tclsh") + 3));
+ strcpy(temp,"tclsh");
+
+ if ( strcmp( pArg, "") != 0 ){
+ strcat(temp, " ");
+ strcat(temp, pArg);
+ }
+
+ /* Note: argv is NOT allocated from Parser Pool */
+ argv = buildargv_k( temp, &argc, M_TCL ) ;
+
+ PARSERfree( temp );
+
+ if ( argv == NULL ) {
+ csb->MoreStatus = RC_OK;
+ return;
+ }
+
+ sprintf(tname, "tTcl%u", csb->outFd);
+ tid = PStaskSpawn(tname, PS_STD_PRIORITY, VX_PRIVATE_ENV|VX_FP_TASK,
+ PS_ENORMOUS_STACK, (FUNCPTR) tclshTask, (int)argc,
+ (int)argv,(int)csb,
+ 0,0,0,0,0,0,0);
+ if (tid == ERROR) {
+ csb->MoreStatus = RC_OK;
+ return;
+ }
+
+ /* Indicate to the source that it has a child that it has
+ * to take care of
+ */
+ csb->pIndex = (void*) tid;
+
+ /* Wait till TCL completes */
+ csb->MoreStatus = RC_WAIT;
+}
+#endif
+
+
+/*
+ * exec_help_command
+ *
+ * Provide the user with an introduction to the interactive
+ * help mechanism of the new parser.
+ */
+void exec_help_command (parseinfo *csb)
+{
+ csb->giveConfigSem = TRUE;
+
+ if (csb->nvgen) {
+ return;
+ }
+
+ printf("\nHelp may be requested at any point in a command by entering"
+ "\na question mark '?'. If nothing matches, the help list will"
+ "\nbe empty and you must backup until entering a '?' shows the"
+ "\navailable options."
+ "\nTwo styles of help are provided:"
+ "\n1. Full help is available when you are ready to enter a"
+ "\n command argument (e.g. 'show ?') and describes each possible"
+ "\n argument."
+ "\n2. Partial help is provided when an abbreviated argument is entered"
+ "\n and you want to know what arguments match the input"
+ "\n (e.g. 'show stat?'.)\n");
+}
+
+void show_help_command (parseinfo *csb)
+{
+ printf("\n%% Type \"%s ?\" for a list of subcommands\n", "show");
+ parser_return(csb, S_parser_SYNTAX_INCOMPLETE);
+}
+
+void clear_help_command (parseinfo *csb)
+{
+ printf("\n%% Type \"%s ?\" for a list of subcommands\n", "clear");
+ parser_return(csb, S_parser_SYNTAX_INCOMPLETE);
+}
+
+void debug_help_command (parseinfo *csb)
+{
+ printf("\n%% Type \"%s ?\" for a list of subcommands\n", "debug");
+ parser_return(csb, S_parser_SYNTAX_INCOMPLETE);
+}
+
+void show_version (parseinfo *csb)
+{
+ /* printVersion(); */
+ printf("\n SHOW version called");
+}
diff --git a/data/mnet/Common/cli/src/exec_chain.c b/data/mnet/Common/cli/src/exec_chain.c
new file mode 100644
index 0000000..6b5dc7c
--- /dev/null
+++ b/data/mnet/Common/cli/src/exec_chain.c
@@ -0,0 +1,160 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <tyLib.h>
+#include <taskLib.h>
+#include <errnoLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <msgQLib.h>
+#include <sigLib.h>
+
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+#include <../include/parser_sim.h>
+#include <../include/parser.h>
+#include <../include/parser_defs_exec.h>
+#include <../include/parser_input.h>
+#include <../include/parser_sim.h>
+#include <../include/parser_util.h>
+#include <../include/parser_commands.h>
+#include <../include/nv.h>
+#include <../include/parser_errno.h>
+#include <../include/parser_ModNum.h>
+#include <../include/defs.h>
+#include <../include/parser_init.h>
+#include <../include/macros.h>
+#include <../include/parser_actions.h>
+/*
+ * Parse chains for Exec help commands
+ */
+#define ALTERNATE NONE
+#include "../include/exec_help.h"
+LINK_POINT(global_commands, ALTERNATE);
+#undef ALTERNATE
+
+
+/*
+ * Parse chains for Exec exec commands
+ */
+#define ALTERNATE NONE
+/*#include "../include/exec_type.h"*/
+/*#include "../include/exec_copy.h"*/
+/*#include "../include/exec_reload.h"*/
+LINK_POINT(exec_exec_commands, ALTERNATE);
+#undef ALTERNATE
+
+
+/*
+ * Parse chains for Exec show commands
+ */
+#define ALTERNATE NONE
+/*#include "../include/exec_show_version.h" */
+/*#include "../include/exec_show_debugging.h"*/
+/*#include "../include/exec_show_techsupport.h"*/
+LINK_POINT(exec_show_cmds, ALTERNATE);
+#undef ALTERNATE
+
+/*
+ * Parse chains for Exec copy commands
+ */
+#define ALTERNATE NONE
+/*#include "../include/exec_copy_techsupport.h"*/
+LINK_POINT(exec_copy_commands, ALTERNATE);
+#undef ALTERNATE
+
+
+/*
+ * Parse chains for copy running-configuration
+ */
+#define ALTERNATE NONE
+/*#include "../include/exec_copy_running_cfg.h"*/
+LINK_POINT(copy_running_cfg_cmds, ALTERNATE);
+#undef ALTERNATE
+
+/*
+ * Parse chains for copy startup-config
+ */
+#define ALTERNATE NONE
+/*#include "../include/exec_copy_startup_cfg.h"*/
+LINK_POINT(copy_startup_cfg_cmds, ALTERNATE);
+#undef ALTERNATE
+
+#define ALTERNATE NONE
+EOLS(exec_tftp_startup_eol, write_config, COPY_TFTP_STARTUP_CONFIG);
+KEYWORD(exec_copy_tftp_startup, exec_tftp_startup_eol, ALTERNATE,
+ "startup-config", "TFTP Server to Startup(NVRAM) Configuration",
+ PRIV_ROOT);
+LINK_POINT(copy_tftp_startup_cmds, exec_copy_tftp_startup);
+#undef ALTERNATE
+
+
+#define ALTERNATE NONE
+EOLS(exec_disk_startup_eol, write_config, COPY_DISK_STARTUP_CONFIG);
+STRING(exec_disk_startup_string, exec_disk_startup_eol, no_alt,
+ OBJ(string, 1), "Filename of existing configuration" );
+KEYWORD(exec_copy_disk_startup, exec_disk_startup_string, ALTERNATE,
+ "startup-config", "Disk to Startup(NVRAM) Configuration",
+ PRIV_ROOT);
+LINK_POINT(copy_disk_startup_cmds, exec_copy_disk_startup);
+#undef ALTERNATE
+
+/*
+ * Parse chain registration array for Exec
+ */
+static parser_extension_request exec_chain_init_table[] = {
+ { PARSE_ADD_EXEC_CMD, &pname(exec_exec_commands) },
+ { PARSE_ADD_SHOW_CMD, &pname(exec_show_cmds) },
+ { PARSE_ADD_GLOBAL_CMD, &pname(global_commands) },
+ { PARSE_ADD_COPY_CMD, &pname(exec_copy_commands) },
+ { PARSE_ADD_COPY_RUNNING_CMD, &pname(copy_running_cfg_cmds) },
+ { PARSE_ADD_COPY_STARTUP_CMD, &pname(copy_startup_cfg_cmds) },
+ { PARSE_ADD_COPY_DISK_CMD, &pname(copy_disk_startup_cmds) },
+ { PARSE_ADD_COPY_TFTP_CMD, &pname(copy_tftp_startup_cmds) },
+ { PARSE_LIST_END, NULL }
+};
+
+/*
+ * exec_parser_init - Initialize Exec parser support
+ */
+void exec_parser_init (void)
+{
+ static int exec_parser_initialized = FALSE;
+
+ if (!exec_parser_initialized) {
+ /* copy ... */
+#if 0
+ RAMS: commented this for now
+ parser_add_link_point(PARSE_ADD_COPY_CMD, "copy",
+ &pname(exec_copy_extend_here));
+
+ /* copy run-config ... */
+ parser_add_link_point(PARSE_ADD_COPY_RUNNING_CMD,
+ "copy running-config *",
+ &pname(exec_copy_running_extend_here));
+ parser_add_link_point(PARSE_ADD_COPY_RUNNING_FILE_CMD,
+ "copy running-config *",
+ &pname(exec_copy_running_file_extend_here));
+ /* copy start-config ... */
+ parser_add_link_point(PARSE_ADD_COPY_STARTUP_CMD,
+ "copy startup-config *",
+ &pname(exec_copy_startup_extend_here));
+ parser_add_link_point(PARSE_ADD_COPY_STARTUP_FILE_CMD,
+ "copy startup-config *",
+ &pname(exec_copy_startup_file_extend_here));
+#endif
+ parser_add_command_list(exec_chain_init_table, "exec");
+
+ exec_parser_initialized = TRUE;
+ }
+}
diff --git a/data/mnet/Common/cli/src/imc.c b/data/mnet/Common/cli/src/imc.c
new file mode 100644
index 0000000..7f21945
--- /dev/null
+++ b/data/mnet/Common/cli/src/imc.c
@@ -0,0 +1,513 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <taskLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <stdlib.h>
+#include <string.h>
+
+
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/platdef.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+
+/*
+ ** EXTERNAL VARIABLES
+ */
+
+/*
+ ** GLOBAL VARIABLES
+ */
+LIST *pimcListHead = NULL; /* Pointer to IMC ListHead */
+tUOCTET4 freeIndex = LAST_MODULE + 1; /* Free Index for dynamic IMC */
+SEM_ID freeIndexSemId; /* Protect freeIndex */
+tpIMC_QANCHOR pimcglp[MAX_IMC_COUNT]; /* Array for Indexing */
+boolean imcInited = FALSE;
+tOCTET4 imc_global_count = 0; /* keeps track of the TOTAL number
+ of entries in the imc */
+/*
+ ** STATIC VARIABLES
+ */
+
+/*
+ **
+ ** Prototypes
+ **
+ */
+static tOCTET2 imc_cleanup( tOCTET4 );
+
+#ifndef USE_IMC_MACROS
+static LIST* imc_get_queue( tOCTET4 , IMC_QUEUE_TYPE );
+static void imc_change_global_count( tOCTET2 );
+tOCTET2 imc_post_sim( tpCOMSIM , IMC_QUEUE_TYPE );
+void imc_get_sim( tpCOMSIM *, tUOCTET4 , IMC_QUEUE_TYPE );
+#endif
+
+/*COMMENTS*********************************************************
+ *
+ * Func: imc_init
+ *
+ * Desc: Initialize the IMC Anchor and global count Semaphore
+ *
+ * Inputs: None
+ *
+ * Outputs: RC_OK
+ *
+ *
+ *END*********************************************************************/
+
+tOCTET2 imc_init( void )
+{
+ if ( !imcInited ) {
+ tUOCTET2 index = 0;
+ imcInited = TRUE;
+
+ /* Create global Mutex Semaphores */
+
+ imc_global_count = 0;
+
+ freeIndexSemId = PSsemMCreate ( PS_DEFAULT_MUTEX_SEM_FLAG |
+ SEM_DELETE_SAFE);
+
+ if ( freeIndexSemId == NULL ) {
+ printf("imc_init:Could not create Free index semaphore\n");
+ return RC_ERR;
+ }
+
+ /* The head of the Anchor Block List */
+ if ( ( pimcListHead = (LIST*)IMCcalloc(1,sizeof(LIST))) == NULL ) {
+ printf("imc_init:Could not create global list\n");
+ PSsemDelete ( freeIndexSemId );
+ return RC_ERR;
+ }
+
+ lstInit(pimcListHead);
+
+ for ( index = 0; index < MAX_IMC_COUNT ; index++ )
+ pimcglp[index] = NULL;
+ }
+ return ( RC_OK );
+}
+
+
+/*COMMENTS*********************************************************
+ *
+ * Func: imc_add
+ *
+ * Desc: Dynamically allocate IMC for ** SUBTASKS **
+ * Well known modules * MUST * announce their Module ID
+ * as *pIndex whereas SUBTASKS send it as ASSIGN_MODULE_ID
+ * (-1 )
+ * Inputs: tUOCTET
+ *
+ * Outputs: RC_OK / RC_ERR
+ *
+ *
+ *END*********************************************************************/
+
+tOCTET2 imc_add( tpOCTET4 pIndex, tSEMAPHORE semId, tTASKID taskId )
+{
+
+
+ if ( PSsemTake ( freeIndexSemId, WAIT_FOREVER ) == ERROR ) {
+ panic("imc_add:Could not take free index semaphore\n");
+ return ( RC_ERR );
+ }
+
+ {
+ tUOCTET4 origIndex = 0;
+ tpIMC_QANCHOR pimcElement = NULL;
+
+ if ( pIndex == NULL ) {
+ printf("imc_add:NULL Index passed to imc_add\n");
+ PSsemGive( freeIndexSemId );
+ return (RC_ERR);
+ }
+
+
+ if ( *pIndex == ASSIGN_MODULE_ID ) {
+
+ origIndex = freeIndex;
+ freeIndex %= MAX_IMC_COUNT;
+ freeIndex = ( freeIndex == 0 )
+ ? (LAST_MODULE + 1)
+ : freeIndex;
+
+ while ( pimcglp[freeIndex] != NULL ) {
+ freeIndex++;
+ freeIndex %= MAX_IMC_COUNT;
+
+ /* If wrap-around, do not assign any "Well-known"
+ * Module Ids
+ */
+ freeIndex = ( freeIndex == 0 )
+ ? (LAST_MODULE + 1)
+ : freeIndex;
+
+ /* Make sure that we have space to add ! */
+ if ( origIndex == freeIndex ) {
+ printf("imc_add:Could not add new IMC\n");
+ PSsemGive ( freeIndexSemId );
+ return (RC_ERR);
+ }
+
+ }
+ *pIndex = freeIndex;
+ }
+
+ if ( pimcglp[*pIndex] != NULL ) {
+ printf("IMC for module %ld exists!\n", *pIndex );
+ return (RC_ERR);
+ }
+
+ pimcElement = (tpIMC_QANCHOR) IMCmalloc( sizeof( tIMC_QANCHOR ) );
+ memset( (void *)pimcElement, 0, sizeof(tIMC_QANCHOR));
+ if ( pimcElement == NULL ) {
+ printf("imc_add:Calloc failed from IMC Element\n");
+ PSsemGive ( freeIndexSemId );
+ return (RC_ERR);
+ }
+
+ pimcElement->taskId = taskId;
+ pimcElement->semId = semId;
+ pimcElement->workCount = 0;
+ lstInit(&(pimcElement->pimc_req ));
+ lstInit(&(pimcElement->pimc_ind ));
+ lstInit(&(pimcElement->pimc_exp_req ));
+ lstInit(&(pimcElement->pimc_exp_ind ));
+
+ pimcglp[*pIndex] = pimcElement;
+
+ lstAdd( pimcListHead, &(pimcElement->imc_element) );
+
+ if ( PSsemGive ( freeIndexSemId ) == ERROR ) {
+ panic ("imc_add:Could not give free index semaphore\n");
+ return ( RC_ERR );
+ }
+
+ return ( RC_OK );
+ }
+} /* end imc_init */
+
+
+
+/*COMMENTS*********************************************************
+ *
+ * Func: imc_remove
+ *
+ * Desc: Dynamically de-allocate IMC for ** SUBTASKS **
+ *
+ * Inputs: tUOCTET4
+ *
+ * Outputs: RC_OK / RC_ERR
+ *
+ *END*********************************************************************/
+
+tOCTET2 imc_remove( tUOCTET4 index )
+{
+
+ if ( PSsemTake ( freeIndexSemId, WAIT_FOREVER ) == ERROR ) {
+ panic("imc_remove:Could not take free index semaphore\n");
+ return ( RC_ERR );
+ }
+
+ if ( pimcglp[index] == NULL ) {
+ printf("Cannot find IMC Entry\n");
+ PSsemGive ( freeIndexSemId );
+ return (RC_ERR);
+ }
+
+ imc_cleanup( index );
+
+ if ( index > LAST_MODULE )
+ freeIndex = index;
+
+ pimcglp[index] = NULL;
+
+ if ( PSsemGive ( freeIndexSemId ) == ERROR ) {
+ panic ( "imc_remove:Could not give free index semaphore\n");
+ return ( RC_ERR );
+ }
+
+ return ( RC_OK );
+
+} /* imc_remove */
+
+
+/*COMMENTS*********************************************************
+ *
+ * Func: imc_term
+ *
+ * Desc: Release imc queues
+ *
+ * Inputs: None.
+ *
+ * Outputs: RC_OK
+ *
+ *
+ *END*********************************************************************/
+
+void imc_term()
+{
+ /* We assume that each layer has cleaned up their
+ interactions without generating any more */
+ int index = 0;
+
+ /* Deque & Cleanup elements from the lists */
+ /* in the anchor block */
+ for ( index = 0; index < MAX_IMC_COUNT ; index++ ){
+ if ( pimcglp[index] != NULL ) {
+ imc_cleanup( index );
+ }
+ }
+
+ lstFree( pimcListHead );
+
+ PSsemDelete( freeIndexSemId );
+
+}/*end imc_term */
+
+/*COMMENTS*********************************************************
+ *
+ * Func: imc_cleanup
+ *
+ * Desc: Dequeue elements, if any, from IMC lists.
+ *
+ * Inputs: index to the global array.
+ *
+ * Outputs: RC_OK
+ *
+ *
+ *END*********************************************************************/
+tOCTET2 imc_cleanup ( tOCTET4 index )
+{
+ /* This is already protected by freeIndexSemId */
+ /* Hence no need to Mutex this section */
+
+ NODE* element = (NODE *)NULLP;
+
+ /* Should Possibly be freeing the elements from non-empty queues*/
+
+ while ( ( element = lstGet( &(pimcglp[index]->pimc_req) ) ) != NULLP )
+ ; /* Do Nothing */
+
+ while ( ( element = lstGet( &(pimcglp[index]->pimc_ind) ) ) != NULLP )
+ ; /* Do Nothing */
+
+
+ while ( ( element = lstGet(&(pimcglp[index]->pimc_mgmt) ) ) != NULLP )
+ ; /* Do Nothing */
+
+ while ( ( element = lstGet(&(pimcglp[index]->pimc_exp_req) ) ) != NULLP )
+ ; /* Do Nothing */
+
+ while ( ( element = lstGet(&(pimcglp[index]->pimc_exp_ind) ) ) != NULLP )
+ ; /* Do Nothing */
+
+ lstFree(&pimcglp[index]->pimc_req);
+ lstFree(&pimcglp[index]->pimc_ind);
+ lstFree(&pimcglp[index]->pimc_mgmt);
+ lstFree(&pimcglp[index]->pimc_exp_req);
+ lstFree(&pimcglp[index]->pimc_exp_ind);
+
+ lstDelete( pimcListHead, &((pimcglp[index])->imc_element) );
+
+ IMCfree ( pimcglp[index] );
+
+ return ( RC_OK );
+}
+
+
+#ifndef USE_IMC_MACROS
+
+/*COMMENTS*********************************************************
+ *
+ * Func: imc_post_sim
+ *
+ * Desc: Post a Sim to the Given Queue of the Module
+ *
+ * Inputs: Post Type enum POST_QUEUE
+ * SIM tpCOMSIM pComSim
+ *
+ * Outputs: RC_OK ( or )
+ * RC_ERR
+ *
+ *
+ *END*********************************************************************/
+
+tOCTET2 imc_post_sim( tpCOMSIM pComSim, IMC_QUEUE_TYPE queue )
+{
+ tOCTET2 rc = RC_OK;
+ LIST *pListHead = NULL;
+
+ if ( PSsemTake( freeIndexSemId,WAIT_FOREVER ) == ERROR) {
+ panic("mPOST_SIM:Could not get semaphore\n");
+ rc = RC_ERR;
+ }
+ else if ( (pimcglp[pComSim->destid] == NULL ) ) {
+ printf("%s: ", taskName( taskIdSelf() ));
+ printf("NULL IMC Anchor for Destination %ld",(pComSim)->destid );
+ rc = RC_ERR;
+ }
+ else {
+
+ pListHead = imc_get_queue( pComSim->destid, queue );
+ if ( pListHead == NULL ) {
+ panic ("mPOST_SIM: Error occurred getting Queue to POST\n");
+ rc = RC_ERR;
+ }else {
+ lstAdd(pListHead, &(pComSim->simq));
+ imc_change_global_count( INCREMENT );
+ ++((pimcglp[pComSim->destid])->workCount);
+
+ if ( PSsemGive( mMID2SEM(pComSim->destid))== ERROR ) {
+ panic("mPOST_SIM:Could not give Task semaphore\n");
+ rc = RC_ERR;
+ }
+ }
+ }
+
+ if ( PSsemGive( freeIndexSemId ) == ERROR) {
+ panic("mPOST_SIM_NREQ:Could not give Index semaphore\n");
+ rc = RC_ERR;
+ }
+
+ return ( rc );
+}
+
+/*COMMENTS*********************************************************
+ *
+ * Func: imc_get_queue
+ *
+ * Desc: Get the Listhead of the Queue from a Module
+ *
+ * Inputs: Module Id tOCTET4 moduleId
+ * Queue Type enum IMC_QUEUE_TYPE
+ *
+ * Outputs: LIST*
+ * NULL on Error
+ *
+ *
+ *
+ *END*********************************************************************/
+
+static LIST* imc_get_queue( tOCTET4 moduleId, IMC_QUEUE_TYPE queue )
+{
+ LIST* pListHead = NULL;
+
+ switch ( queue ) {
+
+ case MGMT_QUEUE:
+ pListHead = ( mMID2MGMT(moduleId) );
+ break;
+
+ case NIND_QUEUE:
+ pListHead = ( mMID2NIND(moduleId) );
+ break;
+
+ case EIND_QUEUE:
+ pListHead = ( mMID2EIND(moduleId) );
+ break;
+
+ case NREQ_QUEUE:
+ pListHead = ( mMID2NREQ(moduleId) );
+ break;
+
+ case EREQ_QUEUE:
+ pListHead = ( mMID2EREQ(moduleId) );
+ break;
+
+ default:
+ pListHead = ( NULL );
+
+ }
+
+ return ( pListHead );
+}
+
+
+/*COMMENTS*********************************************************
+ *
+ * Func: imc_change_global_count
+ *
+ * Desc: Change the global work count
+ *
+ * Inputs: INCREMENT / DECREMENT
+ *
+ * Outputs: None
+ *
+ *END*********************************************************************/
+void imc_change_global_count( tOCTET2 action )
+{
+ if ( action == INCREMENT )
+ ++imc_global_count;
+ else if ( action == DECREMENT ) {
+ --imc_global_count;
+ if ( imc_global_count < 0 ) {
+ panic("mCHANGEGLOBALCOUNT: Negative Count\n"); \
+ }
+ } else {
+ printf("\n%s: ", taskName( taskIdSelf() ));\
+ printf("mCHANGEGLOBALCOUNT:Invalid Action\n"); \
+ }
+}
+
+
+/*COMMENTS*********************************************************
+ *
+ * Func: imc_get_sim
+ *
+ * Desc: Get a Sim to the Module
+ *
+ * Inputs: Post Type enum POST_QUEUE
+ * Module Id tOCTET2 moduleID
+ * SIM tpCOMSIM pComSim
+ *
+ * Outputs: None
+ *
+ *
+ *END*********************************************************************/
+
+void imc_get_sim( tpCOMSIM *ppComSim, tUOCTET4 moduleId, IMC_QUEUE_TYPE queue )
+{
+ tOCTET2 rc = RC_OK;
+ LIST* pListHead = NULL;
+ tOCTET2 workCount = 0;
+
+ if ( PSsemTake( freeIndexSemId,WAIT_FOREVER ) == ERROR) {
+ panic("mGET_SIM:Could not get semaphore\n");
+ rc = RC_ERR;
+ }
+ else if ( (pimcglp[moduleId] == NULL ) ) {
+ printf("%s: ", taskName( taskIdSelf() ));
+ printf("NULL IMC Anchor for Destination %ld",moduleId );
+ rc = RC_ERR;
+ }
+ else {
+ pListHead = imc_get_queue( moduleId, queue );
+ if ( pListHead == NULL ) {
+ panic ("mGET_SIM: Error occurred getting Queue to GET\n");
+ rc = RC_ERR;
+ }else {
+
+ workCount = lstCount( pListHead );
+ if ( workCount < 0 ) {
+ panic("mGET_SIM:Negative Work count obtained\n");
+ } else if ( workCount > 0 ) {
+ *ppComSim = ( tpCOMSIM ) lstGet( pListHead );
+ imc_change_global_count( DECREMENT );
+ --((pimcglp[moduleId])->workCount);
+ } else
+ *ppComSim = NULL;
+
+ if ( PSsemGive( freeIndexSemId ) == ERROR ) {
+ panic("mGET_SIM:Could not give Free Index semaphore\n");
+ rc = RC_ERR;
+ }
+ }
+ }
+}
+
+#endif
diff --git a/data/mnet/Common/cli/src/imsg.c b/data/mnet/Common/cli/src/imsg.c
new file mode 100644
index 0000000..7c1fd98
--- /dev/null
+++ b/data/mnet/Common/cli/src/imsg.c
@@ -0,0 +1,138 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <taskLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <stdlib.h>
+#include <string.h>
+
+
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+
+#include <../include/imsg.h>
+
+
+/*COMMENTS*********************************************************
+ *
+ * Func: imsg_getsim
+ *
+ * Desc: Allocate Memory and create a Semaphore for Ownership
+ *
+ * Inputs: tUOCTET4 size Size of Memory to Allocate
+ *
+ * Outputs: tpCOMSIM Pointer to the SIM or NULL if allocate failed
+ *
+ *
+ *END*********************************************************************/
+
+tpCOMSIM imsg_getsim (tOCTET4 size)
+{
+ tpCOMSIM pComSim = NULL;
+
+ pComSim = (tpCOMSIM)IMCcalloc(1, size);
+
+ if ( !pComSim )
+ {
+ PSprintf("imsg_getsim(): mGETSIM Failed!; size=%ld\n", size);
+ return ( NULL );
+ }
+ else {
+ pComSim->ownerSemId = PSsemMCreate( PS_DEFAULT_MUTEX_SEM_FLAG );
+ if ( pComSim->ownerSemId == NULL ) {
+ PSpanic ( "imsg_getsim : Could not create owner id semaphore\n");
+ return ( NULL );
+ }
+ }
+
+ return ( pComSim );
+
+}/* end imsg_getsim */
+
+
+
+/*COMMENTS*********************************************************
+ *
+ * Func: imsg_zerosim
+ *
+ * Desc: Zero-out SIM
+ *
+ * Inputs: tpCOMSIM pSim SIM to zero-out
+ *
+ * Outputs: NONE
+ *
+ * Outputs: For debugging aid. getsim does memset
+ *
+ *END*********************************************************************/
+
+void imsg_zerosim( tpCOMSIM pSim )
+{
+ if ( !pSim ) {
+ printf("%s(mZEROSIM):", taskName( taskIdSelf() ));
+ printf("NULL SIM passed\n");
+ return;
+ }
+ pSim->simq.next = NULL;
+ pSim->simq.previous = NULL;
+ pSim->ownership = 0;
+ pSim->origid = 0;
+ pSim->destid = 0;
+ pSim->requestid = 0;
+ pSim->serviceid = 0;
+ pSim->status = 0;
+ pSim->ownerSemId = NULL;
+ pSim->pLayerSim = NULL;
+
+}
+
+#ifndef USE_IMC_MACROS
+
+/*COMMENTS*********************************************************
+ *
+ * Func: imsg_freesim
+ *
+ * Desc: Free SIM
+ *
+ * Inputs: tpCOMSIM pSim SIM to Free
+ *
+ * Outputs: NONE
+ *
+ * Outputs:
+ *
+ *END*********************************************************************/
+
+void imsg_freesim( tpCOMSIM pSim )
+{
+
+ /* Make sure no one does it at the same time */
+ if ( PSsemTake(pSim->ownerSemId, WAIT_FOREVER ) == ERROR ) {
+ PSpanic("Could not Take Ownership Semaphore ");
+ }
+ else if (pSim->ownership == 0) {
+
+ /* We are the sole owner... */
+ if(pSim->pLayerSim ) {
+ /* We cannot assume that this has been created using
+ * IMC type of memory. This should be done using
+ * malloc/calloc ?
+ */
+ PSfree(pSim->pLayerSim);
+ pSim->pLayerSim = NULL;
+ }
+
+ PSsemDelete(pSim->ownerSemId);
+ IMCfree(pSim);
+
+ }
+ else {
+
+ /* Someone else also wants it */
+ --(pSim->ownership);
+
+ if (PSsemGive(pSim->ownerSemId) == ERROR ) {
+ PSpanic("mFREESIM:Could not Give Ownership Semaphore\n");
+ }
+ }
+}
+
+#endif
diff --git a/data/mnet/Common/cli/src/ip_address.c b/data/mnet/Common/cli/src/ip_address.c
new file mode 100644
index 0000000..5f7331f
--- /dev/null
+++ b/data/mnet/Common/cli/src/ip_address.c
@@ -0,0 +1,958 @@
+#include "parser_if.h"
+
+#define IOS_PARSER
+#include <inetLib.h>
+
+/*#include <cenetdb.h> for inetGetHostByName() reference */
+/* #include <cacheapp/utils.h> for remove_ws() reference */
+
+static char *ip_addr_short_help (parseinfo *, uint, void * );
+static char *parser_xlate_errcode(int errorCode);
+
+boolean match_ip_addr (parseinfo *, char *, int *, void *, int , uint, void *);
+
+boolean subnetzero_enable;
+
+void ip_address_init( void )
+{
+ subnetzero_enable = FALSE;
+ parser_add_address(ADDR_IP, ip_addr_short_help, match_ip_addr);
+}
+
+char *ip_addr_short_help (parseinfo *csb, uint flag, void *idb )
+{
+ if (flag & ADDR_NAME_LOOKUP) {
+ return("Hostname or A.B.C.D");
+ } else {
+ return("A.B.C.D");
+ }
+}
+
+boolean match_ip_addr (parseinfo *csb, char *buf, int *pi, void *addr_pointer,
+ int in_help, uint flag, void *idb)
+{
+ addrtype *addrp = (addrtype *)addr_pointer;
+ ushort num[4];
+ boolean matched;
+ int init_ptr = *pi;
+
+
+ if (match_decimal(buf, 0, 255, pi, &num[0]) &&
+ match_char(buf, pi, '.') &&
+ match_decimal(buf, 0, 255, pi, &num[1]) &&
+ match_char(buf, pi, '.') &&
+ match_decimal(buf, 0, 255, pi, &num[2]) &&
+ match_char(buf, pi, '.') &&
+ match_decimal(buf, 0, 255, pi, &num[3])) {
+
+ addrp->ip_addr = ((((ulong) num[0]) << 24) |
+ (((ulong) num[1]) << 16) |
+ (((ulong) num[2]) << 8) |
+ ((ulong) num[3]));
+ matched = TRUE;
+ } else {
+ matched = FALSE;
+ }
+
+ if (matched) {
+ addrp->type = ADDR_IP;
+ addrp->length = ADDRLEN_IP;
+ return(TRUE);
+ }
+ return(FALSE);
+}
+/*
+ * remove_ws
+ * Remove leading and trailing whitespace
+ */
+
+char *
+remove_ws (char *s)
+{
+ char *x;
+
+ /* Check for null string */
+ if (!s) {
+ return(s);
+ }
+
+ /* Remove leading whitespace */
+ while ((*s == ' ') || (*s == '\t')) {
+ s++;
+ }
+
+ /* Move to end of string */
+ x = s;
+ while (*x) {
+ x++;
+ }
+
+ /* Remove trailing whitespace */
+ x--;
+ while ((*x == ' ') || (*x == '\t')) {
+ *x = '\0';
+ x--;
+ }
+ return(s);
+}
+
+
+/*
+ * parser_ipaddr_or_hostname
+ *
+ * This is a utility function that is used by both the CLI parser and
+ * the GUI so that ipaddress and hostnames can be handled in an
+ * indentical manner.
+ */
+
+/*
+??? WHAT SHOULD THE INTERFACE BE - RETURN ERRORCODE OR RETURN ERROR AND
+ SET "errno"?
+*/
+
+/* If doing cli processing, then pInputStr points to the start of the
+ * ipaddr (or possibly hostname) field within the entire cli parse
+ * buffer for the command (i.e., other fields may following in the buffer).
+ * If doing gui processing, then pInputStr points to the start of
+ * a null terminated string which contains only the ipaddr field
+ * (or possibly hostname).
+ */
+
+int
+parser_ipaddr_or_hostname (char *pInputStr, int *pOffset, ulong flagsParm,
+ pIpAddr_t pIpAddrInfo, char **ppErrMsg)
+{
+ int currOffset; /* for match_decimal & match_char apis
+ * which increment currOffset as buffer
+ * pointed to by pInputStr is parsed
+ * NOTE: Only interesting to cli
+ */
+ ushort num[4]; /* for match_decimal/match_char apis */
+ /* RESOLV_PARAMS_S resolvParms; for resolvParamsGet() api */
+ struct in_addr ipaddrTemp; /* for inet_ntoa_b() api */
+ char *pHostName; /* ptr to dynamically allocated buff */
+ int tempOffset; /* for get_name() api */
+ ulong martianFlags = 0; /* flags for martian() api */
+ int i;
+
+ /* If doing processing for the GUI,
+ * then remove any white space from the string and
+ * return an error if the resultant string is null.
+ * Note that removing white space may alter the
+ * caller's buffer if white space was removed from
+ * the end of the string.
+ * Note that in the case of a null string, the ip address
+ * data structure is reset because the caller may want
+ * to do processing even in the case of a null string.
+ */
+ if ((flagsParm & IPADDR_CLI_PROCESSING) != IPADDR_CLI_PROCESSING) {
+ pInputStr = remove_ws(pInputStr);
+ if (strlen(pInputStr) == 0) {
+ pIpAddrInfo->ipAddrNetOrder = 0;
+ pIpAddrInfo->ipAddrHostOrder = 0;
+ pIpAddrInfo->ipAddrStr[0] = '\0';
+ *ppErrMsg = parser_xlate_errcode(S_parser_SYNTAX_NULL_STRING);
+ return (S_parser_SYNTAX_NULL_STRING);
+ }
+ }
+
+ /* Track the current offset into the caller's buffer in a temporary
+ * variable in case match_decimal() or match_char() fails and we need
+ * to start at the beginning of the field again if it can be considered
+ * a hostname.
+ */
+
+ currOffset = *pOffset;
+
+ /* Check if this is an ip address in decimal dotted notation */
+
+ if (match_decimal(pInputStr, 0, 255, &currOffset, &num[0]) &&
+ match_char(pInputStr, &currOffset, '.') &&
+ match_decimal(pInputStr, 0, 255, &currOffset, &num[1]) &&
+ match_char(pInputStr, &currOffset, '.') &&
+ match_decimal(pInputStr, 0, 255, &currOffset, &num[2]) &&
+ match_char(pInputStr, &currOffset, '.') &&
+ match_decimal(pInputStr, 0, 255, &currOffset, &num[3])) {
+
+ /* If doing processing for the GUI, then return an
+ * error if the character after the last valid
+ * ip address character is not either the null
+ * terminator of a white space character (i.e.,
+ * a space or tab).
+ *
+ * Note that for CLI processing, the check is not
+ * done because the parser itself handles it and
+ * puts the help indicator character (^) exactly
+ * at the bad character following a valid ip
+ * address. If an error was returned here for
+ * CLI processing also, the result would be that
+ * the help indicator character would be at the
+ * beginning of the ip address which is less
+ * desirable.
+ */
+
+ if ( (flagsParm & IPADDR_CLI_PROCESSING) != IPADDR_CLI_PROCESSING ) {
+
+ if (( *(pInputStr + currOffset) != '\0' ) &&
+ ( *(pInputStr + currOffset) != ' ' ) &&
+ ( *(pInputStr + currOffset) != '\t' )) {
+ *ppErrMsg = parser_xlate_errcode(
+ S_parser_SYNTAX_INVALID_IPADDR_FORMAT);
+ return (S_parser_SYNTAX_INVALID_IPADDR_FORMAT);
+ }
+ }
+
+ /* Input string an ip address in dotted-decimal notation.
+ * Save the result in the following three different formats:
+ * 1. unsigned long integer in network byte order
+ * 2. unsigned long integer in host byte order
+ * 3. character string in dotted-decimal notation
+ */
+
+ /* Save in network byte order */
+
+#if BYTE_ORDER == BIG_ENDIAN
+ pIpAddrInfo->ipAddrNetOrder = ((((ulong) num[0]) << 24) |
+ (((ulong) num[1]) << 16) |
+ (((ulong) num[2]) << 8) |
+ ((ulong) num[3]));
+
+#elif BYTE_ORDER == LITTLE_ENDIAN
+ pIpAddrInfo->ipAddrNetOrder = ((((ulong) num[3]) << 24) |
+ (((ulong) num[2]) << 16) |
+ (((ulong) num[1]) << 8) |
+ ((ulong) num[0]));
+
+#else /* force a compilation error if BTYE_ORDER is not defined */
+#error Unknown BYTE_ORDER
+#endif
+
+ /* Save ip address in host byte order */
+ pIpAddrInfo->ipAddrHostOrder = ntohl(pIpAddrInfo->ipAddrNetOrder);
+
+ /* Save ip address as a null terminated dotted-decimal string. */
+ ipaddrTemp.s_addr = pIpAddrInfo->ipAddrNetOrder;
+ inet_ntoa_b(ipaddrTemp, pIpAddrInfo->ipAddrStr);
+
+ /* Update the caller's offset into the input string. */
+ *pOffset = currOffset;
+
+ }
+#if 0
+else {
+
+ /* If input string can be not considered a hostname,
+ * then update the caller's offset into the parsed string
+ * and return an error.
+ */
+
+ if ((flagsParm & IPADDR_HOSTNAME_ALLOWED) != IPADDR_HOSTNAME_ALLOWED) {
+ *pOffset = currOffset;
+ *ppErrMsg =
+ parser_xlate_errcode(S_parser_SYNTAX_INVALID_IPADDR_FORMAT);
+ return (S_parser_SYNTAX_INVALID_IPADDR_FORMAT);
+ }
+
+ /* Treat the input string as a hostname.
+ * Make a copy of the hostname from the beginning of the field and
+ * verify the string is well-formed for a hostname.
+ */
+
+ pHostName = PARSERmalloc(PARSEBUF + 1);
+ if (pHostName == NULL) {
+ *ppErrMsg =
+ parser_xlate_errcode(S_parser_RESOURCE_ALLOCATION_ERROR);
+ if ((flagsParm & IPADDR_CLI_PROCESSING) == IPADDR_CLI_PROCESSING) {
+ printf("%s\n", *ppErrMsg);
+ }
+ return (S_parser_RESOURCE_ALLOCATION_ERROR);
+ }
+
+ if (get_name(&pInputStr[*pOffset],
+ pHostName, &tempOffset, PARSEBUF) == FALSE) {
+ PARSERfree(pHostName);
+ *ppErrMsg =
+ parser_xlate_errcode(S_parser_SYNTAX_INVALID_HOSTNAME_FORMAT);
+ return (S_parser_SYNTAX_INVALID_HOSTNAME_FORMAT);
+ }
+
+ /* If the cli is just processing help, there is no more work.
+ * Update the caller's offset into the input string and return
+ */
+ if ((flagsParm & IPADDR_CLI_IN_HELP) == IPADDR_CLI_IN_HELP) {
+ *pOffset += tempOffset;
+ PARSERfree(pHostName);
+ return (OK); /* note there is no ipaddr in info structure */
+ }
+
+ if (name_verify(pHostName) == FALSE) {
+ PARSERfree(pHostName);
+ *ppErrMsg =
+ parser_xlate_errcode(S_parser_SYNTAX_INVALID_HOSTNAME_FORMAT);
+ return (S_parser_SYNTAX_INVALID_HOSTNAME_FORMAT);
+ }
+
+ /* If there are no ip name servers configured to do the DNS lookup,
+ * then return an error.
+ */
+ resolvParms.nameServersAddr[0][0] = NULL; /* init before api call */
+ resolvParamsGet(&resolvParms); /* DNS resolver api call */
+ if (resolvParms.nameServersAddr[0][0] == NULL) {
+ *ppErrMsg = parser_xlate_errcode(S_parser_IPADDR_NO_NAME_SERVER);
+ if ((flagsParm & IPADDR_CLI_PROCESSING) == IPADDR_CLI_PROCESSING) {
+ printf("%s \"%s\"\n", *ppErrMsg, pHostName);
+ }
+ PARSERfree(pHostName);
+ return (S_parser_IPADDR_NO_NAME_SERVER);
+ }
+
+ for (i = 0; i < MAXNS; i++)
+ {
+ if (resolvParms.nameServersAddr[i][0] != '\0')
+ {
+ if (OK ==
+ ping(resolvParms.nameServersAddr[i], 1, PING_OPT_SILENT))
+ break;
+ }
+ }
+
+ if (i == MAXNS)
+ {
+ printf("Cannot communicate with any ip name-server\n");
+ return (S_parser_IPADDR_NO_NAME_SERVER);
+ }
+
+ if ((flagsParm & IPADDR_CLI_PROCESSING) == IPADDR_CLI_PROCESSING) {
+ printf("Translating \"%s\" using configured ip name-server(s)...",
+ pHostName);
+ }
+
+ /* Do the DNS lookup on the input hostname.
+ * The inetGetHostByName() function looks in the local DNS
+ * cache first (if it is on) and if the hostname is not found,
+ * then it consults the DNS resolver.
+ * If successful, the return value is the ip address u_long
+ * in network byte order.
+ * The inetGetHostByName() function is thread-safe.
+ */
+
+ pIpAddrInfo->ipAddrNetOrder = NULL;
+ /*RAMS: commented this for now
+ * inetGetHostByName(pHostName,strlen(pHostName));
+ */
+
+ if (pIpAddrInfo->ipAddrNetOrder == NULL) {
+ if ((flagsParm & IPADDR_CLI_PROCESSING) == IPADDR_CLI_PROCESSING) {
+ printf("Failed\n");
+ }
+ PARSERfree(pHostName);
+ *ppErrMsg =
+ parser_xlate_errcode(S_parser_IPADDR_HOSTNAME_LOOKUP_FAILED);
+ return (S_parser_IPADDR_HOSTNAME_LOOKUP_FAILED);
+ }
+
+ /* Save the ip address in two other formats:
+ * 1. unsigned long integer in host byte order
+ * 2. character string in dotted-decimal notation
+ */
+
+ /* Save ip address in host byte order */
+ pIpAddrInfo->ipAddrHostOrder = ntohl(pIpAddrInfo->ipAddrNetOrder);
+
+ /* Save ip address in dotted-decimal notation. */
+ ipaddrTemp.s_addr = pIpAddrInfo->ipAddrNetOrder;
+ inet_ntoa_b(ipaddrTemp, pIpAddrInfo->ipAddrStr);
+
+ if ((flagsParm & IPADDR_CLI_PROCESSING) == IPADDR_CLI_PROCESSING) {
+ printf("%s[OK]\n", pIpAddrInfo->ipAddrStr);
+ }
+
+ /* Update the offset into the caller's buffer. */
+ *pOffset += tempOffset;
+
+ PARSERfree(pHostName);
+ }
+#endif
+
+ /* Check if we test Default Routing
+ * Default Routing allows 0.0.0.0 ip address
+ * test it and return OK if address is 0.0.0.0
+ */
+ if ((flagsParm & IPADDR_DEFAULT_ROUTING ) ==
+ IPADDR_DEFAULT_ROUTING ) {
+
+ if ( (num[3] == 0) && (num[2] == 0) && (num[1] == 0) && (num[0] == 0) ) {
+ *ppErrMsg = parser_xlate_errcode(OK);
+ return (OK);
+ }
+ }
+
+ /* The caller's structure pointed to by pIpAddrInfo is updated.
+ * If caller did not request the Martian ip address test,
+ * then there is no more work to do so return success.
+ */
+
+ if ((flagsParm & IPADDR_MARTIAN_TEST_REQUIRED) !=
+ IPADDR_MARTIAN_TEST_REQUIRED) {
+ *ppErrMsg = parser_xlate_errcode(OK);
+ return (OK);
+ }
+
+ /* Perform Martian ip address test based on the caller's input flags. */
+
+ if ((flagsParm & IPADDR_MARTIAN_IS_HOST_ADDRESS) ==
+ IPADDR_MARTIAN_IS_HOST_ADDRESS) {
+ martianFlags |= MARTIAN_FLAG_IS_HOST;
+ }
+
+ if ((flagsParm & IPADDR_MARTIAN_MULTICAST_ALLOWED) ==
+ IPADDR_MARTIAN_MULTICAST_ALLOWED) {
+ martianFlags |= MARTIAN_FLAG_MULTICAST_ALLOWED;
+ }
+
+ if (martian(pIpAddrInfo->ipAddrHostOrder, martianFlags) == TRUE) {
+ *ppErrMsg = parser_xlate_errcode(S_parser_IPADDR_RESERVED);
+ return (S_parser_IPADDR_RESERVED);
+ }
+ else {
+ *ppErrMsg = parser_xlate_errcode(OK);
+ return (OK);
+ }
+}
+
+/* The following table is used by parser_xlate_errcode() below to
+ * translate a parser error code that can possibly be returned by the
+ * parser_ipaddress_or_hostname() function into a string that can be
+ * used to format an error message.
+ * This feature of parser_ipaddress_or_hostname() is used by the GUI
+ * so that it can display specific error messages to the administrator.
+ */
+
+struct xlateInfo {
+ int errCode; /* error code */
+ char *pErrMsg; /* pointer to error message for errcode */
+} static parser_xlateTable[] = {
+ { OK,
+ "Success" },
+ { S_parser_SYNTAX_NULL_STRING,
+ "Host is a null string" },
+ { S_parser_SYNTAX_INVALID_IPADDR_FORMAT,
+ "IP address is malformed" },
+ { S_parser_SYNTAX_INVALID_HOSTNAME_FORMAT,
+ "Hostname is malformed" },
+ { S_parser_IPADDR_RESERVED,
+ "Host address is not valid because it is reserved" },
+ { S_parser_IPADDR_NO_NAME_SERVER,
+ "No ip name-server configured for DNS lookup of hostname" },
+ { S_parser_IPADDR_HOSTNAME_LOOKUP_FAILED,
+ "DNS lookup failed for hostname" },
+ { S_parser_RESOURCE_ALLOCATION_ERROR,
+ "Internal resource allocation error" },
+ { S_parser_SYNTAX_INVALID_NETMASK_FORMAT,
+ "Netmask is malformed" },
+ { S_parser_SYNTAX_INVALID_NETMASK_CONTIGUOUS,
+ "Netmask binary format should have contiguous 1" },
+ { S_parser_SYNTAX_INVALID_NETMASK_IPADDR_MISMATCH,
+ "Netmask inconsistent with destination address" },
+};
+
+#define ERRMSG_UNKNOWN "Unknown error occurred"
+#define MAXXLATES (sizeof (parser_xlateTable) / sizeof (parser_xlateTable[0]))
+
+static char *
+parser_xlate_errcode(int errorCode)
+{
+ register int i;
+
+ for (i = 0; i < MAXXLATES; i++) {
+ if (errorCode == parser_xlateTable[i].errCode) {
+ return (parser_xlateTable[i].pErrMsg);
+ }
+ }
+
+ /* errorCode was not in table, so return a default error message */
+ return (ERRMSG_UNKNOWN);
+}
+
+
+
+
+/*
+ * martian
+ * Returns "TRUE" if the address is one of Mill's Martians, i.e., it is not
+ * a valid IP address for a host (if MARTIAN_FLAG_IS_HOST is TRUE) or network
+ * if (MARTIAN_FLAG_IS_HOST is FALSE). An IP address is not valid if it
+ * is one of the reserved IP addresses.
+ *
+ * "martianFlag" contains various flags provided by the caller which dictate
+ * how the martian checking is performed. See h/parser/address.h for the
+ * flag definitions and meaning.
+ */
+
+/* The following table is used by martian() to determine which IP addresses
+ * are considered invalid because they are reserved.
+ */
+
+struct martiantype {
+ ipaddrtype address; /* potential bad address */
+ ipaddrtype mask; /* address mask */
+ tinybool net; /* network check */
+ tinybool valid_entry; /* TRUE == this entry in table is valid */
+ /* FALSE == this entry in table is not valid */
+} static martians[] = {
+
+/* Description of special addresses
+ * Each entry in martian() table notes which case applies (if any)
+ *
+ * case i - network id = all bits 0; host id = any
+ * Note: For Class A (00.x.x.x), these are reserved addresses,
+ * including the address 0.0.0.0
+ * For Class B (128.0.x.x) and Class C (192.0.0.x),
+ * IANA has assigned registered users.
+ *
+ * case ii - network id = all bits 1; host id = any
+ * Note: For Class A (127.x.x.x) these address are used
+ * as internal host loopback addresses.
+ * For Class B (191.255.x.x) and Class C (223.255.255.x),
+ * these addresses are reserved.
+ *
+ * case iii - network id = any valid netid; host id = all bits 0
+ * Note: Identifies an entire network; not a valid host address.
+
+ * case iv - network id = any valid netid; host id = all bits 1
+ * Directed broadcast to specified network.
+ *
+ * case v - network id = all bits 1; host id = all bits 1
+ * Limited broadcast address.
+ * A datagram with this address is never forwared outside
+ * the network or subnetwork of the source.
+ *
+ * case vi - Class D (224.x.x.x) - the entire class is reserved for
+ * multicast addresses (the low order 24 bits represent
+ * the multicast group ID).
+ *
+ * case vii - Class E (240.x.x.x - 255.x.x.x) - the entire class is
+ * reserved for future use.
+ */
+
+/*
+ * Limited Broadcast Address
+ */
+ {0xFFFFFFFF, 0xFFFFFFFF, FALSE, TRUE}, /* 255.255.255.255, 255.255.255.255
+ * case v - reserved */
+
+/*
+ * Class A specials
+ */
+ {0x00000000, 0xFF000000, FALSE, TRUE}, /* 0.0.0.0, 255.0.0.0
+ * case i - reserved */
+ {0x7F000000, 0xFF000000, FALSE, TRUE}, /* 127.0.0.0, 255.0.0.0
+ * case ii - reserved
+ * internal host loopback */
+ {0x00000000, 0x80FFFFFF, TRUE, TRUE}, /* 0.0.0.0, 128.255.255.255
+ * case iii - network address */
+ {0x00FFFFFF, 0x80FFFFFF, FALSE, TRUE}, /* 0.255.255.255, 128.255.255.255
+ * case iv - directed broadcast */
+
+/*
+ * Class B specials
+ */
+ {0xBFFF0000, 0xFFFF0000, FALSE, TRUE}, /* 191.255.0.0, 255.255.0.0
+ * case ii - reserved */
+ {0x80000000, 0xC000FFFF, TRUE, TRUE}, /* 128.0.0.0, 192.0.255.255
+ * case iii - network address */
+ {0x8000FFFF, 0xC000FFFF, FALSE, TRUE}, /* 128.0.255.255, 192.0.255.255
+ * case iv - directed broadcast */
+
+/*
+ * Class C specials
+ */
+ {0xDFFFFF00, 0xFFFFFF00, FALSE, TRUE}, /* 223.255.255.0, 255.255.255.0
+ * case ii - reserved */
+ {0xC0000000, 0xE00000FF, TRUE, TRUE}, /* 192.0.0.0, 224.0.0.255
+ * case iii - network address */
+ {0xC00000FF, 0xE00000FF, FALSE, TRUE}, /* 192.0.0.255, 224.0.0.255
+ * case iv - directed broadcast */
+
+/*
+ * Class D
+ */
+ {0xE0000000, 0xF0000000, FALSE, TRUE}, /* 224.0.0.0, 240.0.0.0
+ * case vi - the entire class is
+ * reserved for multicast addresses */
+
+/*
+ * Class E
+ */
+ {0xF0000000, 0xF0000000, FALSE, TRUE}, /* 240.0.0.0, 240.0.0.0
+ * case vii - the entire class is
+ * reserved for future use */
+};
+
+#define MAXMARTIANS (sizeof (martians) / sizeof (martians[0]))
+#define CLASS_D_ADDRESS 0xE0000000
+
+boolean
+martian (register ipaddrtype address, ulong martianFlags)
+{
+ register int i;
+
+ for (i = 0; i < MAXMARTIANS; i++) {
+ if ((address & martians[i].mask) == martians[i].address) {
+
+ /* If the table entry is marked invalid, then skip it */
+ if (martians[i].valid_entry == FALSE) {
+ continue;
+ }
+
+ /* If this is a Class D multicast address and
+ * caller specified multicast address are allowed,
+ * then this address is not consider an invalid address.
+ */
+ if (martians[i].address == CLASS_D_ADDRESS) {
+ if ((martianFlags & MARTIAN_FLAG_MULTICAST_ALLOWED) ==
+ MARTIAN_FLAG_MULTICAST_ALLOWED) {
+ return (FALSE); /* caller's address is not a martian */
+ }
+ else {
+ return (TRUE); /* caller's address is a martian */
+ }
+ }
+
+ /* If the caller specified that the address
+ * being check may be a network address and
+ * this address is OK as a network address
+ * then continue checking the rest of the table.
+ * Else, the caller's address is considered a martian.
+ */
+ if (((martianFlags & MARTIAN_FLAG_IS_HOST) !=
+ MARTIAN_FLAG_IS_HOST) &&
+ (martians[i].net == TRUE)) {
+ continue; /* continue checking the table */
+ }
+ else {
+ return (TRUE); /* it's a martian */
+ }
+ }
+ }
+ /* Passed all table checks, so address must not be reserved ip address. */
+ return (FALSE);
+}
+
+
+/*
+ * mask_contiguous
+ * Return TRUE if the given mask is left contiguous, FALSE otherwise.
+ */
+
+boolean mask_contiguous (ipaddrtype mask)
+{
+ while ((mask & 0xff000000) == 0xff000000)
+ mask <<= 8;
+ while (mask & 0x80000000)
+ mask <<= 1;
+ if (mask)
+ return(FALSE);
+ return(TRUE);
+}
+
+/*
+ * get_majormask
+ * Given an address, return the mask of major network number.
+ */
+
+ipaddrtype get_majormask (ipaddrtype address)
+{
+ if (!address) /* net 0.0.0.0 */
+ return(0); /* mask 0.0.0.0 */
+ if (!(address & CLASS_A_BIT)) /* Class A network */
+ return(CLASS_A_MASK);
+ else if (!(address & CLASS_B_BIT)) /* Class B network */
+ return(CLASS_B_MASK);
+ else if (!(address & CLASS_C_BIT)) /* Class C network */
+ return(CLASS_C_MASK);
+ else /* unknown network class */
+ return(MASK_HOST);
+}
+
+#if 0
+
+/*
+ * ValidateNetMask
+ * Validate a network mask
+ * return OK or Error Number.
+ * Checks:
+ * - a netmask should have valid IP address
+ * - the mask must be left contiguous
+ * - the mask must be consistent with the destination address
+ */
+
+int ValidateNetMask (ipaddrtype address, char *sMask, char **ppErrMsg)
+{
+ int offset;
+ ipAddr_t ipAddrInfo;
+ char *pErrMsg;
+ int errcode;
+ ipaddrtype mask;
+
+ /* Call the parser to process the sMask field */
+ offset = 0;
+ errcode = parser_ipaddr_or_hostname(sMask,
+ &offset,
+ 0,
+ &ipAddrInfo,
+ &pErrMsg);
+ if (errcode != OK) {
+ *ppErrMsg = parser_xlate_errcode(
+ S_parser_SYNTAX_INVALID_NETMASK_FORMAT);
+ return (S_parser_SYNTAX_INVALID_NETMASK_FORMAT);
+ }
+ mask = ipAddrInfo.ipAddrHostOrder;
+
+ if (!mask_contiguous(mask))
+ {
+ *ppErrMsg = parser_xlate_errcode(
+ S_parser_SYNTAX_INVALID_NETMASK_CONTIGUOUS);
+ return (S_parser_SYNTAX_INVALID_NETMASK_CONTIGUOUS);
+ }
+
+ if (address & ~mask)
+ {
+ *ppErrMsg = parser_xlate_errcode(
+ S_parser_SYNTAX_INVALID_NETMASK_IPADDR_MISMATCH);
+ return (S_parser_SYNTAX_INVALID_NETMASK_IPADDR_MISMATCH);
+ }
+
+ *ppErrMsg = parser_xlate_errcode(OK);
+ return (OK);
+}
+
+#endif
+/*
+ * good_address
+ * Validate an address and/or network mask, return TRUE/FALSE.
+ * Checks:
+ * - an address or mask is never all zeros or all ones
+ * - an address must not be a reserved IP address, i.e., a martian
+ * - the mask may not have zeros in the major network portion, that is,
+ * it must be consistent with the address class type.
+ * - the mask must be left contiguous
+ */
+
+boolean good_address (ipaddrtype address, ipaddrtype mask, boolean maskcheck)
+{
+ ipaddrtype basicmask, result;
+
+ if (martian(address, MARTIAN_FLAG_IS_HOST) == TRUE) {
+ return(FALSE);
+ }
+
+ if (maskcheck) {
+ if ((mask == 0L) || (mask == -1L))
+ return(FALSE);
+ if (!mask_contiguous(mask))
+ return(FALSE);
+ basicmask = get_majormask(address);
+ if (!basicmask)
+ return(FALSE);
+ if ((mask | address) == -1)
+ return(FALSE); /* all ones in host part */
+ if ((address & ~mask) == 0)
+ return(FALSE); /* all zeros in host part */
+ if (!subnetzero_enable && (mask > basicmask)) {
+ result = (address & ~basicmask); /* mask off major net bits */
+ if ((result & mask) == 0L) /* mask off host bits */
+ return(FALSE); /* disallow subnet zero */
+ }
+ }
+ return(TRUE);
+}
+
+/*
+ * name_verify
+ * Screen out malformed hostname strings.
+ * Rejects null strings and strings with illegal chars. Note that we don't
+ * do any length checking since domain style names may be arbitrarily long.
+ */
+
+boolean name_verify (char *name)
+{
+ boolean good;
+ char c;
+ boolean non_numeric_seen = FALSE;
+
+ if (null(name))
+ return(FALSE); /* screen out null strings */
+
+ while ((c = *name++) != '\0') {
+ if (((c >= 'A') && (c <= 'Z')) ||
+ ((c >= 'a') && (c <= 'z')) ||
+ (c == '-') || (c == '_')) {
+ good = TRUE;
+ non_numeric_seen = TRUE;
+ } else
+ good = ((c >= '0') && (c <= '9')) || (c == '.');
+
+ if (!good)
+ return(FALSE); /* screen out bad characters */
+ };
+
+ if (!non_numeric_seen) /* Check for strings with only numbers */
+ return(FALSE); /* with possibles dots. Not allowed! */
+
+ return(TRUE); /* string appears well formed */
+}
+
+
+#ifdef IOS_PARSER
+
+void ipaddrmask_action (parseinfo *csb, transition *mine,
+ ipaddrmask_struct * const arg)
+{
+ addrtype *addrp = CSBVAR(csb, arg->addr, addrtype);
+ addrtype *maskp = CSBVAR(csb, arg->mask, addrtype);
+ int i;
+ uint mask_number = 0;
+ static const char short_help[] = "A.B.C.D {IP address A.B.C.D}";
+ static const char prefix_help[] = "IP prefix and prefix mask";
+
+ push_node(csb, mine->alternate);
+ INVALID_NVGEN_CHECK;
+
+ if (help_check(csb)) {
+ save_help_long(csb, short_help, arg->help, csb->priv);
+ return;
+ }
+
+ i = 0;
+ if (match_ip_addr(csb, &csb->line[csb->line_index], &i, addrp,
+ csb->in_help, 0, NULL)) {
+ if (match_char(&csb->line[csb->line_index], &i, '/')) {
+ if (match_number(csb, 0, 32, &i, &mask_number,
+ NUMBER_DEC | NUMBER_WS_OK | NUMBER_HELP_CHECK,
+ "Length of prefix mask")) {
+ uint n = 1<<31;
+
+ while (mask_number--) {
+ maskp->ip_addr |= n;
+ n = n>>1;
+ }
+
+ maskp->type = ADDR_IP;
+ maskp->length = ADDRLEN_IP;
+
+ csb->line_index += i;
+ push_node(csb, mine->accept);
+ csb->line_index -= i;
+ }
+ } else {
+ if (match_whitespace2(&csb->line[csb->line_index],
+ &i, csb->in_help)) {
+ csb->line_index += i;
+ if (help_check(csb)) {
+ save_help_long(csb, short_help, prefix_help, csb->priv);
+ csb->line_index -= i;
+ return;
+ }
+ csb->line_index -= i;
+
+ if (match_ip_addr(csb, &csb->line[csb->line_index], &i, maskp,
+ csb->in_help, 0, NULL)) {
+ if (match_whitespace2(&csb->line[csb->line_index],
+ &i, csb->in_help)) {
+ csb->line_index += i;
+ push_node(csb, mine->accept);
+ csb->line_index -= i;
+ } else {
+ help_or_error(csb, i, prefix_help,
+ NO_COMMAND_COMPLETION);
+ }
+ } else {
+ help_or_error(csb, i, prefix_help,
+ NO_COMMAND_COMPLETION);
+ }
+ } else {
+ /*
+ * Two short helps in one string, don't try
+ * this at home kids
+ */
+ help_or_error(csb, i, "/\tIP prefix mask",
+ NO_COMMAND_COMPLETION);
+ }
+ }
+ } else {
+ help_or_error(csb, i, short_help, NO_COMMAND_COMPLETION);
+ }
+}
+
+
+void ipmask_action (parseinfo *csb, transition *mine,
+ ipmask_struct * const arg)
+{
+ addrtype *maskp = CSBVAR(csb, arg->mask, addrtype);
+ int i;
+ uint mask_number = 0;
+ static const char short_help[] = "/nn or A.B.C.D";
+ static const char prefix_help[] = "IP prefix mask";
+
+ push_node(csb, mine->alternate);
+ INVALID_NVGEN_CHECK;
+
+ if (help_check(csb)) {
+ save_help_long(csb, short_help, arg->help, csb->priv);
+ return;
+ }
+
+ i = 0;
+ if (match_char(&csb->line[csb->line_index], &i, '/')) {
+ if (match_number(csb, 0, 32, &i, &mask_number,
+ NUMBER_DEC | NUMBER_WS_OK | NUMBER_HELP_CHECK,
+ "Length of prefix mask")) {
+ uint n = 1<<31;
+
+ while (mask_number--) {
+ maskp->ip_addr |= n;
+ n = n>>1;
+ }
+
+ maskp->type = ADDR_IP;
+ maskp->length = ADDRLEN_IP;
+
+ csb->line_index += i;
+ push_node(csb, mine->accept);
+ csb->line_index -= i;
+ }
+ } else {
+ if (match_whitespace2(&csb->line[csb->line_index], &i, csb->in_help)) {
+ csb->line_index += i;
+ if (help_check(csb)) {
+ save_help_long(csb, short_help, prefix_help, csb->priv);
+ csb->line_index -= i;
+ return;
+ }
+ csb->line_index -= i;
+
+ if (match_ip_addr(csb, &csb->line[csb->line_index], &i, maskp,
+ csb->in_help, 0, NULL)) {
+ if (match_whitespace2(&csb->line[csb->line_index],
+ &i, csb->in_help)) {
+ csb->line_index += i;
+ push_node(csb, mine->accept);
+ csb->line_index -= i;
+ } else {
+ help_or_error(csb, i, prefix_help, NO_COMMAND_COMPLETION);
+ }
+ } else {
+ help_or_error(csb, i, prefix_help, NO_COMMAND_COMPLETION);
+ }
+ } else {
+ /*
+ * Two short helps in one string, don't try
+ * this at home kids
+ */
+ help_or_error(csb, i, "/\tIP prefix mask", NO_COMMAND_COMPLETION);
+ }
+ }
+}
+
+#endif /* IOS_PARSER */
diff --git a/data/mnet/Common/cli/src/parser.c b/data/mnet/Common/cli/src/parser.c
new file mode 100644
index 0000000..007cbaa
--- /dev/null
+++ b/data/mnet/Common/cli/src/parser.c
@@ -0,0 +1,2062 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <tyLib.h>
+#include <taskLib.h>
+#include <errnoLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <msgQLib.h>
+#include <sigLib.h>
+
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+#include <../include/parser_sim.h>
+#include <../include/parser.h>
+#include <../include/parser_defs_exec.h>
+#include <../include/parser_input.h>
+#include <../include/parser_sim.h>
+#include <../include/parser_util.h>
+#include <../include/parser_commands.h>
+#include <../include/nv.h>
+#include <../include/parser_errno.h>
+#include <../include/parser_ModNum.h>
+#include <../include/defs.h>
+#include <../include/parser_init.h>
+#include <../include/macros.h>
+#include <../include/parser_actions.h>
+#include <../include/parser_sim.h>
+#include <../include/ttyutil.h>
+
+
+static MSG_Q_ID callback_Q_Id = NULL;
+
+#define INVALID_UID -1
+
+
+boolean config_prompt = FALSE;
+char *nomemory = "\n%%No memory available";
+
+extern parser_mode *interface_mode;
+
+/*
+ * Local structures and variables
+ */
+static chain_list *cl = NULL; /* Unresolved parse chains */
+static chain_list *llist = NULL; /* Dynamic link points */
+
+/*
+ * Forward declarations
+ */
+
+static boolean word_completion(parseinfo *csb);
+static boolean add_to_unresolved_chains(uint, dynamic_transition *
+#ifdef PARSER_DEBUG_LINKS
+ , const char *
+#endif /* PARSER_DEBUG_LINKS */
+ );
+static void resolve_parse_chains(void);
+static boolean parser_resolve_entry_link_point(chain_link *,
+ dynamic_transition *
+#ifdef PARSER_DEBUG_LINKS
+ , const char *
+#endif /* PARSER_DEBUG_LINKS */
+ );
+static boolean parser_resolve_exit_link_point(chain_link *,
+ dynamic_transition *);
+static boolean parser_add_link_to_list(uint,
+#ifdef PARSER_DEBUG_LINKS
+ const char *,
+#endif /* PARSER_DEBUG_LINKS */
+ dynamic_transition *, uint);
+static parsenode *get_parsenode(parseinfo *);
+static void parser_exec_callback( void );
+static void addSignalHandlers ( void );
+
+
+
+
+
+
+
+static const char *generic_csb_name = "Parser CSB";
+parseinfo *get_csb (const char *name)
+{
+ parseinfo *csb;
+
+ if (!name) {
+ name = generic_csb_name;
+ }
+
+ csb = (parseinfo *)PARSERcalloc(1, sizeof( parseinfo ));
+
+ if (!csb) {
+ return(NULL);
+ }
+
+ /*
+ * Assignments to make purify happy
+ */
+ csb->tokenQ = NULL;
+ csb->privQ = NULL;
+ csb->priv_nvgenQ = NULL;
+ csb->help_save.buf = NULL;
+ csb->comment_save.buf = NULL;
+
+ /* Initialize the parsing stuff */
+ csb->line = csb->line_buffer;
+ csb->break_chars = EXEC_BREAKSET;
+ csb->resolvemethod = RES_NULL;
+ csb->flags = 0;
+ csb->mode = exec_mode;
+ csb->priv = PRIV_MAX;
+ csb->priv_set = PRIV_NULL;
+
+ csb->uid = -1;
+ csb->MoreStatus = RC_OK;
+ csb->savedFd = -1;
+
+ /*
+ * The errno_val will only be valid if return_val is FALSE
+ */
+ csb->return_val = TRUE;
+ csb->errno_val = 0;
+
+ csb->configSemId = PSsemBCreate( PS_DEFAULT_BINARY_SEM_FLAG, SEM_EMPTY );
+ if ( csb->configSemId == NULL )
+ PSpanic("Cannot create configuration semaphore for CSB\n");
+
+ csb->giveConfigSem = FALSE;
+
+ /* Initialize tokenQ */
+ if ((csb->tokenQ = (queuetype *)
+ PARSERmalloc(sizeof(queuetype))) == NULL) {
+ free_csb(&csb);
+ return(NULL);
+ }
+ queue_init(csb->tokenQ, 0);
+
+ return(csb);
+}
+
+
+
+/*
+ * Initialize parser variables
+ */
+static void parse_cmd_init (parseinfo *csb)
+{
+
+ csb->nv_command[0] = '\0';
+
+ csb->error_index = 0;
+ csb->nvgen = 0;
+ csb->sense = TRUE;
+ csb->set_to_default = FALSE;
+ csb->saved_help_used = 0;
+ save_line_init(&csb->help_save);
+ csb->visible_ambig.ambig[0] = '\0';
+ csb->visible_ambig.ambig_save[0] = '\0';
+ csb->hidden_ambig.ambig[0] = '\0';
+ csb->hidden_ambig.ambig_save[0] = '\0';
+ set_multiple_funcs(csb, 0);
+ csb->command_visible = TRUE;
+ csb->unsupported = FALSE;
+ csb->action_func = NULLFUNC;
+ csb->which = 0;
+ csb->func = 0;
+ csb->next = NULL;
+ csb->return_val = TRUE;
+ csb->errno_val = 0;
+
+ /* Clear any lingering flags */
+ csb->flags &= (CONFIG_TERM | CONFIG_HTTP | COMMAND_AUTHORIZE |
+ COMMAND_FUNCTION | HIDE_PASSWORDS | PARSE_EMPTY_STRING |
+ CONFIG_PER_USER | CONFIG_CGI | COMMAND_COMPLETE);
+
+ /* Zap the data area. */
+ memset((void *) &(csb->csb_start_data), 0,
+ (int) ((uchar *) &csb->csb_end_data -
+ (uchar *) &csb->csb_start_data));
+ csb->last_priv = 0;
+ csb->highest_priv = 0;
+
+ parser_ambig_debug = FALSE;
+}
+
+
+
+/*
+ * get_parsenode
+ * Get parsenode structure.
+ */
+static parsenode *get_parsenode (parseinfo *csb)
+{
+ parsenode *pp = NULL;
+
+ /* pp = chunk_malloc(parsenode_chunks); */
+
+ pp = ( parsenode *)PARSERmalloc(sizeof(parsenode));
+
+ if (!pp)
+ return(NULL);
+ pp->next = NULL;
+ pp->visible_ambig[0] = '\0';
+ pp->hidden_ambig[0] = '\0';
+ pp->nv_command[0] = '\0';
+ return(pp);
+}
+
+static void empty_queue (queuetype *qp)
+{
+ void *tmp;
+
+ while (! QUEUEEMPTY(qp)) {
+ tmp = dequeue(qp);
+ PARSERfree(tmp);
+ }
+}
+
+static void free_queue (queuetype **qp)
+{
+ if (*qp) {
+ empty_queue(*qp);
+ PARSERfree(*qp);
+ *qp = NULL;
+ }
+}
+
+/*
+ * free_csb_mem
+ *
+ * Free the memory allocated for the various structures within
+ * the csb. This includes dirty, token and line Qs and help_save,
+ * comment_save fields.
+ */
+void free_csb_mem (parseinfo *csb)
+{
+ if (csb) {
+ free_queue(&csb->tokenQ);
+ free_queue(&csb->privQ);
+ free_queue(&csb->priv_nvgenQ);
+ save_line_init(&csb->help_save); /* Free help text elements */
+ save_line_init(&csb->comment_save); /* Free comment text elements */
+ }
+}
+
+/* Mind our Free's & Q's */
+void free_csb (parseinfo **csbp)
+{
+ parseinfo *csb = *csbp;
+
+ if (csb) {
+ free_csb_mem(csb); /* Free allocated memory hidden in csb */
+ /* chunk_free(parseinfo_chunks, csb);*/
+ if ( csb->configSemId )
+ semDelete( csb->configSemId );
+ PARSERfree( csb );
+ }
+ *csbp = NULL;
+}
+
+
+static int count_help_matches (parseinfo *csb)
+{
+ char *cp;
+ int n = 0;
+
+ for (cp = csb->help_save.buf; cp && *cp; cp++) {
+ if (*cp == '\t' || *cp == '\n'){
+ n++;
+ }
+ }
+ return(n);
+}
+
+
+
+
+/*
+ * Report where we found an error in the command line.
+ * "error" indicates what type of error occured.
+ * If 'reprint' is TRUE, then we have to reprint the line.
+ */
+void report_error (parseinfo * csb, int error, boolean need_reprint)
+{
+ int promptlen;
+ int incomplete = 0;
+
+ char buffer[80];
+ buffer[0] = '\0';
+
+ if (parser_ambig_debug) {
+ need_reprint = TRUE;
+ }
+
+ if (error == PARSE_ERROR_UNKNOWN) {
+ printf("\n%% Unrecognized command\n");
+ parser_return(csb, S_parser_SYNTAX_UNKNOWN);
+ return;
+ }
+
+ if (error == PARSE_ERROR_AMBIG) {
+ printf("\n%% Ambiguous command: \"%s\"\n", csb->line);
+ parser_return(csb, S_parser_SYNTAX_AMBIGUOUS);
+ return;
+ }
+
+ /* error == PARSE_ERROR_NOMATCH */
+ /*
+ * Prepare to designate the error. We have to know the length of the
+ * command line prompt and if configuration is from other than a
+ * terminal, print the command before indicating the error location.
+ */
+ if (csb->flags & CONFIG_TERM) {
+ promptlen = strlen(csb->prompt);
+ /* Reprint if the command is too long. */
+ if (promptlen + strlen(csb->line) >= SCREEN_WIDTH ||
+ need_reprint ||
+ (error & PARSE_ERROR_ALIAS)) {
+ promptlen = 0;
+ need_reprint = TRUE;
+ }
+ } else {
+ promptlen = 0;
+ need_reprint = TRUE;
+ }
+
+ if (csb->line[csb->error_index] == '\0') {
+ if (csb->error_index > 0) {
+ /* NON-blank input line. Handle INCOMPLETE error similarly
+ to other errors, below. */
+ incomplete = 1;
+ }
+ }
+ if (need_reprint) {
+ int length = csb->error_index;
+ int i;
+ int base;
+
+ printf("\n");
+
+ if (SCREEN_WIDTH <= 0) {
+ base = length;
+ } else {
+ base = length / SCREEN_WIDTH;
+ }
+ for (i = 0; csb->line[i]; i++) {
+ printf("%c", csb->line[i]);
+ if ((SCREEN_WIDTH > 0) && ((i+1) % SCREEN_WIDTH == 0)) {
+ /* Next char starts new line. */
+ if (i / SCREEN_WIDTH == base) {
+ /* We just printed the error line. */
+ print_caret(length % SCREEN_WIDTH);
+ } else {
+ /* Not the error line, print a blank line. */
+ printf("\n");
+ }
+ }
+ }
+
+ if (! incomplete) {
+ printf("\n");
+
+ if (SCREEN_WIDTH <= 0) {
+ print_caret(length);
+ } else {
+ if (i / SCREEN_WIDTH == base) {
+ /* We just printed the error line. */
+ print_caret(length % SCREEN_WIDTH);
+ }
+ }
+ }
+ } else {
+ if (! incomplete) {
+ /* No reprint needed, just show caret. */
+ print_caret(promptlen + csb->error_index);
+ }
+ }
+
+ if (incomplete) {
+ printf("\n%% Incomplete command.\n");
+ parser_return(csb, S_parser_SYNTAX_INCOMPLETE);
+ } else {
+ printf("\n%% Invalid input detected at '^' marker.\n");
+ parser_return(csb, S_parser_SYNTAX_INVALID);
+ }
+}
+
+extern void Logout(parseinfo *csb);
+
+/*
+ * exit_exec_command
+ *
+ * Cleanup for an exit from the exec. Call exit_command() to
+ * drop any outstanding connections and set the exit flag.
+ */
+
+void exit_exec_command (parseinfo *csb)
+{
+ Logout(NULL);
+ return;
+ csb->exit_all = TRUE;
+ if ( csb->priv == PRIV_USER )
+ csb->priv = PRIV_NULL;
+ else
+ csb->priv = PRIV_MIN;
+ return;
+}
+
+void set_multiple_funcs (parseinfo *csb, int value)
+{
+ csb->visible_ambig.multiple_funcs = value;
+ csb->hidden_ambig.multiple_funcs = value;
+}
+
+void increment_multiple_funcs (parseinfo *csb, char *str)
+{
+ char *visible_str;
+ int value;
+
+ if (csb->command_visible) {
+ csb->visible_ambig.multiple_funcs++;
+ visible_str = "visible";
+ value = csb->visible_ambig.multiple_funcs;
+ } else {
+ csb->hidden_ambig.multiple_funcs++;
+ visible_str = "hidden";
+ value = csb->hidden_ambig.multiple_funcs;
+ }
+ if (parser_help_debug || parser_ambig_debug) {
+ printf("\nIncreasing %s multiple_funcs to %d in %s",
+ visible_str, value, str);
+ }
+
+}
+
+int test_multiple_funcs (parseinfo *csb, char test, int value)
+{
+ int mf = (csb->visible_ambig.multiple_funcs +
+ csb->hidden_ambig.multiple_funcs);
+
+ switch (test) {
+ case '<': return(mf < value);
+ case '>': return(mf > value);
+ case '=': return(mf == value);
+ default:
+ printf("test_multiple_funcs: %c\n", test);
+ break;
+ }
+ return(0);
+}
+
+int test_visible_multiple_funcs (parseinfo *csb, char test, int value)
+{
+ int mf = csb->visible_ambig.multiple_funcs;
+
+ switch (test) {
+ case '<': return(mf < value);
+ case '>': return(mf > value);
+ case '=': return(mf == value);
+ default:
+ /* errmsg(&msgsym(MULFUNCS, PARSER), test); */
+ printf("test_multiple_visible_funcs : %c\n",test );
+ break;
+ }
+ return(0);
+}
+
+int test_invisible_multiple_funcs (parseinfo *csb, char test, int value)
+{
+ int mf = csb->hidden_ambig.multiple_funcs;
+
+ switch (test) {
+ case '<': return(mf < value);
+ case '>': return(mf > value);
+ case '=': return(mf == value);
+ default:
+ printf("\n%% Unknown test in test_multiple_funcs '%c'", test);
+ break;
+ }
+ return(0);
+}
+
+void print_multiple_funcs (parseinfo *csb)
+{
+ printf("\ncsb->visible_ambig.multiple_funcs = %d",
+ csb->visible_ambig.multiple_funcs);
+ printf("\ncsb->hidden_ambig.multiple_funcs = %d",
+ csb->hidden_ambig.multiple_funcs);
+}
+
+
+static chain_link *get_link_point (uint which_chain)
+{
+ int i = 0;
+ chain_link *cp;
+ chain_list *lp;
+
+ /* Check static link points */
+ cp = &chain_gang[i++];
+ while (cp && (cp->id != PARSE_LIST_END)) {
+ if (cp->id == which_chain) {
+ return(cp);
+ }
+ cp = &chain_gang[i++];
+ }
+ /* Check dynamic link points */
+ lp = llist;
+ while (lp != NULL) {
+ if (lp->cp.id == which_chain) {
+ return(&lp->cp);
+ }
+ lp = lp->next;
+ }
+ /* Didn't find anything */
+ return(NULL);
+}
+
+static boolean parser_add_chains (uint which_chain,
+ dynamic_transition *commands,
+#ifdef PARSER_DEBUG_LINKS
+ const char *module,
+#endif /* PARSER_DEBUG_LINKS */
+ boolean already_on_list)
+{
+ chain_link *where;
+ boolean status = TRUE;
+
+ if ( PSsemTake(parse_chain_sem, WAIT_FOREVER) == ERROR ) {
+ PSpanic("Cannot take parse chain semaphore\n");
+ }
+
+ /*
+ * Make sure we have a place to link this
+ */
+ where = get_link_point(which_chain);
+ if (!where) {
+ if (already_on_list) {
+ /*
+ * point is already on unresolved list, so return FALSE
+ */
+ status = (FALSE);
+ goto SEMRELEASE;
+
+ } else {
+ /*
+ * No place to add it yet, so place on unresolved list
+ */
+ status = (add_to_unresolved_chains(which_chain, commands
+#ifdef PARSER_DEBUG_LINKS
+ , module
+#endif /* PARSER_DEBUG_LINKS */
+ ));
+
+ goto SEMRELEASE;
+ }
+ }
+
+ switch (where->type) {
+ case PARSER_ENTRY_LINK_POINT:
+ status = (parser_resolve_entry_link_point(where, commands
+#ifdef PARSER_DEBUG_LINKS
+ , module
+#endif /* PARSER_DEBUG_LINKS */
+ ));
+ break;
+ case PARSER_EXIT_LINK_POINT:
+ status = (parser_resolve_exit_link_point(where, commands));
+ break;
+ default:
+ status = FALSE;
+ }
+
+
+ SEMRELEASE:
+
+ if ( PSsemGive(parse_chain_sem) == ERROR ) {
+ PSpanic("Cannot give parse chain semaphore\n");
+ }
+
+ return(status);
+
+}
+
+boolean parser_add_commands_func (uint which_chain,
+ dynamic_transition *commands
+#ifdef PARSER_DEBUG_LINKS
+ , const char *module
+#endif /* PARSER_DEBUG_LINKS */
+ )
+{
+ boolean status ;
+
+ if ( PSsemTake(parse_chain_sem, WAIT_FOREVER) == ERROR ) {
+ PSpanic("Cannot take parse chain semaphore\n");
+ }
+
+ status = (parser_add_chains(which_chain, commands,
+#ifdef PARSER_DEBUG_LINKS
+ module,
+#endif /* PARSER_DEBUG_LINKS */
+ FALSE));
+
+ if ( PSsemGive(parse_chain_sem) == ERROR ) {
+ PSpanic("Cannot give parse chain semaphore\n");
+ }
+
+ return(status);
+}
+
+static boolean parser_resolve_entry_link_point (chain_link *where,
+ dynamic_transition *commands
+#ifdef PARSER_DEBUG_LINKS
+ ,const char *module
+#endif /* PARSER_DEBUG_LINKS */
+ )
+{
+ dynamic_transition *tw;
+
+ /*
+ * Check to make sure the chain hasn't already been linked.
+ */
+ tw = where->link_point->accept;
+ while (tw) {
+ if (tw == commands) {
+ /*
+ * Parse chain already linked in, but it's not really
+ * a failure because the parse chain has been linked
+ * in, so we return TRUE.
+ */
+ return(TRUE);
+ }
+ if (tw->alternate == (dynamic_transition *)&pname(link_trans)) {
+ break;
+ }
+ tw = tw->alternate;
+ }
+ if (!tw || (tw->alternate != (dynamic_transition *)&pname(link_trans))) {
+ printf("Parser No Link at %d\n", __LINE__);
+ return(FALSE);
+ }
+
+ if (commands) {
+ /*
+ * At this point last_cmd's alternate points to link_point,
+ * so we have the right place
+ */
+ commands->alternate = (dynamic_transition *)tw->alternate;
+#ifdef PARSER_DEBUG_LINKS
+ commands->args = module;
+#endif /* PARSER_DEBUG_LINKS */
+ tw->alternate = commands;
+ return(TRUE);
+ } else {
+ printf("Parser No Link at %s:%d\n", __FILE__, __LINE__);
+ return(FALSE);
+ }
+}
+
+static boolean parser_resolve_exit_link_point (chain_link *where,
+ dynamic_transition *commands)
+{
+ if (!commands ||
+ !where ||
+ !commands->accept ||
+ (commands->accept->alternate !=
+ (dynamic_transition *)&pname(link_trans))) {
+
+ /*
+ * Transition is broken or already linked
+ */
+ return(FALSE);
+ }
+
+ commands->accept->alternate = where->link_point;
+ return(TRUE);
+}
+
+/*
+ * parser_add_command_list - Add a series of parse chains
+ */
+
+boolean parser_add_command_list_func (parser_extension_request *chain
+#ifdef PARSER_DEBUG_LINKS
+ , const char *module
+#endif /* PARSER_DEBUG_LINKS */
+ )
+{
+ int i;
+ boolean status = TRUE;
+
+ if ( PSsemTake(parse_chain_sem, WAIT_FOREVER) == ERROR ) {
+ PSpanic("Cannot take parse chain semaphore\n");
+ }
+
+ for (i = 0; chain[i].type != PARSE_LIST_END; i++) {
+ if (!parser_add_commands(chain[i].type, chain[i].commands, module)) {
+ status = FALSE;
+ break;
+ }
+ }
+
+ if ( PSsemGive(parse_chain_sem) == ERROR ) {
+ PSpanic("Cannot give parse chain semaphore\n");
+ }
+ return(status);
+}
+
+
+#define ADDR_GROW 3
+addr_func *addr_funcs = NULL;
+static uint addr_funcs_length = 0;
+
+static void parser_add_address_set(addr_func *addr, const uint addr_type,
+ short_help_func get_short_help,
+ match_gen_func func);
+
+/* NO need to protect this with semaphore since it is assumed that
+ * tParser by itself will be Single Threaded...
+ */
+void parser_add_address (const uint addr_type, short_help_func get_short_help,
+ match_gen_func func)
+{
+ int i;
+ addr_func *tmp;
+
+ if (addr_funcs == NULL) {
+ if ((addr_funcs = (addr_func *)PARSERmalloc(ADDR_GROW*sizeof(addr_func))) == NULL) {
+ printf(nomemory);
+ return;
+ }
+ addr_funcs_length = ADDR_GROW;
+ parser_add_address_set(&addr_funcs[0], ADDR_ILLEGAL, NULL, NULL);
+ }
+
+ i = 0;
+ while ((addr_funcs[i].addr_type != ADDR_ILLEGAL) &&
+ (i < addr_funcs_length)) {
+ i++;
+ }
+
+ if (addr_funcs[i].addr_type == ADDR_ILLEGAL) {
+ if ((i+1) >= addr_funcs_length) {
+ if ((tmp = PARSERmalloc((ADDR_GROW + addr_funcs_length) *
+ sizeof(addr_func))) == NULL) {
+ printf(nomemory);
+ return;
+ }
+ bcopy((char *)addr_funcs, (char *)tmp,
+ addr_funcs_length * sizeof(addr_func));
+ PARSERfree(addr_funcs);
+ addr_funcs = tmp;
+ addr_funcs_length += ADDR_GROW;
+ }
+ parser_add_address_set(&addr_funcs[i], addr_type,
+ get_short_help, func);
+ parser_add_address_set(&addr_funcs[i+1], ADDR_ILLEGAL, NULL, NULL);
+ } else {
+ /* something's wrong */
+ printf("\n%% Invalid end to address list, can't add protocol %d",
+ addr_type);
+ }
+}
+
+static void parser_add_address_set (addr_func *addr, const uint addr_type,
+ short_help_func get_short_help,
+ match_gen_func func)
+{
+ addr->addr_type = addr_type;
+ addr->get_short_help = get_short_help;
+ addr->func = func;
+}
+
+
+
+static void resolve_parse_chains (void)
+{
+ if ( PSsemTake(parse_chain_sem, WAIT_FOREVER) == ERROR ) {
+ PSpanic("Cannot take parse chain semaphore\n");
+ }
+
+ {
+ chain_list *cp = cl;
+ chain_list *tmp;
+ chain_list *old = NULL;
+
+ while (cp != NULL) {
+
+ if (!parser_add_chains(cp->cp.id, cp->cp.link_point,
+
+#ifdef PARSER_DEBUG_LINKS
+ cp->cp.name,
+#endif /* PARSER_DEBUG_LINKS */
+ TRUE)) {
+ /*
+ * Failed again, leave on list and try later
+ */
+ old = cp;
+ cp = cp->next;
+ } else {
+ /*
+ * Success, remove and free link
+ */
+ if (cp == cl) {
+ cl = cl->next;
+ }
+ tmp = cp;
+ cp = cp->next;
+ if (old) {
+ old->next = cp;
+ }
+ PARSERfree(tmp);
+ }
+ }
+
+ }
+
+ if ( PSsemGive(parse_chain_sem) == ERROR ) {
+ PSpanic("Cannot give parse chain semaphore\n");
+ }
+
+}
+
+
+
+
+
+static boolean add_to_unresolved_chains (uint which_chain,
+ dynamic_transition *commands
+#ifdef PARSER_DEBUG_LINKS
+ , const char *module
+#endif /* PARSER_DEBUG_LINKS */
+ )
+{
+ chain_list *cp;
+ boolean status = TRUE;
+
+ if ( PSsemTake(parse_chain_sem, WAIT_FOREVER) == ERROR ) {
+ PSpanic("Cannot take parse chain semaphore\n");
+ }
+ /*
+ * Make sure commands isn't alreay on the list
+ */
+ cp = cl;
+ while (cp != NULL) {
+ if ((cp->cp.link_point == commands) &&
+ (cp->cp.id == which_chain)) {
+ /*
+ * It's a duplicate, but we return true because
+ * the link point has been successfully added.
+ */
+ goto SEMRELEASE;
+ }
+ cp = cp->next;
+ }
+
+ if ((cp = (chain_list *)PARSERmalloc(sizeof(chain_list))) == NULL) {
+ printf(nomemory);
+ status = FALSE;
+ } else {
+
+ cp->cp.id = which_chain;
+#ifdef PARSER_DEBUG_LINKS
+ cp->cp.name = module;
+#endif /* PARSER_DEBUG_LINKS */
+ cp->cp.link_point = commands;
+ cp->next = cl;
+ cl = cp;
+ }
+
+ SEMRELEASE:
+
+ if ( PSsemGive(parse_chain_sem) == ERROR ) {
+ PSpanic("Cannot give parse chain semaphore\n");
+ }
+ return(status);
+}
+
+boolean parser_add_link_point_func (uint which_chain,
+#ifdef PARSER_DEBUG_LINKS
+ const char *module,
+#endif /* PARSER_DEBUG_LINKS */
+ transition *lp)
+{
+ dynamic_transition *dp = (dynamic_transition *)lp;
+
+ return(parser_add_link_to_list(which_chain,
+#ifdef PARSER_DEBUG_LINKS
+ module,
+#endif /* PARSER_DEBUG_LINKS */
+ dp, PARSER_ENTRY_LINK_POINT));
+}
+
+boolean parser_add_link_exit_func (uint which_chain,
+#ifdef PARSER_DEBUG_LINKS
+ const char *module,
+#endif /* PARSER_DEBUG_LINKS */
+ transition *lp)
+{
+ dynamic_transition *dp = (dynamic_transition *)lp;
+
+ return(parser_add_link_to_list(which_chain,
+#ifdef PARSER_DEBUG_LINKS
+ module,
+#endif /* PARSER_DEBUG_LINKS */
+ dp, PARSER_EXIT_LINK_POINT));
+}
+
+static boolean parser_add_link_to_list (uint which_chain,
+#ifdef PARSER_DEBUG_LINKS
+ const char *module,
+#endif /* PARSER_DEBUG_LINKS */
+ dynamic_transition *lp, uint type)
+{
+ chain_list *new_lp;
+ boolean status = TRUE;
+
+ if ( PSsemTake(parse_chain_sem, WAIT_FOREVER) == ERROR ) {
+ PSpanic("Cannot take parse chain semaphore\n");
+ }
+
+ if ((new_lp = (chain_list *)PARSERmalloc(sizeof(chain_list))) == NULL) {
+ printf(nomemory);
+ status = FALSE;
+ goto SEMRELEASE;
+ }
+
+ new_lp->cp.id = which_chain;
+#ifdef PARSER_DEBUG_LINKS
+ new_lp->cp.name = module;
+#endif /* PARSER_DEBUG_LINKS */
+ new_lp->cp.link_point = lp;
+ new_lp->cp.type = type;
+ new_lp->next = llist;
+
+ llist = new_lp;
+
+ SEMRELEASE:
+
+ if ( PSsemGive(parse_chain_sem) == ERROR ) {
+ PSpanic("Cannot give parse chain semaphore\n");
+ }
+
+ return(status);
+}
+
+
+
+
+/*****************************************************************
+ *
+ * Func: parser_exec_callback
+ *
+ * Desc: Task entry point for Callback tasks
+ *
+ * Inputs: None
+ *
+ * Result: None
+ *
+ * Algorithm:
+ * Parser identifies callback function for a command
+ * Sends the callback function pointer information to
+ * the callback task, so that it can process other
+ * commands from other I/O sources. This function waits
+ * for intimation from parser and executes the callback
+ * function synchronously
+ *
+ *****************************************************************/
+void parser_exec_callback( void )
+{
+ tINT outFd, inFd, errFd;
+ tUOCTET4 moduleId = 1;
+ tOCTET2 rc = RC_OK;
+ tpCOMSIM pComSim = NULL;
+ tpCALLBACKMSG pCallback = NULL ;
+ tpPARSERSIM pSim = NULL;
+
+ parseinfo *csb = NULL;
+ char *buffer = NULL;
+ parser_mode *prevMode = NULL ;
+ boolean bErrorFlag = FALSE;
+ char *pCwd = NULL;
+
+ addSignalHandlers();
+
+ /* Get the original FDs */
+ inFd = ioTaskStdGet( 0, STD_IN );
+ outFd = ioTaskStdGet( 0, STD_OUT );
+ errFd = ioTaskStdGet( 0, STD_ERR );
+
+
+ FOREVER {
+
+ pCallback = NULL;
+ pSim = NULL;
+ csb = NULL;
+ bErrorFlag = FALSE;
+
+ /* Reset the errno of the callback task */
+ errnoOfTaskSet( 0, OK );
+
+ /* Reset the Signal Flags */
+ /*
+ * RAMS: commented this for now
+
+ setTaskSignalMask(0,0); */
+
+ /* Wait till a command needs to be executed as
+ * determined by the tParser
+ */
+ if ( msgQReceive( callback_Q_Id, (char *)&pCallback,
+ sizeof( tCALLBACKMSG), WAIT_FOREVER )
+ == ERROR ) {
+ printf("tCallback:Cannot receive from Message Q\n");
+ continue;
+ }
+
+ /* Something wrong if we get NULL callback message */
+ if ( pCallback == NULL ) {
+ printf("tCallback:NULL Message obtained from Message Queue\n");
+ continue;
+ }
+
+ /* Get the CSB & SIM associated with the callback message */
+ csb = pCallback->csb;
+ pSim = pCallback->pSim;
+ pComSim = &(pSim->comsim);
+
+ if ( !csb || !pSim ) {
+ printf("NULL Pointer obtained for CSB / SIM \n");
+ bErrorFlag = TRUE;
+ goto cleanup;
+ }
+
+ /*
+ * If this is an interactive command,
+ * the command callback is responsible
+ * for doing any special tty processing
+ * that is needed
+ */
+ if ( csb->flags & TERMINAL_MODE ) {
+ /*
+ * Reset the terminal characteristics to 'TERMINAL' so that
+ * the callback functions need not do echoing etc
+ */
+ if ( !( csb->flags & CONFIG_CGI ) ) {
+ ioSetTerminalMode( csb->inFd, IO_LINE_MODE );
+ }
+
+ /*
+ * Disable tMore processing. We just
+ * redirect the output back to the
+ * original fd and let the parser_input
+ * layer cleanup the tMore task.
+ */
+ if (csb->savedFd >= 0) {
+ csb->outFd = csb->savedFd;
+ }
+ }
+ /*
+ * RAMS: commented this for now
+
+ taskSetTtyAttr(csb->inFd, SECONDARY_TASK, TRUE); */
+
+ /* Redirect the I/O based on the I/O Source */
+ ioTaskStdSet(0, STD_IN, csb->inFd );
+ ioTaskStdSet(0, STD_OUT, csb->outFd );
+ ioTaskStdSet(0, STD_ERR, csb->outFd );
+
+#if 0
+ /* RAMS: no access control check now */
+ /* Do not do access control check if the system is loading
+ * since during intialization all tasks execute in 'root'
+ * user context
+ */
+ if ( !systemloading && ( setUid( csb->uid ) == FALSE ) ) {
+ printf("Invalid UID obtained %d\n", (int)csb->uid);
+ csb->uid = INVALID_UID;
+ bErrorFlag = TRUE;
+ goto cleanup;
+ }
+#endif
+
+ moduleId = pComSim->origid;
+ rc = RC_OK;
+
+ /* Make note of previous mode we are in */
+ prevMode = csb->mode;
+
+ /* pIndex is a pointer to the previous cookie for 'more' */
+ csb->pIndex = pSim->index;
+ csb->maxRecordCount = pSim->maxCount;
+ /*
+ RAMS : commented this for now
+ if (( pCwd = getTaskCWD_k(csb->ioTaskId, &pFreeFunc)) == NULL) {
+ printf("Cannot get Current Working Directory\n");
+ } else {
+ setCWD( pCwd );
+ pFreeFunc( pCwd );
+ }
+ */
+
+ /* Call the 'callback function' */
+ csb->action_func(csb);
+
+ if (csb->mode == exec_mode) {
+ /* Clear all flags except some fixed ones */
+ csb->flags &= ( CONFIG_TERM | KEYWORD_MATCHED | CONFIG_PER_USER
+ | CONFIG_CGI | COMMAND_COMPLETE );
+ }
+
+ /* See if we had something from callback, via 'write_buffer' */
+ /* buffer = read_buffer();*/
+ fflush(stderr);
+ fflush(stdout);
+
+ /* Reset the CSB Line */
+ if (csb->in_help == PARSER_NO_HELP) {
+ *(csb->line) = '\0';
+ /* Indicate to I/O Task that the command was complete
+ * for history mechanism
+ */
+ csb->flags |= COMMAND_COMPLETE;
+ }
+
+ cleanup:
+
+ /* Send response back to the I/O Source ( i.e. proxy tParser )
+ * indicating the command execution is complete
+ */
+ if ( ( rc = parser_send_response( pComSim, buffer, csb->MoreStatus ) )
+ != RC_OK ) {
+ printf("tCallback:Error occured while Posting in tParser\n");
+ }
+
+
+ /* Do cleanup */
+ if ( pSim && pComSim )
+ mFREESIM( pComSim );
+
+ PARSERfree( pCallback );
+
+ /* The I/O Task will be waiting on configuration semaphore
+ * for configuration commands; If the callback function
+ * asked us to do the job ( via csb->giveConfigSem ), lets
+ * give the semaphore.
+ * Also, release the configuration semaphore, during error
+ * conditions.
+ */
+ if ( csb->giveConfigSem || bErrorFlag) {
+ if ( prevMode == config_mode ||
+ csb->mode == config_mode ||
+ prevMode == interface_mode ||
+ csb->mode == interface_mode) {
+ if ( PSsemGive( csb->configSemId ) == ERROR )
+ PSpanic("Cannot Give configuration semaphore\n");
+ }
+ }
+
+ /* Reset the I/O redirection */
+ ioTaskStdSet(0, STD_IN, inFd);
+ ioTaskStdSet(0, STD_OUT, outFd);
+ ioTaskStdSet(0, STD_ERR, errFd);
+ /*
+ * RAMS: commented this for now
+
+ taskSetTtyAttr(csb->inFd, SECONDARY_TASK, FALSE); */
+ }
+
+ return;
+}
+
+/*****************************************************************
+ *
+ * Func: parser_send_response
+ *
+ * Desc: Send a SIM to I/O Source indicating command is complete
+ *
+ * Inputs:
+ * pSim : Input SIM from parser
+ * buffer : Output buffer, if any. NULL, if nothing
+ * The I/O source will free this buffer
+ * status : Passed as SIM Status to I/O Source
+ *
+ * Result: RC_OK : If SIM Posted to I/O Source
+ * RC_ERR : Otherwise
+ *
+ * Algorithm:
+ *
+ *****************************************************************/
+tOCTET2 parser_send_response( tpCOMSIM pSim, char *buffer, tUOCTET4 status )
+{
+ tpCOMSIM pComSim = NULL;
+ tOCTET2 rc = RC_OK;
+
+ pComSim = NULL;
+ pComSim = mGETSIM( sizeof( tCOMSIM ) );
+
+ if (pComSim == NULL)
+ return (RC_ERR);
+
+ mFILL_COM_SIM( pComSim, PARSER_MODULE, pSim->origid,\
+ IO_CMD_COMPLETE_IND, pSim->requestid, buffer, 0, status );
+
+ mPOST_SIM_NIND( pComSim, rc );
+ return ( rc );
+}
+
+
+
+
+static void addSignalHandlers ( void )
+{
+ /*
+ *RAMS: Commented this for now
+
+ signal(SIGINT, defaultSignalHandler);
+ signal(SIGKILL, defaultSignalHandler); */
+}
+
+
+#ifdef IOS_PARSER
+/*
+ * Recurse through instead of using a stack
+ */
+void recurse_node (parseinfo *csb, transition *node)
+{
+ queuetype *t1 = csb->tokenQ;
+ queuetype t2;
+
+ queue_init(&t2, 0);
+ csb->tokenQ = &t2;
+ push_node(csb, node);
+ parse_token(csb);
+ csb->tokenQ = t1;
+}
+
+/*
+ * parse_checklevels
+ * check previous parser levels to see if there is a command match
+ * "up there" somewhere. This used to be part of parse_cmd(), but
+ * I moved it out to save stack space when it's not used.
+ */
+
+static void parse_checklevels (parseinfo *csb, int save_line_index)
+{
+#define MAX_MODE_STACK 5
+ typedef struct parser_mode_stack_ {
+ parser_mode *mode;
+ void *var;
+ boolean leave_subcommand;
+ uint error_index;
+ } parser_mode_stack;
+
+ /*
+ * If the parse at the secondary level fails, we save the secondary state
+ * and reset the system for parsing the at the primary level. If the
+ * primary parse also fails, we report the error for the best match.
+ * The state is set for the best match (i.e. longest error_index).
+ * This prevents an error in an interface command from allowing
+ * the broken command's subcommands to mistakenly operate on
+ * a previous interface. Similarly for other commands which have
+ * subcommands.
+ *
+ * We save (and clear) the IDB pointer so that we can get out of
+ * subinterface state. Ditto the CDB pointer.
+ */
+
+ parser_mode_stack mstack[MAX_MODE_STACK];
+ parser_mode *alt_mode;
+ int i = 0;
+
+ alt_mode = get_alt_mode(csb->mode);
+ while (alt_mode) {
+
+ if (i < MAX_MODE_STACK) {
+ mstack[i].mode = csb->mode;
+ mstack[i].var = mode_save_vars(csb);
+ mstack[i].leave_subcommand = csb->leave_subcommand;
+ mstack[i].error_index = csb->error_index;
+ i++;
+ }
+
+ csb->mode = alt_mode;
+ set_multiple_funcs(csb, 0);
+ csb->error_index = 0;
+ csb->line_index = save_line_index;
+ csb->sense = TRUE;
+ csb->set_to_default = FALSE;
+ /* zero_csb_strings(csb); */
+ csb->leave_subcommand = FALSE;
+
+ push_node(csb, get_mode_top(csb->mode));
+ parse_token(csb);
+
+ if (test_multiple_funcs(csb, '=', 0) || (csb->next == NULL)) {
+ alt_mode = get_alt_mode(csb->mode);
+ } else {
+ alt_mode = NULL;
+ }
+ }
+
+ if (test_multiple_funcs(csb, '=', 0) || (csb->next == NULL)) {
+ while ((i > 0) && (!csb->leave_subcommand) ) {
+ i--;
+ csb->error_index = mstack[i].error_index;
+ csb->leave_subcommand = mstack[i].leave_subcommand;
+ csb->mode = mstack[i].mode;
+ mode_reset_vars(csb, mstack[i].var);
+ }
+ }
+}
+
+void show_parser_unresolved (parseinfo *csb)
+{
+ chain_list *cp = cl;
+
+ printf("\nUnresolved parse chains:");
+ while (cp != NULL) {
+ printf("\n %-3d", cp->cp.id);
+#ifdef PARSER_DEBUG_LINKS
+ printf(" %s", cp->cp.name);
+#endif /* PARSER_DEBUG_LINKS */
+ cp = cp->next;
+ }
+}
+
+#ifdef PARSER_DEBUG_LINKS
+void show_parser_links (parseinfo *csb)
+{
+ chain_link *cp;
+ dynamic_transition *tp;
+ int i = 0;
+ chain_list *lp;
+ static const char *show_links_header =
+ "\n Name ID Addr Type";
+
+ if ( PSsemTake(parse_chain_sem, WAIT_FOREVER) == ERROR ) {
+ PSpanic("Cannot take parse chain semaphore\n");
+ }
+
+ if (!GETOBJ(string,1)[0]) {
+ printf("\nCurrent parser link points:");
+ printf(show_links_header);
+
+ cp = &chain_gang[i++];
+ while (cp && cp->name != NULL) {
+ printf("\n %30s %-4d 0x%6x %-2d",
+ cp->name, cp->id, cp->link_point, cp->type);
+ cp = &chain_gang[i++];
+ }
+ printf("\nAdded at run time:");
+ printf(show_links_header);
+ lp = llist;
+ while (lp != NULL) {
+ printf("\n %30s %-4d 0x%6x %-2d",
+ lp->cp.name, lp->cp.id, lp->cp.link_point, lp->cp.type);
+ lp = lp->next;
+ }
+ printf("\n");
+ goto SEMRELEASE;
+ }
+
+ cp = get_link_point_by_name(GETOBJ(string,1));
+ if (!cp) {
+ printf("\n%% Unknown parser link point '%s'", GETOBJ(string,1));
+ goto SEMRELEASE;
+ }
+
+ if (!cp->link_point ||
+ !cp->link_point->accept ||
+ cp->link_point->accept == (dynamic_transition *)&pname(link_trans)) {
+ printf("\nNo links for link point '%s'", GETOBJ(string,1));
+ goto SEMRELEASE;
+ }
+
+ printf("\nCurrent links for link point '%s':", GETOBJ(string,1));
+ tp = cp->link_point->accept;
+ while (tp && (tp != (dynamic_transition *)&pname(link_trans))) {
+ if (tp->args) {
+ printf("\n %s", tp->args);
+ }
+ tp = tp->alternate;
+ }
+ printf("\n");
+
+
+ SEMRELEASE:
+
+ if ( PSsemGive(parse_chain_sem) == ERROR ) {
+ PSpanic("Cannot give parse chain semaphore\n");
+ }
+}
+
+#ifdef PARSER_DEBUG_LINKS
+/*
+ * Get link point by name
+ */
+static chain_link *get_link_point_by_name (const char *name)
+{
+ int i = 0;
+ chain_link *cp;
+ chain_list *lp;
+
+ /* Check static link points */
+ cp = &chain_gang[i++];
+ while (cp && cp->name != NULL) {
+ if (strcmp(cp->name, name) == 0) {
+ return(cp);
+ }
+ cp = &chain_gang[i++];
+ }
+ /* Check dynamic link points */
+ lp = llist;
+ while (lp != NULL) {
+ if (strcmp(lp->cp.name, name) == 0) {
+ return(&lp->cp);
+ }
+ lp = lp->next;
+ }
+ /* Didn't find anything */
+ return(NULL);
+}
+#endif /* PARSER_DEBUG_LINKS */
+
+/*
+ * parser_link_point_exists
+ * Return TRUE if someone has added the named entry link point.
+ */
+
+boolean parser_link_point_exists (uint which_chain)
+{
+ chain_list *lp;
+ boolean status = FALSE;
+
+ if ( PSsemTake(parse_chain_sem, WAIT_FOREVER) == ERROR ) {
+ PSpanic("Cannot take parse chain semaphore\n");
+ }
+
+ for (lp = llist; lp; lp = lp->next) {
+ if ((which_chain == lp->cp.id) &&
+ (PARSER_ENTRY_LINK_POINT == lp->cp.type))
+ status = (TRUE);
+ break;
+ }
+
+ if ( PSsemGive(parse_chain_sem) == ERROR ) {
+ PSpanic("Cannot give parse chain semaphore\n");
+ }
+ return(status);
+}
+
+#endif /* PARSER_DEBUG_LINKS */
+
+
+/*
+ * exit any configuration mode session block might be in.
+ */
+void exit_config_modes (parseinfo *csb)
+{
+ if ((csb->mode == config_mode) || test_mode_config_subcommand(csb)) {
+ exit_config_command(csb);
+ }
+}
+
+
+#endif /* IOS_PARSER */
+
+
+#define BEL "\007"
+
+/*
+ * word_completion
+ *
+ * Complete a keyword by comparing the current input line and the
+ * contents of the help buffer. If there is only one match in the help
+ * buffer, then verify that the keyword and the match are the same.
+ */
+static boolean word_completion (parseinfo *csb)
+{
+ char *cp, *sp;
+ char *hp, *jp, *ojp, *kp;
+ int help_matches = 0;
+
+ cp = sp = hp = jp = ojp = kp = NULL;
+
+ if ((help_matches = count_help_matches(csb)) == 0) {
+ /* No matches, seeya */
+ return(FALSE);
+ }
+
+ /* Find the start of the last word in the input */
+ for (cp = csb->line; *cp; cp++)
+ ; /* Null body */
+
+ while (cp != csb->line && *(cp-1) != ' ') {
+ cp--;
+ }
+
+ /* Find first help match */
+ for (hp = csb->help_save.buf;
+ hp && *hp && *hp != '\t' && *hp != '\n';
+ hp++) {
+ ; /* Null body */
+ }
+ /* See if we can find anything shorter */
+ jp = hp;
+ while (jp && *jp) {
+ /* move past white space to next help */
+ for (; jp && (*jp == '\t' || *jp == '\n'); jp++) {
+ ; /* Null body */
+ }
+ if (!jp || !*jp) {
+ /* end of help */
+ continue;
+ }
+ /* save pointer to beginning of current help */
+ ojp = jp;
+ /* find length of match */
+ for (kp = csb->help_save.buf;
+ jp && *jp && *jp != '\t' && *jp != '\n' &&
+ (tolower(*kp) == tolower(*jp));
+ jp++, kp++) {
+ ; /* Null body */
+ }
+ /* See if matched length is shorter */
+ if ((hp - csb->help_save.buf) > (jp - ojp)) {
+ hp = csb->help_save.buf + (jp - ojp);
+ }
+ /* Move to next white space */
+ for (; jp && *jp && *jp != '\t' && *jp != '\n'; jp++) {
+ ; /* Null body */
+ }
+ }
+
+ /* move to end of last word in the input */
+ for (sp = csb->help_save.buf;
+ *cp && *sp && (sp != hp) && (*sp != '\t') && (*sp != '\n');
+ cp++,sp++) {
+
+ /* Check that the input and the matched word are the same. */
+ if (tolower(*cp) != tolower(*sp)) {
+ printf("word_completion:Input / Output Did not Match\n");
+ return(FALSE);
+ }
+ }
+ /* We may have been attempting a match at the end of a line.
+ * In this case, we could copy an invalid help string onto the
+ * end of the current line (e.g. adding "<cr>" to the line.)
+ *
+ * This proccedure of using the help mechanism is totally wrong.
+ * Instead, a separate flag should be used for command completion
+ * and only the keyword action routine should add text to the help
+ * buffer. The other action routines should not add anything to
+ * the help buffer in this case.
+ *
+ * Until the above gets done, do not add help text which begins with
+ * a blank.
+ */
+ if (*sp == ' ') {
+ return(FALSE);
+ }
+
+ while (*sp && (sp != hp) && (*sp != '\t') && (*sp != '\n')) {
+ /* copy the rest of the matched word into the input buffer */
+ *cp++ = *sp++;
+ }
+ if (help_matches != 1) {
+ *cp = '\0';
+ return(FALSE);
+ }
+ *cp++ = ' '; /* Add trailing space */
+ *cp = '\0';
+ return(TRUE);
+}
+
+void push_node (parseinfo *csb, transition *node)
+{
+ parsenode *pp;
+
+ if (node->func == (trans_func) NONE_action) {
+ /*
+ * Nothing to do for NONE transitions, so return
+ */
+ return;
+ }
+
+ /* If we fail to obtain memory, we will not push this node onto
+ * the queue and this transition will never happen. We cannot
+ * propagate a return code all the way back up the stack and even
+ * if we did, we'd probably have to just prune this portion of the
+ * parse tree and try to keep going. Doing it here seems the best
+ * overall solution.
+ */
+ if ((pp = get_parsenode(csb)) == NULL) {
+ return;
+ }
+ pp->node = node;
+ pp->line_index = csb->line_index;
+ if (csb->nvgen || (csb->flags & COMMAND_AUTHORIZE)) {
+ strcpy(pp->nv_command, csb->nv_command);
+ }
+ pp->pmp = csb->pmp;
+ strcpy(pp->visible_ambig, csb->visible_ambig.ambig);
+ strcpy(pp->hidden_ambig, csb->hidden_ambig.ambig);
+ pp->command_visible = csb->command_visible;
+ pp->unsupported = csb->unsupported;
+ pp->sense = csb->sense;
+ pp->set_to_default = csb->set_to_default;
+ requeue(csb->tokenQ, pp);
+}
+
+/*
+ * Parse tokens from the top of the token stack. We check our
+ * runtime against the saved runtime and allow other processes
+ * access to the CPU every 250ms. This prevents the starvation
+ * of other processes during NVGEN and other CPU intensive operations.
+ *
+ * While there are tokens on the stack, we pop one off and call the
+ * token specific processing routine. The token specific processing
+ * routine will make sure the top of the stack contains the next
+ * node that should be processed (either by adding one or more nodes to the
+ * stack, or not adding anything to the stack.
+ */
+void parse_token (parseinfo *csb)
+{
+ parsenode *tos; /* Top of the stack */
+
+ while (! QUEUEEMPTY(csb->tokenQ)) {
+
+ tos = (parsenode *)dequeue(csb->tokenQ);
+
+ if (tos) {
+ if (tos->node) {
+ csb->line_index = tos->line_index;
+ csb->pmp = tos->pmp;
+ strcpy(csb->visible_ambig.ambig, tos->visible_ambig);
+ strcpy(csb->hidden_ambig.ambig, tos->hidden_ambig);
+ csb->command_visible = tos->command_visible;
+ csb->unsupported = tos->unsupported;
+ csb->sense = tos->sense;
+ csb->set_to_default = tos->set_to_default;
+ if (csb->nvgen || (csb->flags & COMMAND_AUTHORIZE)) {
+ strcpy(csb->nv_command, tos->nv_command);
+ }
+ if (tos->node->func) {
+ tos->node->func(csb, tos->node, tos->node->args);
+ }
+ }
+ tos->next = NULL;
+ PARSERfree(tos);
+ }
+ }
+}
+
+/*
+ * Parse a command line.
+ */
+int parse_cmd (parseinfo *csb, tpPARSERSIM pSim)
+{
+ int error = PARSE_ERROR_NOERR; /* 0=ERROR_NOERR; ERROR_AMBIG;
+ * ERROR_NOMATCH; ERROR_UNKNOWN;
+ * ERROR_ALIAS;
+ */
+ int save_line_index;
+ static boolean first_time_through = TRUE;
+ boolean alias_was_expanded = FALSE;
+ boolean execCallback = FALSE;
+ int inFd, outFd, errFd;
+ tpCALLBACKMSG pCallback=NULL;
+ tpCOMSIM pComSim = NULL;
+
+
+ inFd = ioTaskStdGet( 0, STD_IN );
+ outFd = ioTaskStdGet( 0, STD_OUT );
+ errFd = ioTaskStdGet( 0, STD_ERR );
+
+ ioTaskStdSet(0, STD_IN, csb->inFd );
+ ioTaskStdSet(0, STD_OUT, csb->outFd );
+ ioTaskStdSet(0, STD_ERR, csb->outFd );
+
+ csb->MoreStatus = RC_OK;
+ csb->giveConfigSem = TRUE;
+
+
+ if (first_time_through) {
+ resolve_parse_chains();
+ parser_modes_init();
+ first_time_through = FALSE;
+ }
+
+ parse_cmd_init(csb);
+
+ /*
+ * Check for empty lines.
+ * Strip leading whitespace.
+ * Save comments if in config mode.
+ */
+ for (csb->line_index = 0; csb->line[csb->line_index] == ' ' ||
+ csb->line[csb->line_index] == '\t'; csb->line_index++)
+ ; /* Null body */
+
+ /* Ignore empty lines which aren't help requests */
+ if ((csb->line[csb->line_index] == '\0') &&
+ !csb->in_help &&
+ !(csb->flags & PARSE_EMPTY_STRING)) {
+ *csb->line = '\0';
+ error = PARSE_ERROR_NOERR;
+ goto SEMRELEASE;
+
+ }
+ if ((csb->line[csb->line_index] == '!' ||
+ csb->line[csb->line_index] == '#' ||
+ csb->line[csb->line_index] == ';')) {
+ /* XXX Need a better algorithm for saving comments. */
+ save_line(csb, &csb->comment_save, "%s\n", csb->line);
+ *csb->line = '\0';
+ /* return(PARSE_ERROR_NOERR);*/ /* comments are always successful */
+ error = PARSE_ERROR_NOERR;
+ goto SEMRELEASE;
+ }
+
+ /* We do not currently support aliases. Need to
+ * include parser_alias.c in Makefile to make this
+ * work
+ if (expand_alias(csb)) {
+ alias_was_expanded = TRUE;
+ }
+ */
+
+ save_line_index = csb->line_index;
+
+ push_node(csb, get_mode_top(csb->mode));
+ parse_token(csb);
+
+ /* If setting privilege levels on commands, csb->priv_set will
+ * be non-zero, and csb->multiple_funcs will be > 1. This is
+ * not an error.
+ */
+ if (csb->priv_set) {
+ error = PARSE_ERROR_NOERR;
+ goto SEMRELEASE;
+ }
+
+ /* Doing help processing.
+ * If there was an ambiguous command match,
+ * print the ambiguous message, otherwise print the help message.
+ * If no help was provided, then tell the user that the command
+ * was unrecognized.
+ */
+ if (csb->in_help) {
+ /*
+ * If the number of visible matches is > 1, or
+ * the number of visible matches == 0 and the
+ * number of invisible matches > 1, then the
+ * command is ambiguous
+ */
+ if (test_visible_multiple_funcs(csb, '>', 1) ||
+ (test_visible_multiple_funcs(csb, '=', 0) &&
+ test_invisible_multiple_funcs(csb, '>', 1))) {
+ DBG_PARSER("\n Ambiguous command");
+ error = PARSE_ERROR_AMBIG;
+ } else {
+
+ /* There are two choices here:
+ * 1. The user asked for help.
+ * 2. The user requested keyword completion.
+ */
+ if (csb->lastchar == '?') {
+ if (csb->help_save.used > 0) {
+
+ csb->action_func = parser_help;
+ /*
+ * Have a callback task run the command.
+ */
+ pCallback = ( tpCALLBACKMSG)
+ PARSERmalloc(sizeof(tCALLBACKMSG));
+ pCallback->csb = csb;
+ pCallback->pSim = pSim;
+ if ((csb->mode != config_mode)) /* ||
+ (csb->mode != interface_mode)) */
+ {
+ csb->giveConfigSem = FALSE;
+ }
+ if ( msgQSend(callback_Q_Id, ( char *)&pCallback,
+ sizeof(tpCALLBACKMSG),
+ WAIT_FOREVER, MSG_PRI_NORMAL) == ERROR )
+ {
+ printf("Cannot send message to "
+ "callback queue\n");
+ error = PARSE_ERROR_NOERR;
+ }
+ execCallback = TRUE;
+
+ } else {
+ error = PARSE_ERROR_UNKNOWN;
+ }
+ } else { /* csb->lastchar == '\t' */
+ if ((word_completion(csb) == FALSE)) {
+ printf("\007");
+ }
+ }
+ }
+ } else {
+
+ /* If not doing help processing, then check whether the
+ * parse uniquely identified a command. If not, report
+ * the error (if no command was matched) or report that
+ * the command was ambiguous (if more than one command matched).
+ */
+
+ /* No commands matched. Report the error */
+ if (test_multiple_funcs(csb, '=', 0) || (csb->next == NULL)) {
+ if (alias_was_expanded) {
+ error = PARSE_ERROR_NOMATCH | PARSE_ERROR_ALIAS;
+ } else {
+ /* DBG_PARSER("\nNO MATCH OF COMMANDS"); */
+ error = PARSE_ERROR_NOMATCH;
+ }
+ }
+
+ /*
+ * If the number of visible matches is > 1, or
+ * the number of visible matches == 0 and the
+ * number of invisible matches > 1, then the
+ * command is ambiguous.
+ *
+ * Multiple functions were identified. This was an
+ * ambiguous command. Report the error.
+ */
+
+ if (test_visible_multiple_funcs(csb, '>', 1)) {
+ error = PARSE_ERROR_AMBIG;
+ } else {
+ if ((test_visible_multiple_funcs(csb, '=', 0) &&
+ test_invisible_multiple_funcs(csb, '>', 1))) {
+ if ((csb->line[csb->error_index] == '\0') &&
+ (csb->error_index > 0) && !csb->next) {
+ error = PARSE_ERROR_NOMATCH;
+ } else {
+ error = PARSE_ERROR_AMBIG;
+ }
+ }
+ }
+ /* If not doing help processing and one function selected,
+ * then we've successfully parsed a command. Restore its
+ * state and call the command function.
+ */
+ if (test_visible_multiple_funcs(csb, '=', 1) ||
+ (test_visible_multiple_funcs(csb, '=', 0) &&
+ test_invisible_multiple_funcs(csb, '=', 1))) {
+ boolean do_hidden_funcs = TRUE;
+
+ /*
+ * If test_visible_multiple_funcs == 1, then
+ * don't execute hidden functions
+ */
+
+ if (test_visible_multiple_funcs(csb, '=', 1)) {
+ do_hidden_funcs = FALSE;
+ }
+
+ while (csb->next != NULL) {
+ parseinfo *thiscsb;
+
+ /* Don't free the csb itself. Must copy its contents
+ * since csb was passed to us and the caller will need to
+ * continue to use this particular structure.
+ */
+ thiscsb = csb->next;
+ *csb = *csb->next; /* Struct copy */
+ /* chunk_free(parseinfo_chunks, thiscsb); */
+ PARSERfree( thiscsb );
+ thiscsb = NULL;
+
+ if (csb->command_visible ||
+ (!csb->command_visible && do_hidden_funcs)) {
+
+ if (csb->flags & COMMAND_FUNCTION) {
+ if (csb->command_function) {
+ csb->command_function(csb);
+ }
+ } else {
+ if (csb->action_func) {
+
+ /*
+ * Have a callback task run the command.
+ */
+ pCallback = ( tpCALLBACKMSG)
+ PARSERmalloc(sizeof(tCALLBACKMSG));
+ pCallback->csb = csb;
+ pCallback->pSim = pSim;
+ csb->giveConfigSem = FALSE;
+ if ( msgQSend(callback_Q_Id, ( char *)&pCallback,
+ sizeof(tpCALLBACKMSG),
+ WAIT_FOREVER, MSG_PRI_NORMAL)
+ == ERROR ) {
+ printf("Cannot send message to "
+ "callback queue\n");
+ error = PARSE_ERROR_NOERR;
+ }
+ execCallback = TRUE;
+ }
+ }
+ }
+ }
+ }
+
+ }
+
+ /* Free any lingering saved parseinfo structures, if needed. */
+ {
+ parseinfo *thiscsb = csb->next;
+ while (thiscsb != NULL) {
+ parseinfo *nextpd = thiscsb->next;
+ /* chunk_free(parseinfo_chunks, thiscsb); */
+ PARSERfree( thiscsb );
+ thiscsb = nextpd;
+ }
+ csb->next = NULL;
+ }
+
+ /* Reset prompt_lead if needed. This has to be done here because
+ * a primary config command may cause the parser to switch from
+ * a subcommand set. Only here do we know that this switch has
+ * occurred and only by examining the top of the active parse tree.
+ * This also has to be done for handling configuration from
+ * memory or net so that we aren't left with the prompt
+ * indicating the wrong command level.
+ */
+ if ( ( execCallback == FALSE ) && (csb->mode == exec_mode)) {
+ /* Clear all flags except some fixed ones */
+ csb->flags &= ( CONFIG_TERM | KEYWORD_MATCHED | CONFIG_PER_USER
+ | CONFIG_CGI | COMMAND_COMPLETE );
+ }
+
+ /* The only errors that we can report are parse errors. The commands
+ * are expected to report their internal errors.
+ */
+
+ SEMRELEASE:
+
+ if ( execCallback == FALSE ) {
+
+ /* Indicate to I/O Task that the command was complete
+ * for history mechanism
+ */
+ if ( csb->in_help == PARSER_NO_HELP )
+ csb->flags |= COMMAND_COMPLETE;
+
+ pComSim = &(pSim->comsim);
+
+ if ( error != PARSE_ERROR_NOERR && !(csb->flags & CONFIG_HTTP ) ) {
+ report_error(csb,error , FALSE);
+ }
+ if (csb->in_help == PARSER_NO_HELP) {
+ *(csb->line) = '\0';
+ }
+ parser_send_response(pComSim, NULL, csb->MoreStatus );
+ mFREESIM(pComSim);
+
+ if ( csb->giveConfigSem &&
+ ((csb->mode == config_mode) || (csb->mode == interface_mode)))
+ {
+ if ( PSsemGive( csb->configSemId ) == ERROR )
+ {
+ PSpanic("Cannot Give configuration semaphore\n");
+ }
+ }
+
+ }
+
+ ioTaskStdSet(0, STD_IN, inFd);
+ ioTaskStdSet(0, STD_OUT, outFd);
+ ioTaskStdSet(0, STD_ERR, errFd);
+
+ return(error);
+}
+
+
+/*
+ * bad_parser_subcommand
+ * Common code fragment for handling a bad subcommands with the new parser
+ */
+void bad_parser_subcommand (parseinfo *csb, uint var)
+{
+ printf("Bad Parser Sub-command : %s\n",
+ (csb->nvgen)?csb->nv_command:csb->line);
+}
+
+
+/*****************************************************************
+ *
+ * Func: ParserCallbackInit
+ *
+ * Desc: Initialize all parser callback tasks
+ *
+ * Inputs: None
+ *
+ * Result: None
+ *
+ * Algorithm:
+ *
+ *****************************************************************/
+extern int ParserCallBackTask[3];
+void ParserCallbackInit( void )
+{
+#define MAX_CALLBACK_TASKS 3
+
+ tINT index;
+ char tname[32];
+
+ /* Create the Message Queue. The parser (tParser) communicates
+ * with the callback tasks (tCallback) via this message queue
+ */
+ callback_Q_Id = msgQCreate( 1, sizeof(tpCALLBACKMSG), MSG_Q_FIFO);
+
+ if ( callback_Q_Id == NULL ) {
+ PSpanic("Cannot create callback message queue\n");
+ }
+
+ /* Spawn all the callback tasks */
+ for ( index = 0; index < MAX_CALLBACK_TASKS; index++) {
+ sprintf(tname, "tCallback%d", index);
+ ParserCallBackTask[index]=taskSpawn(tname,PARSER_TASK_PRIORITY, PARSER_TASK_OPTION, PARSER_TASK_STACK_SIZE,
+ (FUNCPTR)parser_exec_callback, 0,0,0,0,0,0,0,0,0,0);
+ if(ParserCallBackTask[index] == ERROR ) {
+ PSpanic("Cannot spawn callback tasks\n");
+ }
+
+ }
+}
+void ParserCallbackRestart(int index){
+
+ char tname[32];
+ /* Create the Message Queue. The parser (tParser) communicates
+ * with the callback tasks (tCallback) via this message queue
+ */
+ callback_Q_Id = msgQCreate( 1, sizeof(tpCALLBACKMSG), MSG_Q_FIFO);
+
+ if ( callback_Q_Id == NULL ) {
+ PSpanic("Cannot create callback message queue\n");
+ }
+ /* Spawn all the callback tasks */
+ sprintf(tname, "tCallback%d", index);
+ ParserCallBackTask[index]=taskSpawn(tname,PARSER_TASK_PRIORITY, PARSER_TASK_OPTION, PARSER_TASK_STACK_SIZE,
+ (FUNCPTR)parser_exec_callback, 0,0,0,0,0,0,0,0,0,0);
+ if(ParserCallBackTask[index] == ERROR ) {
+ PSpanic("Cannot spawn callback tasks\n");
+ }
+
+}
diff --git a/data/mnet/Common/cli/src/parser_actions.c b/data/mnet/Common/cli/src/parser_actions.c
new file mode 100644
index 0000000..0dc9583
--- /dev/null
+++ b/data/mnet/Common/cli/src/parser_actions.c
@@ -0,0 +1,3486 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <tyLib.h>
+#include <taskLib.h>
+#include <errnoLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <msgQLib.h>
+#include <sigLib.h>
+
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+#include <../include/parser_sim.h>
+#include <../include/parser.h>
+#include <../include/parser_defs_exec.h>
+#include <../include/parser_input.h>
+#include <../include/parser_sim.h>
+#include <../include/parser_util.h>
+#include <../include/parser_commands.h>
+#include <../include/nv.h>
+#include <../include/parser_errno.h>
+#include <../include/parser_ModNum.h>
+#include <../include/defs.h>
+#include <../include/parser_init.h>
+#include <../include/macros.h>
+#include <../include/parser_actions.h>
+#include <../include/parser_privilege.h>
+/*#include <limits.h>
+ /#include <clock.h> */
+
+#define DAYS_IN_WEEK 7
+#define MONTHS_IN_YEAR 12
+
+#define CHECK_RANGE_BOUNDS()\
+ if (arg->upper >= arg->lower) {\
+ lower = arg->lower;\
+ upper = arg->upper;\
+ } else {\
+ lower = arg->upper;\
+ upper = arg->lower;\
+ }
+
+#define CHECK_RANGE_BOUNDS_ALIST()\
+ if (arg->upper >= arg->lower) {\
+ lower = arg->lower;\
+ upper = arg->upper;\
+ } else {\
+ lower = arg->upper;\
+ upper = arg->lower;\
+ }\
+ if (arg->upper2 >= arg->lower2) {\
+ lower2 = arg->lower2;\
+ upper2 = arg->upper2;\
+ } else {\
+ lower2 = arg->upper2;\
+ upper2 = arg->lower2;\
+ }
+
+/********************************/
+/* Module Local Data */
+/********************************/
+
+const char *const month_name[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
+const char *const day_name[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri",
+ "Sat"};
+const char *const long_month_name[] = {"January", "February", "March",
+ "April", "May", "June", "July",
+ "August", "September", "October",
+ "November", "December"};
+const char *const long_day_name[] = {" ", "Sunday", "Monday", "Tuesday",
+ "Wednesday", "Thursday", "Friday",
+ "Saturday"};
+
+
+#ifdef IOS_PARSER
+
+/*
+ * Local variables
+ * Uncomment this when it is necessary
+ */
+keyword_options permitdeny_options[] = {
+ { "deny", "Specify packets to reject", FALSE },
+ { "permit", "Specify packets to forward", TRUE },
+ { NULL, NULL, 0 }
+};
+
+static boolean match_spaces(char *buf, int *pi);
+static char *hex_to_byte(char *s, char *out);
+
+#endif /* IOS_PARSER */
+
+/*
+ * Forward declarations
+ */
+static void parser_bail_out(parseinfo *, void (*)(parseinfo *), const char *);
+static void set_error_index(parseinfo *);
+static boolean match_signed_dec(char *, int, int, int *, int *);
+
+static void save_ambig_int(parseinfo *, const char *, int);
+static void save_ambig_uint(parseinfo *, const char *, uint);
+static void save_ambig_nstring(parseinfo *, const char *, const char *, uint);
+static void save_ambig_string_flag(parseinfo *, const char *, const char *, boolean);
+static void save_help_short(parseinfo *, const char *, boolean);
+static void save_help_msg(parseinfo *, const char *);
+static void nvgen_action(parseinfo *, transition *, void (*)(parseinfo *));
+void func_action (parseinfo *csb, transition *mine, void (*func) (parseinfo *));
+/* The parser match routines use simpler C routines to match the smaller
+ * pieces of tokens. These sub-routines come in two flavors:
+ *
+ * XXX_match returns (int) the number of chars it matched;
+ * use conclude_match to back over a successful match
+ * XXX_check returns (boolean) the status of the check;
+ * consumes no input
+ */
+
+/* These simple match and check routines could be made inline:
+ *
+ * terminator_check Did user hit RETURN, start a comment, or request help?
+ * eol_check Did user hit RETURN or start a comment here?
+ * help_check Did user request help here?
+ * Don't use this directly, try one of the next ones;
+ * long_help_check Did user request long help here?
+ * i.e, is this BOL or was last char W/S?
+ * short_help_check Did user request short help here?
+ * Opposite of long_help_check
+ */
+
+static boolean terminator_check (parseinfo *csb)
+{
+ return(is_terminator(csb->line[csb->line_index]));
+}
+
+boolean eol_check (parseinfo *csb)
+{
+ return(!csb->in_help && terminator_check(csb));
+}
+
+ boolean help_check (parseinfo *csb)
+{
+ return(csb->in_help && !csb->nvgen && terminator_check(csb));
+}
+
+static boolean long_help_check (parseinfo *csb)
+{
+ return(help_check(csb) &&
+ (csb->line_index == 0 || isspace(csb->line[csb->line_index - 1])));
+}
+
+static boolean short_help_check (parseinfo *csb)
+{
+ return(help_check(csb) && !long_help_check(csb));
+}
+
+static boolean priv_check (parseinfo *csb, trans_priv *priv)
+{
+ /*
+ * Only process keywords which are visible to the user at their current
+ * priv level.
+ */
+ if (csb->priv < priv->cur_priv) {
+ return(FALSE);
+ }
+
+ if ((TRANS_PRIV_FLAGS_GET(priv->flags) & PRIV_INTERACTIVE)) {
+ if (csb->flags & CONFIG_HTTP) {
+ return(FALSE);
+ }
+ }
+
+ /* Modify the current keyword privilege
+ * Don't allow internal commands unless they are enabled.
+ */
+
+ if ((TRANS_PRIV_FLAGS_GET(priv->flags) & PRIV_INTERNAL)
+ /* && !internal_cmd_enable */ ) {
+ return(FALSE);
+ }
+
+ /* Don't allow keywords not applicable to synalc
+ */
+
+ if ((TRANS_PRIV_FLAGS_GET(priv->flags) & PRIV_PSYNALC)
+ /* && (cpu_type == CPU_SYNALC) */
+ ) {
+ return(FALSE);
+ }
+
+ if (csb->in_help) {
+ /* Don't display keywords which are hidden */
+ if (TRANS_PRIV_FLAGS_GET(priv->flags) &
+ (PRIV_HIDDEN | PRIV_UNSUPPORTED)) {
+ return(FALSE);
+ }
+ }
+ /* Don't do NV generation on keywords that are obsolete */
+ if (csb->nvgen &&
+ !csb->priv_set &&
+ (TRANS_PRIV_FLAGS_GET(priv->flags) & PRIV_NONVGEN)) {
+ return(FALSE);
+ }
+
+ if ((TRANS_PRIV_FLAGS_GET(priv->flags) &
+ (PRIV_HIDDEN | PRIV_UNSUPPORTED)) ||
+ ((TRANS_PRIV_FLAGS_GET(priv->flags) & PRIV_NOHELP) &&
+ (csb->in_help == PARSER_NO_HELP))) {
+ csb->command_visible = FALSE;
+ }
+ if (TRANS_PRIV_FLAGS_GET(priv->flags) & PRIV_UNSUPPORTED) {
+ csb->unsupported = TRUE;
+ }
+
+ return(TRUE);
+}
+
+static void keyword_flag_modify (parseinfo *csb, trans_priv *priv, uint *flags)
+{
+ /* If this is a duplicate keyword, as indicated by PRIV_DUPLICATE in
+ * the keyword privileges, then reset KEYWORD_HELP_CHECK. This will
+ * prevent match_partial_keyword() from supplying any help for this
+ * keyword.
+ */
+
+ if ((TRANS_PRIV_FLAGS_GET(priv->flags) & PRIV_DUPLICATE) ||
+ (TRANS_PRIV_FLAGS_GET(priv->flags) & PRIV_NOHELP) ||
+ ((TRANS_PRIV_FLAGS_GET(priv->flags) & PRIV_USER_HIDDEN) &&
+ (csb->priv == PRIV_USER) &&
+ !(csb->flags & CONFIG_HTTP))) {
+ *flags &= ~KEYWORD_HELP_CHECK;
+ }
+}
+
+boolean match_char (char *cp, int *offset, char c)
+{
+ if (*(cp + *offset) == c) {
+ (*offset)++;
+ return(TRUE);
+ }
+ return(FALSE);
+}
+
+/*
+ * In effect, combines the match_whitespace ... csb->line_index += j; if
+ * (j | eol_check) sequences.
+ */
+boolean match_whitespace2 (char *cp, int *offset, boolean in_help)
+{
+ if (isspace(cp[*offset])) {
+ while (isspace(cp[*offset])) {
+ (*offset)++;
+ }
+ return(TRUE);
+ }
+ if ((!in_help) && is_terminator(cp[*offset])) {
+ return(TRUE);
+ }
+ return(FALSE);
+}
+
+boolean get_name (char *buf, char *name, int *pi, int buflen)
+{
+ char *sp, *dp;
+ int i;
+
+ /* Copy the name into local working storage */
+ sp = buf;
+ dp = name;
+ for (i = 0; i < buflen; i++) {
+ if (*sp == ' ' || *sp == '\0') {
+ break;
+ }
+ *dp++ = *sp++;
+ }
+ *dp = '\0';
+ if (i == 0)
+ return(FALSE);
+ if (i == buflen && (*sp != ' ' || *sp != '\0')) {
+ return(FALSE);
+ }
+
+ *pi = i;
+ return(TRUE);
+}
+
+/* NONE does just what its name implies */
+
+void NONE_action (parseinfo *csb)
+{
+}
+
+/* link_point is a place holder. It should never be reached. */
+
+void link_point_action (parseinfo *csb)
+{
+ printf("link_point_action(): Error\n");
+}
+
+/*
+ * no_alt is used at the end of a list of alternative tokens.
+ *
+ * There are several actions performed in no-alt-action, depending on the
+ * state of the parser.
+ *
+ * If performing NV generation, we return(i.e. do nothing).
+ *
+ * If providing help, we must check to see if more than one command has
+ * provided help (i.e. the command is ambiguous.) However, we can have
+ * multiple options generated by a single command. We keep track of all
+ * this by storing, each time through no_alt, the length of the help text
+ * generated so far. If the length has increased since the last no_alt,
+ * we increment csb->multiple_funcs. Thus we count how many token chains
+ * have generated help.
+ *
+ * If no-alt-action is called when setting keyword privileges, then
+ * don't treat it as an error. Increment csb->multiple_funcs so that
+ * token chains that have to check for previously matched tokens
+ * will work correctly.
+ *
+ * When no-alt-action is encountered in normal processing, increase
+ * error_index to our current line position if it's smaller.
+ * This indicates the deepest character in the command line we reached.
+ * parse_cmd() checks csb->multiple_funcs first to determine if an error
+ * occured. It will be zero if no command match occurred, and greater
+ * than one if the command input is ambiguous. If no command matched,
+ * error_index is deepest character we reached in the parse, and tells
+ * where to put an error marker.
+ */
+
+void no_alt_action (parseinfo *csb)
+{
+ ambig_struct *ap;
+
+ if (csb->command_visible) {
+ ap = &csb->visible_ambig;
+ } else {
+ ap = &csb->hidden_ambig;
+ }
+
+ /* NV generation */
+ if (csb->nvgen) {
+ return;
+ }
+
+ /*
+ * Priv set processing. If csb->priv_set is not PRIV_NULL, then don't
+ * treat being called as an error. Increment csb->multiple_funcs and
+ * return.
+ */
+ if (csb->priv_set) {
+ increment_multiple_funcs(csb, "no_alt_action 1");
+ return;
+ }
+
+ /* Help processing. Check the ambiguity buffers against one another.
+ * If ambig is non-null, we've matched some input and need to
+ * compare against ambig_save to see if it is ambiguous.
+ * This yields two cases:
+ * 1. ambig_save == NULL, indicating that this is the first match
+ * and that multiple_funcs should be incremented.
+ * 2. ambig_save != NULL, indicating that this is ambiguous and
+ * that multiple_funcs should be incremented again.
+ */
+ if (parser_ambig_debug) {
+ printf("\n1 Ambig buf '%s'", ap->ambig);
+ printf("\n1 Ambig_save buf '%s'", ap->ambig_save);
+ }
+ /***************************************************************************
+ ***************************************************************************
+ *
+ *
+ * Before you touch the ambiguity code, make sure you know what you
+ * are doing, or else it will break
+ *
+ * Here are some cases to case the behavior of the code
+
+ en
+
+ ! output should "interface internals"
+ show ip ospf int?
+
+ ! ambiguous
+ show ip ospf int ?
+
+ conf term
+ ! output should be "x25 x29 xns"
+ service pad
+ x?
+ ! ambiguous
+ x ?
+ ! output should be "x25 x29"
+ x2?
+ ! ambiguous
+ x2 ?
+ ! output should be "route routing"
+ xns rout?
+ ! ambiguous
+ xns rout ?
+ ! output should be "default-gateway default-network"
+ ip default?
+ ! ambiguous
+ ip default ?
+
+ end
+ !
+ !
+ ! To test the hidden keyword ambiguity stuff
+ ! output should be "where"
+ disable
+ w?
+ ! should match "where"
+ w
+ ! this command should also work
+ who
+ !
+ ! output should be "snap"
+ enable
+ conf term
+ interface Ethernet 0
+ arp s?
+ ! should match "arp snap"
+ arp s
+ ! this command should also work
+ arp smds
+ !
+ ! broken
+ slip /compressed ?
+
+ *
+ *
+ *
+ ***************************************************************************
+ ***************************************************************************/
+
+ if (ap->ambig[0]) {
+ if (ap->ambig_save[0]) {
+ int i = strlen(ap->ambig_save);
+ boolean ambig_save_longer = FALSE;
+
+ if (strlen(ap->ambig) < i) {
+ ambig_save_longer = TRUE;
+ i = strlen(ap->ambig);
+ }
+
+ if (strncmp(ap->ambig, ap->ambig_save, i) != 0) {
+ if (parser_ambig_debug) {
+ printf("\nAmbig case 1");
+ }
+ /*
+ * If there is something in the ambig_save buffer
+ * and it is NOT the same as the ambig_save
+ * buffer, so the keyword is matches or and we
+ * increase multiple_funcs and copy the ambig
+ * buffer to ambig_save buffer.
+ */
+ increment_multiple_funcs(csb, "no_alt_action 2");
+
+ /* Copy everything */
+ strcpy(ap->ambig_save, ap->ambig);
+
+ /* Clear ambig */
+ ap->ambig[0] = '\0';
+
+ } else {
+ if (parser_ambig_debug) {
+ printf("\nAmbig case 2");
+ }
+ /*
+ * If there is something in the ambig buffer
+ * and it is the same as in the ambig_save buffer,
+ * then we have a duplicate keyword and everything
+ * is ok, but we need to copy the longer string to
+ * ambig_save.
+ */
+ if (!ambig_save_longer) {
+ strcpy(ap->ambig_save, ap->ambig);
+ }
+ }
+ } else {
+ if (parser_ambig_debug) {
+ printf("\nAmbig case 3");
+ }
+ /*
+ * We didn't match anything before, so this is
+ * the first match, and multiple_funcs has already
+ * been set.
+ */
+ if (csb->in_help) {
+ increment_multiple_funcs(csb, "no_alt_action 3");
+ }
+
+ /* Copy everything */
+ strcpy(ap->ambig_save, ap->ambig);
+
+ /* Clear ambig */
+ ap->ambig[0] = '\0';
+
+ }
+ } else {
+ if (parser_ambig_debug) {
+ printf("\nAmbig case 4");
+ }
+ /*
+ * If the ambig buffer is empty,
+ * then we are at the end of a parse chain,
+ * so clear the ambig_save buffer
+ */
+ ap->ambig_save[0] = '\0';
+ }
+ if (parser_ambig_debug) {
+ printf("\n2 Ambig buf '%s'", ap->ambig);
+ printf("\n2 Ambig_save buf '%s'", ap->ambig_save);
+ }
+ if ((parser_help_debug && csb->in_help) || parser_ambig_debug) {
+ print_multiple_funcs(csb);
+ printf("\nCurrent help string:\n");
+ print_buf(csb->help_save, TRUE, TRUE, 0, 0);
+ printf("\n");
+ }
+ /* Normal Error processing */
+ set_error_index(csb);
+}
+void func_action (parseinfo *csb, transition *mine, void (*func) (parseinfo *))
+{
+ INVALID_NVGEN_CHECK;
+
+ if (!csb->in_help && func) {
+ (void) func(csb);
+ }
+ push_node(csb, mine->accept);
+}
+/*
+ * NOP - Generally used as a label
+ *
+ * Differs from NONE action in that it takes it's accepting state.
+ */
+
+void NOP_action (parseinfo *csb, transition *mine)
+{
+ push_node(csb, mine->alternate);
+ push_node(csb, mine->accept);
+};
+
+ /*
+ * KEYWORD matches a unique substring of a specified string
+ *
+ * arg->minmatch is the minimum required number of matching characters
+ *
+ */
+void keyword_action (parseinfo *csb, transition *mine,
+ keyword_struct * const arg)
+{
+ general_keyword_struct argout = {
+ arg->str, arg->help, arg->priv, -1, 0, 0,
+ (KEYWORD_WS_OK | KEYWORD_HELP_CHECK)};
+ general_keyword_action(csb, mine, &argout);
+}
+
+void keyword_mm_action (parseinfo *csb, transition *mine,
+ keyword_mm_struct * const arg)
+{
+ general_keyword_struct argout = {
+ arg->str, arg->help, arg->priv, -1, 0, arg->minmatch,
+ (KEYWORD_WS_OK | KEYWORD_HELP_CHECK)};
+ general_keyword_action(csb, mine, &argout);
+}
+
+void keyword_id_action (parseinfo *csb, transition *mine,
+ keyword_id_struct * const arg)
+{
+ general_keyword_struct argout = {
+ arg->str, arg->help, arg->priv, arg->offset, arg->val, 0,
+ (KEYWORD_WS_OK | KEYWORD_HELP_CHECK)};
+ general_keyword_action(csb, mine, &argout);
+}
+
+void keyword_orset_action (parseinfo *csb, transition *mine,
+ keyword_id_struct * const arg)
+{
+ general_keyword_struct argout = {
+ arg->str, arg->help, arg->priv, arg->offset, arg->val, 0,
+ (KEYWORD_WS_OK | KEYWORD_HELP_CHECK | KEYWORD_OR_SET)};
+ general_keyword_action(csb, mine, &argout);
+}
+
+void keyword_optws_action (parseinfo *csb, transition *mine,
+ keyword_struct * const arg)
+{
+ general_keyword_struct argout = {
+ arg->str, arg->help, arg->priv, -1, 0, 0,
+ (KEYWORD_WS_OK | KEYWORD_NO_WS_OK | KEYWORD_HELP_CHECK)};
+ general_keyword_action(csb, mine, &argout);
+}
+
+
+void general_keyword_action (parseinfo *csb, transition *mine,
+ general_keyword_struct * const arg)
+{
+ int i = 0;
+ uint flags;
+
+
+ /* Setup to check the alternates. */
+ push_node(csb, mine->alternate);
+
+ if ((arg->flags & KEYWORD_TEST) &&
+ (arg->offset != -1)) {
+ if (arg->flags & KEYWORD_OR_SET) {
+ if (*CSBVAR(csb, arg->offset, uint) & arg->val) {
+ return;
+ }
+ } else {
+ if (*CSBVAR(csb, arg->offset, uint)) {
+ return;
+ }
+ }
+ }
+
+ /* Check for privilege to use this keyword */
+ if (priv_check(csb, arg->priv) == FALSE) {
+ return;
+ }
+
+ if (csb->nvgen) {
+ /*
+ * Doing NV generation. Save the transition struct and the keyword
+ * text for the NV generation function.
+ */
+
+ if (arg->offset != -1) {
+ if (arg->flags & KEYWORD_OR_SET) {
+ *CSBVAR(csb, arg->offset, uint) |= arg->val;
+ } else {
+ *CSBVAR(csb, arg->offset, uint) = arg->val;
+ }
+ }
+ if (!csb->priv_set || nvgen_privilege(csb, arg->priv, arg->str)) {
+ nvgen_token(csb, mine, arg->str);
+ } else {
+ printf("\n privilege check failed in keyword action");
+ }
+ return;
+ }
+
+ /* Make a copy of the flags word because it may originate in ROM
+ * and we may need to modify the flags before matching the keyword.
+ */
+ flags = arg->flags;
+ keyword_flag_modify(csb, arg->priv, &flags);
+
+ /*
+ * If we are at the end of the input stream and we're doing help, add the
+ * long help message, which is just the concatenation of the search string
+ * and the help text. We fall-through in any case. If long help is being
+ * requested, nothing matches and we return.
+ *
+ * Otherwise, we are expecting to process a token. If the token matching
+ * fails, due to an unexpected end of the input stream or due to a
+ * different command, we will fall through the test and transition to the
+ * alternates.
+ *
+ * The alternates are processed in any case so that we
+ * exhaustively check all possible commands against the input
+ * stream. See the parser README for more information on how the
+ * commands are uniquely matched.
+ */
+
+ /*
+ * Check to see if the input matches this token. If there is no match,
+ * we skip processing this token and try the alternates.
+ */
+
+ i = 0;
+ if (match_partial_keyword(csb, arg->str, &i, arg->help,
+ arg->minmatch, flags, arg->priv->cur_priv)) {
+ csb->line_index += i;
+
+ if (csb->priv_set) {
+ /*
+ * Modify the current keyword privilege
+ */
+ priv_push(csb, arg->priv);
+ }
+ csb->last_priv = arg->priv->cur_priv;
+ if (csb->last_priv > csb->highest_priv) {
+ csb->highest_priv = csb->last_priv;
+ }
+ if (arg->offset != -1) {
+ if (arg->flags & KEYWORD_OR_SET) {
+ *CSBVAR(csb, arg->offset, uint) |= arg->val;
+ } else {
+ *CSBVAR(csb, arg->offset, uint) = arg->val;
+ }
+ }
+#ifdef DEBUG_KEYWORD
+ printf("\nkeyword_action: Pushing accept");
+#endif DEBUG_KEYWORD
+ push_node(csb, mine->accept);
+ csb->line_index -= i;
+ } else {
+ if (parser_ambig_debug && i) {
+ printf("\nDidn't match keyword '%s'", arg->str);
+ }
+#ifdef DEBUG_KEYWORD
+ printf("\nkeyword_action: match_partial_keyword returned FALSE");
+#endif DEBUG_KEYWORD
+ }
+}
+
+/* EOL prints help and does func call at EOL
+ *
+ * A push-down stack of parseinfo structures is used to save the state of
+ * the current parse. A new parseinfo struct is used for each possible
+ * command so that successive partial matching commands do not overwrite
+ * data stored in the parseinfo struct of a fully matching command.
+ */
+
+void eol_action (parseinfo *csb, transition *mine, void (*func) (parseinfo *))
+{
+ parseinfo *savepd;
+ char *short_help = "<cr>";
+
+ if (parser_ambig_debug && !csb->nvgen) {
+ printf("\nEol Action");
+ }
+ /*
+ * If setting a command's privileges, indicate that the command was
+ * successful and return.
+
+ if (csb->priv_set) {
+ increment_multiple_funcs(csb, "eol_action 1");
+ return;
+ }*/
+ if (csb->nvgen) {
+ if (func) {
+ (void) func(csb);
+ }
+ } else {
+ if (csb->in_help) {
+ if (help_check(csb)) {
+ if (csb->flags & CONFIG_HTTP) {
+ save_help_long(csb, "CR", NULL, csb->priv);
+ } else {
+ save_help_long(csb, short_help, NULL, csb->priv);
+ }
+ save_ambig_string_flag(csb, short_help, short_help, FALSE);
+ no_alt_action(csb);
+ }
+ return;
+ }
+ if (eol_check(csb)) {
+
+ increment_multiple_funcs(csb, "eol_action 2");
+
+ /* savepd = chunk_malloc(parseinfo_chunks); */
+ savepd = ( parseinfo *)PARSERmalloc(sizeof(parseinfo) );
+ if (savepd == NULL) {
+ parser_bail_out(csb, func, "eol_action");
+ return;
+ }
+
+ /*
+ * Make a copy of the current parse data (savepd) before
+ * modifying current info. This implements a push-down
+ * stack where the top of the stack is the current
+ * (possibly invalid) parse state. Any elements below the
+ * top are parse data from matching commands. Only one
+ * element should be on the stack if a command matches the
+ * input.
+ */
+
+ save_ambig_string_flag(csb, short_help, short_help, FALSE);
+
+ *savepd = *csb; /* Struct copy */
+
+ csb->next = savepd;
+ savepd->action_func = func;
+ } else {
+
+ /*
+ * This command did not accept. Remove it from the linked list of
+ * accepting command states. Don't discard the current error_index
+ * since it indicates that we came this far in the input before
+ * failing.
+ */
+ set_error_index(csb);
+ }
+ no_alt_action(csb);
+ } /* if (csb->nvgen) */
+}
+
+/* EOLS - prints help and does func call at EOL. Sets csb->which with
+ * the EVAL macro so that 'val' is not constrained to be a constant.
+ */
+
+void eols_action (parseinfo *csb, transition *mine,
+ eols_struct * const arg)
+{
+ csb->which = arg->subfunc;
+ eol_action(csb, mine, arg->func);
+}
+
+void eolns_action (parseinfo *csb, transition *mine, void (*func) (parseinfo *))
+{
+ csb->which = 0;
+ eol_action(csb, mine, func);
+}
+
+/*
+ * EOLI - EOL for interactive command. Sets TERMINAL_MODE flag
+ * that gets saved if this command match succeeds.
+ */
+void eoli_action (parseinfo *csb, transition *mine,
+ eols_struct * const arg)
+{
+ csb->flags |= TERMINAL_MODE;
+ csb->which = arg->subfunc;
+ eol_action(csb, mine, arg->func);
+
+ /*
+ * Clear TERMINAL_MODE so the next command doesn't
+ * get it by mistake.
+ */
+ csb->flags &= ~TERMINAL_MODE;
+}
+
+void general_number_short_help_http (uint *flags, uint lower, uint upper,
+ char *help, boolean doing_http)
+{
+ char *open_bracket = "<";
+ char *close_bracket = ">";
+
+ if (doing_http) {
+ open_bracket = close_bracket = "";
+ }
+
+ switch (*flags & (NUMBER_HEX|NUMBER_OCT|NUMBER_DEC)) {
+ default:
+ case 0:
+ printf("general_number_short_help_http: NUMHELP\n");
+ *flags |= (NUMBER_HEX|NUMBER_OCT|NUMBER_DEC);
+ case NUMBER_HEX | NUMBER_OCT | NUMBER_DEC:
+ case NUMBER_HEX | NUMBER_OCT:
+ case NUMBER_HEX | NUMBER_DEC:
+ case NUMBER_OCT | NUMBER_DEC:
+ case NUMBER_DEC:
+ sprintf(help, "%s%u-%u%s", open_bracket, lower, upper, close_bracket);
+ break;
+
+ case NUMBER_HEX:
+ switch (*flags & (HEX_ZEROX_OK|HEX_NO_ZEROX_OK)) {
+ default:
+ case 0:
+ /* errmsg(&msgsym(NUMHELP, PARSER), "hex"); */
+ printf("NUMBER_HEX : Error !\n");
+ *flags |= HEX_ZEROX_OK;
+ case HEX_ZEROX_OK:
+ case HEX_ZEROX_OK | HEX_NO_ZEROX_OK: /* why not just put this case here */
+ sprintf(help, "%s0x%x-0x%x%s",
+ open_bracket, lower, upper, close_bracket);
+ break;
+ case HEX_NO_ZEROX_OK:
+ sprintf(help, "%s%x-%x%s", open_bracket,
+ lower, upper, close_bracket);
+ break;
+ }
+ break;
+
+ case NUMBER_OCT:
+ switch (*flags & (OCT_ZERO_OK|OCT_NO_ZERO_OK)) {
+ default:
+ case 0:
+ /* errmsg(&msgsym(NUMHELP, PARSER), "octal");*/
+ printf("NUMBER_OCT : Error!\n");
+ *flags |= OCT_ZERO_OK;
+ case OCT_ZERO_OK:
+ case OCT_ZERO_OK | OCT_NO_ZERO_OK: /* why not just put this case here */
+ sprintf(help, "%s0%o-0%o%s", open_bracket,
+ lower, upper, close_bracket);
+ break;
+ case OCT_NO_ZERO_OK:
+ sprintf(help, "%s%o-%o%s", open_bracket, lower, upper,
+ close_bracket);
+ break;
+ }
+ break;
+ }
+}
+
+/*
+ * GENERAL_NUMBER matches a ranged, unsigned number, minimum one digit, and
+ * assigns it to a int. It also handles help and whitespace. If the
+ * input begins with '0x' and contains at least one hex digit, the
+ * conversion is from Hex. If the leading digit is '0', and the
+ * number is considered octal. The <types> field of the number_struct
+ * is a flag variable
+ * indicating what types of input (hex, octal, decimal) are allowed.
+ *
+ * The following function takes additional structure arguments that
+ * allow whitespace and help checking to be turned off.
+ */
+
+/* Scan a number and accept. Types of numbers (hex, decimal, octal) and
+ * allowable range are specified via <*arg>. <*arg> also specifies via
+ * another field whether whitespace after is to be tested for (required)
+ * or not. Yet another field specifies whether help checks are to be
+ * done.
+ */
+
+void general_number_action (parseinfo *csb, transition *mine,
+ number_struct * const arg)
+{
+ int i = 0;
+ uint num = 0;
+ char short_help[11];
+ uint lower;
+ uint upper;
+
+ push_node(csb, mine->alternate);
+
+ CHECK_RANGE_BOUNDS();
+
+ if ((arg->flags & NUMBER_NV_RANGE) && csb->nvgen) {
+ queuetype *t1 = csb->tokenQ;
+ queuetype t2;
+ uint l = strlen(csb->nv_command);
+
+ for (i=lower; i<= upper; i++) {
+ *CSBVAR(csb, arg->offset, uint) = i;
+ sprintf(short_help, "%d", i);
+
+ csb->nv_command[l] = '\0';
+ csb->tokenQ = &t2;
+ queue_init(csb->tokenQ, 0);
+ nvgen_token(csb, mine, short_help);
+ parse_token(csb);
+ csb->tokenQ = t1;
+ }
+ return;
+ }
+
+ /*
+ * We should never be called for NV generation
+ */
+ INVALID_NVGEN_CHECK;
+
+ /* match the number */
+ if (match_number(csb, lower, upper, &i, &num, arg->flags, arg->help)) {
+#ifdef DEBUG_NUMBER
+ printf("\ngeneral_number_action: matched number %d", num);
+#endif DEBUG_NUMBER
+
+ *CSBVAR(csb, arg->offset, uint) = num;
+
+ csb->line_index += i;
+ push_node(csb, mine->accept);
+ csb->line_index -= i;
+
+ }
+}
+
+void signed_number_action (parseinfo *csb, transition *mine,
+ signed_number_struct * const arg)
+{
+ int i = 0;
+ int num = 0;
+ char short_help[32];
+ int lower;
+ int upper;
+
+ push_node(csb, mine->alternate);
+ /*
+ * We should never be called for NV generation
+ */
+ INVALID_NVGEN_CHECK;
+
+ CHECK_RANGE_BOUNDS();
+
+ sprintf(short_help,"<%d - %d>", lower, upper);
+
+ if (help_check(csb)) {
+ save_help_long(csb, short_help, arg->help, csb->priv);
+ return;
+ }
+
+ /* match the number */
+ i = 0;
+ if (match_signed_dec(&csb->line[csb->line_index],
+ lower, upper, &i, &num) &&
+ match_whitespace2(&csb->line[csb->line_index], &i, csb->in_help)) {
+
+ *CSBVAR(csb, arg->offset, int) = num;
+
+ save_ambig_int(csb, short_help, num);
+
+ csb->line_index += i;
+ push_node(csb, mine->accept);
+ csb->line_index -= i;
+ } else {
+ help_or_error(csb, i, short_help, NO_COMMAND_COMPLETION);
+ }
+}
+
+/*
+ * HELP
+ */
+
+void help_action (parseinfo *csb, transition *mine,
+ help_struct * const arg)
+{
+ /*
+ * If doing NV generation, go to alternate (skip help output). If we're not
+ * in help mode, then obviously skip to alternate. If not at the end of
+ * line, we're not doing help, so go to alternate. Otherwise, this is a
+ * valid help request and we add the current text to the help output
+ * buffer. But the text is only added if it exists. Transition to
+ * alternate when the help string is saved to allow other tokens at this
+ * level to generate help output.
+ */
+
+ if (help_check(csb)) {
+ if (csb->flags & CONFIG_HTTP) {
+ save_line(csb, &csb->help_save, "<DT>%s", arg->str);
+ } else {
+ save_help_msg(csb, arg->str);
+ }
+ }
+ push_node(csb, mine->alternate);
+}
+
+
+
+
+/* SET takes a pointer to a variable and a constant expression to set
+ * that variable to. It is considerably more efficient than EVAL.
+ *
+ * Likewise, TESTVAR tests a variable for its relation with a constant
+ * expression. It, in turn, is more efficient than ASSERT.
+ */
+
+void set_action (parseinfo *csb, transition *mine,
+ set_struct * const arg)
+{
+ *CSBVAR(csb, arg->offset, uint) = arg->val;
+ push_node(csb, mine->accept);
+}
+
+/* Use a temporary variable in case the variable changes during the
+ * parse (such as checking csb->multiple_funcs when searching for help
+ * strings).
+ */
+void test_action (parseinfo *csb, transition *mine,
+ test_struct * const arg)
+{
+ uint tmp = *CSBVAR(csb, arg->offset, uint);
+
+ push_node(csb, mine->alternate);
+ if (tmp == arg->val)
+ push_node(csb, arg->equal);
+ if (tmp != arg->val)
+ push_node(csb, arg->notequal);
+ if (tmp < arg->val)
+ push_node(csb, arg->lt);
+ if (tmp > arg->val)
+ push_node(csb, arg->gt);
+}
+
+void general_string_action (parseinfo *csb, transition *mine,
+ general_string_struct * const arg)
+{
+ int i;
+ boolean ws;
+ const char *short_help = (arg->flags & STRING_WS_OK) ?
+ "LINE" : "WORD";
+
+ push_node(csb, mine->alternate);
+ INVALID_NVGEN_CHECK;
+
+ if (help_check(csb)) {
+ if (arg->flags & STRING_HELP_CHECK) {
+ save_help_long(csb, short_help, arg->help, csb->priv);
+ }
+ return;
+ }
+
+ i = copy_varstring(csb->line + csb->line_index,
+ CSBVAR(csb, arg->offset, char),
+ PARSEBUF, arg->flags);
+
+ if (i) {
+ ws = match_whitespace2(csb->line + csb->line_index, &i, csb->in_help);
+ if (ws || (csb->flags & CONFIG_HTTP) || (arg->flags & STRING_WS_OK)) {
+ save_ambig_string(csb, short_help, CSBVAR(csb, arg->offset, char));
+ csb->line_index += i;
+ push_node(csb, mine->accept);
+ csb->line_index -= i;
+ }
+
+ if (!ws || (arg->flags & STRING_WS_OK)) {
+ if (arg->flags & STRING_HELP_CHECK) {
+ help_or_error(csb, i, short_help, NO_COMMAND_COMPLETION);
+ } else {
+ csb->line_index += i;
+ set_error_index(csb);
+ csb->line_index -= i;
+ }
+ }
+ }
+}
+
+/*
+ * NVGEN - nvgen_action
+ *
+ * Call the NV generation function.
+ */
+void nvgen_action (parseinfo *csb, transition *mine, void (*func)(parseinfo *))
+{
+
+ if (csb->nvgen) {
+ /*
+ * If csb->priv_set is set, we currently don't go farther than
+ * we can NV generate, so stop here!
+ */
+
+ if (csb->sense && func) {
+ (void) func(csb);
+ }
+ } else {
+ push_node(csb, mine->accept);
+ }
+}
+
+/*
+ * NVGENS - nvgens_action
+ *
+ *
+ */
+void nvgens_action (parseinfo *csb, transition *mine,
+ nvgens_struct * const arg)
+{
+ csb->which = arg->subfunc;
+ nvgen_action(csb, mine, arg->func);
+}
+
+void nvgenns_action (parseinfo *csb, transition *mine, void (*func)(parseinfo *))
+{
+ csb->which = 0;
+ nvgen_action(csb, mine, func);
+}
+
+/*
+ * nvgen_token
+ *
+ * Find the end of the existing command and a space if this isn't the
+ * first token in the command. Then
+ * add the token to the command line. Continue the generation by
+ * transitioning to the accepting node.
+ * When we return, reset the command line to its state before this token
+ * was added and transition to the alternate node.
+ */
+void nvgen_token (parseinfo *csb, transition *mine, const char *token)
+{
+ char *cp;
+
+ if (!csb->nvgen) {
+ /* errmsg(&msgsym(NVGEN, PARSER) */
+ printf("nvgen_token : NVGEN\n");
+ return;
+ }
+
+ /*
+ * The alternate transition should have already been pushed onto the stack
+ * before calling nvgen_token.
+ */
+ for (cp = csb->nv_command; *cp; cp++); /* Null body */
+
+ /* Add the current token and go to the accepting node */
+ if (cp != csb->nv_command) {
+ *cp = ' '; /* Add a space unless at beginning */
+ strcpy(cp+1, token);
+ } else {
+ strcpy(cp, token);
+ }
+ push_node(csb, mine->accept);
+ *cp = '\0'; /* Restore prior state */
+ return;
+}
+
+/* NOPREFIX
+ * Go to 'accept' if there isn't a 'no' prefix.
+ * Consume the remainder of the input and go to 'alternate' if there
+ * was a 'no' prefix.
+ */
+
+void noprefix_action (parseinfo *csb, transition *mine)
+{
+ int i;
+
+ if (csb->nvgen) {
+ push_node(csb, mine->accept);
+ return;
+ }
+
+ if ((csb->sense == TRUE) && (csb->set_to_default == FALSE)) {
+ push_node(csb, mine->accept);
+ } else {
+ for (i = 0; csb->line[csb->line_index + i] != '\n' &&
+ csb->line[csb->line_index + i]; i++) {
+ }
+ csb->line_index += i;
+ push_node(csb, mine->alternate);
+ csb->line_index -= i;
+ }
+}
+
+/*
+ * Match a decimal short unsigned int in a range
+ */
+boolean match_decimal (char *buf, uint low, uint high, int *pi, ushort *pvalue)
+{
+ ushort value = 0;
+ uint i;
+
+ buf += *pi;
+ *pvalue = 0;
+
+ i = 0;
+ if (buf[i] == '+')
+ i++;
+
+ for (; isdigit(buf[i]); i++) {
+ if ((value > USHRT_MAX / 10) ||
+ ((value == USHRT_MAX / 10) &&
+ ((buf[i] - '0') > USHRT_MAX % 10))) {
+ *pi += i;
+ return(FALSE);
+ }
+ value = 10 * value + buf[i] - '0';
+ if (value > high) {
+ *pi += i;
+ return(FALSE);
+ }
+ }
+
+ if (i && (value >= low)) {
+ *pi += i;
+ *pvalue = value;
+ return(TRUE);
+ }
+ return(FALSE);
+}
+
+/*
+ * Try to match an signed int,
+ * with value between (or equal to) <low> and
+ * <high>. <*pi> is incremented by the number of characters in
+ * the match.
+ *
+ * Here's a command to test this function with
+ int e0
+ ip irdp
+ ip irdp address 1.1.1.1 -2147483649 ! fail
+ ip irdp address 1.1.1.2 -2147483648 ! succeed
+ ip irdp address 1.1.1.3 -1 ! succeed
+ ip irdp address 1.1.1.4 -0 ! succeed
+ ip irdp address 1.1.1.5 - ! fail
+ ip irdp address 1.1.1.6 ! fail
+ ip irdp address 1.1.1.7 0 ! succeed
+ ip irdp address 1.1.1.8 1 ! succeed
+ ip irdp address 1.1.1.9 2147483647 ! succeed
+ ip irdp address 1.1.1.10 2147483648 ! fail
+ */
+static boolean match_signed_dec (char *buf, int low, int high,
+ int *pi, int *pvalue)
+{
+ int i;
+ int value = 0;
+ char c;
+ int sign;
+
+ buf += *pi;
+ *pvalue = 0;
+
+ i = 0;
+ if (buf[i] == '-') {
+ sign = -1;
+ i++;
+ } else {
+ sign = 1;
+ }
+ if (buf[i] == '+')
+ i++;
+
+ for (c = buf[i]; isdigit(c); c = buf[++i]) {
+ if (((value*10 + (c - '0')) < value) &&
+ ((sign != -1) || ((value*10 + (int)(c - '0')) != 1<<31))) {
+ /* Too many chars, max out. */
+ *pi += i;
+ return(FALSE);
+ }
+ value = value * 10 + (int) (c - '0');
+ if ((value*sign) > high) {
+ *pi += i;
+ return(FALSE);
+ }
+ }
+
+ *pi += i;
+ /*
+ * if (number is positive and we parsed one or more numbers) or
+ * (number is negative and we parsed '-' plus one or more numbers)
+ */
+ if (((sign == 1) && (i > 0)) ||
+ ((sign == -1) && (i > 1))) {
+
+ /*
+ * if (number is greater than or equal to the lower boundary)
+ */
+ if ((value*sign) >= low) {
+ *pvalue = value*sign;
+ return(TRUE);
+ }
+ }
+ return(FALSE);
+}
+
+
+/* ------------------------------------------------------------ */
+
+boolean match_partial_keyword (parseinfo *csb, const char *keyword,
+ int *pi, const char *help,
+ int minmatch, uint flags, uint priv)
+{
+ int i;
+ char *buf = csb->line + csb->line_index + *pi;
+ int old_line_index = 0;
+ char *bufptr = NULL;
+
+ if ( ( bufptr = strchr(buf, ' ') ) == NULL )
+ old_line_index = strlen(buf) - 1;
+ else
+ old_line_index = ( bufptr - buf ) - 1;
+
+#ifdef DEBUG_KEYWORD
+ printf("\nmatch_partial_keyword: Entering");
+#endif DEBUG_KEYWORD
+ csb->line_index += *pi;
+ if (long_help_check(csb)) {
+ if (flags & KEYWORD_HELP_CHECK) {
+ save_help_long(csb, keyword, help, priv);
+ }
+#ifdef DEBUG_KEYWORD
+ printf("\nmatch_partial_keyword: Long help");
+#endif DEBUG_KEYWORD
+ csb->line_index -= *pi;
+ return(FALSE);
+ }
+ csb->line_index -= *pi;
+
+ for (i = 0; (toupper(buf[i]) == toupper(keyword[i])) && buf[i]; i++) {
+ ; /* Null body */
+ }
+ (*pi) += i;
+#ifdef DEBUG_KEYWORD
+ printf("\nmatch_partial_keyword: Matched %d letters of keyword %s", i, keyword);
+#endif DEBUG_KEYWORD
+ if (i > 0) {
+ if ((!minmatch || (i >= minmatch)) &&
+ (((flags & KEYWORD_WS_OK) &&
+ match_whitespace2(csb->line + csb->line_index, pi, csb->in_help))
+ || (flags & KEYWORD_NO_WS_OK && old_line_index <= i))) {
+
+#ifdef DEBUG_KEYWORD
+ printf("\nmatch_partial_keyword: Matched whitespace");
+#endif DEBUG_KEYWORD
+ csb->line_index += *pi;
+ if ((flags & KEYWORD_NO_WS_OK) && (short_help_check(csb))) {
+ if (flags & KEYWORD_HELP_CHECK) {
+ save_help_short(csb, keyword, SUPPORT_COMMAND_COMPLETION);
+ }
+ csb->line_index -= *pi;
+ return(FALSE);
+ }
+ if (parser_ambig_debug) {
+ printf("\nMatched keyword '%s'", keyword);
+ printf("\ncsb->command_visible = %d", csb->command_visible);
+ }
+ save_ambig_string(csb, keyword, keyword);
+ csb->line_index -= *pi;
+ csb->flags |= KEYWORD_MATCHED;
+ return(TRUE);
+
+ } else {
+#ifdef DEBUG_KEYWORD
+ printf("\nmatch_partial_keyword: Didn't match whitespace");
+#endif DEBUG_KEYWORD
+ if ((flags & KEYWORD_HELP_CHECK) && (flags & KEYWORD_WS_OK)) {
+ help_or_error(csb, *pi, keyword, SUPPORT_COMMAND_COMPLETION);
+ } else {
+ csb->line_index += *pi;
+ set_error_index(csb);
+ csb->line_index -= *pi;
+ }
+ }
+ } else {
+ /* didn't match any characters, set error index */
+ csb->line_index += *pi;
+ set_error_index(csb);
+ csb->line_index -= *pi;
+ }
+ return(FALSE);
+}
+
+static void string_escape (char **from, char **to, uint *i)
+{
+ uint count;
+ uint value;
+ char *pfrom = *from;
+ uint pi = *i;
+
+ switch (**from) {
+ default:
+ /* Put back backslash */
+ **to = '\\';
+ (*to)++;
+ if (!*from) {
+ break;
+ }
+ /* Fall through */
+ case '"':
+ **to = **from;
+ (*to)++;
+ (*from)++;
+ (*i)++;
+ break;
+ case 'x':
+ pfrom++;
+ pi++;
+ count = 0;
+ value = 0;
+ while ((count < 2) && *pfrom && isxdigit(*pfrom)) {
+ value = (value*16) + CVHTOB(*pfrom);
+ pfrom++;
+ pi++;
+ count++;
+ }
+ if (count != 2) {
+ **to = '\\';
+ (*to)++;
+ **to = **from;
+ (*from)++;
+ (*i)++;
+ } else {
+ **to = value;
+ *from = pfrom;
+ *i = pi;
+ }
+ (*to)++;
+ break;
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ value = 0;
+ count = 0;
+ while ((count < 3) && *pfrom &&
+ (*pfrom >= '0') && (*pfrom <= '7')) {
+ value = (value*8) + (*pfrom - '0');
+ pfrom++;
+ pi++;
+ count++;
+ }
+ if (count != 3) {
+ **to = '\\';
+ (*to)++;
+ **to = **from;
+ (*from)++;
+ (*i)++;
+ } else {
+ **to = value;
+ *from = pfrom;
+ *i = pi;
+ }
+ (*to)++;
+ break;
+ }
+}
+/*
+ * Copies at most <maxchar-1> non-whitespace characters from input buffer
+ * to output buffer. Returns string length. If the string is quoted,
+ * then it may contain any character, including whitespace.
+ */
+uint copy_varstring (char *from, char *to, uint maxchar, uint flags)
+{
+ uint i; /* The number of characters matched */
+
+ if ((*from == '"') &&
+ (flags & STRING_QUOTED) &&
+ (!(flags & STRING_WS_OK))) {
+
+ /* Quoted string */
+ from++;
+ for (i = 1; i < maxchar; i++) {
+ if (*from == '\0') {
+ printf("\nWarning: Assumed end-quote for quoted string");
+ break;
+ }
+ /* If we find a quote, it must be backslash escaped to be kept.
+ * Terminate the string otherwise.
+ */
+ if (*from == '"') {
+ i++; /* advance past trailing quote */
+ i = min(i, (maxchar - 1));
+ *to = '\0';
+ return(i);
+ }
+ if (*from == '\\') {
+ from++;
+ string_escape(&from, &to, &i);
+ } else {
+ *to++ = *from++;
+ }
+ }
+ } else {
+ /* Just get the next token */
+ for (i = 0; (i < maxchar) && *from; i++) {
+ if (*from == '\\') {
+ from++;
+ string_escape(&from, &to, &i);
+ } else {
+ if (!(flags & STRING_WS_OK) && isspace(*from)) {
+ break;
+ }
+ *to++ = *from++;
+ }
+ }
+ }
+
+ i = min(i, (maxchar - 1));
+ *to = '\0';
+
+ return(i);
+}
+
+void help_or_error (parseinfo *csb, int count, const char *msg,
+ boolean do_command_completion)
+{
+ csb->line_index += count;
+ if (help_check(csb)) {
+ save_help_short(csb, msg, do_command_completion);
+ } else {
+ /* Not doing help. This is an error. */
+ set_error_index(csb);
+ }
+ csb->line_index -= count;
+}
+
+static void set_error_index (parseinfo *csb)
+{
+ if (csb->error_index < csb->line_index) {
+ csb->error_index = csb->line_index;
+ }
+}
+
+static void match_number_hex (char *buf, uint low, uint high,
+ int *pi, uint *pvalue, uint *flags)
+{
+ char c;
+ int i = 0;
+ uint ret = 0;
+
+ buf += *pi;
+ *pvalue = 0;
+ *flags &= ~NUMBER_HEX;
+
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_hex: Entering");
+ printf("\nmatch_number_hex: buf = '%s'", buf);
+#endif DEBUG_NUMBER
+ if ((buf[0] == '0') && (toupper(buf[1]) == 'X')) {
+ if (*flags & HEX_ZEROX_OK) {
+ /* saw '0x' and it is ok */
+ i += 2;
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_hex: matched '0x'");
+#endif DEBUG_NUMBER
+ ret = HEX_ZEROX_MATCHED;
+ } else {
+ /* saw '0x' and it is not ok, return false */
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_hex: matched '0x' and not ok");
+#endif DEBUG_NUMBER
+ return;
+ }
+ } else {
+ if (*flags & HEX_NO_ZEROX_OK) {
+ /* didn't see '0x' and that is ok */
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_hex: didn't match '0x'");
+#endif DEBUG_NUMBER
+ ret = HEX_ZEROX_NOT_MATCHED;
+ } else {
+ /* didn't see '0x' and it is not ok, return false */
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_hex: didn't match '0x' and not ok");
+#endif DEBUG_NUMBER
+ return;
+ }
+ }
+
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_hex: trying char '%c'", buf[i]);
+#endif DEBUG_NUMBER
+ /* i has already been initialized */
+ for (c = toupper(buf[i]); isxdigit(c); i++, c = toupper(buf[i])) {
+ if (*pvalue > ULONG_MAX / 16) {
+ /* Too many non-zero digits, max out. */
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_hex: too many chars %d", i);
+#endif DEBUG_NUMBER
+ *pi += i;
+ return;
+ }
+ *pvalue = *pvalue * 16 + CVHTOB(c);
+ if (*pvalue > high) {
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_hex: value > high i = %d", i);
+#endif DEBUG_NUMBER
+ *pi += i;
+ return;
+ }
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_hex: trying char '%c'", buf[i+1]);
+#endif DEBUG_NUMBER
+ }
+
+ if (i && (*pvalue >= low)) {
+ *pi += i;
+ *flags |= ret;
+ *flags |= NUMBER_HEX;
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_hex: matched number 0x%x", *pvalue);
+#endif DEBUG_NUMBER
+ return;
+ }
+#ifdef DEBUG_NUMBER
+ if (!i) {
+ printf("\nmatch_number_hex: matched 0 numbers");
+ } else {
+ printf("\nmatch_number_hex: value < low");
+ }
+#endif DEBUG_NUMBER
+ return;
+}
+
+static void match_number_oct (char *buf, uint low, uint high,
+ int *pi, uint *pvalue, uint *flags)
+{
+ int i = 0;
+ uint ret = 0;
+
+ buf += *pi;
+ *pvalue = 0;
+ *flags &= ~NUMBER_OCT;
+
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_oct: Entering");
+ printf("\nmatch_number_oct: buf = '%s'", buf);
+#endif DEBUG_NUMBER
+ if (buf[0] == '0') {
+ if (*flags & OCT_ZERO_OK) {
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_oct: matched '0'");
+#endif DEBUG_NUMBER
+ ret = OCT_ZERO_MATCHED;
+ } else {
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_oct: matched '0' and not ok");
+#endif DEBUG_NUMBER
+ return;
+ }
+ } else {
+ if (*flags & OCT_NO_ZERO_OK) {
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_oct: didn't match '0'");
+#endif DEBUG_NUMBER
+ ret = OCT_ZERO_NOT_MATCHED;
+ } else {
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_oct: didn't match '0' and not ok");
+#endif DEBUG_NUMBER
+ return;
+ }
+ }
+
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_oct: trying char '%c'", buf[i]);
+#endif DEBUG_NUMBER
+ for (i=0; isodigit(buf[i]); i++) {
+ /* Make sure we don't have a 33-rd bit */
+ if (*pvalue > ULONG_MAX / 8) {
+ *pi += i;
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_oct: too many chars %d", i);
+#endif DEBUG_NUMBER
+ return;
+ }
+ *pvalue = 8 * *pvalue + buf[i] - '0';
+ if (*pvalue > high) {
+ *pi += i;
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_oct: value > high i = %d", i);
+#endif DEBUG_NUMBER
+ return;
+ }
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_oct: trying char '%c'", buf[i+1]);
+#endif DEBUG_NUMBER
+ }
+ if (i && (*pvalue >= low)) {
+ *pi += i;
+ *flags |= ret;
+ *flags |= NUMBER_OCT;
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_oct: matched num 0%o", *pvalue);
+#endif DEBUG_NUMBER
+ return;
+ }
+#ifdef DEBUG_NUMBER
+ if (!i) {
+ printf("\nmatch_number_oct: matched 0 numbers");
+ } else {
+ printf("\nmatch_number_oct: value < low");
+ }
+#endif DEBUG_NUMBER
+ return;
+}
+
+static void match_number_dec (char *buf, uint low, uint high,
+ int *pi, uint *pvalue, uint *flags)
+{
+ int i = 0;
+
+ buf += *pi;
+ *pvalue = 0;
+ *flags &= ~NUMBER_DEC;
+
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_dec: Entering");
+ printf("\nmatch_number_dec: buf = '%s'", buf);
+ printf("\nmatch_number_dec: trying char '%c'", buf[i]);
+#endif DEBUG_NUMBER
+ for (i=0; isdigit(buf[i]); i++) {
+ if ((*pvalue > ULONG_MAX / 10) ||
+ ((*pvalue == ULONG_MAX / 10) && ((buf[i] - '0') > ULONG_MAX % 10))) {
+ /* Too many chars, max out. */
+ *pi += i;
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_dec: too many chars %d", i);
+#endif DEBUG_NUMBER
+ return;
+ }
+ *pvalue = *pvalue * 10 + (uint) (buf[i] - '0');
+ if (*pvalue > high) {
+ *pi += i;
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_dec: value > high i = %d", i);
+#endif DEBUG_NUMBER
+ return;
+ }
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_dec: trying char '%c'", buf[i+1]);
+#endif DEBUG_NUMBER
+ }
+
+ if (i && (*pvalue >= low)) {
+ *pi += i;
+ *flags |= NUMBER_DEC;
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number_dec: matched number '%d", *pvalue);
+#endif DEBUG_NUMBER
+ return;
+ }
+#ifdef DEBUG_NUMBER
+ if (!i) {
+ printf("\nmatch_number_dec: matched 0 numbers");
+ } else {
+ printf("\nmatch_number_dec: value < low");
+ }
+#endif DEBUG_NUMBER
+ return;
+}
+
+boolean match_number (parseinfo *csb, uint low, uint high, int *pi,
+ uint *pvalue, uint flags, const char *long_help)
+{
+ char *buf;
+ uint hex_num, oct_num, dec_num;
+ int hex_pi, oct_pi, dec_pi;
+ char short_help[SHORTHELP_LEN];
+ boolean matched;
+
+ buf = csb->line + csb->line_index;
+
+ /*
+ * Construct short help message, in case we need it
+ */
+ general_number_short_help_http(&flags, low, high, short_help,
+ (csb->flags & CONFIG_HTTP));
+
+ /* Do initial, long help check */
+ csb->line_index += *pi; /* Needed for help_check */
+ if ((flags & NUMBER_HELP_CHECK) && help_check(csb)) {
+
+ save_help_long(csb, short_help, long_help, csb->priv);
+ csb->line_index -= *pi;
+ return(FALSE);
+ }
+ csb->line_index -= *pi;
+
+ hex_pi = oct_pi = dec_pi = *pi;
+
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: entering");
+ printf("\nmatch_number: buf = '%s'", buf);
+ printf("\nmatch_number: buf = 0x%x pi = %d buf[0] = '%c'", buf, *pi, buf[0]);
+#endif DEBUG_NUMBER
+ if (flags & NUMBER_HEX) {
+ match_number_hex(buf, low, high, &hex_pi, &hex_num, &flags);
+ }
+ if (flags & NUMBER_OCT) {
+ match_number_oct(buf, low, high, &oct_pi, &oct_num, &flags);
+ }
+ if (flags & NUMBER_DEC) {
+ match_number_dec(buf, low, high, &dec_pi, &dec_num, &flags);
+ }
+
+#define MATCH_NUMBER_SET(val, index, ret)\
+ *pvalue = val;\
+ *pi = index;\
+ matched = ret
+
+#define MAX3(n1, n2, n3)\
+ ((n1 > n2) ? ((n1 > n3) ? n1 : n3) : ((n2 > n3) ? n2 : n3))
+
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Dec matched %d chars", dec_pi);
+ printf("\nmatch_number: Oct matched %d chars", oct_pi);
+ printf("\nmatch_number: Hex matched %d chars", hex_pi);
+#endif DEBUG_NUMBER
+
+ switch (flags & (NUMBER_HEX|NUMBER_OCT|NUMBER_DEC)) {
+ default:
+ case 0: /* No Matches */
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: No matches");
+#endif DEBUG_NUMBER
+ MATCH_NUMBER_SET(0, MAX3(hex_pi, oct_pi, dec_pi), FALSE);
+ break;
+
+ case NUMBER_HEX: /* Hex Only */
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Matched hex");
+ printf("\nmatch_number: Returning hex");
+#endif DEBUG_NUMBER
+ MATCH_NUMBER_SET(hex_num, hex_pi, TRUE);
+ break;
+
+ case NUMBER_OCT: /* Octal Only */
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Matched oct");
+ printf("\nmatch_number: Returning oct");
+#endif DEBUG_NUMBER
+ MATCH_NUMBER_SET(oct_num, oct_pi, TRUE);
+ break;
+
+ case NUMBER_DEC: /* Decimal Only */
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Matched decimal");
+ printf("\nmatch_number: Returning decimal");
+#endif DEBUG_NUMBER
+ MATCH_NUMBER_SET(dec_num, dec_pi, TRUE);
+ break;
+
+ case NUMBER_HEX | NUMBER_OCT: /* Hex and Octal */
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Matched hex and octal");
+#endif DEBUG_NUMBER
+ if (flags & HEX_ZEROX_MATCHED) {
+ /* This case is impossible unless whitespace is optional */
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Returning hex");
+#endif DEBUG_NUMBER
+ MATCH_NUMBER_SET(hex_num, hex_pi, TRUE);
+ } else if (flags & OCT_ZERO_MATCHED) {
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Returning oct");
+#endif DEBUG_NUMBER
+ MATCH_NUMBER_SET(oct_num, oct_pi, TRUE);
+ } else {
+ /*
+ * We matched a hex and octal, but didn't get a '0' or '0x',
+ * so we have no idea which one it could be, so I'm going
+ * to guess an Octal. If anyone wants to change this,
+ * go right ahead.
+ */
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Returning oct");
+#endif DEBUG_NUMBER
+ MATCH_NUMBER_SET(oct_num, oct_pi, TRUE);
+ }
+ break;
+
+ case NUMBER_HEX | NUMBER_DEC: /* Hex and Decimal */
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Matched hex and decimal");
+#endif DEBUG_NUMBER
+ if (flags & HEX_ZEROX_MATCHED) {
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Returning hex");
+#endif DEBUG_NUMBER
+ MATCH_NUMBER_SET(hex_num, hex_pi, TRUE);
+ } else {
+ /*
+ * Pretty simple.
+ */
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Returning decimal");
+#endif DEBUG_NUMBER
+ MATCH_NUMBER_SET(dec_num, dec_pi, TRUE);
+ }
+ break;
+
+ case NUMBER_OCT | NUMBER_DEC: /* Octal and Decimal */
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Matched octal and decimal");
+#endif DEBUG_NUMBER
+ if (flags & OCT_ZERO_MATCHED) {
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Returning oct");
+#endif DEBUG_NUMBER
+ MATCH_NUMBER_SET(oct_num, oct_pi, TRUE);
+ } else {
+ /*
+ * Straightforward
+ */
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Returning decimal");
+#endif DEBUG_NUMBER
+ MATCH_NUMBER_SET(dec_num, dec_pi, TRUE);
+ }
+ break;
+
+ case NUMBER_HEX | NUMBER_OCT | NUMBER_DEC: /* All three */
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Matched hex, octal, and decimal");
+#endif DEBUG_NUMBER
+ if (flags & HEX_ZEROX_MATCHED) {
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Returning hex");
+#endif DEBUG_NUMBER
+ MATCH_NUMBER_SET(hex_num, hex_pi, TRUE);
+ } else if (flags & OCT_ZERO_MATCHED) {
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Returning oct");
+#endif DEBUG_NUMBER
+ MATCH_NUMBER_SET(oct_num, oct_pi, TRUE);
+ } else {
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Returning decimal");
+#endif DEBUG_NUMBER
+ MATCH_NUMBER_SET(dec_num, dec_pi, TRUE);
+ }
+ break;
+ }
+
+ if (matched) {
+ if (((flags & NUMBER_WS_OK) &&
+ match_whitespace2(buf, pi, csb->in_help)) ||
+ (flags & NUMBER_NO_WS_OK)) {
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Matched whitespace");
+#endif DEBUG_NUMBER
+ save_ambig_uint(csb, short_help, *pvalue);
+ return(TRUE);
+ } else {
+ /*
+ * We didn't match whitespace, so throw the matches
+ * out the window and return the max number of
+ * characters matched
+ */
+ *pi = MAX3(hex_pi, oct_pi, dec_pi);
+#ifdef DEBUG_NUMBER
+ printf("\nmatch_number: Didn't match whitespace");
+#endif DEBUG_NUMBER
+ }
+ }
+ if (flags & NUMBER_HELP_CHECK) {
+ help_or_error(csb, *pi, short_help, NO_COMMAND_COMPLETION);
+ } else {
+ csb->line_index += *pi;
+ set_error_index(csb);
+ csb->line_index -= *pi;
+ }
+ return(FALSE);
+}
+
+
+void generic_addr_noflag_action (parseinfo *csb, transition *mine,
+ addrparse_nf_struct * const arg)
+{
+ addrparse_struct out_arg = {arg->offset, arg->help, arg->type, 0};
+
+ generic_addr_action(csb, mine, &out_arg);
+}
+
+
+static boolean match_general_addr (parseinfo *csb, int *pi, void *addrp,
+ uint addr_type, uint flag,
+ const char *long_help)
+{
+ char *short_help = NULL;
+ match_gen_func func = NULL;
+ int i;
+ void *idb = NULL;
+
+ for (i=0; addr_funcs[i].addr_type != ADDR_ILLEGAL; i++) {
+ if (addr_type == addr_funcs[i].addr_type) {
+ short_help = addr_funcs[i].get_short_help(csb, flag, idb);
+ func = addr_funcs[i].func;
+ break;
+ }
+ }
+
+ if (addr_funcs[i].addr_type == ADDR_ILLEGAL) {
+ /* No sir, I don't like it */
+ return(FALSE);
+ }
+
+ if (help_check(csb)) {
+ save_help_long(csb, short_help, long_help, csb->priv);
+ return(FALSE);
+ }
+
+ if ((*func)(csb, &csb->line[csb->line_index],pi,addrp,
+ csb->in_help, flag, idb)) {
+ i = *pi;
+ if (match_whitespace2(&csb->line[csb->line_index], pi, csb->in_help)) {
+ save_ambig_nstring(csb, short_help,
+ &(csb->line[csb->line_index]), i);
+ return(TRUE);
+ }
+ }
+ ((addrtype *)addrp)->type = 0;
+ ((addrtype *)addrp)->length = 0;
+ if (!(flag & ADDR_NO_SHORT_HELP)) {
+ help_or_error(csb, *pi, short_help, NO_COMMAND_COMPLETION);
+ }
+ return(FALSE);
+}
+
+
+
+void generic_addr_action (parseinfo *csb, transition *mine,
+ addrparse_struct * const arg)
+{
+ void *addrp;
+ int i;
+
+ push_node(csb, mine->alternate);
+
+ INVALID_NVGEN_CHECK;
+
+ addrp = CSBVAR(csb, arg->offset, void);
+
+ i = 0;
+ if (match_general_addr(csb, &i, addrp, arg->type, arg->flag, arg->help)) {
+ csb->line_index += i;
+ push_node(csb, mine->accept);
+ csb->line_index -= i;
+
+ }
+}
+
+void multiple_funcs_action (parseinfo *csb, transition *mine,
+ test_struct * const arg)
+{
+ push_node(csb, mine->alternate);
+ if (test_multiple_funcs(csb, '=', 0)) {
+ push_node(csb, arg->equal);
+ } else {
+ push_node(csb, arg->notequal);
+ }
+}
+
+void save_ambig_string (parseinfo *csb, const char *help, const char *str)
+{
+ save_ambig_string_flag(csb, help, str, TRUE);
+}
+
+static void save_ambig_nstring (parseinfo *csb, const char *help,
+ const char *str, uint size)
+{
+ char *tmp = NULL;
+ uint length;
+
+ if (csb->flags & COMMAND_AUTHORIZE) {
+ length = strlen(str);
+ if (length > size) {
+ length = size;
+ }
+ tmp = (char *)PARSERmalloc(length + 1);
+ if (tmp) {
+ strncpy(tmp, str, length+1);
+ }
+ } else {
+ tmp = NULL;
+ }
+
+ save_ambig_string_flag(csb, help, tmp, TRUE);
+ if (tmp) {
+ PARSERfree(tmp);
+ }
+}
+
+static void save_ambig_int (parseinfo *csb, const char *help, int num)
+{
+ char str[12];
+
+ sprintf(str, "%d", num);
+ save_ambig_string_flag(csb, help, str, TRUE);
+}
+
+static void save_ambig_uint (parseinfo *csb, const char *help, uint num)
+{
+ char str[12];
+
+ sprintf(str, "%u", num);
+ save_ambig_string_flag(csb, help, str, TRUE);
+}
+
+static void save_ambig_string_flag (parseinfo *csb, const char *help,
+ const char *ambig_string, boolean space)
+{
+ ambig_struct *ap;
+ char *str;
+ uint new_length = strlen(help) + (space ? 1 : 0);
+ uint old_length;
+
+ if (csb->command_visible) {
+ ap = &csb->visible_ambig;
+ } else {
+ ap = &csb->hidden_ambig;
+ }
+
+ if (parser_ambig_debug) {
+ printf("\nsaving string '%s' in ambig buffer '%s'", help, ap->ambig);
+ }
+
+ old_length = strlen(ap->ambig);
+ str = ap->ambig + old_length;
+ if ((ap->ambig != str) && (*(str-1) == (char)-1)) {
+ /* Already marked as too big, so skip */
+ } else {
+ if ((new_length + old_length + 2) >= PARSEBUF) {
+ /* Too big, mark as too big and skip */
+ if ((old_length + 2) >= PARSEBUF) {
+ str = ap->ambig + PARSEBUF - 2;
+ }
+ *str++ = -1;
+ *str = '\0';
+ } else {
+ strcat(str, help);
+ if (space) {
+ strcat(str, " ");
+ }
+ }
+ if (csb->flags & COMMAND_AUTHORIZE) {
+ old_length = strlen(csb->nv_command);
+ new_length = strlen(ambig_string);
+ if ((new_length + old_length + 2) < PARSEBUF) {
+ strcat(csb->nv_command, ambig_string);
+ if (space) {
+ strcat(csb->nv_command, " ");
+ }
+ }
+ }
+ }
+}
+
+static void save_help_msg (parseinfo *csb, const char *help)
+{
+ if (csb->in_help == PARSER_HELP) {
+ save_line(csb, &csb->help_save, "%s", help);
+ }
+}
+
+static void save_help_short (parseinfo *csb, const char *help,
+ boolean do_command_completion)
+{
+ if ((csb->in_help == PARSER_HELP) ||
+ (do_command_completion == SUPPORT_COMMAND_COMPLETION)) {
+ save_line(csb, &csb->help_save, "%s\t", help);
+ }
+}
+
+void save_help_long (parseinfo *csb, const char *short_help,
+ const char *long_help, uint priv)
+{
+ if (csb->in_help == PARSER_HELP) {
+ save_line(csb, &csb->help_save, " %s", short_help);
+ if (long_help) {
+ save_line(csb, &csb->help_save, "\t%s", long_help);
+ }
+ save_line(csb, &csb->help_save, "\n");
+ }
+}
+
+
+static void parser_bail_out (parseinfo *csb, void (*func)(parseinfo *),
+ const char *func_name)
+{
+ if ( func )
+ func(csb);
+}
+
+
+void priv_action (parseinfo *csb, transition *mine, priv_struct * const arg)
+{
+ push_node(csb, mine->alternate);
+ if (priv_check(csb, arg->priv)) {
+ if (csb->priv_set) {
+ priv_push(csb, arg->priv);
+ }
+ csb->last_priv = arg->priv->cur_priv;
+ if (csb->last_priv > csb->highest_priv) {
+ csb->highest_priv = csb->last_priv;
+ }
+ push_node(csb, mine->accept);
+ } else {
+ push_node(csb, arg->fail);
+ }
+}
+
+void month_action (parseinfo *csb, transition *mine,
+ month_struct * const arg)
+{
+ int *var = CSBVAR(csb, arg->offset, int);
+ int i;
+ static const char *short_help = "MONTH";
+
+ push_node(csb, mine->alternate);
+
+ INVALID_NVGEN_CHECK;
+
+ if (help_check(csb)) {
+ save_help_long(csb, short_help, arg->help, csb->priv);
+ return;
+ }
+
+ for (i=0; i < MONTHS_IN_YEAR; i++) {
+ int j = 0;
+ if (match_partial_keyword(csb, long_month_name[i], &j, NULL, 3,
+ KEYWORD_WS_OK, csb->priv)) {
+ csb->line_index += j;
+ *var = i + 1;
+ push_node(csb, mine->accept);
+ csb->line_index -= j;
+ break;
+ }
+ }
+}
+
+
+void day_action (parseinfo *csb, transition *mine,
+ day_struct * const arg)
+{
+ int *var = CSBVAR(csb, arg->offset, int);
+ int i;
+ static const char *short_help = "DAY";
+
+ push_node(csb, mine->alternate);
+
+ INVALID_NVGEN_CHECK;
+
+ if (help_check(csb)) {
+ save_help_long(csb, short_help, arg->help, csb->priv);
+ return;
+ }
+
+ for (i=0; i < DAYS_IN_WEEK + 1; i++) {
+ int j = 0;
+ if (match_partial_keyword(csb, long_day_name[i], &j, NULL, 3,
+ KEYWORD_WS_OK, csb->priv)) {
+ csb->line_index += j;
+ *var = i;
+ push_node(csb, mine->accept);
+ csb->line_index -= j;
+ break;
+ }
+ }
+}
+
+
+void timesec_action (parseinfo *csb, transition *mine, timesec_struct *arg)
+{
+ uint *var1 = CSBVAR(csb, arg->var1, uint);
+ uint *var2 = CSBVAR(csb, arg->var2, uint);
+ uint *var3;
+ char *short_help;
+ uint i;
+ static uint flags = NUMBER_DEC | NUMBER_NO_WS_OK;
+
+ push_node(csb, mine->alternate);
+
+ INVALID_NVGEN_CHECK;
+
+ if (arg->var3 == MAXUINT) {
+ short_help = "hh:mm";
+ var3 = 0;
+ } else {
+ short_help = "hh:mm:ss";
+ var3 = CSBVAR(csb, arg->var3, uint);
+ }
+
+ if (help_check(csb)) {
+ save_help_long(csb, short_help, arg->help, csb->priv);
+ }
+
+ i = 0;
+ if (match_number(csb, 0, 23, &i, var1, flags, NULL) &&
+ match_char(&csb->line[csb->line_index], &i, ':') &&
+ match_number(csb, 0, 59, &i, var2, flags, NULL) &&
+ ((arg->var3 == MAXUINT) ||
+ (match_char(&csb->line[csb->line_index], &i, ':') &&
+ match_number(csb, 0, 59, &i, var3, flags, NULL))) &&
+ match_whitespace2(&csb->line[csb->line_index], &i, csb->in_help)) {
+ csb->line_index += i;
+ push_node(csb, mine->accept);
+ csb->line_index -= i;
+ return;
+ }
+
+ if (i) {
+ help_or_error(csb, i, short_help, NO_COMMAND_COMPLETION);
+ }
+}
+
+
+void comment_action (parseinfo *csb, transition *mine)
+{
+ push_node(csb, mine->accept);
+ if (csb->nvgen && !csb->priv_set) {
+ /*
+ *RAMS: commented this for now
+
+ nv_write(TRUE, "!"); */
+ }
+}
+
+void testexpr_action (parseinfo *csb, transition *mine, testexpr_struct * const arg)
+{
+ /* always push the alternate */
+ push_node(csb, mine->alternate);
+
+ if (csb->priv_set || (csb->flags & COMMAND_FUNCTION)) {
+ /*
+ * Parser state may not be what test expression expects,
+ * so avoid testing the expression.
+ */
+ push_node(csb, mine->accept);
+ push_node(csb, arg->fal);
+ } else {
+ if (arg->func(csb, mine)) {
+ push_node(csb, mine->accept);
+ } else {
+ push_node(csb, arg->fal);
+ }
+ }
+}
+
+
+
+
+void keyword_option_action (parseinfo *csb,
+ transition *mine,
+ keyword_option_struct * const arg)
+{
+ uint i;
+ uint o;
+ uint *var = CSBVAR(csb, arg->offset, uint);
+ boolean matched;
+ uint flags = KEYWORD_HELP_CHECK | KEYWORD_WS_OK;
+
+ push_node(csb, mine->alternate);
+
+ INVALID_NVGEN_CHECK;
+
+ if (priv_check(csb, arg->priv) == FALSE) {
+ return;
+ }
+
+ keyword_flag_modify(csb, arg->priv, &flags);
+
+ o = 0;
+ matched = FALSE;
+ while (arg->options[o].keyword && !matched) {
+ if (arg->flags & KEYWORD_TEST) {
+ if (arg->flags & KEYWORD_OR_SET) {
+ if (*var & arg->options[o].val) {
+ o++;
+ continue;
+ }
+ } else {
+ if (*var) {
+ o++;
+ continue;
+ }
+ }
+ }
+ i = 0;
+ if (match_partial_keyword(csb, arg->options[o].keyword, &i,
+ arg->options[o].help, 0, flags,
+ arg->priv->cur_priv)) {
+ csb->line_index += i;
+ if (csb->priv_set) {
+ priv_push(csb, arg->priv); /* change priv level */
+ }
+ csb->last_priv = arg->priv->cur_priv;
+ if (csb->last_priv > csb->highest_priv) {
+ csb->highest_priv = csb->last_priv;
+ }
+ if (arg->offset != -1) {
+ if (arg->flags & KEYWORD_OR_SET) {
+ *var |= arg->options[o].val;
+ } else {
+ *var = arg->options[o].val;
+ }
+ }
+ push_node(csb, mine->accept);
+ csb->line_index -= i;
+ matched = TRUE;
+ } else {
+ if (parser_ambig_debug) {
+ printf("\nDidn't match keyword '%s'", arg->options[o].keyword);
+ }
+ }
+ o++;
+ }
+}
+
+
+
+
+
+
+
+#ifdef IOS_PARSER
+
+
+
+/* WHITESPACE matches at least one whitespace char, maybe more
+ * EOL is acceptable as whitespace.
+ */
+
+void whitespace_action (parseinfo *csb, transition *mine)
+{
+ int i;
+
+ push_node(csb, mine->alternate);
+ if (csb->nvgen) {
+ /*
+ * Don't add whitespace here. This function is often called between
+ * tokens which don't generate any output.
+ */
+ push_node(csb, mine->accept);
+
+ return;
+ }
+ i = 0;
+
+ if (match_whitespace2(&csb->line[csb->line_index], &i, csb->in_help)) {
+ csb->line_index += i;
+ push_node(csb, mine->accept);
+ csb->line_index -= i;
+ }
+ /* No point to setting error_index: if the above fails we haven't
+ scanned any whitespace successfully. */
+}
+
+
+/* PRINT always matches and prints its string, followed by a newline */
+
+void print_action (parseinfo *csb, transition *mine,
+ print_struct * const arg)
+{
+ push_node(csb, mine->accept);
+ if (csb->nvgen) {
+ return;
+ }
+
+ if (arg->str) {
+ printf(arg->str);
+ }
+}
+
+/* Display places its message into the help buffer no matter what.
+ * It's used mostly in cases where we've decided to discard the rest of
+ * the input line and produce a generic help/error message.
+ * THIS FUNCTION PRODUCES HELP WHEN in_help IS NOT SET.
+ */
+
+void display_action (parseinfo *csb, transition *mine,
+ help_struct * const arg)
+{
+ save_help_msg(csb, arg->str);
+ push_node(csb, mine->alternate);
+ return;
+}
+
+
+/* CHARACTER matches a single character */
+
+void char_action (parseinfo *csb, transition *mine,
+ char_struct * const arg)
+{
+ char ch[2];
+
+ push_node(csb, mine->alternate);
+
+ /* Long help is the responsibility of the calling macro. */
+
+ INVALID_NVGEN_CHECK;
+
+ if (csb->line[csb->line_index] == arg->character) {
+
+ ch[0] = arg->character;
+ ch[1] = '\0';
+ if (parser_ambig_debug) {
+ printf("\nMatched character '%c'", arg->character);
+ printf("\ncsb->command_visible = %d", csb->command_visible);
+ }
+ save_ambig_string(csb, ch, ch);
+
+ csb->line_index++;
+ push_node(csb, mine->accept);
+ csb->line_index--;
+ }
+
+ /*
+ * Note that short help check and error processing
+ * are NOT appropriate here.
+ */
+}
+
+
+/*
+ * CHAR_NUMBER takes either a character or an integer value
+ * representing a character
+ */
+void char_number_action (parseinfo *csb, transition *mine,
+ number_struct * const arg)
+{
+ char short_help[32];
+ int i = 0;
+ uint num;
+ uint lower;
+ uint upper;
+
+ push_node(csb, mine->alternate);
+ INVALID_NVGEN_CHECK;
+
+ CHECK_RANGE_BOUNDS();
+
+ sprintf(short_help, "CHAR or <%d-%d>", lower, upper);
+
+ if (help_check(csb)) {
+ save_help_long(csb, short_help, arg->help, csb->priv);
+ return;
+ }
+
+ /* Try to match the number first */
+ num = 0;
+ if (! match_number(csb, lower, upper, &i, &num,
+ (NUMBER_HEX | HEX_ZEROX_OK | NUMBER_OCT | OCT_ZERO_OK |
+ NUMBER_DEC | NUMBER_NO_WS_OK | NUMBER_HELP_CHECK),
+ NULL)) {
+
+ /* No number, try a character */
+ if (csb->line[csb->line_index] &&
+ !isspace(csb->line[csb->line_index])) {
+
+ /* We have a Non-null character, try accepting it */
+ num = (int) csb->line[csb->line_index];
+ i = 1;
+ }
+ }
+
+ if (i) {
+ if (match_whitespace2((csb->line + csb->line_index),
+ &i, csb->in_help)) {
+
+ *CSBVAR(csb, arg->offset, uint) = num;
+
+ csb->line_index += i;
+ push_node(csb, mine->accept);
+ csb->line_index -= i;
+
+ return;
+ }
+ }
+ help_or_error(csb, i, short_help, NO_COMMAND_COMPLETION);
+}
+
+/*
+ * FUNC calls the named function if we're doing NV generation, or
+ * saves the * pointer to the function and
+ * the current arguments strucuture if we're
+ * consuming input.
+ *
+ * If we're consuming, try the accepting chain, then check csb->multiple_funcs.
+ * If it changed, then EOL was encountered and we leave the argument struct
+ * on the parsedata list. Otherwise, we didn't see an EOL, so remove the
+ * structure from the list. This ensures that the only structures in
+ * the list are those corresponding to FUNCs along the chain leading to
+ * an accepted EOL.
+ *
+ * If we're doing NV generation, call the function directly. This allows the
+ * function at the end of commands which are only keyword based to to
+ * automatically perform NV generation without having to explicitly include an
+ * NVGEN() transition in the command chain definition.
+ */
+
+void func_action (parseinfo *csb, transition *mine, void (*func) (parseinfo *))
+{
+ INVALID_NVGEN_CHECK;
+
+ if (!csb->in_help && func) {
+ (void) func(csb);
+ }
+ push_node(csb, mine->accept);
+}
+
+void test_boolean_action (parseinfo *csb, transition *mine,
+ test_bool_struct * const arg)
+{
+ push_node(csb, mine->alternate);
+ if (*(arg->var)) {
+ push_node(csb, arg->nonzero);
+ } else {
+ push_node(csb, arg->zero);
+ }
+}
+
+void test_int_action (parseinfo *csb, transition *mine,
+ test_int_struct * const arg)
+{
+ push_node(csb, mine->alternate);
+ if (*(arg->var)) {
+ push_node(csb, arg->nonzero);
+ } else {
+ push_node(csb, arg->zero);
+ }
+}
+
+void test_func_action (parseinfo *csb, transition *mine,
+ test_func_struct * const arg)
+{
+ push_node(csb, mine->alternate);
+ if (arg->func()) {
+ push_node(csb, arg->nonzero);
+ } else {
+ push_node(csb, arg->zero);
+ }
+}
+
+void keyword_nows_action (parseinfo *csb, transition *mine,
+ keyword_struct * const arg)
+{
+ general_keyword_struct argout = {
+ arg->str, arg->help, arg->priv, -1, 0, 0,
+ (KEYWORD_NO_WS_OK | KEYWORD_HELP_CHECK)};
+ general_keyword_action(csb, mine, &argout);
+}
+
+void keyword_id_mm_action (parseinfo *csb, transition *mine,
+ keyword_id_mm_struct * const arg)
+{
+ general_keyword_struct argout = {
+ arg->str, arg->help, arg->priv, arg->offset, arg->val, arg->minmatch,
+ (KEYWORD_WS_OK | KEYWORD_HELP_CHECK)};
+ general_keyword_action(csb, mine, &argout);
+}
+
+void keyword_trans_action (parseinfo *csb, transition *mine,
+ keyword_struct * const arg)
+{
+ if (mine && mine->accept && mine->accept->accept &&
+ (mine->accept->accept->alternate != &pname(link_trans))) {
+ keyword_action(csb, mine, arg);
+ } else {
+ push_node(csb, mine->alternate);
+ }
+}
+
+void keyword_ortest_action (parseinfo *csb, transition *mine,
+ keyword_id_struct * const arg)
+{
+ general_keyword_struct argout = {
+ arg->str, arg->help, arg->priv, arg->offset, arg->val, 0,
+ (KEYWORD_WS_OK | KEYWORD_HELP_CHECK | KEYWORD_OR_SET | KEYWORD_TEST)};
+ general_keyword_action(csb, mine, &argout);
+}
+
+void keyword_option_action (parseinfo *csb,
+ transition *mine,
+ keyword_option_struct * const arg)
+{
+ uint i;
+ uint o;
+ uint *var = CSBVAR(csb, arg->offset, uint);
+ boolean matched;
+ uint flags = KEYWORD_HELP_CHECK | KEYWORD_WS_OK;
+
+ push_node(csb, mine->alternate);
+
+ INVALID_NVGEN_CHECK;
+
+ if (priv_check(csb, arg->priv) == FALSE) {
+ return;
+ }
+
+ keyword_flag_modify(csb, arg->priv, &flags);
+
+ o = 0;
+ matched = FALSE;
+ while (arg->options[o].keyword && !matched) {
+ if (arg->flags & KEYWORD_TEST) {
+ if (arg->flags & KEYWORD_OR_SET) {
+ if (*var & arg->options[o].val) {
+ o++;
+ continue;
+ }
+ } else {
+ if (*var) {
+ o++;
+ continue;
+ }
+ }
+ }
+ i = 0;
+ if (match_partial_keyword(csb, arg->options[o].keyword, &i,
+ arg->options[o].help, 0, flags,
+ arg->priv->cur_priv)) {
+ csb->line_index += i;
+ if (csb->priv_set) {
+ priv_push(csb, arg->priv); /* change priv level */
+ }
+ csb->last_priv = arg->priv->cur_priv;
+ if (csb->last_priv > csb->highest_priv) {
+ csb->highest_priv = csb->last_priv;
+ }
+ if (arg->offset != -1) {
+ if (arg->flags & KEYWORD_OR_SET) {
+ *var |= arg->options[o].val;
+ } else {
+ *var = arg->options[o].val;
+ }
+ }
+ push_node(csb, mine->accept);
+ csb->line_index -= i;
+ matched = TRUE;
+ } else {
+ if (parser_ambig_debug) {
+ printf("\nDidn't match keyword '%s'", arg->options[o].keyword);
+ }
+ }
+ o++;
+ }
+}
+
+void number_func_action (parseinfo *csb, transition *mine,
+ number_func_struct * const arg)
+{
+ dynamic_number_struct new_arg =
+ {
+ arg->offset, 0, -1, arg->help,
+ (NUMBER_HEX | HEX_ZEROX_OK | NUMBER_OCT | OCT_ZERO_OK |
+ NUMBER_DEC | NUMBER_WS_OK | NUMBER_HELP_CHECK)
+ };
+
+ if (!csb->priv_set &&
+ !(csb->flags & COMMAND_FUNCTION) &&
+ arg->func) {
+ arg->func(csb, &(new_arg.lower), &(new_arg.upper));
+ }
+ general_number_action(csb, mine, &new_arg);
+}
+
+void number_help_func_action (parseinfo *csb, transition *mine,
+ number_help_func_struct * const arg)
+{
+ dynamic_number_struct new_arg =
+ {
+ arg->offset, 0, -1, "",
+ (NUMBER_HEX | HEX_ZEROX_OK | NUMBER_OCT | OCT_ZERO_OK |
+ NUMBER_DEC | NUMBER_WS_OK | NUMBER_HELP_CHECK)
+ };
+
+ if (!csb->priv_set &&
+ !(csb->flags & COMMAND_FUNCTION) &&
+ arg->func) {
+ arg->func(csb, &new_arg.lower, &new_arg.upper, &new_arg.help);
+ }
+ general_number_action(csb, mine, &new_arg);
+}
+
+void params_action (parseinfo *csb, transition *mine,
+ params_struct * const arg)
+{
+ char *cp,
+ *cp_save;
+ int i = 0,
+ k = 0;
+ uint num;
+ uint lower;
+ uint upper;
+ uint flags = KEYWORD_WS_OK | KEYWORD_HELP_CHECK;
+
+ /* Make sure we process any alternates */
+ push_node(csb, mine->alternate);
+
+ /* Check for privilege to use this keyword */
+ if (priv_check(csb, arg->priv) == FALSE) {
+ return;
+ }
+
+ if (csb->nvgen) {
+ if (csb->priv_set) {
+ if (nvgen_privilege(csb, arg->priv, arg->str)) {
+ /*
+ * The next token is a number, but we are currently
+ * stopping at NVGEN points, which a number is, so stop!
+ */
+ }
+ return;
+ }
+ for (cp = csb->nv_command; *cp; cp++) {
+ ; /* Null body */
+ }
+ cp_save = cp;
+
+ /* Add a space if needed */
+ if (cp != csb->nv_command) {
+ *cp++ = ' ';
+ *cp = 0;
+ }
+
+ /*
+ * Add the current token and call the command action routine
+ */
+ strcpy(cp, arg->str);
+
+ csb->which = arg->subfunc;
+ nvgen_action(csb, mine, arg->func);
+
+ /*
+ * Restore the original command line before processing alternates
+ */
+ *cp_save = 0;
+ return;
+ }
+
+ /********** KEYWORD **********/
+ /*
+ * Check to see if the input matches this token. If there is no match,
+ * we skip processing this token and try the alternates.
+ */
+ keyword_flag_modify(csb, arg->priv, &flags);
+ if (match_partial_keyword(csb, arg->str, &i, arg->keyhelp, 0,
+ flags, arg->priv->cur_priv)) {
+ csb->line_index += i;
+
+ if (csb->priv_set) {
+ /*
+ * Modify the current keyword privilege
+ */
+ priv_push(csb, arg->priv);
+ }
+ csb->last_priv = arg->priv->cur_priv;
+ if (csb->last_priv > csb->highest_priv) {
+ csb->highest_priv = csb->last_priv;
+ }
+ /******** NVGENS **********/
+ csb->which = arg->subfunc;
+
+ if ((csb->sense == FALSE) && (arg->flags & NO_NUMBER)) {
+ /******** NOPREFIX *********/
+ /*
+ * We've parsed a 'no' prefix and must consume the remainder of
+ * the line, then look for EOL.
+ */
+ for (k = 0; csb->line[csb->line_index + k] != '\n' &&
+ csb->line[csb->line_index + k]; k++) {
+ /* Null body */
+ }
+ /******** EOLS ***********/
+ csb->line_index += k;
+ csb->which = arg->subfunc;
+ eol_action(csb, mine, arg->func);
+ csb->line_index -= k;
+ /****** End EOLS *********/
+ /******** End NOPREFIX ********/
+ } else {
+ /******** DECIMAL **********/
+ k = 0;
+
+ CHECK_RANGE_BOUNDS();
+
+ if (match_number(csb, lower, upper, &k, &num,
+ arg->flags, arg->varhelp)) {
+
+ *CSBVAR(csb, arg->offset, uint) = num;
+
+ /******** EOLS ***********/
+ csb->line_index += k;
+ csb->which = arg->subfunc;
+ eol_action(csb, mine, arg->func);
+ csb->line_index -= k;
+ /****** End EOLS *********/
+ } else {
+ /******** NO_ALT ***********/
+ csb->line_index += k;
+ no_alt_action(csb);
+ csb->line_index -= k;
+ /********* End NO_ALT **********/
+ }
+ /********* End DECIMAL **********/
+ }
+
+ csb->line_index -= i;
+ /********* End NVGENS **********/
+ }
+}
+
+void params_action_alist (parseinfo *csb, transition *mine,
+ params_struct_alist * const arg)
+{
+ char *cp,
+ *cp_save;
+ int i = 0,
+ k = 0;
+ uint num;
+ uint lower, lower2;
+ uint upper, upper2;
+ uint flags = KEYWORD_WS_OK | KEYWORD_HELP_CHECK;
+
+ /* Make sure we process any alternates */
+ push_node(csb, mine->alternate);
+
+ /* Check for privilege to use this keyword */
+ if (priv_check(csb, arg->priv) == FALSE) {
+ return;
+ }
+
+ if (csb->nvgen) {
+ if (csb->priv_set) {
+ if (nvgen_privilege(csb, arg->priv, arg->str)) {
+ /*
+ * The next token is a number, but we are currently
+ * stopping at NVGEN points, which a number is, so stop!
+ */
+ }
+ return;
+ }
+ for (cp = csb->nv_command; *cp; cp++) {
+ ; /* Null body */
+ }
+ cp_save = cp;
+
+ /* Add a space if needed */
+ if (cp != csb->nv_command) {
+ *cp++ = ' ';
+ *cp = 0;
+ }
+
+ /*
+ * Add the current token and call the command action routine
+ */
+ strcpy(cp, arg->str);
+
+ csb->which = arg->subfunc;
+ nvgen_action(csb, mine, arg->func);
+
+ /*
+ * Restore the original command line before processing alternates
+ */
+ *cp_save = 0;
+ return;
+ }
+
+ /********** KEYWORD **********/
+ /*
+ * Check to see if the input matches this token. If there is no match,
+ * we skip processing this token and try the alternates.
+ */
+ keyword_flag_modify(csb, arg->priv, &flags);
+ if (match_partial_keyword(csb, arg->str, &i, arg->keyhelp, 0,
+ flags, arg->priv->cur_priv)) {
+ csb->line_index += i;
+
+ if (csb->priv_set) {
+ /*
+ * Modify the current keyword privilege
+ */
+ priv_push(csb, arg->priv);
+ }
+ csb->last_priv = arg->priv->cur_priv;
+ if (csb->last_priv > csb->highest_priv) {
+ csb->highest_priv = csb->last_priv;
+ }
+ /******** NVGENS **********/
+ csb->which = arg->subfunc;
+
+ if ((csb->sense == FALSE) && (arg->flags & NO_NUMBER)) {
+ /******** NOPREFIX *********/
+ /*
+ * We've parsed a 'no' prefix and must consume the remainder of
+ * the line, then look for EOL.
+ */
+ for (k = 0; csb->line[csb->line_index + k] != '\n' &&
+ csb->line[csb->line_index + k]; k++) {
+ /* Null body */
+ }
+ /******** EOLS ***********/
+ csb->line_index += k;
+ csb->which = arg->subfunc;
+ eol_action(csb, mine, arg->func);
+ csb->line_index -= k;
+ /****** End EOLS *********/
+ /******** End NOPREFIX ********/
+ } else {
+ /******** DECIMAL **********/
+ k = 0;
+
+ CHECK_RANGE_BOUNDS_ALIST();
+
+ if (match_number(csb, lower, upper, &k, &num,
+ arg->flags, arg->varhelp)) {
+
+ *CSBVAR(csb, arg->offset, uint) = num;
+
+ /******** EOLS ***********/
+ csb->line_index += k;
+ csb->which = arg->subfunc;
+ eol_action(csb, mine, arg->func);
+ csb->line_index -= k;
+ /****** End EOLS *********/
+ } else if (match_number(csb, lower2, upper2, &k, &num,
+ arg->flags & ~NUMBER_HELP_CHECK,
+ NULL)) {
+
+ /* Convert to other numbering scheme and save */
+ *CSBVAR(csb, arg->offset, uint) = num + lower - lower2;
+
+ /******** EOLS ***********/
+ csb->line_index += k;
+ csb->which = arg->subfunc;
+ eol_action(csb, mine, arg->func);
+ csb->line_index -= k;
+ /****** End EOLS *********/
+ } else {
+ /******** NO_ALT ***********/
+ csb->line_index += k;
+ no_alt_action(csb);
+ csb->line_index -= k;
+ /********* End NO_ALT **********/
+ }
+ /********* End DECIMAL **********/
+ }
+
+ csb->line_index -= i;
+ /********* End NVGENS **********/
+ }
+}
+
+
+void hexdata_action (parseinfo *csb, transition *mine,
+ hexdata_struct * const arg)
+{
+ int i;
+ int stored = 0;
+ char short_help[] = "Hex-data";
+
+ push_node(csb, mine->alternate);
+
+ INVALID_NVGEN_CHECK;
+
+ if (help_check(csb)) {
+ save_help_long(csb, short_help, arg->help, csb->priv);
+ return;
+ }
+
+ i = match_hex_digits(csb->line + csb->line_index,
+ CSBVAR(csb, arg->bufoffset, char),
+ arg->bufmax, &stored);
+ if (i) {
+ (void) match_whitespace2(csb->line + csb->line_index,
+ &i, csb->in_help);
+ }
+
+ /*
+ * The following catches all help ?'s in the middle of a stream.
+ */
+
+ csb->line_index += i;
+ if (help_check(csb)) {
+ save_help_short(csb, short_help, NO_COMMAND_COMPLETION);
+ } else {
+ if (stored > 0) {
+ /* success */
+ /* string output stored already */
+ *CSBVAR(csb, arg->numoffset, uint) = stored;
+ push_node(csb, mine->accept);
+ } else {
+ set_error_index(csb);
+ }
+ }
+ csb->line_index -= i;
+}
+
+/*
+ * Like char_action, but deals with characters which might be taken
+ * as designating end of line (like '#'), confusing any (prior)
+ * help_check full help check. These characters can only be correctly
+ * processed by not allowing alternative interpretations !!!
+ */
+void literal_char_action (parseinfo *csb, transition *mine,
+ char_struct2 * const arg)
+{
+ push_node(csb, mine->alternate);
+
+ INVALID_NVGEN_CHECK;
+
+ if (csb->line[csb->line_index] == arg->character) {
+ csb->line_index++;
+ push_node(csb, mine->accept);
+ csb->line_index--;
+ } else {
+ /* Can only have help if the character is NOT found. */
+ if (help_check(csb)) {
+ save_help_short(csb, arg->help, NO_COMMAND_COMPLETION);
+ }
+ }
+}
+
+static boolean match_spaces (char *buf, int *pi)
+{
+ int k;
+
+ buf += *pi;
+ for (k = 0; isspace(buf[k]); k++) {
+ ; /* Null body */
+ }
+
+ *pi += k;
+
+ return((k > 0) ? TRUE : FALSE);
+}
+
+
+
+/*
+ * Converts one or two hex digits from s to a hex number, and stores it in
+ * out. Returns pointer to next non-consumed char (NULL if first char is
+ * not a hex digit or if it is end of string).
+ */
+static char *hex_to_byte (char *s, char *out)
+{
+ int i = 0;
+
+ match_spaces(s, &i);
+ s += i;
+ *out = 0;
+
+ if ((*s == '\0') || !isxdigit(*s)) {
+ return(NULL);
+ }
+
+ *out = CVHTOB(*s);
+ s++;
+
+ if ((*s != '\0') && isxdigit(*s)) {
+ *out = (*out << 4) + CVHTOB(*s);
+ s++;
+ }
+ return(s);
+}
+
+/*
+ * Recognize single or paired hex digits in buf. Convert each pair to a
+ * byte, and store that byte in outbuf. maxlen is the most chars that can
+ * be stored in outbuf.
+ *
+ * RETURNS: number of characters matched. *pchars is the number of chars
+ * stored.
+ *
+ */
+static int match_hex_digits (char *buf, char *outbuf, int maxlen, int *pchars)
+{
+ int i;
+ char *s;
+ char *ptr = buf;
+
+ for (i = 0; i < maxlen; i++) {
+ s = hex_to_byte(ptr, outbuf);
+ if (s == NULL) {
+ break;
+ }
+ ptr = s;
+ outbuf++;
+ }
+ *pchars = i;
+ return(ptr - buf);
+}
+
+/* ALT_HELP does func call at EOL which
+ * prints platform specific help.
+ */
+
+void alt_help_action (parseinfo *csb, transition *mine, void (*func) (parseinfo *))
+{
+ if (csb->in_help) {
+ if (help_check(csb)) {
+ if (func) {
+ (void) func(csb);
+ return;
+ }
+ }
+ }
+
+ no_alt_action(csb);
+}
+
+/* ALT_HELPS - does platform specific func call at EOL. Sets csb->which with
+ * the EVAL macro so that 'val' is not constrained to be a constant.
+ */
+void alt_helps_action (parseinfo *csb, transition *mine,
+ eols_struct * const arg)
+{
+ csb->which = arg->subfunc;
+ alt_help_action(csb, mine, arg->func);
+}
+
+
+void general_number_short_help (uint *flags, uint lower,
+ uint upper, char *help)
+{
+ general_number_short_help_http(flags, lower, upper, help, FALSE);
+}
+
+boolean match_minusone (char *buf, int *pi)
+{
+ if ((buf[*pi] == '-') && (buf[1 + *pi] == '1')) {
+ (*pi) += 2;
+ return(TRUE);
+ }
+ return(FALSE);
+}
+
+/*
+ * Scan octal as an unsigned int. Error if too many
+ * octal digits
+ */
+boolean match_octal (char *buf, uint low, uint high, int *pi, ushort * pvalue)
+{
+ uint i = 0;
+ ulong value = 0L;
+
+ /* Fail if there is not at least one octal digit */
+ *pvalue = 0L;
+ buf += *pi;
+
+ if (!isodigit(buf[i])) {
+ return(FALSE);
+ }
+
+ for (; isodigit(buf[i]); i++) {
+ if (value > USHRT_MAX / 8) {
+ *pi += i;
+ return(FALSE);
+ }
+ value = 8 * value + buf[i] - '0';
+ if (value > high) {
+ *pi += i;
+ return(FALSE);
+ }
+ }
+ if (i && (value >= (ulong) low)) {
+ *pvalue = (ushort) value;
+ *pi += i;
+ return(TRUE);
+ }
+ return(FALSE);
+}
+
+/*
+ * ASSUMES: no leading 0x.
+ *
+ */
+boolean match_hexadecimal (char *buf, int *pi, ushort * pvalue)
+{
+ int i;
+ char c;
+ ushort value = 0;
+
+ buf += *pi;
+ *pvalue = 0;
+
+ for (i = 0, c = toupper(buf[i]); isxdigit(c); i++, c = toupper(buf[i])) {
+ if (value > USHRT_MAX / 16) {
+ *pi += i;
+ return(FALSE);
+ }
+ value = value * 16 + CVHTOB(c);
+ }
+
+ if (i > 0) {
+ (*pi) += i;
+ *pvalue = value;
+ return(TRUE);
+ }
+ return(FALSE);
+}
+
+
+/*
+ * Try to match an hexadecimal ulong, with value
+ * between (or equal to) <low> and <high>. <*pi> is incremented
+ * by the number of characters in the match.
+ *
+ * ASSUMES: no leading 0x.
+ *
+ */
+boolean match_ulong_hexadecimal (char *buf, ulong low, ulong high,
+ int *pi, ulong *pvalue)
+{
+ int i;
+ ulong value = 0L;
+ char c;
+
+ buf += *pi;
+ *pvalue = 0L;
+
+ for (i = 0, c = toupper(buf[i]); isxdigit(c); i++, c = toupper(buf[i])) {
+ if (value > ULONG_MAX / 16) {
+ /* Too many non-zero digits, max out. */
+ *pi += i;
+ return(FALSE);
+ }
+ value = value * 16 + CVHTOB(c);
+ if (value > high) {
+ *pi += i;
+ return(FALSE);
+ }
+ }
+
+ if (i && (value >= low)) {
+ *pvalue = value;
+ *pi += i;
+ return(TRUE);
+ }
+ return(FALSE);
+}
+
+
+
+/*
+ * Scan octal as an unsigned LONG int. Error if too many octal
+ * digits.
+ */
+boolean match_ulong_octal (char *buf, ulong low,
+ ulong high, int *pi, ulong *pvalue)
+{
+ uint i = 0;
+ ulong value = 0L;
+
+ /* Fail if there is not at least one octal digit */
+ *pvalue = 0L;
+ buf += *pi;
+
+ if (!isodigit(buf[i])) {
+ return(FALSE);
+ }
+
+ for (; isodigit(buf[i]); i++) {
+ /* Make sure we don't have a 33-rd bit */
+ if (value > ULONG_MAX / 8) {
+ *pi += i;
+ return(FALSE);
+ }
+ value = 8 * value + buf[i] - '0';
+ if (value > high) {
+ *pi += i;
+ return(FALSE);
+ }
+ }
+ if (i && (value >= low)) {
+ *pvalue = value;
+ *pi += i;
+ return(TRUE);
+ }
+ return(FALSE);
+}
+
+/*
+ * Try to match an unsigned LONG int,
+ * with value between (or equal to) <low> and
+ * <high>. <*pi> is incremented by the number of characters in
+ * the match.
+ */
+boolean match_ulong_decimal (char *buf,ulong low, ulong high,
+ int *pi, ulong *pvalue)
+{
+ int i;
+ ulong value = 0L;
+ char c;
+
+ buf += *pi;
+ *pvalue = 0L;
+
+ i = 0;
+ if (buf[i] == '+')
+ i++;
+
+ for (c = buf[i]; isdigit(c); c = buf[++i]) {
+ if ((value > ULONG_MAX / 10)
+ || ((value == ULONG_MAX / 10) && ((c - '0') > ULONG_MAX % 10))) {
+ /* Too many chars, max out. */
+ *pi += i;
+ return(FALSE);
+ }
+ value = value * 10 + (ulong) (c - '0');
+ if (value > high) {
+ *pi += i;
+ return(FALSE);
+ }
+ }
+
+ if (i && (value >= low)) {
+ *pvalue = value;
+ *pi += i;
+ return(TRUE);
+ }
+ return(FALSE);
+}
+
+
+#ifdef DEBUG_PARSER
+void print_tokenQ (parseinfo *csb)
+{
+ parsenode *tos;
+ for (tos = (parsenode *) csb->tokenQ->qhead; tos; tos = tos->next) {
+ printf("\nNode:\n");
+ printf("\tcommand '%s'\n", tos->nv_command);
+ printf("\tOBJ(int,1) %d OBJ(idb,1) 0x%x '%s'\n",
+ tos->val1, tos->idb1, tos->idb1 ? tos->idb1->namestring : "");
+ if (tos->val1 == PDB_OSI) {
+ printf("\tpdb1 0x%x '%s'\n", tos->pdb1,
+ tos->pdb1 ? ((clns_pdbtype *) tos->pdb1)->name : "");
+ } else {
+ printf("\tpdb1 0x%x '%s'\n", tos->pdb1,
+ tos->pdb1 ? ((pdbtype *) tos->pdb1)->name : "");
+ }
+ }
+}
+#endif /* DEBUG_PARSER */
+#endif /* IOS_PARSER */
diff --git a/data/mnet/Common/cli/src/parser_input.c b/data/mnet/Common/cli/src/parser_input.c
new file mode 100644
index 0000000..2d82d1c
--- /dev/null
+++ b/data/mnet/Common/cli/src/parser_input.c
@@ -0,0 +1,1432 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <tyLib.h>
+#include <taskLib.h>
+#include <errnoLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <msgQLib.h>
+#include <sigLib.h>
+#include <logLib.h>
+#include <wdLib.h>
+
+
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/platdef.h>
+#include <../include/ttyutil.h>
+
+#include <../include/imsg.h>
+#include <../include/imc.h>
+
+#include <../include/parsertypes.h>
+#include <../include/address.h>
+#include <../include/config.h>
+#include <../include/parser_defs_exec.h>
+#include <../include/parser_input.h>
+#include <../include/parser_sim.h>
+#include <../include/parser_util.h>
+#include <../include/parser_commands.h>
+#include <../include/nv.h>
+#include <../include/parser_ModNum.h>
+#include <../include/parser_errno.h>
+#include <../include/defs.h>
+#include <../include/parser.h>
+#include <../include/cli_parser_private.h>
+#include <../include/parser_actions.h>
+
+
+#define DEVELOPMENT
+#define ROOT_UID 0
+#define USER_UID 1
+#define INVALID_UID -1
+#define PS_TASK_NAME taskName(taskIdSelf())
+#define bool boolean
+
+/********* Global variables *********/
+static char longCmdErrMsg[] ="\nCommand too long\n";
+tpIOINFO pIoInfo = NULL;
+char taskid[50];
+boolean terminalEcho=TRUE;
+boolean doneAuth;
+
+char current_user[MAX_USERNAME_LEN];
+char current_password[MAX_PASSWD_LEN];
+
+/********* Function declarations ***********/
+void func(int fd,char* str);
+static void process_del_char (tOCTET2 );
+bool AuthenticateUser(parseinfo *csb);
+tOCTET2 getInput( tINT outfd,tINT infd, char *pPrompt, char *pInput,
+ tINT len, boolean hideInput );
+extern BOOL load_running_config;
+extern int backInFd;
+
+
+/*
+ * Write to fd in maxsz chunks. This accomodates
+ * the message oriented nature of vxWorks' pipes.
+ */
+static STATUS
+io_write_buffer(tINT fd, const char *buf, size_t sz, size_t maxsz)
+{
+ STATUS ret = OK;
+ int i;
+ ssize_t cc;
+
+ for (i = 0; i < sz; i += cc) {
+ cc = sz - i > maxsz ? maxsz : sz - i;
+
+
+ cc = write(fd, (void *)&buf[i], cc);
+
+ if (cc <= 0) {
+ ret = ERROR;
+ break;
+ }
+ }
+ return ret;
+}
+
+/*****************************************************************
+ *
+ * Func: io_process_response
+ *
+ * Desc: Wait for and process response for command request
+ *
+ * Inputs:
+ *
+ *
+ * Result: RC_OK : Command was executed successfuly
+ * RC_ERR : Error occured while processing command
+ * RC_MORE : 'more' processing required
+ *
+ * Algorithm:
+ *
+ *****************************************************************/
+static tOCTET2 io_process_response(tOCTET2 fd, tOCTET4 maxCount,tpIOINFO pIoInfo)
+{
+ tOCTET2 rc = RC_OK;
+ tpCOMSIM pComSim;
+ char buffer[256];
+ char *pOutput = NULL;
+
+ /* Wait till we get an indication of response from Parser */
+ if ( PSsemTake( pIoInfo->ioSemId, WAIT_FOREVER ) == ERROR ) {
+ PSpanic("io_process_reponse:Cannot wait on Console Semaphore\n");
+ }
+
+
+ pComSim = NULL;
+
+ /* Get the interaction for us */
+ mGET_WORK_SIM(pComSim, pIoInfo->ioModuleId );
+
+ sprintf(buffer, "%s:", taskName(taskIdSelf()));
+
+ if ( pComSim != NULL ) {
+ /* This carries any output from modules */
+ pOutput = ( char *)(pComSim->pLayerSim);
+
+ /* Check if it is Request or Indication */
+ if ( IS_INDICATION(pComSim->serviceid)) {
+ if (pComSim->requestid == pIoInfo->requestId ) {
+ rc = pComSim->status;
+
+ if ( pComSim->pLayerSim ) {
+ io_write_buffer(fd, pOutput, strlen(pOutput), BUFSIZ);
+ }
+ if ( rc == RC_WAIT ) {
+ /* Wait till we are done with More Processing
+ * or TCL Shell
+ */
+ do {
+ mFREESIM( pComSim );
+ pComSim = NULL;
+ /* Wait for indication from TCL Shell
+ * or tMore task
+ */
+ if ( PSsemTake( pIoInfo->ioSemId, WAIT_FOREVER )
+ == ERROR ) {
+ logMsg("Semaphore was deleted\n",0,0,0,0,0,0);
+ break;
+ }
+
+ mGET_WORK_SIM(pComSim, pIoInfo->ioModuleId );
+ rc = pComSim->status;
+
+ } while ( pComSim->serviceid != IO_WAIT_COMPLETE_IND);
+
+
+ /* TCL Sets the terminal to TERMINAL mode
+ * So reset the terminal characteristcs
+ */
+ ioSetTerminalMode( fd, IO_RAW_MODE );
+ }
+ } else {
+ sprintf(buffer,"io_process_response: Got %ld Expecting %ld\n",
+ pComSim->requestid, pIoInfo->requestId );
+ write( fd, buffer, strlen( buffer ) );
+ }
+
+ } else if (IS_REQUEST(pComSim->serviceid)) {
+ /* Who will send a request to us via IMC ? */
+ strcat(buffer, " I/O Task cannot process request!\n" );
+ write(fd, buffer, strlen(buffer));
+ } else {
+ /* What kind of service is this ? */
+ strcat(buffer, " io_process_response : Invalid Service Id\n");
+ write(fd, buffer, strlen(buffer));
+ }
+ /* Done.. See ya */
+ if ( pComSim )
+ mFREESIM( pComSim );
+
+ } else {
+ /* Hmm..We get an indication but a NULL SIM ? */
+ strcat(buffer, " io_process_response : NULL SIM from GETWORK\n");
+ write(fd, buffer, strlen(buffer));
+ }
+
+ return ( rc );
+}
+/*****************************************************************
+ *
+ * Func: io_send_request
+ *
+ * Desc: Send a request to execute command to parser
+ *
+ * Inputs:
+ * line : Command to be executed
+ * lastchar : is last char '?', '\t', '\n';
+ * index : cookie for 'more' processing
+ * maxCount : Maximum lines to be displayed
+ *
+ * Result: None
+ *
+ * Algorithm:
+ *
+ *****************************************************************/
+static void io_send_request(char *line, char lastchar, void *index,
+ tOCTET4 maxCount,tpIOINFO pIoInfo )
+{
+ tOCTET2 rc = RC_OK;
+ tpPARSERSIM pSim = NULL;
+ int uid;
+ parseinfo *csb = pIoInfo->csb;
+
+ /* Get the interaction module for parser */
+ pSim = (tpPARSERSIM ) mGETSIM( sizeof( tPARSERSIM ) );
+ if ( csb == NULL ) {
+ PSpanic("Error occurred while sending Request !\n");
+ }
+
+ if ( !pSim ) {
+ PSpanic("No Memory to allocate SIM\n");
+ }
+
+ /* NULL Command */
+ if ( !line ) {
+ printf("NULL Command sent as request\n");
+ }
+
+ /* Keep track of request */
+ ++(pIoInfo->requestId);
+
+ /* User Id on whose context to run */
+ uid = csb->uid;
+
+ /* Fill parser interaction module */
+ mFILL_PARSER_SIM(pSim, csb, pIoInfo->ioModuleId, \
+ PARSER_MODULE, PARSER_CMD_PROC_REQ, pIoInfo->requestId, \
+ line, lastchar, index, maxCount );
+
+ /* Send it to parser */
+ mPOST_SIM_NREQ(((tpCOMSIM)pSim), rc );
+
+ if ( rc != RC_OK ) {
+ printf("Error occured while processing cosole_send_request\n");
+ }
+
+}
+/*****************************************************************
+ *
+ * Func: io_reset_cmdline
+ *
+ * Desc: Erase the previously entered command
+ *
+ * Inputs:
+ * fd : Output file descriptor
+ * currentPos : Current Cursor Position
+ * line : Current Command entered
+ * delPos : Cursor position to delete from
+ *
+ * Result: None
+ *
+ * Algorithm:
+ *
+ *****************************************************************/
+static void io_reset_cmdline( tINT fd, tINT currentPos, tpOCTET line,
+ tINT delPos)
+{
+ tINT index = 0;
+
+ /* Go back to the end of the entered command... */
+ for(index = currentPos ;
+ index < strlen(line); index++ ){
+ if ( line[index] != '\0' ) {
+ write(fd, &line[index], 1);
+ } else
+ break;
+ }
+
+ /* ...And erase the entire command */
+ for( index = delPos; index < strlen(line); index++)
+ process_del_char( fd );
+
+}
+
+/*****************************************************************
+ *
+ * Func: process_special_char
+ *
+ * Desc: Process special characters for parser
+ *
+ * Inputs:
+ * csb : CSB for the source
+ * ch : Character to be checked
+ * line : Input string so far
+ * historyIndex : Pointer to History Index
+ * currentIndex : Current History Index
+ * currentPos : Current Cursor Position
+ *
+ * Result: RC_OK : To echo and continue processing
+ * RC_CONT : do not echo; go back and read input
+ * Algorithm:
+ *
+ *****************************************************************/
+static tOCTET2 process_special_char( parseinfo *csb, char *ch, char *line,
+ tINT *historyIndex, tINT currentIndex,
+ tINT *currentPos ,tpIOINFO pIoInfo)
+{
+ tOCTET2 status = RC_OK;
+ char chr[PARSEBUF + 1];
+ int index = 0;
+ char *pCmd = NULL;
+ char ich = 0;
+ boolean ringBell = TRUE;
+
+ tpOCTET *history = NULL;
+
+ extern parser_mode *interface_mode;
+
+ if ( line == NULL )
+ return(RC_CONT);
+
+ /* Point to the correct 'history' array */
+ if ((csb->mode == config_mode) ||
+ (csb->mode == interface_mode))
+ history = pIoInfo->configHistory;
+ else
+ history = pIoInfo->execHistory;
+
+ /* Following is the methodology used to handle arrow keys etc.
+ *
+ * historyIndex points to the previous command to be displayed
+ * currentIndex is the index where the most recently entered command
+ * will be stored.
+ * currentPos points to the current cursor position
+ *
+ * Upon an arrow key ( Detected using 'ESC+[' ( or 'ESC+O' for MSFT ?)
+ *
+ * UP : Display the history pointed to by historyIndex, and update it
+ * Clear the previously entered command and re-write the new one
+ * DOWN : Update the historyIndex to point to next command, clear the
+ * previously entered command,
+ * LEFT : Write a back-space and update the cursor position
+ * RIGHT : Echo back character in the next cursor position & update the
+ * cursor position
+ */
+
+ switch (*ch ) {
+
+ /* Typically 'Arrow' keys have the encoding as follows
+ * UP-ARROW <ESC>[A
+ * DOWN-ARROW <ESC>[B
+ * LEFT-ARROW <ESC>[C
+ * RIGHT-ARROW <ESC>[D
+ *
+ * Read to see if <ESC> is followed by '[' or else put it back
+ */
+ case CH_ESC:
+ status = RC_CONT;
+ if ( stdin ) {
+ /* Somehow Microsoft Telnet Clients send ESC + O instead
+ * of ESC + [
+ */ read(csb->inFd,&ich,1);
+ if ( ( ich ) == CH_LT_SQ_BRACE ||
+ ( ich == 'O') ) {
+
+ index = *historyIndex;
+ read(csb->inFd,&ich,1);
+ switch( ich ) {
+ case 'A': /* UP Arrow */
+
+ /* Get the next Index */
+ index = (index + MAX_HISTORY - 1) % MAX_HISTORY;
+
+ /* Display most recently entered command*/
+ pCmd = history[*historyIndex];
+
+ if ( line && pCmd && *pCmd) {
+
+ if (*(history[index]) != '\0' ) {
+ *historyIndex = index;
+ }
+
+ ringBell = FALSE;
+
+ /* Reset the command previously entered */
+ io_reset_cmdline(csb->outFd, *currentPos, line, 0);
+
+ /* Rewrite the command from history */
+ strcpy(line, pCmd );
+ write(csb->outFd, pCmd, strlen(pCmd));
+
+ /* Update the current cursor position */
+ if ( currentPos )
+ *currentPos = strlen(line);
+
+ }
+ break;
+
+ case 'B': /* DOWN Arrow */
+ index = ( index + 1 ) % MAX_HISTORY;
+
+ if (*(history[index]) != '\0' ) {
+ *historyIndex = index;
+ pCmd = history[*historyIndex];
+ }
+
+ /* Reset the command previously entered */
+ io_reset_cmdline(csb->outFd, *currentPos, line, 0);
+
+ if ( line && pCmd && *pCmd) {
+ ringBell = FALSE;
+
+ /* Rewrite the command from history */
+ strcpy(line, pCmd );
+ write(csb->outFd, pCmd, strlen(pCmd));
+
+ if ( currentPos )
+ *currentPos = strlen(line);
+ } else {
+ ringBell = TRUE;
+
+ strcpy(line, "" );
+ if ( currentPos )
+ *currentPos = 0;
+ }
+ break;
+
+ case 'C':
+
+ if ( line && *line && currentPos &&
+ (*currentPos < strlen(line)) ) {
+ ringBell = FALSE;
+
+ /* Echo back the current character */
+ chr[0] = line[*currentPos];
+ chr[1] = '\0';
+ ++(*currentPos);
+ write( csb->outFd, chr, 1 );
+ }
+ break;
+
+ case 'D':
+ if ( line && *line && currentPos &&
+ (*currentPos != 0) ) {
+ chr[0] = CH_BS;
+ chr[1] = '\0';
+
+ --(*currentPos);
+
+ /* Write a 'BACKSPACE' */
+ write( csb->outFd, chr, 1 );
+ ringBell = FALSE;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ }
+ break;
+
+ /* Backspace & DEL characters */
+ case CH_BS :
+ case CH_DEL:
+
+ if ( currentPos && *currentPos > 0 && strlen(line) > 0 ) {
+
+ io_reset_cmdline(csb->outFd, *currentPos, line,
+ (*currentPos - 1 ) );
+
+ /* Get the buffer from current position till end */
+ strncpy( chr, &(line[*currentPos]), PARSEBUF - 1);
+ chr[PARSEBUF] = '\0';
+
+ /* Now that we have erased old command after cursor
+ * position, rewrite the updated part of command from
+ * next to cursor till end
+ */
+ write(csb->outFd, chr, strlen(chr));
+
+ /* Update the command buffer */
+ strncpy( &(line[*currentPos - 1]), chr, (PARSEBUF - *currentPos));
+ line[PARSEBUF] = '\0';
+ (*currentPos)--;
+
+ chr[0] = CH_BS;
+ chr[1] = '\0';
+
+ /* Move the cursor position to the new place */
+ for ( index = strlen(line); index > *currentPos; index-- ){
+ write(csb->outFd, chr, 1);
+ }
+ ringBell = FALSE;
+ }
+ status = RC_CONT;
+
+ break;
+
+
+ default:
+
+ ich = *ch;
+
+ /* We are Ok with '\t', '\n' etc... */
+ /* if ( !(isspace( ich ) )) {
+
+ if ( iscntrl( ich ) ) {
+ if ( ich == CH_EXT )
+ read(csb->inFd, chr, 2 );
+ status = RC_CONT;
+ } else if ( !isprint( ich ) ) {
+
+
+ status = RC_CONT;
+ }
+ }
+ ringBell = FALSE;*/
+
+ if ( currentPos )
+ (*currentPos)++;
+
+ break;
+ }
+
+ /* Beep if the entered key is other than backspace
+ * and go back and read input
+ */
+ /* if ( ringBell ) {
+ ch = CH_BEL;
+ write(csb->outFd,&ch,1);
+ }*/
+ return ( status );
+}
+
+
+
+/*****************************************************************
+ *
+ * Func: process_del_char
+ *
+ * Desc: Actions for backspace/delete key
+ *
+ * Inputs:
+ * ioFd : fd to read from and write to
+ *
+ * Result: None
+ *
+ * Algorithm:
+ *
+ *****************************************************************/
+static void process_del_char( tOCTET2 ioFd )
+{
+ char ch;
+
+ /* When Backspace / Delete entered
+ * the character displayed already
+ * has to be erased too
+ * BS/DEL = <BS> <SPC> <BS>
+ */
+ ch = CH_BS;
+ write(ioFd,&ch,1);
+
+ ch = CH_SPC;
+ write(ioFd,&ch,1);
+
+ ch = CH_BS;
+ write(ioFd,&ch,1);
+
+}
+
+extern void ParserCallbackInit(void);
+/*****************************************************************
+ *
+ * Func: parser_io_init
+ *
+ * Desc: Initialize CSB etc for I/O task
+ *
+ * Inputs: None
+ *
+ * Result: None
+ *
+ * Algorithm:
+ *
+ *****************************************************************/
+static void parser_io_init(tpIOINFO pIoInfo )
+{
+ parseinfo *csb = NULL;
+ tpCOMSIM pComSim = NULL;
+ int callbackTaskID;
+ int index=0;
+ /* Let IMC Know that a module id be assigned */
+ pIoInfo->ioModuleId = ASSIGN_MODULE_ID;
+ pIoInfo->requestId=0;
+ /* Semaphore that will indicate presence of message */
+ pIoInfo->ioSemId = PSsemCCreate( PS_DEFAULT_COUNT_SEM_FLAG , 0 );
+
+ /* Add to IMC */
+ if ( imc_add( &(pIoInfo->ioModuleId), pIoInfo->ioSemId,
+ taskIdSelf() == RC_ERR ) ) {
+ PSpanic("Could not create IMC for IO Task!\n");
+ }
+
+ /* Did IMC return valid module Id ? */
+ if ( pIoInfo->ioModuleId < 0 ) {
+ printf("parser_io_init:Negative Module Id\n");
+ }
+ else {
+
+ /* Get CSB to interact with Parser */
+ csb = pIoInfo->csb = get_csb(PS_TASK_NAME);
+
+ if ( !csb )
+ printf("parser_io_init: Unable to obtain CSB\n");
+
+ /* Set some CSB Flags */
+ csb->flags = CONFIG_TERM;
+ csb->priv = DEFAULT_PRIV;
+ *(csb->line) = '\0';
+
+ }
+ do{
+ mGET_WORK_SIM(pComSim, pIoInfo->ioModuleId );
+ }while(pComSim != NULL);
+}
+
+
+
+/* BuildPrompt
+ * Build promt at csb->prompt.
+ * This routine is global as it is used by SNA network management
+ */
+void BuildPrompt (parseinfo *csb, tt_soc *tty)
+{
+ int prompt_length; /* leftover length of prompt */
+
+ char Pprompt[MAXPROMPTLEN + 1];
+
+
+ gethostname(Pprompt,MAXPROMPTLEN);
+ Pprompt[MAXPROMPTLEN] = '\0';
+
+
+
+ /* Build the prompt. */
+ if (config_prompt || (csb->mode == exec_mode) ||
+ !(csb->flags & CONFIG_TERM)) {
+ const char *src;
+ char *dst, trailer;
+
+ trailer = (csb->priv > PRIV_USER) ? '#' : '>';
+ dst = csb->prompt;
+ src = Pprompt;
+ prompt_length = MAXPROMPTLEN;
+ while (*src && prompt_length--) {
+ *dst++ = *src++;
+ }
+
+ /* dst += reg_invoke_parse_cli_prompt(tty->parse_cli_type,
+ csb, dst, &prompt_length);
+ */
+ src = get_mode_prompt(csb);
+ if (src && (prompt_length > 3)) {
+ prompt_length -= 3;
+ *dst++ = '(';
+ while (*src && prompt_length--) {
+ *dst++ = *src++;
+ }
+ *dst++ = ')';
+ } else {
+ /*
+ * Prompt is too long, so cut off end
+ */
+ if (prompt_length <= 0) {
+ dst = &csb->prompt[MAXPROMPTLEN-1];
+ }
+ }
+ *dst++ = trailer;
+ *dst = '\0';
+ } else {
+ csb->prompt[0] = '\0';
+ }
+}
+/*****************************************************************
+ *
+ * Func: io_cleanup
+ *
+ * Desc: Cleanup the I/O Task
+ *
+ * Inputs: tpIOINFO
+ *
+ * Result: None
+ *
+ * Algorithm:
+ *
+ *****************************************************************/
+
+ void io_cleanup( int TaskID)
+{
+
+ parseinfo *csb = NULL;
+ int index = 0 ;
+
+
+ if ( pIoInfo == NULL ){
+ return;
+ }
+
+ csb = pIoInfo->csb;
+ if ( csb == NULL ){
+
+ return;
+ }
+ free_csb(&csb);
+
+ /* Delete all associated semaphores */
+ if ( PSsemDelete( pIoInfo->ioSemId ) == ERROR ) {
+ printf("ioWork: Cannot delete semaphore\n");
+ }
+ /* Close socket for telnet connections
+ if ( (pIoInfo->sockFd > 0) &&
+ (iosFdValue (pIoInfo->sockFd) != ERROR)) {
+ close ( pIoInfo->sockFd );
+ }*/
+
+
+
+
+ /* Delete History Array */
+ for( index = 0; index < MAX_HISTORY; index++ ) {
+ /* Exec Level History */
+ if ( pIoInfo->execHistory[index] )
+ PARSERfree( pIoInfo->execHistory[index] );
+
+ /* Config Level History */
+ if ( pIoInfo->configHistory[index] )
+ PARSERfree( pIoInfo->configHistory[index] );
+ }
+
+
+ /* Remove yourself from IMC */
+ if ( imc_remove( pIoInfo->ioModuleId ) != RC_OK ) {
+ printf("ioWork: Cannot delete Module from IMC\n");
+ }
+ cleanupWorkerTask();
+ PARSERfree( pIoInfo );
+
+ pIoInfo=NULL;
+
+
+
+}
+
+void getPrompt( parseinfo *csb, char* prompt, char *complete )
+{
+ if ( csb != NULL ) {
+ BuildPrompt( csb, NULLTTY );
+
+ strncpy(prompt, csb->prompt, MAXPROMPTLEN);
+ prompt[MAXPROMPTLEN] = EOS;
+
+ strncpy(complete, csb->line, PARSEBUF);
+ complete[PARSEBUF] = EOS ;
+ }
+ else {
+ panic("NULL CSB Obtained in getPrompt\n");
+ }
+}
+/*****************************************************************
+ *
+ * Func: io_work
+ *
+ * Desc: Task Entry point for shell
+ *
+ * Inputs:
+ * inFd : File descriptor to read from
+ outFd : File descriptor to write to
+ * errFd : File descriptor for standard error
+ * interactive :True for console & telnet , False for startup script
+ *
+ * Result: None
+ *
+ * Algorithm:
+ * forever {
+ * Display prompt;
+ * Read a character at a time
+ * Send request to parser either if \n, ?, \t,ctrl-z
+ * Wait for response
+ * }
+ *
+ **********************************************************************/
+
+void io_work( tINT inFd ,
+ tINT outFd,
+ tINT errFd,
+ boolean interactive /*** True for console & telnet , False for script **/
+ )
+{
+
+
+ char line[PARSEBUF + 1];
+ char complete[PARSEBUF + 1];
+ char chr[PARSEBUF + 1];
+ char prompt[MAXPROMPTLEN + 1];
+ char lastchar;
+ char ch ;
+ void *pIndex;
+ parseinfo *csb;
+ parser_mode *prevMode ;
+ extern parser_mode *interface_mode;
+
+ tOCTET2 rc ;
+ tINT execIndex ;
+ tINT configIndex ;
+ tINT index ;
+
+ tpOCTET *currentHistory ;
+
+ tINT *historyIndex;
+ tINT currentIndex ;
+ tINT currentPos ;
+
+ restart:
+ ch = '\0';
+ pIndex = NULL;
+ prevMode = NULL;
+ rc = RC_OK;
+ execIndex = 0;
+ configIndex = 0;
+ index = 0;
+ currentHistory = NULL;
+ historyIndex = &execIndex;
+ currentIndex = 0;
+ currentPos = 0;
+
+ /* Check if we have valid fd's */
+
+ if ( outFd <= 0 || inFd < 0 || errFd < 0) {
+ PSpanic("Invalid fd for I/O Task\n");
+ }
+
+ doneAuth = FALSE;
+
+
+ /*****Allocate memory for pIoInfo *******/
+ if ( (pIoInfo = (tpIOINFO)
+ PARSERcalloc(1, sizeof( tIOINFO))) == NULL ) {
+ PSpanic("ioWork: No memory to allocate IO Info\n");
+ }
+
+ /* Create the history array for Exec & Config Modes */
+ for (index = 0; index < MAX_HISTORY; index++ ) {
+ pIoInfo->execHistory[index] =
+ (tpOCTET) malloc(( sizeof(tOCTET) * (PARSEBUF+1)) );
+ strcpy(pIoInfo->execHistory[index], "");
+
+ pIoInfo->configHistory[index] =
+ (tpOCTET)malloc(( sizeof(tOCTET) * (PARSEBUF+1)));
+ strcpy(pIoInfo->configHistory[index], "");
+ }
+
+ /* This creates the CSB, adds to IMC etc */
+ parser_io_init(pIoInfo);
+
+ /***********/
+
+
+ /* Get CSB to with parser */
+ csb = pIoInfo->csb;
+
+ if (interactive){
+ csb->uid=USER_UID;
+ csb->priv=PRIV_MIN;
+ }else{
+ csb->uid=ROOT_UID;
+ csb->priv=PRIV_ROOT;
+ doneAuth=TRUE;
+ }
+
+ /* CSB may not need inFd & outFd ; But ... */
+ if(interactive){
+ csb->inFd =infd;
+ csb->outFd =outfd;
+ }else{
+ csb->inFd =inFd;
+ csb->outFd =outFd;
+ }
+ /* For More processing cookie.. */
+ csb->pIndex = NULL;
+
+
+ /* For Task level CWD */
+ csb->ioTaskId = taskIdSelf();
+
+ /* Whats my Module Id ? */
+ csb->moduleId = pIoInfo->ioModuleId;
+
+
+ line[0] = lastchar = '\0';
+
+ /* We will be in RAW Mode so that we can read a character
+ * at a time and we will do the ECHO
+ */
+ ioSetTerminalMode( csb->inFd, IO_RAW_MODE );
+
+ ioTaskStdSet( 0, STD_IN, csb->inFd );
+ ioTaskStdSet( 0, STD_OUT, csb->outFd );
+ ioTaskStdSet( 0, STD_ERR, csb->outFd );
+
+
+ ioGlobalStdSet( STD_IN, csb->inFd );
+ ioGlobalStdSet( STD_OUT, csb->outFd );
+ ioGlobalStdSet( STD_ERR, csb->outFd );
+
+ while( 1 ) {
+ pIoInfo->flags = 0;
+
+ ioSetTerminalMode( csb->inFd, IO_RAW_MODE );
+
+ /************ Authenticate User ********************************/
+ if ( doneAuth == FALSE ) {
+ if(!AuthenticateUser(csb)){extern isLoggedOut;
+ csb->uid=ROOT_UID;
+ csb->priv=PRIV_ROOT;
+ if(isLoggedOut==TRUE){
+ isLoggedOut=FALSE;
+ goto cleanup;
+ }
+ strcpy(line,"exit");
+ goto CommandInput;
+
+ }
+
+ doneAuth=TRUE;
+ }
+ /***************************************************/
+
+ prompt[0] = '\0';
+ complete[0] = '\0';
+ getPrompt(csb,prompt, complete );
+
+
+ /* The user did not enter \n last time; and so
+ * we may not have echoed it.. So put \n
+ */
+ if ( lastchar == '\t')
+ write(csb->outFd,"\n",1);
+
+ write( csb->outFd,prompt, strlen(prompt) );
+
+ /* If it is command completion, display the
+ * the completed command or it is help
+ * display previously entered string
+ */
+
+ if ( *complete ) {
+ strcpy( line, complete );
+ write( csb->outFd, complete, strlen(complete));
+ }else {
+ strcpy(line,"\0");
+ }
+
+ /* Reset 'more' cookie */
+ pIndex = csb->pIndex = NULL;
+
+ /* Current Cursor Position */
+ currentPos = strlen(line);
+
+ while (1) {
+
+ ch = '\0';
+ ioSetTerminalMode( csb->inFd, IO_RAW_MODE );
+
+ /* Read one character from fd */
+ if ( read(csb->inFd, &ch, 1 ) <= 0 ) {
+ if(load_running_config){
+ load_running_config=FALSE;
+ csb->mode=exec_mode;
+ csb->inFd=backInFd;
+ }else
+ goto cleanup;
+ }
+
+ /*
+ * Just in case...
+ */
+ if ( ch == '\0' )
+ break;
+
+ rc = process_special_char(csb, &ch, line, historyIndex,
+ currentIndex, &currentPos,pIoInfo );
+ /* Go back and read the input */
+ if ( rc == RC_CONT )
+ continue;
+
+ /* Used for 'strcat' to line */
+ chr[0] = ch;
+ chr[1] = '\0';
+ if( ch == CH_CTRL_Z ){
+ strcpy(line,"disable");
+ goto CommandInput;
+ }
+ if ( ch == '\t' || ch == '?' || ch == '\n'){
+ write(csb->outFd, &ch, sizeof(char));
+ lastchar = ch;
+ break;
+ } else {
+
+ io_reset_cmdline(csb->outFd, currentPos, line,
+ currentPos );
+
+ if ( strlen(line) > 0 ) {
+ /* Get the buffer from current position till end */
+ strncat(chr, &(line[currentPos - 1]), PARSEBUF);
+ chr[PARSEBUF] = EOS;
+ }
+
+ /* Now that we have erased old command after cursor
+ * position, rewrite the updated part of command from
+ * next to cursor till end
+ */
+ write(csb->outFd, chr, strlen(chr));
+
+ /* Build the command to be executed
+ * Make sure we take into account that the 'arrow'
+ * keys may have been used and so replace the right
+ * character in the 'line'
+ */
+ if ((currentPos + strlen(chr)) < PARSEBUF){
+
+ strncpy(&(line[currentPos - 1]), chr, (PARSEBUF-currentPos));
+ line[PARSEBUF] = EOS;
+ } else {
+ /* Make sure that the command does not exceed
+ * the maximum length
+ */
+ write(csb->outFd, longCmdErrMsg, strlen(longCmdErrMsg) );
+ line[PARSEBUF] = EOS;
+ goto process_next_command;
+ }
+
+ chr[0] = CH_BS;
+ chr[1] = '\0';
+
+ /* Move the cursor position to the new place */
+ for ( index = strlen(line); index > currentPos; index-- ){
+ write(csb->outFd, chr, 1);
+ }
+
+ }
+
+ } /* end while */
+
+
+
+ /* Update the 'more' cookie */
+ pIndex = csb->pIndex;
+ /* Store the mode the command was issued */
+
+ prevMode = csb->mode;
+
+ /* Send the request to parser */
+ CommandInput:
+
+ io_send_request(line, lastchar, NULL, 0,pIoInfo);
+ /* Wait for the response from the parser */
+ io_process_response(csb->outFd, 0,pIoInfo);
+ /* store_history: */
+ /* Update the correct History Array. We have config
+ * mode history and exec mode history arrays
+ */
+ if ( prevMode == config_mode )
+ currentHistory = pIoInfo->configHistory;
+ else
+ currentHistory = pIoInfo->execHistory;
+
+
+ if ( !currentHistory )
+ PSpanic("NULL History pointer in I/O Task\n");
+
+ /* This flag is set *ONLY* if the command entered
+ * is *NOT* for command completion
+ */
+ if ( csb->flags & COMMAND_COMPLETE ) {
+ /* Update the current history and make it point to
+ * right index
+ *
+ * currentIndex always is the index where the most
+ * recently entered command will be stored
+ * historyIndex is the index where we are at by using
+ * arrow keys etc. This will be set by process_special_char
+ * routine
+ */
+ if ( *line ) {
+ strncpy(currentHistory[currentIndex], line, PARSEBUF);
+ currentHistory[currentIndex][PARSEBUF]=EOS;
+ *historyIndex = currentIndex;
+ currentIndex = (currentIndex + 1) % (MAX_HISTORY );
+ }
+
+ /* Make sure we update the correct history index
+ * in each mode
+ */
+ historyIndex = ( csb->mode == exec_mode )
+ ? &execIndex
+ : &configIndex;
+
+
+ /* There has been a mode change ? Lets revert back to
+ * what the mode history index was previously
+ */
+ if ( prevMode != csb->mode )
+ currentIndex = ((*historyIndex) + 1) % (MAX_HISTORY);
+
+ csb->flags &= ~COMMAND_COMPLETE;
+
+ }
+ process_next_command:
+
+ } /* end while */
+ cleanup:
+ io_cleanup( taskIdSelf() );
+
+
+
+
+}
+
+
+/*
+ * parser_spawn - create a parser task and wait for it to finish
+ */
+int CliIOInit (int inFd,int outFd,int errFd,boolean interactive)
+{
+ int ret = 0;
+ int tid;
+ char tname[20];
+ static int name=0;
+ int ttymode;
+
+ ttymode = ioctl(inFd, FIOGETOPTIONS, 0);
+
+ /* sprintf(tname, "tCli%d", name++);*/
+ sprintf(tname, "tCli");
+
+ /***** Creates shell task for console and telnet session **********/
+ tid = taskSpawn(tname, PARSER_TASK_PRIORITY, 0, PARSER_TASK_STACK_SIZE,
+ (FUNCPTR)io_work,
+ inFd,
+ outFd,
+ errFd,
+ interactive,
+ 0,
+ 0,0,0,0,0);
+
+ ret=tid;
+ ioctl(inFd, FIOSETOPTIONS, ttymode);
+ return ret;
+}
+
+
+/*****************************************************************
+ *
+ * Func: ioSetTerminalMode
+ *
+ * Desc: Set the terminal mode
+ *
+ * Inputs:
+ * fd : File descriptor of the terminal
+ * termMode : RAW / TERMINAL ( enums )
+ *c
+ * Result: Current Terminal Options
+ * ERROR on Error
+ *
+ * Algorithm:
+ *
+ *****************************************************************/
+tINT ioSetTerminalMode( int fd, tTERMINALMODE termMode )
+{
+
+
+ switch( termMode ) {
+
+ /* RAW Terminal Mode */
+ case IO_RAW_MODE:
+ if (fd == consoleFd)
+ {
+ if ( ioctl (fd, FIOSETOPTIONS, OPT_RAW | OPT_CRMOD |
+ OPT_7_BIT | OPT_MON_TRAP )
+ == ERROR ) {
+ return( ERROR ) ;
+ }
+ }
+ else
+ {
+ if ( ioctl (fd, FIOSETOPTIONS, OPT_RAW | OPT_CRMOD |
+ OPT_7_BIT)
+ == ERROR ) {
+ return( ERROR ) ;
+ }
+ }
+ break;
+
+ case IO_LINE_MODE:
+ if (fd == consoleFd)
+ {
+ if ( ioctl( fd, FIOSETOPTIONS, OPT_TERMINAL ) == ERROR ) {
+ return ( ERROR );
+ }
+ }
+ else
+ {
+ if ( ioctl (fd, FIOSETOPTIONS, OPT_ECHO | OPT_CRMOD | OPT_TANDEM |
+ OPT_7_BIT | OPT_ABORT | OPT_LINE)
+ == ERROR) {
+ return (ERROR);
+ }
+ }
+ break;
+
+ case IO_ECHO_MODE:
+ if (fd == consoleFd)
+ {
+ if ( ioctl( fd, FIOSETOPTIONS,
+ OPT_ECHO | OPT_CRMOD | OPT_7_BIT | OPT_MON_TRAP )
+ == ERROR ) {
+ return ( ERROR );
+ }
+ }
+ else
+ {
+ if ( ioctl( fd, FIOSETOPTIONS,
+ OPT_ECHO | OPT_CRMOD | OPT_7_BIT) == ERROR ) {
+ return ( ERROR );
+ }
+ }
+ break;
+ default:
+ return( ERROR );
+ }
+
+ return(ioctl( fd, FIOGETOPTIONS, 0 ));
+}
+
+/************* Authentication function *************/
+
+bool AuthenticateUser(parseinfo *csb){
+
+char usrPrompt[] ="Username: ";
+char passwdPrompt[] = "Password: ";
+char usrName[MAX_USERNAME_LEN] = "";
+char passwd[256] = "";
+char confirm_password[256]="";
+int retries=6;
+bool rc = FALSE;
+
+
+
+ if(defaultUserInUse == TRUE){
+ printf("\nSystem is being booted for the first time\n\n");
+ printf("PASSWORD FOR THE DEFAULT USER(user) NOT SET\n");
+ printf("Please enter the password for default user,\"user\".\n");
+ printf("Password length should be atleast 8 characters\n");
+
+ if(getInput( STD_OUT,STD_IN,"password :", passwd, 127, TRUE )==FALSE){
+ printf("Could not read password \n");
+ return FALSE;
+ }
+ if(getInput( STD_OUT,STD_IN,"\nconfirm password :", confirm_password, 127, TRUE )==FALSE){
+ printf("Could not read password \n");
+ return FALSE;
+ }
+ if(strcmp(passwd,confirm_password)!=0)
+ {
+ printf("\nPasswords do not match\n");
+ return FALSE;
+ }
+ if(sysUserAdd("user",(char*)passwd,0)==OK){
+ defaultUserInUse=FALSE;
+ printf("\nAdded user successfully\n");
+ strcpy(current_user,"user");
+ strcpy(current_password,passwd);
+ csb->uid=0;
+ csb->priv=PRIV_MIN;
+ return TRUE;
+ }else{
+ printf("\nUser could not be added\n");
+ return FALSE;
+ }
+
+ }
+
+ if( ShellTask == SSHTask)
+ return TRUE;
+
+ while ( retries-- > 0 ) {
+
+ if ( write( csb->outFd, "\n", 1 ) < 0 )
+ return ( FALSE );
+
+ /* Don't prompt for password unless the user enters
+ * something
+ */
+ while( strcmp(usrName, "") == 0 ) {
+ rc = getInput( csb->outFd,csb->inFd,usrPrompt, usrName, MAX_USERNAME_LEN, FALSE );
+ if ( rc == FALSE )
+ return ( FALSE );
+ }
+
+ /* Prompt for password */
+ rc = getInput( csb->outFd,csb->inFd,passwdPrompt, passwd, MAX_PASSWD_LEN, TRUE );
+
+ if ( ( rc == FALSE ) ||
+ ( write( csb->outFd, "\n", 1 ) <= 0 ) )
+ return ( FALSE );
+
+
+ /* set remote IP address to display user's settings */
+
+
+
+ if((csb->uid=sysUserVerify(usrName,passwd))<0){
+ write(csb->outFd,"Login incorrect",strlen("Login incorrect"));
+ rc=FALSE;
+ }else{
+ strcpy(current_user,usrName);
+ strcpy(current_password,passwd);
+ rc=TRUE;
+ break;
+ }
+
+ csb->priv = (csb->uid==ROOT_UID)
+ ? PRIV_MIN
+ : PRIV_MIN;
+
+ strcpy(usrName, "");
+ strcpy(passwd, "");
+
+
+ } /* while retries*/
+
+ return rc;
+
+}
+
+
+/*****************************************************************
+ *
+ * Func: getInput
+ *
+ * Desc: Display specified prompt and get input
+ *
+ * Inputs:
+ * infd : fd to read from
+ outfd :fd to write to
+ * pPrompt : Prompt to be displayed
+ * pInput : Fill the entered input
+ * len : Maximum length of input
+ * hideInput : Echo input back ?
+ *
+ * Result: TRUE : If input was successful
+ * FALSE: otherwise
+ *
+ * Algorithm:
+ *
+ *****************************************************************/
+tOCTET2 getInput( tINT outfd,tINT infd, char *pPrompt, char *pInput,
+ tINT len, boolean hideInput )
+{
+ tOCTET2 rc = TRUE;
+ tINT nbytes =0;
+ int ttymode;
+
+ /* No way .. */
+ if ( !pPrompt || !pInput ) {
+ return ( FALSE );
+ }
+
+ /* Well just in case ? */
+ if (write (outfd, pPrompt, strlen(pPrompt)) != strlen( pPrompt) ){
+ return( FALSE) ;
+ }
+
+ /* Wait till '\n' is entered */
+ ttymode = ioSetTerminalMode( outfd, IO_LINE_MODE );
+
+ /* Do not echo if not required */
+ if ( hideInput ) {
+ /* terminalEcho=FALSE;*/
+ ( void ) ioctl(outfd, FIOSETOPTIONS, (ttymode & ~OPT_ECHO));
+ }
+
+ /* Read maximum specified characters or new-line */
+ if ( (nbytes = read(infd, pInput, len - 1) ) <= 0 ) {
+ rc = FALSE;
+ } else {
+ pInput[nbytes-1] = '\0';
+ }
+ /* Reset terminal characteristics */
+ ioSetTerminalMode( outfd, IO_RAW_MODE );
+ terminalEcho=TRUE;
+ return ( rc );
+
+}
+/*****************************************************************
+ *
+ * Func: cancelIO
+ *
+ * Desc: Cancel the pending I/O operation on a fd
+ *
+ * Inputs:
+ * fd : I/O file descriptor
+ *
+ * Result: None
+ *
+ * Algorithm: Used by the Watchdog timer.
+ *
+ *****************************************************************/
+ void cancelIO( tINT fd )
+{
+ ioctl(fd, FIOCANCEL, 0 );
+}
+
+
diff --git a/data/mnet/Common/cli/src/parser_modes.c b/data/mnet/Common/cli/src/parser_modes.c
new file mode 100644
index 0000000..6b14552
--- /dev/null
+++ b/data/mnet/Common/cli/src/parser_modes.c
@@ -0,0 +1,534 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <tyLib.h>
+#include <taskLib.h>
+#include <errnoLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <msgQLib.h>
+#include <sigLib.h>
+
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+#include <../include/parser_sim.h>
+#include <../include/parser.h>
+#include <../include/parser_defs_exec.h>
+#include <../include/parser_input.h>
+#include <../include/parser_sim.h>
+#include <../include/parser_util.h>
+#include <../include/parser_commands.h>
+#include <../include/nv.h>
+#include <../include/parser_errno.h>
+#include <../include/parser_ModNum.h>
+#include <../include/defs.h>
+#include <../include/parser_init.h>
+#include <../include/macros.h>
+#include <../include/parser_actions.h>
+#include <../include/parser_modes.h>
+
+
+
+/*
+ * Local structure definitions
+ */
+struct parser_mode_ {
+ struct parser_mode_ *next;
+ const char *name;
+ const char *prompt;
+ const char *help;
+ const char *alt_mode;
+ mode_save_var_func save_vars;
+ mode_reset_var_func reset_vars;
+ mode_http_init_func http_init;
+ uint flags;
+ transition *top;
+
+#ifdef INCLUDE_PARSER_ALIAS
+ queuetype *aliases;
+ queuetype *def_aliases;
+#endif
+ boolean priv_changed;
+};
+
+static queuetype parser_modes_queue;
+static queuetype *parser_modes = &parser_modes_queue;
+static boolean parser_modes_inited = FALSE;
+
+
+/*
+ * parser_modes_init
+ * Initialize well known parser modes and add default aliases
+ */
+void parser_modes_init (void)
+{
+ if (!parser_modes_inited) {
+ parser_modes_inited = TRUE;
+ parser_modes = &parser_modes_queue;
+ queue_init(parser_modes, 0);
+
+ parser_add_main_modes();
+ }
+}
+
+
+/*
+ * create_new_mode
+ * Allocate and fill in new mode structure
+ */
+static parser_mode *create_new_mode (const char *name, const char *prompt,
+ const char *help,
+ boolean do_aliases, boolean do_privileges,
+ const char *alt_mode,
+ mode_save_var_func save_vars,
+ mode_reset_var_func reset_vars,
+ transition *top,
+ mode_http_init_func http_init)
+{
+ parser_mode *new_mode;
+
+ if (!parser_modes_inited) {
+ parser_modes_init();
+ }
+
+ new_mode = (parser_mode *)PARSERmalloc(sizeof(parser_mode) );
+ if (new_mode == NULL) {
+ return(NULL);
+ }
+
+ new_mode->name = name;
+ new_mode->prompt = prompt;
+ new_mode->help = help;
+ new_mode->alt_mode = alt_mode;
+ new_mode->save_vars = save_vars;
+ new_mode->reset_vars = reset_vars;
+ new_mode->flags = PARSER_MODE_NONE;
+ new_mode->next = NULL;
+
+ if (do_aliases) {
+ new_mode->flags |= PARSER_MODE_ALIASES;
+ }
+ if (do_privileges) {
+ new_mode->flags |= PARSER_MODE_PRIVILEGE;
+ }
+ new_mode->top = top;
+
+#ifdef INCLUDE_PARSER_ALIAS
+ new_mode->aliases = (queuetype *)PARSERmalloc(sizeof(queuetype) );
+
+ if (new_mode->aliases) {
+ queue_init(new_mode->aliases, 0);
+ }
+ new_mode->def_aliases = (queuetype *)PARSERmalloc(sizeof(queuetype));
+ if (new_mode->def_aliases) {
+ queue_init(new_mode->def_aliases, 0);
+ }
+#endif
+
+ new_mode->priv_changed = FALSE;
+ new_mode->http_init = http_init;
+
+ if (parser_mode_debug) {
+ printf("\nAdding parser mode: '%s' 0x%x", name, (uint)new_mode);
+ }
+
+ return(new_mode);
+}
+
+
+/*
+ * parser_add_mode
+ * Create and add new parser mode
+ * name - mode name, used in MODE macro for matching, so
+ * can't contain whitespace
+ * prompt - mode prompt extension, ie. (config-if), except
+ * without the parentheses
+ * help - help strings describing mode, used as MODE macro help
+ * alt_mode - alternate mode to try if parse fails
+ * save_vars - function to save csb vars when trying alt mode
+ * reset_vars - function to reset csb vars when alt mode fails
+ * do_aliases - are aliases allowed in this mode?
+ * do_privileges - can privilege levels be changed in this mode?
+ * top - top of parse chain for parsing
+ */
+parser_mode *parser_add_mode (const char *name, const char *prompt,
+ const char *help,
+ boolean do_aliases, boolean do_privileges,
+ const char *alt_mode,
+ mode_save_var_func save_vars,
+ mode_reset_var_func reset_vars,
+ transition *top,
+ mode_http_init_func http_init)
+{
+ parser_mode *mode;
+
+ mode = create_new_mode(name, prompt, help, do_aliases, do_privileges,
+ alt_mode, save_vars, reset_vars, top, http_init);
+ if (mode) {
+ enqueue(parser_modes, mode);
+ }
+ return(mode);
+}
+
+
+/*
+ * get_mode_tmp
+ * Create temporary mode
+ */
+parser_mode *get_mode_tmp (const char *name, const char *prompt,
+ const char *help,
+ boolean do_aliases, boolean do_privileges,
+ transition *top)
+{
+ return(create_new_mode(name, prompt, help, do_aliases, do_privileges,
+ NULL, NULL, NULL, top, NULL));
+}
+
+
+/*
+ * free_mode
+ *
+ */
+void free_mode (parser_mode *mode)
+{
+#ifdef INCLUDE_PARSER_ALIAS
+ free_aliases(mode->aliases);
+ free_aliases(mode->def_aliases);
+#endif
+ PARSERfree(mode);
+
+}
+
+
+
+/*
+ * get_mode_byname
+ * Find mode with name
+ */
+parser_mode *get_mode_byname (const char *name, uint volume)
+{
+ parser_mode *mode;
+
+ if (!parser_modes_inited) {
+ parser_modes_init();
+ }
+
+ mode = (parser_mode *)parser_modes->qhead;
+ while (mode) {
+ if (strcmp(name, mode->name) == 0) {
+ break;
+ }
+ mode = mode->next;
+ }
+ if (parser_mode_debug) {
+ printf("\nLook up of parser mode '%s' %s",
+ name, mode ? "succeeded" : "failed");
+ }
+ if (!mode && (volume == MODE_VERBOSE)) {
+ printf("\n%% Unable to find %s mode", name);
+ }
+
+ return(mode);
+}
+
+
+/*
+ * test_mode_config_subcommand
+ * Return TRUE if mode is submode of config mode
+ */
+boolean test_mode_config_subcommand (parseinfo *csb)
+{
+ if (csb && csb->mode && csb->mode->alt_mode) {
+ return(TRUE);
+ }
+ return(FALSE);
+}
+
+parser_mode *get_alt_mode (parser_mode *mode)
+{
+ if (mode && mode->alt_mode) {
+ return(get_mode_byname(mode->alt_mode, MODE_SILENT));
+ } else {
+ return(NULL);
+ }
+}
+
+
+/*
+ * get_mode_prompt
+ * Return prompt extension for this mode
+ */
+const char *get_mode_prompt (parseinfo *csb)
+{
+ if (csb && csb->mode) {
+ return(csb->mode->prompt);
+ } else {
+ return("UNKNOWN-MODE");
+ }
+}
+
+
+/*
+ * get_mode_top
+ * Return top of parse chain for this mode
+ */
+transition *get_mode_top (parser_mode *mode)
+{
+ if (mode) {
+ return(mode->top);
+ } else {
+ return(NULL);
+ }
+}
+
+
+/*
+ * get_mode_nv
+ * Return top of parse chain for NV generation for this mode
+ */
+transition *get_mode_nv (parseinfo *csb)
+{
+ if (csb && csb->mode) {
+ return(csb->mode->top);
+ } else {
+ return(NULL);
+ }
+}
+
+void *mode_save_vars (parseinfo *csb)
+{
+ if (csb && csb->mode &&
+ csb->mode->save_vars && csb->mode->reset_vars) {
+ return(csb->mode->save_vars(csb));
+ } else {
+ return(NULL);
+ }
+}
+
+/*
+ * set_mode_byname
+ * Set current mode to name
+ */
+boolean set_mode_byname (parser_mode **mode, const char *name, uint volume)
+{
+ parser_mode *new_mode;
+
+ new_mode = get_mode_byname(name, volume);
+ if (new_mode) {
+ *mode = new_mode;
+ return(TRUE);
+ } else {
+ return(FALSE);
+ }
+}
+
+#ifdef IOS_PARSER
+
+void mode_reset_vars (parseinfo *csb, void *var)
+{
+ if (csb && csb->mode && csb->mode->reset_vars) {
+ csb->mode->reset_vars(csb, var);
+ }
+}
+
+void set_priv_changed_in_mode (parser_mode *mode, boolean val)
+{
+ mode->priv_changed = val;
+}
+
+boolean mode_http_init (parseinfo *csb)
+{
+ if (csb && csb->mode && csb->mode->http_init) {
+ return(csb->mode->http_init(csb));
+ } else {
+ return(TRUE);
+ }
+
+}
+
+boolean priv_changed_in_mode (parser_mode *mode)
+{
+ return(mode->priv_changed);
+}
+
+
+/*
+ * show_parser_modes
+ *
+ */
+void show_parser_modes (parseinfo *csb)
+{
+ parser_mode *mode;
+
+ mode = parser_modes->qhead;
+ if (mode) {
+ printf("\nParser modes:");
+ printf("\nName Prompt Top "
+ "Alias Privilege\n");
+ while (mode) {
+ printf("%20s%20s0x%8x%8s%8s\n",
+ mode->name, mode->prompt, (uint)mode->top,
+ ((mode->flags & PARSER_MODE_ALIASES) ? "TRUE" : "FALSE"),
+ ((mode->flags & PARSER_MODE_PRIVILEGE) ? "TRUE" : "FALSE"));
+ mode = mode->next;
+ }
+ } else {
+ printf("\nNo parser modes");
+ }
+}
+
+
+
+
+
+/*
+ * get_mode_aliases
+ * Return pointer to aliases in this mode
+ */
+queuetype *get_mode_aliases (parser_mode *mode)
+{
+#ifdef INCLUDE_PARSER_ALIAS
+ if (mode) {
+ return(mode->aliases);
+ } else {
+ return(NULL);
+ }
+#else
+ return( NULL ) ;
+#endif
+
+}
+
+
+/*
+ * get_mode_defaliases
+ * Return pointer to default aliases in this mode
+ */
+queuetype *get_mode_defaliases (parser_mode *mode)
+{
+#ifdef INCLUDE_PARSER_ALIAS
+ if (mode) {
+ return(mode->def_aliases);
+ } else {
+ return(NULL);
+ }
+#else
+ return( NULL );
+#endif
+}
+
+
+/*
+ * get_mode_name
+ * Return name of mode
+ */
+const char *get_mode_name (parser_mode *mode)
+{
+ return(mode->name);
+}
+
+
+
+/*
+ * match_mode
+ * Parser function for matching the MODE macro
+ */
+uint match_mode (parseinfo *csb, int *pi,
+ parser_mode **matched_mode, uint flags)
+{
+ parser_mode *mode;
+ uint num_matches = 0;
+ int i;
+ int matched_pi = *pi;
+ char *word;
+
+ mode = parser_modes->qhead;
+ while (mode) {
+ if (mode->flags & flags) {
+ i = *pi;
+ if (match_partial_keyword(csb, mode->name, &i, mode->help,
+ 0, KEYWORD_WS_OK | KEYWORD_HELP_CHECK,
+ csb->priv)) {
+ *matched_mode = mode;
+ matched_pi = i;
+ num_matches++;
+
+ word = csb->line + csb->line_index;
+ if (strncmp(mode->name, word, strlen(mode->name)) == 0) {
+ /* This was strncasecmp
+ * if (strncasecmp(mode->name, word,
+ * strlen(mode->name)) == 0) {
+ */
+ *pi = matched_pi;
+ return(1);
+ }
+ }
+ }
+ mode = mode->next;
+ }
+ if (num_matches > 1) {
+ *matched_mode = NULL;
+ return(0);
+ }
+ *pi = matched_pi;
+ return(num_matches);
+}
+
+
+/*
+ * nv_mode
+ * Do NV generation for MODE macro
+ */
+void nv_mode (parseinfo *csb, transition *mine, mode_struct * const arg)
+{
+ parser_mode *mode;
+
+ mode = parser_modes->qhead;
+ while (mode) {
+ if (mode->flags & arg->flags) {
+ *CSBVAR(csb, arg->offset, parser_mode *) = mode;
+ nvgen_token(csb, mine, mode->name);
+ }
+ mode = mode->next;
+ }
+}
+
+#ifdef INCLUDE_PARSER_ALIAS
+
+
+/*
+ * display_mode_aliases
+ * Show mode aliases
+ * if (mp != NULL)
+ * show mp mode aliases
+ * else
+ * show all mode aliases
+ */
+void display_mode_aliases (parseinfo *csb, parser_mode *mp)
+{
+ parser_mode *mode;
+
+ mode = parser_modes->qhead;
+ while (mode) {
+ if (!mp || (mp == mode)) {
+ show_mode_aliases(csb, mode->aliases, mode->help);
+ }
+ mode = mode->next;
+ }
+}
+
+#endif
+
+
+#endif
+
diff --git a/data/mnet/Common/cli/src/parser_print.c b/data/mnet/Common/cli/src/parser_print.c
new file mode 100644
index 0000000..6e0e9cc
--- /dev/null
+++ b/data/mnet/Common/cli/src/parser_print.c
@@ -0,0 +1,687 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <taskLib.h>
+#include <tyLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/cli_parser_api.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+#include <../include/parser_sim.h>
+#include <../include/parser.h>
+
+
+typedef enum {
+ HELP_TEXT, HELP_SHORT, HELP_LONG
+} helpType;
+
+#define FIELDS 4
+
+static int line_index; /* Lines printed since the last more?
+ * prompt */
+
+/*
+ * Forward references
+ */
+static int count_lines(save_buf * pbuffer);
+static void find_field_widths(save_buf *pbuffer, short field_width[]);
+static void sort_short_help(char *buffer, int length);
+static int count_final_newlines(save_buf * pbuffer);
+static int logical_line_length(char *s, helpType * ptype);
+static int print_lines(char **, short [], boolean, boolean, long);
+static void sort_lines(char **line_starts, int num);
+static char **record_line_starts(save_buf * pbuf, int line_cnt);
+static void paged_output(char *, int, short[], boolean, boolean);
+
+/* cisco's strncpy puts a '\0' at the end of every destination.
+ * This is at odds with UNIX's strncpy, which doesn't write '\0'
+ * if it reachs the max length.
+ */
+
+static void unix_strncpy (char *dst, char *src, ulong max)
+{
+ while ((max-- > 0) && (*dst++ = *src++));
+}
+
+/*
+ * This function (print_buf) takes a save_buf and prints it on stdout,
+ * after doing various formating functions:
+ *
+ * - Lines of text are seperated by \n characters, but there's no guarentee
+ * that the last line will be TERMINATED by a \n.
+ *
+ * - Fields within lines are seperated by \t characters. Fields are sized
+ * dynamically; a field assumes the size of its largest component (plus
+ * two chars padding). If a line contains no \t characters, it does not
+ * have fields and does not affect any field widths.
+ *
+ * - Automatic wrap-around onto a new line may occur at any space (' ')
+ * character. If the line is wrapped within a field, the new line is
+ * indented to the start of the field.
+ *
+ * - After a screen-full of lines, a "More?" prompt is presented and accepts
+ * single character input to control further output. Both '\r' and 'q' are
+ * supported as in UNIX more.
+ *
+ * - The size of the screen (both length and width) comes from the stdio
+ * tt_soc structure. Here is what is not done:
+ *
+ * - The more function doesn't support backing up in the input, although this
+ * is certainly doable, since everything is in a buffer.
+ *
+ * - The field function doesn't support wrapping any fields but the last one
+ * on a line. Predictable but bizarre things will occur if interior
+ * fields extend past the end of line.
+ *
+ */
+
+int print_buf (save_buf buffer, boolean do_buginf, boolean do_formatting,
+ int *pIndex, long maxCount)
+{
+ /* Dynamically determined field widths */
+ short field_width[FIELDS] =
+ {0, 0, 0, 0};
+ char **line_starts = NULL;
+ char **orig_line_starts = NULL;
+ int final_newlines;
+ int line_cnt = 2;
+ int index = 0;
+
+ int rc = RC_OK;
+
+ /* Start line_cnt at 2 so we always malloc something below ! */
+
+ /* Don't crash if no help buffer yet. */
+ if (buffer.buf == NULL) {
+ return ( 0 );
+ }
+
+ /*
+ * We really need to ignore \n\n's at the end of the buffer. So we'll
+ * count them and treat them specially. For now, we just won't output
+ * any of the final \n's !
+ */
+ final_newlines = count_final_newlines(&buffer);
+
+ line_cnt=count_lines(&buffer);
+
+ /*
+ * The variable line_cnt is now the number of lines seen. There should
+ * be one newline starting each line, plus maybe a newline at the end.
+ * We now need to allocate an array of pointers and record the
+ * beginning of each useful line in it (i.e. we don't need to
+ * alphabetize repeated newlines).
+ *
+ * If we want to be hyper about memory, we should maybe make sure that
+ * there's no interruption between line_starts allocation and freeing.
+ *
+ * NOTE: record_line_starts sorts TABBED lines, so you have to
+ * find field widths *after* calling it !
+ *
+ */
+
+ line_starts = record_line_starts(&buffer, line_cnt);
+
+ find_field_widths(&buffer, field_width);
+
+ /* Print the paused output to screen. */
+ line_index = 0;
+
+ if (do_formatting) {
+ /* automore_enable(NULL);*/
+ }
+ if ( !pIndex )
+ index = 0;
+ else
+ index = *pIndex;
+
+ if ((index == 0) && (buffer.buf[0] != '\n')) {
+ /* Make sure there is a leading newline */
+ printf("\n");
+ }
+
+ if (line_starts == NULL) {
+ /* Couldn't malloc, just dump it all out as is ! */
+ paged_output(buffer.buf, buffer.used, field_width,
+ do_buginf, do_formatting);
+ } else {
+ orig_line_starts = line_starts;
+ line_starts = line_starts + index;
+ rc = print_lines(line_starts, field_width, do_buginf, do_formatting,
+ maxCount);
+ PARSERfree( orig_line_starts );
+ line_starts = NULL;
+ }
+
+ if (do_formatting) {
+ /* automore_disable();*/
+ }
+
+ return ( rc );
+
+}
+
+static int count_lines (save_buf *pbuffer)
+{
+ int line_cnt = 0;
+ int buffer_index;
+
+ for (buffer_index = 0; buffer_index < pbuffer->used; buffer_index++) {
+ if (pbuffer->buf[buffer_index]=='\n') {
+ line_cnt++;
+ }
+ }
+
+ /* Add one for final line: */
+ return(line_cnt+1);
+}
+
+static void find_field_widths (save_buf *pbuffer, short field_width[])
+{
+ int char_index = 0;
+ int field_index = 0;
+ int buffer_index;
+
+ /*
+ * Run through the buffer once to figure out field widths. Perhaps it
+ * would be best to optionally disable this feature, for printing
+ * large things like configuration files that won't use fields anyway.
+ *
+ * To avoid lots of looping, we start by counting the widths of each
+ * field into field_width. After we've gone through the buffer, we
+ * insert padding (2 chars per field) and sum up the relative field
+ * widths into absolute tab positions.
+ *
+ * To keep things consistent, we use one set of field widths for printing
+ * the entire print buffer.
+ *
+ */
+
+ for (buffer_index = 0; buffer_index < pbuffer->used; buffer_index++) {
+ switch (pbuffer->buf[buffer_index]) {
+ case '\n':
+ if (field_index && field_width[field_index] < char_index) {
+ field_width[field_index] = char_index;
+ }
+ char_index = 0;
+ field_index = 0;
+ /* line_cnt++; */
+ /*
+ * This will overestimate if we later ignore \n\n sequences or
+ * print in chunks, but that's ok, can be dealt with if it
+ * becomes a problem.
+ */
+ break;
+
+ case '\t':
+ if (field_width[field_index] < char_index) {
+ field_width[field_index] = char_index;
+ }
+ char_index = 0;
+ if (field_index < (FIELDS-1)) {
+ field_index++;
+ } else {
+ field_index = 0;
+ /*
+ * Next keyword hangs off end of line and we don't care
+ * what the field width is, so skip it.
+ */
+ buffer_index++;
+ while (pbuffer->buf[buffer_index] &&
+ (pbuffer->buf[buffer_index] != '\n') &&
+ (pbuffer->buf[buffer_index] != '\t')) {
+ buffer_index++;
+ }
+ }
+ break;
+
+ default:
+ char_index++;
+ break;
+ }
+ }
+
+ if (field_index && field_width[field_index] < char_index) {
+ field_width[field_index] = char_index;
+ }
+
+ /*
+ * Adjust field widths to be starting positions vice widths.
+ */
+ field_width[0] += 2;
+ for (field_index = 1; field_index < FIELDS; field_index++) {
+ field_width[field_index] += field_width[field_index - 1] + 2;
+ }
+}
+
+static int count_final_newlines (save_buf * pbuffer)
+{
+ int chars_to_use;
+ int buffer_index;
+ int final_newlines = 0;
+
+ buffer_index = pbuffer->used - 1;
+
+ while ((buffer_index >= 0) && (pbuffer->buf[buffer_index] == '\n')) {
+ buffer_index--;
+ }
+ chars_to_use = buffer_index + 1;
+ pbuffer->buf[chars_to_use] = '\0';
+ final_newlines = pbuffer->used - chars_to_use;
+ pbuffer->used = chars_to_use;
+ return(final_newlines); /* number of final newlines */
+}
+
+
+static void paged_output (char *buf, int used, short field_width[],
+ boolean do_buginf, boolean do_formatting)
+{
+ int char_index = 0;
+ int field_index = 0;
+ int buffer_index;
+ int word_len;
+ int (* output)(const char *, ...);
+
+ output = printf;
+
+ /*
+ * Now we run through the buffer "for real".
+ */
+ for (buffer_index = 0; buffer_index < used; buffer_index++) {
+ switch (buf[buffer_index]) {
+ case '\t':
+ if (do_formatting && (field_index < FIELDS)) {
+ for (; char_index < field_width[field_index]; char_index++) {
+ (*output)(" ");
+ }
+ field_index++;
+ break;
+ }
+ /* Otherwise, fall through to newline */
+ case '\n':
+ (*output)("\n");
+ char_index = 0;
+ field_index = 0;
+ line_index++;
+ break;
+ case ' ':
+ for (word_len = 0; buffer_index + word_len + 1 < used &&
+ !isspace(buf[buffer_index + word_len + 1]);
+ word_len++) {
+ ;
+ }
+ if ((! SCREEN_WIDTH) ||
+ ((char_index + word_len + 1) < SCREEN_WIDTH) ||
+ !do_formatting) {
+ (*output)(" ");
+ char_index++;
+ } else {
+ (*output)("\n");
+ char_index = 0;
+ line_index++;
+ if (field_index) {
+ for (; char_index < field_width[field_index - 1];
+ char_index++) {
+ (*output)(" ");
+ }
+ }
+ }
+ break;
+ default:
+ (*output)("%c", buf[buffer_index]);
+ char_index++;
+ break;
+ }
+ }
+ if (char_index) {
+ (*output)("\n");
+ }
+
+}
+
+/*
+ * Sort groups of lines. A group is a set of lines of the same type,
+ * i.e. ones from short help, long help, or just text which needs
+ * to be displayed. Only help strings should be sorted before ouput.
+ */
+static char **record_line_starts (save_buf * pbuf, int line_cnt)
+{
+ char **line_starts = NULL;
+ int current_line = 0;
+ int buffer_index = 0;
+ helpType type = HELP_TEXT;
+ helpType prevtype = HELP_TEXT;
+ int len;
+ int scan_line = 0;
+
+ line_cnt++;
+ /* reserve room for NULL marker at end, too */
+
+ line_starts = (char **)PARSERmalloc(sizeof(char *) * line_cnt);
+
+ if (line_starts == NULL) {
+ /*
+ * If this is NULL (malloc failed), we'll just have to do without
+ * alphabeticizing the output !
+ */
+ return(NULL);
+ }
+
+ buffer_index = 0;
+ while ((buffer_index < pbuf->used)
+ && (pbuf->buf[buffer_index] != '\0')) {
+
+ line_starts[scan_line] = pbuf->buf + buffer_index;
+ prevtype = type;
+ len = logical_line_length(line_starts[scan_line], &type);
+
+ if ((prevtype == HELP_LONG) && (type != prevtype)) {
+ /* Got long chunk that needs sorting. */
+ sort_lines(line_starts + current_line, scan_line - current_line);
+ /* Start recording the next chunk. */
+ current_line = scan_line;
+ }
+
+ scan_line++;
+ buffer_index += len;
+
+ if (type == HELP_SHORT) {
+ /* Each short help line needs sorting by itself. */
+ sort_short_help(line_starts[current_line], len);
+ /* Don't maintain a "chunk". */
+ current_line = scan_line;
+ }
+ else if (type == HELP_TEXT) {
+ /* Don't maintain a "chunk". */
+ current_line = scan_line;
+ }
+ }
+
+ /* Sort final chunk. */
+ if (type == HELP_LONG) {
+ sort_lines(line_starts + current_line, scan_line - current_line);
+ current_line = scan_line;
+ }
+
+ line_starts[current_line++] = NULL; /* mark end of array */
+ return(line_starts);
+}
+
+/*
+ * Perform bubble sort on <num> logical lines.
+ *
+ * ASSUMES: line_starts is not NULL.
+ *
+ */
+static void sort_lines (char **line_starts, int num)
+{
+ int i;
+ int j;
+ char *s;
+
+ for (i = 0; i < num; i++) {
+ for (j = i + 1; j < num; j++) {
+ /*
+ * Note: we don't care about stuff beyond logical line length,
+ * because if we swap two lines based on what's way out there,
+ * it won't show. So we don't need strncmp() here.
+ */
+ if (strcmp(line_starts[i], line_starts[j]) > 0) {
+ s = line_starts[i];
+ line_starts[i] = line_starts[j];
+ line_starts[j] = s;
+ }
+ }
+ }
+}
+
+static char *find_http_level_end (char * str)
+{
+ char *tmp;
+
+ tmp = strstr(str, "/level/");
+ if (tmp) {
+ tmp += 7;
+ while (isdigit(*tmp)) {
+ tmp++;
+ }
+ return(tmp);
+ } else {
+ return(str);
+ }
+}
+
+static void sort_short_help (char *buffer, int length)
+{
+ char *spare;
+ int i;
+ int ctab = 0;
+ struct tabstruct {
+ char *field;
+ int length;
+ };
+ struct tabstruct *tabfields = NULL;
+ char *str1;
+ char *str2;
+
+ /* allocate room for a temporary copy (and safety margin) */
+ spare = (char *)PARSERmalloc((length + 2));
+ if (spare == NULL) {
+ /*
+ * If we can't allocate this paltry amount of memory, then we'll
+ * just live without sorting.
+ */
+ return;
+ }
+
+ {
+ int tabs = 1;
+
+ /*
+ * Count tabs and allocate room for pointers to fields ending in
+ * tabs.
+ */
+ for (i = 1; i < length; i++) {
+ if (buffer[i - 1] == '\t') {
+ tabs++;
+ }
+ }
+
+ tabfields = (struct tabstruct *)
+ PARSERmalloc((sizeof(struct tabstruct) * tabs));
+
+ if (tabfields == NULL) {
+ /* Oh, well. Gotta do without a sort. */
+ PARSERfree(spare);
+ spare = NULL;
+ return;
+ }
+ }
+
+ /*
+ * Avoid storing a pointer to the '\n' at the end of this line, if
+ * there is one.
+ */
+ if ((length > 0) && (buffer[length - 1] == '\n')) {
+ length--;
+ }
+
+ /* Store pointers to tabbed fields. */
+ {
+ int last = 0;
+
+ tabfields[ctab++].field = buffer;
+
+ for (i = 1; i < length; i++) {
+ if (buffer[i - 1] == '\t') {
+ tabfields[ctab].field = buffer + i;
+ tabfields[ctab - 1].length = i - last;
+ last = i;
+ ctab++;
+ }
+ }
+ tabfields[ctab - 1].length = i - last;
+ }
+
+ {
+ int j;
+ struct tabstruct tmp;
+
+ /* Sort them. */
+ for (i = 0; i < ctab; i++) {
+ for (j = i + 1; j < ctab; j++) {
+ if (strstr(tabfields[i].field, "/level/")) {
+ str1 = find_http_level_end(tabfields[i].field);
+ str2 = find_http_level_end(tabfields[j].field);
+ } else {
+ str1 = tabfields[i].field;
+ str2 = tabfields[j].field;
+ }
+ if (strcmp(str1, str2) > 0) {
+ tmp = tabfields[i];
+ tabfields[i] = tabfields[j];
+ tabfields[j] = tmp;
+ }
+ }
+ }
+ }
+
+ {
+ int len;
+ char *s = spare;
+
+ /* Output to spare buffer. */
+ for (i = 0; i < ctab; i++) {
+ len = tabfields[i].length;
+ unix_strncpy(s, tabfields[i].field, len);
+ s += len;
+ }
+
+ /*
+ * Now copy back to buffer (but don't put \0 at end -- length
+ * should be unaltered.
+ */
+ spare[length] = '\0';
+ s = spare;
+ while (*s != '\0') {
+ *buffer++ = *s++;
+ }
+ }
+
+ PARSERfree(tabfields);
+ PARSERfree(spare);
+ tabfields = NULL;
+ spare = NULL;
+}
+
+/*
+ * ASSUMES: line_starts is not NULL, with end entry marked by NULL.
+ *
+ */
+static int print_lines (char **line_starts, short field_width[],
+ boolean do_buginf, boolean do_formatting, long maxCount)
+{
+ int i = 0;
+ char *s;
+ helpType junk;
+
+ while (line_starts[i] != NULL) {
+ s = line_starts[i];
+ if ( (maxCount != 0) && (i >= maxCount) )
+ return( RC_MORE );
+ i++;
+ paged_output(s, logical_line_length(s, &junk),
+ field_width, do_buginf, do_formatting);
+ }
+
+ return ( RC_OK );
+}
+
+/*
+ * Figure out the length of the logical line in s. Also figure out what
+ * type the line is.
+ *
+ * ASSUMES: buffer end marked with '\0'.
+ *
+ */
+static int logical_line_length (char *s, helpType * ptype)
+{
+ int i;
+ boolean looking = FALSE;
+
+ *ptype = HELP_TEXT;
+
+ for (i = 0; s[i] != '\0'; i++) {
+ switch (s[i]) {
+ case '\n':
+ looking = TRUE;
+ if ((i > 0) && (s[i - 1] == '\t')) {
+ /* \t\n is the sign of a SHORT help line. */
+ *ptype = HELP_SHORT;
+ }
+ break;
+ case '\t':
+ /* \n\t is a continuation line, can only be type LONG */
+ *ptype = HELP_LONG;
+ looking = FALSE;
+ break;
+ default:
+ if (looking) {
+ return(i);
+ }
+ break;
+ }
+ }
+ if ((i > 0) && (s[i - 1] == '\t')) {
+ /* \t\0 at the end is also a short help line. */
+ *ptype = HELP_SHORT;
+ }
+ /* At end of buffer: */
+ return(i);
+}
+
+/* print_caret - prints a caret at the specified location */
+
+char caret[]="^";
+void print_caret (register int offset)
+{
+ printf("%*.1s", (1 + offset), caret);
+}
+#if 0
+/*
+ * RAMS : commented this out as there is a duplicate definition in parser_printf.cpp
+ */
+int doprnt (char *cp, tt_soc *tty, const char *fmt, va_list argp,
+ boolean do_precision)
+{
+
+
+ int nbytes = 0;
+
+ if ( cp != NULL ) {
+ if ( (nbytes = vsprintf( cp, fmt, argp ) ) < 0 ) {
+ nbytes = 0;
+ }
+ } else if (parserNullFp != NULL ) {
+ if ( (nbytes = vfprintf( parserNullFp, fmt, argp ) ) < 0 ) {
+ nbytes = 0;
+ } else {
+ fflush(parserNullFp);
+ ioctl(fileno(parserNullFp), FIOFLUSH, 0 );
+ }
+ }
+
+ return(nbytes);
+}
+#endif
diff --git a/data/mnet/Common/cli/src/parser_printf.c b/data/mnet/Common/cli/src/parser_printf.c
new file mode 100644
index 0000000..8feca95
--- /dev/null
+++ b/data/mnet/Common/cli/src/parser_printf.c
@@ -0,0 +1,981 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <taskLib.h>
+#include <tyLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/cli_parser_api.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+
+
+
+enum {
+ AUTOMORE_ABORT,
+ AUTOMORE_LINE,
+ AUTOMORE_PAGE,
+};
+
+#ifdef NOTHING
+
+/*
+ * automore_more
+ * Asks the question " --More-- ", and returns:
+ * 0 if user didn't want more output
+ * 1 if user wants one more line (input was <cr>)
+ * 2 if user wants another page (input was a SPACE, "Y", or "y".
+ * Assumes TRUE always if screen length is zero.
+ */
+
+static inline int
+automore_more (void)
+{
+ char c;
+
+ if (!stdio)
+ return(AUTOMORE_ABORT);
+
+ if (stdio->tty_length == 0)
+ return(AUTOMORE_PAGE);
+ LOG_SYNC_REPRINT_REG(stdio,"\n --More-- ");
+ while (TRUE) {
+ printf("\n --More-- ");
+ flush();
+ c = getcwait(stdio);
+ c &= 0177;
+ /* \-\-\e\r\o\M\-\-\--More-- \ \ \ \ \ \ \ \ \ */
+ printf("\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b");
+ switch (c) {
+ case '?':
+ printf(
+ "Press RETURN for another line, SPACE for another"
+ " page, anything else to quit"
+ );
+ break;
+ case 040: /* SPACE, Y, or y */
+ case 'Y':
+ case 'y':
+ LOG_SYNC_REPRINT_END(stdio);
+ return(AUTOMORE_PAGE);
+ case '\r': /* return */
+ LOG_SYNC_REPRINT_END(stdio);
+ return(AUTOMORE_LINE);
+ default: /* Anything else */
+ LOG_SYNC_REPRINT_END(stdio);
+ return(AUTOMORE_ABORT);
+ }
+}
+}
+
+#endif
+
+/*
+ * doprintc
+ * Handle a single character for _doprnt
+ */
+
+void doprintc (
+ char **cp,
+ tt_soc *tty,
+ char ch)
+{
+ if (*cp) { /* if writing to a string */
+ *(*cp)++ = ch; /* don't do any formatting */
+ return;
+ }
+
+ if (tty == NULLTTY) { /* If not really doing I/O */
+ return; /* just get out */
+ }
+
+ putc(ch, stdout);
+
+#ifdef NOTHING
+
+ /*
+ * Allow console output to be displayed directly to the
+ * console before the system is up.
+ */
+ if ((!(systeminit_flag || system_configured))
+ || tty == CONTTY) {
+ console_putc(ch & 0x7f);
+ return;
+ }
+ ch &= tty->tty_execmask; /* mask inappropriate bits */
+ if (tty->statbits & LASTWASCR) { /* was the last one a CR? */
+ tty->statbits &= ~LASTWASCR; /* yes, clear flag */
+ if (ch == 012) /* flush char if it is a LF */
+ return; /* we already printed it */
+ }
+
+ /*
+ * If the automore flush flag is set, and automore is enabled, and it
+ * isn't being supressed, don't do any output.
+ */
+
+ if (tty->automore_flush && tty->automore_enabled && !tty->automore_supress)
+ return;
+
+ if ((uchar)ch < 040) {
+ switch (ch) {
+ case 07: /* pass bell, tab, backspace */
+ case 011:
+ case 010:
+ break;
+ case 015:
+ tty->statbits |= LASTWASCR; /* if next is LF, flush it */
+ case 012:
+ if (tty->automore_enabled && !tty->automore_supress &&
+ tty->tty_length) {
+ tty->automore_count++;
+ if ((tty->automore_count >= (tty->tty_length-1)) &&
+ (tty->automore_count > 1)) {
+
+ /*
+ * We are at the end of the page. Supress recursive
+ * processing and set the flush flag based on
+ * whether they want more output or not. Reset
+ * the count and then recursively print out the
+ * header.
+ *
+ * We fall through to print out the original
+ * newline from the input string. This works
+ * because all strings, including the header,
+ * follow the convention of a leading newline.
+ */
+
+ tty->automore_supress++;
+ switch (automore_more()) {
+ case AUTOMORE_LINE: /* one more line */
+ /* subtraction values include the offset
+ * needed for the above test against
+ * tty->tty_length-1.
+ */
+ tty->automore_count = tty->tty_length - 2;
+ break;
+ case AUTOMORE_PAGE: /* one more page */
+ if (tty->automore_header) {
+ printf("%s", tty->automore_header);
+ /*
+ * Output the CR we just swallowed
+ */
+ printc('\n');
+ tty->automore_count = 1;
+ } else {
+ tty->automore_count = 0;
+ }
+ break;
+ default:
+ case AUTOMORE_ABORT: /* abort */
+ tty->automore_count = 0;
+ tty->automore_flush = TRUE;
+ break;
+ }
+ tty->automore_supress--;
+ /*
+ * Don't output LF or CR since we've
+ * cleared the current line.
+ */
+ return;
+ }
+ } else {
+ /*
+ * No paging, so allow the process to suspend
+ * if it's generating reams of output.
+ */
+ process_may_suspend();
+ }
+ putc(tty,015); /* Output a CR */
+ ch = 012; /* And finish with a LF */
+ break;
+ case '\033':
+ if (tty->tty_international) {
+ break;
+ }
+ /* FALL THROUGH */
+ default: /* all else to arrow format */
+ putc(tty,'^');
+ ch += '@';
+ break;
+ }
+ }
+ putc(tty,ch);
+
+
+#endif
+
+}
+
+
+#ifdef NOTHING
+
+/*
+ * printf - cisco convention
+ * Print a format string on standard output
+ */
+
+int printf (const char *fmt, ...)
+{
+ va_list ap;
+
+ if (stdio) {
+ va_start(ap, fmt);
+ return(_doprnt(NULL, stdio, fmt, ap, FALSE));
+ va_end(ap);
+ } else {
+ errmsg(&msgsym(BADPRINT,SYS), "printf");
+ return(0);
+ }
+}
+
+/*
+ * vprintf - cisco convention
+ * Print a format string on standard output using va_args
+ */
+int vprintf (const char *fmt, va_list ap)
+{
+ if (stdio) {
+ return(_doprnt(NULL, stdio, fmt, ap, FALSE));
+ } else {
+ errmsg(&msgsym(BADPRINT,SYS), "vprintf");
+ return(0);
+ }
+}
+
+/*
+ * printc
+ * Print a character on the primary output
+ */
+
+void printc (char ch)
+{
+ char *n = NULL;
+
+ if (stdio) {
+ doprintc(&n, stdio, ch);
+ } else {
+ errmsg(&msgsym(BADPRINT,SYS), "printc");
+ }
+}
+
+/*
+ * ttyprintc
+ * Print a character on the specified output
+ */
+
+void ttyprintc (tt_soc *tty, char ch)
+{
+ char *n = NULL;
+
+ doprintc(&n, tty, ch);
+}
+
+/*
+ * ttyprintf - cisco convention
+ * printf to other than the standard terminal
+ */
+
+int ttyprintf (tt_soc *tty, const char *fmt, ...)
+{
+ va_list ap;
+ int i;
+
+ va_start(ap, fmt);
+ if (tty != CONTTY && tty != NULLTTY) {
+ tty->automore_supress++;
+ i = _doprnt(NULL, tty, fmt, ap, FALSE);
+ tty->automore_supress--;
+ return(i);
+ } else
+ return(_doprnt(NULL, tty, fmt, ap, FALSE));
+ va_end(ap);
+}
+
+/*
+ * _ttyprintf - like fprintf, only no automore supression
+ */
+
+int _ttyprintf (tt_soc *tty, char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ return(_doprnt(NULL, tty, fmt, ap, FALSE));
+ va_end(ap);
+}
+
+/*
+ * sprintf - cisco convention
+ * String version of printf.
+ */
+
+int sprintf (char *cp, const char *fmt, ...)
+{
+ va_list ap;
+ int count;
+
+ va_start(ap, fmt);
+ count = _doprnt(cp, NULL, fmt, ap, FALSE);
+ va_end(ap);
+ cp[count] = '\0';
+ return(count);
+}
+
+/*
+ * vsprintf - cisco convention
+ * String version of printf using varargs as argument
+ */
+int vsprintf (char *cp, const char *fmt, va_list ap)
+{
+ int count;
+
+ count = _doprnt(cp, NULL, fmt, ap, FALSE);
+ cp[count] = '\0';
+ return(count);
+}
+
+/*
+ * ansi_sprintf - ANSI convention
+ */
+
+int ansi_sprintf (char *cp, const char *fmt, ...)
+{
+ va_list ap;
+ int count;
+
+ va_start(ap, fmt);
+ count = _doprnt(cp, NULL, fmt, ap, TRUE);
+ va_end(ap);
+ cp[count] = '\0';
+ return (count);
+}
+
+
+/*
+ * console_message
+ * Print a console message using the bootstrap monitor routines
+ */
+
+void console_message (const char *str)
+{
+ /* emt_call() is used here instead of console_putc() so that
+ * it can be called from sched_cputype() when running on the
+ * wrong hardware.
+ */
+ while (*str)
+ emt_call(EMT_PUTCHAR, *str++);
+}
+
+/*
+ * flush
+ * flush pending output to stdio
+ */
+
+void flush (void)
+{
+ if (stdio)
+ (void)startoutput(stdio);
+}
+
+/*
+ * tt_flush
+ * Flush pending output to given tt_soc *
+ * Used to be called fflush, conflicting with UNIX stdio.
+ */
+
+void ttyflush (tt_soc *tty)
+{
+ if (tty)
+ (void)startoutput(tty);
+}
+
+
+#endif
+
+/*
+ * _doprnt - master printf routine.
+ * The conversions %o, %x, %d, %u, %s, %c, and %% are implemented.
+ * The -, 0, *, and # options are supported for numbers only.
+ * The <width> option is supported for numbers, strings, and characters.
+ * The number of characters printed is returned.
+ *
+ * E/e prints a dotted 48 bit Ethernet address. Takes a string pointer.
+ *
+ * T/t prints a terminal line number in octal or decimal. Integer arg.
+ *
+ */
+
+int doprnt (char *cp, tt_soc *tty, const char *fmt, va_list argp,
+ boolean do_precision)
+{
+ uchar c, *q;
+ int radix, d, length;
+ int charcount;
+ int digitcount;
+ ulong n;
+ uchar digits[25];
+ int hash,rjust,width,size,temp,plus,precision;
+ char fill;
+ /* ulong host; */
+ boolean spaces;
+ boolean is_negative;
+ ulonglong nn = 0;
+
+ /*
+ * Protect against being called incorrectly from interrupt level.
+ * Also, if we were passed a null terminal pointer and string
+ * pointer, figure that stdio hasn't been set up yet and do the I/O
+ * to the console
+ */
+
+#ifdef NOTHING
+
+ if (tty == NULL) {
+ if (cp == NULL) {
+ if (get_interrupt_level() != 0) {
+ errmsg(&msgsym(INTPRINT,SYS));
+ return(0);
+ }
+ tty = console;
+ }
+ } else if ((tty != CONTTY) && systeminit_flag) {
+ if (get_interrupt_level() != 0) {
+ errmsg(&msgsym(INTPRINT,SYS));
+ return(0);
+ }
+ }
+
+#endif
+
+ nn = 0;
+ charcount = 0; /* nothing printed yet */
+ while ((c = *fmt++)) { /* work until end of string */
+ if (c != '%') {
+ charcount++;
+ doprintc(&cp,tty,c); /* output normal characters */
+ } else {
+ width = -1; /* default width is unspecified */
+ length = 0; /* no length yet */
+ fill = ' '; /* default fill is space */
+ rjust = 0; /* default is left justified */
+ hash = 0; /* default is no leading 0 or 0x */
+ size = 0; /* default is that args are short */
+ plus = 0; /* default is no plus sign */
+ precision = -1; /* no precision yet */
+ if (*fmt == '-') {
+ rjust++; /* want right justified */
+ fmt++;
+ }
+ if (*fmt == '+') {
+ plus++; /* add a plus if positive integer */
+ fmt++;
+ }
+ if (*fmt == '0') {
+ fill = '0'; /* set fill char to '0' */
+ fmt++;
+ }
+ if (*fmt == '#') {
+ hash++; /* want leading 0 or 0x */
+ fmt++;
+ }
+ if (*fmt == '*') { /* look to args for width */
+ width = va_arg(argp, int);
+ fmt++;
+ } else /* width possibly specified */
+ while ((*fmt >= '0') && (*fmt <= '9')) {
+ if (width == -1)
+ width = 0;
+ width = width*10 + (*fmt++ - '0');
+ }
+
+ if (do_precision) { /* Check for precision */
+ if (*fmt == '.') { /* precision possibly specified */
+ fmt++;
+ precision = 0;
+ if (*fmt == '*') { /* look to args for precision */
+ precision = va_arg(argp, int);
+ if (precision < 0) /* check for nonsense precision */
+ precision = 0;
+ fmt++;
+ } else
+ while ((*fmt >= '0') && (*fmt <= '9'))
+ precision = precision*10 + (*fmt++ - '0');
+ }
+ } else
+ precision = width; /* cisco convention derives */
+ /* precision from width */
+
+ if (*fmt == 'l') { /* use Longs instead of shorts */
+ size++;
+ fmt++;
+ }
+ if (*fmt == 'l') { /* use Long Longs instead of longs */
+ size++;
+ fmt++;
+ }
+
+ if (!*fmt)
+ break; /* Check for trailing nulls - bad format */
+
+ switch (*fmt++) { /* get char after the %, switch */
+
+#ifdef NOTHING
+
+ case 'B': /* hexadecimal or ethernet */
+ case 'b':
+ temp = va_arg(argp, int);
+ if (temp == APOLLO_TYPE) {
+ q = va_arg(argp, uchar *);
+ bcopy(&q[2], (char *)&host, 4);
+ if (cp) {
+ length = sprintf(cp, "%x", host);
+ cp += length;
+ } else
+ length = _ttyprintf(tty,"%x", host);
+ charcount += length;
+ break;
+ }
+ /* Else fall thru to Ethernet style address */
+ case 'e': /* print an Ethernet address */
+ case 'E': /* 64-bit Ethernet style SMDS address */
+ q = va_arg(argp, uchar *);
+ for (d = 0; d <= 2; d++) {
+ doprintc(&cp,tty,tohexchar((*q)>>4));
+ doprintc(&cp,tty,tohexchar(*q++));
+ doprintc(&cp,tty,tohexchar((*q)>>4));
+ doprintc(&cp,tty,tohexchar(*q++));
+ if (d < 2)
+ doprintc(&cp,tty,'.');
+ }
+ charcount += 14;
+ /*
+ * Do E.164 style by adding 16 more bits.
+ */
+ if (*(char *)(fmt-1) != 'E' || *q == 0xff) {
+ break;
+ }
+ doprintc(&cp,tty,'.');
+ doprintc(&cp,tty,tohexchar((*q)>>4));
+ doprintc(&cp,tty,tohexchar(*q++));
+ doprintc(&cp,tty,tohexchar((*q)>>4));
+ doprintc(&cp,tty,tohexchar(*q++));
+ charcount += 5;
+ break;
+
+ case 't': /* terminal line number */
+ if (decimaltty_enable)
+ goto do_decimal;
+ else
+ goto do_octal;
+ break;
+
+#endif
+
+ case 'o': /* octal */
+ case 'O':
+ /*do_octal:*/ radix = 8;
+ if (precision == -1)
+ precision = 1;
+ if (size > 1) {
+ nn = va_arg(argp, ulonglong);
+ n = (nn != 0);
+ } else if (size) {
+ n = va_arg(argp, ulong);
+ } else {
+ n = va_arg(argp, uint);
+ }
+ if (hash && (n > 0)) {
+ doprintc(&cp,tty,'0');
+ length++;
+ charcount++;
+ }
+ goto compute;
+
+#ifdef NOTHING
+
+ case 'q': /* hexadecimal or decimal */
+ case 'Q':
+ temp = va_arg(argp, int);
+ if ((temp == XNS_TYPE) || (temp == UBXNS_TYPE))
+ goto do_unsigned;
+
+ /* else fall thru to hex */
+
+ case 'x': /* hexadecimal */
+ case 'X':
+ radix = 16;
+ if (precision == -1)
+ precision = 1;
+ if (size > 1) {
+ nn = va_arg(argp, ulonglong);
+ n = (nn != 0);
+ } else if (size) {
+ n = va_arg(argp, ulong);
+ } else {
+ n = va_arg(argp, uint);
+ }
+ if (hash) {
+ doprintc(&cp,tty,'0');
+ doprintc(&cp,tty,'x');
+ length += 2;
+ charcount += 2;
+ }
+ goto compute;
+#endif
+
+
+ case 'u': /* unsigned decimal */
+ case 'U':
+ /*do_unsigned:*/ radix = 10;
+ if (precision == -1)
+ precision = 1;
+ if (size > 1) {
+ nn = va_arg(argp, ulonglong);
+ n = (nn != 0);
+ } else if (size) {
+ n = va_arg(argp, ulong);
+ } else {
+ n = va_arg(argp, uint);
+ }
+ goto compute;
+
+ case 'd': /* signed decimal */
+ case 'D':
+ /* do_decimal: */ radix = 10;
+ if (precision == -1)
+ precision = 1;
+ if (size > 1) {
+ nn = va_arg(argp, longlong);
+ n = (nn != 0);
+ is_negative = ((longlong)nn < 0);
+ } else if (size) {
+ n = va_arg(argp, long);
+ is_negative = ((long)n < 0);
+ } else {
+ n = va_arg(argp, int);
+ /*
+ * For backward compatibility reasons, this test for a
+ * negative number is based upon a 'long', not an 'int'.
+ */
+ is_negative = ((long)n < 0);
+ }
+ if (is_negative) {
+ doprintc(&cp, tty, '-');
+ length++; charcount++;
+ n = -n;
+ } else if (plus) {
+ doprintc(&cp, tty, '+');
+ length++; charcount++;
+ }
+ compute:
+ digitcount = 0;
+ if (n == 0) {
+ q = &digits[0];
+ if (!do_precision) {
+ *q++ = '0';
+ length++;
+ }
+ } else if (nn != 0) {
+ /*
+ * Do not attempt to collapse this into the following case for
+ * 32 bit numbers. All you will accomplish is to use 64bit
+ * arithmetic for all numbers, which is slower in general, but
+ * is much slower for division.
+ */
+ printf("Printing Decimal....???parser_printf.c\n");
+#ifdef MOD_ERRORS
+ for (q = &digits[0]; nn != 0; nn = nn / radix) {
+ d = nn % radix; length++; digitcount++;
+ *q++ = d + (d < 10 ? '0' : '7');
+ }
+#endif
+
+ } else
+ for (q = &digits[0]; n != 0; n = n / radix) {
+ d = n % radix; length++; digitcount++;
+ *q++ = d + (d < 10 ? '0' : '7');
+ }
+ if (do_precision && (precision > 0)
+ && (digitcount < precision))
+ for (d = digitcount; d < precision; d++) {
+ *q++ = '0';
+ length++;
+ }
+ q--; /* back up the pointer a bit */
+ if ((rjust || fill == '0') && width != -1 && (length < width))
+ for (d = 0; d < (width - length); d++) {
+ doprintc(&cp,tty,fill); /* leading fill */
+ charcount++;
+ }
+ while (q >= &digits[0]) {
+ doprintc(&cp,tty, *q--);
+ charcount++;
+ }
+ if (!rjust && fill != '0' && width != -1 && (length < width))
+ for (d = 0; d < (width-length); d++) {
+ doprintc(&cp,tty,' '); /* trailing fill - spaces*/
+ charcount++;
+ }
+ break;
+
+ case 'c': /* character */
+ if (rjust && width != -1)
+ for (d = 0; d < width-1; d++) {
+ doprintc(&cp,tty,' '); /* leading fill - spaces */
+ charcount++;
+ }
+ temp = va_arg(argp, int);
+ doprintc(&cp,tty,temp);
+ charcount++;
+ if (!rjust && width != -1)
+ for (d = 0; d < width-1; d++) {
+ doprintc(&cp,tty,' '); /* trailing fill - spaces*/
+ charcount++;
+ }
+ break;
+
+ case 's': /* string */
+ case 'S': /* string parsed by STRING macro */
+ q = va_arg(argp, uchar *);
+ if (q == NULL) /* insure proper formatting */
+ q = "";
+ spaces = FALSE; /* No spaces */
+ temp = (int) q; /* stash copy of pointer */
+ while (*q) {
+ if (*(fmt-1) == 'S') {
+ if (*q == ' ') {
+ spaces = TRUE; /* Contains spaces */
+ } else {
+ if (*q == '"') {
+ length++; /* Escape quotes */
+ } else {
+ if ((*q >= 127) ||
+ (*q == '\r') ||
+ (*q == '\n')) {
+ length += 3;/*Number escape sequence */
+ }
+ }
+ }
+ }
+ ++q;
+ ++length; /* figure its length */
+ }
+ if (spaces) {
+ length += 2;
+ }
+ if (rjust && (width != -1) && (length < width)) {
+ for (d = 0; d < (width - length); d++) {
+ doprintc(&cp,tty,fill); /* leading fill */
+ charcount++;
+ }
+ }
+ if (spaces) {
+ doprintc(&cp, tty, '"');
+ charcount++;
+ }
+ q = (uchar *) temp; /* get pointer again */
+ while (*q != 0) {
+ if ((precision != -1) &&
+ ((int)(q - (uchar *)temp) >= precision)) {
+ break;
+ }
+ if (*(fmt-1) == 'S') {
+ if ((*q < 127) && (*q != '\r') && (*q != '\n')) {
+ if (*q == '"') {
+ doprintc(&cp, tty, '\\');
+ charcount++;
+ }
+ doprintc(&cp,tty, *q);
+ charcount++;
+ } else {
+ doprintc(&cp, tty, '\\');
+ doprintc(&cp, tty, 'x');
+ doprintc(&cp, tty, (((*q/16) < 0x0A) ?
+ ((*q/16) + '0') :
+ ((*q/16) + 'A' - 0x0A)));
+ doprintc(&cp, tty, (((*q%16) < 0x0A) ?
+ ((*q%16) + '0') :
+ ((*q%16) + 'A' - 0x0A)));
+ charcount += 4;
+ }
+ } else {
+ doprintc(&cp,tty, *q);
+ charcount++;
+ }
+ q++;
+ }
+ if (spaces) {
+ doprintc(&cp, tty, '"');
+ charcount++;
+ }
+ if (!rjust && (width != -1) && (length < width)) {
+ for (d = 0; d < (width-length); d++) {
+ doprintc(&cp,tty,' '); /* trailing fill - spaces */
+ charcount++;
+ }
+ }
+ break;
+
+ case 'r': /* 'raw' display string */
+ q = va_arg(argp, uchar *); /* point to string */
+ if (q == NULL) /* check for null pointer */
+ break;
+ while (*q != 0) { /* field widths don't make */
+ if (cp) /* any sense for displays */
+ *cp++ = *q;
+ else {
+ ;
+#ifdef NOTHING
+ if (tty != NULLTTY) {
+ if (system_running && tty != CONTTY) {
+ putc(tty,*q);
+ } else {
+ console_putc(*q);
+ }
+ }
+#endif
+
+ }
+ charcount++;
+ q++;
+ }
+ break;
+
+ case '%': /* percent sign */
+ doprintc(&cp,tty, '%');
+ charcount++;
+ break;
+
+#ifdef NOTHING
+
+ case 'C': /* cisco specials */
+ fmt++;
+ /* fall thru */
+#endif
+
+ default:
+
+ vprintf(fmt, argp );
+ /*
+ perror("Default in doprnt");
+ charcount += reg_invoke_printf(*(fmt-1), &fmt, &cp, tty, &argp,
+ rjust, width, size, hash,
+ precision);
+ */
+ break;
+ }
+ }
+ }
+ return(charcount);
+}
+
+
+#ifdef NOTHING
+
+/*
+ * automore_enable() - Turn on automatic "more" processing
+ *
+ * This routine is used to enable automatic "more" processing. After
+ * calling it, printf() will pause every page asking the user if they
+ * want more. If they say no, all further output will be supressed until
+ * automore processing is disabled.
+ */
+
+void automore_enable (const char *header)
+{
+ if (!stdio)
+ return;
+ stdio->automore_count = 0; /* Set the line number */
+ stdio->automore_flush = FALSE; /* Not flushing output */
+ stdio->automore_enabled = TRUE; /* Enable automore */
+ automore_header(header); /* Set the header pointer */
+}
+
+/*
+ * automore_header() - Change automore's header in midstream
+ *
+ * Once automore is running, it is sometimes useful to be able to change
+ * the header. This can happen if you are printing a table and want to
+ * print some explanatory text before the table header.
+ */
+
+void automore_header (const char *header)
+{
+ if (!stdio)
+ return;
+ if (header) {
+ stdio->automore_header = NULL; /* To avoid printing header twice */
+ printf("\n%s", header);
+ }
+ stdio->automore_header = header; /* Save the header pointer */
+}
+
+/*
+ * automore_disable() - Disable automatic "more" processing
+ *
+ * This routine is used to disable any further more processing.
+ */
+
+
+void automore_disable (void)
+{
+ if (!stdio)
+ return;
+ stdio->automore_enabled = FALSE; /* Disable automore processing */
+ stdio->automore_flush = FALSE; /* No more output flushing */
+}
+
+/*
+ * automore_quit
+ * If the user quits out of automore, allow the user process to find out.
+ * This is normally used by having the user process poll this function. If
+ * it returns TRUE, then the output is being flushed. This is very useful
+ * if the output is frequently very long.
+ */
+
+boolean automore_quit (void)
+{
+ if (!stdio)
+ return(TRUE);
+ return(stdio->automore_flush);
+}
+
+/*
+ * automore_conditional - Conditionally check for stopping output
+ *
+ * This routine is used to conditionally ask for permission to do
+ * more output. Rather than actually doing the I/O here, we simply
+ * adjust the line count so that the regular automore processing
+ * will handle it.
+ */
+
+void automore_conditional (int lines)
+{
+ /*
+ * If output has not been flushed, and this terminal has a length,
+ * and a line count of zero or a line count greater than what would
+ * fit on the page was specified, set the lines printed to the
+ * page length so that the next output will cause the more prompt
+ * to appear.
+ */
+
+ if (!stdio)
+ return;
+ if (!stdio->automore_flush && stdio->tty_length &&
+ (!lines || (lines > (stdio->tty_length - stdio->automore_count))))
+ stdio->automore_count = stdio->tty_length;
+}
+
+#endif
+
diff --git a/data/mnet/Common/cli/src/parser_privilege.c b/data/mnet/Common/cli/src/parser_privilege.c
new file mode 100644
index 0000000..0ffe273
--- /dev/null
+++ b/data/mnet/Common/cli/src/parser_privilege.c
@@ -0,0 +1,322 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <tyLib.h>
+#include <taskLib.h>
+#include <errnoLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <msgQLib.h>
+#include <sigLib.h>
+
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+#include <../include/parser_sim.h>
+#include <../include/parser.h>
+#include <../include/parser_defs_exec.h>
+#include <../include/parser_input.h>
+#include <../include/parser_sim.h>
+#include <../include/parser_util.h>
+#include <../include/parser_commands.h>
+#include <../include/nv.h>
+#include <../include/parser_errno.h>
+#include <../include/parser_ModNum.h>
+#include <../include/defs.h>
+#include <../include/parser_init.h>
+#include <../include/macros.h>
+#include <../include/parser_actions.h>
+#include <../include/parser_privilege.h>
+
+
+#ifdef IOS_PARSER
+
+
+boolean parser_priv_debug = FALSE;
+static void set_privilege_level(parser_mode *, uint, uint,
+ char *, boolean, boolean, char *);
+
+
+/*
+ * priv_command
+ *
+ * Handle parsing of privilege global config command. Call
+ * set_privilege_level since we need a new csb, so call with
+ * needed arguments extracted from csb
+ */
+void priv_command (parseinfo *csb)
+{
+ if (csb->nvgen && !priv_changed_in_mode(csb->pmp)) {
+ return;
+ }
+ set_privilege_level(csb->pmp, GETOBJ(int,1), GETOBJ(int,2),
+ GETOBJ(string,1), csb->sense, csb->nvgen,
+ csb->nv_command);
+}
+
+/*
+ * set_privilege_level
+ *
+ * Handle parsing and NV generation of privilege global config command.
+ * If doing NV generation
+ * traverse parse tree of current node
+ * NV generate commands added to priv_nvgenQ
+ * else
+ * parser command with parse tree of current node
+ * change priv level of transitions added to privQ
+ */
+static void set_privilege_level (parser_mode *mode, uint level, uint reset,
+ char *com, boolean sense, boolean nvgen,
+ char *nv_command)
+{
+ parseinfo *csb;
+ privq *pq;
+ priv_nvgenq *pnvq;
+ priv_nvgenq *ptmp;
+ priv_nvgenq *prev;
+
+ csb = get_csb("Privilege CSB");
+ if (!csb) {
+ printf(nomemory);
+ return;
+ }
+
+ csb->mode = mode;
+ csb->nvgen = nvgen;
+ csb->priv = PRIV_ROOT;
+ csb->sense = TRUE;
+ csb->priv_set = TRUE;
+ push_node(csb, get_mode_top(csb->mode));
+
+ if (csb->nvgen) {
+ parse_token(csb); /* traverse parse tree */
+ if (csb->priv_nvgenQ) {
+ /*
+ * Weed out duplicate entries
+ */
+ pnvq = csb->priv_nvgenQ->qhead;
+ prev = NULL;
+ while (pnvq) {
+
+ ptmp = pnvq->next;
+ while (ptmp) {
+ if ((pnvq->level == ptmp->level) &&
+ (strcmp(pnvq->command, ptmp->command) == 0)) {
+ /* Duplicate entry */
+ if (parser_priv_debug) {
+ printf("\nDuplicate priv entry 0x%x %d '%s'",
+ (uint)mode,pnvq->level, pnvq->command);
+ }
+ if (prev) {
+ prev->next = pnvq->next;
+ } else {
+ csb->priv_nvgenQ->qhead = pnvq->next;
+ }
+ PARSERfree(pnvq);
+ pnvq = NULL;
+ break;
+ }
+ ptmp = ptmp->next;
+ }
+ if (pnvq) {
+ prev = pnvq;
+ pnvq = pnvq->next;
+ } else {
+ pnvq = csb->priv_nvgenQ->qhead;
+ }
+ }
+
+ /*
+ * NV generate remaining entries
+ */
+ while (! QUEUEEMPTY(csb->priv_nvgenQ)) {
+ /*
+ * For each priv structure, remove from nvgenQ,
+ * NV generate, and free priv structure
+ */
+ pnvq = dequeue(csb->priv_nvgenQ);
+ /*
+ nv_write(TRUE, "%s level %d %s", nv_command,
+ pnvq->level, pnvq->command);
+ */
+ printf("nv_write in parser_privilege.c\n");
+ PARSERfree(pnvq);
+ }
+ }
+ free_csb(&csb);
+ return;
+ }
+
+ strcpy(csb->line, com);
+ if (parser_priv_debug) {
+ printf("\nSetting privilege level to %d for command '%s'",
+ level, csb->line);
+ }
+
+ /*
+ * Parse the input buffer and find the
+ * transitions that need to be changed.
+ */
+ parse_token(csb);
+ if (!csb->privQ) {
+ /* No transitions found, so report error */
+ printf("\n%% Unknown command '%s'", csb->line);
+ } else {
+ /*
+ * We have some transitions, so change the
+ * privilege levels for them.
+ */
+ set_priv_changed_in_mode(mode, TRUE);
+ while (! QUEUEEMPTY(csb->privQ)) {
+ pq = dequeue(csb->privQ);
+ if (sense && !reset) {
+ if (parser_priv_debug) {
+ printf("\nChanging privilege for 0x%x from %x-%x-%d-0x%x",
+ (uint)pq->priv, pq->priv->cur_priv,
+ pq->priv->def_priv, pq->priv->priv_changed,
+ TRANS_PRIV_FLAGS_GET(pq->priv->flags));
+ }
+ pq->priv->priv_changed = TRUE;
+ pq->priv->cur_priv = level;
+ if (parser_priv_debug) {
+ printf(" to %x-%x-%d-0x%x", pq->priv->cur_priv,
+ pq->priv->def_priv, pq->priv->priv_changed,
+ TRANS_PRIV_FLAGS_GET(pq->priv->flags));
+ }
+ } else {
+ if (parser_priv_debug) {
+ printf("\nChanging privilege for 0x%x from %x-%x-%d-0x%x",
+ (uint)pq->priv, pq->priv->cur_priv,
+ pq->priv->def_priv, pq->priv->priv_changed,
+ (uint)(TRANS_PRIV_FLAGS_GET(pq->priv->flags)));
+ }
+ pq->priv->cur_priv = pq->priv->def_priv;
+ if (reset) {
+ pq->priv->priv_changed = FALSE;
+ }
+ if (parser_priv_debug) {
+ printf(" to default %x-%x-%d-0x%x", pq->priv->cur_priv,
+ pq->priv->def_priv, pq->priv->priv_changed,
+ TRANS_PRIV_FLAGS_GET(pq->priv->flags));
+ }
+ }
+ PARSERfree(pq);
+ }
+ }
+ free_csb(&csb);
+}
+
+/*
+ * show_priv_command
+ *
+ * Display users current privilege level
+ */
+void show_priv_command (parseinfo *csb)
+{
+ printf("\nCurrent privilege level is %d", csb->priv);
+}
+
+
+#endif /* IOS_PARSER */
+
+
+
+
+
+/*
+ * priv_enqueue
+ *
+ * Add a privilege structure onto queue, allocating storage
+ * for queue if necessary
+ */
+static void priv_enqueue (queuetype **qp, void *pv)
+{
+ if (!*qp) {
+ *qp = (queuetype *)PARSERmalloc(sizeof(queuetype));
+ if (!*qp) {
+ /* No memory */
+ return;
+ } else {
+ queue_init(*qp, 0);
+ }
+ }
+ requeue(*qp, pv);
+}
+
+/*
+ * priv_push
+ *
+ * Allocate storage for privilege structure and add to privQ
+ */
+void priv_push (parseinfo *csb, trans_priv *priv)
+{
+ privq *pq;
+
+ /*
+ * Modify the current privilege
+ */
+ if (parser_priv_debug) {
+ printf("\nPushing transition on stack 0x%x", (uint)priv);
+ }
+ pq = (privq *)PARSERmalloc(sizeof(privq));
+ if (!pq) {
+ printf(nomemory);
+ return;
+ }
+ pq->priv = priv;
+ pq->next = NULL;
+ /* Add priv structure to privQ */
+ priv_enqueue(&csb->privQ, pq);
+}
+
+/*
+ * nvgen_privilege
+ *
+ * Allocate storage for privilege structure and add to priv_nvgenQ
+ */
+boolean nvgen_privilege (parseinfo *csb, trans_priv *priv, const char *str)
+{
+ priv_nvgenq *pnvq;
+ return TRUE; /* modified by rrams */
+#if 0
+ if ((! priv->priv_changed) || (csb->flags & CONFIG_ABORT)) {
+ /*
+ * Privilege level hasn't changed, or a previous command
+ * failed and we shouldn't bother
+ */
+ return(FALSE);
+ }
+#endif
+ pnvq = (priv_nvgenq *)PARSERmalloc(sizeof(priv_nvgenq));
+ if (!pnvq) {
+ /*
+ * Out of memory, flag CONFIG_ABORT so furthur commands aren't
+ * NV generated and return
+ */
+ csb->flags |= CONFIG_ABORT;
+ printf(nomemory);
+ return(FALSE);
+ }
+ /* Add text of command */
+ if (csb->nv_command[0] != '\0') {
+ sprintf(pnvq->command, "%s %s", csb->nv_command, str);
+ } else {
+ strcpy(pnvq->command, str);
+ }
+ pnvq->level = priv->cur_priv;
+ pnvq->next = NULL;
+ /* Add priv structure to priv_nvgenQ */
+ priv_enqueue(&csb->priv_nvgenQ, pnvq);
+ return(TRUE);
+}
+
+
diff --git a/data/mnet/Common/cli/src/parser_util.c b/data/mnet/Common/cli/src/parser_util.c
new file mode 100644
index 0000000..25d502c
--- /dev/null
+++ b/data/mnet/Common/cli/src/parser_util.c
@@ -0,0 +1,268 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <tyLib.h>
+#include <taskLib.h>
+#include <errnoLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <msgQLib.h>
+#include <sigLib.h>
+
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/platdef.h>
+#include <../include/ttyutil.h>
+
+#include <../include/imsg.h>
+#include <../include/imc.h>
+
+#include <../include/parsertypes.h>
+#include <../include/address.h>
+#include <../include/config.h>
+#include <../include/parser_defs_exec.h>
+#include <../include/parser_input.h>
+#include <../include/parser_sim.h>
+#include <../include/parser_util.h>
+#include <../include/parser_commands.h>
+#include <../include/nv.h>
+#include <../include/parser_ModNum.h>
+#include <../include/parser_errno.h>
+#include <../include/defs.h>
+#include <../include/parser.h>
+
+
+
+static char netascii2cisco (char **buf)
+{
+ char ch;
+
+ if ((**buf == '\r') &&
+ (*(*buf+1) == '\n')) {
+ *buf += 2;
+ return('\n');
+ }
+ if ((**buf == '\r') &&
+ (*(*buf+1) == '\0')) {
+ *buf += 2;
+ return('\r');
+ }
+ ch = **buf;
+ (*buf)++;
+ return(ch);
+}
+
+/*
+ * BATCH_INPUT
+ *
+ * If there is an active batch input buffer which
+ * contains more data, read a line from it and return TRUE.
+ *
+ * This function must operate much the same way as readline so
+ * that the parser does not know the difference.
+ */
+boolean batch_input (parseinfo *csb, char *buf, int buflen,
+ char *breakset, char *lastcharp)
+{
+ char *cp = buf;
+
+ *lastcharp = '\0';
+
+ if (csb->batch_buf && *csb->batch_offset) {
+ /* Copy a line, stopping at any breakset character,
+ * NULL, or a full buffer
+ */
+ while (*csb->batch_offset
+ && ! strchr(breakset, *csb->batch_offset)
+ && ((cp - buf) < (buflen - 1))) {
+ *(cp++) = netascii2cisco(&csb->batch_offset);
+ }
+
+ *lastcharp = netascii2cisco(&csb->batch_offset);
+ *cp = '\0';
+ return(TRUE);
+ }
+ return(FALSE);
+}
+
+/*
+ * SAVE_LINE
+ *
+ * Save lines into a block buffer. Used for comments, which are output at the
+ * begining of the NV generation; generated command lines, which are output
+ * after the comments; and help, which is output after a line is parsed.
+ * For generation, make sure we have enough space to save both comments and
+ * configuration. If there isn't enough space in NV ram, truncate comments.
+ *
+ * Unlike an earlier version of save_line, newline characters aren't added
+ * automatically - call save_line a second time if needed (since lines are
+ * added sequentially into the buffer). Tabs are used to delimit fields;
+ * this feature is used only by the help strings.
+ */
+
+void save_line_init (save_buf *bp)
+{
+ if (bp->buf) {
+ PARSERfree(bp->buf);
+ }
+ bp->buf = NULL;
+ bp->size = 0;
+ bp->used = 0;
+}
+
+void save_line (parseinfo *csb, save_buf *bp, const char *fmt, ...)
+{
+ va_list args;
+ int n;
+ int newsize;
+
+ char *mybuf;
+
+ if (!fmt) {
+ return;
+ }
+
+ va_start(args, fmt);
+
+ n = doprnt(NULL, NULLTTY, fmt, args, FALSE);
+
+ /*
+ * We expect to be able to parse args again later for the real
+ * write. However, some processors have to store state in the
+ * va_list block for va_arg() reads so refresh the state
+ * again by ending and starting again.
+ */
+
+ va_end(args);
+
+ va_start(args, fmt);
+
+
+ /* Add 1, for the null termination */
+ while (( bp->used + n + 1) > bp->size) {
+ newsize = bp->size + SABUFSIZE;
+ mybuf = (char *)PARSERmalloc(newsize);
+ memset((void *)mybuf, 0, newsize );
+ if (mybuf) {
+ bp->size = newsize;
+ if (bp->buf == NULL) {
+ *mybuf = '\0';
+ } else {
+ strcpy(mybuf, bp->buf);
+ PARSERfree(bp->buf);
+ }
+ } else {
+ va_end(args);
+ return;
+ }
+ bp->buf = mybuf;
+ }
+
+ /* We do not need to use doprnt if we are printing
+ * to a non-NULL buffer, instead use vsprintf
+ * doprnt has some issues with command completion in our
+ * case.
+ */
+
+ n = vsprintf(bp->buf + bp->used, fmt, args);
+
+ bp->used += n;
+ va_end(args);
+}
+
+boolean confirm (char *s)
+{
+ char c;
+ int fd;
+ boolean result = FALSE;
+
+ fd = ioTaskStdGet(0, STD_IN);
+
+ ioSetTerminalMode(fd, IO_RAW_MODE);
+
+ while (TRUE) {
+ printf("%s[confirm]", s);
+ fflush(stdout);
+ if ( read( fd, &c, 1 ) < 0 ) {
+ printf("Cannot read input\n");
+ goto DONE;
+ }
+ /* c &= 0177; */
+ write(fd, &c, 1);
+ write(fd, "\r\n", 2);
+ switch (c) {
+ case CH_NL:
+ case CH_CR:
+ case 'Y':
+ case 'y':
+ result = (TRUE);
+ goto DONE;
+
+ case '?':
+ printf("Press RETURN to continue, anything else to abort\n");
+ break;
+ default:
+ result = (FALSE);
+ goto DONE;
+
+ }
+ }
+
+ DONE:
+ ioSetTerminalMode(fd, IO_LINE_MODE);
+
+ return(result);
+}
+
+/*
+ * yes_or_no
+ * Print a prompt and wait for a yes or no answer. The supplied default
+ * answer is used if a single return character is typed. If usedef is
+ * false set then no default is used and the user must type yes or no.
+ */
+
+#define MAXBUF 100
+
+boolean yes_or_no (const char *prompt, boolean def, boolean usedef)
+{
+ char *c, buffer[MAXBUF];
+ int fd = -1;
+
+ fd = ioTaskStdGet(0, STD_IN);
+
+ FOREVER {
+
+ if (prompt)
+ printf("%s?[%s]: ", prompt, usedef ? def ? "yes" : "no" :
+ "yes/no");
+
+ fflush(stdout);
+ if ( read( fd, buffer, MAXBUF-1) < 0 )
+ return(FALSE);
+
+ c = deblank(buffer);
+
+ if (usedef && ( null(c) || *c == '\n') )
+ return(def);
+
+ if (tolower(c[0]) == 'y')
+ return(TRUE);
+
+ if (tolower(c[0]) == 'n')
+ return(FALSE);
+
+ printf("%% Please answer 'yes' or 'no'.\n");
+ }
+
+ return(FALSE);
+}
+
+void
+parser_return(parseinfo *csb, int errno_val)
+{
+ csb->return_val = FALSE;
+ csb->errno_val = errno_val;
+}
diff --git a/data/mnet/Common/cli/src/queue.c b/data/mnet/Common/cli/src/queue.c
new file mode 100644
index 0000000..7da9479
--- /dev/null
+++ b/data/mnet/Common/cli/src/queue.c
@@ -0,0 +1,513 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <tyLib.h>
+#include <taskLib.h>
+#include <errnoLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <msgQLib.h>
+#include <sigLib.h>
+
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+#include <../include/parser_sim.h>
+#include <../include/parser.h>
+
+boolean queueempty_inline (queuetype *q)
+{
+ return(q->qhead == NULL);
+}
+
+
+/*
+ * enqueue_inline - add an element to a fifo queue.
+ */
+
+void enqueue_inline (queuetype *qptr, void *eaddr)
+{
+ nexthelper *p, *ptr;
+
+ p = qptr->qtail; /* last element pointer */
+ ptr = eaddr;
+
+ /*
+ * Make sure the element isn't already queued or the last
+ * element in this list
+ */
+ if ((ptr->next != NULL) || (p == ptr)) {
+ perror("enqueue_inline:Error\n");
+ return;
+ }
+ if (!p) /* q empty */
+ qptr->qhead = ptr;
+ else /* not empty */
+ p->next = ptr; /* update link */
+ qptr->qtail = ptr; /* tail points to new element */
+ qptr->count++;
+}
+
+/*
+ * dequeue_inline - remove first element of a fifo queue.
+ */
+
+static void *dequeue_inline (queuetype *qptr)
+{
+ nexthelper *p;
+
+
+ if (qptr == NULL)
+ return(NULL);
+ p = qptr->qhead; /* points to head of queue */
+ if (p) { /* is there a list? */
+ qptr->qhead = p->next; /* next link */
+ if (!p->next)
+ qptr->qtail = NULL; /* this was last guy, so zap tail */
+ p->next = NULL; /* clear link, just in case */
+ }
+ if (p && (--qptr->count < 0) && qptr->maximum) {
+ perror("dequeue_inline:Error\n");
+ /* (*kernel_errmsg)(&msgsym(QCOUNT, SYS), "dequeue", qptr,
+ qptr->count);
+ */
+
+ qptr->count = 0;
+ }
+ return(p);
+}
+
+/*
+ * requeue_inline - add an element to the *head* of a "fifo" queue.
+ */
+
+static void requeue_inline (queuetype *qptr, void *eaddr)
+{
+ nexthelper *ptr;
+
+ ptr = eaddr;
+ if (ptr->next != NULL) {
+ perror("requeue:Error\n");
+ return;
+ }
+ if (qptr->qhead == NULL) /* if list is empty */
+ qptr->qtail = ptr; /* update tail pointer */
+ else
+ ptr->next = qptr->qhead; /* new head points to old head */
+ qptr->qhead = ptr; /* list head points to new head */
+ qptr->count++;
+}
+
+/*
+ * queue_init
+ * Initialize a queuetype
+ */
+
+void queue_init (queuetype *q, int maximum)
+{
+ q->qhead = NULL;
+ q->qtail = NULL;
+ q->count = 0;
+ q->maximum = maximum;
+}
+
+/*
+ * enqueue - add an element to a fifo queue.
+ * Note no interrupt interlocking.
+ */
+
+void enqueue (queuetype *qptr, void *eaddr)
+{
+ enqueue_inline(qptr, eaddr);
+}
+
+/*
+ * dequeue - remove first element of a fifo queue.
+ * Note no interrupt interlocking.
+ */
+
+void *dequeue (queuetype *qptr)
+{
+ return(dequeue_inline(qptr));
+}
+
+/*
+ * requeue - add an element to the *head* of a "fifo" queue.
+ * Performs the inverse operation of dequeue()
+ * Note no interrupt interlocking.
+ */
+
+void requeue (queuetype *qptr, void *eaddr)
+{
+ requeue_inline(qptr, eaddr);
+}
+
+/*
+ * peekqueuehead -- Return address of element at head of queue.
+ * Does not lock out interrupts.
+ */
+
+void *peekqueuehead (queuetype* q)
+{
+ nexthelper* p;
+
+ p = (nexthelper *)q->qhead; /* first member */
+ return(p);
+
+}
+
+/*
+ * queryqueuedepth -- Query the length of the queue.
+ * Does not lock out interrupts.
+ */
+
+int queryqueuedepth (queuetype* q)
+{
+ return(q->count);
+}
+
+/*
+ * insqueue - add an element to the *middle* of a "fifo" queue.
+ * 'eaddr' goes immediately after 'paddr'.
+ *
+ * If 'paddr' is NULL, requeue is called.
+ * Note no interrupt interlocking.
+ */
+
+void insqueue (queuetype *qptr, void *eaddr, void *paddr)
+{
+ nexthelper *eptr, *pptr;
+
+ eptr = (nexthelper *)eaddr;
+ pptr = (nexthelper *)paddr;
+ if (pptr == NULL) {
+ requeue(qptr, eptr);
+ return;
+ }
+ if (eptr->next != NULL) {
+ perror("insqueue:Error!\n");
+ return;
+ }
+ eptr->next = pptr->next;
+ pptr->next = eptr;
+ if (eptr->next == NULL)
+ qptr->qtail = eptr; /* tail points to new element */
+ qptr->count++;
+}
+
+
+
+
+
+
+
+
+
+#ifdef IOS_PARSER
+
+
+/*
+ * checkqueue
+ * Return TRUE if specified element is in queue, FALSE otherwise
+ * Does not lock out interrupts.
+ */
+
+boolean checkqueue (queuetype *q, void *e)
+{
+ nexthelper *p;
+
+ if (q == NULL)
+ return(FALSE);
+ p = q->qhead; /* first member */
+ while (p) {
+ if (p == e) /* match? */
+ return(TRUE); /* yes, return TRUE */
+ else
+ p = p->next; /* no, cdr the list */
+ }
+ return(FALSE); /* not in queue, return FALSE */
+}
+
+
+
+
+
+/*
+ * p_dequeue -- remove first element from a fifo queue
+ * Locks out interrupts.
+ */
+
+void *p_dequeue (queuetype *qptr)
+{
+ void *p;
+
+ p = dequeue_inline(qptr);
+ return (p);
+}
+
+/*
+ * p_enqueue -- put an element into a fifo queue
+ * Locks out interrupts.
+ */
+
+void p_enqueue (queuetype *qptr, void *eaddr)
+{
+ enqueue_inline(qptr, eaddr);
+}
+
+/*
+ * p_requeue - add an element to the *head* of a "fifo" queue.
+ * Locks out interrupts.
+ */
+
+void p_requeue (queuetype *qptr, void *eaddr)
+{
+ requeue_inline(qptr, eaddr);
+}
+
+/*
+ * p_unqueue -- delete a specified element from a fifo queue.
+ * Lock out interrupts.
+ */
+
+void p_unqueue (queuetype *q, void *e)
+{
+ unqueue_inline(q, e);
+}
+
+/*
+ * p_swapqueue - remove an old element from a fifo queue AND add a
+ * new element into the fifo queue at the old elements' position in
+ * the fifo queue.
+ * Locks out interrupts.
+ */
+
+void p_swapqueue (queuetype *qptr, void *enew, void *eold)
+{
+ swapqueue_inline(qptr, enew, eold);
+}
+
+
+/*
+ * p_unqueuenext -- delete the next element from a fifo queue.
+ * Lock out interrupts.
+ */
+
+void p_unqueuenext (queuetype *q, void **prev)
+{
+ nexthelper *nextelement;
+
+
+ nextelement = (nexthelper *)*prev;
+
+ if (nextelement) { /* else we're at the end of the list - do nothing */
+ *prev = nextelement->next;
+ nextelement->next = NULL;
+
+ if (!*prev) { /* prev now at the end of the list; fix the header */
+ if (prev == (void **)&q->qhead)
+ q->qtail = NULL; /* prev is the header, now an empty list */
+ else
+ q->qtail = prev; /* real prev , it's at the end */
+ }
+ if ((--q->count < 0) && (q->maximum)) {
+ /* (*kernel_errmsg)(&msgsym(QCOUNT, SYS), "p_unqueuenext",
+ q, q->count);
+ */
+ printf("p_unqueuenext:Error\n");
+ q->count = 0;
+ }
+
+ }
+ return;
+}
+
+
+/*
+ * unqueue -- delete a specified element from a fifo queue.
+ * Does not lock out interrupts.
+ */
+
+void unqueue (queuetype *q, void *e)
+{
+ unqueue_inline(q, e);
+}
+
+
+/*
+ * remqueue - remove a specified element from a fifo queue.
+ * The previous queue element is supplied (paddr) to allow a direct lift
+ * (eaddr) and repair. If paddr is NULL, the first member in queue is removed.
+ * Note no interrupt interlocking.
+ */
+
+void *remqueue (queuetype *qptr, void *eaddr, void *paddr)
+{
+
+ /*
+ * If previous member is null and member is at the head of queue,
+ * remove from head
+ */
+ if ((eaddr == qptr->qhead) &&
+ (paddr == NULL)) {
+ return(dequeue(qptr));
+ } else {
+ /*
+ * Check to make sure the previous member is really what it
+ * claims to be or that the current member or previous member are
+ * non-null
+ */
+ if ((paddr == NULL) || (eaddr == NULL) ||
+ (((nexthelper *)paddr)->next != eaddr)){
+ /* (*kernel_errmsg)(&msgsym(LINKED, SYS), "remqueue", eaddr,
+ qptr);
+ */
+ printf("remqueue: Error!!\n");
+ return(NULL);
+ }
+
+ /*
+ * Lift the candidate eaddr and repair pointers
+ */
+ ((nexthelper *)paddr)->next = ((nexthelper *)eaddr)->next;
+ ((nexthelper *)eaddr)->next = NULL;
+
+ /*
+ * Repair tail of queue, if necessary
+ */
+ if (((nexthelper *)paddr)->next == NULL)
+ qptr->qtail = paddr;
+
+ /*
+ * Decrement queue count and do sanity check
+ */
+ if ((--qptr->count < 0) && qptr->maximum) {
+ /* (*kernel_errmsg)(&msgsym(QCOUNT, SYS), "remqueue", qptr,
+ qptr->count);
+ */
+ printf("remqueue:Error\n");
+ qptr->count = 0;
+ }
+ return(eaddr);
+ }
+}
+
+/*
+ * queueBLOCK
+ * Schedule test for blocking on queue empty
+ */
+
+boolean queueBLOCK (queuetype *qptr)
+{
+ return(qptr->qhead ? FALSE : TRUE);
+}
+
+static boolean queuefull_reserve_inline (queuetype *q, int reserve)
+{
+ return((q->maximum != 0) && ((q->count + reserve) >= q->maximum));
+}
+
+static boolean queuefull_inline (queuetype *q)
+{
+ return((q->maximum != 0) && (q->count >= q->maximum));
+}
+
+static int queuesize_inline (queuetype *q)
+{
+ return(q->count);
+}
+
+
+static int queuemax_inline(queuetype *q)
+{
+ return(q->maximum);
+}
+
+
+/*
+ * swapqueue_inline -- swap a new element for an old element on a fifo queue.
+ */
+
+static void swapqueue_inline (queuetype *q, void *enew, void *eold)
+{
+ nexthelper *p;
+ nexthelper *prev;
+ nexthelper *eoldptr;
+ nexthelper *enewptr;
+
+ enewptr = enew;
+ eoldptr = eold;
+ p = q->qhead; /* first member */
+ prev = (nexthelper *)q;
+ while (p) {
+ if (p == eoldptr) { /* delete this guy */
+ prev->next = enewptr; /* tie in new element */
+ enewptr->next = eoldptr->next; /* keep chain intact */
+ eoldptr->next = NULL; /* clear element pointer */
+ if (q->qtail == eoldptr) /* last element? */
+ q->qtail = enewptr;
+ return; /* exit now */
+ } else {
+ prev = p;
+ p = p->next;
+ }
+ }
+ /* (*kernel_errmsg)(&msgsym(NOTQ, SYS), "swapqueue", eoldptr, q);
+ */
+ printf("swapqueue:Error\n");
+
+}
+
+/*
+ * unqueue_inline -- delete a specified element from a fifo queue.
+ */
+
+static void unqueue_inline (queuetype *q, void *e)
+{
+ nexthelper *p;
+ nexthelper *prev;
+ nexthelper *eptr;
+
+ eptr = e;
+ p = q->qhead; /* first member */
+ prev = (nexthelper *)q;
+ while (p) {
+ if (p == eptr) { /* delete this guy */
+ prev->next = p->next; /* keep chain intact */
+ if (!p->next) { /* zapped the tail */
+ if (q->qhead == 0)
+ prev = 0; /* tail was head */
+ q->qtail = prev;
+ }
+ eptr->next = NULL; /* clear element pointer */
+ if ((--q->count < 0) && (q->maximum)) {
+ /* (*kernel_errmsg)(&msgsym(QCOUNT, SYS), "unqueue", q,
+ q->count);
+ */
+ perror("unqueue_inline:Error\n");
+
+ q->count = 0;
+ }
+ return; /* exit now */
+ } else {
+ prev = p;
+ p = p->next;
+ }
+ }
+ /* (*kernel_errmsg)(&msgsym(NOTQ, SYS), "unqueue", eptr, q);
+ */
+ perror("unqueue:Error\n");
+
+}
+
+
+#endif /* IOS_PARSER */
diff --git a/data/mnet/Common/cli/src/show_chain.c b/data/mnet/Common/cli/src/show_chain.c
new file mode 100644
index 0000000..9447d75
--- /dev/null
+++ b/data/mnet/Common/cli/src/show_chain.c
@@ -0,0 +1,220 @@
+
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <tyLib.h>
+#include <taskLib.h>
+#include <errnoLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <msgQLib.h>
+#include <sigLib.h>
+#include <usrLib.h>
+#include <time.h>
+#include <symLib.h>
+
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+#include <../include/parser_sim.h>
+#include <../include/parser.h>
+#include <../include/parser_defs_exec.h>
+#include <../include/parser_input.h>
+#include <../include/parser_sim.h>
+#include <../include/parser_util.h>
+#include <../include/parser_commands.h>
+#include <../include/nv.h>
+#include <../include/parser_errno.h>
+#include <../include/parser_ModNum.h>
+#include <../include/defs.h>
+#include <../include/parser_init.h>
+#include <../include/macros.h>
+#include <../include/parser_actions.h>
+
+
+#define ALTERNATE NONE
+#include "../include/vxworks_show_chain.h"
+LINK_POINT( basic_show_commands, ALTERNATE );
+#undef ALTERNATE
+
+
+
+
+static parser_extension_request show_chain_init_table[] =
+{
+ { PARSE_ADD_SHOW_CMD, &pname( basic_show_commands)},
+ { PARSE_LIST_END, NULL }
+};
+
+
+void ShowParserInit(void)
+{
+ parser_add_command_list(show_chain_init_table, "show_commands");
+
+}
+
+
+
+/******** Shows version of gp10 software ****************
+
+void Show_Version(parseinfo *csb){
+ static char *date = __DATE__ ;
+ static char *time = __TIME__ ;
+
+ version();
+ printf(" dated %s : %s\n", date, time );
+}
+*/
+/**Shows system memory partition blocks and statistics*/
+void Show_Memory(parseinfo *csb){
+ switch(csb->which){
+ case SUMMARY:
+ memShow(0);
+ break;
+ case DETAIL:
+ memShow(1);
+ break;
+ }
+}
+
+/**** Shows system clock **/
+void Show_Clock(parseinfo *csb){
+ struct timespec tp;
+ clock_gettime(CLOCK_REALTIME,&tp);
+ printf("\n%s\n",asctime(gmtime( &(tp.tv_sec) ) ));
+
+}
+
+/******* display entries in the system ARP table ********/
+void Show_Arp(parseinfo *csb){
+ arpShow();
+}
+
+/******** "Shows list of gp10 users *********/
+void Show_Users(parseinfo *csb){
+ sysUserShow();
+}
+
+/******** Shows the attached network interfaces *****/
+void Show_Interfaces(parseinfo *csb){
+ ifShow(0);
+}
+
+/******* Shows ip traffic ***/
+void Show_ip_Traffic(parseinfo *csb){
+ icmpstatShow();
+ tcpstatShow();
+ udpstatShow();
+}
+
+/********* Shows ip route *****/
+void Show_ip_Route(parseinfo *csb){
+ routeShow();
+}
+
+/******* Shows list of system drivers ****/
+void Show_Drivers(parseinfo *csb){
+ iosDrvShow();
+}
+
+/******* Shows the list of devices in the system ***/
+void Show_Devices(parseinfo *csb){
+ iosDevShow();
+}
+
+/******** Shows list of file descriptor names in the system *******/
+void Show_Fd(parseinfo *csb){
+ iosFdShow();
+}
+
+/********* Shows stack trace of a task ****/
+void Show_Stack_Trace(parseinfo *csb){
+
+ tt(GETOBJ(int,1));
+}
+
+/**********Shows task information from Task control block ****/
+void Show_Task(parseinfo *csb){
+
+ switch(csb->which){
+ case TASK_ALL:
+ taskShow(0,2);
+ break;
+ case TASK_GEN:
+ taskShow(GETOBJ(int,1),1);
+ break;
+ case TASK_DETAIL:
+ taskShow(GETOBJ(int,1),1);
+ break;
+ case TASK_SUMMARY:
+ taskShow(GETOBJ(int,1),0);
+ break;
+ }
+}
+/****** Shows the current status for loaded modules **/
+void Show_Module(parseinfo *csb){
+
+ switch(csb->which){
+ case ALL:
+ moduleShow(NULL,0);
+ break;
+ case NAME:
+ moduleShow(GETOBJ(string,1),0);
+ break;
+ }
+}
+
+extern void *sysSymTbl;
+
+
+/**** look up a symbol by name ***/
+
+void Show_Symbol(parseinfo *csb){
+ SYM_TYPE ptr;
+ char *bufp;
+
+ /* symFindByName(sysSymTbl,GETOBJ(string,1),&bufp,&ptr);
+ printf("\n%s\n",bufp);*/
+ switch(csb->which){
+ case ALL:
+ lkup(NULL);
+ case NAME:
+ if(GETOBJ(string,1)==NULL)break;
+ lkup(GETOBJ(string,1));
+ break;
+
+
+ }
+
+
+}
+
+/******* Shows environment variable *******/
+void ShowEnv(parseinfo *csb){
+
+ if((getenv(GETOBJ(string,1)))==NULL){
+ printf("\nvariable not found\n");
+ return;
+ }else
+ printf("\n Variable is = %s\n",getenv(GETOBJ(string,1)));
+
+
+}
+
+
+/******* Shows the symbolic name of machine ***/
+void ShowHost(parseinfo *csb){
+ char hostname[128];
+ gethostname(hostname,127);
+ printf("\n%s\n",hostname);
+}
+
diff --git a/data/mnet/Common/cli/src/sys_debug.c b/data/mnet/Common/cli/src/sys_debug.c
new file mode 100644
index 0000000..e000b3c
--- /dev/null
+++ b/data/mnet/Common/cli/src/sys_debug.c
@@ -0,0 +1,261 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <lstLib.h>
+#include <stdlib.h>
+#include <inetLib.h>
+#include <timers.h>
+#include <ctype.h>
+#include <msgQLib.h>
+#include <sigLib.h>
+
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+#include <../include/parser_sim.h>
+#include <../include/parser.h>
+#include <../include/debug.h>
+#include <../include/sys_debug.h>
+
+#define MAX_HEADING_LEN 32
+
+static SEM_ID debugSemId;
+static LIST debugShowFuncList;
+static LIST debugAllFuncList;
+#if 0
+/*
+ * RAMS : commented this for now
+ */
+extern void show_debug_http_all(void);
+extern void show_debug_https_all(void);
+extern void show_debug_icp_all (void);
+extern void show_debug_log_all (void);
+extern void show_debug_translog_all (void);
+extern void show_debug_radius_all (void);
+extern void show_debug_authentication_all(void);
+extern void show_debug_tacacs_all (void);
+extern void show_debug_snmp_all (void);
+extern void show_debug_stat_all(void);
+extern void show_debug_wccp_all(void);
+extern void show_debug_wi_all(void);
+extern void show_debug_url_all(void);
+extern void show_debug_sreg_all(void);
+extern void show_debug_rule_all();
+#endif
+
+static tDEBUG_FUNC_NODE* findDebugNode( LIST *, void *, const debug_item_type *);
+
+STATUS add_debug_node( LIST *list, void *func,
+ const debug_item_type *debug_items,
+ const char* heading )
+{
+ STATUS status = OK;
+ tDEBUG_FUNC_NODE *funcNode = NULL;
+
+ if ( PSsemTake(debugSemId, WAIT_FOREVER) == ERROR ) {
+ return(ERROR);
+ }
+
+ if ( findDebugNode( list, func, debug_items ) == NULL ) {
+ funcNode =
+ ( tDEBUG_FUNC_NODE *)PARSERcalloc(1, sizeof(tDEBUG_FUNC_NODE));
+ if ( funcNode ) {
+ funcNode->debug_items = (debug_item_type *)debug_items;
+ funcNode->debugFunction = func;
+ if ( heading &&
+ (funcNode->heading =
+ (char *)PARSERmalloc(sizeof(char) * (MAX_HEADING_LEN + 1)))
+ != NULL){
+ strncpy(funcNode->heading, heading, MAX_HEADING_LEN - 1);
+ funcNode->heading[MAX_HEADING_LEN] = '\0';
+ }
+
+ lstAdd( list, (NODE*)funcNode);
+ }
+ }
+
+ if ( PSsemGive(debugSemId) == ERROR ) {
+ status = ERROR;
+ }
+ return ( status );
+}
+
+STATUS add_debug_show(DEBUG_SHOW_FUNCTION_PTR func,
+ const debug_item_type *debug_items,
+ const char *heading )
+{
+ return(add_debug_node(&debugShowFuncList,
+ (void *)func, debug_items,
+ heading));
+}
+
+
+STATUS add_debug_all(DEBUG_ALL_FUNCTION_PTR func,
+ const debug_item_type *debug_items )
+{
+ if ((add_debug_node(&debugAllFuncList,
+ (void *)func, debug_items,
+ NULL)) == OK ) {
+ if ( func == NULL )
+ generic_debug_all(debug_items, debug_all_p());
+ else
+ func(debug_all_p());
+
+ return( OK );
+ } else
+ return(ERROR);
+}
+
+void invoke_debug_all(boolean debug_all)
+{
+ tDEBUG_FUNC_NODE *function;
+
+
+ if ( PSsemTake(debugSemId, WAIT_FOREVER) == ERROR ) {
+ return;
+ }
+
+ function = (tDEBUG_FUNC_NODE *)lstFirst(&debugAllFuncList);
+
+ while ( function ) {
+ if ( function->debugFunction == NULL ) {
+ if ( function->debug_items )
+ generic_debug_all( function->debug_items, debug_all);
+ } else {
+ ((DEBUG_ALL_FUNCTION_PTR)function->debugFunction)(debug_all);
+ }
+ function = (tDEBUG_FUNC_NODE *)lstNext((NODE*)function);
+ }
+
+ if ( PSsemGive(debugSemId) == ERROR ) {
+ return;
+ }
+}
+
+void invoke_debug_show(void)
+{
+ tDEBUG_FUNC_NODE *function;
+
+ if ( PSsemTake(debugSemId, WAIT_FOREVER) == ERROR ) {
+ return;
+ }
+
+ function = (tDEBUG_FUNC_NODE *)lstFirst(&debugShowFuncList);
+
+ while ( function ) {
+ if ( function->debugFunction == NULL ) {
+ if ( function->debug_items )
+ generic_debug_show( function->debug_items, function->heading);
+ } else {
+ ((DEBUG_SHOW_FUNCTION_PTR)function->debugFunction)();
+ }
+ function = (tDEBUG_FUNC_NODE *)lstNext((NODE*)function);
+ }
+#if 0
+ /*
+ * RAMS : commented this for now
+ */
+ show_debug_http_all();
+ show_debug_https_all();
+ show_debug_icp_all();
+ show_debug_log_all();
+ show_debug_translog_all();
+ show_debug_radius_all();
+ show_debug_authentication_all();
+ show_debug_tacacs_all();
+ show_debug_snmp_all();
+ show_debug_stat_all();
+ show_debug_wccp_all();
+ show_debug_wi_all();
+ show_debug_url_all();
+ show_debug_sreg_all();
+ show_debug_rule_all();
+
+#endif
+ if ( PSsemGive(debugSemId) == ERROR ) {
+ return;
+ }
+}
+
+void sys_debug_init(void)
+{
+ debugSemId = PSsemMCreate( PS_DEFAULT_MUTEX_SEM_FLAG ) ;
+
+ if ( debugSemId == NULL ) {
+ PSpanic("Cannot create Debug Semaphore\n");
+ }
+ lstInit(&debugShowFuncList);
+ lstInit(&debugAllFuncList);
+}
+
+static tDEBUG_FUNC_NODE* findDebugNode( LIST *list, void *func,
+ const debug_item_type *debug_items )
+{
+ tDEBUG_FUNC_NODE *pNode = NULL;
+ boolean locateFunc = TRUE;
+
+ if (list == NULL )
+ return(NULL);
+
+ if ( func == NULL ) {
+ if ( debug_items == NULL )
+ return( NULL );
+
+ locateFunc = FALSE;
+ }
+
+ pNode = (tDEBUG_FUNC_NODE *)lstFirst(list);
+
+ while( pNode ) {
+ if ( locateFunc ) {
+ if ( pNode == func )
+ return( pNode );
+ } else if ( pNode->debug_items == debug_items ) {
+ return ( pNode );
+ }
+ pNode = (tDEBUG_FUNC_NODE *)lstNext((NODE*)pNode);
+ }
+
+ return(NULL);
+}
+
+STATUS remove_debug_node(LIST *list, void *func,
+ const debug_item_type *debug_items )
+{
+ tDEBUG_FUNC_NODE *pNode = NULL;
+
+ if ( PSsemTake(debugSemId, WAIT_FOREVER) == ERROR ) {
+ return(ERROR);
+ }
+
+ if ( (pNode = findDebugNode(list, func, debug_items)) == NULL )
+ return(ERROR);
+
+ lstDelete(list, (NODE *)pNode);
+ PARSERfree(pNode);
+
+ if ( PSsemGive(debugSemId) == ERROR ) {
+ return(ERROR);
+ }
+ return(OK);
+
+}
+
+STATUS remove_debug_all( DEBUG_ALL_FUNCTION_PTR func,
+ const debug_item_type *debug_items )
+{
+ return(remove_debug_node(&debugAllFuncList, (void*)func, debug_items));
+}
+
+STATUS remove_debug_show( DEBUG_SHOW_FUNCTION_PTR func,
+ const debug_item_type *debug_items )
+{
+ return(remove_debug_node(&debugShowFuncList, (void*)func, debug_items));
+}
+
+
diff --git a/data/mnet/Common/cli/src/usrScript.c b/data/mnet/Common/cli/src/usrScript.c
new file mode 100644
index 0000000..f3fcd5e
--- /dev/null
+++ b/data/mnet/Common/cli/src/usrScript.c
@@ -0,0 +1,73 @@
+
+#include "vxworks.h"
+#include "stdio.h"
+#include "ioLib.h"
+
+/******************************************************************************
+*
+* usrStartupScript - make shell read initial startup script file
+*
+* This routine reads a startup script before the VxWorks
+* shell comes up interactively.
+*
+* NOMANUAL
+*/
+/*****************************/
+extern int __floatsisf;
+extern int __divsf3 ;
+extern int __mulsf3 ;
+extern int __addsf3 ;
+
+
+
+/****************************/
+
+extern int consoleFd;
+
+int x;
+
+
+void cli_usrStartupScript
+ (
+ char *fileName
+ )
+ {
+ int old;
+ int newStdIn,newStdOut;
+/*******************************/
+x=__floatsisf;
+x= __divsf3 ;
+x= __mulsf3 ;
+x= __addsf3 ;
+/**************************/
+ if (fileName == NULL)
+ return;
+
+ newStdIn = open (fileName, O_RDONLY, 0);
+ if (newStdIn != ERROR)
+ {
+ printf ("Executing startup script debug %s ...\n", fileName);
+ taskDelay (sysClkRateGet () / 2);
+
+
+
+ CliIOInit(newStdIn,consoleFd,consoleFd,FALSE);
+
+ do
+ taskDelay (sysClkRateGet ());
+ while (taskNameToId ("tCli") != ERROR);
+
+
+ close (newStdIn);
+
+
+
+ printf ("\nDone executing startup script debug %s\n", fileName);
+ taskDelay (sysClkRateGet () / 2);
+ }
+ else
+ printf ("Unable to open startup script %s\n", fileName);
+
+}
+
+
diff --git a/data/mnet/Common/cli/src/util.c b/data/mnet/Common/cli/src/util.c
new file mode 100644
index 0000000..6260135
--- /dev/null
+++ b/data/mnet/Common/cli/src/util.c
@@ -0,0 +1,866 @@
+#include <vxworks.h>
+#include <stdioLib.h>
+#include <taskLib.h>
+#include <tyLib.h>
+#include <lstLib.h>
+#include <inetLib.h> /* for INET_ADDR_LEN */
+#include <timers.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+#include <../include/cli_parser_private.h>
+#include <../include/pstypes.h>
+#include <../include/psvxif.h>
+#include <../include/imsg.h>
+#include <../include/imc.h>
+#include <../include/cli_parser_api.h>
+#include <../include/address.h>
+#include <../include/parsertypes.h>
+#include <../include/config.h>
+
+
+/*
+ * null
+ * check for null string
+ */
+
+boolean null (const char *s)
+{
+ char c;
+
+ if (s)
+ while ((c = *s++) != '\0')
+ if ((c != ' ') && (c != '\t'))
+ return(FALSE);
+ return(TRUE);
+}
+
+
+/*
+ * deblank
+ * Remove leading white space
+ */
+
+char *
+deblank (const char *s)
+{
+ if (!s)
+ return((char *)s);
+
+ while (*s == ' ' || *s == '\t')
+ ++s;
+
+ return((char *)s);
+}
+
+
+
+/*
+ * partialmatch
+ * Returns TRUE if "unknown" is a proper substring of "known"
+ */
+
+boolean partialmatch (char const *known, char *unknown)
+{ /* see if unknown <= known */
+ char k, u;
+
+ if (null(unknown)) /* null string never matches */
+ return(FALSE);
+ unknown = (char *)deblank(unknown);
+ while ((k = *known++)) {
+ if (!(u = *unknown++)) {
+ return(TRUE); /* u < known OK */
+ } else {
+ if (toupper(k) != toupper(u))
+ return(FALSE);
+ }
+ }
+ if (*unknown) /* known exhausted */
+ return(FALSE); /* unknown > known */
+ return(TRUE); /* unknown == known */
+}
+
+
+char *
+address_string (ulong address,char *buf)
+{
+ sprintf(buf, "%d.%d.%d.%d",
+ (address >> 24) & 0xff, (address >> 16) & 0xff,
+ (address >> 8) & 0xff, address & 0xff);
+
+ return buf;
+}
+
+
+#ifdef IOS_PARSER
+
+
+/*
+ * parse_unsigned
+ * Parse an unsigned number.
+ * If number starts with '0x', interpret as hexadecimal.
+ * If number starts with '0', interpret as octal.
+ * Anything else is assigned to be unsigned decimal.
+ * Returns -1 on error.
+ */
+
+ulong parse_unsigned (char *buff, boolean *okflag)
+{
+ char c;
+ ulong num;
+ char *startptr;
+
+ *okflag = FALSE;
+
+ if (null(buff))
+ return(-1);
+ buff = deblank(buff);
+ num = 0;
+ c = *buff++;
+ if (c == '0') {
+
+ /*
+ * If '0x', we've parsed a hexadecimal number
+ */
+ if ((*buff == 'x') || (*buff == 'X')) {
+ buff++;
+ c = toupper(*buff++);
+ startptr = buff;
+ while (((c >= '0') && (c <= '9')) || ((c >= 'A') && (c <= 'F'))) {
+ if ((c >= '0') && (c <= '9'))
+ num = num*16 + (c - '0');
+ else
+ num = num*16 + (c - '7');
+ c = toupper(*buff++);
+ }
+ if ((buff == startptr) || (term_char(c) == FALSE))
+ return(-1);
+ *okflag = TRUE;
+ return(num);
+ }
+
+ /*
+ * Check for an octal number, or just zero.
+ */
+ startptr = buff-1;
+ while ((c >= '0') && (c <= '7')) {
+ num = num*8 + (c - '0');
+ c = *buff++;
+ }
+ if (buff == startptr || (term_char(c) == FALSE))
+ return(-1);
+ *okflag = TRUE;
+ return(num);
+ }
+
+ /*
+ * No leading zero, looks like a positive decimal number.
+ */
+ startptr = buff;
+ while ((c >= '0') && (c <= '9')) {
+ num = num*10 + (c - '0');
+ c = *buff++;
+ }
+ if ((buff == startptr) || (term_char(c) == FALSE))
+ return(-1);
+ *okflag = TRUE;
+ return(num);
+}
+/*
+ * parse_signed
+ * Parse an unsigned number.
+ * If number starts with '0x', interpret as hexadecimal.
+ * If number starts with '0', interpret as octal.
+ * Anything else is assigned to be unsigned decimal.
+ * Returns OKFLAG=FALSE on error else okflag=TRUE.
+ */
+
+ulong parse_signed (
+ char *buff,
+ boolean *okflag)
+{
+ char c;
+ ulong num;
+ char *startptr;
+ int sign = 1;
+
+ *okflag = FALSE;
+
+ if (null(buff))
+ return(0);
+
+ buff = deblank(buff);
+ num = 0;
+
+ while ((c = *buff++) == '+')
+ ;
+ while ((c = *buff++) == '-')
+ sign = sign * -1;
+
+ if (c == '0') {
+
+ /*
+ * If '0x', we've parsed a hexadecimal number
+ */
+ if ((*buff == 'x') || (*buff == 'X')) {
+ buff++;
+ c = toupper(*buff++);
+ startptr = buff;
+ while (((c >= '0') && (c <= '9')) || ((c >= 'A') && (c <= 'F'))) {
+ if ((c >= '0') && (c <= '9'))
+ num = num*16 + (c - '0');
+ else
+ num = num*16 + (c - '7');
+ c = toupper(*buff++);
+ }
+ if ((buff == startptr) || (term_char(c) == FALSE))
+ return(0);
+ *okflag = TRUE;
+ return(num);
+ }
+
+ /*
+ * Check for an octal number, or just zero.
+ */
+ startptr = buff-1;
+ while ((c >= '0') && (c <= '7')) {
+ num = num*8 + (c - '0');
+ c = *buff++;
+ }
+ if (buff == startptr || (term_char(c) == FALSE))
+ return(0);
+ *okflag = TRUE;
+ return(num*sign);
+ }
+
+ /*
+ * No leading zero, looks like a positive decimal number.
+ */
+ startptr = buff;
+ while ((c >= '0') && (c <= '9')) {
+ num = num*10 + (c - '0');
+ c = *buff++;
+ }
+ if ((buff == startptr) || (term_char(c) == FALSE))
+ return(0);
+ *okflag = TRUE;
+ return(num*sign);
+}
+
+/*
+ * parse_decimal_long
+ * Parse an unsigned decimal number.
+ * Returns -1 on error.
+ */
+
+ulong parse_decimal_long (char *buff, boolean *okflag)
+{
+ char c;
+ ulong num;
+ char *startptr;
+
+ *okflag = FALSE;
+
+ if (null(buff))
+ return(-1);
+ buff = deblank(buff);
+ num = 0;
+ c = *buff++;
+
+ startptr = buff;
+ while ((c >= '0') && (c <= '9')) {
+ num = num*10 + (c - '0');
+ c = *buff++;
+ }
+ if (buff == startptr)
+ return(-1);
+ *okflag = TRUE;
+ return(num);
+}
+
+/*
+ * parse_hex_long
+ * Parse a 32 bit hex number from a string buffer. Return 0 if a bad number
+ */
+
+ulong parse_hex_long (char *buff)
+{
+ char c;
+ ulong num;
+ char *startptr;
+
+ if (null(buff))
+ return(0);
+ buff = deblank(buff);
+ num = 0;
+ c = toupper(*buff++);
+ startptr = buff;
+ while (((c >= '0') && (c <= '9')) || ((c >= 'A') && (c <= 'F'))) {
+ if ((c >= '0') && (c <= '9'))
+ num = num*16 + (c - '0');
+ else
+ num = num*16 + (c - '7');
+ c = toupper(*buff++);
+ }
+ if ((buff == startptr) ||
+ (c != '.' && c != ':' && term_char(c) == FALSE) )
+ return(0L);
+ return(num);
+}
+
+/*
+ * octet
+ * parse one octet of a protocol address (IP, DECnet, etc.).
+ * Returns valid char pointer on success, nil pointer otherwise
+ */
+
+char *octet (char *ptr, ulong *address, char brkchar)
+{
+ ulong i = 0; /* accumulate number here */
+ char c; /* get first character */
+
+ if (null(ptr)) /* make sure pointer is reasonable */
+ return(NULL);
+ c = *ptr++;
+ while ((c >= '0') && (c <= '9')) { /* while it's a number */
+ i = i*10 + ((int) c - '0'); /* add a digit */
+ c = *ptr++; /* get next character */
+ }
+ if ((i <= 255) && (c == brkchar)) { /* sanity and break check */
+ *address = (*address << 8) + i; /* form more of the address */
+ return(ptr); /* give a good return */
+ } else
+ return(NULL); /* bad number or termination */
+}
+
+/*
+ * t_number
+ * Return TRUE if string is a number
+ */
+
+boolean t_number (char *s)
+{
+ char c;
+
+ if (null(s))
+ return(FALSE);
+ s = deblank(s);
+ c = *s++;
+ while ((term_char(c) == FALSE)) {
+ if (c < '0' || c > '9')
+ return(FALSE);
+ c = *s++;
+ }
+ return(TRUE);
+}
+
+/*
+ * notset
+ * Given a non-zero integer argument, print as a decimal number.
+ * If zero, as the string "not set".
+ */
+
+void notset (int arg)
+{
+ if (arg == 0)
+ printf("not set");
+ else
+ printf("%d", arg);
+}
+
+/*
+ * is_printable_string
+ * Is this a printable ascii string?
+ * Return FALSE if any byte in the supposed string is not an ascii
+ * printable character, else, return TRUE.
+ * The NULL string is not considered a string by this routine.
+ */
+
+boolean is_printable_string (const char *s, int size)
+{
+ char ch;
+ int i;
+
+ if (!s || !size)
+ return(FALSE);
+ for (i=0; i<size; i++) {
+ ch = *s++;
+ if (!isprint(ch)) /* check for printable ascii character */
+ return(FALSE);
+ }
+ return(TRUE); /* All characters are ascii printable*/
+}
+
+/*
+ * int_array_op
+ * Perform addition and deletion operations on an arbitrary sized
+ * integer array.
+ *
+ * Return TRUE if operation succeeded; FALSE otherwise.
+ *
+ * add is a boolean to add to the array. If FALSE, remove from array.
+ */
+
+boolean int_array_op (int *array, int *index, int maxx, int value,
+ boolean add)
+{
+ int i;
+
+ for (i = 0; i < *index; i++)
+ if (array[i] == value)
+ break;
+ if (!add) {
+ if (i >= *index)
+ return(FALSE);
+ if (i != maxx - 1)
+ while (i < maxx - 1) {
+ array[i] = array[i+1];
+ i++;
+ }
+ (*index)--;
+ } else if (i >= *index) { /* not found in list */
+ if (i == maxx - 1)
+ return(FALSE);
+ array[*index] = value;
+ (*index)++;
+ }
+ return(TRUE);
+}
+
+/*
+ * strmatch
+ * If nullok is non zero, null string will match
+ */
+
+boolean strmatch (char *str1, char *cmd, boolean nullok)
+{
+ char c, d;
+
+ if (null(str1)) /* if a null pointer */
+ str1 = ""; /* make it instead reference a null string */
+ str1 = deblank(str1);
+ if (!nullok) {
+ c = *str1;
+ d = *cmd;
+ if (c == '\0' || d == '\0') /* one is empty */
+ if (c || d)
+ return(FALSE); /* one is not null */
+ else
+ return(TRUE); /* nulls can only match each other */
+ }
+
+ /*
+ * return equal if equal up to a space
+ */
+ d = '\0'; /* in case first c is \0 */
+ while ((c = *str1++) && (d = *cmd++) && c != ' ' && d != ' ')
+ if (toupper(c) != toupper(d))
+ return(FALSE);
+
+ /*
+ * Return FALSE if string is longer than command and we are not
+ * at a space, eg. "testx" will NOT match "test" but "test xxx" will.
+ */
+ if (d == '\0' && c != '\0' && c != ' ')
+ return(FALSE);
+ return(TRUE);
+}
+
+/*
+ * ExactToSPsmatch
+ * Exact match up to a ' ' in source string
+ */
+
+boolean ExactToSPsmatch (char *s, char *t)
+{
+ char c, d;
+
+ while (TRUE) {
+ c = *s++;
+ d = *t++;
+ if (c == ' ' && d == '\0')
+ return(TRUE); /* matched up to a space */
+ if (!c || !d)
+ break; /* end of at least one string */
+ if (toupper (c) != toupper (d))
+ return(FALSE);
+ }
+ if (c || d)
+ return(FALSE); /* only partial match */
+ return(TRUE);
+}
+
+/*
+ * nmatch
+ * Find the number of matches to str, and return that number.
+ */
+
+int nmatch (register char *str, char *const cmds[], const ushort cmdflags[],
+ int ncmds, int *index)
+{
+ int j;
+ int i, len, minlen;
+
+ if (null(str))
+ str = "";
+ i = 0;
+ minlen = 1000; /* large enough */
+ str = deblank(str);
+ for (j = 0; j < ncmds; ++j) {
+ if (strmatch(str, cmds[j], FALSE)) {
+ len = strlen(cmds[j]);
+ if (len < minlen) { /* keep minimums */
+ minlen = len;
+ *index = j;
+ }
+ i++;
+ }
+ }
+ if ((i > 1) && ExactToSPsmatch(str, cmds[*index]))
+ return(TRUE);
+ return(i);
+}
+
+/*
+ * findarg
+ * Return a string pointer to a spot after a space
+ */
+
+char *findarg (char *str)
+{
+ if (null(str))
+ return(NULL);
+ str = deblank(str);
+ while (*str && *str++ != ' '); /* to end or after first space */
+ if (!*str)
+ return(NULL);
+ str = (char *) deblank(str);
+ return(str);
+}
+
+/*
+ * return_false, return_true
+ * Stub functions that always return TRUE or FALSE
+ */
+
+boolean return_false (void *dummy, ...)
+{
+ return(FALSE);
+}
+
+boolean return_true (void *dummy, ...)
+{
+ return(TRUE);
+}
+
+fuzzy return_fuz_false (void *dummy, ...)
+{
+ return(FUZ_FALSE);
+}
+fuzzy return_fuz_true (void *dummy, ...)
+{
+ return(FUZ_TRUE);
+}
+
+uchar *return_null (void *dummy, ...)
+{
+ return(NULL);
+}
+
+long return_zero (void)
+{
+ return(0L);
+}
+
+long return_one (void)
+{
+ return(1L);
+}
+
+void return_nothing (void *dummy, ...)
+{
+ return;
+}
+
+/*
+ * instring
+ */
+boolean instring (char *query, char *string)
+{
+ char *p, *q;
+ int i, limit;
+
+ /* Quick tests */
+ if (query == NULL || *query == '\0')
+ return(TRUE);
+ if (string == NULL || *string == '\0')
+ return(FALSE);
+
+ limit = strlen(string) - strlen(query) + 1;
+ for (i = 0; i < limit; i++) {
+ p = query;
+ q = string+i;
+ while (tolower(*p++) == tolower(*q++))
+ if (*p == '\0')
+ return(TRUE);
+ }
+ return(FALSE);
+}
+
+/*
+ * str_cat_with_realloc
+ *
+ * Concatenate source string on dest string. If dest string is not
+ * large enough to hold result (determined by comparing needed size
+ * with destsize), a new buffer is allocated. The buffer is resized
+ * by STRING_BUF_CHARS bytes.
+ */
+void
+strcat_with_realloc(char **dest, uint *destsize, char *src)
+{
+ char *newbuf;
+
+ while (strlen(src) >= *destsize - strlen(*dest)) {
+ newbuf = realloc(*dest, *destsize + STRING_BUF_CHARS);
+ if (newbuf) {
+ *destsize += STRING_BUF_CHARS;
+ *dest = newbuf;
+ } else
+ return;
+ }
+ strcat(*dest, src);
+}
+
+/* safe_sprintf
+ *
+ * Works like sprintf, only it takes a pointer to a buffer, dest, and
+ * a pointer to the size of the buffer. Routine will pass back results
+ * in the buffer. Buffer may be reallocated if additional space is
+ * needed. Routine returns number of characters processed.
+ */
+int
+safe_sprintf (char **dest, uint *destsize, const char *fmt, ...)
+{
+ char *workbuf = string_getnext();
+ va_list argp;
+ int count;
+ boolean allocated = FALSE;
+
+ /* Calculate how many bytes we need */
+ va_start(argp, fmt);
+ count = _doprnt(NULL, NULLTTY, fmt, argp, FALSE);
+ va_end(argp);
+
+ /* If standard buffer not big enough then allocate one */
+ if (count >= STRING_BUF_CHARS - 1) {
+ workbuf = PARSERmalloc(count + 1);
+ if (workbuf == NULL)
+ return 0;
+ allocated = TRUE;
+ }
+
+ va_start(argp, fmt);
+ count = _doprnt(workbuf, NULL, fmt, argp, FALSE);
+ va_end(argp);
+ workbuf[count] = '\0';
+
+ strcat_with_realloc(dest, destsize, workbuf);
+
+ if (allocated)
+ PARSERfree(workbuf);
+ return count;
+}
+
+/*
+ * queuepick - Pick an element in a queue, by index
+ *
+ * This routine is used to return the pointer to an arbitrary element in
+ * a linked list, passing the address of the queue head and an index
+ * number.
+ *
+ * This allows walking through a queue "by index" which can be used to
+ * avoid poison-free crashes. The index is zero-based (zero gives you
+ * the "first" element in the queue).
+ */
+
+
+void *queuepick (void *queue, int index)
+{
+ void *ptr;
+
+ for (ptr = *(void **)queue; ptr; ptr = *(void **)ptr)
+ if (index-- == 0)
+ break;
+ return(ptr);
+}
+
+/*
+ * xnethash
+ * Hash addresses
+ */
+
+uint xnethash (register uchar *addr, register ushort len)
+{
+ register uint i, sum;
+
+ sum = 0;
+ for (i = 0; i < len; i++)
+ sum += addr[i];
+ return sum;
+}
+
+/*
+ * lw_insert -- insert an element into a doubly-linked list.
+ *
+ *
+ * Insert new entry "entry" in list after element "pred"
+ * NOTE: an empty list is formed by having the initial element
+ * have both the flink and blink point to itself. Think of this
+ * as a queue (ie, a circular list) rather than a simple
+ * double-linked list where the terminal elements point to NULL.
+ */
+void lw_insert (dqueue_t *entry, dqueue_t *pred)
+{
+ pred->flink->blink = entry;
+ entry->flink = pred->flink;
+ entry->blink = pred;
+ pred->flink = entry;
+}
+
+/*
+ * lw_remove -- remove an element from a doubly-linked list.
+ *
+ * removes entry "entry"
+ * Note that the removed element has its flink & blink set to point
+ * to itself.
+ */
+void lw_remove (dqueue_t *entry)
+{
+ entry->blink->flink = entry->flink;
+ entry->flink->blink = entry->blink;
+ entry->flink = entry->blink = entry;
+}
+
+void o_init (dqueue_t *entry, void *parent)
+{
+ entry->flink = entry;
+ entry->blink = entry;
+ entry->parent = parent;
+ TIMER_STOP(entry->value);
+}
+
+void o_enqueue (dqueue_t *header, dqueue_t *entry)
+{
+ dqueue_t *p;
+
+ for (p = header->flink; p != header; p = p->flink) {
+ if (TIMER_LATER(p->value, entry->value))
+ break;
+ }
+
+ entry->flink = p->blink->flink;
+ p->blink->flink = entry;
+ entry->blink = p->blink;
+ p->blink = entry;
+}
+
+dqueue_t *o_dequeue (dqueue_t *header)
+{
+ dqueue_t *p;
+
+ if (header->flink == header)
+ return(NULL);
+ if (SLEEPING(header->flink->value))
+ return(NULL);
+ p = header->flink;
+ p->flink->blink = p->blink;
+ p->blink->flink = p->flink;
+ p->flink = p->blink = p;
+ TIMER_STOP(p->value);
+ return(p);
+}
+
+void o_unqueue (dqueue_t *entry)
+{
+ entry->flink->blink = entry->blink;
+ entry->blink->flink = entry->flink;
+ entry->flink = entry->blink = entry;
+ TIMER_STOP(entry->value);
+}
+
+/*
+ * nethash
+ * Given a 32 bit quantity, return an 8 bit hash table offset.
+ * We use XOR'ing as our hash function to avoid division overhead.
+ */
+
+int nethash (ulong addr)
+{
+ register ushort bucket;
+ register charlong address;
+
+ address.d.lword = addr;
+
+ bucket = address.d.sword[0];
+ bucket ^= address.d.sword[1];
+ bucket ^= (bucket >> 8);
+ bucket &= 0xFF;
+ return(bucket);
+}
+
+/*
+ * strdup()
+ * malloc() a new string, and copy old string to new memory
+ */
+char *strdup (const char *oldstr)
+{
+ char *newstr;
+ SAVE_CALLER();
+
+ if (oldstr == NULL)
+ return(NULL);
+
+ newstr = PARSERmalloc(strlen(oldstr) + 1);
+ if (newstr == NULL) {
+ return(NULL);
+ }
+ strcpy(newstr, oldstr);
+ memory_specify_allocator(newstr, caller());
+ return(newstr);
+}
+
+/*
+ * malloc_named() a new string, and copy old string to new memory
+ */
+char *strdup_named (const char *oldstr, const char *name)
+{
+ char *newstr;
+ SAVE_CALLER();
+
+ if (oldstr == NULL)
+ return(NULL);
+
+ newstr = malloc_named(strlen(oldstr) + 1, name);
+ if (newstr == NULL) {
+ return(NULL);
+ }
+ strcpy(newstr, oldstr);
+ memory_specify_allocator(newstr, caller());
+ return(newstr);
+}
+
+char *
+address_string (addrtype *address)
+{
+ char *buffer;
+
+ buffer = string_getnext();
+ reg_invoke_sprintf_address_addr(address->type, buffer, address);
+ return(buffer);
+}
+
+
+
+#endif /* IOS_PARSER */
+
diff --git a/data/mnet/Common/cli/vxsh/Makefile b/data/mnet/Common/cli/vxsh/Makefile
new file mode 100644
index 0000000..0aea1d6
--- /dev/null
+++ b/data/mnet/Common/cli/vxsh/Makefile
@@ -0,0 +1,103 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+#EXT = arppc
+
+# These Must be Properly Defined
+THIS_APP_DIR = vxsh
+THIS_DIRECTORY = Src
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\vxsh.out
+else
+ MY_OUTPUT = $(OBJDIR)\vxsh.out
+endif
+
+
+VOB2DIR = $(TOP_OF_VOB)\..\$(VOB)
+BINDIR = ..\bin
+
+#LIBNAME = libppc860gnuvx.a
+LIBNAME = lib$(CPU)$(TOOL)vx.a
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(VOB2DIR)\l3defs.mk
+CC_INCLUDE += -I$(VOB2DIR)\Host
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+
+ @ echo Copying $(LIBNAME).copy to $(LIBNAME)
+ $(CP) $(WIND_BASE)\target\lib\$(LIBNAME).copy $(OBJDIR)\$(LIBNAME)
+ attrib -R $(OBJDIR)\$(LIBNAME)
+
+ $(AR) -x $(OBJDIR)\$(LIBNAME) shell.o
+ $(AR) -x $(OBJDIR)\$(LIBNAME) shellLib.o
+ $(AR) -x $(OBJDIR)\$(LIBNAME) ledLib.o
+
+ $(AR) -dv $(WIND_BASE)\$(LIBNAME) shellLib.o
+ $(AR) -dv $(WIND_BASE)\$(LIBNAME) shell.o
+ $(AR) -dv $(WIND_BASE)\$(LIBNAME) ledLib.o
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o) shell.o shellLib.o ledLib.o
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) shell.o shellLib.o ledLib.o
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) src\*.o
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif
+
+# Create libPENTIUM
+library: $(MODULE_OBJS)
+ @ echo Copying $(LIBNAME).copy to $(LIBNAME)
+ $(CP) $(WIND_BASE)\target\lib\$(LIBNAME).copy $(WIND_BASE)\target\lib\$(LIBNAME)
+ $(CP) $(WIND_BASE)\target\lib\$(LIBNAME) $(OBJDIR)\$(LIBNAME)
+ $(AR) -dv $(WIND_BASE)\target\lib\$(LIBNAME) shellLib.o
+ $(AR) -dv $(WIND_BASE)\target\lib\$(LIBNAME) shell.o
+ $(AR) -dv $(WIND_BASE)\target\lib\$(LIBNAME) ledLib.o
+ attrib -R $(OBJDIR)\$(LIBNAME)
+
+
+
+extract : $(MODULE_OBJS)
+ $(AR) -x $(OBJDIR)\$(LIBNAME) shell.o
+ $(AR) -x $(OBJDIR)\$(LIBNAME) shellLib.o
+ $(AR) -x $(OBJDIR)\$(LIBNAME) ledLib.o
+
+
+
+
+
diff --git a/data/mnet/Common/cli/vxsh/vxsh.c b/data/mnet/Common/cli/vxsh/vxsh.c
new file mode 100644
index 0000000..0831a96
--- /dev/null
+++ b/data/mnet/Common/cli/vxsh/vxsh.c
@@ -0,0 +1,9 @@
+
+#include <vxworks.h>
+#include <stdioLib.h>
+
+void Cli_VxshellInformation(void){
+
+ printf("\nVxShell is the shell provide by vxworks original library ");
+ printf("\nIt provides user a command prompt ,which executes all the standard vxworks functions\n");
+}
diff --git a/data/mnet/Common/gglink/Makefile b/data/mnet/Common/gglink/Makefile
new file mode 100644
index 0000000..bd4611d
--- /dev/null
+++ b/data/mnet/Common/gglink/Makefile
@@ -0,0 +1,47 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+# (OPTIONAL) Append REPLACE - Replaces the List of directories
+# to be used in the SUBDIRS variable
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src REPLACE=src
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+SUBDIRS = src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+VOBDIR = $(TOP_OF_VOB)\$(VOB)
+
+# Allows a sub-set of the source code directories to be used
+
+ifneq ($(REPLACE),)
+ SUBDIRS = $(REPLACE)
+endif
+
+include $(VOBDIR)\l3defs.mk
+
+
diff --git a/data/mnet/Common/gglink/src/Makefile b/data/mnet/Common/gglink/src/Makefile
new file mode 100644
index 0000000..54ea964
--- /dev/null
+++ b/data/mnet/Common/gglink/src/Makefile
@@ -0,0 +1,61 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# Name of this App's Directory
+THIS_APP_DIR = gglink
+
+VOB2DIR = $(TOP_OF_VOB)\$(VOB)
+BINDIR = ..\bin
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\$(THIS_APP_DIR).out
+else
+ MY_OUTPUT = $(OBJDIR)\$(THIS_APP_DIR).out
+endif
+
+include $(VOB2DIR)\l3defs.mk
+
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) -r -o $@.tmp $(MODULE_OBJS)
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
diff --git a/data/mnet/Common/gglink/src/gglink.cpp b/data/mnet/Common/gglink/src/gglink.cpp
new file mode 100644
index 0000000..146864b
--- /dev/null
+++ b/data/mnet/Common/gglink/src/gglink.cpp
@@ -0,0 +1,1178 @@
+
+#include <string.h>
+#include "gglink/gglink_api.h"
+
+BOOL
+GGLINK_UNPACK_SHORT(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ short &dest
+ )
+{
+ if(maxlength < 2)
+ return FALSE;
+ dest = (ptr[0] << 8) + ptr[1];
+ ptr+=2;
+ maxlength-=2;
+ return TRUE;
+}
+
+inline BOOL
+GGLINK_UNPACK_BYTE(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ unsigned char &dest
+ )
+{
+ if (maxlength < 1)
+ return FALSE;
+
+ dest = *ptr++;
+ maxlength--;
+
+ return TRUE;
+}
+
+inline BOOL
+GGLINK_UNPACK_STRING(
+ int &maxlength, // max length of input buffer
+ int stringlength, // size of the string to be unpacked
+ unsigned char * &ptr, // starting address of input buffer
+ unsigned char * dest
+ )
+{
+ if(maxlength < stringlength)
+ return FALSE;
+
+ memcpy(dest, ptr, stringlength);
+ ptr += stringlength;
+ maxlength -= stringlength;
+ return TRUE;
+}
+
+
+BOOL GGLINK_DECODE_IE_MAP_CAUSE(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input
+ GGLINK_IE_MAP_CAUSE &map_cause // output IE data structure
+ )
+{
+ map_cause.ie_present = true;
+ return GGLINK_UNPACK_BYTE(maxlength, ptr, map_cause.map_error_code);
+}
+
+BOOL GGLINK_DECODE_IE_CAUSE(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_IE_CAUSE &cause // output IE data structure
+ )
+{
+ cause.ie_present = true;
+ return GGLINK_UNPACK_BYTE(maxlength, ptr, cause.cause_code);
+}
+
+
+
+BOOL GGLINK_DECODE_IE_GSN_ADDRESS(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_IE_GSN_ADDRESS &gsn_address // output IE data structure
+ )
+{
+ gsn_address.ie_present = true;
+ if (!GGLINK_UNPACK_SHORT(maxlength, ptr, gsn_address.gsn_addr_length))
+ return FALSE;
+
+ if(gsn_address.gsn_addr_length > 16)
+ return FALSE;
+
+ return GGLINK_UNPACK_STRING(maxlength, gsn_address.gsn_addr_length, ptr, gsn_address.addr_octets);
+}
+
+
+BOOL GGLINK_DECODE_IE_MOBILE_ID(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ T_CNI_RIL3_IE_MOBILE_ID &mobileId // output IE data structure
+ )
+{
+
+ int totalLength = ptr[0] + 1;
+
+ if (maxlength < totalLength)
+ {
+ return FALSE;
+ }
+
+ mobileId.ie_present = true;
+
+ // get type
+ mobileId.mobileIdType = (T_CNI_RIL3_MOBILE_ID_TYPE) (ptr[1] & 0x07);
+
+ if(mobileId.mobileIdType == CNI_RIL3_TMSI)
+ {
+ // assuming tmsi is 4 bytes
+ if(totalLength != 6) return FALSE;
+ mobileId.tmsi = (ptr[2] << 24) +
+ (ptr[3] << 16) +
+ (ptr[4] << 8) +
+ ptr[5]
+ ;
+ }
+ else
+ {
+ bool oddInd = (ptr[1] & 0x08)? true: false;
+
+ mobileId.numDigits = (totalLength - 2) * 2;
+ if(oddInd) mobileId.numDigits +=1;
+
+ mobileId.digits[0] = ptr[1] >> 4;
+
+ int bufferIndex, digitIndex;
+ for(bufferIndex=2, digitIndex = 1;
+ bufferIndex < totalLength;
+ bufferIndex++)
+ {
+ mobileId.digits[digitIndex++] =
+ ptr[bufferIndex] & 0x0f;
+ mobileId.digits[digitIndex++] =
+ ptr[bufferIndex] >> 4;
+ }
+ }
+
+ maxlength -= totalLength;
+ ptr += totalLength;
+
+ return TRUE;
+}
+
+
+// T_AUTH_TRIPLET is defined in the C only header file and used in embedded C only struct,
+// so can't pass by reference
+BOOL GGLINK_DECODE_AUTH_TRIPLET(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ T_AUTH_TRIPLET *triplet // output IE data structure
+ )
+{
+ int i;
+ int tripletlength = SEC_RAND_LEN + SEC_SRES_LEN + SEC_KC_LEN;
+
+ if(maxlength < tripletlength) return FALSE;
+ for(i=0;i<SEC_RAND_LEN;i++) triplet->RAND[i] = *ptr++;
+ for(i=0;i<SEC_SRES_LEN;i++) triplet->SRES[i] = *ptr++;
+ for(i=0;i<SEC_KC_LEN;i++) triplet->Kc[i] = *ptr++;
+ maxlength -= tripletlength;
+
+ return TRUE;
+}
+
+BOOL GGLINK_DECODE_IE_AUTH_LIST(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ T_SEC_IE_AUTH_LIST &auth_set // output IE data structure
+ )
+{
+ int i, num;
+
+ auth_set.num_set = num = *ptr++;
+ maxlength--;
+
+ if(num > SEC_MAX_TRIPLET){
+ printf("Err. auth triplet list number too large : %d\n", num);
+ return FALSE;
+ }
+
+ for(i=0; i<num; i++){
+ if (!GGLINK_DECODE_AUTH_TRIPLET(maxlength, ptr, &auth_set.triplet[i]))
+ return FALSE;
+ }
+
+ // sanity check
+ if (maxlength < 0) {
+ printf("GGLINK_DECODE_IE_AUTH_LIST buffer length too short \n");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+BOOL
+GGLINK_DECODE_IE_ROUTING_AREA_ID(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ T_CNI_RIL3_IE_ROUTING_AREA_ID &ie // output IE data structure
+ )
+{
+ if(maxlength<6) return FALSE;
+
+ // IE-specific processing
+ ie.ie_present = true;
+
+ ie.mcc[0] = (*ptr) & 0x0F; // MCC 1
+ ie.mcc[1] = ((*ptr) & 0xF0) >> 4; // MCC 2
+ ptr++;
+ ie.mcc[2] = (*ptr) & 0x0F; // MCC 3
+ ie.mnc[2] = ((*ptr) & 0xF0) >> 4; // MNC 3
+ ptr++;
+ ie.mnc[0] = (*ptr) & 0x0F; // MNC 1
+ ie.mnc[1] = ((*ptr) & 0xF0) >> 4; // MNC 2
+ ptr++;
+ ie.lac = *ptr++;
+ ie.lac = (ie.lac << 8) + *ptr++;
+ ie.rac = *ptr++;
+
+ maxlength-=6;
+
+ return TRUE;
+}
+
+BOOL
+GGLINK_DECODE_API_MSG_GS_SRQ(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ )
+{
+ msg.msg_type = GGLINK_API_MSG_GS_SRQ;
+
+ return GGLINK_DECODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.security_req.imsi);
+}
+
+
+BOOL
+GGLINK_DECODE_API_MSG_GS_SRS(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ )
+{
+ msg.msg_type = GGLINK_API_MSG_GS_SRS;
+
+ if (!GGLINK_DECODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.security_rsp.imsi))
+ return FALSE;
+
+ return GGLINK_DECODE_IE_AUTH_LIST(maxlength, ptr, msg.msg.security_rsp.triplet_list);
+}
+
+BOOL
+GGLINK_DECODE_API_MSG_GS_RRQ(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ )
+{
+ msg.msg_type = GGLINK_API_MSG_GS_RRQ;
+
+ if (!GGLINK_DECODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.ra_update_req.imsi))
+ return FALSE;
+
+ return GGLINK_DECODE_IE_ROUTING_AREA_ID(maxlength, ptr, msg.msg.ra_update_req.rai);
+}
+
+BOOL
+GGLINK_DECODE_API_MSG_GS_RCF(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ )
+{
+ msg.msg_type = GGLINK_API_MSG_GS_RCF;
+
+ return GGLINK_DECODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.ra_update_cnf.imsi);
+
+}
+
+BOOL
+GGLINK_DECODE_API_MSG_GS_RRJ(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ )
+{
+ msg.msg_type = GGLINK_API_MSG_GS_RRJ;
+
+ if (!GGLINK_DECODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.ra_update_rej.imsi))
+ return FALSE;
+
+ short rejectCause;
+ if (!GGLINK_UNPACK_SHORT(maxlength, ptr, rejectCause))
+ return FALSE;
+
+ msg.msg.ra_update_rej.cause = (T_CNI_RIL3_REJECT_CAUSE_VALUE)rejectCause;
+ return TRUE;
+}
+
+BOOL
+GGLINK_DECODE_API_MSG_GS_PRQ(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ )
+{
+ msg.msg_type = GGLINK_API_MSG_GS_PRQ;
+
+ return GGLINK_DECODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.profile_req.imsi);
+
+}
+
+BOOL
+GGLINK_DECODE_API_MSG_GS_PRS(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ )
+{
+ msg.msg_type = GGLINK_API_MSG_GS_PRS;
+
+ if (!GGLINK_DECODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.profile_rsp.imsi))
+ return FALSE;
+
+ if (!GGLINK_UNPACK_SHORT(maxlength, ptr, msg.msg.profile_rsp.data_size))
+ return FALSE;
+
+ if(msg.msg.profile_rsp.data_size > 1024) {
+ printf("GGLINK_DECODE_API_MSG_GS_PRS data length too long", msg.msg.profile_rsp.data_size);
+ return FALSE;
+ }
+
+ return GGLINK_UNPACK_STRING(maxlength, msg.msg.profile_rsp.data_size, ptr, (unsigned char *)msg.msg.profile_rsp.data);
+
+}
+
+BOOL
+GGLINK_DECODE_API_MSG_GS_URQ(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ )
+{
+ msg.msg_type = GGLINK_API_MSG_GS_URQ;
+
+ return GGLINK_DECODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.unregister_req.imsi);
+
+}
+
+BOOL
+GGLINK_DECODE_API_MSG_SRI_REQ(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ )
+{
+ msg.msg_type = GGLINK_API_MSG_SRI_REQ;
+
+ if(!GGLINK_UNPACK_SHORT(maxlength, ptr, msg.msg.send_routing_info_req.gsn_seqno))
+ return FALSE;
+
+ if(!GGLINK_DECODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.send_routing_info_req.imsi))
+ return FALSE;
+
+ return GGLINK_DECODE_IE_GSN_ADDRESS(maxlength, ptr, msg.msg.send_routing_info_ack.ggsn_addr);
+}
+
+BOOL
+GGLINK_DECODE_API_MSG_SRI_ACK(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ )
+{
+ msg.msg_type = GGLINK_API_MSG_SRI_ACK;
+
+ if (!GGLINK_UNPACK_SHORT(maxlength, ptr, msg.msg.send_routing_info_req.gsn_seqno))
+ return FALSE;
+
+ if (!GGLINK_DECODE_IE_CAUSE(maxlength, ptr, msg.msg.send_routing_info_ack.cause))
+ return FALSE;
+
+ if (!GGLINK_DECODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.send_routing_info_ack.imsi))
+ return FALSE;
+
+ if (msg.msg.send_routing_info_ack.cause.cause_code == GGLINK_CAUSE_REQ_ACCEPTED) {
+ if(!GGLINK_DECODE_IE_GSN_ADDRESS(maxlength, ptr, msg.msg.send_routing_info_ack.sgsn_addr))
+ return FALSE;
+
+ return GGLINK_DECODE_IE_GSN_ADDRESS(maxlength, ptr, msg.msg.send_routing_info_ack.ggsn_addr);
+ } else {
+ return GGLINK_DECODE_IE_MAP_CAUSE(maxlength, ptr, msg.msg.send_routing_info_ack.map_cause);
+ }
+}
+
+BOOL
+GGLINK_DECODE_API_MSG_FR(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ )
+{
+ msg.msg_type = GGLINK_API_MSG_FR;
+
+
+ if (!GGLINK_UNPACK_SHORT(maxlength, ptr, msg.msg.fr_req.gsn_seqno))
+ return FALSE;
+
+ return GGLINK_DECODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.fr_req.imsi);
+
+}
+
+BOOL
+GGLINK_DECODE_API_MSG_FR_ACK(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ )
+{
+ msg.msg_type = GGLINK_API_MSG_FR_ACK;
+
+
+ if (!GGLINK_UNPACK_SHORT(maxlength, ptr, msg.msg.fr_ack.gsn_seqno))
+ return FALSE;
+
+ if(! GGLINK_DECODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.fr_ack.imsi))
+ return FALSE;
+
+
+ if(! GGLINK_DECODE_IE_CAUSE(maxlength, ptr, msg.msg.fr_ack.cause))
+ return FALSE;
+
+ msg.msg.fr_ack.map_cause.ie_present = false;
+ if(msg.msg.fr_ack.cause.cause_code != GGLINK_CAUSE_REQ_ACCEPTED)
+ return GGLINK_DECODE_IE_MAP_CAUSE(maxlength, ptr, msg.msg.fr_ack.map_cause);
+
+ return TRUE;
+}
+
+BOOL
+GGLINK_DECODE_API_MSG_GPRS_PRE(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ )
+{
+ msg.msg_type = GGLINK_API_MSG_GPRS_PRE;
+
+ if (!GGLINK_DECODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.ms_gprs_pre_req.imsi))
+ return FALSE;
+
+ return GGLINK_DECODE_IE_GSN_ADDRESS(maxlength, ptr, msg.msg.ms_gprs_pre_req.gsn_addr);
+
+}
+
+BOOL
+GGLINK_DECODE_API_MSG_GPRS_PRE_ACK(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ )
+{
+ msg.msg_type = GGLINK_API_MSG_GPRS_PRE_ACK;
+
+
+ if (!GGLINK_DECODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.ms_gprs_pre_ack.imsi))
+ return FALSE;
+
+ return GGLINK_DECODE_IE_GSN_ADDRESS(maxlength, ptr, msg.msg.ms_gprs_pre_ack.gsn_addr);
+
+}
+
+BOOL
+GGLINK_DECODE_API_MSG_SSRI_REQ(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ )
+{
+ msg.msg_type = GGLINK_API_MSG_SSRI_REQ;
+
+
+ if (!GGLINK_UNPACK_SHORT(maxlength, ptr, msg.msg.ssri_req.gsn_seqno))
+ return FALSE;
+
+ return GGLINK_DECODE_IE_ROUTING_AREA_ID(maxlength, ptr, msg.msg.ssri_req.rai);
+
+}
+
+BOOL
+GGLINK_DECODE_API_MSG_SSRI_RSP(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ )
+{
+ msg.msg_type = GGLINK_API_MSG_SSRI_RSP;
+
+
+ if (!GGLINK_UNPACK_SHORT(maxlength, ptr, msg.msg.ssri_rsp.gsn_seqno))
+ return FALSE;
+
+ if (!GGLINK_DECODE_IE_CAUSE(maxlength, ptr, msg.msg.ssri_rsp.cause))
+ return FALSE;
+
+ if (!GGLINK_DECODE_IE_ROUTING_AREA_ID(maxlength, ptr, msg.msg.ssri_rsp.rai))
+ return FALSE;
+
+ return GGLINK_DECODE_IE_GSN_ADDRESS(maxlength, ptr, msg.msg.ssri_rsp.sgsn_addr);
+
+}
+
+/*
+ * DecodeGGLinkMessage
+ */
+BOOL
+DecodeGGLinkMessage(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ )
+{
+ short msgType, magic;
+ if (!GGLINK_UNPACK_SHORT(maxlength, ptr, msgType))
+ return FALSE;
+
+ // decode magic field
+ if(!GGLINK_UNPACK_SHORT(maxlength, ptr, magic))
+ return FALSE;
+ msg.magic = magic;
+
+ switch(msgType) /* message type */
+ {
+ case GGLINK_API_MSG_GS_SRQ:
+ return GGLINK_DECODE_API_MSG_GS_SRQ(maxlength, ptr, msg);
+ case GGLINK_API_MSG_GS_SRS:
+ return GGLINK_DECODE_API_MSG_GS_SRS(maxlength, ptr, msg);
+ case GGLINK_API_MSG_GS_RRQ:
+ return GGLINK_DECODE_API_MSG_GS_RRQ(maxlength, ptr, msg);
+ case GGLINK_API_MSG_GS_RCF:
+ return GGLINK_DECODE_API_MSG_GS_RCF(maxlength, ptr, msg);
+ case GGLINK_API_MSG_GS_RRJ:
+ return GGLINK_DECODE_API_MSG_GS_RRJ(maxlength, ptr, msg);
+ case GGLINK_API_MSG_GS_PRQ:
+ return GGLINK_DECODE_API_MSG_GS_PRQ(maxlength, ptr, msg);
+ case GGLINK_API_MSG_GS_PRS:
+ return GGLINK_DECODE_API_MSG_GS_PRS(maxlength, ptr, msg);
+ case GGLINK_API_MSG_GS_URQ:
+ return GGLINK_DECODE_API_MSG_GS_URQ(maxlength, ptr, msg);
+ case GGLINK_API_MSG_SRI_REQ:
+ return GGLINK_DECODE_API_MSG_SRI_REQ(maxlength, ptr, msg);
+ case GGLINK_API_MSG_SRI_ACK:
+ return GGLINK_DECODE_API_MSG_SRI_ACK(maxlength, ptr, msg);
+ case GGLINK_API_MSG_FR:
+ return GGLINK_DECODE_API_MSG_FR(maxlength, ptr, msg);
+ case GGLINK_API_MSG_FR_ACK:
+ return GGLINK_DECODE_API_MSG_FR_ACK(maxlength, ptr, msg);
+ case GGLINK_API_MSG_GPRS_PRE:
+ return GGLINK_DECODE_API_MSG_GPRS_PRE(maxlength, ptr, msg);
+ case GGLINK_API_MSG_GPRS_PRE_ACK:
+ return GGLINK_DECODE_API_MSG_GPRS_PRE_ACK(maxlength, ptr, msg);
+ case GGLINK_API_MSG_SSRI_REQ:
+ return GGLINK_DECODE_API_MSG_SSRI_REQ(maxlength, ptr, msg);
+ case GGLINK_API_MSG_SSRI_RSP:
+ return GGLINK_DECODE_API_MSG_SSRI_RSP(maxlength, ptr, msg);
+ case GGLINK_API_MSG_ECHO_REQ:
+ msg.msg_type = GGLINK_API_MSG_ECHO_REQ;
+ return TRUE;
+ case GGLINK_API_MSG_ECHO_RSP:
+ msg.msg_type = GGLINK_API_MSG_ECHO_RSP;
+ return TRUE;
+
+ default:
+ printf( "Decode error: Non supported message for gglink %d\n",msgType);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/*************************************************************************************************************/
+inline BOOL
+GGLINK_PACK_SHORT(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ short value
+ )
+{
+ if(maxlength < 2)
+ return FALSE;
+ *ptr++ = value>>8;
+ *ptr++ = (unsigned char) value;
+
+ maxlength-=2;
+
+ return TRUE;
+}
+
+inline BOOL
+GGLINK_PACK_BYTE(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ unsigned char value
+ )
+{
+ if (maxlength < 1)
+ return FALSE;
+
+ *ptr++ = value;
+ maxlength--;
+
+ return TRUE;
+}
+
+inline BOOL
+GGLINK_PACK_STRING(
+ int &maxlength, // max length of output buffer
+ int stringlength, // size of the string to be packed
+ unsigned char * &ptr, // starting address of output buffer
+ unsigned char * src
+ )
+{
+ if(maxlength < stringlength)
+ return FALSE;
+
+ memcpy(ptr, src, stringlength);
+ ptr += stringlength;
+ maxlength -= stringlength;
+
+ return TRUE;
+}
+
+BOOL GGLINK_ENCODE_IE_CAUSE(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ GGLINK_IE_CAUSE &cause // input IE data structure
+ )
+{
+ if(!cause.ie_present) return FALSE;
+ return GGLINK_PACK_BYTE(maxlength, ptr, cause.cause_code);
+}
+
+BOOL GGLINK_ENCODE_IE_MAP_CAUSE(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ GGLINK_IE_MAP_CAUSE &map_cause // input IE data structure
+ )
+{
+ if(!map_cause.ie_present) return FALSE;
+ return GGLINK_PACK_BYTE(maxlength, ptr, map_cause.map_error_code);
+
+}
+
+
+
+BOOL GGLINK_ENCODE_IE_GSN_ADDRESS(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ GGLINK_IE_GSN_ADDRESS &gsn_address // input IE data structure
+ )
+{
+
+ if (!GGLINK_PACK_SHORT(maxlength, ptr, gsn_address.gsn_addr_length))
+ return FALSE;
+
+ if(gsn_address.gsn_addr_length > 16 ||
+ gsn_address.gsn_addr_length < 0)
+ return FALSE;
+
+ return GGLINK_PACK_STRING(maxlength, gsn_address.gsn_addr_length, ptr, gsn_address.addr_octets);
+}
+
+
+BOOL
+GGLINK_ENCODE_IE_MOBILE_ID(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ T_CNI_RIL3_IE_MOBILE_ID &mobileId // input IE data structure
+ )
+{
+
+ if(mobileId.ie_present == FALSE)
+ return FALSE;
+
+ ptr[1] = mobileId.mobileIdType;
+
+ if(mobileId.mobileIdType == CNI_RIL3_TMSI)
+ {
+ ptr[0] = 5;
+ ptr[1] |= 0xf0;
+ ptr[2] = (unsigned char) (mobileId.tmsi >> 24);
+ ptr[3] = (unsigned char) (mobileId.tmsi >> 16);
+ ptr[4] = (unsigned char) (mobileId.tmsi >> 8);
+ ptr[5] = (unsigned char) (mobileId.tmsi);
+ maxlength -= 6;
+ ptr += 6;
+ } else
+ {
+
+ unsigned char odd = (mobileId.numDigits % 2)? 0x08: 0x00;
+
+ if (mobileId.numDigits <0 || mobileId.numDigits>CNI_RIL3_MAX_ID_DIGITS)
+ return FALSE;
+
+ int ieLength = 2 + (mobileId.numDigits/2);
+ ptr[0] = ieLength - 1;
+ ptr[1] |= ((mobileId.digits[0] << 4) | odd);
+
+ maxlength -=ieLength;
+
+ if(mobileId.numDigits < 2)
+ {
+ ptr +=ieLength;
+ return TRUE;
+ }
+
+ int bufferIndex = 2;
+ int loopCount = (mobileId.numDigits/2) - 1 ;
+ int digit;
+ int i;
+ for(i=0, digit=1; i < loopCount; i++)
+ {
+ ptr[bufferIndex] = mobileId.digits[digit++];
+ ptr[bufferIndex++] |= mobileId.digits[digit++] << 4;
+ }
+
+ if(odd)
+ {
+ ptr[bufferIndex] = mobileId.digits[digit++];
+ ptr[bufferIndex] |= mobileId.digits[digit++] << 4;
+ }
+ else // even digits
+ {
+ // encode last digit
+ ptr[bufferIndex] = mobileId.digits[digit] | 0xf0;
+ }
+
+ ptr += ieLength;
+ }
+
+ return TRUE;
+}
+
+
+bool GGLINK_ENCODE_AUTH_TRIPLET(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ T_AUTH_TRIPLET *triplet // input IE data structure
+ )
+{
+
+ int tripletlength = SEC_RAND_LEN + SEC_SRES_LEN + SEC_KC_LEN;
+ if (maxlength < tripletlength)
+ return FALSE;
+
+ if (!GGLINK_PACK_STRING(maxlength, SEC_RAND_LEN, ptr, triplet->RAND))
+ return FALSE;
+
+
+ if (!GGLINK_PACK_STRING(maxlength, SEC_SRES_LEN, ptr, triplet->SRES))
+ return FALSE;
+
+
+ if (!GGLINK_PACK_STRING(maxlength, SEC_KC_LEN, ptr, triplet->Kc))
+ return FALSE;
+
+ return TRUE;
+}
+
+BOOL GGLINK_ENCODE_IE_AUTH_LIST(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ T_SEC_IE_AUTH_LIST &auth_set // input IE data structure
+ )
+{
+
+ if(auth_set.num_set > SEC_MAX_TRIPLET){
+ printf("GGLINK_ENCODE_IE_AUTH_LIST Err. auth triplet list number too large : %d\n", auth_set.num_set);
+ return FALSE;
+ }
+
+ if (!GGLINK_PACK_BYTE(maxlength, ptr, (unsigned char) auth_set.num_set))
+ return FALSE;
+
+ int i;
+ for(i=0; i < auth_set.num_set; i++){
+ if (!GGLINK_ENCODE_AUTH_TRIPLET(maxlength, ptr, &auth_set.triplet[i]))
+ return FALSE;
+ }
+ return TRUE;
+}
+
+BOOL GGLINK_ENCODE_IE_ROUTING_AREA_ID(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ T_CNI_RIL3_IE_ROUTING_AREA_ID &ie // input IE data structure
+ )
+{
+ if( maxlength < 6 ) return FALSE; // make sure we have enough bufferd for LV field
+
+ *ptr++ = (ie.mcc[1] << 4) | (ie.mcc[0] & 0x0f);
+ *ptr++ = (ie.mnc[2] << 4) | (ie.mcc[2] & 0x0f);
+ *ptr++ = (ie.mnc[1] << 4) | (ie.mnc[0] & 0x0f);
+ *ptr++ = ie.lac >> 8;
+ *ptr++ = (unsigned char) ie.lac;
+ *ptr++ = ie.rac;
+
+ maxlength -= 6;
+
+ return TRUE;
+}
+
+BOOL
+GGLINK_ENCODE_API_MSG_GS_SRQ(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ GGLINK_API_MSG &msg // input msg data structure
+ )
+{
+
+ return GGLINK_ENCODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.security_req.imsi) ;
+
+}
+
+
+BOOL
+GGLINK_ENCODE_API_MSG_GS_SRS(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ GGLINK_API_MSG &msg // input msg data structure
+ )
+{
+
+ if (! GGLINK_ENCODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.security_rsp.imsi))
+ return FALSE;
+
+ return GGLINK_ENCODE_IE_AUTH_LIST(maxlength, ptr, msg.msg.security_rsp.triplet_list);
+}
+
+BOOL
+GGLINK_ENCODE_API_MSG_GS_RRQ(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ GGLINK_API_MSG &msg // input msg data structure
+ )
+{
+ if (!GGLINK_ENCODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.ra_update_req.imsi))
+ return FALSE;
+
+ return GGLINK_ENCODE_IE_ROUTING_AREA_ID(maxlength, ptr, msg.msg.ra_update_req.rai);
+}
+
+BOOL
+GGLINK_ENCODE_API_MSG_GS_RCF(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ GGLINK_API_MSG &msg // input msg data structure
+ )
+{
+ return GGLINK_ENCODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.ra_update_cnf.imsi);
+
+}
+
+BOOL
+GGLINK_ENCODE_API_MSG_GS_RRJ(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ GGLINK_API_MSG &msg // input msg data structure
+ )
+{
+ if (!GGLINK_ENCODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.ra_update_rej.imsi))
+ return FALSE;
+
+ return GGLINK_PACK_SHORT(maxlength, ptr, msg.msg.ra_update_rej.cause);
+
+}
+
+BOOL
+GGLINK_ENCODE_API_MSG_GS_PRQ(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ GGLINK_API_MSG &msg // input msg data structure
+ )
+{
+
+ return GGLINK_ENCODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.profile_req.imsi);
+
+}
+
+BOOL
+GGLINK_ENCODE_API_MSG_GS_PRS(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ GGLINK_API_MSG &msg // input msg data structure
+ )
+{
+ if(msg.msg.profile_rsp.data_size > 1024) {
+ printf("GGLINK_ENCODE_API_MSG_GS_PRS data length too long", msg.msg.profile_rsp.data_size);
+ return FALSE;
+ }
+
+ if (!GGLINK_ENCODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.profile_rsp.imsi))
+ return FALSE;
+
+ if (!GGLINK_PACK_SHORT(maxlength, ptr, msg.msg.profile_rsp.data_size))
+ return FALSE;
+
+ return GGLINK_PACK_STRING(maxlength, msg.msg.profile_rsp.data_size, ptr,
+ (unsigned char *)msg.msg.profile_rsp.data);
+
+}
+
+BOOL
+GGLINK_ENCODE_API_MSG_GS_URQ(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ GGLINK_API_MSG &msg // input msg data structure
+ )
+{
+
+ return GGLINK_ENCODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.unregister_req.imsi);
+
+}
+
+BOOL
+GGLINK_ENCODE_API_MSG_SRI_REQ(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ GGLINK_API_MSG &msg // input msg data structure
+ )
+{
+
+ if(!GGLINK_PACK_SHORT(maxlength, ptr, msg.msg.send_routing_info_req.gsn_seqno))
+ return FALSE;
+
+ if(!GGLINK_ENCODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.send_routing_info_req.imsi))
+ return FALSE;
+
+ return GGLINK_ENCODE_IE_GSN_ADDRESS(maxlength, ptr, msg.msg.send_routing_info_req.ggsn_addr);
+}
+
+BOOL
+GGLINK_ENCODE_API_MSG_SRI_ACK(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ GGLINK_API_MSG &msg // input msg data structure
+ )
+{
+
+ if (!GGLINK_PACK_SHORT(maxlength, ptr, msg.msg.send_routing_info_req.gsn_seqno))
+ return FALSE;
+
+ if (!GGLINK_ENCODE_IE_CAUSE(maxlength, ptr, msg.msg.send_routing_info_ack.cause))
+ return FALSE;
+
+ if (!GGLINK_ENCODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.send_routing_info_ack.imsi))
+ return FALSE;
+
+ if (msg.msg.send_routing_info_ack.cause.cause_code == GGLINK_CAUSE_REQ_ACCEPTED) {
+ if(!GGLINK_ENCODE_IE_GSN_ADDRESS(maxlength, ptr, msg.msg.send_routing_info_ack.sgsn_addr))
+ return FALSE;
+ return GGLINK_ENCODE_IE_GSN_ADDRESS(maxlength, ptr, msg.msg.send_routing_info_ack.ggsn_addr);
+ } else {
+ return GGLINK_ENCODE_IE_MAP_CAUSE(maxlength, ptr, msg.msg.send_routing_info_ack.map_cause);
+ }
+
+}
+
+BOOL
+GGLINK_ENCODE_API_MSG_FR(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ GGLINK_API_MSG &msg // input msg data structure
+ )
+{
+
+ if (!GGLINK_PACK_SHORT(maxlength, ptr, msg.msg.fr_req.gsn_seqno))
+ return FALSE;
+
+ return GGLINK_ENCODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.fr_req.imsi);
+
+}
+
+BOOL
+GGLINK_ENCODE_API_MSG_FR_ACK(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ GGLINK_API_MSG &msg // input msg data structure
+ )
+{
+
+
+ if (!GGLINK_PACK_SHORT(maxlength, ptr, msg.msg.fr_ack.gsn_seqno))
+ return FALSE;
+
+ if(! GGLINK_ENCODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.fr_ack.imsi))
+ return FALSE;
+
+ if(! GGLINK_ENCODE_IE_CAUSE(maxlength, ptr, msg.msg.fr_ack.cause))
+ return FALSE;
+
+ if(msg.msg.fr_ack.cause.cause_code != GGLINK_CAUSE_REQ_ACCEPTED)
+ return GGLINK_ENCODE_IE_MAP_CAUSE(maxlength, ptr, msg.msg.fr_ack.map_cause);
+
+ if(msg.msg.fr_ack.map_cause.ie_present)
+ {
+ printf("GGLINK_ENCODE_API_MSG_FR_ACK:Map cause should not be included if cause code is REQ ACCPETED\n");
+ }
+
+ return TRUE;
+
+}
+
+BOOL
+GGLINK_ENCODE_API_MSG_GPRS_PRE(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ GGLINK_API_MSG &msg // input msg data structure
+ )
+{
+
+ if (!GGLINK_ENCODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.ms_gprs_pre_req.imsi))
+ return FALSE;
+
+ return GGLINK_ENCODE_IE_GSN_ADDRESS(maxlength, ptr, msg.msg.ms_gprs_pre_req.gsn_addr);
+
+}
+
+BOOL
+GGLINK_ENCODE_API_MSG_GPRS_PRE_ACK(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ GGLINK_API_MSG &msg // input msg data structure
+ )
+{
+
+ if (!GGLINK_ENCODE_IE_MOBILE_ID(maxlength, ptr, msg.msg.ms_gprs_pre_ack.imsi))
+ return FALSE;
+
+ if (!GGLINK_ENCODE_IE_GSN_ADDRESS(maxlength, ptr, msg.msg.ms_gprs_pre_ack.gsn_addr))
+ return FALSE;
+
+ return GGLINK_ENCODE_IE_CAUSE(maxlength, ptr, msg.msg.ms_gprs_pre_ack.cause);
+}
+
+BOOL
+GGLINK_ENCODE_API_MSG_SSRI_REQ(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ )
+{
+
+ if (!GGLINK_PACK_SHORT(maxlength, ptr, msg.msg.ssri_req.gsn_seqno))
+ return FALSE;
+
+ return GGLINK_ENCODE_IE_ROUTING_AREA_ID(maxlength, ptr, msg.msg.ssri_req.rai);
+
+}
+
+BOOL
+GGLINK_ENCODE_API_MSG_SSRI_RSP(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ )
+{
+
+ if (!GGLINK_PACK_SHORT(maxlength, ptr, msg.msg.ssri_rsp.gsn_seqno))
+ return FALSE;
+
+ if (!GGLINK_ENCODE_IE_CAUSE(maxlength, ptr, msg.msg.ssri_rsp.cause))
+ return FALSE;
+
+ if (!GGLINK_ENCODE_IE_ROUTING_AREA_ID(maxlength, ptr, msg.msg.ssri_rsp.rai))
+ return FALSE;
+
+ return GGLINK_ENCODE_IE_GSN_ADDRESS(maxlength, ptr, msg.msg.ssri_rsp.sgsn_addr);
+
+}
+/*
+ * EncodeGGLinkMessage
+ */
+BOOL
+EncodeGGLinkMessage(int &nDataSize, unsigned char * &ptr, GGLINK_API_MSG &msg)
+{
+ BOOL retVal;
+ int initialLength;
+ unsigned char *pLength = ptr;
+ ptr +=2;
+ nDataSize-=2; // 2 bytes for length
+
+ initialLength = nDataSize;
+
+ // encode the message type
+ if(!GGLINK_PACK_SHORT(nDataSize, ptr, msg.msg_type))
+ return FALSE;
+ // encode magic field
+ if(!GGLINK_PACK_SHORT(nDataSize, ptr, msg.magic))
+ return FALSE;
+
+ switch(msg.msg_type) /* message type */
+ {
+ case GGLINK_API_MSG_GS_SRQ:
+ retVal = GGLINK_ENCODE_API_MSG_GS_SRQ(nDataSize, ptr, msg);
+ break;
+ case GGLINK_API_MSG_GS_SRS:
+ retVal = GGLINK_ENCODE_API_MSG_GS_SRS(nDataSize, ptr, msg);
+ break;
+ case GGLINK_API_MSG_GS_RRQ:
+ retVal = GGLINK_ENCODE_API_MSG_GS_RRQ(nDataSize, ptr, msg);
+ break;
+ case GGLINK_API_MSG_GS_RCF:
+ retVal = GGLINK_ENCODE_API_MSG_GS_RCF(nDataSize, ptr, msg);
+ break;
+ case GGLINK_API_MSG_GS_RRJ:
+ retVal = GGLINK_ENCODE_API_MSG_GS_RRJ(nDataSize, ptr, msg);
+ break;
+ case GGLINK_API_MSG_GS_PRQ:
+ retVal = GGLINK_ENCODE_API_MSG_GS_PRQ(nDataSize, ptr, msg);
+ break;
+ case GGLINK_API_MSG_GS_PRS:
+ retVal = GGLINK_ENCODE_API_MSG_GS_PRS(nDataSize, ptr, msg);
+ break;
+ case GGLINK_API_MSG_GS_URQ:
+ retVal = GGLINK_ENCODE_API_MSG_GS_URQ(nDataSize, ptr, msg);
+ break;
+ case GGLINK_API_MSG_SRI_REQ:
+ retVal = GGLINK_ENCODE_API_MSG_SRI_REQ(nDataSize, ptr, msg);
+ break;
+ case GGLINK_API_MSG_SRI_ACK:
+ retVal = GGLINK_ENCODE_API_MSG_SRI_ACK(nDataSize, ptr, msg);
+ break;
+ case GGLINK_API_MSG_FR:
+ retVal = GGLINK_ENCODE_API_MSG_FR(nDataSize, ptr, msg);
+ break;
+ case GGLINK_API_MSG_FR_ACK:
+ retVal = GGLINK_ENCODE_API_MSG_FR_ACK(nDataSize, ptr, msg);
+ break;
+ case GGLINK_API_MSG_GPRS_PRE:
+ retVal = GGLINK_ENCODE_API_MSG_GPRS_PRE(nDataSize, ptr, msg);
+ break;
+ case GGLINK_API_MSG_GPRS_PRE_ACK:
+ retVal = GGLINK_ENCODE_API_MSG_GPRS_PRE_ACK(nDataSize, ptr, msg);
+ break;
+ case GGLINK_API_MSG_SSRI_REQ:
+ retVal = GGLINK_ENCODE_API_MSG_SSRI_REQ(nDataSize, ptr, msg);
+ break;
+ case GGLINK_API_MSG_SSRI_RSP:
+ retVal = GGLINK_ENCODE_API_MSG_SSRI_RSP(nDataSize, ptr, msg);
+ break;
+ case GGLINK_API_MSG_ECHO_REQ:
+ case GGLINK_API_MSG_ECHO_RSP:
+ retVal = TRUE;
+ break;
+
+ default:
+ printf( "Encode error: Non supported message for gglink %d\n",msg.msg_type);
+ return FALSE;
+ }
+
+ if(retVal)
+ {
+ int lengthLength = 2;
+ short encodedLength = initialLength- nDataSize;
+ retVal = GGLINK_PACK_SHORT(lengthLength, pLength, encodedLength);
+ nDataSize = encodedLength + 2;
+ }
+
+ return retVal;
+}
+
diff --git a/data/mnet/Common/include/CdrDbg.h b/data/mnet/Common/include/CdrDbg.h
new file mode 100644
index 0000000..5d9a3f0
--- /dev/null
+++ b/data/mnet/Common/include/CdrDbg.h
@@ -0,0 +1,130 @@
+#ifndef __CDRDBG_H__
+#define __CDRDBG_H__
+
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// File : CdrDbg.h
+// Author(s) : Igal Gutkin
+// Create Date : 8/22/00
+// Description :
+//
+// *******************************************************************
+
+
+#include "dbgfunc.h"
+
+
+/* Printing and\or sending to the logging module */
+
+#define AM_RETURN(x) {AM_LEAVE();return(x);}
+
+
+// Disable all the logging output
+#if (defined (__DISABLE_OUTPUT))
+
+ #define LAYER_ID 0
+ #define AM_ERROR(XX)
+ #define AM_WARNING(XX)
+ #define AM_HEXDUMP(x,y)
+ #define AM_TRACE(XX)
+ #define AM_DEBUG(XX)
+ #define AM_FUNC(x,y)
+ #define AM_ENTER()
+ #define AM_LEAVE()
+
+// GP10, GMC and GS application on VxWorks standard logging
+#elif (!defined(__STDIOUT) && defined(__VXWORKS__) && (defined(MNET_GP10) || defined(MNET_GMC) || defined(MNET_GS) ))
+
+ #ifdef _MNET_COMMON_LOGGING_MODULE_
+ #define AM_HEXDUMP(x,y) DBG_HEXDUMP_FMT(x,y)
+ #else
+ #define AM_HEXDUMP(x,y) DBG_HEXDUMP(x,y)
+ #endif // _MNET_COMMON_LOGGING_MODULE_
+
+ #define AM_ERROR(XX) DBG_ERROR XX
+ #define AM_WARNING(XX) DBG_WARNING XX
+ #define AM_TRACE(XX) DBG_TRACE XX
+ #define AM_DEBUG(XX) DBG_TRACE XX
+
+ #define AM_ENTER DBG_ENTER
+ #define AM_LEAVE DBG_LEAVE
+ #define AM_FUNC(x,y) DBG_FUNC (x,y)
+
+// Windows application using event logging
+#elif !(defined (_WIN_STDIO) || defined (__STDIOUT))
+
+// Support for the GMC Windows application debug output
+#if (defined(_WINDOWS_) || defined(WIN32)) && !(defined(_WIN_STDIO) || defined(__STDIOUT))
+#include "support.h" // fetch GMC on Windows debug interface definitions
+#endif // _WIN_STDIO
+
+ #define AM_HEXDUMP(x,y)
+ #define AM_ERROR(XX) DebugLogCritical XX
+
+ #ifdef _AM_WARNING_
+ #define AM_WARNING(XX) DebugLogWarning XX
+ #else
+ #define AM_WARNING(XX)
+ #endif
+
+ #ifdef _AM_TRACE_
+ #define AM_TRACE(XX) DebugLogInfo XX
+ #else
+ #define AM_TRACE(XX)
+ #endif
+
+ #ifdef _AM_DEBUG_
+ #define AM_DEBUG(XX) DebugLog XX
+ #define AM_FUNC(x,y) DebugLog("Entering function: %s\n",x)
+ #else
+ #define AM_DEBUG(XX)
+ #define AM_FUNC(x,y)
+ #endif
+
+ #define LAYER_ID 0
+ #define AM_ENTER()
+ #define AM_LEAVE()
+
+//Unspecified system. Use own debug system
+#else
+
+ #define AM_ERROR(XX) {printf("ERROR: ");dbg_print XX;putchar('\n');}
+
+ #ifdef _AM_WARNING_
+ #define AM_WARNING(XX) {printf("WARNING: ");dbg_print XX;putchar('\n');}
+ #else
+ #define AM_WARNING(XX)
+ #endif
+
+ #ifdef _AM_TRACE_
+ #define AM_TRACE(XX) {printf("TRACE: ");dbg_print XX;putchar('\n');}
+ #define AM_HEXDUMP(x,y) HexDump (x,y)
+ #else
+ #define AM_TRACE(XX)
+ #define AM_HEXDUMP(x,y)
+ #endif
+
+ #ifdef _AM_DEBUG_
+ #define AM_DEBUG(XX) {printf("DEBUG: ");dbg_print XX;putchar('\n');}
+ #define AM_FUNC(x,y) printf("Entering function: %s\n",x)
+ #else
+ #define AM_DEBUG(XX)
+ #define AM_FUNC(x,y)
+ #endif
+
+ #define LAYER_ID 0
+ #define AM_ENTER()
+ #define AM_LEAVE()
+
+#endif
+
+
+#endif //__CDRDBG_H__ \ No newline at end of file
diff --git a/data/mnet/Common/include/JCErr.h b/data/mnet/Common/include/JCErr.h
new file mode 100644
index 0000000..fd2cfb3
--- /dev/null
+++ b/data/mnet/Common/include/JCErr.h
@@ -0,0 +1,60 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : JCErr.h */
+/* Author(s) : Tim Olson */
+/* Create Date : 9/18/2000 */
+/* Description : JCErr contains error code defintions for common */
+/* platform code. Error codes for specific modules */
+/* modules for a given target should be in the */
+/* <target name>Err.h file. */
+/* */
+/*********************************************************************/
+#ifndef _JCERR_H_
+#define _JCERR_H_ /* include once only */
+
+typedef int JC_STATUS; /* standard return type for common projects */
+
+
+#define JC_TARGET_ERR_CODE_START 512
+
+#define JC_OK 0 /* no error */
+
+/* VxWorks reserves module id's 1-500 */
+/* Common code uses - module number 0x1ff (511 decimal) */
+
+/* All platform specific error codes should be entered below here. */
+/* Format for error codes is as follows: */
+/* +-------------------------------------------+ */
+/* | Module Id + 512 | Error Code | */
+/* +-------------------------------------------+ */
+/* */
+/* 0x01ff0000 - Common code error codes */
+/* 0x02000000 - First target module error codes */
+/* 0x02010000 - Second target module error codes */
+/* . */
+/* . */
+/* 0xffff0000 - Last target module error codes */
+
+/* generic error code definitions -- module number 0x1ff (511 decimal) */
+typedef enum
+{
+ JC_COMMON_ERR_CODE_START = ((JC_TARGET_ERR_CODE_START-1) << 16),
+ JC_ERROR, /* general error */
+ JC_PARAM_INVALID, /* parameter is out of range */
+ JC_PARAM_MISSING, /* parameter missing */
+ JC_MSG_LENGTH_ERROR, /* invalid message length */
+ JC_INVALID_MSG /* message not expected or
+ invalid message type received */
+} JC_ERROR_CODES;
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/Common/include/JCStdDef.h b/data/mnet/Common/include/JCStdDef.h
new file mode 100644
index 0000000..ed65853
--- /dev/null
+++ b/data/mnet/Common/include/JCStdDef.h
@@ -0,0 +1,103 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : JCStdDef.h */
+/* Author(s) : Tim Olson */
+/* Create Date : 9/18/2000 */
+/* Description : */
+/* */
+/*********************************************************************/
+#ifndef _JCSTDDEF_H_
+#define _JCSTDDEF_H_ /* include once only */
+
+/* If not building for vxWorks then we need to define the processors */
+/* used below. If vxWorks is used then these processors are */
+/* already defined. */
+#if !defined(__VXWORKS__)
+#define PENTIUM 1
+#define PPC860 2
+#define TI_C6201 3
+#endif
+
+/* If vxWorks is defined then the standard defs are specified in */
+/* the vxWorks tree. */
+
+#if defined(__VXWORKS__)
+
+#include <vxworks.h>
+
+#endif
+
+/* Standard definitions for PENTIUM */
+
+
+#if (CPU==PENTIUM && !defined(__VXWORKS__))
+
+typedef char INT8;
+typedef short INT16;
+typedef long INT32;
+typedef unsigned char UINT8;
+typedef unsigned short UINT16;
+typedef unsigned long UINT32;
+typedef unsigned char bool;
+
+#endif /* CPU=PENTIUM and __VXWORKS__*/
+
+
+
+/* Standard definitions for PPC860 */
+
+#if (CPU==PPC860 && !defined(__VXWORKS__))
+
+typedef char INT8;
+typedef short INT16;
+typedef long INT32;
+typedef unsigned char UINT8;
+typedef unsigned short UINT16;
+typedef unsigned long UINT32;
+typedef unsigned char bool;
+
+#endif /* CPU=PPC860 and __VXWORKS__ */
+
+
+
+/* Standard definitions for TI_C6201 */
+
+#if (CPU==TI_C6201 && !defined(__VXWORKS__))
+
+typedef char INT8;
+typedef short INT16;
+typedef int INT32;
+typedef unsigned char UINT8;
+typedef unsigned short UINT16;
+typedef unsigned int UINT32;
+typedef unsigned char bool;
+
+#endif /* CPU=TI_C6201 */
+
+
+/*
+ * Added for Win32 test enviroment : DSN
+ */
+#ifdef WIN32
+
+typedef short INT16;
+typedef int INT32;
+typedef unsigned char UINT8;
+typedef unsigned short UINT16;
+typedef unsigned int UINT32;
+#include <windows.h>
+#include <stddef.h>
+
+#endif
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/Common/include/MnetProductId.h b/data/mnet/Common/include/MnetProductId.h
new file mode 100644
index 0000000..3ee33af
--- /dev/null
+++ b/data/mnet/Common/include/MnetProductId.h
@@ -0,0 +1,102 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : ProductId.h */
+/* Author(s) : Bhawani Sapkota */
+/* Create Date : 9/18/2000 */
+/* Description : This file contains MNET product IDs */
+/* */
+/*********************************************************************/
+/* REVISION HISTORY
+/*___________________________________________________________________*/
+/*----------+--------+-----------------------------------------------*/
+/* Name | Date | Reason */
+/*----------+--------+-----------------------------------------------*/
+/* Bhawani |10/16/00| Initial Draft */
+/*----------+--------+-----------------------------------------------*/
+/*********************************************************************/
+
+
+#if !defined(_MNETRODUCTID_H_)
+#define _MNETRODUCTID_H_
+
+typedef enum {
+ MNET_PRODUCT_GP10,
+ MNET_PRODUCT_GMC,
+ MNET_PRODUCT_GS,
+ MNET_PRODUCT_ITP,
+ MNET_PRODUCT_MAXID // always needs to be the last in this
+}MNETProductId_t;
+
+
+#ifdef __cplusplus
+inline
+#else
+static
+#endif
+char *GetMnetProductName(MNETProductId_t id)
+{
+
+ switch (id)
+ {
+ case MNET_PRODUCT_GP10:
+ return "Gsm Port 10 Series (GP10)";
+ break;
+
+ case MNET_PRODUCT_GMC:
+ return "GSM Mobility Controller (GMC)";
+ break;
+
+ case MNET_PRODUCT_GS:
+ return "Serving GPRS Support Node (SGSN)";
+ break;
+
+ case MNET_PRODUCT_ITP:
+ return "IP Transfer Point (ITP)";
+ break;
+ }
+
+ return("Unknown Product ID");
+}
+
+
+#ifdef __cplusplus
+inline
+#else
+static
+#endif
+
+char *GetMnetProductRelativeDirName(MNETProductId_t id)
+{
+
+ switch (id)
+ {
+ case MNET_PRODUCT_GP10:
+ return "Gp10";
+ break;
+
+ case MNET_PRODUCT_GMC:
+ return "Gmc";
+ break;
+
+ case MNET_PRODUCT_GS:
+ return "Gs";
+ break;
+
+ case MNET_PRODUCT_ITP:
+ return "Itp";
+ break;
+ }
+
+ return("Unknown");
+}
+
+#endif /* _MNETRODUCTID_H_ */
diff --git a/data/mnet/Common/include/NetBuffer.h b/data/mnet/Common/include/NetBuffer.h
new file mode 100644
index 0000000..7903651
--- /dev/null
+++ b/data/mnet/Common/include/NetBuffer.h
@@ -0,0 +1,118 @@
+#ifndef __NETBUFFER_H__
+#define __NETBUFFER_H__
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : NetBuffer.h
+// Author(s) : Igal Gutkin
+// Create Date : 12/29/00
+// Description : NetBuffer class definiton.
+//
+// *******************************************************************
+
+#include <vxworks.h>
+#include <netBufLib.h>
+
+#include "Os\JCMutex.h"
+
+#define CALC_VALUE 0
+#define BUFFER_ID M_BLK_ID
+
+// shell accessible info method
+extern "C" void netBufPrintInfo (void);
+
+class NetBuffer
+{
+public:
+
+
+ static
+ NetBuffer *getInstance();
+
+ static
+ bool isInit () { return (pNetBuff_ != NULL); }
+
+ static
+ void release ();
+
+ static
+ void printInfo ();
+
+ // Check the Buffer
+ bool isValidBuffer (BUFFER_ID pMblk) { return (pNetBuff_ && pMblk &&
+ pMblk->pClBlk->clRefCnt &&
+ pMblk->pClBlk->pNetPool == pNetPool_); }
+ // Allocate new buffer
+ // Returns the size of the allocated buffer.
+ // On error returns zero and pMBlk == NULL
+ // Allocated buffer size could be not the same size as requested!
+ unsigned getBuffer (unsigned bufSize, BUFFER_ID& pMBlk);
+
+ // Returns total size of the associated memory buffer or zero on invalid buffer
+ unsigned getBufferSize (BUFFER_ID pMBlk);
+
+ // Release buffer
+ bool freeBuffer (BUFFER_ID pMblk );
+
+ // Create new Buffer ID without replicating the data itself
+ bool duplicateBuffer (BUFFER_ID pSrc, BUFFER_ID& pDest);
+
+ // Return a pointer to the data and the actual data size
+ char *getDataPtr (BUFFER_ID pMblk, unsigned& dataLen);
+
+ // Provide the size of the data stored in the buffer
+ // Return false on invalid buffer ID
+ bool getDataSize(BUFFER_ID pMblk, unsigned& dataLen);
+
+ // Set the size of the data stored in the buffer
+ // Return false on invalid buffer ID or data size exceeding buffer length
+ bool setDataSize(BUFFER_ID pMblk, unsigned dataLen);
+
+ // Copy data from the memory cluster to the user buffer
+ bool getData (BUFFER_ID pMblk, unsigned& dataLen, char *pBuff, unsigned maxLen);
+
+ // Copy data from the user buffer to the memory cluster
+ bool setData (BUFFER_ID pMblk, unsigned dataLen, char *pBuff);
+
+
+protected:
+
+ // Class Constractors & Destractor
+ NetBuffer ();
+
+ virtual
+ ~NetBuffer ();
+
+private :
+ static
+ NetBuffer *init ();
+
+
+
+// Data members
+private:
+
+ static NetBuffer *pNetBuff_ ;
+
+ static M_CL_CONFIG mClBlkConfig_;
+ static CL_DESC clDescTbl_ [];
+
+ static unsigned poolNum_ ;
+
+ NET_POOL netPool_ ;
+ NET_POOL_ID pNetPool_ ;
+
+ JCMutex mutex ;
+};
+
+
+
+#endif //__NETBUFFER_H__ \ No newline at end of file
diff --git a/data/mnet/Common/include/Os/JCCTimer.h b/data/mnet/Common/include/Os/JCCTimer.h
new file mode 100644
index 0000000..2d5154a
--- /dev/null
+++ b/data/mnet/Common/include/Os/JCCTimer.h
@@ -0,0 +1,117 @@
+#ifndef JCCTimer_H
+#define JCCTimer_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCCTimer.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 10-19-98
+// Description : interface specification for - JCCTimer
+//
+// REVISION HISTORY:
+// __________________________________________________________________
+//| Name | Date | Reason
+//+__________+________+_______________________________________________
+//| Igal |11/29/00| Added support to set timer in 100 mSec resolution
+//| Shiv |01/14/00| Added support to enable windows applications to
+//| | | use the same APIs provided by JCCTimer
+//+__________+________+______________________________________________
+//
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#if defined(__VXWORKS__)
+ #include "vxWorks.h"
+ #include "wdLib.h"
+#elif (defined(WIN32) || defined(_WINDOWS_))
+ //#include "stdAfx.h"
+ #include <mmsystem.h>
+ #define FUNCPTR LPTIMECALLBACK
+ #define WDOG_ID MMRESULT
+ #define TARGET_RESOLUTION 1 // 1-millisecond target resolution
+#endif
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+class JCCTimer
+{
+
+public:
+
+ // Destructor
+ ~JCCTimer() ;
+
+ // Constructors
+ JCCTimer (FUNCPTR fPtr,
+ int timerData);
+
+ JCCTimer (FUNCPTR fPtr);
+
+ // Operators
+
+ // primary behaviour methods
+ void cancelTimer ();
+ void setTimer (int howLong);
+ void setTimer (int howLong, int timerData)
+ { timerData_ = timerData;
+ setTimer (howLong); }
+
+ // set timer in resolution of 100 mSec
+ void setTimerMSec(unsigned mSec)
+ { setTimer (tickPerSec*mSec/10);}
+
+ // set timer in resolution of 100 mSec
+ void setTimerMSec(unsigned mSec, int timerData)
+ { setTimer ((tickPerSec*mSec/10), timerData);}
+
+ static int getTickRate () { return (tickPerSec); }
+
+ // maintenance methods
+
+ // get and set for private data members
+
+ // boolean to indicate if timer is active
+ bool timerSet_;
+
+protected:
+
+private:
+
+ // hide the assignment, and copy ctor and other defaults as needed.
+ JCCTimer();
+
+ JCCTimer (const JCCTimer& rhs) ;
+
+ JCCTimer& operator= (const JCCTimer& rhs) ;
+
+ int operator==(const JCCTimer& rhs) const ;
+
+ void init ();
+
+private:
+
+ static int tickPerSec;
+
+ // data members
+ FUNCPTR funcPtr_ ;
+ int timerData_; // data for timer call-back
+ WDOG_ID timerId_ ; // VxWorks Watchdog Timer Id
+#if (defined(WIN32) || defined(_WINDOWS_))
+ unsigned int wTimerRes;
+#endif
+};
+
+
+#endif // JCCTimer_H
diff --git a/data/mnet/Common/include/Os/JCModule.h b/data/mnet/Common/include/Os/JCModule.h
new file mode 100644
index 0000000..57f5b84
--- /dev/null
+++ b/data/mnet/Common/include/Os/JCModule.h
@@ -0,0 +1,88 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCModule.h
+// Author(s) : Tim Olson
+// Create Date : 9/18/2000
+// Description :
+//
+// *******************************************************************
+#ifndef _JCMODULE_H_
+#define _JCMODULE_H_ /* include once only */
+
+#include <sysSymTbl.h>
+#include "MnetModuleId.h"
+#include "Os/JCTask.h"
+
+#define MAX_NUM_SUB_TASKS 50
+
+
+typedef enum {
+ SYS_SHUTDOWN = 0,
+ SYS_START = 1,
+ SYS_REBOOT = 2,
+} T_SYS_CMD;
+
+
+typedef int (*JC_SYSCMD_FUNC)(T_SYS_CMD);
+
+typedef enum
+{
+ TASK_SUSPENDED,
+ TASK_MISSING,
+ MODULE_OK
+} SYSTEM_MODULE_STATUS;
+
+class JCModule {
+public:
+ JCModule
+ (
+ MNET_MODULE_ID id,
+ JC_SYSCMD_FUNC cmdFunc,
+ char *cmdFuncStr
+ );
+
+ ~JCModule();
+
+ bool StartModule();
+ void ShutdownModule();
+ void RebootModule();
+ SYSTEM_MODULE_STATUS CheckModule(JCTask **pTask);
+ MNET_MODULE_ID GetModuleId() { return (modId); }
+
+ static JCModule *systemModules[];
+ static void InsertTaskInfo(MNET_MODULE_ID id, JCTask *pTask);
+ static bool AllTasksInMainLoop();
+ static void ShowModuleStat();
+
+private:
+ JC_SYSCMD_FUNC syscmd;
+ char *modName;
+ MNET_MODULE_ID modId;
+ int numRun;
+ int numSub;
+ JCTask *tasks[MAX_NUM_SUB_TASKS];
+ bool isModuleLoaded;
+
+ // Private functions
+ static int CheckSym(char *name, int val, SYM_TYPE type, int arg, UINT16 group);
+ int TestSym(char *str);
+
+
+ // Disallow the following functions
+ JCModule();
+ JCModule(const JCModule&);
+ JCModule& operator=(const JCModule&);
+ int operator== (const JCModule&) const;
+};
+
+
+#endif
diff --git a/data/mnet/Common/include/Os/JCMsgQueue.h b/data/mnet/Common/include/Os/JCMsgQueue.h
new file mode 100644
index 0000000..3c6630d
--- /dev/null
+++ b/data/mnet/Common/include/Os/JCMsgQueue.h
@@ -0,0 +1,91 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCMsgQueue.h
+// Author(s) : Tim Olson
+// Create Date : 9/18/2000
+// Description :
+//
+// *******************************************************************
+#ifndef _JCMSGQUEUE_H_
+#define _JCMSGQUEUE_H_ /* include once only */
+
+#include "JCErr.h"
+#include "msgQLib.h"
+#include "MnetModuleId.h"
+
+/* OS independent message queue id */
+#define JC_MSG_Q_ID MSG_Q_ID
+
+/* Message queue sending options */
+#define JC_MSG_PRI_NORMAL MSG_PRI_NORMAL
+#define JC_MSG_PRI_URGENT MSG_PRI_URGENT
+
+/* Message queue creation options */
+#define JC_MSG_Q_FIFO MSG_Q_FIFO
+#define JC_MSG_Q_PRIORITY MSG_Q_PRIORITY
+
+/* Message queue reception timeout options */
+#define JC_NO_WAIT NO_WAIT
+#define JC_WAIT_FOREVER WAIT_FOREVER
+
+class JCMsgQueue {
+public:
+ JCMsgQueue
+ (
+ int maxMsgs, /* max msgs that can be queued */
+ int maxMsgLength, /* max bytes in a msg */
+ int options /* message queue options */
+ );
+
+ ~JCMsgQueue();
+
+ JC_STATUS JCMsgQSend
+ (
+ JCMsgQueue *replyMsgQ,
+ unsigned int msgType,
+ MNET_MODULE_ID modId,
+ char * buffer,
+ unsigned int nBytes,
+ int timeout,
+ int priority
+ );
+
+ int JCMsgQReceive
+ (
+ JCMsgQueue **replyMsgQ,
+ unsigned int *msgType,
+ MNET_MODULE_ID *modId,
+ char * buffer,
+ unsigned int *nBytes,
+ int timeout
+ );
+
+ JC_MSG_Q_ID JCGetMsgQId()
+ {
+ return(msgQId);
+ }
+
+private:
+ JC_MSG_Q_ID msgQId;
+ int msgQMaxLen;
+ char *msgQSndBuf;
+ char *msgQRcvBuf;
+
+ // Disallow the following functions
+ JCMsgQueue();
+ JCMsgQueue(const JCMsgQueue&);
+ JCMsgQueue& operator=(const JCMsgQueue&);
+ int operator== (const JCMsgQueue&) const;
+};
+
+
+#endif
diff --git a/data/mnet/Common/include/Os/JCMutex.h b/data/mnet/Common/include/Os/JCMutex.h
new file mode 100644
index 0000000..8adc962
--- /dev/null
+++ b/data/mnet/Common/include/Os/JCMutex.h
@@ -0,0 +1,44 @@
+#ifndef __JCMUTEX_H__
+#define __JCMUTEX_H__
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCMutex.h
+// Author(s) : Igal Gutkin
+// Create Date : 11/06/00
+// Description : JCMutex class (Mutual-Exclusion Semapore) definition
+//
+// *******************************************************************
+
+
+#include <vxworks.h>
+#include <semlib.h>
+
+class JCMutex
+{
+public:
+ // Constructors & destructor
+ JCMutex ();
+ virtual ~JCMutex ();
+
+ // pramary methods
+ bool take ();
+ bool give ();
+
+private:
+
+// data members
+private:
+
+ SEM_ID semId_;
+};
+
+#endif //__JCMUTEX_H__ \ No newline at end of file
diff --git a/data/mnet/Common/include/Os/JCTask.h b/data/mnet/Common/include/Os/JCTask.h
new file mode 100644
index 0000000..30e5888
--- /dev/null
+++ b/data/mnet/Common/include/Os/JCTask.h
@@ -0,0 +1,131 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCTask.h
+// Author(s) : Tim Olson
+// Create Date : 9/18/2000
+// Description :
+//
+// *******************************************************************
+#ifndef _JCTASK_H_
+#define _JCTASK_H_ /* include once only */
+
+#include <taskLib.h>
+#include <semLib.h>
+#include "JCErr.h"
+#include "MnetModuleId.h"
+
+/* OS independent task id */
+#define JC_TASK_ID int
+
+/* Task creation options */
+#define JC_VX_FP_TASK VX_FP_TASK /* execute with floating-point coprocessor support */
+#define JC_VX_PRIVATE_ENV VX_PRIVATE_ENV /* include private environment support */
+#define JC_VX_NO_STACK_FILL VX_NO_STACK_FILL /* do not fill the stack for use by checkStack */
+#define JC_VX_UNBREAKABLE VX_UNBREAKABLE /* do not allow breakpoint debugging */
+
+extern SEM_ID *pMnetSyncSem;
+
+/* System importance for task */
+typedef enum {
+ JC_CRITICAL_TASK,
+ JC_NON_CRITICAL_TASK
+} JC_TASK_IMPORTANCE;
+
+/* Task status */
+typedef enum {
+ JC_TASK_IDLE,
+ JC_TASK_INIT,
+ JC_TASK_LOOP,
+ JC_TASK_EXIT,
+} JC_TASK_STATUS;
+
+
+class JCTask {
+public:
+ JCTask
+ (
+ char *name
+ );
+
+ ~JCTask();
+
+ int JCTaskSpawn
+ (
+ int priority, /* priority of new task */
+ int options, /* task option word */
+ int stackSize, /* size (bytes) of stack needed plus name */
+ FUNCPTR entryPt, /* entry point of new task */
+ int arg1, /* 1st of 10 req'd task args to pass to func */
+ int arg2,
+ int arg3,
+ int arg4,
+ int arg5,
+ int arg6,
+ int arg7,
+ int arg8,
+ int arg9,
+ int arg10,
+ MNET_MODULE_ID modId,
+ JC_TASK_IMPORTANCE importance
+ );
+
+ void JCTaskEnterLoop();
+ void JCTaskNormExit();
+
+ const char *GetTaskName() { return (taskName); }
+ int GetTaskId() { return (taskId); }
+ JC_TASK_IMPORTANCE GetTaskImportance() { return (taskImportance); }
+ JC_TASK_STATUS GetTaskStatus() { return (taskStatus); }
+
+ JC_TASK_ID JCTaskId()
+ {
+ return(taskId);
+ }
+
+ void SetTaskAlarmStatus(bool stat) { taskAlarmed = stat; }
+ bool GetTaskAlarmStatus() { return(taskAlarmed); }
+
+ void ExecuteCoreDumpFunc() { if (coreDumpFunc) coreDumpFunc(); }
+
+private:
+ int taskId;
+ char *taskName;
+ int taskPri; /* priority of new task */
+ int taskOpt; /* task option word */
+ int taskStackSize; /* size (bytes) of stack needed plus name */
+ FUNCPTR taskEntryPt; /* entry point of new task */
+ int taskArg1; /* 1st of 10 req'd task args to pass to func */
+ int taskArg2;
+ int taskArg3;
+ int taskArg4;
+ int taskArg5;
+ int taskArg6;
+ int taskArg7;
+ int taskArg8;
+ int taskArg9;
+ int taskArg10;
+ MNET_MODULE_ID moduleId;
+ JC_TASK_IMPORTANCE taskImportance;
+ FUNCPTR coreDumpFunc;
+ JC_TASK_STATUS taskStatus;
+ bool taskAlarmed;
+
+
+ // Disallow the following functions
+ JCTask();
+ JCTask(const JCTask&);
+ JCTask& operator=(const JCTask&);
+ int operator== (const JCTask&) const;
+};
+
+
+#endif
diff --git a/data/mnet/Common/include/Pm/pm_common.h b/data/mnet/Common/include/Pm/pm_common.h
new file mode 100644
index 0000000..ec2cbff
--- /dev/null
+++ b/data/mnet/Common/include/Pm/pm_common.h
@@ -0,0 +1,209 @@
+#ifndef _PM_COMMON_H_
+#define _PM_COMMON_H_
+
+#include "pm\pmdefs.h"
+
+const int PM_MAX_INTERVAL = 2;
+const int PM_MAX_RECORDS = 1500;
+
+#define PM_ONE_SECOND 1
+#define PM_ONE_MINUTE (PM_ONE_SECOND*60)
+#define PM_SECONDS_IN_15_MIN 900
+#define PM_SECONDS_IN_30_MIN 1800
+#define PM_SECONDS_IN_45_MIN 2700
+#define PM_SECONDS_IN_HOUR 3600
+
+
+#ifdef UNIT_TEST_PMCLASS
+typedef int CauseCode;
+#endif
+
+/* Bind options */
+#define DEFAULT_PORT_ADDR 1
+#define FIXED_PORT_LOCAL_ADDR 2
+#define GET_PORT_AND_LOCAL_ADDR 3
+
+/* Defaults */
+#define kANY_PORT 0
+#define FIXED_PORT 1045
+
+#define kMaxRecvUdpMsgSize 2048
+
+typedef struct socket OS_SPECIFIC_SOCKET_SOCKET;
+typedef struct socket OS_SPECIFIC_DGRAM_SOCKET;
+
+extern unsigned long GetLocalHostAddress();
+extern OS_SPECIFIC_SOCKET_HANDLE SOCKET_UdpCreate();
+extern bool SOCKET_UdpBind(OS_SPECIFIC_SOCKET_HANDLE sock, ubyte2 port);
+
+extern bool SOCKET_UdpReceive(OS_SPECIFIC_DGRAM_HANDLE sock, char *msg, ubyte4 *msgSize, ubyte4 *peerAddr);
+extern bool SOCKET_UdpSendTo(OS_SPECIFIC_DGRAM_HANDLE sock, struct sockaddr_in *pAddrTo, char *message, ubyte4 msglen);
+extern bool SOCKET_Close( OS_SPECIFIC_SOCKET_HANDLE sock );
+
+/*
+ * The PM_BaseObject class declaration
+ */
+class PM_BaseObject {
+ private:
+ /*
+ * base Performance-Management class
+ * - provide critical section
+ */
+ SEM_ID m_semaphore;
+ public:
+ bool takeSemaphore(void);
+ bool giveSemaphore(void);
+ /*
+ * Constructor for the object
+ */
+ PM_BaseObject()
+ {
+ m_semaphore = semBCreate(SEM_Q_PRIORITY,SEM_FULL);
+ };
+
+ /*
+ * Destructor for the object
+ */
+ ~PM_BaseObject()
+ {
+ if (m_semaphore != NULL)
+ semDelete(m_semaphore);
+ }
+
+};
+
+int pm_map_cause_to_index(CauseCode cause);
+CauseCode pm_map_index_to_cause(int index);
+char * pm_map_cause_code_to_str(CauseCode cause);
+
+/*
+ * The PM_SimpleCounter class declaration
+ * 1-minute interval period
+ * total of 15 completed intervals (last 15 minutes) plus
+ * 1 current interval (accumulating)
+ */
+class PM_SimpleCounter: public PM_BaseObject
+{
+ public:
+ void reset(void); /* reset counter to 0 (both value and maxValue) */
+ bool increment(void); /* increment the counter value by 1 */
+ bool increment(int x); /* increment the counter value by x */
+ bool decrement(void); /* decrement the counter value by 1 */
+ int getValue(void); /* obtain the current value of the counter for
+ * the past PM_MAX_INTERVAL-1 (15) completed intervals (sum)
+ */
+ bool setValue(int new_value);
+
+ int getMaxValue(void); /* obtain the maximum value of the counter for
+ * the past PM_MAX_INTERVAL-1 (15) completed intervals (accumulated max)
+ */
+
+ void advanceInterval(void);/* move to the next measurement interval (called by PM task) */
+
+ /* Constructor for the class */
+ PM_SimpleCounter()
+ {
+ currentInterval = 0;
+ };
+
+private:
+ int value[PM_MAX_INTERVAL]; /* maintain the current value for each interval */
+ int maxValue[PM_MAX_INTERVAL]; /* maintain the max value for each interval */
+ int currentInterval; /* index of the current interval (cyclical) */
+};
+
+
+
+
+/*
+ * The PM_PerCauseCounter class declaration
+ */
+class PM_PerCauseCounter: public PM_BaseObject
+{
+ public:
+ void reset(void); /* reset counters to 0 (both value and maxValue) */
+ bool increment(CauseCode cause); /* increment the counter value by 1 */
+ bool decrement(CauseCode cause); /* decrement the counter value by 1 */
+ int getValue(CauseCode cause); /* obtain the current value of the counter for
+ * the past PM_MAX_INTERVAL-1 (15) completed intervals (sum)
+ */
+
+ void advanceInterval(void); /* move to the next measurement interval (called by PM task) */
+
+ private:
+ PM_SimpleCounter perCauseCounter[PM_MAX_CAUSES];
+ /* each per-cause counter is a simpleCounter */
+};
+
+
+
+/*
+ * The PM_StatisticCounter class declaration
+ */
+class PM_StatisticCounter: public PM_BaseObject
+{
+ public:
+ void reset(void); /* reset the entire records[] array by
+ * removing all records, and set the numberRecords to 0
+ */
+
+ bool addRecord(int value); /* insert a record into the record array
+ * return true if successful
+ * return false if out of record entry (newest records will be discarded)
+ */
+
+ int getMeanValue(void); /* obtain the arithmatic-mean of all the records for
+ * the past PM_MAX_INTERVAL-1 (15) completed intervals
+ */
+ int getMaxValue();
+
+ void advanceInterval(void); /* move to the next measurement interval (called by PM task) */
+
+ PM_StatisticCounter()
+ {
+ reset();
+ }
+
+ private:
+ int numRecords[PM_MAX_INTERVAL];
+ int records[PM_MAX_INTERVAL][PM_MAX_RECORDS];
+ int currentInterval; /* index of the current interval (cyclical) */
+ /*
+ * Constructor for the class
+ */
+
+};
+
+
+
+/*
+ * The PM_AccumTimeCounter class declaration
+ * 1-minute interval period
+ * total of 15 completed intervals (last 15 minutes) plus
+ * 1 current interval (accumulating)
+ */
+class PM_AccumTimeCounter: public PM_BaseObject
+{
+ public:
+ void reset(void); /* reset counter to 0 (both value and maxValue) */
+ void start(); /* stat accumulating time */
+ void stop(); /* stop accumulating time */
+ int getValue(void); /* obtain the current value of the counter for
+ * the current interval
+ */
+ void advanceInterval(void);/* move to the next measurement interval (called by PM task) */
+
+ /* Constructor for the class */
+ PM_AccumTimeCounter()
+ {
+ currentInterval = 0;
+ };
+
+private:
+ int accumValue[PM_MAX_INTERVAL]; /* maintain the current accumulated value for each interval */
+ int lastStart[PM_MAX_INTERVAL]; /* maintain the tick value when the timer was last started */
+ bool state[PM_MAX_INTERVAL]; /* maintain the on-off state of the timer */
+ int currentInterval; /* index of the current interval (cyclical) */
+};
+
+#endif
diff --git a/data/mnet/Common/include/SmsPP/smspp_inf.h b/data/mnet/Common/include/SmsPP/smspp_inf.h
new file mode 100644
index 0000000..2895d45
--- /dev/null
+++ b/data/mnet/Common/include/SmsPP/smspp_inf.h
@@ -0,0 +1,84 @@
+
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.01 */
+/* Status : Unde development */
+/* File : jccsmspp.h */
+/* Author(s) : Bhawani Sapkota */
+/* Create Date : 12/25/2000 */
+/* Description : his file contains data types and const defined */
+/* for SMS-PP and are shared between SMC and SMR. */
+/* */
+/*********************************************************************/
+/* REVISION HISTORY
+/*___________________________________________________________________*/
+/*----------+--------+-----------------------------------------------*/
+/* Name | Date | Reason */
+/*----------+--------+-----------------------------------------------*/
+/* Bhawani |03/09/00| Initial Draft */
+/* Bhawani |11/20/00| restructured and ported form NT to vxWorks */
+/*----------+--------+-----------------------------------------------*/
+/*********************************************************************/
+
+#ifndef __JCCSMSPP_H_
+#define __JCCSMSPP_H_
+
+#define SMS_MAX_RP_MSG_LEN 248
+#define SMS_MAGIC_NUMBER 0x12345678
+
+/* Ranges for SMS reference numbers used on VBLink interface
+ for the ViperCell (VC) and ViperBase (VB) */
+#define INVALID_VC_SMS_REF_NUM 0
+#define MIN_VC_SMS_REF_NUM 1
+#define MAX_VC_SMS_REF_NUM 32767
+#define MIN_VB_SMS_REF_NUM 32768
+#define MAX_VB_SMS_REF_NUM 65535
+
+/* This value is used in the SMS VBLink communication
+ in order to specify normal disconnection */
+#define SMS_VBLINK_NORMAL_DISCONNECT 255
+
+typedef enum {
+ MNSMS_MSG_BASE = 0,
+
+ MNSMS_ABORT_Req, // = 1 ViperBase->ViperCell
+
+ MNSMS_EST_Req , // = 2 RP-DATA ViperBase->ViperCell
+ MNSMS_DATA_Req , // = 3 RP-ACK (RP-ERROR) ViperBase->ViperCell
+
+ MNSMS_EST_Ind , // = 4 RP-DATA ViperCell->ViperBase
+ MNSMS_DATA_Ind , // = 5 RP-ACK (RP-ERROR) ViperCell->ViperBase
+
+ MNSMS_ERROR_Ind, // = 6 ViperCell->ViperBase
+ MNSMS_REL_Req , // = 7 ViperBase->ViperCell
+
+ MNSMS_MSG_MAX
+
+} SMS_VBLINK_MSGTYPE;
+
+
+typedef struct
+{
+ UINT32 magic ; // = SMS_MAGIC_NUMBER
+ UINT32 refNum ; // associated subscriber profile index
+ UINT32 msgType; // value of type SMS_VBLINK_MSGTYPE
+ UINT32 status ; // holds disconnect cause, or 0
+ UINT32 msgLen ;
+} SmsHdrVblinkMsg_t;
+
+#define SMS_VBLINK_HDRSIZE (sizeof(SmsHdrVblinkMsg_t))
+
+typedef struct
+{
+ SmsHdrVblinkMsg_t hdr;
+ UINT8 msg[SMS_MAX_RP_MSG_LEN];
+} SmsVblinkMsg_t;
+
+#endif /* __JCCSMSPP_H_ */
diff --git a/data/mnet/Common/include/VCLOGGING.H b/data/mnet/Common/include/VCLOGGING.H
new file mode 100644
index 0000000..95ab458
--- /dev/null
+++ b/data/mnet/Common/include/VCLOGGING.H
@@ -0,0 +1,283 @@
+#ifndef VCLOGGING_HDR_INC
+#define VCLOGGING_HDR_INC
+/*
+ ****************************************************************************************
+ * Copyright Cisco Systems, Inc 2000 All Rights reserved *
+ * *
+ * File : vclogging.h *
+ * *
+ * Description : Header file containing data structures, definitions, and *
+ * macros defined for logging use on the MNET solution *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/18/99 | DSN | Initial version created *
+ * | | | *
+ ****************************************************************************************
+ */
+
+/*
+ * VxWorks & ANSI C headers
+ */
+#include <vxworks.h>
+#include <msgqlib.h>
+#include <sockLib.h>
+#include <hostlib.h>
+#include <inetLib.h>
+#include <stdioLib.h>
+#include <strLib.h>
+#include <ioLib.h>
+#include <assert.h>
+/*
+ * Module enumeration header file
+ */
+#include "logmodules.h"
+
+#define _MNET_COMMON_LOGGING_MODULE_
+
+#ifdef MNET_GP10
+#define VIPERLOG_HOST_ETHERNET_INTERFACE "motfec0"
+#elif MNET_GS
+#define VIPERLOG_HOST_ETHERNET_INTERFACE "fei0"
+#elif MNET_GMC
+#define VIPERLOG_HOST_ETHERNET_INTERFACE "fei0"
+#endif
+
+#define ASCII_PRINTABLE_BEGIN 32
+#define ASCII_PRINTABLE_END 126
+#define ASCII_SPACE_CHAR 32
+
+#define VIPERLOG_PORT_NUM 2105
+#define VIPERLOG_MAX_NET_PKT_SIZE 1200
+#define MAX_DEBUG_MSGS_IN_Q 3000
+#define VIPERLOG_MSG_MAGIC_NO 0x1234
+
+#define VIPERLOG_ALL_MODULES 1000
+#define MAX_VIPERLOG_BUFFERED_PKTS 3
+
+#define VIPERLOG_MAX_FUNC_NAME_LEN 64
+#define VIPERLOG_MAX_DEBUG_MSG_LEN 256
+
+#define MAX_SHORT_STRING_LENGTH 7
+#define MAX_LONG_STRING_LENGTH 20
+#define VIPERLOG_NULL_CALL_ID 0
+
+
+#define VIPERLOG_MAX_RECORDS_IN_FILE 10000
+#define VIPERLOG_MAX_MSGS_IN_Q 1000
+#define VIPERLOG_MAX_OUT_BUFF_LENGTH 256
+
+
+/*
+ Bit mask for log options values
+
+ |----|----|----|----|----|----|---|---|---|---|---|---|---|---|---|---|
+ | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
+ |----|----|----|----|----|----|---|---|---|---|---|---|---|---|---|---|
+
+ ------------------------------
+ Bit no | Meaning
+ -----------------------------
+ 0 : If set, indicates log to console enabled
+ 1 : If set, indicates log to network enabled
+ 2 : If set, indicates log to file enabled
+ 3 : If set, indicates function tracing required
+ 4 : If set, indicates call tracing required
+ 5 : If set, indicates logging of informational messages required
+ 6 : If set, indicates logging of warnings required
+ 7 : if set, indicates logging of errors required
+ 8 : if set, indicates use of timestamps
+ 9-15 : reserved; unused for now
+*/
+
+typedef enum {
+
+ LOG_TO_CONSOLE_MASK = 0x0001,
+ LOG_TO_NETWORK_MASK = 0x0002,
+ LOG_TO_FILE_MASK = 0x0004,
+ LOG_CONTROL_TRACE_MASK = 0x0008,
+ LOG_CALL_TRACE_MASK = 0x0010,
+ LOG_INFORMATIONAL_MASK = 0x0020,
+ LOG_WARNINGS_MASK = 0x0040,
+ LOG_ERRORS_MASK = 0x0080,
+ LOG_TIMESTAMPS = 0x0100
+
+} VIPERLOG_FILTER_MASK;
+
+
+/*
+ * Inverse masks
+ */
+typedef enum {
+
+ LOG_CONTROL_TRACE_INVERSE_MASK = 0xfff7,
+ LOG_CALL_TRACE_INVERSE_MASK = 0xffef,
+ LOG_INFORMATIONAL_INVERSE_MASK = 0xffdf,
+ LOG_WARNINGS_INVERSE_MASK = 0xffbf,
+ LOG_ERRORS_INVERSE_MASK = 0xff7f,
+
+} VIPERLOG_FILTER_INVERSE_MASK;
+
+
+typedef enum {
+
+ LOG_SEVERITY_FUNCTION_TRACE = LOG_CONTROL_TRACE_MASK,
+ LOG_SEVERITY_TRACE = LOG_INFORMATIONAL_MASK,
+ LOG_SEVERITY_CALL_TRACE = LOG_CALL_TRACE_MASK,
+ LOG_SEVERITY_WARNING = LOG_WARNINGS_MASK,
+ LOG_SEVERITY_ERROR = LOG_ERRORS_MASK
+
+} VIPERLOG_SEVERITY;
+
+
+#define LOG_ASCII 0
+#define LOG_PLAIN_BINARY 1
+#define LOG_FORMAT_BINARY 2
+
+
+/*
+ * the packet format for log messages
+ */
+typedef struct {
+
+ unsigned short magic ;
+ unsigned short severity_level;
+ unsigned short module_id ;
+ unsigned long call_id ;
+ unsigned long timestamp ;
+ unsigned long tick_count ;
+ unsigned data_type ;
+ unsigned binary_length ;
+ char function_name[VIPERLOG_MAX_FUNC_NAME_LEN];
+ char message [VIPERLOG_MAX_DEBUG_MSG_LEN];
+
+} VIPERLOG_PACKET;
+
+
+/*
+ * The configuration information
+ */
+typedef struct {
+
+ unsigned short module_filters[LOGGING_MAX_MODULES];
+ MSG_Q_ID msg_q_id;
+ int log_socket;
+ BOOL log_socket_opened;
+
+ FILE *log_file;
+ BOOL log_file_opened;
+ unsigned long log_record_counter;
+ unsigned long log_pkt_counter;
+
+ char net_packet[VIPERLOG_MAX_NET_PKT_SIZE];
+ int net_buff_index;
+
+ struct sockaddr_in dest_address;
+
+ BOOL shutdown_message_received;
+
+ BOOL console_output_detailed;
+
+} VIPERLOG_CONFIGURATION,*PVIPERLOG_CONFIGURATION;
+
+
+
+
+/*
+ * The DbgOutput class
+ */
+class DbgOutput
+{
+ private:
+
+ VIPERLOG_PACKET m_log_packet;
+
+ void PreparePacket (short severity_level, int binLength = 0, bool bFormat = false);
+
+ public:
+
+ DbgOutput() {};
+
+ DbgOutput(char *function_name,int module_id)
+ {
+ strncpy((char *)m_log_packet.function_name,(const char *)function_name,
+ VIPERLOG_MAX_FUNC_NAME_LEN);
+ /* Making sure it is null-terminated */
+ m_log_packet.function_name[VIPERLOG_MAX_FUNC_NAME_LEN-1] = 0;
+ m_log_packet.module_id = module_id;
+ };
+
+ void Func(char *function_name,int module_id)
+ {
+ strncpy((char *)m_log_packet.function_name,(const char *)function_name,
+ VIPERLOG_MAX_FUNC_NAME_LEN);
+ /* Making sure it is null-terminated */
+ m_log_packet.function_name[VIPERLOG_MAX_FUNC_NAME_LEN-1] = 0;
+ m_log_packet.module_id = module_id;
+ };
+ void Enter (void);
+ void Leave (void);
+ void Trace (char *format, ...);
+ void Warning (char *format, ...);
+ void Error (char *format, ...);
+ void CallTrace(unsigned long call_id , char *format,...);
+ void HexDump (unsigned char *StartPtr, int byteCount , bool bFormat = false);
+
+ /* Changes for new logging function */
+ void SetModuleId(int module_id)
+ {
+ m_log_packet.module_id = module_id;
+ }
+
+ void SetFuncName(char *function_name)
+ {
+ strcpy((char *)m_log_packet.function_name, (const char *)function_name);
+ }
+
+};
+
+
+#define DBG_FUNC(x,y); DbgOutput Dbg(x,y);
+#define DBG_ENTER(); Dbg.Enter();
+#define DBG_LEAVE(); Dbg.Leave();
+#define DBG_TRACE Dbg.Trace
+#define DBG_CALL_TRACE Dbg.CallTrace
+#define DBG_WARNING Dbg.Warning
+#define DBG_ERROR Dbg.Error
+#define DBG_HEXDUMP(x,y); Dbg.HexDump(x,y);
+#define DBG_HEXDUMP_FMT(x,y); Dbg.HexDump(x,y,true);
+
+
+#ifdef DBG
+#define ASSERT assert
+#endif
+
+#ifdef DEBUG
+#define ASSERT assert
+#endif
+
+
+void init_log_task (void);
+void shutdown_log_task (void);
+VOID viper_log (void);
+BOOL viperlog_check_module_filter(int module_id, short severity_level);
+void viperlog_display_filter_info(short filter_value);
+void viperlog_get_output_device (int module_id,BOOL *output_file,BOOL *output_console,BOOL *output_network);
+void viperlog_send_net_msg (char *msg_buff);
+char *viperlog_get_severity_name (VIPERLOG_SEVERITY severity);
+char *viperlog_get_module_name (LOGGING_MODULE_ID module_id);
+char *viperlog_get_network_broadcast_addr(void);
+
+
+extern "C"
+{
+ void ViperLogSetModuleFilters (int module_id,short severity_level);
+ void ViperLogShowAllFilters();
+ void ViperLogSetDestPort(int port_no);
+ void ViperLogSetDestAddress(char *ip_address);
+}
+
+#endif /* #ifndef VCLOGGING_HDR_INC */ \ No newline at end of file
diff --git a/data/mnet/Common/include/bssgp/bssgp_api.h b/data/mnet/Common/include/bssgp/bssgp_api.h
new file mode 100644
index 0000000..1aff6f1
--- /dev/null
+++ b/data/mnet/Common/include/bssgp/bssgp_api.h
@@ -0,0 +1,600 @@
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : bssgp_api.h *
+ * *
+ * Description : API data structures for the BSS-GP layer module *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |10/10/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+#ifndef _BSSGP_API_HDR_INC_
+#define _BSSGP_API_HDR_INC_
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "bssgp_prot.h"
+#include "jcstddef.h"
+/*
+ * RIL3 (4.08) includes
+ */
+#include "ril3/ie_tlli.h"
+#include "ril3/ie_bvci.h"
+#include "ril3/ie_mobile_id.h"
+#include "ril3/ie_location_area_id.h"
+#include "ril3/ie_qos_profile.h"
+#include "ril3/ril3_gmm_msg.h"
+#include "ril3/ie_reject_cause.h"
+#include "ril3/ie_cell_id.h"
+#include "ril3/ie_radio_cause_id.h"
+#include "ril3/ie_priority.h"
+#include "ril3/ie_pdu_lifetime.h"
+#include "ril3/ie_lsa_information.h"
+#include "ril3/ie_cell_identifier.h"
+#include "ril3/ie_lsa_identifier_list.h"
+#include "ril3/ie_bss_area_indication.h"
+#include "ril3/ie_bssgp_cause.h"
+#include "ril3/ie_bvc_measurement.h"
+
+
+/*
+ * LLC_PDU value; will depend on
+ * interface agreed upon and the
+ * platform in question
+ */
+#if defined (MNET_GP10)
+typedef struct {
+ UINT8 *data;
+ UINT16 data_len;
+} LLC_PDU;
+#elif defined (MNET_GS)
+typedef struct {
+ UINT8 *data;
+ UINT16 data_len;
+} LLC_PDU;
+#include "llcmsg.h"
+#elif defined(WIN32)
+typedef struct {
+ UINT8 *data;
+ UINT16 data_len;
+} LLC_PDU;
+#endif
+
+
+
+/*
+ * BSSGP API message type
+ */
+typedef enum {
+
+ BSSGP_API_MSG_DL_UNITDATA,
+ BSSGP_API_MSG_UL_UNITDATA,
+ BSSGP_API_MSG_PAGING_PS,
+ BSSGP_API_MSG_RADIO_STATUS,
+ BSSGP_API_MSG_SUSPEND,
+ BSSGP_API_MSG_SUSPEND_ACK,
+ BSSGP_API_MSG_SUSPEND_NACK,
+ BSSGP_API_MSG_RESUME,
+ BSSGP_API_MSG_RESUME_ACK,
+ BSSGP_API_MSG_RESUME_NACK,
+ BSSGP_API_MSG_LOCATION_UPDATE,
+ BSSGP_API_MSG_LOCATION_UPDATE_ACK,
+ BSSGP_API_MSG_LOCATION_UPDATE_NACK,
+ BSSGP_API_MSG_RADIO_CAP,
+ BSSGP_API_MSG_RADIO_CAP_UPDATE,
+ BSSGP_API_MSG_RADIO_CAP_UPDATE_ACK,
+ BSSGP_API_MSG_FLUSH_LL,
+ BSSGP_API_MSG_FLUSH_LL_ACK,
+ BSSGP_API_MSG_LLC_DISCARDED,
+ BSSGP_API_MSG_FLOW_CONTROL_BVC,
+ BSSGP_API_MSG_FLOW_CONTROL_BVC_ACK,
+ BSSGP_API_MSG_FLOW_CONTROL_MS,
+ BSSGP_API_MSG_FLOW_CONTROL_MS_ACK,
+ BSSGP_API_MSG_BVC_BLOCK,
+ BSSGP_API_MSG_BVC_BLOCK_ACK,
+ BSSGP_API_MSG_BVC_UNBLOCK,
+ BSSGP_API_MSG_BVC_UNBLOCK_ACK,
+ BSSGP_API_MSG_BVC_RESET,
+ BSSGP_API_MSG_BVC_RESET_ACK,
+ BSSGP_API_MSG_STATUS,
+ BSSGP_API_MAX_MSGS
+
+} BSSGP_API_MSG_TYPE;
+
+
+
+/*
+ * The downlink & uplink unitdata messages are
+ * handled slightly differently from the other
+ * signalling messages; basically in the message
+ * only the pointer to the actual msg is passed
+ * via regular interfaces, and actual content will
+ * be in a mbuf somewhere.... Dinesh N.
+ */
+
+/*
+ * DL-UnitData
+ */
+
+typedef struct {
+
+ RIL3_TLLI tlli;
+ T_RIL3_IE_QOS_PROFILE_ID qos_profile;
+ /* Cisco proprietary */
+ T_CNI_RIL3_IE_QOS qos_params;
+ RIL3_IE_PDU_LIFETIME pdu_lifetime;
+ T_CNI_RIL3_IE_MS_RADIO_ACCESS_CAPABILITY radio_access_cap;
+ RIL3_IE_PRIORITY priority; /* GSM 08.08 */
+ T_CNI_RIL3_IE_DRX_PARAMETER drx_params;
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+ RIL3_TLLI tlli_old;
+ RIL3_IE_LSA_INFORMATION lsa_info;
+ LLC_PDU pdu;
+
+} BSSGP_DL_UNITDATA_MSG;
+
+
+
+
+/*
+ * UL-UnitData
+ */
+typedef struct {
+
+ RIL3_TLLI tlli;
+ T_RIL3_IE_QOS_PROFILE_ID qos_profile;
+ RIL3_IE_CELL_IDENTIFIER cell_id;
+ RIL3_IE_LSA_IDENTIFIER_LIST lsa_id_list;
+ LLC_PDU pdu;
+
+} BSSGP_UL_UNITDATA_MSG;
+
+
+
+
+
+/*
+ * The Paging msg api structure & defns
+ *
+ *
+ */
+typedef struct {
+
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+ RIL3_BVCI bvci;
+ T_CNI_RIL3_IE_LOCATION_AREA_ID location_area;
+ T_CNI_RIL3_IE_ROUTING_AREA_ID routing_area;
+ RIL3_BSS_AREA_INDICATION bss_area;
+ T_CNI_RIL3_IE_DRX_PARAMETER drx_params;
+ T_RIL3_IE_QOS_PROFILE_ID qos_profile;
+ T_CNI_RIL3_IE_MOBILE_ID tmsi;
+
+} BSSGP_PAGING_PS_MSG;
+
+/*
+ * Radio Status msg
+ */
+typedef struct {
+
+ RIL3_TLLI tlli;
+ T_CNI_RIL3_IE_MOBILE_ID tmsi;
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+ T_RIL3_IE_RADIO_CAUSE_ID cause;
+
+} BSSGP_RADIO_STATUS_MSG;
+
+
+/*
+ * Suspend msg
+ */
+typedef struct {
+
+ RIL3_TLLI tlli;
+ T_CNI_RIL3_IE_ROUTING_AREA_ID routing_area;
+
+} BSSGP_SUSPEND_MSG;
+
+/*
+ * Suspend Ack
+ */
+typedef struct {
+
+ RIL3_TLLI tlli;
+ T_CNI_RIL3_IE_ROUTING_AREA_ID routing_area;
+ char suspend_ref_num;
+
+} BSSGP_SUSPEND_ACK_MSG;
+
+
+/*
+ * Suspend Nack
+ */
+typedef struct {
+
+ RIL3_TLLI tlli;
+ T_CNI_RIL3_IE_ROUTING_AREA_ID routing_area;
+ RIL3_BSSGP_CAUSE exception_cause;
+
+} BSSGP_SUSPEND_NACK_MSG;
+
+/*
+ * Resume
+ */
+typedef struct {
+
+ RIL3_TLLI tlli;
+ T_CNI_RIL3_IE_ROUTING_AREA_ID routing_area;
+ char suspend_ref_num;
+
+} BSSGP_RESUME_MSG;
+
+
+/*
+ * Resume Ack
+ */
+typedef struct {
+
+ RIL3_TLLI tlli;
+ T_CNI_RIL3_IE_ROUTING_AREA_ID routing_area;
+
+} BSSGP_RESUME_ACK_MSG;
+
+/*
+ * Resume Nack
+ */
+typedef struct {
+
+ RIL3_TLLI tlli;
+ T_CNI_RIL3_IE_ROUTING_AREA_ID routing_area;
+ RIL3_BSSGP_CAUSE exception_cause;
+
+} BSSGP_RESUME_NACK_MSG;
+
+
+
+/*
+ * Location Update
+ */
+typedef struct {
+
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+ RIL3_BVCI bvci;
+ T_CNI_RIL3_IE_LOCATION_AREA_ID location_area;
+ T_CNI_RIL3_IE_ROUTING_AREA_ID routing_area;
+
+} BSSGP_LOCATION_UPDATE_MSG;
+
+
+/*
+ * Location Update Ack
+ */
+typedef struct {
+
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+ T_CNI_RIL3_IE_LOCATION_AREA_ID location_area;
+
+} BSSGP_LOCATION_UPDATE_ACK_MSG;
+
+
+/*
+ * Location Update Nack
+ */
+typedef struct {
+
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+ T_CNI_RIL3_IE_LOCATION_AREA_ID location_area;
+ T_CNI_RIL3_IE_REJECT_CAUSE reject_cause;
+
+} BSSGP_LOCATION_UPDATE_NACK_MSG;
+
+
+/*
+ * Radio-Access-Capability
+ */
+typedef struct {
+
+ RIL3_TLLI tlli;
+ T_CNI_RIL3_IE_MS_RADIO_ACCESS_CAPABILITY ra_cap;
+
+} BSSGP_RADIO_CAP_MSG;
+
+
+/*
+ * Radio-Access-Capability-Update
+ */
+typedef struct {
+
+ RIL3_TLLI tlli;
+ UINT8 tag;
+
+} BSSGP_RADIO_CAP_UPDATE_MSG;
+
+
+/*
+ * Radio-Access-Capability-Update-Ack
+ */
+typedef struct {
+
+ RIL3_TLLI tlli;
+ UINT8 tag;
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+ RA_CAP_UPD_CAUSE cause;
+ T_CNI_RIL3_IE_MS_RADIO_ACCESS_CAPABILITY ra_cap;
+
+} BSSGP_RADIO_CAP_UPDATE_ACK_MSG;
+
+
+/*
+ * Flush-LL
+ */
+typedef struct {
+
+ RIL3_TLLI tlli;
+ RIL3_BVCI bvci_old;
+ RIL3_BVCI bvci_new;
+
+} BSSGP_FLUSH_LL_MSG;
+
+
+/*
+ * Flush-LL-ACK
+ */
+typedef struct {
+
+ RIL3_TLLI tlli;
+ BSSGP_FLUSH_ACTION flush_action;
+ RIL3_BVCI bvci_new;
+ UINT32 num_octets;
+
+} BSSGP_FLUSH_LL_ACK_MSG;
+
+
+/*
+ * LLC-Discarded
+ */
+typedef struct {
+
+ RIL3_TLLI tlli;
+ UINT8 num_frames;
+ RIL3_BVCI bvci;
+ UINT32 num_octets;
+
+} BSSGP_LLC_DISCARDED_MSG;
+
+
+/*
+ * Flow-Control-BVC
+ */
+typedef struct {
+
+ UINT8 tag;
+ UINT16 bvc_bucket_size;
+ UINT16 bucket_leak_rate;
+ UINT16 bmax;
+ UINT16 r_default;
+ RIL3_BVC_MEASUREMENT bvc_meas;
+
+} BSSGP_FLOW_CONTROL_BVC_MSG;
+
+
+/*
+ * Flow-Control-BVC-ACK
+ */
+typedef struct {
+
+ UINT8 tag;
+
+} BSSGP_FLOW_CONTROL_BVC_ACK_MSG;
+
+
+/*
+ * Flow-Control-MS
+ */
+typedef struct {
+
+ RIL3_TLLI tlli;
+ UINT8 tag;
+ UINT16 ms_bucket_size;
+ UINT16 bucket_leak_rate;
+
+} BSSGP_FLOW_CONTROL_MS_MSG;
+
+
+/*
+ * Flow-Control-MS-ACK
+ */
+typedef struct {
+
+ RIL3_TLLI tlli;
+ UINT8 tag;
+
+} BSSGP_FLOW_CONTROL_MS_ACK_MSG;
+
+
+/*
+ * BVC-Block
+ */
+typedef struct {
+
+ RIL3_BVCI bvci;
+ RIL3_BSSGP_CAUSE cause;
+
+} BSSGP_BVC_BLOCK_MSG;
+
+
+/*
+ * BVC-Block-ACK
+ */
+typedef struct {
+
+ RIL3_BVCI bvci;
+
+} BSSGP_BVC_BLOCK_ACK_MSG;
+
+
+/*
+ * BVC-Unblock
+ */
+typedef struct {
+
+ RIL3_BVCI bvci;
+
+} BSSGP_BVC_UNBLOCK_MSG;
+
+
+/*
+ * BVC-Unblock-ACK
+ */
+typedef struct {
+
+ RIL3_BVCI bvci;
+
+} BSSGP_BVC_UNBLOCK_ACK_MSG;
+
+
+/*
+ * BVC-Reset
+ */
+typedef struct {
+
+ RIL3_BVCI bvci;
+ RIL3_BSSGP_CAUSE cause;
+ RIL3_IE_CELL_IDENTIFIER cell_id;
+
+} BSSGP_BVC_RESET_MSG;
+
+
+/*
+ * BVC-Reset-ACK
+ */
+typedef struct {
+
+ RIL3_BVCI bvci;
+ RIL3_IE_CELL_IDENTIFIER cell_id;
+
+} BSSGP_BVC_RESET_ACK_MSG;
+
+
+/*
+ * BVC-Status
+ */
+typedef struct {
+
+ RIL3_BSSGP_CAUSE cause;
+ RIL3_BVCI bvci;
+
+} BSSGP_BVC_STATUS_MSG;
+
+
+/*
+ * The main API msg; which is overloaded with
+ * all the individual msgs
+ */
+typedef struct {
+
+ BSSGP_API_MSG_TYPE msg_type;
+ BSSGP_BVCI bvci;
+ int magic;
+
+ union {
+ BSSGP_DL_UNITDATA_MSG dl_unitdata; /* From GS --> GP-10 */
+ BSSGP_UL_UNITDATA_MSG ul_unitdata; /* From GP10 --> GS */
+ BSSGP_PAGING_PS_MSG paging_ps; /* From GS --> GP-10 */
+ BSSGP_RADIO_STATUS_MSG radio_status; /* From GP-10 --> GS */
+ BSSGP_SUSPEND_MSG suspend; /* From GP-10 --> GS */
+ BSSGP_SUSPEND_ACK_MSG suspend_ack; /* From GS --> GP-10 */
+ BSSGP_SUSPEND_NACK_MSG suspend_nack; /* From GS --> GP-10 */
+ BSSGP_RESUME_MSG resume; /* From GP-10 --> GS */
+ BSSGP_RESUME_ACK_MSG resume_ack; /* From GS --> GP-10 */
+ BSSGP_RESUME_NACK_MSG resume_nack; /* From GS --> GP-10 */
+ BSSGP_LOCATION_UPDATE_MSG location_update; /* From GS --> GP-10 */
+ BSSGP_LOCATION_UPDATE_ACK_MSG location_update_ack; /* From GP-10 --> GS */
+ BSSGP_LOCATION_UPDATE_NACK_MSG location_update_nack; /* From GP-10 --> GS */
+ BSSGP_RADIO_CAP_MSG radio_cap; /* From GS --> GP-10 */
+ BSSGP_RADIO_CAP_UPDATE_MSG radio_cap_update; /* From GP-10 --> GS */
+ BSSGP_RADIO_CAP_UPDATE_ACK_MSG radio_cap_update_ack; /* From GS --> GP-10 */
+ BSSGP_FLUSH_LL_MSG flush_ll; /* From GS --> GP-10 */
+ BSSGP_FLUSH_LL_ACK_MSG flush_ll_ack; /* From GP-10 --> GS */
+ BSSGP_LLC_DISCARDED_MSG llc_discarded; /* From GP-10 --> GS */
+ BSSGP_FLOW_CONTROL_BVC_MSG flow_control_bvc; /* From GP-10 --> GS */
+ BSSGP_FLOW_CONTROL_BVC_ACK_MSG flow_control_bvc_ack; /* From GS --> GP-10 */
+ BSSGP_FLOW_CONTROL_MS_MSG flow_control_ms; /* From GP-10 --> GS */
+ BSSGP_FLOW_CONTROL_MS_ACK_MSG flow_control_ms_ack; /* From GS --> GP-10 */
+ BSSGP_BVC_BLOCK_MSG bvc_block; /* From GS --> GP-10 */
+ BSSGP_BVC_BLOCK_ACK_MSG bvc_block_ack; /* From GP-10 --> GS */
+ BSSGP_BVC_UNBLOCK_MSG bvc_unblock; /* From GP-10 --> GS */
+ BSSGP_BVC_UNBLOCK_ACK_MSG bvc_unblock_ack; /* From GS --> GP-10 */
+ BSSGP_BVC_RESET_MSG bvc_reset; /* From GS <--> GP-10 */
+ BSSGP_BVC_RESET_ACK_MSG bvc_reset_ack; /* From GS <--> GP-10 */
+ BSSGP_BVC_STATUS_MSG bvc_status; /* From GS <--> GP-10 */
+ } msg;
+
+} BSSGP_API_MSG;
+
+
+
+
+/*
+ * API function prototypes
+ */
+
+/*
+ * This function below will be called by :-
+ * On GP-10 : GMM1 and RLC/MAC layers
+ * On GS : GMM2 and LLC
+ */
+BOOL bssgp_api_send_msg(BSSGP_API_MSG msg);
+
+/*
+ * Callback function provided by :
+ * GMM1 on GP-10
+ * GMM2 on GS
+ */
+BOOL gmm_bssgp_msg_callback(BSSGP_API_MSG msg);
+/* GRR needs to be called for packet-switched paging msg only */
+BOOL rm_bssgp_msg_callback(BSSGP_API_MSG msg);
+
+
+/*
+ * Common facility on both platforms to add a BVCI
+ */
+BSSGP_BVCI bssgp_net_add_bvci(char *peer_ip_addr, T_CNI_RIL3_IE_CELL_ID cell_id,UINT8 rac);
+
+
+#if defined(MNET_GP10)
+/*
+ * Callbacks defined by
+ * RLC/MAC on the GP-10
+ */
+BOOL rlc_bssgp_msg_callback(BSSGP_API_MSG msg);
+
+#elif defined(MNET_GS)
+
+/*
+ * interface to LLC on the GS
+ */
+BOOL bssgp_llc_api_handler(GS_BssgpDlUnitdataReq_t dl_unitdata);
+
+/*
+ *
+ */
+void bssgp_api_send_ul_unitdata(TLLI tlli,T_CNI_RIL3_IE_CELL_ID cell_id,T_CNI_RIL3_IE_ROUTING_AREA_ID rai,UINT8 *pdu_data,UINT16 pdu_len,BSSGP_BVCI bvci);
+
+
+UINT16 bssgp_api_get_bvc_leak_rate_by_cell_id_rac(T_CNI_RIL3_IE_CELL_ID cell_id,UINT8 rac);
+BSSGP_BVCI bssgp_net_get_bvci_by_cell_id_rac(T_CNI_RIL3_IE_CELL_ID cell_id,UINT8 rac);
+void bssgp_net_delete_bvci(BSSGP_BVCI bvci);
+void bssgp_net_delete_bvci_by_cell_id_rac(T_CNI_RIL3_IE_CELL_ID cell_id,UINT8 rac);
+
+#endif
+
+
+#endif /* #ifndef _BSSGP_API_HDR_INC_ */ \ No newline at end of file
diff --git a/data/mnet/Common/include/bssgp/bssgp_decoder.h b/data/mnet/Common/include/bssgp/bssgp_decoder.h
new file mode 100644
index 0000000..77d8f86
--- /dev/null
+++ b/data/mnet/Common/include/bssgp/bssgp_decoder.h
@@ -0,0 +1,68 @@
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : bssgp_decoder.h *
+ * *
+ * Description : Decoding function prototypes for the BSS-GP layer module *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |10/10/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+#ifndef BSSGP_DECODER_HDR_INCLUDE
+#define BSSGP_DECODER_HDR_INCLUDE
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "bssgp_prot.h"
+#include "bssgp_util.h"
+#include "bssgp_api.h"
+
+/*
+ * Just the function prototypes
+ */
+BOOL bssgp_decode_msg(UINT8 *msg,UINT16 msg_len,BOOL incoming,
+ BSSGP_NETWORK_QOS_LEVEL qos_level,BSSGP_BVCI bvci,BOOL *free_buff);
+BOOL bssgp_decode_dl_unitdata(UINT8 *msg,UINT16 *len, BSSGP_NETWORK_QOS_LEVEL qos_level);
+BOOL bssgp_decode_ul_unitdata(UINT8 *msg,UINT16 *len,BSSGP_NETWORK_QOS_LEVEL qos_level,BSSGP_BVCI bvci);
+BOOL bssgp_decode_paging_ps(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_radio_status(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_suspend(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_suspend_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_suspend_nack(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_resume(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_resume_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_resume_nack(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_location_update(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_location_update_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_location_update_nack(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_radio_cap(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_radio_cap_update(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_radio_cap_update_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_flow_control_ms(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_flow_control_ms_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_flush_ll(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_flush_ll_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_llc_discarded(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_flow_control_bvc(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_flow_control_bvc_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_block(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_block_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_unblock(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_unblock_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_reset(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_reset_ack(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+BOOL bssgp_decode_status(UINT8 *msg,UINT16 *msg_len, BOOL incoming);
+
+
+#ifdef WIN32
+void llcwin32_pdu_handler(LLC_PDU);
+#endif
+#endif /* #ifndef BSSGP_DECODER_HDR_INCLUDE */ \ No newline at end of file
diff --git a/data/mnet/Common/include/bssgp/bssgp_encoder.h b/data/mnet/Common/include/bssgp/bssgp_encoder.h
new file mode 100644
index 0000000..517b4d8
--- /dev/null
+++ b/data/mnet/Common/include/bssgp/bssgp_encoder.h
@@ -0,0 +1,69 @@
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : bssgp_encoder.h *
+ * *
+ * Description : Encoding function prototypes for the BSS-GP layer module *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |10/10/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+#ifndef BSSGP_ENCODER_HDR_INCLUDE
+#define BSSGP_ENCODER_HDR_INCLUDE
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "bssgp_prot.h"
+#include "bssgp_util.h"
+#include "bssgp_api.h"
+
+
+BOOL bssgp_encode_msg(BSSGP_API_MSG *api_msg,UINT8 *msg,UINT16 *msg_len,
+ BSSGP_NETWORK_QOS_LEVEL *qos_reqd, BOOL *tx_msg);
+BOOL bssgp_encode_dl_unitdata(BSSGP_DL_UNITDATA_MSG dl_unitdata_msg ,UINT8 *msg,
+ UINT16 *len, BSSGP_NETWORK_QOS_LEVEL *qos_reqd, BOOL *tx_msg);
+BOOL bssgp_encode_ul_unitdata(BSSGP_UL_UNITDATA_MSG ul_unitdata_msg,UINT8 *msg,UINT16 *len,
+ BSSGP_NETWORK_QOS_LEVEL *qos_reqd, BOOL *tx_msg);
+BOOL bssgp_encode_paging_ps(BSSGP_PAGING_PS_MSG paging_msg ,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_radio_status(BSSGP_RADIO_STATUS_MSG radio_status_msg ,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_suspend(BSSGP_SUSPEND_MSG suspend_msg,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_suspend_ack(BSSGP_SUSPEND_ACK_MSG suspend_ack_msg ,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_suspend_nack(BSSGP_SUSPEND_NACK_MSG suspend_nack_msg ,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_resume(BSSGP_RESUME_MSG resume_msg ,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_resume_ack(BSSGP_RESUME_ACK_MSG resume_ack_msg ,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_resume_nack(BSSGP_RESUME_NACK_MSG resume_nack_msg ,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_location_update(BSSGP_LOCATION_UPDATE_MSG location_update_msg ,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_location_update_ack(BSSGP_LOCATION_UPDATE_ACK_MSG location_update_ack ,
+ UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_location_update_nack(BSSGP_LOCATION_UPDATE_NACK_MSG location_update_nack ,UINT8 *msg,
+ UINT16 *msg_len);
+BOOL bssgp_encode_radio_cap(BSSGP_RADIO_CAP_MSG radio_cap ,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_radio_cap_update(BSSGP_RADIO_CAP_UPDATE_MSG radio_cap_update ,UINT8 *msg,
+ UINT16 *msg_len);
+BOOL bssgp_encode_radio_cap_update_ack(BSSGP_RADIO_CAP_UPDATE_ACK_MSG radio_cap_update_ack ,UINT8 *msg,
+ UINT16 *msg_len);
+BOOL bssgp_encode_flow_control_ms(BSSGP_FLOW_CONTROL_MS_MSG flow_control_ms,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_flow_control_ms_ack(BSSGP_FLOW_CONTROL_MS_ACK_MSG flow_control_ms_ack,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_flush_ll(BSSGP_FLUSH_LL_MSG flush_ll,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_flush_ll_ack(BSSGP_FLUSH_LL_ACK_MSG flush_ll_ack,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_flow_control_bvc(BSSGP_FLOW_CONTROL_BVC_MSG flow_control_bvc, UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_flow_control_bvc_ack(BSSGP_FLOW_CONTROL_BVC_ACK_MSG flow_control_bvc_ack, UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_llc_discarded(BSSGP_LLC_DISCARDED_MSG llc_discarded,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_bvc_block(BSSGP_BVC_BLOCK_MSG bvc_block,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_bvc_block_ack(BSSGP_BVC_BLOCK_ACK_MSG bvc_block_ack,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_bvc_unblock(BSSGP_BVC_UNBLOCK_MSG bvc_unblock,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_bvc_unblock_ack(BSSGP_BVC_UNBLOCK_ACK_MSG bvc_unblock_ack,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_bvc_reset(BSSGP_BVC_RESET_MSG bvc_reset,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_bvc_reset_ack(BSSGP_BVC_RESET_ACK_MSG bvc_reset_ack,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_encode_bvc_status(BSSGP_BVC_STATUS_MSG bvc_status,UINT8 *msg,UINT16 *msg_len);
+
+
+#endif /* #ifndef BSSGP_ENCODER_HDR_INCLUDE */ \ No newline at end of file
diff --git a/data/mnet/Common/include/bssgp/bssgp_ie_decoder.h b/data/mnet/Common/include/bssgp/bssgp_ie_decoder.h
new file mode 100644
index 0000000..fd8f8f3
--- /dev/null
+++ b/data/mnet/Common/include/bssgp/bssgp_ie_decoder.h
@@ -0,0 +1,77 @@
+/****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : bssgp_ie_decoder.h *
+ * *
+ * Description : Function prototypes for the IEI decoder module of BSSGP *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |10/10/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+
+#ifndef BSSGP_IE_DEC_HDR_INCLUDE
+#define BSSGP_IE_DEC_HDR_INCLUDE
+
+#include <stdio.h>
+#include "bssgp_prot.h"
+#include "bssgp_api.h"
+
+
+/*
+ * All the function prototpes
+ */
+BOOL bssgp_ie_decode_alignment_octets(UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_bmax_def_ms(UINT16 *bmax, UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_bss_area_ind(RIL3_BSS_AREA_INDICATION *bss_area, UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_bucket_leak_rate(UINT16 *r_value, UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_bvc_bucket_size(UINT16 *bmax, UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_bvci(RIL3_BVCI *bvci,UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_bvc_measurement(RIL3_BVC_MEASUREMENT *delay_val, UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_exception_cause(RIL3_BSSGP_CAUSE *cause,UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_cell_id(RIL3_IE_CELL_IDENTIFIER *cell_id,UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_channel_needed(UINT8 *val, UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_drx_params(T_CNI_RIL3_IE_DRX_PARAMETER *drx_params,UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_emlpp_priority(UINT8 *val, UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_flush_action(BSSGP_FLUSH_ACTION *action, UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_imsi(T_CNI_RIL3_IE_MOBILE_ID *imsi,UINT8 *msg,UINT16 *msg_len);
+BOOL bssgp_ie_decode_llc_pdu(BSSGP_DL_UNITDATA_MSG *dl_unitdata,UINT8 *msg,UINT16 *len);
+UINT8* bssgp_ie_decode_llc_pdu_ext(UINT16 *pdu_len,UINT8 *msg,UINT16 *len);
+
+BOOL bssgp_ie_decode_llc_frames_discarded(UINT8 *frames, UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_location_area(T_CNI_RIL3_IE_LOCATION_AREA_ID *location_area,UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_lsa_identifier_list(RIL3_IE_LSA_IDENTIFIER_LIST *lsa_id_list,UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_lsa_info(RIL3_IE_LSA_INFORMATION *lsa_info, UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_mobile_id(UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_ms_bucket_size(UINT16 *bmax, UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_ms_ra_cap(T_CNI_RIL3_IE_MS_RADIO_ACCESS_CAPABILITY *ra_cap,UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_omc_id(UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_pdu_in_error(UINT8 *llc_pdu,UINT16 *pdu_len,UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_pdu_lifetime(RIL3_IE_PDU_LIFETIME *delay, UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_priority(RIL3_IE_PRIORITY *priority, UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_qos_params(T_CNI_RIL3_IE_QOS *qos_params, UINT8 *msg, UINT16 *len);
+BOOL bssgp_ie_decode_qos_profile(T_RIL3_IE_QOS_PROFILE_ID *qos_profile,UINT8 *msg,UINT16 *len, BSSGP_IEI_FORMAT format);
+BOOL bssgp_ie_decode_radio_cause(T_RIL3_IE_RADIO_CAUSE_ID *radio_cause,UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_ra_cap_update_cause(RA_CAP_UPD_CAUSE *ra_cause,UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_reject_cause(T_CNI_RIL3_IE_REJECT_CAUSE *reject_cause, UINT8 *msg, UINT16 *len);
+BOOL bssgp_ie_decode_routing_area(T_CNI_RIL3_IE_ROUTING_AREA_ID *routing_area,UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_r_def_ms(UINT16 *r_default,UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_suspend_ref_num(UINT8 *suspend_ref_num,UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_tag(UINT8 *tag,UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_tlli(RIL3_TLLI *tlli,UINT8 *msg,UINT16 *len, BSSGP_IEI_FORMAT format);
+BOOL bssgp_ie_decode_tmsi(T_CNI_RIL3_IE_MOBILE_ID *tmsi,UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_trace_ref(UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_trace_type(UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_txn_id(UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_trigger_id(UINT8 *msg,UINT16 *len);
+BOOL bssgp_ie_decode_num_octets_affected(UINT32 *num,UINT8 *msg,UINT16 *len);
+UINT16 bssgp_ie_decode_iei_length(UINT8 *msg,UINT16 *msg_len);
+
+
+#endif /* #ifndef BSSGP_IE_DEC_HDR_INCLUDE */ \ No newline at end of file
diff --git a/data/mnet/Common/include/bssgp/bssgp_ie_encoder.h b/data/mnet/Common/include/bssgp/bssgp_ie_encoder.h
new file mode 100644
index 0000000..ba84b9a
--- /dev/null
+++ b/data/mnet/Common/include/bssgp/bssgp_ie_encoder.h
@@ -0,0 +1,75 @@
+/****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : bssgp_ie_encoder.h *
+ * *
+ * Description : Function prototypes for the IEI encoder module of BSSGP *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |10/10/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+
+#ifndef BSSGP_IE_ENC_HDR_INCLUDE
+#define BSSGP_IE_ENC_HDR_INCLUDE
+
+#include <stdio.h>
+#include "bssgp_prot.h"
+#include "bssgp_api.h"
+
+
+/*
+ * All the function prototpes
+ */
+void bssgp_ie_encode_alignment_octets(UINT8 count,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_bmax_def_ms(UINT16 bmax,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_bss_area_ind(RIL3_BSS_AREA_INDICATION bss_area,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_bucket_leak_rate(UINT16 leak_rate,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_bvc_bucket_size(UINT16 bucket_size,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_bvci(RIL3_BVCI bvci,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_bvc_measurement(RIL3_BVC_MEASUREMENT bvc_meas,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_exception_cause(RIL3_BSSGP_CAUSE cause,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_cell_id(RIL3_IE_CELL_IDENTIFIER cell_id,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_channel_needed(UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_drx_params(T_CNI_RIL3_IE_DRX_PARAMETER drx_params,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_emlpp_priority(UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_flush_action(BSSGP_FLUSH_ACTION flush_action,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_imsi(T_CNI_RIL3_IE_MOBILE_ID imsi,UINT8 *msg,UINT16 *msg_len);
+void bssgp_ie_encode_llc_pdu(UINT8* llc_pdu, UINT16 pdu_len,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_llc_frames_discarded(UINT8 num_frames,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_location_area(T_CNI_RIL3_IE_LOCATION_AREA_ID location_area,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_lsa_identifier_list(RIL3_IE_LSA_IDENTIFIER_LIST lsa_id_list,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_lsa_info(RIL3_IE_LSA_INFORMATION lsa_info,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_mobile_id(UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_ms_bucket_size(UINT16 bucket_size,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_ms_ra_cap(T_CNI_RIL3_IE_MS_RADIO_ACCESS_CAPABILITY ra_cap,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_omc_id(UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_pdu_in_error(BSSGP_PDU_TYPE pdu_type,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_pdu_lifetime(RIL3_IE_PDU_LIFETIME pdu_lifetime,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_priority(RIL3_IE_PRIORITY priority,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_qos_params(T_CNI_RIL3_IE_QOS qos_params, UINT8 *msg, UINT16 *len);
+void bssgp_ie_encode_qos_profile(T_RIL3_IE_QOS_PROFILE_ID qos_profile,UINT8 *msg,UINT16 *len, BSSGP_IEI_FORMAT format);
+void bssgp_ie_encode_radio_cause(T_RIL3_IE_RADIO_CAUSE_ID radio_cause,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_reject_cause(T_CNI_RIL3_IE_REJECT_CAUSE reject_cause, UINT8 *msg, UINT16 *len);
+void bssgp_ie_encode_ra_cap_update_cause(RA_CAP_UPD_CAUSE ra_cause,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_routing_area(T_CNI_RIL3_IE_ROUTING_AREA_ID routing_area,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_r_def_ms(UINT16 r_default,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_suspend_ref_num(UINT8 suspend_ref_num,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_tag(UINT8 tag,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_tlli(RIL3_TLLI tlli,UINT8 *msg,UINT16 *len, BSSGP_IEI_FORMAT format);
+void bssgp_ie_encode_tmsi(T_CNI_RIL3_IE_MOBILE_ID tmsi,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_trace_ref(UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_trace_type(UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_txn_id(UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_trigger_id(UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_num_octets_affected(UINT32 num_octets,UINT8 *msg,UINT16 *len);
+void bssgp_ie_encode_iei_length(int iei_len,UINT8 *msg,UINT16 *msg_len);
+
+
+#endif /* BSSGP_IE_ENC_HDR_INCLUDE */
diff --git a/data/mnet/Common/include/bssgp/bssgp_net.h b/data/mnet/Common/include/bssgp/bssgp_net.h
new file mode 100644
index 0000000..68f61f8
--- /dev/null
+++ b/data/mnet/Common/include/bssgp/bssgp_net.h
@@ -0,0 +1,83 @@
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : bssgp_net.h *
+ * *
+ * Description : Network handling functions for the BSS-GP layer module *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |10/10/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+#ifndef BSSGP_NET_HDR_INCLUDE
+#define BSSGP_NET_HDR_INCLUDE
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "bssgp_prot.h"
+#include "bssgp_util.h"
+#include "bssgp_api.h"
+#include "ril3/ie_cell_id.h"
+
+typedef struct {
+
+ BOOL used;
+ char peer_ip_addr[INET_ADDR_LEN];
+ T_CNI_RIL3_IE_CELL_ID cell_id;
+ UINT8 routing_area_code;
+ UINT16 leak_rate;
+ BSSGP_BVCI peer_bvci;
+
+} BSSGP_BVCI_ENTRY;
+
+
+typedef struct {
+
+ int socks[BSSGP_MAX_NETWORK_QOS_LEVELS];
+ unsigned short ports[BSSGP_MAX_NETWORK_QOS_LEVELS];
+ unsigned short base_port;
+ BOOL continue_processing;
+
+ BSSGP_BVCI_ENTRY bvci_list[BSSGP_MAX_BVCI];
+
+ int init_magic;
+
+} BSSGP_NET_CONFIG;
+
+
+/*
+ * Function prototypes
+ */
+BOOL bssgp_net_initialize(void);
+void bssgp_net_task(void);
+void bssgp_net_rx_handler(int index,int rx_bytes);
+BOOL bssgp_net_init_bvcis(void);
+BSSGP_BVCI bssgp_net_get_bvci_by_ip(char *ip_addr);
+char *bssgp_net_get_ip_by_bvci(BSSGP_BVCI bvci);
+#if defined(MNET_GS)
+/*
+ ******************************************************************
+ * Network Functions specific to the GS Platform
+ ******************************************************************
+ */
+BOOL bssgp_net_tx_msg(BSSGP_BVCI bvci,BSSGP_NETWORK_QOS_LEVEL qos_level,UINT8 *msg,UINT16 msg_len);
+
+#elif defined(MNET_GP10)
+/*
+ ******************************************************************
+ * Network Functions specific to the GP-10 Platform
+ ******************************************************************
+ */
+BOOL bssgp_net_tx_msg(BSSGP_NETWORK_QOS_LEVEL qos_level,UINT8 *msg,UINT16 msg_len);
+
+#endif
+
+
+#endif /* #ifndef BSSGP_NET_HDR_INCLUDE */ \ No newline at end of file
diff --git a/data/mnet/Common/include/bssgp/bssgp_prot.h b/data/mnet/Common/include/bssgp/bssgp_prot.h
new file mode 100644
index 0000000..c1465ff
--- /dev/null
+++ b/data/mnet/Common/include/bssgp/bssgp_prot.h
@@ -0,0 +1,180 @@
+/****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : bssgp_prot.h *
+ * *
+ * Description : Header file containing data structures & definitions for the *
+ * BSS-GP layer *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |10/10/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+
+#ifndef BSSGP_PROT_HDR_INCLUDE
+#define BSSGP_PROT_HDR_INCLUDE
+
+#define BSSGP_MAGIC 0x1234
+#define BSSGP_BVCI unsigned short /* just an index into an array, really */
+#define BSSGP_MAX_BVCI 10
+#define BSSGP_ROOT_BVCI 0 /* for the GP-10 there is only 1 BVCI */
+
+/*
+ * The IE Identifier types
+ */
+typedef enum {
+
+ BSSGP_IEI_ALIGNMENT_OCTETS = 0x00,
+ BSSGP_IEI_BMAX_DEFAULT_MS = 0x01,
+ BSSGP_IEI_BSS_AREA_IND = 0x02,
+ BSSGP_IEI_BUCKET_LEAK_RATE = 0x03,
+ BSSGP_IEI_BVCI = 0x04,
+ BSSGP_IEI_BVC_BUCKET_SIZE = 0x05,
+ BSSGP_IEI_BVC_MEASUREMENT = 0x06,
+ BSSGP_IEI_CAUSE = 0x07,
+ BSSGP_IEI_CELL_ID = 0x08,
+ BSSGP_IEI_CHAN_NEEDED = 0x09,
+ BSSGP_IEI_DRX_PARAMS = 0x0a,
+ BSSGP_IEI_EMLPP_PRIORITY = 0x0b,
+ BSSGP_IEI_FLUSH_ACTION = 0x0c,
+ BSSGP_IEI_IMSI = 0x0d,
+ BSSGP_IEI_LLC_PDU = 0x0e,
+ BSSGP_IEI_LLC_FRAMES_DISCARDED = 0x0f,
+ BSSGP_IEI_LOCATION_AREA = 0x10,
+ BSSGP_IEI_MOBILE_ID = 0x11,
+ BSSGP_IEI_MS_BUCKET_SIZE = 0x12,
+ BSSGP_IEI_MS_RADIO_ACCESS_CAP = 0x13,
+ BSSGP_IEI_OMC_ID = 0x14,
+ BSSGP_IEI_PDU_IN_ERROR = 0x15,
+ BSSGP_IEI_PDU_LIFETIME = 0x16,
+ BSSGP_IEI_PRIORITY = 0x17,
+ BSSGP_IEI_QOS_PROFILE = 0x18,
+ BSSGP_IEI_RADIO_CAUSE = 0x19,
+ BSSGP_IEI_RA_CAP_UPD_CAUSE = 0x1a,
+ BSSGP_IEI_ROUTING_AREA = 0x1b,
+ BSSGP_IEI_R_DEFAULT_MS = 0x1c,
+ BSSGP_IEI_SUSPEND_REF_NUM = 0x1d,
+ BSSGP_IEI_TAG = 0x1e,
+ BSSGP_IEI_TLLI = 0x1f,
+ BSSGP_IEI_TMSI = 0x20,
+ BSSGP_IEI_TRACE_REF = 0x21,
+ BSSGP_IEI_TRACE_TYPE = 0x22,
+ BSSGP_IEI_TRANSACTION_ID = 0x23,
+ BSSGP_IEI_TRIGGER_ID = 0x24,
+ BSSGP_IEI_NUM_OCTETS_AFFECTED = 0x25,
+ BSSGP_IEI_LSA_ID_LIST = 0x26,
+ BSSGP_IEI_LSA_INFORMATION = 0x27,
+
+ /* Cisco-EWTBU proprietary extensions */
+ BSSGP_IEI_QOS_PARAMS = 0x28,
+ BSSGP_IEI_LA_REJECT_CAUSE = 0x29,
+
+
+ BSSGP_IEI_MAX_TYPES = 0x30
+
+} BSSGP_IEI_TYPE;
+
+/*
+ * Information Element Format
+ */
+typedef enum {
+ BSSGP_FORMAT_V = 0x0,
+ BSSGP_FORMAT_TLV = 0x1
+} BSSGP_IEI_FORMAT;
+
+/*
+ * PDU Types
+ */
+typedef enum {
+
+ BSSGP_PDU_DL_UNITDATA = 0x00,
+ BSSGP_PDU_UL_UNITDATA = 0x01,
+ BSSGP_PDU_RA_CAP = 0x02,
+ BSSGP_PDU_PTM_UNITDATA = 0x03,
+
+ BSSGP_PDU_PAGING_PS = 0x06,
+ BSSGP_PDU_PAGING_CS = 0x07,
+ BSSGP_PDU_RA_CAP_UPDATE = 0x08,
+ BSSGP_PDU_RA_CAP_UPDATE_ACK = 0x09,
+ BSSGP_PDU_RADIO_STATUS = 0x0a,
+ BSSGP_PDU_SUSPEND = 0x0b,
+ BSSGP_PDU_SUSPEND_ACK = 0x0c,
+ BSSGP_PDU_SUSPEND_NACK = 0x0d,
+ BSSGP_PDU_RESUME = 0x0e,
+ BSSGP_PDU_RESUME_ACK = 0x0f,
+ BSSGP_PDU_RESUME_NACK = 0x10,
+
+ BSSGP_PDU_BVC_BLOCK = 0x20,
+ BSSGP_PDU_BVC_BLOCK_ACK = 0x21,
+ BSSGP_PDU_RESET = 0x22,
+ BSSGP_PDU_RESET_ACK = 0x23,
+ BSSGP_PDU_UNBLOCK = 0x24,
+ BSSGP_PDU_UNBLOCK_ACK = 0x25,
+ BSSGP_PDU_FLOW_CONTROL_BVC = 0x26,
+ BSSGP_PDU_FLOW_CONTROL_BVC_ACK = 0x27,
+ BSSGP_PDU_FLOW_CONTROL_MS = 0x28,
+ BSSGP_PDU_FLOW_CONTROL_MS_ACK = 0x29,
+ BSSGP_PDU_FLUSH_LL = 0x2a,
+ BSSGP_PDU_FLUSH_LL_ACK = 0x2b,
+ BSSGP_PDU_LLC_DISCARDED = 0x2c,
+
+ BSSGP_PDU_LOCATION_UPDATE = 0x30,
+ BSSGP_PDU_LOCATION_UPDATE_ACK = 0x31,
+ BSSGP_PDU_LOCATION_UPDATE_NACK = 0x32,
+ BSSGP_PDU_ROUTING_AREA_UPDATE = 0x33,
+
+ BSSGP_PDU_SGSN_INVOKE_TRACE = 0x40,
+ BSSGP_PDU_STATUS = 0x42,
+ BSSGP_PDU_MAX_TYPES = 0x43
+
+} BSSGP_PDU_TYPE;
+
+
+/*
+ * The QOS levels on the
+ * network side
+ */
+typedef enum {
+
+ BSSGP_NETWORK_QOS_LEVEL_1 = 0,
+ BSSGP_NETWORK_QOS_LEVEL_2 = 1,
+ BSSGP_NETWORK_QOS_LEVEL_3 = 2,
+ BSSGP_NETWORK_QOS_LEVEL_4 = 3,
+ BSSGP_MAX_NETWORK_QOS_LEVELS = 4
+
+} BSSGP_NETWORK_QOS_LEVEL;
+
+
+/*
+ * Radio-Access-Capability-Update Cause
+ */
+typedef enum {
+
+ RA_CAP_UPD_CAUSE_IE_PRESENT = 0x00,
+ RA_CAP_UPD_CAUSE_TLLI_UNKNOWN = 0x01,
+ RA_CAP_UPD_CAUSE_NO_RA_CAP = 0x02
+
+} RA_CAP_UPD_CAUSE;
+
+
+/*
+ * Flush Action
+ */
+typedef enum {
+
+ BSSGP_LLC_PDU_DELETED = 0x00,
+ BSSGP_LLC_PDU_TRANSFERRED = 0x01
+
+} BSSGP_FLUSH_ACTION;
+
+
+
+
+
+#endif /* #ifndef BSSGP_PROT_HDR_INCLUDE */ \ No newline at end of file
diff --git a/data/mnet/Common/include/bssgp/bssgp_unitdata.h b/data/mnet/Common/include/bssgp/bssgp_unitdata.h
new file mode 100644
index 0000000..a935a61
--- /dev/null
+++ b/data/mnet/Common/include/bssgp/bssgp_unitdata.h
@@ -0,0 +1,221 @@
+/****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : unitdata.h *
+ * *
+ * Description : Header file containing data structures & definitions for *
+ * handling the unitdata buffers *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |10/10/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+
+#ifndef BSSGP_UNITDATA_HDR_INCLUDE
+#define BSSGP_UNITDATA_HDR_INCLUDE
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "bssgp_prot.h"
+#include "bssgp_util.h"
+#include "bssgp_api.h"
+
+
+
+/*
+ * Maximum number of pre-allocated buffers
+ */
+#define BSSGP_UNITDATA_MAX_BUFFERS 10240
+/*
+ * Maximum number of pre-allocated TLLI lists
+ */
+#define BSSGP_UNITDATA_MAX_TLLI_LISTS 75
+/*
+ * Its Magic !!!
+ */
+#define BSSGP_UNITDATA_MAGIC 0x2222
+
+/*
+ * The basic structure to hold information
+ * about the UNITDATA PDU. This will be in a doubly-linked
+ * list on a per-QoS-level per TLLI basis
+ */
+typedef struct _UDT_BUFFER_{
+
+ struct _UDT_BUFFER_ *prev;
+ struct _UDT_BUFFER_ *next;
+ UINT32 magic;
+ UINT32 index;
+ UINT32 data_size;
+ BSSGP_DL_UNITDATA_MSG dl_unitdata;
+ void *data; /* Whatever, placeholder, for now */
+
+} BSSGP_UDT_BUFFER,*PBSSGP_UDT_BUFFER;
+
+/*
+ * the QoS queue structure; each QoS Q will hold
+ * a doubly linked list of UDT buffers (above) for
+ * a particular QoS level. There should be 4/four of
+ * these QoS Qs per TLLI Q/List
+ */
+typedef struct {
+
+ UINT32 buff_count;
+ UINT32 rx_bytes;
+ BSSGP_NETWORK_QOS_LEVEL qos_level;
+ PBSSGP_UDT_BUFFER buff_list_head;
+ PBSSGP_UDT_BUFFER buff_list_tail;
+
+} BSSGP_UDT_QOS_Q, *PBSSGP_UDT_QOS_Q;
+
+
+/*
+ * the TLLI Q structure; a doubly-linked list which
+ * is allocated per TLLI, each of which holds four/4
+ * QoS queues of UNITDATA PDUs on the QoS level basis
+ */
+typedef struct _TLLI_Q_ {
+
+ struct _TLLI_Q_ *prev;
+ struct _TLLI_Q_ *next;
+ TLLI tlli;
+ UINT32 magic;
+ UINT32 index;
+ UINT32 buff_count;
+ UINT32 rx_bytes;
+
+ BOOL high_watermark_indicated;
+
+ BSSGP_UDT_QOS_Q qos_queues[BSSGP_MAX_NETWORK_QOS_LEVELS];
+
+
+} BSSGP_UDT_TLLI_Q,*PBSSGP_UDT_TLLI_Q;
+
+
+/*
+ * The basic structure to hold information
+ * used to implement a PDU lifetime
+ */
+typedef struct _UDT_TIMEOUT_BUFFER_{
+
+ BSSGP_UDT_BUFFER *prev;
+ BSSGP_UDT_BUFFER *next;
+ UINT32 timeoutTicks;
+ BOOL used;
+
+} BSSGP_UDT_TIMEOUT_BUFFER, *PBSSGP_UDT_TIMEOUT_BUFFER;
+
+
+
+/*
+ * Wrapper for the TLLI_Q structure to
+ * allocate/deallocate into a pool
+ */
+typedef struct {
+
+ PBSSGP_UDT_TLLI_Q entry;
+ BOOL used;
+
+} BSSGP_UDT_TLLI_POOL_ENTRY, *PBSSGP_UDT_TLLI_POOL_ENTRY;
+
+
+/*
+ * Wrapper for the UDT_BUFFER structure to
+ * allocate/deallocate into a pool
+ */
+typedef struct {
+
+ PBSSGP_UDT_BUFFER entry;
+ BOOL used;
+
+} BSSGP_UDT_BUFF_POOL_ENTRY, *PBSSGP_UDT_BUFF_POOL_ENTRY;
+
+
+
+
+typedef void (*BSSGP_UDT_WATERMARK_CB)(TLLI tlli,UINT32 rx_bytes,UINT32 rx_buffs,BOOL high);
+
+
+
+
+/*
+ * The core UNITDATA configuration structure
+ * for holding configuration information for
+ * the unitdata buffer queuing mechanisms
+ */
+typedef struct {
+ /*
+ * The num of UDT buffers to be pre-allocated
+ * and placed into the pool
+ */
+ UINT32 udt_buff_count;
+
+ /*
+ * The num of TLLI Qs/Lists to be pre-allocated
+ * and placed into the pool
+ */
+ UINT32 tlli_list_count;
+
+ UINT32 tlli_high_watermark_bytes;
+ /*
+ * indicates the num of bytes, which if
+ * exceeded, flow-control should be enabled
+ */
+
+ UINT32 tlli_low_watermark_bytes;
+ /*
+ * indicates the num of bytes, which if the list
+ * count falls below, flow-control can be
+ * disabled
+ */
+
+ PBSSGP_UDT_TLLI_Q tlli_q_head; /* head of the TLLI doubly-linked list */
+ PBSSGP_UDT_TLLI_Q tlli_q_tail; /* tail of the TLLI doubly-linked list */
+
+ /*
+ * Pools for holding TLLI Lists and UDT Buffers
+ *
+ */
+ BSSGP_UDT_TLLI_POOL_ENTRY *tlli_pool;
+
+ BSSGP_UDT_BUFF_POOL_ENTRY *udt_buff_pool;
+
+ BSSGP_UDT_TIMEOUT_BUFFER **udt_timeout_pool;
+
+ /*
+ * Callback functions to be called when the high or
+ * low watermarks are reached for a particular TLLI
+ */
+ BSSGP_UDT_WATERMARK_CB watermark_cb;
+
+} BSSGP_UNITDATA_CONFIG;
+
+
+/*
+ * Function prototypes
+ */
+BOOL bssgp_udt_initialize(int tlli_list_count,int bssgp_udt_buffer_count,BSSGP_UDT_WATERMARK_CB watermark_cb);
+BOOL bssgp_udt_put_buffer_in_q(TLLI tlli,BSSGP_NETWORK_QOS_LEVEL qos_level,UINT8 *buff, int buff_size,BSSGP_DL_UNITDATA_MSG dl_unitdata);
+UINT8 *bssgp_udt_get_buff_by_tlli(TLLI tlli,BSSGP_DL_UNITDATA_MSG*);
+UINT8 *bssgp_udt_get_buff_by_qos(BSSGP_NETWORK_QOS_LEVEL qos_level,BSSGP_DL_UNITDATA_MSG*);
+UINT8 *bssgp_udt_get_buff_by_tlli_qos(TLLI tlli, BSSGP_NETWORK_QOS_LEVEL qos_level,BSSGP_DL_UNITDATA_MSG*);
+BOOL bssgp_udt_check_buff_by_tlli(TLLI tlli, BSSGP_DL_UNITDATA_MSG **dl_unitdata);
+BOOL bssgp_udt_check_buff_by_qos(BSSGP_NETWORK_QOS_LEVEL qos_level, BSSGP_DL_UNITDATA_MSG **dl_unitdata);
+void bssgp_udt_flush_tlli(TLLI tlli);
+BOOL bssgp_udt_allocate_buff_pool();
+BOOL bssgp_udt_free_buff_pool();
+PBSSGP_UDT_BUFFER bssgp_udt_get_buff_from_pool();
+void bssgp_udt_return_buff_to_pool(PBSSGP_UDT_BUFFER bssgp_udt_buff);
+BOOL bssgp_udt_allocate_tlli_pool();
+BOOL bssgp_udt_free_tlli_pool();
+PBSSGP_UDT_TLLI_Q bssgp_udt_get_tlli_list_from_pool();
+void bssgp_udt_return_tlli_list_to_pool(PBSSGP_UDT_TLLI_Q tlli_q);
+void bssgp_udt_free_qos_list_buffs(PBSSGP_UDT_QOS_Q qos_q, UINT32 *bytes_freed, UINT32 *buffs_freed);
+
+#endif /* #ifndef BSSGP_UNITDATA_HDR_INCLUDE */ \ No newline at end of file
diff --git a/data/mnet/Common/include/bssgp/bssgp_util.h b/data/mnet/Common/include/bssgp/bssgp_util.h
new file mode 100644
index 0000000..9b80415
--- /dev/null
+++ b/data/mnet/Common/include/bssgp/bssgp_util.h
@@ -0,0 +1,97 @@
+/****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : bssgp_util.h *
+ * *
+ * Description : Header file containing function prototypes of the utility *
+ * module within BSSGP layer *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |10/10/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+
+#ifndef BSSGP_UTIL_HDR_INCLUDE
+#define BSSGP_UTIL_HDR_INCLUDE
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include "bssgp_prot.h"
+#include "bssgp_api.h"
+
+
+#if defined(MNET_GS)
+
+#define BSSGP_LAYER GS_LOG_BSSGP
+#define BSSGP_ENCODER_LAYER GS_LOG_BSSGP_ENCODER
+#define BSSGP_DECODER_LAYER GS_LOG_BSSGP_DECODER
+#define BSSGP_NET_LAYER GS_LOG_BSSGP_NET
+#define BSSGP_UNITDATA_LAYER GS_LOG_BSSGP_UNITDATA
+
+#include "logmodules.h"
+#include "vclogging.h"
+
+
+#elif defined(MNET_GP10)
+
+
+#include "logging/vcmodules.h"
+#include "logging/vclogging.h"
+
+
+#elif defined(WIN32)
+
+#include "dbgout.h"
+#include <winsock.h>
+
+#define INET_ADDR_LEN 20
+
+/* This to be defined in the driving stub */
+void bssgp_api_send_ul_unitdata(TLLI tlli,T_CNI_RIL3_IE_CELL_ID cell_id,UINT8 *pdu_data,UINT16 pdu_len);
+
+
+
+#endif
+
+#ifndef ASSERT
+#define ASSERT assert
+#endif
+
+#define bssgp_assert_on_not_implemented 1
+#define bssgp_assert_on_invalid_msg 2
+
+
+
+typedef struct {
+#if defined(MNET_GS)
+ int magic;
+#elif defined(MNET_GP10)
+ T_CNI_RIL3_IE_CELL_ID cell_id;
+ T_CNI_RIL3_IE_ROUTING_AREA_ID routing_area_id;
+#endif
+} BSSGP_CONFIGURATION;
+
+/*
+ * Function prototypes
+ */
+char *bssgp_util_get_iei_str(BSSGP_IEI_TYPE iei_type);
+char *bssgp_util_get_pdu_type_str(BSSGP_PDU_TYPE pdu_type);
+char *bssgp_util_get_api_msg_str(BSSGP_API_MSG_TYPE api_msg);
+
+char *bssgp_util_get_radio_cause_str(UINT8 radio_cause);
+char *bssgp_util_get_exception_cause_str(BSSGP_EXCEPTION_CAUSE cause);
+char *bssgp_util_get_ra_cap_cause_str(RA_CAP_UPD_CAUSE ra_cause);
+
+BOOL bssgp_util_init_rx_buffs(void);
+char *bssgp_util_get_rx_buff(int reqd_buff_size);
+void bssgp_util_return_rx_buff(char *);
+int bssgp_util_get_rx_buff_size();
+#endif /* #ifndef BSSGP_UTIL_HDR_INCLUDE */ \ No newline at end of file
diff --git a/data/mnet/Common/include/cdr/CdrSSA.h b/data/mnet/Common/include/cdr/CdrSSA.h
new file mode 100644
index 0000000..4785b67
--- /dev/null
+++ b/data/mnet/Common/include/cdr/CdrSSA.h
@@ -0,0 +1,77 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+// CdrSSA.h: interface for the CCdrSSA class.
+//
+//////////////////////////////////////////////////////////////////////
+#ifndef _CDR_SSA_H_
+#define _CDR_SSA_H_
+
+#include "cdr\include\CdrBase.h"
+
+typedef enum {
+ CDR_SS_ACTION_REGISTRATION = 0,
+ CDR_SS_ACTION_ERASURE = 1,
+ CDR_SS_ACTION_ACTIVATION = 2,
+ CDR_SS_ACTION_DEACTIVATION = 3,
+ CDR_SS_ACTION_INTERROGATION = 4,
+ CDR_SS_ACTION_INVOCATION = 5,
+ CDR_SS_ACTION_PASSWORD_REGISTRATION = 6
+} T_CDR_SS_ACTION;
+
+class CCdrSSA : public CCdrBase
+{
+private:
+ bool isInit ;
+ bool basic_service_set ;
+ unsigned char basic_service_selector ;
+ unsigned char basic_service_code ;
+ CCdrFieldE164 redirected_dn ;
+ CCdrFieldE164 translated_redirected_dn ;
+ CCdrFieldE164 transfer_dn ;
+ CCdrFieldE164 translated_transfer_dn ;
+ bool correlated_event_ref_number_set;
+ T_CDR_EVENT_REFERENCE_NUMBER correlated_event_ref_number ;
+
+public:
+ CCdrSSA ();
+ virtual ~CCdrSSA ();
+
+ virtual void initialize ();
+
+ void setTeleServiceCode (unsigned char code);
+ void setBearerServiceCode (unsigned char code);
+ void setCorrelatedEventRefNumber (T_CDR_EVENT_REFERENCE_NUMBER event_number);
+ void setRedirectedNumber (T_SUBSC_IE_ISDN * p_DN);
+ void setTranslatedRedirectedNumber(T_SUBSC_IE_ISDN * p_DN);
+ void setTransferNumber (T_SUBSC_IE_ISDN * p_DN);
+ void setTranslatedTransferNumber (T_SUBSC_IE_ISDN * p_DN);
+ void generateRecord (T_CDR_SS_ACTION ss_action,
+ unsigned char ss_code ,
+ T_CNI_RIL3_CAUSE_VALUE ss_cause);
+};
+
+
+// Sample usage of SSA record
+//
+// #include "CdrSSA.h"
+// ....
+// {
+// CCdrSSA ssa_record;
+// .....
+// ssa_record.setServedIMSI( <pointer-to-IMSI> );
+// ssa_record.setServedMSISDN( <pointer-to-MSISDN> );
+// ssa_record.setTeleServiceCode( <code> );
+// ssa_record.setCorrelatedEventRefNumber( <event-ref-number> );
+// ssa_record.setRedirectedNumber( <pointer-to-E164> );
+// ssa_record.setTranslatedRedirectedNumber( <pointer-to-E164> );
+// ssa_record.generateRecord();
+// // at this point, the record is generated, and the ssa_record can be safely discard!
+//
+// }
+
+
+#endif
diff --git a/data/mnet/Common/include/dbgfunc.h b/data/mnet/Common/include/dbgfunc.h
new file mode 100644
index 0000000..66521a5
--- /dev/null
+++ b/data/mnet/Common/include/dbgfunc.h
@@ -0,0 +1,40 @@
+#ifndef __DBGFUNC_H__
+#define __DBGFUNC_H__
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// File : dbgfunc.h
+// Author(s) : Igal Gutkin
+// Create Date : 8/22/01
+// Description :
+//
+// *******************************************************************
+
+#include "defs.h"
+
+extern "C"
+{
+ // print hex dump to the buffer
+ void FormatHexDump (unsigned char *pSrc, int length, char *pDest);
+ void PlainHexDump (unsigned char *pSrc, int length, char *pDest);
+
+ // stdio direct debug output
+ void dbg_print (char *format, ...);
+ void HexDump (unsigned char *pSrc, int length);
+
+ // Set debug checkpoint
+ void DbgCheckPoint (char * pFile = NULL, int line = 0);
+}
+
+#define SET_CHECKPOINT DbgCheckPoint(__FILE__,__LINE__)
+
+
+
+#endif //__DBGFUNC_H__ \ No newline at end of file
diff --git a/data/mnet/Common/include/defs.h b/data/mnet/Common/include/defs.h
new file mode 100644
index 0000000..ecf451c
--- /dev/null
+++ b/data/mnet/Common/include/defs.h
@@ -0,0 +1,127 @@
+#ifndef __DEFS_H__
+#define __DEFS_H__
+
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : defs.h
+// Author(s) : Igal Gutkin
+// Create Date : 6/21/00
+// Description : Common defs.h to be used by APM, CDR and possibly
+// other modules or applications.
+//
+// *******************************************************************
+
+/*******************************************************************
+ typedef
+********************************************************************/
+
+// Elementary type definitions
+typedef unsigned char ubyte ;
+typedef unsigned short ubyte2;
+typedef unsigned long ubyte4;
+typedef char sbyte ;
+typedef short sbyte2;
+typedef long sbyte4;
+
+
+#ifndef min
+ #define min(a,b) (((a) < (b)) ? (a) : (b))
+#endif
+
+#ifndef MAX_PATH
+ #define MAX_PATH 260
+#endif
+
+#define SOC_STATUS_OK 0
+
+#define SOC_STATUS int
+#define RET_SOC_STATUS int
+#define ALARM_STATUS int
+
+#if defined(_WINDOWS_) || defined(WIN32)
+ #define DIR_DELIMITER '\\'
+ #define ERROR_NUM (WSAGetLastError())
+ #define SOC_STATUS_ERROR SOCKET_ERROR
+ #define OS_SPECIFIC_SOCKET_HANDLE SOCKET
+
+#else
+ #define DIR_DELIMITER '/'
+ #define ERROR_NUM errno
+ #define SOC_STATUS_ERROR (-1)
+ typedef ubyte4 OS_SPECIFIC_SOCKET_HANDLE;
+ typedef ubyte4 OS_SPECIFIC_DGRAM_HANDLE;
+
+#endif // WINDOWS
+
+
+// Windows definitions
+#if !defined (_WINDOWS_) && !defined (WIN32)
+ #define INVALID_SOCKET (OS_SPECIFIC_SOCKET_HANDLE)(~0)
+
+ // manifest constants for shutdown()
+ #define SD_RECEIVE 0x00
+ #define SD_SEND 0x01
+ #define SD_BOTH 0x02
+
+ // Windows redirected socket error codes
+ #define WSAEMSGSIZE EMSGSIZE
+ #define WSAENOBUFS ENOBUFS
+ #define WSAEMSGSIZE EMSGSIZE
+ #define WINAPI
+ #define FAR
+
+ // Windows data types
+ typedef char *LPSTR , *PSTR;
+ typedef char *DWORD ;
+ typedef const char *LPCSTR;
+
+#endif
+
+
+#if defined (_WINDOWS_) || defined (WIN32)
+ #define SysCloseSocket(x) closesocket(x)
+#else
+ #define SysCloseSocket(x) close(x)
+#endif
+
+
+// Internet address conversion
+#define BYTE_1(a) (((a)>>24)&0xFF)
+#define BYTE_2(a) (((a)>>16)&0xFF)
+#define BYTE_3(a) (((a)>>8)&0xFF)
+#define BYTE_4(a) ((a)&0xFF)
+
+#if defined CPU_FAMILY && (CPU_FAMILY==PPC)
+ // PowerPC on VxWorks
+ #define IP_BYTES(ip) BYTE_1(ip),BYTE_2(ip),BYTE_3(ip),BYTE_4(ip)
+#else
+ // Wintel platform
+ #define IP_BYTES(ip) BYTE_4(ip),BYTE_3(ip),BYTE_2(ip),BYTE_1(ip)
+#endif
+
+
+// Socket error codes
+#define SOCKET_STATUS_OK SOC_STATUS_OK
+#define SOCKET_STATUS_MSG_TOO_LONG 1
+#define SOCKET_STATUS_TEMP_SOC_ERR 2
+#define SOCKET_STATUS_FATAL_SOC_ERR SOC_STATUS_ERROR
+
+// Default root directory
+#if defined (MNET_GP10)
+ #define DEF_ROOT_DIR "/ata/vipercall";
+#elif defined (MNET_GMC)
+ #define DEF_ROOT_DIR "/sd0/gmc";
+#else
+ #define DEF_ROOT_DIR ".";
+#endif
+
+#endif /* __DEFS_H__ */ \ No newline at end of file
diff --git a/data/mnet/Common/include/gglink/gglink_api.h b/data/mnet/Common/include/gglink/gglink_api.h
new file mode 100644
index 0000000..c7f8074
--- /dev/null
+++ b/data/mnet/Common/include/gglink/gglink_api.h
@@ -0,0 +1,336 @@
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : gglink_api.h *
+ * *
+ * Description : API data structures for the SGSN-GMC layer module *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |12/14/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+#ifndef _GGLINK_API_HDR_INC_
+#define _GGLINK_API_HDR_INC_
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "subsc/SubscInfoType.h"
+#include "subsc/SubscGPRSInfoType.h"
+
+/*
+ * RIL3 (4.08) includes
+ */
+#include "ril3/ie_tlli.h"
+#include "ril3/ie_mobile_id.h"
+#include "ril3/ie_location_area_id.h"
+#include "ril3/ie_qos_profile.h"
+#include "ril3/ril3_gmm_msg.h"
+#include "ril3/ie_reject_cause.h"
+#include "ril3/ie_cell_id.h"
+
+#define GGLINK_API_MAGIC_VALUE 1111
+
+#define MAX_GSN_ADDR_LENGTH 16
+
+/*
+ * GGLINK API message type
+ */
+typedef enum {
+
+ GGLINK_API_MSG_GS_SRQ, /* GS -> GMC */
+ GGLINK_API_MSG_GS_SRS, /* GMC -> GS */
+ GGLINK_API_MSG_GS_RRQ, /* GS -> GMC */
+ GGLINK_API_MSG_GS_RCF, /* GMC -> GS */
+ GGLINK_API_MSG_GS_RRJ, /* GMC -> GS */
+ GGLINK_API_MSG_GS_PRQ, /* GS -> GMC */
+ GGLINK_API_MSG_GS_PRS, /* GMC -> GS */
+ GGLINK_API_MSG_GS_URQ, /* GMC -> GS */
+ GGLINK_API_MSG_SRI_REQ, /* GS -> GMC , send routing info*/
+ GGLINK_API_MSG_SRI_ACK, /* GMC -> GS , send routing info*/
+ GGLINK_API_MSG_FR, /* GS -> GMC , failure report */
+ GGLINK_API_MSG_FR_ACK, /* GMC -> GS , failure report Ack*/
+ GGLINK_API_MSG_GPRS_PRE, /* GMC -> GS , Note MS GPRS Present */
+ GGLINK_API_MSG_GPRS_PRE_ACK, /* GS -> GMC , Note MS GPRS Present Ack*/
+ GGLINK_API_MSG_SSRI_REQ, /* GS -> GMC , Send SGSN Routing Info Request */
+ GGLINK_API_MSG_SSRI_RSP, /* GMC -> GS , Send SGSN Routing Info Response */
+ GGLINK_API_MSG_ECHO_REQ, /* GS -> GMC */
+ GGLINK_API_MSG_ECHO_RSP, /* GMC -> GS */
+ GGLINK_API_MAX_MSGS
+
+} GGLINK_API_MSG_TYPE;
+
+
+#define GGLINK_CAUSE_REQ_ACCEPTED 0
+#define GGLINK_CAUSE_NO_RESOURCES_AVAIL 1
+#define GGLINK_CAUSE_SERVICE_NOT_SUPPORTED 2
+#define GGLINK_CAUSE_SYSTEM_FAILURE 3
+#define GGLINK_CAUSE_UNKNOWN_ROUTING_AREA 4
+
+
+/*
+ *
+ */
+typedef struct {
+ bool ie_present;
+ unsigned char cause_code;
+} GGLINK_IE_CAUSE;
+
+/*
+ *
+ */
+typedef struct {
+ bool ie_present;
+ unsigned char map_error_code;
+} GGLINK_IE_MAP_CAUSE;
+
+
+/*
+ *
+ */
+typedef struct {
+ bool ie_present;
+ short gsn_addr_length; // will we have an IE for GTP interface?
+ unsigned char addr_octets[MAX_GSN_ADDR_LENGTH];
+} GGLINK_IE_GSN_ADDRESS;
+
+
+/*
+ * GGLINK_GS_SRQ_MSG
+ */
+
+typedef struct {
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+} GGLINK_GS_SRQ_MSG;
+
+/*
+ * GGLINK_GS_SRS_MSG
+ */
+
+typedef struct {
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+ T_SEC_IE_AUTH_LIST triplet_list;
+} GGLINK_GS_SRS_MSG;
+
+/*
+ * GGLINK_GS_RRQ_MSG
+ */
+
+typedef struct {
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+ T_CNI_RIL3_IE_ROUTING_AREA_ID rai;
+ // SGSN number
+ // SGSN address
+} GGLINK_GS_RRQ_MSG;
+
+/*
+ * GGLINK_GS_RCF_MSG
+ */
+
+typedef struct {
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+} GGLINK_GS_RCF_MSG;
+
+/*
+ * GGLINK_GS_RRJ_MSG
+ */
+
+typedef struct {
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+ T_CNI_RIL3_REJECT_CAUSE_VALUE cause;
+} GGLINK_GS_RRJ_MSG;
+
+/*
+ * GGLINK_GS_PRQ_MSG
+ */
+
+typedef struct {
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+
+} GGLINK_GS_PRQ_MSG;
+
+/*
+ * GGLINK_GS_PRS_MSG
+ */
+
+typedef struct {
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+ short data_size;
+ char data[1024];
+} GGLINK_GS_PRS_MSG;
+
+/*
+ * GGLINK_GS_URQ_MSG
+ */
+
+typedef struct {
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+
+} GGLINK_GS_URQ_MSG;
+
+/*
+ * GGLINK_SRI_REQ_MSG
+ */
+
+typedef struct {
+ // send routing info
+ short gsn_seqno;
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+ GGLINK_IE_GSN_ADDRESS ggsn_addr;
+} GGLINK_SRI_REQ_MSG;
+
+/*
+ * GGLINK_SRI_ACK_MSG
+ */
+
+typedef struct {
+ // send routing info ack
+ short gsn_seqno;
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+ GGLINK_IE_CAUSE cause;
+ GGLINK_IE_MAP_CAUSE map_cause;
+ GGLINK_IE_GSN_ADDRESS sgsn_addr;
+ GGLINK_IE_GSN_ADDRESS ggsn_addr;
+} GGLINK_SRI_ACK_MSG;
+
+/*
+ * GGLINK_FR_MSG
+ */
+
+typedef struct {
+ // failure report
+ short gsn_seqno;
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+} GGLINK_FR_MSG;
+
+/*
+ * GGLINK_FR_ACK_MSG
+ */
+
+typedef struct {
+ // failure report ack
+ short gsn_seqno;
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+ GGLINK_IE_CAUSE cause;
+ GGLINK_IE_MAP_CAUSE map_cause;
+} GGLINK_FR_ACK_MSG;
+
+/*
+ * GGLINK_MS_GPRS_PRE_MSG
+ */
+
+typedef struct {
+ // Note MS GPRS PRESENT
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+ GGLINK_IE_GSN_ADDRESS gsn_addr;
+} GGLINK_MS_GPRS_PRE_MSG;
+
+/*
+ * GGLINK_MS_GPRS_PRE_ACK_MSG
+ */
+
+typedef struct {
+ // Note MS GPRS PRESENT ack
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+ GGLINK_IE_GSN_ADDRESS gsn_addr;
+ GGLINK_IE_CAUSE cause;
+} GGLINK_MS_GPRS_PRE_ACK_MSG;
+
+
+/*
+ * Send SGSN Routing Info Request
+ */
+
+typedef struct {
+ // send sgsn routing info
+ short gsn_seqno;
+ T_CNI_RIL3_IE_ROUTING_AREA_ID rai;
+} GGLINK_SSRI_REQ_MSG;
+
+
+/*
+ * Send SGSN Routing Info Response
+ */
+
+typedef struct {
+ // send sgsn routing info response
+ short gsn_seqno;
+ GGLINK_IE_CAUSE cause;
+ T_CNI_RIL3_IE_ROUTING_AREA_ID rai;
+ GGLINK_IE_GSN_ADDRESS sgsn_addr;
+} GGLINK_SSRI_RSP_MSG;
+
+/*
+ * The main API msg; which is overloaded with
+ * all the individual msgs
+ */
+typedef struct {
+
+ GGLINK_API_MSG_TYPE msg_type;
+ int magic;
+ union {
+ GGLINK_GS_SRQ_MSG security_req;
+ GGLINK_GS_SRS_MSG security_rsp;
+ GGLINK_GS_RRQ_MSG ra_update_req;
+ GGLINK_GS_RCF_MSG ra_update_cnf;
+ GGLINK_GS_RRJ_MSG ra_update_rej;
+ GGLINK_GS_PRQ_MSG profile_req;
+ GGLINK_GS_PRS_MSG profile_rsp;
+ GGLINK_GS_URQ_MSG unregister_req;
+
+ // for location management
+ GGLINK_SRI_REQ_MSG send_routing_info_req;
+ GGLINK_SRI_ACK_MSG send_routing_info_ack;
+ GGLINK_FR_MSG fr_req;
+ GGLINK_FR_ACK_MSG fr_ack;
+ GGLINK_MS_GPRS_PRE_MSG ms_gprs_pre_req;
+ GGLINK_MS_GPRS_PRE_ACK_MSG ms_gprs_pre_ack;
+
+ // for SGSN-SGSN routing Area information
+ GGLINK_SSRI_REQ_MSG ssri_req;
+ GGLINK_SSRI_RSP_MSG ssri_rsp;
+ } msg;
+
+} GGLINK_API_MSG;
+
+
+
+BOOL DecodeGGLinkMessage(
+ int &maxlength, // max length of input buffer
+ unsigned char * &ptr, // starting address of input buffer
+ GGLINK_API_MSG &msg // output msg data structure
+ );
+BOOL EncodeGGLinkMessage(
+ int &maxlength, // max length of output buffer
+ unsigned char * &ptr, // starting address of output buffer
+ GGLINK_API_MSG &msg // input msg data structure
+ );
+/*
+ * API function prototypes
+ */
+
+/*
+ * This function below will be called by :-
+ * On GMC : MAP interface layers
+ * On GS : GMM2
+ */
+BOOL gglink_api_send_msg(GGLINK_API_MSG &msg);
+
+/*
+ * Callback function provided by :
+ * MAP IF on GMC
+ * GMM2 on GS
+ */
+BOOL gglink_msg_callback(GGLINK_API_MSG msg);
+BOOL gglink_gsn_msg_callback(GGLINK_API_MSG &msg);
+
+
+
+#endif /* #ifndef _GGLINK_API_HDR_INC_ */
diff --git a/data/mnet/Common/include/gplink/gplink_prot.h b/data/mnet/Common/include/gplink/gplink_prot.h
new file mode 100644
index 0000000..a313262
--- /dev/null
+++ b/data/mnet/Common/include/gplink/gplink_prot.h
@@ -0,0 +1,62 @@
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : gplink_prot.h *
+ * *
+ * Description : Definitions for the GPLink Protocol *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |01/25/01 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+#ifndef GPLINK_PROT_HDR_INCLUDE
+#define GPLINK_PROT_HDR_INCLUDE
+
+
+#define GPLINK_TCP_PORT 52172
+
+
+typedef enum {
+
+ GPLINK_MSG_TYPE_REG_REQ = 1,
+ GPLINK_MSG_TYPE_REG_CNF = 2,
+ GPLINK_MSG_TYPE_REG_REJ = 3,
+ GPLINK_MSG_TYPE_REG_UPDATE_REQ = 4,
+ GPLINK_MSG_MAX_TYPES = 5
+
+} GPLINK_PROTOCOL_MSG_TYPE;
+
+typedef enum {
+
+ GPLINK_IE_CELL_ID = 1,
+ GPLINK_IE_LOCATION_AREA_ID = 2,
+ GPLINK_IE_ROUTING_AREA_ID = 3,
+ GPLINK_IE_CAUSE = 4,
+ GPLINK_MAX_IE_TYPES = 5
+
+} GPLINK_IE_TYPE;
+
+
+typedef enum {
+
+ GPLINK_EVENT_CELL_CONNECTED = 0,
+ GPLINK_EVENT_CELL_DISCONNECTED = 1,
+ GPLINK_EVENT_CELL_INFO_UPDATE = 2,
+ GPLINK_MAX_EVENTS = 3
+
+} GPLINK_EVENT;
+
+
+typedef enum {
+ GPLINK_GS_CAPACITY_EXCEEDED = 0
+} GPLINK_REJECT_CAUSE;
+
+
+#endif /* #ifndef GPLINK_PROT_HDR_INCLUDE */ \ No newline at end of file
diff --git a/data/mnet/Common/include/gprsdefs.h b/data/mnet/Common/include/gprsdefs.h
new file mode 100644
index 0000000..13c44c2
--- /dev/null
+++ b/data/mnet/Common/include/gprsdefs.h
@@ -0,0 +1,34 @@
+#ifndef __GPRSDEFS_H__
+#define __GPRSDEFS_H__
+/*********************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : gprsefs.h
+// Author(s) : Igal Gutkin
+// Create Date : 10/31/00
+// Description : Shared definitions for GPRS modules
+//
+// Notes : IMPORTANT - DO NOT use C++ style comments "//" in this file
+//
+// *******************************************************************/
+
+
+#define MAX_L3_PDU_LENGTH (1520) /* max byte size in a L3 GPRS PDU */
+#define MAX_LLC_OVERHEAD_LENGTH (36) /* max byte size for LLC frame overhead */
+
+/* max bytes in a DL GPRS PDU */
+#define MAX_DL_PDU_LENGTH (MAX_L3_PDU_LENGTH+MAX_LLC_OVERHEAD_LENGTH)
+
+#define TLLI_UNASSIGN_VALUE (0xFFFFFFFF)
+
+typedef UINT32 TLLI_t;
+
+#endif /* __GPRSDEFS_H__ */ \ No newline at end of file
diff --git a/data/mnet/Common/include/oam_api.h b/data/mnet/Common/include/oam_api.h
new file mode 100644
index 0000000..766cf9c
--- /dev/null
+++ b/data/mnet/Common/include/oam_api.h
@@ -0,0 +1,323 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : oam_api.h */
+/* Author(s) : Bhawani Sapkota */
+/* Create Date : 07/11/99 */
+/* Description : This file contains Oam Api prototypes */
+/* */
+/*********************************************************************/
+/* REVISION HISTORY */
+/*___________________________________________________________________*/
+/*----------+--------+-----------------------------------------------*/
+/* Name | Date | Reason */
+/*----------+--------+-----------------------------------------------*/
+/* Bhawani |09/28/00| Initial Draft */
+/* Bhawani |11/20/00| resturctured to share among GP, GMS and GS */
+/*----------+--------+-----------------------------------------------*/
+/*********************************************************************/
+
+#ifndef OAM_API_H
+#define OAM_API_H
+
+/******************************************************************
+ ** Include Files.
+ ******************************************************************/
+
+#include <msgqLib.h>
+#include "MnetModuleId.h"
+#include "MibTags.h"
+#include "oam_trap.h"
+#include "asn1conf.h"
+
+
+#ifndef True
+#define True 1
+#endif
+
+#ifndef False
+#define False 0
+#endif
+
+
+/******************************************************************
+ ** Trap Message Format
+ ******************************************************************/
+
+typedef enum MsgType {
+ MT_TRAP = 0, /* Currently only TRAP is used */
+ MT_REQUEST,
+ MT_REPLY,
+ MT_ACK,
+ MT_NOTIFICATION
+}MsgType;
+
+
+typedef enum ValueType{
+ VT_VALUE = 0, /* an ordinary integer value */
+ VT_ADDRESS, /* an address, in case of structure, byte array and table */
+ VT_TABLE /* an individual item of a table */
+}ValueType;
+
+
+
+/* This structure holds the value and index number of
+ * a table field.
+ */
+
+typedef struct TblField_t
+{
+ OCTET_T idx;
+ INT_32_T value;
+}TableField;
+
+
+/* The following structure used to send trap from agent to an
+ * application. If the MIB tag being trapped is a non-scalar, the
+ * application should use get API to retrieve the structure
+ * or array. See below
+ */
+
+typedef struct ipc_msg_t
+{
+ OCTET_T srcModuleId; /* source module ID (SNMP_AGENT_ID) */
+ OCTET_T msgType; /* message type (MT_TRAP) */
+ MibTag mibTag; /* mib tag */
+ OCTET_T valType; /* value or address */
+ union {
+ INT_32_T varVal; /* actual value */
+ void * varAdr; /* address of the table or array */
+ TableField varTbl; /* table field */
+ }val;
+}TrapMsg;
+
+
+/******************************************************************
+ ** API used to revirve MIB variables
+ ******************************************************************/
+/* The actual value MODULE_OAM is defined in jcc/include/sys_const.h
+ * file and its current value is 7
+ */
+#define STATUS_OK 0x00
+#define STATUS_INVALID_TAG -1
+#define STATUS_INVALID_PARAMS -2
+#define STATUS_NO_MEMORY -3
+#define STATUS_NOT_FOUND -4
+#define STATUS_MSGQ_SEND_ERROR -5
+#define STATUS_NOK -6
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************
+ ** API used to retrive MIB variable address
+ ******************************************************************/
+
+/*
+ * gets address of a single MIB tag. Index is optional
+ * parameter if the tag is table entry of filed.
+ */
+
+void *oam_getMibAddress(MibTag tag, ...);
+
+/* get address of scalar mib variable */
+STATUS oam_getMibVarAdr(MibTag varTag, void ** mibVarAdr);
+
+/******************************************************************
+ ** API used to retrive MIB variable address
+ ******************************************************************/
+
+/* gets value of a single MIB tag. The variable is a simple 4-byte integer */
+STATUS oam_getMibIntVar(MibTag varTag, INT_32_T *varPtr);
+
+/* get value of MIB variable array. Number of elements to be
+ * retrieved depends on the aryCount. It is also assumed that
+ * the application has allocated enough memory to hold aryCount
+ * elements at aryPtr.
+ */
+
+
+STATUS oam_getMibByteAry(MibTag aryTag, OCTET_T *byteAryPtr, INT_32_T byteCount);
+
+/* get the entire structure.
+ */
+STATUS oam_getMibStruct(MibTag structTag, OCTET_T * structPtr, int structSize);
+
+/* get value of a MIB table. Application allocates enough space to hold entryCount
+ * elements at tblPtr.
+ */
+
+/******************************************************************
+ ** API used to manupulate MIB tables
+ ******************************************************************/
+
+/* returns size,in bytes, of the table entry.
+ * returns -1 if the tag is invalid
+ */
+int oam_getMibTblEntSz(MibTag tblTag);
+
+/* returns number of current entries in the table.
+ * returns -1 if the tag is invalid
+ */
+int oam_getMibTblEntCount(MibTag tblTag);
+
+/* retrieves entire table into the memory supplied */
+STATUS oam_getMibTbl(MibTag tblTag, void *tblBuf, int bufSize);
+
+/* retrieves an entry of the table into the memory supplied */
+
+STATUS oam_getMibTblEntry(MibTag tblTag, int idx, void *buffer, int bufSize);
+
+/* get the address of an entry */
+void *oam_getMibTblEntAdr(MibTag tblTag, int idx, int *entrySize);
+
+/* get the address of an number and IP address type entry */
+STATUS oam_getMibTblNumberField(MibTag colTag, int idx, INT_32_T *value);
+
+
+/* get the address of an string type entry */
+STATUS oam_getMibTblStringField(MibTag tblStrTag, int idx, OCTET_T *buffer, INT_32_T size);
+
+#ifdef MNET_GP10
+
+/* convert int to three digit mnc */
+STATUS oam_getMncFromInt(int nMnc, UINT8 *pszMnc);
+
+/* returns 3 bytes of MNC as an arrary */
+STATUS oam_getMnc(UINT8 *pszMnc);
+
+#endif /* MNET_GP10 */
+
+
+#ifdef MNET_GMC
+
+/* add new msrn value into next available slot in msrn table */
+STATUS msrn_addTblEntry(char *msrnValue);
+
+/* delete msrn entry from msrn table and mark slot as empty */
+STATUS msrn_delTblEntry(char *msrnValue);
+
+/* return next msrn value in table; NULL if end of table is reached */
+char *msrn_getNextEntry(int *counter);
+
+/* get MNC and fill into the specified byte array { array size must be 3 bytes } */
+STATUS oam_getMnc(UINT8 *pszMnc);
+
+/* get MCC and fill into the specified byte array { array size must be 3 bytes } */
+STATUS oam_getMcc(UINT8 *pszMcc);
+
+/* get MNC and fill into the specified byte array { array size must be 3 bytes } */
+STATUS oam_getAdjacentLocationAreaMNC(UINT8 *pszMnc, int idx);
+
+/* get MCC and fill into the specified byte array { array size must be 3 bytes } */
+STATUS oam_getAdjacentLocationAreaMCC(UINT8 *pszMcc, int idx);
+
+
+#endif /* MNET_GMC */
+
+
+#ifdef MNET_GS
+
+/*
+This API expects pszAPN parameter in ASCII null terminated
+string format (Ex: "gprs.cisco.com"). Stores IP Address
+in pIpAddr if operation is successful. Return value
+indicates the status of the operation.
+
+This API first looks-up in the local table. If the lookup fails
+and the DNS server is configured then performs DNS lookup.
+
+Note that a call to this routine may be blocked
+for long time (up to 10 seconds or more if the DNS server
+is not responding). Caller should be prepared for such
+long delays.
+*/
+STATUS oam_getGgsnIpAddress(char *pszAPN, UINT32 *pIpAddr);
+
+/*
+Returns name of the default APN. Willl return NULL if
+no default APN name is configured by the user. Return value
+is null terminated. Format for the return value is ASCII
+(Ex: "gprs.cisco.com")
+*/
+char * oam_getDefaultAPN();
+
+#endif /* MNET_GS */
+/******************************************************************
+ ** API used to set MIB variables.
+ ******************************************************************/
+
+
+/* The same set of API are used to set MIB variables by both agent
+ * and application modules. Source Module ID is passed so that the
+ * implementation knows the direction of message flow.
+ */
+
+/* sets a single mib variable. The variable is a */
+STATUS oam_setMibIntVar(OCTET_T srcModuleId, MibTag varTag, INT_32_T varVal);
+
+/* sets aryCount elements of an array specified by aryTag */
+STATUS oam_setMibByteAry(OCTET_T srcModuleId, MibTag aryTag, OCTET_T *ByteAryPtr, INT_32_T byteCount);
+
+/* sets an entry of a Table, an entry is actually is row of MIB table */
+STATUS oam_setMibTblEntry(OCTET_T srcModuleId, MibTag tblTag, int idx, void *tblEntBuf, int bufSize);
+
+/* sets a field of the given entry table */
+STATUS oam_setTblEntryField(OCTET_T srcModuleId, MibTag tblTag, int entNo, INT_32_T varVal);
+
+
+/******************************************************************
+ ** API used to subscribe and unsubscribe trap
+ ******************************************************************/
+
+/*
+ * Applications interested in receiving notification
+ * when the value of certain managed MIB object get changed can do so
+ * by calling following APIs.
+ */
+
+
+/* setting trap on a single MIB variable */
+STATUS oam_setTrap (OCTET_T srcModuleId, MSG_Q_ID msgQid, MibTag mibTag);
+STATUS setTrap (OCTET_T srcModuleId, MSG_Q_ID msgQid, MibTag mibTag);
+
+
+/* setting trap on a multiple MIB variables */
+STATUS oam_setMultipleTrap (OCTET_T srcModuleId, MSG_Q_ID msgQid, MibTag mibTag[], INT_32_T tagCount);
+
+/* unsetting trap on a MIB variable */
+STATUS oam_unsetTrap(OCTET_T srcModuleId, MibTag mibTag);
+
+/* unsetting trap for all the variable for the module */
+STATUS oam_unsetTrapByModule(OCTET_T srcModuleId);
+
+/******************************************************************
+ ** Misc Library
+ ******************************************************************/
+
+STATUS oam_getByteAryByInt(INT_32_T intVal, char * byteAry, int size);
+STATUS oam_processTrap(OCTET_T srcMdlId, MibTag tag, OCTET_T valueType, INT_32_T newValue, int idx);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+/* to support older interfaces */
+#define getMibIntVar oam_getMibIntVar
+#define getMibStruct oam_getMibStruct
+#define getMibTbl oam_getMibTbl
+#define getByteAryByInt oam_getByteAryByInt
+
+
+#endif /* OAM_API_H */
diff --git a/data/mnet/Common/include/oam_trap.h b/data/mnet/Common/include/oam_trap.h
new file mode 100644
index 0000000..35e2b1e
--- /dev/null
+++ b/data/mnet/Common/include/oam_trap.h
@@ -0,0 +1,93 @@
+/*********************************************************
+*
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*
+**********************************************************/
+
+#if (!defined(OAM_TRAP_H))
+#define OAM_TRAP_H
+
+/******************************************************************
+ ** Include Files.
+ ******************************************************************/
+
+#include <stdio.h>
+#include <msgQLib.h>
+#include <semLib.h>
+#include <snmp/asn1conf.h>
+#include "mibtags.h"
+#include "oam_api.h"
+#include "vipermib.h"
+#include "vipertbl.h"
+
+typedef struct ListNode_t
+{
+ struct ListNode_t * next;
+ MibTag tag;
+ MSG_Q_ID qid; /* typedef msg_q * MSG_Q_ID */
+ OCTET_T mid; /* module id of the subscriber */
+}ListNode, *ListNodePtr;
+
+
+typedef struct ListHead_t
+{
+ ListNodePtr first; /* first element of the list */
+ ListNodePtr last; /* last valid element of the list */
+ int nodeCount; /* No of items */
+}ListHead, *ListHeadPtr;
+
+typedef struct MibInitIntTable_T
+{
+ MibTag tag;
+ INT_32_T value;
+}MibInitIntTable;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ListNodePtr oam_newListNode(MibTag tag, MSG_Q_ID id);
+STATUS oam_insertNode(ListHeadPtr head, ListNodePtr aNode);
+STATUS oam_insertNodeSortedByTag(ListHeadPtr head, ListNodePtr aNode);
+STATUS oam_appendNode(ListHeadPtr head, ListNodePtr aNode);
+ListNodePtr oam_getNodeByID(ListHeadPtr head, MSG_Q_ID id);
+ListNodePtr oam_getFirstNodeByTag(ListHeadPtr head, INT_32_T tag);
+STATUS oam_deleteNode(ListHeadPtr head, MibTag tag, OCTET_T mid);
+STATUS oam_deleteNodeByModule(ListHeadPtr head, OCTET_T mid);
+STATUS oam_deleteNodeByQ(ListHeadPtr head, MSG_Q_ID qid);
+void oam_printList(ListHeadPtr head);
+void oam_oamError( char * formatString, ...);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/* function in api_init.cpp */
+STATUS oam_initApi(int debugLevel);
+ListHeadPtr oam_getTrapTableHead();
+ListHeadPtr oam_newListHead();
+
+/* function in mib_init.cpp */
+STATUS oam_initializeMib();
+
+void oam_lockMutex();
+void oam_unlockMutex();
+
+/* debugging and printing */
+void oam_msgPrint(char *format, ...) ;
+
+#define LOG_ERROR(XX); \
+ printf("OAM API ERROR at %s:", fname); \
+ oam_msgPrint XX;
+
+#ifdef _DEBUG
+#define LOG_TRACE(XX); \
+ printf("OAM API Trace at %s:", fname); \
+ oam_msgPrint XX;
+#else
+#define LOG_TRACE(XX);
+#endif
+
+#endif
diff --git a/data/mnet/Common/include/socket/GenClientSocket.h b/data/mnet/Common/include/socket/GenClientSocket.h
new file mode 100644
index 0000000..44eaec8
--- /dev/null
+++ b/data/mnet/Common/include/socket/GenClientSocket.h
@@ -0,0 +1,79 @@
+#ifndef __GENCLIENTSOCKET_H__
+#define __GENCLIENTSOCKET_H__
+
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : GenClientSocket.h
+// Author(s) : Igal Gutkin
+// Create Date : 06/20/00
+// Description : interface for the GenClientSocket class.
+//
+// *******************************************************************
+
+#include "GenSocketSSL.h"
+
+
+class GenClientSocket : public GenSocketSSL
+{
+
+public:
+ GenClientSocket ();
+ GenClientSocket (int sndSize, int rcvSize);
+
+ // allow SSL settings
+ GenClientSocket (bool bEnableSSL, bool bEnableEncryption = true);
+ GenClientSocket (int sndSize , int rcvSize ,
+ bool bEnableSSL, bool bEnableEncryption = true);
+
+ virtual
+ ~GenClientSocket () {;}
+
+ virtual
+ int serve (const fd_set *set, GenSocket *& soc)
+ { return (GenSocket::serve(set, soc)) ; }
+
+ void setLinger (linger& val) { lingerVal_ = val ; setLinger_ = true; }
+ bool connectServer (ubyte4 ipAddr, ubyte2 tcpPort);
+ bool reconnect ();
+
+ virtual void printInfo ();
+
+ static bool initSslContext (LPSTR lpPswd = NULL);
+ static void cleanSslContext() { GenSocketSSL::cleanSslContext(pCtx_); }
+
+protected:
+
+ virtual bool create ();
+ virtual bool isContext ();
+ virtual SSL_CTX *getContext();
+
+ void reset ();
+
+private:
+
+// Data members
+protected:
+
+ static SSL_CTX * pCtx_; // SSL context (one per all clients on the host)
+
+ int rcvBuffLen_,
+ sndBuffLen_;
+ linger lingerVal_ ;
+ bool setLinger_ ;
+
+ ubyte4 srvAddr_ ;
+ ubyte2 srvPort_ ;
+
+};
+
+
+#endif //__GENCLIENTSOCKET_H__ \ No newline at end of file
diff --git a/data/mnet/Common/include/socket/GenSecServerSocket.h b/data/mnet/Common/include/socket/GenSecServerSocket.h
new file mode 100644
index 0000000..7225424
--- /dev/null
+++ b/data/mnet/Common/include/socket/GenSecServerSocket.h
@@ -0,0 +1,59 @@
+#ifndef __GENSECSERVERSOCKET_H__
+#define __GENSECSERVERSOCKET_H__
+
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : GenSecServerSocket.h
+// Author(s) : Igal Gutkin
+// Create Date : 06/20/00
+// Description : interface for the GenSecServerSocket (Secondary Server)
+// class
+//
+// *******************************************************************
+
+#include "socket\GenServerSocket.h"
+
+#ifndef SOC_RCV_BUFF_LEN
+ #define SOC_RCV_BUFF_LEN (0x2000)
+#endif
+
+#ifndef SOC_SND_BUFF_LEN
+ #define SOC_SND_BUFF_LEN (0x500)
+#endif
+
+class GenSecServerSocket : public GenServerSocket
+{
+public:
+// Constructors
+ GenSecServerSocket () : GenServerSocket () { ; }
+
+ GenSecServerSocket (OS_SPECIFIC_SOCKET_HANDLE socket);
+
+ // the following constructor contains a blocking SSL API call,
+ // when invoked with enableSSL = true
+ GenSecServerSocket (OS_SPECIFIC_SOCKET_HANDLE socket, bool enableSSL,
+ bool enableEncryption = true );
+// Destractor
+ virtual
+ ~GenSecServerSocket ();
+
+// Primary methods
+ virtual
+ int serve (const fd_set *, GenSocket *&) { return (false); }
+
+private:
+
+ void reset (OS_SPECIFIC_SOCKET_HANDLE socket);
+};
+
+
+#endif //__GENSECSERVERSOCKET_H__ \ No newline at end of file
diff --git a/data/mnet/Common/include/socket/GenServerSocket.h b/data/mnet/Common/include/socket/GenServerSocket.h
new file mode 100644
index 0000000..5f6ca74
--- /dev/null
+++ b/data/mnet/Common/include/socket/GenServerSocket.h
@@ -0,0 +1,74 @@
+#ifndef __GenServerSocket_H__
+#define __GenServerSocket_H__
+
+
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : GenServerSocket.h
+// Author(s) : Igal Gutkin
+// Create Date : 06/20/00
+// Description : GenServerSocket.h: interface for the GenServerSocket class.
+//
+// *******************************************************************
+
+#include "socket\GenSocketSSL.h"
+
+// Defaults
+#define kTCP_LISTEN_BACKLOG 10
+
+// Socket receive buffer size
+#define SOC_MRCV_BUFF_LEN (0x2000)
+// Socket send buffer size
+#define SOC_MSND_BUFF_LEN (0x500)
+
+
+class GenServerSocket : public GenSocketSSL
+{
+public:
+ GenServerSocket ()
+ : GenSocketSSL (), port_(0) { ; }
+
+ GenServerSocket (bool bEnableSSL, bool bEnableEncryption = true);
+
+ virtual
+ ~GenServerSocket ();
+
+ virtual
+ int serve (const fd_set *, GenSocket *&)
+ { return false; }
+ bool open (ubyte2 Port);
+
+ static bool initSslContext (LPSTR lpPswd = NULL);
+ static void cleanSslContext() { GenSocketSSL::cleanSslContext(pCtx_); }
+
+protected:
+ virtual bool isContext ();
+ virtual SSL_CTX *getContext();
+
+ bool acceptConnection (OS_SPECIFIC_SOCKET_HANDLE& accSoc);
+ bool bind2Address (ubyte2 Port);
+
+private:
+ void setPort (ubyte2 Port) { if (Port) port_ = Port;}
+
+// Data members
+protected:
+
+ static SSL_CTX * pCtx_ ; // SSL context (one per all servers on the host)
+
+ ubyte2 port_;
+
+};
+
+
+
+#endif //__GenServerSocket_H__ \ No newline at end of file
diff --git a/data/mnet/Common/include/socket/GenSocket.h b/data/mnet/Common/include/socket/GenSocket.h
new file mode 100644
index 0000000..b059894
--- /dev/null
+++ b/data/mnet/Common/include/socket/GenSocket.h
@@ -0,0 +1,131 @@
+#ifndef __GENSOCKET_H__
+#define __GENSOCKET_H__
+
+
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : GenSocket.h
+// Author(s) : Igal Gutkin
+// Create Date : 06/20/00
+// Description : interface for the GenSocket class.
+//
+// *******************************************************************
+
+// system includes
+#ifdef __VXWORKS__
+ #include <vxworks.h>
+ #include <stdio.h>
+ #include <ctype.h>
+
+ #include <string.h>
+ #include <time.h>
+
+ #include <sockLib.h>
+ #include <hostLib.h>
+ #include <ioLib.h>
+
+ #include "socdefs.h"
+
+#elif (defined(_WINDOWS) || defined(WIN32) )
+ #include <iostream.h>
+ #include <winsock2.h>
+ #include <wsnetbs.h>
+ #include <wsipx.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stdarg.h>
+
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <direct.h>
+
+ #include <limits.h>
+ #include <io.h>
+ #include <fcntl.h>
+
+ #include <time.h>
+
+#include "StdAfx.h"
+
+#endif // system includes
+
+#include "defs.h"
+#include "CdrDbg.h"
+
+
+typedef char IpAddrPool_t [20];
+
+typedef enum {
+ SOCKET_NOT_CONNECTED = 0,
+ SOCKET_CONNECTED = 1,
+ SOCKET_CONNECTED_READABLE = 2
+} SocketState_t;
+
+
+class GenSocket
+{
+public:
+ GenSocket();
+ virtual ~GenSocket();
+
+ static ubyte4 getLocalHostAddress ();
+ static const LPSTR getIp (ubyte4 ipAddr);
+
+ virtual bool isValid () {return (sock_ != INVALID_SOCKET && sock_);}
+
+ // print socket info
+ virtual int tcpReceive (sbyte *pBuf, int BufSize);
+ virtual int tcpSend (sbyte *pBuf, int BufSize);
+ virtual void releaseSocket (bool grace = false );
+ virtual void printInfo ();
+
+ // Socket-specific method will test and serve the socket upon need
+ virtual int serve (const fd_set *, GenSocket *&)
+ {return (false);}
+
+ OS_SPECIFIC_SOCKET_HANDLE
+ getSocket () {return (sock_);};
+ SocketState_t isConnected ();
+
+protected:
+
+ static ubyte4 getHostAddress (LPSTR);
+ virtual bool create ();
+ // close the socket and reset class variables
+ virtual void cleanup ();
+
+ bool setSocket (OS_SPECIFIC_SOCKET_HANDLE Socket);
+ ubyte4 getRemoteHostAddress ();
+
+private:
+ void resetSocket () {sock_ = INVALID_SOCKET;}
+
+
+// data members
+protected:
+ static bool bMoreInfo_;
+
+private:
+ OS_SPECIFIC_SOCKET_HANDLE sock_ ;
+
+ // temporary storage for translated IP address
+ // will be overwitten with every call using it
+ static IpAddrPool_t szIpAddr_;
+
+ // Used for select write_fd
+ static const struct timeval timeOut_;
+
+};
+
+
+
+#endif //__GENSOCKET_H__ \ No newline at end of file
diff --git a/data/mnet/Common/include/socket/GenSocketSSL.h b/data/mnet/Common/include/socket/GenSocketSSL.h
new file mode 100644
index 0000000..ecc7cde
--- /dev/null
+++ b/data/mnet/Common/include/socket/GenSocketSSL.h
@@ -0,0 +1,218 @@
+#ifndef __GENSOCKETSSL_H__
+#define __GENSOCKETSSL_H__
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// File : GenSocketSSL.h
+// Author(s) : Igal Gutkin
+// Create Date : 05/17/01
+// Description : interface for the GenSocketSSL class.
+//
+// *******************************************************************
+
+#include "socket\GenSocket.h"
+#include "socket\SslIntf.h"
+
+typedef enum
+{
+ ALLSUITES ,
+ DESCBC3SHA,
+ NOSSL
+
+} CipherSuite_t;
+
+// SSL error codes
+typedef enum
+{
+ SSL_NO_ERROR = 0,
+ SSL_GENERIC_ERROR = 1,
+ SSL_BAD_PASSWORD = 2,
+ SSL_BAD_KEY = 3,
+ SSL_BAD_CA_ERROR = 4,
+ SSL_BAD_USER_CERT = 5,
+ SSL_BAD_PEER_CERT = 6,
+
+ SSL_GEN_ERROR ,
+
+ SSL_ERROR_MAX
+
+} SslError_t;
+
+
+typedef enum
+{
+ CertNoError ,
+ CertMiscError ,
+ CertUnspecifiedError ,
+ CertNotYetValid ,
+ CertExpired ,
+ CertNotBeforeError ,
+ CertNotAfterError ,
+ CertCrlLastUpdateError ,
+ CertCrlNextUpdateError ,
+ CertPathLengthExceed ,
+ CertInvalidPurpose ,
+ CertUntrusted ,
+ CertInvalidCA ,
+ CertZeroSelfSigned , // selfsigned and not trusted
+ CertRevoked ,
+ CertOneNotSelfSigned , // the only certificate in the chain is not selfsigned
+ CertNoIssuer ,
+ CertUntrustedNoRoot , // no local root
+ CertUnableDecryptSignature,
+ CertUnableDecodeIssuerKey ,
+ CertInvalidSignature ,
+ CertNoIssuerCert // can not find issuer certificate locally
+
+} SslValidationCodes_t;
+
+extern "C"
+{
+ // Password read\write utilities
+ bool encryptPassword (const char *pwd, const char *filename);
+ bool decryptPassword (char *pwdout , const char *filename);
+
+ // Class info
+ void SocDataPrint ();
+
+}
+
+
+class GenSocketSSL : public GenSocket
+{
+// friends definition
+friend int verify_callback (int ok, X509_STORE_CTX *pStoreCtx);
+
+public:
+
+// Constructors & destructor
+ GenSocketSSL ()
+ : GenSocket () ,
+ bEnableSsl_ (false),
+ bEnableEncryption_(false),
+ pSsl_ (NULL ),
+ pSbio_ (NULL ) { ; }
+
+ GenSocketSSL (bool enableSSL, bool enableEncryption = true,
+ SSL_CTX *pCtx = NULL)
+ : GenSocket () ,
+ bEnableSsl_ (isSSL() ? enableSSL : false),
+ bEnableEncryption_(bEnableSsl_ ? enableEncryption : false),
+ pSsl_ (NULL ),
+ pSbio_ (NULL ) { ; }
+
+ virtual ~GenSocketSSL () { ; }
+
+ // Primary methods
+
+ static bool isSupportSSL () { return (isSSL ()!=0); }
+ bool isEnableSSL () { return (bEnableSsl_); }
+ bool isInitSSL () { return (isValid () && isContext() && pSsl_ && pSbio_); }
+
+ virtual int tcpReceive (sbyte *pBuf, int BufSize);
+
+ virtual int tcpSend (sbyte *pBuf, int BufSize);
+
+ virtual void releaseSocket (bool grace = false);
+ virtual void printInfo ();
+
+ static void classPrintInfo();
+
+ static SslError_t getError() { return (errorCode_); }
+
+ static void printVerifyError (long code);
+
+ // password manipulation methods
+ static bool setPassword (LPCSTR lpPswd);
+ static void resetPassword();
+ static LPCSTR getPassword () { return (szPswd_ ); }
+ static bool isPswdSet () { return (szPswd_[0] != 0); }
+
+ // configure SSL library
+ static void initSslLib ();
+ static void cleanSslLib () {/*SSL_library_cleanup()*/ ; }
+
+ static int getStats () { return (count_) ; }
+
+
+protected:
+
+ virtual bool isContext () = 0;
+ virtual SSL_CTX *getContext() = 0;
+
+ static void setError (SslError_t code) { errorCode_ = code ; }
+ static void resetError (SslError_t code) { errorCode_ = SSL_NO_ERROR; }
+
+ static bool verifyCert (long code);
+ static LPSTR getCertError (long code);
+
+ // init\clean SSL context
+ // using one shared context per application
+ static bool initSslContext (SSL_CTX *& pCtx, bool bServer, LPSTR password = NULL);
+ static void cleanSslContext (SSL_CTX *& pCtx);
+
+ // init\clean socket-specific SSL resources
+ bool initSsl ();
+ void cleanSsl ();
+
+ // handle SSL connection setup
+ bool acceptSsl ();
+ bool connectSsl ();
+
+ // send\receive data through SSL connection
+ int readSsl (sbyte *pBuf, int BufSize);
+ int writeSsl (sbyte *pBuf, int BufSize);
+
+ void printSession();
+ int getSocNum () { return (count_); }
+
+private:
+
+// data members
+protected:
+
+ SSL *pSsl_ ; // SSL connection
+ BIO *pSbio_ ; // SSL socket wrapper
+
+ static LPCSTR cipherSuite_[];
+
+private:
+
+ static bool bInitLib_ ;
+
+ static char szPswd_[SSL_MAX_PASSWORD_LENGTH+2]; // pointer to password string
+
+#ifdef __SSL_USE_TEMP_KEY__
+ static RSA * pRsa_ ; // temporary key (server only)
+#endif //__SSL_USE_TEMP_KEY__
+
+ // keeps the last application error code (application will not reset the code!)
+ static SslError_t errorCode_;
+
+ // when false SSL functionality is bypassed
+ // otherwise, authentication is enabled and
+ // ciphering is depend on enableEncryption_
+ const bool bEnableSsl_ ;
+
+ // when false, SSL encryption is disabled
+ // but using authentication on connect
+ const bool bEnableEncryption_ ;
+
+ static char szKeyFile_ [MAX_PATH]; // private key
+ static char szCertFile_[MAX_PATH]; // certificate
+ static char szCaFile_ [MAX_PATH]; // trusted CA List
+
+ // Count SSL sockets
+ static int count_;
+
+};
+
+
+#endif //__GENSOCKETSSL_H__ \ No newline at end of file
diff --git a/data/mnet/Common/include/socket/SslIntf.h b/data/mnet/Common/include/socket/SslIntf.h
new file mode 100644
index 0000000..d2dc9be
--- /dev/null
+++ b/data/mnet/Common/include/socket/SslIntf.h
@@ -0,0 +1,41 @@
+#ifndef __SSLINTF_H__
+#define __SSLINTF_H__
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// File : SslIntf.h
+// Author(s) : Igal Gutkin
+// Create Date : 05/17/01
+// Description : generic interface between SSL Socket library and SSL
+// implementations
+//
+// *******************************************************************
+
+#if defined (_OPEN_SSL_LIB_)
+ #include <openssl/rand.h>
+ #include <openssl/ssl.h>
+ #include <openssl/bio.h>
+ #include <openssl/err.h>
+
+#elif defined (_RSA_SSL_LIB_)
+ #include "rsa/ssl_rsa.h"
+
+#endif
+
+#define SSL_MIN_PASSWORD_LENGTH 4
+#define SSL_MAX_PASSWORD_LENGTH 32 // must be a multiple of LENGTH_OF_CBLOCK
+#define LENGTH_OF_CBLOCK 8
+
+// specifies whether SSL is supported by the library (false for the stub)
+
+extern "C" { int isSSL (); }
+
+
+#endif //__SSLINTF_H__ \ No newline at end of file
diff --git a/data/mnet/Common/include/subsc/SubscGPRSInfoType.h b/data/mnet/Common/include/subsc/SubscGPRSInfoType.h
new file mode 100644
index 0000000..52d9e75
--- /dev/null
+++ b/data/mnet/Common/include/subsc/SubscGPRSInfoType.h
@@ -0,0 +1,69 @@
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SubscGPRSInfoType.h
+// Author(s) : Kevin Lim
+// Create Date : 12-12-00
+// Description : message and ie interface among GUDB and other modules
+//
+// *******************************************************************
+
+#ifndef SUBSC_GPRS_INFO_TYPE_H
+#define SUBSC_GPRS_INFO_TYPE_H
+
+#include "ril3/ril3_sm_msg.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define MAX_NUM_SUBSC_GPRS_DATA 16 // was 50
+#define MAX_LEN_SUBSC_PDP_ADDR 16
+#define MAX_LEN_SUBSC_APN CNI_RIL3_MAX_ACCESS_POINT_NAME_LENGTH
+
+typedef struct {
+ CNI_RIL3_QOS_DELAY_CLASS delay_class;
+ CNI_RIL3_QOS_RELIABILITY_CLASS reliability_class;
+ CNI_RIL3_QOS_PRECEDENCE_CLASS precedence_class;
+ CNI_RIL3_QOS_PEAK_THROUGHPUT peak_throughput;
+ CNI_RIL3_QOS_MEAN_THROUGHPUT mean_throughput;
+} T_SUBSC_QOS_DATA;
+
+typedef struct {
+ unsigned char pdpContextId;
+ CNI_RIL3_PDP_ADDRESS_TYPE pdpType;
+ unsigned char pdpAddress[MAX_LEN_SUBSC_PDP_ADDR];
+ T_SUBSC_QOS_DATA qosSubscribed;
+ unsigned char vplmnAddressAllowed;
+ unsigned char apn_length;
+ unsigned char apn[MAX_LEN_SUBSC_APN];
+ // extension
+} T_SUBSC_GPRS_DATA;
+
+typedef struct {
+// T_SUBSC_INFO_IE_TYPE ie_type; // only in encoded message
+ short num_data;
+ T_SUBSC_GPRS_DATA data[MAX_NUM_SUBSC_GPRS_DATA];
+} T_SUBSC_IE_GPRS_DATA_INFO;
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // SUBSC_GPRS_INFO_TYPE_H
+
+
+
+
+
diff --git a/data/mnet/Common/include/subsc/SubscINProfileType.h b/data/mnet/Common/include/subsc/SubscINProfileType.h
new file mode 100644
index 0000000..4a26da1
--- /dev/null
+++ b/data/mnet/Common/include/subsc/SubscINProfileType.h
@@ -0,0 +1,47 @@
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SubscINProfileType.h
+// Author(s) : Ji-Hoon Yoon
+// Create Date : 09-25-01
+// Description : message and ie interface among GUDB and other modules
+//
+// *******************************************************************
+
+#ifndef SUBSC_IN_PROFILE_TYPE_H
+#define SUBSC_IN_PROFILE_TYPE_H
+
+#include "ril3/ril3_sm_msg.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct {
+ unsigned char classId;
+} T_SUBSC_IN_PROFILE_CLASS_INFO;
+
+typedef struct {
+ bool isPrepaid;
+} T_SUBSC_IN_PROFILE_PREPAID_INDICATOR;
+
+typedef struct {
+ bool isPresent;
+ T_SUBSC_IN_PROFILE_CLASS_INFO classInfo;
+ T_SUBSC_IN_PROFILE_PREPAID_INDICATOR prepaidIndicator;
+} T_SUBSC_IE_IN_PROFILE; // 2.1.2
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // SUBSC_IN_PROFILE_TYPE_H \ No newline at end of file
diff --git a/data/mnet/Common/include/subsc/SubscInfoType.h b/data/mnet/Common/include/subsc/SubscInfoType.h
new file mode 100644
index 0000000..5f6c651
--- /dev/null
+++ b/data/mnet/Common/include/subsc/SubscInfoType.h
@@ -0,0 +1,619 @@
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SubscInfoType.h
+// Author(s) : Kevin Lim
+// Create Date : 06-16-99
+// Description : message and ie interface among LUDB and other modules
+//
+// *******************************************************************
+
+#ifndef SUBSC_INFO_TYPE_H
+#define SUBSC_INFO_TYPE_H
+
+#include "SubscGPRSInfoType.h"
+#include "SubscINProfileType.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// version history
+// 2.0.3 combine IMSI fields as one
+// 2.0.4 added num_plan in ISDN
+// 2.0.5 added SS_DATA type in SS_INFO
+// 2.0.6 added SS_INFO_INDEX
+// 2.0.7 breaking SS_INFO_TYPE into three structure instead of union
+// 2.0.8 added SUPP_SERV_BIC_ROAM
+// 2.1.0 added GPRS data with encoder/decoder change - G.2.
+// 2.1.1 added CLIR feature support
+// 2.1.2 added IN profile support
+
+#define SUBSC_ENC_VER0 2
+#define SUBSC_ENC_VER1 1
+#define SUBSC_ENC_VER2 2
+
+typedef struct {
+ short v0;
+ short v1;
+ short v2;
+} T_SUBSC_VERSION;
+
+typedef enum {
+ SUBSC_INFO_IE_VERSION_NUMBER = 0x00,
+ SUBSC_INFO_IE_MOBILE_ID_IMSI = 0x01,
+ SUBSC_INFO_IE_ISDN = 0x02,
+ SUBSC_INFO_IE_SUBADDR = 0x03,
+ SUBSC_INFO_IE_PROVISION_BS = 0x05,
+ SUBSC_INFO_IE_PROVISION_TS = 0x06,
+ SUBSC_INFO_IE_PROVISION_SS = 0x07,
+ SUBSC_INFO_IE_SUBSC_STATUS = 0x08,
+ SUBSC_INFO_IE_ODB_DATA = 0x09,
+ SUBSC_INFO_IE_SS_INFO_LIST = 0x0A,
+ SUBSC_INFO_IE_USER_INFO = 0x0B,
+ SUBSC_INFO_IE_GPRS_DATA = 0x0C,
+
+ SUBSC_INFO_IE_AUTH_LIST = 0x11,
+} T_SUBSC_INFO_IE_TYPE;
+
+typedef enum {
+ ALL_BEARER_SERVICES = 0x00,
+
+ ALL_DATA_CDA = 0x10,
+ DATA_CDA_300BPS = 0x11,
+ DATA_CDA_1200BPS = 0x12,
+ DATA_CDA_1200_75BPS = 0x13,
+ DATA_CDA_2400BPS = 0x14,
+ DATA_CDA_4800BPS = 0x15,
+ DATA_CDA_9600BPS = 0x16, // supported by ViperCell
+ DATA_CDA_14400BPS = 0x66, // supported by ViperCell
+ DATA_CDA_GENERAL = 0x17,
+
+ ALL_DATA_CDS = 0x18,
+ DATA_CDS_1200BPS = 0x1A,
+ DATA_CDS_2400BPS = 0x1C,
+ DATA_CDS_4800BPS = 0x1D,
+ DATA_CDS_9600BPS = 0x1E,
+ DATA_CDS_GENERAL = 0x1F,
+
+ ALL_PAD_ACCESS_CA = 0x20,
+ PAD_ACCESS_CA_300BPS = 0x21,
+ PAD_ACCESS_CA_1200BPS = 0x22,
+ PAD_ACCESS_CA_1200_75BPS = 0x23,
+ PAD_ACCESS_CA_2400BPS = 0x24,
+ PAD_ACCESS_CA_4800BPS = 0x25,
+ PAD_ACCESS_CA_9600BPS = 0x26,
+ PAD_ACCESS_CA_GENERAL = 0x27,
+
+ ALL_DATA_PDS = 0x28,
+ DATA_PDS_2400BPS = 0x2C,
+ DATA_PDS_4800BPS = 0x2D,
+ DATA_PDS_9600BPS = 0x2E,
+ DATA_PDS_GENERAL = 0x2F,
+
+ ALL_ALT_SPEECH_DATA_CDA = 0x30,
+ ALL_ALT_SPEECH_DATA_CDS = 0x38,
+ ALL_SPEECH_FOLL_DATA_CDA = 0x40,
+ ALL_SPEECH_FOLL_DATA_CDS = 0x48,
+
+ ALL_PLMN_SPECIFIC_BS = 0xD0,
+ PLMN_SPECIFIC_BS_1 = 0xD1,
+ PLMN_SPECIFIC_BS_2 = 0xD2,
+ PLMN_SPECIFIC_BS_3 = 0xD3,
+ PLMN_SPECIFIC_BS_4 = 0xD4,
+ PLMN_SPECIFIC_BS_5 = 0xD5,
+ PLMN_SPECIFIC_BS_6 = 0xD6,
+ PLMN_SPECIFIC_BS_7 = 0xD7,
+ PLMN_SPECIFIC_BS_8 = 0xD8,
+ PLMN_SPECIFIC_BS_9 = 0xD9,
+ PLMN_SPECIFIC_BS_A = 0xDA,
+ PLMN_SPECIFIC_BS_B = 0xDB,
+ PLMN_SPECIFIC_BS_C = 0xDC,
+ PLMN_SPECIFIC_BS_D = 0xDD,
+ PLMN_SPECIFIC_BS_E = 0xDE,
+ PLMN_SPECIFIC_BS_F = 0xDF,
+
+} T_SUBSC_INFO_BEARER_SERVICE_CODE;
+
+typedef enum {
+ ALL_TELE_SERVICES = 0x00,
+
+ ALL_SPEECH_SERVICES = 0x10,
+ TELEPHONY_SERVICES = 0x11, // supported by ViperCell
+ EMERGENCY_CALLS = 0x12, // supported by ViperCell
+
+ ALL_SMS = 0x20,
+ SMS_MT_PP = 0x21, // supported by ViperCell
+ SMS_MO_PP = 0x22, // supported by ViperCell
+
+ ALL_FACS = 0x60,
+ FACS_GRP3_ALT_SPEECH = 0x61, // supported by ViperCell
+ AUTO_FACS_GRP3 = 0x62, // supported by ViperCell
+ FACS_GRP4 = 0x63,
+
+ ALL_VOICE_GROUP_CALL = 0x90,
+ VOICE_GROUP_CALL = 0x91,
+ VOICE_BROADCAST = 0x92,
+
+ ALL_PLMN_SPECIFIC_TS = 0xD0,
+ PLMN_SPECIFIC_TS_1 = 0xD1,
+ PLMN_SPECIFIC_TS_2 = 0xD2,
+ PLMN_SPECIFIC_TS_3 = 0xD3,
+ PLMN_SPECIFIC_TS_4 = 0xD4,
+ PLMN_SPECIFIC_TS_5 = 0xD5,
+ PLMN_SPECIFIC_TS_6 = 0xD6,
+ PLMN_SPECIFIC_TS_7 = 0xD7,
+ PLMN_SPECIFIC_TS_8 = 0xD8,
+ PLMN_SPECIFIC_TS_9 = 0xD9,
+ PLMN_SPECIFIC_TS_A = 0xDA,
+ PLMN_SPECIFIC_TS_B = 0xDB,
+ PLMN_SPECIFIC_TS_C = 0xDC,
+ PLMN_SPECIFIC_TS_D = 0xDD,
+ PLMN_SPECIFIC_TS_E = 0xDE,
+ PLMN_SPECIFIC_TS_F = 0xDF,
+
+} T_SUBSC_INFO_TELE_SERVICE_CODE;
+
+typedef enum {
+ SUPP_SERV_ALL_LI = 0x10,
+ SUPP_SERV_CLIP = 0x11,
+ SUPP_SERV_CLIR = 0x12,
+ SUPP_SERV_COLP = 0x13,
+ SUPP_SERV_COLR = 0x14,
+ SUPP_SERV_ALL_FWD = 0x20,
+ SUPP_SERV_CFU = 0x21,
+ SUPP_SERV_ALL_CCF = 0x28, // all conditional call forwarding
+ SUPP_SERV_CFB = 0x29,
+ SUPP_SERV_CFNRY = 0x2A,
+ SUPP_SERV_CFNRC = 0x2B,
+ SUPP_SERV_ALL_CO = 0x30,
+ SUPP_SERV_ECT = 0x31,
+ SUPP_SERV_ALL_CC = 0x40,
+ SUPP_SERV_CW = 0x41,
+ SUPP_SERV_HOLD = 0x42,
+ SUPP_SERV_ALL_MULT = 0x50,
+ SUPP_SERV_MPTY = 0x51,
+ SUPP_SERV_ALL_BAR = 0x90,
+ SUPP_SERV_BAOC = 0x92,
+ SUPP_SERV_BOIC = 0x93,
+ SUPP_SERV_BOICE = 0x94,
+ SUPP_SERV_BAIC = 0x9A,
+ SUPP_SERV_BIC_ROAM = 0x9B, // added 06/19/2000 kevinlim
+} T_SUBSC_INFO_SUPP_SERVICE_CODE;
+
+typedef enum { // 2.0.7
+ SS_INFO_IND_FORW_CFU = 0,
+ SS_INFO_IND_FORW_CFB = 1,
+ SS_INFO_IND_FORW_CFNRC = 2,
+ SS_INFO_IND_FORW_CFNRY = 3,
+ SS_INFO_IND_FORW_MAX
+} T_SUBSC_SS_INFO_FORW_INDEX;
+
+typedef enum {
+ SS_INFO_IND_DATA_CW = 0,
+ SS_INFO_IND_DATA_HOLD = 1,
+ SS_INFO_IND_DATA_CLIP = 2,
+ SS_INFO_IND_DATA_CLIR = 3,
+ SS_INFO_IND_DATA_COLP = 4,
+ SS_INFO_IND_DATA_COLR = 5,
+ SS_INFO_IND_DATA_ECT = 6,
+ SS_INFO_IND_DATA_MPTY = 7,
+ SS_INFO_IND_DATA_MAX
+} T_SUBSC_SS_INFO_DATA_INDEX;
+
+typedef enum {
+ SS_INFO_IND_BAR_BAOC = 0,
+ SS_INFO_IND_BAR_BOIC = 1,
+ SS_INFO_IND_BAR_BOICE = 2,
+ SS_INFO_IND_BAR_BAIC = 3,
+ SS_INFO_IND_BAR_BIC_ROAM = 4,
+ SS_INFO_IND_BAR_MAX
+} T_SUBSC_SS_INFO_BAR_INDEX;
+
+/*
+typedef enum { // 2.0.6
+ SS_INFO_IND_CFU = 0,
+ SS_INFO_IND_CFB = 1,
+ SS_INFO_IND_CFNRC = 2,
+ SS_INFO_IND_CFNRY = 3,
+ SS_INFO_IND_CW = 4,
+ SS_INFO_IND_HOLD = 5,
+ SS_INFO_IND_CLIP = 6,
+ SS_INFO_IND_CLIR = 7,
+ SS_INFO_IND_COLP = 8,
+ SS_INFO_IND_COLR = 9,
+ SS_INFO_IND_ECT = 10,
+ SS_INFO_IND_MPTY = 11,
+ SS_INFO_IND_BAOC = 12,
+ SS_INFO_IND_BOIC = 13,
+ SS_INFO_IND_BOICE = 14,
+ SS_INFO_IND_BAIC = 15,
+} T_SUBSC_SS_INFO_INDEX;
+*/
+
+typedef enum {
+ ODB_GEN_BIT_ALL_OG = 0,
+ ODB_GEN_BIT_INTRN_OG = 1,
+ ODB_GEN_BIT_INTRN_OG_NOT_HPLMN = 2,
+ ODB_GEN_BIT_PREM_INFO = 3,
+ ODB_GEN_BIT_PREM_ENT = 4,
+ ODB_GEN_BIT_SS_ACCESS = 5,
+ ODB_GEN_BIT_INTRZ_OG = 6,
+ ODB_GEN_BIT_INTRZ_OG_NOT_HPLMN = 7,
+
+ ODB_GEN_BIT_INTRZ_INTRN_NOT_HPLMN = 0,
+ ODB_GEN_BIT_ALL_ECT = 1,
+ ODB_GEN_BIT_CHARGE_ECT = 2,
+ ODB_GEN_BIT_INTRN_ECT = 3,
+ ODB_GEN_BIT_INTRZ_ECT = 4,
+ ODB_GEN_BIT_DBL_CHARGE_ECT = 5,
+ ODB_GEN_BIT_MULTI_ECT = 6,
+
+} T_ODB_GEN_BIT;
+
+typedef enum {
+ ODB_HPLMN_BIT_TYPE_1 = 0,
+ ODB_HPLMN_BIT_TYPE_2 = 1,
+ ODB_HPLMN_BIT_TYPE_3 = 2,
+ ODB_HPLMN_BIT_TYPE_4 = 3,
+} T_ODB_HPLMN_BIT;
+
+typedef enum {
+ SS_STATUS_A_BIT = 0,
+ SS_STATUS_R_BIT = 1,
+ SS_STATUS_P_BIT = 2,
+ SS_STATUS_Q_BIT = 3,
+} T_SS_STATUS_BIT;
+
+
+#define MAX_NUM_SUBSC_IMSI 18
+
+#define SUBSC_MCC_LEN 3
+#define SUBSC_MNC_LEN 2
+#define SUBSC_MSIN_LEN 10
+
+typedef struct {
+// T_SUBSC_INFO_IE_TYPE ie_type; // only in encoded message
+ unsigned char num_digit;
+ unsigned char imsi[MAX_NUM_SUBSC_IMSI];
+} T_SUBSC_IE_MOBILE_ID_IMSI;
+
+
+// this struct can be changed to 9 byte long TBCD format, if necessary.
+#define MAX_NUM_SUBSC_ISDN 18
+#define NUM_PLAN_LEN 1
+typedef struct {
+// T_SUBSC_INFO_IE_TYPE ie_type; // only in encoded message
+ short num_digit;
+ unsigned char digits[MAX_NUM_SUBSC_ISDN];
+ unsigned char num_plan[NUM_PLAN_LEN];
+} T_SUBSC_IE_ISDN;
+
+#define NUM_SUBADDR_INFO 1 // was 20
+typedef struct {
+// T_SUBSC_INFO_IE_TYPE ie_type; // only in encoded message
+ short subaddr_type;
+ unsigned char info[NUM_SUBADDR_INFO];
+} T_SUBSC_IE_SUBADDR;
+
+#define MAX_NUM_BEARER_SERVICE 5 // was 50
+typedef struct {
+// T_SUBSC_INFO_IE_TYPE ie_type; // only in encoded message
+ short num_srv;
+ T_SUBSC_INFO_BEARER_SERVICE_CODE bs_code[MAX_NUM_BEARER_SERVICE];
+} T_SUBSC_IE_PROVISION_BS;
+
+#define MAX_NUM_TELE_SERVICE 10 // was 20
+typedef struct {
+// T_SUBSC_INFO_IE_TYPE ie_type; // only in encoded message
+ short num_srv;
+ T_SUBSC_INFO_TELE_SERVICE_CODE ts_code[MAX_NUM_TELE_SERVICE];
+} T_SUBSC_IE_PROVISION_TS;
+
+#define MAX_NUM_SUPP_SERVICE 21 // was 30
+typedef struct {
+// T_SUBSC_INFO_IE_TYPE ie_type; // only in encoded message
+ short num_srv;
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code[MAX_NUM_SUPP_SERVICE];
+} T_SUBSC_IE_PROVISION_SS;
+
+typedef enum {
+ SUBSC_STATUS_SERVICE_GRANTED = 0,
+ SUBSC_STATUS_ODBARRING = 1,
+} T_SUBSC_STATUS_TYPE;
+
+typedef struct {
+// T_SUBSC_INFO_IE_TYPE ie_type; // only in encoded message
+ T_SUBSC_STATUS_TYPE status;
+} T_SUBSC_IE_SUBSC_STATUS;
+
+typedef struct {
+ unsigned char all_og_barred;
+ unsigned char intrn_og_barred;
+ unsigned char intrn_og_not_hplmn_barred;
+ unsigned char premium_info_og_barred;
+ unsigned char premium_enter_og_barred;
+ unsigned char ss_access_barred;
+ unsigned char intrz_og_barred;
+ unsigned char intrz_og_not_hplmn_barred;
+ unsigned char intrz_intrn_og_not_hplmn_barred;
+ unsigned char all_ect_barred;
+ unsigned char chargeable_ect_barred;
+ unsigned char intrn_ect_barred;
+ unsigned char intrz_ect_barred;
+ unsigned char double_chargeable_ect_barred;
+ unsigned char multiple_ect_barred;
+} T_ODB_GEN_FLAGS;
+
+typedef struct {
+ unsigned char plmn_specific_type1;
+ unsigned char plmn_specific_type2;
+ unsigned char plmn_specific_type3;
+ unsigned char plmn_specific_type4;
+} T_ODB_PLMN_FLAGS;
+
+typedef enum {
+ BEARER_SERVICE_TYPE = 0,
+ TELE_SERVICE_TYPE = 1,
+} T_SUBSC_INFO_BASIC_SERVICE_TYPE;
+
+typedef struct {
+ T_SUBSC_INFO_BASIC_SERVICE_TYPE service_type;
+ union {
+ unsigned char ex_bs_code[5]; // octet 2-5 reserved
+ unsigned char ex_ts_code[5]; // octet 2-5 reserved
+ };
+} T_SUBSC_INFO_EXT_BASIC_SERVICE;
+
+typedef struct {
+ unsigned char ss_status_A;
+ unsigned char ss_status_R;
+ unsigned char ss_status_P;
+ unsigned char ss_status_Q;
+} T_SS_STATUS_FLAG;
+
+typedef enum {
+ NO_NOTIFICATION_TO_FORWARDING = 0,
+ NOTIFICATION_TO_FORWARDING = 1,
+} T_NOTIFY_FORW_FLAG;
+
+typedef enum {
+ NO_NOTIFICATION_TO_CALLING = 0,
+ NOTIFICATION_TO_CALLING = 1,
+} T_NOTIFY_CALLING_FLAG;
+
+typedef enum {
+ MS_NOT_REACHABLE = 0,
+ MS_BUSY = 1,
+ NO_REPLY = 2,
+ UNCONDITIONAL = 3,
+} T_FORW_REASON_FLAG;
+
+typedef enum {
+ SS_NOTIFY_FORW_FLAG_BIT = 0,
+ SS_NOTIFY_CALLING_FLAG_BIT = 1,
+ SS_FORW_REASON_FLAG_BIT = 2,
+} T_SS_FORW_OPTION_BITS;
+
+typedef struct {
+ T_NOTIFY_FORW_FLAG notify_forw_party;
+ T_NOTIFY_CALLING_FLAG notify_calling_party;
+ T_FORW_REASON_FLAG forw_reason;
+} T_SS_FORW_OPTION;
+
+typedef struct {
+// T_SUBSC_INFO_IE_TYPE ie_type; // only in encoded message
+ T_ODB_GEN_FLAGS odb_general;
+ T_ODB_PLMN_FLAGS odb_plmn;
+} T_SUBSC_IE_ODB_DATA;
+
+typedef struct {
+ T_SUBSC_INFO_EXT_BASIC_SERVICE basic_service;
+ T_SS_STATUS_FLAG ss_status;
+ T_SUBSC_IE_ISDN forw_to_num;
+ T_SUBSC_IE_SUBADDR forw_to_sub;
+ T_SS_FORW_OPTION forw_options;
+ short no_reply_cond_time;
+} T_SUBSC_FORW_FEATURE;
+
+typedef struct {
+ T_SUBSC_INFO_EXT_BASIC_SERVICE basic_service;
+ T_SS_STATUS_FLAG ss_status;
+} T_SUBSC_BARR_FEATURE;
+
+#define MAX_NUM_EXT_FEATURE 1 // was 20 -> 5 -> 1 (2.0.7)
+
+typedef struct {
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code;
+ short num_feature;
+ T_SUBSC_FORW_FEATURE list[MAX_NUM_EXT_FEATURE];
+} T_SUBSC_IE_SS_INFO_FORW;
+
+typedef struct {
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code;
+ short num_feature;
+ T_SUBSC_BARR_FEATURE list[MAX_NUM_EXT_FEATURE];
+} T_SUBSC_IE_SS_INFO_BAR;
+
+typedef enum {
+ SS_SUBSC_OPTION_CLIR_OPTION = 2,
+ SS_SUBSC_OPTION_OVERRIDE_CATEGORY = 1,
+} T_SS_SUBSC_OPTION_TYPE; // 2.1.1
+
+typedef enum {
+ CLIR_PERMANENT = 0,
+ CLIR_TEMP_DFT_RESTRICTED = 1,
+ CLIR_TEMP_DFT_ALLOWED = 2,
+} T_SS_SUBSC_CLIR_OPTION; // 2.1.1
+
+typedef enum {
+ OVERRIDE_ENABLED = 0,
+ OVERRIDE_DISABLED = 1,
+} T_SS_SUBSC_OVERRIDE_CATEGORY; // 2.1.1
+
+typedef struct {
+ bool isPresent;
+ T_SS_SUBSC_OPTION_TYPE option_type;
+ union {
+ T_SS_SUBSC_CLIR_OPTION clir_option;
+ T_SS_SUBSC_OVERRIDE_CATEGORY override_category;
+ };
+} T_SS_SUBSC_OPTION; // 2.1.1
+
+typedef struct {
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code;
+ T_SS_STATUS_FLAG ss_status;
+ T_SS_SUBSC_OPTION ss_subsc_option; // 2.1.1
+} T_SUBSC_IE_SS_INFO_DATA; // 2.0.5
+
+typedef enum {
+ SUBSC_IE_SS_INFO_FORW_TYPE = 1,
+ SUBSC_IE_SS_INFO_BARR_TYPE = 2,
+ SUBSC_IE_SS_INFO_DATA_TYPE = 3, // 2.0.5
+} T_SUBSC_IE_SS_INFO_TYPE;
+
+typedef struct {
+ T_SUBSC_IE_SS_INFO_TYPE info_type;
+ union {
+ T_SUBSC_IE_SS_INFO_FORW info_forw;
+ T_SUBSC_IE_SS_INFO_BAR info_bar;
+ T_SUBSC_IE_SS_INFO_DATA info_data; // 2.0.5
+ };
+} T_SUBSC_IE_SS_INFO;
+
+typedef struct {
+// T_SUBSC_INFO_IE_TYPE ie_type; // only in encoded message
+ short num_ss_info; // FORW_MAX + DATA_MAX + BAR_MAX
+ T_SUBSC_IE_SS_INFO_FORW ss_info_forw[SS_INFO_IND_FORW_MAX];
+ T_SUBSC_IE_SS_INFO_DATA ss_info_data[SS_INFO_IND_DATA_MAX];
+ T_SUBSC_IE_SS_INFO_BAR ss_info_bar [SS_INFO_IND_BAR_MAX];
+} T_SUBSC_IE_SS_INFO_LIST;
+
+#define MAX_NUM_USER_INFO 32
+typedef struct {
+// T_SUBSC_INFO_IE_TYPE ie_type; // only in encoded message
+ short len;
+ unsigned char name[MAX_NUM_USER_INFO];
+} T_SUBSC_IE_USER_INFO;
+
+typedef struct {
+ T_SUBSC_IE_MOBILE_ID_IMSI imsi;
+ T_SUBSC_IE_ISDN msisdn;
+ T_SUBSC_IE_PROVISION_BS prov_bs;
+ T_SUBSC_IE_PROVISION_TS prov_ts;
+ T_SUBSC_IE_PROVISION_SS prov_ss;
+ T_SUBSC_IE_SUBSC_STATUS status;
+ T_SUBSC_IE_ODB_DATA odb_data;
+ T_SUBSC_IE_SS_INFO_LIST ss_info_list;
+ T_SUBSC_IE_USER_INFO user;
+ T_SUBSC_IE_GPRS_DATA_INFO gprs_data; // 2.1.0
+ T_SUBSC_IE_IN_PROFILE in_profile; // 2.1.2
+} T_SUBSC_INFO;
+
+
+typedef enum {
+ SUBSC_INFO_NO_ERR = 0,
+ SUBSC_INFO_ERR_UNEXP_IE = 1,
+ SUBSC_INFO_ERR_ISDN_NUM_DIGIT = 2,
+ SUBSC_INFO_ERR_BS_NUM_SRV = 3,
+ SUBSC_INFO_ERR_TS_NUM_SRV = 4,
+ SUBSC_INFO_ERR_SS_NUM_SRV = 5,
+ SUBSC_INFO_ERR_UNKNOWN_BASIC = 6,
+ SUBSC_INFO_ERR_FORW_NUM_FEATURE = 7,
+ SUBSC_INFO_ERR_BAR_NUM_FEATURE = 8,
+ SUBSC_INFO_ERR_SS_INFO_TYPE = 9,
+ SUBSC_INFO_ERR_SS_NUM_INFO = 10,
+ SUBSC_INFO_ERR_USER_INFO = 11,
+ SUBSC_INFO_ERR_IMSI_NUM_DIGIT = 12,
+ SUBSC_INFO_ERR_VERSION = 13,
+ SUBSC_INFO_ERR_GPRS_DATA_LEN = 14,
+ SUBSC_INFO_ERR_APN_LEN = 15,
+
+ SUBSC_INFO_ERR_AUTH_NUM_LIST = 20,
+ SUBSC_INFO_ERR_SS_SUBSC_OPTION = 21, // 2.1.1
+} SUBSC_INFO_ERR;
+
+#define SEC_RAND_LEN 16
+#define SEC_SRES_LEN 4
+#define SEC_KC_LEN 8
+
+typedef struct {
+ unsigned char RAND[SEC_RAND_LEN];
+ unsigned char SRES[SEC_SRES_LEN];
+ unsigned char Kc[SEC_KC_LEN];
+} T_AUTH_TRIPLET;
+
+#define SEC_MAX_TRIPLET 5
+
+typedef struct {
+// T_SUBSC_INFO_IE_TYPE ie_type; // only in encoded message
+ short num_set;
+ T_AUTH_TRIPLET triplet[SEC_MAX_TRIPLET];
+} T_SEC_IE_AUTH_LIST;
+
+typedef struct {
+ T_SUBSC_IE_MOBILE_ID_IMSI imsi;
+ T_SEC_IE_AUTH_LIST auth_set;
+} T_SEC_INFO;
+
+
+// Function prototypes
+
+/* SubscInfo.cpp */
+
+char * getSubscInfoIETypeStr(T_SUBSC_INFO_IE_TYPE ie_type);
+char * getSubscInfoBSCodeStr(T_SUBSC_INFO_BEARER_SERVICE_CODE code);
+char * getSubscInfoTSCodeStr(T_SUBSC_INFO_TELE_SERVICE_CODE code);
+char * getSubscInfoSSCodeStr(T_SUBSC_INFO_SUPP_SERVICE_CODE code);
+short checkSubscInfoIEType(unsigned char ie_type, T_SUBSC_INFO_IE_TYPE exp);
+
+void printSubscMsg(unsigned char *msg, short size);
+
+/* SubscInfoMsgEncoder.cpp */
+
+// Encode SubscInfo to Message Buffer (Byte Stream) provided.
+// size - size of msg buffer, returned with actual used size
+short EncodeSubscInfo(unsigned char *msg,
+ short *size,
+ T_SUBSC_INFO *subsc);
+
+// Encode SecurityInfo to Message Buffer (Byte Stream) provided.
+// size - size of msg buffer, returned with actual used size
+short EncodeSecInfo(unsigned char *msg,
+ short *size,
+ T_SEC_INFO *sec);
+
+/* SubscInfoMsgDecoder.cpp */
+
+// Decode SubscInfo from Message Buffer to the structure.
+// size - size of message in msg buffer
+short DecodeSubscInfo(unsigned char *msg,
+ short size,
+ T_SUBSC_INFO *subsc);
+
+// Decode SecInfo from Message Buffer to the structure.
+// size - size of message in msg buffer
+short DecodeSecInfo(unsigned char *msg,
+ short size,
+ T_SEC_INFO *sec);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // SUBSC_INFO_TYPE_H
+
+
+
+
+
diff --git a/data/mnet/Common/include/subsc/SubscInfoUtil.h b/data/mnet/Common/include/subsc/SubscInfoUtil.h
new file mode 100644
index 0000000..5a24947
--- /dev/null
+++ b/data/mnet/Common/include/subsc/SubscInfoUtil.h
@@ -0,0 +1,254 @@
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SubscInfoUtil.h
+// Author(s) : Kevin Lim
+// Create Date : 06-16-99
+// Description : message and ie interface among LUDB and other modules
+//
+// *******************************************************************
+
+#ifndef SUBSC_INFO_UTIL_H
+#define SUBSC_INFO_UTIL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+T_SUBSC_IE_MOBILE_ID_IMSI* subscGetMobileIdPtr(T_SUBSC_INFO *info);
+T_SUBSC_IE_ISDN* subscGetMSISDNPtr(T_SUBSC_INFO *info);
+T_SUBSC_IE_PROVISION_BS* subscGetProvBSPtr(T_SUBSC_INFO *info);
+T_SUBSC_IE_PROVISION_TS* subscGetProvTSPtr(T_SUBSC_INFO *info);
+T_SUBSC_IE_PROVISION_SS* subscGetProvSSPtr(T_SUBSC_INFO *info);
+T_SUBSC_IE_SUBSC_STATUS* subscGetSubscStatusPtr(T_SUBSC_INFO *info);
+T_SUBSC_IE_ODB_DATA* subscGetODBDataPtr(T_SUBSC_INFO *info);
+T_SUBSC_IE_SS_INFO_LIST* subscGetSSInfoListPtr(T_SUBSC_INFO *info);
+T_SUBSC_IE_USER_INFO* subscGetUserInfoPtr(T_SUBSC_INFO *info);
+T_SUBSC_IE_GPRS_DATA_INFO* subscGetGPRSDataPtr(T_SUBSC_INFO *info);
+
+bool subscIsProvCLIP (T_SUBSC_INFO *info);
+bool subscIsProvCLIR (T_SUBSC_INFO *info);
+bool subscIsProvCOLP (T_SUBSC_INFO *info);
+bool subscIsProvCOLR (T_SUBSC_INFO *info);
+bool subscIsProvCFU (T_SUBSC_INFO *info);
+bool subscIsProvCFB (T_SUBSC_INFO *info);
+bool subscIsProvCFNRY (T_SUBSC_INFO *info);
+bool subscIsProvCFNRC (T_SUBSC_INFO *info);
+bool subscIsProvECT (T_SUBSC_INFO *info);
+bool subscIsProvCW (T_SUBSC_INFO *info);
+bool subscIsProvHOLD (T_SUBSC_INFO *info);
+bool subscIsProvMPTY (T_SUBSC_INFO *info);
+bool subscIsProvBAOC (T_SUBSC_INFO *info);
+bool subscIsProvBOIC (T_SUBSC_INFO *info);
+bool subscIsProvBOICE (T_SUBSC_INFO *info);
+bool subscIsProvBAIC (T_SUBSC_INFO *info);
+bool subscIsProvBICRoam(T_SUBSC_INFO *info);
+
+T_SUBSC_FORW_FEATURE* subscGetForwFeature(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code);
+bool subscIsActiveCF(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code);
+bool subscIsActiveCW(T_SUBSC_IE_SS_INFO_LIST *ss_info_list);
+int subscGetTimerCFNRY(T_SUBSC_IE_SS_INFO_LIST *ss_info_list);
+
+void subscPrintImsi(T_SUBSC_IE_MOBILE_ID_IMSI *imsi);
+void subscPrintIsdn(T_SUBSC_IE_ISDN *msisdn);
+void subscPrintProvBS(T_SUBSC_IE_PROVISION_BS *prov_bs);
+void subscPrintProvTS(T_SUBSC_IE_PROVISION_TS *prov_ts);
+void subscPrintProvSS(T_SUBSC_IE_PROVISION_SS *prov_ss);
+void subscPrintSubscStatus(T_SUBSC_IE_SUBSC_STATUS *status);
+void subscPrintODBData(T_SUBSC_IE_ODB_DATA *odb_data);
+void subscPrintSSInfoList(T_SUBSC_IE_SS_INFO_LIST *ss_info_list);
+void subscPrintUserInfo(T_SUBSC_IE_USER_INFO *user);
+void subscPrintGPRSDataPtr(T_SUBSC_IE_GPRS_DATA_INFO *gprs_data);
+
+void subscPrintInfo(T_SUBSC_INFO *info);
+void subscPrintGPRSInfo(T_SUBSC_INFO *info);
+char *subscGetStringImsi(T_SUBSC_IE_MOBILE_ID_IMSI *imsi);
+char *subscGetStringIsdn(T_SUBSC_IE_ISDN *isdn);
+char *subscGetStringUser(T_SUBSC_IE_USER_INFO *user);
+char *subscGetCFNum(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code);
+T_SUBSC_IE_ISDN* subscGetCFNumPtr(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code);
+
+void subscSetIMSI(T_SUBSC_INFO *subsc, char *buf);
+void subscSetMSISDN(T_SUBSC_INFO *subsc, char *buf);
+void subscSetUserInfo(T_SUBSC_INFO *subsc, char *buf);
+void subscSetACF(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code,
+ int active);
+void subscSetPCF(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code,
+ int prov); // use subscSetP instead
+void subscSetRCF(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code,
+ int reg);
+
+void subscSetCFNum(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code,
+ char *num);
+void subscSetTimerCFNRY(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ int sec);
+
+T_SS_STATUS_FLAG* subscGetStatusFlagPtr(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code);
+
+int subscGetP(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code);
+
+int subscGetA(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code);
+
+int subscGetR(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code);
+
+int subscGetQ(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code);
+
+void subscSetP(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code,
+ int prov);
+
+void subscSetA(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code,
+ int active);
+
+void subscSetR(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code,
+ int registered);
+
+void subscSetQ(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code,
+ int quiescent);
+
+int subscGetSSInfoInd(T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code); // 2.0.6
+int subscGetSSInfoForwInd(T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code); // 2.0.7
+int subscGetSSInfoDataInd(T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code); // 2.0.7
+int subscGetSSInfoBarInd(T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code); // 2.0.7
+void subscSSInfoListClear(T_SUBSC_IE_SS_INFO_LIST *info_list); // 2.0.6
+
+
+void subscInfoInitialize(T_SUBSC_INFO *info); // 2.0.6
+
+int subscIsODBarred (T_SUBSC_INFO *info);
+int subscIsODBAllOg (T_SUBSC_INFO *info);
+int subscIsODBIntrnOg (T_SUBSC_INFO *info);
+int subscIsODBIntrnOgNotHplmn (T_SUBSC_INFO *info);
+int subscIsODBPremiumInfoOg (T_SUBSC_INFO *info);
+int subscIsODBPremiumEnterOg (T_SUBSC_INFO *info);
+int subscIsODBSsAccess (T_SUBSC_INFO *info);
+int subscIsODBIntrzOg (T_SUBSC_INFO *info);
+int subscIsODBIntrzOgNotHplmn (T_SUBSC_INFO *info);
+int subscIsODBIntrzIntrnOgNotHplmn (T_SUBSC_INFO *info);
+int subscIsODBAllEct (T_SUBSC_INFO *info);
+int subscIsODBChargeableEct (T_SUBSC_INFO *info);
+int subscIsODBIntrnEct (T_SUBSC_INFO *info);
+int subscIsODBIntrzEct (T_SUBSC_INFO *info);
+int subscIsODBDoubleChargeableEct (T_SUBSC_INFO *info);
+int subscIsODBMultipleEct (T_SUBSC_INFO *info);
+
+void subscSetODB (T_SUBSC_INFO *info, int flag);
+void subscSetODBAllOg (T_SUBSC_INFO *info, int flag);
+void subscSetODBIntrnOg (T_SUBSC_INFO *info, int flag);
+void subscSetODBIntrnOgNotHplmn (T_SUBSC_INFO *info, int flag);
+void subscSetODBPremiumInfoOg (T_SUBSC_INFO *info, int flag);
+void subscSetODBPremiumEnterOg (T_SUBSC_INFO *info, int flag);
+void subscSetODBSsAccess (T_SUBSC_INFO *info, int flag);
+void subscSetODBIntrzOg (T_SUBSC_INFO *info, int flag);
+void subscSetODBIntrzOgNotHplmn (T_SUBSC_INFO *info, int flag);
+void subscSetODBIntrzIntrnOgNotHplmn (T_SUBSC_INFO *info, int flag);
+void subscSetODBAllEct (T_SUBSC_INFO *info, int flag);
+void subscSetODBChargeableEct (T_SUBSC_INFO *info, int flag);
+void subscSetODBIntrnEct (T_SUBSC_INFO *info, int flag);
+void subscSetODBIntrzEct (T_SUBSC_INFO *info, int flag);
+void subscSetODBDoubleChargeableEct (T_SUBSC_INFO *info, int flag);
+void subscSetODBMultipleEct (T_SUBSC_INFO *info, int flag);
+
+int subscIsSSBaoc (T_SUBSC_INFO *info);
+int subscIsSSBoic (T_SUBSC_INFO *info);
+int subscIsSSBoicExHC (T_SUBSC_INFO *info);
+int subscIsSSBaic (T_SUBSC_INFO *info);
+int subscIsSSBicRoam (T_SUBSC_INFO *info);
+
+void subscSetSSBaoc (T_SUBSC_INFO *info, int flag);
+void subscSetSSBoic (T_SUBSC_INFO *info, int flag);
+void subscSetSSBoicExHC (T_SUBSC_INFO *info, int flag);
+void subscSetSSBaic (T_SUBSC_INFO *info, int flag);
+void subscSetSSBicRoam (T_SUBSC_INFO *info, int flag);
+
+int subscGetTSIndex(T_SUBSC_IE_PROVISION_TS *ts_list,
+ T_SUBSC_INFO_TELE_SERVICE_CODE code);
+int subscExistTS(T_SUBSC_INFO *info, T_SUBSC_INFO_TELE_SERVICE_CODE code);
+int subscAddTS(T_SUBSC_INFO *info, T_SUBSC_INFO_TELE_SERVICE_CODE code);
+int subscDelTS(T_SUBSC_INFO *info, T_SUBSC_INFO_TELE_SERVICE_CODE code);
+
+int subscProvSMS_MO_PP(T_SUBSC_INFO *info);
+int subscProvSMS_MT_PP(T_SUBSC_INFO *info);
+
+void subscProvSSCode(T_SUBSC_INFO *info, T_SUBSC_INFO_SUPP_SERVICE_CODE code, int add);
+
+int subscGetCLIROption(T_SUBSC_INFO *info, T_SS_SUBSC_CLIR_OPTION *option); // 2.1.1
+int subscSetCLIROption(T_SUBSC_INFO *info, T_SS_SUBSC_CLIR_OPTION option); // 2.1.1
+
+/* GPRS */
+T_SUBSC_GPRS_DATA *subscGetGprsPdpDataPtr(T_SUBSC_INFO *info, int index);
+
+/* find entry by pdpContextId */
+/* return 0 and index value -1 if not found */
+/* return pointer to T_SUBSC_GPRS_DATA and index of T_SUBSC_IE_GPRS_DATA_INFO's data array */
+
+T_SUBSC_GPRS_DATA *subscFindGprsPdpData(T_SUBSC_INFO *info, unsigned char pdpContextId, int *index);
+
+/* copy data to the new entry after the last entry and increase num_data of the list */
+/* return 0 on success */
+/* return -1 if can't get pointer to T_SUBSC_IE_GPRS_DATA_INFO */
+/* return 1 if T_SUBSC_GPRS_DATA already exists with pdpContextId same data->pdpContextId */
+/* return 2 internal error */
+/* return 3 T_SUBSC_IE_GPRS_DATA_INFO's data array is full */
+
+int subscAddGprsPdpData(T_SUBSC_INFO *info, T_SUBSC_GPRS_DATA *data);
+
+/* copy the last entry data to the delete target entry and decrease num_data of the list */
+/* return 0 on success */
+/* return -1 if can't get pointer to T_SUBSC_IE_GPRS_DATA_INFO */
+/* return 1 if T_SUBSC_GPRS_DATA not found with pdpContextId */
+/* return 2 internal error */
+/* return 3 internal error, T_SUBSC_IE_GPRS_DATA_INFO's data array is empty */
+
+int subscDelGprsPdpData(T_SUBSC_INFO *info, unsigned char pdpContextId);
+
+/* find and modify the passed data in the list */
+/* return 0 on success */
+/* return -1 if can't get pointer to T_SUBSC_IE_GPRS_DATA_INFO */
+/* return 1 if T_SUBSC_GPRS_DATA not found with pdpContextId */
+/* return 2 internal error */
+/* return 3 internal error, T_SUBSC_IE_GPRS_DATA_INFO's data array is empty */
+
+int subscModifyGprsPdpData(T_SUBSC_INFO *info, T_SUBSC_GPRS_DATA *data);
+
+/* IN PROFILE */
+
+int subscGetClassInfo(T_SUBSC_INFO *info, unsigned char* classId); // 2.1.2
+int subscGetPrepaidIndicator(T_SUBSC_INFO *info, bool* isPrepaid); // 2.1.2
+int subscSetInProfile(T_SUBSC_INFO *info, T_SUBSC_IE_IN_PROFILE *inProf); // 2.1.2
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // SUBSC_INFO_UTIL_H
+
+
+
+
+
diff --git a/data/mnet/Common/include/table.h b/data/mnet/Common/include/table.h
new file mode 100644
index 0000000..058cbdd
--- /dev/null
+++ b/data/mnet/Common/include/table.h
@@ -0,0 +1,121 @@
+/*-------------------------------------------------------------------------
+ *
+ * table.h Table processing routines
+ *
+ * These routines are used to manipulate tables. They comprise a simple
+ * alternative data structure to static arrays or linked lists for
+ * handling data records. It allows the program to easily reference the
+ * table and step through its entries.
+ *
+ ***************************************************************************
+ * Modification history
+ * ----------------------------
+ * 03/04/00 Bhawani Change _DEBUG from DEBUG
+ *
+ *--------------------------------------------------------------------------
+ */
+
+#ifndef TABLE_H_DEFINED
+#define TABLE_H_DEFINED
+
+
+typedef int Int;
+typedef char Int8;
+typedef short Int16;
+typedef long Int32;
+typedef double Int64;
+
+typedef unsigned int uInt;
+typedef unsigned char uInt8;
+typedef unsigned short uInt16;
+typedef unsigned long uInt32;
+typedef double uInt64;
+
+typedef int Status; /* Status codes returned: */
+#define True 1
+#define False 0
+#define Success True
+#define Failure False
+#ifndef Null
+#define Null 0
+#endif
+
+typedef struct Table_t {
+ Int16 magic; /* Magic Marker. */
+ Int16 size; /* Size of a row. */
+ Int16 end; /* End of the table. */
+ Int16 last; /* Last row allocated. */
+ Int16 index; /* current index. */
+ Int16 status; /* Last status of table. */
+ Int16 limit; /* Limit to the table growth. */
+ Int16 insert; /* Buffer insert pointer. */
+ char *data; /* Pointer to actual data. */
+ int (*sort)(const void *, const void *); /* Qsort process if any. */
+} Table;
+
+#define VALID_TABLE(tbl) (tbl&&((tbl->magic == TABLE_VALID)||(tbl->magic == TABLE_SORT)||(tbl->magic == TABLE_BUFFER)))
+#define FREE_TABLE(tbl) (tbl&&(tbl->magic == TABLE_FREE))
+#define TABLE_VALID (Int16) 0xAAAA
+#define TABLE_SORT (Int16) 0xBBBB
+#define TABLE_BUFFER (Int16) 0xCCCC
+#define TABLE_FREE (Int16) 0xF3EE
+#define TABLE_CHUNK 10 /* # of entries per realloc() */
+#define CHUNK(siz) (((siz/TABLE_CHUNK)+1)*TABLE_CHUNK)
+
+/* ANSI Function prototypes. */
+
+extern Table *table_create(int);
+extern Status table_free(Table *);
+extern void *table_getRow(Table *, int);
+extern void *table_getValue(Table *, int);
+extern void *table_getFirst(Table *);
+extern void *table_getLast(Table *);
+extern void *table_getPrev(Table *);
+extern void *table_getNext(Table *);
+extern Status table_getEntry(Table *, int, void *, int);
+extern Status table_setEntry(Table *, int, void *, int);
+extern Status table_addEntry(Table *, char *, int);
+extern Status table_removeEntry(Table *, int);
+extern Status table_setValue(Table *, int, int);
+extern Status table_addValue(Table *, int);
+extern Status table_extend(Table *, int);
+extern Status table_limit(Table *, int);
+extern Status table_buffer(Table *, int);
+extern Status table_status(Table *);
+extern int table_size(Table *);
+extern int table_end(Table *);
+extern void *table_find(Table *, int (*)(const void *, const void *), void *);
+extern void *table_find_next(Table *, int (*)(const void *, const void *), void *);
+extern Status table_sort(Table *, int (*)(const void *, const void *));
+
+
+#endif /* TABLE_H_DEFINED */
+
+#ifndef DEBUG_H_DEFINED
+#define DEBUG_H_DEFINED
+
+extern void debug_msg(char *);
+extern void debug_stop(char *);
+extern int debug_print();
+extern int debug_test(char *, char *, int);
+extern void debug_index();
+extern void debug_catalog(char *, char *, int);
+extern int debug_catalogFind(const void *, const void *);
+extern int strncasecmp(char *, char *, int);
+extern int strcasecmp(char *, char *);
+extern char *strdup(char *);
+
+#ifdef _DEBUG
+#define DBG(a) (debug_test(a, __FILE__, __LINE__))
+#define DMSG(a, b) (debug_test(a, __FILE__, __LINE__) ? (b) : 0)
+#else
+#define DBG(a)
+#define DMSG(a, b)
+#endif
+
+#endif
+
+
+
+
+
diff --git a/data/mnet/Common/include/vxTemplate/vxTemplateIF.h b/data/mnet/Common/include/vxTemplate/vxTemplateIF.h
new file mode 100644
index 0000000..c1540ec
--- /dev/null
+++ b/data/mnet/Common/include/vxTemplate/vxTemplateIF.h
@@ -0,0 +1,33 @@
+/********************************************************************
+ *
+ * (c) Copyright Cisco 2000
+ * All Rights Reserved
+ *
+ ********************************************************************/
+
+/********************************************************************
+ *
+ * Version : 1.0
+ * Status : Under development
+ * File : vxTemplateIF.h
+ * Author(s) : Lou Travaglione
+ * Create Date : 8/29/00
+ * Description : Demo I/F header code for vxTemplate directory.
+ *
+ ********************************************************************/
+
+#ifndef _VXTEMPLATEIF_H_
+#define _VXTEMPLATEIF_H_
+
+/*************************************************************
+ *
+ * Module Name: Hello_World
+ *
+ * Function: Demo function for template directory.
+ *
+ *************************************************************/
+
+void Hello_World(void);
+
+
+#endif /* _VXTEMPLATEIF_H_ */ \ No newline at end of file
diff --git a/data/mnet/Common/logging/Makefile b/data/mnet/Common/logging/Makefile
new file mode 100644
index 0000000..bd4611d
--- /dev/null
+++ b/data/mnet/Common/logging/Makefile
@@ -0,0 +1,47 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+# (OPTIONAL) Append REPLACE - Replaces the List of directories
+# to be used in the SUBDIRS variable
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src REPLACE=src
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+SUBDIRS = src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+VOBDIR = $(TOP_OF_VOB)\$(VOB)
+
+# Allows a sub-set of the source code directories to be used
+
+ifneq ($(REPLACE),)
+ SUBDIRS = $(REPLACE)
+endif
+
+include $(VOBDIR)\l3defs.mk
+
+
diff --git a/data/mnet/Common/logging/src/Makefile b/data/mnet/Common/logging/src/Makefile
new file mode 100644
index 0000000..199c21a
--- /dev/null
+++ b/data/mnet/Common/logging/src/Makefile
@@ -0,0 +1,61 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# Name of this App's Directory
+THIS_APP_DIR = logging
+
+VOB2DIR = $(TOP_OF_VOB)\$(VOB)
+BINDIR = ..\bin
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\$(THIS_APP_DIR).out
+else
+ MY_OUTPUT = $(OBJDIR)\$(THIS_APP_DIR).out
+endif
+
+include $(VOB2DIR)\l3defs.mk
+
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) -r -o $@.tmp $(MODULE_OBJS)
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
diff --git a/data/mnet/Common/logging/src/debug.cpp b/data/mnet/Common/logging/src/debug.cpp
new file mode 100644
index 0000000..7f3aa1a
--- /dev/null
+++ b/data/mnet/Common/logging/src/debug.cpp
@@ -0,0 +1,140 @@
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2001
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : debug.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 8/10/01
+// Description :
+//
+// *******************************************************************
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <ctype.h>
+
+#include "dbgfunc.h"
+
+
+/* print debug messages directly to the stdio */
+void dbg_print (char *format, ...)
+{
+ va_list marker;
+ va_start(marker, format); /* Initialize variable arguments. */
+ vprintf (format, marker);
+ fflush (stdout);
+ va_end (marker); /* Reset variable arguments. */
+}
+
+
+/* Put the inbound data in a hex dump format into stdio
+ Arguments:
+ pSrc - input data
+ length - specifies the number of bytes to dump
+ pDest - output buffer */
+void HexDump (unsigned char *buffer, int length)
+{
+ FormatHexDump (buffer, length, NULL);
+}
+
+
+/* Put the inbound data in a hex dump format into the buffer
+ Arguments:
+ pSrc - input data
+ length - specifies the number of bytes to dump
+ pDest - output buffer, if NULL print to stdio */
+void FormatHexDump (unsigned char *pSrc, int length, char *pDest)
+{
+ int size ;
+ int idx ;
+ int dwPos = 0;
+ int offset = 0;
+
+ while (length > 0)
+ {
+ // Take min of 16 or length
+ size = min (16, length);
+
+ // Build text line
+ if (pDest)
+ offset += sprintf (pDest+offset, " %04X ", dwPos);
+ else
+ printf (" %04X ", dwPos);
+
+ for (idx = 0; idx < size; idx++)
+ {
+ if (pDest)
+ offset += sprintf (pDest+offset, "%02X ", pSrc[idx]);
+ else
+ printf ("%02X ", pSrc[idx]);
+ }
+
+ // Add spaces for short lines
+ while (idx < 16)
+ {
+ if (pDest)
+ offset += sprintf (pDest+offset, " ");
+ else
+ printf (" ");
+ idx++;
+ }
+
+ // Add ASCII chars
+ for (idx = 0; idx < size; idx++)
+ {
+ if (pDest)
+ offset += sprintf (pDest+offset, "%c", (isprint(pSrc[idx])) ? pSrc[idx] : '.');
+ else
+ printf ("%c", (isprint(pSrc[idx])) ? pSrc[idx] : '.');
+ }
+
+ if (pDest)
+ offset += sprintf (pDest+offset, "\n");
+ else
+ printf ("\n");
+
+ // Advance positions
+ length -= size;
+ dwPos += size;
+ pSrc += size;
+ }
+}
+
+
+/* Put the inbound data in a plain hex format into the buffer
+ Arguments:
+ pSrc - input data
+ length - specifies the number of bytes to dump
+ pDest - output buffer */
+void PlainHexDump (unsigned char *pSrc, int length, char *pDest)
+{
+ int offset = 0;
+
+ for (int count = 0; count < length; count++)
+ {
+ if (pDest)
+ offset += sprintf (pDest+offset, "%02x ", *(pSrc+count));
+ else
+ printf ("%02x ", *(pSrc+count));
+ }
+
+ if (pDest)
+ offset += sprintf (pDest+offset, "\n");
+ else
+ printf ("\n");
+}
+
+
+void DbgCheckPoint (char * pFile, int line)
+{
+ static unsigned count = 0;
+
+ printf ("Checkpoint num. %u at %s, line %u\n", ++count, pFile, line);
+}
diff --git a/data/mnet/Common/logging/src/logging.cpp b/data/mnet/Common/logging/src/logging.cpp
new file mode 100644
index 0000000..e931ace
--- /dev/null
+++ b/data/mnet/Common/logging/src/logging.cpp
@@ -0,0 +1,901 @@
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : Logging.cpp *
+ * *
+ * Description : Utility functions which can be used by modules in the *
+ * MNET systems for logging and resource tracking *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/18/99 | DSN | Initial version created *
+ * |08/14/01 | Igal | Addded binary hex dump support *
+ * | | | *
+ ****************************************************************************************
+ */
+/*
+ * VxWorks and ANSI C Headers
+ */
+
+#include <assert.h>
+#include <vxworks.h>
+#include <msgqlib.h>
+#include <sockLib.h>
+#include <inetLib.h>
+#include <stdioLib.h>
+#include <strLib.h>
+#include <hostLib.h>
+#include <ioLib.h>
+#include <tasklib.h>
+#include <time.h>
+#include <tickLib.h>
+#include <string.h>
+#include <drv\timer\timerdev.h>
+
+/*
+ * Application Headers
+ */
+#include "logmodules.h"
+#include "dbgfunc.h"
+#include "vclogging.h"
+
+
+/* Length of the formatted */
+#define LOG_FORMATTED_LINE_LENGTH 72
+#define LOG_MAX_OVERHEAD_LENGTH 200
+#define LOG_BUFFER_LENGTH ((VIPERLOG_MAX_OUT_BUFF_LENGTH/16+1)*LOG_FORMATTED_LINE_LENGTH+LOG_MAX_OVERHEAD_LENGTH)
+
+static VIPERLOG_CONFIGURATION *viperlog = NULL;
+
+static char logOutputBuff [LOG_BUFFER_LENGTH];
+
+
+/*
+ * init_log_task
+ */
+void
+init_log_task (void)
+{
+ struct sockaddr_in local_addr;
+
+ if(viperlog != NULL) {
+ printf("ViperLog already initialized!\n");
+ return;
+ }
+
+ sysTimestampEnable();
+
+ viperlog = (VIPERLOG_CONFIGURATION*)malloc(sizeof(VIPERLOG_CONFIGURATION));
+ if (viperlog == NULL) {
+ printf("Unable to allocate memory for ViperLog, aborting!\n");
+ viperlog = NULL;
+ return;
+ }
+
+ memset(viperlog,0,sizeof(VIPERLOG_CONFIGURATION));
+
+ viperlog->log_file_opened = FALSE;
+
+
+ viperlog->log_file = fopen("viperlog.txt","wb");
+
+ if (viperlog->log_file ==NULL) {
+ printf("Unable to open log file for writing!!!\n");
+ viperlog->log_file_opened = FALSE;
+ }
+ else {
+ viperlog->log_file_opened = TRUE;
+ }
+
+ viperlog->log_record_counter = 0;
+
+ if ((viperlog->log_socket = socket (AF_INET, SOCK_DGRAM, 0)) == ERROR) {
+ perror ("socket");
+ printf("Could not create UDP socket for logging!!\n");
+ viperlog->log_socket_opened = FALSE;
+ }
+ else {
+ int optval;
+ char dest_addr_str[128];
+
+ viperlog->log_socket_opened = TRUE;
+
+ setsockopt (viperlog->log_socket, SOL_SOCKET, SO_BROADCAST, (char *)&optval, sizeof (optval));
+ optval = 32768;
+ setsockopt (viperlog->log_socket, SOL_SOCKET, SO_SNDBUF, (char *)&optval, sizeof (optval));
+
+
+ memset((char *)&viperlog->dest_address, 0,sizeof(struct sockaddr_in));
+ viperlog->dest_address.sin_family = AF_INET;
+ viperlog->dest_address.sin_port = htons(VIPERLOG_PORT_NUM);
+ memset(dest_addr_str,0,128);
+ strcpy(dest_addr_str,viperlog_get_network_broadcast_addr());
+ printf("Setting destination address to %s\n",dest_addr_str);
+
+
+ viperlog->dest_address.sin_addr.s_addr = inet_addr(dest_addr_str);
+
+ viperlog->msg_q_id = msgQCreate(VIPERLOG_MAX_MSGS_IN_Q,sizeof(VIPERLOG_PACKET),MSG_Q_FIFO);
+ if (viperlog->msg_q_id == NULL)
+ {
+ printf("Unable to create logging message queue; aborting !!\n");
+ close(viperlog->log_socket);
+ if (viperlog->log_file_opened) fclose(viperlog->log_file);
+ free(viperlog);
+ viperlog = NULL;
+ return;
+ }
+ printf("Logging initialized successfully\n");
+ viperlog->shutdown_message_received = FALSE;
+ }
+}
+
+
+/*
+ * shutdown_log_task
+ */
+void
+shutdown_log_task()
+{
+ viperlog->shutdown_message_received = TRUE;
+}
+
+
+/*
+ * viper_log
+ */
+VOID
+viper_log ()
+{
+ VIPERLOG_PACKET packet;
+ int status;
+ int offset = 0;
+ BOOL output_file, output_console, output_network;
+
+ memset (&packet, 0, sizeof(VIPERLOG_PACKET));
+
+ while (!viperlog->shutdown_message_received)
+ {
+ if (msgQReceive (viperlog->msg_q_id,(char *)&packet,sizeof(VIPERLOG_PACKET),WAIT_FOREVER) != ERROR)
+ {
+ if (packet.magic != VIPERLOG_MSG_MAGIC_NO)
+ {
+ printf ("Invalid debug msg packet received!!\n");
+ }
+ else
+ {
+ // prepare header based on logging parameters
+ output_file = output_console = output_network = FALSE;
+
+ viperlog_get_output_device (packet.module_id, &output_file ,
+ &output_console , &output_network);
+
+ if (output_console | output_network | output_file)
+ {
+ if (packet.data_type == LOG_PLAIN_BINARY)
+ { // processing binary data to the buffer
+ PlainHexDump ((unsigned char *)packet.message, packet.binary_length, logOutputBuff);
+ }
+ else if (packet.data_type == LOG_FORMAT_BINARY)
+ { // processing binary data to the buffer
+ FormatHexDump ((unsigned char *)packet.message, packet.binary_length, logOutputBuff);
+ }
+ else if (packet.data_type == LOG_ASCII)
+ {
+ if (viperlog->console_output_detailed == TRUE)
+ { // prepare detailed log
+ sprintf (logOutputBuff, "%s : %s : %ld-%ld : %015.6f : %s : %s\n",
+ viperlog_get_severity_name((VIPERLOG_SEVERITY)packet.severity_level),
+ viperlog_get_module_name ((LOGGING_MODULE_ID)packet.module_id ),
+ packet.call_id ,
+ packet.tick_count ,
+ packet.timestamp ,
+ packet.function_name,
+ packet.message );
+ }
+ else
+ sprintf (logOutputBuff, "%s\n", packet.message);
+ }
+ else
+ {
+ sprintf (logOutputBuff, "\n");
+ }
+
+ /*
+ * Logging to console
+ */
+ if (output_console)
+ {
+ printf ("%s", logOutputBuff);
+ }
+
+ /*
+ * Logging to file
+ */
+ if (output_file)
+ {
+ if (viperlog->log_file_opened)
+ {
+ fprintf (viperlog->log_file,"%s", logOutputBuff);
+ fflush (viperlog->log_file);
+ viperlog->log_record_counter++;
+
+ if (viperlog->log_record_counter >= VIPERLOG_MAX_RECORDS_IN_FILE)
+ {
+ viperlog->log_record_counter = 0;
+ status = fseek (viperlog->log_file, 0, 0);
+
+ if (status != 0)
+ {
+ printf ("Unable to reset log file pointer to beginning of stream\n");
+ fclose (viperlog->log_file);
+ viperlog->log_file_opened = FALSE;
+ }
+ }
+ }
+ } /* End of if output_file */
+
+ /*
+ * Log to network
+ */
+ if (output_network)
+ {
+ viperlog_send_net_msg (logOutputBuff);
+ }
+ }
+ } /* end of log processing */
+ } /* End of if msgQReceive */
+ } /* End of while loop */
+
+ msgQDelete(viperlog->msg_q_id);
+ close(viperlog->log_socket);
+ fclose(viperlog->log_file);
+ viperlog->log_file = NULL;
+ free(viperlog);
+ viperlog = NULL;
+ return ;
+}
+
+
+/*
+ * viperlog_check_module_filter
+ */
+BOOL
+viperlog_check_module_filter(int module_id, short severity_level)
+{
+ if (module_id >= LOGGING_MAX_MODULES) {
+ printf("Invalid VIPERCELL MODULE specified\n");
+ return(FALSE);
+ }
+ if (viperlog->module_filters[module_id] & severity_level) {
+ return(TRUE);
+ }
+ else {
+ return(FALSE);
+ }
+}
+
+
+/*
+ * viperlog_display_filter_info
+ */
+void
+viperlog_display_filter_info(short filter_value)
+{
+ char display_enabled_buffer[2048],
+ display_disabled_buffer[2048];
+
+ memset(display_enabled_buffer,0,2048);
+ memset(display_disabled_buffer,0,2048);
+
+ strcpy(display_enabled_buffer ,"ENABLED :-");
+ strcpy(display_disabled_buffer,"DISABLED :-");
+
+ if (filter_value & LOG_TO_CONSOLE_MASK) {
+ strcat(display_enabled_buffer,"Console Logging ");
+ }
+ else strcat(display_disabled_buffer,"Console Logging ");
+
+ if (filter_value & LOG_TO_NETWORK_MASK) {
+ strcat(display_enabled_buffer,"Network Logging ");
+ }
+ else strcat(display_disabled_buffer,"Network Logging ");
+
+ if (filter_value & LOG_TO_FILE_MASK) {
+ strcat(display_enabled_buffer,"File Logging ");
+ }
+ else strcat(display_disabled_buffer,"File Logging ");
+
+ if (filter_value & LOG_CONTROL_TRACE_MASK) {
+ strcat(display_enabled_buffer,"Function Tracing ");
+ }
+ else strcat(display_disabled_buffer,"Function Tracing ");
+
+ if (filter_value & LOG_CALL_TRACE_MASK) {
+ strcat(display_enabled_buffer,"Call Traces ");
+ }
+ else strcat(display_disabled_buffer,"Call Traces ");
+
+ if (filter_value & LOG_INFORMATIONAL_MASK) {
+ strcat(display_enabled_buffer,"Traces ");
+ }
+ else strcat(display_disabled_buffer,"Traces ");
+
+ if (filter_value & LOG_WARNINGS_MASK) {
+ strcat(display_enabled_buffer,"Warnings ");
+ }
+ else strcat(display_disabled_buffer,"Warnings ");
+
+ if (filter_value & LOG_ERRORS_MASK) {
+ strcat(display_enabled_buffer,"Errors ");
+ }
+ else strcat(display_disabled_buffer,"Errors ");
+
+ if (filter_value & LOG_TIMESTAMPS) {
+ strcat(display_enabled_buffer,"Timestamps ");
+ }
+ else strcat(display_disabled_buffer,"Timestamps ");
+
+ if (strlen(display_enabled_buffer) == strlen("ENABLED :-")){
+ strcat(display_enabled_buffer," None ");
+ }
+
+ if (strlen(display_disabled_buffer) == strlen("DISABLED :-")) {
+ strcat(display_disabled_buffer," None ");
+ }
+ printf("%s\n",display_enabled_buffer);
+ printf("%s\n",display_disabled_buffer);
+}
+
+
+/*
+ * viperlog_get_output_device
+ */
+void
+viperlog_get_output_device(int module_id,BOOL *output_file,BOOL *output_console,BOOL *output_network)
+{
+ if (module_id >= LOGGING_MAX_MODULES) {
+ printf("Invalid VIPERCELL MODULE specified\n");
+ return;
+ }
+ if (viperlog->module_filters[module_id] & LOG_TO_CONSOLE_MASK) {
+ *output_console = TRUE;
+ }
+
+ if (viperlog->module_filters[module_id] & LOG_TO_NETWORK_MASK) {
+ *output_network = TRUE;
+ }
+ if (viperlog->module_filters[module_id] & LOG_TO_FILE_MASK) {
+ *output_file = TRUE;
+ }
+ return;
+}
+
+
+
+/*
+ * viperlog_get_network_broadcast_addr
+ */
+char *
+viperlog_get_network_broadcast_addr()
+{
+ static char addr_buff[128],interface_name[128];
+ int status;
+
+ memset(addr_buff,0,128);
+ memset(interface_name,0,128);
+
+ strcpy(interface_name,VIPERLOG_HOST_ETHERNET_INTERFACE);
+ status = ifBroadcastGet(interface_name,addr_buff);
+ if (status == ERROR)
+ {
+ printf("Error retrieving interface %s's broadcast address!\n",interface_name);
+ return ("");
+ }
+
+ return(addr_buff);
+}
+
+
+/*
+ * viperlog_get_severity_name
+ */
+char *
+viperlog_get_severity_name(VIPERLOG_SEVERITY severity)
+{
+ static char severity_str[64];
+
+ switch(severity){
+ case LOG_SEVERITY_FUNCTION_TRACE:strcpy(severity_str,"Function Trace" );break;
+ case LOG_SEVERITY_TRACE :strcpy(severity_str,"Trace" );break;
+ case LOG_SEVERITY_CALL_TRACE :strcpy(severity_str,"Call Trace" );break;
+ case LOG_SEVERITY_WARNING :strcpy(severity_str,"Warning" );break;
+ case LOG_SEVERITY_ERROR :strcpy(severity_str,"Error" );break;
+ default :strcpy(severity_str,"Unknown severity");break;
+ }
+
+ return (severity_str);
+}
+
+
+/*
+ * viperlog_get_module_name
+ */
+char *
+viperlog_get_module_name(LOGGING_MODULE_ID id)
+{
+ return(GetLogModuleName(id));
+}
+
+
+/*
+ * viperlog_send_net_msg
+ */
+void
+viperlog_send_net_msg(char *msg_buff)
+{
+ if (!viperlog->log_socket_opened) {
+ return;
+ }
+
+ int msg_size,gap;
+
+ msg_size = strlen(msg_buff);
+
+ msg_size = (msg_size <= VIPERLOG_MAX_NET_PKT_SIZE) ? msg_size : VIPERLOG_MAX_NET_PKT_SIZE;
+
+ /*
+ * We just accumulate as much log data as we can squeeze
+ * into the single largest packet on ethernet, then out it
+ * goes....simple state info retained in the config struct
+ * allows us to keep accumulating data
+ */
+
+ if (viperlog->net_buff_index == 0)
+ {
+ strcpy(viperlog->net_packet,msg_buff);
+ viperlog->net_buff_index = strlen(msg_buff);
+ }
+ else
+ {
+ gap = VIPERLOG_MAX_NET_PKT_SIZE - viperlog->net_buff_index;
+
+ if (gap > msg_size)
+ {
+ strcat(viperlog->net_packet,msg_buff);
+ viperlog->net_buff_index += msg_size;
+ }
+ else
+ {
+ /* We have to flush data to copy the latest arrival */
+ if (sendto(viperlog->log_socket, (char *)viperlog->net_packet,
+ viperlog->net_buff_index, 0,
+ (struct sockaddr *) &viperlog->dest_address,sizeof(struct sockaddr_in)) == ERROR){
+ perror ("sendto");
+ }
+ strcpy(viperlog->net_packet,msg_buff);
+ viperlog->net_buff_index = strlen(msg_buff);
+ }
+ }
+
+ return;
+}
+
+
+/*
+ **************************************************************************
+ * Functions which are externally called (from Shell,etc)
+ **************************************************************************
+ */
+
+/*
+ * ViperLogHelp
+ */
+extern "C" void
+ViperLogHelp()
+{
+ printf("\n******************************************************************************************");
+ printf("\n VIPERLOG HELP");
+ printf("\n******************************************************************************************");
+ printf("\nViperLogSetModuleFilters(moduleId,severityMask): Sets the specified severityMask filter");
+ printf("\n for the specified moduleId");
+ printf("\nViperLogShowModuleFilters(moduleId) : Displays the log filters for moduleId");
+ printf("\nViperLogShowAllFilters() : Displays the log filters for all modules");
+ printf("\nViperLogSetDestAddress(ipAddrStr) : Sets the destination address for logging");
+ printf("\nViperLogSetDestPort(portNo) : Sets the destination port for logging");
+ printf("\nViperLogShowLogModules() : Displays all the log modules & their ids");
+ printf("\nViperLogShowCount() : Displays no of log packets sent so far");
+ printf("\nViperLogSetConsolePrintOptions(BOOL On) : If on displays all information; otherwise");
+ printf("\n displays only message (default)");
+ printf("\nViperLogShowSeverityMask() : Shows the bitmap for severity values");
+ printf("\n******************************************************************************************");
+}
+
+
+/*
+ * ViperLogSetModuleFilters
+ */
+extern "C" void
+ViperLogSetModuleFilters(int module_id,short severity_level)
+{
+ int count;
+ if (module_id == VIPERLOG_ALL_MODULES) {
+ for(count=0;count<LOGGING_MAX_MODULES;count++) {
+ viperlog->module_filters[count] = severity_level;
+ }
+ printf("For ALL MODULES:\n");
+ viperlog_display_filter_info(severity_level);
+ }
+ else {
+ if (module_id >= LOGGING_MAX_MODULES) {
+ printf("Invalid module id specified!\n");
+ return;
+ }
+ viperlog->module_filters[module_id] = severity_level;
+ printf("For MODULE ID %s:\n",viperlog_get_module_name((LOGGING_MODULE_ID)module_id));
+ viperlog_display_filter_info(severity_level);
+ }
+}
+
+
+/*
+ * ViperLogSetGroupFilters
+ */
+extern "C" void
+ViperLogSetGroupFilters(int module_id_begin,int module_id_end,short severity_level)
+{
+ int count;
+ if (module_id_end == VIPERLOG_ALL_MODULES) {
+ for(count=0;count<LOGGING_MAX_MODULES;count++) {
+ viperlog->module_filters[count] = severity_level;
+ }
+ printf("For ALL MODULES:\n");
+ viperlog_display_filter_info(severity_level);
+ }
+ else {
+ if (module_id_begin >= LOGGING_MAX_MODULES) {
+ printf("Invalid module id specified!\n");
+ return;
+ }
+ printf("For MODULE IDs :-\n");
+ for(count=module_id_begin;count<module_id_end;count++) {
+ viperlog->module_filters[count] = severity_level;
+ printf(" %s ",viperlog_get_module_name((LOGGING_MODULE_ID)count));
+ }
+ printf("Logging Filters are set as \n ");
+ viperlog_display_filter_info(severity_level);
+ }
+}
+
+
+/*
+ * ViperLogSetConsolePrintOptions
+ */
+extern "C" void
+ViperLogSetConsolePrintOptions(BOOL ConsolePrintFormatted)
+{
+ if (ConsolePrintFormatted) {
+ printf("Turned ON formatting+additional info for console output of logging\n");
+ viperlog->console_output_detailed = TRUE;
+ }
+ else {
+ printf("Turned OFF formatting+additional info for console output of logging\n");
+ viperlog->console_output_detailed = FALSE;
+ }
+}
+
+
+
+
+/*
+ * ViperLogShowModuleFilters
+ */
+extern "C" void
+ViperLogShowModuleFilters(int module_id)
+{
+ int filter_value = 0;
+ filter_value = viperlog->module_filters[module_id];
+ printf("For MODULE ID %s:\n",viperlog_get_module_name((LOGGING_MODULE_ID)module_id));
+ viperlog_display_filter_info(filter_value);
+}
+
+
+/*
+ * ViperLogSetDestPort
+ */
+void
+ViperLogSetDestPort(int port_no)
+{
+ char ip_addr_str[25];
+ memset(ip_addr_str,0,25);
+ viperlog->dest_address.sin_port = htons(port_no);
+ inet_ntoa_b(viperlog->dest_address.sin_addr,ip_addr_str);
+ printf("Log address now set to %s, port %d\n",ip_addr_str,port_no);
+}
+
+
+/*
+ * ViperLogSetDestAddress
+ */
+void
+ViperLogSetDestAddress(char *ip_address)
+{
+ char ip_addr_str[25];
+ memset(ip_addr_str,0,25);
+ viperlog->dest_address.sin_addr.s_addr = inet_addr(ip_address);
+ inet_ntoa_b(viperlog->dest_address.sin_addr,ip_addr_str);
+ printf("Log address now set to %s, port %d\n",ip_addr_str,
+ ntohs(viperlog->dest_address.sin_port));
+}
+
+
+/*
+ * ViperLogShowSeverityMask
+ */
+extern "C" void
+ViperLogShowSeverityMask()
+{
+ printf("\n***************************************************************************************\n");
+ printf(" Bit mask for log options values\n");
+ printf(" |----|----|----|----|----|----|---|---|---|---|---|---|---|---|---|---|\n");
+ printf(" | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |\n");
+ printf(" |----|----|----|----|----|----|---|---|---|---|---|---|---|---|---|---|\n");
+ printf("\n");
+ printf(" ------------------------------\n");
+ printf(" Bit no | Meaning\n");
+ printf(" -----------------------------\n");
+ printf(" 0 : If set, indicates log to console enabled\n");
+ printf(" 1 : If set, indicates log to network enabled\n");
+ printf(" 2 : If set, indicates log to file enabled\n");
+ printf(" 3 : If set, indicates function tracing required\n");
+ printf(" 4 : If set, indicates call tracing required\n");
+ printf(" 5 : If set, indicates logging of informational messages required\n");
+ printf(" 6 : If set, indicates logging of warnings required\n");
+ printf(" 7 : if set, indicates logging of errors required\n");
+ printf(" 8 : if set, indicates use of timestamps\n");
+ printf(" 9-15 : reserved; unused for now\n");
+ printf("***************************************************************************************\n");
+
+}
+
+
+#define DISPLAY_MODULE_NAME_OFFSET 2
+#define DISPLAY_MODULE_ID_OFFSET 27
+#define DISPLAY_MODULE_INFO_LENGTH 40
+
+/*
+ * ViperLogShowLogModules
+ */
+extern "C" void
+ViperLogShowLogModules()
+{
+ int count,index;
+ char moduleName[128];
+ char displayBuffer[256];
+
+ printf("\nThe following modules are using ViperLog");
+ printf("\n************************************************");
+
+ memset(displayBuffer,0,256);
+ strcpy(&displayBuffer[DISPLAY_MODULE_NAME_OFFSET],"MODULE NAME");
+ strcpy(&displayBuffer[DISPLAY_MODULE_ID_OFFSET],"MODULE ID");
+ for(index=0;index<DISPLAY_MODULE_INFO_LENGTH;index++)
+ if (displayBuffer[index] == 0) displayBuffer[index]= 32;
+ displayBuffer[DISPLAY_MODULE_INFO_LENGTH-1] = 0;
+ printf("\n%s",displayBuffer);
+
+
+ printf("\n************************************************");
+ for(count=0;count<LOGGING_MAX_MODULES;count++) {
+ memset(moduleName,0,128);
+ strcpy(moduleName,viperlog_get_module_name((LOGGING_MODULE_ID)count));
+ if (strstr(moduleName,"UNKNOWN") != NULL) continue;
+ else {
+ memset(displayBuffer,0,256);
+ sprintf(&displayBuffer[DISPLAY_MODULE_NAME_OFFSET],"%s",moduleName);
+ sprintf(&displayBuffer[DISPLAY_MODULE_ID_OFFSET],"%d",count);
+ for(index=0;index<DISPLAY_MODULE_INFO_LENGTH;index++)
+ if (displayBuffer[index] == 0) displayBuffer[index]= 32;
+ displayBuffer[DISPLAY_MODULE_INFO_LENGTH-1] = 0;
+ printf("\n%s",displayBuffer);
+ }
+ }
+ printf("\n************************************************\n");
+}
+
+
+/*
+ * ViperLogShowAllFilters
+ */
+void
+ViperLogShowAllFilters()
+{
+ int count;
+ char moduleName[128];
+ printf("\n************************************************");
+ for(count=0;count<LOGGING_MAX_MODULES;count++) {
+ memset(moduleName,0,128);
+ strcpy(moduleName,viperlog_get_module_name((LOGGING_MODULE_ID)count));
+ if (strcmp(moduleName,"UNKNOWN_LAYER") == 0) continue;
+ else {
+ ViperLogShowModuleFilters((LOGGING_MODULE_ID)count);
+ printf("\n************************************************");
+ }
+ }
+}
+
+
+/*
+ **************************************************************************
+ * DbgOutput class member functions
+ **************************************************************************
+ */
+
+
+/*
+ * DbgOutput::Enter
+ */
+void
+DbgOutput::Enter()
+{
+ if (viperlog==NULL) return;
+ if (viperlog_check_module_filter(m_log_packet.module_id,LOG_SEVERITY_FUNCTION_TRACE) == TRUE) {
+ PreparePacket(LOG_SEVERITY_FUNCTION_TRACE);
+ sprintf(m_log_packet.message,"Entering function %s",m_log_packet.function_name);
+ msgQSend(viperlog->msg_q_id,(char *)&m_log_packet,sizeof(m_log_packet),NO_WAIT,MSG_PRI_NORMAL);
+ }
+}
+
+
+/*
+ * DbgOutput::Leave
+ */
+void
+DbgOutput::Leave()
+{
+ if (viperlog==NULL) return;
+ if (viperlog_check_module_filter(m_log_packet.module_id,LOG_SEVERITY_FUNCTION_TRACE) == TRUE) {
+ PreparePacket(LOG_SEVERITY_FUNCTION_TRACE);
+ sprintf(m_log_packet.message,"Leaving function %s",m_log_packet.function_name);
+ msgQSend(viperlog->msg_q_id,(char *)&m_log_packet,sizeof(m_log_packet),NO_WAIT,MSG_PRI_NORMAL);
+ }
+}
+
+
+/*
+ * DbgOutput::Trace
+ */
+void
+DbgOutput::Trace(char *format,...)
+{
+ if (viperlog==NULL) return;
+
+ if (viperlog_check_module_filter(m_log_packet.module_id,LOG_SEVERITY_TRACE) == TRUE) {
+ PreparePacket(LOG_SEVERITY_TRACE);
+ va_list argument_list;
+ va_start(argument_list,format);
+ vsprintf(m_log_packet.message,format,argument_list);
+ va_end(argument_list);
+ msgQSend(viperlog->msg_q_id,(char *)&m_log_packet,sizeof(m_log_packet),NO_WAIT,MSG_PRI_NORMAL);
+ }
+}
+
+
+/*
+ * DbgOutput::Warning
+ */
+void
+DbgOutput::Warning(char *format,...)
+{
+ if (viperlog==NULL) return;
+
+ if (viperlog_check_module_filter(m_log_packet.module_id,LOG_SEVERITY_WARNING) == TRUE) {
+ PreparePacket(LOG_SEVERITY_WARNING);
+ va_list argument_list;
+ va_start(argument_list,format);
+ vsprintf(m_log_packet.message,format,argument_list);
+ va_end(argument_list);
+ msgQSend(viperlog->msg_q_id,(char *)&m_log_packet,sizeof(m_log_packet),NO_WAIT,MSG_PRI_NORMAL);
+ }
+}
+
+
+/*
+ * DbgOutput::Error
+ */
+void
+DbgOutput::Error(char *format,...)
+{
+ if (viperlog==NULL) return;
+
+ if (viperlog_check_module_filter(m_log_packet.module_id,LOG_SEVERITY_ERROR) == TRUE)
+ {
+ PreparePacket(LOG_SEVERITY_ERROR);
+ va_list argument_list;
+ va_start(argument_list,format);
+ vsprintf(m_log_packet.message,format,argument_list);
+ va_end(argument_list);
+ msgQSend(viperlog->msg_q_id,(char *)&m_log_packet,sizeof(m_log_packet),NO_WAIT,MSG_PRI_NORMAL);
+ }
+}
+
+
+/*
+ * DbgOutput::CallTrace
+ */
+void
+DbgOutput::CallTrace(unsigned long call_id,char *format,...)
+{
+ if (viperlog==NULL) return;
+
+ if (viperlog_check_module_filter(m_log_packet.module_id,LOG_SEVERITY_CALL_TRACE) == TRUE)
+ {
+ PreparePacket (LOG_SEVERITY_CALL_TRACE);
+ va_list argument_list;
+ va_start (argument_list, format);
+ vsprintf (m_log_packet.message , format,argument_list);
+ va_end (argument_list);
+ m_log_packet.call_id = call_id;
+ msgQSend (viperlog->msg_q_id,(char *)&m_log_packet,sizeof(m_log_packet),NO_WAIT,MSG_PRI_NORMAL);
+ }
+}
+
+
+/*
+ * DbgOutput::HexDump
+ */
+void
+DbgOutput::HexDump (unsigned char *pSrc, int byteCount, bool bFormat)
+{
+ if (viperlog == NULL || byteCount <= 0) return;
+
+ if (viperlog_check_module_filter (m_log_packet.module_id, LOG_SEVERITY_TRACE) == TRUE)
+ {
+ int tmpCount = byteCount;
+ unsigned char *pData = pSrc ;
+
+ PreparePacket (LOG_SEVERITY_TRACE, byteCount, bFormat);
+
+ while (tmpCount > 0)
+ { // take care of overflow
+ m_log_packet.binary_length = (tmpCount < VIPERLOG_MAX_DEBUG_MSG_LEN)
+ ? tmpCount : VIPERLOG_MAX_DEBUG_MSG_LEN;
+
+ memcpy (m_log_packet.message, pData, m_log_packet.binary_length);
+
+ msgQSend (viperlog->msg_q_id ,
+ (char *)&m_log_packet ,
+ sizeof(m_log_packet) ,
+ NO_WAIT, MSG_PRI_NORMAL);
+
+ tmpCount -= VIPERLOG_MAX_DEBUG_MSG_LEN;
+ pData += VIPERLOG_MAX_DEBUG_MSG_LEN;
+ }
+ }
+}
+
+
+/*
+ * DbgOutput::PreparePacket
+ */
+void
+DbgOutput::PreparePacket (short severity_level, int binLength, bool bFormat)
+{
+ m_log_packet.severity_level = severity_level ;
+ m_log_packet.magic = VIPERLOG_MSG_MAGIC_NO ;
+ m_log_packet.timestamp = sysTimestamp () ;
+ m_log_packet.tick_count = tickGet () ;
+ m_log_packet.call_id = VIPERLOG_NULL_CALL_ID ;
+ m_log_packet.binary_length = binLength ;
+ m_log_packet.data_type = (!binLength) ? LOG_ASCII // ASCII
+ : (bFormat ) ? LOG_FORMAT_BINARY // Formatted HEX
+ : LOG_PLAIN_BINARY ; // Plain HEX
+}
+
diff --git a/data/mnet/Common/netBuffer/Makefile b/data/mnet/Common/netBuffer/Makefile
new file mode 100644
index 0000000..085621b
--- /dev/null
+++ b/data/mnet/Common/netBuffer/Makefile
@@ -0,0 +1,34 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1: make all VOB=GS -
+# Places .out in VOB/bin directory
+#
+# Case 2: make all VOB=GS APPDIR=Host\netBuffer\bin -
+# Places .o file(s) in VOB/$(APPDIR) directory.
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+SUBDIRS = src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..
+
+VOBDIR = $(TOP_OF_VOB)/../$(VOB)
+
+# Allows a sub-set of the source code directories to be used
+
+ifneq ($(REPLACE),)
+ SUBDIRS = $(REPLACE)
+endif
+
+include $(VOBDIR)\l3defs.mk
+
+
diff --git a/data/mnet/Common/netBuffer/src/Makefile b/data/mnet/Common/netBuffer/src/Makefile
new file mode 100644
index 0000000..1c1a8f7
--- /dev/null
+++ b/data/mnet/Common/netBuffer/src/Makefile
@@ -0,0 +1,61 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GS -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GS APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GS APPDIR=Host\netBuffer\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+# Name of this App's Directory
+THIS_APP_DIR = netBuffer
+
+VOB2DIR = $(TOP_OF_VOB)\..\$(VOB)
+BINDIR = ..\bin
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\(THIS_APP_DIR)_com.out
+else
+ MY_OUTPUT = $(OBJDIR)\$(THIS_APP_DIR)_com.out
+endif
+
+include $(VOB2DIR)\l3defs.mk
+
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) -r -o $@.tmp $(MODULE_OBJS)
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
diff --git a/data/mnet/Common/netBuffer/src/NetBuffer.cpp b/data/mnet/Common/netBuffer/src/NetBuffer.cpp
new file mode 100644
index 0000000..2cbd45f
--- /dev/null
+++ b/data/mnet/Common/netBuffer/src/NetBuffer.cpp
@@ -0,0 +1,407 @@
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : NetBuffer.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 12/29/00
+// Description : NetBuffer class implementation. Utilisation of the
+// buffering using m-Block concept.
+//
+// *******************************************************************
+
+
+#include "NetBuffer.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <usrLib.h>
+
+extern "C" void netPoolShow (NET_POOL_ID pNetPool);
+
+#include "bufConfig.h"
+
+
+//===================================================================
+// Static Data members definition
+//===================================================================
+
+NetBuffer *NetBuffer::pNetBuff_ = NULL;
+unsigned NetBuffer::poolNum_ = 0 ;
+
+
+M_CL_CONFIG NetBuffer::mClBlkConfig_ =
+{
+/* mBlkNum clBlkNum memArea memsize */
+/* ------- ---------- ---------- ---------- */
+ CALC_VALUE, CALC_VALUE, CALC_VALUE, CALC_VALUE
+};
+
+
+
+//===================================================================
+// Constructors & Destractor
+//===================================================================
+
+NetBuffer::NetBuffer ()
+ :pNetPool_ (NULL),
+ mutex ()
+{
+ int index = 0;
+ int clDescTblNumEnt ;
+
+ mutex.take ();
+
+ // allocate memory for mBlk and clBlk pools
+ if ((mClBlkConfig_.memArea=(char *)malloc(mClBlkConfig_.memSize)) == NULL)
+ {
+ printf ("FATAL ERROR (netPoolInit):Unable to allocate memory for block pools\n");
+ printErrno (0);
+ return;
+ }
+
+ // allocate memory for cluster pools
+ for (index = 0; index < poolNum_; ++index)
+ {
+ if ((clDescTbl_[index].memArea=(char *)malloc(clDescTbl_[index].memSize)) == NULL)
+ {
+ printf ("FATAL ERROR (netPoolInit):Unable to allocate memory for memory cluster pools\n");
+ printErrno (0);
+ return;
+ }
+ }
+
+ clDescTblNumEnt = NELEMENTS(clDescTbl_);
+
+ pNetPool_ = &netPool_;
+
+ if (netPoolInit (pNetPool_, &mClBlkConfig_, &clDescTbl_[0], clDescTblNumEnt, NULL) != OK)
+ {
+ printf ("FATAL ERROR (netPoolInit): Unable to initialize buffer pool.\n");
+ printErrno (0);
+ }
+
+ mutex.give();
+}
+
+
+NetBuffer::~NetBuffer ()
+{
+ int index ;
+
+ /* delete network pool */
+ if (netPoolDelete (pNetPool_) != OK)
+ {
+ printErrno (0);
+ }
+
+ /* release allocated memory */
+
+ // mBlk and clBlk pools
+ if (mClBlkConfig_.memArea)
+ {
+ free (mClBlkConfig_.memArea);
+ }
+
+ // cluster pools
+ for (index = 0; index < poolNum_; ++index)
+ {
+ if (clDescTbl_[index].memArea)
+ free (clDescTbl_[index].memArea);
+ }
+}
+
+
+//===================================================================
+// primary behavioural methods
+//===================================================================
+
+NetBuffer *NetBuffer::getInstance()
+{
+ return ((pNetBuff_) ? pNetBuff_ : init());
+}
+
+
+void NetBuffer::release ()
+{
+ if (pNetBuff_)
+ {
+ delete pNetBuff_;
+ pNetBuff_ = NULL;
+ poolNum_ = 0 ;
+ }
+}
+
+
+// allocate mBlk->clBlk->cluster from the pool
+// returns zero on error
+unsigned NetBuffer::getBuffer (unsigned bufSize, BUFFER_ID& pMBlk)
+{
+ unsigned retVal = 0;
+
+ if (isInit ())
+ {
+ // M_BLK_ID netTupleGet (
+ // NET_POOL_ID pNetPool, /* pointer to the net pool */
+ // int bufSize , /* size of the buffer to get */
+ // int canWait , /* wait or dontwait */
+ // UCHAR type, , /* type of data */
+ // BOOL bestFit ) /* TRUE/FALSE */
+
+ mutex.take ();
+ retVal = ((pMBlk=netTupleGet(pNetPool_,bufSize,M_DONTWAIT,MT_DATA,FALSE)) != NULL)
+ ? pMBlk->pClBlk->clSize
+ : 0 ;
+ mutex.give ();
+
+#ifdef __STDIOUT
+ if (retVal)
+ printf ("Buffers: allocated new block: ID %p, Pool ID %p, Ref.Count %u\n",
+ pMBlk, pMBlk->pClBlk->pNetPool, pMBlk->pClBlk->clRefCnt);
+#endif //__STDIOUT
+ }
+ else
+ pMBlk = NULL;
+
+ return (retVal);
+}
+
+
+unsigned NetBuffer::getBufferSize (BUFFER_ID pSrc)
+{
+ unsigned retVal = 0;
+
+ if (isValidBuffer(pSrc))
+ retVal = pSrc->pClBlk->clSize;
+
+ return (retVal);
+}
+
+
+bool NetBuffer::duplicateBuffer (BUFFER_ID pSrc, BUFFER_ID& pDest)
+{
+ bool retVal = false;
+
+ if (isValidBuffer (pSrc))
+ {
+ pDest = netMblkGet(pNetPool_,M_WAIT,pDest->mBlkHdr.mType);
+
+ // allocate new mBlock
+ if (pDest != NULL)
+ {
+ mutex.take ();
+ retVal = ((pDest=netMblkDup(pSrc, pDest)) != NULL);
+ mutex.give ();
+
+#ifdef __STDIOUT
+ if (retVal)
+ printf ("Buffers: allocated duplicated block: ID %p, Pool ID %p, Ref.Count %u\n",
+ pDest, pDest->pClBlk->pNetPool, pDest->pClBlk->clRefCnt);
+#endif // __STDIOUT
+ }
+ }
+ else
+ pDest = NULL;
+
+ return (retVal);
+}
+
+
+bool NetBuffer::freeBuffer (BUFFER_ID pMblk)
+{
+ bool retVal = false;
+
+ if (isValidBuffer(pMblk))
+ {
+#ifdef __STDIOUT
+ printf ("Buffers: releasing buffer ID %p, Pool ID %p, Ref.Count %u\n",
+ pMblk, pMblk->pClBlk->pNetPool, pMblk->pClBlk->clRefCnt);
+#endif // __STDIOUT
+
+ mutex.take ();
+ netMblkClFree (pMblk);
+ mutex.give ();
+ retVal = true;
+ }
+
+ return (retVal);
+}
+
+
+// Return pointer to the data and the data length
+// Returns NULL on error
+char *NetBuffer::getDataPtr (BUFFER_ID pMblk, unsigned& dataLen)
+{
+ char * pRetVal = NULL;
+
+ if (isValidBuffer (pMblk))
+ {
+ dataLen = pMblk->mBlkHdr.mLen ;
+ pRetVal = pMblk->mBlkHdr.mData;
+ }
+ else
+ dataLen = 0;
+
+ return (pRetVal);
+}
+
+
+bool NetBuffer::getDataSize (BUFFER_ID pMblk, unsigned& dataLen)
+{
+ bool retVal = false;
+
+ if (isValidBuffer (pMblk))
+ {
+ dataLen = pMblk->mBlkHdr.mLen ;
+ retVal = true;
+ }
+ else
+ dataLen = 0;
+
+ return (retVal);
+}
+
+
+bool NetBuffer::setDataSize (BUFFER_ID pMblk, unsigned dataLen)
+{
+ bool retVal = false;
+
+ if (isValidBuffer(pMblk))
+ {
+#ifdef __STDIOUT
+ printf ("Buffers: set size: Block ID %p, Pool ID %p, Cluster size %u, Data size %u\n",
+ pMblk, pMblk->pClBlk->pNetPool, pMblk->pClBlk->clSize, dataLen);
+#endif //__STDIOUT
+
+ pMblk->mBlkHdr.mLen = dataLen;
+ retVal = true;
+ }
+
+ return (retVal);
+}
+
+
+// Copy data from the user buffer to the memory cluster
+// If the data length > than the cluster size, returns false. Data is not copied
+bool NetBuffer::setData (BUFFER_ID pMblk, unsigned dataLen, char *pBuff)
+{
+ bool retVal = false;
+
+ if (isValidBuffer (pMblk) &&
+ dataLen <= pMblk->pClBlk->clSize )
+ {
+#ifdef __STDIOUT
+ printf ("Buffers: set size: Block ID %p, Pool ID %p, Cluster size %u Data size %u\n",
+ pMblk, pMblk->pClBlk->pNetPool, pMblk->pClBlk->clSize, dataLen);
+#endif //__STDIOUT
+
+ memcpy (pMblk->mBlkHdr.mData, pBuff, dataLen);
+ pMblk->mBlkHdr.mLen = dataLen ;
+ retVal = true ;
+ }
+
+ return (retVal);
+}
+
+
+// Copy data from the memory cluster to the user buffer
+// If the user buffer is smaller than the actual size of the received data,
+// only part of the data is copied, the actual size of the data is returned using dataLen
+// and returns false.
+bool NetBuffer::getData (BUFFER_ID pMblk, unsigned& dataLen, char *pBuff, unsigned maxLen)
+{
+ bool retVal = false;
+ unsigned tmpLen ;
+
+ if (isValidBuffer (pMblk))
+ {
+ if (retVal = (pMblk->mBlkHdr.mLen <= maxLen))
+ {
+ dataLen = netMblkToBufCopy (pMblk, pBuff, NULL);
+ }
+ else
+ {
+ memcpy (pBuff, pMblk->mBlkHdr.mData, maxLen);
+ dataLen = pMblk->mBlkHdr.mLen ;
+ }
+ }
+
+ return (retVal);
+}
+
+
+void NetBuffer::printInfo ()
+{
+ if (isInit ())
+ {
+ netPoolShow (getInstance()->pNetPool_);
+ }
+ else
+ printf ("NetBuffer subsystem is not initialized\n");
+}
+
+//===================================================================
+// private methods
+//===================================================================
+
+NetBuffer *NetBuffer::init ()
+{
+ int index = 0;
+ unsigned uNum = 0;
+
+ if (!pNetBuff_)
+ {
+ poolNum_ = NELEMENTS(clDescTbl_);
+
+ // Calculate the total number of required clBlks
+ for (index = 0; index < poolNum_; ++index)
+ {
+ uNum += clDescTbl_[index].clNum;
+ }
+
+ mClBlkConfig_.clBlkNum = uNum;
+
+ uNum = NETBUFF_M_BLK_NUM;
+
+ // allocated number of mBlks >= number of clBlks
+ mClBlkConfig_.mBlkNum = (uNum >= mClBlkConfig_.clBlkNum) ? uNum : mClBlkConfig_.clBlkNum;
+
+ // calculate pool size according to the required number of mBlks and clBlks
+ mClBlkConfig_.memSize = (mClBlkConfig_.mBlkNum * (M_BLK_SZ + sizeof(long)))
+ + mClBlkConfig_.clBlkNum * CL_BLK_SZ;
+
+#ifdef __STDIOUT
+ printf ("Buffers: allocate %u mBlocks, %u Cluster Blocks (ratio %.2f), %u pools\n",
+ mClBlkConfig_.mBlkNum, mClBlkConfig_.clBlkNum,
+ ((double)(mClBlkConfig_.mBlkNum))/mClBlkConfig_.clBlkNum, poolNum_);
+#endif //__STDIOUT
+
+ // calculate memory size for the pool of clusters
+ for (index = 0; index < poolNum_; ++index)
+ {
+ clDescTbl_[index].memSize = (clDescTbl_[index].clNum * (clDescTbl_[index].clSize + sizeof(long)));
+ }
+
+ pNetBuff_ = new NetBuffer;
+ }
+
+ return (pNetBuff_);
+}
+
+
+//===================================================================
+// Shell accessible methods
+//===================================================================
+
+void netBufPrintInfo (void)
+{
+ NetBuffer::printInfo ();
+}
+
diff --git a/data/mnet/Common/rsa/src_stub/makefile b/data/mnet/Common/rsa/src_stub/makefile
new file mode 100644
index 0000000..f100ec5
--- /dev/null
+++ b/data/mnet/Common/rsa/src_stub/makefile
@@ -0,0 +1,61 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+# Name of this App's Directory
+THIS_APP_DIR = rsa
+
+VOB2DIR = $(TOP_OF_VOB)\..\$(VOB)
+BINDIR = ..
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\sslc.out
+else
+ MY_OUTPUT = $(OBJDIR)\ssl_stub.out
+endif
+
+include $(VOB2DIR)\l3defs.mk
+
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) -r -o $@.tmp $(MODULE_OBJS)
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
diff --git a/data/mnet/Common/rsa/src_stub/ssl_stub.c b/data/mnet/Common/rsa/src_stub/ssl_stub.c
new file mode 100644
index 0000000..d230440
--- /dev/null
+++ b/data/mnet/Common/rsa/src_stub/ssl_stub.c
@@ -0,0 +1,257 @@
+/* *******************************************************************
+//
+// (c) Copyright Cisco Systems, Inc 2001
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 2.0
+// Status : Under development
+// File : ssl_stub.cpp
+
+// Description : Implementation stub functions SSL
+//
+// *******************************************************************/
+#define FLAT_INC
+#define OPT_32_BIT
+#include "rsa\ssl.h"
+#include "rsa\des.h"
+#include "rsa\x509.h"
+
+int isSSL (void)
+{
+ return (0);
+}
+
+int SSL_library_init (void)
+{
+ return 0;
+}
+
+
+SSL_METHOD *SSLv3_method (void)
+{
+ return (SSL_METHOD *)NULL;
+}
+
+SSL_CTX *SSL_CTX_new (SSL_METHOD *meth)
+{
+ return (SSL_CTX *)NULL;
+}
+
+int SSL_CTX_use_certificate_file (SSL_CTX *ctx, char *file, int type)
+{
+ return 0;
+}
+
+void SSL_CTX_set_default_passwd_cb (SSL_CTX *ctx,int (*cb)())
+{
+}
+
+int SSL_CTX_use_PrivateKey_file (SSL_CTX *ctx, char *file, int type)
+{
+ return 0;
+}
+
+int SSL_CTX_load_verify_locations (SSL_CTX *ctx,char *CAfile,char *CApath)
+{
+ return 0;
+}
+
+void SSL_set_verify_depth (SSL *ssl, int depth)
+{
+ return;
+}
+
+void RAND_seed ( unsigned char *buf,int num)
+{
+ return;
+}
+
+int SSL_CTX_set_cipher_list (SSL_CTX *ctx, char *str)
+{
+ return 0;
+}
+
+int SSL_CTX_set_session_id_context (SSL_CTX *ctx,const unsigned char *sid_ctx,
+ unsigned int sid_ctx_len)
+{
+ return 0;
+}
+
+RSA * RSA_generate_key (int bits, unsigned long e,
+ void (*callback)(int,int,char *),char *cb_arg)
+{
+ return (RSA *)NULL;
+}
+
+long SSL_CTX_ctrl(SSL_CTX *ctx,int cmd, long larg, char *parg)
+{
+ return 0;
+}
+
+
+void RSA_free(RSA *rsa)
+{
+ return;
+}
+
+
+void SSL_CTX_free (SSL_CTX *ctx)
+{
+ return;
+}
+
+
+SSL * SSL_new(SSL_CTX *ctx)
+{
+ return (SSL *) NULL;
+}
+
+int SSL_set_session(SSL *ssl, SSL_SESSION *sess)
+{
+ return 0;
+}
+
+BIO *BIO_new_socket(SIO_SOCK sock, int close_flag)
+{
+ return (BIO *)NULL;
+}
+
+void SSL_set_bio(SSL *ssl, BIO *rbio,BIO *wbio)
+{
+ return;
+}
+
+
+int SSL_shutdown(SSL *ssl)
+{
+ return 0;
+}
+
+int SSL_clear(SSL *s)
+{
+ return 0;
+}
+
+void SSL_free(SSL *ssl)
+{
+ return;
+}
+
+void SSL_set_connect_state(SSL *ssl)
+{
+}
+
+void SSL_set_accept_state(SSL *ssl)
+{
+}
+
+int SSL_set_cipher_list(SSL *ssl, char *str)
+{
+ return 0;
+}
+
+long SSL_get_verify_result(SSL *ssl)
+{
+ return 0;
+}
+
+void SSL_CTX_set_verify(SSL_CTX *ctx,int mode,int (*callback)())
+{
+}
+
+int SSL_connect(SSL *ssl)
+{
+ return 0;
+}
+
+int SSL_get_error(SSL *ssl,int ret_code)
+{
+ return 0;
+}
+
+char * SSL_CIPHER_get_name(SSL_CIPHER *cipher)
+{
+ return (char *)0;
+}
+
+
+int SSL_accept(SSL *ssl)
+{
+ return 0;
+}
+
+int SSL_read(SSL *ssl,char *buffer,int num)
+{
+ return 0;
+}
+
+int SSL_write(SSL *ssl,char *buffer,int num)
+{
+ return 0;
+}
+
+SSL_CIPHER *SSL_get_current_cipher(SSL *ssl)
+{
+ return (SSL_CIPHER *)0;
+}
+
+int des_key_sched(des_cblock *key,des_key_schedule schedule)
+{
+ return 0;
+}
+
+void des_ecb_encrypt (des_cblock *input,des_cblock *output,
+ des_key_schedule ks,int enc)
+{
+ return;
+}
+
+void ERR_print_errors_fp(FILE *fp)
+{
+ return;
+}
+
+X509_NAME * X509_get_subject_name(X509 *x509)
+{
+ return (X509_NAME *) 0;
+}
+
+char *X509_NAME_oneline(X509_NAME *xn,char *buf,int size)
+{
+ return (char *) 0;
+}
+
+int SSL_SESSION_print_fp(FILE *fp, SSL_SESSION *sess)
+{
+ return (0);
+}
+
+SSL_SESSION *SSL_get_session(SSL *ssl)
+{
+ return (NULL);
+}
+
+void SSL_CTX_set_verify_depth (SSL_CTX *ctx, int depth)
+{
+ return;
+}
+
+int SSL_CTX_check_private_key(SSL_CTX *ctx)
+{
+ return (0);
+}
+
+
+void BIO_free_all(BIO *bio)
+{
+ return;
+}
+
+int BIO_free(BIO *bio)
+{
+ return (0);
+}
diff --git a/data/mnet/Common/snmp/Asn1/mnet-traps.mib b/data/mnet/Common/snmp/Asn1/mnet-traps.mib
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/data/mnet/Common/snmp/Asn1/mnet-traps.mib
diff --git a/data/mnet/Common/snmp/Makefile b/data/mnet/Common/snmp/Makefile
new file mode 100644
index 0000000..45ecbc7
--- /dev/null
+++ b/data/mnet/Common/snmp/Makefile
@@ -0,0 +1,47 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+# (OPTIONAL) Append REPLACE - Replaces the List of directories
+# to be used in the SUBDIRS variable
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src REPLACE="src_api src_debug"
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+SUBDIRS = src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..
+
+VOBDIR = $(TOP_OF_VOB)/../$(VOB)
+
+# Allows a sub-set of the source code directories to be used
+
+ifneq ($(REPLACE),)
+ SUBDIRS = $(REPLACE)
+endif
+
+include $(VOBDIR)\l3defs.mk
+
+
diff --git a/data/mnet/Common/snmp/src/Makefile b/data/mnet/Common/snmp/src/Makefile
new file mode 100644
index 0000000..483efac
--- /dev/null
+++ b/data/mnet/Common/snmp/src/Makefile
@@ -0,0 +1,63 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+# Name of this App's Directory
+THIS_APP_DIR = snmp
+
+VOB2DIR = $(TOP_OF_VOB)\..\$(VOB)
+BINDIR = ..\bin
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\snmp_com.out
+else
+ MY_OUTPUT = $(OBJDIR)\snmp_com.out
+endif
+
+
+include $(VOB2DIR)\l3defs.mk
+
+CC_INCLUDE += -I$(VOB2DIR)\Host
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) -r -o $@.tmp $(MODULE_OBJS)
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
diff --git a/data/mnet/Common/snmp/src/api_init.c b/data/mnet/Common/snmp/src/api_init.c
new file mode 100644
index 0000000..5c783f8
--- /dev/null
+++ b/data/mnet/Common/snmp/src/api_init.c
@@ -0,0 +1,85 @@
+#include <stdlib.h>
+#include "oam_trap.h"
+
+static ListHeadPtr OamTrapTableHead = NULL;
+static SEM_ID OamApiMutex = NULL;
+
+int oamApiDebugLevel= 0;
+
+STATUS oam_initApi(int debugLevel)
+{
+ if (OamTrapTableHead == NULL)
+ {
+ OamTrapTableHead = oam_newListHead();
+ /* create a binary semaphore that is initially full
+ * Tasks block on semaphore wait in priority order
+ */
+#if (defined(VXWORKS))
+ OamApiMutex = semBCreate(SEM_Q_PRIORITY, SEM_FULL);
+#endif
+
+ }
+ oamApiDebugLevel = debugLevel;
+
+ return STATUS_OK;
+}
+
+
+ListHeadPtr oam_getTrapTableHead()
+{
+ if ( OamTrapTableHead == NULL)
+ oam_initApi(0);
+ return OamTrapTableHead;
+}
+
+
+STATUS aom_cleanOamApi()
+{
+ if (OamTrapTableHead != NULL)
+ {
+ ListNodePtr list = OamTrapTableHead->first;
+ ListNodePtr node;
+ while(list != NULL)
+ {
+ node = list;
+ list =list->next;
+ free(node);
+ }
+ free(OamTrapTableHead);
+#if (defined(VXWORKS))
+ semDelete(OamApiMutex);
+#endif
+ }
+ return STATUS_OK;
+}
+
+ListHeadPtr oam_newListHead()
+{
+ ListHeadPtr hp = (ListHeadPtr) malloc(sizeof(ListHead));
+ if (hp != NULL)
+ {
+ hp->first = NULL;
+ hp->last = NULL;
+ hp->nodeCount = 0;
+ }
+ return hp;
+}
+
+void oam_lockMutex()
+{
+#if (defined(VXWORKS))
+ if (OamApiMutex != NULL)
+ semTake(OamApiMutex, WAIT_FOREVER);
+#endif
+}
+
+void oam_unlockMutex()
+{
+#if (defined(VXWORKS))
+ if (OamApiMutex != NULL)
+ semGive(OamApiMutex);
+#endif
+}
+
+
+
diff --git a/data/mnet/Common/snmp/src/link_list.c b/data/mnet/Common/snmp/src/link_list.c
new file mode 100644
index 0000000..8e5a849
--- /dev/null
+++ b/data/mnet/Common/snmp/src/link_list.c
@@ -0,0 +1,316 @@
+#include <stdlib.h>
+#include <oam_trap.h>
+
+
+ListNodePtr oam_newListNode(MibTag tag, MSG_Q_ID qid)
+{
+ ListNodePtr newNode = (ListNodePtr) malloc (sizeof (ListNode));
+ if (newNode != NULL)
+ {
+ newNode->tag = tag;
+ newNode->qid = qid;
+ newNode->next = NULL;
+ }
+
+ return newNode;
+}
+
+
+STATUS oam_insertNode(ListHeadPtr head, ListNodePtr aNode)
+{
+ if (head != NULL && aNode != NULL)
+ {
+ if (head->first == NULL)
+ {
+ head->first = head->last = aNode;
+ head->nodeCount = 1;
+ } else {
+
+ aNode->next = head->first;
+ head->first = aNode;
+ ++head->nodeCount;
+ }
+ return OK;
+ }
+ return STATUS_INVALID_PARAMS;
+
+}
+
+STATUS oam_insertNodeSortedByTag(ListHeadPtr head, ListNodePtr aNode)
+{
+
+ ListNodePtr prevNode, curNode;
+ int tblId;
+
+ if ( head != NULL && aNode != NULL)
+ {
+
+ prevNode = NULL;
+ curNode = head->first;
+ tblId = MIB_TBL(aNode->tag);
+
+ while( (curNode != NULL) && ((MIB_TBL(curNode->tag) < tblId )
+ || ((MIB_TBL(curNode->tag) == tblId )
+ && (curNode->mid <= aNode->mid ))))
+
+ {
+ prevNode = curNode;
+ curNode = curNode->next;
+ }
+
+
+ if (prevNode == NULL)
+ {
+ /* insert at the beginning */
+ aNode->next = head->first;
+ head->first = aNode;
+ } else {
+
+ aNode->next = curNode;
+ prevNode->next = aNode;
+ }
+
+ if (curNode == NULL)
+ {
+ /* insert at the end */
+ head->last = aNode;
+ }
+
+ ++head->nodeCount;
+ return OK;
+ }
+ return STATUS_INVALID_PARAMS;
+
+}
+
+
+STATUS oam_appendNode(ListHeadPtr head, ListNodePtr aNode)
+{
+
+ if (head != NULL && aNode != NULL)
+ {
+ aNode->next = NULL;
+ if (head->last == NULL)
+ {
+ head->first = head->last = aNode;
+ head->nodeCount = 1;
+ } else {
+
+ head->last->next = aNode;
+ head->last = aNode;
+ ++head->nodeCount;
+ }
+ return OK;
+ }
+ return STATUS_INVALID_PARAMS;
+}
+
+ListNodePtr oam_getNodeByID(ListHeadPtr head, MSG_Q_ID id)
+{
+
+ ListNodePtr tempNode = NULL;
+
+ if(head != NULL)
+ {
+ tempNode = head->first;
+
+ while(tempNode != NULL)
+ {
+ if (tempNode->qid == id)
+ break;
+ tempNode = tempNode->next;
+ }
+ }
+ return tempNode;
+}
+
+ListNodePtr oam_getFirstNodeByTag(ListHeadPtr head, INT_32_T tag)
+{
+
+ ListNodePtr tempNode = NULL;
+ int tblId = MIB_TBL(tag);
+
+ if(head != NULL)
+ {
+ tempNode = head->first;
+
+ while(tempNode != NULL)
+ {
+ if (MIB_TBL(tempNode->tag) >= tblId)
+ break;
+ tempNode = tempNode->next;
+ }
+ }
+ return tempNode;
+}
+
+
+STATUS oam_deleteNode(ListHeadPtr head, MibTag tag, OCTET_T mid)
+{
+
+ ListNodePtr prevNode, curNode;
+ int tblId = MIB_TBL(tag);
+
+
+ if ( head != NULL)
+ {
+ prevNode = NULL;
+ curNode = head->first;
+
+ /* skip until table id is smaller than the current one */
+ while(curNode != NULL && (MIB_TBL(curNode->tag) < tblId))
+ {
+ prevNode = curNode;
+ curNode = curNode->next;
+
+ }
+
+ /* search for the module Id and tag */
+ while(curNode != NULL && (MIB_TBL(curNode->tag) == tblId) && (curNode->mid != mid) && (curNode->tag != tag))
+ {
+
+ prevNode = curNode;
+ curNode = curNode->next;
+
+ }
+
+ if (curNode != NULL && (MIB_TBL(curNode->tag) == tblId))
+ {
+
+ /* Node found */
+
+ if(curNode == head->first || curNode == head->last)
+ {
+ if ( curNode == head->first)
+ {
+ head->first = head->first->next;
+ }
+ if (curNode == head->last)
+ {
+ head->last = prevNode;
+ if(prevNode != NULL)
+ prevNode->next = NULL;
+ }
+ } else {
+ prevNode->next = curNode->next;
+ }
+
+ --head->nodeCount;
+ free(curNode);
+ return OK;
+ }
+ return STATUS_NOT_FOUND;
+ }
+ return STATUS_INVALID_PARAMS;
+
+}
+
+STATUS oam_deleteNodeByModule(ListHeadPtr head, OCTET_T mid)
+{
+
+ ListNodePtr prevNode, curNode, nextNode;
+
+ if ( head != NULL)
+ {
+ prevNode = NULL;
+ curNode = head->first;
+
+ while(curNode != NULL)
+ {
+ if (curNode->mid == mid)
+ {
+ nextNode = curNode->next;
+ if(curNode == head->first || curNode == head->last)
+ {
+ if ( curNode == head->first)
+ {
+ head->first = head->first->next;
+ }
+ if (curNode == head->last)
+ {
+ head->last = prevNode;
+ if(prevNode != NULL)
+ prevNode->next = NULL;
+ }
+ } else {
+ prevNode->next = curNode->next;
+ }
+
+ --head->nodeCount;
+ free(curNode);
+ curNode = nextNode;
+ } else {
+ prevNode = curNode;
+ curNode = curNode->next;
+ }
+ }
+
+ return STATUS_OK;
+ }
+ return STATUS_INVALID_PARAMS;
+}
+
+STATUS oam_deleteNodeByQ(ListHeadPtr head, MSG_Q_ID qid)
+{
+
+ ListNodePtr prevNode, curNode, nextNode;
+
+ if ( head != NULL)
+ {
+ prevNode = NULL;
+ curNode = head->first;
+
+ while(curNode != NULL)
+ {
+ if (curNode->qid == qid)
+ {
+ nextNode = curNode->next;
+ if(curNode == head->first || curNode == head->last)
+ {
+ if ( curNode == head->first)
+ {
+ head->first = head->first->next;
+ }
+ if (curNode == head->last)
+ {
+ head->last = prevNode;
+ if(prevNode != NULL)
+ prevNode->next = NULL;
+ }
+ } else {
+ prevNode->next = curNode->next;
+ }
+
+ --head->nodeCount;
+ free(curNode);
+ curNode = nextNode;
+ } else {
+ prevNode = curNode;
+ curNode = curNode->next;
+ }
+ }
+
+ return STATUS_OK;
+ }
+ return STATUS_INVALID_PARAMS;
+}
+
+
+void oam_printList(ListHeadPtr head)
+{
+ ListNodePtr aNode;
+ if (head != NULL)
+ {
+ printf("%10s%15s%13s\n", "Table ID", "Module ID", "Tag");
+ printf("%10s%15s%15s\n", "========", "=========", "=========");
+
+ aNode = head->first;
+ while (aNode != NULL)
+ {
+ printf("%10d %13d %s\n", MIB_TBL(aNode->tag), aNode->mid, snmp_tagName(aNode->tag));
+ aNode = aNode->next;
+ }
+ printf ("Total items = %d\n", head->nodeCount);
+ }
+}
+
diff --git a/data/mnet/Common/snmp/src/oam_api.c b/data/mnet/Common/snmp/src/oam_api.c
new file mode 100644
index 0000000..9afd2dc
--- /dev/null
+++ b/data/mnet/Common/snmp/src/oam_api.c
@@ -0,0 +1,1274 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************
+**
+** FILE NAME: oam_api.c
+**
+** DESCRIPTION: This file contains implementation of OAM API routines
+**
+** COMPONENTS:
+**
+**
+** NOTES:
+**
+** REVISION HISTORY
+** __________________________________________________________________
+** ----------+--------+----------------------------------------------
+** Name | Date | Reason
+** ----------+--------+----------------------------------------------
+** Bhawani |05/11/99| Initial Draft
+** Bhawani |12/29/00| resturctured to share among GP, GMS and GS
+** Bhawani |02/28/01| Change to use unify mib change part
+** Bhawani |04/10/01| Added oam_getMnc routine
+** ----------+--------+----------------------------------------------
+**********************************************************************
+*/
+
+/*
+**********************************************************************
+** Include Files.
+**********************************************************************
+*/
+#include "oam_api.h"
+#include "vipermib.h" /* Get the ViperCell MIB definitions.*/
+#include "Table.h"
+#include "vipertbl.h" /* Thi&Sandeep */
+
+
+/*
+*********************************************************************
+** Global Variables / Functions
+*********************************************************************/
+
+/********************************************************************
+** Static Variables
+*********************************************************************/
+
+/*
+ * gets address of a single MIB tag. Index is optional
+ * parameter if the tag is table entry of filed.
+*/
+
+void *oam_getMibAddress(MibTag tag, ...)
+{
+ void *retval = NULL;
+ va_list argn;
+ int idx = 0;
+ int typ = MIB_TYP(tag);
+
+
+ if (True == snmp_validTag(tag))
+ {
+ if (MTYPE_IS_TABLE(typ))
+ {
+ va_start(argn, tag);
+ idx = va_arg(argn, int);
+ va_end(argn);
+ }
+
+ retval = snmp_getAddress(tag, idx);
+ if ((NULL != retval) && (typ== MTYPE_STRING || typ == MTYPE_TSTRING || typ== MTYPE_TABLE))
+ {
+ retval = *((void **)retval);
+ }
+ }
+ return retval;
+}
+
+/*
+** This function stores address of the MIB variable to the out
+** parameters supplied.
+*/
+STATUS oam_getMibVarAdr(MibTag varTag, void ** mibVarAdr)
+{
+ static char fname[] = "oam_getMibVarAdr";
+
+ if (NULL == mibVarAdr)
+ {
+ LOG_ERROR(("Invalid output parameter(mibVarAdr = NULL)"));
+ return STATUS_INVALID_PARAMS;
+ }
+
+ *mibVarAdr = oam_getMibAddress(varTag);
+
+ if (*mibVarAdr == NULL)
+ {
+ LOG_ERROR(("Invalid Tag (varTag = %#x)", varTag));
+ return STATUS_INVALID_TAG;
+ }
+ return STATUS_OK;
+}
+
+
+/* get scalar integer variable and IP address */
+STATUS oam_getMibIntVar(MibTag varTag, INT_32_T *varPtr)
+{
+ INT_32_T* adr;
+ static char fname[] = "oam_getMibIntVar";
+
+ adr = oam_getMibAddress(varTag);
+
+ if (NULL == adr)
+ {
+ LOG_ERROR(("Invalid Tag (varTag = %#x)", varTag));
+ return STATUS_INVALID_TAG;
+ }
+
+ if (!MTYPE_IS_INT(MIB_TYP(varTag)))
+ {
+ LOG_ERROR(("Invalid scalar number Tag (varTag = %#x)", varTag));
+ return STATUS_INVALID_TAG;
+ }
+
+
+ if (NULL == varPtr)
+ {
+ LOG_ERROR(("Invalid output parameter (varPtr = NULL)"));
+ return STATUS_INVALID_PARAMS;
+ }
+
+ *varPtr = *adr;
+
+ return STATUS_OK;
+}
+
+
+/* get scalar string variable example tag: MIB_viperCellName */
+
+STATUS oam_getMibByteAry(MibTag aryTag, OCTET_T *buffer, INT_32_T size)
+{
+
+ char *pStr;
+ static char fname[] = "oam_getMibByteAry";
+
+ pStr = oam_getMibAddress(aryTag);
+
+ if (NULL == pStr)
+ {
+ LOG_ERROR(("Invalid Tag (aryTag = %#x)", aryTag));
+ return STATUS_INVALID_TAG;
+ }
+
+ if (!MTYPE_IS_STR(MIB_TYP(aryTag)))
+ {
+ LOG_ERROR(("Invalid scalar string Tag (aryTag = %#x)", aryTag));
+ return STATUS_INVALID_TAG;
+ }
+
+ if (NULL == buffer || size <= 0 )
+ {
+ LOG_ERROR(("Invalid Output parameters (buffer = %#x, size=%d)", aryTag, size));
+ return STATUS_INVALID_PARAMS;
+ }
+
+ strncpy(buffer, pStr, size);
+ return STATUS_OK;
+}
+
+/*
+** Returns the struct type of MIB variable
+*/
+
+STATUS oam_getMibStruct(MibTag structTag, OCTET_T * buffer, int size)
+
+{
+ int typ = MIB_TYP(structTag);
+ int sz = MIB_SIZ(structTag);
+ OCTET_T* addr;
+ static char fname[] = "oam_getMibStruct";
+
+ addr = oam_getMibAddress(structTag);
+
+ if (NULL == addr)
+ {
+ LOG_ERROR(("Invalid Tag (structTag = %#x)", structTag));
+ return STATUS_INVALID_TAG;
+ }
+
+ if (typ != MTYPE_STRUCT )
+ {
+ LOG_ERROR(("Invalid struct type Tag (structTag = %#x)", structTag));
+ return STATUS_INVALID_TAG;
+ }
+
+
+ if (buffer == NULL || size < sz)
+ {
+
+ LOG_ERROR(("Invalid Parameters (tag= %s, buffer = %#x, size = %d)",
+ snmp_tagName(structTag), buffer, size ));
+ return STATUS_INVALID_PARAMS;
+ }
+
+ memcpy(buffer, addr, sz);
+
+ return STATUS_OK;
+}
+
+
+/*
+ * returns size,in bytes, of the Table entry.
+ * returns STATUS_INVALID_TAG (-1) if the tag is invalid
+ * tag is Table tag eg: MIB_trapFwdTable
+*/
+
+int oam_getMibTblEntSz(MibTag tag)
+{
+
+ Table* tbl;
+ static char fname[] = "oam_getMibTblEntSz";
+
+ if (MIB_TYP(tag) == MTYPE_TENTRY)
+ {
+ tag = MIB_TABLE(MIB_TBL(tag), MIB_ITM(tag));
+ }
+
+ if (MIB_TYP(tag) != MTYPE_TABLE )
+ {
+ LOG_ERROR(("Invalid Table Tag (tag = %#x)", tag));
+ return STATUS_INVALID_TAG;
+ }
+
+ tbl = (Table *) oam_getMibAddress(tag);
+
+ if (tbl == NULL)
+ {
+ LOG_ERROR(("Invalid Tag (tag = %#x)", tag));
+ return STATUS_INVALID_TAG;
+ }
+
+ return table_size(tbl);
+}
+
+/*
+* returns number of rows on the table.
+* returns STATUS_INVALID_TAG (-1) if the tag is invalid
+* tag is Table tag eg: MIB_trapFwdTable
+*/
+
+int oam_getMibTblEntCount(MibTag tag)
+{
+ Table* tbl;
+ static char fname[] = "oam_getMibTblEntCount";
+
+ if (MIB_TYP(tag) == MTYPE_TENTRY)
+ {
+ tag = MIB_TABLE(MIB_TBL(tag), MIB_ITM(tag));
+ }
+
+ if (MIB_TYP(tag) != MTYPE_TABLE )
+ {
+ LOG_ERROR(("Invalid Table Tag (tag = %#x)", tag));
+ return STATUS_INVALID_TAG;
+ }
+
+ tbl = (Table *) oam_getMibAddress(tag);
+
+ if (tbl == NULL)
+ {
+ LOG_ERROR(("Invalid Tag (tag = %#x)", tag));
+ return STATUS_INVALID_TAG;
+ }
+ return table_end(tbl);
+}
+
+
+
+/*
+ * get the entire table into the burffer supplied.
+ * tag is Table tag eg: MIB_trapFwdTable
+ */
+
+STATUS oam_getMibTbl(MibTag tblTag, void *tblBuf, int bufSize)
+{
+ int entCnt;
+ int entSz;
+ Table* tbl;
+
+ static char fname[] = "oam_getMibTbl";
+
+ if (MIB_TYP(tblTag) == MTYPE_TENTRY)
+ {
+ tblTag = MIB_TABLE(MIB_TBL(tblTag), MIB_ITM(tblTag));
+ }
+
+ if (MIB_TYP(tblTag) != MTYPE_TABLE )
+ {
+ LOG_ERROR(("Invalid Table Tag (tblTag = %#x)", tblTag));
+ return STATUS_INVALID_TAG;
+ }
+
+ tbl = (Table *) oam_getMibAddress(tblTag);
+
+ if (tbl == NULL)
+ {
+ LOG_ERROR(("Invalid Tag (tblTag = %#x)", tblTag));
+ return STATUS_INVALID_TAG;
+ }
+
+ entCnt = table_end(tbl);
+ entSz = table_size(tbl);
+
+ if (bufSize < entCnt*entSz)
+ {
+ LOG_ERROR(("Too small buffer(supplied size=%d, needed =%d)",
+ bufSize, entCnt*entSz));
+ return STATUS_INVALID_PARAMS;
+ }
+
+
+ if (NULL == tblBuf)
+ {
+ LOG_ERROR(("Output parameter buffer is null"));
+ return STATUS_INVALID_PARAMS;
+ }
+
+ memcpy(tblBuf, table_getRow(tbl, 0), entCnt*entSz);
+ return STATUS_OK;
+
+}
+
+
+/*
+ * retrieves a Table Entry of the into the memory supplied
+ * Tag is Table Entry tag, eg: MIBT_trapFwdEntry
+ */
+
+STATUS oam_getMibTblEntry(MibTag tblEntryTag, int idx, void *buffer, int bufSize)
+{
+ char* etyAddr;
+ int entSz = MIB_SIZ(tblEntryTag);
+ int typ = MIB_TYP(tblEntryTag);
+
+ static char fname[] = "oam_getMibTblEntry";
+
+ etyAddr = oam_getMibAddress(tblEntryTag, idx);
+
+ if (etyAddr == NULL)
+ {
+ LOG_ERROR(("Invalid Tag (tblEntryTag = %#x)", tblEntryTag));
+ return STATUS_INVALID_TAG;
+ }
+
+ if (typ != MTYPE_TENTRY)
+ {
+ LOG_ERROR(("Invalid Table Entry Tag (tag = %#x)", tblEntryTag));
+ return STATUS_INVALID_TAG;
+ }
+
+
+ if (bufSize < entSz)
+ {
+ LOG_ERROR(("The buffer not enough to fit the entry(supplied=%d, needed =%d)",
+ bufSize, entSz));
+ return STATUS_INVALID_PARAMS;
+ }
+
+
+ if (NULL == buffer)
+ {
+ LOG_ERROR(("Output parameter buffer is null"));
+ return STATUS_INVALID_PARAMS;
+ }
+
+ memcpy(buffer, etyAddr, entSz);
+ return STATUS_OK;
+
+}
+
+
+/*
+ * retrieves an individual field of integer type from
+ * the given row of a table.
+ * Tag is Table Entry tag, eg: MIBT_trapPort, MIBT_trapIpAddress
+ */
+
+STATUS oam_getMibTblNumberField(MibTag colTag, int idx, INT_32_T *value)
+{
+ INT_32_T* addr; /* Raju: fixing a bug */
+ int typ = MIB_TYP(colTag);
+ static char fname[] = "oam_getMibTblNumberField";
+
+ addr = (INT_32_T *)oam_getMibAddress(colTag, idx);
+
+ if (NULL == addr)
+ {
+ LOG_ERROR(("Invalid Tag (colTag = %#x)", colTag));
+ return STATUS_INVALID_TAG;
+ }
+
+ if (!(MTYPE_IS_TINT(typ)))
+ {
+ LOG_ERROR(("Invalid Table Number Item tag (tag = %#x)", colTag));
+ return STATUS_INVALID_TAG;
+ }
+
+
+ if (NULL == value)
+ {
+ LOG_ERROR(("Invalid output parameter value=NULL"));
+ return STATUS_INVALID_PARAMS;
+ }
+
+ *value = *addr;
+ return STATUS_OK;
+
+}
+
+
+/*
+ * retrieves an individual field of string type from
+ * the given row of a table.
+ * Tag is Table Entry tag, eg: MIBT_trapPort, MIBT_trapIpAddress
+ */
+
+STATUS oam_getMibTblStringField(MibTag tblStrTag, int idx, OCTET_T *buffer, INT_32_T size)
+{
+ char *str;
+ int typ = MIB_TYP(tblStrTag);
+ static char fname[] = "oam_getMibTblStringField";
+
+ str = oam_getMibAddress(tblStrTag, idx);
+
+ if (NULL == str)
+ {
+ LOG_ERROR(("Invalid Tag (tblStrTag = %#x)", tblStrTag));
+ return STATUS_INVALID_TAG;
+ }
+
+ if (!(MTYPE_IS_TSTR(typ)))
+ {
+ LOG_ERROR(("Invalid table string tag(tblStrTag = %#x)", tblStrTag));
+ return STATUS_INVALID_TAG;
+ }
+
+ if (NULL == buffer || size <= 0 )
+ {
+ LOG_ERROR(("Invalid output parameters (buffer = %#x, size=%d)", buffer, size));
+ return STATUS_INVALID_PARAMS;
+ }
+
+ strncpy(buffer, str, size);
+ return STATUS_OK;
+}
+
+#ifdef MNET_GP10
+
+/* convert int to three digit mnc */
+STATUS oam_getMncFromInt(int nMnc, UINT8 *pszMnc)
+{
+
+ int i = 0;
+ if ( nMnc >= 100)
+ {
+ pszMnc[i++] = nMnc/100;
+ pszMnc[i++] = (nMnc%100)/10;
+ pszMnc[i++] = nMnc%10;
+ }
+ else
+ {
+ pszMnc[i++] = nMnc/10;
+ pszMnc[i++] = nMnc%10;
+ pszMnc[i++] = 0x0F;
+ }
+ return STATUS_OK;
+
+}
+
+/* returns 3 bytes of MNC as an arrary */
+STATUS oam_getMnc(UINT8 *pszMnc)
+{
+ INT_32_T mnc;
+ int i;
+ static char fname[] = "oam_getMnc";
+
+ if (STATUS_OK != oam_getMibIntVar(MIB_bts_mnc, &mnc))
+ {
+ LOG_ERROR(("Not available(MIB_bts_mnc = %#x)", MIB_bts_mnc));
+ return STATUS_NOT_FOUND;
+ }
+ return oam_getMncFromInt(mnc, pszMnc);
+}
+
+
+STATUS oam_getMccMncByteAryByInt(INT_32_T intVal, char * byteAry)
+{
+ byteAry[2] = (UINT8) (intVal & 0xF);
+ intVal >>= 4;
+ byteAry[1] = (UINT8) (intVal & 0xF);
+ intVal >>= 4;
+ byteAry[0] = (UINT8) (intVal & 0xF);
+
+ return STATUS_OK;
+}
+
+
+#endif // MNET_GP10
+
+#ifdef MNET_GMC
+/*
+*/
+
+STATUS oam_getMncFromInt(int nMnc, UINT8 *pszMnc)
+{
+ pszMnc[2] = (UINT8) (nMnc & 0xF);
+ nMnc = nMnc >> 4;
+ pszMnc[1] = (UINT8) (nMnc & 0xF);
+ nMnc = nMnc >> 4;
+ pszMnc[0] = (UINT8) (nMnc & 0xF);
+
+ return STATUS_OK;
+
+}
+
+STATUS oam_getMccFromInt(int nMcc, UINT8 *pszMcc)
+{
+
+ pszMcc[2] = (UINT8) (nMcc & 0xF);
+ nMcc = nMcc >> 4;
+ pszMcc[1] = (UINT8) (nMcc & 0xF);
+ nMcc = nMcc >> 4;
+ pszMcc[0] = (UINT8) (nMcc & 0xF);
+
+ return STATUS_OK;
+
+}
+
+
+STATUS oam_getMnc(UINT8 *pszMnc)
+{
+ INT_32_T mnc;
+ static char fname[] = "oam_getMnc";
+
+
+ if (STATUS_OK != oam_getMibIntVar(MIB_mnetMNC, &mnc))
+ {
+ LOG_ERROR(("Not available(MIB_mnetMNC = %#x)", MIB_mnetMNC));
+ return STATUS_NOT_FOUND;
+ }
+ return oam_getMncFromInt(mnc, pszMnc);
+}
+
+STATUS oam_getMcc(UINT8 *pszMcc)
+{
+ INT_32_T mcc;
+ static char fname[] = "oam_getMnc";
+
+
+ if (STATUS_OK != oam_getMibIntVar(MIB_mnetMCC, &mcc))
+ {
+ LOG_ERROR(("Not available(MIB_mnetMCC = %#x)", MIB_mnetMCC));
+ return STATUS_NOT_FOUND;
+ }
+ return oam_getMccFromInt(mcc, pszMcc);
+}
+
+void testAdjMNC(int idx)
+{
+ UINT8 buf[3];
+
+ buf[0] = 0;
+ buf[1] = 0;
+ buf[2] = 0;
+
+ printf("testAdjMNC: before buf = %d,%d,%d\n",buf[0],buf[1],buf[2]);
+
+ oam_getAdjacentLocationAreaMNC(buf, idx);
+
+ printf("testAdjMNC: after buf = %d,%d,%d\n",buf[0],buf[1],buf[2]);
+}
+
+
+STATUS oam_getAdjacentLocationAreaMNC(UINT8 *pszMnc, int idx)
+{
+ INT_32_T mnc;
+ static char fname[] = "oam_getMnc";
+
+
+ if (STATUS_OK != oam_getMibTblNumberField(MIBT_adjacentLocationAreaMNC, idx, &mnc))
+ {
+ LOG_ERROR(("Not available(MIBT_adjacentLocationAreaMNC = %#x)", MIBT_adjacentLocationAreaMNC));
+ return STATUS_NOT_FOUND;
+ }
+
+ return oam_getMncFromInt(mnc, pszMnc);
+}
+
+
+STATUS oam_getAdjacentLocationAreaMCC(UINT8 *pszMcc, int idx)
+{
+ INT_32_T mcc;
+ static char fname[] = "oam_getMnc";
+
+
+ if (STATUS_OK != oam_getMibTblNumberField(MIBT_adjacentLocationAreaMCC, idx, &mcc))
+ {
+ LOG_ERROR(("Not available(MIBT_adjacentLocationAreaMCC = %#x)", MIBT_adjacentLocationAreaMCC));
+ return STATUS_NOT_FOUND;
+ }
+ return oam_getMccFromInt(mcc, pszMcc);
+}
+
+
+STATUS msrn_addTblEntry(char *msrnValue)
+{
+ int i, msrnRowUsed;
+ Boolean availSlotFound = FALSE;
+
+ if (strlen(msrnValue) > SIZE_E164) /* make sure msrn string does not exceed E164 size */
+ return STATUS_INVALID_PARAMS;
+
+ for (i = 0; i < MsrnTableLimit && !availSlotFound; i++)
+ {
+ if (oam_getMibTblNumberField(MIBT_msrnRowUsed, i, (INT_32_T *)&msrnRowUsed) != STATUS_OK)
+ return STATUS_INVALID_PARAMS;
+ if (msrnRowUsed == 0)
+ {
+ oam_setTblEntryField(SNMP_AGENT_MODULE_ID, MIBT_msrnRowUsed, i, 1);
+ oam_setTblEntryStrField(SNMP_AGENT_MODULE_ID, MIBT_msrn, i, msrnValue, strlen(msrnValue)+1);
+ availSlotFound = TRUE;
+ }
+ }
+ if (!availSlotFound)
+ return STATUS_NOT_FOUND;
+ return STATUS_OK;
+}
+
+STATUS msrn_delTblEntry(char *msrnValue)
+{
+ int i;
+ MsrnEntry msrnEntry;
+ Boolean entryFound = FALSE;
+ char *pMsrn;
+
+ if (strlen(msrnValue) > SIZE_E164) /* make sure msrn string does not exceed E164 size */
+ return STATUS_INVALID_PARAMS;
+
+ for (i = 0; i < MsrnTableLimit && !entryFound; i++)
+ {
+ memset(&msrnEntry, 0, sizeof(msrnEntry));
+ if (oam_getMibTblEntry(MIBT_msrnEntry, i, &msrnEntry, sizeof(msrnEntry)) != STATUS_OK)
+ return STATUS_INVALID_PARAMS;
+ if (msrnEntry.msrnRowUsed != 0)
+ {
+ pMsrn = msrnEntry.msrn;
+
+ if ((NULL != pMsrn) && (strncmp(msrnValue, pMsrn, strlen(pMsrn)) == 0))
+ {
+ /* entry found, mark slot as available */
+ oam_setTblEntryField(SNMP_AGENT_MODULE_ID, MIBT_msrnRowUsed, i, 0);
+ entryFound = TRUE;
+ }
+ }
+ }
+ if (!entryFound)
+ return STATUS_NOT_FOUND;
+ return STATUS_OK;
+}
+
+char *msrn_getNextEntry(int *counter)
+{
+ int i;
+ MsrnEntry msrnEntry;
+ char *pMsrn;
+
+ for (i = *counter; i < MsrnTableLimit; i++)
+ {
+ memset(&msrnEntry, 0, sizeof(msrnEntry));
+ if (oam_getMibTblEntry(MIBT_msrnEntry, i, &msrnEntry, sizeof(msrnEntry)) != STATUS_OK)
+ return NULL;
+ if (msrnEntry.msrnRowUsed != 0)
+ {
+ *counter = i + 1;
+ pMsrn = msrnEntry.msrn;
+ return pMsrn;
+ }
+ }
+ return NULL;
+}
+
+void msrn_testFunction()
+{
+ char buffer[256];
+ char *p = NULL;
+ int i = 0;
+ while (p = msrn_getNextEntry(&i))
+ {
+ strcpy(buffer, p); /* to test strcpy to a buffer */
+ printf("***** %d ***** %s\n", i, buffer);
+ }
+}
+
+#endif /* MNET_GMC */
+
+
+#ifdef MNET_GS
+
+/*
+This API expects pszAPN parameter in ASCII null terminated
+string format (Ex: "gprs.cisco.com"). Stores IP Address
+in pIpAddr if operation is successful. Return value
+indicates the status of the operation.
+
+This API first looks-up in the local table. If the lookup fails
+and the DNS server is configured then performs DNS lookup.
+
+Note that a call to this routine may be blocked
+for long time (up to 10 seconds or more if the DNS server
+is not responding). Caller should be prepared for such
+long delays.
+*/
+STATUS oam_getGgsnIpAddress(char *pszAPN, UINT32 *pIpAddr)
+{
+ Table *tbl;
+ int j,end;
+ char *apnName;
+ static char fname[] = "oam_getGgsnIpAddress";
+
+ if ((pszAPN == NULL) || (pIpAddr == NULL))
+ {
+ LOG_ERROR(("Invalid arguments to the funcation call"));
+ return STATUS_NOK;
+ }
+
+ /* First do a look-up in the Local APN table */
+
+ if ((tbl = snmp_getTableAddress(MIBT_apnName)))
+ {
+ end = table_end(tbl);
+ for (j=0; j < end; j++)
+ {
+ apnName = (char *) snmp_getValue(MIBT_apnName, j);
+ if (apnName != NULL)
+ {
+ /* Since APN name is a hostname, hence it is case insensitive */
+ if (strcasecmp(apnName, pszAPN) == 0)
+ {
+ return oam_getMibTblNumberField(MIBT_apnGgsnIpAddress,j,(INT_32_T*)pIpAddr);
+ }
+ }
+ }
+ }
+
+ /* Since, local lookup failed now try the DNS lookup */
+ /* To be completed */
+
+ return STATUS_NOK;
+}
+
+void debugApnLookup(char *apnName)
+{
+ UINT32 ipaddr;
+
+ if (apnName == NULL)
+ {
+ printf("Usage: debugApnLookup apnName\n");
+ return;
+ }
+ if (oam_getGgsnIpAddress(apnName, &ipaddr) == STATUS_OK)
+ {
+ printf ("GGSN IP Address for APN Name \"%s\" is %s\n",apnName,int2ip(ipaddr));
+ } else
+ {
+ printf("APN looup failed for \"%s\".\n",apnName);
+ }
+}
+
+/*
+Returns name of the default APN. Willl return NULL if
+no default APN name is configured by the user. Return value
+is null terminated. Format for the return value is ASCII
+(Ex: "gprs.cisco.com")
+*/
+char * oam_getDefaultAPN()
+{
+ char *name;
+
+ name = (char *) snmp_getValue(MIB_sgsnDefApnName);
+ if ((name == NULL) || (strlen(name) == 0))
+ {
+ return (char *)0;
+ }
+ return name;
+}
+
+#endif /* MNET_GS */
+
+int oam_isSnmpEnabled()
+{
+ INT_32_T status;
+
+ if (STATUS_OK != oam_getMibIntVar(MIB_snmpServiceEnabled, &status))
+ {
+ /* if there is any error, assume SNMP is enabled */
+ return 1;
+ }
+
+ return (int) status;
+}
+
+int oam_isHttpEnabled()
+{
+ INT_32_T status;
+
+ if (STATUS_OK != oam_getMibIntVar(MIB_httpServiceEnabled, &status))
+ {
+ /* if there is any error, assume HTTP is enabled */
+ return 1;
+ }
+
+ return (int) status;
+}
+
+int oam_isFtpEnabled()
+{
+ INT_32_T status;
+
+ if (STATUS_OK != oam_getMibIntVar(MIB_ftpServiceEnabled, &status))
+ {
+ /* if there is any error, assume FTP is enabled */
+ return 1;
+ }
+
+ return (int) status;
+}
+
+void oam_setSnmpEnabled(int status)
+{
+ int value = 1;
+
+ if (status == 0)
+ value = 0;
+
+ snmp_setEntry(MIB_snmpServiceEnabled, 0, (void *) value, 4);
+ agent_setSnmpEnabled(value);
+}
+
+void oam_setHttpEnabled(int status)
+{
+ int value = 1;
+
+ if (status == 0)
+ value = 0;
+
+ snmp_setEntry(MIB_httpServiceEnabled, 0, (void *) value, 4);
+}
+
+void oam_setFtpEnabled(int status)
+{
+ int value = 1;
+
+ if (status == 0)
+ value = 0;
+
+ snmp_setEntry(MIB_ftpServiceEnabled, 0, (void *) value, 4);
+
+ /* No harm in calling ftpdDelete/ftpdInit even though
+ FTP server is not running/already running
+ */
+ if (value == 0)
+ ftpdDelete();
+ else
+ ftpdInit((FUNCPTR *)0, 0);
+}
+
+/******************************************************************
+** API used to set MIB variables.
+******************************************************************/
+
+/*
+** The same set of API are used to set MIB variables by both agent
+** and application modules. Source Module ID is passed so that the
+** implementation knows the direction of message flow.
+*/
+
+/* sets a single mib variable.
+ * tag is */
+STATUS oam_setMibIntVar(OCTET_T srcModuleId, MibTag varTag, INT_32_T varVal)
+{
+ static char fname[] = "oam_setMibIntVar";
+
+ if (False == snmp_validTag(varTag))
+ {
+ LOG_ERROR(("Invalid Tag (varTag = %#x)", varTag));
+ return STATUS_INVALID_TAG;
+ }
+
+ if (!MTYPE_IS_INT(MIB_TYP(varTag)))
+ {
+ LOG_ERROR(("Invalid Tag for integer type item (tag = %#x)", varTag));
+ return STATUS_INVALID_TAG;
+ }
+
+ if (Success == snmp_setEntry(varTag, 0, (void *) varVal, 4))
+ {
+ oam_processTrap(srcModuleId, varTag, VT_VALUE, varVal, 0);
+ return STATUS_OK;
+ }
+
+ LOG_ERROR(("Invalid Parameters (varTag =%s(%#x), varVal = %d)",
+ snmp_tagName(varTag), varTag, varVal));
+
+ return STATUS_NOK;
+}
+
+
+
+/* sets mib string
+ * tag is a string: eg: MIB_viperCellName */
+STATUS oam_setMibByteAry(OCTET_T srcModuleId, MibTag strTag, OCTET_T *byteAryPtr, INT_32_T byteCount)
+{
+ static char fname[] = "oam_setMibByteAry";
+
+ if (False == snmp_validTag(strTag))
+ {
+ LOG_ERROR(("Invalid Tag (strTag = %#x)", strTag));
+ return STATUS_INVALID_TAG;
+ }
+
+ if (!MTYPE_IS_STR(MIB_TYP(strTag)))
+ {
+ LOG_ERROR(("Invalid string tag (tag = %#x)", strTag));
+ return STATUS_INVALID_TAG;
+ }
+
+ if (Success == snmp_setEntry(strTag, 0, (void *) byteAryPtr, byteCount))
+ {
+ oam_processTrap(srcModuleId, strTag, VT_ADDRESS, (int) oam_getMibAddress(strTag), 0);
+ return STATUS_OK;
+ }
+ LOG_ERROR(("Invalid Parameters (tag =%s(%#x), byteAryPtr = %#x, byteCount=%d)",
+ snmp_tagName(strTag), strTag, byteAryPtr, byteCount));
+ return STATUS_NOK;
+
+}
+
+
+/*
+ * sets an entry of a Table, an entry is actually is row of MIB table
+ * tag is a table entry, eg: MIBT_trapFwdEntry
+ */
+
+STATUS oam_setMibTblEntry(OCTET_T srcModuleId, MibTag entryTag, int idx, void *tblEntBuf, int bufSize)
+{
+ static char fname[] = "oam_getMibTblEntry";
+
+ if (False == snmp_validTag(entryTag))
+ {
+ LOG_ERROR(("Invalid Tag (entryTag = %#x)", entryTag));
+ return STATUS_INVALID_TAG;
+ }
+
+ if (MIB_TYP(entryTag) != MTYPE_TENTRY)
+ {
+ LOG_ERROR(("Invalid table entry tag (tag = %#x)", entryTag));
+ return STATUS_INVALID_TAG;
+ }
+
+ if (Success == snmp_setEntry(entryTag, idx, tblEntBuf, bufSize))
+ {
+ oam_processTrap(srcModuleId, entryTag, VT_TABLE,
+ (int) oam_getMibAddress(entryTag, idx), idx);
+ return STATUS_OK;
+ }
+ LOG_ERROR(("Invalid Parameters (entryTag =%s(%#x), idx = %d, tblEntBuf = 0x%08p, bufSize=%d)",
+ snmp_tagName(entryTag), entryTag, idx, tblEntBuf, bufSize));
+ return STATUS_NOK;
+}
+
+
+/*
+** sets a individual number field of the given table
+** The field is identified using the tag name, which is the column tag name
+** and the row index of the table. The index start from 0.
+** tag example: MIBT_trapPort, MIBT_trapIpAddress
+*/
+
+STATUS oam_setTblEntryField(OCTET_T srcModuleId, MibTag colTag, int idx, INT_32_T fieldVal)
+{
+
+ int typ = MIB_TYP(colTag);
+ static char fname[] = "oam_setTblEntryField";
+
+ if (False == snmp_validTag(colTag))
+ {
+ LOG_ERROR(("Invalid Tag (colTag = %#x)", colTag));
+ return STATUS_INVALID_TAG;
+ }
+
+ if (!(MTYPE_IS_TINT(typ)))
+ {
+ LOG_ERROR(("Invalid table number tag %s(%#x)", snmp_tagName(colTag), colTag));
+ return STATUS_INVALID_TAG;
+ }
+
+
+ if (Success == snmp_setEntry(colTag, idx, (void*) fieldVal, 4))
+ {
+ oam_processTrap(srcModuleId, colTag, VT_TABLE, fieldVal, idx);
+ return STATUS_OK;
+ }
+ LOG_ERROR(("Invalid Parameters (colTag =%s(%#x), idx = %d, fieldVal=%d)",
+ snmp_tagName(colTag), colTag, idx, fieldVal));
+ return STATUS_NOK;
+
+}
+
+
+/*
+** sets a individual string field of the given table
+** tag is table string, which is the column tag name
+** (eg MIBT_trapCommunity) and the row index of the table.
+** The index start from 0.
+ */
+
+STATUS oam_setTblEntryStrField(OCTET_T srcModuleId, MibTag tstrTag, int idx, OCTET_T *tstr, INT_32_T byteCount)
+{
+
+ static char fname[] = "oam_setTblEntryField";
+
+ if (False == snmp_validTag(tstrTag))
+ {
+ LOG_ERROR(("Invalid Tag (tstrTag = %#x)", tstrTag));
+ return STATUS_INVALID_TAG;
+ }
+
+ if (MIB_TYP(tstrTag) != MTYPE_TSTRING)
+ {
+ LOG_ERROR(("Invalid table string tag (tag = %#x)", tstrTag));
+ return STATUS_INVALID_TAG;
+ }
+
+
+ if (Success == snmp_setEntry(tstrTag, idx, (void*) tstr, byteCount))
+ {
+ oam_processTrap(srcModuleId, tstrTag, VT_TABLE,
+ (int) oam_getMibAddress(tstrTag, idx), idx);
+ return STATUS_OK;
+ }
+ LOG_ERROR(("Invalid Parameters (tstrTag =%s(%#x), idx = %d, tstr = %#x, byteCount=%d)",
+ snmp_tagName(tstrTag), tstrTag, idx, tstr, byteCount));
+
+ return STATUS_NOK;
+
+}
+
+/******************************************************************
+** API used to subscribe trap
+******************************************************************/
+
+/*
+* Applications interested in receiving notification
+* when the value of certain MIB variables get changed can do so
+* by calling following APIs.
+*/
+
+/* setting trap on a single MIB variable */
+STATUS oam_setTrap (OCTET_T srcModuleId, MSG_Q_ID msgQid, MibTag mibTag)
+{
+ ListNodePtr nodePtr;
+ int status = STATUS_NO_MEMORY;
+ nodePtr = oam_newListNode(mibTag, msgQid);
+ if (nodePtr != NULL)
+ {
+ nodePtr->mid = srcModuleId;
+ oam_lockMutex();
+ status = oam_insertNodeSortedByTag(oam_getTrapTableHead(),nodePtr);
+ oam_unlockMutex();
+ }
+ return status;
+
+}
+
+STATUS setTrap (OCTET_T srcModuleId, MSG_Q_ID msgQid, MibTag mibTag)
+{
+ return oam_setTrap(srcModuleId, msgQid, mibTag);
+}
+
+/* setting trap on a multiple MIB variables */
+STATUS oam_setMultipleTrap (OCTET_T srcModuleId, MSG_Q_ID msgQid, MibTag mibTag[], INT_32_T tagCount)
+{
+ ListNodePtr nodePtr;
+ int i, status = STATUS_OK;
+ oam_lockMutex();
+ for (i= 0; i < tagCount && status == STATUS_OK; i++)
+ {
+ nodePtr = oam_newListNode(mibTag[i], msgQid);
+ if (nodePtr != NULL)
+ {
+ nodePtr->mid = srcModuleId;
+ status = oam_insertNodeSortedByTag(oam_getTrapTableHead(),nodePtr);
+ } else {
+ status = STATUS_NO_MEMORY;
+ }
+ }
+ oam_unlockMutex();
+ return STATUS_OK;
+
+}
+
+/* setting trap on a multiple MIB variables */
+STATUS oam_unsetTrapByModule (OCTET_T srcModuleId)
+{
+ int status;
+ oam_lockMutex();
+ status= oam_deleteNodeByModule(oam_getTrapTableHead(), srcModuleId);
+ oam_unlockMutex();
+ return status;
+
+}
+
+
+/* setting trap on a multiple MIB variables */
+STATUS oam_unsetTrap(OCTET_T srcModuleId, MibTag tag)
+{
+ int status;
+ oam_lockMutex();
+ status= oam_deleteNode(oam_getTrapTableHead(), tag, srcModuleId);
+ oam_unlockMutex();
+ return status;
+
+}
+
+
+/* sends the actual message through message queue */
+static STATUS oam_trapSend(MSG_Q_ID qid, char * trapMsg)
+{
+
+ /* send a normal priority message, blocking if queue is full */
+#if (defined(VXWORKS))
+ int status;
+ status = msgQSend (qid, trapMsg, sizeof (TrapMsg), WAIT_FOREVER,
+ MSG_PRI_NORMAL);
+ if (status == ERROR)
+ {
+
+ /* We need to check here the followings:
+ S_objLib_OBJ_ID_LOG_ERROR
+ - msgQId is invalid.
+ S_objLib_OBJ_DELETED
+ - the message queue was deleted while waiting to a send message.
+ */
+ return STATUS_MSGQ_SEND_ERROR;
+ }
+#endif
+
+ return STATUS_OK;
+}
+
+STATUS oam_processTrap(OCTET_T srcMdlId, MibTag tag, OCTET_T valueType, INT_32_T newValue, int idx)
+{
+
+ TrapMsg trapMsg;
+ ListNodePtr nodePtr;
+
+ static char fname[] ="oam_processTrap";
+ int prevModuleId;
+
+ LOG_TRACE(("(module=%d, tag=%s, vt=%d, value=%#x, idx=%d)", srcMdlId, snmp_tagName(tag), valueType, newValue, idx));
+
+ /* Poputlate the Trap Message */
+ trapMsg.srcModuleId = MODULE_OAM; /* always MODULE_OAM */
+ trapMsg.msgType = MT_TRAP;
+ trapMsg.mibTag = tag;
+ trapMsg.valType = valueType;
+
+
+ switch(valueType)
+ {
+ case VT_VALUE:
+ {
+ trapMsg.val.varVal = newValue;
+ break;
+ }
+ case VT_ADDRESS:
+ {
+
+ trapMsg.val.varAdr = (void *) newValue;
+ break;
+ }
+ case VT_TABLE:
+ {
+ trapMsg.val.varTbl.idx = idx;
+ trapMsg.val.varTbl.value = newValue;
+ break;
+ }
+ default:
+ LOG_ERROR(("Invalid value type: %d", valueType));
+ return STATUS_INVALID_PARAMS;
+ break;
+ }
+
+ /* The 2nd condition should only be evaluated if the 1st is True.
+ * The condition inside the while loop below shoud be safe.
+ */
+ prevModuleId = -1;
+ nodePtr = oam_getFirstNodeByTag(oam_getTrapTableHead(), tag);
+
+ while(nodePtr != NULL && MIB_TBL(nodePtr->tag) == MIB_TBL(tag))
+ {
+
+ if (nodePtr->mid != srcMdlId && prevModuleId != nodePtr->mid
+ && (MIB_TYP(nodePtr->tag) == MTYPE_STRUCT || nodePtr->tag == tag))
+ {
+
+ /*
+ * We should not trap the module which sets the variable.
+ */
+ if (oam_trapSend(nodePtr->qid, (char *) &trapMsg) != STATUS_OK)
+ {
+ LOG_ERROR(("Message Queue Send failure (mid = %d, qid = %#x", nodePtr->mid, nodePtr->qid));
+ perror("Reason of Failure");
+
+ }
+
+ prevModuleId = nodePtr->mid;
+ LOG_TRACE(("Sent Trap Message on tag %s to %d module", snmp_tagName(tag), nodePtr->mid));
+
+ }
+ nodePtr = nodePtr->next;
+ }
+ return STATUS_OK;
+}
+
+/* this function returns byte arrary from a given integer value */
+
+STATUS oam_getByteAryByInt(INT_32_T intVal, char * byteAry, int size)
+{
+ int i;
+
+ if ( intVal < 0 || byteAry == NULL || size <1 )
+ return STATUS_INVALID_PARAMS;
+ memset(byteAry, 0, size);
+ for (i = size-1; i>=0 && intVal > 0; i--)
+ {
+ byteAry[i] = intVal%10;
+ intVal = intVal/10;
+ }
+ return STATUS_OK;
+}
+
+/* Test Print Routine */
+void oam_printTrapList()
+{
+ oam_printList(oam_getTrapTableHead());
+}
+
+/* oam message printing routine */
+void oam_msgPrint(char *format, ...)
+{
+ va_list marker;
+ va_start( marker, format ); /* Initialize variable arguments. */
+ vprintf(format, marker);
+ printf("\n");
+ fflush(stdout);
+ va_end( marker ); /* Reset variable arguments. */
+ return;
+
+}
+
diff --git a/data/mnet/Common/snmp/src/snmpLocalIoLib.c b/data/mnet/Common/snmp/src/snmpLocalIoLib.c
new file mode 100644
index 0000000..6ccd047
--- /dev/null
+++ b/data/mnet/Common/snmp/src/snmpLocalIoLib.c
@@ -0,0 +1,327 @@
+/*
+************************************************************************
+*
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*_______________________________________________________________________
+*
+* FILE NAME: sndcpLocalIo.c
+*
+* DESCRIPTION: This file contains snmp Local I/O routines that links
+* WindSnmp Callback to our customized get, set, test, next
+* etc method handlers.
+*
+* COMPONENTS:
+*
+*
+* NOTES:
+*
+* REVISION HISTORY:
+*----------+--------+---------------------------------------------------
+* Name | Date | Reason
+*----------+--------+---------------------------------------------------
+* Bhawani |01/23/01| Initial Draft
+*----------+--------+---------------------------------------------------
+************************************************************************
+*/
+
+#include <vxWorks.h>
+#include <stdio.h>
+#include <sys/socket.h>
+#include <sockLib.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <ioLib.h>
+#include <taskLib.h>
+#include <snmpdLib.h>
+#include <snmpIoLib.h>
+#include <view.h>
+#include <snmpstat.h>
+#include <auxfuncs.h>
+#include <hostLib.h>
+#include <inetLib.h>
+#include <buildpkt.h>
+#include <objectid.h>
+#include <m2Lib.h>
+#include <semLib.h>
+#include <subInstall.h>
+
+
+#include <timers.h>
+#include <selectLib.h>
+
+#include "oam_api.h"
+#include "vipermib.h"
+#include "vipertbl.h"
+
+#define SNMP_PORT 161 /* port for snmp */
+#define TRAP_PORT 162 /* port for snmp traps */
+
+/*
+************************************************************************
+* External variable defined snmpIoLib.c
+************************************************************************
+*/
+
+extern int snmpRemoteIP;
+extern int snmpRemotePort;
+extern int snmpProxyIP;
+
+
+/* Snmp Call back routines */
+typedef int (*SnmpFuncPtr) (SNMP_PKT_T *pktp);
+extern SnmpFuncPtr pSnmpPrivateRelease;
+extern SnmpFuncPtr pSnmpSetPduValidate;
+extern SnmpFuncPtr pSnmpPreSetRoutine;
+extern SnmpFuncPtr pSnmpPostSetRoutine;
+extern SnmpFuncPtr pSnmpSetFailedRoutine;
+
+/* SNMP PDU Processing method routines */
+typedef void (*SnmpPduProsFuncPtr) (
+ OIDC_T lastmatch,
+ int compc,
+ OIDC_T *compl,
+ SNMP_PKT_T *pktp,
+ VB_T *vbp);
+
+extern SnmpPduProsFuncPtr pSnmpTestMethod;
+extern SnmpPduProsFuncPtr pSnmpGetMethod ;
+extern SnmpPduProsFuncPtr pSnmpNextMethod;
+extern SnmpPduProsFuncPtr pSnmpSetMethod;
+
+typedef void (*SnmpCallbackFuncPtr) (int snmpSocket);
+
+extern SnmpCallbackFuncPtr pSnmpCallbackHandler;
+
+/* struct for community to view index mapping */
+typedef struct {
+ char * Cmnty;
+ int viewIndex;
+} CMNTY_TO_VIEW_T;
+
+static CMNTY_TO_VIEW_T getCmntyViewTbl[] = { {NULL, 1},
+ {NULL, 1},
+ {"icmp", 2},
+ {NULL, 0}
+ };
+
+typedef int (*SnmpIoCommunityValidateFuncPtr) (
+ SNMP_PKT_T * pPkt, /* ptr to snmp pkt */
+ SNMPADDR_T * pRemoteAddr, /* remote address */
+ SNMPADDR_T * pLocalAddr /* local address */
+ );
+
+extern SnmpIoCommunityValidateFuncPtr pSnmpLocalIoCommunityValidate;
+
+int snmpLocalIoCommunityValidate(SNMP_PKT_T *pPkt, SNMPADDR_T *pRemoteAddr,
+ SNMPADDR_T *pLocalAddr);
+
+/* Defined other places */
+extern void snmp_initializeMib();
+extern void snmp_getMethod (
+ OIDC_T lastmatch,
+ int compc,
+ OIDC_T *compl,
+ SNMP_PKT_T *pktp,
+ VB_T *vbp);
+
+extern void snmp_setMethod(
+ OIDC_T lastmatch,
+ int compc,
+ OIDC_T *compl,
+ SNMP_PKT_T *pktp,
+ VB_T *vbp);
+
+extern void snmp_nextMethod (
+ OIDC_T lastmatch,
+ int compc,
+ OIDC_T *compl,
+ SNMP_PKT_T *pktp,
+ VB_T *vbp);
+
+
+extern void snmp_testMethod (
+ OIDC_T lastmatch,
+ int compc,
+ OIDC_T *compl,
+ SNMP_PKT_T *pktp,
+ VB_T *vbp);
+
+
+/* gets string dot form IP from 32 bit unsighed integer */
+
+char * IPDotAddr( int addr)
+{
+ static char buf[20];
+ unsigned char *ip = (unsigned char *) &addr;
+
+ sprintf(buf, "%d.%d.%d.%d", ip[3], ip[2], ip[1], ip[0]);
+ return buf;
+}
+
+
+
+/* Snmp User Private release routine */
+int SnmpPrivateRelease ( SNMP_PKT_T *pktp)
+{
+ return 0;
+};
+
+/* Snmp Set PDU validate routine */
+int SnmpSetPduValidate ( SNMP_PKT_T *pktp)
+{
+ return 0;
+};
+
+
+/* SNMP Pre set Routine */
+int SnmpPreSetRoutine ( SNMP_PKT_T *pktp)
+{
+ return 0;
+};
+
+
+/* Snmp Set Failed Routine */
+int SnmpSetFailedRoutine ( SNMP_PKT_T *pktp)
+{
+ return 0;
+};
+
+/* Snmp Local IO Init routine */
+snmpLocalIoInit()
+{
+ /* Populate Call back routines */
+
+ pSnmpPrivateRelease = SnmpPrivateRelease;
+ pSnmpSetPduValidate = SnmpSetPduValidate;
+ pSnmpPreSetRoutine = SnmpPreSetRoutine;
+ pSnmpSetFailedRoutine = SnmpSetFailedRoutine;
+
+ /* Populate PDU Processing routines */
+
+ pSnmpTestMethod = snmp_testMethod;
+ pSnmpGetMethod = snmp_getMethod;
+ pSnmpNextMethod = snmp_nextMethod;
+ pSnmpSetMethod = snmp_setMethod;
+
+ pSnmpLocalIoCommunityValidate = snmpLocalIoCommunityValidate;
+
+}
+
+void snmpLocalInitCommunityNames()
+{
+
+ /* community table for gets, NULL entry terminated */
+ getCmntyViewTbl[0].Cmnty = oam_getMibAddress(MIB_readCommunity);
+ getCmntyViewTbl[1].Cmnty = oam_getMibAddress(MIB_writeCommunity);
+
+ if (strlen(getCmntyViewTbl[0].Cmnty) == 0)
+ {
+ strcpy(getCmntyViewTbl[0].Cmnty, "public");
+ }
+
+ if (strlen(getCmntyViewTbl[1].Cmnty) == 0)
+ {
+ strcpy(getCmntyViewTbl[1].Cmnty, "private");
+ }
+}
+
+
+/*******************************************************************************
+* snmpLocalIoCommunityValidate - community validation routine
+*
+* This routine is used to set up the view-index field in the SNMP
+* packet. This product is shipped with defaults such that the "priv"
+* community is allowed to `set' variables, and the "pub" community is
+* allowed to `get' variables.
+*
+* The agent designer is required to write this function according to
+* the design of the application.
+*
+* RETURNS: 0 if the community is acceptable, otherwise 1.
+*/
+
+int snmpLocalIoCommunityValidate
+ (
+ SNMP_PKT_T * pPkt, /* ptr to snmp pkt */
+ SNMPADDR_T * pRemoteAddr, /* remote address */
+ SNMPADDR_T * pLocalAddr /* local address */
+ )
+{
+ int pktCmntyLen; /* length of community string
+ in received pkt */
+ CMNTY_TO_VIEW_T * pEntry; /* ptr to traverse community
+ to view tables */
+
+ char * pCmnty; /* ptr to Cmnty field */
+
+ /* We don't use private memory so set this to NULL else the
+ * hook to release this is invoked if non NULL
+ */
+
+ pPkt->user_private = (char *) 0;
+
+ /*
+ * Install the local and remote network addresses in the packet.
+ * These will be used later to respond to this pdu
+ */
+
+ (void) memcpy ((char *) &(pPkt->pkt_src), (char *) pRemoteAddr,
+ sizeof (struct sockaddr_in));
+ (void) memcpy((char *) &(pPkt->pkt_dst), (char *) pLocalAddr,
+ sizeof (struct sockaddr_in) );
+
+ pktCmntyLen = EBufferUsed (&(pPkt->community));
+
+ /* select get or set cmmunity to view table as appropriate */
+
+ pEntry = getCmntyViewTbl;
+
+
+ for ( pCmnty = pEntry->Cmnty; pCmnty != NULL;
+ ++ pEntry, pCmnty = pEntry->Cmnty)
+ {
+ if ((strlen (pCmnty) == pktCmntyLen) &&
+ (memcmp (pCmnty, pPkt->community.start_bp, pktCmntyLen) == 0))
+ {
+ pPkt->view_index = pEntry->viewIndex;
+ return (0);
+ }
+ }
+
+ /* Got a bad community if were here, so increment the
+ * snmpInBadCommunityNames counter
+ */
+
+ ++ snmp_stats.snmpInBadCommunityNames;
+
+ /* An auth fail trap may be sent here */
+
+ return (1);
+}
+
+int snmpSetCommunityNames(char *read, char *write)
+{
+ int retValue = STATUS_INVALID_PARAMS;
+
+ if (NULL == read || NULL == write)
+ {
+ return STATUS_INVALID_PARAMS;
+ }
+
+ retValue = oam_setMibByteAry(SNMP_AGENT_MODULE_ID, MIB_readCommunity, read, strlen(read)+1);
+
+
+ if (STATUS_OK == retValue)
+ {
+ printf ("Set read community = %s\n", read);
+ retValue = oam_setMibByteAry(SNMP_AGENT_MODULE_ID, MIB_writeCommunity, write, strlen(write)+1);
+ }
+
+ if ( STATUS_OK == retValue)
+ {
+ printf ("Set write community = %s\n", write);
+ }
+
+ return retValue;
+}
diff --git a/data/mnet/Common/snmp/src/snmp_fileio.c b/data/mnet/Common/snmp/src/snmp_fileio.c
new file mode 100644
index 0000000..24eb37b
--- /dev/null
+++ b/data/mnet/Common/snmp/src/snmp_fileio.c
@@ -0,0 +1,492 @@
+
+/*
+************************************************************************
+*
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*-----------------------------------------------------------------------
+*
+* FILE NAME: snmp_fileio.c
+*
+* DESCRIPTION: This file contains snmp agent file I/O routines
+*
+*
+* COMPONENTS:
+*
+*
+* NOTES:
+*
+* REVISION HISTORY:
+*----------+--------+---------------------------------------------------
+* Name | Date | Reason
+*----------+--------+---------------------------------------------------
+* Bhawani |02/28/00| Initial Draft
+*----------+--------+---------------------------------------------------
+************************************************************************
+*/
+
+/*
+************************************************************************
+* Common Include files
+************************************************************************
+*/
+#include <vxWorks.h>
+#include <stdlib.h>
+#include <stdio.h> /* for printf... */
+#include <string.h>
+
+#include <ioLib.h>
+#include <fioLib.h>
+#include <wdLib.h>
+#include <sysLib.h>
+#include <taskLib.h>
+#include <inetLib.h>
+#include <rebootLib.h>
+
+
+#include "vipermib.h" /* Get the MIB definitions. */
+#include "vipertbl.h" /* Control Table definitions. */
+
+
+/********************************************************************
+* Defines
+*********************************************************************/
+
+
+#define FMT_SPEC_STRING "%s.%u=\"%s\"\n"
+#define FMT_SPEC_NUMBER "%s.%u=\"%d\"\n"
+#define SIZE_MibTagName 128
+#define MAX_LINE SIZE_DisplayString + SIZE_MibTagName + 5
+#define MAX_PATH_NAME 256
+
+/********************************************************************
+* Global variables
+*********************************************************************/
+
+SEM_ID SnmpSemaIo; /* Snmp IO task semaphore */
+char SnmpMibFileNameBuffer[SIZE_DisplayString];
+
+/********************************************************************
+* Defined in vipermib.h
+*********************************************************************/
+
+extern int SnmpMibLoadCount;
+extern int SnmpMibSaveCount;
+extern int SnmpPostSetEnabled;
+extern int SnmpTimerMibFlushDelay;
+extern int SnmpTimerRebootDelay;
+extern int SnmpTimerRebootShortDelay;
+extern char SnmpDefaultMibFileName[];
+
+
+/********************************************************************
+* Routines
+*********************************************************************/
+
+char* StringToken( char* pszThis, char* pszDelims, char** ppszNext )
+{
+ size_t szToken;
+
+ if( pszThis == NULL )
+ pszThis = *ppszNext;
+
+ while( *pszThis != '\0' && 0 == ( szToken = strcspn( pszThis, pszDelims ) ) )
+ pszThis++; /* skipping leading delimiters */
+
+ switch( *pszThis )
+ {
+ case '\0':
+ return NULL;
+
+ case '"': /* remove this case if there's no need to treat quotation marks specially */
+ return StringToken( pszThis + 1, "\"", ppszNext );
+
+ default:
+ if( *( *ppszNext = pszThis + szToken ) != '\0' )
+ *(*ppszNext)++ = '\0';
+
+ return pszThis;
+ }
+}
+
+void StripEOL(char *pStr)
+{
+ int i;
+
+ if (NULL != pStr)
+ {
+ i = strlen(pStr);
+ if ((i > 0) && ((pStr[i-1] == '\r') || (pStr[i-1] == '\n')))
+ {
+ pStr[i-1] = 0;
+ }
+
+ i--;
+ if ((i > 0) && ((pStr[i-1] == '\r') || (pStr[i-1] == '\n')))
+ {
+ pStr[i-1] = 0;
+ }
+ }
+}
+
+
+/* writing mib varible to the file */
+Status snmp_writeString(FILE *fp, char *name, int idx, char *value)
+{
+
+ if ((NULL != value) && (0 != *value))
+ {
+ StripEOL(value);
+ fprintf (fp, FMT_SPEC_STRING, name, idx, value);
+ }
+ else
+ {
+ fprintf (fp, FMT_SPEC_STRING, name, idx, "");
+ }
+
+ return Success;
+}
+
+
+Status snmp_writeIpAddress(FILE *fp, char *name, int idx, UINT32 ip)
+{
+ return snmp_writeString(fp, name, idx, int2ip(ip));
+}
+
+
+Status snmp_writeNumber(FILE *fp, char *name, int idx, UINT32 number)
+{
+ fprintf (fp, FMT_SPEC_NUMBER, name, idx, (int) number);
+ return Success;
+}
+
+
+/* read mib varialbe from the file */
+Status snmp_parseLine(char *pszLine, char *pszTagName, int *pnInstance, char *pszValue)
+{
+ char *pToken;
+
+ if (!(pszLine && pszTagName && pnInstance && pszValue))
+ {
+ return Failure;
+ }
+ /* skip comments */
+
+ if (pszLine[0] == '#' || pszLine[0] == '!')
+ {
+ return Failure;
+ }
+
+ /* extract name */
+ pToken = StringToken(NULL, ".\n\r", &pszLine);
+ if (NULL == pToken)
+ {
+ return Failure;
+ }
+
+ pszTagName[SIZE_MibTagName] = 0;
+ strncpy(pszTagName, pToken, SIZE_MibTagName-1);
+
+
+ /* extract instance */
+ pToken = StringToken(NULL, "=\n\r", &pszLine);
+ if (NULL == pToken)
+ {
+ return Failure;
+ }
+ *pnInstance = atoi(pToken);
+
+ /* extract the value */
+ pToken = StringToken(NULL, " \t\n\r", &pszLine);
+
+ if (pToken == NULL)
+ {
+ return Failure;
+ }
+
+ pszValue[SIZE_DisplayString] = 0;
+ strncpy(pszValue, pToken, SIZE_DisplayString);
+ StripEOL(pszValue);
+ return Success;
+}
+
+
+Status snmp_saveMib(char *name)
+{
+ int i, j, end, tag, cnt = 0;
+ char tmpname[256];
+ Table *tbl;
+ FILE *fp;
+
+ DMSG("ascii mib", printf("snmp_saveMib('%s') called\n", name));
+
+ sprintf(tmpname, "%s.tmp",name);
+
+ /* Try to delete the tmp file */
+ unlink(tmpname);
+
+ if (NULL == (fp = fopen(tmpname, "w+")))
+ {
+
+ snmp_log(True, "Save MiB Error","Could not open file %s for writing (%s)", tmpname, strerror(errno));
+ return Failure;
+ }
+ SnmpMibSaveCount++;
+
+ for ( i=0; tag = mnetMibDataType[i].tag; i++)
+ {
+
+ if (mnetMibDataType[i].flag & SAVE_ASCII_OMIT)
+ {
+
+ DMSG("ascii mib", printf("snmp_saveMib. Skipping item %d, '%s', typ %d\n",
+ i, snmp_tagName(tag), mnetMibDataType[i].type));
+ continue;
+ }
+
+ DMSG("ascii mib", printf("snmp_saveMib. Procesisng item %d, '%s', typ %d\n",
+ i, snmp_tagName(tag), mnetMibDataType[i].type));
+
+ switch(MIB_TYP(tag))
+ {
+ case MTYPE_NUMBER:
+ snmp_writeNumber(fp, mnetMibDataType[i].name, 0, (INT32) snmp_getValue(tag));
+ break;
+
+ case MTYPE_IPADDR:
+ snmp_writeIpAddress(fp, mnetMibDataType[i].name, 0, (INT32) snmp_getValue(tag));
+ break;
+
+ case MTYPE_STRING:
+ snmp_writeString(fp, mnetMibDataType[i].name, 0, (char *) snmp_getValue(tag));
+ break;
+
+ case MTYPE_TNUMBER:
+
+ if ((tbl = snmp_getTableAddress(tag)))
+ {
+ end = table_end(tbl);
+ for (j=0; j < end; j++)
+ {
+ snmp_writeNumber(fp, mnetMibDataType[i].name, j, (INT32) snmp_getValue(tag, j));
+ }
+ }
+ break;
+
+ case MTYPE_TIPADDR:
+
+ if ((tbl = snmp_getTableAddress(tag)))
+ {
+ end = table_end(tbl);
+ for (j=0; j < end; j++)
+ {
+ snmp_writeIpAddress(fp, mnetMibDataType[i].name, j, (INT32) snmp_getValue(tag, j));
+
+ }
+ }
+ break;
+ case MTYPE_TSTRING:
+
+ if ((tbl = snmp_getTableAddress(tag)))
+ {
+ end = table_end(tbl);
+ for (j=0; j < end; j++)
+ {
+ snmp_writeString(fp, mnetMibDataType[i].name, j, (char *) snmp_getValue(tag, j));
+
+ }
+ }
+ break;
+
+ default:
+ DMSG("save mib", printf("Skipped Item %s (type= %d)", mnetMibDataType[i].name, MIB_TYP(tag)));
+ break;
+
+ } /*switch */
+ } /* for */
+ fclose(fp);
+
+ /* Now remove the target file. */
+ unlink(name);
+
+ /* Try to rename the tmp file to the target file */
+ if (rename(tmpname, name) == ERROR)
+ {
+ if (copy(tmpname, name) == ERROR)
+ {
+ snmp_log(False, "snmp_saveMib", "Error: Could not rename/copy file %s to %s: %s", tmpname, name, strerror(errno));
+ return Failure;
+ }
+ unlink(tmpname);
+ }
+
+ return Success;
+}
+
+
+Status snmp_loadMib( char *name)
+{
+ FILE *fs;
+ char buf[MAX_LINE];
+ UINT32 ip;
+
+ int i, idx, tag;
+ int line = 0;
+
+ char pszTagName[SIZE_MibTagName+1];
+ char pszValue[SIZE_DisplayString+1];
+
+ if (NULL == (fs = fopen(name, "r")))
+ {
+ snmp_log(True, "Load Mib Error", "Could not open file %s for reading: %s.", name, strerror(errno));
+ return Failure;
+ }
+
+ snmp_log(False, "snmp_loadMib", "Loading mib from file %s", name);
+ SnmpMibLoadCount++;
+
+ while (NULL != fgets(buf, MAX_LINE, fs))
+ {
+ line++;
+ if (Failure == snmp_parseLine(buf, pszTagName, &idx, pszValue))
+ {
+ continue;
+ }
+
+ /* Search the tagname */
+ for ( i=0; mnetMibDataType[i].tag; i++)
+ {
+ if (!strcmp(mnetMibDataType[i].name, pszTagName))
+ {
+ break;
+ }
+ }
+
+ tag = mnetMibDataType[i].tag;
+
+ if (0== tag)
+ {
+ snmp_log(True, "Load Mib Error", "%s(%d): %s is not a valid tag.", name, line, pszTagName);
+ continue;
+ }
+
+ switch(MIB_TYP(tag))
+ {
+ case MTYPE_NUMBER:
+ case MTYPE_TNUMBER:
+ snmp_setEntry(tag, idx, (void *) atoi(pszValue), 4);
+ break;
+
+ case MTYPE_IPADDR:
+ case MTYPE_TIPADDR:
+ if (ERROR != (ip = inet_addr(pszValue)))
+ {
+ snmp_setEntry(tag, idx, (void *) ip, 4);
+ }
+ else
+ {
+ /* in case the ip addres is saved as plain integer */
+ snmp_setEntry(tag, idx, (void *) atoi(pszValue), 4);
+ }
+
+ break;
+
+ case MTYPE_STRING:
+ case MTYPE_TSTRING:
+ snmp_setEntry(tag, idx, (void *) pszValue, strlen(pszValue));
+ break;
+
+ default:
+ snmp_log(True, "Load Mib Warning", "%s(%d): tag %s (type=%d) is not not loadable tag.", name, line, pszTagName, MIB_TYP(tag));
+ break;
+ } /* switch */
+ } /* fgets */
+ fclose(fs);
+
+ /* Set SNMP Agent's status */
+ agent_setSnmpEnabled(oam_isSnmpEnabled());
+
+ /* update FTP Server status */
+ oam_setFtpEnabled(oam_isFtpEnabled());
+
+ return Success;
+}
+
+
+/********************************************************************
+* snmp Mib Save Timer
+*********************************************************************/
+WDOG_ID SnmpWdTimer;
+BOOL bIsMibSaveTimerActive = FALSE;
+
+
+void snmp_mibTimerInit()
+{
+ SnmpWdTimer = wdCreate();
+}
+
+void snmp_mibTimerDelete()
+{
+ wdDelete(SnmpWdTimer);
+}
+
+int snmpMibWriteDelayTimeoutHandler(int arg)
+{
+ char *name = (char *) arg;
+
+ /*memset(SnmpMibFileNameBuffer, 0, SIZE_DisplayString); */
+ strncpy(SnmpMibFileNameBuffer, name, SIZE_DisplayString-1);
+ SnmpMibFileNameBuffer[SIZE_DisplayString-1] = 0;
+ semGive (SnmpSemaIo);
+ bIsMibSaveTimerActive = FALSE;
+ return Success;
+};
+
+void snmp_mibTimerSet(char* arg)
+{
+ if (TRUE == bIsMibSaveTimerActive)
+ {
+ wdCancel(SnmpWdTimer);
+ }
+ wdStart(SnmpWdTimer, SnmpTimerMibFlushDelay*sysClkRateGet(), snmpMibWriteDelayTimeoutHandler, (int) arg);
+ bIsMibSaveTimerActive = TRUE;
+}
+
+int snmp_reboot(int delay)
+{
+ SnmpPostSetEnabled = False;
+
+ if (TRUE == bIsMibSaveTimerActive)
+ {
+ wdCancel(SnmpWdTimer);
+ if (delay < SnmpTimerRebootShortDelay)
+ {
+ delay = SnmpTimerRebootShortDelay;
+ }
+ SnmpTimerRebootDelay = delay*sysClkRateGet();
+ snmpMibWriteDelayTimeoutHandler((int) SnmpDefaultMibFileName);
+ }
+ return OK;
+}
+
+int snmp_ioThread(int arg)
+{
+ do
+ {
+ semTake (SnmpSemaIo, WAIT_FOREVER);
+ snmp_saveMib(SnmpMibFileNameBuffer);
+ }while (SnmpTimerRebootDelay <= 0);
+
+ taskDelay(SnmpTimerRebootDelay);
+ reboot(0);
+ return OK;
+}
+
+void snmp_initIoTask()
+{
+
+ SnmpSemaIo = semBCreate (SEM_Q_FIFO, SEM_EMPTY);
+ taskSpawn("tSnmpIo", 100, 0, 40000, (FUNCPTR) snmp_ioThread,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+}
+
diff --git a/data/mnet/Common/snmp/src/snmp_trap.c b/data/mnet/Common/snmp/src/snmp_trap.c
new file mode 100644
index 0000000..cde12be
--- /dev/null
+++ b/data/mnet/Common/snmp/src/snmp_trap.c
@@ -0,0 +1,437 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000-2001 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : snmp_trap.h */
+/* Author(s) : Bhawani Sapkota */
+/* Create Date : 02/05/01 */
+/* Description : This file contains routines to send SNMP enterprise */
+/* trap to multiple destinations. */
+/* */
+/*********************************************************************/
+/* REVISION HISTORY */
+/*___________________________________________________________________*/
+/*----------+--------+-----------------------------------------------*/
+/* Name | Date | Reason */
+/*----------+--------+-----------------------------------------------*/
+/* Bhawani |02/05/01| Initial Draft */
+/*----------+--------+-----------------------------------------------*/
+/*********************************************************************/
+
+
+/*******************************************************************************
+** Include Files
+*******************************************************************************/
+
+
+#include <vxWorks.h>
+#include <sys/socket.h>
+#include <snmpdLib.h>
+#include <snmpIoLib.h>
+#include <hostLib.h>
+#include <inetLib.h>
+
+#include <symLib.h>
+#include <sysSymTbl.h>
+#include <loadLib.h>
+#include <usrLib.h>
+#include <stdio.h>
+#include <taskLib.h>
+
+#include "oam_api.h"
+
+/* Allocation default severity of AlarmCode space per module */
+#define ALARM_CRITICAL_START_POINT 0x0001
+#define ALARM_MAJOR_START_POINT 0x0100
+#define ALARM_MINOR_START_POINT 0x0800
+#define ALARM_INFO_START_POINT 0x1000
+
+#define ALARM_SEV_CRITICAL 1
+#define ALARM_SEV_MAJOR 2
+#define ALARM_SEV_MINOR 3
+#define ALARM_SEV_INFORMATION 4
+
+#define MAX_LINE 512
+#define CLEAN_MSG 40
+
+struct alarmDetail_t
+{
+ int code;
+ char *synopsis;
+ char *detail;
+ struct alarmDetail_t *next;
+};
+
+typedef struct alarmDetail_t AlarmEntry;
+
+AlarmEntry *AlarmListEntryHead = NULL;
+/*-------------------------------------------------------------------------------*/
+AlarmEntry *
+ReadAlarmFile()
+{
+ FILE *fp;
+ char buffer[MAX_LINE];
+ char *subject1=NULL,*subject2=NULL;
+ AlarmEntry *head=NULL, *node=NULL, *tmpNode;
+ int len,i=0,j,slen;
+
+
+ memset(buffer, 0, MAX_LINE);
+ strcpy(buffer, getenv( "MNET_BASE" ));
+ strcat(buffer,"/Alarm/AlarmCode.English");
+
+ fp = fopen(buffer, "r");
+ if (fp == NULL)
+ {
+ printf("Cannot open Alarm Code file: %s\n", buffer);
+ perror("Reason:");
+ return NULL;
+ }
+
+ while(fgets(buffer, MAX_LINE, fp) != NULL)
+ {
+ /* skip line starting with / or # as comments */
+ if (buffer[0] =='/' || buffer[0] == '#')
+ continue;
+
+ tmpNode = (AlarmEntry *) malloc(sizeof(AlarmEntry));
+ if (tmpNode == NULL)
+ {
+ printf("tmpNode Memory Allocaton Failure");
+ break;
+ }
+
+ if (head == NULL)
+ {
+ head = node = tmpNode;
+ } else {
+ node->next = tmpNode;
+ node = node->next;
+ }
+
+ sscanf(buffer, "%d", &node->code);
+
+ subject1 = strstr(buffer, "|");
+ subject1++; i=0;
+ while(subject1[i++] != '|');
+
+ subject2 = strstr(subject1, "|");
+ subject2++;
+
+ node->synopsis = malloc(i);
+ memset(node->synopsis,0,i);
+ if(node->synopsis == NULL)
+ {
+ printf("synopsis : Memory Allocaton(%d) Failure\n%s\n",i,subject1);
+ break;
+ }
+ for(j=0;j<i - 1 ;j++)
+ node->synopsis[j]=subject1[j];
+
+
+
+ /* remove the end of line */
+ slen = strlen(subject2);
+ node->detail = malloc(slen+1);
+ memset(node->detail,0,slen+1);
+ if(node->detail == NULL)
+ {
+ printf("detail : Memory Allocaton(%d) Failure\n%s\n",slen,subject2);
+ break;
+ }
+ for(j=0;j<slen - 1 ;j++)
+ node->detail[j]=subject2[j];
+ }
+
+ fclose(fp);
+ if (node != NULL)
+ {
+ node->next = NULL;
+ }
+ return head;
+}
+
+
+char *trapAlarmDetail(int errorcode)
+{
+
+ AlarmEntry *tmpNode;
+ char *noDetail="Undifined alarm code";
+
+ if (AlarmListEntryHead == NULL)
+ AlarmListEntryHead = ReadAlarmFile();
+
+ tmpNode = AlarmListEntryHead;
+
+ while( tmpNode && tmpNode->code != errorcode)
+ {
+ tmpNode = tmpNode->next;
+ }
+
+ if ( tmpNode != NULL){
+ return tmpNode->synopsis;
+ }
+ return noDetail;
+}
+
+/*******************************************************************************
+*
+* Snmp Trap Callback Var Bind Data
+*/
+
+typedef struct SnmpTrapCallbackData_
+{
+ MibTag mibTag;
+ int snmpVersion;
+}SnmpTrapCallbackData;
+
+static INT_32_T getAlarmSev(INT_32_T errorCode)
+{
+ INT_32_T alarmCode;
+
+ alarmCode=(errorCode&0xFFFF);
+
+ if(alarmCode >= ALARM_INFO_START_POINT)
+ return ALARM_SEV_INFORMATION;
+ if(alarmCode >= ALARM_MINOR_START_POINT)
+ return ALARM_SEV_MINOR;
+ if(alarmCode >= ALARM_MAJOR_START_POINT)
+ return ALARM_SEV_MAJOR;
+
+ return ALARM_SEV_CRITICAL;
+}
+
+/*******************************************************************************
+*
+* trapBindVals - bind values in the trap
+*
+* This routine binds snmpv2 format variable to Snmp packet.
+*
+* RETURNS: OK, or ERROR if the bind to the SNMP packet fails
+*/
+
+
+
+int snmp_trapBindVals
+(
+ SNMP_PKT_T * pkt, /* internal representation of SNMP packet */
+ void * vals /* null cookie */
+ )
+{
+ static OIDC_T sysUpTimeOid [] = {1, 3, 6, 1, 2, 1, 1, 3, 0};
+ static OIDC_T snmpTrapOID [] = {1, 3, 6, 1, 6, 3, 1, 1, 4, 1, 0};
+
+ INT_32_T errorCode;
+ int i = 0;
+ int mid,severity;
+ char *alarmDetail;
+ char *moduleName;
+ char *alarmClearMsg="Module alarm has cleared.";
+
+ extern OIDC_T sysTrapOid [];
+ extern OIDC_T snmpTrapEventOid[];
+ extern OIDC_T errorCodeOamOid[];
+
+ extern OIDC_T trapAlarmModuleNameOid[];
+ extern OIDC_T trapAlarmCodeOid[];
+ extern OIDC_T trapAlarmDescOid[];
+
+ extern int SIZE_sysTrapOid;
+ extern int SIZE_snmpTrapEventOid;
+ extern int SIZE_errorCodeOamOid;
+
+ extern int SIZE_trapAlarmModuleNameOid;
+ extern int SIZE_trapAlarmCodeOid;
+ extern int SIZE_trapAlarmDescOid;
+
+
+ SnmpTrapCallbackData *pSnmpTrapCallbackData = ( SnmpTrapCallbackData*) vals;
+ MibTag tag = pSnmpTrapCallbackData->mibTag;
+ int version = pSnmpTrapCallbackData->snmpVersion;
+
+ int itm = MIB_ITM(tag);
+
+ static char fname[] = "snmp_trapBindVals";
+
+ LOG_TRACE(("Processing Trap Bind Vals for tag %s", snmp_tagName(tag)));
+
+ /* Release the Trap data first */
+ free (pSnmpTrapCallbackData);
+
+ /* First get the value of the error code */
+ errorCode = snmp_getValue(tag);
+ moduleName=GetMnetModuleName(itm - 1);
+
+ if(errorCode){
+ alarmDetail=trapAlarmDetail(errorCode);
+ severity=getAlarmSev(errorCode);
+ }
+ else
+ {
+ alarmDetail=alarmClearMsg;
+ severity=ALARM_SEV_INFORMATION;
+ }
+
+ snmpTrapEventOid[SIZE_snmpTrapEventOid-1] = severity;
+ errorCodeOamOid[SIZE_errorCodeOamOid-1] = itm;
+
+ if(version == SNMP_VERSION_2)
+ {
+ /* Bind the System upTime as the first variable */
+ if ((SNMP_Bind_Integer (pkt, i++, sizeof sysUpTimeOid / sizeof sysUpTimeOid [0], sysUpTimeOid,
+ ((tickGet()/sysClkRateGet())*100))) == -1)
+ return (ERROR);
+
+ /* Bind sys Trap OID */ /* Raju: Change sysTrapOid to snmpTrapOID to make it work with HPOV */
+ if ((SNMP_Bind_Object_ID (pkt, i++, sizeof snmpTrapOID/sizeof snmpTrapOID[0], snmpTrapOID,
+ SIZE_snmpTrapEventOid, snmpTrapEventOid)) == -1)
+ return (ERROR);
+ }
+
+ if (SNMP_Bind_String(pkt,i++,SIZE_trapAlarmModuleNameOid,trapAlarmModuleNameOid,VT_STRING,strlen(moduleName),moduleName,0) == -1)
+ {
+ printf("SNMP_Bind_String error in moduleName(%s)\n",moduleName);
+ return (ERROR);
+ }
+
+ if ((SNMP_Bind_Integer (pkt, i++, SIZE_trapAlarmCodeOid, trapAlarmCodeOid, errorCode)) == -1)
+ return (ERROR);
+
+ if (SNMP_Bind_String(pkt,i++,SIZE_trapAlarmDescOid,trapAlarmDescOid,VT_STRING,strlen(alarmDetail),alarmDetail,0) == -1)
+ {
+ printf("SNMP_Bind_String error in alarmDetail(%s)\n",alarmDetail);
+ return (ERROR);
+ }
+
+ return (OK);
+}
+
+
+/*******************************************************************************
+*
+* TrapFwdEntry - Get the Trap table entry
+*
+* RETURNS: Trap Table entry or NULL
+*/
+
+TrapFwdEntry *snmp_trapEntryGet(int idx)
+{
+ TrapFwdEntry *trapEntry;
+
+ trapEntry = (TrapFwdEntry *) snmp_getAddress(MIBT_trapFwdEntry, idx);
+
+ if (trapEntry->trapIpAddress != NULL)
+ {
+ return trapEntry;
+ }
+ return NULL;
+
+}
+
+/*******************************************************************************
+*
+* snmp_trapBroadcast - send a SNMP enterprise specific to all the destination
+* configured at trap config table.
+*
+*
+* RETURNS: N/A
+*/
+
+void snmp_trapBroadcast(MibTag tag)
+{
+ void * pDestAddr[1]; /* array of pointers to hosts */
+ struct sockaddr_in destAddr[1]; /* inet. domain addr. struct */
+ u_long snmpLocalIP; /* trap sender's ipaddress */
+ IMPORT int snmpSocket; /* socket descriptor for snmp */
+ char localhostname[MAXHOSTNAMELEN];
+ TrapFwdEntry* pTrapEntry;
+ int index;
+
+ extern OIDC_T enterpriseOid[];
+ extern int SIZE_enterpriseOid;
+
+ SnmpTrapCallbackData *pSnmpTrapCallbackData = NULL;
+ static char fname[] = "snmp_trapBroadcast";
+
+
+ /* agent's ipaddress converted from dot to long integer in network order */
+ gethostname(localhostname, MAXHOSTNAMELEN);
+ snmpLocalIP = hostGetByName(localhostname);
+
+ destAddr[0].sin_family = AF_INET;
+ pDestAddr[0] = &destAddr[0];
+
+ for (index = 0; index < TrapFwdTableLimit; index++)
+ {
+ pTrapEntry = snmp_trapEntryGet(index);
+
+
+ if (pTrapEntry)
+ {
+ LOG_TRACE(("Trap Entry type=%d, ip=%#x, port=%d, community=%s", pTrapEntry->trapType,
+ pTrapEntry->trapIpAddress, pTrapEntry->trapPort, pTrapEntry->trapCommunity));
+
+ destAddr[0].sin_port = htons (pTrapEntry->trapPort);
+ destAddr[0].sin_addr.s_addr = pTrapEntry->trapIpAddress;
+
+ pSnmpTrapCallbackData = (SnmpTrapCallbackData *) malloc(sizeof(SnmpTrapCallbackData));
+ pSnmpTrapCallbackData->mibTag = tag;
+
+ if (pTrapEntry->trapType == VAL_trapType_snmpv1Trap)
+ {
+ pSnmpTrapCallbackData->snmpVersion = SNMP_VERSION_1;
+
+ snmpdTrapSend
+ (
+ &snmpSocket, /* void* snmp agent transport endpoint */
+ 1, /* int number of destinations */
+ pDestAddr, /* void** array of ptrs to destinations */
+ NULL, /* void* local address */
+ SNMP_VERSION_1, /* int SNMP version */
+ pTrapEntry->trapCommunity, /* char* trap community string */
+ enterpriseOid, /* OIDC_T* agent object identifier */
+ SIZE_enterpriseOid, /* int length of agent object identifier */
+ &snmpLocalIP, /* u_long* ip address of sender */
+ ENTERPRISE_SPECIFIC, /* int trap type */
+ MIB_ITM(tag), /* int trap specific code */
+ 3, /* int number of varbinds in packet */
+ snmp_trapBindVals, /* FUNCPTR routine to bind varbinds */
+ (void*) pSnmpTrapCallbackData /* void* argument to binding routine */
+ );
+
+ }
+ else
+ {
+ pSnmpTrapCallbackData->snmpVersion = SNMP_VERSION_2;
+ snmpdTrapSend
+ (
+ &snmpSocket, /* void* snmp agent transport endpoint */
+ 1, /* int number of destinations */
+ pDestAddr, /* void** array of ptrs to destinations */
+ NULL, /* void* local address */
+ SNMP_VERSION_2, /* int SNMP version */
+ pTrapEntry->trapCommunity, /* char* trap community string */
+ NULL, /* OIDC_T* agent object identifier */
+ 0, /* int length of agent object identifier */
+ &snmpLocalIP, /* u_long* ip address of sender */
+ ENTERPRISE_SPECIFIC, /* int trap type */
+ 0, /* int trap specific code */
+ 5, /* int number of varbinds in packet */
+ snmp_trapBindVals, /* FUNCPTR routine to bind varbinds */
+ (void*) pSnmpTrapCallbackData /* void* argument to binding routine */
+ );
+ }
+
+
+ }
+ }
+}
+
+
diff --git a/data/mnet/Common/snmp/src/table.c b/data/mnet/Common/snmp/src/table.c
new file mode 100644
index 0000000..b12733d
--- /dev/null
+++ b/data/mnet/Common/snmp/src/table.c
@@ -0,0 +1,1129 @@
+/*--------------------------------------------------------------------------
+ *
+ * table.c Table handling routines
+ *
+ * This is a collection of routines that provide a simple method of
+ * handling a set of data structures.
+ *
+ * Add more and a simple tutorial.
+ *
+ * tbl = table_create(sizeof(TableEntry))
+ * table_free(tbl)
+ *
+ * Another way to look at the difference in this routine is where is in
+ * who's process space does the memory block reside? When one grabs the
+ * pointer to a row of a table, the table is managed by the SNMP manager
+ * and a pointer to the "live" data is returned. On the other hand, when
+ * one uses this function, rather than refering to the "live" data, a
+ * copy of the data is made into the buffer the task specified.
+ *
+ * You may have noticed that table_setRow is the only set function for
+ * the table routines. Since the table_getNth routines return a pointer
+ * to the table row, it is not necessary to have an equivalent set of
+ * functions to write the data. The following code fragment illustrates
+ * the difference:
+ *
+ * typedef struct Entry_t {
+ * int item1;
+ * int item2;
+ * int item3;
+ * } Entry;
+ *
+ * Table *tbl;
+ * Entry entry, *row;
+ * int idx;
+ *
+ * tbl = table_alloc(sizeof(Entry));
+ *
+ * The first method of loading entries into the table:
+ *
+ * idx = -1;
+ * while (++idx < 10) {
+ * entry.item1=1;
+ * entry.item2=2;
+ * entry.item3=3;
+ * table_setEntry(tbl, idx, &entry, sizeof(Entry));
+ * }
+ *
+ * The second method of loading entries into the table:
+ *
+ * table_extend(tbl, 10); * Extend the table to handle 10 rows.
+ * idx = -1; * Otherwise table_getNth will return
+ * while (++idx < 10) { * a NULL ptr if the row is not there.
+ * row = (Entry *)table_getRow(tbl, idx);
+ * row->item1=1;
+ * row->item2=2;
+ * row->item3=3;
+ * }
+ *
+ *--------------------------------------------------------------------------*/
+
+/*--------------------------------------------------------------------------
+ *
+ * table_create Allocate and initialize the Table control structure.
+ *
+ * tbl = table_create(row_size)
+ * Table *tbl; * Pointer to a table.
+ * int row_size; * size of a row.
+ *
+ * Return:
+ * tbl = A pointer to the initialized Table.
+ * null = Unable to allocate the memory to initialize the table.
+ *
+ * This routine is used to allocate a table. Tables consist of a table
+ * control structure and an array that contains the data in the table.
+ * When you create the table, you need to specify the size of the rows
+ * in the table. This is used when the table_* routines need to extend
+ * the table to accomidate new entries.
+ *
+ *--------------------------------------------------------------------------*/
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include "table.h"
+
+Table *
+table_create(
+ int size)
+{
+ Table *tbl;
+
+ if (!(tbl = (Table *) malloc(sizeof(Table))))
+ return False;
+
+ memset(tbl, 0, sizeof(Table)); /* malloc does not clear memory. */
+ tbl->magic = (Int16) TABLE_VALID; /* Mark this as a table. */
+ if (size < 4) /* Enforce a minimum limit. 4 bytes */
+ size = 4; /* is the same as a 32 bit word. */
+ tbl->size = size; /* Save the row size. */
+ tbl->end = -1; /* Nothing is in the table yet so*/
+ tbl->index = -1; /* all the indicies to indicate this */
+ tbl->status = Success; /* Mark this operation as successful.*/
+ tbl->insert = -1;
+ return tbl;
+}
+
+/*--------------------------------------------------------------------------
+ *
+ * err = table_free(tbl)
+ * Status err; * Success or Failure (invalid tbl).
+ * Table *tbl; * Pointer to a table.
+ *
+ * This routine is used to release a table when it is no longer in use.
+ * This will deallocate and return the memory used to store the table
+ * back to the system.
+ *
+ *--------------------------------------------------------------------------*/
+
+Status
+table_free(
+ Table *tbl)
+{
+ if (!tbl || (tbl->magic != TABLE_VALID))
+ return Failure;
+
+ tbl->magic = (Int16) TABLE_FREE; /* Mark the table as free. */
+ if (tbl->data) /* Then free the data array. */
+ free(tbl->data); /* Followed by the table control */
+ free(tbl); /* structure. */
+
+ return Success;
+}
+
+/*--------------------------------------------------------------------------
+ *
+ * table_getRow Return a pointer to the particular row in a table.
+ *
+ * row = table_getRow(tbl, idx);
+ * void *row; * Pointer to the entry for the row.
+ * Table *tbl; * Pointer to the table
+ * int idx; * Index of the desired row.
+ *
+ * This is a set of routines that are used to recover a pointer to the
+ * each row of data that is stored in the table. As the name of each
+ * routine indicates, they allow various ways to walk through the
+ * contents of the table. For this set of routines, there is no status
+ * return. Since these routines return a pointer to the row entry, if
+ * there was an error (i.e. an invalid table or no more entries), then
+ * a null pointer is returned.
+ *
+ *--------------------------------------------------------------------------*/
+
+void *
+table_getRow(
+ Table *tbl,
+ int idx)
+{
+ void *addr;
+
+ if (!VALID_TABLE(tbl))
+ return Failure;
+
+
+ if (idx < 0 || (idx > tbl->end)) {
+ tbl->status = Failure;
+ return Failure;
+ }
+ if (!tbl->data) { /* Logically can't happen, parinoia abounds */
+ tbl->status = Failure;
+ return Failure;
+ }
+
+ if (tbl->magic == TABLE_SORT) { /* Does the table need sorting? */
+ if (tbl->sort) {
+ DMSG("sort", printf("Calling sort procedure. qsort(tbl->data @%x, tbl->end %d, tbl->size %d, tbl->sort @%x\n",
+ (int) tbl->data, tbl->end+1, tbl->size, (int) tbl->sort));
+ qsort(tbl->data, tbl->end+1, tbl->size, tbl->sort);
+ }
+ tbl->magic = TABLE_VALID;
+ }
+ tbl->index = idx;
+ addr = (void *) ((int)tbl->data + (idx*tbl->size));
+ return addr;
+}
+
+/*--------------------------------------------------------------------------
+ *
+ * table_rowPointer Return a pointer to the particular row in a table.
+ *
+ * row = table_rowPointer(tbl, idx);
+ * void *row; * Pointer to the entry for the row.
+ * Table *tbl; * Pointer to the table
+ * int idx; * Index of the desired row.
+ *
+ * This is almost identical to the above routine. However, it does not
+ * cause the table to be sorted if it is out of order. This is called
+ * by the table_setEntry and table_setValue routines. When we set values,
+ * we do not worry if the table is in order. The magic flag will be get
+ * set to indicate the table is out of order. This will cause the table
+ * to be sorted before an item is retrieved with either table_getValue
+ * or table_getRow.
+ *
+ *--------------------------------------------------------------------------*/
+
+void *
+table_rowPointer(
+ Table *tbl,
+ int idx)
+{
+ void *addr;
+
+ if (!VALID_TABLE(tbl))
+ return Failure;
+
+ if (idx < 0 || (idx > tbl->end)) {
+ tbl->status = Failure;
+ return Failure;
+ }
+
+ if (!tbl->data) { /* Logically can't happen, parinoia abounds */
+ tbl->status = Failure;
+ return Failure;
+ }
+
+ tbl->index = idx;
+ addr = (void *) ((int)tbl->data + (idx * tbl->size));
+ return addr;
+}
+/*--------------------------------------------------------------------------
+ *
+ * table_getValue Return a value or a pointer to a table entry.
+ *
+ * value = table_getValue(tbl, idx);
+ * void *value; * Pointer to the entry for the row.
+ * Table *tbl; * Pointer to the table
+ * int idx; * Index of the desired row.
+ *
+ * This is a specialized form of the table_getRow call. A very handy
+ * use of the table routines is to manage a array of opaque 32 bit values
+ * such as pointers to data structures. There is special handling for the
+ * table in this case. Essentially, if the table is 4 or less bytes wide,
+ * we return the contents of the table item rather than a pointer to the
+ * contents of the data item. In this case table_getRow() will return a
+ * pointer to the table item rather than the contents. These types of
+ * tables can be sorted as well, in which case the qsort function has to
+ * take into account the indirection of the arguments.
+ *
+ *--------------------------------------------------------------------------*/
+
+void *
+table_getValue(
+ Table *tbl,
+ int idx)
+{
+ void *value;
+
+ if ((value = table_getRow(tbl, idx)) &&
+ (tbl->size <= 4))
+ value = (void *)*(void **)value;
+
+ return value;
+}
+
+/*--------------------------------------------------------------------------
+ *
+ * table_get.... Retrieve various entries in the table.
+ *
+ * row = table_getFirst(tbl);
+ * row = table_getLast(tbl);
+ * row = table_getNext(tbl);
+ * row = table_getPrev(tbl);
+ *
+ * These are variations of the table_getRow routine. They are used to
+ * sequentially walk through the table. The functionality is similar to
+ * walking through a doublely linked list.
+ *
+ *--------------------------------------------------------------------------*/
+void *
+table_getFirst(
+ Table *tbl)
+{ /* Just get the first entry in the*/
+ return table_getRow(tbl, 0); /* table. getRow does the validate*/
+}
+
+void *
+table_getLast( /* This time, we need to look into*/
+ Table *tbl) /* tbl header, so we have to make */
+{ /* shure we have a valid header. */
+ if (!VALID_TABLE(tbl))
+ return Failure;
+
+ return table_getRow(tbl, tbl->end);
+}
+
+void *
+table_getPrev( /* This one works off of tbl->idx*/
+ Table *tbl) /* which reflects the cur entry. */
+{
+ if (!VALID_TABLE(tbl))
+ return Failure;
+
+ return table_getRow(tbl, tbl->index-1);
+}
+
+void *
+table_getNext( /* This one retrieves that next */
+ Table *tbl) /* sequential entry in the table. */
+{
+ if (!VALID_TABLE(tbl))
+ return Failure;
+
+ return table_getRow(tbl, tbl->index+1);
+}
+
+/*--------------------------------------------------------------------------
+ *
+ * err = table_getEntry(tbl, idx, row, size);
+ * Table *tbl; * Pointer to the table.
+ * int idx; * The desired row index.
+ * char *row; * Buffer to receive entry data.
+ * int size; * Size of the buffer.
+ *
+ * The row entry itself can be retrieved, rather than a pointer to the
+ * row. At this level, the entry is seen as some number of bytes that
+ * are to be stores into a buffer. The size parameter specifies the
+ * size of the buffer that is being copied into. It may be less than
+ * the size specified for a row in the initial table_alloc() function.
+ * However, in this case, the state of the "extra" bytes at the end of
+ * the entry is undetermined. In any case, the smaller of the two values
+ * is used to determine the amount of data copied.
+ *
+ *--------------------------------------------------------------------------*/
+
+Status
+table_getEntry(
+ Table *tbl, /* Pointer to the table. */
+ int idx, /* The desired row index. */
+ void *row, /* Buffer to receive entry data. */
+ int size) /* Size of the buffer. */
+{
+ void *ent;
+
+ if ((ent = table_getRow(tbl, idx)) == Failure)
+ return Failure;
+
+ memcpy(row, ent, tbl->size < size ? tbl->size : size);
+
+ tbl->status = Success;
+ return Success;
+}
+
+/*--------------------------------------------------------------------------
+ *
+ * err = table_setEntry(tbl, idx, row, size);
+ * Table *tbl; * Pointer to the table.
+ * int idx; * The desired row index.
+ * Entry *row; * Buffer to receive entry data.
+ * int size; * Size of the buffer.
+ *
+ * This function is the coverse of getRow. This is used to set the
+ * value of a row. The contents of the entry is simply copied to the
+ * table. The lesser of the buffer size or the row size specified when
+ * the table was created governs the amount of data that is copied.
+ *
+ *--------------------------------------------------------------------------*/
+
+Status
+table_setEntry(
+ Table *tbl,
+ int idx,
+ void *row,
+ int size)
+{
+
+ void *ent;
+
+ if (!VALID_TABLE(tbl))
+ return Failure;
+
+ if (idx >= tbl->last) /* Is the table large enough? */
+ if (table_extend(tbl, idx) == Failure) { /* No, extend it. */
+ DMSG("table", printf("table_setEntry: TableExtend failed.\n"));
+ return Failure; /* Oops, alloc failed*/
+ }
+ if ((ent = table_rowPointer(tbl, idx)) == Failure) {
+ DMSG("table", printf("table_setEntry: table_rowPointer(tbl, %d) failed!\n", idx));
+ return Failure;
+ }
+ memcpy(ent, row, tbl->size < size ? tbl->size : size);
+
+ if (tbl->sort) /* Is this a sorted table ? */
+ tbl->magic = TABLE_SORT; /* Yes, trigger a qsort. */
+
+ if (idx > tbl->end) /* Keep track of the largest */
+ tbl->end = idx; /* entry allocated in tbl->data */
+
+ tbl->index = idx;
+ tbl->status = Success;
+ tbl->insert = idx;
+ return Success;
+}
+
+/*--------------------------------------------------------------------------
+ *
+ * err = table_addEntry(tbl, row, size);
+ * Table *tbl; * Pointer to the table.
+ * Entry *row; * Buffer to receive entry data.
+ * int size; * Size of the buffer.
+ *
+ * This function is used to add an entry to the end of a list. We
+ * simply call table_setEntry with the tbl->end+1 as the index. If
+ * this is a sorted list, table_setEntry will set the TABLE_SORT
+ * magic flag so that the table will get sorted prior to get access.
+ *
+ *--------------------------------------------------------------------------*/
+
+Status
+table_addEntry(
+ Table *tbl,
+ char *row,
+ int size)
+{
+
+ if (!VALID_TABLE(tbl))
+ return Failure;
+
+ if (tbl->end+1 >= tbl->last) /* Is the table large enough? */
+ if (table_extend(tbl, tbl->end+1) == Failure) { /* No, extend it. */
+ DMSG("table", printf("table_addEntry: TableExtend failed.\n"));
+ return Failure; /* Oops, alloc failed*/
+ }
+ return table_setEntry(tbl, ++tbl->end, row, size);
+}
+
+Status
+table_addValue(
+ Table *tbl,
+ int value)
+{
+ void *row;
+ int size;
+
+ if (!VALID_TABLE(tbl))
+ return Failure;
+
+ row = (void *)&value;
+ size = sizeof(int);
+
+ if (++tbl->end >= tbl->limit)
+ if (tbl->magic == TABLE_BUFFER)
+ bcopyLongs(tbl->data + 4, tbl->data, tbl->end--);
+
+ return table_setEntry(tbl, tbl->end, row, size);
+}
+
+Status
+table_removeEntry(
+ Table *tbl,
+ int row)
+{
+
+ if (!VALID_TABLE(tbl))
+ return Failure;
+
+ if ((row < 0) || (row > tbl->end)) {
+ tbl->status = Failure;
+ return Failure;
+ }
+
+ if (row == tbl->end) { /* Is this the last item in the table ? */
+ tbl->end--; /* Yes, just reduce the end pointer to */
+ tbl->status = Success; /* eliminate the item. */
+ return Success;
+ }
+
+ tbl->index = row;
+ bcopy(tbl->data+((row+1)*tbl->size), tbl->data+(row*tbl->size), (tbl->end+1-row)*tbl->size);
+
+ tbl->end--;
+ tbl->status = Success;
+
+ return Success;
+}
+
+Status
+table_buffer(
+ Table *tbl,
+ int rows)
+{
+
+ if (!VALID_TABLE(tbl))
+ return Failure;
+
+ tbl->magic = TABLE_BUFFER;
+ tbl->end = -1;
+ tbl->insert = -1;
+ tbl->limit = rows;
+
+ DMSG("table", printf("table_buffer('0x%x', %d) end= %d\n", (int)tbl, rows, tbl->end) );
+
+ return Success;
+}
+
+/*--------------------------------------------------------------------------
+ *
+ * table_extend Extend the size of a table.
+ *
+ * err = table_extend(tbl, rows)
+ * Table *tbl; * Pointer to a table.
+ * int rows; * Maximum number of rows to accomidate
+ *
+ * Return:
+ * Success = the table is large enough to handle the desired # of rows
+ * Failure = invalid table pointer was passed or we could not assign
+ * enough memory with malloc or realloc to extend the table.
+ *
+ * This function is used to extent the table to accomidate a certain
+ * number of entries. This function can be used to pre-allocate a large
+ * table. The table is normally extended in small chunks to accomidate
+ * new entries. For example, if the table has 10 entries in it and the
+ * 11th entry is referenced, the table may be extended to accomidate 20
+ * entries. Since the table itself must be contiguous, realloc() is called
+ * to allocate additional memory space which could cause a bcopy() to
+ * be performed. If the table is not very big, this processing is not
+ * significant and can be ignored. However, if the table has thousands
+ * of entries in it, the overhead can be reduced by simply extending the
+ * table to the maximum size in a single operation.
+ *
+ *--------------------------------------------------------------------------*/
+
+Status
+table_extend(
+ Table *tbl, /* Pointer to the table. */
+ int rows) /* Maximum rows to accomidate. */
+{
+ int bytes;
+ char *buf;
+
+ if (!VALID_TABLE(tbl))
+ return Failure;
+
+ if (tbl->limit && (rows > tbl->limit))
+ return Failure;
+
+ DMSG("table", printf("table_extend('0x%x', %d), last= %d\n", (int)tbl, rows, tbl->last) );
+
+ if ((bytes = CHUNK(rows)) > tbl->last) {
+ bytes *= tbl->size; /* How much memory is really needed? */
+ if ((buf = (char *) (tbl->data ? realloc(tbl->data, bytes)
+ : malloc(bytes)))) {
+ tbl->data = buf;
+ memset(buf+(tbl->last*tbl->size), 0, bytes-(tbl->last*tbl->size));
+ tbl->last = CHUNK(rows);
+ DMSG("table", printf("table_extend: tbl->data='0x%08x', tbl->last=%d\n", (int)buf, tbl->last));
+ } else {
+ DMSG("table", printf("table_extend: alloc failed!!! tbl->data='0x%08x', tbl->last=%d\n", (int)buf, tbl->last));
+ tbl->status = Failure; /* Oops, alloc failed*/
+ return Failure;
+ }
+ }
+ tbl->status = Success; /* Mark this operation as successful.*/
+ return Success;
+}
+
+/*--------------------------------------------------------------------------
+ *
+ * table_limit Limit the growth of a table.
+ *
+ * err = table_limit(tbl, rows)
+ * Table *tbl;
+ * int rows;
+ *
+ * Return:
+ * Success = table limit was set.
+ * Failure = invalid table pointer was passed.
+ *
+ * This function is used to limit the size of a table. The functions
+ * table_getRow() and table_setEntry() automatically extend the tables
+ * as needed to accomidate the entry that is being referenced. This is
+ * used to specify the absolute limit that the table may grow to. If no
+ * limit is specified, the table will be allowed to grow as needed.
+ *
+ *--------------------------------------------------------------------------*/
+
+Status
+table_limit(
+ Table *tbl,
+ int rows)
+{
+
+ if (!VALID_TABLE(tbl))
+ return Failure;
+
+ table_extend(tbl, rows); /* First extend the table. */
+ tbl->limit = rows; /* Limit the table from further growth */
+ tbl->end = rows;
+ tbl->status = Success; /* Mark this operation as successful */
+
+ DMSG("table", printf("table_limit('0x%x', %d) end= %d\n", (int)tbl, rows, tbl->end) );
+
+ return Success;
+}
+
+
+/*--------------------------------------------------------------------------
+ *
+ * table_status Return the status of the last table operation.
+ *
+ * err = table_status(tbl)
+ * Table *tbl; * Pointer to a table.
+ *
+ * This function is used to return the status of the last operation on
+ * the particular table. A number of routines return a pointer to the
+ * entry or a NULL in the event of an error. This can be used to identify
+ * the particular error. For example, if table_getNext(tbl) returned a
+ * NULL entry, it could be because it was passed an invalid table pointer
+ * or because it ran out of entries to return. This can be used to see
+ * the precise error in such a case.
+ *
+ *--------------------------------------------------------------------------*/
+
+Status
+table_status(
+ Table *tbl)
+{
+
+ if (!VALID_TABLE(tbl))
+ return Failure;
+
+ return (tbl->status);
+}
+
+/*--------------------------------------------------------------------------
+ *
+ * table_size Return the size of an entry in the table.
+ *
+ * size = table_size(tbl)
+ * Table *tbl; * Pointer to a table.
+ *
+ * This function is used to return the size of the entries in the table
+ * or the width of the rows of the table. This value is normally set
+ * when the table is created.
+ *
+ *--------------------------------------------------------------------------*/
+
+int
+table_size(
+ Table *tbl)
+{
+
+ if (!VALID_TABLE(tbl))
+ return Failure;
+
+ return (tbl->size);
+}
+
+/*--------------------------------------------------------------------------
+ *
+ * table_end Return the end (last item) of the table.
+ *
+ * lastItem = table_end(tbl)
+ * Table *tbl; * Pointer to a table.
+ *
+ * This function is used to return the last item in the table. This
+ * can be used to find the number of items in the table.
+ *
+ *--------------------------------------------------------------------------*/
+int
+table_end(
+ Table *tbl)
+{
+
+ if (!VALID_TABLE(tbl))
+ return Failure;
+
+ return (tbl->end);
+}
+
+/*--------------------------------------------------------------------------
+ *
+ * table_sort Specify a qsort procedure for a table.
+ *
+ * size = table_sort(tbl, proc)
+ * Table *tbl; * Pointer to a table.
+ * void *proc(); * Qsort process.
+ *
+ * This function is used to set the qsort proc for a table. All we have
+ * to do is store the proc handle in the table header and set the magic
+ * flag to TABLE_SORT. This indicates that the table needs to be sorted
+ * prior to getValue returning an item.
+ *
+ *--------------------------------------------------------------------------*/
+
+Status
+table_sort(
+ Table *tbl,
+ int (*sort)(const void *, const void *))
+{
+
+ if (!VALID_TABLE(tbl))
+ return Failure;
+
+ tbl->sort = sort; /* Save the sort procedure. */
+ tbl->magic = TABLE_SORT; /* Trigger the initial sort. */
+ tbl->status = Success; /* Mark this operation as successful */
+ return Success;
+}
+
+/*--------------------------------------------------------------------------
+ *
+ * table_find Find an entry in a table.
+ *
+ * addr = table_find(tbl, test, arg)
+ * addr = table_find_next(tbl, test, arg)
+ * Table *tbl; * Pointer to a table.
+ * void (*test)(void*, void*); * Qsort like test process.
+ * void *arg; * Item we are looking for.
+ *
+ * This function is used to set the qsort proc for a table. All we have
+ * to do is store the proc handle in the table header and set the magic
+ * flag to TABLE_SORT. This indicates that the table needs to be sorted
+ * prior to getValue returning an item.
+ *
+ *--------------------------------------------------------------------------*/
+
+void *
+table_find(
+ Table *tbl,
+ int (*test)(const void *,const void *),
+ void *arg)
+{
+ if (!VALID_TABLE(tbl))
+ return Failure;
+
+ tbl->index = -1; /* Start at the top of the table. */
+ return table_find_next(tbl, test, arg);
+}
+
+void *
+table_find_next(
+ Table *tbl,
+ int (*test)(const void *, const void *),
+ void *arg)
+{
+#if LATER
+ void *addr, *tst;
+ int i, beg, end, t;
+#else
+ void *addr;
+ int i;
+#endif
+
+ if (!VALID_TABLE(tbl))
+ return Failure;
+
+ if (!tbl || !((tbl->magic == TABLE_VALID) ||
+ (tbl->magic == TABLE_SORT)))
+ return Failure;
+
+ if (tbl->sort && (tbl->magic == TABLE_SORT)) {
+ qsort(tbl->data, tbl->end+1, tbl->size, tbl->sort);
+ tbl->magic = TABLE_VALID;
+ }
+
+#if LATER
+ if (tbl->sort) { /* Is this a sorted table ? */
+ beg = i = tbl->index; /* Yes, we can do a binary */
+ end = tbl->end; /* search on the data. */
+ while (beg < end) {
+ addr = (void *) ((int)tbl->data + (i * tbl->size));
+ t = (*test)(arg, addr);
+ DMSG("table", printf("table_find(): testing item %d, beg %d, end %d, t %d\n",
+ i, beg, end, t) );
+ if (t == 0) {
+ /* Exact Match. Well almost, there can be duplicate
+ * entries in a sorted table. If this is the case,
+ * then we need to back up in the list to the first
+ * instance of this entry.
+ * Note: the beg index has been moved. tbl->index
+ * contains the start of the table segment
+ * we are searching. */
+
+ while (i > tbl->index) {
+ tst = (void *) ((int)tbl->data + ((i-1) * tbl->size));
+ if ((*test)(arg, tst))
+ break; /* This index is ok. */
+ addr = tst; /* This is a duplicate index*/
+ i--; /* go back one item and test*/
+ DMSG("table", printf(" duplicate detected. backing up to item %d\n", i));
+ } /* again to the top of segmt*/
+ tbl->index = i; /* Make this the current item. */
+ tbl->status = Success;
+ DMSG("table", printf(" found item %d\n", i));
+ return addr;
+
+ } else if (t > 0) {
+ /* What we are testing for (arg) is less than the
+ * item (addr) that we are considering. We need to
+ * look further in the table for a match. */
+
+ beg = i;
+ i += ((end-beg)+1)/2;
+
+ } else if (t < 0) {
+ /* What we are testing for (arg) is greater than the
+ * item (addr) that we are considering. We need to
+ * look earlier in the table for a match. */
+
+ end = i;
+ i -= ((end-beg)+1)/2;
+ }
+ }
+ } else {
+#else
+ {
+#endif
+ i = tbl->index; /* The table is not sorted. */
+ while (++i <= tbl->end) { /* We have to scan each item*/
+ addr = (void *) ((int)tbl->data + (i * tbl->size));
+ if ((*test)(arg, addr) == 0) {
+ tbl->index = i;
+ tbl->status = Success;
+ return addr;
+ }
+ }
+ }
+ tbl->index = tbl->end;
+ tbl->status = Failure;
+ return Failure;
+}
+
+/*------------------------------------------------------------------------
+ *
+ * debug.c Simple handling of debugging messages.
+ *
+ * These routines are used to manage simple outputing of messages
+ * based on a key. The user can dynamically enable or disable the
+ * printing of messages with the use of the debug_print("type") and
+ * debug_stop("type") routines. This works in conjunction with the
+ * DMSG("type", <statment>)); macros which can be sprinkled through
+ * the code. When the particular "type" catagory has been enabled,
+ * the statment will be executed. Typically, this is printf or a
+ * call to a debugging or other logging routine. When the DEBUG
+ * flag is not defined, to reduce the program size, these statments
+ * do not get reduced to code.
+ *
+ *------------------------------------------------------------------------*/
+
+
+#define True 1
+#define False 0
+#define DebugTblSize 20
+
+char *debugTypesEnabled[DebugTblSize];
+
+typedef struct DebugCatalog_t {
+ char tag[20];
+ char file[20];
+ int line;
+ int count;
+} DebugCatalog;
+
+Table *debugCatalog;
+
+int
+dmsg(
+ char *typ)
+{
+ if (!typ)
+ debug_print();
+ else debug_msg(typ);
+ return 0;
+}
+
+int
+dstop(
+ char *typ)
+{
+ debug_stop(typ);
+ return 0;
+}
+
+int
+dindex()
+{
+ debug_index();
+ return 0;
+}
+
+int
+dprint()
+{
+ debug_print();
+ return 0;
+}
+
+void
+debug_msg(
+ char *typ)
+{
+ int argc, i;
+ char c, *tok, *t, *argv[20], buf[80];
+
+ tok = buf; /* Tokenize the input */
+ argv[argc = 0] = tok;
+ while ((c = *tok++ = *typ++))
+ if ((c == ' ') || (c == ' ')) {
+ *--tok = 0;
+ argv[++argc] = ++tok;
+ }
+ argv[++argc] = 0;
+
+ /* Now put them on the Types Enabled list. */
+ argc = -1;
+next: while ((tok = argv[++argc])) {
+ i = -1;
+ while ((t = debugTypesEnabled[++i]))
+ if (!strncmp(tok, t, strlen(tok)))
+ goto next;
+ debugTypesEnabled[i] = strdup(tok);
+ }
+}
+
+void
+debug_stop(
+ char *typ)
+{
+ int argc, i, j;
+ char c, *tok, *t, *argv[20], buf[80];
+
+ tok = buf; /* Tokenize the input */
+ argv[argc = 0] = tok;
+ while ((c = *tok++ = *typ++))
+ if ((c == ' ') || (c == ' ')) {
+ *--tok = 0;
+ argv[++argc] = ++tok;
+ }
+ argv[++argc] = 0;
+
+ /* Now remove them from the Types Enabled list. */
+ argc = -1;
+ while ((tok = argv[++argc])) {
+ i = -1;
+ while (++i < DebugTblSize)
+ if ((t = debugTypesEnabled[i]) && !strncasecmp(tok, t, strlen(t))) {
+ free(debugTypesEnabled[i]); /* Free the strdup memory */
+ j = i;
+ while (++j < DebugTblSize)
+ debugTypesEnabled[j-1] = debugTypesEnabled[j];
+ debugTypesEnabled[j] = 0;
+ }
+ }
+}
+
+
+int
+debug_print()
+{
+ int i;
+ char *tok;
+
+ printf("The following categories are enabled:\n");
+ i = -1;
+ while ((tok = debugTypesEnabled[++i]))
+ printf("%d: '%s'\n", i, tok);
+ printf("-----\n");
+ return 0;
+}
+
+int
+debug_test(
+ char *typ,
+ char *file,
+ int line)
+{
+ int argc, i;
+ char c, *t, *tok, *argv[20], buf[80];
+
+
+ tok = buf; /* Tokenize the input */
+ argv[argc = 0] = tok;
+ while ((c = *tok++ = *typ++))
+ if ((c == ' ') || (c == ' ')) {
+ *--tok = 0;
+ argv[++argc] = ++tok;
+ }
+ argv[++argc] = 0;
+
+#if 0
+ if (debugCatalog) /* Should we catalog this message? */
+ debug_catalog(typ, file, line);
+#endif
+
+ /* Now look for them on the Types Enabled list. */
+ argc = -1;
+ while ((tok = argv[++argc])) {
+ i = -1;
+ while (++i < DebugTblSize)
+ if ((t = debugTypesEnabled[i]) && !strncasecmp(tok, t, strlen(tok)))
+ return True;
+ }
+ return False;
+}
+
+void
+debug_catalog(
+ char *typ,
+ char *file,
+ int line)
+{
+ Table *cat;
+ DebugCatalog *itm, tst;
+
+ if (!(cat = debugCatalog))
+ return;
+
+ strcpy(tst.tag, typ);
+ strcpy(tst.file, file);
+ tst.line = line;
+ if ((itm = table_find(cat, debug_catalogFind, (void *)&tst)))
+ itm->count++;
+ else {
+ itm = calloc(1, sizeof(DebugCatalog));
+ strcpy(itm->file, file);
+ strcpy(itm->tag, typ);
+ itm->line = line;
+ table_addEntry(cat, (void *)itm, sizeof(DebugCatalog));
+ }
+}
+
+void
+debug_index()
+{
+ Table *cat;
+ int i;
+ DebugCatalog *itm;
+
+ if (!(cat = debugCatalog)) {
+ debugCatalog = table_create(sizeof(DebugCatalog));
+ table_sort(debugCatalog, debug_catalogFind);
+ printf("Accumulating index of DMSG statments\n");
+ } else {
+ printf("DMSG was called with the following tags:\n\n");
+ i = -1;
+ while (++i < table_end(cat))
+ if ((itm = table_getRow(cat, i)))
+ printf("%12s %d (%s:%d)\n", itm->tag, itm->count, itm->file, itm->line);
+ }
+}
+
+
+/*
+ * This function is used as a qsort process to sort tables based on the tags.
+ * We are passed pointers to DebugCatalog types. Since we want to keep a detailed
+ * entry based on file / line, we keep concantinate all the items to a string and
+ * then do the compare.
+ */
+
+int
+debug_catalogFind(
+ const void *arg1,
+ const void *arg2)
+{
+ DebugCatalog *itm1 = (DebugCatalog *)arg1;
+ DebugCatalog *itm2 = (DebugCatalog *)arg2;
+ char buf1[40], buf2[40];
+
+ sprintf(buf1, "%s%s%d", itm1->tag, itm1->file, itm1->line);
+ sprintf(buf2, "%s%s%d", itm2->tag, itm2->file, itm2->line);
+ return strcasecmp (buf1, buf2);
+}
+
+int
+strncasecmp(
+ char *s1,
+ char *s2,
+ int n)
+{
+
+
+ if (!s1 || !s2)
+ return False;
+#if 0
+ printf("StrCaseNCmp(0x%x='%s', 0x%x='%s', %d)\n", (int)s1, s1, (int)s2, s2, n);
+#endif
+ while (*s1 && *s2 && (n-- > 0))
+ if ((*s1 == '*') || (*s2 == '*'))
+ return 0;
+ else if ((*s1++ | ' ') != (*s2++ | ' '))
+ return *--s1 - *--s2;
+ return (n && (*s1 || *s2)) ? 1 : 0;
+}
+
+int
+strcasecmp(
+ char *s1,
+ char *s2)
+{
+ if (!s1 || !s2)
+ return False;
+
+#if 0
+ printf("StrCaseCmp(0x%x='%s', 0x%x='%s')\n", (int)s1, s1, (int)s2, s2);
+#endif
+ while (*s1 && *s2)
+#if 0
+ if ((*s1 == '*') || (*s2 == '*'))
+ return 0;
+ else
+#endif
+ if ((*s1++ | ' ') != (*s2++ | ' '))
+ return *--s1 - *--s2;
+
+ return (*s1 || *s2) ? 1 : 0;
+}
+
+char *
+strdup(
+ char *str)
+{
+ int i;
+ char *cpy;
+
+ if (!str)
+ return False;
+ i = strlen(str);
+ if ((cpy = malloc(i+1)))
+ strcpy(cpy, str);
+ return cpy;
+}
diff --git a/data/mnet/Common/snmp/src/vipermib.c b/data/mnet/Common/snmp/src/vipermib.c
new file mode 100644
index 0000000..e52c498
--- /dev/null
+++ b/data/mnet/Common/snmp/src/vipermib.c
@@ -0,0 +1,1768 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************
+**
+** FILE NAME: vipermib.c
+**
+** DESCRIPTION: This file contains snmp get/set/next/test methods
+**
+** COMPONENTS:
+**
+**
+** NOTES:
+**
+** REVISION HISTORY
+** __________________________________________________________________
+** ----------+--------+----------------------------------------------
+** Name | Date | Reason
+** ----------+--------+----------------------------------------------
+** Bhawani |03/02/01| Modified original file and resturctured to use
+** | | common vob and clean up the code. Separated
+** | | file I/O in a separated file.
+** Bhawani |03/16/01| Added SnmpMibLookup routines
+** ----------+--------+----------------------------------------------
+**********************************************************************
+*/
+
+
+/*
+**********************************************************************
+** Include Files.
+**********************************************************************
+*/
+
+#ifdef DEBUG
+#define PARANOID /* Full debugging */
+#endif
+
+#include <vxWorks.h>
+#include <mib.h>
+#include <snmpdefs.h>
+#include <snmpdLib.h>
+#include <ioLib.h>
+#include <fioLib.h>
+#include <sysLib.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <memLib.h>
+#include <hostLib.h>
+#include <time.h>
+#include <timers.h>
+#include <inetLib.h>
+#include <ctype.h>
+
+#include "vipermib.h"
+#include "vipertbl.h"
+#include "oam_api.h"
+#include "snmp/include/version.h"
+
+/********************************************************************
+* Defined used in this file
+*********************************************************************/
+#define LOCAL_MEM_LOCAL_ADRS 0x00000000 /* Base of RAM */
+#define BOOT_LINE_OFFSET 0x4200
+#define BOOT_LINE_ADRS ((char *) (LOCAL_MEM_LOCAL_ADRS+BOOT_LINE_OFFSET))
+#define BOOT_LINE_SIZE 255 /* use 255 bytes for bootline */
+#define MAX_PATH_NAME 256
+
+/********************************************************************
+* Global variables
+*********************************************************************/
+char SnmpDefaultMibFileName[MAX_PATH_NAME];
+int SnmpTimerRebootLongDelay = 30;
+int SnmpTimerRebootShortDelay = 5;
+int SnmpTimerRebootDelay = 0;
+
+int SnmpTimerMibFlushDelay = 5; /* default in seconds */
+int SnmpTimerMibFlushMinFileIo = 5*60; /* 5 minutes */
+int SnmpTimerMibFlushMinDelay = 2; /* 2 seconds */
+
+
+extern char *snmp_tagName( MibTag );
+extern void snmp_printPDU(SNMP_PKT_T *, char *);
+extern char *snmp_printPduType(int);
+
+int SnmpMibLoadCount = 0;
+int SnmpMibSaveCount = 0;
+int SnmpMibSetCount = 0;
+int SnmpMibGetCount = 0;
+
+int mibInitialized = False;
+int snmpInitialized = False;
+int SnmpPostSetEnabled = False;
+
+char *mibVersionId = VIPERCELL_EXTERNAL_VERSION_NO;
+char *mibBuildId = VIPERCELL_INTERNAL_BUILD_ID;
+char *mibDate = __DATE__;
+char *mibTime = __TIME__;
+char *mibCrypto = VIPERCELL_CRYPTO_INFO;
+
+FILE *logFS;
+char logBuf[256];
+
+
+/* forward declaration */
+extern void snmpLocalIoInit();
+extern void snmpLocalInitCommunityNames();
+extern STATUS snmp_postLoadMibHandler();
+
+
+
+/* convert unsigned int to dotted IP string */
+char* int2ip(UINT32 nIp)
+{
+ UINT8* pIp = (UINT8*) &nIp;
+ static char pszIp[16];
+ sprintf(pszIp, "%u.%u.%u.%u", pIp[0], pIp[1], pIp[2], pIp[3]);
+ return pszIp;
+}
+
+void SnmpStatusShow()
+{
+ printf("Snmp default Mib file: '%s'\n", SnmpDefaultMibFileName);
+ printf("Snmp MIB Flush Delay Timer: %d\n", SnmpTimerMibFlushDelay);
+ printf("Mib File Load Count: %d\n", SnmpMibLoadCount);
+ printf("Mib File Save Count: %d\n", SnmpMibSaveCount);
+ printf("Mib File Set Count: %d\n", SnmpMibSetCount);
+ printf("Mib File Get Count: %d\n", SnmpMibGetCount);
+
+}
+
+void snmp_oamCmdStrSet(char *str)
+{
+ snmp_setEntry(MIB_oamCommandLastError, 0, str, strlen(str));
+
+}
+
+
+void snmp_initializeMib()
+
+{
+ int i, j, end, tag;
+ void **addr;
+ Table *tbl;
+
+
+ if (snmpInitialized == True) /* This code is a one-shot. */
+ return;
+ snmpInitialized = True;
+ mibInitialized = True;
+
+ snmp_mibTimerInit();
+
+ /* This speeds up the data validation routines. By defining this
+ ** Table header and associating the data type array and a sort proc
+ ** with the table, we can use the table_find() routine to do a binary
+ ** search of this table. Since the data validation routines expect
+ ** this to be setup, do it first. */
+
+ mnetMibDataTypeTable = table_create(sizeof(MnetMibDataType));
+ mnetMibDataTypeTable->data = (char *)mnetMibDataType;
+ i = -1;
+ while (mnetMibDataType[++i].tag);
+ mnetMibDataTypeTable->last = i;
+ mnetMibDataTypeTable->end = i;
+
+ /* Part of the MIB is a statically allocated in the MnetMib structure.
+ ** This contains all of the base packages. The tables and string buffers are
+ ** allocated at runtime with malloc. The following loop will allocate the
+ ** dynamic part of the MIB: */
+
+ i = -1;
+ while ((tag = mnetMibIndex[++i].tag))
+ {
+ if (NULL == mnetMibIndex[i].addr)
+ {
+ if (MIB_TYP(tag) == MTYPE_STRING)
+ {
+ mnetMibIndex[i].addr = (void *)calloc(1, mnetMibIndex[i].size+1);
+ }
+ else
+ {
+ mnetMibIndex[i].addr = addr = (void *)table_create(mnetMibIndex[i].size);
+ table_limit((Table *)addr, mnetMibIndex[i].limit);
+ snmp_fixupTable((Table *)addr); /* Add an index to the tables. */
+ }
+ }
+ if (!((MIB_TYP(tag) == MTYPE_STRUCT) && (MIB_ITM(tag) == 0)))
+ {
+ addr = (void**)snmp_getAddress(tag); /* Were this tag resolves to. */
+ *addr = mnetMibIndex[i].addr; /* Store the real address away. */
+ DMSG("fixup mib", printf("snmp_initMib(): Fixup loading '%s' @%x = '0x%08x'.\n",
+ snmp_tagName(tag), (int) addr, (int)mnetMibIndex[i].addr));
+ } /* Can't use snmp_setValue since */
+ } /* it would copy the string, not */
+ /* just set the address. */
+
+ /* Now we can load the default values in the MIB structure. */
+ /* Setup the COMPLEX number callbacks as well. */
+ i = -1;
+ while ((tag = mnetMibDataType[++i].tag))
+ {
+ if (mnetMibDataType[i].value)
+ {
+ if (MTYPE_IS_TABLE(MIB_TYP(tag)))
+ {
+ if ((tbl = snmp_getTableAddress(tag)))
+ {
+ end = table_end(tbl);
+ for (j=0; j < end; j++)
+ {
+ snmp_setEntry(tag, j, (void *) mnetMibDataType[i].value, 4);
+ }
+ }
+ }
+ else
+ {
+ snmp_setEntry(tag, 0, (void *) mnetMibDataType[i].value, 4);
+ }
+ } /* Value not zero */
+ }
+
+ /* Now that the internal structure is setup, we can load in the
+ * real MIB. However, we should wait until the date has been set
+ * in the startup script. Also, there is a MNET_BASE flag
+ * that point to where the MIB files should be put. Thus, we set
+ * a flag saying we are not intialized yet. The following routine
+ * gets executed from the startup script. It loads the MIB and then
+ * clears the flag allowing access.
+ */
+
+ mibInitialized = False;
+}
+
+/* Aug 23, 2000 Modified this function to fix AR 1216 - Bhawani*/
+int snmp_initialize(char *name)
+{
+ char *str;
+ char *vcBase;
+ int versionFd;
+ int snmpLocalIP;
+ char localhostname[MAXHOSTNAMELEN];
+ char versionFileName[MAXHOSTNAMELEN];
+ char verBuf[64];
+ char buildBuf[64];
+ char timeBuf[32];
+ char dateBuf[32];
+ char cryptoBuf[32];
+ char tmpBuf[128];
+ char buf[512];
+ int charsRead;
+
+ gethostname(localhostname, MAXHOSTNAMELEN);
+ snmpLocalIP = hostGetByName(localhostname);
+
+
+
+ /* first initialize mib and create table etc. */
+ snmp_initializeMib();
+
+
+ /* Initialize IO Task */
+ snmp_initIoTask();
+
+ /* Initialize Local IO first */
+ snmpLocalIoInit();
+
+ /* check if this function is called multiple times */
+ if (mibInitialized == True)
+ return OK;
+
+ snmp_log(False, "\nSnmp Initialize", "SNMP agent is booting up");
+
+ /* Get the value of the MNET_BASE environment variable. */
+ vcBase = getenv( "MNET_BASE" );
+ if( vcBase == NULL )
+ {
+ snmp_log(True, "snmp_initialize", "SNMP initialization failure because environment variable \"MNET_BASE\" could not be found.");
+ return ERROR;
+ }
+
+ /* Set the Mib file name*/
+ sprintf(SnmpDefaultMibFileName, "%s/mib/mib.txt", vcBase);
+
+ mibInitialized = True; /* allow MIB access in snmp_loadMib */
+
+ /* Call product specific pre loadMib handler */
+ snmp_initDefaultMib();
+
+ /* Overwrite the default value with the one specified in the MIB file */
+ if (snmp_loadMib(SnmpDefaultMibFileName) == Success)
+ {
+ snmp_log(True, "Snmp Initialize", "SNMP MIB was successfully loaded from file %s.", SnmpDefaultMibFileName);
+ }
+ else
+ {
+ snmp_saveMib(SnmpDefaultMibFileName);
+ snmp_log(True, "Snmp Initialize", "SNMP mib could not be loaded from %s: %s", SnmpDefaultMibFileName, strerror(errno));
+ }
+
+ /* Access control status enabled */
+ snmp_setValue(MIB_mibAccessControlFlag, True);
+
+ /* Clear the OAM command last error */
+ snmp_oamCmdStrSet("");
+
+ /* Initialize Element IP Address */
+ snmp_setValue(MIB_mnetIpAddress, snmpLocalIP);
+
+ /* Initialize Software build */
+ if ((str = (char *)snmp_getValue(MIB_mnetSoftwareBuild)))
+ {
+ /* Open file version.txt and try to read the version and build number */
+ sprintf(versionFileName, "%s/version.txt", vcBase);
+
+ printf("Version file %s ", versionFileName);
+ if ((versionFd = open (versionFileName, O_RDONLY, 0)) != ERROR)
+ {
+ printf("will be used to set Version and Build Id\n");
+ while (fioRdString(versionFd, buf, 512) != EOF)
+ {
+ sscanf(buf, "%s", tmpBuf);
+ if (strcmp(tmpBuf, "[BUILDID]") == 0)
+ {
+ charsRead = fioRdString(versionFd, buildBuf, 63);
+ buildBuf[charsRead] = 0;
+ mibBuildId = buildBuf;
+ }
+ if (strcmp(tmpBuf, "[VERSION]") == 0)
+ {
+ charsRead = fioRdString(versionFd, verBuf, 63);
+ verBuf[charsRead] = 0;
+ mibVersionId = verBuf;
+ }
+ if (strcmp(tmpBuf, "[DATE]") == 0)
+ {
+ charsRead = fioRdString(versionFd, dateBuf, 31);
+ dateBuf[charsRead] = 0;
+ mibDate = dateBuf;
+ }
+ if (strcmp(tmpBuf, "[TIME]") == 0)
+ {
+ charsRead = fioRdString(versionFd, timeBuf, 31);
+ timeBuf[charsRead] = 0;
+ mibTime = timeBuf;
+ }
+ if (strcmp(tmpBuf, "[CRYPTO]") == 0)
+ {
+ charsRead = fioRdString(versionFd, cryptoBuf, 31);
+ cryptoBuf[charsRead] = 0;
+ mibCrypto = cryptoBuf;
+ }
+
+ }
+ close(versionFd);
+ }
+ else
+ {
+ printf("not found...using default Version and Build Id\n");
+ }
+
+ sprintf(str, "%s %s %s %s %s %s %s %s %s",
+ VERSION_PREFIX, mibVersionId,
+ DATE_AND_TIME_PREFIX, mibDate, mibTime,
+ BUILD_PREFIX, mibBuildId,
+ CRYPTO_PREFIX, mibCrypto);
+ }
+
+ /* Call product specific post loadMib handler */
+ snmp_postLoadMibHandler();
+
+
+ /* initialize community names */
+ snmpLocalInitCommunityNames();
+
+ /* finally here we go */
+ snmp_log(False, "snmp_initialize", "Snmp initialized successfully");
+ SnmpPostSetEnabled = True;
+ return OK;
+}
+
+
+/* Aug 23, 2000 modified snmp_log() to localize logFileName - Bhawani*/
+void snmp_log(int flag, char *fname, char *spec, ...)
+{
+ char *str;
+ time_t stamp;
+ FILE *logFS;
+ va_list arg_list;
+ static char logFileName[PATH_MAX] = "";
+ static char logstr[SIZE_DisplayString+1];
+ int pos;
+
+ if (logFileName[0] == 0)
+ {
+ /* Get the value of the MNET_BASE environment variable. */
+ str = getenv( "MNET_BASE" );
+ if( str == NULL )
+ {
+ return;
+ }
+ /* Set the log file path */
+ sprintf(logFileName, "%s/mib/snmp.log", str);
+
+ }
+
+ if ((logFS = fopen(logFileName, "a")) == NULL)
+ {
+ sprintf(logstr, "Unable to open logfile %s: (%d) '%s'", logFileName, errno, strerror(errno));
+ snmp_oamCmdStrSet(logstr);
+ return;
+ }
+
+ va_start(arg_list, spec);
+ time(&stamp);
+ str = ctime(&stamp);
+ str[24] = ','; /* Zap the annoying newline. */
+
+ pos = sprintf(logstr, "%s %s, ", str, fname);
+ pos += vsprintf(logstr+pos, spec, arg_list);
+ if (flag == True)
+ {
+ snmp_oamCmdStrSet(logstr); /* a copy to Snmp Last error Mib variable */
+ }
+ fprintf(logFS, "%s\n", logstr); /* a copy to snmp log file */
+ printf("%s\n", logstr); /* a copy to the console */
+ fclose(logFS);
+ va_end(arg_list);
+ return;
+}
+
+void snmp_fixupTable(Table *tbl)
+{
+ int i;
+ int *addr;
+
+ if (!VALID_TABLE(tbl))
+ {
+ DMSG("fixup", printf("snmp_fixupTable passed an invalid table pointer 0x%x\n", (int)tbl));
+ return; /* We do not have a valid table header! */
+ }
+ DMSG("fixup", printf("snmp_fixupTable is fixing up table indicies for tbl at 0x%x\n", (int)tbl));
+
+ for (i=0; i<tbl->end; i++)
+ {
+ addr = (int *)((int)tbl->data + (i*tbl->size));
+ *addr = i;
+ }
+
+}
+
+int snmp_operation(int op)
+{
+ char *name;
+ int status;
+
+ if (op == 0)
+ {
+ return OK;
+ }
+
+ snmp_setValue(MIB_oamCommandExecutionStatus, VAL_oamCommandExecutionStatus_inProgress);
+
+ status = VAL_oamCommandExecutionStatus_failed;
+ DMSG("oam operation", printf("snmp_operation(%d) called\n", op));
+
+ switch (op)
+ {
+
+ case VAL_oamCommand_reloadMib:
+ if (snmp_loadMib(SnmpDefaultMibFileName) == Success)
+ {
+ snmp_log(False, "snmp_operation", "Reload Mib request was successful.");
+ status = VAL_oamCommandExecutionStatus_sucessful;
+ }
+ break;
+
+
+ case VAL_oamCommand_flushMib:
+
+ if (snmpMibWriteDelayTimeoutHandler((int) SnmpDefaultMibFileName) == OK)
+ {
+ snmp_log(False, "snmp_operation", "Flush Mib request was successful.");
+ status = VAL_oamCommandExecutionStatus_sucessful;
+ }
+ break;
+
+
+
+ case VAL_oamCommand_loadMibFromAltFile:
+ name = (char *) snmp_getValue(MIB_oamAlternateMibFileName);
+ if (name)
+ {
+
+ if (snmp_loadMib(name) == Success)
+ {
+ snmp_log(False, "snmp_operation", "Load from alternate Mib file request was successful.");
+ status = VAL_oamCommandExecutionStatus_sucessful;
+ }
+ }
+ break;
+
+ case VAL_oamCommand_saveMibToAltFile:
+ name = (char *) snmp_getValue(MIB_oamAlternateMibFileName);
+ if (name)
+ {
+ if (snmpMibWriteDelayTimeoutHandler((int) name) == Success)
+ {
+ snmp_log(False, "snmp_operation", "Save Mib to alternate file request was successful.");
+ status = VAL_oamCommandExecutionStatus_inProgress;
+ }
+ }
+ break;
+
+ case VAL_oamCommand_saveMibMinDelay:
+ SnmpTimerMibFlushDelay = SnmpTimerMibFlushMinDelay;
+ status = VAL_oamCommandExecutionStatus_sucessful;
+ snmp_log(False, "snmp_operation", "SNMP flush mode set to minimum.");
+ break;
+
+ case VAL_oamCommand_saveMibMinFileIo:
+ SnmpTimerMibFlushDelay = SnmpTimerMibFlushMinFileIo;
+ status = VAL_oamCommandExecutionStatus_sucessful;
+ snmp_log(False, "snmp_operation", "SNMP flush mode set to minimum File I/O.");
+ break;
+
+
+ case VAL_oamCommand_reboot:
+ status = VAL_oamCommandExecutionStatus_inProgress;
+ snmp_reboot(SnmpTimerRebootShortDelay); /* Give a couple of seconds so */
+ /* we can respond to the PDU. */
+ snmp_log(False, "snmp_operation", "Network element reboot request is submitted.");
+ break;
+
+ case VAL_oamCommand_delayedReboot:
+ status = VAL_oamCommandExecutionStatus_inProgress;
+ snmp_reboot(SnmpTimerRebootLongDelay);
+ snmp_log(False, "snmp_operation", "Network element reboot in 30 second request is submitted.");
+ break;
+
+ default:
+ snmp_log(False, "snmp_operation", "Not recognized Oam command (%d)", op);
+ status = VAL_oamCommandExecutionStatus_failed;
+ }
+
+ if (op != VAL_oamCommand_none)
+ {
+ snmp_setValue(MIB_oamCommand, VAL_oamCommand_none);
+ }
+
+ snmp_setValue(MIB_oamCommandExecutionStatus, status);
+
+ return status == VAL_oamCommandExecutionStatus_failed ? Failure : Success;
+}
+
+
+void snmp_postSet(MibTag tag)
+{
+ if (MIB_TBL(tag) == MIBL_mnetErrorInfoMib)
+ {
+ /* This is error event and need to send trap on this one */
+ snmp_trapBroadcast(tag);
+ return;
+ }
+
+ if (True == SnmpPostSetEnabled)
+ {
+ switch(tag)
+ {
+ case MIB_oamCommand:
+ snmp_operation(snmp_getValue(MIB_oamCommand));
+ break;
+
+ default:
+ snmp_mibTimerSet(SnmpDefaultMibFileName);
+ break;
+ }
+ }
+}
+
+
+/* int * = snmp_getAddress(tag, [idx]);
+*
+* This routine is foundation of the snmp_get... and snmp_set... functions.
+* This provides the basic translation from a MIB_TAG into a pointer to the
+* data item in the MIB.
+*/
+
+void * snmp_getAddress( MibTag tag, ...)
+{
+ int typ = MIB_TYP(tag);
+ int col = MIB_SIZ(tag);
+ int idx = MIB_TBL(tag);
+ int itm = MIB_ITM(tag);
+
+ int row = 0;
+ void *addr;
+ Table *tbl;
+ va_list argn;
+
+ if (mibInitialized == False)
+ {
+ return NULL;
+ }
+
+ addr = (void *)((int)mnetMibIndex[idx].addr + ( itm * sizeof(int)));
+
+ if (MTYPE_IS_TABLE(typ))
+ {
+ /* first get the index for the table */
+ va_start(argn, tag);
+ row = va_arg(argn, int);
+ va_end(argn);
+
+ tbl = (Table *) *(void **)addr;
+
+ if ((row < 0) || (row >= table_end(tbl)))
+ {
+ DMSG("address", printf("snmp_getAddress: Invalid row of table %s(tag = %#x, row=%d)\n",
+ snmp_tagName(tag), tag, row));
+ return NULL;
+ }
+ addr = table_getRow(tbl, row); /* Get the address of the table entry. */
+
+ if (typ != MTYPE_TENTRY)
+ {
+ addr = (void *)((int)addr + ( (col-1) * sizeof(int)));
+ }
+ }
+ DMSG("address", printf("snmp_getAddress: Address of %s(tag=%#x,row=%d)=%#x\n",
+ snmp_tagName(tag), tag, row, addr));
+
+ return addr;
+}
+
+
+
+/* snmp_getTableAddress
+*
+* This is a specialized form of the getAddress function. From a MIB tag, we verify
+* this is a table element and then we return the address of the table pointer. This
+* is useful to recover items like the length of the table (ie. the maximum instance
+* of a column in the table).
+*/
+
+Table * snmp_getTableAddress(MibTag tag)
+{
+ int typ = MIB_TYP(tag);
+ int idx = MIB_TBL(tag);
+ int itm = MIB_ITM(tag);
+ void *addr;
+ Table *tbl;
+
+ if (mibInitialized == False)
+ return False;
+
+ if (snmp_validTag(tag) == False)
+ {
+ DMSG("get address", printf("snmp_getTableAddress for tag 0x%x '%s' faild. Invalid tag.\n", tag, snmp_tagName(tag)));
+ return Failure;
+ }
+
+ if (!MTYPE_IS_TABLE(typ)) /* If this is not a table, there is no address. */
+ return Failure;
+
+ addr = (void *)((int)mnetMibIndex[idx].addr + ( itm * sizeof(int)));
+ tbl = (Table *)*((void **)addr); /* This is a pointer to a table. It could */
+ if (!VALID_TABLE(tbl))
+ {
+ DMSG("get address", printf("snmp_getTableAddress: Invalid Table address for %s (tag=%#x, Addr=%#x)\n", snmp_tagName(tag), tag, tbl ));
+ return Failure;
+ }
+ DMSG("address table", printf("snmp_getTableAddress: Address for table %s(tag = %#x) = %#x\n",
+ snmp_tagName(tag), tag, tbl));
+ return tbl;
+}
+
+
+/* int = snmp_getValue (tag, [idx]);
+*
+* This routine is used to retrieve a value from SNMP. It is passed the
+* MIB tag which identifies the particular MIB variable to retrieve. If
+* the MIB tag is one for a table, (MIBT_...) then one needs to specify
+* the optional index of the table element. In SNMP all table items are
+* addressed by item within the row. The index gets appended to the oid
+* for the item. Thus, val = snmp_getValue(MIB_sdcchSAPI0); returns the
+* sdcchSAPIO timer MIB value. val = snmp_getValue(MIBT_channelID_1, 5);
+* return the ChannelID for the fifth channel on transmitter 1.
+*/
+
+int snmp_getValue( MibTag tag, ...)
+{
+ int idx = 0;
+ int val = 0;
+ int value = 0;
+ void *addr;
+
+ va_list argn;
+
+ if (MTYPE_IS_TABLE(MIB_TYP(tag)))
+ {
+ va_start(argn, tag);
+ idx = va_arg(argn, int); /* Table items use an index as well. */
+ va_end(argn);
+ }
+
+
+ DMSG("get", printf("snmp_getValue: %s (tag=%#x, row=%d)\n", snmp_tagName(tag), tag, idx));
+
+ if ((addr = snmp_getAddress(tag, idx)))
+ {
+
+ if (! ( ((MIB_TYP(tag) == MTYPE_STRUCT) && (MIB_ITM(tag) == 0)) || (MIB_TYP(tag) == MTYPE_TENTRY)))
+ {
+ addr = (void *)*((void **)addr); /* Value returns the contents of addr. */
+ }
+ }
+ else
+ {
+ DMSG("get", printf("snmp_getValue: Value of %s, (tag=%#x, row=%d) = %d (0x%08x)\n", snmp_tagName(tag), tag, idx, (int)addr, (int)addr));
+ }
+ SnmpMibGetCount++;
+ return (int) addr;
+}
+
+
+
+/* status = snmp_getEntry(tag, [idx], &value, size);
+*
+* This is similar to snmp_getValue, except that instead of returning
+* the value, it is copied into a data buffer. This can be used to copy
+* the entire contents of one of the MIB tables if desired. Like the
+* snmp_getValue routine, there is an optional index if the mib variable
+* is part of a table. (This is indicated by MIBT_...).
+*/
+
+Status snmp_getEntry(MibTag tag, ...)
+{
+ void *addr, *buf;
+ int size, max, idx = 0;
+ int val = 0, value = 0;
+
+ va_list argn;
+ va_start(argn, tag); /* first unwind the arguments */
+
+ if (MTYPE_IS_TABLE(MIB_TYP(tag)))
+ {
+ idx = va_arg(argn, int); /* Table items use an index as well. */
+ }
+
+ buf = va_arg(argn, void *);
+ size = va_arg(argn, int);
+ va_end(argn);
+
+ if (NULL == buf)
+ {
+ return Failure;
+ }
+
+ addr = snmp_getAddress(tag, idx);
+
+ if (NULL != addr)
+ {
+ switch (MIB_TYP(tag))
+ {
+ case MTYPE_STRING:
+ case MTYPE_STRUCT:
+ case MTYPE_TENTRY:
+ max = MIB_SIZ(tag);
+ break;
+
+ case MTYPE_TSTRING:
+ max = SIZE_DisplayString;
+ break;
+
+ case MTYPE_NUMBER:
+ case MTYPE_TNUMBER:
+ case MTYPE_IPADDR:
+ case MTYPE_TIPADDR:
+ max = 4;
+ break;
+ default:
+ DMSG("get", printf("snmp_getEntry: Invalid tag (%s, %d)\n", snmp_tagName(tag), idx));
+ return Failure;
+ }
+ }
+ memcpy(buf, addr, min(max,size));
+ return Success;
+}
+
+/* status = snmp_setValue(tag, [idx], value);
+*
+* This routine is used to set a value in the MIB structures. The value
+* that the variable is to be set to is passed as an argument. This is
+* the compliment of the snmp_getValue routine.
+*/
+
+Status snmp_setValue( MibTag tag, ...)
+{
+ int value;
+ int idx = 0;
+ va_list argn;
+
+
+ va_start(argn, tag); /* first unwind the arguments */
+
+ if (MTYPE_IS_TABLE(MIB_TYP(tag)))
+ {
+ idx = va_arg(argn, int); /* Table items use an index as well. */
+ }
+ value = va_arg(argn, int);
+ va_end(argn);
+ return snmp_setEntry(tag, idx, (void *) value, 0);
+}
+
+
+/* status = snmp_setEntry(tag, [idx], &value, size);
+*
+* This routine is used to set a value in the MIB structures. A pointer
+* to the variable and its size are passed as arguments. This is the
+* compliment of the snmp_getEntry routine and is used to set entire
+* structures of information at a time.
+*/
+Status
+snmp_setEntry
+(
+ MibTag tag,
+ int idx,
+ void* value,
+ int sz
+)
+{
+ void* addr;
+ char *src, **pDst;
+ int size;
+ Status status = Success;
+
+
+ addr = snmp_getAddress(tag, idx);
+
+ if (NULL == addr)
+ {
+ /* Verify & get addrs for memcpy. */
+ return Failure;
+ }
+
+ /* Single access here to prevent any race condition */
+ snmp_lockMib(True);
+ switch(MIB_TYP(tag))
+ {
+ case MTYPE_STRING:
+ case MTYPE_TSTRING:
+ pDst = (char **) addr;
+ src = (char *) value;
+
+ if (NULL == src)
+ {
+ sz = 0;
+ }
+
+ if (MIB_TYP(tag) == MTYPE_TSTRING)
+ {
+ size = min (sz, SIZE_DisplayString);
+ if (*pDst == NULL)
+ {
+ *pDst = malloc(SIZE_DisplayString+1);
+ (*pDst)[SIZE_DisplayString] = 0;
+ }
+
+ memset(*pDst+size, 0, SIZE_DisplayString-size);
+ }
+ else
+ {
+ if (*pDst == NULL)
+ {
+ /* to prevent error string problem */
+ return Failure;
+ }
+ size = min(sz, MIB_SIZ(tag));
+ memset(*pDst+size, 0, MIB_SIZ(tag)-size);
+ }
+ strncpy(*pDst, src, size);
+ DMSG("set", printf("snmp_setEntry: Set string %s.%d = %s\n", snmp_tagName(tag), idx, *pDst));
+ break;
+
+ case MTYPE_NUMBER:
+ case MTYPE_TNUMBER:
+ *(INTEGER *)addr = (INTEGER)value;
+ DMSG("set", printf("snmp_setEntry: Set number %s.%d = %d (%#x)\n", snmp_tagName(tag), idx, value, value));
+ break;
+
+ case MTYPE_IPADDR:
+ case MTYPE_TIPADDR:
+ *(INTEGER *)addr = (INTEGER)value;
+ DMSG("set", printf("snmp_setEntry: Set IP %s.%d = %s\n", snmp_tagName(tag), idx, int2ip((UINT32)value)));
+ break;
+
+ case MTYPE_STRUCT:
+ case MTYPE_TENTRY:
+ size = MIB_SIZ(tag);
+ memcpy(addr, value, size); /* rather than *(void **)addr = (void *)value; */
+ DMSG("set", printf("snmp_setEntry struct %s.%d\n", snmp_tagName(tag), idx));
+ break;
+
+ default:
+ DMSG("set", printf("snmp_setEntry: Invalid Tag type (%s, %#x, %d)\n", snmp_tagName(tag), tag, (MIB_TYP(tag))));
+ status = Failure;
+ break;
+ }
+ snmp_lockMib(False);
+
+ if (status == Success)
+ {
+ snmp_postSet(tag);
+ }
+ SnmpMibSetCount++;
+ return status;
+}
+
+
+ /* snmp_findTag() Qsort style function to find a particular tag.
+ *
+ * This function is used as a qsort process to sort tables based on the tags.
+ * It is assumed that the first entry in the table is the tag to look for.
+ * This can be used for the table_find process as well if we emulate the
+ * the qsort style of argument passing, that is a pointer to the argument
+ * is passed.
+ */
+
+ int snmp_findTag( const void *arg1, const void *arg2)
+ {
+
+ return (*(int*)arg1-*(int*)arg2);
+ }
+
+
+ SEM_ID mibLock = 0;
+
+ Status snmp_lockMib(int lock)
+ {
+
+ if (!mibLock)
+ {
+ mibLock = semBCreate(SEM_Q_PRIORITY, SEM_FULL);
+ }
+
+ if (lock)
+ {
+ semTake(mibLock, WAIT_FOREVER);
+ }
+ else
+ {
+ semGive(mibLock);
+ }
+ return Success;
+ }
+
+ /* Status = snmp_validTag(tag);
+ *
+ * This routine is used to validate the mib tags. We look at each field
+ * make sure that it is within range. This will insure that the address
+ * that is calculated is contained within the actual MIB structures.
+ */
+
+ Status snmp_validTag(MibTag tag)
+ {
+ int typ = MIB_TYP(tag);
+ int siz = MIB_SIZ(tag);
+ int tbl = MIB_TBL(tag);
+ int itm = MIB_ITM(tag);
+ int i;
+ static int strStartIdx = 0;
+
+
+ DMSG("validate", printf("snmp_validTag: Tag %s(tag=%#x,typ=%d,sz=%d,tbl=%d,itm=%d)\n",
+ snmp_tagName(tag), tag, typ, siz, tbl, itm));
+
+
+ if ((tbl < 0) || (tbl > MTBL_last))
+ {
+ return False;
+ }
+
+ if (itm > mnetMibIndex[tbl].size/4)
+ {
+ return False;
+ }
+
+ if (strStartIdx == 0)
+ {
+ strStartIdx = MTBL_last;
+ tag = mnetMibIndex[++strStartIdx].tag;
+
+ while (tag && (MIB_TYP(tag) != MTYPE_STRING))
+ {
+ tag = mnetMibIndex[++strStartIdx].tag;
+ }
+ }
+
+ switch (typ)
+ {
+ case MTYPE_STRUCT:
+ if (itm || (siz != mnetMibIndex[tbl].size))
+ {
+ return False;
+ }
+ break;
+
+ case MTYPE_NUMBER:
+ case MTYPE_IPADDR:
+ if (siz != 4)
+ {
+ return False;
+ }
+ break;
+
+ case MTYPE_STRING:
+ for ( i = strStartIdx; mnetMibIndex[i].tag != 0; i++)
+ {
+ if (tag == mnetMibIndex[i].tag)
+ {
+ return True;
+ }
+ }
+ return False;
+
+
+ case MTYPE_TENTRY:
+ case MTYPE_TNUMBER:
+ case MTYPE_TIPADDR:
+ case MTYPE_TSTRING:
+ tag = MIB_TABLE(tbl, itm); /* create table tag first */
+ case MTYPE_TABLE:
+
+ for ( i = MTBL_last+1; i < strStartIdx; i++)
+ {
+ if ( tag == mnetMibIndex[i].tag)
+ {
+ return True;
+ }
+ }
+ return False;
+
+ default:
+ return False;
+ }
+ return True;
+ }
+
+ void snmp_getPdu(SNMP_PKT_T *pktp, VB_T *vbp, int value)
+ {
+ int size;
+ char* str;
+
+ switch (VB_TYPE(vbp))
+ {
+ case MTYPE_STRING:
+ case MTYPE_TSTRING:
+ str = (char *) value;
+ if (str == NULL)
+ {
+ size = 0;
+ }
+ else
+ {
+ size = min (strlen(str), SIZE_DisplayString);
+ }
+ getproc_got_string(pktp, vbp, size , str, 0, VT_STRING);
+ break;
+
+ case MTYPE_IPADDR:
+ case MTYPE_TIPADDR:
+ getproc_got_ip_address(pktp, vbp, value);
+ break;
+
+ case MTYPE_NUMBER:
+ case MTYPE_TNUMBER:
+ getproc_got_int32(pktp, vbp, value);
+ break;
+
+ default:
+ getproc_error(pktp, vbp, INCONSISTENT_NAME);
+ DMSG("get method", printf("snmp_getPdu: 6: Bad tag!!! Setting getproc_error(..., INCONSISTENT_NAME)\n"));
+ return;
+
+ } /* switch */
+
+ getproc_good(pktp, vbp);
+ DMSG("get method", printf("snmp_getPdu: 7: setting getproc_good(...)\n"));
+
+ }
+
+
+ /* SNMP PDU Processing method routines.
+ *
+ * These routines are used by the SNMP agent to retrieve values from the
+ * MIB. The started from the -skel output from MIBCOMP. The are used to
+ * implement the Get/Set processing of the PDU's. There are 4 basic method
+ * routines that we implement.
+ *
+ * snmp_getMethod() Used to get an item from the MIB
+ * snmp_setMethod() USed to set an item in the MIB
+ * snmp_testMethod() Used to test the value of a MIB variable.
+ * snmp_nextMethod() Used to get the next item from the MIB
+ */
+
+
+
+ void snmp_getMethod (
+ OIDC_T lastmatch,
+ int compc,
+ OIDC_T *compl,
+ SNMP_PKT_T *pktp,
+ VB_T *vbp)
+
+ {
+ int tag, ttag, value, idx = 0;
+ Table *tbl;
+
+ /* The get method routine is called to retrieve the current item. The
+ * processing here is very similar to the next method, except that we
+ * don't need to set the next instance information.
+ */
+
+ /* Although I have never seen it happen, the varbind list may have
+ * multiple data items to process. Do them all.
+ */
+
+ for (snmpdGroupByGetprocAndInstance(pktp, vbp, compc, compl);
+ vbp; vbp = vbp->vb_link) {
+ tag = VB_TAG(vbp);
+ DMSG("get method", printf("snmp_getMethod: Processing varbind for item %s\n", snmp_tagName(tag)));
+
+ if (mibInitialized == False)
+ {
+ getproc_error(pktp, vbp, RESOURCE_UNAVAILABLE);
+ DMSG("get method", printf("snmp_getMethod: MIB not initialized!!! Setting getproc_error(..., RESOURCE_UNAVAILABLE)\n"));
+ continue;
+ }
+ if (compc && MTYPE_IS_SCALAR(VB_TYPE(vbp)))
+ {
+ /* Scalar */
+
+ if (*compl)
+ { /* Scalars can only be single instances. */
+ getproc_nosuchins(pktp, vbp);
+ DMSG("get method", printf("snmp_getMethod: 2: setting nextproc_nosuchins(...)\n"));
+ continue; /* are in the MIB. */
+ }
+ }
+ else if (compc)
+ { /* Tabular entry ? */
+ idx = *compl;
+ ttag = MIB_TABLE(VB_TBL(vbp), VB_ITM(vbp)); /* Get the table pointer. */
+ tbl = (Table *)snmp_getValue(ttag); /* So that we can tell if */
+ if (!VALID_TABLE(tbl))
+ {
+ DMSG("get method", printf("WARNING!! Invalid table pointer!!\n"));
+ getproc_nosuchins(pktp, vbp); /* nope. */
+ DMSG("get method", printf("snmp_getMethod: 3: Setting getproc_nosuchins(...)\n"));
+ continue;
+ }
+
+ if (idx >= table_end(tbl))
+ { /* Is entry there? */
+ DMSG("get method", printf("snmp_getMethod: Instance %d too big. Table has %d entries.\n", idx, table_end(tbl)));
+ getproc_nosuchins(pktp, vbp); /* nope. */
+ DMSG("get method", printf("snmp_getMethod: 4: Setting getproc_nosuchins(...)\n"));
+ continue;
+ }
+ }
+ else
+ { /* Scalar entry with compc = 0 */
+ getproc_nosuchins(pktp, vbp);
+ DMSG("get method", printf("snmp_getMethod: 5: Setting getproc_nosuchins(...)\n"));
+ continue;
+ }
+
+ if (snmp_validTag(tag) == False)
+ {
+ getproc_error(pktp, vbp, NO_SUCH_NAME);
+ DMSG("get method", printf("snmp_getMethod: 6: Bad tag!!! Setting getproc_error(..., NON_SUCH_NAME)\n"));
+ continue;
+ }
+ value = snmp_getValue(tag, idx);
+ DMSG("get method", printf("snmp_getMethod: Value of %s(tag=%#x,row=%d)=%d (%#x)\n", snmp_tagName(tag), tag, idx, value, value));
+ snmp_getPdu(pktp, vbp, value);
+ }
+ }
+
+ void snmp_setMethod(
+ OIDC_T lastmatch,
+ int compc,
+ OIDC_T* compl,
+ SNMP_PKT_T* pktp,
+ VB_T* vbp)
+ {
+ int tag, ttag, value, old, idx = 0;
+ Table *tbl;
+ EBUFFER_T *ebuf;
+ char *str;
+ ValueType typ = VT_VALUE;
+ static int* pAccessFlag = NULL;
+
+ if (pAccessFlag == NULL)
+ {
+ if (NULL==(pAccessFlag = snmp_getAddress(MIB_mibAccessControlFlag)))
+ return;
+ }
+
+ /* The set method routine is called to store a value for the current item.
+ * The processing here is very similar to the get method, except that we
+ * store data rather than retrieve it.
+ */
+
+ /* Although I have never seen it happen, the varbind list may have
+ * multiple data items to process. Do them all.
+ */
+
+ for (snmpdGroupByGetprocAndInstance(pktp, vbp, compc, compl); vbp; vbp = vbp->vb_link)
+ {
+ tag = VB_TAG(vbp);
+ DMSG("set method", printf("snmp_setMethod: %s(tag=%#x)\n", snmp_tagName(tag), tag));
+
+ if (mibInitialized == False)
+ {
+ setproc_error(pktp, vbp, RESOURCE_UNAVAILABLE);
+ DMSG("set method", printf("snmp_setMethod: 1a: MIB not initialized!!! Setting setproc_error(..., RESOURCE_UNAVAILABLE)\n"));
+ continue;
+ /* Note: This is temporary. Later we will add a value to the OAM table. */
+ }
+
+ if ((*pAccessFlag == VAL_mibAccessControlFlag_false) && (tag != MIB_mibAccessControlFlag))
+ {
+ setproc_error(pktp, vbp, NO_ACCESS);
+ DMSG("set method", printf("snmp_setMethod: MIB not enabled!!! Setting setproc_error(..., NO_ACCESS)\n"));
+ continue;
+ }
+
+ if (compc && MTYPE_IS_SCALAR(VB_TYPE(vbp)))
+ {
+ if (*compl) { /* Scalar entry ? */
+ setproc_error(pktp, vbp, NO_SUCH_NAME); /* Yes, only single instances */
+ DMSG("set method", printf("snmp_setMethod: 2: setting settproc_error(..., NO_SUCH_NAME)\n"));
+ continue; /* are in the MIB. */
+ }
+ }
+ else if (compc)
+ { /* Tabular entry ? */
+ idx = *compl;
+ ttag = MIB_TABLE(VB_TBL(vbp), VB_ITM(vbp)); /* Set the table pointer. */
+ tbl = (Table *)snmp_getValue(ttag); /* So that we can tell if */
+
+ if (!VALID_TABLE(tbl))
+ {
+ DMSG("set method", printf("WARNING!! Invalid table pointer!!\n"));
+ setproc_error(pktp, vbp, INCONSISTENT_NAME); /* nope. */
+ DMSG("set method", printf("snmp_setMethod: 3a: Setting setproc_error(..., INCONSISTENT_NAME)\n"));
+ continue;
+ }
+
+ if (idx >= table_end(tbl))
+ { /* Is entry there? */
+ DMSG("set method", printf("snmp_setMethod: 3b: Instance %d too big. Table has %d entries.\n", idx, table_end(tbl)));
+ setproc_error(pktp, vbp, NO_SUCH_NAME); /* nope. */
+ DMSG("set method", printf("snmp_setMethod: 4: Setting setproc_error(..., NO_SUCH_NAME)\n"));
+ continue;
+ }
+
+ }
+ else
+ { /* Scalar entry with compc = 0 */
+ setproc_error(pktp, vbp, NO_SUCH_NAME);
+ DMSG("set method", printf("snmp_setMethod: 5: Setting setproc_error(..., NO_SUCH_NAME)\n"));
+ continue;
+ }
+
+ if (snmp_validTag(tag) == False) {
+ setproc_error(pktp, vbp, NO_SUCH_NAME);
+ DMSG("set method", printf("snmp_setMethod: 6: Bad tag!!! Setting setproc_error(..., NON_SUCH_NAME)\n"));
+ continue;
+ }
+
+ switch (VB_TYPE(vbp))
+ {
+ case MTYPE_TNUMBER:
+ case MTYPE_TIPADDR:
+
+ typ = VT_TABLE;
+
+ case MTYPE_NUMBER:
+ case MTYPE_IPADDR:
+
+
+ old = snmp_getValue(tag, idx);
+ value = (int) VB_GET_INT32(vbp);
+
+ if (value == old)
+ { /* Same as old value, say set was good, but bypass actual saving */
+ DMSG("set method", printf("snmp_setMethod: 6a: Suppressing set for '%s'. Old value = %d, New value = %d\n",
+ snmp_tagName(tag), old, value));
+ setproc_good(pktp, vbp);
+ continue;
+ }
+ else
+ {
+ DMSG("set method", printf("snmp_setMethod: 7: Setting number %s(%d) = %d (%#x)\n", snmp_tagName(tag), idx, value, value));
+
+ snmp_setEntry(tag, idx, (void *) value, 4);
+ setproc_good(pktp, vbp);
+ }
+ break;
+
+ case MTYPE_STRING:
+ case MTYPE_TSTRING:
+
+ ebuf = VB_GET_STRING(vbp);
+ str = (char *) EBufferStart(ebuf);
+ snmp_setEntry(tag, idx, str, EBufferUsed(ebuf));
+ typ = VT_ADDRESS; /* Setup for the processTrap call below */
+ value = (int)snmp_getValue(tag, idx);
+ DMSG("set method", printf("snmp_setMethod: 8a: Setting string %s(%d) ='%s'\n", snmp_tagName(tag), idx, (char *)value));
+ break;
+
+
+ default: /* Only structural elements are left.. The manager can't write them. */
+ setproc_error(pktp, vbp, NOT_WRITABLE);
+ DMSG("set method", printf("snmp_setMethod: 10: Bad tag!!! Setting setproc_error(..., NOT_WRITABLE)\n"));
+ continue;
+
+ } /* Switch */
+ DMSG("set method", printf("snmp_setMethod: 11: setting setproc_good(...)\n"));
+ setproc_good(pktp, vbp);
+
+ DMSG("set method", printf("snmp_setMethod: 12: calling processTrap(%d, %s, %d, %d)\n",
+ SNMP_AGENT_MODULE_ID, snmp_tagName(tag), typ, value));
+ oam_processTrap(SNMP_AGENT_MODULE_ID, tag, typ, value, idx);
+ } /* for */
+}
+
+
+
+void snmp_nextMethod (
+ OIDC_T lastmatch,
+ int compc,
+ OIDC_T *compl,
+ SNMP_PKT_T *pktp,
+ VB_T *vbp)
+{
+ OIDC_T next = 0;
+ int tag, ttag, value, idx = 0;
+ Table *tbl;
+
+
+ /* The next method routine is called to retrieve the current item
+ * and to set inforamation necessary to this routine the next time.
+ * We are passed the OID of the last thing that was recovered. We
+ * step to the next instance of the variable and return it.
+ */
+ /* Although I have never seen it happen, the varbind list may have
+ * multiple data items to gather. Process all of them.
+ */
+ for (snmpdGroupByGetprocAndInstance(pktp, vbp, compc, compl); vbp; vbp = vbp->vb_link)
+ {
+ tag = VB_TAG(vbp);
+ DMSG("next method", printf("snmp_nextMethod: Processing varbind for item %s\n", snmp_tagName(tag)));
+
+
+ if (mibInitialized == False)
+ {
+ nextproc_error(pktp, vbp, RESOURCE_UNAVAILABLE);
+ DMSG("next method", printf("snmp_getMethod: 1: MIB not initialized!!! Setting getproc_error(..., RESOURCE_UNAVAILABLE)\n"));
+ continue;
+ }
+ if (compc)
+ {
+ if (MTYPE_IS_SCALAR(VB_TYPE(vbp)))
+ {
+ /* compc != 0 and scalar */
+ /* If this is a scalar type, then */
+ /* there are no OID.n type of entries */
+ nextproc_no_next(pktp, vbp);
+ DMSG("next method", printf("snmp_nextMethod: 1: setting nextproc_no_next(...)\n"));
+ continue;
+ }
+ else
+ {
+ /* compc != 0 and tabular */
+
+ idx = *compl+1; /* Step to the next entry. */
+table_entry:
+ ttag = MIB_TABLE(VB_TBL(vbp), VB_ITM(vbp)); /* Get the table pointer. */
+ tbl = (Table *)snmp_getValue(ttag); /* So that we can tell if */
+ DMSG("next method", printf("snmp_getValue returned 0x%x\n",(int)tbl));
+ if (!VALID_TABLE(tbl))
+ {
+ DMSG("next method", printf("WARNING!! Invalid table pointer\n"));
+ }
+ else
+ {
+ DMSG("next method", printf("Found valid table pointer\n"));
+ }
+
+ if (idx >= table_end(tbl))
+ { /* Is this item there? */
+ DMSG("next method", printf("snmp_nextMethod: 2: Instance %d too big. Table has %d entries.\n", idx, table_end(tbl)));
+ nextproc_no_next(pktp, vbp);
+ DMSG("next method", printf("snmp_nextMethod: 3: setting nextproc_no_next(...)\n"));
+ continue;
+ }
+ next = idx;
+ nextproc_next_instance(pktp, vbp, 1, &next);
+ DMSG("next method", printf("snmp_nextMethod: 4: Setting nextproc_next_instance(..., %d)\n", (int)next));
+ }
+ }
+ else
+ {
+ if (MTYPE_IS_TABLE(VB_TYPE(vbp)))
+ {
+ /* compc == 0, tabular entry */
+ DMSG("next method", printf("snmp_nextMethod: 5: Tabular entry with compc == 0. Processing....\n"));
+ idx = 0;
+ goto table_entry; /* Yes, handle it. */
+ }
+ else
+ {
+ /* compc == 0, scalar entry */
+ next = 0;
+ nextproc_next_instance(pktp, vbp, 1, &next);
+ DMSG("next method", printf("snmp_nextMethod: 6: setting nextproc_next_instance(..., %d)\n", (int)next));
+ }
+ }
+
+ if (snmp_validTag(tag) == False)
+ {
+ nextproc_error(pktp, vbp, NO_SUCH_NAME);
+ DMSG("next method", printf("snmp_nextMethod: 7: Bad tag!!! Setting nextproc_error(..., NO_SUCH_NAME)\n"));
+ }
+ else
+ {
+ value = snmp_getValue(tag, idx);
+ DMSG("next method", printf("snmp_nextMethod: 8: Getting value for tag '0x%08x' '%s'=%d\n", tag, snmp_tagName(tag), value));
+ snmp_getPdu(pktp, vbp, value);
+ }
+ } /* for */
+}
+
+
+char * snmp_tagName(MibTag tag)
+{
+ static char buf[20];
+
+ MnetMibDataType *dtype;
+
+ if (!(dtype = (MnetMibDataType *)table_find(mnetMibDataTypeTable, snmp_findTag, (void *)&tag))) {
+ sprintf(buf, "Tag '0x%08x'", tag);
+ return buf;
+ }
+ return dtype->name;
+
+}
+
+int snmp_nameToTag(char *name)
+{
+ char c, buf[80], tag1[80], tag2[80];
+ int i, tag;
+
+ /* Be a little clever about the name that is given. Copy it to the
+ * the data buffer and put it in the form that we can use. We change
+ * any - characters to the _ used in the MIB tag name. If the name
+ * does not start with MIB_, we prepend it. We use strcasecmp to do
+ * a case independent compare. Try to be as friendly as possible. */
+
+ i = -1;
+ while ((++i < 80) && (c = *name++))
+ {
+ if (c == '-') c = '_'; /* Convert the - to _. */
+ buf[i] = c; /* Store the character away. */
+ }
+ buf[i] = 0; /* Terminate the name. */
+
+ if (!strncmp(buf, "MIB", 3))
+ { /* already have MIB_ in the */
+ strcpy(tag1, buf); /* name ? If so, assume the */
+ tag2[0] = 0; /* user knew what they were */
+ }
+ else
+ { /* typing. If not, they get */
+ sprintf(tag1, "MIB_%s", buf); /* an error message.*/
+ sprintf(tag2, "MIBT_%s", buf); /* 2 possibilities. */
+ }
+
+ DMSG("get Item", printf("snmp_nameToTag: Serching tag names: %s and %s\n", tag1, tag2));
+ i = -1;
+ while (mnetMibDataType[++i].tag)
+ {
+ if (!strcasecmp(tag1, mnetMibDataType[i].name) ||
+ (*tag2 && !strcasecmp(tag2, mnetMibDataType[i].name)))
+ break;
+ }
+ tag = mnetMibDataType[i].tag;
+ return tag;
+}
+
+
+int SnmpMibGet(char *name, ...)
+{
+ int tag, value, idx = 0;
+ MibTableInfo *mib;
+ va_list argn;
+
+
+ if (tag = snmp_nameToTag(name))
+ {
+ if (MTYPE_IS_TABLE(MIB_TYP(tag)))
+ {
+ va_start(argn, name); /* Entry or an element out of the entry. */
+ idx = va_arg(argn, int);
+ va_end(argn);
+ }
+
+ value = snmp_getValue(tag, idx);
+ switch (MIB_TYP(tag))
+ {
+ case MTYPE_STRUCT:
+ mib = (MibTableInfo *)value;
+ printf("%s = (0x%08x). Size=%d, dirty=%s, lock=%s, set=%s, get=%s\n",
+ snmp_tagName(tag), value, MIB_SIZ(tag), mib->info.dirty?"True":"False", mib->info.lock ? "True":"False",
+ mib->info.getTrap?"True":"False", mib->info.setTrap?"True":"False");
+ break;
+
+ case MTYPE_NUMBER:
+ case MTYPE_TNUMBER:
+ printf("%s.%d = \"%d\" (0x%08x)\n", snmp_tagName(tag), idx, value, value);
+ break;
+
+ case MTYPE_STRING:
+ case MTYPE_TSTRING:
+ printf("%s.%d = \"%s\"\n", snmp_tagName(tag), idx, value, (char *)value);
+ break;
+
+ case MTYPE_IPADDR:
+ case MTYPE_TIPADDR:
+ printf("%s.%d = \"%s\" (%#x)\n", snmp_tagName(tag), idx, int2ip(value), value);
+ break;
+
+ case MTYPE_TENTRY:
+ printf("%s.%d = (0x%08x). Table entry is %d bytes long\n", snmp_tagName(tag), idx, value, MIB_SIZ(tag));
+ break;
+
+ default:
+ printf("Unknown Mib Type=%d\n", MIB_TYP(tag));
+
+ } /* switch */
+ }
+ else
+ {
+ printf("Unable to locate MIB tag from supplied mib string '%s'\n", name);
+ }
+ return 0;
+}
+
+int SnmpMibSet(char *name, ...)
+{
+ int tag, value, idx = 0;
+ char* str;
+ Status status = Failure;
+
+ va_list argn;
+ va_start(argn, name); /* Entry or an element out of the entry. */
+
+ if (tag = snmp_nameToTag(name))
+ {
+ if (MTYPE_IS_TABLE(MIB_TYP(tag)))
+ {
+ idx = va_arg(argn, int);
+ }
+
+ switch (MIB_TYP(tag))
+ {
+
+ case MTYPE_NUMBER:
+ case MTYPE_TNUMBER:
+ value = va_arg(argn, int);
+ status = snmp_setEntry(tag, idx, (void *) value, 4);
+ break;
+
+
+ case MTYPE_STRING:
+ case MTYPE_TSTRING:
+ str = va_arg(argn, char *);
+ status = snmp_setEntry(tag, idx, str, strlen(str));
+ break;
+
+ case MTYPE_IPADDR:
+ case MTYPE_TIPADDR:
+ str = va_arg(argn, char *);
+ status = snmp_setEntry(tag, idx, (void *) inet_addr(str), 4);
+ break;
+
+ default:
+ printf("Unknown or not allowed Mib Type=%d\n", MIB_TYP(tag));
+
+ } /* switch */
+ }
+ else
+ {
+ printf("Unable to locate MIB tag from supplied mib string '%s'\n", name);
+ }
+
+ if (Success == status)
+ {
+ printf("Snmp Set was successful\n");
+ }
+
+ va_end(argn);
+ return 0;
+}
+
+#define SIZE_MibTagName 128
+int SnmpMibLookup(char *name)
+{
+ char buf[SIZE_MibTagName+1];
+ char pszTagName[SIZE_MibTagName+1];
+ int i, j, k;
+ char c;
+
+ if (NULL == name)
+ {
+ return ERROR;
+ }
+
+ k = min (SIZE_MibTagName, strlen(name));
+
+ for (i=0; i <k; i++)
+ {
+ if (c == '-')
+ {
+ c = '_';
+ }
+ buf[i] = toupper(name[i]);
+ }
+ buf[k] = 0;
+
+ DMSG("lookup", printf("SnmpMibLookup: Case insensetive search \'%s\'\n", buf));
+
+ i = 0;
+ while (mnetMibDataType[i].tag)
+ {
+ k = min(SIZE_MibTagName, strlen(mnetMibDataType[i].name));
+
+ for (j=0; j< k; j++)
+ {
+ pszTagName[j] = toupper(mnetMibDataType[i].name[j]);
+ }
+ pszTagName[k] = 0;
+
+ if (strstr(pszTagName, buf))
+ {
+ printf("%s ( %#x = %d )\n", mnetMibDataType[i].name, mnetMibDataType[i].tag, mnetMibDataType[i].tag);
+ }
+ i++;
+ }
+ return 0;
+}
+
+
+
+
+#ifdef DEBUG
+void
+snmp_printPDU(
+ SNMP_PKT_T *pktp,
+ char *where)
+{
+ VB_T *vbp;
+ MIBLEAF_T *ml;
+ int i;
+
+#ifdef LONG_PDU_PRINTOUT
+ printf("PDU Type='%s', length=%d, view=%d, flags='%x', phase='%x', max pkt=%d\n", snmp_printPduType(pktp->pdu_type),
+ pktp->pdu_length, pktp->mib_view, pktp->flags, pktp->phase, pktp->maxpkt);
+ printf(" cookie='%x', version=%d, view idx=%d, ident=%d, request id=%d\n", pktp->async_cookie,
+ pktp->snmp_version, pktp->view_index, pktp->lcl_ident, pktp->pdu.std_pdu.request_id);
+ printf(" error status=%d, error index=%d, max reps=%d, non reps=%d\n",
+ pktp->pdu.std_pdu.error_status, pktp->pdu.std_pdu.error_index,
+ pktp->pdu.std_pdu.max_reps, pktp->pdu.std_pdu.non_reps);
+ printf(" Std VBL_T: length=%d, count=%d, VBL_S='%x'\n", pktp->pdu.std_pdu.std_vbl.vbl_length,
+ pktp->pdu.std_pdu.std_vbl.vbl_count, pktp->pdu.std_pdu.std_vbl.vblp);
+ vbp = pktp->pdu.std_pdu.std_vbl.vblist;
+ for (; vbp; vbp = vbp->vb_link) {
+ printf(" objid='%x', num components=%d, component list=[", vbp->vb_obj_id,
+ vbp->vb_obj_id.num_components);
+ i = -1;
+ while (++i < vbp->vb_obj_id.num_components)
+ printf(i?", %d":"%d", vbp->vb_obj_id.component_list[i]);
+ printf("]\n");
+
+ printf(" seq size=%d, data flags n type='%x', flags='%x', data length=%d\n",
+ vbp->vb_obj_id, vbp->vb_seq_size, vbp->vb_data_flags_n_type, vbp->vb_flags, vbp->vb_data_length);
+ ml = vbp->vb_ml.ml_leaf;
+ printf(" Mib Leaf for %s, view mask='%x', write mask='%x':\n", snmp_tagName((int)ml->user_cookie),
+ ml->view_mask, ml->write_mask);
+ printf(" expected tag=%d, access type=%d, cookie='%x', locator=%d\n",
+ ml->expected_tag, ml->access_type, ml->user_cookie, ml->locator);
+ printf(" testproc='%x', getproc='%x', setproc='%x', nextproc='%x'\n",
+ ml->testproc, ml->getproc, ml->setproc, ml->nextproc);
+ }
+ printf(" Saved VBL_T: length=%d, count=%d, VBL_S='%x'\n", pktp->pdu.std_pdu.saved_vbl.vbl_length,
+ pktp->pdu.std_pdu.saved_vbl.vbl_count, pktp->pdu.std_pdu.saved_vbl.vblp);
+ vbp = pktp->pdu.std_pdu.saved_vbl.vblist;
+ for (; vbp; vbp = vbp->vb_link) {
+ printf(" objid='%x' seq size=%d, data flags n type='%x', flags='%x', data length=%d\n",
+ vbp->vb_obj_id, vbp->vb_seq_size, vbp->vb_data_flags_n_type, vbp->vb_flags, vbp->vb_data_length);
+ ml = vbp->vb_ml.ml_leaf;
+ printf(" Mib Leaf for %s, view mask='%x', write mask='%x':\n", snmp_tagName(ml->user_cookie),
+ ml->view_mask, ml->write_mask);
+ printf(" expected tag=%d, access type=%d, cookie='%x', locator=%d\n",
+ ml->expected_tag, ml->access_type, ml->user_cookie, ml->locator);
+ printf(" testproc='%x', getproc='%x', setproc='%x', nextproc='%x'\n",
+ ml->testproc, ml->getproc, ml->setproc, ml->nextproc);
+ }
+#else
+ printf("%s: PDU Type='%s', length=%d, request id=%d, VBL_T length=%d, count=%d\n", where,
+ snmp_printPduType(pktp->pdu_type), pktp->pdu_length, (int)pktp->pdu.std_pdu.request_id,
+ pktp->pdu.std_pdu.std_vbl.vbl_length, pktp->pdu.std_pdu.std_vbl.vbl_count);
+ vbp = pktp->pdu.std_pdu.std_vbl.vblist;
+ if (pktp->pdu_length > 512 || pktp->pdu.std_pdu.std_vbl.vbl_count > 10)
+ return;
+ else for (; vbp; vbp = vbp->vb_link) {
+ ml = vbp->vb_ml.ml_leaf;
+ printf(" VB_T tag='0x%08x' %s, oid=", (int)ml->user_cookie, snmp_tagName((int)ml->user_cookie));
+ if (vbp->vb_obj_id.num_components < 20) {
+ i = -1;
+ while (++i < vbp->vb_obj_id.num_components)
+ printf(i?".%d":"%d", vbp->vb_obj_id.component_list[i]);
+ printf("\n");
+ } else printf("invalid OID contains %d components\n", vbp->vb_obj_id.num_components);
+ }
+#endif
+}
+
+char *
+snmp_printPduType(op)
+{
+ static char buf[20];
+
+ switch (op) {
+ case GET_REQUEST_PDU: return "GET_REQUEST";
+ case GET_NEXT_REQUEST_PDU: return "GET_NEXT_REQUEST";
+ case GET_RESPONSE_PDU: return "GET_RESPONSE";
+ case SET_REQUEST_PDU: return "SET_REQUEST";
+ case TRAP_PDU: return "TRAP";
+ case GET_BULK_REQUEST_PDU: return "GET_BULK_REQUEST";
+ case INFORM_REQUEST_PDU: return "INFORM_REQUEST";
+ case TRAP2_PDU: return "TRAP2";
+ case REPORT_PDU: return "REPORT";
+ default: sprintf(buf, "%d", op);
+ return buf;
+ }
+}
+
+#endif
diff --git a/data/mnet/Common/socket/Makefile b/data/mnet/Common/socket/Makefile
new file mode 100644
index 0000000..2466a80
--- /dev/null
+++ b/data/mnet/Common/socket/Makefile
@@ -0,0 +1,47 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+# (OPTIONAL) Append REPLACE - Replaces the List of directories
+# to be used in the SUBDIRS variable
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src REPLACE="src_api src_debug"
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+SUBDIRS = src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..
+
+VOBDIR = $(TOP_OF_VOB)/../$(VOB)
+
+# Allows a sub-set of the source code directories to be used
+
+ifneq ($(REPLACE),)
+ SUBDIRS = $(REPLACE)
+endif
+
+include $(VOBDIR)\l3defs.mk
+
+
diff --git a/data/mnet/Common/socket/include/CallBackSSL.h b/data/mnet/Common/socket/include/CallBackSSL.h
new file mode 100644
index 0000000..3d7b316
--- /dev/null
+++ b/data/mnet/Common/socket/include/CallBackSSL.h
@@ -0,0 +1,35 @@
+#ifndef __CALLBACKSSL_H__
+#define __CALLBACKSSL_H__
+
+//*******************************************************************
+//
+// (c) Copyright CISCO Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// File : CallBackSSL.h
+// Author(s) : Igal Gutkin
+// Create Date : 5/22/01
+// Description : declaration of the service function required by the
+// SSL library
+//
+// *******************************************************************
+
+int verify_callback (int ok , X509_STORE_CTX *ctx);
+
+#if defined (_OPEN_SSL_LIB_)
+
+ int password_cb (char *buf, int num ,int rwflag, void *userdata);
+
+#elif defined (_RSA_SSL_LIB_)
+
+ int password_cb (char *buf, int num ,int rwflag);
+
+#endif
+
+
+#endif //__CALLBACKSSL_H__ \ No newline at end of file
diff --git a/data/mnet/Common/socket/src/GenClientSocket.cpp b/data/mnet/Common/socket/src/GenClientSocket.cpp
new file mode 100644
index 0000000..95fcc8a
--- /dev/null
+++ b/data/mnet/Common/socket/src/GenClientSocket.cpp
@@ -0,0 +1,236 @@
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : GenClientSocket.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 06/20/00
+// Description : implementation of the GenClientSocket class
+//
+// *******************************************************************
+
+
+#include "socket\GenClientSocket.h"
+
+//////////////////////////////////////////////////////////////////////
+// Static data members
+//////////////////////////////////////////////////////////////////////
+SSL_CTX *GenClientSocket::pCtx_ = NULL;
+
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+GenClientSocket::GenClientSocket()
+ : GenSocketSSL ()
+{
+ reset ();
+}
+
+
+GenClientSocket::GenClientSocket (int sndSize, int rcvSize)
+ : GenSocketSSL ()
+{
+ reset ();
+
+ sndBuffLen_ = sndSize;
+ rcvBuffLen_ = rcvSize;
+}
+
+
+GenClientSocket::GenClientSocket (bool bEnableSSL, bool bEnableEncryption)
+ : GenSocketSSL (bEnableSSL, bEnableEncryption)
+{
+ reset ();
+}
+
+
+GenClientSocket::GenClientSocket (int sndSize, int rcvSize, bool bEnableSSL, bool bEnableEncryption)
+ : GenSocketSSL (bEnableSSL, bEnableEncryption)
+{
+ reset ();
+
+ sndBuffLen_ = sndSize;
+ rcvBuffLen_ = rcvSize;
+}
+
+
+//////////////////////////////////////////////////////////////////////
+// Primary behaviour methods
+//////////////////////////////////////////////////////////////////////
+
+bool GenClientSocket::connectServer (ubyte4 ipAddr, ubyte2 tcpPort)
+{
+ bool retVal = false;
+
+ struct sockaddr_in remAddr;
+
+ AM_FUNC ("GenClientSocket::connectServer", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ if (isConnected() != SOCKET_CONNECTED)
+ {
+ if (create ()) // Create a socket
+ {
+ srvPort_ = tcpPort;
+ srvAddr_ = ipAddr ;
+
+ memset (&remAddr, 0, sizeof(remAddr));
+
+ remAddr.sin_family = AF_INET ;
+ remAddr.sin_addr.s_addr = srvAddr_ ;
+ remAddr.sin_port = htons(srvPort_);
+
+ if ((connect (getSocket(), (struct sockaddr *)&remAddr, sizeof(remAddr))
+ != SOC_STATUS_ERROR) )
+ {
+ if (isEnableSSL())
+ {
+ if (connectSsl ())
+ {
+ retVal = true;
+ AM_TRACE (("SSL Client is connected to %s\n",
+ getIp (srvAddr_) ));
+ }
+ else
+ {
+ AM_WARNING (("SSL Client is unable to connect to %s\n",
+ getIp (srvAddr_) ));
+ }
+ }
+ else
+ {
+ retVal = true;
+ AM_TRACE (("TCP Client is connected to: %s,%u\n",
+ getIp(srvAddr_), srvPort_ ));
+ }
+ }
+ else
+ {
+ AM_WARNING (("Socket %u error (%s) on connecting to TCP Server %s\n",
+ getSocket(), strerror(ERROR_NUM), getIp(srvAddr_)));
+ }
+
+ if (!retVal)
+ { // release the socket if not connected
+ releaseSocket (true);
+ }
+ }
+ }
+ else
+ {
+ AM_TRACE (("Invalid attempt to reinitialize an active IP connection.\n"));
+ retVal = true;
+ }
+
+ AM_RETURN (retVal);
+}
+
+
+bool GenClientSocket::reconnect()
+{
+ bool retVal = false;
+
+ AM_FUNC ("GenClientSocket::reconnect", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ releaseSocket (true);
+
+ retVal = connectServer (srvAddr_, srvPort_);
+
+ AM_RETURN (retVal);
+}
+
+
+bool GenClientSocket::create ()
+{
+ bool retVal = false;
+ int buffSize = 4 ;
+
+ AM_FUNC ("GenClientSocket::create", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ if (GenSocket::create())
+ {
+ if (rcvBuffLen_ > 0)
+ if (setsockopt (getSocket() , SOL_SOCKET, SO_RCVBUF,
+ (char *)&rcvBuffLen_, buffSize ) == SOC_STATUS_ERROR)
+ {
+ AM_TRACE (("Unable to set SO_RCVBUF socket option\n"));
+ }
+
+ if (rcvBuffLen_ > 0)
+ if (setsockopt (getSocket() , SOL_SOCKET, SO_SNDBUF,
+ (char *)&sndBuffLen_, buffSize ) == SOC_STATUS_ERROR)
+ {
+ AM_TRACE (("Unable to set SO_SNDBUF socket option\n"));
+ }
+
+ if (setLinger_)
+ setsockopt (getSocket() , SOL_SOCKET, SO_LINGER,
+ (char *)&lingerVal_, sizeof(linger) );
+
+ retVal = true;
+ }
+
+ AM_RETURN (retVal);
+}
+
+
+bool GenClientSocket::isContext ()
+{
+ return (pCtx_ != NULL);
+}
+
+
+bool GenClientSocket::initSslContext (LPSTR lpPswd)
+{
+ return (isSupportSSL() ? GenSocketSSL::initSslContext (pCtx_, false, lpPswd)
+ : true );
+}
+
+
+SSL_CTX *GenClientSocket::getContext ()
+{
+ return (pCtx_);
+}
+
+
+void GenClientSocket::printInfo()
+{
+ GenSocketSSL::printInfo();
+
+ if (isConnected())
+ {
+ printf ("Client Socket Info: socket %u is connected to IP (%s,%d).\n",
+ getSocket(), getIp(srvAddr_), srvPort_);
+ }
+ else
+ {
+ printf ("Client Socket Info: socket is not connected to the server.\n");
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////
+// service methods
+//////////////////////////////////////////////////////////////////////
+
+
+void GenClientSocket::reset()
+{
+ srvPort_ = 0 ;
+ srvAddr_ = 0 ;
+ sndBuffLen_ = -1;
+ rcvBuffLen_ = -1;
+ setLinger_ = false;
+}
+
diff --git a/data/mnet/Common/socket/src/GenSecServerSocket.cpp b/data/mnet/Common/socket/src/GenSecServerSocket.cpp
new file mode 100644
index 0000000..36d468b
--- /dev/null
+++ b/data/mnet/Common/socket/src/GenSecServerSocket.cpp
@@ -0,0 +1,110 @@
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : GenSecServerSocket.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 06/20/00
+// Description : implementation of the GenSecServerSocket (secondary
+// server socket) class
+//
+// *******************************************************************
+
+#include "socket\GenSecServerSocket.h"
+
+//////////////////////////////////////////////////////////////////////
+// Constructors/Destructor
+//////////////////////////////////////////////////////////////////////
+
+/*
+ This class should be used ONLY to create "secondary" socket objects:
+ Those sockets are created when a server socket accepts a connection
+ fromt the client and assigns a new "secondary" socket to handle it.
+ Socket parameter should be a valid socket.
+*/
+
+GenSecServerSocket::GenSecServerSocket (OS_SPECIFIC_SOCKET_HANDLE socket)
+ : GenServerSocket ()
+{
+ reset (socket);
+}
+
+
+GenSecServerSocket::GenSecServerSocket (OS_SPECIFIC_SOCKET_HANDLE socket ,
+ bool enableSSL,
+ bool enableEncryption)
+ : GenServerSocket (enableSSL, enableEncryption)
+{
+ AM_FUNC ("GenSecServerSocket::GenSecServerSocket(SSL)", SOC_LAYER_ID);
+ AM_ENTER();
+
+ reset (socket);
+
+ if (isEnableSSL())
+ {
+ // blocking call to SSL API. USE only for dynamic object creation!!!
+ // 1. All the necessary validity checks are performed inside "acceptSsl"
+ // 2. will release a socket on error !!!
+ if (acceptSsl () == false)
+ {
+ AM_WARNING (("Server is unable to establish SSL connection with the client on %s\n",
+ getIp(getRemoteHostAddress()) ));
+ releaseSocket (true);
+ }
+ }
+
+ if (bMoreInfo_)
+ printInfo ();
+
+ AM_LEAVE();
+}
+
+
+GenSecServerSocket::~GenSecServerSocket()
+{
+ AM_FUNC ("GenSecServerSocket::~GenSecServerSocket", SOC_LAYER_ID);
+ AM_ENTER();
+
+ if (isValid())
+ {
+ AM_TRACE (("Disconnecting socket (%u) from the client IP(%s) \n",
+ getSocket(), getIp(getRemoteHostAddress()) ));
+ }
+
+ AM_LEAVE();
+}
+
+
+void GenSecServerSocket::reset (OS_SPECIFIC_SOCKET_HANDLE socket)
+{
+ AM_FUNC ("GenSecServerSocket::reset", SOC_LAYER_ID);
+ AM_ENTER();
+
+ if (setSocket (socket))
+ {
+ //Optional timer to keep alive the connection
+ char optVal = 1 ;
+ int rcvBuffLen = SOC_RCV_BUFF_LEN,
+ sndBuffLen = SOC_SND_BUFF_LEN;
+ // hard socket close mode
+ struct linger lingerVal = {1,0};
+
+ setsockopt (getSocket(), SOL_SOCKET, SO_KEEPALIVE, &optVal , sizeof(optVal) );
+ setsockopt (getSocket(), SOL_SOCKET, SO_RCVBUF , (char *)&rcvBuffLen, sizeof(rcvBuffLen));
+ setsockopt (getSocket(), SOL_SOCKET, SO_SNDBUF , (char *)&sndBuffLen, sizeof(sndBuffLen));
+ setsockopt (getSocket(), SOL_SOCKET, SO_LINGER , (char *)&lingerVal , sizeof(linger ));
+
+ AM_TRACE (("Open new socket %d to IP (%s)\n",
+ getSocket(), getIp(getRemoteHostAddress()) ));
+ }
+
+ AM_LEAVE();
+}
+
diff --git a/data/mnet/Common/socket/src/GenServerSocket.cpp b/data/mnet/Common/socket/src/GenServerSocket.cpp
new file mode 100644
index 0000000..d44a08e
--- /dev/null
+++ b/data/mnet/Common/socket/src/GenServerSocket.cpp
@@ -0,0 +1,210 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 2.0
+// Status : Under development
+// File : GenServerSocket.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 06/20/00
+// Description : implementation of the GenServerSocket class.
+//
+// *******************************************************************
+
+#include "socket\GenServerSocket.h"
+
+//////////////////////////////////////////////////////////////////////
+// Static data members
+//////////////////////////////////////////////////////////////////////
+SSL_CTX *GenServerSocket::pCtx_ = NULL;
+
+
+//////////////////////////////////////////////////////////////////////
+// Constructors/Destructor
+//////////////////////////////////////////////////////////////////////
+GenServerSocket::GenServerSocket (bool bEnableSSL, bool bEnableEncryption)
+ : GenSocketSSL (bEnableSSL, bEnableEncryption), port_(0)
+{
+ ;
+}
+
+
+GenServerSocket::~GenServerSocket()
+{
+ AM_FUNC ("GenServerSocket::~GenServerSocket", SOC_LAYER_ID);
+ AM_ENTER();
+
+ if (isValid())
+ {
+ AM_DEBUG (("Closing server socket (%d) on IP (%s,%u)\n",
+ getSocket(), getIp(getLocalHostAddress()), port_));
+ }
+
+ // should clean server SSL context once per host
+
+ AM_LEAVE();
+}
+
+
+///////////////////////////////////////////////////////////
+// primary methods
+///////////////////////////////////////////////////////////
+
+bool GenServerSocket::open (ubyte2 Port)
+{
+ AM_FUNC ("GenServerSocket::open", SOC_LAYER_ID);
+ AM_ENTER ();
+ bool retVal = true;
+
+ // hard socket close mode
+ struct linger lingerVal = {1,0};
+
+ if ((retVal = !isValid()) == false)
+ {
+ AM_WARNING (("GenServerSocket::open - Attempt to reopen socket (%d).\n",
+ getSocket() ));
+ }
+
+ // create socket
+ if (retVal)
+ retVal = create ();
+
+ // bind socket
+ if (retVal)
+ retVal = bind2Address (Port);
+
+ // wait for client connection requests
+ if (retVal)
+ {
+ if (listen (getSocket(), kTCP_LISTEN_BACKLOG) == 0)
+ {
+ int rcvBuffLen = SOC_MRCV_BUFF_LEN,
+ sndBuffLen = SOC_MSND_BUFF_LEN;
+
+ setPort (Port);
+
+ setsockopt (getSocket(), SOL_SOCKET, SO_RCVBUF, (char *)&rcvBuffLen, sizeof(rcvBuffLen));
+ setsockopt (getSocket(), SOL_SOCKET, SO_SNDBUF, (char *)&sndBuffLen, sizeof(sndBuffLen));
+ setsockopt (getSocket(), SOL_SOCKET, SO_LINGER, (char *)&lingerVal , sizeof(linger ));
+
+ if (!isEnableSSL () || initSsl ())
+ { // initiate SSL session on a valid socket
+ AM_TRACE (("Open main server socket (%d) on IP (%s,%u)\n",
+ getSocket(), getIp(getLocalHostAddress()), port_));
+ }
+ else
+ {
+ AM_TRACE (("Unable to initiate SSL session on a server socket\n"));
+ retVal = false;
+ }
+
+#ifdef _AM_DEBUG_
+ printInfo ();
+#endif // _AM_DEBUG_
+ }
+ else
+ {
+ AM_ERROR (("%s: %sd\n", "listen", strerror(ERROR_NUM)));
+ retVal = false;
+ }
+ }
+
+ AM_RETURN (retVal);
+}
+
+
+SSL_CTX *GenServerSocket::getContext ()
+{
+ return (pCtx_);
+}
+
+
+bool GenServerSocket::isContext ()
+{
+ return (pCtx_ != NULL);
+}
+
+
+bool GenServerSocket::initSslContext (LPSTR lpPswd)
+{
+ return (isSupportSSL() ? GenSocketSSL::initSslContext (pCtx_, false, lpPswd)
+ : true );
+}
+
+
+///////////////////////////////////////////////////////////
+// service methods
+///////////////////////////////////////////////////////////
+
+bool GenServerSocket::bind2Address (ubyte2 Port)
+{
+ AM_FUNC("GenServerSocket::bind2Address", SOC_LAYER_ID);
+ AM_ENTER();
+
+ struct sockaddr_in LocalAddr;
+ bool retVal = false;
+ u_long ulHostAddress;
+
+ if (!isValid())
+ AM_RETURN (false);
+
+ /* ask the system to allocate a port and bind to INADDR_ANY */
+ memset(&LocalAddr, 0x00, sizeof(LocalAddr));
+
+ if ((ulHostAddress = getLocalHostAddress()) == 0)
+ AM_RETURN (false);
+
+ /* get system to allocate a port number by binding a host address */
+ LocalAddr.sin_family = AF_INET;
+
+ /* allows connection on any local interface. Replace it with ulHostAddress
+ for multihomed machine compatibility */
+ LocalAddr.sin_addr.s_addr = htonl(INADDR_ANY);
+ LocalAddr.sin_port = htons(Port);
+
+ if (bind (getSocket(), (struct sockaddr *)&LocalAddr, sizeof(LocalAddr)) != 0)
+ {
+ AM_ERROR (("Unable to bind a socket to [%s:%u]\nAnother application using it\n",
+ getIp(getLocalHostAddress()),Port ));
+ }
+ else
+ retVal = true;
+
+ AM_RETURN (retVal);
+}
+
+
+bool GenServerSocket::acceptConnection (OS_SPECIFIC_SOCKET_HANDLE& accSoc)
+{
+ bool retVal = false;
+ char ClientAddr[MAX_PATH];
+ int iAddrLen;
+
+ AM_FUNC("GenServerSocket::acceptConnection", SOC_LAYER_ID);
+ AM_ENTER();
+
+ iAddrLen = sizeof(ClientAddr);
+ memset(&ClientAddr, 0x00, iAddrLen);
+
+ if ((accSoc = accept (getSocket(), (sockaddr FAR *)&ClientAddr, &iAddrLen))
+ != INVALID_SOCKET)
+ {
+ // Perform
+ retVal = true;
+ }
+ else
+ {
+ if (isValid())
+ {
+ AM_WARNING (("GenServerSocket::acceptConnection: %s\n", strerror(ERROR_NUM) ));
+ }
+ }
+
+ AM_RETURN (retVal);
+}
+
diff --git a/data/mnet/Common/socket/src/GenSocket.cpp b/data/mnet/Common/socket/src/GenSocket.cpp
new file mode 100644
index 0000000..33b7920
--- /dev/null
+++ b/data/mnet/Common/socket/src/GenSocket.cpp
@@ -0,0 +1,403 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 2.0
+// Status : Under development
+// File : GenSocket.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 06/20/00
+// Description : implementation of the GenSocket class.
+//
+// *******************************************************************
+
+#include "socdefs.h"
+#include "socket\GenSocket.h"
+
+
+
+//////////////////////////////////////////////////////////////////////
+// static data members
+//////////////////////////////////////////////////////////////////////
+IpAddrPool_t GenSocket::szIpAddr_;
+
+const struct timeval GenSocket::timeOut_ = {0, 0};
+
+bool GenSocket::bMoreInfo_ =
+#ifdef _AM_DEBUG_
+ true ;
+#else
+ false;
+#endif // _AM_DEBUG_
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+GenSocket::GenSocket()
+ : sock_ (INVALID_SOCKET)
+{
+ ;
+}
+
+
+GenSocket::~GenSocket()
+{
+ cleanup ();
+}
+
+
+
+//////////////////////////////////////////////////////////////////////
+// static methods
+//////////////////////////////////////////////////////////////////////
+
+// Retrives local host IP address
+ubyte4 GenSocket::getLocalHostAddress()
+{
+ ubyte4 ulHostAddr = 0;
+ sbyte szHostName[MAX_PATH];
+
+ AM_FUNC ("GenSocket::getLocalHostAddress", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ // get local host name
+ if (gethostname (szHostName, sizeof(szHostName)) != SOC_STATUS_ERROR)
+ {
+ ulHostAddr = getHostAddress (szHostName);
+ }
+ else
+ {
+ AM_ERROR(("%s: %s\n", "GenSocket::getLocalHostAddress", strerror(ERROR_NUM) ));
+ }
+
+ AM_LEAVE();
+ return (ulHostAddr);
+}
+
+
+// Converts IP from HEX to dotted form
+const LPSTR GenSocket::getIp (ubyte4 ipAddr)
+{
+ memset (szIpAddr_, 0, sizeof szIpAddr_);
+
+ sprintf (szIpAddr_, "%d.%d.%d.%d", IP_BYTES (ipAddr));
+
+ return (szIpAddr_);
+}
+
+
+
+//////////////////////////////////////////////////////////////////////
+// service methods
+//////////////////////////////////////////////////////////////////////
+
+SocketState_t GenSocket::isConnected ()
+{
+ SocketState_t retVal = SOCKET_NOT_CONNECTED;
+ fd_set readFds ;
+ int tempVal ;
+ char tempBuff [32];
+
+ AM_FUNC ("GenSocket::isConnected", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ if (isValid())
+ {
+ FD_ZERO (&readFds);
+ FD_SET (getSocket(), &readFds);
+
+ /*
+ Readability means that queued data is available for reading such
+ that a call to recv, WSARecv, WSARecvFrom, or recvfrom is
+ guaranteed not to block.
+ For connection-oriented sockets, readability can also indicate that
+ a request to close the socket has been received from the peer. If
+ the virtual circuit was closed gracefully, and all data was received,
+ then a recv will return immediately with zero bytes read. If the
+ virtual circuit was reset, then a recv will complete immediately with
+ an error code such as WSAECONNRESET. The presence of out-of-band data
+ will be checked if the socket option SO_OOBINLINE has been enabled.
+
+ 1. select returns -1, no connection
+ +2. select returns 0, socket isn't ready to read - connection is OK
+ 3. select returns > 0, socket is ready to read - check it with recv
+ 1. recv return 0 OR
+ recv return SOCKET_ERROR and errno != WSAEMSGSIZE
+ socket is closed.
+ 2. recv return SOCKET_ERROR and errno == WSAEMSGSIZE OR
+ recv return > 1, there is a data on the socket
+ If the data is unexpected, reset the socket to avoid
+ potential security violation in the child class.
+ */
+ tempVal = select (1, &readFds, NULL, NULL, (struct timeval *)&timeOut_);
+
+
+ switch (tempVal)
+ {
+ case SOC_STATUS_ERROR:
+ retVal = SOCKET_NOT_CONNECTED;
+ break;
+
+ case 0:
+ retVal = SOCKET_CONNECTED;
+ break;
+
+ default:
+ tempVal = recv (getSocket(), tempBuff, sizeof (tempBuff), MSG_PEEK);
+
+ retVal = (!tempVal || (tempVal == SOC_STATUS_ERROR && ERROR_NUM != WSAEMSGSIZE))
+ ? SOCKET_NOT_CONNECTED
+ : SOCKET_CONNECTED_READABLE;
+ break;
+ }
+ }
+
+ // AM_DEBUG (("Socket %u is %s connected.\n", getSocket(), retVal ? "" : " not"));
+
+ AM_LEAVE();
+ return (retVal);
+}
+
+
+bool GenSocket::create()
+{
+ bool retVal = false;
+ OS_SPECIFIC_SOCKET_HANDLE newSocket;
+
+ AM_FUNC ("GenSocket::create", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ if (!isValid ())
+ {
+ if ((newSocket = socket(AF_INET, SOCK_STREAM, 0)) != INVALID_SOCKET)
+ {
+ retVal = setSocket (newSocket);
+ AM_DEBUG (("Open new socket %u\n", getSocket()));
+ }
+ else
+ {
+ AM_ERROR(("GenSocket::create: %s\n", strerror(ERROR_NUM) ));
+ }
+ }
+ else
+ {
+ retVal = true;
+ AM_WARNING (("Attempt to reinitialize socket.\n"));
+ }
+
+ AM_LEAVE();
+ return (retVal);
+}
+
+
+// Returns a host address by the host name
+ubyte4 GenSocket::getHostAddress (LPSTR HostName)
+{
+ ubyte4 ipAddr;
+
+#ifdef _WINDOWS_
+ struct hostent *pHostAddr;
+ pHostAddr = gethostbyname (HostName);
+ ipAddr = (pHostAddr) ? (*((ubyte4 *)pHostAddr->h_addr)) : 0;
+#else
+ ipAddr = hostGetByName (HostName);
+#endif
+
+ return (ipAddr);
+}
+
+
+// Returns remote (peer) host address
+ubyte4 GenSocket::getRemoteHostAddress ()
+{
+ sockaddr_in ClientAddr ;
+ ubyte4 remIpAddr = 0;
+ int iAddrLen = sizeof(ClientAddr);
+
+ AM_FUNC ("GenSocket::getRemoteHostAddress", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ if (isValid ())
+ {
+ if (SOC_STATUS_OK == getpeername (getSocket(), (struct sockaddr *)&ClientAddr, &iAddrLen))
+ remIpAddr = ClientAddr.sin_addr.s_addr;
+ else
+ {
+ remIpAddr = 0;
+
+ AM_TRACE (("getpeername() error %s on socket %d\n",
+ strerror(ERROR_NUM), getSocket() ));
+ }
+ }
+
+ AM_LEAVE();
+ return (remIpAddr);
+}
+
+
+bool GenSocket::setSocket (OS_SPECIFIC_SOCKET_HANDLE Socket)
+{
+ bool retVal = false;
+
+ if (!isValid() && Socket != INVALID_SOCKET && Socket)
+ {
+ sock_ = Socket;
+ retVal = true ;
+ }
+
+ return (retVal);
+}
+
+
+int GenSocket::tcpReceive (sbyte *pBuf, int BufSize)
+{
+ int MsgLen = SOC_STATUS_ERROR;
+
+ AM_FUNC ("GenSocket::tcpReceive", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ if (isValid())
+ {
+ MsgLen = recv (getSocket(), pBuf, BufSize, 0);
+
+ switch (MsgLen)
+ {
+ case 0:
+ AM_TRACE (("GenSocket::tcpReceive: Client closed connection on socket (%d)\n",
+ getSocket()));
+ break;
+
+ case SOC_STATUS_ERROR:
+ AM_TRACE (("GenSocket::tcpReceive: recv error %s on socket (%d)\n",
+ strerror(ERROR_NUM), getSocket() ));
+ break;
+
+ default:
+ AM_DEBUG (("GenSocket::tcpReceive: message received - total length (%d)\n", MsgLen));
+ AM_HEXDUMP ((ubyte *)pBuf, MsgLen);
+ break;
+ }
+ }
+
+ AM_LEAVE();
+ return (MsgLen);
+}
+
+
+int GenSocket::tcpSend (sbyte* pBuff, int inDataLen)
+{
+ AM_FUNC ("GenSocket::tcpSend", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ int retVal = SOCKET_STATUS_FATAL_SOC_ERR;
+ int sentDataLen, socError;
+
+
+ if (isValid ())
+ {
+ sentDataLen = send (getSocket(), pBuff, inDataLen, 0);
+
+ if (sentDataLen != SOC_STATUS_ERROR)
+ {
+ /* Checks that ALL the data is sent.
+ If blocking mode is used all the data is sent.
+ For non-blocking mode it could be less. */
+ retVal = SOCKET_STATUS_OK;
+
+ AM_DEBUG (("tcpSend: Sent %d bytes to socket %d\n", sentDataLen,
+ getSocket()));
+ }
+ else
+ {
+ socError = ERROR_NUM;
+
+ switch (socError)
+ {
+ case WSAENOBUFS:
+ retVal = SOCKET_STATUS_TEMP_SOC_ERR;
+ break;
+
+ case WSAEMSGSIZE:
+ retVal = SOCKET_STATUS_MSG_TOO_LONG;
+ AM_TRACE (("tcpSend: Data length %u exciding maximum allowed by the network.\n",
+ inDataLen));
+ break;
+
+ default:
+ retVal = SOCKET_STATUS_FATAL_SOC_ERR; // fatal error, the connection is broken
+ }
+ }
+ }
+ else
+ {
+ AM_TRACE (("Socket is not connected. Send has failed.\n"));
+ }
+
+ AM_LEAVE();
+ return (retVal);
+}
+
+
+void GenSocket::releaseSocket (bool grace)
+{
+ AM_FUNC ("GenSocket::releaseSocket", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ if (isValid())
+ {
+ if (grace)
+ {
+ // Optional "grace" closing of the socket will wait
+ // till all pending data is sent
+ shutdown (getSocket(), SD_BOTH);
+ }
+
+ AM_DEBUG (("Closing socket %u\n", getSocket()));
+
+ SysCloseSocket (getSocket());
+ // Put optional diagnostics here
+
+ resetSocket ();
+ }
+
+ AM_LEAVE();
+}
+
+
+void GenSocket::cleanup()
+{
+ releaseSocket (true);
+}
+
+
+void GenSocket::printInfo()
+{
+ if (isValid())
+ {
+ sbyte4 rcvBuffLen = 0,
+ sndBuffLen = 0;
+ int buffSize = 4;
+
+ printf ("Socket Info: socket %d.\n", getSocket());
+
+ if (bMoreInfo_)
+ {
+ getsockopt (getSocket(), SOL_SOCKET, SO_RCVBUF, (char *)&rcvBuffLen , &buffSize);
+ getsockopt (getSocket(), SOL_SOCKET, SO_SNDBUF, (char *)&sndBuffLen , &buffSize);
+
+ printf ("Socket receive buffer is %ld Byte, send buffer is %ld Byte\n",
+ rcvBuffLen, sndBuffLen );
+ }
+ }
+ else
+ {
+ printf ("Socket is not initialized\n");
+ }
+}
+
diff --git a/data/mnet/Common/socket/src/GenSocketSSL.cpp b/data/mnet/Common/socket/src/GenSocketSSL.cpp
new file mode 100644
index 0000000..d7da39d
--- /dev/null
+++ b/data/mnet/Common/socket/src/GenSocketSSL.cpp
@@ -0,0 +1,167 @@
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// File : GenSocketSSL.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 05/17/01
+// Description : platform independent implementation of the GenSocketSSL class.
+//
+// *******************************************************************
+
+#include "socket\GenSocketSSL.h"
+
+
+//////////////////////////////////////////////////////////////////////
+// Static data members
+//////////////////////////////////////////////////////////////////////
+
+bool GenSocketSSL::bInitLib_ = false ;
+SslError_t GenSocketSSL::errorCode_= SSL_NO_ERROR;
+int GenSocketSSL::count_ = 0 ;
+char GenSocketSSL::szPswd_ [SSL_MAX_PASSWORD_LENGTH+2];
+
+LPCSTR GenSocketSSL::cipherSuite_ [] =
+{
+ "eNULL:DES-CBC3-SHA:RC4-SHA",
+ "DES-CBC3-SHA" ,
+ "eNULL"
+};
+
+// Full pathname storege of the SSL files
+char GenSocketSSL::szKeyFile_ [MAX_PATH]; // private key
+char GenSocketSSL::szCertFile_[MAX_PATH]; // certificate
+char GenSocketSSL::szCaFile_ [MAX_PATH]; // trusted CA List
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////
+// Primary methods
+//////////////////////////////////////////////////////////////////////
+
+int GenSocketSSL::tcpReceive (sbyte *pBuf, int BufSize)
+{
+ return ((bEnableSsl_ ? readSsl (pBuf, BufSize)
+ : GenSocket::tcpReceive (pBuf, BufSize)));
+}
+
+
+int GenSocketSSL::tcpSend (sbyte *pBuf, int BufSize)
+{
+ return ((bEnableSsl_ ? writeSsl (pBuf, BufSize)
+ : GenSocket::tcpSend (pBuf, BufSize)));
+}
+
+
+void GenSocketSSL::releaseSocket (bool grace)
+{
+ AM_FUNC ("GenSocketSSL::releaseSocket", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ cleanSsl ();
+ // Context is not deleted upon release of the single socket
+ // High level application should take case
+
+ // for SSL socket: forcibly false so that shutdown is not called
+ // GenSocket::releaseSocket ((bEnableSsl_? false : grace));
+ GenSocket::releaseSocket (grace);
+
+ AM_LEAVE ();
+}
+
+
+void GenSocketSSL::printInfo ()
+{
+ GenSocket::printInfo ();
+
+ if (isSSL())
+ {
+ if (bEnableSsl_)
+ {
+ printf ("SSL is enabled on the socket, encryption is %s.\n",
+ (bEnableEncryption_ ? "enabled" : "disabled") );
+
+ if (bMoreInfo_)
+ {
+ printf ("SSL info: Context %p, BIO %p, connection %p\n",
+ getContext(), pSbio_, pSsl_);
+
+ if (pSsl_)
+ printSession ();
+ else
+ printf ("SSL Connection is not initialized.\n");
+ }
+ }
+ else
+ printf ("SSL is disabled on the socket.\n");
+ }
+}
+
+
+void GenSocketSSL::classPrintInfo ()
+{
+ printf ("SSL Socket class info:\n");
+ printf (" SSL is%s supported.\n", (isSSL()) ? "" : " not");
+
+ if (isSSL())
+ {
+ printf (" Total number of active SSL-enabled sockets = %u\n", count_);
+
+ if (errorCode_ != SSL_NO_ERROR)
+ printf ("Last SSL error recorded %d\n", errorCode_);
+
+#ifdef _AM_DEBUG_
+ if (bMoreInfo_)
+ printf (" Password \"%s\"\n",
+ (szPswd_ && strlen(szPswd_) <= SSL_MAX_PASSWORD_LENGTH)
+ ? szPswd_ : "INVALID");
+#endif // _AM_DEBUG_
+ }
+}
+
+
+// Set password only when it's NOT set and a new password is of valid length
+bool GenSocketSSL::setPassword (LPCSTR lpPswd)
+{
+ int length = (lpPswd) ? strlen (lpPswd) : 0;
+ bool retVal = false;
+
+ if (!isPswdSet() && length > 0 && length <= SSL_MAX_PASSWORD_LENGTH)
+ {
+ strcpy (szPswd_, lpPswd);
+ retVal = true;
+ }
+
+ return (retVal);
+}
+
+
+void GenSocketSSL::resetPassword ()
+{
+ memset (szPswd_, 0, sizeof(szPswd_)) ;
+}
+
+
+//////////////////////////////////////////////////////////////////////
+// Service methods
+//////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////
+// Shell Interface
+//////////////////////////////////////////////////////////////////////
+
+void SocDataPrint ()
+{
+ GenSocketSSL::classPrintInfo();
+}
+
diff --git a/data/mnet/Common/socket/src/Makefile b/data/mnet/Common/socket/src/Makefile
new file mode 100644
index 0000000..7dab74a
--- /dev/null
+++ b/data/mnet/Common/socket/src/Makefile
@@ -0,0 +1,61 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+# Name of this App's Directory
+THIS_APP_DIR = socket
+
+VOB2DIR = $(TOP_OF_VOB)\..\$(VOB)
+BINDIR = ..\bin
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\soc.out
+else
+ MY_OUTPUT = $(OBJDIR)\soc_com.out
+endif
+
+include $(VOB2DIR)\l3defs.mk
+
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) -r -o $@.tmp $(MODULE_OBJS)
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
diff --git a/data/mnet/Common/socket/src_ssl/GenSocketSSL_lib.cpp b/data/mnet/Common/socket/src_ssl/GenSocketSSL_lib.cpp
new file mode 100644
index 0000000..e29a333
--- /dev/null
+++ b/data/mnet/Common/socket/src_ssl/GenSocketSSL_lib.cpp
@@ -0,0 +1,968 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 2.0
+// Status : Under development
+// File : GenSocketSSL_lib.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 06/20/00
+// Description : Implementation GenSocketSSL class methods
+//
+//
+// *******************************************************************
+
+#include "socket\GenSocketSSL.h"
+#include "CallBackSSL.h"
+
+// maximum depth of the certificates chain to explore
+#define MAX_ALLOWED_CERTIFICATE_DEPTH 10
+
+// the length of the generated RSA key
+#define RSA_KEY_LENGTH 1024
+
+
+// Base names fot the SSL files
+#define SSL_KEY_FILE "key.pem"
+#define SSL_CERT_FILE "cert.pem"
+#define SSL_CA_FILE "ca.pem"
+
+
+//////////////////////////////////////////////////////////////////////
+// Static data
+//////////////////////////////////////////////////////////////////////
+
+#if defined(__VXWORKS__) && defined (__USE_SSL_LOCK__)
+ #include "Os\JCMutex.h"
+ static JCMutex socMutex;
+#endif
+
+
+///////////////////////////////////////////////////////////
+// Constructors\destractor
+///////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////
+// SSL library setup functions
+///////////////////////////////////////////////////////////
+void GenSocketSSL::initSslLib ()
+{
+ AM_FUNC ("GenSocketSSL::initSslLib", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ // Global system initialization one-per-application
+ if (isSupportSSL() && !bInitLib_)
+ {
+ char rand_seed [] = "this is to make him think that there is some randomness";
+ //int randStat;
+ LPSTR pRoot = NULL;
+ size_t length = 0 ;
+
+ SSL_library_init ();
+
+ RAND_seed ((unsigned char *)rand_seed, sizeof(rand_seed));
+
+ //randStat = RAND_status ();
+
+ // Construct full pathname for the SSL required files
+ pRoot = getenv ("MNET_BASE");
+
+ if (!pRoot || !*pRoot || (strlen (pRoot) > MAX_PATH - 10))
+ {
+ pRoot = DEF_ROOT_DIR;
+ AM_WARNING (("MNET root directory \"MNET_BASE\" is not specified or too long. Use default value.\n"));
+ }
+
+ if (pRoot)
+ length = strlen(pRoot);
+
+ sprintf (szKeyFile_ , "%s%c%s", pRoot, ((length) ? DIR_DELIMITER : '\0'), SSL_KEY_FILE );
+ sprintf (szCertFile_, "%s%c%s", pRoot, ((length) ? DIR_DELIMITER : '\0'), SSL_CERT_FILE);
+ sprintf (szCaFile_ , "%s%c%s", pRoot, ((length) ? DIR_DELIMITER : '\0'), SSL_CA_FILE );
+
+ bInitLib_ = true;
+ }
+
+ AM_LEAVE();
+}
+
+
+///////////////////////////////////////////////////////////
+// SSL context setup functions (one per server\client)
+///////////////////////////////////////////////////////////
+bool GenSocketSSL::initSslContext (SSL_CTX *& pCtx, bool bServer, LPSTR lpPswd)
+{
+ AM_FUNC ("GenSocketSSL::initSslContext", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ if (pCtx)
+ { // already initialized
+ AM_RETURN (true);
+ }
+
+ if (!isSupportSSL())
+ {
+ AM_RETURN (true);
+ }
+
+ bool retVal = true;
+ int IDContext = 1 ;
+ int iRetVal ;
+ SSL_METHOD *meth ;
+
+ initSslLib ();
+
+#if defined(__VXWORKS__) && defined (__USE_SSL_LOCK__)
+ socMutex.take();
+#endif
+
+ if (lpPswd)
+ setPassword (lpPswd);
+
+ // Check that the password is set and of correct value
+ if (!isPswdSet())
+ {
+ setError (SSL_BAD_PASSWORD);
+ AM_WARNING (("initSslContext: bad or missing SSL password\n"));
+ retVal = false;
+ }
+
+ if (retVal)
+ {
+ //meth = (bServer) ? SSLv3_server_method () : SSLv3_client_method ();
+ meth = SSLv3_method ();
+
+ pCtx = SSL_CTX_new (meth);
+ SSL_CTX_set_verify_depth (pCtx, MAX_ALLOWED_CERTIFICATE_DEPTH);
+
+ /* Load the keys and certificates */
+ if (!(SSL_CTX_use_certificate_file (pCtx, (LPSTR)szCertFile_, SSL_FILETYPE_PEM)))
+ {
+ setError (SSL_BAD_USER_CERT);
+ AM_ERROR (("Unable to read certificate file %s\n", szCertFile_));
+ retVal = false;
+ }
+ }
+
+ if (retVal)
+ {
+ SSL_CTX_set_default_passwd_cb (pCtx,
+#ifdef _RSA_SSL_LIB_
+ (FUNCPTR)
+#endif // _RSA_SSL_LIB_
+ password_cb);
+
+ /* load the private key from the file */
+ if (SSL_CTX_use_PrivateKey_file (pCtx, (LPSTR)szKeyFile_, SSL_FILETYPE_PEM))
+ {
+ /* check that the certificate and private key match */
+ if (!SSL_CTX_check_private_key (pCtx))
+ {
+ setError (SSL_BAD_KEY);
+ AM_ERROR (("Private key does not match the user certificate\n"));
+ retVal = false;
+ }
+ }
+ else
+ {
+ setError (SSL_BAD_KEY);
+ AM_ERROR (("Unable to read SSL key file %s\n", szKeyFile_));
+ retVal = false;
+ }
+ }
+
+ if (retVal)
+ {
+ /* Load the CAs we trust*/
+ if (!(SSL_CTX_load_verify_locations (pCtx, (LPSTR)szCaFile_, 0)))
+ {
+ setError (SSL_BAD_CA_ERROR);
+ AM_ERROR (("Unable to read CA list from %s file\n", szCaFile_));
+ retVal = false;
+ }
+ }
+
+ if (retVal)
+ {
+#ifdef _OPEN_SSL_LIB_
+ // very useful
+ SSL_CTX_set_mode (pCtx, SSL_MODE_AUTO_RETRY);
+#endif _OPEN_SSL_LIB_
+
+ if (!(iRetVal = SSL_CTX_set_cipher_list (pCtx,(LPSTR)cipherSuite_[ALLSUITES])) )
+ {
+ setError (SSL_GENERIC_ERROR);
+ AM_ERROR (("Cipher setting failed for the context\n"));
+ retVal = false;
+ }
+ }
+
+#ifdef __SSL_USE_TEMP_KEY__
+ if (retVal && bServer)
+ {
+ // generate context key
+ pRsa_ = RSA_generate_key (RSA_KEY_LENGTH, RSA_F4, NULL, NULL);
+
+ if (pRsa_)
+ {
+ if (!SSL_CTX_set_tmp_rsa (pCtx, pRsa_))
+ {
+ AM_TRACE (("Unable to set temporary key\n"));
+ retVal = false;
+ }
+ }
+ else
+ {
+ AM_TRACE (("Unable to generate temporary key\n"));
+ retVal = false;
+ }
+
+ if (!retVal)
+ {
+ setError (SSL_GEN_ERROR);
+ retVal = false;
+ }
+ }
+#endif // __SSL_USE_TEMP_KEY__
+
+ if (retVal)
+ {
+ SSL_CTX_set_session_id_context (pCtx, (const unsigned char*)&IDContext,
+ sizeof(IDContext) );
+ retVal = true;
+
+ AM_TRACE (("SSL context is initialized\n"));
+ }
+
+ if (!retVal)
+ cleanSslContext (pCtx);
+
+#if defined(__VXWORKS__) && defined (__USE_SSL_LOCK__)
+ socMutex.give();
+#endif
+
+ AM_RETURN (retVal);
+}
+
+
+void GenSocketSSL::cleanSslContext (SSL_CTX *& pCtx)
+{
+ AM_FUNC ("GenSocketSSL::cleanSslContext", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ if (isSupportSSL())
+ {
+ if (pCtx)
+ {
+#if defined(__VXWORKS__) && defined (__USE_SSL_LOCK__)
+ socMutex.take();
+#endif
+ SSL_CTX_free (pCtx);
+ pCtx = NULL;
+#if defined(__VXWORKS__) && defined (__USE_SSL_LOCK__)
+ socMutex.give();
+#endif
+ }
+
+#ifdef __SSL_USE_TEMP_KEY__
+ if (pRsa_)
+ RSA_free (pRsa_);
+#endif // __SSL_USE_TEMP_KEY__
+ }
+}
+
+
+///////////////////////////////////////////////////////////
+// SSL connection setup functions
+///////////////////////////////////////////////////////////
+
+bool GenSocketSSL::initSsl ()
+{
+ bool retVal = false;
+
+ AM_FUNC ("GenSocketSSL::initSsl", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ if (!isEnableSSL())
+ {
+ retVal = true;
+ }
+ else if (isValid() && isContext())
+ { // Start it for a valid socket under initialized context
+ if (!pSbio_)
+ { // create new socket wrapper
+ AM_DEBUG (("Creating BIO for a socket\n"));
+ pSbio_ = BIO_new_socket (getSocket(), BIO_NOCLOSE);
+ }
+
+ if (pSbio_ && !pSsl_)
+ {
+ AM_DEBUG (("Creating new SSL connection\n"));
+
+#if defined(__VXWORKS__) && defined (__USE_SSL_LOCK__)
+ socMutex.take();
+#endif
+ if ((pSsl_ = SSL_new(getContext())) != NULL)
+ {
+ AM_DEBUG (("Set SSL session\n"));
+
+ if (SSL_set_session (pSsl_, NULL))
+ {
+ SSL_set_bio (pSsl_, pSbio_, pSbio_);
+ ++count_;
+ }
+ else
+ {
+ AM_TRACE (("Unable to set SSL session\n"));
+ cleanSsl ();
+ }
+ }
+
+#if defined(__VXWORKS__) && defined (__USE_SSL_LOCK__)
+ socMutex.give();
+#endif
+
+ }
+
+ if (pSsl_ && pSbio_)
+ retVal = true;
+ else
+ {
+ cleanSsl ();
+ AM_WARNING (("Unable to create SSL session\n"));
+ }
+ }
+ else
+ AM_WARNING (("Unable to start SSL handshake.\n"));
+
+ AM_RETURN (retVal);
+}
+
+
+void GenSocketSSL::cleanSsl ()
+{
+ AM_FUNC ("GenSocketSSL::cleanSsl", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ if (isEnableSSL())
+ {
+ if (pSsl_)
+ {
+ SSL_shutdown (pSsl_);
+ SSL_clear (pSsl_);
+ SSL_free (pSsl_);
+ pSsl_ = NULL;
+ pSbio_ = NULL; // Released by the SSL_free() ???
+ --count_;
+ }
+
+ if (!pSbio_)
+ {
+ BIO_free (pSbio_);
+ pSbio_ = NULL;
+ }
+ }
+}
+
+
+
+///////////////////////////////////////////////////////////
+// SSL connect function
+///////////////////////////////////////////////////////////
+
+// SSL Client
+bool GenSocketSSL::connectSsl ()
+{
+ AM_FUNC ("GenSocketSSL::connectSsl", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ bool retVal = false;
+ int stat ;
+ CipherSuite_t suiteType = (bEnableEncryption_ ? DESCBC3SHA : NOSSL);
+
+ if (isEnableSSL())
+ {
+ if (initSsl ())
+ {
+#ifdef _RSA_SSL_LIB_
+ // RSA lib requires to set state explicitly
+ SSL_set_connect_state (pSsl_);
+#endif // _RSA_SSL_LIB_
+
+ if (!SSL_set_cipher_list(pSsl_,(LPSTR)cipherSuite_[suiteType]) )
+ {
+ AM_ERROR (("Set cipher list for socket connection failed\n"));
+ AM_RETURN (retVal);
+ }
+
+ /* Check peer certificate against the local list here.
+ The chain length is automatically checked by SSL when we
+ set the verify depth in the ctx.
+ Check is stoped when trusted certificate is found or
+ when reachingthe maximum specified chain depth. */
+ SSL_CTX_set_verify (getContext() ,
+ SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT,
+#ifdef _RSA_SSL_LIB_
+ (FUNCPTR)
+#endif // _RSA_SSL_LIB_
+ verify_callback );
+
+ //This is where the handshake really occurs
+ if ((stat = SSL_connect(pSsl_)) > 0)
+ { // normal case
+ // sometimes certificate verificxation error does not prevent TSL session establishment
+ if (verifyCert (SSL_get_verify_result(pSsl_)) == false)
+ {
+ AM_ERROR (("Server [%s] certificate verification has failed\n Cause: %s\n",
+ getIp(getRemoteHostAddress()),
+ getCertError(SSL_get_verify_result(pSsl_)) ));
+ setError (SSL_BAD_PEER_CERT);
+ }
+ else
+ {
+ // connection is extablished, peer's certificate is verified
+ AM_TRACE (("SSL Connection is established to [%s] using ciphering %s\n",
+ getIp(getRemoteHostAddress()) ,
+ SSL_CIPHER_get_name(SSL_get_current_cipher(pSsl_)) ));
+ retVal = true;
+ }
+ }
+ else if (stat == 0)
+ {
+ AM_ERROR (("Server on [%s] closed connection on the socket %d\n",
+ getIp(getRemoteHostAddress()), getSocket() ));
+ }
+ else
+ { // (stat < 0)
+ // connection error. Can't continue anyway
+ switch (SSL_get_error(pSsl_,stat))
+ {
+ case SSL_ERROR_NONE:
+ AM_TRACE (("SSL connection is established on socket %u\n", getSocket() ));
+ retVal = true;
+ break;
+
+ case SSL_ERROR_ZERO_RETURN:
+ // peer shutdown connection
+ AM_ERROR (("Server on [%s] closed connection on the socket %d\n",
+ getIp(getRemoteHostAddress()), getSocket() ));
+ break;
+
+ case SSL_ERROR_WANT_READ:
+ AM_ERROR (("connectSsl: Data needs to be read, problem due to renegotiation\n"));
+ break;
+
+ case SSL_ERROR_WANT_WRITE:
+ AM_ERROR (("connectSsl: Data needs to be written, problem due to renegotiation\n"));
+ break;
+
+ case SSL_ERROR_WANT_X509_LOOKUP:
+ AM_TRACE (("connectSsl: The operation did not complete because an \
+application callback set by SSL_CTX_set_client_cert_cb() \
+has askedto be called again. The TLS/SSL I/O function \
+should becalled again later\n"));
+ break;
+
+ case SSL_ERROR_SYSCALL:
+ AM_TRACE (("SSL system call error on SSL_connect\n"));
+ break;
+
+ case SSL_ERROR_SSL:
+ // General error
+ // check if the peer's certificate is OK
+ // print verification error
+ if (verifyCert(SSL_get_verify_result(pSsl_)) == false)
+ {
+ AM_ERROR (("Server [%s] certificate verification has failed\n Cause: %s\n",
+ getIp(getRemoteHostAddress()),
+ getCertError(SSL_get_verify_result(pSsl_)) ));
+ setError (SSL_BAD_PEER_CERT);
+ }
+ else
+ {
+ AM_TRACE (("General SSL error during on SSL connect\n"));
+ }
+ break;
+
+ default:
+ AM_TRACE (("Unspecified SSL connect error %d\n", stat));
+ break;
+ }
+ }
+ }
+ }
+ else
+ { // SSL is disabled or not supported
+ retVal = true;
+ }
+
+ AM_RETURN (retVal);
+}
+
+
+// SSL server
+bool GenSocketSSL::acceptSsl ()
+{
+ int stat;
+ bool retVal = false;
+
+ AM_FUNC ("GenSocketSSL::acceptSsl", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ if (!isEnableSSL())
+ {
+ retVal = true;
+ }
+ else if (initSsl ())
+ {
+#ifdef _RSA_SSL_LIB_
+ // SSL_set_accept_state (pSsl_);
+#endif // _RSA_SSL_LIB_
+
+ // accept state is the default one
+
+ /* Check peer certificate against the local list here.
+ The chain length is automatically checked by SSL when we
+ set the verify depth in the ctx.
+ Check is stoped when trusted certificate is found or
+ when reachingthe maximum specified chain depth. */
+ SSL_CTX_set_verify (getContext(), SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT,
+#ifdef _RSA_SSL_LIB_
+ (FUNCPTR)
+#endif // _RSA_SSL_LIB_
+ verify_callback);
+
+ //This is where the handshake really occurs
+ if ((stat = SSL_accept(pSsl_)) > 0)
+ {
+ if (verifyCert(SSL_get_verify_result(pSsl_)) == false)
+ {
+ AM_ERROR (("Client [%s] certificate verification has failed.\nCause: %s\n",
+ getIp (getRemoteHostAddress()),
+ getCertError (SSL_get_verify_result(pSsl_)) ));
+ setError (SSL_BAD_PEER_CERT);
+ }
+ else
+ {
+ // connection is extablished, peer's certificate is OK
+ AM_TRACE (("SSL Connection is accepted from [%s] using ciphering %s\n",
+ getIp(getRemoteHostAddress()) ,
+ SSL_CIPHER_get_name(SSL_get_current_cipher(pSsl_)) ));
+ retVal = true;
+ }
+ }
+ else if (stat == 0)
+ {
+ AM_ERROR (("Client on [%s] closed connection on the socket %d\n",
+ getIp(getRemoteHostAddress()), getSocket() ));
+ }
+ else if (stat < 0)
+ {
+ switch (SSL_get_error (pSsl_, stat) )
+ {
+ case SSL_ERROR_NONE:
+ AM_TRACE (("SSL connection is accepted on socket %u\n", getSocket() ));
+ retVal = true;
+ break;
+
+ case SSL_ERROR_ZERO_RETURN:
+ AM_ERROR (("Client on [%s] closed connection on the socket %d\n",
+ getIp(getRemoteHostAddress()), getSocket() ));
+ break;
+ break;
+
+ case SSL_ERROR_WANT_READ:
+ AM_ERROR (("acceptSsl: Data needs to be read, problem due to renegotiation\n"));
+ break;
+
+ case SSL_ERROR_WANT_WRITE:
+ AM_ERROR (("acceptSsl: Data needs to be written, problem due to renegotiation\n"));
+ break;
+
+ case SSL_ERROR_WANT_X509_LOOKUP:
+ AM_ERROR (("acceptSsl: The operation did not complete because an \
+application callback set by SSL_CTX_set_client_cert_cb() \
+has asked to be called again. The TLS/SSL I/O function \
+should be called again later\n"));
+ break;
+
+ case SSL_ERROR_SYSCALL:
+ AM_ERROR (("SSL system call error in SSL_accept\n"));
+ break;
+
+ case SSL_ERROR_SSL:
+ // General error
+ // check if the peer's certificate is OK
+ // print verification error
+ if (verifyCert(SSL_get_verify_result(pSsl_)) == false)
+ {
+ AM_ERROR (("Client [%s] certificate verification has failed.\nCause: %s\n",
+ getIp (getRemoteHostAddress()) ,
+ getCertError (SSL_get_verify_result(pSsl_)) ));
+ setError (SSL_BAD_PEER_CERT );
+ }
+ else
+ AM_ERROR (("General SSL error on SSL accept connection\n"));
+ break;
+
+ default:
+ AM_ERROR (("Unspecified SSL accept error %d\n", stat));
+ }
+ }
+ }
+
+ AM_RETURN (retVal);
+}
+
+
+///////////////////////////////////////////////////////////
+// SSL read\write functions
+///////////////////////////////////////////////////////////
+
+int GenSocketSSL::readSsl (sbyte *pBuf, int BufSize)
+{
+ AM_FUNC ("GenSocketSSL::readSsl", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ int msgLen = SOC_STATUS_ERROR;
+ int errCode;
+
+ if (isInitSSL ())
+ {
+ msgLen = SSL_read (pSsl_, pBuf, BufSize);
+
+ if (msgLen <= 0 && (errCode = SSL_get_error(pSsl_,msgLen)) != SSL_ERROR_NONE )
+ {
+ msgLen = SOC_STATUS_ERROR;
+
+ switch (errCode)
+ {
+ case SSL_ERROR_NONE:
+ AM_DEBUG (("readSsl: message received - total length (%d)\n", msgLen));
+ msgLen = SOC_STATUS_OK;
+ break;
+
+ case SSL_ERROR_ZERO_RETURN:
+ AM_TRACE (("readSsl: Client closed connection on socket (%d)\n",
+ getSocket() ));
+ break;
+
+ case SSL_ERROR_SYSCALL:
+ AM_ERROR (("readSsl: Problem in SSL_read,system call error\n"));
+ break;
+
+ case SSL_ERROR_SSL:
+ AM_ERROR (("readSsl: general SSL library error\n"));
+ break;
+
+ case SSL_ERROR_WANT_X509_LOOKUP:
+ AM_ERROR(("readSsl: The operation did not complete because an \
+application callback set by SSL_CTX_set_client_cert_cb() \
+has asked to be called again. The TLS/SSL I/O function \
+should be called again later\n"));
+ break;
+
+ case SSL_ERROR_WANT_READ:
+ AM_ERROR(("readSsl: Data needs to be read, problem due to renegotiation\n"));
+ break;
+
+ default:
+ AM_ERROR (("readSsl: recv error %d on socket (%d)\n",
+ errCode, getSocket() ));
+ }
+ }
+ else
+ {
+ AM_DEBUG (("readSsl: received message [length=%d] on the socket %u\n",
+ msgLen, getSocket() ));
+ AM_HEXDUMP ((ubyte *)pBuf, msgLen);
+ }
+ }
+ else
+ AM_ERROR (("Attempt to read read from uninitialised SSL socket %u\n",
+ getSocket() ));
+
+ AM_RETURN (msgLen);
+}
+
+
+int GenSocketSSL::writeSsl (sbyte *pBuf, int BufSize)
+{
+ AM_FUNC ("GenSocketSSL::writeSsl", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ int msgLen = SOCKET_STATUS_FATAL_SOC_ERR;
+ int errCode;
+
+ if (isInitSSL ())
+ {
+ msgLen = SSL_write (pSsl_, pBuf, BufSize);
+
+ if (msgLen <= 0 && (errCode = SSL_get_error(pSsl_,msgLen)) != SSL_ERROR_NONE)
+ {
+ msgLen = SOCKET_STATUS_FATAL_SOC_ERR;
+
+ switch (errCode)
+ {
+ case SSL_ERROR_NONE:
+ AM_DEBUG (("writeSsl: Sent %d bytes to socket %d\n", msgLen, getSocket() ));
+ msgLen = SOCKET_STATUS_OK;
+ break;
+
+ case SSL_ERROR_ZERO_RETURN:
+ AM_ERROR (("writeSsl: Peer closed connection on socket (%d)\n",
+ getSocket()));
+ break;
+
+ case SSL_ERROR_SYSCALL:
+ AM_ERROR (("writeSsl: System call error\n"));
+ ERR_print_errors_fp (stdout);
+ break;
+
+ case SSL_ERROR_SSL:
+ AM_ERROR (("writeSsl: general SSL library error\n"));
+ break;
+
+ case SSL_ERROR_WANT_X509_LOOKUP:
+ AM_ERROR (("writeSsl: The operation did not complete because an \
+application callback set by SSL_CTX_set_client_cert_cb() \
+has asked to be called again. The TLS/SSL I/O function \
+should be called again later\n"));
+ break;
+
+ case SSL_ERROR_WANT_WRITE:
+ AM_ERROR(("writeSsl: Data needs to be written, problem due to renegotiation\n"));
+ break;
+
+ default:
+ AM_TRACE (("writeSsl: error %d on socket (%d)\n",
+ errCode, getSocket() ));
+ break;
+ }
+ }
+ else
+ {
+ AM_DEBUG (("writeSsl: Sent %d bytes to socket %u\n", msgLen, getSocket() ));
+ msgLen = SOCKET_STATUS_OK;
+ }
+ }
+ else
+ AM_ERROR (("Attempt to read read from uninitialised SSL socket %u\n",
+ getSocket() ));
+
+ if (msgLen == SOCKET_STATUS_FATAL_SOC_ERR)
+ releaseSocket(true);
+
+ AM_RETURN (msgLen);
+}
+
+
+// Define here certificate verification policy
+bool GenSocketSSL::verifyCert (long code)
+{
+ bool retVal = false;
+
+ switch (code)
+ {
+ // no error
+ case X509_V_OK :
+ // minor verification errors
+ case X509_V_ERR_CERT_NOT_YET_VALID :
+ case X509_V_ERR_CERT_HAS_EXPIRED :
+ case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD:
+ case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD :
+ case X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD:
+ case X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD:
+ retVal = true;
+ break;
+
+#ifdef _OPEN_SSL_LIB_
+
+ // minor verification errors
+ case X509_V_ERR_INVALID_PURPOSE :
+ case X509_V_ERR_SUBJECT_ISSUER_MISMATCH :
+ case X509_V_ERR_AKID_SKID_MISMATCH :
+ case X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH:
+ case X509_V_ERR_KEYUSAGE_NO_CERTSIGN :
+ retVal = true;
+ break;
+
+ // The following errors considered as critical and will cause a link termination
+ case X509_V_ERR_PATH_LENGTH_EXCEEDED :
+ case X509_V_ERR_INVALID_CA :
+ case X509_V_ERR_CERT_UNTRUSTED :
+ break;
+
+#endif // _OPEN_SSL_LIB_
+
+ case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT :
+ case X509_V_ERR_CERT_REVOKED :
+ case X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE :
+ case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT :
+ case X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN :
+ case X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE :
+ case X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY:
+ case X509_V_ERR_CERT_SIGNATURE_FAILURE :
+ case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY :
+ default :
+ break;
+ }
+
+ return (retVal);
+}
+
+// Define here certificate verification policy
+LPSTR GenSocketSSL::getCertError (long code)
+{
+
+ static LPSTR verificationErrorList [] =
+ {
+ "Certificate is OK" , // no error
+ "Minor certificate verification error" , // OPENSSL specific errors
+ "Unspecified verification error" ,
+
+ "Certificate is not valid yet" ,
+ "Certificate has expired" ,
+ "Certificate \"Not before\" field is not valid",
+ "Certificate \"Not After\" field is not valid" ,
+ "Certificate Last CRL update field is wrong" ,
+ "Certificate CRL next update field is wrong" ,
+ "Certificate the basic Constraints pathlength parameter has been exceeded",
+ "Certificate purpose invalid" ,
+ "The certificate is untrusted" ,
+ "Invalid CA detected" ,
+ "Certificate is self signed and cannot be found in the list of trusted certificates",
+ "The certificate has been revoked" ,
+ "No signatures could be verified because the chain contains only one certificate\n\
+and it is not self signed" ,
+ "Certificate: Unable to get issuer certificate",
+ "The certificate chain could be built up using the untrusted\n \
+certificates but the root could not be found locally",
+ "Unable to decrypt certificate\'s signature ",
+ "Unable to decode issuer public key ",
+ "Invalid signature found ",
+ "Unable to get issuer certificate locally ",
+ };
+
+ LPSTR retVal = NULL;
+
+ switch (code)
+ {
+ case X509_V_OK:
+ // no error
+ retVal = verificationErrorList[CertNoError];
+ break;
+
+ case X509_V_ERR_CERT_NOT_YET_VALID:
+ retVal = verificationErrorList[CertNotYetValid];
+ break;
+
+ case X509_V_ERR_CERT_HAS_EXPIRED:
+ retVal = verificationErrorList[CertExpired];
+ break;
+
+ case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD:
+ retVal = verificationErrorList[CertNotBeforeError];
+ break;
+
+ case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD:
+ retVal = verificationErrorList[CertNotAfterError];
+ break;
+
+ case X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD:
+ retVal = verificationErrorList[CertCrlLastUpdateError];
+ break;
+
+ case X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD:
+ retVal = verificationErrorList[CertCrlNextUpdateError];
+ break;
+
+#ifdef _OPEN_SSL_LIB_
+
+ case X509_V_ERR_PATH_LENGTH_EXCEEDED:
+ retVal = verificationErrorList[CertPathLengthExceed];
+ break;
+
+ case X509_V_ERR_INVALID_PURPOSE:
+ retVal = verificationErrorList[CertInvalidPurpose];
+ break;
+
+ case X509_V_ERR_CERT_UNTRUSTED:
+ retVal = verificationErrorList[CertUntrusted];
+ break;
+
+ case X509_V_ERR_SUBJECT_ISSUER_MISMATCH :
+ case X509_V_ERR_AKID_SKID_MISMATCH :
+ case X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH:
+ case X509_V_ERR_KEYUSAGE_NO_CERTSIGN :
+ // minor verification errors
+ retVal = verificationErrorList[CertMiscError];
+ break;
+
+// The following errors considered as critical and will cause a link termination
+
+ case X509_V_ERR_INVALID_CA:
+ retVal = verificationErrorList[CertInvalidCA];
+ break;
+
+#endif // _OPEN_SSL_LIB_
+
+ case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT:
+ retVal = verificationErrorList[CertZeroSelfSigned];
+ break;
+
+ case X509_V_ERR_CERT_REVOKED:
+ retVal = verificationErrorList[CertRevoked];
+ break;
+
+ case X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE:
+ retVal = verificationErrorList[CertOneNotSelfSigned];
+ break;
+
+ case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT:
+ retVal = verificationErrorList[CertNoIssuer];
+ break;
+
+ case X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN:
+ retVal = verificationErrorList[CertUntrustedNoRoot];
+ break;
+
+ case X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE:
+ retVal = verificationErrorList[CertUnableDecryptSignature];
+ break;
+
+ case X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY:
+ retVal = verificationErrorList[CertUnableDecodeIssuerKey];
+ break;
+
+ case X509_V_ERR_CERT_SIGNATURE_FAILURE:
+ retVal = verificationErrorList[CertInvalidSignature];
+ break;
+
+ case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY:
+ retVal = verificationErrorList[CertNoIssuerCert];
+ break;
+
+ default:
+ retVal = verificationErrorList[CertUnspecifiedError];
+ break;
+ }
+
+ return (retVal);
+}
+
+
+void GenSocketSSL::printSession ()
+{
+ SSL_SESSION *pSession = SSL_get_session(pSsl_);
+
+ if (pSession)
+ SSL_SESSION_print_fp (stderr, pSession);
+}
+
diff --git a/data/mnet/Common/socket/src_ssl/Makefile b/data/mnet/Common/socket/src_ssl/Makefile
new file mode 100644
index 0000000..f1122b9
--- /dev/null
+++ b/data/mnet/Common/socket/src_ssl/Makefile
@@ -0,0 +1,61 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+# Name of this App's Directory
+THIS_APP_DIR = socket
+
+VOB2DIR = $(TOP_OF_VOB)\..\$(VOB)
+BINDIR = ..\bin
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\soc_ssl_lib.out
+else
+ MY_OUTPUT = $(OBJDIR)\soc_ssl_cmn.out
+endif
+
+include $(VOB2DIR)\l3defs.mk
+
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) -r -o $@.tmp $(MODULE_OBJS)
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
diff --git a/data/mnet/Common/socket/src_ssl/ssl_intf.cpp b/data/mnet/Common/socket/src_ssl/ssl_intf.cpp
new file mode 100644
index 0000000..f969a8e
--- /dev/null
+++ b/data/mnet/Common/socket/src_ssl/ssl_intf.cpp
@@ -0,0 +1,235 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 2.0
+// Status : Under development
+// File : ssl_intf.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 06/20/00
+// Description : Implementation of the service functions required by
+// SSL library
+//
+// *******************************************************************
+
+#include "socket\GenSocketSSL.h"
+#include "CallBackSSL.h"
+
+
+// Global variables
+// random key data
+#define PASSWORD_KEY {0xA5,0x30,0x1F,0x3C,0x8D,0x1B,0x39,0xE5}
+
+////////////////////////////////////////////////////////////////
+// Open SSL support functions
+////////////////////////////////////////////////////////////////
+
+#ifdef _OPEN_SSL_LIB_
+// OpenSSL library does not have it
+int isSSL ()
+{
+ return (1);
+}
+#endif // _OPEN_SSL_LIB_
+
+
+// callback functions used by SSL library
+// note OpenSSL allows passing a void user data pointer,and can do a per session check
+// may need to modify RSA source to do that
+// We will use one password for all the sockets on the host
+int password_cb (char *buf, int bufSize, int rwflag
+#ifdef _OPEN_SSL_LIB_
+ , void *pData
+#endif // _OPEN_SSL_LIB_
+ )
+{
+ AM_FUNC ("password_cb", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ int length = 0;
+ LPCSTR pPasswd = GenSocketSSL::getPassword();
+
+ if (pPasswd && (length = strlen(pPasswd)) <= bufSize)
+ strcpy (buf, pPasswd);
+
+ AM_RETURN (length);
+}
+
+
+int verify_callback (int ok, X509_STORE_CTX *pStoreCtx)
+{
+ AM_FUNC ("verify_callback", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ char *s, buf[256] = "";
+
+ // read subject line from the certificate
+ s = X509_NAME_oneline (X509_get_subject_name(pStoreCtx->current_cert), buf, 256);
+
+ if (s == NULL)
+ {
+ if (ok)
+ {
+ AM_TRACE (("Certificate depth=%d %s\n",pStoreCtx->error_depth, buf));
+ }
+ else
+ {
+ AM_WARNING (("Certificate depth=%d error=%d %s\n",
+ pStoreCtx->error_depth, pStoreCtx->error,buf));
+ }
+ }
+
+ if (!ok)
+ { // Certificate got a problem, parse it and decide whether to continue
+ ok = GenSocketSSL::verifyCert (pStoreCtx->error);
+ }
+
+ AM_RETURN (ok);
+}
+
+
+// Encrypt and save password to the specified file
+bool encryptPassword (const char *pwd, const char *filename)
+{
+ int stat ;
+ unsigned idx ;
+ const unsigned blockNum = SSL_MAX_PASSWORD_LENGTH/LENGTH_OF_CBLOCK;
+ des_cblock out [blockNum];
+ des_key_schedule ks ;
+ FILE *fd = NULL;
+ bool retVal = false;
+
+ AM_FUNC ("SocLib: encryptPassword", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ if (isSSL ())
+ {
+ const unsigned char key_data [] = PASSWORD_KEY;
+
+ // Always encode SSL_MAX_PASSWORD_LENGTH bytes
+ if (strlen (pwd) > SSL_MAX_PASSWORD_LENGTH)
+ {
+ AM_WARNING (("SocLib: Provided password is longer than allowed.\n Use first %u characters\n",
+ SSL_MAX_PASSWORD_LENGTH ));
+ }
+
+ if (fd = fopen (filename, "wb"))
+ {
+ memset (out, 0, sizeof(out));
+
+ for (idx = 0; idx < blockNum; idx++)
+ {
+ if ((stat = des_key_sched ((C_Block *)(key_data),ks)) != 0)
+ {
+ AM_TRACE (("SocLib: Key error %d\n", stat));
+ AM_RETURN (retVal);
+ }
+
+ des_ecb_encrypt ((C_Block *)(pwd+idx*LENGTH_OF_CBLOCK), // source
+ (C_Block *)out[idx] , // dest
+ ks, DES_ENCRYPT );
+ }
+
+ unsigned temp = 0;
+
+ if ((temp = fwrite (out, SSL_MAX_PASSWORD_LENGTH, 1, fd)) == 1)
+ {
+ retVal = true;
+ }
+ else
+ {
+ AM_TRACE (("SocLib: Unable to save password file %s\n", filename));
+ }
+
+ fclose (fd);
+ }
+ else
+ {
+ AM_TRACE (("SocLib: Unable to open password file %s\n", filename));
+ }
+ }
+
+ AM_RETURN (retVal);
+}
+
+
+bool decryptPassword (char *pwdout, const char *filename)
+{
+ int stat ,
+ idx ;
+ const unsigned blockNum= SSL_MAX_PASSWORD_LENGTH/LENGTH_OF_CBLOCK;
+ des_cblock in [blockNum];
+ des_key_schedule ks ;
+ FILE *fd = NULL ;
+ bool retVal = false;
+ char passwd [SSL_MAX_PASSWORD_LENGTH+2];
+
+ AM_FUNC ("decryptPassword", SOC_LAYER_ID);
+ AM_ENTER ();
+
+ if (isSSL ())
+ {
+ const unsigned char key_data [] = PASSWORD_KEY;
+
+ if (fd = fopen (filename, "rb"))
+ {
+ memset (passwd, 0, (SSL_MAX_PASSWORD_LENGTH+2));
+
+ // Always encode SSL_MAX_PASSWORD_LENGTH bytes
+ if (fread (in, SSL_MAX_PASSWORD_LENGTH, 1, fd) == 1)
+ {
+ for (idx = 0; idx < blockNum; idx++)
+ { // decrypt it
+ if ((stat = des_key_sched((C_Block *)(key_data), ks)) != 0)
+ {
+ AM_TRACE (("SocLib: Key error %d\n", stat));
+ AM_RETURN (retVal);
+ }
+
+ des_ecb_encrypt ((des_cblock *)in[idx], // source
+ (des_cblock *)(passwd + idx * LENGTH_OF_CBLOCK), // dest
+ ks, DES_DECRYPT );
+ }
+
+ // verify decrypted password
+ if ((stat = strlen (passwd)) != 0 && stat <= SSL_MAX_PASSWORD_LENGTH)
+ {
+ for (idx = 0; idx < stat; idx++)
+ {
+ if (!isprint(passwd[idx]))
+ break;
+ }
+
+ if (idx == stat)
+ { // Password is OK
+ strcpy (pwdout, passwd);
+ retVal = true;
+ }
+ }
+
+ fclose (fd);
+
+ if (!retVal)
+ {
+ AM_TRACE (("Password verification failed\n"));
+ }
+ }
+ else
+ {
+ AM_TRACE (("Invalid password file\n"));
+ }
+ }
+ else
+ {
+ AM_TRACE (("Unable to open password file %s.\n", filename));
+ }
+ }
+
+ AM_RETURN (retVal);
+}
+
diff --git a/data/mnet/Common/socket/src_stub/GenSocketSSL_stub.cpp b/data/mnet/Common/socket/src_stub/GenSocketSSL_stub.cpp
new file mode 100644
index 0000000..4c1c819
--- /dev/null
+++ b/data/mnet/Common/socket/src_stub/GenSocketSSL_stub.cpp
@@ -0,0 +1,95 @@
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// File : GenSocketSSL.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 05/17/01
+// Description : stub implementation of the GenSocketSSL class methods
+//
+// *******************************************************************
+
+#include "socket\GenSocketSSL.h"
+
+//////////////////////////////////////////////////////////////////////
+// function stubs
+//////////////////////////////////////////////////////////////////////
+
+
+bool GenSocketSSL::initSslContext (SSL_CTX *& pCtx, bool bServer, LPSTR lpPswd)
+{
+ return (false);
+}
+
+
+void GenSocketSSL::cleanSslContext (SSL_CTX *& pCtx)
+{
+ return ;
+}
+
+
+bool GenSocketSSL::initSsl ()
+{
+ return (false);
+}
+
+void GenSocketSSL::cleanSsl ()
+{
+ pSsl_ = NULL;
+ pSbio_ = NULL;
+}
+
+
+bool GenSocketSSL::acceptSsl ()
+{
+ return (false);
+}
+
+
+bool GenSocketSSL::connectSsl ()
+{
+ return (false);
+}
+
+
+void GenSocketSSL::initSslLib ()
+{
+ return ;
+}
+
+
+int GenSocketSSL::readSsl (sbyte *pBuf, int BufSize)
+{
+ return (SOC_STATUS_ERROR);
+}
+
+
+int GenSocketSSL::writeSsl (sbyte *pBuf, int BufSize)
+{
+ return (SOC_STATUS_ERROR);
+}
+
+
+void GenSocketSSL::printSession ()
+{
+ ;
+}
+
+
+bool encryptPassword (const char *pwd, const char *filename)
+{
+ return (false);
+}
+
+
+bool decryptPassword (char *pwdout, const char *filename)
+{
+ return (false);
+}
+
diff --git a/data/mnet/Common/socket/src_stub/Makefile b/data/mnet/Common/socket/src_stub/Makefile
new file mode 100644
index 0000000..038097c
--- /dev/null
+++ b/data/mnet/Common/socket/src_stub/Makefile
@@ -0,0 +1,61 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+# Name of this App's Directory
+THIS_APP_DIR = socket
+
+VOB2DIR = $(TOP_OF_VOB)\..\$(VOB)
+BINDIR = ..\bin
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\soc_ssl.out
+else
+ MY_OUTPUT = $(OBJDIR)\soc_ssl_cmn.out
+endif
+
+include $(VOB2DIR)\l3defs.mk
+
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) -r -o $@.tmp $(MODULE_OBJS)
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
diff --git a/data/mnet/Common/socket/src_stub/ssl_intf.cpp b/data/mnet/Common/socket/src_stub/ssl_intf.cpp
new file mode 100644
index 0000000..260cdae
--- /dev/null
+++ b/data/mnet/Common/socket/src_stub/ssl_intf.cpp
@@ -0,0 +1,23 @@
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// File : ssl_intf.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 05/17/01
+// Description : SSL library interface module stub
+//
+// *******************************************************************
+
+#include "socket\SslIntf.h"
+
+int isSSL ()
+{
+ return (0);
+}
diff --git a/data/mnet/Common/subsc/Makefile b/data/mnet/Common/subsc/Makefile
new file mode 100644
index 0000000..bd4611d
--- /dev/null
+++ b/data/mnet/Common/subsc/Makefile
@@ -0,0 +1,47 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+# (OPTIONAL) Append REPLACE - Replaces the List of directories
+# to be used in the SUBDIRS variable
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src REPLACE=src
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+SUBDIRS = src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+VOBDIR = $(TOP_OF_VOB)\$(VOB)
+
+# Allows a sub-set of the source code directories to be used
+
+ifneq ($(REPLACE),)
+ SUBDIRS = $(REPLACE)
+endif
+
+include $(VOBDIR)\l3defs.mk
+
+
diff --git a/data/mnet/Common/subsc/src/Makefile b/data/mnet/Common/subsc/src/Makefile
new file mode 100644
index 0000000..b255dce
--- /dev/null
+++ b/data/mnet/Common/subsc/src/Makefile
@@ -0,0 +1,61 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+# Name of this App's Directory
+THIS_APP_DIR = subsc
+
+VOB2DIR = $(TOP_OF_VOB)\..\$(VOB)
+BINDIR = ..\bin
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\$(THIS_APP_DIR).out
+else
+ MY_OUTPUT = $(OBJDIR)\$(THIS_APP_DIR).out
+endif
+
+include $(VOB2DIR)\l3defs.mk
+
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) -r -o $@.tmp $(MODULE_OBJS)
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
diff --git a/data/mnet/Common/subsc/src/SubscInfo.cpp b/data/mnet/Common/subsc/src/SubscInfo.cpp
new file mode 100644
index 0000000..2cc625c
--- /dev/null
+++ b/data/mnet/Common/subsc/src/SubscInfo.cpp
@@ -0,0 +1,200 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SubscInfo.cpp
+// Author(s) : Kevin Lim
+// Create Date : 06-16-99
+// Description : subscriber information structure and en/decoding function
+// for messages
+//
+// *******************************************************************
+#include "stdio.h"
+#include "string.h"
+#include "subsc/SubscInfoType.h"
+#include "subsc/SubscGPRSInfoType.h"
+
+char * getSubscInfoIETypeStr(T_SUBSC_INFO_IE_TYPE ie_type)
+{
+ switch(ie_type){
+ case SUBSC_INFO_IE_VERSION_NUMBER : return("VERSION_NUM ");
+ case SUBSC_INFO_IE_MOBILE_ID_IMSI : return("MOBILE_IMSI ");
+ case SUBSC_INFO_IE_ISDN : return("ISDN ");
+ case SUBSC_INFO_IE_SUBADDR : return("SUBADDR ");
+ case SUBSC_INFO_IE_PROVISION_BS : return("PROVISION_BS");
+ case SUBSC_INFO_IE_PROVISION_TS : return("PROVISION_TS");
+ case SUBSC_INFO_IE_PROVISION_SS : return("PROVISION_SS");
+ case SUBSC_INFO_IE_SUBSC_STATUS : return("SUBSC_STATUS");
+ case SUBSC_INFO_IE_ODB_DATA : return("ODB_DATA ");
+ case SUBSC_INFO_IE_SS_INFO_LIST : return("SS_INFO_LIST");
+ case SUBSC_INFO_IE_USER_INFO : return("USER_INFO ");
+ case SUBSC_INFO_IE_GPRS_DATA : return("GPRS_DATAT ");
+ default: return("Unknown IE Type");
+ }
+}
+
+char * getSubscInfoBSCodeStr(T_SUBSC_INFO_BEARER_SERVICE_CODE code)
+{
+ switch(code){
+ case ALL_BEARER_SERVICES : return("ALL_BEARER");
+
+ case ALL_DATA_CDA : return("ALL_DATA_CDA");
+ case DATA_CDA_300BPS : return("DATA_CDA_300");
+ case DATA_CDA_1200BPS : return("DATA_CDA_1200");
+ case DATA_CDA_1200_75BPS : return("DATA_CDA_1200_75");
+ case DATA_CDA_2400BPS : return("DATA_CDA_2400");
+ case DATA_CDA_4800BPS : return("DATA_CDA_4800");
+ case DATA_CDA_9600BPS : return("DATA_CDA_9600"); // supported by ViperCell
+ case DATA_CDA_14400BPS : return("DATA_CDA_14400"); // supported by ViperCell
+ case DATA_CDA_GENERAL : return("DATA_CDA_GENERAL");
+
+ case ALL_DATA_CDS : return("ALL_DATA_CDS");
+ case DATA_CDS_1200BPS : return("DATA_CDS_1200");
+ case DATA_CDS_2400BPS : return("DATA_CDS_2400");
+ case DATA_CDS_4800BPS : return("DATA_CDS_4800");
+ case DATA_CDS_9600BPS : return("DATA_CDS_9600");
+ case DATA_CDS_GENERAL : return("DATA_CDS_GENERAL");
+
+ case ALL_PAD_ACCESS_CA : return("ALL_PAD_ACCESS_CA");
+ case PAD_ACCESS_CA_300BPS : return("PAD_ACC_CA_300");
+ case PAD_ACCESS_CA_1200BPS : return("PAD_ACC_CA_1200");
+ case PAD_ACCESS_CA_1200_75BPS : return("PAD_ACC_CA_1200_75");
+ case PAD_ACCESS_CA_2400BPS : return("PAD_ACC_CA_2400");
+ case PAD_ACCESS_CA_4800BPS : return("PAD_ACC_CA_4800");
+ case PAD_ACCESS_CA_9600BPS : return("PAD_ACC_CA_9600");
+ case PAD_ACCESS_CA_GENERAL : return("PAD_ACC_CA_GENERAL");
+
+ case ALL_DATA_PDS : return("ALL_DATA_PDS");
+ case DATA_PDS_2400BPS : return("DATA_PDS_2400");
+ case DATA_PDS_4800BPS : return("DATA_PDS_4800");
+ case DATA_PDS_9600BPS : return("DATA_PDS_9600");
+ case DATA_PDS_GENERAL : return("DATA_PDS_GENERAL");
+
+ case ALL_ALT_SPEECH_DATA_CDA : return("ALL_ALT_SPCH_CDA");
+ case ALL_ALT_SPEECH_DATA_CDS : return("ALL_ALT_SPCH_CDS");
+ case ALL_SPEECH_FOLL_DATA_CDA : return("ALL_SPCH_FOLL_CDA");
+ case ALL_SPEECH_FOLL_DATA_CDS : return("ALL_SPCH_FOLL_CDS");
+
+ case ALL_PLMN_SPECIFIC_BS : return("ALL_PLMN_SPEC_BS");
+ case PLMN_SPECIFIC_BS_1 : return("PLMN_SPEC_BS_1");
+ case PLMN_SPECIFIC_BS_2 : return("PLMN_SPEC_BS_2");
+ case PLMN_SPECIFIC_BS_3 : return("PLMN_SPEC_BS_3");
+ case PLMN_SPECIFIC_BS_4 : return("PLMN_SPEC_BS_4");
+ case PLMN_SPECIFIC_BS_5 : return("PLMN_SPEC_BS_5");
+ case PLMN_SPECIFIC_BS_6 : return("PLMN_SPEC_BS_6");
+ case PLMN_SPECIFIC_BS_7 : return("PLMN_SPEC_BS_7");
+ case PLMN_SPECIFIC_BS_8 : return("PLMN_SPEC_BS_8");
+ case PLMN_SPECIFIC_BS_9 : return("PLMN_SPEC_BS_9");
+ case PLMN_SPECIFIC_BS_A : return("PLMN_SPEC_BS_A");
+ case PLMN_SPECIFIC_BS_B : return("PLMN_SPEC_BS_B");
+ case PLMN_SPECIFIC_BS_C : return("PLMN_SPEC_BS_C");
+ case PLMN_SPECIFIC_BS_D : return("PLMN_SPEC_BS_D");
+ case PLMN_SPECIFIC_BS_E : return("PLMN_SPEC_BS_E");
+ case PLMN_SPECIFIC_BS_F : return("PLMN_SPEC_BS_F");
+ default: return("Unknown BS Code");
+ }
+}
+
+char * getSubscInfoTSCodeStr(T_SUBSC_INFO_TELE_SERVICE_CODE code)
+{
+ switch(code){
+ case ALL_TELE_SERVICES : return("ALL_TELE");
+
+ case ALL_SPEECH_SERVICES : return("ALL_SPCH_SRVC");
+ case TELEPHONY_SERVICES : return("TELE_SRVC");
+ case EMERGENCY_CALLS : return("EMERGENCY");
+
+ case ALL_SMS : return("ALL_SMS");
+ case SMS_MT_PP : return("SMS_MT_PP");
+ case SMS_MO_PP : return("SMS_MO_PP");
+
+ case ALL_FACS : return("ALL_FACS");
+ case FACS_GRP3_ALT_SPEECH : return("FACS_GRP3_ALT_SPCH");
+ case AUTO_FACS_GRP3 : return("AUTO_FACS_GRP3");
+ case FACS_GRP4 : return("FACS_GRP4");
+
+ case ALL_VOICE_GROUP_CALL : return("ALL_VOICE_GROUP");
+ case VOICE_GROUP_CALL : return("VOICE_GROUP_CALL");
+ case VOICE_BROADCAST : return("VOICE_BROADCAST");
+
+ case ALL_PLMN_SPECIFIC_TS : return("ALL_PLMN_SPEC_TS");
+ case PLMN_SPECIFIC_TS_1 : return("PLMN_SPEC_TS_1");
+ case PLMN_SPECIFIC_TS_2 : return("PLMN_SPEC_TS_2");
+ case PLMN_SPECIFIC_TS_3 : return("PLMN_SPEC_TS_3");
+ case PLMN_SPECIFIC_TS_4 : return("PLMN_SPEC_TS_4");
+ case PLMN_SPECIFIC_TS_5 : return("PLMN_SPEC_TS_5");
+ case PLMN_SPECIFIC_TS_6 : return("PLMN_SPEC_TS_6");
+ case PLMN_SPECIFIC_TS_7 : return("PLMN_SPEC_TS_7");
+ case PLMN_SPECIFIC_TS_8 : return("PLMN_SPEC_TS_8");
+ case PLMN_SPECIFIC_TS_9 : return("PLMN_SPEC_TS_9");
+ case PLMN_SPECIFIC_TS_A : return("PLMN_SPEC_TS_A");
+ case PLMN_SPECIFIC_TS_B : return("PLMN_SPEC_TS_B");
+ case PLMN_SPECIFIC_TS_C : return("PLMN_SPEC_TS_C");
+ case PLMN_SPECIFIC_TS_D : return("PLMN_SPEC_TS_D");
+ case PLMN_SPECIFIC_TS_E : return("PLMN_SPEC_TS_E");
+ case PLMN_SPECIFIC_TS_F : return("PLMN_SPEC_TS_F");
+ default: return("Unknown TS Code");
+ }
+}
+
+char * getSubscInfoSSCodeStr(T_SUBSC_INFO_SUPP_SERVICE_CODE code)
+{
+ switch(code){
+ case SUPP_SERV_ALL_LI : return("ALL_LI");
+ case SUPP_SERV_CLIP : return("CLIP");
+ case SUPP_SERV_CLIR : return("CLIR");
+ case SUPP_SERV_COLP : return("COLP");
+ case SUPP_SERV_COLR : return("COLR");
+ case SUPP_SERV_ALL_FWD : return("ALL_FWD");
+ case SUPP_SERV_CFU : return("CFU");
+ case SUPP_SERV_CFB : return("CFB");
+ case SUPP_SERV_CFNRY : return("CFNRY");
+ case SUPP_SERV_CFNRC : return("CFNRC");
+ case SUPP_SERV_ALL_CO : return("ALL_CO");
+ case SUPP_SERV_ECT : return("ECT");
+ case SUPP_SERV_ALL_CC : return("ALL_CC");
+ case SUPP_SERV_CW : return("CW");
+ case SUPP_SERV_HOLD : return("HOLD");
+ case SUPP_SERV_ALL_MULT : return("ALL_MULT");
+ case SUPP_SERV_MPTY : return("MPTY");
+ case SUPP_SERV_ALL_BAR : return("ALL_BAR");
+ case SUPP_SERV_BAOC : return("BAOC");
+ case SUPP_SERV_BOIC : return("BOIC");
+ case SUPP_SERV_BOICE : return("BOICE");
+ case SUPP_SERV_BAIC : return("BAIC");
+ case SUPP_SERV_BIC_ROAM : return("BICRoam");
+ default: return("Unknown SS Code");
+ }
+}
+
+short checkSubscInfoIEType(unsigned char ie_type, T_SUBSC_INFO_IE_TYPE exp)
+{
+ if(ie_type != (unsigned char)exp){
+ printf("Expected SubscInfoIEType: %s\n",
+ getSubscInfoIETypeStr(exp));
+ printf("Encountered SubscInfoIEType: %s\n",
+ getSubscInfoIETypeStr((T_SUBSC_INFO_IE_TYPE)ie_type));
+ return 1;
+ }
+ else{
+ return 0;
+ }
+}
+
+void printSubscMsg(unsigned char *msg, short size)
+{
+ int i;
+ for(i=0; i<size; i++){
+ if(!(i%16)) printf("\n");
+ printf("%02x ", msg[i]);
+ }
+ printf("\n\n");
+}
+
diff --git a/data/mnet/Common/subsc/src/SubscInfoMsgDecoder.cpp b/data/mnet/Common/subsc/src/SubscInfoMsgDecoder.cpp
new file mode 100644
index 0000000..a75f07c
--- /dev/null
+++ b/data/mnet/Common/subsc/src/SubscInfoMsgDecoder.cpp
@@ -0,0 +1,610 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SubscInfoMsgDecoder.cpp
+// Author(s) : Kevin Lim
+// Create Date : 06-16-99
+// Description : subscriber information structure and decoding function
+// for messages
+//
+// Modification: 11-11-00
+// ccpentium compiler gives warning of
+// Warning: using `%eax' instead of `%ax' due to `l' suffix
+// if assigning character referenced value to short
+// kludge added to assign it to int and then assign it to short
+// *******************************************************************
+#include "stdio.h"
+#include "string.h"
+#include "subsc/SubscInfoType.h"
+#include "subsc/SubscInfoUtil.h"
+
+short isVerGE(T_SUBSC_VERSION v, int v0, int v1, int v2)
+{
+ int ver1 = v.v0 * 100 + v.v1 * 10 + v.v2;
+ int ver2 = v0 * 100 + v1 * 10 + v2;
+ if(ver1 >= ver2) return 1;
+ else return 0;
+}
+
+short DecodeVersionNumber(unsigned char *msg, short *i, T_SUBSC_VERSION *v)
+{
+ v->v0 = 0;
+ v->v1 = 0;
+ v->v2 = 0;
+ short ret = checkSubscInfoIEType(msg[(*i)], SUBSC_INFO_IE_VERSION_NUMBER);
+ if(ret){
+ ret = checkSubscInfoIEType(msg[(*i)], SUBSC_INFO_IE_MOBILE_ID_IMSI);
+ if(ret) return SUBSC_INFO_ERR_UNEXP_IE;
+ else return -1; // missing version number but has valid imsi field
+ }
+ else (*i)++;
+
+ int kludge;
+ v->v0 = kludge = msg[(*i)++];
+ v->v1 = kludge = msg[(*i)++];
+ v->v2 = kludge = msg[(*i)++];
+ if(v->v0 == SUBSC_ENC_VER0){
+ if(v->v1 == SUBSC_ENC_VER1){
+ if(v->v2 == SUBSC_ENC_VER2){
+ return 0;
+ }
+ }
+ }
+ return 1;
+}
+
+short DecodeMobileId1(unsigned char *msg, short *i, T_SUBSC_IE_MOBILE_ID_IMSI *imsi)
+{
+ int j;
+ short ret = checkSubscInfoIEType(msg[(*i)++], SUBSC_INFO_IE_MOBILE_ID_IMSI);
+ if(ret) return SUBSC_INFO_ERR_UNEXP_IE;
+
+ imsi->num_digit = SUBSC_MCC_LEN + SUBSC_MNC_LEN + SUBSC_MSIN_LEN;
+ for(j=0;j<imsi->num_digit;j++) imsi->imsi[j] = msg[(*i)++];
+ imsi->imsi[j] = '\0'; // null term
+ return 0;
+}
+
+short DecodeMobileId2(unsigned char *msg, short *i, T_SUBSC_IE_MOBILE_ID_IMSI *imsi)
+{
+ int j, num;
+ short ret = checkSubscInfoIEType(msg[(*i)++], SUBSC_INFO_IE_MOBILE_ID_IMSI);
+ if(ret) return SUBSC_INFO_ERR_UNEXP_IE;
+
+ num = imsi->num_digit = msg[(*i)++];
+ if(num > MAX_NUM_SUBSC_IMSI){
+ printf("Err. imsi num digit too large : %d\n", num);
+ printf("msg index value: %d\n", *i);
+ return SUBSC_INFO_ERR_IMSI_NUM_DIGIT;
+ }
+ for(j=0;j<num;j++) imsi->imsi[j] = msg[(*i)++];
+ imsi->imsi[j] = '\0'; // null term
+ return 0;
+}
+
+short DecodeISDN(unsigned char *msg, short *i, T_SUBSC_IE_ISDN *msisdn, T_SUBSC_VERSION *v)
+{
+ int j, num;
+ short ret = checkSubscInfoIEType(msg[(*i)++], SUBSC_INFO_IE_ISDN);
+ if(ret) return SUBSC_INFO_ERR_UNEXP_IE;
+
+ msisdn->num_digit = num = msg[(*i)++];
+ if(num > MAX_NUM_SUBSC_ISDN){
+ printf("Err. msisdn num digit too large : %d\n", num);
+ printf("msg index value: %d\n", *i);
+ return SUBSC_INFO_ERR_ISDN_NUM_DIGIT;
+ }
+ for(j=0;j<num;j++) msisdn->digits[j] = msg[(*i)++];
+ msisdn->digits[j] = '\0'; // null term
+
+ if(isVerGE(*v, 2, 0, 4)){ // version 2.0.4 up
+ for(j=0; j<NUM_PLAN_LEN; j++){
+ msisdn->num_plan[j] = msg[(*i)++];
+ }
+ }
+ return 0;
+}
+
+short DecodeSubAddr(unsigned char *msg, short *i, T_SUBSC_IE_SUBADDR *subaddr)
+{
+ int j, kludge;
+ short ret = checkSubscInfoIEType(msg[(*i)++], SUBSC_INFO_IE_SUBADDR);
+ if(ret) return SUBSC_INFO_ERR_UNEXP_IE;
+
+ subaddr->subaddr_type = kludge = msg[(*i)++];
+ for(j=0; j<NUM_SUBADDR_INFO; j++) subaddr->info[j] = msg[(*i)++];
+ return 0;
+}
+
+short DecodeProvisionBS(unsigned char *msg, short *i, T_SUBSC_IE_PROVISION_BS *bs)
+{
+ int j, num;
+ short ret = checkSubscInfoIEType(msg[(*i)++], SUBSC_INFO_IE_PROVISION_BS);
+ if(ret) return SUBSC_INFO_ERR_UNEXP_IE;
+
+ bs->num_srv = num = msg[(*i)++];
+ if(num > MAX_NUM_BEARER_SERVICE){
+ printf("Err. bearer service number too large : %d\n", num);
+ printf("msg index value: %d\n", *i);
+ return SUBSC_INFO_ERR_BS_NUM_SRV;
+ }
+ for(j=0;j<num;j++) bs->bs_code[j] = (T_SUBSC_INFO_BEARER_SERVICE_CODE)msg[(*i)++];
+ return 0;
+}
+
+short DecodeProvisionTS(unsigned char *msg, short *i, T_SUBSC_IE_PROVISION_TS *ts)
+{
+ int j, num;
+ short ret = checkSubscInfoIEType(msg[(*i)++], SUBSC_INFO_IE_PROVISION_TS);
+ if(ret) return SUBSC_INFO_ERR_UNEXP_IE;
+
+ ts->num_srv = num = msg[(*i)++];
+ if(num > MAX_NUM_TELE_SERVICE){
+ printf("Err. tele service number too large : %d\n", num);
+ printf("msg index value: %d\n", *i);
+ return SUBSC_INFO_ERR_TS_NUM_SRV;
+ }
+ for(j=0;j<num;j++) ts->ts_code[j] = (T_SUBSC_INFO_TELE_SERVICE_CODE)msg[(*i)++];
+ return 0;
+}
+
+short DecodeProvisionSS(unsigned char *msg, short *i, T_SUBSC_IE_PROVISION_SS *ss,
+ T_SUBSC_IE_SS_INFO_LIST *ss_info_list, T_SUBSC_VERSION *v)
+{
+ int j, num;
+ short ret = checkSubscInfoIEType(msg[(*i)++], SUBSC_INFO_IE_PROVISION_SS);
+ if(ret) return SUBSC_INFO_ERR_UNEXP_IE;
+
+ ss->num_srv = num = msg[(*i)++];
+ if(num > MAX_NUM_SUPP_SERVICE){
+ printf("Err. supp. service number too large : %d\n", num);
+ printf("msg index value: %d\n", *i);
+ return SUBSC_INFO_ERR_SS_NUM_SRV;
+ }
+ for(j=0;j<num;j++){
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code =
+ (T_SUBSC_INFO_SUPP_SERVICE_CODE)msg[(*i)++];
+
+ /* fix wrong code */
+ if(ss_code == 0x96) ss_code = SUPP_SERV_BAIC;
+ if(ss_code == 0x97) ss_code = SUPP_SERV_BIC_ROAM;
+
+ ss->ss_code[j] = ss_code;
+ if(!isVerGE(*v, 2, 0, 6)){
+ subscSetP(ss_info_list, ss_code, 1);
+ }
+ }
+ return 0;
+}
+
+short DecodeStatusFlag(unsigned char *msg, short *i, T_SUBSC_IE_SUBSC_STATUS *status)
+{
+ short ret = checkSubscInfoIEType(msg[(*i)++], SUBSC_INFO_IE_SUBSC_STATUS);
+ if(ret) return SUBSC_INFO_ERR_UNEXP_IE;
+
+ status->status = (T_SUBSC_STATUS_TYPE)msg[(*i)++];
+ return 0;
+}
+
+short DecodeODBData(unsigned char *msg, short *i, T_SUBSC_IE_ODB_DATA *odb_data)
+{
+ int temp;
+ short ret = checkSubscInfoIEType(msg[(*i)++], SUBSC_INFO_IE_ODB_DATA);
+ if(ret) return SUBSC_INFO_ERR_UNEXP_IE;
+
+ temp = msg[(*i)++]; // reserved
+ temp = msg[(*i)++]; // reserved
+ temp = msg[(*i)++];
+ odb_data->odb_general.multiple_ect_barred =
+ (temp >> ODB_GEN_BIT_MULTI_ECT) & 0x01;
+ odb_data->odb_general.double_chargeable_ect_barred =
+ (temp >> ODB_GEN_BIT_DBL_CHARGE_ECT) & 0x01;
+ odb_data->odb_general.intrz_ect_barred =
+ (temp >> ODB_GEN_BIT_INTRZ_ECT) & 0x01;
+ odb_data->odb_general.intrn_ect_barred =
+ (temp >> ODB_GEN_BIT_INTRN_ECT) & 0x01;
+ odb_data->odb_general.chargeable_ect_barred =
+ (temp >> ODB_GEN_BIT_CHARGE_ECT) & 0x01;
+ odb_data->odb_general.all_ect_barred =
+ (temp >> ODB_GEN_BIT_ALL_ECT) & 0x01;
+ odb_data->odb_general.intrz_intrn_og_not_hplmn_barred =
+ (temp >> ODB_GEN_BIT_INTRZ_INTRN_NOT_HPLMN) & 0x01;
+
+ temp = msg[(*i)++];
+ odb_data->odb_general.intrz_og_not_hplmn_barred =
+ (temp >> ODB_GEN_BIT_INTRZ_OG_NOT_HPLMN) & 0x01;
+ odb_data->odb_general.intrz_og_barred =
+ (temp >> ODB_GEN_BIT_INTRZ_OG) & 0x01;
+ odb_data->odb_general.ss_access_barred =
+ (temp >> ODB_GEN_BIT_SS_ACCESS) & 0x01;
+ odb_data->odb_general.premium_enter_og_barred =
+ (temp >> ODB_GEN_BIT_PREM_ENT) & 0x01;
+ odb_data->odb_general.premium_info_og_barred =
+ (temp >> ODB_GEN_BIT_PREM_INFO) & 0x01;
+ odb_data->odb_general.intrn_og_not_hplmn_barred =
+ (temp >> ODB_GEN_BIT_INTRN_OG_NOT_HPLMN) & 0x01;
+ odb_data->odb_general.intrn_og_barred =
+ (temp >> ODB_GEN_BIT_INTRN_OG) & 0x01;
+ odb_data->odb_general.all_og_barred =
+ (temp >> ODB_GEN_BIT_ALL_OG) & 0x01;
+
+ temp = msg[(*i)++]; // reserved
+ temp = msg[(*i)++]; // reserved
+ temp = msg[(*i)++]; // reserved
+ temp = msg[(*i)++];
+ odb_data->odb_plmn.plmn_specific_type4 = (temp >> ODB_HPLMN_BIT_TYPE_4) & 0x01;
+ odb_data->odb_plmn.plmn_specific_type3 = (temp >> ODB_HPLMN_BIT_TYPE_3) & 0x01;
+ odb_data->odb_plmn.plmn_specific_type2 = (temp >> ODB_HPLMN_BIT_TYPE_2) & 0x01;
+ odb_data->odb_plmn.plmn_specific_type1 = (temp >> ODB_HPLMN_BIT_TYPE_1) & 0x01;
+ return 0;
+}
+
+short DecodeBasicServiceCode(unsigned char *msg, short *i,
+ T_SUBSC_INFO_EXT_BASIC_SERVICE *basic_service)
+{
+ int j;
+ basic_service->service_type = (T_SUBSC_INFO_BASIC_SERVICE_TYPE)msg[(*i)++];
+ switch(basic_service->service_type){
+ case BEARER_SERVICE_TYPE:
+ for(j=0;j<5;j++) basic_service->ex_bs_code[j] = msg[(*i)++];
+ break;
+ case TELE_SERVICE_TYPE:
+ for(j=0;j<5;j++) basic_service->ex_ts_code[j] = msg[(*i)++];
+ break;
+ default:
+ printf("Unknown Basic Service Type :%d\n", basic_service->service_type);
+ return SUBSC_INFO_ERR_UNKNOWN_BASIC;
+ }
+ return 0;
+}
+
+short DecodeSSStatus(unsigned char *msg, short *i,
+ T_SS_STATUS_FLAG *ss_status)
+{
+ int temp = msg[(*i)++];
+ ss_status->ss_status_A = (temp >> SS_STATUS_A_BIT) & 0x01;
+ ss_status->ss_status_R = (temp >> SS_STATUS_R_BIT) & 0x01;
+ ss_status->ss_status_P = (temp >> SS_STATUS_P_BIT) & 0x01;
+ ss_status->ss_status_Q = (temp >> SS_STATUS_Q_BIT) & 0x01;
+ return 0;
+}
+
+short DecodeSSSubscOptionV210OrOlder(unsigned char *msg, short *i, T_SS_SUBSC_OPTION *ss_subsc_option) // 2.1.1
+{
+ ss_subsc_option->isPresent = true;
+ ss_subsc_option->option_type = SS_SUBSC_OPTION_CLIR_OPTION;
+ ss_subsc_option->clir_option = CLIR_PERMANENT;
+
+ return 0;
+}
+
+short DecodeSSSubscOptionV211OrLater(unsigned char *msg, short *i, T_SS_SUBSC_OPTION *ss_subsc_option) // 2.1.1
+{
+ ss_subsc_option->isPresent = (msg[(*i)++]==0)? false : true;
+
+ if (ss_subsc_option->isPresent==false) return 0;
+
+ ss_subsc_option->option_type = (T_SS_SUBSC_OPTION_TYPE) msg[(*i)++];
+
+ switch(ss_subsc_option->option_type)
+ {
+ case SS_SUBSC_OPTION_CLIR_OPTION:
+ ss_subsc_option->clir_option = (T_SS_SUBSC_CLIR_OPTION) msg[(*i)++];
+ break;
+
+ case SS_SUBSC_OPTION_OVERRIDE_CATEGORY:
+ ss_subsc_option->override_category = (T_SS_SUBSC_OVERRIDE_CATEGORY) msg[(*i)++];
+ break;
+
+ default:
+ printf("Unsupported SS Subscription Option Type : %d\n", ss_subsc_option->option_type);
+ printf("msg index value: %d\n", *i);
+ return SUBSC_INFO_ERR_SS_SUBSC_OPTION;
+ }
+
+ return 0;
+}
+
+short DecodeSSSubscOption(unsigned char *msg, short *i, T_SS_SUBSC_OPTION *ss_subsc_option, T_SUBSC_VERSION *v) // 2.1.1
+{
+ if (!isVerGE(*v,2,1,1))
+ {
+ return DecodeSSSubscOptionV210OrOlder(msg, i, ss_subsc_option);
+ }
+
+ return DecodeSSSubscOptionV211OrLater(msg, i, ss_subsc_option);
+}
+
+short DecodeForwOption(unsigned char *msg, short *i,
+ T_SS_FORW_OPTION *forw)
+{
+ int temp = msg[(*i)++];
+ forw->notify_forw_party = (T_NOTIFY_FORW_FLAG)
+ ((temp >> SS_NOTIFY_FORW_FLAG_BIT) & 0x01);
+ forw->notify_calling_party = (T_NOTIFY_CALLING_FLAG)
+ ((temp >> SS_NOTIFY_CALLING_FLAG_BIT) & 0x01);
+ forw->forw_reason = (T_FORW_REASON_FLAG)
+ ((temp >> SS_FORW_REASON_FLAG_BIT) & 0x03);
+ return 0;
+}
+
+short DecodeSSInfoForw(unsigned char *msg, short *i, T_SUBSC_IE_SS_INFO_FORW *forw, T_SUBSC_VERSION *v)
+{
+ int j, num, kludge;
+ forw->ss_code = (T_SUBSC_INFO_SUPP_SERVICE_CODE)msg[(*i)++];
+ forw->num_feature = num = msg[(*i)++];
+ if(num > MAX_NUM_EXT_FEATURE){
+ printf("Err. forw feature number too large : %d\n", num);
+ printf("msg index value: %d\n", *i);
+ return SUBSC_INFO_ERR_FORW_NUM_FEATURE;
+ }
+ for(j=0; j<num; j++){
+ DecodeBasicServiceCode(msg, i, &forw->list[j].basic_service);
+ DecodeSSStatus(msg, i, &forw->list[j].ss_status);
+ DecodeISDN(msg, i, &forw->list[j].forw_to_num, v);
+ DecodeSubAddr(msg, i, &forw->list[j].forw_to_sub);
+ DecodeForwOption(msg, i, &forw->list[j].forw_options);
+ forw->list[j].no_reply_cond_time = kludge = msg[(*i)++];
+ }
+ return 0;
+}
+
+short DecodeSSInfoBar(unsigned char *msg, short *i, T_SUBSC_IE_SS_INFO_BAR *bar, T_SUBSC_VERSION *v)
+{
+ int j, num;
+ bar->ss_code = (T_SUBSC_INFO_SUPP_SERVICE_CODE)msg[(*i)++];
+ /* fix wrong code */
+ if(bar->ss_code == 0x96) bar->ss_code = SUPP_SERV_BAIC;
+ if(bar->ss_code == 0x97) bar->ss_code = SUPP_SERV_BIC_ROAM;
+ bar->num_feature = num = msg[(*i)++];
+ if(num > MAX_NUM_EXT_FEATURE){
+ printf("Err. bar feature number too large : %d\n", num);
+ printf("msg index value: %d\n", *i);
+ return SUBSC_INFO_ERR_BAR_NUM_FEATURE;
+ }
+ for(j=0; j<num; j++){
+ DecodeBasicServiceCode(msg, i, &bar->list[j].basic_service);
+ DecodeSSStatus(msg, i, &bar->list[j].ss_status);
+ }
+ if(!isVerGE(*v, 2, 0, 8)){
+ bar->num_feature = 1;
+ bar->list[0].basic_service.service_type = TELE_SERVICE_TYPE;
+ }
+ return 0;
+}
+
+short DecodeSSInfoData(unsigned char *msg, short *i, T_SUBSC_IE_SS_INFO_DATA *data, T_SUBSC_VERSION *v) // 2.0.5
+{
+ data->ss_code = (T_SUBSC_INFO_SUPP_SERVICE_CODE)msg[(*i)++];
+ DecodeSSStatus(msg, i, &data->ss_status);
+ DecodeSSSubscOption(msg, i, &data->ss_subsc_option, v); // 2.1.1
+ return 0;
+}
+
+short DecodeSSInfo(unsigned char *msg, short *i, T_SUBSC_IE_SS_INFO *ss_info, T_SUBSC_VERSION *v)
+{
+ short ret = 0;
+ ss_info->info_type = (T_SUBSC_IE_SS_INFO_TYPE)msg[(*i)++];
+ switch(ss_info->info_type){
+ case SUBSC_IE_SS_INFO_FORW_TYPE:
+ DecodeSSInfoForw(msg, i, &ss_info->info_forw, v);
+ break;
+ case SUBSC_IE_SS_INFO_BARR_TYPE:
+ DecodeSSInfoBar(msg, i, &ss_info->info_bar, v);
+ break;
+ case SUBSC_IE_SS_INFO_DATA_TYPE: // 2.0.5
+ DecodeSSInfoData(msg, i, &ss_info->info_data, v); // 2.1.1
+ break;
+ default:
+ printf("Unsupported SS Info Type encountered :%d\n", ss_info->info_type);
+ printf("msg index value: %d\n", *i);
+ ret = SUBSC_INFO_ERR_SS_INFO_TYPE;
+ }
+ return ret;
+}
+
+short DecodeSSInfoList(unsigned char *msg, short *i, T_SUBSC_IE_SS_INFO_LIST *ss_info_list, T_SUBSC_VERSION *v)
+{
+ int j, num, ind;
+ short ret = checkSubscInfoIEType(msg[(*i)++], SUBSC_INFO_IE_SS_INFO_LIST);
+ if(ret) return SUBSC_INFO_ERR_UNEXP_IE;
+
+// num = ss_info_list->num_ss_info = msg[(*i)++];
+ num = msg[(*i)++];
+ if(num > MAX_NUM_SUPP_SERVICE){
+ printf("Err. ss info list number too large : %d\n", num);
+ printf("msg index value: %d\n", *i);
+ return SUBSC_INFO_ERR_SS_NUM_INFO;
+ }
+ for(j=0; j<num; j++){
+ switch(msg[(*i)++]){
+ case SUBSC_IE_SS_INFO_FORW_TYPE:
+ ind = subscGetSSInfoForwInd((T_SUBSC_INFO_SUPP_SERVICE_CODE)msg[*i]);
+ if(ind == -1) return SUBSC_INFO_ERR_SS_INFO_TYPE;
+ DecodeSSInfoForw(msg, i, &ss_info_list->ss_info_forw[ind], v);
+ break;
+ case SUBSC_IE_SS_INFO_DATA_TYPE:
+ ind = subscGetSSInfoDataInd((T_SUBSC_INFO_SUPP_SERVICE_CODE)msg[*i]);
+ if(ind == -1) return SUBSC_INFO_ERR_SS_INFO_TYPE;
+ DecodeSSInfoData(msg, i, &ss_info_list->ss_info_data[ind], v); // 2.1.1
+ break;
+ case SUBSC_IE_SS_INFO_BARR_TYPE:
+ ind = subscGetSSInfoBarInd((T_SUBSC_INFO_SUPP_SERVICE_CODE)msg[*i]);
+ if(ind == -1) return SUBSC_INFO_ERR_SS_INFO_TYPE;
+ DecodeSSInfoBar(msg, i, &ss_info_list->ss_info_bar[ind], v);
+ break;
+ }
+ }
+ return 0;
+}
+
+short DecodeUserInfo(unsigned char *msg, short *i, T_SUBSC_IE_USER_INFO *user)
+{
+ int j, num;
+ short ret = checkSubscInfoIEType(msg[(*i)++], SUBSC_INFO_IE_USER_INFO);
+ if(ret) return SUBSC_INFO_ERR_UNEXP_IE;
+
+ user->len = num = msg[(*i)++];
+ if(num > MAX_NUM_USER_INFO){
+ printf("Err. user info too large : %d\n", num);
+ printf("msg index value: %d\n", *i);
+ return SUBSC_INFO_ERR_USER_INFO;
+ }
+ for(j=0; j<num; j++){
+ user->name[j] = msg[(*i)++];
+ }
+ user->name[j] = '\0'; // null term
+ return 0;
+}
+
+short DecodeGPRSData(unsigned char *msg, short *i, T_SUBSC_GPRS_DATA *data)
+{
+ int j, num;
+
+ data->pdpContextId = msg[(*i)++];
+ data->pdpType = (CNI_RIL3_PDP_ADDRESS_TYPE)msg[(*i)++];
+ for(j=0; j<MAX_LEN_SUBSC_PDP_ADDR; j++)
+ data->pdpAddress[j] = msg[(*i)++];
+ data->qosSubscribed.delay_class = (CNI_RIL3_QOS_DELAY_CLASS)msg[(*i)++];
+ data->qosSubscribed.reliability_class = (CNI_RIL3_QOS_RELIABILITY_CLASS)msg[(*i)++];
+ data->qosSubscribed.precedence_class = (CNI_RIL3_QOS_PRECEDENCE_CLASS)msg[(*i)++];
+ data->qosSubscribed.peak_throughput = (CNI_RIL3_QOS_PEAK_THROUGHPUT)msg[(*i)++];
+ data->qosSubscribed.mean_throughput = (CNI_RIL3_QOS_MEAN_THROUGHPUT)msg[(*i)++];
+ data->vplmnAddressAllowed = msg[(*i)++];
+ data->apn_length = num = msg[(*i)++];
+ if(num > MAX_LEN_SUBSC_APN){
+ printf("Err. apn length too large : %d\n", num);
+ printf("msg index value: %d\n", *i);
+ return SUBSC_INFO_ERR_APN_LEN;
+ }
+ for(j=0; j<num; j++){
+ data->apn[j] = msg[(*i)++];
+ }
+ data->apn[j] = '\0'; // null term
+ return 0;
+}
+
+short DecodeGPRSDataInfo(unsigned char *msg, short *i, T_SUBSC_IE_GPRS_DATA_INFO *gprs_data, T_SUBSC_VERSION *v)
+{
+ int j, num;
+ short ret;
+
+ if(!isVerGE(*v, 2, 1, 0)){
+ gprs_data->num_data = 0;
+ return 0;
+ }
+
+ ret = checkSubscInfoIEType(msg[(*i)++], SUBSC_INFO_IE_GPRS_DATA);
+ num = gprs_data->num_data = msg[(*i)++];
+ if(num > MAX_NUM_SUBSC_GPRS_DATA){
+ printf("Err. gprs data too many : %d\n", num);
+ printf("msg index value: %d\n", *i);
+ return SUBSC_INFO_ERR_GPRS_DATA_LEN;
+ }
+ for(j=0; j<num; j++){
+ ret = DecodeGPRSData(msg, i, &gprs_data->data[j]);
+ if(ret) return ret;
+ }
+ return 0;
+}
+
+// Decode SubscInfo from Message Buffer to the structure.
+// size - size of message in msg buffer
+bool dbgDecodeSubscInfoFlag = false;
+
+extern "C" void dbgDecodeSubscInfoFlagToggle(void)
+{
+ dbgDecodeSubscInfoFlag = !dbgDecodeSubscInfoFlag;
+ printf("[dbgDecodeSubscInfoFlagToggle] debugging is %s\n",
+ (dbgDecodeSubscInfoFlag)? "enabled" : "disabled");
+}
+
+short DecodeSubscInfo(unsigned char *msg,
+ short size,
+ T_SUBSC_INFO *subsc)
+{
+ short i = 0;
+ short ret;
+ T_SUBSC_VERSION v;
+
+ memset(subsc, 0, sizeof(T_SUBSC_INFO)); // 2.1.2
+
+ ret = DecodeVersionNumber(msg, &i, &v);
+ if(ret == -1){
+ printf("decoding older version subsc info\n");
+ if(ret = DecodeMobileId1(msg, &i, &subsc->imsi)) return ret;
+ }
+ else{
+ if(ret = DecodeMobileId2(msg, &i, &subsc->imsi)) return ret;
+ }
+ if(ret = DecodeISDN(msg, &i, &subsc->msisdn, &v)) return ret;
+ if(ret = DecodeProvisionBS(msg, &i, &subsc->prov_bs)) return ret;
+ if(ret = DecodeProvisionTS(msg, &i, &subsc->prov_ts)) return ret;
+ subscSSInfoListClear(&subsc->ss_info_list); // 2.0.6
+ if(ret = DecodeProvisionSS(msg, &i, &subsc->prov_ss,
+ &subsc->ss_info_list, &v)) return ret;
+ if(ret = DecodeStatusFlag(msg, &i, &subsc->status)) return ret;
+ if(ret = DecodeODBData(msg, &i, &subsc->odb_data)) return ret;
+ if(ret = DecodeSSInfoList(msg, &i, &subsc->ss_info_list, &v)) return ret;
+ if(ret = DecodeUserInfo(msg, &i, &subsc->user)) return ret;
+ if(ret = DecodeGPRSDataInfo(msg, &i, &subsc->gprs_data, &v)) return ret;
+
+ if (dbgDecodeSubscInfoFlag)
+ {
+ printf("[DecodeSubscInfo] \n");
+ subscPrintInfo(subsc);
+ }
+
+ return 0;
+}
+
+short DecodeAuthTriplet(unsigned char *msg, short *i, T_AUTH_TRIPLET *triplet)
+{
+ int j;
+
+ for(j=0;j<3;j++) triplet->RAND[j] = msg[(*i)++];
+ for(j=0;j<2;j++) triplet->SRES[j] = msg[(*i)++];
+ for(j=0;j<10;j++) triplet->Kc[j] = msg[(*i)++];
+ return 0;
+}
+
+short DecodeAuthList(unsigned char *msg, short *i, T_SEC_IE_AUTH_LIST *auth_set)
+{
+ int j, num;
+ short ret = checkSubscInfoIEType(msg[(*i)++], SUBSC_INFO_IE_AUTH_LIST);
+ if(ret) return SUBSC_INFO_ERR_UNEXP_IE;
+
+ auth_set->num_set = num = msg[(*i)++];
+ if(num > SEC_MAX_TRIPLET){
+ printf("Err. auth triplet list number too large : %d\n", num);
+ printf("msg index value: %d\n", *i);
+ return SUBSC_INFO_ERR_AUTH_NUM_LIST;
+ }
+ for(j=0; j<num; j++){
+ ret = DecodeAuthTriplet(msg, i, &auth_set->triplet[j]);
+ if(ret) return ret;
+ }
+ return 0;
+}
+
+// Decode SecInfo from Message Buffer to the structure.
+// size - size of message in msg buffer
+short DecodeSecInfo(unsigned char *msg,
+ short size,
+ T_SEC_INFO *sec)
+{
+ short i = 0;
+ short ret;
+
+ if((ret = DecodeMobileId2(msg, &i, &sec->imsi))) return ret;
+ if((ret = DecodeAuthList(msg, &i, &sec->auth_set))) return ret;
+ return 0;
+}
diff --git a/data/mnet/Common/subsc/src/SubscInfoMsgEncoder.cpp b/data/mnet/Common/subsc/src/SubscInfoMsgEncoder.cpp
new file mode 100644
index 0000000..d9d5170
--- /dev/null
+++ b/data/mnet/Common/subsc/src/SubscInfoMsgEncoder.cpp
@@ -0,0 +1,459 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SubscInfoMsgEncoder.cpp
+// Author(s) : Kevin Lim
+// Create Date : 06-16-99
+// Description : subscriber information structure and encoding function
+// for messages
+//
+// *******************************************************************
+#include "stdio.h"
+#include "subsc/SubscInfoType.h"
+#include "subsc/SubscInfoUtil.h"
+
+short EncodeVersionNumber(unsigned char *msg, short *i)
+{
+ msg[(*i)++] = SUBSC_INFO_IE_VERSION_NUMBER;
+ msg[(*i)++] = SUBSC_ENC_VER0;
+ msg[(*i)++] = SUBSC_ENC_VER1;
+ msg[(*i)++] = SUBSC_ENC_VER2;
+ return 0;
+}
+
+short EncodeMobileId(unsigned char *msg, short *i, T_SUBSC_IE_MOBILE_ID_IMSI *imsi)
+{
+ int j, num;
+ msg[(*i)++] = SUBSC_INFO_IE_MOBILE_ID_IMSI;
+ num = msg[(*i)++] = (unsigned char)imsi->num_digit;
+ if(num > MAX_NUM_SUBSC_IMSI){
+ printf("Err. mobile id too large : %d\n", num);
+ return SUBSC_INFO_ERR_IMSI_NUM_DIGIT;
+ }
+ for(j=0;j<num;j++) msg[(*i)++] = imsi->imsi[j];
+ return 0;
+}
+
+short EncodeISDN(unsigned char *msg, short *i, T_SUBSC_IE_ISDN *msisdn)
+{
+ int j, num;
+ msg[(*i)++] = SUBSC_INFO_IE_ISDN;
+ num = msg[(*i)++] = (unsigned char)msisdn->num_digit;
+ if(num > MAX_NUM_SUBSC_ISDN){
+ printf("Err. msisdn num digit too large : %d\n", num);
+ return SUBSC_INFO_ERR_ISDN_NUM_DIGIT;
+ }
+ for(j=0;j<num;j++) msg[(*i)++] = msisdn->digits[j];
+ for(j=0;j<NUM_PLAN_LEN;j++) msg[(*i)++] = msisdn->num_plan[j];
+ return 0;
+}
+
+short EncodeSubAddr(unsigned char *msg, short *i, T_SUBSC_IE_SUBADDR *subaddr)
+{
+ int j;
+ msg[(*i)++] = SUBSC_INFO_IE_SUBADDR;
+ msg[(*i)++] = (unsigned char)subaddr->subaddr_type;
+ for(j=0;j<NUM_SUBADDR_INFO;j++) msg[(*i)++] = subaddr->info[j];
+ return 0;
+}
+
+short EncodeProvisionBS(unsigned char *msg, short *i, T_SUBSC_IE_PROVISION_BS *bs)
+{
+ int j, num;
+ msg[(*i)++] = SUBSC_INFO_IE_PROVISION_BS;
+ num = msg[(*i)++] = (unsigned char)bs->num_srv;
+ if(num > MAX_NUM_BEARER_SERVICE){
+ printf("Err. bearer service number too large : %d\n", num);
+ return SUBSC_INFO_ERR_BS_NUM_SRV;
+ }
+ for(j=0;j<num;j++) msg[(*i)++] = bs->bs_code[j];
+ return 0;
+}
+
+short EncodeProvisionTS(unsigned char *msg, short *i, T_SUBSC_IE_PROVISION_TS *ts)
+{
+ int j, num;
+ msg[(*i)++] = SUBSC_INFO_IE_PROVISION_TS;
+ num = msg[(*i)++] = (unsigned char)ts->num_srv;
+ if(num > MAX_NUM_TELE_SERVICE){
+ printf("Err. tele service number too large : %d\n", num);
+ return SUBSC_INFO_ERR_TS_NUM_SRV;
+ }
+ for(j=0;j<num;j++) msg[(*i)++] = ts->ts_code[j];
+ return 0;
+}
+
+short EncodeProvisionSS(unsigned char *msg, short *i, T_SUBSC_IE_PROVISION_SS *ss)
+{
+ int j, num;
+ msg[(*i)++] = SUBSC_INFO_IE_PROVISION_SS;
+ num = msg[(*i)++] = (unsigned char)ss->num_srv;
+ if(num > MAX_NUM_SUPP_SERVICE){
+ printf("Err. supp service number too large : %d\n", num);
+ return SUBSC_INFO_ERR_SS_NUM_SRV;
+ }
+ for(j=0;j<num;j++) msg[(*i)++] = ss->ss_code[j];
+ return 0;
+}
+
+short EncodeStatusFlag(unsigned char *msg, short *i, T_SUBSC_IE_SUBSC_STATUS *status)
+{
+ msg[(*i)++] = SUBSC_INFO_IE_SUBSC_STATUS;
+ msg[(*i)++] = (unsigned char)status->status;
+ return 0;
+}
+
+short EncodeODBData(unsigned char *msg, short *i, T_SUBSC_IE_ODB_DATA *odb_data)
+{
+ msg[(*i)++] = SUBSC_INFO_IE_ODB_DATA;
+ msg[(*i)++] = 0; // reserved
+ msg[(*i)++] = 0; // reserved
+ msg[(*i)++] = 0 |
+ ((odb_data->odb_general.multiple_ect_barred & 0x01) << ODB_GEN_BIT_MULTI_ECT) |
+ ((odb_data->odb_general.double_chargeable_ect_barred & 0x01) << ODB_GEN_BIT_DBL_CHARGE_ECT) |
+ ((odb_data->odb_general.intrz_ect_barred & 0x01) << ODB_GEN_BIT_INTRZ_ECT) |
+ ((odb_data->odb_general.intrn_ect_barred & 0x01) << ODB_GEN_BIT_INTRN_ECT) |
+ ((odb_data->odb_general.chargeable_ect_barred & 0x01) << ODB_GEN_BIT_CHARGE_ECT) |
+ ((odb_data->odb_general.all_ect_barred & 0x01) << ODB_GEN_BIT_ALL_ECT) |
+ ((odb_data->odb_general.intrz_intrn_og_not_hplmn_barred & 0x01) << ODB_GEN_BIT_INTRZ_INTRN_NOT_HPLMN);
+
+ msg[(*i)++] = 0 |
+ ((odb_data->odb_general.intrz_og_not_hplmn_barred & 0x01) << ODB_GEN_BIT_INTRZ_OG_NOT_HPLMN) |
+ ((odb_data->odb_general.intrz_og_barred & 0x01) << ODB_GEN_BIT_INTRZ_OG) |
+ ((odb_data->odb_general.ss_access_barred & 0x01) << ODB_GEN_BIT_SS_ACCESS) |
+ ((odb_data->odb_general.premium_enter_og_barred & 0x01) << ODB_GEN_BIT_PREM_ENT) |
+ ((odb_data->odb_general.premium_info_og_barred & 0x01) << ODB_GEN_BIT_PREM_INFO) |
+ ((odb_data->odb_general.intrn_og_not_hplmn_barred & 0x01) << ODB_GEN_BIT_INTRN_OG_NOT_HPLMN) |
+ ((odb_data->odb_general.intrn_og_barred & 0x01) << ODB_GEN_BIT_INTRN_OG) |
+ ((odb_data->odb_general.all_og_barred & 0x01) << ODB_GEN_BIT_ALL_OG);
+
+ msg[(*i)++] = 0; // reserved
+ msg[(*i)++] = 0; // reserved
+ msg[(*i)++] = 0; // reserved
+ msg[(*i)++] = 0 |
+ ((odb_data->odb_plmn.plmn_specific_type4 & 0x01) << ODB_HPLMN_BIT_TYPE_4) |
+ ((odb_data->odb_plmn.plmn_specific_type3 & 0x01) << ODB_HPLMN_BIT_TYPE_3) |
+ ((odb_data->odb_plmn.plmn_specific_type2 & 0x01) << ODB_HPLMN_BIT_TYPE_2) |
+ ((odb_data->odb_plmn.plmn_specific_type1 & 0x01) << ODB_HPLMN_BIT_TYPE_1);
+
+ return 0;
+}
+
+short EncodeBasicServiceCode(unsigned char *msg, short *i,
+ T_SUBSC_INFO_EXT_BASIC_SERVICE *basic_service)
+{
+ int j;
+ msg[(*i)++] = basic_service->service_type;
+ switch(basic_service->service_type){
+ case BEARER_SERVICE_TYPE:
+ for(j=0;j<5;j++) msg[(*i)++] = basic_service->ex_bs_code[j];
+ break;
+ case TELE_SERVICE_TYPE:
+ for(j=0;j<5;j++) msg[(*i)++] = basic_service->ex_ts_code[j];
+ break;
+ default:
+ printf("Unknown Basic Service Type :%d\n", basic_service->service_type);
+ return SUBSC_INFO_ERR_UNKNOWN_BASIC;
+ }
+ return 0;
+}
+
+short EncodeSSStatus(unsigned char *msg, short *i,
+ T_SS_STATUS_FLAG *ss_status)
+{
+ msg[(*i)++] = 0 |
+ ((ss_status->ss_status_A & 0x01) << SS_STATUS_A_BIT) |
+ ((ss_status->ss_status_R & 0x01) << SS_STATUS_R_BIT) |
+ ((ss_status->ss_status_P & 0x01) << SS_STATUS_P_BIT) |
+ ((ss_status->ss_status_Q & 0x01) << SS_STATUS_Q_BIT);
+ return 0;
+}
+
+short EncodeSSSubscOption(unsigned char *msg, short *i, T_SS_SUBSC_OPTION *ss_subsc_option) // 2.1.1
+{
+ if (ss_subsc_option->isPresent==false)
+ {
+ msg[(*i)++] = 0;
+ return 0;
+ }
+
+ msg[(*i)++] = 1;
+ msg[(*i)++] = (unsigned char) ss_subsc_option->option_type;
+
+ switch(ss_subsc_option->option_type)
+ {
+ case SS_SUBSC_OPTION_CLIR_OPTION:
+ msg[(*i)++] = (unsigned char) ss_subsc_option->clir_option;
+ break;
+
+ case SS_SUBSC_OPTION_OVERRIDE_CATEGORY:
+ msg[(*i)++] = (unsigned char) ss_subsc_option->override_category;
+ break;
+
+ default:
+ printf("Unsupported SS Subscription Option Type : %d\n", ss_subsc_option->option_type);
+ printf("msg index value: %d\n", *i);
+ return SUBSC_INFO_ERR_SS_SUBSC_OPTION;
+ }
+
+ return 0;
+}
+
+short EncodeForwOption(unsigned char *msg, short *i,
+ T_SS_FORW_OPTION *forw)
+{
+ msg[(*i)++] = 0 |
+ ((forw->notify_forw_party & 0x01) << SS_NOTIFY_FORW_FLAG_BIT) |
+ ((forw->notify_calling_party & 0x01)<< SS_NOTIFY_CALLING_FLAG_BIT) |
+ ((forw->forw_reason & 0x03) << SS_FORW_REASON_FLAG_BIT);
+ return 0;
+}
+
+short EncodeSSInfoForw(unsigned char *msg, short *i, T_SUBSC_IE_SS_INFO_FORW *forw)
+{
+ int j, num;
+ msg[(*i)++] = (unsigned char)forw->ss_code;
+ num = msg[(*i)++] = (unsigned char)forw->num_feature;
+ if(num > MAX_NUM_EXT_FEATURE){
+ printf("Err. forw feature number too large : %d\n", num);
+ return SUBSC_INFO_ERR_FORW_NUM_FEATURE;
+ }
+ for(j=0; j<num; j++){
+ EncodeBasicServiceCode(msg, i, &forw->list[j].basic_service);
+ EncodeSSStatus(msg, i, &forw->list[j].ss_status);
+ EncodeISDN(msg, i, &forw->list[j].forw_to_num);
+ EncodeSubAddr(msg, i, &forw->list[j].forw_to_sub);
+ EncodeForwOption(msg, i, &forw->list[j].forw_options);
+ msg[(*i)++] = (unsigned char)forw->list[j].no_reply_cond_time;
+ }
+ return 0;
+}
+
+short EncodeSSInfoBar(unsigned char *msg, short *i, T_SUBSC_IE_SS_INFO_BAR *bar)
+{
+ int j, num;
+ msg[(*i)++] = (unsigned char)bar->ss_code;
+ num = msg[(*i)++] = (unsigned char)bar->num_feature;
+ if(num > MAX_NUM_EXT_FEATURE){
+ printf("Err. bar feature number too large : %d\n", num);
+ return SUBSC_INFO_ERR_BAR_NUM_FEATURE;
+ }
+ for(j=0; j<num; j++){
+ EncodeBasicServiceCode(msg, i, &bar->list[j].basic_service);
+ EncodeSSStatus(msg, i, &bar->list[j].ss_status);
+ }
+ return 0;
+}
+
+short EncodeSSInfoData(unsigned char *msg, short *i, T_SUBSC_IE_SS_INFO_DATA *data) // 2.0.5
+{
+ msg[(*i)++] = (unsigned char)data->ss_code;
+ EncodeSSStatus(msg, i, &data->ss_status);
+ EncodeSSSubscOption(msg, i, &data->ss_subsc_option); // 2.1.1
+ return 0;
+}
+
+short EncodeSSInfo(unsigned char *msg, short *i, T_SUBSC_IE_SS_INFO *ss_info)
+{
+ msg[(*i)++] = (unsigned char)ss_info->info_type;
+ switch(ss_info->info_type){
+ case SUBSC_IE_SS_INFO_FORW_TYPE:
+ EncodeSSInfoForw(msg, i, &ss_info->info_forw);
+ break;
+ case SUBSC_IE_SS_INFO_BARR_TYPE:
+ EncodeSSInfoBar(msg, i, &ss_info->info_bar);
+ break;
+ case SUBSC_IE_SS_INFO_DATA_TYPE: // 2.0.5
+ EncodeSSInfoData(msg, i, &ss_info->info_data);
+ break;
+ default:
+ printf("Unsupported SS Info Type encountered :%d\n", ss_info->info_type);
+ return SUBSC_INFO_ERR_SS_INFO_TYPE;
+ }
+ return 0;
+}
+
+short EncodeSSInfoList(unsigned char *msg, short *i, T_SUBSC_IE_SS_INFO_LIST *ss_info_list)
+{
+ int j, num;
+ short ret;
+ msg[(*i)++] = SUBSC_INFO_IE_SS_INFO_LIST;
+ num = msg[(*i)++] = (unsigned char)ss_info_list->num_ss_info;
+ if(num > MAX_NUM_SUPP_SERVICE){
+ printf("Err. ss info list number too large : %d\n", num);
+ return SUBSC_INFO_ERR_SS_NUM_INFO;
+ }
+ for(j=0; j<SS_INFO_IND_FORW_MAX; j++){
+ msg[(*i)++] = (unsigned char)SUBSC_IE_SS_INFO_FORW_TYPE;
+ ret = EncodeSSInfoForw(msg, i, &ss_info_list->ss_info_forw[j]);
+ if(ret) return ret;
+ }
+ for(j=0; j<SS_INFO_IND_DATA_MAX; j++){
+ msg[(*i)++] = (unsigned char)SUBSC_IE_SS_INFO_DATA_TYPE;
+ ret = EncodeSSInfoData(msg, i, &ss_info_list->ss_info_data[j]);
+ if(ret) return ret;
+ }
+ for(j=0; j<SS_INFO_IND_BAR_MAX; j++){
+ msg[(*i)++] = (unsigned char)SUBSC_IE_SS_INFO_BARR_TYPE;
+ ret = EncodeSSInfoBar(msg, i, &ss_info_list->ss_info_bar[j]);
+ if(ret) return ret;
+ }
+ return 0;
+}
+
+short EncodeUserInfo(unsigned char *msg, short *i, T_SUBSC_IE_USER_INFO *user)
+{
+ int j, num;
+
+ msg[(*i)++] = SUBSC_INFO_IE_USER_INFO;
+ num = msg[(*i)++] = (unsigned char)user->len;
+ if(num > MAX_NUM_USER_INFO){
+ printf("Err. user info too large: %d\n", num);
+ return SUBSC_INFO_ERR_USER_INFO;
+ }
+ for(j=0; j<num; j++){
+ msg[(*i)++] = user->name[j];
+ }
+ return 0;
+}
+
+short EncodeGPRSData(unsigned char *msg, short *i, T_SUBSC_GPRS_DATA *data)
+{
+ int j, num;
+
+ msg[(*i)++] = data->pdpContextId;
+ msg[(*i)++] = (unsigned char)data->pdpType;
+ for(j=0; j<MAX_LEN_SUBSC_PDP_ADDR; j++)
+ msg[(*i)++] = data->pdpAddress[j];
+ msg[(*i)++] = (unsigned char)data->qosSubscribed.delay_class;
+ msg[(*i)++] = (unsigned char)data->qosSubscribed.reliability_class;
+ msg[(*i)++] = (unsigned char)data->qosSubscribed.precedence_class;
+ msg[(*i)++] = (unsigned char)data->qosSubscribed.peak_throughput;
+ msg[(*i)++] = (unsigned char)data->qosSubscribed.mean_throughput;
+ msg[(*i)++] = data->vplmnAddressAllowed;
+ num = msg[(*i)++] = data->apn_length;
+ if(num > MAX_LEN_SUBSC_APN){
+ printf("Err. apn length too large: %d\n", num);
+ return SUBSC_INFO_ERR_APN_LEN;
+ }
+ for(j=0; j<num; j++)
+ msg[(*i)++] = data->apn[j];
+ return 0;
+}
+
+short EncodeGPRSDataInfo(unsigned char *msg, short *i, T_SUBSC_IE_GPRS_DATA_INFO *gprs_data)
+{
+ int j, num;
+ short ret;
+
+ msg[(*i)++] = SUBSC_INFO_IE_GPRS_DATA;
+ num = msg[(*i)++] = (unsigned char)gprs_data->num_data;
+ if(num > MAX_NUM_SUBSC_GPRS_DATA){
+ printf("Err. gprs data too many: %d\n", num);
+ return SUBSC_INFO_ERR_GPRS_DATA_LEN;
+ }
+ for(j=0; j<num; j++){
+ ret = EncodeGPRSData(msg, i, &gprs_data->data[j]);
+ if(ret) return ret;
+ }
+ return 0;
+}
+
+// EncodeSubscInfo or DecodeSubscInfo does not allocate memory spaces
+// for message buffer nor subsc info sturcture. It should be allocated
+// prior to the calls and pass pointer to the functions.
+
+// Encode SubscInfo to Message Buffer (Byte Stream) provided.
+// size - size of msg buffer, returned with actual used size
+bool dbgEncodeSubscInfoFlag = false;
+
+extern "C" void dbgEncodeSubscInfoFlagToggle(void)
+{
+ dbgEncodeSubscInfoFlag = !dbgEncodeSubscInfoFlag;
+ printf("[dbgEncodeSubscInfoFlagToggle] debugging is %s\n",
+ (dbgEncodeSubscInfoFlag)? "enabled" : "disabled");
+}
+
+short EncodeSubscInfo(unsigned char *msg,
+ short *size,
+ T_SUBSC_INFO *subsc)
+{
+ short i = 0;
+ short ret;
+
+ if (dbgEncodeSubscInfoFlag)
+ {
+ printf("[EncodeSubscInfo] \n");
+ subscPrintInfo(subsc);
+ }
+
+ if(ret = EncodeVersionNumber(msg, &i)) return ret;
+ if(ret = EncodeMobileId(msg, &i, &subsc->imsi)) return ret;
+ if(ret = EncodeISDN(msg, &i, &subsc->msisdn)) return ret;
+ if(ret = EncodeProvisionBS(msg, &i, &subsc->prov_bs)) return ret;
+ if(ret = EncodeProvisionTS(msg, &i, &subsc->prov_ts)) return ret;
+ if(ret = EncodeProvisionSS(msg, &i, &subsc->prov_ss)) return ret;
+ if(ret = EncodeStatusFlag(msg, &i, &subsc->status)) return ret;
+ if(ret = EncodeODBData(msg, &i, &subsc->odb_data)) return ret;
+ if(ret = EncodeSSInfoList(msg, &i, &subsc->ss_info_list)) return ret;
+ if(ret = EncodeUserInfo(msg, &i, &subsc->user)) return ret;
+ if(ret = EncodeGPRSDataInfo(msg, &i, &subsc->gprs_data)) return ret;
+ *size = i;
+
+ return 0;
+}
+
+
+short EncodeAuthTriplet(unsigned char *msg, short *i, T_AUTH_TRIPLET *triplet)
+{
+ int j;
+ for(j=0; j<SEC_RAND_LEN; j++){ msg[(*i)++] = triplet->RAND[j]; }
+ for(j=0; j<SEC_SRES_LEN; j++){ msg[(*i)++] = triplet->SRES[j]; }
+ for(j=0; j<SEC_KC_LEN; j++){ msg[(*i)++] = triplet->Kc[j]; }
+ return 0;
+}
+
+short EncodeAuthList(unsigned char *msg, short *i, T_SEC_IE_AUTH_LIST *auth_set)
+{
+ int j, num;
+ short ret;
+ msg[(*i)++] = SUBSC_INFO_IE_AUTH_LIST;
+ num = msg[(*i)++] = (unsigned char)auth_set->num_set;
+ if(num > SEC_MAX_TRIPLET){
+ printf("Err. auth triplet list number too large : %d\n", num);
+ return SUBSC_INFO_ERR_AUTH_NUM_LIST;
+ }
+ for(j=0; j<num; j++){
+ ret = EncodeAuthTriplet(msg, i, &auth_set->triplet[j]);
+ if(ret) return ret;
+ }
+ return 0;
+}
+
+// EncodeSecInfo or DecodeSecInfo does not allocate memory spaces
+// for message buffer nor sec info sturcture. It should be allocated
+// prior to the calls and pass pointer to the functions.
+
+// Encode SecInfo to Message Buffer (Byte Stream) provided.
+// size - size of msg buffer, returned with actual used size
+short EncodeSecInfo(unsigned char *msg,
+ short *size,
+ T_SEC_INFO *sec)
+{
+ short i = 0;
+ short ret;
+
+ if((ret = EncodeMobileId(msg, &i, &sec->imsi))) return ret;
+ if((ret = EncodeAuthList(msg, &i, &sec->auth_set))) return ret;
+ *size = i;
+ return 0;
+}
+
diff --git a/data/mnet/Common/subsc/src/SubscInfoUtil.cpp b/data/mnet/Common/subsc/src/SubscInfoUtil.cpp
new file mode 100644
index 0000000..ef2e3f3
--- /dev/null
+++ b/data/mnet/Common/subsc/src/SubscInfoUtil.cpp
@@ -0,0 +1,1814 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SubscInfoUtil.cpp
+// Author(s) : Kevin Lim
+// Create Date : 06-16-99
+// Description : subscriber information structure and en/decoding function
+// for messages
+//
+// *******************************************************************
+#include "stdio.h"
+#include "string.h"
+#include "subsc/SubscInfoType.h"
+#include "subsc/SubscInfoUtil.h"
+
+//*****************************************************************************
+T_SUBSC_IE_MOBILE_ID_IMSI* subscGetMobileIdPtr(T_SUBSC_INFO *info)
+{
+ if(info != 0) return(&info->imsi);
+ else return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_ISDN* subscGetMSISDNPtr(T_SUBSC_INFO *info)
+{
+ if(info != 0) return(&info->msisdn);
+ else return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_PROVISION_BS* subscGetProvBSPtr(T_SUBSC_INFO *info)
+{
+ if(info != 0) return(&info->prov_bs);
+ else return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_PROVISION_TS* subscGetProvTSPtr(T_SUBSC_INFO *info)
+{
+ if(info != 0) return(&info->prov_ts);
+ else return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_PROVISION_SS* subscGetProvSSPtr(T_SUBSC_INFO *info)
+{
+ if(info != 0) return(&info->prov_ss);
+ else return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_SUBSC_STATUS* subscGetSubscStatusPtr(T_SUBSC_INFO *info)
+{
+ if(info != 0) return(&info->status);
+ else return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_ODB_DATA* subscGetODBDataPtr(T_SUBSC_INFO *info)
+{
+ if(info != 0) return(&info->odb_data);
+ else return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_SS_INFO_LIST* subscGetSSInfoListPtr(T_SUBSC_INFO *info)
+{
+ if(info != 0) return(&info->ss_info_list);
+ else return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_USER_INFO* subscGetUserInfoPtr(T_SUBSC_INFO *info)
+{
+ if(info != 0) return(&info->user);
+ else return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_GPRS_DATA_INFO* subscGetGPRSDataPtr(T_SUBSC_INFO *info)
+{
+ if(info != 0) return(&info->gprs_data);
+ else return 0;
+}
+
+//*****************************************************************************
+// [jihoon 07/13/01]
+// 1. 'subscGetCLIROption' added
+// 2. When success, it returns 0 and the CLIR option through 'option'.
+// 3. When fails, it return non-zero.
+// 4. Fail cases include null 'info', CLIR not provisioned, no index for SUPP_SERV_CLIR,
+// CLIR option not present, or wrong option type.
+int subscGetCLIROption(T_SUBSC_INFO *info, T_SS_SUBSC_CLIR_OPTION *option) // 2.1.1
+{
+ if (info == 0) return -1;
+
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ if (subscGetP(info_list, SUPP_SERV_CLIR) == 0) return -2; // not provisioned
+
+ int ind = subscGetSSInfoDataInd(SUPP_SERV_CLIR);
+ if(ind == -1) return -3;
+ T_SS_SUBSC_OPTION* subsc_option = &info_list->ss_info_data[ind].ss_subsc_option;
+
+ if (subsc_option->isPresent==false) return -4;
+ if (subsc_option->option_type!=SS_SUBSC_OPTION_CLIR_OPTION) return -5;
+
+ *option = subsc_option->clir_option;
+
+ return 0; // success
+}
+
+//*****************************************************************************
+// [jihoon 07/13/01]
+// 1. 'subscSetCLIROption' added
+// 2. When success, it returns 0.
+// 3. When fails, it return non-zero.
+// 4. Fail cases include null 'info', no index for SUPP_SERV_CLIR, 'option' of wrong value.
+int subscSetCLIROption(T_SUBSC_INFO *info, T_SS_SUBSC_CLIR_OPTION option) // 2.1.1
+{
+ if (info == 0) return -1;
+
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+
+ int ind = subscGetSSInfoDataInd(SUPP_SERV_CLIR);
+ if(ind == -1) return -2;
+ T_SS_SUBSC_OPTION* subsc_option = &info_list->ss_info_data[ind].ss_subsc_option;
+
+ switch(option)
+ {
+ case CLIR_PERMANENT:
+ case CLIR_TEMP_DFT_RESTRICTED:
+ case CLIR_TEMP_DFT_ALLOWED:
+ subsc_option->isPresent = true;
+ subsc_option->option_type = SS_SUBSC_OPTION_CLIR_OPTION;
+ subsc_option->clir_option = option;
+ break;
+
+ default:
+ return -3;
+ }
+
+
+ return 0; // success
+}
+
+//*****************************************************************************
+//*****************************************************************************
+/*
+T_SUBSC_IE_SS_INFO* subscGetSSInfoPtr(T_SUBSC_INFO *info,
+ T_SUBSC_SS_INFO_INDEX ind)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ if(info_list == 0) return 0;
+ return( &info_list->ss_info[ind]);
+}
+*/
+//*****************************************************************************
+bool subscIsProvCLIP(T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetP(info_list, SUPP_SERV_CLIP) == 1);
+}
+
+//*****************************************************************************
+bool subscIsProvCLIR(T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetP(info_list, SUPP_SERV_CLIR) == 1);
+}
+
+//*****************************************************************************
+bool subscIsProvCOLP(T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetP(info_list, SUPP_SERV_COLP) == 1);
+}
+
+//*****************************************************************************
+bool subscIsProvCOLR(T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetP(info_list, SUPP_SERV_COLR) == 1);
+}
+
+//*****************************************************************************
+bool subscIsProvCFU(T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetP(info_list, SUPP_SERV_CFU) == 1);
+}
+
+//*****************************************************************************
+bool subscIsProvCFB(T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetP(info_list, SUPP_SERV_CFB) == 1);
+}
+
+//*****************************************************************************
+bool subscIsProvCFNRY(T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetP(info_list, SUPP_SERV_CFNRY) == 1);
+}
+
+//*****************************************************************************
+bool subscIsProvCFNRC(T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetP(info_list, SUPP_SERV_CFNRC) == 1);
+}
+
+//*****************************************************************************
+bool subscIsProvECT(T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetP(info_list, SUPP_SERV_ECT) == 1);
+}
+
+//*****************************************************************************
+bool subscIsProvCW(T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetP(info_list, SUPP_SERV_CW) == 1);
+}
+
+//*****************************************************************************
+bool subscIsProvHOLD(T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetP(info_list, SUPP_SERV_HOLD) == 1);
+}
+
+//*****************************************************************************
+bool subscIsProvMPTY(T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetP(info_list, SUPP_SERV_MPTY) == 1);
+}
+
+//*****************************************************************************
+bool subscIsProvBAOC(T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetP(info_list, SUPP_SERV_BAOC) == 1);
+}
+
+//*****************************************************************************
+bool subscIsProvBOIC(T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetP(info_list, SUPP_SERV_BOIC) == 1);
+}
+
+//*****************************************************************************
+bool subscIsProvBOICE(T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetP(info_list, SUPP_SERV_BOICE) == 1);
+}
+
+//*****************************************************************************
+bool subscIsProvBAIC(T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetP(info_list, SUPP_SERV_BAIC) == 1);
+}
+
+//*****************************************************************************
+bool subscIsProvBICRoam(T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetP(info_list, SUPP_SERV_BIC_ROAM) == 1);
+}
+
+//*****************************************************************************
+T_SUBSC_FORW_FEATURE* subscGetForwFeature(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code)
+{
+ if(ss_info_list == 0) return 0;
+ int i, j;
+ i = subscGetSSInfoForwInd(ss_code);
+ int num_feature = ss_info_list->ss_info_forw[i].num_feature;
+ for(j=0; j<num_feature; j++){
+ // check for BS here
+ // for now just one
+ return(&ss_info_list->ss_info_forw[i].list[j]);
+ }
+ return 0;
+}
+
+//*****************************************************************************
+bool subscIsActiveCF(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code)
+{
+ return (subscGetA(ss_info_list, ss_code) == 1);
+}
+
+//*****************************************************************************
+bool subscIsActiveCW(T_SUBSC_IE_SS_INFO_LIST *ss_info_list)
+{
+ return (subscGetA(ss_info_list, SUPP_SERV_CW) == 1);
+}
+
+//*****************************************************************************
+int subscGetTimerCFNRY(T_SUBSC_IE_SS_INFO_LIST *ss_info_list)
+{
+ if(ss_info_list == 0) return -1;
+ T_SUBSC_FORW_FEATURE* feature = subscGetForwFeature(ss_info_list, SUPP_SERV_CFNRY);
+ if(feature == 0) return -1;
+ else return feature->no_reply_cond_time;
+}
+
+//*****************************************************************************
+// print
+//*****************************************************************************
+void subscPrintImsi(T_SUBSC_IE_MOBILE_ID_IMSI *imsi)
+{
+ if(imsi == 0) return;
+ int i;
+ for(i=0; i<imsi->num_digit; i++) printf("%c", imsi->imsi[i]);
+}
+
+//*****************************************************************************
+void subscPrintIsdn(T_SUBSC_IE_ISDN *msisdn)
+{
+ if(msisdn == 0) return;
+ int i;
+ int num_digit = (msisdn->num_digit > MAX_NUM_SUBSC_ISDN)?
+ MAX_NUM_SUBSC_ISDN: msisdn->num_digit;
+ for(i=0; i<num_digit; i++)
+ printf("%c", msisdn->digits[i]);
+}
+
+//*****************************************************************************
+void subscPrintProvBS(T_SUBSC_IE_PROVISION_BS *prov_bs)
+{
+ if(prov_bs == 0) return;
+ int i;
+ int num_srv = (prov_bs->num_srv > MAX_NUM_BEARER_SERVICE)?
+ MAX_NUM_BEARER_SERVICE: prov_bs->num_srv;
+ for(i=0; i<num_srv; i++)
+ printf("%s,", getSubscInfoBSCodeStr(prov_bs->bs_code[i]));
+}
+
+//*****************************************************************************
+void subscPrintProvTS(T_SUBSC_IE_PROVISION_TS *prov_ts)
+{
+ if(prov_ts == 0) return;
+ int i;
+ int num_srv = (prov_ts->num_srv > MAX_NUM_TELE_SERVICE)?
+ MAX_NUM_TELE_SERVICE: prov_ts->num_srv;
+ for(i=0; i<num_srv; i++)
+ printf("%s,", getSubscInfoTSCodeStr(prov_ts->ts_code[i]));
+}
+
+//*****************************************************************************
+void subscPrintProvSS(T_SUBSC_IE_PROVISION_SS *prov_ss)
+{
+ if(prov_ss == 0) return;
+ int i;
+ int num_srv = (prov_ss->num_srv > MAX_NUM_SUPP_SERVICE)?
+ MAX_NUM_SUPP_SERVICE: prov_ss->num_srv;
+ for(i=0; i<num_srv; i++)
+ printf("%s,", getSubscInfoSSCodeStr(prov_ss->ss_code[i]));
+}
+
+//*****************************************************************************
+void subscPrintSubscStatus(T_SUBSC_IE_SUBSC_STATUS *status)
+{
+ if(status == 0) return;
+ printf("%d", status->status);
+}
+
+//*****************************************************************************
+void subscPrintODBData(T_SUBSC_IE_ODB_DATA *odb_data)
+{
+ if(odb_data == 0) return;
+ printf(" ODB General: \n");
+ printf(" all og barred :%d\n", odb_data->odb_general.all_og_barred);
+ printf(" intrn og barred :%d\n", odb_data->odb_general.intrn_og_barred);
+ printf(" intrn og not hplmn barred :%d\n", odb_data->odb_general.intrn_og_not_hplmn_barred);
+ printf(" premium info og barred :%d\n", odb_data->odb_general.premium_info_og_barred);
+ printf(" premium enter og barred :%d\n", odb_data->odb_general.premium_enter_og_barred);
+ printf(" ss access barred :%d\n", odb_data->odb_general.ss_access_barred);
+ printf(" intrz og barred :%d\n", odb_data->odb_general.intrz_og_barred);
+ printf(" intrz og not hplmn barred :%d\n", odb_data->odb_general.intrz_og_not_hplmn_barred);
+ printf(" intrz intrn og not hplmn barr:%d\n", odb_data->odb_general.intrz_intrn_og_not_hplmn_barred);
+ printf(" all ect barred :%d\n", odb_data->odb_general.all_ect_barred);
+ printf(" chargeable ect barred :%d\n", odb_data->odb_general.chargeable_ect_barred);
+ printf(" intrn ect barred :%d\n", odb_data->odb_general.intrn_ect_barred);
+ printf(" intrz ect barred :%d\n", odb_data->odb_general.intrz_ect_barred);
+ printf(" double chargeable ect barred :%d\n", odb_data->odb_general.double_chargeable_ect_barred);
+ printf(" multiple ect barred :%d\n", odb_data->odb_general.multiple_ect_barred);
+ printf(" ODB PLMN specific: \n");
+ printf(" type 1 :%d\n", odb_data->odb_plmn.plmn_specific_type1);
+ printf(" type 2 :%d\n", odb_data->odb_plmn.plmn_specific_type2);
+ printf(" type 3 :%d\n", odb_data->odb_plmn.plmn_specific_type3);
+ printf(" type 4 :%d\n", odb_data->odb_plmn.plmn_specific_type4);
+}
+
+//*****************************************************************************
+void subscPrintSSStatus(T_SS_STATUS_FLAG *ss_status)
+{
+ printf("ss status - A: %d, R: %d, P: %d, Q: %d\n", ss_status->ss_status_A,
+ ss_status->ss_status_R,
+ ss_status->ss_status_P,
+ ss_status->ss_status_Q);
+}
+
+//*****************************************************************************
+void subscPrintSSSubscOption(T_SS_SUBSC_OPTION *ss_subsc_option) // 2.1.1
+{
+ if (!ss_subsc_option->isPresent) return; // nothing to print
+
+ printf(" SS SUBSC OPTION \n");
+ switch(ss_subsc_option->option_type)
+ {
+ case SS_SUBSC_OPTION_CLIR_OPTION:
+ printf(" CLIR Option :%d\n",ss_subsc_option->clir_option);
+ break;
+
+ case SS_SUBSC_OPTION_OVERRIDE_CATEGORY:
+ printf(" Override Category :%d\n",ss_subsc_option->override_category);
+ break;
+
+ default:
+ printf(" Unknown Option Type :%d\n",ss_subsc_option->option_type);
+ }
+}
+
+//*****************************************************************************
+void subscPrintSSInfoForw(T_SUBSC_IE_SS_INFO_FORW *info_forw)
+{
+ int j;
+ printf(" SS FORW INFO: \n");
+ printf(" ss code: %s\n", getSubscInfoSSCodeStr(info_forw->ss_code));
+ int num_feature = (info_forw->num_feature > MAX_NUM_EXT_FEATURE)?
+ MAX_NUM_EXT_FEATURE : info_forw->num_feature;
+ for(j=0; j<num_feature; j++){
+ printf(" feature[%d]\n", j);
+ printf(" basic service - service type: %d\n", info_forw->list[j].basic_service.service_type);
+ printf(" service code: 0x%02x\n", info_forw->list[j].basic_service.ex_bs_code[0]);
+ printf(" ");
+ subscPrintSSStatus(&info_forw->list[j].ss_status);
+ printf(" forward to num: ");
+ int num_digit = (info_forw->list[j].forw_to_num.num_digit > MAX_NUM_SUBSC_ISDN)?
+ MAX_NUM_SUBSC_ISDN: info_forw->list[j].forw_to_num.num_digit;
+ for(int k=0; k<num_digit; k++)
+ printf("%c", info_forw->list[j].forw_to_num.digits[k]);
+ printf("\n");
+ printf(" forward option: \n");
+ printf(" notify forwarding party: %d\n", info_forw->list[j].forw_options.notify_forw_party);
+ printf(" notify calling party: %d\n", info_forw->list[j].forw_options.notify_calling_party);
+ printf(" forwarding reason: %d\n", info_forw->list[j].forw_options.forw_reason);
+ printf(" no reply condition time: %d\n", info_forw->list[j].no_reply_cond_time);
+ }
+}
+
+//*****************************************************************************
+void subscPrintSSInfoBar(T_SUBSC_IE_SS_INFO_BAR *info_bar)
+{
+ int j;
+ printf(" SS BARR INFO: \n");
+ printf(" ss code: %s\n", getSubscInfoSSCodeStr(info_bar->ss_code));
+ int num_feature = (info_bar->num_feature > MAX_NUM_EXT_FEATURE)?
+ MAX_NUM_EXT_FEATURE : info_bar->num_feature;
+ for(j=0; j<num_feature; j++){
+ printf(" feature[%d]\n", j);
+ printf(" basic service - service type: %d\n", info_bar->list[j].basic_service.service_type);
+ printf(" service code: 0x%02x\n", info_bar->list[j].basic_service.ex_bs_code[0]);
+ printf(" ");
+ subscPrintSSStatus(&info_bar->list[j].ss_status);
+ }
+}
+
+//*****************************************************************************
+void subscPrintSSInfoData(T_SUBSC_IE_SS_INFO_DATA *info_data)
+{
+ printf(" SS DATA INFO: \n");
+ printf(" ss code: %s\n", getSubscInfoSSCodeStr(info_data->ss_code));
+ subscPrintSSStatus(&info_data->ss_status);
+ subscPrintSSSubscOption(&info_data->ss_subsc_option); // 2.1.1
+}
+
+//*****************************************************************************
+void subscPrintSSInfoList(T_SUBSC_IE_SS_INFO_LIST *ss_info_list)
+{
+ if(ss_info_list == 0) return;
+ int i;
+ for(i=0; i<SS_INFO_IND_FORW_MAX; i++){
+ printf("SS Forw Info[%d] \n", i);
+ subscPrintSSInfoForw(&ss_info_list->ss_info_forw[i]);
+ }
+ for(i=0; i<SS_INFO_IND_BAR_MAX; i++){
+ printf("SS Bar Info[%d] \n", i);
+ subscPrintSSInfoBar(&ss_info_list->ss_info_bar[i]);
+ }
+ for(i=0; i<SS_INFO_IND_DATA_MAX; i++){
+ printf("SS Data Info[%d] \n", i);
+ subscPrintSSInfoData(&ss_info_list->ss_info_data[i]);
+ }
+}
+
+//*****************************************************************************
+void subscPrintUserInfo(T_SUBSC_IE_USER_INFO *user)
+{
+ if(user == 0) return;
+ for(int i=0; i<user->len; i++){
+ printf("%c", user->name[i]);
+ }
+ printf("\n");
+}
+
+//*****************************************************************************
+void subscPrintPDPType(CNI_RIL3_PDP_ADDRESS_TYPE value)
+{
+ switch(value){
+ case CNI_RIL3_PDP_ADDRESS_TYPE_IETF_IPV4:
+ printf("IETF_IPV4\n");
+ break;
+ case CNI_RIL3_PDP_ADDRESS_TYPE_IETF_IPV6:
+ printf("IETF_IPV6\n");
+ break;
+ case CNI_RIL3_PDP_ADDRESS_TYPE_ETSI_X121:
+ printf("ETSI_X121\n");
+ break;
+ case CNI_RIL3_PDP_ADDRESS_TYPE_ETSI_PPP:
+ printf("ETSI_PPP\n");
+ break;
+ case CNI_RIL3_PDP_ADDRESS_TYPE_ETSI_OSP_IHOSS:
+ printf("ETSI_OSP_IHOSS\n");
+ break;
+ default: printf("Unknown :%d\n", value);
+ }
+}
+
+/*********************************************************************/
+void subscPrintQOSDelay(CNI_RIL3_QOS_DELAY_CLASS value)
+{
+ switch(value){
+ case CNI_RIL3_QOS_DELAY_CLASS_1:
+ printf("CLASS_1\n");
+ break;
+ case CNI_RIL3_QOS_DELAY_CLASS_2:
+ printf("CLASS_2\n");
+ break;
+ case CNI_RIL3_QOS_DELAY_CLASS_3:
+ printf("CLASS_3\n");
+ break;
+ case CNI_RIL3_QOS_DELAY_CLASS_4:
+ printf("CLASS_4\n");
+ break;
+ default: printf("Unknown :%d\n", value);
+ }
+}
+
+/*********************************************************************/
+void subscPrintQOSRely(CNI_RIL3_QOS_RELIABILITY_CLASS value)
+{
+ switch(value){
+ case CNI_RIL3_QOS_RELIABILITY_CLASS_ACK_GTP_LLC_RLC_PROTECTED_DATA:
+ printf("ACK_GTP_LLC_RLC_PROTECTED_DATA\n");
+ break;
+ case CNI_RIL3_QOS_RELIABILITY_CLASS_UNACK_GTP_ACK_LLC_RLC_PROTECTED_DATA:
+ printf("UNACK_GTP_ACK_LLC_RLC_PROTECTED_DATA\n");
+ break;
+ case CNI_RIL3_QOS_RELIABILITY_CLASS_UNACK_GTP_LLC_ACK_RLC_PROTECTED_DATA:
+ printf("UNACK_GTP_LLC_ACK_RLC_PROTECTED_DATA\n");
+ break;
+ case CNI_RIL3_QOS_RELIABILITY_CLASS_UNACK_GTP_LLC_RLC_PROTECTED_DATA:
+ printf("UNACK_GTP_LLC_RLC_ACK_PROTECTED_DATA\n");
+ break;
+ case CNI_RIL3_QOS_RELIABILITY_CLASS_UNACK_GTP_LLC_RLC_UNPROTECTED_DATA:
+ printf("UNACK_GTP_LLC_RLC_UNPROTECTED_DATA\n");
+ break;
+ default: printf("Unknown :%d\n", value);
+ }
+}
+
+/*********************************************************************/
+void subscPrintQOSPrec(CNI_RIL3_QOS_PRECEDENCE_CLASS value)
+{
+ switch(value){
+ case CNI_RIL3_QOS_PRECEDENCE_CLASS_HIGH_PRIORITY:
+ printf("HIGH\n");
+ break;
+ case CNI_RIL3_QOS_PRECEDENCE_CLASS_NORMAL_PRIORITY:
+ printf("NORMAL\n");
+ break;
+ case CNI_RIL3_QOS_PRECEDENCE_CLASS_LOW_PRIORITY:
+ printf("LOW\n");
+ break;
+ default: printf("Unknown :%d\n", value);
+ }
+}
+
+/*********************************************************************/
+void subscPrintQOSPeak(CNI_RIL3_QOS_PEAK_THROUGHPUT value)
+{
+ switch(value){
+ case CNI_RIL3_QOS_PEAK_THROUGHPUT_1_KBPS:
+ printf("PEAK 1KBPS\n");
+ break;
+ case CNI_RIL3_QOS_PEAK_THROUGHPUT_2_KBPS:
+ printf("PEAK 2KBPS\n");
+ break;
+ case CNI_RIL3_QOS_PEAK_THROUGHPUT_4_KBPS:
+ printf("PEAK 4KBPS\n");
+ break;
+ case CNI_RIL3_QOS_PEAK_THROUGHPUT_8_KBPS:
+ printf("PEAK 8KBPS\n");
+ break;
+ case CNI_RIL3_QOS_PEAK_THROUGHPUT_16_KBPS:
+ printf("PEAK 16KBPS\n");
+ break;
+ case CNI_RIL3_QOS_PEAK_THROUGHPUT_32_KBPS:
+ printf("PEAK 32KBPS\n");
+ break;
+ case CNI_RIL3_QOS_PEAK_THROUGHPUT_64_KBPS:
+ printf("PEAK 64KBPS\n");
+ break;
+ case CNI_RIL3_QOS_PEAK_THROUGHPUT_128_KBPS:
+ printf("PEAK 128KBPS\n");
+ break;
+ case CNI_RIL3_QOS_PEAK_THROUGHPUT_256_KBPS:
+ printf("PEAK 256KBPS\n");
+ break;
+ default: printf("Unknown :%d\n", value);
+ }
+}
+
+/*********************************************************************/
+void subscPrintQOSMean(CNI_RIL3_QOS_MEAN_THROUGHPUT value)
+{
+ switch(value){
+ case CNI_RIL3_QOS_MEAN_THROUGHPUT_100_OPH:
+ printf("MEAN 100 OPH\n");
+ break;
+ case CNI_RIL3_QOS_MEAN_THROUGHPUT_200_OPH:
+ printf("MEAN 200 OPH\n");
+ break;
+ case CNI_RIL3_QOS_MEAN_THROUGHPUT_500_OPH:
+ printf("MEAN 500 OPH\n");
+ break;
+ case CNI_RIL3_QOS_MEAN_THROUGHPUT_1_KOPH:
+ printf("MEAN 1 KOPH\n");
+ break;
+ case CNI_RIL3_QOS_MEAN_THROUGHPUT_2_KOPH:
+ printf("MEAN 2 KOPH\n");
+ break;
+ case CNI_RIL3_QOS_MEAN_THROUGHPUT_5_KOPH:
+ printf("MEAN 5 KOPH\n");
+ break;
+ case CNI_RIL3_QOS_MEAN_THROUGHPUT_10_KOPH:
+ printf("MEAN 10 KOPH\n");
+ break;
+ case CNI_RIL3_QOS_MEAN_THROUGHPUT_20_KOPH:
+ printf("MEAN 20 KOPH\n");
+ break;
+ case CNI_RIL3_QOS_MEAN_THROUGHPUT_50_KOPH:
+ printf("MEAN 50 KOPH\n");
+ break;
+ case CNI_RIL3_QOS_MEAN_THROUGHPUT_100_KOPH:
+ printf("MEAN 100 KOPH\n");
+ break;
+ case CNI_RIL3_QOS_MEAN_THROUGHPUT_200_KOPH:
+ printf("MEAN 200 KOPH\n");
+ break;
+ case CNI_RIL3_QOS_MEAN_THROUGHPUT_500_KOPH:
+ printf("MEAN 500 KOPH\n");
+ break;
+ case CNI_RIL3_QOS_MEAN_THROUGHPUT_1_MOPH:
+ printf("MEAN 1 MOPH\n");
+ break;
+ case CNI_RIL3_QOS_MEAN_THROUGHPUT_2_MOPH:
+ printf("MEAN 2 MOPH\n");
+ break;
+ case CNI_RIL3_QOS_MEAN_THROUGHPUT_5_MOPH:
+ printf("MEAN 5 MOPH\n");
+ break;
+ case CNI_RIL3_QOS_MEAN_THROUGHPUT_10_MOPH:
+ printf("MEAN 10 MOPH\n");
+ break;
+ case CNI_RIL3_QOS_MEAN_THROUGHPUT_20_MOPH:
+ printf("MEAN 20 MOPH\n");
+ break;
+ case CNI_RIL3_QOS_MEAN_THROUGHPUT_50_MOPH:
+ printf("MEAN 50 MOPH\n");
+ break;
+ case CNI_RIL3_QOS_MEAN_THROUGHPUT_BEST_EFFORT:
+ printf("MEAN BEST EFFORT\n");
+ break;
+ default: printf("Unknown :%d\n", value);
+ }
+}
+
+//*****************************************************************************
+void subscPrintQoS(T_SUBSC_QOS_DATA *ie)
+{
+ printf(" delay_class : "); subscPrintQOSDelay(ie->delay_class);
+ printf(" reliability_class: "); subscPrintQOSRely(ie->reliability_class);
+ printf(" precedence_class : "); subscPrintQOSPrec(ie->precedence_class);
+ printf(" peak_throughput : "); subscPrintQOSPeak(ie->peak_throughput);
+ printf(" mean_throughput : "); subscPrintQOSMean(ie->mean_throughput);
+}
+
+//*****************************************************************************
+void subscPrintPDPData(T_SUBSC_GPRS_DATA *data)
+{
+ int i;
+ if(data == 0) return;
+ printf(" pdp context id: %d\n", data->pdpContextId);
+ printf(" pdp type: ");
+ subscPrintPDPType(data->pdpType);
+ printf(" pdp address: ");
+ for(i=0; i<MAX_LEN_SUBSC_PDP_ADDR; i++) printf("%02x ", data->pdpAddress[i]);
+ printf("\n");
+ printf(" qos data: \n");
+ subscPrintQoS(&data->qosSubscribed);
+ printf(" vplmn address allowed: %d\n", data->vplmnAddressAllowed);
+ printf(" apn [%d] : ", data->apn_length);
+ for(i=0; i<data->apn_length; i++) printf("%c", data->apn[i]);
+ printf("\n");
+}
+
+//*****************************************************************************
+void subscPrintGPRSDataPtr(T_SUBSC_IE_GPRS_DATA_INFO *gprs_data)
+{
+ if(gprs_data == 0) return;
+ if(gprs_data->num_data >= MAX_NUM_SUBSC_GPRS_DATA) return;
+ int i;
+ for(i=0; i<gprs_data->num_data; i++){
+ printf(" PDP Data[%d] \n", i);
+ subscPrintPDPData(&gprs_data->data[i]);
+ }
+}
+
+//*****************************************************************************
+void subscPrintInfo(T_SUBSC_INFO *info)
+{
+ printf("IMSI: ");
+ subscPrintImsi(subscGetMobileIdPtr(info));
+ printf("\n");
+ printf("ISDN: ");
+ subscPrintIsdn(subscGetMSISDNPtr(info));
+ printf("\n");
+ printf("Provision Bearer Service: ");
+ subscPrintProvBS(subscGetProvBSPtr(info));
+ printf("\n");
+ printf("Provision Teleservice: ");
+ subscPrintProvTS(subscGetProvTSPtr(info));
+ printf("\n");
+ printf("Provision Supplementary Service: ");
+ subscPrintProvSS(subscGetProvSSPtr(info));
+ printf("\n");
+ printf("Subscriber Status: ");
+ subscPrintSubscStatus(subscGetSubscStatusPtr(info));
+ printf("\n");
+ printf("ODB Data\n");
+ subscPrintODBData(subscGetODBDataPtr(info));
+ subscPrintSSInfoList(subscGetSSInfoListPtr(info));
+ printf("UserInfo :");
+ subscPrintUserInfo(subscGetUserInfoPtr(info));
+ printf("GPRS :\n");
+ subscPrintGPRSDataPtr(subscGetGPRSDataPtr(info));
+}
+
+//*****************************************************************************
+void subscPrintGPRSInfo(T_SUBSC_INFO *info)
+{
+ printf("IMSI: ");
+ subscPrintImsi(subscGetMobileIdPtr(info));
+ printf("\n");
+ printf("GPRS :\n");
+ subscPrintGPRSDataPtr(subscGetGPRSDataPtr(info));
+}
+
+//*****************************************************************************
+char *subscGetStringImsi(T_SUBSC_IE_MOBILE_ID_IMSI *imsi)
+{
+ if(imsi == 0) return 0;
+ return (char *)imsi->imsi;
+}
+
+char *subscGetStringIsdn(T_SUBSC_IE_ISDN *isdn)
+{
+ if(isdn == 0) return 0;
+ return (char *)isdn->digits;
+}
+
+char *subscGetStringUser(T_SUBSC_IE_USER_INFO *user)
+{
+ if(user == 0) return "Unknown";
+ return (char *)user->name;
+}
+
+char *subscGetCFNum(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code)
+{
+ if(ss_info_list == 0) return "Unknown";
+ T_SUBSC_FORW_FEATURE* feature = subscGetForwFeature(ss_info_list, ss_code);
+ if(feature == 0) return "Unknown";
+ else return((char *)feature->forw_to_num.digits);
+}
+
+T_SUBSC_IE_ISDN* subscGetCFNumPtr(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code)
+{
+ if(ss_info_list == 0) return 0;
+ T_SUBSC_FORW_FEATURE* feature = subscGetForwFeature(ss_info_list, ss_code);
+ if(feature == 0) return 0;
+ else return(&feature->forw_to_num);
+}
+
+void subscSetIMSI(T_SUBSC_INFO *subsc, char *buf)
+{
+ T_SUBSC_IE_MOBILE_ID_IMSI* imsi = subscGetMobileIdPtr(subsc);
+ int len = strlen(buf);
+ if(len > MAX_NUM_SUBSC_IMSI) imsi->num_digit = len = MAX_NUM_SUBSC_IMSI;
+ else imsi->num_digit = len;
+ strncpy((char *)imsi->imsi, buf, len);
+ imsi->imsi[len] = '\0';
+}
+
+void subscSetMSISDN(T_SUBSC_INFO *subsc, char *buf)
+{
+ T_SUBSC_IE_ISDN* isdn = subscGetMSISDNPtr(subsc);
+ int len = strlen(buf);
+ if(len > MAX_NUM_SUBSC_ISDN) isdn->num_digit = len = MAX_NUM_SUBSC_ISDN;
+ else isdn->num_digit = len;
+ strncpy((char *)isdn->digits, buf, len);
+ isdn->digits[len] = '\0';
+}
+
+void subscSetUserInfo(T_SUBSC_INFO *subsc, char *buf)
+{
+ T_SUBSC_IE_USER_INFO* user = subscGetUserInfoPtr(subsc);
+ int len = strlen(buf);
+ if(len > MAX_NUM_USER_INFO) user->len = len = MAX_NUM_USER_INFO;
+ else user->len = len;
+ strncpy((char *)user->name, buf, len);
+ user->name[len] = '\0';
+}
+
+void subscSetACF(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code,
+ int active)
+{
+ if(ss_info_list == 0) return;
+ T_SUBSC_FORW_FEATURE* feature = subscGetForwFeature(ss_info_list, ss_code);
+ if(feature == 0) return;
+ else feature->ss_status.ss_status_A = (unsigned char)(active & 0x01);
+}
+
+void subscSetPCF(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code,
+ int prov)
+{
+ if(ss_info_list == 0) return;
+ T_SUBSC_FORW_FEATURE* feature = subscGetForwFeature(ss_info_list, ss_code);
+ if(feature == 0) return;
+ else feature->ss_status.ss_status_P = (unsigned char)(prov & 0x01);
+}
+
+void subscSetRCF(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code,
+ int reg)
+{
+ if(ss_info_list == 0) return;
+ T_SUBSC_FORW_FEATURE* feature = subscGetForwFeature(ss_info_list, ss_code);
+ if(feature == 0) return;
+ else feature->ss_status.ss_status_R = (unsigned char)(reg & 0x01);
+}
+
+void subscSetCFNum(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code,
+ char *num)
+{
+ T_SUBSC_IE_ISDN* forw_num = subscGetCFNumPtr(ss_info_list, ss_code);
+ if(forw_num != 0){
+ forw_num->num_digit = strlen(num);
+ strcpy((char *)forw_num->digits, num);
+ forw_num->num_plan[0] = 0x91; // Set All Call Forwarding Number Type as International
+ }
+}
+
+void subscSetTimerCFNRY(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ int sec)
+{
+ if(ss_info_list == 0) return;
+ T_SUBSC_FORW_FEATURE* feature = subscGetForwFeature(ss_info_list, SUPP_SERV_CFNRY);
+ if(feature == 0) return;
+ else feature->no_reply_cond_time = sec;
+}
+
+T_SS_STATUS_FLAG* subscGetStatusFlagPtr(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code)
+{
+ int ind;
+ if(ss_info_list == 0) return 0;
+ switch(ss_code){
+ case SUPP_SERV_CLIP :
+ case SUPP_SERV_CLIR :
+ case SUPP_SERV_COLP :
+ case SUPP_SERV_COLR :
+ case SUPP_SERV_ECT :
+ case SUPP_SERV_ALL_CC:
+ case SUPP_SERV_CW :
+ case SUPP_SERV_HOLD :
+ case SUPP_SERV_ALL_MULT:
+ case SUPP_SERV_MPTY:
+ ind = subscGetSSInfoDataInd(ss_code);
+ if(ind == -1) return 0;
+ return &ss_info_list->ss_info_data[ind].ss_status;
+ case SUPP_SERV_CFU :
+ case SUPP_SERV_CFB :
+ case SUPP_SERV_CFNRY :
+ case SUPP_SERV_CFNRC :
+ ind = subscGetSSInfoForwInd(ss_code);
+ if(ind == -1) return 0;
+ return &ss_info_list->ss_info_forw[ind].list[0].ss_status;
+ case SUPP_SERV_BAOC :
+ case SUPP_SERV_BOIC :
+ case SUPP_SERV_BOICE :
+ case SUPP_SERV_BAIC :
+ case SUPP_SERV_BIC_ROAM:
+ ind = subscGetSSInfoBarInd(ss_code);
+ if(ind == -1) return 0;
+ return &ss_info_list->ss_info_bar[ind].list[0].ss_status;
+ default:
+ return 0;
+ }
+}
+
+int subscGetP(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code)
+{
+ T_SS_STATUS_FLAG *ss_status = subscGetStatusFlagPtr(ss_info_list, ss_code);
+ if(ss_status == 0) return 0;
+ return ss_status->ss_status_P;
+}
+
+int subscGetA(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code)
+{
+ T_SS_STATUS_FLAG *ss_status = subscGetStatusFlagPtr(ss_info_list, ss_code);
+ if(ss_status == 0) return 0;
+ return ss_status->ss_status_A;
+}
+
+int subscGetR(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code)
+{
+ T_SS_STATUS_FLAG *ss_status = subscGetStatusFlagPtr(ss_info_list, ss_code);
+ if(ss_status == 0) return 0;
+ return ss_status->ss_status_R;
+}
+
+int subscGetQ(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code)
+{
+ T_SS_STATUS_FLAG *ss_status = subscGetStatusFlagPtr(ss_info_list, ss_code);
+ if(ss_status == 0) return 0;
+ return ss_status->ss_status_Q;
+}
+
+void subscSetP(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code,
+ int prov)
+{
+ T_SS_STATUS_FLAG *ss_status = subscGetStatusFlagPtr(ss_info_list, ss_code);
+ if(ss_status == 0) return;
+ ss_status->ss_status_P = prov;
+}
+
+void subscSetA(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code,
+ int active)
+{
+ T_SS_STATUS_FLAG *ss_status = subscGetStatusFlagPtr(ss_info_list, ss_code);
+ if(ss_status == 0) return;
+ ss_status->ss_status_A = active;
+}
+
+void subscSetR(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code,
+ int registered)
+{
+ T_SS_STATUS_FLAG *ss_status = subscGetStatusFlagPtr(ss_info_list, ss_code);
+ if(ss_status == 0) return;
+ ss_status->ss_status_R = registered;
+}
+
+void subscSetQ(T_SUBSC_IE_SS_INFO_LIST *ss_info_list,
+ T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code,
+ int quiescent)
+{
+ T_SS_STATUS_FLAG *ss_status = subscGetStatusFlagPtr(ss_info_list, ss_code);
+ if(ss_status == 0) return;
+ ss_status->ss_status_Q = quiescent;
+}
+
+
+int subscGetSSInfoInd(T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code) // 2.0.6
+{
+ switch (ss_code){
+ case SUPP_SERV_CFU :
+ case SUPP_SERV_CFB :
+ case SUPP_SERV_CFNRY :
+ case SUPP_SERV_CFNRC :
+ return subscGetSSInfoForwInd(ss_code);
+ case SUPP_SERV_CLIP :
+ case SUPP_SERV_CLIR :
+ case SUPP_SERV_COLP :
+ case SUPP_SERV_COLR :
+ case SUPP_SERV_ECT :
+ case SUPP_SERV_CW :
+ case SUPP_SERV_HOLD :
+ case SUPP_SERV_MPTY :
+ return subscGetSSInfoDataInd(ss_code);
+ case SUPP_SERV_BAOC :
+ case SUPP_SERV_BOIC :
+ case SUPP_SERV_BOICE :
+ case SUPP_SERV_BAIC :
+ case SUPP_SERV_BIC_ROAM:
+ return subscGetSSInfoBarInd(ss_code);
+ default: return -1;
+ }
+}
+
+int subscGetSSInfoForwInd(T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code) // 2.0.7
+{
+ switch (ss_code){
+ case SUPP_SERV_CFU : return(SS_INFO_IND_FORW_CFU);
+ case SUPP_SERV_CFB : return(SS_INFO_IND_FORW_CFB);
+ case SUPP_SERV_CFNRY : return(SS_INFO_IND_FORW_CFNRY);
+ case SUPP_SERV_CFNRC : return(SS_INFO_IND_FORW_CFNRC);
+ default: return -1;
+ }
+}
+
+int subscGetSSInfoDataInd(T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code) // 2.0.7
+{
+ switch (ss_code){
+ case SUPP_SERV_CLIP : return(SS_INFO_IND_DATA_CLIP);
+ case SUPP_SERV_CLIR : return(SS_INFO_IND_DATA_CLIR);
+ case SUPP_SERV_COLP : return(SS_INFO_IND_DATA_COLP);
+ case SUPP_SERV_COLR : return(SS_INFO_IND_DATA_COLR);
+ case SUPP_SERV_ECT : return(SS_INFO_IND_DATA_ECT);
+ case SUPP_SERV_CW : return(SS_INFO_IND_DATA_CW);
+ case SUPP_SERV_HOLD : return(SS_INFO_IND_DATA_HOLD);
+ case SUPP_SERV_MPTY : return(SS_INFO_IND_DATA_MPTY);
+ default: return -1;
+ }
+}
+
+int subscGetSSInfoBarInd(T_SUBSC_INFO_SUPP_SERVICE_CODE ss_code) // 2.0.7
+{
+ switch (ss_code){
+ case SUPP_SERV_BAOC : return(SS_INFO_IND_BAR_BAOC);
+ case SUPP_SERV_BOIC : return(SS_INFO_IND_BAR_BOIC);
+ case SUPP_SERV_BOICE : return(SS_INFO_IND_BAR_BOICE);
+ case 0x96: // wrong value, but for older user profile
+ case SUPP_SERV_BAIC : return(SS_INFO_IND_BAR_BAIC);
+ case 0x97: // wrong value, but for older user profile
+ case SUPP_SERV_BIC_ROAM: return(SS_INFO_IND_BAR_BIC_ROAM);
+ default: return -1;
+ }
+}
+
+void subscSSInfoListClear(T_SUBSC_IE_SS_INFO_LIST *info_list) // 2.0.6
+{
+ if(info_list == 0) return;
+
+ memset(info_list, 0, sizeof(T_SUBSC_IE_SS_INFO_LIST));
+
+ info_list->num_ss_info = SS_INFO_IND_DATA_MAX + SS_INFO_IND_FORW_MAX + SS_INFO_IND_BAR_MAX;
+
+ info_list->ss_info_data[SS_INFO_IND_DATA_CLIP ].ss_code = SUPP_SERV_CLIP;
+ info_list->ss_info_data[SS_INFO_IND_DATA_CLIR ].ss_code = SUPP_SERV_CLIR;
+ info_list->ss_info_data[SS_INFO_IND_DATA_COLP ].ss_code = SUPP_SERV_COLP;
+ info_list->ss_info_data[SS_INFO_IND_DATA_COLR ].ss_code = SUPP_SERV_COLR;
+ info_list->ss_info_data[SS_INFO_IND_DATA_ECT ].ss_code = SUPP_SERV_ECT;
+ info_list->ss_info_data[SS_INFO_IND_DATA_CW ].ss_code = SUPP_SERV_CW;
+ info_list->ss_info_data[SS_INFO_IND_DATA_HOLD ].ss_code = SUPP_SERV_HOLD;
+ info_list->ss_info_data[SS_INFO_IND_DATA_MPTY ].ss_code = SUPP_SERV_MPTY;
+
+ info_list->ss_info_forw[SS_INFO_IND_FORW_CFU ].ss_code = SUPP_SERV_CFU;
+ info_list->ss_info_forw[SS_INFO_IND_FORW_CFU ].num_feature = 1;
+ info_list->ss_info_forw[SS_INFO_IND_FORW_CFU ].list[0].basic_service.service_type = TELE_SERVICE_TYPE;
+ info_list->ss_info_forw[SS_INFO_IND_FORW_CFB ].ss_code = SUPP_SERV_CFB;
+ info_list->ss_info_forw[SS_INFO_IND_FORW_CFB ].num_feature = 1;
+ info_list->ss_info_forw[SS_INFO_IND_FORW_CFB ].list[0].basic_service.service_type = TELE_SERVICE_TYPE;
+ info_list->ss_info_forw[SS_INFO_IND_FORW_CFNRY].ss_code = SUPP_SERV_CFNRY;
+ info_list->ss_info_forw[SS_INFO_IND_FORW_CFNRY].num_feature = 1;
+ info_list->ss_info_forw[SS_INFO_IND_FORW_CFNRY].list[0].basic_service.service_type = TELE_SERVICE_TYPE;
+ info_list->ss_info_forw[SS_INFO_IND_FORW_CFNRC].ss_code = SUPP_SERV_CFNRC;
+ info_list->ss_info_forw[SS_INFO_IND_FORW_CFNRC].num_feature = 1;
+ info_list->ss_info_forw[SS_INFO_IND_FORW_CFNRC].list[0].basic_service.service_type = TELE_SERVICE_TYPE;
+
+ info_list->ss_info_bar[SS_INFO_IND_BAR_BAOC ].ss_code = SUPP_SERV_BAOC;
+ info_list->ss_info_bar[SS_INFO_IND_BAR_BAOC ].num_feature = 1;
+ info_list->ss_info_bar[SS_INFO_IND_BAR_BAOC ].list[0].basic_service.service_type = TELE_SERVICE_TYPE;
+ info_list->ss_info_bar[SS_INFO_IND_BAR_BOIC ].ss_code = SUPP_SERV_BOIC;
+ info_list->ss_info_bar[SS_INFO_IND_BAR_BOIC ].num_feature = 1;
+ info_list->ss_info_bar[SS_INFO_IND_BAR_BOIC ].list[0].basic_service.service_type = TELE_SERVICE_TYPE;
+ info_list->ss_info_bar[SS_INFO_IND_BAR_BOICE].ss_code = SUPP_SERV_BOICE;
+ info_list->ss_info_bar[SS_INFO_IND_BAR_BOICE ].num_feature = 1;
+ info_list->ss_info_bar[SS_INFO_IND_BAR_BOICE ].list[0].basic_service.service_type = TELE_SERVICE_TYPE;
+ info_list->ss_info_bar[SS_INFO_IND_BAR_BAIC ].ss_code = SUPP_SERV_BAIC;
+ info_list->ss_info_bar[SS_INFO_IND_BAR_BAIC ].num_feature = 1;
+ info_list->ss_info_bar[SS_INFO_IND_BAR_BAIC ].list[0].basic_service.service_type = TELE_SERVICE_TYPE;
+ info_list->ss_info_bar[SS_INFO_IND_BAR_BIC_ROAM].ss_code = SUPP_SERV_BIC_ROAM;
+ info_list->ss_info_bar[SS_INFO_IND_BAR_BIC_ROAM ].num_feature = 1;
+ info_list->ss_info_bar[SS_INFO_IND_BAR_BIC_ROAM ].list[0].basic_service.service_type = TELE_SERVICE_TYPE;
+}
+
+void subscInfoInitialize(T_SUBSC_INFO *info) // 2.0.6
+{
+ memset(info, 0, sizeof(T_SUBSC_INFO));
+
+ info->prov_bs.num_srv = 2;
+ info->prov_bs.bs_code[0] = DATA_CDA_9600BPS;
+ info->prov_bs.bs_code[1] = DATA_CDA_14400BPS;
+ info->prov_ts.num_srv = 2;
+ info->prov_ts.ts_code[0] = TELEPHONY_SERVICES;
+ info->prov_ts.ts_code[1] = EMERGENCY_CALLS;
+// info->prov_ts.ts_code[2] = SMS_MT_PP;
+// info->prov_ts.ts_code[3] = SMS_MO_PP;
+// info->prov_ts.ts_code[4] = FACS_GRP3_ALT_SPEECH;
+
+ subscSSInfoListClear(subscGetSSInfoListPtr(info));
+}
+
+int subscIsODBarred (T_SUBSC_INFO *info)
+{
+ T_SUBSC_IE_SUBSC_STATUS* status_ptr = subscGetSubscStatusPtr(info);
+ if(status_ptr != 0){
+ return(status_ptr->status);
+ }
+ else
+ return 0;
+}
+
+int subscIsODBAllOg (T_SUBSC_INFO *info)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ return(odb_ptr->odb_general.all_og_barred);
+ }
+ else
+ return 0;
+}
+
+int subscIsODBIntrnOg (T_SUBSC_INFO *info)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ return(odb_ptr->odb_general.intrn_og_barred);
+ }
+ else
+ return 0;
+}
+
+int subscIsODBIntrnOgNotHplmn (T_SUBSC_INFO *info)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ return(odb_ptr->odb_general.intrn_og_not_hplmn_barred);
+ }
+ else
+ return 0;
+}
+
+int subscIsODBPremiumInfoOg (T_SUBSC_INFO *info)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ return(odb_ptr->odb_general.premium_info_og_barred);
+ }
+ else
+ return 0;
+}
+
+int subscIsODBPremiumEnterOg (T_SUBSC_INFO *info)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ return(odb_ptr->odb_general.premium_enter_og_barred);
+ }
+ else
+ return 0;
+}
+
+int subscIsODBSsAccess (T_SUBSC_INFO *info)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ return(odb_ptr->odb_general.ss_access_barred);
+ }
+ else
+ return 0;
+}
+
+int subscIsODBIntrzOg (T_SUBSC_INFO *info)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ return(odb_ptr->odb_general.intrz_og_barred);
+ }
+ else
+ return 0;
+}
+
+int subscIsODBIntrzOgNotHplmn (T_SUBSC_INFO *info)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ return(odb_ptr->odb_general.intrz_og_not_hplmn_barred);
+ }
+ else
+ return 0;
+}
+
+int subscIsODBIntrzIntrnOgNotHplmn (T_SUBSC_INFO *info)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ return(odb_ptr->odb_general.intrz_intrn_og_not_hplmn_barred);
+ }
+ else
+ return 0;
+}
+
+int subscIsODBAllEct (T_SUBSC_INFO *info)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ return(odb_ptr->odb_general.all_ect_barred);
+ }
+ else
+ return 0;
+}
+
+int subscIsODBChargeableEct (T_SUBSC_INFO *info)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ return(odb_ptr->odb_general.chargeable_ect_barred);
+ }
+ else
+ return 0;
+}
+
+int subscIsODBIntrnEct (T_SUBSC_INFO *info)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ return(odb_ptr->odb_general.intrn_ect_barred);
+ }
+ else
+ return 0;
+}
+
+int subscIsODBIntrzEct (T_SUBSC_INFO *info)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ return(odb_ptr->odb_general.intrz_ect_barred);
+ }
+ else
+ return 0;
+}
+
+int subscIsODBDoubleChargeableEct (T_SUBSC_INFO *info)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ return(odb_ptr->odb_general.double_chargeable_ect_barred);
+ }
+ else
+ return 0;
+}
+
+int subscIsODBMultipleEct (T_SUBSC_INFO *info)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ return(odb_ptr->odb_general.multiple_ect_barred);
+ }
+ else
+ return 0;
+}
+
+
+void subscSetODB (T_SUBSC_INFO *info, int flag)
+{
+ T_SUBSC_IE_SUBSC_STATUS* status_ptr = subscGetSubscStatusPtr(info);
+ if(status_ptr != 0){
+ if(flag){
+ status_ptr->status = SUBSC_STATUS_ODBARRING;
+ }
+ else{
+ status_ptr->status = SUBSC_STATUS_SERVICE_GRANTED;
+ }
+ }
+}
+
+void subscSetODBAllOg (T_SUBSC_INFO *info, int flag)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ if(flag){
+ odb_ptr->odb_general.all_og_barred = 1;
+ }
+ else{
+ odb_ptr->odb_general.all_og_barred = 0;
+ }
+ }
+}
+
+void subscSetODBIntrnOg (T_SUBSC_INFO *info, int flag)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ if(flag){
+ odb_ptr->odb_general.intrn_og_barred = 1;
+ }
+ else{
+ odb_ptr->odb_general.intrn_og_barred = 0;
+ }
+ }
+}
+
+void subscSetODBIntrnOgNotHplmn (T_SUBSC_INFO *info, int flag)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ if(flag){
+ odb_ptr->odb_general.intrn_og_not_hplmn_barred = 1;
+ }
+ else{
+ odb_ptr->odb_general.intrn_og_not_hplmn_barred = 0;
+ }
+ }
+}
+
+void subscSetODBPremiumInfoOg (T_SUBSC_INFO *info, int flag)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ if(flag){
+ odb_ptr->odb_general.premium_info_og_barred = 1;
+ }
+ else{
+ odb_ptr->odb_general.premium_info_og_barred = 0;
+ }
+ }
+}
+
+void subscSetODBPremiumEnterOg (T_SUBSC_INFO *info, int flag)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ if(flag){
+ odb_ptr->odb_general.premium_enter_og_barred = 1;
+ }
+ else{
+ odb_ptr->odb_general.premium_enter_og_barred = 0;
+ }
+ }
+}
+
+void subscSetODBSsAccess (T_SUBSC_INFO *info, int flag)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ if(flag){
+ odb_ptr->odb_general.ss_access_barred = 1;
+ }
+ else{
+ odb_ptr->odb_general.ss_access_barred = 0;
+ }
+ }
+}
+
+void subscSetODBIntrzOg (T_SUBSC_INFO *info, int flag)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ if(flag){
+ odb_ptr->odb_general.intrz_og_barred = 1;
+ }
+ else{
+ odb_ptr->odb_general.intrz_og_barred = 0;
+ }
+ }
+}
+
+void subscSetODBIntrzOgNotHplmn (T_SUBSC_INFO *info, int flag)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ if(flag){
+ odb_ptr->odb_general.intrz_og_not_hplmn_barred = 1;
+ }
+ else{
+ odb_ptr->odb_general.intrz_og_not_hplmn_barred = 0;
+ }
+ }
+}
+
+void subscSetODBIntrzIntrnOgNotHplmn (T_SUBSC_INFO *info, int flag)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ if(flag){
+ odb_ptr->odb_general.intrz_intrn_og_not_hplmn_barred = 1;
+ }
+ else{
+ odb_ptr->odb_general.intrz_intrn_og_not_hplmn_barred = 0;
+ }
+ }
+}
+
+void subscSetODBAllEct (T_SUBSC_INFO *info, int flag)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ if(flag){
+ odb_ptr->odb_general.all_ect_barred = 1;
+ }
+ else{
+ odb_ptr->odb_general.all_ect_barred = 0;
+ }
+ }
+}
+
+void subscSetODBChargeableEct (T_SUBSC_INFO *info, int flag)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ if(flag){
+ odb_ptr->odb_general.chargeable_ect_barred = 1;
+ }
+ else{
+ odb_ptr->odb_general.chargeable_ect_barred = 0;
+ }
+ }
+}
+
+void subscSetODBIntrnEct (T_SUBSC_INFO *info, int flag)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ if(flag){
+ odb_ptr->odb_general.intrn_ect_barred = 1;
+ }
+ else{
+ odb_ptr->odb_general.intrn_ect_barred = 0;
+ }
+ }
+}
+
+void subscSetODBIntrzEct (T_SUBSC_INFO *info, int flag)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ if(flag){
+ odb_ptr->odb_general.intrz_ect_barred = 1;
+ }
+ else{
+ odb_ptr->odb_general.intrz_ect_barred = 0;
+ }
+ }
+}
+
+void subscSetODBDoubleChargeableEct (T_SUBSC_INFO *info, int flag)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ if(flag){
+ odb_ptr->odb_general.double_chargeable_ect_barred = 1;
+ }
+ else{
+ odb_ptr->odb_general.double_chargeable_ect_barred = 0;
+ }
+ }
+}
+
+void subscSetODBMultipleEct (T_SUBSC_INFO *info, int flag)
+{
+ T_SUBSC_IE_ODB_DATA* odb_ptr = subscGetODBDataPtr(info);
+ if(odb_ptr != 0){
+ if(flag){
+ odb_ptr->odb_general.multiple_ect_barred = 1;
+ }
+ else{
+ odb_ptr->odb_general.multiple_ect_barred = 0;
+ }
+ }
+}
+
+int subscIsSSBaoc (T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetA(info_list, SUPP_SERV_BAOC) == 1);
+}
+
+int subscIsSSBoic (T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetA(info_list, SUPP_SERV_BOIC) == 1);
+}
+
+int subscIsSSBoicExHC (T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetA(info_list, SUPP_SERV_BOICE) == 1);
+}
+
+int subscIsSSBaic (T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetA(info_list, SUPP_SERV_BAIC) == 1);
+}
+
+int subscIsSSBicRoam (T_SUBSC_INFO *info)
+{
+ if(info == 0) return 0;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ return (subscGetA(info_list, SUPP_SERV_BIC_ROAM) == 1);
+}
+
+void subscSetSSBaoc (T_SUBSC_INFO *info, int flag)
+{
+ if(info == 0) return;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ if(info_list == 0) return;
+ subscSetA(info_list, SUPP_SERV_BAOC, flag);
+}
+
+void subscSetSSBoic (T_SUBSC_INFO *info, int flag)
+{
+ if(info == 0) return;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ if(info_list == 0) return;
+ subscSetA(info_list, SUPP_SERV_BOIC, flag);
+}
+
+void subscSetSSBoicExHC (T_SUBSC_INFO *info, int flag)
+{
+ if(info == 0) return;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ if(info_list == 0) return;
+ subscSetA(info_list, SUPP_SERV_BOICE, flag);
+}
+
+void subscSetSSBaic (T_SUBSC_INFO *info, int flag)
+{
+ if(info == 0) return;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ if(info_list == 0) return;
+ subscSetA(info_list, SUPP_SERV_BAIC, flag);
+}
+
+void subscSetSSBicRoam (T_SUBSC_INFO *info, int flag)
+{
+ if(info == 0) return;
+ T_SUBSC_IE_SS_INFO_LIST *info_list = subscGetSSInfoListPtr(info);
+ if(info_list == 0) return;
+ subscSetA(info_list, SUPP_SERV_BIC_ROAM, flag);
+}
+
+int subscGetTSIndex(T_SUBSC_IE_PROVISION_TS *ts_list,
+ T_SUBSC_INFO_TELE_SERVICE_CODE code)
+{
+ int index = -1;
+ for(int i=0; i<ts_list->num_srv; i++){
+ if(ts_list->ts_code[i] == code){
+ index = i;
+ break;
+ }
+ }
+ return index;
+}
+
+int subscExistTS(T_SUBSC_INFO *info, T_SUBSC_INFO_TELE_SERVICE_CODE code)
+{
+ T_SUBSC_IE_PROVISION_TS* ts_list = subscGetProvTSPtr(info);
+ if(ts_list == 0) return 0;
+
+ int index = subscGetTSIndex(ts_list, code);
+ if(index == -1)
+ return 0;
+ else
+ return 1;
+}
+
+int subscAddTS(T_SUBSC_INFO *info, T_SUBSC_INFO_TELE_SERVICE_CODE code)
+{
+ T_SUBSC_IE_PROVISION_TS* ts_list = subscGetProvTSPtr(info);
+ if(ts_list == 0) return -1;
+
+ int index = subscGetTSIndex(ts_list, code);
+ if(index != -1) // already exists
+ return 1;
+ if(ts_list->num_srv == MAX_NUM_TELE_SERVICE) // list full
+ return -1;
+ ts_list->ts_code[ts_list->num_srv] = code;
+ ts_list->num_srv++;
+ return 0;
+}
+
+int subscDelTS(T_SUBSC_INFO *info, T_SUBSC_INFO_TELE_SERVICE_CODE code)
+{
+ T_SUBSC_IE_PROVISION_TS* ts_list = subscGetProvTSPtr(info);
+ if(ts_list == 0) return -1;
+
+ int index = subscGetTSIndex(ts_list, code);
+ if(index == -1) // doesn't exist
+ return 1;
+ if(ts_list->num_srv == 1){ // last one
+ ts_list->ts_code[index] = ALL_TELE_SERVICES;
+ }
+ else{
+ ts_list->ts_code[index] = ts_list->ts_code[ts_list->num_srv - 1];
+ ts_list->ts_code[ts_list->num_srv - 1] = ALL_TELE_SERVICES;
+ }
+ ts_list->num_srv--;
+ return 0;
+}
+
+int subscProvSMS_MT_PP(T_SUBSC_INFO *info)
+{
+ return( subscExistTS(info, ALL_SMS) || subscExistTS(info, SMS_MT_PP) );
+}
+
+int subscProvSMS_MO_PP(T_SUBSC_INFO *info)
+{
+ return( subscExistTS(info, ALL_SMS) || subscExistTS(info, SMS_MO_PP) );
+}
+
+void subscProvSSCode(T_SUBSC_INFO *info, T_SUBSC_INFO_SUPP_SERVICE_CODE code, int add)
+{
+ T_SUBSC_IE_PROVISION_SS* list = subscGetProvSSPtr(info);
+
+ int found = 0;
+ int i;
+ for(i=0; i<list->num_srv; i++){
+ if(list->ss_code[i] == code){
+ found = 1;
+ break;
+ }
+ }
+ if(found){
+ if(!add){
+ list->ss_code[i] = list->ss_code[list->num_srv - 1];
+ list->num_srv--;
+ }
+ }
+ else{
+ if(add){
+ list->ss_code[list->num_srv++] = code;
+ }
+ }
+}
+
+/* GPRS */
+T_SUBSC_GPRS_DATA *subscGetGprsPdpDataPtr(T_SUBSC_INFO *info, int index)
+{
+ T_SUBSC_IE_GPRS_DATA_INFO* gprs_data = subscGetGPRSDataPtr(info);
+ if(gprs_data == 0) return 0;
+ else return &gprs_data->data[index];
+}
+
+T_SUBSC_GPRS_DATA *subscFindGprsPdpData(T_SUBSC_INFO *info, unsigned char pdpContextId, int *index)
+{
+ T_SUBSC_IE_GPRS_DATA_INFO* gprs_data = subscGetGPRSDataPtr(info);
+ *index = -1;
+ int i;
+
+ if(gprs_data == 0) return 0;
+
+ for(i=0; i<gprs_data->num_data; i++){
+ if(gprs_data->data[i].pdpContextId == pdpContextId){
+ *index = i;
+ return &gprs_data->data[i];
+ }
+ }
+
+ return 0;
+}
+
+int subscAddGprsPdpData(T_SUBSC_INFO *info, T_SUBSC_GPRS_DATA *data)
+{
+ T_SUBSC_IE_GPRS_DATA_INFO* gprs_data = subscGetGPRSDataPtr(info);
+ if(gprs_data == 0) return -1; // can't get pointer to the gprs_data
+ if(data == 0) return -1; // just being cautious
+ int index;
+ T_SUBSC_GPRS_DATA *pdp_data = subscFindGprsPdpData(info, data->pdpContextId, &index);
+ if(pdp_data != 0) return 1; // pdp data exists
+ if(index != -1) return 2; // internal error
+
+ if(gprs_data->num_data == MAX_NUM_SUBSC_GPRS_DATA) return 3; // list full
+
+ memcpy(&gprs_data->data[gprs_data->num_data], data, sizeof(T_SUBSC_GPRS_DATA));
+ gprs_data->num_data++;
+
+ return 0;
+}
+
+int subscDelGprsPdpData(T_SUBSC_INFO *info, unsigned char pdpContextId)
+{
+ T_SUBSC_IE_GPRS_DATA_INFO* gprs_data = subscGetGPRSDataPtr(info);
+ if(gprs_data == 0) return -1; // can't get pointer to the gprs_data
+ int index;
+ T_SUBSC_GPRS_DATA *pdp_data = subscFindGprsPdpData(info, pdpContextId, &index);
+ if(pdp_data == 0) return 1; // pdp data doesn't exists
+ if(index == -1) return 2; // internal error
+
+ if(gprs_data->num_data == 0) return 3; // internal error, empty list
+
+ if(gprs_data->num_data != 1){ // not the last one
+ memcpy(pdp_data, &gprs_data->data[gprs_data->num_data-1], sizeof(T_SUBSC_GPRS_DATA));
+ }
+ gprs_data->num_data--;
+
+ return 0;
+}
+
+int subscModifyGprsPdpData(T_SUBSC_INFO *info, T_SUBSC_GPRS_DATA *data)
+{
+ T_SUBSC_IE_GPRS_DATA_INFO* gprs_data = subscGetGPRSDataPtr(info);
+ if(gprs_data == 0) return -1; // can't get pointer to the gprs_data
+ if(data == 0) return -1; // just being cautious
+ int index;
+ T_SUBSC_GPRS_DATA *pdp_data = subscFindGprsPdpData(info, data->pdpContextId, &index);
+
+ if(index == -1) return 2; // internal error
+
+ if(gprs_data->num_data == MAX_NUM_SUBSC_GPRS_DATA) return 3; // list full
+
+ memcpy(&gprs_data->data[index], data, sizeof(T_SUBSC_GPRS_DATA));
+// gprs_data->num_data++;
+
+ return 0;
+}
+
+int subscGetClassInfo(T_SUBSC_INFO *info, unsigned char* classId) // 2.1.2
+{
+ if (info == 0) return -1;
+
+ T_SUBSC_IE_IN_PROFILE* in_profile = &(info->in_profile);
+
+ if (in_profile->isPresent == false) return -2;
+
+ *classId = in_profile->classInfo.classId;
+
+ return 0; // success
+}
+
+int subscGetPrepaidIndicator(T_SUBSC_INFO *info, bool* isPrepaid) // 2.1.2
+{
+ if (info == 0) return -1;
+
+ T_SUBSC_IE_IN_PROFILE* in_profile = &(info->in_profile);
+
+ if (in_profile->isPresent == false) return -2;
+
+ *isPrepaid = in_profile->prepaidIndicator.isPrepaid;
+
+ return 0; // success
+}
+
+int subscSetInProfile(T_SUBSC_INFO *info, T_SUBSC_IE_IN_PROFILE *inProf)
+{
+ if (info == 0) return -1;
+
+ info->in_profile = *inProf;
+
+ return 0; // success
+} \ No newline at end of file
diff --git a/data/mnet/Common/vxTemplate/Makefile b/data/mnet/Common/vxTemplate/Makefile
new file mode 100644
index 0000000..bd4611d
--- /dev/null
+++ b/data/mnet/Common/vxTemplate/Makefile
@@ -0,0 +1,47 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+# (OPTIONAL) Append REPLACE - Replaces the List of directories
+# to be used in the SUBDIRS variable
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src REPLACE=src
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+SUBDIRS = src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+VOBDIR = $(TOP_OF_VOB)\$(VOB)
+
+# Allows a sub-set of the source code directories to be used
+
+ifneq ($(REPLACE),)
+ SUBDIRS = $(REPLACE)
+endif
+
+include $(VOBDIR)\l3defs.mk
+
+
diff --git a/data/mnet/Common/vxTemplate/include/vxTemplate.h b/data/mnet/Common/vxTemplate/include/vxTemplate.h
new file mode 100644
index 0000000..dd20de5
--- /dev/null
+++ b/data/mnet/Common/vxTemplate/include/vxTemplate.h
@@ -0,0 +1,33 @@
+/********************************************************************
+ *
+ * (c) Copyright Cisco 2000
+ * All Rights Reserved
+ *
+ ********************************************************************/
+
+/********************************************************************
+ *
+ * Version : 1.0
+ * Status : Under development
+ * File : template.h
+ * Author(s) : Lou Travaglione
+ * Create Date : 8/29/00
+ * Description : Demo header code for template directory.
+ *
+ ********************************************************************/
+
+#ifndef _TEMPLATE_H_
+#define _TEMPLATE_H_
+
+/*************************************************************
+ *
+ * Module Name: Hello_World
+ *
+ * Function: Demo function for template directory.
+ *
+ *************************************************************/
+
+void Hello_World(void);
+
+
+#endif /* _TEMPLATE_H_ */ \ No newline at end of file
diff --git a/data/mnet/Common/vxTemplate/src/Makefile b/data/mnet/Common/vxTemplate/src/Makefile
new file mode 100644
index 0000000..397f0a7
--- /dev/null
+++ b/data/mnet/Common/vxTemplate/src/Makefile
@@ -0,0 +1,61 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+# Use Examples:
+#
+# Case 1:
+# make all VOB=GP10 -
+# Places .out in VOB/bin directory
+#
+# Case 2:
+# make all VOB=GP10 APPDIR=Host\<Application Name>\<Source Directory> -
+# Places .o file(s) in VOB\$(APPDIR)\bin directory.
+#
+# <Application Name> = Name of Application directory
+# <Source Directory> = application sub directory where the calling
+# Makefile resides.
+#
+# Example: make all VOB=GP10 APPDIR=Host\vxTemplate\src
+#
+#
+# Note: This make file must reference a VOB that
+# has a defs.mk in the top level directory.
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+# Name of this App's Directory
+THIS_APP_DIR = vxTemplate
+
+VOB2DIR = $(TOP_OF_VOB)\..\$(VOB)
+BINDIR = ..\bin
+
+ifeq ($(APPDIR),)
+ MY_OUTPUT = $(VOB2DIR)\bin\$(THIS_APP_DIR).out
+else
+ MY_OUTPUT = $(OBJDIR)\$(THIS_APP_DIR).out
+endif
+
+include $(VOB2DIR)\l3defs.mk
+
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) -r -o $@.tmp $(MODULE_OBJS)
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+
diff --git a/data/mnet/Common/vxTemplate/src/vxTemplate.c b/data/mnet/Common/vxTemplate/src/vxTemplate.c
new file mode 100644
index 0000000..1a17995
--- /dev/null
+++ b/data/mnet/Common/vxTemplate/src/vxTemplate.c
@@ -0,0 +1,34 @@
+/* *******************************************************************
+ *
+ * (c) Copyright Cisco 2000
+ * All Rights Reserved
+ *
+ *********************************************************************/
+
+/*********************************************************************
+ *
+ * Version : 1.0
+ * Status : Under development
+ * File : vxTemplate.c
+ * Author(s) : Lou Travaglione
+ * Create Date : 8/29/00
+ * Description : Demo source code for vxTemplate directory.
+ *
+ *********************************************************************/
+
+#include <stdio.h>
+#include "vxTemplate.h"
+
+/*************************************************************
+ *
+ * Module Name: Hello_World
+ *
+ * Function: Demo function for template directory.
+ *
+ *************************************************************/
+
+void Hello_World(void)
+{
+ printf("Hello World\n");
+}
+
diff --git a/data/mnet/GP10/Common_To_VOB/Dsp/Dsptypes.h b/data/mnet/GP10/Common_To_VOB/Dsp/Dsptypes.h
new file mode 100644
index 0000000..2c05bbf
--- /dev/null
+++ b/data/mnet/GP10/Common_To_VOB/Dsp/Dsptypes.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* File: dsptypes.h
+*
+* Description:
+* Data Types for the TMS320C6X
+*
+*****************************************************************************/
+#ifndef _DSPTYPES_H_
+#define _DSPTYPES_H_
+
+/* For non-DSP code standard defintions from here */
+#include "JCStdDef.h"
+
+#if (CPU==TI_C6201)
+
+typedef char Char; /* 8 bit signed integer */
+typedef char Int8; /* 8 bit signed integer */
+typedef unsigned char UChar; /* 8 bit unsigned integer */
+typedef unsigned char Uchar; /* 8 bit unsigned integer */
+typedef unsigned char Uint8; /* 8 bit unsigned integer */
+typedef short Short; /* 16 bit signed integer */
+typedef short Int16; /* 16 bit signed integer */
+typedef unsigned short UShort; /* 16 bit unsigned integer */
+typedef unsigned short Uint16; /* 16 bit unsigned integer */
+typedef int Int; /* 32 bit signed integer */
+typedef int Int32; /* 32 bit signed integer */
+typedef unsigned int UInt; /* 32 bit unsigned integer */
+typedef unsigned int Uint32; /* 32 bit unsigned integer */
+typedef long Long; /* 40 bit signed integer */
+typedef long Int40; /* 40 bit signed integer */
+typedef unsigned long ULong; /* 40 bit unsigned integer */
+typedef unsigned long Uint40; /* 40 bit unsigned integer */
+typedef float Float; /* 32 bit floating point value */
+typedef double Double; /* 64 bit floating point value */
+typedef unsigned char Bool; /* Bool value */
+typedef void Void;
+
+#endif
+
+#define TRUE 1
+#define FALSE 0
+
+#define DISABLE 0
+#define ENABLE 1
+
+typedef enum
+{
+ SUCCESS,
+ FAILURE,
+ UN_PROCESSED
+} ProcResult;
+
+/*---------------------------------------------------------------------------
+* For each variable, define INGLOB or EXGLOB as blank to allocate internal
+* or external DSP memory, or else as "extern" to just reference the variable
+*/
+#ifdef ALLOCATE_MEMORY_INTERNAL
+#define INGLOB
+#else
+#define INGLOB extern
+#endif
+
+#ifdef ALLOCATE_MEMORY_EXTERNAL
+#define EXGLOB
+#else
+#define EXGLOB extern
+#endif
+/*-------------------------------------------------------------------------*/
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Common_To_VOB/Dsp/dsphmsg.h b/data/mnet/GP10/Common_To_VOB/Dsp/dsphmsg.h
new file mode 100644
index 0000000..de1d94b
--- /dev/null
+++ b/data/mnet/GP10/Common_To_VOB/Dsp/dsphmsg.h
@@ -0,0 +1,557 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: dsphmsg.h
+*
+* Description:
+* This file contains definitions, enumerations and structures for messages
+* between the DSP and Host. It does not declare any variables (i.e., does
+* not allocate any memory).
+*
+******************************************************************************/
+#ifndef _DSPHMSG_H_
+#define _DSPHMSG_H_
+
+#include "dsp/dsptypes.h"
+
+#define TBF_NUMBER_MAX 40
+#define USF_RESERVED 0
+
+/*
+* HPI memory address and length in bytes
+* at HPI_RX_MEM, a 32 bit of number of words can only
+* be written by Host, when host finished writing messages
+* to DSP HPI. Host can write messages to HPI only if the
+* counter has been cleared by DSP.
+*/
+#define HPI_TX_NUM_BYTES_ADDR 0x80000000
+#define HPI_TX_MSG_BUF_ADDR 0x00000204
+#define HPI_TX_BUF_SIZE 0x204
+#define HPI_TX_TOTAL_MSG_SIZE (HPI_TX_BUF_SIZE - 4)
+#define HPI_TX_MSG_SIZE 64
+#define HPI_TX_MAX_MSGS (HPI_TX_TOTAL_MSG_SIZE / HPI_TX_MSG_SIZE)
+
+/*
+* at HPI_RX_MEM, a 32 bit of number of words can only
+* be written by DSP, when DSP finished writing messages
+* to DSP HPI memory. Host needs to clear the counter once
+* all the messages have been read.
+*/
+#define HPI_RX_NUM_BYTES_ADDR 0x80000204
+#define HPI_RX_MSG_BUF_ADDR 0x00000204
+#define HPI_RX_BUF_SIZE 0x204
+#define HPI_RX_TOTAL_MSG_SIZE (HPI_RX_BUF_SIZE - 4)
+#define HPI_RX_MSG_SIZE 64
+#define HPI_RX_MAX_MSGS (HPI_RX_TOTAL_MSG_SIZE / HPI_RX_MSG_SIZE)
+
+#define SYNC_WORD 0xAAAA
+
+#define HPI_MSG_SIZE 64
+
+typedef enum
+{
+ MSG_RESERVED = 0x00<<1,
+ RR_MANAGE_MSG = 0x01<<1,
+ DCCH_MANAGE_MSG = 0x04<<1,
+ CCCH_MANAGE_MSG = 0x06<<1,
+ TRX_MANAGE_MSG = 0x08<<1,
+ OAM_MANAGE_MSG = 0x0C<<1,
+ DIAGNOSTIC_MSG = 0x10<<1,
+ PDCH_MANAGE_MSG = 0x20<<1,
+ TRAFFIC_MSG = 0x02<<1
+} msgDiscriminator;
+
+typedef enum
+{
+ BCCH_INFO_REQ = 0x0011,
+ CCCH_LOAD_IND = 0x0012,
+
+ DCH_CH_ACTIVATION_REQ = 0x0021,
+ DCH_CH_ACTIVATION_REQ_ACK = 0x0022,
+ DCH_CH_ACTIVATION_REQ_NACK = 0x0023,
+
+ DCH_CH_RELEASE_REQ = 0x002E,
+ DCH_CH_RELEASE_REQ_ACK = 0x0033,
+
+ DCH_MODE_MOD_REQ = 0x0029,
+ DCH_MODE_MOD_REQ_ACK = 0x002A,
+ DCH_MODE_MOD_REQ_NACK = 0x002B,
+
+ DCH_ENCRYPT_REQ = 0x0026,
+
+ DCH_MEAS_RESULTS_REQ = 0x0028,
+
+ DCH_PHY_CONTEXT_REQ = 0x002C,
+ DCH_PHY_CONTEXT_REQ_CFM = 0x002D,
+
+ DCH_MS_PWR_CONTROL = 0x002F,
+ DCH_BS_PWR_CONTROL = 0x0030,
+
+ DCH_SACCH_DEACTIVATE_REQ = 0x0025,
+ DCH_SACCH_INFO_MOD_REQ = 0x0034, /*dedicated channel SACCH info modify */
+
+ DCH_RF_LINK_LOST_IND = 0x0035, /*Lost RF link on Failed receive SACCH frames */
+
+
+
+ DCH_ASYNC_HO_REQUIRED_IND = 0x0036, /* Async HO request indication*/
+
+ DCH_OM_ASYNC_HO_REQ = 0x0037, /* Force O&M Async HO request */
+
+ PH_DATA_REQ = 0x0001,
+ PH_DATA_IND = 0x0002,
+ PH_CONNECT_IND = 0x0100,
+ PH_RACH_IND = 0x0200,
+ PH_READY2SEND_IND = 0x0300,
+ PH_EMPTY_FRAME_REQ = 0x0400,
+
+ /* TRX messages */
+ TRX_CONFIG = 0x1500,
+ TRX_CONFIG_ACK = 0x1600,
+ SLOT_ACTIV = 0x1700,
+ SLOT_ACTIV_ACK = 0x1800,
+ SLOT_ACTIV_NACK = 0x1900,
+ TRX_CONFIG_MA = 0x2000,
+ TRX_CONFIG_MA_ACK = 0x2100,
+ SLOT_REL = 2,
+ SACCH_FILL = 0x001A,
+ ERROR_REPORT = 0x001C,
+ SET_UL_GAIN = 0x1000,
+ SET_DL_POWER = 0x1100,
+ TUNE_SYNTH = 0x1200,
+ CONFIG_FPGA_DELAY = 0x1400,
+ SYNCH = 0x001D,
+
+ TEMPERATURE_COMPENSATION = 0x1440,
+
+ SET_RACH_SNR_THRESHOLD = 0x1A00,
+
+ KEEP_ALIVE_PING = 0x1300,
+ KEEP_ALIVE_PONG = 0x1301,
+
+ REQ_CONFIG_RADIO_TX_PWR = 0x2200,
+ RADIO_TX_PWR_CHAR_CONFIG = 0x2400,
+ RADIO_TX_PWR_CHAR_CONFIG_ACK = 0x2500,
+ TX_PWR_OFFSETS_CONFIG = 0x2600,
+ TX_PWR_OFFSETS_CONFIG_ACK = 0x2700,
+ SET_ARFCN = 0x2900,
+ RADIO_GAIN_CHAR_CONFIG = 0x2A00,
+ RADIO_GAIN_CHAR_CONFIG_ACK = 0x2B00,
+
+ /* OA&M messages */
+ OAM_DPC_CONFIG = 0x5000,
+ OAM_DPC_CONFIG_ACK = 0x5001,
+ OAM_HO_SCELL_CONFIG = 0x5002,
+ OAM_HO_SCELL_CONFIG_ACK = 0x5003,
+ OAM_HO_NCELL_CONFIG = 0x5004,
+ OAM_HO_NCELL_CONFIG_ACK = 0x5005,
+ OAM_TXPWR_MAX_RDCT_CONFIG = 0x5006,
+ OAM_TXPWR_MAX_RDCT_CONFIG_ACK = 0x5007,
+ OAM_BTS_BASIC_CONFIG = 0x5008,
+ OAM_BTS_BASIC_CONFIG_ACK = 0x5009,
+ OAM_G11_CONFIG = 0x500A,
+ OAM_G11_CONFIG_ACK = 0x500B,
+ OAM_PRACH_CONFIG = 0x500C,
+ OAM_PRACH_CONFIG_ACK = 0x500D,
+
+
+ /*
+ * TCH messages
+ */
+ UP_LINK_TCH = 0x3000,
+ DONW_LINK_TCH = 0x3001,
+
+ /*
+ * diagnostic messages
+ */
+
+ MPH_DSP_DIAG_REPORT_ERR_RSP = 0x001C,
+
+ MPH_DSP_DIAG_PING_REQ = 0x2000,
+ MPH_DSP_DIAG_PONG_RSP = 0x2001,
+
+ MPH_DSP_SET_ID_REQ = 0x2002,
+
+ MPH_DSP_DIAG_READ_MEM_RSP = 0x2003,
+ MPH_DSP_DIAG_READ_MEM_REQ = 0x2004,
+
+ MPH_DSP_DIAG_GET_DSP_QUE_STATUS_REQ = 0x2005,
+ MPH_DSP_DIAG_GET_DSP_QUE_STATUS_RSP = 0x2006,
+
+ MPH_DSP_DIAG_ECHO_MSG_REQ = 0x2008,
+ MPH_DSP_DIAG_ECHO_MSG_RSP = 0x2009,
+
+ MPH_DSP_DIAG_REPORT_REQ = 0x2010,
+ MPH_DSP_DIAG_REPORT_RSP = 0x2011,
+
+ MPH_DSP_DIAG_IDLE_FRAME_LOG_REQ = 0x2012,
+ MPH_DSP_DIAG_IDLE_FRAME_LOG_RSP = 0x2013,
+
+ MPH_DSP_DIAG_BURST_CAPTURE_REQ = 0x2014,
+ MPH_DSP_DIAG_BURST_CAPTURE_RSP = 0x2015,
+
+ MPH_DSP_DIAG_CHK_QUEUE_REQ = 0x2016,
+ MPH_DSP_DIAG_CHK_QUEUE_RSP = 0x2017,
+
+ MPH_DSP_SET_LOOPBACK_MODE_REQ = 0x2020,
+ MPH_DSP_SET_LOOPBACK_MODE_RSP = 0x2121,
+
+ MPH_DSP_DIAG_SWITCH_RADIO_LINK_LOST = 0x2030,
+
+ MPH_DSP_DIAG_DL_DMA_ADJ = 0x2040,
+
+ MPH_DSP_DIAG_SET_DUMMY_BURST_MODE = 0x2050,
+
+ MPH_DSP_DIAG_SWITCH_POWER_CONTROL = 0x2200,
+
+ MPH_DSP_DIAG_SWITCH_GPRS_RATE_TRAN = 0x2280,
+
+ MPH_DSP_DIAG_SET_MASKING_THRESHOLDS = 0x22ee,
+
+ MPH_DSP_DIAG_SWITCH_AGC = 0x2300,
+
+ MPH_DSP_DIAG_SET_AGC_DBR_TARGET = 0x2400,
+
+ MPH_DSP_DIAG_TBF_ACT = 0x2401,
+ MPH_DSP_DYNAMIC_PRACH = 0x2402,
+ MPH_DSP_CODE_DOWNLOAD_DONE = 0x4000,
+
+
+
+ /*
+ * Messages for Manufacturing Tests
+ */
+
+ MPH_DSP_EXT_MEM_CHECK_REQ = 0x4000,
+ MPH_DSP_EXT_MEM_CHECK_RSP = 0x4001,
+ MPH_DSP_EXT_MEM_ERROR_RSP = 0x4007,
+
+ MPH_DSP_GENERATE_TONE_REQ = 0x4002,
+ MPH_DSP_GENERATE_TONE_RSP = 0x4003,
+
+ MPH_DSP_MEASURE_TONE_REQ = 0x4004,
+ MPH_DSP_MEASURE_TONE_RSP = 0x4005,
+
+ MPH_DSP_PWR_UP_UNSOL_RSP = 0x4009,
+
+
+ /*
+ * GPRS Related RR Messages
+ */
+
+ PH_PRACH_IND = 0x6001,
+ PH_PTCCH_REQ = 0x6002,
+
+ PH_PACCH_REQ = 0x6003,
+ PH_PACCH_IND = 0x6004, /* normal bursts */
+ PH_PDTCH_REQ = 0x6005,
+ PH_PDTCH_IND = 0x6006,
+
+ PH_PTCCH_IND = 0x6007,
+ PH_PACCH_NACK = 0x6008,
+
+ PH_PACCH_AB_IND = 0x6009, /* access bursts */
+
+ /*
+ * GPRS Related dedicated channel manage Messages
+ */
+ PDCH_TBF_PTC_IND = 0x6100,
+ PDCH_TBF_PSI_IND = 0x6101,
+
+ PDCH_UL_TBF_ACT_REQ = 0x6200,
+ PDCH_UL_TBF_ACT_ACK = 0x6201,
+ PDCH_DL_TBF_ACT_REQ = 0x6202,
+
+ PDCH_DL_TBF_ACT_ACK = 0x6203,
+ PDCH_UL_TBF_DEACT_REQ = 0x6204,
+ PDCH_UL_TBF_DEACT_ACK = 0x6205,
+ PDCH_DL_TBF_DEACT_REQ = 0x6206,
+ PDCH_DL_TBF_DEACT_ACK = 0x6207,
+ PDCH_UL_TBF_RECONFIG_REQ = 0x6208,
+ PDCH_UL_TBF_RECONFIG_ACK = 0x6209,
+ PDCH_DL_TBF_RECONFIG_REQ = 0x620A,
+ PDCH_DL_TBF_RECONFIG_ACK = 0x620B,
+ PDCH_CODE_RATE_REQ = 0x620C,
+
+ PDCH_SINGLE_BLOCK_ASSIGN_ALERT = 0x620D,
+ PDCH_SINGLE_BLOCK_ASSIGN_ALERT_ACK = 0x620E,
+ PDCH_DL_ASSIGN_ALERT = 0x6300,
+ PDCH_DL_ASSIGN_ALERT_ACK = 0x6301,
+
+ PDCH_DL_ACK_NACK_INFO = 0x6400
+
+} msgType;
+
+
+typedef enum
+{
+ RSP_MON_REPORT_ERR,
+ MAX_COMMON_CMD,
+ MAX_COMMAND,
+ CC_DSP_SEND_PAYLOAD_PACKET_RSP,
+ MAX_RESPONSE
+
+}DspHostMsgType;
+
+
+typedef enum
+{
+ NO_ERROR = 0,
+ MEM_ERROR,
+ MALLOC,
+ WRONG_SYS_INFO_TYPE,
+ RTS_MSG_OVERFLOW,
+ UNKNOWN_MSG_DISCRIMINATOR,
+ UNKNOWN_MSG_TYPE,
+ UNKNOWN_CMD,
+ UNAUTHORIZED_MSG_SIZE,
+ COMMAND_FAILED,
+ DCH_MSG_OVERFLOW,
+ TIME_SLOT_NOT_CONFIGURED,
+ NULL_MSG,
+ NULL_POINT,
+ BAD_NAWC
+
+} ErrorType;
+
+
+/*-------------------------------------------------------------
+ * DSP diagnostic report types
+ *------------------------------------------------------------*/
+typedef enum
+{
+ MS_REPORT = 1,
+ DC_OFFSET_REPORT = 2,
+ INVALID_TIMING_ADV = 0x55,
+ HYPERFRAME_ROLLOVER = 0x66,
+ POWER_CONTROL_REPORT = 0x7f,
+ HO_REPORT = 0x86, /* Host-to-DSP value turns on/off both HO reports */
+ HO_PN_REPORT = 0x87, /* DSP-to-L1proxy value for PN report */
+ HO_CAND_REPORT = 0x88, /* DSP-to-L1proxy value for Candidate report */
+ DL_MEAS_REPORT = 0x8A,
+ SPEECH_UNDERFLOW = 0x89,
+ SPEECH_OVERFLOW = 0x91,
+ SPEECH_OUT_OF_SEQ = 0x90,
+ IF_REPORT = 0x96, /* Interference report: DSP-to-Host */
+ GPRS_MS_REPORT = 0x98,
+ GPRS_DL_MEAS_REPORT = 0x99,
+ PPCH_BUF_OVERFLOW = 0x9A, /* from putPPCHBuff() */
+} dspDiagReportType;
+
+
+/* fixed message header in bytes, make it a multiple of 4 byte */
+#define MSG_HEAD_SIZE 4
+
+/*
+* the total message length has to be lined up with 32-bit word
+* boundary
+*/
+#define MAX_PARAMS (HPI_MSG_SIZE - MSG_HEAD_SIZE-4) /* max message payload in bytes */
+ /* -4 to exclude msgSize */
+
+typedef struct
+{
+ UINT8 IMM; /* start now or on later time */
+ UINT8 timeByte0; /* t1'(5bit)t3 high(3bit) */
+ UINT8 timeByte1; /* t3 low(3bit) t2(5bit) */
+} t_startTime;
+
+typedef struct
+{
+ UINT16 chanNum;
+ UINT8 sysInfoType;
+ UINT8 msgSize;
+ UINT8 sysInfo[23];
+ t_startTime startTime;
+} ccchInfoMsgStruc;
+
+typedef struct
+{
+ UINT16 chanNum;
+ UINT8 sysInfoType;
+ UINT8 msgSize;
+ UINT8 sysInfo[18];
+ t_startTime startTime;
+} dchSacchMsgStruc;
+
+typedef struct
+{
+ UINT8 sysInfoType;
+ UINT8 msgSize;
+ UINT8 sysInfo[18];
+ t_startTime startTime;
+} sacchMsgStruc;
+
+/*
+* TBF tags are used by RLC/MAC for certain control messages. Default value
+* is associated with messages not requiring TBF tagging.
+*/
+#define TBF_TAG_DEFAULT 0xff
+
+/*
+* Channel Number IE, GPRS values for channel type
+*/
+#define CHAN_NUM_IE_PACCH 0x13
+#define CHAN_NUM_IE_PDTCH 0x14
+#define CHAN_NUM_IE_PTCCH 0x15
+#define CHAN_NUM_IE_PPAGCH 0x16
+#define CHAN_NUM_IE_PRACH 0x17
+
+
+
+/*
+* Channel Activation Type
+*/
+typedef UINT8 t_chActType;
+
+#define IMMEDIATE_ASSIGN_TYPE 0x00
+#define NORMAL_ASSIGN_TYPE 0x01
+
+#define ASYNC_HANDOVER_TYPE 0x02
+#define SYNC_HANDOVER_TYPE 0x03
+
+#define ADDITIONAL_ASSIGN_TYPE 0x04
+#define MULTISLOT_ASSIGN_TYPE 0x05
+
+#define CBCH_TYPE 0x06
+/*
+* "dtxSelect" bit 0 and 1 defines Ul and DL DTX Mode
+*/
+#define UL_DTX 0x01
+#define DL_DTX 0x02
+
+/*
+* "chSelect" defines channel type, speech, data, or signaling
+*/
+#define SPEECH_CHANNEL 0x01
+#define DATA_CHANNEL 0x02
+#define SIGNALING_CHANNEL 0x03
+
+/*
+* "chType" defines logical channel type
+*/
+#define CH_SDCCH 0x01
+#define CH_FR_TCH_BM 0x08
+#define CH_HR_TCH_LM 0x09
+#define CH_FR_TCH_BM_BI_MSLOT 0x0A
+#define CH_HR_TCH_BM_UNI_MSLOT 0x0B
+
+/*
+* "dataRate" defines vocoder algorithm used
+* or data rate selection if this is a data channel
+*/
+#define VOCODER_ALGORITHM_V1 0x01
+#define VOCODER_ALGORITHM_V2 0x21
+#define VOCODER_ALGORITHM_V3 0x41
+
+/*
+* "algorithmId" defines the type of encryption
+*/
+#define ENCRYPTION_ALGORITHM_NONE 0x01
+#define ENCRYPTION_ALGORITHM_A51 0x02
+#define ENCRYPTION_ALGORITHM_A52 0x03
+
+typedef struct
+{
+ UINT8 dtxSelect; /* uplink and DL DTX selection */
+ UINT8 chSelect; /* Speech, Data or Signaling */
+ UINT8 chType; /* SDCCH, FR, HR, EFR */
+ UINT8 dataRate; /* data rate and transparent */
+} t_chModes;
+
+typedef struct
+{
+ UINT8 algorithmId;
+ UINT8 key[8];
+} t_encryptInfo;
+
+typedef struct
+{
+ UINT16 chanNum;
+ t_chActType chActType;
+ t_chModes chModes;
+ t_encryptInfo encryptInfo;
+ UINT8 hoRef;
+ UINT8 bsPower;
+ INT8 msPower;
+ INT8 timeAdv;
+ INT8 msPowerInit;
+ UINT8 UIC;
+} chActMsgStruc;
+
+typedef struct
+{
+ UINT16 chanNum;
+ UINT8 linkId;
+ t_encryptInfo encryptInfo;
+} encryptMsgStruc;
+
+/*
+* Note: &tchFrame[0] is cast to UINT32* in the source code. Therefore, we must
+* define a multiple of 4 bytes of storage before it to maintain alignment
+*/
+typedef struct
+{
+ UINT16 chanNum;
+ UINT16 rtpSeqNum; /*replace filler bytes with RTP frame number */
+ UINT8 tchFrame[40];
+} tchMsgStruc;
+
+/*
+* Note: &params[0] is cast to UINT32* in the source code. Therefore, we must
+* define a multiple of 4 bytes of storage before it to maintain alignment
+*/
+typedef struct
+{
+ INT32 msgSize;
+ UINT8 function; /* Message descriminator */
+ UINT8 typeHiByte; /* Message Type */
+ UINT8 typeLoByte; /* Message Type */
+ UINT8 trx;
+ UINT8 params[MAX_PARAMS];
+} msgStruc, rspStruc, cmdStruc;
+
+/*
+* Note: &params[0] is cast to UINT32* in the source code. Therefore, we must
+* define a multiple of 4 bytes of storage before it to maintain alignment
+*/
+typedef struct
+{
+ INT32 msgSize;
+ UINT8 function; /* Message descriminator */
+ UINT8 typeHiByte; /* Message Type */
+ UINT8 typeLoByte; /* Message Type */
+ UINT8 trx;
+ union
+ {
+ UINT8 params[MAX_PARAMS];
+ ccchInfoMsgStruc ccchInfo;
+ chActMsgStruc chActInfo;
+ encryptMsgStruc encryptCmdInfo;
+ dchSacchMsgStruc dchSacchInfo;
+ sacchMsgStruc sacchInfo;
+ tchMsgStruc tchInfo;
+ }u;
+}msgUnionStruc;
+
+
+
+/*
+* Definitions to be shared by MAC/RLC and DSP
+*/
+
+typedef enum {
+ TBF_STATIC = 0,
+ TBF_DYNAMIC = 1,
+ TBF_DYNAMIC_EXTENDED = 2,
+ TBF_SBLOCK_MODE = 3
+} t_tbfOpMode;
+
+
+#endif /* end of include once only */
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/Diags/Makefile b/data/mnet/GP10/Dsp/Diags/Makefile
new file mode 100644
index 0000000..94cc6c4
--- /dev/null
+++ b/data/mnet/GP10/Dsp/Diags/Makefile
@@ -0,0 +1,23 @@
+#****************************************************************************
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#****************************************************************************
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+include ../dsp.mk
+
+SOURCE_LIST = LOOPBACK.c
+
+OBJ_LIST = $(SOURCE_LIST:.c=.obj)
+MODULE_OBJS = $(foreach file, $(OBJ_LIST), $(OBJDIR)/$(file))
+
+all: $(MODULE_OBJS)
+
+# rule for C++ compiles
+$(OBJDIR)/%.obj : %.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
diff --git a/data/mnet/GP10/Dsp/Diags/loopback.c b/data/mnet/GP10/Dsp/Diags/loopback.c
new file mode 100644
index 0000000..e5fe1b7
--- /dev/null
+++ b/data/mnet/GP10/Dsp/Diags/loopback.c
@@ -0,0 +1,625 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: loopback.c
+*
+* Description:
+* This file contains functions for loopback tests.
+*
+* Public Functions:
+* mod2DmodLpbk, dlGroupVTableLpbkInit, ulGroupVTableLpbkInit, compLpbkBuf
+*
+* Private Functions:
+* dlRachProc, lpbkDlGroupV, lpbkULGroupV,
+*
+******************************************************************************/
+#include <stdlib.h>
+#include <math.h>
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "dsprotyp.h"
+#include <mcbsp.h> /* mcbsp devlib */
+#include <mcbspdrv.h> /* mcbsp driver */
+#include <dma.h>
+#include <intr.h>
+#include "diagdata.h"
+
+#define NO_CHANNEL_NOISE 0
+#define YES_CHANNEL_NOISE 1
+
+#pragma DATA_SECTION(loopBackGain, ".extData");
+Int16 loopBackGain = 0x7fff;
+#pragma DATA_SECTION(dbSNR, ".extData");
+Int16 dbSNR = 0x6;
+#pragma DATA_SECTION(sigAttenuation, ".extData");
+Int16 sigAttenuation = 0x0;
+#pragma DATA_SECTION(fadeAttenuation, ".extData");
+Int16 fadeAttenuation = 0x0;
+#pragma DATA_SECTION(multiPathDelay, ".extData");
+Int16 multiPathDelay = 0x0;
+#pragma DATA_SECTION(phaseJitter, ".extData");
+Int16 phaseJitter = 0x0;
+
+#pragma DATA_SECTION(chanNoiseSwitch, ".extData");
+Int16 chanNoiseSwitch = NO_CHANNEL_NOISE;
+
+#pragma DATA_SECTION(totalSamples, ".extData");
+Int32 totalSamples=0;
+#pragma DATA_SECTION(totalBursts, ".extData");
+Int32 totalBursts=0;
+#pragma DATA_SECTION(demodErrs, ".extData");
+Int32 demodErrs=0 ;
+#pragma DATA_SECTION(massiveDemodHit, ".extData");
+Int32 massiveDemodHit=0;
+#pragma DATA_SECTION(snrtbl, ".extData");
+Int16 snrtbl[32] =
+{ 26,25,24,23,20,18,16,14,12,11,10,9,8,7,6,6,5,4,4,3,3,2,2,2,2,
+ 1,1,1,1,1,1,1};
+#pragma DATA_SECTION(cosines, ".extData");
+Int16 cosines[32] =
+{ 32767,32763,32748,32723,32688,32643,32588,32524,32449,
+ 32365,32270,32166,32052,31928,31795,31651,31499,31336,31164,30983,
+ 30792,30592,30382,30163,29935,29698,29451,29197,28932,28660,
+ 28378,28088};
+#pragma DATA_SECTION(sines, ".extData");
+Int16 sines[32] =
+{ 0,572,1144,1715,2286,2856,3425,3993,4560,5126,5690,6252,
+ 6812,7371,7927,8481,9032,9580,10126,10668,11207,11743,12275,12803,
+ 13328,13848,14365,14876,15384,15886,16384,16877};
+
+void channelNoise(t_ULComplexSamp samples[BURST_SIZE_UL_MAX]);
+
+#define interpHalfSize 9 /* note: coeffs are scaled 2^15 */
+Int16 loopInterpFilter[2*interpHalfSize] =
+{ 1, -7, 38, -146, 439, -1115, 2547, -5833, 20459,
+20459, -5833, 2547 -1115, 439, -146, 38, -7, 1 };
+
+/*****************************************************************************
+*
+* Function: mod2DmodLpbk
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void mod2DmodLpbk(void)
+{
+ t_ULComplexSamp loopbackBurst[157];
+ t_DLComplexSamp *modSample;
+ t_DLComplexSamp *dmodSample;
+ Int16 i;
+ Uint32 *sample;
+ Int16 temp;
+
+ modSample = g_BBInfo[0].dlBBSmpl;
+ sample = (Uint32*)modSample;
+
+ dlBurstProcIsr();
+
+ for(i=0; i<154; i++)
+ {
+ loopbackBurst[i].I = ( (Int16)(sample[2*(i+4-0)]<<4 & 0xffff) * loopBackGain) >> 15;
+ loopbackBurst[i].Q = ( (Int16)((sample[2*(i+4-0)]<<8)>>16 & 0xffff) * loopBackGain)>>15 ;
+ }
+/* NEW 3/31/99..add channel noise to test equalizer and decoder */
+
+ if(chanNoiseSwitch == YES_CHANNEL_NOISE)
+ channelNoise( loopbackBurst);
+
+ g_BBInfo[0].ulBBSmpl = loopbackBurst;
+ ulBurstProcIsr();
+
+ if(chanNoiseSwitch == YES_CHANNEL_NOISE)
+ {
+ temp = 0;
+ for(i=0;i < NB_NUM_ENCRYPT_BITS_PER_BURST;i++)
+ {
+ temp += ( (g_DLCodedData.data[i] == 0) && (g_ULBurstData.data[i] <= 0 ) );
+ temp += ( (g_DLCodedData.data[i] == 1) && (g_ULBurstData.data[i] >= 0 ) );
+ }
+ if(temp <= 36)
+ {
+ totalBursts++;
+ totalSamples++;
+ demodErrs += temp;
+ }
+ else
+ massiveDemodHit++;
+ }
+}
+
+/*****************************************************************************
+*
+* Function: dlRachProc
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dlRachProc(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ Uint8 rachData = 0x25;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ unpackFromByteBuffer(& rachData,
+ (UChar *)&g_DLCCHData.data[0],
+ NUM_BITS_CCH_FRAME);
+
+ g_DLCCHData.bufferValid = TRUE;
+ chanEncoder(RACH, 1, timeSlot, 0);
+ buildGSMBurst(RACH, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, RACH);
+}
+
+/*****************************************************************************
+*
+* Function: dlGroupVTableLpbkInit
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dlGroupVTableLpbkInit(void)
+{
+ Uint32 *ptr;
+ ptr = ulGroupTableV;
+ *ptr++ = (Uint32 ) & dlFcchProc;
+ *ptr++ = (Uint32 ) & dlSchProc;
+
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc3;
+
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc3;
+
+ *ptr++ = (Uint32 ) & dlFcchProc;
+ *ptr++ = (Uint32 ) & dlSchProc;
+
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc3;
+
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc3;
+
+ *ptr++ = (Uint32 ) & dlFcchProc;
+ *ptr++ = (Uint32 ) & dlSchProc;
+
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc3;
+
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc3;
+
+ *ptr++ = (Uint32 ) & dlFcchProc;
+ *ptr++ = (Uint32 ) & dlSchProc;
+
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc3;
+
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc0;
+ *ptr++ = (Uint32 ) & ulSdcchProc3;
+
+ *ptr++ = (Uint32 ) & dlFcchProc;
+ *ptr++ = (Uint32 ) & dlSchProc;
+
+ *ptr++ = (Uint32 ) & ulSacchProc0;
+ *ptr++ = (Uint32 ) & ulSacchProc0;
+ *ptr++ = (Uint32 ) & ulSacchProc0;
+ *ptr++ = (Uint32 ) & ulSacchProc3;
+
+ *ptr++ = (Uint32 ) & ulSacchProc0;
+ *ptr++ = (Uint32 ) & ulSacchProc0;
+ *ptr++ = (Uint32 ) & ulSacchProc0;
+ *ptr++ = (Uint32 ) & ulSacchProc3;
+
+ *ptr++ = (Uint32 ) & dlIdleProc;
+}
+
+/*****************************************************************************
+*
+* Function: ulGroupVTableLpbkInit
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void ulGroupVTableLpbkInit(void)
+{
+ dlGroupTableV[0] = (Uint32 ) & dlSdcchProc0;
+ dlGroupTableV[1] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableV[2] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableV[3] = (Uint32 ) & dlSdcchProc3;
+
+ dlGroupTableV[4] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[5] = (Uint32 ) & dlRachProc;
+
+ dlGroupTableV[6] = (Uint32 ) & dlSacchProc0;
+ dlGroupTableV[7] = (Uint32 ) & dlSacchProc1;
+ dlGroupTableV[8] = (Uint32 ) & dlSacchProc1;
+ dlGroupTableV[9] = (Uint32 ) & dlSacchProc3;
+
+ dlGroupTableV[10] = (Uint32 ) & dlSacchProc0;
+ dlGroupTableV[11] = (Uint32 ) & dlSacchProc1;
+ dlGroupTableV[12] = (Uint32 ) & dlSacchProc1;
+ dlGroupTableV[13] = (Uint32 ) & dlSacchProc3;
+
+ dlGroupTableV[14] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[15] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[16] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[17] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[18] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[19] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[20] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[21] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[22] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[23] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[24] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[25] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[26] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[27] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[28] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[29] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[30] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[31] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[32] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[33] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[34] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[35] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[36] = (Uint32 ) & dlRachProc;
+
+ dlGroupTableV[37] = (Uint32 ) & dlSdcchProc0;
+ dlGroupTableV[38] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableV[39] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableV[40] = (Uint32 ) & dlSdcchProc3;
+
+ dlGroupTableV[41] = (Uint32 ) & dlSdcchProc0;
+ dlGroupTableV[42] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableV[43] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableV[44] = (Uint32 ) & dlSdcchProc3;
+
+ dlGroupTableV[45] = (Uint32 ) & dlRachProc;
+ dlGroupTableV[46] = (Uint32 ) & dlRachProc;
+
+ dlGroupTableV[47] = (Uint32 ) & dlSdcchProc0;
+ dlGroupTableV[48] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableV[49] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableV[50] = (Uint32 ) & dlSdcchProc3;
+}
+
+/*****************************************************************************
+*
+* Function: ulGroupVIITableLpbkInit
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void ulGroupVIITableLpbkInit(void)
+{
+ dlGroupTableVII[0] = (Uint32 ) & dlSacchProc0;
+ dlGroupTableVII[1] = (Uint32 ) & dlSacchProc1;
+ dlGroupTableVII[2] = (Uint32 ) & dlSacchProc1;
+ dlGroupTableVII[3] = (Uint32 ) & dlSacchProc3;
+
+ dlGroupTableVII[4] = (Uint32 ) & dlSacchProc0;
+ dlGroupTableVII[5] = (Uint32 ) & dlSacchProc1;
+ dlGroupTableVII[6] = (Uint32 ) & dlSacchProc1;
+ dlGroupTableVII[7] = (Uint32 ) & dlSacchProc3;
+
+ dlGroupTableVII[8] = (Uint32 ) & dlSacchProc0;
+ dlGroupTableVII[9] = (Uint32 ) & dlSacchProc1;
+ dlGroupTableVII[10] = (Uint32 ) & dlSacchProc1;
+ dlGroupTableVII[11] = (Uint32 ) & dlSacchProc3;
+
+ dlGroupTableVII[12] = (Uint32 ) & dlIdleProc;
+ dlGroupTableVII[13] = (Uint32 ) & dlIdleProc;
+ dlGroupTableVII[14] = (Uint32 ) & dlIdleProc;
+
+
+ dlGroupTableVII[15] = (Uint32 ) & dlSdcchProc0;
+ dlGroupTableVII[16] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableVII[17] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableVII[18] = (Uint32 ) & dlSdcchProc3;
+
+
+ dlGroupTableVII[19] = (Uint32 ) & dlSdcchProc0;
+ dlGroupTableVII[20] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableVII[21] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableVII[22] = (Uint32 ) & dlSdcchProc3;
+
+ dlGroupTableVII[23] = (Uint32 ) & dlSdcchProc0;
+ dlGroupTableVII[24] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableVII[25] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableVII[26] = (Uint32 ) & dlSdcchProc3;
+
+
+ dlGroupTableVII[27] = (Uint32 ) & dlSdcchProc0;
+ dlGroupTableVII[28] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableVII[29] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableVII[30] = (Uint32 ) & dlSdcchProc3;
+
+
+ dlGroupTableVII[31] = (Uint32 ) & dlSdcchProc0;
+ dlGroupTableVII[32] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableVII[33] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableVII[34] = (Uint32 ) & dlSdcchProc3;
+
+ dlGroupTableVII[35] = (Uint32 ) & dlSdcchProc0;
+ dlGroupTableVII[36] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableVII[37] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableVII[38] = (Uint32 ) & dlSdcchProc3;
+
+ dlGroupTableVII[39] = (Uint32 ) & dlSdcchProc0;
+ dlGroupTableVII[40] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableVII[41] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableVII[42] = (Uint32 ) & dlSdcchProc3;
+
+ dlGroupTableVII[43] = (Uint32 ) & dlSdcchProc0;
+ dlGroupTableVII[44] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableVII[45] = (Uint32 ) & dlSdcchProc3;
+ dlGroupTableVII[46] = (Uint32 ) & dlSdcchProc3;
+
+ dlGroupTableVII[47] = (Uint32 ) & dlSacchProc0;
+ dlGroupTableVII[48] = (Uint32 ) & dlSacchProc1;
+ dlGroupTableVII[49] = (Uint32 ) & dlSacchProc1;
+ dlGroupTableVII[50] = (Uint32 ) & dlSacchProc3;
+
+
+}
+
+/*****************************************************************************
+*
+* Function: lpbkDlGroupV
+*
+* Description:
+* Loop back downlink Group V frames to uplink, which receives frames as
+* 51-frame multiframe
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void lpbkDlGroupV(void)
+{
+ dlGroupVTableLpbkInit();
+}
+
+/*****************************************************************************
+*
+* Function: lpbkULGroupV
+*
+* Description:
+* Send downlink frames as uplink 51-frame multiframe
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void lpbkULGroupV(void)
+{
+ ulGroupVTableLpbkInit();
+}
+
+/*****************************************************************************
+*
+* Function: compLpbkBuf
+*
+* Description:
+*
+* Inputs:
+* inBuf ptr to I/Q sample pairs directly from AD7002
+*
+* Outputs:
+* outBuf prt to 24-bit packed samples for DAC
+*
+******************************************************************************/
+void compLpbkBuf(Uint32 *inBuf, Uint32 *outBuf)
+{
+ Uint16 i, k, m, ioffset, scale;
+ Int32 ival, qval;
+ Uint32 power;
+ t_DLComplexSamp* s = (t_DLComplexSamp*)inBuf;
+
+ /*---------------------------------------------------------
+ * Compute first interpHalfSize output sample pairs
+ *--------------------------------------------------------*/
+ for(i=0; i<interpHalfSize; i++)
+ {
+ /*-------------------------------------------------------
+ * Even output sample: Copy input with 4-bit downshift
+ *------------------------------------------------------*/
+ outBuf[2*i] = (inBuf[i] >> 4) & 0x0fff;
+ outBuf[2*i] |= (inBuf[i] >> 8) & 0x00fff000;
+
+ /*-------------------------------------------------------
+ * Odd output sample: Interpolate and copy with 19-bit
+ * shift (15-bit coef scaling plus 4-bit input shift)
+ *------------------------------------------------------*/
+ ival = qval = 0;
+ for ( k=(interpHalfSize - 1 - i),m=0; k<2*interpHalfSize; k++,m++ )
+ {
+ ival += loopInterpFilter[k] * s[m].I;
+ qval += loopInterpFilter[k] * s[m].Q;
+ }
+ ival >>= 19;
+ qval >>= 19;
+ outBuf[2*i+1] = ival & 0x0fff;
+ outBuf[2*i+1] |= (qval<<12) & 0x00fff000;
+ }
+
+ /*---------------------------------------------------------
+ * Compute next 2*(156-2*interpHalfSize) output pairs
+ *--------------------------------------------------------*/
+ for(i=interpHalfSize; i<156-interpHalfSize; i++)
+ {
+ /*-------------------------------------------------------
+ * Even output sample: Copy input with 4-bit downshift
+ *------------------------------------------------------*/
+ outBuf[2*i] = (inBuf[i] >> 4) & 0x0fff;
+ outBuf[2*i] |= (inBuf[i] >> 8) & 0x00fff000;
+
+ /*-------------------------------------------------------
+ * Odd output sample: Interpolate and copy with shift
+ *------------------------------------------------------*/
+ ival = qval = 0;
+ for (k=0; k<interpHalfSize; k++ )
+ {
+ ival += loopInterpFilter[interpHalfSize+k] * (s[i-k].I + s[i+k+1].I);
+ qval += loopInterpFilter[interpHalfSize+k] * (s[i-k].Q + s[i+k+1].Q);
+ }
+ ival >>= 19;
+ qval >>= 19;
+ outBuf[2*i+1] = ival & 0x0fff;
+ outBuf[2*i+1] |= (qval<<12) & 0x00fff000;
+ }
+
+ /*---------------------------------------------------------
+ * Compute last interpHalfSize output sample pairs
+ *--------------------------------------------------------*/
+ for(i=0; i<interpHalfSize; i++)
+ {
+ /*-------------------------------------------------------
+ * Even output sample: Copy input with 4-bit downshift
+ *------------------------------------------------------*/
+ ioffset = i + 156 - interpHalfSize;
+ outBuf[2*ioffset] = (inBuf[ioffset] >> 4) & 0x0fff;
+ outBuf[2*ioffset] |= (inBuf[ioffset] >> 8) & 0x00fff000;
+
+ /*-------------------------------------------------------
+ * Odd output sample: Interpolate and copy with shift
+ *------------------------------------------------------*/
+ ival = qval = 0;
+ for ( k=0,m=ioffset-interpHalfSize+1; m<156; k++,m++ )
+ {
+ ival += loopInterpFilter[k] * s[m].I;
+ qval += loopInterpFilter[k] * s[m].Q;
+ }
+ ival >>= 19;
+ qval >>= 19;
+ outBuf[2*ioffset+1] = ival & 0x0fff;
+ outBuf[2*ioffset+1] |= (qval<<12) & 0x00fff000;
+ }
+}
+
+/*****************************************************************************
+*
+* Function: channelNoise
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void channelNoise( t_ULComplexSamp samples[BURST_SIZE_UL_MAX] )
+{
+ int j,k,mask,shifter;
+ Int16 aterm,bterm,sterm,cterm;
+
+/* Multi_Path signal delayed by 1,2,3,or 4 samples */
+ if(multiPathDelay > 0)
+ {
+ for ( j = BURST_SIZE_UL_MAX - 1; j >= 2; j--)
+ {
+ samples[j].I = (samples[j].I >> 1) + (samples[j-multiPathDelay].I >> 2) ;
+ samples[j].Q = (samples[j].Q >> 1) + (samples[j-multiPathDelay].Q >> 2) ;
+ }
+ }
+ /* AWGN Simulator..random Number Generator...+ and - numbers */
+
+ if(dbSNR > 0)
+ {
+ if(dbSNR <= 30)
+ shifter = snrtbl[dbSNR];
+ else
+ shifter = 1;
+
+ for ( j = 0; j < BURST_SIZE_UL_MAX; j++)
+ {
+ k = rand() >> 6;
+ if((k & 1) == 1)
+ k = -1 * k;
+ samples[j].I = (samples[j].I >> 1) + (shifter * k);
+ k = rand() >> 6;
+ if((k & 1) == 1)
+ k = -1 * k;
+ samples[j].Q = (samples[j].Q >> 1) + (shifter * k);
+ }
+ }
+ /* Random Phase Error Generator...+ and - numbers */
+ if(phaseJitter > 0)
+ {
+ for ( j = 0; j < BURST_SIZE_UL_MAX; j++)
+ {
+
+ mask = rand() & 0x3f;
+ k = mask & 0x1f;
+ cterm = cosines[k];
+ if((mask & 0x20) == 0)
+ sterm = sines[k];
+ else
+ sterm = -1 * sines[k];
+ aterm = (Int32) ( samples[j].I * cterm) >> 15;
+ bterm = (Int32) ( samples[j].Q * sterm) >> 15;
+ samples[j].I = (Int32) (aterm - bterm) >> 1;
+/* samples[j].I = (samples[j].I >> 6); */
+ aterm = (Int32) ( samples[j].Q * cterm) >> 15;
+ bterm = (Int32) ( samples[j].I * sterm) >> 15;
+ samples[j].Q = (Int32) (aterm + bterm) >> 1;
+/* samples[j].Q = (samples[j].Q >> 6); */
+ }
+ }
+
+/* signal+noise attenuation model...increments of 6db from 15bit fullscale*/
+ if(sigAttenuation > 4)
+ {
+ shifter = (sigAttenuation+2) / 6;
+ if((totalBursts & 1) == 1)
+ shifter -= fadeAttenuation;
+
+ for ( j = 0; j < BURST_SIZE_UL_MAX; j++)
+ {
+ samples[j].I = (samples[j].I >> shifter) ;
+ samples[j].Q = (samples[j].Q >> shifter);
+ }
+ }
+
+}
diff --git a/data/mnet/GP10/Dsp/Driver/EMIF.H b/data/mnet/GP10/Dsp/Driver/EMIF.H
new file mode 100644
index 0000000..6f245e2
--- /dev/null
+++ b/data/mnet/GP10/Dsp/Driver/EMIF.H
@@ -0,0 +1,191 @@
+/******************************************************************************/
+/* EMIF.H - TMS320C6x Peripheral Support Library EMIF Support */
+/* */
+/* This file provides the header for the DSP's EMIF support. */
+/* */
+/* MACRO FUNCTIONS: */
+/* SDRAM_REFRESH_ENABLE() - Enable SDRAM refresh cycles */
+/* SDRAM_REFRESH_DISABLE() - Disable SDRAM refresh cycles */
+/* SDRAM_REFRESH_PERIOD() - Assigns refresh period for SDRAM */
+/* SDRAM_INIT() - Perform initialization sequence for SDRAM */
+/* EMIF_GET_MAP_MODE() - Return value of MAP bit in EMIF global ctrl */
+/* */
+/* FUNCTIONS: */
+/* emif_init() - Sets all EMIF registers to parameter values */
+/* */
+/* DATE DESCRIPTION */
+/* ------- ------------------------------------------------------------- */
+/* 22May00 Changed #if _INLINE to #iddef _INLINE */
+/* -----> Test whether _INLINE is defined, not its value. */
+/* */
+/* 11MAY98 Removed #define TA and #define TA_SZ */
+/* -----> TA is no longer supported. */
+/* */
+/* 11MAY98 Removed #define CLK2INV and #define SDCINV */
+/* -----> These bitfields are no longer supported. */
+/* */
+/* 11MAY98 Changed "LOAD_FIELD(EMIF_SDRAM_REF_ADDR, val)" */
+/* to "LOAD_FIELD(EMIF_SDRAM_REF_ADDR, val, PERIOD,PERIOD_SZ)"*/
+/* -----> Fields were left out of the LOAD_FIELD macro call */
+/* */
+/* 11MAY98 Changed "#define WRTIE_STROBE_SZ" */
+/* to "#define WRITE_STROBE_SZ" */
+/* -----> Misspelling */
+/* */
+/******************************************************************************/
+#ifndef _EMIF_H_
+#define _EMIF_H_
+
+#include "regs.h" /* EMIF Register Addresses and bitfield definitions */
+
+#ifdef _INLINE
+#define __INLINE static inline
+#else
+#define __INLINE
+#endif
+
+/******************************************************************************/
+/****************************** EMIF REGISTERS ********************************/
+
+#define EMIF_GCTRL_ADDR 0x01800000
+#define EMIF_CE0_CTRL_ADDR 0x01800008
+#define EMIF_CE1_CTRL_ADDR 0x01800004
+#define EMIF_CE2_CTRL_ADDR 0x01800010
+#define EMIF_CE3_CTRL_ADDR 0x01800014
+#define EMIF_SDRAM_CTRL_ADDR 0x01800018
+#define EMIF_SDRAM_REF_ADDR 0x0180001C
+
+#define EMIF_GCTRL (*(volatile unsigned int *)EMIF_GCTRL_ADDR)
+#define EMIF_CE0_CTRL (*(volatile unsigned int *)EMIF_CE0_CTRL_ADDR)
+#define EMIF_CE1_CTRL (*(volatile unsigned int *)EMIF_CE1_CTRL_ADDR)
+#define EMIF_CE2_CTRL (*(volatile unsigned int *)EMIF_CE2_CTRL_ADDR)
+#define EMIF_CE3_CTRL (*(volatile unsigned int *)EMIF_CE3_CTRL_ADDR)
+#define EMIF_SDRAM_CTRL (*(volatile unsigned int *)EMIF_SDRAM_CTRL_ADDR)
+#define EMIF_SDRAM_REF (*(volatile unsigned int *)EMIF_SDRAM_REF_ADDR)
+
+/* EMIF Global Control Register Bits */
+#define MAP 0
+#define RBTR8 1
+#define SSCRT 2
+#define CLK2EN 3
+#define CLK1EN 4
+#define SSCEN 5
+#define SDCEN 6
+#define NOHOLD 7
+#define HOLDA 8
+#define HOLD 9
+#define ARDY 10
+
+/* EMIF CE0/1/2/3 Control Register Bits */
+#define READ_HOLD 0
+#define READ_HOLD_SZ 2
+
+#define MTYPE 4
+#define MTYPE_SZ 3
+
+#define READ_STROBE 8
+#define READ_STROBE_SZ 6
+
+#define READ_SETUP 16
+#define READ_SETUP_SZ 4
+
+#define WRITE_HOLD 20
+#define WRITE_HOLD_SZ 2
+
+#define WRITE_STROBE 22
+#define WRITE_STROBE_SZ 6
+
+#define WRITE_SETUP 28
+#define WRITE_SETUP_SZ 4
+
+
+/* EMIF SDRAM Control Register Bits */
+#define TRC 12
+#define TRC_SZ 4
+
+#define TRP 16
+#define TRP_SZ 4
+
+#define TRCD 20
+#define TRCD_SZ 4
+
+#define INIT 24
+
+#define RFEN 25
+
+#define SDWID 26
+
+
+/* EMIF SDRAM Timing Register Bits */
+
+#define PERIOD 0
+#define PERIOD_SZ 12
+
+#define COUNTER 12
+#define COUNTER_SZ 12
+
+
+/* EMIF Global Control Register Bitfield Values */
+
+/* EMIF CE Space Control Register Bitfield Values */
+#define MTYPE_8ROM 0x00 /* 8 bit wide ROM */
+#define MTYPE_16ROM 0x01 /* 16 bit wide ROM */
+#define MTYPE_32ASYNC 0x02 /* 32 bit asynchronous interface */
+#define MTYPE_32SDRAM 0x03 /* 32 bit SDRAM */
+#define MTYPE_32SBSRAM 0x04 /* 32 bit SBSRAM */
+
+/*---------------------------------------------------------------------------*/
+/* MACRO FUNCTIONS */
+/*---------------------------------------------------------------------------*/
+
+#define SDRAM_REFRESH_ENABLE() \
+ SET_BIT(EMIF_SDRAM_CTRL_ADDR,RFEN)
+
+#define SDRAM_REFRESH_DISABLE() \
+ RESET_BIT(EMIF_SDRAM_CTRL_ADDR,RFEN)
+
+#define SDRAM_REFRESH_PERIOD(val) \
+ LOAD_FIELD(EMIF_SDRAM_REF_ADDR,val,PERIOD,PERIOD_SZ)
+
+#define SDRAM_INIT() \
+ SET_BIT(EMIF_SDRAM_CTRL_ADDR,INIT)
+
+#define EMIF_GET_MAP_MODE() \
+ GET_BIT(EMIF_GCTRL_ADDR,MAP)
+
+__INLINE
+void emif_init(unsigned int g_ctrl,
+ unsigned int ce0_ctrl,
+ unsigned int ce1_ctrl,
+ unsigned int ce2_ctrl,
+ unsigned int ce3_ctrl,
+ unsigned int sdram_ctrl,
+ unsigned int sdram_refresh
+ );
+
+#ifdef _INLINE
+__INLINE
+void emif_init(unsigned int g_ctrl,
+ unsigned int ce0_ctrl,
+ unsigned int ce1_ctrl,
+ unsigned int ce2_ctrl,
+ unsigned int ce3_ctrl,
+ unsigned int sdram_ctrl,
+ unsigned int sdram_refresh
+ )
+{
+ REG_WRITE(EMIF_GCTRL_ADDR, g_ctrl);
+ REG_WRITE(EMIF_CE0_CTRL_ADDR, ce0_ctrl);
+ REG_WRITE(EMIF_CE1_CTRL_ADDR, ce1_ctrl);
+ REG_WRITE(EMIF_CE2_CTRL_ADDR, ce2_ctrl);
+ REG_WRITE(EMIF_CE3_CTRL_ADDR, ce3_ctrl);
+ REG_WRITE(EMIF_SDRAM_CTRL_ADDR, sdram_ctrl);
+ REG_WRITE(EMIF_SDRAM_REF_ADDR, sdram_refresh);
+}
+#endif /* _INLINE */
+
+#ifdef __INLINE
+#undef __INLINE
+#endif
+
+#endif /* _EMIF_H_ */
diff --git a/data/mnet/GP10/Dsp/Driver/Makefile b/data/mnet/GP10/Dsp/Driver/Makefile
new file mode 100644
index 0000000..d4544ba
--- /dev/null
+++ b/data/mnet/GP10/Dsp/Driver/Makefile
@@ -0,0 +1,23 @@
+#****************************************************************************
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#****************************************************************************
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+include ../dsp.mk
+
+SOURCE_LIST = Drv6x.c
+
+OBJ_LIST = $(SOURCE_LIST:.c=.obj)
+MODULE_OBJS = $(foreach file, $(OBJ_LIST), $(OBJDIR)/$(file))
+
+all: $(MODULE_OBJS)
+
+# rule for C++ compiles
+$(OBJDIR)/%.obj : %.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
diff --git a/data/mnet/GP10/Dsp/Driver/TIMER.H b/data/mnet/GP10/Dsp/Driver/TIMER.H
new file mode 100644
index 0000000..3cba7db
--- /dev/null
+++ b/data/mnet/GP10/Dsp/Driver/TIMER.H
@@ -0,0 +1,247 @@
+/******************************************************************************/
+/* TIMER.H - TMS320C6x Peripheral Support Library Timers Support */
+/* */
+/* This file provides the header for the DSP's timers support. */
+/* */
+/* */
+/* MACRO FUNCTIONS: */
+/* TIMER_CTRL_ADDR(chan) */
+/* TIMER_PERIOD_ADDR(chan) */
+/* TIMER_COUNTER_ADDR(chan) */
+/* TIMER_RESET(chan) */
+/* TIMER_INIT(chan,ctrl,per,cnt) */
+/* TIMER_START(chan) */
+/* TIMER_STOP(chan) */
+/* TIMER_RESUME(chan) */
+/* TIMER_MODE_SELECT(chan,mode) */
+/* TIMER_CLK_INTERNAL(chan) */
+/* TIMER_CLK_EXTERNAL(chan) */
+/* TOUT_ENABLE(chan) */
+/* TOUT_DISABLE(chan) */
+/* TOUT_VAL(chan,val) */
+/* TOUT_ASSERT(chan) */
+/* TOUT_NEGATE(chan) */
+/* TINP_GET(chan) */
+/* TIMER_READ(chan) */
+/* TIMER_GET_COUNT(chan) */
+/* TIMER_SET_COUNT(chan,val) */
+/* TIMER_AVAILABLE(chan) */
+/* TIMER_SET_PERIOD(chan,val) */
+/* TIMER_GET_PERIOD(chan) */
+/* TIMER_GET_TSTAT(chan) */
+/* */
+/* */
+/* FUNCTIONS: */
+/* timer_delay() - delay specified number of timer periods */
+/* */
+/******************************************************************************/
+#ifndef _TIMER_H_
+#define _TIMER_H_
+
+/*----------------------------------------------------------------------------*/
+/* INCLUDES */
+/*----------------------------------------------------------------------------*/
+#include "regs.h"
+
+/*----------------------------------------------------------------------------*/
+/* DEFINES AND MACROS */
+/*----------------------------------------------------------------------------*/
+
+/******************************************************************************/
+/**************************** TIMER REGISTERS *********************************/
+
+#define TIMER_BASE_ADDR 0x01940000
+
+#define TIMER_CTRL_ADDR(chan) \
+ (TIMER_BASE_ADDR + ((chan) * 0x40000))
+
+#define TIMER_PERIOD_ADDR(chan) \
+ (TIMER_BASE_ADDR + ((chan) * 0x40000) + 4)
+
+#define TIMER_COUNTER_ADDR(chan) \
+ (TIMER_BASE_ADDR + ((chan) * 0x40000) + 8)
+
+#define TIMER0_CTRL_ADDR TIMER_CTRL_ADDR(0)
+#define TIMER0_PERIOD_ADDR TIMER_PERIOD_ADDR(0)
+#define TIMER0_COUNTER_ADDR TIMER_COUNTER_ADDR(0)
+
+#define TIMER1_CTRL_ADDR TIMER_CTRL_ADDR(1)
+#define TIMER1_PERIOD_ADDR TIMER_PERIOD_ADDR(1)
+#define TIMER1_COUNTER_ADDR TIMER_COUNTER_ADDR(1)
+
+#define TIMER0_CTRL *(volatile unsigned int *)(TIMER0_CTRL_ADDR)
+#define TIMER0_PERIOD *(volatile unsigned int *)(TIMER0_PERIOD_ADDR)
+#define TIMER0_COUNTER *(volatile unsigned int *)(TIMER0_COUNTER_ADDR)
+
+#define TIMER1_CTRL *(volatile unsigned int *)(TIMER1_CTRL_ADDR)
+#define TIMER1_PERIOD *(volatile unsigned int *)(TIMER1_PERIOD_ADDR)
+#define TIMER1_COUNTER *(volatile unsigned int *)(TIMER1_COUNTER_ADDR)
+
+/* Timer Control Register Bitfield */
+#define FUNC 0
+#define INVOUT 1
+#define DATOUT 2
+#define DATIN 3
+#define PWID 4
+#define GO 6
+#define HLD 7
+#define C_P 8
+#define CLKSRC 9
+#define INVINP 10
+#define TSTAT 11
+
+#define TIMER_PULSE_MODE 0
+#define TIMER_CLOCK_MODE 1
+
+/*---------------------------------------------------------------------------*/
+/* TIMER_RESET - reset timer to conditions defined by device reset */
+/*---------------------------------------------------------------------------*/
+#define TIMER_RESET(chan) \
+ { (*(unsigned int *)(TIMER_CTRL_ADDR(chan)) = 0); \
+ (*(unsigned int *)(TIMER_PERIOD_ADDR(chan)) = 0); \
+ (*(unsigned int *)(TIMER_COUNTER_ADDR(chan)) = 0); \
+ }
+
+/*---------------------------------------------------------------------------*/
+/* TIMER_INIT - initialize timer registers */
+/*---------------------------------------------------------------------------*/
+#define TIMER_INIT(chan,ctrl,per,cnt) \
+ { (*(unsigned int *)(TIMER_CTRL_ADDR(chan)) = ctrl); \
+ (*(unsigned int *)(TIMER_PERIOD_ADDR(chan)) = per); \
+ (*(unsigned int *)(TIMER_COUNTER_ADDR(chan)) = cnt); \
+ }
+
+/*---------------------------------------------------------------------------*/
+/* TIMER_START - Sets both GO and HOLD bits in Timer Control Register which */
+/* resets the Timer Counter Register and enables counting on */
+/* on the next clock. (GO bit autoclears) */
+/*---------------------------------------------------------------------------*/
+#define TIMER_START(chan) \
+ REG_WRITE(TIMER_CTRL_ADDR(chan),(REG_READ(TIMER_CTRL_ADDR(chan)) | 0xc0))
+
+/*---------------------------------------------------------------------------*/
+/* TIMER_STOP - Asserts (clears) the HOLD bit in the Timer Control Register */
+/*---------------------------------------------------------------------------*/
+#define TIMER_STOP(chan) \
+ RESET_BIT(TIMER_CTRL_ADDR(chan),HLD)
+
+/*---------------------------------------------------------------------------*/
+/* TIMER_RESUME - Negates (sets) the HOLD bit to resume counting without */
+/* resetting the counter register */
+/*---------------------------------------------------------------------------*/
+#define TIMER_RESUME(chan) \
+ SET_BIT(TIMER_CTRL_ADDR(chan),HLD)
+
+/*---------------------------------------------------------------------------*/
+/* TIMER_MODE_SELECT - selects between PULSE and CLOCK modes */
+/*---------------------------------------------------------------------------*/
+#define TIMER_MODE_SELECT(chan,mode) \
+ (mode == TIMER_CLOCK_MODE) ? SET_BIT(TIMER_CTRL_ADDR(chan),C_P) \
+ : RESET_BIT(TIMER_CTRL_ADDR(chan),C_P)
+
+/*---------------------------------------------------------------------------*/
+/* TIMER_CLK_INTERNAL - sets CLKSRC to select CPU clock/4 as timer clock */
+/*---------------------------------------------------------------------------*/
+#define TIMER_CLK_INTERNAL(chan) \
+ SET_BIT(TIMER_CTRL_ADDR(chan),CLKSRC)
+
+/*---------------------------------------------------------------------------*/
+/* TIMER_CLK_EXTERNAL - clears CLKSRC to select TINP as timer clock */
+/*---------------------------------------------------------------------------*/
+#define TIMER_CLK_EXTERNAL(chan) \
+ RESET_BIT(TIMER_CTRL_ADDR(chan),CLKSRC)
+
+/*---------------------------------------------------------------------------*/
+/* TOUT_ENABLE - configures TOUT as general purpose output pin. */
+/* */
+/*---------------------------------------------------------------------------*/
+#define TOUT_ENABLE(chan) \
+ RESET_BIT(TIMER_CTRL_ADDR(chan),FUNC)
+
+/*---------------------------------------------------------------------------*/
+/* TOUT_DISABLE - configures TOUT as a timer pin; reflects value of TSTAT */
+/* conditioned by INVOUT */
+/*---------------------------------------------------------------------------*/
+#define TOUT_DISABLE(chan) \
+ SET_BIT(TIMER_CTRL_ADDR(chan),FUNC)
+
+/*---------------------------------------------------------------------------*/
+/* TOUT_VAL - assigns val to TOUT pin when TOUT is enabled as general purpose*/
+/* output */
+/*---------------------------------------------------------------------------*/
+#define TOUT_VAL(chan,val) \
+ ASSIGN_BIT_VAL(TIMER_CTRL_ADDR(chan),DATOUT,val)
+
+/*---------------------------------------------------------------------------*/
+/* TOUT_ASSERT - assigns 1 to TOUT pin when TOUT is enabled as general */
+/* purpose output */
+/*---------------------------------------------------------------------------*/
+#define TOUT_ASSERT(chan) \
+ SET_BIT(TIMER_CTRL_ADDR(chan),DATOUT)
+
+/*---------------------------------------------------------------------------*/
+/* TOUT_NEGATE - assigns 0 to TOUT pin when TOUT is enabled as general */
+/* purpose output */
+/*---------------------------------------------------------------------------*/
+#define TOUT_NEGATE(chan) \
+ RESET_BIT(TIMER_CTRL_ADDR(chan),DATOUT)
+
+/*---------------------------------------------------------------------------*/
+/* TINP_GET - returns value on TINP input pin */
+/*---------------------------------------------------------------------------*/
+#define TINP_GET(chan) \
+ GET_BIT(TIMER_CTRL_ADDR(chan),DATIN)
+
+/*---------------------------------------------------------------------------*/
+/* TIMER_READ - reads value of Timer Counter Register */
+/*---------------------------------------------------------------------------*/
+#define TIMER_READ(chan) \
+ (REG_READ(TIMER_COUNTER_ADDR(chan)))
+
+/*---------------------------------------------------------------------------*/
+/* TIMER_GET_COUNT - reads value of Timer Counter Register */
+/*---------------------------------------------------------------------------*/
+#define TIMER_GET_COUNT(chan) \
+ (REG_READ(TIMER_COUNTER_ADDR(chan)))
+
+/*---------------------------------------------------------------------------*/
+/* TIMER_SET_COUNT - reads value of Timer Counter Register */
+/*---------------------------------------------------------------------------*/
+#define TIMER_SET_COUNT(chan,val) \
+ (REG_WRITE(TIMER_COUNTER_ADDR(chan),val))
+
+/*---------------------------------------------------------------------------*/
+/* TIMER_AVAILABLE - checks timer for availability; returns TRUE or FALSE */
+/*---------------------------------------------------------------------------*/
+#define TIMER_AVAILABLE(chan) \
+ (GET_BIT(TIMER_CTRL_ADDR(chan),HLD) ? 0 : 1)
+
+/*---------------------------------------------------------------------------*/
+/* TIMER_SET_PERIOD - sets value of Timer Period Register */
+/*---------------------------------------------------------------------------*/
+#define TIMER_SET_PERIOD(chan,val) \
+ (REG_WRITE(TIMER_PERIOD_ADDR(chan),val))
+
+/*---------------------------------------------------------------------------*/
+/* TIMER_GET_PERIOD - returns value of Timer Period Register */
+/*---------------------------------------------------------------------------*/
+#define TIMER_GET_PERIOD(chan) \
+ (REG_READ(TIMER_PERIOD_ADDR(chan)))
+
+/*---------------------------------------------------------------------------*/
+/* TIMER_GET_TSTAT - returns value of TSTAT bit in Timer Ctrl Register */
+/*---------------------------------------------------------------------------*/
+#define TIMER_GET_TSTAT(chan) \
+ (GET_BIT(TIMER_CTRL_ADDR(chan),TSTAT))
+
+/*----------------------------------------------------------------------------*/
+/* GLOBAL VARIABLES */
+/*----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------*/
+/* FUNCTIONS */
+/*----------------------------------------------------------------------------*/
+
+int timer_delay(short num_timer_periods);
+
+#endif /* ifndef _TIMER_H_ */
diff --git a/data/mnet/GP10/Dsp/Makefile b/data/mnet/GP10/Dsp/Makefile
new file mode 100644
index 0000000..ace6397
--- /dev/null
+++ b/data/mnet/GP10/Dsp/Makefile
@@ -0,0 +1,52 @@
+#****************************************************************************
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#****************************************************************************
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..
+
+SUBDIRS = asynchctrl bbdataproc Diags peripherals synchctrl shared driver
+ENCR_BIN = bin
+
+OBJSUF = .obj
+include $(TOP_OF_VOB)\l3defs.mk
+include ./dsp.mk
+
+ENCR_A52ONLY = bin\encrypt_a52only
+ENCR_A51A52 = bin\encrypt_a51a52
+
+MY_OUTPUT = $(ENCR_A52ONLY)/Dsp \
+ $(ENCR_A51A52)/Dsp
+
+all: $(SUBDIRS) $(ENCR_A52ONLY)/Dsp$(OUTSUF) \
+ $(ENCR_A51A52)/Dsp$(OUTSUF)
+
+#------ Link with A52 encryption only
+$(ENCR_A52ONLY)/Dsp$(OUTSUF): $(wildcard bin/*.obj)
+ $(CP) .\encryptA52only.obj .\encryptsubs.obj
+ $(DSPLKV2) -h -m $(ENCR_A52ONLY)/Dsp.map -heap 0x2000 -stack 0x1E00 -c -o \
+ $@ -x -L$(C6XDIRV2)/LIB btsdsp.cmd
+ $(CP) $(ENCR_A52ONLY)\Dsp$(OUTSUF) bin\Dsp$(OUTSUF)
+ $(CP) $(ENCR_A52ONLY)\Dsp.map bin\Dsp.map
+
+#------ Link with A51 and A52 encryption
+$(ENCR_A51A52)/Dsp$(OUTSUF): $(wildcard bin/*.obj)
+ $(CP) .\encryptA51A52.obj .\encryptsubs.obj
+ $(DSPLKV2) -h -m $(ENCR_A51A52)/Dsp.map -heap 0x2000 -stack 0x1E00 -c -o \
+ $@ -x -L$(C6XDIRV2)/LIB btsdsp.cmd
+
+copyall:
+ $(CP) .\bin\Dsp$(OUTSUF) $(TOP_OF_VOB)\bin\Dsp_k8$(OUTSUF)
+ $(CP) .\$(ENCR_A52ONLY)\Dsp$(OUTSUF) $(TOP_OF_VOB)\$(ENCR_A52ONLY)\Dsp_k8$(OUTSUF)
+ $(CP) .\$(ENCR_A51A52)\Dsp$(OUTSUF) $(TOP_OF_VOB)\$(ENCR_A51A52)\Dsp_k9$(OUTSUF)
+
+
+cleanall:
+ - @for %f in ($(SUBDIRS)) do \
+ $(MAKE) -C %f cleanall
+ -$(RM) bin\Dsp.* \
+ $(ENCR_A52ONLY)\Dsp.* \
+ $(ENCR_A51A52)\Dsp.* \
+ *.obj
+
diff --git a/data/mnet/GP10/Dsp/asynchctrl/Makefile b/data/mnet/GP10/Dsp/asynchctrl/Makefile
new file mode 100644
index 0000000..e288ff3
--- /dev/null
+++ b/data/mnet/GP10/Dsp/asynchctrl/Makefile
@@ -0,0 +1,24 @@
+#****************************************************************************
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#****************************************************************************
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+include ../dsp.mk
+
+SOURCE_LIST = CCCHMSG.C DCCHMSG.C DIAGMSG.C OAMMSG.C RRMSG.C TCHMSG.C TRXMSG.C PDCHMSG.C
+
+
+OBJ_LIST = $(SOURCE_LIST:.C=.obj)
+MODULE_OBJS = $(foreach file, $(OBJ_LIST), $(OBJDIR)/$(file))
+
+all: $(MODULE_OBJS)
+
+# rule for C++ compiles
+$(OBJDIR)/%.obj : %.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
diff --git a/data/mnet/GP10/Dsp/asynchctrl/ccchmsg.c b/data/mnet/GP10/Dsp/asynchctrl/ccchmsg.c
new file mode 100644
index 0000000..0005a8a
--- /dev/null
+++ b/data/mnet/GP10/Dsp/asynchctrl/ccchmsg.c
@@ -0,0 +1,233 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: ccchmsg.c
+*
+* Description:
+* This file contains functions that handle CCCH messages from Host to DSP.
+*
+* Public Functions:
+* ccchMsgProc
+*
+* Private Functions:
+* none
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "string.h"
+#include "gsmdata.h"
+#include "dsp/dsphmsg.h"
+#include "dsprotyp.h"
+#include "intr.h"
+
+/*****************************************************************************
+*
+* Function: ccchMsgProc
+*
+* Description:
+* Handles CCCH messages from Host to DSP.
+*
+* Inputs:
+* ccchMsg ptr to CCCH message structure
+* ->ccchInfo info substructure containing (what?)
+* ->trx
+* ->typeLoByte
+* ->typeHiByte
+*
+* Outputs:
+* sysInfoBuf fill in
+* bcchInfo ptr to BCCH information structure
+* ->valid indicates whether to send this SysInfo type
+* ->update
+* ->frameNumUpdate
+*
+******************************************************************************/
+ProcResult ccchMsgProc(msgUnionStruc *ccchMsg)
+{
+ t_sysInfoQueue *bcchInfo, *pBcchInfo;
+ t_TNInfo *ts;
+ ProcResult Result;
+
+ Uint8 subCh;
+ Uint8 logCh;
+ Uint16 msgType;
+ Uint8 sysInfoBuf;
+
+
+ /*
+ * find correct time slot
+ */
+ ts = & g_BBInfo[ccchMsg->trx & 0x01].TNInfo[ *(Uint8 *) & (ccchMsg->u.ccchInfo) & 0x7];
+
+ Result = SUCCESS;
+
+ msgType = ccchMsg->typeLoByte | (ccchMsg->typeHiByte<<8);
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_5:
+ switch(msgType)
+ {
+ case BCCH_INFO_REQ:
+ /*
+ * copy the SYS Info update to its correspondent sys info queue
+ */
+ switch(ccchMsg->u.ccchInfo.sysInfoType)
+ {
+
+ case SYS_INFO_8:
+ case SYS_INFO_1:
+ case SYS_INFO_2:
+ case SYS_INFO_3:
+ case SYS_INFO_4:
+ sysInfoBuf = ccchMsg->u.ccchInfo.sysInfoType;
+ break;
+
+ case SYS_INFO_13:
+ sysInfoBuf = TYPE_13;
+ break;
+ default:
+ ReportError(0,0,WRONG_SYS_INFO_TYPE,1, \
+ & ccchMsg->u.ccchInfo.sysInfoType);
+ return(FAILURE);
+ } /* switch sysInfoType */
+
+
+ sendDiagMsg(30, 0, 0, 1, & ccchMsg->u.ccchInfo.sysInfoType);
+
+ bcchInfo = ts->u.group5.bcch.dlSigBuf + sysInfoBuf;
+
+ if(ccchMsg->u.ccchInfo.msgSize == 0)
+ {
+ /*
+ * stop sending this sysInfo type
+ */
+ bcchInfo->valid = 0;
+ }
+ else
+ {
+ if(bcchInfo->state == 0)
+ {
+ memcpy((Uint8 *) & bcchInfo->data[1], \
+ & ccchMsg->u.ccchInfo.sysInfo[0], 23);
+ }
+ else
+ {
+ memcpy((Uint8 *) & bcchInfo->data[0], \
+ & ccchMsg->u.ccchInfo.sysInfo[0], 23);
+ }
+
+ /*
+ * if change is immediate, change active buffer now
+ */
+ if(ccchMsg->u.ccchInfo.startTime.IMM) bcchInfo->state ^= 0x01;
+ else
+ {
+ /*
+ * set sysinfo update frame number
+ */
+ bcchInfo->frameNumUpdate =
+ (ccchMsg->u.ccchInfo.startTime.timeByte0 & 0xf8)>>3 *1326 + /*t1*/
+
+ ((ccchMsg->u.ccchInfo.startTime.timeByte0 & 0x07)<<3 | /*t3*/
+ (ccchMsg->u.ccchInfo.startTime.timeByte1 & 0xE0)>>5) *
+
+ (ccchMsg->u.ccchInfo.startTime.timeByte1 & 0x1F)>>3; /*t2*/
+
+ bcchInfo->update = 1;
+ }
+ /*
+ * start sending this sysInfo type
+ */
+ bcchInfo->valid = 1;
+ }
+
+
+
+ break;
+
+ default:
+ break;
+ } /* switch msgType */
+
+ break;
+
+ case GSM_GROUP_11:
+ {
+ switch (msgType){
+ case BCCH_INFO_REQ:
+ switch(ccchMsg->u.ccchInfo.sysInfoType){
+
+ case PSI_1:
+ sysInfoBuf = PACKET_TYPE_1;
+ break;
+ case PSI_2:
+ sysInfoBuf = PACKET_TYPE_2;
+ break;
+ case PSI_3:
+ sysInfoBuf = PACKET_TYPE_3;
+ break;
+ case PSI_4:
+ sysInfoBuf = PACKET_TYPE_4;
+ break;
+ case PSI_5:
+ sysInfoBuf = PACKET_TYPE_5;
+ break;
+ case PSI_13:
+ sysInfoBuf = PACKET_TYPE_13;
+ break;
+ default:
+ ReportError(0,0,WRONG_SYS_INFO_TYPE,1, \
+ & ccchMsg->u.ccchInfo.sysInfoType);
+ return(FAILURE);
+ break;
+ } /* switch sysinfoType*/
+
+ pBcchInfo = ts->u.group11.pbcch.dlSigBuf + sysInfoBuf;
+
+ if(ccchMsg->u.ccchInfo.msgSize == 0){
+ pBcchInfo->valid = 0; /* indicate an invalid message */
+ } else {
+
+ INTR_GLOBAL_DISABLE();
+ memcpy((Uint8 *) & pBcchInfo->data, \
+ & ccchMsg->u.ccchInfo.sysInfo[0], 23);
+ pBcchInfo->valid = 1; /* Indicate a valid message */
+ INTR_GLOBAL_ENABLE();
+ }
+ default:
+ break;
+
+
+ } /* switch msgType */
+
+
+
+
+ break;
+ } /* case Group 11 */
+
+
+
+ default:
+ break;
+ }
+
+ return(Result);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/asynchctrl/dcchmsg.c b/data/mnet/GP10/Dsp/asynchctrl/dcchmsg.c
new file mode 100644
index 0000000..3e4eefc
--- /dev/null
+++ b/data/mnet/GP10/Dsp/asynchctrl/dcchmsg.c
@@ -0,0 +1,1167 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: dcchmsg.c
+*
+* Description:
+* This file contains functions that handle DCCH messages from Host to DSP.
+*
+* Public Functions:
+* dcchMsgProc, sacchMsgProc
+*
+* Private Functions:
+* initPower, channelModeIE, encryptionIE
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "string.h"
+#include "gsmdata.h"
+#include "oamdata.h"
+#include "dsp/dsphmsg.h"
+#include "bbdata.h"
+#include "l1config.h"
+#include "diagdata.h"
+#include "agcdata.h"
+#include "dsprotyp.h"
+
+/*****************************************************************************
+*
+* Function: initPower
+*
+* Description:
+* Initializes TA, MS power, BTS power and dynamic power control
+*
+* Input:
+* hostChActInfo ptr to channel activation structure from Host
+* ->timeAdv command parameters from Host...
+* ->msPowerInit
+* ->msPower
+* dspSacchInfo ptr to SACCH Info structure in DSP
+*
+* Output:
+* dspSacchInfo ptr to SACCH Info structure in DSP
+* ->timingAdvance operating parameters in DSP...
+* ->powerLevelInit
+* ->powerLevel
+* ->ulsigstren
+* .rxPwr[]
+* .powerSum
+* .rxPwrAve
+* .powerSumAve
+* ->toaAccumSub
+* ->MSPowerAccumSub
+*
+******************************************************************************/
+ProcResult initPower(chActMsgStruc *hostChActInfo, t_SACCHInfo *dspSacchInfo)
+{
+ Uint8 i;
+ Int16 currentRxLev;
+ Uint8 tempBuf[8];
+
+ if(g_loopBackMode == LOCAL_LOOPBACK)
+ {
+ hostChActInfo->msPower = -47; /* dBr */
+ g_USGC = 0x290;
+ }
+
+ /*-----------------------------------------------------------
+ * Set initial TOA and MS and BTS power
+ *----------------------------------------------------------*/
+ dspSacchInfo->timingAdvance = hostChActInfo->timeAdv;
+ dspSacchInfo->powerLevelInit = hostChActInfo->msPowerInit;
+ dspSacchInfo->dynPwrRprtCntr = 0;
+
+ /*-----------------------------------------------------------
+ * Initialize UL dynamic power control
+ *----------------------------------------------------------*/
+ dspSacchInfo->powerLevel = hostChActInfo->msPowerInit;
+ dspSacchInfo->dlsigstrenSCell.MSPwrSetting = hostChActInfo->msPowerInit;
+
+ currentRxLev = g_MeasAgcDpcDbm + DBM_2_RXLEV_CONV_FACTOR
+ + (hostChActInfo->msPower - g_MeasAgcDpcDbr)
+ + (((g_USGC - g_MeasAgcDpcRxgain)
+ * g_gainStepsPerDb.inverseSlope) >> DIVISION_FACTOR);
+
+ /*-----------------------------------------------------------
+ * For co-channel interference processing
+ *----------------------------------------------------------*/
+ g_IntRprtCntr = 0;
+
+
+ /*-----------------------------------------------------------
+ * Initialize UL and DL RXLEV and RXQUAL histories. Since we
+ * have no information on DL RXLEV, initialize it to the same
+ * value as UL RXLEV. Initialize all RXQUALs to high quality.
+ *----------------------------------------------------------*/
+ for (i=0; i<NUM_RX_SIGNAL_SAMPLES_MAX; i++)
+ {
+ dspSacchInfo->ulsigstren.rxLev[i] = currentRxLev;
+ dspSacchInfo->ulsigqual.rxQual[i] = 0;
+ dspSacchInfo->dlsigstrenSCell.rxLev[i] = currentRxLev;
+ dspSacchInfo->dlsigqualSCell.rxQual[i] = 0;
+ }
+
+ dspSacchInfo->ulsigstren.count = 0;
+ dspSacchInfo->ulsigstren.rxLevAve = currentRxLev;
+ dspSacchInfo->ulsigstren.rxPwrNormSmooth = 0; /* assume we're at target */
+
+ dspSacchInfo->ulsigqual.count = 0;
+ dspSacchInfo->ulsigqual.ber = 0;
+ dspSacchInfo->ulsigqual.berAve = 0;
+ dspSacchInfo->ulsigqual.rxQualAve = 0;
+
+ dspSacchInfo->dlsigstrenSCell.count = 0;
+ dspSacchInfo->dlsigstrenSCell.rxLevAve = currentRxLev;
+
+ dspSacchInfo->dlsigqualSCell.count = 0;
+ dspSacchInfo->dlsigqualSCell.berAve = 0;
+ dspSacchInfo->dlsigqualSCell.rxQualAve = 0;
+
+ dspSacchInfo->toaAccumSub = 0;
+ dspSacchInfo->MSPowerAccumSub = 0;
+ dspSacchInfo->MSPowerAccumFull = 0;
+ dspSacchInfo->MSPowerAccum = 0;
+
+ dspSacchInfo->bitErrorAccum = 0;
+ dspSacchInfo->bitCountAccum = 0;
+ dspSacchInfo->frameErrorAccum = 0;
+ dspSacchInfo->frameCountAccum = 0;
+
+ /*-----------------------------------------------------------
+ * Initialize UL automatic gain control
+ *----------------------------------------------------------*/
+ if ( g_AGC_ON )
+ {
+ /*
+ * If access burst (prior to this activation) saturated the ADC,
+ * use a lower target -- one that still works if the signal is
+ * exactly 0 dBr, but also gives headroom in case it is stronger
+ */
+ if ( hostChActInfo->msPower >= 0 )
+ {
+ dspSacchInfo->ulsigstren.rxgain = g_USGC +
+ (hostChActInfo->msPower - SAT_RXPWR_TARGET) * g_gainStepsPerDb.slope;
+ }
+ else
+ {
+ dspSacchInfo->ulsigstren.rxgain = g_USGC +
+ (hostChActInfo->msPower - g_AgcRxPwrTarget) * g_gainStepsPerDb.slope;
+ }
+
+ /*-- limit gain to an unsigned 10-bit value --*/
+ if(dspSacchInfo->ulsigstren.rxgain > g_rxGainMinAct)
+ {
+ dspSacchInfo->ulsigstren.rxgain = g_rxGainMinAct;
+ }
+ else if(dspSacchInfo->ulsigstren.rxgain < RXGAIN_MAX)
+ {
+ dspSacchInfo->ulsigstren.rxgain = RXGAIN_MAX;
+ }
+ dspSacchInfo->agcHoldFlag = TRUE;
+ }
+ else
+ {
+ dspSacchInfo->agcHoldFlag = FALSE; /* AGC is off */
+ }
+ /*-----------------------------------------------------------
+ * Initialize UL dynamic power control
+ *----------------------------------------------------------*/
+ if ( g_DPC_ON )
+ {
+ dspSacchInfo->dpcHoldFlag = TRUE;
+ }
+ else
+ {
+ dspSacchInfo->dpcHoldFlag = FALSE; /* DPC is off */
+ }
+ /*-----------------------------------------------------------
+ * Send diagnostic msg with computed initial gain setting
+ *----------------------------------------------------------*/
+ tempBuf[0] = dspSacchInfo->powerLevel;
+ tempBuf[1] = dspSacchInfo->dlsigstrenSCell.MSPwrSetting;
+ tempBuf[2] = dspSacchInfo->ulsigstren.rxgain>>8;
+ tempBuf[3] = dspSacchInfo->ulsigstren.rxgain;
+ tempBuf[4] = dspSacchInfo->agcHoldFlag;
+ // sendDiagMsg(0x97,0,0,5,tempBuf);
+
+ return SUCCESS;
+}
+
+/*****************************************************************************
+*
+* Function: channelModeIE
+*
+* Description:
+* Translates Host Channel Mode IE into DSP enumerated values
+*
+* Input:
+* msgType host command message that invoked D
+* ->dtxSelect DTX state for UL and DL
+* ->chSelect selects type of channel
+* ->dataRate vocoder (Speech) or data rate (Data)
+*
+* Output:
+* tch ptr to TCH Info structure in DSP (later ChMode substruct?)
+* ->ULDtxMode uplink DTX state
+* ->DLDtxMode downlink DTX state
+* ->speechDataInd speech/data indicator
+* ->vocAlgo vocoder algorithm
+*
+******************************************************************************/
+ProcResult channelModeIE(msgType msgType, t_chModes *chModes, t_TNInfo *ts)
+{
+ ProcResult result=SUCCESS;
+ t_TCHInfo *tch;
+
+ tch = & ts->u.group1.tch;
+ /*----------------------------------------------------------------------------
+ * Set DTX state on uplink and downlink. If UL DTX is ON, set ulDtxUsed TRUE
+ * so we average RXLEV SUB and RXQUAL SUB while MS remains in signalling mode.
+ *---------------------------------------------------------------------------*/
+ tch->ULDtxMode = (chModes->dtxSelect & UL_DTX)==UL_DTX;
+ tch->DLDtxMode = (chModes->dtxSelect & DL_DTX)==DL_DTX;
+ if ( tch->ULDtxMode )
+ {
+ tch->ulDtxUsed = TRUE;
+ tch->ulDtxUsed104 = TRUE;
+ }
+ /* Set dlDtxUsed FALSE and don't use DL DTX until speech mode */
+ tch->dlDtxUsed = FALSE;
+ /*
+ * Make sure DL DTX mode is OFF on BCCH
+ */
+ if(g_BBInfo[0].TNInfo[0].groupNum == GSM_GROUP_5)
+ {
+ tch->DLDtxMode = FALSE;
+
+
+
+ }
+
+ /*-------------------------------------------------------
+ * Translate Host msg chSelect to DSP chSelect
+ *-------------------------------------------------------*/
+ switch (chModes->chSelect)
+ {
+ case SPEECH_CHANNEL:
+ tch->speechDataInd = IND_SPEECH;
+ break;
+ case DATA_CHANNEL:
+ tch->speechDataInd = IND_DATA;
+ break;
+ case SIGNALING_CHANNEL:
+ tch->speechDataInd = IND_SIG;
+ break;
+ default:
+ result = FAILURE;
+ break;
+ }
+ /*-------------------------------------------------------
+ * If speech, translate Host vocoder algorithm to DSP
+ *-------------------------------------------------------*/
+ if ( tch->speechDataInd == IND_SPEECH )
+ {
+ switch (chModes->dataRate)
+ {
+ case VOCODER_ALGORITHM_V1:
+ tch->vocAlgo = VOC_GSMF;
+ break;
+ case VOCODER_ALGORITHM_V2:
+ tch->vocAlgo = VOC_EFR;
+ break;
+ default:
+ result = FAILURE;
+ break;
+ }
+ }
+ else
+ {
+ tch->vocAlgo = VOC_NULL;
+ }
+
+ return (result);
+}
+
+/*****************************************************************************
+*
+* Function: encryptionIE
+*
+* Description:
+* Translates Host Encryption Information IE into DSP enumerated values
+*
+* Input:
+* msgType host command message that invoked DCH Msg Proc
+* hostEncryptInfo encryption state structure
+* .algorithmId encryption algorithm
+* .key[8] encryption key, 8 bytes, [0] is LSByte
+* encryptState ptr to encryption structure in DSP
+*
+* Output:
+* dspEncryptState ptr to encryption structure in DSP
+* ->algorithm current encryption algorithm (None,A5/1,A5/2)
+* ->newAlgorithm newly commanded encryption algorithm
+* ->encryptMode encryption mode (Normal, Change, Pending)
+* ->encryptKey[2] encryption key, 2 longwords, [0] is LSWord
+*
+******************************************************************************/
+ProcResult encryptionIE(msgType msgType, t_encryptInfo *hostEncryptInfo,
+ t_encryptState *dspEncryptState)
+{
+ t_encryptAlgorithm *setAlgorithm;
+ ProcResult result=SUCCESS;
+ Uint8 i;
+
+ /*-------------------------------------------------------
+ * If Channel Activation, just continue using encryption
+ * already set up. If Encr Cmd, change algorithms.
+ *-------------------------------------------------------*/
+ if ( msgType == DCH_CH_ACTIVATION_REQ )
+ {
+ setAlgorithm = & dspEncryptState->algorithm;
+ dspEncryptState->encryptMode = ENCR_NORMAL;
+ }
+ else
+ {
+ setAlgorithm = & dspEncryptState->newAlgorithm;
+ dspEncryptState->encryptMode = ENCR_PEND_CHANGE;
+ }
+
+ /*-------------------------------------------------------
+ * Translate Host encryption algorithm to DSP equivalent
+ *-------------------------------------------------------*/
+ switch (hostEncryptInfo->algorithmId)
+ {
+ case ENCRYPTION_ALGORITHM_NONE:
+ *setAlgorithm = ENCR_NONE;
+ break;
+ case ENCRYPTION_ALGORITHM_A51:
+ *setAlgorithm = ENCR_A51;
+ break;
+ case ENCRYPTION_ALGORITHM_A52:
+ *setAlgorithm = ENCR_A52;
+ break;
+ default:
+ result = FAILURE;
+ break;
+ }
+ /*-------------------------------------------------------
+ * Pack encryption key into longwords
+ *-------------------------------------------------------*/
+ if ( result == SUCCESS )
+ {
+ for ( i=0; i<ENCRYPT_KEY_LEN; i++ )
+ {
+ dspEncryptState->encryptKey[i] =
+ (hostEncryptInfo->key[4*i] << 24) |
+ (hostEncryptInfo->key[4*i+1] << 16) |
+ (hostEncryptInfo->key[4*i+2] << 8) |
+ hostEncryptInfo->key[4*i+3];
+ }
+ }
+ return (result);
+}
+
+/*****************************************************************************
+*
+* Function: dcchMsgProc
+*
+* Description:
+* Handles DCCH messages from Host to DSP.
+*
+* Inputs:
+* dcchMsg ptr to CCCH message structure
+* ->trx TRX
+* ->typeLoByte message type
+* ->typeHiByte message type
+* ->params[] logical channel, subchannel, timeslot, etc.
+*
+* Outputs:
+* g_BBInfo[trx]
+* .TNInfo[timeSlot] ptr to TN Info structure in DSP
+* .u.group1 GSM Group 1 structure
+* .tch TCH substructure update params for one TCH/F
+* .sacch SACCH substuctur update params for its SACCH
+* .u.group5 GSM Group 5 structure
+* .sdcch[] SDCCH subchannel structures update params
+* .sacch[] SACCH subchannel structures update params
+*
+******************************************************************************/
+ProcResult dcchMsgProc(msgUnionStruc *dcchMsg)
+{
+ t_DLSigBufs *dcchBuf;
+ t_TNInfo *ts;
+ ProcResult Result;
+ Uint8 chanNum, i;
+ msgStruc ackMsg;
+ Uint8 rfCh;
+ Uint8 timeSlot;
+ Uint8 subCh;
+ Uint8 logCh;
+ Uint16 msgType;
+ Uint8 failCause = 0;
+ Uint8 hoCause;
+ Uint8 params[2];
+ t_PNbufs *PNbufs;
+ Uint8 ackWarningFlag;
+
+ chanNum = dcchMsg->u.params[0];
+ if((chanNum & 0xE0) == 0x20)
+ {
+ logCh = SDCCH4;
+ subCh = (chanNum & 0x18) >> 3;
+ }
+ else if((chanNum & 0xC0) == 0x40)
+ {
+ logCh = SDCCH8;
+ subCh = (chanNum & 0x38) >> 3;
+ }
+ /*-------------------------------------------------------
+ * Set RF channel, time slot and pointer to TS Info struct
+ *-------------------------------------------------------*/
+ rfCh = dcchMsg->trx & 0x01;
+ timeSlot = chanNum & 0x07;
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ Result = SUCCESS;
+ msgType = dcchMsg->typeLoByte | (dcchMsg->typeHiByte<<8);
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_1:
+ switch(msgType)
+ {
+ case DCH_CH_ACTIVATION_REQ:
+ /*---------------------------------------------------------
+ * If channel is inactive, process the Chan Activation.
+ * If it's already active, set a warning flag.
+ *---------------------------------------------------------*/
+ if ( ts->u.group1.tch.state != CHAN_ACTIVE )
+ {
+ ackWarningFlag = 0;
+ }
+ else
+ {
+ ackWarningFlag = 1;
+ }
+ /*-------------------------------------------------------
+ * Translate Host Channel Mode IE to DSP enum values
+ *-------------------------------------------------------*/
+ if ( channelModeIE(msgType, & dcchMsg->u.chActInfo.chModes, ts) != SUCCESS )
+ {
+ failCause = 2;
+ }
+ /*-------------------------------------------------------
+ * Translate Host encryption command to DSP enum values
+ *-------------------------------------------------------*/
+ if ( encryptionIE(msgType, & dcchMsg->u.chActInfo.encryptInfo,
+ & ts->u.group1.tch.encryptState) != SUCCESS )
+ {
+ failCause = 3;
+ }
+ /*-------------------------------------------------------
+ * If Channel is activated for Handover, set HO flag
+ *-------------------------------------------------------*/
+ if ( dcchMsg->u.chActInfo.chActType == ASYNC_HANDOVER_TYPE )
+ {
+ ts->u.group1.tch.HOFlag = TRUE;
+ ts->u.group1.tch.HOReference = dcchMsg->u.chActInfo.hoRef;
+ }
+ else
+ {
+ ts->u.group1.tch.HOFlag = FALSE;
+ }
+
+ ts->u.group1.sacch.lostCount = 0;
+
+ /* special case for CHANNEL ACTIVATION for Handover */
+ if ( ts->u.group1.tch.HOFlag == TRUE)
+ {
+ ts->u.group1.sacch.timingAdvance = 0;
+ ts->u.group1.sacch.powerLevelInit = dcchMsg->u.chActInfo.msPowerInit;
+ ts->u.group1.sacch.powerLevel = dcchMsg->u.chActInfo.msPowerInit;
+ ts->u.group1.sacch.ulsigstren.rxgain = g_USGC;
+
+ ts->u.group1.sacch.agcHoldFlag = TRUE;
+ ts->u.group1.sacch.dpcHoldFlag = TRUE;
+ }
+ else
+ {
+ /*-------------------------------------------------------
+ * Initialize TA, MS and BTS power, dynamic pwr control
+ *-------------------------------------------------------*/
+ initPower(& dcchMsg->u.chActInfo, & ts->u.group1.sacch);
+ }
+
+ /*-------------------------------------------------------
+ * Initialize P-N buffers for handover processing
+ *-------------------------------------------------------*/
+ PNbufs = & g_PNbufs[timeSlot];
+
+ PNbufs->hoUL.sigstren.index = 0;
+ PNbufs->hoUL.sigstren.flagsum = 0;
+ PNbufs->hoDL.sigstrenSCell.index = 0;
+ PNbufs->hoDL.sigstrenSCell.flagsum = 0;
+
+ PNbufs->hoUL.sigqual.index = 0;
+ PNbufs->hoUL.sigqual.flagsum = 0;
+ PNbufs->hoDL.sigqualSCell.index = 0;
+ PNbufs->hoDL.sigqualSCell.flagsum = 0;
+
+ PNbufs->hoUL.intsigstren.index = 0;
+ PNbufs->hoUL.intsigstren.flagsum = 0;
+ PNbufs->hoDL.intsigstrenSCell.index = 0;
+ PNbufs->hoDL.intsigstrenSCell.flagsum = 0;
+
+ for(i=0; i < NXBUF_SIZ_MAX; i++) {
+ PNbufs->hoUL.sigstren.flag[i] = 0;
+ PNbufs->hoUL.sigqual.flag[i] = 0;
+ PNbufs->hoDL.sigstrenSCell.flag[i] = 0;
+ PNbufs->hoDL.sigqualSCell.flag[i] = 0;
+ PNbufs->hoUL.intsigstren.flag[i] = 0;
+ PNbufs->hoDL.intsigstrenSCell.flag[i] = 0;
+ }
+ /* end P and N buffer init */
+
+ /*
+ * only perform 5.08 averaging when all samples in buffer are collected
+ */
+ ts->u.group1.sacch.averagingHoldCounter = 0;
+
+ /*
+ * clear stolen SID count
+ */
+ ts->u.group1.tch.stolenSid = 0;
+
+ /*-------------------------------------------------------
+ * Clear Facch Buffer related parameters
+ *-------------------------------------------------------*/
+ ts->u.group1.facch.dlSigBuf->numMsgsReady = 0;
+ ts->u.group1.facch.dlSigBuf->readIndex = 0;
+ ts->u.group1.facch.dlSigBuf->writeIndex = 0;
+ /*-------------------------------------------------------
+ * Clear Sacch Buffer related parameters
+ *-------------------------------------------------------*/
+ ts->u.group1.sacch.dlSigBuf->numMsgsReady = 0;
+ ts->u.group1.sacch.dlSigBuf->readIndex = 0;
+ ts->u.group1.sacch.dlSigBuf->writeIndex = 0;
+ /*-------------------------------------------------------
+ * Initialize TCH interleave/de-interleave block index
+ *-------------------------------------------------------*/
+ g_intBuf8Deep.tchTXBurstIndex[(timeSlot)] = -1;
+ g_deintBuf8Deep.tchRXBurstIndex[(timeSlot)] = -1;
+
+ rtsCheck(dcchMsg->trx, ts->tsNumber, FACCH, 0, 0);
+
+ /*---------------------------------------------------
+ * Initialize TCH jitter buffer related parameters
+ *---------------------------------------------------*/
+ g_dlTchFrame[timeSlot].frameCount = 0;
+ g_dlTchFrame[timeSlot].readIndex = 0;
+ g_dlTchFrame[timeSlot].writeIndex = 0;
+ g_dlTchFrame[timeSlot].frameStarted = 0;
+
+ /*---------------------------------------------------
+ * Initialize SID frame count
+ *---------------------------------------------------*/
+ g_dlSidFrame[timeSlot].frameCount = 0;
+
+ /*---------------------------------------------------
+ * Initialize time slot DC offset to all-carrier value
+ *---------------------------------------------------*/
+ g_DcOffset[rfCh][timeSlot].I =
+ g_DcOffset[rfCh][NUM_TN_PER_RF+NUM_SDCCH_SUBCHANS].I;
+ g_DcOffset[rfCh][timeSlot].Q =
+ g_DcOffset[rfCh][NUM_TN_PER_RF+NUM_SDCCH_SUBCHANS].Q;
+
+ /*---------------------------------------------
+ * Initialize diagnostic MS Report parameters
+ *--------------------------------------------*/
+ initMsReport(rfCh, timeSlot);
+
+ /*-------------------------------------------------------
+ * Load common parameters for response msg to L3
+ *-------------------------------------------------------*/
+ ackMsg.msgSize = 9;
+ ackMsg.function = dcchMsg->function;
+ ackMsg.trx = dcchMsg->trx;
+ ackMsg.params[0] = dcchMsg->u.params[0]; /* channel number */
+ ackMsg.params[1] = dcchMsg->u.params[1]; /* channel number */
+ /*-------------------------------------------------------
+ * If error, send NACK with failCause
+ *-------------------------------------------------------*/
+ if ( failCause )
+ {
+ ackMsg.typeLoByte = DCH_CH_ACTIVATION_REQ_NACK;
+ ackMsg.typeHiByte = DCH_CH_ACTIVATION_REQ_NACK>>8;
+ ackMsg.params[2] = 0;
+ ackMsg.params[3] = failCause;
+ }
+ /*-------------------------------------------------------
+ * If no error, send ACK with FN
+ *-------------------------------------------------------*/
+ else
+ {
+ ackMsg.typeLoByte = DCH_CH_ACTIVATION_REQ_ACK;
+ ackMsg.typeHiByte = DCH_CH_ACTIVATION_REQ_ACK>>8;
+ ackMsg.params[2] = (sysFrameNum.t1 & 0x001F) << 3 |
+ (sysFrameNum.t3 & 0x38) >> 3;
+ ackMsg.params[3] = (sysFrameNum.t3 & 0x03) << 5 |
+ (sysFrameNum.t2 & 0x1F);
+ ackMsg.params[4] = ackWarningFlag;
+ }
+ sendMsgHost(& ackMsg);
+
+ /*---------------------------------------------------
+ * If Host message is valid, activate channel
+ *---------------------------------------------------*/
+ if ( !failCause )
+ {
+ ts->u.group1.tch.state = CHAN_ACTIVE;
+ ts->u.group1.sacch.state = CHAN_ACTIVE;
+ }
+ break;
+
+ case DCH_CH_RELEASE_REQ:
+
+ if(g_AGC_ON) {
+ ts->u.group1.sacch.ulsigstren.rxgain = g_rxGainMinIdle;
+ }
+ ts->u.group1.tch.state = CHAN_INACTIVE;
+ ts->u.group1.sacch.state = CHAN_INACTIVE;
+
+ /*
+ * RESET; only perform 5.08 averaging when all samples in buffer are collected
+ */
+ ts->u.group1.sacch.averagingHoldCounter = 0;
+
+ /*---------------------------------------------
+ * Clear diagnostic MS Report parameters
+ *--------------------------------------------*/
+ initMsReport(rfCh, timeSlot);
+
+ /*---------------------------------------------
+ * Send ack message to Layer 3
+ *--------------------------------------------*/
+ ackMsg.msgSize = 6;
+ ackMsg.function = dcchMsg->function;
+ ackMsg.trx = dcchMsg->trx;
+ ackMsg.typeLoByte = DCH_CH_RELEASE_REQ_ACK;
+ ackMsg.typeHiByte = DCH_CH_RELEASE_REQ_ACK>>8;
+ ackMsg.params[0] = dcchMsg->u.params[0];
+ ackMsg.params[1] = dcchMsg->u.params[1];
+
+ sendMsgHost(& ackMsg);
+ break;
+
+ case DCH_SACCH_DEACTIVATE_REQ:
+ ts->u.group1.sacch.state = CHAN_INACTIVE;
+ break;
+
+ case DCH_SACCH_INFO_MOD_REQ:
+// sacchMsgProc( (sacchMsgStruc *) &dcchMsg->u.dchSacchInfo.sysInfoType,
+// ts->u.group1.sacch.dlSigBuf, type); ***NOT USED***
+ break;
+
+ case DCH_MODE_MOD_REQ:
+ /*-------------------------------------------------------
+ * Check that channel is active, else reject Mode Modify
+ *-------------------------------------------------------*/
+ if ( ts->u.group1.tch.state == CHAN_ACTIVE )
+ {
+ /*-------------------------------------------------------
+ * Translate Host Channel Mode IE to DSP enum values
+ *-------------------------------------------------------*/
+ if ( channelModeIE(msgType, &dcchMsg->u.chActInfo.chModes, ts) != SUCCESS )
+ {
+ failCause = 2;
+ }
+ }
+ else
+ {
+ failCause = 1;
+ }
+ /*-------------------------------------------------------
+ * Load common parameters for response msg to L3
+ *-------------------------------------------------------*/
+ ackMsg.function = dcchMsg->function;
+ ackMsg.trx = dcchMsg->trx;
+ ackMsg.params[0] = dcchMsg->u.params[0]; /* channel number */
+ ackMsg.params[1] = dcchMsg->u.params[1]; /* channel number */
+ /*-------------------------------------------------------
+ * If error, send NACK with failCause
+ *-------------------------------------------------------*/
+ if ( failCause )
+ {
+ ackMsg.msgSize = 8;
+ ackMsg.typeLoByte = DCH_MODE_MOD_REQ_NACK;
+ ackMsg.typeHiByte = DCH_MODE_MOD_REQ_NACK>>8;
+ ackMsg.params[2] = 0;
+ ackMsg.params[3] = failCause;
+ }
+ /*-------------------------------------------------------
+ * If no error, send ACK without last field
+ *-------------------------------------------------------*/
+ else
+ {
+ ackMsg.msgSize = 6;
+ ackMsg.typeLoByte = DCH_MODE_MOD_REQ_ACK;
+ ackMsg.typeHiByte = DCH_MODE_MOD_REQ_ACK>>8;
+ }
+ sendMsgHost(& ackMsg);
+
+ break;
+
+ case DCH_OM_ASYNC_HO_REQ:
+ hoCause = DL_RXLEV | UL_RXLEV | DL_RXQUAL | UL_RXQUAL;
+ sendAsyncHoMsg(dcchMsg->trx, timeSlot, hoCause);
+ break;
+
+ case DCH_ENCRYPT_REQ:
+ /*-------------------------------------------------------
+ * Translate Host encryption command to DSP enum values
+ *-------------------------------------------------------*/
+ if ( encryptionIE(msgType, & dcchMsg->u.encryptCmdInfo.encryptInfo,
+ & ts->u.group1.tch.encryptState) != SUCCESS )
+ {
+ params[0] = DCH_ENCRYPT_REQ >> 8;
+ params[1] = DCH_ENCRYPT_REQ & 0xff;
+ ReportError(COMMAND_FAILED,dcchMsg->trx,timeSlot,2,params);
+ }
+ break;
+
+ default:
+ ReportError(UNKNOWN_MSG_TYPE, dcchMsg->trx, timeSlot,0,params);
+ break;
+ }
+ break;
+
+ case GSM_GROUP_5:
+ switch(msgType)
+ {
+ case DCH_CH_ACTIVATION_REQ:
+ /*---------------------------------------------------------
+ * If channel is inactive, process the Chan Activation.
+ * If it's already active, set a warning flag.
+ *---------------------------------------------------------*/
+ if ( ts->u.group5.sdcch[subCh].state != CHAN_ACTIVE )
+ {
+ ackWarningFlag = 0;
+ }
+ else
+ {
+ ackWarningFlag = 1;
+ }
+ /*-------------------------------------------------------
+ * Initialize message buffer and lost SACCH cound
+ *-------------------------------------------------------*/
+ dcchBuf = ts->u.group5.sdcch[subCh].dlSigBuf;
+ dcchBuf->valid = 1;
+ dcchBuf->readIndex = 0;
+ dcchBuf->writeIndex = 0;
+ dcchBuf->numMsgsReady = 0;
+ ts->u.group5.sacch[subCh].lostCount = 0;
+
+ /*-------------------------------------------------------
+ * Clear Sacch Buffer related parameters
+ *-------------------------------------------------------*/
+ ts->u.group5.sacch[subCh].dlSigBuf->numMsgsReady = 0;
+ ts->u.group5.sacch[subCh].dlSigBuf->readIndex = 0;
+ ts->u.group5.sacch[subCh].dlSigBuf->writeIndex = 0;
+
+ /*
+ * Initialize Cell Broadcasting Buffer
+ */
+ if(subCh == 2)
+ {
+ if(dcchMsg->u.chActInfo.chActType == CBCH_TYPE)
+ ts->u.group5.cbchUsed = TRUE;
+ else
+ ts->u.group5.cbchUsed = FALSE;
+ }
+
+ /*-------------------------------------------------------
+ * Translate Host encryption command to DSP enum values
+ *-------------------------------------------------------*/
+ if ( encryptionIE(msgType, & dcchMsg->u.chActInfo.encryptInfo,
+ & ts->u.group5.sdcch[subCh].encryptState) != SUCCESS )
+ {
+ failCause = 3;
+ }
+
+ /*-------------------------------------------------------
+ * Initialize TA, MS and BTS power, dynamic pwr control
+ *-------------------------------------------------------*/
+ initPower(& dcchMsg->u.chActInfo, & ts->u.group5.sacch[subCh]);
+
+ /*-------------------------------------------------------
+ * Set local handover reference
+ *-------------------------------------------------------*/
+ ts->u.group5.sdcch[subCh].HOReference = dcchMsg->u.chActInfo.hoRef;
+
+ /*---------------------------------------------------
+ * Initialize subchan DC offset to all-carrier value
+ *---------------------------------------------------*/
+ g_DcOffset[rfCh][NUM_TN_PER_RF+subCh].I =
+ g_DcOffset[rfCh][NUM_TN_PER_RF+NUM_SDCCH_SUBCHANS].I;
+ g_DcOffset[rfCh][NUM_TN_PER_RF+subCh].Q =
+ g_DcOffset[rfCh][NUM_TN_PER_RF+NUM_SDCCH_SUBCHANS].Q;
+
+ /*---------------------------------------------
+ * Initialize diagnostic MS Report parameters
+ *--------------------------------------------*/
+ initMsReport(rfCh, NUM_TN_PER_RF+subCh);
+
+ /*-------------------------------------------------------
+ * Load common parameters for response msg to L3
+ *-------------------------------------------------------*/
+ ackMsg.msgSize = 9;
+ ackMsg.function = dcchMsg->function;
+ ackMsg.trx = dcchMsg->trx;
+ ackMsg.params[0] = dcchMsg->u.params[0]; /* channel number */
+ ackMsg.params[1] = dcchMsg->u.params[1]; /* channel number */
+ /*-------------------------------------------------------
+ * If error, send NACK with failCause
+ *-------------------------------------------------------*/
+ if ( failCause )
+ {
+ ackMsg.typeLoByte = DCH_CH_ACTIVATION_REQ_NACK;
+ ackMsg.typeHiByte = DCH_CH_ACTIVATION_REQ_NACK>>8;
+ ackMsg.params[2] = 0;
+ ackMsg.params[3] = failCause;
+ }
+ /*-------------------------------------------------------
+ * If no error, send ACK with FN
+ *-------------------------------------------------------*/
+ else
+ {
+ ackMsg.typeLoByte = DCH_CH_ACTIVATION_REQ_ACK;
+ ackMsg.typeHiByte = DCH_CH_ACTIVATION_REQ_ACK>>8;
+ ackMsg.params[2] = (sysFrameNum.t1 & 0x001F) << 3 |
+ (sysFrameNum.t3 & 0x38) >> 3;
+ ackMsg.params[3] = (sysFrameNum.t3 & 0x03) << 5 |
+ (sysFrameNum.t2 & 0x1F);
+ ackMsg.params[4] = ackWarningFlag;
+ }
+ sendMsgHost(& ackMsg);
+
+ /*---------------------------------------------------
+ * If the Chan Act was valid, flag the channel active
+ *---------------------------------------------------*/
+ if ( !failCause )
+ {
+ ts->u.group5.sdcch[subCh].state = CHAN_ACTIVE;
+ ts->u.group5.sacch[subCh].state = CHAN_ACTIVE;
+ rtsCheck(dcchMsg->trx, ts->tsNumber, SDCCH4, subCh, 0);
+ }
+ break;
+
+ case DCH_CH_RELEASE_REQ:
+ ts->u.group5.sdcch[subCh].state = CHAN_INACTIVE;
+ ts->u.group5.sacch[subCh].state = CHAN_INACTIVE;
+
+ if(subCh == 2)
+ {
+ ts->u.group5.cbchUsed = FALSE;
+ ts->u.group5.cbch[0].dlSigBuf->bufValid = 0;
+ ts->u.group5.cbch[1].dlSigBuf->bufValid = 0;
+ }
+ /*---------------------------------------------
+ * Clear diagnostic MS Report parameters
+ *--------------------------------------------*/
+ initMsReport(rfCh, NUM_TN_PER_RF+subCh);
+
+ /*---------------------------------------------
+ * Send ack message to Layer 3
+ *--------------------------------------------*/
+ ackMsg.msgSize = 6;
+ ackMsg.function = dcchMsg->function;
+ ackMsg.trx = dcchMsg->trx;
+ ackMsg.typeLoByte = DCH_CH_RELEASE_REQ_ACK;
+ ackMsg.typeHiByte = DCH_CH_RELEASE_REQ_ACK>>8;
+ ackMsg.params[0] = dcchMsg->u.params[0];
+ ackMsg.params[1] = dcchMsg->u.params[1];
+ sendMsgHost(& ackMsg);
+ break;
+
+ case DCH_SACCH_DEACTIVATE_REQ:
+ ts->u.group5.sacch[subCh].state = CHAN_INACTIVE;
+ break;
+ case DCH_SACCH_INFO_MOD_REQ:
+ /*
+ * update SACCH for selected sub channel
+ */
+// sacchMsgProc( (sacchMsgStruc *) &dcchMsg->u.dchSacchInfo.sysInfoType,
+// ts->u.group5.sacch[subCh].dlSigBuf, type); ***NOT USED*
+ break;
+
+ case DCH_ENCRYPT_REQ:
+ /*-------------------------------------------------------
+ * Translate Host encryption command to DSP enum values
+ *-------------------------------------------------------*/
+ if ( encryptionIE(msgType, & dcchMsg->u.encryptCmdInfo.encryptInfo,
+ & ts->u.group5.sdcch[subCh].encryptState) != SUCCESS )
+ {
+ params[0] = DCH_ENCRYPT_REQ >> 8;
+ params[1] = DCH_ENCRYPT_REQ & 0xff;
+ ReportError(COMMAND_FAILED,dcchMsg->trx,timeSlot,2,params);
+ }
+ break;
+
+ default:
+ ReportError(UNKNOWN_MSG_TYPE, dcchMsg->trx, timeSlot, 0, params);
+ break;
+ }
+ break;
+
+
+ case GSM_GROUP_7:
+
+
+
+ switch(msgType)
+ {
+ case DCH_CH_ACTIVATION_REQ:
+
+
+ /*---------------------------------------------------------
+ * If channel is inactive, process the Chan Activation.
+ * If it's already active, set a warning flag.
+ *---------------------------------------------------------*/
+ if ( ts->u.group7.sdcch[subCh].state != CHAN_ACTIVE )
+ {
+ ackWarningFlag = 0;
+ }
+ else
+ {
+ ackWarningFlag = 1;
+ }
+ /*-------------------------------------------------------
+ * Initialize message buffer and lost SACCH cound
+ *-------------------------------------------------------*/
+ dcchBuf = ts->u.group7.sdcch[subCh].dlSigBuf;
+ dcchBuf->valid = 1;
+ dcchBuf->readIndex = 0;
+ dcchBuf->writeIndex = 0;
+ dcchBuf->numMsgsReady = 0;
+ ts->u.group7.sacch[subCh].lostCount = 0;
+
+ /*-------------------------------------------------------
+ * Clear Sacch Buffer related parameters
+ *-------------------------------------------------------*/
+ ts->u.group7.sacch[subCh].dlSigBuf->numMsgsReady = 0;
+ ts->u.group7.sacch[subCh].dlSigBuf->readIndex = 0;
+ ts->u.group7.sacch[subCh].dlSigBuf->writeIndex = 0;
+
+
+
+ /*-------------------------------------------------------
+ * Translate Host encryption command to DSP enum values
+ *-------------------------------------------------------*/
+ if ( encryptionIE(msgType, & dcchMsg->u.chActInfo.encryptInfo,
+ & ts->u.group7.sdcch[subCh].encryptState) != SUCCESS )
+ {
+ failCause = 3;
+ }
+
+ /*-------------------------------------------------------
+ * Initialize TA, MS and BTS power, dynamic pwr control
+ *-------------------------------------------------------*/
+ initPower(& dcchMsg->u.chActInfo, & ts->u.group7.sacch[subCh]);
+
+ /*-------------------------------------------------------
+ * Set local handover reference
+ *-------------------------------------------------------*/
+ ts->u.group7.sdcch[subCh].HOReference = dcchMsg->u.chActInfo.hoRef;
+
+ /*---------------------------------------------------
+ * Initialize subchan DC offset to all-carrier value
+ *---------------------------------------------------*/
+ g_Dc_7_Offset[rfCh][subCh].I =
+ g_DcOffset[rfCh][NUM_TN_PER_RF+NUM_SDCCH_SUBCHANS].I;
+ g_Dc_7_Offset[rfCh][subCh].Q =
+ g_DcOffset[rfCh][NUM_TN_PER_RF+NUM_SDCCH_SUBCHANS].Q;
+
+ /*---------------------------------------------
+ * Initialize diagnostic MS Report parameters
+ *--------------------------------------------*/
+ initSdcch8Report(rfCh, subCh);
+
+ /*-------------------------------------------------------
+ * Load common parameters for response msg to L3
+ *-------------------------------------------------------*/
+ ackMsg.msgSize = 9;
+ ackMsg.function = dcchMsg->function;
+ ackMsg.trx = dcchMsg->trx;
+ ackMsg.params[0] = dcchMsg->u.params[0]; /* channel number */
+ ackMsg.params[1] = dcchMsg->u.params[1]; /* channel number */
+ /*-------------------------------------------------------
+ * If error, send NACK with failCause
+ *-------------------------------------------------------*/
+ if ( failCause )
+ {
+ ackMsg.typeLoByte = DCH_CH_ACTIVATION_REQ_NACK;
+ ackMsg.typeHiByte = DCH_CH_ACTIVATION_REQ_NACK>>8;
+ ackMsg.params[2] = 0;
+ ackMsg.params[3] = failCause;
+ }
+ /*-------------------------------------------------------
+ * If no error, send ACK with FN
+ *-------------------------------------------------------*/
+ else
+ {
+ ackMsg.typeLoByte = DCH_CH_ACTIVATION_REQ_ACK;
+ ackMsg.typeHiByte = DCH_CH_ACTIVATION_REQ_ACK>>8;
+ ackMsg.params[2] = (sysFrameNum.t1 & 0x001F) << 3 |
+ (sysFrameNum.t3 & 0x38) >> 3;
+ ackMsg.params[3] = (sysFrameNum.t3 & 0x03) << 5 |
+ (sysFrameNum.t2 & 0x1F);
+ ackMsg.params[4] = ackWarningFlag;
+ }
+ sendMsgHost(& ackMsg);
+
+ /*---------------------------------------------------
+ * If the Chan Act was valid, flag the channel active
+ *---------------------------------------------------*/
+ if ( !failCause )
+ {
+ ts->u.group7.sdcch[subCh].state = CHAN_ACTIVE;
+ ts->u.group7.sacch[subCh].state = CHAN_ACTIVE;
+ rtsCheck(dcchMsg->trx, ts->tsNumber, SDCCH4, subCh, 0);
+ }
+
+
+
+ break;
+
+ case DCH_CH_RELEASE_REQ:
+ ts->u.group7.sdcch[subCh].state = CHAN_INACTIVE;
+ ts->u.group7.sacch[subCh].state = CHAN_INACTIVE;
+
+ /*---------------------------------------------
+ * Clear diagnostic MS Report parameters
+ *--------------------------------------------*/
+ initSdcch8Report(rfCh, subCh);
+
+ /*---------------------------------------------
+ * Send ack message to Layer 3
+ *--------------------------------------------*/
+ ackMsg.msgSize = 6;
+ ackMsg.function = dcchMsg->function;
+ ackMsg.trx = dcchMsg->trx;
+ ackMsg.typeLoByte = DCH_CH_RELEASE_REQ_ACK;
+ ackMsg.typeHiByte = DCH_CH_RELEASE_REQ_ACK>>8;
+ ackMsg.params[0] = dcchMsg->u.params[0];
+ ackMsg.params[1] = dcchMsg->u.params[1];
+ sendMsgHost(& ackMsg);
+ break;
+
+ case DCH_SACCH_DEACTIVATE_REQ:
+ ts->u.group7.sacch[subCh].state = CHAN_INACTIVE;
+ break;
+ case DCH_SACCH_INFO_MOD_REQ:
+ /*
+ * update SACCH for selected sub channel
+ */
+// sacchMsgProc( (sacchMsgStruc *) &dcchMsg->u.dchSacchInfo.sysInfoType,
+// ts->u.group7.sacch[subCh].dlSigBuf, type); ***NOT USED*
+ break;
+
+ case DCH_ENCRYPT_REQ:
+ /*-------------------------------------------------------
+ * Translate Host encryption command to DSP enum values
+ *-------------------------------------------------------*/
+ if ( encryptionIE(msgType, & dcchMsg->u.encryptCmdInfo.encryptInfo,
+ & ts->u.group7.sdcch[subCh].encryptState) != SUCCESS )
+ {
+ params[0] = DCH_ENCRYPT_REQ >> 8;
+ params[1] = DCH_ENCRYPT_REQ & 0xff;
+ ReportError(COMMAND_FAILED,dcchMsg->trx,timeSlot,2,params);
+ }
+ break;
+
+ default:
+ ReportError(UNKNOWN_MSG_TYPE, dcchMsg->trx, timeSlot, 0, params);
+ break;
+ }
+ break;
+ default:
+ ReportError(TIME_SLOT_NOT_CONFIGURED, dcchMsg->trx, timeSlot, 0, params);
+ break;
+ }
+
+ return(Result);
+}
+
+/*****************************************************************************
+*
+* Function: sacchMsgProc
+*
+* Description:
+* Handles SACCH messages from Host to DSP.
+*
+* Inputs:
+* sacchMsg ptr to CCCH message structure
+* ->startTime fill in
+* ->sysInfo fill in
+*
+* Outputs:
+* sacchBuf fill in
+* sysInfoType fill in
+*
+******************************************************************************/
+void sacchMsgProc(sacchMsgStruc *sacchMsg, t_sysInfoQueue *sacchBuf, Uint8 sysInfoType)
+{
+ Uint8 bufferIndex;
+ bufferIndex = sacchBuf->state ^ 0x01;
+
+ /*
+ * if message size is 0, stop sending this SYS INFO on the SACCH
+ */
+ if(sacchMsg->msgSize == 0)
+ {
+ sacchBuf->valid = 0;
+ }
+ else
+ {
+ memcpy((Uint8 *) (& sacchBuf->data[bufferIndex][5]), & sacchMsg->sysInfo[0], 19);
+ /*
+ * added L2 Headers
+ */
+ sacchBuf->data[bufferIndex][2] = 0x03;
+ sacchBuf->data[bufferIndex][3] = 0x03;
+ /*
+ * for SYS_INFO_6, pseudo length ix 0x31, rest is 0x49
+ */
+ if( sysInfoType == SYS_INFO_6)
+ sacchBuf->data[bufferIndex][4] = 0x2d;
+ else
+ sacchBuf->data[bufferIndex][4] = 0x49;
+
+ /*
+ * if change is immediate, change active buffer now
+ */
+ if(sacchMsg->startTime.IMM)
+ {
+ sacchBuf->state = bufferIndex;
+ /*
+ * start sending this sysInfo type
+ */
+ sacchBuf->valid = 1;
+ }
+ else
+ {
+ /*
+ * set sysinfo update frame number
+ */
+ sacchBuf->frameNumUpdate =
+ (sacchMsg->startTime.timeByte0 & 0xf8)>>3 *1326 + /*t1*/
+
+ ((sacchMsg->startTime.timeByte0 & 0x07)<<3 | /*t3*/
+ (sacchMsg->startTime.timeByte1 & 0xE0)>>5) *
+
+ (sacchMsg->startTime.timeByte1 & 0x1F)>>3; /*t2*/
+ }
+ }
+}
diff --git a/data/mnet/GP10/Dsp/asynchctrl/diagmsg.c b/data/mnet/GP10/Dsp/asynchctrl/diagmsg.c
new file mode 100644
index 0000000..992893b
--- /dev/null
+++ b/data/mnet/GP10/Dsp/asynchctrl/diagmsg.c
@@ -0,0 +1,387 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: diagmsg.c
+*
+* Description:
+* This file contains functions that handle diag messages from Host to DSP.
+*
+* Public Functions:
+* diagMsgProc
+*
+* Private Functions:
+* none
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "dsp/dsphmsg.h"
+#include "comdata.h"
+#include "bbdata.h"
+#include "diagdata.h"
+#include "dsp6201.h"
+#include "intr.h"
+#include "agcdata.h"
+#include "dsprotyp.h"
+
+extern Int8 g_dlDmaAdj; /* from burstisr.c */
+
+/*****************************************************************************
+*
+* Function: alignFrameProc
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void alignFrameProc(Int16 frameOffset)
+{
+ Uint8 rfCh;
+ t_TNInfo *ts;
+ Uint8 timeSlot;
+
+ for(rfCh=0; rfCh < NUM_RFS_PER_DSP; rfCh++)
+ {
+ for(timeSlot=0; timeSlot<NUM_TN_PER_RF; timeSlot++)
+ {
+ /*
+ * find right time slot
+ */
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+ ts->ulTblIndex += (frameOffset+ts->tblLength);
+ if(ts->ulTblIndex > ts->tblLength)
+ ts->ulTblIndex -= ts->tblLength;
+ if(ts->ulTblIndex > ts->tblLength)
+ ts->ulTblIndex -= ts->tblLength;
+ }
+ }
+}
+
+/*****************************************************************************
+*
+* Function: diagMsgProc
+*
+* Description:
+* Handles diagnostic messages from Host to DSP.
+*
+* Inputs:
+* diagCmd ptr to diagnostic message structure
+* ->whatever fill in
+*
+* Outputs:
+* dspId sets the DSP's identifier value
+*
+******************************************************************************/
+
+ProcResult diagMsgProc(cmdStruc *diagCmd)
+{
+ ProcResult Result;
+ rspStruc CommRspMsg;
+ Int8 *Ptr;
+ Uint8 *rdPtr;
+ Uint8 *wrPtr;
+ Int16 i;
+ Uint16 msgType;
+ Uint16 rspMsgType;
+ Uint16 oldLpbkMode;
+ Int16 frameOffset;
+ Uint8 reqLength;
+ t_TNInfo *ts;
+
+ Result = SUCCESS;
+ msgType = diagCmd->typeLoByte | (diagCmd->typeHiByte << 8);
+
+ switch(msgType)
+ {
+ case MPH_DSP_DIAG_GET_DSP_QUE_STATUS_REQ:
+ getRspQueStatus(diagCmd);
+ break;
+
+ case MPH_DSP_DIAG_PING_REQ:
+ CommRspMsg.function = DIAGNOSTIC_MSG;
+ rspMsgType = MPH_DSP_DIAG_PONG_RSP;
+ CommRspMsg.typeLoByte = rspMsgType;
+ CommRspMsg.typeHiByte = rspMsgType >> 8;
+
+ CommRspMsg.msgSize = MSG_HEAD_SIZE;
+ sendMsgHost(& CommRspMsg);
+ break;
+
+ case MPH_DSP_DIAG_ECHO_MSG_REQ: /* send back payload as response message */
+ if ( diagCmd->params[0] < MSG_HEAD_SIZE )
+ {
+ CommRspMsg.msgSize = MSG_HEAD_SIZE;
+ }
+ else if ( diagCmd->params[0] > HPI_MSG_SIZE-MSG_HEAD_SIZE )
+ {
+ CommRspMsg.msgSize = HPI_MSG_SIZE-MSG_HEAD_SIZE;
+ }
+ else
+ {
+ CommRspMsg.msgSize = diagCmd->params[0];
+ }
+ rdPtr = diagCmd->params + 4; /* this +4 skips requested count in Echo Request */
+ wrPtr = & CommRspMsg.function;
+ for(i=0; i<CommRspMsg.msgSize+4; i++) /* this +4 copies function, type and trx */
+ {
+ *wrPtr++ = *rdPtr++;
+ }
+ sendMsgHost(& CommRspMsg);
+ break;
+
+ case MPH_DSP_SET_ID_REQ: /* set DSP ID is the 1st command from host */
+ DspId = diagCmd->params[0];
+ break;
+
+ case MPH_DSP_DIAG_REPORT_REQ:
+ switch ( diagCmd->params[0] )
+ {
+ case MS_REPORT:
+ g_diagData.msReportTsMask = diagCmd->params[1];
+ /*--- dcchReport will have one additional parameter ---*/
+ if ( diagCmd->msgSize > 6 && diagCmd->params[2]==TRUE )
+ {
+ g_diagData.dcchReportOnly = TRUE;
+ }
+ else
+ {
+ g_diagData.dcchReportOnly = FALSE;
+ }
+ break;
+
+ case HO_REPORT:
+ g_diagData.hoReportTsMask = diagCmd->params[1];
+ break;
+
+ case DL_MEAS_REPORT:
+ g_diagData.dlMeasReportTsMask = diagCmd->params[1];
+ break;
+
+ case GPRS_MS_REPORT:
+ g_diagData.gprsMsReportTfiMask = (diagCmd->params[1]<<24) |
+ (diagCmd->params[2]<<16) |
+ (diagCmd->params[3]<< 8) |
+ (diagCmd->params[4]) ;
+ break;
+
+ case GPRS_DL_MEAS_REPORT:
+ g_diagData.gprsDlMeasReportTfiMask = (diagCmd->params[1]<<24) |
+ (diagCmd->params[2]<<16) |
+ (diagCmd->params[3]<< 8) |
+ (diagCmd->params[4]) ;
+ break;
+
+ case DC_OFFSET_REPORT:
+ if(diagCmd->params[1] == 0)
+ g_diagData.dcOffsetReport = FALSE;
+ else
+ g_diagData.dcOffsetReport = TRUE;
+ g_diagData.dcOffsetTsMask = diagCmd->params[2];
+ break;
+ }
+ break;
+
+ case MPH_DSP_DIAG_SET_AGC_DBR_TARGET:
+ g_AgcRxPwrTarget = (Short) ((diagCmd->params[0] << 8) | (diagCmd->params[1]));
+ break;
+
+ case MPH_DSP_DIAG_BURST_CAPTURE_REQ:
+ g_diagData.burstCapture.state = CAPTURE_ARMED;
+ g_diagData.burstCapture.rfCh = diagCmd->trx;
+ g_diagData.burstCapture.timeSlot = diagCmd->params[0];
+ break;
+
+ case MPH_DSP_DIAG_IDLE_FRAME_LOG_REQ:
+ if(diagCmd->params[0] == 0)
+ g_diagData.sendIdleFrameCapture = FALSE;
+ else
+ g_diagData.sendIdleFrameCapture = TRUE;
+ break;
+
+ case MPH_DSP_DIAG_SET_MASKING_THRESHOLDS:
+ g_TchBerThresh = diagCmd->params[0];
+ g_TchMetricThresh = (Short) ((diagCmd->params[1] << 8) | (diagCmd->params[2]));;
+ break;
+
+ case MPH_DSP_SET_LOOPBACK_MODE_REQ:
+
+ /*g_frmSync.state = SET_SYNC; */
+
+ switch(g_loopBackMode)
+ {
+ case NO_LOOPBACK:
+ case DSP_TCH_LOOPBACK:
+ case DSP_IQ_LOOPBACK:
+ case DSP_TCH_TO_HOST_LOOPBACK:
+ if (diagCmd->params[0] == BASEBAND_LOOPBACK)
+ {
+ /* g_frameCounts.TNNumInit = 2;*/
+ /*g_BBInfo[diagCmd->trx].ulBurst += 3;*/
+ frameOffset = 3;
+
+ INTR_GLOBAL_DISABLE();
+ /*g_BBInfo[diagCmd->trx].ulBurst &= 3; */
+ alignFrameProc(frameOffset);
+ INTR_GLOBAL_ENABLE();
+ }
+ g_loopBackMode = diagCmd->params[0];
+ break;
+
+
+ case BASEBAND_LOOPBACK:
+ if(diagCmd->params[0] != BASEBAND_LOOPBACK)
+ {
+ frameOffset = -3;
+
+ INTR_GLOBAL_DISABLE();
+ /*g_BBInfo[diagCmd->trx].ulBurst &= 3; */
+ alignFrameProc(frameOffset);
+ INTR_GLOBAL_ENABLE();
+ }
+ g_loopBackMode = diagCmd->params[0];
+ break;
+
+ default:
+ break;
+ }
+ CommRspMsg.msgSize = MSG_HEAD_SIZE+1;
+ CommRspMsg.function = DIAGNOSTIC_MSG;
+ CommRspMsg.trx = diagCmd->trx;
+ CommRspMsg.typeLoByte = MPH_DSP_SET_LOOPBACK_MODE_RSP;
+ CommRspMsg.typeHiByte = MPH_DSP_SET_LOOPBACK_MODE_RSP >> 8;
+ CommRspMsg.params[0] = g_loopBackMode;
+ sendMsgHost(& CommRspMsg);
+
+ /*
+ * initialize frame number counters
+
+ INTR_DISABLE(CPU_INT7);
+ INTR_DISABLE(CPU_INT8);
+ setFrameNum.FN = 0;
+ sysFrameNum.FN = 0;
+ sysFrameNum.t1 = 0;
+ sysFrameNum.t2 = 0;
+ sysFrameNum.t3 = 0;
+ g_frmSync.state == SET_SYNC;
+ chanCodecInit();
+ init_hw();
+ */
+
+ break;
+
+ case MPH_DSP_DIAG_SWITCH_RADIO_LINK_LOST:
+ if(diagCmd->params[0] == 0)
+ g_diagData.sendRadioLinkLost = FALSE;
+ else
+ g_diagData.sendRadioLinkLost = TRUE;
+ break;
+
+ case MPH_DSP_DIAG_SWITCH_GPRS_RATE_TRAN:
+ if(diagCmd->params[0] == 0)
+ g_RATE_TRAN_ON = FALSE;
+ else
+ g_RATE_TRAN_ON = TRUE;
+
+ g_ULCCHData.chCodec = GPRS_CS_1;
+ break;
+
+ case MPH_DSP_DIAG_SWITCH_AGC:
+ if(diagCmd->params[0] == 0)
+ g_AGC_ON = FALSE;
+ else
+ g_AGC_ON = TRUE;
+ break;
+
+ case MPH_DSP_DIAG_SWITCH_POWER_CONTROL:
+ if(diagCmd->params[0] == 0)
+ g_DPC_ON = FALSE;
+ else
+ g_DPC_ON = TRUE;
+ break;
+
+ case MPH_DSP_DIAG_DL_DMA_ADJ:
+ g_dlDmaAdj = diagCmd->params[0];
+ break;
+
+ case MPH_DSP_DIAG_CHK_QUEUE_REQ:
+ CommRspMsg.msgSize = MSG_HEAD_SIZE+12;
+ CommRspMsg.function = DIAGNOSTIC_MSG;
+ CommRspMsg.trx = diagCmd->trx;
+ CommRspMsg.typeLoByte = MPH_DSP_DIAG_CHK_QUEUE_RSP;
+ CommRspMsg.typeHiByte = MPH_DSP_DIAG_CHK_QUEUE_RSP >> 8;
+ * (Int32 *) & ( CommRspMsg.params[0]) = RspQue->msgOverflow;
+ * (Int32 *) & ( CommRspMsg.params[4]) = HmsgQue->msgOverflow;
+ * (Int32 *) & ( CommRspMsg.params[8]) = FastRspQue->msgOverflow;
+ * (Int32 *) & ( CommRspMsg.params[12]) = FastHmsgQue->msgOverflow;
+ sendMsgHost(& CommRspMsg);
+ break;
+
+ case MPH_DSP_DIAG_SET_DUMMY_BURST_MODE:
+ if(diagCmd->params[0] == 0)
+ g_IdleFrameMode = FALSE;
+ else
+ g_IdleFrameMode = TRUE; /* send dummy bursts when inactive */
+ break;
+
+ case MPH_DSP_DIAG_TBF_ACT:
+
+
+ /*---------------------------------------------
+ * Initialize diagnostic GPRS MS Report parameters
+ *--------------------------------------------*/
+ initGprsMsReport(diagCmd->trx, g_tbfInfo[0][0].ulTbf.tfi);
+
+
+ /*
+ * init a TBF pair g_tbfInfo[trx][Serial Number].
+ */
+ g_tbfInfo[0][0].dlTbf.state = CHAN_ACTIVE;
+ g_tbfInfo[0][0].dlTbf.tfi = 0;
+ g_tbfInfo[0][0].dlTbf.timeSlotAllocation = 1 << diagCmd->params[0];
+ g_tbfInfo[0][0].dlTbf.channelCodec = diagCmd->params[1];
+
+ g_tbfInfo[0][0].ulTbf.state = CHAN_ACTIVE;
+ g_tbfInfo[0][0].ulTbf.tfi = 0;
+ g_tbfInfo[0][0].ulTbf.tbfMode = TBF_DYNAMIC;
+ g_tbfInfo[0][0].ulTbf.timeSlotAllocation = 1<<diagCmd->params[0]; /* USF diagCmd->params[1] */
+ g_tbfInfo[0][0].ulTbf.opMode.dynamic.usfTsMap = 0; //diagCmd->params[1] << (diagCmd->params[0]<<2); /* 0x00050000; USF 5 on Time Slot 4 */
+ g_tbfInfo[0][0].ulTbf.channelCodec = diagCmd->params[1];
+ g_tbfInfo[0][0].ulTbf.tai = 0;
+ g_tbfInfo[0][0].ulTbf.taiTimeSlot = diagCmd->params[0];
+ g_tbfInfo[0][0].ulTbf.timingAdvance = 0;
+ g_tbfInfo[0][0].ulTbf.sigqual.berAve = 0;
+ g_tbfInfo[0][0].ulTbf.sigqual.blerAve = 0;
+ g_tbfInfo[0][0].ulTbf.sigqual.berAve = 0;
+ g_tbfInfo[0][0].ulTbf.sigqual.blerAve = 0;
+
+ if ((diagCmd->params[2] & 0x01) == 1)
+ {
+ ts = & g_BBInfo[diagCmd->trx].TNInfo[diagCmd->params[0]];
+
+ g_tbfInfo[0][0].ulTbf.opMode.dynamic.usfTsMap = (diagCmd->params[2] << 24) |
+ (diagCmd->params[3] << 16) |
+ (diagCmd->params[4] << 8) |
+ (diagCmd->params[5]); /* ex: Usf=3 on TS3 */
+ ts->u.group13.nextUsf = (g_tbfInfo[0][0].ulTbf.opMode.dynamic.usfTsMap >>
+ (2 << diagCmd->params[0])) & 0x07;
+ ts->u.group13.currentUsf = ts->u.group13.nextUsf;
+ }
+
+ sendDiagMsg(0x99, diagCmd->trx, diagCmd->params[0], 1, & diagCmd->params[1] );
+
+ break;
+
+
+ default:
+ ReportError(UNKNOWN_CMD, diagCmd->trx, 0, 2, & diagCmd->typeHiByte);
+ Result = FAILURE;
+ break;
+ }
+ return(Result);
+}
+
diff --git a/data/mnet/GP10/Dsp/asynchctrl/oammsg.c b/data/mnet/GP10/Dsp/asynchctrl/oammsg.c
new file mode 100644
index 0000000..a8ff801
--- /dev/null
+++ b/data/mnet/GP10/Dsp/asynchctrl/oammsg.c
@@ -0,0 +1,463 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+*
+* File: oammsg.c
+*
+* Description:
+* This file contains functionality needed for parsing OA&M
+* messages from the layer 3 (RRM). Inside these messages, exists
+* the (re) parameterization of GSM functionality for dynamic power
+* control and handover.
+*
+******************************************************************************/
+#include "string.h"
+#include "math.h"
+#include "gsmdata.h"
+#include "oamdata.h"
+#include "dsp/dsphmsg.h"
+#include "l1config.h"
+#include "regs.h"
+#include "dsp6201.h"
+#include "agcdata.h"
+#include "dsprotyp.h"
+#include <intr.h>
+
+/*****************************************************************************
+*
+* Function: dBmToReductionXlate
+*
+* Description:
+* Translates power in dBm to Power Reduction Value 0-15.
+* Used only by oamMsgProc in same file.
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dBmToReductionXlate(Bool serveCell, Uint16 index, Uint8 dBmValue)
+{
+ Uint8 pwrReductionValue;
+
+ /*
+ * 0-1 dBm translates to Reduction Value 15, 2-3 dBm translates to 14, etc.
+ */
+ if ( dBmValue <= 30 )
+ {
+ pwrReductionValue = 15 - dBmValue/2;
+ }
+ else
+ {
+ pwrReductionValue = 0;
+ }
+
+ /*
+ * Copy result to serving cell or neighbor as appropriate
+ */
+ if (serveCell)
+ {
+ g_HoOAMInfo.serveParms.msTxPwrMax = pwrReductionValue;
+ }
+ else
+ {
+ g_HoOAMInfo.uniqueParms[index].msTxPwrMax = pwrReductionValue;
+ }
+
+ return;
+}
+
+/*****************************************************************************
+*
+* Function: oamMsgProc
+*
+* Description:
+* Processes OAM Messeges received from the host and populates the global
+* data structures for dynamic power control and handover OA&M parameters
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+ProcResult oamMsgProc(msgStruc *p_msg)
+{
+ ProcResult result;
+ Uint16 index;
+ Uint8 indxcnt, i, j;
+ static Uint8 flushBfrFlag = 0;
+ static Uint8 indxcntr;
+ Uint16 msgType;
+ Uint8 rfCh;
+ Uint8 timeSlot;
+ msgStruc respMsg;
+ t_BBInfo *bbInfo;
+ Int16 txPwrOffsetForArfcn=0;
+ Uint8 temp[36];
+ t_PNbufs *PNbufs;
+ t_TNInfo *ts;
+ Bool dlDtxMode;
+ Bool ulDtxMode;
+
+ result = SUCCESS; /* set default result */
+ rfCh = p_msg->trx & 0x1;
+ bbInfo = & g_BBInfo[rfCh];
+ msgType = (p_msg->typeHiByte << 8) | (p_msg->typeLoByte);
+
+ switch (msgType)
+ {
+ case OAM_DPC_CONFIG:
+ /* sample buffer size for averaging. To get an average from a sacch frame takes 480 ms */
+ g_DynPwrOAMInfo.ulsigstren.numRxSigSamples = p_msg->params[0];
+ g_DynPwrOAMInfo.ulsigqual.numRxSigSamples = p_msg->params[1];
+
+ /* set threshold for activating uplink dynamic power control (RXLEV_UL_P) */
+ g_DpcRxLevThresh = p_msg->params[2];
+
+ temp[0] = g_DynPwrOAMInfo.ulsigstren.numRxSigSamples;
+ temp[1] = g_DynPwrOAMInfo.ulsigqual.numRxSigSamples;
+ temp[2] = g_DpcRxLevThresh;
+
+ sendDiagMsg(0x99,0,0,3,temp);
+
+ /* Send Acknowledgement */
+ respMsg.msgSize = 4;
+ respMsg.function = OAM_MANAGE_MSG;
+ respMsg.typeHiByte = OAM_DPC_CONFIG_ACK >> 8;
+ respMsg.typeLoByte = OAM_DPC_CONFIG_ACK;
+ respMsg.trx = 0; /* for now */
+ SendMsgHost_Que(&respMsg);
+
+ break;
+
+ case OAM_HO_SCELL_CONFIG:
+ /* these parameters are used by serving cell only */
+
+ /* uplink threshold in RXLEV units */
+ g_DynPwrOAMInfo.ulsigstren.LRxPwrULH = p_msg->params[0];
+
+ /* downlink threshold in RXLEV units */
+ g_DynPwrOAMInfo.dlsigstrenSCell.LRxLevDLH = p_msg->params[1];
+
+ /* P-N downlink or uplink as defined in 05.08 */
+ g_DynPwrOAMInfo.sigstren.pxH = p_msg->params[2];
+ g_DynPwrOAMInfo.sigstren.nxH = p_msg->params[3];
+
+ /* uplink threshold */
+ g_DynPwrOAMInfo.ulsigqual.LRxQualULH = p_msg->params[4];
+
+ /* downlink threshold */
+ g_DynPwrOAMInfo.dlsigqualSCell.LRxQualDLH = p_msg->params[5];
+
+ /* P-N downlink or uplink as defined in 05.08 */
+ g_DynPwrOAMInfo.sigqual.pxH = p_msg->params[6];
+ g_DynPwrOAMInfo.sigqual.nxH = p_msg->params[7];
+
+ /* defaults for serving cell or undefined adjacent cells */
+ g_HoOAMInfo.serveParms.hoMargin = p_msg->params[8];
+
+ /* need to translate GSM 12.20 range in dBm [+30..0] to power level range [0..15] */
+ dBmToReductionXlate(TRUE, 0, p_msg->params[9]);
+
+ g_HoOAMInfo.serveParms.rxLevMin = p_msg->params[10];
+
+ /*-------------------------------------------------------
+ * Initialize P-N buffers for handover processing
+ *-------------------------------------------------------*/
+ INTR_GLOBAL_DISABLE();
+
+ for (i=0; i<NUM_TS_PER_RF; i++) {
+ PNbufs = & g_PNbufs[i];
+
+ PNbufs->hoUL.sigstren.index = 0;
+ PNbufs->hoUL.sigstren.flagsum = 0;
+ PNbufs->hoDL.sigstrenSCell.index = 0;
+ PNbufs->hoDL.sigstrenSCell.flagsum = 0;
+
+ PNbufs->hoUL.sigqual.index = 0;
+ PNbufs->hoUL.sigqual.flagsum = 0;
+ PNbufs->hoDL.sigqualSCell.index = 0;
+ PNbufs->hoDL.sigqualSCell.flagsum = 0;
+
+ for(j=0; j < NXBUF_SIZ_MAX; j++) {
+ PNbufs->hoUL.sigstren.flag[j] = 0;
+ PNbufs->hoUL.sigqual.flag[j] = 0;
+ PNbufs->hoDL.sigstrenSCell.flag[j] = 0;
+ PNbufs->hoDL.sigqualSCell.flag[j] = 0;
+ }
+ }
+
+ INTR_GLOBAL_ENABLE();
+ /* end P and N buffer init */
+
+ /* !! DEBUG */
+ temp[0] = g_DynPwrOAMInfo.ulsigstren.LRxPwrULH;
+ temp[1] = g_DynPwrOAMInfo.dlsigstrenSCell.LRxLevDLH;
+ temp[2] = g_DynPwrOAMInfo.sigstren.pxH;
+ temp[3] = g_DynPwrOAMInfo.sigstren.nxH;
+ temp[4] = g_DynPwrOAMInfo.ulsigqual.LRxQualULH;
+ temp[5] = g_DynPwrOAMInfo.dlsigqualSCell.LRxQualDLH;
+ temp[6] = g_DynPwrOAMInfo.sigqual.pxH;
+ temp[7] = g_DynPwrOAMInfo.sigqual.nxH;
+ temp[8] = g_HoOAMInfo.serveParms.hoMargin;
+ temp[9] = g_HoOAMInfo.serveParms.msTxPwrMax;
+ temp[10] = g_HoOAMInfo.serveParms.rxLevMin;
+
+ sendDiagMsg(0x99,0,0,11,temp);
+
+ /* Send Acknowledgement */
+ respMsg.msgSize = 4;
+ respMsg.function = OAM_MANAGE_MSG;
+ respMsg.typeHiByte = OAM_HO_SCELL_CONFIG_ACK >> 8;
+ respMsg.typeLoByte = OAM_HO_SCELL_CONFIG_ACK;
+ respMsg.trx = p_msg->trx;
+ SendMsgHost_Que(&respMsg);
+
+ break;
+
+ case OAM_HO_NCELL_CONFIG:
+
+ /* parameters unique to a (adjacent) neighbouring cell only */
+
+ /* AdjCell_HandoverEntry.adjCell_handoverIndex (0..32) from vipermib.h is for t_HoOAMInfo */
+ index = p_msg->params[0];
+
+ /* number available indices to expect. no dsp report if this value is never met. */
+ indxcnt = p_msg->params[1];
+
+ /* flush all previous entries in global and local memory for neighbour cells */;
+ if(flushBfrFlag == 0) {
+
+ flushBfrFlag = 1; /* set */
+ indxcntr = indxcnt;
+ for(j=0; j < NUM_NCELLS; j++) {
+ g_HoOAMInfo.uniqueParms[j].rfCh = 0;
+ g_HoOAMInfo.uniqueParms[j].bsic = 0;
+ g_HoOAMInfo.uniqueParms[j].hoMargin = 0;
+ g_HoOAMInfo.uniqueParms[j].msTxPwrMax = 0;
+ g_HoOAMInfo.uniqueParms[j].rxLevMin = 0;
+ }
+ }
+
+ /* AdjCell_HandoverEntry.adjCell_bCCHFrequency from vipermib.h = ARFCN value */
+ g_HoOAMInfo.uniqueParms[index].rfCh = (p_msg->params[2] << 8) | p_msg->params[3];
+
+ /* AdjCell_HandoverEntry.adjCell_ncc (3 bit sub field in bsic) from vipermib.h */
+ g_HoOAMInfo.uniqueParms[index].bsic = p_msg->params[4];
+
+ /* AdjCell_HandoverEntry.adjCell_hoMargin from vipermib.h */
+ g_HoOAMInfo.uniqueParms[index].hoMargin = p_msg->params[5];
+
+ /* AdjCell_HandoverEntry.adjCell_msTxPwrMaxCell from vipermib.h */
+
+ /* need to translate GSM 12.20 range in dBm [+30..0] to power level range [0..15] */
+ dBmToReductionXlate(FALSE, index, p_msg->params[6]);
+
+ /* AdjCell_HandoverEntry.adjCell_rxLevMinCell from vipermib.h */
+ g_HoOAMInfo.uniqueParms[index].rxLevMin = p_msg->params[7];
+
+ /* reset the flag to flush previous entries for next time ViperWatch is modified */
+ indxcntr -= 1;
+
+ if(indxcntr == 0) {
+ flushBfrFlag = 0;
+ }
+
+ /* !! DEBUG */
+ temp[0] = index;
+ temp[1] = indxcnt;
+ temp[2] = g_HoOAMInfo.uniqueParms[index].rfCh;
+ temp[3] = g_HoOAMInfo.uniqueParms[index].bsic;
+ temp[4] = g_HoOAMInfo.uniqueParms[index].hoMargin;
+ temp[5] = g_HoOAMInfo.uniqueParms[index].msTxPwrMax;
+ temp[6] = g_HoOAMInfo.uniqueParms[index].rxLevMin;
+ temp[7] = flushBfrFlag;
+ temp[8] = indxcntr;
+ sendDiagMsg(0x99,0,0,9,temp);
+
+ /* Send Acknowledgement */
+ respMsg.msgSize = 5;
+ respMsg.function = OAM_MANAGE_MSG;
+ respMsg.typeHiByte = OAM_HO_NCELL_CONFIG_ACK >> 8;
+ respMsg.typeLoByte = OAM_HO_NCELL_CONFIG_ACK;
+ respMsg.trx = p_msg->trx;
+ respMsg.params[0] = index;
+ SendMsgHost_Que(&respMsg);
+
+ break;
+
+ case OAM_TXPWR_MAX_RDCT_CONFIG:
+
+ /*
+ * Convert Tx Max Power Reduction to DAC input range 0-255. Successive
+ * table entries corresponds with half-decibel decrements in Tx power.
+ * Frequency-dependent offset is expressed in half-decibel units, too.
+ */
+ g_TxStaticGainLevel = p_msg->params[0];
+ index = 4 * g_TxStaticGainLevel + g_CurrentTxPwrOffsetForArfcn;
+ if ( index >= NUM_TX_VS_PWR_LEVEL )
+ {
+ index = NUM_TX_VS_PWR_LEVEL - 1;
+ }
+ g_DSPC = g_TxMaxPwrRdct2DLPwrTbl[ index ];
+
+ /* !! DEBUG */
+ temp[0] = g_DSPC;
+ sendDiagMsg(0x99,0,0,1,temp);
+
+ /* Send Acknowledgement */
+ respMsg.msgSize = 5;
+ respMsg.function = OAM_MANAGE_MSG;
+ respMsg.typeHiByte = OAM_TXPWR_MAX_RDCT_CONFIG_ACK >> 8;
+ respMsg.typeLoByte = OAM_TXPWR_MAX_RDCT_CONFIG_ACK;
+ respMsg.trx = p_msg->trx;
+ respMsg.params[0] = g_DSPC;
+ SendMsgHost_Que(&respMsg);
+ break;
+
+
+ case OAM_PRACH_CONFIG:
+
+ if (p_msg->params[0] == 11){
+ g_PrachBits = 11;
+ } else {
+ g_PrachBits = 8;
+ }
+ /* Send Acknowledgement */
+ respMsg.msgSize = 4;
+ respMsg.function = OAM_MANAGE_MSG;
+ respMsg.typeHiByte = OAM_PRACH_CONFIG_ACK >> 8;
+ respMsg.typeLoByte = OAM_PRACH_CONFIG_ACK;
+ respMsg.trx = p_msg->trx;
+
+ SendMsgHost_Que(&respMsg);
+
+
+ break;
+
+
+ case OAM_G11_CONFIG:
+ /* This function is used to configure the group 11 parameters */
+ /* param 0 number of PBCCH blocks (1..4)
+ /* param 1 number of non PPCH and PBCCH blocks */
+ /* param 2 number of PRACH blocks (0..12)
+ /* param 3 PSI1_REPEAT_CYCLE (1..16) */
+
+
+
+
+ if ((p_msg->params[0]>0) && (p_msg->params[0] <5)){
+
+ g11Params.bsPBcchBlks = p_msg->params[0];
+ }
+
+
+ if (p_msg->params[1]< 12){
+ g11Params.bsPagBlksRes = p_msg->params[1];
+ }
+
+
+ if (p_msg->params[2]<= 12){
+ g11Params.bsPrachBlks = p_msg->params[2];
+ }
+
+ if ((p_msg->params[3] >0) && (p_msg->params[4] <=16)){
+ g11Params.psi1_repeat = p_msg->params[4];
+ }
+
+ g11Params.psi1_cycle = 52 * p_msg->params[4];
+
+ /* Setup for new assignment */
+
+ g11Params.newAssignment = TRUE;
+
+
+ /* Send Acknowledgement */
+ respMsg.msgSize = 4;
+ respMsg.function = OAM_MANAGE_MSG;
+ respMsg.typeHiByte = OAM_G11_CONFIG_ACK >> 8;
+ respMsg.typeLoByte = OAM_G11_CONFIG_ACK;
+ respMsg.trx = p_msg->trx;
+
+ SendMsgHost_Que(&respMsg);
+
+ break;
+
+ case OAM_BTS_BASIC_CONFIG:
+
+
+
+ /*
+ * Used for generic BTS paramters.
+ */
+ g_HoOAMInfo.serveParms.radioLinkTimeout = p_msg->params[0];
+
+ /*
+ * The BSPaMfrms = BSPaMfrms(MIB) + 2
+ */
+ if( p_msg->params[1] < 8)
+ {
+ /*
+ * check if new paging spread is set
+ */
+ if(g_BBInfo[rfCh].BSPaMfrms != p_msg->params[1]+2)
+ {
+ g_BBInfo[rfCh].BSPaMfrms = p_msg->params[1]+2;
+ g_frmSync.newPageState = TRUE;
+ }
+ }
+ else
+ {
+ ReportError(125, rfCh, 0, 1, & p_msg->params[1]);
+ }
+
+ /*
+ * Set correct UL and DL DTX modes for all slots (only necessary
+ * for active slots, but it doesn't hurt to set them all). Note:
+ * if DTX was previously on and is going off here, we rely on
+ * TCH processing functions to turn off ulDtxUsed.
+ */
+ ulDtxMode = (p_msg->params[2] & UL_DTX)==UL_DTX;
+ dlDtxMode = (p_msg->params[2] & DL_DTX)==DL_DTX;
+ /*--- Prohibit DL DTX on BCCH carrier ---*/
+ if(g_BBInfo[rfCh].TNInfo[0].groupNum == GSM_GROUP_5)
+ {
+ dlDtxMode = FALSE;
+ }
+ for( i=0; i<NUM_RFS_PER_DSP; i++ )
+ {
+ for ( timeSlot=0; timeSlot<NUM_TS_PER_RF; timeSlot++ )
+ {
+ if ( g_BBInfo[i].TNInfo[timeSlot].groupNum == GSM_GROUP_1 )
+ {
+ g_BBInfo[i].TNInfo[timeSlot].u.group1.tch.ULDtxMode = ulDtxMode;
+ g_BBInfo[i].TNInfo[timeSlot].u.group1.tch.DLDtxMode = dlDtxMode;
+ g_BBInfo[i].TNInfo[timeSlot].u.group1.tch.ulDtxUsed = TRUE;
+ g_BBInfo[i].TNInfo[timeSlot].u.group1.tch.dlDtxUsed = FALSE;
+ }
+ }
+ }
+
+ /* !! DEBUG */
+ sendDiagMsg(0x99,rfCh,0,3, p_msg->params);
+
+ /* Send Acknowledgement */
+ respMsg.msgSize = 5;
+ respMsg.function = OAM_MANAGE_MSG;
+ respMsg.typeHiByte = OAM_BTS_BASIC_CONFIG_ACK >> 8;
+ respMsg.typeLoByte = OAM_BTS_BASIC_CONFIG_ACK;
+ respMsg.trx = p_msg->trx;
+ respMsg.params[0] = g_HoOAMInfo.serveParms.radioLinkTimeout;
+ SendMsgHost_Que(&respMsg);
+ break;
+
+ }
+
+ return(result);
+}
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/asynchctrl/pdchmsg.c b/data/mnet/GP10/Dsp/asynchctrl/pdchmsg.c
new file mode 100644
index 0000000..e6c1dd7
--- /dev/null
+++ b/data/mnet/GP10/Dsp/asynchctrl/pdchmsg.c
@@ -0,0 +1,969 @@
+#include "string.h"
+#include "dsprotyp.h"
+#include "gsmdata.h"
+#include "agcdata.h"
+#include "dsprotyp.h"
+#include "intr.h"
+
+static DataBlkSizes[] = {23, 34, 39, 53, 0, 0, 0, 0};
+
+ProcResult pdchMsgProc(msgStruc *pdchMsg);
+static inline pacchReqMsg(msgStruc pdchMsg,
+ t_TNInfo* ts,
+ t_DLSigBufs* p_pacchDlBuf)
+{
+
+}
+
+/* static msg2DlSigBuf */
+/*******************************************************************************
+pdchMsgProc - PDCH Message Processing
+
+Process PDCH management messages received from the host.
+*/
+ProcResult pdchMsgProc
+ (
+ msgStruc *pdchMsg /* IN: message */
+ )
+{
+ dlTbfStruct* p_dlTbf;
+ Uint16 msgType;
+ Uint8 trxNum;
+ Uint8 psinfo;
+ Uint8 tsNum;
+ t_TNInfo* ts;
+ int i;
+ tbfStruct* p_tbfInfo;
+ ulTbfStruct* p_ulTbf;
+ Uint32 tlli;
+ msgStruc ackMsg;
+
+ msgType = (pdchMsg->typeHiByte << 8) | pdchMsg->typeLoByte;
+ trxNum = pdchMsg->trx & 0x01;
+
+/*
+ if ((ts->groupNum) == GSM_GROUP_12)
+ group =
+ else if ((ts->groupNum) == GSM_GROUP_13)
+ group =
+ else
+ return ERROR;
+*/
+
+ switch (msgType)
+ {
+
+
+
+
+ case PH_PTCCH_REQ:
+ { /*
+ ** rfch
+ *
+ * FILENAME: Y:\GP10\Dsp\asynchctrl\pdchmsg.c
+ *
+ * PARAMETERS:
+ *
+ * DESCRIPTION:
+ *
+ * RETURNS:
+ *
+ */
+
+ /* index constants */
+ const int iChanNum = 0;
+ const int iData = 2;
+
+ t_DLSigBufs* p_ptcchDlBuf; /* PTCCH down link signalling buffer */
+
+
+ tsNum = pdchMsg->params[iChanNum] & 0x07;
+ ts = &g_BBInfo[trxNum].TNInfo[tsNum];
+
+ INTR_DISABLE(CPU_INT8);
+
+ /* find the right buffer A PTCCH SubChannel number is required */
+
+ switch (ts->groupNum){
+ case GSM_GROUP_11:
+ p_ptcchDlBuf = ts->u.group11.ptcch.dlSigBuf;
+ break;
+ case GSM_GROUP_12:
+ p_ptcchDlBuf = ts->u.group12.ptcch.dlSigBuf;
+ break;
+ default:
+ p_ptcchDlBuf = ts->u.group13.ptcch.dlSigBuf;
+ break;
+ }
+
+
+ if (p_ptcchDlBuf->numMsgsReady == DL_SIG_Q_DEPTH)
+ {
+ ; /* UN_PROCESSED */
+ }
+ else
+ {
+ memcpy (p_ptcchDlBuf->data[p_ptcchDlBuf->writeIndex],
+ &pdchMsg->params[iData], 23);
+
+ if (++p_ptcchDlBuf->writeIndex == DL_SIG_Q_DEPTH)
+ p_ptcchDlBuf->writeIndex = 0;
+
+ p_ptcchDlBuf->numMsgsReady++;
+ }
+
+ INTR_ENABLE(CPU_INT8);
+
+ break;
+ }
+
+ case PH_PACCH_REQ:
+ {
+ /* index constants */
+ const int iChanNum = 0;
+ const int iTag = 2;
+ const int iBurstType = 3;
+ const int iData = 4;
+
+ t_DLSigBufs* p_pacchDlBuf; /* PACCH down link signalling buffer */
+
+
+ tsNum = pdchMsg->params[iChanNum] & 0x07;
+ ts = &g_BBInfo[trxNum].TNInfo[tsNum];
+
+ INTR_DISABLE(CPU_INT8);
+
+ /* find the right buffer */
+ switch (ts->groupNum){
+ case GSM_GROUP_11:
+ p_pacchDlBuf = ts->u.group11.pacch.dlSigBuf;
+ break;
+ case GSM_GROUP_12:
+ p_pacchDlBuf = ts->u.group12.pacch.dlSigBuf;
+ break;
+ default:
+ p_pacchDlBuf = ts->u.group13.pacch.dlSigBuf;
+ break;
+ }
+
+
+
+
+
+ if (p_pacchDlBuf->numMsgsReady == DL_SIG_Q_DEPTH)
+ {
+ ; /* UN_PROCESSED */
+ }
+ else
+ {
+ p_pacchDlBuf->tag[p_pacchDlBuf->writeIndex] = pdchMsg->params[iTag];
+ p_pacchDlBuf->burstType[p_pacchDlBuf->writeIndex] = pdchMsg->params[iBurstType];
+ memcpy (p_pacchDlBuf->data[p_pacchDlBuf->writeIndex], &pdchMsg->params[iData], 23);
+
+ if (++p_pacchDlBuf->writeIndex == DL_SIG_Q_DEPTH)
+ p_pacchDlBuf->writeIndex = 0;
+
+ p_pacchDlBuf->numMsgsReady++;
+ }
+
+ INTR_ENABLE(CPU_INT8);
+
+ break;
+ }
+
+ case PH_PDTCH_REQ:
+ {
+ /* index constants */
+ const int iChanNum = 0;
+ const int iTag = 2;
+ const int iBurstType = 3;
+ const int iCodecRate = 4;
+ const int iData = 5;
+
+ t_dlPdtchBufs* p_pdtchDlBuf;
+ Uint16 dataBlkSize;
+ Uint8* rdPtr;
+ Uint8* wrPtr;
+
+ tsNum = pdchMsg->params[iChanNum] & 0x07;
+ ts = &g_BBInfo[trxNum].TNInfo[tsNum];
+
+ INTR_DISABLE(CPU_INT8);
+
+ /* find the right buffer and data block size */
+
+ switch (ts->groupNum){
+ case GSM_GROUP_11:
+ p_pdtchDlBuf = ts->u.group11.pdtch.dlSigBuf;
+ dataBlkSize = DataBlkSizes[pdchMsg->params[iCodecRate]];
+ break;
+ case GSM_GROUP_12:
+ p_pdtchDlBuf = ts->u.group12.pdtch.dlSigBuf;
+ dataBlkSize = DataBlkSizes[pdchMsg->params[iCodecRate]];
+ break;
+ default:
+ p_pdtchDlBuf = ts->u.group13.pdtch.dlSigBuf;
+ dataBlkSize = DataBlkSizes[pdchMsg->params[iCodecRate]];
+ break;
+ }
+
+
+ /* these were added to support access burst acknowledgements */
+ p_pdtchDlBuf->tag[p_pdtchDlBuf->writeIndex] = pdchMsg->params[iTag];
+ p_pdtchDlBuf->burstType[p_pdtchDlBuf->writeIndex] = pdchMsg->params[iBurstType];
+ p_pdtchDlBuf->chCodec[p_pdtchDlBuf->writeIndex] = pdchMsg->params[iCodecRate];
+
+ if (p_pdtchDlBuf->frameCount < NUM_TCH_JBUF)
+ {
+ /* fill buffer */
+ rdPtr = &pdchMsg->params[iData];
+ wrPtr = (Uint8 *) p_pdtchDlBuf->buffer[p_pdtchDlBuf->writeIndex];
+ for (i = 0; i <dataBlkSize; i++)
+ *wrPtr++ = *rdPtr++;
+
+ /* update write index */
+ if (++p_pdtchDlBuf->writeIndex == NUM_TCH_JBUF)
+ p_pdtchDlBuf->writeIndex = 0;
+
+ /* update count */
+ p_pdtchDlBuf->frameCount++;
+ }
+
+ INTR_ENABLE(CPU_INT8);
+
+ break;
+ }
+
+ case PDCH_UL_TBF_ACT_REQ:
+ {
+ /* index constants */
+ const int iTlli = 0;
+ const int iTbfMode = 4;
+ const int iPdchGrpIndxTfi = 5;
+ const int iChannelCodec = 6;
+ const int iTsAlloc = 7;
+ const int iUsfTsMap = 8;
+ const int iTai = 12;
+
+ tlli = (pdchMsg->params[iTlli + 0] << 24) |
+ (pdchMsg->params[iTlli + 1] << 16) |
+ (pdchMsg->params[iTlli + 2] << 8) |
+ pdchMsg->params[iTlli + 3];
+ /*
+ * Look for TBF with matching TLLI
+ */
+ p_tbfInfo = NULL;
+ for ( i=0; (i<TBF_NUMBER_MAX) && p_tbfInfo==NULL; i++ )
+ {
+ if ( g_tbfInfo[trxNum][i].TLLI == tlli )
+ p_tbfInfo = &g_tbfInfo[trxNum][i];
+ }
+ /*
+ * If no TLLI match found, look for any available TBF
+ */
+ if ( p_tbfInfo == NULL )
+ {
+ for ( i=0; (i<TBF_NUMBER_MAX) && p_tbfInfo==NULL; i++ )
+ {
+ if ( g_tbfInfo[trxNum][i].dlTbf.state != CHAN_ACTIVE &&
+ g_tbfInfo[trxNum][i].ulTbf.state != CHAN_ACTIVE )
+ {
+ p_tbfInfo = &g_tbfInfo[trxNum][i];
+ }
+ }
+ }
+ /*
+ * If TLLI was found or new TBF assigned, set state parameters and ACK
+ */
+ if (p_tbfInfo)
+ {
+ p_tbfInfo->TLLI = tlli;
+ p_ulTbf = &p_tbfInfo->ulTbf;
+ switch (pdchMsg->params[iTbfMode])
+ {
+ case 0:
+ p_ulTbf->tbfMode = TBF_STATIC;
+ break;
+ case 1:
+ p_ulTbf->tbfMode = TBF_DYNAMIC;
+ break;
+ case 2:
+ p_ulTbf->tbfMode = TBF_DYNAMIC_EXTENDED;
+ break;
+ }
+ p_ulTbf->tfi = pdchMsg->params[iPdchGrpIndxTfi] & 0x1F;
+ p_ulTbf->channelCodec = pdchMsg->params[iChannelCodec];
+ p_ulTbf->timeSlotAllocation = pdchMsg->params[iTsAlloc];
+ if ((pdchMsg->params[iTbfMode] == 0) ||
+ (pdchMsg->params[iTbfMode] == 1))
+ {
+ p_ulTbf->opMode.dynamic.usfTsMap = (pdchMsg->params[iUsfTsMap + 0] << 24) |
+ (pdchMsg->params[iUsfTsMap + 1] << 16) |
+ (pdchMsg->params[iUsfTsMap + 2] << 8) |
+ (pdchMsg->params[iUsfTsMap + 3]);
+ }
+ p_ulTbf->taiTimeSlot = pdchMsg->params[iTai + 0] & 0x07;
+ p_ulTbf->tai = pdchMsg->params[iTai + 1] & 0x0F;
+ p_ulTbf->state = CHAN_ACTIVE;
+
+ /*
+ * Initialize for Coding Rate Change functionality.
+ */
+ p_ulTbf->sigqual.berAve = 0;
+ p_ulTbf->sigqual.blerAve = 0;
+
+ /* Send Acknowledgement */
+ ackMsg.msgSize = 20;
+ ackMsg.function = PDCH_MANAGE_MSG;
+ ackMsg.typeHiByte = PDCH_UL_TBF_ACT_ACK >> 8;
+ ackMsg.typeLoByte = PDCH_UL_TBF_ACT_ACK;
+ ackMsg.params[0] = (p_tbfInfo->TLLI >> 24) & 0xff;
+ ackMsg.params[1] = (p_tbfInfo->TLLI >> 16) & 0xff;
+ ackMsg.params[2] = (p_tbfInfo->TLLI >> 8) & 0xff;
+ ackMsg.params[3] = (p_tbfInfo->TLLI ) & 0xff;
+ ackMsg.params[4] = ((Uint16)p_tbfInfo >> 8 ) & 0xff;
+ ackMsg.params[5] = ((Uint16)p_tbfInfo ) & 0xff;
+ ackMsg.params[6] = p_ulTbf->tbfMode;
+ ackMsg.params[7] = p_ulTbf->tfi;
+ ackMsg.params[8] = p_ulTbf->channelCodec;
+ ackMsg.params[9] = p_ulTbf->timeSlotAllocation;
+ ackMsg.params[10] = (p_ulTbf->opMode.dynamic.usfTsMap >> 24) & 0xff;
+ ackMsg.params[11] = (p_ulTbf->opMode.dynamic.usfTsMap >> 16) & 0xff;
+ ackMsg.params[12] = (p_ulTbf->opMode.dynamic.usfTsMap >> 8) & 0xff;
+ ackMsg.params[13] = (p_ulTbf->opMode.dynamic.usfTsMap ) & 0xff;
+ ackMsg.params[14] = p_ulTbf->taiTimeSlot;
+ ackMsg.params[15] = p_ulTbf->tai;
+ SendMsgHost_Que(&ackMsg);
+
+ /*---------------------------------------------
+ * Initialize diagnostic GPRS MS Report parameters
+ *--------------------------------------------*/
+ initGprsMsReport(trxNum, p_ulTbf->tfi);
+
+ /* for(i=0; i<8; i++)
+ {
+ if( (p_ulTbf->timeSlotAllocation >> i ) & 0x01)
+ {
+
+ if(g_BBInfo[trxNum].TNInfo[i].groupNum == GSM_GROUP_13)
+ {
+ rtsCheck(trxNum, i, PDTCH, 0, (NUM_TCH_JBUF - ts->u.group13.pdtch.dlSigBuf->frameCount));
+ rtsCheck(trxNum, i, PACCH, 0, (DL_SIG_Q_DEPTH - ts->u.group13.pacch.dlSigBuf->numMsgsReady));
+ rtsCheck(trxNum, i, PTCCH, 0, (DL_SIG_Q_DEPTH - ts->u.group13.ptcch.dlSigBuf->numMsgsReady));
+
+ }
+ else if (g_BBInfo[trxNum].TNInfo[i].groupNum == GSM_GROUP_11)
+ {
+
+ rtsCheck(trxNum, i, PDTCH, 0, (NUM_TCH_JBUF - ts->u.group11.pdtch.dlSigBuf->frameCount));
+ rtsCheck(trxNum, i, PACCH, 0, (DL_SIG_Q_DEPTH - ts->u.group11.pacch.dlSigBuf->numMsgsReady));
+ rtsCheck(trxNum, i, PTCCH, 0, (DL_SIG_Q_DEPTH - ts->u.group11.ptcch.dlSigBuf->numMsgsReady));
+
+ }
+ else if (g_BBInfo[trxNum].TNInfo[i].groupNum == GSM_GROUP_12)
+ {
+
+ rtsCheck(trxNum, i, PDTCH, 0, (NUM_TCH_JBUF - ts->u.group12.pdtch.dlSigBuf->frameCount));
+ rtsCheck(trxNum, i, PACCH, 0, (DL_SIG_Q_DEPTH - ts->u.group12.pacch.dlSigBuf->numMsgsReady));
+ rtsCheck(trxNum, i, PTCCH, 0, (DL_SIG_Q_DEPTH - ts->u.group12.ptcch.dlSigBuf->numMsgsReady));
+
+ }
+ }
+ }
+*/
+
+ }
+ break;
+ }
+
+ case PDCH_UL_TBF_DEACT_REQ:
+ {
+ /* index constants */
+ const iTlli = 0;
+
+ tlli = (pdchMsg->params[iTlli + 0] << 24) |
+ (pdchMsg->params[iTlli + 1] << 16) |
+ (pdchMsg->params[iTlli + 2] << 8) |
+ pdchMsg->params[iTlli + 3];
+ /*
+ * Look for TBF with matching TLLI
+ */
+ p_tbfInfo = NULL;
+ for ( i=0; (i<TBF_NUMBER_MAX) && p_tbfInfo==NULL; i++ )
+ {
+ if ( g_tbfInfo[trxNum][i].TLLI == tlli )
+ p_tbfInfo = &g_tbfInfo[trxNum][i];
+ }
+ /*
+ * If TLLI was found, set state parameters and ACK
+ */
+ if (p_tbfInfo)
+ {
+ /* Set UL state inactive */
+ p_ulTbf = &p_tbfInfo->ulTbf;
+ p_ulTbf->state = CHAN_INACTIVE;
+ /* If DL is also inactive, zero out TLLI for cleaner diags */
+ p_dlTbf = &p_tbfInfo->dlTbf;
+ if ( p_dlTbf->state == CHAN_INACTIVE )
+ {
+ p_tbfInfo->TLLI = 0;
+ }
+ ackMsg.msgSize = 8;
+ ackMsg.function = PDCH_MANAGE_MSG;
+ ackMsg.typeHiByte = PDCH_UL_TBF_DEACT_ACK >> 8;
+ ackMsg.typeLoByte = PDCH_UL_TBF_DEACT_ACK;
+ ackMsg.params[0] = pdchMsg->params[0];
+ ackMsg.params[1] = pdchMsg->params[1];
+ ackMsg.params[2] = pdchMsg->params[2];
+ ackMsg.params[3] = pdchMsg->params[3];
+ SendMsgHost_Que(&ackMsg);
+ }
+ break;
+ }
+
+ case PDCH_DL_TBF_ACT_REQ:
+ {
+ /* index constants */
+ const int iTlli = 0;
+ const int iPdchGrpTfi = 4;
+ const int iChannelCodec = 5;
+ const int iTsAlloc = 6;
+ const int iMsPower = 7;
+ const int iTimingAdvance = 8;
+
+ tlli = (pdchMsg->params[iTlli + 0] << 24) |
+ (pdchMsg->params[iTlli + 1] << 16) |
+ (pdchMsg->params[iTlli + 2] << 8) |
+ pdchMsg->params[iTlli + 3];
+ /*
+ * Look for TBF with matching TLLI
+ */
+ p_tbfInfo = NULL;
+ for ( i=0; (i<TBF_NUMBER_MAX) && p_tbfInfo==NULL; i++ )
+ {
+ if ( g_tbfInfo[trxNum][i].TLLI == tlli )
+ p_tbfInfo = &g_tbfInfo[trxNum][i];
+ }
+ /*
+ * If no TLLI match found, look for any available TBF
+ */
+ if ( p_tbfInfo == NULL )
+ {
+ for ( i=0; (i<TBF_NUMBER_MAX) && p_tbfInfo==NULL; i++ )
+ {
+ if ( g_tbfInfo[trxNum][i].dlTbf.state != CHAN_ACTIVE &&
+ g_tbfInfo[trxNum][i].ulTbf.state != CHAN_ACTIVE )
+ {
+ /* Found available TBF. Initialize UL gain. */
+ p_tbfInfo = &g_tbfInfo[trxNum][i];
+ p_tbfInfo->ulTbf.sigstren.rxgain = g_USGC;
+ }
+ }
+ }
+ /*
+ * If TLLI was found or new TBF assigned, set state parameters and ACK
+ */
+ if (p_tbfInfo)
+ {
+ p_tbfInfo->TLLI = tlli;
+ p_dlTbf = &p_tbfInfo->dlTbf;
+ p_ulTbf = &p_tbfInfo->ulTbf;
+ p_dlTbf->tfi = pdchMsg->params[iPdchGrpTfi] & 0x1F;
+ p_dlTbf->channelCodec = pdchMsg->params[iChannelCodec];
+ p_dlTbf->timeSlotAllocation = pdchMsg->params[iTsAlloc];
+ p_ulTbf->timingAdvance = pdchMsg->params[iTimingAdvance];
+ p_dlTbf->state = CHAN_ACTIVE;
+
+ /* Send Acknowledgement */
+ ackMsg.msgSize = 14;
+ ackMsg.function = PDCH_MANAGE_MSG;
+ ackMsg.typeHiByte = PDCH_DL_TBF_ACT_ACK >> 8;
+ ackMsg.typeLoByte = PDCH_DL_TBF_ACT_ACK;
+ ackMsg.params[0] = (p_tbfInfo->TLLI >> 24) & 0xff;
+ ackMsg.params[1] = (p_tbfInfo->TLLI >> 16) & 0xff;
+ ackMsg.params[2] = (p_tbfInfo->TLLI >> 8) & 0xff;
+ ackMsg.params[3] = (p_tbfInfo->TLLI ) & 0xff;
+ ackMsg.params[4] = ((Uint16)p_tbfInfo >> 8 ) & 0xff;
+ ackMsg.params[5] = ((Uint16)p_tbfInfo ) & 0xff;
+ ackMsg.params[6] = p_dlTbf->tfi;
+ ackMsg.params[7] = p_dlTbf->channelCodec;
+ ackMsg.params[8] = p_dlTbf->timeSlotAllocation;
+ ackMsg.params[9] = p_ulTbf->timingAdvance;
+ SendMsgHost_Que(&ackMsg);
+
+ /*---------------------------------------------
+ * Initialize diagnostic GPRS MS Report parameters
+ *--------------------------------------------*/
+ initGprsMsReport(trxNum, p_dlTbf->tfi);
+ /*---------------------------------------------
+ * Initialize parameters for DL code rate monitoring
+ *--------------------------------------------*/
+ p_dlTbf->pktDlAckNack.ber = 0;
+ p_dlTbf->pktDlAckNack.berAve = 0;
+ p_dlTbf->pktDlAckNack.C_VALUE = 0;
+ p_dlTbf->pktDlAckNack.RXQUAL = 0;
+
+ for(i=0; i<NUM_TS_PER_RF; i++)
+ p_dlTbf->pktDlAckNack.iLevelTN[i] = 0xFF; /* values not valid */
+ }
+
+ /* for(i=0; i<8; i++)
+ {
+ if( (p_dlTbf->timeSlotAllocation >> i ) & 0x01)
+ {
+
+ if(g_BBInfo[trxNum].TNInfo[i].groupNum == GSM_GROUP_13)
+ {
+ rtsCheck(trxNum, i, PDTCH, 0, (NUM_TCH_JBUF - ts->u.group13.pdtch.dlSigBuf->frameCount));
+ rtsCheck(trxNum, i, PACCH, 0, (DL_SIG_Q_DEPTH - ts->u.group13.pacch.dlSigBuf->numMsgsReady));
+ rtsCheck(trxNum, i, PTCCH, 0, (DL_SIG_Q_DEPTH - ts->u.group13.pacch.dlSigBuf->numMsgsReady));
+
+ }
+ else if (g_BBInfo[trxNum].TNInfo[i].groupNum == GSM_GROUP_11)
+ {
+
+ rtsCheck(trxNum, i, PDTCH, 0, (NUM_TCH_JBUF - ts->u.group11.pdtch.dlSigBuf->frameCount));
+ rtsCheck(trxNum, i, PACCH, 0, (DL_SIG_Q_DEPTH - ts->u.group11.pacch.dlSigBuf->numMsgsReady));
+ rtsCheck(trxNum, i, PTCCH, 0, (DL_SIG_Q_DEPTH - ts->u.group11.pacch.dlSigBuf->numMsgsReady));
+
+ }
+ else if (g_BBInfo[trxNum].TNInfo[i].groupNum == GSM_GROUP_12)
+ {
+
+ rtsCheck(trxNum, i, PDTCH, 0, (NUM_TCH_JBUF - ts->u.group12.pdtch.dlSigBuf->frameCount));
+ rtsCheck(trxNum, i, PACCH, 0, (DL_SIG_Q_DEPTH - ts->u.group12.pacch.dlSigBuf->numMsgsReady));
+ rtsCheck(trxNum, i, PTCCH, 0, (DL_SIG_Q_DEPTH - ts->u.group12.pacch.dlSigBuf->numMsgsReady));
+
+ }
+ }
+ }
+
+ */
+ break;
+ }
+
+ case PDCH_DL_TBF_DEACT_REQ:
+ {
+ /* index constants */
+ const iTlli = 0;
+
+ tlli = (pdchMsg->params[iTlli + 0] << 24) |
+ (pdchMsg->params[iTlli + 1] << 16) |
+ (pdchMsg->params[iTlli + 2] << 8) |
+ pdchMsg->params[iTlli + 3];
+ /*
+ * Look for TBF with matching TLLI
+ */
+ p_tbfInfo = NULL;
+ for ( i=0; (i<TBF_NUMBER_MAX) && p_tbfInfo==NULL; i++ )
+ {
+ if ( g_tbfInfo[trxNum][i].TLLI == tlli )
+ p_tbfInfo = &g_tbfInfo[trxNum][i];
+ }
+ /*
+ * If TLLI was found, set state parameters and ACK
+ */
+ if (p_tbfInfo)
+ {
+ /* Set DL state inactive */
+ p_dlTbf = &p_tbfInfo->dlTbf;
+ p_dlTbf->state = CHAN_INACTIVE;
+ /* If UL is also inactive, zero out TLLI for cleaner diags */
+ p_ulTbf = &p_tbfInfo->ulTbf;
+ if ( p_ulTbf->state == CHAN_INACTIVE )
+ {
+ p_tbfInfo->TLLI = 0;
+ }
+ ackMsg.msgSize = 8;
+ ackMsg.function = PDCH_MANAGE_MSG;
+ ackMsg.typeHiByte = PDCH_DL_TBF_DEACT_ACK >> 8;
+ ackMsg.typeLoByte = PDCH_DL_TBF_DEACT_ACK;
+ ackMsg.params[0] = pdchMsg->params[0];
+ ackMsg.params[1] = pdchMsg->params[1];
+ ackMsg.params[2] = pdchMsg->params[2];
+ ackMsg.params[3] = pdchMsg->params[3];
+ SendMsgHost_Que(&ackMsg);
+ }
+ break;
+ }
+
+ case PDCH_UL_TBF_RECONFIG_REQ:
+ {
+ /* index constants */
+ const int iTlli = 0;
+ const int iTbfMode = 6;
+ const int iPdchGrpIndxTfi = 4;
+ const int iChannelCodec = 5;
+ const int iTsAlloc = 7;
+ const int iUsfTsMap = 8;
+ const int iTai = 12;
+
+ tlli = (pdchMsg->params[iTlli + 0] << 24) |
+ (pdchMsg->params[iTlli + 1] << 16) |
+ (pdchMsg->params[iTlli + 2] << 8) |
+ pdchMsg->params[iTlli + 3];
+ /*
+ * Look for TBF with matching TLLI
+ */
+ p_tbfInfo = NULL;
+ for ( i=0; (i<TBF_NUMBER_MAX) && p_tbfInfo==NULL; i++ )
+ {
+ if ( g_tbfInfo[trxNum][i].TLLI == tlli )
+ p_tbfInfo = &g_tbfInfo[trxNum][i];
+ }
+ /*
+ * If TLLI was found, set state parameters and ACK
+ */
+ if (p_tbfInfo)
+ {
+ p_tbfInfo->TLLI = tlli;
+ p_ulTbf = &p_tbfInfo->ulTbf;
+ switch (pdchMsg->params[iTbfMode])
+ {
+ case 0:
+ p_ulTbf->tbfMode = TBF_STATIC;
+ break;
+ case 1:
+ p_ulTbf->tbfMode = TBF_DYNAMIC;
+ break;
+ case 2:
+ p_ulTbf->tbfMode = TBF_DYNAMIC_EXTENDED;
+ break;
+ }
+ p_ulTbf->tfi = pdchMsg->params[iPdchGrpIndxTfi] & 0x1F;
+ p_ulTbf->channelCodec = pdchMsg->params[iChannelCodec];
+ p_ulTbf->timeSlotAllocation = pdchMsg->params[iTsAlloc];
+ if ((pdchMsg->params[iTbfMode] == 0) ||
+ (pdchMsg->params[iTbfMode] == 1))
+ {
+ p_ulTbf->opMode.dynamic.usfTsMap = (pdchMsg->params[iUsfTsMap + 0] << 24) |
+ (pdchMsg->params[iUsfTsMap + 1] << 16) |
+ (pdchMsg->params[iUsfTsMap + 2] << 8) |
+ (pdchMsg->params[iUsfTsMap + 3]);
+ }
+ p_ulTbf->taiTimeSlot = pdchMsg->params[iTai + 0] & 0x07;
+ p_ulTbf->tai = pdchMsg->params[iTai + 1] & 0x0F;
+
+ /* Send Acknowledgement */
+ ackMsg.msgSize = 20;
+ ackMsg.function = PDCH_MANAGE_MSG;
+ ackMsg.typeHiByte = PDCH_UL_TBF_RECONFIG_ACK >> 8;
+ ackMsg.typeLoByte = PDCH_UL_TBF_RECONFIG_ACK;
+ ackMsg.params[0] = (p_tbfInfo->TLLI >> 24) & 0xff;
+ ackMsg.params[1] = (p_tbfInfo->TLLI >> 16) & 0xff;
+ ackMsg.params[2] = (p_tbfInfo->TLLI >> 8) & 0xff;
+ ackMsg.params[3] = (p_tbfInfo->TLLI ) & 0xff;
+ ackMsg.params[4] = ((Uint16)p_tbfInfo >> 8 ) & 0xff;
+ ackMsg.params[5] = ((Uint16)p_tbfInfo ) & 0xff;
+ ackMsg.params[6] = p_ulTbf->tbfMode;
+ ackMsg.params[7] = p_ulTbf->tfi;
+ ackMsg.params[8] = p_ulTbf->channelCodec;
+ ackMsg.params[9] = p_ulTbf->timeSlotAllocation;
+ ackMsg.params[10] = (p_ulTbf->opMode.dynamic.usfTsMap >> 24) & 0xff;
+ ackMsg.params[11] = (p_ulTbf->opMode.dynamic.usfTsMap >> 16) & 0xff;
+ ackMsg.params[12] = (p_ulTbf->opMode.dynamic.usfTsMap >> 8) & 0xff;
+ ackMsg.params[13] = (p_ulTbf->opMode.dynamic.usfTsMap ) & 0xff;
+ ackMsg.params[14] = p_ulTbf->taiTimeSlot;
+ ackMsg.params[15] = p_ulTbf->tai;
+ SendMsgHost_Que(&ackMsg);
+
+ /*---------------------------------------------
+ * Initialize diagnostic GPRS MS Report parameters
+ *--------------------------------------------*/
+ initGprsMsReport(trxNum, p_ulTbf->tfi);
+
+ }
+ break;
+ }
+
+ case PDCH_DL_TBF_RECONFIG_REQ:
+ {
+ /* index constants */
+ const int iTlli = 0;
+ const int iPdchGrpTfi = 4;
+ const int iChannelCodec = 5;
+ const int iTsAlloc = 6;
+ const int iTimingAdvance = 8;
+
+ tlli = (pdchMsg->params[iTlli + 0] << 24) |
+ (pdchMsg->params[iTlli + 1] << 16) |
+ (pdchMsg->params[iTlli + 2] << 8) |
+ pdchMsg->params[iTlli + 3];
+
+ /* Look for TBF with matching TLLI */
+ p_tbfInfo = NULL;
+ for ( i=0; (i<TBF_NUMBER_MAX) && p_tbfInfo==NULL; i++ )
+ {
+ if ( g_tbfInfo[trxNum][i].TLLI == tlli )
+ p_tbfInfo = &g_tbfInfo[trxNum][i];
+ }
+ /*
+ * If TLLI was found, set state parameters and ACK
+ */
+ if (p_tbfInfo)
+ {
+ p_tbfInfo->TLLI = tlli;
+ p_dlTbf = &p_tbfInfo->dlTbf;
+ p_ulTbf = &p_tbfInfo->ulTbf;
+ p_dlTbf->tfi = pdchMsg->params[iPdchGrpTfi] & 0x1F;
+ p_dlTbf->channelCodec = pdchMsg->params[iChannelCodec];
+ p_dlTbf->timeSlotAllocation = pdchMsg->params[iTsAlloc];
+ p_ulTbf->timingAdvance = pdchMsg->params[iTimingAdvance];
+
+ /* Send Acknowledgement */
+ ackMsg.msgSize = 14;
+ ackMsg.function = PDCH_MANAGE_MSG;
+ ackMsg.typeHiByte = PDCH_DL_TBF_RECONFIG_ACK >> 8;
+ ackMsg.typeLoByte = PDCH_DL_TBF_RECONFIG_ACK;
+ ackMsg.params[0] = (p_tbfInfo->TLLI >> 24) & 0xff;
+ ackMsg.params[1] = (p_tbfInfo->TLLI >> 16) & 0xff;
+ ackMsg.params[2] = (p_tbfInfo->TLLI >> 8) & 0xff;
+ ackMsg.params[3] = (p_tbfInfo->TLLI ) & 0xff;
+ ackMsg.params[4] = ((Uint16)p_tbfInfo >> 8 ) & 0xff;
+ ackMsg.params[5] = ((Uint16)p_tbfInfo ) & 0xff;
+ ackMsg.params[6] = p_dlTbf->tfi;
+ ackMsg.params[7] = p_dlTbf->channelCodec;
+ ackMsg.params[8] = p_dlTbf->timeSlotAllocation;
+ ackMsg.params[9] = p_ulTbf->timingAdvance;
+ SendMsgHost_Que(&ackMsg);
+
+ /*---------------------------------------------
+ * Initialize diagnostic GPRS MS Report parameters
+ *--------------------------------------------*/
+ initGprsMsReport(trxNum, p_dlTbf->tfi);
+
+ /*---------------------------------------------
+ * Initialize parameters for DL code rate monitoring
+ *--------------------------------------------*/
+ p_dlTbf->pktDlAckNack.ber = 0;
+ p_dlTbf->pktDlAckNack.berAve = 0;
+ p_dlTbf->pktDlAckNack.C_VALUE = 0;
+ p_dlTbf->pktDlAckNack.RXQUAL = 0;
+
+ for(i=0; i<NUM_TS_PER_RF; i++)
+ p_dlTbf->pktDlAckNack.iLevelTN[i] = 0xFF; /* values not valid */
+
+ }
+ break;
+ }
+
+ case PDCH_SINGLE_BLOCK_ASSIGN_ALERT_ACK:
+ {
+ /* Message from L1Proxy telling us that the other DSP detected
+ * the SBA/Immediate Assign; each SBA entry in a watch table is set.
+ */
+ /* index constants */
+ const int iChanNum = 0;
+ const int iStartTime = 2;
+ Uint32 FN1;
+ Uint8 blockNum, tempbuf[6];
+
+ tsNum = pdchMsg->params[iChanNum] & 0x07;
+ ts = &g_BBInfo[trxNum].TNInfo[tsNum];
+
+ /* extract starting frame of UL block */
+ FN1 = (pdchMsg->params[iStartTime] << 24) |
+ (pdchMsg->params[iStartTime+1] << 16) |
+ (pdchMsg->params[iStartTime+2] << 8) |
+ pdchMsg->params[iStartTime+3];
+ /*
+ * Convert absolute frame number to block number (0..11)
+ */
+ blockNum = ((FN1%GPRS_MULTI_FRAMES)/(GPRS_MULTI_FRAMES/4)) * 3 +
+ (FN1%(GPRS_MULTI_FRAMES/4)) / 4;
+ if ( blockNum >= BLOCKS_PER_GPRS_MULTI_FRAMES ) blockNum = 0;
+
+ if( ts->u.group13.blkNumWatch[blockNum].tagFillCause != NONE) {
+ /*
+ * Diagnostic for debugging conflicts
+ */
+ tempbuf[0] = ts->u.group13.blkNumWatch[blockNum].tagFillCause;
+ tempbuf[1] = ts->u.group13.blkNumWatch[blockNum].tag;
+ tempbuf[2] = blockNum;
+ tempbuf[3] = (Uint8) ((Uint16)ts->u.group13.blkNumWatch[blockNum].tbf >> 8);
+ tempbuf[4] = (Uint8) ((Uint16)ts->u.group13.blkNumWatch[blockNum].tbf & 0xff);
+ sendDiagMsg(0x52,0,ts->tsNumber,5,tempbuf);
+ }
+
+ /*
+ * Add entry to watch table !! Overwrite for now, if a conflict exists
+ */
+ ts->u.group13.blkNumWatch[blockNum].tagFillCause = SBA;
+ ts->u.group13.blkNumWatch[blockNum].tag = SBA_TAG;
+ ts->u.group13.blkNumWatch[blockNum].tbf = NULL;
+
+ /*
+ * Diagnostic for debugging conflicts
+ */
+ tempbuf[0] = ts->u.group13.blkNumWatch[blockNum].tagFillCause;
+ tempbuf[1] = ts->u.group13.blkNumWatch[blockNum].tag;
+ tempbuf[2] = blockNum;
+ tempbuf[3] = (Uint8) ((Uint16)ts->u.group13.blkNumWatch[blockNum].tbf >> 8);
+ tempbuf[4] = (Uint8) ((Uint16)ts->u.group13.blkNumWatch[blockNum].tbf & 0xff);
+ sendDiagMsg(0x53,0,ts->tsNumber,5,tempbuf);
+
+ break;
+ }
+
+ case PDCH_DL_ACK_NACK_INFO:
+ {
+ /* Message from L1Proxy via RLC/MAC giving us inputs to the rate selection algorithm
+ * taken from the PACKET DOWNLINK ACK NACK RLC uplink control message.
+ */
+
+ Uint8 timeSlot, tempbuf[15];
+ Uint32 tlli;
+
+ /* index constants */
+ const int iTLLI = 0;
+ const int iTfi = 4;
+ const int iCVal = 5;
+ const int iRxQual = 6;
+ const int iILevelTNAvailMask = 7;
+
+ tlli = ((pdchMsg->params[iTLLI+0] << 24) |
+ (pdchMsg->params[iTLLI+1] << 16) |
+ (pdchMsg->params[iTLLI+2] << 8) |
+ pdchMsg->params[iTLLI+3] );
+
+ /*
+ * Look for TBF with matching TLLI
+ */
+ p_tbfInfo = NULL;
+ for ( i=0; (i<TBF_NUMBER_MAX) && p_tbfInfo==NULL; i++ )
+ {
+ if ( g_tbfInfo[trxNum][i].TLLI == tlli )
+ p_tbfInfo = &g_tbfInfo[trxNum][i];
+ }
+
+ /*
+ * If no TLLI match found, look for any available TBF
+ */
+ if ( p_tbfInfo == NULL )
+ {
+ /* Error */
+ }
+
+ /*
+ * If TLLI was found or new TBF assigned, set state parameters and ACK
+ */
+ if (p_tbfInfo)
+ {
+ p_dlTbf = &p_tbfInfo->dlTbf;
+
+ if (p_dlTbf->tfi == (pdchMsg->params[iTfi] & 0x1F))
+ {
+ p_dlTbf->pktDlAckNack.C_VALUE = pdchMsg->params[iCVal];
+ p_dlTbf->pktDlAckNack.RXQUAL = pdchMsg->params[iRxQual];
+
+ for(timeSlot=0; timeSlot<NUM_TS_PER_RF; timeSlot++)
+ {
+ if (((pdchMsg->params[iILevelTNAvailMask] >> timeSlot) & 0x01) == 1)
+ p_dlTbf->pktDlAckNack.iLevelTN[timeSlot] = pdchMsg->params[iILevelTNAvailMask+1+timeSlot];
+ else
+ p_dlTbf->pktDlAckNack.iLevelTN[timeSlot] = (p_dlTbf->pktDlAckNack.C_VALUE)/2; /* non-existent */
+ }
+
+ p_dlTbf->pktDlAckNack.ber = g_rxQual2ber_LookUpTbl[p_dlTbf->pktDlAckNack.RXQUAL];
+
+ /*
+ * Diagnostic
+ */
+ tempbuf[0] = tlli >> 24;
+ tempbuf[1] = tlli >> 16;
+ tempbuf[2] = tlli >> 8;
+ tempbuf[3] = tlli;
+ tempbuf[4] = p_dlTbf->tfi;
+ tempbuf[5] = p_dlTbf->pktDlAckNack.C_VALUE;
+ tempbuf[6] = p_dlTbf->pktDlAckNack.RXQUAL;
+ tempbuf[7] = pdchMsg->params[iILevelTNAvailMask];
+ sendDiagMsg(0x01,0,ts->tsNumber,8,tempbuf);
+ }
+ }
+
+ break;
+ }
+
+ case PDCH_DL_ASSIGN_ALERT_ACK:
+ {
+
+ /* Message from L1Proxy telling us that the other DSP detected
+ * the DL Assignment; thus, a DL Assign entry in a watch table is set.
+ */
+
+ /* index constants */
+ const int iChanNum = 0;
+ const int iStartTime = 2;
+ const int iTag = 6;
+ Uint32 FN1;
+ Uint8 blockNum, tempbuf[24];
+ Uint8 i;
+
+ tsNum = pdchMsg->params[iChanNum] & 0x07;
+ ts = &g_BBInfo[trxNum].TNInfo[tsNum];
+
+ /* extract starting frame of UL block */
+ FN1 = (pdchMsg->params[iStartTime] << 24) |
+ (pdchMsg->params[iStartTime+1] << 16) |
+ (pdchMsg->params[iStartTime+2] << 8) |
+ pdchMsg->params[iStartTime+3];
+ /*
+ * Convert absolute frame number to block number (0..11)
+ */
+ blockNum = ((FN1%GPRS_MULTI_FRAMES)/(GPRS_MULTI_FRAMES/4)) * 3 +
+ (FN1%(GPRS_MULTI_FRAMES/4)) / 4;
+ if ( blockNum >= BLOCKS_PER_GPRS_MULTI_FRAMES ) blockNum = 0;
+
+ if( ts->u.group13.blkNumWatch[blockNum].tagFillCause != NONE) {
+ /*
+ * Diagnostic for debugging conflicts
+ */
+ tempbuf[0] = ts->u.group13.blkNumWatch[blockNum].tagFillCause;
+ tempbuf[1] = ts->u.group13.blkNumWatch[blockNum].tag;
+ tempbuf[2] = blockNum;
+ tempbuf[3] = (Uint8) ((Uint16)ts->u.group13.blkNumWatch[blockNum].tbf >> 8);
+ tempbuf[4] = (Uint8) ((Uint16)ts->u.group13.blkNumWatch[blockNum].tbf & 0xff);
+ sendDiagMsg(0x53,0,ts->tsNumber,5,tempbuf);
+ }
+
+ /*
+ * Add entry to watch table !! Overwrite for now, if a conflict exists
+ */
+ ts->u.group13.blkNumWatch[blockNum].tagFillCause = DLA;
+ ts->u.group13.blkNumWatch[blockNum].tag = pdchMsg->params[iTag];
+ ts->u.group13.blkNumWatch[blockNum].tbf = NULL;
+
+ /*
+ * Diagnostic for debugging conflicts
+ */
+ for(i=0; i<12; i++)
+ {
+ tempbuf[i*2] = ts->u.group13.blkNumWatch[i].tagFillCause;
+ tempbuf[(i*2)+1] = ts->u.group13.blkNumWatch[i].tag;
+ }
+ sendDiagMsg(0x54,0,ts->tsNumber,24,tempbuf);
+
+ break;
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/asynchctrl/rrmsg.c b/data/mnet/GP10/Dsp/asynchctrl/rrmsg.c
new file mode 100644
index 0000000..5bca709
--- /dev/null
+++ b/data/mnet/GP10/Dsp/asynchctrl/rrmsg.c
@@ -0,0 +1,354 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* File: rrmsg.c
+*
+* Description:
+* This file contains defined constants, enumerations and type definitions
+* of shared items in support of the Layer 1 Baseband Processing routines.
+* An item is included in this header file if it is used by multiple
+* baseband processing functions.
+*
+*****************************************************************************/
+#include "string.h"
+#include "gsmdata.h"
+#include "dsp/dsphmsg.h"
+#include "rrmsg.h"
+#include "intr.h"
+#include "dsprotyp.h"
+
+/******************************************************************************/
+/* rrMsgProc - Radio Resource Messages Processing */
+/* Message send to Mobiles
+/******************************************************************************/
+ProcResult rrMsgProc(msgStruc *p_msg )
+{
+ ProcResult result;
+
+ switch (p_msg->typeHiByte<<8 | p_msg->typeLoByte)
+ {
+ case PH_DATA_REQ:
+ result = rcvPhDataReq(p_msg);
+ break;
+
+ default:
+ result = SUCCESS;
+ break;
+ }
+ return(result);
+}
+
+/******************************************************************************/
+/* rcvPhDataReq - receive PH_DATA_REQ */
+/******************************************************************************/
+ProcResult rcvPhDataReq(msgStruc *p_msg )
+{
+ Uint8 tsNum;
+ Uint8 cBits;
+ Uint8 ccch;
+ Uint8 subchan;
+ Uint8 linkId;
+ Uint8 *wrPtr, *rdPtr, i;
+ t_DLSigBufs *p_dlSigBuf;
+ t_CBCHInfo cbchBuf;
+ Uint8 cbchBlock;
+ Uint8 sacchMsgCheck = 0;
+ Uint8 queueDepth = DL_SIG_Q_DEPTH; /* default Q depth for most of the buffers */
+ ProcResult result;
+
+ tsNum = p_msg->params[0] & 0x07;
+ cBits = (p_msg->params[0]) >> 3;
+ ccch = p_msg->params[1] & 0x3f;
+ linkId = (p_msg->params[2]) >> 5;
+
+ cbchBlock = p_msg->params[2] & 0x3;
+ /*
+ * SMSCB message, different from normal RR Messages, is consistant of 4 blocks
+ */
+ if (cBits == IE_CBCH || cBits == IE_CBCH_EXT)
+ {
+ if(cBits == IE_CBCH)
+ {
+ cbchBuf.dlSigBuf = & g_dlSigBufsCBCH[0];
+ }
+ else
+ cbchBuf.dlSigBuf = & g_dlSigBufsCBCH[1];
+
+ cbchBuf.dlSigBuf->bufValid = 0;
+
+ wrPtr = cbchBuf.dlSigBuf->data[cbchBlock];
+
+ rdPtr = & p_msg->params[3];
+
+ for(i=0; i<DL_SIG_MSG_SIZE; i++) wrPtr[i] = rdPtr[i];
+
+ if(cbchBlock == 3) /* check the last block of SMSCB message */
+ {
+ /*
+ * one complete message is ready
+ */
+ cbchBuf.dlSigBuf->bufValid = 1;
+ }
+ return;
+ }
+
+ if (cBits)
+ {
+ if (cBits == 0x01)
+ {
+ if (linkId == 0)
+ p_dlSigBuf = &g_dlSigBufsFACCH[0][tsNum]; /* FACCH */
+ else if (linkId == 2)
+ {
+ p_dlSigBuf = &g_dlSigBufsTchSACCH[0][tsNum]; /* SACCH */
+ sacchMsgCheck = 1;
+ }
+ else
+ p_dlSigBuf = NULL;
+ }
+ else if (cBits < 0x04)
+ p_dlSigBuf = NULL; /* FACCH */ /* SACCH */
+ else if (cBits < 0x10)
+ {
+ if (cBits < 0x08)
+ subchan = cBits & 0x03; /* SDCCH/4 + SACCH */
+ else
+ subchan = cBits & 0x07; /* SDCCH/8 + SACCH */
+
+ if (linkId == 0){
+ if (cBits < 0x8)
+ p_dlSigBuf = &g_dlSigBufsSDCCH[0][tsNum][subchan]; /* SDCCH */
+ else
+ p_dlSigBuf = &g_dlSigBufsSDCCH8[0][0][subchan]; /* SDCCH8 */
+ }
+ else if (linkId == 2)
+ {
+ if (cBits < 0x8)
+ p_dlSigBuf = &g_dlSigBufsSACCH[0][tsNum][subchan]; /* SACCH */
+ else
+ p_dlSigBuf = &g_dlSigBufsSACCH8[0][0][subchan]; /* SACCH8 */
+
+ sacchMsgCheck = 1;
+ }
+ else
+ p_dlSigBuf = NULL;
+ }
+ else if (cBits == 0x10)
+ {
+ p_dlSigBuf = NULL; /* BCCH */
+ }
+
+ /* new PCH + AGCH scheme */
+ else if (cBits == 0x12)
+ {
+ /* new function */
+ putPPCHBuff(0, tsNum, ccch, RR_MANAGE_MSG, p_msg);
+
+ /* buffering of data done in putPCCHBuff() */
+ p_dlSigBuf = NULL;
+ }
+
+ else
+ p_dlSigBuf = NULL;
+ }
+
+ if (p_dlSigBuf != NULL)
+ {
+ /*
+ * Reserve 2 bytes L1 Header for SACCH
+ */
+ wrPtr = & (p_dlSigBuf->data[p_dlSigBuf->writeIndex][sacchMsgCheck<<1]);
+ rdPtr = &p_msg->params[3];
+
+ INTR_DISABLE(CPU_INT8);
+
+ /*
+ * check if specific Message QUEUE is full
+ */
+ if (p_dlSigBuf->numMsgsReady == queueDepth)
+ {
+ /*
+ * if queue is full, mark this message as unprocessed, it will be stored in
+ * a globla queue and processed later (applies to all messages except PCH,AGCH)
+ */
+ result = UN_PROCESSED;
+ }
+ else
+ {
+
+ /*
+ * The TI C6x compiler generates:
+ *
+ * DL_SIG_MSG_SIZE - (sacchMsgCheck<<1) != DL_SIG_MSG_SIZE - sacchMsgCheck<<1
+ *
+ */
+ for(i=0; i<(DL_SIG_MSG_SIZE - (sacchMsgCheck<<1)); i++) wrPtr[i] = rdPtr[i];
+
+ if(++p_dlSigBuf->writeIndex >= queueDepth) p_dlSigBuf->writeIndex = 0;
+
+ p_dlSigBuf->numMsgsReady++;
+ if (p_dlSigBuf->numMsgsReady > queueDepth)
+ {
+ p_dlSigBuf->overflow++; /* 5th arg to satisfy prototype */
+ ReportError(DCH_MSG_OVERFLOW, p_msg->trx, tsNum, 1, & ccch);
+ p_dlSigBuf->numMsgsReady = queueDepth;
+ }
+
+ result = SUCCESS;
+ }
+ INTR_ENABLE(CPU_INT8);
+ }
+ else
+ {
+ if (cBits != 0x12)
+ {
+ /*
+ * invalid RR Message
+ */
+ ReportError(13, p_msg->trx, tsNum, 20, (Uint8*)p_msg);
+ result = FAILURE;
+ }
+ }
+ return(result);
+}
+
+
+
+/******************************************************************************/
+/* chXlate - channel type translate */
+/******************************************************************************/
+void chXlate(t_groupNum groupNum,
+ t_chanSel chanType,
+ Uint8 subchan,
+ Uint8 *p_chanNum,
+ Uint8 *p_linkId
+ )
+{
+ switch (chanType)
+ {
+ case CBCH:
+ *p_chanNum = (IE_CBCH<<3);
+ *p_linkId = 0x0;
+ break;
+
+ case CBCH_EXT:
+ *p_chanNum = (IE_CBCH_EXT<<3);
+ *p_linkId = 0x0;
+ break;
+
+ case AGCH:
+ case PCH:
+ *p_chanNum = (0x12<<3);
+ *p_linkId = 0x0;
+ break;
+
+ case SACCH:
+ switch (groupNum)
+ {
+ case GSM_GROUP_1:
+ *p_chanNum = 0x08;
+ break;
+
+ case GSM_GROUP_2:
+ case GSM_GROUP_3:
+ *p_chanNum = 0x10 | ((subchan & 0x01)<< 3);
+ break;
+
+ case GSM_GROUP_5:
+ *p_chanNum = 0x20 | ((subchan & 0x03)<< 3);
+ break;
+
+ case GSM_GROUP_7:
+ *p_chanNum = 0x40 | ((subchan & 0x07)<< 3);
+ break;
+ }
+ *p_linkId = 0x40;
+ break;
+
+ case FACCH:
+ switch (groupNum)
+ {
+ case GSM_GROUP_1:
+ *p_chanNum = 0x08;
+ break;
+
+ case GSM_GROUP_2:
+ case GSM_GROUP_3:
+ *p_chanNum = 0x10 | (subchan << 3);
+ break;
+ }
+ *p_linkId = 0x00;
+ break;
+
+ case SDCCH4:
+ switch(groupNum){
+ case GSM_GROUP_5:
+ *p_chanNum = 0x20 | (subchan << 3);
+ break;
+
+ case GSM_GROUP_7:
+ *p_chanNum = 0x40 | ((subchan & 0x07)<< 3);
+ break;
+ }
+
+ *p_linkId = 0x00;
+ break;
+
+ case SDCCH8:
+ *p_chanNum = 0x40 | (subchan << 3);
+ *p_linkId = 0x00;
+ break;
+
+ case RACH:
+ switch (groupNum)
+ {
+ case GSM_GROUP_1:
+ *p_chanNum = 0x08;
+ *p_linkId = 0x00;
+ break;
+
+ default:
+ *p_chanNum = 0x88;
+ *p_linkId = 0x20;
+ break;
+ }
+ break;
+
+ case PRACH:
+ *p_chanNum = CHAN_NUM_IE_PRACH<<3;
+ *p_linkId = 0x00;
+ break;
+
+
+ case PACCH:
+ *p_chanNum = CHAN_NUM_IE_PACCH<<3;
+ *p_linkId = 0x00;
+ break;
+
+ case PTCCH:
+ *p_chanNum = CHAN_NUM_IE_PTCCH<<3;
+ *p_linkId = 0x00;
+ break;
+
+ case PDTCH:
+ *p_chanNum = CHAN_NUM_IE_PDTCH<<3;
+ *p_linkId = 0x00;
+ break;
+
+ default:
+ *p_chanNum = 0;
+ *p_linkId = 0x20;
+ }
+}
+
+
+
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/asynchctrl/tchmsg.c b/data/mnet/GP10/Dsp/asynchctrl/tchmsg.c
new file mode 100644
index 0000000..7f4da07
--- /dev/null
+++ b/data/mnet/GP10/Dsp/asynchctrl/tchmsg.c
@@ -0,0 +1,176 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: tchmsg.c
+*
+* Description:
+* This file contains functions that process TCH messages from the host.
+*
+* Public Functions:
+* tchFrameInit, tchMsgProc, sidMsgProc
+*
+* Private Functions:
+* none
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "dsp/dsphmsg.h"
+#include "dsp6201.h"
+#include "intr.h"
+#include "bbdata.h"
+#include "diagdata.h"
+#include "dsprotyp.h"
+
+/*****************************************************************************
+*
+* Function: tchFrameInit
+*
+* Description:
+* Initializes downlink TCH parameters
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void tchFrameInit(void)
+{
+ Int16 timeSlot;
+ for( timeSlot=0; timeSlot<8; timeSlot++)
+ {
+ g_dlTchFrame[timeSlot].frameCount = 0;
+ g_dlTchFrame[timeSlot].readIndex = 0;
+ g_dlTchFrame[timeSlot].writeIndex = 0;
+ }
+}
+
+/*****************************************************************************
+*
+* Function: tchMsgProc
+*
+* Description:
+* Process TCH messages from host
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+ProcResult tchMsgProc(msgUnionStruc *tchMsg)
+{
+ Uint8 rfCh;
+ Uint8 timeSlot;
+ Int16 i;
+ Uint32 *rdPtr;
+ t_TNInfo *ts;
+
+ rfCh = tchMsg->trx & 0x1;
+ timeSlot = tchMsg->u.params[0] & 0x7;
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ if ( g_loopBackMode == DSP_TCH_LOOPBACK )
+ {
+ /*
+ * downlink TCH frame comes from Uplink TCH frame
+ * don't take TCH frame from host
+ */
+ return(SUCCESS);
+ }
+ else if ( g_loopBackMode == DSP_TCH_TO_HOST_LOOPBACK )
+ {
+ /*
+ * Send downlink TCH frames back to host directly
+ */
+ tchMsg->typeHiByte = UP_LINK_TCH >> 8;
+ tchMsg->typeLoByte = UP_LINK_TCH;
+ SendMsgHost_Que((msgStruc*)tchMsg);
+ }
+
+ rdPtr = (Uint32 *) & tchMsg->u.tchInfo.tchFrame[0];
+ g_dlTchFrame[timeSlot].frameStarted = TRUE;
+
+ /*
+ * Check for properly incrementing RTP sequence number. Save for next time.
+ * If we're not in DL DTX mode, track out-of-sequence errors.
+ */
+ if ( tchMsg->u.tchInfo.rtpSeqNum != (g_dlTchFrame[timeSlot].rtpSeqNum+1) &&
+ !ts->u.group1.tch.DLDtxMode &&
+ !ts->u.group1.tch.ULDtxMode )
+ {
+ g_DlOutOfSequenceCount[rfCh][timeSlot] += 1;
+ }
+ g_dlTchFrame[timeSlot].rtpSeqNum = tchMsg->u.tchInfo.rtpSeqNum;
+
+ /*
+ * Copy GSM TCH payload to downlink TCH buffer, only if traffic frame type matches
+ * with current channel speech mode
+ */
+ if ( (ts->u.group1.tch.vocAlgo == VOC_EFR &&
+ (tchMsg->u.tchInfo.tchFrame[0] & 0xF0) == 0xC0) ||
+ (ts->u.group1.tch.vocAlgo == VOC_GSMF &&
+ (tchMsg->u.tchInfo.tchFrame[0] & 0xF0) == 0xD0))
+ {
+ INTR_DISABLE(CPU_INT8); /* disable burst interrupt */
+
+ for (i=0; i<10; i++)
+ {
+ g_dlTchFrame[timeSlot].buffer[g_dlTchFrame[timeSlot].writeIndex][i] = rdPtr[i];
+ }
+ /*
+ * Update buffer index (circular)
+ */
+ if ( ++g_dlTchFrame[timeSlot].writeIndex >= NUM_TCH_JBUF)
+ {
+ g_dlTchFrame[timeSlot].writeIndex = 0;
+ }
+ /*
+ * Increase frame count and check for overflow
+ */
+ if ( ++g_dlTchFrame[timeSlot].frameCount > NUM_TCH_JBUF )
+ {
+ g_DlOverflowCount[rfCh][timeSlot] += 1;
+ g_dlTchFrame[timeSlot].frameCount = NUM_TCH_JBUF;
+ /*
+ * New frame overwrote next buffer to be read. Set readIndex to oldest frame.
+ */
+ g_dlTchFrame[timeSlot].readIndex = g_dlTchFrame[timeSlot].writeIndex;
+ }
+ INTR_ENABLE(CPU_INT8); /* disable burst interrupt */
+ }
+ return(SUCCESS);
+}
+
+/*****************************************************************************
+*
+* Function: sidMsgProc
+*
+* Description:
+* Process SID messages from host
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+ProcResult sidMsgProc(msgUnionStruc *sidMsg)
+{
+ Uint8 timeSlot;
+ Int16 i;
+ Uint32 *rdPtr;
+ Uint32 *wrPtr;
+
+ timeSlot = sidMsg->u.params[0] & 0x7;
+
+ wrPtr = g_dlSidFrame[timeSlot].buffer;
+ /*
+ * copy GSM SID payload to downlink SID frame buffer
+ */
+ for(i=0; i<10; i++)
+ wrPtr[i] = rdPtr[i];
+
+ g_dlSidFrame[timeSlot].frameCount++;
+
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Dsp/asynchctrl/trxmsg.c b/data/mnet/GP10/Dsp/asynchctrl/trxmsg.c
new file mode 100644
index 0000000..c9446c0
--- /dev/null
+++ b/data/mnet/GP10/Dsp/asynchctrl/trxmsg.c
@@ -0,0 +1,674 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: trxmsg.c
+*
+* Description:
+* This file contains functions that process TRX messages from the host.
+*
+* Public Functions:
+* trxMsgProc, frequencyHoppingAlg
+*
+* Private Functions:
+* phConnectInd
+*
+******************************************************************************/
+#include "string.h"
+#include "math.h" /* is this needed? */
+#include "c6xsupport.h"
+#include "bbdata.h"
+#include "gsmdata.h"
+#include "oamdata.h"
+#include "dsp/dsphmsg.h"
+#include "l1config.h"
+#include "rrmsg.h"
+#include "regs.h"
+#include "dsp6201.h"
+#include "dsprotyp.h"
+#include "agcdata.h"
+#include "codec.h"
+
+#include <common.h>
+#include <mcbsp.h> /* mcbsp devlib */
+#include <mcbspdrv.h> /* mcbsp driver */
+#include <dma.h>
+#include <intr.h>
+#include <c6x.h>
+
+extern Uint8 g_maxCpuLoading;
+
+int HSN_LookUpTbl[114] =
+{ 48, 98, 63, 1, 36, 95, 78, 102, 94, 73,
+ 0, 64, 25, 81, 76, 59, 124, 23, 104, 100,
+ 101, 47, 118, 85, 18, 56, 96, 86, 54, 2,
+ 80, 34, 127, 13, 6, 89, 57, 103, 12, 74,
+ 55, 111, 75, 38, 109, 71, 112, 29, 11, 88,
+ 87, 19, 3, 68, 110, 26, 33, 31, 8, 45,
+ 82, 58, 40, 107, 32, 5, 106, 92, 62, 67,
+ 77, 108, 122, 37, 60, 66, 121, 42, 51, 126,
+ 117, 114, 4, 90, 43, 52, 53, 113, 120, 72,
+ 16, 49, 7, 79, 119, 61, 22, 84, 9, 97,
+ 91, 15, 21, 24, 46, 39, 93, 105, 65, 70,
+ 125, 99, 17, 123 };
+
+Uint8 g_NetIntConfig; /* Network Interface Configuration */
+Uint16 DLsynthA;
+Uint16 DLsynthB;
+Uint8 FPGADelay;
+
+/******************************************************************************/
+/* sendPhConnectInd - send PH_CONNECT_INDication messages to the host */
+/******************************************************************************/
+void phConnectInd (Uint8 tsNum, t_groupNum groupNum)
+{
+ msgStruc phConnectIndBuf;
+ Uint8 k;
+
+
+
+
+ phConnectIndBuf.msgSize = 7;
+ phConnectIndBuf.function = RR_MANAGE_MSG;
+ phConnectIndBuf.typeHiByte = PH_CONNECT_IND_HI;
+ phConnectIndBuf.typeLoByte = PH_CONNECT_IND_LO;
+ phConnectIndBuf.trx = 0; /* for now */
+
+
+ switch (groupNum)
+ {
+ case GSM_GROUP_1:
+ /* FACCH */
+ phConnectIndBuf.params[0] = 0x08 | (tsNum & 0x07); /* Chnnel No. */
+ phConnectIndBuf.params[1] = 0; /* Channel No. */
+ phConnectIndBuf.params[2] = 0x00; /* link identifier */
+ SendMsgHost_Que(&phConnectIndBuf);
+ /* SACCH */
+ phConnectIndBuf.params[0] = 0x08 | (tsNum & 0x07); /* Chnnel No. */
+ phConnectIndBuf.params[1] = 0; /* Channel No. */
+ phConnectIndBuf.params[2] = 0x40; /* link identifier */
+ SendMsgHost_Que(&phConnectIndBuf);
+ break;
+
+ case GSM_GROUP_5:
+ /* SDCCH */
+
+ for (k = 0; k < 4; k++){
+ phConnectIndBuf.params[0] = 0x20| (k <<3 )| tsNum; /* Channel No. */
+ phConnectIndBuf.params[1] = 0; /* Channel No. */
+ phConnectIndBuf.params[2] = 0; /* link identifier */
+ SendMsgHost_Que(&phConnectIndBuf);
+ }
+
+
+ /* SACCH */
+ for (k = 0; k <4; k++){
+ phConnectIndBuf.params[0] = 0x20 |(k<<3)| tsNum; /* Channel No. */
+ phConnectIndBuf.params[1] = 0; /* Channel No. */
+ phConnectIndBuf.params[2] = 0x40; /* link identifier */
+ SendMsgHost_Que(&phConnectIndBuf);
+ }
+
+ /* BCCH */
+ phConnectIndBuf.params[0] = 0x80 | tsNum; /* Channel No. */
+ phConnectIndBuf.params[1] = 0; /* Channel No. */
+ phConnectIndBuf.params[2] = 0x20; /* link identifier */
+ SendMsgHost_Que(&phConnectIndBuf);
+
+ /* RACH */
+ phConnectIndBuf.params[0] = 0x88 | tsNum; /* Channel No. */
+ phConnectIndBuf.params[1] = 0; /* Channel No. */
+ phConnectIndBuf.params[2] = 0x20; /* link identifier */
+ SendMsgHost_Que(&phConnectIndBuf);
+
+ /* PCH */
+ phConnectIndBuf.params[0] = 0x90 | tsNum; /* Channel No. */
+ phConnectIndBuf.params[1] = 0; /* Channel No. */
+ phConnectIndBuf.params[2] = 0x20; /* link identifier */
+ SendMsgHost_Que(&phConnectIndBuf);
+
+ /* AGCH */
+ phConnectIndBuf.params[0] = 0x90 | tsNum; /* Channel No. */
+ phConnectIndBuf.params[1] = 0; /* Channel No. */
+ phConnectIndBuf.params[2] = 0x20; /* link identifier */
+ SendMsgHost_Que(&phConnectIndBuf);
+
+ break;
+
+ case GSM_GROUP_7:
+
+
+ /* SDCCH */
+ for ( k = 0 ; k < NUM_SDCCH8_SUBCHANS; k++){
+ phConnectIndBuf.params[0] = 0x40| (k <<3) | tsNum; /* Channel No. */
+ phConnectIndBuf.params[1] = 0; /* Channel No. */
+ phConnectIndBuf.params[2] = 0; /* link identifier */
+ SendMsgHost_Que(&phConnectIndBuf);
+ }
+
+ /* SACCH */
+ for (k = 0; k < NUM_SDCCH8_SUBCHANS; k++){
+ phConnectIndBuf.params[0] = 0x40 | (k<<3) |tsNum; /* Channel No. */
+ phConnectIndBuf.params[1] = 0; /* Channel No. */
+ phConnectIndBuf.params[2] = 0x40; /* link identifier */
+ SendMsgHost_Que(&phConnectIndBuf);
+ }
+
+
+
+ break;
+
+ default:
+ break;
+
+ } /* switch */
+} /* phConnectInd */
+
+
+/*****************************************************************************
+*
+* Function: trxMsgProc
+*
+* Description:
+* Processes TRX Messeges received from the host
+*
+* Inputs:
+* msgStruc ptr to message structure
+*
+* Outputs:
+*
+******************************************************************************/
+ProcResult trxMsgProc (msgStruc *p_msg)
+{
+ ProcResult result;
+ Int32 nxtIndx;
+ Uint16 msgType;
+ msgStruc respMsg;
+ Uint8 rfCh;
+ t_BBInfo *bbInfo;
+ Int32 i;
+ Uint8 len, fcn, j, k;
+ Uint8 ref;
+ Uint16 arfcn;
+ Uint16 deltaArfcn;
+ Uint16 hiFactorTimes16;
+ Uint16 *TxOffsetArfcns;
+ Uint16 index, gainStepsPerDbTimes256;
+ Uint8 tempBuf[20];
+ t_groupNum groupNum;
+
+ Uint32 msgBuf[10];
+
+
+ result = SUCCESS; /* set default result */
+ rfCh = p_msg->trx & 0x01;
+ bbInfo = & g_BBInfo[rfCh];
+ msgType = (p_msg->typeHiByte << 8) | (p_msg->typeLoByte);
+ switch (msgType)
+ {
+ case TRX_CONFIG:
+
+ bbInfo->ais = p_msg->params[0]; /* Air Interface Standerd */
+ bbInfo->bsic = p_msg->params[1]; /* Base Station ID */
+ bbInfo->tseqNum = bbInfo->bsic & 7;
+ g_NetIntConfig = p_msg->params[2]; /* Network Interface Configuration */
+
+ /*
+ * update BSIC to SCH channel coding buffer
+ */
+ g_dlSigBufsSCH[rfCh][0].data[0][0] = g_BBInfo[rfCh].bsic<<2;
+ g_dlSigBufsSCH[rfCh][0].data[1][0] = g_BBInfo[rfCh].bsic<<2;
+
+ /*
+ * initialize ramping part of modualtion buffer according to Air standand
+ * via the IQSwap flag
+ */
+ bbInfo->IQSwap = p_msg->params[17] & 0x01; /* flag value */
+
+ /*
+ * Set measured values for agc target and radio band dependent characteristics.
+ * Measured values are taken using a particular radio with a received signal
+ * of g_MeasAgcDpcDbm. The static gain value (g_UlSG) is then adjusted
+ * to yield g_MeasAgcDpcDbr dBr. This is also the way to get the
+ * amplifier's gain characteristic (slope).
+ */
+ g_MeasAgcDpcDbm = MEAS_AGCDPC_DBM;
+ g_MeasAgcDpcDbr = RXPWR_TARGET;
+
+ /*
+ * Load the g_codecBsic variable based on the packed g_bsic variable
+ */
+ for(i=0; i<BSIC_LENGTH; i++)
+ {
+ g_codecBsic[BSIC_LENGTH-1-i] = (bbInfo->bsic >> i) & 0x0001;
+ }
+
+ /* NetIntMap [3] */
+
+ /* HopSeqNUM [11] */
+ bbInfo->HSN = p_msg->params[11];
+
+ /* MobAllocIndxOffset [12] */
+ bbInfo->MAIO = p_msg->params[12];
+
+ /* Set peripheral register for agc source to dsp control */
+ AGC_SRC_SELECT_REG |= (1 << DSP_FIXED_GAIN_CTRL_FLAG);
+
+ /* Send Acknowledgement */
+ respMsg.msgSize = 4;
+ respMsg.function = TRX_MANAGE_MSG;
+ respMsg.typeHiByte = TRX_CONFIG_ACK >> 8;
+ respMsg.typeLoByte = TRX_CONFIG_ACK;
+ respMsg.trx = 0; /* for now */
+ sendMsgHost(&respMsg);
+
+ break;
+
+ case SLOT_ACTIV:
+
+ groupNum = (t_groupNum)(p_msg->params[1] & 0xF);
+ tsConfigure((Int16)p_msg->trx, (Int16)p_msg->params[0] & 0x7, groupNum);
+ phConnectInd(p_msg->params[0] & 0x7, groupNum);
+
+ /* If any TS on this carrier contains BCCH, then send dummy bursts on all
+ * inactive TS. The Idle Frame Mode is initialized FALSE in dspinit() */
+ if ( groupNum == GSM_GROUP_4 ||
+ groupNum == GSM_GROUP_5 ||
+ groupNum == GSM_GROUP_6 )
+ {
+ g_IdleFrameMode = TRUE;
+ }
+ respMsg.msgSize = 6;
+ respMsg.function = TRX_MANAGE_MSG;
+ respMsg.typeHiByte = SLOT_ACTIV_ACK >> 8;
+ respMsg.typeLoByte = SLOT_ACTIV_ACK;
+ respMsg.trx = p_msg->trx;
+ respMsg.params[0] = p_msg->params[0];
+ respMsg.params[1] = p_msg->params[1];
+
+ g_frmSync.state = TS_RE_SYNC;
+ sendMsgHost(&respMsg);
+ break;
+
+ case TRX_CONFIG_MA:
+
+ len = ( p_msg->params[0] & 0x3F ) / 2;
+ /* bits 6-1: byte Length of ARFCN msgs. */
+ fcn = p_msg->params[0] & 0x80;
+ /* bit 8: Function (add/del ARFCNs) */
+ j=1; // index into MA array, always start at MA[1], MA[0] is unused.
+ k=0; // index into message sent from L3 host as TRX_CONFIG_MA.
+ // Since the Mobile Allocation[N] range is 1<=N<=64 we can
+ // get away with a (brute force) linear search. !!!! However,
+ // as N approaches numbers greater than 512 (large), this
+ // search will consume too much time. For now, using this search
+ // is faster and less complex than a non-linear search method.
+ // The chance of N being larger than 64 is not great in the
+ // product's near future.
+
+ switch (fcn)
+ {
+ case 0: // Delete ARFCN's
+ while (k != len){
+ if ( bbInfo->MA[j] ==
+ (p_msg->params[2*k+1] << 8) |
+ (p_msg->params[2*k+2]) ) {
+ bbInfo->MA[j] = -1;
+ k+=1;
+ bbInfo->N = bbInfo->N - 1; // N = num of allocated freqs.
+ }
+ j+=1;
+ }
+ break;
+
+ case 1: // Add ARFCN's
+ while (k != len){
+ if (bbInfo->MA[j] == -1) {
+ bbInfo->MA[j] = (p_msg->params[2*k+1] << 8) |
+ (p_msg->params[2*k+2]);
+ k+=1;
+ bbInfo->N = bbInfo->N + 1; // N = num of allocated freqs.
+ }
+ j+=1;
+ }
+ break;
+ }
+ bbInfo->NBIN = (int) LOG2(bbInfo->N) + 1;
+
+ /* Send Acknowledgement */
+ respMsg.msgSize = 4;
+ respMsg.function = TRX_MANAGE_MSG;
+ respMsg.typeHiByte = TRX_CONFIG_MA_ACK >> 8;
+ respMsg.typeLoByte = TRX_CONFIG_MA_ACK;
+ respMsg.trx = 0; /* for now */
+ sendMsgHost(&respMsg);
+
+ break;
+
+ case SLOT_REL:
+ break;
+
+ case SACCH_FILL:
+ sacchMsgProc( &(((msgUnionStruc *)p_msg)->u.sacchInfo),
+ &g_dlSigBufsSYSINFO[p_msg->trx & 1][p_msg->params[0] - SYS_INFO_5 + TYPE_5],
+ p_msg->params[0] );
+ break;
+
+ case ERROR_REPORT:
+ break;
+
+ case SET_UL_GAIN:
+
+ /* Setup Hardware */
+ g_USGC = ((p_msg->params[0] & 0x03) << 8) | p_msg->params[1];
+ UL_DSP_AGC_CONTROL_REG = g_USGC;
+
+ /* Send Acknowledgement for gain debug */
+ sendDiagMsg(0x81, p_msg->trx, 0, 2, &p_msg->params[0]);
+
+ break;
+
+ case SET_DL_POWER:
+
+ /* Setup Hardware (params[0] is don't care) */
+ g_DSPC = p_msg->params[1];
+
+ break;
+
+ case SET_ARFCN:
+ /*
+ * Set current Tx power offset for ARFCN, rounding from table
+ */
+ if ( g_BBInfo[rfCh].ais == DCS_1800 )
+ {
+ TxOffsetArfcns = g_TxOffsetArfcns1800; /* fixed ARFCNs for 1800 */
+ }
+ else
+ {
+ TxOffsetArfcns = g_TxOffsetArfcns1900; /* fixed ARFCNs for 1900 */
+ }
+ k = 1;
+ arfcn = ( p_msg->params[0] << 8 | p_msg->params[1]) & 0xfff;
+ while ( k < 15 && arfcn > TxOffsetArfcns[k] )
+ {
+ k++;
+ }
+ deltaArfcn = TxOffsetArfcns[k] - TxOffsetArfcns[k-1];
+ hiFactorTimes16 = ((arfcn - TxOffsetArfcns[k-1]) * 16) / deltaArfcn;
+ g_CurrentTxPwrOffsetForArfcn = (
+ hiFactorTimes16 * g_TxPwrOffsetVsArfcnTbl[k] +
+ (16 - hiFactorTimes16) * g_TxPwrOffsetVsArfcnTbl[k-1] + 8 ) >> 4;
+ /*
+ * Convert Tx Max Power Reduction and ARFCN adjustment to DAC input
+ * range 0-255 and set register value. Tables all in half dB steps.
+ */
+ index = 4 * g_TxStaticGainLevel + g_CurrentTxPwrOffsetForArfcn;
+ if ( index >= NUM_TX_VS_PWR_LEVEL )
+ {
+ index = NUM_TX_VS_PWR_LEVEL - 1;
+ }
+ g_DSPC = g_TxMaxPwrRdct2DLPwrTbl[ index ];
+ break;
+
+ case TUNE_SYNTH:
+ /*
+ * Enable FPGA to set ARFCN value. Only DSP A is allowed to set
+ * synthesizer, since FPGA conflicts on FPGA driving PIC input pin
+ */
+ AGC_SRC_SELECT_REG |= (1<<DSP_FPGA_ARFCH_CTRL);
+
+ /* Setup Hardware */
+ switch (p_msg->trx & 0x1)
+ {
+ // DL_ARFCN_SELECT_REG bit format:
+ // bit 15: SYNTH A/B side (0:A; 1:B)
+ // bit 14: TRX# (0=TRX1, 1=TRX2)
+ // bit 13: Hop (0=non hopped, 1=hopped)
+ // bits 12 POWER AMP Switch
+ // bits 11-10: RESERVED
+ // bits 9-0: dlARFCN value
+ case 0:
+
+ bbInfo->hopFlag = 0;
+
+ DLsynthA = p_msg->params[0] << 8 | p_msg->params[1];
+
+ if (!(DLsynthA & (1<<TRX_SELECT)))
+ {
+ /* TRX#1 : hopping disabled always; tune DL Synth A */
+ DL_ARFCN_SELECT_REG_1 = DLsynthA;
+ msgBuf[0] = 0x01060000;
+ msgBuf[1] = DL_ARFCN_SELECT_REG_1;
+ }
+ else if(DLsynthA & SYNTH_AB_SELECT)
+ {
+ /* TRX#2 : hopping disabled always for NOW; tune DL Synth A */
+ DL_ARFCN_SELECT_REG_2B = DLsynthA;
+ msgBuf[0] = 0x01050000;
+ msgBuf[1] = DL_ARFCN_SELECT_REG_2B;
+ }
+ else
+ {
+ /* TRX#2 : hopping disabled always for NOW; tune DL Synth A */
+ DL_ARFCN_SELECT_REG_2A = DLsynthA;
+ msgBuf[0] = 0x01040000;
+ msgBuf[1] = DL_ARFCN_SELECT_REG_2A;
+ }
+ break;
+
+ case 1:
+ /* TRX#2 : hopping sequence must be generated; tune DL Synth B */
+ if ((bbInfo->MAIO) == 0 && bbInfo->N == 1) {
+ // characterizes a non-hopping rf channel sequence; disable hopping
+ bbInfo->hopFlag = 0;
+ DLsynthB = 0x4000 |
+ ( ( (short int)p_msg->params[0] & 0x3 ) << 8 ) |
+ (short int)p_msg->params[1] ;
+ DL_ARFCN_SELECT_REG_2A = DLsynthB;
+ }
+ // NOTE!! The radio frequency sequence hopping algorithm
+ // is called from the interrupt service routine. The
+ // goal here is only to set the hopFlag to allow which
+ // type of hopping will be used.
+ // No peripheral register (DSP to FGPA) shall be set here,
+ // but instead by the ISR. This register needs to be
+ // updated every TDMA frame (~4.615ms) at the start of
+ // the frame, i.e. timeslot 0.
+ break;
+ }
+
+ case CONFIG_FPGA_DELAY:
+
+ FPGADelay = (short int)p_msg->params[0];
+ break;
+
+ case SYNCH:
+ /*
+ * synchronize GSM frame number with Logical channel combinations
+ */
+ INTR_GLOBAL_DISABLE();
+ /*
+ * initialize frame number counters
+ */
+ setFrameNum.FN = 0;
+ sysFrameNum.FN = 0;
+ sysFrameNum.t1 = 0;
+ sysFrameNum.t2 = 0;
+ sysFrameNum.t3 = 0;
+ g_frmSync.state = SET_SYNC;
+ /*
+ * initialize HW related function blocks
+ */
+ init_hw();
+ break;
+
+ case KEEP_ALIVE_PING:
+
+ /* Send Acknowledgement */
+ respMsg.msgSize = 9;
+ respMsg.function = TRX_MANAGE_MSG;
+ respMsg.typeHiByte = KEEP_ALIVE_PONG >> 8;
+ respMsg.typeLoByte = KEEP_ALIVE_PONG;
+ respMsg.trx = p_msg->trx; /* for now */
+ respMsg.params[0] = sysFrameNum.FN>>24;
+ respMsg.params[1] = sysFrameNum.FN>>16;
+ respMsg.params[2] = sysFrameNum.FN>>8;
+ respMsg.params[3] = sysFrameNum.FN;
+ respMsg.params[4] = g_maxCpuLoading; /* appended CPU loading */
+ sendMsgHost(&respMsg);
+
+ g_maxCpuLoading = 0;
+ break;
+
+ case REQ_CONFIG_RADIO_TX_PWR:
+
+ /* send message to host to request tables for downlink TX power characteristic curve */
+ respMsg.msgSize = 4;
+ respMsg.function = TRX_MANAGE_MSG;
+ respMsg.typeHiByte = REQ_CONFIG_RADIO_TX_PWR >> 8;
+ respMsg.typeLoByte = REQ_CONFIG_RADIO_TX_PWR;
+ respMsg.trx = 0;
+ sendMsgHost(&respMsg);
+ break;
+
+ case RADIO_TX_PWR_CHAR_CONFIG:
+
+ /*-- First two values are absolute --*/
+ g_TxMaxPwrRdct2DLPwrTbl[0] = p_msg->params[0];
+ g_TxMaxPwrRdct2DLPwrTbl[1] = p_msg->params[1];
+
+ /*-- Remaining values are differentially encoded --*/
+ ref = g_TxMaxPwrRdct2DLPwrTbl[1];
+ for(j=0; j<(NUM_TX_VS_PWR_LEVEL-2)/2; j++)
+ {
+ ref -= ((p_msg->params[j+2] & 0xF0) >> 4);
+ g_TxMaxPwrRdct2DLPwrTbl[2*j+2] = ref;
+
+ ref -= (p_msg->params[j+2] & 0x0F);
+ g_TxMaxPwrRdct2DLPwrTbl[2*j+3] = ref;
+ }
+ /* Send Acknowledgement */
+ respMsg.msgSize = 4;
+ respMsg.function = TRX_MANAGE_MSG;
+ respMsg.typeHiByte = RADIO_TX_PWR_CHAR_CONFIG_ACK >> 8;
+ respMsg.typeLoByte = RADIO_TX_PWR_CHAR_CONFIG_ACK;
+ respMsg.trx = p_msg->trx; /* for now */
+ sendMsgHost(&respMsg);
+ break;
+
+ case TX_PWR_OFFSETS_CONFIG:
+
+ for(j=0; j<15; j++)
+ {
+ g_TxPwrOffsetVsArfcnTbl[j] = p_msg->params[j];
+ }
+ /* Send Acknowledgement */
+ respMsg.msgSize = 4;
+ respMsg.function = TRX_MANAGE_MSG;
+ respMsg.typeHiByte = TX_PWR_OFFSETS_CONFIG_ACK >> 8;
+ respMsg.typeLoByte = TX_PWR_OFFSETS_CONFIG_ACK;
+ respMsg.trx = p_msg->trx; /* for now */
+ sendMsgHost(&respMsg);
+ break;
+
+ case TEMPERATURE_COMPENSATION:
+
+ g_TxPwrTemperatureDelta = p_msg->params[0];
+ break;
+
+ case RADIO_GAIN_CHAR_CONFIG:
+ /*
+ * Use 1800 and 1900 parameters embedded in RF EEPROM instead of I-Q flag
+ */
+ gainStepsPerDbTimes256 = ((p_msg->params[0] << 8) | p_msg->params[1]);
+ g_MeasAgcDpcRxgain = ((p_msg->params[2] << 8) | p_msg->params[3]);
+ g_rxGainMinIdle = ((p_msg->params[4] << 8) | p_msg->params[5]);
+
+ g_gainStepsPerDb.slope = gainStepsPerDbTimes256 >> 8;
+ g_gainStepsPerDb.inverseSlope = ( 65536L+(gainStepsPerDbTimes256 >> 1) ) / gainStepsPerDbTimes256;
+
+ /* Send Acknowledgement */
+ respMsg.msgSize = 4;
+ respMsg.function = TRX_MANAGE_MSG;
+ respMsg.typeHiByte = RADIO_GAIN_CHAR_CONFIG_ACK >> 8;
+ respMsg.typeLoByte = RADIO_GAIN_CHAR_CONFIG_ACK;
+ respMsg.trx = p_msg->trx; /* for now */
+ sendMsgHost(&respMsg);
+ break;
+
+ case SET_RACH_SNR_THRESHOLD:
+
+ g_RachSnrThresh = p_msg->params[0];
+ break;
+
+ default:
+ break;
+
+ } /* switch p_msg->type */
+
+ return(result);
+}
+
+/*****************************************************************************
+*
+* Function: frequencyHoppingAlg
+*
+* Description:
+* This function will implement the hopping sequence generation algorithm
+* defined by GSM 05.02 section 6.2.3.
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+Uint8 frequencyHoppingAlg (Uint8 *ndx, Uint8 *seqnum)
+{
+ int S, Mp, T, M, T1R, xorFCN, a;
+ int lut, mai;
+ t_BBInfo *bbInfo;
+
+ if (*seqnum = 0){
+ // algorithm chooses a cyclic hopping path.
+ bbInfo->hopFlag = 1;
+ mai = ((sysFrameNum.t1 *
+ sysFrameNum.t2 *
+ sysFrameNum.t3) + *ndx) % (bbInfo->N);
+ }
+
+ else {
+ // otherwise, the freq. hopping is random.
+ bbInfo->hopFlag = 2;
+ T1R = sysFrameNum.t1 % (bbInfo->N);
+
+ xorFCN = (T1R | *seqnum) & ( ~(T1R & *seqnum));
+ a = sysFrameNum.t3 + xorFCN;
+ lut = HSN_LookUpTbl[a];
+ M = lut + sysFrameNum.t2;
+
+ Mp = M % (int) (pow(2,bbInfo->NBIN));
+
+ if (Mp < (bbInfo->N))
+ S = Mp;
+ else {
+ T = sysFrameNum.t3 % (int) (pow(2,bbInfo->NBIN));
+ S = (Mp + T) % (bbInfo->N);
+ }
+
+ mai = (S + *ndx) % (bbInfo->N);
+ }
+ // !!REMINDER, ISR needs to (for both cyclic and random):
+ // 1. Use mai to find next hop, bbInfo->MA[mai]
+ // 2. Set bits in peripheral register
+ // DLsynthB = 0xC000 |
+ // ( ( (short int)p_msg->params[0] & 0x3 ) << 8 ) |
+ // (short int)p_msg->params[1] ;
+ // 3. Write to FPGA,
+ // REG_WRITE(DL_ARFCN_SELECT_REG, DLsynthB);
+
+ return (mai);
+}
+
+
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/Makefile b/data/mnet/GP10/Dsp/bbdataproc/Makefile
new file mode 100644
index 0000000..d5220d8
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/Makefile
@@ -0,0 +1,114 @@
+#****************************************************************************
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#****************************************************************************
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+include ../dsp.mk
+.SUFFIXES:
+.SUFFIXES: .c .asm .obj
+
+SOURCE_LIST = ./BURST/BURST.C \
+ ./BURST/MOD2ASM.ASM \
+ ./BURST/MOD2SPB.C \
+ ./CHCODEC/BFI.C \
+ ./CHCODEC/CODECS.C \
+ ./CHCODEC/INTLEAVS.C \
+ ./CHCODEC/SBJCODECS.C \
+ ./CHCODEC/TOPCODEC.C \
+ ./CHCODEC/VITGSM.ASM \
+ ./CHCODEC/CHCODESUBS.ASM \
+ ./CHCODEC/SIDDETECT.C \
+ ./CHCODEC/INTLEAV.ASM \
+ ./DEMOD/DEMSUBS.ASM \
+ ./DEMOD/DEMTOP.C \
+ ./DEMOD/DEMODC.C \
+ ./DEMOD/VITEQ.ASM
+
+MODULE_OBJS = $(OBJDIR)/BURST.obj \
+ ../MOD2ASM.obj \
+ $(OBJDIR)/MOD2SPB.obj \
+ $(OBJDIR)/BFI.obj \
+ $(OBJDIR)/CODECS.obj \
+ $(OBJDIR)/INTLEAVS.obj \
+ $(OBJDIR)/SBJCODECS.obj \
+ $(OBJDIR)/TOPCODEC.obj \
+ $(OBJDIR)/SIDDETECT.obj \
+ ../VITGSM.obj \
+ ../CHCODESUBS.obj \
+ ../DEMSUBS.obj \
+ ../INTLEAV.obj \
+ $(OBJDIR)/DEMTOP.obj \
+ $(OBJDIR)/DEMODC.obj \
+ ../VITEQ.obj
+
+all: $(MODULE_OBJS)
+
+# rule for C++ compiles
+$(OBJDIR)/%.obj : BURST/%.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+../%.obj : ./BURST/%.ASM
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(ASM_FLAGS) $<
+
+$(OBJDIR)/MOD2SPB.obj : ./BURST/MOD2SPB.C
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/BFI.obj : ./CHCODEC/BFI.C
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/CODECS.obj : ./CHCODEC/CODECS.C
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/INTLEAVS.obj : ./CHCODEC/INTLEAVS.C
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/SBJCODECS.obj : ./CHCODEC/SBJCODECS.C
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/SIDDETECT.obj : ./CHCODEC/SIDDETECT.C
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/TOPCODEC.obj : ./CHCODEC/TOPCODEC.C
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+../VITGSM.obj : ./CHCODEC/VITGSM.ASM
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(ASM_FLAGS) $<
+
+../CHCODESUBS.obj : ./CHCODEC/CHCODESUBS.ASM
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(ASM_FLAGS) $<
+
+../INTLEAV.obj : ./CHCODEC/INTLEAV.ASM
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(ASM_FLAGS) $<
+
+../DEMSUBS.obj : ./DEMOD/DEMSUBS.ASM
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(ASM_FLAGS) $<
+
+$(OBJDIR)/DEMTOP.obj : ./DEMOD/DEMTOP.C
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/DEMODC.obj : ./DEMOD/DEMODC.C
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+../VITEQ.obj : ./DEMOD/VITEQ.ASM
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(ASM_FLAGS) $<
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/burst/burst.c b/data/mnet/GP10/Dsp/bbdataproc/burst/burst.c
new file mode 100644
index 0000000..7189e3a
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/burst/burst.c
@@ -0,0 +1,220 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+**
+** File: burst.c
+**
+** Description:
+** This file contains the GSM GMSK modulator routine.
+**
+*****************************************************************************/
+
+/*****************************************************************************
+** ROUTINE NAME: burst
+**
+** Description:
+** GSM burst builder.
+**
+** Method:
+** Up to 116 input bits are combined with known bit patterns for each burst type
+** to build the indicated burst for the modulator. All bursts are generated
+** 148 bits long.
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** waveform - output array of the modulated waveform
+** bits - input bits array
+** bursttype - input indicating which burst type
+**
+** Returns:
+** None
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "bbproto.h"
+#include "burst.h"
+
+void buildGSMBurst(t_chanSel chanSel, UChar TSEQ)
+{
+ Int16 i, j;
+ Uint8 *modBitBuf;
+ /*
+ * Check transmission flag and pass along to the modulator.
+ * Clear the coded data flag.
+ */
+
+ /*
+ * Determine burst type and build appropriate burst
+ */
+ j = 0;
+ switch (chanSel)
+ {
+
+ case FCCH:
+ /*
+ * Tail bits
+ */
+ g_DLBurstData.data[j++] = 0;
+ g_DLBurstData.data[j++] = 0;
+ g_DLBurstData.data[j++] = 0;
+
+ /*
+ * Fixed bits
+ */
+ for (i=0; i<FB_NUM_FIXED_BITS; i++)
+ {
+ g_DLBurstData.data[j++] = 0;
+ }
+
+ /*
+ * Tail bits
+ */
+ g_DLBurstData.data[j++] = 0;
+ g_DLBurstData.data[j++] = 0;
+ g_DLBurstData.data[j++] = 0;
+ break;
+
+ case SCH:
+ /*
+ * Tail bits
+ */
+ g_DLBurstData.data[j++] = 0;
+ g_DLBurstData.data[j++] = 0;
+ g_DLBurstData.data[j++] = 0;
+
+ /*
+ * Encrypted bits
+ */
+ for (i=0; i<SB_NUM_ENCRYPT_BITS_PER_SIDE; i++)
+ {
+ g_DLBurstData.data[j++] = g_DLCodedData.data[i];
+ }
+
+ /*
+ * Training sequence bits
+ */
+ for (i=0; i<SB_TRAIN_SIZE; i++)
+ {
+ g_DLBurstData.data[j++] = trainsb[i];
+ }
+
+ /*
+ * Encrypted bits
+ */
+ for (i=SB_NUM_ENCRYPT_BITS_PER_SIDE; i<SB_NUM_ENCRYPT_BITS_PER_BURST; i++)
+ {
+ g_DLBurstData.data[j++] = g_DLCodedData.data[i];
+ }
+
+ /*
+ * Tail bits
+ */
+ g_DLBurstData.data[j++] = 0;
+ g_DLBurstData.data[j++] = 0;
+ g_DLBurstData.data[j++] = 0;
+ break;
+
+ case RACH:
+ /*
+ * Extended tail bits
+ */
+ for (i=0; i<AB_NUM_TAIL_BITS; i++)
+ {
+ g_DLBurstData.data[j++] = taila[i];
+ }
+
+ /*
+ * Synch sequence bits
+ */
+ for (i=0; i<AB_TRAIN_SIZE; i++)
+ {
+ g_DLBurstData.data[j++] = syncseq[i];
+ }
+
+ /*
+ * Encrypted bits
+ */
+ for (i=0; i<AB_NUM_ENCRYPT_BITS_PER_BURST; i++)
+ {
+ g_DLBurstData.data[j++] = g_DLCodedData.data[i];
+ }
+
+ /*
+ * Tail bits
+ */
+ g_DLBurstData.data[j++] = 0;
+ g_DLBurstData.data[j++] = 0;
+ g_DLBurstData.data[j++] = 0;
+
+ break;
+
+ default: /* Normal burst */
+
+ if(g_DLCodedData.tx == FALSE)
+ {
+ /* trasnmitter if off, no burst is loaded */
+ g_DLBurstData.tx = FALSE;
+ return;
+ }
+
+
+ if(chanSel == IDLE)
+ {
+ modBitBuf = (Uint8*)mixed;
+ }
+ else
+ {
+ modBitBuf = g_DLCodedData.data;
+ }
+
+ /*
+ * Tail bits
+ */
+ g_DLBurstData.data[j++] = 0;
+ g_DLBurstData.data[j++] = 0;
+ g_DLBurstData.data[j++] = 0;
+
+ /*
+ * Encrypted bits
+ */
+ for (i=0; i<NB_NUM_ENCRYPT_BITS_PER_SIDE; i++)
+ {
+ g_DLBurstData.data[j++] = modBitBuf[i];
+ }
+
+ /*
+ * Training sequence bits
+ */
+ for (i=0; i<NB_TRAIN_SIZE; i++)
+ {
+ g_DLBurstData.data[j++] = trainnb[TSEQ][i];
+ }
+
+ /*
+ * Encrypted bits
+ */
+ for (i=NB_NUM_ENCRYPT_BITS_PER_SIDE; i<NB_NUM_ENCRYPT_BITS_PER_BURST; i++)
+ {
+ g_DLBurstData.data[j++] = modBitBuf[i];
+ }
+
+ /*
+ * Tail bits
+ */
+ g_DLBurstData.data[j++] = 0;
+ g_DLBurstData.data[j++] = 0;
+ g_DLBurstData.data[j++] = 0;
+
+ break;
+ }
+
+ g_DLBurstData.tx = TRUE;
+}
diff --git a/data/mnet/GP10/Dsp/bbdataproc/burst/burst.h b/data/mnet/GP10/Dsp/bbdataproc/burst/burst.h
new file mode 100644
index 0000000..e5db04b
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/burst/burst.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+**
+** Filename: burst.h
+**
+** Description:
+** This is a test driver include file for routines internal to the
+** Channel CODEC.
+**
+*****************************************************************************/
+#ifndef BURST_H
+#define BURST_H
+
+/*
+* Tail bits
+*/
+const UChar taila[AB_NUM_TAIL_BITS] = {0,0,1,1,1,0,1,0};
+
+/*
+* SB training seq
+*/
+const UChar trainsb[SB_TRAIN_SIZE] =
+ {1,0,1,1,1,0,0,1,0,1,1,0,0,0,1,0,0,0,0,0,0,1,0,
+ 0,0,0,0,0,1,1,1,1,0,0,1,0,1,1,0,1,0,1,0,0,0,
+ 1,0,1,0,1,1,1,0,1,1,0,0,0,0,1,1,0,1,1};
+
+/*
+* Dummy burst mixed bits
+*/
+const UChar mixed[DB_NUM_MIXED_BITS] =
+ {1,1,1,1,1,0,1,1,0,1,1,1,0,1,1,0,0,0,0,0,1,0,1,
+ 0,0,1,0,0,1,1,1,0,0,0,0,0,1,0,0,1,0,0,0,1,0,
+ 0,0,0,0,0,0,1,1,1,1,1,0,0,0,1,1,1,0,0,0,1,0,1,1,1,0,
+ 0,0,1,0,1,1,1,0,0,0,1,0,1,
+ 0,1,1,1,0,1,0,0,1,0,1,0,0,0,1,1,0,0,1,1,0,0,1,1,1,0,0,
+ 1,1,1,1,0,1,0,0,1,1,1,1,1,0,0,0,1,0,0,1,0,1,1,1,1,1,0,
+ 1,0,1,0};
+
+/*
+* AB sync sequence
+*/
+const UChar syncseq[AB_TRAIN_SIZE] =
+ {0,1,0,0,1,0,1,1,0,1,1,1,1,1,1,1,1,0,0,1,1,
+ 0,0,1,1,0,1,0,1,0,1,0,0,0,1,1,1,1,0,0,0};
+
+/*
+* Normal burst training sequenses
+*/
+const UChar trainnb[NB_NUM_TRAIN_SEQ][NB_TRAIN_SIZE] =
+ { {0,0,1,0,0,1,0,1,1,1,0,0,0,0,1,0,0,0,1,0,0,1,0,1,1,1},
+ {0,0,1,0,1,1,0,1,1,1,0,1,1,1,1,0,0,0,1,0,1,1,0,1,1,1},
+ {0,1,0,0,0,0,1,1,1,0,1,1,1,0,1,0,0,1,0,0,0,0,1,1,1,0},
+ {0,1,0,0,0,1,1,1,1,0,1,1,0,1,0,0,0,1,0,0,0,1,1,1,1,0},
+ {0,0,0,1,1,0,1,0,1,1,1,0,0,1,0,0,0,0,0,1,1,0,1,0,1,1},
+ {0,1,0,0,1,1,1,0,1,0,1,1,0,0,0,0,0,1,0,0,1,1,1,0,1,0},
+ {1,0,1,0,0,1,1,1,1,1,0,1,1,0,0,0,1,0,1,0,0,1,1,1,1,1},
+ {1,1,1,0,1,1,1,1,0,0,0,1,0,0,1,0,1,1,1,0,1,1,1,1,0,0} };
+
+
+#endif /* end of include once only */
diff --git a/data/mnet/GP10/Dsp/bbdataproc/burst/mod2asm.asm b/data/mnet/GP10/Dsp/bbdataproc/burst/mod2asm.asm
new file mode 100644
index 0000000..380b470
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/burst/mod2asm.asm
@@ -0,0 +1,627 @@
+;****************************************************************************
+; (c) Copyright Cisco 2000
+; All Rights Reserved
+;****************************************************************************
+
+;******************************************************************************
+;* TMS320C6x ANSI C Codegen Version 2.00 *
+;* Date/Time created: Wed Feb 3 14:04:49 1999 *
+;******************************************************************************
+
+;******************************************************************************
+;* GLOBAL FILE PARAMETERS *
+;* *
+;* Architecture : TMS320C6200 *
+;* Endian : Little *
+;* Interrupt Threshold : Disabled *
+;* Memory Model : Small *
+;* Speculative Load : Disabled *
+;* Redundant Loops : Enabled *
+;* Pipelining : Enabled *
+;* Debug Info : No Debug Info *
+;* *
+;******************************************************************************
+
+FP .set A15
+DP .set B14
+SP .set B15
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;
+; GMSK Modulator in linear assembly
+;
+; based on Frontier Design's table modulator
+;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;
+;Description:
+; Look-up-table based GSM GMSK 2 samples per bit modulator.
+;
+;Method:
+; This function generates a GSM GMSK modulated waveform from a sequence
+; of bits. Power ramping is performed outside this routine by placing
+; samples at the beginning and end of the burst buffer that aren't modified
+; here.
+;
+; 148 bits are input: The whole burst including tail bits but excluding
+; guard period bits.
+;
+; Output is 148 bits of the burst centered within the burst data buffer.
+;
+;Limitations:
+;
+; The output buffer pointed to, and the modulator table, modLUT2x MUST
+; be 32-bit aligned.
+;
+; It is necessary to unroll the inner loop over samples per bit in
+; order to software pipeline the outer loop. This means that we can't
+; easily use the SAMPLES_PER_BIT symbol to vary the number of bits
+; per sample. Instead this code is written for 2 samples per bit
+; specifically. SAMPLES_PER_BIT must be defined as 2 if this routine
+; is called, or its associated sample table (mod2spb_tab.h) is used.
+;
+; Assuming that the number of bits modulated is always even leads
+; to a significant optimization in the calculation of the samples
+; and updating of the relative phase per bit. This means that both
+; NB_BITS_TO_MOD and AB_BITS_TO_MOD must be even for this routine
+; to work properly.
+;
+;Input/Output:
+;
+; The interface to this routine consists of a pointer to the output
+; sample buffer, and a flag indicating the type of burst. Any value
+; but RACH is modulated as a normal burst, RACH is an access burst.
+; Since local arrays can't be created from linear assembly, a pointer
+; to one created in the C stub that calls this routine is passed. In
+; order to use the #define CONSTANTS in C, they are passed to this
+; routine via a pointer to an int array.
+;
+; C call: GMSKModulate register names here
+; (
+; t_DLComplexSamp *outBurstPtr, obptr
+; t_ChanSel chansel, chsel
+; UChar *diff, dfptr
+; Int *c_constants ccptr
+; )
+;
+; obptr -- Register containing the address samples are written to.
+; Two 12 bit samples, I and Q, are packed in the lower 24 bits
+; of a 32 bit word, with I the lowest 12 bits. For some, no
+; doubt good historical reason, the output buffer actually
+; consists of structures containing two 16 bit samples. It
+; is treated here like an array of Int.
+;
+; chsel -- Type of burst to modulate, if equal to RACH -- an access burst.
+; If equal to anything else, a normal burst. Controls the number
+; of bits that are modulated primarily.
+;
+; dfptr -- Pointer to an array to be filled with the differentially encoded
+; bits to be modulated. Need to create it in C because linear
+; assembly does not allow the stack pointer to be manipulated to
+; create local variables.
+;
+; ccptr -- Pointer to an array filled with #define constants from C, in
+; order to avoid having to redefine them here. Avoids the danger
+; of being modified in C and left the same here.
+;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+ .def _GMSKModLoop ; declare the function global
+
+ .ref _modLUT2x ; import addresses from C
+ .ref _g_DLBurstData
+
+; define index names in array of constants passed from C
+
+C_NUM_MOD_BITS_IN .set 0 ; import symbol values from C
+C_AB_BITS_TO_MOD .set 1 ; values are integer indices in the
+C_NB_BITS_TO_MOD .set 2 ; ccptr array passed
+C_RAMP_OFFSET .set 3
+C_RACH .set 4
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _GMSKModLoop *
+;* *
+;* Regs Modified : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,B0,B1,B2,B4,B5,*
+;* B6,B7,B8,B9,SP *
+;* Regs Used : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,B0,B1,B2,B3,B4,*
+;* B5,B6,B7,B8,B9,SP *
+;******************************************************************************
+_GMSKModLoop:
+;** --------------------------------------------------------------------------*
+;
+; _GMSKModLoop .cproc obptr, chsel, dfptr, ccptr
+; .reg tbptr ; address of modulator table
+; .reg mtptr ; working modulator table pointer
+; .reg index ; current row in modulator table
+; .reg iloop ; index into differential bits array
+; .reg loopcnt ; loop iteration downcounter
+; .reg itemp ; i sample register, temp storage
+; .reg qtemp ; q sample register, temp storage
+; .reg itemp1 ; i sample register, temp storage
+; .reg qtemp1 ; q sample register, temp storage
+; .reg itemp2 ; i sample register, temp storage
+; .reg qtemp2 ; q sample register, temp storage
+; .reg itemp3 ; i sample register, temp storage
+; .reg qtemp3 ; q sample register, temp storage
+; .reg phtest ; 0 iff phase == -1
+; .reg nbits ; number of bits to modulate
+; .reg bdata ; pointer to burst data
+ MV .L1X B6,A0 ; |94|
+ LDW .D1T1 *+A0(16),A1 ; |125|
+ NOP 2
+ MVK .S1 _g_DLBurstData,A5 ; |118| address modulator burst data buffer
+
+ ZERO .L1 A0 ; |134| qtemp is 0
+|| MVKH .S1 _g_DLBurstData,A5 ; |119|
+
+ STB .D1T1 A0,*A5++ ; |135| clear burst tx flag, bdata->data
+|| SUB .L2X B4,A1,B2 ; |125|
+
+ LDB .D1T2 *A5,B4 ; |152| qtemp is g_DLBurstData.data[0]
+ LDW .D2T1 *B6,A8 ; |157| iloop = _NUM_MOD_BITS_IN
+ NOP 2
+
+ MVK .S1 0x1,A0 ; |147| qtemp is 1
+|| MV .L1 A6,A1 ; |126|
+
+ MV .L1X B4,A0 ; |152|
+|| STB .D1T1 A0,*A1++ ; |148| diff[0] = 1
+
+ ADD .L1 A8,A5,A0 ; |158| qtemp -> g_DLBurstData[NUM_MOD...IN]
+|| STB .D1T1 A0,*A1 ; |153| diff[1] = qtemp
+
+ LDB .D1T1 *-A0(1),A0 ; |159| qtemp = g_DLBurstData[NUM_MOD...-1]
+ NOP 3
+ ADD .L1 A1,A8,A1 ; |160| itemp -> diff[NUM_MOD...+1]
+ STB .D1T1 A0,*A1 ; |161| diff[NUM_MOD...+1] = qtemp
+ LDB .D1T1 *A5++,A1 ; |170| itemp = g_DLBurstData[0]
+ NOP 1
+
+ STW .D2T1 A11,*SP--(8) ; |94|
+|| ADD .L1 0x2,A6,A4 ; |94|
+|| MV .L2X A4,B7 ; |94|
+
+ MV .L2X A4,B5 ; |172|
+|| LDW .D2T2 *+B6(8),B8 ; |124| normal bits to modulate
+
+ MV .L2X A8,B0 ; |168|
+|| STW .D2T1 A10,*+SP(4) ; |94|
+|| MVK .S1 _modLUT2x,A7 ; |115| address modulator lookup table
+
+ MVC .S2 CSR,B9 ; |172|
+|| MV .L2X A1,B4 ; |172|
+|| MV .L1 A5,A3 ; |172|
+|| [!B2] LDW .D2T2 *+B6(4),B8 ; |127| use access burst length
+|| MVKH .S1 _modLUT2x,A7 ; |116|
+
+ AND .L2 -2,B9,B1 ; |172|
+
+ MVC .S2 B1,CSR ; |172|
+|| SUB .L2 B0,6,B0 ; |172|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : diffloop
+;* Known Minimum Trip Count : 100
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 1
+;* Unpartitioned Resource Bound : 1
+;* Partitioned Resource Bound(*) : 2
+;* Resource Partition:
+;* A-side B-side
+;* .L units 0 1
+;* .S units 1 1
+;* .D units 1 1
+;* .M units 0 0
+;* .X cross paths 0 2*
+;* .T address paths 1 1
+;* Long read paths 0 1
+;* Long write paths 0 0
+;* Logical ops (.LS) 0 1 (.L or .S unit)
+;* Addition ops (.LSD) 1 0 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1 2*
+;* Bound(.L .S .D .LS .LSD) 1 2*
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 2 Schedule found with 4 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : 6
+;*
+;*----------------------------------------------------------------------------*
+L2: ; PIPED LOOP PROLOG
+; diffloop: .trip 100
+ LDB .D1T1 *A3++,A0 ; |176| qtemp = g_DLBurstData[iloop]
+ [ B0] B .S1 diffloop ; |181| test and loop
+ LDB .D1T1 *A3++,A0 ;@ |176| qtemp = g_DLBurstData[iloop]
+ [ B0] B .S1 diffloop ;@ |181| test and loop
+ LDB .D1T1 *A3++,A0 ;@@ |176| qtemp = g_DLBurstData[iloop]
+;** --------------------------------------------------------------------------*
+diffloop: ; PIPED LOOP KERNEL
+
+ MV .L1 A0,A0 ; |179| save g_DLBurstData[iloop] for next
+|| CMPEQ .L2X B4,A0,B4 ; ^ |177| phtest = (itemp==qtemp)
+|| [ B0] B .S1 diffloop ;@@ |181| test and loop
+
+ MV .L2X A0,B4 ; ^ |233|
+|| STB .D2T2 B4,*B5++ ; |178| save differentially encoded bit
+|| LDB .D1T1 *A3++,A0 ;@@@ |176| qtemp = g_DLBurstData[iloop]
+|| [ B0] SUB .S2 B0,0x1,B0 ;@@@ |180| downcount
+
+;** --------------------------------------------------------------------------*
+L4: ; PIPED LOOP EPILOG
+
+ MV .L1 A0,A0 ;@ |179| save g_DLBurstData[iloop] for next
+|| CMPEQ .L2X B4,A0,B4 ;@ ^ |177| phtest = (itemp==qtemp)
+
+ MV .L2X A0,B4 ;@ ^ |233|
+|| STB .D2T2 B4,*B5++ ;@ |178| save differentially encoded bit
+
+ MV .L1 A0,A0 ;@@ |179| save g_DLBurstData[iloop] for next
+|| CMPEQ .L2X B4,A0,B4 ;@@ ^ |177| phtest = (itemp==qtemp)
+
+ MV .L2X A0,B4 ;@@ ^ |233|
+|| STB .D2T2 B4,*B5++ ;@@ |178| save differentially encoded bit
+
+ MV .L1 A0,A0 ;@@@ |179| save g_DLBurstData[iloop] for next
+|| CMPEQ .L2X B4,A0,B4 ;@@@ ^ |177| phtest = (itemp==qtemp)
+
+ MV .L2X A0,B4 ;@@@ ^ |233|
+|| STB .D2T2 B4,*B5++ ;@@@ |178| save differentially encoded bit
+
+;** --------------------------------------------------------------------------*
+
+ MV .L1X B6,A0
+|| MVC .S2 B9,CSR ; |172|
+
+ LDW .D1T1 *+A0(12),A1 ; |204|
+ NOP 4
+
+ ADD .L2X B7,A1,B7 ; |205|
+|| ADD .L1 0x4,A6,A3 ; |219| qtemp->diff[4]
+
+ LDBU .D1T1 *A3--,A1 ; |221| itemp: diff[4]
+ NOP 3
+ ZERO .L1 A0 ; |218|
+ [ A1] ADD .L1 0x1,A0,A0 ; |222|
+ LDBU .D1T1 *A3--,A1 ; |223| itemp: diff[3]
+ NOP 4
+ [ A1] ADD .L1 0x2,A0,A0 ; |224|
+ LDBU .D1T1 *A3--,A1 ; |225| itemp: diff[2]
+ NOP 4
+ [ A1] ADD .L1 0x4,A0,A0 ; |226|
+ LDBU .D1T1 *A3--,A1 ; |227| itemp: diff[1]
+ NOP 4
+ [ A1] ADD .L1 0x8,A0,A0 ; |228|
+ LDBU .D1T1 *A3,A1 ; |229| itemp: diff[0]
+ NOP 4
+
+ [ A1] ADDAB .D1 A0,16,A0 ; |230|
+|| SHR .S2 B8,0x1,B1 ; |212| loop iteration downcounter
+
+ SHL .S2X A0,0x3,B2 ; |232| index is 8 * row of modulator table
+|| MVK .S1 0x1,A3 ; |202| init phasor as I=1, Q=0 for even bit
+|| ADD .L1 0x2,A6,A8 ; |211| set i variable in loop
+
+ MVC .S2 CSR,B2 ; |233|
+|| ADD .L1X A7,B2,A4 ; |233| mtptr points to index-th row now
+|| MV .S1 A7,A3 ; |233|
+|| MV .L2X A3,B0 ; |233|
+|| ZERO .D2 B8 ; |212|
+|| ZERO .D1 A5 ; |212|
+
+ AND .L2 -2,B2,B4 ; |233|
+
+ MVC .S2 B4,CSR ; |233|
+|| SUB .L2 B1,3,B1 ; |233|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : modloop
+;* Known Minimum Trip Count : 50
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 7
+;* Unpartitioned Resource Bound : 11
+;* Partitioned Resource Bound(*) : 11
+;* Resource Partition:
+;* A-side B-side
+;* .L units 4 2
+;* .S units 11* 11*
+;* .D units 8 4
+;* .M units 1 0
+;* .X cross paths 1 5
+;* .T address paths 8 4
+;* Long read paths 1 3
+;* Long write paths 0 0
+;* Logical ops (.LS) 1 1 (.L or .S unit)
+;* Addition ops (.LSD) 5 3 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 8 7
+;* Bound(.L .S .D .LS .LSD) 10 7
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 11 Schedule found with 4 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : 6
+;*
+;*----------------------------------------------------------------------------*
+L6: ; PIPED LOOP PROLOG
+; modloop: .trip 50
+ LDBU .D1T1 *+A8(3),A2 ; |291| nbits is diff[i+3]
+ LDBU .D1T1 *+A8(4),A2 ; |353| nbits is diff[i+3] for i+1
+ SHL .S1 A0,0x1,A10 ; ^ |292| index shifted left 1
+ NOP 2
+ ADD .L1 A10,A2,A6 ; ^ |293| put new bit in at LSB
+ CLR .S1 A6,0x5,0x1f,A6 ; ^ |294| clear upper bits
+ NOP 1
+ MPY .M1 0x2,A6,A9 ; ^ |354| index shifted left 1
+ SHL .S1 A6,0x3,A7 ; |295| make nbits index mod table rows
+ ADD .D1 A9,A2,A1 ; ^ |355| put new bit in at LSB
+ LDBU .D1T1 *+A8(5),A2 ;@ |291| nbits is diff[i+3]
+
+ CLR .S1 A1,0x5,0x1f,A0 ; ^ |356| clear upper bits
+|| LDBU .D1T1 *+A8(6),A2 ;@ |353| nbits is diff[i+3] for i+1
+
+ LDW .D1T1 *A4++,A1 ; |262| qtemp hi: q sample qtemp lo: i sample
+|| SHL .S1 A0,0x1,A10 ;@ ^ |292| index shifted left 1
+
+ LDW .D1T2 *A4++,B9 ; |272| qtemp1 hi: q sample qtemp1 lo: i sample
+
+ LDB .D1T1 *-A8(2),A1 ; |286| chsel is diff[i-2]
+|| ADD .L1 A3,A7,A4 ; |296| mtptr addresses index-th row
+
+ LDW .D1T1 *A4++,A6 ; |320| qtemp2 hi: q samp qtemp2 lo: i samp
+|| ADD .L1 A10,A2,A6 ;@ ^ |293| put new bit in at LSB
+
+ LDW .D1T1 *A4++,A2 ; |332| qtemp3 hi: q sample qtemp3 lo: i samp
+|| CLR .S1 A6,0x5,0x1f,A6 ;@ ^ |294| clear upper bits
+
+ SHL .S2X A0,0x3,B6 ; |357| make nbits index mod table rows
+|| [!B0] SUB2 .S1 A5,A1,A1 ; |263| negate both upper and lower halfword
+
+ SHR .S2X A1,0x8,B5 ; |265| qtemp aligned for 24 bit packing
+|| EXTU .S1 A1,0x10,0x14,A0 ; |264| itemp is zero ext 12 bits for isamp
+|| MPY .M1 0x2,A6,A9 ;@ ^ |354| index shifted left 1
+
+ LDB .D1T1 *-A8(1),A1 ; |348| qtemp is diff[i-2] for i+1
+|| [!B0] SUB2 .S2 B8,B9,B9 ; |273| negate both upper and lower
+|| SHL .S1 A6,0x3,A7 ;@ |295| make nbits index mod table rows
+
+ EXTU .S2 B9,0x10,0x14,B4 ; |274| itemp1 is zero ext low 12 bits
+|| ADD .L1X A3,B6,A4 ; |358| mtptr points to index-th row now
+|| EXT .S1 A6,0x10,0x10,A9 ; |321| itemp2 is bits 4-15 of i, sgn ext
+|| [!A1] SUB .L2 0x1,B0,B0 ; |287| if diff[i-2] is 0, flip phase sign
+|| ADD .D1 A9,A2,A1 ;@ ^ |355| put new bit in at LSB
+
+ CLR .S2 B5,0x0,0xb,B5 ; |266| prepare to combine
+|| [ B0] NEG .L1 A2,A2 ; |335| if phase 1, negate q sample
+|| EXT .S1 A2,0x10,0x10,A11 ; |333| itemp3 is bits 4-15 of i, sgn ext
+|| LDBU .D1T1 *+A8(7),A2 ;@@ |291| nbits is diff[i+3]
+
+;** --------------------------------------------------------------------------*
+modloop: ; PIPED LOOP KERNEL
+
+ ADD .L2X B5,A0,B5 ; |267| packed 12 bit samples in itemp
+|| SHR .S2 B9,0x8,B6 ; |275| qtemp1 aligned for 24 bit packing
+|| [!B0] NEG .L1 A11,A11 ; |334| if phase -1, negate i sample
+|| CLR .S1 A1,0x5,0x1f,A0 ;@ ^ |356| clear upper bits
+|| LDBU .D1T1 *+A8(8),A2 ;@@ |353| nbits is diff[i+3] for i+1
+
+ CLR .S2 B6,0x0,0xb,B6 ; |276| prepare to combine
+|| [!B0] NEG .L1 A9,A9 ; |322| if phase -1, negate i sample
+|| LDW .D1T1 *A4++,A1 ;@ |262| qtemp hi: q sample qtemp lo: i sample
+|| SHL .S1 A0,0x1,A10 ;@@ ^ |292| index shifted left 1
+
+ ADD .L2 B6,B4,B4 ; |277| packed 12 bit samples in itemp1
+|| SHL .S2X A9,0x8,B6 ; |325|
+|| [ B0] NEG .L1 A6,A6 ; |323| if phase 1, negate q sample
+|| SHRU .S1 A2,0x14,A9 ; |336| qtemp3 bits 0-11 now q sample msb
+|| LDW .D1T2 *A4++,B9 ;@ |272| qtemp1 hi: q sample qtemp1 lo: i sample
+
+ CLR .S2 B6,0x0,0xb,B6 ; |326|
+|| SHL .S1 A11,0x8,A7 ; |337|
+|| LDB .D1T1 *A8,A1 ;@ |286| chsel is diff[i-2]
+|| ADD .L1 A3,A7,A4 ;@ |296| mtptr addresses index-th row
+
+ [ B1] SUB .L2 B1,0x1,B1 ; |363| downcount loop counter
+|| SHRU .S2X A6,0x14,B9 ; |324| qtemp2 bits 0-11 now q sample msb
+|| CLR .S1 A7,0x0,0xb,A7 ; |338|
+|| LDW .D1T1 *A4++,A6 ;@ |320| qtemp2 hi: q samp qtemp2 lo: i samp
+|| ADD .L1 A10,A2,A6 ;@@ ^ |293| put new bit in at LSB
+
+ STW .D2T2 B5,*B7++(16) ; |268| store it at output pointer
+|| [ B1] B .S2 modloop ; |364|
+|| [ A1] SUB .L2 0x1,B0,B0 ; |349| if diff[i-2] is 1, flip phase sign
+|| ADD .L1 A7,A9,A7 ; |339| itemp3 now packed 12 bit
+|| LDW .D1T1 *A4++,A2 ;@ |332| qtemp3 hi: q sample qtemp3 lo: i samp
+|| CLR .S1 A6,0x5,0x1f,A6 ;@@ ^ |294| clear upper bits
+
+ STW .D2T1 A7,*-B7(4) ; |340| store at output ptr
+|| ADD .L2 B6,B9,B5 ; |327| itemp2 now packed 12 bit
+|| SHL .S2X A0,0x3,B6 ;@ |357| make nbits index mod table rows
+|| [!B0] SUB2 .S1 A5,A1,A1 ;@ |263| negate both upper and lower halfword
+
+ STW .D2T2 B5,*-B7(8) ; |328| store at output ptr
+|| SHR .S2X A1,0x8,B5 ;@ |265| qtemp aligned for 24 bit packing
+|| EXTU .S1 A1,0x10,0x14,A0 ;@ |264| itemp is zero ext 12 bits for isamp
+|| MPY .M1 0x2,A6,A9 ;@@ ^ |354| index shifted left 1
+
+ ADD .L1 0x2,A8,A8 ; |362| advance pointer in diff array 2 bits
+|| STW .D2T2 B4,*-B7(12) ; |278| store it at output pointer
+|| LDB .D1T1 *+A8(1),A1 ;@ |348| qtemp is diff[i-2] for i+1
+|| [!B0] SUB2 .S2 B8,B9,B9 ;@ |273| negate both upper and lower
+|| SHL .S1 A6,0x3,A7 ;@@ |295| make nbits index mod table rows
+
+ EXTU .S2 B9,0x10,0x14,B4 ;@ |274| itemp1 is zero ext low 12 bits
+|| ADD .L1X A3,B6,A4 ;@ |358| mtptr points to index-th row now
+|| EXT .S1 A6,0x10,0x10,A9 ;@ |321| itemp2 is bits 4-15 of i, sgn ext
+|| [!A1] SUB .L2 0x1,B0,B0 ;@ |287| if diff[i-2] is 0, flip phase sign
+|| ADD .D1 A9,A2,A1 ;@@ ^ |355| put new bit in at LSB
+
+ CLR .S2 B5,0x0,0xb,B5 ;@ |266| prepare to combine
+|| [ B0] NEG .L1 A2,A2 ;@ |335| if phase 1, negate q sample
+|| EXT .S1 A2,0x10,0x10,A11 ;@ |333| itemp3 is bits 4-15 of i, sgn ext
+|| LDBU .D1T1 *+A8(7),A2 ;@@@ |291| nbits is diff[i+3]
+
+;** --------------------------------------------------------------------------*
+L8: ; PIPED LOOP EPILOG
+
+ ADD .L2X B5,A0,B5 ;@ |267| packed 12 bit samples in itemp
+|| SHR .S2 B9,0x8,B6 ;@ |275| qtemp1 aligned for 24 bit packing
+|| [!B0] NEG .L1 A11,A11 ;@ |334| if phase -1, negate i sample
+|| CLR .S1 A1,0x5,0x1f,A0 ;@@ ^ |356| clear upper bits
+|| LDBU .D1T1 *+A8(8),A2 ;@@@ |353| nbits is diff[i+3] for i+1
+
+ CLR .S2 B6,0x0,0xb,B6 ;@ |276| prepare to combine
+|| [!B0] NEG .L1 A9,A9 ;@ |322| if phase -1, negate i sample
+|| LDW .D1T1 *A4++,A1 ;@@ |262| qtemp hi: q sample qtemp lo: i sample
+|| SHL .S1 A0,0x1,A10 ;@@@ ^ |292| index shifted left 1
+
+ ADD .L2 B6,B4,B4 ;@ |277| packed 12 bit samples in itemp1
+|| SHL .S2X A9,0x8,B6 ;@ |325|
+|| [ B0] NEG .L1 A6,A6 ;@ |323| if phase 1, negate q sample
+|| SHRU .S1 A2,0x14,A9 ;@ |336| qtemp3 bits 0-11 now q sample msb
+|| LDW .D1T2 *A4++,B9 ;@@ |272| qtemp1 hi: q sample qtemp1 lo: i sample
+
+ CLR .S2 B6,0x0,0xb,B6 ;@ |326|
+|| SHL .S1 A11,0x8,A7 ;@ |337|
+|| LDB .D1T1 *A8,A1 ;@@ |286| chsel is diff[i-2]
+|| ADD .L1 A3,A7,A4 ;@@ |296| mtptr addresses index-th row
+
+ SHRU .S2X A6,0x14,B9 ;@ |324| qtemp2 bits 0-11 now q sample msb
+|| CLR .S1 A7,0x0,0xb,A7 ;@ |338|
+|| LDW .D1T1 *A4++,A6 ;@@ |320| qtemp2 hi: q samp qtemp2 lo: i samp
+|| ADD .L1 A10,A2,A6 ;@@@ ^ |293| put new bit in at LSB
+
+ STW .D2T2 B5,*B7++(16) ;@ |268| store it at output pointer
+|| [ A1] SUB .L2 0x1,B0,B0 ;@ |349| if diff[i-2] is 1, flip phase sign
+|| ADD .L1 A7,A9,A7 ;@ |339| itemp3 now packed 12 bit
+|| LDW .D1T1 *A4++,A2 ;@@ |332| qtemp3 hi: q sample qtemp3 lo: i samp
+|| CLR .S1 A6,0x5,0x1f,A6 ;@@@ ^ |294| clear upper bits
+
+ STW .D2T1 A7,*-B7(4) ;@ |340| store at output ptr
+|| ADD .L2 B6,B9,B5 ;@ |327| itemp2 now packed 12 bit
+|| SHL .S2X A0,0x3,B6 ;@@ |357| make nbits index mod table rows
+|| [!B0] SUB2 .S1 A5,A1,A1 ;@@ |263| negate both upper and lower halfword
+
+ STW .D2T2 B5,*-B7(8) ;@ |328| store at output ptr
+|| SHR .S2X A1,0x8,B5 ;@@ |265| qtemp aligned for 24 bit packing
+|| EXTU .S1 A1,0x10,0x14,A0 ;@@ |264| itemp is zero ext 12 bits for isamp
+|| MPY .M1 0x2,A6,A9 ;@@@ ^ |354| index shifted left 1
+
+ ADD .L1 0x2,A8,A8 ;@ |362| advance pointer in diff array 2 bits
+|| STW .D2T2 B4,*-B7(12) ;@ |278| store it at output pointer
+|| LDB .D1T1 *+A8(1),A1 ;@@ |348| qtemp is diff[i-2] for i+1
+|| [!B0] SUB2 .S2 B8,B9,B9 ;@@ |273| negate both upper and lower
+|| SHL .S1 A6,0x3,A7 ;@@@ |295| make nbits index mod table rows
+
+ EXTU .S2 B9,0x10,0x14,B4 ;@@ |274| itemp1 is zero ext low 12 bits
+|| ADD .L1X A3,B6,A4 ;@@ |358| mtptr points to index-th row now
+|| EXT .S1 A6,0x10,0x10,A9 ;@@ |321| itemp2 is bits 4-15 of i, sgn ext
+|| [!A1] SUB .L2 0x1,B0,B0 ;@@ |287| if diff[i-2] is 0, flip phase sign
+|| ADD .D1 A9,A2,A1 ;@@@ ^ |355| put new bit in at LSB
+
+ CLR .S2 B5,0x0,0xb,B5 ;@@ |266| prepare to combine
+|| [ B0] NEG .L1 A2,A2 ;@@ |335| if phase 1, negate q sample
+|| EXT .S1 A2,0x10,0x10,A11 ;@@ |333| itemp3 is bits 4-15 of i, sgn ext
+
+ ADD .L2X B5,A0,B5 ;@@ |267| packed 12 bit samples in itemp
+|| SHR .S2 B9,0x8,B6 ;@@ |275| qtemp1 aligned for 24 bit packing
+|| [!B0] NEG .L1 A11,A11 ;@@ |334| if phase -1, negate i sample
+|| CLR .S1 A1,0x5,0x1f,A0 ;@@@ ^ |356| clear upper bits
+
+ CLR .S2 B6,0x0,0xb,B6 ;@@ |276| prepare to combine
+|| [!B0] NEG .L1 A9,A9 ;@@ |322| if phase -1, negate i sample
+|| LDW .D1T1 *A4++,A1 ;@@@ |262| qtemp hi: q sample qtemp lo: i sample
+
+ ADD .L2 B6,B4,B4 ;@@ |277| packed 12 bit samples in itemp1
+|| SHL .S2X A9,0x8,B6 ;@@ |325|
+|| [ B0] NEG .L1 A6,A6 ;@@ |323| if phase 1, negate q sample
+|| SHRU .S1 A2,0x14,A9 ;@@ |336| qtemp3 bits 0-11 now q sample msb
+|| LDW .D1T2 *A4++,B9 ;@@@ |272| qtemp1 hi: q sample qtemp1 lo: i sample
+
+ CLR .S2 B6,0x0,0xb,B6 ;@@ |326|
+|| SHL .S1 A11,0x8,A7 ;@@ |337|
+|| LDB .D1T1 *A8,A1 ;@@@ |286| chsel is diff[i-2]
+|| ADD .L1 A3,A7,A4 ;@@@ |296| mtptr addresses index-th row
+
+ SHRU .S2X A6,0x14,B9 ;@@ |324| qtemp2 bits 0-11 now q sample msb
+|| CLR .S1 A7,0x0,0xb,A7 ;@@ |338|
+|| LDW .D1T1 *A4++,A6 ;@@@ |320| qtemp2 hi: q samp qtemp2 lo: i samp
+
+ STW .D2T2 B5,*B7++(16) ;@@ |268| store it at output pointer
+|| [ A1] SUB .L2 0x1,B0,B0 ;@@ |349| if diff[i-2] is 1, flip phase sign
+|| ADD .L1 A7,A9,A7 ;@@ |339| itemp3 now packed 12 bit
+|| LDW .D1T1 *A4++,A2 ;@@@ |332| qtemp3 hi: q sample qtemp3 lo: i samp
+
+ STW .D2T1 A7,*-B7(4) ;@@ |340| store at output ptr
+|| ADD .L2 B6,B9,B5 ;@@ |327| itemp2 now packed 12 bit
+|| SHL .S2X A0,0x3,B6 ;@@@ |357| make nbits index mod table rows
+|| [!B0] SUB2 .S1 A5,A1,A1 ;@@@ |263| negate both upper and lower halfword
+
+ STW .D2T2 B5,*-B7(8) ;@@ |328| store at output ptr
+|| SHR .S2X A1,0x8,B5 ;@@@ |265| qtemp aligned for 24 bit packing
+|| EXTU .S1 A1,0x10,0x14,A0 ;@@@ |264| itemp is zero ext 12 bits for isamp
+
+ ADD .L1 0x2,A8,A8 ;@@ |362| advance pointer in diff array 2 bits
+|| STW .D2T2 B4,*-B7(12) ;@@ |278| store it at output pointer
+|| LDB .D1T1 *+A8(1),A1 ;@@@ |348| qtemp is diff[i-2] for i+1
+|| [!B0] SUB2 .S2 B8,B9,B9 ;@@@ |273| negate both upper and lower
+
+ EXTU .S2 B9,0x10,0x14,B4 ;@@@ |274| itemp1 is zero ext low 12 bits
+|| ADD .L1X A3,B6,A4 ;@@@ |358| mtptr points to index-th row now
+|| EXT .S1 A6,0x10,0x10,A9 ;@@@ |321| itemp2 is bits 4-15 of i, sgn ext
+|| [!A1] SUB .L2 0x1,B0,B0 ;@@@ |287| if diff[i-2] is 0, flip phase sign
+
+ CLR .S2 B5,0x0,0xb,B5 ;@@@ |266| prepare to combine
+|| [ B0] NEG .L1 A2,A2 ;@@@ |335| if phase 1, negate q sample
+|| EXT .S1 A2,0x10,0x10,A11 ;@@@ |333| itemp3 is bits 4-15 of i, sgn ext
+
+ ADD .L2X B5,A0,B5 ;@@@ |267| packed 12 bit samples in itemp
+|| SHR .S2 B9,0x8,B6 ;@@@ |275| qtemp1 aligned for 24 bit packing
+|| [!B0] NEG .L1 A11,A11 ;@@@ |334| if phase -1, negate i sample
+
+ CLR .S2 B6,0x0,0xb,B6 ;@@@ |276| prepare to combine
+|| [!B0] NEG .L1 A9,A9 ;@@@ |322| if phase -1, negate i sample
+
+ ADD .L2 B6,B4,B4 ;@@@ |277| packed 12 bit samples in itemp1
+|| SHL .S2X A9,0x8,B6 ;@@@ |325|
+|| [ B0] NEG .L1 A6,A6 ;@@@ |323| if phase 1, negate q sample
+|| SHRU .S1 A2,0x14,A9 ;@@@ |336| qtemp3 bits 0-11 now q sample msb
+
+ CLR .S2 B6,0x0,0xb,B6 ;@@@ |326|
+|| SHL .S1 A11,0x8,A7 ;@@@ |337|
+
+ SHRU .S2X A6,0x14,B9 ;@@@ |324| qtemp2 bits 0-11 now q sample msb
+|| CLR .S1 A7,0x0,0xb,A7 ;@@@ |338|
+
+ STW .D2T2 B5,*B7++(16) ;@@@ |268| store it at output pointer
+|| [ A1] SUB .L2 0x1,B0,B0 ;@@@ |349| if diff[i-2] is 1, flip phase sign
+|| ADD .L1 A7,A9,A7 ;@@@ |339| itemp3 now packed 12 bit
+
+ STW .D2T1 A7,*-B7(4) ;@@@ |340| store at output ptr
+|| ADD .L2 B6,B9,B5 ;@@@ |327| itemp2 now packed 12 bit
+
+ STW .D2T2 B5,*-B7(8) ;@@@ |328| store at output ptr
+
+ ADD .L1 0x2,A8,A8 ;@@@ |362| advance pointer in diff array 2 bits
+|| STW .D2T2 B4,*-B7(12) ;@@@ |278| store it at output pointer
+
+ NOP 2
+;** --------------------------------------------------------------------------*
+ MVC .S2 B2,CSR ; |233|
+
+ B .S2 B3
+|| LDW .D2T1 *+SP(4),A10
+
+ LDW .D2T1 *++SP(8),A11
+ NOP 4
+ ; BRANCH OCCURS
+
+
+; .endproc
diff --git a/data/mnet/GP10/Dsp/bbdataproc/burst/mod2asm.sa b/data/mnet/GP10/Dsp/bbdataproc/burst/mod2asm.sa
new file mode 100644
index 0000000..7ef077b
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/burst/mod2asm.sa
@@ -0,0 +1,373 @@
+;****************************************************************************
+; (c) Copyright Cisco 2000
+; All Rights Reserved
+;****************************************************************************
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;
+; GMSK Modulator in linear assembly
+;
+; based on Frontier Design's table modulator
+;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;
+;Description:
+; Look-up-table based GSM GMSK 2 samples per bit modulator.
+;
+;Method:
+; This function generates a GSM GMSK modulated waveform from a sequence
+; of bits. Power ramping is performed outside this routine by placing
+; samples at the beginning and end of the burst buffer that aren't modified
+; here.
+;
+; 148 bits are input: The whole burst including tail bits but excluding
+; guard period bits.
+;
+; Output is 148 bits of the burst centered within the burst data buffer.
+;
+;Limitations:
+;
+; The output buffer pointed to, and the modulator table, modLUT2x MUST
+; be 32-bit aligned.
+;
+; It is necessary to unroll the inner loop over samples per bit in
+; order to software pipeline the outer loop. This means that we can't
+; easily use the SAMPLES_PER_BIT symbol to vary the number of bits
+; per sample. Instead this code is written for 2 samples per bit
+; specifically. SAMPLES_PER_BIT must be defined as 2 if this routine
+; is called, or its associated sample table (mod2spb_tab.h) is used.
+;
+; Assuming that the number of bits modulated is always even leads
+; to a significant optimization in the calculation of the samples
+; and updating of the relative phase per bit. This means that both
+; NB_BITS_TO_MOD and AB_BITS_TO_MOD must be even for this routine
+; to work properly.
+;
+;Input/Output:
+;
+; The interface to this routine consists of a pointer to the output
+; sample buffer, and a flag indicating the type of burst. Any value
+; but RACH is modulated as a normal burst, RACH is an access burst.
+; Since local arrays can't be created from linear assembly, a pointer
+; to one created in the C stub that calls this routine is passed. In
+; order to use the #define CONSTANTS in C, they are passed to this
+; routine via a pointer to an int array.
+;
+; C call: GMSKModulate register names here
+; (
+; t_DLComplexSamp *outBurstPtr, obptr
+; t_ChanSel chansel, chsel
+; UChar *diff, dfptr
+; Int *c_constants ccptr
+; )
+;
+; obptr -- Register containing the address samples are written to.
+; Two 12 bit samples, I and Q, are packed in the lower 24 bits
+; of a 32 bit word, with I the lowest 12 bits. For some, no
+; doubt good historical reason, the output buffer actually
+; consists of structures containing two 16 bit samples. It
+; is treated here like an array of Int.
+;
+; chsel -- Type of burst to modulate, if equal to RACH -- an access burst.
+; If equal to anything else, a normal burst. Controls the number
+; of bits that are modulated primarily.
+;
+; dfptr -- Pointer to an array to be filled with the differentially encoded
+; bits to be modulated. Need to create it in C because linear
+; assembly does not allow the stack pointer to be manipulated to
+; create local variables.
+;
+; ccptr -- Pointer to an array filled with #define constants from C, in
+; order to avoid having to redefine them here. Avoids the danger
+; of being modified in C and left the same here.
+;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+ .def _GMSKModLoop ; declare the function global
+
+ .ref _modLUT2x ; import addresses from C
+ .ref _g_DLBurstData
+
+; define index names in array of constants passed from C
+
+C_NUM_MOD_BITS_IN .set 0 ; import symbol values from C
+C_AB_BITS_TO_MOD .set 1 ; values are integer indices in the
+C_NB_BITS_TO_MOD .set 2 ; ccptr array passed
+C_RAMP_OFFSET .set 3
+C_RACH .set 4
+
+_GMSKModLoop .cproc obptr, chsel, dfptr, ccptr
+
+; declare the local registers used
+
+ .reg tbptr ; address of modulator table
+ .reg mtptr ; working modulator table pointer
+ .reg index ; current row in modulator table
+ .reg iloop ; index into differential bits array
+ .reg loopcnt ; loop iteration downcounter
+ .reg itemp ; i sample register, temp storage
+ .reg qtemp ; q sample register, temp storage
+ .reg itemp1 ; i sample register, temp storage
+ .reg qtemp1 ; q sample register, temp storage
+ .reg itemp2 ; i sample register, temp storage
+ .reg qtemp2 ; q sample register, temp storage
+ .reg itemp3 ; i sample register, temp storage
+ .reg qtemp3 ; q sample register, temp storage
+ .reg phtest ; 0 iff phase == -1
+ .reg nbits ; number of bits to modulate
+ .reg bdata ; pointer to burst data
+
+ MVK _modLUT2x, tbptr ; address modulator lookup table
+ MVKH _modLUT2x, tbptr
+
+ MVK _g_DLBurstData, bdata ; address modulator burst data buffer
+ MVKH _g_DLBurstData, bdata
+
+ ;
+ ; Number of bits to modulate depends on the burst type
+ ;
+ LDW *ccptr[C_NB_BITS_TO_MOD],nbits ; normal bits to modulate
+ LDW *ccptr[C_RACH],itemp
+ SUB chsel,itemp,chsel ; test for RACH
+ [!chsel] LDW *ccptr[C_AB_BITS_TO_MOD],nbits ; use access burst length
+
+ ;
+ ; Transmission is enabled, clear flag then perform modulation.
+ ;
+ ; g_DLBurstData.tx = FALSE;
+
+ ZERO qtemp ; qtemp is 0
+ STB qtemp,*bdata++ ; clear burst tx flag, bdata->data
+ ;
+ ; Differentially encode input bit stream. The input bit stream is
+ ; effectively pre-pended with two 1's and post-pended with one 1.
+ ; The differentially encoded array is 150 bits long, and modulated
+ ; samples corresponding to only the center 146 bits are generated.
+ ; The samples corresponding to bits before and after these 146 bits
+ ; are known a-priori and have been pre-computed.
+
+ ; diff[0] = 1;
+
+ MV dfptr,itemp ; address diff array, itemp->diff[0]
+ MVK 1,qtemp ; qtemp is 1
+ STB qtemp,*itemp++ ; diff[0] = 1
+
+ ; diff[1] = g_DLBurstData.data[0];
+
+ LDB *bdata,qtemp ; qtemp is g_DLBurstData.data[0]
+ STB qtemp,*itemp ; diff[1] = qtemp
+
+ ; diff[MOD_NUM_BITS_IN + 1] = g_DLBurstData.data[MOD_NUM_BITS_IN - 1];
+
+ LDW *ccptr[C_NUM_MOD_BITS_IN],iloop ; iloop = _NUM_MOD_BITS_IN
+ ADD iloop,bdata,qtemp ; qtemp -> g_DLBurstData[NUM_MOD...IN]
+ LDB *-qtemp[1],qtemp ; qtemp = g_DLBurstData[NUM_MOD...-1]
+ ADD itemp,iloop,itemp ; itemp -> diff[NUM_MOD...+1]
+ STB qtemp,*itemp ; diff[NUM_MOD...+1] = qtemp
+
+ ; for (i=1; i<(MOD_NUM_BITS_IN+1); i++)
+ ; {
+ ; diff[i+1] = (g_DLBurstData.data[i] == g_DLBurstData.data[i-1]);
+ ; }
+
+ MV iloop,loopcnt ; loop count = NUM_MOD_BITS_IN
+
+ LDB *bdata++,itemp ; itemp = g_DLBurstData[0]
+ ADD 2,dfptr,mtptr ; mtptr => diff[2]
+ MV bdata,chsel ; chsel => g_DLBurstData[1]
+
+diffloop: .trip 100
+
+ LDB.D *chsel++,qtemp ; qtemp = g_DLBurstData[iloop]
+ CMPEQ.L itemp,qtemp,phtest ; phtest = (itemp==qtemp)
+ STB.D phtest,*mtptr++ ; save differentially encoded bit
+ MV qtemp,itemp ; save g_DLBurstData[iloop] for next
+ SUB.S loopcnt,1,loopcnt ; downcount
+ [loopcnt] B.S diffloop ; test and loop
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; Use look-up table to convert bits into a waveform
+ ;; Accumulate the integer phase and modify the waveform accordingly
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+ ;
+ ; quadrant phase is indicated by a complex number
+ ;
+ ; (integerPhase.I,integerPhase.Q)
+ ;
+ ; where one of I,Q is +/-1 and the other is zero. Since
+ ; the phase always rotates +/-90 degrees each bit, Q is
+ ; zero on even bits and I is zero on odd bits. Doing two
+ ; bits per loop iteration allows phase to be stored in one
+ ; register, phase, which represents Q on odd bits and I
+ ; on even bits. It is always 1 or -1, reflected by phtest
+ ; being 1 or 0, resp.
+ ;
+
+ MVK 1, phtest ; init phasor as I=1, Q=0 for even bit
+
+ LDW *ccptr[C_RAMP_OFFSET],itemp
+ ADD obptr,itemp,obptr ; skip ramp samples in output buffer
+
+ ZERO bdata ; use this as constant zero below
+
+ ; initialize the modulator loop count
+
+ ADD dfptr, 2, iloop ; set i variable in loop
+ SHR nbits, 1, loopcnt ; loop iteration downcounter
+
+ ; calculate initial table index =
+ ;
+ ; 16*diff[0] + 8*diff[1] + 4*diff[2] + 2*diff[3] + diff[4]
+
+ ZERO index
+ ADD dfptr,4,qtemp ; qtemp->diff[4]
+
+ LDBU *qtemp--,itemp ; itemp: diff[4]
+ [itemp] ADD 1,index,index
+ LDBU *qtemp--,itemp ; itemp: diff[3]
+ [itemp] ADD 2,index,index
+ LDBU *qtemp--,itemp ; itemp: diff[2]
+ [itemp] ADD 4,index,index
+ LDBU *qtemp--,itemp ; itemp: diff[1]
+ [itemp] ADD 8,index,index
+ LDBU *qtemp,itemp ; itemp: diff[0]
+ [itemp] ADD 16,index,index
+
+ SHL index,3,chsel ; index is 8 * row of modulator table
+ ADD tbptr,chsel,mtptr ; mtptr points to index-th row now
+
+modloop: .trip 50
+
+ ; top of each loop thru a pair of bits to be modulated
+
+ ;
+ ; even bit, phase IntegerPhase.I = +/-1, IntegerPhase.Q = 0
+ ;
+ ; *(Int16 *) & (outBurstPtr[outputIndex].I) =
+ ; (integerPhase.I * modLUT2x[index][splno].I -
+ ; integerPhase.Q * modLUT2x[index][splno].Q);
+ ;
+ ; *(Int16 *) & (outBurstPtr[outputIndex].Q) =
+ ; (integerPhase.I * modLUT2x[index][splno].Q +
+ ; integerPhase.Q * modLUT2x[index][splno].I) >> 4;
+ ;
+ ; *(Int32 *) & (outBurstPtr[outputIndex]) =
+ ; *(Int32 *) & (outBurstPtr[outputIndex++]) >> 4;
+ ;
+ ; simplified for even bit case:
+ ;
+ ; out.I = phase * modLUT2x[index][splno].I
+ ; out.Q = phase * modLUT2x[index][splno].Q
+ ; *obptr++ = (signext 24:31 out.Q 12:23, out.I 0:11)
+ ;
+
+ ; first sample for bit
+
+ LDW *mtptr++,qtemp ; qtemp hi: q sample qtemp lo: i sample
+ [!phtest] SUB2 bdata,qtemp,qtemp ; negate both upper and lower halfword
+ EXTU qtemp,16,20,itemp ; itemp is zero ext 12 bits for isamp
+ SHR qtemp,8,qtemp ; qtemp aligned for 24 bit packing
+ CLR qtemp,0,11,qtemp ; prepare to combine
+ ADD qtemp,itemp,itemp ; packed 12 bit samples in itemp
+ STW itemp,*obptr++ ; store it at output pointer
+
+ ; second sample for even bit
+
+ LDW *mtptr++,qtemp1 ; qtemp1 hi: q sample qtemp1 lo: i sample
+ [!phtest] SUB2 bdata,qtemp1,qtemp1 ; negate both upper and lower
+ EXTU qtemp1,16,20,itemp1 ; itemp1 is zero ext low 12 bits
+ SHR qtemp1,8,qtemp1 ; qtemp1 aligned for 24 bit packing
+ CLR qtemp1,0,11,qtemp1 ; prepare to combine
+ ADD qtemp1,itemp1,itemp1; packed 12 bit samples in itemp1
+ STW itemp1,*obptr++ ; store it at output pointer
+
+ ; Note: to create a 4 sample per bit modulator, simply duplicate
+ ; the sections for first and second sample, and use a 4 sample
+ ; per bit table.
+
+ ; update the phasor for transition from even to odd bit
+
+ LDB *-iloop[2], qtemp ; chsel is diff[i-2]
+ [!qtemp] SUB.L 1,phtest,phtest ; if diff[i-2] is 0, flip phase sign
+
+ ; update the table index for the new row
+
+ LDBU *iloop[3], nbits ; nbits is diff[i+3]
+ SHL index,1,index ; index shifted left 1
+ ADD index,nbits,index ; put new bit in at LSB
+ CLR index,5,31,index ; clear upper bits
+ SHL index,3,chsel ; make nbits index mod table rows
+ ADD tbptr,chsel,mtptr ; mtptr addresses index-th row
+
+ ;
+ ; odd bit, IntegerPhase.I = 0, IntegerPhase.Q = +/-1
+ ;
+ ; *(Int16 *) & (outBurstPtr[outputIndex].I) =
+ ; (integerPhase.I * modLUT2x[index][splno].I -
+ ; integerPhase.Q * modLUT2x[index][splno].Q);
+ ;
+ ; *(Int16 *) & (outBurstPtr[outputIndex].Q) =
+ ; (integerPhase.I * modLUT2x[index][splno].Q +
+ ; integerPhase.Q * modLUT2x[index][splno].I) >> 4;
+ ;
+ ; *(Int32 *) & (outBurstPtr[outputIndex]) =
+ ; *(Int32 *) & (outBurstPtr[outputIndex++]) >> 4;
+ ;
+ ; simplified for odd bit case:
+ ;
+ ; out.I = -phase * modLUT2x[index][splno].Q
+ ; out.Q = phase * modLUT2x[index][splno].I
+ ; *obptr++ = (signext 24:31, out.Q 12:23, out.I 0:11)
+
+ ; first sample for bit
+
+ LDW *mtptr++,qtemp2 ; qtemp2 hi: q samp qtemp2 lo: i samp
+ EXT qtemp2,16,16,itemp2 ; itemp2 is bits 4-15 of i, sgn ext
+ [!phtest] NEG.L itemp2,itemp2 ; if phase -1, negate i sample
+ [phtest] NEG.L qtemp2,qtemp2 ; if phase 1, negate q sample
+ SHRU qtemp2,20,qtemp2 ; qtemp2 bits 0-11 now q sample msb
+ SHL itemp2,8,itemp2
+ CLR itemp2,0,11,itemp2
+ ADD itemp2,qtemp2,itemp2; itemp2 now packed 12 bit
+ STW itemp2, *obptr++ ; store at output ptr
+
+ ; second sample for odd bit
+
+ LDW *mtptr++,qtemp3 ; qtemp3 hi: q sample qtemp3 lo: i samp
+ EXT qtemp3,16,16,itemp3 ; itemp3 is bits 4-15 of i, sgn ext
+ [!phtest] NEG.L itemp3,itemp3 ; if phase -1, negate i sample
+ [phtest] NEG.L qtemp3,qtemp3 ; if phase 1, negate q sample
+ SHRU qtemp3,20,qtemp3 ; qtemp3 bits 0-11 now q sample msb
+ SHL itemp3,8,itemp3
+ CLR itemp3,0,11,itemp3
+ ADD itemp3,qtemp3,itemp3; itemp3 now packed 12 bit
+ STW itemp3, *obptr++ ; store at output ptr
+
+ ; Note: to create a 4 sample per bit modulator, simply duplicate
+ ; the sections for first and second sample, and use a 4 sample
+ ; per row table.
+
+ ; update the phasor
+
+ LDB *-iloop[1], chsel ; qtemp is diff[i-2] for i+1
+ [chsel] SUB.L 1,phtest,phtest ; if diff[i-2] is 1, flip phase sign
+
+ ; update the table index for the new row
+
+ LDBU *iloop[4], nbits ; nbits is diff[i+3] for i+1
+ MPY 2,index,index ; index shifted left 1
+ ADD index,nbits,index ; put new bit in at LSB
+ CLR index,5,31,index ; clear upper bits
+ SHL index,3,chsel ; make nbits index mod table rows
+ ADD tbptr,chsel,mtptr ; mtptr points to index-th row now
+
+ ; test for end of loop and branch if not
+
+ ADD iloop,2,iloop ; advance pointer in diff array 2 bits
+ SUB loopcnt,1,loopcnt ; downcount loop counter
+ [loopcnt] B modloop
+
+ .return
+
+ .endproc
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/burst/mod2spb.c b/data/mnet/GP10/Dsp/bbdataproc/burst/mod2spb.c
new file mode 100644
index 0000000..a129490
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/burst/mod2spb.c
@@ -0,0 +1,306 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+**
+** File: mod2spb.c
+**
+** Description:
+** This file contains the GSM GMSK modulator routine.
+** Note: Old revision log is at the bottom of this file.
+**
+*****************************************************************************/
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "bbproto.h"
+#include "dsprotyp.h"
+#include "mod2spb_tab.h"
+
+/*****************************************************************************
+** ROUTINE NAME: mod2spb
+**
+** Description:
+** Look-up-table based GSM GMSK 2 samples per bit modulator.
+**
+** Method:
+** This function generates a GSM GMSK modulated waveform from a sequence
+** of bits. Power ramping is also performed.
+**
+** 148 bits are input: The whole burst including tail bits but excluding
+** guard period bits.
+**
+** The ramped samples (corresponding to the guard period and the extreme
+** tail bit on either end) are pre-calculated and simply copied to the
+** output buffer. The pre-calculation assumes that guard period bits are
+** 1's and the outer 3 tail bits on either end are 0's as indicated in
+** GSM 05.02 for the NB. This is not exactly true for the AB which has
+** 0,0,1 as its 1st three tail bits, but close enough to produce acceptable
+** results.
+**
+** Output is 148 bits of the burst and 9 (actually 8.25) bits of the guard
+** period. 4 guard period bits are added at the beginning and 5 (actually
+** 4.25) are added at the end. 156.25 bits (625 samples) are output.
+**
+** Error Handling:
+**
+** Limitations:
+** The output buffer pointer MUST point to a buffer that is 32-bit
+** aligned.
+**
+** Parameter I/O:
+** waveform - output array of the modulated waveform
+** bits - input bits array
+** bursttype - input indicating which burst type
+**
+** Returns:
+** None
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+
+/*
+* Declare the assembly modulator
+*/
+extern void GMSKModLoop
+(
+ t_DLComplexSamp *outBurstPtr,
+ t_chanSel chanSel,
+ UChar *diff,
+ Int *constantsPtr
+);
+
+
+Void modRampSample(Uint8 IQSwap, t_DLComplexSamp *outBurstPtr);
+
+void GMSKModulate(t_DLComplexSamp *outBurstPtr, t_chanSel chanSel)
+{
+ UChar diff[MOD_NUM_BITS_IN + 2];
+ Int c_constants[]=
+ {
+ MOD_NUM_BITS_IN, /* bits differentially encoded */
+ AB_BITS_TO_MOD, /* size of access (RACH) burst */
+ NB_BITS_TO_MOD, /* size of normal burst */
+ RAMP_SAMPLES*sizeof(t_DLComplexSamp), /* offset in output past ramp */
+ RACH, /* used to detect RACH bursts */
+ };
+
+ if(g_DLBurstData.tx == TRUE)
+ {
+ GMSKModLoop
+ (
+ outBurstPtr, /* - pointer to output samples */
+ chanSel, /* - type of burst selector */
+ diff, /* - differentially encoded bit array, declared here */
+ c_constants /* - pass these thru a pointer so that if they */
+ ); /* ever change, those changes are reflected */
+
+ modRampSample(g_BBInfo[0].IQSwap, outBurstPtr);
+ }
+ else
+ {
+ zeroTxBurst((Uint32*)g_BBInfo[0].dlBBSmpl);
+ }
+} /* in the assembly modulator. DO NOT REORDER */
+
+
+Void modRampSample(Uint8 IQSwap, t_DLComplexSamp *outBurstPtr)
+{
+ Int16 i, outputIndex;
+
+ outputIndex = 0;
+ if(IQSwap == TRUE)
+ {
+ /*
+ * If requested by Host, swap I and Q samples
+ */
+ for (i=0; i<RAMP_SAMPLES; i++)
+ {
+ *(Int16 *) & (outBurstPtr[outputIndex].I) = modRampUp[i*2].Q;
+ *(Int16 *) & (outBurstPtr[outputIndex++].Q) = (modRampUp[i*2].I) >> 4;
+ }
+ }
+ else
+ {
+ for (i=0; i<RAMP_SAMPLES; i++)
+ {
+ *(Int16 *) & (outBurstPtr[outputIndex].I) = modRampUp[i*2].I;
+ *(Int16 *) & (outBurstPtr[outputIndex++].Q) = (modRampUp[i*2].Q) >> 4;
+ }
+ }
+ outputIndex = 0;
+ for (i=0; i<RAMP_SAMPLES; i++)
+ {
+ *(Int32 *) & (outBurstPtr[outputIndex]) >>= 4;
+ outputIndex++;
+ }
+
+ outputIndex = 312-RAMP_SAMPLES;
+ if(IQSwap == TRUE)
+ {
+ /*
+ * If requested by Host, swap I and Q samples
+ */
+ for (i=0; i<RAMP_SAMPLES; i++)
+ {
+ *(Int16 *) & (outBurstPtr[outputIndex].I) = modRampDown[i*2].Q;
+ *(Int16 *) & (outBurstPtr[outputIndex++].Q) = (modRampDown[i*2].I) >> 4;
+ }
+ }
+ else
+ {
+ for (i=0; i<RAMP_SAMPLES; i++)
+ {
+ *(Int16 *) & (outBurstPtr[outputIndex].I) = modRampDown[i*2].I;
+ *(Int16 *) & (outBurstPtr[outputIndex++].Q) = (modRampDown[i*2].Q) >> 4;
+ }
+ }
+ outputIndex = 312-RAMP_SAMPLES;
+ for (i=0; i<RAMP_SAMPLES; i++)
+ {
+ *(Int32 *) & (outBurstPtr[outputIndex]) >>= 4;
+ outputIndex++;
+ }
+ *(Int32 *) & (outBurstPtr[outputIndex]) = 0; /* set 313th sample to zero */
+}
+
+#undef TESTMOD
+#ifdef TESTMOD
+
+UChar testdata[]=
+{
+ 1,1,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,1,0,1,1,0,
+ 1,1,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,1,0,1,1,0,
+ 1,1,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,1,0,1,1,0,
+ 1,1,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,1,0,1,1,0,
+ 1,1,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,1,0,1,1,0,
+ 1,1,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,1,0,1,1,0,
+ 1,1,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,1,0,1,1,0,
+ 1,1,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,1,0,1,1,0,
+};
+
+t_DLComplexSamp out1[MOD_NUM_BITS_IN+2*RAMP_SAMPLES];
+t_DLComplexSamp out2[MOD_NUM_BITS_IN+2*RAMP_SAMPLES];
+
+extern void GMSKModulateC(t_DLComplexSamp *outBurstPtr, t_chanSel chanSel);
+
+void main(void)
+{
+ int i;
+
+ for (i=0;i<MOD_NUM_BITS_IN+RAMP_SAMPLES;i++)
+ g_DLBurstData.data[i] = testdata[i];
+
+ g_DLBurstData.tx = 1;
+
+ for (i=0;i<MOD_NUM_BITS_IN+2*RAMP_SAMPLES;i++)
+ {
+ out1[i].I = out1[i].Q = 0;
+ }
+
+ GMSKModulateC(out1,TCHF);
+
+ for (i=0;i<MOD_NUM_BITS_IN+RAMP_SAMPLES;i++)
+ g_DLBurstData.data[i] = testdata[i];
+
+ g_DLBurstData.tx = 1;
+
+ for (i=0;i<MOD_NUM_BITS_IN+2*RAMP_SAMPLES;i++)
+ {
+ out2[i].I = out2[i].Q = 0;
+ }
+
+ GMSKModulate(out2,TCHF);
+
+ for (i=0;i<MOD_NUM_BITS_IN+2*RAMP_SAMPLES;i++)
+ {
+ if (out1[i].I!=out2[i].I || out1[i].Q!=out2[i].Q)
+ goto error;
+ }
+
+ while(1);
+error:
+ for (;;);
+
+}
+
+#endif /* TESTMOD */
+
+/*********************** Old revision log **********************************
+**
+** Revision 1.5 1999/11/05 02:39:32 whuang
+** corrected problem on power ramping up
+**
+** Revision 1.4 1999-11-04 14:54:48-08 ltravaglione
+** <>
+**
+** Revision 1.4 1999-11-02 18:05:31-08 whuang
+** added Ramping for active burst always
+**
+** Revision 1.3 1999-09-07 17:43:01-07 whuang
+** added UL/DL DTX mode handling functions
+**
+** Revision 1.2 1999-05-10 08:43:48-07 dkaiser
+** no longer need to include mod4spb.h, nor extern g_DLBurstBuf (all in bbdata.h)
+**
+** Revision 1.1 1999-02-09 10:55:13-08 randyt
+** Initial revision
+**
+ *
+ * Rev 1.0 03 Feb 1999 16:58:48 whuang
+ * Checked in by PVCS VM Server.
+** Revision 1.4 1999-01-07 14:13:31-08 randyt
+** Change back to 2's complement output, McBSP FPGA handles invert the sign bit
+** PVCS Version 1.3
+**
+ *
+ * Rev 1.3 10 Dec 1998 17:43:46 whuang
+ * Change back to 2's complement output, McBSP FPGA handles invert the sign bit
+ *
+ * Rev 1.0 Oct 27 1998 16:19:28 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+ *
+ * Rev 1.0 Oct 23 1998 17:56:02 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.13 1998/10/16 15:34:47 dlanza
+** <>
+**
+** Revision 1.12 1998/10/14 22:12:33 bhehn
+** Modified for L1 global instantiation
+**
+** Revision 1.11 1998/10/04 01:13:35 dlanza
+** Optimized to 8860 (mod+burst) cycles.
+**
+** Revision 1.10 1998/10/01 17:19:00 dlanza
+** Cut the cycle count from 13,151 to 12,199.
+**
+** Revision 1.9 1998/09/30 17:27:56 dlanza
+** <>
+**
+** Revision 1.8 1998/09/30 02:08:23 dlanza
+** Fixed endian problem for good. Code is now endian independent. Mod/burst runs is 13,500 cycles.
+**
+** Revision 1.7 1998/09/28 23:55:13 dlanza
+** <>
+**
+** Revision 1.6 1998/09/28 23:51:51 dlanza
+** Fixed endian problem associated with 32-bit table accesses.
+**
+** Revision 1.4 1998/09/28 22:08:45 dlanza
+** Broken!!!!
+**
+** Revision 1.3 1998/09/28 14:30:13 dlanza
+** Modified loop to improve performance. Helped a little.
+**
+** Revision 1.2 1998/09/25 19:16:57 dlanza
+** Added reference to prototypes header file.
+**
+** Revision 1.1 1998/09/25 19:00:27 dlanza
+** Initial revision
+**
+**
+** Revision: 1.1
+** DJL 9/22/98 - Creation.
+**/
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/burst/mod2spb_tab.h b/data/mnet/GP10/Dsp/bbdataproc/burst/mod2spb_tab.h
new file mode 100644
index 0000000..9a7079f
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/burst/mod2spb_tab.h
@@ -0,0 +1,110 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+**
+** File: mod2spb_tab.h
+**
+** Description:
+** This header file contains the modulator look up tables.
+**
+*****************************************************************************/
+#ifndef MOD2SPB_TAB_H
+#define MOD2SPB_TAB_H
+
+/*
+* Modulator waveform look-up-table (I,Q,I,Q,...)
+*/
+#pragma DATA_ALIGN(modLUT2x, 4);
+const t_DLComplexSamp modLUT2x[LUT_DEPTH][SAMPLES_PER_BIT] = {
+{{0x8276, 0x18f9},{0xb8e3, 0x6a6e}},
+{{0x8276, 0x18f9},{0xb8db, 0x6a68}},
+{{0x822f, 0x178b},{0xaa07, 0x5ed5}},
+{{0x822f, 0x178a},{0xaa00, 0x5ece}},
+{{0x935a, 0xbc54},{0xae80, 0x9d4c}},
+{{0x935a, 0xbc54},{0xae88, 0x9d46}},
+{{0x9421, 0xbb19},{0xbde2, 0x9266}},
+{{0x9421, 0xbb19},{0xbdea, 0x9261}},
+{{0x6c05, 0xbb54},{0x4217, 0x9262}},
+{{0x6c05, 0xbb54},{0x421f, 0x9267}},
+{{0x6ccb, 0xbc8f},{0x5179, 0x9d47}},
+{{0x6ccb, 0xbc8f},{0x5180, 0x9d4d}},
+{{0x7dc4, 0x17cf},{0x55ff, 0x5ecf}},
+{{0x7dc4, 0x17cf},{0x55f8, 0x5ed5}},
+{{0x7d7d, 0x193d},{0x4724, 0x6a69}},
+{{0x7d7d, 0x193d},{0x471c, 0x6a6e}},
+{{0x7d7d, 0xe6c3},{0x471c, 0x9592}},
+{{0x7d7d, 0xe6c3},{0x4724, 0x9597}},
+{{0x7dc4, 0xe831},{0x55f8, 0xa12b}},
+{{0x7dc4, 0xe831},{0x55ff, 0xa131}},
+{{0x6ccb, 0x4371},{0x5180, 0x62b3}},
+{{0x6ccb, 0x4371},{0x5179, 0x62b9}},
+{{0x6c05, 0x44ac},{0x421f, 0x6d99}},
+{{0x6c05, 0x44ac},{0x4217, 0x6d9e}},
+{{0x9421, 0x44e7},{0xbdea, 0x6d9f}},
+{{0x9421, 0x44e7},{0xbde2, 0x6d9a}},
+{{0x935a, 0x43ac},{0xae88, 0x62ba}},
+{{0x935a, 0x43ac},{0xae80, 0x62b4}},
+{{0x822f, 0xe876},{0xaa00, 0xa132}},
+{{0x822f, 0xe875},{0xaa07, 0xa12b}},
+{{0x8276, 0xe707},{0xb8db, 0x9598}},
+{{0x8276, 0xe707},{0xb8e3, 0x9592}}};
+
+
+/*
+* Modulator ramp-up look-up-table (I,Q,I,Q,...)
+*/
+#pragma DATA_ALIGN(modRampUp, 4);
+const t_DLComplexSamp modRampUp[RAMP_SAMPLES*2+1] = {
+{0x0000, 0x0000},
+{0x0000, 0x0000},
+{0x0000, 0x0000},
+{0x0000, 0x0000},
+{0x0000, 0x0000},
+{0xfecb, 0xffc3},
+{0xfbf3, 0xfd4b},
+{0xfa02, 0xf708},
+{0xfc58, 0xed9d},
+{0x058d, 0xe41a},
+{0x15f3, 0xdf26},
+{0x2ad3, 0xe35e},
+{0x3ebe, 0xf362},
+{0x4b2e, 0x0e11},
+{0x4bc8, 0x2db1},
+{0x42de, 0x49c2},
+{0x3a9e, 0x5c33},
+{0x3df8, 0x637e},
+{0x4e66, 0x5ef1},
+{0x61c7, 0x50b0},
+{0x6ccb, 0x4371}};
+
+
+/*
+* Modulator ramp-down look-up-table (I,Q,I,Q,...)
+*/
+#pragma DATA_ALIGN(modRampDown, 4);
+const t_DLComplexSamp modRampDown[RAMP_SAMPLES*2] = {
+{0x823c, 0xe831},
+{0x9267, 0xbde1},
+{0xaa08, 0xa12b},
+{0xbbfd, 0x9505},
+{0xbee7, 0x977d},
+{0xb55e, 0xa59d},
+{0xabc0, 0xba6f},
+{0xab7f, 0xcb5e},
+{0xb552, 0xd086},
+{0xc755, 0xcca1},
+{0xdef5, 0xc931},
+{0xf686, 0xcd5d},
+{0x07ca, 0xd944},
+{0x0fcf, 0xe85b},
+{0x0f96, 0xf596},
+{0x0a94, 0xfde5},
+{0x04c7, 0x00f3},
+{0x0106, 0x00af},
+{0x0000, 0x0000},
+{0x0000, 0x0000}};
+
+
+#endif
diff --git a/data/mnet/GP10/Dsp/bbdataproc/burst/mod4spb.c b/data/mnet/GP10/Dsp/bbdataproc/burst/mod4spb.c
new file mode 100644
index 0000000..5985faa
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/burst/mod4spb.c
@@ -0,0 +1,259 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+**
+** File mod4bpb.c
+**
+** Description:
+** This file contains the GSM GMSK modulator routine.
+**
+*****************************************************************************/
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "bbproto.h"
+#include "mod4spb_tab.h"
+
+/*****************************************************************************
+** ROUTINE NAME: mod4spb
+**
+** Description:
+** Look-up-table based GSM GMSK 4 samples per bit modulator.
+**
+** Method:
+** This function generates a GSM GMSK modulated waveform from a sequence
+** of bits. Power ramping is also performed.
+**
+** 148 bits are input: The whole burst including tail bits but excluding
+** guard period bits.
+**
+** The ramped samples (corresponding to the guard period and the extreme
+** tail bit on either end) are pre-calculated and simply copied to the
+** output buffer. The pre-calculation assumes that guard period bits are
+** 1's and the outer 3 tail bits on either end are 0's as indicated in
+** GSM 05.02 for the NB. This is not exactly true for the AB which has
+** 0,0,1 as its 1st three tail bits, but close enough to produce acceptable
+** results.
+**
+** Output is 148 bits of the burst and 9 (actually 8.25) bits of the guard
+** period. 4 guard period bits are added at the beginning and 5 (actually
+** 4.25) are added at the end. 156.25 bits (625 samples) are output.
+**
+** Error Handling:
+**
+** Limitations:
+** The output buffer pointer MUST point to a buffer that is 32-bit
+** aligned.
+**
+** Parameter I/O:
+** waveform - output array of the modulated waveform
+** bits - input bits array
+** bursttype - input indicating which burst type
+**
+** Returns:
+** None
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+void GMSKModulate(t_DLComplexSamp *outBurstPtr, t_chanSel chanSel)
+{
+ UChar diff[MOD_NUM_BITS_IN + 2];
+ t_DLComplexSamp integerPhase;
+ Short temp;
+ Int bitsToModulate;
+ Int index;
+ Int outputIndex;
+ Int i, k;
+ Int32 tempIndex;
+
+ /*
+ * Check if transmission is enabled. If not, output all 0's.
+ */
+ /*if (g_DLBurstData.tx == FALSE)
+ if ( g_burstProc.dlTN == 3 || g_burstProc.dlTN == 5 || g_burstProc.dlTN == 7)
+ {
+ for (i=0; i<BURST_SIZE_DL; i++)
+ {
+ *(Int *)&outBurstPtr[i] = 0;
+ }
+ }
+ else*/
+ {
+ /*
+ * Transmission is enabled, clear flag then perform modulation.
+ */
+ g_DLBurstData.tx = FALSE;
+
+ /*
+ * Differentially encode input bit stream. The input bit stream is
+ * effectively pre-pended with two 1's and post-pended with one 1.
+ * The differentially encoded array is 150 bits long, and modulated
+ * samples corresponding to only the center 146 bits are generated.
+ * The samples corresponding to bits before and after these 146 bits
+ * are known a-priori and have been pre-computed.
+ */
+ diff[0] = 1;
+ diff[1] = g_DLBurstData.data[0];
+ diff[MOD_NUM_BITS_IN + 1] = g_DLBurstData.data[MOD_NUM_BITS_IN - 1];
+
+ for (i=1; i<(MOD_NUM_BITS_IN+1); i++)
+ {
+ diff[i+1] = (g_DLBurstData.data[i] == g_DLBurstData.data[i-1]);
+ }
+
+ /*********************************************************************
+ ** Use look-up table to convert bits into a waveform
+ ** Accumulate the integer phase and modify the waveform accordingly
+ *********************************************************************/
+
+ /*
+ * Initialize the integer phase to 0
+ */
+ integerPhase.I = 1;
+ integerPhase.Q = 0;
+
+ /*
+ * Number of bits to modulate depends on the burst type
+ */
+ if (chanSel == RACH)
+ {
+ bitsToModulate = AB_BITS_TO_MOD;
+ }
+ else
+ {
+ bitsToModulate = NB_BITS_TO_MOD;
+ }
+
+ /*
+ * The LUT is indexed based on the 5 most recent differentially encoded
+ * bits. Initialize the index. Newest bit is the least significant.
+ */
+ index = diff[4] + diff[3]*2 + diff[2]*4 + diff[1]*8 + diff[0]*16;
+
+#ifdef DYNAMIC_RAMPING
+ /*
+ * Copy the ramp-up waveform to the output buffer
+ */
+ outputIndex = 0;
+
+ for (i=0; i<RAMP_SAMPLES; i++)
+ {
+ *(Int16 *) & (outBurstPtr[outputIndex].I) = modRampUp[i*2].I;
+ *(Int16 *) & (outBurstPtr[outputIndex++].Q) = (modRampUp[i*2].Q) >> 4;
+ }
+
+ for (i=0; i<RAMP_SAMPLES; i++)
+ {
+ *(Int32 *) & (outBurstPtr[i]) = *(Int32 *) & (outBurstPtr[i]) >>4;
+ }
+
+ /*
+ * Loop over the center 146 bits computing the output samples associated
+ * with each. i points to the bit corresponding to the output samples
+ * currently being generated. Four pre-pended guard bits and the leading
+ * tail bit are pre-calculated. The first output sample corresponds to
+ * the 6th bit period, therefore the output index is init'ed to skip the
+ * first 5 bit periods.
+ */
+#else
+ outputIndex = (5 * SAMPLES_PER_BIT);
+#endif
+
+ for (i=2; i<(bitsToModulate+2); i++)
+ {
+ /*
+ * For each phase of the output, index the LUT to determine the
+ * output sample. The integrated phase is used to determine any
+ * additional N*90 degree offset.
+ */
+
+ tempIndex = outputIndex;
+
+ for(k=0; k<SAMPLES_PER_BIT; k++)
+ {
+ *(Int16 *) & (outBurstPtr[outputIndex].I) =
+ (integerPhase.I * modLUT4x[index][k*2].I -
+ integerPhase.Q * modLUT4x[index][k*2].Q);
+
+ *(Int16 *) & (outBurstPtr[outputIndex++].Q) =
+ (integerPhase.I * modLUT4x[index][k*2].Q +
+ integerPhase.Q * modLUT4x[index][k*2].I) >> 4;
+ }
+
+ for(k=0; k<SAMPLES_PER_BIT; k++)
+ {
+
+ *(Int32 *) & (outBurstPtr[tempIndex]) =
+ *(Int32 *) & (outBurstPtr[tempIndex++]) >> 4;
+ }
+
+ /*
+ * Accumulate the integer phase modulo 2*pi (-2,-1,0, or 1).
+ * The oldest bit is accumulated since it will not be within the
+ * [-2:+2] window in the next iteration.
+ * If diff=1,rotate 90 deg, else -90 deg.
+ */
+ temp = integerPhase.I;
+ integerPhase.I = ((diff[i-2]) ? -integerPhase.Q : integerPhase.Q);
+ integerPhase.Q = ((diff[i-2]) ? temp : -temp);
+
+ /*
+ * Update the LUT index, taking into account the newest bit influencing
+ * the output and disreguarding the oldest.
+ */
+ index = ((index<<1) & 0x1E) + diff[i+3];
+
+ }
+#ifdef DYNAMIC_RAMPING
+
+ /*
+ * Copy the ramp-down waveform to the output buffer. index points to
+ * the beginning of where the ramped samples are copied.
+ */
+ if (chanSel == RACH)
+ {
+ /*
+ * Access Burst: init index and zero fill the extended guard period.
+ */
+ index = (BURST_SIZE_DL/2 - 1 - RAMP_SAMPLES)/ - \
+ (NB_BITS_TO_MOD - AB_BITS_TO_MOD)*SAMPLES_PER_BIT;
+
+ for (i=(BURST_SIZE_DL/2 - 1 - RAMP_SAMPLES ) - \
+ (NB_BITS_TO_MOD - AB_BITS_TO_MOD)*SAMPLES_PER_BIT + \
+ RAMP_SAMPLES;
+ i<BURST_SIZE_DL/2; i++)
+ {
+ *(Int *)&outBurstPtr[i] = 0;
+ }
+ }
+ else
+ {
+ /*
+ * Not an Access Burst: init index
+ */
+ index = BURST_SIZE_DL/2-1-RAMP_SAMPLES;
+ }
+
+ tempIndex = outputIndex;
+ for (i=0; i<RAMP_SAMPLES; i++)
+ {
+ *(Int16 *) & (outBurstPtr[outputIndex].I) = modRampDown[i*2].I;
+ *(Int16 *) & (outBurstPtr[outputIndex++].Q) = (modRampDown[i*2].Q)>>4;
+ }
+
+
+ for (i=0; i<RAMP_SAMPLES; i++)
+ {
+ *(Int32 *) & (outBurstPtr[tempIndex]) = *(Int32 *) & (outBurstPtr[tempIndex++]) >>4;
+ }
+
+ /*
+ * The final sample is always zero
+ */
+ *(Int32 *) & outBurstPtr[outputIndex++] = 0;
+#endif
+
+ }
+}
diff --git a/data/mnet/GP10/Dsp/bbdataproc/burst/mod4spb_tab.h b/data/mnet/GP10/Dsp/bbdataproc/burst/mod4spb_tab.h
new file mode 100644
index 0000000..b5f8a8a
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/burst/mod4spb_tab.h
@@ -0,0 +1,109 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+**
+** File: mod2spb_tab.h
+**
+** Description:
+** This header file contains the modulator look up tables.
+**
+*****************************************************************************/
+#ifndef MOD4SPB_TAB_H
+#define MOD4SPB_TAB_H
+
+/*
+* Modulator waveform look-up-table (I,Q,I,Q,...)
+*/
+#pragma DATA_ALIGN(modLUT4x, 4);
+const t_DLComplexSamp modLUT4x[LUT_DEPTH][SAMPLES_PER_BIT*2] = {
+{{0x8276, 0x18f9},{0x9592, 0x471d},{0xb8e3, 0x6a6e},{0xe707, 0x7d8a}},
+{{0x8276, 0x18f9},{0x9592, 0x471c},{0xb8db, 0x6a68},{0xe6c3, 0x7d7d}},
+{{0x822f, 0x178b},{0x9262, 0x4217},{0xaa07, 0x5ed5},{0xbb53, 0x6c05}},
+{{0x822f, 0x178a},{0x9261, 0x4216},{0xaa00, 0x5ece},{0xbb19, 0x6bdf}},
+{{0x935a, 0xbc54},{0x9d4c, 0xae80},{0xae80, 0x9d4c},{0xbc54, 0x935a}},
+{{0x935a, 0xbc54},{0x9d4d, 0xae80},{0xae88, 0x9d46},{0xbc8f, 0x9335}},
+{{0x9421, 0xbb19},{0xa131, 0xaa01},{0xbde2, 0x9266},{0xe831, 0x823c}},
+{{0x9421, 0xbb19},{0xa132, 0xaa00},{0xbdea, 0x9261},{0xe876, 0x822f}},
+{{0x6c05, 0xbb54},{0x5ed5, 0xaa07},{0x4217, 0x9262},{0x178b, 0x822f}},
+{{0x6c05, 0xbb54},{0x5ed5, 0xaa08},{0x421f, 0x9267},{0x17cf, 0x823c}},
+{{0x6ccb, 0xbc8f},{0x62b9, 0xae87},{0x5179, 0x9d47},{0x4371, 0x9335}},
+{{0x6ccb, 0xbc8f},{0x62ba, 0xae88},{0x5180, 0x9d4d},{0x43ac, 0x935a}},
+{{0x7dc4, 0x17cf},{0x6d9a, 0x421e},{0x55ff, 0x5ecf},{0x44e7, 0x6bdf}},
+{{0x7dc4, 0x17cf},{0x6d99, 0x421f},{0x55f8, 0x5ed5},{0x44ac, 0x6c05}},
+{{0x7d7d, 0x193d},{0x6a69, 0x4724},{0x4724, 0x6a69},{0x193d, 0x7d7d}},
+{{0x7d7d, 0x193d},{0x6a68, 0x4725},{0x471c, 0x6a6e},{0x18f9, 0x7d8a}},
+{{0x7d7d, 0xe6c3},{0x6a68, 0xb8db},{0x471c, 0x9592},{0x18f9, 0x8276}},
+{{0x7d7d, 0xe6c3},{0x6a69, 0xb8dc},{0x4724, 0x9597},{0x193d, 0x8283}},
+{{0x7dc4, 0xe831},{0x6d99, 0xbde1},{0x55f8, 0xa12b},{0x44ac, 0x93fb}},
+{{0x7dc4, 0xe831},{0x6d9a, 0xbde2},{0x55ff, 0xa131},{0x44e7, 0x9421}},
+{{0x6ccb, 0x4371},{0x62ba, 0x5178},{0x5180, 0x62b3},{0x43ac, 0x6ca6}},
+{{0x6ccb, 0x4371},{0x62b9, 0x5179},{0x5179, 0x62b9},{0x4371, 0x6ccb}},
+{{0x6c05, 0x44ac},{0x5ed5, 0x55f8},{0x421f, 0x6d99},{0x17cf, 0x7dc4}},
+{{0x6c05, 0x44ac},{0x5ed5, 0x55f9},{0x4217, 0x6d9e},{0x178b, 0x7dd1}},
+{{0x9421, 0x44e7},{0xa132, 0x5600},{0xbdea, 0x6d9f},{0xe876, 0x7dd1}},
+{{0x9421, 0x44e7},{0xa131, 0x55ff},{0xbde2, 0x6d9a},{0xe831, 0x7dc4}},
+{{0x935a, 0x43ac},{0x9d4d, 0x5180},{0xae88, 0x62ba},{0xbc8f, 0x6ccb}},
+{{0x935a, 0x43ac},{0x9d4c, 0x5180},{0xae80, 0x62b4},{0xbc54, 0x6ca6}},
+{{0x822f, 0xe876},{0x9261, 0xbdea},{0xaa00, 0xa132},{0xbb19, 0x9421}},
+{{0x822f, 0xe875},{0x9262, 0xbde9},{0xaa07, 0xa12b},{0xbb53, 0x93fb}},
+{{0x8276, 0xe707},{0x9592, 0xb8e4},{0xb8db, 0x9598},{0xe6c3, 0x8283}},
+{{0x8276, 0xe707},{0x9592, 0xb8e3},{0xb8e3, 0x9592},{0xe707, 0x8276}}};
+
+
+/*
+* Modulator ramp-up look-up-table (I,Q,I,Q,...)
+*/
+#pragma DATA_ALIGN(modRampUp, 4);
+const t_DLComplexSamp modRampUp[RAMP_SAMPLES*2] = {
+{0x0000, 0x0000},
+{0x0000, 0x0000},
+{0x0000, 0x0000},
+{0x0000, 0x0000},
+{0xfecb, 0xffc3},
+{0xfbf3, 0xfd4b},
+{0xfa02, 0xf708},
+{0xfc58, 0xed9d},
+{0x058d, 0xe41a},
+{0x15f3, 0xdf26},
+{0x2ad3, 0xe35e},
+{0x3ebe, 0xf362},
+{0x4b2e, 0x0e11},
+{0x4bc8, 0x2db1},
+{0x42de, 0x49c2},
+{0x3a9e, 0x5c33},
+{0x3df8, 0x637e},
+{0x4e66, 0x5ef1},
+{0x61c7, 0x50b0},
+{0x6ccb, 0x4371}};
+
+
+/*
+* Modulator ramp-down look-up-table (I,Q,I,Q,...)
+*/
+#pragma DATA_ALIGN(modRampDown, 4);
+const t_DLComplexSamp modRampDown[RAMP_SAMPLES*2] = {
+{0x823c, 0xe831},
+{0x9267, 0xbde1},
+{0xaa08, 0xa12b},
+{0xbbfd, 0x9505},
+{0xbee7, 0x977d},
+{0xb55e, 0xa59d},
+{0xabc0, 0xba6f},
+{0xab7f, 0xcb5e},
+{0xb552, 0xd086},
+{0xc755, 0xcca1},
+{0xdef5, 0xc931},
+{0xf686, 0xcd5d},
+{0x07ca, 0xd944},
+{0x0fcf, 0xe85b},
+{0x0f96, 0xf596},
+{0x0a94, 0xfde5},
+{0x04c7, 0x00f3},
+{0x0106, 0x00af},
+{0x0000, 0x0000},
+{0x0000, 0x0000}};
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Dsp/bbdataproc/chcodec/INTLEAV.ASM b/data/mnet/GP10/Dsp/bbdataproc/chcodec/INTLEAV.ASM
new file mode 100644
index 0000000..e32deb5
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/chcodec/INTLEAV.ASM
@@ -0,0 +1,816 @@
+*****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************
+*==============================================================================
+*
+*
+* TCH INTERLEAVER
+*
+* Revision Date: 08/25/99
+*
+*
+* USAGE This routine is C callable and can be called as
+*
+* void intrleav8(Char *in, Bool steal, Int *bindx,Char out[][]);
+*
+* CYCLES
+*
+*==============================================================================
+
+ .global _intrleav8
+ .text
+
+*** BEGIN Benchmark Timing ***
+_intrleav8:
+
+; NOP
+; NOP
+; NOP
+; NOP
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+; MVK .S2 080000040h, B15
+; MVKH .S2 080000040h, B15
+; MVK .S1 080000100h, A4
+; MVKH .S1 080000100h, A4
+; MVK .S2 080000800h, B6
+; MVKH .S2 080000800h, B6
+; MVK .S2 1,B4 ;STEAL FLAG
+; MVK .S1 01010101h,A8
+; MVKH .S1 01010101h,A8
+; STW .D1 A8, *A4++ ;init first dataword in
+; STW .D1 A8, *A4-- ;init first dataword in
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+ ADD .L1X -4, B15, A1 ; copy stack pointer
+|| STW .D2 A14, *-B15[10] ; push A14 on stack
+
+ STW .D1 A10, *A1--[2] ; push A10 on stack
+|| STW .D2 B10, *B15--[2] ; push B10 on stack
+
+ STW .D1 A11, *A1--[2] ; push A11 on stack
+|| STW .D2 B11, *B15--[2] ; push B11 on stack
+|| MVK .S1 0, A9 ;init interleaved frame destination addrs
+|| MVK .S2 116, B9
+
+ STW .D1 A12, *A1--[2] ; push A12 on stack
+|| STW .D2 B12, *B15--[2] ; push B12 on stack
+|| MVK .S1 228, A7 ;init current frame save indices
+|| MVK .S2 285, B7
+
+ STW .D1 A13, *A1--[2] ; push A13 on stack
+|| STW .D2 B13, *B15--[2] ; push B13 on stack
+|| MVK .S1 0, A5
+|| MVK .S2 57, B2
+
+ STW .D1 A15, *A1 ; push A15 on stack
+|| STW .D2 B14, *B15--[3] ; push B14 on stack
+|| MVK .S1 464, A8 ; prev. frame subblock 5 addr ptr
+|| MVK .S2 521, B8 ; 521=464+57..prev frame subblock 6 addr ptr
+
+ MVK .S2 692, B14 ; 692=464+228..prev frame subblock 6 addr ptr
+ LDB .D2 *B6[B14],A6 ; reload previous frame steal flag
+
+INIT:
+ MVK .S1 56, A1 ; init loop index
+|| MVK .S2 64, B0 ; init modulo 64 index
+|| MV .L1X B6, A3 ; A5 = intrlv buf base addr
+|| MV .L2X A4, B5 ; A5 = input buf base addr
+
+ LDB .D1 *A4[A5],A11 ; current frame subblock 0 in
+|| LDB .D2 *B5[B2],B11 ; current frame subblock 1 in
+|| MVK .S1 456, A15 ;init modulo 64 buffer edge
+|| MV .L1X B0, A0 ; A reg modulo 64 index
+
+ ADD .L1X B6, A9, A9 ;init ping-pong destination addr
+|| ADD .L2 B6, B9, B9
+
+ ADD .L1X B6, A8, A8 ;init next frame save addr dest
+|| ADD .L2 B6, B8, B8
+
+ NOP 2
+
+ STB .D1 A11, *A9++ ;begin fill 1st frame out
+|| STB .D2 B11, *B9++ ;begin fill 2nd frame out
+|| ADD .L1 A5,A0,A5 ; modulo 64 index update
+|| ADD .L2 B2,B0,B2
+
+BLOCK_O1_FILL_LOOP:
+ LDB .D1 *A8, A13 ;previous frame subblock 4 in
+|| LDB .D2 *B8, B13 ;previous frame subblock 5 in
+|| SUB .S1 A1, 1, A1 ;decrement loop index
+
+ LDB .D1 *A4[A7],A12 ; current frame subblock 4 in
+|| LDB .D2 *B5[B7],B12 ; current frame subblock 5 in
+|| ADD .L1 A7,A0,A10 ; modulo 64 index update
+|| ADD .L2 B7,B0,B10
+|| MVK .S2 27, B1 ; setup index for steal flag insert test
+|| MV .S1X B4, A2 ; setup index for steal flag insert test
+
+ LDB .D1 *A4[A5],A11 ; current frame subblock 0 in
+|| LDB .D2 *B5[B2],B11 ; current frame subblock 1 in
+|| ADD .L1 A5,A0,A14 ; modulo 64 index update
+|| ADD .S2 B2,B0,B14
+|| [A1]B .S1 BLOCK_O1_FILL_LOOP
+|| CMPEQ .L2X A1, B1, B1 ; test index for steal flag insert
+
+ NOP ;needed for LDB 4 cycle latency
+|| [B1]STB .D1 A2, *A9++ ;insert steal flags mid-frame
+|| [B1]STB .D2 B4, *B9++ ;ditto
+
+ CMPLT .L1 A10, A15, A2 ;wraparound test
+|| CMPLT .L2X B10, A15, B1 ;wraparound test
+|| [B1]STB .D1 A2, *A9++ ;insert steal flags mid-frame
+|| [B1]STB .D2 B4, *B9++ ;ditto
+
+ STB .D1 A13, *A9++ ;fill interleaved subblock 0 out
+|| STB .D2 B13, *B9++ ;fill interleaved subblock 1 out
+|| [!A2]SUB .S1 A10,A15,A7 ;wraparound buffer
+|| [!B1]SUB .S2X B10,A15,B7
+|| [A2]MPY .M1 1, A10,A7 ;no wraparound buffer
+|| [B1]MV .L2 B10, B7 ;no wraparound
+|| CMPLT .L1 A14,A15,A2 ;wraparound test
+
+ STB .D1 A12, *A8++ ;save current frame subblock 4 out
+|| STB .D2 B12, *B8++ ;save current frame subblock 5 out
+|| [!A2]SUB .S1 A14, A15,A5 ;wraparound buffer
+|| [A2]MV .L1 A14, A5 ;no wraparound
+|| CMPLT .L2X B14, A15, B1 ;wraparound test
+
+ STB .D1 A11, *A9++ ;fill interleaved subblock 0 out
+|| STB .D2 B11, *B9++ ;fill interleaved subblock 1 out
+|| [B1]MV .L2 B14, B2 ;no wraparound
+|| [!B1]SUB .S2X B14,A15,B2 ;yes. wraparound
+
+***
+*** FINISH BLOCK01 PROCESSING
+***
+ LDB .D1 *A8, A13 ;previous frame subblock 4 in
+|| LDB .D2 *B8, B13 ;previous frame subblock 5 in
+ LDB .D1 *A4[A7],A12 ; current frame subblock 4 in
+|| LDB .D2 *B5[B7],B12 ; current frame subblock 5 in
+
+ NOP 3
+
+ STB .D1 A13, *A9++ ;fill interleaved subblock 0 out
+|| STB .D2 B13, *B9++ ;fill interleaved subblock 1 out
+
+ STB .D1 A12, *A8++ ;save current frame subblock 4 out
+|| STB .D2 B12, *B8++ ;save current frame subblock 5 out
+|| CMPEQ .L1 A5, 0, A2 ;test if A5=0, i.e., end first blocks 0,1
+
+ [A2]B .S2 INIT
+
+ MVK .S1 342, A7 ;init current frame save indices
+|| MVK .S2 399, B7
+ MVK .S1 114, A5 ;init current frame save indices
+|| MVK .S2 171, B2
+ MVK .S1 578, A8 ;init current frame save indices
+|| MVK .S2 635, B8
+ MVK .S1 232, A9 ;init current frame save indices
+|| MVK .S2 348, B9
+ NOP
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; NOP
+; B .S2 INIT
+
+; MVK .S1 228, A7 ;init current frame save indices
+;|| MVK .S2 285, B7
+; MVK .S1 0, A5 ;init current frame save indices
+;|| MVK .S2 57, B2
+; MVK .S1 464, A8 ;init current frame save indices
+;|| MVK .S2 521, B8
+;|| STW .D1 A5, *A4++ ;init first dataword in
+; MVK .S1 0, A9 ;init current frame save indices
+;|| MVK .S2 116, B9
+;|| STW .D1 A5, *A4-- ;init first dataword in
+; NOP
+FINISH:
+***
+*** Fix 9/7/99...deinterleave steal flags..insert prev frame steal flags
+***
+ MVK .S2 57, B14 ; 692=464+228..prev frame subblock 6 addr ptr
+ STB .D2 A6,*B6[B14] ; save current frame steal flag
+|| MVK .S2 116, B9
+ NOP
+ ADD .S2 B14, B9, B14 ; 692=464+228..prev frame subblock 6 addr ptr
+ STB .D2 A6,*B6[B14] ; save current frame steal flag
+ NOP
+ ADD .S2 B14, B9, B14 ; 692=464+228..prev frame subblock 6 addr ptr
+ STB .D2 A6,*B6[B14] ; save current frame steal flag
+ NOP
+ ADD .S2 B14, B9, B14 ; 692=464+228..prev frame subblock 6 addr ptr
+ STB .D2 A6,*B6[B14] ; save current frame steal flag
+ NOP
+ MVK .S2 692, B14 ; 692=464+228..prev frame subblock 6 addr ptr
+ STB .D2 B4,*B6[B14] ; save current frame steal flag
+ NOP
+
+ LDW .D2 *++B15, A14 ; pop A15 off stack
+|| ADD .L1X 0, B15, A1 ; copy stack pointer
+
+ LDW .D1 *++A1[2], A15 ; pop A15 off stack
+|| LDW .D2 *++B15[2], B14 ; pop B14 off stack
+
+ LDW .D1 *++A1[2], A13 ; pop A13 off stack
+|| LDW .D2 *++B15[2], B13 ; pop B13 off stack
+
+ LDW .D1 *++A1[2], A12 ; pop A12 off stack
+|| LDW .D2 *++B15[2], B12 ; pop B12 off stack
+
+ LDW .D1 *++A1[2], A11 ; pop A11 off stack
+|| LDW .D2 *++B15[2], B11 ; pop B11 off stack
+|| B .S2 B3 ; return
+
+ LDW .D1 *++A1[2], A10 ; pop A10 off stack
+|| LDW .D2 *++B15[2], B10 ; pop B10 off stack
+
+ NOP 4
+*==============================================================================
+*
+*
+* CCH INTERLEAVER
+*
+* Revision Date: 08/25/99
+*
+*
+* USAGE This routine is C callable and can be called as
+*
+* void intrleav4(Char *in, Bool steal, Int *bindx,Char out[][]);
+*
+* DESCRIPTION
+*
+*==============================================================================
+
+ .global _intrleav4
+ .text
+
+*** BEGIN Benchmark Timing ***
+_intrleav4:
+
+; NOP
+; NOP
+; NOP
+; NOP
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+; MVK .S2 080000040h, B15
+; MVKH .S2 080000040h, B15
+; MVK .S1 080000100h, A4
+; MVKH .S1 080000100h, A4
+; MVK .S2 080000800h, B6
+; MVKH .S2 080000800h, B6
+; MVK .S2 1,B4 ;STEAL FLAG
+; MVK .S1 01010101h,A8
+; MVKH .S1 01010101h,A8
+; STW .D1 A8, *A4++ ;init first dataword in
+; STW .D1 A8, *A4-- ;init first dataword in
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+ ADD .L1X -4, B15, A1 ; copy stack pointer
+|| STW .D2 A14, *-B15[10] ; push A14 on stack
+
+ STW .D1 A10, *A1--[2] ; push A10 on stack
+|| STW .D2 B10, *B15--[2] ; push B10 on stack
+
+ STW .D1 A11, *A1--[2] ; push A11 on stack
+|| STW .D2 B11, *B15--[2] ; push B11 on stack
+|| MVK .S1 0, A9 ;init interleaved frame destination addrs
+|| MVK .S2 116, B9
+
+ STW .D1 A12, *A1--[2] ; push A12 on stack
+|| STW .D2 B12, *B15--[2] ; push B12 on stack
+|| MVK .S1 228, A7 ;init current frame save indices
+|| MVK .S2 285, B7
+
+ STW .D1 A13, *A1--[2] ; push A13 on stack
+|| STW .D2 B13, *B15--[2] ; push B13 on stack
+|| MVK .S1 0, A5
+|| MVK .S2 57, B2
+
+ STW .D1 A15, *A1 ; push A15 on stack
+|| STW .D2 B14, *B15--[3] ; push B14 on stack
+INITC:
+ MVK .S1 56, A1 ; init loop index
+|| MVK .S2 64, B0 ; init modulo 64 index
+|| MV .L1X B6, A3 ; A5 = intrlv buf base addr
+|| MV .L2X A4, B5 ; A5 = input buf base addr
+
+ LDB .D1 *A4[A5],A11 ; current frame subblock 0 in
+|| LDB .D2 *B5[B2],B11 ; current frame subblock 1 in
+|| MVK .S1 456, A15 ;init modulo 64 buffer edge
+|| MV .L1X B0, A0 ; A reg modulo 64 index
+
+ ADD .L1X B6, A9, A9 ;init ping-pong destination addr
+|| ADD .L2 B6, B9, B9
+
+ NOP 3
+
+ STB .D1 A11, *A9++ ;begin fill 1st frame out
+|| STB .D2 B11, *B9++ ;begin fill 2nd frame out
+|| ADD .L1 A5,A0,A5 ; modulo 64 index update
+|| ADD .L2 B2,B0,B2
+
+BLOCK_O1_FILL_LOOPC:
+ LDB .D1 *A4[A7],A12 ; current frame subblock 4 in
+|| LDB .D2 *B5[B7],B12 ; current frame subblock 5 in
+|| ADD .L1 A7,A0,A10 ; modulo 64 index update
+|| ADD .L2 B7,B0,B10
+|| MVK .S2 27, B1 ; setup index for steal flag insert test
+|| MV .S1X B4, A2 ; setup index for steal flag insert test
+
+ SUB .S1 A1, 1, A1 ;decrement loop index
+
+ LDB .D1 *A4[A5],A11 ; current frame subblock 0 in
+|| LDB .D2 *B5[B2],B11 ; current frame subblock 1 in
+|| ADD .L1 A5,A0,A14 ; modulo 64 index update
+|| ADD .S2 B2,B0,B14
+|| [A1]B .S1 BLOCK_O1_FILL_LOOPC
+|| CMPEQ .L2X A1, B1, B1 ; test index for steal flag insert
+
+ NOP ;needed for LDB 4 cycle latency
+|| [B1]STB .D1 A2, *A9++ ;insert steal flags mid-frame
+|| [B1]STB .D2 B4, *B9++ ;ditto
+
+ CMPLT .L1 A10, A15, A2 ;wraparound test
+|| CMPLT .L2X B10, A15, B1 ;wraparound test
+|| [B1]STB .D1 A2, *A9++ ;insert steal flags mid-frame
+|| [B1]STB .D2 B4, *B9++ ;ditto
+
+ STB .D1 A12, *A9++ ;fill interleaved subblock 0 out
+|| STB .D2 B12, *B9++ ;fill interleaved subblock 1 out
+|| [!A2]SUB .S1 A10,A15,A7 ;wraparound buffer
+|| [!B1]SUB .S2X B10,A15,B7
+|| [A2]MPY .M1 1, A10,A7 ;no wraparound buffer
+|| [B1]MV .L2 B10, B7 ;no wraparound
+|| CMPLT .L1 A14,A15,A2 ;wraparound test
+
+ [!A2]SUB .S1 A14, A15,A5 ;wraparound buffer
+|| [A2]MV .L1 A14, A5 ;no wraparound
+|| CMPLT .L2X B14, A15, B1 ;wraparound test
+
+ STB .D1 A11, *A9++ ;fill interleaved subblock 0 out
+|| STB .D2 B11, *B9++ ;fill interleaved subblock 1 out
+|| [B1]MV .L2 B14, B2 ;no wraparound
+|| [!B1]SUB .S2X B14,A15,B2 ;yes. wraparound
+
+***
+*** FINISH BLOCK01 PROCESSING
+***
+ LDB .D1 *A4[A7],A12 ; current frame subblock 4 in
+|| LDB .D2 *B5[B7],B12 ; current frame subblock 5 in
+
+ NOP 4
+
+ STB .D1 A12, *A9++ ;fill interleaved subblock 0 out
+|| STB .D2 B12, *B9++ ;fill interleaved subblock 1 out
+
+ CMPEQ .L1 A5, 0, A2 ;test if A5=0, i.e., end first blocks 0,1
+
+ [A2]B .S2 INITC
+
+ MVK .S1 342, A7 ;init current frame save indices
+|| MVK .S2 399, B7
+ MVK .S1 114, A5 ;init current frame save indices
+|| MVK .S2 171, B2
+ MVK .S1 232, A9 ;init current frame save indices
+|| MVK .S2 348, B9
+ NOP 2
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; NOP
+; B .S2 INIT
+
+; MVK .S1 228, A7 ;init current frame save indices
+;|| MVK .S2 285, B7
+; MVK .S1 0, A5 ;init current frame save indices
+;|| MVK .S2 57, B2
+; MVK .S1 464, A8 ;init current frame save indices
+;|| MVK .S2 521, B8
+;|| STW .D1 A5, *A4++ ;init first dataword in
+; MVK .S1 0, A9 ;init current frame save indices
+;|| MVK .S2 116, B9
+;|| STW .D1 A5, *A4-- ;init first dataword in
+; NOP
+FINISHC:
+*** END Benchmark Timing ***
+
+ LDW .D2 *++B15, A14 ; pop A15 off stack
+|| ADD .L1X 0, B15, A1 ; copy stack pointer
+
+ LDW .D1 *++A1[2], A15 ; pop A15 off stack
+|| LDW .D2 *++B15[2], B14 ; pop B14 off stack
+
+ LDW .D1 *++A1[2], A13 ; pop A13 off stack
+|| LDW .D2 *++B15[2], B13 ; pop B13 off stack
+
+ LDW .D1 *++A1[2], A12 ; pop A12 off stack
+|| LDW .D2 *++B15[2], B12 ; pop B12 off stack
+
+ LDW .D1 *++A1[2], A11 ; pop A11 off stack
+|| LDW .D2 *++B15[2], B11 ; pop B11 off stack
+|| B .S2 B3 ; return
+
+ LDW .D1 *++A1[2], A10 ; pop A10 off stack
+|| LDW .D2 *++B15[2], B10 ; pop B10 off stack
+
+ NOP 4
+
+*==============================================================================
+*
+*
+* TCH DEINTERLEAVER
+*
+* Revision Date: 08/27/99
+*
+* USAGE This routine is C callable and can be called as
+*
+* void dntrleav8(&input[0][0], &output[0])
+*
+*
+*==============================================================================
+
+ .global _dntrleav8
+ .text
+
+*** BEGIN Benchmark Timing ***
+_dntrleav8:
+
+; NOP
+; NOP
+; NOP
+; NOP
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+; MVK .S2 080000040h, B15
+; MVKH .S2 080000040h, B15
+; MVK .S1 080000100h, A4
+; MVKH .S1 080000100h, A4
+; MVK .S2 080000800h, B6
+; MVKH .S2 080000800h, B6
+; MVK .S2 1,B4 ;STEAL FLAG
+; MVK .S1 01010101h,A8
+; MVKH .S1 01010101h,A8
+; STW .D1 A8, *A4++ ;init first dataword in
+; STW .D1 A8, *A4-- ;init first dataword in
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ADD .L1X -4, B15, A1 ; copy stack pointer
+|| STW .D2 A14, *-B15[10] ; push A14 on stack
+
+ STW .D1 A10, *A1--[2] ; push A10 on stack
+|| STW .D2 B10, *B15--[2] ; push B10 on stack
+|| MVK .S1 230, A6 ;init interleaved frame destination addrs
+|| MVK .S2 462, B6
+
+ STW .D1 A11, *A1--[2] ; push A11 on stack
+|| STW .D2 B11, *B15--[2] ; push B11 on stack
+|| MVK .S1 0, A9 ;init deinterleaved frame destination addrs
+|| MVK .S2 2, B9
+
+ STW .D1 A12, *A1--[2] ; push A12 on stack
+|| STW .D2 B12, *B15--[2] ; push B12 on stack
+|| MVK .S1 0 , A7 ;init current frame source indices for save
+|| MVK .S2 314, B7 ;2*116 + 82 = 314
+
+ STW .D1 A13, *A1--[2] ; push A13 on stack
+|| STW .D2 B13, *B15--[2] ; push B13 on stack
+|| MVK .S1 51, A5 ;init prev frame source addr
+|| MVK .S2 251, B2
+
+ STW .D1 A15, *A1 ; push A15 on stack
+|| STW .D2 B14, *B15--[3] ; push B14 on stack
+|| MVK .S1 464, A8 ; c oldest frame source/dest addr ptr..subblock 0
+|| MVK .S2 578, B8 ; 521=464+57+57..ditto..subblock 1
+INIT1:
+ MVK .S1 57, A1 ; init loop index
+|| MVK .S2 214, B0 ; init modulo 49 index = 116 + 2 * 49
+|| MV .L2X A4, B5 ; A5 = input buf base addr
+
+ MVK .S1 114, A15 ;init modulo 49 buffer wraparound correction
+|| MV .L1X B0, A0 ; A reg modulo 64 index
+
+ ADD .L1X B4, A9, A9 ;init ping-pong destination addr
+|| ADD .L2 B4, B9, B9
+
+ ADD .L1 A4, A8, A8 ;init next frame save addr dest
+|| ADD .L2X A4, B8, B8
+|| SUB .S1 A9, 7, A9 ; prime pre-decrement dest addr ptr
+|| SUB .S2 B9, 7, B9 ;
+
+BLOCK_O1_FILL_LOOPD:
+ LDB .D1 *A8, A13 ;previous frame c in
+|| LDB .D2 *B8, B13 ;previous frame c in
+|| SUB .S1 A1, 1, A1 ;decrement loop index
+|| ADD .L1 7, A9,A9 ; increment dest addr ptr
+|| ADD .L2 7, B9,B9 ;
+
+ LDB .D1 *A4[A7],A12 ; current frame c in
+|| LDB .D2 *B5[B7],B12 ; current frame c in
+|| ADD .L1 A7,A0,A10 ; modulo 49 index update
+|| ADD .L2 B7,B0,B10
+
+ LDB .D1 *A4[A5],A11 ; current frame p in
+|| LDB .D2 *B5[B2],B11 ; current frame p in
+|| ADD .L1 A5,A0,A14 ; modulo 49 index update
+|| ADD .S2 B2,B0,B14
+
+ NOP ;needed for LDB 4 cycle latency
+
+ CMPLT .L1 A10, A6, A2 ;wraparound test
+|| CMPLT .L2 B10, B6, B1 ;wraparound test
+
+ STB .D1 A13, *A9 ;fill deinterleaved subblock 0 out
+|| STB .D2 B13, *B9 ;fill deinterleaved subblock 1 out
+|| [!A2]SUB .S1 A10,A15,A7 ;wraparound buffer
+|| [!B1]SUB .S2X B10,A15,B7
+|| [A2]MPY .M1 1, A10,A7 ;no wraparound buffer
+|| [B1]MV .L2 B10, B7 ;no wraparound
+|| CMPLT .L1 A14,A6, A2 ;wraparound test
+
+ STB .D1 A12, *A8++ ;save current frame subblock 4 out
+|| STB .D2 B12, *B8++ ;save current frame subblock 5 out
+|| SUB .S2 B6, 2, B6 ;adjust for edge wrap test
+|| [!A2]SUB .S1 A14, A15,A5 ;wraparound buffer
+|| [A2]MV .L1 A14, A5 ;no wraparound
+|| CMPLT .L2 B14, B6, B1 ;wraparound test
+
+ STB .D1 A11, *A9[4] ;fill interleaved subblock 0 out
+|| STB .D2 B11, *B9[4] ;fill interleaved subblock 1 out
+|| SUB .L1 A6, 2, A6 ;adjust for edge wrap test
+|| [B1]MV .L2 B14, B2 ;no wraparound
+|| [!B1]SUB .S2X B14,A15,B2 ;yes. wraparound
+|| MVK .S1 328, A15 ;increment modulo 49 buffer wraparound correction
+
+BLOCK_23_FILL_SECTION:
+ LDB .D1 *A8, A13 ;previous frame c in
+|| LDB .D2 *B8, B13 ;previous frame c in
+|| ADD .S1 A0, A6,A6 ; end buffer test..230,462 + 328
+|| ADD .S2X A0, B6,B6 ; ..for A7,B7
+|| ADD .L1 A7,A0,A10 ; modulo 49 index update
+|| ADD .L2 B7,B0,B10
+
+ LDB .D1 *A4[A7],A12 ; current frame c in
+|| LDB .D2 *B5[B7],B12 ; current frame c in
+|| ADD .S1 A5,A0,A14 ; modulo 49 index update
+|| ADD .S2 B2,B0,B14
+|| CMPEQ .L1 A10, A6, A2 ;wraparound test
+|| CMPEQ .L2 B10, B6, B1 ;wraparound test
+
+ LDB .D1 *A4[A5],A11 ; current frame p in
+|| LDB .D2 *B5[B2],B11 ; current frame p in
+|| ADD .L1 1, A6,A6 ; for A5,B2 test
+|| ADD .L2 1, B6,B6 ;
+|| [A1]B .S1 BLOCK_O1_FILL_LOOPD
+|| [B1]MVK .S2 232, B7 ; yes. special wraparound
+
+ ADD .D1 1, A9,A9 ; increment dest addr ptr
+|| ADD .D2 1, B9,B9 ;
+|| [A2]MVK .S1 0, A7 ;yes. special wraparount
+|| [!B1]SUB .S2X B10,A15,B7
+|| [!A2]SUB .L1 A10,A15,A7 ;wraparound buffer
+
+ CMPEQ .L1 A14, A6, A2 ;wraparound test
+|| CMPEQ .L2 B14, B6, B1 ;wraparound test
+|| ADD .S1 1, A6, A6 ;restore for A7,B7
+|| ADD .S2 1, B6, B6 ;
+
+ STB .D1 A13, *A9 ;fill deinterleaved subblock 0 out
+|| STB .D2 B13, *B9 ;fill deinterleaved subblock 1 out
+|| [B1]MVK .S2 233, B2 ;yes special wraparound
+|| [!B1]SUB .L2X B14,A15,B2 ;yes. wraparound
+
+ STB .D1 A12, *A8++ ;save current frame subblock 4 out
+|| STB .D2 B12, *B8++ ;save current frame subblock 5 out
+|| [!A2]SUB .L1 A14, A15,A5 ;wraparound buffer
+|| SUB .L2X B6, A0, B6 ;restore b6 limit = 230,462
+|| [A2]MVK .S1 1, A5 ;yes. special wraparound
+
+ STB .D1 A11, *A9[4] ;fill interleaved subblock 0 out
+|| STB .D2 B11, *B9[4] ;fill interleaved subblock 1 out
+|| SUB .L1 A6, A0, A6 ;restore A6 limit = 230,462
+|| MVK .S1 114, A15 ;increment modulo 49 buffer wraparound correction
+
+
+
+FINISH1:
+*** END Benchmark Timing ***
+
+ LDW .D2 *++B15, A14 ; pop A15 off stack
+|| ADD .L1X 0, B15, A1 ; copy stack pointer
+
+ LDW .D1 *++A1[2], A15 ; pop A15 off stack
+|| LDW .D2 *++B15[2], B14 ; pop B14 off stack
+
+ LDW .D1 *++A1[2], A13 ; pop A13 off stack
+|| LDW .D2 *++B15[2], B13 ; pop B13 off stack
+
+ LDW .D1 *++A1[2], A12 ; pop A12 off stack
+|| LDW .D2 *++B15[2], B12 ; pop B12 off stack
+
+ LDW .D1 *++A1[2], A11 ; pop A11 off stack
+|| LDW .D2 *++B15[2], B11 ; pop B11 off stack
+|| B .S2 B3 ; return
+
+ LDW .D1 *++A1[2], A10 ; pop A10 off stack
+|| LDW .D2 *++B15[2], B10 ; pop B10 off stack
+
+ NOP 4
+*==============================================================================
+*
+*
+* CCH DEINTERLEAVER
+*
+* Revision Date: 08/27/99
+*
+* USAGE This routine is C callable and can be called as
+*
+* void dntrleav4(&input[0][0], &output[0])
+*
+* DESCRIPTION
+*
+*
+*==============================================================================
+
+ .global _dntrleav4
+ .text
+
+*** BEGIN Benchmark Timing ***
+_dntrleav4:
+
+; NOP
+; NOP
+; NOP
+; NOP
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+; MVK .S2 080000040h, B15
+; MVKH .S2 080000040h, B15
+; MVK .S1 080000100h, A4
+; MVKH .S1 080000100h, A4
+; MVK .S2 080000800h, B6
+; MVKH .S2 080000800h, B6
+; MVK .S2 1,B4 ;STEAL FLAG
+; MVK .S1 01010101h,A8
+; MVKH .S1 01010101h,A8
+; STW .D1 A8, *A4++ ;init first dataword in
+; STW .D1 A8, *A4-- ;init first dataword in
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ADD .L1X -4, B15, A1 ; copy stack pointer
+|| STW .D2 A14, *-B15[10] ; push A14 on stack
+
+ STW .D1 A10, *A1--[2] ; push A10 on stack
+|| STW .D2 B10, *B15--[2] ; push B10 on stack
+|| MVK .S1 230, A6 ;init interleaved frame destination addrs
+|| MVK .S2 462, B6
+
+ STW .D1 A11, *A1--[2] ; push A11 on stack
+|| STW .D2 B11, *B15--[2] ; push B11 on stack
+|| MVK .S1 0, A9 ;init deinterleaved frame destination addrs
+|| MVK .S2 2, B9
+
+ STW .D1 A12, *A1--[2] ; push A12 on stack
+|| STW .D2 B12, *B15--[2] ; push B12 on stack
+|| MVK .S1 0 , A7 ;init current frame source indices for save
+|| MVK .S2 314, B7 ;2*116 + 82 = 314
+
+ STW .D1 A13, *A1--[2] ; push A13 on stack
+|| STW .D2 B13, *B15--[2] ; push B13 on stack
+|| MVK .S1 51, A5 ;init prev frame source addr
+|| MVK .S2 251, B2
+
+ STW .D1 A15, *A1 ; push A15 on stack
+|| STW .D2 B14, *B15--[3] ; push B14 on stack
+INIT4:
+ MVK .S1 57, A1 ; init loop index
+|| MVK .S2 214, B0 ; init modulo 49 index = 116 + 2 * 49
+|| MV .L2X A4, B5 ; A5 = input buf base addr
+
+ MVK .S1 114, A15 ;init modulo 49 buffer wraparound correction
+|| MV .L1X B0, A0 ; A reg modulo 64 index
+
+ ADD .L1X B4, A9, A9 ;init ping-pong destination addr
+|| ADD .L2 B4, B9, B9
+
+ SUB .S1 A9, 7, A9 ; prime pre-decrement dest addr ptr
+|| SUB .S2 B9, 7, B9 ;
+
+BLOCK_O1_FILL_LOOPD4:
+ LDB .D1 *A4[A7],A12 ; current frame c in
+|| LDB .D2 *B5[B7],B12 ; current frame c in
+|| ADD .L1 A7,A0,A10 ; modulo 49 index update
+|| ADD .L2 B7,B0,B10
+
+ LDB .D1 *A4[A5],A11 ; current frame p in
+|| LDB .D2 *B5[B2],B11 ; current frame p in
+|| ADD .L1 A5,A0,A14 ; modulo 49 index update
+|| ADD .S2 B2,B0,B14
+
+ SUB .S1 A1, 1, A1 ;decrement loop index
+|| ADD .L1 7, A9,A9 ; increment dest addr ptr
+|| ADD .L2 7, B9,B9 ;
+
+ NOP ;needed for LDB 4 cycle latency
+
+ CMPLT .L1 A10, A6, A2 ;wraparound test
+|| CMPLT .L2 B10, B6, B1 ;wraparound test
+
+ STB .D1 A12, *A9 ;fill deinterleaved subblock 0 out
+|| STB .D2 B12, *B9 ;fill deinterleaved subblock 1 out
+|| [!A2]SUB .S1 A10,A15,A7 ;wraparound buffer
+|| [!B1]SUB .S2X B10,A15,B7
+|| [A2]MPY .M1 1, A10,A7 ;no wraparound buffer
+|| [B1]MV .L2 B10, B7 ;no wraparound
+|| CMPLT .L1 A14,A6, A2 ;wraparound test
+
+ SUB .S2 B6, 2, B6 ;adjust for edge wrap test
+|| [!A2]SUB .S1 A14, A15,A5 ;wraparound buffer
+|| [A2]MV .L1 A14, A5 ;no wraparound
+|| CMPLT .L2 B14, B6, B1 ;wraparound test
+
+ STB .D1 A11, *A9[4] ;fill interleaved subblock 0 out
+|| STB .D2 B11, *B9[4] ;fill interleaved subblock 1 out
+|| SUB .L1 A6, 2, A6 ;adjust for edge wrap test
+|| [B1]MV .L2 B14, B2 ;no wraparound
+|| [!B1]SUB .S2X B14,A15,B2 ;yes. wraparound
+|| MVK .S1 328, A15 ;increment modulo 49 buffer wraparound correction
+
+BLOCK_23_FILL_SECTIOND4:
+ ADD .S1 A0, A6,A6 ; end buffer test..230,462 + 328
+|| ADD .S2X A0, B6,B6 ; ..for A7,B7
+|| ADD .L1 A7,A0,A10 ; modulo 49 index update
+|| ADD .L2 B7,B0,B10
+
+ LDB .D1 *A4[A7],A12 ; current frame c in
+|| LDB .D2 *B5[B7],B12 ; current frame c in
+|| ADD .S1 A5,A0,A14 ; modulo 49 index update
+|| ADD .S2 B2,B0,B14
+|| CMPEQ .L1 A10, A6, A2 ;wraparound test
+|| CMPEQ .L2 B10, B6, B1 ;wraparound test
+
+ LDB .D1 *A4[A5],A11 ; current frame p in
+|| LDB .D2 *B5[B2],B11 ; current frame p in
+|| ADD .L1 1, A6,A6 ; for A5,B2 test
+|| ADD .L2 1, B6,B6 ;
+|| [B1]MVK .S2 232, B7 ; yes. special wraparound
+|| [A1]B .S1 BLOCK_O1_FILL_LOOPD4
+
+ ADD .D1 1, A9,A9 ; increment dest addr ptr
+|| ADD .D2 1, B9,B9 ;
+|| [A2]MVK .S1 0, A7 ;yes. special wraparount
+|| [!B1]SUB .L2X B10,A15,B7
+|| [!A2]SUB .L1 A10,A15,A7 ;wraparound buffer
+
+ CMPEQ .L1 A14, A6, A2 ;wraparound test
+|| CMPEQ .L2 B14, B6, B1 ;wraparound test
+|| ADD .S1 1, A6, A6 ;restore for A7,B7
+|| ADD .S2 1, B6, B6 ;
+
+ NOP ;new filler for 4 deep cch
+
+ STB .D1 A12, *A9 ;fill deinterleaved subblock 0 out
+|| STB .D2 B12, *B9 ;fill deinterleaved subblock 1 out
+|| [B1]MVK .S2 233, B2 ;yes special wraparound
+|| [!B1]SUB .L2X B14,A15,B2 ;yes. wraparound
+|| [!A2]SUB .L1 A14, A15,A5 ;wraparound buffer
+|| [A2]MVK .S1 1, A5 ;yes. special wraparound
+
+ STB .D1 A11, *A9[4] ;fill interleaved subblock 0 out
+|| STB .D2 B11, *B9[4] ;fill interleaved subblock 1 out
+|| SUB .L1 A6, A0, A6 ;restore A6 limit = 230,462
+|| SUB .L2X B6, A0, B6 ;restore b6 limit = 230,462
+|| MVK .S1 114, A15 ;increment modulo 49 buffer wraparound correction
+
+
+
+FINISH4:
+*** END Benchmark Timing ***
+
+ LDW .D2 *++B15, A14 ; pop A15 off stack
+|| ADD .L1X 0, B15, A1 ; copy stack pointer
+
+ LDW .D1 *++A1[2], A15 ; pop A15 off stack
+|| LDW .D2 *++B15[2], B14 ; pop B14 off stack
+
+ LDW .D1 *++A1[2], A13 ; pop A13 off stack
+|| LDW .D2 *++B15[2], B13 ; pop B13 off stack
+
+ LDW .D1 *++A1[2], A12 ; pop A12 off stack
+|| LDW .D2 *++B15[2], B12 ; pop B12 off stack
+
+ LDW .D1 *++A1[2], A11 ; pop A11 off stack
+|| LDW .D2 *++B15[2], B11 ; pop B11 off stack
+|| B .S2 B3 ; return
+
+ LDW .D1 *++A1[2], A10 ; pop A10 off stack
+|| LDW .D2 *++B15[2], B10 ; pop B10 off stack
+
+ NOP 4
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/chcodec/Siddetect.c b/data/mnet/GP10/Dsp/bbdataproc/chcodec/Siddetect.c
new file mode 100644
index 0000000..ed744b2
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/chcodec/Siddetect.c
@@ -0,0 +1,99 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+**
+** Description:
+** Contains functions that perform SID code detection from a RTP frame of
+** 264 bits
+**
+*****************************************************************************/
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "bbproto.h"
+#include "codec.h"
+
+#define GSM_FR_SID_LEN 95
+
+/*
+* GSM SID bit positions in 264-bits Traffic frame
+*/
+Uint16 const gsmFrSidBits [GSM_FR_SID_LEN] =
+{
+ 58-4, 59-4, 61-4, 62-4, 64-4, 65-4, 67-4, 68-4, 70-4, 71-4, 73-4, 74-4, 76-4, 77-4, 79-4, 80-4, 82-4, 83-4, 85-4, 86-4, 88-4, 89-4, 91-4, 92-4, 94-4, 95-4, 114-4,
+ 115-4, 117-4, 118-4, 120-4, 121-4, 123-4, 124-4, 126-4, 127-4, 129-4, 130-4, 132-4, 133-4, 135-4, 136-4, 138-4, 139-4, 141-4, 142-4, 144-4, 145-4, 147-4,
+ 148-4, 150-4, 151-4, 170-4, 171-4, 173-4, 174-4, 176-4, 177-4, 179-4, 180-4, 182-4, 183-4, 185-4, 186-4, 188-4, 189-4, 191-4, 192-4, 194-4, 195-4, 197-4,
+ 198-4, 200-4, 201-4, 203-4, 204-4, 206-4, 207-4, 226-4, 227-4, 229-4, 230-4, 232-4, 233-4, 235-4, 236-4, 238-4, 241-4, 244-4, 247-4, 250-4, 253-4, 256-4, 259-4,
+ 262-4
+};
+
+#define GSM_EFR_SID_LEN 95
+static const Uint8 gsmEfrSidBits[GSM_EFR_SID_LEN] =
+{
+ 45, 46, 48, 49, 50, 51, 52, 53, 54, 55,
+ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
+ 66, 67, 68, 94, 95, 96, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 148, 149, 150,
+ 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
+ 171, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 212, 213, 214, 215, 216,
+ 217, 218, 219, 220, 221
+};
+
+Uint8 sidDetection(Uint8 *speechBits, t_vocAlgo vocoAlgo)
+{
+
+ Uint8 i;
+
+ Uint8 sidCode = 0;
+ Uint8 sidFlag;
+
+ switch( vocoAlgo )
+ {
+ case VOC_GSMF:
+ for(i=0; i<GSM_FR_SID_LEN; i++)
+ {
+ sidCode += speechBits[gsmFrSidBits[i]];
+ }
+
+ if(sidCode < 2)
+ {
+ sidFlag = 2;
+ }
+ else if(sidCode < 16)
+ {
+ sidFlag = 1;
+ }
+ else
+ sidFlag = 0;
+
+ break;
+
+ case VOC_EFR:
+ for(i=0; i<GSM_FR_SID_LEN; i++)
+ {
+ sidCode += speechBits[gsmEfrSidBits[i]];
+ }
+
+ if(sidCode > 93)
+ {
+ sidFlag = 2;
+ }
+ else if(sidCode > 79)
+ {
+ sidFlag = 1;
+ }
+ else
+ sidFlag = 0;
+
+ break;
+
+ default:
+ sidFlag = 0;
+ break;
+ }
+ return(sidFlag);
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Dsp/bbdataproc/chcodec/Vitgsm.asm b/data/mnet/GP10/Dsp/bbdataproc/chcodec/Vitgsm.asm
new file mode 100644
index 0000000..66647eb
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/chcodec/Vitgsm.asm
@@ -0,0 +1,326 @@
+*****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************
+*===============================================================================
+*
+* TEXAS INSTRUMENTS, INC.
+*
+* GSM RATE-1/2 CONVOLUTIONAL DECODER (VITERBI ALGORITHM, SOFT DECISION)
+*
+* Revision Data: 04/22/97
+*
+* Revision Date: 02/3/99: bit-based trans[] traceback added(hpines)
+*
+* USAGE This routine is C callable and can be called as
+*
+* void vitgsm(int n, short old[], short new_s[],
+* short trans[], short m[], char sd[], char out[])
+
+
+* n --- decoder input length (input)
+* old[] --- state metrics at previous instant (input)
+* new_s[] --- state metrics at current instant (output)
+* trans[] --- path transition of each state (output)
+* m[] --- local variable array to store path metrics
+* sd[] --- soft decision values of input bit stream (input)
+* out[] --- output bit stream (output)
+*
+* C CODE
+* This is the C equivalent of the Assembly Code without the
+* assumptions listed below. Note that the assembly code is hand
+* optimized and assumptions apply.
+*
+* void vitgsm(int n, short old[], short new_s[],
+* short trans[], short m[], char sd[], char out[])
+* {
+* int i, j, k, a, b, m0, m1, mj;
+* short *tmp;
+* for (i = 0; i < n; i++) {
+* m0 = sd[2 * i] + sd[2 * i + 1];
+* m1 = sd[2 * i] - sd[2 * i + 1];
+* m[0] = m[2] = m0;
+* m[1] = m[3] = -m0;
+* m[4] = m[6] = m1;
+* m[5] = m[7] = -m1;
+* for (j = 0; j < 8; j++) {
+* mj = m[j];
+* for (k = 0; k < 16; k += 8) {
+* a = old[2 * j] + mj;
+* b = old[2 * j + 1] - mj;
+* new_s[j + k] = (b > a) ? b : a;
+* trans[i] = (trans[i] << 1) | (b > a);
+* mj = -mj;
+* }
+* }
+* tmp = old;
+* old = new_s;
+* new_s = tmp;
+* }
+* }
+*
+* DESCRIPTION
+* This routine is used to decode the convolutional code
+* employed in GSM full rate system, with Viterbi algorithm
+* and soft decision.
+* The convolutional code is of rate-1/2 and of constraint
+* length K = 5. The generator polynomials are
+* G0(D) = 1 + D^3 + D^4
+* G1(D) = 1 + D + D^3 + D^4
+* and the output sequence of the convolutional encoder
+* is grouped as G0G1 G0G1 ...
+* The input of the convolutional decoder is a sequence of
+* soft decision values generated by the demodulator. The
+* values are 16-bits values between -1 and +1, with -1 for
+* transmitted 1 and +1 for transmitted 0.
+*
+* TECHNIQUES
+* Completely unroll the k loop.
+*
+* PERFORMANCE COMMENTS
+*
+* Limited by 6 ALUs/cycle.
+*
+* ASSUMPTIONS
+* 1. Rate - 1/2 convolutional decoding
+* 2. K = 5
+* 3. With the generator polynomials in DESCRIPTION
+*
+* MEMORY NOTE:
+* m must be offset from new_s by an odd number of halfwords
+* to avoid a conflict in j loop.
+* Memory bank hits still exist once every 4 iterations of
+* the i loop (i.e. ceil(n/4) cycles.)
+*
+* CYCLES 38*n + 12 + n/4
+*
+*===============================================================================
+ .global _vitgsm
+ .text
+
+EVEN_SHIFT_MASK .SET 021FH ;TRN EXT SHIFTER MASK..EVEN STATE #
+ODD_SHIFT_MASK .SET 023FH ;TRN EXT SHIFTER MASK..ODD STATE #
+
+_vitgsm:
+
+*** BEGIN Benchmark Timing ***
+B_START:
+
+ NOP 2
+
+ ADD .L1X 1,B8,A9 ; copy sd
+|| STW .D2 B14,*B15-- ; push B14 on stack
+
+ B .S1 ILOOP ; branch to setup code
+|| LDB .D2 *B8++[2],B7 ; load sd0 = sd[2 * i]
+|| LDB .D1 *A9++[2],A0 ; load sd1 = sd[2 * i + 1]
+|| MV .L2X A4,B2 ; move n
+|| SUB .L1X B15,4,A7 ; copy stack pointer
+
+ MV .L2X A8,B9 ; copy m
+|| STW .D1 A12,*A7--[2] ; push A13 on stack
+|| STW .D2 B13,*B15--[2] ; push B13 on stack
+
+ STW .D1 A11,*A7--[2] ; push A12 on stack
+|| STW .D2 B12,*B15--[2] ; push B12 on stack
+
+ MVK .S1 46,A3 ; old->new swap constant
+|| STW .D1 A10,*A7--[2] ; push A10 (output ptr) on stack
+|| STW .D2 B11,*B15--[2] ; push B11 on stack
+
+ STW .D2 B10,*B15--[2] ; push B10 on stack
+|| STW .D1 A4,*A7 ; push A4(num inputs) on stack
+
+ STW .D2 B6,*B15 ; push B6 (TRN ptr) on stack
+
+JLOOP:
+ [B1] B .S1 JLOOP ;** for j
+||[B1] SUB .S2 B1,1,B1 ; j++
+||[!A2] STH .D1 B12,*+A6[8] ; store new[j+8] = a8
+||[!A2] ADD .D2 B0,B14,B14 ; tr |= t8
+|| CMPGT .L1 A11,A10,A1 ; t0 = (b0 > a0)
+|| CMPGT .L2 B11,B10,B0 ; t8 = (b8 > a8)
+|| MPY .M1X 1,B5,A4 ; copy mj
+
+ [A2] SUB .S1 A2,1,A2 ; decrement priming
+||[!A2] STH .D1 A12,*A6++ ; store new[j] = a0
+||[A1] ADD .S2 2,B0,B0 ; t8 |= (t0 << 1)
+||[B0] MPY .M2 1,B11,B12 ; if (t8) a8 = b8
+|| MPY .M1 1,A10,A12 ; copy a0
+|| SUB .L2X A7,B5,B10 ; a8 = old0 - mj
+|| LDH .D2 *++B9,B5 ; load mj = m[j]
+
+ SHL .S2 B14,2,B14 ; tr <<= 2
+||[A1] MPY .M1 1,A11,A12 ; if (t0) a0 = b0
+|| ADD .S1 A7,A4,A10 ; a0 = old0 + mj
+|| SUB .L1X B13,A4,A11 ; b0 = old1 - mj
+|| ADD .L2 B13,B5,B11 ; b8 = old1 + mj
+|| MPY .M2 1,B10,B12 ; copy a8
+|| LDH .D2 *B4++[2],A7 ;* load old0 = old[2*j]
+|| LDH .D1 *A5++[2],B13 ;* load old1 = old[2*j+1]
+; end of JLOOP
+
+ STH .D1 B12,*+A6[8] ; new[j+8] = a8
+|| SUB .D2 B9,20,B9 ; reset m i
+|| ADD .S2 B0,B14,B14 ; tr |= t8
+|| SUB .L2X A6,14,B4 ; swap new_s, old, i
+
+ STH .D1 A12,*A6 ; new[j] = a0
+|| SUB .L1 A5,A3,A6 ; "
+|| STH .D2 B14,*B6++ ; trans[i] = tr, i+1
+
+ILOOP:
+ [B2] B .S2 JLOOP ; for j
+|| ADD .L1X B7,A0,A10 ; m0 = sd0 + sd1
+|| SUB .L2X A0,B7,B10 ; -m1 = sd1 - sd0
+|| LDB .D2 *B8++[2],B7 ;* load sd0 = sd[2 * i]
+|| LDB .D1 *A9++[2],A0 ;* load sd1 = sd[2 * i + 1]
+
+ MPY .M2X 1,A10,B5 ; for first pass
+||[B2] STH .D1 A10,*+A8[0] ; store m[0] = m0
+||[B2] STH .D2 B10,*+B9[7] ; store m[7] = -m1
+
+ [B2] STH .D1 A10,*+A8[2] ; store m[2] = m0
+||[B2] STH .D2 B10,*+B9[5] ; store m[5] = -m1
+|| SUB .L1 0,A10,A10 ; negate for store
+|| SUB .L2 0,B10,B10 ; negate for store
+
+ [B2] B .S2 JLOOP ;* for j
+||[B2] STH .D1 A10,*+A8[1] ; store m[1] = -m0
+||[B2] STH .D2 B10,*+B9[6] ; store m[6] = m1
+|| ADD .L1X 2,B4,A5 ; copy old
+
+ [B2] STH .D1 A10,*+A8[3] ; store m[3] = -m0
+||[B2] STH .D2 B10,*+B9[4] ; store m[4] = m1
+|| MVK .S2 8,B1 ; j = 0
+|| SUB .L2 B2,1,B2 ; i++
+
+ LDH .D2 *B4++[2],A7 ; load old0 = old[2*j]
+|| LDH .D1 *A5++[2],B13 ; load old1 = old[2*j+1]
+|| MVK .S1 3,A2 ; setup priming count
+; end of ILOOP
+
+ NOP
+ NOP
+***
+*** MODIFIED JETCELL TRN-BASED TRACEBACK USING TI PACKED TRN
+***
+ ADD .L1X B15,4,A6 ; copy stack pointer
+
+ LDW .D2 *B15++[2],B6 ; restore TRN addr ptr from stack
+|| LDW .D1 *A6++[2],A8 ; restore # samples from stack
+ LDW .D1 *A6,A12 ; restore OUTPUT addr ptr from stack
+ NOP 3
+L20:
+ SUB .L1 A8,4,A0 ; |272|
+ EXT .S1 A0,16,16,A3 ; |272|
+ CMPLTU .L1 A3,A8,A1 ; |272|
+ [!A1] B .S1 L23 ; |272|
+ NOP 5
+ ; BRANCH OCCURS ; |272|
+;** --------------------------------------------------------------------------*
+ ADD .L1 A3,A12,A0 ; |177|
+ MV .L2X A0,B4 ; |177|
+ ZERO .L2 B5 ; |177|
+;** --------------------------------------------------------------------------*
+L22:
+ STB .D2T2 B5,*B4++ ; |274|
+ ADD .L1 1,A3,A0 ; |272|
+ EXT .S1 A0,16,16,A3 ; |272|
+ CMPLTU .L1 A3,A8,A1 ; |272|
+ [ A1] B .S1 L22 ; |272|
+ NOP 5
+ ; BRANCH OCCURS ; |272|
+;** --------------------------------------------------------------------------*
+L23:
+ SUB .L1 A8,1,A0 ; |283|
+ EXT .S1 A0,16,16,A0 ; |283|
+ CMPLT .L1 A0,4,A1 ; |283|
+ [ A1] B .S1 L29 ; |283|
+ NOP 5
+ ; BRANCH OCCURS ; |283|
+;** --------------------------------------------------------------------------*
+ ADD .L1 A0,A12,A3 ; |177|
+ SUB .L1 A3,4,A3 ; |177|
+ SUB .L1 A0,3,A1 ; |177|
+
+***
+*** REMOVE INTERRUPT DISABLE AT WINFIELD'S SUGGESTION...1/29/99
+***
+; MVC .S2 CSR,B7 ; |283|
+ MV .L2X A0,B4 ; |283|
+|| ZERO .D2 B5 ; |283|
+
+; AND .L2 -2,B7,B8 ; |283|
+; MVC .S2 B8,CSR ; |283|
+***
+*** HERE BEGIN TI BIT-BASED TRACEBACK
+***
+;** --------------------------------------------------------------------------*
+L25: ; PIPED LOOP PROLOG
+
+ MVK .S1 ODD_SHIFT_MASK,A10
+ SHL .S2X A8,1,B4 ;
+|| MVK .S1 EVEN_SHIFT_MASK,A11
+ ADD .L2 B4,B6,B6 ;PTR TO LAST SAMPLE TRANS HALFWORD
+ LDH .D2 *--B6,B7 ;LOAD FIRST TRANS STATE
+
+;** --------------------------------------------------------------------------*
+L26: ; PIPED LOOP KERNEL
+
+ AND .L1X 8,B5,A2 ; A2 INDICATES STATES >=8
+ EXTU .S2 B5,29,23,B4 ; MASK 3 LSB *2, SHIFTED FOR EXT
+; AND .L2 7,B5,B4 ; MASK 3 LSB B5
+; SHL .S2 B4,1,B8
+***
+*** COMPUTE SHIFTER B8 FOR EXTRACTING OUTPUT BIT FROM TRN HALFWORD
+***
+ [A2] OR .L2X A10,B4,B8 ; EXTRA STATE IF STATE >=8
+ [!A2] OR .L2X A11,B4,B8
+
+ EXTU .S2 B7,B8,B4 ; SHIFT EXTRACT OUTPUT BIT FROM TRN
+ LDH .D2 *--B6,B7 ; LOAD NEXT TRANS STATE
+
+
+ [ A1] SUB .L1 A1,1,A1 ; |283|
+
+ [ A1] B .S1 L26 ; |283|
+ NOP 2
+
+ SUB .L1 A0,1,A0 ; |283|
+|| ADDAH .D2 B4,B5,B5 ; ^ |295|
+
+ EXT .S1 A0,16,16,A0 ; |283|
+|| STB .D1T2 B4,*A3-- ; |289|
+|| AND .L2 15,B5,B4 ; ^ |295|
+
+ MV .L2X A0,B4 ; |179|
+|| EXT .S2 B4,16,16,B5 ; ^ |295|
+
+;** --------------------------------------------------------------------------*
+L29:
+ NOP 5
+***
+***
+B_END:
+*** END Benchmark Timing ***
+
+ ADD .L1X B15,4,A8 ; copy stack pointer
+
+ LDW .D2 *B15++[2],B10 ; pop B10 off stack
+|| LDW .D1 *A8++[2],A10 ; pop B11 off stack
+
+ LDW .D2 *B15++[2],B11 ; pop A10 off stack
+|| LDW .D1 *A8++[2],A11 ; pop A11 off stack
+
+ LDW .D2 *B15++[2],B12 ; pop B12 off stack
+|| LDW .D1 *A8,A12 ; pop A12 off stack
+
+ LDW .D2 *B15++,B13 ; pop B13 off stack
+|| B .S2 B3 ; return
+
+ LDW .D2 *B15,B14 ; pop B14 off stack
+
+ NOP 4
+*
+*===============================================================================
diff --git a/data/mnet/GP10/Dsp/bbdataproc/chcodec/bfi.c b/data/mnet/GP10/Dsp/bbdataproc/chcodec/bfi.c
new file mode 100644
index 0000000..575c5c0
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/chcodec/bfi.c
@@ -0,0 +1,105 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+**
+** Description:
+** Contains functions that perform TCH bad frame detection.
+**
+*****************************************************************************/
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "bbproto.h"
+#include "codec.h"
+#include "diagdata.h"
+
+/*****************************************************************************
+** Routine Name: DetectBFI
+**
+** Description:
+** Performs subjective encoding per GSM 06.10 table A2.1a for Full-rate
+** speech.
+**
+** Method:
+** Any frame with a bad CRC check is marked as bad. However, in an
+** "open-air" envionment, there is a 1-in-8 chance (there are 3 parity
+** bits) that the CRC will fail to detect errors. Also CRC only checks
+** classIa bits. Therefore, the Viterbi path metric of the convolutional
+** decoder is also examined. If the metric is below a pre-determined
+** threshold, the frame is marked as bad.
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** perceptualMask (T/F) indicates whether to mask the voice frame
+**
+** Returns:
+** Boolean indicating BFI status: TRUE-bad frame, FALSE-good frame.
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+
+Bool detectBFI(t_chanSel chanSel, Bool parityError, UInt decoderMetric,
+ UInt totalErrors, Bool *perceptualMask)
+{
+ Bool badFrame;
+
+ /*
+ * Initialize bad frame and perceptual masking to false. Set TRUE later
+ * if any appropriate condition exists.
+ */
+ badFrame = FALSE;
+ *perceptualMask = FALSE;
+
+ /*
+ * Each channel can have a different BFI algorithm
+ */
+ switch (chanSel)
+ {
+ case RACH: /* RACH */
+ /*
+ * If CRC error, set BFI
+ */
+ if (parityError)
+ {
+ badFrame = TRUE;
+ }
+ /*
+ * If viterbi metric is too low, set BFI
+ */
+ if (decoderMetric < g_RachMetricThresh)
+ {
+ badFrame = TRUE;
+ }
+ break;
+
+ case TCHF: /* Fullrate speech traffic */
+ /*
+ * If CRC error, set BFI
+ */
+ if (parityError)
+ {
+ badFrame = TRUE;
+ }
+ /*
+ * If viterbi metric is too low or BER is too high, set
+ * perceptual masking indicator. Do not count toward BFI.
+ */
+ if ( decoderMetric < g_TchMetricThresh ||
+ totalErrors > g_TchBerThresh )
+ {
+ *perceptualMask = TRUE;
+ }
+ break;
+
+ default: /* Other channel types not supported */
+ break;
+
+ } /*end switch */
+
+ return(badFrame);
+}
diff --git a/data/mnet/GP10/Dsp/bbdataproc/chcodec/chcodesubs.asm b/data/mnet/GP10/Dsp/bbdataproc/chcodec/chcodesubs.asm
new file mode 100644
index 0000000..4be9a3c
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/chcodec/chcodesubs.asm
@@ -0,0 +1,901 @@
+*****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************
+* OPTIMIZED ASSEMBLY ROUTINES USED IN THE "\BBDATAPROC\CHCODEC" SUBDIRECTORY
+*
+*===============================================================================
+*==============================================================================
+*
+*
+* Shift Zeros into Shift Reg
+*
+* Revision Date: 6/1/00
+*
+* USAGE This routine is C callable and can be called as
+*
+* void shiftZeros(Char *in, Int16 input_mask,
+* Int16 numbits,Int16 poly)
+*
+* C CODE
+* This is the C equivalent of the Assembly Code.
+* Note that the assembly code is hand optimized.
+*
+* for(i=0; i<numBits; i++)
+* {
+* output = regOut & 0x0001;
+* result = poly * output;
+* regIn = result ^ regOut;
+* regOut = regIn >> 1;
+* }
+*==============================================================================
+ .global _shiftZeros
+ .text
+_shiftZeros:
+ STW .D2 B10,*B15-- ; push register (for c-callable func)
+
+*** BEGIN Benchmark Timing ***
+B_START1
+
+ STW .D2 B11,*B15-- ; push register (for c-callable func)
+|| MVK .S2 024000h,B6 ; init generator polynomial
+
+ STW .D2 B12,*B15-- ; push register (for c-callable func)
+|| MVKH .S2 024000h,B6 ; init generator polynomial
+
+ MVK .S1 2,A2 ; init poly shifter
+ MVK .S2 0154bh,B2 ; init loop counter
+|| MV .L1 A3,A8
+
+ AND .L1 1,A4,A1 ; init feedback bit
+LOOP:
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,30,31,A1 ; strip next output bit
+||[B2]SUB .S2 B2,1,B2 ; decrement outer loop counter
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,29,31,A1 ; strip next output bit
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,28,31,A1 ; strip next output bit
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,27,31,A1 ; strip next output bit
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,26,31,A1 ; strip next output bit
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,25,31,A1 ; strip next output bit
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,24,31,A1 ; strip next output bit
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,23,31,A1 ; strip next output bit
+||[B2]B .S2 LOOP ;* branch to loop
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,22,31,A1 ; strip next output bit
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,21,31,A1 ; strip next output bit
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,20,31,A1 ; strip next output bit
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| EXTU .S1 A4,19,31,A1 ; strip next output bit
+|| MVK .S2 024000h,B6 ; init generator polynomial
+
+ SHR .S1 A4,12,A4 ; shift out last 12 lsbits
+|| MVKH .S2 024000h,B6 ; init generator polynomial
+
+LOOP_END:
+
+ ; eleven more shifts
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,30,31,A1 ; strip next output bit
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,29,31,A1 ; strip next output bit
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,28,31,A1 ; strip next output bit
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,27,31,A1 ; strip next output bit
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,26,31,A1 ; strip next output bit
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,25,31,A1 ; strip next output bit
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,24,31,A1 ; strip next output bit
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,23,31,A1 ; strip next output bit
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,22,31,A1 ; strip next output bit
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,21,31,A1 ; strip next output bit
+
+ [A1]XOR .L1X A4,B6,A4 ; poly ^ shiftreg
+|| ADD .L2 B6,B6,B6 ; poly << 1
+|| EXTU .S1 A4,20,31,A1 ; strip next output bit
+
+ SHR .S1 A4,11,A4 ; shift out last 11 lsbits
+
+B_END1:
+*** END Benchmark Timing ***
+
+
+ LDW .D2 *++B15,B12 ; pop register (for c-callable func)
+
+ LDW .D2 *++B15,B11 ; pop register (for c-callable func)
+|| B .S2 B3 ; return
+
+ LDW .D2 *++B15,B10 ; pop register (for c-callable func)
+
+ NOP 4
+*
+*==============================================================================
+*
+*
+* GPRS Convolutional Encoder Bit Puncturing
+*
+* Revision Date: 4/7/00
+*
+*
+* USAGE This routine is C callable and can be called as
+*
+* void punctureGPRS(Char *in, Char *out, Const codeScheme);
+*
+* in [] --- input bit stream (input)
+* out[] --- punctured bit stream (output)
+* codeScheme --- CS2 or CS3 (input)
+* DESCRIPTION
+*
+* For GPRS coding schemes CS-2 or CS-3, puncturing of the convolutionally
+* encoded bits as follows:
+*
+* CS-2: the punctured bits are numbered 4*i+3, i = 3,...,146, except for
+* i = 9,21,33,45,57,69,81,93,105,117,129,141. This pattern has to be
+* adjusted to the format of the future new TRAU frame format to be used
+* on the Abis interface(i.e. more puncturing to allow RLC signalling
+*
+* CS-3: the punctured bits are numbered 6*i+3, and 6*i+5, i = 2,...,111
+*
+* C CODE
+* This is the C equivalent of the Assembly Code for the CS2 case.
+* Note that the assembly code is hand optimized.
+*
+* j = 0;
+* ii = 15;
+* jj = 39;
+* for(i=0; i < (2*NUM_GPRS_CS2_CNV_ENC_IN_BITS); i++)
+* {
+* if(i != ii)
+* {
+* cnvEncOutData[j] = cnvEncOutData[i];
+* j++;
+* }
+* else
+* {
+* ii += 4;
+* if(ii == jj)
+* {
+* jj += 48;
+* ii += 4;
+* }
+* }
+* }
+*==============================================================================
+ .global _punctureGPRS
+ .text
+_punctureGPRS:
+ STW .D2 B10,*B15-- ; push register (for c-callable func)
+
+*** BEGIN Benchmark Timing ***
+B_STARTP
+
+ STW .D2 B11,*B15-- ; push register (for c-callable func)
+|| MVK .S1 0, A5 ; init input sample buffer index offset
+|| MVK .S2 48,B6 ; init CS2 exception puncture index offset
+|| SUB .L2X A6,1,B1 ; CS2,CS3 flag(0,1) is conditional register
+
+ STW .D2 B12,*B15-- ; push register (for c-callable func)
+|| MVK .S1 16,A3 ; init first puncture index
+||[B1]MVK .S2 18,B5 ; init CS2 first puncture index
+
+ MV .L1 A4,A8 ; init input data buffer ptr
+|| MVK .S1 0,A9 ; init output data buffer offset
+||[!B1]MVK .S2 40,B5 ; init CS2 exception first puncture index
+|| ADD .L2X 1,A4,B8 ; init input data buffer ptr
+
+ MV .L1X B4,A4 ; init output data buffer ptr base addr
+|| MVK .S1 1,A1 ; init puncture flag to "not puncture"
+|| MVK .S2 1,B9 ; init output data buffer offset
+
+ [B1]MVK .S2 0151h,B2 ; init CS3 loop index
+ [!B1]MVK .S2 0125h,B2 ; init CS2 loop index
+
+ [B1]B .S2 CS3_PUNCTURE_INIT ;* branch to CS3 puncturing if CS3
+ NOP 5
+
+
+CS2_PUNCTURE_LOOP:
+ LDB .D1 *A8++[2],A7 ; load next input
+|| LDB .D2 *B8++[2],B7 ; load next input
+||[!A1]ADD .L1 1,A9,A9 ; punctured increment output addr ptr
+||[!A1]ADD .L2 1,B9,B9 ; punctured increment output addr ptr
+|| ADD .S1 2,A5,A5 ; increment input sample buffer index offset
+||[B2]B .S2 CS2_PUNCTURE_LOOP ;* branch to loop
+
+ CMPGT .L1 A3,A5,A1 ; input sample index offset = puncture index?
+||[B2]SUB .S2 B2,1,B2 ; decrement loop counter
+
+ [!A1]ADD .L1 4,A3,A3 ; puncturing flag set...increment next puncture index
+
+ CMPEQ .L2X A3,B5,B0 ; puncture index exception?
+
+ NOP
+||[B0]ADD .L1 4,A3,A3 ; exception flag set...increment exception index
+||[B0]ADD .L2 B6,B5,B5 ; exception flag set...increment exception index
+
+ STB .D1 A7,*A4[A9] ; always output odd alternate samples
+||[A1]STB .D2 B7,*B4[B9] ; conditionally puncture even alternate samples
+||[A1]ADD .S1 2,A9,A9 ; non-punctured increment output addr ptr
+||[A1]ADD .S2 2,B9,B9 ; non-punctured increment output addr ptr
+
+CS2_PUNCTURE_LOOP_END:
+
+ B .S2 CS3_PUNCTURE_LOOP_END ;* branch to end
+ NOP 5
+
+CS3_PUNCTURE_INIT:
+ MVK .S2 1,B1 ; init puncture flag to "not puncture"
+CS3_PUNCTURE_LOOP:
+ LDB .D1 *A8++[2],A7 ; load next input
+|| LDB .D2 *B8++[2],B7 ; load next input
+||[!B1]ADD .L1 1,A9,A9 ; punctured increment output addr ptr
+||[!B1]ADD .L2 1,B9,B9 ; punctured increment output addr ptr
+|| ADD .S1 2,A5,A5 ; increment input sample buffer index offset
+||[B2]B .S2 CS3_PUNCTURE_LOOP ;* branch to loop
+
+ CMPGT .L1 A3,A5,A1 ; input sample index offset = puncture index?
+|| CMPGT .L2X B5,A5,B1 ; input sample index offset = puncture index?
+||[B2]SUB .S2 B2,1,B2 ; decrement loop counter
+
+ [!A1]ADD .L1 6,A3,A3 ; puncturing flag set...increment next puncture index
+||[!B1]ADD .L2 6,B5,B5 ; puncturing flag set...increment next puncture index
+
+ AND .L2X A1,B1,B1
+
+ NOP
+
+ STB .D1 A7,*A4[A9] ; always output odd alternate samples
+||[B1]STB .D2 B7,*B4[B9] ; conditionally puncture even alternate samples
+||[B1]ADD .S1 2,A9,A9 ; non-punctured increment output addr ptr
+||[B1]ADD .S2 2,B9,B9 ; non-punctured increment output addr ptr
+
+CS3_PUNCTURE_LOOP_END:
+
+
+ LDW .D2 *++B15,B12 ; pop register (for c-callable func)
+
+ LDW .D2 *++B15,B11 ; pop register (for c-callable func)
+|| B .S2 B3 ; return
+
+
+ LDW .D2 *++B15,B10 ; pop register (for c-callable func)
+
+ NOP 4
+
+*==============================================================================
+*
+*
+* GPRS Convolutional Decoder Bit Puncturing Restoration
+*
+* Revision Date: 4/7/00
+*
+* USAGE This routine is C callable and can be called as
+*
+* void restorePunctureGPRS(Char *in, Char *out, Const codeScheme);
+*
+* in [] --- input punctured demod samples (input)
+* out[] --- output demod samples with punctures 0 filled (output)
+* codeScheme --- CS2 or CS3 (input)
+* DESCRIPTION
+*
+* For GPRS coding schemes CS-2 or CS-3, the punctured demodulated samples
+* are replaced with 0 values to allow soft decision convolutional decoding
+* as follows:
+*
+* CS-2: the punctured bits are numbered 4*i+3, i = 3,...,146, except for
+* i = 9,21,33,45,57,69,81,93,105,117,129,141. This pattern has to be
+* adjusted to the format of the future new TRAU frame format to be used
+* on the Abis interface(i.e. more puncturing to allow RLC signalling
+*
+* CS-3: the punctured bits are numbered 6*i+3, and 6*i+5, i = 2,...,111
+*
+* C CODE
+* This is the C equivalent of the Assembly Code for the CS2 case.
+* Note that the assembly code is hand optimized.
+*
+* j = 0;
+* ii = 15;
+* jj = 39;
+* for(i=0; i < (2*NUM_GPRS_CS2_CNV_ENC_IN_BITS); i++)
+* {
+* if(i != ii)
+* {
+* cnvEncOutTestData[i] = cnvDecInData[j];
+* j++;
+* }
+* else
+* {
+* cnvEncOutTestData[i] = 0;
+* ii += 4;
+* if(ii == jj)
+* {
+* jj += 48;
+* ii += 4;
+* }
+* }
+* }
+*==============================================================================
+ .global _restorePunctureGPRS
+ .text
+_restorePunctureGPRS:
+ STW .D2 B10,*B15-- ; push register (for c-callable func)
+
+*** BEGIN Benchmark Timing ***
+B_STARTRP
+
+ STW .D2 B11,*B15-- ; push register (for c-callable func)
+|| MVK .S1 2, A5 ; init input sample buffer index offset
+|| MVK .S2 48,B6 ; init CS2 exception puncture index offset
+|| SUB .L2X A6,1,B1 ; CS2,CS3 flag(0,1) is conditional register
+
+ STW .D2 B12,*B15-- ; push register (for c-callable func)
+|| MVK .S1 16,A3 ; init first puncture index
+||[B1]MVK .S2 18,B5 ; init CS2 first puncture index
+
+ MV .L1 A4,A8 ; init input data buffer ptr
+|| MVK .S1 0,A9 ; init output data buffer offset
+||[!B1]MVK .S2 40,B5 ; init CS2 exception first puncture index
+|| ADD .L2X 0,A4,B8 ; init input data buffer ptr
+
+ MV .L1X B4,A4 ; init output data buffer ptr base addr
+|| ADD .L2 1,B4,B4 ; init ouput data buffer ptr base addr
+|| MVK .S1 1,A1 ; init puncture flag to "not puncture"
+|| MVK .S2 1,B9 ; init output data buffer offset
+
+ [B1]MVK .S2 0151h,B2 ; init CS3 loop index
+ [!B1]MVK .S2 0125h,B2 ; init CS2 loop index
+
+ [B1]B .S2 CS3_RESTORE_PUNCTURE_INIT ;* branch to CS3 puncturing if CS3
+ NOP 5
+
+
+CS2_RESTORE_PUNCTURE_LOOP:
+ LDB .D1 *A8[A9],A7 ; load next input
+||[A1]LDB .D2 *B8[B9],B7 ; load next input
+|| ADD .S1 2,A5,A5 ; increment input sample buffer index offset
+||[B2]B .S2 CS2_RESTORE_PUNCTURE_LOOP ;* branch to loop
+
+ NOP
+||[!A1]MVK .S2 0,B7 ; puncturing flag set...insert 0 puncturing bit
+
+ [!A1]ADD .L1 4,A3,A3 ; puncturing flag set...increment next puncture index
+||[B2]SUB .S2 B2,1,B2 ; decrement loop counter
+
+ CMPEQ .L2X A3,B5,B0 ; puncture index exception?
+||[A1]ADD .S1 2,A9,A9 ; non-punctured increment output addr ptr
+||[A1]ADD .S2 2,B9,B9 ; non-punctured increment output addr ptr
+
+ [B0]ADD .L1 4,A3,A3 ; exception flag set...increment exception index
+||[B0]ADD .L2 B6,B5,B5 ; exception flag set...increment exception index
+||[!A1]ADD .S1 1,A9,A9 ; punctured increment output addr ptr
+||[!A1]ADD .S2 1,B9,B9 ; punctured increment output addr ptr
+
+ STB .D1 A7,*A4++[2] ; always output odd alternate samples
+|| STB .D2 B7,*B4++[2] ; conditionally puncture even alternate samples
+|| CMPGT .L1 A3,A5,A1 ; input sample index offset = puncture index?
+
+CS2_RESTORE_PUNCTURE_LOOP_END:
+
+ B .S2 CS3_RESTORE_PUNCTURE_LOOP_END ;* branch to end
+ NOP 5
+
+CS3_RESTORE_PUNCTURE_INIT:
+ MVK .S2 1,B1 ; init puncture flag to "not puncture"
+;|| MVK .S1 0, A5 ; init input sample buffer index offset
+CS3_RESTORE_PUNCTURE_LOOP:
+ LDB .D1 *A8[A9],A7 ; load next input
+||[B1]LDB .D2 *B8[B9],B7 ; load next input
+|| ADD .S1 2,A5,A5 ; increment input sample buffer index offset
+||[B2]B .S2 CS3_RESTORE_PUNCTURE_LOOP ;* branch to loop
+
+ NOP
+||[!B1]MVK .S2 0,B7 ; puncturing flag set...insert 0 puncturing bit
+
+ [!B1]ADD .S1 1,A9,A9 ; punctured increment output addr ptr
+||[!B1]ADD .S2 1,B9,B9 ; punctured increment output addr ptr
+
+ [B1]ADD .S1 2,A9,A9 ; non-punctured increment output addr ptr
+||[B1]ADD .S2 2,B9,B9 ; non-punctured increment output addr ptr
+
+ [B2]SUB .S2 B2,1,B2 ; decrement loop counter
+|| CMPGT .L1 A3,A5,A1 ; input sample index offset = puncture index?
+|| CMPGT .L2X B5,A5,B1 ; input sample index offset = puncture index?
+
+ AND .L2X A1,B1,B1
+||[!A1]ADD .S1 6,A3,A3 ; puncturing flag set...increment next puncture index
+||[!B1]ADD .S2 6,B5,B5 ; puncturing flag set...increment next puncture index
+|| STB .D1 A7,*A4++[2] ; always output odd alternate samples
+|| STB .D2 B7,*B4++[2] ; conditionally puncture even alternate samples
+
+CS3_RESTORE_PUNCTURE_LOOP_END:
+
+
+ LDW .D2 *++B15,B12 ; pop register (for c-callable func)
+
+ LDW .D2 *++B15,B11 ; pop register (for c-callable func)
+|| B .S2 B3 ; return
+
+
+ LDW .D2 *++B15,B10 ; pop register (for c-callable func)
+
+ NOP 4
+
+*==============================================================================
+*
+*
+* CrcEncoder16 Shift Reg
+*
+* Revision Date: 5/1/00
+*
+* USAGE This routine is C callable and can be called as
+*
+* void crcShiftReg(Char *in, Int16 numbits,
+* Int16 input_mask, Int16 poly)
+*
+* C CODE
+* This is the C equivalent of the Assembly Code.
+* Note that the assembly code is hand optimized.
+*
+* for(i=0; i<numSigBits + numParityBits; i++)
+* {
+* output = regOut & 0x0001;
+* result = poly * output;
+* regIn = result ^ regOut;
+* regOut = regIn >> 1;
+* bit = input[i+1] << numParityBits;
+* regOut |= bit;
+* }
+*==============================================================================
+ .global _crcShiftReg
+ .text
+_crcShiftReg:
+ STW .D2 B10,*B15-- ; push register (for c-callable func)
+
+*** BEGIN Benchmark Timing ***
+B_STARTSR
+
+ STW .D2 B11,*B15-- ; push register (for c-callable func)
+|| ADD .S1X 0,B4,A1 ; init loop index = # input samples/2
+
+ STW .D2 B12,*B15-- ; push register (for c-callable func)
+|| SHR .S1 A1,1,A1 ; init loop index = # input samples/2
+
+ LDB .D1 *A4,A2 ; input first data sample
+|| ADD .L1 1,A4,A8 ; init input data buffer ptr
+|| ADD .L2X 2,A4,B8 ; init input data buffer ptr
+|| SUB .S1 A1,1,A1 ; decrement/init loop counter
+
+ NOP 4
+
+ MVK .S1 0,A4 ; init shift reg = "regout"
+|| MV .L2X A2,B0 ; save input as conditional
+
+ LDB .D1 *A8++[2],A2 ; load next input
+|| LDB .D2 *B8++[2],B7 ; load next input
+
+ NOP 4
+
+
+shiftReg_LOOP:
+ LDB .D1 *A8++[2],A7 ; load next input
+||[B0]OR .L1 A6,A4,A4 ; regout |= input
+|| AND .L2X 1,A4,B1 ; regout & 1
+||[A1]SUB .S1 A1,1,A1 ; decrement loop counter
+||[A1]B .S2 shiftReg_LOOP ;* branch to loop
+
+ [B1]XOR .L1X A4,B6,A5 ; regin = poly ^ regout
+||[!B1]MV .S1 A4,A5 ; ..or regin = regout
+|| MV .S2 B7,B0 ; save input as conditional
+
+ EXTU .S1 A5,0,1,A4 ; regout = regin >> 1
+|| LDB .D2 *B8++[2],B7 ; load next input
+
+ AND .L2X 1,A4,B1 ; regout & 1
+||[A2]OR .L1 A6,A4,A4 ; regout |= input
+
+ [B1]XOR .L1X A4,B6,A5 ; regin = poly ^ regout
+||[!B1]MV .S1 A4,A5 ; ..or regin = regout
+
+ EXTU .S1 A5,0,1,A4 ; regout = regin >> 1
+|| MV .L1 A7,A2 ; save input as conditional
+
+shiftReg_LOOP_END:
+
+ AND .L2 1,B4,B2 ; test if num inputs is even
+||[B0]OR .L1 A6,A4,A4 ; regout |= input
+
+ [!B2]B .S2 shiftReg_END ;* branch to loop
+ NOP 3
+
+ AND .L2X 1,A4,B1 ; regout & 1
+
+ [B1]XOR .L1X A4,B6,A5 ; regin = poly ^ regout
+||[!B1]MV .S1 A4,A5 ; ..or regin = regout
+
+ EXTU .S1 A5,0,1,A4 ; regout = regin >> 1
+
+shiftReg_END:
+ LDW .D2 *++B15,B12 ; pop register (for c-callable func)
+
+ LDW .D2 *++B15,B11 ; pop register (for c-callable func)
+|| B .S2 B3 ; return
+
+
+ LDW .D2 *++B15,B10 ; pop register (for c-callable func)
+
+ NOP 4
+
+*==============================================================================
+*
+*
+* CrcEncoderCCH Long Shift Reg
+*
+* Revision Date: 6/1/00
+*
+* USAGE This routine is C callable and can be called as
+*
+* void crcLongShiftReg(Char *in, Int16 input_mask,
+* Int16 numbits,Int16 poly)
+*
+* C CODE
+* This is the C equivalent of the Assembly Code.
+* Note that the assembly code is hand optimized.
+*
+* for(i=0; i<numBits; i++)
+* {
+* output = regOut & 0x0001;
+* result = poly * output;
+* regIn = result ^ regOut;
+* regOut = regIn >> 1;
+* bit = input[i+1] << numParityBits;
+* regOut |= bit;
+* }
+*==============================================================================
+ .global _crcLongShiftReg
+ .text
+_crcLongShiftReg:
+ STW .D2 B10,*B15-- ; push register (for c-callable func)
+
+*** BEGIN Benchmark Timing ***
+
+ STW .D2 B11,*B15-- ; push register (for c-callable func)
+|| ADD .S1 0,A6,A1 ; init loop index = # input samples/2
+
+ STW .D2 B12,*B15-- ; push register (for c-callable func)
+|| SHR .S1 A1,1,A1 ; init loop index = # input samples/2
+|| MV .S2X A8,B10 ; save poly[1]
+
+ LDB .D1 *A4,A2 ; input first data sample
+|| ADD .L1 1,A4,A8 ; init input data buffer ptr
+|| SUB .S1 A1,1,A1 ; decrement/init loop counter
+
+ MVK .S1 1,A0
+ SHL .S1 A0,31,A0 ; A0 = 1 << 31
+ MV .S2 B8,B11 ;save regout destination addr for later
+ ADD .L2X 2,A4,B8 ; init input data buffer ptr
+
+ MVK .S1 0,A4 ; init shift reg = regout[0]
+ MVK .S2 0,B5 ; init shift reg = regout[1]
+|| MV .L2X A2,B0 ; save input as conditional
+
+ LDB .D1 *A8++[2],A2 ; load next input
+|| LDB .D2 *B8++[2],B7 ; load next input
+
+ MVK .S2 0,B2 ; init regout[0]conditional
+ NOP 3
+
+
+longShiftReg_LOOP:
+ LDB .D1 *A8++[2],A7 ; load next input
+||[B0]OR .S2 B5,B4,B5 ; regout[1] |= input
+||[B2]OR .L1 A0,A4,A4 ; regout[0] |= (regin[1] << 31)
+|| AND .L2X 1,A4,B1 ; regout & 1
+||[A1]B .S1 longShiftReg_LOOP ;* branch to loop
+
+ [B1]XOR .L1X A4,B6,A5 ; regin[0] = poly[0] ^ regout[0]
+||[!B1]ADD .D1 0,A4,A5 ; ..or regin[0] = regout[0]
+|| [B1]XOR .L2 B5,B10,B9 ; regin[1] = poly[1] ^ regout[1]
+||[!B1]MV .S2 B5,B9 ; ..or regin[1] = regout[1]
+|| ADD .D2 0,B7,B0 ; save input as conditional
+
+ EXTU .S1 A5,0,1,A4 ; regout[0] = regin[0] >> 1
+|| EXTU .S2 B9,0,1,B5 ; regout[1] = regin[1] >> 1
+|| LDB .D2 *B8++[2],B7 ; load next input
+|| AND .L2 1,B9,B2 ; setup (regin[1] << 31) as conditional
+||[A1]SUB .L1 A1,1,A1 ; decrement loop counter
+
+ AND .L2X 1,A4,B1 ; regout & 1
+||[A2]OR .S2 B5,B4,B5 ; regout[1] |= input
+||[B2]OR .L1 A0,A4,A4 ; regout[0] |= (regin[1] << 31)
+
+ [B1]XOR .L1X A4,B6,A5 ; regin[0] = poly[0] ^ regout[0]
+||[!B1]ADD .D1 0,A4,A5 ; ..or regin[0] = regout[0]
+|| [B1]XOR .L2 B5,B10,B9 ; regin[1] = poly[1] ^ regout[1]
+||[!B1]MV .S2 B5,B9 ; ..or regin[1] = regout[1]
+
+ EXTU .S1 A5,0,1,A4 ; regout[0] = regin[0] >> 1
+|| EXTU .S2 B9,0,1,B5 ; regout[1] = regin[1] >> 1
+|| AND .L2 1,B9,B2 ; setup (regin[1] << 31) as conditional
+|| ADD .D1 0,A7,A2 ; save input as conditional
+
+longShiftReg_LOOP_END:
+
+ AND .L2X 1,A6,B2 ; test if num inputs is even
+||[B0]OR .S2 B5,B4,B5 ; regout[1] |= input
+||[B2]OR .L1 A0,A4,A4 ; regout[0] |= (regin[1] << 31)
+
+ [!B2]B .S2 longShiftReg_END ;* branch to loop
+ NOP 2
+
+ AND .L2X 1,A4,B1 ; regout & 1
+ MV .S1X B11,A8 ; restore regout[0] destination address
+
+ [B1]XOR .L1X A4,B6,A5 ; regin[0] = poly[0] ^ regout[0]
+||[!B1]ADD .D1 0,A4,A5 ; ..or regin[0] = regout[0]
+|| [B1]XOR .L2 B5,B10,B9 ; regin[1] = poly[1] ^ regout[1]
+||[!B1]MV .S2 B5,B9 ; ..or regin[1] = regout[1]
+
+ EXTU .S1 A5,0,1,A4 ; regout[0] = regin[0] >> 1
+|| EXTU .S2 B9,0,1,B5 ; regout[1] = regin[1] >> 1
+
+longShiftReg_END:
+ LDW .D2 *++B15,B12 ; pop register (for c-callable func)
+|| STW .D1 A4,*A8++[1] ; write regout[0] off chip
+|| MV .S1X B5,A5 ; move regout[1] to a-reg
+
+ LDW .D2 *++B15,B11 ; pop register (for c-callable func)
+|| STW .D1 A5,*A8++[1] ; write regout[1] off chip
+|| B .S2 B3 ; return
+
+
+ LDW .D2 *++B15,B10 ; pop register (for c-callable func)
+
+ NOP 4
+*==============================================================================
+* Copy Bytes from input buffer to output buffer
+*
+* Revision Date: 6/1/00
+*
+* USAGE This routine is C callable and can be called as
+*
+* void copyByteSamples(Char *in, Char *out, const numbits)
+*
+* C CODE
+* This is the C equivalent of the Assembly Code.
+* Note that the assembly code is hand optimized.
+*
+* for(i=0; i<numbits; i++)
+* {
+* *out++ = *in++;
+* }
+*
+*==============================================================================
+ .global _copyByteSamples
+ .text
+_copyByteSamples:
+ STW .D2 B10,*B15-- ; push register (for c-callable func)
+
+*** BEGIN Benchmark Timing ***
+
+ STW .D2 B11,*B15-- ; push register (for c-callable func)
+|| SUB .S1 A6,6,A1 ; init loop index = # input samples - 6
+
+ STW .D2 B12,*B15-- ; push register (for c-callable func)
+|| MV .S1 A4,A8 ; init input data buffer ptr
+
+ [A1]SUB .S1 A1,1,A1 ; decrement/init loop counter
+|| LDB .D1 *A8++[1],A5 ; input first data sample
+
+ [A1]B .S2 COPY_BYTE_LOOP ;* branch to loop
+||[A1]SUB .S1 A1,1,A1 ; decrement/init loop counter
+|| LDB .D1 *A8++[1],A5 ; input next data sample
+
+ [A1]B .S2 COPY_BYTE_LOOP ;* branch to loop
+||[A1]SUB .S1 A1,1,A1 ; decrement/init loop counter
+|| LDB .D1 *A8++[1],A5 ; input next data sample
+
+ [A1]B .S2 COPY_BYTE_LOOP ;* branch to loop
+||[A1]SUB .S1 A1,1,A1 ; decrement/init loop counter
+|| LDB .D1 *A8++[1],A5 ; input next data sample
+
+ [A1]B .S2 COPY_BYTE_LOOP ;* branch to loop
+||[A1]SUB .S1 A1,1,A1 ; decrement/init loop counter
+|| LDB .D1 *A8++[1],A5 ; input next data sample
+
+ [A1]B .S2 COPY_BYTE_LOOP ;* branch to loop
+||[A1]SUB .S1 A1,1,A1 ; decrement/init loop counter
+|| LDB .D1 *A8++[1],A5 ; input next data sample
+|| ADD .L2X 0,A5,B5 ; decrement/init loop counter
+
+
+COPY_BYTE_LOOP:
+ STB .D2 B5,*B4++[1] ; copy to output buffer
+||[A1]SUB .S1 A1,1,A1 ; decrement/init loop counter
+|| LDB .D1 *A8++[1],A5 ; input next data sample
+|| ADD .L2X 0,A5,B5 ; decrement/init loop counter
+||[A1]B .S2 COPY_BYTE_LOOP ;* branch to loop
+
+
+COPY_BYTE_LOOP_END:
+ STB .D2 B5,*B4++[1] ; copy to output buffer
+|| ADD .L2X 0,A5,B5 ; decrement/init loop counter
+
+ STB .D2 B5,*B4++[1] ; copy to output buffer
+|| ADD .L2X 0,A5,B5 ; decrement/init loop counter
+
+ STB .D2 B5,*B4++[1] ; copy to output buffer
+|| ADD .L2X 0,A5,B5 ; decrement/init loop counter
+
+ STB .D2 B5,*B4++[1] ; copy to output buffer
+|| ADD .L2X 0,A5,B5 ; decrement/init loop counter
+
+ STB .D2 B5,*B4++[1] ; copy to output buffer
+|| ADD .L2X 0,A5,B5 ; decrement/init loop counter
+
+ STB .D2 B5,*B4++[1] ; copy to output buffer
+|| ADD .L2X 0,A5,B5 ; decrement/init loop counter
+
+COPY_BYTE_END:
+ LDW .D2 *++B15,B12 ; pop register (for c-callable func)
+
+ LDW .D2 *++B15,B11 ; pop register (for c-callable func)
+|| B .S2 B3 ; return
+
+
+ LDW .D2 *++B15,B10 ; pop register (for c-callable func)
+
+ NOP 4
+
+
+*==============================================================================
+* Compute Total (Channel) Errors
+*
+* Revision Date: 6/1/00
+*
+* USAGE This routine is C callable and can be called as
+*
+* void computeTotalErrors(Char *in, Char *out, Int16 input_mask, const numbits)
+*
+* C CODE
+* This is the C equivalent of the Assembly Code.
+* Note that the assembly code is hand optimized.
+*
+* for(i=0; i<NUM_CCH_CNV_ENC_OUT_BITS; i++)
+* {
+* if((cnvDecInData[i]<0) != cnvEncOutTestData[i])
+* {
+* totalErrors += 1;
+* }
+* }
+*
+*==============================================================================
+ .global _computeTotalErrors
+ .text
+_computeTotalErrors:
+ STW .D2 B10,*B15-- ; push register (for c-callable func)
+
+*** BEGIN Benchmark Timing ***
+
+ STW .D2 B11,*B15-- ; push register (for c-callable func)
+|| SUB .S1 A6,4,A1 ; init loop index = # input samples - 4 for latency
+
+ STW .D2 B12,*B15-- ; push register (for c-callable func)
+|| MV .S1 A4,A8 ; init input data buffer ptr
+|| MV .S2 B4,B8 ; init input data buffer ptr
+
+ LDB .D1 *A8++[1],A5 ; input next data sample
+|| LDB .D2 *B8++[1],B5 ; input next data sample
+|| MVK .S1 0,A6 ; init total error counter
+
+ [A1]B .S2 TOTAL_ERROR_LOOP ;* branch to loop
+||[A1]SUB .S1 A1,1,A1 ; decrement/init loop counter
+
+ LDB .D1 *A8++[1],A5 ; input next data sample
+|| LDB .D2 *B8++[1],B5 ; input next data sample
+
+ [A1]B .S2 TOTAL_ERROR_LOOP ;* branch to loop
+||[A1]SUB .S1 A1,1,A1 ; decrement/init loop counter
+
+ LDB .D1 *A8++[1],A5 ; input next data sample
+|| LDB .D2 *B8++[1],B5 ; input next data sample
+
+TOTAL_ERROR_LOOP:
+ XOR .L1 A5,1,A7 ; decrement/init loop counter
+|| CMPLT .L2 B5,0,B0 ; decrement/init loop counter
+||[A1]SUB .S1 A1,1,A1 ; decrement/init loop counter
+||[A1]B .S2 TOTAL_ERROR_LOOP ;* branch to loop
+
+ LDB .D1 *A8++[1],A5 ; input next data sample
+|| LDB .D2 *B8++[1],B5 ; copy to output buffer
+||[B0]ADD .S1 A6,A7,A6 ; decrement/init loop counter
+||[!B0]ADD .L1 A6,A5,A6 ; decrement/init loop counter
+
+
+TOTAL_ERROR_LOOP_END:
+
+ XOR .L1 A5,1,A7 ; decrement/init loop counter
+|| CMPLT .L2 B5,0,B0 ; decrement/init loop counter
+
+ [B0]ADD .S1 A6,A7,A6 ; decrement/init loop counter
+||[!B0]ADD .L1 A6,A5,A6 ; decrement/init loop counter
+
+ XOR .L1 A5,1,A7 ; decrement/init loop counter
+|| CMPLT .L2 B5,0,B0 ; decrement/init loop counter
+
+ [B0]ADD .S1 A6,A7,A6 ; decrement/init loop counter
+||[!B0]ADD .L1 A6,A5,A6 ; decrement/init loop counter
+
+ XOR .L1 A5,1,A7 ; decrement/init loop counter
+|| CMPLT .L2 B5,0,B0 ; decrement/init loop counter
+
+ [B0]ADD .S1 A6,A7,A6 ; decrement/init loop counter
+||[!B0]ADD .L1 A6,A5,A6 ; decrement/init loop counter
+
+TOTAL_ERROR_END:
+ LDW .D2 *++B15,B12 ; pop register (for c-callable func)
+|| MV .S1 A6,A4 ; return the function argument
+
+ LDW .D2 *++B15,B11 ; pop register (for c-callable func)
+|| B .S2 B3 ; return
+
+
+ LDW .D2 *++B15,B10 ; pop register (for c-callable func)
+
+ NOP 4
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/chcodec/codec.h b/data/mnet/GP10/Dsp/bbdataproc/chcodec/codec.h
new file mode 100644
index 0000000..e69a024
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/chcodec/codec.h
@@ -0,0 +1,231 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+** Filename: codec.h
+**
+** Description:
+** This file contains items specific to the GSM Channel CODEC.
+**
+*****************************************************************************/
+#ifndef _CODEC_H_
+#define _CODEC_H_ /* include once only */
+
+/****
+***Need to uncomment the following # define if reverting optimized .asm routines to original C-code***
+***
+***#define NOT_ASM_OPTIMIZED
+*/
+
+/*
+* Channel CODEC specific #defines
+*/
+#define CODEC_FRAME_SIZE 456
+#define NUM_CNV_TAIL_BITS 4
+
+#define NUM_CCH_PARITY_BITS 40
+#define NUM_CCH_CRC_IN_BITS (NUM_BITS_CCH_FRAME)
+#define NUM_CCH_CNV_ENC_IN_BITS 228
+#define NUM_CCH_CNV_ENC_OUT_BITS (2*NUM_CCH_CNV_ENC_IN_BITS)
+#define NUM_CCH_CNV_DEC_IN_BITS (NUM_CCH_CNV_ENC_OUT_BITS)
+#define NUM_CCH_CNV_DEC_OUT_BITS (NUM_CCH_CNV_ENC_IN_BITS)
+
+#define NUM_TCH_PARITY_BITS 3
+#define NUM_TCH_CRC_IN_BITS 50
+#define NUM_TCH_CNV_ENC_IN_BITS 189
+#define NUM_TCH_CNV_ENC_OUT_BITS (2*NUM_TCH_CNV_ENC_IN_BITS)
+#define NUM_TCH_CNV_DEC_IN_BITS (NUM_TCH_CNV_ENC_OUT_BITS)
+#define NUM_TCH_CNV_DEC_OUT_BITS (NUM_TCH_CNV_ENC_IN_BITS)
+
+#define TCH_CRC_POLY 0x000D
+
+/*
+* EFR Channel CODEC specific #defines
+*/
+#define EFR_NUM_TCH_PARITY_BITS 8
+#define EFR_NUM_TCH_CRC_IN_BITS 65
+
+#define EFR_NUM_BITS_TCH_CLASSIA 50 /* protected by 3-bit TCH-FS CRC */
+#define EFR_NUM_BITS_TCH_CLASSIB 132 /* protected */
+#define EFR_NUM_BITS_TCH_CLASSII 78 /* unprotected */
+
+#define EFR_NUM_ENC_REPEAT_BITS 8
+
+#define EFR_PRE_CH_CODE_IN_BITS (NUM_BITS_TCH_FRAME - EFR_NUM_TCH_PARITY_BITS - EFR_NUM_ENC_REPEAT_BITS)
+
+#define EFR_CRC_POLY 0x0171
+
+#define NUM_SCH_CRC_IN_BITS 25
+#define NUM_SCH_PARITY_BITS 10
+#define NUM_SCH_CNV_ENC_IN_BITS 39
+#define NUM_SCH_CNV_ENC_OUT_BITS (2*NUM_SCH_CNV_ENC_IN_BITS)
+
+#define SCH_CRC_POLY 0x0575
+
+#define NUM_RACH_CNV_ENC_IN_BITS 18
+#define NUM_RACH_CNV_ENC_OUT_BITS (2*NUM_RACH_CNV_ENC_IN_BITS)
+#define NUM_RACH_CNV_DEC_OUT_BITS (NUM_RACH_CNV_ENC_IN_BITS)
+#define NUM_RACH_CNV_DEC_IN_BITS (NUM_RACH_CNV_ENC_OUT_BITS)
+#define NUM_RACH_CRC_IN_BITS 8
+#define NUM_RACH_PARITY_BITS 6
+
+#define RACH_CRC_POLY 0x007b
+
+/*
+* GPRS Channel CODEC specific #defines
+*/
+#define NUM_RACH_GPRS_ADD_BITS 3
+#define NUM_PRACH_PUNCTURE_BITS 6
+#define NUM_PRACH_CRC_IN_BITS 11
+#define GPRS16_CRC_POLY 0x10811
+
+#define NUM_GPRS_CS1_PUNCTURE_BITS 0
+#define NUM_GPRS_CS2_PUNCTURE_BITS 132
+#define NUM_GPRS_CS3_PUNCTURE_BITS 220
+
+#define NUM_GPRS_CS1_PARITY_BITS 40
+#define NUM_GPRS_CS2_PARITY_BITS 16
+#define NUM_GPRS_CS3_PARITY_BITS 16
+#define NUM_GPRS_CS4_PARITY_BITS 16
+
+#define NUM_GPRS_CS1_CRC_IN_BITS 184
+#define NUM_GPRS_CS2_CRC_IN_BITS 274
+#define NUM_GPRS_CS3_CRC_IN_BITS 318
+#define NUM_GPRS_CS4_CRC_IN_BITS 440
+
+#define NUM_GPRS_CS1_CNV_ENC_IN_BITS 228
+#define NUM_GPRS_CS2_CNV_ENC_IN_BITS 294
+#define NUM_GPRS_CS3_CNV_ENC_IN_BITS 338
+#define NUM_GPRS_CS4_CNV_ENC_IN_BITS 456
+
+/*
+* uses largest size for buffer allocation
+*/
+#define MAX_CRC16_TOTAL_BITS (EFR_NUM_TCH_CRC_IN_BITS + EFR_NUM_TCH_PARITY_BITS)
+
+#define MAX_CNV_ENC_IN_BITS (NUM_CCH_CNV_ENC_IN_BITS)
+#define MAX_CNV_ENC_OUT_BITS (NUM_CCH_CNV_ENC_OUT_BITS)
+#define MAX_CNV_DEC_IN_BITS (NUM_CCH_CNV_DEC_IN_BITS)
+#define MAX_CNV_DEC_OUT_BITS (NUM_CCH_CNV_DEC_OUT_BITS)
+#define MAX_PARITY_BITS (NUM_CCH_PARITY_BITS)
+
+#define BSIC_LENGTH (NUM_RACH_PARITY_BITS)
+
+#define NUM_BITS_TCH_CLASSI \
+ (NUM_TCH_CNV_ENC_IN_BITS-NUM_TCH_PARITY_BITS-NUM_CNV_TAIL_BITS)
+#define NUM_BITS_TCH_CLASSII (NUM_BITS_TCH_FRAME-NUM_BITS_TCH_CLASSI)
+#define TCH_REORDER_MAX_INDEX \
+ (NUM_TCH_CNV_ENC_IN_BITS-NUM_CNV_TAIL_BITS-1)
+#define TCH_START_OF_TAIL \
+ (NUM_TCH_CNV_ENC_IN_BITS-NUM_CNV_TAIL_BITS)
+
+#define MAX_STEALING_FLAGS 8
+#define STEALING_FLAG_THRESH 4
+
+/*
+* Fire Decoder Processing States
+*/
+#define NO_ERROR_CORRECT 0 /* no error */
+#define DO_ERROR_CORRECT1 1 /* intermediate error processing */
+#define DO_ERROR_CORRECT2 2 /* begin error processing */
+
+#ifdef ALLOCATE_MEMORY_INTERNAL /*-------------------------------------------*/
+
+/*
+* Preliminary channel encoder (for EFR TCH CRC calculation) index mapping table
+*/
+const Uint8 tch_Efr_CRC_calc_LookUpTbl[EFR_NUM_TCH_CRC_IN_BITS] =
+{
+ /*
+ * taken from GSM 05.03 (v5.5.0) section 3.1.1.1
+ */
+ 39-1, 40-1, 41-1, 42-1, 43-1, 44-1, 48-1, 87-1, 45-1, 2-1,
+ 3-1, 8-1, 10-1, 18-1, 19-1, 24-1, 46-1, 47-1, 142-1, 143-1,
+ 144-1, 145-1, 146-1, 147-1, 92-1, 93-1, 195-1, 196-1, 98-1, 137-1,
+ 148-1, 94-1, 197-1, 149-1, 150-1, 95-1, 198-1, 4-1, 5-1, 11-1,
+ 12-1, 16-1, 9-1, 6-1, 7-1, 13-1, 17-1, 20-1, 96-1, 199-1,
+ 1-1, 14-1, 15-1, 21-1, 25-1, 26-1, 28-1, 151-1, 201-1, 190-1,
+ 240-1, 88-1, 138-1, 191-1, 241-1
+};
+
+/*
+* GPRS Prach Puncturing Consts
+*/
+const Uint8 GPRSPrachPunctureBits[NUM_PRACH_PUNCTURE_BITS] = {0,2,5,37,39,41};
+
+#else /*--------------------------------------------------------------------*/
+
+extern const Uint8 tch_Efr_CRC_calc_LookUpTbl[EFR_NUM_TCH_CRC_IN_BITS];
+extern const Uint8 GPRSPrachPunctureBits[NUM_PRACH_PUNCTURE_BITS];
+
+#endif /*--------------------------------------------------------------------*/
+
+/*
+* Define the "non top level" function prototypes
+*/
+void cnvEncoder2 (const Char *u, Char *c, UInt numBits);
+Short cnvDecoder2 (const Char *c, Char *u, UInt numBits);
+
+void crcEncoder16(Int8 *inputPtr, Int8 *parityPtr, UInt poly,
+ Int8 numParityBits, Uint16 numSigBits, Uint16 bitInvert);
+Bool crcDecoder16(Char *inputPtr, Char *parityPtr, UInt poly,
+ Int8 numParityBits, Uint16 numSigBits, Uint16 bitInvert);
+
+Bool fireDecoderCCHDetect (Uint8 rfCh, Uint8 timeSlot, t_chanSel chanSel, Char *inputPtr);
+Bool fireDecoderCCHCorrect (Char *inputPtr);
+
+void crcEncoderCCH (Char *inputPtr, Char *parPtr);
+Bool crcDecoderCCH (Char *inputPtr, Char *parityPtr);
+
+void crcEncoderTCH (Char *inputPtr, Char *parPtr);
+Bool crcDecoderTCH (Char *inputPtr, Char *parityPtr);
+
+Bool crcDecoderEfrTCH(Char *inputPtr, Char *parityPtr);
+
+void crcEncoderRACH (Char *inputPtr, Char *parPtr);
+Bool crcDecoderRACH (Char *inputPtr, Char *parityPtr);
+
+void crcEncoderSCH(Char *inputPtr, Char *parPtr);
+
+void blockRectInterleaver(Char *input, Int *burstIndex,
+ Char output[NUM_BURSTS_PER_CCH_BLOCK][NB_NUM_ENCRYPT_BITS_PER_BURST]);
+
+UInt blockRectDeinterleaver(Char input[NUM_BURSTS_PER_CCH_BLOCK][NB_NUM_ENCRYPT_BITS_PER_BURST],
+ Int *burstIndex, Char *output);
+
+void blockDiagInterleaver8( Char* input, Bool stealFlag, Int *burstIndex,
+ Char output[NUM_BURSTS_PER_TCH_BLOCK][NB_NUM_ENCRYPT_BITS_PER_BURST]);
+
+UInt blockDiagDeinterleaver8( Char input[NUM_BURSTS_PER_TCH_BLOCK][NB_NUM_ENCRYPT_BITS_PER_BURST],
+ Int *burstIndex, Char* output);
+
+void deinterleaverLoader(t_chanSel chanSel, UInt TN, Bool frameBoundary);
+
+void burstLoader(t_chanSel chanSel, UInt TN, Bool frameBoundary);
+
+void loadInt4Deep(Char CCHIntOutData[NUM_BURSTS_PER_CCH_BLOCK][NB_NUM_ENCRYPT_BITS_PER_BURST],
+ UInt TN);
+
+void sbjEncoder(Char* inputPtr, t_vocAlgo vocoAlgo);
+Bool sbjDecoder(Char* inputPtr, t_vocAlgo vocoAlgo, Uint8 timeSlot);
+
+Bool detectBFI(t_chanSel chanSel, Bool parityError, UInt decoderMetric,
+ UInt totalErrors, Bool *perceptualMask);
+
+void vitgsm(int n, short old[], short new_s[],
+ short trans[], short m[], char sd[], char so[]);
+
+void punctureGPRS(Char *in, Char *out, const codeScheme);
+void restorePunctureGPRS(Char *in, Char *out, const codeScheme);
+
+UInt shiftZeros(UInt regOutSave);
+
+
+
+#endif /* end of include once only */
+
+
+
+
+ \ No newline at end of file
diff --git a/data/mnet/GP10/Dsp/bbdataproc/chcodec/codecs.c b/data/mnet/GP10/Dsp/bbdataproc/chcodec/codecs.c
new file mode 100644
index 0000000..ac22d3c
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/chcodec/codecs.c
@@ -0,0 +1,1709 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+** Filename: codecs.c
+**
+** Description:
+** This file contains low level encoding and decoding routines in support
+** of GSM channel coding and decoding.
+**
+** Note: Old revision notes are stored at the bottom of this file.
+**
+*****************************************************************************/
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "bbproto.h"
+#include "codec.h"
+#include "dsprotyp.h"
+
+/*
+* Align these metric arrays on 32-bit boundaries so we can accessed as Int.
+* These are used by the cnvEncoder2 function below. Declare here because
+* DATA_ALIGN is not valid on static arrays defined inside the function.
+*/
+#pragma DATA_ALIGN(oldMets, 4);
+#pragma DATA_ALIGN(newMets, 4);
+static Short oldMets[16];
+static Short newMets[16];
+
+/*
+* Temporary variables for debug?
+*/
+#pragma DATA_SECTION(perfectCchFrames, ".extData");
+Int32 perfectCchFrames = 0;
+#pragma DATA_SECTION(correctedCchFrames, ".extData");
+Int32 correctedCchFrames = 0;
+#pragma DATA_SECTION(uncorrectedCchFrames, ".extData");
+Int32 uncorrectedCchFrames = 0;
+#pragma DATA_SECTION(preUncorrectedCchFrames, ".extData");
+Int32 preUncorrectedCchFrames = 0;
+#pragma DATA_SECTION(badCchBits, ".extData");
+Int32 badCchBits = 0;
+#pragma DATA_SECTION(correctedCchBits, ".extData");
+Int32 correctedCchBits = 0;
+
+/*****************************************************************************
+** ROUTINE NAME: codecInit
+*****************************************************************************/
+void codecInit(void)
+{
+ g_ULCCHFireData.fireStatus = NO_ERROR_CORRECT;
+}
+
+/*****************************************************************************
+** ROUTINE NAME: cnvEncoder2
+**
+** Description:
+** Rate 1/2 convolutional encoder routine used in GSM. Uses the following
+** generator polynimials.
+**
+** g0 = 1 + D3 + D4
+** g1 = 1 + D + D3 + D4
+**
+** The order of the bits within the arrays is consistent the GSM
+** specification format, in that array index k stores u(k)/c(k).
+**
+** Method:
+** Since the modulo operation is very expensive and is a power of 2,
+** a bitwise AND operation will be used to implement the mod 2
+** function. The following two lines of code are equivalent (for
+** MODULO_2_MASK = 0x0001):
+**
+** c[7] = (u[3] + u[2] + u[0]) % 2;
+** c[7] = (u[3] + u[2] + u[0]) & MODULO_2_MASK;
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** u - input bit array
+** c - output but array
+** numBits - number of input bits to encode
+**
+** Returns:
+** None
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+void cnvEncoder2(const Char *u,Char *c, UInt numBits)
+{
+ UInt i;
+
+ c[0] = u[0] & MODULO_2_MASK;
+ c[1] = u[0] & MODULO_2_MASK;
+ c[2] = u[1] & MODULO_2_MASK;
+ c[3] = (u[1] + u[0]) & MODULO_2_MASK;
+ c[4] = u[2] & MODULO_2_MASK;
+ c[5] = (u[2] + u[1]) & MODULO_2_MASK;
+ c[6] = (u[3] + u[0]) & MODULO_2_MASK;
+ c[7] = (u[3] + u[2] + u[0]) & MODULO_2_MASK;
+
+ for(i=4; i < numBits; i++)
+ {
+ c[2*i] = (u[i] + u[i-3] + u[i-4]) & MODULO_2_MASK;
+ c[2*i+1] = (u[i] + u[i-1] + u[i-3] + u[i-4]) & MODULO_2_MASK;
+ }
+}
+
+/*****************************************************************************
+** ROUTINE NAME: cnvDecoder2
+**
+** Description:
+** Rate 1/2 convolutional decoder routine used in GSM. Uses the following
+** generator polynimials.
+**
+** g0 = 1 + D3 + D4
+** g1 = 1 + D + D3 + D4
+**
+** K (constraint length) = 5
+** 2^(K-1) = 16 (number of states required)
+**
+** The order of the bits within the arrays is consistent the GSM
+** specification format, in that array index k stores u(k)/c(k).
+**
+** Method:
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** c - recieved coded bit array
+** u - output decoded bit array
+** numBits - Number of bits to decode
+**
+** Returns:
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+Short cnvDecoder2(const Char *c, Char *u, UInt numBitsOut)
+{
+ Int oldMet;
+ Short *newMetsPtr, *oldMetsPtr, *tmpPtr;
+ Short branchMet; /* branch metric */
+ Short val1, val2, val3, val4;
+ Short i,j,l;
+
+ Int16 m[8];
+
+#ifdef NOT_ASM_OPTIMIZED
+#define INITVAL 0xEC78
+ Char stateTranTbl[228][16]; /* state transition table, non-opt */
+ /*
+ * Need to replace the above line of C-Code with the following commented out line of code when..
+ * ..porting the non-optimized C-code to another DSP platform...the current on-chip data ram space
+ * ..isn't big enough to support the larger size array
+ *
+ * Char stateTranTbl[NUM_GPRS_CS3_CNV_ENC_IN_BITS][16]; /* state transition table, non-opt */
+ */
+#else
+#define INITVAL 0x0000
+ Short stateTranTbl[NUM_GPRS_CS3_CNV_ENC_IN_BITS]; /* state transition table, opt version */
+#endif
+
+ oldMetsPtr = &oldMets[0];
+ newMetsPtr = &newMets[0];
+
+ /*
+ * Old metrics initialized with initial values
+ * hpines...5/28/99..all states initially = 0...undo "start at 1 mod"
+ */
+/* *(Int *)&oldMets[0] = INITVAL; */
+ for(i=0; i<8; i++) /*** what is the intent here? start at 1 okay? ***/
+ {
+ *(Int *)&oldMets[2*i] = (INITVAL<<16) | INITVAL;
+ };
+
+ /*---------------------- Start of Non-Optimized Version --------------------------*/
+#ifdef NOT_ASM_OPTIMIZED
+
+ /*
+ * Perform outer loop numBitsOut times, 2 input bits are read for each iteration.
+ * The index j indexes the input signal c.
+ */
+ for(j=0; j<numBitsOut; j++)
+ {
+ /*
+ * Perform inner loop num_states/2 times, one iteration for each butterfly in
+ * the trellis.
+ * i indexes the bufferfly and states
+ * l indexes the expected encoder output for each butterfly
+ * j indexes the recieved bits c
+ */
+ for(i=0,l=0; i<8; i++,l+=2)
+ {
+ /*
+ * Compute the branch metric branchMet. This is a measure of similarity of the
+ * recieved bits to the expected bits. Note that for any butterfly, the output encoded
+ * data is as follows. These arrays represent the coded data output from state transitions
+ * on the rate 1/2 encoder trellis diagram. The first bit pair represents
+ * the data for the first butterfly, and so on, for all 8 butterflies of
+ * the rate 1/2 trellis. The 1st set is used with the demod if the demod
+ * delivers sign inverted soft decisions to the channel decoder. Other-
+ * wise, the 2nd set is used.
+ *
+ * expData = {1,1, -1,-1, 1,1, -1,-1, 1,-1, -1,1, 1,-1, -1,1};
+ * -OR- expData = {-1,-1, 1,1, -1,-1, 1,1, -1,1, 1,-1, -1,1, 1,-1};
+ *
+ * -branchMet[i] = c[2*j]*(-expData[l]) + c[2*j+1]*(-expData[l+1]);
+ */
+ branchMet = c[2*j] + ((l&0x8) ? -c[2*j+1] : c[2*j+1]);
+ branchMet = (l&0x2) ? -branchMet : branchMet;
+
+ /*
+ * Eliminate the smallest path, retain the survior path. stateTranTbl[k][i]
+ * stores the LSB of the state number. This information determines
+ * from which of the two previous states (in the butterfly) you transitioned
+ * to the current state. This information is used in the backtracking.
+ */
+ oldMet = *(Int *)&oldMetsPtr[l];
+
+ /*
+ * Compute the cumulative path metrics up to the current state
+ */
+#ifdef _LITTLE_ENDIAN
+ val1 = (Short)(oldMet) + branchMet;
+ val2 = (Short)(oldMet>>16) - branchMet;
+ val3 = (Short)(oldMet) - branchMet;
+ val4 = (Short)(oldMet>>16) + branchMet;
+#else
+ val1 = (Short)(oldMet>>16) + branchMet;
+ val2 = (Short)(oldMet) - branchMet;
+ val3 = (Short)(oldMet>>16) - branchMet;
+ val4 = (Short)(oldMet) + branchMet;
+#endif
+ newMetsPtr[i] = (stateTranTbl[j][i]=(val2>val1)) ? val2 : val1;
+ newMetsPtr[i+8] = (stateTranTbl[j][i+8]=(val4>val3)) ? val4 : val3;
+ }
+
+ /*
+ * Metrics update
+ */
+ tmpPtr = oldMetsPtr;
+ oldMetsPtr = newMetsPtr;
+ newMetsPtr = tmpPtr;
+ }
+
+ /*
+ * Write the 4 known tail bits to the end of the buffer
+ */
+ for(i=numBitsOut-4; i<numBitsOut; i++)
+ {
+ u[i] = 0;
+ }
+
+ /*
+ * Perform the backtracking and decisions. numBitsOut-4 bits will be written
+ * to u[0..numBitsOut-5]. u[numBitsOut-4..numBitsOut] is not written since
+ * this is "0" tail bits and need not be written. It is assummed that these
+ * locations in the output buffer have already been initialized.
+ */
+ for(i=numBitsOut-1,j=0; i>=4; i--)
+ {
+ /*
+ * stateTranTbl[i][j] is actually the LSB of the state number. The observation here
+ * is that this LSB, delayed by 4 units, will appear as the output.
+ */
+ u[i-4] = stateTranTbl[i][j];
+
+ /*
+ * Decide which of the two states to backtrack to based on the state LSB
+ * (stateTranTbl[i][j])
+ */
+ j= ((j<<1) + stateTranTbl[i][j]) & 0x0F;
+ }
+ oldMets[0] -= INITVAL; /* restore accum metric baseline to 0 */
+
+ /*---------------- Start of Assembly Optimized Version ---------------------*/
+#else
+
+ vitgsm((int)numBitsOut,
+ (short*)(&oldMets[0]),
+ (short*)(&newMets[0]),
+ &stateTranTbl[0],
+ &m[0],
+ (char*) (&c[0]),
+ &u[0]);
+
+/*
+* 7/5/00...swap oldMets/newMets pointers if odd # input samples
+*/
+ if(numBitsOut & 1)
+ oldMets[0] = newMets[0] - INITVAL; /* restore accum metric baseline to 0 */
+ else
+ oldMets[0] -= INITVAL; /* restore accum metric baseline to 0 */
+
+#endif
+
+ /*--------------------------------------------------------------------------*/
+
+ return(oldMets[0]);
+}
+
+
+/*****************************************************************************
+** ROUTINE NAME: crcEncoder16
+**
+** Description:
+** Performs the Binary Cyclic Encoding (Block Encoding) used in GSM.
+** The input data and parity bit array used by this routine are assummed
+** in the following format with respect to bit order within the array:
+**
+** polynomial power D^N-1 D^N-2 ...... D^2 D 1
+** data/parity bits u(0) u(1) ...... u(N-3) u(N-2) u(N-1)
+** array index 0 1 ...... N-3 N-2 N-1
+**
+** Method:
+** Performs the CCH block coding as described in GSM 05.03.
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** inputPtr - indexes the input bit array
+** parityPtr - indexes the array to store the calculated parity bits
+**
+** Returns:
+** parityPtr - indexes the parity bits that are calculated by the routine
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+void crcEncoder16(Int8 *inputPtr, Int8 *parityPtr, UInt poly,
+ Int8 numParityBits, Uint16 numSigBits, Uint16 bitInvert)
+{
+ UInt i;
+ UInt regIn;
+ UInt regOut;
+ UInt result;
+ UInt bit;
+ UInt shiftedBit;
+ Uint16 numBits;
+ Char output;
+ Char input[NUM_GPRS_CS4_CNV_ENC_IN_BITS];
+
+ numBits = numSigBits + numParityBits;
+ /*
+ * Multiply the input data polynomial by D^numParityBits. This basically
+ * amounts to appending numParityBits "0s" to the tail of the vector.
+ */
+ for(i=0; i<numSigBits; i++)
+ {
+ input[i] = inputPtr[i];
+ }
+
+ for(i=numSigBits; i<numBits; i++)
+ {
+ input[i] = 0;
+ }
+
+#ifdef NOT_ASM_OPTIMIZED
+
+ /*
+ * Init the register outputs to zero
+ */
+ regOut = 0x0000;
+
+ /*
+ * Or in the first data bit
+ */
+ bit = input[0] << numParityBits;
+ regOut |= bit;
+
+ /*
+ * Loop over all bits in the input vector ( D^N d(D), N = numParityBits )
+ */
+ for(i=0; i<numSigBits + numParityBits; i++)
+ {
+ output = regOut & 0x0001;
+
+ result = poly * output;
+
+ regIn = result ^ regOut;
+
+ regOut = regIn >> 1;
+
+ bit = input[i+1] << numParityBits;
+
+ regOut |= bit;
+ }
+
+#else
+ /*
+ * Use Optimized Assembly routine to do the encoding...
+ * compute shifted input bit mask
+ */
+ shiftedBit = 1 << numParityBits;
+
+ /*
+ * Loop over all bits in the input vector ( D^N d(D), N = numParityBits )
+ */
+
+ regOut = crcShiftReg(&input[0],numBits,shiftedBit,poly);
+
+#endif
+
+ /*
+ * Return inverted parity bits, modulo 2 added with bsic.
+ * Note that the bsic is stored in the reverse order relative to
+ * the parity bits.
+ */
+ regOut ^= bitInvert;
+
+ for(i=0; i<numParityBits; i++)
+ {
+ bit = (regOut >> i) & 0x0001;
+ parityPtr[i] = (Char)(bit);
+ }
+}
+
+/*****************************************************************************
+** ROUTINE NAME: crcDecoder16
+**
+** Description:
+** Performs the Binary Cyclic Encoding (Block Encoding) used in GSM.
+** The input data and parity bit array used by this routine are assummed
+** in the following format with respect to bit order within the array:
+**
+** polynomial power D^N-1 D^N-2 ...... D^2 D 1
+** data/parity bits u(0) u(1) ...... u(N-3) u(N-2) u(N-1)
+** array index 0 1 ...... N-3 N-2 N-1
+**
+** Method:
+** Performs the CCH block coding as described in GSM 05.03.
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** inputPtr - indexes the input bit array
+** parityPtr - indexes the array to store the calculated parity bits
+**
+** Returns:
+** parityPtr - indexes the parity bits that are calculated by the routine
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+Bool crcDecoder16(Char *inputPtr, Char *parityPtr, UInt poly,
+ Int8 numParityBits, Uint16 numSigBits, Uint16 bitInvert)
+{
+ Uint8 i;
+ Int8 genParityBits[16];
+ Bool parityError = 0;
+
+ /*
+ * Perform the crc encoding to calculate the parity based on the recieved
+ * bits. The calculated parity is stored in calParity array.
+ */
+ crcEncoder16(inputPtr, genParityBits, poly, numParityBits, numSigBits, bitInvert);
+
+ /*
+ * Compare recieved parity to calculated parity
+ */
+ for(i=0; i<numParityBits; i++)
+ {
+ if(genParityBits[i] != parityPtr[i])
+ {
+ parityError = TRUE;
+ break;
+ }
+ }
+
+ return(parityError);
+}
+
+/*****************************************************************************
+** ROUTINE NAME: crcEncoderCCH
+**
+** Description:
+** Performs the CCH Binary Cyclic Encoding (Block Encoding) used in GSM.
+** The input data and parity bit array used by this routine are assummed
+** in the following format with respect to bit order within the array:
+**
+** polynomial power D^N-1 D^N-2 ...... D^2 D 1
+** data/parity bits u(0) u(1) ...... u(N-3) u(N-2) u(N-1)
+** array index 0 1 ...... N-3 N-2 N-1
+**
+** Method:
+** Performs the CCH block coding as described in GSM 05.03.
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** inputPtr - indexes the input bit array
+** parityPtr - indexes the array to store the calculated parity bits
+**
+** Returns:
+** parityPtr - indexes the parity bits that are calculated by the routine
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+void crcEncoderCCH(Char *inputPtr, Char *parityPtr)
+{
+ UInt i;
+ UInt regIn[2];
+ UInt regOut[2];
+ UInt result[2];
+ const UInt poly[2] = {0x00824001, 0x00000120};
+ UInt bit;
+ UShort output;
+ Char input[NUM_CCH_CRC_IN_BITS+NUM_CCH_PARITY_BITS];
+ Uint16 numBits;
+ UInt shiftedBit;
+
+ numBits = NUM_CCH_CRC_IN_BITS+NUM_CCH_PARITY_BITS;
+
+
+ /*
+ * Multiply the input data polynomial by D^numParityBits. This basically
+ * amounts to appending numParityBits "0s" to the tail of the vector.
+ */
+ for(i=0; i<NUM_CCH_CRC_IN_BITS; i++)
+ {
+ input[i] = inputPtr[i];
+ }
+
+ for(i=NUM_CCH_CRC_IN_BITS; i<NUM_CCH_CRC_IN_BITS + NUM_CCH_PARITY_BITS; i++)
+ {
+ input[i] = 0;
+ }
+
+#ifdef NOT_ASM_OPTIMIZED
+
+ /*
+ * Init the register outputs to zero
+ */
+ regOut[0] = 0x00000000;
+ regOut[1] = 0x00000000;
+
+ /*
+ * Or in the first data bit
+ */
+ bit = input[0] << (NUM_CCH_PARITY_BITS-32);
+ regOut[1] |= bit;
+
+ /*
+ * Loop over all bits in the input vector ( D^N d(D), N = numParityBits )
+ */
+ for(i=0; i<NUM_CCH_CRC_IN_BITS + NUM_CCH_PARITY_BITS; i++)
+ {
+ output = regOut[0] & 0x00000001;
+
+ result[0] = poly[0] * output;
+ result[1] = poly[1] * output;
+
+ regIn[0] = result[0] ^ regOut[0];
+ regIn[1] = result[1] ^ regOut[1];
+
+ regOut[0] = (regIn[0] >> 1);
+ bit = (regIn[1]) << 31;
+ regOut[0] |= bit;
+
+ regOut[1] = (regIn[1] >> 1);
+ bit = (input[i+1]) << (NUM_CCH_PARITY_BITS-32);
+ regOut[1] |= bit;
+ }
+
+#else
+
+ /*
+ * Use Optimized Assembly routine to do the encoding...
+ * compute shifted input bit mask
+ */
+ shiftedBit = 1 << (NUM_CCH_PARITY_BITS-32);
+
+ /*
+ * Loop over all bits in the input vector ( D^N d(D), N = numParityBits )
+ */
+
+ crcLongShiftReg(&input[0],shiftedBit,numBits,poly[0],poly[1],&regOut[0]);
+
+#endif
+
+ /*
+ * Return inverted parity bits
+ */
+ regOut[0] ^= 0xffffffff;
+ regOut[1] ^= 0xffffffff;
+
+ for(i=0; i<32; i++)
+ {
+ bit = (regOut[0]>>i) & 0x00000001;
+ parityPtr[i] = (Char)bit;
+ }
+
+ for(i=0; i<NUM_CCH_PARITY_BITS-32; i++)
+ {
+ bit = (regOut[1]>>i) & 0x00000001;
+ parityPtr[32+i] = (Char)bit;
+ }
+
+}
+
+/*****************************************************************************
+** ROUTINE NAME: ulCCHFireDecoder
+**
+** Description:
+** Looks for correctable FireCoded data errors using method described in patent #CPOL 89101
+**
+*****************************************************************************/
+void ulCCHFireDecoder(void)
+{
+ UInt i;
+ Int8 rfChFire;
+ Uint8 subChan;
+ Uint8 timeSlotFire,chType;
+ Bool error;
+
+ error = fireDecoderCCHCorrect((Char*)(&g_ULCCHFireData.data));
+ /*
+ * pack frame and finish bookkeeping if fire decoder processing all done and all
+ * errors are corrected
+ */
+ if(! error )
+ {
+ rfChFire = g_ULCCHFireData.rfCh;
+ timeSlotFire = g_ULCCHFireData.timeslot;
+ subChan = g_ULCCHFireData.subChan;
+ chType = g_ULCCHFireData.chType;
+
+ /*
+ * move corrected frame to CCCH decoder buffer
+ */
+ for(i=0; i<NUM_BITS_CCH_FRAME; i++)
+ {
+ g_ULCCHData.data[i] = g_ULCCHFireData.data[i];
+ }
+ /*
+ * set decoder status and flags
+ */
+ g_ULCCHData.ulcchword0.bitval.fireStatus = 0;
+ g_ULCCHData.ulcchword0.bitval.bufferValid = TRUE;
+ ulSyncMsgProcess(chType, subChan, timeSlotFire, rfChFire);
+ }
+}
+
+/*****************************************************************************
+** ROUTINE NAME: fireDecoderCCHDetect
+**
+** Description:
+** Looks for correctable FireCoded data errors using method described in patent #CPOL 89101
+**
+** Method:
+** Reference method described in patent #CPOL 89101
+**
+** Parameter I/O:
+** inputPtr - indexes the input bit array
+** g_ULCCHFireData - Data structure used for fire decoder processing
+** Returns:
+** Error - Flag indicating detection of a correctable error
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+Bool fireDecoderCCHDetect(Uint8 rfCh, Uint8 timeSlot, t_chanSel chanSel, Char *inputPtr)
+{
+ t_TNInfo *ts;
+ UInt k,kk,kkk;
+ UInt i,j,index;
+ UInt regIn,regIn1;
+ UInt regOut,regOut1,regOutSave;
+ UInt result,result1,result2;
+ const UInt poly1 = 0x24001;
+ const UInt poly = 0x800001;
+ const Int mult1 = 0x7fffd;
+ const Int mult2 = 0x7fffc;
+ Int32 lambda1, lambda2;
+ UInt bit,bit1;
+ Long resulta, resultb;
+ UShort output,output1;
+ Bool Error,noCorrectFrame;
+ Char input[NUM_CCH_CRC_IN_BITS+NUM_CCH_PARITY_BITS+2];
+
+ noCorrectFrame = 0;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ g_ULCCHFireData.rfCh = rfCh;
+ g_ULCCHFireData.timeslot = timeSlot;
+ g_ULCCHFireData.chType = chanSel;
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_5:
+ if(chanSel == SDCCH4)
+ g_ULCCHFireData.subChan = ts->u.group5.ulSdcchSubCh;
+ else
+ g_ULCCHFireData.subChan = ts->u.group5.ulSacchSubCh;
+ break;
+
+ default:
+ g_ULCCHFireData.subChan = 0;
+ break;
+ }
+
+#define RANDOM_TEST 0
+#if RANDOM_TEST == 2
+ k = (rand() & 0x7f);
+ kk = (rand() & 0x1f);
+ kkk = (rand() & 0x7) + 5;
+ result2 = k + kk;
+ for(i=0; i < kkk; i++)
+ {
+ inputPtr[i+k+kk] ^= 1;
+ badCchBits++;
+ }
+#endif
+
+ /*
+ * Multiply the input data polynomial by D^numParityBits. This basically
+ * amounts to appending numParityBits "0s" to the tail of the vector.
+ */
+ for(i=0; i<NUM_CCH_CRC_IN_BITS; i++)
+ {
+ input[i] = inputPtr[i];
+ }
+
+/* invert parity bits to compensate for encoder */
+
+ for(i=0; i<NUM_CCH_PARITY_BITS; i++)
+ {
+ input[i+NUM_CCH_CRC_IN_BITS] = inputPtr[i+NUM_CCH_CRC_IN_BITS] ^ 1 ;
+ }
+
+/* add 1 shortened 0 bit */
+
+ input[NUM_CCH_CRC_IN_BITS+NUM_CCH_PARITY_BITS] = 0 ;
+
+ /*
+ * Init the register outputs to zero
+ */
+ regOut = 0x00000000;
+ regOut1 = 0x00000000;
+
+ /*
+ * Or in the first data bit
+ */
+
+ bit = input[0] << 23;
+ regOut |= bit;
+ bit1 = input[0] << 17;
+ regOut1 |= bit1;
+
+ /*
+ * Loop over all bits in the input vector ( D^N d(D), N = numParityBits )
+ */
+ for(i=0; i<(NUM_CCH_CRC_IN_BITS + NUM_CCH_PARITY_BITS ); i++)
+ {
+
+ output = regOut & 0x0001;
+ output1 = regOut1 & 0x0001;
+ result = poly * output;
+ result1 = poly1 * output1;
+ regIn = result ^ regOut;
+ regIn1 = result1 ^ regOut1;
+ regOut = regIn >> 1;
+ regOut1 = regIn1 >> 1;
+ bit = input[i+1] << 23;
+ bit1 = input[i+1] << 17;
+ regOut |= bit;
+ regOut1 |= bit1;
+ }
+/* break here, i.e. no errors detected, if both syndrome registers = 0 */
+ if((regOut == 0) && (regOut1 == 0))
+ {
+ noCorrectFrame = TRUE;
+ perfectCchFrames++;
+ Error = 0;
+ }
+ else
+ /* break here if error pattern > 12 bits long */
+ {
+ Error = TRUE;
+ lambda1 = 0;
+ regOutSave = regOut;
+ for(j=0; j < 23; j++)
+ {
+ if((regOutSave & 0xfff) != 0x800)
+ {
+ output = regOutSave & 0x0001;
+ result = poly * output;
+ regIn = result ^ regOutSave;
+ regOutSave = regIn >> 1;
+ }
+ else
+ {
+ lambda1 = j;
+ break;
+ }
+ }
+ if((regOutSave & 0xfff) == 0x800)
+ lambda1 = 23;
+
+ /* no can do error correction */
+ if(lambda1 == 0)
+ {
+ noCorrectFrame = TRUE;
+ preUncorrectedCchFrames++;
+ sendDiagMsg(0x63, rfCh, timeSlot, 0, &rfCh); /* 5th arg to satisy prototype */
+ }
+
+ }
+/* correctable error detected...buffer data for later correction */
+ if(noCorrectFrame != TRUE)
+ {
+ g_ULCCHFireData.fireStatus = DO_ERROR_CORRECT2;
+ g_ULCCHFireData.errorPatternReg = regOut;
+ g_ULCCHFireData.errorLocationReg = regOut1;
+ for(i=0; i<NUM_BITS_CCH_FRAME; i++)
+ {
+ g_ULCCHFireData.data[i] = inputPtr[i];
+ }
+ }
+ return(Error);
+}
+
+/*****************************************************************************
+** ROUTINE NAME: fireDecoderCCHCorrect
+**
+** Description:
+** Attempts to correct FireCoded data errors using method described in patent #CPOL 89101
+** Processing performed over two consecutive frames of inactive radio channel timeslots
+** Parameter I/O:
+** inputPtr - indexes the input bit array
+** g_ULCCHFireData - Data structure used for fire decoder processing
+** Returns:
+** Error - flag to indicate whether or not error was correctable
+** corrected bits in input bit array
+*****************************************************************************/
+Bool fireDecoderCCHCorrect(Char *inputPtr)
+{
+ UInt k,kk,kkk;
+ UInt i,j,index;
+ UInt regIn,regIn1;
+ UInt regOut,regOut1,regOutSave;
+ UInt result,result1,result2;
+ const UInt poly1 = 0x24001;
+ const UInt poly = 0x800001;
+ const Int mult1 = 0x7fffd;
+ const Int mult2 = 0x7fffc;
+ Int32 lambda1, lambda2;
+ UInt bit,bit1;
+ Long resulta, resultb;
+ UShort output,output1;
+ Bool Error,noCorrectFrame;
+ Char input[NUM_CCH_CRC_IN_BITS+NUM_CCH_PARITY_BITS+2];
+ UInt fireDecoderStatus;
+
+ Int8 rfChFire;
+ Uint8 timeSlotFire;
+ t_TNInfo *ts;
+ t_SACCHInfo *sacchInfo;
+
+
+ /*
+ * Return value set as TRUE initially
+ */
+ Error = TRUE;
+
+/* shift in shortened bits */
+/* new 2/28/00...break into two calls */
+
+ fireDecoderStatus = g_ULCCHFireData.fireStatus ;
+ switch(fireDecoderStatus)
+ {
+ case DO_ERROR_CORRECT2:
+ {
+#ifdef NOT_ASM_OPTIMIZED
+ regOut1 = g_ULCCHFireData.errorLocationReg;
+ for(i=0; i < (65424 - 1); i++)
+ {
+ output1 = regOut1 & 0x0001;
+ result1 = poly1 * output1;
+ regIn1 = result1 ^ regOut1;
+ regOut1 = regIn1 >> 1;
+ }
+#else
+ regOutSave = g_ULCCHFireData.errorLocationReg;
+ regOut1 = shiftZeros(regOutSave);
+#endif
+
+ g_ULCCHFireData.errorLocationReg = regOut1;
+ fireDecoderStatus = DO_ERROR_CORRECT1;
+ break;
+ }
+
+ case DO_ERROR_CORRECT1:
+ {
+#ifdef NOT_ASM_OPTIMIZED
+ regOut1 = g_ULCCHFireData.errorLocationReg;
+ for(i=0; i < (65423 - 1); i++)
+ {
+ output1 = regOut1 & 0x0001;
+ result1 = poly1 * output1;
+ regIn1 = result1 ^ regOut1;
+ regOut1 = regIn1 >> 1;
+ }
+#else
+ regOutSave = g_ULCCHFireData.errorLocationReg;
+ regOut1 = shiftZeros(regOutSave);
+#endif
+
+ fireDecoderStatus = NO_ERROR_CORRECT; /* restore fire decoder status */
+ regOut = g_ULCCHFireData.errorPatternReg;
+ for(i=0; i < 22; i++)
+ {
+ output = regOut & 0x0001;
+ result = poly * output;
+ regIn = result ^ regOut;
+ regOut = regIn >> 1;
+ }
+ for(j=0; j < 23; j++)
+ {
+ if((regOut & 0xfff) != 0x800)
+ {
+ output = regOut & 0x0001;
+ result = poly * output;
+ regIn = result ^ regOut;
+ regOut = regIn >> 1;
+ }
+ else
+ {
+ lambda1 = j;
+ regOut = regOut >> 6;
+ break;
+ }
+ }
+
+ lambda2 = 0;
+ for(i=0; i < 239; i++)
+ {
+ if((regOut1 & 0x1fffe) != regOut)
+ {
+ output1 = regOut1 & 0x0001;
+ result1 = poly1 * output1;
+ regIn1 = result1 ^ regOut1;
+ regOut1 = regIn1 >> 1;
+ }
+ else
+ {
+ lambda2 = i;
+ break;
+ }
+ }
+ if(lambda2 == 0)
+ {
+ /* no can do error correction */
+ uncorrectedCchFrames++;
+/* new 7/6/00..correct accum fer diag for fire decoder failure to correct */
+ rfChFire = g_ULCCHFireData.rfCh;
+ timeSlotFire = g_ULCCHFireData.timeslot;
+ ts = & g_BBInfo[rfChFire].TNInfo[timeSlotFire];
+ sacchInfo = & ts->u.group1.sacch;
+ sacchInfo->frameErrorAccum += 1;
+ }
+/* do error correction */
+ else
+ {
+ Error = FALSE;
+ correctedCchFrames++;
+ if(lambda2 < 197)
+ {
+ index = lambda2 - 0xd;
+ bit = 0x20;
+ for(i=0; i < 12; i++)
+ {
+ if((regOut1 & bit) != 0)
+ {
+ inputPtr[i+index] ^= 1;
+ correctedCchBits++;
+ }
+ bit = bit << 1;
+ }
+ }
+ }
+
+ sendDiagMsg(0x64, g_ULCCHFireData.rfCh, g_ULCCHFireData.timeslot, 1, & Error);
+
+ } /* end case */
+
+ } /* end switch */
+ g_ULCCHFireData.fireStatus = fireDecoderStatus;
+ return(Error);
+}
+
+/*****************************************************************************
+** ROUTINE NAME: crcDecoderCCH
+**
+** Description:
+** Performs the Binary Cyclic Decoding (Block Decoding) used in GSM.
+** The input data and parity bit arrays used by this routine are assummed
+** in the following format with respect to bit order within the array:
+**
+** polynomial power D^N-1 D^N-2 ...... D^2 D 1
+** data/parity bits u(0) u(1) ...... u(N-3) u(N-2) u(N-1)
+** array index 0 1 ...... N-3 N-2 N-1
+**
+** Method:
+** Performs the block decoding as described in GSM 05.03.
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** inputPtr - indexes the input bit+parity array
+** parityPtr - indexes the array to store the calculated parity bits
+**
+** Returns:
+** parityPtr - indexes the parity bits that are calculated by the routine
+** parityError - TRUE indicates that a parity error has been detected
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+Bool crcDecoderCCH(Char *inputPtr, Char *parityPtr)
+{
+ UInt i;
+ Bool parityError;
+
+ parityError = 0;
+ crcEncoderCCH(inputPtr, parityPtr);
+
+ /*
+ * Compare recieved parity to calculated parity
+ */
+ for(i=0; i<NUM_CCH_PARITY_BITS; i++)
+ {
+ if(inputPtr[i+NUM_CCH_CRC_IN_BITS] != parityPtr[i])
+ {
+ parityError = TRUE;
+ }
+ }
+ return(parityError);
+}
+
+#define COMBINED_CRC_16
+#ifndef COMBINED_CRC_16
+
+The following code is not used !!!!!!!!!!!!!!!!!!!!!!!!
+
+/*****************************************************************************
+** ROUTINE NAME: crcEncoderEfrTCH
+**
+** Description:
+** Performs the TCH Binary Cyclic Encoding (Block Encoding) used in GSM.
+** The input data and parity bit arrays used by this routine are assummed
+** in the following format with respect to bit order within the array:
+**
+** polynomial power D^N-1 D^N-2 ...... D^2 D 1
+** data/parity bits u(0) u(1) ...... u(N-3) u(N-2) u(N-1)
+** array index 0 1 ...... N-3 N-2 N-1
+**
+** Method:
+** Performs the block coding as described in GSM 05.03.
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** inputPtr - indexes the input bit array
+** parityPtr - indexes the array to store the calculated parity bits
+**
+** Returns:
+** parityPtr - indexes the parity bits that are calculated by the routine
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+void crcEncoderEfrTCH(Char *inputPtr, Char *parityPtr)
+{
+ UInt i;
+ UShort regIn;
+ UShort regOut;
+ UShort result;
+ const UShort poly = 0x0171; /* D^0 .. D^N */
+ UShort bit;
+ Char output;
+ Char input[EFR_PRE_CH_CODE_IN_BITS + EFR_NUM_TCH_PARITY_BITS];
+
+ /*
+ __________ _________ ____________
+ s(k) | | b(k), p(k) | | w(k) | |
+ -----> | CRC |------------->| Mapping |------->| Reordering |---->
+ |__________| |_________| |____________|
+ 244 bits 252 bits 260 bits
+
+ * where:
+ *
+ * s(k) = inputPtr[i]
+ * b(k) = input[i]
+ * p(k) = parityPtr[i]
+ * w(k) = input[i] ... reused; to be sent downstream to RTP module in host
+
+ * An 8-bit CRC is used for error detection. These 8 parity bits
+ * (bits w253-w260) are generated by the cyclic polynomial:
+ * g(D) = D^8 + D^4 + D^3 + D^2 + 1 from the 65 most important bits
+ * (50 bits of class 1a and another 15 bits of class 1b). These bits
+ * are taken from in the order defined by GSM 05.03 v5.5.0, section 3.1.1.1.
+ * This order shall be implemented as a table in software.
+ */
+
+ /* bit mapping of 65 bits used for CRC calculation */
+ for(i=0; i<EFR_NUM_TCH_CRC_IN_BITS; i++)
+ {
+ input[i] = inputPtr[tch_Efr_CRC_calc_LookUpTbl[i]];
+ }
+
+ /*
+ * Multiply the input data polynomial by D^numParityBits. This basically
+ * amounts to appending numParityBits "0s" to the tail of the vector.
+ */
+ for(i=EFR_NUM_TCH_CRC_IN_BITS; i<EFR_NUM_TCH_CRC_IN_BITS + EFR_NUM_TCH_PARITY_BITS; i++)
+ {
+ input[i] = 0;
+ }
+
+ /*
+ * Init the register outputs to zero
+ */
+ regOut = 0x0000;
+
+ /*
+ * Or in the first data bit
+ */
+ bit = input[0] << EFR_NUM_TCH_PARITY_BITS;
+ regOut |= bit;
+
+ /*
+ * Loop over all bits in the input vector ( D^N d(D), N = numParityBits )
+ */
+ for(i=0; i<EFR_NUM_TCH_CRC_IN_BITS + EFR_NUM_TCH_PARITY_BITS; i++)
+ {
+ output = regOut & 0x0001;
+
+ result = poly * output;
+
+ regIn = result ^ regOut;
+
+ regOut = regIn >> 1;
+
+ bit = input[i+1] << EFR_NUM_TCH_PARITY_BITS;
+
+ regOut |= bit;
+ }
+
+ /*
+ * Do not inverted parity bits, since the Remainder is '0"
+ */
+ for(i=0; i<EFR_NUM_TCH_PARITY_BITS; i++)
+ {
+ bit = (regOut>>i) & 0x0001;
+ parityPtr[i] = (Char)bit;
+ }
+
+ return;
+}
+
+/*****************************************************************************
+** ROUTINE NAME: crcDecoderEfrTCH
+**
+** Description:
+** Performs the TCH Binary Cyclic Decoding (Block Decoding) used in GSM.
+** The input data and parity bit arrays used by this routine are assummed
+** in the following format with respect to bit order within the array:
+**
+** polynomial power D^N-1 D^N-2 ...... D^2 D 1
+** data/parity bits u(0) u(1) ...... u(N-3) u(N-2) u(N-1)
+** array index 0 1 ...... N-3 N-2 N-1
+**
+** Method:
+** Performs the block decoding as described in GSM 05.03.
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** inputPtr - indexes the input bit+parity array
+** parityPtr - indexes the array to store the calculated parity bits
+**
+** Returns:
+** parityPtr - indexes the parity bits that are calculated by the routine
+** parityError - TRUE indicates that a parity error has been detected
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+Bool crcDecoderEfrTCH(Char *inputPtr, Char *parityPtr)
+{
+ UInt i;
+ Uint8 genParityBits[EFR_NUM_TCH_PARITY_BITS];
+ Uint8 tempBuf[16];
+ Bool parityError = 0;
+
+ /*
+ * Perform the crc encoding to calculate the parity based on the recieved
+ * bits. The calculated parity is stored in calParity array.
+ */
+ crcEncoderEfrTCH(inputPtr, genParityBits);
+
+ /*
+ * Compare recieved parity to calculated parity
+ */
+ for(i=0; i<EFR_NUM_TCH_PARITY_BITS; i++)
+ {
+ if(genParityBits[i] != parityPtr[i])
+ {
+ parityError = TRUE;
+ break;
+ }
+ }
+ return(parityError);
+}
+
+/*****************************************************************************
+** ROUTINE NAME: crcEncoderSCH
+**
+** Description:
+** Performs the SCH Binary Cyclic Encoding (Block Encoding) used in GSM.
+** The input data and parity bit arrays used by this routine are assummed
+** in the following format with respect to bit order within the array:
+**
+** polynomial power D^N-1 D^N-2 ...... D^2 D 1
+** data/parity bits u(0) u(1) ...... u(N-3) u(N-2) u(N-1)
+** array index 0 1 ...... N-3 N-2 N-1
+**
+** Method:
+** Performs the block coding as described in GSM 05.03.
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** inputPtr - indexes the input bit array
+** parityPtr - indexes the array to store the calculated parity bits
+**
+** Returns:
+** parityPtr - indexes the parity bits that are calculated by the routine
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+void crcEncoderSCH(Char *inputPtr, Char *parityPtr)
+{
+ UInt i;
+ UShort regIn;
+ UShort regOut;
+ UShort result;
+ const UShort poly = 0x0575; /* D^0 .. D^N */
+ UShort bit;
+ Char output;
+ Char input[NUM_SCH_CRC_IN_BITS + NUM_SCH_PARITY_BITS];
+
+ /*
+ * Multiply the input data polynomial by D^numParityBits. This basically
+ * amounts to appending numParityBits "0s" to the tail of the vector.
+ */
+ for(i=0; i<NUM_SCH_CRC_IN_BITS; i++)
+ {
+ input[i] = inputPtr[i];
+ }
+
+ for(i=NUM_SCH_CRC_IN_BITS; i<NUM_SCH_CRC_IN_BITS + NUM_SCH_PARITY_BITS; i++)
+ {
+ input[i] = 0;
+ }
+
+ /*
+ * Init the register outputs to zero
+ */
+ regOut = 0x0000;
+
+ /*
+ * Or in the first data bit
+ */
+ bit = input[0] << NUM_SCH_PARITY_BITS;
+ regOut |= bit;
+
+ /*
+ * Loop over all bits in the input vector ( D^N d(D), N = numParityBits )
+ */
+ for(i=0; i<NUM_SCH_CRC_IN_BITS + NUM_SCH_PARITY_BITS; i++)
+ {
+ output = regOut & 0x0001;
+
+ result = poly * output;
+
+ regIn = result ^ regOut;
+
+ regOut = regIn >> 1;
+
+ bit = input[i+1] << NUM_SCH_PARITY_BITS;
+
+ regOut |= bit;
+ }
+ /*
+ * Return inverted parity bits
+ */
+ regOut ^= 0xffff;
+
+ for(i=0; i<NUM_SCH_PARITY_BITS; i++)
+ {
+ bit = (regOut>>i) & 0x0001;
+ parityPtr[i] = (Char)bit;
+ }
+}
+
+/*****************************************************************************
+** ROUTINE NAME: crcEncoderRACH
+**
+** Description:
+** Performs the RACH Binary Cyclic Encoding (Block Encoding) used in GSM.
+** The input data and parity bit arrays used by this routine are assummed
+** in the following format with respect to bit order within the array:
+**
+** polynomial power D^N-1 D^N-2 ...... D^2 D 1
+** data/parity bits u(0) u(1) ...... u(N-3) u(N-2) u(N-1)
+** array index 0 1 ...... N-3 N-2 N-1
+**
+** Method:
+** Performs the block coding as described in GSM 05.03.
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** inputPtr - indexes the input bit array
+** parityPtr - indexes the array to store the calculated parity bits
+**
+** Returns:
+** parityPtr - indexes the parity bits that are calculated by the routine
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+void crcEncoderRACH(Char *inputPtr, Char *parityPtr)
+{
+ UInt i;
+ UShort regIn;
+ UShort regOut;
+ UShort result;
+ const UShort poly = 0x007b; /* D^0 .. D^N */
+ UShort bit;
+ Char output;
+ Char input[NUM_RACH_CRC_IN_BITS + NUM_RACH_PARITY_BITS];
+
+ /*
+ * Multiply the input data polynomial by D^numParityBits. This basically
+ * amounts to appending numParityBits "0s" to the tail of the vector.
+ */
+ for(i=0; i<NUM_RACH_CRC_IN_BITS; i++)
+ {
+ input[i] = inputPtr[i];
+ }
+
+ for(i=NUM_RACH_CRC_IN_BITS; i<NUM_RACH_CRC_IN_BITS + NUM_RACH_PARITY_BITS; i++)
+ {
+ input[i] = 0;
+ }
+
+ /*
+ * Init the register outputs to zero
+ */
+ regOut = 0x0000;
+
+ /*
+ * Or in the first data bit
+ */
+ bit = input[0] << NUM_RACH_PARITY_BITS;
+ regOut |= bit;
+
+ /*
+ * Loop over all bits in the input vector ( D^N d(D), N = numParityBits )
+ */
+ for(i=0; i<NUM_RACH_CRC_IN_BITS + NUM_RACH_PARITY_BITS; i++)
+ {
+ output = regOut & 0x0001;
+
+ result = poly * output;
+
+ regIn = result ^ regOut;
+
+ regOut = regIn >> 1;
+
+ bit = input[i+1] << NUM_RACH_PARITY_BITS;
+
+ regOut |= bit;
+ }
+
+ /*
+ * Return inverted parity bits, modulo 2 added with bsic.
+ * Note that the bsic is stored in the reverse order relative to
+ * the parity bits.
+ */
+ regOut ^= 0xffff;
+
+ for(i=0; i<NUM_RACH_PARITY_BITS; i++)
+ {
+ bit = (regOut >> i) & 0x0001;
+ parityPtr[i] = (Char)(bit);
+ }
+}
+
+/*****************************************************************************
+** ROUTINE NAME: crcDecoderRACH
+**
+** Description:
+** Performs the RACH Binary Cyclic Decoding (Block Decoding) used in GSM.
+** The input data and parity bit arrays used by this routine are assummed
+** in the following format with respect to bit order within the array:
+**
+** polynomial power D^N-1 D^N-2 ...... D^2 D 1
+** data/parity bits u(0) u(1) ...... u(N-3) u(N-2) u(N-1)
+** array index 0 1 ...... N-3 N-2 N-1
+**
+** Method:
+** Performs the block decoding as described in GSM 05.03.
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** inputPtr - indexes the input bit+parity array
+** parityPtr - indexes the array to store the calculated parity bits
+**
+** Returns:
+** parityPtr - indexes the parity bits that are calculated by the routine
+** parityError - TRUE indicates that a parity error has been detected
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+Bool crcDecoderRACH(Char *inputPtr, Char *parityPtr)
+{
+ UInt i;
+ Bool parityError;
+
+ parityError = 0;
+
+ /*
+ * Perform the crc encoding to calculate the parity based on the recieved
+ * bits. The calculated parity is stored in calParity array.
+ */
+ crcEncoderRACH(inputPtr, parityPtr);
+
+ /*
+ * Compare recieved parity to calculated parity
+ */
+ for(i=0; i<NUM_RACH_PARITY_BITS; i++)
+ {
+ if(inputPtr[i+NUM_RACH_CRC_IN_BITS] != parityPtr[i])
+ {
+ parityError = TRUE;
+ }
+ }
+ return(parityError);
+}
+
+/*****************************************************************************
+** ROUTINE NAME: crcEncoderTCH
+**
+** Description:
+** Performs the TCH Binary Cyclic Encoding (Block Encoding) used in GSM.
+** The input data and parity bit arrays used by this routine are assummed
+** in the following format with respect to bit order within the array:
+**
+** polynomial power D^N-1 D^N-2 ...... D^2 D 1
+** data/parity bits u(0) u(1) ...... u(N-3) u(N-2) u(N-1)
+** array index 0 1 ...... N-3 N-2 N-1
+**
+** Method:
+** Performs the block coding as described in GSM 05.03.
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** inputPtr - indexes the input bit array
+** parityPtr - indexes the array to store the calculated parity bits
+**
+** Returns:
+** parityPtr - indexes the parity bits that are calculated by the routine
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+void crcEncoderTCH(Char *inputPtr, Char *parityPtr)
+{
+ UInt i;
+ UShort regIn;
+ UShort regOut;
+ UShort result;
+ const UShort poly = 0x000d; /* D^0 .. D^N */
+ UShort bit;
+ Char output;
+ Char input[NUM_TCH_CRC_IN_BITS + NUM_TCH_PARITY_BITS];
+
+ /*
+ * Multiply the input data polynomial by D^numParityBits. This basically
+ * amounts to appending numParityBits "0s" to the tail of the vector.
+ */
+ for(i=0; i<NUM_TCH_CRC_IN_BITS; i++)
+ {
+ input[i] = inputPtr[i];
+ }
+
+ for(i=NUM_TCH_CRC_IN_BITS; i<NUM_TCH_CRC_IN_BITS + NUM_TCH_PARITY_BITS; i++)
+ {
+ input[i] = 0;
+ }
+
+ /*
+ * Init the register outputs to zero
+ */
+ regOut = 0x0000;
+
+ /*
+ * Or in the first data bit
+ */
+ bit = input[0] << NUM_TCH_PARITY_BITS;
+ regOut |= bit;
+
+ /*
+ * Loop over all bits in the input vector ( D^N d(D), N = numParityBits )
+ */
+ for(i=0; i<NUM_TCH_CRC_IN_BITS + NUM_TCH_PARITY_BITS; i++)
+ {
+ output = regOut & 0x0001;
+
+ result = poly * output;
+
+ regIn = result ^ regOut;
+
+ regOut = regIn >> 1;
+
+ bit = input[i+1] << NUM_TCH_PARITY_BITS;
+
+ regOut |= bit;
+ }
+
+ /*
+ * Return inverted parity bits
+ */
+ regOut ^= 0xffff;
+
+ for(i=0; i<NUM_TCH_PARITY_BITS; i++)
+ {
+ bit = (regOut>>i) & 0x0001;
+ parityPtr[i] = (Char)bit;
+ }
+}
+
+/*****************************************************************************
+** ROUTINE NAME: crcDecoderTCH
+**
+** Description:
+** Performs the TCH Binary Cyclic Decoding (Block Decoding) used in GSM.
+** The input data and parity bit arrays used by this routine are assummed
+** in the following format with respect to bit order within the array:
+**
+** polynomial power D^N-1 D^N-2 ...... D^2 D 1
+** data/parity bits u(0) u(1) ...... u(N-3) u(N-2) u(N-1)
+** array index 0 1 ...... N-3 N-2 N-1
+**
+** Method:
+** Performs the block decoding as described in GSM 05.03.
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** inputPtr - indexes the input bit+parity array
+** parityPtr - indexes the array to store the calculated parity bits
+**
+** Returns:
+** parityPtr - indexes the parity bits that are calculated by the routine
+** parityError - TRUE indicates that a parity error has been detected
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+Bool crcDecoderTCH(Char *inputPtr, Char *parityPtr)
+{
+ UInt i;
+ Bool parityError;
+
+ parityError = 0;
+
+ /*
+ * Perform the crc encoding to calculate the parity based on the recieved
+ * bits. The calculated parity is stored in calParity array.
+ */
+ crcEncoderTCH(inputPtr, parityPtr);
+
+ /*
+ * Compare recieved parity to calculated parity
+ */
+ for(i=0; i<NUM_TCH_PARITY_BITS; i++)
+ {
+ if(inputPtr[i+NUM_TCH_CRC_IN_BITS] != parityPtr[i])
+ {
+ parityError = TRUE;
+ }
+ }
+ return(parityError);
+}
+
+
+#endif /* end of COMBINED_CRC_16 code; not yet used!!! */
+
+
+/************************************* Old Rev Notes ***********************************
+**
+** Revision 1.5 2000-01-12 10:17:03-08 whuang
+** Added CRC encoder/Decoder, subjective encoder/decoder and VOIP format for EFR.
+** No uplink frame is sent out, if CRC error is found for EFR also. Created a common
+** CRC encoder/decoder for SCH, TCH, RA
+**
+** Revision 1.4 1999-05-28 16:25:50-07 hpines
+** 1. undo last checked-in change relative to oldMets[] = INITVAL;
+** set all states = INITVAL 2. INITVAL now = 0 (instead 0x9000), since soft-decision
+** inputs only 5 bits max therefore no worry about
+** 3. return OLDMETS[0] instead NEWMETS[0], but may need to modify later.
+**
+** Revision 1.3 1999-05-05 18:53:12-07 dkaiser
+** combined previous codecs.c with chdecode.c, result is codecs.c, deleted chdecode.c
+**
+** Revision 1.2 1999-02-09 11:13:12-08 randyt
+** Used assembly optimized Viterbi decoder
+ *
+ * Rev 1.1 03 Feb 1999 17:09:24 whuang
+ * Used assembly optimized Viterbi decoder
+ *
+ * Rev 1.0 Oct 27 1998 16:19:28 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+ *
+ * Rev 1.0 Oct 23 1998 17:56:02 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.10 1998/10/16 14:13:47 dlanza
+** Fixed possible alignment problem.
+**
+** Revision 1.9 1998/10/15 20:12:02 dlanza
+** Added the TCH path and compiled successfully.
+**
+** Revision 1.8 1998/10/06 20:43:08 kmcpherson
+** RKM - Support added, tested, and validated for SCH downlink, RACH downlink and
+** uplink, and downlink and uplink sync processing routines.
+**
+** Revision 1.7 1998/10/03 23:23:45 dlanza
+** Optimized c code...executes in 24,010 cycles.
+**
+** Revision 1.6 1998/10/02 19:49:40 dlanza
+** 27,429 cycles.
+**
+** Revision 1.5 1998/10/02 16:31:02 dlanza
+** <>
+**
+** Revision 1.4 1998/10/02 15:16:51 dlanza
+** <>
+**
+** Revision 1.3 1998/09/30 21:51:54 kmcpherson
+** RKM - CCH Encoder/Decoder functionally validated.
+**
+** Revision 1.2 1998/09/28 19:28:09 kmcpherson
+** <>
+**
+** Revision 1.1 1998/09/24 22:31:23 kmcpherson
+** Initial revision
+**
+** Revision 1.4 1998/09/24 21:04:34 kmcpherson
+** <>
+**
+** Revision 1.3 1998/09/22 13:39:23 kmcpherson
+** RKM - CCH Channel Encoder is validated against the simulation test
+** vectors.
+**
+** Revision 1.2 1998/09/19 21:56:16 kmcpherson
+** RKM 9/19/98 - CCH Encoder done and ready for test vector validation. The trival
+** case had been validated and seems to work through cnv encoding. Interleaving not tested in full CODEC test.
+*************************************************************************************/
+
+ \ No newline at end of file
diff --git a/data/mnet/GP10/Dsp/bbdataproc/chcodec/fileio.c b/data/mnet/GP10/Dsp/bbdataproc/chcodec/fileio.c
new file mode 100644
index 0000000..d0b32b6
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/chcodec/fileio.c
@@ -0,0 +1,144 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+**
+** Filename: fileio.c
+**
+** Description:
+** This file contains misc test functions in support of the test environemt.
+** This file nor the routines in this file should be used in the actual
+** deliverable code.
+**
+*****************************************************************************/
+#include <stdio.h>
+#undef CHAN_CODEC_DEF
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "bbproto.h"
+#include "codec.h"
+
+/*****************************************************************************
+** Routine Name: unpackFromFile
+**
+** Description:
+** Reads packed data from the specified file into an unpacked array.
+** numWords 16 bits words are read from the input file and stored in
+** the input array unpacked.
+**
+** Method:
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** f - specifies the input file to read
+** input - the unpacked array to store the unpacked file data
+** numWords - number of 16 bit words to read from the file
+**
+** Returns:
+** Int res
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+Int unpackFromFile(FILE *f,Char *input, Char numWords)
+{
+ Int byteRead, res, numWordsProc;
+ UInt i;
+ UInt j;
+
+ numWordsProc=0;
+
+ res=1;
+
+ while ( (numWordsProc <numWords) & (res != EOF) & (res != 0) )
+ {
+ res=fscanf(f,"%x", &byteRead);
+
+ if ((res ==0) | (res==EOF))
+ return(res);
+
+ for (i=0,j=0x8000; i < 16 ; i++)
+ {
+ if (byteRead & j)
+ *input++=1;
+ else
+ *input++=0;
+
+ j = (j/2);
+ }
+
+ numWordsProc++;
+ }
+ return(numWordsProc);
+}
+
+/*****************************************************************************
+** Routine Name: packToFile
+**
+** Description:
+** Writes unpacked data from the specified array into a packed file.
+** numBits bits are read from the input array and stored in the packed file.
+** The leftover bits in the last word if there are any are coded as "0".
+**
+** Method:
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** f - specifies the output file to write
+** output - the unpacked array to write out
+** numBits - number of bits to write to the file
+**
+** Returns:
+** None
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+
+void packToFile(FILE *f, UChar *output, Int numBits)
+{
+ Int j, i, word, numFullWords, numRemainBits, numWordsProc;
+ UInt k;
+
+ i=0;
+ numWordsProc=0;
+ numFullWords = (numBits/16);
+ numRemainBits = (numBits - (numFullWords*16));
+
+ while (i < numBits)
+ {
+ word = 0x0000;
+ if (numWordsProc < numFullWords)
+ {
+ for (j=0,k=0x8000; j <16; j++)
+ {
+ if (output[i] ==1) word |= k;
+ k = (k / 2);
+ i++;
+ }
+ fprintf(f,"%04x\n", word);
+ numWordsProc++;
+ }
+ else
+ {
+ for (j=0,k=0x8000; j < numRemainBits ; j++)
+ {
+ if (output[i] ==1) word |= k;
+ k = (k / 2);
+ i++;
+ }
+
+ fprintf(f,"%04x\n", word);
+ numWordsProc++;
+ }
+
+ }
+
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Dsp/bbdataproc/chcodec/intleavs.c b/data/mnet/GP10/Dsp/bbdataproc/chcodec/intleavs.c
new file mode 100644
index 0000000..f20e649
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/chcodec/intleavs.c
@@ -0,0 +1,1012 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+** File: intleavs.c
+**
+** Description:
+** This file contains low level interleaving and deinterleaving (and burst
+** mapping) routines in support of GSM channel coding and decoding.
+** Note: Old revision log is at the end of this file.
+**
+*****************************************************************************/
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "bbproto.h"
+#include "codec.h"
+
+#define STEALING (NB_NUM_ENCRYPT_BITS_PER_SIDE-1)
+
+/* optimized assembly routine prototypes */
+
+void intrleav8(Char *in, Bool steal, Int *bindx, Char *out);
+void intrleav4(Char *in, Bool steal, Int *bindx, Char *out);
+void dntrleav8(Char *in, Char *out);
+void dntrleav4(Char *in, Char *out);
+
+
+/*****************************************************************************
+** Routine Name: blockDiagInterleaver8
+**
+** Description:
+** Block interleaving and burst mapping for control channels.
+**
+** Method:
+** GSM 05.03 sections 4.1.4 and 4.1.5
+**
+** Modulo operations are very expensive and for powers of 2,
+** a bitwise AND operation can be used to implement the mod
+** function. The following two operations are equivalent:
+**
+** k % 4;
+** k & MODULO_4_MASK;
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+**
+** Returns:
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+
+void blockDiagInterleaver8(Char *input, Bool stealFlag, Int *burstIndex,
+ Char output[NUM_BURSTS_PER_TCH_BLOCK][NB_NUM_ENCRYPT_BITS_PER_BURST])
+{
+ UShort B, k, j;
+ UShort block;
+ UShort k49mod57;
+
+ /*
+ * If the burst index hasn't been initialized (this is the 1st
+ * occurence of a frame boundary), initialize it now.
+ */
+ if (*burstIndex < 0)
+ {
+ *burstIndex = 0;
+ }
+
+#ifdef NOT_ASM_OPTIMIZED
+
+ /*
+ * Determine if even/odd bits are used in hi/lo bursts
+ * if Block=0 --> even bursts:0..3, odd bursts:4..7
+ * else __> odd bursts:0..3, even bursts:4..7
+ */
+ block = (*burstIndex>>2) & 0x1;
+
+ /*
+ * Perform the interleaving and burst mapping as described in
+ * GSM 05.03 section 4.1.3.
+ */
+ k49mod57 = 0;
+ for(k=0; k<CODEC_FRAME_SIZE; k++)
+ { /* k=0,1,....455 */
+ B = (4*block + k) & MODULO_8_MASK; /* B=0,1...7 */
+
+ /*
+ * The following LOC is equivalent to:
+ *
+ * j = 2*((49*k) % 57) + (k % 8) / 4;
+ */
+ j = 2*k49mod57 + ((k & MODULO_8_MASK)>>2); /* j = 0...113 */
+ output[B][j] = input[k];
+
+ k49mod57 += 49;
+ if (k49mod57 > 56) k49mod57 -= 57;
+ }
+
+
+ /*
+ * Move hi side to make room for stealing flags. Only move
+ * the even bits for each even-bit burst. Only move
+ * the odd bits for each odd-bit burst.
+ */
+ if (!block)
+ {
+ output[4][115] = output[4][113];
+ output[5][115] = output[5][113];
+ output[6][115] = output[6][113];
+ output[7][115] = output[7][113];
+
+ for(j=STEALING-1; j>STEALING/2; j--)
+ {
+ output[0][2*j+2] = output[0][2*j];
+ output[1][2*j+2] = output[1][2*j];
+ output[2][2*j+2] = output[2][2*j];
+ output[3][2*j+2] = output[3][2*j];
+
+ output[4][2*j+1] = output[4][2*j-1];
+ output[5][2*j+1] = output[5][2*j-1];
+ output[6][2*j+1] = output[6][2*j-1];
+ output[7][2*j+1] = output[7][2*j-1];
+ }
+ }
+ else
+ {
+ output[0][115] = output[0][113];
+ output[1][115] = output[1][113];
+ output[2][115] = output[2][113];
+ output[3][115] = output[3][113];
+
+ for(j=STEALING-1; j>STEALING/2; j--)
+ {
+ output[4][2*j+2] = output[4][2*j];
+ output[5][2*j+2] = output[5][2*j];
+ output[6][2*j+2] = output[6][2*j];
+ output[7][2*j+2] = output[7][2*j];
+
+ output[0][2*j+1] = output[0][2*j-1];
+ output[1][2*j+1] = output[1][2*j-1];
+ output[2][2*j+1] = output[2][2*j-1];
+ output[3][2*j+1] = output[3][2*j-1];
+ }
+ }
+
+
+ /*
+ * Set the stealing flags (hu and hl) to "1" as indicated in GSM 05.03
+ * section 3.1.4 for the CCH channels.
+ */
+ if(block == 0)
+ for(B=0; B<4; B++)
+ {
+ output[B][58] = stealFlag;
+ output[B+4][57] = stealFlag;
+ }
+ else
+ for(B=0; B<4; B++)
+ {
+ output[B][57] = stealFlag;
+ output[B+4][58] = stealFlag;
+ }
+#else
+ /*
+ *** Use Optimized assembly routine***
+ */
+ intrleav8(&input[0], stealFlag, &burstIndex[0],&output[0][0]) ;
+#endif /* end old interleaver8 */
+}
+
+/*****************************************************************************
+** Routine Name: blockDiagDeinterleaver8
+**
+** Description:
+** Block deinterleaving and burst demapping for control channels.
+**
+** Method:
+** GSM 05.03 sections 4.1.4 and 4.1.5
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+**
+** Returns:
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+
+UInt blockDiagDeinterleaver8(
+ Char input[NUM_BURSTS_PER_TCH_BLOCK][NB_NUM_ENCRYPT_BITS_PER_BURST],
+ Int *burstIndex, Char *output)
+{
+ UShort B, k, j;
+ UShort block;
+ UInt steals;
+ UShort k49mod57;
+
+ /*
+ * If the burst index hasn't been initialized (this is the 1st
+ * occurance of a frame boundary), initialize it now.
+ * Init to 7 for de-interleaver since 1st increment is before
+ * the de-interleaver runs again.
+ */
+ if (*burstIndex < 0)
+ {
+ *burstIndex = 7;
+ }
+
+#ifdef NOT_ASM_OPTIMIZED
+
+ /*
+ * Determine if even/odd bits are used in hi/lo bursts
+ * if Block=0 --> even bursts:0..3, odd bursts:4..7
+ * else __> odd bursts:0..3, even bursts:4..7
+ */
+ block = !((*burstIndex>>2) & 0x1);
+
+ /*
+ * Read the appropriate stealing flags, hu & hl, and count the number set out of
+ * 8 possible.
+ */
+ steals = 0;
+ if(block == 0)
+ for(B=0; B<4; B++)
+ {
+ if (input[B][58] < 0) steals++;
+ if (input[B+4][57] < 0) steals++;
+ }
+ else
+ for(B=0; B<4; B++)
+ {
+ if (input[B][57] < 0) steals++;
+ if (input[B+4][58] < 0) steals++;
+ }
+
+
+ /*
+ * Move hi side over stealing flags to allow continuous read
+ * in the loop below. Only move the even bits for each
+ * even-bit burst. Only move the odd bits for each odd-bit burst.
+ */
+ if (!block)
+ {
+ for(j=(STEALING+2)/2; j<STEALING; j++)
+ {
+ input[0][2*j] = input[0][2*j+2];
+ input[1][2*j] = input[1][2*j+2];
+ input[2][2*j] = input[2][2*j+2];
+ input[3][2*j] = input[3][2*j+2];
+
+ input[4][2*j-1] = input[4][2*j+1];
+ input[5][2*j-1] = input[5][2*j+1];
+ input[6][2*j-1] = input[6][2*j+1];
+ input[7][2*j-1] = input[7][2*j+1];
+ }
+ input[4][113] = input[4][115];
+ input[5][113] = input[5][115];
+ input[6][113] = input[6][115];
+ input[7][113] = input[7][115];
+
+ }
+ else
+ {
+ for(j=(STEALING+2)/2; j<STEALING; j++)
+ {
+ input[4][2*j] = input[4][2*j+2];
+ input[5][2*j] = input[5][2*j+2];
+ input[6][2*j] = input[6][2*j+2];
+ input[7][2*j] = input[7][2*j+2];
+
+ input[0][2*j-1] = input[0][2*j+1];
+ input[1][2*j-1] = input[1][2*j+1];
+ input[2][2*j-1] = input[2][2*j+1];
+ input[3][2*j-1] = input[3][2*j+1];
+ }
+ input[0][113] = input[0][115];
+ input[1][113] = input[1][115];
+ input[2][113] = input[2][115];
+ input[3][113] = input[3][115];
+
+ }
+
+
+ /*
+ * Perform the deinterleaving and burst demapping. The stealing flags
+ * are not demapped.
+ */
+ k49mod57 = 0;
+ for(k=0; k<CODEC_FRAME_SIZE; k++)
+ { /* k = 0,1,....455 */
+ B = (4*block + k) & MODULO_8_MASK; /* B=0,1...7 */
+
+ /*
+ * The following LOC is equivalent to:
+ *
+ * j = 2*((49*k) % 57) + (k % 8) / 4;
+ */
+ j = 2*k49mod57 + ((k & MODULO_8_MASK)>>2); /* j = 0...113 */
+ output[k] = input[B][j];
+
+ k49mod57 += 49;
+ if (k49mod57 > 56) k49mod57 -= 57;
+ }
+#else
+
+ /*
+ *** Use Optimized assembly routine***
+ * New 9/7/99..fix buffering of stealing flags so facch interleaved
+ * over 2 consecutive frames
+ */
+ steals = 0;
+ for(B=0; B<4; B++)
+ {
+ if (input[B][114] < 0) steals++; /* current frame steal flags */
+ if (input[5][112+B] < 0) steals++; /* saved steal flags previous frame */
+ input[5][112+B] = input[B][115];
+ }
+ dntrleav8(&input[0][0], &output[0]) ;
+
+#endif /* end old deinterleaver8 */
+ return(steals);
+}
+
+/*****************************************************************************
+** Routine Name: blockRectInterleaver
+**
+** Description:
+** Block interleaving and burst mapping for control channels.
+**
+** Method:
+** GSM 05.03 sections 4.1.4 and 4.1.5
+**
+** Modulo operations are very expensive and for powers of 2,
+** a bitwise AND operation can be used to implement the mod
+** function. The following two operations are equivalent:
+**
+** k % 4;
+** k & MODULO_4_MASK;
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+**
+** Returns:
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+
+void blockRectInterleaver(Char *input, Int *burstIndex,
+ Char output[NUM_BURSTS_PER_CCH_BLOCK][NB_NUM_ENCRYPT_BITS_PER_BURST])
+{
+ UShort j;
+ UInt k, B;
+ UShort k49mod57;
+ Bool stealFlag;
+ Uint8 temp;
+
+ /*
+ * If the burst index hasn't been initialized (this is the 1st
+ * occurance of a frame boundary), initialize it now.
+ */
+ if (*burstIndex < 0)
+ {
+ *burstIndex = 0;
+ }
+
+#ifdef NOT_ASM_OPTIMIZED
+
+ /*
+ * Perform the interleaving and burst mapping as described in
+ * GSM 05.03 section 4.1.4 and 4.1.5.
+ */
+ k49mod57 = 0;
+ for(k=0; k<CODEC_FRAME_SIZE; k++)
+ { /* k=0,1,....455 */
+ B = k & MODULO_4_MASK; /* B = 0,1,2,3 */
+
+ /*
+ * The following LOC is equivalent to:
+ *
+ * j = 2*((49*k) % 57) + (k % 8) / 4;
+ */
+ j = 2*k49mod57 + ((k & MODULO_8_MASK)>>2); /* j = 0...113 */
+ output[B][j] = input[k];
+
+ k49mod57 += 49;
+ if (k49mod57 > 56) k49mod57 -= 57;
+ }
+
+
+ /*
+ * Move hi side to make room for stealing flags
+ */
+ for(j=2*STEALING+2-1; j>STEALING+2-1; j--)
+ {
+ output[0][j] = output[0][j-2];
+ output[1][j] = output[1][j-2];
+ output[2][j] = output[2][j-2];
+ output[3][j] = output[3][j-2];
+ }
+
+
+ /*
+ * Set the stealing flags (hu and hl) to "1" as indicated in GSM 05.03
+ * section 4.1.5 for the CCH channels.
+ */
+ for (B=0; B<4; B++)
+ {
+ output[B][57] = 1;
+ output[B][58] = 1;
+ }
+#else
+ /*
+ *** Use Optimized assembly routine***
+ */
+
+ stealFlag = 1; /* for cch frames */
+ intrleav4(&input[0], stealFlag, &burstIndex[0],&output[0][0]) ;
+
+#endif /* end old interleaver4 */
+
+ /*
+ * if GPRS frame, stuff steal flag locations with GPRS codec flags..msbit in first
+ */
+/*
+ if (g_DLCCHData.codecFlags != 0)
+ {
+*/
+ temp = g_DLCCHData.codecFlags;
+ for (B=0; B<4; B++)
+ {
+ stealFlag = (temp & 0x80) >> 7;
+ output[B][57] = stealFlag & 1;
+ temp = temp << 1;
+ stealFlag = (temp & 0x80) >> 7;
+ output[B][58] = stealFlag & 1;
+ temp = temp << 1;
+ }
+/*
+ }
+ output[0][57] = g_DLCCHData.codecFlags & 0x01;
+ output[0][58] = (g_DLCCHData.codecFlags>>1) & 0x01;
+
+ output[1][57] = (g_DLCCHData.codecFlags>>2) & 0x01;
+ output[1][58] = (g_DLCCHData.codecFlags>>3) & 0x01;
+
+ output[2][57] = (g_DLCCHData.codecFlags>>4) & 0x01;
+ output[2][58] = (g_DLCCHData.codecFlags>>5) & 0x01;
+
+ output[3][57] = (g_DLCCHData.codecFlags>>6) & 0x01;
+ output[3][58] = (g_DLCCHData.codecFlags>>7) & 0x01;
+*/
+
+}
+
+
+/*****************************************************************************
+** Routine Name: blockRectDeinterleaver
+**
+** Description:
+** Block deinterleaving and burst demapping for control channels.
+**
+** Method:
+** GSM 05.03 sections 4.1.4 and 4.1.5
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+**
+** Returns:
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+
+UInt blockRectDeinterleaver(Char input[NUM_BURSTS_PER_CCH_BLOCK][NB_NUM_ENCRYPT_BITS_PER_BURST],
+ Int *burstIndex, Char *output)
+{
+ UShort j;
+ Uint16 k, B;
+ UInt stealFlagErrs;
+ UShort k49mod57;
+
+ /*
+ * If the burst index hasn't been initialized (this is the 1st
+ * occurance of a frame boundary), initialize it now.
+ * Init to 7 for de-interleaver since 1st increment is before
+ * the de-interleaver runs again.
+ */
+ if (*burstIndex < 0)
+ {
+ *burstIndex = 7;
+ }
+#ifdef NOT_ASM_OPTIMIZED
+
+ /*
+ * Check the stealing flags for all four bursts. Any they are not a
+ * "+1" (a soft decision >=0) they are in error. Update the estimated
+ * error count to reflect this.
+ */
+ stealFlagErrs = 0;
+ g_ULCCHData.codecFlags =0;
+ for (B=0; B<4; B++)
+ {
+ g_ULCCHData.codecFlags <<= 1;
+ if(input[B][57] < 0)
+ {
+ stealFlagErrs += 1;
+ g_ULCCHData.codecFlags += 1;
+ }
+
+ g_ULCCHData.codecFlags <<= 1;
+ if(input[B][58] < 0)
+ {
+ stealFlagErrs += 1;
+ g_ULCCHData.codecFlags += 1;
+ }
+ }
+
+
+ /*
+ * Move hi side over stealing flags to allow continuous read
+ * in the loop below.
+ */
+ for(j=STEALING+2; j<2*STEALING+2; j++)
+ {
+ input[0][j-2] = input[0][j];
+ input[1][j-2] = input[1][j];
+ input[2][j-2] = input[2][j];
+ input[3][j-2] = input[3][j];
+ }
+
+
+ /*
+ * Perform the deinterleaving and burst demapping. The stealing flags
+ * are not demapped.
+ */
+ k49mod57 = 0;
+ for(k=0; k<CODEC_FRAME_SIZE; k++)
+ { /* k = 0,1,....455 */
+ B = k & MODULO_4_MASK; /* B = 0,1,2,3 */
+
+ /*
+ * The following LOC is equivalent to:
+ *
+ * j = 2*((49*k) % 57) + (k % 8) / 4;
+ */
+ j = 2*k49mod57 + ((k & MODULO_8_MASK)>>2); /* j = 0...113 */
+ output[k] = input[B][j];
+
+ k49mod57 += 49;
+ if (k49mod57 > 56) k49mod57 -= 57;
+ }
+#else
+
+ /*
+ *** Use Optimized assembly routine***
+ */
+
+ stealFlagErrs = 0;
+ g_ULCCHData.codecFlags =0;
+
+ for (B=0; B<4; B++)
+ {
+ g_ULCCHData.codecFlags <<= 1;
+ if(input[B][114] < 0)
+ {
+ stealFlagErrs += 1;
+ g_ULCCHData.codecFlags += 1;
+ }
+
+ g_ULCCHData.codecFlags <<= 1;
+ if(input[B][115] < 0)
+ {
+ stealFlagErrs += 1;
+ g_ULCCHData.codecFlags += 1;
+ }
+ }
+
+ dntrleav4(&input[0][0], &output[0]) ;
+
+#endif /* end old deinterleaver4 */
+
+ return(stealFlagErrs);
+}
+
+
+/*****************************************************************************
+** Routine Name: burstLoader
+**
+** Description:
+** Loads the burst builder input buffer with the appropriate burst.
+**
+** Method:
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+**
+** Returns:
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+void burstLoader(t_chanSel chanSel, UInt TN, Bool frameBoundary)
+{
+ UInt i;
+ UInt j;
+
+ switch(chanSel)
+ {
+ case SACCH:
+ case SDCCH4:
+ case SDCCH8:
+ case BCCH:
+ case PCH:
+ case AGCH:
+ case PTCCH:
+ /*
+ * All these channels use the 4 burst deep interleaving buffer
+ * If cchTXBurstIndex is initialized...
+ * cchTXBurstIndex is initialized here !!!!!!!!!!!!!!
+ */
+ if(frameBoundary) g_intBuf4Deep.cchTXBurstIndex[TN] = 0;
+ if (g_intBuf4Deep.cchTXBurstIndex[TN] >= 0)
+ {
+ /*
+ * Set the tx flag indicating to transmit the buffer.
+ */
+ g_DLCodedData.tx = TRUE;
+
+ /*
+ * Load the burst builder buffer
+ */
+ for(i=0; i<NB_NUM_ENCRYPT_BITS_PER_BURST; i++)
+ {
+ g_DLCodedData.data[i] =
+ g_intBuf4Deep.data[TN][g_intBuf4Deep.cchTXBurstIndex[TN]][i];
+ }
+
+ /*
+ * Increment cchBurstIndex
+ */
+ g_intBuf4Deep.cchTXBurstIndex[TN] =
+ (g_intBuf4Deep.cchTXBurstIndex[TN] + 1) & MODULO_4_MASK;
+ }
+ break;
+
+ case PDCH:
+ case PDTCH:
+ case PACCH:
+ /*
+ * All these channels use the 4 burst deep interleaving buffer
+ * If cchTXBurstIndex is initialized...
+ * cchTXBurstIndex is initialized here !!!!!!!!!!!!!!
+ */
+ if(frameBoundary) g_intBuf8Deep.tchTXBurstIndex[TN] = 0;
+ if (g_intBuf8Deep.tchTXBurstIndex[TN] >= 0)
+ {
+ /*
+ * Set the tx flag indicating to transmit the buffer.
+ */
+ g_DLCodedData.tx = TRUE;
+
+ /*
+ * Load the burst builder buffer
+ */
+ for(i=0; i<NB_NUM_ENCRYPT_BITS_PER_BURST; i++)
+ {
+ g_DLCodedData.data[i] =
+ g_intBuf8Deep.data[TN][g_intBuf8Deep.tchTXBurstIndex[TN]][i];
+ }
+
+ /*
+ * Increment cchBurstIndex
+ */
+ g_intBuf8Deep.tchTXBurstIndex[TN] = (g_intBuf8Deep.tchTXBurstIndex[TN] + 1) & MODULO_4_MASK;
+ }
+ break;
+
+
+
+ case TCHF:
+ case FACCH:
+ /*
+ * All these channels use the 8 burst deep interleaving buffer
+ * If tchTXBurstIndex is initialized...
+ */
+ if (g_intBuf8Deep.tchTXBurstIndex[TN] >= 0)
+ {
+ /*
+ * Set the tx flag indicating to transmit the buffer.
+ */
+ if(g_intBuf8Deep.txBurstCount[TN]>0)
+ {
+ g_intBuf8Deep.txBurstCount[TN] -= 1;
+ /*
+ * Load the burst builder buffer
+ */
+
+#ifdef NOT_ASM_OPTIMIZED
+
+ for(i=0; i<NB_NUM_ENCRYPT_BITS_PER_BURST; i++)
+ {
+ g_DLCodedData.data[i] =
+ g_intBuf8Deep.data[TN][g_intBuf8Deep.tchTXBurstIndex[TN]][i];
+ }
+#else
+ /*
+ * Load the burst builder buffer..new 8/25/99...modulo_4_mask indexing for new optimized interleaver
+ */
+ j = g_intBuf8Deep.tchTXBurstIndex[TN] & MODULO_4_MASK;
+
+ for(i=0; i<NB_NUM_ENCRYPT_BITS_PER_BURST; i++)
+ {
+ g_DLCodedData.data[i] =
+ g_intBuf8Deep.data[TN][j][i];
+ }
+
+#endif /* end old interleaver4 */
+
+ g_DLCodedData.tx = TRUE;
+ }
+ else
+ {
+ g_DLCodedData.tx = FALSE;
+ }
+ /*
+ * Increment tchBurstIndex
+ */
+ g_intBuf8Deep.tchTXBurstIndex[TN] =
+ (g_intBuf8Deep.tchTXBurstIndex[TN] + 1) & MODULO_8_MASK;
+
+ }
+ break;
+
+ case SCH:
+ case RACH:
+ /*
+ * Nothing to do since the burst builder input buffer has
+ * already been loaded.
+ */
+ break;
+
+ default:
+ break;
+
+ }
+}
+
+/*****************************************************************************
+** Routine Name: deinterleaverLoader
+**
+** Description:
+** Loads the deinterleaver buffer with the appropriate burst.
+**
+** Method:
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+**
+** Returns:
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+void deinterleaverLoader(t_chanSel chanSel, UInt TN, Bool frameBoundary)
+{
+ UInt i;
+ UInt j;
+ Char steal1,steal2;
+
+ switch(chanSel)
+ {
+ case SACCH:
+ case SDCCH4:
+ case SDCCH8:
+ case BCCH:
+ case PCH:
+ case AGCH:
+ /*
+ * All these channels use the 4 burst deep interleaving buffer
+ * If cchBurstIndex has been initialized...
+ * cchBurstIndex is initialized here !!!!!!!!!!!!
+ */
+ if(frameBoundary) g_deintBuf4Deep.cchRXBurstIndex[TN] = 2;
+ if (g_deintBuf4Deep.cchRXBurstIndex[TN] >= 0)
+ {
+ /*
+ * Increment it.
+ */
+ g_deintBuf4Deep.cchRXBurstIndex[TN] =
+ (g_deintBuf4Deep.cchRXBurstIndex[TN] + 1) & MODULO_4_MASK;
+
+#ifdef NOT_ASM_OPTIMIZED
+ /*
+ * Load the de-interleaving buffer
+ */
+ for(i=0; i<NB_NUM_ENCRYPT_BITS_PER_BURST; i++)
+ {
+ g_deintBuf4Deep.data[TN][g_deintBuf4Deep.cchRXBurstIndex[TN]][i] =
+ g_ULBurstData.data[i];
+ }
+#else
+ /*
+ * ..new 8/30/99...optimized interleaver...move the steal flags from mid-buffer to end-buffer
+ */
+ steal1 = g_ULBurstData.data[57];
+ steal2 = g_ULBurstData.data[58];
+ for(i=0; i < 57; i++)
+ {
+ g_deintBuf4Deep.data[TN][g_deintBuf4Deep.cchRXBurstIndex[TN]][i] =
+ g_ULBurstData.data[i];
+ g_deintBuf4Deep.data[TN][g_deintBuf4Deep.cchRXBurstIndex[TN]][i+57] =
+ g_ULBurstData.data[i+59];
+ }
+ g_deintBuf4Deep.data[TN][g_deintBuf4Deep.cchRXBurstIndex[TN]][114] = steal1;
+ g_deintBuf4Deep.data[TN][g_deintBuf4Deep.cchRXBurstIndex[TN]][115] = steal2;
+
+#endif /* end old deinterleaver4 */
+ }
+ break;
+
+ case PDCH:
+ case PACCH:
+ case PDTCH:
+ /*
+ * All these channels use the 4 burst deep interleaving buffer
+ * If cchBurstIndex has been initialized...
+ * cchBurstIndex is initialized here !!!!!!!!!!!!
+ */
+ if(frameBoundary) g_deintBuf8Deep.tchRXBurstIndex[TN] = 2;
+ if (g_deintBuf8Deep.tchRXBurstIndex[TN] >= 0)
+ {
+ /*
+ * Increment it.
+ */
+ g_deintBuf8Deep.tchRXBurstIndex[TN] =
+ (g_deintBuf8Deep.tchRXBurstIndex[TN] + 1) & MODULO_4_MASK;
+
+#ifdef NOT_ASM_OPTIMIZED
+ /*
+ * Load the de-interleaving buffer
+ */
+ for(i=0; i<NB_NUM_ENCRYPT_BITS_PER_BURST; i++)
+ {
+ g_deintBuf8Deep.data[TN][g_deintBuf8Deep.tchRXBurstIndex[TN]][i] =
+ g_ULBurstData.data[i];
+ }
+#else
+ /*
+ * ..new 8/30/99...optimized deinterleaver...move the steal flags from mid-buffer to end-buffer
+ */
+ steal1 = g_ULBurstData.data[57];
+ steal2 = g_ULBurstData.data[58];
+ for(i=0; i < 57; i++)
+ {
+ g_deintBuf8Deep.data[TN][g_deintBuf8Deep.tchRXBurstIndex[TN]][i] =
+ g_ULBurstData.data[i];
+ g_deintBuf8Deep.data[TN][g_deintBuf8Deep.tchRXBurstIndex[TN]][i+57] =
+ g_ULBurstData.data[i+59];
+ }
+ g_deintBuf8Deep.data[TN][g_deintBuf8Deep.tchRXBurstIndex[TN]][114] = steal1;
+ g_deintBuf8Deep.data[TN][g_deintBuf8Deep.tchRXBurstIndex[TN]][115] = steal2;
+
+#endif /* end old deinterleaver4 */
+ }
+ break;
+
+ case TCHF:
+ case FACCH:
+ /*
+ * All these channels use the 8 burst deep interleaving buffer
+ * If tchRXBurstIndex has been initialized...
+ */
+ if (g_deintBuf8Deep.tchRXBurstIndex[TN] >= 0)
+ {
+ /*
+ * Increment it.
+ */
+
+#ifdef NOT_ASM_OPTIMIZED
+ g_deintBuf8Deep.tchRXBurstIndex[TN] =
+ (g_deintBuf8Deep.tchRXBurstIndex[TN] + 1) & MODULO_8_MASK;
+
+ /*
+ * Load the de-interleaving buffer
+ */
+ for(i=0; i<NB_NUM_ENCRYPT_BITS_PER_BURST; i++)
+ {
+ g_deintBuf8Deep.data[TN][g_deintBuf8Deep.tchRXBurstIndex[TN]][i] =
+ g_ULBurstData.data[i];
+ }
+#else
+ /*
+ * ..new 8/30/99...optimized deinterleaver...modulo_4_mask indexing for new deinterleaver
+ */
+ g_deintBuf8Deep.tchRXBurstIndex[TN] =
+ (g_deintBuf8Deep.tchRXBurstIndex[TN] + 1) & MODULO_8_MASK;
+
+ /*
+ * Load the de-interleaving buffer
+ */
+ /*
+ * ..new 8/30/99...move the steal flags from mid-buffer to end-buffer
+ */
+ j = g_deintBuf8Deep.tchRXBurstIndex[TN] & MODULO_4_MASK;
+ steal1 = g_ULBurstData.data[57];
+ steal2 = g_ULBurstData.data[58];
+ for(i=0; i < 57; i++)
+ {
+ g_deintBuf8Deep.data[TN][j][i] =
+ g_ULBurstData.data[i];
+ g_deintBuf8Deep.data[TN][j][i+57] =
+ g_ULBurstData.data[i+59];
+ }
+ g_deintBuf8Deep.data[TN][j][114] = steal1;
+ g_deintBuf8Deep.data[TN][j][115] = steal2;
+
+#endif /* end old deinterleaver4 */
+ }
+ break;
+
+ case RACH:
+ break;
+
+ default:
+ break;
+
+ }
+}
+
+/********************* Old revision log *************************************************
+**
+** Revision 1.6 1999/09/10 00:20:45 whuang
+** added optimized interleave/deinterleave code by HP
+**
+** Revision 1.4 1999-06-09 10:36:42-07 dkaiser
+** changed NB_NUM_ENCRYPT_BITS to NB_NUM_ENCRYPT_BITS_PER_BURST
+** to match consolidated GSM L1 definitions (eliminating duplicates)
+**
+** Revision 1.3 1999-05-26 17:13:34-07 hpines
+** In blockDiagDeinterleaver8, for tch frames, moved buffering of 4 samples [113] <- [115] from
+** prolog of stealing flag buffering loop to epilog, to prevent the samples at [113] from being destroyed.
+**
+** Revision 1.2 1999-02-09 11:15:40-08 randyt
+** Added Initialize Interleave/deinterleave (4) burst index on each Frame boundry.
+**
+ * Rev 1.1 21 Jan 1999 16:35:50 whuang
+ * Added Initialize Interleave/deinterlaeve (4)burst index on each Frame boundary
+ *
+ * Rev 1.0 Oct 27 1998 16:19:28 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+ *
+ * Rev 1.0 Oct 23 1998 17:56:04 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.9 1998/10/16 14:35:02 dlanza
+** Removed tx member from the interleaving buffers.
+**
+** Revision 1.8 1998/10/15 20:12:05 dlanza
+** Added the TCH path and compiled successfully.
+**
+** Revision 1.7 1998/10/06 20:43:09 kmcpherson
+** RKM - Support added, tested, and validated for SCH downlink, RACH downlink and
+** uplink, and downlink and uplink sync processing routines.
+**
+** Revision 1.6 1998/10/01 18:16:37 dlanza
+** Fixed bug in de-interleaver.
+**
+** Revision 1.5 1998/10/01 15:47:14 dlanza
+** Optimized block interleaver and de-interleaver.
+**
+** Revision 1.4 1998/10/01 01:46:34 dlanza
+** Optimaized code. Recuded cycles by 70%.
+**
+** Revision 1.3 1998/09/30 17:35:44 kmcpherson
+** RKM - Added functionality for CCH channel decoding. Currently does not validate.
+**
+** Revision 1.2 1998/09/28 19:28:08 kmcpherson
+** <>
+**
+** Revision 1.1 1998/09/24 22:31:24 kmcpherson
+** Initial revision
+**
+** Revision 1.4 1998/09/24 21:04:36 kmcpherson
+** <>
+**
+** Revision 1.3 1998/09/22 13:39:22 kmcpherson
+** RKM - CCH Channel Encoder is validated against the simulation test
+** vectors.
+**
+** Revision 1.2 1998/09/19 21:56:17 kmcpherson
+** RKM 9/19/98 - CCH Encoder done and ready for test vector validation. The trival
+** case had been validated and seems to work through cnv encoding. Interleaving not tested in full CODEC test.
+**/
diff --git a/data/mnet/GP10/Dsp/bbdataproc/chcodec/sbjcodecs.c b/data/mnet/GP10/Dsp/bbdataproc/chcodec/sbjcodecs.c
new file mode 100644
index 0000000..e9523dc
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/chcodec/sbjcodecs.c
@@ -0,0 +1,790 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+** File: sbjcodecs.c
+**
+** Description:
+** Contains functions that perform subjective encoding and decoding of
+** speech frames. The re-ordering is done in-place - i.e. the output is
+** stored in the input buffer.
+** Note: Old revision log is at the end of this file.
+**
+*****************************************************************************/
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "bbproto.h"
+#include "codec.h"
+#include "dsprotyp.h"
+
+
+#ifdef ETSI_FRAME_PACKING
+
+/*
+* Subjective encoder index mapping table.
+*/
+const UShort encoder_tab[NUM_BITS_TCH_FRAME] =
+{
+ /*
+ * class Ia
+ */
+ 6-1,53-1,109-1,165-1,221-1,5-1,12-1,17-1,4-1,11-1,16-1,22-1,
+ 43-1,99-1,155-1,211-1,52-1,108-1,164-1,220-1,10-1,26-1,30-1,
+ 42-1,98-1,154-1,210-1,41-1,97-1,153-1,209-1,40-1,96-1,152-1,208-1,
+ 39-1,95-1,151-1,207-1,51-1,107-1,163-1,219-1,3-1,21-1,33-1,38-1,94-1,150-1,206-1,
+ /*
+ * class Ib
+ */
+ 25-1,29-1,45-1,101-1,157-1,213-1,37-1,93-1,149-1,205-1,47-1,103-1,159-1,215-1,
+ 2-1,9-1,15-1,36-1,20-1,24-1,32-1,44-1,100-1,156-1,212-1,50-1,106-1,162-1,218-1,
+ 56-1,59-1,62-1,65-1,68-1,71-1,74-1,77-1,80-1,83-1,86-1,89-1,
+ 92-1,112-1,115-1,118-1,121-1,124-1,127-1,130-1,133-1,136-1,139-1,142-1,145-1,
+ 148-1,168-1,171-1,174-1,177-1,180-1,183-1,186-1,189-1,192-1,195-1,198-1,201-1,
+ 204-1,224-1,227-1,230-1,233-1,236-1,239-1,242-1,245-1,248-1,251-1,254-1,257-1,
+ 260-1,46-1,102-1,158-1,214-1,49-1,105-1,161-1,217-1,55-1,58-1,
+ 61-1,64-1,67-1,70-1,73-1,76-1,79-1,82-1,85-1,88-1,91-1,
+ 111-1,114-1,117-1,120-1,123-1,126-1,129-1,132-1,135-1,138-1,141-1,144-1,
+ 147-1,167-1,170-1,173-1,176-1,179-1,182-1,185-1,188-1,191-1,194-1,197-1,200-1,
+ 203-1,223-1,226-1,229-1,232-1,
+ /*
+ * class I
+ */
+ 235-1,238-1,241-1,244-1,247-1,250-1,253-1,256-1,
+ 259-1,1-1,8-1,14-1,28-1,31-1,35-1,34-1,13-1,19-1,18-1,23-1,48-1,104-1,
+ 160-1,216-1,54-1,57-1,60-1,63-1,66-1,69-1,72-1,75-1,78-1,81-1,84-1,87-1,
+ 90-1,110-1,113-1,116-1,119-1,122-1,125-1,128-1,131-1,134-1,137-1,140-1,143-1,
+ 146-1,166-1,169-1,172-1,175-1,178-1,181-1,184-1,187-1,190-1,193-1,196-1,199-1,
+ 202-1,222-1,225-1,228-1,231-1,234-1,237-1,240-1,243-1,246-1,249-1,252-1,255-1,
+ 258-1,7-1,27-1
+};
+
+#else
+
+#define GSM_MAGIC 0xD
+/*
+* Subjective encoder index mapping table.
+*/
+const UShort gsmFrToast[NUM_BITS_TCH_FRAME] =
+{
+ /*
+ * class Ia
+ */
+ 1-1,48-1,104-1,160-1,216-1,2-1,7-1,13-1,3-1,8-1,14-1,18-1,
+ 37-1,93-1,149-1,205-1,49-1,105-1,161-1,217-1,9-1,23-1,27-1,
+ 38-1,94-1,150-1,206-1,39-1,95-1,151-1,207-1,40-1,96-1,152-1,208-1,
+ 41-1,97-1,153-1,209-1,50-1,106-1,162-1,218-1,4-1,19-1,31-1,42-1,98-1,154-1,210-1,
+ /*
+ * class Ib
+ */
+ 24-1,28-1,44-1,100-1,156-1,212-1,43-1,99-1,155-1,211-1,46-1,102-1,158-1,214-1,
+ 5-1,10-1,15-1,34-1,20-1,25-1,32-1,45-1,101-1,157-1,213-1,51-1,107-1,163-1,219-1,
+ 54-1,57-1,60-1,63-1,66-1,69-1,72-1,75-1,78-1,81-1,84-1,87-1,
+ 90-1,110-1,113-1,116-1,119-1,122-1,125-1,128-1,131-1,134-1,137-1,140-1,143-1,
+ 146-1,166-1,169-1,172-1,175-1,178-1,181-1,184-1,187-1,190-1,193-1,196-1,199-1,
+ 202-1,222-1,225-1,228-1,231-1,234-1,237-1,240-1,243-1,246-1,249-1,252-1,255-1,
+ 258-1,47-1,103-1,159-1,215-1,52-1,108-1,164-1,220-1,55-1,58-1,
+ 61-1,64-1,67-1,70-1,73-1,76-1,79-1,82-1,85-1,88-1,91-1,
+ 111-1,114-1,117-1,120-1,123-1,126-1,129-1,132-1,135-1,138-1,141-1,144-1,
+ 147-1,167-1,170-1,173-1,176-1,179-1,182-1,185-1,188-1,191-1,194-1,197-1,200-1,
+ 203-1,223-1,226-1,229-1,232-1,
+ /*
+ * class I
+ */
+ 235-1,238-1,241-1,244-1,247-1,250-1,253-1,256-1,
+ 259-1,6-1,11-1,16-1,29-1,33-1,35-1,36-1,17-1,21-1,22-1,26-1,53-1,109-1,
+ 165-1,221-1,56-1,59-1,62-1,65-1,68-1,71-1,74-1,77-1,80-1,83-1,86-1,89-1,
+ 92-1,112-1,115-1,118-1,121-1,124-1,127-1,130-1,133-1,136-1,139-1,142-1,145-1,
+ 148-1,168-1,171-1,174-1,177-1,180-1,183-1,186-1,189-1,192-1,195-1,198-1,201-1,
+ 204-1,224-1,227-1,230-1,233-1,236-1,239-1,242-1,245-1,248-1,251-1,254-1,257-1,
+ 260-1,12-1,30-1
+};
+
+/*
+
+The preliminary coded bits w(k) for k = 1 to 260 are hence defined by:
+w(k) = s(k) for k = 1 to 71
+w(k) = s(k?2) for k = 74 to 123
+w(k) = s(k?4) for k = 126 to 178
+w(k) = s(k?6) for k = 181 to s230
+w(k) = s(k?8) for k = 233 to s252
+
+Repetition bits:
+w(k) = s(70) for k = 72 and 73
+w(k) = s(120) for k = 124 and 125
+w(k) = s(173) for k = 179 and 180
+w(k) = s(223) for k = 231 and 232
+
+Parity bits:
+w(k = p(k?252) for k = 253 to 260
+*/
+
+/* reordering EFR Bits */
+const UShort gsmEfrSbjTable[NUM_BITS_TCH_FRAME] =
+{
+39-1, 40-1, 41-1, 42-1, 43-1, 44-1,
+146-1, 147-1, 148-1, 149-1, 150-1, 151-1,
+94-1, 95-1,
+201-1, 202-1,
+48-1,
+89-1,
+100-1,
+141-1,
+45-1,
+152-1,
+96-1,
+203-1,
+2-1, 3-1,
+8-1,
+10-1,
+18-1, 19-1,
+24-1,
+46-1, 47-1,
+153-1, 154 -1,
+97-1,
+204-1,
+4-1, 5-1,
+11-1, 12-1,
+16-1,
+9-1,
+6-1, 7-1,
+13-1,
+17-1,
+20-1,
+98-1,
+205-1,
+
+1-1,
+14 -1, 15-1,
+21-1,
+25 -1, 26 -1,
+28-1,
+155-1,
+207-1,
+196-1,
+248-1,
+90-1,
+142-1,
+197-1,
+249-1,
+
+
+253 -1, 254-1, 255-1, 256-1, 257-1, 258-1, 259-1, 260-1,
+49 -1,
+101 -1,
+156 -1,
+208-1,
+22 -1, 23-1,
+27 -1,
+29 -1,
+52 -1,
+56 -1,
+60 -1,
+64 -1,
+68 -1,
+104-1,
+108-1,
+112-1,
+116-1,
+120-1,
+159-1,
+163-1,
+167-1,
+171-1,
+175-1,
+211-1,
+215-1,
+219-1,
+223-1,
+227-1,
+91 -1,
+143-1,
+198-1,
+250-1,
+50 -1,
+102-1,
+157-1,
+209-1,
+30 -1, 31-1, 32-1,
+33 -1, 34-1, 35-1, 36-1,
+99-1,
+206 -1,
+53 -1,
+57-1,
+
+61 -1,
+65 -1,
+69 -1,
+105 -1,
+109 -1,
+113 -1,
+117 -1,
+121 -1,
+160 -1,
+164 -1,
+168 -1,
+172 -1,
+176 -1,
+212 -1,
+216 -1,
+220 -1,
+224 -1,
+228 -1,
+54 -1,
+58 -1,
+62 -1,
+66 -1,
+106 -1,
+110-1,
+114 -1,
+118 -1,
+161 -1,
+165 -1,
+169 -1,
+173 -1,
+213 -1,
+221 -1,
+225 -1,
+92 -1,
+144 -1,
+199 -1,
+251 -1,
+51 -1,
+103 -1,
+158 -1,
+210 -1,
+93 -1,
+145 -1,
+200 -1,
+
+
+252 -1,
+55 -1,
+59 -1,
+63 -1,
+67 -1,
+107 -1,
+111 -1,
+115 -1,
+119 -1,
+162 -1,
+166 -1,
+170 -1,
+174 -1,
+214 -1,
+222 -1,
+226 -1,
+37 -1, 38-1,
+
+70-1,
+72 -1,73-1,
+122-1,
+124 -1,125-1,
+177-1,
+179 -1,180-1,
+229 -1,
+231 -1,232-1,
+217 -1, 218-1,
+71 -1,
+123 -1,
+178 -1,
+230 -1,
+74 -1,
+77 -1,
+80 -1,
+83 -1,
+86 -1,
+126 -1,
+129 -1,
+132 -1,
+135 -1,
+138 -1,
+181 -1,
+184 -1,
+187 -1,
+190 -1,
+193 -1,
+233 -1,
+236 -1,
+239 -1,
+242 -1,
+245 -1,
+75 -1,
+78 -1,
+81 -1,
+84 -1,
+87 -1,
+127 -1,
+130 -1,
+133 -1,
+136 -1,
+139 -1,
+182 -1,
+185 -1,
+188 -1,
+191 -1,
+194 -1,
+234 -1,
+237 -1,
+240 -1,
+243 -1,
+246 -1,
+76 -1,
+79 -1,
+82 -1,
+85 -1,
+88 -1,
+128 -1,
+131 -1,
+134 -1,
+137 -1,
+140 -1,
+183 -1,
+186 -1,
+189 -1,
+192 -1,
+195 -1,
+235 -1,
+238 -1,
+241 -1,
+244 -1,
+247 -1
+
+
+};
+
+#endif
+
+
+#define EFR_NUM_TCH_PARITY_BITS 8
+#define EFR_NUM_TCH_CRC_IN_BITS 65
+
+/*****************************************************************************
+** Routine Name: sbjEncoder
+**
+** Description:
+** Performs subjective encoding per GSM 06.10 table A2.1a for Full-rate
+** speech.
+**
+** Method:
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+**
+** Returns:
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+void sbjEncoder(Char* inputPtr, t_vocAlgo vocoAlgo)
+{
+ Int i;
+ Char temp[NUM_BITS_TCH_FRAME+4];
+ Char efrCrcInBits[EFR_NUM_TCH_CRC_IN_BITS];
+ Char *tempBufPtr;
+
+ switch(vocoAlgo)
+ {
+#ifdef ETSI_FRAME_PACKING
+
+ case VOC_GSMF:
+ /*
+ * GSM full-rate vocoder is in use.
+ * Re-order input array according to table storing result in temp.
+ * Then move result from temp back to input buffer.
+ */
+ for(i=0; i<NUM_BITS_TCH_FRAME; i++)
+ {
+ temp[i] = inputPtr[encoder_tab[i]];
+ }
+
+ for(i=0; i<NUM_BITS_TCH_FRAME; i++)
+ {
+ inputPtr[i] = temp[i];
+ }
+
+ break;
+#else
+
+ case VOC_GSMF:
+
+ for(i=0; i<NUM_BITS_TCH_FRAME; i++)
+ {
+ temp[i] = inputPtr[gsmFrToast[i]+4];
+ }
+
+ for(i=0; i<NUM_BITS_TCH_FRAME; i++)
+ {
+ inputPtr[i] = temp[i];
+ }
+
+ break;
+
+ case VOC_EFR:
+/*
+* GSM 5.03
+*
+The preliminary coded bits w(k) for k = 1 to 260 are hence defined by:
+w(k) = s(k) for k = 1 to 71
+w(k) = s(k-2) for k = 74 to 123
+w(k) = s(k-4) for k = 126 to 178
+w(k) = s(k-6) for k = 181 to s230
+w(k) = s(k-8) for k = 233 to s252
+
+Repetition bits:
+w(k) = s(70) for k = 72 and 73
+w(k) = s(120) for k = 124 and 125
+w(k) = s(173) for k = 179 and 180
+w(k) = s(223) for k = 231 and 232
+
+Parity bits:
+w(k = p(k?252) for k = 253 to 260
+*/
+
+ /*
+ * skip first 4 bits 0xC
+ */
+ tempBufPtr = inputPtr+ 4;
+ /*
+ * CRC Encode to generate parity bits and store it to last 8 bit of a 260-bit frame
+ */
+ //crcEncoderEfrTCH(tempBufPtr, & temp[252]);
+
+
+ /* bit mapping of 65 bits used for CRC calculation */
+ for(i=0; i<EFR_NUM_TCH_CRC_IN_BITS; i++)
+ {
+ efrCrcInBits[i] = tempBufPtr[tch_Efr_CRC_calc_LookUpTbl[i]];
+ }
+
+ crcEncoder16( efrCrcInBits, /* input data bits */
+ & temp[252], /* input parity bits */
+ EFR_CRC_POLY,
+ EFR_NUM_TCH_PARITY_BITS,
+ EFR_NUM_TCH_CRC_IN_BITS,
+ 0);
+
+ /*
+ * rearange input bits according to GSM 5.03
+ */
+ for(i=0; i<71; i++)
+ {
+ temp[i] = tempBufPtr[i];
+ }
+ temp[i++] = tempBufPtr[69];
+ temp[i++] = tempBufPtr[69];
+
+ for(i=73; i<123; i++)
+ {
+ temp[i] = tempBufPtr[i-2];
+ }
+ temp[i++] = tempBufPtr[119];
+ temp[i++] = tempBufPtr[119];
+
+
+ for(i=125; i<178; i++)
+ {
+ temp[i] = tempBufPtr[i-4];
+ }
+ temp[i++] = tempBufPtr[172];
+ temp[i++] = tempBufPtr[172];
+
+
+ for(i=180; i<230; i++)
+ {
+ temp[i] = tempBufPtr[i-6];
+ }
+ temp[i++] = tempBufPtr[222];
+ temp[i++] = tempBufPtr[222];
+
+ for(i=232; i<252; i++)
+ {
+ temp[i] = tempBufPtr[i-8];
+ }
+
+
+
+ for(i=0; i<NUM_BITS_TCH_FRAME; i++)
+ {
+ inputPtr[i] = temp[gsmEfrSbjTable[i]];
+ }
+
+ break;
+
+#endif
+
+ default:
+ /*
+ * No others are currently supported
+ */
+ break;
+ }
+}
+
+/*****************************************************************************
+** Routine Name: sbjDecoder
+**
+** Description:
+** Performs subjective encoding per GSM 06.10 table A2.1a for Full-rate
+** speech.
+**
+** Method:
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+**
+** Returns:
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+Bool sbjDecoder(Char* inputPtr, t_vocAlgo vocoAlgo, Uint8 timeSlot)
+{
+ Int i;
+ Char temp[NUM_BITS_TCH_FRAME+4], *tempPtr;
+ Char efrCrcInBits[EFR_NUM_TCH_CRC_IN_BITS];
+
+ Bool speechParityError = 0;
+
+ Uint32 repeatBitError = 0;
+ Uint8 repeatBits;
+/*
+ Uchar efrMsFrame[50] = { 0x2e, 00, 00, 00, 04, 0x30, 00, 0x00,
+ 0x0e, 00, 01, 01, 0x6b, 0xd7, 0x83, 0x4b,
+ 0x31, 0x86, 0x99, 0x07, 0x63, 0x36, 0x3c, 0x4e, 0xa8, 0xae,0xa1,
+ 0x87, 0x2d, 0x4d, 0xa7, 0x08,
+ 0xc3, 0xbe, 0xac, 0x70, 0x08, 0x01,
+ 0x6c, 0x9c, 0xda, 0xb7, 0xf2, 0x8a,
+ 0xac, 0xbe, 0x40, 0x01 ,
+ 00 ,00 };
+*/
+
+ Uchar efrMsFrame[50] = { 0x2e, 00, 00, 00, 04, 0x30, 00, 0x00,
+ 0x0e, 00, 01, 01, 0x92, 0x76, 0x0a , 0x15 ,
+ 0x4e, 0x0b, 0x16, 0x82, 0x63, 0x0a, 0x22, 0x52, 0x55, 0xf0, 0xa0, 0xc9, 0xff, 0x46, 0x1b, 0x3f,
+ 0x6d, 0xc8, 0x7f, 0xfe, 0x3a, 0x94, 0x09, 0xba, 0xd6, 0x05, 0xd2, 0x6c, 0xec, 0x01, 0x00, 0x01,
+ 00, 01
+ };
+
+ switch(vocoAlgo)
+ {
+#ifdef ETSI_FRAME_PACKING
+
+ case VOC_GSMF:
+ /*
+ * GSM full-rate vocoder is in use.
+ * Re-order input array according to table storing result in temp.
+ * Then move result from temp back to input buffer.
+ */
+ for(i=0; i<NUM_BITS_TCH_FRAME; i++)
+ {
+ temp[encoder_tab[i]] = inputPtr[i];
+ }
+
+ for(i=0; i<NUM_BITS_TCH_FRAME; i++)
+ {
+ inputPtr[i] = temp[i];
+ }
+
+ break;
+#else
+
+ case VOC_GSMF:
+
+ /*
+ * bypass first four bits - GSM_MAGIC 0x1101
+ */
+ /*
+ * first 4 bits are GSM_MAGIC 1101
+ */
+ temp[0] =1;
+ temp[1] =1;
+ temp[2] =0;
+ temp[3] =1;
+
+ for(i=0; i<NUM_BITS_TCH_FRAME; i++)
+ {
+ temp[gsmFrToast[i]+4] = inputPtr[i];
+ }
+
+ for(i=0; i<NUM_BITS_TCH_FRAME+4; i++)
+ {
+ inputPtr[i] = temp[i];
+ }
+
+ /*
+ * Speech Parity Error is always 0 for GSM FR
+ */
+ speechParityError = 0;
+ break;
+
+
+ case VOC_EFR:
+
+
+ /* unpackByteMSB( & efrMsFrame[12],
+ inputPtr,
+ NUM_BITS_TCH_FRAME+4);
+ */
+
+ /*
+ * undo the transmit reordering
+ */
+
+ for(i=0; i<NUM_BITS_TCH_FRAME; i++)
+ {
+ temp[gsmEfrSbjTable[i]] = inputPtr[i];
+ }
+
+ /*
+ * first 4 bits are GSM_MAGIC_EFR 1100
+ */
+ inputPtr[0] =1;
+ inputPtr[1] =1;
+ inputPtr[2] =0;
+ inputPtr[3] =0;
+
+ /*
+ * Get 244 Bits per EFR speech frame from un-reordered bits
+ */
+ tempPtr = inputPtr + 4;
+
+ for(i=0; i<71; i++)
+ {
+ tempPtr[i] = temp[i];
+ }
+ /*
+ * majority rule for repeated bits
+ */
+ repeatBits = tempPtr[69] + temp[71] + temp[72];
+ if( repeatBits == 1 || repeatBits == 2)
+ {
+ repeatBitError = tempPtr[69] | temp[71]<<1 + temp[72]<<2;
+ }
+ tempPtr[69] = repeatBits >> 1;
+
+
+ for(i=73; i<123; i++)
+ {
+ tempPtr[i-2] = temp[i];
+ }
+ /*
+ * majority rule for repeated bits
+ */
+ repeatBits = tempPtr[119] + temp[123] + temp[124];
+ if( repeatBits == 1 || repeatBits == 2)
+ {
+ repeatBitError |= tempPtr[69]<<8 | temp[123]<<9 + temp[124]<<10;
+ }
+ tempPtr[119] = repeatBits >> 1;
+
+
+ for(i=125; i<178; i++)
+ {
+ tempPtr[i-4] = temp[i];
+ }
+ /*
+ * majority rule for repeated bits
+ */
+ repeatBits = tempPtr[172] + temp[178] + temp[179];
+ if( repeatBits == 1 || repeatBits == 2)
+ {
+ repeatBitError |= tempPtr[172]<<16 | temp[178]<<17 + temp[179]<<18;
+ }
+ tempPtr[172] = repeatBits >> 1;
+
+ for(i=180; i<230; i++)
+ {
+ tempPtr[i-6] = temp[i];
+ }
+ /*
+ * majority rule for repeated bits
+ */
+ repeatBits = tempPtr[222] + temp[230] + temp[231];
+ if( repeatBits == 1 || repeatBits == 2)
+ {
+ repeatBitError |= tempPtr[222]<<24 | temp[230]<<25 + temp[231]<<26;
+ }
+ tempPtr[222] = repeatBits >> 1;
+
+ for(i=232; i<252; i++)
+ {
+ tempPtr[i-8] = temp[i];
+ }
+
+ /*
+ * send a diag report
+ if( repeatBitError ) sendDiagMsg(0x3f,0,timeSlot,4, & repeatBitError);
+ */
+
+ /*
+ * get bits required to generate parity bits.
+ */
+ //speechParityError = crcDecoderEfrTCH(tempPtr, &temp[252]);
+
+
+ /* bit mapping of 65 bits used for CRC calculation */
+ for(i=0; i<EFR_NUM_TCH_CRC_IN_BITS; i++)
+ {
+ efrCrcInBits[i] = tempPtr[tch_Efr_CRC_calc_LookUpTbl[i]];
+ }
+
+ speechParityError = crcDecoder16( efrCrcInBits, /* input data bits */
+ & temp[252], /* input parity bits */
+ EFR_CRC_POLY,
+ EFR_NUM_TCH_PARITY_BITS,
+ EFR_NUM_TCH_CRC_IN_BITS,
+ 0);
+ break;
+#endif
+
+ default:
+ /*
+ * No others are currently supported
+ */
+ speechParityError = 0;
+ break;
+ }
+ return (speechParityError);
+}
+
+/********************** Old revision log **********************************
+**
+** Revision 1.4 2000-01-12 10:17:04-08 whuang
+** Added CRC encoder/Decoder, subjective encoder/decoder and VOIP format for EFR.
+** No uplink frame is sent out, if CRC error is found for EFR also. Created a common
+** CRC encoder/decoder for SCH, TCH, RACH and EFR
+**
+** Revision 1.3 1999-04-06 18:09:28-07 whuang
+** added GSM FR Toast frame packing; added silence frame on DL and UL when there is
+** no valid voice frame.
+**
+** Revision 1.2 1999-03-11 15:55:58-08 whuang
+** <>
+**
+** Revision 1.1 1999-01-07 14:16:06-08 randyt
+** Initial revision
+** PVCS Version 1.0
+**
+ *
+ * Rev 1.0 Oct 27 1998 16:19:30 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+ *
+ * Rev 1.0 Oct 23 1998 17:56:04 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.3 1998/10/15 20:12:05 dlanza
+** Added the TCH path and compiled successfully.
+**
+** Revision 1.2 1998/10/15 16:18:21 dlanza
+** Creation.
+**
+** Revision 1.1 1998/10/15 16:16:08 dlanza
+** Initial revision
+**/
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/chcodec/testproto.h b/data/mnet/GP10/Dsp/bbdataproc/chcodec/testproto.h
new file mode 100644
index 0000000..c83bb56
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/chcodec/testproto.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+**
+** File: testproto.h
+**
+*****************************************************************************/
+
+/*
+* Test function prototypes
+*/
+void TestCnvCodec(void);
+
+void TestCCHInterleave(void);
+
+void TestTCHInterleave(void);
+
+void TestCrcCodec(void);
+
+void TestTCHChanCodec(void);
+
+void TestFACCHChanCodec(void);
+
+void TestCCHChanCodec(void);
+
+void TestSCHChanCodec(void);
+
+void TestRACHChanCodec(void);
+
+Int unpackFromFile(FILE *fin, Char *output, Int numBits);
+
+void packToFile(FILE *f, UChar *input, Int numBits);
+
+void crcEncoderTest(Char *inputPtr, Char *par_tab, Char *gen_poly,
+ UInt polyLength, UInt nbr);
+
+void crcEncoderTest2(Char *inputPtr, Char *parityPtr, Char *polyPtr,
+ UInt numParityBits, UInt numBits);
+
+UShort reverseBits(UShort value);
+
+void readBcchData(FILE *fin, UChar sysInfoType, UChar sigBufState, UInt TN);
+
+void readCchData(FILE *fin, t_DLSigBufs *sigBufPtr);
+
+void readSchData(FILE *fin, UChar sigBufState, UInt TN);
+
+void writeCCHFrameData(FILE *fout, UInt TN, UInt numBits);
diff --git a/data/mnet/GP10/Dsp/bbdataproc/chcodec/topcodec.c b/data/mnet/GP10/Dsp/bbdataproc/chcodec/topcodec.c
new file mode 100644
index 0000000..00de9ea
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/chcodec/topcodec.c
@@ -0,0 +1,2214 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+** Filename: topcodec.c
+**
+** Description:
+** This file contains the top level routines for GSM channel encoding and
+** decoding. Old revision notes at end of this file.
+**
+*****************************************************************************/
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "bbproto.h"
+#include "codec.h"
+#include "stdlib.h"
+#include "l1config.h"
+
+#include "dsprotyp.h"
+
+#define BER_TEST 0
+#define RANDOM_TEST 0
+#define FIRE_TEST 0
+#define PRACH_TEST 0
+
+#pragma DATA_SECTION(badTchFrameCounter, ".extData");
+Int32 badTchFrameCounter = 0;
+#pragma DATA_SECTION(badTchMetricCounter, ".extData");
+Int32 badTchMetricCounter = 0;
+#pragma DATA_SECTION(badCchFrameCounter, ".extData");
+Int32 badCchFrameCounter = 0;
+#pragma DATA_SECTION(badfacchFrameCounter, ".extData");
+Int32 badfacchFrameCounter = 0;
+#pragma DATA_SECTION(badRachFrameCounter, ".extData");
+Int32 badRachFrameCounter = 0;
+#pragma DATA_SECTION(badPdchFrameCounter, ".extData");
+Int32 badPdchFrameCounter = 0;
+#pragma DATA_SECTION(badPrachFrameCounter, ".extData");
+Int32 badPrachFrameCounter = 0;
+#pragma DATA_SECTION(tchFrameCounter, ".extData");
+Int32 tchFrameCounter = 0;
+#pragma DATA_SECTION(cchFrameCounter, ".extData");
+Int32 cchFrameCounter = 0;
+#pragma DATA_SECTION(facchFrameCounter, ".extData");
+Int32 facchFrameCounter = 0;
+#pragma DATA_SECTION(rachFrameCounter, ".extData");
+Int32 rachFrameCounter = 0;
+#pragma DATA_SECTION(pdchFrameCounter, ".extData");
+Int32 pdchFrameCounter = 0;
+#pragma DATA_SECTION(prachFrameCounter, ".extData");
+Int32 prachFrameCounter = 0;
+#pragma DATA_SECTION(totalTchSamples, ".extData");
+Int32 totalTchSamples = 0;
+#pragma DATA_SECTION(totalCchSamples, ".extData");
+Int32 totalCchSamples = 0;
+#pragma DATA_SECTION(totalfacchSamples, ".extData");
+Int32 totalfacchSamples = 0;
+#pragma DATA_SECTION(totalRachSamples, ".extData");
+Int32 totalRachSamples = 0;
+#pragma DATA_SECTION(totalPdchSamples, ".extData");
+Int32 totalPdchSamples = 0;
+#pragma DATA_SECTION(totalPrachSamples, ".extData");
+Int32 totalPrachSamples = 0;
+#pragma DATA_SECTION(totalTchChanErrs, ".extData");
+Int32 totalTchChanErrs = 0;
+#pragma DATA_SECTION(totalCchChanErrs, ".extData");
+Int32 totalCchChanErrs = 0;
+#pragma DATA_SECTION(totalfacchChanErrs, ".extData");
+Int32 totalfacchChanErrs = 0;
+#pragma DATA_SECTION(totalRachChanErrs, ".extData");
+Int32 totalRachChanErrs = 0;
+#pragma DATA_SECTION(totalPdchChanErrs, ".extData");
+Int32 totalPdchChanErrs = 0;
+#pragma DATA_SECTION(totalPrachChanErrs, ".extData");
+Int32 totalPrachChanErrs = 0;
+#pragma DATA_SECTION(massiveTchFrameErr, ".extData");
+Int32 massiveTchFrameErr = 0;
+#pragma DATA_SECTION(massiveCchFrameErr, ".extData");
+Int32 massiveCchFrameErr = 0;
+
+Uint8 USFCodingTableCS23[8] =
+{0x00, 0x29, 0x1A, 0x33, 0x34, 0x1D, 0x2E, 0x07};
+
+Uint16 USFCodingTableCS4[8] =
+{0x0000, 0x0D0B, 0x06EC, 0x0BE7, 0x0BB0, 0x06BB, 0x0D5C, 0x0057};
+/* {0x0000, 0x0D0B, 0x06EC, 0x0B77, 0x0BB0, 0x06BB, 0x0B5C, 0x0057}; */
+
+
+Uint16 computeTotalErrors(Char *in, Char *out, Uint16 numbits);
+void copyByteSamples(Uint8 *in, Uint8 *out, Uint16 numbits);
+
+/*****************************************************************************
+** Routine Name: chanEncoder
+**
+** Description:
+** Performs the channel encoding for the specified channel as described in
+** GSM 05.03.
+**
+** Method:
+** Algorithms coded as specified in GSM 05.03.
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** chanSel - specifies the channel type to encode
+** frameBoundary - specifies if we are on a channel subframe frame boundary
+** TN - GSM timeslot number (0..7)
+**
+** Returns:
+** None
+**
+** Data Store I/O:
+** Unpacked BSIC array - g_codecBsic[0..5], Used for RACH encoding.
+** This array is initialized from g_BBInfo[trx].bsic in chanCodecInit.
+**
+** For CCH, SCH, and RACH channels, the following output buffer is used:
+**
+** g_DLCCHData.dlCCHword0.bitval.bufferValid
+** g_ULCCHData.data[i], for 0 <= i <= 7
+**
+** The input data and array used by this routine
+** is assummed in the following format with respect to bit order
+** within the array. See GSM 05.03. For RACH, N = 8.
+** For CCH, N = 184. For SCH, N = 25.
+**
+** polynomial power D^N-1 D^N-2 ...... D^2 D 1
+** data/parity bits d(0) d(1) ...... d(N-3) d(N-2) d(N-1)
+** array index 0 1 ...... N-3 N-2 N-1
+**
+*****************************************************************************/
+
+void chanEncoder(t_chanSel chanSel, Bool frameBoundary, Uint8 TN, Bool tx)
+{
+ Char parityBits[MAX_PARITY_BITS];
+ Char cnvEncInData[NUM_GPRS_CS4_CNV_ENC_IN_BITS];
+ Char cnvEncOutData[2*NUM_GPRS_CS3_CNV_ENC_IN_BITS];
+ UInt i, j;
+ Uint8 trx;
+ Uint8 temp;
+ UInt ii, jj;
+#if BER_TEST == 1
+ UChar k;
+#endif
+
+ t_TNInfo *ts;
+
+ trx = 0;
+
+ ts = & g_BBInfo[trx].TNInfo[TN];
+
+ /*
+ * for loopback test
+ g_DLTCHData.dltchword0.bitval.bufferValid = TRUE;
+ */
+
+ if(frameBoundary)
+ {
+ if(((chanSel != TCHF) && g_DLCCHData.bufferValid) ||
+ ((chanSel == TCHF) && g_DLTCHData.dltchword0.bitval.bufferValid))
+ {
+#if FIRE_TEST == 1
+ if((chanSel == TCHF) && (TN == 2) && ((tchFrameCounter % 1) == 0))
+ chanSel = FACCH;
+#endif
+#if PRACH_TEST == 1
+ if(chanSel == RACH)
+ chanSel = PRACH;
+#endif
+ switch(chanSel)
+ {
+ case TCHF:
+ /*
+ * Fullrate speech traffic channel
+ */
+ if(tx) g_intBuf8Deep.txBurstCount[TN] = 8;
+
+
+#if RANDOM_TEST == 1
+
+ for(i=0; i < NUM_BITS_TCH_FRAME; i++)
+ {
+ k = (rand() & 1);
+ g_DLTCHData.data[i] = k;
+ }
+#endif
+
+ /*
+ * Perform subjective encoding of speech parameters based
+ * on speech algorithm in use.
+ */
+ sbjEncoder(g_DLTCHData.data,
+ g_BBInfo[trx].TNInfo[TN].u.group1.tch.vocAlgo);
+
+ /*
+ * Invoke CRC Encoder. Put parity bits directly into Convolutional
+ * input buffer
+ */
+ //crcEncoderTCH(g_DLTCHData.data, & cnvEncInData[(NUM_BITS_TCH_CLASSI/2)]);
+ crcEncoder16(g_DLTCHData.data,
+ & cnvEncInData[(NUM_BITS_TCH_CLASSI/2)],
+ TCH_CRC_POLY,
+ NUM_TCH_PARITY_BITS,
+ NUM_TCH_CRC_IN_BITS,
+ 0xFFFF);
+
+
+ /*
+ * Copy input data into separate buffer in preparation
+ * of appending the parity bits. Data is reordered per GSM 05.03
+ * paragraph 3.1.2.1.
+ */
+ for(i=0; i<(NUM_BITS_TCH_CLASSI/2); i++)
+ {
+ cnvEncInData[i] = g_DLTCHData.data[2*i];
+ cnvEncInData[TCH_REORDER_MAX_INDEX-i] = g_DLTCHData.data[2*i+1];
+ }
+
+ /*
+ * Add tail bits
+ */
+ for(i=0; i<NUM_CNV_TAIL_BITS; i++)
+ {
+ cnvEncInData[TCH_START_OF_TAIL+i] = 0;
+ }
+
+ /*
+ * Execute the cnv encoder
+ */
+ cnvEncoder2(cnvEncInData,cnvEncOutData,NUM_TCH_CNV_ENC_IN_BITS);
+
+ /*
+ * Add the Class II bits to the encoded bits.
+ */
+ for(i=0; i<NUM_BITS_TCH_CLASSII; i++)
+ {
+ cnvEncOutData[NUM_TCH_CNV_ENC_OUT_BITS+i] =
+ g_DLTCHData.data[NUM_BITS_TCH_CLASSI+i];
+ }
+
+ /*
+ * Execute the TCH Interleaver with the stealing flag FALSE.
+ * Clear the Valid flag, indicating buffer has been processed.
+ */
+ blockDiagInterleaver8(cnvEncOutData, FALSE,
+ &g_intBuf8Deep.tchTXBurstIndex[TN],
+ g_intBuf8Deep.data[TN]);
+ g_DLTCHData.dltchword0.bitval.bufferValid = FALSE;
+ break;
+
+ case FACCH:
+ /*
+ * FACCH Message
+ */
+ if(tx) g_intBuf8Deep.txBurstCount[TN] = 8;
+
+ /*
+ * Invoke the CRC Encoder. Put parity bits directly into Convolutional
+ * input buffer
+ */
+ crcEncoderCCH(g_DLCCHData.data, & cnvEncInData[NUM_CCH_CRC_IN_BITS]);
+
+ /*
+ * Copy input data into seperate buffer in preparation
+ * of appending the parity bits
+ */
+ for(i=0; i<NUM_CCH_CRC_IN_BITS; i++)
+ {
+ cnvEncInData[i] = g_DLCCHData.data[i];
+ }
+
+ /*
+ * Add tail bits
+ */
+ for(i=0; i<NUM_CNV_TAIL_BITS; i++)
+ {
+ cnvEncInData[NUM_CCH_CRC_IN_BITS+NUM_CCH_PARITY_BITS+i] = 0;
+ }
+
+ /*
+ * Execute the cnv encoder
+ */
+ cnvEncoder2(cnvEncInData, cnvEncOutData, NUM_CCH_CNV_ENC_IN_BITS);
+
+ /*
+ * Execute the TCH Interleaver with the stealing flag TRUE.
+ * Clear the Valid flag for both the CCH ad TCH buffers since CCH
+ * was used and TCH was discarded (FACCH stole TCH).
+ */
+ blockDiagInterleaver8(cnvEncOutData, TRUE,
+ &g_intBuf8Deep.tchTXBurstIndex[TN],
+ g_intBuf8Deep.data[TN]);
+ g_DLTCHData.dltchword0.bitval.bufferValid = FALSE;
+ g_DLCCHData.bufferValid = FALSE;
+ break;
+
+ case PDCH:
+ case PDTCH:
+ case PACCH:
+
+ switch(g_DLCCHData.chCodec)
+ {
+ case GPRS_CS_1:
+
+#if RANDOM_TEST == 1
+ for(i=0; i < NUM_BITS_CCH_FRAME; i++)
+ {
+ k = (rand() & 1);
+ g_DLCCHData.data[i] = k;
+ }
+#endif
+
+ /*
+ * These channels all use the common CCH channel encoding
+ * algorithms
+ */
+
+ /*
+ * Invoke the CRC Encoder. Put parity bits directly into Convolutional
+ * input buffer
+ */
+ crcEncoderCCH(&g_DLCCHData.data[0], & cnvEncInData[NUM_CCH_CRC_IN_BITS]);
+
+ /*
+ * Copy input data into seperate buffer in preparation
+ * of appending the parity bits
+ */
+ for(i=0; i<NUM_CCH_CRC_IN_BITS; i++)
+ {
+ cnvEncInData[i] = g_DLCCHData.data[i];
+ }
+
+ /*
+ * Add tail bits
+ */
+ for(i=0; i<NUM_CNV_TAIL_BITS; i++)
+ {
+ cnvEncInData[NUM_CCH_CRC_IN_BITS+NUM_CCH_PARITY_BITS+i] = 0;
+ }
+
+
+ /*
+ * Execute the cnv encoder
+ */
+ cnvEncoder2(cnvEncInData, cnvEncOutData, NUM_CCH_CNV_ENC_IN_BITS);
+
+ break; /* end GPRS-CS1 */
+
+ /* do GPRS-CS2 */
+
+ case GPRS_CS_2:
+
+#if RANDOM_TEST == 1
+ for(i=6; i < NUM_GPRS_CS2_CRC_IN_BITS; i++)
+ {
+ k = (rand() & 1);
+ g_DLCCHData.data[i] = k;
+/* g_DLCCHData.data[i] = i & 1; */
+ }
+#endif
+
+/* USF begins &g_DLCCHData.data[3] */
+
+ crcEncoder16(& g_DLCCHData.data[3],
+ parityBits,
+ GPRS16_CRC_POLY,
+ NUM_GPRS_CS2_PARITY_BITS,
+ NUM_BITS_GPRS_CS2,
+ 0xFFFF);
+
+ /*
+ * unpack 6-bit PreCoded USF
+ */
+ unpackFromByteBuffer((Uint8 *)&USFCodingTableCS23[ts->u.group13.nextUsf],
+ (Uint8 *)&g_DLCCHData.data[0],
+ 6);
+
+ /*
+ * Copy input data into seperate buffer in preparation
+ * of appending the parity bits
+ */
+ for(i=0; i<NUM_GPRS_CS2_CRC_IN_BITS; i++)
+ {
+ cnvEncInData[i] = g_DLCCHData.data[i];
+ }
+
+ /*
+ * Append the parity bits to the data bits
+ */
+ for(i=NUM_GPRS_CS2_CRC_IN_BITS;
+ i<NUM_GPRS_CS2_CRC_IN_BITS+NUM_GPRS_CS2_PARITY_BITS; i++)
+ {
+ cnvEncInData[i] = parityBits[i-NUM_GPRS_CS2_CRC_IN_BITS];
+ }
+
+ /*
+ * Add tail bits
+ */
+ for(i=0; i<NUM_CNV_TAIL_BITS; i++)
+ {
+ cnvEncInData[NUM_GPRS_CS2_CRC_IN_BITS+NUM_GPRS_CS2_PARITY_BITS+i] = 0;
+ }
+
+ /*
+ * Execute the cnv encoder
+ */
+ cnvEncoder2(cnvEncInData, cnvEncOutData, NUM_GPRS_CS2_CNV_ENC_IN_BITS);
+
+/*
+*GPRS...puncture the convolutionally encoded bits
+*/
+#ifdef NOT_ASM_OPTIMIZED
+ j = 0;
+ ii = 15;
+ jj = 39;
+ for(i=0; i < (2*NUM_GPRS_CS2_CNV_ENC_IN_BITS); i++)
+ {
+ if(i != ii)
+ {
+ cnvEncOutData[j] = cnvEncOutData[i];
+ j++;
+ }
+ else
+ {
+ ii += 4;
+ if(ii == jj)
+ {
+ jj += 48;
+ ii += 4;
+ }
+ }
+ }
+#else
+ punctureGPRS(&cnvEncOutData[0],&cnvEncOutData[0],GPRS_CS_2);
+#endif
+
+ break; /* end GPRS-CS2 */
+
+ /* do GPRS-CS3 */
+
+ case GPRS_CS_3:
+
+#if RANDOM_TEST == 1
+ for(i=6; i < NUM_GPRS_CS3_CRC_IN_BITS; i++)
+ {
+ k = (rand() & 1);
+ g_DLCCHData.data[i] = k;
+/* g_DLCCHData.data[i] = i & 1; */
+ }
+#endif
+
+/* USF begins &g_DLCCHData.data[3] */
+
+ crcEncoder16(& g_DLCCHData.data[3],
+ parityBits,
+ GPRS16_CRC_POLY,
+ NUM_GPRS_CS3_PARITY_BITS,
+ NUM_BITS_GPRS_CS3,
+ 0xFFFF);
+
+ /*
+ * unpack 6-bit PreCoded USF
+ */
+ unpackFromByteBuffer((Uint8 *)&USFCodingTableCS23[ts->u.group13.nextUsf],
+ (Uint8 *)&g_DLCCHData.data[0],
+ 6);
+
+ /*
+ * Copy input data into seperate buffer in preparation
+ * of appending the parity bits
+ */
+
+#ifdef NOT_ASM_OPTIMIZED
+ for(i=0; i<NUM_GPRS_CS3_CRC_IN_BITS; i++)
+ {
+ cnvEncInData[i] = g_DLCCHData.data[i];
+ }
+#else
+ copyByteSamples( (Uint8 *) & g_DLCCHData.data[0], (Uint8 *) & cnvEncInData[0],
+ NUM_GPRS_CS3_CRC_IN_BITS);
+#endif
+
+ /*
+ * Append the parity bits to the data bits
+ */
+ for(i=NUM_GPRS_CS3_CRC_IN_BITS;
+ i<NUM_GPRS_CS3_CRC_IN_BITS+NUM_GPRS_CS3_PARITY_BITS; i++)
+ {
+ cnvEncInData[i] = parityBits[i-NUM_GPRS_CS3_CRC_IN_BITS];
+ }
+
+ /*
+ * Add tail bits
+ */
+ for(i=0; i<NUM_CNV_TAIL_BITS; i++)
+ {
+ cnvEncInData[NUM_GPRS_CS3_CRC_IN_BITS+NUM_GPRS_CS3_PARITY_BITS+i] = 0;
+ }
+
+ /*
+ * Execute the cnv encoder
+ */
+ cnvEncoder2(cnvEncInData, cnvEncOutData, NUM_GPRS_CS3_CNV_ENC_IN_BITS);
+
+/*
+*GPRS...puncture the convolutionally encoded bits
+*/
+#ifdef NOT_ASM_OPTIMIZED
+ j = 0;
+ ii = 15;
+ jj = 17;
+ for(i=0; i < (2*NUM_GPRS_CS3_CNV_ENC_IN_BITS); i++)
+ {
+ if((i != ii) && (i != jj))
+ {
+ cnvEncOutData[j] = cnvEncOutData[i];
+ j++;
+ }
+ else
+ {
+ if(i == ii)
+ ii += 6;
+ else
+ jj += 6;
+ }
+ }
+#else
+ punctureGPRS(&cnvEncOutData[0],&cnvEncOutData[0],GPRS_CS_3);
+#endif
+ break; /* end GPRS-CS3 */
+
+ /* do GPRS-CS4 */
+
+ case GPRS_CS_4:
+
+#if RANDOM_TEST == 1
+ for(i=12; i < NUM_GPRS_CS4_CRC_IN_BITS; i++)
+ {
+ k = (rand() & 1);
+ g_DLCCHData.data[i] = k;
+/* g_DLCCHData.data[i] = i & 1; */
+ }
+#endif
+
+/* USF begins &g_DLCCHData.data[9] */
+
+ crcEncoder16(& g_DLCCHData.data[9],
+ parityBits,
+ GPRS16_CRC_POLY,
+ NUM_GPRS_CS4_PARITY_BITS,
+ NUM_BITS_GPRS_CS4,
+/* NUM_GPRS_CS4_CRC_IN_BITS, */
+ 0xFFFF);
+
+ /*
+ * unpack 12-bit Precoded USF
+ */
+ unpackFromByteBuffer((Uint8 *)&USFCodingTableCS4[ts->u.group13.nextUsf],
+ (Uint8 *)&g_DLCCHData.data[0],
+ 12);
+
+
+ /*
+ * Copy input data into seperate buffer in preparation
+ * of appending the parity bits
+ */
+ for(i=0; i<NUM_GPRS_CS4_CRC_IN_BITS; i++)
+ {
+ cnvEncOutData[i] = g_DLCCHData.data[i];
+ }
+
+
+ /*
+ * Append the parity bits to the data bits
+ */
+ for(i=NUM_GPRS_CS4_CRC_IN_BITS;
+ i<NUM_GPRS_CS4_CRC_IN_BITS+NUM_GPRS_CS4_PARITY_BITS; i++)
+ {
+ cnvEncOutData[i] = parityBits[i-NUM_GPRS_CS4_CRC_IN_BITS];
+ }
+
+ /*
+ * No do cnv encoder for CS-4
+ */
+
+ break; /* end GPRS-CS4 */
+
+ } /* end GPRS chCodec switch */
+
+ if(g_DLCCHData.chCodec != GPRS_CS_1)
+ {
+ Uint8 ParityWord[2];
+
+ packToByteBuffer(parityBits,
+ ParityWord,
+ 16 );
+
+ sendDiagMsg(41, trx, TN, 2, ParityWord);
+ }
+
+ g_DLCCHData.codecFlags = g_GPRSCodecFlags[g_DLCCHData.chCodec];
+
+ /*
+ * Execute the CCH Interleaver
+ */
+ blockRectInterleaver(cnvEncOutData,
+ &g_intBuf8Deep.tchTXBurstIndex[TN],
+ g_intBuf8Deep.data[TN]);
+ g_DLCCHData.bufferValid = FALSE;
+
+ break; /* end PDCH Case */
+
+ case SACCH:
+ case SDCCH4:
+ case SDCCH8:
+ case BCCH:
+ case PCH:
+ case AGCH:
+ case PTCCH:
+ /*
+ * These channels all use the common CCH channel encoding
+ * algorithms
+ */
+
+
+#if RANDOM_TEST == 1
+ for(i=0; i < NUM_BITS_CCH_FRAME; i++)
+ {
+ k = (rand() & 1);
+ g_DLCCHData.data[i] = k;
+ }
+#endif
+
+ /*
+ * Invoke the CRC Encoder. Put parity bits directly into Convolutional
+ * input buffer
+ */
+ crcEncoderCCH(&g_DLCCHData.data[0], & cnvEncInData[NUM_CCH_CRC_IN_BITS]);
+
+ /*
+ * Copy input data into seperate buffer in preparation
+ * of appending the parity bits
+ */
+ for(i=0; i<NUM_CCH_CRC_IN_BITS; i++)
+ {
+ cnvEncInData[i] = g_DLCCHData.data[i];
+ }
+
+ /*
+ * Add tail bits
+ */
+ for(i=0; i<NUM_CNV_TAIL_BITS; i++)
+ {
+ cnvEncInData[NUM_CCH_CRC_IN_BITS+NUM_CCH_PARITY_BITS+i] = 0;
+ }
+
+ /*
+ * Execute the cnv encoder
+ */
+ cnvEncoder2(cnvEncInData, cnvEncOutData, NUM_CCH_CNV_ENC_IN_BITS);
+
+
+ g_DLCCHData.codecFlags = 0xFF;
+ /*
+ * Execute the CCH Interleaver
+ */
+ blockRectInterleaver(cnvEncOutData,
+ &g_intBuf4Deep.cchTXBurstIndex[TN],
+ g_intBuf4Deep.data[TN]);
+ g_DLCCHData.bufferValid = FALSE;
+ break;
+
+ case SCH:
+ /*
+ * Invoke the SCH CRC Encoder
+ */
+ //crcEncoderSCH(&g_DLCCHData.data[0], parityBits);
+ crcEncoder16(g_DLCCHData.data,
+ parityBits,
+ SCH_CRC_POLY,
+ NUM_SCH_PARITY_BITS,
+ NUM_SCH_CRC_IN_BITS,
+ 0xFFFF);
+
+ /*
+ * Copy input data into seperate buffer in preparation
+ * of appending the parity bits
+ */
+ for(i=0; i<NUM_SCH_CRC_IN_BITS; i++)
+ {
+ cnvEncInData[i] = g_DLCCHData.data[i];
+ }
+
+ /*
+ * Append the parity bits to the data bits
+ */
+ for(i=NUM_SCH_CRC_IN_BITS; i<NUM_SCH_CRC_IN_BITS+NUM_SCH_PARITY_BITS; i++)
+ {
+ cnvEncInData[i] = parityBits[i-NUM_SCH_CRC_IN_BITS];
+ }
+
+ /*
+ * Add tail bits
+ */
+ for(i=0; i<NUM_CNV_TAIL_BITS; i++)
+ {
+ cnvEncInData[NUM_SCH_CRC_IN_BITS+NUM_SCH_PARITY_BITS+i] = 0;
+ }
+
+ /*
+ * Execute the cnv encoder & set the TX bit field in the buffer
+ */
+ cnvEncoder2(cnvEncInData, (Char *)g_DLCodedData.data,
+ NUM_SCH_CNV_ENC_IN_BITS);
+ g_DLCodedData.tx = TRUE;
+ g_DLCCHData.bufferValid = FALSE;
+ break;
+
+ case RACH:
+ /*
+ * Perform the RACH channel coding in support of RF loopback with
+ * access bursts
+ */
+#if RANDOM_TEST == 1
+ for(i=0; i < NUM_BITS_RACH_FRAME; i++)
+ {
+ k = (rand() & 1);
+ g_DLCCHData.data[i] = k;
+ }
+#endif
+ crcEncoder16(g_DLCCHData.data,
+ parityBits,
+ RACH_CRC_POLY,
+ NUM_RACH_PARITY_BITS,
+ NUM_RACH_CRC_IN_BITS,
+ 0xFFFF);
+
+
+ /*
+ * Copy input data into seperate buffer in preparation
+ * of appending the parity bits
+ */
+ for(i=0; i<NUM_RACH_CRC_IN_BITS; i++)
+ {
+ cnvEncInData[i] = g_DLCCHData.data[i];
+ }
+
+ /*
+ * Perform the modulo 2 addition of the bsic, and append the parity
+ * bits to the data bits
+ */
+ for(i=NUM_RACH_CRC_IN_BITS; i<NUM_RACH_CRC_IN_BITS+NUM_RACH_PARITY_BITS; i++)
+ {
+ cnvEncInData[i] = (parityBits[i-NUM_RACH_CRC_IN_BITS] +
+ g_codecBsic[i-NUM_RACH_CRC_IN_BITS]) & MODULO_2_MASK;
+ }
+
+ /*
+ * Add tail bits
+ */
+ for(i=0; i<NUM_CNV_TAIL_BITS; i++)
+ {
+ cnvEncInData[NUM_RACH_CRC_IN_BITS+NUM_RACH_PARITY_BITS+i] = 0;
+ }
+
+ /*
+ * Execute the cnv encoder & set the TX bit field in the buffer
+ */
+ cnvEncoder2(cnvEncInData, (Char *)g_DLCodedData.data,
+ NUM_RACH_CNV_ENC_IN_BITS);
+ g_DLCodedData.tx = TRUE;
+ g_DLCCHData.bufferValid = FALSE;
+ break;
+
+ case PRACH:
+ /*
+ * Perform the RACH channel coding in support of RF loopback with
+ * access bursts
+ */
+
+#if RANDOM_TEST == 1
+ for(i=0; i < NUM_BITS_PRACH_FRAME; i++)
+ {
+ k = (rand() & 1);
+ g_DLCCHData.data[i] = k;
+ }
+#endif
+
+ crcEncoder16(g_DLCCHData.data,
+ parityBits,
+ RACH_CRC_POLY,
+ NUM_RACH_PARITY_BITS,
+ NUM_PRACH_CRC_IN_BITS,
+ 0xFFFF);
+
+ /*
+ * Copy input data into seperate buffer in preparation
+ * of appending the parity bits
+ */
+ for(i=0; i<NUM_PRACH_CRC_IN_BITS; i++)
+ {
+ cnvEncInData[i] = g_DLCCHData.data[i];
+ }
+ /*
+ * Perform the modulo 2 addition of the bsic, and append the parity
+ * bits to the data bits
+ */
+ for(i=NUM_PRACH_CRC_IN_BITS; i<NUM_PRACH_CRC_IN_BITS+NUM_RACH_PARITY_BITS; i++)
+ {
+ cnvEncInData[i] = (parityBits[i-NUM_PRACH_CRC_IN_BITS] +
+ g_codecBsic[i-NUM_PRACH_CRC_IN_BITS]) & MODULO_2_MASK;
+ }
+
+ /*
+ * Add tail bits
+ */
+ for(i=0; i<NUM_CNV_TAIL_BITS; i++)
+ {
+ cnvEncInData[NUM_PRACH_CRC_IN_BITS+NUM_RACH_PARITY_BITS+i] = 0;
+ }
+
+ /*
+ * Execute the cnv encoder & set the TX bit field in the buffer
+ */
+ cnvEncoder2(cnvEncInData, (Char *)g_DLCodedData.data,
+ NUM_RACH_CNV_ENC_IN_BITS+NUM_RACH_GPRS_ADD_BITS);
+/*
+*GPRS...puncture the convolutionally encoded bits..pattern = 0,2,5,..,37,39,41
+*/
+ j = 0;
+ ii = 0;
+ for(i=0; i < 2*(NUM_RACH_CNV_ENC_IN_BITS+NUM_RACH_GPRS_ADD_BITS); i++)
+ {
+ if(i != GPRSPrachPunctureBits[ii])
+ {
+ g_DLCodedData.data[j] = g_DLCodedData.data[i];
+ j++;
+ }
+ else
+ ii++;
+ }
+ g_DLCodedData.tx = TRUE;
+ g_DLCCHData.bufferValid = FALSE;
+ break;
+
+ case IDLE:
+ /*
+ * Channel CODEC not involved here. A dummy burst will be transmitted
+ */
+ break;
+
+ default:
+ /*
+ * Other channel types are not yet supported, return error
+ * message
+ */
+ break;
+ }
+ }
+ else
+ {
+ /*
+ * Buffer is not ready to be processed. Load a "zero" or fill
+ * frame into the interleaver buffer
+ */
+ for(i=0; i<NUM_BURSTS_PER_CCH_BLOCK; i++)
+ {
+ for(j=0; j<NB_NUM_ENCRYPT_WORDS; j++)
+ {
+ g_intBuf4Deep.data[TN][i][j] = 0x0000;
+ }
+ }
+ }
+ }
+
+ /*
+ * Based on chanSel and TN Output the appropriate burst from the interleaver
+ * buffer to the burst builder input buffer
+ */
+ burstLoader(chanSel, TN, frameBoundary);
+
+}
+
+/*****************************************************************************
+** Routine Name: chanDecoder
+**
+** Description:
+** Performs the channel decoding for the specified channel.
+**
+** Method:
+** Algorithms are inverses of those encoding algorithms as specified
+** in GSM 05.03.
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** chanSel - specifies the channel type to encode
+** frameBoundary - specifies if we are on a channel subframe frame boundary
+** TN - GSM timeslot number (0..7)
+**
+** Returns:
+** achDetect - This boolean variable indicates if a FACCH or RACH has
+** been detected by the Channel Decoder.
+**
+** Data Store I/O:
+** TDMA frame number - sysFrameNum.FN, Read only and placed
+** into the uplink buffers to indicate the frame on which the frame
+** was recieved.
+**
+** Unpacked BSIC array - g_codecBsic[0..5], Used for RACH decoding.
+** This array is initialized from g_BBInfo[trx].bsic in chanCodecInit.
+**
+** For RACH channels, the following output buffer is updated:
+**
+** g_ULRACHData.ulRACHword0.bitval.bufferValid
+** g_ULRACHData.ulRACHword0.bitval.rachDet
+** g_ULRACHData.ulRACHword0.bitval.spare
+** g_ULRACHData.ulRACHword0.bitval.bfi
+** g_ULRACHData.ulRACHword0.bitval.crc
+** g_ULRACHData.nErrs
+** g_ULRACHData.metric
+** g_ULRACHData.frameNumber
+** g_ULRACHData.data[i], for 0 <= i <= 7
+**
+** The output data and array used by this routine
+** is assummed in the following format with respect to bit order
+** within the array. See GSM 05.03. For RACH, N = 8.
+**
+** polynomial power D^N-1 D^N-2 ...... D^2 D 1
+** data/parity bits d(0) d(1) ...... d(N-3) d(N-2) d(N-1)
+** array index 0 1 ...... N-3 N-2 N-1
+**
+** For CCH channels, the following output buffer is updated:
+**
+** g_ULCCHData.ulCCHword0.bitval.bufferValid
+** g_ULCCHData.ulCCHword0.bitval.spare
+** g_ULCCHData.ulCCHword0.bitval.fireStatus
+** g_ULCCHData.nErrs
+** g_ULCCHData.metric
+** g_ULCCHData.frameNumber
+** g_ULCCHData.data[i], for 0 <= i <= 7
+**
+** The output data array is in the same format as desribed above
+** for the RACH case. For CCH, N = 184.
+**
+*****************************************************************************/
+
+Uint8 g_useFireDecoder = 0;
+
+Bool chanDecoder(t_chanSel chanSel, Bool frameBoundary, UInt TN)
+{
+ Char parityBits[MAX_PARITY_BITS];
+ Char cnvDecInData[2*NUM_GPRS_CS3_CNV_ENC_IN_BITS];
+ Char cnvDecOutData[NUM_GPRS_CS3_CNV_ENC_IN_BITS];
+ Char cnvEncOutTestData[2*NUM_GPRS_CS3_CNV_ENC_IN_BITS];
+ UInt totalErrors;
+ UInt metric;
+ Bool parityError;
+ Uint16 i,j;
+ Bool achDetect;
+ Uint8 trx;
+ Uint8 cs1Errors;
+ Uint8 codecFlags;
+ Uint16 tempUsfCode;
+ UInt ii,jj;
+ Bool mask;
+ Uint8 tempBuf[48];
+ trx = 0;
+ achDetect = FALSE;
+
+
+
+ /*
+ * Based on chanSel and TN load the appropriate deinterleaver
+ * buffer with the demodulated burst data
+ */
+ deinterleaverLoader(chanSel, TN, frameBoundary);
+
+ if(frameBoundary)
+ {
+#if PRACH_TEST == 1
+ if(chanSel == RACH)
+ chanSel = PRACH;
+#endif
+ switch(chanSel)
+ {
+ case TCHF:
+ /*
+ * This could be TCHF of FACCH channel, depending on the stealing
+ * flags recovered from the received frame.
+ */
+
+ /*
+ * Execute the deinterleaving. Returns # of stealing flags that
+ * were TRUE out of 8 max. Any value other than 0 or 8 indicate
+ * bit errors.
+ */
+ totalErrors = blockDiagDeinterleaver8(g_deintBuf8Deep.data[TN],
+ &g_deintBuf8Deep.tchRXBurstIndex[TN],
+ cnvDecInData);
+
+ /*
+ * Threshold stealing flags and decide if TCH of FACCH is received.
+ */
+ if (totalErrors > STEALING_FLAG_THRESH)
+ {
+ /*
+ * Frame is FACCH
+ */
+ totalErrors = MAX_STEALING_FLAGS - totalErrors;
+
+#if BER_TEST == 1
+ facchFrameCounter++;
+#endif
+#if FIRE_TEST == 1
+ cnvDecInData[80] = -cnvDecInData[80];
+ cnvDecInData[81] = -cnvDecInData[81];
+ cnvDecInData[82] = -cnvDecInData[82];
+ cnvDecInData[83] = -cnvDecInData[83];
+ cnvDecInData[84] = -cnvDecInData[84];
+ cnvDecInData[85] = -cnvDecInData[85];
+ cnvDecInData[86] = -cnvDecInData[86];
+ cnvDecInData[87] = -cnvDecInData[87];
+#endif
+
+ /*
+ * Execute the cnv decoder
+ */
+ metric = cnvDecoder2(cnvDecInData, cnvDecOutData,
+ NUM_CCH_CNV_DEC_OUT_BITS);
+
+ /*
+ * Perform the reconvolution and update the number of
+ * estimated bit errors
+ */
+ cnvEncoder2(cnvDecOutData, cnvEncOutTestData,
+ NUM_CCH_CNV_ENC_IN_BITS);
+
+/* Call Optimized Assembly Function to Compute Errors */
+
+#ifdef NOT_ASM_OPTIMIZED
+ for(i=0; i<NUM_CCH_CNV_ENC_OUT_BITS; i++)
+ {
+ if((cnvDecInData[i]<0) != cnvEncOutTestData[i])
+ {
+ totalErrors += 1;
+ }
+ }
+#else
+ totalErrors += computeTotalErrors(&cnvEncOutTestData[0],
+ &cnvDecInData[0],NUM_CCH_CNV_ENC_OUT_BITS);
+#endif
+
+#if BER_TEST == 1
+ if(facchFrameCounter > 22)
+ {
+ totalfacchSamples += NUM_CCH_CNV_ENC_OUT_BITS;
+ totalfacchChanErrs += totalErrors;
+ }
+#endif
+ /*
+ * Invoke the CRC Decoder
+ */
+ if(g_useFireDecoder && g_ULCCHFireData.fireStatus == NO_ERROR_CORRECT)
+ {
+ /*
+ * using fire decoder error detect
+ */
+ parityError = fireDecoderCCHDetect(trx, TN, chanSel, cnvDecOutData);
+
+ if(g_ULCCHFireData.fireStatus == DO_ERROR_CORRECT2)
+ {
+ /*
+ * if a correctable error found, this buffer is not valid yet
+ */
+/* new 7/6/00..hpines..always assume valid for diag purposes and reverse later */
+
+ g_ULCCHData.ulcchword0.bitval.bufferValid = TRUE;
+ }
+ else
+ {
+ /*
+ * otherwise, this buffer is valid
+ */
+ g_ULCCHData.ulcchword0.bitval.bufferValid = TRUE;
+ }
+ }
+ else
+ {
+ parityError = crcDecoderCCH(cnvDecOutData, parityBits);
+ g_ULCCHData.ulcchword0.bitval.bufferValid = TRUE;
+ }
+
+ /*
+ * Update the TCH data buffer appropriately since the TCH
+ * frame has been stolen.
+ */
+ g_ULTCHData.ultchword0.bitval.bufferValid = FALSE;
+ g_ULTCHData.ultchword0.bitval.bfi = TRUE;
+
+ /*
+ * Update the output data buffer
+ */
+ g_ULCCHData.ulcchword0.bitval.bfi = parityError; /*is this needed?*/
+#if BER_TEST == 1
+ if((facchFrameCounter > 22) && (!g_useFireDecoder))
+ badfacchFrameCounter += g_ULCCHData.ulcchword0.bitval.bfi;
+#endif
+ g_ULCCHData.ulcchword0.bitval.fireStatus = parityError;
+ g_ULCCHData.ulcchword0.bitval.spare = 0;
+ g_ULCCHData.ulcchword0.bitval.spare2 = 0;
+ g_ULCCHData.nErrs = totalErrors;
+ g_ULCCHData.metric = metric;
+ g_ULCCHData.T1 = sysFrameNum.t1;
+ g_ULCCHData.T2 = sysFrameNum.t2;
+ g_ULCCHData.T3 = sysFrameNum.t3;
+ achDetect = TRUE;
+#ifdef NOT_ASM_OPTIMIZED
+ for(i=0; i<NUM_BITS_CCH_FRAME; i++)
+ {
+ g_ULCCHData.data[i] = cnvDecOutData[i];
+ }
+#else
+ copyByteSamples( (Uint8 *) & cnvDecOutData[0], (Uint8 *) & g_ULCCHData.data[0],
+ NUM_BITS_CCH_FRAME);
+#endif
+ }
+ else
+ {
+#if BER_TEST == 1
+ tchFrameCounter++;
+#endif
+ /*
+ * Frame is TCH - Execute the cnv decoder
+ */
+ metric = cnvDecoder2(cnvDecInData, cnvDecOutData,
+ NUM_TCH_CNV_DEC_OUT_BITS);
+
+ /*
+ * Perform the reconvolution and update the number
+ * of estimated bit errors
+ */
+ cnvEncoder2(cnvDecOutData, cnvEncOutTestData,
+ NUM_TCH_CNV_ENC_IN_BITS);
+
+ /* Call Optimized Assembly Function to Compute Errors */
+
+#ifdef NOT_ASM_OPTIMIZED
+ for(i=0; i<NUM_TCH_CNV_ENC_OUT_BITS; i++)
+ {
+ if((cnvDecInData[i]<0) != cnvEncOutTestData[i])
+ {
+ totalErrors += 1;
+ }
+ }
+#else
+ totalErrors += computeTotalErrors(&cnvEncOutTestData[0],
+ &cnvDecInData[0],NUM_TCH_CNV_ENC_OUT_BITS);
+#endif
+
+ /*
+ * Move the ClassIa bits into the result buffer.
+ * Data is reordered per GSM 05.03 paragraph 3.1.2.1.
+ */
+ for(i=0; i<(NUM_TCH_CRC_IN_BITS/2); i++)
+ {
+ g_ULTCHData.data[2*i] = cnvDecOutData[i];
+ g_ULTCHData.data[2*i+1] =
+ cnvDecOutData[TCH_REORDER_MAX_INDEX-i];
+ }
+
+ /*
+ * Add the parity bits to the ClassIa bits for CRC check.
+ */
+ for(i=0; i<NUM_TCH_PARITY_BITS; i++)
+ {
+ g_ULTCHData.data[i+NUM_TCH_CRC_IN_BITS] =
+ cnvDecOutData[i+(NUM_BITS_TCH_CLASSI/2)];
+ }
+
+ /*
+ * Invoke the CRC Decoder
+ */
+ //parityError = crcDecoderTCH(g_ULTCHData.data, parityBits);
+
+ parityError = crcDecoder16(& g_ULTCHData.data[0], /* input data bits */
+ & g_ULTCHData.data[NUM_TCH_CRC_IN_BITS], /* input parity bits */
+ TCH_CRC_POLY,
+ NUM_TCH_PARITY_BITS,
+ NUM_TCH_CRC_IN_BITS,
+ 0xFFFF);
+
+
+ /*
+ * Add the ClassIb bits to the result buffer. Note that the
+ * previously written parity bits are now over-written.
+ */
+ for(i=(NUM_TCH_CRC_IN_BITS/2); i<(NUM_BITS_TCH_CLASSI/2); i++)
+ {
+ g_ULTCHData.data[2*i] = cnvDecOutData[i];
+ g_ULTCHData.data[2*i+1] =
+ cnvDecOutData[TCH_REORDER_MAX_INDEX-i];
+ }
+
+ /*
+ * Add the ClassII bits to the decoded bits.
+ */
+ for(i=0; i<NUM_BITS_TCH_CLASSII; i++)
+ {
+ g_ULTCHData.data[NUM_BITS_TCH_CLASSI+i] =
+ (cnvDecInData[NUM_TCH_CNV_DEC_IN_BITS+i] < 0) ? 1 : 0;
+ }
+
+ /*
+ * Perform subjective decoding of speech parameters based
+ * on speech algorithm in use.
+ * Also, Check Parity Error within speech frame(GSM EFR)
+ */
+ if( parityError == 0)
+ {
+ parityError = sbjDecoder(g_ULTCHData.data,
+ g_BBInfo[trx].TNInfo[TN].u.group1.tch.vocAlgo, TN);
+ }
+ /*
+ * Perform Bad Frame detection and decide perceptual masking
+ */
+ g_ULTCHData.ultchword0.bitval.bfi =
+ detectBFI(chanSel, parityError, metric, totalErrors, &mask);
+ g_ULTCHData.ultchword0.bitval.mask = mask;
+
+#if BER_TEST == 1
+ if(tchFrameCounter > 22)
+ {
+ totalTchSamples += NUM_TCH_CNV_ENC_OUT_BITS;
+ totalTchChanErrs += totalErrors;
+ if(totalErrors > 36)massiveTchFrameErr++;
+ badTchFrameCounter += g_ULTCHData.ultchword0.bitval.bfi;
+ if(metric < 0x600) badTchMetricCounter++;
+ }
+#endif
+ /*
+ * Update the output data buffer
+ */
+ g_ULTCHData.ultchword0.bitval.bufferValid = TRUE;
+ g_ULTCHData.ultchword0.bitval.parityStatus = parityError;
+ g_ULTCHData.ultchword0.bitval.sid = 0;
+ g_ULTCHData.ultchword0.bitval.spare = 0;
+ g_ULTCHData.nErrs = totalErrors;
+ g_ULTCHData.metric = metric;
+ }
+ break;
+
+ case SACCH:
+ case SDCCH4:
+ case SDCCH8:
+ case BCCH:
+ case PCH:
+ case AGCH:
+ /*
+ * These channels all use the common CCH channel decoding
+ * algorithms
+ */
+
+#if BER_TEST == 1
+ cchFrameCounter++;
+#endif
+ /*
+ * Execute the deinterleaving
+ */
+ totalErrors = blockRectDeinterleaver(g_deintBuf4Deep.data[TN],
+ &g_deintBuf4Deep.cchRXBurstIndex[TN],
+ cnvDecInData);
+
+ /*
+ * fix 7/1/99...correct total errors update for steal flags
+ */
+ totalErrors = MAX_STEALING_FLAGS - totalErrors;
+
+#if FIRE_TEST == 2
+ if(chanSel == SDCCH4)
+ {
+ cnvDecInData[80] = -cnvDecInData[80];
+ cnvDecInData[81] = -cnvDecInData[81];
+ cnvDecInData[82] = -cnvDecInData[82];
+ cnvDecInData[83] = -cnvDecInData[83];
+ cnvDecInData[84] = -cnvDecInData[84];
+ cnvDecInData[85] = -cnvDecInData[85];
+ cnvDecInData[86] = -cnvDecInData[86];
+ cnvDecInData[87] = -cnvDecInData[87];
+ }
+#endif
+
+ /*
+ * Execute the cnv decoder
+ */
+ metric = cnvDecoder2(cnvDecInData, cnvDecOutData,
+ NUM_CCH_CNV_DEC_OUT_BITS);
+
+ /*
+ * Perform the reconvolution and update the number
+ * of estimated bit errors
+ */
+ cnvEncoder2(cnvDecOutData, cnvEncOutTestData,
+ NUM_CCH_CNV_ENC_IN_BITS);
+
+/* Call Optimized Assembly Function to Compute Errors */
+
+#ifdef NOT_ASM_OPTIMIZED
+ for(i=0; i<NUM_CCH_CNV_ENC_OUT_BITS; i++)
+ {
+ if((cnvDecInData[i]<0) != cnvEncOutTestData[i])
+ {
+ totalErrors += 1;
+ }
+ }
+#else
+ totalErrors += computeTotalErrors(&cnvEncOutTestData[0],
+ &cnvDecInData[0],NUM_CCH_CNV_ENC_OUT_BITS);
+#endif
+
+ /*
+ * Invoke the CRC Decoder
+ */
+ if(g_useFireDecoder && g_ULCCHFireData.fireStatus == NO_ERROR_CORRECT)
+ {
+ /*
+ * using fire decoder error detect
+ */
+ parityError = fireDecoderCCHDetect(trx, TN, chanSel, cnvDecOutData);
+
+ if(g_ULCCHFireData.fireStatus == DO_ERROR_CORRECT2)
+ {
+ /*
+ * if a correctable error found, this buffer is not valid yet
+ */
+/* new 7/6/00..hpines..always assume valid for diag purposes and reverse later */
+ g_ULCCHData.ulcchword0.bitval.bufferValid = TRUE;
+ }
+ else
+ {
+ /*
+ * otherwise, this buffer is valid
+ */
+ g_ULCCHData.ulcchword0.bitval.bufferValid = TRUE;
+ }
+ }
+ else
+ {
+ parityError = crcDecoderCCH(cnvDecOutData, parityBits);
+ g_ULCCHData.ulcchword0.bitval.bufferValid = TRUE;
+ }
+
+#if BER_TEST == 1
+ if(cchFrameCounter > 22)
+ {
+ totalCchSamples += NUM_CCH_CNV_ENC_OUT_BITS;
+ totalCchChanErrs += totalErrors;
+ if(!g_useFireDecoder)badCchFrameCounter += parityError;
+ if(totalErrors > 36)massiveCchFrameErr++;
+ }
+#endif
+ /*
+ * Update the output data buffer
+ */
+ g_ULCCHData.ulcchword0.bitval.bfi = parityError; /*is this needed?*/
+ g_ULCCHData.ulcchword0.bitval.fireStatus = parityError;
+ g_ULCCHData.ulcchword0.bitval.spare = 0;
+ g_ULCCHData.ulcchword0.bitval.spare2 = 0;
+ g_ULCCHData.nErrs = totalErrors;
+ g_ULCCHData.metric = metric;
+ g_ULCCHData.T1 = sysFrameNum.t1;
+ g_ULCCHData.T2 = sysFrameNum.t2;
+ g_ULCCHData.T3 = sysFrameNum.t3;
+
+#ifdef NOT_ASM_OPTIMIZED
+ for(i=0; i<NUM_BITS_CCH_FRAME; i++)
+ {
+ g_ULCCHData.data[i] = cnvDecOutData[i];
+ }
+#else
+ copyByteSamples( (Uint8 *) & cnvDecOutData[0], (Uint8 *) & g_ULCCHData.data[0],
+ NUM_BITS_CCH_FRAME);
+#endif
+ break;
+
+ case PDCH:
+ case PDTCH:
+#if BER_TEST == 1
+ pdchFrameCounter++;
+#endif
+ /*
+ * These channels all use the common CCH channel decoding
+ * algorithms
+ */
+
+ /*
+ * Execute the deinterleaving
+ */
+ totalErrors = blockRectDeinterleaver(g_deintBuf8Deep.data[TN],
+ &g_deintBuf8Deep.tchRXBurstIndex[TN],
+ cnvDecInData);
+#undef NOT_USED
+
+ /*
+ * Try to find out what kind of CODEC used
+ */
+ for(j=GPRS_CS_1; j<GPRS_CODEC_TYPE; j++)
+ {
+ totalErrors = 0;
+ codecFlags = g_ULCCHData.codecFlags ^ g_GPRSCodecFlags[j];
+ /*
+ * it is a GPRS_CS_1 code
+ */
+ for(i=0; i<8; i++)
+ {
+ totalErrors += (codecFlags>>i) & 0x01;
+ }
+ if(totalErrors < 4)
+ {
+ g_ULCCHData.chCodec = j;
+ break;
+ }
+ }
+
+#ifdef NOT_USED
+ /*
+ * Codec is either CS-1 or assigned other GPRS Codec
+ */
+// codecFlags = g_ULCCHData.codecFlags ^ g_GPRSCodecFlags[GPRS_CS_1];
+ /*
+ * it is a GPRS_CS_1 code ?
+ */
+// cs1Errors = 0;
+
+// for(i=0; i<8; i++)
+// {
+// cs1Errors += (codecFlags>>i) & 0x01;
+// }
+
+// codecFlags = g_ULCCHData.codecFlags ^ g_GPRSCodecFlags[g_ULCCHData.chCodec];
+ /*
+ * or Assigned Codec
+ */
+// totalErrors = 0;
+
+// for(i=0; i<8; i++)
+// {
+// totalErrors += (codecFlags>>i) & 0x01;
+// }
+
+
+// if(totalErrors >= cs1Errors)
+// {
+// g_ULCCHData.chCodec = GPRS_CS_1;
+// totalErrors = cs1Errors;
+//
+// }
+#endif
+
+ switch(g_ULCCHData.chCodec)
+ {
+ case GPRS_CS_1:
+
+ /*
+ * Execute the cnv decoder
+ */
+ metric = cnvDecoder2(cnvDecInData, cnvDecOutData,
+ NUM_CCH_CNV_DEC_OUT_BITS);
+
+ /*
+ * Perform the reconvolution and update the number
+ * of estimated bit errors
+ */
+
+ cnvEncoder2(cnvDecOutData, cnvEncOutTestData,
+ NUM_CCH_CNV_ENC_IN_BITS);
+
+/* Call Optimized Assembly Function to Compute Errors */
+
+#ifdef NOT_ASM_OPTIMIZED
+ for(i=0; i<NUM_CCH_CNV_ENC_OUT_BITS; i++)
+ {
+ if((cnvDecInData[i]<0) != cnvEncOutTestData[i])
+ {
+ totalErrors += 1;
+ }
+ }
+#else
+ totalErrors += computeTotalErrors(&cnvEncOutTestData[0],
+ &cnvDecInData[0],NUM_CCH_CNV_ENC_OUT_BITS);
+#endif
+ /*
+ * Invoke the CRC Decoder
+ */
+
+ parityError = crcDecoderCCH(cnvDecOutData, parityBits);
+
+#ifdef NOT_ASM_OPTIMIZED
+ for(i=0; i<NUM_BITS_CCH_FRAME; i++)
+ {
+ g_ULCCHData.data[i] = cnvDecOutData[i];
+ }
+#else
+ copyByteSamples( (Uint8 *) & cnvDecOutData[0], (Uint8 *) & g_ULCCHData.data[0],
+ NUM_BITS_CCH_FRAME);
+#endif
+
+ break; /* end GPRS-CS1 */
+
+ case GPRS_CS_2:
+
+/*
+*GPRS...replace punctured bits with 0
+*/
+#ifdef NOT_ASM_OPTIMIZED
+ j = 0;
+ ii = 15;
+ jj = 39;
+ for(i=0; i < (2*NUM_GPRS_CS2_CNV_ENC_IN_BITS);i++)
+ {
+ if(i != ii)
+ {
+ cnvEncOutTestData[i] = cnvDecInData[j];
+ j++;
+ }
+ else
+ {
+ cnvEncOutTestData[i] = 0;
+ ii += 4;
+ if(ii == jj)
+ {
+ jj += 48;
+ ii += 4;
+ }
+ }
+ }
+#else
+ restorePunctureGPRS(&cnvDecInData[0],&cnvEncOutTestData[0],GPRS_CS_2);
+#endif
+ /*
+ * Execute the cnv decoder
+ */
+ metric = cnvDecoder2(cnvEncOutTestData, cnvDecOutData,
+ NUM_GPRS_CS2_CNV_ENC_IN_BITS );
+
+ /*
+ * Perform the reconvolution and update the number
+ * of estimated bit errors
+ */
+
+ cnvEncoder2(cnvDecOutData, cnvEncOutTestData,
+ NUM_GPRS_CS2_CNV_ENC_IN_BITS );
+
+/*
+*GPRS...puncture the convolutionally encoded bits
+*/
+#ifdef NOT_ASM_OPTIMIZED
+ j = 0;
+ ii = 15;
+ jj = 39;
+ for(i=0; i < (2*NUM_GPRS_CS2_CNV_ENC_IN_BITS); i++)
+ {
+ if(i != ii)
+ {
+ cnvEncOutTestData[j] = cnvEncOutTestData[i];
+ j++;
+ }
+ else
+ {
+ ii += 4;
+ if(ii == jj)
+ {
+ jj += 48;
+ ii += 4;
+ }
+ }
+ }
+
+
+#else
+ punctureGPRS(&cnvEncOutTestData[0],&cnvEncOutTestData[0],GPRS_CS_2);
+#endif
+
+/* Call Optimized Assembly Function to Compute Errors */
+
+#ifdef NOT_ASM_OPTIMIZED
+ for(i=0; i<NUM_CCH_CNV_ENC_OUT_BITS; i++)
+ {
+ if((cnvDecInData[i]<0) != cnvEncOutTestData[i])
+ {
+ totalErrors += 1;
+ }
+ }
+#else
+ totalErrors += computeTotalErrors(&cnvEncOutTestData[0],
+ &cnvDecInData[0],NUM_CCH_CNV_ENC_OUT_BITS);
+#endif
+ /*
+ * decode precoded first 3 bits of a RLC Packet for CS2
+ */
+ tempUsfCode = 0;
+ packToByteBuffer(cnvDecOutData, (Uint8 *) & tempUsfCode, 6);
+
+ for(i=0; i<8; i++)
+ {
+ if(tempUsfCode == USFCodingTableCS23[i])
+ {
+ unpackFromByteBuffer( (Uint8 *) & i, & cnvDecOutData[3], 3);
+ break;
+ }
+ }
+
+ parityError = crcDecoder16(& cnvDecOutData[3],
+ & cnvDecOutData[NUM_GPRS_CS2_CRC_IN_BITS],
+ GPRS16_CRC_POLY,
+ NUM_GPRS_CS2_PARITY_BITS,
+ NUM_BITS_GPRS_CS2,
+ 0xFFFF);
+
+#ifdef NOT_ASM_OPTIMIZED
+ for(i=0; i<NUM_GPRS_CS2_CRC_IN_BITS; i++)
+ {
+ g_ULCCHData.data[i] = cnvDecOutData[i];
+ }
+#else
+ copyByteSamples( (Uint8 *) & cnvDecOutData[3], (Uint8 *) & g_ULCCHData.data[0],
+ NUM_BITS_GPRS_CS2);
+#endif
+
+ break; /* end GPRS-CS2 */
+
+ case GPRS_CS_3:
+/*
+*GPRS...replace punctured bits with 0
+*/
+#ifdef NOT_ASM_OPTIMIZED
+ j = 0;
+ ii = 15;
+ jj = 17;
+ for(i=0; i < (2*NUM_GPRS_CS3_CNV_ENC_IN_BITS);i++)
+ {
+ if((i != ii) && (i != jj))
+ {
+ cnvEncOutTestData[i] = cnvDecInData[j];
+ j++;
+ }
+ else
+ {
+ cnvEncOutTestData[i] = 0;
+ if(i == ii)
+ ii += 6;
+ else
+ jj += 6;
+ }
+ }
+#else
+ restorePunctureGPRS(&cnvDecInData[0],&cnvEncOutTestData[0],GPRS_CS_3);
+#endif
+ /*
+ * Execute the cnv decoder
+ */
+ metric = cnvDecoder2(cnvEncOutTestData, cnvDecOutData,
+ NUM_GPRS_CS3_CNV_ENC_IN_BITS );
+
+ /*
+ * Perform the reconvolution and update the number
+ * of estimated bit errors
+ */
+
+ cnvEncoder2(cnvDecOutData, cnvEncOutTestData,
+ NUM_GPRS_CS3_CNV_ENC_IN_BITS );
+
+
+/*
+*GPRS...puncture the convolutionally encoded bits
+*/
+
+#ifdef NOT_ASM_OPTIMIZED
+ j = 0;
+ ii = 15;
+ jj = 17;
+ for(i=0; i < (2*NUM_GPRS_CS3_CNV_ENC_IN_BITS); i++)
+ {
+ if((i != ii) && (i != jj))
+ {
+ cnvEncOutTestData[j] = cnvEncOutTestData[i];
+ j++;
+ }
+ else
+ {
+ if(i == ii)
+ ii += 6;
+ else
+ jj += 6;
+ }
+ }
+#else
+ punctureGPRS(&cnvEncOutTestData[0],&cnvEncOutTestData[0],GPRS_CS_3);
+#endif
+
+/* Call Optimized Assembly Function to Compute Errors */
+
+#ifdef NOT_ASM_OPTIMIZED
+ for(i=0; i<NUM_CCH_CNV_ENC_OUT_BITS; i++)
+ {
+ if((cnvDecInData[i]<0) != cnvEncOutTestData[i])
+ {
+ totalErrors += 1;
+ }
+ }
+#else
+ totalErrors += computeTotalErrors(&cnvEncOutTestData[0],
+ &cnvDecInData[0],NUM_CCH_CNV_ENC_OUT_BITS);
+#endif
+
+
+ /*
+ * decode precoded first 3 bits of a RLC Packet for CS3
+ */
+ tempUsfCode = 0;
+ packToByteBuffer(cnvDecOutData, (Uint8 *) & tempUsfCode, 6);
+
+ for(i=0; i<8; i++)
+ {
+ if(tempUsfCode == USFCodingTableCS23[i])
+ {
+ unpackFromByteBuffer( (Uint8 *) & i, & cnvDecOutData[3], 3);
+ break;
+ }
+ }
+
+ parityError = crcDecoder16(& cnvDecOutData[3],
+ & cnvDecOutData[NUM_GPRS_CS3_CRC_IN_BITS],
+ GPRS16_CRC_POLY,
+ NUM_GPRS_CS3_PARITY_BITS,
+ NUM_BITS_GPRS_CS3,
+ 0xFFFF);
+
+#ifdef NOT_ASM_OPTIMIZED
+ for(i=0; i<NUM_GPRS_CS3_CRC_IN_BITS; i++)
+ {
+ g_ULCCHData.data[i] = cnvDecOutData[i];
+ }
+#else
+ copyByteSamples( (Uint8 *) & cnvDecOutData[3], (Uint8 *) & g_ULCCHData.data[0],
+ NUM_BITS_GPRS_CS3);
+#endif
+
+ break; /* end GPRS-CS3 */
+
+ case GPRS_CS_4:
+ /*
+ * No cnv decoder for CS-4, so extract one's/zeros from softdecisions
+ */
+ for(i=0; i<NUM_CCH_CNV_ENC_OUT_BITS; i++)
+ {
+ if(cnvDecInData[i] < 0)
+ cnvDecInData[i] = 1;
+ else
+ cnvDecInData[i] = 0;
+ }
+
+ /*
+ * decode precoded first 3 bits of a RLC Packet for CS4
+ */
+ tempUsfCode = 0;
+ packToByteBuffer(cnvDecInData, (Uint8 *) & tempUsfCode, 12);
+
+ for(i=0; i<8; i++)
+ {
+ if(tempUsfCode == USFCodingTableCS4[i])
+ {
+ unpackFromByteBuffer( (Uint8 *) & i, & cnvDecInData[9], 3);
+ break;
+ }
+ }
+
+ parityError = crcDecoder16(& cnvDecInData[9],
+ & cnvDecInData[NUM_GPRS_CS4_CRC_IN_BITS],
+ GPRS16_CRC_POLY,
+ NUM_GPRS_CS4_PARITY_BITS,
+ NUM_BITS_GPRS_CS4,
+/* NUM_GPRS_CS4_CRC_IN_BITS, */
+ 0xFFFF);
+#ifdef NOT_ASM_OPTIMIZED
+ for(i=0; i<NUM_GPRS_CS4_CRC_IN_BITS; i++)
+ {
+ g_ULCCHData.data[i] = cnvDecInData[i];
+ }
+#else
+ copyByteSamples((Uint8 *) & cnvDecInData[9], (Uint8 *) & g_ULCCHData.data[0],
+ NUM_BITS_GPRS_CS4);
+#endif
+
+ break; /* end GPRS-CS4 */
+
+ } /* end GPRS chCodec switch */
+/*
+ if(g_ULCCHData.codecFlags == g_GPRSCodecFlags[g_ULCCHData.chCodec] && g_ULCCHData.chCodec != 0 && parityError==0)
+ {
+ tempBuf[0] = g_ULCCHData.codecFlags;
+ tempBuf[1] = g_GPRSCodecFlags[g_ULCCHData.chCodec];
+ tempBuf[2] = g_ULCCHData.chCodec;
+ tempBuf[3] = parityError;
+
+ sendDiagMsg(55, 0, 4, 4, tempBuf);
+
+ }
+*/
+
+#if BER_TEST == 1
+ if(pdchFrameCounter > 5)
+ {
+ totalPdchSamples += NUM_CCH_CNV_ENC_OUT_BITS;
+ totalPdchChanErrs += totalErrors;
+ badPdchFrameCounter += parityError;
+ }
+#endif
+ /*
+ * Update the output data buffer
+ */
+ g_ULCCHData.ulcchword0.bitval.bufferValid = TRUE;
+ g_ULCCHData.ulcchword0.bitval.bfi = parityError; /*is this needed?*/
+ g_ULCCHData.ulcchword0.bitval.fireStatus = parityError;
+ g_ULCCHData.ulcchword0.bitval.spare = 0;
+ g_ULCCHData.ulcchword0.bitval.spare2 = 0;
+ g_ULCCHData.nErrs = totalErrors;
+ g_ULCCHData.metric = metric;
+ g_ULCCHData.T1 = sysFrameNum.t1;
+ g_ULCCHData.T2 = sysFrameNum.t2;
+ g_ULCCHData.T3 = sysFrameNum.t3;
+ break;
+
+ case RACH:
+#if BER_TEST == 1
+ rachFrameCounter++;
+#endif
+ if((g_ULBurstData.toa > 8) ||
+ (g_ULBurstData.snr < g_RachSnrThresh))
+ {
+ /*
+ * RCV power is too low, abort channel decoding
+ * new 10/6/99...added snr threshold
+ */
+ g_ULRACHData.ulRACHword0.bitval.bufferValid = FALSE;
+ break;
+ }
+ /*
+ * Read the demod buffer and execute the cnv decoder
+ */
+ metric = cnvDecoder2(g_ULBurstData.data, cnvDecOutData, NUM_RACH_CNV_DEC_OUT_BITS);
+
+ /*
+ * Perform the reconvolution and update the number of estimated bit errors
+ */
+ cnvEncoder2(cnvDecOutData, cnvEncOutTestData, NUM_RACH_CNV_ENC_IN_BITS);
+
+ totalErrors = 0;
+ for(i=0; i<NUM_RACH_CNV_ENC_OUT_BITS; i++)
+ {
+ if((g_ULBurstData.data[i]<0) != cnvEncOutTestData[i])
+ {
+ totalErrors += 1;
+ }
+ }
+
+ /*
+ * Modulo 2 add the bsic to the recieved "parity" bits to recover the original
+ * crc parity bits
+ */
+ for(i=0; i<NUM_RACH_PARITY_BITS; i++)
+ {
+ cnvDecOutData[NUM_BITS_RACH_FRAME+i] =
+ (cnvDecOutData[NUM_BITS_RACH_FRAME+i] +
+ g_codecBsic[i]) & MODULO_2_MASK;
+ }
+
+ /*
+ * Invoke the CRC Decoder
+ */
+ if(totalErrors < RACH_BIT_ERROR_MAX)
+ {
+ //parityError = crcDecoderRACH(cnvDecOutData, parityBits);
+
+ parityError = crcDecoder16(cnvDecOutData, /* input data bits */
+ & cnvDecOutData[NUM_RACH_CRC_IN_BITS], /* input parity bits */
+ RACH_CRC_POLY,
+ NUM_RACH_PARITY_BITS,
+ NUM_RACH_CRC_IN_BITS,
+ 0xFFFF);
+
+
+ }
+ else
+ parityError = TRUE;
+
+#if BER_TEST == 1
+ {
+ totalRachSamples += 2*NUM_RACH_CNV_ENC_IN_BITS;
+ totalRachChanErrs += totalErrors;
+ badRachFrameCounter += parityError;
+ }
+#endif
+ /*
+ * Perform thresholding to determine if a RACH was recieved
+ */
+ achDetect = detectBFI(chanSel, parityError, metric, totalErrors, &mask);
+
+ /*
+ * Update the output data buffer
+ */
+ g_ULRACHData.ulRACHword0.bitval.bufferValid = TRUE;
+ g_ULRACHData.ulRACHword0.bitval.rachDet = !achDetect;
+ g_ULRACHData.ulRACHword0.bitval.bfi = achDetect;
+ g_ULRACHData.ulRACHword0.bitval.spare = 0;
+ g_ULRACHData.nErrs = totalErrors;
+ g_ULRACHData.metric = metric;
+ g_ULRACHData.T1 = sysFrameNum.t1;
+ g_ULRACHData.T2 = sysFrameNum.t2;
+ g_ULRACHData.T3 = sysFrameNum.t3;
+ for(i=0; i<NUM_BITS_RACH_FRAME; i++)
+ {
+ g_ULRACHData.data[i] = cnvDecOutData[i];
+ }
+ break;
+
+ case PRACH:
+ case PTCCH:
+ if((g_ULBurstData.toa > 8) ||
+ (g_ULBurstData.snr < g_RachSnrThresh))
+ {
+ /*
+ * RCV power is too low, abort channel decoding
+ * new 10/6/99...added snr threshold
+ */
+ g_ULRACHData.ulRACHword0.bitval.bufferValid = FALSE;
+ break;
+ }
+
+#if BER_TEST == 1
+ prachFrameCounter++;
+#endif
+
+/*
+*GPRS...replace punctured bits with 0
+*/
+ j = 0;
+ ii = 0;
+ for(i=0; i < 2*(NUM_RACH_CNV_ENC_IN_BITS+NUM_RACH_GPRS_ADD_BITS); i++)
+ {
+ if(i != GPRSPrachPunctureBits[ii])
+ {
+ cnvEncOutTestData[i] = g_ULBurstData.data[j];
+ j++;
+ }
+ else
+ {
+ cnvEncOutTestData[i] = 0;
+ ii++;
+ }
+ }
+
+ /*
+ * Read the demod buffer and execute the cnv decoder
+ */
+ metric = cnvDecoder2(cnvEncOutTestData, cnvDecOutData,
+ NUM_RACH_CNV_DEC_OUT_BITS+NUM_RACH_GPRS_ADD_BITS);
+
+ /*
+ * Perform the reconvolution and update the number of estimated bit errors
+ */
+ cnvEncoder2(cnvDecOutData, cnvEncOutTestData,
+ NUM_RACH_CNV_ENC_IN_BITS+NUM_RACH_GPRS_ADD_BITS);
+
+/*
+*GPRS...puncture the convolutionally encoded bits
+*/
+ j = 0;
+ ii = 0;
+ for(i=0; i < 2*(NUM_RACH_CNV_ENC_IN_BITS+NUM_RACH_GPRS_ADD_BITS); i++)
+ {
+ if(i != GPRSPrachPunctureBits[ii])
+ {
+ cnvEncOutTestData[j] = cnvEncOutTestData[i];
+ j++;
+ }
+ else
+ ii++;
+ }
+
+ totalErrors = 0;
+ for(i=0; i<NUM_RACH_CNV_ENC_OUT_BITS; i++)
+ {
+ if((g_ULBurstData.data[i]<0) != cnvEncOutTestData[i])
+ {
+ totalErrors += 1;
+ }
+ }
+ /*
+ * Modulo 2 add the bsic to the recieved "parity" bits to recover the original
+ * crc parity bits
+ */
+ for(i=0; i<NUM_RACH_PARITY_BITS; i++)
+ {
+ cnvDecOutData[NUM_BITS_PRACH_FRAME+i] =
+ (cnvDecOutData[NUM_BITS_PRACH_FRAME+i] +
+ g_codecBsic[i]) & MODULO_2_MASK;
+ }
+
+ /*
+ * Invoke the CRC Decoder
+ */
+ if(totalErrors < RACH_BIT_ERROR_MAX)
+ {
+ //parityError = crcDecoderRACH(cnvDecOutData, parityBits);
+
+ parityError = crcDecoder16(cnvDecOutData, /* input data bits */
+ & cnvDecOutData[NUM_PRACH_CRC_IN_BITS], /* input parity bits */
+ RACH_CRC_POLY,
+ NUM_RACH_PARITY_BITS,
+ NUM_PRACH_CRC_IN_BITS,
+ 0xFFFF);
+
+
+ }
+ else
+ parityError = TRUE;
+
+#if BER_TEST == 1
+/* if(rachFrameCounter > 22) */
+ {
+ totalPrachSamples += 2*(NUM_RACH_CNV_ENC_IN_BITS+NUM_RACH_GPRS_ADD_BITS);
+ totalPrachChanErrs += totalErrors;
+ badPrachFrameCounter += parityError;
+ }
+#endif
+ /*
+ * Perform thresholding to determine if a RACH was recieved
+ */
+ achDetect = detectBFI(RACH, parityError, metric, totalErrors, &mask);
+
+
+
+
+ /*
+ * Update the output data buffer
+ */
+ g_ULRACHData.ulRACHword0.bitval.bufferValid = TRUE;
+ g_ULRACHData.ulRACHword0.bitval.rachDet = !achDetect;
+ g_ULRACHData.ulRACHword0.bitval.bfi = achDetect;
+ g_ULRACHData.ulRACHword0.bitval.spare = 0;
+ g_ULRACHData.nErrs = totalErrors;
+ g_ULRACHData.metric = metric;
+ g_ULRACHData.T1 = sysFrameNum.t1;
+ g_ULRACHData.T2 = sysFrameNum.t2;
+ g_ULRACHData.T3 = sysFrameNum.t3;
+ for(i=0; i<NUM_BITS_PRACH_FRAME; i++)
+ {
+ g_ULRACHData.data[i] = cnvDecOutData[i];
+ }
+ break;
+ default:
+ /*
+ * Other channel types are not yet supported, return error
+ * message
+ */
+ break;
+ }
+ }
+
+ return (achDetect);
+}
+
+/*****************************************************************************
+** Routine Name: chanCodecInit
+**
+** Description:
+** Initializes the channel CODEC.
+**
+** Method:
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** None
+**
+** Returns:
+** None
+**
+** Data Store I/O:
+** Packed BSIC - g_BBInfo[trx].bsic, Used for RACH encoding and decoding.
+** This value is used to initialize the unpacked bsic array
+** g_codecBsic[0..5] which will be used by the Channel CODEC for RACH
+** channels. The format of the bsic is as follows, see GSM 05.03
+** for more details:
+**
+** MSB LSB
+** 0 0 b0 b1 b2 b3 b4 b5
+** PLMN(3 bits) BS(3 bits)
+**
+*****************************************************************************/
+
+void chanCodecInit(void)
+{
+ UInt i, j, k;
+ Bool bsicBit;
+ Uint8 trx;
+ /*
+ * Init the 4 deep interleaver and deinterleaver buffers
+ */
+ for(k=0; k<NUM_TN_PER_RF; k++)
+ {
+ for(i=0; i<NUM_BURSTS_PER_CCH_BLOCK; i++)
+ {
+ for(j=0; j<NB_NUM_ENCRYPT_BITS_PER_BURST; j++)
+ {
+ g_intBuf4Deep.data[k][i][j] = 0;
+ g_deintBuf4Deep.data[k][i][j] = 0;
+ }
+ }
+ }
+
+ /*
+ * Init the 8 deep interleaver and deinterleaver buffers
+ */
+ for(k=0; k<NUM_TN_PER_RF; k++)
+ {
+ for(i=0; i<NUM_BURSTS_PER_TCH_BLOCK; i++)
+ {
+ for(j=0; j<NB_NUM_ENCRYPT_BITS_PER_BURST; j++)
+ {
+ g_intBuf8Deep.data[k][i][j] = 0;
+ g_deintBuf8Deep.data[k][i][j] = 0;
+ }
+ }
+ }
+
+ /*
+ * Init the interleaving and deinterleaving burst indexes
+ */
+ for(i=0; i<NUM_TN_PER_RF; i++)
+ {
+ g_intBuf4Deep.cchTXBurstIndex[i] = -1;
+ g_deintBuf4Deep.cchRXBurstIndex[i] = -1;
+ g_intBuf8Deep.tchTXBurstIndex[i] = -1;
+ g_deintBuf8Deep.tchRXBurstIndex[i] = -1;
+ }
+
+ /*
+ * Load the g_codecBsic variable based on the packed g_bsic variable
+ */
+ for(trx=0; trx<NUM_RFS_PER_DSP; trx++)
+ for(i=0; i<BSIC_LENGTH; i++)
+ {
+ bsicBit = (g_BBInfo[trx].bsic >> i) & 0x0001;
+ g_codecBsic[BSIC_LENGTH-1-i] = bsicBit;
+ }
+/*
+* Init GPRS codec bits per coding class and associated flags
+*/
+ g_GPRSCodecFlags[GPRS_CS_1] = FRAME_FLAGS_CS1;
+ g_GPRSCodecFlags[GPRS_CS_2] = FRAME_FLAGS_CS2;
+ g_GPRSCodecFlags[GPRS_CS_3] = FRAME_FLAGS_CS3;
+ g_GPRSCodecFlags[GPRS_CS_4] = FRAME_FLAGS_CS4;
+ g_GPRSCodecBits[GPRS_CS_1] = NUM_BITS_GPRS_CS1;
+ g_GPRSCodecBits[GPRS_CS_2] = NUM_BITS_GPRS_CS2;
+ g_GPRSCodecBits[GPRS_CS_3] = NUM_BITS_GPRS_CS3;
+ g_GPRSCodecBits[GPRS_CS_4] = NUM_BITS_GPRS_CS4;
+}
+
+/********* Old revision notes **************************************
+**
+** Revision 1.14 2000-01-12 10:17:03-08 whuang
+** Added CRC encoder/Decoder, subjective encoder/decoder and VOIP format for EFR. No uplink frame is sent out, if CRC error is found for EFR also. Created a common CRC encoder/decoder for SCH, TCH, RA
+**
+** Revision 1.13 1999-11-04 14:54:27-08 ltravaglione
+** <>
+**
+** Revision 1.11 1999-10-28 13:29:00-07 whuang
+** easy RACH detection S/N threshold setting from 39 to 35
+**
+** Revision 1.10 1999-10-19 11:49:55-07 whuang
+** Replaced Power constrain with TOA in RACH detection
+**
+** Revision 1.9 1999-10-18 18:53:38-07 hpines
+** Added enhanced RACH detection test...test post equalized RACH training sequence bits versus their reference values.
+**
+** Revision 1.8 1999-09-07 17:42:58-07 whuang
+** added UL/DL DTX mode handling functions
+**
+** Revision 1.7 1999-07-19 08:49:43-07 dkaiser
+** deleted some long time non-functional commented-out lines
+**
+** Revision 1.6 1999-07-07 16:33:16-07 hpines
+** Fixed "total_errors" update bugs:
+** 1. removed effects of steal flags in CCH messages
+** 2. compare "CNV_ENC_OUT_BITS" instead of "CNV_ENC_IN_BITS" in 4 separate places where total errors is updated.
+**
+** Revision 1.5 1999-04-26 20:28:31-07 whuang
+** Added Controls for RACH detection
+**
+** Revision 1.4 1999-03-11 15:55:59-08 whuang
+** <>
+**
+** Revision 1.3 1999-03-10 17:43:30-08 whuang
+** Corrected using "RFA" for TRX number
+**/
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod-asm/c6xsupport.h b/data/mnet/GP10/Dsp/bbdataproc/demod-asm/c6xsupport.h
new file mode 100644
index 0000000..f20e6dd
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod-asm/c6xsupport.h
@@ -0,0 +1,106 @@
+/*
+** TMS320C6x related macros and intrinsics prototypes
+**
+** $Author: hpines $
+** $Date: 1999/07/14 21:45:17 $
+** $Source: D:\\stageCell\\Dsp\\bbdataproc\\demod-asm\\RCS\\c6xsupport.h $
+** $Revision: 1.1 $
+** $Log: c6xsupport.h $
+** Revision 1.1 1999/07/14 21:45:17 hpines
+** Initial revision
+**
+** Revision 1.1 1999-01-07 14:30:22-08 randyt
+** Initial revision
+**
+ *
+ * Rev 1.0 Oct 27 1998 16:19:34 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+ *
+ * Rev 1.0 Oct 23 1998 17:56:06 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.4 1998/10/12 15:40:26 bhehn
+** Casting SAT_WORD to long to make work.
+**
+** Revision 1.3 1998/10/09 21:20:35 bhehn
+** Fast version, Not yet versified.
+** AB ~ 125us, NB ~= 110us
+**
+** Revision 1.2 1998/10/09 15:54:00 bhehn
+** Made I/O faster and fixed normEnergy() energyAccum probelm for large signals.
+**
+** Revision 1.1 1998/10/07 15:21:36 bhehn
+** Initial revision
+**
+** Revision 1.1 1998/10/01 13:56:59 bhehn
+** Initial revision
+**
+**
+*/
+
+/*
+* Define a signed shift macro
+* ANSI C does not support this but A|RT & TI do.
+*/
+/* signed left shift */
+#define SSHIFTL( _x, _sft) ( (_sft) > 0 ? (_x) << (_sft) : (_x) >> -(_sft) )
+/* signed right shift */
+#define SSHIFTR( _x, _sft) ( (_sft) > 0 ? (_x) >> (_sft) : (_x) << -(_sft) )
+
+
+/*
+* Used to set the arithmetic saturation mode
+* Examples:
+* c = a + b; // Unsaturated
+* c = SAT( a+b ); // Saturated
+*
+* SAT typically needs to be used only if the input data
+* energy has an "exponent" of 0. This means that the
+* input samples will range from -1 to 1-precision
+*/
+/*#define SAT(x) oqc( x, fxpOqc::saturated() )
+********************************************************************/
+#define SAT_LONG(z) ( _sat(z) )
+
+#define SAT_WORD(_arg) ( SAT_LONG( ((long) _arg) << 16 ) >> 16 )
+
+
+/************************************************************8
+** Intrinsic Macros
+**
+** these may need to be ported to subroutines to make completely
+** compatable with the C6x intrinsics operation.
+*************************************************************/
+/*
+* define a multiply that takes two Words (16 bits)
+* multipies them, shifts by one and saturates
+*
+* TI 6X equivelent #define SMPY(x,y) (_smpy( x, y ))
+*/
+#define SMPY(x,y) ( _smpy(x, y ) )
+/*
+* define a C equiv for the C6c EXTU() intrinsic
+*/
+#define EXTU(src2,cst1,cst2) ( ( (src2)<<(cst1) )>>(cst2) )
+#define EXT(src2,cst1,cst2) ( (int)( (src2)<<(cst1) )>>(cst2) )
+
+
+/*
+* NORM returns the number bits to the left of the sign bit
+* for a "int" (32 bits)
+* For positive values this is 2*WORD_SIZE - (log2 + 2)
+*/
+#define NORM(z) ( _norm(z) )
+/*
+* LNORM returns the number bits to the left of the sign bit
+* for a "long" (40 bits)
+* For positive values this is 2*WORD_SIZE+ACCUM_GUARD_BITS - (log2 + 2)
+*/
+#define LNORM(z) ( _lnorm( z ) )
+
+/*
+* log2(x) = log10(x)*3.3219, log10(x) = log2(x)*0.301
+* log2 returns the number of bits to the left of the msbit
+*/
+#define LOG2(z) ( 2*WORD_SIZE - NORM(z) )
+
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod-asm/dem_aprotos.h b/data/mnet/GP10/Dsp/bbdataproc/demod-asm/dem_aprotos.h
new file mode 100644
index 0000000..2b439c0
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod-asm/dem_aprotos.h
@@ -0,0 +1,159 @@
+/*
+** GSM Demod Prototypes for A|RT library implentation
+**
+** $Author: hpines $
+** $Date: 1999/07/14 21:45:08 $
+** $Source: D:\\stageCell\\Dsp\\bbdataproc\\demod-asm\\RCS\\dem_aprotos.h $
+** $Revision: 1.1 $
+** $Log: dem_aprotos.h $
+** Revision 1.1 1999/07/14 21:45:08 hpines
+** Initial revision
+**
+** Revision 1.1 1999-02-24 15:16:50-08 whuang
+** Initial revision
+**
+** Revision 1.1 1999-01-07 14:30:25-08 randyt
+** Initial revision
+**
+ *
+ * Rev 1.0 Oct 27 1998 16:19:34 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+ *
+ * Rev 1.0 Oct 23 1998 17:56:08 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.2 1998/10/14 18:43:28 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.1 1998/10/07 15:21:37 bhehn
+** Initial revision
+**
+** Revision 1.3 1998/10/02 17:01:01 bhehn
+** Changed calling routine to be more like c6x implementation.
+** BER matches previous version.
+**
+** Revision 1.2 1998/10/01 16:37:05 bhehn
+** Fixed matchfilter output saturation problem
+**
+** Revision 1.1 1998/10/01 13:56:58 bhehn
+** Initial revision
+**
+** Revision 1.3 1998/09/22 20:00:38 bhehn
+** Access Burst support added and verified.
+**
+** Revision 1.2 1998/09/21 22:04:24 bhehn
+** NB demod works, BER close to floating
+**
+*/
+#ifndef DEM_PROTOS_H
+#define DEM_PROTOS_H
+
+
+typedef t_ULComplexSamp t_ULCirSamp;
+
+void offsetDerot
+(
+ t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ Word threshold
+);
+
+
+void impulse
+(
+ t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ const t_TseqWord tseq[MAX_TSEQ_SIZE],
+ t_ULCirSamp cir[MAX_CIR_LENGTH]
+);
+
+Char Energy
+(
+ t_ULCirSamp cir[MAX_CIR_LENGTH],
+ LWord leng[MAX_CIR_LENGTH]
+);
+
+void normCir
+(
+ t_ULCirSamp cir[MAX_CIR_LENGTH],
+ UWord2 mantInv,
+ Char index,
+ t_ULCirSamp cirNorm[MAX_CIR_LENGTH]
+);
+
+void calcRho
+(
+ t_ULCirSamp cir[MAX_CIR_LENGTH],
+ t_ULCirSamp cirNorm[MAX_CIR_LENGTH],
+ Char index,
+ Short exponent,
+ Word3 rho[CIR_BEST_LENGTH-1]
+);
+
+void matchFilter
+(
+ t_ULComplexSamp data[BURST_SIZE_UL_MAX],
+ t_ULCirSamp cirNorm[MAX_CIR_LENGTH],
+ Char index,
+ Short exponent,
+ Word3 output[NB_MATCH]
+);
+
+void weight
+(
+ Word softDec[],
+ const t_TseqWord tseq[],
+ Word *snr
+);
+
+void quantize
+(
+ Word demodSamps[],
+ Char softDec[]
+);
+
+void equalize
+(
+ Word matcho[BURST_MATCH],
+ Word rho[CIR_BEST_LENGTH-1],
+ const t_TseqWord tseq[]
+);
+
+extern UVLWord energyAccumed
+(
+ t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ Char indexBest
+);
+
+extern UVLWord thresholdCir
+(
+ UVLWord energyAccum,
+ Char indexBest,
+ t_ULCirSamp cir[MAX_CIR_LENGTH],
+ t_ULCirSamp tempCir[CIR_SIZE],
+ LWord2 energy_L[MAX_CIR_LENGTH],
+ Word *toa
+);
+
+UWord2 normEnergy
+(
+ t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ t_ULCirSamp cir[MAX_CIR_LENGTH],
+ t_ULCirSamp cirTemp[MAX_CIR_LENGTH],
+ LWord energy_L[MAX_CIR_LENGTH],
+ Char indexBest,
+ Word *bob,
+ Word *power,
+ Short *exponent
+);
+
+Word expX
+(
+ UVLWord data,
+ Word *exponent
+);
+
+Word14 mag2DB
+(
+ UVLWord mag
+);
+
+#endif
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod-asm/dem_const.h b/data/mnet/GP10/Dsp/bbdataproc/demod-asm/dem_const.h
new file mode 100644
index 0000000..700a976
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod-asm/dem_const.h
@@ -0,0 +1,266 @@
+/*
+** GSM Demod Constants for A|RT library implentation
+**
+** $Author: hpines $
+** $Date: 1999/07/14 21:45:01 $
+** $Source: D:\\stageCell\\Dsp\\bbdataproc\\demod-asm\\RCS\\dem_const.h $
+** $Revision: 1.1 $
+** $Log: dem_const.h $
+** Revision 1.1 1999/07/14 21:45:01 hpines
+** Initial revision
+**
+** Revision 1.1 1999-01-07 14:30:24-08 randyt
+** Initial revision
+**
+ *
+ * Rev 1.0 Oct 27 1998 16:19:34 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+ *
+ * Rev 1.0 Oct 23 1998 17:56:08 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.5 1998/10/14 18:46:30 bhehn
+** TEST mode = 0.
+**
+** Revision 1.4 1998/10/14 18:43:27 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.3 1998/10/12 15:39:47 bhehn
+** TEST mode on as default for testing
+**
+** Revision 1.1 1998/10/07 15:21:35 bhehn
+** Initial revision
+**
+** Revision 1.1 1998/10/01 13:56:58 bhehn
+** Initial revision
+**
+** Revision 1.3 1998/09/22 20:00:37 bhehn
+** Access Burst support added and verified.
+**
+** Revision 1.2 1998/09/21 22:04:23 bhehn
+** NB demod works, BER close to floating
+**
+*/
+#ifndef DEM_CONST_H
+#define DEM_CONST_H
+
+
+/*
+* Compilation Flags
+* These TEST FLAGS will output data to a file so
+* that it can be compared to others versions.
+*/
+
+#define TEST 0
+#define TEST_RHO TEST
+#define TEST_POWER TEST
+#define TEST_MATCHO TEST
+
+
+
+#define TEST_EQUALIZE TEST
+#define TEST_SNR TEST
+#define TEST_QUANT_SDP TEST
+
+/* These next 2 should normally be 0 */
+#define TEST_PATH_SD 0
+#define TEST_METRICS 0
+/***************************************************************************
+*
+* CONSTANTS
+*
+****************************************************************************/
+
+/*
+* Define the number of samples per burst
+* in the input files. This is the *.dsp file
+*/
+#define NUM_INPUT_SAMPLES_PER_BURST 160
+
+/*
+** Define the number of samples in the burst
+** rounded down.
+** floor(156.25) = 156
+*/
+#define GSM_NUM_SAMPLES_PER_BURST 156
+
+
+/* Threshold value used in offset compensation */
+/* Can not be 1.0 because fixed point can't represent it. */
+/* #define DC_OFFSET_THRESHOLD (0.999) in floating point */
+#define DC_OFFSET_THRESHOLD ( (1 << WORD_SIZE-1)-1 )
+
+/*
+* Define constants for the bursts
+*
+* Normal Burst
+* -----------------------------------------------------------
+* |TB=3| DATA = 58 | TSEQ = 26 | DATA = 58 |TB=3|GP=8.25|
+* -----------------------------------------------------------
+*
+* Access Burst
+* -----------------------------------------------------------
+* |TB=8| TSEQ = 41 | DATA = 36 |TB=3| GP=68.25 |
+* -----------------------------------------------------------
+*
+* Sync Burst
+* -----------------------------------------------------------
+* |TB=3| DATA = 39| TSEQ = 64 | DATA = 39 |TB=3|GP=8.25|
+* -----------------------------------------------------------
+*/
+#define NB_NUM_SAMPLES 160
+#define AB_NUM_SAMPLES 200
+#define SB_NUM_SAMPLES 200
+
+#define NB_NUM_DATA ((NB_NUM_SAMPLES/4)*4)
+#define AB_NUM_DATA ((AB_NUM_SAMPLES/4)*4)
+#define SB_NUM_DATA ((SB_NUM_SAMPLES/4)*4)
+#define MAX_NUM_DATA AB_NUM_DATA
+
+
+/* Define the number of bits in the burst less tail and guard bits */
+#define NB_NUM_BITS_PER_BURST (NB_NUM_ENCRYPT_BITS_PER_BURST + NB_TRAIN_SIZE)
+#define AB_NUM_BITS_PER_BURST (AB_NUM_ENCRYPT_BITS_PER_BURST + AB_TRAIN_SIZE)
+/* Define the maximum number of valid bits in a burst */
+/* This is the normal burst case, the AB has a lot */
+/* more guard bits. */
+#define MAX_NUM_BITS_PER_BURST (NB_NUM_BITS_PER_BURST)
+
+
+/*
+* CIR_NUM_TSEQ_BITS: Number of training sequence samples to
+* correlate with.
+* Also, define the max number of bits needed for CIR_NUM_TSEQ_BITS
+* CIR_NUM_TSEQ_BITS max is 64 (SB) + an offset (<10) so
+* 7 bits are needed.
+*/
+#define NB_CIR_NUM_TSEQ_BITS 16
+#define SB_CIR_NUM_TSEQ_BITS SB_TRAIN_SIZE
+#define AB_CIR_NUM_TSEQ_BITS AB_TRAIN_SIZE
+
+/*
+* OFFSET is the offset into the Tseq to where the CIR_NUM_TSEQ_BITS
+* will start from.
+* The ideal CIR is shown below for the +/- tseq values starting at the offset:
+*
+* OFFSET
+* |
+* cir value 0 0 0 16 0 0 0 0 0 0
+* index 0 1 2 3 4 5 6 7 8 9
+* ^ ^
+* | |
+* toaMin toaMax
+* |<- ->| - CIR_BEST_LENGTH
+* |<- CIR_LENGTH ->|
+*
+*/
+#define NB_IMPULSE_TSEQ_OFFSET (3)
+#define NB_TOA_MIN (-2)
+#define NB_TOA_MAX (2)
+#define CIR_BEST_LENGTH (5)
+
+/*
+* The AB does not need a negative TOA.
+* Therefore, offset and TOA_MIN are zero
+*/
+#define AB_IMPULSE_TSEQ_OFFSET (0)
+#define AB_TOA_MIN (0)
+#define AB_TOA_MAX (64)
+
+
+
+#define BURST_START 3
+#define CIR_SIZE 5
+
+/*
+* CIR_LENGTH: Channel Impulse Response Window Length
+* NB is finely syncronized so the window does not have to very large
+* SB the mobile is aquiring the BS timing so this needs to be fairly large
+* AB the BS is aquiring the MS timing so this needs to be fairly large
+*/
+#define NB_CIR_LENGTH (CIR_BEST_LENGTH + NB_TOA_MAX - NB_TOA_MIN)
+#define AB_CIR_LENGTH 64
+#define SB_CIR_LENGTH 50
+
+/* Define the maximum that the CIR length can be */
+/* This is the AB case */
+#define MAX_CIR_LENGTH AB_CIR_LENGTH
+
+/*
+* Define the position in the data where the CIR calculation begins
+*/
+#define NB_CIR_START_INDEX (NB_NUM_TAIL_BITS + NB_NUM_ENCRYPT_BITS_PER_SIDE \
+ + NB_IMPULSE_TSEQ_OFFSET + NB_TOA_MIN)
+
+#define AB_CIR_START_INDEX (AB_NUM_TAIL_BITS)
+/*#define SB_CIR_WINDOW_START (TAIL + SB_NUM_DATA_BITS_PER_SIDE) */
+
+
+
+
+
+#define NUM_CHOICE (NB_CIR_LENGTH - CIR_SIZE + 1)
+#define NB_MATCH 32
+#define C_USED_SAMPLE (MAX_BITS_PER_BURST + (CIR_SIZE-1) + (NB_CHOICE-1) )
+
+
+/*
+** offsetDerot() related constants
+**
+** Define the number of samples over which to calc the offset
+** make it a power of two so that no shifting is needed.
+**
+** NUM_OFFSET_SAMPS = number of samples to compute the offset over.
+** It is not 157 (number of samples in a burst) to make
+** the scaling easier
+*
+** Get the log2 to determine how many bits are needed to represent
+** the number. Note log2(128)=7
+** However, it takes log2(128)+1 bits to represent 128.
+** And ceil(log2(7)) = 3
+*/
+#define OFF_NUM_OFFSET_SAMPS (128)
+#define OFF_NUM_OFFSET_SAMPS_LOG2 (7)
+/* Need the number of bits needed to represent NUM_OFFSET_SAMPS_LOG2 */
+#define OFF_NUM_OFFSET_SAMPS_LOG2_BITS (3)
+
+/* The type for the i value in offset comp */
+/* #define OFF_I_TYPE Uint<OFF_NUM_OFFSET_SAMPS_LOG2+1> */
+#define OFF_I_TYPE UChar
+
+/*
+** To scale the accum data we need to divide by 128 or shift by 7 (2^7 =128)
+** Number of bits that can represent the shift value, 7 (0b111) can be represented by 3 bits
+*/
+/*#define OFF_SHIFT_VAL (Uint<OFF_NUM_OFFSET_SAMPS_LOG2_BITS> (OFF_NUM_OFFSET_SAMPS_LOG2))*/
+#define OFF_SHIFT_VAL (OFF_NUM_OFFSET_SAMPS_LOG2)
+
+/*
+** ENERGY_THRESHOLD_PERCENT is the percentage of the total energy that
+** each energy element must be greater then else it will be cleared out
+**
+** It is in the format F8.8
+**
+** Ex: 0.05 ~= (1<<8)*0.05 ~= 13 = 0.05078
+**
+** Use format F8.8 so that the result will go into the gaurd bits
+** without overflowing
+*/
+#define ENERGY_THRESHOLD_PERCENT (13)
+/* Define the format for the energy threshold (F8.8) */
+#define E_THRESH_FORMAT (8)
+
+/* For Equalizer */
+#define DELAY_MAX 5
+#define STATES_MAX (1 << DELAY_MAX)
+#define BURST_MATCH (MAX_NUM_BITS_PER_BURST + DELAY_MAX + 2)
+
+/*
+* Compute 1.0/mantissa
+* "one" can not be represented in fixed point
+* so approximate it by "1 - word precision"
+*/
+//#define ONE_MINUS_PRECISION (1.0 - 1.0 / (float) (1 << (WORD_SIZE-1)) )
+#define ONE_MINUS_PRECISION ( ( 1<<(WORD_SIZE-1) )-1 )
+
+#endif
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod-asm/dem_globs.h b/data/mnet/GP10/Dsp/bbdataproc/demod-asm/dem_globs.h
new file mode 100644
index 0000000..f83b07b
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod-asm/dem_globs.h
@@ -0,0 +1,208 @@
+/*
+** GSM Demod Globals & types
+**
+** $Author: hpines $
+** $Date: 1999/07/14 21:44:50 $
+** $Source: D:\\stageCell\\Dsp\\bbdataproc\\demod-asm\\RCS\\dem_globs.h $
+** $Revision: 1.1 $
+** $Log: dem_globs.h $
+** Revision 1.1 1999/07/14 21:44:50 hpines
+** Initial revision
+**
+** Revision 1.1 1999-01-07 14:30:24-08 randyt
+** Initial revision
+**
+ *
+ * Rev 1.0 Oct 27 1998 16:19:34 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+ *
+ * Rev 1.0 Oct 23 1998 17:56:08 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.2 1998/10/14 18:43:28 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.1 1998/10/07 15:21:36 bhehn
+** Initial revision
+**
+** Revision 1.2 1998/10/02 17:01:01 bhehn
+** Changed calling routine to be more like c6x implementation.
+** BER matches previous version.
+**
+** Revision 1.1 1998/10/01 13:56:58 bhehn
+** Initial revision
+**
+** Revision 1.3 1998/09/22 20:00:37 bhehn
+** Access Burst support added and verified.
+**
+** Revision 1.2 1998/09/21 22:04:24 bhehn
+** NB demod works, BER close to floating
+**
+*/
+#ifndef DEM_GLOBS_H
+#define DEM_GLOBS_H
+
+/*
+* Set up a #define that determines whether the
+* variables should be defined here or just
+* externed here
+*/
+#ifdef DEMOD_TOP
+#define DEMGLOBS /**/
+#else
+#define DEMGLOBS extern
+#endif
+
+
+
+/* Define the wordlength of the data */
+#define WORD_SIZE (16)
+#define ACCUM_GUARD_BITS (8)
+
+
+/* Define some common types */
+
+typedef signed int SInt; /* signed integer */
+
+
+typedef Short Word; /* word */
+typedef UShort UWord; /* unsigned word */
+typedef SInt LWord; /* long word */
+typedef UInt ULWord; /* unsigned long word */
+typedef Long VLWord; /* very long word */
+typedef ULong UVLWord; /* unsigned very long word */
+
+
+
+
+/*
+* Define the data types for variables with the decimal point
+* at different places.
+*
+* The number appended to these indicates how many integer bits in
+* the word.
+* For instance, a "Word2" has two integer bits and can be converted
+* to a "Word" (one integer bit) with a right shift on 2-1 = 1
+* A "Wordm3" can be converted to a "Word" by a right shift of -3-1 = -4
+* or a left shift of 4.
+* Note that these types are just reminders of where the decimal point is
+* located, they are all actually of type "Short"
+*
+* x = 1 data bit, S = sign bit, X = xxxx (4 bits)
+*/
+/*typedef Word Word; /* 1 interger bits, Fix<16,16-1> S.xxxXXX */
+typedef Word Word2; /* 2 interger bits, Fix<16,16-2> Sx.xxXXX */
+typedef Word Word3; /* 3 interger bits, Fix<16,16-3> Sxx.xXXX*/
+typedef Word Word14; /* 14 interger bits, Fix<16,16-14> XXXxx.xx*/
+
+typedef Word Wordm3; /* 3 interger bits, Fix<16,16+2> SSS.SSSSxxxXXX*/
+
+typedef UWord UWord2; /* 2 interger bits, UFix<16,16-2> 0xx.xxXXX */
+typedef LWord LWord2; /* 2 interger bits, Fix<32,32-2> Sx.xxXXXXXXX */
+typedef LWord LWord17; /* 17 interger bits, Fix<32,32-17>, 15 fract bits */
+
+/*
+* Define macros that convert data formats to floating point.
+* These are used to output data to a file which will then be
+* compared with other demod implementations.
+*/
+#define WORD_2F(x) ( ((float ) (x)) / (float) (1<<WORD_SIZE-1) )
+#define WORD2_2F(x) ( ((float ) (x)) / (float) (1<<WORD_SIZE-2) )
+#define WORD3_2F(x) ( ((float ) (x)) / (float) (1<<WORD_SIZE-3) )
+#define WORD4_2F(x) ( ((float ) (x)) / (float) (1<<WORD_SIZE-4) )
+#define WORD14_2F(x) ( ((float ) (x)) / (float) (1<<WORD_SIZE-14) )
+#define LONG_2F(x) ( ((double) (x)) / (double) ((1<<2*WORD_SIZE-1)-1) )
+
+/*
+* Define the data type for the equalizer input data
+* 5 bits left of the decimal point are needed,
+* 1 for the sign, 4 for the integer part.
+* 4 integer bits are needed because the data
+* of this type was multiply/accumulated
+* over CIR_SIZE (5) and it was complex (*2).
+* Therefore, this data has a scale of 2*5 = 10.
+* 2^4 = 16 can handle the scale of 10.
+*/
+/* typedef Fix<WORD_SIZE,WORD_SIZE-5> t_EqualData; */
+typedef Word t_EqualData;
+
+/* typedef Uint<7> CIR_NUM_TSEQ_BITS_TYPE; */
+typedef UChar CIR_NUM_TSEQ_BITS_TYPE;
+
+/* Define the max number of bits needed for CIR_LENGTH */
+/* For AB CIR_LENGTH = 64 = 0x1000000 = 7 bits */
+typedef UChar CIR_LENGTH_TYPE;
+
+
+/*
+** Define a structure that contains all the unique constants for each burst type.
+**
+** NOTE:
+** NB: CIR_NUM_TSEQ_BITS = 16, SB: CIR_NUM_TSEQ_BITS = 64, AB: CIR_NUM_TSEQ_BITS = 41)
+** "cirNumTseqBitsInv" max is 1/16 = 0.0625 = 0b0.0001 so maximize precision.
+** ex: Fix<8,7> would be S.XXXXXX, Fix<8,10> would be S.SSSXXXXXXX
+** where X is a significant digit and S is a sign bit.
+** In this example you could not have Fix<8,11> because of the sign bit.
+**
+** cirWindowStart defines the position that the CIR calculation begins.
+*/
+typedef struct {
+ const t_TseqWord *tseqBaseAddr; /* Training sequences base addrress */
+ const CIR_NUM_TSEQ_BITS_TYPE cirNumTseqBits; /* Number of tseq samples to correlate over */
+ const Wordm3 cirNumTseqBitsInv; /* 1.0/CIR_NUM_TSEQ_BITS */
+ const UChar impulseTseqOffset; /* Position of the first tseq bit for CIR calc. */
+ const UChar cirLength; /* Length of the CIR */
+ const UChar cirStartIndex; /* index of first samples to calc CIR over */
+ const Char toaMin; /* Minimum posible time of arrival, relative */
+ const UChar numBits; /* Number of bits in the burst less tail/guard bits*/
+ /*const UChar numDataBits; */ /* Number of data bits in the burst */
+ /* NB = 58*2, AB = 36 */
+ UChar numDataBits; /* const made weight() fail */
+ const UChar numTailBits; /* Number of tail bits at the beginning of the burst */
+
+
+} t_burstConsts;
+
+/*
+** Define structures that have the constants for each burst type
+*/
+#ifdef DEMOD_TOP
+t_burstConsts g_ABConsts = { &train_ab[0],
+ AB_CIR_NUM_TSEQ_BITS,
+ (1<<WORD_SIZE)/AB_CIR_NUM_TSEQ_BITS,
+ AB_IMPULSE_TSEQ_OFFSET,
+ AB_CIR_LENGTH,
+ AB_CIR_START_INDEX,
+ AB_TOA_MIN,
+ AB_NUM_BITS_PER_BURST,
+ AB_NUM_ENCRYPT_BITS_PER_BURST,
+ AB_NUM_TAIL_BITS
+};
+
+t_burstConsts g_NBConsts = { &train_nb[0][0],
+ NB_CIR_NUM_TSEQ_BITS,
+ (1<<WORD_SIZE)/NB_CIR_NUM_TSEQ_BITS,
+ NB_IMPULSE_TSEQ_OFFSET,
+ NB_CIR_LENGTH,
+ NB_CIR_START_INDEX,
+ NB_TOA_MIN,
+ NB_NUM_BITS_PER_BURST,
+ NB_NUM_ENCRYPT_BITS_PER_BURST,
+ NB_NUM_TAIL_BITS
+};
+#else
+extern t_burstConsts g_ABConsts; /* Access burst constants */
+extern t_burstConsts g_NBConsts; /* Normal burst constants */
+#endif
+
+DEMGLOBS t_burstConsts *g_BConsts_pt; /* Pointer to the burst constants */
+
+
+/* Define a varaible the is the burst type */
+DEMGLOBS t_chanSel g_burstType;
+
+
+
+
+
+#endif
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod-asm/dem_protos.h b/data/mnet/GP10/Dsp/bbdataproc/demod-asm/dem_protos.h
new file mode 100644
index 0000000..d121760
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod-asm/dem_protos.h
@@ -0,0 +1,97 @@
+/*
+** GSM Demod Prototypes for A|RT library implentation
+**
+** $Author: hpines $
+** $Date: 1999/07/14 21:43:56 $
+** $Source: D:\\stageCell\\Dsp\\bbdataproc\\demod-asm\\RCS\\dem_protos.h $
+** $Revision: 1.1 $
+** $Log: dem_protos.h $
+** Revision 1.1 1999/07/14 21:43:56 hpines
+** Initial revision
+**
+** Revision 1.1 1999-01-07 14:30:25-08 randyt
+** Initial revision
+**
+ *
+ * Rev 1.0 Oct 27 1998 16:19:34 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+ *
+ * Rev 1.0 Oct 23 1998 17:56:08 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.2 1998/10/14 18:43:28 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.1 1998/10/07 15:21:37 bhehn
+** Initial revision
+**
+** Revision 1.3 1998/10/02 17:01:01 bhehn
+** Changed calling routine to be more like c6x implementation.
+** BER matches previous version.
+**
+** Revision 1.2 1998/10/01 16:37:05 bhehn
+** Fixed matchfilter output saturation problem
+**
+** Revision 1.1 1998/10/01 13:56:58 bhehn
+** Initial revision
+**
+** Revision 1.3 1998/09/22 20:00:38 bhehn
+** Access Burst support added and verified.
+**
+** Revision 1.2 1998/09/21 22:04:24 bhehn
+** NB demod works, BER close to floating
+**
+*/
+#ifndef DEM_PROTOS_H
+#define DEM_PROTOS_H
+
+
+/*void offsetDerot(t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ Word threshold );
+*/
+
+void impulse(t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ const t_TseqWord tseq[MAX_TSEQ_SIZE],
+ Word cir[2][MAX_CIR_LENGTH] );
+
+Char Energy( Word cir[2][MAX_CIR_LENGTH],
+ LWord leng[MAX_CIR_LENGTH] );
+
+UWord2 normEnergy( t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ Word cir[2][MAX_CIR_LENGTH],
+ LWord energy_L[MAX_CIR_LENGTH],
+ Char indexBest,
+ Word *bob,
+ Word *power,
+ Short *exponent);
+
+void normCir( Word cir[2][MAX_CIR_LENGTH],
+ UWord2 mantInv,
+ Char index,
+ Word2 cirNorm[2][MAX_CIR_LENGTH] );
+
+void calcRho( Word cir[2][MAX_CIR_LENGTH],
+ Word2 cirNorm[2][MAX_CIR_LENGTH],
+ Char index,
+ Short exponent,
+ Word3 rho[CIR_BEST_LENGTH-1] );
+
+void matchFilter( t_ULComplexSamp data[BURST_SIZE_UL_MAX],
+ Word2 cirNorm[2][MAX_CIR_LENGTH],
+ Char index,
+ Short exponent,
+ Word3 output[NB_MATCH]);
+
+void weight( Word softDec[],
+ const t_TseqWord tseq[],
+ Word *snr);
+
+void quantize( Word demodSamps[],
+ Char softDec[] );
+
+void equalize (Word matcho[BURST_MATCH],
+ Word rho[CIR_BEST_LENGTH-1],
+ const t_TseqWord tseq[]);
+
+
+#endif
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod-asm/demsubs.asm b/data/mnet/GP10/Dsp/bbdataproc/demod-asm/demsubs.asm
new file mode 100644
index 0000000..f791495
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod-asm/demsubs.asm
@@ -0,0 +1,4047 @@
+;******************************************************************************
+;* TMS320C6x ANSI C Codegen Version 2.00 *
+;* Date/Time created: Wed Feb 24 14:41:23 1999 *
+;******************************************************************************
+
+;******************************************************************************
+;* GLOBAL FILE PARAMETERS *
+;* *
+;* Architecture : TMS320C6200 *
+;* Endian : Little *
+;* Interrupt Threshold : Disabled *
+;* Memory Model : Small *
+;* Speculative Load : Disabled *
+;* Redundant Loops : Enabled *
+;* Pipelining : Enabled *
+;* Debug Info : No Debug Info *
+;* *
+;******************************************************************************
+
+FP .set A15
+DP .set B14
+SP .set B15
+
+
+
+
+
+
+;/**************************************************************************
+;**
+;** GSM Demod w/ A|RT Library implemtation ported to C6 scalar assembly
+;**
+;** This file contains all of the assembly subroutines for the demod
+;**
+;**************************************************************************/
+
+
+;**************
+;
+; Declarations
+;
+;*************************************************************************
+
+ ; Declare the routines coded here to be globally visible.
+ ; They are all C-callable, with prototypes in dem_protos.h.
+
+ .def _offsetDerot ; offset decompensation/derotation
+ .def _impulse ; compute channel impulse response
+ .def _Energy ; find energy, highest energy window
+ .def _normEnergy ; normalize Energy, get mantissa and exponent
+ .def _normCir ; normalize the cir
+ .def _calcRho ; autocorrelate cir with normed cir
+ .def _matchFilter ; filter samples by normed cir
+ .def _equalize ; equalizer
+ .def _weight ; apply weights to soft decisions
+ .def _quantize ; quantize soft decisions
+ .def _expX ; calculate exponent/mantissa
+ .def _mag2DB ; calculate power
+
+;*************************************************************************
+
+ ; externally declare the C variables we need here
+
+ .ref _logTable ;const Short logTable[]
+ .ref _g_burstType ;t_chanSel g_burstType
+ .ref _g_BConsts_pt ;t_burstConsts *g_BConsts_pt
+ .ref _c_asm_consts ;int c_asm_consts[]
+
+;*************************************************************************
+
+ ; C constant and structure offset interface
+
+ ; offsets in _c_asm_consts to values of offsets to members of the
+ ; t_burstConsts structure. The values in c_asm_consts are shown
+ ; below along with the current burst constant values associated.
+ ; The values in _c_asm_consts are calculated at run-time in order
+ ; that the t_burstConsts structure and values may be modified w/o
+ ; change here, except where noted in the Limitations below. Mainly
+ ; numDataBits is assumed even.
+ ;
+ ; NOTE: these symbols must be aligned with the definition of
+ ; _c_asm_consts in demTop.c
+ ;
+ ; val NB AB SB meaning
+ ;---------------------------------------------------
+o_tseqBaseAddr .set 0 ; 0 ptr to training sequence
+o_cirNumTseqBits .set 1 ; 4 16 41 64 num training sequence bits
+o_cirNumTseqBitsInv .set 2 ; 6 4096 1598 1024 2^16/(number training bits)
+o_impulseTseqOffset .set 3 ; 8 0 3 ? offset in training sequence
+o_cirLength .set 4 ; 9 9 64 50 length of impulse response
+o_cirStartIndex .set 5 ; 10 68 8 ? offs impulse response in burst
+o_toaMin .set 6 ; 11 -2 0 ? timing advance (moving mobile)
+o_numBits .set 7 ; 12 142 77 142 bits in a burst
+o_numDataBits .set 8 ; 13 116 36 78 (is even!) data bits in a burst
+o_numTailBits .set 9 ; 14 3 8 3 number of initial tail bits
+
+ ; offsets in _c_asm_consts to values of symbols created with
+ ; #define in C. Loaded at run-time so that values may be changed
+ ; without editing the assembly routines, except where noted in
+ ; the Limitations description for individual routines. Mainly
+ ; CIR_SIZE and CIR_BEST_LENGTH cannot be changed without affecting
+ ; this module.
+ ;
+ ; NOTE: these symbols must be aligned with the definition of
+ ; _c_asm_consts in demTop.c
+ ;val meaning
+ ;------------------------------------
+v_OFF_NUM_OFFSET_SAMPS .set 10 ;128 pwr 2 num samps offset calced on
+v_OFF_SHIFT_VAL .set 11 ; 7 shift right count for average off
+v_GSM_NUM_SAMPLES_PER_BURST .set 12 ;156 samples in a demod burst
+v_MAX_CIR_LENGTH .set 13 ; 64 longest impulse response
+v_CIR_SIZE .set 14 ; 5 (must=5!) cir window size
+v_CIR_BEST_LENGTH .set 15 ; 5 (must=5!) normed cir length
+v_WORD_SIZE .set 16 ; 16 number of bits in halfword (16)
+v_ACCUM_GUARD_BITS .set 17 ; 8 extra bits in 40 bit word (8)
+v_ENERGY_THRESHOLD_PERCENT .set 18 ; 13 thresh energy as pct of total
+v_E_THRESH_FORMAT .set 19 ; 8 shift count for formatting thresh
+v_NB_NUM_ENCRYPT_BITS_PER_SIDE .set 20 ; 58 num bits before training
+v_NB_TRAIN_SIZE .set 21 ; 26 size of nb training sequence
+v_AB_TRAIN_SIZE .set 22 ; 41 size of ab training sequence
+v_TCHF .set 23 ; 1 enum symbol for TCHF burst type
+v_RACH .set 24 ; 10 enum symbol for RACH burst type
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _offsetDerot *
+;* *
+;* Regs Modified : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B3,B4,B5,B6, *
+;* B7,B8,B9 *
+;* Regs Used : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B3,B4,B5,B6, *
+;* B7,B8,B9 *
+;******************************************************************************
+_offsetDerot:
+;** --------------------------------------------------------------------------*
+;
+;*************************************************************************
+;
+;
+;**********************
+;
+; Optimization status
+;
+;*************************************************************************
+;
+; This software was written to optimize the C code provided by Frontier
+; Design. Below are tables summarizing the optimization status of the
+; code, in terms of number of execution packets required for each function.
+; May be useful if further optimization is required. Note the C was compiled
+; at -o because -o2 was unstable at the time this was written.
+;
+; Execution Packets
+; Estimated --------------------------------------------------------
+; Timing Assembly (-o2) C (-o)
+; Summary --------------------------------------------------------
+; NB % AB % SB NB % AB SB
+; --------------------------------------------------------
+; matchFilter ; 754 30 429 8 754 4141 28 2256 4141
+; offsetDerot ; 477 20 477 9 477 1637 11 1637 1637
+; impulse ; 280 12 3475 65 3953 1057 7 12182 12972
+; normEnergy ; 203 8 224 4 247 358 2 408 454
+; weight ; 200 11 98 2 182 2057 14 675 1431
+; Energy ; 68 7 343 8 273 243 2 1013 817
+; quantize ; 130 5 50 1 91 1992 14 632 1346
+; --------------------------------------------------------
+; equalize ; 88 4 56 1 88 171 1 106 171
+; calcRho ; 58 2 58 1 58 544 4 544 544
+; normCir ; 20 1 20 0 20 108 1 108 108
+; --------------------------------------------------------
+; total 2375 5336 6223 14726 19561 23621
+; -------------------------------------------
+; packets saved 12351 14225 17398
+; ratio 6.1 3.7 3.8
+;
+; Loop details (cl6x -o2 -mw -k)
+; --------------------------------------------------------
+; Pipelined loops
+; -------------------------------------------------------------
+; ovrhd = code outside pipelined loops
+; pro = number of packets in prolog
+; epi = number of packets in epilog
+; k = number of packets in pipelined kernel
+; cnt = value determining loop count
+; d = number of values per loop
+; pec = number fewer kernel loops due to pro/epilog NB AB SB
+; -------------------------------------------------------------
+; ovrhd pro epi k cnt/d pec pro epi k cnt/d pec
+; -------------------------------------------------------------
+; matchFilter ; 25+ (24+25+ 5*(NMB/1 - 6))
+; offsetDerot ; 31+ (13+16+ 8*(GSB/4 - 2))+ ( 5+ 6+ 1*(NOS/1 -12))
+; impulse (inner); 12+ ( 7+ 7+ 1*(NTS/1 -13))
+; weight ; 24+ ( 8+ 8+ 2*(NDB/2 - 7))+ ( 6+ 6+ 1*(NBE/1 -12))
+; normEnergy (1) ; 104+ ( 5+ 8+ 4*(BCL/1 - 3))+ ( 5+ 6+ 2*(BCL/1 - 3))+
+; normEnergy (2) ; ( 7+ 7+ 1*(NTS/1 - 7))+ ( 6+ 0+ 1*(ESB/1 - 1))
+; Energy ; 20+ ( 8+ 9+ 3*(CWL/1 - 3)) (10+10+ 2*(CRL/1 - 5))
+; quantize ; 14+ ( 6+ 6+ 1*(NDB/1 -12))
+; --------------------------------------------------------
+; equalize ; 16+ ( 7+ 7+ 1*(NMB/2 -13))
+; normCir ; 8+ ( 4+ 6+ 2*(BCL/1 - 4))
+; --------------------------------------------------------
+;
+; --------------------------------------------------------
+; No loops, or not pipelined
+; --------------------------------------------------------
+; impulse (outer); 19+ (12+inner loop)*CRL (or 19+(13+NTS)*CRL packets)
+; calcRho ; 58
+; -------------------------------------------------------------
+; Values: NB AB SB
+; ----------------
+; NOS = OFF_NUM_OFFSET_SAMPS = 128 128 128
+; GSB = GSM_NUM_SAMPLES_PER_BURST - g_BConsts_pt->numTailBits = 153 148 153
+; BCL = BEST_CIR_LENGTH = CIR_SIZE = 5 5 5
+; CRL = g_BConsts_pt->cirLength = 9 64 50
+; CWL = CRL - BCL = 4 59 45
+; NTS = g_BConsts_pt->cirNumTseqBits = 16 41 64
+; NMB = g_BConsts_pt->numBits = 142 77 142
+; NDB = g_BConsts_pt->numDataBits = 116 36 78
+; NBE = NB_NUM_ENCRYPT_BITS_PER_SIDE if TCHF else NDB = 58 36 78
+; ESB = number of sign bits in energy mantissa max: 31
+;
+; Comments on further optimization
+;
+; 0) For NB, over half the time is spent in matchFilter and offsetDerot
+; and those are nearly optimal for the current algorithms. For AB and
+; SB, impulse dominates the timing on its own, due to the longer
+; training sequence and cir length. Its also nearly optimal.
+;
+; 1) matchFilter does ten multiplies per bit, so five execution packets
+; per bit is minimum (only two multiply units). NB performance can
+; only be improved by 19 clocks out of 710 minimum, so its done.
+;
+; 2) offsetDerot's comp loop isn't bad at 2 clocks per sample. It can be
+; gotten as low as 1.25 clocks per sample if overflow is ignored instead
+; of saturated, so improvement may be possible. The offset accumulation
+; loop is about optimal, so best case improvement would be about 100
+; clocks.
+;
+; 3) impulse has an ignorable outer overhead of 19. The inner loop
+; timing is 1+NTS, about as good as you can do (two multiplies = at
+; least one clock). The inner overhead is 12, including 8 for a complex
+; int by short multiply. If you save n clocks in the inner overhead the
+; result is cir length * n clocks saved, 9*n, 41*n, and 64*n clocks for
+; NB, AB, and SB, resp. For a 10% improvement you'd need 3, 10, and 7
+; clocks resp. so the cases where impulse matters, AB, and SB, are
+; pretty hard to improve.
+;
+; 4) The huge difference in weight and quantize is simply that the C compiler
+; on -o, the highest safe setting for v2.00, failed to pipeline the loop
+; due to complexity from conditionals.
+;
+; NOTE:
+; Its important that pec < min(cnt/d), or one of two things will happen.
+; If pec is as big as the trip count given, a very slow non-pipelined
+; loop will occur. If pec is larger than the loop count, and the trip
+; directive specifies a larger value yet, the program will crash. Its
+; *very* important that the trip counts be maintained as min(cnt/d) as
+; the code is modified. Using trip counts saves code space and time by not
+; having to generate and branch around non-piped loops. It also makes the
+; .ASM file a lot easier to read. If you remove trip counts the
+; code will still run, but be larger, and a little slower. It won't
+; crash from inaccurate trip counts due to changes to constants or code.
+;
+;*************************************************************************
+;
+;*****************
+;
+; Demod routines
+;
+;/*************************************************************************
+;*
+;* offsetDerot() :
+;* -------------
+;* Offset computation + Offset compensation + Derotation
+;*
+;* The average DC offset in each channel is computed over the first 128
+;* samples, so that averaging is a shift right by 7.
+;*
+;* The number of samples processed (a multiple of 4) is:
+;* 4 * ( (GSM_NUMBER_SAMPLES_PER_BURST-3-g_BConsts_pt->numTailBits) / 4 )
+;*
+;* The first sample processed is the g_BConsts_pt->numTailBits-th.
+;*
+;* The average offset is subtracted from all these samples, removing
+;* any DC bias. The nth sample processed is rotated -90*n degrees at
+;* the same time.
+;*
+;* Input data . samples[MAX_NUM_DATA]{I,Q}
+;* . threshold (positive number)
+;*
+;* Output data . samples[MAX_NUM_DATA]{I,Q}
+;*
+;***************************************************************************/
+;void offsetDerot
+;(
+; t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+; Word threshold
+;);
+;
+;
+; _offsetDerot .cproc samptr,thresh
+; .reg ntailb ; const: g_BConsts_pt->numTailBits
+; .reg nsamps ; const: OFF_NUM_OFFSET_SAMPS
+; .reg offshv ; const: OFF_SHIFT_VAL
+; .reg nsplpb ; const: GSM_NUMBER_SAMPLES_PER_BURST
+; .reg lohalf ; const: 0x0000ffff
+; .reg hihalf ; const: 0xffff0000
+; .reg round ; const: rounding for offset accumulation
+; .reg offIacc ; accumulator for I samples
+; .reg offQacc ; accumulator for Q samples
+; .reg offsetI ; 16bit average DC over 128 I samples
+; .reg offsetQ ; 16bit average DC over 128 Q samples
+; .reg sp1 ; general pointer storage
+; .reg sp2 ; " " "
+; .reg iloop ; pointer to samples, in loops
+; .reg temp ; general storage
+; .reg itemp
+; .reg qtemp
+; .reg temp1 ; " "
+; .reg nthresh ; negative of thresh
+; .reg loopcnt ; counts loop iterations
+; .reg cond1 ; general condition register
+; .reg bcp ; constant interface pointers
+; .reg ccp
+ MVK .S1 _c_asm_consts,A5 ; |297|
+
+ MV .L2X A5,B5 ; |297|
+|| MVK .S1 _g_BConsts_pt,A3 ; |294|
+
+ MVKH .S2 _c_asm_consts,B5 ; |298| load address of C constants
+|| MVKH .S1 _g_BConsts_pt,A3 ; |295| load address of pointer
+
+ LDW .D1T1 *A3,A3 ; |296| load pointer to burst constants
+|| MV .L1X B5,A5 ; |298|
+
+ LDW .D1T1 *+A5(36),A0 ; |300|
+ NOP 2
+ LDW .D1T1 *+A5(44),A9 ; |303|
+ NOP 1
+ LDBU .D1T2 *+A3[A0],B7 ; |301|
+
+ MVK .S2 0xffff,B4 ; |306| mask for lower halfword
+|| MV .L1X B4,A7 ; |259|
+
+ MVK .S2 0x1,B1 ; |310|
+
+ MV .L2X A9,B5 ; |307|
+|| LDW .D1T2 *+A5(40),B0 ; |302|
+|| MVKH .S2 0xffff,B4 ; |307| (lohalf was sign extended!)
+
+ SHL .S2 B1,B5,B1 ; |312| temp = 1<<OFF_SHIFT_VAL = 1.0
+|| MV .L1X B3,A2 ; |259|
+|| MV .L2X A4,B8 ; |259|
+
+ ADDAW .D2 B8,B7,B5 ; |347|
+|| SHR .S2 B1,0x1,B1 ; |313| temp = 1<<OFF_SHIFT_VAL-1 = .5
+|| NOT .L1X B4,A5 ; |308| mask for upper halfword
+|| LDW .D1T2 *+A5(48),B9 ; |304|
+
+ MVC .S2 CSR,B2 ; |347|
+|| MV .L1X B5,A0 ; |347|
+|| MV .L2 B5,B6 ; |347|
+|| ZERO .D2 B4 ; |328|
+|| ZERO .D1 A3 ; |327|
+|| NEG .S1 A7,A8 ; |315|
+
+ AND .L2 -2,B2,B5 ; |347|
+
+ MVC .S2 B5,CSR ; |347|
+|| ADD .L2 2,B6,B6 ; |347|
+|| SUB .D2 B0,12,B0 ; |347|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : offcalcloop
+;* Known Minimum Trip Count : 128
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 1
+;* Partitioned Resource Bound(*) : 1
+;* Resource Partition:
+;* A-side B-side
+;* .L units 0 0
+;* .S units 1* 0
+;* .D units 1* 1*
+;* .M units 0 0
+;* .X cross paths 0 0
+;* .T address paths 1* 1*
+;* Long read paths 0 0
+;* Long write paths 0 0
+;* Logical ops (.LS) 0 0 (.L or .S unit)
+;* Addition ops (.LSD) 1 2 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1* 0
+;* Bound(.L .S .D .LS .LSD) 1* 1*
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 1 Schedule found with 7 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : 32
+;*
+;*----------------------------------------------------------------------------*
+L2: ; PIPED LOOP PROLOG
+; offcalcloop: .trip 128 ; 5+6/12 kernel 1
+
+ LDH .D1T1 *A0++(4),A4 ; |353| as long as nsamps < 32768
+|| LDH .D2T2 *B6++(4),B5 ; |355| adding 16 bit inputs
+|| [ B0] B .S1 offcalcloop ; |359|
+
+ LDH .D1T1 *A0++(4),A4 ;@ |353| as long as nsamps < 32768
+|| LDH .D2T2 *B6++(4),B5 ;@ |355| adding 16 bit inputs
+|| [ B0] B .S1 offcalcloop ;@ |359|
+
+ LDH .D1T1 *A0++(4),A4 ;@@ |353| as long as nsamps < 32768
+|| LDH .D2T2 *B6++(4),B5 ;@@ |355| adding 16 bit inputs
+|| [ B0] B .S1 offcalcloop ;@@ |359|
+
+ LDH .D1T1 *A0++(4),A4 ;@@@ |353| as long as nsamps < 32768
+|| LDH .D2T2 *B6++(4),B5 ;@@@ |355| adding 16 bit inputs
+|| [ B0] B .S1 offcalcloop ;@@@ |359|
+
+ LDH .D1T1 *A0++(4),A4 ;@@@@ |353| as long as nsamps < 32768
+|| LDH .D2T2 *B6++(4),B5 ;@@@@ |355| adding 16 bit inputs
+|| [ B0] B .S1 offcalcloop ;@@@@ |359|
+
+;** --------------------------------------------------------------------------*
+offcalcloop: ; PIPED LOOP KERNEL
+
+ ADD .L1 A3,A4,A3 ; |354| 32-bit accumulator won't ovf
+|| ADD .S2 B4,B5,B4 ; |356|
+|| LDH .D1T1 *A0++(4),A4 ;@@@@@ |353| as long as nsamps < 32768
+|| LDH .D2T2 *B6++(4),B5 ;@@@@@ |355| adding 16 bit inputs
+|| [ B0] B .S1 offcalcloop ;@@@@@ |359|
+|| [ B0] SUB .L2 B0,0x1,B0 ;@@@@@@ |358|
+
+;** --------------------------------------------------------------------------*
+L4: ; PIPED LOOP EPILOG
+
+ ADD .L1 A3,A4,A3 ;@ |354| 32-bit accumulator won't ovf
+|| ADD .S2 B4,B5,B4 ;@ |356|
+|| LDH .D1T1 *A0++(4),A4 ;@@@@@@ |353| as long as nsamps < 32768
+|| LDH .D2T2 *B6++(4),B5 ;@@@@@@ |355| adding 16 bit inputs
+
+ ADD .L1 A3,A4,A3 ;@@ |354| 32-bit accumulator won't ovf
+|| ADD .S2 B4,B5,B4 ;@@ |356|
+
+ ADD .L1 A3,A4,A3 ;@@@ |354| 32-bit accumulator won't ovf
+|| ADD .S2 B4,B5,B4 ;@@@ |356|
+
+ ADD .L1 A3,A4,A3 ;@@@@ |354| 32-bit accumulator won't ovf
+|| ADD .S2 B4,B5,B4 ;@@@@ |356|
+
+ ADD .L1 A3,A4,A3 ;@@@@@ |354| 32-bit accumulator won't ovf
+|| ADD .S2 B4,B5,B4 ;@@@@@ |356|
+
+ ADD .L1 A3,A4,A3 ;@@@@@@ |354| 32-bit accumulator won't ovf
+|| ADD .S2 B4,B5,B4 ;@@@@@@ |356|
+
+;** --------------------------------------------------------------------------*
+
+ ADD .L1X A3,B1,A3 ; |373| round
+|| MV .S1 A9,A0 ; |373|
+|| MVC .S2 B2,CSR ; |347|
+
+ SHR .S1 A3,A0,A6 ; |376| div by 1<<OFF_SHIFT_VAL
+ CMPGT .L1 A6,A7,A1 ; |392|
+
+ [ A1] MV .L1 A7,A6 ; |393|
+|| ADD .L2 B4,B1,B4 ; |374|
+
+ CMPLT .L1 A6,A8,A1 ; |394| offsetI and offsetQ are
+|| SHR .S1X B4,A0,A0 ; |377| which is OFF_NUM_OFFSET_SAMPS
+
+ CMPGT .L1 A0,A7,A1 ; |396|
+|| [ A1] MV .S1 A8,A6 ; |395|
+
+ [ A1] MV .L1 A7,A0 ; |397|
+
+ CMPLT .L1 A0,A8,A1 ; |398|
+|| MV .L2X A6,B4 ; |399|
+
+ [ A1] MV .L1 A8,A0 ; |399|
+|| SHL .S2 B4,0x10,B4 ; |440| place offsets in upper 16 bits
+|| SUB .L2 B9,B7,B0 ; |444| (nsplpb-ntailb)/4
+
+ SHL .S1 A0,0x10,A0 ; |441|
+|| MV .L1X B4,A6 ; |441|
+|| SHR .S2 B0,0x2,B0 ; |445| four samples per loop
+|| ADDAW .D2 B8,B7,B5 ; |443| compute number of loop iterations
+
+ MVC .S2 CSR,B3 ; |445|
+|| MV .L2X A0,B1 ; |445|
+|| MV .L1X B5,A8 ; |445|
+
+ AND .L2 -2,B3,B4 ; |445|
+
+ MVC .S2 B4,CSR ; |445|
+|| SUB .L2 B0,2,B0 ; |445|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : comploop
+;* Known Minimum Trip Count : 32
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 7
+;* Partitioned Resource Bound(*) : 8
+;* Resource Partition:
+;* A-side B-side
+;* .L units 3 5
+;* .S units 3 7
+;* .D units 7 1
+;* .M units 0 0
+;* .X cross paths 6 7
+;* .T address paths 5 3
+;* Long read paths 3 1
+;* Long write paths 0 0
+;* Logical ops (.LS) 8 2 (.L or .S unit)
+;* Addition ops (.LSD) 1 2 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 7 7
+;* Bound(.L .S .D .LS .LSD) 8* 6
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 8 Schedule found with 3 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : 32
+;*
+;*----------------------------------------------------------------------------*
+L6: ; PIPED LOOP PROLOG
+; comploop: .trip 32 ; 13+16/2 kernel:8 4/loop
+ LDW .D1T2 *+A8(8),B7 ; |487| Q in upper 16 qtemp
+ NOP 4
+ LDW .D1T1 *+A8(12),A3 ; |504| Q in upper 16 qtemp
+
+ AND .L1X B7,A5,A0 ; |489|
+|| LDW .D1T1 *+A8(4),A9 ; |470| Q in upper 16 qtemp
+
+ LDW .D1T2 *A8,B6 ; |453| Q in upper 16 qtemp
+ LDW .D1T2 *+A8(24),B7 ;@ |487| Q in upper 16 qtemp
+ NOP 1
+
+ SSUB .L2X B1,A0,B8 ; |494| offsetQ-qtemp saturated to qtemp
+|| SHL .S1 A3,0x10,A0 ; |505| I to upper 16 itemp
+|| SHL .S2 B7,0x10,B4 ; |488| I to upper 16 itemp
+
+ AND .L1 A9,A5,A7 ; |472|
+|| AND .S1 A3,A5,A3 ; |506|
+|| SHL .S2X A9,0x10,B9 ; |471| I to upper 16 itemp
+
+ SHL .S2 B6,0x10,B6 ; |454| I to upper 16 itemp
+|| AND .L2X B6,A5,B4 ; |455|
+|| SSUB .L1X B4,A6,A4 ; |491| itemp-offsetI saturated to itemp
+
+;** --------------------------------------------------------------------------*
+comploop: ; PIPED LOOP KERNEL
+
+ SHRU .S2 B8,0x10,B6 ; |495| put in lower 16, upper 16 0
+|| SSUB .L2X A6,B6,B8 ; |457| offsetI-itemp saturated to itemp
+|| AND .S1 A4,A5,A4 ; |492| clear lower 16 bits of itemp
+|| SSUB .L1 A0,A6,A0 ; |511| itemp-offsetI saturated to itemp
+|| LDW .D1T1 *+A8(28),A3 ;@ |504| Q in upper 16 qtemp
+
+ [ B0] SUB .S2 B0,0x1,B0 ; |518| loop thru four-packs of samples
+|| SSUB .L2X A3,B1,B2 ; |508| qtemp-offsetQ saturated to qtemp
+|| SHRU .S1 A0,0x10,A9 ; |512| put in lower 16, upper 16 0
+|| AND .L1X B7,A5,A0 ;@ |489|
+|| LDW .D1T1 *+A8(20),A9 ;@ |470| Q in upper 16 qtemp
+
+ [ B0] B .S2 comploop ; |519| until loopcnt hits zero
+|| SSUB .L2X A6,B9,B9 ; |477| offsetI-itemp saturated to itemp
+|| SSUB .L1X B1,A7,A3 ; |474| offsetQ-qtemp saturated to qtemp
+|| LDW .D1T2 *+A8(16),B6 ;@ |453| Q in upper 16 qtemp
+
+ SHRU .S2 B9,0x10,B4 ; |478| put in lower 16, upper 16 0
+|| SSUB .L2 B4,B1,B6 ; |460| qtemp-offsetQ saturated to qtemp
+|| ADD .L1X A4,B6,A3 ; |497| itemp:qtemp -> itemp
+|| AND .S1 A3,A5,A7 ; |475| clear lower 16 bits of qtemp
+|| LDW .D1T2 *+A8(40),B7 ;@@ |487| Q in upper 16 qtemp
+
+ AND .L2X B8,A5,B6 ; |458| clear lower 16 bits of itemp
+|| SHRU .S2 B6,0x10,B8 ; |461| put in lower 16, upper 16 0
+|| AND .L1X B2,A5,A4 ; |509| clear lower 16 bits of qtemp
+|| STW .D1T1 A3,*+A8(8) ; |498|
+
+ ADD .D2 B6,B8,B6 ; |463| itemp:qtemp -> itemp
+|| ADD .D1 A4,A9,A7 ; |514| qtemp:itemp -> itemp
+|| ADD .L1X A7,B4,A4 ; |480| qtemp:itemp -> itemp
+|| SSUB .L2X B1,A0,B8 ;@ |494| offsetQ-qtemp saturated to qtemp
+|| SHL .S1 A3,0x10,A0 ;@ |505| I to upper 16 itemp
+|| SHL .S2 B7,0x10,B4 ;@ |488| I to upper 16 itemp
+
+ STW .D2T2 B6,*B5++(16) ; |464|
+|| STW .D1T1 A7,*+A8(12) ; |515|
+|| AND .L1 A9,A5,A7 ;@ |472|
+|| AND .S1 A3,A5,A3 ;@ |506|
+|| SHL .S2X A9,0x10,B9 ;@ |471| I to upper 16 itemp
+
+ ADDK .S1 16,A8 ; |302|
+|| STW .D1T1 A4,*+A8(4) ; |481|
+|| SHL .S2 B6,0x10,B6 ;@ |454| I to upper 16 itemp
+|| AND .L2X B6,A5,B4 ;@ |455|
+|| SSUB .L1X B4,A6,A4 ;@ |491| itemp-offsetI saturated to itemp
+
+;** --------------------------------------------------------------------------*
+L8: ; PIPED LOOP EPILOG
+
+ SHRU .S2 B8,0x10,B6 ;@ |495| put in lower 16, upper 16 0
+|| SSUB .L2X A6,B6,B8 ;@ |457| offsetI-itemp saturated to itemp
+|| AND .S1 A4,A5,A4 ;@ |492| clear lower 16 bits of itemp
+|| SSUB .L1 A0,A6,A0 ;@ |511| itemp-offsetI saturated to itemp
+|| LDW .D1T1 *+A8(28),A3 ;@@ |504| Q in upper 16 qtemp
+
+ SSUB .L2X A3,B1,B2 ;@ |508| qtemp-offsetQ saturated to qtemp
+|| SHRU .S1 A0,0x10,A9 ;@ |512| put in lower 16, upper 16 0
+|| AND .L1X B7,A5,A0 ;@@ |489|
+|| LDW .D1T1 *+A8(20),A9 ;@@ |470| Q in upper 16 qtemp
+
+ SSUB .L2X A6,B9,B9 ;@ |477| offsetI-itemp saturated to itemp
+|| SSUB .L1X B1,A7,A3 ;@ |474| offsetQ-qtemp saturated to qtemp
+|| LDW .D1T2 *+A8(16),B6 ;@@ |453| Q in upper 16 qtemp
+
+ SHRU .S2 B9,0x10,B4 ;@ |478| put in lower 16, upper 16 0
+|| SSUB .L2 B4,B1,B6 ;@ |460| qtemp-offsetQ saturated to qtemp
+|| ADD .L1X A4,B6,A3 ;@ |497| itemp:qtemp -> itemp
+|| AND .S1 A3,A5,A7 ;@ |475| clear lower 16 bits of qtemp
+
+ AND .L2X B8,A5,B6 ;@ |458| clear lower 16 bits of itemp
+|| SHRU .S2 B6,0x10,B8 ;@ |461| put in lower 16, upper 16 0
+|| AND .L1X B2,A5,A4 ;@ |509| clear lower 16 bits of qtemp
+|| STW .D1T1 A3,*+A8(8) ;@ |498|
+
+ ADD .D2 B6,B8,B6 ;@ |463| itemp:qtemp -> itemp
+|| ADD .D1 A4,A9,A7 ;@ |514| qtemp:itemp -> itemp
+|| ADD .L1X A7,B4,A4 ;@ |480| qtemp:itemp -> itemp
+|| SSUB .L2X B1,A0,B8 ;@@ |494| offsetQ-qtemp saturated to qtemp
+|| SHL .S1 A3,0x10,A0 ;@@ |505| I to upper 16 itemp
+|| SHL .S2 B7,0x10,B4 ;@@ |488| I to upper 16 itemp
+
+ STW .D2T2 B6,*B5++(16) ;@ |464|
+|| STW .D1T1 A7,*+A8(12) ;@ |515|
+|| AND .L1 A9,A5,A7 ;@@ |472|
+|| AND .S1 A3,A5,A3 ;@@ |506|
+|| SHL .S2X A9,0x10,B9 ;@@ |471| I to upper 16 itemp
+
+ ADDK .S1 16,A8 ;@ |302|
+|| STW .D1T1 A4,*+A8(4) ;@ |481|
+|| SHL .S2 B6,0x10,B6 ;@@ |454| I to upper 16 itemp
+|| AND .L2X B6,A5,B4 ;@@ |455|
+|| SSUB .L1X B4,A6,A4 ;@@ |491| itemp-offsetI saturated to itemp
+
+ SHRU .S2 B8,0x10,B6 ;@@ |495| put in lower 16, upper 16 0
+|| SSUB .L2X A6,B6,B8 ;@@ |457| offsetI-itemp saturated to itemp
+|| AND .S1 A4,A5,A4 ;@@ |492| clear lower 16 bits of itemp
+|| SSUB .L1 A0,A6,A0 ;@@ |511| itemp-offsetI saturated to itemp
+
+ SSUB .L2X A3,B1,B2 ;@@ |508| qtemp-offsetQ saturated to qtemp
+|| SHRU .S1 A0,0x10,A9 ;@@ |512| put in lower 16, upper 16 0
+
+ SSUB .L2X A6,B9,B9 ;@@ |477| offsetI-itemp saturated to itemp
+|| SSUB .L1X B1,A7,A3 ;@@ |474| offsetQ-qtemp saturated to qtemp
+
+ SHRU .S2 B9,0x10,B4 ;@@ |478| put in lower 16, upper 16 0
+|| SSUB .L2 B4,B1,B6 ;@@ |460| qtemp-offsetQ saturated to qtemp
+|| ADD .L1X A4,B6,A3 ;@@ |497| itemp:qtemp -> itemp
+|| AND .S1 A3,A5,A7 ;@@ |475| clear lower 16 bits of qtemp
+
+ AND .L2X B8,A5,B6 ;@@ |458| clear lower 16 bits of itemp
+|| SHRU .S2 B6,0x10,B8 ;@@ |461| put in lower 16, upper 16 0
+|| AND .L1X B2,A5,A4 ;@@ |509| clear lower 16 bits of qtemp
+|| STW .D1T1 A3,*+A8(8) ;@@ |498|
+
+ ADD .D2 B6,B8,B6 ;@@ |463| itemp:qtemp -> itemp
+|| ADD .D1 A4,A9,A7 ;@@ |514| qtemp:itemp -> itemp
+|| ADD .L1X A7,B4,A4 ;@@ |480| qtemp:itemp -> itemp
+
+ STW .D2T2 B6,*B5++(16) ;@@ |464|
+|| STW .D1T1 A7,*+A8(12) ;@@ |515|
+
+ ADDK .S1 16,A8 ;@@ |302|
+|| STW .D1T1 A4,*+A8(4) ;@@ |481|
+
+;** --------------------------------------------------------------------------*
+ MVC .S2 B3,CSR ; |445|
+ B .S2X A2
+ NOP 5
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _impulse *
+;* *
+;* Regs Modified : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,B0,B1,B4,B5,B6,B7,B8, *
+;* B9 *
+;* Regs Used : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,B0,B1,B3,B4,B5,B6,B7, *
+;* B8,B9 *
+;******************************************************************************
+_impulse:
+;** --------------------------------------------------------------------------*
+;
+;
+;/*************************************************************************
+;*
+;* impulse() :
+;* ---------
+;* Compute the channel impulse response
+;*
+;*
+;* Input data . Training Sequence : tseq[TRAIN_SIZE]
+;* . Derotated Samples : samples[MAX_NUM_DATA]{I,Q}
+;*
+;* Output data . Channel impulse response : cir[CIR_LENGTH]{I,Q}
+;*
+;************************************************************************
+;*
+;* An illustration of "impulse()" operation is shown below for the NB:
+;* NB impulse starts at an "offset" because it is desirable to correlate
+;* the tseq bits against what is probably tseq bits of the samples. If
+;* the samples were shifted because the mobile moved then the offset of 3
+;* will insure that the correlation is still in the tseq bits. Also, with
+;* the diagram below the demod can find toa's from -2 to 2.
+;*
+;* Assumes: cirLength = 9, cirNumTseqBits = 16, offset = 3, toaMin = -2
+;*
+;* <-- cirNumTseqBits ->
+;* offset offset+cirNumTseqBits-1
+;* | |
+;* v v
+;* ------------------------------
+;* tseq |0 1 2 3 tseq values 18|
+;* ------------------------------
+;* cirStartIndex
+;* |
+;* 0 60 61 v
+;* i = 0 -------------------------------------
+;* samples[] | |62 samples[] 77| MAC --> cir[0]
+;* --------------------------------------
+;*
+;* i = 1 ----------------------
+;* samples[] |63 samples[] 78| MAC --> cir[1]
+;* ... ---------------------- ...
+;*
+;* i = 8 = cirLength-1 ----------------------
+;* samples[] |70 samples[] 85| MAC --> cir[8]
+;* ----------------------
+;* ^
+;* |
+;* cirStartIndex+cirLength-1
+;*
+;* j=0 j=cirNumTseqBits-1
+;* numTseqBits-1
+;* ---
+;* \
+;* cir[i] = / tseq[offset+j] * samples[cirstartIndex+i+j]
+;* ---
+;* j=0
+;*
+;***************************************************************************/
+;void impulse
+;(
+; t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+; const t_TseqWord tseq[MAX_TSEQ_SIZE],
+; t_ULCirSamp cir[MAX_CIR_LENGTH]
+;);
+;
+; _impulse .cproc samptr,tseqptr,cirptr
+; .reg start ; const: g_BConsts_pt->cirStartIndex
+; .reg offset ; const: g_BConsts_pt->impulseTseqOffset
+; .reg length ; const: g_BConsts_pt->cirLength
+; .reg ntbits ; const: g_BConsts_pt->cirNumTseqBits
+; .reg nbinv ; const: g_BConsts_pt->cirNumTseqBitsInv
+; .reg maxcirlen ; const: MAX_CIR_LENGTH
+; .reg wsize ; const: WORD_SIZE
+; .reg resI ; inner loop accumulators
+; .reg resQ ;
+; .reg result ; inner/outer loop storage/accumulator
+; .reg result1 ; inner/outer loop storage/accumulator
+; .reg temp ; temporary storage
+; .reg temp1 ; temporary storage
+; .reg qtemp ; " "
+; .reg itemp ; " "
+; .reg qtemp1 ; " "
+; .reg itemp1 ; " "
+; .reg sptr ; loop sample pointer storage
+; .reg sptr1 ;
+; .reg tptr ; loop training sequence pointer storage
+; .reg icount ; outer loop downcounter
+; .reg jcount ; inner loop downcounter
+; .reg round ; 1 means round up, zero otherwize
+; .reg round1 ; 1 means round up, zero otherwize
+; .reg bcp
+; .reg ccp
+ MVK .S2 _c_asm_consts,B5 ; |631|
+
+ MVKH .S2 _c_asm_consts,B5 ; |632| load address of C constants
+|| MVK .S1 _g_BConsts_pt,A5 ; |628|
+
+ LDW .D2T1 *+B5(20),A0 ; |636|
+|| MV .L1X B5,A3 ; |629|
+|| MVKH .S1 _g_BConsts_pt,A5 ; |629| load address of pointer
+
+ LDW .D1T2 *A5,B5 ; |630| load pointer to burst constants
+ NOP 4
+
+ MV .L2X A3,B5
+|| MV .L1X B5,A5 ; |630|
+|| MV .S2 B5,B6 ; |630|
+|| LDW .D1T1 *+A3(4),A8 ; |640|
+
+ LDW .D2T1 *+B5(8),A2 ; |642|
+ LDW .D2T2 *+B5(12),B5 ; |634|
+ NOP 1
+ LDW .D1T2 *+A3(16),B0 ; |638|
+ LDBU .D1T1 *+A5[A0],A0 ; |637|
+ LDBU .D1T2 *+A5[A8],B9 ; |641|
+
+ LDBU .D2T1 *+B6[B5],A8 ; |635|
+|| MV .L2X A6,B8 ; |590|
+
+ ADDAB .D1 A5,A2,A3 ; |643|
+|| MV .L2X A5,B4 ; |590|
+|| MV .L1X B4,A7 ; |590|
+
+ MV .L2X A3,B4 ; |639|
+|| LDBU .D2T1 *+B4[B0],A1 ; |639|
+
+ LDHU .D2T1 *B4,A6 ; |655|
+|| ADDAW .D1 A4,A0,A9 ; |655| sptr => samptr[start]
+
+;** --------------------------------------------------------------------------*
+impouterloop:
+; impouterloop: .trip 9 ;not pipelined, 19 packets to here
+ MV .L2X A9,B4 ; |665| sptr1 => samptr[start+i]
+
+ MVC .S2 CSR,B1 ; |667|
+|| ZERO .L1 A3 ; |664|
+|| ZERO .L2 B7 ; |663| zero accumulators each i
+|| ADDAB .D1 A7,A8,A5 ; |667| tptr => tseq[offset]
+|| MV .D2 B9,B0 ; |666| set inner loop length
+
+ AND .L2 -2,B1,B5 ; |667|
+
+ MVC .S2 B5,CSR ; |667|
+|| SUB .L2 B0,13,B0 ; |667|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : impinnerloop
+;* Known Minimum Trip Count : 16
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 1
+;* Partitioned Resource Bound(*) : 1
+;* Resource Partition:
+;* A-side B-side
+;* .L units 0 0
+;* .S units 1* 0
+;* .D units 1* 1*
+;* .M units 1* 1*
+;* .X cross paths 1* 1*
+;* .T address paths 1* 1*
+;* Long read paths 0 0
+;* Long write paths 0 0
+;* Logical ops (.LS) 0 0 (.L or .S unit)
+;* Addition ops (.LSD) 1 2 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1* 0
+;* Bound(.L .S .D .LS .LSD) 1* 1*
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 1 Schedule found with 8 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : 32
+;*
+;*----------------------------------------------------------------------------*
+L13: ; PIPED LOOP PROLOG
+; impinnerloop: .trip 16 ;7+7/13 kernel:1
+
+ LDB .D1T1 *A5++,A0 ; |686| temp is max +/- 128
+|| LDW .D2T2 *B4++,B6 ; |692| load Q:I packed in a word
+
+ LDB .D1T1 *A5++,A0 ;@ |686| temp is max +/- 128
+|| LDW .D2T2 *B4++,B6 ;@ |692| load Q:I packed in a word
+
+ [ B0] B .S1 impinnerloop ; |699|
+|| LDB .D1T1 *A5++,A0 ;@@ |686| temp is max +/- 128
+|| LDW .D2T2 *B4++,B6 ;@@ |692| load Q:I packed in a word
+
+ [ B0] B .S1 impinnerloop ;@ |699|
+|| LDB .D1T1 *A5++,A0 ;@@@ |686| temp is max +/- 128
+|| LDW .D2T2 *B4++,B6 ;@@@ |692| load Q:I packed in a word
+
+ [ B0] B .S1 impinnerloop ;@@ |699|
+|| LDB .D1T1 *A5++,A0 ;@@@@ |686| temp is max +/- 128
+|| LDW .D2T2 *B4++,B6 ;@@@@ |692| load Q:I packed in a word
+
+ MPY .M2X B6,A0,B5 ; |693|
+|| MPYHL .M1X B6,A0,A4 ; |695| += s[start+i+j].I*tseq[offset+j]
+|| [ B0] B .S1 impinnerloop ;@@@ |699|
+|| LDB .D1T1 *A5++,A0 ;@@@@@ |686| temp is max +/- 128
+|| LDW .D2T2 *B4++,B6 ;@@@@@ |692| load Q:I packed in a word
+
+ MPY .M2X B6,A0,B5 ;@ |693|
+|| MPYHL .M1X B6,A0,A4 ;@ |695| += s[start+i+j].I*tseq[offset+j]
+|| [ B0] B .S1 impinnerloop ;@@@@ |699|
+|| LDB .D1T1 *A5++,A0 ;@@@@@@ |686| temp is max +/- 128
+|| LDW .D2T2 *B4++,B6 ;@@@@@@ |692| load Q:I packed in a word
+
+;** --------------------------------------------------------------------------*
+impinnerloop: ; PIPED LOOP KERNEL
+
+ ADD .L2 B7,B5,B7 ; |694| resI[j]
+|| ADD .L1 A3,A4,A3 ; |696| resQ[j]
+|| MPY .M2X B6,A0,B5 ;@@ |693|
+|| MPYHL .M1X B6,A0,A4 ;@@ |695| += s[start+i+j].I*tseq[offset+j]
+|| [ B0] B .S1 impinnerloop ;@@@@@ |699|
+|| [ B0] SUB .S2 B0,0x1,B0 ;@@@@@@ |698| inner loop (cirNumTseqBits)
+|| LDB .D1T1 *A5++,A0 ;@@@@@@@ |686| temp is max +/- 128
+|| LDW .D2T2 *B4++,B6 ;@@@@@@@ |692| load Q:I packed in a word
+
+;** --------------------------------------------------------------------------*
+L15: ; PIPED LOOP EPILOG
+
+ ADD .L2 B7,B5,B7 ;@ |694| resI[j]
+|| ADD .L1 A3,A4,A3 ;@ |696| resQ[j]
+|| MPY .M2X B6,A0,B5 ;@@@ |693|
+|| MPYHL .M1X B6,A0,A4 ;@@@ |695| += s[start+i+j].I*tseq[offset+j]
+
+ ADD .L2 B7,B5,B7 ;@@ |694| resI[j]
+|| ADD .L1 A3,A4,A3 ;@@ |696| resQ[j]
+|| MPY .M2X B6,A0,B5 ;@@@@ |693|
+|| MPYHL .M1X B6,A0,A4 ;@@@@ |695| += s[start+i+j].I*tseq[offset+j]
+
+ ADD .L2 B7,B5,B7 ;@@@ |694| resI[j]
+|| ADD .L1 A3,A4,A3 ;@@@ |696| resQ[j]
+|| MPY .M2X B6,A0,B5 ;@@@@@ |693|
+|| MPYHL .M1X B6,A0,A4 ;@@@@@ |695| += s[start+i+j].I*tseq[offset+j]
+
+ ADD .L2 B7,B5,B7 ;@@@@ |694| resI[j]
+|| ADD .L1 A3,A4,A3 ;@@@@ |696| resQ[j]
+|| MPY .M2X B6,A0,B5 ;@@@@@@ |693|
+|| MPYHL .M1X B6,A0,A4 ;@@@@@@ |695| += s[start+i+j].I*tseq[offset+j]
+
+ ADD .L2 B7,B5,B7 ;@@@@@ |694| resI[j]
+|| ADD .L1 A3,A4,A3 ;@@@@@ |696| resQ[j]
+|| MPY .M2X B6,A0,B5 ;@@@@@@@ |693|
+|| MPYHL .M1X B6,A0,A4 ;@@@@@@@ |695| += s[start+i+j].I*tseq[offset+j]
+
+ ADD .L2 B7,B5,B7 ;@@@@@@ |694| resI[j]
+|| ADD .L1 A3,A4,A3 ;@@@@@@ |696| resQ[j]
+
+ ADD .L2 B7,B5,B7 ;@@@@@@@ |694| resI[j]
+|| ADD .L1 A3,A4,A3 ;@@@@@@@ |696| resQ[j]
+
+;** --------------------------------------------------------------------------*
+
+ MV .L2X A6,B4
+|| MVC .S2 B1,CSR ; |667|
+
+ MPYU .M2 B4,B7,B0 ; |722| itemp = nbinv*lo(resI)
+|| MPYLH .M1X A6,B7,A0 ; |724| qtemp = nbinv*hi(resI)
+|| SUB .L1 A1,0x1,A1 ; |743| outer loop (cirLength)
+
+ [ A1] B .S1 impouterloop ; |744|
+|| MPYU .M1X B4,A3,A2 ; |734| itemp1 = nbinv*lo(resQ)
+|| MV .L2X A6,B5 ; |724|
+
+ SHRU .S2 B0,0x10,B6 ; |725| result = low part
+|| MPYLH .M2X B5,A3,B5 ; |736| qtemp = nbinv*hi(resQ)
+
+ EXTU .S2 B0,0x10,0x1f,B4 ; |723| itemp bit 15 in round
+|| SHRU .S1 A2,0x10,A3 ; |737| result1 = low part
+|| ADD .L2X B6,A0,B6 ; |725|
+
+ ADD .L2 B6,B4,B6 ; |727| round for word shift
+|| ADD .L1X A3,B5,A3 ; |737|
+|| EXTU .S1 A2,0x10,0x1f,A0 ; |735| itemp1 bit 15 in round1
+
+ ADD .L1 A3,A0,A3 ; |739| round for word shift
+|| STH .D2T2 B6,*B8++ ; |728| save in cir[i].I
+
+ STH .D2T1 A3,*B8++ ; |740| save in cir[i].Q
+|| ADDAW .D1 A9,1,A9 ; |742| sptr => samptr[start+i]
+
+ ; BRANCH OCCURS ; |744|
+;** --------------------------------------------------------------------------*
+ B .S2 B3
+ NOP 5
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _Energy *
+;* *
+;* Regs Modified : A0,A1,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B4,B5,B6,B7,B8, *
+;* B9 *
+;* Regs Used : A0,A1,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B3,B4,B5,B6,B7, *
+;* B8,B9 *
+;******************************************************************************
+_Energy:
+;** --------------------------------------------------------------------------*
+;
+;/*************************************************************************
+;*
+;* Energy() :
+;* --------
+;* Compute the energy of the impulse response, the array which is
+;* the complex magnitude of each cir entry.
+;*
+;* Find the highest energy window of length CIR_SIZE
+;*
+;* Input data: The channel impulse response: cir[2][CIR_LENGTH]
+;*
+;* Output data: Energy of the impulse response: leng[CIR_LENGTH]
+;* Position of the best: returned by the function
+;*
+;***************************************************************************/
+;Char Energy
+;(
+; t_ULCirSamp cir[MAX_CIR_LENGTH],
+; LWord energy_L[MAX_CIR_LENGTH]
+;);
+;
+; _Energy .cproc cirptr,nrgptr ;returns Char
+; .reg length ; const: length of cir
+; .reg maxcirlen ; const: length of longest possible cir
+; .reg cirsize ; const: width of NB cir window
+; .reg cptr0 ; temp pointers to cir
+; .reg cptr1 ;
+; .reg nptr0 ; temp pointers to energy array
+; .reg nptr1
+; .reg itemp ; temp storage
+; .reg qtemp
+; .reg result2
+; .reg curidx ; current idx+1 in find best window
+; .reg res1:res0 ; long accumulators
+; .reg key1:key0
+; .reg tmp1:tmp0
+; .reg loopcnt ; holds loop counter
+; .reg best ; return register for energy window
+; .reg smaller ; condition registers
+; .reg uprdiff
+; .reg oddcir
+; .reg new,new1,new2,new3
+; .reg bcp
+; .reg ccp
+ MVK .S2 _g_BConsts_pt,B5 ; |800|
+
+ MVKH .S2 _g_BConsts_pt,B5 ; |801| load address of pointer
+|| MVK .S1 _c_asm_consts,A3 ; |803|
+
+ LDW .D2T2 *B5,B5 ; |802| load pointer to burst constants
+|| MVKH .S1 _c_asm_consts,A3 ; |804| load address of C constants
+
+ LDW .D1T1 *+A3(16),A0 ; |806|
+ NOP 3
+ MV .L1X B5,A5
+ LDBU .D1T2 *+A5[A0],B8 ; |807|
+ NOP 4
+ CMPGTU .L1X B8,5,A1 ; |828|
+ [ A1] B .S1 L22 ; |828|
+ NOP 4
+
+ MV .L2 B8,B0 ; |828|
+|| MV .L1X B4,A0 ; |771|
+|| LDW .D1T2 *+A3(56),B9 ; |809|
+|| MV .S2 B4,B1 ; |771|
+
+ ; BRANCH OCCURS ; |828|
+;** --------------------------------------------------------------------------*
+L20:
+; nrgcomploop: .trip 4 ; 8+8/7 kernel:2
+ LDW .D1T2 *A4++,B5 ; |833|
+ NOP 3
+ SUB .L2 B0,0x1,B0 ; |839| do this cirLength times
+
+ [ B0] B .S1 L20 ; |840|
+|| MV .L1X B5,A5
+
+ MV .L2 B5,B4
+|| MV .L1X B5,A3
+
+ SMPYH .M2 B5,B4,B5 ; |835| new2 = cir[i+1].Q*cir[i+1].Q
+|| SMPY .M1 A3,A5,A3 ; |834| new1 = cir[i+1].I*cir[i+1].I
+
+ NOP 1
+ ADD .L1X B5,A3,A3 ; |836|
+ STW .D1T1 A3,*A0++ ; |837| energy_L[i]= |cir[i+1]|^2
+ ; BRANCH OCCURS ; |840|
+;** --------------------------------------------------------------------------*
+ B .S1 L28 ; |840|
+
+ MV .L1X B1,A0 ; |859| nptr0 => energy_L[0]
+|| ZERO .L2 B7:B6 ; |856| zero accumulators, best idx
+
+ MV .S1X B6,A6 ; |861|
+|| SUB .L2 B8,B9,B0 ; |861| cirLength-CIR_SIZE loops
+|| ADDAW .D2 B1,B9,B5 ; |860| nptr1 => energy_L[CIR_SIZE]
+|| ZERO .L1 A5:A4 ; |855| prepare find max energy loop
+
+ MVC .S2 CSR,B8 ; |861|
+|| MV .L2X A4,B6 ; |861|
+|| MV .D1 A4,A3 ; |861|
+|| MV .L1X B7,A7 ; |861|
+|| MVK .S1 0x1,A8 ; |858| init return index value
+|| ZERO .D2 B4 ; |857|
+
+ AND .L2 -2,B8,B7 ; |861|
+
+ MVC .S2 B7,CSR ; |861|
+|| SUB .L2 B0,3,B0 ; |861|
+
+ ; BRANCH OCCURS ; |840|
+;** --------------------------------------------------------------------------*
+L22:
+
+ MVC .S2 CSR,B2 ; |840|
+|| MV .L2X A0,B7 ; |840|
+
+ AND .L2 -2,B2,B4 ; |840|
+
+ MVC .S2 B4,CSR ; |840|
+|| SUB .L2 B0,5,B0 ; |840|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : nrgcomploop
+;* Known Minimum Trip Count : 4
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 1
+;* Partitioned Resource Bound(*) : 2
+;* Resource Partition:
+;* A-side B-side
+;* .L units 0 0
+;* .S units 1 0
+;* .D units 1 1
+;* .M units 1 1
+;* .X cross paths 1 2*
+;* .T address paths 1 1
+;* Long read paths 0 1
+;* Long write paths 0 0
+;* Logical ops (.LS) 1 2 (.L or .S unit)
+;* Addition ops (.LSD) 0 1 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1 1
+;* Bound(.L .S .D .LS .LSD) 1 2*
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 2 Schedule found with 6 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : 32
+;*
+;*----------------------------------------------------------------------------*
+L23: ; PIPED LOOP PROLOG
+ LDW .D1T1 *A4++,A3 ; |833| new = cir[i+1].Q:cir[i+1].I
+ NOP 1
+ LDW .D1T1 *A4++,A3 ;@ |833| new = cir[i+1].Q:cir[i+1].I
+ NOP 1
+ LDW .D1T1 *A4++,A3 ;@@ |833| new = cir[i+1].Q:cir[i+1].I
+
+ [ B0] SUB .S2 B0,0x1,B0 ; |839| do this cirLength times
+|| SMPY .M1 A3,A3,A0 ; |834| new1 = cir[i+1].I*cir[i+1].I
+|| MV .L2X A3,B5 ; |861|
+
+ [ B0] B .S1 nrgcomploop ; |840|
+|| LDW .D1T1 *A4++,A3 ;@@@ |833| new = cir[i+1].Q:cir[i+1].I
+
+ SMPYH .M2 B5,B5,B6 ; |835| new2 = cir[i+1].Q*cir[i+1].Q
+|| [ B0] SUB .S2 B0,0x1,B0 ;@ |839| do this cirLength times
+|| SMPY .M1 A3,A3,A0 ;@ |834| new1 = cir[i+1].I*cir[i+1].I
+|| MV .L2X A3,B5 ;@ |861|
+
+ MV .L1 A0,A5 ; |861|
+|| [ B0] B .S1 nrgcomploop ;@ |840|
+|| LDW .D1T1 *A4++,A3 ;@@@@ |833| new = cir[i+1].Q:cir[i+1].I
+
+ ADD .L1X B6,A5,A3 ; |836| new3 = square mag cir[i+1]
+|| SMPYH .M2 B5,B5,B6 ;@ |835| new2 = cir[i+1].Q*cir[i+1].Q
+|| [ B0] SUB .S2 B0,0x1,B0 ;@@ |839| do this cirLength times
+|| SMPY .M1 A3,A3,A0 ;@@ |834| new1 = cir[i+1].I*cir[i+1].I
+|| MV .L2X A3,B5 ;@@ |861|
+
+;** --------------------------------------------------------------------------*
+nrgcomploop: ; PIPED LOOP KERNEL
+
+ MV .L2X A3,B4 ; |861|
+|| MV .L1 A0,A5 ;@ |861|
+|| [ B0] B .S1 nrgcomploop ;@@ |840|
+|| LDW .D1T1 *A4++,A3 ;@@@@@ |833| new = cir[i+1].Q:cir[i+1].I
+
+ STW .D2T2 B4,*B7++ ; |837| energy_L[i]= |cir[i+1]|^2
+|| ADD .L1X B6,A5,A3 ;@ |836| new3 = square mag cir[i+1]
+|| SMPYH .M2 B5,B5,B6 ;@@ |835| new2 = cir[i+1].Q*cir[i+1].Q
+|| [ B0] SUB .S2 B0,0x1,B0 ;@@@ |839| do this cirLength times
+|| SMPY .M1 A3,A3,A0 ;@@@ |834| new1 = cir[i+1].I*cir[i+1].I
+|| MV .L2X A3,B5 ;@@@ |861|
+
+;** --------------------------------------------------------------------------*
+L25: ; PIPED LOOP EPILOG
+
+ MV .L2X A3,B4 ;@ |861|
+|| MV .L1 A0,A5 ;@@ |861|
+
+ STW .D2T2 B4,*B7++ ;@ |837| energy_L[i]= |cir[i+1]|^2
+|| ADD .L1X B6,A5,A3 ;@@ |836| new3 = square mag cir[i+1]
+|| SMPYH .M2 B5,B5,B6 ;@@@ |835| new2 = cir[i+1].Q*cir[i+1].Q
+|| SMPY .M1 A3,A3,A0 ;@@@@ |834| new1 = cir[i+1].I*cir[i+1].I
+|| MV .L2X A3,B5 ;@@@@ |861|
+
+ MV .L2X A3,B4 ;@@ |861|
+|| MV .L1 A0,A5 ;@@@ |861|
+
+ STW .D2T2 B4,*B7++ ;@@ |837| energy_L[i]= |cir[i+1]|^2
+|| ADD .L1X B6,A5,A3 ;@@@ |836| new3 = square mag cir[i+1]
+|| SMPYH .M2 B5,B5,B6 ;@@@@ |835| new2 = cir[i+1].Q*cir[i+1].Q
+|| SMPY .M1 A3,A3,A0 ;@@@@@ |834| new1 = cir[i+1].I*cir[i+1].I
+|| MV .L2X A3,B5 ;@@@@@ |861|
+
+ MV .L2X A3,B4 ;@@@ |861|
+|| MV .L1 A0,A5 ;@@@@ |861|
+
+ STW .D2T2 B4,*B7++ ;@@@ |837| energy_L[i]= |cir[i+1]|^2
+|| ADD .L1X B6,A5,A3 ;@@@@ |836| new3 = square mag cir[i+1]
+|| SMPYH .M2 B5,B5,B6 ;@@@@@ |835| new2 = cir[i+1].Q*cir[i+1].Q
+
+ MV .L2X A3,B4 ;@@@@ |861|
+|| MV .L1 A0,A5 ;@@@@@ |861|
+
+ STW .D2T2 B4,*B7++ ;@@@@ |837| energy_L[i]= |cir[i+1]|^2
+|| ADD .L1X B6,A5,A3 ;@@@@@ |836| new3 = square mag cir[i+1]
+
+ MV .L2X A3,B4 ;@@@@@ |861|
+ STW .D2T2 B4,*B7++ ;@@@@@ |837| energy_L[i]= |cir[i+1]|^2
+;** --------------------------------------------------------------------------*
+ MVC .S2 B2,CSR ; |840|
+;** --------------------------------------------------------------------------*
+L27:
+
+ MV .L1X B1,A0 ; |859| nptr0 => energy_L[0]
+|| ZERO .L2 B7:B6 ; |856| zero accumulators, best idx
+
+ MV .S1X B6,A6 ; |861|
+|| SUB .L2 B8,B9,B0 ; |861| cirLength-CIR_SIZE loops
+|| ADDAW .D2 B1,B9,B5 ; |860| nptr1 => energy_L[CIR_SIZE]
+|| ZERO .L1 A5:A4 ; |855| prepare find max energy loop
+
+ MVC .S2 CSR,B8 ; |861|
+|| MV .L2X A4,B6 ; |861|
+|| MV .D1 A4,A3 ; |861|
+|| MV .L1X B7,A7 ; |861|
+|| MVK .S1 0x1,A8 ; |858| init return index value
+|| ZERO .D2 B4 ; |857|
+
+ AND .L2 -2,B8,B7 ; |861|
+
+ MVC .S2 B7,CSR ; |861|
+|| SUB .L2 B0,3,B0 ; |861|
+
+;** --------------------------------------------------------------------------*
+L28:
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : findbestloop
+;* Known Minimum Trip Count : 4
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 3
+;* Unpartitioned Resource Bound : 2
+;* Partitioned Resource Bound(*) : 3
+;* Resource Partition:
+;* A-side B-side
+;* .L units 2 1
+;* .S units 1 1
+;* .D units 1 1
+;* .M units 0 0
+;* .X cross paths 1 3*
+;* .T address paths 1 1
+;* Long read paths 2 0
+;* Long write paths 2 0
+;* Logical ops (.LS) 0 2 (.L or .S unit)
+;* Addition ops (.LSD) 2 1 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 2 2
+;* Bound(.L .S .D .LS .LSD) 2 2
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 3 Schedule found with 4 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : 32
+;*
+;*----------------------------------------------------------------------------*
+L29: ; PIPED LOOP PROLOG
+; findbestloop: .trip 4 ;7+7/1 kernel:7
+
+ LDW .D1T1 *A0++,A9 ; |869| energy_L[i+CIR_SIZE] -
+|| LDW .D2T2 *B5++,B7 ; |870| energy_L[i]
+
+ NOP 2
+
+ LDW .D1T1 *A0++,A9 ;@ |869| energy_L[i+CIR_SIZE] -
+|| LDW .D2T2 *B5++,B7 ;@ |870| energy_L[i]
+
+ [ B0] SUB .S2 B0,0x1,B0 ; |892| downcount and loop
+
+ [ B0] B .S2 findbestloop ; |893|
+|| SUB .L1X B7,A9,A5 ; |871|
+
+ ADD .L1 A5,A7:A6,A7:A6 ; |872| accumlated into res1:res0
+|| LDW .D1T1 *A0++,A9 ;@@ |869| energy_L[i+CIR_SIZE] -
+|| LDW .D2T2 *B5++,B7 ;@@ |870| energy_L[i]
+
+ SHR .S1 A7:A6,0x8,A5:A4 ; |878|
+|| [ B0] SUB .S2 B0,0x1,B0 ;@ |892| downcount and loop
+
+;** --------------------------------------------------------------------------*
+findbestloop: ; PIPED LOOP KERNEL
+
+ CMPLT .L2X A4,B6,B1 ; ^ |879|
+|| [ B0] B .S2 findbestloop ;@ |893|
+|| SUB .L1X B7,A9,A5 ;@ |871|
+
+ [!B1] MV .L2X A8,B4 ; |889| save best index+1 so far
+|| [!B1] MV .S1 A4,A3 ; ^ |888| if result exceeds key, replace
+|| ADD .L1 A5,A7:A6,A7:A6 ;@ |872| accumlated into res1:res0
+|| LDW .D1T1 *A0++,A9 ;@@@ |869| energy_L[i+CIR_SIZE] -
+|| LDW .D2T2 *B5++,B7 ;@@@ |870| energy_L[i]
+
+ ADD .L1 0x1,A8,A8 ; |891|
+|| [!B1] MV .L2X A3,B6 ; ^ |771|
+|| SHR .S1 A7:A6,0x8,A5:A4 ;@ |878|
+|| [ B0] SUB .S2 B0,0x1,B0 ;@@ |892| downcount and loop
+
+;** --------------------------------------------------------------------------*
+L31: ; PIPED LOOP EPILOG
+
+ CMPLT .L2X A4,B6,B1 ;@ ^ |879|
+|| SUB .L1X B7,A9,A5 ;@@ |871|
+
+ [!B1] MV .L2X A8,B4 ;@ |889| save best index+1 so far
+|| [!B1] MV .S1 A4,A3 ;@ ^ |888| if result exceeds key, replace
+|| ADD .L1 A5,A7:A6,A7:A6 ;@@ |872| accumlated into res1:res0
+
+ ADD .L1 0x1,A8,A8 ;@ |891|
+|| [!B1] MV .L2X A3,B6 ;@ ^ |771|
+|| SHR .S1 A7:A6,0x8,A5:A4 ;@@ |878|
+
+ CMPLT .L2X A4,B6,B1 ;@@ ^ |879|
+|| SUB .L1X B7,A9,A5 ;@@@ |871|
+
+ [!B1] MV .L2X A8,B4 ;@@ |889| save best index+1 so far
+|| [!B1] MV .S1 A4,A3 ;@@ ^ |888| if result exceeds key, replace
+|| ADD .L1 A5,A7:A6,A7:A6 ;@@@ |872| accumlated into res1:res0
+
+ ADD .L1 0x1,A8,A8 ;@@ |891|
+|| [!B1] MV .L2X A3,B6 ;@@ ^ |771|
+|| SHR .S1 A7:A6,0x8,A5:A4 ;@@@ |878|
+
+ CMPLT .L2X A4,B6,B1 ;@@@ ^ |879|
+
+ [!B1] MV .L2X A8,B4 ;@@@ |889| save best index+1 so far
+|| [!B1] MV .S1 A4,A3 ;@@@ ^ |888| if result exceeds key, replace
+
+ ADD .L1 0x1,A8,A8 ;@@@ |891|
+|| [!B1] MV .L2X A3,B6 ;@@@ ^ |771|
+
+;** --------------------------------------------------------------------------*
+ MVC .S2 B8,CSR ; |861|
+;** --------------------------------------------------------------------------*
+ B .S2 B3
+ NOP 4
+ MV .L1X B4,A4 ; |897|
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _normEnergy *
+;* *
+;* Regs Modified : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A11,A12,A13,A14,A15,B0,*
+;* B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,SP *
+;* Regs Used : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14, *
+;* A15,B0,B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12, *
+;* B13,SP *
+;******************************************************************************
+_normEnergy:
+;** --------------------------------------------------------------------------*
+;
+;/*************************************************************************
+;*
+;* normEnergy : REQUIRED C-stub, (no calls allowed from linear assembly)
+;* --------- calls energyAccumed, thresholdCir, mag2DB, expX
+;*
+;* Threshold the lowest energies of the window found in Energy()
+;* and we compute the sum of the energies of this window
+;* and split it into mantissa * 2^exponent
+;*
+;* Input data: - Derotated samples : samples[2][MAX_NUM_DATA]
+;* - Channel impulse response : cir[2][CIR_LENGTH
+;* - Energy of the impulse response : energy_L[CIR_LENGTH]
+;* - Position of the best .. : indexBest
+;*
+;* Output data: - Thresholded Cir : cir[2][CIR_LENGTH]
+;* - First non zero Cir (or begin of the burst) : toa
+;* - average power in dB: power
+;* - exponent
+;*
+;* Returned data : mantInv = 1/Mantissa, (1 < mantInv <= 2)
+;*
+;*
+;* "toa" is returned for measurement reporting only.
+;* If "toa" is not equal to indexBest, for many bursts,
+;* then this indicates that the mobile should adjust it's
+;* timing advance.
+;*
+;***************************************************************************/
+;UWord2 normEnergy
+;(
+; t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+; t_ULCirSamp cir[MAX_CIR_LENGTH],
+; t_ULCirSamp cirTemp[MAX_CIR_LENGTH],
+; LWord2 energy_L[MAX_CIR_LENGTH],
+; Char indexBest,
+; Word *toa,
+; Word14 *power,
+; Short *exponent
+;);
+; _normEnergy .cproc samptr,cirptr,ocirptr,nrgptr,best,toaptr,pwrptr,expptr ; returns UWord2
+; .reg ntbits ; const: g_BConsts_pt->cirNumTseqBits
+; .reg nbinv ; const: g_BConsts_pt->cirNumTseqBitsInv (65536/ntbits)
+; .reg cirstrt ; const: g_BConsts_pt->cirStartIndex
+; .reg nsignb ; const: g_BConsts_pt->numTailBits (3/8/3)
+; .reg mintoa ; const: g_BConsts_pt->toaMin (-2/0/0)
+; .reg guardb ; const: ACCUM_GUARD_BITS (8)
+; .reg wsize ; const: WORD_SIZE (16)
+; .reg lbits ; const: 2*WORD_SIZE+ACCUM_GUARDBITS (40)
+; .reg nrgpct ; const: ENERGY_THRESHOLD_PERCENT
+; .reg thrfmt ; const: E_THRESH_FORMAT
+; .reg cbstlen ; const: CIR_BEST_LENGTH
+; .reg maxcir ; const: MAX_CIR_LENGTH
+; .reg sptr ; sample/energy pointer
+; .reg cptr ; cir pointer
+; .reg ocptr ; saved cir pointer
+; .reg acc1:acc0 ; one of two long accumulators
+; .reg res1:res0 ; the other long accumulator
+; .reg result ; 32 bit storage
+; .reg result1 ; " " "
+; .reg temp
+; .reg itemp ; " " "
+; .reg itemp1 ; " " "
+; .reg qtemp ; " " "
+; .reg cond ; conditions
+; .reg cond1 ;
+; .reg allzero ;
+; .reg loopcnt ; loop downcounter
+; .reg one
+; .reg bcp ; constants pointers
+; .reg ccp
+; .reg oldbest
+; .reg icnt,jcnt
+
+ STW .D2T2 B13,*SP--(48) ; |940|
+|| MVK .S1 _c_asm_consts,A3 ; |996|
+
+ STW .D2T1 A12,*+SP(16) ; |940|
+|| MVKH .S1 _c_asm_consts,A3 ; |997| load address of C constants
+
+ LDW .D1T1 *+A3(64),A5 ; |1010|
+|| STW .D2T2 B3,*+SP(32) ; |940|
+
+ STW .D2T1 A14,*+SP(24) ; |940|
+|| MVK .S2 _g_BConsts_pt,B5 ; |993|
+
+ STW .D2T1 A11,*+SP(12) ; |940|
+|| MV .L2X A3,B4 ; |999|
+|| MV .S2 B4,B3 ; |940|
+
+ LDW .D2T1 *+B4(68),A2 ; |1009|
+|| MV .L1 A6,A12 ; |940|
+|| MV .S1X B5,A0 ; |997|
+
+ LDW .D1T1 *+A3(20),A6 ; |999|
+|| MVKH .S1 _g_BConsts_pt,A0 ; |994| load address of pointer
+
+ LDW .D1T1 *A0,A0 ; |995|
+|| STW .D2T2 B10,*+SP(36) ; |940|
+
+ STW .D2T1 A5,*+SP(4) ; |1010|
+ STW .D2T2 B11,*+SP(40) ; |940|
+
+ STW .D2T2 B12,*+SP(44) ; |940|
+|| MV .L2X A3,B4 ; |1010|
+
+ LDW .D1T1 *+A3(4),A5 ; |1001|
+|| LDW .D2T2 *+B4(8),B7 ; |1003|
+
+ LDW .D2T2 *+B4(72),B1 ; |1012|
+|| LDBU .D1T1 *+A0[A6],A7 ; |1000|
+
+ LDW .D2T2 *+B4(24),B5 ; |1006|
+
+ LDW .D2T1 *+SP(4),A6 ; |1014|
+|| LDW .D1T2 *+A3(76),B9 ; |1013|
+|| MV .L1X B10,A14 ; |940|
+
+ LDW .D1T2 *+A3(60),B10 ; |1014|
+|| STW .D2T1 A13,*+SP(20) ; |940|
+
+ MV .L2X A0,B4 ; |1016|
+|| LDBU .D1T2 *+A0[A5],B0 ; |1002|
+|| STW .D2T1 A15,*+SP(28) ; |940|
+
+ MV .L1 A8,A0 ; |1002|
+|| ADDAW .D1 A4,A7,A3 ; |1024|
+|| ADDAB .D2 B4,B7,B7 ; |1004|
+|| MV .L2 B8,B2 ; |940|
+
+ ADDAW .D1 A3,A0,A3 ; |1025|
+|| ZERO .L2 B5:B4 ; |1030|
+|| LDB .D2T1 *+B4[B5],A11 ; |1007|
+|| MV .L1X B6,A13 ; |940|
+|| MV .S2X A8,B13 ; |1002|
+
+ MVC .S2 CSR,B6 ; |1030|
+|| MV .S1 A3,A4 ; |1030|
+|| MV .L2X A3,B8 ; |1030|
+|| ZERO .L1 A1:A0 ; |1029| zero the accumulators
+|| LDHU .D2T1 *B7,A15 ; |1005|
+|| ADDAH .D1 A2,A6,A6 ; |1016|
+
+ MV .L1X B6,A7 ; |1030|
+ AND .L1 -2,A7,A3 ; |1030|
+
+ MVC .S2X A3,CSR ; |1030|
+|| ADD .L2 2,B8,B8 ; |1030|
+|| SUB .D2 B0,13,B0 ; |1030|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : accnrgloop
+;* Known Minimum Trip Count : 16
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 1
+;* Partitioned Resource Bound(*) : 1
+;* Resource Partition:
+;* A-side B-side
+;* .L units 1* 1*
+;* .S units 1* 1*
+;* .D units 1* 1*
+;* .M units 1* 1*
+;* .X cross paths 0 0
+;* .T address paths 1* 1*
+;* Long read paths 1* 1*
+;* Long write paths 1* 1*
+;* Logical ops (.LS) 0 0 (.L or .S unit)
+;* Addition ops (.LSD) 0 0 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1* 1*
+;* Bound(.L .S .D .LS .LSD) 1* 1*
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 1 Schedule found with 8 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : Unknown
+;*
+;*----------------------------------------------------------------------------*
+L36: ; PIPED LOOP PROLOG
+; accnrgloop: .trip 16 ; 7+7/7, kernel:1
+
+ LDH .D1T1 *A4++(4),A3 ; |1053|
+|| LDH .D2T2 *B8++(4),B7 ; |1054|
+
+ LDH .D1T1 *A4++(4),A3 ;@ |1053|
+|| LDH .D2T2 *B8++(4),B7 ;@ |1054|
+
+ [ B0] B .S1 accnrgloop ; |1062|
+|| LDH .D1T1 *A4++(4),A3 ;@@ |1053|
+|| LDH .D2T2 *B8++(4),B7 ;@@ |1054|
+
+ [ B0] B .S1 accnrgloop ;@ |1062|
+|| LDH .D1T1 *A4++(4),A3 ;@@@ |1053|
+|| LDH .D2T2 *B8++(4),B7 ;@@@ |1054|
+
+ [ B0] B .S1 accnrgloop ;@@ |1062|
+|| LDH .D1T1 *A4++(4),A3 ;@@@@ |1053|
+|| LDH .D2T2 *B8++(4),B7 ;@@@@ |1054|
+
+ SMPY .M1 A3,A3,A5 ; |1056| sum squared magnitudes of
+|| SMPY .M2 B7,B7,B6 ; |1058|
+|| [ B0] B .S1 accnrgloop ;@@@ |1062|
+|| LDH .D1T1 *A4++(4),A3 ;@@@@@ |1053|
+|| LDH .D2T2 *B8++(4),B7 ;@@@@@ |1054|
+
+ SMPY .M1 A3,A3,A5 ;@ |1056| sum squared magnitudes of
+|| SMPY .M2 B7,B7,B6 ;@ |1058|
+|| [ B0] B .S1 accnrgloop ;@@@@ |1062|
+|| LDH .D1T1 *A4++(4),A3 ;@@@@@@ |1053|
+|| LDH .D2T2 *B8++(4),B7 ;@@@@@@ |1054|
+
+;** --------------------------------------------------------------------------*
+accnrgloop: ; PIPED LOOP KERNEL
+
+ SADD .L1 A5,A1:A0,A1:A0 ; |1057| samples over Tseq window
+|| SADD .L2 B6,B5:B4,B5:B4 ; |1059|
+|| SMPY .M1 A3,A3,A5 ;@@ |1056| sum squared magnitudes of
+|| SMPY .M2 B7,B7,B6 ;@@ |1058|
+|| [ B0] B .S1 accnrgloop ;@@@@@ |1062|
+|| [ B0] SUB .S2 B0,0x1,B0 ;@@@@@@ |1061|
+|| LDH .D1T1 *A4++(4),A3 ;@@@@@@@ |1053|
+|| LDH .D2T2 *B8++(4),B7 ;@@@@@@@ |1054|
+
+;** --------------------------------------------------------------------------*
+L38: ; PIPED LOOP EPILOG
+
+ SADD .L1 A5,A1:A0,A1:A0 ;@ |1057| samples over Tseq window
+|| SADD .L2 B6,B5:B4,B5:B4 ;@ |1059|
+|| SMPY .M1 A3,A3,A5 ;@@@ |1056| sum squared magnitudes of
+|| SMPY .M2 B7,B7,B6 ;@@@ |1058|
+
+ SADD .L1 A5,A1:A0,A1:A0 ;@@ |1057| samples over Tseq window
+|| SADD .L2 B6,B5:B4,B5:B4 ;@@ |1059|
+|| SMPY .M1 A3,A3,A5 ;@@@@ |1056| sum squared magnitudes of
+|| SMPY .M2 B7,B7,B6 ;@@@@ |1058|
+
+ SADD .L1 A5,A1:A0,A1:A0 ;@@@ |1057| samples over Tseq window
+|| SADD .L2 B6,B5:B4,B5:B4 ;@@@ |1059|
+|| SMPY .M1 A3,A3,A5 ;@@@@@ |1056| sum squared magnitudes of
+|| SMPY .M2 B7,B7,B6 ;@@@@@ |1058|
+
+ SADD .L1 A5,A1:A0,A1:A0 ;@@@@ |1057| samples over Tseq window
+|| SADD .L2 B6,B5:B4,B5:B4 ;@@@@ |1059|
+|| SMPY .M1 A3,A3,A5 ;@@@@@@ |1056| sum squared magnitudes of
+|| SMPY .M2 B7,B7,B6 ;@@@@@@ |1058|
+
+ SADD .L1 A5,A1:A0,A1:A0 ;@@@@@ |1057| samples over Tseq window
+|| SADD .L2 B6,B5:B4,B5:B4 ;@@@@@ |1059|
+|| SMPY .M1 A3,A3,A5 ;@@@@@@@ |1056| sum squared magnitudes of
+|| SMPY .M2 B7,B7,B6 ;@@@@@@@ |1058|
+
+ SADD .L1 A5,A1:A0,A1:A0 ;@@@@@@ |1057| samples over Tseq window
+|| SADD .L2 B6,B5:B4,B5:B4 ;@@@@@@ |1059|
+
+ SADD .L1 A5,A1:A0,A1:A0 ;@@@@@@@ |1057| samples over Tseq window
+|| SADD .L2 B6,B5:B4,B5:B4 ;@@@@@@@ |1059|
+
+;** --------------------------------------------------------------------------*
+
+ MV .L1X B4,A3
+|| MVC .S2X A7,CSR ; |1030|
+
+ SHRU .S1 A3,0x1,A3 ; |1068| unsigned half of res0
+ SADD .L1 A3,A1:A0,A1:A0 ; |1069| add lo part of one into other
+ SADD .L1 A3,A1:A0,A1:A0 ; |1070| add lo part of one into other
+
+ MV .L1 A1,A5 ; |1070|
+|| SHL .S2 B5,0x18,B5 ; |1072| so that we can
+
+ MV .L1X B5,A3 ; |1071|
+|| SHL .S1 A5,0x18,A5 ; |1071| make the high parts 8 MSBs
+
+ SADD .L1 A5,A3,A5 ; |1073| add them with saturation
+ SHRU .S1 A5,0x18,A5 ; |1074| shift back to 8 LSBs of acc1
+ MV .L1 A5,A1 ; |1074|
+ NORM .L1 A1:A0,A3 ; |1097|
+
+ MV .L1 A3,A4 ; |1097|
+|| MV .L2X A3,B8 ; |1097|
+
+ LDW .D2T1 *+SP(4),A3 ; |1097|
+ NOP 4
+
+ ADD .L1 A2,A3,A4 ; |1109|
+|| SHL .S1 A1:A0,A4,A1:A0 ; |1108|
+
+ SHRU .S1 A1:A0,A4,A1:A0 ; |1110| data in 16 LSBs of acc0 now
+ MPY .M1 A0,A15,A0 ; |1118| 32bit normed value in acc0
+ NOP 1
+
+ SHL .S1 A1:A0,A2,A1:A0 ; |1129| restore binary point
+|| MV .L1X B8,A3 ; |1129|
+
+ SHRU .S1 A1:A0,A3,A1:A0 ; |1130|
+ NORM .L1 A1:A0,A3 ; |1136|
+
+ SHL .S1 A1:A0,A3,A9:A8 ; |1147|
+|| SUB .L1 A6,0x4,A4 ; |1146|
+
+ SHR .S1 A9:A8,A4,A9:A8 ; |1148|
+|| MV .L2X A3,B8 ; |1136|
+|| MVK .S2 _logTable,B4 ; |1174| sptr => logTable[0]
+
+ MV .L2X A8,B4 ; |1148|
+|| MV .L1X B4,A3 ; |1148|
+
+ SUB .L1 A8,0x4,A4 ; |1148|
+|| MVKH .S1 _logTable,A3 ; |1175|
+|| MV .S2X A8,B7 ; |1148|
+|| CMPLT .L2 0x3,B4,B0 ; |1149|
+
+ MV .L1X B8,A3 ; |1179|
+|| [ B0] LDH .D1T2 *+A3[A4],B7 ; |1179| look up frac part
+|| SUB .L2X A6,0x2,B6 ; |1179|
+
+ MV .L2X A0,B5 ; |1163|
+|| MV .S2 B1,B4 ; |1163|
+|| SUB .L1X B6,A3,A3 ; |1159|
+
+ MPYLHU .M2 B4,B5,B4 ; |1193| energy is positive so
+|| MV .L1X B1,A6 ; |1193|
+
+ MPYU .M1 A6,A0,A0 ; |1192| short by long (40bit) mult
+|| SUBAB .D1 A3,31,A4 ; |1163| result = power
+
+ MPY .M1 0xc,A4,A4 ; |1164|
+|| MV .L2 B4,B6 ; |1193|
+
+ ZERO .L1 A9:A8 ; |1190|
+|| MV .L2X A0,B4 ; |1192|
+
+ SHL .S2 B6,0x10,B7 ; |1194| use unsigned operations
+|| [ B0] ADD .L1X A4,B7,A4 ; |1180| add to result
+|| MV .L2X A9,B5 ; |1193|
+
+ SHRU .S2 B6,0x10,B7 ; |1196| nrgpct/(1<<thrfmt) * sum
+|| ADDU .L2 B7,B5:B4,B5:B4 ; |1195|
+
+ MV .L2X A1,B6 ; |1196|
+|| ADD .S2 B5,B7,B5 ; |1197|
+
+ MPYU .M2 B1,B6,B7 ; |1198|
+ NOP 1
+ ADD .L2 B7,B5,B5 ; |1199|
+
+ SHRU .S2 B5:B4,B9,B5:B4 ; |1200|
+|| MV .L1X B13,A0 ; |1199|
+
+ MVK .S2 0x1,B1 ; |1228|
+|| ZERO .L1 A1:A0 ; |1232|
+|| ADDAW .D1 A13,A0,A3 ; |1221|
+|| MV .S1X B13,A7 ; |1199|
+
+ MV .L1 A1,A5 ; |1232|
+|| MV .S1X B3,A6 ; |1234|
+|| MV .L2 B1,B9 ; |1234|
+|| STH .D1T1 A4,*A10 ; |1182| store it at pwrptr
+|| MV .S2 B13,B11 ; |1208| save in case cir all < thresh
+
+ MVC .S2 CSR,B12 ; |1234|
+|| MV .L2X A3,B6 ; |1234|
+|| MV .L1 A12,A0 ; |1234|
+|| MV .D1 A0,A4 ; |1234|
+|| MV .S1X B10,A1 ; |1232|
+|| MV .D2 B13,B7 ; |1199|
+
+ AND .L2 -2,B12,B8 ; |1234|
+
+ MVC .S2 B8,CSR ; |1234|
+|| SUB .L1 A1,3,A1 ; |1234|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : threshcirloop
+;* Known Minimum Trip Count : 5
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 1
+;* Unpartitioned Resource Bound : 3
+;* Partitioned Resource Bound(*) : 3
+;* Resource Partition:
+;* A-side B-side
+;* .L units 1 1
+;* .S units 0 1
+;* .D units 3* 2
+;* .M units 0 0
+;* .X cross paths 1 0
+;* .T address paths 3* 2
+;* Long read paths 3* 2
+;* Long write paths 1 0
+;* Logical ops (.LS) 0 1 (.L or .S unit)
+;* Addition ops (.LSD) 4 3 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1 2
+;* Bound(.L .S .D .LS .LSD) 3* 3*
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 3 Register is live too long
+;* |1269| -> |1270|
+;* ii = 4 Schedule found with 3 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : Unknown
+;*
+;*----------------------------------------------------------------------------*
+L40: ; PIPED LOOP PROLOG
+; threshcirloop: .trip 5 ; 5+8/2 kernel:4
+ LDW .D2T2 *B6++,B8 ; |1260| get an energy element
+
+ MV .L1 A7,A8 ; ^ |1269| (this helps scheduling)
+|| LDW .D1T1 *+A6[A7],A3 ; ^ |1241| save this cir entry
+
+ NOP 1
+ [ A1] B .S2 threshcirloop ; |1274|
+
+ ADD .L1 0x1,A7,A7 ; ^ |1272|
+|| LDW .D2T2 *B6++,B8 ;@ |1260| get an energy element
+
+;** --------------------------------------------------------------------------*
+threshcirloop: ; PIPED LOOP KERNEL
+
+ MV .S1 A8,A9 ; |1302|
+|| ZERO .S2 B0 ; |1259| cond1 false by default
+|| CMPGT .L2 B8,B5:B4,B1 ; |1261| compare to threshold
+|| MV .L1 A7,A8 ;@ ^ |1269| (this helps scheduling)
+|| LDW .D1T1 *+A6[A7],A3 ;@ ^ |1241| save this cir entry
+
+ [ B1] ZERO .S2 B9 ; ^ |1266| allzero is no longer true
+|| [ B1] ADD .L1X B8,A5:A4,A5:A4 ; |1263| if greater, accumulate it
+|| [ B1] AND .L2 B1,B9,B0 ; ^ |1264| allzero if none greater yet
+|| [ A1] SUB .S1 A1,0x1,A1 ;@ |1273|
+
+ [!B1] ZERO .L1 A3 ; |1268| if not greater
+|| STW .D1T1 A3,*A0++ ; |1242|
+|| ADD .L2 1,B7,B7 ; ^ |1302|
+|| [ B0] STH .D2T2 B7,*B2 ; ^ |1265| if greater and allzero update
+|| [ A1] B .S2 threshcirloop ;@ |1274|
+
+ [!B1] STW .D1T1 A3,*+A6[A9] ; |1270| zero the cir entry
+|| ADD .L1 0x1,A7,A7 ;@ ^ |1272|
+|| LDW .D2T2 *B6++,B8 ;@@ |1260| get an energy element
+
+;** --------------------------------------------------------------------------*
+L42: ; PIPED LOOP EPILOG
+
+ MV .S1 A8,A9 ;@ |1302|
+|| ZERO .S2 B0 ;@ |1259| cond1 false by default
+|| CMPGT .L2 B8,B5:B4,B1 ;@ |1261| compare to threshold
+|| MV .L1 A7,A8 ;@@ ^ |1269| (this helps scheduling)
+|| LDW .D1T1 *+A6[A7],A3 ;@@ ^ |1241| save this cir entry
+
+ [ B1] ZERO .S2 B9 ;@ ^ |1266| allzero is no longer true
+|| [ B1] ADD .L1X B8,A5:A4,A5:A4 ;@ |1263| if greater, accumulate it
+|| [ B1] AND .L2 B1,B9,B0 ;@ ^ |1264| allzero if none greater yet
+
+ [!B1] ZERO .L1 A3 ;@ |1268| if not greater
+|| STW .D1T1 A3,*A0++ ;@ |1242|
+|| ADD .L2 1,B7,B7 ;@ ^ |1302|
+|| [ B0] STH .D2T2 B7,*B2 ;@ ^ |1265| if greater and allzero update
+
+ [!B1] STW .D1T1 A3,*+A6[A9] ;@ |1270| zero the cir entry
+|| ADD .L1 0x1,A7,A7 ;@@ ^ |1272|
+
+ MV .S1 A8,A9 ;@@ |1302|
+|| ZERO .S2 B0 ;@@ |1259| cond1 false by default
+|| CMPGT .L2 B8,B5:B4,B1 ;@@ |1261| compare to threshold
+
+ [ B1] ZERO .S2 B9 ;@@ ^ |1266| allzero is no longer true
+|| [ B1] ADD .L1X B8,A5:A4,A5:A4 ;@@ |1263| if greater, accumulate it
+|| [ B1] AND .L2 B1,B9,B0 ;@@ ^ |1264| allzero if none greater yet
+
+ [!B1] ZERO .L1 A3 ;@@ |1268| if not greater
+|| STW .D1T1 A3,*A0++ ;@@ |1242|
+|| ADD .L2 1,B7,B7 ;@@ ^ |1302|
+|| [ B0] STH .D2T2 B7,*B2 ;@@ ^ |1265| if greater and allzero update
+
+ [!B1] STW .D1T1 A3,*+A6[A9] ;@@ |1270| zero the cir entry
+;** --------------------------------------------------------------------------*
+
+ MV .L2 B9,B1 ; |1234|
+|| MVC .S2 B12,CSR ; |1234|
+
+ [!B1] B .S1 L50 ; |1295|
+
+ MV .L1 A4,A0 ; |1234|
+|| [!B1] MV .S1 A5,A1
+
+ [!B1] NORM .L1 A1:A0,A4 ; |1340|
+|| [ B1] ADDAH .D2 B3,B13,B3 ; |1296|
+|| [ B1] MV .L2 B10,B0 ; |1302|
+|| [ B1] MV .S1X B13,A3 ; |1297|
+
+ [!B1] SHL .S1 A1:A0,A4,A1:A0 ; |1344|
+|| [!B1] MV .L2X A4,B8 ; |1340|
+
+ [!B1] LDW .D2T1 *+SP(4),A4 ; |1345|
+ [!B1] LDH .D2T1 *B2,A3 ; |1322|
+ ; BRANCH OCCURS ; |1295|
+;** --------------------------------------------------------------------------*
+
+ MVC .S2 CSR,B7 ; |1302|
+|| MV .D2 B3,B4 ; |1302|
+|| ADDAW .D1 A13,A3,A3 ; |1299|
+|| MV .L2X A12,B5 ; |1302|
+|| MV .L1 A5,A1 ; |1302|
+
+ AND .L2 -2,B7,B6 ; |1302|
+
+ MVC .S2 B6,CSR ; |1302|
+|| SUB .L2 B0,4,B0 ; |1302|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : zerocirloop
+;* Known Minimum Trip Count : 5
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 2
+;* Partitioned Resource Bound(*) : 2
+;* Resource Partition:
+;* A-side B-side
+;* .L units 1 0
+;* .S units 1 0
+;* .D units 1 2*
+;* .M units 0 0
+;* .X cross paths 0 0
+;* .T address paths 1 2*
+;* Long read paths 1 1
+;* Long write paths 1 0
+;* Logical ops (.LS) 0 0 (.L or .S unit)
+;* Addition ops (.LSD) 0 1 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1 0
+;* Bound(.L .S .D .LS .LSD) 1 1
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 2 Schedule found with 4 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : 32
+;*
+;*----------------------------------------------------------------------------*
+L45: ; PIPED LOOP PROLOG
+; zerocirloop: .trip 5 ; 4+6/2 kernel:2
+
+ LDW .D2T2 *B5++,B6 ; |1305| time: 4 + cbstlen*2
+|| LDW .D1T1 *A3++,A4 ; |1308| accumulate old cir energy too
+|| [ B0] B .S1 zerocirloop ; |1312|
+
+ [ B0] SUB .L2 B0,0x1,B0 ;@ |1311|
+
+ LDW .D2T2 *B5++,B6 ;@ |1305| time: 4 + cbstlen*2
+|| LDW .D1T1 *A3++,A4 ;@ |1308| accumulate old cir energy too
+|| [ B0] B .S1 zerocirloop ;@ |1312|
+
+ [ B0] SUB .L2 B0,0x1,B0 ;@@ |1311|
+;** --------------------------------------------------------------------------*
+zerocirloop: ; PIPED LOOP KERNEL
+
+ LDW .D2T2 *B5++,B6 ;@@ |1305| time: 4 + cbstlen*2
+|| LDW .D1T1 *A3++,A4 ;@@ |1308| accumulate old cir energy too
+|| [ B0] B .S1 zerocirloop ;@@ |1312|
+
+ STW .D2T2 B6,*B4++ ; |1306| restore old cir
+|| ADD .L1 A4,A1:A0,A1:A0 ; |1309|
+|| [ B0] SUB .L2 B0,0x1,B0 ;@@@ |1311|
+
+;** --------------------------------------------------------------------------*
+L47: ; PIPED LOOP EPILOG
+
+ LDW .D2T2 *B5++,B6 ;@@@ |1305| time: 4 + cbstlen*2
+|| LDW .D1T1 *A3++,A4 ;@@@ |1308| accumulate old cir energy too
+
+ STW .D2T2 B6,*B4++ ;@ |1306| restore old cir
+|| ADD .L1 A4,A1:A0,A1:A0 ;@ |1309|
+
+ NOP 1
+
+ STW .D2T2 B6,*B4++ ;@@ |1306| restore old cir
+|| ADD .L1 A4,A1:A0,A1:A0 ;@@ |1309|
+
+ NOP 1
+
+ STW .D2T2 B6,*B4++ ;@@@ |1306| restore old cir
+|| ADD .L1 A4,A1:A0,A1:A0 ;@@@ |1309|
+
+;** --------------------------------------------------------------------------*
+
+ STH .D2T2 B11,*B2 ; |1314|
+|| MV .L1 A1,A5 ; |1302|
+|| MVC .S2 B7,CSR ; |1302|
+
+;** --------------------------------------------------------------------------*
+nozerocir:
+ MV .L1 A5,A1
+ NORM .L1 A1:A0,A4 ; |1340|
+
+ SHL .S1 A1:A0,A4,A1:A0 ; |1344|
+|| MV .L2X A4,B8 ; |1340|
+
+ LDW .D2T1 *+SP(4),A4 ; |1345|
+ LDH .D2T1 *B2,A3 ; |1322|
+;** --------------------------------------------------------------------------*
+L50:
+ LDW .D2T2 *+SP(4),B4 ; |1346|
+ NOP 1
+ SHR .S1 A1:A0,A2,A1:A0 ; |1345|
+ SHR .S1 A1:A0,A4,A1:A0 ; |1346| acc0 is mantissa
+
+ NORM .L1 A0,A5 ; |1356| align msb of acc0 with 1 (F32.29)
+|| ADD .S1 A3,A11,A3 ; |1323|
+
+ SUB .L2X A5,6,B0 ; |1356|
+|| ADD .S2 B4,B4,B4 ; |1351| one = 1 in F32.29
+|| SUB .L1X A2,B8,A3 ; |1324|
+|| STH .D2T1 A3,*B2 ; |1324|
+
+ MV .L2X A5,B8 ; |1356|
+|| SHL .S1 A0,A5,A0 ; |1357| shift left number of redundant
+|| SUB .L1X B4,0x3,A4 ; |1356|
+
+ SHR .S1 A0,0x1,A0 ; |1358| sign bits, minus one
+|| MV .L2X A4,B4 ; |1357|
+|| MVK .S2 0x1,B5 ; |1353|
+
+ MV .L2X A0,B4 ; |1360|
+|| SHL .S2 B5,B4,B5 ; |1354| one = 2^29 = 0x20000000
+|| STH .D1T1 A3,*A14 ; |1342|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : mantinvloop
+;* Known Minimum Trip Count : 12
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 1
+;* Partitioned Resource Bound(*) : 1
+;* Resource Partition:
+;* A-side B-side
+;* .L units 0 1*
+;* .S units 1* 0
+;* .D units 0 0
+;* .M units 0 0
+;* .X cross paths 0 0
+;* .T address paths 0 0
+;* Long read paths 0 0
+;* Long write paths 0 0
+;* Logical ops (.LS) 0 0 (.L or .S unit)
+;* Addition ops (.LSD) 0 1 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1* 1*
+;* Bound(.L .S .D .LS .LSD) 1* 1*
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 1 Schedule found with 7 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : 32
+;*
+;*----------------------------------------------------------------------------*
+L51: ; PIPED LOOP PROLOG
+; mantinvloop: .trip 12 ; 5+0/0 k:1
+ [ B0] B .S1 mantinvloop ; |1367|
+ [ B0] B .S1 mantinvloop ;@ |1367|
+ [ B0] B .S1 mantinvloop ;@@ |1367|
+ [ B0] B .S1 mantinvloop ;@@@ |1367|
+ [ B0] B .S1 mantinvloop ;@@@@ |1367|
+;** --------------------------------------------------------------------------*
+mantinvloop: ; PIPED LOOP KERNEL
+
+ SUBC .L2 B5,B4,B5 ; |1365| divide 1(F32.29) by mantissa (acc0)
+|| [ B0] B .S1 mantinvloop ;@@@@@ |1367|
+|| [ B0] SUB .S2 B0,0x1,B0 ;@@@@@@ |1366|
+
+;** --------------------------------------------------------------------------*
+L53: ; PIPED LOOP EPILOG
+;** --------------------------------------------------------------------------*
+ LDW .D2T2 *+SP(32),B3
+ LDW .D2T2 *+SP(40),B11
+ LDW .D2T2 *+SP(36),B10
+ LDW .D2T1 *+SP(28),A15
+ LDW .D2T1 *+SP(24),A14
+ LDW .D2T1 *+SP(20),A13
+ LDW .D2T1 *+SP(16),A12
+ LDW .D2T1 *+SP(12),A11
+
+ B .S2 B3
+|| LDW .D2T2 *+SP(44),B12
+|| MVK .S1 0x20,A0 ; |1369|
+
+ LDW .D2T2 *++SP(48),B13
+|| SUB .L2X A0,B8,B4 ; |1370|
+
+ SHL .S2 B4,0x5,B7 ; |1371| extracts the nsignb long field
+
+ ADD .L2 B4,B7,B4 ; |1372| from bit 0 up to bit nsignb-1.
+|| MV .L1X B5,A3 ; |1372|
+
+ MV .L1X B4,A0 ; |1372|
+ EXTU .S1 A3,A0,A4 ; |1373| because 32-nsignb = 31-(nsignb-1)
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _normCir *
+;* *
+;* Regs Modified : A0,A3,A4,A5,A6,A7,A8,B0,B4,B5,B6,B7,B8,SP *
+;* Regs Used : A0,A3,A4,A5,A6,A7,A8,B0,B3,B4,B5,B6,B7,B8,SP *
+;******************************************************************************
+_normCir:
+;** --------------------------------------------------------------------------*
+;
+;
+;/*************************************************************************
+;* normCir :
+;* --------
+;* We normalize the value of Cir ( Cir / Mantissa ).
+;*
+;*
+;* Input data . Channel impulse response : cir[CIR_LENGTH].{I,Q}
+;* . 1/Mantissa : mantInv (1 <mantInt <= 2)
+;* . Position of the best CIR window : *indexBest
+;*
+;* Output data . Normalized channel impulse response : nCir[CIR_SIZE].{I,Q}
+;*
+;***************************************************************************/
+;
+;void normCir
+;(
+; t_ULCirSamp cir[MAX_CIR_LENGTH],
+; UWord2 mantInv,
+; Char indexBest_fix,
+; t_ULCirSamp cirNorm[MAX_CIR_LENGTH]
+;);
+;
+; _normCir .cproc cirptr,mantinv,best,ncirptr
+; .reg cbstlen ; const: CIR_BEST_LENGTH (5)
+; .reg wsize ; const: WORD_SIZE (16)
+; .reg cptr0 ; pointer to cir
+; .reg ncptr0 ; pointer to normed cir
+; .reg temp,qtemp,itemp ; temp storage
+; .reg loopcnt ; loop counter
+; .reg ccp ; constants pointer
+ MVK .S1 _c_asm_consts,A5 ; |1422|
+ MVKH .S1 _c_asm_consts,A5 ; |1423| load address of C constants
+ LDW .D1T2 *+A5(60),B0 ; |1425|
+ MV .L2X A4,B5 ; |1404|
+
+ MV .L2X A6,B7 ; |1404|
+|| MV .L1X B4,A8 ; |1404|
+
+ ADDAW .D2 B5,B7,B4 ; |1432| cptr0 => cir[best]
+|| SUB .L2 SP,8,SP ; |1404|
+|| MV .L1X B6,A0 ; |1432|
+
+ MVC .S2 CSR,B8 ; |1432|
+|| MV .L2 B4,B6 ; |1432|
+|| MV .L1X B4,A4 ; |1432|
+|| MV .D2 B6,B5 ; |1432|
+|| LDW .D1T1 *+A5(64),A3 ; |1426|
+
+ AND .L2 -2,B8,B4 ; |1432|
+|| SUB .S2 B0,4,B0 ; |1432|
+
+ MVC .S2 B4,CSR ; |1432|
+|| ADD .L2 2,B6,B6 ; |1432|
+|| ADD .D2 2,B5,B5 ; |1432|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : normcirloop
+;* Known Minimum Trip Count : 5
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 2
+;* Partitioned Resource Bound(*) : 2
+;* Resource Partition:
+;* A-side B-side
+;* .L units 0 0
+;* .S units 2* 1
+;* .D units 2* 2*
+;* .M units 2* 0
+;* .X cross paths 1 1
+;* .T address paths 2* 2*
+;* Long read paths 1 1
+;* Long write paths 0 0
+;* Logical ops (.LS) 0 1 (.L or .S unit)
+;* Addition ops (.LSD) 0 1 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1 1
+;* Bound(.L .S .D .LS .LSD) 2* 2*
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 2 Schedule found with 5 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : Unknown
+;*
+;*----------------------------------------------------------------------------*
+L57: ; PIPED LOOP PROLOG
+; normcirloop: .trip 5 ; 4+6/4 kernel:2
+
+ LDH .D1T1 *A4++(4),A7 ; |1454| cir[i].I * mantinv >> 16
+|| LDH .D2T2 *B6++(4),B4 ; |1459| cir[i].I * mantinv >> 16
+
+ NOP 1
+
+ LDH .D1T1 *A4++(4),A7 ;@ |1454| cir[i].I * mantinv >> 16
+|| LDH .D2T2 *B6++(4),B4 ;@ |1459| cir[i].I * mantinv >> 16
+
+ [ B0] SUB .L2 B0,0x1,B0 ; |1464|
+
+ [ B0] B .S2 normcirloop ; |1465|
+|| LDH .D1T1 *A4++(4),A7 ;@@ |1454| cir[i].I * mantinv >> 16
+|| LDH .D2T2 *B6++(4),B4 ;@@ |1459| cir[i].I * mantinv >> 16
+
+ SMPY .M1X B4,A8,A6 ; |1460|
+|| [ B0] SUB .L2 B0,0x1,B0 ;@ |1464|
+
+ SMPY .M1 A7,A8,A6 ; |1455|
+|| [ B0] B .S2 normcirloop ;@ |1465|
+|| LDH .D1T1 *A4++(4),A7 ;@@@ |1454| cir[i].I * mantinv >> 16
+|| LDH .D2T2 *B6++(4),B4 ;@@@ |1459| cir[i].I * mantinv >> 16
+
+ SHR .S1 A6,A3,A5 ; |1461|
+|| SMPY .M1X B4,A8,A6 ;@ |1460|
+|| [ B0] SUB .L2 B0,0x1,B0 ;@@ |1464|
+
+;** --------------------------------------------------------------------------*
+normcirloop: ; PIPED LOOP KERNEL
+
+ SHR .S1 A6,A3,A5 ; |1456|
+|| MV .L2X A5,B7 ; |1404|
+|| SMPY .M1 A7,A8,A6 ;@ |1455|
+|| [ B0] B .S2 normcirloop ;@@ |1465|
+|| LDH .D1T1 *A4++(4),A7 ;@@@@ |1454| cir[i].I * mantinv >> 16
+|| LDH .D2T2 *B6++(4),B4 ;@@@@ |1459| cir[i].I * mantinv >> 16
+
+ STH .D1T1 A5,*A0++(4) ; |1457| is normcir[i].I
+|| STH .D2T2 B7,*B5++(4) ; |1462| is normcir[i].I
+|| SHR .S1 A6,A3,A5 ;@ |1461|
+|| SMPY .M1X B4,A8,A6 ;@@ |1460|
+|| [ B0] SUB .L2 B0,0x1,B0 ;@@@ |1464|
+
+;** --------------------------------------------------------------------------*
+L59: ; PIPED LOOP EPILOG
+
+ SHR .S1 A6,A3,A5 ;@ |1456|
+|| MV .L2X A5,B7 ;@ |1404|
+|| SMPY .M1 A7,A8,A6 ;@@ |1455|
+
+ STH .D1T1 A5,*A0++(4) ;@ |1457| is normcir[i].I
+|| STH .D2T2 B7,*B5++(4) ;@ |1462| is normcir[i].I
+|| SHR .S1 A6,A3,A5 ;@@ |1461|
+|| SMPY .M1X B4,A8,A6 ;@@@ |1460|
+
+ SHR .S1 A6,A3,A5 ;@@ |1456|
+|| MV .L2X A5,B7 ;@@ |1404|
+|| SMPY .M1 A7,A8,A6 ;@@@ |1455|
+
+ STH .D1T1 A5,*A0++(4) ;@@ |1457| is normcir[i].I
+|| STH .D2T2 B7,*B5++(4) ;@@ |1462| is normcir[i].I
+|| SHR .S1 A6,A3,A5 ;@@@ |1461|
+|| SMPY .M1X B4,A8,A6 ;@@@@ |1460|
+
+ SHR .S1 A6,A3,A5 ;@@@ |1456|
+|| MV .L2X A5,B7 ;@@@ |1404|
+|| SMPY .M1 A7,A8,A6 ;@@@@ |1455|
+
+ STH .D1T1 A5,*A0++(4) ;@@@ |1457| is normcir[i].I
+|| STH .D2T2 B7,*B5++(4) ;@@@ |1462| is normcir[i].I
+|| SHR .S1 A6,A3,A5 ;@@@@ |1461|
+
+ SHR .S1 A6,A3,A5 ;@@@@ |1456|
+|| MV .L2X A5,B7 ;@@@@ |1404|
+
+ STH .D1T1 A5,*A0++(4) ;@@@@ |1457| is normcir[i].I
+|| STH .D2T2 B7,*B5++(4) ;@@@@ |1462| is normcir[i].I
+
+;** --------------------------------------------------------------------------*
+ MVC .S2 B8,CSR ; |1432|
+ B .S2 B3
+ NOP 4
+ ADD .L2 8,SP,SP
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _varCalcRho *
+;* *
+;* Regs Modified : A0,A1,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B4,B5,B6,B7,B8, *
+;* B9,SP *
+;* Regs Used : A0,A1,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B3,B4,B5,B6,B7, *
+;* B8,B9,SP *
+;******************************************************************************
+_varCalcRho:
+;** --------------------------------------------------------------------------*
+;
+;/*************************************************************************
+;**
+;** varCalcRho : calcRho when CIR_SIZE!=5
+;** -----------
+;** Compute the autocorrelation of the Cir with cirNorm.
+;** calcRho will be used for the VITERBI algorithm as the
+;** real channel response.
+;**
+;** Input data - Channel impulse response : cir[CIR_LENGTH].{I,Q}
+;** - Normalized channel impulse response : cirNorm[CIR_SIZE].{I,Q}
+;** - Position of the best CIR window : indexBest
+;** - Exponent of the normalized energy : exponent
+;**
+;** Ouput data - Autocorrelation of the Cir : rho[DELAY_MAX]
+;**
+;** This illistrates the NB case where index = 0 and CIR_SIZE = 5:
+;** When i = 1, j = 1:4, j-i = 0:3
+;** i = 2, j = 2:4, j-i = 0:2
+;** i = 3, j = 3:4, j-i = 0:1
+;** i = 4, j = 4, j-i = 0
+;**
+;** In this manner the autocorrelation is commputed on the samples except
+;** the i = 0 delay which is normalized by the mantissa and exponent.
+;**
+;** NOTE: as of 9/98 rho is not in A|RT. It will be ported when viterbi
+;** is ported to A|RT.
+;**
+;***************************************************************************/
+;void calcRho
+;(
+; t_ULCirSamp cir[MAX_CIR_LENGTH],
+; t_ULCirSamp cirNorm[MAX_CIR_LENGTH],
+; Char indexBest,
+; Short exponent,
+; Word3 rho[DELAY_MAX]
+;);
+;
+; This routine works with a variable CIR_SIZE, BEST_CIR_LENGTH. This
+; is a fallback, in case the variability is needed. A much faster
+; (4.5 times) version is defined below, that unrolls the entire
+; loop for speed, in the case that CIR_SIZE=BEST_CIR_LENGTH=5. In
+; the case CIR_SIZE=4, its better to modify that procedure below. If
+; CIR_SIZE changes to 6, that's long enough to pipeline the loops
+; in this routine, and it will run far more efficiently.
+;
+; _varCalcRho .cproc cirptr,ncirptr,best,expon,rhoptr
+; .reg cptrstart
+; .reg cptr0,cptr1
+; .reg cnptr0,cnptr1
+; .reg icnt,jcnt
+; .reg qtemp,itemp
+; .reg temp,tempn
+; .reg rptr
+; .reg iloop
+; .reg maxcir
+; .reg cirsiz
+; .reg wsize
+; .reg result
+; .reg cond
+; .reg ccp
+ MVK .S1 _c_asm_consts,A3 ; |1537|
+ MVKH .S1 _c_asm_consts,A3 ; |1538| load address of C constants
+ LDW .D1T1 *+A3(64),A0 ; |1541|
+ NOP 1
+ LDW .D1T2 *+A3(56),B8 ; |1540|
+ NOP 1
+ MV .L2X A6,B5 ; |1516|
+
+ ADD .L1X B6,A0,A9 ; |1541|
+|| MV .L2X A4,B7 ; |1516|
+
+ CMPGT .L1 0x0,A9,A1 ; |1568| make expon positive
+|| ADDAW .D2 B7,B5,B7 ; |1564|
+|| ZERO .L2 B9 ; |1562| outer loop index zeroed
+
+ [ A1] NEG .L1 A9,A9 ; |1569| cond remembers if this done
+|| ADDAW .D2 B7,1,B7 ; |1565| cirptr => cir[1+best]
+|| SUB .L2 B8,0x1,B2 ; |1563| outer loop for CIR_SIZE-1
+|| SUB .S2 SP,8,SP ; |1516|
+|| MV .S1X B4,A7 ; |1516|
+
+;** --------------------------------------------------------------------------*
+rhoouterloop:
+
+ ADD .L2 0x1,B9,B9 ; |1583| iloop index advances
+|| ADDAW .D2 B7,B9,B4 ; |1581| cptr0 => cir[1+best+iloop]
+
+ SUB .L2 B8,B9,B0 ; |1584| jcnt = cirsiz-1-iloop
+ CMPGTU .L2 B0,4,B1 ; |1584|
+ [ B1] B .S1 L66 ; |1584|
+ NOP 4
+
+ MV .L1 A7,A5 ; |1580| cnptr0 => normed cir[0]
+|| ZERO .S1 A6 ; |1576|
+
+ ; BRANCH OCCURS ; |1584|
+;** --------------------------------------------------------------------------*
+L64:
+
+ LDW .D2T2 *B4++,B6 ; |1593|
+|| LDW .D1T1 *A5++,A0 ; |1592|
+
+ NOP 1
+ SUB .L2 B0,0x1,B0 ; |1599| cirsiz-1-i times
+ [ B0] B .S1 L64 ; |1600|
+ NOP 1
+
+ MPY .M1X B6,A0,A3 ; |1594|
+|| MV .L2X A0,B5 ; |1594|
+
+ MPYH .M2 B6,B5,B5 ; |1596|
+ ADD .L1 A6,A3,A6 ; |1595|
+ ADD .L1X A6,B5,A6 ; |1595|
+ ; BRANCH OCCURS ; |1600|
+;** --------------------------------------------------------------------------*
+ B .S1 L72 ; |1600|
+ NOP 4
+ SUB .L2 B2,0x1,B2 ; |1612|
+ ; BRANCH OCCURS ; |1600|
+;** --------------------------------------------------------------------------*
+L66:
+ MVC .S2 CSR,B1 ; |1600|
+ AND .L2 -2,B1,B5 ; |1600|
+
+ MVC .S2 B5,CSR ; |1600|
+|| SUB .L2 B0,4,B0 ; |1600|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : rhoinnerloop
+;* Loop Carried Dependency Bound(^) : 2
+;* Unpartitioned Resource Bound : 1
+;* Partitioned Resource Bound(*) : 2
+;* Resource Partition:
+;* A-side B-side
+;* .L units 0 0
+;* .S units 0 1
+;* .D units 1 1
+;* .M units 1 1
+;* .X cross paths 2* 1
+;* .T address paths 1 1
+;* Long read paths 0 0
+;* Long write paths 0 0
+;* Logical ops (.LS) 1 0 (.L or .S unit)
+;* Addition ops (.LSD) 2 1 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1 1
+;* Bound(.L .S .D .LS .LSD) 2* 1
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 2 Schedule found with 5 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : Unknown
+;*
+;*----------------------------------------------------------------------------*
+L67: ; PIPED LOOP PROLOG
+
+ LDW .D1T1 *A5++,A0 ; |1592|
+|| LDW .D2T2 *B4++,B5 ; |1593|
+
+ NOP 1
+
+ LDW .D1T1 *A5++,A0 ;@ |1592|
+|| LDW .D2T2 *B4++,B5 ;@ |1593|
+
+ [ B0] SUB .L2 B0,0x1,B0 ; |1599| cirsiz-1-i times
+
+ [ B0] B .S2 rhoinnerloop ; |1600|
+|| LDW .D1T1 *A5++,A0 ;@@ |1592|
+|| LDW .D2T2 *B4++,B5 ;@@ |1593|
+
+ MPYH .M2X B5,A0,B6 ; |1596|
+|| [ B0] SUB .L2 B0,0x1,B0 ;@ |1599| cirsiz-1-i times
+
+ MPY .M1X B5,A0,A3 ; |1594|
+|| [ B0] B .S2 rhoinnerloop ;@ |1600|
+|| LDW .D1T1 *A5++,A0 ;@@@ |1592|
+|| LDW .D2T2 *B4++,B5 ;@@@ |1593|
+
+ MV .L1X B6,A4 ; |1516|
+|| MPYH .M2X B5,A0,B6 ;@ |1596|
+|| [ B0] SUB .L2 B0,0x1,B0 ;@@ |1599| cirsiz-1-i times
+
+;** --------------------------------------------------------------------------*
+rhoinnerloop: ; PIPED LOOP KERNEL
+
+ ADD .L1 A6,A3,A3 ; ^ |1595|
+|| MPY .M1X B5,A0,A3 ;@ |1594|
+|| [ B0] B .S2 rhoinnerloop ;@@ |1600|
+|| LDW .D1T1 *A5++,A0 ;@@@@ |1592|
+|| LDW .D2T2 *B4++,B5 ;@@@@ |1593|
+
+ ADD .S1 A3,A4,A6 ; ^ |1597|
+|| MV .L1X B6,A4 ;@ |1516|
+|| MPYH .M2X B5,A0,B6 ;@@ |1596|
+|| [ B0] SUB .L2 B0,0x1,B0 ;@@@ |1599| cirsiz-1-i times
+
+;** --------------------------------------------------------------------------*
+L69: ; PIPED LOOP EPILOG
+
+ ADD .L1 A6,A3,A3 ;@ ^ |1595|
+|| MPY .M1X B5,A0,A3 ;@@ |1594|
+
+ ADD .S1 A3,A4,A6 ;@ ^ |1597|
+|| MV .L1X B6,A4 ;@@ |1516|
+|| MPYH .M2X B5,A0,B6 ;@@@ |1596|
+
+ ADD .L1 A6,A3,A3 ;@@ ^ |1595|
+|| MPY .M1X B5,A0,A3 ;@@@ |1594|
+
+ ADD .S1 A3,A4,A6 ;@@ ^ |1597|
+|| MV .L1X B6,A4 ;@@@ |1516|
+|| MPYH .M2X B5,A0,B6 ;@@@@ |1596|
+
+ ADD .L1 A6,A3,A3 ;@@@ ^ |1595|
+|| MPY .M1X B5,A0,A3 ;@@@@ |1594|
+
+ ADD .S1 A3,A4,A6 ;@@@ ^ |1597|
+|| MV .L1X B6,A4 ;@@@@ |1516|
+
+ ADD .L1 A6,A3,A3 ;@@@@ ^ |1595|
+ ADD .S1 A3,A4,A6 ;@@@@ ^ |1597|
+;** --------------------------------------------------------------------------*
+ MVC .S2 B1,CSR ; |1600|
+;** --------------------------------------------------------------------------*
+L71:
+ SUB .L2 B2,0x1,B2 ; |1612|
+;** --------------------------------------------------------------------------*
+L72:
+ [ B2] B .S1 rhoouterloop ; |1613|
+ NOP 2
+ [!A1] SHR .S1 A6,A9,A6 ; |1609|
+ [ A1] SHL .S1 A6,A9,A6 ; |1608|
+ STH .D1T1 A6,*A8++ ; |1610|
+ ; BRANCH OCCURS ; |1613|
+;** --------------------------------------------------------------------------*
+ B .S2 B3
+ NOP 4
+ ADD .L2 8,SP,SP
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _calcRho *
+;* *
+;* Regs Modified : A0,A1,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B4,B5,B6,B7,B8, *
+;* B9,SP *
+;* Regs Used : A0,A1,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B3,B4,B5,B6,B7, *
+;* B8,B9,SP *
+;******************************************************************************
+_calcRho:
+;** --------------------------------------------------------------------------*
+;
+;
+;/*************************************************************************
+;**
+;** calcRho : calcRho when CIR_SIZE==5
+;** -----------
+;** Compute the autocorrelation of the Cir with cirNorm.
+;** calcRho will be used for the VITERBI algorithm as the
+;** real channel response.
+;**
+;** This illustrates the NB case where index = 0 and CIR_SIZE = 5:
+;** When i = 1, j = 1:4, j-i = 0:3
+;** i = 2, j = 2:4, j-i = 0:2
+;** i = 3, j = 3:4, j-i = 0:1
+;** i = 4, j = 4, j-i = 0
+;** In this manner the autocorrelation is commputed on the samples except
+;** the i = 0 delay which is normalized by the mantissa and exponent.
+;**
+;** Input data - Channel impulse response : cir[CIR_LENGTH].{I,Q}
+;** - Normalized channel impulse response : cirNorm[CIR_SIZE].{I,Q}
+;** - Position of the best CIR window : indexBest
+;** - Exponent of the normalized energy : exponent
+;**
+;** Ouput data - Autocorrelation of the Cir : rho[DELAY_MAX]
+;**
+;** Limitations - CIR_SIZE is assumed a constant 5 for unrolling. If it
+;** changes, call varCalcRho above.
+;**
+;** NOTE: as of 9/98 rho is not in A|RT. It will be ported when viterbi
+;** is ported to A|RT.
+;**
+;*************************************************************************/
+;
+; _calcRho .cproc cirptr,ncirptr,best,expon,rhoptr
+; .reg cptr0
+; .reg cnptr0
+; .reg temp,tempn
+; .reg temp1,tempn1
+; .reg temp2,tempn2
+; .reg temp3,tempn3
+; .reg qtemp,itemp
+; .reg qtemp1,itemp1
+; .reg qtemp2,itemp2
+; .reg qtemp3,itemp3
+; .reg maxcir
+; .reg wsize
+; .reg result,iresult
+; .reg cond
+; .reg ccp
+ SUB .L2 SP,8,SP ; |1652|
+ ; completely unrolled for CIR_SIZE=5, 95 clocks
+ ADDAW .D1 A4,A6,A0 ; |1700|
+ ADDAW .D1 A0,1,A0 ; |1701| cptr0 => cir[0][1+best]
+ LDW .D1T1 *A0,A6 ; |1718|
+ LDW .D2T2 *B4,B0 ; |1717|
+ NOP 1
+ LDW .D2T1 *+B4(4),A3 ; |1732|
+ LDW .D1T1 *+A0(4),A5 ; |1732|
+ MV .L2X A6,B5 ; |1746|
+ MPY .M2 B5,B0,B8 ; |1719|
+
+ MPYH .M2 B5,B0,B0 ; |1721|
+|| LDW .D1T1 *+A0(8),A9 ; |1746|
+|| LDW .D2T2 *+B4(8),B2 ; |1745|
+|| MVK .S2 _c_asm_consts,B9 ; |1674|
+
+ ZERO .L2 B5 ; |1721|
+|| LDW .D1T1 *+A0(12),A7 ; |1760|
+|| MVKH .S2 _c_asm_consts,B9 ; |1675| load address of C constants
+
+ ADD .L2 B5,B8,B5 ; |1720|
+|| MV .L1X B0,A0 ; |1760|
+|| MPY .M1 A5,A3,A4 ; |1733|
+|| LDW .D2T2 *+B9(64),B9 ; |1678|
+|| MV .S2X A0,B7 ; |1718|
+
+ ADD .L1X B5,A0,A0 ; |1722|
+|| LDW .D2T2 *+B4(12),B1 ; |1759|
+
+ MV .L1X B7,A4 ; |1734|
+|| ADD .S1 A0,A4,A0 ; |1734|
+|| MPYH .M1 A5,A3,A3 ; |1735|
+
+ LDW .D1T1 *+A4(4),A6 ; |1793|
+|| MPY .M2X A9,B2,B8 ; |1747|
+
+ MV .L2X A7,B2 ; |1736|
+|| ADD .L1 A0,A3,A0 ; |1736|
+|| MPYH .M1X A9,B2,A4 ; |1749|
+
+ ADD .L2X A0,B8,B5 ; |1736|
+|| ADD .S2 B6,B9,B6 ; |1696|
+
+ MPY .M2 B2,B1,B8 ; |1761|
+|| CMPGT .L1X 0x0,B6,A1 ; |1750|
+
+ MV .L2X A7,B5 ; |1748|
+|| ADD .L1X B5,A4,A0 ; |1748|
+
+ MV .L1X B6,A0 ; |1750|
+|| ADD .L2X A0,B8,B5 ; |1750|
+|| MPYH .M2 B5,B1,B1 ; |1763|
+|| LDW .D2T2 *+B4(4),B9 ; |1806|
+
+ [ A1] NEG .L1 A0,A0 ; |1698|
+|| MV .S1X B7,A3 ; |1748|
+
+ [ A1] MV .L2X A0,B6 ; |1764|
+|| MV .L1X B7,A4 ; |1762|
+|| LDW .D2T2 *B4,B0 ; |1792|
+
+ MV .L1X B6,A0 ; |1764|
+|| ADD .L2 B5,B1,B5 ; |1764|
+
+ MV .L1X B5,A4 ; |1764|
+|| LDW .D1T1 *+A4(12),A9 ; |1821|
+
+ [!A1] SHR .S2 B5,B6,B9 ; |1773|
+|| [ A1] SHL .S1 A4,A0,A0 ; |1772|
+|| MV .L2X A6,B8 ; |1764|
+|| MV .L1X B9,A3 ; |1750|
+|| LDW .D1T1 *+A3(8),A5 ; |1807|
+
+ [!A1] MV .L2 B9,B5 ; |1772|
+|| [ A1] MV .S2X A0,B5 ; |1772|
+
+ MPY .M2 B8,B0,B8 ; |1794|
+|| MV .L2X A6,B5 ; |1772|
+|| MV .L1X B5,A0 ; |1772|
+
+ ZERO .L2 B5 ; |1780|
+|| MPYH .M2 B5,B0,B9 ; |1796|
+|| LDW .D2T2 *+B4(8),B2 ; |1820|
+
+ ADD .L2 B5,B8,B5 ; |1795|
+
+ MPY .M1 A5,A3,A4 ; |1808|
+|| MV .L1X B5,A6 ; |1795|
+
+ ADD .L1X A6,B9,A0 ; |1795|
+|| STH .D1T1 A0,*A8++ ; |1774|
+
+ MPYH .M1 A5,A3,A3 ; |1810|
+|| MV .L1X B7,A4 ; |1809|
+|| ADD .S1 A0,A4,A0 ; |1809|
+
+ MPY .M2X A9,B2,B8 ; |1822|
+|| LDW .D1T1 *+A4(12),A6 ; |1867|
+|| MV .L1X B7,A7 ; |1795|
+
+ MPYH .M1X A9,B2,A4 ; |1824|
+|| ADD .L1 A0,A3,A0 ; |1811|
+|| LDW .D1T1 *+A7(8),A7 ; |1853|
+
+ LDW .D2T2 *B4,B1 ; |1852|
+|| ADD .L2X A0,B8,B5 ; |1823|
+
+ ADD .L1X B5,A4,A0 ; |1825|
+
+ MV .L1 A0,A4 ; |1825|
+|| MV .L2X A0,B5 ; |1825|
+
+ LDW .D2T2 *+B4(4),B0 ; |1866|
+|| MV .L1X B4,A0 ; |1825|
+
+ MV .L2X A7,B8 ; |1825|
+|| MV .L1X B6,A3 ; |1825|
+
+ MPY .M2 B8,B1,B8 ; |1854|
+|| [ A1] SHL .S1 A4,A3,A0 ; |1833|
+|| LDW .D1T1 *A0,A3 ; |1894|
+|| MV .L2X A7,B4 ; |1833|
+
+ ZERO .L1 A0 ; |1841|
+|| MPYH .M2 B4,B1,B1 ; |1856|
+|| [ A1] MV .L2X A0,B5 ; |1833|
+
+ ADD .L1X A0,B8,A0 ; |1841|
+|| MV .L2X A6,B4 ; |1841|
+
+ MPY .M2 B4,B0,B8 ; |1868|
+|| [!A1] SHR .S2 B5,B6,B9 ; |1834|
+
+ MPYH .M2 B4,B0,B4 ; |1870|
+|| [!A1] MV .L2 B9,B5 ; |1833|
+
+ ADD .L2X A0,B1,B5 ; |1868|
+|| STH .D1T2 B5,*A8++ ; |1835|
+
+ LDW .D2T1 *+B7(12),A5 ; |1895|
+|| ADD .L2 B5,B8,B5 ; |1869|
+|| MV .L1X B4,A0 ; |1870|
+
+ ADD .L1X B5,A0,A0 ; |1871|
+
+ MV .L2X A0,B5 ; |1871|
+|| MV .L1X B6,A4 ; |1871|
+
+ [ A1] SHL .S1 A0,A4,A0 ; |1879|
+|| [!A1] SHR .S2 B5,B6,B4 ; |1880|
+
+ [!A1] MV .L2 B4,B5 ; |1896|
+|| [ A1] MV .S2X A0,B5 ; |1896|
+
+ MV .L1X B5,A0 ; |1896|
+|| MPY .M1 A5,A3,A4 ; |1896|
+
+ MPYH .M1 A5,A3,A3 ; |1898|
+|| ZERO .L1 A0 ; |1887|
+|| STH .D1T1 A0,*A8++ ; |1881|
+
+ ADD .L1 A0,A4,A0 ; |1897|
+
+ B .S2 B3
+|| ADD .L1 A0,A3,A0 ; |1899|
+
+ MV .L1X B6,A0 ; |1899|
+|| MV .S1 A0,A3 ; |1899|
+|| MV .L2X A0,B5 ; |1899|
+
+ [ A1] SHL .S1 A3,A0,A0 ; |1907|
+|| MV .L2 B6,B4 ; |1899|
+
+ [!A1] SHR .S2 B5,B4,B5 ; |1907|
+|| [ A1] MV .L2X A0,B5 ; |1907|
+
+ MV .L1X B5,A0 ; |1907|
+
+ STH .D1T1 A0,*A8++ ; |1909|
+|| ADD .L2 8,SP,SP
+
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _matchFilter *
+;* *
+;* Regs Modified : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,B0,*
+;* B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,SP *
+;* Regs Used : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,B0,*
+;* B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,SP *
+;******************************************************************************
+_matchFilter:
+;** --------------------------------------------------------------------------*
+;
+;
+;/*************************************************************************
+;**
+;** matchFilter :
+;** -----------
+;** Matched filter the input samples with the normalized CIR
+;**
+;** Correlation of Cir and cirNorm
+;**
+;** Note that the maximum of the CIR's aoutcorrelation is:
+;** max( autocorr(cir) ) = energySum = mantissa * 2^exponent
+;**
+;** and that the maximum of the CIR and cirNorms autcorrelation is:
+;** max( corr(cir,cirNorm) ) = energySum/mantissa = 2^exponent
+;**
+;** Because cirNorm = Cir/mantissa
+;**
+;** Typically the exponent will be negative, so when Rho is shifted
+;** by the exponent, it is actually reducing the number of sign bits and
+;** maxmizing the fixed point precision.
+;**
+;** Input data - Input samples : data[2][]
+;** - channel impulse response : cirNorm[CIR_SIZE].{I,Q}
+;** - Position of the best CIR window : indexBest
+;** - Exponent of the normalized energy : exponent
+;**
+;** Output data - Matched filtered samples : Output[nb_samp]
+;**
+;** Limitations - CIR_SIZE is assumed a constant 5 for unrolling. If it
+;** changes, change the number of blocks in the loop below.
+;**
+;***************************************************************************/
+;
+;void matchFilter
+;(
+; t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+; t_ULCirSamp cirNorm[MAX_CIR_LENGTH],
+; Char indexBest_fxp,
+; Short exponent,
+; Word3 output[]
+;);
+;
+; _matchFilter .cproc samptr,ncirptr,best,expon,outptr
+; .reg numbits ; const: g_BConsts_pt->numBits
+; .reg sptr0,sptr1 ; pointers
+; .reg acc1 ; loop accumulator
+; .reg temp,qtemp,itemp ; temp storage
+; .reg nciq0,nciq1,nciq2,nciq3,nciq4 ; normedcir samples Q:I in word
+; .reg expsgn ; sign of exponent
+; .reg jcnt ; loop counter
+; .reg bcp ; constants pointers
+; .reg ccp
+ MVK .S1 _g_BConsts_pt,A0 ; |1980|
+
+ MVKH .S1 _g_BConsts_pt,A0 ; |1981| load address of pointer
+|| MVK .S2 _c_asm_consts,B5 ; |1983|
+
+ LDW .D1T2 *A0,B7 ; |1982| load pointer to burst constants
+|| MVKH .S2 _c_asm_consts,B5 ; |1984| load address of C constants
+
+ LDW .D2T1 *+B5(24),A3 ; |1990|
+ NOP 3
+ MV .L1X B7,A0 ; |1982|
+
+ LDB .D1T1 *+A0[A3],A3 ; |1991|
+|| MV .L1X B5,A5 ; |1991|
+
+ LDW .D1T1 *+A5(36),A5 ; |1993|
+ NOP 3
+ ADD .L1 A3,A6,A6 ; |1991|
+ LDBU .D1T1 *+A0[A5],A3 ; |1994|
+ STW .D2T2 B13,*SP--(48) ; |1957|
+ STW .D2T1 A10,*+SP(12) ; |1957|
+ STW .D2T1 A12,*+SP(20) ; |1957|
+ STW .D2T2 B11,*+SP(40) ; |1957|
+
+ MV .L1X B5,A3 ; |1995|
+|| ADD .S1 A3,A6,A6 ; |1995|
+|| STW .D2T1 A11,*+SP(16) ; |1957|
+
+ LDW .D1T1 *+A3(64),A3 ; |1999|
+|| STW .D2T2 B12,*+SP(44) ; |1957|
+
+ STW .D2T1 A14,*+SP(28) ; |1957|
+
+ MV .L1X B5,A5 ; |1957|
+|| LDW .D2T1 *B4,A10 ; |2011| read all 5 normed cir values
+
+ LDW .D1T2 *+A5(28),B8 ; |1996|
+|| LDW .D2T1 *+B4(8),A12 ; |2013|
+
+ STW .D2T2 B3,*+SP(32) ; |1957|
+
+ ADD .L2X A3,B6,B6 ; |1999|
+|| LDW .D2T2 *+B4(16),B7 ; |2015|
+
+ LDW .D2T1 *+B4(4),A3 ; |2012|
+
+ MV .L2X A0,B4 ; |2002|
+|| LDW .D2T2 *+B4(12),B5 ; |2014|
+
+ LDBU .D2T2 *+B4[B8],B0 ; |1997|
+
+ CMPGT .L1X 0x0,B6,A1 ; |2002| and shift direction
+|| STW .D2T2 B10,*+SP(36) ; |1957|
+
+ [ A1] NEG .L2 B6,B6 ; |2003| expsgn is sign, expon > 0
+|| MV .L1X B7,A11 ; |2019|
+|| MV .S2X A8,B11 ; |1957|
+|| STW .D2T1 A13,*+SP(24) ; |1957|
+
+ MVC .S2 CSR,B13 ; |2019|
+|| MV .L1X B6,A14 ; |2019|
+|| MV .L2X A3,B4 ; |2019|
+|| ADDAW .D1 A4,A6,A2 ; |2019| sptr0 => samples[start]
+|| MV .D2 B7,B3 ; |2019|
+
+ AND .L2 -2,B13,B6 ; |2019|
+
+ MVC .S2 B6,CSR ; |2019|
+|| SUB .L2 B0,6,B0 ; |2019|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : mfloop
+;* Known Minimum Trip Count : 36
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 1
+;* Unpartitioned Resource Bound : 5
+;* Partitioned Resource Bound(*) : 5
+;* Resource Partition:
+;* A-side B-side
+;* .L units 3 4
+;* .S units 3 4
+;* .D units 5* 1
+;* .M units 5* 5*
+;* .X cross paths 3 5*
+;* .T address paths 4 2
+;* Long read paths 1 0
+;* Long write paths 0 0
+;* Logical ops (.LS) 0 0 (.L or .S unit)
+;* Addition ops (.LSD) 1 0 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 3 4
+;* Bound(.L .S .D .LS .LSD) 4 3
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 5 Schedule found with 6 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : Unknown
+;*
+;*----------------------------------------------------------------------------*
+L78: ; PIPED LOOP PROLOG
+; mfloop: .trip 36
+ MV .L1 A2,A0 ; ^ |2028|
+ LDW .D1T1 *A0,A5 ; |2033| 10 multiplies, 5 clocks
+ NOP 1
+ MV .L1 A0,A4 ; |1997|
+
+ ADD .L1 0x4,A2,A2 ; ^ |2074| advance one sample
+|| LDW .D1T1 *+A4(4),A0 ; |2038| multiply and accumulate
+
+ MV .L1 A2,A0 ;@ ^ |2028|
+
+ MPYH .M1 A5,A10,A5 ; |2035|
+|| LDW .D1T1 *A0,A5 ;@ |2033| 10 multiplies, 5 clocks
+
+ MV .S1 A4,A6 ; |1997|
+|| LDW .D1T1 *+A4(8),A8 ; |2044|
+|| MPY .M1 A5,A10,A3 ; |2034| loop is optimal
+
+ LDW .D1T2 *+A6(12),B7 ; |2050|
+|| MV .L1 A0,A4 ;@ |1997|
+
+ MPY .M2X A0,B4,B6 ; |2039|
+|| ADD .L1 0x4,A2,A2 ;@ ^ |2074| advance one sample
+|| LDW .D1T1 *+A4(4),A0 ;@ |2038| multiply and accumulate
+
+ LDW .D1T2 *+A6(16),B1 ; |2056|
+|| MPYH .M2X A0,B4,B9 ; |2040|
+|| ADD .S1 A3,A5,A3 ; |2036|
+|| MV .L1 A2,A0 ;@@ ^ |2028|
+
+ MPYH .M1 A5,A10,A5 ;@ |2035|
+|| LDW .D1T1 *A0,A5 ;@@ |2033| 10 multiplies, 5 clocks
+
+ ADD .S2X B6,A3,B6 ; |2041|
+|| MV .S1 A4,A6 ;@ |1997|
+|| LDW .D1T1 *+A4(8),A8 ;@ |2044|
+|| MPY .M1 A5,A10,A3 ;@ |2034| loop is optimal
+
+ MPY .M2 B7,B5,B2 ; |2051|
+|| MPYH .M1 A8,A12,A9 ; |2046|
+|| LDW .D1T2 *+A6(12),B7 ;@ |2050|
+|| MV .L1 A0,A4 ;@@ |1997|
+
+ MPY .M1 A8,A12,A6 ; |2045|
+|| MPY .M2X A0,B4,B6 ;@ |2039|
+|| ADD .L1 0x4,A2,A2 ;@@ ^ |2074| advance one sample
+|| LDW .D1T1 *+A4(4),A0 ;@@ |2038| multiply and accumulate
+
+ MPY .M1X B1,A11,A7 ; |2057|
+|| ADD .S2 B9,B6,B8 ; |2042|
+|| LDW .D1T2 *+A6(16),B1 ;@ |2056|
+|| MPYH .M2X A0,B4,B9 ;@ |2040|
+|| ADD .S1 A3,A5,A3 ;@ |2036|
+|| MV .L1 A2,A0 ;@@@ ^ |2028|
+
+ MPYH .M2 B7,B5,B8 ; |2052|
+|| ADD .S2X A6,B8,B10 ; |2047|
+|| MPYH .M1 A5,A10,A5 ;@@ |2035|
+|| LDW .D1T1 *A0,A5 ;@@@ |2033| 10 multiplies, 5 clocks
+
+ MPYH .M2 B1,B3,B12 ; |2058|
+|| ADD .S2X B6,A3,B6 ;@ |2041|
+|| MV .S1 A4,A6 ;@@ |1997|
+|| LDW .D1T1 *+A4(8),A8 ;@@ |2044|
+|| MPY .M1 A5,A10,A3 ;@@ |2034| loop is optimal
+
+ ADD .L2X A9,B10,B1 ; |2048|
+|| MPY .M2 B7,B5,B2 ;@ |2051|
+|| MPYH .M1 A8,A12,A9 ;@ |2046|
+|| LDW .D1T2 *+A6(12),B7 ;@@ |2050|
+|| MV .L1 A0,A4 ;@@@ |1997|
+
+ ADD .L2 B2,B1,B10 ; |2053|
+|| MPY .M1 A8,A12,A6 ;@ |2045|
+|| MPY .M2X A0,B4,B6 ;@@ |2039|
+|| ADD .L1 0x4,A2,A2 ;@@@ ^ |2074| advance one sample
+|| LDW .D1T1 *+A4(4),A0 ;@@@ |2038| multiply and accumulate
+
+ ADD .L2 B8,B10,B9 ; |2054|
+|| MPY .M1X B1,A11,A7 ;@ |2057|
+|| ADD .S2 B9,B6,B8 ;@ |2042|
+|| LDW .D1T2 *+A6(16),B1 ;@@ |2056|
+|| MPYH .M2X A0,B4,B9 ;@@ |2040|
+|| ADD .S1 A3,A5,A3 ;@@ |2036|
+|| MV .L1 A2,A0 ;@@@@ ^ |2028|
+
+ ADD .L1X A7,B9,A6 ; |2059|
+|| MPYH .M2 B7,B5,B8 ;@ |2052|
+|| ADD .S2X A6,B8,B10 ;@ |2047|
+|| MPYH .M1 A5,A10,A5 ;@@@ |2035|
+|| LDW .D1T1 *A0,A5 ;@@@@ |2033| 10 multiplies, 5 clocks
+
+ ADD .L1X B12,A6,A13 ; |2060|
+|| MPYH .M2 B1,B3,B12 ;@ |2058|
+|| ADD .S2X B6,A3,B6 ;@@ |2041|
+|| MV .S1 A4,A6 ;@@@ |1997|
+|| LDW .D1T1 *+A4(8),A8 ;@@@ |2044|
+|| MPY .M1 A5,A10,A3 ;@@@ |2034| loop is optimal
+
+ [ B0] B .S2 mfloop ; |2077| numBits loops
+|| [!A1] SHR .S1 A13,A14,A13 ; |2071|
+|| ADD .L2X A9,B10,B1 ;@ |2048|
+|| MPY .M2 B7,B5,B2 ;@@ |2051|
+|| MPYH .M1 A8,A12,A9 ;@@ |2046|
+|| LDW .D1T2 *+A6(12),B7 ;@@@ |2050|
+|| MV .L1 A0,A4 ;@@@@ |1997|
+
+;** --------------------------------------------------------------------------*
+mfloop: ; PIPED LOOP KERNEL
+
+ [ A1] SSHL .S1 A13,A14,A13 ; |2070|
+|| ADD .L2 B2,B1,B10 ;@ |2053|
+|| MPY .M1 A8,A12,A6 ;@@ |2045|
+|| MPY .M2X A0,B4,B6 ;@@@ |2039|
+|| ADD .L1 0x4,A2,A2 ;@@@@ ^ |2074| advance one sample
+|| LDW .D1T1 *+A4(4),A0 ;@@@@ |2038| multiply and accumulate
+
+ STH .D2T1 A13,*B11++ ; |2073| store output sample
+|| ADD .L2 B8,B10,B9 ;@ |2054|
+|| MPY .M1X B1,A11,A7 ;@@ |2057|
+|| ADD .S2 B9,B6,B8 ;@@ |2042|
+|| LDW .D1T2 *+A6(16),B1 ;@@@ |2056|
+|| MPYH .M2X A0,B4,B9 ;@@@ |2040|
+|| ADD .S1 A3,A5,A3 ;@@@ |2036|
+|| MV .L1 A2,A0 ;@@@@@ ^ |2028|
+
+ ADD .L1X A7,B9,A6 ;@ |2059|
+|| MPYH .M2 B7,B5,B8 ;@@ |2052|
+|| ADD .S2X A6,B8,B10 ;@@ |2047|
+|| MPYH .M1 A5,A10,A5 ;@@@@ |2035|
+|| LDW .D1T1 *A0,A5 ;@@@@@ |2033| 10 multiplies, 5 clocks
+
+ [ B0] SUB .L2 B0,0x1,B0 ;@ |2076|
+|| ADD .L1X B12,A6,A13 ;@ |2060|
+|| MPYH .M2 B1,B3,B12 ;@@ |2058|
+|| ADD .S2X B6,A3,B6 ;@@@ |2041|
+|| MV .S1 A4,A6 ;@@@@ |1997|
+|| LDW .D1T1 *+A4(8),A8 ;@@@@ |2044|
+|| MPY .M1 A5,A10,A3 ;@@@@ |2034| loop is optimal
+
+ [ B0] B .S2 mfloop ;@ |2077| numBits loops
+|| [!A1] SHR .S1 A13,A14,A13 ;@ |2071|
+|| ADD .L2X A9,B10,B1 ;@@ |2048|
+|| MPY .M2 B7,B5,B2 ;@@@ |2051|
+|| MPYH .M1 A8,A12,A9 ;@@@ |2046|
+|| LDW .D1T2 *+A6(12),B7 ;@@@@ |2050|
+|| MV .L1 A0,A4 ;@@@@@ |1997|
+
+;** --------------------------------------------------------------------------*
+L80: ; PIPED LOOP EPILOG
+
+ [ A1] SSHL .S1 A13,A14,A13 ;@ |2070|
+|| ADD .L2 B2,B1,B10 ;@@ |2053|
+|| MPY .M1 A8,A12,A6 ;@@@ |2045|
+|| MPY .M2X A0,B4,B6 ;@@@@ |2039|
+|| ADD .L1 0x4,A2,A2 ;@@@@@ ^ |2074| advance one sample
+|| LDW .D1T1 *+A4(4),A0 ;@@@@@ |2038| multiply and accumulate
+
+ STH .D2T1 A13,*B11++ ;@ |2073| store output sample
+|| ADD .L2 B8,B10,B9 ;@@ |2054|
+|| MPY .M1X B1,A11,A7 ;@@@ |2057|
+|| ADD .S2 B9,B6,B8 ;@@@ |2042|
+|| LDW .D1T2 *+A6(16),B1 ;@@@@ |2056|
+|| MPYH .M2X A0,B4,B9 ;@@@@ |2040|
+|| ADD .S1 A3,A5,A3 ;@@@@ |2036|
+
+ ADD .L1X A7,B9,A6 ;@@ |2059|
+|| MPYH .M2 B7,B5,B8 ;@@@ |2052|
+|| ADD .S2X A6,B8,B10 ;@@@ |2047|
+|| MPYH .M1 A5,A10,A5 ;@@@@@ |2035|
+
+ ADD .L1X B12,A6,A13 ;@@ |2060|
+|| MPYH .M2 B1,B3,B12 ;@@@ |2058|
+|| ADD .S2X B6,A3,B6 ;@@@@ |2041|
+|| MV .S1 A4,A6 ;@@@@@ |1997|
+|| LDW .D1T1 *+A4(8),A8 ;@@@@@ |2044|
+|| MPY .M1 A5,A10,A3 ;@@@@@ |2034| loop is optimal
+
+ [!A1] SHR .S1 A13,A14,A13 ;@@ |2071|
+|| ADD .L2X A9,B10,B1 ;@@@ |2048|
+|| MPY .M2 B7,B5,B2 ;@@@@ |2051|
+|| MPYH .M1 A8,A12,A9 ;@@@@ |2046|
+|| LDW .D1T2 *+A6(12),B7 ;@@@@@ |2050|
+
+ [ A1] SSHL .S1 A13,A14,A13 ;@@ |2070|
+|| ADD .L2 B2,B1,B10 ;@@@ |2053|
+|| MPY .M1 A8,A12,A6 ;@@@@ |2045|
+|| MPY .M2X A0,B4,B6 ;@@@@@ |2039|
+
+ STH .D2T1 A13,*B11++ ;@@ |2073| store output sample
+|| ADD .L2 B8,B10,B9 ;@@@ |2054|
+|| MPY .M1X B1,A11,A7 ;@@@@ |2057|
+|| ADD .S2 B9,B6,B8 ;@@@@ |2042|
+|| LDW .D1T2 *+A6(16),B1 ;@@@@@ |2056|
+|| MPYH .M2X A0,B4,B9 ;@@@@@ |2040|
+|| ADD .S1 A3,A5,A3 ;@@@@@ |2036|
+
+ ADD .L1X A7,B9,A6 ;@@@ |2059|
+|| MPYH .M2 B7,B5,B8 ;@@@@ |2052|
+|| ADD .S2X A6,B8,B10 ;@@@@ |2047|
+
+ ADD .L1X B12,A6,A13 ;@@@ |2060|
+|| MPYH .M2 B1,B3,B12 ;@@@@ |2058|
+|| ADD .S2X B6,A3,B6 ;@@@@@ |2041|
+
+ [!A1] SHR .S1 A13,A14,A13 ;@@@ |2071|
+|| ADD .L2X A9,B10,B1 ;@@@@ |2048|
+|| MPY .M2 B7,B5,B2 ;@@@@@ |2051|
+|| MPYH .M1 A8,A12,A9 ;@@@@@ |2046|
+
+ [ A1] SSHL .S1 A13,A14,A13 ;@@@ |2070|
+|| ADD .L2 B2,B1,B10 ;@@@@ |2053|
+|| MPY .M1 A8,A12,A6 ;@@@@@ |2045|
+
+ STH .D2T1 A13,*B11++ ;@@@ |2073| store output sample
+|| ADD .L2 B8,B10,B9 ;@@@@ |2054|
+|| MPY .M1X B1,A11,A7 ;@@@@@ |2057|
+|| ADD .S2 B9,B6,B8 ;@@@@@ |2042|
+
+ ADD .L1X A7,B9,A6 ;@@@@ |2059|
+|| MPYH .M2 B7,B5,B8 ;@@@@@ |2052|
+|| ADD .S2X A6,B8,B10 ;@@@@@ |2047|
+
+ ADD .L1X B12,A6,A13 ;@@@@ |2060|
+|| MPYH .M2 B1,B3,B12 ;@@@@@ |2058|
+
+ [!A1] SHR .S1 A13,A14,A13 ;@@@@ |2071|
+|| ADD .L2X A9,B10,B1 ;@@@@@ |2048|
+
+ [ A1] SSHL .S1 A13,A14,A13 ;@@@@ |2070|
+|| ADD .L2 B2,B1,B10 ;@@@@@ |2053|
+
+ STH .D2T1 A13,*B11++ ;@@@@ |2073| store output sample
+|| ADD .L2 B8,B10,B9 ;@@@@@ |2054|
+
+ ADD .L1X A7,B9,A6 ;@@@@@ |2059|
+ ADD .L1X B12,A6,A13 ;@@@@@ |2060|
+ [!A1] SHR .S1 A13,A14,A13 ;@@@@@ |2071|
+ [ A1] SSHL .S1 A13,A14,A13 ;@@@@@ |2070|
+ STH .D2T1 A13,*B11++ ;@@@@@ |2073| store output sample
+ NOP 3
+;** --------------------------------------------------------------------------*
+
+ LDW .D2T2 *+SP(32),B3
+|| MVC .S2 B13,CSR ; |2019|
+
+ LDW .D2T2 *+SP(40),B11
+ LDW .D2T2 *+SP(36),B10
+ LDW .D2T1 *+SP(28),A14
+ LDW .D2T1 *+SP(24),A13
+ LDW .D2T1 *+SP(20),A12
+ LDW .D2T1 *+SP(16),A11
+ LDW .D2T1 *+SP(12),A10
+
+ B .S2 B3
+|| LDW .D2T2 *+SP(44),B12
+
+ LDW .D2T2 *++SP(48),B13
+ NOP 4
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _equalize *
+;* *
+;* Regs Modified : A0,A1,A2,A3,A4,A5,B4,B5,B6,SP *
+;* Regs Used : A0,A1,A2,A3,A4,A5,B3,B4,B5,B6,SP *
+;******************************************************************************
+_equalize:
+;** --------------------------------------------------------------------------*
+;
+;/*************************************************************************
+;** equalize()
+;** ----------
+;**
+;** This function will equalize the burst.
+;**
+;**
+;** Input data - Demodulated burst : demOut.softDec[BURST_MATCH]
+;** - Autocorrelation of the Cir : Rho[delay_l]
+;**
+;** Output data - Corrected burst : demOut.softDec[BURST_MATCH]
+;**
+;** Limitations - Word matcho[BURST_MATCH] must be 32bit aligned
+;** currently true by pragma in demTop.c
+;**
+;**************************************************************************/
+;void equalize
+;(
+; Word matcho[BURST_MATCH],
+; Word rho[DELAY_MAX],
+; const t_TseqWord tseq[]
+;);
+;
+; _equalize .cproc matcho,rhoptr,tseqptr
+; .reg numbits ; const: g_BConsts_pt->numBits
+; .reg zer ; const: 0
+; .reg sptr0 ; pointer to match output
+; .reg temp ; temp storage
+; .reg loopcnt ; loop counter
+; .reg oddbits ; condition that loopcnt is odd
+; .reg bcp ; constants pointers
+; .reg ccp
+ MVK .S2 _g_BConsts_pt,B4 ; |2125|
+
+ MVKH .S2 _g_BConsts_pt,B4 ; |2126| load address of pointer
+|| MVK .S1 _c_asm_consts,A0 ; |2128|
+
+ LDW .D2T2 *B4,B4 ; |2127| load pointer to burst constants
+|| MVKH .S1 _c_asm_consts,A0 ; |2129| load address of C constants
+
+ LDW .D1T1 *+A0(28),A3 ; |2131|
+ NOP 3
+ MV .L1X B4,A0
+ LDBU .D1T1 *+A0[A3],A3 ; |2132|
+ NOP 3
+ ZERO .L1 A5 ; |2134|
+
+ MVC .S2 CSR,B6 ; |2142|
+|| AND .L1 0x1,A3,A2 ; |2141|
+|| SHR .S1 A3,0x1,A1 ; |2142|
+|| MV .D1 A4,A0 ; |2106|
+|| MV .L2X A4,B4 ; |2106|
+|| SUB .D2 SP,8,SP ; |2106|
+
+ AND .L2 -2,B6,B5 ; |2142|
+
+ MVC .S2 B5,CSR ; |2142|
+|| SUB .L1 A1,13,A1 ; |2142|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : equalloop
+;* Known Minimum Trip Count : 50
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 1
+;* Partitioned Resource Bound(*) : 1
+;* Resource Partition:
+;* A-side B-side
+;* .L units 0 0
+;* .S units 1* 1*
+;* .D units 1* 1*
+;* .M units 0 0
+;* .X cross paths 0 1*
+;* .T address paths 1* 1*
+;* Long read paths 0 1*
+;* Long write paths 0 0
+;* Logical ops (.LS) 0 1 (.L or .S unit)
+;* Addition ops (.LSD) 1 0 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1* 1*
+;* Bound(.L .S .D .LS .LSD) 1* 1*
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 1 Schedule found with 8 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : Unknown
+;*
+;*----------------------------------------------------------------------------*
+L84: ; PIPED LOOP PROLOG
+; equalloop: .trip 50 ; 7+7/13 kernel:1 2 samples per
+ LDW .D1T1 *A0++,A3 ; |2149| NOTE: matcho is 32bit aligned!
+ LDW .D1T1 *A0++,A3 ;@ |2149| NOTE: matcho is 32bit aligned!
+
+ [ A1] B .S2 equalloop ; |2154|
+|| LDW .D1T1 *A0++,A3 ;@@ |2149| NOTE: matcho is 32bit aligned!
+
+ [ A1] B .S2 equalloop ;@ |2154|
+|| LDW .D1T1 *A0++,A3 ;@@@ |2149| NOTE: matcho is 32bit aligned!
+
+ [ A1] B .S2 equalloop ;@@ |2154|
+|| LDW .D1T1 *A0++,A3 ;@@@@ |2149| NOTE: matcho is 32bit aligned!
+
+ SUB2 .S1 A5,A3,A4 ; |2150| negate two matcho elements
+|| [ A1] B .S2 equalloop ;@@@ |2154|
+|| LDW .D1T1 *A0++,A3 ;@@@@@ |2149| NOTE: matcho is 32bit aligned!
+
+ MV .L2X A4,B5 ; |2106|
+|| SUB2 .S1 A5,A3,A4 ;@ |2150| negate two matcho elements
+|| [ A1] B .S2 equalloop ;@@@@ |2154|
+|| LDW .D1T1 *A0++,A3 ;@@@@@@ |2149| NOTE: matcho is 32bit aligned!
+
+;** --------------------------------------------------------------------------*
+equalloop: ; PIPED LOOP KERNEL
+
+ STW .D2T2 B5,*B4++ ; |2151| and write back
+|| MV .L2X A4,B5 ;@ |2106|
+|| SUB2 .S1 A5,A3,A4 ;@@ |2150| negate two matcho elements
+|| [ A1] B .S2 equalloop ;@@@@@ |2154|
+|| [ A1] SUB .L1 A1,0x1,A1 ;@@@@@@ |2153| numBits/2 times
+|| LDW .D1T1 *A0++,A3 ;@@@@@@@ |2149| NOTE: matcho is 32bit aligned!
+
+;** --------------------------------------------------------------------------*
+L86: ; PIPED LOOP EPILOG
+
+ STW .D2T2 B5,*B4++ ;@ |2151| and write back
+|| MV .L2X A4,B5 ;@@ |2106|
+|| SUB2 .S1 A5,A3,A4 ;@@@ |2150| negate two matcho elements
+
+ STW .D2T2 B5,*B4++ ;@@ |2151| and write back
+|| MV .L2X A4,B5 ;@@@ |2106|
+|| SUB2 .S1 A5,A3,A4 ;@@@@ |2150| negate two matcho elements
+
+ STW .D2T2 B5,*B4++ ;@@@ |2151| and write back
+|| MV .L2X A4,B5 ;@@@@ |2106|
+|| SUB2 .S1 A5,A3,A4 ;@@@@@ |2150| negate two matcho elements
+
+ STW .D2T2 B5,*B4++ ;@@@@ |2151| and write back
+|| MV .L2X A4,B5 ;@@@@@ |2106|
+|| SUB2 .S1 A5,A3,A4 ;@@@@@@ |2150| negate two matcho elements
+
+ STW .D2T2 B5,*B4++ ;@@@@@ |2151| and write back
+|| MV .L2X A4,B5 ;@@@@@@ |2106|
+|| SUB2 .S1 A5,A3,A4 ;@@@@@@@ |2150| negate two matcho elements
+
+ STW .D2T2 B5,*B4++ ;@@@@@@ |2151| and write back
+|| MV .L2X A4,B5 ;@@@@@@@ |2106|
+
+ STW .D2T2 B5,*B4++ ;@@@@@@@ |2151| and write back
+;** --------------------------------------------------------------------------*
+
+ MV .L1 A4,A3 ; |2142|
+|| MVC .S2 B6,CSR ; |2142|
+
+;** --------------------------------------------------------------------------*
+ [ A2] LDH .D1T1 *A0,A3 ; |2156| if numBits odd, do one more
+ B .S2 B3
+ NOP 3
+ [ A2] NEG .L1 A3,A3 ; |2157|
+
+ [ A2] STH .D1T1 A3,*A0++ ; |2158|
+|| ADD .L2 8,SP,SP
+
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _weight *
+;* *
+;* Regs Modified : A0,A1,A3,A4,A5,A7,A8,B0,B1,B4,B5,B6,B7,B8,SP *
+;* Regs Used : A0,A1,A3,A4,A5,A6,A7,A8,B0,B1,B3,B4,B5,B6,B7,B8,SP *
+;******************************************************************************
+_weight:
+;** --------------------------------------------------------------------------*
+;
+;
+;/***************************************************************************
+;** weight()
+;** --------
+;**
+;** Weight the soft-decisions to enhance
+;** good quality bursts and reduce the impact of poor
+;** quality bursts on the decoder.
+;** Also, split out the hu/hl bits to the end of the burst.
+;**
+;** Input data:
+;** - Soft Decisions : demOut.softDec[BURST_MATCH]
+;** - Address of the Training sequence
+;**
+;** Output data:
+;** - Weighted burst : demOut.softDec[BURST_MATCH]
+;** - Signal to Noise Ratio : snr
+;**
+;****************************************************************************/
+;void weight
+;(
+; Word softDec[MAX_NUM_BITS_PER_BURST],
+; const t_TseqWord tseq[],
+; Word *snr
+;);
+;
+; _weight .cproc softptr,tseqptr,snrptr
+; .reg sptr0,sptr1
+; .reg datbits
+; .reg nbencr
+; .reg nbtrsiz
+; .reg abtrsiz
+; .reg btype
+; .reg tchfsym
+; .reg sgnbit
+; .reg istchf
+; .reg temp
+; .reg oddcnt
+; .reg loopcnt
+; .reg bcp
+; .reg ccp
+ MVK .S1 _c_asm_consts,A8 ; |2214|
+
+ MV .L2X A8,B4 ; |2214|
+|| MVK .S1 _g_BConsts_pt,A5 ; |2211|
+
+ MVKH .S2 _c_asm_consts,B4 ; |2215| load address of C constants
+|| MVKH .S1 _g_BConsts_pt,A5 ; |2212| load address of pointer
+
+ LDW .D1T1 *A5,A5 ; |2213| load pointer to burst constants
+|| MVK .S2 _g_burstType,B4 ; |2245| sptr0 => _g_burstType
+|| MV .L1X B4,A8 ; |2215|
+
+ LDW .D1T1 *+A8(32),A3 ; |2217|
+|| MVKH .S2 _g_burstType,B4 ; |2246|
+
+ LDB .D2T2 *B4,B6 ; |2248|
+|| LDW .D1T1 *+A8(92),A7 ; |2223|
+
+ NOP 2
+ LDW .D1T2 *+A8(88),B5 ; |2222|
+ LDW .D1T2 *+A8(80),B0 ; |2220|
+
+ LDBU .D1T2 *+A5[A3],B8 ; |2218|
+|| CMPEQ .L2X B6,A7,B1 ; |2249| istchf = btype==TCHF
+
+ LDW .D1T2 *+A8(84),B6 ; |2221|
+ NOP 1
+ MV .L2X A4,B4 ; |2248|
+ [!B1] ADDAH .D2 B4,B5,B5 ; |2259|
+
+ [ B1] ADDAH .D2 B4,B0,B4 ; |2257| set pointers according to
+|| MV .L2 B0,B7 ; |2255|
+
+ [ B1] ADDAH .D2 B4,B6,B5 ; |2258| burst type
+|| [!B1] MV .L1X B5,A0 ; |2259|
+|| [!B1] MV .L2 B8,B7 ; |2260|
+|| MVK .S1 0x80000000,A5 ; |2251|
+
+ MVC .S2 CSR,B6 ; |2260|
+|| [ B1] MV .L1X B5,A0 ; |2258|
+|| MV .L2 B7,B0 ; |2260|
+|| MVKH .S1 0x80000000,A5 ; |2252|
+|| SUB .D2 SP,8,SP ; |2190|
+
+ AND .L1X -2,B6,A3 ; |2260|
+
+ MVC .S2X A3,CSR ; |2260|
+|| SUB .L2 B0,12,B0 ; |2260|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : remtseqloop
+;* Known Minimum Trip Count : 50
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 1
+;* Partitioned Resource Bound(*) : 1
+;* Resource Partition:
+;* A-side B-side
+;* .L units 0 0
+;* .S units 1* 0
+;* .D units 1* 1*
+;* .M units 0 0
+;* .X cross paths 0 1*
+;* .T address paths 1* 1*
+;* Long read paths 0 1*
+;* Long write paths 0 0
+;* Logical ops (.LS) 0 1 (.L or .S unit)
+;* Addition ops (.LSD) 0 1 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1* 1*
+;* Bound(.L .S .D .LS .LSD) 1* 1*
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 1 Schedule found with 7 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : Unknown
+;*
+;*----------------------------------------------------------------------------*
+L91: ; PIPED LOOP PROLOG
+; remtseqloop: .trip 50 ; 6+6/12 k:1
+ LDH .D1T1 *A0++,A3 ; |2264|
+
+ [ B0] B .S1 remtseqloop ; |2268|
+|| LDH .D1T1 *A0++,A3 ;@ |2264|
+
+ [ B0] B .S1 remtseqloop ;@ |2268|
+|| LDH .D1T1 *A0++,A3 ;@@ |2264|
+
+ [ B0] B .S1 remtseqloop ;@@ |2268|
+|| LDH .D1T1 *A0++,A3 ;@@@ |2264|
+
+ [ B0] B .S1 remtseqloop ;@@@ |2268|
+|| LDH .D1T1 *A0++,A3 ;@@@@ |2264|
+
+ MV .L2X A3,B5 ; |2296|
+|| [ B0] B .S1 remtseqloop ;@@@@ |2268|
+|| LDH .D1T1 *A0++,A3 ;@@@@@ |2264|
+
+;** --------------------------------------------------------------------------*
+remtseqloop: ; PIPED LOOP KERNEL
+
+ STH .D2T2 B5,*B4++ ; |2265| remove training sequence bits
+|| MV .L2X A3,B5 ;@ |2296|
+|| [ B0] B .S1 remtseqloop ;@@@@@ |2268|
+|| [ B0] SUB .S2 B0,0x1,B0 ;@@@@@@ |2267|
+|| LDH .D1T1 *A0++,A3 ;@@@@@@ |2264|
+
+;** --------------------------------------------------------------------------*
+L93: ; PIPED LOOP EPILOG
+
+ STH .D2T2 B5,*B4++ ;@ |2265| remove training sequence bits
+|| MV .L2X A3,B5 ;@@ |2296|
+
+ STH .D2T2 B5,*B4++ ;@@ |2265| remove training sequence bits
+|| MV .L2X A3,B5 ;@@@ |2296|
+
+ STH .D2T2 B5,*B4++ ;@@@ |2265| remove training sequence bits
+|| MV .L2X A3,B5 ;@@@@ |2296|
+
+ STH .D2T2 B5,*B4++ ;@@@@ |2265| remove training sequence bits
+|| MV .L2X A3,B5 ;@@@@@ |2296|
+
+ STH .D2T2 B5,*B4++ ;@@@@@ |2265| remove training sequence bits
+|| MV .L2X A3,B5 ;@@@@@@ |2296|
+
+ STH .D2T2 B5,*B4++ ;@@@@@@ |2265| remove training sequence bits
+;** --------------------------------------------------------------------------*
+
+ AND .L1X 0x1,B8,A1 ; |2285|
+|| MV .S1 A4,A7 ; |2288|
+|| MVC .S2 B6,CSR ; |2260|
+
+ [ A1] LDH .D1T1 *A7++,A3 ; |2292|
+ NOP 4
+ [ A1] SHR .S1 A3,0x1f,A5 ; |2293| sgnbit = 0 or -1
+ [ A1] MPY .M1 0xfffffff0,A5,A5 ; |2294| -16*sgnbit-8 = -8 or 8
+ NOP 1
+
+ [ A1] SUB .L1 A5,0x8,A5 ; |2295|
+|| MV .S1 A4,A0 ; |2288|
+|| MV .L2X A4,B4 ; |2287|
+
+ [ A1] STH .D2T1 A5,*B4++ ; |2296| on sign of input
+|| [ A1] MV .L1 A7,A0 ; |2292|
+|| SHR .S2 B8,0x1,B7 ; |2286|
+
+ MVC .S2 CSR,B8 ; |2296|
+|| MV .L1X B4,A5 ; |2296|
+|| MV .L2X A0,B7 ; |2296|
+|| MV .D2 B7,B0 ; |2296|
+
+ SUB .L2 B0,7,B0 ; |2296|
+|| AND .S2 -2,B8,B5 ; |2296|
+
+ MVC .S2 B5,CSR ; |2296|
+|| ADD .L2 2,B4,B4 ; |2296|
+|| ADD .D2 2,B7,B7 ; |2296|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : perfectloop
+;* Known Minimum Trip Count : 16
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 2
+;* Partitioned Resource Bound(*) : 2
+;* Resource Partition:
+;* A-side B-side
+;* .L units 0 0
+;* .S units 2* 1
+;* .D units 2* 2*
+;* .M units 1 1
+;* .X cross paths 0 0
+;* .T address paths 2* 2*
+;* Long read paths 1 1
+;* Long write paths 0 0
+;* Logical ops (.LS) 0 0 (.L or .S unit)
+;* Addition ops (.LSD) 1 2 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1 1
+;* Bound(.L .S .D .LS .LSD) 2* 2*
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 2 Schedule found with 5 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : Unknown
+;*
+;*----------------------------------------------------------------------------*
+L95: ; PIPED LOOP PROLOG
+; perfectloop: .trip 16 ;8+8/7 k:2/2
+
+ LDH .D1T1 *A0++(4),A4 ; |2302|
+|| LDH .D2T2 *B7++(4),B5 ; |2308|
+
+ NOP 1
+
+ LDH .D1T1 *A0++(4),A4 ;@ |2302|
+|| LDH .D2T2 *B7++(4),B5 ;@ |2308|
+
+ NOP 1
+
+ [ B0] B .S1 perfectloop ; |2316|
+|| LDH .D1T1 *A0++(4),A4 ;@@ |2302|
+|| LDH .D2T2 *B7++(4),B5 ;@@ |2308|
+
+ SHR .S1 A4,0x1f,A4 ; |2303| sgnbit = 0 or -1
+|| SHR .S2 B5,0x1f,B5 ; |2309| sgnbit = 0 or -1
+
+ MPY .M1 0xfffffff0,A4,A3 ; |2304| -16*sgnbit-8 = -8 or 8
+|| MPY .M2 0xfffffff0,B5,B6 ; |2310| -16*sgnbit-8 = -8 or 8
+|| [ B0] B .S1 perfectloop ;@ |2316|
+|| LDH .D1T1 *A0++(4),A4 ;@@@ |2302|
+|| LDH .D2T2 *B7++(4),B5 ;@@@ |2308|
+
+ SHR .S1 A4,0x1f,A4 ;@ |2303| sgnbit = 0 or -1
+|| SHR .S2 B5,0x1f,B5 ;@ |2309| sgnbit = 0 or -1
+
+;** --------------------------------------------------------------------------*
+perfectloop: ; PIPED LOOP KERNEL
+
+ SUB .L1 A3,0x8,A3 ; |2305|
+|| SUB .L2 B6,0x8,B6 ; |2311|
+|| MPY .M1 0xfffffff0,A4,A3 ;@ |2304| -16*sgnbit-8 = -8 or 8
+|| MPY .M2 0xfffffff0,B5,B6 ;@ |2310| -16*sgnbit-8 = -8 or 8
+|| [ B0] B .S1 perfectloop ;@@ |2316|
+|| LDH .D1T1 *A0++(4),A4 ;@@@@ |2302|
+|| LDH .D2T2 *B7++(4),B5 ;@@@@ |2308|
+
+ STH .D1T1 A3,*A5++(4) ; |2306|
+|| STH .D2T2 B6,*B4++(4) ; |2312|
+|| SHR .S1 A4,0x1f,A4 ;@@ |2303| sgnbit = 0 or -1
+|| SHR .S2 B5,0x1f,B5 ;@@ |2309| sgnbit = 0 or -1
+|| [ B0] ADD .L2 0xffffffff,B0,B0 ;@@@ |2314|
+
+;** --------------------------------------------------------------------------*
+L97: ; PIPED LOOP EPILOG
+
+ SUB .L1 A3,0x8,A3 ;@ |2305|
+|| SUB .L2 B6,0x8,B6 ;@ |2311|
+|| MPY .M1 0xfffffff0,A4,A3 ;@@ |2304| -16*sgnbit-8 = -8 or 8
+|| MPY .M2 0xfffffff0,B5,B6 ;@@ |2310| -16*sgnbit-8 = -8 or 8
+
+ STH .D1T1 A3,*A5++(4) ;@ |2306|
+|| STH .D2T2 B6,*B4++(4) ;@ |2312|
+|| SHR .S1 A4,0x1f,A4 ;@@@ |2303| sgnbit = 0 or -1
+|| SHR .S2 B5,0x1f,B5 ;@@@ |2309| sgnbit = 0 or -1
+
+ SUB .L1 A3,0x8,A3 ;@@ |2305|
+|| SUB .L2 B6,0x8,B6 ;@@ |2311|
+|| MPY .M1 0xfffffff0,A4,A3 ;@@@ |2304| -16*sgnbit-8 = -8 or 8
+|| MPY .M2 0xfffffff0,B5,B6 ;@@@ |2310| -16*sgnbit-8 = -8 or 8
+
+ STH .D1T1 A3,*A5++(4) ;@@ |2306|
+|| STH .D2T2 B6,*B4++(4) ;@@ |2312|
+|| SHR .S1 A4,0x1f,A4 ;@@@@ |2303| sgnbit = 0 or -1
+|| SHR .S2 B5,0x1f,B5 ;@@@@ |2309| sgnbit = 0 or -1
+
+ SUB .L1 A3,0x8,A3 ;@@@ |2305|
+|| SUB .L2 B6,0x8,B6 ;@@@ |2311|
+|| MPY .M1 0xfffffff0,A4,A3 ;@@@@ |2304| -16*sgnbit-8 = -8 or 8
+|| MPY .M2 0xfffffff0,B5,B6 ;@@@@ |2310| -16*sgnbit-8 = -8 or 8
+
+ STH .D1T1 A3,*A5++(4) ;@@@ |2306|
+|| STH .D2T2 B6,*B4++(4) ;@@@ |2312|
+
+ SUB .L1 A3,0x8,A3 ;@@@@ |2305|
+|| SUB .L2 B6,0x8,B6 ;@@@@ |2311|
+
+ STH .D1T1 A3,*A5++(4) ;@@@@ |2306|
+|| STH .D2T2 B6,*B4++(4) ;@@@@ |2312|
+
+;** --------------------------------------------------------------------------*
+ MVC .S2 B8,CSR ; |2296|
+;** --------------------------------------------------------------------------*
+ B .S2 B3
+ NOP 3
+ MVK .S1 0x28,A3 ; |2324|
+
+ STH .D1T1 A3,*A6 ; |2325|
+|| ADD .L2 8,SP,SP
+
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _quantize *
+;* *
+;* Regs Modified : A0,A3,B0,B4,B5,B6,SP *
+;* Regs Used : A0,A3,A4,B0,B3,B4,B5,B6,SP *
+;******************************************************************************
+_quantize:
+;** --------------------------------------------------------------------------*
+;
+;/***************************************************************************
+;**
+;** quantize()
+;** ----------
+;**
+;** Quantization of the soft-decisions to save memory and to
+;** be compatable with the decoder input.
+;**
+;** If |softddec| > 4 then quantized_soft_decision = sign(softdec) * 8
+;** if |softdec| <= 4 then quantized_soft_decision goes linearly from -8 to +8.
+;**
+;**
+;** Input data: - Soft Decsions
+;**
+;** Output data - Quantized Soft Decsions
+;**
+;***************************************************************************/
+;void quantize
+;(
+; Word demodSamps[MAX_NUM_BITS_PER_BURST],
+; Char softDec[]
+;);
+;
+; _quantize .cproc demsptr, softptr
+; .reg sptr0,sptr1
+; .reg loopcnt
+; .reg temp
+; .reg datbits
+; .reg bcp
+; .reg ccp
+ MVK .S1 _c_asm_consts,A0 ; |2370|
+
+ MVKH .S1 _c_asm_consts,A0 ; |2371| load address of C constants
+|| MVK .S2 _g_BConsts_pt,B6 ; |2367|
+
+ LDW .D1T2 *+A0(32),B5 ; |2369|
+|| MVKH .S2 _g_BConsts_pt,B6 ; |2368| load address of pointer
+
+ LDW .D2T2 *B6,B6 ; |2369| load pointer to burst constants
+ NOP 4
+ LDBU .D2T2 *+B6[B5],B0 ; |2378|
+ NOP 2
+
+ MVC .S2 CSR,B6 ; |2378|
+|| MV .L1 A4,A0 ; |2354|
+|| SUB .L2 SP,8,SP ; |2354|
+
+ AND .L2 -2,B6,B5 ; |2378|
+
+ MVC .S2 B5,CSR ; |2378|
+|| SUB .L2 B0,12,B0 ; |2378|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : quantloop
+;* Known Minimum Trip Count : 24
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 1
+;* Partitioned Resource Bound(*) : 1
+;* Resource Partition:
+;* A-side B-side
+;* .L units 0 0
+;* .S units 1* 0
+;* .D units 1* 1*
+;* .M units 0 0
+;* .X cross paths 0 1*
+;* .T address paths 1* 1*
+;* Long read paths 0 1*
+;* Long write paths 0 0
+;* Logical ops (.LS) 0 1 (.L or .S unit)
+;* Addition ops (.LSD) 0 1 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1* 1*
+;* Bound(.L .S .D .LS .LSD) 1* 1*
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 1 Schedule found with 7 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : Unknown
+;*
+;*----------------------------------------------------------------------------*
+L102: ; PIPED LOOP PROLOG
+; quantloop: .trip 24 ; 6+6/12 kernel:1
+ LDH .D1T1 *A0++,A3 ; |2387| convert word to byte
+
+ [ B0] B .S1 quantloop ; |2391|
+|| LDH .D1T1 *A0++,A3 ;@ |2387| convert word to byte
+
+ [ B0] B .S1 quantloop ;@ |2391|
+|| LDH .D1T1 *A0++,A3 ;@@ |2387| convert word to byte
+
+ [ B0] B .S1 quantloop ;@@ |2391|
+|| LDH .D1T1 *A0++,A3 ;@@@ |2387| convert word to byte
+
+ [ B0] B .S1 quantloop ;@@@ |2391|
+|| LDH .D1T1 *A0++,A3 ;@@@@ |2387| convert word to byte
+
+ MV .L2X A3,B5 ; |2354|
+|| [ B0] B .S1 quantloop ;@@@@ |2391|
+|| LDH .D1T1 *A0++,A3 ;@@@@@ |2387| convert word to byte
+
+;** --------------------------------------------------------------------------*
+quantloop: ; PIPED LOOP KERNEL
+
+ STB .D2T2 B5,*B4++ ; |2388|
+|| MV .L2X A3,B5 ;@ |2354|
+|| [ B0] B .S1 quantloop ;@@@@@ |2391|
+|| [ B0] SUB .S2 B0,0x1,B0 ;@@@@@@ |2390|
+|| LDH .D1T1 *A0++,A3 ;@@@@@@ |2387| convert word to byte
+
+;** --------------------------------------------------------------------------*
+L104: ; PIPED LOOP EPILOG
+
+ STB .D2T2 B5,*B4++ ;@ |2388|
+|| MV .L2X A3,B5 ;@@ |2354|
+
+ STB .D2T2 B5,*B4++ ;@@ |2388|
+|| MV .L2X A3,B5 ;@@@ |2354|
+
+ STB .D2T2 B5,*B4++ ;@@@ |2388|
+|| MV .L2X A3,B5 ;@@@@ |2354|
+
+ STB .D2T2 B5,*B4++ ;@@@@ |2388|
+|| MV .L2X A3,B5 ;@@@@@ |2354|
+
+ STB .D2T2 B5,*B4++ ;@@@@@ |2388|
+|| MV .L2X A3,B5 ;@@@@@@ |2354|
+
+ STB .D2T2 B5,*B4++ ;@@@@@@ |2388|
+;** --------------------------------------------------------------------------*
+ MVC .S2 B6,CSR ; |2378|
+ B .S2 B3
+ NOP 4
+ ADD .L2 8,SP,SP
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _expX *
+;* *
+;* Regs Modified : A0,A4,A5,B5,SP *
+;* Regs Used : A0,A4,A5,B3,B4,B5,SP *
+;******************************************************************************
+_expX:
+;** --------------------------------------------------------------------------*
+;
+;
+;/***************************************************************************
+;**
+;** expX()
+;** ------
+;**
+;** This will break a number into:
+;** x = mantissa * 2^exponent
+;**
+;** This uses the C6x intrinsic NORM()
+;**
+;**
+;** Input data: - x, input data to break apart
+;**
+;** Output data - exponent, exponent of the "x"
+;**
+;** Return data - mantissa, mantissa of the "x"
+;**
+;** Limitations - assumes ACCUM_GUARD_BITS=8, WORD_SIZE=16
+;** necessary to get any improvement
+;**
+;***************************************************************************/
+;Word expX
+;(
+; UVLWord data,
+; Word *exponent
+;);
+;
+; _expX .cproc data1:data0, expptr ; returns Word
+; .reg sptr
+; .reg nsignb
+; .reg temp
+ B .S2 B3
+ NOP 2
+
+ MVK .S2 0x10,B5 ; |2445|
+|| NORM .L1 A5:A4,A0 ; |2446|
+
+ SUB .L2X B5,A0,B5 ; |2447|
+|| SHL .S1 A5:A4,A0,A5:A4 ; |2450|
+|| SUB .S2 SP,8,SP ; |2425|
+
+ SHR .S1 A5:A4,0x18,A5:A4 ; |2451|
+|| STH .D2T2 B5,*B4 ; |2448|
+|| ADD .L2 8,SP,SP
+
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _mag2DB *
+;* *
+;* Regs Modified : A0,A1,A3,A4,A5,B0,B4,B5,SP *
+;* Regs Used : A0,A1,A3,A4,A5,B0,B3,B4,B5,SP *
+;******************************************************************************
+_mag2DB:
+;** --------------------------------------------------------------------------*
+;
+;/***************************************************************************
+;* mag2DB()
+;* -------
+;*
+;* Input Data: mag, magnitude of a value F48 with 40 actual bits
+;*
+;* Return Data: power in decibels of format F16.2
+;*
+;* Limitations: assumes ACCUM_GUARD_BITS=8, WORD_SIZE=16
+;* needed to fold constants to get any improvement
+;*
+;* Convert an unsigned long word (40bits) in the format
+;* F32 to decibels.
+;* The magin F48 because is was calculated by
+;* F16 * F16 = F32.
+;* Therefore "31" needs to subtracted from pow2(mag)
+;* in order to align the decimal point.
+;*
+;* In floating point this would be :
+;* If wordsize is 16 then:
+;* *power = 10 * log10( (mag >> 16)/(double)((1<<2*16)-1) );
+;*
+;* Note that
+;* 10*log10(x) = (10*0.301)*log2(x)
+;* And 3*log2() = 3*(integer + fractional) = 3*integer + 3*fractional
+;*
+;* The fractional part is derived from a lookup table with
+;* the 2 next significant bits after the most significant bit.
+;*
+;* The entries are calculated by log2(1.0),log2(1.25),log2(1.5),log2(1.75)
+;*
+;* logTable[4] = { 3*-1, 3*-0.6781, 3*-0.415, 3*-0.1926 }; floating
+;* Multiply float table by 4 add 1 (to round) and round to nearest integer
+;*
+;***************************************************************************/
+;
+;Word14 mag2DB
+;(
+; UVLWord mag
+;);
+;
+; _mag2DB .cproc mag1:mag0 ; returns Word14
+; .reg sptr
+; .reg lptr
+; .reg nsignb
+; .reg temp
+; .reg temp1:temp0
+; .reg power
+; .reg intpart
+; .reg fracpart
+; .reg cond
+; .reg num
+
+ MVK .S1 0x24,A0 ; |2528|
+|| NORM .L1 A5:A4,A3 ; |2518|
+
+ SHL .S1 A5:A4,A3,A5:A4 ; |2529|
+ SHR .S1 A5:A4,A0,A1:A0 ; |2530|
+
+ CMPLT .L2X 0x3,A0,B0 ; |2531|
+|| MVK .S2 _logTable,B4 ; |2513|
+
+ SUB .L2X A0,0x4,B5 ; |2531|
+|| MVKH .S2 _logTable,B4 ; |2514|
+
+ B .S2 B3
+|| [ B0] LDH .D2T1 *+B4[B5],A0 ; |2558|
+|| ADDK .S1 0xffffffda,A3 ; |2540|
+
+ NEG .L1 A3,A3 ; |2541|
+ SUBAB .D1 A3,31,A4 ; |2545|
+ MPY .M1 0xc,A4,A4 ; |2546|
+ SUB .L2 SP,8,SP ; |2500|
+
+ [ B0] ADD .L1 A4,A0,A4 ; |2559|
+|| ADD .L2 8,SP,SP
+
+ ; BRANCH OCCURS
+
+
+; .endproc
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod-asm/demtop.c b/data/mnet/GP10/Dsp/bbdataproc/demod-asm/demtop.c
new file mode 100644
index 0000000..0a09f7b
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod-asm/demtop.c
@@ -0,0 +1,626 @@
+/***********************************************************************
+**
+** GSM Demod w/ TI C6201 implementation
+**
+** Description:
+**
+** This is the main calling routine. This will process the I/O files
+** and call the low level functions.
+**
+** $Author: hpines $
+** $Date: 1999/07/14 21:38:21 $
+** $Source: D:\\stageCell\\Dsp\\bbdataproc\\demod-asm\\RCS\\demtop.c $
+** $Revision: 1.1 $
+** $Log: demtop.c $
+** Revision 1.1 1999/07/14 21:38:21 hpines
+** Initial revision
+**
+** Revision 1.1 1999-02-24 15:16:53-08 whuang
+** Initial revision
+**
+**
+** Rev 1.0 Oct 27 1998 16:19:34 Administrator
+** Checked in from initial workfile by PVCS Version Manager Project Assistant.
+**
+** Rev 1.0 Oct 23 1998 17:56:08 Administrator
+** Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.6 1998/10/14 18:43:26 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.5 1998/10/09 21:20:36 bhehn
+** Fast version, Not yet versified.
+** AB ~ 125us, NB ~= 110us
+**
+** Revision 1.4 1998/10/07 15:21:32 bhehn
+** One Access Burst verifies. testfile.fixin is the input testfile.c6x is the output.
+**
+** Revision 1.3 1998/10/02 17:01:00 bhehn
+** Changed calling routine to be more like c6x implementation.
+** BER matches previous version.
+**
+** Revision 1.2 1998/10/01 16:37:07 bhehn
+** Fixed matchfilter output saturation problem
+**
+** Revision 1.1 1998/10/01 13:57:00 bhehn
+** Initial revision
+**
+** Revision 1.4 1998/09/22 20:00:36 bhehn
+** Access Burst support added and verified.
+**
+** Revision 1.2 1998/09/21 22:04:22 bhehn
+** NB demod works, BER close to floating
+**
+** Revision 1.2 1998/09/18 20:15:05 bhehn
+** Outdated (renamed to '\\Fdi\public\rcs\D\rcs\projects\GSM\Art\demod\demodTop.cxx,v').
+**
+**
+************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "dsp\dsptypes.h"
+#include "gsmtypes.h"
+#include "bbdata.h"
+#include "bbproto.h"
+#include "c6xsupport.h"
+
+/*
+* DEMOD_TOP is used to define the globals,
+* this should be the only file where it is defined
+*/
+#define DEMOD_TOP
+
+#define LOOP_TYPE int
+
+/* Include globals and typedefs */
+#include "dem_const.h"
+#include "training.h"
+#include "dem_globs.h"
+#include "dem_aprotos.h"
+
+#if TEST == 1
+
+/* I/O File global variables */
+extern FILE *out_file;
+
+void moveStealingBits( t_chanSel chanSel, Word softDec[] );
+
+#endif
+
+/*
+** Log table used by mag2DB in demsubs.sa
+**
+*/
+const Short logTable[4] = { 2, 5, 8, 11 }; /* F16.14 */
+
+/*
+** Provide a mechanism for the g_BConsts structure and constants
+** #defined in C to be accessed from assembly code.
+*/
+
+int c_asm_consts[128];
+
+/*
+** This routine must be called once before any routine in
+** demsubs.sa is. Changing burst type doesn't alter the field
+** offsets in t_burstConsts so that is the only time this routine
+** need be called.
+**
+** The order of objects here must match the list of offset names
+** in demsubs.sa. Change one, change the other.
+*/
+
+void initAsmConsts()
+{
+ t_burstConsts t;
+
+ /* offsets to fields within t_burstConsts struct type */
+
+ c_asm_consts[0] = ((char *)&t.tseqBaseAddr) - ((char *)&t);
+ c_asm_consts[1] = ((char *)&t.cirNumTseqBits) - ((char *)&t);
+ c_asm_consts[2] = ((char *)&t.cirNumTseqBitsInv) - ((char *)&t);
+ c_asm_consts[3] = ((char *)&t.impulseTseqOffset) - ((char *)&t);
+ c_asm_consts[4] = ((char *)&t.cirLength) - ((char *)&t);
+ c_asm_consts[5] = ((char *)&t.cirStartIndex) - ((char *)&t);
+ c_asm_consts[6] = ((char *)&t.toaMin) - ((char *)&t);
+ c_asm_consts[7] = ((char *)&t.numBits) - ((char *)&t);
+ c_asm_consts[8] = ((char *)&t.numDataBits) - ((char *)&t);
+ c_asm_consts[9] = ((char *)&t.numTailBits) - ((char *)&t);
+
+ /* values of symbols created with #define in C */
+
+ c_asm_consts[10] = OFF_NUM_OFFSET_SAMPS;
+ c_asm_consts[11] = OFF_SHIFT_VAL;
+ c_asm_consts[12] = GSM_NUM_SAMPLES_PER_BURST;
+ c_asm_consts[13] = MAX_CIR_LENGTH;
+ c_asm_consts[14] = CIR_SIZE;
+ c_asm_consts[15] = CIR_BEST_LENGTH;
+ c_asm_consts[16] = WORD_SIZE;
+ c_asm_consts[17] = ACCUM_GUARD_BITS;
+ c_asm_consts[18] = ENERGY_THRESHOLD_PERCENT;
+ c_asm_consts[19] = E_THRESH_FORMAT;
+ c_asm_consts[20] = NB_NUM_ENCRYPT_BITS_PER_SIDE;
+ c_asm_consts[21] = NB_TRAIN_SIZE;
+ c_asm_consts[22] = AB_TRAIN_SIZE;
+ c_asm_consts[23] = TCHF;
+ c_asm_consts[24] = RACH;
+}
+
+/*************************************************************************
+*
+* offsetDerot() :
+* -------------
+* Offset computation + Offset compensation + Derotation
+*
+*
+* Input data . samples[2][MAX_NUM_DATA]
+* . threshold (positive number)
+*
+* Output data . samples[2][MAX_NUM_DATA]
+*
+***************************************************************************/
+void offsetDerotc( t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ Word threshold)
+
+{
+
+ VLWord offsetI_L, offsetQ_L;
+ Word offsetI, offsetQ;
+ Word temp;
+
+
+ LOOP_TYPE i;
+
+
+ /* Compute the Offset */
+ offsetI_L = 0;
+ offsetQ_L = 0;
+
+ /*
+ ** Do offset compensation on the first NUM_OFFSET_SAMPS bits.
+ ** Using OFF_NUM_OFFSET_SAMPS (not 156) to make scaling easy
+ */
+ for ( i = 0; i < OFF_NUM_OFFSET_SAMPS; ++i)
+ {
+ offsetI_L += samples[i+g_BConsts_pt->numTailBits].I;
+ offsetQ_L += samples[i+g_BConsts_pt->numTailBits].Q;
+ }
+
+ /* Round (add 0.5*OFF_SHIFT_VAL then shift & truncate) */
+ offsetI_L += 1<<(OFF_SHIFT_VAL-1);
+ offsetQ_L += 1<<(OFF_SHIFT_VAL-1);
+
+ /* Divide by OFF_NUM_OFFSET_SAMPS */
+ offsetI = (Word) (offsetI_L >> OFF_SHIFT_VAL); /* Divide by NUM_OFFSET_SAMPS */
+ offsetQ = (Word) (offsetQ_L >> OFF_SHIFT_VAL); /* Divide by NUM_OFFSET_SAMPS */
+
+ /* Compare offset to threshold and saturate if needed */
+ if ( offsetI > threshold)
+ {
+ offsetI = threshold;
+ }
+ if ( offsetI < (Word) (-1) * threshold)
+ {
+ offsetI = (Word) (-1) * threshold ;
+ }
+ if ( offsetQ > threshold)
+ {
+ offsetQ = threshold;
+ }
+ if ( offsetQ < (Word) (-1) * threshold)
+ {
+ offsetQ = (Word) (-1) * threshold ;
+ }
+
+ /*
+ ** DC Offset Compensation & Derotation
+ ** Do the derotation over all of the samples of the burst
+ ** including ending tail bits and gaurd bits.
+ ** Don't need to do the beginning tail bits.
+ ** Need to do the guard bits because we are not sure where the
+ ** burst will arrive.
+ ** Subtract 3 to insure we do not go into the next burst memory area.
+ ** For normal burst numTailBits = 3 so samples 3 to 154 will be changed.
+ ** For access burst numTailBits = 8 so samples 8 to 155 will be changed.
+ **/
+ for( i = g_BConsts_pt->numTailBits; i < (GSM_NUM_SAMPLES_PER_BURST-3); i += (OFF_I_TYPE) 4 )
+ {
+
+ /* Derotate 1st sample */
+ temp = samples[i].I;
+ samples[i].I = SAT_WORD( samples[i].Q - offsetQ );
+ samples[i].Q = SAT_WORD( offsetI - temp );
+
+ /* Derotate 2nd sample */
+ samples[i+1].I = SAT_WORD( offsetI - samples[i+1].I );
+ samples[i+1].Q = SAT_WORD( offsetQ - samples[i+1].Q );
+
+ /* Derotate 3rd sample */
+ temp = samples[i+2].I;
+ samples[i+2].I = SAT_WORD( offsetQ - samples[i+2].Q );
+ samples[i+2].Q = SAT_WORD( temp - offsetI );
+
+ /* Derotate 4th sample */
+ samples[i+3].I = SAT_WORD( samples[i+3].I - offsetI );
+ samples[i+3].Q = SAT_WORD( samples[i+3].Q - offsetQ );
+ }
+
+}
+
+void demodulate
+(
+ t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ t_chanSel chanSel,
+ UChar tseqNum,
+ t_ULBurstBuf *demodOut
+)
+{
+
+ t_ULCirSamp cir[MAX_CIR_LENGTH]; /* Impulse response */
+ t_ULCirSamp cirTemp[MAX_CIR_LENGTH]; /* Saved Impulse response */
+ LWord energy_L[MAX_CIR_LENGTH]; /* Energy */
+ t_ULCirSamp cirNorm[MAX_CIR_LENGTH]; /* Normalized Cir */
+ Char indexBest; /* Position of the best CIR window */
+ Word3 rho[DELAY_MAX]; /* Autocorr of Cir, used by Viterbi */
+
+ /* Demodulated samples before quantizing */
+ /* See if this could be demodIn->samples to save stack space */
+
+ /* 32bit align the demodSamps array! Required by assembly. */
+ Int demodSampInts[(MAX_NUM_BITS_PER_BURST+1)/2];
+ Word3 *demodSamps=(Word3 *)demodSampInts;
+
+ UWord2 mantInv; /* 1/mantissa of energySum = mantissa * 2^exponent */
+ Short exponent;
+
+#if TEST == 1
+ int i; /* used to index arrays for printing to files */
+#endif
+
+ /* Set the burst constants pointer to the proper burst */
+ if (chanSel == RACH )
+ {
+ /* Use the access burst constants */
+ g_BConsts_pt = &g_ABConsts;
+ g_burstType = RACH; /* Needed until equal is implemented */
+
+ } else
+ {
+ /* Use the normal burst constants */
+ g_BConsts_pt = &g_NBConsts;
+ /* Change the tseq base address */
+ g_BConsts_pt->tseqBaseAddr = &train_nb[tseqNum][0];
+ g_burstType = TCHF; /* Needed until equal is implemented */
+ }
+
+ initAsmConsts();
+
+ /**************************************************************************
+ *
+ * GSM Demod: main program
+ *
+ **************************************************************************/
+
+ /*
+ **
+ ** Offset computation + Offset compensation + Derotation
+ **
+ ** Input data . samples[2][NUM_DATA]
+ **
+ ** Output data . samples[2][NUM_DATA]
+ ** samples have been overwritten by compensated + derotated samples
+ **
+ */
+ offsetDerotc( samples, DC_OFFSET_THRESHOLD );
+
+
+ /*
+ fprintf( out_file, "* Input samples after Off_Derot*\n");
+ for ( i = 0; i < CIR_LENGTH ; i++)
+ {
+ fprintf( out_file, "%s\n", samples[0][i].dec() );
+ fprintf( out_file, "%s\n", samples[1][i].dec() );
+ }
+ */
+
+ /*
+ ** Estimate the Channel Impulse Response
+ **
+ **
+ ** Input: Derotated Samples - demodIn.samples[2][NUM_DATA]
+ ** Training Sequence - tseq[TRAINING_SIZE]
+ **
+ ** Output: Channel impulse response - cir[CIR_LENGTH]
+ **
+ */
+ impulse( samples, g_BConsts_pt->tseqBaseAddr, cir );
+
+
+
+#if TEST_RHO == 1
+ fprintf( out_file, "### Impulse Response ###\n");
+ for ( i = 0; i < g_BConsts_pt->cirLength; i++)
+ {
+ fprintf( out_file, "%2.10f\n", WORD_2F( cir[i].I ));
+ fprintf( out_file, "%2.10f\n", WORD_2F( cir[i].Q ));
+ }
+#endif
+
+ /*
+ ** Compute the energy of the impulse response
+ ** and try to find the best energy window of length CIR_SIZE
+ **
+ **
+ ** Input data:
+ ** - The channel impulse response : cir[CIR_LENGTH]
+ **
+ ** Output data:
+ ** - Energy of the impulse response : energy_L[CIR_LENGTH]
+ ** - Position of the best CIR window : indexBest
+ **
+ */
+
+ indexBest = Energy( cir, energy_L );
+
+
+#if TEST_RHO == 1
+
+ fprintf( out_file, "### Energy of CIR ###\n");
+ for ( i = 0; i < g_BConsts_pt->cirLength; i++)
+ {
+ fprintf( out_file, "%2.10f\n", LONG_2F(energy_L[i]) );
+ }
+
+#endif
+
+ /*
+ **
+ ** normEnergy :
+ ** ---------
+ ** Clear lowest energies of the window found in Energy()
+ ** and we compute the sum of the energies of this window
+ ** and split it into mantissa * 2^exponent
+ **
+ ** Input data: - Derotated samples : samples[2][NUM_DATA]
+ ** - Channel impulse response : cir[CIR_LENGTH
+ ** - Energy of the impulse response : energy_L[CIR_LENGTH]
+ ** - Position of the best .. : indexBest
+ ** - cirWindowStart, startinf position
+ **
+ ** Output data: - Cleared Cir : cir[CIR_LENGTH]
+ ** - First non zero Cir (or begin of the burst) : bob
+ ** - average power in dB: power
+ ** - exponent
+ **
+ ** Returned data : mantInv = 1/Mantissa, (1 < mantInv <= 2)
+ **
+ **
+ */
+ mantInv = normEnergy
+ (
+ samples,
+ cir,
+ cirTemp,
+ energy_L,
+ indexBest,
+ &demodOut->toa,
+ &demodOut->rcvPower,
+ &exponent
+ );
+
+ demodOut->rcvPower = demodOut->rcvPower>>2;
+
+#if TEST_POWER == 1
+
+ fprintf( out_file, "### Power ###\n");
+
+ fprintf( out_file, "%2.4f\n", WORD14_2F( demodOut->rcvPower) );
+
+#endif
+
+
+
+
+ /*
+ **
+ ** normCir()
+ ** ---------
+ **
+ ** We normalize the value of Cir ( Cir / Mantissa ).
+ **
+ **
+ ** Input data:
+ ** - Channel impulse response : ir[CIR_LENGTH]
+ ** - 1/Mantissa : mantInv
+ ** - Position of the best CIR window : indexBest
+ **
+ ** Output data:
+ ** - Normalized channel impulse response : cirNorm[CIR_SIZE]
+ **
+ */
+ normCir( cir, mantInv, indexBest, cirNorm );
+
+ /*
+ **
+ ** calcRho() :
+ ** -------
+ ** Compute the autocorrelation of the Cir with normCir.
+ ** calcRho will be used for the VITERBI algorithm as the real channel response.
+ **
+ ** Input data: - Channel impulse response : cir[CIR_LENGTH]
+ ** - Normalized channel impulse resp. : normCir[CIR_SIZE]
+ ** - index of the best CIR window : indexBest
+ ** - Exponent of the normalized energy : exponent
+ **
+ ** Ouput data: - Autocorrelation of the Cir : rho[DELAY_MAX]
+ **
+ */
+ calcRho( cir, cirNorm, indexBest, exponent, rho );
+
+#if TEST_RHO == 1
+
+ fprintf( out_file, "### rho ###\n");
+ for ( i = 0; i < CIR_BEST_LENGTH - 1; i++)
+ {
+ fprintf( out_file, "%2.8f\n", WORD3_2F( rho[i] ));
+ }
+
+#endif
+
+ /*
+ ** matchFilter()
+ ** -------------
+ **
+ ** Compute matched filter for the burst.
+ **
+ ** Input data: - Derotated samples : demodIn.samples[NUM_DATA]
+ ** - Normalized channel impulse response : NCir[CIR_SIZE]
+ ** - Position of the first data to compute : indexBest+TAIL
+ ** - Exponent of the normalized energy : Exponent
+ ** - Number of data to compute : 142
+ **
+ ** Ouput data: -Demodulated burst : demodOut.softDec[BITS_PER_BURST]
+ **
+ */
+ matchFilter( samples,
+ cirNorm,
+ indexBest,
+ exponent,
+ demodSamps );
+
+#if TEST_MATCHO == 1
+
+ fprintf( out_file, "### Matcho after Matched() ###\n");
+ for ( i = 0; i < g_BConsts_pt->numBits; i++)
+ {
+ fprintf( out_file, "%2.4f\n", WORD3_2F( demodSamps[i] ) );
+ }
+
+#endif
+
+ /*
+ ** equalize()
+ ** ----------
+ **
+ ** This function will equalize the burst.
+ **
+ **
+ ** Input data:
+ ** - Demodulated burst : demodOut.softDec[BURST_MATCH]
+ ** - Autocorrelation of the Cir : Rho[delay_l]
+ ** - Address of the Training sequence
+ **
+ ** Output data:
+ ** - Corrected burst : demodOut.softDec[BURST_MATCH]
+ **
+ */
+ equalize(demodSamps, rho, g_BConsts_pt->tseqBaseAddr);
+
+#if TEST_EQUALIZE == 1
+
+ fprintf( out_file, "### Matcho after Equalize ###\n");
+
+ for ( i = 0; i < g_BConsts_pt->numBits; i++)
+ {
+ fprintf( out_file, "%2.4f\n", WORD3_2F( demodSamps[i] ) );
+ }
+
+#endif
+
+ /*
+ ** weight()
+ ** --------
+ **
+ ** Weight the soft-decisions to enhance
+ ** good quality bursts and reduce the impact of poor
+ ** quality bursts on the decoder.
+ **
+ **
+ ** Input data:
+ ** -Soft Decisions : demodOut.softDec[BURST_MATCH]
+ ** - Address of the Training sequence
+ **
+ ** Output data:
+ ** - Weighted burst : demodOut.softDec[BURST_MATCH]
+ ** - Signal to Noise Ratio : snr
+ **
+ */
+ weight
+ (
+ demodSamps,
+ g_BConsts_pt->tseqBaseAddr,
+ &demodOut->snr
+ );
+
+#if TEST == 1
+ moveStealingBits( chanSel, &demodSamps[0] );
+#endif
+
+#if TEST_SNR == 1
+
+ fprintf( out_file, "### snr ###\n");
+ fprintf( out_file, "%2.4f\n", (float) demodOut->snr);
+
+#endif
+
+ /*
+ ** quantize()
+ ** ----------
+ ** Quantization of the soft-decisions to save memory and to
+ ** be compatable with the decoder input.
+ **
+ ** Input data:
+ ** - Soft Decisions, demodSamps[BURST_MATCH]
+ **
+ ** Output data - Weighted Soft Decsions : demodOut.softDec[BURST_MATCH]
+ **
+ */
+ quantize( demodSamps, demodOut->data );
+
+#if TEST_QUANT_SDP == 1
+
+ fprintf( out_file, "### Matcho after Quantize ###\n");
+ for ( i = 0; i < g_BConsts_pt->numDataBits; i++)
+ {
+ fprintf( out_file, "%2.4f\n", (float) demodOut->data[i]);
+ }
+
+#endif
+
+}
+
+#if TEST == 1
+/***************************************************************************
+* moveStealingBits()
+* ----------------
+*
+* This will move the stealing bits to the end of the burst for
+* normal bursts only.
+*
+* This is for comparison with the other demods.
+***************************************************************************/
+void moveStealingBits( t_chanSel chanSel, Word softDec[] )
+{
+ int i;
+ Word hu, hl;
+
+ /*
+ * Move the hu/hl bits to the end
+ * if this is a normal burst
+ */
+ if( chanSel != RACH )
+ {
+ hu = softDec[NB_NUM_ENCRYPT_BITS_PER_SIDE-1];
+ hl = softDec[NB_NUM_ENCRYPT_BITS_PER_SIDE];
+ for( i = 0; i < NB_NUM_ENCRYPT_BITS_PER_SIDE-2; i++ )
+ {
+ softDec[i+NB_NUM_ENCRYPT_BITS_PER_SIDE-1] = \
+ softDec[i+NB_NUM_ENCRYPT_BITS_PER_SIDE+1];
+ }
+ softDec[NB_NUM_ENCRYPT_BITS_PER_BURST-2] = hl;
+ softDec[NB_NUM_ENCRYPT_BITS_PER_BURST-1] = hu;
+ }
+}
+#endif
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod-asm/training.h b/data/mnet/GP10/Dsp/bbdataproc/demod-asm/training.h
new file mode 100644
index 0000000..60e871c
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod-asm/training.h
@@ -0,0 +1,101 @@
+/*
+** GSM Demod Training Sequences
+**
+** $Author: hpines $
+** $Date: 1999/07/12 21:02:47 $
+** $Source: D:\\stageCell\\Dsp\\bbdataproc\\demod-asm\\RCS\\training.h $
+** $Revision: 1.1 $
+** $Log: training.h $
+** Revision 1.1 1999/07/12 21:02:47 hpines
+** Initial revision
+**
+** Revision 1.1 1999-01-07 14:30:26-08 randyt
+** Initial revision
+**
+ *
+ * Rev 1.0 Oct 27 1998 16:19:34 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+ *
+ * Rev 1.0 Oct 23 1998 17:56:08 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.2 1998/10/14 18:43:29 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.1 1998/10/07 15:21:38 bhehn
+** Initial revision
+**
+** Revision 1.1 1998/10/01 13:56:59 bhehn
+** Initial revision
+**
+** Revision 1.2 1998/09/21 22:04:25 bhehn
+** NB demod works, BER close to floating
+**
+*/
+#ifndef TRAINING_H
+#define TRAINING_H
+
+/*
+* Define the training sequence word length,
+* tseq = -1 or 1 = 2 bits
+*/
+typedef Char t_TseqWord;
+
+/*
+* Set up a #define that determines whether the
+* variables should be defined here or just
+* externed here
+*/
+#ifdef DEMOD_TOP
+
+
+
+
+const t_TseqWord train_nb[8][26] =
+{
+ { + 1, + 1, -1, + 1, + 1, -1, + 1, -1, -1, -1, + 1, + 1, + 1,
+ + 1, -1, + 1, + 1, + 1, -1, + 1, + 1, -1, + 1, -1, -1, -1 },
+ { + 1, + 1, -1, + 1, -1, -1, + 1, -1, -1, -1, + 1, -1, -1,
+ -1, -1, + 1, + 1, + 1, -1, + 1, -1, -1, + 1, -1, -1, -1 },
+ { + 1, -1, + 1, + 1, + 1, + 1, -1, -1, -1, + 1, -1, -1, -1,
+ + 1, -1, + 1, + 1, -1, + 1, + 1, + 1, + 1, -1, -1, -1, + 1 },
+ { + 1, -1, + 1, + 1, + 1, -1, -1, -1, -1, + 1, -1, -1, + 1,
+ -1, + 1, + 1, + 1, -1, + 1, + 1, + 1, -1, -1, -1, -1, + 1 },
+ { + 1, + 1, + 1, -1, -1, + 1, -1, + 1, -1, -1, -1, + 1, + 1,
+ -1, + 1, + 1, + 1, + 1, + 1, -1, -1, + 1, -1, + 1, -1, -1 },
+ { + 1, -1, + 1, + 1, -1, -1, -1, + 1, -1, + 1, -1, -1, + 1,
+ + 1, + 1, + 1, + 1, -1, + 1, + 1, -1, -1, -1, + 1, -1, + 1 },
+ { -1, + 1, -1, + 1, + 1, -1, -1, -1, -1, -1, + 1, -1, -1,
+ + 1, + 1, + 1, -1, + 1, -1, + 1, + 1, -1, -1, -1, -1, -1 },
+ { -1, -1, -1, + 1, -1, -1, -1, -1, + 1, + 1, + 1, -1, + 1,
+ + 1, -1, + 1, -1, -1, -1, + 1, -1, -1, -1, -1, + 1, + 1 }
+};
+
+
+const t_TseqWord train_sb[64] =
+{
+ -1, + 1, -1, -1, -1, + 1, + 1, -1, + 1, -1, -1, + 1, + 1, + 1, -1, + 1,
+ + 1, + 1, + 1, + 1, + 1, -1, + 1, + 1, + 1, + 1, + 1, + 1, -1, -1, -1, -1,
+ + 1, + 1, -1, + 1, -1, -1, + 1, -1, + 1, -1, + 1, + 1, + 1, -1, + 1, -1,
+ + 1, -1, -1, -1, + 1, -1, -1, + 1, + 1, + 1, + 1, -1, -1, + 1, -1, -1
+};
+
+const t_TseqWord train_ab[41] =
+{
+ +1, -1, +1, +1, -1, +1, -1, -1, +1, -1,
+ -1, -1, -1, -1, -1, -1, -1, +1, +1, -1,
+ -1, +1, +1, -1, -1, +1, -1, +1, -1, +1,
+ -1, +1, +1, +1, -1, -1, -1, -1, +1, +1,+1
+};
+
+#else
+
+extern const t_TseqWord train_nb[8][26];
+extern const t_TseqWord train_sb[64];
+extern const t_TseqWord train_ab[41];
+
+#endif /* ifdef DEMOD_TOP */
+
+
+
+#endif
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod-c/c6xsupport.h b/data/mnet/GP10/Dsp/bbdataproc/demod-c/c6xsupport.h
new file mode 100644
index 0000000..4a20741
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod-c/c6xsupport.h
@@ -0,0 +1,106 @@
+/*
+** TMS320C6x related macros and intrinsics prototypes
+**
+** $Author: whuang $
+** $Date: 1999/07/06 19:34:59 $
+** $Source: D:\\stageCell\\Dsp\\bbdataproc\\demod-c\\RCS\\c6xsupport.h $
+** $Revision: 1.1 $
+** $Log: c6xsupport.h $
+** Revision 1.1 1999/07/06 19:34:59 whuang
+** Initial revision
+**
+** Revision 1.1 1999-01-07 14:30:22-08 randyt
+** Initial revision
+**
+ *
+ * Rev 1.0 Oct 27 1998 16:19:34 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+ *
+ * Rev 1.0 Oct 23 1998 17:56:06 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.4 1998/10/12 15:40:26 bhehn
+** Casting SAT_WORD to long to make work.
+**
+** Revision 1.3 1998/10/09 21:20:35 bhehn
+** Fast version, Not yet versified.
+** AB ~ 125us, NB ~= 110us
+**
+** Revision 1.2 1998/10/09 15:54:00 bhehn
+** Made I/O faster and fixed normEnergy() energyAccum probelm for large signals.
+**
+** Revision 1.1 1998/10/07 15:21:36 bhehn
+** Initial revision
+**
+** Revision 1.1 1998/10/01 13:56:59 bhehn
+** Initial revision
+**
+**
+*/
+
+/*
+* Define a signed shift macro
+* ANSI C does not support this but A|RT & TI do.
+*/
+/* signed left shift */
+#define SSHIFTL( _x, _sft) ( (_sft) > 0 ? (_x) << (_sft) : (_x) >> -(_sft) )
+/* signed right shift */
+#define SSHIFTR( _x, _sft) ( (_sft) > 0 ? (_x) >> (_sft) : (_x) << -(_sft) )
+
+
+/*
+* Used to set the arithmetic saturation mode
+* Examples:
+* c = a + b; // Unsaturated
+* c = SAT( a+b ); // Saturated
+*
+* SAT typically needs to be used only if the input data
+* energy has an "exponent" of 0. This means that the
+* input samples will range from -1 to 1-precision
+*/
+/*#define SAT(x) oqc( x, fxpOqc::saturated() )
+********************************************************************/
+#define SAT_LONG(z) ( _sat(z) )
+
+#define SAT_WORD(_arg) ( SAT_LONG( ((long) _arg) << 16 ) >> 16 )
+
+
+/************************************************************8
+** Intrinsic Macros
+**
+** these may need to be ported to subroutines to make completely
+** compatable with the C6x intrinsics operation.
+*************************************************************/
+/*
+* define a multiply that takes two Words (16 bits)
+* multipies them, shifts by one and saturates
+*
+* TI 6X equivelent #define SMPY(x,y) (_smpy( x, y ))
+*/
+#define SMPY(x,y) ( _smpy(x, y ) )
+/*
+* define a C equiv for the C6c EXTU() intrinsic
+*/
+#define EXTU(src2,cst1,cst2) ( ( (src2)<<(cst1) )>>(cst2) )
+#define EXT(src2,cst1,cst2) ( (int)( (src2)<<(cst1) )>>(cst2) )
+
+
+/*
+* NORM returns the number bits to the left of the sign bit
+* for a "int" (32 bits)
+* For positive values this is 2*WORD_SIZE - (log2 + 2)
+*/
+#define NORM(z) ( _norm(z) )
+/*
+* LNORM returns the number bits to the left of the sign bit
+* for a "long" (40 bits)
+* For positive values this is 2*WORD_SIZE+ACCUM_GUARD_BITS - (log2 + 2)
+*/
+#define LNORM(z) ( _lnorm( z ) )
+
+/*
+* log2(x) = log10(x)*3.3219, log10(x) = log2(x)*0.301
+* log2 returns the number of bits to the left of the msbit
+*/
+#define LOG2(z) ( 2*WORD_SIZE - NORM(z) )
+
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod-c/dem_const.h b/data/mnet/GP10/Dsp/bbdataproc/demod-c/dem_const.h
new file mode 100644
index 0000000..381ca44
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod-c/dem_const.h
@@ -0,0 +1,266 @@
+/*
+** GSM Demod Constants for A|RT library implentation
+**
+** $Author: whuang $
+** $Date: 1999/07/06 19:35:00 $
+** $Source: D:\\stageCell\\Dsp\\bbdataproc\\demod-c\\RCS\\dem_const.h $
+** $Revision: 1.1 $
+** $Log: dem_const.h $
+** Revision 1.1 1999/07/06 19:35:00 whuang
+** Initial revision
+**
+** Revision 1.1 1999-01-07 14:30:24-08 randyt
+** Initial revision
+**
+ *
+ * Rev 1.0 Oct 27 1998 16:19:34 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+ *
+ * Rev 1.0 Oct 23 1998 17:56:08 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.5 1998/10/14 18:46:30 bhehn
+** TEST mode = 0.
+**
+** Revision 1.4 1998/10/14 18:43:27 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.3 1998/10/12 15:39:47 bhehn
+** TEST mode on as default for testing
+**
+** Revision 1.1 1998/10/07 15:21:35 bhehn
+** Initial revision
+**
+** Revision 1.1 1998/10/01 13:56:58 bhehn
+** Initial revision
+**
+** Revision 1.3 1998/09/22 20:00:37 bhehn
+** Access Burst support added and verified.
+**
+** Revision 1.2 1998/09/21 22:04:23 bhehn
+** NB demod works, BER close to floating
+**
+*/
+#ifndef DEM_CONST_H
+#define DEM_CONST_H
+
+
+/*
+* Compilation Flags
+* These TEST FLAGS will output data to a file so
+* that it can be compared to others versions.
+*/
+
+#define TEST 0
+#define TEST_RHO TEST
+#define TEST_POWER TEST
+#define TEST_MATCHO TEST
+
+
+
+#define TEST_EQUALIZE TEST
+#define TEST_SNR TEST
+#define TEST_QUANT_SDP TEST
+
+/* These next 2 should normally be 0 */
+#define TEST_PATH_SD 0
+#define TEST_METRICS 0
+/***************************************************************************
+*
+* CONSTANTS
+*
+****************************************************************************/
+
+/*
+* Define the number of samples per burst
+* in the input files. This is the *.dsp file
+*/
+#define NUM_INPUT_SAMPLES_PER_BURST 160
+
+/*
+** Define the number of samples in the burst
+** rounded down.
+** floor(156.25) = 156
+*/
+#define GSM_NUM_SAMPLES_PER_BURST 156
+
+
+/* Threshold value used in offset compensation */
+/* Can not be 1.0 because fixed point can't represent it. */
+/* #define DC_OFFSET_THRESHOLD (0.999) in floating point */
+#define DC_OFFSET_THRESHOLD ( (1 << WORD_SIZE-1)-1 )
+
+/*
+* Define constants for the bursts
+*
+* Normal Burst
+* -----------------------------------------------------------
+* |TB=3| DATA = 58 | TSEQ = 26 | DATA = 58 |TB=3|GP=8.25|
+* -----------------------------------------------------------
+*
+* Access Burst
+* -----------------------------------------------------------
+* |TB=8| TSEQ = 41 | DATA = 36 |TB=3| GP=68.25 |
+* -----------------------------------------------------------
+*
+* Sync Burst
+* -----------------------------------------------------------
+* |TB=3| DATA = 39| TSEQ = 64 | DATA = 39 |TB=3|GP=8.25|
+* -----------------------------------------------------------
+*/
+#define NB_NUM_SAMPLES 160
+#define AB_NUM_SAMPLES 200
+#define SB_NUM_SAMPLES 200
+
+#define NB_NUM_DATA ((NB_NUM_SAMPLES/4)*4)
+#define AB_NUM_DATA ((AB_NUM_SAMPLES/4)*4)
+#define SB_NUM_DATA ((SB_NUM_SAMPLES/4)*4)
+#define MAX_NUM_DATA AB_NUM_DATA
+
+
+/* Define the number of bits in the burst less tail and guard bits */
+#define NB_NUM_BITS_PER_BURST (NB_NUM_ENCRYPT_BITS_PER_BURST + NB_TRAIN_SIZE)
+#define AB_NUM_BITS_PER_BURST (AB_NUM_ENCRYPT_BITS_PER_BURST + AB_TRAIN_SIZE)
+/* Define the maximum number of valid bits in a burst */
+/* This is the normal burst case, the AB has a lot */
+/* more guard bits. */
+#define MAX_NUM_BITS_PER_BURST (NB_NUM_BITS_PER_BURST)
+
+
+/*
+* CIR_NUM_TSEQ_BITS: Number of training sequence samples to
+* correlate with.
+* Also, define the max number of bits needed for CIR_NUM_TSEQ_BITS
+* CIR_NUM_TSEQ_BITS max is 64 (SB) + an offset (<10) so
+* 7 bits are needed.
+*/
+#define NB_CIR_NUM_TSEQ_BITS 16
+#define SB_CIR_NUM_TSEQ_BITS SB_TRAIN_SIZE
+#define AB_CIR_NUM_TSEQ_BITS AB_TRAIN_SIZE
+
+/*
+* OFFSET is the offset into the Tseq to where the CIR_NUM_TSEQ_BITS
+* will start from.
+* The ideal CIR is shown below for the +/- tseq values starting at the offset:
+*
+* OFFSET
+* |
+* cir value 0 0 0 16 0 0 0 0 0 0
+* index 0 1 2 3 4 5 6 7 8 9
+* ^ ^
+* | |
+* toaMin toaMax
+* |<- ->| - CIR_BEST_LENGTH
+* |<- CIR_LENGTH ->|
+*
+*/
+#define NB_IMPULSE_TSEQ_OFFSET (3)
+#define NB_TOA_MIN (-2)
+#define NB_TOA_MAX (2)
+#define CIR_BEST_LENGTH (5)
+
+/*
+* The AB does not need a negative TOA.
+* Therefore, offset and TOA_MIN are zero
+*/
+#define AB_IMPULSE_TSEQ_OFFSET (0)
+#define AB_TOA_MIN (0)
+#define AB_TOA_MAX (64)
+
+
+
+#define BURST_START 3
+#define CIR_SIZE 5
+
+/*
+* CIR_LENGTH: Channel Impulse Response Window Length
+* NB is finely syncronized so the window does not have to very large
+* SB the mobile is aquiring the BS timing so this needs to be fairly large
+* AB the BS is aquiring the MS timing so this needs to be fairly large
+*/
+#define NB_CIR_LENGTH (CIR_BEST_LENGTH + NB_TOA_MAX - NB_TOA_MIN)
+#define AB_CIR_LENGTH 64
+#define SB_CIR_LENGTH 50
+
+/* Define the maximum that the CIR length can be */
+/* This is the AB case */
+#define MAX_CIR_LENGTH AB_CIR_LENGTH
+
+/*
+* Define the position in the data where the CIR calculation begins
+*/
+#define NB_CIR_START_INDEX (NB_NUM_TAIL_BITS + NB_NUM_ENCRYPT_BITS_PER_SIDE \
+ + NB_IMPULSE_TSEQ_OFFSET + NB_TOA_MIN)
+
+#define AB_CIR_START_INDEX (AB_NUM_TAIL_BITS)
+/*#define SB_CIR_WINDOW_START (TAIL + SB_NUM_DATA_BITS_PER_SIDE) */
+
+
+
+
+
+#define NUM_CHOICE (NB_CIR_LENGTH - CIR_SIZE + 1)
+#define NB_MATCH 32
+#define C_USED_SAMPLE (MAX_BITS_PER_BURST + (CIR_SIZE-1) + (NB_CHOICE-1) )
+
+
+/*
+** offsetDerot() related constants
+**
+** Define the number of samples over which to calc the offset
+** make it a power of two so that no shifting is needed.
+**
+** NUM_OFFSET_SAMPS = number of samples to compute the offset over.
+** It is not 157 (number of samples in a burst) to make
+** the scaling easier
+*
+** Get the log2 to determine how many bits are needed to represent
+** the number. Note log2(128)=7
+** However, it takes log2(128)+1 bits to represent 128.
+** And ceil(log2(7)) = 3
+*/
+#define OFF_NUM_OFFSET_SAMPS (128)
+#define OFF_NUM_OFFSET_SAMPS_LOG2 (7)
+/* Need the number of bits needed to represent NUM_OFFSET_SAMPS_LOG2 */
+#define OFF_NUM_OFFSET_SAMPS_LOG2_BITS (3)
+
+/* The type for the i value in offset comp */
+/* #define OFF_I_TYPE Uint<OFF_NUM_OFFSET_SAMPS_LOG2+1> */
+#define OFF_I_TYPE UChar
+
+/*
+** To scale the accum data we need to divide by 128 or shift by 7 (2^7 =128)
+** Number of bits that can represent the shift value, 7 (0b111) can be represented by 3 bits
+*/
+/*#define OFF_SHIFT_VAL (Uint<OFF_NUM_OFFSET_SAMPS_LOG2_BITS> (OFF_NUM_OFFSET_SAMPS_LOG2))*/
+#define OFF_SHIFT_VAL (OFF_NUM_OFFSET_SAMPS_LOG2)
+
+/*
+** ENERGY_THRESHOLD_PERCENT is the percentage of the total energy that
+** each energy element must be greater then else it will be cleared out
+**
+** It is in the format F8.8
+**
+** Ex: 0.05 ~= (1<<8)*0.05 ~= 13 = 0.05078
+**
+** Use format F8.8 so that the result will go into the gaurd bits
+** without overflowing
+*/
+#define ENERGY_THRESHOLD_PERCENT (13)
+/* Define the format for the energy threshold (F8.8) */
+#define E_THRESH_FORMAT (8)
+
+/* For Equalizer */
+#define DELAY_MAX 5
+#define STATES_MAX (1 << DELAY_MAX)
+#define BURST_MATCH (MAX_NUM_BITS_PER_BURST + DELAY_MAX + 2)
+
+/*
+* Compute 1.0/mantissa
+* "one" can not be represented in fixed point
+* so approximate it by "1 - word precision"
+*/
+//#define ONE_MINUS_PRECISION (1.0 - 1.0 / (float) (1 << (WORD_SIZE-1)) )
+#define ONE_MINUS_PRECISION ( ( 1<<(WORD_SIZE-1) )-1 )
+
+#endif
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod-c/dem_globs.h b/data/mnet/GP10/Dsp/bbdataproc/demod-c/dem_globs.h
new file mode 100644
index 0000000..e8905c3
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod-c/dem_globs.h
@@ -0,0 +1,208 @@
+/*
+** GSM Demod Globals & types
+**
+** $Author: whuang $
+** $Date: 1999/07/06 19:35:00 $
+** $Source: D:\\stageCell\\Dsp\\bbdataproc\\demod-c\\RCS\\dem_globs.h $
+** $Revision: 1.1 $
+** $Log: dem_globs.h $
+** Revision 1.1 1999/07/06 19:35:00 whuang
+** Initial revision
+**
+** Revision 1.1 1999-01-07 14:30:24-08 randyt
+** Initial revision
+**
+ *
+ * Rev 1.0 Oct 27 1998 16:19:34 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+ *
+ * Rev 1.0 Oct 23 1998 17:56:08 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.2 1998/10/14 18:43:28 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.1 1998/10/07 15:21:36 bhehn
+** Initial revision
+**
+** Revision 1.2 1998/10/02 17:01:01 bhehn
+** Changed calling routine to be more like c6x implementation.
+** BER matches previous version.
+**
+** Revision 1.1 1998/10/01 13:56:58 bhehn
+** Initial revision
+**
+** Revision 1.3 1998/09/22 20:00:37 bhehn
+** Access Burst support added and verified.
+**
+** Revision 1.2 1998/09/21 22:04:24 bhehn
+** NB demod works, BER close to floating
+**
+*/
+#ifndef DEM_GLOBS_H
+#define DEM_GLOBS_H
+
+/*
+* Set up a #define that determines whether the
+* variables should be defined here or just
+* externed here
+*/
+#ifdef DEMOD_TOP
+#define DEMGLOBS /**/
+#else
+#define DEMGLOBS extern
+#endif
+
+
+
+/* Define the wordlength of the data */
+#define WORD_SIZE (16)
+#define ACCUM_GUARD_BITS (8)
+
+
+/* Define some common types */
+
+typedef signed int SInt; /* signed integer */
+
+
+typedef Short Word; /* word */
+typedef UShort UWord; /* unsigned word */
+typedef SInt LWord; /* long word */
+typedef UInt ULWord; /* unsigned long word */
+typedef Long VLWord; /* very long word */
+typedef ULong UVLWord; /* unsigned very long word */
+
+
+
+
+/*
+* Define the data types for variables with the decimal point
+* at different places.
+*
+* The number appended to these indicates how many integer bits in
+* the word.
+* For instance, a "Word2" has two integer bits and can be converted
+* to a "Word" (one integer bit) with a right shift on 2-1 = 1
+* A "Wordm3" can be converted to a "Word" by a right shift of -3-1 = -4
+* or a left shift of 4.
+* Note that these types are just reminders of where the decimal point is
+* located, they are all actually of type "Short"
+*
+* x = 1 data bit, S = sign bit, X = xxxx (4 bits)
+*/
+/*typedef Word Word; /* 1 interger bits, Fix<16,16-1> S.xxxXXX */
+typedef Word Word2; /* 2 interger bits, Fix<16,16-2> Sx.xxXXX */
+typedef Word Word3; /* 3 interger bits, Fix<16,16-3> Sxx.xXXX*/
+typedef Word Word14; /* 14 interger bits, Fix<16,16-14> XXXxx.xx*/
+
+typedef Word Wordm3; /* 3 interger bits, Fix<16,16+2> SSS.SSSSxxxXXX*/
+
+typedef UWord UWord2; /* 2 interger bits, UFix<16,16-2> 0xx.xxXXX */
+typedef LWord LWord2; /* 2 interger bits, Fix<32,32-2> Sx.xxXXXXXXX */
+typedef LWord LWord17; /* 17 interger bits, Fix<32,32-17>, 15 fract bits */
+
+/*
+* Define macros that convert data formats to floating point.
+* These are used to output data to a file which will then be
+* compared with other demod implementations.
+*/
+#define WORD_2F(x) ( ((float ) (x)) / (float) (1<<WORD_SIZE-1) )
+#define WORD2_2F(x) ( ((float ) (x)) / (float) (1<<WORD_SIZE-2) )
+#define WORD3_2F(x) ( ((float ) (x)) / (float) (1<<WORD_SIZE-3) )
+#define WORD4_2F(x) ( ((float ) (x)) / (float) (1<<WORD_SIZE-4) )
+#define WORD14_2F(x) ( ((float ) (x)) / (float) (1<<WORD_SIZE-14) )
+#define LONG_2F(x) ( ((double) (x)) / (double) ((1<<2*WORD_SIZE-1)-1) )
+
+/*
+* Define the data type for the equalizer input data
+* 5 bits left of the decimal point are needed,
+* 1 for the sign, 4 for the integer part.
+* 4 integer bits are needed because the data
+* of this type was multiply/accumulated
+* over CIR_SIZE (5) and it was complex (*2).
+* Therefore, this data has a scale of 2*5 = 10.
+* 2^4 = 16 can handle the scale of 10.
+*/
+/* typedef Fix<WORD_SIZE,WORD_SIZE-5> t_EqualData; */
+typedef Word t_EqualData;
+
+/* typedef Uint<7> CIR_NUM_TSEQ_BITS_TYPE; */
+typedef UChar CIR_NUM_TSEQ_BITS_TYPE;
+
+/* Define the max number of bits needed for CIR_LENGTH */
+/* For AB CIR_LENGTH = 64 = 0x1000000 = 7 bits */
+typedef UChar CIR_LENGTH_TYPE;
+
+
+/*
+** Define a structure that contains all the unique constants for each burst type.
+**
+** NOTE:
+** NB: CIR_NUM_TSEQ_BITS = 16, SB: CIR_NUM_TSEQ_BITS = 64, AB: CIR_NUM_TSEQ_BITS = 41)
+** "cirNumTseqBitsInv" max is 1/16 = 0.0625 = 0b0.0001 so maximize precision.
+** ex: Fix<8,7> would be S.XXXXXX, Fix<8,10> would be S.SSSXXXXXXX
+** where X is a significant digit and S is a sign bit.
+** In this example you could not have Fix<8,11> because of the sign bit.
+**
+** cirWindowStart defines the position that the CIR calculation begins.
+*/
+typedef struct {
+ const t_TseqWord *tseqBaseAddr; /* Training sequences base addrress */
+ const CIR_NUM_TSEQ_BITS_TYPE cirNumTseqBits; /* Number of tseq samples to correlate over */
+ const Wordm3 cirNumTseqBitsInv; /* 1.0/CIR_NUM_TSEQ_BITS */
+ const UChar impulseTseqOffset; /* Position of the first tseq bit for CIR calc. */
+ const UChar cirLength; /* Length of the CIR */
+ const UChar cirStartIndex; /* index of first samples to calc CIR over */
+ const Char toaMin; /* Minimum posible time of arrival, relative */
+ const UChar numBits; /* Number of bits in the burst less tail/guard bits*/
+ /*const UChar numDataBits; */ /* Number of data bits in the burst */
+ /* NB = 58*2, AB = 36 */
+ UChar numDataBits; /* const made weight() fail */
+ const UChar numTailBits; /* Number of tail bits at the beginning of the burst */
+
+
+} t_burstConsts;
+
+/*
+** Define structures that have the constants for each burst type
+*/
+#ifdef DEMOD_TOP
+t_burstConsts g_ABConsts = { &train_ab[0],
+ AB_CIR_NUM_TSEQ_BITS,
+ (1<<WORD_SIZE)/AB_CIR_NUM_TSEQ_BITS,
+ AB_IMPULSE_TSEQ_OFFSET,
+ AB_CIR_LENGTH,
+ AB_CIR_START_INDEX,
+ AB_TOA_MIN,
+ AB_NUM_BITS_PER_BURST,
+ AB_NUM_ENCRYPT_BITS_PER_BURST,
+ AB_NUM_TAIL_BITS
+};
+
+t_burstConsts g_NBConsts = { &train_nb[0][0],
+ NB_CIR_NUM_TSEQ_BITS,
+ (1<<WORD_SIZE)/NB_CIR_NUM_TSEQ_BITS,
+ NB_IMPULSE_TSEQ_OFFSET,
+ NB_CIR_LENGTH,
+ NB_CIR_START_INDEX,
+ NB_TOA_MIN,
+ NB_NUM_BITS_PER_BURST,
+ NB_NUM_ENCRYPT_BITS_PER_BURST,
+ NB_NUM_TAIL_BITS
+};
+#else
+extern t_burstConsts g_ABConsts; /* Access burst constants */
+extern t_burstConsts g_NBConsts; /* Normal burst constants */
+#endif
+
+DEMGLOBS t_burstConsts *g_BConsts_pt; /* Pointer to the burst constants */
+
+
+/* Define a varaible the is the burst type */
+DEMGLOBS t_chanSel g_burstType;
+
+
+
+
+
+#endif
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod-c/dem_protos.h b/data/mnet/GP10/Dsp/bbdataproc/demod-c/dem_protos.h
new file mode 100644
index 0000000..a9571cc
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod-c/dem_protos.h
@@ -0,0 +1,97 @@
+/*
+** GSM Demod Prototypes for A|RT library implentation
+**
+** $Author: whuang $
+** $Date: 1999/07/06 19:35:01 $
+** $Source: D:\\stageCell\\Dsp\\bbdataproc\\demod-c\\RCS\\dem_protos.h $
+** $Revision: 1.1 $
+** $Log: dem_protos.h $
+** Revision 1.1 1999/07/06 19:35:01 whuang
+** Initial revision
+**
+** Revision 1.1 1999-01-07 14:30:25-08 randyt
+** Initial revision
+**
+ *
+ * Rev 1.0 Oct 27 1998 16:19:34 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+ *
+ * Rev 1.0 Oct 23 1998 17:56:08 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.2 1998/10/14 18:43:28 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.1 1998/10/07 15:21:37 bhehn
+** Initial revision
+**
+** Revision 1.3 1998/10/02 17:01:01 bhehn
+** Changed calling routine to be more like c6x implementation.
+** BER matches previous version.
+**
+** Revision 1.2 1998/10/01 16:37:05 bhehn
+** Fixed matchfilter output saturation problem
+**
+** Revision 1.1 1998/10/01 13:56:58 bhehn
+** Initial revision
+**
+** Revision 1.3 1998/09/22 20:00:38 bhehn
+** Access Burst support added and verified.
+**
+** Revision 1.2 1998/09/21 22:04:24 bhehn
+** NB demod works, BER close to floating
+**
+*/
+#ifndef DEM_PROTOS_H
+#define DEM_PROTOS_H
+
+
+/*void offsetDerot(t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ Word threshold );
+*/
+
+void impulse(t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ const t_TseqWord tseq[MAX_TSEQ_SIZE],
+ Word cir[2][MAX_CIR_LENGTH] );
+
+Char Energy( Word cir[2][MAX_CIR_LENGTH],
+ LWord leng[MAX_CIR_LENGTH] );
+
+UWord2 normEnergy( t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ Word cir[2][MAX_CIR_LENGTH],
+ LWord energy_L[MAX_CIR_LENGTH],
+ Char indexBest,
+ Word *bob,
+ Word *power,
+ Short *exponent);
+
+void normCir( Word cir[2][MAX_CIR_LENGTH],
+ UWord2 mantInv,
+ Char index,
+ Word2 cirNorm[2][MAX_CIR_LENGTH] );
+
+void calcRho( Word cir[2][MAX_CIR_LENGTH],
+ Word2 cirNorm[2][MAX_CIR_LENGTH],
+ Char index,
+ Short exponent,
+ Word3 rho[CIR_BEST_LENGTH-1] );
+
+void matchFilter( t_ULComplexSamp data[BURST_SIZE_UL_MAX],
+ Word2 cirNorm[2][MAX_CIR_LENGTH],
+ Char index,
+ Short exponent,
+ Word3 output[NB_MATCH]);
+
+void weight( Word softDec[],
+ const t_TseqWord tseq[],
+ Word *snr);
+
+void quantize( Word demodSamps[],
+ Char softDec[] );
+
+void equalize (Word matcho[BURST_MATCH],
+ Word rho[CIR_BEST_LENGTH-1],
+ const t_TseqWord tseq[]);
+
+
+#endif
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod-c/demodSubC.c b/data/mnet/GP10/Dsp/bbdataproc/demod-c/demodSubC.c
new file mode 100644
index 0000000..4e1b887
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod-c/demodSubC.c
@@ -0,0 +1,982 @@
+/*
+** GSM Demod w/ A|RT Library implemtation
+**
+** This files contains all of the subroutines for the demod
+**
+** $Author: whuang $
+** $Date: 1999/07/09 02:43:12 $
+** $Source: D:\\stageCell\\Dsp\\bbdataproc\\demod-c\\RCS\\demodSubC.c $
+** $Revision: 1.1 $
+** $Log: demodSubC.c $
+** Revision 1.1 1999/07/09 02:43:12 whuang
+** Initial revision
+**
+** Revision 1.2 1999-07-08 19:42:07-07 whuang
+** <>
+**
+** Revision 1.1 1999-07-06 12:35:01-07 whuang
+** Initial revision
+**
+** Revision 1.1 1999-01-07 14:30:23-08 randyt
+** Initial revision
+**
+ *
+ * Rev 1.0 Oct 27 1998 16:19:34 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+ *
+ * Rev 1.0 Oct 23 1998 17:56:08 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.5 1998/10/14 18:43:26 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.4 1998/10/12 15:38:16 bhehn
+** Fixed power computation bug.
+**
+** Revision 1.3 1998/10/09 21:20:35 bhehn
+** Fast version, Not yet versified.
+** AB ~ 125us, NB ~= 110us
+**
+** Revision 1.2 1998/10/09 15:54:00 bhehn
+** Made I/O faster and fixed normEnergy() energyAccum probelm for large signals.
+**
+** Revision 1.1 1998/10/07 15:21:37 bhehn
+** Initial revision
+**
+** Revision 1.4 1998/10/02 17:01:00 bhehn
+** Changed calling routine to be more like c6x implementation.
+** BER matches previous version.
+**
+** Revision 1.3 1998/10/02 15:00:17 bhehn
+** Rounding offset & impulse. Getter much better BER for low level signals.
+**
+** Revision 1.2 1998/10/01 16:37:07 bhehn
+** Fixed matchfilter output saturation problem
+**
+** Revision 1.1 1998/10/01 13:57:00 bhehn
+** Initial revision
+**
+** Revision 1.6 1998/09/22 20:00:35 bhehn
+** Access Burst support added and verified.
+**
+** Revision 1.7 1998/09/21 22:18:59 bhehn
+** <>
+**
+** Revision 1.6 1998/09/21 22:18:35 bhehn
+** <>
+**
+** Revision 1.5 1998/09/21 22:13:47 bhehn
+** Outdated (renamed to '\\Fdi\public\rcs\D\rcs\projects\GSM\Art\demod\demodNBSubC.cxx,v').
+**
+** Revision 1.4 1998/09/21 22:04:22 bhehn
+** NB demod works, BER close to floating
+**
+** Revision 1.4 1998/09/18 20:14:42 bhehn
+** Outdated (renamed to '\\Fdi\public\rcs\D\rcs\projects\GSM\Art\demod\demodSubC.cxx,v').
+**
+*/
+
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "dsp/dsptypes.h"
+#include "gsmtypes.h"
+#include "bbdata.h"
+#include "bbproto.h"
+
+#include "dem_const.h"
+#include "training.h"
+#include "dem_globs.h"
+#include "dem_protos.h"
+#include "c6xsupport.h"
+
+
+Word expX( UVLWord data, Word *exponent );
+int smpyC( Short x, Short y);
+Word mag2DB( UVLWord mag );
+
+#define LOOP_TYPE int
+
+/*************************************************************************
+*
+* offsetDerot() :
+* -------------
+* Offset computation + Offset compensation + Derotation
+*
+*
+* Input data . samples[2][MAX_NUM_DATA]
+* . threshold (positive number)
+*
+* Output data . samples[2][MAX_NUM_DATA]
+*
+***************************************************************************/
+void offsetDerot( t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ Word threshold)
+
+{
+
+ VLWord offsetI_L, offsetQ_L;
+ Word offsetI, offsetQ;
+ Word temp;
+
+
+ LOOP_TYPE i;
+
+
+ /* Compute the Offset */
+ offsetI_L = 0;
+ offsetQ_L = 0;
+
+ /*
+ ** Do offset compensation on the first NUM_OFFSET_SAMPS bits.
+ ** Using OFF_NUM_OFFSET_SAMPS (not 156) to make scaling easy
+ */
+ for ( i = 0; i < OFF_NUM_OFFSET_SAMPS; ++i)
+ {
+ offsetI_L += samples[i+g_BConsts_pt->numTailBits].I;
+ offsetQ_L += samples[i+g_BConsts_pt->numTailBits].Q;
+ }
+
+ /* Round (add 0.5*OFF_SHIFT_VAL then shift & truncate) */
+ offsetI_L += 1<<(OFF_SHIFT_VAL-1);
+ offsetQ_L += 1<<(OFF_SHIFT_VAL-1);
+
+ /* Divide by OFF_NUM_OFFSET_SAMPS */
+ offsetI = (Word) (offsetI_L >> OFF_SHIFT_VAL); /* Divide by NUM_OFFSET_SAMPS */
+ offsetQ = (Word) (offsetQ_L >> OFF_SHIFT_VAL); /* Divide by NUM_OFFSET_SAMPS */
+
+ /* Compare offset to threshold and saturate if needed */
+ if ( offsetI > threshold)
+ {
+ offsetI = threshold;
+ }
+ if ( offsetI < (Word) (-1) * threshold)
+ {
+ offsetI = (Word) (-1) * threshold ;
+ }
+ if ( offsetQ > threshold)
+ {
+ offsetQ = threshold;
+ }
+ if ( offsetQ < (Word) (-1) * threshold)
+ {
+ offsetQ = (Word) (-1) * threshold ;
+ }
+
+ /*
+ ** DC Offset Compensation & Derotation
+ ** Do the derotation over all of the samples of the burst
+ ** including ending tail bits and gaurd bits.
+ ** Don't need to do the beginning tail bits.
+ ** Need to do the guard bits because we are not sure where the
+ ** burst will arrive.
+ ** Subtract 3 to insure we do not go into the next burst memory area.
+ ** For normal burst numTailBits = 3 so samples 3 to 154 will be changed.
+ ** For access burst numTailBits = 8 so samples 8 to 155 will be changed.
+ **/
+ for( i = g_BConsts_pt->numTailBits; i < (GSM_NUM_SAMPLES_PER_BURST-3); i += (OFF_I_TYPE) 4 )
+ {
+
+ /* Derotate 1st sample */
+ temp = samples[i].I;
+ samples[i].I = SAT_WORD( samples[i].Q - offsetQ );
+ samples[i].Q = SAT_WORD( offsetI - temp );
+
+ /* Derotate 2nd sample */
+ samples[i+1].I = SAT_WORD( offsetI - samples[i+1].I );
+ samples[i+1].Q = SAT_WORD( offsetQ - samples[i+1].Q );
+
+ /* Derotate 3rd sample */
+ temp = samples[i+2].I;
+ samples[i+2].I = SAT_WORD( offsetQ - samples[i+2].Q );
+ samples[i+2].Q = SAT_WORD( temp - offsetI );
+
+ /* Derotate 4th sample */
+ samples[i+3].I = SAT_WORD( samples[i+3].I - offsetI );
+ samples[i+3].Q = SAT_WORD( samples[i+3].Q - offsetQ );
+ }
+
+}
+
+
+/*************************************************************************
+*
+* impulse() :
+* ---------
+* Compute the channel impulse response
+*
+*
+* Input data . Training Sequence : tseq[TRAIN_SIZE]
+* . Derotated Samples : samples[2][MAX_NUM_DATA]
+*
+* Output data . Channel impulse response : cir[2][CIR_LENGTH]
+*
+************************************************************************
+* An illistration of "impulse()" operation is shown below for the NB:
+* NB impulse starts at an "offset" because it is desirable to correlate the tseq bits
+* against what is probably tseq bits of the samples. If the samples were
+* shifted because the mobile moved then the offset of 3 will insure that
+* the correlation is still in the tseq bits. Also, with the diagram below
+* the demod can find toa's from -2 to 2.
+*
+* Assumes: CIR_LENGTH = 9, CIR_NUM_TSEQ_BITS = 16, offset = 3
+* toaMin = -2
+*
+* offset
+* |
+* ----------------------
+* tseq | 3 tseq values 19| MAC
+* ----------------------
+* cirStartIndex
+* |
+* 0 60 61 v
+* i = 0 -----------------------------------------------
+* samples[] | | 62 tseq 78 |
+* ------------------------------------------------
+*
+* i = 2 ---------------------
+* samples[] |63 samples[] 79| MAC
+* ... ---------------------
+* i = 7 ---------------------
+* samples[] |70 samples[] 86| MAC
+* ---------------------
+* <-- CIR_NUM_TSEQ_BITS --->
+* ^
+* |
+* cirStartIndex+CIR_LENGTH
+*
+***************************************************************************/
+void impulse(t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ const t_TseqWord tseq[MAX_TSEQ_SIZE],
+ Word cir[2][MAX_CIR_LENGTH])
+
+{
+ VLWord resultI, resultQ;
+ unsigned char start;
+ unsigned char offset; /* Offset from the tseqPostion to begin processing */
+ LOOP_TYPE i;
+ LOOP_TYPE j;
+
+ LWord result;
+
+
+ offset = g_BConsts_pt->impulseTseqOffset;
+ start = g_BConsts_pt->cirStartIndex;
+
+ /* Compute CIR over the window length */
+ for ( i = 0; i < g_BConsts_pt->cirLength; ++i)
+ {
+ resultI = 0;
+ resultQ = 0;
+
+
+ /* For the number of tseq samples */
+ for ( j = 0; j < g_BConsts_pt->cirNumTseqBits; ++j)
+ {
+ t_TseqWord temp;
+ temp = tseq[j+offset];
+
+ /* Making these intrinsics made things worse */
+ resultI += (VLWord) (samples[start + j + i].I * temp);
+ resultQ += (VLWord) (samples[start + j + i].Q * temp);
+
+ }
+
+ /* Normalize then convert to a Word */
+ resultI = (resultI * g_BConsts_pt->cirNumTseqBitsInv);
+ resultQ = (resultQ * g_BConsts_pt->cirNumTseqBitsInv);
+
+ /* Round (add +/- 0.5*WORD_SIZE then shift & truncate) */
+ resultI += 1<<(WORD_SIZE-1);
+ resultQ += 1<<(WORD_SIZE-1);
+
+ cir[0][i] = (resultI)>>WORD_SIZE;
+ cir[1][i] = (resultQ)>>WORD_SIZE;
+
+ }
+}
+
+
+/*************************************************************************
+*
+* Energy() :
+* --------
+* Compute the energy of the impulse response
+* Find the highest energy window of length CIR_SIZE
+*
+*
+* Input data: The channel impulse response: cir[2][CIR_LENGTH]
+*
+* Output data: Energy of the impulse response: leng[CIR_LENGTH]
+* Position of the best: returned by the function
+*
+***************************************************************************/
+Char Energy( Word cir[2][MAX_CIR_LENGTH], LWord energy_L[MAX_CIR_LENGTH] )
+{
+ VLWord result;
+ VLWord result2;
+ VLWord key;
+ Char indexBest;
+ LOOP_TYPE i;
+
+ /*
+ ** Energy Computation
+ */
+ for ( i = 0; i < g_BConsts_pt->cirLength; ++i) {
+
+ result = SMPY( cir[0][i] , cir[0][i] );
+ result2 = SMPY( cir[1][i] , cir[1][i] ); /* (F16.15 * F16.15) <<1= F32.31 (one sign bits) */
+ energy_L[i] = result + result2; /* F32.31 + F32.31 = F32.31 (one sign bit ) */
+ }
+
+ /*
+ ** Find the highest energy window
+ */
+ key = 0;
+ result = 0;
+ indexBest = 0;
+ /*
+ ** Search over CIR_LENGTH - CIR_SIZE so that the
+ ** search does not exceed energy_L[]'s array bounds
+ */
+ for ( i = 0; i < (g_BConsts_pt->cirLength - CIR_SIZE); ++i) {
+
+ /* VLWord needed here */
+ result += (energy_L[i + CIR_SIZE] - energy_L[i]);
+
+ if ( result >= key ) {
+ key = result;
+ indexBest = i+1 ;
+ }
+ }
+
+ return( indexBest );
+
+}
+
+
+/*************************************************************************
+*
+* normEnergy :
+* ---------
+* Threshold the lowest energies of the window found in Energy()
+* and we compute the sum of the energies of this window
+* and split it into mantissa * 2^exponent
+*
+* Input data: - Derotated samples : samples[2][MAX_NUM_DATA]
+* - Channel impulse response : cir[2][CIR_LENGTH
+* - Energy of the impulse response : energy_L[CIR_LENGTH]
+* - Position of the best .. : indexBest
+*
+* Output data: - Thresholded Cir : cir[2][CIR_LENGTH]
+* - First non zero Cir (or begin of the burst) : toa
+* - average power in dB: power
+* - exponent
+*
+* Returned data : mantInv = 1/Mantissa, (1 < mantInv <= 2)
+*
+*
+* "toa" is returned for measurement reporting only.
+* If "toa" is not equal to indexBest, for many bursts,
+* then this indicates that the mobile should adjust it's
+* timing advance.
+*
+***************************************************************************/
+UWord2 normEnergy(t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ Word cir[2][MAX_CIR_LENGTH],
+ LWord2 energy_L[MAX_CIR_LENGTH],
+ Char indexBest,
+ Word *toa,
+ Word14 *power,
+ Short *exponent)
+{
+
+
+ /* energyAccum & result is used to calculate the power of the burst */
+ UVLWord energyAccum, result;
+ /* energyThresh is the threshold used to clear a cir position */
+ UVLWord energyThresh;
+
+ UInt numSignBits;
+
+ /*
+ ** energySum is the sum of the energy in the largest energy window of
+ ** the CIR. energySum is defined as:
+ **
+ ** sum over largest CIR window( real(CIR)^2 + imag(CIR)^2 ).
+ ** This is then broken into mantissa * 2^exponent
+ */
+ UVLWord energySum;
+ Word mantissa;
+ UWord2 mantInv; /* 14 fractional bits to represent 2.0 exactly */
+
+ Word tempCir[2][CIR_SIZE];
+ Bool firstNonZero;
+ Bool allZero;
+ Char cirStartIndex;
+ Char indexTemp; /* Temporary store of index */
+
+ ULong one;
+
+ LOOP_TYPE i;
+
+ /* Get the position of the training sequence */
+ cirStartIndex = g_BConsts_pt->cirStartIndex + indexBest;
+
+ /*
+ * Compute the average energy of the training sequence
+ */
+ energyAccum = 0;
+
+ for ( i = 0; i < g_BConsts_pt->cirNumTseqBits; ++i)
+ {
+
+ result = SMPY( samples[cirStartIndex + i].I , samples[cirStartIndex + i].I );
+ energyAccum = _lsadd( result, energyAccum );
+ result = SMPY( samples[cirStartIndex + i].Q , samples[cirStartIndex + i].Q );
+ energyAccum = _lsadd( result, energyAccum );
+ }
+
+ /*
+ * Normalize energyAccum by cirNumTseqBits
+ * energyAccum,F32 * cirNumTseqBitsInv, F16 = F48 -> >> 16 = F32
+ * Ideally we do this:
+ * energyAccum =
+ * ((energyAccum+(1<<(WORD_SIZE-1)))>>WORD_SIZE) * g_BConsts_pt->cirNumTseqBitsInv;
+ *
+ * However, to maintain accuracy for low level signals (the first shift might zero
+ * energyAccum out) we use NORM to get energyAccum aligned to the 16 lsb's.
+ * Also, we must avoid shifts by a signed value because these are not supported
+ * under ANSI C.
+ * Implemented: (assume WORD_SIZE =16, ACCUM_GUARD_BITS = 8, numSignBits = N)
+ *
+ * ((((((energyAccum << N) >> 24) * 1/cirNumTseqBits ) << 8)>>N
+ *
+ * This takes about 15 cycles
+ */
+ numSignBits = _lnorm( energyAccum );
+ /*
+ * Shift to the 40 MSBs to normalize
+ * This will avoid an signed shift in the next step
+ * Then, Shift to the 16 LSB's
+ */
+ energyAccum = energyAccum << numSignBits,
+ energyAccum = energyAccum >> (WORD_SIZE+ACCUM_GUARD_BITS);
+ /* Multiply by 1/cirNumTseqBits */
+ energyAccum = (Word) energyAccum * g_BConsts_pt->cirNumTseqBitsInv;
+ /* Shift Back, */
+ /* shift by (WORD_SIZE+ACCUM_GUARD_BITS)-numSignBits -WORD_SIZE */
+ /* = << ACCUM_GUARD_BITS and >> numSignBits */
+ energyAccum = energyAccum << ACCUM_GUARD_BITS;
+ energyAccum = energyAccum >> numSignBits;
+
+ /*
+ * TI asm DIVMODU32() can run in 42 cycles.
+ * This divide was clocked at 463 cycles.
+ */
+ /*energyAccum = energyAccum / g_BConsts_pt->cirNumTseqBits;*/
+
+ *power = mag2DB( energyAccum );
+
+ /* Get the Energy Threshold */
+ energyThresh = (energyAccum * ENERGY_THRESHOLD_PERCENT ) >> E_THRESH_FORMAT;
+
+
+ /* Save cir values and indexBest */
+ indexTemp = indexBest;
+ /* CIR_SIZE + toa can never be greater than CIR_NUM_TSEQ_BITS */
+ for ( i = indexTemp; i < CIR_BEST_LENGTH + indexTemp; ++i) {
+
+ tempCir[0][i-indexTemp] = cir[0][i];
+ tempCir[1][i-indexTemp] = cir[1][i];
+ }
+
+ /*
+ ** Threshold the very small values of the CIR.
+ ** If they are all small then restore the original CIR.
+ */
+ firstNonZero = FALSE; /* Indicates if the first non-zero cir was found */
+ energySum = 0;
+ allZero = TRUE; /* Will be set to FALSE is any value is greater than the threshold */
+
+ for ( i = indexTemp; i < CIR_BEST_LENGTH + indexTemp; ++i )
+ {
+ if ( energy_L[i] <= energyThresh )
+ { /* Zero out the CIR at this position */
+ // cir[0][i] = 0;
+ // cir[1][i] = 0;
+ } else
+ {
+ /* Calculate the energy */
+ energySum = energySum + energy_L[i];
+
+ if ( firstNonZero == FALSE )
+ {
+ *toa = i;
+ }
+ firstNonZero = TRUE; /* first non-zero cir found */
+ allZero = FALSE; /* Not all of the CIR values are zero */
+ }
+ }
+
+ /* If all the cir values are zero then restore the old cir */
+ if ( allZero == TRUE )
+ {
+ for ( i = indexTemp; i < CIR_BEST_LENGTH + indexTemp; ++i) {
+
+ cir[0][i] = tempCir[0][i-indexTemp];
+ cir[1][i] = tempCir[1][i-indexTemp];
+
+ /* Calculate the energy */
+ energySum = energySum + energy_L[i];
+ }
+
+ /* Restore the beginning of burst indicator */
+ *toa = indexTemp;
+ }
+
+ /*
+ * Set "toa" to be relative to a ideal toa of zero.
+ * Do this because toa is used in the timing advance
+ * algorithm uses toa
+ */
+ *toa += g_BConsts_pt->toaMin;
+
+ /*
+ ** Break "energySum" into its components:
+ **
+ ** energySum = Mantissa * 2^Exponent
+ **
+ ** This is done to maximize the fixed point precision in
+ ** other routines.
+ **
+ ** The exponent "shifts" the mantissa until the first "one" is just to the
+ ** right of the decimal place. Note the energySum will always be
+ ** positive. The picture below shows the result as binary:
+ **
+ ** energySum = 0.1xxxxxxx * 2^exponent
+ **
+ ** Therefore the mantissa will always be between 0.5 (0.100000)
+ ** and 1-precision (0.111111).
+ ** Also, becuause of this fact 1/mantissa will always be between
+ ** 2 (when mantissa = 0.5) and 1 (when mantissa = 1-precision).
+ */
+
+ /* Divide energySum into mantissa *2^exponent */
+ mantissa = expX( energySum, exponent);
+
+ /*
+ * Compute 1.0/mantissa
+ * "one" can not be represented in fixed point
+ * so approximate it by "1 - word precision"
+ */
+ one = (Long) 1<<(2*WORD_SIZE-3); /* 1 in F32.29, signed */
+
+ mantInv = one / mantissa; /* F32.29 / F16.15 = UF16.14 */
+
+ return( mantInv );
+}
+
+
+/*************************************************************************
+* normCir :
+* --------
+* We normalize the value of Cir ( Cir / Mantissa ).
+*
+*
+* Input data . Channel impulse response : cir[2][CIR_LENGTH]
+* . 1/Mantissa : mantInv (1 <mantInt <= 2)
+* . Position of the best CIR window : *indexBest
+*
+* Output data . Normalized channel impulse response : nCir[2][CIR_SIZE]
+*
+***************************************************************************/
+
+void normCir( Word2 cir[2][MAX_CIR_LENGTH],
+ UWord2 mantInv,
+ Char indexBest_fix,
+ Word2 cirNorm[2][MAX_CIR_LENGTH] )
+{
+
+ LOOP_TYPE i;
+ unsigned char indexBest;
+
+ indexBest = (unsigned char) indexBest_fix;
+
+ for ( i = indexBest; i < (CIR_BEST_LENGTH + indexBest ); i++)
+ {
+ /*
+ * -1 <= cir < 1, 1 < mant_Inv < 2
+ * So -2 < cirNorm < 2
+ * cir, SF16,15 and mantInv is UF16,14
+ * SMPY will <<1 to get:
+ * (SF16,15 * UF16,14)<<1 = SF32,29 << 1 = SF33,30
+ * and shift that by 16 = SF17,14
+ * This will not overflow SF16,14 (Word2, two integer bits)
+ * because max(cir) is -1.0 and max(mantInv) is 2.0
+ * -1.0 * 2.0 = -2.0 = 10.0000b
+ */
+ cirNorm[0][i - indexBest] = SMPY( (SInt) cir[0][i] , mantInv)>>(WORD_SIZE);
+ cirNorm[1][i - indexBest] = SMPY( (SInt) cir[1][i] , mantInv)>>(WORD_SIZE);
+ }
+
+}
+
+
+/*************************************************************************
+**
+** calcRho :
+** ----
+** Compute the autocorrelation of the Cir with cirNorm.
+** calcRho will be used for the VITERBI algorithm as the real channel response.
+**
+** Input data - Channel impulse response : cir[2][CIR_LENGTH]
+** - Normalized channel impulse response : cirNorm[2][CIR_SIZE]
+** - Position of the best CIR window : indexBest
+** - Exponent of the normalized energy : exponent
+**
+** Ouput data - Autocorrelation of the Cir : rho[DELAY_MAX]
+**
+** This illistrates the NB case where index = 0 and CIR_SIZE = 5:
+** When i = 1, j = 1:4, j-i = 0:3
+** i = 2, j = 2:4, j-i = 0:2
+** i = 3, j = 3:4, j-i = 0:1
+** i = 4, j = 4, j-i = 0
+** In this manner the autocorrelation is commputed on the samples except
+** the i = 0 delay which is normalized by the mantissa and exponent.
+**
+** NOTE: as of 9/98 rho is not in A|RT. It will be ported when viterbi
+** is ported to A|RT.
+***************************************************************************/
+void calcRho( Word cir[2][MAX_CIR_LENGTH],
+ Word2 cirNorm[2][MAX_CIR_LENGTH],
+ Char indexBest,
+ Short exponent,
+ Word3 rho[DELAY_MAX] )
+{
+
+ LWord result;
+ LWord temp;
+
+ LOOP_TYPE i, j;
+
+ /*
+ ** Correlation of Cir and cirNorm
+ **
+ ** Note that the maximum of the CIR's aoutcorrelation is:
+ ** max( autocorr(cir) ) = energySum = mantissa * 2^exponent
+ **
+ ** and that the maximum of the CIR and cirNorms autcorrelation is:
+ ** max( corr(cir,cirNorm) ) = energySum/mantissa = 2^exponent
+ **
+ ** Because cirNorm = Cir/mantissa
+ **
+ ** Typically the exponent will be negative, so when Rho is shifted right
+ ** by the exponent, it is actually reducing the number of sign bits and
+ ** maxmizing the fixed point precision.
+ */
+
+ for ( i = 1 + indexBest; i < CIR_SIZE + indexBest; i++) {
+ result = 0;
+
+ for ( j = i; j < CIR_SIZE + indexBest; j++) {
+
+ temp = cir[0][j] * cirNorm[0][j-i] ;
+ result = temp + result;
+
+ temp = cir[1][j] * cirNorm[1][j-i] ;
+ result = temp + result;
+ }
+
+ /* Normalize rho to maximize fixed point precision */
+ rho[i-indexBest-1] = SSHIFTR( result, exponent ) >> WORD_SIZE;
+ }
+}
+
+
+/*************************************************************************
+**
+** matchFilter :
+** -----------
+** Matched filter the input samples with the normalized CIR
+**
+** Input data - Input samples : data[2][]
+** - channel impulse response : cirNorm[2][CIR_SIZE]
+** - Position of the best CIR window : indexBest
+** - Exponent of the normalized energy : exponent
+**
+** Output data - Matched filtered samples : Output[nb_samp]
+**
+**
+** Correlation of Cir and cirNorm
+**
+** Note that the maximum of the CIR's aoutcorrelation is:
+** max( autocorr(cir) ) = energySum = mantissa * 2^exponent
+**
+** and that the maximum of the CIR and cirNorms autcorrelation is:
+** max( corr(cir,cirNorm) ) = energySum/mantissa = 2^exponent
+**
+** Because cirNorm = Cir/mantissa
+**
+** Typically the exponent will be negative, so when Rho is shifted
+** by the exponent, it is actually reducing the number of sign bits and
+** maxmizing the fixed point precision.
+**
+***************************************************************************/
+
+void matchFilter(t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ Word2 cirNorm[2][MAX_CIR_LENGTH],
+ Char indexBest_fxp,
+ Short exponent,
+ Word3 output[])
+{
+ /*
+ * "temp" and "result" need to be VLWord only if the input data
+ * has an exponet of 0. This means the data will
+ * range from -1 to 1-precision
+ */
+ VLWord temp;
+ VLWord result;
+ LOOP_TYPE i, j;
+ int start; /* DEBUG !! */
+ Word3 out_fxp; /* DEBUG !! */
+
+ /*
+ * Determine the location of bit 0 in the burst.
+ * This is first sample after the tail (header) bits plus
+ * any data shift due to MS moving or mulitpath effects.
+ */
+ start = ((int) indexBest_fxp) + g_BConsts_pt->numTailBits + g_BConsts_pt->toaMin; /* DEBUG !! */
+
+
+ for ( j = 0; j < g_BConsts_pt->numBits; j++) {
+ result = 0;
+
+ for ( i = 0; i < CIR_SIZE; i++) {
+ result += samples[start + j + i].I * cirNorm[0][i];
+ result += samples[start + j + i].Q * cirNorm[1][i];
+ }
+
+ /* Normalize result to maximize fixed point precision */
+ result = SSHIFTR( result, exponent );
+ out_fxp = SAT_LONG( result ) >> WORD_SIZE;
+ output[j] = out_fxp;
+ }
+}
+
+
+/*************************************************************************
+** equalize()
+** ----------
+**
+** This function will equalize the burst.
+**
+**
+** Input data - Demodulated burst : demOut.softDec[BURST_MATCH]
+** - Autocorrelation of the Cir : Rho[delay_l]
+**
+** Output data - Corrected burst : demOut.softDec[BURST_MATCH]
+**
+***************************************************************************/
+void equalize (Word matcho[BURST_MATCH],
+ Word rho[DELAY_MAX],
+ const t_TseqWord tseq[])
+{
+ LOOP_TYPE i;
+
+ /* Just flip sign */
+
+ for( i = 0; i < g_BConsts_pt->numBits; i++ )
+ {
+ matcho[i] = -1 * matcho[i];
+ }
+
+}
+
+/***************************************************************************
+** weight()
+** --------
+**
+** Weight the soft-decisions to enhance
+** good quality bursts and reduce the impact of poor
+** quality bursts on the decoder.
+** Also, split out the hu/hl bits to the end of the burst.
+**
+** Input data:
+** -Soft Decisions : demOut.softDec[BURST_MATCH]
+** - Address of the Training sequence
+**
+** Output data:
+** - Weighted burst : demOut.softDec[BURST_MATCH]
+** - Signal to Noise Ratio : snr
+**
+****************************************************************************/
+void weight( Word softDec[MAX_NUM_BITS_PER_BURST],
+ const t_TseqWord tseq[],
+ Word *snr)
+{
+ LOOP_TYPE i;
+
+ /* Remove the tseq */
+ if( g_burstType == TCHF )
+ {
+ for( i = 0; i < NB_NUM_ENCRYPT_BITS_PER_SIDE; i++)
+ {
+ softDec[i+NB_NUM_ENCRYPT_BITS_PER_SIDE] = \
+ softDec[i+NB_NUM_ENCRYPT_BITS_PER_SIDE+NB_TRAIN_SIZE];
+ }
+ } else /* AB */
+ {
+ for( i = 0; i < g_BConsts_pt->numDataBits; i++)
+ {
+ softDec[i] = softDec[i+AB_TRAIN_SIZE];
+ }
+ }
+
+ /* Just make them perfect SD for now */
+ for( i = 0; i < g_BConsts_pt->numDataBits; i++ )
+ {
+ if( softDec[i] < 0 )
+ {
+ softDec[i] = 8;
+ } else
+ {
+ softDec[i] = -8;
+ }
+ }
+
+ *snr = 40; /* Excellent snr */
+}
+
+
+/***************************************************************************
+**
+** quantize()
+** ----------
+**
+** Quantization of the soft-decisions to save memory and to
+** be compatable with the decoder input.
+**
+** If |softddec| > 4 then quantized_soft_decision = sign(softdec) * 8
+** if |softdec| <= 4 then quantized_soft_decision goes linearly from -8 to +8.
+**
+**
+** Input data: - Soft Decsions
+**
+** Output data - Quantized Soft Decsions
+**
+***************************************************************************/
+void quantize( Word demodSamps[MAX_NUM_BITS_PER_BURST], Char softDec[] )
+{
+ LOOP_TYPE i;
+
+ for ( i = 0; i < g_BConsts_pt->numDataBits; i++)
+ {
+ softDec[i] = (Char) demodSamps[i];
+ }
+}
+
+
+
+/***************************************************************************
+**
+** exp()
+** ----
+**
+** This will break a number into:
+** x = mantissa * 2^exponent
+**
+** This uses the C6x intrinsic NORM()
+**
+**
+** Input data: - x, input data to break apart
+**
+** Output data - exponent, exponent of the "x"
+**
+** Return data - mantissa, mantissa of the "x"
+**
+***************************************************************************/
+Word expX( UVLWord data, Word *exponent )
+{
+ Word mantissa;
+ UChar numSignBits;
+
+ /*mantissa = frexp( (double) x / (double)(1<<2*WORD_SIZE-1), &expInt);
+ *exponent = (Short) expInt;
+ return( (Word) ( mantissa * (1<<(WORD_SIZE-1)) ) );
+ */
+
+ numSignBits = LNORM( data ) ;
+ *exponent = -(numSignBits - ACCUM_GUARD_BITS);
+
+ /* Normalize the data to 32 lsb's */
+ data = data << numSignBits;
+ mantissa = data >> (WORD_SIZE+ACCUM_GUARD_BITS);
+ return( mantissa );
+}
+
+/***************************************************************************
+* mag2DB()
+* -------
+*
+* Input Data: mag, magnitude of a value F48 with 40 actual bits
+*
+* Return Data: power in decibels of format F16.2
+*
+* Convert an unsigned long word (40bits) in the format
+* F32 to decibels.
+* The magin F48 because is was calculated by
+* F16 * F16 = F32.
+* Therefore "31" needs to subtracted from pow2(mag)
+* in order to align the decimal point.
+*
+* In floating point this would be :
+* If wordsize is 16 then:
+* *power = 10 * log10( (mag >> 16)/(double)((1<<2*16)-1) );
+*
+* Note that
+* 10*log10(x) = (10*0.301)*log2(x)
+* And 3*log2() = 3*(integer + fractional) = 3*integer + 3*fractional
+*
+* The fractional part is derived from a lookup table with
+* the 2 next significant bits after the most significant bit.
+*
+* The entries are calculated by log2(1.0),log2(1.25),log2(1.5),log2(1.75)
+*
+* logTable[4] = { 3*-1, 3*-0.6781, 3*-0.415, 3*-0.1926 }; floating
+* Multiply float table by 4 add 1 (to round) and round to nearest integer
+*
+***************************************************************************/
+const Short logTable[4] = { 2, 5, 8, 11 }; /* F16.14 */
+
+Word14 mag2DB( UVLWord mag )
+{
+ UShort numSignBits;
+ Word14 power;
+ Short intPart;
+ Short fractPart;
+
+ numSignBits = LNORM( mag );
+
+ /*
+ * Get the 3 msb's plus the sign for the fractional part.
+ * Shift up to 40 bits to normalize then down.
+ */
+ mag = mag << numSignBits;
+ fractPart = mag >> (2*WORD_SIZE + ACCUM_GUARD_BITS - 4);
+
+ /* Get the number of significant integer bits.
+ * = log2(mag) = number of bits to the right of the msbit (not the sign)
+ */
+ intPart = (2*WORD_SIZE + ACCUM_GUARD_BITS - 2) - numSignBits;
+
+ power = (intPart-31)*4*3; /* Integer part of power */
+ if( fractPart > 3 ) /* Check for zero power */
+ {
+ fractPart = logTable[fractPart-4];
+ power += fractPart;
+ }
+
+ return( power );
+}
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod-c/demodTop.c b/data/mnet/GP10/Dsp/bbdataproc/demod-c/demodTop.c
new file mode 100644
index 0000000..bbc1f7f
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod-c/demodTop.c
@@ -0,0 +1,449 @@
+/***********************************************************************
+**
+** GSM Demod w/ TI C6201 implementation
+**
+** Description:
+**
+** This is the main calling routine. This will process the I/O files
+** and call the low level functions.
+**
+** $Author: whuang $
+** $Date: 1999/07/06 19:35:02 $
+** $Source: D:\\stageCell\\Dsp\\bbdataproc\\demod-c\\RCS\\demodTop.c $
+** $Revision: 1.1 $
+** $Log: demodTop.c $
+** Revision 1.1 1999/07/06 19:35:02 whuang
+** Initial revision
+**
+** Revision 1.1 1999-01-07 14:30:24-08 randyt
+** Initial revision
+**
+ *
+ * Rev 1.0 Oct 27 1998 16:19:34 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+ *
+ * Rev 1.0 Oct 23 1998 17:56:08 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.6 1998/10/14 18:43:26 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.5 1998/10/09 21:20:36 bhehn
+** Fast version, Not yet versified.
+** AB ~ 125us, NB ~= 110us
+**
+** Revision 1.4 1998/10/07 15:21:32 bhehn
+** One Access Burst verifies. testfile.fixin is the input testfile.c6x is the output.
+**
+** Revision 1.3 1998/10/02 17:01:00 bhehn
+** Changed calling routine to be more like c6x implementation.
+** BER matches previous version.
+**
+** Revision 1.2 1998/10/01 16:37:07 bhehn
+** Fixed matchfilter output saturation problem
+**
+** Revision 1.1 1998/10/01 13:57:00 bhehn
+** Initial revision
+**
+** Revision 1.4 1998/09/22 20:00:36 bhehn
+** Access Burst support added and verified.
+**
+** Revision 1.2 1998/09/21 22:04:22 bhehn
+** NB demod works, BER close to floating
+**
+** Revision 1.2 1998/09/18 20:15:05 bhehn
+** Outdated (renamed to '\\Fdi\public\rcs\D\rcs\projects\GSM\Art\demod\demodTop.cxx,v').
+**
+**
+************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "dsp/dsptypes.h"
+#include "gsmtypes.h"
+#include "bbdata.h"
+#include "bbproto.h"
+
+/*
+* DEMOD_TOP is used to define the globals,
+* this should be the only file where it is defined
+*/
+#define DEMOD_TOP
+
+/* Include globals and typedefs */
+#include "dem_const.h"
+#include "training.h"
+#include "dem_globs.h"
+#include "dem_protos.h"
+
+
+
+
+#if TEST == 1
+
+/* I/O File global variables */
+extern FILE *out_file;
+
+void moveStealingBits( t_chanSel chanSel, Word softDec[] );
+#endif
+
+void demodulate( t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ t_chanSel chanSel,
+ UChar tseqNum,
+ t_ULBurstBuf *demodOut )
+{
+
+ Word cir[2][MAX_CIR_LENGTH]; /* Impulse response */
+ LWord energy_L[MAX_CIR_LENGTH]; /* Energy */
+ Word2 cirNorm[2][MAX_CIR_LENGTH]; /* Normalized Cir */
+ Char indexBest; /* Position of the best CIR window */
+ Word3 rho[DELAY_MAX]; /* Autocorrelation of the Cir, used by Viterbi */
+ /* Demodulated samples before quantizing */
+ /* See if this could be demodIn->samples to save stack space */
+ Word3 demodSamps[MAX_NUM_BITS_PER_BURST];
+
+ UWord2 mantInv; /* 1/mantissa of energySum = mantissa * 2^exponent */
+ Short exponent;
+
+
+#if TEST == 1
+ int i; /* used to index arrays for printing to files */
+#endif
+
+
+ /* Set the burst constants pointer to the proper burst */
+ if (chanSel == RACH )
+ {
+ /* Use the access burst constants */
+ g_BConsts_pt = &g_ABConsts;
+ g_burstType = RACH; /* Needed until equal is implemented */
+
+ } else
+ {
+ /* Use the normal burst constants */
+ g_BConsts_pt = &g_NBConsts;
+ /* Change the tseq base address */
+ g_BConsts_pt->tseqBaseAddr = &train_nb[tseqNum][0];
+ g_burstType = TCHF; /* Needed until equal is implemented */
+ }
+ /**************************************************************************
+ *
+ * GSM Demod: main program
+ *
+ **************************************************************************/
+
+ /*
+ **
+ ** Offset computation + Offset compensation + Derotation
+ **
+ ** Input data . samples[2][NUM_DATA]
+ **
+ ** Output data . samples[2][NUM_DATA]
+ ** samples have been overwritten by compensated + derotated samples
+ **
+ */
+ offsetDerot( samples, DC_OFFSET_THRESHOLD );
+
+ /*
+ fprintf( out_file, "* Input samples after Off_Derot*\n");
+ for ( i = 0; i < CIR_LENGTH ; i++)
+ {
+ fprintf( out_file, "%s\n", samples[0][i].dec() );
+ fprintf( out_file, "%s\n", samples[1][i].dec() );
+ }
+ */
+
+ /*
+ ** Estimate the Channel Impulse Response
+ **
+ **
+ ** Input: Derotated Samples - demodIn.samples[2][NUM_DATA]
+ ** Training Sequence - tseq[TRAINING_SIZE]
+ **
+ ** Output: Channel impulse response - cir[2][CIR_LENGTH]
+ **
+ */
+ impulse( samples, g_BConsts_pt->tseqBaseAddr, cir );
+
+
+
+#if TEST_RHO == 1
+ fprintf( out_file, "### Impulse Response ###\n");
+ for ( i = 0; i < g_BConsts_pt->cirLength; i++)
+ {
+ fprintf( out_file, "%2.10f\n", WORD_2F( cir[0][i] ));
+ fprintf( out_file, "%2.10f\n", WORD_2F( cir[1][i] ));
+ }
+#endif
+
+ /*
+ ** Compute the energy of the impulse response
+ ** and try to find the best energy window of length CIR_SIZE
+ **
+ **
+ ** Input data:
+ ** - The channel impulse response : cir[2][CIR_LENGTH]
+ **
+ ** Output data:
+ ** - Energy of the impulse response : energy_L[CIR_LENGTH]
+ ** - Position of the best CIR window : indexBest
+ **
+ */
+
+ indexBest = Energy( cir, energy_L );
+
+
+#if TEST_RHO == 1
+
+ fprintf( out_file, "### Energy of CIR ###\n");
+ for ( i = 0; i < g_BConsts_pt->cirLength; i++)
+ {
+ fprintf( out_file, "%2.10f\n", LONG_2F(energy_L[i]) );
+ }
+
+#endif
+
+ /*
+ **
+ ** normEnergy :
+ ** ---------
+ ** Clear lowest energies of the window found in Energy()
+ ** and we compute the sum of the energies of this window
+ ** and split it into mantissa * 2^exponent
+ **
+ ** Input data: - Derotated samples : samples[2][NUM_DATA]
+ ** - Channel impulse response : cir[2][CIR_LENGTH
+ ** - Energy of the impulse response : energy_L[CIR_LENGTH]
+ ** - Position of the best .. : indexBest
+ ** - cirWindowStart, startinf position
+ **
+ ** Output data: - Cleared Cir : cir[2][CIR_LENGTH]
+ ** - First non zero Cir (or begin of the burst) : bob
+ ** - average power in dB: power
+ ** - exponent
+ **
+ ** Returned data : mantInv = 1/Mantissa, (1 < mantInv <= 2)
+ **
+ **
+ */
+ mantInv = normEnergy( samples,
+ &cir[0],
+ &energy_L[0],
+ indexBest,
+ &demodOut->toa,
+ &demodOut->rcvPower,
+ &exponent);
+
+ demodOut->rcvPower = demodOut->rcvPower>>2;
+
+#if TEST_POWER == 1
+
+ fprintf( out_file, "### Power ###\n");
+
+ fprintf( out_file, "%2.4f\n", WORD14_2F( demodOut->rcvPower) );
+
+#endif
+
+
+
+
+ /*
+ **
+ ** normCir()
+ ** ---------
+ **
+ ** We normalize the value of Cir ( Cir / Mantissa ).
+ **
+ **
+ ** Input data:
+ ** - Channel impulse response : ir[2][CIR_LENGTH]
+ ** - 1/Mantissa : mantInv
+ ** - Position of the best CIR window : indexBest
+ **
+ ** Output data:
+ ** - Normalized channel impulse response : cirNorm[2][CIR_SIZE]
+ **
+ */
+ normCir( cir, mantInv, indexBest, cirNorm );
+
+
+ /*
+ **
+ ** calcRho() :
+ ** -------
+ ** Compute the autocorrelation of the Cir with normCir.
+ ** calcRho will be used for the VITERBI algorithm as the real channel response.
+ **
+ ** Input data: - Channel impulse response : cir[2][CIR_LENGTH]
+ ** - Normalized channel impulse resp. : normCir[2][CIR_SIZE]
+ ** - index of the best CIR window : indexBest
+ ** - Exponent of the normalized energy : exponent
+ **
+ ** Ouput data: - Autocorrelation of the Cir : rho[DELAY_MAX]
+ **
+ */
+ calcRho( cir, cirNorm, indexBest, exponent, rho );
+
+#if TEST_RHO == 1
+
+ fprintf( out_file, "### rho ###\n");
+ for ( i = 0; i < CIR_BEST_LENGTH - 1; i++) {
+ fprintf( out_file, "%2.8f\n", WORD3_2F( rho[i] ));
+ }
+
+#endif
+
+ /*
+ ** matchFilter()
+ ** -------------
+ **
+ ** Compute matched filter for the burst.
+ **
+ ** Input data: - Derotated samples : demodIn.samples[2][NUM_DATA]
+ ** - Normalized channel impulse response : NCir[2][CIR_SIZE]
+ ** - Position of the first data to compute : indexBest+TAIL
+ ** - Exponent of the normalized energy : Exponent
+ ** - Number of data to compute : 142
+ **
+ ** Ouput data: -Demodulated burst : demodOut.softDec[BITS_PER_BURST]
+ **
+ */
+ matchFilter( samples,
+ &cirNorm[0],
+ indexBest,
+ exponent,
+ &demodSamps[0] );
+
+#if TEST_MATCHO == 1
+
+ fprintf( out_file, "### Matcho after Matched() ###\n");
+ for ( i = 0; i < g_BConsts_pt->numBits; i++) {
+
+ fprintf( out_file, "%2.4f\n", WORD3_2F( demodSamps[i] ) );
+ }
+
+#endif
+
+ /*
+ ** equalize()
+ ** ----------
+ **
+ ** This function will equalize the burst.
+ **
+ **
+ ** Input data:
+ ** - Demodulated burst : demodOut.softDec[BURST_MATCH]
+ ** - Autocorrelation of the Cir : Rho[delay_l]
+ ** - Address of the Training sequence
+ **
+ ** Output data:
+ ** - Corrected burst : demodOut.softDec[BURST_MATCH]
+ **
+ */
+ equalize(&demodSamps[0], rho, g_BConsts_pt->tseqBaseAddr);
+
+#if TEST_EQUALIZE == 1
+
+ fprintf( out_file, "### Matcho after Equalize ###\n");
+
+ for ( i = 0; i < g_BConsts_pt->numBits; i++)
+ {
+ fprintf( out_file, "%2.4f\n", WORD3_2F( demodSamps[i] ) );
+ }
+
+#endif
+
+ /*
+ ** weight()
+ ** --------
+ **
+ ** Weight the soft-decisions to enhance
+ ** good quality bursts and reduce the impact of poor
+ ** quality bursts on the decoder.
+ **
+ **
+ ** Input data:
+ ** -Soft Decisions : demodOut.softDec[BURST_MATCH]
+ ** - Address of the Training sequence
+ **
+ ** Output data:
+ ** - Weighted burst : demodOut.softDec[BURST_MATCH]
+ ** - Signal to Noise Ratio : snr
+ **
+ */
+ weight( demodSamps,
+ g_BConsts_pt->tseqBaseAddr,
+ &demodOut->snr);
+
+#if TEST == 1
+ moveStealingBits( chanSel, &demodSamps[0] );
+#endif
+
+#if TEST_SNR == 1
+
+ fprintf( out_file, "### snr ###\n");
+ fprintf( out_file, "%2.4f\n", (float) demodOut->snr);
+
+#endif
+
+ /*
+ ** quantize()
+ ** ----------
+ ** Quantization of the soft-decisions to save memory and to
+ ** be compatable with the decoder input.
+ **
+ ** Input data:
+ ** - Soft Decisions, demodSamps[BURST_MATCH]
+ **
+ ** Output data - Weighted Soft Decsions : demodOut.softDec[BURST_MATCH]
+ **
+ */
+ quantize( demodSamps, &demodOut->data[0] );
+
+#if TEST_QUANT_SDP == 1
+
+ fprintf( out_file, "### Matcho after Quantize ###\n");
+ for ( i = 0; i < g_BConsts_pt->numDataBits; i++) {
+ fprintf( out_file, "%2.4f\n", (float) demodOut->data[i]);
+ }
+
+#endif
+
+}
+
+#if TEST == 1
+/***************************************************************************
+* moveStealingBits()
+* ----------------
+*
+* This will move the stealing bits to the end of the burst for
+* normal bursts only.
+*
+* This is for comparison with the other demods.
+***************************************************************************/
+void moveStealingBits( t_chanSel chanSel, Word softDec[] )
+{
+ int i;
+ Word hu, hl;
+
+ /*
+ * Move the hu/hl bits to the end
+ * if this is a normal burst
+ */
+ if( chanSel != RACH )
+ {
+ hu = softDec[NB_NUM_ENCRYPT_BITS_PER_SIDE-1];
+ hl = softDec[NB_NUM_ENCRYPT_BITS_PER_SIDE];
+ for( i = 0; i < NB_NUM_ENCRYPT_BITS_PER_SIDE-2; i++ )
+ {
+ softDec[i+NB_NUM_ENCRYPT_BITS_PER_SIDE-1] = \
+ softDec[i+NB_NUM_ENCRYPT_BITS_PER_SIDE+1];
+ }
+ softDec[NB_NUM_ENCRYPT_BITS_PER_BURST-2] = hl;
+ softDec[NB_NUM_ENCRYPT_BITS_PER_BURST-1] = hu;
+ }
+}
+#endif
+
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod-c/training.h b/data/mnet/GP10/Dsp/bbdataproc/demod-c/training.h
new file mode 100644
index 0000000..6b75200
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod-c/training.h
@@ -0,0 +1,101 @@
+/*
+** GSM Demod Training Sequences
+**
+** $Author: whuang $
+** $Date: 1999/07/06 19:35:02 $
+** $Source: D:\\stageCell\\Dsp\\bbdataproc\\demod-c\\RCS\\training.h $
+** $Revision: 1.1 $
+** $Log: training.h $
+** Revision 1.1 1999/07/06 19:35:02 whuang
+** Initial revision
+**
+** Revision 1.1 1999-01-07 14:30:26-08 randyt
+** Initial revision
+**
+ *
+ * Rev 1.0 Oct 27 1998 16:19:34 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+ *
+ * Rev 1.0 Oct 23 1998 17:56:08 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.2 1998/10/14 18:43:29 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.1 1998/10/07 15:21:38 bhehn
+** Initial revision
+**
+** Revision 1.1 1998/10/01 13:56:59 bhehn
+** Initial revision
+**
+** Revision 1.2 1998/09/21 22:04:25 bhehn
+** NB demod works, BER close to floating
+**
+*/
+#ifndef TRAINING_H
+#define TRAINING_H
+
+/*
+* Define the training sequence word length,
+* tseq = -1 or 1 = 2 bits
+*/
+typedef Char t_TseqWord;
+
+/*
+* Set up a #define that determines whether the
+* variables should be defined here or just
+* externed here
+*/
+#ifdef DEMOD_TOP
+
+
+
+
+const t_TseqWord train_nb[8][26] =
+{
+ { + 1, + 1, -1, + 1, + 1, -1, + 1, -1, -1, -1, + 1, + 1, + 1,
+ + 1, -1, + 1, + 1, + 1, -1, + 1, + 1, -1, + 1, -1, -1, -1 },
+ { + 1, + 1, -1, + 1, -1, -1, + 1, -1, -1, -1, + 1, -1, -1,
+ -1, -1, + 1, + 1, + 1, -1, + 1, -1, -1, + 1, -1, -1, -1 },
+ { + 1, -1, + 1, + 1, + 1, + 1, -1, -1, -1, + 1, -1, -1, -1,
+ + 1, -1, + 1, + 1, -1, + 1, + 1, + 1, + 1, -1, -1, -1, + 1 },
+ { + 1, -1, + 1, + 1, + 1, -1, -1, -1, -1, + 1, -1, -1, + 1,
+ -1, + 1, + 1, + 1, -1, + 1, + 1, + 1, -1, -1, -1, -1, + 1 },
+ { + 1, + 1, + 1, -1, -1, + 1, -1, + 1, -1, -1, -1, + 1, + 1,
+ -1, + 1, + 1, + 1, + 1, + 1, -1, -1, + 1, -1, + 1, -1, -1 },
+ { + 1, -1, + 1, + 1, -1, -1, -1, + 1, -1, + 1, -1, -1, + 1,
+ + 1, + 1, + 1, + 1, -1, + 1, + 1, -1, -1, -1, + 1, -1, + 1 },
+ { -1, + 1, -1, + 1, + 1, -1, -1, -1, -1, -1, + 1, -1, -1,
+ + 1, + 1, + 1, -1, + 1, -1, + 1, + 1, -1, -1, -1, -1, -1 },
+ { -1, -1, -1, + 1, -1, -1, -1, -1, + 1, + 1, + 1, -1, + 1,
+ + 1, -1, + 1, -1, -1, -1, + 1, -1, -1, -1, -1, + 1, + 1 }
+};
+
+
+const t_TseqWord train_sb[64] =
+{
+ -1, + 1, -1, -1, -1, + 1, + 1, -1, + 1, -1, -1, + 1, + 1, + 1, -1, + 1,
+ + 1, + 1, + 1, + 1, + 1, -1, + 1, + 1, + 1, + 1, + 1, + 1, -1, -1, -1, -1,
+ + 1, + 1, -1, + 1, -1, -1, + 1, -1, + 1, -1, + 1, + 1, + 1, -1, + 1, -1,
+ + 1, -1, -1, -1, + 1, -1, -1, + 1, + 1, + 1, + 1, -1, -1, + 1, -1, -1
+};
+
+const t_TseqWord train_ab[41] =
+{
+ +1, -1, +1, +1, -1, +1, -1, -1, +1, -1,
+ -1, -1, -1, -1, -1, -1, -1, +1, +1, -1,
+ -1, +1, +1, -1, -1, +1, -1, +1, -1, +1,
+ -1, +1, +1, +1, -1, -1, -1, -1, +1, +1,+1
+};
+
+#else
+
+extern const t_TseqWord train_nb[8][26];
+extern const t_TseqWord train_sb[64];
+extern const t_TseqWord train_ab[41];
+
+#endif /* ifdef DEMOD_TOP */
+
+
+
+#endif
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod/BERTEST.H b/data/mnet/GP10/Dsp/bbdataproc/demod/BERTEST.H
new file mode 100644
index 0000000..e5549e8
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod/BERTEST.H
@@ -0,0 +1,58 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*
+** GSM Demod Training Sequences
+**
+ * Rev 1.0 Oct 27 1998 16:19:34 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+ *
+ * Rev 1.0 Oct 23 1998 17:56:08 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.2 1998/10/14 18:43:29 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.1 1998/10/07 15:21:38 bhehn
+** Initial revision
+**
+** Revision 1.1 1998/10/01 13:56:59 bhehn
+** Initial revision
+**
+** Revision 1.2 1998/09/21 22:04:25 bhehn
+** NB demod works, BER close to floating
+**
+***************************************************************************/
+
+Char cch_ref[142] =
+{
+ + 1, - 1, -1, - 1, - 1, -1, - 1, +1, -1, -1, -1, + 1,
+ + 1, +1, - 1, + 1, - 1, +1, - 1, + 1, -1, - 1, -1, -1,
+ - 1, - 1, -1, - 1, +1, -1, + 1, -1, -1, -1, - 1, -1,
+ -1, -1, - 1, + 1, + 1, +1, + 1, +1, +1, + 1, -1, +1,
+
+ - 1, +1, - 1, - 1, - 1, - 1, -1, -1, +1, + 1, -1, +1,
+ - 1, -1, + 1, + 1, +1, - 1, + 1, - 1, + 1, +1, -1, -1,
+ - 1, -1, - 1, + 1, - 1, -1, +1, +1, +1, - 1, +1, -1,
+ +1, - 1, + 1, - 1, -1, - 1, - 1, + 1, -1, -1, -1, + 1 ,
+
+ - 1, + 1, + 1, +1, -1, + 1, -1, + 1, -1, -1, -1, - 1,
+ -1, - 1, - 1, - 1, + 1, - 1, +1, -1, - 1, -1, - 1, +1,
+ - 1, -1, - 1, - 1, -1, +1, -1, + 1, -1, + 1, -1, +1,
+ - 1, + 1, - 1, - 1, -1, - 1, - 1, -1, +1, -1
+};
+
+Char rach_ref[77] =
+{
+ -1, + 1, -1, -1, +1, - 1, + 1, +1, - 1, +1, +1, + 1,
+ + 1, + 1, + 1, + 1, + 1, -1, - 1, + 1, + 1,
+ - 1, - 1, +1, + 1, -1, +1, - 1, +1, - 1, +1, - 1, - 1, - 1, +1, + 1, +1,
+ + 1, -1, -1, -1, +1,
+
+ +1, - 1, + 1, + 1, +1, + 1, - 1, + 1, +1, -1, -1, + 1 ,
+ -1, - 1, - 1, - 1, -1, + 1, - 1, + 1, +1, +1, -1, + 1 ,
+ +1, - 1, - 1, + 1, -1, - 1, - 1, + 1, +1, +1,+ 1
+
+};
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod/DEMODC.C b/data/mnet/GP10/Dsp/bbdataproc/demod/DEMODC.C
new file mode 100644
index 0000000..6ef499f
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod/DEMODC.C
@@ -0,0 +1,758 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/************************************************************************
+* File: demodc.c
+*
+* Description:
+* This files contains only subroutines for the equalization
+* Note: Old revision log is at the end of this file.
+*
+************************************************************************/
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <c6x.h>
+#include "dsp/dsptypes.h"
+#include "gsmtypes.h"
+#include "bbdata.h"
+#include "bbproto.h"
+#include "dem_globs.h"
+#include "dem_aprotos.h"
+#include "c6xsupport.h"
+/*
+* This macro will return the GSM defined value of
+* the tseq from what was stored for the demod
+*
+* demod GSM
+* 1 <-> 1
+* -1 <-> 0
+*/
+#define SIGNU(_xx) ( (((_xx) + 1)>>1) )
+
+#define INITVAL 0xfffff800
+#define LOOP_TYPE int
+
+#define DC_SMOOTH_MULT 15 /* multiplier for DC offset smoothing */
+#define DC_SMOOTH_SHIFT 4 /* downshift for DC offset smoothing */
+
+
+/*************************************************************************
+** equalize()
+** ----------
+**
+** This function will equalize the burst.
+**
+**
+** Parameter I/O:
+**
+** Input data - Demodulated burst : demOut.softDec[BURST_MATCH]
+** - Autocorrelation of the Cir : Rho[delay_l]
+**
+** Output data - Corrected burst : demOut.softDec[BURST_MATCH]
+**
+** Returns: none
+**
+***************************************************************************/
+/*
+* Force 32-bit alignment of these arrays so they can be accessed as Int's.
+* To use this pragma the varaibles must be global.
+*/
+#pragma DATA_ALIGN(oldMets, 4);
+#pragma DATA_ALIGN(newMets, 4);
+
+static Short oldMets[NUM_STATES];
+static Short newMets[NUM_STATES];
+
+
+void equalize (Word matcho[BURST_MATCH],
+ Word rho[DELAY_MAX],
+ const t_TseqWord tseq[],
+ t_chanSel chanSel )
+{
+ Word *newMetsPtr, *oldMetsPtr;
+ Word probs[NUM_STATES];
+
+ Short stateTranTbl[MAX_NUM_ENCRYPT_BITS_PER_SIDE+DELAY_MAX+4][NUM_STATES]; /* state transition table */
+ SInt state;
+ SInt i,j;
+ SInt dataStartIndex;
+ SInt sdStartIndex;
+ SInt numBitsOut;
+ Short rachTseqBits[AB_TRAIN_SIZE+DELAY_MAX];
+
+
+ oldMetsPtr = &oldMets[0];
+ newMetsPtr = &newMets[0];
+
+
+ /*
+ * Create the probablities for each state.
+ */
+ for (i = 0; i < NUM_STATES/2; i++)
+ {
+ probs[i] = 0;
+ for( j = 0; j < DELAY_MAX; j ++ )
+ {
+ if( i & (1<<j) )
+ {
+ probs[i] += rho[DELAY_MAX - j - 1];
+
+ } else
+ {
+ probs[i] -= rho[DELAY_MAX - j - 1];
+ }
+ }
+ }
+ /*
+ * The other states are just the negative mirror image
+ * of states 0 -> 7
+ */
+ for (i = NUM_STATES/2; i < NUM_STATES; i++)
+ {
+ probs[i] = -probs[NUM_STATES - i - 1];
+ }
+
+ /**
+ ** Do the part of the burst before the tseq first.
+ ** This is only for normal and syncro NOT rach.
+ ** new 10/5/99...save RACH tseq bits for equalization later
+ **/
+
+ if( chanSel == RACH )
+ {
+ for( i = 0; i < (AB_TRAIN_SIZE+DELAY_MAX); i++ )
+ {
+ rachTseqBits[i] = matcho[i];
+ }
+ }
+ else
+ {
+
+ /*
+
+ * Old metrics initialized with initial values
+ * The "unlikely" states get initialized with 2*INITVAL
+ * and the "most likely" states get initialized with INITVAL.
+ */
+
+ for(i=2; i<16; i++)
+ {
+ oldMets[i] = 2 * INITVAL;
+ }
+
+ /*
+ * Computing the first part of the burst
+ * means that the tail bits are in front.
+ * The tail bits are 3 0's the other bit can be
+ * a zero or one with equal probabilty.
+ * So states 0000 and 0001 are the most likely states.
+ *
+ * The ordering is from left to right, newest to oldest states
+ */
+ oldMets[0] = INITVAL;
+ oldMets[1] = INITVAL;
+
+ /*
+ * Call the viterbi algorithm on this section of the burst.
+ *
+ * Also, get the number of bits that the viterbi needs to
+ * work on, this is the number of encrypted bits plus the
+ * "rho" size.
+ *
+ * dataStartIndex: the beginning index of the second part of the burst
+ * sdStartIndex: the Index for the soft decisions when the
+ * tseq is removed.
+ * numBitsOut: the number of bits that the viterbi needs to
+ * work on, this is the number of encrypted bits plus the
+ * "rho" size.
+ */
+ dataStartIndex = 0; /* at the beginning of the burst */
+ sdStartIndex = 0;
+ numBitsOut = g_BConsts_pt->numEncryptBitsPerSide + DELAY_MAX;
+
+ viteq( numBitsOut,
+ (short*)newMetsPtr,
+ (short*)oldMetsPtr,
+ &matcho[dataStartIndex],
+ &probs[0],
+ &stateTranTbl[0][0] );
+
+
+ /*
+ * Perform the backtracking and decisions. numBitsOut-4 bits will be written
+ * to u[0..numBitsOut-5]. u[numBitsOut-4..numBitsOut] is not written since
+ * this is tseq bits and need not be written. It is assummed that these
+ * locations in the output buffer have already been initialized.
+ *
+ * state is the first 4 tseq bits.
+ */
+ state = SIGNU( tseq[0] )*1 /* xxxX */ \
+ + SIGNU( tseq[1] )*2 /* xxXx */ \
+ + SIGNU( tseq[2] )*4 /* xXxx */ \
+ + SIGNU( tseq[3] )*8; /* Xxxx */
+
+
+ for(i= numBitsOut - 1, j=state; i >= DELAY_MAX; i--)
+ {
+ SInt x;
+
+ /*
+ * stateTranTbl[i][j] is actually the LSB of the state number. The observation here
+ * is that this LSB, delayed by 4 units, will appear as the output.
+ */
+ matcho[i-DELAY_MAX+sdStartIndex] = stateTranTbl[i][j];
+
+ /*
+ * Decide which of the two states to backtrack to based on the state LSB
+ * (stateTranTbl[i][j])
+ * j = ( 2*j + stateTranTbl[i][j] ) modulo 16
+ */
+ x = (stateTranTbl[i][j] > 0);
+ j= ((j<<1) + x) & 0x0F;
+ } /* end backtracking */
+
+ } /* End normal/sync burst first part processing */
+
+
+ /**
+ ** Do the second part of the burst.
+ ** For AB this is the only part.
+ **/
+
+ /*
+ * Append the ideal tail bits to the end of the burst.
+ * Assume the 4th bit is also zero.
+ */
+ for( i = 0; i < DELAY_MAX; i++ )
+ {
+ matcho[g_BConsts_pt->numBits+i] = -(1<<8);
+ }
+
+ /*
+ * Old metrics initialized with initial values
+ */
+ for(i=0; i<16; i++)
+ {
+ oldMets[i] = 2 * INITVAL;
+ }
+
+ /*
+ * Computing the second part of the burst
+ * means that the training sequence is in front.
+ * Use the last 4 bits of the tseq as the initial
+ * state.
+ * The ordering is from left to right, newest to oldest states
+ */
+ state = SIGNU(tseq[g_BConsts_pt->numTseqBits -4] )*1 /* xxxX */ \
+ + SIGNU(tseq[g_BConsts_pt->numTseqBits -3] )*2 /* xxXx */ \
+ + SIGNU(tseq[g_BConsts_pt->numTseqBits -2] )*4 /* xXxx */ \
+ + SIGNU(tseq[g_BConsts_pt->numTseqBits -1] )*8; /* Xxxx */
+
+ oldMets[state] = INITVAL;
+
+ /*
+ * Call the viterbi algorithm on this section of the burst.
+ *
+ * Also, get the number of bits that the viterbi needs to
+ * work on, this is the number of encrypted bits plus the
+ * "rho" size.
+ *
+ * dataStartIndex: the beginning index of the second part of the burst
+ * sdStartIndex: the Index for the soft decisions when the
+ * tseq is removed.
+ * numBitsOut: the number of bits that the viterbi needs to
+ * work on, this is the number of encrypted bits plus the
+ * "rho" size.
+ */
+ if (chanSel == RACH )
+ {
+ dataStartIndex = g_BConsts_pt->numTseqBits;
+ sdStartIndex = 0; /* tseq is at the beginning of the burst */
+ } else /* Normal Burst or Syncro Burst */
+ {
+ dataStartIndex = g_BConsts_pt->numEncryptBitsPerSide + g_BConsts_pt->numTseqBits;
+ sdStartIndex = g_BConsts_pt->numEncryptBitsPerSide; /* tseq in middle */
+ }
+ numBitsOut = g_BConsts_pt->numEncryptBitsPerSide + DELAY_MAX;
+
+ viteq( numBitsOut,
+ newMetsPtr,
+ oldMetsPtr,
+ &matcho[dataStartIndex],
+ &probs[0],
+ &stateTranTbl[0][0]);
+
+
+ /*
+ * Perform the backtracking and decisions. numBitsOut-4 bits will be written
+ * to u[0..numBitsOut-5]. u[numBitsOut-4..numBitsOut] is not written since
+ * this is "0" tail bits and need not be written. It is assummed that these
+ * locations in the output buffer have already been initialized.
+ *
+ * The state is "0" because the tail bits are the final state.
+ */
+ state = 0;
+ for(i= numBitsOut - 1, j=state; i >= DELAY_MAX; i--)
+ {
+ SInt x;
+
+ /*
+ * stateTranTbl[i][j] is actually the LSB of the state number. The observation here
+ * is that this LSB, delayed by 4 units, will appear as the output.
+ */
+ matcho[i-DELAY_MAX+sdStartIndex] = stateTranTbl[i][j];
+
+ /*
+ * Decide which of the two states to backtrack to based on the state LSB
+ * (stateTranTbl[i][j])
+ * j = ( 2*j + stateTranTbl[i][j] ) modulo 16
+ */
+ x = (stateTranTbl[i][j] > 0);
+ j= ((j<<1) + x) & 0x0F;
+ } /* end backtracking */
+
+/* new 10/5/99..equalize the RACH tseq bits */
+
+ if( chanSel == RACH )
+ {
+ for(i=2; i<16; i++)
+ {
+ oldMets[i] = 2 * INITVAL;
+ }
+
+ /*
+ * Computing the first part of the burst
+ */
+ oldMets[0] = INITVAL;
+ oldMets[1] = INITVAL;
+
+ /*
+ * Call the viterbi algorithm on this section of the burst.
+ */
+ dataStartIndex = 0; /* at the beginning of the burst */
+ sdStartIndex = AB_NUM_ENCRYPT_BITS_PER_BURST;
+ numBitsOut = AB_TRAIN_SIZE + DELAY_MAX;
+
+ viteq( numBitsOut,
+ newMetsPtr,
+ oldMetsPtr,
+ &rachTseqBits[dataStartIndex],
+ &probs[0],
+ &stateTranTbl[0][0] );
+
+ /*
+ * Perform the backtracking and decisions. numBitsOut-4 bits will be written
+ *
+ * state is the first 4 matcho equalized data bits.
+ */
+ state = ( matcho[0] > 0)*1 /* xxxX */ \
+ + ( matcho[1] > 0)*2 /* xxXx */ \
+ + ( matcho[2] > 0)*4 /* xXxx */ \
+ + ( matcho[3] > 0)*8; /* Xxxx */
+
+ for(i= numBitsOut - 1, j=state; i >= DELAY_MAX; i--)
+ {
+ SInt x;
+
+ /*
+ * stateTranTbl[i][j] is actually the LSB of the state number. The observation here
+ * is that this LSB, delayed by 4 units, will appear as the output.
+ * negate sign to reverse effect of equalizer
+ */
+ matcho[i-DELAY_MAX+sdStartIndex] = stateTranTbl[i][j];
+
+ /*
+ * Decide which of the two states to backtrack to based on the state LSB
+ * (stateTranTbl[i][j])
+ * j = ( 2*j + stateTranTbl[i][j] ) modulo 16
+ */
+ x = (stateTranTbl[i][j] > 0);
+ j= ((j<<1) + x) & 0x0F;
+ }
+ }
+}
+
+/***************************************************************************
+** deEmph()
+** --------
+**
+** deemphasize bursts with poor quality.
+** This will reduce the impact of poor
+** quality bursts on the decoder.
+**
+** Input data:
+** - Soft Decisions of encrypted bits : softDec[NUM_ENCRYPT_BITS]
+** - Address of the Training sequence
+** - Burst Quality Metric (snr)
+**
+** Output data:
+** - deemphasized burst : softDec[NUM_ENCRYPT_BITS]
+**
+****************************************************************************/
+void deEmph( t_chanSel chanSel,
+ Word softDec[MAX_NUM_BITS_PER_BURST],
+ const t_TseqWord tseq[],
+ Word snr)
+{
+ int i;
+ Word8 deEmphVal;
+
+ /*
+ * Get the deemphasis value from the snr
+ * The snr goes from 26 (good burst) to 0 (very bad burst)
+ * Typical values for bad bursts are 24->22.
+ */
+ /*
+ * The inputs are 0 or 1,
+ * If snr = 26 (perfect) then the mapping should be:
+ * 1 -> -8
+ * 0 -> 8
+ * And make them smaller if snr is less than 26
+ */
+
+/* 11/3/99...restore deemphasis of poor quality burst for better decode performance */
+
+ if(chanSel == RACH)
+ deEmphVal = 0;
+ else
+ {
+ deEmphVal = snr-26;
+ deEmphVal = (deEmphVal < -3) ? 3 : -deEmphVal;
+ }
+
+ for( i = 0; i < g_BConsts_pt->numEncryptBits; i++ )
+ {
+/* hpines change..scale by right shift for quantize to work ok */
+
+ softDec[i] = softDec[i] * (-1) + 8; /* softDec is now -/+ 8 */
+
+ softDec[i] = (softDec[i]) >> 5; /* softDec is now -/+ 8 */
+
+ if(deEmphVal > 0)
+ softDec[i] = (softDec[i])>> deEmphVal ;
+
+ }
+
+}
+
+/***************************************************************************
+**
+** quantize()
+** ----------
+**
+** Quantization of the soft-decisions to save memory and to
+** be compatable with the decoder input.
+**
+**
+** Input data: - Soft Decsions
+**
+** Output data - Quantized Soft Decsions
+**
+***************************************************************************/
+void quantize( Word demodSamps[MAX_NUM_BITS_PER_BURST], Char softDec[] )
+{
+ int i;
+
+ for ( i = 0; i < g_BConsts_pt->numEncryptBits; i++)
+ {
+ softDec[i] = (Char) demodSamps[i];
+ }
+}
+
+/***************************************************************************
+**
+** computeSNR()
+** ------------
+**
+** This will compute the "SNR" of the input data.
+** It compares the training sequence section
+** to the actual training sequence samples.
+** The result is a number from 0 to 26 where 26 is good 0 is very bad.
+**
+** The same amount of data will be computed for all burst types.
+** The NB needs the snr for soft decsion deemphasis for poor bursts.
+** SB & AB need it mainly for diagnostics.
+**
+**
+** Input data: - data, input data compute the snr on
+** This should be a pointer to the first tseq sample
+** - probs, probablities for the viterbi
+**
+** Returned data: - value proportional to the snr
+**
+**
+***************************************************************************/
+Word computeSNR( Word data[NB_TRAIN_SIZE], t_chanSel chanSel )
+{
+
+ SInt i;
+ Word snr;
+
+
+ snr = 0;
+ if(chanSel == RACH)
+ {
+ for (i = 0; i < AB_TRAIN_SIZE; i++)
+ {
+ snr += ( (data[i] > 0) == (g_BConsts_pt->tseqBaseAddr[i] >0) );
+ }
+ }
+ else
+ {
+ for (i = 0; i < NB_TRAIN_SIZE; i++)
+ {
+ snr += ( (data[i] > 0) == (g_BConsts_pt->tseqBaseAddr[i] >0) );
+ }
+ }
+ return( snr );
+}
+
+/*************************************************************************
+*
+*
+* DCOffset :
+* -------------
+* DC Offset tracking. Maintains average DC offset of each time slot,
+* and subchannel, and the DC offset of the carrier's idle frames.
+* The latter is used for initializing the offset at activation.
+*
+*
+* Input:
+* samples complex input samples (not derotated)
+* groupNum group number
+* rfCh index of RF channel
+* index index of DC offset in g_DcOffset array:
+* a. TCH channel (first NUM_TN_PER_RF array locations)
+* b. SDCCH subchannel (next NUM_SDCCH_SUBCHANS locations)
+* c. all-carrier value (last array location)
+*
+* Output:
+* g_dCOffset[rfCh][timeSlot] updated DC offset
+*
+***************************************************************************/
+void DCOffset( t_ULComplexSamp samples[BURST_SIZE_UL_MAX],t_chanSel groupNum, Uint8 rfCh,
+ Uint8 index )
+{
+ Long offsetI=0;
+ Long offsetQ=0;
+ LOOP_TYPE i;
+ const Word START = (GSM_NUM_SAMPLES_PER_BURST-OFF_NUM_OFFSET_SAMPS)/2;
+
+ /*
+ * Accumulate OFF_NUM_OFFSET_SAMPS, a power of 2
+ */
+ for ( i = START; i < START+OFF_NUM_OFFSET_SAMPS; i++ )
+ {
+ offsetI += samples[i].I;
+ offsetQ += samples[i].Q;
+ }
+ /*
+ * Round and divide by number of samples using shift
+ */
+ offsetI += 1<<(OFF_SHIFT_VAL-1);
+ offsetQ += 1<<(OFF_SHIFT_VAL-1);
+ offsetI >>= OFF_SHIFT_VAL;
+ offsetQ >>= OFF_SHIFT_VAL;
+ /*
+ * Smooth DC offsets in units of 1/256 quantization level, save long
+ */
+
+ if (groupNum != GSM_GROUP_7){
+ g_DcOffset[rfCh][index].I =
+ ((DC_SMOOTH_MULT * g_DcOffset[rfCh][index].I) + offsetI*256) >> DC_SMOOTH_SHIFT;
+ g_DcOffset[rfCh][index].Q =
+ ((DC_SMOOTH_MULT * g_DcOffset[rfCh][index].Q) + offsetQ*256) >> DC_SMOOTH_SHIFT;
+ } else {
+ g_Dc_7_Offset[rfCh][index].I =
+ ((DC_SMOOTH_MULT * g_Dc_7_Offset[rfCh][index].I) + offsetI*256) >> DC_SMOOTH_SHIFT;
+ g_Dc_7_Offset[rfCh][index].Q =
+ ((DC_SMOOTH_MULT * g_Dc_7_Offset[rfCh][index].Q) + offsetQ*256) >> DC_SMOOTH_SHIFT;
+ }
+}
+
+/*************************************************************************
+*
+* removeDCOffset() :
+* ------------------
+* DC Offset compensation
+*
+*
+* Input:
+* samples complex input samples (not derotated)
+* groupNum configuration of the timeslot
+* rfCh index of RF channel
+* index index of DC offset in g_DcOffset array:
+* a. TCH channel (first NUM_TN_PER_RF array locations)
+* b. SDCCH subchannel (next NUM_SDCCH_SUBCHANS locations)
+* c. all-carrier value (last array location)
+*
+* Output:
+* samples offset complex samples
+*
+***************************************************************************/
+void removeDCOffset( t_ULComplexSamp samples[BURST_SIZE_UL_MAX], t_chanSel groupNum, Uint8 rfCh,
+ Uint8 index )
+{
+ Word offsetI, offsetQ;
+ LOOP_TYPE i;
+
+ /*
+ * Convert DC offsets from units of 1/256 to 1 quantization level
+ */
+
+ if (groupNum != GSM_GROUP_7){
+ offsetI = g_DcOffset[rfCh][index].I >> 8;
+ offsetQ = g_DcOffset[rfCh][index].Q >> 8;
+ } else {
+ offsetI = g_Dc_7_Offset[rfCh][index].I >> 8;
+ offsetQ = g_Dc_7_Offset[rfCh][index].Q >> 8;
+ }
+
+ for( i = 0; i < GSM_NUM_SAMPLES_PER_BURST; i++ )
+ {
+ samples[i].I = SAT_WORD( samples[i].I - offsetI );
+ samples[i].Q = SAT_WORD( samples[i].Q - offsetQ );
+ }
+}
+
+/*************************************************************************
+*
+* derotate() :
+* ------------
+* Derotation only
+*
+*
+* Input:
+* samples complex input samples
+*
+* Output:
+* samples derotated complex samples
+*
+***************************************************************************/
+void derotate( t_ULComplexSamp samples[BURST_SIZE_UL_MAX])
+{
+ LOOP_TYPE i;
+ Word temp;
+
+ /*
+ * Note: The saturation checks below would not seem to be necessary.
+ * However, in actual tests the RBER increases when they're left out.
+ */
+ for( i = 0; i < (GSM_NUM_SAMPLES_PER_BURST-3); i += (OFF_I_TYPE) 4 )
+ {
+ /* Derotate 1st sample */
+ temp = samples[i].I;
+ samples[i].I = samples[i].Q;
+ samples[i].Q = SAT_WORD( -temp );
+
+ /* Derotate 2nd sample */
+ samples[i+1].I = SAT_WORD( -samples[i+1].I );
+ samples[i+1].Q = SAT_WORD( -samples[i+1].Q );
+
+ /* Derotate 3rd sample */
+ temp = samples[i+2].I;
+ samples[i+2].I = SAT_WORD( -samples[i+2].Q );
+ samples[i+2].Q = SAT_WORD( temp );
+
+ /* Derotate 4th sample (no operation needed) */
+ }
+}
+
+/****************************** Old revision log ************************************
+**
+** Revision 1.10 2000-01-25 18:47:01-08 dkaiser
+** Check saturation in derotate function
+**
+** Revision 1.8 1999-11-07 16:54:38-08 dkaiser
+** Changed DC offset smoothing from 1/64 to 1/15 factor to be more responsive in case
+** offset changes drastically with automatic gain adjustment. Now slews to 90% of its
+** steady state value in .35 second.
+**
+** Revision 1.7 1999-11-04 14:54:35-08 ltravaglione
+** <>
+**
+** Revision 1.7 1999-11-03 18:18:40-08 hpines
+** Restored deemphasis of poor snr-quality bursts for better soft decision decoder
+** performance, especially at low signal power levels.
+**
+** Revision 1.6 1999-10-27 13:37:59-07 dkaiser
+** DC offset is now computed for each logical channel as well as all-carrier idle frames
+**
+** Revision 1.5 1999-10-18 18:50:49-07 hpines
+** Enhanced RACH detection test...1. perform equalization on RACH training sequence bits
+** 2. computeSNR over 41 RACH training sequence bits.
+**
+** Revision 1.4 1999-10-06 16:58:00-07 dkaiser
+** added rfCh input param to OffsetDerot function
+**
+** Revision 1.3 1999-09-23 11:31:43-07 dkaiser
+** added DC offset function
+** computeSNR function distinguishes access bursts from normal bursts
+**
+** Revision 1.2 1999-07-14 16:27:36-07 hpines
+** Support routines for equlizer demod version now upgraded to Integration status
+**
+** Revision 1.1 1999-05-04 14:54:28-07 whuang
+** Initial revision
+**
+** Revision 1.7 1998/12/17 16:59:28 bhehn
+** Added support for deEmphasis of low snr signals. */
+/*
+** Revision 1.6 1998/10/27 21:39:52 bhehn
+** AB & NB eqaulizer verifed.
+** AB ~= 125us, NB ~= 155us.
+**
+** Revision 1.5 1998/10/14 18:43:26 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.4 1998/10/12 15:38:16 bhehn
+** Fixed power computation bug.
+**
+** Revision 1.3 1998/10/09 21:20:35 bhehn
+** Fast version, Not yet versified.
+** AB ~ 125us, NB ~= 110us
+**
+** Revision 1.2 1998/10/09 15:54:00 bhehn
+** Made I/O faster and fixed normEnergy() energyAccum probelm for large signals.
+**
+** Revision 1.1 1998/10/07 15:21:37 bhehn
+** Initial revision
+**
+** Revision 1.4 1998/10/02 17:01:00 bhehn
+** Changed calling routine to be more like c6x implementation.
+** BER matches previous version.
+**
+** Revision 1.3 1998/10/02 15:00:17 bhehn
+** Rounding offset & impulse. Getter much better BER for low level signals.
+**
+** Revision 1.2 1998/10/01 16:37:07 bhehn
+** Fixed matchfilter output saturation problem
+**
+** Revision 1.1 1998/10/01 13:57:00 bhehn
+** Initial revision
+**
+** Revision 1.6 1998/09/22 20:00:35 bhehn
+** Access Burst support added and verified.
+**
+** Revision 1.7 1998/09/21 22:18:59 bhehn
+** <>
+**
+** Revision 1.6 1998/09/21 22:18:35 bhehn
+** <>
+**
+** Revision 1.5 1998/09/21 22:13:47 bhehn
+** Outdated (renamed to '\\Fdi\public\rcs\D\rcs\projects\GSM\Art\demod\demodNBSubC.cxx,v').
+**
+** Revision 1.4 1998/09/21 22:04:22 bhehn
+** NB demod works, BER close to floating
+**
+** Revision 1.4 1998/09/18 20:14:42 bhehn
+** Outdated (renamed to '\\Fdi\public\rcs\D\rcs\projects\GSM\Art\demod\demodSubC.cxx,v').
+***/
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod/DEMTOP.c b/data/mnet/GP10/Dsp/bbdataproc/demod/DEMTOP.c
new file mode 100644
index 0000000..79c1004
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod/DEMTOP.c
@@ -0,0 +1,627 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* File: demtop.c
+*
+* Description:
+* GSM Demodulator top level. Old logs at bottom of file.
+*
+****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "bbproto.h"
+#include "c6xsupport.h"
+#include "dem_globs.h"
+#include "dem_aprotos.h"
+
+#define LOOP_TYPE int
+#define MAX_NUM_LOPASS_FILTER_TAPS 48
+
+Int32 snrZeroCount=0;
+
+/*
+ * GSM Channel Filter (window-based design using Kaiser window in Matlab)
+ * Taps=39 (pad to 40) Cut=80 Stop=93 Amp=1.00, 0.00 Ripple=0.100, 0.020
+ * If changing filter length, may have to adjust MAX_NUM_LOPASS_FILTER_TAPS.
+ * Also remember that sum of coef absolute values must be less than 32768.
+ */
+Int16 g_numLopassTaps = 40;
+Int16 g_loPassTaps[40] = {
+ 0, 30, -90, 47, 86, -156, 34, 186,
+ -233, -26, 349, -311, -176, 620, -379, -535,
+ 1183, -425, -1903, 4546, 10093, 4546, -1903, -425,
+ 1183, -535, -379, 620, -176, -311, 349, -26,
+ -233, 186, 34, -156, 86, 47, -90, 30 };
+
+void firLoPass(short x[], short h[], short y[], int N, int M);
+
+#if TEST == 1
+
+/* I/O File global variables */
+extern FILE *out_file;
+
+void moveStealingBits( t_chanSel chanSel, Word softDec[] );
+
+#endif
+
+
+/*
+** Log table used by mag2DB in demsubs.sa
+**
+*/
+const Short logTable[4] = { 2, 5, 8, 11 }; /* F16.14 */
+
+/*
+** Provide a mechanism for the g_BConsts structure and constants
+** #defined in C to be accessed from assembly code.
+*/
+
+int c_asm_consts[36];
+
+/*
+** This routine must be called once before any routine in
+** demsubs.sa is. Changing burst type doesn't alter the field
+** offsets in t_burstConsts so that is the only time this routine
+** need be called.
+**
+** The order of objects here must match the list of offset names
+** in demsubs.sa. Change one, change the other.
+*/
+
+void initAsmConsts()
+{
+ t_burstConsts t;
+
+ /* offsets to fields within t_burstConsts struct type */
+
+ c_asm_consts[0] = ((char *)&t.tseqBaseAddr) - ((char *)&t);
+ c_asm_consts[1] = ((char *)&t.cirNumTseqBits) - ((char *)&t);
+ c_asm_consts[2] = ((char *)&t.cirNumTseqBitsInv) - ((char *)&t);
+ c_asm_consts[3] = ((char *)&t.impulseTseqOffset) - ((char *)&t);
+ c_asm_consts[4] = ((char *)&t.cirLength) - ((char *)&t);
+ c_asm_consts[5] = ((char *)&t.cirStartIndex) - ((char *)&t);
+ c_asm_consts[6] = ((char *)&t.toaMin) - ((char *)&t);
+ c_asm_consts[7] = ((char *)&t.numBits) - ((char *)&t);
+ c_asm_consts[8] = ((char *)&t.numEncryptBits) - ((char *)&t);
+ c_asm_consts[9] = ((char *)&t.numTailBits) - ((char *)&t);
+
+ /* values of symbols created with #define in C */
+
+ c_asm_consts[10] = OFF_NUM_OFFSET_SAMPS;
+ c_asm_consts[11] = OFF_SHIFT_VAL;
+ c_asm_consts[12] = GSM_NUM_SAMPLES_PER_BURST;
+ c_asm_consts[13] = MAX_CIR_LENGTH;
+ c_asm_consts[14] = CIR_SIZE;
+ c_asm_consts[15] = CIR_BEST_LENGTH;
+ c_asm_consts[16] = WORD_SIZE;
+ c_asm_consts[17] = ACCUM_GUARD_BITS;
+ c_asm_consts[18] = ENERGY_THRESHOLD_PERCENT;
+ c_asm_consts[19] = E_THRESH_FORMAT;
+ c_asm_consts[20] = NB_NUM_ENCRYPT_BITS_PER_SIDE;
+ c_asm_consts[21] = NB_TRAIN_SIZE;
+ c_asm_consts[22] = AB_TRAIN_SIZE;
+ c_asm_consts[23] = TCHF;
+ c_asm_consts[24] = RACH;
+}
+
+void demodulate
+(
+ t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ t_chanSel chanSel,
+ UChar tseqNum,
+ t_ULBurstBuf *demodOut,
+ t_groupNum groupNum,
+ UChar rfCh,
+ UChar timeSlot,
+ UChar subChan
+)
+{
+
+ t_ULCirSamp cir[MAX_CIR_LENGTH]; /* Impulse response */
+ t_ULCirSamp cirTemp[MAX_CIR_LENGTH]; /* Saved Impulse response */
+ LWord energy_L[MAX_CIR_LENGTH]; /* Energy */
+ t_ULCirSamp cirNorm[MAX_CIR_LENGTH]; /* Normalized Cir */
+ Char indexBest; /* Position of the best CIR window */
+ Word3 rho[DELAY_MAX]; /* Autocorr of Cir, used by Viterbi */
+ Short filterSamples[BURST_SIZE_UL_MAX+MAX_NUM_LOPASS_FILTER_TAPS];
+
+ /* Demodulated samples before quantizing */
+ /* See if this could be demodIn->samples to save stack space */
+
+ /* 32bit align the demodSamps array! Required by assembly. */
+ /* new 4/20/99..added +4 to SampInts dimension to avoid stack overflo */
+ Int demodSampInts[(MAX_NUM_BITS_PER_BURST+1+4)/2];
+ Word3 *demodSamps=(Word3 *)demodSampInts;
+
+ UWord2 mantInv; /* 1/mantissa of energySum = mantissa * 2^exponent */
+ Short exponent;
+
+ int i,j; /* used to index arrays */
+
+ /* Set the burst constants pointer to the proper burst */
+ if (chanSel == RACH )
+ {
+ /* Use the access burst constants */
+ g_BConsts_pt = &g_ABConsts;
+ g_burstType = RACH; /* Needed until equal is implemented */
+
+ } else
+ {
+ /* Use the normal burst constants */
+ g_BConsts_pt = &g_NBConsts;
+ /* Change the tseq base address */
+ g_BConsts_pt->tseqBaseAddr = &train_nb[tseqNum][0];
+ g_burstType = TCHF; /* Needed until equal is implemented */
+ }
+
+ initAsmConsts();
+
+ /**************************************************************************
+ *
+ * GSM Demod: main program
+ *
+ **************************************************************************/
+
+ /*
+ **
+ ** Offset compensation + GSM Channel Filtering + Derotation
+ **
+ ** Input data . samples[2][NUM_DATA]
+ **
+ ** Output data . samples[2][NUM_DATA]
+ ** samples have been overwritten by compensated + derotated samples
+ **
+ ** NOTE: For RACH, use the all-carrier DC offset computed during idle frames.
+ ** For SDCCH, use the DC offset computed for that logical channel.
+ ** For TCH, use the DC offset for the time slot containing the TCH.
+ ** For SACCH, use DC offset of its associated TCH or SDCCH.
+ */
+
+ /*--------------------------------------------------------------------
+ * Remove the DC offset specific to this TCH time slot or SDCCH
+ * subchannel. For RACH, use the DC offset computed over idle frames.
+ *--------------------------------------------------------------------*/
+ if ( chanSel == RACH )
+ {
+ removeDCOffset( samples, chanSel, rfCh, NUM_TN_PER_RF + NUM_SDCCH_SUBCHANS );
+ }
+ else if ( groupNum == GSM_GROUP_5 ) /* SDCCH4 or its SACCH */
+ {
+ removeDCOffset( samples, chanSel, rfCh, NUM_TN_PER_RF + subChan );
+ }
+ else if (groupNum == GSM_GROUP_7){
+ removeDCOffset ( samples, chanSel, rfCh, subChan);
+ } else {
+ removeDCOffset( samples, chanSel, rfCh, timeSlot );
+ }
+
+ /*--------------------------------------------------------------------
+ * Apply GSM channel (lowpass) filter to input data
+ *--------------------------------------------------------------------*/
+ j = g_numLopassTaps / 2 ;
+ for ( i = 0; i < j; i++)
+ {
+ filterSamples[i] = 0;
+ filterSamples[i+j+GSM_NUM_SAMPLES_PER_BURST] = 0;
+ }
+
+ /* Filter real part first */
+
+ for ( i = 0; i < GSM_NUM_SAMPLES_PER_BURST; i++)
+ {
+ filterSamples[i+j] = samples[i].I;
+ }
+ firLoPass(filterSamples,g_loPassTaps,&samples[0].I,g_numLopassTaps,GSM_NUM_SAMPLES_PER_BURST);
+
+ /* Filter imaginary part next */
+
+ for ( i = 0; i < GSM_NUM_SAMPLES_PER_BURST; i++)
+ {
+ filterSamples[i+j] = samples[i].Q;
+ }
+ firLoPass(filterSamples,g_loPassTaps,&samples[0].Q,g_numLopassTaps,GSM_NUM_SAMPLES_PER_BURST);
+
+ /*--------------------------------------------------------------------
+ * Derotate samples
+ *--------------------------------------------------------------------*/
+ derotate( samples );
+
+
+ /**********************************************************************
+ **
+ ** Estimate the Channel Impulse Response
+ **
+ ** Input: Derotated Samples - demodIn.samples[2][NUM_DATA]
+ ** Training Sequence - tseq[TRAINING_SIZE]
+ **
+ ** Output: Channel impulse response - cir[CIR_LENGTH]
+ **
+ */
+ impulse( samples, g_BConsts_pt->tseqBaseAddr, cir );
+
+#if TEST_RHO == 1
+ fprintf( out_file, "### Impulse Response ###\n");
+ for ( i = 0; i < g_BConsts_pt->cirLength; i++)
+ {
+ fprintf( out_file, "%2.10f\n", WORD_2F( cir[i].I ));
+ fprintf( out_file, "%2.10f\n", WORD_2F( cir[i].Q ));
+ }
+#endif
+
+ /**********************************************************************
+ **
+ ** Compute the energy of the impulse response
+ ** and try to find the best energy window of length CIR_SIZE
+ **
+ ** Input data:
+ ** - The channel impulse response : cir[CIR_LENGTH]
+ **
+ ** Output data:
+ ** - Energy of the impulse response : energy_L[CIR_LENGTH]
+ ** - Position of the best CIR window : indexBest
+ **
+ */
+ indexBest = Energy( cir, energy_L );
+
+#if TEST_RHO == 1
+ fprintf( out_file, "### Energy of CIR ###\n");
+ for ( i = 0; i < g_BConsts_pt->cirLength; i++)
+ {
+ fprintf( out_file, "%2.10f\n", LONG_2F(energy_L[i]) );
+ }
+#endif
+
+ /**********************************************************************
+ **
+ ** normEnergy :
+ ** ---------
+ ** Clear lowest energies of the window found in Energy()
+ ** and we compute the sum of the energies of this window
+ ** and split it into mantissa * 2^exponent
+ **
+ ** Input data: - Derotated samples : samples[2][NUM_DATA]
+ ** - Channel impulse response : cir[CIR_LENGTH
+ ** - Energy of the impulse response : energy_L[CIR_LENGTH]
+ ** - Position of the best .. : indexBest
+ ** - cirWindowStart, startinf position
+ **
+ ** Output data: - Cleared Cir : cir[CIR_LENGTH]
+ ** - First non zero Cir (or begin of the burst) : bob
+ ** - average power in dB: power
+ ** - exponent
+ **
+ ** Returned data : mantInv = 1/Mantissa, (1 < mantInv <= 2)
+ **
+ **
+ */
+ mantInv = normEnergy
+ (
+ samples,
+ cir,
+ cirTemp,
+ energy_L,
+ indexBest,
+ &demodOut->toa,
+ &demodOut->rcvPower,
+ &exponent
+ );
+
+ /*--------------------------------------------------------------------
+ * Modify received power: (1) divide by 4 to convert from 0.25-dB to
+ * 1-dB steps, (2) add 6 dB to compensate for GSM channel filter
+ *--------------------------------------------------------------------*/
+ demodOut->rcvPower = (demodOut->rcvPower >> 2) + 6;
+
+#if TEST_POWER == 1
+ fprintf( out_file, "### Power ###\n");
+ fprintf( out_file, "%2.4f\n", WORD14_2F( demodOut->rcvPower) );
+#endif
+
+
+ /**********************************************************************
+ **
+ ** normCir()
+ ** ---------
+ **
+ ** We normalize the value of Cir ( Cir / Mantissa ).
+ **
+ **
+ ** Input data:
+ ** - Channel impulse response : ir[CIR_LENGTH]
+ ** - 1/Mantissa : mantInv
+ ** - Position of the best CIR window : indexBest
+ **
+ ** Output data:
+ ** - Normalized channel impulse response : cirNorm[CIR_SIZE]
+ **
+ */
+ normCir( cir, mantInv, indexBest, cirNorm );
+
+
+ /**********************************************************************
+ **
+ ** calcRho() :
+ ** -------
+ ** Compute the autocorrelation of the Cir with normCir.
+ ** calcRho will be used for the VITERBI algorithm as the real channel response.
+ **
+ ** Input data: - Channel impulse response : cir[CIR_LENGTH]
+ ** - Normalized channel impulse resp. : normCir[CIR_SIZE]
+ ** - index of the best CIR window : indexBest
+ ** - Exponent of the normalized energy : exponent
+ **
+ ** Ouput data: - Autocorrelation of the Cir : rho[DELAY_MAX]
+ **
+ */
+ calcRho( cir, cirNorm, indexBest, exponent, rho );
+
+#if TEST_RHO == 1
+ fprintf( out_file, "### rho ###\n");
+ for ( i = 0; i < CIR_BEST_LENGTH - 1; i++)
+ {
+ fprintf( out_file, "%2.8f\n", WORD3_2F( rho[i] ));
+ }
+#endif
+
+/* NEW 3/23/99...SINCE CANNOT MAKE THESE MODS IN FLYNN'S DEMSUBS */
+
+ for ( i = 0; i < 4; i++)
+ {
+ rho[i] = rho[i] >> 5;
+ }
+
+ /**********************************************************************
+ **
+ ** matchFilter()
+ ** -------------
+ **
+ ** Compute matched filter for the burst.
+ **
+ ** Input data: - Derotated samples : demodIn.samples[NUM_DATA]
+ ** - Normalized channel impulse response : NCir[CIR_SIZE]
+ ** - Position of the first data to compute : indexBest+TAIL
+ ** - Exponent of the normalized energy : Exponent
+ ** - Number of data to compute : 142
+ **
+ ** Ouput data: -Demodulated burst : demodOut.softDec[BITS_PER_BURST]
+ **
+ */
+ matchFilter( samples,
+ cirNorm,
+ indexBest,
+ exponent,
+ demodSamps );
+
+#if TEST_MATCHO == 1
+ fprintf( out_file, "### Matcho after Matched() ###\n");
+ for ( i = 0; i < g_BConsts_pt->numBits; i++)
+ {
+ fprintf( out_file, "%2.4f\n", WORD3_2F( demodSamps[i] ) );
+ }
+#endif
+
+ /*
+ ** Compute the quality metric for this burst.
+ */
+ demodOut->snr = computeSNR( &demodSamps[g_BConsts_pt->tseqStart],chanSel );
+
+ /*
+ *---The two loops below are the only MIPS consumers in this file----
+ */
+
+/* NEW 3/23/99...SINCE CANNOT MAKE THESE MODS IN FLYNN'S DEMSUBS */
+
+ for ( i = 0; i < g_BConsts_pt->numBits; i++)
+ {
+ demodSamps[i] = demodSamps[i] >> 5;
+ }
+
+ if(demodOut->snr <= 4)
+ {
+ snrZeroCount++;
+ for ( i = 0; i < g_BConsts_pt->numBits; i++)
+ {
+ demodSamps[i] = demodSamps[i] * -1;
+ }
+ }
+
+ /**********************************************************************
+ **
+ ** equalize()
+ ** ----------
+ **
+ ** This function will equalize the burst.
+ **
+ **
+ ** Input data:
+ ** - Demodulated burst : demodOut.softDec[BURST_MATCH]
+ ** - Autocorrelation of the Cir : Rho[delay_l]
+ ** - Address of the Training sequence
+ **
+ ** Output data:
+ ** - Corrected burst : demodOut.softDec[BURST_MATCH]
+ **
+ */
+/* equalize(demodSamps, rho, g_BConsts_pt->tseqBaseAddr); */
+ equalize(&demodSamps[0], rho, g_BConsts_pt->tseqBaseAddr,chanSel);
+
+ /*
+ ** Compute the post equalized quality metric for this burst.
+ */
+ if( chanSel == RACH )
+ demodOut->snr = computeSNR( &demodSamps[AB_NUM_ENCRYPT_BITS_PER_BURST],chanSel );
+
+#if TEST_EQUALIZE == 1
+ fprintf( out_file, "### Matcho after Equalize ###\n");
+ for ( i = 0; i < g_BConsts_pt->numBits; i++)
+ {
+ fprintf( out_file, "%2.4f\n", WORD3_2F( demodSamps[i] ) );
+ }
+#endif
+
+ /**********************************************************************
+ **
+ ** deEmph()
+ ** --------
+ **
+ ** deemphasize bursts with poor quality.
+ ** This will reduce the impact of poor
+ ** quality bursts on the decoder.
+ **
+ ** Input data:
+ ** - Soft Decisions of encrypted bits : softDec[NUM_ENCRYPT_BITS]
+ ** - Address of the Training sequence
+ ** - Burst Quality Metric (snr)
+ **
+ ** Output data:
+ ** - deemphasized burst : softDec[NUM_ENCRYPT_BITS]
+ **
+ */
+ deEmph( chanSel,
+ &demodSamps[0],
+ g_BConsts_pt->tseqBaseAddr,
+ demodOut->snr);
+
+#if TEST == 1
+ moveStealingBits( chanSel, &demodSamps[0] );
+#endif
+
+#if TEST_SNR == 1
+ fprintf( out_file, "### snr ###\n");
+ fprintf( out_file, "%2.4f\n", (float) demodOut->snr);
+#endif
+
+ /*
+ ** quantize()
+ ** ----------
+ ** Quantization of the soft-decisions to save memory and to
+ ** be compatable with the decoder input.
+ **
+ ** Input data:
+ ** - Soft Decisions, demodSamps[BURST_MATCH]
+ **
+ ** Output data - Weighted Soft Decsions : demodOut.softDec[BURST_MATCH]
+ **
+ */
+ quantize( &demodSamps[0], &demodOut->data[0] );
+
+#if TEST_QUANT_SDP == 1
+ fprintf( out_file, "### Matcho after Quantize ###\n");
+ for ( i = 0; i < g_BConsts_pt->numDataBits; i++)
+ {
+ fprintf( out_file, "%2.4f\n", (float) demodOut->data[i]);
+ }
+#endif
+
+}
+
+#if TEST == 1
+/***************************************************************************
+* moveStealingBits()
+* ----------------
+*
+* This will move the stealing bits to the end of the burst for
+* normal bursts only.
+*
+* This is for comparison with the other demods.
+***************************************************************************/
+void moveStealingBits( t_chanSel chanSel, Word softDec[] )
+{
+ int i;
+ Word hu, hl;
+
+ /*
+ * Move the hu/hl bits to the end
+ * if this is a normal burst
+ */
+ if( chanSel != RACH )
+ {
+ hu = softDec[NB_NUM_ENCRYPT_BITS_PER_SIDE-1];
+ hl = softDec[NB_NUM_ENCRYPT_BITS_PER_SIDE];
+ for( i = 0; i < NB_NUM_ENCRYPT_BITS_PER_SIDE-2; i++ )
+ {
+ softDec[i+NB_NUM_ENCRYPT_BITS_PER_SIDE-1] = \
+ softDec[i+NB_NUM_ENCRYPT_BITS_PER_SIDE+1];
+ }
+ softDec[NB_NUM_ENCRYPT_BITS_PER_BURST-2] = hl;
+ softDec[NB_NUM_ENCRYPT_BITS_PER_BURST-1] = hu;
+ }
+}
+#endif
+
+
+/************************** Old revision log ****************************************
+**
+** Revision 1.12 2000-01-25 18:52:01-08 dkaiser
+** Works with new demodc.c. Just a comment change.
+**
+** Revision 1.9 1999-10-27 13:34:41-07 dkaiser
+** added new parameters to demodulate function call
+** new logic to control which DC offset value is used with each logical channel
+**
+** Revision 1.8 1999-10-18 18:52:20-07 hpines
+** Added enhanced RACH detection test..call computeSNR over 41 RACH training sequence bits.
+**
+** Revision 1.7 1999-10-06 17:01:11-07 dkaiser
+** Added rfCh input param to OffsetDerot function. Later, we need to pass rfCh into Demodulate function, which means changing bbproto.h, pagch.c, sacch.c, sdcch.c and tch.c
+**
+** Revision 1.6 1999-09-23 11:38:03-07 dkaiser
+** removed offsetDerot, moved to demodc.c
+** added channel parameter to computeSNR
+**
+** Revision 1.5 1999-07-14 16:25:49-07 hpines
+** Updated equalizer demod version:
+** 1. Fixed dc offset routine by using C-version instead optimized assembly code.
+** 2. uses snr to search for frame sign inversion
+**
+** Revision 1.4 1999-05-05 14:18:23-07 whuang
+** corrected Power meseament(in dB)
+**
+** Revision 1.3 1999-05-03 11:53:41-07 whuang
+** Added Viterbi equalizer function
+**
+** Revision 1.1 1999-02-24 15:16:53-08 whuang
+** Initial revision
+**
+**
+** Rev 1.0 Oct 27 1998 16:19:34 Administrator
+** Checked in from initial workfile by PVCS Version Manager Project Assistant.
+**
+** Rev 1.0 Oct 23 1998 17:56:08 Administrator
+** Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.6 1998/10/14 18:43:26 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.5 1998/10/09 21:20:36 bhehn
+** Fast version, Not yet versified.
+** AB ~ 125us, NB ~= 110us
+**
+** Revision 1.4 1998/10/07 15:21:32 bhehn
+** One Access Burst verifies. testfile.fixin is the input testfile.c6x is the output.
+**
+** Revision 1.3 1998/10/02 17:01:00 bhehn
+** Changed calling routine to be more like c6x implementation.
+** BER matches previous version.
+**
+** Revision 1.2 1998/10/01 16:37:07 bhehn
+** Fixed matchfilter output saturation problem
+**
+** Revision 1.1 1998/10/01 13:57:00 bhehn
+** Initial revision
+**
+** Revision 1.4 1998/09/22 20:00:36 bhehn
+** Access Burst support added and verified.
+**
+** Revision 1.2 1998/09/21 22:04:22 bhehn
+** NB demod works, BER close to floating
+**
+** Revision 1.2 1998/09/18 20:15:05 bhehn
+** Outdated (renamed to '\\Fdi\public\rcs\D\rcs\projects\GSM\Art\demod\demodTop.cxx,v').
+*/
+
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod/c6xsupport.h b/data/mnet/GP10/Dsp/bbdataproc/demod/c6xsupport.h
new file mode 100644
index 0000000..9f2ed6a
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod/c6xsupport.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: c6xsupport.h
+*
+* Description:
+* This file contains C6x macros
+*
+******************************************************************************/
+#ifndef _C6XSUPPORT_H
+#define _C6XSUPPORT_H /* include once only */
+
+#include "dem_globs.h"
+
+/*
+* Define a signed shift macro
+* ANSI C does not support this but A|RT & TI do.
+*/
+/* signed left shift */
+#define SSHIFTL( _x, _sft) ( (_sft) > 0 ? (_x) << (_sft) : (_x) >> -(_sft) )
+/* signed right shift */
+#define SSHIFTR( _x, _sft) ( (_sft) > 0 ? (_x) >> (_sft) : (_x) << -(_sft) )
+
+
+/*
+* Used to set the arithmetic saturation mode
+* Examples:
+* c = a + b; // Unsaturated
+* c = SAT( a+b ); // Saturated
+*
+* SAT typically needs to be used only if the input data
+* energy has an "exponent" of 0. This means that the
+* input samples will range from -1 to 1-precision
+*/
+/*#define SAT(x) oqc( x, fxpOqc::saturated() )
+********************************************************************/
+#define SAT_LONG(z) ( _sat(z) )
+
+#define SAT_WORD(_arg) ( SAT_LONG( ((long) _arg) << 16 ) >> 16 )
+
+
+/************************************************************
+** Intrinsic Macros
+**
+** these may need to be ported to subroutines to make completely
+** compatable with the C6x intrinsics operation.
+*************************************************************/
+/*
+* define a multiply that takes two Words (16 bits)
+* multipies them, shifts by one and saturates
+*
+* TI 6X equivelent #define SMPY(x,y) (_smpy( x, y ))
+*/
+#define SMPY(x,y) ( _smpy(x, y ) )
+/*
+* define a C equiv for the C6c EXTU() intrinsic
+*/
+#define EXTU(src2,cst1,cst2) ( ( (src2)<<(cst1) )>>(cst2) )
+#define EXT(src2,cst1,cst2) ( (int)( (src2)<<(cst1) )>>(cst2) )
+
+
+/*
+* NORM returns the number bits to the left of the sign bit
+* for a "int" (32 bits)
+* For positive values this is 2*WORD_SIZE - (log2 + 2)
+*/
+#define NORM(z) ( _norm(z) )
+/*
+* LNORM returns the number bits to the left of the sign bit
+* for a "long" (40 bits)
+* For positive values this is 2*WORD_SIZE+ACCUM_GUARD_BITS - (log2 + 2)
+*/
+#define LNORM(z) ( _lnorm( z ) )
+
+/*
+* log2(x) = log10(x)*3.3219, log10(x) = log2(x)*0.301
+* log2 returns the number of bits to the left of the msbit
+*/
+#define LOG2(z) ( 2*WORD_SIZE - NORM(z) )
+
+
+#endif /* end of include once only */
+
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod/dem_aprotos.h b/data/mnet/GP10/Dsp/bbdataproc/demod/dem_aprotos.h
new file mode 100644
index 0000000..61d6b74
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod/dem_aprotos.h
@@ -0,0 +1,178 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+** File: dem_aprotos.h
+**
+** Description:
+** GSM Demod Prototypes for A|RT library implentation
+** Note: Old revision log is at the end of this file.
+**
+*****************************************************************************/
+#ifndef DEM_PROTOS_H
+#define DEM_PROTOS_H /* include once only */
+
+#include "gsmtypes.h"
+
+typedef t_ULComplexSamp t_ULCirSamp;
+
+void offsetDerot
+(
+ t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ Word threshold
+);
+
+void impulse
+(
+ t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ const t_TseqWord tseq[MAX_TSEQ_SIZE],
+ t_ULCirSamp cir[MAX_CIR_LENGTH]
+);
+
+Char Energy
+(
+ t_ULCirSamp cir[MAX_CIR_LENGTH],
+ LWord leng[MAX_CIR_LENGTH]
+);
+
+void normCir
+(
+ t_ULCirSamp cir[MAX_CIR_LENGTH],
+ UWord2 mantInv,
+ Char index,
+ t_ULCirSamp cirNorm[MAX_CIR_LENGTH]
+);
+
+void calcRho
+(
+ t_ULCirSamp cir[MAX_CIR_LENGTH],
+ t_ULCirSamp cirNorm[MAX_CIR_LENGTH],
+ Char index,
+ Short exponent,
+ Word3 rho[CIR_BEST_LENGTH-1]
+);
+
+void matchFilter
+(
+ t_ULComplexSamp data[BURST_SIZE_UL_MAX],
+ t_ULCirSamp cirNorm[MAX_CIR_LENGTH],
+ Char index,
+ Short exponent,
+ Word3 output[NB_MATCH]
+);
+
+void deEmph( t_chanSel chanSel,
+ Word softDec[],
+ const t_TseqWord tseq[],
+ Word snr);
+
+Word computeSNR( Word data[NB_TRAIN_SIZE],t_chanSel chanSel);
+
+void quantize
+(
+ Word demodSamps[],
+ Char softDec[]
+);
+
+void equalize (Word matcho[BURST_MATCH],
+ Word rho[CIR_BEST_LENGTH-1],
+ const t_TseqWord tseq[],
+ t_chanSel chanSel);
+
+extern void viteq( SInt numBits,
+ Short newMetsPtr[],
+ Short oldMetsPtr[],
+ Short data[],
+ Short probs[],
+ Short *stateTranTbl );
+
+extern UVLWord energyAccumed
+(
+ t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ Char indexBest
+);
+
+extern UVLWord thresholdCir
+(
+ UVLWord energyAccum,
+ Char indexBest,
+ t_ULCirSamp cir[MAX_CIR_LENGTH],
+ t_ULCirSamp tempCir[CIR_SIZE],
+ LWord2 energy_L[MAX_CIR_LENGTH],
+ Word *toa
+);
+
+UWord2 normEnergy
+(
+ t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ t_ULCirSamp cir[MAX_CIR_LENGTH],
+ t_ULCirSamp cirTemp[MAX_CIR_LENGTH],
+ LWord energy_L[MAX_CIR_LENGTH],
+ Char indexBest,
+ Word *bob,
+ Word *power,
+ Short *exponent
+);
+
+Word expX
+(
+ UVLWord data,
+ Word *exponent
+);
+
+Word14 mag2DB
+(
+ UVLWord mag
+);
+
+/* demodc.c */
+void removeDCOffset (t_ULComplexSamp samples[], t_chanSel chanSel, Uint8 rfCh, Uint8 index);
+void derotate (t_ULComplexSamp samples[]);
+
+
+#endif /* end of include once only */
+
+
+/********************* Old revision log *****************************
+**
+** Revision 1.6 1999/09/23 18:38:37 dkaiser
+** added channel type to computSNR (Howard)
+**
+** Revision 1.5 1999-07-14 16:32:46-07 hpines
+** header files to support Equalizer version of demod routines
+**
+** Revision 1.3 1999-05-04 14:29:28-07 whuang
+** <>
+**
+** Revision 1.1 1999-02-24 15:16:50-08 whuang
+** Initial revision
+**
+** Revision 1.1 1999-01-07 14:30:25-08 randyt
+** Initial revision
+**
+ *
+ * Rev 1.0 Oct 27 1998 16:19:34 Administrator
+ * Checked in from initial workfile by PVCS Version Manrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.2 1998/10/14 18:43:28 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.1 1998/10/07 15:21:37 bhehn
+** Initial revision
+**
+** Revision 1.3 1998/10/02 17:01:01 bhehn
+** Changed calling routine to be more like c6x implementation.
+** BER matches previous version.
+**
+** Revision 1.2 1998/10/01 16:37:0558 bhehn
+** Initial revision
+**
+** Revision 1.3 1998/09/22 20:00:38 bhehn
+** Access Burst support added and verified.
+**
+** Revision 1.2 1998/09/21 22:04:24 bhehn
+** NB demod works, BER close to floating
+**/
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod/dem_const.h b/data/mnet/GP10/Dsp/bbdataproc/demod/dem_const.h
new file mode 100644
index 0000000..59d4203
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod/dem_const.h
@@ -0,0 +1,280 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* File: dem_const.h
+*
+* Description:
+* GSM Demod Constants for A|RT library implentation
+*
+*****************************************************************************/
+#ifndef _DEM_CONST_H
+#define _DEM_CONST_H /* include once only */
+
+#include "bbtypes.h"
+
+/*
+* Compile the hard decision viterbi (1)
+* or the soft dec viterbi (0)
+*/
+#define HARD_DEC_VIT (0)
+
+/*
+* Compilation Flags
+* These TEST FLAGS will output data to a file so
+* that it can be compared to others versions.
+*/
+
+#define TEST 0
+#define TEST_RHO TEST
+#define TEST_POWER TEST
+#define TEST_MATCHO TEST
+#define TEST_EQUALIZE TEST
+#define TEST_SNR TEST
+#define TEST_QUANT_SDP TEST
+
+/* These next 2 should normally be 0 */
+#define TEST_PATH_SD 0
+#define TEST_METRICS 0
+
+/***************************************************************************
+* CONSTANTS
+****************************************************************************/
+
+/*
+* Define the number of samples per burst
+* in the input files. This is the *.dsp file
+*/
+#define NUM_INPUT_SAMPLES_PER_BURST 160
+
+/*
+** Define the number of samples in the burst
+** rounded down.
+** floor(156.25) = 156
+*/
+#define GSM_NUM_SAMPLES_PER_BURST 156
+
+
+/* Threshold value used in offset compensation */
+/* Can not be 1.0 because fixed point can't represent it. */
+/* #define DC_OFFSET_THRESHOLD (0.999) in floating point */
+#define DC_OFFSET_THRESHOLD ( (1 << WORD_SIZE-1)-1 )
+
+/*
+* Define constants for the bursts
+*
+* Normal Burst
+* -----------------------------------------------------------
+* |TB=3| DATA = 58 | TSEQ = 26 | DATA = 58 |TB=3|GP=8.25|
+* -----------------------------------------------------------
+*
+* Access Burst
+* -----------------------------------------------------------
+* |TB=8| TSEQ = 41 | DATA = 36 |TB=3| GP=68.25 |
+* -----------------------------------------------------------
+*
+* Sync Burst
+* -----------------------------------------------------------
+* |TB=3| DATA = 39| TSEQ = 64 | DATA = 39 |TB=3|GP=8.25|
+* -----------------------------------------------------------
+*/
+#define NB_NUM_SAMPLES 160
+#define AB_NUM_SAMPLES 200
+#define SB_NUM_SAMPLES 200
+
+#define NB_NUM_DATA ((NB_NUM_SAMPLES/4)*4)
+#define AB_NUM_DATA ((AB_NUM_SAMPLES/4)*4)
+#define SB_NUM_DATA ((SB_NUM_SAMPLES/4)*4)
+#define MAX_NUM_DATA AB_NUM_DATA
+
+
+/* Define the number of bits in the burst less tail and guard bits */
+#define NB_NUM_BITS_PER_BURST (NB_NUM_ENCRYPT_BITS_PER_BURST + NB_TRAIN_SIZE)
+#define AB_NUM_BITS_PER_BURST (AB_NUM_ENCRYPT_BITS_PER_BURST + AB_TRAIN_SIZE)
+/* Define the maximum number of valid bits in a burst */
+/* This is the normal burst case, the AB has a lot */
+/* more guard bits. */
+#define MAX_NUM_BITS_PER_BURST (NB_NUM_BITS_PER_BURST)
+
+#define NB_TRAIN_START (NB_NUM_ENCRYPT_BITS_PER_SIDE)
+#define AB_TRAIN_START (0)
+#define SB_TRAIN_START (SB_NUM_ENCRYPT_BITS_PER_SIDE)
+
+/*
+* CIR_NUM_TSEQ_BITS: Number of training sequence samples to
+* correlate with.
+* Also, define the max number of bits needed for CIR_NUM_TSEQ_BITS
+* CIR_NUM_TSEQ_BITS max is 64 (SB) + an offset (<10) so
+* 7 bits are needed.
+*/
+#define NB_CIR_NUM_TSEQ_BITS 16
+#define SB_CIR_NUM_TSEQ_BITS SB_TRAIN_SIZE
+#define AB_CIR_NUM_TSEQ_BITS AB_TRAIN_SIZE
+
+/*
+* OFFSET is the offset into the Tseq to where the CIR_NUM_TSEQ_BITS
+* will start from.
+* The ideal CIR is shown below for the +/- tseq values starting at the offset:
+*
+* OFFSET
+* |
+* cir value 0 0 0 16 0 0 0 0 0 0
+* index 0 1 2 3 4 5 6 7 8 9
+* ^ ^
+* | |
+* toaMin toaMax
+* |<- ->| - CIR_BEST_LENGTH
+* |<- CIR_LENGTH ->|
+*
+*/
+#define NB_IMPULSE_TSEQ_OFFSET (3)
+#define NB_TOA_MIN (-2)
+#define NB_TOA_MAX (2)
+#define CIR_BEST_LENGTH (5)
+
+/*
+* The AB does not need a negative TOA.
+* Therefore, offset and TOA_MIN are zero
+*/
+#define AB_IMPULSE_TSEQ_OFFSET (0)
+#define AB_TOA_MIN (0)
+#define AB_TOA_MAX (64)
+
+
+
+#define BURST_START 3
+#define CIR_SIZE 5
+
+/*
+* CIR_LENGTH: Channel Impulse Response Window Length
+* NB is finely syncronized so the window does not have to very large
+* SB the mobile is aquiring the BS timing so this needs to be fairly large
+* AB the BS is aquiring the MS timing so this needs to be fairly large
+*/
+#define NB_CIR_LENGTH (CIR_BEST_LENGTH + NB_TOA_MAX - NB_TOA_MIN)
+#define AB_CIR_LENGTH 64
+#define SB_CIR_LENGTH 50
+
+/* Define the maximum that the CIR length can be */
+/* This is the AB case */
+#define MAX_CIR_LENGTH AB_CIR_LENGTH
+
+/*
+* Define the position in the data where the CIR calculation begins
+*/
+#define NB_CIR_START_INDEX (NB_NUM_TAIL_BITS + NB_NUM_ENCRYPT_BITS_PER_SIDE \
+ + NB_IMPULSE_TSEQ_OFFSET + NB_TOA_MIN)
+
+#define AB_CIR_START_INDEX (AB_NUM_TAIL_BITS)
+/*#define SB_CIR_WINDOW_START (TAIL + SB_NUM_DATA_BITS_PER_SIDE) */
+
+
+
+
+
+#define NUM_CHOICE (NB_CIR_LENGTH - CIR_SIZE + 1)
+#define NB_MATCH 32
+#define C_USED_SAMPLE (MAX_BITS_PER_BURST + (CIR_SIZE-1) + (NB_CHOICE-1) )
+
+
+/*
+** offsetDerot() related constants
+**
+** Define the number of samples over which to calc the offset
+** make it a power of two so that no shifting is needed.
+**
+** NUM_OFFSET_SAMPS = number of samples to compute the offset over.
+** It is not 157 (number of samples in a burst) to make
+** the scaling easier
+*
+** Get the log2 to determine how many bits are needed to represent
+** the number. Note log2(128)=7
+** However, it takes log2(128)+1 bits to represent 128.
+** And ceil(log2(7)) = 3
+*/
+#define OFF_NUM_OFFSET_SAMPS (128)
+#define OFF_NUM_OFFSET_SAMPS_LOG2 (7)
+/* Need the number of bits needed to represent NUM_OFFSET_SAMPS_LOG2 */
+#define OFF_NUM_OFFSET_SAMPS_LOG2_BITS (3)
+
+/* The type for the i value in offset comp */
+/* #define OFF_I_TYPE Uint<OFF_NUM_OFFSET_SAMPS_LOG2+1> */
+#define OFF_I_TYPE UChar
+
+/*
+** To scale the accum data we need to divide by 128 or shift by 7 (2^7 =128)
+** Number of bits that can represent the shift value, 7 (0b111) can be represented by 3 bits
+*/
+/*#define OFF_SHIFT_VAL (Uint<OFF_NUM_OFFSET_SAMPS_LOG2_BITS> (OFF_NUM_OFFSET_SAMPS_LOG2))*/
+#define OFF_SHIFT_VAL (OFF_NUM_OFFSET_SAMPS_LOG2)
+
+/*
+** ENERGY_THRESHOLD_PERCENT is the percentage of the total energy that
+** each energy element must be greater then else it will be cleared out
+**
+** It is in the format F8.8
+**
+** Ex: 0.05 ~= (1<<8)*0.05 ~= 13 = 0.05078
+**
+** Use format F8.8 so that the result will go into the gaurd bits
+** without overflowing
+*/
+#define ENERGY_THRESHOLD_PERCENT (13)
+/* Define the format for the energy threshold (F8.8) */
+#define E_THRESH_FORMAT (8)
+
+/* For Equalizer */
+#define DELAY_MAX 4
+#define NUM_STATES (1 << DELAY_MAX)
+#define BURST_MATCH (MAX_NUM_BITS_PER_BURST + DELAY_MAX + 2)
+
+/*
+* Compute 1.0/mantissa
+* "one" can not be represented in fixed point
+* so approximate it by "1 - word precision"
+*/
+//#define ONE_MINUS_PRECISION (1.0 - 1.0 / (float) (1 << (WORD_SIZE-1)) )
+#define ONE_MINUS_PRECISION ( ( 1<<(WORD_SIZE-1) )-1 )
+
+
+#endif /* end of include once only */
+
+
+/*************** Old revision log *************************
+**
+** Revision 1.3 1999-11-03 18:04:40-08 hpines
+** Restored constant NB_CIR_LENGTH to original Frontier value = 9.
+**
+** Revision 1.2 1999-05-03 11:53:42-07 whuang
+** Added Viterbi equalizer function
+**
+** Revision 1.7 1998/12/17 16:59:29 bhehn
+** Added support for deEmphasis of low snr signals.
+**
+** Revision 1.6 1998/10/27 21:39:53 bhehn
+** AB & NB eqaulizer verifed.
+** AB ~= 125us, NB ~= 155us.
+**
+** Revision 1.5 1998/10/14 18:46:30 bhehn
+** TEST mode = 0.
+**
+** Revision 1.4 1998/10/14 18:43:27 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.3 1998/10/12 15:39:47 bhehn
+** TEST mode on as default for testing
+**
+** Revision 1.1 1998/10/07 15:21:35 bhehn
+** Initial revision
+**
+** Revision 1.1 1998/10/01 13:56:58 bhehn
+** Initial revision
+**
+** Revision 1.3 1998/09/22 20:00:37 bhehn
+** Access Burst support added and verified.
+**
+** Revision 1.2 1998/09/21 22:04:23 bhehn
+** NB demod works, BER close to floating
+**/
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod/dem_globs.h b/data/mnet/GP10/Dsp/bbdataproc/demod/dem_globs.h
new file mode 100644
index 0000000..5ee7da0
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod/dem_globs.h
@@ -0,0 +1,253 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* File: dem_globs.h
+*
+* Description:
+* GSM Demod Globals & types. Old revision log at end of file.
+*
+* NOTE: INGLOB and EXGLOB specify internal and external DSP memory
+* allocation, respectively. They are defined in dsptypes.h
+* and included here through bbtypes.h.
+*
+*****************************************************************************/
+#ifndef _DEM_GLOBS_H
+#define _DEM_GLOBS_H /* include once only */
+
+#include "dem_const.h"
+
+/* Define the wordlength of the data */
+#define WORD_SIZE (16)
+#define ACCUM_GUARD_BITS (8)
+
+/* Define some common types */
+
+typedef signed int SInt; /* signed integer */
+typedef Short Word; /* word */
+typedef UShort UWord; /* unsigned word */
+typedef SInt LWord; /* long word */
+typedef UInt ULWord; /* unsigned long word */
+typedef Long VLWord; /* very long word */
+typedef ULong UVLWord; /* unsigned very long word */
+
+/*
+* Define the data types for variables with the decimal point
+* at different places.
+*
+* The number appended to these indicates how many integer bits in
+* the word.
+* For instance, a "Word2" has two integer bits and can be converted
+* to a "Word" (one integer bit) with a right shift on 2-1 = 1
+* A "Wordm3" can be converted to a "Word" by a right shift of -3-1 = -4
+* or a left shift of 4.
+* Note that these types are just reminders of where the decimal point is
+* located, they are all actually of type "Short"
+*
+* x = 1 data bit, S = sign bit, X = xxxx (4 bits)
+*/
+/*typedef Word Word; /* 1 interger bits, Fix<16,16-1> S.xxxXXX */
+typedef Word Word2; /* 2 interger bits, Fix<16,16-2> Sx.xxXXX */
+typedef Word Word3; /* 3 interger bits, Fix<16,16-3> Sxx.xXXX */
+typedef Word Word8; /* 8 interger bits, Fix<16,16-8> SxxxX.XX */
+typedef Word Word14; /* 14 interger bits, Fix<16,16-14> XXXxx.xx*/
+
+typedef Word Wordm3; /* 3 interger bits, Fix<16,16+2> SSS.SSSSxxxXXX*/
+
+typedef UWord UWord2; /* 2 interger bits, UFix<16,16-2> 0xx.xxXXX */
+typedef LWord LWord2; /* 2 interger bits, Fix<32,32-2> Sx.xxXXXXXXX */
+typedef LWord LWord17; /* 17 interger bits, Fix<32,32-17>, 15 fract bits */
+
+/*
+* Define macros that convert data formats to floating point.
+* These are used to output data to a file which will then be
+* compared with other demod implementations.
+*/
+#define WORD_2F(x) ( ((float ) (x)) / (float) (1<<WORD_SIZE-1) )
+#define WORD2_2F(x) ( ((float ) (x)) / (float) (1<<WORD_SIZE-2) )
+#define WORD3_2F(x) ( ((float ) (x)) / (float) (1<<WORD_SIZE-3) )
+#define WORD4_2F(x) ( ((float ) (x)) / (float) (1<<WORD_SIZE-4) )
+#define WORD8_2F(x) ( ((float ) (x)) / (float) (1<<WORD_SIZE-8) )
+#define WORD14_2F(x) ( ((float ) (x)) / (float) (1<<WORD_SIZE-14) )
+#define LONG_2F(x) ( ((double) (x)) / (double) ((1<<2*WORD_SIZE-1)-1) )
+
+/*
+* Define the data type for the equalizer input data
+* 5 bits left of the decimal point are needed,
+* 1 for the sign, 4 for the integer part.
+* 4 integer bits are needed because the data
+* of this type was multiply/accumulated
+* over CIR_SIZE (5) and it was complex (*2).
+* Therefore, this data has a scale of 2*5 = 10.
+* 2^4 = 16 can handle the scale of 10.
+*/
+/* typedef Fix<WORD_SIZE,WORD_SIZE-5> t_EqualData; */
+typedef Word t_EqualData;
+
+/* typedef Uint<7> CIR_NUM_TSEQ_BITS_TYPE; */
+typedef UChar CIR_NUM_TSEQ_BITS_TYPE;
+
+/* Define the max number of bits needed for CIR_LENGTH */
+/* For AB CIR_LENGTH = 64 = 0x1000000 = 7 bits */
+typedef UChar CIR_LENGTH_TYPE;
+
+/*
+* Define the training sequence word length,
+* tseq = -1 or 1 = 2 bits
+*/
+typedef Char t_TseqWord;
+
+
+/*
+** Define a structure that contains all the unique constants for each burst type.
+**
+** NOTE:
+** NB: CIR_NUM_TSEQ_BITS = 16, SB: CIR_NUM_TSEQ_BITS = 64, AB: CIR_NUM_TSEQ_BITS = 41)
+** "cirNumTseqBitsInv" max is 1/16 = 0.0625 = 0b0.0001 so maximize precision.
+** ex: Fix<8,7> would be S.XXXXXX, Fix<8,10> would be S.SSSXXXXXXX
+** where X is a significant digit and S is a sign bit.
+** In this example you could not have Fix<8,11> because of the sign bit.
+**
+** cirWindowStart defines the position that the CIR calculation begins.
+*/
+typedef struct {
+ const t_TseqWord *tseqBaseAddr; /* Training sequences base addrress */
+ const UChar numTseqBits; /* Number of tseq bits in the burst */
+ const CIR_NUM_TSEQ_BITS_TYPE cirNumTseqBits; /* Number of tseq samples to correlate over */
+ const Wordm3 cirNumTseqBitsInv; /* 1.0/CIR_NUM_TSEQ_BITS */
+ const UChar impulseTseqOffset; /* Position of the first tseq bit for CIR calc. */
+ const UChar cirLength; /* Length of the CIR */
+ const UChar cirStartIndex; /* index of first samples to calc CIR over */
+ const Char toaMin; /* Minimum posible time of arrival, relative */
+ const UChar numBits; /* Number of bits in the burst less tail/guard bits*/
+ const UChar numEncryptBits; /* Number of data bits in the burst */
+ /* NB = 58*2, AB = 36 */
+ const UChar numEncryptBitsPerSide; /* Number of data bits on each side of the tseq */
+ const UChar tseqStart; /* starting position of the training sequence */
+ const UChar numTailBits; /* Number of tail bits at the beginning of the burst */
+
+} t_burstConsts;
+
+/*
+** Define structures that have the constants for each burst type
+*/
+#ifdef ALLOCATE_MEMORY_INTERNAL /*-----------------------------------------------*/
+
+const t_TseqWord train_nb[8][26] =
+{
+ { -1, -1, +1, -1, -1, +1, -1, +1, +1, +1, -1, -1, -1,
+ -1, +1, -1, -1, -1, +1, -1, -1, +1, -1, +1, +1, +1 },
+
+ { -1, -1, +1, -1, +1, +1, -1, +1, +1, +1, -1, +1, +1,
+ +1, +1, -1, -1, -1, +1, -1, +1, +1, -1, +1, +1, +1 },
+
+ { -1, +1, -1, -1, -1, -1, +1, +1, +1, -1, +1, +1, +1,
+ -1, +1, -1, -1, +1, -1, -1, -1, -1, +1, +1, +1, -1 },
+
+ { -1, +1, -1, -1, -1, +1, +1, +1, +1, -1, +1, +1, -1,
+ +1, -1, -1, -1, +1, -1, -1, -1, +1, +1, +1, +1, -1 },
+
+ { -1, -1, -1, +1, +1, -1, +1, -1, +1, +1, +1, -1, -1,
+ +1, -1, -1, -1, -1, -1, +1, +1, -1, +1, -1, +1, +1 },
+
+ { -1, +1, -1, -1, +1, +1, +1, -1, +1, -1, +1, +1, -1,
+ -1, -1, -1, -1, +1, -1, -1, +1, +1, +1, -1, +1, -1 },
+
+ { +1, -1, +1, -1, -1, +1, +1, +1, +1, +1, -1, +1, +1,
+ -1, -1, -1, +1, -1, +1, -1, -1, +1, +1, +1, +1, +1 },
+
+ { +1, +1, +1, -1, +1, +1, +1, +1, -1, -1, -1, +1, -1,
+ -1, +1, -1, +1, +1, +1, -1, +1, +1, +1, +1, -1, -1 }
+};
+
+const t_TseqWord train_ab[41] =
+{
+ -1, +1, -1, -1, +1, -1, +1, +1, -1, +1,
+ +1, +1, +1, +1, +1, +1, +1, -1, -1, +1,
+ +1, -1, -1, +1, +1, -1, +1, -1, +1, -1,
+ +1, -1, -1, -1, +1, +1, +1, +1, -1, -1, -1
+};
+
+t_burstConsts g_ABConsts = { &train_ab[0],
+ AB_TRAIN_SIZE,
+ AB_CIR_NUM_TSEQ_BITS,
+ (1<<WORD_SIZE)/AB_CIR_NUM_TSEQ_BITS,
+ AB_IMPULSE_TSEQ_OFFSET,
+ AB_CIR_LENGTH,
+ AB_CIR_START_INDEX,
+ AB_TOA_MIN,
+ AB_NUM_BITS_PER_BURST,
+ AB_NUM_ENCRYPT_BITS_PER_BURST,
+ AB_NUM_ENCRYPT_BITS_PER_BURST,
+ AB_TRAIN_START,
+ AB_NUM_TAIL_BITS
+ };
+
+t_burstConsts g_NBConsts = { &train_nb[0][0],
+ NB_TRAIN_SIZE,
+ NB_CIR_NUM_TSEQ_BITS,
+ (1<<WORD_SIZE)/NB_CIR_NUM_TSEQ_BITS,
+ NB_IMPULSE_TSEQ_OFFSET,
+ NB_CIR_LENGTH,
+ NB_CIR_START_INDEX,
+ NB_TOA_MIN,
+ NB_NUM_BITS_PER_BURST,
+ NB_NUM_ENCRYPT_BITS_PER_BURST,
+ NB_NUM_ENCRYPT_BITS_PER_SIDE,
+ NB_TRAIN_START,
+ NB_NUM_TAIL_BITS
+ };
+
+#else /*----------------------------------------------------------------------*/
+
+extern const t_TseqWord train_nb[8][26];
+extern const t_TseqWord train_ab[41];
+
+extern t_burstConsts g_ABConsts; /* Access burst constants */
+extern t_burstConsts g_NBConsts; /* Normal burst constants */
+
+#endif /*----------------------------------------------------------------------*/
+
+INGLOB t_burstConsts *g_BConsts_pt; /* Pointer to the burst constants */
+INGLOB t_chanSel g_burstType; /* Burst type */
+
+#endif /* end of include once only */
+
+
+/**************** Old revision log ******************
+**
+** Revision 1.3 1999/07/14 23:32:44 hpines
+** header files to support Equalizer version of demod routines
+**
+** Revision 1.2 1999-05-03 11:53:45-07 whuang
+** Added Viterbi equalizer function
+**
+** Revision 1.4 1998/12/17 16:59:29 bhehn
+** Added support for deEmphasis of low snr signals.
+**
+** Revision 1.3 1998/10/27 21:39:54 bhehn
+** AB & NB eqaulizer verifed.
+** AB ~= 125us, NB ~= 155us.
+**
+** Revision 1.2 1998/10/14 18:43:28 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.1 1998/10/07 15:21:36 bhehn
+** Initial revision
+**
+** Revision 1.2 1998/10/02 17:01:01 bhehn
+** Changed calling routine to be more like c6x implementation.
+** BER matches previous version.
+**
+** Revision 1.1 1998/10/01 13:56:58 bhehn
+** Initial revision
+**
+** Revision 1.3 1998/09/22 20:00:37 bhehn
+** Access Burst support added and verified.
+**
+** Revision 1.2 1998/09/21 22:04:24 bhehn
+** NB demod works, BER close to floating
+*/
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod/dem_protos.h b/data/mnet/GP10/Dsp/bbdataproc/demod/dem_protos.h
new file mode 100644
index 0000000..cb9f063
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod/dem_protos.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*
+** GSM Demod Prototypes for A|RT library implentation
+**
+** Revision 1.2 1998/10/14 18:43:28 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.1 1998/10/07 15:21:37 bhehn
+** Initial revision
+**
+** Revision 1.3 1998/10/02 17:01:01 bhehn
+** Changed calling routine to be more like c6x implementation.
+** BER matches previous version.
+**
+** Revision 1.2 1998/10/01 16:37:05 bhehn
+** Fixed matchfilter output saturation problem
+**
+** Revision 1.1 1998/10/01 13:56:58 bhehn
+** Initial revision
+**
+** Revision 1.3 1998/09/22 20:00:38 bhehn
+** Access Burst support added and verified.
+**
+** Revision 1.2 1998/09/21 22:04:24 bhehn
+** NB demod works, BER close to floating
+**
+******************************************************************************/
+#ifndef DEM_PROTOS_H
+#define DEM_PROTOS_H
+
+
+/*void offsetDerot(t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ Word threshold );
+*/
+
+void impulse(t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ const t_TseqWord tseq[MAX_TSEQ_SIZE],
+ Word cir[2][MAX_CIR_LENGTH] );
+
+Char Energy( Word cir[2][MAX_CIR_LENGTH],
+ LWord leng[MAX_CIR_LENGTH] );
+
+UWord2 normEnergy( t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ Word cir[2][MAX_CIR_LENGTH],
+ LWord energy_L[MAX_CIR_LENGTH],
+ Char indexBest,
+ Word *bob,
+ Word *power,
+ Short *exponent);
+
+void normCir( Word cir[2][MAX_CIR_LENGTH],
+ UWord2 mantInv,
+ Char index,
+ Word2 cirNorm[2][MAX_CIR_LENGTH] );
+
+void calcRho( Word cir[2][MAX_CIR_LENGTH],
+ Word2 cirNorm[2][MAX_CIR_LENGTH],
+ Char index,
+ Short exponent,
+ Word3 rho[CIR_BEST_LENGTH-1] );
+
+void matchFilter( t_ULComplexSamp data[BURST_SIZE_UL_MAX],
+ Word2 cirNorm[2][MAX_CIR_LENGTH],
+ Char index,
+ Short exponent,
+ Word3 output[NB_MATCH]);
+
+void weight( Word softDec[],
+ const t_TseqWord tseq[],
+ Word *snr);
+
+void quantize( Word demodSamps[],
+ Char softDec[] );
+
+void equalize (Word matcho[BURST_MATCH],
+ Word rho[CIR_BEST_LENGTH-1],
+ const t_TseqWord tseq[]);
+
+
+#endif
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod/demodSubC.c b/data/mnet/GP10/Dsp/bbdataproc/demod/demodSubC.c
new file mode 100644
index 0000000..d9ba221
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod/demodSubC.c
@@ -0,0 +1,977 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*
+** GSM Demod w/ A|RT Library implemtation
+**
+** This files contains all of the subroutines for the demod
+**
+** $Author: randyt $
+** $Date: 1999/01/07 22:30:23 $
+** $Source: D:\\stageCell\\Dsp\\bbdataproc\\demod\\RCS\\demodSubC.c $
+** $Revision: 1.1 $
+** $Log: demodSubC.c $
+** Revision 1.1 1999/01/07 22:30:23 randyt
+** Initial revision
+**
+ *
+ * Rev 1.0 Oct 27 1998 16:19:34 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+ *
+ * Rev 1.0 Oct 23 1998 17:56:08 Administrator
+ * Checked in from initial workfile by PVCS Version Manager Project Assistant.
+** Revision 1.5 1998/10/14 18:43:26 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.4 1998/10/12 15:38:16 bhehn
+** Fixed power computation bug.
+**
+** Revision 1.3 1998/10/09 21:20:35 bhehn
+** Fast version, Not yet versified.
+** AB ~ 125us, NB ~= 110us
+**
+** Revision 1.2 1998/10/09 15:54:00 bhehn
+** Made I/O faster and fixed normEnergy() energyAccum probelm for large signals.
+**
+** Revision 1.1 1998/10/07 15:21:37 bhehn
+** Initial revision
+**
+** Revision 1.4 1998/10/02 17:01:00 bhehn
+** Changed calling routine to be more like c6x implementation.
+** BER matches previous version.
+**
+** Revision 1.3 1998/10/02 15:00:17 bhehn
+** Rounding offset & impulse. Getter much better BER for low level signals.
+**
+** Revision 1.2 1998/10/01 16:37:07 bhehn
+** Fixed matchfilter output saturation problem
+**
+** Revision 1.1 1998/10/01 13:57:00 bhehn
+** Initial revision
+**
+** Revision 1.6 1998/09/22 20:00:35 bhehn
+** Access Burst support added and verified.
+**
+** Revision 1.7 1998/09/21 22:18:59 bhehn
+** <>
+**
+** Revision 1.6 1998/09/21 22:18:35 bhehn
+** <>
+**
+** Revision 1.5 1998/09/21 22:13:47 bhehn
+** Outdated (renamed to '\\Fdi\public\rcs\D\rcs\projects\GSM\Art\demod\demodNBSubC.cxx,v').
+**
+** Revision 1.4 1998/09/21 22:04:22 bhehn
+** NB demod works, BER close to floating
+**
+** Revision 1.4 1998/09/18 20:14:42 bhehn
+** Outdated (renamed to '\\Fdi\public\rcs\D\rcs\projects\GSM\Art\demod\demodSubC.cxx,v').
+**
+*/
+
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "dsp\dsptypes.h"
+#include "gsmtypes.h"
+#include "bbdata.h"
+#include "bbproto.h"
+
+#include "dem_const.h"
+#include "training.h"
+#include "dem_globs.h"
+#include "dem_protos.h"
+#include "c6xsupport.h"
+
+
+Word expX( UVLWord data, Word *exponent );
+int smpyC( Short x, Short y);
+Word mag2DB( UVLWord mag );
+
+#define LOOP_TYPE int
+
+/*************************************************************************
+*
+* offsetDerot() :
+* -------------
+* Offset computation + Offset compensation + Derotation
+*
+*
+* Input data . samples[2][MAX_NUM_DATA]
+* . threshold (positive number)
+*
+* Output data . samples[2][MAX_NUM_DATA]
+*
+***************************************************************************/
+void offsetDerot( t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ Word threshold)
+
+{
+
+ VLWord offsetI_L, offsetQ_L;
+ Word offsetI, offsetQ;
+ Word temp;
+
+
+ LOOP_TYPE i;
+
+
+ /* Compute the Offset */
+ offsetI_L = 0;
+ offsetQ_L = 0;
+
+ /*
+ ** Do offset compensation on the first NUM_OFFSET_SAMPS bits.
+ ** Using OFF_NUM_OFFSET_SAMPS (not 156) to make scaling easy
+ */
+ for ( i = 0; i < OFF_NUM_OFFSET_SAMPS; ++i)
+ {
+ offsetI_L += samples[i+g_BConsts_pt->numTailBits].I;
+ offsetQ_L += samples[i+g_BConsts_pt->numTailBits].Q;
+ }
+
+ /* Round (add 0.5*OFF_SHIFT_VAL then shift & truncate) */
+ offsetI_L += 1<<(OFF_SHIFT_VAL-1);
+ offsetQ_L += 1<<(OFF_SHIFT_VAL-1);
+
+ /* Divide by OFF_NUM_OFFSET_SAMPS */
+ offsetI = (Word) (offsetI_L >> OFF_SHIFT_VAL); /* Divide by NUM_OFFSET_SAMPS */
+ offsetQ = (Word) (offsetQ_L >> OFF_SHIFT_VAL); /* Divide by NUM_OFFSET_SAMPS */
+
+ /* Compare offset to threshold and saturate if needed */
+ if ( offsetI > threshold)
+ {
+ offsetI = threshold;
+ }
+ if ( offsetI < (Word) (-1) * threshold)
+ {
+ offsetI = (Word) (-1) * threshold ;
+ }
+ if ( offsetQ > threshold)
+ {
+ offsetQ = threshold;
+ }
+ if ( offsetQ < (Word) (-1) * threshold)
+ {
+ offsetQ = (Word) (-1) * threshold ;
+ }
+
+ /*
+ ** DC Offset Compensation & Derotation
+ ** Do the derotation over all of the samples of the burst
+ ** including ending tail bits and gaurd bits.
+ ** Don't need to do the beginning tail bits.
+ ** Need to do the guard bits because we are not sure where the
+ ** burst will arrive.
+ ** Subtract 3 to insure we do not go into the next burst memory area.
+ ** For normal burst numTailBits = 3 so samples 3 to 154 will be changed.
+ ** For access burst numTailBits = 8 so samples 8 to 155 will be changed.
+ **/
+ for( i = g_BConsts_pt->numTailBits; i < (GSM_NUM_SAMPLES_PER_BURST-3); i += (OFF_I_TYPE) 4 )
+ {
+
+ /* Derotate 1st sample */
+ temp = samples[i].I;
+ samples[i].I = SAT_WORD( samples[i].Q - offsetQ );
+ samples[i].Q = SAT_WORD( offsetI - temp );
+
+ /* Derotate 2nd sample */
+ samples[i+1].I = SAT_WORD( offsetI - samples[i+1].I );
+ samples[i+1].Q = SAT_WORD( offsetQ - samples[i+1].Q );
+
+ /* Derotate 3rd sample */
+ temp = samples[i+2].I;
+ samples[i+2].I = SAT_WORD( offsetQ - samples[i+2].Q );
+ samples[i+2].Q = SAT_WORD( temp - offsetI );
+
+ /* Derotate 4th sample */
+ samples[i+3].I = SAT_WORD( samples[i+3].I - offsetI );
+ samples[i+3].Q = SAT_WORD( samples[i+3].Q - offsetQ );
+ }
+
+}
+
+
+/*************************************************************************
+*
+* impulse() :
+* ---------
+* Compute the channel impulse response
+*
+*
+* Input data . Training Sequence : tseq[TRAIN_SIZE]
+* . Derotated Samples : samples[2][MAX_NUM_DATA]
+*
+* Output data . Channel impulse response : cir[2][CIR_LENGTH]
+*
+************************************************************************
+* An illistration of "impulse()" operation is shown below for the NB:
+* NB impulse starts at an "offset" because it is desirable to correlate the tseq bits
+* against what is probably tseq bits of the samples. If the samples were
+* shifted because the mobile moved then the offset of 3 will insure that
+* the correlation is still in the tseq bits. Also, with the diagram below
+* the demod can find toa's from -2 to 2.
+*
+* Assumes: CIR_LENGTH = 9, CIR_NUM_TSEQ_BITS = 16, offset = 3
+* toaMin = -2
+*
+* offset
+* |
+* ----------------------
+* tseq | 3 tseq values 19| MAC
+* ----------------------
+* cirStartIndex
+* |
+* 0 60 61 v
+* i = 0 -----------------------------------------------
+* samples[] | | 62 tseq 78 |
+* ------------------------------------------------
+*
+* i = 2 ---------------------
+* samples[] |63 samples[] 79| MAC
+* ... ---------------------
+* i = 7 ---------------------
+* samples[] |70 samples[] 86| MAC
+* ---------------------
+* <-- CIR_NUM_TSEQ_BITS --->
+* ^
+* |
+* cirStartIndex+CIR_LENGTH
+*
+***************************************************************************/
+void impulse(t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ const t_TseqWord tseq[MAX_TSEQ_SIZE],
+ Word cir[2][MAX_CIR_LENGTH])
+
+{
+ VLWord resultI, resultQ;
+ unsigned char start;
+ unsigned char offset; /* Offset from the tseqPostion to begin processing */
+ LOOP_TYPE i;
+ LOOP_TYPE j;
+
+ LWord result;
+
+
+ offset = g_BConsts_pt->impulseTseqOffset;
+ start = g_BConsts_pt->cirStartIndex;
+
+ /* Compute CIR over the window length */
+ for ( i = 0; i < g_BConsts_pt->cirLength; ++i)
+ {
+ resultI = 0;
+ resultQ = 0;
+
+
+ /* For the number of tseq samples */
+ for ( j = 0; j < g_BConsts_pt->cirNumTseqBits; ++j)
+ {
+ t_TseqWord temp;
+ temp = tseq[j+offset];
+
+ /* Making these intrinsics made things worse */
+ resultI += (VLWord) (samples[start + j + i].I * temp);
+ resultQ += (VLWord) (samples[start + j + i].Q * temp);
+
+ }
+
+ /* Normalize then convert to a Word */
+ resultI = (resultI * g_BConsts_pt->cirNumTseqBitsInv);
+ resultQ = (resultQ * g_BConsts_pt->cirNumTseqBitsInv);
+
+ /* Round (add +/- 0.5*WORD_SIZE then shift & truncate) */
+ resultI += 1<<(WORD_SIZE-1);
+ resultQ += 1<<(WORD_SIZE-1);
+
+ cir[0][i] = (resultI)>>WORD_SIZE;
+ cir[1][i] = (resultQ)>>WORD_SIZE;
+
+ }
+}
+
+
+/*************************************************************************
+*
+* Energy() :
+* --------
+* Compute the energy of the impulse response
+* Find the highest energy window of length CIR_SIZE
+*
+*
+* Input data: The channel impulse response: cir[2][CIR_LENGTH]
+*
+* Output data: Energy of the impulse response: leng[CIR_LENGTH]
+* Position of the best: returned by the function
+*
+***************************************************************************/
+Char Energy( Word cir[2][MAX_CIR_LENGTH], LWord energy_L[MAX_CIR_LENGTH] )
+{
+ VLWord result;
+ VLWord result2;
+ VLWord key;
+ Char indexBest;
+ LOOP_TYPE i;
+
+ /*
+ ** Energy Computation
+ */
+ for ( i = 0; i < g_BConsts_pt->cirLength; ++i) {
+
+ result = SMPY( cir[0][i] , cir[0][i] );
+ result2 = SMPY( cir[1][i] , cir[1][i] ); /* (F16.15 * F16.15) <<1= F32.31 (one sign bits) */
+ energy_L[i] = result + result2; /* F32.31 + F32.31 = F32.31 (one sign bit ) */
+ }
+
+ /*
+ ** Find the highest energy window
+ */
+ key = 0;
+ result = 0;
+ indexBest = 0;
+ /*
+ ** Search over CIR_LENGTH - CIR_SIZE so that the
+ ** search does not exceed energy_L[]'s array bounds
+ */
+ for ( i = 0; i < (g_BConsts_pt->cirLength - CIR_SIZE); ++i) {
+
+ /* VLWord needed here */
+ result += (energy_L[i + CIR_SIZE] - energy_L[i]);
+
+ if ( result >= key ) {
+ key = result;
+ indexBest = i+1 ;
+ }
+ }
+
+ return( indexBest );
+
+}
+
+
+/*************************************************************************
+*
+* normEnergy :
+* ---------
+* Threshold the lowest energies of the window found in Energy()
+* and we compute the sum of the energies of this window
+* and split it into mantissa * 2^exponent
+*
+* Input data: - Derotated samples : samples[2][MAX_NUM_DATA]
+* - Channel impulse response : cir[2][CIR_LENGTH
+* - Energy of the impulse response : energy_L[CIR_LENGTH]
+* - Position of the best .. : indexBest
+*
+* Output data: - Thresholded Cir : cir[2][CIR_LENGTH]
+* - First non zero Cir (or begin of the burst) : toa
+* - average power in dB: power
+* - exponent
+*
+* Returned data : mantInv = 1/Mantissa, (1 < mantInv <= 2)
+*
+*
+* "toa" is returned for measurement reporting only.
+* If "toa" is not equal to indexBest, for many bursts,
+* then this indicates that the mobile should adjust it's
+* timing advance.
+*
+***************************************************************************/
+UWord2 normEnergy(t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ Word cir[2][MAX_CIR_LENGTH],
+ LWord2 energy_L[MAX_CIR_LENGTH],
+ Char indexBest,
+ Word *toa,
+ Word14 *power,
+ Short *exponent)
+{
+
+
+ /* energyAccum & result is used to calculate the power of the burst */
+ UVLWord energyAccum, result;
+ /* energyThresh is the threshold used to clear a cir position */
+ UVLWord energyThresh;
+
+ UInt numSignBits;
+
+ /*
+ ** energySum is the sum of the energy in the largest energy window of
+ ** the CIR. energySum is defined as:
+ **
+ ** sum over largest CIR window( real(CIR)^2 + imag(CIR)^2 ).
+ ** This is then broken into mantissa * 2^exponent
+ */
+ UVLWord energySum;
+ Word mantissa;
+ UWord2 mantInv; /* 14 fractional bits to represent 2.0 exactly */
+
+ Word tempCir[2][CIR_SIZE];
+ Bool firstNonZero;
+ Bool allZero;
+ Char cirStartIndex;
+ Char indexTemp; /* Temporary store of index */
+
+ ULong one;
+
+ LOOP_TYPE i;
+
+ /* Get the position of the training sequence */
+ cirStartIndex = g_BConsts_pt->cirStartIndex + indexBest;
+
+ /*
+ * Compute the average energy of the training sequence
+ */
+ energyAccum = 0;
+
+ for ( i = 0; i < g_BConsts_pt->cirNumTseqBits; ++i)
+ {
+
+ result = SMPY( samples[cirStartIndex + i].I , samples[cirStartIndex + i].I );
+ energyAccum = _lsadd( result, energyAccum );
+ result = SMPY( samples[cirStartIndex + i].Q , samples[cirStartIndex + i].Q );
+ energyAccum = _lsadd( result, energyAccum );
+ }
+
+ /*
+ * Normalize energyAccum by cirNumTseqBits
+ * energyAccum,F32 * cirNumTseqBitsInv, F16 = F48 -> >> 16 = F32
+ * Ideally we do this:
+ * energyAccum =
+ * ((energyAccum+(1<<(WORD_SIZE-1)))>>WORD_SIZE) * g_BConsts_pt->cirNumTseqBitsInv;
+ *
+ * However, to maintain accuracy for low level signals (the first shift might zero
+ * energyAccum out) we use NORM to get energyAccum aligned to the 16 lsb's.
+ * Also, we must avoid shifts by a signed value because these are not supported
+ * under ANSI C.
+ * Implemented: (assume WORD_SIZE =16, ACCUM_GUARD_BITS = 8, numSignBits = N)
+ *
+ * ((((((energyAccum << N) >> 24) * 1/cirNumTseqBits ) << 8)>>N
+ *
+ * This takes about 15 cycles
+ */
+ numSignBits = _lnorm( energyAccum );
+ /*
+ * Shift to the 40 MSBs to normalize
+ * This will avoid an signed shift in the next step
+ * Then, Shift to the 16 LSB's
+ */
+ energyAccum = energyAccum << numSignBits,
+ energyAccum = energyAccum >> (WORD_SIZE+ACCUM_GUARD_BITS);
+ /* Multiply by 1/cirNumTseqBits */
+ energyAccum = (Word) energyAccum * g_BConsts_pt->cirNumTseqBitsInv;
+ /* Shift Back, */
+ /* shift by (WORD_SIZE+ACCUM_GUARD_BITS)-numSignBits -WORD_SIZE */
+ /* = << ACCUM_GUARD_BITS and >> numSignBits */
+ energyAccum = energyAccum << ACCUM_GUARD_BITS;
+ energyAccum = energyAccum >> numSignBits;
+
+ /*
+ * TI asm DIVMODU32() can run in 42 cycles.
+ * This divide was clocked at 463 cycles.
+ */
+ /*energyAccum = energyAccum / g_BConsts_pt->cirNumTseqBits;*/
+
+ *power = mag2DB( energyAccum );
+
+ /* Get the Energy Threshold */
+ energyThresh = (energyAccum * ENERGY_THRESHOLD_PERCENT ) >> E_THRESH_FORMAT;
+
+
+ /* Save cir values and indexBest */
+ indexTemp = indexBest;
+ /* CIR_SIZE + toa can never be greater than CIR_NUM_TSEQ_BITS */
+ for ( i = indexTemp; i < CIR_BEST_LENGTH + indexTemp; ++i) {
+
+ tempCir[0][i-indexTemp] = cir[0][i];
+ tempCir[1][i-indexTemp] = cir[1][i];
+ }
+
+ /*
+ ** Threshold the very small values of the CIR.
+ ** If they are all small then restore the original CIR.
+ */
+ firstNonZero = FALSE; /* Indicates if the first non-zero cir was found */
+ energySum = 0;
+ allZero = TRUE; /* Will be set to FALSE is any value is greater than the threshold */
+
+ for ( i = indexTemp; i < CIR_BEST_LENGTH + indexTemp; ++i )
+ {
+ if ( energy_L[i] <= energyThresh )
+ { /* Zero out the CIR at this position */
+ cir[0][i] = 0;
+ cir[1][i] = 0;
+ } else
+ {
+ /* Calculate the energy */
+ energySum = energySum + energy_L[i];
+
+ if ( firstNonZero == FALSE )
+ {
+ *toa = i;
+ }
+ firstNonZero = TRUE; /* first non-zero cir found */
+ allZero = FALSE; /* Not all of the CIR values are zero */
+ }
+ }
+
+ /* If all the cir values are zero then restore the old cir */
+ if ( allZero == TRUE )
+ {
+ for ( i = indexTemp; i < CIR_BEST_LENGTH + indexTemp; ++i) {
+
+ cir[0][i] = tempCir[0][i-indexTemp];
+ cir[1][i] = tempCir[1][i-indexTemp];
+
+ /* Calculate the energy */
+ energySum = energySum + energy_L[i];
+ }
+
+ /* Restore the beginning of burst indicator */
+ *toa = indexTemp;
+ }
+
+ /*
+ * Set "toa" to be relative to a ideal toa of zero.
+ * Do this because toa is used in the timing advance
+ * algorithm uses toa
+ */
+ *toa += g_BConsts_pt->toaMin;
+
+ /*
+ ** Break "energySum" into its components:
+ **
+ ** energySum = Mantissa * 2^Exponent
+ **
+ ** This is done to maximize the fixed point precision in
+ ** other routines.
+ **
+ ** The exponent "shifts" the mantissa until the first "one" is just to the
+ ** right of the decimal place. Note the energySum will always be
+ ** positive. The picture below shows the result as binary:
+ **
+ ** energySum = 0.1xxxxxxx * 2^exponent
+ **
+ ** Therefore the mantissa will always be between 0.5 (0.100000)
+ ** and 1-precision (0.111111).
+ ** Also, becuause of this fact 1/mantissa will always be between
+ ** 2 (when mantissa = 0.5) and 1 (when mantissa = 1-precision).
+ */
+
+ /* Divide energySum into mantissa *2^exponent */
+ mantissa = expX( energySum, exponent);
+
+ /*
+ * Compute 1.0/mantissa
+ * "one" can not be represented in fixed point
+ * so approximate it by "1 - word precision"
+ */
+ one = (Long) 1<<(2*WORD_SIZE-3); /* 1 in F32.29, signed */
+
+ mantInv = one / mantissa; /* F32.29 / F16.15 = UF16.14 */
+
+ return( mantInv );
+}
+
+
+/*************************************************************************
+* normCir :
+* --------
+* We normalize the value of Cir ( Cir / Mantissa ).
+*
+*
+* Input data . Channel impulse response : cir[2][CIR_LENGTH]
+* . 1/Mantissa : mantInv (1 <mantInt <= 2)
+* . Position of the best CIR window : *indexBest
+*
+* Output data . Normalized channel impulse response : nCir[2][CIR_SIZE]
+*
+***************************************************************************/
+
+void normCir( Word2 cir[2][MAX_CIR_LENGTH],
+ UWord2 mantInv,
+ Char indexBest_fix,
+ Word2 cirNorm[2][MAX_CIR_LENGTH] )
+{
+
+ LOOP_TYPE i;
+ unsigned char indexBest;
+
+ indexBest = (unsigned char) indexBest_fix;
+
+ for ( i = indexBest; i < (CIR_BEST_LENGTH + indexBest ); i++)
+ {
+ /*
+ * -1 <= cir < 1, 1 < mant_Inv < 2
+ * So -2 < cirNorm < 2
+ * cir, SF16,15 and mantInv is UF16,14
+ * SMPY will <<1 to get:
+ * (SF16,15 * UF16,14)<<1 = SF32,29 << 1 = SF33,30
+ * and shift that by 16 = SF17,14
+ * This will not overflow SF16,14 (Word2, two integer bits)
+ * because max(cir) is -1.0 and max(mantInv) is 2.0
+ * -1.0 * 2.0 = -2.0 = 10.0000b
+ */
+ cirNorm[0][i - indexBest] = SMPY( (SInt) cir[0][i] , mantInv)>>(WORD_SIZE);
+ cirNorm[1][i - indexBest] = SMPY( (SInt) cir[1][i] , mantInv)>>(WORD_SIZE);
+ }
+
+}
+
+
+/*************************************************************************
+**
+** calcRho :
+** ----
+** Compute the autocorrelation of the Cir with cirNorm.
+** calcRho will be used for the VITERBI algorithm as the real channel response.
+**
+** Input data - Channel impulse response : cir[2][CIR_LENGTH]
+** - Normalized channel impulse response : cirNorm[2][CIR_SIZE]
+** - Position of the best CIR window : indexBest
+** - Exponent of the normalized energy : exponent
+**
+** Ouput data - Autocorrelation of the Cir : rho[DELAY_MAX]
+**
+** This illistrates the NB case where index = 0 and CIR_SIZE = 5:
+** When i = 1, j = 1:4, j-i = 0:3
+** i = 2, j = 2:4, j-i = 0:2
+** i = 3, j = 3:4, j-i = 0:1
+** i = 4, j = 4, j-i = 0
+** In this manner the autocorrelation is commputed on the samples except
+** the i = 0 delay which is normalized by the mantissa and exponent.
+**
+** NOTE: as of 9/98 rho is not in A|RT. It will be ported when viterbi
+** is ported to A|RT.
+***************************************************************************/
+void calcRho( Word cir[2][MAX_CIR_LENGTH],
+ Word2 cirNorm[2][MAX_CIR_LENGTH],
+ Char indexBest,
+ Short exponent,
+ Word3 rho[DELAY_MAX] )
+{
+
+ LWord result;
+ LWord temp;
+
+ LOOP_TYPE i, j;
+
+ /*
+ ** Correlation of Cir and cirNorm
+ **
+ ** Note that the maximum of the CIR's aoutcorrelation is:
+ ** max( autocorr(cir) ) = energySum = mantissa * 2^exponent
+ **
+ ** and that the maximum of the CIR and cirNorms autcorrelation is:
+ ** max( corr(cir,cirNorm) ) = energySum/mantissa = 2^exponent
+ **
+ ** Because cirNorm = Cir/mantissa
+ **
+ ** Typically the exponent will be negative, so when Rho is shifted right
+ ** by the exponent, it is actually reducing the number of sign bits and
+ ** maxmizing the fixed point precision.
+ */
+
+ for ( i = 1 + indexBest; i < CIR_SIZE + indexBest; i++) {
+ result = 0;
+
+ for ( j = i; j < CIR_SIZE + indexBest; j++) {
+
+ temp = cir[0][j] * cirNorm[0][j-i] ;
+ result = temp + result;
+
+ temp = cir[1][j] * cirNorm[1][j-i] ;
+ result = temp + result;
+ }
+
+ /* Normalize rho to maximize fixed point precision */
+ rho[i-indexBest-1] = SSHIFTR( result, exponent ) >> WORD_SIZE;
+ }
+}
+
+
+/*************************************************************************
+**
+** matchFilter :
+** -----------
+** Matched filter the input samples with the normalized CIR
+**
+** Input data - Input samples : data[2][]
+** - channel impulse response : cirNorm[2][CIR_SIZE]
+** - Position of the best CIR window : indexBest
+** - Exponent of the normalized energy : exponent
+**
+** Output data - Matched filtered samples : Output[nb_samp]
+**
+**
+** Correlation of Cir and cirNorm
+**
+** Note that the maximum of the CIR's aoutcorrelation is:
+** max( autocorr(cir) ) = energySum = mantissa * 2^exponent
+**
+** and that the maximum of the CIR and cirNorms autcorrelation is:
+** max( corr(cir,cirNorm) ) = energySum/mantissa = 2^exponent
+**
+** Because cirNorm = Cir/mantissa
+**
+** Typically the exponent will be negative, so when Rho is shifted
+** by the exponent, it is actually reducing the number of sign bits and
+** maxmizing the fixed point precision.
+**
+***************************************************************************/
+
+void matchFilter(t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ Word2 cirNorm[2][MAX_CIR_LENGTH],
+ Char indexBest_fxp,
+ Short exponent,
+ Word3 output[])
+{
+ /*
+ * "temp" and "result" need to be VLWord only if the input data
+ * has an exponet of 0. This means the data will
+ * range from -1 to 1-precision
+ */
+ VLWord temp;
+ VLWord result;
+ LOOP_TYPE i, j;
+ int start; /* DEBUG !! */
+ Word3 out_fxp; /* DEBUG !! */
+
+ /*
+ * Determine the location of bit 0 in the burst.
+ * This is first sample after the tail (header) bits plus
+ * any data shift due to MS moving or mulitpath effects.
+ */
+ start = ((int) indexBest_fxp) + g_BConsts_pt->numTailBits + g_BConsts_pt->toaMin; /* DEBUG !! */
+
+
+ for ( j = 0; j < g_BConsts_pt->numBits; j++) {
+ result = 0;
+
+ for ( i = 0; i < CIR_SIZE; i++) {
+ result += samples[start + j + i].I * cirNorm[0][i];
+ result += samples[start + j + i].Q * cirNorm[1][i];
+ }
+
+ /* Normalize result to maximize fixed point precision */
+ result = SSHIFTR( result, exponent );
+ out_fxp = SAT_LONG( result ) >> WORD_SIZE;
+ output[j] = out_fxp;
+ }
+}
+
+
+/*************************************************************************
+** equalize()
+** ----------
+**
+** This function will equalize the burst.
+**
+**
+** Input data - Demodulated burst : demOut.softDec[BURST_MATCH]
+** - Autocorrelation of the Cir : Rho[delay_l]
+**
+** Output data - Corrected burst : demOut.softDec[BURST_MATCH]
+**
+***************************************************************************/
+void equalize (Word matcho[BURST_MATCH],
+ Word rho[DELAY_MAX],
+ const t_TseqWord tseq[])
+{
+ LOOP_TYPE i;
+
+ /* Just flip sign */
+
+ for( i = 0; i < g_BConsts_pt->numBits; i++ )
+ {
+ matcho[i] = -1 * matcho[i];
+ }
+
+}
+
+/***************************************************************************
+** weight()
+** --------
+**
+** Weight the soft-decisions to enhance
+** good quality bursts and reduce the impact of poor
+** quality bursts on the decoder.
+** Also, split out the hu/hl bits to the end of the burst.
+**
+** Input data:
+** -Soft Decisions : demOut.softDec[BURST_MATCH]
+** - Address of the Training sequence
+**
+** Output data:
+** - Weighted burst : demOut.softDec[BURST_MATCH]
+** - Signal to Noise Ratio : snr
+**
+****************************************************************************/
+void weight( Word softDec[MAX_NUM_BITS_PER_BURST],
+ const t_TseqWord tseq[],
+ Word *snr)
+{
+ LOOP_TYPE i;
+
+ /* Remove the tseq */
+ if( g_burstType == TCHF )
+ {
+ for( i = 0; i < NB_NUM_ENCRYPT_BITS_PER_SIDE; i++)
+ {
+ softDec[i+NB_NUM_ENCRYPT_BITS_PER_SIDE] = \
+ softDec[i+NB_NUM_ENCRYPT_BITS_PER_SIDE+NB_TRAIN_SIZE];
+ }
+ } else /* AB */
+ {
+ for( i = 0; i < g_BConsts_pt->numDataBits; i++)
+ {
+ softDec[i] = softDec[i+AB_TRAIN_SIZE];
+ }
+ }
+
+ /* Just make them perfect SD for now */
+ for( i = 0; i < g_BConsts_pt->numDataBits; i++ )
+ {
+ if( softDec[i] < 0 )
+ {
+ softDec[i] = 8;
+ } else
+ {
+ softDec[i] = -8;
+ }
+ }
+
+ *snr = 40; /* Excellent snr */
+}
+
+
+/***************************************************************************
+**
+** quantize()
+** ----------
+**
+** Quantization of the soft-decisions to save memory and to
+** be compatable with the decoder input.
+**
+** If |softddec| > 4 then quantized_soft_decision = sign(softdec) * 8
+** if |softdec| <= 4 then quantized_soft_decision goes linearly from -8 to +8.
+**
+**
+** Input data: - Soft Decsions
+**
+** Output data - Quantized Soft Decsions
+**
+***************************************************************************/
+void quantize( Word demodSamps[MAX_NUM_BITS_PER_BURST], Char softDec[] )
+{
+ LOOP_TYPE i;
+
+ for ( i = 0; i < g_BConsts_pt->numDataBits; i++)
+ {
+ softDec[i] = (Char) demodSamps[i];
+ }
+}
+
+
+
+/***************************************************************************
+**
+** exp()
+** ----
+**
+** This will break a number into:
+** x = mantissa * 2^exponent
+**
+** This uses the C6x intrinsic NORM()
+**
+**
+** Input data: - x, input data to break apart
+**
+** Output data - exponent, exponent of the "x"
+**
+** Return data - mantissa, mantissa of the "x"
+**
+***************************************************************************/
+Word expX( UVLWord data, Word *exponent )
+{
+ Word mantissa;
+ UChar numSignBits;
+
+ /*mantissa = frexp( (double) x / (double)(1<<2*WORD_SIZE-1), &expInt);
+ *exponent = (Short) expInt;
+ return( (Word) ( mantissa * (1<<(WORD_SIZE-1)) ) );
+ */
+
+ numSignBits = LNORM( data ) ;
+ *exponent = -(numSignBits - ACCUM_GUARD_BITS);
+
+ /* Normalize the data to 32 lsb's */
+ data = data << numSignBits;
+ mantissa = data >> (WORD_SIZE+ACCUM_GUARD_BITS);
+ return( mantissa );
+}
+
+/***************************************************************************
+* mag2DB()
+* -------
+*
+* Input Data: mag, magnitude of a value F48 with 40 actual bits
+*
+* Return Data: power in decibels of format F16.2
+*
+* Convert an unsigned long word (40bits) in the format
+* F32 to decibels.
+* The magin F48 because is was calculated by
+* F16 * F16 = F32.
+* Therefore "31" needs to subtracted from pow2(mag)
+* in order to align the decimal point.
+*
+* In floating point this would be :
+* If wordsize is 16 then:
+* *power = 10 * log10( (mag >> 16)/(double)((1<<2*16)-1) );
+*
+* Note that
+* 10*log10(x) = (10*0.301)*log2(x)
+* And 3*log2() = 3*(integer + fractional) = 3*integer + 3*fractional
+*
+* The fractional part is derived from a lookup table with
+* the 2 next significant bits after the most significant bit.
+*
+* The entries are calculated by log2(1.0),log2(1.25),log2(1.5),log2(1.75)
+*
+* logTable[4] = { 3*-1, 3*-0.6781, 3*-0.415, 3*-0.1926 }; floating
+* Multiply float table by 4 add 1 (to round) and round to nearest integer
+*
+***************************************************************************/
+const Short logTable[4] = { 2, 5, 8, 11 }; /* F16.14 */
+
+Word14 mag2DB( UVLWord mag )
+{
+ UShort numSignBits;
+ Word14 power;
+ Short intPart;
+ Short fractPart;
+
+ numSignBits = LNORM( mag );
+
+ /*
+ * Get the 3 msb's plus the sign for the fractional part.
+ * Shift up to 40 bits to normalize then down.
+ */
+ mag = mag << numSignBits;
+ fractPart = mag >> (2*WORD_SIZE + ACCUM_GUARD_BITS - 4);
+
+ /* Get the number of significant integer bits.
+ * = log2(mag) = number of bits to the right of the msbit (not the sign)
+ */
+ intPart = (2*WORD_SIZE + ACCUM_GUARD_BITS - 2) - numSignBits;
+
+ power = (intPart-31)*4*3; /* Integer part of power */
+ if( fractPart > 3 ) /* Check for zero power */
+ {
+ fractPart = logTable[fractPart-4];
+ power += fractPart;
+ }
+
+ return( power );
+}
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod/demodTop.c b/data/mnet/GP10/Dsp/bbdataproc/demod/demodTop.c
new file mode 100644
index 0000000..4ed44fb
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod/demodTop.c
@@ -0,0 +1,432 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/***********************************************************************
+**
+** GSM Demod w/ TI C6201 implementation
+**
+** Description:
+**
+** Revision 1.6 1998/10/14 18:43:26 bhehn
+** AB & NB verified. Merged with shared header.
+** AB ~= 103us, NB ~= 78us
+**
+** Revision 1.5 1998/10/09 21:20:36 bhehn
+** Fast version, Not yet versified.
+** AB ~ 125us, NB ~= 110us
+**
+** Revision 1.4 1998/10/07 15:21:32 bhehn
+** One Access Burst verifies. testfile.fixin is the input testfile.c6x is the output.
+**
+** Revision 1.3 1998/10/02 17:01:00 bhehn
+** Changed calling routine to be more like c6x implementation.
+** BER matches previous version.
+**
+** Revision 1.2 1998/10/01 16:37:07 bhehn
+** Fixed matchfilter output saturation problem
+**
+** Revision 1.1 1998/10/01 13:57:00 bhehn
+** Initial revision
+**
+** Revision 1.4 1998/09/22 20:00:36 bhehn
+** Access Burst support added and verified.
+**
+** Revision 1.2 1998/09/21 22:04:22 bhehn
+** NB demod works, BER close to floating
+**
+** Revision 1.2 1998/09/18 20:15:05 bhehn
+** Outdated (renamed to '\\Fdi\public\rcs\D\rcs\projects\GSM\Art\demod\demodTop.cxx,v').
+**
+**
+************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "dsp\dsptypes.h"
+#include "gsmtypes.h"
+#include "bbdata.h"
+#include "bbproto.h"
+
+/*
+* DEMOD_TOP is used to define the globals,
+* this should be the only file where it is defined
+*/
+#define DEMOD_TOP
+
+/* Include globals and typedefs */
+#include "dem_const.h"
+#include "training.h"
+#include "dem_globs.h"
+#include "dem_protos.h"
+
+
+
+
+#if TEST == 1
+
+/* I/O File global variables */
+extern FILE *out_file;
+
+void moveStealingBits( t_chanSel chanSel, Word softDec[] );
+#endif
+
+void demodulate( t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+ t_chanSel chanSel,
+ UChar tseqNum,
+ t_ULBurstBuf *demodOut )
+{
+
+ Word cir[2][MAX_CIR_LENGTH]; /* Impulse response */
+ LWord energy_L[MAX_CIR_LENGTH]; /* Energy */
+ Word2 cirNorm[2][MAX_CIR_LENGTH]; /* Normalized Cir */
+ Char indexBest; /* Position of the best CIR window */
+ Word3 rho[DELAY_MAX]; /* Autocorrelation of the Cir, used by Viterbi */
+ /* Demodulated samples before quantizing */
+ /* See if this could be demodIn->samples to save stack space */
+ Word3 demodSamps[MAX_NUM_BITS_PER_BURST];
+
+ UWord2 mantInv; /* 1/mantissa of energySum = mantissa * 2^exponent */
+ Short exponent;
+
+
+#if TEST == 1
+ int i; /* used to index arrays for printing to files */
+#endif
+
+
+ /* Set the burst constants pointer to the proper burst */
+ if (chanSel == RACH )
+ {
+ /* Use the access burst constants */
+ g_BConsts_pt = &g_ABConsts;
+ g_burstType = RACH; /* Needed until equal is implemented */
+
+ } else
+ {
+ /* Use the normal burst constants */
+ g_BConsts_pt = &g_NBConsts;
+ /* Change the tseq base address */
+ g_BConsts_pt->tseqBaseAddr = &train_nb[tseqNum][0];
+ g_burstType = TCHF; /* Needed until equal is implemented */
+ }
+ /**************************************************************************
+ *
+ * GSM Demod: main program
+ *
+ **************************************************************************/
+
+ /*
+ **
+ ** Offset computation + Offset compensation + Derotation
+ **
+ ** Input data . samples[2][NUM_DATA]
+ **
+ ** Output data . samples[2][NUM_DATA]
+ ** samples have been overwritten by compensated + derotated samples
+ **
+ */
+ offsetDerot( samples, DC_OFFSET_THRESHOLD );
+
+ /*
+ fprintf( out_file, "* Input samples after Off_Derot*\n");
+ for ( i = 0; i < CIR_LENGTH ; i++)
+ {
+ fprintf( out_file, "%s\n", samples[0][i].dec() );
+ fprintf( out_file, "%s\n", samples[1][i].dec() );
+ }
+ */
+
+ /*
+ ** Estimate the Channel Impulse Response
+ **
+ **
+ ** Input: Derotated Samples - demodIn.samples[2][NUM_DATA]
+ ** Training Sequence - tseq[TRAINING_SIZE]
+ **
+ ** Output: Channel impulse response - cir[2][CIR_LENGTH]
+ **
+ */
+ impulse( samples, g_BConsts_pt->tseqBaseAddr, cir );
+
+
+
+#if TEST_RHO == 1
+ fprintf( out_file, "### Impulse Response ###\n");
+ for ( i = 0; i < g_BConsts_pt->cirLength; i++)
+ {
+ fprintf( out_file, "%2.10f\n", WORD_2F( cir[0][i] ));
+ fprintf( out_file, "%2.10f\n", WORD_2F( cir[1][i] ));
+ }
+#endif
+
+ /*
+ ** Compute the energy of the impulse response
+ ** and try to find the best energy window of length CIR_SIZE
+ **
+ **
+ ** Input data:
+ ** - The channel impulse response : cir[2][CIR_LENGTH]
+ **
+ ** Output data:
+ ** - Energy of the impulse response : energy_L[CIR_LENGTH]
+ ** - Position of the best CIR window : indexBest
+ **
+ */
+
+ indexBest = Energy( cir, energy_L );
+
+
+#if TEST_RHO == 1
+
+ fprintf( out_file, "### Energy of CIR ###\n");
+ for ( i = 0; i < g_BConsts_pt->cirLength; i++)
+ {
+ fprintf( out_file, "%2.10f\n", LONG_2F(energy_L[i]) );
+ }
+
+#endif
+
+ /*
+ **
+ ** normEnergy :
+ ** ---------
+ ** Clear lowest energies of the window found in Energy()
+ ** and we compute the sum of the energies of this window
+ ** and split it into mantissa * 2^exponent
+ **
+ ** Input data: - Derotated samples : samples[2][NUM_DATA]
+ ** - Channel impulse response : cir[2][CIR_LENGTH
+ ** - Energy of the impulse response : energy_L[CIR_LENGTH]
+ ** - Position of the best .. : indexBest
+ ** - cirWindowStart, startinf position
+ **
+ ** Output data: - Cleared Cir : cir[2][CIR_LENGTH]
+ ** - First non zero Cir (or begin of the burst) : bob
+ ** - average power in dB: power
+ ** - exponent
+ **
+ ** Returned data : mantInv = 1/Mantissa, (1 < mantInv <= 2)
+ **
+ **
+ */
+ mantInv = normEnergy( samples,
+ &cir[0],
+ &energy_L[0],
+ indexBest,
+ &demodOut->toa,
+ &demodOut->rcvPower,
+ &exponent);
+
+
+#if TEST_POWER == 1
+
+ fprintf( out_file, "### Power ###\n");
+
+ fprintf( out_file, "%2.4f\n", WORD14_2F( demodOut->rcvPower) );
+
+#endif
+
+
+
+
+ /*
+ **
+ ** normCir()
+ ** ---------
+ **
+ ** We normalize the value of Cir ( Cir / Mantissa ).
+ **
+ **
+ ** Input data:
+ ** - Channel impulse response : ir[2][CIR_LENGTH]
+ ** - 1/Mantissa : mantInv
+ ** - Position of the best CIR window : indexBest
+ **
+ ** Output data:
+ ** - Normalized channel impulse response : cirNorm[2][CIR_SIZE]
+ **
+ */
+ normCir( cir, mantInv, indexBest, cirNorm );
+
+
+ /*
+ **
+ ** calcRho() :
+ ** -------
+ ** Compute the autocorrelation of the Cir with normCir.
+ ** calcRho will be used for the VITERBI algorithm as the real channel response.
+ **
+ ** Input data: - Channel impulse response : cir[2][CIR_LENGTH]
+ ** - Normalized channel impulse resp. : normCir[2][CIR_SIZE]
+ ** - index of the best CIR window : indexBest
+ ** - Exponent of the normalized energy : exponent
+ **
+ ** Ouput data: - Autocorrelation of the Cir : rho[DELAY_MAX]
+ **
+ */
+ calcRho( cir, cirNorm, indexBest, exponent, rho );
+
+#if TEST_RHO == 1
+
+ fprintf( out_file, "### rho ###\n");
+ for ( i = 0; i < CIR_BEST_LENGTH - 1; i++) {
+ fprintf( out_file, "%2.8f\n", WORD3_2F( rho[i] ));
+ }
+
+#endif
+
+ /*
+ ** matchFilter()
+ ** -------------
+ **
+ ** Compute matched filter for the burst.
+ **
+ ** Input data: - Derotated samples : demodIn.samples[2][NUM_DATA]
+ ** - Normalized channel impulse response : NCir[2][CIR_SIZE]
+ ** - Position of the first data to compute : indexBest+TAIL
+ ** - Exponent of the normalized energy : Exponent
+ ** - Number of data to compute : 142
+ **
+ ** Ouput data: -Demodulated burst : demodOut.softDec[BITS_PER_BURST]
+ **
+ */
+ matchFilter( samples,
+ &cirNorm[0],
+ indexBest,
+ exponent,
+ &demodSamps[0] );
+
+#if TEST_MATCHO == 1
+
+ fprintf( out_file, "### Matcho after Matched() ###\n");
+ for ( i = 0; i < g_BConsts_pt->numBits; i++) {
+
+ fprintf( out_file, "%2.4f\n", WORD3_2F( demodSamps[i] ) );
+ }
+
+#endif
+
+ /*
+ ** equalize()
+ ** ----------
+ **
+ ** This function will equalize the burst.
+ **
+ **
+ ** Input data:
+ ** - Demodulated burst : demodOut.softDec[BURST_MATCH]
+ ** - Autocorrelation of the Cir : Rho[delay_l]
+ ** - Address of the Training sequence
+ **
+ ** Output data:
+ ** - Corrected burst : demodOut.softDec[BURST_MATCH]
+ **
+ */
+ equalize(&demodSamps[0], rho, g_BConsts_pt->tseqBaseAddr);
+
+#if TEST_EQUALIZE == 1
+
+ fprintf( out_file, "### Matcho after Equalize ###\n");
+
+ for ( i = 0; i < g_BConsts_pt->numBits; i++)
+ {
+ fprintf( out_file, "%2.4f\n", WORD3_2F( demodSamps[i] ) );
+ }
+
+#endif
+
+ /*
+ ** weight()
+ ** --------
+ **
+ ** Weight the soft-decisions to enhance
+ ** good quality bursts and reduce the impact of poor
+ ** quality bursts on the decoder.
+ **
+ **
+ ** Input data:
+ ** -Soft Decisions : demodOut.softDec[BURST_MATCH]
+ ** - Address of the Training sequence
+ **
+ ** Output data:
+ ** - Weighted burst : demodOut.softDec[BURST_MATCH]
+ ** - Signal to Noise Ratio : snr
+ **
+ */
+ weight( demodSamps,
+ g_BConsts_pt->tseqBaseAddr,
+ &demodOut->snr);
+
+#if TEST == 1
+ moveStealingBits( chanSel, &demodSamps[0] );
+#endif
+
+#if TEST_SNR == 1
+
+ fprintf( out_file, "### snr ###\n");
+ fprintf( out_file, "%2.4f\n", (float) demodOut->snr);
+
+#endif
+
+ /*
+ ** quantize()
+ ** ----------
+ ** Quantization of the soft-decisions to save memory and to
+ ** be compatable with the decoder input.
+ **
+ ** Input data:
+ ** - Soft Decisions, demodSamps[BURST_MATCH]
+ **
+ ** Output data - Weighted Soft Decsions : demodOut.softDec[BURST_MATCH]
+ **
+ */
+ quantize( demodSamps, &demodOut->data[0] );
+
+#if TEST_QUANT_SDP == 1
+
+ fprintf( out_file, "### Matcho after Quantize ###\n");
+ for ( i = 0; i < g_BConsts_pt->numDataBits; i++) {
+ fprintf( out_file, "%2.4f\n", (float) demodOut->data[i]);
+ }
+
+#endif
+
+}
+
+#if TEST == 1
+/***************************************************************************
+* moveStealingBits()
+* ----------------
+*
+* This will move the stealing bits to the end of the burst for
+* normal bursts only.
+*
+* This is for comparison with the other demods.
+***************************************************************************/
+void moveStealingBits( t_chanSel chanSel, Word softDec[] )
+{
+ int i;
+ Word hu, hl;
+
+ /*
+ * Move the hu/hl bits to the end
+ * if this is a normal burst
+ */
+ if( chanSel != RACH )
+ {
+ hu = softDec[NB_NUM_ENCRYPT_BITS_PER_SIDE-1];
+ hl = softDec[NB_NUM_ENCRYPT_BITS_PER_SIDE];
+ for( i = 0; i < NB_NUM_ENCRYPT_BITS_PER_SIDE-2; i++ )
+ {
+ softDec[i+NB_NUM_ENCRYPT_BITS_PER_SIDE-1] = \
+ softDec[i+NB_NUM_ENCRYPT_BITS_PER_SIDE+1];
+ }
+ softDec[NB_NUM_ENCRYPT_BITS_PER_BURST-2] = hl;
+ softDec[NB_NUM_ENCRYPT_BITS_PER_BURST-1] = hu;
+ }
+}
+#endif
+
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod/demsubs.asm b/data/mnet/GP10/Dsp/bbdataproc/demod/demsubs.asm
new file mode 100644
index 0000000..ea18755
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod/demsubs.asm
@@ -0,0 +1,3150 @@
+;****************************************************************************
+; (c) Copyright Cisco 2000
+; All Rights Reserved
+;****************************************************************************
+
+;******************************************************************************
+;* TMS320C6x ANSI C Codegen Version 2.00 *
+;* Date/Time created: Wed Feb 24 14:41:23 1999 *
+;******************************************************************************
+
+;******************************************************************************
+;* GLOBAL FILE PARAMETERS *
+;* *
+;* Architecture : TMS320C6200 *
+;* Endian : Little *
+;* Interrupt Threshold : Disabled *
+;* Memory Model : Small *
+;* Speculative Load : Disabled *
+;* Redundant Loops : Enabled *
+;* Pipelining : Enabled *
+;* Debug Info : No Debug Info *
+;* *
+;******************************************************************************
+
+FP .set A15
+DP .set B14
+SP .set B15
+
+
+
+
+
+
+;/**************************************************************************
+;**
+;** GSM Demod w/ A|RT Library implemtation ported to C6 scalar assembly
+;**
+;** This file contains all of the assembly subroutines for the demod
+;**
+;**************************************************************************/
+
+
+;**************
+;
+; Declarations
+;
+;*************************************************************************
+
+ ; Declare the routines coded here to be globally visible.
+ ; They are all C-callable, with prototypes in dem_protos.h.
+
+ .def _offsetDerot ; offset decompensation/derotation
+ .def _impulse ; compute channel impulse response
+ .def _Energy ; find energy, highest energy window
+ .def _normEnergy ; normalize Energy, get mantissa and exponent
+ .def _normCir ; normalize the cir
+ .def _calcRho ; autocorrelate cir with normed cir
+ .def _matchFilter ; filter samples by normed cir
+ .def _expX ; calculate exponent/mantissa
+ .def _mag2DB ; calculate power
+
+;*************************************************************************
+
+ ; externally declare the C variables we need here
+
+ .ref _logTable ;const Short logTable[]
+ .ref _g_burstType ;t_chanSel g_burstType
+ .ref _g_BConsts_pt ;t_burstConsts *g_BConsts_pt
+ .ref _c_asm_consts ;int c_asm_consts[]
+
+;*************************************************************************
+
+ ; C constant and structure offset interface
+
+ ; offsets in _c_asm_consts to values of offsets to members of the
+ ; t_burstConsts structure. The values in c_asm_consts are shown
+ ; below along with the current burst constant values associated.
+ ; The values in _c_asm_consts are calculated at run-time in order
+ ; that the t_burstConsts structure and values may be modified w/o
+ ; change here, except where noted in the Limitations below. Mainly
+ ; numDataBits is assumed even.
+ ;
+ ; NOTE: these symbols must be aligned with the definition of
+ ; _c_asm_consts in demTop.c
+ ;
+ ; val NB AB SB meaning
+ ;---------------------------------------------------
+o_tseqBaseAddr .set 0 ; 0 ptr to training sequence
+o_cirNumTseqBits .set 1 ; 4 16 41 64 num training sequence bits
+o_cirNumTseqBitsInv .set 2 ; 6 4096 1598 1024 2^16/(number training bits)
+o_impulseTseqOffset .set 3 ; 8 0 3 ? offset in training sequence
+o_cirLength .set 4 ; 9 9 64 50 length of impulse response
+o_cirStartIndex .set 5 ; 10 68 8 ? offs impulse response in burst
+o_toaMin .set 6 ; 11 -2 0 ? timing advance (moving mobile)
+o_numBits .set 7 ; 12 142 77 142 bits in a burst
+o_numDataBits .set 8 ; 13 116 36 78 (is even!) data bits in a burst
+o_numTailBits .set 9 ; 14 3 8 3 number of initial tail bits
+
+ ; offsets in _c_asm_consts to values of symbols created with
+ ; #define in C. Loaded at run-time so that values may be changed
+ ; without editing the assembly routines, except where noted in
+ ; the Limitations description for individual routines. Mainly
+ ; CIR_SIZE and CIR_BEST_LENGTH cannot be changed without affecting
+ ; this module.
+ ;
+ ; NOTE: these symbols must be aligned with the definition of
+ ; _c_asm_consts in demTop.c
+ ;val meaning
+ ;------------------------------------
+v_OFF_NUM_OFFSET_SAMPS .set 10 ;128 pwr 2 num samps offset calced on
+v_OFF_SHIFT_VAL .set 11 ; 7 shift right count for average off
+v_GSM_NUM_SAMPLES_PER_BURST .set 12 ;156 samples in a demod burst
+v_MAX_CIR_LENGTH .set 13 ; 64 longest impulse response
+v_CIR_SIZE .set 14 ; 5 (must=5!) cir window size
+v_CIR_BEST_LENGTH .set 15 ; 5 (must=5!) normed cir length
+v_WORD_SIZE .set 16 ; 16 number of bits in halfword (16)
+v_ACCUM_GUARD_BITS .set 17 ; 8 extra bits in 40 bit word (8)
+v_ENERGY_THRESHOLD_PERCENT .set 18 ; 13 thresh energy as pct of total
+v_E_THRESH_FORMAT .set 19 ; 8 shift count for formatting thresh
+v_NB_NUM_ENCRYPT_BITS_PER_SIDE .set 20 ; 58 num bits before training
+v_NB_TRAIN_SIZE .set 21 ; 26 size of nb training sequence
+v_AB_TRAIN_SIZE .set 22 ; 41 size of ab training sequence
+v_TCHF .set 23 ; 1 enum symbol for TCHF burst type
+v_RACH .set 24 ; 10 enum symbol for RACH burst type
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _offsetDerot *
+;* *
+;* Regs Modified : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B3,B4,B5,B6, *
+;* B7,B8,B9 *
+;* Regs Used : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B3,B4,B5,B6, *
+;* B7,B8,B9 *
+;******************************************************************************
+_offsetDerot:
+;** --------------------------------------------------------------------------*
+;
+;*************************************************************************
+;
+;
+;**********************
+;
+; Optimization status
+;
+;*************************************************************************
+;
+; This software was written to optimize the C code provided by Frontier
+; Design. Below are tables summarizing the optimization status of the
+; code, in terms of number of execution packets required for each function.
+; May be useful if further optimization is required. Note the C was compiled
+; at -o because -o2 was unstable at the time this was written.
+;
+; Execution Packets
+; Estimated --------------------------------------------------------
+; Timing Assembly (-o2) C (-o)
+; Summary --------------------------------------------------------
+; NB % AB % SB NB % AB SB
+; --------------------------------------------------------
+; matchFilter ; 754 30 429 8 754 4141 28 2256 4141
+; offsetDerot ; 477 20 477 9 477 1637 11 1637 1637
+; impulse ; 280 12 3475 65 3953 1057 7 12182 12972
+; normEnergy ; 203 8 224 4 247 358 2 408 454
+; weight ; 200 11 98 2 182 2057 14 675 1431
+; Energy ; 68 7 343 8 273 243 2 1013 817
+; quantize ; 130 5 50 1 91 1992 14 632 1346
+; --------------------------------------------------------
+; equalize ; 88 4 56 1 88 171 1 106 171
+; calcRho ; 58 2 58 1 58 544 4 544 544
+; normCir ; 20 1 20 0 20 108 1 108 108
+; --------------------------------------------------------
+; total 2375 5336 6223 14726 19561 23621
+; -------------------------------------------
+; packets saved 12351 14225 17398
+; ratio 6.1 3.7 3.8
+;
+; Loop details (cl6x -o2 -mw -k)
+; --------------------------------------------------------
+; Pipelined loops
+; -------------------------------------------------------------
+; ovrhd = code outside pipelined loops
+; pro = number of packets in prolog
+; epi = number of packets in epilog
+; k = number of packets in pipelined kernel
+; cnt = value determining loop count
+; d = number of values per loop
+; pec = number fewer kernel loops due to pro/epilog NB AB SB
+; -------------------------------------------------------------
+; ovrhd pro epi k cnt/d pec pro epi k cnt/d pec
+; -------------------------------------------------------------
+; matchFilter ; 25+ (24+25+ 5*(NMB/1 - 6))
+; offsetDerot ; 31+ (13+16+ 8*(GSB/4 - 2))+ ( 5+ 6+ 1*(NOS/1 -12))
+; impulse (inner); 12+ ( 7+ 7+ 1*(NTS/1 -13))
+; weight ; 24+ ( 8+ 8+ 2*(NDB/2 - 7))+ ( 6+ 6+ 1*(NBE/1 -12))
+; normEnergy (1) ; 104+ ( 5+ 8+ 4*(BCL/1 - 3))+ ( 5+ 6+ 2*(BCL/1 - 3))+
+; normEnergy (2) ; ( 7+ 7+ 1*(NTS/1 - 7))+ ( 6+ 0+ 1*(ESB/1 - 1))
+; Energy ; 20+ ( 8+ 9+ 3*(CWL/1 - 3)) (10+10+ 2*(CRL/1 - 5))
+; quantize ; 14+ ( 6+ 6+ 1*(NDB/1 -12))
+; --------------------------------------------------------
+; equalize ; 16+ ( 7+ 7+ 1*(NMB/2 -13))
+; normCir ; 8+ ( 4+ 6+ 2*(BCL/1 - 4))
+; --------------------------------------------------------
+;
+; --------------------------------------------------------
+; No loops, or not pipelined
+; --------------------------------------------------------
+; impulse (outer); 19+ (12+inner loop)*CRL (or 19+(13+NTS)*CRL packets)
+; calcRho ; 58
+; -------------------------------------------------------------
+; Values: NB AB SB
+; ----------------
+; NOS = OFF_NUM_OFFSET_SAMPS = 128 128 128
+; GSB = GSM_NUM_SAMPLES_PER_BURST - g_BConsts_pt->numTailBits = 153 148 153
+; BCL = BEST_CIR_LENGTH = CIR_SIZE = 5 5 5
+; CRL = g_BConsts_pt->cirLength = 9 64 50
+; CWL = CRL - BCL = 4 59 45
+; NTS = g_BConsts_pt->cirNumTseqBits = 16 41 64
+; NMB = g_BConsts_pt->numBits = 142 77 142
+; NDB = g_BConsts_pt->numDataBits = 116 36 78
+; NBE = NB_NUM_ENCRYPT_BITS_PER_SIDE if TCHF else NDB = 58 36 78
+; ESB = number of sign bits in energy mantissa max: 31
+;
+; Comments on further optimization
+;
+; 0) For NB, over half the time is spent in matchFilter and offsetDerot
+; and those are nearly optimal for the current algorithms. For AB and
+; SB, impulse dominates the timing on its own, due to the longer
+; training sequence and cir length. Its also nearly optimal.
+;
+; 1) matchFilter does ten multiplies per bit, so five execution packets
+; per bit is minimum (only two multiply units). NB performance can
+; only be improved by 19 clocks out of 710 minimum, so its done.
+;
+; 2) offsetDerot's comp loop isn't bad at 2 clocks per sample. It can be
+; gotten as low as 1.25 clocks per sample if overflow is ignored instead
+; of saturated, so improvement may be possible. The offset accumulation
+; loop is about optimal, so best case improvement would be about 100
+; clocks.
+;
+; 3) impulse has an ignorable outer overhead of 19. The inner loop
+; timing is 1+NTS, about as good as you can do (two multiplies = at
+; least one clock). The inner overhead is 12, including 8 for a complex
+; int by short multiply. If you save n clocks in the inner overhead the
+; result is cir length * n clocks saved, 9*n, 41*n, and 64*n clocks for
+; NB, AB, and SB, resp. For a 10% improvement you'd need 3, 10, and 7
+; clocks resp. so the cases where impulse matters, AB, and SB, are
+; pretty hard to improve.
+;
+; 4) The huge difference in weight and quantize is simply that the C compiler
+; on -o, the highest safe setting for v2.00, failed to pipeline the loop
+; due to complexity from conditionals.
+;
+; NOTE:
+; Its important that pec < min(cnt/d), or one of two things will happen.
+; If pec is as big as the trip count given, a very slow non-pipelined
+; loop will occur. If pec is larger than the loop count, and the trip
+; directive specifies a larger value yet, the program will crash. Its
+; *very* important that the trip counts be maintained as min(cnt/d) as
+; the code is modified. Using trip counts saves code space and time by not
+; having to generate and branch around non-piped loops. It also makes the
+; .ASM file a lot easier to read. If you remove trip counts the
+; code will still run, but be larger, and a little slower. It won't
+; crash from inaccurate trip counts due to changes to constants or code.
+;
+;*************************************************************************
+;
+;*****************
+;
+; Demod routines
+;
+;/*************************************************************************
+;*
+;* offsetDerot() :
+;* -------------
+;* Offset computation + Offset compensation + Derotation
+;*
+;* The average DC offset in each channel is computed over the first 128
+;* samples, so that averaging is a shift right by 7.
+;*
+;* The number of samples processed (a multiple of 4) is:
+;* 4 * ( (GSM_NUMBER_SAMPLES_PER_BURST-3-g_BConsts_pt->numTailBits) / 4 )
+;*
+;* The first sample processed is the g_BConsts_pt->numTailBits-th.
+;*
+;* The average offset is subtracted from all these samples, removing
+;* any DC bias. The nth sample processed is rotated -90*n degrees at
+;* the same time.
+;*
+;* Input data . samples[MAX_NUM_DATA]{I,Q}
+;* . threshold (positive number)
+;*
+;* Output data . samples[MAX_NUM_DATA]{I,Q}
+;*
+;***************************************************************************/
+;void offsetDerot
+;(
+; t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+; Word threshold
+;);
+;
+;
+; _offsetDerot .cproc samptr,thresh
+; .reg ntailb ; const: g_BConsts_pt->numTailBits
+; .reg nsamps ; const: OFF_NUM_OFFSET_SAMPS
+; .reg offshv ; const: OFF_SHIFT_VAL
+; .reg nsplpb ; const: GSM_NUMBER_SAMPLES_PER_BURST
+; .reg lohalf ; const: 0x0000ffff
+; .reg hihalf ; const: 0xffff0000
+; .reg round ; const: rounding for offset accumulation
+; .reg offIacc ; accumulator for I samples
+; .reg offQacc ; accumulator for Q samples
+; .reg offsetI ; 16bit average DC over 128 I samples
+; .reg offsetQ ; 16bit average DC over 128 Q samples
+; .reg sp1 ; general pointer storage
+; .reg sp2 ; " " "
+; .reg iloop ; pointer to samples, in loops
+; .reg temp ; general storage
+; .reg itemp
+; .reg qtemp
+; .reg temp1 ; " "
+; .reg nthresh ; negative of thresh
+; .reg loopcnt ; counts loop iterations
+; .reg cond1 ; general condition register
+; .reg bcp ; constant interface pointers
+; .reg ccp
+ MVK .S1 _c_asm_consts,A5 ; |297|
+
+ MV .L2X A5,B5 ; |297|
+|| MVK .S1 _g_BConsts_pt,A3 ; |294|
+
+ MVKH .S2 _c_asm_consts,B5 ; |298| load address of C constants
+|| MVKH .S1 _g_BConsts_pt,A3 ; |295| load address of pointer
+
+ LDW .D1T1 *A3,A3 ; |296| load pointer to burst constants
+|| MV .L1X B5,A5 ; |298|
+
+ LDW .D1T1 *+A5(36),A0 ; |300|
+ NOP 2
+ LDW .D1T1 *+A5(44),A9 ; |303|
+ NOP 1
+ LDBU .D1T2 *+A3[A0],B7 ; |301|
+
+ MVK .S2 0xffff,B4 ; |306| mask for lower halfword
+|| MV .L1X B4,A7 ; |259|
+
+ MVK .S2 0x1,B1 ; |310|
+
+ MV .L2X A9,B5 ; |307|
+|| LDW .D1T2 *+A5(40),B0 ; |302|
+|| MVKH .S2 0xffff,B4 ; |307| (lohalf was sign extended!)
+
+ SHL .S2 B1,B5,B1 ; |312| temp = 1<<OFF_SHIFT_VAL = 1.0
+|| MV .L1X B3,A2 ; |259|
+|| MV .L2X A4,B8 ; |259|
+
+ ADDAW .D2 B8,B7,B5 ; |347|
+|| SHR .S2 B1,0x1,B1 ; |313| temp = 1<<OFF_SHIFT_VAL-1 = .5
+|| NOT .L1X B4,A5 ; |308| mask for upper halfword
+|| LDW .D1T2 *+A5(48),B9 ; |304|
+
+ MVC .S2 CSR,B2 ; |347|
+|| MV .L1X B5,A0 ; |347|
+|| MV .L2 B5,B6 ; |347|
+|| ZERO .D2 B4 ; |328|
+|| ZERO .D1 A3 ; |327|
+|| NEG .S1 A7,A8 ; |315|
+
+ AND .L2 -2,B2,B5 ; |347|
+
+ MVC .S2 B5,CSR ; |347|
+|| ADD .L2 2,B6,B6 ; |347|
+|| SUB .D2 B0,12,B0 ; |347|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : offcalcloop
+;* Known Minimum Trip Count : 128
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 1
+;* Partitioned Resource Bound(*) : 1
+;* Resource Partition:
+;* A-side B-side
+;* .L units 0 0
+;* .S units 1* 0
+;* .D units 1* 1*
+;* .M units 0 0
+;* .X cross paths 0 0
+;* .T address paths 1* 1*
+;* Long read paths 0 0
+;* Long write paths 0 0
+;* Logical ops (.LS) 0 0 (.L or .S unit)
+;* Addition ops (.LSD) 1 2 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1* 0
+;* Bound(.L .S .D .LS .LSD) 1* 1*
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 1 Schedule found with 7 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : 32
+;*
+;*----------------------------------------------------------------------------*
+L2: ; PIPED LOOP PROLOG
+
+;** --------------------------------------------------------------------------*
+offcalcloop: ; PIPED LOOP KERNEL
+
+ ADD .L1 A3,A4,A3 ; |354| 32-bit accumulator won't ovf
+|| ADD .S2 B4,B5,B4 ; |356|
+|| LDH .D1T1 *A0++(4),A4 ;@@@@@ |353| as long as nsamps < 32768
+|| LDH .D2T2 *B6++(4),B5 ;@@@@@ |355| adding 16 bit inputs
+|| [ B0] B .S1 offcalcloop ;@@@@@ |359|
+|| [ B0] SUB .L2 B0,0x1,B0 ;@@@@@@ |358|
+
+;** --------------------------------------------------------------------------*
+L4: ; PIPED LOOP EPILOG
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : comploop
+;* Known Minimum Trip Count : 32
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 7
+;* Partitioned Resource Bound(*) : 8
+;* Resource Partition:
+;* A-side B-side
+;* .L units 3 5
+;* .S units 3 7
+;* .D units 7 1
+;* .M units 0 0
+;* .X cross paths 6 7
+;* .T address paths 5 3
+;* Long read paths 3 1
+;* Long write paths 0 0
+;* Logical ops (.LS) 8 2 (.L or .S unit)
+;* Addition ops (.LSD) 1 2 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 7 7
+;* Bound(.L .S .D .LS .LSD) 8* 6
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 8 Schedule found with 3 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : 32
+;*
+;*----------------------------------------------------------------------------*
+L6: ; PIPED LOOP PROLOG
+;** --------------------------------------------------------------------------*
+comploop: ; PIPED LOOP KERNEL
+
+;** --------------------------------------------------------------------------*
+L8: ; PIPED LOOP EPILOG
+
+;** --------------------------------------------------------------------------*
+ MVC .S2 B3,CSR ; |445|
+ B .S2X A2
+ NOP 5
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _impulse *
+;* *
+;* Regs Modified : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,B0,B1,B4,B5,B6,B7,B8, *
+;* B9 *
+;* Regs Used : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,B0,B1,B3,B4,B5,B6,B7, *
+;* B8,B9 *
+;******************************************************************************
+_impulse:
+;** --------------------------------------------------------------------------*
+;
+;
+;/*************************************************************************
+;*
+;* impulse() :
+;* ---------
+;* Compute the channel impulse response
+;*
+;*
+;* Input data . Training Sequence : tseq[TRAIN_SIZE]
+;* . Derotated Samples : samples[MAX_NUM_DATA]{I,Q}
+;*
+;* Output data . Channel impulse response : cir[CIR_LENGTH]{I,Q}
+;*
+;************************************************************************
+;*
+;* An illustration of "impulse()" operation is shown below for the NB:
+;* NB impulse starts at an "offset" because it is desirable to correlate
+;* the tseq bits against what is probably tseq bits of the samples. If
+;* the samples were shifted because the mobile moved then the offset of 3
+;* will insure that the correlation is still in the tseq bits. Also, with
+;* the diagram below the demod can find toa's from -2 to 2.
+;*
+;* Assumes: cirLength = 9, cirNumTseqBits = 16, offset = 3, toaMin = -2
+;*
+;* <-- cirNumTseqBits ->
+;* offset offset+cirNumTseqBits-1
+;* | |
+;* v v
+;* ------------------------------
+;* tseq |0 1 2 3 tseq values 18|
+;* ------------------------------
+;* cirStartIndex
+;* |
+;* 0 60 61 v
+;* i = 0 -------------------------------------
+;* samples[] | |62 samples[] 77| MAC --> cir[0]
+;* --------------------------------------
+;*
+;* i = 1 ----------------------
+;* samples[] |63 samples[] 78| MAC --> cir[1]
+;* ... ---------------------- ...
+;*
+;* i = 8 = cirLength-1 ----------------------
+;* samples[] |70 samples[] 85| MAC --> cir[8]
+;* ----------------------
+;* ^
+;* |
+;* cirStartIndex+cirLength-1
+;*
+;* j=0 j=cirNumTseqBits-1
+;* numTseqBits-1
+;* ---
+;* \
+;* cir[i] = / tseq[offset+j] * samples[cirstartIndex+i+j]
+;* ---
+;* j=0
+;*
+;***************************************************************************/
+;void impulse
+;(
+; t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+; const t_TseqWord tseq[MAX_TSEQ_SIZE],
+; t_ULCirSamp cir[MAX_CIR_LENGTH]
+;);
+;
+; _impulse .cproc samptr,tseqptr,cirptr
+; .reg start ; const: g_BConsts_pt->cirStartIndex
+; .reg offset ; const: g_BConsts_pt->impulseTseqOffset
+; .reg length ; const: g_BConsts_pt->cirLength
+; .reg ntbits ; const: g_BConsts_pt->cirNumTseqBits
+; .reg nbinv ; const: g_BConsts_pt->cirNumTseqBitsInv
+; .reg maxcirlen ; const: MAX_CIR_LENGTH
+; .reg wsize ; const: WORD_SIZE
+; .reg resI ; inner loop accumulators
+; .reg resQ ;
+; .reg result ; inner/outer loop storage/accumulator
+; .reg result1 ; inner/outer loop storage/accumulator
+; .reg temp ; temporary storage
+; .reg temp1 ; temporary storage
+; .reg qtemp ; " "
+; .reg itemp ; " "
+; .reg qtemp1 ; " "
+; .reg itemp1 ; " "
+; .reg sptr ; loop sample pointer storage
+; .reg sptr1 ;
+; .reg tptr ; loop training sequence pointer storage
+; .reg icount ; outer loop downcounter
+; .reg jcount ; inner loop downcounter
+; .reg round ; 1 means round up, zero otherwize
+; .reg round1 ; 1 means round up, zero otherwize
+; .reg bcp
+; .reg ccp
+ MVK .S2 _c_asm_consts,B5 ; |631|
+
+ MVKH .S2 _c_asm_consts,B5 ; |632| load address of C constants
+|| MVK .S1 _g_BConsts_pt,A5 ; |628|
+
+ LDW .D2T1 *+B5(20),A0 ; |636|
+|| MV .L1X B5,A3 ; |629|
+|| MVKH .S1 _g_BConsts_pt,A5 ; |629| load address of pointer
+
+ LDW .D1T2 *A5,B5 ; |630| load pointer to burst constants
+ NOP 4
+
+ MV .L2X A3,B5
+|| MV .L1X B5,A5 ; |630|
+|| MV .S2 B5,B6 ; |630|
+|| LDW .D1T1 *+A3(4),A8 ; |640|
+
+ LDW .D2T1 *+B5(8),A2 ; |642|
+ LDW .D2T2 *+B5(12),B5 ; |634|
+ NOP 1
+ LDW .D1T2 *+A3(16),B0 ; |638|
+ LDBU .D1T1 *+A5[A0],A0 ; |637|
+ LDBU .D1T2 *+A5[A8],B9 ; |641|
+
+ LDBU .D2T1 *+B6[B5],A8 ; |635|
+|| MV .L2X A6,B8 ; |590|
+
+ ADDAB .D1 A5,A2,A3 ; |643|
+|| MV .L2X A5,B4 ; |590|
+|| MV .L1X B4,A7 ; |590|
+
+ MV .L2X A3,B4 ; |639|
+|| LDBU .D2T1 *+B4[B0],A1 ; |639|
+
+ LDHU .D2T1 *B4,A6 ; |655|
+|| ADDAW .D1 A4,A0,A9 ; |655| sptr => samptr[start]
+
+;** --------------------------------------------------------------------------*
+impouterloop:
+; impouterloop: .trip 9 ;not pipelined, 19 packets to here
+ MV .L2X A9,B4 ; |665| sptr1 => samptr[start+i]
+
+ MVC .S2 CSR,B1 ; |667|
+|| ZERO .L1 A3 ; |664|
+|| ZERO .L2 B7 ; |663| zero accumulators each i
+|| ADDAB .D1 A7,A8,A5 ; |667| tptr => tseq[offset]
+|| MV .D2 B9,B0 ; |666| set inner loop length
+
+ AND .L2 -2,B1,B5 ; |667|
+
+ MVC .S2 B5,CSR ; |667|
+|| SUB .L2 B0,13,B0 ; |667|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : impinnerloop
+;* Known Minimum Trip Count : 16
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 1
+;* Partitioned Resource Bound(*) : 1
+;* Resource Partition:
+;* A-side B-side
+;* .L units 0 0
+;* .S units 1* 0
+;* .D units 1* 1*
+;* .M units 1* 1*
+;* .X cross paths 1* 1*
+;* .T address paths 1* 1*
+;* Long read paths 0 0
+;* Long write paths 0 0
+;* Logical ops (.LS) 0 0 (.L or .S unit)
+;* Addition ops (.LSD) 1 2 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1* 0
+;* Bound(.L .S .D .LS .LSD) 1* 1*
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 1 Schedule found with 8 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : 32
+;*
+;*----------------------------------------------------------------------------*
+L13: ; PIPED LOOP PROLOG
+; impinnerloop: .trip 16 ;7+7/13 kernel:1
+
+ LDB .D1T1 *A5++,A0 ; |686| temp is max +/- 128
+|| LDW .D2T2 *B4++,B6 ; |692| load Q:I packed in a word
+
+ LDB .D1T1 *A5++,A0 ;@ |686| temp is max +/- 128
+|| LDW .D2T2 *B4++,B6 ;@ |692| load Q:I packed in a word
+
+ [ B0] B .S1 impinnerloop ; |699|
+|| LDB .D1T1 *A5++,A0 ;@@ |686| temp is max +/- 128
+|| LDW .D2T2 *B4++,B6 ;@@ |692| load Q:I packed in a word
+
+ [ B0] B .S1 impinnerloop ;@ |699|
+|| LDB .D1T1 *A5++,A0 ;@@@ |686| temp is max +/- 128
+|| LDW .D2T2 *B4++,B6 ;@@@ |692| load Q:I packed in a word
+
+ [ B0] B .S1 impinnerloop ;@@ |699|
+|| LDB .D1T1 *A5++,A0 ;@@@@ |686| temp is max +/- 128
+|| LDW .D2T2 *B4++,B6 ;@@@@ |692| load Q:I packed in a word
+
+ MPY .M2X B6,A0,B5 ; |693|
+|| MPYHL .M1X B6,A0,A4 ; |695| += s[start+i+j].I*tseq[offset+j]
+|| [ B0] B .S1 impinnerloop ;@@@ |699|
+|| LDB .D1T1 *A5++,A0 ;@@@@@ |686| temp is max +/- 128
+|| LDW .D2T2 *B4++,B6 ;@@@@@ |692| load Q:I packed in a word
+
+ MPY .M2X B6,A0,B5 ;@ |693|
+|| MPYHL .M1X B6,A0,A4 ;@ |695| += s[start+i+j].I*tseq[offset+j]
+|| [ B0] B .S1 impinnerloop ;@@@@ |699|
+|| LDB .D1T1 *A5++,A0 ;@@@@@@ |686| temp is max +/- 128
+|| LDW .D2T2 *B4++,B6 ;@@@@@@ |692| load Q:I packed in a word
+
+;** --------------------------------------------------------------------------*
+impinnerloop: ; PIPED LOOP KERNEL
+
+ ADD .L2 B7,B5,B7 ; |694| resI[j]
+|| ADD .L1 A3,A4,A3 ; |696| resQ[j]
+|| MPY .M2X B6,A0,B5 ;@@ |693|
+|| MPYHL .M1X B6,A0,A4 ;@@ |695| += s[start+i+j].I*tseq[offset+j]
+|| [ B0] B .S1 impinnerloop ;@@@@@ |699|
+|| [ B0] SUB .S2 B0,0x1,B0 ;@@@@@@ |698| inner loop (cirNumTseqBits)
+|| LDB .D1T1 *A5++,A0 ;@@@@@@@ |686| temp is max +/- 128
+|| LDW .D2T2 *B4++,B6 ;@@@@@@@ |692| load Q:I packed in a word
+
+;** --------------------------------------------------------------------------*
+L15: ; PIPED LOOP EPILOG
+
+ ADD .L2 B7,B5,B7 ;@ |694| resI[j]
+|| ADD .L1 A3,A4,A3 ;@ |696| resQ[j]
+|| MPY .M2X B6,A0,B5 ;@@@ |693|
+|| MPYHL .M1X B6,A0,A4 ;@@@ |695| += s[start+i+j].I*tseq[offset+j]
+
+ ADD .L2 B7,B5,B7 ;@@ |694| resI[j]
+|| ADD .L1 A3,A4,A3 ;@@ |696| resQ[j]
+|| MPY .M2X B6,A0,B5 ;@@@@ |693|
+|| MPYHL .M1X B6,A0,A4 ;@@@@ |695| += s[start+i+j].I*tseq[offset+j]
+
+ ADD .L2 B7,B5,B7 ;@@@ |694| resI[j]
+|| ADD .L1 A3,A4,A3 ;@@@ |696| resQ[j]
+|| MPY .M2X B6,A0,B5 ;@@@@@ |693|
+|| MPYHL .M1X B6,A0,A4 ;@@@@@ |695| += s[start+i+j].I*tseq[offset+j]
+
+ ADD .L2 B7,B5,B7 ;@@@@ |694| resI[j]
+|| ADD .L1 A3,A4,A3 ;@@@@ |696| resQ[j]
+|| MPY .M2X B6,A0,B5 ;@@@@@@ |693|
+|| MPYHL .M1X B6,A0,A4 ;@@@@@@ |695| += s[start+i+j].I*tseq[offset+j]
+
+ ADD .L2 B7,B5,B7 ;@@@@@ |694| resI[j]
+|| ADD .L1 A3,A4,A3 ;@@@@@ |696| resQ[j]
+|| MPY .M2X B6,A0,B5 ;@@@@@@@ |693|
+|| MPYHL .M1X B6,A0,A4 ;@@@@@@@ |695| += s[start+i+j].I*tseq[offset+j]
+
+ ADD .L2 B7,B5,B7 ;@@@@@@ |694| resI[j]
+|| ADD .L1 A3,A4,A3 ;@@@@@@ |696| resQ[j]
+
+ ADD .L2 B7,B5,B7 ;@@@@@@@ |694| resI[j]
+|| ADD .L1 A3,A4,A3 ;@@@@@@@ |696| resQ[j]
+
+;** --------------------------------------------------------------------------*
+
+ MV .L2X A6,B4
+|| MVC .S2 B1,CSR ; |667|
+
+ MPYU .M2 B4,B7,B0 ; |722| itemp = nbinv*lo(resI)
+|| MPYLH .M1X A6,B7,A0 ; |724| qtemp = nbinv*hi(resI)
+|| SUB .L1 A1,0x1,A1 ; |743| outer loop (cirLength)
+
+ [ A1] B .S1 impouterloop ; |744|
+|| MPYU .M1X B4,A3,A2 ; |734| itemp1 = nbinv*lo(resQ)
+|| MV .L2X A6,B5 ; |724|
+
+ SHRU .S2 B0,0x10,B6 ; |725| result = low part
+|| MPYLH .M2X B5,A3,B5 ; |736| qtemp = nbinv*hi(resQ)
+
+ EXTU .S2 B0,0x10,0x1f,B4 ; |723| itemp bit 15 in round
+|| SHRU .S1 A2,0x10,A3 ; |737| result1 = low part
+|| ADD .L2X B6,A0,B6 ; |725|
+
+ ADD .L2 B6,B4,B6 ; |727| round for word shift
+|| ADD .L1X A3,B5,A3 ; |737|
+|| EXTU .S1 A2,0x10,0x1f,A0 ; |735| itemp1 bit 15 in round1
+
+ ADD .L1 A3,A0,A3 ; |739| round for word shift
+|| STH .D2T2 B6,*B8++ ; |728| save in cir[i].I
+
+ STH .D2T1 A3,*B8++ ; |740| save in cir[i].Q
+|| ADDAW .D1 A9,1,A9 ; |742| sptr => samptr[start+i]
+
+ ; BRANCH OCCURS ; |744|
+;** --------------------------------------------------------------------------*
+ B .S2 B3
+ NOP 5
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _Energy *
+;* *
+;* Regs Modified : A0,A1,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B4,B5,B6,B7,B8, *
+;* B9 *
+;* Regs Used : A0,A1,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B3,B4,B5,B6,B7, *
+;* B8,B9 *
+;******************************************************************************
+_Energy:
+;** --------------------------------------------------------------------------*
+;
+;/*************************************************************************
+;*
+;* Energy() :
+;* --------
+;* Compute the energy of the impulse response, the array which is
+;* the complex magnitude of each cir entry.
+;*
+;* Find the highest energy window of length CIR_SIZE
+;*
+;* Input data: The channel impulse response: cir[2][CIR_LENGTH]
+;*
+;* Output data: Energy of the impulse response: leng[CIR_LENGTH]
+;* Position of the best: returned by the function
+;*
+;***************************************************************************/
+;Char Energy
+;(
+; t_ULCirSamp cir[MAX_CIR_LENGTH],
+; LWord energy_L[MAX_CIR_LENGTH]
+;);
+;
+; _Energy .cproc cirptr,nrgptr ;returns Char
+; .reg length ; const: length of cir
+; .reg maxcirlen ; const: length of longest possible cir
+; .reg cirsize ; const: width of NB cir window
+; .reg cptr0 ; temp pointers to cir
+; .reg cptr1 ;
+; .reg nptr0 ; temp pointers to energy array
+; .reg nptr1
+; .reg itemp ; temp storage
+; .reg qtemp
+; .reg result2
+; .reg curidx ; current idx+1 in find best window
+; .reg res1:res0 ; long accumulators
+; .reg key1:key0
+; .reg tmp1:tmp0
+; .reg loopcnt ; holds loop counter
+; .reg best ; return register for energy window
+; .reg smaller ; condition registers
+; .reg uprdiff
+; .reg oddcir
+; .reg new,new1,new2,new3
+; .reg bcp
+; .reg ccp
+ MVK .S2 _g_BConsts_pt,B5 ; |800|
+
+ MVKH .S2 _g_BConsts_pt,B5 ; |801| load address of pointer
+|| MVK .S1 _c_asm_consts,A3 ; |803|
+
+ LDW .D2T2 *B5,B5 ; |802| load pointer to burst constants
+|| MVKH .S1 _c_asm_consts,A3 ; |804| load address of C constants
+
+ LDW .D1T1 *+A3(16),A0 ; |806|
+ NOP 3
+ MV .L1X B5,A5
+ LDBU .D1T2 *+A5[A0],B8 ; |807|
+ NOP 4
+ CMPGTU .L1X B8,5,A1 ; |828|
+ [ A1] B .S1 L22 ; |828|
+ NOP 4
+
+ MV .L2 B8,B0 ; |828|
+|| MV .L1X B4,A0 ; |771|
+|| LDW .D1T2 *+A3(56),B9 ; |809|
+|| MV .S2 B4,B1 ; |771|
+
+ ; BRANCH OCCURS ; |828|
+;** --------------------------------------------------------------------------*
+L20:
+; nrgcomploop: .trip 4 ; 8+8/7 kernel:2
+ LDW .D1T2 *A4++,B5 ; |833|
+ NOP 3
+ SUB .L2 B0,0x1,B0 ; |839| do this cirLength times
+
+ [ B0] B .S1 L20 ; |840|
+|| MV .L1X B5,A5
+
+ MV .L2 B5,B4
+|| MV .L1X B5,A3
+
+ SMPYH .M2 B5,B4,B5 ; |835| new2 = cir[i+1].Q*cir[i+1].Q
+|| SMPY .M1 A3,A5,A3 ; |834| new1 = cir[i+1].I*cir[i+1].I
+
+ NOP 1
+ ADD .L1X B5,A3,A3 ; |836|
+ STW .D1T1 A3,*A0++ ; |837| energy_L[i]= |cir[i+1]|^2
+ ; BRANCH OCCURS ; |840|
+;** --------------------------------------------------------------------------*
+ B .S1 L28 ; |840|
+
+ MV .L1X B1,A0 ; |859| nptr0 => energy_L[0]
+|| ZERO .L2 B7:B6 ; |856| zero accumulators, best idx
+
+ MV .S1X B6,A6 ; |861|
+|| SUB .L2 B8,B9,B0 ; |861| cirLength-CIR_SIZE loops
+|| ADDAW .D2 B1,B9,B5 ; |860| nptr1 => energy_L[CIR_SIZE]
+|| ZERO .L1 A5:A4 ; |855| prepare find max energy loop
+
+ MVC .S2 CSR,B8 ; |861|
+|| MV .L2X A4,B6 ; |861|
+|| MV .D1 A4,A3 ; |861|
+|| MV .L1X B7,A7 ; |861|
+|| MVK .S1 0x1,A8 ; |858| init return index value
+|| ZERO .D2 B4 ; |857|
+
+ AND .L2 -2,B8,B7 ; |861|
+
+ MVC .S2 B7,CSR ; |861|
+|| SUB .L2 B0,3,B0 ; |861|
+
+ ; BRANCH OCCURS ; |840|
+;** --------------------------------------------------------------------------*
+L22:
+
+ MVC .S2 CSR,B2 ; |840|
+|| MV .L2X A0,B7 ; |840|
+
+ AND .L2 -2,B2,B4 ; |840|
+
+ MVC .S2 B4,CSR ; |840|
+|| SUB .L2 B0,5,B0 ; |840|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : nrgcomploop
+;* Known Minimum Trip Count : 4
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 1
+;* Partitioned Resource Bound(*) : 2
+;* Resource Partition:
+;* A-side B-side
+;* .L units 0 0
+;* .S units 1 0
+;* .D units 1 1
+;* .M units 1 1
+;* .X cross paths 1 2*
+;* .T address paths 1 1
+;* Long read paths 0 1
+;* Long write paths 0 0
+;* Logical ops (.LS) 1 2 (.L or .S unit)
+;* Addition ops (.LSD) 0 1 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1 1
+;* Bound(.L .S .D .LS .LSD) 1 2*
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 2 Schedule found with 6 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : 32
+;*
+;*----------------------------------------------------------------------------*
+L23: ; PIPED LOOP PROLOG
+ LDW .D1T1 *A4++,A3 ; |833| new = cir[i+1].Q:cir[i+1].I
+ NOP 1
+ LDW .D1T1 *A4++,A3 ;@ |833| new = cir[i+1].Q:cir[i+1].I
+ NOP 1
+ LDW .D1T1 *A4++,A3 ;@@ |833| new = cir[i+1].Q:cir[i+1].I
+
+ [ B0] SUB .S2 B0,0x1,B0 ; |839| do this cirLength times
+|| SMPY .M1 A3,A3,A0 ; |834| new1 = cir[i+1].I*cir[i+1].I
+|| MV .L2X A3,B5 ; |861|
+
+ [ B0] B .S1 nrgcomploop ; |840|
+|| LDW .D1T1 *A4++,A3 ;@@@ |833| new = cir[i+1].Q:cir[i+1].I
+
+ SMPYH .M2 B5,B5,B6 ; |835| new2 = cir[i+1].Q*cir[i+1].Q
+|| [ B0] SUB .S2 B0,0x1,B0 ;@ |839| do this cirLength times
+|| SMPY .M1 A3,A3,A0 ;@ |834| new1 = cir[i+1].I*cir[i+1].I
+|| MV .L2X A3,B5 ;@ |861|
+
+ MV .L1 A0,A5 ; |861|
+|| [ B0] B .S1 nrgcomploop ;@ |840|
+|| LDW .D1T1 *A4++,A3 ;@@@@ |833| new = cir[i+1].Q:cir[i+1].I
+
+ ADD .L1X B6,A5,A3 ; |836| new3 = square mag cir[i+1]
+|| SMPYH .M2 B5,B5,B6 ;@ |835| new2 = cir[i+1].Q*cir[i+1].Q
+|| [ B0] SUB .S2 B0,0x1,B0 ;@@ |839| do this cirLength times
+|| SMPY .M1 A3,A3,A0 ;@@ |834| new1 = cir[i+1].I*cir[i+1].I
+|| MV .L2X A3,B5 ;@@ |861|
+
+;** --------------------------------------------------------------------------*
+nrgcomploop: ; PIPED LOOP KERNEL
+
+ MV .L2X A3,B4 ; |861|
+|| MV .L1 A0,A5 ;@ |861|
+|| [ B0] B .S1 nrgcomploop ;@@ |840|
+|| LDW .D1T1 *A4++,A3 ;@@@@@ |833| new = cir[i+1].Q:cir[i+1].I
+
+ STW .D2T2 B4,*B7++ ; |837| energy_L[i]= |cir[i+1]|^2
+|| ADD .L1X B6,A5,A3 ;@ |836| new3 = square mag cir[i+1]
+|| SMPYH .M2 B5,B5,B6 ;@@ |835| new2 = cir[i+1].Q*cir[i+1].Q
+|| [ B0] SUB .S2 B0,0x1,B0 ;@@@ |839| do this cirLength times
+|| SMPY .M1 A3,A3,A0 ;@@@ |834| new1 = cir[i+1].I*cir[i+1].I
+|| MV .L2X A3,B5 ;@@@ |861|
+
+;** --------------------------------------------------------------------------*
+L25: ; PIPED LOOP EPILOG
+
+ MV .L2X A3,B4 ;@ |861|
+|| MV .L1 A0,A5 ;@@ |861|
+
+ STW .D2T2 B4,*B7++ ;@ |837| energy_L[i]= |cir[i+1]|^2
+|| ADD .L1X B6,A5,A3 ;@@ |836| new3 = square mag cir[i+1]
+|| SMPYH .M2 B5,B5,B6 ;@@@ |835| new2 = cir[i+1].Q*cir[i+1].Q
+|| SMPY .M1 A3,A3,A0 ;@@@@ |834| new1 = cir[i+1].I*cir[i+1].I
+|| MV .L2X A3,B5 ;@@@@ |861|
+
+ MV .L2X A3,B4 ;@@ |861|
+|| MV .L1 A0,A5 ;@@@ |861|
+
+ STW .D2T2 B4,*B7++ ;@@ |837| energy_L[i]= |cir[i+1]|^2
+|| ADD .L1X B6,A5,A3 ;@@@ |836| new3 = square mag cir[i+1]
+|| SMPYH .M2 B5,B5,B6 ;@@@@ |835| new2 = cir[i+1].Q*cir[i+1].Q
+|| SMPY .M1 A3,A3,A0 ;@@@@@ |834| new1 = cir[i+1].I*cir[i+1].I
+|| MV .L2X A3,B5 ;@@@@@ |861|
+
+ MV .L2X A3,B4 ;@@@ |861|
+|| MV .L1 A0,A5 ;@@@@ |861|
+
+ STW .D2T2 B4,*B7++ ;@@@ |837| energy_L[i]= |cir[i+1]|^2
+|| ADD .L1X B6,A5,A3 ;@@@@ |836| new3 = square mag cir[i+1]
+|| SMPYH .M2 B5,B5,B6 ;@@@@@ |835| new2 = cir[i+1].Q*cir[i+1].Q
+
+ MV .L2X A3,B4 ;@@@@ |861|
+|| MV .L1 A0,A5 ;@@@@@ |861|
+
+ STW .D2T2 B4,*B7++ ;@@@@ |837| energy_L[i]= |cir[i+1]|^2
+|| ADD .L1X B6,A5,A3 ;@@@@@ |836| new3 = square mag cir[i+1]
+
+ MV .L2X A3,B4 ;@@@@@ |861|
+ STW .D2T2 B4,*B7++ ;@@@@@ |837| energy_L[i]= |cir[i+1]|^2
+;** --------------------------------------------------------------------------*
+ MVC .S2 B2,CSR ; |840|
+;** --------------------------------------------------------------------------*
+L27:
+
+ MV .L1X B1,A0 ; |859| nptr0 => energy_L[0]
+|| ZERO .L2 B7:B6 ; |856| zero accumulators, best idx
+
+ MV .S1X B6,A6 ; |861|
+|| SUB .L2 B8,B9,B0 ; |861| cirLength-CIR_SIZE loops
+|| ADDAW .D2 B1,B9,B5 ; |860| nptr1 => energy_L[CIR_SIZE]
+|| ZERO .L1 A5:A4 ; |855| prepare find max energy loop
+
+ MVC .S2 CSR,B8 ; |861|
+|| MV .L2X A4,B6 ; |861|
+|| MV .D1 A4,A3 ; |861|
+|| MV .L1X B7,A7 ; |861|
+|| MVK .S1 0x1,A8 ; |858| init return index value
+|| ZERO .D2 B4 ; |857|
+
+ AND .L2 -2,B8,B7 ; |861|
+
+ MVC .S2 B7,CSR ; |861|
+|| SUB .L2 B0,3,B0 ; |861|
+
+;** --------------------------------------------------------------------------*
+L28:
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : findbestloop
+;* Known Minimum Trip Count : 4
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 3
+;* Unpartitioned Resource Bound : 2
+;* Partitioned Resource Bound(*) : 3
+;* Resource Partition:
+;* A-side B-side
+;* .L units 2 1
+;* .S units 1 1
+;* .D units 1 1
+;* .M units 0 0
+;* .X cross paths 1 3*
+;* .T address paths 1 1
+;* Long read paths 2 0
+;* Long write paths 2 0
+;* Logical ops (.LS) 0 2 (.L or .S unit)
+;* Addition ops (.LSD) 2 1 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 2 2
+;* Bound(.L .S .D .LS .LSD) 2 2
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 3 Schedule found with 4 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : 32
+;*
+;*----------------------------------------------------------------------------*
+L29: ; PIPED LOOP PROLOG
+; findbestloop: .trip 4 ;7+7/1 kernel:7
+
+ LDW .D1T1 *A0++,A9 ; |869| energy_L[i+CIR_SIZE] -
+|| LDW .D2T2 *B5++,B7 ; |870| energy_L[i]
+
+ NOP 2
+
+ LDW .D1T1 *A0++,A9 ;@ |869| energy_L[i+CIR_SIZE] -
+|| LDW .D2T2 *B5++,B7 ;@ |870| energy_L[i]
+
+ [ B0] SUB .S2 B0,0x1,B0 ; |892| downcount and loop
+
+ [ B0] B .S2 findbestloop ; |893|
+|| SUB .L1X B7,A9,A5 ; |871|
+
+ ADD .L1 A5,A7:A6,A7:A6 ; |872| accumlated into res1:res0
+|| LDW .D1T1 *A0++,A9 ;@@ |869| energy_L[i+CIR_SIZE] -
+|| LDW .D2T2 *B5++,B7 ;@@ |870| energy_L[i]
+
+ SHR .S1 A7:A6,0x8,A5:A4 ; |878|
+|| [ B0] SUB .S2 B0,0x1,B0 ;@ |892| downcount and loop
+
+;** --------------------------------------------------------------------------*
+findbestloop: ; PIPED LOOP KERNEL
+
+ CMPLT .L2X A4,B6,B1 ; ^ |879|
+|| [ B0] B .S2 findbestloop ;@ |893|
+|| SUB .L1X B7,A9,A5 ;@ |871|
+
+ [!B1] MV .L2X A8,B4 ; |889| save best index+1 so far
+|| [!B1] MV .S1 A4,A3 ; ^ |888| if result exceeds key, replace
+|| ADD .L1 A5,A7:A6,A7:A6 ;@ |872| accumlated into res1:res0
+|| LDW .D1T1 *A0++,A9 ;@@@ |869| energy_L[i+CIR_SIZE] -
+|| LDW .D2T2 *B5++,B7 ;@@@ |870| energy_L[i]
+
+ ADD .L1 0x1,A8,A8 ; |891|
+|| [!B1] MV .L2X A3,B6 ; ^ |771|
+|| SHR .S1 A7:A6,0x8,A5:A4 ;@ |878|
+|| [ B0] SUB .S2 B0,0x1,B0 ;@@ |892| downcount and loop
+
+;** --------------------------------------------------------------------------*
+L31: ; PIPED LOOP EPILOG
+
+ CMPLT .L2X A4,B6,B1 ;@ ^ |879|
+|| SUB .L1X B7,A9,A5 ;@@ |871|
+
+ [!B1] MV .L2X A8,B4 ;@ |889| save best index+1 so far
+|| [!B1] MV .S1 A4,A3 ;@ ^ |888| if result exceeds key, replace
+|| ADD .L1 A5,A7:A6,A7:A6 ;@@ |872| accumlated into res1:res0
+
+ ADD .L1 0x1,A8,A8 ;@ |891|
+|| [!B1] MV .L2X A3,B6 ;@ ^ |771|
+|| SHR .S1 A7:A6,0x8,A5:A4 ;@@ |878|
+
+ CMPLT .L2X A4,B6,B1 ;@@ ^ |879|
+|| SUB .L1X B7,A9,A5 ;@@@ |871|
+
+ [!B1] MV .L2X A8,B4 ;@@ |889| save best index+1 so far
+|| [!B1] MV .S1 A4,A3 ;@@ ^ |888| if result exceeds key, replace
+|| ADD .L1 A5,A7:A6,A7:A6 ;@@@ |872| accumlated into res1:res0
+
+ ADD .L1 0x1,A8,A8 ;@@ |891|
+|| [!B1] MV .L2X A3,B6 ;@@ ^ |771|
+|| SHR .S1 A7:A6,0x8,A5:A4 ;@@@ |878|
+
+ CMPLT .L2X A4,B6,B1 ;@@@ ^ |879|
+
+ [!B1] MV .L2X A8,B4 ;@@@ |889| save best index+1 so far
+|| [!B1] MV .S1 A4,A3 ;@@@ ^ |888| if result exceeds key, replace
+
+ ADD .L1 0x1,A8,A8 ;@@@ |891|
+|| [!B1] MV .L2X A3,B6 ;@@@ ^ |771|
+
+;** --------------------------------------------------------------------------*
+ MVC .S2 B8,CSR ; |861|
+;** --------------------------------------------------------------------------*
+ B .S2 B3
+ NOP 4
+ MV .L1X B4,A4 ; |897|
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _normEnergy *
+;* *
+;* Regs Modified : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A11,A12,A13,A14,A15,B0,*
+;* B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,SP *
+;* Regs Used : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14, *
+;* A15,B0,B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12, *
+;* B13,SP *
+;******************************************************************************
+_normEnergy:
+;** --------------------------------------------------------------------------*
+;
+;/*************************************************************************
+;*
+;* normEnergy : REQUIRED C-stub, (no calls allowed from linear assembly)
+;* --------- calls energyAccumed, thresholdCir, mag2DB, expX
+;*
+;* Threshold the lowest energies of the window found in Energy()
+;* and we compute the sum of the energies of this window
+;* and split it into mantissa * 2^exponent
+;*
+;* Input data: - Derotated samples : samples[2][MAX_NUM_DATA]
+;* - Channel impulse response : cir[2][CIR_LENGTH
+;* - Energy of the impulse response : energy_L[CIR_LENGTH]
+;* - Position of the best .. : indexBest
+;*
+;* Output data: - Thresholded Cir : cir[2][CIR_LENGTH]
+;* - First non zero Cir (or begin of the burst) : toa
+;* - average power in dB: power
+;* - exponent
+;*
+;* Returned data : mantInv = 1/Mantissa, (1 < mantInv <= 2)
+;*
+;*
+;* "toa" is returned for measurement reporting only.
+;* If "toa" is not equal to indexBest, for many bursts,
+;* then this indicates that the mobile should adjust it's
+;* timing advance.
+;*
+;***************************************************************************/
+;UWord2 normEnergy
+;(
+; t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+; t_ULCirSamp cir[MAX_CIR_LENGTH],
+; t_ULCirSamp cirTemp[MAX_CIR_LENGTH],
+; LWord2 energy_L[MAX_CIR_LENGTH],
+; Char indexBest,
+; Word *toa,
+; Word14 *power,
+; Short *exponent
+;);
+; _normEnergy .cproc samptr,cirptr,ocirptr,nrgptr,best,toaptr,pwrptr,expptr ; returns UWord2
+; .reg ntbits ; const: g_BConsts_pt->cirNumTseqBits
+; .reg nbinv ; const: g_BConsts_pt->cirNumTseqBitsInv (65536/ntbits)
+; .reg cirstrt ; const: g_BConsts_pt->cirStartIndex
+; .reg nsignb ; const: g_BConsts_pt->numTailBits (3/8/3)
+; .reg mintoa ; const: g_BConsts_pt->toaMin (-2/0/0)
+; .reg guardb ; const: ACCUM_GUARD_BITS (8)
+; .reg wsize ; const: WORD_SIZE (16)
+; .reg lbits ; const: 2*WORD_SIZE+ACCUM_GUARDBITS (40)
+; .reg nrgpct ; const: ENERGY_THRESHOLD_PERCENT
+; .reg thrfmt ; const: E_THRESH_FORMAT
+; .reg cbstlen ; const: CIR_BEST_LENGTH
+; .reg maxcir ; const: MAX_CIR_LENGTH
+; .reg sptr ; sample/energy pointer
+; .reg cptr ; cir pointer
+; .reg ocptr ; saved cir pointer
+; .reg acc1:acc0 ; one of two long accumulators
+; .reg res1:res0 ; the other long accumulator
+; .reg result ; 32 bit storage
+; .reg result1 ; " " "
+; .reg temp
+; .reg itemp ; " " "
+; .reg itemp1 ; " " "
+; .reg qtemp ; " " "
+; .reg cond ; conditions
+; .reg cond1 ;
+; .reg allzero ;
+; .reg loopcnt ; loop downcounter
+; .reg one
+; .reg bcp ; constants pointers
+; .reg ccp
+; .reg oldbest
+; .reg icnt,jcnt
+
+ STW .D2T2 B13,*SP--(48) ; |940|
+|| MVK .S1 _c_asm_consts,A3 ; |996|
+
+ STW .D2T1 A12,*+SP(16) ; |940|
+|| MVKH .S1 _c_asm_consts,A3 ; |997| load address of C constants
+
+ LDW .D1T1 *+A3(64),A5 ; |1010|
+|| STW .D2T2 B3,*+SP(32) ; |940|
+
+ STW .D2T1 A14,*+SP(24) ; |940|
+|| MVK .S2 _g_BConsts_pt,B5 ; |993|
+
+ STW .D2T1 A11,*+SP(12) ; |940|
+|| MV .L2X A3,B4 ; |999|
+|| MV .S2 B4,B3 ; |940|
+
+ LDW .D2T1 *+B4(68),A2 ; |1009|
+|| MV .L1 A6,A12 ; |940|
+|| MV .S1X B5,A0 ; |997|
+
+ LDW .D1T1 *+A3(20),A6 ; |999|
+|| MVKH .S1 _g_BConsts_pt,A0 ; |994| load address of pointer
+
+ LDW .D1T1 *A0,A0 ; |995|
+|| STW .D2T2 B10,*+SP(36) ; |940|
+
+ STW .D2T1 A5,*+SP(4) ; |1010|
+ STW .D2T2 B11,*+SP(40) ; |940|
+
+ STW .D2T2 B12,*+SP(44) ; |940|
+|| MV .L2X A3,B4 ; |1010|
+
+ LDW .D1T1 *+A3(4),A5 ; |1001|
+|| LDW .D2T2 *+B4(8),B7 ; |1003|
+
+ LDW .D2T2 *+B4(72),B1 ; |1012|
+|| LDBU .D1T1 *+A0[A6],A7 ; |1000|
+
+ LDW .D2T2 *+B4(24),B5 ; |1006|
+
+ LDW .D2T1 *+SP(4),A6 ; |1014|
+|| LDW .D1T2 *+A3(76),B9 ; |1013|
+|| MV .L1X B10,A14 ; |940|
+
+ LDW .D1T2 *+A3(60),B10 ; |1014|
+|| STW .D2T1 A13,*+SP(20) ; |940|
+
+ MV .L2X A0,B4 ; |1016|
+|| LDBU .D1T2 *+A0[A5],B0 ; |1002|
+|| STW .D2T1 A15,*+SP(28) ; |940|
+
+ MV .L1 A8,A0 ; |1002|
+|| ADDAW .D1 A4,A7,A3 ; |1024|
+|| ADDAB .D2 B4,B7,B7 ; |1004|
+|| MV .L2 B8,B2 ; |940|
+
+ ADDAW .D1 A3,A0,A3 ; |1025|
+|| ZERO .L2 B5:B4 ; |1030|
+|| LDB .D2T1 *+B4[B5],A11 ; |1007|
+|| MV .L1X B6,A13 ; |940|
+|| MV .S2X A8,B13 ; |1002|
+
+ MVC .S2 CSR,B6 ; |1030|
+|| MV .S1 A3,A4 ; |1030|
+|| MV .L2X A3,B8 ; |1030|
+|| ZERO .L1 A1:A0 ; |1029| zero the accumulators
+|| LDHU .D2T1 *B7,A15 ; |1005|
+|| ADDAH .D1 A2,A6,A6 ; |1016|
+
+ MV .L1X B6,A7 ; |1030|
+ AND .L1 -2,A7,A3 ; |1030|
+
+ MVC .S2X A3,CSR ; |1030|
+|| ADD .L2 2,B8,B8 ; |1030|
+|| SUB .D2 B0,13,B0 ; |1030|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : accnrgloop
+;* Known Minimum Trip Count : 16
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 1
+;* Partitioned Resource Bound(*) : 1
+;* Resource Partition:
+;* A-side B-side
+;* .L units 1* 1*
+;* .S units 1* 1*
+;* .D units 1* 1*
+;* .M units 1* 1*
+;* .X cross paths 0 0
+;* .T address paths 1* 1*
+;* Long read paths 1* 1*
+;* Long write paths 1* 1*
+;* Logical ops (.LS) 0 0 (.L or .S unit)
+;* Addition ops (.LSD) 0 0 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1* 1*
+;* Bound(.L .S .D .LS .LSD) 1* 1*
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 1 Schedule found with 8 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : Unknown
+;*
+;*----------------------------------------------------------------------------*
+L36: ; PIPED LOOP PROLOG
+; accnrgloop: .trip 16 ; 7+7/7, kernel:1
+
+ LDH .D1T1 *A4++(4),A3 ; |1053|
+|| LDH .D2T2 *B8++(4),B7 ; |1054|
+
+ LDH .D1T1 *A4++(4),A3 ;@ |1053|
+|| LDH .D2T2 *B8++(4),B7 ;@ |1054|
+
+ [ B0] B .S1 accnrgloop ; |1062|
+|| LDH .D1T1 *A4++(4),A3 ;@@ |1053|
+|| LDH .D2T2 *B8++(4),B7 ;@@ |1054|
+
+ [ B0] B .S1 accnrgloop ;@ |1062|
+|| LDH .D1T1 *A4++(4),A3 ;@@@ |1053|
+|| LDH .D2T2 *B8++(4),B7 ;@@@ |1054|
+
+ [ B0] B .S1 accnrgloop ;@@ |1062|
+|| LDH .D1T1 *A4++(4),A3 ;@@@@ |1053|
+|| LDH .D2T2 *B8++(4),B7 ;@@@@ |1054|
+
+ SMPY .M1 A3,A3,A5 ; |1056| sum squared magnitudes of
+|| SMPY .M2 B7,B7,B6 ; |1058|
+|| [ B0] B .S1 accnrgloop ;@@@ |1062|
+|| LDH .D1T1 *A4++(4),A3 ;@@@@@ |1053|
+|| LDH .D2T2 *B8++(4),B7 ;@@@@@ |1054|
+
+ SMPY .M1 A3,A3,A5 ;@ |1056| sum squared magnitudes of
+|| SMPY .M2 B7,B7,B6 ;@ |1058|
+|| [ B0] B .S1 accnrgloop ;@@@@ |1062|
+|| LDH .D1T1 *A4++(4),A3 ;@@@@@@ |1053|
+|| LDH .D2T2 *B8++(4),B7 ;@@@@@@ |1054|
+
+;** --------------------------------------------------------------------------*
+accnrgloop: ; PIPED LOOP KERNEL
+
+ SADD .L1 A5,A1:A0,A1:A0 ; |1057| samples over Tseq window
+|| SADD .L2 B6,B5:B4,B5:B4 ; |1059|
+|| SMPY .M1 A3,A3,A5 ;@@ |1056| sum squared magnitudes of
+|| SMPY .M2 B7,B7,B6 ;@@ |1058|
+|| [ B0] B .S1 accnrgloop ;@@@@@ |1062|
+|| [ B0] SUB .S2 B0,0x1,B0 ;@@@@@@ |1061|
+|| LDH .D1T1 *A4++(4),A3 ;@@@@@@@ |1053|
+|| LDH .D2T2 *B8++(4),B7 ;@@@@@@@ |1054|
+
+;** --------------------------------------------------------------------------*
+L38: ; PIPED LOOP EPILOG
+
+ SADD .L1 A5,A1:A0,A1:A0 ;@ |1057| samples over Tseq window
+|| SADD .L2 B6,B5:B4,B5:B4 ;@ |1059|
+|| SMPY .M1 A3,A3,A5 ;@@@ |1056| sum squared magnitudes of
+|| SMPY .M2 B7,B7,B6 ;@@@ |1058|
+
+ SADD .L1 A5,A1:A0,A1:A0 ;@@ |1057| samples over Tseq window
+|| SADD .L2 B6,B5:B4,B5:B4 ;@@ |1059|
+|| SMPY .M1 A3,A3,A5 ;@@@@ |1056| sum squared magnitudes of
+|| SMPY .M2 B7,B7,B6 ;@@@@ |1058|
+
+ SADD .L1 A5,A1:A0,A1:A0 ;@@@ |1057| samples over Tseq window
+|| SADD .L2 B6,B5:B4,B5:B4 ;@@@ |1059|
+|| SMPY .M1 A3,A3,A5 ;@@@@@ |1056| sum squared magnitudes of
+|| SMPY .M2 B7,B7,B6 ;@@@@@ |1058|
+
+ SADD .L1 A5,A1:A0,A1:A0 ;@@@@ |1057| samples over Tseq window
+|| SADD .L2 B6,B5:B4,B5:B4 ;@@@@ |1059|
+|| SMPY .M1 A3,A3,A5 ;@@@@@@ |1056| sum squared magnitudes of
+|| SMPY .M2 B7,B7,B6 ;@@@@@@ |1058|
+
+ SADD .L1 A5,A1:A0,A1:A0 ;@@@@@ |1057| samples over Tseq window
+|| SADD .L2 B6,B5:B4,B5:B4 ;@@@@@ |1059|
+|| SMPY .M1 A3,A3,A5 ;@@@@@@@ |1056| sum squared magnitudes of
+|| SMPY .M2 B7,B7,B6 ;@@@@@@@ |1058|
+
+ SADD .L1 A5,A1:A0,A1:A0 ;@@@@@@ |1057| samples over Tseq window
+|| SADD .L2 B6,B5:B4,B5:B4 ;@@@@@@ |1059|
+
+ SADD .L1 A5,A1:A0,A1:A0 ;@@@@@@@ |1057| samples over Tseq window
+|| SADD .L2 B6,B5:B4,B5:B4 ;@@@@@@@ |1059|
+
+;** --------------------------------------------------------------------------*
+
+ MV .L1X B4,A3
+|| MVC .S2X A7,CSR ; |1030|
+
+ SHRU .S1 A3,0x1,A3 ; |1068| unsigned half of res0
+ SADD .L1 A3,A1:A0,A1:A0 ; |1069| add lo part of one into other
+ SADD .L1 A3,A1:A0,A1:A0 ; |1070| add lo part of one into other
+
+ MV .L1 A1,A5 ; |1070|
+|| SHL .S2 B5,0x18,B5 ; |1072| so that we can
+
+ MV .L1X B5,A3 ; |1071|
+|| SHL .S1 A5,0x18,A5 ; |1071| make the high parts 8 MSBs
+
+ SADD .L1 A5,A3,A5 ; |1073| add them with saturation
+ SHRU .S1 A5,0x18,A5 ; |1074| shift back to 8 LSBs of acc1
+ MV .L1 A5,A1 ; |1074|
+ NORM .L1 A1:A0,A3 ; |1097|
+
+ MV .L1 A3,A4 ; |1097|
+|| MV .L2X A3,B8 ; |1097|
+
+ LDW .D2T1 *+SP(4),A3 ; |1097|
+ NOP 4
+
+ ADD .L1 A2,A3,A4 ; |1109|
+|| SHL .S1 A1:A0,A4,A1:A0 ; |1108|
+
+ SHRU .S1 A1:A0,A4,A1:A0 ; |1110| data in 16 LSBs of acc0 now
+ MPY .M1 A0,A15,A0 ; |1118| 32bit normed value in acc0
+ NOP 1
+
+ SHL .S1 A1:A0,A2,A1:A0 ; |1129| restore binary point
+|| MV .L1X B8,A3 ; |1129|
+
+ SHRU .S1 A1:A0,A3,A1:A0 ; |1130|
+ NORM .L1 A1:A0,A3 ; |1136|
+
+ SHL .S1 A1:A0,A3,A9:A8 ; |1147|
+|| SUB .L1 A6,0x4,A4 ; |1146|
+
+ SHR .S1 A9:A8,A4,A9:A8 ; |1148|
+|| MV .L2X A3,B8 ; |1136|
+|| MVK .S2 _logTable,B4 ; |1174| sptr => logTable[0]
+
+ MV .L2X A8,B4 ; |1148|
+|| MV .L1X B4,A3 ; |1148|
+
+ SUB .L1 A8,0x4,A4 ; |1148|
+|| MVKH .S1 _logTable,A3 ; |1175|
+|| MV .S2X A8,B7 ; |1148|
+|| CMPLT .L2 0x3,B4,B0 ; |1149|
+
+ MV .L1X B8,A3 ; |1179|
+|| [ B0] LDH .D1T2 *+A3[A4],B7 ; |1179| look up frac part
+|| SUB .L2X A6,0x2,B6 ; |1179|
+
+ MV .L2X A0,B5 ; |1163|
+|| MV .S2 B1,B4 ; |1163|
+|| SUB .L1X B6,A3,A3 ; |1159|
+
+ MPYLHU .M2 B4,B5,B4 ; |1193| energy is positive so
+|| MV .L1X B1,A6 ; |1193|
+
+ MPYU .M1 A6,A0,A0 ; |1192| short by long (40bit) mult
+|| SUBAB .D1 A3,31,A4 ; |1163| result = power
+
+ MPY .M1 0xc,A4,A4 ; |1164|
+|| MV .L2 B4,B6 ; |1193|
+
+ ZERO .L1 A9:A8 ; |1190|
+|| MV .L2X A0,B4 ; |1192|
+
+ SHL .S2 B6,0x10,B7 ; |1194| use unsigned operations
+|| [ B0] ADD .L1X A4,B7,A4 ; |1180| add to result
+|| MV .L2X A9,B5 ; |1193|
+
+ SHRU .S2 B6,0x10,B7 ; |1196| nrgpct/(1<<thrfmt) * sum
+|| ADDU .L2 B7,B5:B4,B5:B4 ; |1195|
+
+ MV .L2X A1,B6 ; |1196|
+|| ADD .S2 B5,B7,B5 ; |1197|
+
+ MPYU .M2 B1,B6,B7 ; |1198|
+ NOP 1
+ ADD .L2 B7,B5,B5 ; |1199|
+
+ SHRU .S2 B5:B4,B9,B5:B4 ; |1200|
+|| MV .L1X B13,A0 ; |1199|
+
+ MVK .S2 0x1,B1 ; |1228|
+|| ZERO .L1 A1:A0 ; |1232|
+|| ADDAW .D1 A13,A0,A3 ; |1221|
+|| MV .S1X B13,A7 ; |1199|
+
+ MV .L1 A1,A5 ; |1232|
+|| MV .S1X B3,A6 ; |1234|
+|| MV .L2 B1,B9 ; |1234|
+|| STH .D1T1 A4,*A10 ; |1182| store it at pwrptr
+|| MV .S2 B13,B11 ; |1208| save in case cir all < thresh
+
+ MVC .S2 CSR,B12 ; |1234|
+|| MV .L2X A3,B6 ; |1234|
+|| MV .L1 A12,A0 ; |1234|
+|| MV .D1 A0,A4 ; |1234|
+|| MV .S1X B10,A1 ; |1232|
+|| MV .D2 B13,B7 ; |1199|
+
+ AND .L2 -2,B12,B8 ; |1234|
+
+ MVC .S2 B8,CSR ; |1234|
+|| SUB .L1 A1,3,A1 ; |1234|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : threshcirloop
+;* Known Minimum Trip Count : 5
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 1
+;* Unpartitioned Resource Bound : 3
+;* Partitioned Resource Bound(*) : 3
+;* Resource Partition:
+;* A-side B-side
+;* .L units 1 1
+;* .S units 0 1
+;* .D units 3* 2
+;* .M units 0 0
+;* .X cross paths 1 0
+;* .T address paths 3* 2
+;* Long read paths 3* 2
+;* Long write paths 1 0
+;* Logical ops (.LS) 0 1 (.L or .S unit)
+;* Addition ops (.LSD) 4 3 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1 2
+;* Bound(.L .S .D .LS .LSD) 3* 3*
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 3 Register is live too long
+;* |1269| -> |1270|
+;* ii = 4 Schedule found with 3 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : Unknown
+;*
+;*----------------------------------------------------------------------------*
+L40: ; PIPED LOOP PROLOG
+; threshcirloop: .trip 5 ; 5+8/2 kernel:4
+ LDW .D2T2 *B6++,B8 ; |1260| get an energy element
+
+ MV .L1 A7,A8 ; ^ |1269| (this helps scheduling)
+|| LDW .D1T1 *+A6[A7],A3 ; ^ |1241| save this cir entry
+
+ NOP 1
+ [ A1] B .S2 threshcirloop ; |1274|
+
+ ADD .L1 0x1,A7,A7 ; ^ |1272|
+|| LDW .D2T2 *B6++,B8 ;@ |1260| get an energy element
+
+;** --------------------------------------------------------------------------*
+threshcirloop: ; PIPED LOOP KERNEL
+
+ MV .S1 A8,A9 ; |1302|
+|| ZERO .S2 B0 ; |1259| cond1 false by default
+|| CMPGT .L2 B8,B5:B4,B1 ; |1261| compare to threshold
+|| MV .L1 A7,A8 ;@ ^ |1269| (this helps scheduling)
+|| LDW .D1T1 *+A6[A7],A3 ;@ ^ |1241| save this cir entry
+
+ [ B1] ZERO .S2 B9 ; ^ |1266| allzero is no longer true
+|| [ B1] ADD .L1X B8,A5:A4,A5:A4 ; |1263| if greater, accumulate it
+|| [ B1] AND .L2 B1,B9,B0 ; ^ |1264| allzero if none greater yet
+|| [ A1] SUB .S1 A1,0x1,A1 ;@ |1273|
+
+ [!B1] ZERO .L1 A3 ; |1268| if not greater
+|| STW .D1T1 A3,*A0++ ; |1242|
+|| ADD .L2 1,B7,B7 ; ^ |1302|
+|| [ B0] STH .D2T2 B7,*B2 ; ^ |1265| if greater and allzero update
+|| [ A1] B .S2 threshcirloop ;@ |1274|
+
+ [!B1] STW .D1T1 A3,*+A6[A9] ; |1270| zero the cir entry
+|| ADD .L1 0x1,A7,A7 ;@ ^ |1272|
+|| LDW .D2T2 *B6++,B8 ;@@ |1260| get an energy element
+
+;** --------------------------------------------------------------------------*
+L42: ; PIPED LOOP EPILOG
+
+ MV .S1 A8,A9 ;@ |1302|
+|| ZERO .S2 B0 ;@ |1259| cond1 false by default
+|| CMPGT .L2 B8,B5:B4,B1 ;@ |1261| compare to threshold
+|| MV .L1 A7,A8 ;@@ ^ |1269| (this helps scheduling)
+|| LDW .D1T1 *+A6[A7],A3 ;@@ ^ |1241| save this cir entry
+
+ [ B1] ZERO .S2 B9 ;@ ^ |1266| allzero is no longer true
+|| [ B1] ADD .L1X B8,A5:A4,A5:A4 ;@ |1263| if greater, accumulate it
+|| [ B1] AND .L2 B1,B9,B0 ;@ ^ |1264| allzero if none greater yet
+
+ [!B1] ZERO .L1 A3 ;@ |1268| if not greater
+|| STW .D1T1 A3,*A0++ ;@ |1242|
+|| ADD .L2 1,B7,B7 ;@ ^ |1302|
+|| [ B0] STH .D2T2 B7,*B2 ;@ ^ |1265| if greater and allzero update
+
+ [!B1] STW .D1T1 A3,*+A6[A9] ;@ |1270| zero the cir entry
+|| ADD .L1 0x1,A7,A7 ;@@ ^ |1272|
+
+ MV .S1 A8,A9 ;@@ |1302|
+|| ZERO .S2 B0 ;@@ |1259| cond1 false by default
+|| CMPGT .L2 B8,B5:B4,B1 ;@@ |1261| compare to threshold
+
+ [ B1] ZERO .S2 B9 ;@@ ^ |1266| allzero is no longer true
+|| [ B1] ADD .L1X B8,A5:A4,A5:A4 ;@@ |1263| if greater, accumulate it
+|| [ B1] AND .L2 B1,B9,B0 ;@@ ^ |1264| allzero if none greater yet
+
+ [!B1] ZERO .L1 A3 ;@@ |1268| if not greater
+|| STW .D1T1 A3,*A0++ ;@@ |1242|
+|| ADD .L2 1,B7,B7 ;@@ ^ |1302|
+|| [ B0] STH .D2T2 B7,*B2 ;@@ ^ |1265| if greater and allzero update
+
+ [!B1] STW .D1T1 A3,*+A6[A9] ;@@ |1270| zero the cir entry
+;** --------------------------------------------------------------------------*
+
+ MV .L2 B9,B1 ; |1234|
+|| MVC .S2 B12,CSR ; |1234|
+
+ [!B1] B .S1 L50 ; |1295|
+
+ MV .L1 A4,A0 ; |1234|
+|| [!B1] MV .S1 A5,A1
+
+ [!B1] NORM .L1 A1:A0,A4 ; |1340|
+|| [ B1] ADDAH .D2 B3,B13,B3 ; |1296|
+|| [ B1] MV .L2 B10,B0 ; |1302|
+|| [ B1] MV .S1X B13,A3 ; |1297|
+
+ [!B1] SHL .S1 A1:A0,A4,A1:A0 ; |1344|
+|| [!B1] MV .L2X A4,B8 ; |1340|
+
+ [!B1] LDW .D2T1 *+SP(4),A4 ; |1345|
+ [!B1] LDH .D2T1 *B2,A3 ; |1322|
+ ; BRANCH OCCURS ; |1295|
+;** --------------------------------------------------------------------------*
+
+ MVC .S2 CSR,B7 ; |1302|
+|| MV .D2 B3,B4 ; |1302|
+|| ADDAW .D1 A13,A3,A3 ; |1299|
+|| MV .L2X A12,B5 ; |1302|
+|| MV .L1 A5,A1 ; |1302|
+
+ AND .L2 -2,B7,B6 ; |1302|
+
+ MVC .S2 B6,CSR ; |1302|
+|| SUB .L2 B0,4,B0 ; |1302|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : zerocirloop
+;* Known Minimum Trip Count : 5
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 2
+;* Partitioned Resource Bound(*) : 2
+;* Resource Partition:
+;* A-side B-side
+;* .L units 1 0
+;* .S units 1 0
+;* .D units 1 2*
+;* .M units 0 0
+;* .X cross paths 0 0
+;* .T address paths 1 2*
+;* Long read paths 1 1
+;* Long write paths 1 0
+;* Logical ops (.LS) 0 0 (.L or .S unit)
+;* Addition ops (.LSD) 0 1 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1 0
+;* Bound(.L .S .D .LS .LSD) 1 1
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 2 Schedule found with 4 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : 32
+;*
+;*----------------------------------------------------------------------------*
+L45: ; PIPED LOOP PROLOG
+; zerocirloop: .trip 5 ; 4+6/2 kernel:2
+
+ LDW .D2T2 *B5++,B6 ; |1305| time: 4 + cbstlen*2
+|| LDW .D1T1 *A3++,A4 ; |1308| accumulate old cir energy too
+|| [ B0] B .S1 zerocirloop ; |1312|
+
+ [ B0] SUB .L2 B0,0x1,B0 ;@ |1311|
+
+ LDW .D2T2 *B5++,B6 ;@ |1305| time: 4 + cbstlen*2
+|| LDW .D1T1 *A3++,A4 ;@ |1308| accumulate old cir energy too
+|| [ B0] B .S1 zerocirloop ;@ |1312|
+
+ [ B0] SUB .L2 B0,0x1,B0 ;@@ |1311|
+;** --------------------------------------------------------------------------*
+zerocirloop: ; PIPED LOOP KERNEL
+
+ LDW .D2T2 *B5++,B6 ;@@ |1305| time: 4 + cbstlen*2
+|| LDW .D1T1 *A3++,A4 ;@@ |1308| accumulate old cir energy too
+|| [ B0] B .S1 zerocirloop ;@@ |1312|
+
+ STW .D2T2 B6,*B4++ ; |1306| restore old cir
+|| ADD .L1 A4,A1:A0,A1:A0 ; |1309|
+|| [ B0] SUB .L2 B0,0x1,B0 ;@@@ |1311|
+
+;** --------------------------------------------------------------------------*
+L47: ; PIPED LOOP EPILOG
+
+ LDW .D2T2 *B5++,B6 ;@@@ |1305| time: 4 + cbstlen*2
+|| LDW .D1T1 *A3++,A4 ;@@@ |1308| accumulate old cir energy too
+
+ STW .D2T2 B6,*B4++ ;@ |1306| restore old cir
+|| ADD .L1 A4,A1:A0,A1:A0 ;@ |1309|
+
+ NOP 1
+
+ STW .D2T2 B6,*B4++ ;@@ |1306| restore old cir
+|| ADD .L1 A4,A1:A0,A1:A0 ;@@ |1309|
+
+ NOP 1
+
+ STW .D2T2 B6,*B4++ ;@@@ |1306| restore old cir
+|| ADD .L1 A4,A1:A0,A1:A0 ;@@@ |1309|
+
+;** --------------------------------------------------------------------------*
+
+ STH .D2T2 B11,*B2 ; |1314|
+|| MV .L1 A1,A5 ; |1302|
+|| MVC .S2 B7,CSR ; |1302|
+
+;** --------------------------------------------------------------------------*
+nozerocir:
+ MV .L1 A5,A1
+ NORM .L1 A1:A0,A4 ; |1340|
+
+ SHL .S1 A1:A0,A4,A1:A0 ; |1344|
+|| MV .L2X A4,B8 ; |1340|
+
+ LDW .D2T1 *+SP(4),A4 ; |1345|
+ LDH .D2T1 *B2,A3 ; |1322|
+;** --------------------------------------------------------------------------*
+L50:
+ LDW .D2T2 *+SP(4),B4 ; |1346|
+ NOP 1
+ SHR .S1 A1:A0,A2,A1:A0 ; |1345|
+ SHR .S1 A1:A0,A4,A1:A0 ; |1346| acc0 is mantissa
+
+ NORM .L1 A0,A5 ; |1356| align msb of acc0 with 1 (F32.29)
+|| ADD .S1 A3,A11,A3 ; |1323|
+
+ SUB .L2X A5,6,B0 ; |1356|
+|| ADD .S2 B4,B4,B4 ; |1351| one = 1 in F32.29
+|| SUB .L1X A2,B8,A3 ; |1324|
+|| STH .D2T1 A3,*B2 ; |1324|
+
+ MV .L2X A5,B8 ; |1356|
+|| SHL .S1 A0,A5,A0 ; |1357| shift left number of redundant
+|| SUB .L1X B4,0x3,A4 ; |1356|
+
+ SHR .S1 A0,0x1,A0 ; |1358| sign bits, minus one
+|| MV .L2X A4,B4 ; |1357|
+|| MVK .S2 0x1,B5 ; |1353|
+
+ MV .L2X A0,B4 ; |1360|
+|| SHL .S2 B5,B4,B5 ; |1354| one = 2^29 = 0x20000000
+|| STH .D1T1 A3,*A14 ; |1342|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : mantinvloop
+;* Known Minimum Trip Count : 12
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 1
+;* Partitioned Resource Bound(*) : 1
+;* Resource Partition:
+;* A-side B-side
+;* .L units 0 1*
+;* .S units 1* 0
+;* .D units 0 0
+;* .M units 0 0
+;* .X cross paths 0 0
+;* .T address paths 0 0
+;* Long read paths 0 0
+;* Long write paths 0 0
+;* Logical ops (.LS) 0 0 (.L or .S unit)
+;* Addition ops (.LSD) 0 1 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1* 1*
+;* Bound(.L .S .D .LS .LSD) 1* 1*
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 1 Schedule found with 7 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : 32
+;*
+;*----------------------------------------------------------------------------*
+L51: ; PIPED LOOP PROLOG
+; mantinvloop: .trip 12 ; 5+0/0 k:1
+ [ B0] B .S1 mantinvloop ; |1367|
+ [ B0] B .S1 mantinvloop ;@ |1367|
+ [ B0] B .S1 mantinvloop ;@@ |1367|
+ [ B0] B .S1 mantinvloop ;@@@ |1367|
+ [ B0] B .S1 mantinvloop ;@@@@ |1367|
+;** --------------------------------------------------------------------------*
+mantinvloop: ; PIPED LOOP KERNEL
+
+ SUBC .L2 B5,B4,B5 ; |1365| divide 1(F32.29) by mantissa (acc0)
+|| [ B0] B .S1 mantinvloop ;@@@@@ |1367|
+|| [ B0] SUB .S2 B0,0x1,B0 ;@@@@@@ |1366|
+
+;** --------------------------------------------------------------------------*
+L53: ; PIPED LOOP EPILOG
+;** --------------------------------------------------------------------------*
+ LDW .D2T2 *+SP(32),B3
+ LDW .D2T2 *+SP(40),B11
+ LDW .D2T2 *+SP(36),B10
+ LDW .D2T1 *+SP(28),A15
+ LDW .D2T1 *+SP(24),A14
+ LDW .D2T1 *+SP(20),A13
+ LDW .D2T1 *+SP(16),A12
+ LDW .D2T1 *+SP(12),A11
+
+ B .S2 B3
+|| LDW .D2T2 *+SP(44),B12
+|| MVK .S1 0x20,A0 ; |1369|
+
+ LDW .D2T2 *++SP(48),B13
+|| SUB .L2X A0,B8,B4 ; |1370|
+
+ SHL .S2 B4,0x5,B7 ; |1371| extracts the nsignb long field
+
+ ADD .L2 B4,B7,B4 ; |1372| from bit 0 up to bit nsignb-1.
+|| MV .L1X B5,A3 ; |1372|
+
+ MV .L1X B4,A0 ; |1372|
+ EXTU .S1 A3,A0,A4 ; |1373| because 32-nsignb = 31-(nsignb-1)
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _normCir *
+;* *
+;* Regs Modified : A0,A3,A4,A5,A6,A7,A8,B0,B4,B5,B6,B7,B8,SP *
+;* Regs Used : A0,A3,A4,A5,A6,A7,A8,B0,B3,B4,B5,B6,B7,B8,SP *
+;******************************************************************************
+_normCir:
+;** --------------------------------------------------------------------------*
+;
+;
+;/*************************************************************************
+;* normCir :
+;* --------
+;* We normalize the value of Cir ( Cir / Mantissa ).
+;*
+;*
+;* Input data . Channel impulse response : cir[CIR_LENGTH].{I,Q}
+;* . 1/Mantissa : mantInv (1 <mantInt <= 2)
+;* . Position of the best CIR window : *indexBest
+;*
+;* Output data . Normalized channel impulse response : nCir[CIR_SIZE].{I,Q}
+;*
+;***************************************************************************/
+;
+;void normCir
+;(
+; t_ULCirSamp cir[MAX_CIR_LENGTH],
+; UWord2 mantInv,
+; Char indexBest_fix,
+; t_ULCirSamp cirNorm[MAX_CIR_LENGTH]
+;);
+;
+; _normCir .cproc cirptr,mantinv,best,ncirptr
+; .reg cbstlen ; const: CIR_BEST_LENGTH (5)
+; .reg wsize ; const: WORD_SIZE (16)
+; .reg cptr0 ; pointer to cir
+; .reg ncptr0 ; pointer to normed cir
+; .reg temp,qtemp,itemp ; temp storage
+; .reg loopcnt ; loop counter
+; .reg ccp ; constants pointer
+ MVK .S1 _c_asm_consts,A5 ; |1422|
+ MVKH .S1 _c_asm_consts,A5 ; |1423| load address of C constants
+ LDW .D1T2 *+A5(60),B0 ; |1425|
+ MV .L2X A4,B5 ; |1404|
+
+ MV .L2X A6,B7 ; |1404|
+|| MV .L1X B4,A8 ; |1404|
+
+ ADDAW .D2 B5,B7,B4 ; |1432| cptr0 => cir[best]
+|| SUB .L2 SP,8,SP ; |1404|
+|| MV .L1X B6,A0 ; |1432|
+
+ MVC .S2 CSR,B8 ; |1432|
+|| MV .L2 B4,B6 ; |1432|
+|| MV .L1X B4,A4 ; |1432|
+|| MV .D2 B6,B5 ; |1432|
+|| LDW .D1T1 *+A5(64),A3 ; |1426|
+
+ AND .L2 -2,B8,B4 ; |1432|
+|| SUB .S2 B0,4,B0 ; |1432|
+
+ MVC .S2 B4,CSR ; |1432|
+|| ADD .L2 2,B6,B6 ; |1432|
+|| ADD .D2 2,B5,B5 ; |1432|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : normcirloop
+;* Known Minimum Trip Count : 5
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 0
+;* Unpartitioned Resource Bound : 2
+;* Partitioned Resource Bound(*) : 2
+;* Resource Partition:
+;* A-side B-side
+;* .L units 0 0
+;* .S units 2* 1
+;* .D units 2* 2*
+;* .M units 2* 0
+;* .X cross paths 1 1
+;* .T address paths 2* 2*
+;* Long read paths 1 1
+;* Long write paths 0 0
+;* Logical ops (.LS) 0 1 (.L or .S unit)
+;* Addition ops (.LSD) 0 1 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1 1
+;* Bound(.L .S .D .LS .LSD) 2* 2*
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 2 Schedule found with 5 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : Unknown
+;*
+;*----------------------------------------------------------------------------*
+L57: ; PIPED LOOP PROLOG
+; normcirloop: .trip 5 ; 4+6/4 kernel:2
+
+ LDH .D1T1 *A4++(4),A7 ; |1454| cir[i].I * mantinv >> 16
+|| LDH .D2T2 *B6++(4),B4 ; |1459| cir[i].I * mantinv >> 16
+
+ NOP 1
+
+ LDH .D1T1 *A4++(4),A7 ;@ |1454| cir[i].I * mantinv >> 16
+|| LDH .D2T2 *B6++(4),B4 ;@ |1459| cir[i].I * mantinv >> 16
+
+ [ B0] SUB .L2 B0,0x1,B0 ; |1464|
+
+ [ B0] B .S2 normcirloop ; |1465|
+|| LDH .D1T1 *A4++(4),A7 ;@@ |1454| cir[i].I * mantinv >> 16
+|| LDH .D2T2 *B6++(4),B4 ;@@ |1459| cir[i].I * mantinv >> 16
+
+ SMPY .M1X B4,A8,A6 ; |1460|
+|| [ B0] SUB .L2 B0,0x1,B0 ;@ |1464|
+
+ SMPY .M1 A7,A8,A6 ; |1455|
+|| [ B0] B .S2 normcirloop ;@ |1465|
+|| LDH .D1T1 *A4++(4),A7 ;@@@ |1454| cir[i].I * mantinv >> 16
+|| LDH .D2T2 *B6++(4),B4 ;@@@ |1459| cir[i].I * mantinv >> 16
+
+ SHR .S1 A6,A3,A5 ; |1461|
+|| SMPY .M1X B4,A8,A6 ;@ |1460|
+|| [ B0] SUB .L2 B0,0x1,B0 ;@@ |1464|
+
+;** --------------------------------------------------------------------------*
+normcirloop: ; PIPED LOOP KERNEL
+
+ SHR .S1 A6,A3,A5 ; |1456|
+|| MV .L2X A5,B7 ; |1404|
+|| SMPY .M1 A7,A8,A6 ;@ |1455|
+|| [ B0] B .S2 normcirloop ;@@ |1465|
+|| LDH .D1T1 *A4++(4),A7 ;@@@@ |1454| cir[i].I * mantinv >> 16
+|| LDH .D2T2 *B6++(4),B4 ;@@@@ |1459| cir[i].I * mantinv >> 16
+
+ STH .D1T1 A5,*A0++(4) ; |1457| is normcir[i].I
+|| STH .D2T2 B7,*B5++(4) ; |1462| is normcir[i].I
+|| SHR .S1 A6,A3,A5 ;@ |1461|
+|| SMPY .M1X B4,A8,A6 ;@@ |1460|
+|| [ B0] SUB .L2 B0,0x1,B0 ;@@@ |1464|
+
+;** --------------------------------------------------------------------------*
+L59: ; PIPED LOOP EPILOG
+
+ SHR .S1 A6,A3,A5 ;@ |1456|
+|| MV .L2X A5,B7 ;@ |1404|
+|| SMPY .M1 A7,A8,A6 ;@@ |1455|
+
+ STH .D1T1 A5,*A0++(4) ;@ |1457| is normcir[i].I
+|| STH .D2T2 B7,*B5++(4) ;@ |1462| is normcir[i].I
+|| SHR .S1 A6,A3,A5 ;@@ |1461|
+|| SMPY .M1X B4,A8,A6 ;@@@ |1460|
+
+ SHR .S1 A6,A3,A5 ;@@ |1456|
+|| MV .L2X A5,B7 ;@@ |1404|
+|| SMPY .M1 A7,A8,A6 ;@@@ |1455|
+
+ STH .D1T1 A5,*A0++(4) ;@@ |1457| is normcir[i].I
+|| STH .D2T2 B7,*B5++(4) ;@@ |1462| is normcir[i].I
+|| SHR .S1 A6,A3,A5 ;@@@ |1461|
+|| SMPY .M1X B4,A8,A6 ;@@@@ |1460|
+
+ SHR .S1 A6,A3,A5 ;@@@ |1456|
+|| MV .L2X A5,B7 ;@@@ |1404|
+|| SMPY .M1 A7,A8,A6 ;@@@@ |1455|
+
+ STH .D1T1 A5,*A0++(4) ;@@@ |1457| is normcir[i].I
+|| STH .D2T2 B7,*B5++(4) ;@@@ |1462| is normcir[i].I
+|| SHR .S1 A6,A3,A5 ;@@@@ |1461|
+
+ SHR .S1 A6,A3,A5 ;@@@@ |1456|
+|| MV .L2X A5,B7 ;@@@@ |1404|
+
+ STH .D1T1 A5,*A0++(4) ;@@@@ |1457| is normcir[i].I
+|| STH .D2T2 B7,*B5++(4) ;@@@@ |1462| is normcir[i].I
+
+;** --------------------------------------------------------------------------*
+ MVC .S2 B8,CSR ; |1432|
+ B .S2 B3
+ NOP 4
+ ADD .L2 8,SP,SP
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _varCalcRho *
+;* *
+;* Regs Modified : A0,A1,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B4,B5,B6,B7,B8, *
+;* B9,SP *
+;* Regs Used : A0,A1,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B3,B4,B5,B6,B7, *
+;* B8,B9,SP *
+;******************************************************************************
+_varCalcRho:
+;** --------------------------------------------------------------------------*
+;
+;/*************************************************************************
+;**
+;** varCalcRho : calcRho when CIR_SIZE!=5
+;** -----------
+;** Compute the autocorrelation of the Cir with cirNorm.
+;** calcRho will be used for the VITERBI algorithm as the
+;** real channel response.
+;**
+;** Input data - Channel impulse response : cir[CIR_LENGTH].{I,Q}
+;** - Normalized channel impulse response : cirNorm[CIR_SIZE].{I,Q}
+;** - Position of the best CIR window : indexBest
+;** - Exponent of the normalized energy : exponent
+;**
+;** Ouput data - Autocorrelation of the Cir : rho[DELAY_MAX]
+;**
+;** This illistrates the NB case where index = 0 and CIR_SIZE = 5:
+;** When i = 1, j = 1:4, j-i = 0:3
+;** i = 2, j = 2:4, j-i = 0:2
+;** i = 3, j = 3:4, j-i = 0:1
+;** i = 4, j = 4, j-i = 0
+;**
+;** In this manner the autocorrelation is commputed on the samples except
+;** the i = 0 delay which is normalized by the mantissa and exponent.
+;**
+;** NOTE: as of 9/98 rho is not in A|RT. It will be ported when viterbi
+;** is ported to A|RT.
+;**
+;***************************************************************************/
+;void calcRho
+;(
+; t_ULCirSamp cir[MAX_CIR_LENGTH],
+; t_ULCirSamp cirNorm[MAX_CIR_LENGTH],
+; Char indexBest,
+; Short exponent,
+; Word3 rho[DELAY_MAX]
+;);
+;
+; This routine works with a variable CIR_SIZE, BEST_CIR_LENGTH. This
+; is a fallback, in case the variability is needed. A much faster
+; (4.5 times) version is defined below, that unrolls the entire
+; loop for speed, in the case that CIR_SIZE=BEST_CIR_LENGTH=5. In
+; the case CIR_SIZE=4, its better to modify that procedure below. If
+; CIR_SIZE changes to 6, that's long enough to pipeline the loops
+; in this routine, and it will run far more efficiently.
+;
+; _varCalcRho .cproc cirptr,ncirptr,best,expon,rhoptr
+; .reg cptrstart
+; .reg cptr0,cptr1
+; .reg cnptr0,cnptr1
+; .reg icnt,jcnt
+; .reg qtemp,itemp
+; .reg temp,tempn
+; .reg rptr
+; .reg iloop
+; .reg maxcir
+; .reg cirsiz
+; .reg wsize
+; .reg result
+; .reg cond
+; .reg ccp
+ MVK .S1 _c_asm_consts,A3 ; |1537|
+ MVKH .S1 _c_asm_consts,A3 ; |1538| load address of C constants
+ LDW .D1T1 *+A3(64),A0 ; |1541|
+ NOP 1
+ LDW .D1T2 *+A3(56),B8 ; |1540|
+ NOP 1
+ MV .L2X A6,B5 ; |1516|
+
+ ADD .L1X B6,A0,A9 ; |1541|
+|| MV .L2X A4,B7 ; |1516|
+
+ CMPGT .L1 0x0,A9,A1 ; |1568| make expon positive
+|| ADDAW .D2 B7,B5,B7 ; |1564|
+|| ZERO .L2 B9 ; |1562| outer loop index zeroed
+
+ [ A1] NEG .L1 A9,A9 ; |1569| cond remembers if this done
+|| ADDAW .D2 B7,1,B7 ; |1565| cirptr => cir[1+best]
+|| SUB .L2 B8,0x1,B2 ; |1563| outer loop for CIR_SIZE-1
+|| SUB .S2 SP,8,SP ; |1516|
+|| MV .S1X B4,A7 ; |1516|
+
+;** --------------------------------------------------------------------------*
+rhoouterloop:
+
+ ADD .L2 0x1,B9,B9 ; |1583| iloop index advances
+|| ADDAW .D2 B7,B9,B4 ; |1581| cptr0 => cir[1+best+iloop]
+
+ SUB .L2 B8,B9,B0 ; |1584| jcnt = cirsiz-1-iloop
+ CMPGTU .L2 B0,4,B1 ; |1584|
+ [ B1] B .S1 L66 ; |1584|
+ NOP 4
+
+ MV .L1 A7,A5 ; |1580| cnptr0 => normed cir[0]
+|| ZERO .S1 A6 ; |1576|
+
+ ; BRANCH OCCURS ; |1584|
+;** --------------------------------------------------------------------------*
+L64:
+
+ LDW .D2T2 *B4++,B6 ; |1593|
+|| LDW .D1T1 *A5++,A0 ; |1592|
+
+ NOP 1
+ SUB .L2 B0,0x1,B0 ; |1599| cirsiz-1-i times
+ [ B0] B .S1 L64 ; |1600|
+ NOP 1
+
+ MPY .M1X B6,A0,A3 ; |1594|
+|| MV .L2X A0,B5 ; |1594|
+
+ MPYH .M2 B6,B5,B5 ; |1596|
+ ADD .L1 A6,A3,A6 ; |1595|
+ ADD .L1X A6,B5,A6 ; |1595|
+ ; BRANCH OCCURS ; |1600|
+;** --------------------------------------------------------------------------*
+ B .S1 L72 ; |1600|
+ NOP 4
+ SUB .L2 B2,0x1,B2 ; |1612|
+ ; BRANCH OCCURS ; |1600|
+;** --------------------------------------------------------------------------*
+L66:
+ MVC .S2 CSR,B1 ; |1600|
+ AND .L2 -2,B1,B5 ; |1600|
+
+ MVC .S2 B5,CSR ; |1600|
+|| SUB .L2 B0,4,B0 ; |1600|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : rhoinnerloop
+;* Loop Carried Dependency Bound(^) : 2
+;* Unpartitioned Resource Bound : 1
+;* Partitioned Resource Bound(*) : 2
+;* Resource Partition:
+;* A-side B-side
+;* .L units 0 0
+;* .S units 0 1
+;* .D units 1 1
+;* .M units 1 1
+;* .X cross paths 2* 1
+;* .T address paths 1 1
+;* Long read paths 0 0
+;* Long write paths 0 0
+;* Logical ops (.LS) 1 0 (.L or .S unit)
+;* Addition ops (.LSD) 2 1 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 1 1
+;* Bound(.L .S .D .LS .LSD) 2* 1
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 2 Schedule found with 5 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : Unknown
+;*
+;*----------------------------------------------------------------------------*
+L67: ; PIPED LOOP PROLOG
+
+ LDW .D1T1 *A5++,A0 ; |1592|
+|| LDW .D2T2 *B4++,B5 ; |1593|
+
+ NOP 1
+
+ LDW .D1T1 *A5++,A0 ;@ |1592|
+|| LDW .D2T2 *B4++,B5 ;@ |1593|
+
+ [ B0] SUB .L2 B0,0x1,B0 ; |1599| cirsiz-1-i times
+
+ [ B0] B .S2 rhoinnerloop ; |1600|
+|| LDW .D1T1 *A5++,A0 ;@@ |1592|
+|| LDW .D2T2 *B4++,B5 ;@@ |1593|
+
+ MPYH .M2X B5,A0,B6 ; |1596|
+|| [ B0] SUB .L2 B0,0x1,B0 ;@ |1599| cirsiz-1-i times
+
+ MPY .M1X B5,A0,A3 ; |1594|
+|| [ B0] B .S2 rhoinnerloop ;@ |1600|
+|| LDW .D1T1 *A5++,A0 ;@@@ |1592|
+|| LDW .D2T2 *B4++,B5 ;@@@ |1593|
+
+ MV .L1X B6,A4 ; |1516|
+|| MPYH .M2X B5,A0,B6 ;@ |1596|
+|| [ B0] SUB .L2 B0,0x1,B0 ;@@ |1599| cirsiz-1-i times
+
+;** --------------------------------------------------------------------------*
+rhoinnerloop: ; PIPED LOOP KERNEL
+
+ ADD .L1 A6,A3,A3 ; ^ |1595|
+|| MPY .M1X B5,A0,A3 ;@ |1594|
+|| [ B0] B .S2 rhoinnerloop ;@@ |1600|
+|| LDW .D1T1 *A5++,A0 ;@@@@ |1592|
+|| LDW .D2T2 *B4++,B5 ;@@@@ |1593|
+
+ ADD .S1 A3,A4,A6 ; ^ |1597|
+|| MV .L1X B6,A4 ;@ |1516|
+|| MPYH .M2X B5,A0,B6 ;@@ |1596|
+|| [ B0] SUB .L2 B0,0x1,B0 ;@@@ |1599| cirsiz-1-i times
+
+;** --------------------------------------------------------------------------*
+L69: ; PIPED LOOP EPILOG
+
+ ADD .L1 A6,A3,A3 ;@ ^ |1595|
+|| MPY .M1X B5,A0,A3 ;@@ |1594|
+
+ ADD .S1 A3,A4,A6 ;@ ^ |1597|
+|| MV .L1X B6,A4 ;@@ |1516|
+|| MPYH .M2X B5,A0,B6 ;@@@ |1596|
+
+ ADD .L1 A6,A3,A3 ;@@ ^ |1595|
+|| MPY .M1X B5,A0,A3 ;@@@ |1594|
+
+ ADD .S1 A3,A4,A6 ;@@ ^ |1597|
+|| MV .L1X B6,A4 ;@@@ |1516|
+|| MPYH .M2X B5,A0,B6 ;@@@@ |1596|
+
+ ADD .L1 A6,A3,A3 ;@@@ ^ |1595|
+|| MPY .M1X B5,A0,A3 ;@@@@ |1594|
+
+ ADD .S1 A3,A4,A6 ;@@@ ^ |1597|
+|| MV .L1X B6,A4 ;@@@@ |1516|
+
+ ADD .L1 A6,A3,A3 ;@@@@ ^ |1595|
+ ADD .S1 A3,A4,A6 ;@@@@ ^ |1597|
+;** --------------------------------------------------------------------------*
+ MVC .S2 B1,CSR ; |1600|
+;** --------------------------------------------------------------------------*
+L71:
+ SUB .L2 B2,0x1,B2 ; |1612|
+;** --------------------------------------------------------------------------*
+L72:
+ [ B2] B .S1 rhoouterloop ; |1613|
+ NOP 2
+ [!A1] SHR .S1 A6,A9,A6 ; |1609|
+ [ A1] SHL .S1 A6,A9,A6 ; |1608|
+ STH .D1T1 A6,*A8++ ; |1610|
+ ; BRANCH OCCURS ; |1613|
+;** --------------------------------------------------------------------------*
+ B .S2 B3
+ NOP 4
+ ADD .L2 8,SP,SP
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _calcRho *
+;* *
+;* Regs Modified : A0,A1,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B4,B5,B6,B7,B8, *
+;* B9,SP *
+;* Regs Used : A0,A1,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B3,B4,B5,B6,B7, *
+;* B8,B9,SP *
+;******************************************************************************
+_calcRho:
+;** --------------------------------------------------------------------------*
+;
+;
+;/*************************************************************************
+;**
+;** calcRho : calcRho when CIR_SIZE==5
+;** -----------
+;** Compute the autocorrelation of the Cir with cirNorm.
+;** calcRho will be used for the VITERBI algorithm as the
+;** real channel response.
+;**
+;** This illustrates the NB case where index = 0 and CIR_SIZE = 5:
+;** When i = 1, j = 1:4, j-i = 0:3
+;** i = 2, j = 2:4, j-i = 0:2
+;** i = 3, j = 3:4, j-i = 0:1
+;** i = 4, j = 4, j-i = 0
+;** In this manner the autocorrelation is commputed on the samples except
+;** the i = 0 delay which is normalized by the mantissa and exponent.
+;**
+;** Input data - Channel impulse response : cir[CIR_LENGTH].{I,Q}
+;** - Normalized channel impulse response : cirNorm[CIR_SIZE].{I,Q}
+;** - Position of the best CIR window : indexBest
+;** - Exponent of the normalized energy : exponent
+;**
+;** Ouput data - Autocorrelation of the Cir : rho[DELAY_MAX]
+;**
+;** Limitations - CIR_SIZE is assumed a constant 5 for unrolling. If it
+;** changes, call varCalcRho above.
+;**
+;** NOTE: as of 9/98 rho is not in A|RT. It will be ported when viterbi
+;** is ported to A|RT.
+;**
+;*************************************************************************/
+;
+; _calcRho .cproc cirptr,ncirptr,best,expon,rhoptr
+; .reg cptr0
+; .reg cnptr0
+; .reg temp,tempn
+; .reg temp1,tempn1
+; .reg temp2,tempn2
+; .reg temp3,tempn3
+; .reg qtemp,itemp
+; .reg qtemp1,itemp1
+; .reg qtemp2,itemp2
+; .reg qtemp3,itemp3
+; .reg maxcir
+; .reg wsize
+; .reg result,iresult
+; .reg cond
+; .reg ccp
+ SUB .L2 SP,8,SP ; |1652|
+ ; completely unrolled for CIR_SIZE=5, 95 clocks
+ ADDAW .D1 A4,A6,A0 ; |1700|
+ ADDAW .D1 A0,1,A0 ; |1701| cptr0 => cir[0][1+best]
+ LDW .D1T1 *A0,A6 ; |1718|
+ LDW .D2T2 *B4,B0 ; |1717|
+ NOP 1
+ LDW .D2T1 *+B4(4),A3 ; |1732|
+ LDW .D1T1 *+A0(4),A5 ; |1732|
+ MV .L2X A6,B5 ; |1746|
+ MPY .M2 B5,B0,B8 ; |1719|
+
+ MPYH .M2 B5,B0,B0 ; |1721|
+|| LDW .D1T1 *+A0(8),A9 ; |1746|
+|| LDW .D2T2 *+B4(8),B2 ; |1745|
+|| MVK .S2 _c_asm_consts,B9 ; |1674|
+
+ ZERO .L2 B5 ; |1721|
+|| LDW .D1T1 *+A0(12),A7 ; |1760|
+|| MVKH .S2 _c_asm_consts,B9 ; |1675| load address of C constants
+
+ ADD .L2 B5,B8,B5 ; |1720|
+|| MV .L1X B0,A0 ; |1760|
+|| MPY .M1 A5,A3,A4 ; |1733|
+|| LDW .D2T2 *+B9(64),B9 ; |1678|
+|| MV .S2X A0,B7 ; |1718|
+
+ ADD .L1X B5,A0,A0 ; |1722|
+|| LDW .D2T2 *+B4(12),B1 ; |1759|
+
+ MV .L1X B7,A4 ; |1734|
+|| ADD .S1 A0,A4,A0 ; |1734|
+|| MPYH .M1 A5,A3,A3 ; |1735|
+
+ LDW .D1T1 *+A4(4),A6 ; |1793|
+|| MPY .M2X A9,B2,B8 ; |1747|
+
+ MV .L2X A7,B2 ; |1736|
+|| ADD .L1 A0,A3,A0 ; |1736|
+|| MPYH .M1X A9,B2,A4 ; |1749|
+
+ ADD .L2X A0,B8,B5 ; |1736|
+|| ADD .S2 B6,B9,B6 ; |1696|
+
+ MPY .M2 B2,B1,B8 ; |1761|
+|| CMPGT .L1X 0x0,B6,A1 ; |1750|
+
+ MV .L2X A7,B5 ; |1748|
+|| ADD .L1X B5,A4,A0 ; |1748|
+
+ MV .L1X B6,A0 ; |1750|
+|| ADD .L2X A0,B8,B5 ; |1750|
+|| MPYH .M2 B5,B1,B1 ; |1763|
+|| LDW .D2T2 *+B4(4),B9 ; |1806|
+
+ [ A1] NEG .L1 A0,A0 ; |1698|
+|| MV .S1X B7,A3 ; |1748|
+
+ [ A1] MV .L2X A0,B6 ; |1764|
+|| MV .L1X B7,A4 ; |1762|
+|| LDW .D2T2 *B4,B0 ; |1792|
+
+ MV .L1X B6,A0 ; |1764|
+|| ADD .L2 B5,B1,B5 ; |1764|
+
+ MV .L1X B5,A4 ; |1764|
+|| LDW .D1T1 *+A4(12),A9 ; |1821|
+
+ [!A1] SHR .S2 B5,B6,B9 ; |1773|
+|| [ A1] SHL .S1 A4,A0,A0 ; |1772|
+|| MV .L2X A6,B8 ; |1764|
+|| MV .L1X B9,A3 ; |1750|
+|| LDW .D1T1 *+A3(8),A5 ; |1807|
+
+ [!A1] MV .L2 B9,B5 ; |1772|
+|| [ A1] MV .S2X A0,B5 ; |1772|
+
+ MPY .M2 B8,B0,B8 ; |1794|
+|| MV .L2X A6,B5 ; |1772|
+|| MV .L1X B5,A0 ; |1772|
+
+ ZERO .L2 B5 ; |1780|
+|| MPYH .M2 B5,B0,B9 ; |1796|
+|| LDW .D2T2 *+B4(8),B2 ; |1820|
+
+ ADD .L2 B5,B8,B5 ; |1795|
+
+ MPY .M1 A5,A3,A4 ; |1808|
+|| MV .L1X B5,A6 ; |1795|
+
+ ADD .L1X A6,B9,A0 ; |1795|
+|| STH .D1T1 A0,*A8++ ; |1774|
+
+ MPYH .M1 A5,A3,A3 ; |1810|
+|| MV .L1X B7,A4 ; |1809|
+|| ADD .S1 A0,A4,A0 ; |1809|
+
+ MPY .M2X A9,B2,B8 ; |1822|
+|| LDW .D1T1 *+A4(12),A6 ; |1867|
+|| MV .L1X B7,A7 ; |1795|
+
+ MPYH .M1X A9,B2,A4 ; |1824|
+|| ADD .L1 A0,A3,A0 ; |1811|
+|| LDW .D1T1 *+A7(8),A7 ; |1853|
+
+ LDW .D2T2 *B4,B1 ; |1852|
+|| ADD .L2X A0,B8,B5 ; |1823|
+
+ ADD .L1X B5,A4,A0 ; |1825|
+
+ MV .L1 A0,A4 ; |1825|
+|| MV .L2X A0,B5 ; |1825|
+
+ LDW .D2T2 *+B4(4),B0 ; |1866|
+|| MV .L1X B4,A0 ; |1825|
+
+ MV .L2X A7,B8 ; |1825|
+|| MV .L1X B6,A3 ; |1825|
+
+ MPY .M2 B8,B1,B8 ; |1854|
+|| [ A1] SHL .S1 A4,A3,A0 ; |1833|
+|| LDW .D1T1 *A0,A3 ; |1894|
+|| MV .L2X A7,B4 ; |1833|
+
+ ZERO .L1 A0 ; |1841|
+|| MPYH .M2 B4,B1,B1 ; |1856|
+|| [ A1] MV .L2X A0,B5 ; |1833|
+
+ ADD .L1X A0,B8,A0 ; |1841|
+|| MV .L2X A6,B4 ; |1841|
+
+ MPY .M2 B4,B0,B8 ; |1868|
+|| [!A1] SHR .S2 B5,B6,B9 ; |1834|
+
+ MPYH .M2 B4,B0,B4 ; |1870|
+|| [!A1] MV .L2 B9,B5 ; |1833|
+
+ ADD .L2X A0,B1,B5 ; |1868|
+|| STH .D1T2 B5,*A8++ ; |1835|
+
+ LDW .D2T1 *+B7(12),A5 ; |1895|
+|| ADD .L2 B5,B8,B5 ; |1869|
+|| MV .L1X B4,A0 ; |1870|
+
+ ADD .L1X B5,A0,A0 ; |1871|
+
+ MV .L2X A0,B5 ; |1871|
+|| MV .L1X B6,A4 ; |1871|
+
+ [ A1] SHL .S1 A0,A4,A0 ; |1879|
+|| [!A1] SHR .S2 B5,B6,B4 ; |1880|
+
+ [!A1] MV .L2 B4,B5 ; |1896|
+|| [ A1] MV .S2X A0,B5 ; |1896|
+
+ MV .L1X B5,A0 ; |1896|
+|| MPY .M1 A5,A3,A4 ; |1896|
+
+ MPYH .M1 A5,A3,A3 ; |1898|
+|| ZERO .L1 A0 ; |1887|
+|| STH .D1T1 A0,*A8++ ; |1881|
+
+ ADD .L1 A0,A4,A0 ; |1897|
+
+ B .S2 B3
+|| ADD .L1 A0,A3,A0 ; |1899|
+
+ MV .L1X B6,A0 ; |1899|
+|| MV .S1 A0,A3 ; |1899|
+|| MV .L2X A0,B5 ; |1899|
+
+ [ A1] SHL .S1 A3,A0,A0 ; |1907|
+|| MV .L2 B6,B4 ; |1899|
+
+ [!A1] SHR .S2 B5,B4,B5 ; |1907|
+|| [ A1] MV .L2X A0,B5 ; |1907|
+
+ MV .L1X B5,A0 ; |1907|
+
+ STH .D1T1 A0,*A8++ ; |1909|
+|| ADD .L2 8,SP,SP
+
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _matchFilter *
+;* *
+;* Regs Modified : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,B0,*
+;* B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,SP *
+;* Regs Used : A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,B0,*
+;* B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,SP *
+;******************************************************************************
+_matchFilter:
+;** --------------------------------------------------------------------------*
+;
+;
+;/*************************************************************************
+;**
+;** matchFilter :
+;** -----------
+;** Matched filter the input samples with the normalized CIR
+;**
+;** Correlation of Cir and cirNorm
+;**
+;** Note that the maximum of the CIR's aoutcorrelation is:
+;** max( autocorr(cir) ) = energySum = mantissa * 2^exponent
+;**
+;** and that the maximum of the CIR and cirNorms autcorrelation is:
+;** max( corr(cir,cirNorm) ) = energySum/mantissa = 2^exponent
+;**
+;** Because cirNorm = Cir/mantissa
+;**
+;** Typically the exponent will be negative, so when Rho is shifted
+;** by the exponent, it is actually reducing the number of sign bits and
+;** maxmizing the fixed point precision.
+;**
+;** Input data - Input samples : data[2][]
+;** - channel impulse response : cirNorm[CIR_SIZE].{I,Q}
+;** - Position of the best CIR window : indexBest
+;** - Exponent of the normalized energy : exponent
+;**
+;** Output data - Matched filtered samples : Output[nb_samp]
+;**
+;** Limitations - CIR_SIZE is assumed a constant 5 for unrolling. If it
+;** changes, change the number of blocks in the loop below.
+;**
+;***************************************************************************/
+;
+;void matchFilter
+;(
+; t_ULComplexSamp samples[BURST_SIZE_UL_MAX],
+; t_ULCirSamp cirNorm[MAX_CIR_LENGTH],
+; Char indexBest_fxp,
+; Short exponent,
+; Word3 output[]
+;);
+;
+; _matchFilter .cproc samptr,ncirptr,best,expon,outptr
+; .reg numbits ; const: g_BConsts_pt->numBits
+; .reg sptr0,sptr1 ; pointers
+; .reg acc1 ; loop accumulator
+; .reg temp,qtemp,itemp ; temp storage
+; .reg nciq0,nciq1,nciq2,nciq3,nciq4 ; normedcir samples Q:I in word
+; .reg expsgn ; sign of exponent
+; .reg jcnt ; loop counter
+; .reg bcp ; constants pointers
+; .reg ccp
+ MVK .S1 _g_BConsts_pt,A0 ; |1980|
+
+ MVKH .S1 _g_BConsts_pt,A0 ; |1981| load address of pointer
+|| MVK .S2 _c_asm_consts,B5 ; |1983|
+
+ LDW .D1T2 *A0,B7 ; |1982| load pointer to burst constants
+|| MVKH .S2 _c_asm_consts,B5 ; |1984| load address of C constants
+
+ LDW .D2T1 *+B5(24),A3 ; |1990|
+ NOP 3
+ MV .L1X B7,A0 ; |1982|
+
+ LDB .D1T1 *+A0[A3],A3 ; |1991|
+|| MV .L1X B5,A5 ; |1991|
+
+ LDW .D1T1 *+A5(36),A5 ; |1993|
+ NOP 3
+ ADD .L1 A3,A6,A6 ; |1991|
+ LDBU .D1T1 *+A0[A5],A3 ; |1994|
+ STW .D2T2 B13,*SP--(48) ; |1957|
+ STW .D2T1 A10,*+SP(12) ; |1957|
+ STW .D2T1 A12,*+SP(20) ; |1957|
+ STW .D2T2 B11,*+SP(40) ; |1957|
+
+ MV .L1X B5,A3 ; |1995|
+|| ADD .S1 A3,A6,A6 ; |1995|
+|| STW .D2T1 A11,*+SP(16) ; |1957|
+
+ LDW .D1T1 *+A3(64),A3 ; |1999|
+|| STW .D2T2 B12,*+SP(44) ; |1957|
+
+ STW .D2T1 A14,*+SP(28) ; |1957|
+
+ MV .L1X B5,A5 ; |1957|
+|| LDW .D2T1 *B4,A10 ; |2011| read all 5 normed cir values
+
+ LDW .D1T2 *+A5(28),B8 ; |1996|
+|| LDW .D2T1 *+B4(8),A12 ; |2013|
+
+ STW .D2T2 B3,*+SP(32) ; |1957|
+
+ ADD .L2X A3,B6,B6 ; |1999|
+|| LDW .D2T2 *+B4(16),B7 ; |2015|
+
+ LDW .D2T1 *+B4(4),A3 ; |2012|
+
+ MV .L2X A0,B4 ; |2002|
+|| LDW .D2T2 *+B4(12),B5 ; |2014|
+
+ LDBU .D2T2 *+B4[B8],B0 ; |1997|
+
+ CMPGT .L1X 0x0,B6,A1 ; |2002| and shift direction
+|| STW .D2T2 B10,*+SP(36) ; |1957|
+
+ [ A1] NEG .L2 B6,B6 ; |2003| expsgn is sign, expon > 0
+|| MV .L1X B7,A11 ; |2019|
+|| MV .S2X A8,B11 ; |1957|
+|| STW .D2T1 A13,*+SP(24) ; |1957|
+
+ MVC .S2 CSR,B13 ; |2019|
+|| MV .L1X B6,A14 ; |2019|
+|| MV .L2X A3,B4 ; |2019|
+|| ADDAW .D1 A4,A6,A2 ; |2019| sptr0 => samples[start]
+|| MV .D2 B7,B3 ; |2019|
+
+ AND .L2 -2,B13,B6 ; |2019|
+
+ MVC .S2 B6,CSR ; |2019|
+|| SUB .L2 B0,6,B0 ; |2019|
+
+;*----------------------------------------------------------------------------*
+;* SOFTWARE PIPELINE INFORMATION
+;*
+;* Loop label : mfloop
+;* Known Minimum Trip Count : 36
+;* Known Max Trip Count Factor : 1
+;* Loop Carried Dependency Bound(^) : 1
+;* Unpartitioned Resource Bound : 5
+;* Partitioned Resource Bound(*) : 5
+;* Resource Partition:
+;* A-side B-side
+;* .L units 3 4
+;* .S units 3 4
+;* .D units 5* 1
+;* .M units 5* 5*
+;* .X cross paths 3 5*
+;* .T address paths 4 2
+;* Long read paths 1 0
+;* Long write paths 0 0
+;* Logical ops (.LS) 0 0 (.L or .S unit)
+;* Addition ops (.LSD) 1 0 (.L or .S or .D unit)
+;* Bound(.L .S .LS) 3 4
+;* Bound(.L .S .D .LS .LSD) 4 3
+;*
+;* Searching for software pipeline schedule at ...
+;* ii = 5 Schedule found with 6 iterations in parallel
+;* Done
+;*
+;* Speculative Load Threshold : Unknown
+;*
+;*----------------------------------------------------------------------------*
+L78: ; PIPED LOOP PROLOG
+; mfloop: .trip 36
+ MV .L1 A2,A0 ; ^ |2028|
+ LDW .D1T1 *A0,A5 ; |2033| 10 multiplies, 5 clocks
+ NOP 1
+ MV .L1 A0,A4 ; |1997|
+
+ ADD .L1 0x4,A2,A2 ; ^ |2074| advance one sample
+|| LDW .D1T1 *+A4(4),A0 ; |2038| multiply and accumulate
+
+ MV .L1 A2,A0 ;@ ^ |2028|
+
+ MPYH .M1 A5,A10,A5 ; |2035|
+|| LDW .D1T1 *A0,A5 ;@ |2033| 10 multiplies, 5 clocks
+
+ MV .S1 A4,A6 ; |1997|
+|| LDW .D1T1 *+A4(8),A8 ; |2044|
+|| MPY .M1 A5,A10,A3 ; |2034| loop is optimal
+
+ LDW .D1T2 *+A6(12),B7 ; |2050|
+|| MV .L1 A0,A4 ;@ |1997|
+
+ MPY .M2X A0,B4,B6 ; |2039|
+|| ADD .L1 0x4,A2,A2 ;@ ^ |2074| advance one sample
+|| LDW .D1T1 *+A4(4),A0 ;@ |2038| multiply and accumulate
+
+ LDW .D1T2 *+A6(16),B1 ; |2056|
+|| MPYH .M2X A0,B4,B9 ; |2040|
+|| ADD .S1 A3,A5,A3 ; |2036|
+|| MV .L1 A2,A0 ;@@ ^ |2028|
+
+ MPYH .M1 A5,A10,A5 ;@ |2035|
+|| LDW .D1T1 *A0,A5 ;@@ |2033| 10 multiplies, 5 clocks
+
+ ADD .S2X B6,A3,B6 ; |2041|
+|| MV .S1 A4,A6 ;@ |1997|
+|| LDW .D1T1 *+A4(8),A8 ;@ |2044|
+|| MPY .M1 A5,A10,A3 ;@ |2034| loop is optimal
+
+ MPY .M2 B7,B5,B2 ; |2051|
+|| MPYH .M1 A8,A12,A9 ; |2046|
+|| LDW .D1T2 *+A6(12),B7 ;@ |2050|
+|| MV .L1 A0,A4 ;@@ |1997|
+
+ MPY .M1 A8,A12,A6 ; |2045|
+|| MPY .M2X A0,B4,B6 ;@ |2039|
+|| ADD .L1 0x4,A2,A2 ;@@ ^ |2074| advance one sample
+|| LDW .D1T1 *+A4(4),A0 ;@@ |2038| multiply and accumulate
+
+ MPY .M1X B1,A11,A7 ; |2057|
+|| ADD .S2 B9,B6,B8 ; |2042|
+|| LDW .D1T2 *+A6(16),B1 ;@ |2056|
+|| MPYH .M2X A0,B4,B9 ;@ |2040|
+|| ADD .S1 A3,A5,A3 ;@ |2036|
+|| MV .L1 A2,A0 ;@@@ ^ |2028|
+
+ MPYH .M2 B7,B5,B8 ; |2052|
+|| ADD .S2X A6,B8,B10 ; |2047|
+|| MPYH .M1 A5,A10,A5 ;@@ |2035|
+|| LDW .D1T1 *A0,A5 ;@@@ |2033| 10 multiplies, 5 clocks
+
+ MPYH .M2 B1,B3,B12 ; |2058|
+|| ADD .S2X B6,A3,B6 ;@ |2041|
+|| MV .S1 A4,A6 ;@@ |1997|
+|| LDW .D1T1 *+A4(8),A8 ;@@ |2044|
+|| MPY .M1 A5,A10,A3 ;@@ |2034| loop is optimal
+
+ ADD .L2X A9,B10,B1 ; |2048|
+|| MPY .M2 B7,B5,B2 ;@ |2051|
+|| MPYH .M1 A8,A12,A9 ;@ |2046|
+|| LDW .D1T2 *+A6(12),B7 ;@@ |2050|
+|| MV .L1 A0,A4 ;@@@ |1997|
+
+ ADD .L2 B2,B1,B10 ; |2053|
+|| MPY .M1 A8,A12,A6 ;@ |2045|
+|| MPY .M2X A0,B4,B6 ;@@ |2039|
+|| ADD .L1 0x4,A2,A2 ;@@@ ^ |2074| advance one sample
+|| LDW .D1T1 *+A4(4),A0 ;@@@ |2038| multiply and accumulate
+
+ ADD .L2 B8,B10,B9 ; |2054|
+|| MPY .M1X B1,A11,A7 ;@ |2057|
+|| ADD .S2 B9,B6,B8 ;@ |2042|
+|| LDW .D1T2 *+A6(16),B1 ;@@ |2056|
+|| MPYH .M2X A0,B4,B9 ;@@ |2040|
+|| ADD .S1 A3,A5,A3 ;@@ |2036|
+|| MV .L1 A2,A0 ;@@@@ ^ |2028|
+
+ ADD .L1X A7,B9,A6 ; |2059|
+|| MPYH .M2 B7,B5,B8 ;@ |2052|
+|| ADD .S2X A6,B8,B10 ;@ |2047|
+|| MPYH .M1 A5,A10,A5 ;@@@ |2035|
+|| LDW .D1T1 *A0,A5 ;@@@@ |2033| 10 multiplies, 5 clocks
+
+ ADD .L1X B12,A6,A13 ; |2060|
+|| MPYH .M2 B1,B3,B12 ;@ |2058|
+|| ADD .S2X B6,A3,B6 ;@@ |2041|
+|| MV .S1 A4,A6 ;@@@ |1997|
+|| LDW .D1T1 *+A4(8),A8 ;@@@ |2044|
+|| MPY .M1 A5,A10,A3 ;@@@ |2034| loop is optimal
+
+ [ B0] B .S2 mfloop ; |2077| numBits loops
+|| [!A1] SHR .S1 A13,A14,A13 ; |2071|
+|| ADD .L2X A9,B10,B1 ;@ |2048|
+|| MPY .M2 B7,B5,B2 ;@@ |2051|
+|| MPYH .M1 A8,A12,A9 ;@@ |2046|
+|| LDW .D1T2 *+A6(12),B7 ;@@@ |2050|
+|| MV .L1 A0,A4 ;@@@@ |1997|
+
+;** --------------------------------------------------------------------------*
+mfloop: ; PIPED LOOP KERNEL
+
+ [ A1] SSHL .S1 A13,A14,A13 ; |2070|
+|| ADD .L2 B2,B1,B10 ;@ |2053|
+|| MPY .M1 A8,A12,A6 ;@@ |2045|
+|| MPY .M2X A0,B4,B6 ;@@@ |2039|
+|| ADD .L1 0x4,A2,A2 ;@@@@ ^ |2074| advance one sample
+|| LDW .D1T1 *+A4(4),A0 ;@@@@ |2038| multiply and accumulate
+
+ STH .D2T1 A13,*B11++ ; |2073| store output sample
+|| ADD .L2 B8,B10,B9 ;@ |2054|
+|| MPY .M1X B1,A11,A7 ;@@ |2057|
+|| ADD .S2 B9,B6,B8 ;@@ |2042|
+|| LDW .D1T2 *+A6(16),B1 ;@@@ |2056|
+|| MPYH .M2X A0,B4,B9 ;@@@ |2040|
+|| ADD .S1 A3,A5,A3 ;@@@ |2036|
+|| MV .L1 A2,A0 ;@@@@@ ^ |2028|
+
+ ADD .L1X A7,B9,A6 ;@ |2059|
+|| MPYH .M2 B7,B5,B8 ;@@ |2052|
+|| ADD .S2X A6,B8,B10 ;@@ |2047|
+|| MPYH .M1 A5,A10,A5 ;@@@@ |2035|
+|| LDW .D1T1 *A0,A5 ;@@@@@ |2033| 10 multiplies, 5 clocks
+
+ [ B0] SUB .L2 B0,0x1,B0 ;@ |2076|
+|| ADD .L1X B12,A6,A13 ;@ |2060|
+|| MPYH .M2 B1,B3,B12 ;@@ |2058|
+|| ADD .S2X B6,A3,B6 ;@@@ |2041|
+|| MV .S1 A4,A6 ;@@@@ |1997|
+|| LDW .D1T1 *+A4(8),A8 ;@@@@ |2044|
+|| MPY .M1 A5,A10,A3 ;@@@@ |2034| loop is optimal
+
+ [ B0] B .S2 mfloop ;@ |2077| numBits loops
+|| [!A1] SHR .S1 A13,A14,A13 ;@ |2071|
+|| ADD .L2X A9,B10,B1 ;@@ |2048|
+|| MPY .M2 B7,B5,B2 ;@@@ |2051|
+|| MPYH .M1 A8,A12,A9 ;@@@ |2046|
+|| LDW .D1T2 *+A6(12),B7 ;@@@@ |2050|
+|| MV .L1 A0,A4 ;@@@@@ |1997|
+
+;** --------------------------------------------------------------------------*
+L80: ; PIPED LOOP EPILOG
+
+ [ A1] SSHL .S1 A13,A14,A13 ;@ |2070|
+|| ADD .L2 B2,B1,B10 ;@@ |2053|
+|| MPY .M1 A8,A12,A6 ;@@@ |2045|
+|| MPY .M2X A0,B4,B6 ;@@@@ |2039|
+|| ADD .L1 0x4,A2,A2 ;@@@@@ ^ |2074| advance one sample
+|| LDW .D1T1 *+A4(4),A0 ;@@@@@ |2038| multiply and accumulate
+
+ STH .D2T1 A13,*B11++ ;@ |2073| store output sample
+|| ADD .L2 B8,B10,B9 ;@@ |2054|
+|| MPY .M1X B1,A11,A7 ;@@@ |2057|
+|| ADD .S2 B9,B6,B8 ;@@@ |2042|
+|| LDW .D1T2 *+A6(16),B1 ;@@@@ |2056|
+|| MPYH .M2X A0,B4,B9 ;@@@@ |2040|
+|| ADD .S1 A3,A5,A3 ;@@@@ |2036|
+
+ ADD .L1X A7,B9,A6 ;@@ |2059|
+|| MPYH .M2 B7,B5,B8 ;@@@ |2052|
+|| ADD .S2X A6,B8,B10 ;@@@ |2047|
+|| MPYH .M1 A5,A10,A5 ;@@@@@ |2035|
+
+ ADD .L1X B12,A6,A13 ;@@ |2060|
+|| MPYH .M2 B1,B3,B12 ;@@@ |2058|
+|| ADD .S2X B6,A3,B6 ;@@@@ |2041|
+|| MV .S1 A4,A6 ;@@@@@ |1997|
+|| LDW .D1T1 *+A4(8),A8 ;@@@@@ |2044|
+|| MPY .M1 A5,A10,A3 ;@@@@@ |2034| loop is optimal
+
+ [!A1] SHR .S1 A13,A14,A13 ;@@ |2071|
+|| ADD .L2X A9,B10,B1 ;@@@ |2048|
+|| MPY .M2 B7,B5,B2 ;@@@@ |2051|
+|| MPYH .M1 A8,A12,A9 ;@@@@ |2046|
+|| LDW .D1T2 *+A6(12),B7 ;@@@@@ |2050|
+
+ [ A1] SSHL .S1 A13,A14,A13 ;@@ |2070|
+|| ADD .L2 B2,B1,B10 ;@@@ |2053|
+|| MPY .M1 A8,A12,A6 ;@@@@ |2045|
+|| MPY .M2X A0,B4,B6 ;@@@@@ |2039|
+
+ STH .D2T1 A13,*B11++ ;@@ |2073| store output sample
+|| ADD .L2 B8,B10,B9 ;@@@ |2054|
+|| MPY .M1X B1,A11,A7 ;@@@@ |2057|
+|| ADD .S2 B9,B6,B8 ;@@@@ |2042|
+|| LDW .D1T2 *+A6(16),B1 ;@@@@@ |2056|
+|| MPYH .M2X A0,B4,B9 ;@@@@@ |2040|
+|| ADD .S1 A3,A5,A3 ;@@@@@ |2036|
+
+ ADD .L1X A7,B9,A6 ;@@@ |2059|
+|| MPYH .M2 B7,B5,B8 ;@@@@ |2052|
+|| ADD .S2X A6,B8,B10 ;@@@@ |2047|
+
+ ADD .L1X B12,A6,A13 ;@@@ |2060|
+|| MPYH .M2 B1,B3,B12 ;@@@@ |2058|
+|| ADD .S2X B6,A3,B6 ;@@@@@ |2041|
+
+ [!A1] SHR .S1 A13,A14,A13 ;@@@ |2071|
+|| ADD .L2X A9,B10,B1 ;@@@@ |2048|
+|| MPY .M2 B7,B5,B2 ;@@@@@ |2051|
+|| MPYH .M1 A8,A12,A9 ;@@@@@ |2046|
+
+ [ A1] SSHL .S1 A13,A14,A13 ;@@@ |2070|
+|| ADD .L2 B2,B1,B10 ;@@@@ |2053|
+|| MPY .M1 A8,A12,A6 ;@@@@@ |2045|
+
+ STH .D2T1 A13,*B11++ ;@@@ |2073| store output sample
+|| ADD .L2 B8,B10,B9 ;@@@@ |2054|
+|| MPY .M1X B1,A11,A7 ;@@@@@ |2057|
+|| ADD .S2 B9,B6,B8 ;@@@@@ |2042|
+
+ ADD .L1X A7,B9,A6 ;@@@@ |2059|
+|| MPYH .M2 B7,B5,B8 ;@@@@@ |2052|
+|| ADD .S2X A6,B8,B10 ;@@@@@ |2047|
+
+ ADD .L1X B12,A6,A13 ;@@@@ |2060|
+|| MPYH .M2 B1,B3,B12 ;@@@@@ |2058|
+
+ [!A1] SHR .S1 A13,A14,A13 ;@@@@ |2071|
+|| ADD .L2X A9,B10,B1 ;@@@@@ |2048|
+
+ [ A1] SSHL .S1 A13,A14,A13 ;@@@@ |2070|
+|| ADD .L2 B2,B1,B10 ;@@@@@ |2053|
+
+ STH .D2T1 A13,*B11++ ;@@@@ |2073| store output sample
+|| ADD .L2 B8,B10,B9 ;@@@@@ |2054|
+
+ ADD .L1X A7,B9,A6 ;@@@@@ |2059|
+ ADD .L1X B12,A6,A13 ;@@@@@ |2060|
+ [!A1] SHR .S1 A13,A14,A13 ;@@@@@ |2071|
+ [ A1] SSHL .S1 A13,A14,A13 ;@@@@@ |2070|
+ STH .D2T1 A13,*B11++ ;@@@@@ |2073| store output sample
+ NOP 3
+;** --------------------------------------------------------------------------*
+
+ LDW .D2T2 *+SP(32),B3
+|| MVC .S2 B13,CSR ; |2019|
+
+ LDW .D2T2 *+SP(40),B11
+ LDW .D2T2 *+SP(36),B10
+ LDW .D2T1 *+SP(28),A14
+ LDW .D2T1 *+SP(24),A13
+ LDW .D2T1 *+SP(20),A12
+ LDW .D2T1 *+SP(16),A11
+ LDW .D2T1 *+SP(12),A10
+
+ B .S2 B3
+|| LDW .D2T2 *+SP(44),B12
+
+ LDW .D2T2 *++SP(48),B13
+ NOP 4
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _expX *
+;* *
+;* Regs Modified : A0,A4,A5,B5,SP *
+;* Regs Used : A0,A4,A5,B3,B4,B5,SP *
+;******************************************************************************
+_expX:
+;** --------------------------------------------------------------------------*
+;
+;
+;/***************************************************************************
+;**
+;** expX()
+;** ------
+;**
+;** This will break a number into:
+;** x = mantissa * 2^exponent
+;**
+;** This uses the C6x intrinsic NORM()
+;**
+;**
+;** Input data: - x, input data to break apart
+;**
+;** Output data - exponent, exponent of the "x"
+;**
+;** Return data - mantissa, mantissa of the "x"
+;**
+;** Limitations - assumes ACCUM_GUARD_BITS=8, WORD_SIZE=16
+;** necessary to get any improvement
+;**
+;***************************************************************************/
+;Word expX
+;(
+; UVLWord data,
+; Word *exponent
+;);
+;
+; _expX .cproc data1:data0, expptr ; returns Word
+; .reg sptr
+; .reg nsignb
+; .reg temp
+ B .S2 B3
+ NOP 2
+
+ MVK .S2 0x10,B5 ; |2445|
+|| NORM .L1 A5:A4,A0 ; |2446|
+
+ SUB .L2X B5,A0,B5 ; |2447|
+|| SHL .S1 A5:A4,A0,A5:A4 ; |2450|
+|| SUB .S2 SP,8,SP ; |2425|
+
+ SHR .S1 A5:A4,0x18,A5:A4 ; |2451|
+|| STH .D2T2 B5,*B4 ; |2448|
+|| ADD .L2 8,SP,SP
+
+ ; BRANCH OCCURS
+
+
+; .endproc
+ .sect ".text"
+
+;******************************************************************************
+;* FUNCTION NAME: _mag2DB *
+;* *
+;* Regs Modified : A0,A1,A3,A4,A5,B0,B4,B5,SP *
+;* Regs Used : A0,A1,A3,A4,A5,B0,B3,B4,B5,SP *
+;******************************************************************************
+_mag2DB:
+;** --------------------------------------------------------------------------*
+;
+;/***************************************************************************
+;* mag2DB()
+;* -------
+;*
+;* Input Data: mag, magnitude of a value F48 with 40 actual bits
+;*
+;* Return Data: power in decibels of format F16.2
+;*
+;* Limitations: assumes ACCUM_GUARD_BITS=8, WORD_SIZE=16
+;* needed to fold constants to get any improvement
+;*
+;* Convert an unsigned long word (40bits) in the format
+;* F32 to decibels.
+;* The magin F48 because is was calculated by
+;* F16 * F16 = F32.
+;* Therefore "31" needs to subtracted from pow2(mag)
+;* in order to align the decimal point.
+;*
+;* In floating point this would be :
+;* If wordsize is 16 then:
+;* *power = 10 * log10( (mag >> 16)/(double)((1<<2*16)-1) );
+;*
+;* Note that
+;* 10*log10(x) = (10*0.301)*log2(x)
+;* And 3*log2() = 3*(integer + fractional) = 3*integer + 3*fractional
+;*
+;* The fractional part is derived from a lookup table with
+;* the 2 next significant bits after the most significant bit.
+;*
+;* The entries are calculated by log2(1.0),log2(1.25),log2(1.5),log2(1.75)
+;*
+;* logTable[4] = { 3*-1, 3*-0.6781, 3*-0.415, 3*-0.1926 }; floating
+;* Multiply float table by 4 add 1 (to round) and round to nearest integer
+;*
+;***************************************************************************/
+;
+;Word14 mag2DB
+;(
+; UVLWord mag
+;);
+;
+; _mag2DB .cproc mag1:mag0 ; returns Word14
+; .reg sptr
+; .reg lptr
+; .reg nsignb
+; .reg temp
+; .reg temp1:temp0
+; .reg power
+; .reg intpart
+; .reg fracpart
+; .reg cond
+; .reg num
+
+ MVK .S1 0x24,A0 ; |2528|
+|| NORM .L1 A5:A4,A3 ; |2518|
+
+ SHL .S1 A5:A4,A3,A5:A4 ; |2529|
+ SHR .S1 A5:A4,A0,A1:A0 ; |2530|
+
+ CMPLT .L2X 0x3,A0,B0 ; |2531|
+|| MVK .S2 _logTable,B4 ; |2513|
+
+ SUB .L2X A0,0x4,B5 ; |2531|
+|| MVKH .S2 _logTable,B4 ; |2514|
+
+ B .S2 B3
+|| [ B0] LDH .D2T1 *+B4[B5],A0 ; |2558|
+|| ADDK .S1 0xffffffda,A3 ; |2540|
+
+ NEG .L1 A3,A3 ; |2541|
+ SUBAB .D1 A3,31,A4 ; |2545|
+ MPY .M1 0xc,A4,A4 ; |2546|
+ SUB .L2 SP,8,SP ; |2500|
+
+ [ B0] ADD .L1 A4,A0,A4 ; |2559|
+|| ADD .L2 8,SP,SP
+
+ ; BRANCH OCCURS
+
+
+; .endproc
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod/training.h b/data/mnet/GP10/Dsp/bbdataproc/demod/training.h
new file mode 100644
index 0000000..3a1bff6
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod/training.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*
+** GSM Demod Training Sequences
+**
+** Revision 1.2 1999-05-03 11:53:45-07 whuang
+** Added Viterbi equalizer function
+**
+** Revision 1.3 1998/10/27 21:39:55 bhehn
+** AB & NB eqaulizer verifed.
+** AB ~= 125us, NB ~= 155us.
+**
+** Revision 1.2 1998/10/14 18:43:29 bhehn
+** AB & NB verified. Merged with shared headsion 1.1 1998/10/01 13:56:59 bhehn
+** Initial revision
+**
+** Revision 1.2 1998/09/21 22:04:25 bhehn
+** NB demod works, BER close to floating
+**
+*****************************************************************************/
+#ifndef TRAINING_H
+#define TRAINING_H
+
+/*
+* Define the training sequence word length,
+* tseq = -1 or 1 = 2 bits
+*/
+typedef Char t_TseqWord;
+
+/*
+* Set up a #define that determines whether the
+* variables should be defined here or just
+* externed here
+*/
+#ifdef DEMOD_TOP
+
+
+
+
+const t_TseqWord train_nb[8][26] =
+{
+ { -1, -1, +1, -1, -1, +1, -1, +1, +1, +1, -1, -1, -1,
+ -1, +1, -1, -1, -1, +1, -1, -1, +1, -1, +1, +1, +1 },
+
+ { -1, -1, +1, -1, +1, +1, -1, +1, +1, +1, -1, +1, +1,
+ +1, +1, -1, -1, -1, +1, -1, +1, +1, -1, +1, +1, +1 },
+
+ { -1, +1, -1, -1, -1, -1, +1, +1, +1, -1, +1, +1, +1,
+ -1, +1, -1, -1, +1, -1, -1, -1, -1, +1, +1, +1, -1 },
+
+ { -1, +1, -1, -1, -1, +1, +1, +1, +1, -1, +1, +1, -1,
+ +1, -1, -1, -1, +1, -1, -1, -1, +1, +1, +1, +1, -1 },
+
+ { -1, -1, -1, +1, +1, -1, +1, -1, +1, +1, +1, -1, -1,
+ +1, -1, -1, -1, -1, -1, +1, +1, -1, +1, -1, +1, +1 },
+
+ { -1, +1, -1, -1, +1, +1, +1, -1, +1, -1, +1, +1, -1,
+ -1, -1, -1, -1, +1, -1, -1, +1, +1, +1, -1, +1, -1 },
+
+ { +1, -1, +1, -1, -1, +1, +1, +1, +1, +1, -1, +1, +1,
+ -1, -1, -1, +1, -1, +1, -1, -1, +1, +1, +1, +1, +1 },
+
+ { +1, +1, +1, -1, +1, +1, +1, +1, -1, -1, -1, +1, -1,
+ -1, +1, -1, +1, +1, +1, -1, +1, +1, +1, +1, -1, -1 }
+};
+
+const t_TseqWord train_ab[41] =
+{
+ -1, +1, -1, -1, +1, -1, +1, +1, -1, +1,
+ +1, +1, +1, +1, +1, +1, +1, -1, -1, +1,
+ +1, -1, -1, +1, +1, -1, +1, -1, +1, -1,
+ +1, -1, -1, -1, +1, +1, +1, +1, -1, -1, -1
+};
+
+#else
+
+extern const t_TseqWord train_nb[8][26];
+extern const t_TseqWord train_ab[41];
+
+#endif /* ifdef DEMOD_TOP */
+
+
+
+#endif
diff --git a/data/mnet/GP10/Dsp/bbdataproc/demod/viteq.asm b/data/mnet/GP10/Dsp/bbdataproc/demod/viteq.asm
new file mode 100644
index 0000000..7375bd9
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/demod/viteq.asm
@@ -0,0 +1,441 @@
+*****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************
+
+*==============================================================================
+*
+* TEXAS INSTRUMENTS ,INC.
+*
+* VITERBI EQUALIZER - GSM
+*
+* Revision Date: 06/12/97
+*
+* Revision Date: 02/25/99: converted path transition outputs from
+* hard decision to soft-decision(hpines)
+*
+* USAGE This routine is C callable and can be called as
+*
+* void viteq(int n, short new_s[], short old[],
+* short sd[], short pr[], short trans[])
+*
+* n --- decoder input length
+* new_s --- state metrics at current instant
+* old --- state metrics at previous instant
+* sd --- soft decision values of input bit stream
+* pr --- probability metrics
+* trans --- path transition of each state
+*
+* C CODE
+* This is the C equivalent of the assembly code. Note that
+* the assembly code is hand optimized and restrictions may
+* apply.
+*
+* void viteq(int n, short new_s[], short old[],
+* short sd[], short pr[], short trans[])
+* {
+* int i, j, k, a, b, alpha0, alpha1;
+* short *tmp;
+*
+* for (i = 0; i < n; i++) {
+* for (j = 0; j < 8; j++) {
+* alpha0 = pr[2 * j] - sd[i];
+* alpha1 = pr[2 * j + 1] - sd[i];
+* for (k = 0; k < 16; k += 8) {
+* a = old[2 * j] + alpha0;
+* b = old[2 * j + 1] + alpha1;
+* new_s[j + k] = (b > a) ? b : a;
+* trans[i][j+k] = (b - a); /* new 2/25/99 */
+* alpha0 = -alpha0;
+* alpha1 = -alpha1;
+* }
+* }
+* tmp = old;
+* old = new_s;
+* new_s = tmp;
+* }
+* }
+*
+* DESCRIPTION
+*
+* This routine is used for channel equalization for the
+* GSM full rate system, with Viterbi algorithm and soft
+* decision. The code is of rate 1/2 and of constraint
+* length K = 4. The equilization formula is
+*
+* ___ k = 3
+* y(n) = \ H(k)x(n-k)
+* /__ k = 0
+*
+*
+* TECHNIQUES
+*
+* The k loop is completely unrolled.
+*
+* ASSUMPTIONS
+* 1. Rate -> 1/2
+* 2. K = 4
+*
+* MEMORY NOTE:
+*
+* There are no memory hits.
+*
+* CYCLES
+* 55*n + 6
+*
+*==============================================================================
+
+ .global _viteq
+ .text
+
+*** BEGIN Benchmark Timing ***
+_viteq:
+
+ ADD .L1X -4, B15, A1 ; copy stack pointer
+|| STW .D2 A14, *-B15[10] ; push A14 on stack
+
+ STW .D1 A10, *A1--[2] ; push A10 on stack
+|| STW .D2 B10, *B15--[2] ; push B10 on stack
+
+ STW .D1 A11, *A1--[2] ; push A11 on stack
+|| STW .D2 B11, *B15--[2] ; push B11 on stack
+|| MVK .S2 3, B0
+|| MV .L2X A6, B5
+|| MV .L1X B8, A3 ; TRN index init
+
+ STW .D1 A12, *A1--[2] ; push A12 on stack
+|| STW .D2 B12, *B15--[2] ; push B12 on stack
+|| MV .L2 B6, B8 ; B8 now input samples
+
+ MVK .S1 40, A14 ; 20 halfs
+|| STW .D1 A13, *A1--[2] ; push A13 on stack
+|| STW .D2 B13, *B15--[2] ; push B13 on stack
+|| ADD .S2X 14, A3, B6 ; trn+8 index init
+
+ STW .D1 A15, *A1 ; push A15 on stack
+|| STW .D2 B14, *B15--[3] ; push B14 on stack
+
+
+ILOOP:
+ ADD .L2 8, B4, B0 ; copy new_s
+|| ADD .L1X 2, B5, A6 ; copy old
+|| MVK .S1 1, A13 ; enables outer loop branch
+|| MVK .S2 9, B2 ; reload i
+;||[!B0] STH .D1 B8, *A3++ ; trans[i] = tr
+|| MV .D2 B5, B10
+
+ ADD .L2X 2, A8, B9 ; copy pr
+|| LDH .D2 *B8++, A12 ; d = sd[i]
+|| B .S1 JLOOP ; for j
+|| MVK .S2 3, B0 ; priming count
+|| ADD .L1X B0, 8, A11 ; copy new_s
+|| SUB .D1 A4, 1, A4 ; i--
+
+JLOOP:
+ ADD .S1 A0, A5, A9 ; a0 = old0 + alpha0,
+|| SUB .L1 A0, A5, A7 ; a8 = old0 - alpha0,
+|| ADD .D2 B11, B5, B13 ; b0 = old1 + alpha1,
+|| SUB .L2 B11, B5, B7 ; b8 = old1 - alpha1,
+||[!B0] STH .D1 B7, *A11++ ; new_s[j + 8] = a8,
+||[B2] SUB .S2 B2, 1, B2 ; j++
+ ; outerloop branch
+
+ LDH .D1 *A8++[2], A10 ;** pr0 = pr[2*j],
+|| LDH .D2 *B9++[2], B12 ;** pr1 = pr[2* j+1],
+|| SUB .L1X B13, A9, A15 ; (b0 - a0),
+|| SUB .L2X B7, A7, B14 ; (b8 - a8),
+|| MPY .M1 0, A2, A2 ; if innerloop prevent
+;|| SHL .S2 B8, 2, B8 ; tr <<= 2,
+condition
+ CMPGT .L1X B13, A9, A1 ; t0 = (b0 > a0),
+|| CMPGT .L2X B7, A7, B1 ; t8 = (b8 > a8),
+|| LDH .D2 *B10++[2], A0 ;** old0 = old[2*j],
+|| LDH .D1 *A6++[2], B11 ;** old1 = old[2*j+1],
+||[B0] SUB .S2 B0, 1, B0 ; priming count
+||[A2] B .S1 ILOOP ; for i
+||[!B2] MPY .M1 A13, A4, A2 ; outer loop branch
+
+***
+*** following extra instruction packet required to handle the soft
+*** decision outputs...2/25/99..hpines
+***
+ [!B0] STH .D1 A15, *A3++ ; trn(0) = a15
+||[!B0] STH .D2 B14, *++B6 ; trn(8) = b14
+||[A1] MV .L1X B13, A9 ; a0 = (t0) ? b0 : a0,
+||[!B1] MPY .M2X 1, A7, B7 ; b8 = (!t8) ? a8 : b8,
+
+ SUB .D1 A10, A12, A5 ;* alpha0 = pr0 - d,
+|| SUB .L2X B12, A12, B5 ;* alpha1 = pr1 - d,
+||[!B0] STH .D2 A9, *B4++ ; new_s[j] = a0,
+;||[A1] OR .S2 2, B8, B8 ; tr |= t0 << 1,
+||[B2] B .S1 JLOOP ; for j
+||[A2] MPY .M1 0, A13, A13 ; disables double outer
+ ; loop branch
+
+JLOOP_END:
+ STH .D1 B7, *A11++ ; new_s[j + 8] = a8,
+|| SUB .L2X B10, A14, B4 ; reset/swap old & new_s
+|| ADD .S2 -16, B4, B5 ;
+|| SUB .L1 A8, A14, A8 ; reset pr
+;|| ADD .S1 14, A3, A3 ; update trn[0]
+
+ILOOP_END:
+; STH .D1 A15, *A3++ ; trn(0) = a15
+;|| STH .D2 B14, *++B6 ; trn(8) = b14
+
+ NOP
+
+ ADDK .S1 16, A3 ; update trn[0]
+|| ADDAH .D2 B6, 8, B6 ; update trn[8]
+
+ NOP
+
+*** END Benchmark Timing ***
+
+ LDW .D2 *++B15, A14 ; pop A15 off stack
+|| ADD .L1X 0, B15, A1 ; copy stack pointer
+
+ LDW .D1 *++A1[2], A15 ; pop A15 off stack
+|| LDW .D2 *++B15[2], B14 ; pop B14 off stack
+
+ LDW .D1 *++A1[2], A13 ; pop A13 off stack
+|| LDW .D2 *++B15[2], B13 ; pop B13 off stack
+
+ LDW .D1 *++A1[2], A12 ; pop A12 off stack
+|| LDW .D2 *++B15[2], B12 ; pop B12 off stack
+
+ LDW .D1 *++A1[2], A11 ; pop A11 off stack
+|| LDW .D2 *++B15[2], B11 ; pop B11 off stack
+|| B .S2 B3 ; return
+
+ LDW .D1 *++A1[2], A10 ; pop A10 off stack
+|| LDW .D2 *++B15[2], B10 ; pop B10 off stack
+
+ NOP 4
+
+*===============================================================================
+*
+* TEXAS INSTRUMENTS, INC.
+*
+* FIR4
+*
+* Revision Date: 4/17/97
+*
+* USAGE This routine is C Callable and can be called as:
+*
+* void fir(short *x, short *h, short *y, int N, int M)
+*
+* x = input array
+* h = coefficient array
+* y = output array
+* N = number of coefficients (MULTIPLE of 4 >= 8)
+* M = number of output samples (M EVEN >= 2)
+*
+* If routine is not to be used as a C callable function
+* then all instructions relating to stack should be removed.
+* Refer to comments of individual instructions. You will also
+* need to initialize values for all of the values passed as these
+* are assumed to be in registers as defined by the calling
+* convention of the compiler, (refer to the C compiler reference
+* guide).
+*
+* C Code This is the C equivalent of the Assembly Code without
+* restrictions.
+*
+* Note that the assembly code is hand optimized and restrictions
+* may apply
+*
+* void fir4(short x[], short h[], short y[], int N, int M)
+* {
+* int i, j, sum;
+*
+* for (j = 0; j < M; j++) {
+* sum = 0;
+* for (i = 0; i < N; i++)
+* sum += x[i + j] * h[i];
+* y[j] = sum >> 15;
+* }
+* }
+*
+* DESCRIPTION
+* This FIR assumes the number of filter coeficients is a multiple
+* of 4 and the number of output samples is a multiple of 2. It
+* operates on 16-bit data with a 32-bit accumulate. This
+* routine has no memory hits regardless of where x, h, and y
+* arrays are located in memory. The filter is M output samples
+* and N coefficients. The assembly routine performs 2 output
+* samples at a time.
+*
+*
+* TECHNIQUES
+* The inner loop is unrolled four times thus the number of
+* filter coefficients must be a multiple of four. The outer
+* loop is unrolled twice so the number of output samples must
+* be a multiple of 2.
+*
+* If an odd number of output samples is needed or possible, the
+* final store can either be removed or conditionally executed
+* depending on whether M is even or odd. This code would have to
+* be added to the existing code.
+*
+* The outer loop, like the inner loop, is software pipelined as
+* well. e, o, and p in the comments of the individual
+* instructions correspond to the epilogue, outer loop, and
+* prologue respectively.
+*
+* Refer to FIR example in the optimizing assembly chapter of
+* the programmer's guide for more information.
+*
+*
+* ASSUMPTIONS
+* N MULTIPLE of 4 >= 8
+* M EVEN >= 2
+*
+*
+* MEMORY NOTE
+* This code has no memory hits regardless of where x and h are
+* located in memory.
+*
+* CYCLES M*(N+8)/2+6
+*
+*===============================================================================
+ .global _firLoPass
+ .text
+_firLoPass:
+ STW .D2 B10,*B15-- ; push register (for c-callable func)
+
+*** BEGIN Benchmark Timing ***
+B_START
+
+ STW .D2 B11,*B15-- ; push register (for c-callable func)
+|| SHR .S1 A8,1,A2 ; set up outer loop counter
+|| SHL .S2 B6,1,B10 ; used to rst h pointer each outer loop
+
+ STW .D2 B12,*B15-- ; push register (for c-callable func)
+|| ADD .L1X B10,10,A3 ; used to rst x pointer each outer loop
+|| ADD .S2 B10,8,B10 ; used to rst h pointer each outer loop
+|| ADD .L2X A6,4,B11 ; set up pointer to y[1], offset 4 since comples
+
+ LDH .D1 *A4++,B8 ; x0 = x[j]
+|| ADD .L2X A4,4,B1 ; set up pointer to x[j+2]
+|| ADD .L1X B4,2,A8 ; set up pointer to h[1]
+|| SHR .S2 B6,2,B12 ; set up inner loop counter
+||[A2] SUB .S1 A2,1,A2 ; decrement outer loop counter
+
+ LDH .D2 *B1++[2],B0 ; x2 = x[j+i+2]
+|| LDH .D1 *A4++[2],A0 ; x1 = x[j+i+1]
+
+ LDH .D1 *A8++[2],B6 ; h1 = h[i+1]
+|| LDH .D2 *B4++[2],A1 ; h0 = h[i]
+
+ LDH .D1 *A4++[2],A5 ; x3 = x[j+i+3]
+|| LDH .D2 *B1++[2],B5 ; x0 = x[j+i+4]
+
+OUTLOOP:
+ LDH .D2 *B4++[2],A7 ; h2 = h[i+2]
+|| LDH .D1 *A8++[2],B8 ; h3 = h[i+3]
+|| ZERO .L1 A9 ; zero out sum0
+|| ZERO .L2 B9 ; zero out sum1
+
+ LDH .D2 *B1++[2],B0 ;* x2 = x[j+i+2]
+|| LDH .D1 *A4++[2],A0 ;* x1 = x[j+i+1]
+|| SUB .S2 B12,2,B2 ; set up inner loop counter
+
+ LDH .D1 *A8++[2],B6 ;* h1 = h[i+1]
+|| LDH .D2 *B4++[2],A1 ;* h0 = h[i]
+
+ MPY .M1X B8,A1,A0 ; x0 * h0
+|| MPY .M2X A0,B6,B6 ; x1 * h1
+|| LDH .D1 *A4++[2],A5 ;* x3 = x[j+i+3]
+|| LDH .D2 *B1++[2],B5 ;* x0 = x[j+i+4]
+
+ [B2] B .S1 LOOP ; branch to loop
+|| MPY .M2 B0,B6,B7 ; x2 * h1
+|| MPY .M1 A0,A1,A1 ; x1 * h0
+|| LDH .D2 *B4++[2],A7 ;* h2 = h[i+2]
+|| LDH .D1 *A8++[2],B8 ;* h3 = h[i+3]
+||[B2] SUB .S2 B2,1,B2 ;* decrement loop counter
+
+ ADD .L1 A0,A9,A9 ; sum0 += x0 * h0
+|| MPY .M2X A5,B8,B8 ; x3 * h3
+|| MPY .M1X B0,A7,A5 ; x2 * h2
+|| LDH .D2 *B1++[2],B0 ;** x2 = x[j+i+2]
+|| LDH .D1 *A4++[2],A0 ;** x1 = x[j+i+1]
+
+LOOP:
+ ADD .L2X A1,B9,B9 ; sum1 += x1 * h0
+|| ADD .L1X B6,A9,A9 ; sum0 += x1 * h1
+|| MPY .M2 B5,B8,B7 ; x0 * h3
+|| MPY .M1 A5,A7,A7 ; x3 * h2
+|| LDH .D1 *A8++[2],B6 ;** h1 = h[i+1]
+|| LDH .D2 *B4++[2],A1 ;** h0 = h[i]
+
+ ADD .L2 B7,B9,B9 ; sum1 += x2 * h1
+|| ADD .L1 A5,A9,A9 ; sum0 += x2 * h2
+|| MPY .M1X B5,A1,A0 ;* x0 * h0
+|| MPY .M2X A0,B6,B6 ;* x1 * h1
+|| LDH .D1 *A4++[2],A5 ;** x3 = x[j+i+3]
+|| LDH .D2 *B1++[2],B5 ;** x0 = x[j+i+4]
+
+ ADD .L2X A7,B9,B9 ; sum1 += x3 * h2
+|| ADD .L1X B8,A9,A9 ; sum0 += x3 * h3
+||[B2] B .S1 LOOP ;* branch to loop
+|| MPY .M2 B0,B6,B7 ;* x2 * h1
+|| MPY .M1 A0,A1,A1 ;* x1 * h0
+|| LDH .D2 *B4++[2],A7 ;** h2 = h[i+2]
+|| LDH .D1 *A8++[2],B8 ;** h3 = h[i+3]
+||[B2] SUB .S2 B2,1,B2 ;** decrement loop counter
+
+ ADD .L2 B7,B9,B9 ; sum1 += x0 * h3
+|| ADD .L1 A0,A9,A9 ;* sum0 += x0 * h0
+|| MPY .M2X A5,B8,B8 ;* x3 * h3
+|| MPY .M1X B0,A7,A5 ;* x2 * h2
+|| LDH .D2 *B1++[2],B0 ;*** x2 = x[j+i+2]
+|| LDH .D1 *A4++[2],A0 ;*** x1 = x[j+i+1]
+ ; inner loop branch occurs here
+
+ ADD .L2X A1,B9,B9 ;e sum1 += x1 * h0
+|| ADD .L1X B6,A9,A9 ;e sum0 += x1 * h1
+|| MPY .M2 B5,B8,B7 ;e x0 * h3
+|| MPY .M1 A5,A7,A7 ;e x3 * h2
+|| SUB .D1 A4,A3,A4 ;o reset x pointer to x[j]
+|| SUB .D2 B4,B10,B4 ;o reset h pointer to h[0]
+||[A2] B .S1 OUTLOOP ;o branch to outer loop
+
+ ADD .D2 B7,B9,B9 ;e sum1 += x2 * h1
+|| ADD .L1 A5,A9,A9 ;e sum0 += x2 * h2
+|| LDH .D1 *A4++,B8 ;p x0 = x[j]
+|| ADD .L2X A4,4,B1 ;p set up pointer to x[j+2]
+|| ADD .S1X B4,2,A8 ;p set up pointer to h[1]
+
+ ADD .L2X A7,B9,B9 ;e sum1 += x3 * h2
+|| ADD .L1X B8,A9,A9 ;e sum0 += x3 * h3
+|| LDH .D2 *B1++[2],B0 ;p x2 = x[j+i+2]
+|| LDH .D1 *A4++[2],A0 ;p x1 = x[j+i+1]
+||[A2] SUB .S1 A2,1,A2 ;o decrement outer loop counter
+
+ ADD .L2 B7,B9,B9 ;e sum1 += x0 * h3
+|| SHR .S1 A9,15,A9 ;e sum0 >> 15
+|| LDH .D1 *A8++[2],B6 ;p h1 = h[i+1]
+|| LDH .D2 *B4++[2],A1 ;p h0 = h[i]
+
+ SHR .S2 B9,15,B9 ;e sum1 >> 15
+|| LDH .D1 *A4++[2],A5 ;p x3 = x[j+i+3]
+|| LDH .D2 *B1++[2],B5 ;p x0 = x[j+i+4]
+
+ STH .D1 A9,*A6++[4] ;e y[j] = sum0 >> 15, offset 4 since complex
+|| STH .D2 B9,*B11++[4] ;e y[j+1] = sum1 >> 15
+ ; outer loop branch occurs here
+B_END:
+*** END Benchmark Timing ***
+
+
+ LDW .D2 *++B15,B12 ; pop register (for c-callable func)
+
+ LDW .D2 *++B15,B11 ; pop register (for c-callable func)
+|| B .S2 B3 ; return
+
+ LDW .D2 *++B15,B10 ; pop register (for c-callable func)
+
+ NOP 4
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/include/bbdata.h b/data/mnet/GP10/Dsp/bbdataproc/include/bbdata.h
new file mode 100644
index 0000000..a4bbe7f
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/include/bbdata.h
@@ -0,0 +1,111 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* File: bbdata.h
+*
+* Description:
+* This file contains references to the global structures and variables
+* used in the Layer 1 Baseband Processing routines. It includes a file
+* containing the defined constants, enumerations and type definitions
+* that support the same Layer 1 Baseband Processing routines. An item
+* is included in this header file if it is used by multiple baseband
+* processing functions.
+*
+* NOTE: INGLOB and EXGLOB specify internal and external DSP memory
+* allocation, respectively. They are defined in dsptypes.h
+* and included here through bbtypes.h.
+*
+*****************************************************************************/
+#ifndef _BBDATA_H_
+#define _BBDATA_H_ /* include once only */
+
+#include "bbtypes.h"
+
+/*
+* Declare the global UL and DL channel data buffers.
+*/
+INGLOB t_DLCCHBuff g_DLCCHData;
+INGLOB t_ULCCHBuff g_ULCCHData;
+INGLOB t_DLTCHBuff g_DLTCHData;
+INGLOB t_ULTCHBuff g_ULTCHData;
+INGLOB t_ULRACHBuff g_ULRACHData;
+INGLOB t_ULCCHFireBuff g_ULCCHFireData;
+
+/*
+* Declare the global DL Coded data buffer. This is where modulator
+* input is stored
+*/
+INGLOB t_DLCodedBuf g_DLCodedData;
+
+/*
+* Declare the global DL burst "bits" data buffers. This is where
+* modulator input comes from and where burst builder output is stored.
+*/
+INGLOB t_DLBurstBuf g_DLBurstData;
+
+/*
+* Declare the global UL Burst data buffer. This is where demod
+* output is stored
+*/
+INGLOB t_ULBurstBuf g_ULBurstData;
+
+/*
+* Declare the global DL transmission buffers. This is where modulator
+* output is stored
+*/
+#pragma DATA_ALIGN(g_DLBBData, 4);
+INGLOB t_DLBBData g_DLBBData;
+
+/*
+* Declare the global UL receive buffers. This is where demod
+* input is stored
+*/
+#pragma DATA_ALIGN(g_ULBBData, 4);
+INGLOB t_ULBBData g_ULBBData;
+
+INGLOB t_ULComplexSamp *ulBurstBufPtr[4];
+INGLOB t_DLComplexSamp *dlBurstBufPtr[2];
+
+/*
+* Declare DC offset storage for each TCH and each SDCCH plus one all-carrier offset
+*/
+INGLOB t_LongComplexSamp g_DcOffset[NUM_RFS_PER_DSP][NUM_TN_PER_RF+NUM_SDCCH_SUBCHANS+1];
+
+/*
+ Declare the DC offset store for the GROUP 7 DC offsets
+*/
+
+INGLOB t_LongComplexSamp g_Dc_7_Offset[NUM_RFS_PER_DSP][NUM_SDCCH8_SUBCHANS];
+
+/*
+* Declare GPRS codec bits per coding class and associated flags
+*/
+INGLOB Uint16 g_GPRSCodecBits[GPRS_CODEC_TYPE];
+INGLOB Uint8 g_GPRSCodecFlags[GPRS_CODEC_TYPE];
+
+/*
+* Global variables and buffers
+*/
+INGLOB t_DLCodedBuf4 g_intBuf4Deep;
+INGLOB t_ULBurstBuf4 g_deintBuf4Deep;
+INGLOB t_DLCodedBuf8 g_intBuf8Deep;
+INGLOB t_ULBurstBuf8 g_deintBuf8Deep;
+
+INGLOB UChar g_codecBsic[6];
+
+/*
+* TCH and RACH masking thresholds
+*/
+EXGLOB Uint8 g_TchBerThresh; /* BER thresh for perceptual voice masking */
+EXGLOB Int16 g_TchMetricThresh; /* Viterbi metric thresh for masking */
+EXGLOB Uint8 g_RachSnrThresh; /* SNR thresh for masking */
+EXGLOB Int16 g_RachMetricThresh; /* Viterbi metric thresh for masking */
+
+
+#endif /* end of include once only */
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/bbdataproc/include/bbproto.h b/data/mnet/GP10/Dsp/bbdataproc/include/bbproto.h
new file mode 100644
index 0000000..f398f1c
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/include/bbproto.h
@@ -0,0 +1,9 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+** Filename: bbproto.h
+**
+** These high-level prototypes have been moved to dsprotyp.h
+**/ \ No newline at end of file
diff --git a/data/mnet/GP10/Dsp/bbdataproc/include/bbtypes.h b/data/mnet/GP10/Dsp/bbdataproc/include/bbtypes.h
new file mode 100644
index 0000000..ce0df3f
--- /dev/null
+++ b/data/mnet/GP10/Dsp/bbdataproc/include/bbtypes.h
@@ -0,0 +1,358 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* File: bbtypes.h
+*
+* Description:
+* This file contains defined constants, enumerations and type definitions
+* of shared items in support of the Layer 1 Baseband Processing routines.
+* An item is included in this header file if it is used by multiple
+* baseband processing functions.
+*
+*****************************************************************************/
+#ifndef _BBYTPES_H
+#define _BBYTPES_H
+
+#include "gsmtypes.h"
+
+#define MAX_SOFT_DECISION 8
+#define MODULO_2_MASK 0x0001
+#define MODULO_4_MASK 0x0003
+#define MODULO_8_MASK 0x0007
+
+/*
+* Define bit lengths for each burst type including
+* training sequence length, number of encrypted bits, etc...
+*
+*
+* Normal Burst
+* -----------------------------------------------------------
+* |TB=3| DATA = 58 | TSEQ = 26 | DATA = 58 |TB=3|GP=8.25|
+* -----------------------------------------------------------
+*
+* Access Burst
+* -----------------------------------------------------------
+* |TB=8| TSEQ = 41 | DATA = 36 |TB=3| GP=68.25 |
+* -----------------------------------------------------------
+*
+* Sync Burst
+* -----------------------------------------------------------
+* |TB=3| DATA = 39| TSEQ = 64 | DATA = 39 |TB=3|GP=8.25|
+* -----------------------------------------------------------
+*
+*/
+#define NB_NUM_ENCRYPT_BITS_PER_BURST 116
+#define NB_NUM_ENCRYPT_BITS_PER_SIDE (NB_NUM_ENCRYPT_BITS_PER_BURST/2)
+#define NB_NUM_ENCRYPT_WORDS (NB_NUM_ENCRYPT_BITS_PER_BURST/16 + 1)
+#define NB_TRAIN_SIZE 26
+#define NB_NUM_TRAIN_SEQ 8
+
+#define SB_NUM_ENCRYPT_BITS_PER_BURST 78
+#define SB_NUM_ENCRYPT_BITS_PER_SIDE (SB_NUM_ENCRYPT_BITS_PER_BURST/2)
+#define SB_TRAIN_SIZE 64
+
+#define AB_NUM_ENCRYPT_BITS_PER_BURST 36
+#define AB_TRAIN_SIZE 41
+
+#define DB_NUM_MIXED_BITS 142
+#define FB_NUM_FIXED_BITS 142
+
+#define MAX_NUM_ENCRYPT_BITS_PER_BURST (NB_NUM_ENCRYPT_BITS_PER_BURST)
+#define MAX_NUM_ENCRYPT_BITS_PER_SIDE (NB_NUM_ENCRYPT_BITS_PER_SIDE)
+#define MAX_TSEQ_SIZE (SB_TRAIN_SIZE)
+
+#define NB_NUM_TAIL_BITS 3
+#define SB_NUM_TAIL_BITS 3
+#define AB_NUM_TAIL_BITS 8
+
+#define BURST_SIZE_DL 625/2 + 1
+
+#define NUM_BURSTS_PER_CCH_BLOCK 4
+#define NUM_BURSTS_PER_TCH_BLOCK 8
+
+#define NORMAL_BURST 0
+#define ACCESS_BURST 1
+
+#define NUM_BITS_TCH_FRAME 260
+#define NUM_BITS_CCH_FRAME 184
+#define NUM_BITS_RACH_FRAME 8
+#define NUM_BITS_PRACH_FRAME 11
+#define NUM_BITS_SCH_FRAME 25
+#define FILLFRAME_LEN_START 18
+#define FILLFRAME_LEN_END 24
+
+#define NUM_STEAL_FLAGS_PER_FRAME 8
+
+#define NUM_CODED_BITS_TCH_FRAME 378
+#define NUM_CODED_BITS_CCH_FRAME 456
+
+#define NUM_BER_BITS_TCH_FRAME (NUM_CODED_BITS_TCH_FRAME + NUM_STEAL_FLAGS_PER_FRAME)
+#define NUM_BER_BITS_FACCH_FRAME (NUM_CODED_BITS_CCH_FRAME + NUM_STEAL_FLAGS_PER_FRAME)
+#define NUM_BER_BITS_SACCH_FRAME (NUM_CODED_BITS_CCH_FRAME + NUM_STEAL_FLAGS_PER_FRAME)
+
+/*
+* Uplink constants: Define the number of samples per burst
+*/
+#define BURST_SIZE_UL_MAX 157
+
+/*
+* Downlink constants. Note: cut sampling rate by 2 to bypass
+* McBSP dropping samples at 26 MHz bit clock rate
+*/
+#define SAMPLES_PER_BIT 2
+#define SAMPLES_PER_BIT_13MHz 2
+#define LUT_DEPTH 32
+#define MOD_NUM_BITS_IN 148
+#define NB_BITS_TO_MOD 146
+#define AB_BITS_TO_MOD 86
+#define RAMP_SAMPLES (SAMPLES_PER_BIT*5)
+
+/*
+* TCH Perceptual Masking Thresholds. BER Thresh is the number of bit errors
+* per voice frame above which we mask out the frame. This is set empirically
+* to 37/378 = 10% BER. Metric Thresh is the Viterbi metric below which we mask.
+*/
+#define TCH_BER_THRESH 37
+#define TCH_METRIC_THRESH 0x600
+#define RACH_SNR_THRESHOLD 35 /* # RACH tseq bits to match */
+#define RACH_METRIC_THRESHOLD 0x80 /* This needs to be tuned */
+
+/*
+* GPRS related items
+*/
+#define MAX_NUM_GPRS_ADD_BITS 168
+
+typedef enum
+{
+ GPRS_CS_1 = 0,
+ GPRS_CS_2 = 1,
+ GPRS_CS_3 = 2,
+ GPRS_CS_4 = 3,
+ GPRS_CODEC_TYPE
+
+} GPRSCodecType;
+
+/*
+* GSM 5.03
+*/
+#define NUM_BITS_GPRS_CS1 NUM_BITS_CCH_FRAME
+#define NUM_BITS_GPRS_CS2 271
+#define NUM_BITS_GPRS_CS3 315
+#define NUM_BITS_GPRS_CS4 431
+
+/*
+* GPRS Codec Flags on 4 bursts
+*/
+#define FRAME_FLAGS_CS1 0xFF
+//#define FRAME_FLAGS_CS2 0x31
+#define FRAME_FLAGS_CS2 0xC8
+//#define FRAME_FLAGS_CS3 0x84
+#define FRAME_FLAGS_CS3 0x21
+//#define FRAME_FLAGS_CS4 0x68
+#define FRAME_FLAGS_CS4 0x16
+/*
+* Type used for DL transmission buffers
+*/
+typedef struct
+{
+ t_DLComplexSamp burst0246[BURST_SIZE_DL];
+ t_DLComplexSamp burst1357[BURST_SIZE_DL];
+} t_DLBBData;
+
+/*
+* Type used for UL transmission buffers
+*/
+typedef struct
+{
+ t_ULComplexSamp burst04[BURST_SIZE_UL_MAX];
+ t_ULComplexSamp burst15[BURST_SIZE_UL_MAX-1];
+ t_ULComplexSamp burst26[BURST_SIZE_UL_MAX-1];
+ t_ULComplexSamp burst37[BURST_SIZE_UL_MAX-1];
+ t_ULComplexSamp toaOffset[3]; /* extra buffer for TOA correction */
+} t_ULBBData;
+
+/*
+* Buffer for burst builder output and input to modulator.
+*/
+typedef struct
+{
+ Bool tx; /* Transmission Indicator */
+ UChar data[MOD_NUM_BITS_IN+RAMP_SAMPLES];
+} t_DLBurstBuf;
+
+typedef struct
+{
+ Short toa; /* Time of Arrival: from -2 (NB_TOA_MIN) to +64 (AB_TOA_MAX) */
+ Short snr; /* Signal to Noise (plus Interference) Ratio */
+ Short rcvPower; /* Uplink Signal Power Level */
+ /*
+ * Soft decisions of the bits
+ */
+ Char data[MAX_NUM_ENCRYPT_BITS_PER_BURST]; /* Soft decisions of the bits */
+} t_ULBurstBuf;
+
+typedef struct
+{
+ Int cchRXBurstIndex[NUM_TN_PER_RF]; /* Interleaver burst index */
+ /*
+ * Soft decisions of the bits
+ */
+ Char data[NUM_TN_PER_RF][NUM_BURSTS_PER_CCH_BLOCK][NB_NUM_ENCRYPT_BITS_PER_BURST];
+} t_ULBurstBuf4;
+
+typedef struct
+{
+ Int tchRXBurstIndex[NUM_TN_PER_RF]; /* Interleaver burst index */
+ /*
+ * Soft decisions of the bits
+ */
+ Char data[NUM_TN_PER_RF][NUM_BURSTS_PER_TCH_BLOCK][NB_NUM_ENCRYPT_BITS_PER_BURST];
+} t_ULBurstBuf8;
+
+typedef struct
+{
+ Bool tx; /* Transmission Indicator */
+ UChar data[NB_NUM_ENCRYPT_BITS_PER_BURST];
+} t_DLCodedBuf;
+
+typedef struct
+{
+ Int cchTXBurstIndex[NUM_TN_PER_RF]; /* Interleaver burst index */
+ Char data[NUM_TN_PER_RF][NUM_BURSTS_PER_CCH_BLOCK][NB_NUM_ENCRYPT_BITS_PER_BURST];
+} t_DLCodedBuf4;
+
+typedef struct
+{
+ Int tchTXBurstIndex[NUM_TN_PER_RF]; /* Interleaver burst index */
+ Char txBurstCount[NUM_TN_PER_RF]; /* Burst Transmission Indicator */
+ Char data[NUM_TN_PER_RF][NUM_BURSTS_PER_TCH_BLOCK][NB_NUM_ENCRYPT_BITS_PER_BURST];
+} t_DLCodedBuf8;
+
+typedef struct
+{
+ Int tchTXBurstIndex[NUM_TN_PER_RF]; /* Interleaver burst index */
+ Char data[NUM_TN_PER_RF][NUM_BURSTS_PER_CCH_BLOCK][NB_NUM_ENCRYPT_BITS_PER_BURST];
+ Char txBurstCount[NUM_TN_PER_RF]; /* Burst Transmission Indicator */
+} t_PDCHCodedBuf4;
+
+typedef union
+{
+ t_DLCodedBuf8
+ t_PDCHCodedBuf4;
+}u_DLCodecBuf;
+
+typedef struct
+{
+ Bool bufferValid; /* Buffer Valid Flag. Indicates buffer ready */
+ Uint8 chCodec;
+ Uint8 codecFlags;
+ Char data[NUM_CODED_BITS_CCH_FRAME];
+} t_DLCCHBuff;
+
+typedef union
+{
+ UShort intval;
+ struct
+ {
+ UInt bufferValid :1; /* Buffer Valid Flag. Indicates buffer ready */
+ UInt sp :1; /* Speech Present flag */
+ UInt spare :14;
+ } bitval;
+} t_DLTCHWord0;
+
+typedef struct
+{
+ t_DLTCHWord0 dltchword0;
+ Char data[NUM_BITS_TCH_FRAME+MAX_NUM_GPRS_ADD_BITS+4];
+} t_DLTCHBuff;
+
+typedef union
+{
+ UShort intval;
+ struct
+ {
+ UInt bufferValid :1; /* Buffer Valid Flag. Indicates buffer ready */
+ UInt spare :8;
+ UInt bfi :1;
+ UInt spare2 :3;
+ UInt fireStatus :3; /* Status of Fire Code: 0-no error, */
+ /* 1-error detected, 2-error corrected, 3-reserved */
+ } bitval;
+} t_ULCCHWord0;
+
+typedef union
+{
+ UShort intval;
+ struct
+ {
+ UInt bufferValid :1; /* Buffer Valid Flag. Indicates buffer ready */
+ UInt parityStatus :1; /* TCH frame CRC bit field */
+ UInt bfi :1; /* Bad Frame Indicator */
+ UInt sid :2; /* Silence Frame Indicator */
+ UInt mask :1; /* Perceptual Masking Indicator */
+ UInt spare :10;
+ } bitval;
+} t_ULTCHWord0;
+
+typedef union
+{
+ UShort intval;
+ struct
+ {
+ UInt bufferValid :1; /* Buffer Valid Flag. Indicates buffer ready */
+ UInt rachDet :1; /* RACH Detection Flag */
+ UInt spare :13;
+ UInt bfi :1; /* Bad Frame Indication */
+ } bitval;
+} t_ULRACHWord0;
+
+typedef struct
+{
+ t_ULCCHWord0 ulcchword0;
+ UShort nErrs; /* Estimated errors in 1 FACCH frame (by chanDecoder) */
+ UShort metric; /* Viterbi "Best Path Distance Metric" */
+ UShort T1; /* Records the TDMA Frame number where frame was */
+ UChar T2; /* completely received */
+ UChar T3;
+ Uint8 chCodec;
+ Uint8 codecFlags;
+ UChar data[NUM_CODED_BITS_CCH_FRAME];
+} t_ULCCHBuff;
+
+typedef struct
+{
+ UInt errorPatternReg; /* Fire Decoder Error Pattern Register */
+ UInt errorLocationReg; /* Fire Decoder Error Location Register */
+ UChar fireStatus; /* Fire Decoder Processing Status Flag */
+ UChar rfCh;
+ UChar timeslot;
+ UChar subChan;
+ UChar chType;
+ UChar data[NUM_BITS_CCH_FRAME];
+} t_ULCCHFireBuff;
+
+typedef struct
+{
+ t_ULTCHWord0 ultchword0;
+ UShort nErrs; /* Estimated errors in 1 TCH frame (by chanDecoder) */
+ UShort metric; /* Viterbi "Best Path Distance Metric" */
+ Char data[NUM_BITS_TCH_FRAME+MAX_NUM_GPRS_ADD_BITS+4];
+} t_ULTCHBuff;
+
+typedef struct
+{
+ t_ULRACHWord0 ulRACHword0;
+ UShort nErrs; /* Estimated number of errors by Channel Decoder */
+ UShort metric; /* Viterbi "Best Path Distance Metric" */
+ UShort T1; /* Records the TDMA Frame number where frame was */
+ UChar T2; /* completely received */
+ UChar T3;
+ UChar data[NUM_BITS_PRACH_FRAME];
+ UChar spare[NUM_BITS_CCH_FRAME-NUM_BITS_RACH_FRAME];
+} t_ULRACHBuff;
+
+
+#endif /* end of include once only */
+
diff --git a/data/mnet/GP10/Dsp/btsdsp.cmd b/data/mnet/GP10/Dsp/btsdsp.cmd
new file mode 100644
index 0000000..1f82626
--- /dev/null
+++ b/data/mnet/GP10/Dsp/btsdsp.cmd
@@ -0,0 +1,134 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+
+/* linker command file (MAP 0) */
+
+-heap 0x2000
+-stack 0x1E00
+
+-l rts6201.lib
+-l dev6x.lib
+/*-l drv6x.lib*/
+
+
+MEMORY
+{
+ VEC_TABLE_LOAD(RWX) : origin = 0x00000000 length = 0x00000300
+ SBSRAM_PROG_MEM (RWX): origin = 0x00000A00 length = 0x0002b600
+ SBSRAM_DATA_MEM (RW) : origin = 0x0002c000 length = 0x00014000
+ INT_PROG_MEM (RWX) : origin = 0x01400000 length = 0x00010000
+/*
+* for PCI based T1 EVM board only
+*/
+ SDRAM0_DATA_MEM (RX) : origin = 0x02000000 length = 0x00400000
+ SDRAM1_DATA_MEM (RX) : origin = 0x03000000 length = 0x00400000
+
+ HPI_TX_MEM(RW) : origin = 0x80000000 length = 0x00000204
+ HPI_RX_MEM(RW) : origin = 0x80000204 length = 0x00000204
+ INT_DATA_MEM (RW) : origin = 0x80000408 length = 0x0000fBF8
+}
+
+SECTIONS
+{
+ .vec: load = VEC_TABLE_LOAD
+
+ .hpiRxMem {
+ bin\hpirx.obj(.far)
+ }
+ load = HPI_RX_MEM fill = 0
+
+ .hpiTxMem {
+ bin\hpitx.obj(.far)
+ }
+ load = HPI_TX_MEM fill = 0
+
+ .intText: { /* time critical code => internal memory */
+ demsubs.obj(.text)
+ viteq.obj(.text)
+ vitgsm.obj(.text)
+ chcodesubs.obj(.text)
+ Mod2asm.obj(.text)
+ intleav.obj(.text)
+ encryptsubs.obj(.text)
+ decryptopt.obj(.text)
+ bin\demtop.obj(.text)
+ bin\demodc.obj(.text)
+ bin\rtscheck.obj(.text)
+ bin\Mod2spb.obj(.text)
+ bin\intleavs.obj(.text)
+ bin\burst.obj(.text)
+ bin\burstisr.obj(.text)
+ bin\miscfunc.obj(.text)
+ bin\codecs.obj(.text)
+ bin\topcodec.obj(.text)
+ bin\bfi.obj(.text)
+ bin\sbjcodecs.obj(.text)
+ bin\encrypt.obj(.text)
+ bin\frameisr.obj(.text)
+ bin\hpi.obj(.text)
+ bin\queue.obj(.text)
+ bin\dspmh.obj(.text)
+ bin\tchmsg.obj(.text)
+ bin\agc.obj(.text)
+ bin\siddetect.obj(.text)
+
+ bin\inmem.obj(.text)
+ }
+ load = INT_PROG_MEM
+
+ .text: {
+ bin\rrmsg.obj(.text)
+ bin\syncmsg.obj(.text)
+ bin\tch.obj(.text)
+ bin\sdcch.obj(.text)
+ bin\sacch.obj(.text)
+ bin\accum.obj(.text)
+ bin\bcch.obj(.text)
+ bin\pagch.obj(.text)
+ bin\pdch.obj(.text)
+ bin\dspmain.obj(.text)
+ bin\dspmaint.obj(.text)
+ bin\msgstub.obj(.text)
+ bin\dspinit.obj(.text)
+ bin\frmsync.obj(.text)
+ bin\groupini.obj(.text)
+ bin\grouptbl.obj(.text)
+ bin\init_hw2.obj(.text)
+ bin\loopback.obj(.text)
+ bin\dynpwrctrl.obj(.text)
+ bin\report.obj(.text)
+ bin\trxmsg.obj(.text)
+ bin\diagmsg.obj(.text)
+ bin\ccchmsg.obj(.text)
+ bin\dcchmsg.obj(.text)
+ bin\hoProc.obj(.text)
+ bin\oammsg.obj(.text)
+ bin\drv6x.obj(.text)
+ bin\pdchMsg.obj(.text)
+
+ bin\exmem.obj(.text)
+ }
+ load = SBSRAM_PROG_MEM
+
+ .const: load = INT_DATA_MEM
+ .bss: load = INT_DATA_MEM fill = 0 /* note: we do not use bss */
+ .data: load = INT_DATA_MEM
+ .cinit load = SBSRAM_DATA_MEM
+ .pinit load = SBSRAM_DATA_MEM
+ .stack load = INT_DATA_MEM fill = 0xbadbeef
+
+ .far: { /* time critical far data => internal memory */
+ bin\inmem.obj(.far)
+ }
+ load = INT_DATA_MEM fill = 0
+
+ .sysmem load = SBSRAM_DATA_MEM
+ .cio load = SBSRAM_DATA_MEM
+
+ .extData { /* non-time critical data => ext memory */
+ bin\exmem.obj(.far)
+ }
+ load = SBSRAM_DATA_MEM fill = 0
+}
diff --git a/data/mnet/GP10/Dsp/dsp.mak b/data/mnet/GP10/Dsp/dsp.mak
new file mode 100644
index 0000000..de61963
--- /dev/null
+++ b/data/mnet/GP10/Dsp/dsp.mak
@@ -0,0 +1,241 @@
+/************* Code Composer V1 Project Data ********************
+ The following section contains data generated by Code Composer
+ to store project information like build options, source filenames
+ and dependencies.
+
+[command filename]
+BTSDSP.CMD 86
+[options]
+Linker = "-c -h -m DSP.MAP -o DSP.OUT -x -i \c6xtools\lib -i \evm6x\dsp\lib\devlib -i \evm6x\dsp\lib\drivers "
+Assembler = "-g -ic:\c6xtools\binqsq "
+Compiler = "-gqq -pk -pw0 -as -ml3 -o2 -x1 -frC:\dsp\dsp\ppc860 -fsc:\dsp\dsp\ppc860 -ic:\c6xtools\bin -ic:\dsp\dsp\include -ic:\dsp\dsp\bbdataproc\include "
+[source files]
+BBDATAPROC\BURST\BURST.C 936751380 1
+SHARED\QUEUE.C 933740086 1
+SHARED\DSPMAIN.C 936913773 1
+SHARED\DSPMAINT.C 934594885 1
+SHARED\DSPMH.C 933740085 1
+SHARED\MISCFUNC.C 933740085 1
+SHARED\MSGSTUB.C 933740086 1
+SHARED\DSPINIT.C 936754653 1
+SYNCHCTRL\TCH.C 936756851 1
+SYNCHCTRL\BCCH.C 933740086 1
+SYNCHCTRL\BURSTISR.C 936908842 1
+SYNCHCTRL\FRAMEISR.C 936908932 1
+SYNCHCTRL\FRMSYNC.C 933740087 1
+SYNCHCTRL\GROUPINI.C 933740087 1
+SYNCHCTRL\GROUPTBL.C 933740087 1
+SYNCHCTRL\PAGCH.C 933740087 1
+SYNCHCTRL\RTSCHECK.C 933740087 1
+SYNCHCTRL\SACCH.C 936751377 1
+SYNCHCTRL\SDCCH.C 933740087 1
+SYNCHCTRL\SYNCMSG.C 936751380 1
+BBDATAPROC\CHCODEC\BFI.C 933740078 1
+ASYNCHCTRL\RRMSG.C 933740077 1
+BBDATAPROC\CHCODEC\SBJCODECS.C 933740079 1
+BBDATAPROC\CHCODEC\TOPCODEC.C 936751378 1
+SHARED\HPI.C 933740085 1
+PERIPHERALS\INIT_HW2.C 936402567 1
+ASYNCHCTRL\TRXMSG.C 933740077 1
+DIAGS\LOOPBACK.C 933740082 1
+STDLIB.H 0 0
+DSPTYPES.H 933740083 0
+GSMTYPES.H 936751383 0
+DSPHMSG.H 936751379 0
+BBDATA.H 936751382 0
+BBPROTO.H 936751382 0
+BURST.H 936407907 0
+STDIO.H 0 0
+MATH.H 0 0
+DSP6201.H 935447342 0
+DSPCOMM.H 933740083 0
+DSPROTYP.H 934324502 0
+MCBSP.H 933740084 0
+MCBSPDRV.H 933740084 0
+DMA.H 933740082 0
+INTR.H 933740084 0
+REGS.H 933740084 0
+DMA_UTIL.H 933740082 0
+RRMSG.H 933740084 0
+CODEC.H 934767218 0
+STRING.H 0 0
+HPI.H 933740084 0
+COMMON.H 933740082 0
+DSPDIAG.H 935714857 0
+BBDATAPROC\CHCODEC\VITGSM.ASM 933740079 1
+BBDATAPROC\CHCODEC\CODECS.C 933740078 1
+BBDATAPROC\BURST\MOD2SPB.C 936751381 1
+MOD2SPB_TAB.H 933740078 0
+L1CONFIG.H 933740084 0
+SYNCHCTRL\DYNPWRCTRL.C 934324502 1
+ASYNCHCTRL\DCCHMSG.C 936751379 1
+ASYNCHCTRL\CCCHMSG.C 933740076 1
+ASYNCHCTRL\TCHMSG.C 936296214 1
+ASYNCHCTRL\DIAGMSG.C 934594885 1
+SYNCHCTRL\HOPROC.C 934324502 1
+SHARED\REPORT.C 936754637 1
+OAMTYPES.H 933740084 0
+SYNCHCTRL\ENCRYPT.C 933740086 1
+DSPERRS.H 935714857 0
+AGC.H 933740082 0
+SYNCHCTRL\AGC.C 933740086 1
+DRIVER\DRV6X.C 935714771 1
+EMIF.H 895601228 0
+TIMER.H 895601234 0
+BBDATAPROC\CHCODEC\SIDDETECT.C 936403445 1
+BBDATAPROC\BURST\MOD2ASM.ASM 933740078 1
+BBDATAPROC\DEMOD\VITEQ.ASM 933740080 1
+C6XSUPPORT.H 933740079 0
+DEM_CONST.H 933740080 0
+TRAINING.H 933740080 0
+DEM_GLOBS.H 933740080 0
+DEM_APROTOS.H 933740080 0
+C6X.H 886438800 0
+BBDATAPROC\DEMOD\DEMSUBS.ASM 933740080 1
+BBDATAPROC\DEMOD\DEMTOP.C 933740080 1
+BBDATAPROC\DEMOD\DEMODC.C 933740079 1
+BBDATAPROC\CHCODEC\INTLEAVS.C 936818436 1
+BBDATAPROC\CHCODEC\INTLEAV.ASM 936897007 1
+29376
+[dependencies]
+ 5 29:87 30:88 32:89 33:90 34:91 5873
+ 6 28:7 29:8 31:9 37:10 38:11 30:12 -801
+ 11 28:24 29:25 30:26 37:27 31:28 38:29 51:30 66:31 32:32 39:34 64:35 2500
+ 5 28:10 29:11 31:12 37:13 38:14 -27148
+ 7 28:12 29:13 30:14 31:15 37:16 38:17 43:18 -25699
+ 5 35:1 29:3 30:4 32:5 33:6 -439
+ 6 28:7 29:8 30:9 31:10 37:11 38:12 -11283
+ 9 28:18 29:19 30:20 37:21 31:22 38:23 32:24 51:25 66:26 28031
+ 8 28:21 29:22 30:23 31:24 32:25 39:26 51:27 66:28 -26588
+ 5 28:13 29:14 30:15 32:16 39:17 21878
+ 11 28:3 29:4 30:5 32:6 39:7 40:8 41:9 42:10 43:11 37:12 67:13 -13105
+ 8 28:3 29:4 30:5 32:6 39:7 37:8 40:9 43:11 13553
+ 5 28:2 29:3 36:4 30:5 39:6 21357
+ 6 28:15 29:16 30:17 32:18 51:19 39:20 -9016
+ 5 28:2 29:3 30:4 32:5 39:6 30004
+ 5 28:17 29:18 30:19 32:20 39:21 7836
+ 5 28:14 29:15 30:16 31:17 46:18 -23478
+ 10 28:19 29:20 30:21 31:22 32:23 39:24 56:25 51:26 64:27 67:28 12318
+ 5 28:15 29:16 30:17 32:18 39:19 19580
+ 8 29:2 30:3 31:4 46:5 32:6 33:7 64:8 51:9 -30970
+ 5 29:2 30:3 32:4 33:5 47:6 -3399
+ 6 48:18 29:19 30:20 31:21 46:22 43:23 -14280
+ 5 29:2 30:3 32:4 33:5 47:6 -3399
+ 6 29:4 30:5 32:6 33:7 47:8 56:10 28653
+ 7 28:13 29:14 31:15 37:16 38:17 49:18 30:19 26322
+ 11 28:18 29:19 30:20 32:21 37:22 51:23 50:25 40:26 41:27 42:28 43:29 7684
+ 15 48:18 36:19 29:20 30:21 31:22 56:23 44:24 37:25 39:26 64:27 50:30 40:31 41:32 42:33 43:34 -8448
+ 11 28:19 36:20 29:21 30:22 32:23 39:24 40:25 41:26 42:27 43:28 51:29 16364
+ 0 -802
+ 0 -802
+ 0 -802
+ 0 -802
+ 0 -802
+ 0 -802
+ 0 -802
+ 0 -802
+ 0 -802
+ 0 -802
+ 0 -802
+ 0 -802
+ 1 44:64 -16979
+ 2 45:30 40:31 -15373
+ 1 44:72 29549
+ 1 44:39 -27152
+ 0 -802
+ 0 -802
+ 0 -802
+ 0 -802
+ 0 -802
+ 1 44:23 9042
+ 1 44:26 -27862
+ 0 -802
+ 0 -802
+ 5 29:2 30:3 32:4 33:5 47:6 -3399
+ 5 29:126 30:127 32:128 33:129 55:130 -11303
+ 0 -802
+ 0 -802
+ 8 28:16 29:17 30:18 31:19 39:20 32:21 56:22 64:23 -23394
+ 9 28:19 29:20 30:21 31:22 32:23 56:24 64:25 51:26 67:27 29128
+ 4 28:19 29:20 30:21 31:22 -23361
+ 10 28:9 29:10 30:11 31:12 37:13 38:14 43:15 32:16 51:17 66:18 10309
+ 9 28:19 29:20 30:21 31:22 38:23 32:24 51:25 37:26 43:27 -32322
+ 9 28:12 29:13 30:14 31:15 39:16 32:17 56:18 64:19 51:20 -26693
+ 9 28:20 29:21 30:22 31:23 38:24 32:25 51:26 66:27 43:28 12969
+ 0 -802
+ 7 28:53 29:54 30:55 31:56 32:57 39:58 51:59 31874
+ 0 -802
+ 0 -802
+ 9 28:14 29:15 30:16 31:17 32:18 39:19 56:20 51:21 67:22 18585
+ 7 35:60 28:61 70:64 49:65 71:66 43:67 50:70 -4619
+ 1 44:36 -16488
+ 1 44:44 29016
+ 5 29:2 30:3 32:4 33:5 47:6 -3399
+ 0 -802
+ 0 -802
+ 0 -802
+ 0 -802
+ 0 -802
+ 0 -802
+ 0 -802
+ 0 -802
+ 0 -802
+ 11 35:68 28:69 29:71 30:72 32:73 33:74 75:75 76:87 77:88 78:89 79:90 5041
+ 13 36:74 35:75 28:76 80:77 29:79 30:80 32:81 33:82 76:84 77:85 78:86 79:87 75:88 11134
+ 5 29:2 30:3 32:4 33:5 47:6 -3399
+ 0 -802
+[version]
+2.0
+*/
+-c -h -m DSP.MAP -o DSP.OUT -x -i \c6xtools\lib -i \evm6x\dsp\lib\devlib -i \evm6x\dsp\lib\drivers
+"INTLEAV.obj"
+"ppc860\INTLEAVS.obj"
+"ppc860\DEMODC.obj"
+"ppc860\DEMTOP.obj"
+"DEMSUBS.obj"
+"VITEQ.obj"
+"MOD2ASM.obj"
+"ppc860\SIDDETECT.obj"
+"ppc860\DRV6X.obj"
+"ppc860\AGC.obj"
+"ppc860\ENCRYPT.obj"
+"ppc860\REPORT.obj"
+"ppc860\HOPROC.obj"
+"ppc860\DIAGMSG.obj"
+"ppc860\TCHMSG.obj"
+"ppc860\CCCHMSG.obj"
+"ppc860\DCCHMSG.obj"
+"ppc860\DYNPWRCTRL.obj"
+"ppc860\MOD2SPB.obj"
+"ppc860\CODECS.obj"
+"VITGSM.obj"
+"ppc860\LOOPBACK.obj"
+"ppc860\TRXMSG.obj"
+"ppc860\INIT_HW2.obj"
+"ppc860\HPI.obj"
+"ppc860\TOPCODEC.obj"
+"ppc860\SBJCODECS.obj"
+"ppc860\RRMSG.obj"
+"ppc860\BFI.obj"
+"ppc860\SYNCMSG.obj"
+"ppc860\SDCCH.obj"
+"ppc860\SACCH.obj"
+"ppc860\RTSCHECK.obj"
+"ppc860\PAGCH.obj"
+"ppc860\GROUPTBL.obj"
+"ppc860\GROUPINI.obj"
+"ppc860\FRMSYNC.obj"
+"ppc860\FRAMEISR.obj"
+"ppc860\BURSTISR.obj"
+"ppc860\BCCH.obj"
+"ppc860\TCH.obj"
+"ppc860\DSPINIT.obj"
+"ppc860\MSGSTUB.obj"
+"ppc860\MISCFUNC.obj"
+"ppc860\DSPMH.obj"
+"ppc860\DSPMAINT.obj"
+"ppc860\DSPMAIN.obj"
+"ppc860\QUEUE.obj"
+"ppc860\BURST.obj"
+"C:\DSP\DSP\BTSDSP.CMD"
+/******** End of Project Data Generated by Code Composer ********/
diff --git a/data/mnet/GP10/Dsp/dsp.mk b/data/mnet/GP10/Dsp/dsp.mk
new file mode 100644
index 0000000..00f4e3a
--- /dev/null
+++ b/data/mnet/GP10/Dsp/dsp.mk
@@ -0,0 +1,33 @@
+# Makefile - makefile skeleton by Wind River
+#
+# Copyright (C) 1996 Wind River Systems, Inc.
+#
+# This file was generated via the Tornado Project Facility.
+# It has been modified to work inside the GP10 VOB.
+#
+############################################################
+
+
+OBJSUF = .obj
+C6XDIR = $(TOP_OF_VOB)\..\THIRD_PARTY\DspTools\c6xtools
+C6XDIRV2 = $(TOP_OF_VOB)\..\THIRD_PARTY\DspTools\c6xtools
+DSPCC = $(C6XDIR)\Bin\cl6x
+DSPLK = $(C6XDIR)\Bin\lnk6x
+DSPLKV2 = $(C6XDIRV2)\Bin\lnk6x
+
+C6XINC = $(C6XDIR)\include
+MAININC = ..\include
+BBINC = ..\bbdataproc\include
+CODECINC = ..\bbdataproc\chcodec
+DEMINC = ..\bbdataproc\demod
+
+# This is to make everything relative from this directory
+
+CC_FLAGS = -gqq -pk -pw2 -as -ml3 -o2 -x1 -fr$(OBJDIR) -DCPU=TI_C6201
+CC_INCLUDE = -I$(C6XINC) -I$(MAININC) -I$(BBINC) -I$(CODECINC) -I$(DEMINC) -I$(TOP_OF_VOB)\Common_To_VOB -I$(TOP_OF_VOB)\..\Common\Include
+ASM_FLAGS = -g -fr..
+
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/include/DSP6201.H b/data/mnet/GP10/Dsp/include/DSP6201.H
new file mode 100644
index 0000000..ac05ebf
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/DSP6201.H
@@ -0,0 +1,111 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/***************************************************************************
+* file name: dsp62x.h
+*
+****************************************************************************/
+
+/*
+#define DISABLE_INT asm(" ssbx intm")
+#define ENABLE_INT asm(" rsbx intm")
+
+#define SET_XF asm(" ssbx xf")
+#define CLR_XF asm(" rsbx xf")
+*/
+
+#define UL_DSP_AGC_CONTROL_REG *(Int16 *) 0x01000000
+
+#define HW_AGC_CONTROL_REG *(Int16 *) 0x01010000
+
+/*
+* dsp fpga control reqister
+*/
+#define AGC_SRC_SELECT_REG *(Int16 *) 0x01020000
+/*
+* bits defined in "AGC_SRC_SELECT_REG"
+*/
+#define FPGA_GAIN_RAMPING_TEST 0 /* 0: Disabled; 1: Enabled */
+
+
+#define DSP_FIXED_GAIN_CTRL_FLAG 1 /* 1: SW control; 0: HW control */
+
+/*
+Bit 4: set flag for FPGA to take ARFCH value
+ 0=inactive
+ 1=active
+*/
+#define DSP_FPGA_ARFCH_CTRL 4
+
+
+/*
+Bit 5: set flag for sync to other DSP
+ This will identify that the FPGA on the DSP you are using will mark itself
+ as READY TO RECEIVE interrupts.
+ Both FPGAs will have to have this bit set in order to receive interrupts.
+
+ 0=inactive
+ 1=active
+*/
+#define DSP_BSP_INT_SYNC_READY 5 /* 1: ready to receive; 0: inactive */
+
+/*
+ Bit 6: allows the corresponding DSP to receive interrupts no matter if
+ the other DSP has identified itself as READY
+ to RECEIVE interrupts.
+
+ 0=inactive
+ 1=active
+*/
+#define DSP_BSP_INT_SYNC_CONTROL 6 /* 1: sync disabled; 0: Sync required */
+
+
+#define AD7002_RESET 3 /* */
+
+#define AD7002_RESET_COMPLETE 3 /* */
+
+
+#define DSP_LED0 7 /**/
+#define DSP_LED1 8 /**/
+
+#define DL_PWR_CONTROL_REG *(Int16 *) 0x01030000
+
+#define DL_ARFCN_SELECT_REG_2A *(Int16 *) 0x01040000
+#define DL_ARFCN_SELECT_REG_2B *(Int16 *) 0x01050000
+#define DL_ARFCN_SELECT_REG_1 *(Int16 *) 0x01060000
+
+/* bit 9:0 ARFCH value */
+
+/* bit 12 ENABLE PA */
+#define POWER_AMP_SWITCH 12
+
+/* bit 13 Freq HopPing enable */
+#define FREQ_HOPPING_ENABLE 13
+
+/* bit 14 TRX(1/2) select register */
+#define TRX_SELECT 14
+
+/* bit 15 SYNCTH(A/B) select register */
+#define SYNTH_AB_SELECT 0x8000
+
+
+/* Reserved
+ #define UL_ARFCN_SELECT_REG *(Int16 *) 0x01050000
+*/
+
+#define SYNC_CONTROL_REG *(Int16 *) 0x01060000
+/* bit 0 of SYNC_CONTROL_REG(Read): 0-> in reset; 1: done */
+#define SYNTH_SYNC_DONE 0
+
+/* bit 1 of SYNC_CONTROL_REG(Write): 0-> no effect; 1: start sync */
+#define SYNTH_SYNC_ENBALE 1
+
+
+/* a count of the offset between GSM burst Clock and TX DMA completion event */
+#define DMA_BURST_SYNC_COUNT *(Uint16 *) 0x01070000
+
+/* LED used in burstisr.c */
+#define LED0 *(volatile Uint32 *) 0x01380000
+
+
diff --git a/data/mnet/GP10/Dsp/include/DSPCOMM.H b/data/mnet/GP10/Dsp/include/DSPCOMM.H
new file mode 100644
index 0000000..3f43c1d
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/DSPCOMM.H
@@ -0,0 +1,68 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* file name: dspcomm.h
+*
+* Description: Globals assignment for general purpose dsp code
+*
+*****************************************************************************/
+
+#define MSG_OVERFLOW_MAX_COUNT 0xffffffff
+
+#undef GPGLOB
+#ifdef GPDEFINE
+#define GPGLOB
+#else
+#define GPGLOB extern
+#endif
+
+
+#define QUE_HEAD_SIZE 12
+
+typedef struct
+{
+ Uint32 msgOverflow;
+ Int16 msgCount;
+ Int16 qSize;
+ Int16 qAttrb;
+ Int8 msgInIndex;
+ Int8 msgOutIndex;
+ msgStruc **qMsg;
+}qRspStruc, qCmdStruc, qStruc;
+
+
+#pragma DATA_SECTION (DspMsgNumWord, ".hpiTxMem");
+GPGLOB volatile Int32 DspMsgNumWord;
+
+#pragma DATA_SECTION (txMsgBuf, ".hpiTxMem");
+GPGLOB Uint8 txMsgBuf[0x200];
+
+
+#pragma DATA_SECTION (HostMsgNumWord, ".hpiRxMem");
+GPGLOB volatile Int32 HostMsgNumWord;
+
+#pragma DATA_SECTION (rxMsgBuf, ".hpiRxMem");
+GPGLOB Uint8 rxMsgBuf[0x200];
+
+/*
+ * DSP HOST PORT buffer pointer
+ */
+GPGLOB volatile cmdStruc *hpiRxMsgPtr;
+GPGLOB volatile rspStruc *hpiTxMsgPtr;
+
+/*
+ * Message queue for HPI
+ */
+GPGLOB qCmdStruc *FastHmsgQue;
+GPGLOB qCmdStruc *HmsgQue;
+
+GPGLOB qRspStruc *FastRspQue;
+GPGLOB qRspStruc *RspQue;
+
+
+GPGLOB Uint32 TimerIsrCount;
+
+
+GPGLOB Uint16 DspId; \ No newline at end of file
diff --git a/data/mnet/GP10/Dsp/include/HPI.H b/data/mnet/GP10/Dsp/include/HPI.H
new file mode 100644
index 0000000..df4e26c
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/HPI.H
@@ -0,0 +1,62 @@
+/******************************************************************************/
+/* HPI.H - TMS320C6x Peripheral Support Library EMIF Support */
+/* */
+/* This file provides the header for the DSP's HPI support. */
+/* */
+/* */
+/* MACRO FUNCTIONS: */
+/* HPI_SET_HINT() */
+/* HPI_RESET_DSPINT() */
+/* HPI_GET_HINT() */
+/* HPI_GET_DSPINT() */
+/* */
+/* FUNCTIONS: */
+/* None. */
+/* */
+/******************************************************************************/
+#ifndef _HPI_H_
+#define _HPI_H_
+
+/*----------------------------------------------------------------------------*/
+/* INCLUDES */
+/*----------------------------------------------------------------------------*/
+#include "regs.h"
+
+/*----------------------------------------------------------------------------*/
+/* DEFINES AND MACROS */
+/*----------------------------------------------------------------------------*/
+
+/******************************************************************************/
+/****************************** HPI REGISTERS *********************************/
+
+#define HPIC_ADDR 0x01880000 /* HPI Ctrl Reg Addr */
+#define HPIC *(volatile unsigned int *)HPIC_ADDR /* HPI Ctrl */
+
+/* HPIC Register bits */
+#define HWOB 0
+#define DSPINT 1
+#define HINT 2
+#define HRDY 3
+#define FETCH 4
+
+#define HPI_SET_HINT() \
+ (REG_WRITE(HPIC_ADDR,(REG_READ(HPIC_ADDR) & 0xFFFFFFFD) | 4))
+
+#define HPI_RESET_DSPINT() \
+ (REG_WRITE(HPIC_ADDR,(REG_READ(HPIC_ADDR) & 0xFFFFFFFB) | 2))
+
+#define HPI_GET_HINT() \
+ (GET_BIT(HPIC_ADDR,HINT))
+
+#define HPI_GET_DSPINT() \
+ (GET_BIT(HPIC_ADDR,DSPINT))
+
+/*----------------------------------------------------------------------------*/
+/* GLOBAL VARIABLES */
+/*----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------*/
+/* FUNCTIONS */
+/*----------------------------------------------------------------------------*/
+
+#endif
diff --git a/data/mnet/GP10/Dsp/include/agcdata.h b/data/mnet/GP10/Dsp/include/agcdata.h
new file mode 100644
index 0000000..7459d23
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/agcdata.h
@@ -0,0 +1,51 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* File: agcdata.h
+*
+* Description:
+* This file contains references to the global structures and variables
+* used in automatic gain control (AGC) and dynamic power control (DPC).
+* It includes a file containing the defined constants, enumerations and
+* type definitions that support AGC and DPC.
+*
+* NOTE: INGLOB and EXGLOB specify internal and external DSP memory
+* allocation, respectively. They are defined in dsptypes.h
+* and included here through agctypes.h.
+*
+*****************************************************************************/
+#ifndef _AGCDATA_H_
+#define _AGCDATA_H_ /* include once only */
+
+#include "agctypes.h"
+
+INGLOB t_gainStepsPerDb g_gainStepsPerDb;
+
+INGLOB Uint8 g_AGC_ON; /* AGC on/off for all time slots */
+INGLOB Uint8 g_DPC_ON; /* DPC on/off for all time slots */
+INGLOB Uint16 g_DSPC; /* Down Link Static Power DAC value */
+INGLOB Uint16 g_USGC; /* Up Link Static Gain DAC value */
+INGLOB Int8 g_TxPwrTemperatureDelta; /* Tx DAC offset due to temperature */
+
+INGLOB Short g_AgcRxPwrTarget; /* AGC's sample power target in dBr */
+INGLOB Int16 g_DpcRxLevThresh; /* UL RXLEV thresh for MS Pwr Control */
+INGLOB Uint16 g_TxStaticGainLevel;
+
+/*
+* Uplink signal power measurements are calibrated by one controlled
+* measurement of input power (dBm) at a particular ADC sample power
+* (dBr) and uplink gain (rxgain DAC value). These triplet values are:
+*/
+INGLOB Int16 g_MeasAgcDpcDbm; /* dBm of measured dBm/dBr/rxgain triplet */
+INGLOB Int16 g_MeasAgcDpcDbr; /* dBr of measured dBm/dBr/rxgain triplet */
+INGLOB Uint16 g_MeasAgcDpcRxgain; /* rxgain of dBm/dBr/rxgain triplet */
+
+INGLOB Uint16 g_rxGainMinAct;
+INGLOB Uint16 g_rxGainMinIdle;
+
+#endif /* end of include once only */
+
+
+
diff --git a/data/mnet/GP10/Dsp/include/agctypes.h b/data/mnet/GP10/Dsp/include/agctypes.h
new file mode 100644
index 0000000..277b189
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/agctypes.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* File: agctypes.h
+*
+* Description:
+* This file contains defined constants, enumerations and type definitions
+* of shared items to support automatic gain control and dynamic power
+* control.
+*
+*****************************************************************************/
+#ifndef _AGCTYPES_H_
+#define _AGCTYPES_H_ /* include once only */
+
+#include "dsp/dsptypes.h"
+
+#define AGC_SMOOTH_MULT 15 /* 1-alpha term, multiply by 15 for IIR power smoothing */
+#define AGC_SMOOTH_SHIFT 4 /* 1-alpha term, divide by 16 for IIR power smoothing */
+
+#define RXPWR_TARGET -20 /* rcvPower target for AGC (dBr) */
+#define SAT_RXPWR_TARGET -35 /* rcvPower target after saturated access burst (dBr) */
+#define MEAS_AGCDPC_DBM -90 /* dBm target for calculating slope */
+#define DPC_DBM_THRESH -80 /* dBm target for the mobiles used by UL power control */
+
+/* ********************************************************************************** */
+/* These constants all depend on the frequency band of the radio board */
+
+#define DIVISION_FACTOR 8 /* Shift to avoid cycle costly divide */
+
+/* slope of the amplifier gain 1800 radio characteristic */
+#define GAIN_STEPS_PER_DB_1800 (3456>>DIVISION_FACTOR)
+#define GAIN_STEPS_PER_DB_INV_1800 19 /* x, where (x>>8) = 19/256 = 1/13.50 = 1/slope */
+
+/* slope of the amplifier gain 1900 radio characteristic */
+#define GAIN_STEPS_PER_DB_1900 (3855>>DIVISION_FACTOR)
+#define GAIN_STEPS_PER_DB_INV_1900 17 /* x, where (x>>8) = 17/256 = 1/15.06 = 1/slope */
+
+#define MEAS_AGCDPC_RXGAIN_1800 0x190 /* rx gain at which -90 dBm produces -20 dBr */
+#define MEAS_AGCDPC_RXGAIN_1900 0xd0 /* rx gain at which -90 dBm produces -20 dBr */
+
+/* ********************************************************************************** */
+
+#define DL_PWR_CONTROL_MAX 0xff /* max DL power control DAC value */
+#define DL_PWR_CONTROL_MIN 0x00 /* min DL power control DAC value */
+
+#define RXGAIN_MAX 0x80 /* rx gain is inversely proportional to DAC voltage */
+#define RXGAIN_MIN_IDLE_1800 0x280 /* min gain = highest DAC control value */
+#define RXGAIN_MIN_IDLE_1900 0x180
+#define RXGAIN_MIN_ACTIV 0x3ff
+
+#define RXGAIN_INIT 0x280 /* initial rx gain for RACH and MGC */
+
+#define RXGAIN_MAX_ADJUST 20 /* max neg adjust to AGC smooth power per update */
+
+#define ONE64THS_DB_2_DB_CONV 6 /* shift for mult or divides for conversions of 1dB <-> 1/64 dB */
+
+#define AGC_TS_OFFSET 2 /* number of timeslots to skip in ISR between current
+ TS and the TS to receive its uplink gain value */
+typedef struct
+{
+ Uint32 slope;
+ Uint16 inverseSlope;
+
+} t_gainStepsPerDb;
+
+#endif /* end of include once only */
+
+
diff --git a/data/mnet/GP10/Dsp/include/comdata.h b/data/mnet/GP10/Dsp/include/comdata.h
new file mode 100644
index 0000000..878330d
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/comdata.h
@@ -0,0 +1,56 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: comdata.h
+*
+* Description:
+* This file contains references to the global structures and variables
+* used for DSP HPI communication. It includes a file containing the
+* defined constants, enumerations and type definitions that support HPI.
+*
+* NOTE: INGLOB and EXGLOB specify internal and external DSP memory
+* allocation, respectively. They are defined in dsptypes.h
+* and included here through comtypes.h.
+*
+******************************************************************************/
+#ifndef _COMDATA_H_
+#define _COMDATA_H_ /* include once only */
+
+#include "comtypes.h"
+
+/*
+ * DSP Rx HPI counter and buffer. These are referenced extern here since
+ * their memory is allocated in hpirx.c and assigned to Rx HPI memory.
+ */
+extern volatile Int32 HostMsgNumWord;
+extern Uint8 rxMsgBuf[0x200];
+
+/*
+ * DSP Tx HPI counter and buffer. These are referenced extern here since
+ * their memory is allocated in hpitx.c and assigned to Tx HPI memory.
+ */
+extern volatile Int32 DspMsgNumWord;
+extern Uint8 txMsgBuf[0x200];
+
+/*
+ * DSP HOST PORT buffer pointer
+ */
+INGLOB volatile cmdStruc *hpiRxMsgPtr;
+INGLOB volatile rspStruc *hpiTxMsgPtr;
+
+/*
+ * Message queue for HPI
+ */
+INGLOB qCmdStruc *FastHmsgQue;
+INGLOB qCmdStruc *HmsgQue;
+
+INGLOB qRspStruc *FastRspQue;
+INGLOB qRspStruc *RspQue;
+
+INGLOB Uint32 TimerIsrCount;
+
+INGLOB Uint16 DspId;
+
+#endif /* end of include once only */
diff --git a/data/mnet/GP10/Dsp/include/comtypes.h b/data/mnet/GP10/Dsp/include/comtypes.h
new file mode 100644
index 0000000..c1fa3e2
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/comtypes.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: comtypes.h
+*
+* Description:
+* This file contains defined constants, enumerations and type definitions
+* of shared items to support DSP HPI communication.
+*
+******************************************************************************/
+#ifndef _COMTYPES_H_
+#define _COMTYPES_H_ /* include once only */
+
+#include "dsp/dsptypes.h"
+#include "dsp/dsphmsg.h"
+
+#define MSG_OVERFLOW_MAX_COUNT 0xffffffff
+#define QUE_HEAD_SIZE 12
+
+typedef struct
+{
+ Uint32 msgOverflow;
+ Int16 msgCount;
+ Int16 qSize;
+ Int16 qAttrb;
+ Int8 msgInIndex;
+ Int8 msgOutIndex;
+ msgStruc **qMsg;
+} qRspStruc, qCmdStruc, qStruc;
+
+#endif /* end of include once only */
+
diff --git a/data/mnet/GP10/Dsp/include/diagdata.h b/data/mnet/GP10/Dsp/include/diagdata.h
new file mode 100644
index 0000000..98e26bb
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/diagdata.h
@@ -0,0 +1,44 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: diagdata.h
+*
+* Description:
+* This file contains references to the global structures and variables
+* used for diagnostics and error reporting. It includes a file containing
+* the defined constants, enumerations and type definitions that support
+* diagnostics and error reporting.
+*
+* NOTE: INGLOB and EXGLOB specify internal and external DSP memory
+* allocation, respectively. They are defined in dsptypes.h
+* and included here through diagtypes.h.
+*
+******************************************************************************/
+#ifndef _DIAGDATA_H_
+#define _DIAGDATA_H_ /* include once only */
+
+#include "diagtypes.h"
+
+EXGLOB t_diagData g_diagData;
+EXGLOB Uint8 g_loopBackMode;
+EXGLOB Int32 g_UlBurstLog[156];
+
+EXGLOB Uint16 g_DlUnderflowCount[NUM_RFS_PER_DSP][NUM_TN_PER_RF];
+EXGLOB Uint16 g_DlOverflowCount[NUM_RFS_PER_DSP][NUM_TN_PER_RF];
+EXGLOB Uint16 g_DlOutOfSequenceCount[NUM_RFS_PER_DSP][NUM_TN_PER_RF];
+
+EXGLOB Int16 g_ErrorEnable; /* for sending messages only once per SF */
+
+EXGLOB idleProcStruc g_idleFrameInfo[1][8];
+
+EXGLOB Uint32 rcvdRawIQFrames[8][625];
+EXGLOB Uint16 rcvRawIQBufIndex[8];
+EXGLOB Uint16 txRawIQBufIndex[8];
+
+
+#endif /* end of include once only */
+
+
+ \ No newline at end of file
diff --git a/data/mnet/GP10/Dsp/include/diagtypes.h b/data/mnet/GP10/Dsp/include/diagtypes.h
new file mode 100644
index 0000000..44c338c
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/diagtypes.h
@@ -0,0 +1,123 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: diagtypes.h
+*
+* Description:
+* This file contains defined constants, enumerations and type definitions
+* of shared items to support diagnostics and error reporting.
+*
+******************************************************************************/
+#ifndef _DIAGTYPES_H_
+#define _DIAGTYPES_H_ /* include once only */
+
+#include "dsp/dsptypes.h"
+#include "gsmtypes.h"
+
+#define BURST_CAPTURE_SIZE 156
+#define SAMPLES_PER_CAPTURE_MSG 12
+#define NUM_CAPTURE_MSGS 13
+
+/*-------------------------------------------------------------
+ * MS Report structure -- allocate one per TS + one per SDCCH
+ *------------------------------------------------------------*/
+typedef struct {
+ Uint32 cumErrs;
+ Uint32 cumBits;
+ Uint16 cumFrameErrs;
+ Uint16 cumFrames;
+ Uint8 sacchCount;
+ Int8 minToa;
+ Int8 maxToa;
+ Int8 cumToa;
+} t_diagMsReport;
+
+
+/*-------------------------------------------------------------
+ * GPRS MS Report structure -- allocate one per USF
+ *------------------------------------------------------------*/
+typedef struct {
+ Uint32 cumErrs;
+ Uint32 cumBits;
+ Uint16 cumFrameErrs;
+ Uint16 cumFrames;
+ Uint8 rlcBlkCount;
+ Int8 minToa;
+ Int8 maxToa;
+ Int8 cumToa;
+} t_diagGprsMsReport;
+
+/*-------------------------------------------------------------
+ * Burst Capture State. Armed by Burst Capture command.
+ *------------------------------------------------------------*/
+typedef enum {
+ CAPTURE_OFF = 0,
+ CAPTURE_ARMED,
+ CAPTURE_DONE
+} t_captureState;
+
+/*-------------------------------------------------------------
+ * Burst Capture structure -- one RF/TS per Host command
+ *------------------------------------------------------------*/
+typedef struct {
+ t_captureState state;
+ Uint8 rfCh;
+ Uint8 timeSlot;
+ Uint32 data[BURST_CAPTURE_SIZE];
+} t_diagBurstCapture;
+
+/*-------------------------------------------------------------
+ * Diagnostic structure
+ *------------------------------------------------------------*/
+typedef struct {
+ Int16 enable; /* Makes sure we send only once per SF */
+
+ Uint8 msReportTsMask; /* Enables MS (uplink) Reports, Bits 7...0 control TS7...TS0 */
+ Uint8 dcchReportOnly; /* Report on DCCH only (ie, not TCH) */
+ Uint8 hoReportTsMask; /* Enables HO reports by TS, Bits 7...0 control TS7...TS0 */
+ Uint8 dlMeasReportTsMask; /* Enables DL Measurement reports by TS, same bit map */
+
+ Uint32 gprsMsReportTfiMask; /* Enables GPRS MS (uplink) Reports by TFI, bit mapped */
+ Uint32 gprsDlMeasReportTfiMask; /* Enables GPRS DL Measurement (Ack/Nack) Reports by TFI */
+
+ Uint8 dcOffsetTsMask; /* Enables DC Offset calculation by TS */
+ Uint8 dcOffsetReport; /* Enables DC Offset report (T/F) */
+ Uint8 sendRadioLinkLost;
+ Uint8 sendIdleFrameCapture;
+ t_diagBurstCapture burstCapture;
+ /*
+ * Note on msReport: The first NUM_TN_PER_RF structures per RF are
+ * for TS0-TS7. The next NUM_SDCCH_SUBCHANS structures are for SDCCH.
+ * The zero index structure, msReport[rfCh][0], is actually unused.
+ */
+ t_diagMsReport msReport[NUM_RFS_PER_DSP][NUM_TN_PER_RF+NUM_SDCCH_SUBCHANS];
+ t_diagGprsMsReport gprsMsReport[NUM_RFS_PER_DSP][MAX_TFI];
+ t_diagMsReport sdcch8Report[NUM_RFS_PER_DSP][NUM_SDCCH8_SUBCHANS];
+} t_diagData;
+
+/*-------------------------------------------------------------
+ * Loop back signal uplink-to-downlink or vice versa
+ *------------------------------------------------------------*/
+typedef enum {
+ NO_LOOPBACK = 0, /* normal operation */
+ LOCAL_LOOPBACK = 1, /* loopback on EVM card */
+ BASEBAND_LOOPBACK = 2, /* loopback on analog I/Q or RF */
+ DSP_IQ_LOOPBACK = 3, /* loopback on DSP RCV I/Q to TX I/Q with interpolation by 2 */
+ DSP_TCH_LOOPBACK = 4, /* loopback on DSP TCH frames from RCV to TX */
+ DSP_TCH_TO_HOST_LOOPBACK = 10 /* loopback on DSP TCH frames from TX to RCV*/
+} loopbackMode;
+
+/*-------------------------------------------------------------
+ * For saving I/Q samples of idle bursts
+ *------------------------------------------------------------*/
+typedef struct
+{
+ Int16 rcvPower; /* Uplink Signal Power Level*/
+ Int32 data[156];
+} idleProcStruc;
+
+
+#endif /* end of include once only */
+
diff --git a/data/mnet/GP10/Dsp/include/dma.h b/data/mnet/GP10/Dsp/include/dma.h
new file mode 100644
index 0000000..d7104a7
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/dma.h
@@ -0,0 +1,511 @@
+/******************************************************************************/
+/* DMA.H - TMS320C6x Peripheral Support Library DMA Support */
+/* */
+/* This file provides the header for the DSP's DMA controller support. *
+/* */
+/* MACRO FUNCTIONS: */
+/* DMA_START() - Manually start selected channel */
+/* DMA_AUTO_START() - Begins DMA autoinitialization on selected channel */
+/* DMA_STOP() - Stop selected channel */
+/* DMA_PAUSE() - Pause selected channel */
+/* DMA_RSYNC_CLR() - Clear DMA read sync bit */
+/* DMA_WSYNC_CLR() - Clear DMA write sync bit */
+/* DMA_RSYNC_SET() - Set DMA read sync bit */
+/* DMA_WSYNC_SET() - Set DMA write sync bit */
+/* */
+/* FUNCTIONS: */
+/* dma_init() - Initialize channel specific control registers */
+/* dma_global_init() - Initialize global control registers */
+/* dma_reset() - Resets all four DMA channels to default states */
+/* */
+/* REVISION HISTORY: */
+/* */
+/* DATE DESCRIPTION */
+/* ------- ------------------------------------------------------------- */
+/* 09JUL98 Changed DMA_INDX2 to DMA_INDXA and DMA_IND3 to DMA_INDXB. */
+/* -----> Updated to match current TI peripheral documentation */
+/* */
+/* 09JUL98 Deleted DMA_GCTRL_ADDR since there isn't a global control */
+/* register. DMA_AUXCR_ADDR should be used instead. */
+/* -----> Only a name change, not functional change. */
+/* */
+/* 09JUL98 Deleted DMA_GCTRL since it isn't a global control register. */
+/* DMA_AUXCR should be used instead. */
+/* -----> Only a name change, not a functional change. */
+/* */
+/* 09JUL98 Changed dma_global_init() "gcr" variable name to "auxcr". */
+/* -----> Only a name change, not a functional change. */
+/* */
+/* 15JUN98 Changed dma_init() "channel" parameter to "chan" for */
+/* consistency with documentation and other routines. */
+/* -----> Only a name change, not a functional change. */
+/* */
+/* 12JUN98 Added #define DMA_AUX_CTRL */
+/* *(volatile unsigned int *)DMA_AUX_CTRL_ADDR */
+/* -----> Macro was added for consistency with other DMA regs. */
+/* */
+/* 11MAY98 Added #define DMA_RELOAD_GARD 0x03 */
+/* -----> Global Address Register D was not included in reload */
+/* list */
+/* */
+/* 11MAY98 Included DMA_GCTRL register in dma_global_init routine */
+/* -----> Register was left out */
+/* */
+/* 11MAY98 Changed "#define RDOPR_IE 9" */
+/* to "#define RDROP_IE 9" */
+/* -----> Misspelling */
+/* */
+/* 11MAY98 Changed "for (chan = 0; chan < DMA_CH3; chan++)" */
+/* to "for (chan = 0; chan <= DMA_CH3; chan++)" */
+/* -----> Channel 3 was left out of the reset */
+/* */
+/* 11MAY98 Changed *(unsigned int *)(DMA_SECONDARY_CTRL_ADDR(chan)=0x00; */
+/* to *(unsigned int *)(DMA_SECONDARY_CTRL_ADDR(chan)=0x80; */
+/* -----> Sec Control Register reset value is 0x80 (BLOCK IE = 1) */
+/* */
+/* 11MAY98 Removed extra (unneeded) "return" statements */
+/* */
+/******************************************************************************/
+#ifndef _DMA_H_
+#define _DMA_H_
+
+#include "regs.h"
+
+#ifdef _INLINE
+#define __INLINE static inline
+#else
+#define __INLINE
+#endif
+
+/******************************************************************************/
+/****************************** DMA REGISTERS *********************************/
+/* Register Addresses */
+
+/* DMA Channel 0 */
+#define DMA0_PRIMARY_CTRL_ADDR 0x01840000 /* DMA 0 PRI CTRL REG */
+#define DMA0_SECONDARY_CTRL_ADDR 0x01840008 /* DMA 0 SEC CTRL REG */
+#define DMA0_SRC_ADDR_ADDR 0x01840010 /* DMA 0 SRC ADDR */
+#define DMA0_DEST_ADDR_ADDR 0x01840018 /* DMA 0 DEST ADDR */
+#define DMA0_XFER_COUNTER_ADDR 0x01840020 /* DMA 0 TRANS CNT */
+
+/* DMA Channel 1 */
+#define DMA1_PRIMARY_CTRL_ADDR 0x01840040 /* DMA 1 PRI CTRL REG */
+#define DMA1_SECONDARY_CTRL_ADDR 0x01840048 /* DMA 1 SEC CTRL REG */
+#define DMA1_SRC_ADDR_ADDR 0x01840050 /* DMA 1 SRC ADDR */
+#define DMA1_DEST_ADDR_ADDR 0x01840058 /* DMA 1 DEST ADDR */
+#define DMA1_XFER_COUNTER_ADDR 0x01840060 /* DMA 1 TRANS CNT */
+
+/* DMA Channel 2 */
+#define DMA2_PRIMARY_CTRL_ADDR 0x01840004 /* DMA 2 PRI CTRL REG */
+#define DMA2_SECONDARY_CTRL_ADDR 0x0184000C /* DMA 2 SEC CTRL REG */
+#define DMA2_SRC_ADDR_ADDR 0x01840014 /* DMA 2 SRC ADDR */
+#define DMA2_DEST_ADDR_ADDR 0x0184001C /* DMA 2 DEST ADDR */
+#define DMA2_XFER_COUNTER_ADDR 0x01840024 /* DMA 2 TRANS CNT */
+
+/* DMA Channel 3 */
+#define DMA3_PRIMARY_CTRL_ADDR 0x01840044 /* DMA 3 PRI CTRL REG */
+#define DMA3_SECONDARY_CTRL_ADDR 0x0184004C /* DMA 3 SEC CTRL REG */
+#define DMA3_SRC_ADDR_ADDR 0x01840054 /* DMA 3 SRC ADDR */
+#define DMA3_DEST_ADDR_ADDR 0x0184005C /* DMA 3 DEST ADDR */
+#define DMA3_XFER_COUNTER_ADDR 0x01840064 /* DMA 3 TRANS CNT */
+
+/* DMA Auxiliary Control */
+#define DMA_AUXCR_ADDR 0x01840070 /* AUX DMA CTRL REG */
+
+/* DMA Global Registers */
+#define DMA_GCR_A_ADDR 0x01840028 /* GLOBAL CNT RELOADA */
+#define DMA_GCR_B_ADDR 0x0184002C /* GLOBAL CNT RELOADB */
+#define DMA_GNDX_A_ADDR 0x01840030 /* GLOBAL INDEX REG A */
+#define DMA_GNDX_B_ADDR 0x01840034 /* GLOBAL INDEX REG B */
+#define DMA_GADDR_A_ADDR 0x01840038 /* GLOBAL ADDR REG A */
+#define DMA_GADDR_B_ADDR 0x0184003C /* GLOBAL ADDR REG B */
+#define DMA_GADDR_C_ADDR 0x01840068 /* GLOBAL ADDR REG C */
+#define DMA_GADDR_D_ADDR 0x0184006C /* GLOBAL ADDR REG D */
+
+/* Register Contents */
+
+/* DMA Channel 0 */
+#define DMA0_PRIMARY_CTRL *(volatile unsigned int *)DMA0_PRIMARY_CTRL_ADDR
+#define DMA0_SECONDARY_CTRL *(volatile unsigned int *)DMA0_SECONDARY_CTRL_ADDR
+#define DMA0_SRC_ADDR *(volatile unsigned int *)DMA0_SRC_ADDR_ADDR
+#define DMA0_DEST_ADDR *(volatile unsigned int *)DMA0_DEST_ADDR_ADDR
+#define DMA0_XFER_COUNTER *(volatile unsigned int *)DMA0_XFER_COUNTER_ADDR
+
+/* DMA Channel 1 */
+#define DMA1_PRIMARY_CTRL *(volatile unsigned int *)DMA1_PRIMARY_CTRL_ADDR
+#define DMA1_SECONDARY_CTRL *(volatile unsigned int *)DMA1_SECONDARY_CTRL_ADDR
+#define DMA1_SRC_ADDR *(volatile unsigned int *)DMA1_SRC_ADDR_ADDR
+#define DMA1_DEST_ADDR *(volatile unsigned int *)DMA1_DEST_ADDR_ADDR
+#define DMA1_XFER_COUNTER *(volatile unsigned int *)DMA1_XFER_COUNTER_ADDR
+
+/* DMA Channel 2 */
+#define DMA2_PRIMARY_CTRL *(volatile unsigned int *)DMA2_PRIMARY_CTRL_ADDR
+#define DMA2_SECONDARY_CTRL *(volatile unsigned int *)DMA2_SECONDARY_CTRL_ADDR
+#define DMA2_SRC_ADDR *(volatile unsigned int *)DMA2_SRC_ADDR_ADDR
+#define DMA2_DEST_ADDR *(volatile unsigned int *)DMA2_DEST_ADDR_ADDR
+#define DMA2_XFER_COUNTER *(volatile unsigned int *)DMA2_XFER_COUNTER_ADDR
+
+/* DMA Channel 3 */
+#define DMA3_PRIMARY_CTRL *(volatile unsigned int *)DMA3_PRIMARY_CTRL_ADDR
+#define DMA3_SECONDARY_CTRL *(volatile unsigned int *)DMA3_SECONDARY_CTRL_ADDR
+#define DMA3_SRC_ADDR *(volatile unsigned int *)DMA3_SRC_ADDR_ADDR
+#define DMA3_DEST_ADDR *(volatile unsigned int *)DMA3_DEST_ADDR_ADDR
+#define DMA3_XFER_COUNTER *(volatile unsigned int *)DMA3_XFER_COUNTER_ADDR
+
+/* DMA Auxiliary Control */
+#define DMA_AUXCR *(volatile unsigned int *)DMA_AUXCR_ADDR
+
+/* DMA Global Registers */
+#define DMA_GCR_A *(volatile unsigned int *)DMA_GCR_A_ADDR
+#define DMA_GCR_B *(volatile unsigned int *)DMA_GCR_B_ADDR
+#define DMA_GNDX_A *(volatile unsigned int *)DMA_GNDX_A_ADDR
+#define DMA_GNDX_B *(volatile unsigned int *)DMA_GNDX_B_ADDR
+#define DMA_GADDR_A *(volatile unsigned int *)DMA_GADDR_A_ADDR
+#define DMA_GADDR_B *(volatile unsigned int *)DMA_GADDR_B_ADDR
+#define DMA_GADDR_C *(volatile unsigned int *)DMA_GADDR_C_ADDR
+#define DMA_GADDR_D *(volatile unsigned int *)DMA_GADDR_D_ADDR
+
+#define DMA_REG_SELECT(base,chan) \
+ (((unsigned int)(base)) + (((chan) & 1) * 0x40) + (((chan) & 2) * 2))
+
+#define DMA_PRIMARY_CTRL_ADDR(chan) \
+ (DMA_REG_SELECT(DMA0_PRIMARY_CTRL_ADDR,chan))
+
+#define DMA_SECONDARY_CTRL_ADDR(chan) \
+ (DMA_REG_SELECT(DMA0_SECONDARY_CTRL_ADDR,chan))
+
+#define DMA_SRC_ADDR_ADDR(chan) \
+ (DMA_REG_SELECT(DMA0_SRC_ADDR_ADDR,chan))
+
+#define DMA_DEST_ADDR_ADDR(chan) \
+ (DMA_REG_SELECT(DMA0_DEST_ADDR_ADDR,chan))
+
+#define DMA_XFER_COUNTER_ADDR(chan) \
+ (DMA_REG_SELECT(DMA0_XFER_COUNTER_ADDR,chan))
+
+/** DMA Register Bitfields **/
+
+/** Primary Control Register **/
+
+#define START 0
+#define START_SZ 2
+#define STATUS 2
+#define STATUS_SZ 2
+#define SRC_DIR 4
+#define SRC_DIR_SZ 2
+#define DST_DIR 6
+#define DST_DIR_SZ 2
+#define ESIZE 8
+#define ESIZE_SZ 2
+#define SPLIT 10
+#define SPLIT_SZ 2
+#define CNT_RELOAD 12
+#define INDEX 13
+#define RSYNC 14
+#define RSYNC_SZ 5
+#define WSYNC 19
+#define WSYNC_SZ 5
+#define PRI 24
+#define TCINT 25
+#define FS 26
+#define EMOD 27
+#define SRC_RELOAD 28
+#define SRC_RELOAD_SZ 2
+#define DST_RELOAD 30
+#define DST_RELOAD_SZ 2
+
+/** Secondary Control Register **/
+
+#define SX_COND 0
+#define SX_IE 1
+#define FRAME_COND 2
+#define FRAME_IE 3
+#define LAST_COND 4
+#define LAST_IE 5
+#define BLOCK_COND 6
+#define BLOCK_IE 7
+#define RDROP_COND 8
+#define RDROP_IE 9
+#define WDROP_COND 10
+#define WDROP_IE 11
+#define RSYNC_STAT 12
+#define RSYNC_CLR 13
+#define WSYNC_STAT 14
+#define WSYNC_CLR 15
+#define DMAC_EN 16
+#define DMAC_EN_SZ 3
+
+/* DMA Channel Transfer Counter Register */
+#define ELEMENT_COUNT 0
+#define ELEMENT_COUNT_SZ 16
+
+#define FRAME_COUNT 16
+#define FRAME_COUNT_SZ 16
+
+/* DMA Global Count Reload Register Bits */
+#define ELEMENT_COUNT_RELOAD 0
+#define ELEMENT_COUNT_RELOAD_SZ 16
+
+#define FRAME_COUNT_RELOAD 16
+#define FRAME_COUNT_RELOAD_SZ 16
+
+
+/* DMA Global Index Register Bits */
+#define ELEMENT_INDEX 0
+#define ELEMENT_INDEX_SZ 16
+
+#define FRAME_INDEX 16
+#define FRAME_INDEX_SZ 16
+
+/* DMA Global Address Register Bits */
+#define SPLIT_ADDRESS 3
+#define SPLIT_ADDRESS_SZ 29
+
+/* DMA Auxiliary Control Register Bits */
+#define CH_PRI 0
+#define CH_PRI_SZ 4
+
+#define AUXPRI 4
+
+
+/*----------------------------------------------------------------------------*/
+/* DEFINES */
+/*----------------------------------------------------------------------------*/
+
+#define DMA_CH0 0x00
+#define DMA_CH1 0x01
+#define DMA_CH2 0x02
+#define DMA_CH3 0x03
+
+/** BITFIELD VALUES **/
+
+/* DMA Channel Primary Control Register bitfield values */
+
+/* START */
+#define DMA_STOP_VAL 0x00
+#define DMA_START_VAL 0x01
+#define DMA_PAUSE_VAL 0x02
+#define DMA_AUTO_START_VAL 0x03
+
+/* SRC DIR, DST DIR */
+#define DMA_ADDR_NO_MOD 0x00
+#define DMA_ADDR_INC 0x01
+#define DMA_ADDR_DEC 0x02
+#define DMA_ADDR_INDX 0x03
+
+/* Synchronization Event Numbers */
+#define SEN_NONE 0x00
+#define SEN_TINT0 0x01
+#define SEN_TINT1 0x02
+#define SEN_SD_INT 0x03
+#define SEN_EXT_INT4 0x04
+#define SEN_EXT_INT5 0x05
+#define SEN_EXT_INT6 0x06
+#define SEN_EXT_INT7 0x07
+#define SEN_DMA_INT0 0x08
+#define SEN_DMA_INT1 0x09
+#define SEN_DMA_INT2 0x0A
+#define SEN_DMA_INT3 0x0B
+#define SEN_XEVT0 0x0C
+#define SEN_REVT0 0x0D
+#define SEN_XEVT1 0x0E
+#define SEN_REVT1 0x0F
+#define SEN_DSPINT 0x10
+
+/* ESIZE defines */
+#define DMA_ESIZE32 0x00
+#define DMA_ESIZE16 0x01
+#define DMA_ESIZE8 0x02
+
+/* PRI defines */
+#define DMA_CPU_PRI 0x00
+#define DMA_DMA_PRI 0x01
+
+/* SPLIT mode operation defines */
+#define DMA_SPLIT_DIS 0x00
+#define DMA_SPLIT_GARA 0x01
+#define DMA_SPLIT_GARB 0x02
+#define DMA_SPLIT_GARC 0x03
+
+/* CNT RELOAD defines */
+#define DMA_CNT_RELOADA 0x00
+#define DMA_CNT_RELOADB 0x01
+
+/* INDEX defines */
+#define DMA_INDXA 0x00
+#define DMA_INDXB 0x01
+
+/* EMULATION MODE response defines */
+#define DMA_NO_EM_HALT 0x00
+#define DMA_EM_HALT 0x01
+
+/* SRC/DST RELOAD defines */
+#define DMA_RELOAD_NONE 0x00
+#define DMA_RELOAD_GARB 0x01
+#define DMA_RELOAD_GARC 0x02
+#define DMA_RELOAD_GARD 0x03
+
+/* DMA Channel Primary Control Register bitfield values */
+
+/* DMAC EN Control */
+#define DMAC_LO 0x00
+#define DMAC_HI 0x01
+#define DMAC_RSYNC_STAT 0x02
+#define DMAC_WSYNC_STAT 0x03
+#define DMAC_FRAME_COND 0x04
+#define DMAC_BLOCK_COND 0x05
+
+
+/*----------------------------------------------------------------------------*/
+/* MACRO DEFINITIONS */
+/*----------------------------------------------------------------------------*/
+
+#define DMA_START(chan) \
+ LOAD_FIELD(DMA_PRIMARY_CTRL_ADDR(chan),DMA_START_VAL,START,START_SZ)
+
+#define DMA_AUTO_START(chan) \
+ LOAD_FIELD(DMA_PRIMARY_CTRL_ADDR(chan),DMA_AUTO_START_VAL,START,START_SZ)
+
+#define DMA_STOP(chan) \
+ LOAD_FIELD(DMA_PRIMARY_CTRL_ADDR(chan),DMA_STOP_VAL,START,START_SZ)
+
+#define DMA_PAUSE(chan) \
+ LOAD_FIELD(DMA_PRIMARY_CTRL_ADDR(chan),DMA_PAUSE_VAL,START,START_SZ)
+
+#define DMA_RSYNC_CLR(chan) \
+ LOAD_FIELD(DMA_SECONDARY_CTRL_ADDR(chan),2,RSYNC_STAT,2)
+
+#define DMA_WSYNC_CLR(chan) \
+ LOAD_FIELD(DMA_SECONDARY_CTRL_ADDR(chan),2,WSYNC_STAT,2)
+
+#define DMA_RSYNC_SET(chan) \
+ LOAD_FIELD(DMA_SECONDARY_CTRL_ADDR(chan),1,RSYNC_STAT,2)
+
+#define DMA_WSYNC_SET(chan) \
+ LOAD_FIELD(DMA_SECONDARY_CTRL_ADDR(chan),1,WSYNC_STAT,2)
+
+
+/*-----------------------------------------------------------------------------*/
+/* FUNCTION DEFINITIONS */
+/*-----------------------------------------------------------------------------*/
+
+/******************************************************************************/
+/* DMA_INIT - Initialize channel specific control registers. */
+/* */
+/* This function is responsible for setting the primary control register, */
+/* secondary control register, source address, destination address and */
+/* transfer count for the specified DMA channel. */
+/* */
+/******************************************************************************/
+
+__INLINE void dma_init( /*RET: OK or ERROR (invalid channel) */
+ unsigned short chan, /*IN: DMA channel number */
+ unsigned int pri_ctrl, /*IN: Value to set primary cntl reg */
+ unsigned int sec_ctrl, /*IN: Value to set sec cntl reg */
+ unsigned int src_addr, /*IN: Value to set source addr reg */
+ unsigned int dst_addr, /*IN: Value to set dest addr reg */
+ unsigned int trans_ctr /*IN: Value to set transfer counter */
+ );
+
+/******************************************************************************/
+/* DMA_GLOBAL_INIT - Initialize global control registers. */
+/* */
+/* This function is responsible for setting the DMA auxiliary control */
+/* register, global count reload registers A & B, global index registers */
+/* A & B, and global address registers A-D. */
+/* */
+/******************************************************************************/
+__INLINE void dma_global_init( /*RET: VOID function */
+ unsigned int auxcr, /*IN:Value for Aux Control Register */
+ unsigned int gcra, /*IN:Value for Global Cnt Reload Reg A*/
+ unsigned int gcrb, /*IN:Value for Global Cnt Reload Reg B*/
+ unsigned int gndxa, /*IN:Value for Global Idx Reg A */
+ unsigned int gndxb, /*IN:Value for Global Idx Reg B */
+ unsigned int gaddra, /*IN:Value for Global Addr Reg A */
+ unsigned int gaddrb, /*IN:Value for Global Addr Reg B */
+ unsigned int gaddrc, /*IN:Value for Global Addr Reg C */
+ unsigned int gaddrd /*IN:Value for Global Addr Reg D */
+ );
+
+/******************************************************************************/
+/* DMA_RESET - Reset all four DMA channels. */
+/* */
+/* This function resets the specified DMA channel by initializing */
+/* channel control registers to their default values */
+/* */
+/* */
+/******************************************************************************/
+__INLINE void dma_reset( void );
+
+
+#ifdef _INLINE
+static inline void dma_init(
+ unsigned short chan, /*IN: DMA channel number */
+ unsigned int pri_ctrl, /*IN: Value to set primary cntl reg */
+ unsigned int sec_ctrl, /*IN: Value to set sec cntl reg */
+ unsigned int src_addr, /*IN: Value to set source addr reg */
+ unsigned int dst_addr, /*IN: Value to set dest addr reg */
+ unsigned int trans_ctr /*IN: Value to set transfer counter */
+ )
+{
+
+ *((unsigned int *)(DMA_PRIMARY_CTRL_ADDR(chan))) = pri_ctrl;
+ *((unsigned int *)(DMA_SECONDARY_CTRL_ADDR(chan))) = sec_ctrl;
+ *((unsigned int *)(DMA_SRC_ADDR_ADDR(chan))) = src_addr;
+ *((unsigned int *)(DMA_DEST_ADDR_ADDR(chan))) = dst_addr;
+ *((unsigned int *)(DMA_XFER_COUNTER_ADDR(chan))) = trans_ctr;
+}
+
+static inline void dma_global_init(
+ unsigned int auxcr, /*IN:Value for Aux Control Register */
+ unsigned int gcra, /*IN:Value for Global Cnt Reload Reg A*/
+ unsigned int gcrb, /*IN:Value for Global Cnt Reload Reg B*/
+ unsigned int gndxa, /*IN:Value for Global Idx Reg A */
+ unsigned int gndxb, /*IN:Value for Global Idx Reg B */
+ unsigned int gaddra, /*IN:Value for Global Addr Reg A */
+ unsigned int gaddrb, /*IN:Value for Global Addr Reg B */
+ unsigned int gaddrc, /*IN:Value for Global Addr Reg C */
+ unsigned int gaddrd) /*IN:Value for Global Addr Reg D */
+{
+ DMA_AUXCR = auxcr;
+ DMA_GCR_A = gcra;
+ DMA_GCR_B = gcrb;
+ DMA_GNDX_A = gndxa;
+ DMA_GNDX_B = gndxb;
+ DMA_GADDR_A = gaddra;
+ DMA_GADDR_B = gaddrb;
+ DMA_GADDR_C = gaddrc;
+ DMA_GADDR_D = gaddrd;
+}
+
+static inline void dma_reset( void )
+{
+ int chan;
+
+ for (chan= 0;chan <= DMA_CH3; chan++)
+ {
+ *(unsigned int *)(DMA_PRIMARY_CTRL_ADDR(chan)) = 0x00;
+ *(unsigned int *)(DMA_SECONDARY_CTRL_ADDR(chan)) = 0x80;
+ *(unsigned int *)(DMA_SRC_ADDR_ADDR(chan)) = 0x00;
+ *(unsigned int *)(DMA_DEST_ADDR_ADDR(chan)) = 0x00;
+ *(unsigned int *)(DMA_XFER_COUNTER_ADDR(chan)) = 0x00;
+ }
+
+ DMA_AUXCR = 0x00;
+ DMA_GCR_A = 0x00;
+ DMA_GCR_B = 0x00;
+ DMA_GNDX_A = 0x00;
+ DMA_GNDX_B = 0x00;
+ DMA_GADDR_A = 0x00;
+ DMA_GADDR_B = 0x00;
+ DMA_GADDR_C = 0x00;
+ DMA_GADDR_D = 0x00;
+}
+
+#endif /* _INLINE */
+
+#ifdef __INLINE
+#undef __INLINE
+#endif
+
+#endif /* _DMA_H_ */
diff --git a/data/mnet/GP10/Dsp/include/dsperrs.h b/data/mnet/GP10/Dsp/include/dsperrs.h
new file mode 100644
index 0000000..91edfd3
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/dsperrs.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+
+#undef GPGLOB
+#ifdef GPDEFINE
+#define GPGLOB
+#else
+#define GPGLOB extern
+#endif
+
+#define ERROR_EVENT_QUEUE_LENGTH 16
+
+typedef struct
+{
+ Uchar timeslot; /* timeslot reporting error 0-7 or 255 if not applicable */
+ Uchar channel; /* channel reporting error. Use an enum */
+ Uchar ULorDL; /* event on uplink, downlink or NA */
+ Uint32 frameNumber;/* TDMA frame number of error */
+ Uchar eventCode; /* error event code. Use an enum */
+} t_errorEventEntry;
+
+
+typedef Uint32 T_bufferStatusEnum; /* TBD */
+typedef struct{
+ t_errorEventEntry queue[ERROR_EVENT_QUEUE_LENGTH];
+ Uchar giveIndex;
+ Uchar takeIndex;
+ T_bufferStatusEnum conditionFlag;
+ Uint16 dlUnderflowCount[NUM_RFS_PER_DSP][NUM_TN_PER_RF];
+ Uint16 dlOverflowCount[NUM_RFS_PER_DSP][NUM_TN_PER_RF];
+ Uint16 dlOutOfSequenceCount[NUM_RFS_PER_DSP][NUM_TN_PER_RF];
+}t_errorEvents;
+
+GPGLOB t_errorEvents g_errorEvents;
+
+/*-------------------------------------------------------------
+ * Error enable for sending messages only once per SF
+ *------------------------------------------------------------*/
+#pragma DATA_SECTION(g_errorEnable, ".extData");
+GPGLOB Int16 g_errorEnable;
+
+
+ \ No newline at end of file
diff --git a/data/mnet/GP10/Dsp/include/dsprotyp.h b/data/mnet/GP10/Dsp/include/dsprotyp.h
new file mode 100644
index 0000000..68412ce
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/dsprotyp.h
@@ -0,0 +1,288 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: dsprotyp.h
+*
+* Description:
+* This file contains function prototypes for all DSP source files
+*
+******************************************************************************/
+#ifndef _DSPROTYP_H_
+#define _DSPROTYP_H_
+
+#include "dsp/dsphmsg.h"
+#include "comtypes.h"
+#include "gsmtypes.h"
+#include "bbtypes.h"
+
+/* tch.c */
+void ulTchProcBurst_0 (Uint8 rfCh, Uint8 timeSlot);
+void ulTchProcBurst_3 (Uint8 rfCh, Uint8 timeSlot);
+void ulSachIdleProc (Uint8 rfCh, Uint8 timeSlot);
+void zeroTxBurst(Uint32 *burstBuf);
+void dlTchProcBurst_0 (Uint8 rfCh, Uint8 timeSlot);
+void dlTchProcBurst_3 (Uint8 rfCh, Uint8 timeSlot);
+void dlSachIdleProc (Uint8 rfCh, Uint8 timeSlot);
+void ulIdleProc (Uint8 rfCh, Uint8 timeSlot);
+void dlIdleProc (Uint8 rfCh, Uint8 timeSlot);
+
+/* sdcch.c */
+void ulSdcchProc0 (Uint8 rfCh, Uint8 timeSlot);
+void ulSdcchProc3 (Uint8 rfCh, Uint8 timeSlot);
+void dlSdcchProc0 (Uint8 rfCh, Uint8 timeSlot);
+void dlSdcchProc3 (Uint8 rfCh, Uint8 timeSlot);
+
+/* accum.c */
+ProcResult accumPower (Uint8 rfCh, Uint8 timeSlot, t_groupNum groupNum,
+ t_chanSel chanSel, t_SACCHInfo *sacchInfo, tbfStruct *TBF);
+Int16 computeUplinkRxLev(t_ULSignalStrength *sigstren);
+ProcResult accumToa (Uint8 rfCh, Uint8 timeSlot, t_groupNum groupNum,
+ Uint8 subChan, t_chanSel chanSel, tbfStruct *TBF);
+ProcResult accumBer (Uint8 rfCh, Uint8 timeSlot, t_groupNum groupNum,
+ t_chanSel chanSel, Uint8 subChan, t_SACCHInfo *sacchInfo,
+ Bool dtxMode, Bool dtxSid);
+ProcResult accumBitBlockErrs(Uint8 rfCh, Uint8 timeSlot, t_chanSel chanSel, tbfStruct *TBF);
+Uint16 expAverage(Uint16 input_x, Uint16 output_y_current, Uint8 smoothMult, Uint8 smoothDiv);
+void rateTransition(Uint8 rfCh, tbfStruct *TBF);
+
+/* sacch.c */
+void ulSacchProc0 (Uint8 rfCh, Uint8 timeSlot);
+void ulSacchProc3 (Uint8 rfCh, Uint8 timeSlot);
+void dlSacchProc0 (Uint8 rfCh, Uint8 timeSlot);
+void dlSacchProc1 (Uint8 rfCh, Uint8 timeSlot);
+void dlSacchProc3 (Uint8 rfCh, Uint8 timeSlot);
+void idleChanDiagReport(Uint8 rfCh, Uint8 timeSlot);
+
+/* pagch.c */
+void dlPagchProc0 (Uint8 rfCh, Uint8 timeSlot);
+void dlPagchProc1 (Uint8 rfCh, Uint8 timeSlot);
+void dlPagchProc2 (Uint8 rfCh, Uint8 timeSlot);
+void dlPagchProc3 (Uint8 rfCh, Uint8 timeSlot);
+void ulRachProc (Uint8 rfCh, Uint8 timeSlot);
+void ulPrachProc0(Uint8 rfCh, Uint8 timeSlot);
+void ulPrachProc3 (Uint8 rfCh, Uint8 timeSlot);
+void putPPCHBuff(Uint8 rfCh, Uint8 timeslot, Uint8 ccch, Uint8 msgDiscrim, msgStruc *p_msg);
+Uint8 getPPCHBuff(Uint8 rfCh, Uint8 timeSlot);
+Uint8 availablePPCHBuff(Uint8 rfCh, Uint8 timeSlot);
+
+/* bcch.c */
+void dlBcchProc0 (Uint8 rfCh, Uint8 timeSlot);
+void dlBcchProc1 (Uint8 rfCh, Uint8 timeSlot);
+void dlBcchProc2 (Uint8 rfCh, Uint8 timeSlot);
+void dlBcchProc3 (Uint8 rfCh, Uint8 timeSlot);
+void dlFcchProc (Uint8 rfCh, Uint8 timeSlot);
+void dlSchProc (Uint8 rfCh, Uint8 timeSlot);
+void dlPbcchProc0(Uint8 rfCh, Uint8 timeSlot);
+void dlPpchProc0(Uint8 rfCh, Uint8 timeSlot);
+void dlPpchProc1(Uint8 rfCh, Uint8 timeSlot);
+void dlPpchProc2(Uint8 rfCh, Uint8 timeSlot);
+void dlPpchProc3(Uint8 rfCh, Uint8 timeSlot);
+
+
+/* dspmain.c */
+void ulTchNetProc (void);
+void dlTchNetProc (void);
+
+/* grouptbl.c */
+void group0TableInit (void);
+void group4TableInit (void);
+void dlGroupVTableInit (void);
+void ulGroupVTableInit (void);
+void sacchIdleTableInit (void);
+void dlGroupVIITableInit (void);
+void ulGroupVIITableInit (void);
+void dlGroupITableInit (void);
+void ulGroupITableInit (void);
+void ulGroupXITableInit(void);
+void dlGroupXITableInit(void);
+void dlGroupXIIITableInit(void);
+void ulGroupXIIITableInit(void);
+void dlPtcchTableInit(void);
+void ulPtcchTableInit(void);
+void dlPbcchTableInit(void);
+void dlPpchTableInit(void);
+void ulPtcchIdleProc (Uint8 rfCh, Uint8 timeSlot);
+void dlPtcchProc0 (Uint8 rfCh, Uint8 timeSlot);
+void dlPtcchProc3 (Uint8 rfCh, Uint8 timeSlot);
+void dlPtcchIdleProc0 (Uint8 rfCh, Uint8 timeSlot);
+void dlPtcchIdleProc3 (Uint8 rfCh, Uint8 timeSlot);
+void ulPtcchProc (Uint8 rfCh, Uint8 timeSlot);
+void ulPtcchIdleProc (Uint8 rfCh, Uint8 timeSlot);
+void dlPtcchIdleProc (Uint8 rfCh, Uint8 timeSlot);
+void ulPtcchIdleProc0 (Uint8 rfCh, Uint8 timeSlot);
+
+/* pdch.c */
+tbfStruct * ulChan2TbfMap(Uint8 rfCh, Uint8 timeSlot);
+void dlPdchProc0 (Uint8 rfCh, Uint8 timeSlot);
+void dlPdchProc3 (Uint8 rfCh, Uint8 timeSlot);
+void ulPdchProc0 (Uint8 rfCh, Uint8 timeSlot);
+void ulPdchProc3 (Uint8 rfCh, Uint8 timeSlot);
+
+/* groupini.c */
+ProcResult tsGroupInit (void);
+ProcResult tsConfigure (Int16 rfCh, Int16 ts, t_groupNum groupNum);
+
+/* rrmsg.c */
+ProcResult rrMsgProc (msgStruc *p_msg);
+ProcResult rcvPhDataReq (msgStruc *p_msg);
+void chXlate (t_groupNum groupNum, t_chanSel chanType, Uint8 subchan,
+ Uint8 *p_chanNum, Uint8 *p_linkId);
+
+/* trxmsg.c */
+ProcResult trxMsgProc (msgStruc *p_msg);
+Uint8 frequencyHoppingAlg (Uint8 *ndx, Uint8 *seqnum);
+
+/* oammsg.c */
+ProcResult oamMsgProc(msgStruc *p_msg);
+
+/* diagmsg.c */
+ProcResult diagMsgProc(cmdStruc *diagCmd);
+
+/* dynpwrctrl.c */
+void uplink_dynamic_power_control (t_TNInfo *ts, Uint8 subChan);
+void averageS (t_ULSignalStrength *s, t_DLSignalStrengthSCell *sD, Uint8 bufSiz, Int16 *newSmpl, Bool convertNewSmpl);
+void averageQ (t_ULSignalQuality *q, t_DLSignalQualitySCell *qD, Uint8 bufSiz, Uint16 *newSmpl, Bool convertNewSmpl);
+Uint8 ber2rxQualConv (Uint16 berval);
+
+/* hoProc.c */
+void handOverProc (Uint8 rfCh, Uint8 timeSlot);
+void handOverProcSort (Uint8 rfCh, Uint8 timeSlot);
+void oamInit (void);
+char hoPNtest (t_nxBuf *nxBuffer, Uint8 nx, Uint8 pass);
+void hoCompare2NCells (Uint8 rfCh, Uint8 timeSlot, Uint8 hoCause);
+void sendAsyncHoMsg (Uint8 rfCh, Uint8 timeSlot, Uint8 hoCause);
+void UCopy2SendBuf (Uint8 rfCh, Uint8 timeSlot);
+
+/* agc.c */
+Int16 ul_agc (t_ULSignalStrength *sigstren);
+Int16 rcvPwrSmoothingFilter(t_ULSignalStrength *sigstren, Short rcvPower);
+
+/* demodc.c */
+void DCOffset (t_ULComplexSamp samples[], t_chanSel groupNum, Uint8 rfCh, Uint8 index);
+
+/* report.c */
+ProcResult initMsReport (Uint8 rfCh, Uint8 reportIndex);
+ProcResult initGprsMsReport(Uint8 rfCh, Uint8 tfi);
+ProcResult initSdcch8Report (Uint8 rfCh, Uint8 reportIndex);
+void ReportDiagToHost (void);
+void ReportErrorToHost (void);
+
+/* dspmaint.c */
+Void getRspQueStatus (cmdStruc *diagCmd);
+Void ReportError (ErrorType Error, Uint8 trx, Uint8 timeSlot,
+ Uint8 numParams, Uint8 *params);
+Void sendDiagMsg (Uint8 diagMsgType, Uint8 trx, Uint8 timeSlot,
+ Uint8 numParams, Uint8 *params);
+
+/* queue.c */
+qStruc *qCreate (Int16 NumberQ, Int16 Priority, qStruc *qName);
+Bool qPut (msgStruc *msg, qStruc *qName);
+Bool qGet (msgStruc *msg, qStruc *qName);
+Int16 qGetAll (Int32 *wrPtr, qStruc *qName, Uint8 maxMsgs);
+
+/* hpi.c */
+Void SendMsgHost_Que (msgStruc *DspMsg);
+void sendMsgHost (msgStruc *DspFastMsg);
+Void hpiRcvMsg (Void);
+Void hpiXmtMsg (Void);
+
+/* dspinit.c */
+void dsp_init(void);
+
+/* rtscheck.c */
+void rtsCheck (Uint8 rfCh, Uint8 timeSlot, Uint8 logCh, Uint8 subCh, Int8 availableBuf);
+
+/* syncmsg.c */
+void dlSyncMsgProcess (t_chanSel chanSel, void *buffPtr);
+void processCCHBuff (t_DLSigBufs* sigBufPtr);
+void processPCCCHBuff(t_DLPPCHBufs* sigBufPtr);
+void ulSyncMsgProcess (t_chanSel chanSel, Uint8 subchan, Uint8 TN, Uint8 rfCh);
+
+/* dcchmsg.c */
+ProcResult initPower (chActMsgStruc *hostChActInfo, t_SACCHInfo *dspSacchInfo);
+ProcResult dcchMsgProc (msgUnionStruc *dcchMsg);
+void sacchMsgProc (sacchMsgStruc *sacchMsg, t_sysInfoQueue *sacchBuf, Uint8 sysInfoType);
+
+/* ccchmsg.c */
+ProcResult ccchMsgProc(msgUnionStruc *ccchMsg);
+
+/* init_hw2.c */
+void init_hw(void);
+
+/* burstisr.c */
+interrupt void dma0Isr (void);
+interrupt void dma1Isr (void);
+void interrupt gsmFrameIsr (void);
+void dlBurstProcIsr (void);
+void ulBurstProcIsr (void);
+
+/* frameisr.c */
+void frameProc (void);
+
+/* codecs.c */
+void codecInit (void);
+void ulCCHFireDecoder (void);
+
+/* miscfunc.c */
+void unpackFromByteBuffer (UChar *input, UChar *output, Int numBits);
+void packToByteBuffer (UChar *input, UChar *output, Int numBits);
+void unpackByteMSB (UChar *input, UChar *output, Int numBits);
+void packToByteMSB (UChar *input, UChar *output, Int numBits);
+
+/* topcodec.c */
+void chanEncoder (t_chanSel chanSel, Bool frameBoundary, Uint8 TN, Bool tx);
+Bool chanDecoder (t_chanSel chanSel, Bool frameBoundary, UInt TN);
+void chanCodecInit (void);
+
+/* burst.c */
+void buildGSMBurst (t_chanSel chanSel, UChar TSEQ);
+
+/* mod2spb.c */
+void GMSKModulate (t_DLComplexSamp *outBurstPtr, t_chanSel chanSel);
+
+/* demtop.c */
+void demodulate(t_ULComplexSamp *samples,
+ t_chanSel chanSel,
+ UChar tseq,
+ t_ULBurstBuf *ULBurstData,
+ t_groupNum groupNum,
+ UChar rfCh,
+ UChar timeSlot,
+ UChar subChan);
+
+/* framesync.c */
+void tsFrameSync (Uint8 rfCh, Uint8 timeSlot);
+void sysSyncProc (void);
+
+/* encrypt.c */
+void decrypt (Uint8 rfCh, Uint8 timeSlot);
+void encrypt (Uint8 rfCh, Uint8 timeSlot, Uint8 burstPhase);
+
+/* siddetect.c */
+Uint8 sidDetection (Uint8 *speechBits, t_vocAlgo vocoAlgo);
+
+/* loopback.c */
+void mod2DmodLpbk(void);
+void compLpbkBuf (Uint32 *inBuf, Uint32 *outBuf);
+void dlGroupVTableLpbkInit(void);
+void ulGroupVTableLpbkInit(void);
+void ulGroupVIITableLpbkInit(void);
+
+/* tchmsg.c */
+void tchFrameInit (void);
+ProcResult tchMsgProc (msgUnionStruc *tchMsg);
+
+/* drv6x.c */
+int board_init(void);
+
+/* dspmh.c */
+void dspMsgHandler(Void);
+ProcResult ProcessHostMsg(cmdStruc * hmsg);
+
+
+#endif /* end of include once only */
+
+
+
diff --git a/data/mnet/GP10/Dsp/include/gsmdata.h b/data/mnet/GP10/Dsp/include/gsmdata.h
new file mode 100644
index 0000000..2d195c1
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/gsmdata.h
@@ -0,0 +1,155 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* File: gsmdata.h
+*
+* Description:
+* This file contains references to the global structures and variables
+* used in GSM Layer 1 processing. It includes a file containing the
+* defined constants, enumerations and type definitions that support
+* the same GSM Layer 1 processing.
+*
+* NOTE: INGLOB and EXGLOB specify internal and external DSP memory
+* allocation, respectively. They are defined in dsptypes.h
+* and included here through gsmtypes.h.
+*
+*****************************************************************************/
+#ifndef _GSMDATA_H_
+#define _GSMDATA_H_ /* include once only */
+
+#include "dsp/dsphmsg.h"
+#include "gsmtypes.h"
+
+EXGLOB t_frameCounts g_frameCounts;
+
+EXGLOB t_GsmFrameNum sysFrameNum;
+EXGLOB t_GsmFrameNum setFrameNum;
+EXGLOB t_GsmFrameNum localFrameNum[NUM_RFS_PER_DSP];
+
+EXGLOB t_frmSync g_frmSync;
+
+EXGLOB tbfStruct g_tbfInfo[NUM_RFS_PER_DSP][TBF_NUMBER_MAX];
+
+EXGLOB dlTchFrameStruct g_dlTchFrame[NUM_TS_PER_RF];
+
+EXGLOB burstProcStruc g_burstProc;
+
+EXGLOB dlSidFrameStruct g_dlSidFrame[NUM_TS_PER_RF];
+
+/*
+* Function lookup tables for different GSM Groups
+*/
+EXGLOB Uint32 dlSacchIdleTbl[8];
+EXGLOB Uint32 ulSacchIdleTbl[8];
+
+EXGLOB Uint32 dlGroupTable0[1];
+EXGLOB Uint32 ulGroupTable0[1];
+
+EXGLOB Uint32 dlGroupTableI[T2_FRAMES];
+EXGLOB Uint32 ulGroupTableI[T2_FRAMES];
+
+EXGLOB Uint32 dlGroupTableIV[1];
+EXGLOB Uint32 ulGroupTableIV[1];
+
+EXGLOB Uint32 dlGroupTableV[T3_FRAMES];
+EXGLOB Uint32 ulGroupTableV[T3_FRAMES];
+
+EXGLOB Uint32 dlGroupTableVII[T3_FRAMES];
+EXGLOB Uint32 ulGroupTableVII[T3_FRAMES];
+
+EXGLOB Uint32 dlGroupTableXI[GPRS_MULTI_FRAMES];
+EXGLOB Uint32 ulGroupTableXI[GPRS_MULTI_FRAMES];
+
+
+EXGLOB Uint32 dlGroupTableXIII[GPRS_MULTI_FRAMES/4];
+EXGLOB Uint32 ulGroupTableXIII[GPRS_MULTI_FRAMES/4];
+
+EXGLOB Uint32 dlPtcchTable[8];
+EXGLOB Uint32 ulPtcchTable[2];
+
+EXGLOB Uint32 dlPbcchTable[4];
+EXGLOB Uint32 dlPpchTable[4];
+
+EXGLOB t_group11_params g11Params;
+EXGLOB Uint8 g_PrachBits; /* # of bits for the PRACH message (8 or 11) */
+
+
+
+
+/* Define the BBInfo for each RF */
+EXGLOB t_BBInfo g_BBInfo[NUM_RFS_PER_DSP];
+/* New 01/22/01...encrypt bits onchip to save CPU cycles */
+INGLOB UChar tchUlEncryptStream[NUM_RFS_PER_DSP][NUM_TS_PER_RF][NUM_ENCRYPT_BITS]; /*To be applied to UL */
+INGLOB UChar sdcchUlEncryptStream[NUM_SDCCH_SUBCHANS][NUM_ENCRYPT_BITS]; /*To be applied to UL */
+INGLOB UChar sdcch8UlEncryptStream[NUM_SDCCH8_SUBCHANS][NUM_ENCRYPT_BITS]; /*To be applied to UL */
+
+
+/*
+* CCCH/DCCH related signal buffers, assume mapped to only one time slot
+*/
+EXGLOB t_SCHSigBufs g_dlSigBufsSCH[1][1];
+EXGLOB t_CBCHQueue g_dlSigBufsCBCH[2]; /* one normal, one for extended SMSCB */
+EXGLOB t_sysInfoQueue g_dlSigBufsSYSINFO[1][NUM_SYSINFO_BUFS];
+
+
+
+EXGLOB t_DLSigBufs g_dlSigBufsSACCH[1][1][NUM_SACCH_SUBCHANS];
+EXGLOB t_DLSigBufs g_dlSigBufsSDCCH[1][1][NUM_SDCCH_SUBCHANS];
+EXGLOB t_DLSigBufs g_dlSigBufsSACCH8[1][1][NUM_SACCH8_SUBCHANS];
+EXGLOB t_DLSigBufs g_dlSigBufsSDCCH8[1][1][NUM_SDCCH8_SUBCHANS];
+
+EXGLOB t_DLSigBufs g_dlSigBufsPTCCH[NUM_RFS_PER_DSP][NUM_TS_PER_RF];
+
+EXGLOB t_DLPPCHBufs g_dlSigBufsPPCH[NUM_RFS_PER_DSP][NUM_PPCH_SUBCHANS];
+
+/* These two variables are associated with the GPRS rateTransition() */
+EXGLOB Uint8 g_rateChangeCheck;
+EXGLOB Uint8 g_RATE_TRAN_ON;
+
+/*
+* TCH related Signal buffers for all TRXs and Time slots
+*/
+EXGLOB t_DLSigBufs g_dlSigBufsFACCH[NUM_RFS_PER_DSP][NUM_TS_PER_RF];
+EXGLOB t_DLSigBufs g_dlSigBufsTchSACCH[NUM_RFS_PER_DSP][NUM_TS_PER_RF];
+
+
+/*
+* P and N buffers (gsm 05.08) for power control and handover.
+*/
+EXGLOB t_PNbufs g_PNbufs[NUM_TN_PER_RF];
+EXGLOB Uint16 g_rxQual2ber_LookUpTbl[8];
+EXGLOB Uint8 g_IntRprtCntr; /* Counter for interference reports to host */
+
+/* Definition of group 11 radio block types */
+
+EXGLOB Uint8 G11_dlRadioBlkType[MAX_RADIO_BLOCKS];
+EXGLOB Uint8 G11_ulRadioBlkType[MAX_RADIO_BLOCKS];
+EXGLOB Uint8 g_dyn_prach_blk;
+
+
+
+/* Control whether to send dummy burst for inactive slots */
+EXGLOB Uint8 g_IdleFrameMode;
+
+#ifdef ALLOCATE_MEMORY_EXTERNAL /*-------------------------------------------*/
+
+Uint8 dcchFiller[23] = { 0x03, 0x03, 0x01, 0x2b, 0x2b, 0x2b,
+ 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
+ 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
+ 0x2b, 0x2b, 0x2b, 0x2b, 0x2b};
+Uint8 bcchFiller[23] = { 0x01, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
+ 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
+ 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
+ 0x2b, 0x2b, 0x2b, 0x2b, 0x2b};
+
+#else /*--------------------------------------------------------------------*/
+
+extern Uint8 dcchFiller[23];
+extern Uint8 bcchFiller[23];
+
+#endif /*--------------------------------------------------------------------*/
+
+
+#endif /* end of include once only */
diff --git a/data/mnet/GP10/Dsp/include/gsmtypes.h b/data/mnet/GP10/Dsp/include/gsmtypes.h
new file mode 100644
index 0000000..99f87e5
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/gsmtypes.h
@@ -0,0 +1,1056 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* File: gsmtypes.h
+*
+* Description:
+* This file contains defined constants, enumerations and type definitions
+* of shared items to support GSM Layer 1 processing.
+*
+*****************************************************************************/
+#ifndef _GSMTYPES_H_
+#define _GSMTYPES_H_ /* include once only */
+
+#include "dsp/dsptypes.h"
+
+#define NUM_TS_PER_RF (8) /* Number of timeslots per RF */
+#define NUM_RFS_PER_DSP (1) /* Number of RFs within one DSP */
+
+#define MS_TXPWR_MAX_DEF 0 /* in 2 dB units, i.e. 3 = 3*2 dB = 6dB */
+#define MS_TXPWR_MIN_DEF 15 /* ditto */
+
+#define T1_FRAMES 2048
+#define T2_FRAMES 26
+#define T3_FRAMES 51
+
+#define FRAME_COUNT_TOO_BIG (2715648L) /* Maximum frame number */
+
+#define R 5 /* R for RACH frame in Group 5 Channel Map Table (burstisr.c) */
+
+typedef enum {
+ GSM_900 = 0,
+ DCS_1800 = 1,
+ PCS_1900 = 2
+} airInterfaceType;
+
+/*
+* Logical channel types
+*/
+typedef enum {
+ IDLE,
+ TCHF,
+ SACCH,
+ SACCH4, /* last sacch burst in a sequence of 4*/
+ SACCH8, /* SACCH/C8 type for Configuration 7 */
+ SDCCH, /* first sdcch " " " " " */
+ SDCCH4,
+ SDCCH8,
+ TCHH,
+ BCCH,
+ PCH,
+ AGCH,
+ PAGCH = AGCH,
+ SCH,
+ RACH,
+ FACCH,
+ FCCH,
+ SACCH_OR_IDLE, /* Can be idle or SACCH, control code will determine */
+ CBCH,
+ CBCH_EXT,
+ PDCH,
+ PDCH4, /* the last burst of the RLC block */
+ PACCH,
+ PTCCH,
+ PDTCH,
+ PRACH,
+ PPAGCH, /* GROUP_11, GROUP_12 ---> Packet access grant */
+ PPCH, /* GROUP_11, GROUP_12 ---> Packet paging */
+ PBCCH
+} t_chanSel;
+
+typedef enum {
+ CHAN_INACTIVE = 0, /* The channel is not activated */
+ CHAN_ACTIVE /* The channel is activated */
+} t_chanState;
+
+typedef enum {
+ IND_SPEECH = 1, /* speech */
+ IND_DATA = 2, /* data */
+ IND_SIG = 3 /*signalling */
+} t_speechDataInd;
+
+typedef enum {
+ TYPE_SDCCH = 1, /* sdcch */
+ TYPE_TCHF = 8, /* tch full rate (Bm) */
+ TYPE_TCHH = 9 /* tch half rate (Lm) */
+} t_rateType;
+
+typedef enum {
+ VOC_NULL = 0, /* no active vocoder */
+ VOC_GSMF = 1, /* GSM Full rate */
+ VOC_EFR = 2 /* GSM EFR */
+} t_vocAlgo;
+
+typedef enum {
+ RATE_9_6T_12 = 16, /* 9.6/12 kbit/s transparent/non-transparent */
+ RATE_4_8T_6 = 17, /* 4.8/6 kbit/s transparent/non-transparent */
+ RATE_2_4T = 18, /* 2.4 kbit/s transparent */
+ RATE_1_2T = 19, /* 1.2 kbit/s transparent */
+ RATE__6T = 20, /* 0.6 kbit/s transparent */
+ RATE_1_2D_75UT = 21 /* 1.2 kbits/s downlink, 75 bits/s uplink */
+} t_dataRate;
+
+typedef enum {
+ NON_TRANSPARENT = 0, /* non-transparent data*/
+ TRANSPARENT = 1 /* non-transparent data*/
+} t_transMode;
+
+typedef struct {
+ UInt FN; /* GSM TDMA frame number, 0 - 2715647 (22 bits) */
+ UShort t1; /* 11 bits, 0 -> 2047 = FN div (26*51) */
+ UChar t2; /* 5 bits, 0 -> 25 = FN mod 26 */
+ UChar t3; /* 6 bits, 0 -> 50 = FN mod 51 */
+ UChar TNNumInit; /* Uplink timeslot number initial value */
+ Uchar ulFNOffset;
+} t_frameCounts;
+
+typedef struct {
+ Uint32 FN;
+ Uint16 t1;
+ Uint8 t2;
+ Uint8 t3;
+} t_GsmFrameNum;
+
+typedef enum {
+ SET_SYNC,
+ CHECK_SYNC,
+ TS_RE_SYNC,
+ OUT_OF_SYNC
+} t_frameSyncState;
+
+typedef struct {
+ t_frameSyncState state;
+ Uint8 newPageState;
+ Uint8 newBSPaMfrms;
+} t_frmSync;
+
+typedef enum {
+ /*
+ * Sys Info types for BCCH
+ */
+ TYPE_8 = 0,
+ TYPE_1,
+ TYPE_2,
+ TYPE_3,
+ TYPE_4,
+ TYPE_2_BIS,
+ TYPE_2_TER,
+ TYPE_7,
+ TYPE_9,
+ TYPE_10,
+ TYPE_11,
+ TYPE_13,
+ TYPE_14,
+ TYPE_15,
+ /*
+ * Sys Info types for SACCH
+ */
+ TYPE_5,
+ TYPE_6,
+ TYPE_5_BIS,
+ TYPE_5_TER,
+
+ PACKET_TYPE_1,
+ PACKET_TYPE_2,
+ PACKET_TYPE_3,
+ PACKET_TYPE_3BIS,
+ PACKET_TYPE_4,
+ PACKET_TYPE_5,
+ PACKET_TYPE_13,
+ NUM_SYSINFO_BUFS /* Defines how many sysinfo buffers exist */
+} t_sysInfoBufIndex;
+
+
+
+typedef enum {
+ SYS_INFO_8 = 0,
+ SYS_INFO_1 = 1,
+ SYS_INFO_2 = 2,
+ SYS_INFO_3 = 3,
+ SYS_INFO_4 = 4,
+ SYS_INFO_5 = 5,
+ SYS_INFO_6 = 6,
+ SYS_INFO_7 = 7,
+ SYS_INFO_13 = 13,
+
+ SYS_INFO_2BIS = 0x10,
+ SYS_INFO_2TER = 0x11,
+ SYS_INFO_5BIS = 0x12,
+ SYS_INFO_5TER = 0x13,
+
+ /*
+ * GSM 4.60-720 11.2.0.1
+ */
+ PSI_1 = 0x31,
+ PSI_2 = 0x32,
+ PSI_3 = 0x33,
+ PSI_3BIS = 0x34,
+ PSI_4 = 0x35,
+ PSI_5 = 0x36,
+ PSI_13 = 0x37
+} t_sysInfoCode;
+
+#define DL_SIG_Q_DEPTH 2
+#define DL_SIG_MSG_SIZE 23 /*TBD */
+#define NUM_SDCCH_TS_PER_RF 8
+#define NUM_SACCH_TS_PER_RF 8
+#define NUM_PCH_TS_PER_RF 1
+#define NUM_TN_PER_RF 8
+
+#define NUM_BCCH_SUBCHANS NUM_SYSINFO_BUFS
+
+
+#define NUM_SDCCH_SUBCHANS 4 /* USE 4 for Group V, 8 is the maximum */
+#define NUM_SACCH_SUBCHANS 4 /* USE 4 for Group V, 8 is the maximum */
+#define NUM_FACCH_SUBCHANS 1
+#define NUM_SACCH8_SUBCHANS 8 /* USE 8 for Group VII, 8 is the maximum */
+#define NUM_SDCCH8_SUBCHANS 8 /* USE 8 for Group VII, 8 is the maximum */
+
+
+#define MAX_BS_PA_MFRMS 9
+#define PAGE_BLOCKS_G5 3
+#define NUM_PAGCH_SUBCHANS (MAX_BS_PA_MFRMS * PAGE_BLOCKS_G5)
+
+#define BS_PBCCH_BLKS_PLUS_BS_PAG_BLKS_RES 11
+#define NUM_PPCH_SUBCHANS (12-BS_PBCCH_BLKS_PLUS_BS_PAG_BLKS_RES)*64
+#define USF_FREE 0x7 // USF indicates a PRACH in the
+ // block
+
+
+typedef struct {
+ Uint8 readIndex; /* Next buffer to read by the asynch code */
+ Uint8 writeIndex; /* Next buffer to write by the synch code */
+ Uint8 numMsgsReady; /* Number of pending messages to read */
+ Bool overflow; /* Set to TRUE is buffer has been overloaded */
+ Bool valid; /* Set to true when L3 has initialized */
+ Uint8 data[DL_SIG_Q_DEPTH][DL_SIG_MSG_SIZE];
+ Uint8 tag[DL_SIG_Q_DEPTH];
+ Uint8 burstType[DL_SIG_Q_DEPTH];
+} t_DLSigBufs;
+
+
+/*
+* t_DLPPCHBufs is the global pooled resource buffer used
+* for PCH and AGCH. In the future, PPCH and PPAGCH will use it too.
+*/
+typedef struct {
+ Uint8 msgReady; /* Pending message */
+ Uint8 timeslot; /* one global buffer for all (P)CCCH timeslots */
+ Uint8 logCh;
+ Uint8 pageNum; /* paging index */
+ Bool valid; /* Set to true when L3 has initialized */
+ Uint8 data[DL_SIG_MSG_SIZE];
+} t_DLPPCHBufs;
+
+
+/*
+* Those message buffers with "RTS Flow control", uses single buffer to save
+* memory
+*/
+#define DL_SIG_QUEUE_SIZE 1
+typedef struct {
+ Uint8 readIndex; /* Next buffer to read by the asynch code */
+ Uint8 writeIndex; /* Next buffer to write by the synch code */
+ Uint8 numMsgsReady; /* Number of pending messages to read */
+ Bool overflow; /* Set to TRUE is buffer has been overloaded */
+ Bool valid; /* Set to true when L3 has initialized */
+ Uint8 data[DL_SIG_QUEUE_SIZE][DL_SIG_MSG_SIZE];
+} t_DLSigBuf;
+
+#define SCH_INFO_Q_DEPTH 2 /* SCH downlink message queue size */
+#define SCH_INFO_MSG_SIZE 4 /* SCH downlink message buffer size */
+
+/*
+* downlink SCH buffer
+*/
+typedef struct {
+ UChar data[SCH_INFO_Q_DEPTH][SCH_INFO_MSG_SIZE];
+ UChar state; /* Indicates buffer to transmit from */
+ UInt frameNumUpdate; /* Indicates the frame number to switch buffers */
+ Bool update; /* Set to true when an update is scheduled */
+ Bool valid; /* Set to true when L3 has initialized */
+} t_SCHSigBufs;
+
+typedef struct {
+ t_SCHSigBufs *dlSigBuf; /* Define the downlink SCH signaling buffers */
+} t_SCHInfo;
+
+#define SYS_INFO_Q_DEPTH 2
+#define SYS_INFO_MSG_SIZE 25
+
+typedef struct {
+ Uint32 frameNumUpdate; /* Indicates the frame number to switch buffers */
+ Uint8 data[SYS_INFO_Q_DEPTH][SYS_INFO_MSG_SIZE];
+ Uint8 state; /* Indicates buffer to transmit from */
+ Bool update; /* Set to true when an update is scheduled */
+ Bool valid; /* Set to true when L3 has initialized */
+} t_sysInfoQueue;
+
+
+typedef struct {
+ Uint8 data[4][SYS_INFO_MSG_SIZE];
+ Uint8 bufValid; /* Indicates buffer empty */
+} t_CBCHQueue;
+
+#define UL_SIG_Q_DEPTH 2
+#define UL_SIG_MSG_SIZE 23 /* 23 octet message */
+
+/*
+* Uplink signaling buffers
+*/
+typedef struct {
+ UChar chanSel; /* Channel type identifier */
+ UChar subchannel; /* Subchannel identifier */
+ UChar data[UL_SIG_MSG_SIZE];/* UL frame data */
+ UShort T1; /* Frame number T1 */
+ Uchar T2; /* Frame number T2 */
+ Uchar T3; /* Frame number T3 */
+} t_ULSigMsg;
+
+typedef struct {
+ t_ULSigMsg msg[UL_SIG_Q_DEPTH];
+
+ UChar readIndex; /* Next buffer to read by the asynch code */
+ UChar writeIndex; /* Next buffer to write by the synch code */
+ UChar numMsgsReady; /* Number of pending messages to read */
+ Bool overflow; /* Set to TRUE if buffer has been overloaded */
+} t_ULSigBufs;
+
+typedef enum {
+ SYS_INFO_SACCH = 0,
+ DL_DCH_SACCH
+} t_sacchState;
+
+
+#define NUM_RX_SIGNAL_SAMPLES_MAX 32 /* gsm 05.08 default */
+
+typedef struct {
+ Int8 rxLev[NUM_RX_SIGNAL_SAMPLES_MAX];/* Power from uplink (MS) */
+ Uint8 count; /* for rxLev circular buffer */
+ Int8 rxLevAve; /* Average uplink power for rxLev array */
+ Int16 rxPwrNormSmooth; /* normalized, rcv pwr output from smoothing filter */
+ Uint16 rxgain; /* 10-bit result of ul agc used to set ul gain FPGA resgister */
+} t_ULSignalStrength;
+
+typedef struct {
+ Uint8 rxQual[NUM_RX_SIGNAL_SAMPLES_MAX]; /* uplink RXQUAL of gsm 05.08 */
+ Uint8 count; /* for rxQual[] circular buffer */
+ Uint16 ber; /* calculated value used for reporting, handover purposes */
+ Uint16 berAve; /* Averaged BER using a resolution of 0.01% for voice, 0.001% for GPRS */
+ Uint8 rxQualAve; /* converted from berAve */
+ Uint16 blerAve; /* Exponentially averaged RLC block errors, GPRS only! */
+} t_ULSignalQuality;
+
+
+typedef struct {
+ Uint8 MSPwrSetting; // !! set from syncmsg.c
+ Int16 rxLevNew;
+
+ Int8 rxLev[NUM_RX_SIGNAL_SAMPLES_MAX];
+ Uint8 count;
+ Int8 rxLevAve;
+} t_DLSignalStrengthSCell; // Serving Cell
+
+typedef struct {
+ Uint8 rxQualNew;
+
+ Uint8 rxQual[NUM_RX_SIGNAL_SAMPLES_MAX];
+ Uint8 count;
+ Uint16 berAve;
+ Uint8 rxQualAve;
+} t_DLSignalQualitySCell; // Serving Cell
+
+
+/*
+* GPRS Related structures and definitions
+*/
+
+typedef struct {
+ Int8 toa; /* accumulation of time-of-arrival of all bursts */
+ Int8 toaSub; /* accumulation of time-of-arrival of sub bursts */
+ Int8 toaLastGood; /* Last toa of a "good" quality burst */
+ Int8 toaLastGoodActual; /* Last actual toa of "good" quality */
+ Int16 MSPower; /* accumulated uplink power (set to Sub or Full, see below) */
+ Int16 MSPowerSub; /* TBD - uplink power on SACCH plus potential SID bursts */
+// Int16 MSPowerFull; /* TBD - uplink power on all TCH bursts */
+ Uint16 bitErrors; /* accumulation of bit errors on one RLC block */
+ Uint16 bitCount;
+ Uint16 blockErrors; /* RLC block errors per RLC block (0% or 100%) */
+} t_ULAccum;
+
+typedef struct {
+ Uint8 C_VALUE; /* GPRS, the normalized rec'd signal level at the MS (RXLEV units) */
+ Uint8 RXQUAL; /* GPRS, downlink signal quality calculated by the MS */
+ Uint8 iLevelTN[NUM_TS_PER_RF]; /* GPRS, interference relative to C value, valid only in pkt. xfer mode */
+ Uint16 ber; /* derived from RXQUAL, used for DL code rate monitoring */
+ Uint16 berAve; /* derived from RXQUAL, used for DL code rate monitoring */
+} t_PacketDownlinkAckNackInfo;
+
+#define MAX_TFI 32
+#define GPRS_MULTI_FRAMES 52
+#define BLOCKS_PER_GPRS_MULTI_FRAMES 12
+
+#define PTCCH_FRAMES_PER_GPRS_MULTI_FRAMES 2
+#define IDLE_FRAMES_PER_GPRS_MULTI_FRAMES 2
+#define PTCCH_FRAMES_PER_TA_MSG PTCCH_FRAMES_PER_GPRS_MULTI_FRAMES*2
+#define HALF_TA_MSG_SIZ PTCCH_FRAMES_PER_TA_MSG/2
+
+typedef struct {
+ Uint8 blkOrPeriod;
+ Uint8 numBlocks;
+ Uint8 bitMapLen;
+ Uint8 bitMapAlloc[16]; /*1-128 bit map allocation*/
+ Uint32 startTime;
+} t_fixedMode;
+
+
+typedef struct {
+ Uint32 startTime;
+} t_singleBlkMode;
+
+#define SBA_TAG 0xff
+
+typedef struct {
+ Uint32 usfTsMap;
+} t_dynamicMode;
+
+typedef union {
+ t_singleBlkMode sBlk;
+ t_fixedMode fixed;
+ t_dynamicMode dynamic;
+} u_tbfOpMode;
+
+typedef struct {
+ t_chanState state;
+ Uint8 tfi;
+ Uint8 tbfMode;
+ Uint8 timeSlotAllocation;
+ Uint8 channelCodec;
+ Uint8 tai;
+ Uint8 taiTimeSlot;
+ Uint8 timingAdvance;
+ Uint8 msPower;
+ u_tbfOpMode opMode;
+ t_ULSignalStrength sigstren;
+ t_ULSignalQuality sigqual;
+ t_ULAccum accum;
+} ulTbfStruct;
+
+typedef struct {
+ t_chanState state;
+ Uint8 tfi;
+ Uint8 timeSlotAllocation;
+ Uint8 channelCodec;
+ Uint8 timingAdvance; /* TBD - put back in later ??? */
+ Uint8 msPower;
+ Uint8 bsPower;
+ Uint32 startTime;
+ t_PacketDownlinkAckNackInfo pktDlAckNack;
+} dlTbfStruct;
+
+typedef struct {
+ Uint32 TLLI;
+ ulTbfStruct ulTbf;
+ dlTbfStruct dlTbf;
+} tbfStruct;
+
+
+/*5.2.1.5.9 SACCH Channel Information
+The following data is associated with the sacch measurement reports.*/
+
+/* ********************************************************************************** */
+/* To get one SACCH burst takes 120ms (26 TDMA frames) */
+/* For Group I, this occurs on all 8 timeslots. */
+/* 1 SACCH frame = 4 SACCH bursts = 480 ms. */
+/* ********************************************************************************** */
+typedef struct {
+ t_chanState state;
+ Uint8 sysInfo;
+ t_DLSigBufs *dlSigBuf; /* Define downlink signaling buffers; no longer use t_MSHeader */
+ Int8 powerLevel; /* header that gets transmitted to the */
+ Int8 timingAdvance; /* header that gets transmitted to the */
+ Int8 powerLevelInit; /* header that gets transmitted to the */
+ Uint8 lostCount; /* SACCH consecutiveness to determine loss of RF link */
+
+ UShort bitErrorAccum; /* accumulation of bit errors on all bursts */
+ UShort bitCountAccum; /* accumulation of bits checked for bit errors */
+ Uint8 frameErrorAccum; /* accumulation of frame errors on non-DTX bursts */
+ Uint8 frameCountAccum; /* accumulation of frames checked for frame errors */
+ Int16 MSPowerAccum; /* accumulated uplink power (set to Sub or Full, see below) */
+ Int16 MSPowerAccumSub; /* uplink power on SACCH plus potential SID bursts */
+ Int16 MSPowerAccumFull; /* uplink power on all TCH bursts */
+ Int8 toaAccum; /* accumulation of time-of-arrival of all bursts */
+ Int8 toaAccumSub; /* accumulation of time-of-arrival of sub bursts */
+ Int8 toaLastGood; /* Last toa of a "good" quality burst */
+ Int8 toaLastGoodActual; /* Last actual toa of "good" quality */
+ Uint8 reportNum; /* Modulo 256 of the number of meas reports */
+ Uint8 noNCellM; /* NO-NCELL-M is the number of neighbouring cell measurments
+ * in the decoded UL sacch measurement report (gsm 04.08) */
+ Uint8 dynPwrRprtCntr; /* Counter for dyn. pwr control reports to host */
+
+ Uint16 IntRxLevAccum; /* RxLev accumulated value for measuring interference */
+ Uint16 IntRxLev; /* RxLev value averaged within the SACCH multiframe */
+
+ t_ULSignalStrength ulsigstren;
+ t_ULSignalQuality ulsigqual;
+ t_DLSignalStrengthSCell dlsigstrenSCell; /* Serving Cell */
+ t_DLSignalQualitySCell dlsigqualSCell;
+
+ Uint8 agcHoldFlag; /* used during period between CH_ACT and actual traffic flow per TS */
+ Uint8 dpcHoldFlag; /* used during period between CH_ACT and RACH demod/decode */
+ Uint8 averagingHoldCounter; /* does not allow 5.08 averaging until all samples are collected */
+} t_SACCHInfo;
+
+/*
+** t_groupNum defines the possible groups available in GSM.
+*/
+typedef enum {
+ GROUP_NULL = 0, /* No group is activated */
+ GSM_GROUP_1, /* GSM Group 1 */
+ GSM_GROUP_2, /* GSM Group 2 */
+ GSM_GROUP_3, /* GSM Group 3 */
+ GSM_GROUP_4, /* GSM Group 4 */
+ GSM_GROUP_5, /* GSM Group 5 */
+ GSM_GROUP_6, /* GSM Group 6 */
+ GSM_GROUP_7, /* GSM Group 7 */
+ GSM_GROUP_8, /* GSM Group 8 */
+ GSM_GROUP_9,
+ GSM_GROUP_10,
+ GSM_GROUP_11,
+ GSM_GROUP_12,
+ GSM_GROUP_13
+} t_groupNum;
+
+#define MAX_BCCH_TC_VALUE (8)
+#define MAX_NUM_ALLOCATIONS (2)
+
+typedef enum {
+ BCCH_NORM = 0,
+ BCCH_EXT = 1
+} t_BCCHAlloc;
+
+/*
+** Encryption structures
+*/
+
+#define ENCRYPT_KEY_LEN 2 /* Encryption key length in longwords */
+#define NUM_ENCRYPT_BITS 114 /* Per burst for one encryption stream */
+
+typedef enum {
+ ENCR_NORMAL = 0, /* Normal state, "algorithm" is running */
+ ENCR_CHANGE, /* "newAlgorithm" is running on UL only */
+ ENCR_PEND_CHANGE /* Change to "newAlgorithm" at next frame */
+} t_encryptMode;
+
+typedef enum {
+ ENCR_NONE = 0, /* No encryption */
+ ENCR_A51, /* GSM A5-1 */
+ ENCR_A52 /* GSM A5-2 */
+} t_encryptAlgorithm;
+
+typedef struct {
+ t_encryptAlgorithm algorithm; /* algorithm in use */
+ t_encryptAlgorithm newAlgorithm; /* algorithm in use next */
+ t_encryptMode encryptMode; /* Encryption state */
+ Uint32 encryptKey[ENCRYPT_KEY_LEN]; /* Encryption key */
+/* new 1/22/01..remove from this offchip structure and put back on-chip in another gsmdata.h buffer*/
+/* UChar ulEncryptStream[NUM_ENCRYPT_BITS]; */ /*To be applied to UL */
+} t_encryptState;
+
+
+/*5.2.1.6 Control Channel Information Structure
+This structure contains all of the channels assosiated with control.
+It is a pointer to enable the use of dynamic memory allocation "malloc" to
+configure the structure if needed. For instance, for group V,
+SDCCHInfo,BCCHInfo and PAGCHInfo would be allocated. For group I,
+they would not be allocated.
+*/
+
+typedef struct {
+ t_chanState state; /* Channel activation state */
+ t_DLSigBufs *dlSigBuf; /* Downlink signaling buffers */
+ UChar HOReference; /* Key used to match access burst content */
+ Bool HOFlag; /* Look for access burst (T) or normal (F) */
+ t_encryptState encryptState; /* All the parameters for encryption process */
+ UShort DLPower; /* Value for downlink dynamic power control */
+ UShort modPower; /* Value for modulator output power level */
+} t_SDCCHInfo;
+typedef struct {
+ Uint8 mode; /* TRAU or VoIP mode */
+ Uint8 *buf[3][40]; /* buffer declared external */
+} t_netInterface;
+
+#define MAX_NUM_NCELL_CANDIDATES 6
+
+typedef struct {
+ Uint8 size; /* if no candidates exist, size is 0 */
+ Int16 rxLev[MAX_NUM_NCELL_CANDIDATES]; /* scratchpad */
+ Uint8 hoReportCnt; /* enables HO msg reports AT LEAST 2 secs after last report to RRM */
+} t_hoCanBuf;
+
+typedef struct {
+ Uint16 rfCh; /* ARFCN value copied from g_HndOvrOAMInfo */
+ Uint8 oamIdx; /* mapped to ARFCN value in host SW */
+ Uint8 bsic; /* bsic value copied from g_HndOvrOAMInfo */
+ Int16 rxLev;
+ Uint8 candidate; /* Flag defaults to FALSE (=0) */
+} t_NCELLInfo; // list of allowable, adjacent Neighbor CELLs for handover
+
+#define HO_REPORT_COUNTER 8
+#define NXBUF_SIZ_MAX 32
+
+typedef struct {
+ Uint8 index; /* current index into memory for px-nx history, where passes are flaged */
+ Uint8 flag[NXBUF_SIZ_MAX]; /* actual size is parameterizable */
+ Uint8 flagsum; /* used for px-nx test */
+} t_nxBuf; /* circular buffers for px/nx tests for handover, power control */
+
+typedef struct {
+ t_nxBuf sigstrenHi;
+ t_nxBuf sigstrenLo;
+ t_nxBuf sigqualHi;
+ t_nxBuf sigqualLo;
+} t_dpcULbuf;
+
+typedef struct {
+ t_nxBuf sigstrenSCellHi; // Serving Cell
+ t_nxBuf sigstrenSCellLo;
+ t_nxBuf sigqualSCellHi;
+ t_nxBuf sigqualSCellLo;
+} t_dpcDLbuf;
+
+typedef struct {
+ t_nxBuf sigstren;
+ t_nxBuf sigqual;
+ t_nxBuf intsigstren;
+} t_hoULbuf;
+
+typedef struct {
+ t_nxBuf sigstrenSCell; // Serving Cell
+ t_nxBuf sigqualSCell;
+ t_nxBuf intsigstrenSCell;
+} t_hoDLbuf;
+
+typedef struct {
+ t_dpcULbuf dpcUL;
+ t_dpcDLbuf dpcDL;
+ t_hoULbuf hoUL;
+ t_hoDLbuf hoDL;
+} t_PNbufs;
+
+typedef struct {
+ t_chanState state; /* channel activation state */
+ Bool ULDtxMode; /* determine if uplink dtx is on or off */
+ Bool DLDtxMode; /* determine if downlink dtx is on or off */
+ Bool ulDtxUsed; /* indicates if uplink DTX is used currently*/
+ Bool ulDtxUsed104; /* whether UL DTX was used ever in 104-frame block*/
+ Bool dlDtxUsed; /* indicates if downlink DTX is used currently*/
+ Uint8 stolenSid; /* SID frames stolen by FACCH */
+ t_speechDataInd speechDataInd; /* indicates speech vs. data */
+ t_vocAlgo vocAlgo; /* vocoder in use for speechDataInd=IND_SPEECH */
+ t_transMode transMode; /* transparent vs non for speechDataInd=IND_DATA */
+ t_dataRate dataRate; /* radio data rate, may depend on transMode */
+ UChar HOReference; /* Key used to match access burst content */
+ Bool HOFlag; /* Look for access burst (T) or normal (F) */
+ t_encryptState encryptState; /* All parameters for encryption process */
+ Uint16 DLPower; /* Value for downlink dynamic power control */
+ Uint16 modPower; /* Value for modulator output power level */
+ /* the following are related to handover */
+ t_NCELLInfo NCell[MAX_NUM_NCELL_CANDIDATES]; /* Neighbor cell info for HO */
+ t_hoCanBuf hoCandidateBuf; /* Buffer to be sent back to layer 3 RRM */
+ t_PNbufs *PNbufs;
+} t_TCHInfo;
+
+#define NUM_TCH_JBUF 3
+
+typedef struct
+{
+ Uint32 buffer[NUM_TCH_JBUF][14];
+ Uint16 rtpSeqNum;
+ Int8 frameCount; /* Number of TCH messages to send */
+ Int8 readIndex; /* Next buffer to read by the asynch code */
+ Int8 writeIndex; /* Next buffer to write by the synch code */
+ Uint8 frameStarted; /* Indicates first fill-up after activation */
+ Uint8 tag[NUM_TCH_JBUF];
+ Uint8 burstType[NUM_TCH_JBUF];
+ Uint8 chCodec[NUM_TCH_JBUF];
+} dlTchFrameStruct, t_dlPdtchBufs;
+
+
+/*5.2.1.5.8 FACCH Channel Information*/
+
+typedef struct {
+ t_DLSigBufs *dlSigBuf; /* Define the downlink signaling buffers */
+} t_FACCHInfo;
+
+typedef struct {
+ t_sysInfoQueue *dlSigBuf; /* Define the downlink signaling buffers */
+} t_BCCHInfo;
+
+
+
+typedef struct {
+ t_CBCHQueue *dlSigBuf; /* Define the downlink signaling buffers */
+} t_CBCHInfo;
+
+typedef struct {
+ t_DLSigBufs *dlSigBuf; /* Define the downlink signaling buffers */
+} t_PACCHInfo;
+
+typedef struct {
+ t_DLSigBufs *dlSigBuf; /* Define the downlink signaling buffers */
+} t_PTCCHInfo;
+
+typedef struct {
+ t_dlPdtchBufs *dlSigBuf; /* Define the downlink signaling buffers */
+} t_PDTCHInfo;
+
+
+typedef struct {
+ /*
+ * point to sacch idle function table
+ * need to be initialized on frame synchronization time.
+ */
+ Uint32 dlIndex;
+ Uint32 ulIndex;
+ Uint32 *dlSachIdleFunc;
+ Uint32 *ulSachIdleFunc;
+
+ t_TCHInfo tch;
+ t_SACCHInfo sacch;
+ t_FACCHInfo facch;
+} t_groupIInfo;
+
+typedef struct {
+ t_BCCHInfo bcch;
+ Uint8 bcchBufIndex;
+
+ t_SCHInfo sch;
+
+ t_CBCHInfo cbch[2];
+ Uint8 dlSmscbTB; /*TB = (FN DIV 51)mod(8)*/
+ Bool cbchUsed; /* if it is SDCCH or CBCH */
+
+ t_SDCCHInfo sdcch[NUM_SDCCH_SUBCHANS];
+ Uint8 dlSdcchSubCh;
+
+ t_SACCHInfo sacch[NUM_SACCH_SUBCHANS];
+ Uint8 dlSacchSubCh;
+
+ Uint8 ppchOverflow;
+ Uint8 dlPpchSubCh;
+
+ Uint8 ulSdcchSubCh;
+ Uint8 ulSacchSubCh;
+} t_groupVInfo;
+
+
+
+typedef struct {
+ t_SDCCHInfo sdcch[NUM_SDCCH8_SUBCHANS];
+ Uint8 dlSdcchSubCh;
+ t_SACCHInfo sacch[NUM_SACCH8_SUBCHANS];
+ Uint8 dlSacchSubCh;
+ Uint8 ulSdcchSubCh;
+ Uint8 ulSacchSubCh;
+} t_groupVIIInfo;
+
+
+#define MAX_RADIO_BLOCKS 12
+
+/*
+* In the uplink Dsp processing, for all three cases below,
+* assume the block is set to RRB or DLA.
+*
+* 1. DL PDTCH, DL PACCH - unacknowledged mode - PACKET CONTROL ACK (MS->GP10 sent as access bursts)
+*
+* 2. DL PACCH block - acknowledged mode - PACKET CONTROL ACK (MS->GP10 sent as access bursts)
+* , otherwise sent as normal bursts.
+*
+* 3. DL PDTCH - acknowledged mode - PACKET DOWNLINK ACK/NACK (MS->GP10 sent as normal bursts)
+*
+*/
+
+
+typedef enum {
+ NONE = 0,
+ SBA, /* Uplink (Single Block) Assignment */
+ DLA, /* Downlink Assignment */
+ RRB_NB, /* Relative Reserved Block for NORMAL_BURST */
+ RRB_AB, /* Relative Reserved Block for ACCESS_BURST */
+ GRP13_AB_FOUND, /* Transition state from DLA to NONE */
+ LAST_CHANCE_4_AB_DET /* Transition state set (and cleared) on ulPdchProc3() */
+} t_tagFillCause;
+
+typedef struct {
+ tbfStruct *tbf;
+ Uint8 tag;
+ t_tagFillCause tagFillCause;
+}t_blkNumWatch;
+
+
+typedef struct{
+ Uint8 bsPBcchBlks; /* # of blocks for PBCCH (1-4) */
+ Uint8 bsPagBlksRes; /* # of blocks that are not PBCCH or Ppagch */
+ Uint8 bsPrachBlks; /* # if blocks that are reserved forthe PRACH */
+ Uint8 newAssignment; /* flag indicating a new assignment is pending */
+ Uint8 psi1_repeat;
+ unsigned short psi1_cycle; /* counter used to indicate a new PSI1 cycle */
+} t_group11_params;
+
+
+
+#define MAX_GPRS_PAGING 11
+
+
+/* Define a type for each of the uplink bursts */
+
+#define U_PRACH_T 0
+#define U_PACCH_T 1
+#define U_PDCH_T 2
+
+/* Define a type for each of the downlink bursts */
+
+#define D_PBCCH_T 3
+#define D_PACCH_T 4
+#define D_PDCH_T 5
+#define D_PPCH_T 6
+#define D_PAGCH_T 7
+
+
+typedef struct
+{
+ Uint8 currentUsf;
+ Uint8 nextUsf;
+ Uint8 dlBlock; /* B0 - B11 of 52 multi frame */
+ Uint8 ulBlock; /* B0 - B11 of 52 multi frame */
+ Uint8 currentTAI; /* TAI in use */
+ t_blkNumWatch blkNumWatch[MAX_RADIO_BLOCKS];
+ /* block number (B0-B11) is derived from FN1,
+ * the calculated startTime with possible
+ * added delay */
+ tbfStruct *tbf;
+ t_PACCHInfo pacch;
+ t_PDTCHInfo pdtch;
+ Uint8 dlPtcchIdleIndex;
+ Uint8 ulPtcchIdleIndex;
+ Uint8 pbcchBufIndex;
+ t_BCCHInfo pbcch;
+ t_PTCCHInfo ptcch;
+ Uint8 ppchOverflow;
+ Uint8 dlPpchSubCh;
+} t_groupXIInfo;
+
+typedef struct {
+ Uint8 currentUsf;
+ Uint8 nextUsf;
+ Uint8 dlBlock; /* B0 - B11 of 52 multi frame */
+ Uint8 ulBlock; /* B0 - B11 of 52 multi frame */
+ Uint8 currentTAI; /* TAI in use */
+
+
+ t_blkNumWatch blkNumWatch[MAX_RADIO_BLOCKS]; /* block number (B0-B11) is derived from FN1,
+ * the calculated startTime with possible
+ * added delay
+ */
+ tbfStruct *tbf;
+
+ t_PACCHInfo pacch;
+ t_PDTCHInfo pdtch;
+
+ Uint8 dlPtcchIdleIndex;
+ Uint8 ulPtcchIdleIndex;
+ t_PTCCHInfo ptcch;
+
+} t_groupXIIIInfo;
+
+typedef struct {
+ Uint8 currentUsf;
+ Uint8 dlBlock; /* B0 - B11 of 52 multi frame */
+ Uint8 ulBlock; /* B0 - B11 of 52 multi frame */
+ Uint8 currentTAI; /* TAI in use */
+
+ tbfStruct *tbf;
+
+ t_PACCHInfo pacch;
+ Uint8 dlPtcchIdleIndex;
+ Uint8 ulPtcchIdleIndex;
+ t_PTCCHInfo ptcch;
+ t_PDTCHInfo pdtch;
+} t_groupXIIInfo;
+
+typedef struct {
+ t_BCCHInfo bcch;
+ t_SDCCHInfo sdcch;
+ t_SACCHInfo sacch;
+}t_groupIVInfo;
+
+typedef struct {
+ Long I;
+ Long Q;
+} t_LongComplexSamp;
+
+typedef struct {
+ Short I;
+ Short Q;
+} t_DLComplexSamp;
+
+typedef struct {
+ Short I;
+ Short Q;
+} t_ULComplexSamp;
+
+#define NUM_RTS_BUFS 2
+
+typedef struct {
+ Uint8 TN; /* time slot */
+ Uint8 chanSel; /* logical channel type */
+ Uint8 subCh; /* subchannel number */
+} rtsInfoStruc;
+
+typedef struct {
+ rtsInfoStruc data[NUM_RTS_BUFS];
+ Uint8 bufRdIndex; /* Indicates buffer to transmit from */
+ Uint8 bufWrIndex;
+ Uint8 numMsgsReady; /* Number of pending messages to read */
+ Bool overflow; /* Set to TRUE is buffer has been overloaded*/
+ t_GsmFrameNum frameNum;
+} t_rtsStruc;
+
+typedef struct {
+ t_groupNum groupNum; /* Group that this timeslot is running */
+ /*
+ * Pointer to the UL BB processing selects,
+ * has to be initialized on Time Slot configuration
+ */
+ Uint32 *groupULTable;
+
+ /*
+ * Pointer to the DL BB processing selects,
+ * has to be initialized on Time Slot configuration
+ */
+ Uint32 *groupDLTable;
+
+ /*
+ * length of the Group Table, has to be initialized on Time Slot configuration
+ */
+ Uint8 tblLength;
+
+ /*
+ * index to the UL BB processing function table,
+ * has to be initialized on Time Slot configuration
+ * and at GSM frame sync time.
+ */
+ Uint8 ulTblIndex;
+
+ /*
+ * index to the DL BB processing function table,
+ * has to be initialized on Time Slot configuration
+ * and at GSM frame sync time.
+ */
+ Uint8 dlTblIndex;
+
+ Uint8 tsNumber;
+ Uint8 tsConfig;
+ union
+ {
+ t_groupIInfo group1;
+ t_groupIVInfo group4;
+ t_groupVInfo group5;
+ t_groupVIIInfo group7;
+ t_groupXIInfo group11;
+ t_groupXIIInfo group12;
+ t_groupXIIIInfo group13;
+ } u;
+
+ UShort dynamicPower; /* BTS TX dynamic power level */
+
+ /* These are related to the timeslot, not subchannel, because
+ ** other processes (AGC calc, SNR of access burst) do not have
+ ** subchannels associated with them.
+ */
+ Int16 ULPower; /* received power level of present burst */
+ Int16 snr; /* demod SNR of present burst */
+ Int16 toa; /* time-of-arrival of present burst */
+} t_TNInfo;
+
+typedef struct {
+ Uint8 offset; /* a random frame offset for RF Carrier */
+
+ Uint8 g1TableLen;
+ Uint8 dlG1Index;
+
+ Uint8 ulG1Index;
+
+ Uint8 g5TableLen;
+ Uint8 dlG5Index;
+ Uint8 dlG5SacchSubCh;
+ Uint8 dlG5SdcchSubCh;
+ Uint8 dlG5PagchSubCh;
+
+ Uint8 ulG5Index;
+ Uint8 ulG5SacchSubCh;
+ Uint8 ulG5SdcchSubCh;
+} t_frameProcIndex;
+
+typedef struct
+{
+ t_frameProcIndex frame;
+
+ UShort staticPower; /* BTS TX static power level */
+ UChar tseqNum; /* training sequence number */
+ Uchar ais;
+ UChar bsic; /* Base Station Identity Code */
+ /* MSB LSB */
+ /* 0 0 b0 b1 b2 b3 b4 b5 */
+ /* PLMN BS */
+
+ UChar RTSOffset; /* Defines the number of frames that the RTS will
+ /* look ahead for the RTS indication (frameBoundary) */
+ Bool RTSFlag; /* Indiactes that at least on TS has a RTS pending */
+
+ Int8 ulBurst;
+ Int8 dlBurst;
+
+ t_DLComplexSamp *dlBBSmpl; /* pointer to a downlink burst buffer */
+ t_ULComplexSamp *ulBBSmpl; /* pointer to a uplink burst buffer */
+
+ UChar BSPaMfrms; /* Paging scheduling parameter defined by msg (default 2) */
+ t_TNInfo TNInfo[NUM_TN_PER_RF];
+
+ /* Data members below are used by the hopping sequence algorithm */
+ Int16 MA[64+1];/* Mobile Allocation vector MA[N], 1<= N <= 64, N=0 is unused */
+ /* N = total number of frequencies allocated to a mobile */
+ Int8 MAIO; /* MA Index Offset, scalar, from L3 (host) via TRX_CONFIG */
+ Int8 HSN; /* Hopping Seq Num, scalar, from L3 (host) via TRX_CONFIG */
+ Uint8 MAI; /* Mobile Allocation Index (into MA), scalar, calculated */
+ Uint8 N; /* Number of allocated frequencies, scalar, via TRX_CONFIG_MA */
+ Uint8 NBIN; /* Number of bits to represent N, NBIN =integer(log2(N)+1) */
+ Uint8 hopFlag; /* 0=non-hopping, 1=cyclic, 2=random. Set by TUNE_SYNTH trx msg */
+ Uint8 IQSwap; /* indicates whether I-Q Samples from radio board need to be swapped or not */
+} t_BBInfo;
+
+typedef struct {
+ Uint8 rfCh;
+ Uint8 dlTN;
+ Uint8 ulTN;
+} burstProcStruc;
+
+typedef struct {
+ Uint32 buffer[10];
+ Int8 frameCount;
+} dlSidFrameStruct;
+
+#endif /* end of include once only */
diff --git a/data/mnet/GP10/Dsp/include/intr.h b/data/mnet/GP10/Dsp/include/intr.h
new file mode 100644
index 0000000..ac50b22
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/intr.h
@@ -0,0 +1,277 @@
+/******************************************************************************/
+/* INTR.H - TMS320C6x Peripheral Support Library Interrupt Support */
+/* */
+/* This file provides the header for the DSP's interrupt support. */
+/* */
+/* MACRO FUNCTIONS: */
+/* INTR_GLOBAL_ENABLE() - Enable global interrupts (GIE) */
+/* INTR_GLOBAL_DISABLE()- Disable global interrupts (GIE) */
+/* INTR_ENABLE() - Enable interrupt (set bit in IER) */
+/* INTR_DISABLE() - Disable interrupt (clear bit in IER) */
+/* INTR_CHECK_FLAG() - Check interrupt bit in IFR */
+/* INTR_SET_FLAG() - Set interrupt by writing to ISR bit */
+/* INTR_CLR_FLAG() - Clear interrupt by writing to ICR bit */
+/* INTR_SET_MAP() - Map CPU interrupt to interrupt selector */
+/* INTR_GET_ISN() - Get ISN of selected interrupt */
+/* INTR_MAP_RESET() - Reset interrupt multiplexor map to defaults */
+/* INTR_EXT_POLARITY() - Assign external interrupt's polarity */
+/* */
+/* FUNCTIONS: */
+/* intr_reset() - Reset interrupt registers to default values */
+/* intr_init() - Interrupt initialization */
+/* intr_isn() - Assign ISN to CPU interrupt */
+/* intr_get_cpu_intr() - Return CPU interrupt assigned to ISN */
+/* intr_map() - Place ISN in interrupt multiplexor register */
+/* */
+/******************************************************************************/
+#ifndef _INTR_H_
+#define _INTR_H_
+
+#ifdef _INLINE
+#define __INLINE static inline
+#else
+#define __INLINE
+#endif
+
+/*----------------------------------------------------------------------------*/
+/* INCLUDES */
+/*----------------------------------------------------------------------------*/
+#include "regs.h"
+
+/*----------------------------------------------------------------------------*/
+/* DEFINES AND MACROS */
+/*----------------------------------------------------------------------------*/
+
+/******************************************************************************/
+/********************** INTERRUPT SELECTOR REGISTERS **************************/
+#define INTR_MULTIPLEX_HIGH_ADDR 0x019C0000
+#define INTR_MULTIPLEX_LOW_ADDR 0x019C0004
+#define EXTERNAL_INTR_POL_ADDR 0x019C0008
+
+#define INTSEL4 0
+#define INTSEL_SZ 4
+#define INTSEL5 5
+#define INTSEL6 10
+#define INTSEL7 16
+#define INTSEL8 21
+#define INTSEL9 26
+#define INTSEL10 0
+#define INTSEL11 5
+#define INTSEL12 10
+#define INTSEL13 16
+#define INTSEL14 21
+#define INTSEL15 26
+
+/* External Interrupt Polarity Register */
+
+#define XIP4 0
+#define XIP5 1
+#define XIP6 2
+#define XIP7 3
+
+/* CPU Interrupt Numbers */
+
+#define CPU_INT_RST 0x00
+#define CPU_INT_NMI 0x01
+#define CPU_INT_RSV1 0x02
+#define CPU_INT_RSV2 0x03
+#define CPU_INT4 0x04
+#define CPU_INT5 0x05
+#define CPU_INT6 0x06
+#define CPU_INT7 0x07
+#define CPU_INT8 0x08
+#define CPU_INT9 0x09
+#define CPU_INT10 0x0A
+#define CPU_INT11 0x0B
+#define CPU_INT12 0x0C
+#define CPU_INT13 0x0D
+#define CPU_INT14 0x0E
+#define CPU_INT15 0x0F
+
+/* Interrupt Selection Numbers */
+
+#define ISN_DSPINT 0x00
+#define ISN_TINT0 0x01
+#define ISN_TINT1 0x02
+#define ISN_SD_INT 0x03
+#define ISN_EXT_INT4 0x04
+#define ISN_EXT_INT5 0x05
+#define ISN_EXT_INT6 0x06
+#define ISN_EXT_INT7 0x07
+#define ISN_DMA_INT0 0x08
+#define ISN_DMA_INT1 0x09
+#define ISN_DMA_INT2 0x0A
+#define ISN_DMA_INT3 0x0B
+#define ISN_XINT0 0x0C
+#define ISN_RINT0 0x0D
+#define ISN_XINT1 0x0E
+#define ISN_RINT1 0x0F
+
+#define IML_SEL 0x00 /* Interrupt Multiplexor Low Select */
+#define IMH_SEL 0x01 /* Interrupt Multiplexor High Select */
+#define IML_RESET_VAL 0x250718A4
+#define IMH_RESET_VAL 0x08202D4B
+
+/*----------------------------------------------------------------------------*/
+/* MACRO FUNCTIONS */
+/*----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------*/
+/* INTR_GLOBAL_ENABLE - enables all masked interrupts by setting GIE in CSR */
+/*----------------------------------------------------------------------------*/
+#define INTR_GLOBAL_ENABLE() \
+ SET_REG_BIT(CSR, GIE)
+
+/*----------------------------------------------------------------------------*/
+/* INTR_GLOBAL_DISABLE - disables all masked interrupts by clearing GIE in CSR*/
+/*----------------------------------------------------------------------------*/
+#define INTR_GLOBAL_DISABLE() \
+ RESET_REG_BIT(CSR, GIE)
+
+/*----------------------------------------------------------------------------*/
+/* INTR_GLOBAL_CHECK - checks global interrupt state by returning GIE in CSR */
+/*----------------------------------------------------------------------------*/
+#define INTR_GLOBAL_CHECK() \
+ (CSR & MASK_BIT(GIE) ? 1 : 0)
+
+/*----------------------------------------------------------------------------*/
+/* INTR_ENABLE - enable interrupt by setting flag in IER */
+/*----------------------------------------------------------------------------*/
+#define INTR_ENABLE(bit) \
+ SET_REG_BIT(IER,bit)
+
+/*----------------------------------------------------------------------------*/
+/* INTR_DISABLE - disable interrupt by clearing flag in IER */
+/*----------------------------------------------------------------------------*/
+#define INTR_DISABLE(bit) \
+ RESET_REG_BIT(IER,bit)
+
+/*----------------------------------------------------------------------------*/
+/* INTR_CHECK_FLAG - checks status of indicated interrupt bit in IFR */
+/*----------------------------------------------------------------------------*/
+#define INTR_CHECK_FLAG(bit) \
+ (IFR & MASK_BIT(bit) ? 1 : 0)
+
+/*----------------------------------------------------------------------------*/
+/* INTR_SET_FLAG - manually sets indicated interrupt by writing to ISR */
+/*----------------------------------------------------------------------------*/
+#define INTR_SET_FLAG(bit) \
+ (ISR |= MASK_BIT(bit))
+
+/*----------------------------------------------------------------------------*/
+/* INTR_CLR_FLAG - manually clears indicated interrupt by writing 1 to ICR */
+/*----------------------------------------------------------------------------*/
+#define INTR_CLR_FLAG(bit) \
+ (ICR |= MASK_BIT(bit))
+
+/*----------------------------------------------------------------------------*/
+/* INTR_SET_MAP - maps a CPU interrupt specified by intr to the interrupt src*/
+/* specified by val. Sel is used to select between the low and */
+/* high interrupt_multiplexor registers. */
+/*----------------------------------------------------------------------------*/
+#define INTR_SET_MAP(intsel,val,sel) \
+ (sel ? LOAD_FIELD(INTR_MULTIPLEX_HIGH_ADDR,val,intsel,INTSEL_SZ) : \
+ LOAD_FIELD(INTR_MULTIPLEX_LOW_ADDR, val,intsel,INTSEL_SZ ))
+
+/*----------------------------------------------------------------------------*/
+/* INTR_GET_ISN - returns the ISN value in the selected Interrupt Multiplexor */
+/* register for the interrupt selected by intsel */
+/*----------------------------------------------------------------------------*/
+#define INTR_GET_ISN(intsel,sel) \
+ (sel ? GET_FIELD(INTR_MULTIPLEX_HIGH_ADDR,intsel,INTSEL_SZ) : \
+ GET_FIELD(INTR_MULTIPLEX_LOW_ADDR, intsel, INTSEL_SZ))
+
+/*----------------------------------------------------------------------------*/
+/* INTR_MAP_RESET - resets the interrupt multiplexor maps to their default val*/
+/*----------------------------------------------------------------------------*/
+#define INTR_MAP_RESET() \
+ {CONTENTS_OF(INTR_MULTIPLEX_HIGH_ADDR) = IMH_RESET_VAL; \
+ CONTENTS_OF(INTR_MULTIPLEX_LOW_ADDR) = IML_RESET_VAL; }
+
+/*----------------------------------------------------------------------------*/
+/* INTR_EXT_POLARITY - assigns external interrupt external priority. */
+/* val = 0 (normal), val = 1 (inverted) */
+/*----------------------------------------------------------------------------*/
+#define INTR_EXT_POLARITY(bit,val) \
+ (val ? SET_BIT(EXTERNAL_INTR_POL_ADDR,bit) : \
+ CLEAR_BIT(EXTERNAL_INTR_POL_ADDR,bit))
+
+
+/*----------------------------------------------------------------------------*/
+/* GLOBAL VARIABLES */
+/*----------------------------------------------------------------------------*/
+extern unsigned int istb;
+
+/*----------------------------------------------------------------------------*/
+/* FUNCTIONS */
+/*----------------------------------------------------------------------------*/
+extern void interrupt c_int00(void);
+
+void intr_reset(void);
+void intr_init(void);
+void intr_hook(void (*fp)(void),int intr_num);
+
+__INLINE void intr_map(int cpu_intr,int isn);
+__INLINE int intr_isn(int cpu_intr);
+__INLINE int intr_get_cpu_intr(int isn);
+
+
+#ifdef _INLINE
+/* intr_map() - Place isn value in Interrupt Multiplexer Register in INTSEL */
+/* field indicated by cpu_intr. */
+
+static inline void intr_map(int cpu_intr,int isn)
+{
+ int intsel;
+ int sel;
+
+ if (cpu_intr > CPU_INT9)
+ sel=1;
+ else
+ sel= 0;
+
+ intsel= ((cpu_intr - CPU_INT4) * INTSEL_SZ) - (sel * 30);
+ if (intsel > INTSEL6)
+ intsel++;
+
+ INTR_SET_MAP(intsel,isn,sel);
+}
+
+
+/* intr_isn() - return isn in interrupt selector corresponding to cpu_intr */
+static inline int intr_isn(int cpu_intr)
+{
+
+ int intsel;
+ int sel;
+
+ if (cpu_intr > CPU_INT9)
+ sel= 1;
+ else
+ sel= 0;
+
+ intsel= ((cpu_intr - CPU_INT4) * INTSEL_SZ) - (sel * 30);
+ if (intsel > INTSEL6)
+ intsel++;
+
+ return(INTR_GET_ISN(intsel,sel));
+}
+
+/* intr_get_cpu_intr() - return cpu interrupt corresponding to isn in */
+/* interrupt selecter register. If the isn is not */
+/* mapped, return -1 */
+static inline int intr_get_cpu_intr(int isn)
+{
+ int i;
+ for (i= CPU_INT4;i<=CPU_INT15;i++)
+ {
+ if (intr_get_isn(i) == isn)
+ return(i);
+ }
+ return(-1);
+}
+
+#endif /* _INLINE */
+
+#undef __INLINE
+#endif /* _INTR_H_ */
diff --git a/data/mnet/GP10/Dsp/include/l1config.h b/data/mnet/GP10/Dsp/include/l1config.h
new file mode 100644
index 0000000..dad8c63
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/l1config.h
@@ -0,0 +1,37 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+** Filename: l1config.h
+**
+** Target Platform:
+** TMS320C6201
+**
+** Description:
+** This file contains L1 defaule configuration values
+**
+****************************************************************************/
+
+#define RF_LINK_LOST_THRESHOLD 12 /* Lost SACCH Frame threshold for Radio link loss */
+
+#define RCV_AGC_DYNAMIC_RANGE 60 /* Current Radio Board DYMANIC_RANGE is 30 dB */
+
+#define TOA_DETECTION_MAX 4 /* maximum TOA for a Valid RACH detection */
+
+
+#define RACH_BIT_ERROR_MAX 5 /* maximum BIT ERROR for a Valid RACH detection */
+
+
+#define SNR_RAW_MININUM 6 /* mininum raw snr for a Valid RACH detection */
+
+
+#define MIN_RCV_POWER (SNR_RAW_MININUM - RCV_AGC_DYNAMIC_RANGE)
+
+/* MAX_RCV_POWER is not dependent upon R47's presence or absence on the radio board */
+#define MAX_RCV_POWER 0
+
+#define NUM_RX_SIGNAL_SAMPLES 8
+
+#define DBM_2_RXLEV_CONV_FACTOR 110 /* subtract 110 from dBm to get RXLEV */
+#define RXLEV_2_DBM_CONV_FACTOR -110 /* converse operation */
diff --git a/data/mnet/GP10/Dsp/include/makefile b/data/mnet/GP10/Dsp/include/makefile
new file mode 100644
index 0000000..9fa1cd8
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/makefile
@@ -0,0 +1 @@
+# blank
diff --git a/data/mnet/GP10/Dsp/include/mcbsp.h b/data/mnet/GP10/Dsp/include/mcbsp.h
new file mode 100644
index 0000000..30b2f26
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/mcbsp.h
@@ -0,0 +1,547 @@
+/******************************************************************************/
+/* MCBSP.H - TMS320C6x Peripheral Support Library McBSP Support */
+/* */
+/* This file provides the header for the DSP's McBSP support. */
+/* */
+/* MACRO FUNCTIONS: */
+/* MCBSP_BYTES_PER_WORD() - Return bytes required for word length */
+/* MCBSP_ENABLE() - Enables McBSP transit, receive or both */
+/* MCBSP_TX_RESET() - Reset McBSP transmitter */
+/* MCBSP_RX_RESET() - Reset McBSP receiver */
+/* MCBSP_READ() - Read data value from McBSP receive register */
+/* MCBSP_WRITE() - Write data value to McBSP transmit register */
+/* MCBSP_IO_ENABLE() - Place McBSP in general-purpose I/O mode */
+/* MCBSP_IO_DISABLE() - Remove McBSP from general-purpose I/O mode */
+/* MCBSP_FRAME_SYNC_ENABLE()- Enables McBSP frame sync generation logic */
+/* MCBSP_FRAME_SYNC_RESET() - Resets McBSP frame sync generation logic */
+/* MCBSP_SAMPLE_RATE_ENABLE()-Enables McBSP sample rate generator */
+/* MCBSP_SAMPLE_RATE_RESET()- Resets McBSP sample rate generator */
+/* MCBSP_RRDY() - Returns McBSP receiver ready status */
+/* MCBSP_XRDY() - Returns McBSP transmitter ready status */
+/* MCBSP_LOOPBACK_ENABLE()- Configures McBSP in digital loopback mode */
+/* MCBSP_LOOPBACK_DISABLE()-Disables McBSP digital loopback mode */
+/* */
+/* FUNCTIONS: */
+/* mcbsp_init() - Initializes McBSP registers */
+/* */
+/* GLOBAL VARIABLES */
+/* */
+/* REVISION HISTORY: */
+/* */
+/* DATE DESCRIPTION */
+/* ------- -------------------------------------------------------------- */
+/* 13JUL98 Changed CLKSTP definition from 10 to 11. */
+/* Changed CLKSTP_SZ definition from 3 to 2. */
+/* -----> Fixed problem associated with typo in previous */
+/* Peripheral Reference Guide */
+/* */
+/* 15JUN98 Changed McBSP address macros to use "port_no" instead of "port" */
+/* parameter for consistency with documentation and other code. */
+/* -----> No functional change. */
+/* */
+/* 11MAY98 Added #define CLK_MODE_CLKS 0x00 */
+/* and #define CLK_MODE_CPU 0x01 */
+/* -----> Used in programming SRGR */
+/* */
+/* 11MAY98 Redefined CLKS_POL_FALLING to 0x01 */
+/* and CLKS_POL_RISING to 0x00 */
+/* -----> Assignments were swapped */
+/* */
+/******************************************************************************/
+
+#ifndef _MCBSP_H_
+#define _MCBSP_H_
+
+#ifdef _INLINE
+#define __INLINE static inline
+#else
+#define __INLINE
+#endif
+
+/*----------------------------------------------------------------------------*/
+/* INCLUDES */
+/*----------------------------------------------------------------------------*/
+#include "regs.h"
+
+/*----------------------------------------------------------------------------*/
+/* DEFINES AND MACROS */
+/*----------------------------------------------------------------------------*/
+/******************************************************************************/
+/****************************** MCSP REGISTERS ********************************/
+
+/* Multi-Channel Buffered Serial Port Control Registers & Bits */
+#define MCBSP_ADDR(port_no) (0x018C0000 + ((port_no) * 0x40000))
+#define MCBSP_DRR_ADDR(port_no) (MCBSP_ADDR(port_no))
+#define MCBSP_DXR_ADDR(port_no) ((MCBSP_ADDR(port_no)) + 0x04)
+#define MCBSP_SPCR_ADDR(port_no) ((MCBSP_ADDR(port_no)) + 0x08)
+
+#define MCBSP_RCR_ADDR(port_no) ((MCBSP_ADDR(port_no)) + 0x0c)
+#define MCBSP_XCR_ADDR(port_no) ((MCBSP_ADDR(port_no)) + 0x10)
+#define MCBSP_SRGR_ADDR(port_no) ((MCBSP_ADDR(port_no)) + 0x14)
+#define MCBSP_MCR_ADDR(port_no) ((MCBSP_ADDR(port_no)) + 0x18)
+#define MCBSP_RCER_ADDR(port_no) ((MCBSP_ADDR(port_no)) + 0x1c)
+#define MCBSP_XCER_ADDR(port_no) ((MCBSP_ADDR(port_no)) + 0x20)
+#define MCBSP_PCR_ADDR(port_no) ((MCBSP_ADDR(port_no)) + 0x24)
+
+#define MCBSP0_DRR *(volatile unsigned int *)(MCBSP_DRR_ADDR(0))
+#define MCBSP0_DXR *(volatile unsigned int *)(MCBSP_DXR_ADDR(0))
+#define MCBSP0_SPCR *(volatile unsigned int *)(MCBSP_SPCR_ADDR(0))
+#define MCBSP0_RCR *(volatile unsigned int *)(MCBSP_RCR_ADDR(0))
+#define MCBSP0_XCR *(volatile unsigned int *)(MCBSP_XCR_ADDR(0))
+#define MCBSP0_SRGR *(volatile unsigned int *)(MCBSP_SRGR_ADDR(0))
+#define MCBSP0_MCR *(volatile unsigned int *)(MCBSP_MCR_ADDR(0))
+#define MCBSP0_RCER *(volatile unsigned int *)(MCBSP_RCER_ADDR(0))
+#define MCBSP0_XCER *(volatile unsigned int *)(MCBSP_XCER_ADDR(0))
+#define MCBSP0_PCR *(volatile unsigned int *)(MCBSP_PCR_ADDR(0))
+
+#define MCBSP1_DRR *(volatile unsigned int *)(MCBSP_DRR_ADDR(1))
+#define MCBSP1_DXR *(volatile unsigned int *)(MCBSP_DXR_ADDR(1))
+#define MCBSP1_SPCR *(volatile unsigned int *)(MCBSP_SPCR_ADDR(1))
+#define MCBSP1_RCR *(volatile unsigned int *)(MCBSP_RCR_ADDR(1))
+#define MCBSP1_XCR *(volatile unsigned int *)(MCBSP_XCR_ADDR(1))
+#define MCBSP1_SRGR *(volatile unsigned int *)(MCBSP_SRGR_ADDR(1))
+#define MCBSP1_MCR *(volatile unsigned int *)(MCBSP_MCR_ADDR(1))
+#define MCBSP1_RCER *(volatile unsigned int *)(MCBSP_RCER_ADDR(1))
+#define MCBSP1_XCER *(volatile unsigned int *)(MCBSP_XCER_ADDR(1))
+#define MCBSP1_PCR *(volatile unsigned int *)(MCBSP_PCR_ADDR(1))
+
+/* Multi-channel Serial Port Control Register Bits */
+#define RRST 0
+#define RRDY 1
+#define RFULL 2
+#define RSYNC_ERR 3
+#define RINTM 4
+#define RINTM_SZ 2
+#define CLKSTP 11
+#define CLKSTP_SZ 2
+#define RJUST 13
+#define RJUST_SZ 2
+#define DLB 15
+#define XRST 16
+#define XRDY 17
+#define XEMPTY 18
+#define XSYNC_ERR 19
+#define XINTM 20
+#define XINTM_SZ 2
+#define GRST 22
+#define FRST 23
+
+/* Multi-channel Serial Port Pin Control Reg Bits */
+#define CLKRP 0
+#define CLKXP 1
+#define FSRP 2
+#define FSXP 3
+#define DR_STAT 4
+#define DX_STAT 5
+#define CLKS_STAT 6
+#define CLKRM 8
+#define CLKXM 9
+#define FSRM 10
+#define FSXM 11
+#define RIOEN 12
+#define XIOEN 13
+
+
+/* Multi-channel Serial Port RX & TX Ctrl Reg Bits */
+#define RWDLEN1 5
+#define RWDLEN1_SZ 3
+
+#define RFRLEN1 8
+#define RFRLEN1_SZ 7
+
+#define RDATDLY 16
+#define RDATDLY_SZ 2
+
+#define RFIG 18
+
+#define RCOMPAND 19
+#define RCOMPAND_SZ 2
+
+#define RWDLEN2 21
+#define RWDLEN2_SZ 3
+
+#define RFRLEN2 24
+#define RFRLEN2_SZ 7
+
+#define RPHASE 31
+
+#define XWDLEN1 5
+#define XWDLEN1_SZ 3
+
+#define XFRLEN1 8
+#define XFRLEN1_SZ 7
+
+#define XDATDLY 16
+#define XDATDLY_SZ 2
+
+#define XFIG 18
+
+#define XCOMPAND 19
+#define XCOMPAND_SZ 2
+
+#define XWDLEN2 21
+#define XWDLEN2_SZ 3
+
+#define XFRLEN2 24
+#define XFRLEN2_SZ 7
+
+#define XPHASE 31
+
+/* Multi-channel Serial Port Sample Rate Gen Reg Bits */
+#define CLKGDV 0
+#define CLKGDV_SZ 8
+
+#define FWID 8
+#define FWID_SZ 8
+
+#define FPER 16
+#define FPER_SZ 12
+
+#define FSGM 28
+
+#define CLKSM 29
+
+#define CLKSP 30
+
+#define GSYNC 31
+
+/* Multi-channel Serial Port Multi-Chan Ctrl Reg Bits */
+#define RMCM 0
+
+#define RCBLK 2
+#define RCBLK_SZ 3
+
+#define RPABLK 5
+#define RPABLK_SZ 2
+
+#define RPBBLK 7
+#define RPBBLK_SZ 2
+
+#define XMCM 16
+#define XMCM_SZ 2
+
+#define XCBLK 18
+#define XCBLK_SZ 3
+
+#define XPABLK 21
+#define XPABLK_SZ 2
+
+#define XPBBLK 23
+#define XPBBLK_SZ 2
+
+/* Multi-channel Serial Port Rec Enable Register Bits */
+
+#define RCEA0 0
+#define RCEA1 1
+#define RCEA2 2
+#define RCEA3 3
+#define RCEA4 4
+#define RCEA5 5
+#define RCEA6 6
+#define RCEA7 7
+#define RCEA8 8
+#define RCEA9 9
+#define RCEA10 10
+#define RCEA11 11
+#define RCEA12 12
+#define RCEA13 13
+#define RCEA14 14
+#define RCEA15 15
+
+#define RCEB0 16
+#define RCEB1 17
+#define RCEB2 18
+#define RCEB3 19
+#define RCEB4 20
+#define RCEB5 21
+#define RCEB6 22
+#define RCEB7 23
+#define RCEB8 24
+#define RCEB9 25
+#define RCEB10 26
+#define RCEB11 27
+#define RCEB12 28
+#define RCEB13 29
+#define RCEB14 30
+#define RCEB15 31
+
+/* Multi-channel Serial Port TX Enable Register Bits */
+#define XCEA0 0
+#define XCEA1 1
+#define XCEA2 2
+#define XCEA3 3
+#define XCEA4 4
+#define XCEA5 5
+#define XCEA6 6
+#define XCEA7 7
+#define XCEA8 8
+#define XCEA9 9
+#define XCEA10 10
+#define XCEA11 11
+#define XCEA12 12
+#define XCEA13 13
+#define XCEA14 14
+#define XCEA15 15
+
+#define XCEB0 16
+#define XCEB1 17
+#define XCEB2 18
+#define XCEB3 19
+#define XCEB4 20
+#define XCEB5 21
+#define XCEB6 22
+#define XCEB7 23
+#define XCEB8 24
+#define XCEB9 25
+#define XCEB10 26
+#define XCEB11 27
+#define XCEB12 28
+#define XCEB13 29
+#define XCEB14 30
+#define XCEB15 31
+
+#define MCBSP_RX 1
+#define MCBSP_TX 2
+#define MCBSP_BOTH 3
+
+/* CONFIGURATION REGISTER BIT and BITFIELD values */
+/* Serial Port Control Register SPCR */
+
+#define INTM_RDY 0x00 /* R/X INT driven by R/X RDY */
+#define INTM_BLOCK 0x01 /* R/X INT driven by new multichannel blk*/
+#define INTM_FRAME 0x02 /* R/X INT driven by new frame sync */
+#define INTM_SYNCERR 0x03 /* R/X INT generated by R/X SYNCERR */
+
+#define DLB_ENABLE 0x01 /* Enable Digital Loopback Mode */
+#define DLB_DISABLE 0x00 /* Disable Digital Loopback Mode */
+
+#define RXJUST_RJZF 0x00 /* Receive Right Justify Zero Fill */
+#define RXJUST_RJSE 0x01 /* Receive Right Justify Sign Extend */
+#define RXJUST_LJZF 0x02 /* Receive Left Justify Zero Fill */
+
+/* Pin Control Register PCR */
+
+#define CLKR_POL_RISING 0x01 /* R Data Sampled on Rising Edge of CLKR */
+#define CLKR_POL_FALLING 0x00 /* R Data Sampled on Falling Edge of CLKR*/
+#define CLKX_POL_RISING 0x00 /* X Data Sent on Rising Edge of CLKX */
+#define CLKX_POL_FALLING 0x01 /* X Data Sent on Falling Edge of CLKX */
+#define FSYNC_POL_HIGH 0x00 /* Frame Sync Pulse Active High */
+#define FSYNC_POL_LOW 0x01 /* Frame Sync Pulse Active Low */
+
+#define CLK_MODE_EXT 0x00 /* Clock derived from external source */
+#define CLK_MODE_INT 0x01 /* Clock derived from internal source */
+
+#define FSYNC_MODE_EXT 0x00 /* Frame Sync derived from external src */
+#define FSYNC_MODE_INT 0x01 /* Frame Sync dervived from internal src */
+
+/* Transmit Receive Control Register XCR/RCR */
+
+#define SINGLE_PHASE 0x00 /* Selects single phase frames */
+#define DUAL_PHASE 0x01 /* Selects dual phase frames */
+
+#define MAX_FRAME_LENGTH 0x7f /* maximum number of words per frame */
+
+#define WORD_LENGTH_8 0x00 /* 8 bit word length (requires filling) */
+#define WORD_LENGTH_12 0x01 /* 12 bit word length "" */
+#define WORD_LENGTH_16 0x02 /* 16 bit word length "" */
+#define WORD_LENGTH_20 0x03 /* 20 bit word length "" */
+#define WORD_LENGTH_24 0x04 /* 24 bit word length "" */
+#define WORD_LENGTH_32 0x05 /* 32 bit word length (matches DRR DXR sz*/
+
+#define MAX_WORD_LENGTH WORD_LENGTH_32
+
+#define NO_COMPAND_MSB_1ST 0x00 /* No Companding, Data XFER starts w/MSb */
+#define NO_COMPAND_LSB_1ST 0x01 /* No Companding, Data XFER starts w/LSb */
+#define COMPAND_ULAW 0x02 /* Compand ULAW, 8 bit word length only */
+#define COMPAND_ALAW 0x03 /* Compand ALAW, 8 bit word length only */
+
+#define FRAME_IGNORE 0x01 /* Ignore frame sync pulses after 1st */
+#define NO_FRAME_IGNORE 0x00 /* Utilize frame sync pulses */
+
+#define DATA_DELAY0 0x00 /* 1st bit in same clk period as fsync */
+#define DATA_DELAY1 0x01 /* 1st bit 1 clk period after fsync */
+#define DATA_DELAY2 0x02 /* 1st bit 2 clk periods after fsync */
+
+/* Sample Rate Generator Register SRGR */
+
+#define MAX_SRG_CLK_DIV 0xFF /* max value to divide Sample Rate Gen Cl*/
+#define MAX_FRAME_WIDTH 0xFF /* maximum FSG width in CLKG periods */
+#define MAX_FRAME_PERIOD 0x0FFF /* FSG period in CLKG periods */
+
+#define FSX_DXR_TO_XSR 0x00 /* Transmit FSX due to DXR to XSR copy */
+#define FSX_FSG 0x01 /* Transmit FSX due to FSG */
+
+#define CLK_MODE_CLKS 0x00 /* Clock derived from CLKS source */
+#define CLK_MODE_CPU 0x01 /* Clock derived from CPU clock source */
+
+#define CLKS_POL_FALLING 0x01 /* falling edge generates CLKG and FSG */
+#define CLKS_POL_RISING 0x00 /* rising edge generates CLKG and FSG */
+
+#define GSYNC_OFF 0x00 /* CLKG always running */
+#define GSYNC_ON 0x01 /* CLKG and FSG synched to FSR */
+
+/******************************************************************************/
+/* MCBSP_BYTES_PER_WORD - return # of bytes required to hold # */
+/* of bits indicated by wdlen */
+/******************************************************************************/
+#define MCBSP_BYTES_PER_WORD(wdlen) \
+ ( (wdlen) == WORD_LENGTH_32 ? 4 : (int)(((wdlen) + 2) / 2) )
+
+/******************************************************************************/
+/* MCBSP_ENABLE(unsigned short port_no, unsigned short type) - */
+/* starts serial port receive and/or transmit */
+/* type= 1 rx, type= 2 tx, type= 3 both */
+/******************************************************************************/
+#define MCBSP_ENABLE(port_no,type)\
+ (*(unsigned int *)MCBSP_SPCR_ADDR(port_no) |= \
+ ((type % 2) * MASK_BIT(RRST)) | ((type/2) * MASK_BIT(XRST)))
+
+/******************************************************************************/
+/* MCBSP_TX_RESET() - reset transmit side of serial port */
+/******************************************************************************/
+#define MCBSP_TX_RESET(port_no)\
+ (*(unsigned int *)MCBSP_SPCR_ADDR(port_no) &= ~MASK_BIT(XRST))
+
+
+/******************************************************************************/
+/* MCBSP_RX_RESET() - reset receive side of serial port */
+/******************************************************************************/
+#define MCBSP_RX_RESET(port_no)\
+ (*(unsigned int *)MCBSP_SPCR_ADDR(port_no) &= ~MASK_BIT(RRST))
+
+/******************************************************************************/
+/* MCBSP_READ() - read data value from serial port */
+/******************************************************************************/
+#define MCBSP_READ(port_no)\
+ (*(unsigned int *)(MCBSP_DRR_ADDR(port_no)))
+
+/******************************************************************************/
+/* MCBSP_WRITE() - write data value to serial port transmit reg */
+/******************************************************************************/
+#define MCBSP_WRITE(port_no, data)\
+ (*(unsigned int *)(MCBSP_DXR_ADDR(port_no)) = (unsigned int) data)
+
+/******************************************************************************/
+/* MCBSP_IO_ENABLE() - place port in general purpose I/O mode */
+/******************************************************************************/
+#define MCBSP_IO_ENABLE(port_no) \
+ { MCBSP_TX_RESET(port_no); MCBSP_RX_RESET(port_no); \
+ RESET_FIELD(MCBSP_PCR_ADDR(port_no),RIOEN,2); }
+
+/******************************************************************************/
+/* MCBSP_IO_DISABLE() - take port out of general purpose I/O mode */
+/******************************************************************************/
+#define MCBSP_IO_DISABLE(port_no) \
+ SET_FIELD(MCBSP_PCR_ADDR(port_no),RIOEN,2)
+
+/******************************************************************************/
+/* MCBSP_FRAME_SYNC_ENABLE - sets FRST bit in SPCR */
+/******************************************************************************/
+#define MCBSP_FRAME_SYNC_ENABLE(port_no) \
+ (SET_BIT(MCBSP_SPCR_ADDR(port_no),FRST))
+
+/******************************************************************************/
+/* MCBSP_FRAME_SYNC_RESET - clrs FRST bit in SPCR */
+/******************************************************************************/
+#define MCBSP_FRAME_SYNC_RESET(port_no) \
+ (RESET_BIT(MCBSP_SPCR_ADDR(port_no),FRST))
+
+/******************************************************************************/
+/* MCBSP_SAMPLE_RATE_ENABLE - sets GRST bit in SPCR */
+/******************************************************************************/
+#define MCBSP_SAMPLE_RATE_ENABLE(port_no) \
+ (SET_BIT(MCBSP_SPCR_ADDR(port_no),GRST))
+
+/******************************************************************************/
+/* MCBSP_SAMPLE_RATE_RESET - clrs GRST bit in SPCR */
+/******************************************************************************/
+#define MCBSP_SAMPLE_RATE_RESET(port_no) \
+ (RESET_BIT(MCBSP_SPCR_ADDR(port_no),GRST))
+
+/******************************************************************************/
+/* MCBSP_RRDY - returns selected ports RRDY */
+/******************************************************************************/
+#define MCBSP_RRDY(port_no) \
+ (GET_BIT(MCBSP_SPCR_ADDR(port_no),RRDY))
+
+/******************************************************************************/
+/* MCBSP_XRDY - returns selected ports XRDY */
+/******************************************************************************/
+#define MCBSP_XRDY(port_no) \
+ (GET_BIT(MCBSP_SPCR_ADDR(port_no),XRDY))
+
+/******************************************************************************/
+/* MCBSP_LOOPBACK_ENABLE - places selected port in loopback */
+/******************************************************************************/
+#define MCBSP_LOOPBACK_ENABLE(port_no) \
+ (SET_BIT(MCBSP_SPCR_ADDR(port_no),DLB))
+
+/******************************************************************************/
+/* MCBSP_LOOPBACK_DISABLE - takes port out of DLB */
+/******************************************************************************/
+#define MCBSP_LOOPBACK_DISABLE(port_no) \
+ (RESET_BIT(MCBSP_SPCR_ADDR(port_no),DLB))
+
+/*----------------------------------------------------------------------------*/
+/* GLOBAL VARIABLES */
+/*----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------*/
+/* FUNCTIONS */
+/*----------------------------------------------------------------------------*/
+
+__INLINE void mcbsp_init(unsigned short port_no,
+ unsigned int spcr_ctrl,
+ unsigned int rcr_ctrl,
+ unsigned int xcr_ctrl,
+ unsigned int srgr_ctrl,
+ unsigned int mcr_ctrl,
+ unsigned int rcer_ctrl,
+ unsigned int xcer_ctrl,
+ unsigned int pcr_ctrl);
+
+
+#ifdef _INLINE
+/******************************************************************/
+/* mcbsp_init - initialize and start serial port operation */
+/* */
+/******************************************************************/
+static inline void mcbsp_init(unsigned short port_no,
+ unsigned int spcr_ctrl,
+ unsigned int rcr_ctrl,
+ unsigned int xcr_ctrl,
+ unsigned int srgr_ctrl,
+ unsigned int mcr_ctrl,
+ unsigned int rcer_ctrl,
+ unsigned int xcer_ctrl,
+ unsigned int pcr_ctrl)
+{
+ unsigned int *port = (unsigned int *)(MCBSP_ADDR(port_no));
+
+ /****************************************************************/
+ /* Place port in reset - setting XRST & RRST to 0 */
+ /****************************************************************/
+ *(port + 2) &= ~(MASK_BIT(RRST) | MASK_BIT(XRST));
+
+ /****************************************************************/
+ /* Set values of all control reigsters */
+ /****************************************************************/
+ *(port + 3) = rcr_ctrl;
+ *(port + 4) = xcr_ctrl;
+ *(port + 5) = srgr_ctrl;
+ *(port + 6) = mcr_ctrl;
+ *(port + 7) = rcer_ctrl;
+ *(port + 8) = xcer_ctrl;
+ *(port + 9) = pcr_ctrl;
+
+ *(port + 2) = ~(MASK_BIT(RRST) | MASK_BIT(XRST)) & (spcr_ctrl);
+ *(port + 2) |= (MASK_BIT(RRST) | MASK_BIT(XRST)) & (spcr_ctrl);
+}
+
+#endif
+
+#ifdef __INLINE
+#undef __INLINE
+#endif
+
+#endif /* _MCBSP_H_ */
diff --git a/data/mnet/GP10/Dsp/include/oamdata.h b/data/mnet/GP10/Dsp/include/oamdata.h
new file mode 100644
index 0000000..d6383e1
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/oamdata.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* File: oamdata.h
+*
+* Description:
+* This file contains references to the global structures and variables
+* used in OAM processing. It includes a file containing the defined
+* constants, enumerations and type definitions that support OAM.
+*
+* NOTE: INGLOB and EXGLOB specify internal and external DSP memory
+* allocation, respectively. They are defined in dsptypes.h
+* and included here through oamtypes.h.
+*
+*****************************************************************************/
+#ifndef _OAMDATA_H_
+#define _OAMDATA_H_ /* include once only */
+
+#include "oamtypes.h"
+
+EXGLOB t_DynPwrOAMInfo g_DynPwrOAMInfo;
+EXGLOB t_HoOAMInfo g_HoOAMInfo;
+EXGLOB Uint8 g_CurrentTxPwrOffsetForArfcn;
+extern Uint16 g_encryptionCapability; // defined and set in A5 asm
+
+#ifdef ALLOCATE_MEMORY_EXTERNAL /*-------------------------------------------*/
+
+/*
+* Default map of Static Pwr Level to DAC control values. Half-decibel steps.
+*/
+Uint8 g_TxMaxPwrRdct2DLPwrTbl[NUM_TX_VS_PWR_LEVEL] = /* default 1800 */
+{ 240, 218, 213, 208, 204, 199, 195, 192, 188, 185, 182, 179, 176, 174, 170, 167,
+ 164, 161, 158, 155, 152, 149, 146, 142, 139, 135, 131, 127, 124, 120, 115, 111,
+ 106, 102, 97, 93, 89, 85, 81, 77, 73, 69, 66, 63, 60, 58, 55, 53,
+ 50, 48, 45, 43, 40, 38, 36, 34, 31, 29, 27, 24, 22, 20, 17, 15,
+ 12, 10, 7, 5, 3, 0 };
+/*
+* Default map of Tx Static Pwr Level offset vs ARFCN. Half-decibel steps.
+*/
+Uint8 g_TxPwrOffsetVsArfcnTbl[NUM_TX_VS_ARFCN] =
+{ 5, 5, 5, 5, 5, 4, 3, 1, 1, 1, 4, 5, 2, 1, 0 };
+/*
+* Fixed maps of measurement ARFCNs for Level vs ARFCN table at 1800 and 1900
+*/
+Uint16 g_TxOffsetArfcns1800[NUM_TX_VS_ARFCN] =
+{ 512, 517, 522, 556, 591, 626, 661, 698, 733, 768, 803, 838, 875, 880, 885 };
+Uint16 g_TxOffsetArfcns1900[NUM_TX_VS_ARFCN] =
+{ 512, 517, 522, 549, 577, 605, 633, 661, 689, 717, 745, 773, 800, 805, 810 };
+
+#else /*--------------------------------------------------------------------*/
+
+extern Uint8 g_TxMaxPwrRdct2DLPwrTbl[NUM_TX_VS_PWR_LEVEL];
+extern Uint8 g_TxPwrOffsetVsArfcnTbl[NUM_TX_VS_ARFCN];
+extern Uint16 g_TxOffsetArfcns1800[NUM_TX_VS_ARFCN];
+extern Uint16 g_TxOffsetArfcns1900[NUM_TX_VS_ARFCN];
+
+#endif /*--------------------------------------------------------------------*/
+
+
+#endif /* end of include once only */
diff --git a/data/mnet/GP10/Dsp/include/oamtypes.h b/data/mnet/GP10/Dsp/include/oamtypes.h
new file mode 100644
index 0000000..8347172
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/oamtypes.h
@@ -0,0 +1,113 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* File: oamtypes.h
+**
+* Description:
+* This file contains defined constants, enumerations and type definitions
+* of shared items to support OAM processing.
+*
+*****************************************************************************/
+#ifndef _OAMTYPES_H_
+#define _OAMTYPES_H_ /* include once only */
+
+#include "dsp/dsptypes.h"
+
+/*
+* Bit-mapped definitions for the Handover Cause field. If, during the decision process,
+* the condition for the HO Required message is satisfied at the same time by multiple
+* reasons, then the order of priority from highest to lowest shall be:
+* RXQUAL (Intracell), RXLEV (Intercell).
+*/
+#define DL_RXLEV 0x01
+#define UL_RXLEV 0x02
+#define DL_RXQUAL 0x04
+#define UL_RXQUAL 0x08
+#define DL_RXQUAL_IH 0x10
+#define UL_RXQUAL_IH 0x20
+
+#define NUM_NCELLS 32
+/* defaults if serving or neighbour cell's values are undefined */
+#define HO_MARGIN_DEF 6
+#define RXLEV_MIN_DEF 30 /* RXLEV is 30 for -80 dBm default dBm,
+ used to test handover candidacy */
+#define UL_DL_HO_THRESH_DEF 20 /* RXLEV units */
+#define NUM_TX_VS_PWR_LEVEL 70
+#define NUM_TX_VS_ARFCN 15
+
+typedef struct {
+ Uint8 numRxSigSamples; // renamed 'hreqave' in gsm 05.08
+ Int8 LRxPwrULH; /* cell threshold for handover to commence */
+ /*
+ * The following are used in conjunction with co-channel inteference handling.
+ */
+ Uint8 Intave; // Averaging period of Grp 1 RXLEV samples; measured in SACCH multiframes.
+ Uint8 RxLevUL_IH; // Thresholds for interference-based handover to commence.
+} t_ULSignalStrengthOAM;
+
+typedef struct {
+ Uint8 numRxSigSamples; /* renamed 'hreqave' in gsm 05.08 */
+ Uint8 LRxQualULH; /* cell quality threshold for handover to commence */
+} t_ULSignalQualityOAM;
+
+typedef struct {
+ Uint8 LRxLevDLH; /* cell threshold for handover to commence */
+ Uint8 hoAveWindow; /* in units of SACCH periods or approx 0.5 secs */
+ Uint8 RxLevDL_IH; // Thresholds for interference-based handover to commence.
+} t_DLSignalStrengthSCellOAM; // Serving Cell
+
+typedef struct {
+ Uint8 LRxQualDLH; /* cell quality threshold for handover to commence */
+ Uint8 hoAveWindow; /* in units of SACCH periods or approx 0.5 secs */
+} t_DLSignalQualitySCellOAM; // Serving Cell
+
+typedef struct {
+ Uint8 pxH; /* used to measure px out of nx failures on the threshold */
+ Uint8 nxH; /* before handover commences (P5,N5) */
+} t_SignalStrengthOAM; // Serving Cell
+
+typedef struct {
+ Uint8 pxH; /* used to measure px out of nx failures on the threshold */
+ Uint8 nxH; /* before handover commences (P6,N6) */
+} t_SignalQualityOAM; // Serving Cell
+
+typedef struct {
+ Uint8 pxH; /* used to measure px out of nx failures on the threshold */
+ Uint8 nxH; /* before interference-related handover commences (P7,N7) */
+} t_IntSignalStrengthOAM; // Serving Cell
+
+typedef struct {
+ Uint8 dynPwrSacchFrmCnt; // !! used for frequency of reporting power control
+ t_ULSignalStrengthOAM ulsigstren;
+ t_ULSignalQualityOAM ulsigqual;
+ t_DLSignalStrengthSCellOAM dlsigstrenSCell; // Serving Cell
+ t_DLSignalQualitySCellOAM dlsigqualSCell;
+ t_SignalStrengthOAM sigstren; // variables common to UL and DL
+ t_SignalQualityOAM sigqual;
+ t_IntSignalStrengthOAM intsigstren;
+} t_DynPwrOAMInfo;
+
+typedef struct {
+ Uint16 rfCh; /* ARFCN value */
+ Uint8 bsic;
+ Int8 hoMargin; /* prevents repetitive handover (or 'ping-ponging') between adjacent cells */
+ Int16 msTxPwrMax; /* max. power for mobile to use in an adjacent cell */
+ Int16 rxLevMin; /* minimum rxlev required for a mobile to handover to another cell */
+ Uint8 radioLinkTimeout; /* units of 4 SACCH frames, or 480ms */
+} t_uniqueCellParms, t_serveCellParms;
+
+typedef struct {
+ Int16 hoMarginDef; /* prevents repetitive handover (or 'ping-ponging') between undef. adjacent cells */
+ Int16 msTxPwrMaxDef; /* max. power for mobile to use in an undefined, adjacent cell */
+ Int16 rxLevMinDef; /* default minimum to evaluate handover to undefined, adjacent cells */
+} t_commonCellParms;
+
+typedef struct {
+ t_serveCellParms serveParms;
+ t_commonCellParms commonParms;
+ t_uniqueCellParms uniqueParms[NUM_NCELLS];
+} t_HoOAMInfo;
+
+#endif /* end of include once only */ \ No newline at end of file
diff --git a/data/mnet/GP10/Dsp/include/regs.h b/data/mnet/GP10/Dsp/include/regs.h
new file mode 100644
index 0000000..eab524f
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/regs.h
@@ -0,0 +1,225 @@
+/******************************************************************************/
+/* REGS.H - TMS320C6x Peripheral Support Library CPU Register Support */
+/* */
+/* This file provides the header for the DSP's register support. */
+/* */
+/* MACRO FUNCTIONS: */
+/* REG_READ - Read register at specified address */
+/* REG_WRITE - Write to register at specified address */
+/* RESET_BIT - Clears bit in register. */
+/* GET_BIT - Returns bit value in register. */
+/* SET_BIT - Sets bit in register. */
+/* MASK_BIT - Create (1's) mask for specified bit. */
+/* ASSIGN_BIT_VAL - Assign bit to specified value */
+/* RESET_FIELD - Clears field in register */
+/* GET_FIELD - Returns value of bit field in a register */
+/* MASK_FIELD - Create (1's) mask for specified field */
+/* LOAD_FIELD - Assigns bit field in register */
+/* GET_REG - Returns value of non memory mapped register */
+/* SET_REG - Sets value of a non memory mapped register */
+/* GET_REG_BIT - Return bit value in non memory mapped register */
+/* SET_REG_BIT - Sets bit in non memory mapped register */
+/* RESET_REG_BIT - Resets given bit in non memory mapped register */
+/* GET_REG_FIELD - Return value of specified register field */
+/* LOAD_REG_FIELD - Set value of specified register fiedl */
+/* */
+/******************************************************************************/
+#ifndef _REGS_H_
+#define _REGS_H_
+
+/*----------------------------------------------------------------------------*/
+/* DEFINES */
+/*----------------------------------------------------------------------------*/
+
+/**************************** CONTROL REGISTERS *******************************/
+
+extern cregister volatile unsigned int AMR; /* Address Mode Register */
+extern cregister volatile unsigned int CSR; /* Control Status Register */
+extern cregister volatile unsigned int IFR; /* Interrupt Flag Register */
+extern cregister volatile unsigned int ISR; /* Interrupt Set Register */
+extern cregister volatile unsigned int ICR; /* Interrupt Clear Register */
+extern cregister volatile unsigned int IER; /* Interrupt Enable Register */
+extern cregister volatile unsigned int ISTP; /* Interrupt Service Tbl Ptr */
+extern cregister volatile unsigned int IRP; /* Interrupt Return Pointer */
+extern cregister volatile unsigned int NRP; /* Non-maskable Int Return Ptr*/
+extern cregister volatile unsigned int IN; /* General Purpose Input Reg */
+extern cregister volatile unsigned int OUT; /* General Purpose Output Reg */
+
+/* Control Register Bitfields */
+
+/* AMR */
+#define A4_MODE 0
+#define A4_MODE_SZ 2
+#define A5_MODE 2
+#define A5_MODE_SZ 2
+#define A6_MODE 4
+#define A6_MODE_SZ 2
+#define A7_MODE 6
+#define A7_MODE_SZ 2
+#define B4_MODE 8
+#define B4_MODE_SZ 2
+#define B5_MODE 10
+#define B5_MODE_SZ 2
+#define B6_MODE 12
+#define B6_MODE_SZ 2
+#define B7_MODE 14
+#define B7_MODE_SZ 2
+#define BK0 16
+#define BK0_SZ 5
+#define BK1 21
+#define BK1_SZ 5
+
+/* CSR */
+#define GIE 0
+#define PGIE 1
+#define DCC 2
+#define DCC_SZ 3
+#define PCC 5
+#define PCC_SZ 3
+#define EN 8
+#define SAT 9
+#define PWRD 10
+#define PWRD_SZ 6
+#define REVISION_ID 16
+#define REVISION_ID_SZ 8
+#define CPU_ID 24
+#define CPU_ID_SZ 8
+
+/* Interrupt Enable Register (IER) */
+#define NMIE 1
+#define IE4 4
+#define IE5 5
+#define IE6 6
+#define IE7 7
+#define IE8 8
+#define IE9 9
+#define IE10 10
+#define IE11 11
+#define IE12 12
+#define IE13 13
+#define IE14 14
+#define IE15 15
+
+/* Interrupt Flag Register (IFR) */
+#define NMIF 1
+#define IF4 4
+#define IF5 5
+#define IF6 6
+#define IF7 7
+#define IF8 8
+#define IF9 9
+#define IF10 10
+#define IF11 11
+#define IF12 12
+#define IF13 13
+#define IF14 14
+#define IF15 15
+
+/* Interrupt Set register (ISR) */
+#define IS4 4
+#define IS5 5
+#define IS6 6
+#define IS7 7
+#define IS8 8
+#define IS9 9
+#define IS10 10
+#define IS11 11
+#define IS12 12
+#define IS13 13
+#define IS14 14
+#define IS15 15
+
+/* Interrupt Clear Register (ICR) */
+#define IC4 4
+#define IC5 5
+#define IC6 6
+#define IC7 7
+#define IC8 8
+#define IC9 9
+#define IC10 10
+#define IC11 11
+#define IC12 12
+#define IC13 13
+#define IC14 14
+#define IC15 15
+
+/* Interrupt Service Table Pointer (ISTP) */
+#define ISTB 10
+#define ISTB_SZ 22
+#define HPEINT 5
+#define HPEINT_SZ 5
+
+/*----------------------------------------------------------------------------*/
+/* MACRO FUNCTIONS */
+/*----------------------------------------------------------------------------*/
+
+#define CONTENTS_OF(addr) \
+ (*((volatile unsigned int *)(addr)))
+
+#define LENGTH_TO_BITS(length) \
+ (~(0xffffffff << (length)))
+
+/* MACROS to SET, CLEAR and RETURN bits and bitfields in Memory Mapped */
+/* locations using the address of the specified register. */
+
+#define REG_READ(addr) \
+ (CONTENTS_OF(addr))
+
+#define REG_WRITE(addr,val) \
+ (CONTENTS_OF(addr) = (val))
+
+
+#define MASK_BIT(bit) \
+ (1 << (bit))
+
+#define RESET_BIT(addr,bit) \
+ (CONTENTS_OF(addr) &= (~MASK_BIT(bit)))
+
+#define GET_BIT(addr,bit) \
+ ((CONTENTS_OF(addr) & MASK_BIT(bit)) ? 1 : 0)
+
+#define SET_BIT(addr,bit) \
+ (CONTENTS_OF(addr) = (CONTENTS_OF(addr)) | (MASK_BIT(bit)))
+
+#define ASSIGN_BIT_VAL(addr,bit,val) \
+ ( (val) ? SET_BIT(addr,bit) : RESET_BIT(addr,bit) )
+
+
+
+#define MASK_FIELD(bit,length) \
+ (LENGTH_TO_BITS(length) << (bit))
+
+#define RESET_FIELD(addr,bit,length) \
+ ( CONTENTS_OF(addr) &= (~MASK_FIELD(bit,length)))
+
+#define GET_FIELD(addr,bit,length) \
+ ((CONTENTS_OF(addr) & MASK_FIELD(bit,length)) >> bit)
+
+#define LOAD_FIELD(addr,val,bit,length) \
+ (CONTENTS_OF(addr) = (CONTENTS_OF(addr) & (~MASK_FIELD(bit,length))) | (val<<bit))
+
+/* MACROS to SET, CLEAR and RETURN bits and bitfields in Memory Mapped */
+/* and Non-Memory Mapped using register names. */
+
+#define GET_REG(reg) \
+ (reg)
+
+#define SET_REG(reg,val) \
+ ((reg)= (val))
+
+#define GET_REG_BIT(reg,bit) \
+ ((reg) & MASK_BIT(bit) ? 1 : 0)
+
+#define SET_REG_BIT(reg,bit) \
+ ((reg) |= MASK_BIT(bit))
+
+#define RESET_REG_BIT(reg,bit) \
+ ((reg) &= (~MASK_BIT(bit)))
+
+#define GET_REG_FIELD(reg,bit,length) \
+ ((reg & MASK_FIELD(bit,length)) >> bit)
+
+#define LOAD_REG_FIELD(reg,val,bit,length) \
+ (reg &= (~MASK_FIELD(bit,length)) | (val<<bit))
+
+#endif /* ifndef _REGS_H_ */
diff --git a/data/mnet/GP10/Dsp/include/rrmsg.h b/data/mnet/GP10/Dsp/include/rrmsg.h
new file mode 100644
index 0000000..9c4ae75
--- /dev/null
+++ b/data/mnet/GP10/Dsp/include/rrmsg.h
@@ -0,0 +1,35 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/******************************************************************************/
+/* rrmsg.h - */
+/* */
+/* Description */
+/* */
+/* MACRO FUNCTIONS: */
+/* */
+/* FUNCTIONS: */
+/* */
+/* STATIC FUNCTIONS: */
+/* */
+/* GLOBAL VARIABLES DEFINED: */
+/* */
+/******************************************************************************/
+
+
+#define PH_DATA_IND_HI 0x00
+#define PH_DATA_IND_LO 0x02
+#define PH_CONNECT_IND_HI 0x01
+#define PH_CONNECT_IND_LO 0x00
+#define PH_RANDOM_ACCESS_IND_HI 0x02
+#define PH_RANDOM_ACCESS_IND_LO 0x00
+#define PH_READY_TO_SEND_IND_HI 0x03
+#define PH_READY_TO_SEND_IND_LO 0x00
+
+
+#define IE_CBCH 0x14
+#define IE_CBCH_EXT 0x15
+
+
+
diff --git a/data/mnet/GP10/Dsp/init.gel b/data/mnet/GP10/Dsp/init.gel
new file mode 100644
index 0000000..d141757
--- /dev/null
+++ b/data/mnet/GP10/Dsp/init.gel
@@ -0,0 +1,15 @@
+StartUp()
+{
+ Init_Target();
+}
+
+hotmenu Init_Target()
+{
+ *(unsigned int *) 0x1800000=0x3060;
+ *(unsigned int *) 0x1800004=0x40F40323;
+ *(unsigned int *) 0x1800008=0x40;
+ *(unsigned int *) 0x1800010=0x30;
+ *(unsigned int *) 0x1800014=0x30;
+ *(unsigned int *) 0x1800018=0x7227000;
+ *(unsigned int *) 0x180001c=0x4E1;
+}
diff --git a/data/mnet/GP10/Dsp/peripherals/Makefile b/data/mnet/GP10/Dsp/peripherals/Makefile
new file mode 100644
index 0000000..3a0a7e3
--- /dev/null
+++ b/data/mnet/GP10/Dsp/peripherals/Makefile
@@ -0,0 +1,23 @@
+#****************************************************************************
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#****************************************************************************
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+include ../dsp.mk
+
+SOURCE_LIST = INIT_HW2.c
+
+OBJ_LIST = $(SOURCE_LIST:.c=.obj)
+MODULE_OBJS = $(foreach file, $(OBJ_LIST), $(OBJDIR)/$(file))
+
+all: $(MODULE_OBJS)
+
+# rule for C++ compiles
+$(OBJDIR)/%.obj : %.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
diff --git a/data/mnet/GP10/Dsp/peripherals/init_hw2.c b/data/mnet/GP10/Dsp/peripherals/init_hw2.c
new file mode 100644
index 0000000..771b0ee
--- /dev/null
+++ b/data/mnet/GP10/Dsp/peripherals/init_hw2.c
@@ -0,0 +1,230 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/******************************************************************************/
+/* init_hw2.c */
+/* */
+/* Description */
+/* */
+/* MACRO FUNCTIONS: */
+/* */
+/* FUNCTIONS: */
+/* */
+/* STATIC FUNCTIONS: */
+/* */
+/* GLOBAL VARIABLES DEFINED: */
+/* */
+/******************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "dsp6201.h"
+#include "diagdata.h"
+#include "dsprotyp.h"
+
+#include <common.h>
+#include <mcbsp.h> /* mcbsp devlib */
+#include <mcbspdrv.h> /* mcbsp driver */
+#include <dma.h>
+#include <intr.h>
+
+#define BURST_TO_FRAME_ADJ (-26) /* adjust alignment for agc */
+/*#define INTERNAL_BSP_CLK*/
+
+static int numBuffsSent = 0;
+static int numBuffsRcv = 0;
+static int buffNumXmt = 0;
+static int buffNumRcv = 2; /* first buff ISR sets up is 2 */
+
+extern int dlBurstCounter;
+extern int ulBurstCounter;
+
+/* Don't know where to find this prototype. It's for a function in dev6x.lib */
+void mcsp_init (unsigned short port_no,
+ unsigned int spcr_ctrl,
+ unsigned int rcr_ctrl,
+ unsigned int xcr_ctrl,
+ unsigned int srgr_ctrl,
+ unsigned int mcr_ctrl,
+ unsigned int rcer_ctrl,
+ unsigned int xcer_ctrl,
+ unsigned int pcr_ctrl);
+
+/******************************************************************************/
+/* init_dma - initialize DMA */
+/******************************************************************************/
+void init_dma(void)
+{
+ dma_reset();
+
+ /* Set up Global Configuration Registers for the DMA */
+ dma_global_init(0, /* gcr - no used */
+ 0x00010138, /* gcra */
+ 0x00010271, /* gcrb */
+ 0xF6400004, /* gndxa Frame Count: -625, element count 4*/
+ 0, /* gndxb */
+ 0, /* gaddra */
+ (unsigned int)dlBurstBufPtr[1], /* gaddrb */
+ (unsigned int)ulBurstBufPtr[0], /* gaddrc */
+ 0); /* gaddrd */
+
+ /*----------------------------*/
+ /* Set up DMA Ch0 to Transmit */
+ /*----------------------------*/
+ dma_init(DMA_CH0,
+ 0x13600010, /* pri_ctrl - */
+ 0x00050080, /* output Block event to DMAC Pin, sec_ctrl */
+ (unsigned int)dlBurstBufPtr[0], /* src_addr */
+ 0x018C0004, /* dst_addr */
+ 316 + BURST_TO_FRAME_ADJ); /* first DAM trans_ctr */
+
+ intr_map(CPU_INT8, ISN_DMA_INT0);
+ intr_hook(dma0Isr, CPU_INT8);
+ INTR_ENABLE(CPU_INT8);
+
+ /* Begin DMA operation */
+ DMA_AUTO_START(DMA_CH0);
+
+ /*---------------------------*/
+ /* Set up DMA Ch1 to Receive */
+ /*---------------------------*/
+ dma_init(DMA_CH1,
+ 0x8B035040, /* pri_ctrl - */
+ 0x00050080, /* output Block event to DMAC Pin, sec_ctrl */
+ 0x018C0000, /* src_addr */
+ (unsigned int)ulBurstBufPtr[0], /* dst_addr */
+ 333 + BURST_TO_FRAME_ADJ/2); /* first DMA trans_ctr */
+
+ intr_map(CPU_INT9, ISN_DMA_INT1);
+ intr_hook(dma1Isr, CPU_INT9);
+ /*INTR_ENABLE(CPU_INT9);*/
+
+ /* Begin DMA operation */
+ DMA_AUTO_START(DMA_CH1);
+
+ /* Enable MCBSP Rx
+ MCBSP_ENABLE(0,MCBSP_RX); */
+ /* Enable MCBSP Tx
+ MCBSP_ENABLE(0,MCBSP_TX); */
+}
+
+/******************************************************************************/
+/* init_bsp - initialize BSP 0 */
+/******************************************************************************/
+static init_bsp(void)
+{
+ /* Reset sample rate generator before configuring */
+ MCBSP_SAMPLE_RATE_RESET(0);
+
+ /* sample rate generator configuration requires tx and rx reset as well */
+ MCBSP_TX_RESET(0);
+ MCBSP_RX_RESET(0);
+
+ /* reset frame sync generation counters */
+ MCBSP_FRAME_SYNC_RESET(0);
+
+#ifdef INTERNAL_BSP_CLK
+ mcsp_init(0, /* port no. */
+ 0x00008000, /* spcr_ctrl */ /* for test */
+ 0x002000A0, /* rcr_ctrl */
+ 0x00200080, /* xcr_ctrl */
+ 0x20000120, /* srgr_ctrl */ /* for test */
+ 0x00000000, /* mcr_ctrl */
+ 0x00000000, /* rcer_ctrl */
+ 0x00000000, /* xcer_ctrl */
+ 0x00000B00 /* pcr_ctrl */ /* for test */
+ );
+
+#else
+ mcsp_init(0, /* port no. */
+ 0x00000000, /* spcr_ctrl */
+ 0x002100A0, /* rcr_ctrl */
+ 0x00210080, /* xcr_ctrl */
+ 0x000001FF, /* srgr_ctrl */
+ 0x00000000, /* mcr_ctrl */
+ 0x00000000, /* rcer_ctrl */
+ 0x00000000, /* xcer_ctrl */
+ 0x00000000 /* pcr_ctrl */
+ );
+
+#endif
+ /* Enable sample rate generator */
+ MCBSP_SAMPLE_RATE_ENABLE(0);
+}
+
+/******************************************************************************/
+/* init_hw - Initialize Hardware */
+/******************************************************************************/
+void init_hw(void)
+{
+ int i = 0x7ffffff;
+ Uint8 dummyArg;
+ /*
+ Calibration Control Register
+ This register contains control bits related to the AD7002 calibration process.
+ For the bit "CALSet" a "1" written to this indicates to the hardware that it
+ should begin the Calibration process using the CAL line on the AD7002.
+ Writing a "0" will have not effect on the hardware.
+
+ For the bit "MZEROset" a "1" written to this indicates that the MZERO line
+ should be driven to high during the calibration (RF Analog Section disconnected).
+ Writing a "0" will leave the MZERO line low during the calibration process
+ (RF Analog Section connected).
+
+ For the bit "Calibration Complete" a "1" in this register indicates that the
+ calibration process has completed. This bit is only valid after setting of the
+ "CALset" bit.. A "0" read from this indicates that the hardware is waiting for
+ the calibration to complete if the "CALset" bit was previously written. Upon
+ completion the "MZEROset" and "CALset" bits are set to "0".
+ */
+ AGC_SRC_SELECT_REG |= (1<<AD7002_RESET);
+
+ if(g_loopBackMode != LOCAL_LOOPBACK)
+
+ while (i-- > 0) {
+ if (AGC_SRC_SELECT_REG & (1<<AD7002_RESET_COMPLETE))
+ break;
+ }
+
+ if( i<= 0)
+ {
+ /*
+ * AD 7002 failed on Reset
+ */
+ ReportError(0xFF, 0, 0, 0, &dummyArg);
+ }
+
+ init_bsp();
+
+ /*
+ sysSyncProc();
+
+ g_frmSync.state = CHECK_SYNC;
+*/
+ /* start at Time Slot '0' */
+/*
+ g_burstProc.dlTN = 0;
+ g_burstProc.ulTN = (g_burstProc.dlTN + 8-g_frameCounts.TNNumInit) & 0x07 ;
+
+ g_BBInfo[0].ulBurst = (g_burstProc.ulTN+3) & 0x3;
+ g_BBInfo[0].ulBBSmpl = ulBurstBufPtr[g_BBInfo[0].ulBurst];
+
+*/
+
+ init_dma();
+
+ intr_map(CPU_INT7, ISN_EXT_INT7);
+ intr_hook(gsmFrameIsr, CPU_INT7);
+
+ INTR_ENABLE(CPU_INT7);
+ INTR_GLOBAL_ENABLE();
+
+ /*
+ * DSP is ready to set sync flag
+ */
+ AGC_SRC_SELECT_REG |= 1<<DSP_BSP_INT_SYNC_READY;
+}
+
+
+
diff --git a/data/mnet/GP10/Dsp/shared/DSPMAINT.C b/data/mnet/GP10/Dsp/shared/DSPMAINT.C
new file mode 100644
index 0000000..23344c4
--- /dev/null
+++ b/data/mnet/GP10/Dsp/shared/DSPMAINT.C
@@ -0,0 +1,137 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: dspmaint.c
+*
+* Description:
+* This file contains functions for memory and queue maintenance and
+* diagnostic and error reporting.
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "dsp/dsptypes.h"
+#include "dsp/dsphmsg.h"
+#include "comdata.h"
+#include "dsp6201.h"
+#include "dsprotyp.h"
+
+/************************************************************
+* Routine Name: MemoryDump
+*
+* Description: Send DSP memory contents to Host
+*
+*************************************************************/
+Void MemoryDump (cmdStruc *diagCmd)
+{
+ rspStruc DumpMsg;
+ Int16 DumpSize;
+ Int16 i;
+ Int8 *memAddr;
+ Uint8 dummyArg;
+
+ DumpSize = diagCmd->params[1];
+
+ if(DumpSize < 0)
+ {
+ ReportError(BAD_NAWC, 0, 0, 0, &dummyArg);
+ return;
+ }
+ else if(DumpSize > MAX_PARAMS)
+ {
+ DumpSize = MAX_PARAMS;
+ }
+
+ DumpMsg.function = MPH_DSP_DIAG_READ_MEM_RSP,
+ DumpMsg.msgSize = DumpSize + MSG_HEAD_SIZE;
+
+ memAddr = (Int8 *) diagCmd->params[2];
+
+ for(i = 0; i<DumpSize; i++)
+ {
+ DumpMsg.params[i] = *memAddr++;
+ }
+ sendMsgHost(&DumpMsg);
+}
+
+/************************************************************
+* Routine Name: getRspQueStatus
+*
+* Description: Send Rsp Queue status parameters to Host
+*
+*************************************************************/
+Void getRspQueStatus (cmdStruc *diagCmd)
+{
+ rspStruc rspMsg;
+ Int16 DumpSize;
+ Int8 *memAddr;
+
+ rspMsg.msgSize = MSG_HEAD_SIZE + 4;
+ rspMsg.function = DIAGNOSTIC_MSG;
+ rspMsg.typeLoByte = MPH_DSP_DIAG_GET_DSP_QUE_STATUS_RSP;
+ rspMsg.typeHiByte = MPH_DSP_DIAG_GET_DSP_QUE_STATUS_RSP>>8;
+ rspMsg.trx = diagCmd->trx;
+ rspMsg.params[0] = RspQue->msgCount;
+ rspMsg.params[1] = RspQue->msgInIndex;
+ rspMsg.params[2] = RspQue->msgOutIndex;
+ rspMsg.params[3] = DspMsgNumWord;
+ sendMsgHost(&rspMsg);
+}
+
+/************************************************************
+* Routine Name: ReportError
+*
+* Description: Report an error to Host
+*
+*************************************************************/
+Void ReportError (ErrorType Error, Uint8 trx, Uint8 timeSlot,
+ Uint8 numParams, Uint8 *params)
+{
+ rspStruc ErrorMsg;
+ Uint8 i;
+
+ if(numParams > MAX_PARAMS-2) numParams = MAX_PARAMS-2;
+
+ ErrorMsg.msgSize = 2+MSG_HEAD_SIZE+numParams;
+ ErrorMsg.function = DIAGNOSTIC_MSG;
+ ErrorMsg.trx = trx;
+ ErrorMsg.typeLoByte = MPH_DSP_DIAG_REPORT_ERR_RSP;
+ ErrorMsg.typeHiByte = MPH_DSP_DIAG_REPORT_ERR_RSP>>8;
+ ErrorMsg.params[0] = timeSlot;
+ ErrorMsg.params[1] = Error;
+ for(i=0; i<numParams; i++)
+ ErrorMsg.params[2+i] = *params++;
+
+ SendMsgHost_Que(&ErrorMsg);
+}
+
+/************************************************************
+* Routine Name: sendDiagMsg
+*
+* Description: Send diagnostic message Host
+*
+*************************************************************/
+Void sendDiagMsg (Uint8 diagMsgType, Uint8 trx, Uint8 timeSlot,
+ Uint8 numParams, Uint8 *params)
+{
+ rspStruc DiagMsg;
+ Uint8 i;
+
+ if(numParams > MAX_PARAMS-2) numParams = MAX_PARAMS-2;
+
+ DiagMsg.msgSize = 2+MSG_HEAD_SIZE+numParams;
+ DiagMsg.function = DIAGNOSTIC_MSG;
+ DiagMsg.trx = trx;
+ DiagMsg.typeLoByte = MPH_DSP_DIAG_REPORT_RSP;
+ DiagMsg.typeHiByte = MPH_DSP_DIAG_REPORT_RSP>>8;
+ DiagMsg.params[0] = timeSlot;
+ DiagMsg.params[1] = diagMsgType;
+ for(i=0; i<numParams; i++)
+ DiagMsg.params[2+i] = *params++;
+
+ SendMsgHost_Que(&DiagMsg);
+}
+
+
+ \ No newline at end of file
diff --git a/data/mnet/GP10/Dsp/shared/DSPMH.C b/data/mnet/GP10/Dsp/shared/DSPMH.C
new file mode 100644
index 0000000..3c69732
--- /dev/null
+++ b/data/mnet/GP10/Dsp/shared/DSPMH.C
@@ -0,0 +1,144 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* file name: dspmh.c
+*
+* Description: Search message from message queue and
+* interperate the message
+*
+*****************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "dsp/dsphmsg.h"
+#include "dsp6201.h"
+#include "comdata.h"
+#include "intr.h"
+#include "dsprotyp.h"
+
+ProcResult pdchMsgProc(msgStruc* msg);
+
+/*****************************************************************************
+*
+* Function: dspMsgHandler
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+Void dspMsgHandler(Void)
+{
+ cmdStruc hmsg;
+ ProcResult Result;
+ static Uint32 lastFrameNumber = 0;
+ Uint8 i;
+
+ if(lastFrameNumber != sysFrameNum.FN)
+ {
+ /*
+ * Do not process the same queue until Frame number has changed
+ */
+ //return;
+
+ lastFrameNumber = sysFrameNum.FN;
+
+
+ if(qGet(& hmsg, FastHmsgQue) == SUCCESS ||
+ qGet(& hmsg, HmsgQue) == SUCCESS)
+ {
+
+ /*
+ * process a message got from one of the queues
+ */
+ Result = ProcessHostMsg(& hmsg);
+
+ /*
+ * if message can not be processed right way, put it pack into queue
+ */
+ if(Result == UN_PROCESSED)
+ {
+ qPut(& hmsg, HmsgQue);
+ }
+ else
+ {
+ /*
+ * a diag Msg to host tells how many host messages have been stored in
+ * this message queue, because they can't be processed on spot.
+ */
+ sendDiagMsg(13, hmsg.trx, hmsg.params[0] & 0x07, 2, (Uint8*)&HmsgQue->msgCount);
+ }
+ }
+
+ }
+}
+
+/*****************************************************************************
+*
+* Function: ProcessHostMsg
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+ProcResult ProcessHostMsg(cmdStruc * hmsg)
+{
+ ProcResult Result;
+
+ if(hmsg->trx > (NUM_RFS_PER_DSP-1))
+ {
+ /*
+ * illegal TRX number
+ */
+ ReportError(0x20, hmsg->trx, 0, 1, & (hmsg->trx));
+ return;
+ }
+
+ switch(hmsg->function & 0xfe)
+ {
+ case TRAFFIC_MSG:
+ Result = tchMsgProc((msgUnionStruc*)hmsg);
+ break;
+
+ case RR_MANAGE_MSG:
+ Result = rrMsgProc(hmsg);
+ break;
+
+ case DCCH_MANAGE_MSG:
+ Result = dcchMsgProc((msgUnionStruc*)hmsg);
+ break;
+
+ case CCCH_MANAGE_MSG:
+ Result = ccchMsgProc((msgUnionStruc*)hmsg);
+ break;
+
+ case TRX_MANAGE_MSG:
+ Result = trxMsgProc(hmsg);
+ break;
+
+ case OAM_MANAGE_MSG:
+ Result = oamMsgProc(hmsg);
+ break;
+
+ case DIAGNOSTIC_MSG:
+ Result = diagMsgProc(hmsg);
+ break;
+
+ case PDCH_MANAGE_MSG:
+ Result = pdchMsgProc(hmsg);
+ break;
+
+ default:
+ ReportError(UNKNOWN_MSG_DISCRIMINATOR, hmsg->trx, 0, MAX_PARAMS-2, (Uint8 *) hmsg);
+ break;
+ }
+ return(Result);
+}
+
+
diff --git a/data/mnet/GP10/Dsp/shared/Dspinit.c b/data/mnet/GP10/Dsp/shared/Dspinit.c
new file mode 100644
index 0000000..0735d45
--- /dev/null
+++ b/data/mnet/GP10/Dsp/shared/Dspinit.c
@@ -0,0 +1,197 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: dspinit.c
+*
+* Description:
+* This file contains DSP initialization functions
+*
+* Public Functions:
+* dsp_init
+*
+* Private Functions:
+* modInit
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "string.h"
+#include "gsmdata.h"
+#include "oamdata.h"
+#include "dsp6201.h"
+#include "dsp/dsphmsg.h"
+#include "comdata.h"
+#include "bbdata.h"
+#include "diagdata.h"
+#include "l1config.h"
+#include "agcdata.h"
+#include "dsprotyp.h"
+
+/*****************************************************************************
+*
+* Function: modInit
+*
+* Description:
+* One-time initialization of modulation buffers at startup
+*
+* Inputs: None
+*
+* Outputs: None
+*
+******************************************************************************/
+void modInit(void)
+{
+ memset((UChar*)&g_ULBBData, 0, sizeof(t_ULBBData));
+ memset((UChar*)&g_DLBBData, 0, sizeof(t_DLBBData));
+ memset((UChar*)g_UlBurstLog, 0, 156*sizeof(Int32));
+}
+
+/*****************************************************************************
+*
+* Function: dsp_init
+*
+* Description:
+* One-time initialization of DSP parameters at startup
+*
+* Inputs: None
+*
+* Outputs: None
+*
+******************************************************************************/
+void dsp_init(void)
+{
+ short i, k;
+
+ /*---------------------------------------------
+ * Assign Host port buffer pointers
+ *--------------------------------------------*/
+ hpiRxMsgPtr = (msgStruc *) & rxMsgBuf;
+ HostMsgNumWord = 0;
+ hpiTxMsgPtr = (msgStruc *) & txMsgBuf;
+ DspMsgNumWord = 0;
+
+ /*---------------------------------------------
+ * Create message queues (since we do not yet
+ * use Fast Queues, set their lengths to 1)
+ *--------------------------------------------*/
+ HmsgQue = (qCmdStruc *) qCreate(20, 0, HmsgQue);
+ FastHmsgQue = (qCmdStruc *) qCreate(1, 1, FastHmsgQue);
+
+ RspQue = (qRspStruc *) qCreate(40, 0, RspQue);
+ FastRspQue = (qRspStruc *) qCreate(1, 1, FastRspQue);
+
+ /*---------------------------------------------
+ * Initialize modulator buffers, group and
+ * frame structures, codec, OAM
+ *--------------------------------------------*/
+ modInit();
+ tsGroupInit();
+ tchFrameInit();
+ codecInit();
+ oamInit();
+
+ /*---------------------------------------------
+ * Initialize BER and Viterbi metricthresholds
+ * for perceptual voice masking
+ *--------------------------------------------*/
+ g_TchBerThresh = TCH_BER_THRESH;
+ g_TchMetricThresh = TCH_METRIC_THRESH;
+ g_RachMetricThresh = RACH_METRIC_THRESHOLD;
+ g_RachSnrThresh = RACH_SNR_THRESHOLD;
+
+ /*---------------------------------------------
+ * Initialize UL dynamic power control,
+ * UL AGC, DL Tx temperature compensation
+ *--------------------------------------------*/
+ g_DPC_ON = TRUE;
+ g_AGC_ON = TRUE;
+ g_USGC = RXGAIN_INIT;
+ g_TxPwrTemperatureDelta = 0;
+ g_AgcRxPwrTarget = RXPWR_TARGET; /* current, dBr */
+ g_DpcRxLevThresh = DPC_DBM_THRESH + DBM_2_RXLEV_CONV_FACTOR;
+
+ /*---------------------------------------------
+ * Init Tx power adjustment for current ARFCN
+ *--------------------------------------------*/
+ g_CurrentTxPwrOffsetForArfcn = 0;
+
+ /*---------------------------------------------
+ * Send no Tx signal on inactive TS. Override
+ * TrxMsgProc if SLOT_ACTIVE configures BCCH.
+ *--------------------------------------------*/
+ g_IdleFrameMode = FALSE;
+
+ /*---------------------------------------------
+ * Initialize UL DC offset for each TS and
+ * also the all-carrier DC offset (last one)
+ *--------------------------------------------*/
+ for ( i=0; i<NUM_RFS_PER_DSP; i++ )
+ {
+ for ( k=0; k<NUM_TN_PER_RF+NUM_SDCCH_SUBCHANS+1; k++ )
+ {
+ g_DcOffset[i][k].I = 0;
+ g_DcOffset[i][k].Q = 0;
+ }
+
+ for (k = 0; k< NUM_SDCCH8_SUBCHANS; k++) {
+ g_Dc_7_Offset[i][k].I = 0;
+ g_Dc_7_Offset[i][k].Q = 0;
+ }
+ }
+ /*---------------------------------------------
+ * Initialize diagnostics and error events
+ *--------------------------------------------*/
+ g_diagData.msReportTsMask = 0;
+ g_diagData.dcchReportOnly = FALSE;
+ g_diagData.hoReportTsMask = 0;
+ g_diagData.dlMeasReportTsMask = 0;
+ g_diagData.gprsMsReportTfiMask = 0;
+ g_diagData.gprsDlMeasReportTfiMask = 0;
+ g_diagData.dcOffsetTsMask = 0xff;
+ g_diagData.dcOffsetReport = FALSE;
+ g_diagData.burstCapture.state = CAPTURE_OFF;
+ g_diagData.sendRadioLinkLost = TRUE;
+ g_diagData.sendIdleFrameCapture = FALSE;
+ for ( i=0; i<NUM_RFS_PER_DSP; i++ )
+ {
+ for ( k=0; k<NUM_TN_PER_RF; k++ )
+ {
+ g_DlUnderflowCount[i][k] = 0;
+ g_DlOverflowCount[i][k] = 0;
+ g_DlOutOfSequenceCount[i][k] = 0;
+ }
+ for ( k=0; k<NUM_TN_PER_RF+NUM_SDCCH_SUBCHANS; k++ )
+ {
+ g_diagData.msReport[i][k].cumErrs = 0;
+ g_diagData.msReport[i][k].cumBits = 0;
+ g_diagData.msReport[i][k].cumFrameErrs = 0;
+ g_diagData.msReport[i][k].cumFrames = 0;
+ g_diagData.msReport[i][k].sacchCount = 0;
+ g_diagData.msReport[i][k].minToa = 99;
+ g_diagData.msReport[i][k].maxToa = -99;
+ g_diagData.msReport[i][k].cumToa = 0;
+ }
+
+ /* initialize reports for config 7 msReport */
+
+ for ( k=0; k< NUM_SDCCH8_SUBCHANS; k++ )
+ {
+ g_diagData.sdcch8Report[i][k].cumErrs = 0;
+ g_diagData.sdcch8Report[i][k].cumBits = 0;
+ g_diagData.sdcch8Report[i][k].cumFrameErrs = 0;
+ g_diagData.sdcch8Report[i][k].cumFrames = 0;
+ g_diagData.sdcch8Report[i][k].sacchCount = 0;
+ g_diagData.sdcch8Report[i][k].minToa = 99;
+ g_diagData.sdcch8Report[i][k].maxToa = -99;
+ g_diagData.sdcch8Report[i][k].cumToa = 0;
+ }
+ }
+
+ for ( i=0; i<8; i++ )
+ {
+ rcvRawIQBufIndex[i] = 0;
+ txRawIQBufIndex[i] = 0;
+ }
+}
+
diff --git a/data/mnet/GP10/Dsp/shared/HPI.C b/data/mnet/GP10/Dsp/shared/HPI.C
new file mode 100644
index 0000000..cee25ea
--- /dev/null
+++ b/data/mnet/GP10/Dsp/shared/HPI.C
@@ -0,0 +1,225 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+*
+* File: hpi.c
+*
+*****************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "dsp/dsphmsg.h"
+#include "dsp6201.h"
+#include "comdata.h"
+#include "hpi.h"
+#include "dsprotyp.h"
+
+/*
+ ************************************************************
+ * Routine Name: SendMsgHost(Void)
+ *
+ * Description: Send message to Host, the message is queued for
+ * transmitting
+ *
+ ************************************************************
+*|*/
+Void SendMsgHost_Que(msgStruc *DspMsg)
+{
+ Uint8 dummyArg;
+
+ if(!DspMsg)
+ {
+ /*
+ * Unassigned Message pointer
+ */
+ ReportError(NULL_MSG, 0, 0xFF, 0, &dummyArg);
+ }
+ else if(DspMsg->msgSize > (MAX_PARAMS + MSG_HEAD_SIZE)||
+ DspMsg->msgSize < 0 )
+ {
+ /*
+ * Invalid parameters
+ */
+ ReportError(BAD_NAWC, DspMsg->trx, 0xff, 4, (Uint8*)&DspMsg->msgSize);
+ }
+ else
+ {
+ qPut(DspMsg, RspQue);
+ }
+}
+/*|*
+ ************************************************************
+ * Routine Name: sendMsgHost(Void)
+ *
+ * Description: Send message to Host immediately if HPI is free
+ *
+ * Warnning: This routine should not be calle on ANY ISR !!!
+ *
+ *
+ ************************************************************
+*|*/
+Void sendMsgHost(msgStruc *DspFastMsg)
+{
+ Int32 *rdPtr;
+ Int32 *wrPtr;
+ Int16 i;
+ Uint8 dummyArg;
+
+ if(!DspFastMsg)
+ {
+ /*
+ * Unassigned message pointer
+ */
+ ReportError(NULL_MSG, 0, 0xFF, 0, &dummyArg);
+ return;
+ }
+ else if(DspFastMsg->msgSize > (MAX_PARAMS + MSG_HEAD_SIZE)||
+ DspFastMsg->msgSize < 0 )
+ {
+ /*
+ * Invalid parameters
+ */
+ ReportError(BAD_NAWC, DspFastMsg->trx, 0xFF, 4, (Uint8*)&DspFastMsg->msgSize);
+ return;
+ }
+ /*
+ * check if last message has been sent
+ */
+ if(DspMsgNumWord == 0)
+ {
+
+ /*
+ * copy msg from source to HPI Tx buffer
+ *
+ * Assumption Source and destination address in 32 bit word alignment
+ */
+ rdPtr = (Int32 *)DspFastMsg;
+ wrPtr = (Int32 *)hpiTxMsgPtr;
+
+ /*
+ * check if last 4 bytes of the message are used
+ */
+ if(rdPtr[0] > MAX_PARAMS)
+ {
+ for(i=0; i<sizeof(msgStruc)/4; i++) wrPtr[i] = rdPtr[i];
+ }
+ else
+ {
+ for(i=0; i<sizeof(msgStruc)/4; i++) wrPtr[i] = rdPtr[i];
+
+ /*
+ * DEBUG - sendback GSM Frame Number
+ */
+ wrPtr[i-1] = sysFrameNum.FN;
+ }
+
+ DspMsgNumWord++;
+
+ /*
+ * Interrupt host to indicate there is a message
+ */
+ * (Uint32 *) HPIC_ADDR |= 0x04;
+ }
+ else
+ {
+ /*
+ * If HPI Txmemory is not ready, put message into fast response queue
+ */
+ qPut(DspFastMsg, RspQue);
+ }
+}
+/*|*
+ ************************************************************
+ * Routine Name: hpiRcvMsg(Void)
+ *
+ * Description: A backgroud task polls HPI receive buffer and
+ * move message to queue
+ *
+ ************************************************************
+*|*/
+Void hpiRcvMsg(Void)
+{
+ Int16 MsgLength;
+ msgStruc *hostMsg;
+ Int8 *Ptr;
+ ProcResult Result;
+
+ hostMsg = (msgStruc *) hpiRxMsgPtr;
+ while(HostMsgNumWord > 0)
+ {
+ if(hostMsg->msgSize > (MAX_PARAMS + MSG_HEAD_SIZE) ||
+ hostMsg->msgSize < 0 )
+ {
+ /*
+ * Invalid parameters
+ */
+ ReportError(UNAUTHORIZED_MSG_SIZE, hostMsg->trx, 0xFF, MAX_PARAMS-2, (Uint8 *) hostMsg-4);
+ }
+ else
+ {
+ /*
+ * if there is a new host message, process the message in place.
+ * clear host port message flag to allow new message
+ * MMR_HPIC->DSPINT = 0;
+ */
+ Result = ProcessHostMsg(hostMsg);
+
+ /*
+ * if message can not be processed right way, put it into queue
+ */
+ if(Result == UN_PROCESSED)
+ {
+ qPut(hostMsg, HmsgQue);
+ }
+ }
+ HostMsgNumWord--;
+ /*
+ * point to next message
+ hostMsg = (msgStruc *) ( (Int8 *) hostMsg + sizeof(msgStruc));
+ */
+ hostMsg++;
+
+ }
+}
+/*|*
+ ************************************************************
+ * Routine Name: hpiXmtMsg(Void)
+ *
+ * Description: A backgroud task polls DSP message queue to host and
+ * send message to HPI transmit buffer.
+ *
+ ************************************************************
+*|*/
+Void hpiXmtMsg(Void)
+{
+ Int16 WordCount;
+/*
+ * check if last message has been sent
+ * if(MMR_HPIC->HINT == 0)
+ */
+ if(DspMsgNumWord == 0)
+ {
+ if(DspMsgNumWord = qGetAll((Int32 *) hpiTxMsgPtr, FastRspQue, HPI_TX_MAX_MSGS))
+ {
+ /*
+ * Interrupt host if there is a message in the queue
+ */
+ /*
+ * MMR_HPIC->HINT = 1;
+ */
+ * (Uint32 *) HPIC_ADDR |= 0x04;
+ }
+ else if(DspMsgNumWord = qGetAll((Int32 *) hpiTxMsgPtr, RspQue, HPI_TX_MAX_MSGS))
+ {
+ /*
+ * Interrupt host if there is a message in the queue
+ */
+ /*
+ * MMR_HPIC->HINT = 1;
+ */
+ * (Uint32 *) HPIC_ADDR |= 0x04;
+ }
+ }
+}
+ \ No newline at end of file
diff --git a/data/mnet/GP10/Dsp/shared/Makefile b/data/mnet/GP10/Dsp/shared/Makefile
new file mode 100644
index 0000000..bee7065
--- /dev/null
+++ b/data/mnet/GP10/Dsp/shared/Makefile
@@ -0,0 +1,25 @@
+#****************************************************************************
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#****************************************************************************
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+include ../dsp.mk
+
+SOURCE_LIST = dspinit.c dspmain.c dspmaint.c dspmh.c exmem.c HPI.c \
+hpirx.c hpitx.c inmem.c miscfunc.c msgstub.c queue.c REPORT.c
+
+
+OBJ_LIST = $(SOURCE_LIST:.c=.obj)
+MODULE_OBJS = $(foreach file, $(OBJ_LIST), $(OBJDIR)/$(file))
+
+all: $(MODULE_OBJS)
+
+# rule for C++ compilers
+$(OBJDIR)/%.obj : %.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
diff --git a/data/mnet/GP10/Dsp/shared/Msgstub.C b/data/mnet/GP10/Dsp/shared/Msgstub.C
new file mode 100644
index 0000000..9aebfdc
--- /dev/null
+++ b/data/mnet/GP10/Dsp/shared/Msgstub.C
@@ -0,0 +1,322 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* file name: msg_test.c
+*
+*****************************************************************************/
+#include "stdlib.h"
+#include "string.h"
+#include "gsmdata.h"
+#include "dsp/dsphmsg.h"
+#include "dsp6201.h"
+#include "comdata.h"
+
+Void send_test_msg(Void)
+{
+ volatile msgUnionStruc *TestMsg;
+ ccchInfoMsgStruc ccchMsg;
+ Uint16 ts;
+ Uint16 chType;
+
+ /*
+ * maps test message to HPI message buf
+ */
+
+ TestMsg = (msgUnionStruc *)hpiRxMsgPtr;
+/*
+ TestMsg->SyncWord = 0xAAAA;
+ TestMsg->tag = 0x1234;
+*/
+ TestMsg->trx = 0;
+ TestMsg->function = DIAGNOSTIC_MSG;
+ TestMsg->typeLoByte = MPH_DSP_SET_ID_REQ;
+ TestMsg->typeHiByte = MPH_DSP_SET_ID_REQ>>8;
+ TestMsg->msgSize = MSG_HEAD_SIZE + 2;
+ TestMsg->u.params[0] = 0x10;
+ TestMsg->u.params[1] = 2;
+
+ TestMsg += 1;
+ TestMsg->trx = 0;
+ TestMsg->function = DIAGNOSTIC_MSG;
+ TestMsg->typeLoByte = MPH_DSP_DIAG_PING_REQ;
+ TestMsg->typeHiByte = MPH_DSP_DIAG_PING_REQ>>8;
+
+ TestMsg->msgSize = MSG_HEAD_SIZE + 2;
+ TestMsg->u.params[0] = 0;
+ TestMsg->u.params[1] = 2;
+
+ HostMsgNumWord = 2;
+
+ TestMsg += 1;
+ memset((Uint8 *) TestMsg, 0, sizeof(msgStruc));
+
+ TestMsg->trx = 0;
+ TestMsg->function = CCCH_MANAGE_MSG;
+ TestMsg->typeLoByte = BCCH_INFO_REQ;
+ TestMsg->typeHiByte = BCCH_INFO_REQ >> 8;
+ TestMsg->msgSize = MSG_HEAD_SIZE + sizeof(ccchInfoMsgStruc);
+
+ ts = 0;
+ chType = 0x10;
+ TestMsg->u.ccchInfo.chanNum = (ts<<5) | chType;
+
+ TestMsg->u.ccchInfo.msgSize = 23;
+
+ TestMsg->u.ccchInfo.sysInfoType = SYS_INFO_2;
+
+
+ TestMsg->u.ccchInfo.sysInfo[0] = 0x59; /* L2 pseudo length */
+ TestMsg->u.ccchInfo.sysInfo[1] = 0x06;
+
+ TestMsg->u.ccchInfo.sysInfo[2] = 0x1A; /* message type */
+
+ TestMsg->u.ccchInfo.sysInfo[3] = 0x8E;
+
+ TestMsg->u.ccchInfo.sysInfo[19] = 0x01;
+
+
+ TestMsg->u.ccchInfo.sysInfo[20] = 0x01;
+ TestMsg->u.ccchInfo.sysInfo[21] = 0x04;
+ TestMsg->u.ccchInfo.sysInfo[22] = 0x00;
+
+ TestMsg->u.ccchInfo.startTime.IMM = 1;
+/*
+22 00 00 00 0c 00 11 00 80 00 02 17 16 06 1a 8e
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01
+01 04 08 01 00 00 ee ee ee ee ee ee ee ee ee ee
+ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+*/
+ HostMsgNumWord += 1;
+
+
+ TestMsg += 1;
+ memset((Uint8 *) TestMsg, 0, sizeof(msgStruc));
+
+ TestMsg->trx = 0;
+ TestMsg->function = CCCH_MANAGE_MSG;
+
+ TestMsg->typeLoByte = BCCH_INFO_REQ;
+ TestMsg->typeHiByte = BCCH_INFO_REQ >> 8;
+
+ TestMsg->msgSize = MSG_HEAD_SIZE + sizeof(ccchInfoMsgStruc);
+
+ ts = 0;
+ chType = 0x10;
+ TestMsg->u.ccchInfo.chanNum = (ts<<5) | chType;
+
+ TestMsg->u.ccchInfo.msgSize = 23;
+
+ TestMsg->u.ccchInfo.sysInfoType = SYS_INFO_3;
+
+ TestMsg->u.ccchInfo.sysInfo[0] = 0x49; /* L2 pseudo length */
+ TestMsg->u.ccchInfo.sysInfo[1] = 0x06;
+
+ TestMsg->u.ccchInfo.sysInfo[2] = 0x1B; /* message type */
+
+ TestMsg->u.ccchInfo.sysInfo[3] = 0x00; /* Cell Identity */
+ TestMsg->u.ccchInfo.sysInfo[4] = 0x01;
+
+
+ TestMsg->u.ccchInfo.sysInfo[5] = 0x13; /* MCC */
+ TestMsg->u.ccchInfo.sysInfo[6] = 0xF0;
+
+
+ TestMsg->u.ccchInfo.sysInfo[7] = 0x71; /* MNC */
+
+ TestMsg->u.ccchInfo.sysInfo[8] = 0x00; /* Loaction area identify */
+ TestMsg->u.ccchInfo.sysInfo[9] = 0x01;
+
+
+ TestMsg->u.ccchInfo.sysInfo[10] = 0x01; /* Control Channel Description */
+ TestMsg->u.ccchInfo.sysInfo[11] = 0x02; /* Num Paging Group */
+ TestMsg->u.ccchInfo.sysInfo[12] = 0x00;
+ TestMsg->u.ccchInfo.sysInfo[13] = 0x23;
+ TestMsg->u.ccchInfo.sysInfo[14] = 0x07;
+
+ TestMsg->u.ccchInfo.sysInfo[16] = 0x01;
+ TestMsg->u.ccchInfo.sysInfo[17] = 0x04;
+
+ TestMsg->u.ccchInfo.sysInfo[19] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[20] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[21] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[22] = 0x2b;
+
+
+ TestMsg->u.ccchInfo.startTime.IMM = 1;
+
+/*
+ 22 00 00 00 0c 00 11 00 80 00 03 17 12 06 1b 00
+ 01 13 f0 71 00 01 01 02 00 23 07 00 01 04 00 2b
+ 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+*/
+ HostMsgNumWord += 1;
+
+
+ TestMsg += 1;
+ memset((Uint8 *) TestMsg, 0, sizeof(msgStruc));
+
+ TestMsg->trx = 0;
+ TestMsg->function = CCCH_MANAGE_MSG;
+ TestMsg->typeLoByte = BCCH_INFO_REQ;
+ TestMsg->typeHiByte = BCCH_INFO_REQ >> 8;
+ TestMsg->msgSize = MSG_HEAD_SIZE + sizeof(ccchInfoMsgStruc);
+
+ ts = 0;
+ chType = 0x10;
+ TestMsg->u.ccchInfo.chanNum = (ts<<5) | chType;
+
+ TestMsg->u.ccchInfo.msgSize = 23;
+
+ TestMsg->u.ccchInfo.sysInfoType = SYS_INFO_4;
+
+ TestMsg->u.ccchInfo.sysInfo[0] = 0x49; /* L2 pseudo length */
+ TestMsg->u.ccchInfo.sysInfo[1] = 0x06;
+
+ TestMsg->u.ccchInfo.sysInfo[2] = 0x1C; /* message type */
+
+
+ TestMsg->u.ccchInfo.sysInfo[3] = 0x13; /* MCC */
+ TestMsg->u.ccchInfo.sysInfo[4] = 0xF0;
+
+
+ TestMsg->u.ccchInfo.sysInfo[5] = 0x71;
+ TestMsg->u.ccchInfo.sysInfo[6] = 0x00;
+
+
+ TestMsg->u.ccchInfo.sysInfo[7] = 0x01; /* MNC */
+ TestMsg->u.ccchInfo.sysInfo[8] = 07;
+
+ TestMsg->u.ccchInfo.sysInfo[10] = 01;
+ TestMsg->u.ccchInfo.sysInfo[11] = 04;
+
+ TestMsg->u.ccchInfo.sysInfo[13] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[14] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[15] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[16] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[17] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[18] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[19] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[20] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[21] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[22] = 0x2b;
+
+ TestMsg->u.ccchInfo.startTime.IMM = 1;
+/*
+ 22 00 00 00 0c 00 11 00 80 00 04 17 0c 06 1c 13
+ f0 71 00 01 07 00 01 06 00 2b 2b 2b 2b 2b 2b 2b
+ 2b 2b 2b 01 00 00
+*/
+ HostMsgNumWord += 1;
+
+
+ TestMsg += 1;
+ memset((Uint8 *) TestMsg, 0, sizeof(msgStruc));
+
+ TestMsg->trx = 0;
+
+ TestMsg->function = DCCH_MANAGE_MSG;
+
+ TestMsg->typeLoByte = DCH_CH_ACTIVATION_REQ;
+ TestMsg->typeHiByte = DCH_CH_ACTIVATION_REQ >> 8;
+ TestMsg->msgSize = MSG_HEAD_SIZE + sizeof(chActMsgStruc);
+
+ ts = 1;
+ chType = 1;
+ TestMsg->u.ccchInfo.chanNum = (ts<<5) | chType;
+
+ TestMsg->u.chActInfo.chModes.dtxSelect = 0;
+ TestMsg->u.chActInfo.chModes.chSelect = 1; /* select Speech */
+ TestMsg->u.chActInfo.chModes.chType = 0x08; /* TCHF */
+ TestMsg->u.chActInfo.chModes.dataRate = 0x01; /* GSM Speech Codec 1 */
+
+ HostMsgNumWord += 1;
+
+
+ TestMsg += 1;
+ memset((Uint8 *) TestMsg, 0, sizeof(msgStruc));
+
+ TestMsg->trx = 0;
+
+ TestMsg->function = TRX_MANAGE_MSG;
+
+ TestMsg->typeLoByte = DCH_SACCH_INFO_MOD_REQ;
+ TestMsg->typeHiByte = DCH_SACCH_INFO_MOD_REQ >> 8;
+ TestMsg->msgSize = MSG_HEAD_SIZE + 24;
+
+ TestMsg->u.params[0] = SYS_INFO_5;
+
+ TestMsg->u.ccchInfo.sysInfo[0] = 0x49; /* L2 pseudo length */
+ TestMsg->u.ccchInfo.sysInfo[1] = 0x06;
+
+ TestMsg->u.ccchInfo.sysInfo[2] = 0x1D; /* message type */
+
+ TestMsg->u.ccchInfo.sysInfo[3] = 0x8E; /* MCC */
+
+ TestMsg->u.ccchInfo.sysInfo[12] = 0x01;
+
+ TestMsg->u.ccchInfo.sysInfo[15] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[16] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[17] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[18] = 0x2b;
+
+ TestMsg->u.params[21] = 1;
+/*
+ 1b 00 00 00 10 00 1a 00 05 12 06 1d 8e 00 00 00
+ 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 2b
+ 2b 2b 2b 01 00 00
+*/
+ HostMsgNumWord += 1;
+
+
+ TestMsg += 1;
+ memset((Uint8 *) TestMsg, 0, sizeof(msgStruc));
+
+ TestMsg->trx = 0;
+
+ TestMsg->function = TRX_MANAGE_MSG;
+
+ TestMsg->typeLoByte = DCH_SACCH_INFO_MOD_REQ;
+ TestMsg->typeHiByte = DCH_SACCH_INFO_MOD_REQ >> 8;
+ TestMsg->msgSize = MSG_HEAD_SIZE + 24;
+
+ TestMsg->u.params[0] = SYS_INFO_6;
+
+ TestMsg->u.ccchInfo.sysInfo[0] = 0x49; /* L2 pseudo length */
+ TestMsg->u.ccchInfo.sysInfo[1] = 0x06;
+
+ TestMsg->u.ccchInfo.sysInfo[2] = 0x1E; /* message type */
+
+ TestMsg->u.ccchInfo.sysInfo[3] = 0x00;
+ TestMsg->u.ccchInfo.sysInfo[4] = 0x01;
+
+ TestMsg->u.ccchInfo.sysInfo[5] = 0x13;
+ TestMsg->u.ccchInfo.sysInfo[6] = 0xF0;
+
+
+ TestMsg->u.ccchInfo.sysInfo[7] = 0x71; /* MNC */
+ TestMsg->u.ccchInfo.sysInfo[8] = 00;
+
+ TestMsg->u.ccchInfo.sysInfo[9] = 01;
+ TestMsg->u.ccchInfo.sysInfo[10] = 23;
+
+ TestMsg->u.ccchInfo.sysInfo[11] = 0x01;
+
+ TestMsg->u.ccchInfo.sysInfo[12] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[13] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[14] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[15] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[16] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[17] = 0x2b;
+ TestMsg->u.ccchInfo.sysInfo[18] = 0x2b;
+
+ TestMsg->u.params[21] = 1;
+/*
+ 1b 00 00 00 10 00 1a 00 06 12 06 1e 00 01 13 f0
+ 71 00 01 23 01 2b 2b 2b 2b 2b 2b 2b 01 00 00
+*/
+ HostMsgNumWord += 1;
+
+}
+
diff --git a/data/mnet/GP10/Dsp/shared/QUEUE.C b/data/mnet/GP10/Dsp/shared/QUEUE.C
new file mode 100644
index 0000000..cadc118
--- /dev/null
+++ b/data/mnet/GP10/Dsp/shared/QUEUE.C
@@ -0,0 +1,240 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: queue.c
+*
+* Description:
+* This file contains functions that create the message queues, put messages
+* into the queues and get messages from the queues.
+*
+* Public Functions:
+* qCreate, qPut, qGet, qGetAll
+*
+* Private Functions:
+* None
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "dsp/dsphmsg.h"
+#include "dsp6201.h"
+#include "comdata.h"
+#include "intr.h"
+#include "dsprotyp.h"
+
+/************************************************************
+* Function Name: qCreate
+* Description: create a message queue
+*
+*
+************************************************************/
+qStruc *qCreate(Int16 NumberQ, Int16 Priority, qStruc *qName)
+{
+ Int16 qMemSize;
+ Int8 *memName;
+ Uint8 dummyArg;
+ qMemSize = NumberQ * sizeof(msgStruc) + QUE_HEAD_SIZE;
+ memName = (Int8 *) malloc(qMemSize);
+
+ if(memName == NULL)
+ {
+ ReportError(MALLOC, 0xFF, 0xFF, 0, &dummyArg);
+ }
+ else
+ {
+ qName = (qStruc *)memName;
+ qName->msgInIndex = 0;
+ qName->msgOutIndex = 0;
+ qName->qSize = NumberQ;
+ qName->qAttrb = Priority;
+ qName->msgCount = 0;
+ qName->msgOverflow = 0;
+ }
+ return(qName);
+}
+
+/************************************************************
+* Function Name: qPut
+* Description: put a message to a queue
+*
+*
+************************************************************/
+Bool qPut(msgStruc *msg, qStruc *qName)
+{
+ Bool result;
+ Int32 *wrPtr;
+ Int32 *rdPtr;
+ Int16 i;
+ Int16 reenable=FALSE;
+ Uint8 dummyArg;
+
+ if(!msg)
+ {
+ ReportError(NULL_MSG, 0xFF, 0xFF, 0, &dummyArg);
+ return(FAILURE);
+ }
+
+ if(qName->msgCount < qName->qSize)
+ {
+ /*
+ * queue is not full
+ */
+ wrPtr = (Int32 *) & (qName->qMsg);
+ wrPtr += qName->msgInIndex * sizeof(msgStruc)/4;
+ rdPtr = (Int32 *)msg;
+ /*
+ * copy message to queue
+ */
+ for(i=0; i<sizeof(msgStruc)/4; i++)
+ {
+ wrPtr[i] = rdPtr[i];
+ }
+
+ /*
+ * disable Serving Burst Interrupt only, Don't Disable GLOBAL INTERRUPT which inteferes
+ * DMA-BSP operation
+ */
+ INTR_DISABLE(CPU_INT8);
+
+ /*
+ * increment message count and input index
+ */
+ qName->msgCount++;
+ if ( ++qName->msgInIndex >= qName->qSize )
+ {
+ qName->msgInIndex = 0;
+ }
+
+ INTR_ENABLE(CPU_INT8);
+
+ result = SUCCESS;
+ }
+ else
+ {
+ /*
+ * Increment dropped message count. Note: This count is not
+ * yet reported to host. This reporting could be added later.
+ */
+ if ( qName->msgOverflow < MSG_OVERFLOW_MAX_COUNT )
+ qName->msgOverflow ++;
+
+ result = FAILURE;
+ }
+
+ /*
+ * If we disabled interrupts, re-enable them now
+ */
+ return(result);
+}
+
+/************************************************************
+* Function Name: qGet
+* Description: get a message from a queue
+*
+*
+************************************************************/
+Bool qGet(msgStruc *msg, qStruc *qName)
+{
+ Bool result;
+ Int32 *wrPtr;
+ Int32 *rdPtr;
+ Int16 i;
+ Uint8 dummyArg;
+
+ if(!msg)
+ {
+ ReportError(NULL_POINT, 0xFF, 0xFF, 0, &dummyArg);
+ return(FAILURE);
+ }
+
+ if(qName->msgCount > 0)
+ {
+ rdPtr = (Int32 *) & (qName->qMsg);
+ rdPtr += qName->msgOutIndex * sizeof(msgStruc)/4;
+ /*
+ * copy message from the queue
+ */
+ wrPtr = (Int32 *)msg;
+ for(i=0; i<sizeof(msgStruc)/4; i++)
+ {
+ wrPtr[i] = rdPtr[i];
+ }
+ /*
+ * Disable interrupts while decrementing message count
+ * and advancing msgOutIndex, then re-enable
+ */
+ INTR_DISABLE(CPU_INT8);
+ qName->msgCount--;
+ if ( ++qName->msgOutIndex >= qName->qSize )
+ {
+ qName->msgOutIndex = 0;
+ }
+ INTR_ENABLE(CPU_INT8);
+
+ result = SUCCESS;
+ }
+ else
+ {
+ result = FAILURE;
+ }
+
+ return(result);
+}
+
+/************************************************************
+* Function Name: qGetAll
+* Description: Gets all messages or up to given no. of messages
+* from a queue. If maxMsgs is 0, gets all messages else gets up to
+* maxMsgs.
+*
+************************************************************/
+Int16 qGetAll(Int32 *wrPtr, qStruc *qName, Uint8 maxMsgs)
+{
+ Int32 *rdPtr;
+ Int16 j, k;
+ Int8 wordCount = 0;
+ Int8 msgCount = 0;
+ Uint8 dummyArg;
+
+ if(!wrPtr)
+ {
+ ReportError(NULL_MSG, 0xFF, 0xFF, 0, &dummyArg);
+ return(msgCount);
+ }
+
+ k = 0;
+ while ((qName->msgCount > 0) && ((!maxMsgs) || (msgCount < maxMsgs)))
+ {
+ rdPtr = (Int32 *) & (qName->qMsg);
+ rdPtr += qName->msgOutIndex * sizeof(msgStruc)/4;
+ msgCount += 1;
+ /*
+ * Copy one message from the queue. If the last 4 bytes of the
+ * message are unused, use them to send the GSM frame number
+ */
+ if(rdPtr[0] > MAX_PARAMS)
+ {
+ for(j=0; j<sizeof(msgStruc)/4; j++) wrPtr[k++] = rdPtr[j];
+ }
+ else
+ {
+ for(j=0; j<sizeof(msgStruc)/4; j++) wrPtr[k++] = rdPtr[j];
+ wrPtr[k-1] = sysFrameNum.FN;
+ }
+ /*
+ * Disable interrupts while decrementing message count
+ * and advancing msgOutIndex, then re-enable
+ */
+ INTR_DISABLE(CPU_INT8);
+ qName->msgCount--;
+ if ( ++qName->msgOutIndex >= qName->qSize )
+ {
+ qName->msgOutIndex = 0;
+ }
+ INTR_ENABLE(CPU_INT8);
+ }
+ return(msgCount);
+}
+ \ No newline at end of file
diff --git a/data/mnet/GP10/Dsp/shared/dspmain.c b/data/mnet/GP10/Dsp/shared/dspmain.c
new file mode 100644
index 0000000..fb49dee
--- /dev/null
+++ b/data/mnet/GP10/Dsp/shared/dspmain.c
@@ -0,0 +1,255 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: dspmain.c
+*
+* Description:
+* This file contains the DSP main.
+*
+* Public Functions:
+* ulTchNetProc, dlTchNetProc
+*
+* Private Functions:
+* none
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "oamdata.h"
+#include "dsp6201.h"
+#include "dsp/dsphmsg.h"
+#include "diagdata.h"
+#include "bbdata.h"
+#include "dsprotyp.h"
+#include "agcdata.h"
+
+/*****************************************************************************
+*
+* Function: DSP main
+*
+* Description:
+* Initializes and drops into background event loop, which handles all HPI
+* messages.
+*
+* Inputs:
+* None
+*
+* Outputs:
+* None
+*
+******************************************************************************/
+void main(void)
+{
+ Uint8 on_off = 1;
+ Uint32 index = 0;
+ rspStruc msg;
+ Int32 i,j;
+ msgUnionStruc *dcchMsg;
+
+ /*
+ * set loopback mode as NO_LOOPBACK for normal operation
+ g_loopBackMode = LOCAL_LOOPBACK;
+ */
+ g_loopBackMode = NO_LOOPBACK;
+
+ // g_loopBackMode = LOCAL_LOOPBACK;
+ dsp_init();
+
+ board_init(); /* init EVM Board */
+ /*
+ * set external SBSRAM as half rate
+ */
+ //*(Uint32 *) 0x01800000 = 0x00003760;
+
+ /* set to DSP control (=0 dsp, =1 fpga control). */
+ /*
+ * enable DSPs frame/bit clock synchronization
+ * Turn Both LED2 Bit 7 and 8
+ */
+ AGC_SRC_SELECT_REG = 0x180;
+
+ /*
+ g_BBInfo[0].TNInfo[4].u.group1.tch.state = CHAN_ACTIVE;
+ g_BBInfo[0].TNInfo[4].u.group1.sacch.dlSigBuf->valid = 1;
+ g_BBInfo[0].TNInfo[1].u.group1.tch.state = CHAN_ACTIVE;
+ g_BBInfo[0].TNInfo[1].u.group1.sacch.state = CHAN_ACTIVE;
+ g_BBInfo[0].TNInfo[1].u.group1.sacch.dlSigBuf->valid = 1;
+ g_BBInfo[0].TNInfo[1].u.group1.tch.speechDataInd = IND_SPEECH;
+
+ g_BBInfo[0].TNInfo[2].u.group1.tch.state = CHAN_ACTIVE;
+ g_BBInfo[0].TNInfo[2].u.group1.sacch.state = CHAN_ACTIVE;
+ g_BBInfo[0].TNInfo[2].u.group1.sacch.dlSigBuf->valid = 1;
+ g_BBInfo[0].TNInfo[2].u.group1.tch.speechDataInd = IND_SPEECH;
+
+ send_test_msg();
+ */
+
+ /*
+ dlGroupVTableLpbkInit();
+ * Local loopback test
+ */
+ if(g_loopBackMode == LOCAL_LOOPBACK)
+ {
+ /*
+ tsConfigure(0, 0, GSM_GROUP_5);
+ tsConfigure(0, 1, GSM_GROUP_7);
+ tsConfigure(0, 2, GSM_GROUP_1);
+ tsConfigure(0, 3, GSM_GROUP_1);
+ tsConfigure(0, 4, GSM_GROUP_13);
+ tsConfigure(0, 5, GSM_GROUP_1);
+ tsConfigure(0, 6, GSM_GROUP_1);
+ tsConfigure(0, 7, GSM_GROUP_1);
+
+ ulGroupVTableLpbkInit();
+ ulGroupVIITableLpbkInit();
+
+
+ for (i = 0; i < 4 ; i++){
+ g_BBInfo[0].TNInfo[0].u.group5.sacch[i].state = CHAN_ACTIVE;
+ g_BBInfo[0].TNInfo[0].u.group5.sdcch[i].state = CHAN_ACTIVE;
+ }
+
+
+ for (i = 0; i <8 ; i++){
+ g_BBInfo[0].TNInfo[1].u.group7.sacch[i].state = CHAN_ACTIVE;
+ g_BBInfo[0].TNInfo[1].u.group7.sdcch[i].state = CHAN_ACTIVE;
+ }
+
+
+ g_BBInfo[0].TNInfo[2].u.group1.tch.state = CHAN_ACTIVE;
+ g_BBInfo[0].TNInfo[2].u.group1.sacch.state = CHAN_ACTIVE;
+ g_BBInfo[0].TNInfo[2].u.group1.sacch.dlSigBuf->valid = 1;
+ g_BBInfo[0].TNInfo[2].u.group1.tch.speechDataInd = IND_SPEECH;
+ g_BBInfo[0].TNInfo[2].u.group1.tch.vocAlgo = VOC_GSMF;
+ g_BBInfo[0].TNInfo[2].u.group1.tch.DLDtxMode = TRUE;
+ g_BBInfo[0].TNInfo[2].u.group1.tch.ULDtxMode = TRUE;
+
+ */
+ /*---------------------------------------------------
+ * Initialize TCH jitter buffer related parameters
+ *---------------------------------------------------*/
+ g_dlTchFrame[2].frameCount = 0;
+ g_dlTchFrame[2].readIndex = 0;
+ g_dlTchFrame[2].writeIndex = 0;
+ g_dlTchFrame[2].frameStarted = 0;
+
+
+ /*---------------------------------------------------
+ * Initialize SID frame count
+ *---------------------------------------------------*/
+ g_dlSidFrame[2].frameCount = 0;
+
+ /*-------------------------------------------------------
+ * Initialize agc, dynamic pwr control
+ * This simulates a channel activation msg in dcchmsg.c
+ *-------------------------------------------------------*/
+ initPower(& dcchMsg->u.chActInfo,
+ & g_BBInfo[0].TNInfo[2].u.group1.sacch);
+
+ /*
+ * init a TBF pair
+ */
+ g_tbfInfo[0][0].dlTbf.state = CHAN_ACTIVE;
+ g_tbfInfo[0][0].dlTbf.tfi = 0;
+ g_tbfInfo[0][0].dlTbf.timeSlotAllocation = 0x80;
+ g_tbfInfo[0][0].dlTbf.channelCodec = GPRS_CS_1;
+
+ g_tbfInfo[0][0].ulTbf.state = CHAN_ACTIVE;
+ g_tbfInfo[0][0].ulTbf.tfi = 0;
+ g_tbfInfo[0][0].ulTbf.tbfMode = TBF_DYNAMIC;
+ g_tbfInfo[0][0].ulTbf.timeSlotAllocation = 0x80;
+ g_tbfInfo[0][0].ulTbf.opMode.dynamic.usfTsMap = 0x00050000; /* USF 5 on Time Slot 4 */
+ g_tbfInfo[0][0].ulTbf.channelCodec = GPRS_CS_1;
+ g_tbfInfo[0][0].ulTbf.tai = 0;
+ g_tbfInfo[0][0].ulTbf.taiTimeSlot = 4;
+ g_tbfInfo[0][0].ulTbf.timingAdvance = 0;
+
+ sysSyncProc();
+
+ g_frmSync.state = SET_SYNC;
+
+ init_hw();
+ }
+
+ /* Bootstrap confirm message to the host */
+ msg.msgSize = 5;
+ msg.function = 0x10;
+ msg.typeHiByte = 0x20;
+ msg.typeLoByte = 0x00;
+ msg.trx = 0;
+ msg.params[0] = g_encryptionCapability;
+
+ sendMsgHost(&msg);
+
+ /* Request tables for downlink TX power characteristics */
+ msg.msgSize = 4;
+ msg.function = TRX_MANAGE_MSG;
+ msg.typeHiByte = REQ_CONFIG_RADIO_TX_PWR >> 8;
+ msg.typeLoByte = REQ_CONFIG_RADIO_TX_PWR;
+ msg.trx = 0;
+ sendMsgHost(&msg);
+
+ while(1)
+ {
+ hpiRcvMsg();
+ dspMsgHandler();
+ hpiXmtMsg();
+
+ if(g_loopBackMode == LOCAL_LOOPBACK)
+ {
+ mod2DmodLpbk();
+ }
+ /*------------------------------------------------------
+ * Report diags and errors that accumulate for output
+ * once per superframe (and might otherwise flood Host)
+ *-----------------------------------------------------*/
+ ReportDiagToHost();
+ ReportErrorToHost();
+ }
+}
+
+/*****************************************************************************
+*
+* Function: ulTchNetProc
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void ulTchNetProc(void)
+{
+
+}
+
+/*****************************************************************************
+*
+* Function: dlTchNetProc
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dlTchNetProc(void)
+{
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/shared/dspvector.asm b/data/mnet/GP10/Dsp/shared/dspvector.asm
new file mode 100644
index 0000000..757ff5e
--- /dev/null
+++ b/data/mnet/GP10/Dsp/shared/dspvector.asm
@@ -0,0 +1,49 @@
+*****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************
+
+* Vector Table for JetCell C6201 DSP
+
+ .global _c_int00
+
+ .text
+ .sect .vec
+_Reset:
+ b _c_int00
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+_NMI
+ b _NMI
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+
+ReservedInt:
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ nop
+ \ No newline at end of file
diff --git a/data/mnet/GP10/Dsp/shared/exmem.c b/data/mnet/GP10/Dsp/shared/exmem.c
new file mode 100644
index 0000000..ed825f8
--- /dev/null
+++ b/data/mnet/GP10/Dsp/shared/exmem.c
@@ -0,0 +1,27 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* File: exmem.c
+*
+* Description:
+* This file includes global data files and allocates memory for the
+* EXGLOB variables. The linker command file assigns this file's data
+* to external DSP memory.
+*
+*****************************************************************************/
+#define ALLOCATE_MEMORY_EXTERNAL
+
+#include "agcdata.h"
+#include "bbdata.h"
+#include "codec.h"
+#include "comdata.h"
+#include "dem_globs.h"
+#include "diagdata.h"
+#include "gsmdata.h"
+#include "oamdata.h"
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/shared/fileio.c b/data/mnet/GP10/Dsp/shared/fileio.c
new file mode 100644
index 0000000..cfef830
--- /dev/null
+++ b/data/mnet/GP10/Dsp/shared/fileio.c
@@ -0,0 +1,143 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+**
+** Filename: fileio.c
+**
+** Description:
+** This file contains misc test functions in support of the test environemt.
+** This file nor the routines in this file should be used in the actual
+** deliverable code.
+**
+*****************************************************************************/
+#include <stdio.h>
+#undef CHAN_CODEC_DEF
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "bbproto.h"
+
+/*****************************************************************************
+** Routine Name: unpackFromFile
+**
+** Description:
+** Reads packed data from the specified file into an unpacked array.
+** numWords 16 bits words are read from the input file and stored in
+** the input array unpacked.
+**
+** Method:
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** f - specifies the input file to read
+** input - the unpacked array to store the unpacked file data
+** numWords - number of 16 bit words to read from the file
+**
+** Returns:
+** Int res
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+Int unpackFromFile(FILE *f,Char *input, Char numWords)
+{
+ Int byteRead, res, numWordsProc;
+ UInt i;
+ UInt j;
+
+ numWordsProc=0;
+
+ res=1;
+
+ while ( (numWordsProc <numWords) & (res != EOF) & (res != 0) )
+ {
+ res=fscanf(f,"%x", &byteRead);
+
+ if ((res ==0) | (res==EOF))
+ return(res);
+
+ for (i=0,j=0x8000; i < 16 ; i++)
+ {
+ if (byteRead & j)
+ *input++=1;
+ else
+ *input++=0;
+
+ j = (j/2);
+ }
+
+ numWordsProc++;
+ }
+ return(numWordsProc);
+}
+
+/*****************************************************************************
+** Routine Name: packToFile
+**
+** Description:
+** Writes unpacked data from the specified array into a packed file.
+** numBits bits are read from the input array and stored in the packed file.
+** The leftover bits in the last word if there are any are coded as "0".
+**
+** Method:
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** f - specifies the output file to write
+** output - the unpacked array to write out
+** numBits - number of bits to write to the file
+**
+** Returns:
+** None
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+
+void packToFile(FILE *f, UChar *output, Int numBits)
+{
+ Int j, i, word, numFullWords, numRemainBits, numWordsProc;
+ UInt k;
+
+ i=0;
+ numWordsProc=0;
+ numFullWords = (numBits/16);
+ numRemainBits = (numBits - (numFullWords*16));
+
+ while (i < numBits)
+ {
+ word = 0x0000;
+ if (numWordsProc < numFullWords)
+ {
+ for (j=0,k=0x8000; j <16; j++)
+ {
+ if (output[i] ==1) word |= k;
+ k = (k / 2);
+ i++;
+ }
+ fprintf(f,"%04x\n", word);
+ numWordsProc++;
+ }
+ else
+ {
+ for (j=0,k=0x8000; j < numRemainBits ; j++)
+ {
+ if (output[i] ==1) word |= k;
+ k = (k / 2);
+ i++;
+ }
+
+ fprintf(f,"%04x\n", word);
+ numWordsProc++;
+ }
+
+ }
+
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Dsp/shared/hpirx.c b/data/mnet/GP10/Dsp/shared/hpirx.c
new file mode 100644
index 0000000..6313d4d
--- /dev/null
+++ b/data/mnet/GP10/Dsp/shared/hpirx.c
@@ -0,0 +1,17 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: hpirx.c
+*
+* Description:
+* This file allocates memory for variables and buffers used for Rx HPI.
+* The linker command file assigns these to the appropriate memory location.
+*
+******************************************************************************/
+#include "dsp/dsptypes.h"
+
+volatile Int32 HostMsgNumWord;
+Uint8 rxMsgBuf[0x200];
+
diff --git a/data/mnet/GP10/Dsp/shared/hpitx.c b/data/mnet/GP10/Dsp/shared/hpitx.c
new file mode 100644
index 0000000..3db28af
--- /dev/null
+++ b/data/mnet/GP10/Dsp/shared/hpitx.c
@@ -0,0 +1,17 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: hpirx.c
+*
+* Description:
+* This file allocates memory for variables and buffers used for Tx HPI.
+* The linker command file assigns these to the appropriate memory location.
+*
+******************************************************************************/
+#include "dsp/dsptypes.h"
+
+volatile Int32 DspMsgNumWord;
+Uint8 txMsgBuf[0x200];
+
diff --git a/data/mnet/GP10/Dsp/shared/inmem.c b/data/mnet/GP10/Dsp/shared/inmem.c
new file mode 100644
index 0000000..e0124a1
--- /dev/null
+++ b/data/mnet/GP10/Dsp/shared/inmem.c
@@ -0,0 +1,27 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* File: inmem.c
+*
+* Description:
+* This file includes global data files and allocates memory for the
+* INGLOB variables. The linker command file assigns this file's data
+* to internal DSP memory.
+*
+*****************************************************************************/
+#define ALLOCATE_MEMORY_INTERNAL
+
+#include "agcdata.h"
+#include "bbdata.h"
+#include "codec.h"
+#include "comdata.h"
+#include "dem_globs.h"
+#include "diagdata.h"
+#include "gsmdata.h"
+#include "oamdata.h"
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/shared/miscfunc.c b/data/mnet/GP10/Dsp/shared/miscfunc.c
new file mode 100644
index 0000000..d85bbd7
--- /dev/null
+++ b/data/mnet/GP10/Dsp/shared/miscfunc.c
@@ -0,0 +1,329 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+**
+** Filename: miscfunc.c
+**
+** Description:
+** This file contains various generic/misc routines.
+**
+*****************************************************************************/
+#include <stdio.h>
+#undef CHAN_CODEC_DEF
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "bbproto.h"
+
+/*****************************************************************************
+** ROUTINE NAME: unpackFromByteBuffer
+**
+** Description:
+**
+** Method:
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+**
+** Returns:
+** None
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+
+void unpackFromByteBuffer(UChar *input, UChar *output, Int numBits)
+{
+ UChar byteRead;
+ UChar numBytesProc;
+ UChar numFullBytes;
+ UChar numRemainBits;
+ UInt i;
+ UInt j;
+
+ numBytesProc = 0;
+ numFullBytes = numBits/8;
+ numRemainBits = (numBits - (numFullBytes*8));
+
+ /*
+ * First process the full words in the buffer
+ */
+ while(numBytesProc < numFullBytes)
+ {
+ byteRead = *input++;
+ j = 0x01;
+
+ for(i=0; i<8; i++)
+ {
+ if(byteRead & j)
+ {
+ *output++ = 1;
+ }
+ else
+ {
+ *output++ = 0;
+ }
+
+ j <<= 1;
+ }
+
+ numBytesProc++;
+ }
+
+ /*
+ * Now process the remaining bits in the last word
+ */
+ byteRead = *input;
+ j = 0x01;
+
+ for(i=0; i < numRemainBits ; i++)
+ {
+ if(byteRead & j)
+ {
+ *output++ = 1;
+ }
+ else
+ {
+ *output++ = 0;
+ }
+
+ j <<= 1;
+ }
+
+}
+
+/*****************************************************************************
+** Routine Name: packToByteBuffer
+**
+** Description:
+**
+** Method:
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+**
+** Returns:
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+void packToByteBuffer(UChar *input, UChar *output, Int numBits)
+{
+ Int j, i, numFullBytes, numRemainBits, numBytesProc;
+ UChar k;
+ UChar byte;
+
+ i=0;
+ numBytesProc=0;
+ numFullBytes = (numBits/8);
+ numRemainBits = (numBits - (numFullBytes*8));
+
+ while (i < numBits)
+ {
+ byte = 0x00;
+ if (numBytesProc < numFullBytes)
+ {
+ for (j=0,k=0x01; j <8; j++)
+ {
+ if (input[i]==1)
+ byte |= k;
+ k <<= 1;
+ i++;
+ }
+ *output++ = byte;
+ numBytesProc++;
+ }
+ else
+ {
+ for (j=0,k=0x01; j < numRemainBits ; j++)
+ {
+ if (input[i] ==1)
+ byte |= k;
+ k <<= 1;
+ i++;
+ }
+ *output++ = byte;
+ numBytesProc++;
+ }
+
+ }
+
+}
+
+
+/*****************************************************************************
+** ROUTINE NAME: reverseBits
+**
+** Description:
+**
+** Method:
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+**
+** Returns:
+** None
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+
+UShort reverseBits(UShort value)
+{
+ UInt i;
+ UShort value2;
+ Bool bit;
+
+ value2 = 0x0000;
+
+ for(i=0; i<15; i++)
+ {
+ bit = (value>>i) & 0x0001;
+ value2 |= bit;
+ value2 <<= 1;
+ }
+
+ bit = (value>>15) & 0x0001;
+ value2 |= bit;
+
+ return(value2);
+}
+
+
+/*****************************************************************************
+** ROUTINE NAME: unpackByteMSB
+**
+** Description:
+**
+** Method:
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+**
+** Returns:
+** None
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+
+void unpackByteMSB(UChar *input, UChar *output, Int numBits)
+{
+ UChar byteRead;
+ UChar numBytesProc;
+ UChar numFullBytes;
+ UChar numRemainBits;
+ UInt i;
+ UInt j;
+
+ numBytesProc = 0;
+ numFullBytes = numBits/8;
+ numRemainBits = (numBits - (numFullBytes*8));
+
+ /*
+ * First process the full words in the buffer
+ */
+ while(numBytesProc < numFullBytes)
+ {
+ byteRead = *input++;
+
+ j = 7;
+
+ for(i=0; i<8; i++)
+ {
+ *output++ = (byteRead>>j) & 1;
+ j -= 1;
+ }
+ numBytesProc++;
+ }
+
+ /*
+ * Now process the remaining bits in the last word
+ */
+ j = 7;
+
+ for(i=0; i < numRemainBits ; i++)
+ {
+ *output++ = (byteRead>>j) & 1;
+ j -= 1;
+ }
+
+}
+
+
+
+/*****************************************************************************
+** Routine Name: packToByteMSB
+**
+** Description:
+**
+** Method:
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+**
+** Returns:
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+void packToByteMSB(UChar *input, UChar *output, Int numBits)
+{
+ Int j, i, numFullBytes, numRemainBits, numBytesProc;
+ UChar k;
+ UChar byte;
+
+ i=0;
+ numBytesProc=0;
+ numFullBytes = (numBits/8);
+ numRemainBits = (numBits - (numFullBytes*8));
+
+ while (i < numBits)
+ {
+ byte = 0x00;
+ if (numBytesProc < numFullBytes)
+ {
+ for (j=0,k=7; j <8; j++)
+ {
+ byte |= input[i]<<k;
+ k--;
+ i++;
+ }
+ *output++ = byte;
+ numBytesProc++;
+ }
+ else
+ {
+ for (j=0,k=7; j < numRemainBits ; j++)
+ {
+ byte |= input[i]<<k;
+ k--;
+ i++;
+ }
+ *output++ = byte;
+ numBytesProc++;
+ }
+
+ }
+
+}
+
+
+
+ \ No newline at end of file
diff --git a/data/mnet/GP10/Dsp/shared/report.c b/data/mnet/GP10/Dsp/shared/report.c
new file mode 100644
index 0000000..5055ce4
--- /dev/null
+++ b/data/mnet/GP10/Dsp/shared/report.c
@@ -0,0 +1,560 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: report.c
+*
+* Description:
+* This file contains functions that report diagnostic messages and error
+* messages to the Host. Each enabled message is sent once per superframe.
+*
+* Public Functions:
+* ReportDiagToHost, ReportErrorToHost
+*
+* Private Functions:
+* ReportCapturedBurst
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "oamdata.h"
+#include "dsp/dsphmsg.h"
+#include "bbdata.h"
+#include "diagdata.h"
+#include "intr.h"
+#include "dsprotyp.h"
+
+#define MAX_DIAGS_PER_CALL 8 // Max diag report msgs to send per function call
+
+/*****************************************************************************
+*
+* Function: ReportCapturedBurst
+*
+* Description:
+* Sends captured burst (raw I/Q samples) host
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void SendCapturedBurst(Uint8 rfCh, Uint8 timeSlot, Uint32 *data)
+{
+ msgStruc diagMsg;
+ Int16 i, j;
+ Int16 blockStartIndex;
+ Uint32 *outBuf;
+
+ diagMsg.msgSize = 4*SAMPLES_PER_CAPTURE_MSG + 8;
+ diagMsg.function = DIAGNOSTIC_MSG;
+ diagMsg.trx = rfCh;
+ diagMsg.typeLoByte= MPH_DSP_DIAG_BURST_CAPTURE_RSP;
+ diagMsg.typeHiByte= MPH_DSP_DIAG_BURST_CAPTURE_RSP>>8;
+ diagMsg.params[0] = timeSlot;
+ diagMsg.params[1] = 0;
+ diagMsg.params[2] = 0;
+
+ /*
+ * Ready pointer to copy longwords
+ */
+ outBuf = (Uint32*)(&diagMsg.params[4]);
+
+ for(j=0; j<NUM_CAPTURE_MSGS; j++)
+ {
+ diagMsg.params[3] = j; /* block number */
+ blockStartIndex = j * SAMPLES_PER_CAPTURE_MSG;
+ for(i=0; i<SAMPLES_PER_CAPTURE_MSG; i++)
+ outBuf[i] = data[i+blockStartIndex];
+ SendMsgHost_Que( & diagMsg);
+ }
+}
+
+/*****************************************************************************
+*
+* Function: initMsReport
+*
+* Description:
+* Initializes MS report variables for one logical channel
+*
+* Input:
+* rfCh RF channel index
+* reportIndex GSM time slot (Group1) or subchannel table index (Group5)
+*
+* Output:
+* g_diagData.msReport[][] initialized structure variables
+*
+******************************************************************************/
+ProcResult initMsReport(Uint8 rfCh, Uint8 reportIndex)
+{
+ t_diagMsReport *msReport = & g_diagData.msReport[rfCh][reportIndex];
+
+ msReport->cumErrs = 0;
+ msReport->cumBits = 0;
+ msReport->cumFrameErrs = 0;
+ msReport->cumFrames = 0;
+ msReport->sacchCount = 0;
+ msReport->minToa = 99;
+ msReport->maxToa = -99;
+ msReport->cumToa = 0;
+}
+
+/*****************************************************************************
+*
+* Function: initGprsMsReport
+*
+* Description:
+* Initializes MS report variables for one logical channel
+*
+* Input:
+* rfCh RF channel index
+* reportIndex GSM time slot (Group1) or subchannel table index (Group5)
+*
+* Output:
+* g_diagData.msReport[][] initialized structure variables
+*
+******************************************************************************/
+ProcResult initGprsMsReport(Uint8 rfCh, Uint8 tfi)
+{
+ t_diagGprsMsReport *gprsMsReport;
+
+ gprsMsReport = & g_diagData.gprsMsReport[rfCh][tfi];
+
+ gprsMsReport->cumErrs = 0;
+ gprsMsReport->cumBits = 0;
+ gprsMsReport->cumFrameErrs = 0;
+ gprsMsReport->cumFrames = 0;
+ gprsMsReport->rlcBlkCount = 0;
+ gprsMsReport->minToa = 99;
+ gprsMsReport->maxToa = -99;
+ gprsMsReport->cumToa = 0;
+}
+
+
+/*****************************************************************************
+*
+* Function: initSdcch8Report
+*
+* Description:
+* Initializes Sdcch8 report variables for one logical channel
+*
+* Input:
+* rfCh RF channel index
+* reportIndex subchannel table index (Group7)
+*
+* Output:
+* g_diagData.sdcch8Report[][] initialized structure variables
+*
+******************************************************************************/
+ProcResult initSdcch8Report(Uint8 rfCh, Uint8 reportIndex)
+{
+ t_diagMsReport *msReport = & g_diagData.sdcch8Report[rfCh][reportIndex];
+
+ msReport->cumErrs = 0;
+ msReport->cumBits = 0;
+ msReport->cumFrameErrs = 0;
+ msReport->cumFrames = 0;
+ msReport->sacchCount = 0;
+ msReport->minToa = 99;
+ msReport->maxToa = -99;
+ msReport->cumToa = 0;
+}
+
+/*****************************************************************************
+* Function: ReportDiagToHost
+*
+* Description:
+* Sends diagnostic reports to host every superframe. Disables burst
+* interrupt, then re-enables when finished.
+*
+******************************************************************************/
+void ReportDiagToHost(void)
+{
+ Uint8 rfCh;
+ Uint8 timeSlot;
+ Uint8 tfi;
+ Uint8 channelNumber;
+ Uint8 reportIndex;
+ Uint8 index;
+ Uint16 count;
+ Uint16 limit;
+ t_SACCHInfo *sacchInfo;
+ t_diagMsReport *msReport;
+ t_diagGprsMsReport *gprsMsReport;
+ Uint8 params[48];
+ Int16 shortValue;
+ Uint8 diagSent;
+ tbfStruct *tbf;
+
+ /*-------------------------------------------------------------
+ * Send diagnostic message to host every superframe
+ *------------------------------------------------------------*/
+ if ( sysFrameNum.t2==0 && sysFrameNum.t3==0 && g_diagData.enable )
+ {
+ /*-----------------------------------------------------------------
+ * Disable further diagnostic reports for this superframe (in case
+ * this function is called from inside and outside of an ISR)
+ *----------------------------------------------------------------*/
+ g_diagData.enable = FALSE;
+
+ /*-----------------------------------------------------------------
+ * Check for MS_REPORT diagnostic (TCH or SDCCH) from any TS.
+ * If reports are not activated on any slot, skip this altogether.
+ *----------------------------------------------------------------*/
+ if ( g_diagData.msReportTsMask )
+ {
+ for ( rfCh=0; rfCh<NUM_RFS_PER_DSP; rfCh++ )
+ {
+ for ( timeSlot=0; timeSlot<NUM_TN_PER_RF; timeSlot++ )
+ {
+ /*-----------------------------------------------------------
+ * Check whether report has been requested for this time slot
+ *-----------------------------------------------------------*/
+ if ( g_diagData.msReportTsMask & (1<<timeSlot) )
+ {
+ /*--------------------------------------------------------
+ * If this time slot is Group V, check NUM_SDCCH_SUBCHANS
+ * subchannels of SDCCH. Else, check the one TCH channel.
+ *--------------------------------------------------------*/
+ if ( g_BBInfo[rfCh].TNInfo[timeSlot].groupNum==GSM_GROUP_5 )
+ {
+ limit = NUM_SDCCH_SUBCHANS;
+ }
+ else if ( g_BBInfo[rfCh].TNInfo[timeSlot].groupNum==GSM_GROUP_7)
+ {
+ limit = NUM_SDCCH8_SUBCHANS;
+ }
+ else
+ {
+ limit = 1;
+ }
+ /*--------------------------------------------------------
+ * Check the channel or each subchannel as determied above
+ *--------------------------------------------------------*/
+ for ( count=0; count<limit; count++ )
+ {
+ switch( g_BBInfo[rfCh].TNInfo[timeSlot].groupNum)
+ {
+ /*--------------------------------------------------------
+ * If Group 1 TCH, set its SACCH Info and MS Report pointers
+ *--------------------------------------------------------*/
+ case GSM_GROUP_1:
+ sacchInfo = & g_BBInfo[rfCh].TNInfo[timeSlot].u.group1.sacch;
+ reportIndex = timeSlot;
+ msReport = & g_diagData.msReport[rfCh][reportIndex];
+ channelNumber = timeSlot;
+ break;
+
+ /*---------------------------------------------------------------
+ * If Group 5 SDCCH, use count as the subchannel in setting SACCH
+ * Info and MS Report pointers, eventually hitting all of them
+ *---------------------------------------------------------------*/
+ case GSM_GROUP_5:
+ sacchInfo = & g_BBInfo[rfCh].TNInfo[timeSlot].u.group5.sacch[count];
+ reportIndex = NUM_TN_PER_RF + count;
+ msReport = & g_diagData.msReport[rfCh][reportIndex];
+ channelNumber = (1<<5) | (count<<3) | timeSlot;
+ break;
+
+ /*---------------------------------------------------------------
+ * If Group 7 SDCCH, use count as the subchannel in setting SACCH
+ * Info and SDCCH8 Report pointers, eventually hitting all of them
+ *---------------------------------------------------------------*/
+ case GSM_GROUP_7:
+ sacchInfo = & g_BBInfo[rfCh].TNInfo[timeSlot].u.group7.sacch[count];
+ reportIndex = count;
+ msReport = & g_diagData.sdcch8Report[rfCh][reportIndex];
+ channelNumber = (1<<6) | (count<<3) | timeSlot;
+ break;
+
+
+ /*--------------------------------------------------------
+ * If Group 13 PDCH4, set appropriate pointers for type approval report
+ *--------------------------------------------------------*/
+ case GSM_GROUP_13:
+ sacchInfo = NULL;
+ reportIndex = timeSlot;
+ msReport = & g_diagData.msReport[rfCh][reportIndex];
+ channelNumber = timeSlot;
+ msReport->sacchCount = 1; // only done to trigger report below.
+ break;
+ }
+
+ /*-----------------------------------------------------------
+ * Finally, if the MS Report has accumulated values, send them
+ *-----------------------------------------------------------*/
+
+ if ( msReport->sacchCount != 0 )
+ {
+ INTR_DISABLE(CPU_INT8);
+ params[0] = (msReport->cumErrs >> 24) & 0xff;
+ params[1] = (msReport->cumErrs >> 16) & 0xff;
+ params[2] = (msReport->cumErrs >> 8) & 0xff;
+ params[3] = msReport->cumErrs & 0xff;
+ params[4] = (msReport->cumBits >> 24) & 0xff;
+ params[5] = (msReport->cumBits >> 16) & 0xff;
+ params[6] = (msReport->cumBits >> 8) & 0xff;
+ params[7] = msReport->cumBits & 0xff;
+ params[8] = msReport->sacchCount;
+ if (sacchInfo != NULL)
+ {
+ params[9] = (sacchInfo->ulsigstren.rxLevAve >> 8) & 0xff;
+ params[10] = sacchInfo->ulsigstren.rxLevAve & 0xff;
+ }
+
+ params[11] = msReport->minToa;
+ params[12] = msReport->maxToa;
+ params[13] = msReport->cumToa;
+
+ if (sacchInfo != NULL)
+ {
+ params[14] = sacchInfo->timingAdvance;
+ params[15] = sacchInfo->powerLevel;
+ }
+
+ else /* used by l1proxy to determine if TCH or PDCH */
+ {
+ params[14] = 0xff;
+ params[15] = 0xff;
+ }
+
+ params[16] = (msReport->cumFrameErrs >> 8) & 0xff;
+ params[17] = msReport->cumFrameErrs & 0xff;
+ params[18] = (msReport->cumFrames >> 8) & 0xff;
+ params[19] = msReport->cumFrames & 0xff;
+
+ initMsReport(rfCh, reportIndex);
+ INTR_ENABLE(CPU_INT8);
+ sendDiagMsg(MS_REPORT, rfCh, channelNumber, 20, params);
+ }
+
+ }
+ }
+ }
+ }
+ }
+ /*-----------------------------------------------------------------
+ * Check for GPRS_MS_REPORT diagnostic (PDCH) from any TFI. If
+ * reports are not activated on any TFI, skip this altogether.
+ *----------------------------------------------------------------*/
+ if ( g_diagData.gprsMsReportTfiMask )
+ {
+ diagSent = 0;
+ for ( rfCh=0; rfCh<NUM_RFS_PER_DSP; rfCh++ )
+ {
+ for ( tfi=0; tfi<MAX_TFI; tfi++ )
+ {
+ /*--------------------------------------------------------------
+ * Check whether UL TBF is active and whether a report has been
+ * requested for its TFI. Also limit the number of diags sent.
+ *--------------------------------------------------------------*/
+ tbf = & g_tbfInfo[rfCh][tfi];
+ if ( (tbf->ulTbf.state == CHAN_ACTIVE) &&
+ (g_diagData.gprsMsReportTfiMask & (1L<<tfi)) &&
+ (diagSent < MAX_DIAGS_PER_CALL) )
+ {
+ sacchInfo = & g_BBInfo[rfCh].TNInfo[timeSlot].u.group1.sacch;
+ gprsMsReport = & g_diagData.gprsMsReport[rfCh][tbf->ulTbf.tfi];
+ /*--------------------------------------------------------------
+ * If RLC blocks have been received this interval, send a report
+ * and clear the counters for the next interval
+ *--------------------------------------------------------------*/
+ if ( gprsMsReport->rlcBlkCount != 0 )
+ {
+ INTR_DISABLE(CPU_INT8);
+ params[0] = (gprsMsReport->cumErrs >> 24) & 0xff;
+ params[1] = (gprsMsReport->cumErrs >> 16) & 0xff;
+ params[2] = (gprsMsReport->cumErrs >> 8) & 0xff;
+ params[3] = gprsMsReport->cumErrs & 0xff;
+
+ params[4] = (gprsMsReport->cumBits >> 24) & 0xff;
+ params[5] = (gprsMsReport->cumBits >> 16) & 0xff;
+ params[6] = (gprsMsReport->cumBits >> 8) & 0xff;
+ params[7] = gprsMsReport->cumBits & 0xff;
+
+ params[8] = tbf->ulTbf.tfi;
+
+ params[9] = (tbf->ulTbf.accum.MSPower >> 8) & 0xff;
+ params[10] = tbf->ulTbf.accum.MSPower & 0xff;
+
+ params[11] = gprsMsReport->minToa;
+ params[12] = gprsMsReport->maxToa;
+ params[13] = gprsMsReport->cumToa;
+
+ params[14] = tbf->ulTbf.timingAdvance;
+ params[15] = 0;
+ params[16] = (gprsMsReport->cumFrameErrs >> 8) & 0xff;
+ params[17] = gprsMsReport->cumFrameErrs & 0xff;
+ params[18] = (gprsMsReport->cumFrames >> 8) & 0xff;
+ params[19] = gprsMsReport->cumFrames & 0xff;
+
+ params[20] = gprsMsReport->rlcBlkCount;
+ params[21] = tbf->ulTbf.channelCodec;
+ params[22] = tbf->dlTbf.channelCodec;
+ params[23] = tbf->ulTbf.sigqual.berAve >> 8;
+ params[24] = tbf->ulTbf.sigqual.berAve;
+
+ params[25] = tbf->ulTbf.sigqual.blerAve >> 8;
+ params[26] = tbf->ulTbf.sigqual.blerAve;
+
+ initGprsMsReport(rfCh, tbf->ulTbf.tfi);
+ INTR_ENABLE(CPU_INT8);
+ sendDiagMsg(GPRS_MS_REPORT, rfCh, 0, 27, params);
+ diagSent += 1;
+ }
+ }
+ }
+ }
+ }
+ /*-----------------------------------------------------------------
+ * Check for Burst Capture ready. After sending, turn it off.
+ *----------------------------------------------------------------*/
+ if ( g_diagData.burstCapture.state == CAPTURE_DONE )
+ {
+ SendCapturedBurst(g_diagData.burstCapture.rfCh,
+ g_diagData.burstCapture.timeSlot,
+ g_diagData.burstCapture.data);
+
+ g_diagData.burstCapture.state = CAPTURE_OFF;
+ }
+ /*-----------------------------------------------------------------
+ * Check for DC Offset diagnostic. Remember it's in 1/256 units.
+ *----------------------------------------------------------------*/
+ if ( g_diagData.dcOffsetReport )
+ {
+ count = 0;
+ INTR_DISABLE(CPU_INT8);
+ for ( rfCh=0; rfCh<NUM_RFS_PER_DSP; rfCh++ )
+ {
+ for ( index=0; index<NUM_TN_PER_RF+NUM_SDCCH_SUBCHANS+1; index++ )
+ {
+ shortValue = g_DcOffset[rfCh][index].I >> 8;
+ params[count++] = (shortValue >> 8) & 0xff;
+ params[count++] = shortValue & 0xff;
+ shortValue = g_DcOffset[rfCh][index].Q >> 8;
+ params[count++] = (shortValue >> 8) & 0xff;
+ params[count++] = shortValue & 0xff;
+ }
+
+ for ( index=0; index<NUM_SDCCH8_SUBCHANS; index++ )
+ {
+ shortValue = g_Dc_7_Offset[rfCh][index].I >> 8;
+ params[count++] = (shortValue >> 8) & 0xff;
+ params[count++] = shortValue & 0xff;
+ shortValue = g_Dc_7_Offset[rfCh][index].Q >> 8;
+ params[count++] = (shortValue >> 8) & 0xff;
+ params[count++] = shortValue & 0xff;
+ }
+
+
+ }
+ INTR_ENABLE(CPU_INT8);
+
+ sendDiagMsg(DC_OFFSET_REPORT, 0, 0, count, params);
+ }
+ /*-----------------------------------------------------------------
+ * Check for DL underflow, overflow and out-of-seq. First load FN.
+ *----------------------------------------------------------------*/
+ params[0] = sysFrameNum.t1 >> 8;
+ params[1] = sysFrameNum.t1 & 0xff;
+ params[2] = sysFrameNum.t2;
+ params[3] = sysFrameNum.t3;
+
+ for ( rfCh=0; rfCh<NUM_RFS_PER_DSP; rfCh++ )
+ {
+ for ( timeSlot=0; timeSlot<8; timeSlot++ )
+ {
+ /*---------------------------------------------
+ * Downlink speech frame underflow
+ *--------------------------------------------*/
+ if ( g_DlUnderflowCount[rfCh][timeSlot] > 0 )
+ {
+ INTR_DISABLE(CPU_INT8);
+ params[4] = g_DlUnderflowCount[rfCh][timeSlot] >> 8;
+ params[5] = g_DlUnderflowCount[rfCh][timeSlot] & 0xff;
+ g_DlUnderflowCount[rfCh][timeSlot] = 0;
+ INTR_ENABLE(CPU_INT8);
+ sendDiagMsg(SPEECH_UNDERFLOW, rfCh, timeSlot, 6, params);
+ }
+ /*---------------------------------------------
+ * Downlink speech frame overflow
+ *--------------------------------------------*/
+ if ( g_DlOverflowCount[rfCh][timeSlot] > 0 )
+ {
+ INTR_DISABLE(CPU_INT8);
+ params[4] = g_DlOverflowCount[rfCh][timeSlot] >> 8;
+ params[5] = g_DlOverflowCount[rfCh][timeSlot] & 0xff;
+ g_DlOverflowCount[rfCh][timeSlot] = 0;
+ INTR_ENABLE(CPU_INT8);
+ sendDiagMsg(SPEECH_OVERFLOW, rfCh, timeSlot, 6, params);
+ }
+ /*---------------------------------------------
+ * Downlink speech frame out of sequence
+ *--------------------------------------------*/
+ if ( g_DlOutOfSequenceCount[rfCh][timeSlot] > 0 )
+ {
+ INTR_DISABLE(CPU_INT8);
+ params[4] = g_DlOutOfSequenceCount[rfCh][timeSlot] >> 8;
+ params[5] = g_DlOutOfSequenceCount[rfCh][timeSlot] & 0xff;
+ g_DlOutOfSequenceCount[rfCh][timeSlot] = 0;
+ INTR_ENABLE(CPU_INT8);
+ sendDiagMsg(SPEECH_OUT_OF_SEQ, rfCh, timeSlot, 6, params);
+ }
+ }
+ }
+ }
+ /*-------------------------------------------------------------
+ * Enable diagnostic report for next superframe
+ *------------------------------------------------------------*/
+ if ( sysFrameNum.t2!=0 || sysFrameNum.t3!=0 )
+ {
+ g_diagData.enable = TRUE;
+ }
+}
+
+/*****************************************************************************
+* Function: ReportErrorToHost
+*
+* Description:
+* Sends error reports to host once every superframe. Disables burst
+* interrupt, then re-enables when finished.
+*
+******************************************************************************/
+void ReportErrorToHost(void)
+{
+ Uint16 rfCh, timeSlot;
+ Uint8 params[40];
+
+ /*-------------------------------------------------------------
+ * Send diagnostic message to host every superframe
+ *------------------------------------------------------------*/
+ if ( sysFrameNum.t2==0 && sysFrameNum.t3==0 && g_ErrorEnable )
+ {
+ /*-----------------------------------------------------------------
+ * Disable further diagnostic report for this superframe
+ *----------------------------------------------------------------*/
+ g_ErrorEnable = FALSE;
+
+ /*-----------------------------------------------------------------
+ * Check for error conditions here...
+ *----------------------------------------------------------------*/
+ }
+ /*-------------------------------------------------------------
+ * Enable diagnostic report for next superframe
+ *------------------------------------------------------------*/
+ if ( sysFrameNum.t2!=0 || sysFrameNum.t3!=0 )
+ {
+ g_ErrorEnable = TRUE;
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/Makefile b/data/mnet/GP10/Dsp/synchctrl/Makefile
new file mode 100644
index 0000000..804badc
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/Makefile
@@ -0,0 +1,129 @@
+#****************************************************************************
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#****************************************************************************
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+include ../dsp.mk
+.SUFFIXES:
+.SUFFIXES: .c .asm .obj
+
+SOURCE_LIST = accum.c agc.c bcch.c burstisr.c DYNPWRCTRL.c encrypt.c \
+encryptA52only.asm encryptA51A52.asm frameisr.c frmsync.c groupini.c \
+grouptbl.c hoProc.c PAGCH.c RTSCHECK.c SACCH.c SDCCH.c SYNCMSG.c tch.c
+
+MODULE_OBJS = $(OBJDIR)/accum.obj \
+ $(OBJDIR)/agc.obj \
+ $(OBJDIR)/bcch.obj \
+ $(OBJDIR)/burstisr.obj \
+ $(OBJDIR)/DYNPWRCTRL.obj \
+ $(OBJDIR)/encrypt.obj \
+ ../encryptA52only.obj \
+ ../encryptA51A52.obj \
+ ../decryptopt.obj \
+ $(OBJDIR)/frameisr.obj \
+ $(OBJDIR)/frmsync.obj \
+ $(OBJDIR)/groupini.obj \
+ $(OBJDIR)/grouptbl.obj \
+ $(OBJDIR)/hoProc.obj \
+ $(OBJDIR)/PAGCH.obj \
+ $(OBJDIR)/RTSCHECK.obj \
+ $(OBJDIR)/SACCH.obj \
+ $(OBJDIR)/SDCCH.obj \
+ $(OBJDIR)/SYNCMSG.obj \
+ $(OBJDIR)/tch.obj \
+ $(OBJDIR)/pdch.obj
+
+all: $(MODULE_OBJS)
+
+# rule for C++ compiles
+$(OBJDIR)/%.obj : %.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+../%.obj : %.asm
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(ASM_FLAGS) $<
+
+$(OBJDIR)/agc.obj : agc.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/bcch.obj : bcch.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/burstisr.obj : burstisr.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/DYNPWRCTRL.obj : DYNPWRCTRL.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/encrypt.obj : encrypt.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+../encryptA52only.obj : encryptA52only.ASM
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(ASM_FLAGS) $<
+
+../encryptA51A52.obj : encryptA51A52.ASM
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(ASM_FLAGS) $<
+
+../decryptopt.obj : decryptopt.ASM
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(ASM_FLAGS) $<
+
+$(OBJDIR)/frameisr.obj : frameisr.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/frmsync.obj : frmsync.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/groupini.obj : groupini.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/grouptbl.obj : grouptbl.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/PAGCH.obj : PAGCH.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/RTSCHECK.obj : RTSCHECK.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/SACCH.obj : SACCH.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/SDCCH.obj : SDCCH.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/SYNCMSG.obj : SYNCMSG.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/tch.obj : tch.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/hoProc.obj : hoProc.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
+
+$(OBJDIR)/pdch.obj : pdch.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(DSPCC) $(CC_FLAGS) $(CC_INCLUDE) $<
diff --git a/data/mnet/GP10/Dsp/synchctrl/accum.c b/data/mnet/GP10/Dsp/synchctrl/accum.c
new file mode 100644
index 0000000..287ad0d
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/accum.c
@@ -0,0 +1,1183 @@
+ /****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: accum.c
+*
+* Description:
+* This file contains functions that process accumulate power, BER and TOA.
+*
+* Public Functions:
+* accumPower, accumBer
+*
+* Private Functions:
+* accumToa
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "oamdata.h"
+#include "dsp/dsphmsg.h"
+#include "bbdata.h"
+#include "dsprotyp.h"
+#include "l1config.h"
+#include "diagdata.h"
+#include "agcdata.h"
+#include "dem_const.h"
+#include "codec.h"
+
+/*****************************************************************************
+*
+* Function: accumPower
+*
+* Description:
+* Accumulates MS power for agc and uplink dyn power ctrl.
+* Increments dynamic power report counter.
+* Intended for Burst 3 of 0,1,2,3.
+*
+* Input:
+* rfCh RF channel index
+* timeSlot GSM time slot
+* groupNum GSM Group number
+* chanSel Logical channel type (i.e. SACCH, TCH, ...)
+* sacchInfo ptr to updated SACCH Info structure
+* TBF GPRS - pointer to temp block flow
+*
+* Output:
+* sacchInfo ptr to updated SACCH Info structure
+* .MSPowerAccumFull MS power in all TCH frames of SACCH multiframe.
+* .MSPowerAccumSub MS power in DTX (SACCH) frames (dB relative to FS)
+* .MSPowerAccum MS power in all frames (SACCH + TCH)
+* .rcvPowerNormSmooth Smoothed, normalized rcvPower value used for
+* ul_agc(), dyn pwr ctrl.
+*
+******************************************************************************/
+ProcResult accumPower(Uint8 rfCh, Uint8 timeSlot, t_groupNum groupNum,
+ t_chanSel chanSel, t_SACCHInfo *sacchInfo, tbfStruct *TBF)
+{
+ t_TNInfo *ts;
+ Int16 currentRxLev;
+ t_ULSignalStrength *sigS;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_1:
+ /*-------------------------------------------------------------------
+ * If channel is active and DPC Hold is off, then accumulate power
+ *-------------------------------------------------------------------*/
+ if( sacchInfo->state == CHAN_ACTIVE && !sacchInfo->dpcHoldFlag )
+ {
+ sigS = & sacchInfo->ulsigstren;
+ currentRxLev = computeUplinkRxLev(sigS);
+
+ /*----------------------------------------------------------
+ * For all burst phases except hoProc/idle, accumulate power
+ * Sub, Full and smooth received power for AGC.
+ * Note: Accumulate Sub over SACCH and 8 potential SID frames
+ * (total of 12 per SACCH interval. Accumulate Full over all
+ * non-idle frames (total of 100 per SACCH interval).
+ *----------------------------------------------------------*/
+ if ( chanSel == SACCH || chanSel == SACCH4 )
+ {
+ sacchInfo->MSPowerAccumFull += currentRxLev;
+ sacchInfo->MSPowerAccumSub += currentRxLev;
+ if ( g_AGC_ON ) {
+ sigS = & sacchInfo->ulsigstren;
+ rcvPwrSmoothingFilter(sigS, g_ULBurstData.rcvPower);
+ }
+ }
+ else if( chanSel == TCHF )
+ {
+ sacchInfo->MSPowerAccumFull += currentRxLev;
+
+ /*-------------------------------------------------------------------
+ * Also accumulate power of potential SID frames into Sub (as well as
+ * Full). Always include SID frames in AGC smoothing; include non-SID
+ * frames in AGC only if uplink DTX is not currently in use.
+ *-------------------------------------------------------------------*/
+ if( ts->u.group1.ulIndex==((12-timeSlot) & 0x7) && ts->ulTblIndex<8 )
+ {
+ sacchInfo->MSPowerAccumSub += currentRxLev;
+ if ( g_AGC_ON ) {
+ sigS = & sacchInfo->ulsigstren;
+ rcvPwrSmoothingFilter(sigS, g_ULBurstData.rcvPower);
+ }
+ }
+ else
+ {
+ if ( g_AGC_ON && !ts->u.group1.tch.ulDtxUsed ) {
+ sigS = & sacchInfo->ulsigstren;
+ rcvPwrSmoothingFilter(sigS, g_ULBurstData.rcvPower);
+ }
+ }
+ /*-------------------------------------------------------------------
+ * If uplink DTX is used at any time within SACCH interval, latch it
+ *-------------------------------------------------------------------*/
+ if ( ts->u.group1.tch.ulDtxUsed )
+ {
+ ts->u.group1.tch.ulDtxUsed104 = TRUE;
+ }
+ }
+ /*----------------------------------------------------------
+ * In final burst (hoProc/idle), set final power
+ *----------------------------------------------------------*/
+ else if ( chanSel == SACCH_OR_IDLE )
+ {
+ /*------------------------------------------------------------------
+ * Choose 100-burst Full average (four bursts of SACCH + 96 bursts of
+ * TCH) if uplink DTX was never used in this SACCH interval; choose
+ * 12-burst Sub average (4 bursts of SACCH plus 8 SID) if uplink DTX
+ * was used at any time during the SACCH interval.
+ *------------------------------------------------------------------*/
+ if ( ts->u.group1.tch.ulDtxUsed104 )
+ {
+ sacchInfo->MSPowerAccum = sacchInfo->MSPowerAccumSub / 12;
+ }
+ else
+ {
+ sacchInfo->MSPowerAccum = sacchInfo->MSPowerAccumFull / 100;
+ }
+ /* Clear power accumulators and UL DTX latch for next SACCH interval */
+ sacchInfo->MSPowerAccumSub = 0;
+ sacchInfo->MSPowerAccumFull = 0;
+ ts->u.group1.tch.ulDtxUsed104 = FALSE;
+
+ /* Used for periodic interference reporting defined by Intave parameter */
+ if( timeSlot == 7) {
+ g_IntRprtCntr += 1;
+ }
+ }
+ }
+
+ /*-------------------------------------------------------------------
+ * Calculate co-channel interference only for Group 1, DPC held or not
+ *-------------------------------------------------------------------*/
+ else
+ {
+ /*----------------------------------------------------------
+ * In final burst (hoProc/idle), set final Power for int. processing
+ *----------------------------------------------------------*/
+ if ( chanSel == SACCH_OR_IDLE )
+ {
+ sacchInfo->MSPowerAccumFull += currentRxLev;
+ sacchInfo->MSPowerAccum = sacchInfo->MSPowerAccumFull / 4;
+
+ /* clear sacch, tch power for next sacch multiframe */
+ sacchInfo->MSPowerAccumFull = 0;
+ sacchInfo->MSPowerAccumSub = 0;
+
+ /* Used for periodic interference reporting defined by Intave parameter */
+ if( timeSlot == 7) {
+ g_IntRprtCntr += 1;
+ }
+ }
+ }
+ break;
+
+ case GSM_GROUP_5:
+ if( sacchInfo->state == CHAN_ACTIVE && !sacchInfo->dpcHoldFlag )
+ {
+ sigS = & sacchInfo->ulsigstren;
+ currentRxLev = computeUplinkRxLev(sigS);
+
+ if ( chanSel == SDCCH || chanSel == SDCCH4 )
+ {
+ sacchInfo->MSPowerAccumSub += currentRxLev;
+ if(g_AGC_ON) {
+ rcvPwrSmoothingFilter(sigS, g_ULBurstData.rcvPower);
+ }
+ }
+ if ( chanSel == SACCH || chanSel == SACCH4 )
+ {
+ sacchInfo->MSPowerAccumSub += currentRxLev;
+ if(g_AGC_ON) {
+ sigS = & sacchInfo->ulsigstren;
+ rcvPwrSmoothingFilter(sigS, g_ULBurstData.rcvPower);
+ }
+ if ( chanSel == SACCH4 )
+ {
+ sacchInfo->MSPowerAccum = sacchInfo->MSPowerAccumSub / 12;
+
+ /* clear power accumulator on this subchan for next SACCH interval */
+ sacchInfo->MSPowerAccumSub = 0;
+ }
+ }
+ }
+ break;
+
+
+
+ case GSM_GROUP_7:
+ if( sacchInfo->state == CHAN_ACTIVE && !sacchInfo->dpcHoldFlag )
+ {
+ sigS = & sacchInfo->ulsigstren;
+ currentRxLev = computeUplinkRxLev(sigS);
+
+ if ( chanSel == SDCCH || chanSel == SDCCH4 )
+ {
+ if(g_AGC_ON) {
+ sigS = & sacchInfo->ulsigstren;
+ rcvPwrSmoothingFilter(sigS, g_ULBurstData.rcvPower);
+ }
+ }
+ if ( chanSel == SACCH || chanSel == SACCH4 )
+ {
+ sacchInfo->MSPowerAccumSub += currentRxLev;
+ if(g_AGC_ON) {
+ sigS = & sacchInfo->ulsigstren;
+ rcvPwrSmoothingFilter(sigS, g_ULBurstData.rcvPower);
+ }
+ if ( chanSel == SACCH4)
+ {
+ sacchInfo->MSPowerAccum = sacchInfo->MSPowerAccumSub / 12;
+
+ /* clear power accumulator on this subchan for next SACCH interval */
+ sacchInfo->MSPowerAccumSub = 0;
+ }
+ }
+ }
+
+
+
+
+ break;
+ case GSM_GROUP_13:
+ if ( TBF!=NULL && TBF->ulTbf.state==CHAN_ACTIVE)
+ {
+ /* GPRS */
+ sigS = & TBF->ulTbf.sigstren;
+ currentRxLev = computeUplinkRxLev(sigS);
+
+ if ( chanSel == PDCH || chanSel == PDCH4 )
+ {
+ TBF->ulTbf.accum.MSPowerSub += currentRxLev;
+ if(g_AGC_ON) {
+ rcvPwrSmoothingFilter(sigS, g_ULBurstData.rcvPower);
+ }
+ if ( chanSel == PDCH4 )
+ {
+ TBF->ulTbf.accum.MSPower = TBF->ulTbf.accum.MSPowerSub / 4;
+
+ /* clear power accumulator on this subchan for next RLC block */
+ TBF->ulTbf.accum.MSPowerSub = 0;
+ }
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return SUCCESS;
+}
+
+
+/*****************************************************************************
+*
+* Function: computeUplinkRxLev
+*
+* Decription:
+* Compute uplink RXLEV of burst using rcvPower (dBr) and
+* current rxgain (0-0x3ff) as input. All other terms are
+* measured calibration constants specific to GP10 H/W.
+*
+* Input:
+* TBF->ulTbf.sigstren for GPRS
+* or
+* sacchInfo->ulsigstren for voice
+*
+* Output:
+* RxLev current uplink value
+*
+******************************************************************************/
+Int16 computeUplinkRxLev(t_ULSignalStrength *sigstren)
+{
+ Int16 currentRxLev;
+
+ currentRxLev = g_MeasAgcDpcDbm + DBM_2_RXLEV_CONV_FACTOR
+ + (((sigstren->rxgain - g_MeasAgcDpcRxgain)
+ * g_gainStepsPerDb.inverseSlope) >> DIVISION_FACTOR);
+
+ if(currentRxLev < 0) { /* Limit to a positive range */
+ currentRxLev = 0;
+ }
+
+ return (currentRxLev);
+}
+
+/*****************************************************************************
+*
+* Function: accumToa
+*
+* Decription:
+* Accumulates MS TOA.
+* Intended for SACCH Burst 3 of 0,1,2,3 and
+*
+* Input:
+* rfCh RF channel index
+* timeSlot GSM time slot
+* groupNum GSM Group number (I or V)
+* subChan subchannel (if SDCCH)
+* chanSel logical channel type
+* sacchInfo ptr to SACCH Info structure
+* TBF GPRS - pointer to temp block flow
+*
+* Output:
+* sacchInfo ptr to updated SACCH Info structur
+* .toaAccumSub TOA on DTX frames
+* .toaAccum TOA on all frames
+* .dynPwrRprtCntr incremented dynamic pwr control count
+*
+******************************************************************************/
+ProcResult accumToa(Uint8 rfCh, Uint8 timeSlot, t_groupNum groupNum,
+ Uint8 subChan, t_chanSel chanSel, tbfStruct *TBF)
+{
+ t_diagMsReport *msReport;
+ t_diagGprsMsReport *gprsMsReport;
+ t_DLSigBufs *ptcchMsg;
+ t_PTCCHInfo *ptcch;
+ t_TNInfo *ts;
+ t_SACCHInfo *sacchInfo;
+ Uint8 tfi;
+ Uint8 currentTAI;
+
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ switch(groupNum)
+ {
+ case GSM_GROUP_11:
+ case GSM_GROUP_13:
+ if ( TBF )
+ {
+ /*-------------------------------------------------------------------
+ * For all burst phases, accumulate TOA
+ *-------------------------------------------------------------------*/
+ TBF->ulTbf.accum.toaSub += g_ULBurstData.toa;
+ tfi = TBF->ulTbf.tfi;
+
+ /*-------------------------------------------------------------------
+ * If GPRS MS Report enabled for this TFI, save min/max TOA
+ *-------------------------------------------------------------------*/
+ if ( g_diagData.gprsMsReportTfiMask & (1L<<tfi) )
+ {
+ gprsMsReport = & g_diagData.gprsMsReport[rfCh][tfi];
+
+ /*----------------------------------------------------------
+ * Update min and max TOA. This runs over PDCH interval.
+ *----------------------------------------------------------*/
+ if ( g_ULBurstData.toa < gprsMsReport->minToa )
+ gprsMsReport->minToa = g_ULBurstData.toa;
+ if ( g_ULBurstData.toa > gprsMsReport->maxToa )
+ gprsMsReport->maxToa = g_ULBurstData.toa;
+ }
+
+ /*-----------------------------------------------------------------
+ * In final burst phase, set final TOA, check whether to adjust TA
+ *-----------------------------------------------------------------*/
+ if ( chanSel == PDCH4 )
+ {
+ /*----------------------------------------------------------
+ * Average TOA over last RLC block, then clear accum value
+ *----------------------------------------------------------*/
+ TBF->ulTbf.accum.toa = (TBF->ulTbf.accum.toaSub+2)>>2;
+ TBF->ulTbf.accum.toaSub = 0;
+
+ /*----------------------------------------------------------------
+ * If GPRS MS Report enabled for this TFI, accumulate TOA averages
+ *----------------------------------------------------------------*/
+ if ( g_diagData.gprsMsReportTfiMask & (1L<<tfi) )
+ {
+ gprsMsReport->cumToa += TBF->ulTbf.accum.toa;
+ }
+
+ /*----------------------------------------------------------
+ * If SACCH passed parity, adjust TA and reset lostCount
+ *----------------------------------------------------------*/
+ if( ! g_ULCCHData.ulcchword0.bitval.fireStatus && TBF->ulTbf.accum.toa != 0 )
+ {
+ /*-----------------------------------------------------------------------
+ * Allow TA to adjust only if MS is already using most recent commanded TA,
+ * FOR GPRS, NOT SURE WHERE toaLastGoodActual GETS POPULATED. MAY DELETE
+ * THIS CHECK!!!!
+ *-----------------------------------------------------------------------*/
+ if(TBF->ulTbf.accum.toaLastGoodActual == TBF->ulTbf.timingAdvance)
+ {
+ /*----------------------------------------------------------
+ * If TOA is within allowed range, update TA to be sent to MS
+ *----------------------------------------------------------*/
+ if( TBF->ulTbf.accum.toa>=NB_TOA_MIN && TBF->ulTbf.accum.toa<=NB_TOA_MAX )
+ {
+ /*
+ * adjust TA by 1 bit at a time
+ */
+ if (TBF->ulTbf.accum.toa > 0)
+ {
+ TBF->ulTbf.timingAdvance += 1;
+ }
+ else
+ {
+ TBF->ulTbf.timingAdvance -= 1;
+ }
+ sendDiagMsg(0x68, rfCh, timeSlot, 1, (Uint8*)(&TBF->ulTbf.accum.toa));
+
+ /*
+ * limit TA to 0-63
+ */
+ if (TBF->ulTbf.timingAdvance < 0)
+ {
+ TBF->ulTbf.timingAdvance = 0;
+ }
+ else if (TBF->ulTbf.timingAdvance > 63)
+ {
+ TBF->ulTbf.timingAdvance = 63;
+ }
+
+
+
+ switch(ts->groupNum){
+
+ case GSM_GROUP_13:
+ currentTAI = ts->u.group13.currentTAI;
+ ptcch = &(ts->u.group13.ptcch);
+
+ break;
+
+ case GSM_GROUP_11:
+
+ currentTAI = ts->u.group11.currentTAI;
+ ptcch = &(ts->u.group11.ptcch);
+ break;
+ default:
+ break;
+ }
+
+
+ ptcchMsg = ptcch->dlSigBuf;
+
+
+ if (currentTAI >= 0 && currentTAI <= 15){
+
+ ptcchMsg->numMsgsReady++;
+ ptcchMsg->data[ptcchMsg->readIndex][0] = currentTAI;
+ ptcchMsg->data[ptcchMsg->readIndex][1] = TBF->ulTbf.tai;
+ ptcchMsg->data[ptcchMsg->readIndex][2] = TBF->ulTbf.timingAdvance;
+ ptcchMsg->data[ptcchMsg->readIndex][3] = TBF->ulTbf.taiTimeSlot;
+ }
+ else
+ {
+ /* Invalid TAI */
+ sendDiagMsg ( 0x71, rfCh, timeSlot, 1, (Uint8*)(&TBF->ulTbf.tai));
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+ break;
+
+ case GSM_GROUP_1:
+ case GSM_GROUP_5:
+ case GSM_GROUP_7:
+
+ if(groupNum == GSM_GROUP_1) {
+ sacchInfo = & ts->u.group1.sacch;
+ msReport = & g_diagData.msReport[rfCh][timeSlot];
+ }
+ else if (groupNum == GSM_GROUP_5) {
+ sacchInfo = & ts->u.group5.sacch[subChan];
+ msReport = & g_diagData.msReport[rfCh][NUM_TN_PER_RF+subChan];
+ } else if (groupNum == GSM_GROUP_7) {
+ sacchInfo = & ts->u.group7.sacch[subChan];
+ msReport = & g_diagData.sdcch8Report[rfCh][subChan];
+
+ }
+
+ /*-------------------------------------------------------------------
+ * For all burst phases, if DPC Hold is off, then accumulate TOA
+ *-------------------------------------------------------------------*/
+ if ( !sacchInfo->dpcHoldFlag )
+ {
+ sacchInfo->toaAccumSub += g_ULBurstData.toa;
+ }
+
+ /*-------------------------------------------------------------------
+ * If MS Report enabled for this TS and DPC Hold off, save min/max TOA
+ *-------------------------------------------------------------------*/
+ if ( g_diagData.msReportTsMask & (1<<timeSlot) && !sacchInfo->dpcHoldFlag )
+ {
+ /*----------------------------------------------------------
+ * Update min and max TOA. This runs over SACCH interval.
+ *----------------------------------------------------------*/
+ if ( g_ULBurstData.toa < msReport->minToa )
+ msReport->minToa = g_ULBurstData.toa;
+ if ( g_ULBurstData.toa > msReport->maxToa )
+ msReport->maxToa = g_ULBurstData.toa;
+ }
+ /*-----------------------------------------------------------------
+ * In final burst phase, set final TOA, check whether to adjust TA
+ *-----------------------------------------------------------------*/
+ if ( ((chanSel == SACCH4) || (chanSel == SACCH8)) && !sacchInfo->dpcHoldFlag )
+ {
+ /*----------------------------------------------------------
+ * Average TOA over 4 bursts of SACCH interval, then clear
+ * accumulating value. Increment dyn report counter, which
+ * is reset by UL dynamic power control (dynpwrctrl.c).
+ *----------------------------------------------------------*/
+ sacchInfo->toaAccum = (sacchInfo->toaAccumSub+2)>>2;
+ sacchInfo->toaAccumSub = 0;
+
+ if(sacchInfo->dynPwrRprtCntr < g_DynPwrOAMInfo.ulsigstren.numRxSigSamples)
+ {
+ sacchInfo->dynPwrRprtCntr += 1;
+ }
+
+ /*----------------------------------------------------------
+ * If MS Report enabled for this TS, accumulate TOA averages
+ *----------------------------------------------------------*/
+ if ( g_diagData.msReportTsMask & (1<<timeSlot) )
+ {
+ msReport->cumToa += sacchInfo->toaAccum;
+ }
+
+ /*----------------------------------------------------------
+ * If SACCH passed parity, adjust TA and reset lostCount
+ *----------------------------------------------------------*/
+ if( ! g_ULCCHData.ulcchword0.bitval.fireStatus && sacchInfo->toaAccum != 0 )
+ {
+ /*-----------------------------------------------------------------------
+ * Allow TA to adjust only if MS is already using most recent commanded TA
+ *-----------------------------------------------------------------------*/
+ if(sacchInfo->toaLastGoodActual == sacchInfo->timingAdvance)
+ {
+ /*----------------------------------------------------------
+ * If TOA is within allowed range, update TA to be sent to MS
+ *----------------------------------------------------------*/
+ if( sacchInfo->toaAccum>=NB_TOA_MIN && sacchInfo->toaAccum<=NB_TOA_MAX )
+ {
+ /*
+ * adjust TA by 1 bit at a time
+ */
+ if (sacchInfo->toaAccum > 0)
+ {
+ sacchInfo->timingAdvance += 1;
+ }
+ else
+ {
+ sacchInfo->timingAdvance -= 1;
+ }
+ sendDiagMsg(0x67, rfCh, timeSlot, 1, (Uint8*)(&sacchInfo->toaAccum));
+
+ /*
+ * limit TA to 0-63
+ */
+ if (sacchInfo->timingAdvance < 0)
+ {
+ sacchInfo->timingAdvance = 0;
+ }
+ else if (sacchInfo->timingAdvance > 63)
+ {
+ sacchInfo->timingAdvance = 63;
+ }
+ }
+ /*----------------------------------------------------------
+ * If TOA is not within allowed range, send diag message
+ *----------------------------------------------------------*/
+ else
+ {
+ sendDiagMsg ( INVALID_TIMING_ADV, rfCh, timeSlot, 1,
+ (Uint8*)(&sacchInfo->toaAccum));
+ }
+ }
+ sacchInfo->lostCount = 0;
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return SUCCESS;
+}
+
+/*****************************************************************************
+*
+* Function: accumBer
+*
+* Decription:
+* Accumulates bit errors and frame errors for diagnostic reports
+*
+* Input:
+* rfCh RF channel index
+* timeSlot GSM time slot
+* groupNum GSM Group number (I or V)
+* chanSel logical channel type (TCH or SACCH)
+* subChan subchannel (if SDCCH)
+* sacchInfo ptr to SACCH Info structure
+*
+* Output:
+* sacchInfo ptr to updated SACCH Info structure
+* .bitErrorAccum updated number of bit errors
+* .bitCountAccum updated number of bits checked
+*
+******************************************************************************/
+ProcResult accumBer(Uint8 rfCh, Uint8 timeSlot, t_groupNum groupNum,
+ t_chanSel chanSel, Uint8 subChan, t_SACCHInfo *sacchInfo,
+ Bool dtxUsed, Bool dtxSid)
+{
+ t_diagMsReport *msReport;
+
+ /*------------------------------------------------------------------------
+ * Traffic channel, TCH/FS or FACCH. Accumulate only if DPC Hold is off.
+ *------------------------------------------------------------------------*/
+ if ( chanSel == TCHF && !sacchInfo->dpcHoldFlag )
+ {
+ /*------------------------------------------------------------------
+ * If FACCH, accumulate CCHData's nErrs and use nbr FACCH bits/frame.
+ * A lot of false FACCH detections are generated in DTX mode, so
+ * accum only if ULDTX is off or if this is a SID frame.
+ *-----------------------------------------------------------------*/
+ if ( g_ULCCHData.ulcchword0.bitval.bufferValid )
+ {
+ if ( !dtxUsed || dtxSid )
+ {
+ /* Limit one frame's BER contribution to 13% */
+ if ( g_ULCCHData.nErrs > (NUM_BER_BITS_FACCH_FRAME*13/100) )
+ g_ULCCHData.nErrs = (NUM_BER_BITS_FACCH_FRAME*13/100);
+
+ /* Accumulate bit errors and total bit count */
+ sacchInfo->bitErrorAccum += g_ULCCHData.nErrs;
+ sacchInfo->bitCountAccum += NUM_BER_BITS_FACCH_FRAME;
+
+ /* Accumulate frame errors and frame count */
+ if ( g_ULCCHData.ulcchword0.bitval.fireStatus )
+ {
+ sacchInfo->frameErrorAccum += 1;
+ }
+ sacchInfo->frameCountAccum += 1;
+ }
+ }
+ /*----------------------------------------------------------------
+ * If TCH, accumulate TCHData's nErrs and use nbr TCH bits/frame.
+ * If non-DTX, observe all frames. If DTX, observe only SID.
+ * For both, do not accumulate TCH errors in DCCH Report Only,
+ * which is a diagnostic test mode that will disrupt handover.
+ *----------------------------------------------------------------*/
+ else
+ {
+ if ( (!dtxUsed || dtxSid) && !g_diagData.dcchReportOnly )
+ {
+ /* Limit one frame's BER contribution to 13% */
+ if ( g_ULTCHData.nErrs > (NUM_BER_BITS_TCH_FRAME*13/100) )
+ g_ULTCHData.nErrs = (NUM_BER_BITS_TCH_FRAME*13/100);
+
+ /* Accumulate bit errors and total bit count */
+ sacchInfo->bitErrorAccum += g_ULTCHData.nErrs;
+ sacchInfo->bitCountAccum += NUM_BER_BITS_TCH_FRAME;
+
+ /* Accumulate frame errors and frame count */
+ if ( g_ULTCHData.ultchword0.bitval.bfi )
+ {
+ sacchInfo->frameErrorAccum +=1;
+ }
+ sacchInfo->frameCountAccum += 1;
+ }
+ }
+ }
+
+ /*------------------------------------------------------------------------
+ * SDCCH, Group V or VII. Accumulate only if DPC Hold is off.
+ *------------------------------------------------------------------------*/
+ else if ((chanSel == SDCCH4 || chanSel == SDCCH || chanSel == SDCCH8) && !sacchInfo->dpcHoldFlag )
+ {
+ sacchInfo->bitErrorAccum += g_ULCCHData.nErrs;
+ sacchInfo->bitCountAccum += NUM_BER_BITS_FACCH_FRAME;
+
+ if ( g_ULCCHData.ulcchword0.bitval.fireStatus )
+ {
+ sacchInfo->frameErrorAccum += 1;
+ }
+ sacchInfo->frameCountAccum += 1 ;
+ }
+
+ /*------------------------------------------------------------------------
+ * SACCH, either Group 1,Group V, and Group VII (don't accum bit errors on SACCH)
+ *------------------------------------------------------------------------*/
+ else if ( (chanSel == SACCH4 || chanSel == SACCH || chanSel == SACCH8) && !sacchInfo->dpcHoldFlag )
+ {
+ if ( !g_diagData.dcchReportOnly )
+ {
+ /* Limit one frame's BER contribution to 13% */
+ if ( g_ULCCHData.nErrs > (NUM_BER_BITS_SACCH_FRAME*13/100) )
+ g_ULCCHData.nErrs = (NUM_BER_BITS_SACCH_FRAME*13/100);
+
+ /* Accumulate bit errors and total bit count */
+ sacchInfo->bitErrorAccum += g_ULCCHData.nErrs;
+ sacchInfo->bitCountAccum += NUM_BER_BITS_SACCH_FRAME;
+ /*
+ * NOTE: Don't accumulate SACCH FER. That way FER will truly reflect the
+ * performance of TCH or SDCCH only. We don't want to mix SACCH's FER
+ * characteristic into the reported FER. SACCH's spread-out bursts make
+ * its FER performance different, but BER is the same, so we include it.
+ */
+ }
+
+ /*----------------------------------------------------------------
+ * Compute and save BER in units of 0.01% (resolution=1/10000)
+ *----------------------------------------------------------------*/
+ sacchInfo->ulsigqual.ber = (10000*(Uint32)sacchInfo->bitErrorAccum) /
+ sacchInfo->bitCountAccum;
+
+ /*----------------------------------------------------------
+ * If MS Report enabled for this TS, accumulate bit errors
+ *----------------------------------------------------------*/
+ if ( g_diagData.msReportTsMask & (1<<timeSlot) )
+ {
+ /*---------------------------------------------------------------
+ * If Group V and Group VII, it's SACCH associated with SDCCH. Use the
+ * last 4 msReport structures.
+ *---------------------------------------------------------------*/
+ if ( groupNum == GSM_GROUP_5)
+ {
+ msReport = & g_diagData.msReport[rfCh][NUM_TN_PER_RF+subChan];
+ } else if (groupNum == GSM_GROUP_7){
+ msReport = & g_diagData.sdcch8Report[rfCh][subChan];
+ } else
+ {
+ msReport = & g_diagData.msReport[rfCh][timeSlot];
+ }
+ /*----------------------------------------------------------
+ * Accumulate bit and frame counts in msReport structure
+ *----------------------------------------------------------*/
+ msReport->sacchCount += 1;
+ msReport->cumErrs += sacchInfo->bitErrorAccum;
+ msReport->cumBits += sacchInfo->bitCountAccum;
+ msReport->cumFrameErrs += sacchInfo->frameErrorAccum;
+ msReport->cumFrames += sacchInfo->frameCountAccum;
+ }
+ /*----------------------------------------------------------
+ * Clear BER and FER counts for next SACCH interval
+ *----------------------------------------------------------*/
+ sacchInfo->bitErrorAccum = 0;
+ sacchInfo->bitCountAccum = 0;
+ sacchInfo->frameErrorAccum = 0;
+ sacchInfo->frameCountAccum = 0;
+ }
+}
+
+/*****************************************************************************
+*
+* Function: accumBitBlockErrs
+*
+* Decription:
+* Used by GPRS only, so far. Smoothes bit error rates (BER) and RLC block
+* error rates (BLER) for diagnostic reports.
+*
+* Input:
+* chanSel logical channel type (PDCH4)
+* TBF GPRS - pointer to temp block flow
+*
+* Output:
+* .bitErrors updated number of bit errors
+* (number of bits checked is constant)
+*
+******************************************************************************/
+ProcResult accumBitBlockErrs(Uint8 rfCh, Uint8 timeSlot, t_chanSel chanSel, tbfStruct *TBF)
+{
+ t_diagMsReport *msReport;
+ t_diagGprsMsReport *gprsMsReport;
+ GPRSCodecType currentULCodeRate, currentDLCodeRate;
+ msgStruc ulPhDataMsg;
+ Uint8 i;
+
+ gprsMsReport = & g_diagData.gprsMsReport[rfCh][TBF->ulTbf.tfi];
+ msReport = & g_diagData.msReport[rfCh][timeSlot];
+
+ TBF->ulTbf.channelCodec = g_ULCCHData.chCodec;
+
+ /*------------------------------------------------------------------------
+ * PDCH4, Group XIII, GPRS
+ *------------------------------------------------------------------------*/
+ if ( chanSel == PDCH4 )
+ {
+ /*
+ * CS-4 is uncoded, thus not able to calculate BER.
+ */
+ if ( TBF->ulTbf.channelCodec != GPRS_CS_4 && g_ULCCHData.ulcchword0.bitval.bufferValid )
+ {
+ /*----------------------------------------------------------------
+ * Compute and save BER in units of 0.01% (resolution=1/10,000)
+ *----------------------------------------------------------------*/
+
+ TBF->ulTbf.accum.bitErrors = g_ULCCHData.nErrs;
+ TBF->ulTbf.accum.bitCount = NUM_CCH_CNV_ENC_OUT_BITS;
+ TBF->ulTbf.sigqual.ber = (10000*(Uint32)TBF->ulTbf.accum.bitErrors) /
+ TBF->ulTbf.accum.bitCount;
+ /*
+ * Smooth BER, alpha = 1/8
+ */
+ TBF->ulTbf.sigqual.berAve = expAverage(TBF->ulTbf.sigqual.ber,
+ TBF->ulTbf.sigqual.berAve, 7, 3);
+
+ /*
+ * Smooth BER, alpha = 1/4
+ */
+ TBF->dlTbf.pktDlAckNack.berAve = expAverage(TBF->dlTbf.pktDlAckNack.ber,
+ TBF->dlTbf.pktDlAckNack.berAve, 3, 2);
+ }
+
+ if ( g_ULCCHData.ulcchword0.bitval.bufferValid )
+ {
+ if ( g_ULCCHData.ulcchword0.bitval.fireStatus )
+ {
+ TBF->ulTbf.accum.blockErrors += 1;
+ }
+ /*
+ * Smooth BLER, input is always either zero for a good RLC block, 10,000 for a bad one.
+ * alpha = 1/8
+ */
+ TBF->ulTbf.sigqual.blerAve = expAverage(10000*TBF->ulTbf.accum.blockErrors,
+ TBF->ulTbf.sigqual.blerAve, 7, 3);
+ }
+
+ /*-------------------------------------------------------------------
+ * If MS Report enabled for this TS and logCh = PDCH4, send report for
+ * Type Approval
+ *-------------------------------------------------------------------*/
+ if ( g_diagData.msReportTsMask & (1<<timeSlot) )
+ {
+ for (i=0; i<TBF_NUMBER_MAX; i++)
+ {
+ if ( (g_tbfInfo[rfCh][i].ulTbf.state == CHAN_ACTIVE) &&
+ ((g_tbfInfo[rfCh][i].ulTbf.timeSlotAllocation>>timeSlot) & 0x1) )
+ {
+ if ( g_ULCCHData.ulcchword0.bitval.bufferValid )
+ {
+ if ( g_ULCCHData.ulcchword0.bitval.fireStatus )
+ {
+ msReport->cumFrameErrs += 1;
+ }
+ }
+ msReport->cumFrames += 1;
+ }
+ }
+ }
+
+ /*----------------------------------------------------------
+ * If GPRS MS Report enabled for TS, accumulate bit/block errors
+ *----------------------------------------------------------*/
+ if ( g_diagData.gprsMsReportTfiMask & (1L<<TBF->ulTbf.tfi) )
+ {
+ /*----------------------------------------------------------
+ * Accumulate bit and frame counts in gprsMsReport structure
+ *----------------------------------------------------------*/
+ gprsMsReport->rlcBlkCount += 1;
+ gprsMsReport->cumErrs += (Uint32) (TBF->ulTbf.accum.bitErrors);
+ gprsMsReport->cumBits += (Uint32) (TBF->ulTbf.accum.bitCount);
+ gprsMsReport->cumFrameErrs += (Uint32) (TBF->ulTbf.accum.blockErrors);
+ gprsMsReport->cumFrames += 1;
+
+ if ( TBF->ulTbf.channelCodec == GPRS_CS_4 )
+ {
+ gprsMsReport->cumErrs = 0;
+ }
+ }
+
+ /*----------------------------------------------------------
+ * Clear BER and BLER errors, counts for next RLC block interval
+ *----------------------------------------------------------*/
+ TBF->ulTbf.accum.bitErrors = 0;
+ TBF->ulTbf.accum.blockErrors = 0;
+ TBF->ulTbf.accum.bitCount = 0;
+ }
+}
+
+
+/*****************************************************************************
+*
+* Function: expAverage()
+*
+* Description:
+* Generic IIR Smoothing Filter/Exponential averager
+*
+* Input:
+* input_x, the new input value of type void to preserve generic nature of the
+* function for global uses.
+* output_y_current, type void also, this is the current output which will be fed back to calculate
+* the new output.
+* smoothMult, numerator of the 1-alpha fraction.
+* smoothDiv, denominator of the 1-alpha fraction.
+*
+* Output:
+* (void) output_y, the new calculated output.
+*
+* this input value gets updated periodically via a closed-loop smoothing filter
+* that is IIR with a difference equation of y[n] = (1-alpha)*y[n-1] + (alpha)*x[n].
+*
+*
+ alpha
+ x[n] o----->-----o----->-----o----->-----o y[n]
+ | |
+ | | -1
+ | | z
+ | |
+ o-----<-----o
+
+ (1-alpha)
+*
+*
+******************************************************************************/
+Uint16 expAverage(Uint16 input_x, Uint16 output_y_current, Uint8 smoothMult, Uint8 smoothDiv)
+{
+ Uint32 average;
+ Uint16 output_y;
+
+ average = ((smoothMult * output_y_current) + input_x) * 128; // scale values to get around truncation problems.
+ average >>= smoothDiv;
+ output_y = (( (Uint16) average + (64-1)) / 128);
+
+ return(output_y);
+}
+
+
+/*****************************************************************************
+*
+* Function: rateTransition()
+*
+* Description:
+* Checks if a codec rate transition is needed to boost TBF throughput.
+*
+* Input:
+* tbfStruct *TBF - pointer to values for
+* TBF->ulTbf.channelCodec
+* TBF->ulTbf.sigqual.berAve
+* TBF->ulTbf.sigqual.blerAve
+* Output:
+*
+******************************************************************************/
+void rateTransition(Uint8 rfCh, tbfStruct *TBF)
+{
+ Uint8 tsAllocCount, i, mask;
+ GPRSCodecType Cmd_UL_Rate, Cmd_DL_Rate;
+ msgStruc ulPhDataMsg;
+ Uint8 dir, cval, iLevelTn, tempBuf[10];
+ Uint16 berAve;
+
+ switch ( TBF->ulTbf.channelCodec )
+ {
+ /* if construct order is important in each case due to hysteresis (upward or downward directions)
+ * pattern for transitions on the GSM 05.50 BLER vs. C/I curves.
+ */
+ case GPRS_CS_1:
+
+ /* upward hysteresis */
+ if (( TBF->ulTbf.sigqual.berAve < 500) && ( TBF->ulTbf.sigqual.blerAve < 600)) {
+ Cmd_UL_Rate = GPRS_CS_2;
+ }
+
+ /*
+ * According to GSM 05.50, CS-2 and CS-3 exhibit very similar BLER characteristics vs. C/I.
+ * Hence, transitions from CS-1 to CS-3, and vice versa are possible.
+ */
+ if (( TBF->ulTbf.sigqual.berAve < 400) && ( TBF->ulTbf.sigqual.blerAve < 1000)) {
+ Cmd_UL_Rate = GPRS_CS_3;
+ }
+
+ break;
+
+
+ case GPRS_CS_2:
+
+ /* downward hysteresis */
+ if (( TBF->ulTbf.sigqual.berAve > 1000) && ( TBF->ulTbf.sigqual.blerAve > 2000)) {
+ Cmd_UL_Rate = GPRS_CS_1;
+ }
+
+ /* upward hysteresis */
+ if (( TBF->ulTbf.sigqual.berAve < 400) && ( TBF->ulTbf.sigqual.blerAve < 1000)) {
+ Cmd_UL_Rate = GPRS_CS_3;
+ }
+
+ break;
+
+
+ case GPRS_CS_3:
+
+ /* downward hysteresis */
+ if (( TBF->ulTbf.sigqual.berAve > 800) && ( TBF->ulTbf.sigqual.blerAve > 2600)) {
+ Cmd_UL_Rate = GPRS_CS_2;
+ }
+
+ /*
+ * According to GSM 05.50, CS-2 and CS-3 exhibit very similar BLER characteristics vs. C/I.
+ * Hence, transitions from CS-1 to CS-3, and vice versa are possible.
+ */
+ if (( TBF->ulTbf.sigqual.berAve > 1000) && ( TBF->ulTbf.sigqual.blerAve > 2000)) {
+ Cmd_UL_Rate = GPRS_CS_1;
+ }
+
+ /* upward hysteresis */
+ if (( TBF->ulTbf.sigqual.berAve < 0.5) && ( TBF->ulTbf.sigqual.blerAve < 200)) {
+ Cmd_UL_Rate = GPRS_CS_4;
+ }
+ break;
+
+
+ case GPRS_CS_4:
+
+ /* downward hysteresis */
+ if ( TBF->ulTbf.sigqual.blerAve > 900 ) {
+ Cmd_UL_Rate = GPRS_CS_3;
+ }
+ break;
+
+
+ default:
+ break;
+ }
+
+
+
+ /* See if downlink needs a rate change as well */
+
+ /*
+ * At least one timeslot must be assigned; maximum 4 TS per TBF, but only 1 for now.
+ */
+ mask = 0x01; /* walking ones to isolate which timeslots are used by this TBF */
+
+
+ /* MSbit represents timeslot 0, next MSbit is timeslot 1, etc... */
+ for (i=0; i<NUM_TS_PER_RF; i++) {
+ /*
+ * units relative to C value, each decrement/increment is 2dB
+ */
+ if (TBF->dlTbf.timeSlotAllocation & mask) {
+
+ /* locals */
+ cval = TBF->dlTbf.pktDlAckNack.C_VALUE;
+ iLevelTn = cval - 2*(TBF->dlTbf.pktDlAckNack.iLevelTN[i]);
+ berAve = TBF->dlTbf.pktDlAckNack.berAve;
+
+ switch ( TBF->dlTbf.channelCodec ) {
+ /* if construct order is important in each case due to hysteresis (upward or downward directions)
+ * pattern for transitions on the GSM 05.50 BLER vs. C/I curves. Threshold constants in dB.
+ */
+ case GPRS_CS_1:
+ if ( ( (cval - iLevelTn) > 13 ) && ( berAve < 500) )
+ {
+ Cmd_DL_Rate = GPRS_CS_2;
+ }
+ break;
+
+ case GPRS_CS_2:
+ if ( ( (cval - iLevelTn) > 13 ) && ( berAve < 400) )
+ {
+ Cmd_DL_Rate = GPRS_CS_3;
+ }
+
+ if ( ( (cval - iLevelTn) > 10 ) && ( berAve > 1000) )
+ {
+ Cmd_DL_Rate = GPRS_CS_1;
+ }
+ break;
+
+ case GPRS_CS_3:
+ if ( ( (cval - iLevelTn) > 10 ) && ( berAve > 800) )
+ {
+ Cmd_DL_Rate = GPRS_CS_2;
+ }
+
+ if ( ( (cval - iLevelTn) > 20 ) && ( berAve < 1) )
+ {
+ Cmd_DL_Rate = GPRS_CS_4;
+ }
+ break;
+
+ case GPRS_CS_4:
+ if ( (cval - iLevelTn) > 17 )
+ {
+ Cmd_DL_Rate = GPRS_CS_3;
+ }
+ break;
+ }
+ }
+ mask = mask<<1;
+ }
+
+
+ if (Cmd_UL_Rate != TBF->ulTbf.channelCodec)
+ {
+ dir = 0;
+
+ /*
+ * load PDCH_CODE_RATE_REQ message onto outgoing queue.
+ */
+ ulPhDataMsg.msgSize = 4+5; /* header + payload */
+ ulPhDataMsg.function = PDCH_MANAGE_MSG;
+ ulPhDataMsg.typeHiByte = PDCH_CODE_RATE_REQ >> 8;
+ ulPhDataMsg.typeLoByte = PDCH_CODE_RATE_REQ;
+ ulPhDataMsg.trx = rfCh; /* for now */
+ ulPhDataMsg.params[0] = dir;
+ ulPhDataMsg.params[1] = TBF->ulTbf.tfi; /* Uplink PDCH Group and TFI */
+ ulPhDataMsg.params[2] = Cmd_UL_Rate; /* New Commanded Uplink Channel Coding */
+ // !! DEBUG. RLC_MAC doesn't use this
+ ulPhDataMsg.params[3] = (TBF->ulTbf.sigqual.blerAve >> 8) & 0xff;
+ ulPhDataMsg.params[4] = TBF->ulTbf.sigqual.blerAve;
+
+ SendMsgHost_Que(& ulPhDataMsg);
+ }
+
+ if (Cmd_DL_Rate != TBF->dlTbf.channelCodec)
+ {
+ dir = 1;
+
+ /*
+ * load PDCH_CODE_RATE_REQ message onto outgoing queue.
+ */
+ ulPhDataMsg.msgSize = 4+14;
+ ulPhDataMsg.function = PDCH_MANAGE_MSG;
+ ulPhDataMsg.typeHiByte = PDCH_CODE_RATE_REQ >> 8;
+ ulPhDataMsg.typeLoByte = PDCH_CODE_RATE_REQ;
+ ulPhDataMsg.trx = rfCh; /* for now */
+ ulPhDataMsg.params[0] = dir;
+ ulPhDataMsg.params[1] = TBF->dlTbf.tfi; /* Downlink PDCH Group and TFI */
+ ulPhDataMsg.params[2] = Cmd_DL_Rate; /* New Commanded Downlink Channel Coding */
+ // !! DEBUG. RLC_MAC doesn't use this
+ ulPhDataMsg.params[3] = TBF->dlTbf.pktDlAckNack.iLevelTN[0];
+ ulPhDataMsg.params[4] = TBF->dlTbf.pktDlAckNack.iLevelTN[1];
+ ulPhDataMsg.params[5] = TBF->dlTbf.pktDlAckNack.iLevelTN[2];
+ ulPhDataMsg.params[6] = TBF->dlTbf.pktDlAckNack.iLevelTN[3];
+ ulPhDataMsg.params[7] = TBF->dlTbf.pktDlAckNack.iLevelTN[4];
+ ulPhDataMsg.params[8] = TBF->dlTbf.pktDlAckNack.iLevelTN[5];
+ ulPhDataMsg.params[9] = TBF->dlTbf.pktDlAckNack.iLevelTN[6];
+ ulPhDataMsg.params[10] = TBF->dlTbf.pktDlAckNack.iLevelTN[7];
+
+ ulPhDataMsg.params[11] = TBF->dlTbf.pktDlAckNack.C_VALUE;
+ ulPhDataMsg.params[12] = TBF->dlTbf.pktDlAckNack.berAve >> 8;
+ ulPhDataMsg.params[13] = TBF->dlTbf.pktDlAckNack.berAve;
+
+ SendMsgHost_Que(& ulPhDataMsg);
+ }
+
+ g_rateChangeCheck = 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/agc.c b/data/mnet/GP10/Dsp/synchctrl/agc.c
new file mode 100644
index 0000000..bf42ad4
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/agc.c
@@ -0,0 +1,155 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: agc.c
+*
+* Description:
+* This file contains processing needed for uplink automatic
+* gain control and uplink dynamic power control algorithms.
+*
+* Public Functions:
+*
+* Private Functions:
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "dsp/dsphmsg.h"
+#include "bbdata.h"
+#include "dsprotyp.h"
+#include "l1config.h"
+#include "diagdata.h"
+#include "agcdata.h"
+
+/*****************************************************************************
+*
+* Function: ul_agc()
+*
+* Description:
+* Automatic Gain Control of the received power from the RF dual radio amplifier.
+*
+*
+* Input:
+* *sigstren ptr to t_ULSignalStrength structure
+*
+* Output:
+* .rxgain inside t_ULSignalStrength
+* .rxPwrNormSmooth "
+*
+* this value gets updated periodically (originally 120ms or 1/4 SACCH
+* multiframe) by smoothingFilter(). The updated value gets transferred
+* to the FPGA (and consequently the RF board) via the burstisr.c's
+* ulBurstProcIsr( ) function every 4.615ms per timeslot.
+*
+*
+******************************************************************************/
+Int16 ul_agc(t_ULSignalStrength *sigstren)
+{
+ Int16 dBDelta;
+ Int16 agcDelta;
+ Int16 rxgainTest;
+
+ dBDelta = (Int16) (sigstren->rxPwrNormSmooth >> ONE64THS_DB_2_DB_CONV);
+ agcDelta = dBDelta * g_gainStepsPerDb.slope;
+
+ /* limit to an unsigned 10-bit value */
+ rxgainTest = sigstren->rxgain + agcDelta;
+
+ if ( rxgainTest > g_rxGainMinAct )
+ {
+ agcDelta = g_rxGainMinAct - sigstren->rxgain;
+ sigstren->rxgain = g_rxGainMinAct;
+ }
+ else if ( rxgainTest < RXGAIN_MAX )
+ {
+ agcDelta = RXGAIN_MAX - sigstren->rxgain;
+ sigstren->rxgain = RXGAIN_MAX;
+ }
+ else
+ {
+ sigstren->rxgain += agcDelta;
+ }
+
+ /* update, multiply by inverseSlope/256 (where = 1/GAIN_STEPS_PER_DB) dB */
+ /* and multiply by 64 to 1/64th dB units, instead of step units */
+ /* rxPwrNormSmooth = rxPwrNormSmooth - (64 * agcDelta * (inverseSlope/256)) */
+ /* = rxPwrNormSmooth - (agcDelta * inverseSlope) >> 2 */
+ sigstren->rxPwrNormSmooth -= ((agcDelta * g_gainStepsPerDb.inverseSlope) >> 2);
+
+ return (sigstren->rxPwrNormSmooth);
+}
+
+
+
+/*****************************************************************************
+*
+* Function: rcvPwrSmoothingFilter()
+*
+* Description:
+* IIR Smoothing Filter: smooth the received power from the RF dual radio amplifier.
+*
+* Input:
+* *sigstren ptr to t_ULSignalStrength structure
+* rcvPower accumulated received power
+*
+* Output:
+* .rcvPowerNormSmooth inside t_ULSignalStrength
+*
+* this value gets updated periodically via a closed-loop smoothing filter
+* that is IIR with a difference equation of y[n] = (1-alpha)*y[n-1] + (alpha)*x[n].
+*
+*
+ alpha
+ x[n] o----->-----o----->-----o----->-----o y[n]
+ | |
+ | | -1
+ | | z
+ | |
+ o-----<-----o
+
+ (1-alpha)
+*
+*
+******************************************************************************/
+Int16 rcvPwrSmoothingFilter(t_ULSignalStrength *sigstren, Short rcvPower)
+{
+ Int16 testPower, powerAdjust;
+ Int32 accum;
+
+ /* notes: assumes rcvPower (dspSacchInfo->MSPowerAccum) in 1 dB steps.
+ * assume normalized, smoothed rcvPower is in 1/64 dB steps.
+ */
+
+ /*-----------------------------------------------------------------------
+ * Compute dB relative to desired operating point of g_AgcRxPwrTarget dB
+ * Shift the entire range by an offset equal to g_AgcRxPwrTarget dB in
+ * order to get sign of values used for gain adjustment up or down.
+ * The magnitude of the amplifier gain remains unaffected by this.
+ *----------------------------------------------------------------------*/
+ testPower = rcvPower - g_AgcRxPwrTarget;
+
+ /*------------------------------------------------------------------------
+ * IIR Smoothing Filter:
+ * Update smoothed power in units of 1/64 dB. Remember testPower units
+ * are 1 dB per step. Convert units to fractions of a dB
+ * for extra resolution.
+ * Never update by less than -RXGAIN_MAX_ADJUST dB.
+ *-----------------------------------------------------------------------*/
+ powerAdjust = testPower << ONE64THS_DB_2_DB_CONV;
+
+ accum = sigstren->rxPwrNormSmooth * AGC_SMOOTH_MULT;
+
+ /* one-sided limiting */
+ accum += (powerAdjust > -(RXGAIN_MAX_ADJUST << ONE64THS_DB_2_DB_CONV)) ?
+ powerAdjust : -(RXGAIN_MAX_ADJUST << ONE64THS_DB_2_DB_CONV);
+
+ accum >>= AGC_SMOOTH_SHIFT;
+
+ sigstren->rxPwrNormSmooth = (Int16) accum;
+
+ return (sigstren->rxPwrNormSmooth);
+}
+
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/bcch.c b/data/mnet/GP10/Dsp/synchctrl/bcch.c
new file mode 100644
index 0000000..4731acd
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/bcch.c
@@ -0,0 +1,347 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* File: bcch.c
+*
+* Description: Subroutines to Process downlink BCCH Messages
+* in 4 bursts, SCH and CCCH process
+*
+*****************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "dsprotyp.h"
+
+/**********************************************************
+ * Routine: void dlBcchProc0(Uint8 rfCh, Uint8 timeSlot)
+ *
+ * Description:
+ * Synchronousely process 1st of 4 BCCH bursts,
+ * Channel encode is required
+ *
+ * History: Change Mapping from GSM 05.02-820 Pagaraph 6.3.1.3
+ *
+ ***********************************************************/
+
+
+void dlBcchProc0(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_sysInfoQueue *bcchInfo;
+ t_TNInfo *ts;
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_5:
+ switch(ts->u.group5.bcchBufIndex)
+ {
+ case 0:
+ /*
+ * set SysInfo Type 1
+ */
+ bcchInfo = ts->u.group5.bcch.dlSigBuf;
+
+ if(!bcchInfo->valid)
+ /*
+ * set SysInfo Type 3 if no Type 1
+ */
+ bcchInfo = ts->u.group5.bcch.dlSigBuf + TYPE_3;
+
+ break;
+
+ case 1:
+ /*
+ * set SysInfo Type 2
+ */
+ bcchInfo = ts->u.group5.bcch.dlSigBuf + TYPE_2;
+
+ break;
+
+ case 2:
+ /*
+ * set SysInfo Type 3
+ */
+ bcchInfo = ts->u.group5.bcch.dlSigBuf + TYPE_3;
+ break;
+
+ case 3:
+ /*
+ * set SysInfo Type 4 or 8
+ */
+ bcchInfo = ts->u.group5.bcch.dlSigBuf + TYPE_4;
+ break;
+
+ case 4:
+ /*
+ * set SysInfo Type 13, 9, or 2Ter
+ */
+ bcchInfo = ts->u.group5.bcch.dlSigBuf + TYPE_13;
+
+ if(!bcchInfo->valid)
+ bcchInfo = ts->u.group5.bcch.dlSigBuf + TYPE_9;
+
+ if(!bcchInfo->valid)
+ bcchInfo = ts->u.group5.bcch.dlSigBuf + TYPE_2_TER;
+
+ /*
+ * send SysInfo Type 2 if nothing to send
+ */
+ if(!bcchInfo->valid)
+ bcchInfo = ts->u.group5.bcch.dlSigBuf + TYPE_3;
+ break;
+
+ case 5:
+ /*
+ * set SysInfo Type 2bis, 2 ter
+ */
+ bcchInfo = ts->u.group5.bcch.dlSigBuf + TYPE_2_BIS;
+
+ if(!bcchInfo->valid)
+ bcchInfo = ts->u.group5.bcch.dlSigBuf + TYPE_2_TER;
+
+
+ /*
+ * send SysInfo Type 2 if nothing to send
+ */
+ if(!bcchInfo->valid)
+ bcchInfo = ts->u.group5.bcch.dlSigBuf + TYPE_2;
+
+ break;
+
+ case 6:
+ /*
+ * send SysInfo Type 3
+ */
+ bcchInfo = ts->u.group5.bcch.dlSigBuf + TYPE_3;
+ break;
+
+ case 7:
+ /*
+ * set SysInfo Type 4
+ */
+ bcchInfo = ts->u.group5.bcch.dlSigBuf + TYPE_4;
+
+ break;
+ default:
+ break;
+ }
+ break;
+
+ default:
+ break;
+
+ }
+
+ if(bcchInfo->valid)
+ {
+ if(bcchInfo->frameNumUpdate == sysFrameNum.FN % (32*1326))
+ {
+ bcchInfo->state ^= 0x01;
+ bcchInfo->frameNumUpdate = 0xffffffff;
+ }
+
+ unpackFromByteBuffer(&bcchInfo->data[bcchInfo->state][0],
+ (UChar *)&g_DLCCHData.data[0],
+ NUM_BITS_CCH_FRAME);
+ }
+ else
+ {
+ unpackFromByteBuffer(bcchFiller,
+ (UChar *)&g_DLCCHData.data[0],
+ NUM_BITS_CCH_FRAME);
+ }
+ g_DLCCHData.bufferValid = TRUE;
+
+ chanEncoder(BCCH, 1, timeSlot,0);
+ buildGSMBurst(BCCH, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, BCCH);
+}
+
+
+/**********************************************************
+ * Routine: void dlBcchProc1(Uint8 rfCh, Uint8 timeSlot)
+ *
+ * Descriptions: Synchronousely process 2nd of 4 BCCH bursts,
+ * no Channel encode is required
+ *
+ * History:
+ *
+ ***********************************************************/
+void dlBcchProc1(Uint8 rfCh, Uint8 timeSlot)
+{
+ chanEncoder(BCCH, 0, timeSlot,0);
+ buildGSMBurst(BCCH, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, BCCH);
+}
+
+/**********************************************************
+ * Routine: void dlBcchProc2(Uint8 rfCh, Uint8 timeSlot)
+ * *
+ * Descriptions: Synchronousely process 3rd of 4 BCCH bursts,
+ * no Channel encode is required
+ *
+ * History:
+ *
+ ***********************************************************/
+void dlBcchProc2(Uint8 rfCh, Uint8 timeSlot)
+{
+ chanEncoder(BCCH, 0, timeSlot,0);
+ buildGSMBurst(BCCH, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, BCCH);
+}
+
+/**********************************************************
+ * Routine: void dlBcchProc3(Uint8 rfCh, Uint8 timeSlot)
+ * *
+ * Descriptions: Synchronousely process 4th of 4 BCCH bursts,
+ * no Channel encode is required. Needs to prepare
+ * next SYS INFO buffer.
+ *
+ * History:
+ *
+ ***********************************************************/
+void dlBcchProc3(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_sysInfoQueue *bcchInfo;
+ t_TNInfo *ts;
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_5:
+ bcchInfo = ts->u.group5.bcch.dlSigBuf +
+ ts->u.group5.bcchBufIndex++;
+ /*
+ * use next BCCH of the SYS INFO queue at next BCCH
+ * sub frame, (FN/51) Mod 8
+ */
+ ts->u.group5.bcchBufIndex &= 0x7;
+
+ break;
+ case GSM_GROUP_11:
+ if (++ts->u.group11.dlBlock >= MAX_RADIO_BLOCKS){
+ ts->u.group11.dlBlock = 0;
+ }
+
+ /* increment buffer index */
+ if (++ts->u.group11.pbcchBufIndex >= NUM_SYSINFO_BUFS){
+ ts->u.group11.pbcchBufIndex = PACKET_TYPE_1;
+ }
+
+ break;
+
+
+ default:
+ break;
+
+ }
+ chanEncoder(BCCH, 0, timeSlot,0);
+ buildGSMBurst(BCCH, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, BCCH);
+}
+
+/**********************************************************
+ * Routine: void dlFcchProc(Uint8 rfCh, Uint8 timeSlot)
+ *
+ * Descriptions: Synchronousely process FCCH bursts,
+ *
+ * History:
+ *
+ ***********************************************************/
+void dlFcchProc(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_5:
+ break;
+ default:
+ break;
+ }
+ buildGSMBurst(FCCH, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, FCCH);
+}
+
+
+
+
+/**********************************************************
+ * Routine: dlSchProc(Uint8 rfCh, Uint8 timeSlot))
+ *
+ * Descriptions: Synchronousely process SCH bursts
+ *
+ *
+ * History:
+ *
+ *
+ ***********************************************************/
+void dlSchProc(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ t_SCHSigBufs *schInfo;
+ Uint8 t3_mod;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_5:
+ schInfo = ts->u.group5.sch.dlSigBuf;
+ break;
+ default:
+ break;
+ }
+ if(schInfo->valid)
+ {
+ if(schInfo->frameNumUpdate == sysFrameNum.FN % (32*1326))
+ {
+ schInfo->state ^= 0x01;
+ schInfo->frameNumUpdate = 0xffffffff;
+ }
+
+ /*
+ * there are 6 bits BSIC code and 2bit of t1 in the first byte
+ * there are 8 bits of t1 in byte 2
+ * there are 1 bit of t1, 5 bits of t2 and 2 bits of t3' in byte 3
+ * there are 1 bit of t3' in byte 4
+ */
+ schInfo->data[schInfo->state][0] &= 0xFC;
+ schInfo->data[schInfo->state][0] |= sysFrameNum.t1>>9;
+ schInfo->data[schInfo->state][1] = sysFrameNum.t1>>1;
+ schInfo->data[schInfo->state][2] = sysFrameNum.t1<<7;
+ schInfo->data[schInfo->state][2] |= sysFrameNum.t2<<2;
+
+ t3_mod = (sysFrameNum.t3-1)/10;
+ schInfo->data[schInfo->state][2] |= t3_mod>>1;
+ schInfo->data[schInfo->state][3] = t3_mod & 0x01;
+
+ unpackFromByteBuffer(&schInfo->data[schInfo->state][0],
+ (UChar*)&g_DLCCHData.data[0],
+ NUM_BITS_SCH_FRAME+7);
+
+ g_DLCCHData.bufferValid = TRUE;
+
+ chanEncoder(SCH, 1, timeSlot,0);
+ buildGSMBurst(SCH, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, SCH);
+ }
+ else
+ {
+ buildGSMBurst(IDLE, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, IDLE);
+ }
+}
+
+
+
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/burstisr.c b/data/mnet/GP10/Dsp/synchctrl/burstisr.c
new file mode 100644
index 0000000..5e4dc74
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/burstisr.c
@@ -0,0 +1,562 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: burstisr.c
+*
+* Description:
+* This file contains functions that are invoked by the DMA interrupt at
+* each burst boundary.
+*
+* Public Functions:
+* dlBurstProcIsr, ulBurstProcIsr
+*
+* Private Functions:
+* dma0Isr, dma1Isr
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "dsprotyp.h"
+#include <mcbsp.h> /* mcbsp devlib */
+#include <mcbspdrv.h> /* mcbsp driver */
+#include <dma.h>
+#include <intr.h>
+#include "dsp6201.h"
+#include "agcdata.h"
+#include "diagdata.h"
+
+int dlBurstCounter = 0;
+int ulBurstCounter = 0;
+Int8 g_dlDmaAdj = 0;
+Int16 g_dlDmaCount = 312;
+
+#define IDLE_7 8
+
+Uint8 Group5ChannelMapTbl[102] = {
+3,3,3,3,R,R,2,2,2,2,3,3,3,3,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,
+0,0,0,0,1,1,1,1,R,R,2,2,2,2,
+3,3,3,3,R,R,0,0,0,0,1,1,1,1,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R,
+0,0,0,0,1,1,1,1,R,R,2,2,2,2 };
+
+
+/* for Group7 Table 8 signifies idle frame */
+
+Uint8 Group7ChannelMapTbl[102] = {
+5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,
+5,5,6,6,6,6,7,7,7,7,0,0,0,0,
+1,1,1,1,2,2,2,2,3,3,3,3,8,8,8,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,
+5,5,6,6,6,6,7,7,7,7,4,4,4,4 };
+
+
+/*****************************************************************************
+*
+* Function: dlBurstProcIsr
+*
+* Description:
+* Processes one downlink burst per RF channel
+*
+* Inputs: None
+*
+* Outputs: None
+*
+******************************************************************************/
+void dlBurstProcIsr(void)
+{
+ Void (** frameProcPtr)();
+ t_TNInfo *tsInfo;
+ Int8 rfCh;
+ Uint32 *sample;
+ short k;
+
+
+
+ /*
+ * SPECIAL CASE: only when frame ISR runs within Burst ISR
+ */
+ static Uint8 firstFrmIsr = TRUE;
+
+ if(firstFrmIsr != TRUE)
+ {
+ if(g_burstProc.dlTN == 0) {
+ frameProc();
+ }
+ /*
+ * allow resync of dma to burst clock
+ */
+ }
+ else
+ {
+ /*
+ * At first frame ISR, gsmFrameIsr() sets GSM frame counters
+ * and runs frameProc()
+ */
+ firstFrmIsr = FALSE;
+ }
+
+ /*
+ * Process a burst from each RF Channel
+ */
+ for(rfCh=0; rfCh < NUM_RFS_PER_DSP; rfCh++)
+ {
+
+ /*
+ * Find right time slot and perform DL synchronous processing
+ */
+ tsInfo = & g_BBInfo[rfCh].TNInfo[g_burstProc.dlTN];
+
+ frameProcPtr = (Void *) & tsInfo->groupDLTable [tsInfo->dlTblIndex];
+ (* frameProcPtr)(rfCh, g_burstProc.dlTN);
+
+ /*
+ * If requested by Host, swap I and Q components to invert DL spectrum
+ */
+
+ if ( g_BBInfo[rfCh].IQSwap == TRUE )
+ {
+ sample = (Uint32*)g_BBInfo[rfCh].dlBBSmpl;
+
+ for ( k=RAMP_SAMPLES; k<312-RAMP_SAMPLES; k++ )
+ {
+ sample[k] = ((sample[k] & 0xfff) << 12) | ((sample[k] >> 12) & 0xfff);
+ }
+ }
+ /*
+ * Advance table index and burst buffer, and get new buffer size
+ */
+ if(++tsInfo->dlTblIndex >= tsInfo->tblLength)
+ {
+ tsInfo->dlTblIndex = 0;
+ }
+ g_BBInfo[rfCh].dlBurst++;
+ g_BBInfo[rfCh].dlBurst &= 1;
+ g_BBInfo[rfCh].dlBBSmpl = dlBurstBufPtr[g_BBInfo[rfCh].dlBurst];
+ }
+ g_burstProc.dlTN += 1;
+ g_burstProc.dlTN &= 7;
+}
+
+/*****************************************************************************
+*
+* Function: ulBurstProcIsr
+*
+* Description:
+* Processes one uplink burst per RF channel
+*
+* Inputs: None
+*
+* Outputs: None
+*
+******************************************************************************/
+void ulBurstProcIsr(void)
+{
+ Void (** frameProcPtr)();
+ t_TNInfo *tsInfo;
+ Int32 i;
+ Int8 rfCh;
+
+ /*
+ * table to correct Uneven Ul burst buffer size to affect TOA on different TS
+ */
+ const Int8 taTimeSlotOffset[8] = {1+1, 1, 1, 1, 1+1, 1, 1, 1};
+
+
+#ifdef FIND_BURST_BOUNDARY
+ static Int32 ulBurstDataIndex = 0;
+ t_ULComplexSamp *rcvData;
+#endif
+
+ /*
+ * Process a burst from each RF Channel
+ */
+ for(rfCh=0; rfCh < NUM_RFS_PER_DSP; rfCh++)
+ {
+
+#ifdef FIND_BURST_BOUNDARY
+ /*
+ * test code to find out burst boundary
+ */
+ rcvData = g_BBInfo[rfCh].ulBBSmpl;
+ for(i=0; i<156; i++)
+ {
+ if( (rcvData->I * rcvData->I + rcvData->Q * (rcvData++)->Q) > 0x4000*0x4000)
+ {
+ LED0 = 3;
+ if (ulBurstDataIndex < 156)
+ {
+ g_UlBurstLog[ulBurstDataIndex++] = (Int32 ) (rcvData-1);
+ }
+ }
+ }
+
+ LED0 = 0;
+#endif
+
+ /*
+ * Find right time slot and perform DL synchronous processing
+ */
+
+
+ tsInfo = & g_BBInfo[rfCh].TNInfo[g_burstProc.ulTN];
+ frameProcPtr = (Void *) & tsInfo->groupULTable [tsInfo->ulTblIndex];
+ (* frameProcPtr)(rfCh, g_burstProc.ulTN);
+
+ /*
+ * Advance table index and burst buffer, and get new buffer size
+ */
+ if(++tsInfo->ulTblIndex >= tsInfo->tblLength)
+ {
+ tsInfo->ulTblIndex = 0;
+ }
+ g_BBInfo[rfCh].ulBurst++;
+ g_BBInfo[rfCh].ulBurst &= 0x3;
+ g_BBInfo[rfCh].ulBBSmpl = ulBurstBufPtr[g_BBInfo[rfCh].ulBurst] + taTimeSlotOffset[g_burstProc.ulTN];
+ }
+
+ g_burstProc.ulTN++;
+ g_burstProc.ulTN &= 7;
+}
+
+/*****************************************************************************
+*
+* Function: setUplinkGain
+*
+* Description:
+* Sets uplink gain (load DAC value into FPGA register) for next time slot
+*
+* Inputs: None
+*
+* Outputs: None
+*
+******************************************************************************/
+void setUplinkGain(void)
+{
+ t_TNInfo *tsInfo;
+ Int32 timeSlot;
+ Uint8 subChan;
+ Int8 t3index;
+ Int8 t3frame;
+ Int8 rfCh;
+ tbfStruct *TBF; /* GPRS */
+
+ /*
+ * Set uplink gain for one time slot on each RF channel
+ */
+ for(rfCh=0; rfCh < NUM_RFS_PER_DSP; rfCh++)
+ {
+ /*--------------------------------------
+ * Automatic Gain Control
+ *--------------------------------------*/
+ if ( g_AGC_ON )
+ {
+ timeSlot = (g_burstProc.ulTN + AGC_TS_OFFSET) % NUM_TS_PER_RF;
+ tsInfo = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ switch(tsInfo->groupNum)
+ {
+ case GSM_GROUP_1:
+
+ UL_DSP_AGC_CONTROL_REG = tsInfo->u.group1.sacch.ulsigstren.rxgain;
+ break;
+
+ case GSM_GROUP_5:
+
+ /*------------------------------------------------------------
+ * Find T3 frame number within superframe, compute frame
+ * index within block of 102, then look up RACH or subChan
+ *------------------------------------------------------------*/
+ t3frame = (sysFrameNum.t3 - sysFrameNum.t2 + T2_FRAMES) % T2_FRAMES;
+ t3index = sysFrameNum.t3 + 51*(t3frame & 1);
+ subChan = Group5ChannelMapTbl[t3index];
+
+ /*------------------------------------------------------------
+ * First check for RACH
+ *------------------------------------------------------------*/
+ if ( subChan == R )
+ {
+ UL_DSP_AGC_CONTROL_REG = g_USGC;
+ }
+ /*------------------------------------------------------------
+ * Else use table value as SDCCH subchannel
+ *------------------------------------------------------------*/
+ else
+ {
+ UL_DSP_AGC_CONTROL_REG = tsInfo->u.group5.sacch[subChan].ulsigstren.rxgain;
+ }
+ break;
+
+ case GSM_GROUP_7:
+ /*------------------------------------------------------------
+ * Find T3 frame number within superframe, compute frame
+ * index within block of 102, then look up subChan
+ *------------------------------------------------------------*/
+ t3frame = (sysFrameNum.t3 - sysFrameNum.t2 + T2_FRAMES) % T2_FRAMES;
+ t3index = sysFrameNum.t3 + 51*(t3frame & 1);
+ subChan = Group7ChannelMapTbl[t3index];
+
+
+ if (subChan != IDLE_7){
+ UL_DSP_AGC_CONTROL_REG = tsInfo->u.group7.sacch[subChan].ulsigstren.rxgain;
+ }
+
+ case GSM_GROUP_13:
+
+ /* GPRS */
+ if( !(TBF = ulChan2TbfMap(rfCh, timeSlot)) ) {
+ UL_DSP_AGC_CONTROL_REG = g_rxGainMinIdle;
+ }
+
+ else {
+ UL_DSP_AGC_CONTROL_REG = TBF->ulTbf.sigstren.rxgain;
+ }
+
+ break;
+ }
+ }
+
+ /*--------------------------------------
+ * Manual Gain Control
+ *--------------------------------------*/
+ else
+ {
+ UL_DSP_AGC_CONTROL_REG = g_USGC;
+ }
+ }
+}
+
+
+/******************************************************************************/
+/* dma0Isr static variables
+/******************************************************************************/
+Uint32 dmaBurstOffsetCount = 0x7FFFFFFF;
+Uint32 dmaBurstSlipCount = 0;
+Int16 dynamicDmaAdj = 0;
+Uint8 evenOdd;
+
+Uint8 g_maxCpuLoading = 0;
+
+/*****************************************************************************
+*
+* Function: dma0Isr
+*
+* Description:
+* DMA0 Interrupt Service Routine
+*
+* Inputs: None
+*
+* Outputs: None
+*
+******************************************************************************/
+interrupt void dma0Isr(void)
+{
+ /* LED0 = 3; for EVM board only */
+
+ static Int8 dmaBurstResync = 0;
+ static Int8 lockDmaAdj = 0;
+
+ Int16 maxCpuLoading;
+ Int16 adjustedDlPwrControlValue;
+
+ /*
+ * get DMA transfer conter at beginning of the ISR, The counter should be
+ * reloade upon completion of a block DMA.
+ */
+ maxCpuLoading = DMA0_XFER_COUNTER;
+
+ /* clear applicable condition bits in DMA secondary cntl */
+ RESET_BIT(DMA0_SECONDARY_CTRL_ADDR, BLOCK_COND);
+
+ if(dmaBurstResync == 0)
+ {
+ if(dmaBurstOffsetCount - DMA_BURST_SYNC_COUNT == 12)
+ {
+ /*
+ * the different is 12 13MHz clock period, take higher count as reference
+ * The reference will keep the same as the System is up
+ */
+ dmaBurstResync = 1;
+ evenOdd = 0;
+ }
+ else
+ {
+ dmaBurstOffsetCount = DMA_BURST_SYNC_COUNT;
+ }
+ dynamicDmaAdj = 0;
+ }
+ else
+ {
+ /*
+ * dynamicDmaAdj should be always be '0", if DMA and Burst Clock are in sync
+ */
+ dynamicDmaAdj = dmaBurstOffsetCount - DMA_BURST_SYNC_COUNT - evenOdd*12;
+
+ /*
+ * flip evenOdd
+ */
+ evenOdd ^= 0x01;
+
+ if((dynamicDmaAdj > -12) && (dynamicDmaAdj < 12))
+ {
+ /*
+ * no adjustment is required, if the different is whin one GSM Bit
+ * i.e, 2 TX samples
+ */
+ dynamicDmaAdj = 0;
+ }
+ else if(lockDmaAdj == 0)
+ {
+ /*
+ * Transmit Data Sample rate is 541.6667 KSPS, the count is a 13 MHz clock
+ *
+ * 13M/14 = 541.6667
+ *
+ * so adj in sample is count/12, or count*(32768/12)/32768
+ * and 32768/12 = 2730
+ */
+ dmaBurstSlipCount += 1;
+ /* send both bytes of short integer */
+ sendDiagMsg(0xEE, 0, 0, 2, (Uint8*)(&dynamicDmaAdj));
+
+ dynamicDmaAdj = (dynamicDmaAdj * (2730/2) + 4) >> 14;
+ lockDmaAdj = 8;
+ }
+ else if(lockDmaAdj > 0)
+ {
+ lockDmaAdj--;
+ dynamicDmaAdj = 0;
+ }
+ }
+ /*
+ * turn-off LED when enter Interrupt
+ */
+ AGC_SRC_SELECT_REG &= ~(1<<DSP_LED0);
+
+ DMA_GADDR_B = (Uint32) g_BBInfo[0].dlBBSmpl;
+/*
+#ifndef OVERSAMPLING_RATE_4X
+ if(DMA_GCR_A == 312)
+
+ DMA_GCR_A = 313 + g_dlDmaAdj;
+ else
+ DMA_GCR_A = 312 + g_dlDmaAdj;
+#endif
+*/
+
+ if(g_dlDmaCount == 312)
+ {
+ g_dlDmaCount = 313;
+ }
+ else
+ {
+ g_dlDmaCount = 312;
+ }
+ DMA_GCR_A = g_dlDmaCount + g_dlDmaAdj + dynamicDmaAdj;
+
+ /*
+ * DMA adjustment can be used once only, it should be cleared once it is used
+ */
+ g_dlDmaAdj = 0;
+
+ /*
+ * Set uplink gain control value in FPGA
+ */
+ setUplinkGain();
+
+ /*
+ * Set downlink gain control value in FPGA
+ */
+ adjustedDlPwrControlValue = g_DSPC + g_TxPwrTemperatureDelta;
+ if ( adjustedDlPwrControlValue > DL_PWR_CONTROL_MAX )
+ {
+ DL_PWR_CONTROL_REG = DL_PWR_CONTROL_MAX;
+ }
+ else if ( adjustedDlPwrControlValue < DL_PWR_CONTROL_MIN )
+ {
+ DL_PWR_CONTROL_REG = DL_PWR_CONTROL_MIN;
+ }
+ else
+ {
+ DL_PWR_CONTROL_REG = adjustedDlPwrControlValue;
+ }
+
+ /*
+ * Process the burst. This is where we do all of the work.
+ */
+ dlBurstProcIsr();
+ ulBurstProcIsr();
+ dlBurstCounter++;
+
+/* LED0 = 0; for EVM board only */
+
+ /*
+ * turn-on LED when exit Interrupt
+ */
+ AGC_SRC_SELECT_REG |= 1<<DSP_LED0;
+
+ /*
+ * measure the difference of the DMA counter readings and convert it to
+ * percentage value
+ */
+ maxCpuLoading = ((maxCpuLoading - DMA0_XFER_COUNTER) * 100) / 312;
+
+ /*
+ * store the max reading
+ */
+ if( maxCpuLoading > g_maxCpuLoading && maxCpuLoading < 101)
+ {
+ g_maxCpuLoading = maxCpuLoading;
+ }
+}
+
+/*****************************************************************************
+*
+* Function: dma1Isr
+*
+* Description:
+* DMA1 Interrupt Service Routine - currently unused?
+*
+* Inputs: None
+*
+* Outputs: None
+*
+******************************************************************************/
+interrupt void dma1Isr(void)
+{
+ Int32 temp;
+
+ /* clear applicable condition bits in DMA secondary cntl */
+ RESET_BIT(DMA1_SECONDARY_CTRL_ADDR, BLOCK_COND);
+
+ /*temp = (g_BBInfo[0].ulBurst+2) & 0x3;
+ DMA_GADDR_C = (Uint32) ulBurstBufPtr[temp];
+
+ if (temp == 0)
+ DMA_GCR_B = 157;
+ else
+ DMA_GCR_B = 156;
+ */
+ ulBurstCounter++;
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/decryptopt.asm b/data/mnet/GP10/Dsp/synchctrl/decryptopt.asm
new file mode 100644
index 0000000..8d2bc04
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/decryptopt.asm
@@ -0,0 +1,90 @@
+*****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+******************************************************************************
+*
+*
+* Revision Date: 01/12/01: fast decryption of uplink data bits using *encryptStream
+*
+* USAGE This routine is C callable and can be called as
+*
+* void decryptBits(&g_ULBurstData.data[0],&encryptStream[0],NB_NUM_ENCRYPT_BITS_PER_SIDE - 1);
+*
+* C CODE
+* This is the C equivalent of the assembly code. Note that
+* the assembly code is hand optimized and restrictions may
+* apply.
+*
+* for ( data = g_ULBurstData.data ;
+* data < g_ULBurstData.data + NB_NUM_ENCRYPT_BITS_PER_SIDE - 1;
+* data++ )
+* {
+* if ( *encryptStream++ ) *data = -*data;
+* }
+*
+*
+*==============================================================================
+ .global _decryptBits
+ .text
+_decryptBits:
+ STW .D2 B10,*B15-- ; push register (for c-callable func)
+
+*** BEGIN Benchmark Timing ***
+
+ STW .D2 B11,*B15-- ; push register (for c-callable func)
+|| SHR .S1 A6,1,A1 ; init loop index = # input samples - 4 for latency
+
+ STW .D2 B12,*B15-- ; push register (for c-callable func)
+|| MV .S1 A4,A8 ; init input data buffer ptr
+
+ LDB .D1 *A4++[1],A5 ; input next data sample
+|| LDB .D2 *B4++[1],B0 ; input next data sample
+
+ LDB .D1 *A4++[1],A3 ; input next data sample
+|| LDB .D2 *B4++[1],B1 ; input next data sample
+
+ SUB .S1 A1,1,A1 ; decrement/init loop counter
+ NOP 2
+
+ [B0]SUB .L1 0,A5,A7 ; decrement/init loop counter
+||[!B0]MV .S1 A5,A7 ; decrement/init loop counter
+
+DECRYPT_LOOP:
+ LDB .D1 *A4++[1],A5 ; input next data sample
+|| LDB .D2 *B4++[1],B0 ; input next data sample
+||[A1]SUB .S1 A1,1,A1 ; decrement/init loop counter
+||[A1]B .S2 DECRYPT_LOOP ;* branch to loop
+
+ STB .D1 A7,*A8++[1]
+
+ LDB .D1 *A4++[1],A3 ; input next data sample
+|| LDB .D2 *B4++[1],B1 ; input next data sample
+||[B1]SUB .L1 0,A3,A9 ; decrement/init loop counter
+||[!B1]MV .S1 A3,A9 ; decrement/init loop counter
+
+ STB .D1 A9,*A8++[1]
+
+ NOP
+
+ [B0]SUB .L1 0,A5,A7 ; decrement/init loop counter
+||[!B0]MV .S1 A5,A7 ; decrement/init loop counter
+
+DECRYPT_LOOP_END:
+ NOP
+
+ [B1]SUB .L1 0,A3,A9 ; decrement/init loop counter
+||[!B1]MV .S1 A3,A9 ; decrement/init loop counter
+
+ STB .D1 A7,*A8++[1]
+
+DECRYPT_END:
+ LDW .D2 *++B15,B12 ; pop register (for c-callable func)
+
+ LDW .D2 *++B15,B11 ; pop register (for c-callable func)
+|| B .S2 B3 ; return
+
+
+ LDW .D2 *++B15,B10 ; pop register (for c-callable func)
+
+ NOP 4
diff --git a/data/mnet/GP10/Dsp/synchctrl/dynpwrctrl.c b/data/mnet/GP10/Dsp/synchctrl/dynpwrctrl.c
new file mode 100644
index 0000000..6d7f3b3
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/dynpwrctrl.c
@@ -0,0 +1,366 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: dynpwrctrl.c
+*
+* Description:
+* This file contains functions that support dynamic uplink power control
+*
+* Public Functions:
+*
+* Private Functions:
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "oamdata.h"
+#include "dsp/dsphmsg.h"
+#include "dsprotyp.h"
+#include "bbdata.h"
+#include "l1config.h"
+#include "agcdata.h"
+
+/*****************************************************************************
+* Function: uplink_dynamic_power_control
+*
+* Description:
+* This function is derived from the GSM spec 05.08 to perform
+* dynamic power control for the uplink sacch processing.
+*
+******************************************************************************/
+void uplink_dynamic_power_control(t_TNInfo *ts, Uint8 subChan)
+{
+ t_ULSignalStrength *sigStren;
+ Int16 *pav;
+ Int16 delta;
+ Int8 pwrAdj;
+ Int8 previousMSPwr;
+ Int8 newMSPwr;
+ Uint8 channelNumber;
+ t_SACCHInfo *sacchInfo;
+ Uint8 msgBuf[12];
+
+ /*
+ * Point to the appropriate SACCH info structure
+ */
+ if ( ts->groupNum == GSM_GROUP_1 )
+ {
+ sacchInfo = & ts->u.group1.sacch;
+ }
+ else if ( ts->groupNum == GSM_GROUP_5 )
+ {
+ sacchInfo = & ts->u.group5.sacch[subChan];
+ }
+ else if ( ts->groupNum == GSM_GROUP_7 )
+ {
+ sacchInfo = & ts->u.group7.sacch[subChan];
+ }
+ else
+ {
+ return; /* should not get here */
+ }
+
+ /*
+ * Check for minimum number of SACCH intervals since last MS Power Cmd
+ */
+ if ( sacchInfo->dynPwrRprtCntr >= g_DynPwrOAMInfo.ulsigstren.numRxSigSamples )
+ {
+ sigStren = & sacchInfo->ulsigstren;
+
+ /* compute difference (dB) between current avg RXLEV and MIB target */
+ delta = - (sigStren->rxLevAve - g_DpcRxLevThresh);
+
+ /* divide delta by 2 b/c of 2dB steps for pwr control*/
+ pwrAdj = - ((delta+1) >> 1); /* add 1 so that there is no negative bias */
+
+
+ previousMSPwr = sacchInfo->powerLevel;
+ sacchInfo->powerLevel += pwrAdj;
+
+ /* range check to 4 bit values */
+ if (sacchInfo->powerLevel > MS_TXPWR_MIN_DEF) /* saturation */
+ {
+ sacchInfo->powerLevel = MS_TXPWR_MIN_DEF;
+ }
+ else if (sacchInfo->powerLevel < g_HoOAMInfo.serveParms.msTxPwrMax)
+ {
+ sacchInfo->powerLevel = g_HoOAMInfo.serveParms.msTxPwrMax;
+ }
+
+ /*
+ * If MS commanded power changes, send diag msg and reset SACCH
+ * interval counter. Power cannot change again until counter expires.
+ */
+ delta = sacchInfo->powerLevel - previousMSPwr;
+ if ( delta != 0 )
+ {
+ msgBuf[0] = sacchInfo->powerLevel;
+ msgBuf[1] = sigStren->rxLevAve>>8;
+ msgBuf[2] = sigStren->rxLevAve & 0xff;
+ msgBuf[3] = ts->u.group1.sacch.timingAdvance;
+ msgBuf[4] = sigStren->rxPwrNormSmooth>>8;
+ msgBuf[5] = sigStren->rxPwrNormSmooth & 0xff;
+ msgBuf[6] = (sigStren->rxgain >> 8) & 0xff;
+ msgBuf[7] = sigStren->rxgain & 0xff;
+ sendDiagMsg(POWER_CONTROL_REPORT,0,ts->tsNumber,8,msgBuf);
+
+ sacchInfo->dynPwrRprtCntr = 0;
+ }
+ }
+ return;
+}
+
+
+/* *********************************************************
+ * Routines:
+ * void averageS(), void averageQ()
+ *
+ * Description: Averaging functions used by gsm 05.08 processes.
+ * Recomputes sum of power or BER each time.
+ *
+ * These routines currently make no provision for weighted averages.
+ * The maximum buffer size available is for 32 samples.
+ *
+ * INPUTS:
+ *
+ * arg1: pointer to the buffer that contains numbers to be averaged.
+ * Structure should contain the following
+ * (not necessarily this order):
+ * ------------------------
+ * | values[bufSiz] |
+ * ------------------------
+ * | count |
+ * ------------------------
+ * | sum of values |
+ * ------------------------
+ * | average |
+ * ------------------------
+ * where the count is used for the circular averaging buffer and
+ * all values sized depending on the defined structure.
+ *
+ * arg2: buffer size of the values to be averaged.
+ * arg3: newest sample
+ *
+ *
+ * OUTPUT(S): averageS - value sent back to calling function
+ * averageQ - value (placed in the buffer).
+
+ /* Example from sacch.c :
+ average(& ts->u.group1.sacch.ulsigstren,
+ numRxSigSamples, & ts->u.group1.sacch.MSPowerAccum);
+*
+*/
+/* ************************************************************ */
+void averageS (t_ULSignalStrength *s, t_DLSignalStrengthSCell *sD,
+ Uint8 avgSiz, Int16 *newSmpl, Bool isUplink)
+{
+ Int8 index;
+ Int32 sum;
+ Int8 i;
+ Int8 *rxLev;
+ Int8 *rxLevAve;
+ Uint8 *count;
+
+ /*
+ * Set local pointers to appropriate storage locations (UL or DL)
+ */
+
+ if ( isUplink )
+ {
+ rxLev = s->rxLev;
+ rxLevAve = & s->rxLevAve;
+ count = & s->count;
+ }
+ else
+ {
+ rxLev = sD->rxLev;
+ rxLevAve = & sD->rxLevAve;
+ count = & sD->count;
+ }
+
+ /*
+ * Sum the most recent avgSiz power values. Buffer is circular,
+ * and new sample belongs at location s->count or sD->count.
+ */
+
+ sum = *newSmpl;
+ index = *count;
+ for ( i=0; i<avgSiz-1; i++ )
+ {
+ if ( --index < 0 )
+ {
+ index = NUM_RX_SIGNAL_SAMPLES_MAX - 1;
+ }
+ sum += rxLev[index];
+ }
+
+ /*
+ * Compute the average RXLEV and store away the new sample
+ */
+ *rxLevAve = ( sum + (avgSiz>>1) ) / avgSiz;
+ rxLev[*count] = *newSmpl;
+
+ /*
+ * Increment count to the oldest remaining value
+ */
+ if ( ++(*count) >= NUM_RX_SIGNAL_SAMPLES_MAX )
+ {
+ *count = 0;
+ }
+
+ return;
+}
+
+/*****************************************************************************
+* Function: averageQ
+*
+* Description: See above
+*
+******************************************************************************/
+void averageQ (t_ULSignalQuality *q, t_DLSignalQualitySCell *qD, Uint8 avgSiz,
+ Uint16 *newSmpl, Bool convertNewSmpl)
+{
+ Int8 index;
+ Int32 sum;
+ Uint8 newRxqual;
+ Uint16 medianBer;
+ Int8 i;
+
+ /*
+ * Convert newest BER value to RXQUAL, if needed. From the most recent
+ * avgSiz RXQUAL values, loop up BER and compute the sum.
+ * Buffer is circular, new sample belongs at location q->count or qD->count.
+ */
+
+ switch (convertNewSmpl) {
+
+ case TRUE:
+
+ newRxqual = ber2rxQualConv(*newSmpl);
+ medianBer = g_rxQual2ber_LookUpTbl[ newRxqual ];
+ sum = medianBer;
+
+ index = q->count;
+
+ for ( i=0; i<avgSiz-1; i++ )
+ {
+ if ( --index < 0 )
+ {
+ index = NUM_RX_SIGNAL_SAMPLES_MAX - 1;
+ }
+ sum += g_rxQual2ber_LookUpTbl[ q->rxQual[index] ];
+ }
+ /*
+ * Compute the average power and store away the new sample
+ */
+ q->berAve = ( sum + (avgSiz>>1) ) / avgSiz;
+ q->rxQualAve = ber2rxQualConv(q->berAve);
+ q->rxQual[q->count] = newRxqual;
+
+ /*
+ * Increment count to the oldest remaining value
+ */
+ if ( ++(q->count) >= NUM_RX_SIGNAL_SAMPLES_MAX )
+ {
+ q->count = 0;
+ }
+
+ break;
+
+
+ case FALSE:
+ /* added for DL RXQUAL averaging where we never get BER from DL meas. report */
+
+ newRxqual = *newSmpl;
+ sum = g_rxQual2ber_LookUpTbl[ newRxqual ];
+
+ index = qD->count;
+
+ for ( i=0; i<avgSiz-1; i++ )
+ {
+ if ( --index < 0 )
+ {
+ index = NUM_RX_SIGNAL_SAMPLES_MAX - 1;
+ }
+ sum += g_rxQual2ber_LookUpTbl[ qD->rxQual[index] ];
+ }
+ /*
+ * Compute the average power and store away the new sample
+ */
+ qD->berAve = ( sum + (avgSiz>>1) ) / avgSiz;
+ qD->rxQualAve = ber2rxQualConv(qD->berAve);
+ qD->rxQual[qD->count] = newRxqual;
+
+ /*
+ * Increment count to the oldest remaining value
+ */
+ if ( ++(qD->count) >= NUM_RX_SIGNAL_SAMPLES_MAX )
+ {
+ qD->count = 0;
+ }
+
+ break;
+ }
+
+ return;
+}
+
+/*****************************************************************************
+*
+* Function: ber2rxQualConv()
+*
+* Description:
+* Conversion utility for translating bit error rate (ber) to rxQual [0..7]
+* using the limits taken from gsm05.08 section 8.2.4.
+*
+* Input:
+* ber in units of 0.01% (resolution = 1/10000)
+* (e.g. 14 = 0.14%)
+*
+* Output:
+* rxQual from sacchInfo.sigqual or dlsigqualSCell
+* or
+* rxQualAve averaged over OAM defined period (hreqave)
+*
+*
+******************************************************************************/
+Uint8 ber2rxQualConv(Uint16 berval)
+{
+ Uint8 rxqualval;
+
+ if ( berval < 20 ) {
+ rxqualval = 0;
+ }
+
+ else if ( berval < 40 ) {
+ rxqualval = 1;
+ }
+
+ else if ( berval < 80 ) {
+ rxqualval = 2;
+ }
+
+ else if ( berval < 160 ) {
+ rxqualval = 3;
+ }
+
+ else if ( berval < 320 ) {
+ rxqualval = 4;
+ }
+
+ else if ( berval < 640 ) {
+ rxqualval = 5;
+ }
+
+ else if ( berval < 1280 ) {
+ rxqualval = 6;
+ }
+
+ else { /* berval >= 12.80 % or 1280 */
+ rxqualval = 7;
+ }
+
+ return (rxqualval);
+}
diff --git a/data/mnet/GP10/Dsp/synchctrl/encrypt.c b/data/mnet/GP10/Dsp/synchctrl/encrypt.c
new file mode 100644
index 0000000..82e6cbe
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/encrypt.c
@@ -0,0 +1,727 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: encrypt.c
+*
+* Description:
+* This file contains functions that encrypt and decrypt bursts on TCH,
+* SDCCH and SACCH logical channels. The theory of operation is follows:
+*
+* The encryptState structure in gsmtypes.h contains current and new
+* algorithm parameters which indicates A5/1, A5/2 or no encryption.
+* It also contains an encryptMode which is set to Normal mode except
+* around the time of a Layer 3 Encryption Command message from the host.
+* When this message is received, the DSP saves the New Algorithm and
+* switches to Pending Change mode. At this point, the DSP is still using
+* the Current Algorithm. The DSP waits until the current FACCH or SDCCH
+* frame is sent -- hopefully with a Layer 2 Ciphering Mode Command sent
+* previously by the host -- and then switches from Pending Change mode
+* to Change mode. In this mode, the DSP uses the Current Algorithm on the
+* downlink and the New Algorithm on the uplink. Upon decoding a valid
+* Layer 2 frame, the DSP switches from Change to Normal mode and copies
+* the New Algorithm into the Current Algorithm parameter. As before in
+* Normal mode, the DSP uses the Current Algorithm -- which is now the
+* same as the newly commanded algorithm -- on the uplink and downlink.
+*
+* State changes vs. burst phase for SDCCH and TCH:
+* DL: 3 0 1 2 3 0 1 2 3 0
+* UL: 3 0 1 2 3 0 1 2 3 0
+* SDCCH: a b c ...d
+* TCH: a b c ...d
+*
+* a = Cipher Mode & Encr Cmd received from Host, set mode=ENCR_PEND_CHANGE
+* b = Cipher Mode cmd starts to go on DL, set mode=ENCR_CHANGE
+* c = Cipher Mode cmd is finished going out on DL
+* d = Some time later, receive a valid Layer 2 frame, set mode=ENCR_NORMAL
+*
+* Event Where It Is Handled At What Burst Phase
+* a dcchMsgProc N/A
+* b encrypt 0
+* c encrypt 0
+* d ulSyncMsgProcess N/A
+*
+* Public Functions:
+* decrypt, encrypt
+*
+* Private Functions:
+* computeEncryption
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "dsp/dsphmsg.h"
+#include "bbdata.h"
+#include "dsprotyp.h"
+#include "diagdata.h"
+
+void decryptBits(Uint8 *data, Uint8 *encryptBits, Uint16 numbits);
+
+#define A5_ASM_OPTIMIZED
+#ifndef A5_ASM_OPTIMIZED
+
+/*****************************************************************************
+* C Version of A5/1, A5/2 Helper Functions
+* These functions plus computeEncryption will be replaced by assembly
+*****************************************************************************/
+
+#ifdef _INLINE
+#define __INLINE inline
+#else
+#define __INLINE
+#endif
+
+typedef unsigned long uint32;
+uint32 r1, r2, r3, r4;
+
+/*-------------------------------------------------------------
+ * Majority(x,y,z) = (x&y)^(x&z)^(y&z) = (x&(y^z))^(y&z)
+ *-----------------------------------------------------------*/
+#define M3(x,y,z) ((x) & ((y)^(z))) ^ ((y) & (z))
+
+/*---------------------------------------------------------------------------
+ * Single step shift functions for A5/1
+ *--------------------------------------------------------------------------*/
+void step_r1A51(void)
+{
+ uint32 feedback;
+ feedback = ((r1>>18) ^ (r1>>17) ^ (r1>>16) ^ (r1>>13)) & 1;
+ r1 <<= 1;
+ r1 ^= feedback;
+}
+
+void step_r2A51(void)
+{
+ uint32 feedback;
+ feedback = ((r2>>22) ^ (r2>>21) ^ (r2>>20) ^ (r2>>7)) & 1;
+ r2 <<= 1;
+ r2 ^= feedback;
+}
+
+void step_r3A51(void)
+{
+ uint32 feedback;
+ feedback = ((r3>>21) ^ (r3>>20)) & 1;
+ r3 <<= 1;
+ r3 ^= feedback;
+}
+
+/*---------------------------------------------------------------------------
+ * Single step shift functions. The R1, R2 and R3 step functions are called
+ * an average of 86 + (6/8)*388 = 377 times per burst. The R4 step function
+ * is called 86 + 338 = 474 times per burst.
+ *--------------------------------------------------------------------------*/
+__INLINE void step_r1(void)
+{
+ uint32 feedback;
+ feedback = (r1 ^ (r1>>1) ^ (r1>>2) ^ (r1>>5)) & 1;
+ r1 >>= 1;
+ r1 ^= feedback << 18;
+}
+
+__INLINE void step_r2(void)
+{
+ uint32 feedback;
+ feedback = (r2 ^ (r2>>1) ^ (r2>>2) ^ (r2>>15)) & 1;
+ r2 >>= 1;
+ r2 ^= feedback << 22;
+}
+
+__INLINE void step_r3(void)
+{
+ uint32 feedback;
+ feedback = (r3 ^ (r3>>1)) & 1;
+ r3 >>= 1;
+ r3 ^= feedback << 21;
+}
+
+__INLINE void step_r4(void)
+{
+ uint32 feedback;
+ feedback = (r4 ^ (r4>>5)) & 1;
+ r4 >>= 1;
+ r4 ^= feedback << 16;
+}
+
+
+/*----------------------------------------------------------------
+ * Shifts of the 3 registers are determined by 1 bit per register.
+ *----------------------------------------------------------------*/
+void clock_controlA51(void)
+{
+
+ int input_bits, x9, y11, z11;
+
+ x9 = ((r1 & 0x0100) >> 6);
+ y11 = ((r2 & 0x0400) >> 9);
+ z11 = ((r3 & 0x0400) >> 10);
+
+ input_bits = ((x9 | y11 | z11) & 0x07);
+
+ switch (input_bits)
+ {
+ case 3:
+ case 4:
+ step_r2A51();
+ step_r3A51();
+ break;
+ case 2:
+ case 5:
+ step_r1A51();
+ step_r3A51();
+ break;
+ case 1:
+ case 6:
+ step_r1A51();
+ step_r2A51();
+ break;
+ default:
+ step_r1A51();
+ step_r2A51();
+ step_r3A51();
+ }
+
+ return;
+}
+
+
+/*---------------------------------------------------------------------------
+ * Determine which registers to step under R4 clock control, then call the
+ * appropriate step functions. This function is called 288 times per burst.
+ *--------------------------------------------------------------------------*/
+__INLINE void clock_control(void)
+{
+ switch (r4 & 0x2240)
+ {
+ case 0x0040:
+ case 0x2200:
+ step_r2();
+ step_r3();
+ break;
+ case 0x0200:
+ case 0x2040:
+ step_r1();
+ step_r3();
+ break;
+ case 0x0240:
+ case 0x2000:
+ step_r1();
+ step_r2();
+ break;
+ default:
+ step_r1();
+ step_r2();
+ step_r3();
+ }
+ step_r4();
+
+ return;
+}
+
+
+/*-----------------------------------------------------------
+ * No R4 register for A5/1; A5/1 stepping is opposite to A5/2.
+ *----------------------------------------------------------*/
+void step_registersA51(int clocking)
+{
+ if ( clocking )
+ {
+ clock_controlA51();
+ }
+ else
+ {
+ step_r1A51();
+ step_r2A51();
+ step_r3A51();
+ }
+ return;
+}
+
+/*---------------------------------------------------------------------------
+ * Step appropriate registers. For each burst, this functions is called
+ * 86 times with clocking=FALSE plus 388 times with clocking=TRUE.
+ *--------------------------------------------------------------------------*/
+__INLINE void step_registers(int clocking)
+{
+ if ( clocking )
+ {
+ clock_control();
+ }
+ else
+ {
+ step_r1();
+ step_r2();
+ step_r3();
+ step_r4();
+ }
+ return;
+}
+
+
+/*---------------------------------------------------------------------------
+ * Load key and count into all four (three for A5/1) registers. One or the other
+ * function is called three times per burst using lengths of 32, 32 and 22.
+ *--------------------------------------------------------------------------*/
+void load_inA51(uint32 load_val, int length)
+{
+ int i;
+
+ for ( i=0; i<length; i++ )
+ {
+ /*--------------------------------------------
+ * step without clocking, then add key bit
+ *-------------------------------------------*/
+ step_registersA51(0);
+ if ( load_val & 1 )
+ {
+ r1 ^= 1;
+ r2 ^= 1;
+ r3 ^= 1;
+ }
+ load_val >>= 1;
+ }
+ return;
+}
+
+
+void load_in(uint32 load_val, int length)
+{
+ int i;
+
+ for ( i=0; i<length; i++ )
+ {
+ /*--------------------------------------------
+ * step without clocking, then add key bit
+ *-------------------------------------------*/
+ step_registers(0);
+ if ( load_val & 1 )
+ {
+ r1 ^= 1 << 18;
+ r2 ^= 1 << 22;
+ r3 ^= 1 << 21;
+ r4 ^= 1 << 16;
+ }
+ load_val >>= 1;
+ }
+ return;
+}
+
+
+/*---------------------------------------------------------------------------
+ * Initialize registers with key and count.
+ *--------------------------------------------------------------------------*/
+void init_registersA51(uint32 kclo, uint32 kchi, uint32 count)
+{
+ int i;
+
+ r1 = r2 = r3 = 0;
+
+ /*---------------------------------------
+ * Load Kc
+ *--------------------------------------*/
+ load_inA51(kclo, 32);
+ load_inA51(kchi, 32);
+
+ /*---------------------------------------
+ * Load COUNT
+ *--------------------------------------*/
+ load_inA51(count, 22);
+
+ /*---------------------------------------
+ * No need to Fix bits, like in A5/2
+ *--------------------------------------*/
+
+ /*---------------------------------------
+ * Run up
+ *--------------------------------------*/
+ for ( i=0; i<100; i++ )
+ step_registersA51(1);
+
+ return;
+}
+
+
+void init_registers(uint32 kclo, uint32 kchi, uint32 count)
+{
+ int i;
+
+ r1 = r2 = r3 = r4 = 0;
+
+ /*---------------------------------------
+ * Load Kc
+ *--------------------------------------*/
+ load_in(kclo, 32);
+ load_in(kchi, 32);
+
+ /*---------------------------------------
+ * Load COUNT
+ *--------------------------------------*/
+ load_in(count, 22);
+
+ /*---------------------------------------
+ * Fix bits
+ *--------------------------------------*/
+ r1 |= 0x8;
+ r2 |= 0x10;
+ r3 |= 0x20;
+ r4 |= 0x40;
+
+ /*---------------------------------------
+ * Run up
+ *--------------------------------------*/
+ for ( i=0; i<100; i++ )
+ step_registers(1);
+
+ return;
+}
+
+
+/*-----------------------------------------------------------
+ * output for A51 BLOCK1/BLOCK2 construction
+ *-----------------------------------------------------------*/
+unsigned char a5v1(void)
+{
+ unsigned char output;
+
+ /*---------------------------------------
+ * Compute the output bit
+ *--------------------------------------*/
+ output = ((r1>>18) & 1) ^ ((r2>>22) & 1) ^ ((r3>>21) & 1);
+
+ /*---------------------------------------
+ * Step the appropriate registers
+ *--------------------------------------*/
+ step_registersA51(1);
+
+ return output;
+}
+
+
+/*---------------------------------------------------------------------------
+ * Compute one encryption bit to be XOR'd with one air bit. This function is
+ * called 288 times per burst.
+ *--------------------------------------------------------------------------*/
+__INLINE unsigned char a5v2(void)
+{
+ unsigned char output;
+
+ /*---------------------------------------
+ * Compute the output bit
+ *--------------------------------------*/
+ output = ( (r1 & 1) ^ (r2 & 1) ^ (r3 & 1) );
+ output ^= M3( (r1>>3) & 1, ((r1>>4) & 1) ^ 1, (r1>>6) & 1 );
+ output ^= M3( (r2>>4) & 1, (r2>>6) & 1, ((r2>>9) & 1) ^ 1 );
+ output ^= M3( ((r3>>5) & 1) ^ 1, (r3>>8) & 1, (r3>>12) & 1 );
+
+ /*---------------------------------------
+ * Step the appropriate registers
+ *--------------------------------------*/
+ step_registers(1);
+
+ return output;
+}
+/************** end of C Version A5/1, A5/2 Helper Functions **********************/
+#endif
+
+
+void computeA52Asm(Char* Inputs, Char* Outputs);
+void computeA51Asm(Char* Inputs, Char* Outputs);
+
+void computeA5(Uint32* key, Uint32 count, UChar* block1, UChar* block2,
+ t_encryptAlgorithm encryptAlg )
+{
+ int i,j;
+ Char encryptInputs[86];
+ Char encryptOutputs[100+2*NB_NUM_ENCRYPT_BITS_PER_BURST];
+
+ /*----------------------------------------------
+ * Read the cipher key (32+32 bits) into encryption input buffer
+ *---------------------------------------------*/
+
+ for ( i=0; i<32; i++ )
+ {
+ encryptInputs[i] = (Char)(key[1] & 1);
+ encryptInputs[32+i] = (Char)(key[0] & 1);
+ key[0] = key[0] >> 1;
+ key[1] = key[1] >> 1;
+ }
+ /*----------------------------------------------
+ * Read the frame COUNT into encryption input buffer
+ *---------------------------------------------*/
+ for ( i=0; i<22; i++ )
+ {
+ encryptInputs[64+i] = (Char)(count & 1);
+ count = count >> 1;
+ }
+/* fast assembly routine to compute ul,dl encryption bits */
+
+ if(encryptAlg == ENCR_A52)
+ {
+ computeA52Asm(&encryptInputs[0], &encryptOutputs[0]);
+ j = 100; /* offset 100 dummy output bits */
+ }
+ else
+ {
+ computeA51Asm(&encryptInputs[0], &encryptOutputs[0]);
+ j = 0;
+ }
+
+/* unpack the encryption bits to downlink, uplink buffers */
+/* for now,first 100 outputs are dummy */
+
+ for ( i=0; i<NB_NUM_ENCRYPT_BITS_PER_BURST-2; i++ )
+ {
+ block1[i] = encryptOutputs[j+i];
+ }
+ for ( i=0; i<NB_NUM_ENCRYPT_BITS_PER_BURST-2; i++ )
+ {
+ block2[i]= encryptOutputs[j+i+NB_NUM_ENCRYPT_BITS_PER_BURST-2];
+ }
+ return;
+}
+
+/*****************************************************************************
+*
+* Function: decrypt
+*
+* Description:
+* Decrypts one uplink burst using previously computed encryption stream.
+* Input consists of soft decisions, so decryption amounts to sign changes.
+* This function should be called for each burst just before channel decoding.
+*
+* Input from call list:
+* rfCh RF channel number
+* timeSlot GSM time slot
+*
+* Input from global memory:
+* g_ULBurstData.data[] ptr to array of soft decisions
+* g_BBInfo[rf].TNInfo[tn] timeslot information structure
+* .ulEncryptStream[] ptr to encryption stream
+*
+* Output to global memory:
+* g_ULBurstData.data[] ptr to decrypted soft decisions
+*
+******************************************************************************/
+void decrypt(Uint8 rfCh, Uint8 timeSlot)
+{
+ register UChar* encryptStream;
+ register Char* data;
+ t_encryptState* encryptState;
+ UChar* ulEncryptStream;
+ t_TNInfo *ts;
+ Uint8 subCh;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ /*--------------------------------------------------------------
+ * Get pointers to encryption state and buffer for storing
+ * uplink encryption stream
+ *-------------------------------------------------------------*/
+ if ( ts->groupNum == GSM_GROUP_5 )
+ {
+ subCh = ts->u.group5.ulSdcchSubCh;
+ encryptState = & ts->u.group5.sdcch[subCh].encryptState;
+ ulEncryptStream = &sdcchUlEncryptStream[subCh]; /* use new onchip buffer */
+/* ulEncryptStream = encryptState->ulEncryptStream; */
+ }
+ else if (ts->groupNum == GSM_GROUP_7){
+ subCh = ts->u.group7.ulSdcchSubCh;
+ encryptState = & ts->u.group7.sdcch[subCh].encryptState;
+ ulEncryptStream = &sdcch8UlEncryptStream[subCh]; /* use new onchip buffer */
+
+ }else
+ {
+ encryptState = & ts->u.group1.tch.encryptState;
+ ulEncryptStream = &tchUlEncryptStream[rfCh][timeSlot]; /* use new onchip buffer */
+/* ulEncryptStream = encryptState->ulEncryptStream; */
+ }
+
+ /*--------------------------------------------------------------
+ * If an encryption algorithm is in use on UL, apply it to data
+ *-------------------------------------------------------------*/
+ if ( (encryptState->encryptMode != ENCR_CHANGE &&
+ encryptState->algorithm != ENCR_NONE) ||
+ (encryptState->encryptMode == ENCR_CHANGE &&
+ encryptState->newAlgorithm != ENCR_NONE) )
+ {
+ /*--------------------------------------------------------------
+ * Decrypt first half of burst (not including stealing flag)
+ *-------------------------------------------------------------*/
+ encryptStream = ulEncryptStream;
+
+#ifndef A5_ASM_OPTIMIZED
+ for ( data = g_ULBurstData.data ;
+ data < g_ULBurstData.data + NB_NUM_ENCRYPT_BITS_PER_SIDE - 1;
+ data++ )
+ {
+ if ( *encryptStream++ ) *data = -*data;
+ }
+#else
+ decryptBits((Uint8 *) & g_ULBurstData.data[0],(Uint8 *) & encryptStream[0],
+ NB_NUM_ENCRYPT_BITS_PER_SIDE - 1);
+#endif
+ /*--------------------------------------------------------------
+ * Decrypt second half of burst (not including stealing flag)
+ *-------------------------------------------------------------*/
+
+#ifndef A5_ASM_OPTIMIZED
+ for ( data += 2;
+ data < g_ULBurstData.data + NB_NUM_ENCRYPT_BITS_PER_BURST;
+ data++ )
+ {
+ if ( *encryptStream++ ) *data = -*data;
+ }
+#else
+ decryptBits((Uint8 *) & g_ULBurstData.data[NB_NUM_ENCRYPT_BITS_PER_SIDE+1],
+ (Uint8 *) & encryptStream[NB_NUM_ENCRYPT_BITS_PER_SIDE-1], NB_NUM_ENCRYPT_BITS_PER_SIDE - 1);
+#endif
+ }
+}
+
+/*****************************************************************************
+*
+* Function: encrypt
+*
+* Description:
+* Computes encryption stream for one burst. Applies encryption to downlink
+* immediately and saves uplink encryption stream for use by decrypt().
+* This function should be called for each burst after channel encoding.
+*
+* Input from call list:
+* rfCh RF channel number
+* timeSlot GSM time slot
+* burstPhase phase within TCH or SDCCH block (0,1,2,3)
+*
+* Input from global memory:
+* g_DLCodedData.data[] ptr to array of downlink bits (0/1)
+* g_BBInfo[rf].TNInfo[tn] timeslot information structure
+* .ulEncryptStream[] ptr to uplink encryption stream
+*
+* Output to global memory:
+* g_DLCodedData.data[] ptr to encrypted downlink bits
+* g_BBInfo[rf].TNInfo[tn] timeslot information structure
+* .ulEncryptStream[] computed uplink encryption stream
+*
+*
+******************************************************************************/
+void encrypt(Uint8 rfCh, Uint8 timeSlot, Uint8 burstPhase)
+{
+ register UChar* encryptStream;
+ register UChar* data;
+ t_encryptState* encryptState;
+ UChar dlEncryptStream[NB_NUM_ENCRYPT_BITS_PER_BURST-2];
+ UChar* ulEncryptStream;
+ Uint32 key[ENCRYPT_KEY_LEN];
+ Uint32 count;
+ t_TNInfo *ts;
+ Uint8 subCh;
+ Uint8 i;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ /*--------------------------------------------------------------
+ * Get pointers to encryption state and buffer for storing
+ * uplink encryption stream
+ *-------------------------------------------------------------*/
+ if ( ts->groupNum == GSM_GROUP_5 || ts->groupNum == GSM_GROUP_7)
+ {
+ if (ts->groupNum == GSM_GROUP_5){
+ subCh = ts->u.group5.ulSdcchSubCh;
+ encryptState = & ts->u.group5.sdcch[subCh].encryptState;
+ ulEncryptStream = &sdcchUlEncryptStream[subCh]; /* use new onchip buffer */
+ } else {
+ subCh = ts->u.group7.ulSdcchSubCh;
+ encryptState = & ts->u.group7.sdcch[subCh].encryptState;
+ ulEncryptStream = &sdcch8UlEncryptStream[subCh]; /* use new onchip buffer */
+ }
+
+/* ulEncryptStream = encryptState->ulEncryptStream; */
+
+ /*-----------------------------------------------------------
+ * Run state machine for SDCCH. See file header for details.
+ *-----------------------------------------------------------*/
+ if ( burstPhase==0 )
+ {
+ if ( encryptState->encryptMode == ENCR_PEND_CHANGE )
+ {
+ encryptState->encryptMode = ENCR_CHANGE;
+ }
+ }
+ }
+ else
+ {
+ encryptState = & ts->u.group1.tch.encryptState;
+ ulEncryptStream = &tchUlEncryptStream[rfCh][timeSlot]; /* use new onchip buffer */
+/* ulEncryptStream = encryptState->ulEncryptStream; */
+
+ /*-----------------------------------------------------------
+ * Run state machine for TCH. See file header for details.
+ *-----------------------------------------------------------*/
+ if ( burstPhase==0 )
+ {
+ if ( encryptState->encryptMode == ENCR_PEND_CHANGE )
+ {
+ encryptState->encryptMode = ENCR_CHANGE;
+ }
+ }
+ }
+
+ /*--------------------------------------------------------------
+ * If encryption is on or has just been commanded, compute
+ * encryption streams for UL and DL. Save UL stream for use
+ * later in decryption and decide whether to use DL stream.
+ * Note: Do not support direct switch between A5/1 and A5/2.
+ *-------------------------------------------------------------*/
+ for ( i=0; i<ENCRYPT_KEY_LEN; i++ )
+ {
+ key[i] = encryptState->encryptKey[i];
+ }
+ count = ((Uint32)sysFrameNum.t1<<11) |
+ ((Uint32)sysFrameNum.t3<<5) |
+ (Uint32)sysFrameNum.t2;
+
+ if ( encryptState->algorithm == ENCR_A51 ||
+ (encryptState->encryptMode == ENCR_CHANGE &&
+ encryptState->newAlgorithm == ENCR_A51) )
+ {
+ computeA5(key, count, dlEncryptStream, ulEncryptStream, ENCR_A51);
+ }
+ if ( encryptState->algorithm == ENCR_A52 ||
+ (encryptState->encryptMode == ENCR_CHANGE &&
+ encryptState->newAlgorithm == ENCR_A52) )
+ {
+ computeA5(key, count, dlEncryptStream, ulEncryptStream, ENCR_A52);
+ }
+
+ /*--------------------------------------------------------------
+ * If encryption is on, apply current algorithm to downlink
+ *-------------------------------------------------------------*/
+ if ( encryptState->algorithm != ENCR_NONE )
+ {
+ /*--------------------------------------------------------------
+ * Encrypt first half of burst (not including stealing flag)
+ *-------------------------------------------------------------*/
+
+ encryptStream = dlEncryptStream;
+
+ for ( data = g_DLCodedData.data ;
+ data < g_DLCodedData.data + NB_NUM_ENCRYPT_BITS_PER_SIDE - 1;
+ data++ )
+ {
+ *data ^= *encryptStream++;
+ }
+ /*--------------------------------------------------------------
+ * Encrypt second half of burst (not including stealing flag)
+ *-------------------------------------------------------------*/
+ for ( data += 2;
+ data < g_DLCodedData.data + NB_NUM_ENCRYPT_BITS_PER_BURST;
+ data++ )
+ {
+ *data ^= *encryptStream++;
+ }
+ }
+}
+
+
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/encryptA51A52.asm b/data/mnet/GP10/Dsp/synchctrl/encryptA51A52.asm
new file mode 100644
index 0000000..1944045
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/encryptA51A52.asm
@@ -0,0 +1,605 @@
+*****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+
+; declare encryptionCapability and set it to A5/1 and A5/2 (bits 1 and 0)
+ .def _g_encryptionCapability
+ .data
+_g_encryptionCapability: .word 3
+
+*****************************************************************************
+*
+* Function: computeA52Asm
+*
+* Description:
+* Computes two 114-bit encryption blocks. Block 1 will be used to encrypt
+* the downlink. Block 2 will be used to decrypt the uplink.
+*
+* Inputs:
+* key ptr to array containing 64-bit encryption key
+* count GSM-specified count based on FN
+*
+* Outputs:
+* block1 ptr to array of 114 bits to encrypt downlink
+* block2 ptr to array of 114 bits to decrypt uplink
+*
+******************************************************************************/
+*
+*
+* Revision Date: 08/11/99: compute the output bit
+*
+* USAGE This routine is C callable and can be called as
+*
+* void computeA52Asm(Char Inputs, Char Outputs)
+*
+* C CODE
+* This is the C equivalent of the assembly code. Note that
+* the assembly code is hand optimized and restrictions may
+* apply.
+*
+*
+* DESCRIPTION
+*
+*
+*==============================================================================
+
+ .global _computeA52Asm
+ .text
+
+*** BEGIN Benchmark Timing ***
+_computeA52Asm:
+
+ ADD .L1X -4, B15, A1 ; copy stack pointer
+|| STW .D2 A14, *-B15[10] ; push A14 on stack
+
+ STW .D1 A10, *A1--[2] ; push A10 on stack
+|| STW .D2 B10, *B15--[2] ; push B10 on stack
+
+ STW .D1 A11, *A1--[2] ; push A11 on stack
+|| STW .D2 B11, *B15--[2] ; push B11 on stack
+|| MV .L1 A8, A0 ; init loop index
+
+ STW .D1 A12, *A1--[2] ; push A12 on stack
+|| STW .D2 B12, *B15--[2] ; push B12 on stack
+
+ STW .D1 A13, *A1--[2] ; push A13 on stack
+|| STW .D2 B13, *B15--[2] ; push B13 on stack
+
+ STW .D1 A15, *A1 ; push A15 on stack
+|| STW .D2 B14, *B15--[3] ; push B14 on stack
+|| MVK .S1 0200h, A11
+|| MVK .S2 08000h, B12
+INIT:
+
+ MV .L2X A4, B10 ;input data buffer start addr
+|| MV .L1X B4, A3 ;output data buffer start addr
+
+ MVK .S1 0, A4 ;init reg r1
+|| MVK .S2 0, B4 ;init reg r2
+
+ MVK .S1 0, A6 ;init reg r3
+|| MVK .S2 0, B6 ;init reg r4
+
+ MVK .S1 86, A1 ;init load_in loop index
+
+ MVK .S1 02000h, A13
+|| MVK .S2 00040h, B13
+|| MPYSU .M1X 8, B12, A14 ; 1 << 18
+|| MPYSU .M2 2, B12, B0 ; 1 << 16
+
+ MVK .S1 04000h, A12
+|| MPY .M1 A13, A4, A7 ; r1 >> 2
+|| MPY .M2X A13, B4, B7 ; r2 >> 2
+
+ MVK .S1 00010h, A15
+|| MVKH .S2 00000h, B12
+
+ SHL .S1 A14, 3,A2 ; 1 << 21
+|| SHL .S2 B0, 6, B14 ; 1 << 22
+
+STEPLOOP:
+ EXTU .S1 A4,26,16,A8 ; r1 >> 5
+|| EXTU .S2 B4,16,16,B8 ; r2 >> 15
+|| MPYU .M1 A12, A4, A9 ; r1 >> 1
+|| MPYU .M2X A12, B4, B9 ; r2 >> 1
+|| SUB .D1 1, A1 ,A1 ; decrement loop index
+|| LDB .D2 *B10++, B1 ; load inval input as decision bit
+
+;2
+ EXTU .S1 A4,31,16,A0 ; r1
+|| XOR .L1 A7, A8, A8 ; r1 ^
+|| XOR .L2 B7, B8, B8 ; r2 ^
+|| MPYU .M1 A12, A6, A5 ; r3 >> 1
+|| MPYU .M2X A11, B6, B5 ; start of r4 >> 5(need 1 more sfl)
+
+;3
+ EXTU .S2 B4,31,16,B2 ; r2
+|| XOR .L1 A9, A8, A8 ; r1 ^
+|| XOR .L2 B9, B8, B8 ; r2 ^
+|| MPYU .M1X B12, A6, A7 ; r3
+|| MPYU .M2 B12, B6, B7 ; r4
+
+;4
+ XOR .L1 A8, A0, A8 ; r1 ^
+|| XOR .L2 B8, B2, B8 ; r2 ^
+|| MPY .M2 2, B5, B5 ; finish r4 >> 5(1 more sfl)
+
+;5
+ AND .L1X A8, B12, A8 ; (r1 ^) & 1
+|| AND .L2 B8, B12, B8 ; (r2 ^) & 1
+
+;5''
+ [A1]B .S1 STEPLOOP
+|| SHL .S2 B8, 8, B8 ; r2 feedback << 8
+|| XOR .L1 A7, A5, A7 ; r3 ^
+|| XOR .L2 B7, B5, B7 ; r4 ^
+|| MPYU .M1 A15, A8, A8 ; r1 feedback << 4
+
+;5'
+ AND .L1X A7, B12, A7 ; (r3 ^) & 1
+|| AND .L2 B7, B12, B7 ; (r4 ^) & 1
+
+;6
+ XOR .L1 A4, A8, A8 ; r1 semifinal
+|| XOR .L2 B4, B8, B8 ; r2 semifinal
+|| SHL .S1 A7, 7, A7 ; r3 feedback << 7
+|| SHL .S2 B7, 2, B7 ; r4 feedback << 2
+
+;7
+ EXTU .S1 A8, 1, 2,A4 ; r1 final
+|| EXTU .S2 B8, 1, 2,B4 ; r2 final
+|| XOR .L1 A6, A7, A7 ; r3 semifinal
+|| XOR .L2 B6, B7, B7 ; r4 semifinal
+|| MPY .M1X 8, B13, A11 ; A11 = 0200h
+
+;8
+ EXTU .S1 A7, 1, 2,A6 ; r3 final
+|| EXTU .S2 B7, 1, 2,B6 ; r4 final
+|| [B1]XOR .L1 A4, A14, A4 ; r1 ^= 1 << 18
+|| [B1]XOR .L2 B4, B14, B4 ; r2 ^= 1 << 22
+
+;8'
+ MPY .M1 A13, A4, A7 ; r1 >> 2
+|| MPY .M2X A13, B4, B7 ; r2 >> 2
+|| [B1]XOR .L1 A6, A2, A6 ; r3 ^= 1 << 21
+|| [B1]XOR .L2 B6, B0, B6 ; r4 ^= 1 << 16
+
+ENDLOOP:
+
+ MVK .S1 020h, A10
+|| MVK .S2 010h, B2
+
+ OR .L1 8, A4, A4 ; r1 |= 0x8
+|| OR .L2 B13, B6,B6 ; r4 |= 0x40
+|| OR .S1 A10, A6,A6 ; r3 |= 0x20
+|| OR .S2 B2, B4,B4 ; r2 |= 0x10
+
+ SUB .S1 A3, 1, A3 ;adjust output data ptr for inplace calc
+ MVK .S1 0148h, A1 ;init loop index
+
+ MVK .S1 0200h, A11
+|| MVK .S2 08000h, B12
+
+ MVK .S1 02000h, A13
+|| MVK .S2 00040h, B13
+
+ MVK .S1 04000h, A12
+|| MVK .S2 02240h, B14
+|| MV .L1X B14, A14
+|| MPYU .M1 A13, A4, A7 ; r1 >> 2
+|| MPYU .M2X A13, B4, B7 ; r2 >> 2
+
+ MVK .S1 00010h, A15
+|| MVKH .S2 00000h, B12
+|| MV .L1X B14, A14 ; A14 = 02240h
+
+ MVKH .S1 08002000h, A13
+ MVKH .S1 04004000h, A12
+ MVKH .S1 02000010h, A15
+STEPLOOP1:
+ EXTU .S1 A4,26,16,A8 ; r1 >> 5
+|| EXTU .S2 B4,16,16,B8 ; r2 >> 15
+|| AND .L1X B6, A14,A10 ; r4 & 02240h
+|| AND .L2 B6, B14,B10 ; r4 & 02240h
+|| MPYU .M1 A12, A4, A9 ; r1 >> 1
+|| MPYU .M2X A12, B4, B9 ; r2 >> 1
+|| SUB .D1 1, A1 ,A1 ; decrement loop index
+|| MV .D2 B5, B2 ; save temp output temporary
+;2
+ EXTU .S1 A4,31,16,A0 ; r1
+|| MVK .S2 02200h, B11 ; case 0x2200 setup
+|| XOR .L1 A7, A8, A8 ; r1 ^
+|| XOR .L2 B7, B8, B8 ; r2 ^
+|| MPYU .M1 A12, A6, A5 ; r3 >> 1
+|| MPYU .M2X A11, B6, B5 ; start of r4 >> 5(need 1 more sfl)
+|| SUB .D1 A10, A11,A2 ; test case 0x200
+|| SUB .D2 B10, B13,B0 ; test case 0x40
+
+;3
+ EXTU .S2 B4,31,16,B2 ; r2
+|| MVK .S1 02040h, A11 ; case 0x2040 setup
+|| XOR .L1 A9, A8, A8 ; r1 ^
+|| XOR .L2 B9, B8, B8 ; r2 ^
+|| MPYU .M1X B12, A6, A7 ; r3
+|| MPYU .M2 B12, B6, B7 ; r4
+|| STH .D1 B2, *A3[1] ; save preproc output temporary offchip
+|| [B0]SUB .D2 B10, B11,B0 ; test case 0x2200
+
+;4
+ XOR .S1X A0, B2, A9 ; r1 ^ r2
+|| MVK .S2 0240H, B11 ; case 0x240 setup
+|| XOR .L1 A8, A0, A8 ; r1 ^
+|| XOR .L2 B8, B2, B8 ; r2 ^
+|| MPYHLU .M1 A13, A4,A14 ; r1 >> 4
+|| MPY .M2 2, B5, B5 ; finish r4 >> 5(1 more sfl)
+|| [A2]SUB .D1 A10, A11,A2 ; test case 0x2040
+
+;5
+ XOR .S1 A7, A9, A9 ; r1 ^ r2 ^ r3
+|| MVK .S2 02000h, B2 ; case 0x2000 setup
+|| AND .L1X A8, B12, A8 ; (r1 ^) & 1
+|| AND .L2 B8, B12, B8 ; (r2 ^) & 1
+|| MPYHLU .M1 A12, A6,A10 ; r3 >> 5
+|| MPYU .M2 B13, B4, B9 ; r2 >> 9
+|| ADD .D1 A12,A12,A11 ; 08008000h into A11
+|| SUB .D2 B10, B11,B1 ; test case 0x240
+
+;5''
+ XOR .S1X B12, A14,A14 ; r1 >> 4 ^ 1
+|| SHL .S2 B8, 8, B8 ; r2 feedback << 8
+|| XOR .L1 A7, A5, A7 ; r3 ^
+|| XOR .L2 B7, B5, B7 ; r4 ^
+|| MPYU .M1 A15, A8, A8 ; r1 feedback << 4
+|| MPYHLU .M2X A13, B4, B2 ; r2 >> 4
+|| [B1]SUB .D2 B10, B2, B1 ; test case 0x2000
+
+;5'
+ XOR .S1 A11,A10,A10 ; r3 >> 5 ^ 1
+|| XOR .S2 B12, B9, B9 ; r2 >> 9 ^ 1
+|| AND .L1X A7, B12, A7 ; (r3 ^) & 1
+|| AND .L2 B7, B12, B7 ; (r4 ^) & 1
+|| MPYHLU .M1 A15,A4, A0 ; r1 >> 6
+|| MPY .M2X 8, A6, B10 ; r3 >> 12
+|| ADD .D2 B13,B13,B11 ; 080h into B11
+|| ADD .D1 A13, A13,A5 ; 1000h into hi A13
+
+;6
+ XOR .L1 A4, A8, A8 ; r1 semifinal
+|| XOR .L2 B4, B8, B8 ; r2 semifinal
+|| SHL .S1 A7, 7, A7 ; r3 feedback << 7
+|| SHL .S2 B7, 2, B7 ; r4 feedback << 2
+|| MPYU .M1X B11, A6,A11 ; r3 >> 8
+|| MPYHLU .M2X A15, B4, B5 ; r2 >> 6
+|| LDH .D1 *A3[1], B0 ; restore temp saved output for shift to lsbit
+
+ NOP
+
+
+;7
+ [A1]B .S2 STEPLOOP1 ; move back later
+|| [B0]EXTU .S1 A8, 1, 2,A4 ; r1 final
+|| XOR .L2X A11,B10,B10 ; y ^ z (r3)
+|| AND .L1X A11,B10,A11 ; y & z (r3)
+|| MPYHLU .M1 A5, A4, A5 ; r1 >> 3
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+ XOR .S1 A14, A0, A0 ; y ^ z (r1)
+|| XOR .S2 B5, B9, B5 ; y ^ z (r2)
+|| AND .L1 A14, A0,A14 ; y & z (r1)
+|| AND .L2 B5, B9, B9 ; y & z (r1)
+
+ AND .L1 A5, A0, A0 ; r1 done
+|| AND .L2 B5, B2, B5 ; r2 done
+|| AND .S1X A10,B10,A10 ; r3 done
+|| [A2]EXTU .S2 B8, 1, 2,B4 ; r2 final
+
+ XOR .S1 A14, A0, A0 ; y' ^ z' (r1)
+|| XOR .S2 B6, B7,B10 ; r4 semifinal
+|| XOR .L2 B5, B9, B5 ; y' ^ z' (r2)
+|| XOR .L1 A11,A10,A10 ; y' ^ z' (r3)
+|| MPYU .M2X A13, B4, B7 ; r2 >> 2
+
+ XOR .L1 A9, A0, A0 ; r0 ^ r1
+|| XOR .L2X A10, B5, B5 ; r2 ^ r3
+|| XOR .S1 A6, A7, A7 ; r3 semifinal
+|| EXTU .S2 B0,16,31,B0 ; move output bit to lsb
+|| MPY .M1X 8, B13, A11 ; A11 = 0200h..move up later
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;8
+ [B1]EXTU .S1 A7, 1, 2,A6 ; r3 final
+|| EXTU .S2 B10,1, 2,B6 ; r4 final
+|| MV .L1X B14, A14 ; restore 02240h to A14...move up later
+|| XOR .L2X A0, B5, B5 ; output
+|| MPYU .M1 A13, A4, A7 ; r1 >> 2
+|| STB .D1 B0, *A3++ ; save final output offchip
+
+ EXTU .S2 B5,16,31,B5 ; move output bit to lsb
+ STB .D1 B5, *A3++ ; save final output offchip
+
+*** END Benchmark Timing ***
+
+ LDW .D2 *++B15, A14 ; pop A15 off stack
+|| ADD .L1X 0, B15, A1 ; copy stack pointer
+
+ LDW .D1 *++A1[2], A15 ; pop A15 off stack
+|| LDW .D2 *++B15[2], B14 ; pop B14 off stack
+
+ LDW .D1 *++A1[2], A13 ; pop A13 off stack
+|| LDW .D2 *++B15[2], B13 ; pop B13 off stack
+
+ LDW .D1 *++A1[2], A12 ; pop A12 off stack
+|| LDW .D2 *++B15[2], B12 ; pop B12 off stack
+
+ LDW .D1 *++A1[2], A11 ; pop A11 off stack
+|| LDW .D2 *++B15[2], B11 ; pop B11 off stack
+|| B .S2 B3 ; return
+
+ LDW .D1 *++A1[2], A10 ; pop A10 off stack
+|| LDW .D2 *++B15[2], B10 ; pop B10 off stack
+
+ NOP 4
+
+*****************************************************************************
+*
+* Function: computeA51Asm
+*
+* Description:
+* Computes two 114-bit encryption blocks. Block 1 will be used to encrypt
+* the downlink. Block 2 will be used to decrypt the uplink.
+*
+* Inputs:
+* key ptr to array containing 64-bit encryption key
+* count GSM-specified count based on FN
+*
+* Outputs:
+* block1 ptr to array of 114 bits to encrypt downlink
+* block2 ptr to array of 114 bits to decrypt uplink
+*
+******************************************************************************/
+*
+*
+* Revision Date: 01/27/00: compute the output bit
+*
+* USAGE This routine is C callable and can be called as
+*
+* void computeA51Asm(Char Inputs, Char Outputs)
+*
+* C CODE
+* This is the C equivalent of the assembly code. Note that
+* the assembly code is hand optimized and restrictions may
+* apply.
+*
+*
+* DESCRIPTION
+*
+*
+*==============================================================================
+
+ .global _computeA51Asm
+ .text
+
+*** BEGIN Benchmark Timing ***
+_computeA51Asm:
+
+ ADD .L1X -4, B15, A1 ; copy stack pointer
+|| STW .D2 A14, *-B15[10] ; push A14 on stack
+
+ STW .D1 A10, *A1--[2] ; push A10 on stack
+|| STW .D2 B10, *B15--[2] ; push B10 on stack
+
+ STW .D1 A11, *A1--[2] ; push A11 on stack
+|| STW .D2 B11, *B15--[2] ; push B11 on stack
+|| MV .L1 A8, A0 ; init loop index
+
+ STW .D1 A12, *A1--[2] ; push A12 on stack
+|| STW .D2 B12, *B15--[2] ; push B12 on stack
+
+ STW .D1 A13, *A1--[2] ; push A13 on stack
+|| STW .D2 B13, *B15--[2] ; push B13 on stack
+
+ STW .D1 A15, *A1 ; push A15 on stack
+|| STW .D2 B14, *B15--[3] ; push B14 on stack
+|| MVK .S1 0200h, A11
+|| MVK .S2 08000h, B12
+
+INITA51:
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ MV .L2X A4, B10 ;input data buffer start addr
+|| MV .L1X B4, A3 ;output data buffer start addr
+
+ MVK .S1 0, A4 ;init regs r1,r2,r3
+|| MVK .S2 0, B4
+
+ MVK .S1 0, A6
+|| MVK .S2 0, B6
+
+ MVK .S1 86, A8 ;init loop counter
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;
+; first load in key and count, 86 bits, and stepregs with clock = 0
+;
+ MVK .S1 00040h, A13
+|| MVK .S2 00040h, B13
+
+ MVK .S1 04000h, A12
+ MVK .S2 0, B9
+|| MPYU .M1 A11, A4, A7 ; r1 >> 13
+|| MPYU .M2 B12, B4, B7 ; r2 >> 7
+
+ MVK .S1 00010h, A15
+|| MVKH .S2 00000h, B12
+|| MV .D1 A8, A1 ; init loop index
+
+STEPLOOPA51:
+ EXTU .S1 A4,13,9,A8 ; r1 >> 18
+|| EXTU .S2 B9,14,9, B6 ; r1 >> 17
+|| ADD .D1 A6, A6, A5 ; r3 >> 21
+|| ADD .D2 B4, B4, B8 ; r2 >> 21
+
+;2
+ EXTU .S1 A4,15,9,A9 ; r1 >> 16
+|| XOR .L1 A7, A8, A8 ; r1 (13 ^ 18)
+|| XOR .L2 B7, B8, B8 ; r2 (7 ^ 21)
+|| ADD .S2 B8, B8, B9 ; r2 >> 20
+|| LDB .D2 *B10++, B1 ; load inval input as decision bit
+|| SUB .D1 1, A1 ,A1 ; decrement loop index
+
+;3
+ [A1]B .S1 STEPLOOPA51
+|| EXTU .S2 B4,10,9, B2 ; r2 << 1
+|| XOR .L1 A9, A8, A8 ; r1 ^ 16
+|| XOR .L2 B9, B8, B8 ; r2 ^ 20
+|| ADD .D1 A5, A5, A7 ; r3 >> 20
+
+;4
+ EXTU .S1 A6,11,10,A6 ; r3 << 1
+|| XOR .L1X A8, B6, A8 ; r1 ^ 17
+|| XOR .L2 B8, B4, B8 ; r2 ^ 22
+|| ADD .D1 A4, A4, A14 ; r1 << 1
+;|| EXTU .S2X A4,14,13, B5 ; r1 << 1
+
+;5
+ EXTU .S2 B8,9,31, B8 ; r2 feedback done
+|| EXTU .S1 A8,9,31, A8 ; r1 feedback done
+|| XOR .L1 A5, A7, A5 ; r3 (21 ^ 22)
+
+;6
+ XOR .L1 A14, A8, A4 ; r1 final
+|| XOR .L2 B2, B8, B4 ; r2 final
+|| EXTU .S1 A5,9,31, A5 ; r3 feedback done
+
+;7
+ XOR .S1 A5, A6, A6 ; r3 final
+|| [B1]XOR .L1 A4, 1, A4 ; r1 ^= 1
+|| [B1]XOR .L2 B4, 1, B4 ; r2 ^= 1
+
+;8
+ MPYU .M1 A11, A4, A7 ; r1 >> 13
+|| MPYU .M2 B12, B4, B7 ; r2 >> 7
+|| [B1]XOR .S1 A6, 1, A6 ; r3 ^= 1
+|| ADD .L2X 0,A4, B9 ; r1 into breg
+
+
+ENDLOOPA51:
+;
+; next perform stepregs runup of r1,r2,r3 100 times with clock = 1
+; finally output 228 bits, stepregs with clock = 1
+;
+
+ MVK .S1 329, A1 ;init loop counter
+|| MVK .S2 228, B11 ;init output buffer loop index
+
+ MVK .S1 00040h, A13
+
+ MVK .S2 0, B9
+|| MPYU .M1 A11, A4, A7 ; r1 >> 13
+|| MPYU .M2 B12, B4, B7 ; r2 >> 7
+
+ MVK .S1 00010h, A15
+|| MVKH .S2 00000h, B12
+;
+; init clock bits
+;
+;0
+ EXTU .S2 B4,21,31,B10 ; (r2 & 0x400) >> 6 .. start y11
+|| EXTU .S1 A6,21,31,A10 ; (r3 & 0x400) >> 10 .. finish z11
+|| ADD .L2X 0,A4, B9 ; r1 into breg
+
+ EXTU .S2 B9,23,29,B5 ; (r1 & 0x100) >> 16 .. start x9
+|| ADD .D2 B10,B10,B10 ; finish y11
+
+STEPLOOPA512:
+;1
+ EXTU .S1 A4,13,9,A8 ; r1 >> 18
+|| EXTU .S2 B9,14,9, B6 ; r1 >> 17
+|| ADD .D1 A6, A6, A5 ; r3 >> 21
+|| ADD .D2 B4, B4, B8 ; r2 >> 21
+|| OR .L1X A10,B10,A10 ; y11 | z11 clock bits
+|| AND .L2 4,B5,B5 ; finish x9 clock bit
+
+ OR .L1X A10,B5,A10 ; finish clock...x9 | y11 | z11
+|| OR .L2X A10,B5,B10 ; finish clock...x9 | y11 | z11
+|| XOR .S1 A5, A8,A13 ; (r1 >> 18) ^ (r3 >> 21)
+
+;2
+ EXTU .S1 A4,15,9,A9 ; r1 >> 16
+|| XOR .L1 A7, A8, A8 ; r1 (13 ^ 18)
+|| XOR .L2 B7, B8, B8 ; r2 (7 ^ 21)
+|| ADD .S2 B8, B8, B9 ; r2 >> 20
+|| SUB .D1 1, A1 ,A1 ; decrement loop index
+|| SUB .D2 3, B10, B0 ; case 3 for r1
+
+;3
+ [A1]B .S1 STEPLOOPA512
+|| EXTU .S2 B4,10,9,B14 ; r2 << 1
+|| XOR .L1 A9, A8, A8 ; r1 ^ 16
+|| XOR .L2 B9, B8, B8 ; r2 ^ 20
+|| ADD .D1 A5, A5, A7 ; r3 >> 20
+|| [B0]SUB .D2 4, B10, B0 ; case 4 for r1
+
+;4
+ EXTU .S1 A6,11,10,A12 ; r3 << 1
+|| XOR .S2X A13, B4, B13 ; (r1 >> 18) ^ (r3 >> 21) ^ (r2 >> 22)
+|| XOR .L1X A8, B6, A8 ; r1 ^ 17
+|| XOR .L2 B8, B4, B8 ; r2 ^ 22
+|| ADD .D1 A4, A4, A14 ; r1 << 1
+|| SUB .D2 2, B10, B1 ; case 2 for r2
+
+;5
+ EXTU .S2 B8,9,31, B8 ; r2 feedback done
+|| EXTU .S1 A8,9,31, A8 ; r1 feedback done
+|| XOR .L1 A5, A7, A5 ; r3 (21 ^ 22)
+|| CMPLT .L2X A1, B11, B2 ; loop index > 101 (post-run-up)?
+|| SUB .D1 1, A10 ,A2 ; case 1 for r3
+|| [B1]SUB .D2 5, B10, B1 ; case 5 for r2
+
+;6
+ [B0]XOR .L1 A14, A8, A4 ; r1 final
+|| [B1]XOR .L2 B14, B8, B4 ; r2 final
+|| EXTU .S1 A5,9,31, A5 ; r3 feedback done
+|| EXTU .S2 B13,9,31,B13 ; shift output bit to lsb
+|| [A2]SUB .D1 6, A10 ,A2 ; case 6 for r3
+
+;7
+ [A2]XOR .S1 A5, A12, A6 ; r3 final
+|| ADD .L2X 0,A4, B9 ; r1 into breg
+|| EXTU .S2 B4,21,31,B10 ; (r2 & 0x400) >> 6 .. start y11
+|| [B2]STB .D1 B13, *A3++ ; buffer the output bit after runup
+;8
+ MPYU .M1 A11, A4, A7 ; r1 >> 13
+|| MPYU .M2 B12, B4, B7 ; r2 >> 7
+|| EXTU .S1 A6,21,31,A10 ; (r3 & 0x400) >> 10 .. finish z11
+|| EXTU .S2 B9,23,29,B5 ; (r1 & 0x100) >> 16 .. start x9
+|| ADD .D2 B10,B10,B10 ; finish y11
+
+
+ENDLOOPA512:
+
+ NOP
+
+*** END Benchmark Timing ***
+
+ LDW .D2 *++B15, A14 ; pop A15 off stack
+|| ADD .L1X 0, B15, A1 ; copy stack pointer
+
+ LDW .D1 *++A1[2], A15 ; pop A15 off stack
+|| LDW .D2 *++B15[2], B14 ; pop B14 off stack
+
+ LDW .D1 *++A1[2], A13 ; pop A13 off stack
+|| LDW .D2 *++B15[2], B13 ; pop B13 off stack
+
+ LDW .D1 *++A1[2], A12 ; pop A12 off stack
+|| LDW .D2 *++B15[2], B12 ; pop B12 off stack
+
+ LDW .D1 *++A1[2], A11 ; pop A11 off stack
+|| LDW .D2 *++B15[2], B11 ; pop B11 off stack
+|| B .S2 B3 ; return
+
+ LDW .D1 *++A1[2], A10 ; pop A10 off stack
+|| LDW .D2 *++B15[2], B10 ; pop B10 off stack
+
+ NOP 4
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/encryptA51only.asm b/data/mnet/GP10/Dsp/synchctrl/encryptA51only.asm
new file mode 100644
index 0000000..84f77b6
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/encryptA51only.asm
@@ -0,0 +1,353 @@
+*****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+*****************************************************************************
+*
+* Function: computeA52Asm
+*
+* Description:
+* Stub for A5/2 encryption. Intended for cases where A5/2 is not authorized.
+*
+* Inputs:
+* key ptr to array containing 64-bit encryption key
+* count GSM-specified count based on FN
+*
+* Outputs:
+* block1 ptr to array of 114 bits to encrypt downlink
+* block2 ptr to array of 114 bits to decrypt uplink
+*
+******************************************************************************/
+*
+*
+* Revision Date: 08/11/99: compute the output bit
+*
+* USAGE This routine is C callable and can be called as
+*
+* void computeA52Asm(Char Inputs, Char Outputs)
+*
+* C CODE
+* This is the C equivalent of the assembly code. Note that
+* the assembly code is hand optimized and restrictions may
+* apply.
+*
+*
+* DESCRIPTION
+*
+*
+*==============================================================================
+
+ .global _computeA52Asm
+ .text
+
+*** BEGIN Benchmark Timing ***
+_computeA52Asm:
+
+ ADD .L1X -4, B15, A1 ; copy stack pointer
+|| STW .D2 A14, *-B15[10] ; push A14 on stack
+
+ STW .D1 A10, *A1--[2] ; push A10 on stack
+|| STW .D2 B10, *B15--[2] ; push B10 on stack
+
+ STW .D1 A11, *A1--[2] ; push A11 on stack
+|| STW .D2 B11, *B15--[2] ; push B11 on stack
+|| MV .L1 A8, A0 ; init loop index
+
+ STW .D1 A12, *A1--[2] ; push A12 on stack
+|| STW .D2 B12, *B15--[2] ; push B12 on stack
+
+ STW .D1 A13, *A1--[2] ; push A13 on stack
+|| STW .D2 B13, *B15--[2] ; push B13 on stack
+
+ STW .D1 A15, *A1 ; push A15 on stack
+|| STW .D2 B14, *B15--[3] ; push B14 on stack
+|| MVK .S1 0200h, A11
+|| MVK .S2 08000h, B12
+
+ NOP
+
+*** END Benchmark Timing ***
+
+ LDW .D2 *++B15, A14 ; pop A15 off stack
+|| ADD .L1X 0, B15, A1 ; copy stack pointer
+
+ LDW .D1 *++A1[2], A15 ; pop A15 off stack
+|| LDW .D2 *++B15[2], B14 ; pop B14 off stack
+
+ LDW .D1 *++A1[2], A13 ; pop A13 off stack
+|| LDW .D2 *++B15[2], B13 ; pop B13 off stack
+
+ LDW .D1 *++A1[2], A12 ; pop A12 off stack
+|| LDW .D2 *++B15[2], B12 ; pop B12 off stack
+
+ LDW .D1 *++A1[2], A11 ; pop A11 off stack
+|| LDW .D2 *++B15[2], B11 ; pop B11 off stack
+|| B .S2 B3 ; return
+
+ LDW .D1 *++A1[2], A10 ; pop A10 off stack
+|| LDW .D2 *++B15[2], B10 ; pop B10 off stack
+
+ NOP 4
+
+*****************************************************************************
+*
+* Function: computeA51Asm
+*
+* Description:
+* Computes two 114-bit encryption blocks. Block 1 will be used to encrypt
+* the downlink. Block 2 will be used to decrypt the uplink.
+*
+* Inputs:
+* key ptr to array containing 64-bit encryption key
+* count GSM-specified count based on FN
+*
+* Outputs:
+* block1 ptr to array of 114 bits to encrypt downlink
+* block2 ptr to array of 114 bits to decrypt uplink
+*
+******************************************************************************/
+*
+*
+* Revision Date: 01/27/00: compute the output bit
+*
+* USAGE This routine is C callable and can be called as
+*
+* void computeA51Asm(Char Inputs, Char Outputs)
+*
+* C CODE
+* This is the C equivalent of the assembly code. Note that
+* the assembly code is hand optimized and restrictions may
+* apply.
+*
+*
+* DESCRIPTION
+*
+*
+*==============================================================================
+
+ .global _computeA51Asm
+ .text
+
+*** BEGIN Benchmark Timing ***
+_computeA51Asm:
+
+ ADD .L1X -4, B15, A1 ; copy stack pointer
+|| STW .D2 A14, *-B15[10] ; push A14 on stack
+
+ STW .D1 A10, *A1--[2] ; push A10 on stack
+|| STW .D2 B10, *B15--[2] ; push B10 on stack
+
+ STW .D1 A11, *A1--[2] ; push A11 on stack
+|| STW .D2 B11, *B15--[2] ; push B11 on stack
+|| MV .L1 A8, A0 ; init loop index
+
+ STW .D1 A12, *A1--[2] ; push A12 on stack
+|| STW .D2 B12, *B15--[2] ; push B12 on stack
+
+ STW .D1 A13, *A1--[2] ; push A13 on stack
+|| STW .D2 B13, *B15--[2] ; push B13 on stack
+
+ STW .D1 A15, *A1 ; push A15 on stack
+|| STW .D2 B14, *B15--[3] ; push B14 on stack
+|| MVK .S1 0200h, A11
+|| MVK .S2 08000h, B12
+
+INITA51:
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ MV .L2X A4, B10 ;input data buffer start addr
+|| MV .L1X B4, A3 ;output data buffer start addr
+
+ MVK .S1 0, A4 ;init regs r1,r2,r3
+|| MVK .S2 0, B4
+
+ MVK .S1 0, A6
+|| MVK .S2 0, B6
+
+ MVK .S1 86, A8 ;init loop counter
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;
+; first load in key and count, 86 bits, and stepregs with clock = 0
+;
+ MVK .S1 00040h, A13
+|| MVK .S2 00040h, B13
+
+ MVK .S1 04000h, A12
+ MVK .S2 0, B9
+|| MPYU .M1 A11, A4, A7 ; r1 >> 13
+|| MPYU .M2 B12, B4, B7 ; r2 >> 7
+
+ MVK .S1 00010h, A15
+|| MVKH .S2 00000h, B12
+|| MV .D1 A8, A1 ; init loop index
+
+STEPLOOPA51:
+ EXTU .S1 A4,13,9,A8 ; r1 >> 18
+|| EXTU .S2 B9,14,9, B6 ; r1 >> 17
+|| ADD .D1 A6, A6, A5 ; r3 >> 21
+|| ADD .D2 B4, B4, B8 ; r2 >> 21
+
+;2
+ EXTU .S1 A4,15,9,A9 ; r1 >> 16
+|| XOR .L1 A7, A8, A8 ; r1 (13 ^ 18)
+|| XOR .L2 B7, B8, B8 ; r2 (7 ^ 21)
+|| ADD .S2 B8, B8, B9 ; r2 >> 20
+|| LDB .D2 *B10++, B1 ; load inval input as decision bit
+|| SUB .D1 1, A1 ,A1 ; decrement loop index
+
+;3
+ [A1]B .S1 STEPLOOPA51
+|| EXTU .S2 B4,10,9, B2 ; r2 << 1
+|| XOR .L1 A9, A8, A8 ; r1 ^ 16
+|| XOR .L2 B9, B8, B8 ; r2 ^ 20
+|| ADD .D1 A5, A5, A7 ; r3 >> 20
+
+;4
+ EXTU .S1 A6,11,10,A6 ; r3 << 1
+|| XOR .L1X A8, B6, A8 ; r1 ^ 17
+|| XOR .L2 B8, B4, B8 ; r2 ^ 22
+|| ADD .D1 A4, A4, A14 ; r1 << 1
+;|| EXTU .S2X A4,14,13, B5 ; r1 << 1
+
+;5
+ EXTU .S2 B8,9,31, B8 ; r2 feedback done
+|| EXTU .S1 A8,9,31, A8 ; r1 feedback done
+|| XOR .L1 A5, A7, A5 ; r3 (21 ^ 22)
+
+;6
+ XOR .L1 A14, A8, A4 ; r1 final
+|| XOR .L2 B2, B8, B4 ; r2 final
+|| EXTU .S1 A5,9,31, A5 ; r3 feedback done
+
+;7
+ XOR .S1 A5, A6, A6 ; r3 final
+|| [B1]XOR .L1 A4, 1, A4 ; r1 ^= 1
+|| [B1]XOR .L2 B4, 1, B4 ; r2 ^= 1
+
+;8
+ MPYU .M1 A11, A4, A7 ; r1 >> 13
+|| MPYU .M2 B12, B4, B7 ; r2 >> 7
+|| [B1]XOR .S1 A6, 1, A6 ; r3 ^= 1
+|| ADD .L2X 0,A4, B9 ; r1 into breg
+
+
+ENDLOOPA51:
+;
+; next perform stepregs runup of r1,r2,r3 100 times with clock = 1
+; finally output 228 bits, stepregs with clock = 1
+;
+
+ MVK .S1 329, A1 ;init loop counter
+|| MVK .S2 228, B11 ;init output buffer loop index
+
+ MVK .S1 00040h, A13
+
+ MVK .S2 0, B9
+|| MPYU .M1 A11, A4, A7 ; r1 >> 13
+|| MPYU .M2 B12, B4, B7 ; r2 >> 7
+
+ MVK .S1 00010h, A15
+|| MVKH .S2 00000h, B12
+;
+; init clock bits
+;
+;0
+ EXTU .S2 B4,21,31,B10 ; (r2 & 0x400) >> 6 .. start y11
+|| EXTU .S1 A6,21,31,A10 ; (r3 & 0x400) >> 10 .. finish z11
+|| ADD .L2X 0,A4, B9 ; r1 into breg
+
+ EXTU .S2 B9,23,29,B5 ; (r1 & 0x100) >> 16 .. start x9
+|| ADD .D2 B10,B10,B10 ; finish y11
+
+STEPLOOPA512:
+;1
+ EXTU .S1 A4,13,9,A8 ; r1 >> 18
+|| EXTU .S2 B9,14,9, B6 ; r1 >> 17
+|| ADD .D1 A6, A6, A5 ; r3 >> 21
+|| ADD .D2 B4, B4, B8 ; r2 >> 21
+|| OR .L1X A10,B10,A10 ; y11 | z11 clock bits
+|| AND .L2 4,B5,B5 ; finish x9 clock bit
+
+ OR .L1X A10,B5,A10 ; finish clock...x9 | y11 | z11
+|| OR .L2X A10,B5,B10 ; finish clock...x9 | y11 | z11
+|| XOR .S1 A5, A8,A13 ; (r1 >> 18) ^ (r3 >> 21)
+
+;2
+ EXTU .S1 A4,15,9,A9 ; r1 >> 16
+|| XOR .L1 A7, A8, A8 ; r1 (13 ^ 18)
+|| XOR .L2 B7, B8, B8 ; r2 (7 ^ 21)
+|| ADD .S2 B8, B8, B9 ; r2 >> 20
+|| SUB .D1 1, A1 ,A1 ; decrement loop index
+|| SUB .D2 3, B10, B0 ; case 3 for r1
+
+;3
+ [A1]B .S1 STEPLOOPA512
+|| EXTU .S2 B4,10,9,B14 ; r2 << 1
+|| XOR .L1 A9, A8, A8 ; r1 ^ 16
+|| XOR .L2 B9, B8, B8 ; r2 ^ 20
+|| ADD .D1 A5, A5, A7 ; r3 >> 20
+|| [B0]SUB .D2 4, B10, B0 ; case 4 for r1
+
+;4
+ EXTU .S1 A6,11,10,A12 ; r3 << 1
+|| XOR .S2X A13, B4, B13 ; (r1 >> 18) ^ (r3 >> 21) ^ (r2 >> 22)
+|| XOR .L1X A8, B6, A8 ; r1 ^ 17
+|| XOR .L2 B8, B4, B8 ; r2 ^ 22
+|| ADD .D1 A4, A4, A14 ; r1 << 1
+|| SUB .D2 2, B10, B1 ; case 2 for r2
+
+;5
+ EXTU .S2 B8,9,31, B8 ; r2 feedback done
+|| EXTU .S1 A8,9,31, A8 ; r1 feedback done
+|| XOR .L1 A5, A7, A5 ; r3 (21 ^ 22)
+|| CMPLT .L2X A1, B11, B2 ; loop index > 101 (post-run-up)?
+|| SUB .D1 1, A10 ,A2 ; case 1 for r3
+|| [B1]SUB .D2 5, B10, B1 ; case 5 for r2
+
+;6
+ [B0]XOR .L1 A14, A8, A4 ; r1 final
+|| [B1]XOR .L2 B14, B8, B4 ; r2 final
+|| EXTU .S1 A5,9,31, A5 ; r3 feedback done
+|| EXTU .S2 B13,9,31,B13 ; shift output bit to lsb
+|| [A2]SUB .D1 6, A10 ,A2 ; case 6 for r3
+
+;7
+ [A2]XOR .S1 A5, A12, A6 ; r3 final
+|| ADD .L2X 0,A4, B9 ; r1 into breg
+|| EXTU .S2 B4,21,31,B10 ; (r2 & 0x400) >> 6 .. start y11
+|| [B2]STB .D1 B13, *A3++ ; buffer the output bit after runup
+;8
+ MPYU .M1 A11, A4, A7 ; r1 >> 13
+|| MPYU .M2 B12, B4, B7 ; r2 >> 7
+|| EXTU .S1 A6,21,31,A10 ; (r3 & 0x400) >> 10 .. finish z11
+|| EXTU .S2 B9,23,29,B5 ; (r1 & 0x100) >> 16 .. start x9
+|| ADD .D2 B10,B10,B10 ; finish y11
+
+
+ENDLOOPA512:
+
+ NOP
+
+*** END Benchmark Timing ***
+
+ LDW .D2 *++B15, A14 ; pop A15 off stack
+|| ADD .L1X 0, B15, A1 ; copy stack pointer
+
+ LDW .D1 *++A1[2], A15 ; pop A15 off stack
+|| LDW .D2 *++B15[2], B14 ; pop B14 off stack
+
+ LDW .D1 *++A1[2], A13 ; pop A13 off stack
+|| LDW .D2 *++B15[2], B13 ; pop B13 off stack
+
+ LDW .D1 *++A1[2], A12 ; pop A12 off stack
+|| LDW .D2 *++B15[2], B12 ; pop B12 off stack
+
+ LDW .D1 *++A1[2], A11 ; pop A11 off stack
+|| LDW .D2 *++B15[2], B11 ; pop B11 off stack
+|| B .S2 B3 ; return
+
+ LDW .D1 *++A1[2], A10 ; pop A10 off stack
+|| LDW .D2 *++B15[2], B10 ; pop B10 off stack
+
+ NOP 4
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/encryptA52only.asm b/data/mnet/GP10/Dsp/synchctrl/encryptA52only.asm
new file mode 100644
index 0000000..6a4fd77
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/encryptA52only.asm
@@ -0,0 +1,430 @@
+*****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+
+; declare encryptionCapability and set it to A5/2 Only (bit 1)
+ .def _g_encryptionCapability
+ .data
+_g_encryptionCapability: .word 2
+
+*****************************************************************************
+*
+* Function: computeA52Asm
+*
+* Description:
+* Computes two 114-bit encryption blocks. Block 1 will be used to encrypt
+* the downlink. Block 2 will be used to decrypt the uplink.
+*
+* Inputs:
+* key ptr to array containing 64-bit encryption key
+* count GSM-specified count based on FN
+*
+* Outputs:
+* block1 ptr to array of 114 bits to encrypt downlink
+* block2 ptr to array of 114 bits to decrypt uplink
+*
+******************************************************************************/
+*
+*
+* Revision Date: 08/11/99: compute the output bit
+*
+* USAGE This routine is C callable and can be called as
+*
+* void computeA52Asm(Char Inputs, Char Outputs)
+*
+* C CODE
+* This is the C equivalent of the assembly code. Note that
+* the assembly code is hand optimized and restrictions may
+* apply.
+*
+*
+* DESCRIPTION
+*
+*
+*==============================================================================
+
+ .global _computeA52Asm
+ .text
+
+*** BEGIN Benchmark Timing ***
+_computeA52Asm:
+
+ ADD .L1X -4, B15, A1 ; copy stack pointer
+|| STW .D2 A14, *-B15[10] ; push A14 on stack
+
+ STW .D1 A10, *A1--[2] ; push A10 on stack
+|| STW .D2 B10, *B15--[2] ; push B10 on stack
+
+ STW .D1 A11, *A1--[2] ; push A11 on stack
+|| STW .D2 B11, *B15--[2] ; push B11 on stack
+|| MV .L1 A8, A0 ; init loop index
+
+ STW .D1 A12, *A1--[2] ; push A12 on stack
+|| STW .D2 B12, *B15--[2] ; push B12 on stack
+
+ STW .D1 A13, *A1--[2] ; push A13 on stack
+|| STW .D2 B13, *B15--[2] ; push B13 on stack
+
+ STW .D1 A15, *A1 ; push A15 on stack
+|| STW .D2 B14, *B15--[3] ; push B14 on stack
+|| MVK .S1 0200h, A11
+|| MVK .S2 08000h, B12
+INIT:
+
+ MV .L2X A4, B10 ;input data buffer start addr
+|| MV .L1X B4, A3 ;output data buffer start addr
+
+ MVK .S1 0, A4 ;init reg r1
+|| MVK .S2 0, B4 ;init reg r2
+
+ MVK .S1 0, A6 ;init reg r3
+|| MVK .S2 0, B6 ;init reg r4
+
+ MVK .S1 86, A1 ;init load_in loop index
+
+ MVK .S1 02000h, A13
+|| MVK .S2 00040h, B13
+|| MPYSU .M1X 8, B12, A14 ; 1 << 18
+|| MPYSU .M2 2, B12, B0 ; 1 << 16
+
+ MVK .S1 04000h, A12
+|| MPY .M1 A13, A4, A7 ; r1 >> 2
+|| MPY .M2X A13, B4, B7 ; r2 >> 2
+
+ MVK .S1 00010h, A15
+|| MVKH .S2 00000h, B12
+
+ SHL .S1 A14, 3,A2 ; 1 << 21
+|| SHL .S2 B0, 6, B14 ; 1 << 22
+
+STEPLOOP:
+ EXTU .S1 A4,26,16,A8 ; r1 >> 5
+|| EXTU .S2 B4,16,16,B8 ; r2 >> 15
+|| MPYU .M1 A12, A4, A9 ; r1 >> 1
+|| MPYU .M2X A12, B4, B9 ; r2 >> 1
+|| SUB .D1 1, A1 ,A1 ; decrement loop index
+|| LDB .D2 *B10++, B1 ; load inval input as decision bit
+
+;2
+ EXTU .S1 A4,31,16,A0 ; r1
+|| XOR .L1 A7, A8, A8 ; r1 ^
+|| XOR .L2 B7, B8, B8 ; r2 ^
+|| MPYU .M1 A12, A6, A5 ; r3 >> 1
+|| MPYU .M2X A11, B6, B5 ; start of r4 >> 5(need 1 more sfl)
+
+;3
+ EXTU .S2 B4,31,16,B2 ; r2
+|| XOR .L1 A9, A8, A8 ; r1 ^
+|| XOR .L2 B9, B8, B8 ; r2 ^
+|| MPYU .M1X B12, A6, A7 ; r3
+|| MPYU .M2 B12, B6, B7 ; r4
+
+;4
+ XOR .L1 A8, A0, A8 ; r1 ^
+|| XOR .L2 B8, B2, B8 ; r2 ^
+|| MPY .M2 2, B5, B5 ; finish r4 >> 5(1 more sfl)
+
+;5
+ AND .L1X A8, B12, A8 ; (r1 ^) & 1
+|| AND .L2 B8, B12, B8 ; (r2 ^) & 1
+
+;5''
+ [A1]B .S1 STEPLOOP
+|| SHL .S2 B8, 8, B8 ; r2 feedback << 8
+|| XOR .L1 A7, A5, A7 ; r3 ^
+|| XOR .L2 B7, B5, B7 ; r4 ^
+|| MPYU .M1 A15, A8, A8 ; r1 feedback << 4
+
+;5'
+ AND .L1X A7, B12, A7 ; (r3 ^) & 1
+|| AND .L2 B7, B12, B7 ; (r4 ^) & 1
+
+;6
+ XOR .L1 A4, A8, A8 ; r1 semifinal
+|| XOR .L2 B4, B8, B8 ; r2 semifinal
+|| SHL .S1 A7, 7, A7 ; r3 feedback << 7
+|| SHL .S2 B7, 2, B7 ; r4 feedback << 2
+
+;7
+ EXTU .S1 A8, 1, 2,A4 ; r1 final
+|| EXTU .S2 B8, 1, 2,B4 ; r2 final
+|| XOR .L1 A6, A7, A7 ; r3 semifinal
+|| XOR .L2 B6, B7, B7 ; r4 semifinal
+|| MPY .M1X 8, B13, A11 ; A11 = 0200h
+
+;8
+ EXTU .S1 A7, 1, 2,A6 ; r3 final
+|| EXTU .S2 B7, 1, 2,B6 ; r4 final
+|| [B1]XOR .L1 A4, A14, A4 ; r1 ^= 1 << 18
+|| [B1]XOR .L2 B4, B14, B4 ; r2 ^= 1 << 22
+
+;8'
+ MPY .M1 A13, A4, A7 ; r1 >> 2
+|| MPY .M2X A13, B4, B7 ; r2 >> 2
+|| [B1]XOR .L1 A6, A2, A6 ; r3 ^= 1 << 21
+|| [B1]XOR .L2 B6, B0, B6 ; r4 ^= 1 << 16
+
+ENDLOOP:
+
+ MVK .S1 020h, A10
+|| MVK .S2 010h, B2
+
+ OR .L1 8, A4, A4 ; r1 |= 0x8
+|| OR .L2 B13, B6,B6 ; r4 |= 0x40
+|| OR .S1 A10, A6,A6 ; r3 |= 0x20
+|| OR .S2 B2, B4,B4 ; r2 |= 0x10
+
+ SUB .S1 A3, 1, A3 ;adjust output data ptr for inplace calc
+ MVK .S1 0148h, A1 ;init loop index
+
+ MVK .S1 0200h, A11
+|| MVK .S2 08000h, B12
+
+ MVK .S1 02000h, A13
+|| MVK .S2 00040h, B13
+
+ MVK .S1 04000h, A12
+|| MVK .S2 02240h, B14
+|| MV .L1X B14, A14
+|| MPYU .M1 A13, A4, A7 ; r1 >> 2
+|| MPYU .M2X A13, B4, B7 ; r2 >> 2
+
+ MVK .S1 00010h, A15
+|| MVKH .S2 00000h, B12
+|| MV .L1X B14, A14 ; A14 = 02240h
+
+ MVKH .S1 08002000h, A13
+ MVKH .S1 04004000h, A12
+ MVKH .S1 02000010h, A15
+STEPLOOP1:
+ EXTU .S1 A4,26,16,A8 ; r1 >> 5
+|| EXTU .S2 B4,16,16,B8 ; r2 >> 15
+|| AND .L1X B6, A14,A10 ; r4 & 02240h
+|| AND .L2 B6, B14,B10 ; r4 & 02240h
+|| MPYU .M1 A12, A4, A9 ; r1 >> 1
+|| MPYU .M2X A12, B4, B9 ; r2 >> 1
+|| SUB .D1 1, A1 ,A1 ; decrement loop index
+|| MV .D2 B5, B2 ; save temp output temporary
+;2
+ EXTU .S1 A4,31,16,A0 ; r1
+|| MVK .S2 02200h, B11 ; case 0x2200 setup
+|| XOR .L1 A7, A8, A8 ; r1 ^
+|| XOR .L2 B7, B8, B8 ; r2 ^
+|| MPYU .M1 A12, A6, A5 ; r3 >> 1
+|| MPYU .M2X A11, B6, B5 ; start of r4 >> 5(need 1 more sfl)
+|| SUB .D1 A10, A11,A2 ; test case 0x200
+|| SUB .D2 B10, B13,B0 ; test case 0x40
+
+;3
+ EXTU .S2 B4,31,16,B2 ; r2
+|| MVK .S1 02040h, A11 ; case 0x2040 setup
+|| XOR .L1 A9, A8, A8 ; r1 ^
+|| XOR .L2 B9, B8, B8 ; r2 ^
+|| MPYU .M1X B12, A6, A7 ; r3
+|| MPYU .M2 B12, B6, B7 ; r4
+|| STH .D1 B2, *A3[1] ; save preproc output temporary offchip
+|| [B0]SUB .D2 B10, B11,B0 ; test case 0x2200
+
+;4
+ XOR .S1X A0, B2, A9 ; r1 ^ r2
+|| MVK .S2 0240H, B11 ; case 0x240 setup
+|| XOR .L1 A8, A0, A8 ; r1 ^
+|| XOR .L2 B8, B2, B8 ; r2 ^
+|| MPYHLU .M1 A13, A4,A14 ; r1 >> 4
+|| MPY .M2 2, B5, B5 ; finish r4 >> 5(1 more sfl)
+|| [A2]SUB .D1 A10, A11,A2 ; test case 0x2040
+
+;5
+ XOR .S1 A7, A9, A9 ; r1 ^ r2 ^ r3
+|| MVK .S2 02000h, B2 ; case 0x2000 setup
+|| AND .L1X A8, B12, A8 ; (r1 ^) & 1
+|| AND .L2 B8, B12, B8 ; (r2 ^) & 1
+|| MPYHLU .M1 A12, A6,A10 ; r3 >> 5
+|| MPYU .M2 B13, B4, B9 ; r2 >> 9
+|| ADD .D1 A12,A12,A11 ; 08008000h into A11
+|| SUB .D2 B10, B11,B1 ; test case 0x240
+
+;5''
+ XOR .S1X B12, A14,A14 ; r1 >> 4 ^ 1
+|| SHL .S2 B8, 8, B8 ; r2 feedback << 8
+|| XOR .L1 A7, A5, A7 ; r3 ^
+|| XOR .L2 B7, B5, B7 ; r4 ^
+|| MPYU .M1 A15, A8, A8 ; r1 feedback << 4
+|| MPYHLU .M2X A13, B4, B2 ; r2 >> 4
+|| [B1]SUB .D2 B10, B2, B1 ; test case 0x2000
+
+;5'
+ XOR .S1 A11,A10,A10 ; r3 >> 5 ^ 1
+|| XOR .S2 B12, B9, B9 ; r2 >> 9 ^ 1
+|| AND .L1X A7, B12, A7 ; (r3 ^) & 1
+|| AND .L2 B7, B12, B7 ; (r4 ^) & 1
+|| MPYHLU .M1 A15,A4, A0 ; r1 >> 6
+|| MPY .M2X 8, A6, B10 ; r3 >> 12
+|| ADD .D2 B13,B13,B11 ; 080h into B11
+|| ADD .D1 A13, A13,A5 ; 1000h into hi A13
+
+;6
+ XOR .L1 A4, A8, A8 ; r1 semifinal
+|| XOR .L2 B4, B8, B8 ; r2 semifinal
+|| SHL .S1 A7, 7, A7 ; r3 feedback << 7
+|| SHL .S2 B7, 2, B7 ; r4 feedback << 2
+|| MPYU .M1X B11, A6,A11 ; r3 >> 8
+|| MPYHLU .M2X A15, B4, B5 ; r2 >> 6
+|| LDH .D1 *A3[1], B0 ; restore temp saved output for shift to lsbit
+
+ NOP
+
+
+;7
+ [A1]B .S2 STEPLOOP1 ; move back later
+|| [B0]EXTU .S1 A8, 1, 2,A4 ; r1 final
+|| XOR .L2X A11,B10,B10 ; y ^ z (r3)
+|| AND .L1X A11,B10,A11 ; y & z (r3)
+|| MPYHLU .M1 A5, A4, A5 ; r1 >> 3
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+ XOR .S1 A14, A0, A0 ; y ^ z (r1)
+|| XOR .S2 B5, B9, B5 ; y ^ z (r2)
+|| AND .L1 A14, A0,A14 ; y & z (r1)
+|| AND .L2 B5, B9, B9 ; y & z (r1)
+
+ AND .L1 A5, A0, A0 ; r1 done
+|| AND .L2 B5, B2, B5 ; r2 done
+|| AND .S1X A10,B10,A10 ; r3 done
+|| [A2]EXTU .S2 B8, 1, 2,B4 ; r2 final
+
+ XOR .S1 A14, A0, A0 ; y' ^ z' (r1)
+|| XOR .S2 B6, B7,B10 ; r4 semifinal
+|| XOR .L2 B5, B9, B5 ; y' ^ z' (r2)
+|| XOR .L1 A11,A10,A10 ; y' ^ z' (r3)
+|| MPYU .M2X A13, B4, B7 ; r2 >> 2
+
+ XOR .L1 A9, A0, A0 ; r0 ^ r1
+|| XOR .L2X A10, B5, B5 ; r2 ^ r3
+|| XOR .S1 A6, A7, A7 ; r3 semifinal
+|| EXTU .S2 B0,16,31,B0 ; move output bit to lsb
+|| MPY .M1X 8, B13, A11 ; A11 = 0200h..move up later
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;8
+ [B1]EXTU .S1 A7, 1, 2,A6 ; r3 final
+|| EXTU .S2 B10,1, 2,B6 ; r4 final
+|| MV .L1X B14, A14 ; restore 02240h to A14...move up later
+|| XOR .L2X A0, B5, B5 ; output
+|| MPYU .M1 A13, A4, A7 ; r1 >> 2
+|| STB .D1 B0, *A3++ ; save final output offchip
+
+ EXTU .S2 B5,16,31,B5 ; move output bit to lsb
+ STB .D1 B5, *A3++ ; save final output offchip
+
+*** END Benchmark Timing ***
+
+ LDW .D2 *++B15, A14 ; pop A15 off stack
+|| ADD .L1X 0, B15, A1 ; copy stack pointer
+
+ LDW .D1 *++A1[2], A15 ; pop A15 off stack
+|| LDW .D2 *++B15[2], B14 ; pop B14 off stack
+
+ LDW .D1 *++A1[2], A13 ; pop A13 off stack
+|| LDW .D2 *++B15[2], B13 ; pop B13 off stack
+
+ LDW .D1 *++A1[2], A12 ; pop A12 off stack
+|| LDW .D2 *++B15[2], B12 ; pop B12 off stack
+
+ LDW .D1 *++A1[2], A11 ; pop A11 off stack
+|| LDW .D2 *++B15[2], B11 ; pop B11 off stack
+|| B .S2 B3 ; return
+
+ LDW .D1 *++A1[2], A10 ; pop A10 off stack
+|| LDW .D2 *++B15[2], B10 ; pop B10 off stack
+
+ NOP 4
+
+*****************************************************************************
+*
+* Function: computeA51Asm
+*
+* Description:
+* Stub for A5/1 encryption. Intended for cases where A5/2 is not authorized.
+*
+* Inputs:
+* key ptr to array containing 64-bit encryption key
+* count GSM-specified count based on FN
+*
+* Outputs:
+* block1 ptr to array of 114 bits to encrypt downlink
+* block2 ptr to array of 114 bits to decrypt uplink
+*
+******************************************************************************/
+*
+*
+* Revision Date: 01/27/00: compute the output bit
+*
+* USAGE This routine is C callable and can be called as
+*
+* void computeA51Asm(Char Inputs, Char Outputs)
+*
+* C CODE
+* This is the C equivalent of the assembly code. Note that
+* the assembly code is hand optimized and restrictions may
+* apply.
+*
+*
+* DESCRIPTION
+*
+*
+*==============================================================================
+
+ .global _computeA51Asm
+ .text
+
+*** BEGIN Benchmark Timing ***
+_computeA51Asm:
+
+ ADD .L1X -4, B15, A1 ; copy stack pointer
+|| STW .D2 A14, *-B15[10] ; push A14 on stack
+
+ STW .D1 A10, *A1--[2] ; push A10 on stack
+|| STW .D2 B10, *B15--[2] ; push B10 on stack
+
+ STW .D1 A11, *A1--[2] ; push A11 on stack
+|| STW .D2 B11, *B15--[2] ; push B11 on stack
+|| MV .L1 A8, A0 ; init loop index
+
+ STW .D1 A12, *A1--[2] ; push A12 on stack
+|| STW .D2 B12, *B15--[2] ; push B12 on stack
+
+ STW .D1 A13, *A1--[2] ; push A13 on stack
+|| STW .D2 B13, *B15--[2] ; push B13 on stack
+
+ STW .D1 A15, *A1 ; push A15 on stack
+|| STW .D2 B14, *B15--[3] ; push B14 on stack
+|| MVK .S1 0200h, A11
+|| MVK .S2 08000h, B12
+
+ NOP
+
+*** END Benchmark Timing ***
+
+ LDW .D2 *++B15, A14 ; pop A15 off stack
+|| ADD .L1X 0, B15, A1 ; copy stack pointer
+
+ LDW .D1 *++A1[2], A15 ; pop A15 off stack
+|| LDW .D2 *++B15[2], B14 ; pop B14 off stack
+
+ LDW .D1 *++A1[2], A13 ; pop A13 off stack
+|| LDW .D2 *++B15[2], B13 ; pop B13 off stack
+
+ LDW .D1 *++A1[2], A12 ; pop A12 off stack
+|| LDW .D2 *++B15[2], B12 ; pop B12 off stack
+
+ LDW .D1 *++A1[2], A11 ; pop A11 off stack
+|| LDW .D2 *++B15[2], B11 ; pop B11 off stack
+|| B .S2 B3 ; return
+
+ LDW .D1 *++A1[2], A10 ; pop A10 off stack
+|| LDW .D2 *++B15[2], B10 ; pop B10 off stack
+
+ NOP 4
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/encryptNone.asm b/data/mnet/GP10/Dsp/synchctrl/encryptNone.asm
new file mode 100644
index 0000000..b0c9c2a
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/encryptNone.asm
@@ -0,0 +1,178 @@
+*****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+*****************************************************************************
+*
+* Function: computeA52Asm
+*
+* Description:
+* Stub for A5/2 encryption. Intended for cases where A5/2 is not authorized.
+*
+* Inputs:
+* key ptr to array containing 64-bit encryption key
+* count GSM-specified count based on FN
+*
+* Outputs:
+* block1 ptr to array of 114 bits to encrypt downlink
+* block2 ptr to array of 114 bits to decrypt uplink
+*
+******************************************************************************/
+*
+*
+* Revision Date: 08/11/99: compute the output bit
+*
+* USAGE This routine is C callable and can be called as
+*
+* void computeA52Asm(Char Inputs, Char Outputs)
+*
+* C CODE
+* This is the C equivalent of the assembly code. Note that
+* the assembly code is hand optimized and restrictions may
+* apply.
+*
+*
+* DESCRIPTION
+*
+*
+*==============================================================================
+
+ .global _computeA52Asm
+ .text
+
+*** BEGIN Benchmark Timing ***
+_computeA52Asm:
+
+ ADD .L1X -4, B15, A1 ; copy stack pointer
+|| STW .D2 A14, *-B15[10] ; push A14 on stack
+
+ STW .D1 A10, *A1--[2] ; push A10 on stack
+|| STW .D2 B10, *B15--[2] ; push B10 on stack
+
+ STW .D1 A11, *A1--[2] ; push A11 on stack
+|| STW .D2 B11, *B15--[2] ; push B11 on stack
+|| MV .L1 A8, A0 ; init loop index
+
+ STW .D1 A12, *A1--[2] ; push A12 on stack
+|| STW .D2 B12, *B15--[2] ; push B12 on stack
+
+ STW .D1 A13, *A1--[2] ; push A13 on stack
+|| STW .D2 B13, *B15--[2] ; push B13 on stack
+
+ STW .D1 A15, *A1 ; push A15 on stack
+|| STW .D2 B14, *B15--[3] ; push B14 on stack
+|| MVK .S1 0200h, A11
+|| MVK .S2 08000h, B12
+
+ NOP
+
+*** END Benchmark Timing ***
+
+ LDW .D2 *++B15, A14 ; pop A15 off stack
+|| ADD .L1X 0, B15, A1 ; copy stack pointer
+
+ LDW .D1 *++A1[2], A15 ; pop A15 off stack
+|| LDW .D2 *++B15[2], B14 ; pop B14 off stack
+
+ LDW .D1 *++A1[2], A13 ; pop A13 off stack
+|| LDW .D2 *++B15[2], B13 ; pop B13 off stack
+
+ LDW .D1 *++A1[2], A12 ; pop A12 off stack
+|| LDW .D2 *++B15[2], B12 ; pop B12 off stack
+
+ LDW .D1 *++A1[2], A11 ; pop A11 off stack
+|| LDW .D2 *++B15[2], B11 ; pop B11 off stack
+|| B .S2 B3 ; return
+
+ LDW .D1 *++A1[2], A10 ; pop A10 off stack
+|| LDW .D2 *++B15[2], B10 ; pop B10 off stack
+
+ NOP 4
+
+*****************************************************************************
+*
+* Function: computeA51Asm
+*
+* Description:
+* Stub for A5/1 encryption. Intended for cases where A5/2 is not authorized.
+*
+* Inputs:
+* key ptr to array containing 64-bit encryption key
+* count GSM-specified count based on FN
+*
+* Outputs:
+* block1 ptr to array of 114 bits to encrypt downlink
+* block2 ptr to array of 114 bits to decrypt uplink
+*
+******************************************************************************/
+*
+*
+* Revision Date: 01/27/00: compute the output bit
+*
+* USAGE This routine is C callable and can be called as
+*
+* void computeA51Asm(Char Inputs, Char Outputs)
+*
+* C CODE
+* This is the C equivalent of the assembly code. Note that
+* the assembly code is hand optimized and restrictions may
+* apply.
+*
+*
+* DESCRIPTION
+*
+*
+*==============================================================================
+
+ .global _computeA51Asm
+ .text
+
+*** BEGIN Benchmark Timing ***
+_computeA51Asm:
+
+ ADD .L1X -4, B15, A1 ; copy stack pointer
+|| STW .D2 A14, *-B15[10] ; push A14 on stack
+
+ STW .D1 A10, *A1--[2] ; push A10 on stack
+|| STW .D2 B10, *B15--[2] ; push B10 on stack
+
+ STW .D1 A11, *A1--[2] ; push A11 on stack
+|| STW .D2 B11, *B15--[2] ; push B11 on stack
+|| MV .L1 A8, A0 ; init loop index
+
+ STW .D1 A12, *A1--[2] ; push A12 on stack
+|| STW .D2 B12, *B15--[2] ; push B12 on stack
+
+ STW .D1 A13, *A1--[2] ; push A13 on stack
+|| STW .D2 B13, *B15--[2] ; push B13 on stack
+
+ STW .D1 A15, *A1 ; push A15 on stack
+|| STW .D2 B14, *B15--[3] ; push B14 on stack
+|| MVK .S1 0200h, A11
+|| MVK .S2 08000h, B12
+
+ NOP
+
+*** END Benchmark Timing ***
+
+ LDW .D2 *++B15, A14 ; pop A15 off stack
+|| ADD .L1X 0, B15, A1 ; copy stack pointer
+
+ LDW .D1 *++A1[2], A15 ; pop A15 off stack
+|| LDW .D2 *++B15[2], B14 ; pop B14 off stack
+
+ LDW .D1 *++A1[2], A13 ; pop A13 off stack
+|| LDW .D2 *++B15[2], B13 ; pop B13 off stack
+
+ LDW .D1 *++A1[2], A12 ; pop A12 off stack
+|| LDW .D2 *++B15[2], B12 ; pop B12 off stack
+
+ LDW .D1 *++A1[2], A11 ; pop A11 off stack
+|| LDW .D2 *++B15[2], B11 ; pop B11 off stack
+|| B .S2 B3 ; return
+
+ LDW .D1 *++A1[2], A10 ; pop A10 off stack
+|| LDW .D2 *++B15[2], B10 ; pop B10 off stack
+
+ NOP 4
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/encryptsubs.asm b/data/mnet/GP10/Dsp/synchctrl/encryptsubs.asm
new file mode 100644
index 0000000..f72bab0
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/encryptsubs.asm
@@ -0,0 +1,599 @@
+*****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+*****************************************************************************
+*
+* Function: computeA52Asm
+*
+* Description:
+* Computes two 114-bit encryption blocks. Block 1 will be used to encrypt
+* the downlink. Block 2 will be used to decrypt the uplink.
+*
+* Inputs:
+* key ptr to array containing 64-bit encryption key
+* count GSM-specified count based on FN
+*
+* Outputs:
+* block1 ptr to array of 114 bits to encrypt downlink
+* block2 ptr to array of 114 bits to decrypt uplink
+*
+******************************************************************************/
+*
+*
+* Revision Date: 08/11/99: compute the output bit
+*
+* USAGE This routine is C callable and can be called as
+*
+* void computeA52Asm(Char Inputs, Char Outputs)
+*
+* C CODE
+* This is the C equivalent of the assembly code. Note that
+* the assembly code is hand optimized and restrictions may
+* apply.
+*
+*
+* DESCRIPTION
+*
+*
+*==============================================================================
+
+ .global _computeA52Asm
+ .text
+
+*** BEGIN Benchmark Timing ***
+_computeA52Asm:
+
+ ADD .L1X -4, B15, A1 ; copy stack pointer
+|| STW .D2 A14, *-B15[10] ; push A14 on stack
+
+ STW .D1 A10, *A1--[2] ; push A10 on stack
+|| STW .D2 B10, *B15--[2] ; push B10 on stack
+
+ STW .D1 A11, *A1--[2] ; push A11 on stack
+|| STW .D2 B11, *B15--[2] ; push B11 on stack
+|| MV .L1 A8, A0 ; init loop index
+
+ STW .D1 A12, *A1--[2] ; push A12 on stack
+|| STW .D2 B12, *B15--[2] ; push B12 on stack
+
+ STW .D1 A13, *A1--[2] ; push A13 on stack
+|| STW .D2 B13, *B15--[2] ; push B13 on stack
+
+ STW .D1 A15, *A1 ; push A15 on stack
+|| STW .D2 B14, *B15--[3] ; push B14 on stack
+|| MVK .S1 0200h, A11
+|| MVK .S2 08000h, B12
+INIT:
+
+ MV .L2X A4, B10 ;input data buffer start addr
+|| MV .L1X B4, A3 ;output data buffer start addr
+
+ MVK .S1 0, A4 ;init reg r1
+|| MVK .S2 0, B4 ;init reg r2
+
+ MVK .S1 0, A6 ;init reg r3
+|| MVK .S2 0, B6 ;init reg r4
+
+ MVK .S1 86, A1 ;init load_in loop index
+
+ MVK .S1 02000h, A13
+|| MVK .S2 00040h, B13
+|| MPYSU .M1X 8, B12, A14 ; 1 << 18
+|| MPYSU .M2 2, B12, B0 ; 1 << 16
+
+ MVK .S1 04000h, A12
+|| MPY .M1 A13, A4, A7 ; r1 >> 2
+|| MPY .M2X A13, B4, B7 ; r2 >> 2
+
+ MVK .S1 00010h, A15
+|| MVKH .S2 00000h, B12
+
+ SHL .S1 A14, 3,A2 ; 1 << 21
+|| SHL .S2 B0, 6, B14 ; 1 << 22
+
+STEPLOOP:
+ EXTU .S1 A4,26,16,A8 ; r1 >> 5
+|| EXTU .S2 B4,16,16,B8 ; r2 >> 15
+|| MPYU .M1 A12, A4, A9 ; r1 >> 1
+|| MPYU .M2X A12, B4, B9 ; r2 >> 1
+|| SUB .D1 1, A1 ,A1 ; decrement loop index
+|| LDB .D2 *B10++, B1 ; load inval input as decision bit
+
+;2
+ EXTU .S1 A4,31,16,A0 ; r1
+|| XOR .L1 A7, A8, A8 ; r1 ^
+|| XOR .L2 B7, B8, B8 ; r2 ^
+|| MPYU .M1 A12, A6, A5 ; r3 >> 1
+|| MPYU .M2X A11, B6, B5 ; start of r4 >> 5(need 1 more sfl)
+
+;3
+ EXTU .S2 B4,31,16,B2 ; r2
+|| XOR .L1 A9, A8, A8 ; r1 ^
+|| XOR .L2 B9, B8, B8 ; r2 ^
+|| MPYU .M1X B12, A6, A7 ; r3
+|| MPYU .M2 B12, B6, B7 ; r4
+
+;4
+ XOR .L1 A8, A0, A8 ; r1 ^
+|| XOR .L2 B8, B2, B8 ; r2 ^
+|| MPY .M2 2, B5, B5 ; finish r4 >> 5(1 more sfl)
+
+;5
+ AND .L1X A8, B12, A8 ; (r1 ^) & 1
+|| AND .L2 B8, B12, B8 ; (r2 ^) & 1
+
+;5''
+ [A1]B .S1 STEPLOOP
+|| SHL .S2 B8, 8, B8 ; r2 feedback << 8
+|| XOR .L1 A7, A5, A7 ; r3 ^
+|| XOR .L2 B7, B5, B7 ; r4 ^
+|| MPYU .M1 A15, A8, A8 ; r1 feedback << 4
+
+;5'
+ AND .L1X A7, B12, A7 ; (r3 ^) & 1
+|| AND .L2 B7, B12, B7 ; (r4 ^) & 1
+
+;6
+ XOR .L1 A4, A8, A8 ; r1 semifinal
+|| XOR .L2 B4, B8, B8 ; r2 semifinal
+|| SHL .S1 A7, 7, A7 ; r3 feedback << 7
+|| SHL .S2 B7, 2, B7 ; r4 feedback << 2
+
+;7
+ EXTU .S1 A8, 1, 2,A4 ; r1 final
+|| EXTU .S2 B8, 1, 2,B4 ; r2 final
+|| XOR .L1 A6, A7, A7 ; r3 semifinal
+|| XOR .L2 B6, B7, B7 ; r4 semifinal
+|| MPY .M1X 8, B13, A11 ; A11 = 0200h
+
+;8
+ EXTU .S1 A7, 1, 2,A6 ; r3 final
+|| EXTU .S2 B7, 1, 2,B6 ; r4 final
+|| [B1]XOR .L1 A4, A14, A4 ; r1 ^= 1 << 18
+|| [B1]XOR .L2 B4, B14, B4 ; r2 ^= 1 << 22
+
+;8'
+ MPY .M1 A13, A4, A7 ; r1 >> 2
+|| MPY .M2X A13, B4, B7 ; r2 >> 2
+|| [B1]XOR .L1 A6, A2, A6 ; r3 ^= 1 << 21
+|| [B1]XOR .L2 B6, B0, B6 ; r4 ^= 1 << 16
+
+ENDLOOP:
+
+ MVK .S1 020h, A10
+|| MVK .S2 010h, B2
+
+ OR .L1 8, A4, A4 ; r1 |= 0x8
+|| OR .L2 B13, B6,B6 ; r4 |= 0x40
+|| OR .S1 A10, A6,A6 ; r3 |= 0x20
+|| OR .S2 B2, B4,B4 ; r2 |= 0x10
+
+ SUB .S1 A3, 1, A3 ;adjust output data ptr for inplace calc
+ MVK .S1 0148h, A1 ;init loop index
+
+ MVK .S1 0200h, A11
+|| MVK .S2 08000h, B12
+
+ MVK .S1 02000h, A13
+|| MVK .S2 00040h, B13
+
+ MVK .S1 04000h, A12
+|| MVK .S2 02240h, B14
+|| MV .L1X B14, A14
+|| MPYU .M1 A13, A4, A7 ; r1 >> 2
+|| MPYU .M2X A13, B4, B7 ; r2 >> 2
+
+ MVK .S1 00010h, A15
+|| MVKH .S2 00000h, B12
+|| MV .L1X B14, A14 ; A14 = 02240h
+
+ MVKH .S1 08002000h, A13
+ MVKH .S1 04004000h, A12
+ MVKH .S1 02000010h, A15
+STEPLOOP1:
+ EXTU .S1 A4,26,16,A8 ; r1 >> 5
+|| EXTU .S2 B4,16,16,B8 ; r2 >> 15
+|| AND .L1X B6, A14,A10 ; r4 & 02240h
+|| AND .L2 B6, B14,B10 ; r4 & 02240h
+|| MPYU .M1 A12, A4, A9 ; r1 >> 1
+|| MPYU .M2X A12, B4, B9 ; r2 >> 1
+|| SUB .D1 1, A1 ,A1 ; decrement loop index
+|| MV .D2 B5, B2 ; save temp output temporary
+;2
+ EXTU .S1 A4,31,16,A0 ; r1
+|| MVK .S2 02200h, B11 ; case 0x2200 setup
+|| XOR .L1 A7, A8, A8 ; r1 ^
+|| XOR .L2 B7, B8, B8 ; r2 ^
+|| MPYU .M1 A12, A6, A5 ; r3 >> 1
+|| MPYU .M2X A11, B6, B5 ; start of r4 >> 5(need 1 more sfl)
+|| SUB .D1 A10, A11,A2 ; test case 0x200
+|| SUB .D2 B10, B13,B0 ; test case 0x40
+
+;3
+ EXTU .S2 B4,31,16,B2 ; r2
+|| MVK .S1 02040h, A11 ; case 0x2040 setup
+|| XOR .L1 A9, A8, A8 ; r1 ^
+|| XOR .L2 B9, B8, B8 ; r2 ^
+|| MPYU .M1X B12, A6, A7 ; r3
+|| MPYU .M2 B12, B6, B7 ; r4
+|| STH .D1 B2, *A3[1] ; save preproc output temporary offchip
+|| [B0]SUB .D2 B10, B11,B0 ; test case 0x2200
+
+;4
+ XOR .S1X A0, B2, A9 ; r1 ^ r2
+|| MVK .S2 0240H, B11 ; case 0x240 setup
+|| XOR .L1 A8, A0, A8 ; r1 ^
+|| XOR .L2 B8, B2, B8 ; r2 ^
+|| MPYHLU .M1 A13, A4,A14 ; r1 >> 4
+|| MPY .M2 2, B5, B5 ; finish r4 >> 5(1 more sfl)
+|| [A2]SUB .D1 A10, A11,A2 ; test case 0x2040
+
+;5
+ XOR .S1 A7, A9, A9 ; r1 ^ r2 ^ r3
+|| MVK .S2 02000h, B2 ; case 0x2000 setup
+|| AND .L1X A8, B12, A8 ; (r1 ^) & 1
+|| AND .L2 B8, B12, B8 ; (r2 ^) & 1
+|| MPYHLU .M1 A12, A6,A10 ; r3 >> 5
+|| MPYU .M2 B13, B4, B9 ; r2 >> 9
+|| ADD .D1 A12,A12,A11 ; 08008000h into A11
+|| SUB .D2 B10, B11,B1 ; test case 0x240
+
+;5''
+ XOR .S1X B12, A14,A14 ; r1 >> 4 ^ 1
+|| SHL .S2 B8, 8, B8 ; r2 feedback << 8
+|| XOR .L1 A7, A5, A7 ; r3 ^
+|| XOR .L2 B7, B5, B7 ; r4 ^
+|| MPYU .M1 A15, A8, A8 ; r1 feedback << 4
+|| MPYHLU .M2X A13, B4, B2 ; r2 >> 4
+|| [B1]SUB .D2 B10, B2, B1 ; test case 0x2000
+
+;5'
+ XOR .S1 A11,A10,A10 ; r3 >> 5 ^ 1
+|| XOR .S2 B12, B9, B9 ; r2 >> 9 ^ 1
+|| AND .L1X A7, B12, A7 ; (r3 ^) & 1
+|| AND .L2 B7, B12, B7 ; (r4 ^) & 1
+|| MPYHLU .M1 A15,A4, A0 ; r1 >> 6
+|| MPY .M2X 8, A6, B10 ; r3 >> 12
+|| ADD .D2 B13,B13,B11 ; 080h into B11
+|| ADD .D1 A13, A13,A5 ; 1000h into hi A13
+
+;6
+ XOR .L1 A4, A8, A8 ; r1 semifinal
+|| XOR .L2 B4, B8, B8 ; r2 semifinal
+|| SHL .S1 A7, 7, A7 ; r3 feedback << 7
+|| SHL .S2 B7, 2, B7 ; r4 feedback << 2
+|| MPYU .M1X B11, A6,A11 ; r3 >> 8
+|| MPYHLU .M2X A15, B4, B5 ; r2 >> 6
+|| LDH .D1 *A3[1], B0 ; restore temp saved output for shift to lsbit
+
+ NOP
+
+
+;7
+ [A1]B .S2 STEPLOOP1 ; move back later
+|| [B0]EXTU .S1 A8, 1, 2,A4 ; r1 final
+|| XOR .L2X A11,B10,B10 ; y ^ z (r3)
+|| AND .L1X A11,B10,A11 ; y & z (r3)
+|| MPYHLU .M1 A5, A4, A5 ; r1 >> 3
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+ XOR .S1 A14, A0, A0 ; y ^ z (r1)
+|| XOR .S2 B5, B9, B5 ; y ^ z (r2)
+|| AND .L1 A14, A0,A14 ; y & z (r1)
+|| AND .L2 B5, B9, B9 ; y & z (r1)
+
+ AND .L1 A5, A0, A0 ; r1 done
+|| AND .L2 B5, B2, B5 ; r2 done
+|| AND .S1X A10,B10,A10 ; r3 done
+|| [A2]EXTU .S2 B8, 1, 2,B4 ; r2 final
+
+ XOR .S1 A14, A0, A0 ; y' ^ z' (r1)
+|| XOR .S2 B6, B7,B10 ; r4 semifinal
+|| XOR .L2 B5, B9, B5 ; y' ^ z' (r2)
+|| XOR .L1 A11,A10,A10 ; y' ^ z' (r3)
+|| MPYU .M2X A13, B4, B7 ; r2 >> 2
+
+ XOR .L1 A9, A0, A0 ; r0 ^ r1
+|| XOR .L2X A10, B5, B5 ; r2 ^ r3
+|| XOR .S1 A6, A7, A7 ; r3 semifinal
+|| EXTU .S2 B0,16,31,B0 ; move output bit to lsb
+|| MPY .M1X 8, B13, A11 ; A11 = 0200h..move up later
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;8
+ [B1]EXTU .S1 A7, 1, 2,A6 ; r3 final
+|| EXTU .S2 B10,1, 2,B6 ; r4 final
+|| MV .L1X B14, A14 ; restore 02240h to A14...move up later
+|| XOR .L2X A0, B5, B5 ; output
+|| MPYU .M1 A13, A4, A7 ; r1 >> 2
+|| STB .D1 B0, *A3++ ; save final output offchip
+
+ EXTU .S2 B5,16,31,B5 ; move output bit to lsb
+ STB .D1 B5, *A3++ ; save final output offchip
+
+*** END Benchmark Timing ***
+
+ LDW .D2 *++B15, A14 ; pop A15 off stack
+|| ADD .L1X 0, B15, A1 ; copy stack pointer
+
+ LDW .D1 *++A1[2], A15 ; pop A15 off stack
+|| LDW .D2 *++B15[2], B14 ; pop B14 off stack
+
+ LDW .D1 *++A1[2], A13 ; pop A13 off stack
+|| LDW .D2 *++B15[2], B13 ; pop B13 off stack
+
+ LDW .D1 *++A1[2], A12 ; pop A12 off stack
+|| LDW .D2 *++B15[2], B12 ; pop B12 off stack
+
+ LDW .D1 *++A1[2], A11 ; pop A11 off stack
+|| LDW .D2 *++B15[2], B11 ; pop B11 off stack
+|| B .S2 B3 ; return
+
+ LDW .D1 *++A1[2], A10 ; pop A10 off stack
+|| LDW .D2 *++B15[2], B10 ; pop B10 off stack
+
+ NOP 4
+
+*****************************************************************************
+*
+* Function: computeA51Asm
+*
+* Description:
+* Computes two 114-bit encryption blocks. Block 1 will be used to encrypt
+* the downlink. Block 2 will be used to decrypt the uplink.
+*
+* Inputs:
+* key ptr to array containing 64-bit encryption key
+* count GSM-specified count based on FN
+*
+* Outputs:
+* block1 ptr to array of 114 bits to encrypt downlink
+* block2 ptr to array of 114 bits to decrypt uplink
+*
+******************************************************************************/
+*
+*
+* Revision Date: 01/27/00: compute the output bit
+*
+* USAGE This routine is C callable and can be called as
+*
+* void computeA51Asm(Char Inputs, Char Outputs)
+*
+* C CODE
+* This is the C equivalent of the assembly code. Note that
+* the assembly code is hand optimized and restrictions may
+* apply.
+*
+*
+* DESCRIPTION
+*
+*
+*==============================================================================
+
+ .global _computeA51Asm
+ .text
+
+*** BEGIN Benchmark Timing ***
+_computeA51Asm:
+
+ ADD .L1X -4, B15, A1 ; copy stack pointer
+|| STW .D2 A14, *-B15[10] ; push A14 on stack
+
+ STW .D1 A10, *A1--[2] ; push A10 on stack
+|| STW .D2 B10, *B15--[2] ; push B10 on stack
+
+ STW .D1 A11, *A1--[2] ; push A11 on stack
+|| STW .D2 B11, *B15--[2] ; push B11 on stack
+|| MV .L1 A8, A0 ; init loop index
+
+ STW .D1 A12, *A1--[2] ; push A12 on stack
+|| STW .D2 B12, *B15--[2] ; push B12 on stack
+
+ STW .D1 A13, *A1--[2] ; push A13 on stack
+|| STW .D2 B13, *B15--[2] ; push B13 on stack
+
+ STW .D1 A15, *A1 ; push A15 on stack
+|| STW .D2 B14, *B15--[3] ; push B14 on stack
+|| MVK .S1 0200h, A11
+|| MVK .S2 08000h, B12
+
+INITA51:
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ MV .L2X A4, B10 ;input data buffer start addr
+|| MV .L1X B4, A3 ;output data buffer start addr
+
+ MVK .S1 0, A4 ;init regs r1,r2,r3
+|| MVK .S2 0, B4
+
+ MVK .S1 0, A6
+|| MVK .S2 0, B6
+
+ MVK .S1 86, A8 ;init loop counter
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;
+; first load in key and count, 86 bits, and stepregs with clock = 0
+;
+ MVK .S1 00040h, A13
+|| MVK .S2 00040h, B13
+
+ MVK .S1 04000h, A12
+ MVK .S2 0, B9
+|| MPYU .M1 A11, A4, A7 ; r1 >> 13
+|| MPYU .M2 B12, B4, B7 ; r2 >> 7
+
+ MVK .S1 00010h, A15
+|| MVKH .S2 00000h, B12
+|| MV .D1 A8, A1 ; init loop index
+
+STEPLOOPA51:
+ EXTU .S1 A4,13,9,A8 ; r1 >> 18
+|| EXTU .S2 B9,14,9, B6 ; r1 >> 17
+|| ADD .D1 A6, A6, A5 ; r3 >> 21
+|| ADD .D2 B4, B4, B8 ; r2 >> 21
+
+;2
+ EXTU .S1 A4,15,9,A9 ; r1 >> 16
+|| XOR .L1 A7, A8, A8 ; r1 (13 ^ 18)
+|| XOR .L2 B7, B8, B8 ; r2 (7 ^ 21)
+|| ADD .S2 B8, B8, B9 ; r2 >> 20
+|| LDB .D2 *B10++, B1 ; load inval input as decision bit
+|| SUB .D1 1, A1 ,A1 ; decrement loop index
+
+;3
+ [A1]B .S1 STEPLOOPA51
+|| EXTU .S2 B4,10,9, B2 ; r2 << 1
+|| XOR .L1 A9, A8, A8 ; r1 ^ 16
+|| XOR .L2 B9, B8, B8 ; r2 ^ 20
+|| ADD .D1 A5, A5, A7 ; r3 >> 20
+
+;4
+ EXTU .S1 A6,11,10,A6 ; r3 << 1
+|| XOR .L1X A8, B6, A8 ; r1 ^ 17
+|| XOR .L2 B8, B4, B8 ; r2 ^ 22
+|| ADD .D1 A4, A4, A14 ; r1 << 1
+;|| EXTU .S2X A4,14,13, B5 ; r1 << 1
+
+;5
+ EXTU .S2 B8,9,31, B8 ; r2 feedback done
+|| EXTU .S1 A8,9,31, A8 ; r1 feedback done
+|| XOR .L1 A5, A7, A5 ; r3 (21 ^ 22)
+
+;6
+ XOR .L1 A14, A8, A4 ; r1 final
+|| XOR .L2 B2, B8, B4 ; r2 final
+|| EXTU .S1 A5,9,31, A5 ; r3 feedback done
+
+;7
+ XOR .S1 A5, A6, A6 ; r3 final
+|| [B1]XOR .L1 A4, 1, A4 ; r1 ^= 1
+|| [B1]XOR .L2 B4, 1, B4 ; r2 ^= 1
+
+;8
+ MPYU .M1 A11, A4, A7 ; r1 >> 13
+|| MPYU .M2 B12, B4, B7 ; r2 >> 7
+|| [B1]XOR .S1 A6, 1, A6 ; r3 ^= 1
+|| ADD .L2X 0,A4, B9 ; r1 into breg
+
+
+ENDLOOPA51:
+;
+; next perform stepregs runup of r1,r2,r3 100 times with clock = 1
+; finally output 228 bits, stepregs with clock = 1
+;
+
+ MVK .S1 329, A1 ;init loop counter
+|| MVK .S2 228, B11 ;init output buffer loop index
+
+ MVK .S1 00040h, A13
+
+ MVK .S2 0, B9
+|| MPYU .M1 A11, A4, A7 ; r1 >> 13
+|| MPYU .M2 B12, B4, B7 ; r2 >> 7
+
+ MVK .S1 00010h, A15
+|| MVKH .S2 00000h, B12
+;
+; init clock bits
+;
+;0
+ EXTU .S2 B4,21,31,B10 ; (r2 & 0x400) >> 6 .. start y11
+|| EXTU .S1 A6,21,31,A10 ; (r3 & 0x400) >> 10 .. finish z11
+|| ADD .L2X 0,A4, B9 ; r1 into breg
+
+ EXTU .S2 B9,23,29,B5 ; (r1 & 0x100) >> 16 .. start x9
+|| ADD .D2 B10,B10,B10 ; finish y11
+
+STEPLOOPA512:
+;1
+ EXTU .S1 A4,13,9,A8 ; r1 >> 18
+|| EXTU .S2 B9,14,9, B6 ; r1 >> 17
+|| ADD .D1 A6, A6, A5 ; r3 >> 21
+|| ADD .D2 B4, B4, B8 ; r2 >> 21
+|| OR .L1X A10,B10,A10 ; y11 | z11 clock bits
+|| AND .L2 4,B5,B5 ; finish x9 clock bit
+
+ OR .L1X A10,B5,A10 ; finish clock...x9 | y11 | z11
+|| OR .L2X A10,B5,B10 ; finish clock...x9 | y11 | z11
+|| XOR .S1 A5, A8,A13 ; (r1 >> 18) ^ (r3 >> 21)
+
+;2
+ EXTU .S1 A4,15,9,A9 ; r1 >> 16
+|| XOR .L1 A7, A8, A8 ; r1 (13 ^ 18)
+|| XOR .L2 B7, B8, B8 ; r2 (7 ^ 21)
+|| ADD .S2 B8, B8, B9 ; r2 >> 20
+|| SUB .D1 1, A1 ,A1 ; decrement loop index
+|| SUB .D2 3, B10, B0 ; case 3 for r1
+
+;3
+ [A1]B .S1 STEPLOOPA512
+|| EXTU .S2 B4,10,9,B14 ; r2 << 1
+|| XOR .L1 A9, A8, A8 ; r1 ^ 16
+|| XOR .L2 B9, B8, B8 ; r2 ^ 20
+|| ADD .D1 A5, A5, A7 ; r3 >> 20
+|| [B0]SUB .D2 4, B10, B0 ; case 4 for r1
+
+;4
+ EXTU .S1 A6,11,10,A12 ; r3 << 1
+|| XOR .S2X A13, B4, B13 ; (r1 >> 18) ^ (r3 >> 21) ^ (r2 >> 22)
+|| XOR .L1X A8, B6, A8 ; r1 ^ 17
+|| XOR .L2 B8, B4, B8 ; r2 ^ 22
+|| ADD .D1 A4, A4, A14 ; r1 << 1
+|| SUB .D2 2, B10, B1 ; case 2 for r2
+
+;5
+ EXTU .S2 B8,9,31, B8 ; r2 feedback done
+|| EXTU .S1 A8,9,31, A8 ; r1 feedback done
+|| XOR .L1 A5, A7, A5 ; r3 (21 ^ 22)
+|| CMPLT .L2X A1, B11, B2 ; loop index > 101 (post-run-up)?
+|| SUB .D1 1, A10 ,A2 ; case 1 for r3
+|| [B1]SUB .D2 5, B10, B1 ; case 5 for r2
+
+;6
+ [B0]XOR .L1 A14, A8, A4 ; r1 final
+|| [B1]XOR .L2 B14, B8, B4 ; r2 final
+|| EXTU .S1 A5,9,31, A5 ; r3 feedback done
+|| EXTU .S2 B13,9,31,B13 ; shift output bit to lsb
+|| [A2]SUB .D1 6, A10 ,A2 ; case 6 for r3
+
+;7
+ [A2]XOR .S1 A5, A12, A6 ; r3 final
+|| ADD .L2X 0,A4, B9 ; r1 into breg
+|| EXTU .S2 B4,21,31,B10 ; (r2 & 0x400) >> 6 .. start y11
+|| [B2]STB .D1 B13, *A3++ ; buffer the output bit after runup
+;8
+ MPYU .M1 A11, A4, A7 ; r1 >> 13
+|| MPYU .M2 B12, B4, B7 ; r2 >> 7
+|| EXTU .S1 A6,21,31,A10 ; (r3 & 0x400) >> 10 .. finish z11
+|| EXTU .S2 B9,23,29,B5 ; (r1 & 0x100) >> 16 .. start x9
+|| ADD .D2 B10,B10,B10 ; finish y11
+
+
+ENDLOOPA512:
+
+ NOP
+
+*** END Benchmark Timing ***
+
+ LDW .D2 *++B15, A14 ; pop A15 off stack
+|| ADD .L1X 0, B15, A1 ; copy stack pointer
+
+ LDW .D1 *++A1[2], A15 ; pop A15 off stack
+|| LDW .D2 *++B15[2], B14 ; pop B14 off stack
+
+ LDW .D1 *++A1[2], A13 ; pop A13 off stack
+|| LDW .D2 *++B15[2], B13 ; pop B13 off stack
+
+ LDW .D1 *++A1[2], A12 ; pop A12 off stack
+|| LDW .D2 *++B15[2], B12 ; pop B12 off stack
+
+ LDW .D1 *++A1[2], A11 ; pop A11 off stack
+|| LDW .D2 *++B15[2], B11 ; pop B11 off stack
+|| B .S2 B3 ; return
+
+ LDW .D1 *++A1[2], A10 ; pop A10 off stack
+|| LDW .D2 *++B15[2], B10 ; pop B10 off stack
+
+ NOP 4
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/frameisr.c b/data/mnet/GP10/Dsp/synchctrl/frameisr.c
new file mode 100644
index 0000000..907a9ee
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/frameisr.c
@@ -0,0 +1,241 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: frameisr.c
+*
+* Description:
+* This file contains the function that enables the BSP and synchronizes DMA
+* tranfers to the GSM frame clock. Also contains the function that increments
+* GSM frame numbers.
+*
+* Public Functions:
+* frameProc
+*
+* Private Functions:
+* gsmFrameIsr
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "dsprotyp.h"
+#include "dsp6201.h"
+#include "mcbsp.h"
+#include "intr.h"
+
+Int32 dlFrameCounter = 0;
+Int32 dlFrameBurstError = 0;
+extern Int32 dlBurstCounter;
+extern Int32 ulBurstCounter;
+/* *Int32 dlFrameBurstBuf[0x80];
+ Int32 dlFrameBurstBufIndex = 0; */
+
+/*****************************************************************************
+*
+* Function: gsmFrameIsr
+*
+* Description:
+* Enables the BSP and synchronizes DMA tranfers to the GSM frame clock
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void interrupt gsmFrameIsr(void)
+{
+ Uint8 timeSlot;
+ frameProc();
+
+ if(sysFrameNum.t2 == 0 && sysFrameNum.t3 == 0)
+ {
+ /*
+ * if it the time to set frame number, system needs to be synchronized
+ * according to frame number given.
+ */
+ if(g_frmSync.state == SET_SYNC)
+ {
+ /* Enable MCBSP Rx */
+ MCBSP_ENABLE(0,MCBSP_RX);
+ /* Enable MCBSP Tx */
+ MCBSP_ENABLE(0,MCBSP_TX);
+
+ sysSyncProc();
+
+ g_frmSync.state = CHECK_SYNC;
+ dlBurstCounter = 0;
+ ulBurstCounter = 0;
+ dlFrameCounter =0;
+ dlFrameBurstError = 0;
+ /*
+ dlFrameBurstBufIndex = 0;
+ dlFrameBurstBuf[dlFrameBurstBufIndex] = 0;
+ */
+
+ /* CALIBRATE_CONTROL_REG = 0;*/
+
+ g_burstProc.dlTN = 0;
+
+ /*
+ * process uplink Time Slot - 1 to avoid DMA Banking ???? Special Case
+ */
+ g_burstProc.ulTN = (g_burstProc.dlTN + 8-g_frameCounts.TNNumInit) & 0x07 ;
+
+ g_BBInfo[0].dlBurst = 0;
+ g_BBInfo[0].ulBurst = g_BBInfo[0].dlBurst + 1;
+ g_BBInfo[0].ulBBSmpl = ulBurstBufPtr[g_BBInfo[0].ulBurst];
+
+ /*
+ * disable frame ISR
+ */
+ INTR_DISABLE(CPU_INT7);
+
+ /*
+ * Release Reset AD7002 Receiver for A/D Callibration;
+ */
+ AGC_SRC_SELECT_REG |= (1<<AD7002_RESET);
+ }
+ else if(g_frmSync.state == TS_RE_SYNC)
+ {
+ for(timeSlot=0; timeSlot<NUM_TS_PER_RF; timeSlot++)
+ {
+ tsFrameSync(0, timeSlot);
+ }
+ g_frmSync.state = CHECK_SYNC;
+ }
+
+ }
+
+}
+
+/*****************************************************************************
+*
+* Function: frameProc
+*
+* Description:
+* Increments GSM frame numbers
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void frameProc(void)
+{
+ Uint8 timeSlot;
+ Uint8 rfCh;
+ t_BBInfo *bbInfo;
+ Int32 Temp;
+
+ bbInfo = & g_BBInfo[0];
+
+ /*
+ * update frame number
+ */
+ if(++sysFrameNum.FN >= T1_FRAMES*T2_FRAMES*T3_FRAMES)
+ {
+ sysFrameNum.FN = 0;
+
+ }
+
+ if(++sysFrameNum.t2 >= T2_FRAMES) sysFrameNum.t2 = 0;
+
+ if(++sysFrameNum.t3 >= T3_FRAMES)
+ {
+
+ sysFrameNum.t3 = 0;
+ /*
+ * check if paging configuration change is required
+ */
+ if(g_frmSync.newPageState == TRUE)
+ {
+ /*
+ * calculate PCH index
+ */
+ if( g_BBInfo[0].TNInfo[0].groupNum == GSM_GROUP_5)
+ {
+ Temp = (sysFrameNum.FN + bbInfo->frame.offset) / T3_FRAMES;
+
+ Temp = Temp % (g_BBInfo[0].BSPaMfrms);
+ bbInfo->frame.dlG5PagchSubCh = Temp * PAGE_BLOCKS_G5;
+
+ g_BBInfo[0].TNInfo[0].u.group5.dlPpchSubCh = bbInfo->frame.dlG5PagchSubCh;
+
+ sendDiagMsg(100, 0, 0, 1, (Uint8*) & Temp) ;
+ }
+
+ g_frmSync.newPageState = FALSE;
+ }
+ }
+
+ if(sysFrameNum.t2 == 0 && sysFrameNum.t3 == 0)
+ {
+ sysFrameNum.t1++;
+ if(sysFrameNum.t1 >= T1_FRAMES)
+ {
+ sysFrameNum.t1 = 0;
+
+ if(g_BBInfo[0].TNInfo[0].groupNum == GSM_GROUP_5)
+ {
+ g_BBInfo[0].TNInfo[0].u.group5.dlPpchSubCh = 0;
+ sendDiagMsg(HYPERFRAME_ROLLOVER, 0, 0, 0, &rfCh); /* 5th arg to satisfy proto */
+ }
+ if(sysFrameNum.FN != 0)
+ {
+ ReportError(HYPERFRAME_ROLLOVER, 0, 0, 0, &rfCh); /* 5th arg to satisfy proto */
+ }
+ }
+
+ /*
+ * Blink LED
+ */
+ AGC_SRC_SELECT_REG ^= (1<<DSP_LED1);
+
+ /*
+ * check is a time slot has been reconfigued
+ */
+ if(g_frmSync.state == TS_RE_SYNC)
+ {
+ for(timeSlot=0; timeSlot<NUM_TS_PER_RF; timeSlot++)
+ {
+ tsFrameSync(0, timeSlot);
+ }
+
+ g_frmSync.state = CHECK_SYNC;
+ sendDiagMsg(0x00, 0, timeSlot, 0, &rfCh); /* 5th arg to satisfy prototype */
+ }
+ }
+
+ /*
+ * for DEBUG only
+ dlFrameCounter++;
+ if(g_burstProc.dlTN != 0)
+ {
+ dlFrameBurstError++;
+ }
+ */
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/frmsync.c b/data/mnet/GP10/Dsp/synchctrl/frmsync.c
new file mode 100644
index 0000000..ca9757b
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/frmsync.c
@@ -0,0 +1,496 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* file name: frmsync.c
+*
+* Description: synchronize burst processing with GSM frame number
+*
+*
+* Remark: If called only on a super frame period, the calculations could
+* be simplified dramatically
+*
+* Warning: It is better to use the function only at super frame cycle(T2=T3=0)
+*
+*
+*****************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "math.h"
+#include "dsprotyp.h"
+
+/*****************************************************************************
+*
+* Function: tsFrameSync
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void tsFrameSync(Uint8 rfCh, Uint8 timeSlot)
+{
+ Int32 temp;
+
+ t_TNInfo *ts;
+
+ t_BBInfo *bbInfo;
+
+ Int32 dlSacchIdle;
+ Int32 ulSacchIdle;
+
+
+
+ /*
+ * get to right RF carrier
+ */
+ bbInfo = & g_BBInfo[rfCh];
+
+ /*
+ * find right time slot
+ */
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ /*
+ * Check is the time slot need to be configured;
+ */
+ if(ts->tsConfig != TRUE) return;
+
+
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_1:
+ /*
+ * GSM Group I related indexes
+ */
+ bbInfo->frame.dlG1Index =
+ (sysFrameNum.FN + bbInfo->frame.offset) % T2_FRAMES;
+
+ bbInfo->frame.ulG1Index =
+ (sysFrameNum.FN + bbInfo->frame.offset +
+ T2_FRAMES - g_frameCounts.ulFNOffset ) % T2_FRAMES;
+ /*
+ * SACCH or Idle selection related to Time Slot number
+ */
+ dlSacchIdle = (sysFrameNum.FN + bbInfo->frame.offset) % (T2_FRAMES*4);
+ dlSacchIdle = dlSacchIdle / (T2_FRAMES/2);
+
+
+ /*
+ * calculate frame process indexes
+ */
+ ts->dlTblIndex = bbInfo->frame.dlG1Index;
+
+ /*
+ * T2 + offset ???
+ */
+ if( timeSlot < 8-g_frameCounts.TNNumInit)
+ {
+ ts->ulTblIndex = bbInfo->frame.ulG1Index;
+ ulSacchIdle = (sysFrameNum.FN + bbInfo->frame.offset +
+ g_frameCounts.ulFNOffset) % (T2_FRAMES*4);
+ }
+ else
+ {
+ ts->ulTblIndex = (bbInfo->frame.ulG1Index+T2_FRAMES-1) % T2_FRAMES;
+ ulSacchIdle = (sysFrameNum.FN + bbInfo->frame.offset + T2_FRAMES*4-1 +
+ g_frameCounts.ulFNOffset) % (T2_FRAMES*4);
+ }
+ ulSacchIdle = ulSacchIdle / (T2_FRAMES/2);
+ ts->u.group1.dlIndex = (8+dlSacchIdle - timeSlot) & 0x07;
+
+ ts->u.group1.ulIndex = (8+ulSacchIdle - timeSlot) & 0x07;
+
+ break;
+
+ case GSM_GROUP_5:
+ /*
+ * GSM Group V downlink related indexes
+ */
+ bbInfo->frame.dlG5Index =
+ (sysFrameNum.FN + bbInfo->frame.offset) % T3_FRAMES;
+
+ /*
+ * calculate downlink frame process indexes
+ */
+ ts->dlTblIndex = bbInfo->frame.dlG5Index;
+
+ /*
+ * calculate PAGCH index
+ */
+ temp = (sysFrameNum.FN + bbInfo->frame.offset) / T3_FRAMES;
+
+ temp = temp % (g_BBInfo[rfCh].BSPaMfrms);
+
+
+ if(sysFrameNum.t3 < 6) bbInfo->frame.dlG5PagchSubCh = temp * PAGE_BLOCKS_G5;
+ else if(sysFrameNum.t3 < 12) bbInfo->frame.dlG5PagchSubCh = (temp * PAGE_BLOCKS_G5) + 1;
+ else bbInfo->frame.dlG5PagchSubCh = (temp * PAGE_BLOCKS_G5) + 2;
+
+ /*
+ * calculate SYS INFO selection: (TN/51) Mod 8
+ */
+ temp = ((sysFrameNum.FN + bbInfo->frame.offset)/(T3_FRAMES)) & 7;
+ ts->u.group5.dlSmscbTB = temp;
+ /*
+ * check if BCCH in current multiframe has been sent
+ */
+ if(sysFrameNum.t3 > 5) temp = (temp+1) & 7;
+
+ ts->u.group5.bcchBufIndex = temp;
+
+ /*
+ * copy dl logical sub channel sig buffer pointer
+ */
+ ts->u.group5.dlSdcchSubCh = bbInfo->frame.dlG5SdcchSubCh;
+ ts->u.group5.dlSacchSubCh = bbInfo->frame.dlG5SacchSubCh;
+ ts->u.group5.dlPpchSubCh = bbInfo->frame.dlG5PagchSubCh;
+
+ /*
+ * calculate uplink frame process indexes
+ */
+ if( timeSlot < 8-g_frameCounts.TNNumInit)
+ {
+ /*
+ * for time slot < g_frameCounts.TNNumInit, uplink frame number
+ * equals to downlink frame number
+ */
+ ts->ulTblIndex = ts->dlTblIndex;
+ }
+ else
+ {
+ /*
+ * for time slot >= g_frameCounts.TNNumInit, uplink frame number
+ * equals to downlink frame number - 1
+ */
+ ts->ulTblIndex = (ts->dlTblIndex + T3_FRAMES - 1) % T3_FRAMES;
+ }
+
+ /*
+ * calculate current Type V Uplink SDCCH sub-channel
+ */
+ if(ts->ulTblIndex < 4) ts->u.group5.ulSdcchSubCh = 3;
+ else if(ts->ulTblIndex < 41)ts->u.group5.ulSdcchSubCh = 0;
+ else if(ts->ulTblIndex < 45) ts->u.group5.ulSdcchSubCh = 1;
+ else ts->u.group5.ulSdcchSubCh = 2;
+ /*
+ * calculate uplink SACCH process indexes
+ */
+ if( timeSlot < 8-g_frameCounts.TNNumInit)
+ temp = (sysFrameNum.FN + bbInfo->frame.offset) % (T3_FRAMES*2);
+ else
+ temp = (sysFrameNum.FN + bbInfo->frame.offset + T3_FRAMES*2-1) % (T3_FRAMES*2);
+
+ if(temp < 46) ts->u.group5.ulSacchSubCh = 2;
+ else if(temp < 50) ts->u.group5.ulSacchSubCh = 3;
+ else if(temp < 97) ts->u.group5.ulSacchSubCh = 0;
+ else ts->u.group5.ulSacchSubCh = 1;
+ break;
+
+
+ case GSM_GROUP_7:
+
+ /*
+ * GSM Group VII downlink related indexes
+ */
+
+ ts->dlTblIndex =
+ (sysFrameNum.FN + bbInfo->frame.offset) % T3_FRAMES;
+
+
+ temp = ts->dlTblIndex >>2;
+
+ if (temp >7)
+ temp = 0;
+
+ /*
+ * copy dl logical sub channel sig buffer pointer
+ */
+ ts->u.group7.dlSdcchSubCh = temp;
+
+ if ((ts->dlTblIndex -32) > 0){
+
+ temp = (ts->dlTblIndex)>>2;
+ if (temp >3){ temp = 0;}
+
+ } else {
+
+ temp = 0;
+ }
+ ts->u.group7.dlSacchSubCh = temp;
+
+
+ /*
+ * calculate uplink frame process indexes
+ */
+ if( timeSlot < 8-g_frameCounts.TNNumInit)
+ {
+ /*
+ * for time slot < g_frameCounts.TNNumInit, uplink frame number
+ * equals to downlink frame number
+ */
+ ts->ulTblIndex = ts->dlTblIndex;
+ }
+ else
+ {
+ /*
+ * for time slot >= g_frameCounts.TNNumInit, uplink frame number
+ * equals to downlink frame number - 1
+ */
+
+ ts->ulTblIndex = (ts->dlTblIndex + T3_FRAMES -1) % T3_FRAMES;
+
+ }
+
+ /*
+ * calculate current Type VII Uplink SDCCH sub-channel
+ */
+
+ if (ts->ulTblIndex >= 51)
+ temp = ts->ulTblIndex - 51;
+ else
+ temp = ts->ulTblIndex;
+
+
+
+ if(temp < 19) ts->u.group7.ulSdcchSubCh = 0;
+ else if (temp < 23) ts->u.group7.ulSdcchSubCh = 1;
+ else if (temp < 27) ts->u.group7.ulSdcchSubCh = 2;
+ else if (temp < 31) ts->u.group7.ulSdcchSubCh = 3;
+ else if (temp < 35) ts->u.group7.ulSdcchSubCh = 4;
+ else if (temp < 39) ts->u.group7.ulSdcchSubCh = 5;
+ else if (temp < 43) ts->u.group7.ulSdcchSubCh = 6;
+ else if (temp <47) ts->u.group7.ulSdcchSubCh = 7;
+ else ts->u.group7.ulSdcchSubCh = 0;
+ /*
+ * calculate uplink SACCH process indexes
+ */
+ if( timeSlot < 8-g_frameCounts.TNNumInit)
+ temp = (sysFrameNum.FN + bbInfo->frame.offset) % (T3_FRAMES*2);
+ else
+ temp = (sysFrameNum.FN + bbInfo->frame.offset + T3_FRAMES*2-1) % (T3_FRAMES*2);
+
+ if(temp < 4) ts->u.group7.ulSacchSubCh = 5;
+ else if(temp < 8) ts->u.group7.ulSacchSubCh = 6;
+ else if(temp < 12) ts->u.group7.ulSacchSubCh = 7;
+ else if(temp < 51) ts->u.group7.ulSacchSubCh = 0;
+ else if(temp < 55) ts->u.group7.ulSacchSubCh = 1;
+ else if(temp < 59) ts->u.group7.ulSacchSubCh = 2;
+ else if(temp < 63) ts->u.group7.ulSacchSubCh = 3;
+ else ts->u.group7.ulSacchSubCh = 4;
+
+
+ break;
+
+ case GSM_GROUP_11:
+ /*
+ * calculate frame process indexes,
+ * For Group11 the Function table size is 13
+ */
+ ts->dlTblIndex = (sysFrameNum.FN + bbInfo->frame.offset) % (GPRS_MULTI_FRAMES);
+ temp = (sysFrameNum.FN + bbInfo->frame.offset) % (GPRS_MULTI_FRAMES/4);
+
+
+
+ /*
+ * DL PTCCH function table size is 8
+ */
+ ts->u.group11.dlPtcchIdleIndex = ((sysFrameNum.FN + bbInfo->frame.offset) / (GPRS_MULTI_FRAMES/4)) & 0x07;
+
+ /* Notice +3 in first term since DL increments block number in dlPdchProc0 = first frame of block */
+ ts->u.group11.dlBlock = (temp +3)/4 +
+ (((sysFrameNum.FN + bbInfo->frame.offset) % GPRS_MULTI_FRAMES) / (GPRS_MULTI_FRAMES/4)) * 3; /* result between 0-11 */
+
+
+ if(ts->u.group11.dlBlock >= BLOCKS_PER_GPRS_MULTI_FRAMES) ts->u.group11.dlBlock = 0;
+ /*
+ * T2 + offset ???
+ */
+ if( timeSlot < 8-g_frameCounts.TNNumInit)
+ {
+ ulSacchIdle = (sysFrameNum.FN + bbInfo->frame.offset +\
+ g_frameCounts.ulFNOffset) % (GPRS_MULTI_FRAMES*8);
+ }
+ else
+ {
+ ulSacchIdle = (sysFrameNum.FN + bbInfo->frame.offset + GPRS_MULTI_FRAMES*8-1 +
+ g_frameCounts.ulFNOffset) % (GPRS_MULTI_FRAMES*8);
+ }
+
+
+ ts->ulTblIndex = ulSacchIdle % (GPRS_MULTI_FRAMES);
+ temp = ulSacchIdle % (GPRS_MULTI_FRAMES/4);
+ ts->u.group11.ulBlock = temp/4 + ((ulSacchIdle % GPRS_MULTI_FRAMES)/(GPRS_MULTI_FRAMES/4)) * 3;
+
+ /* result between 0-11 */
+ if(ts->u.group11.ulBlock >= BLOCKS_PER_GPRS_MULTI_FRAMES) ts->u.group11.ulBlock = 0;
+
+ /*
+ * Timing Advance Index(Channel) 0-15
+ B0(12,38,64,90), B2(116,142,168,194), B3(220,246,272,298), B4(324,350,376,402)
+ */
+ ts->u.group11.currentTAI = (ulSacchIdle + 13)/ (GPRS_MULTI_FRAMES/2);
+
+ /*
+ * UL PTCCH function table size is 2
+ */
+
+ ts->u.group11.ulPtcchIdleIndex = (ulSacchIdle / (GPRS_MULTI_FRAMES/4)) & 0x01;
+
+ /*
+ * Notify MAC the buffer availability of different logical channels on this time slot
+ */
+ rtsCheck(rfCh, timeSlot, PDTCH, 0, (NUM_TCH_JBUF - ts->u.group11.pdtch.dlSigBuf->frameCount));
+ rtsCheck(rfCh, timeSlot, PACCH, 0, (DL_SIG_Q_DEPTH - ts->u.group11.pacch.dlSigBuf->numMsgsReady));
+ rtsCheck(rfCh, timeSlot, PTCCH, 0, (DL_SIG_Q_DEPTH - ts->u.group11.ptcch.dlSigBuf->numMsgsReady));
+
+ break;
+
+ case GSM_GROUP_13:
+ /*
+ * calculate frame process indexes,
+ * For Group13 the Function table size is 13
+ */
+ ts->dlTblIndex = (sysFrameNum.FN + bbInfo->frame.offset) % (GPRS_MULTI_FRAMES/4);
+ /*
+ * DL PTCCH function table size is 8
+ */
+ ts->u.group13.dlPtcchIdleIndex = ((sysFrameNum.FN + bbInfo->frame.offset) / (GPRS_MULTI_FRAMES/4)) & 0x07;
+
+ /* Notice +3 in first term since DL increments block number in dlPdchProc0 = first frame of block */
+ ts->u.group13.dlBlock = (ts->dlTblIndex+3)/4 +
+ (((sysFrameNum.FN + bbInfo->frame.offset) % GPRS_MULTI_FRAMES) / (GPRS_MULTI_FRAMES/4)) * 3; /* result between 0-11 */
+
+ if(ts->u.group13.dlBlock >= BLOCKS_PER_GPRS_MULTI_FRAMES) ts->u.group13.dlBlock = 0;
+ /*
+ * T2 + offset ???
+ */
+ if( timeSlot < 8-g_frameCounts.TNNumInit)
+ {
+ /*
+ ts->ulTblIndex = (sysFrameNum.FN + bbInfo->frame.offset +
+ GPRS_MULTI_FRAMES/4 - g_frameCounts.ulFNOffset ) % (GPRS_MULTI_FRAMES/4);
+ */
+ ulSacchIdle = (sysFrameNum.FN + bbInfo->frame.offset +
+ g_frameCounts.ulFNOffset) % (GPRS_MULTI_FRAMES*8);
+ }
+ else
+ {
+ /*
+ ts->ulTblIndex = (sysFrameNum.FN + bbInfo->frame.offset +
+ GPRS_MULTI_FRAMES/4 - g_frameCounts.ulFNOffset - 1) % (GPRS_MULTI_FRAMES/4);
+
+ */
+ ulSacchIdle = (sysFrameNum.FN + bbInfo->frame.offset + GPRS_MULTI_FRAMES*8-1 +
+ g_frameCounts.ulFNOffset) % (GPRS_MULTI_FRAMES*8);
+ }
+
+
+ ts->ulTblIndex = ulSacchIdle % (GPRS_MULTI_FRAMES/4);
+ ts->u.group13.ulBlock = ts->ulTblIndex/4 + ((ulSacchIdle % GPRS_MULTI_FRAMES)/(GPRS_MULTI_FRAMES/4)) * 3; /* result between 0-11 */
+ if(ts->u.group13.ulBlock >= BLOCKS_PER_GPRS_MULTI_FRAMES) ts->u.group13.ulBlock = 0;
+
+
+ /*
+ * Timing Advance Index(Channel) 0-15
+ B0(12,38,64,90), B2(116,142,168,194), B3(220,246,272,298), B4(324,350,376,402)
+ */
+ ts->u.group13.currentTAI = (ulSacchIdle + 13)/ (GPRS_MULTI_FRAMES/2);
+
+ /*
+ * UL PTCCH function table size is 2
+ */
+ ts->u.group13.ulPtcchIdleIndex = (ulSacchIdle / (GPRS_MULTI_FRAMES/4)) & 0x01;
+
+ /*
+ * Notify MAC the buffer availability of different logical channels on this time slot
+ */
+ rtsCheck(rfCh, timeSlot, PDTCH, 0, (NUM_TCH_JBUF - ts->u.group13.pdtch.dlSigBuf->frameCount));
+ rtsCheck(rfCh, timeSlot, PACCH, 0, (DL_SIG_Q_DEPTH - ts->u.group13.pacch.dlSigBuf->numMsgsReady));
+ rtsCheck(rfCh, timeSlot, PTCCH, 0, (DL_SIG_Q_DEPTH - ts->u.group13.ptcch.dlSigBuf->numMsgsReady));
+
+ break;
+
+ default:
+ break;
+ }
+ ts->tsConfig = 0;
+}
+
+/*****************************************************************************
+*
+* Function: sysSyncProc
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void sysSyncProc(void)
+{
+ Int16 ts;
+ Int16 rfCh;
+
+ sysFrameNum = setFrameNum;
+
+ sysFrameNum.t1 = sysFrameNum.FN / (T2_FRAMES * T3_FRAMES);
+ sysFrameNum.t2 = sysFrameNum.FN % T2_FRAMES;
+ sysFrameNum.t3 = sysFrameNum.FN % T3_FRAMES;
+
+
+ for(rfCh=0; rfCh < NUM_RFS_PER_DSP; rfCh++)
+ {
+ for(ts=0; ts<NUM_TS_PER_RF; ts++)
+ {
+ tsFrameSync(rfCh, ts);
+ }
+ }
+
+}
+
+/*****************************************************************************
+*
+* Function: onePPSIsr
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void onePPSIsr(void)
+{
+ switch(g_frmSync.state)
+ {
+ case SET_SYNC:
+ sysSyncProc();
+ break;
+
+ default:
+ break;
+ }
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/groupini.c b/data/mnet/GP10/Dsp/synchctrl/groupini.c
new file mode 100644
index 0000000..c4bb5b1
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/groupini.c
@@ -0,0 +1,695 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: groupini.c
+*
+* Description:
+* This file contains functions that initialize GSM Group and TS structures
+*
+* Public Functions:
+* tsGroupInit, tsConfigure
+*
+* Private Functions:
+* None
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "string.h"
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "diagdata.h"
+#include "dsprotyp.h"
+#include "agcdata.h"
+#include "intr.h"
+
+extern t_DLBBData g_DLBBData;
+
+/*****************************************************************************
+*
+* Function: tsGroupInit
+*
+* Description:
+* Initializes demod and BB structure variables
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+ProcResult tsGroupInit()
+{
+ Int16 timeSlot;
+ Int16 rfCh;
+ Int16 i, k;
+
+ // g_dyn_prach_blk = 20;
+
+ g_frameCounts.ulFNOffset = 0;
+ /*
+ * When in Normal mode, TNNumInit = 5;
+ * When in baseband loopback mode, TNNumInit = 2;
+ * When in local loopback mode, TNNumInit = 0;
+ */
+ if (g_loopBackMode == BASEBAND_LOOPBACK)
+ g_frameCounts.TNNumInit = 2;
+ else if(g_loopBackMode == LOCAL_LOOPBACK)
+ g_frameCounts.TNNumInit = 0;
+ else /*(g_loopBackMode == NO_LOOPBACK)*/
+ g_frameCounts.TNNumInit = 6;
+
+ g_burstProc.dlTN = 0;
+ g_burstProc.ulTN = (g_burstProc.dlTN + 8-g_frameCounts.TNNumInit) & 0x07 ;
+
+ chanCodecInit();
+
+ /* Init the demod constants */
+ /*initDemodConsts();*/
+
+ group0TableInit();
+ group4TableInit();
+ dlGroupVTableInit();
+ ulGroupVTableInit();
+ dlGroupVIITableInit();
+ ulGroupVIITableInit();
+ sacchIdleTableInit();
+ ulGroupITableInit();
+ dlGroupITableInit();
+ ulGroupXITableInit();
+ dlGroupXITableInit();
+ ulGroupXIIITableInit();
+ dlGroupXIIITableInit();
+ dlPtcchTableInit();
+ ulPtcchTableInit();
+ dlPbcchTableInit();
+ dlPpchTableInit();
+
+ /* Initialize the group 11 radio block defs */
+
+ for ( i = 0; i < MAX_RADIO_BLOCKS; i++){
+ G11_dlRadioBlkType[i] = D_PDCH_T;
+ G11_ulRadioBlkType[i] = U_PDCH_T;
+ }
+
+ /* Initialize the parameter in the group 11 structure */
+
+ g11Params.bsPBcchBlks = 1;
+ g11Params.bsPagBlksRes = 0;
+ g11Params.bsPrachBlks = 12;
+ g_PrachBits = 8;
+ g11Params.newAssignment = TRUE; // testing purposes
+ g11Params.psi1_repeat = 7;
+ g11Params.psi1_cycle = 7*52;
+
+
+ for(rfCh=0; rfCh < NUM_RFS_PER_DSP; rfCh++)
+ {
+ /*
+ * clear BB process structure
+ */
+ memset (& g_BBInfo[rfCh], 0, sizeof(t_BBInfo));
+
+ g_BBInfo[rfCh].frame.offset = 0;
+
+ ulBurstBufPtr[0] = (t_ULComplexSamp *) & g_ULBBData.burst04;
+ ulBurstBufPtr[1] = (t_ULComplexSamp *) & g_ULBBData.burst15;
+ ulBurstBufPtr[2] = (t_ULComplexSamp *) & g_ULBBData.burst26;
+ ulBurstBufPtr[3] = (t_ULComplexSamp *) & g_ULBBData.burst37;
+
+ g_BBInfo[rfCh].ulBurst = 0;
+ g_BBInfo[rfCh].ulBBSmpl = (t_ULComplexSamp *) & g_ULBBData.burst04;
+
+ dlBurstBufPtr[0] = (t_DLComplexSamp *) & g_DLBBData.burst0246;
+ dlBurstBufPtr[1] = (t_DLComplexSamp *) & g_DLBBData.burst1357;
+ g_BBInfo[rfCh].dlBurst = 0;
+ g_BBInfo[rfCh].dlBBSmpl = (t_DLComplexSamp *) & g_DLBBData.burst0246;
+
+ g_BBInfo[rfCh].bsic = 0x0;
+ g_BBInfo[rfCh].tseqNum = g_BBInfo[rfCh].bsic & 0x07;
+
+
+ /*
+ * Initialize SYS INFO Buffers
+ */
+ for(i=0; i<NUM_SYSINFO_BUFS; i++)
+ {
+ g_dlSigBufsSYSINFO[rfCh][i].valid = 0;
+ g_dlSigBufsSYSINFO[rfCh][i].state = 0;
+ g_dlSigBufsSYSINFO[rfCh][i].update = 0;
+ g_dlSigBufsSYSINFO[rfCh][i].frameNumUpdate = 0xffffffff;
+ }
+
+
+ /* for test purposes make these PSI messages valid */
+/*
+
+
+ for (i = PACKET_TYPE_1; i < PACKET_TYPE_13; i++){
+
+ g_dlSigBufsSYSINFO[rfCh][i].valid = 1;
+ for (k = 0; k < SYS_INFO_MSG_SIZE; k++){
+ g_dlSigBufsSYSINFO[rfCh][i].data[0][k] = i;
+
+ }
+
+
+ }
+*/
+
+
+ /*
+ * SACCH buffer is part of SYS INFO buff
+ g_dlSigBufsSACCH = & g_dlSigBufsSYSINFO[rfCh][TYPE_5];
+ */
+
+
+ for(timeSlot=0; timeSlot<NUM_TS_PER_RF; timeSlot++)
+ {
+ /*
+ * initialize a Time Slot as No Group
+ */
+ tsConfigure(rfCh, timeSlot, GROUP_NULL);
+
+ g_BBInfo[rfCh].TNInfo[timeSlot].tsNumber = timeSlot;
+ }
+ /*
+ * set default BS_PA_MFEMS
+ */
+ g_BBInfo[rfCh].BSPaMfrms = 3;
+
+ for(i=0; i<TBF_NUMBER_MAX; i++)
+ {
+ g_tbfInfo[rfCh][i].ulTbf.state = CHAN_INACTIVE;
+ g_tbfInfo[rfCh][i].dlTbf.state = CHAN_INACTIVE;
+ }
+ }
+
+
+ g_frmSync.state = OUT_OF_SYNC;
+ g_frmSync.newPageState = FALSE;
+
+ /*
+ * initialize frame number counters
+ */
+ setFrameNum.FN = 0;
+
+ sysFrameNum.FN = 0;
+ sysFrameNum.t1 = 0;
+ sysFrameNum.t2 = 0;
+ sysFrameNum.t3 = 0;
+
+
+ return(SUCCESS);
+}
+
+/*****************************************************************************
+*
+* Function: tsConfigure
+*
+* Description:
+* Initializes structure variables for one TS
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+ProcResult tsConfigure (Int16 rfCh, Int16 timeSlot, t_groupNum groupNum)
+{
+ Int16 i;
+ t_TNInfo *ts;
+ t_PNbufs *PNbufs;
+
+ /*
+ * find right time slot Info to be configured
+ */
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+ PNbufs = & g_PNbufs[timeSlot];
+
+ ts->tsNumber = timeSlot;
+ /*
+ ts->ulSigBuf = & g_ulSigBufs[rfCh][timeSlot];
+ ts->ulSigBuf->readIndex = 0;
+ ts->ulSigBuf->writeIndex = 0;
+ ts->ulSigBuf->numMsgsReady = 0;
+ ts->ulSigBuf->overflow = 0;
+
+
+ * initialize RTS buffer parameters
+ ts->rtsInfo = & g_rtsInfo[rfCh][timeSlot];
+ ts->rtsInfo->bufWrIndex = 0;
+ ts->rtsInfo->bufRdIndex = 0;
+ ts->rtsInfo->numMsgsReady = 0;
+ */
+ /*
+ * always set channel combination as GROUP_NULL at beginning
+ */
+ ts->groupNum = GROUP_NULL;
+
+ ts->ulTblIndex = 0;
+ ts->dlTblIndex = 0;
+
+ g_rxGainMinAct = RXGAIN_MIN_ACTIV;
+
+ INTR_GLOBAL_DISABLE();
+
+ switch(groupNum)
+ {
+ case GROUP_NULL:
+ ts->groupULTable = ulGroupTable0;
+ ts->groupDLTable = dlGroupTable0;
+ ts->tblLength = 1;
+ break;
+
+ case GSM_GROUP_1:
+
+ if(g_AGC_ON) {
+ ts->u.group1.sacch.ulsigstren.rxgain = g_rxGainMinIdle;
+ }
+
+ ts->u.group1.tch.state = CHAN_INACTIVE;
+ ts->u.group1.sacch.state = CHAN_INACTIVE;
+
+ /* clear all px-nx buffers for this timeslot */
+ PNbufs->dpcUL.sigstrenHi.index = 0;
+ PNbufs->dpcUL.sigstrenHi.flagsum = 0;
+ PNbufs->dpcUL.sigstrenLo.index = 0;
+ PNbufs->dpcUL.sigstrenLo.flagsum = 0;
+
+ PNbufs->dpcUL.sigqualHi.index = 0;
+ PNbufs->dpcUL.sigqualHi.flagsum = 0;
+ PNbufs->dpcUL.sigqualLo.index = 0;
+ PNbufs->dpcUL.sigqualLo.flagsum = 0;
+
+ PNbufs->dpcDL.sigstrenSCellHi.index = 0;
+ PNbufs->dpcDL.sigstrenSCellHi.flagsum = 0;
+ PNbufs->dpcDL.sigstrenSCellLo.index = 0;
+ PNbufs->dpcDL.sigstrenSCellLo.flagsum = 0;
+
+ PNbufs->dpcDL.sigqualSCellHi.index = 0;
+ PNbufs->dpcDL.sigqualSCellHi.flagsum = 0;
+ PNbufs->dpcDL.sigqualSCellLo.index = 0;
+ PNbufs->dpcDL.sigqualSCellLo.flagsum = 0;
+
+ PNbufs->hoUL.sigstren.index = 0;
+ PNbufs->hoUL.sigstren.flagsum = 0;
+ PNbufs->hoDL.sigstrenSCell.index = 0;
+ PNbufs->hoDL.sigstrenSCell.flagsum = 0;
+
+ PNbufs->hoUL.sigqual.index = 0;
+ PNbufs->hoUL.sigqual.flagsum = 0;
+ PNbufs->hoDL.sigqualSCell.index = 0;
+ PNbufs->hoDL.sigqualSCell.flagsum = 0;
+
+ PNbufs->hoUL.intsigstren.index = 0;
+ PNbufs->hoUL.intsigstren.flagsum = 0;
+ PNbufs->hoDL.intsigstrenSCell.index = 0;
+ PNbufs->hoDL.intsigstrenSCell.flagsum = 0;
+
+ for(i=0; i < NXBUF_SIZ_MAX; i++)
+ {
+ PNbufs->dpcUL.sigstrenHi.flag[i] = 0;
+ PNbufs->dpcUL.sigstrenLo.flag[i] = 0;
+ PNbufs->dpcUL.sigqualHi.flag[i] = 0;
+ PNbufs->dpcUL.sigqualLo.flag[i] = 0;
+ PNbufs->dpcDL.sigstrenSCellHi.flag[i] = 0;
+ PNbufs->dpcDL.sigstrenSCellLo.flag[i] = 0;
+ PNbufs->dpcDL.sigqualSCellHi.flag[i] = 0;
+ PNbufs->dpcDL.sigqualSCellLo.flag[i] = 0;
+ PNbufs->hoUL.sigstren.flag[i] = 0;
+ PNbufs->hoUL.sigqual.flag[i] = 0;
+ PNbufs->hoDL.sigstrenSCell.flag[i] = 0;
+ PNbufs->hoDL.sigqualSCell.flag[i] = 0;
+ PNbufs->hoUL.intsigstren.flag[i] = 0;
+ PNbufs->hoDL.intsigstrenSCell.flag[i] = 0;
+ }
+
+ /* end P and N buffer init */
+ ts->u.group1.tch.hoCandidateBuf.hoReportCnt = 0;
+
+ ts->groupULTable = ulGroupTableI;
+ ts->groupDLTable = dlGroupTableI;
+
+ ts->tblLength = T2_FRAMES;
+
+ ts->u.group1.dlSachIdleFunc = dlSacchIdleTbl;
+
+ /*
+ * uplink and downlink function table Index
+ * SPECIAL CASE: will be put back when GSM Frame Clock interrupt is used
+ *
+ */
+
+ /*
+ * SACCH_IDLE function table Index
+ * SPECIAL CASE: will be put back when GSM Frame Clock interrupt is used
+ *
+ */
+ ts->u.group1.dlIndex = 0;
+ ts->u.group1.ulIndex = 0;
+
+
+ ts->u.group1.ulSachIdleFunc = ulSacchIdleTbl;
+
+
+ ts->u.group1.sacch.dlSigBuf = & g_dlSigBufsTchSACCH[rfCh][timeSlot];
+ ts->u.group1.sacch.dlSigBuf->numMsgsReady = 0;
+ ts->u.group1.sacch.dlSigBuf->valid = 0;
+ ts->u.group1.sacch.dlSigBuf->readIndex = 0;
+ ts->u.group1.sacch.dlSigBuf->writeIndex = 0;
+ ts->u.group1.sacch.dlSigBuf->overflow = 0;
+
+ /*
+ * init FACCH buffers
+ */
+ ts->u.group1.facch.dlSigBuf = & g_dlSigBufsFACCH[rfCh][timeSlot];
+ ts->u.group1.facch.dlSigBuf->numMsgsReady = 0;
+ ts->u.group1.facch.dlSigBuf->valid = 0;
+ ts->u.group1.facch.dlSigBuf->readIndex = 0;
+ ts->u.group1.facch.dlSigBuf->writeIndex = 0;
+ ts->u.group1.facch.dlSigBuf->overflow = 0;
+
+ break;
+
+ case GSM_GROUP_4:
+ ts->groupULTable = ulGroupTableIV;
+
+ ts->groupDLTable = dlGroupTableIV;
+
+
+ ts->tblLength = 1;
+
+ break;
+
+ case GSM_GROUP_5:
+ /*
+ * When in baseband loopback mode, channel state set as CHAN_ACTIVE;
+ */
+
+ if(g_AGC_ON) {
+ ts->u.group5.sacch[0].ulsigstren.rxgain = g_rxGainMinIdle;
+ ts->u.group5.sacch[1].ulsigstren.rxgain = g_rxGainMinIdle;
+ ts->u.group5.sacch[2].ulsigstren.rxgain = g_rxGainMinIdle;
+ ts->u.group5.sacch[3].ulsigstren.rxgain = g_rxGainMinIdle;
+ }
+
+ ts->u.group5.sdcch[0].state = CHAN_INACTIVE;
+ ts->u.group5.sdcch[1].state = CHAN_INACTIVE;
+ ts->u.group5.sdcch[2].state = CHAN_INACTIVE;
+ ts->u.group5.sdcch[3].state = CHAN_INACTIVE;
+
+ ts->groupULTable = ulGroupTableV;
+
+ ts->groupDLTable = dlGroupTableV;
+
+ ts->tblLength = T3_FRAMES;
+
+ /*
+ * SPECIAL CASE: will be put back when GSM Frame Clock interrupt is used
+ */
+
+ ts->u.group5.bcchBufIndex = 0;
+ ts->u.group5.dlSdcchSubCh = 0;
+ ts->u.group5.dlSacchSubCh = 0;
+
+ ts->u.group5.dlPpchSubCh = 0;
+
+ ts->u.group5.ulSdcchSubCh = 0;
+ ts->u.group5.ulSacchSubCh = 0;
+
+ /*
+ * BCCH and SACCH buffers are part of SYS INFO buff
+ */
+ ts->u.group5.bcch.dlSigBuf = & g_dlSigBufsSYSINFO[rfCh][0];
+
+ /*
+ *
+ */
+ for(i=0; i<NUM_SDCCH_SUBCHANS; i++)
+ {
+ ts->u.group5.sacch[i].dlSigBuf = & g_dlSigBufsSACCH[rfCh][timeSlot][i];
+ ts->u.group5.sacch[i].state = CHAN_INACTIVE;
+
+ ts->u.group5.sacch[i].dlSigBuf->valid = 0;
+ ts->u.group5.sacch[i].dlSigBuf->writeIndex = 0;
+ ts->u.group5.sacch[i].dlSigBuf->readIndex = 0;
+ ts->u.group5.sacch[i].dlSigBuf->numMsgsReady = 0;
+
+
+ ts->u.group5.sdcch[i].dlSigBuf = & g_dlSigBufsSDCCH[rfCh][timeSlot][i];
+ ts->u.group5.sdcch[i].state = CHAN_INACTIVE;
+
+ g_dlSigBufsSDCCH[rfCh][timeSlot][i].valid = 0;
+ g_dlSigBufsSDCCH[rfCh][timeSlot][i].readIndex = 0;
+ g_dlSigBufsSDCCH[rfCh][timeSlot][i].writeIndex = 0;
+ g_dlSigBufsSDCCH[rfCh][timeSlot][i].numMsgsReady = 0;
+ }
+
+ /* Paging scheme with resource allocated buffering for AGCH, PAGCH, PCH and PPCH */
+ for(i=0; i<NUM_PPCH_SUBCHANS; i++)
+ {
+ g_dlSigBufsPPCH[rfCh][i].msgReady = 0;
+ g_dlSigBufsPPCH[rfCh][i].timeslot = 0xff;
+ g_dlSigBufsPPCH[rfCh][i].logCh = NULL;
+ g_dlSigBufsPPCH[rfCh][i].pageNum = 0xff;
+ g_dlSigBufsPPCH[rfCh][i].valid = 0;
+ }
+ ts->u.group5.ppchOverflow = 0;
+
+ g_dlSigBufsSCH[rfCh][0].state = 0;
+ g_dlSigBufsSCH[rfCh][0].valid = 1;
+ g_dlSigBufsSCH[rfCh][0].update = 0;
+ g_dlSigBufsSCH[rfCh][0].frameNumUpdate = 0xffffffff;
+ ts->u.group5.sch.dlSigBuf = & g_dlSigBufsSCH[rfCh][0];
+ ts->u.group5.sch.dlSigBuf->data[0][0] = g_BBInfo[rfCh].bsic<<2;
+ ts->u.group5.sch.dlSigBuf->data[1][0] = g_BBInfo[rfCh].bsic<<2;
+
+ ts->u.group5.cbch[0].dlSigBuf = & g_dlSigBufsCBCH[0];
+ ts->u.group5.cbch[0].dlSigBuf->bufValid = 0;
+ ts->u.group5.cbch[1].dlSigBuf = & g_dlSigBufsCBCH[1];
+ ts->u.group5.cbch[1].dlSigBuf->bufValid = 0;
+
+ break;
+
+
+
+
+ case GSM_GROUP_7:
+ /*
+ * When in baseband loopback mode, channel state set as CHAN_ACTIVE;
+ */
+
+ for (i = 0; i < NUM_SACCH8_SUBCHANS ; i++){
+ if(g_AGC_ON) {
+ ts->u.group7.sacch[i].ulsigstren.rxgain = g_rxGainMinIdle;}
+
+ ts->u.group7.sdcch[i].state = CHAN_INACTIVE;
+ } /* for i */
+
+ ts->groupULTable = ulGroupTableVII;
+ ts->groupDLTable = dlGroupTableVII;
+ ts->tblLength = T3_FRAMES;
+
+ /*
+ * SPECIAL CASE: will be put back when GSM Frame Clock interrupt is used
+ */
+
+ ts->u.group7.dlSdcchSubCh = 0;
+ ts->u.group7.dlSacchSubCh = 0;
+
+ ts->u.group7.ulSdcchSubCh = 0;
+ ts->u.group7.ulSacchSubCh = 0;
+
+
+ for(i=0; i<NUM_SDCCH8_SUBCHANS; i++)
+ {
+ ts->u.group7.sacch[i].dlSigBuf = & g_dlSigBufsSACCH8[rfCh][0][i];
+ ts->u.group7.sacch[i].state = CHAN_INACTIVE;
+
+ ts->u.group7.sacch[i].dlSigBuf->valid = 0;
+ ts->u.group7.sacch[i].dlSigBuf->writeIndex = 0;
+ ts->u.group7.sacch[i].dlSigBuf->readIndex = 0;
+ ts->u.group7.sacch[i].dlSigBuf->numMsgsReady = 0;
+
+
+ ts->u.group7.sdcch[i].dlSigBuf = & g_dlSigBufsSDCCH8[rfCh][0][i];
+ ts->u.group7.sdcch[i].state = CHAN_INACTIVE;
+
+ ts->u.group7.sdcch[i].dlSigBuf->valid = 0;
+ ts->u.group7.sdcch[i].dlSigBuf->readIndex = 0;
+ ts->u.group7.sdcch[i].dlSigBuf->writeIndex = 0;
+ ts->u.group7.sdcch[i].dlSigBuf->numMsgsReady = 0;
+ }
+
+
+
+
+ break;
+
+ case GSM_GROUP_11:
+
+ ts->tblLength = GPRS_MULTI_FRAMES;
+ ts->groupULTable = ulGroupTableXI;
+ ts->groupDLTable = dlGroupTableXI;
+
+
+ ts->u.group11.dlPtcchIdleIndex = 0;
+ ts->u.group11.ulPtcchIdleIndex = 0;
+ ts->u.group11.currentTAI = 0;
+ ts->u.group11.ulBlock = 0;
+ ts->u.group11.dlBlock = 0;
+
+
+ ts->u.group11.pbcchBufIndex = PACKET_TYPE_1;
+ ts->u.group11.pbcch.dlSigBuf = & g_dlSigBufsSYSINFO[rfCh][0];
+
+
+
+ /* Unsure what this is for */
+
+ for(i=0; i<MAX_RADIO_BLOCKS; i++)
+ {
+ ts->u.group11.blkNumWatch[i].tagFillCause = NONE;
+ }
+
+
+ g_RATE_TRAN_ON = FALSE;
+
+ /*
+ * Use FACCH Buffer for PACCH
+ */
+ ts->u.group11.pacch.dlSigBuf = & g_dlSigBufsFACCH[rfCh][timeSlot];
+ ts->u.group11.pacch.dlSigBuf->numMsgsReady = 0;
+ ts->u.group11.pacch.dlSigBuf->valid = 0;
+ ts->u.group11.pacch.dlSigBuf->readIndex = 0;
+ ts->u.group11.pacch.dlSigBuf->writeIndex = 0;
+ ts->u.group11.pacch.dlSigBuf->overflow = 0;
+
+ for(i=0; i<DL_SIG_Q_DEPTH; i++)
+ {
+ ts->u.group11.pacch.dlSigBuf->tag[i] = 0;
+ ts->u.group11.pacch.dlSigBuf->burstType[i] = NORMAL_BURST;
+ }
+
+ /*
+ * Cannot use SACCH Buffers for PTCCH
+ */
+
+ ts->u.group11.ptcch.dlSigBuf = & g_dlSigBufsPTCCH[rfCh][timeSlot];
+ ts->u.group11.ptcch.dlSigBuf->numMsgsReady = 0;
+ ts->u.group11.ptcch.dlSigBuf->valid = 0;
+ ts->u.group11.ptcch.dlSigBuf->readIndex = 0;
+ ts->u.group11.ptcch.dlSigBuf->writeIndex = 0;
+ ts->u.group11.ptcch.dlSigBuf->overflow = 0;
+
+
+ ts->u.group11.pdtch.dlSigBuf = & g_dlTchFrame[timeSlot];
+ ts->u.group11.pdtch.dlSigBuf->frameCount = 0;
+ ts->u.group11.pdtch.dlSigBuf->readIndex = 0;
+ ts->u.group11.pdtch.dlSigBuf->writeIndex = 0;
+
+
+ /* unsure what this is about */
+
+ for(i=0; i<NUM_TCH_JBUF; i++)
+ {
+ ts->u.group11.pdtch.dlSigBuf->tag[i] = 0;
+ ts->u.group11.pdtch.dlSigBuf->burstType[i] = 0;
+ ts->u.group11.pdtch.dlSigBuf->chCodec[i] = 0;
+ }
+
+
+
+ break;
+
+ case GSM_GROUP_12:
+ /*
+ * When in baseband loopback mode, channel state set as CHAN_ACTIVE;
+ */
+ ts->tblLength = (GPRS_MULTI_FRAMES/4);
+
+ g_RATE_TRAN_ON = FALSE;
+
+ break;
+
+ case GSM_GROUP_13:
+ /*
+ * When in baseband loopback mode, channel state set as CHAN_ACTIVE;
+ */
+ ts->tblLength = (GPRS_MULTI_FRAMES/4);
+
+ ts->groupULTable = ulGroupTableXIII;
+
+ ts->groupDLTable = dlGroupTableXIII;
+
+ ts->u.group13.dlPtcchIdleIndex = 0;
+ ts->u.group13.ulPtcchIdleIndex = 0;
+ ts->u.group13.currentTAI = 0;
+ ts->u.group13.ulBlock = 0;
+ ts->u.group13.dlBlock = 0;
+
+ for(i=0; i<MAX_RADIO_BLOCKS; i++)
+ {
+ ts->u.group13.blkNumWatch[i].tagFillCause = NONE;
+ }
+
+ /*
+ * Use FACCH Buffer for PACCH
+ */
+ ts->u.group13.pacch.dlSigBuf = & g_dlSigBufsFACCH[rfCh][timeSlot];
+ ts->u.group13.pacch.dlSigBuf->numMsgsReady = 0;
+ ts->u.group13.pacch.dlSigBuf->valid = 0;
+ ts->u.group13.pacch.dlSigBuf->readIndex = 0;
+ ts->u.group13.pacch.dlSigBuf->writeIndex = 0;
+ ts->u.group13.pacch.dlSigBuf->overflow = 0;
+
+ for(i=0; i<DL_SIG_Q_DEPTH; i++)
+ {
+ ts->u.group13.pacch.dlSigBuf->tag[i] = 0;
+ ts->u.group13.pacch.dlSigBuf->burstType[i] = NORMAL_BURST;
+ }
+
+ g_RATE_TRAN_ON = FALSE;
+
+ /*
+ * Cannot use SACCH Buffers for PTCCH
+ */
+
+ ts->u.group13.ptcch.dlSigBuf = & g_dlSigBufsPTCCH[rfCh][timeSlot];
+ ts->u.group13.ptcch.dlSigBuf->numMsgsReady = 0;
+ ts->u.group13.ptcch.dlSigBuf->valid = 0;
+ ts->u.group13.ptcch.dlSigBuf->readIndex = 0;
+ ts->u.group13.ptcch.dlSigBuf->writeIndex = 0;
+ ts->u.group13.ptcch.dlSigBuf->overflow = 0;
+
+ ts->u.group13.pdtch.dlSigBuf = & g_dlTchFrame[timeSlot];
+ ts->u.group13.pdtch.dlSigBuf->frameCount = 0;
+ ts->u.group13.pdtch.dlSigBuf->readIndex = 0;
+ ts->u.group13.pdtch.dlSigBuf->writeIndex = 0;
+ for(i=0; i<NUM_TCH_JBUF; i++)
+ {
+ ts->u.group13.pdtch.dlSigBuf->tag[i] = 0;
+ ts->u.group13.pdtch.dlSigBuf->burstType[i] = 0;
+ ts->u.group13.pdtch.dlSigBuf->chCodec[i] = 0;
+ }
+ sendDiagMsg(10, rfCh, timeSlot, 1, (Uint8 *) & groupNum);
+ break;
+
+ default:
+ break;
+ }
+ /*
+ * Set Group Number to this time slot at last
+ */
+ *(volatile *) & (ts->groupNum) = groupNum;
+
+
+ ts->tsConfig = TRUE;
+
+ INTR_GLOBAL_ENABLE();
+
+ return(SUCCESS);
+}
+
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/grouptbl.c b/data/mnet/GP10/Dsp/synchctrl/grouptbl.c
new file mode 100644
index 0000000..4d1a0d7
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/grouptbl.c
@@ -0,0 +1,693 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* File: grouptbl.c
+*
+* Description:
+*
+*****************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "dsprotyp.h"
+
+void group0TableInit(void)
+{
+ dlGroupTable0[0] = (Uint32 ) & dlIdleProc;
+ /*dlGroupTable0[0] = (Uint32 ) & dlFcchProc; */
+ ulGroupTable0[0] = (Uint32 ) & ulIdleProc;
+}
+
+void group4TableInit(void)
+{
+ ulGroupTableIV[0] = (Uint32 ) & ulRachProc;
+}
+
+void ulGroupITableInit(void)
+{
+ Uint32 *ptr;
+ ptr = ulGroupTableI;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_0;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_0;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_0;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_3;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_0;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_0;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_0;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_3;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_0;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_0;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_0;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_3;
+
+ *ptr++ = (Uint32 ) & ulSachIdleProc;
+
+ *ptr++ = (Uint32 ) & ulTchProcBurst_0;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_0;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_0;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_3;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_0;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_0;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_0;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_3;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_0;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_0;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_0;
+ *ptr++ = (Uint32 ) & ulTchProcBurst_3;
+
+ *ptr++ = (Uint32 ) & ulSachIdleProc;
+}
+
+void dlGroupITableInit(void)
+{
+ Uint32 *ptr;
+ ptr = dlGroupTableI;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_0;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_3;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_3;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_3;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_0;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_3;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_3;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_3;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_0;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_3;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_3;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_3;
+
+ *ptr++ = (Uint32 ) & dlSachIdleProc;
+
+ *ptr++ = (Uint32 ) & dlTchProcBurst_0;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_3;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_3;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_3;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_0;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_3;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_3;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_3;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_0;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_3;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_3;
+ *ptr++ = (Uint32 ) & dlTchProcBurst_3;
+
+ *ptr++ = (Uint32 ) & dlSachIdleProc;
+}
+
+void dlGroupVTableInit(void)
+{
+ Uint32 *ptr;
+ ptr = dlGroupTableV;
+ *ptr++ = (Uint32 ) & dlFcchProc;
+ *ptr++ = (Uint32 ) & dlSchProc;
+
+ *ptr++ = (Uint32 ) & dlBcchProc0;
+ *ptr++ = (Uint32 ) & dlBcchProc1;
+ *ptr++ = (Uint32 ) & dlBcchProc2;
+ *ptr++ = (Uint32 ) & dlBcchProc3;
+
+ *ptr++ = (Uint32 ) & dlPagchProc0;
+ *ptr++ = (Uint32 ) & dlPagchProc1;
+ *ptr++ = (Uint32 ) & dlPagchProc2;
+ *ptr++ = (Uint32 ) & dlPagchProc3;
+
+ *ptr++ = (Uint32 ) & dlFcchProc;
+ *ptr++ = (Uint32 ) & dlSchProc;
+
+ *ptr++ = (Uint32 ) & dlPagchProc0;
+ *ptr++ = (Uint32 ) & dlPagchProc1;
+ *ptr++ = (Uint32 ) & dlPagchProc2;
+ *ptr++ = (Uint32 ) & dlPagchProc3;
+
+ *ptr++ = (Uint32 ) & dlPagchProc0;
+ *ptr++ = (Uint32 ) & dlPagchProc1;
+ *ptr++ = (Uint32 ) & dlPagchProc2;
+ *ptr++ = (Uint32 ) & dlPagchProc3;
+
+ *ptr++ = (Uint32 ) & dlFcchProc;
+ *ptr++ = (Uint32 ) & dlSchProc;
+
+ *ptr++ = (Uint32 ) & dlSdcchProc0;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+
+ *ptr++ = (Uint32 ) & dlSdcchProc0;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+
+ *ptr++ = (Uint32 ) & dlFcchProc;
+ *ptr++ = (Uint32 ) & dlSchProc;
+
+ *ptr++ = (Uint32 ) & dlSdcchProc0;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+
+ *ptr++ = (Uint32 ) & dlSdcchProc0;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+
+ *ptr++ = (Uint32 ) & dlFcchProc;
+ *ptr++ = (Uint32 ) & dlSchProc;
+
+ *ptr++ = (Uint32 ) & dlSacchProc0;
+ *ptr++ = (Uint32 ) & dlSacchProc1;
+ *ptr++ = (Uint32 ) & dlSacchProc1;
+ *ptr++ = (Uint32 ) & dlSacchProc3;
+
+ *ptr++ = (Uint32 ) & dlSacchProc0;
+ *ptr++ = (Uint32 ) & dlSacchProc1;
+ *ptr++ = (Uint32 ) & dlSacchProc1;
+ *ptr++ = (Uint32 ) & dlSacchProc3;
+
+ *ptr++ = (Uint32 ) & dlIdleProc;
+}
+
+void ulGroupVTableInit(void)
+{
+ ulGroupTableV[0] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableV[1] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableV[2] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableV[3] = (Uint32 ) & ulSdcchProc3;
+
+ ulGroupTableV[4] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[5] = (Uint32 ) & ulRachProc;
+
+ ulGroupTableV[6] = (Uint32 ) & ulSacchProc0;
+ ulGroupTableV[7] = (Uint32 ) & ulSacchProc0;
+ ulGroupTableV[8] = (Uint32 ) & ulSacchProc0;
+ ulGroupTableV[9] = (Uint32 ) & ulSacchProc3;
+
+ ulGroupTableV[10] = (Uint32 ) & ulSacchProc0;
+ ulGroupTableV[11] = (Uint32 ) & ulSacchProc0;
+ ulGroupTableV[12] = (Uint32 ) & ulSacchProc0;
+ ulGroupTableV[13] = (Uint32 ) & ulSacchProc3;
+
+ ulGroupTableV[14] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[15] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[16] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[17] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[18] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[19] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[20] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[21] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[22] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[23] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[24] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[25] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[26] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[27] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[28] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[29] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[30] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[31] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[32] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[33] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[34] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[35] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[36] = (Uint32 ) & ulRachProc;
+
+ ulGroupTableV[37] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableV[38] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableV[39] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableV[40] = (Uint32 ) & ulSdcchProc3;
+
+ ulGroupTableV[41] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableV[42] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableV[43] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableV[44] = (Uint32 ) & ulSdcchProc3;
+
+ ulGroupTableV[45] = (Uint32 ) & ulRachProc;
+ ulGroupTableV[46] = (Uint32 ) & ulRachProc;
+
+ ulGroupTableV[47] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableV[48] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableV[49] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableV[50] = (Uint32 ) & ulSdcchProc3;
+}
+
+
+void dlGroupVIITableInit(void)
+{
+ Uint32 *ptr;
+ ptr = dlGroupTableVII;
+
+ *ptr++ = (Uint32 ) & dlSdcchProc0;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+
+
+ *ptr++ = (Uint32 ) & dlSdcchProc0;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+
+ *ptr++ = (Uint32 ) & dlSdcchProc0;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+
+ *ptr++ = (Uint32 ) & dlSdcchProc0;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+
+ *ptr++ = (Uint32 ) & dlSdcchProc0;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+
+ *ptr++ = (Uint32 ) & dlSdcchProc0;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+
+ *ptr++ = (Uint32 ) & dlSdcchProc0;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+
+ *ptr++ = (Uint32 ) & dlSdcchProc0;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+ *ptr++ = (Uint32 ) & dlSdcchProc3;
+
+
+ *ptr++ = (Uint32 ) & dlSacchProc0;
+ *ptr++ = (Uint32 ) & dlSacchProc1;
+ *ptr++ = (Uint32 ) & dlSacchProc1;
+ *ptr++ = (Uint32 ) & dlSacchProc3;
+
+ *ptr++ = (Uint32 ) & dlSacchProc0;
+ *ptr++ = (Uint32 ) & dlSacchProc1;
+ *ptr++ = (Uint32 ) & dlSacchProc1;
+ *ptr++ = (Uint32 ) & dlSacchProc3;
+
+
+ *ptr++ = (Uint32 ) & dlSacchProc0;
+ *ptr++ = (Uint32 ) & dlSacchProc1;
+ *ptr++ = (Uint32 ) & dlSacchProc1;
+ *ptr++ = (Uint32 ) & dlSacchProc3;
+
+ *ptr++ = (Uint32 ) & dlSacchProc0;
+ *ptr++ = (Uint32 ) & dlSacchProc1;
+ *ptr++ = (Uint32 ) & dlSacchProc1;
+ *ptr++ = (Uint32 ) & dlSacchProc3;
+
+
+
+
+ *ptr++ = (Uint32 ) & dlIdleProc;
+ *ptr++ = (Uint32 ) & dlIdleProc;
+ *ptr++ = (Uint32 ) & dlIdleProc;
+}
+
+void ulGroupVIITableInit(void)
+{
+ ulGroupTableVII[0] = (Uint32 ) & ulSacchProc0;
+ ulGroupTableVII[1] = (Uint32 ) & ulSacchProc0;
+ ulGroupTableVII[2] = (Uint32 ) & ulSacchProc0;
+ ulGroupTableVII[3] = (Uint32 ) & ulSacchProc3;
+
+ ulGroupTableVII[4] = (Uint32 ) & ulSacchProc0;
+ ulGroupTableVII[5] = (Uint32 ) & ulSacchProc0;
+ ulGroupTableVII[6] = (Uint32 ) & ulSacchProc0;
+ ulGroupTableVII[7] = (Uint32 ) & ulSacchProc3;
+
+ ulGroupTableVII[8] = (Uint32 ) & ulSacchProc0;
+ ulGroupTableVII[9] = (Uint32 ) & ulSacchProc0;
+ ulGroupTableVII[10] = (Uint32 ) & ulSacchProc0;
+ ulGroupTableVII[11] = (Uint32 ) & ulSacchProc3;
+
+
+ ulGroupTableVII[12] = (Uint32 ) & ulIdleProc;
+ ulGroupTableVII[13] = (Uint32 ) & ulIdleProc;
+ ulGroupTableVII[14] = (Uint32 ) & ulIdleProc;
+
+ ulGroupTableVII[15] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[16] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[17] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[18] = (Uint32 ) & ulSdcchProc3;
+
+ ulGroupTableVII[19] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[20] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[21] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[22] = (Uint32 ) & ulSdcchProc3;
+
+ ulGroupTableVII[23] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[24] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[25] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[26] = (Uint32 ) & ulSdcchProc3;
+
+ ulGroupTableVII[27] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[28] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[29] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[30] = (Uint32 ) & ulSdcchProc3;
+
+ ulGroupTableVII[31] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[32] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[33] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[34] = (Uint32 ) & ulSdcchProc3;
+
+ ulGroupTableVII[35] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[36] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[37] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[38] = (Uint32 ) & ulSdcchProc3;
+
+ ulGroupTableVII[39] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[40] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[41] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[42] = (Uint32 ) & ulSdcchProc3;
+
+ ulGroupTableVII[43] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[44] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[45] = (Uint32 ) & ulSdcchProc0;
+ ulGroupTableVII[46] = (Uint32 ) & ulSdcchProc3;
+
+ ulGroupTableVII[47] = (Uint32 ) & ulSacchProc0;
+ ulGroupTableVII[48] = (Uint32 ) & ulSacchProc0;
+ ulGroupTableVII[49] = (Uint32 ) & ulSacchProc0;
+ ulGroupTableVII[50] = (Uint32 ) & ulSacchProc3;
+
+}
+
+void sacchIdleTableInit(void)
+{
+ dlSacchIdleTbl[0] = (Uint32 ) & dlSacchProc0;
+ dlSacchIdleTbl[1] = (Uint32 ) & dlIdleProc;
+
+ dlSacchIdleTbl[2] = (Uint32 ) & dlSacchProc1;
+ dlSacchIdleTbl[3] = (Uint32 ) & dlIdleProc;
+
+ dlSacchIdleTbl[4] = (Uint32 ) & dlSacchProc1;
+ dlSacchIdleTbl[5] = (Uint32 ) & dlIdleProc;
+
+ dlSacchIdleTbl[6] = (Uint32 ) & dlSacchProc3;
+ dlSacchIdleTbl[7] = (Uint32 ) & dlIdleProc;
+
+ /*
+ * init uplink sacch idle function table
+ */
+ ulSacchIdleTbl[0] = (Uint32 ) & ulSacchProc0;
+ ulSacchIdleTbl[1] = (Uint32 ) & ulIdleProc;
+
+ ulSacchIdleTbl[2] = (Uint32 ) & ulSacchProc0;
+ ulSacchIdleTbl[3] = (Uint32 ) & ulIdleProc;
+
+ ulSacchIdleTbl[4] = (Uint32 ) & ulSacchProc0;
+ ulSacchIdleTbl[5] = (Uint32 ) & ulIdleProc;
+
+ ulSacchIdleTbl[6] = (Uint32 ) & ulSacchProc3;
+ ulSacchIdleTbl[7] = (Uint32 ) & handOverProc;
+}
+
+void dlGroupXITableInit(void)
+/*---------------------------------------------------
+ Function: dlGroupXITableInit
+ Inputs:
+ None
+ Outputs:
+ dlGrouTableXI
+ Description:
+ dlGroupXITableInit initializes the 52-multiframe
+ downlink table pointer for GroupXI.
+-- ---------------------------------------------------*/
+{
+
+
+ dlGroupTableXI[0] = (Uint32) & dlPbcchProc0;
+ dlGroupTableXI[1] = (Uint32) & dlBcchProc1;
+ dlGroupTableXI[2] = (Uint32) & dlBcchProc2;
+ dlGroupTableXI[3] = (Uint32) & dlBcchProc3;
+
+
+
+ dlGroupTableXI[4] = (Uint32) dlPpchProc0;
+ dlGroupTableXI[5] = (Uint32) dlPpchProc1;
+ dlGroupTableXI[6] = (Uint32) dlPpchProc2;
+ dlGroupTableXI[7] = (Uint32) dlPpchProc3;
+
+ dlGroupTableXI[8] = (Uint32) dlPpchProc0;
+ dlGroupTableXI[9] = (Uint32) dlPpchProc1;
+ dlGroupTableXI[10] = (Uint32) dlPpchProc2;
+ dlGroupTableXI[11] = (Uint32) dlPpchProc3;
+
+
+ dlGroupTableXI[12] = (Uint32) &dlPtcchProc0;
+
+ dlGroupTableXI[13] = (Uint32) &dlPdchProc0;
+ dlGroupTableXI[14] = (Uint32) &dlPdchProc3;
+ dlGroupTableXI[15] = (Uint32) &dlPdchProc3;
+ dlGroupTableXI[16] = (Uint32) &dlPdchProc3;
+
+ dlGroupTableXI[17] = (Uint32) &dlPdchProc0;
+ dlGroupTableXI[18]= (Uint32) &dlPdchProc3;
+ dlGroupTableXI[19] = (Uint32) &dlPdchProc3;
+ dlGroupTableXI[20] = (Uint32) &dlPdchProc3;
+
+ dlGroupTableXI[21] = (Uint32) &dlPdchProc0;
+ dlGroupTableXI[22] = (Uint32) &dlPdchProc3;
+ dlGroupTableXI[23] = (Uint32) &dlPdchProc3;
+ dlGroupTableXI[24] = (Uint32) &dlPdchProc3;
+
+ dlGroupTableXI[25] = (Uint32)&dlPtcchIdleProc;
+
+ dlGroupTableXI[26] = (Uint32) &dlPdchProc0;
+ dlGroupTableXI[27] = (Uint32) &dlPdchProc3;
+ dlGroupTableXI[28] = (Uint32) &dlPdchProc3;
+ dlGroupTableXI[29] = (Uint32) &dlPdchProc3;
+
+ dlGroupTableXI[30] = (Uint32) &dlPdchProc0;
+ dlGroupTableXI[31] = (Uint32) &dlPdchProc3;
+ dlGroupTableXI[32] = (Uint32) &dlPdchProc3;
+ dlGroupTableXI[33] = (Uint32) &dlPdchProc3;
+
+
+ dlGroupTableXI[34] = (Uint32) &dlPdchProc0;
+ dlGroupTableXI[35] = (Uint32) &dlPdchProc3;
+ dlGroupTableXI[36] = (Uint32) &dlPdchProc3;
+ dlGroupTableXI[37] = (Uint32) &dlPdchProc3;
+
+ dlGroupTableXI[38]= (Uint32)& dlPtcchProc0;;
+
+ dlGroupTableXI[39] = (Uint32) &dlPdchProc0;
+ dlGroupTableXI[40] = (Uint32) &dlPdchProc3;
+ dlGroupTableXI[41] = (Uint32) &dlPdchProc3;
+ dlGroupTableXI[42] = (Uint32) &dlPdchProc3;
+
+ dlGroupTableXI[43] = (Uint32) &dlPdchProc0;
+ dlGroupTableXI[44] = (Uint32) &dlPdchProc3;
+ dlGroupTableXI[45] = (Uint32) &dlPdchProc3;
+ dlGroupTableXI[46] = (Uint32) &dlPdchProc3;
+
+ dlGroupTableXI[47] = (Uint32) &dlPdchProc0;
+ dlGroupTableXI[48] = (Uint32) &dlPdchProc3;
+ dlGroupTableXI[49] = (Uint32) &dlPdchProc3;
+ dlGroupTableXI[50] = (Uint32) &dlPdchProc3;
+
+ dlGroupTableXI[51] = (Uint32) &dlPtcchIdleProc;
+
+
+
+
+
+
+
+}
+
+void ulGroupXITableInit(void)
+/*----------------------------------------------------
+ Function: ulGroupXITableInit
+ Inputs:
+ None
+ Outputs:
+ ulGrouTableXI
+ Description:
+ ulGroupXITableInit initializes the 52-multiframe
+ uplink table pointer for GroupXI.
+-- ---------------------------------------------------*/
+{
+
+
+ ulGroupTableXI[0] = (Uint32 ) & ulPdchProc0;
+ ulGroupTableXI[1] = (Uint32 ) & ulPdchProc0;
+ ulGroupTableXI[2] = (Uint32 ) & ulPdchProc0;
+ ulGroupTableXI[3] = (Uint32 ) & ulPdchProc3;
+
+ ulGroupTableXI[4] = (Uint32 ) & ulPdchProc0;
+ ulGroupTableXI[5] = (Uint32 ) & ulPdchProc0;
+ ulGroupTableXI[6] = (Uint32 ) & ulPdchProc0;
+ ulGroupTableXI[7] = (Uint32 ) & ulPdchProc3;
+
+ ulGroupTableXI[8] = (Uint32 ) & ulPdchProc0;
+ ulGroupTableXI[9] = (Uint32 ) & ulPdchProc0;
+ ulGroupTableXI[10] =(Uint32 ) & ulPdchProc0;
+ ulGroupTableXI[11] =(Uint32 ) & ulPdchProc3;
+
+ ulGroupTableXI[12] = (Uint32) &ulPtcchProc;
+
+ ulGroupTableXI[13] = (Uint32) &ulPdchProc0;
+ ulGroupTableXI[14] = (Uint32) &ulPdchProc0;
+ ulGroupTableXI[15] = (Uint32) &ulPdchProc0;
+ ulGroupTableXI[16] = (Uint32) &ulPdchProc3;
+
+ ulGroupTableXI[17] = (Uint32) &ulPdchProc0;
+ ulGroupTableXI[18]= (Uint32) &ulPdchProc0;
+ ulGroupTableXI[19] = (Uint32) &ulPdchProc0;
+ ulGroupTableXI[20] = (Uint32) &ulPdchProc3;
+
+ ulGroupTableXI[21] = (Uint32) &ulPdchProc0;
+ ulGroupTableXI[22] = (Uint32) &ulPdchProc0;
+ ulGroupTableXI[23] = (Uint32) &ulPdchProc0;
+ ulGroupTableXI[24] = (Uint32) &ulPdchProc3;
+
+ ulGroupTableXI[25] = (Uint32) & ulPtcchIdleProc;;
+
+ ulGroupTableXI[26] = (Uint32) &ulPdchProc0;
+ ulGroupTableXI[27] = (Uint32) &ulPdchProc0;
+ ulGroupTableXI[28] = (Uint32) &ulPdchProc0;
+ ulGroupTableXI[29] = (Uint32) &ulPdchProc3;
+
+
+ ulGroupTableXI[30] = (Uint32) &ulPdchProc0;
+ ulGroupTableXI[31] = (Uint32) &ulPdchProc0;
+ ulGroupTableXI[32] = (Uint32) &ulPdchProc0;
+ ulGroupTableXI[33] = (Uint32) &ulPdchProc3;
+
+ ulGroupTableXI[34] = (Uint32) &ulPdchProc0;
+ ulGroupTableXI[35] = (Uint32) &ulPdchProc0;
+ ulGroupTableXI[36] = (Uint32) &ulPdchProc0;
+ ulGroupTableXI[37] = (Uint32) &ulPdchProc3;
+
+ ulGroupTableXI[38]= (Uint32) &ulPtcchProc;
+ ulGroupTableXI[39] = (Uint32 ) & ulPdchProc0;
+ ulGroupTableXI[40] = (Uint32 ) & ulPdchProc0;
+ ulGroupTableXI[41] = (Uint32 ) & ulPdchProc0;
+ ulGroupTableXI[42] = (Uint32 ) & ulPdchProc3;
+
+ ulGroupTableXI[43] = (Uint32 ) & ulPdchProc0;
+ ulGroupTableXI[44] = (Uint32 ) & ulPdchProc0;
+ ulGroupTableXI[45] = (Uint32 ) & ulPdchProc0;
+ ulGroupTableXI[46] = (Uint32 ) & ulPdchProc3;
+
+ ulGroupTableXI[47] = (Uint32 ) & ulPdchProc0;
+ ulGroupTableXI[48] = (Uint32 ) & ulPdchProc0;
+ ulGroupTableXI[49] = (Uint32 ) & ulPdchProc0;
+ ulGroupTableXI[50] = (Uint32 ) & ulPdchProc3;
+
+ ulGroupTableXI[51] = (Uint32) & ulPtcchIdleProc;
+
+
+
+
+
+
+
+
+}
+
+void dlGroupXIIITableInit(void)
+{
+ Uint32 *ptr;
+ ptr = dlGroupTableXIII;
+ *ptr++ = (Uint32 ) & dlPdchProc0;
+ *ptr++ = (Uint32 ) & dlPdchProc3;
+ *ptr++ = (Uint32 ) & dlPdchProc3;
+ *ptr++ = (Uint32 ) & dlPdchProc3;
+ *ptr++ = (Uint32 ) & dlPdchProc0;
+ *ptr++ = (Uint32 ) & dlPdchProc3;
+ *ptr++ = (Uint32 ) & dlPdchProc3;
+ *ptr++ = (Uint32 ) & dlPdchProc3;
+ *ptr++ = (Uint32 ) & dlPdchProc0;
+ *ptr++ = (Uint32 ) & dlPdchProc3;
+ *ptr++ = (Uint32 ) & dlPdchProc3;
+ *ptr++ = (Uint32 ) & dlPdchProc3;
+ *ptr++ = (Uint32 ) & dlPtcchIdleProc;
+}
+
+void ulGroupXIIITableInit(void)
+{
+ Uint32 *ptr;
+ ptr = ulGroupTableXIII;
+ *ptr++ = (Uint32 ) & ulPdchProc0;
+ *ptr++ = (Uint32 ) & ulPdchProc0;
+ *ptr++ = (Uint32 ) & ulPdchProc0;
+ *ptr++ = (Uint32 ) & ulPdchProc3;
+ *ptr++ = (Uint32 ) & ulPdchProc0;
+ *ptr++ = (Uint32 ) & ulPdchProc0;
+ *ptr++ = (Uint32 ) & ulPdchProc0;
+ *ptr++ = (Uint32 ) & ulPdchProc3;
+ *ptr++ = (Uint32 ) & ulPdchProc0;
+ *ptr++ = (Uint32 ) & ulPdchProc0;
+ *ptr++ = (Uint32 ) & ulPdchProc0;
+ *ptr++ = (Uint32 ) & ulPdchProc3;
+ *ptr++ = (Uint32 ) & ulPtcchIdleProc;
+}
+
+void dlPtcchTableInit(void)
+{
+ Uint32 *ptr;
+ ptr = dlPtcchTable;
+ *ptr++ = (Uint32 ) & dlPtcchProc0;
+ *ptr++ = (Uint32 ) & dlPtcchIdleProc0;
+ *ptr++ = (Uint32 ) & dlPtcchProc3;
+ *ptr++ = (Uint32 ) & dlPtcchIdleProc0;
+ *ptr++ = (Uint32 ) & dlPtcchProc3;
+ *ptr++ = (Uint32 ) & dlPtcchIdleProc0;
+ *ptr++ = (Uint32 ) & dlPtcchProc3;
+ *ptr++ = (Uint32 ) & dlPtcchIdleProc3;
+}
+
+void ulPtcchTableInit(void)
+{
+ Uint32 *ptr;
+ ptr = ulPtcchTable;
+ *ptr++ = (Uint32 ) & ulPtcchProc;
+ *ptr++ = (Uint32 ) & ulPtcchIdleProc0;
+}
+
+
+void dlPbcchTableInit(void)
+{
+ Uint32 *ptr;
+
+
+ ptr = dlPbcchTable;
+
+ *ptr++ = (Uint32) & dlPbcchProc0;
+ *ptr++ = (Uint32) & dlBcchProc1;
+ *ptr++ = (Uint32) & dlBcchProc2;
+ *ptr++ = (Uint32) & dlBcchProc3;
+
+}
+
+
+void dlPpchTableInit(void)
+{
+ Uint32 *ptr;
+
+ ptr = dlPpchTable;
+
+ *ptr++ = (Uint32) & dlPpchProc0;
+ *ptr++ = (Uint32) & dlPpchProc1;
+ *ptr++ = (Uint32) & dlPpchProc2;
+ *ptr++ = (Uint32) & dlPpchProc3;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/hoProc.c b/data/mnet/GP10/Dsp/synchctrl/hoProc.c
new file mode 100644
index 0000000..5982c9c
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/hoProc.c
@@ -0,0 +1,1029 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: hoProc.c
+*
+* Description:
+* This file contains functions that support handover
+*
+* Public Functions:
+*
+* Private Functions:
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "oamdata.h"
+#include "dsp/dsphmsg.h"
+#include "dsprotyp.h"
+#include "bbdata.h"
+#include "l1config.h"
+#include "diagdata.h"
+#include "agcdata.h"
+
+/*****************************************************************************
+*
+* Function: oamInit
+*
+* Decription:
+* Initializes all data structures related to handover processing. To be
+* called by dspinit().
+*
+* Input:
+* None
+*
+* Output:
+* g_DynPwrOAMInfo initialized structure
+* g_HoOAMInfo initialized structure
+*
+******************************************************************************/
+void oamInit(void)
+{
+ Uint8 i, j, k;
+
+ /* used for frequency of reporting power control */
+ g_DynPwrOAMInfo.dynPwrSacchFrmCnt = 8;
+
+ /* used for frequency of reporting co-channel interference */
+ g_DynPwrOAMInfo.ulsigstren.Intave = 8;
+
+ /* serving cell init */
+
+ /* renamed 'hreqave' in gsm 05.08 */
+ g_DynPwrOAMInfo.ulsigstren.numRxSigSamples = NUM_RX_SIGNAL_SAMPLES;
+ g_DynPwrOAMInfo.ulsigqual.numRxSigSamples = NUM_RX_SIGNAL_SAMPLES;
+
+ /* used for frequency of reporting power control */
+ g_DynPwrOAMInfo.dynPwrSacchFrmCnt = NUM_RX_SIGNAL_SAMPLES;
+
+ g_DynPwrOAMInfo.ulsigstren.LRxPwrULH = UL_DL_HO_THRESH_DEF; /* cell threshold for handover to commence */
+
+ g_DynPwrOAMInfo.ulsigqual.LRxQualULH = 4; /* cell threshold for handover to commence */
+
+ g_DynPwrOAMInfo.dlsigstrenSCell.LRxLevDLH = UL_DL_HO_THRESH_DEF; /* RXLEV units */
+ g_DynPwrOAMInfo.dlsigstrenSCell.hoAveWindow = 8;
+
+ g_DynPwrOAMInfo.dlsigqualSCell.LRxQualDLH = 4; /* cell threshold for handover to commence */
+ g_DynPwrOAMInfo.dlsigqualSCell.hoAveWindow = 8;
+
+ g_DynPwrOAMInfo.sigstren.pxH = 2; /* used to measure px out of nx failures on the threshold */
+ g_DynPwrOAMInfo.sigstren.nxH = 4; /* before handover commences (P5,N5) */
+ g_DynPwrOAMInfo.sigqual.pxH = 2; /* used to measure px out of nx failures on the threshold */
+ g_DynPwrOAMInfo.sigqual.nxH = 4; /* before handover commences (P6,N6) */
+
+ /* co-channel interference parameters */
+ g_DynPwrOAMInfo.intsigstren.pxH = 2; /* used to measure px out of nx failures on the threshold */
+ g_DynPwrOAMInfo.intsigstren.nxH = 2; /* before handover commences (P7,N7) */
+ g_DynPwrOAMInfo.ulsigstren.RxLevUL_IH = 45; /* RXLEV thresholds for intracell (interference) handover */
+ g_DynPwrOAMInfo.dlsigstrenSCell.RxLevDL_IH = 45; /* typical range is -85 to -40 dBm */
+
+ /* neighbour cells init */
+ for(i=0; i < NUM_NCELLS; i++){
+ g_HoOAMInfo.uniqueParms[i].rfCh = 0;
+ g_HoOAMInfo.uniqueParms[i].bsic = 0;
+ g_HoOAMInfo.uniqueParms[i].hoMargin = HO_MARGIN_DEF;
+ g_HoOAMInfo.uniqueParms[i].msTxPwrMax = MS_TXPWR_MAX_DEF;
+ g_HoOAMInfo.uniqueParms[i].rxLevMin = RXLEV_MIN_DEF;
+ }
+
+ /* defaults if serving or neighbour cell's values are undefined */
+ g_HoOAMInfo.commonParms.hoMarginDef = HO_MARGIN_DEF;
+ g_HoOAMInfo.commonParms.msTxPwrMaxDef = MS_TXPWR_MAX_DEF;
+ g_HoOAMInfo.commonParms.rxLevMinDef = RXLEV_MIN_DEF;
+
+ /* defaults if serving or neighbour cell's values are undefined */
+ g_HoOAMInfo.serveParms.hoMargin = HO_MARGIN_DEF;
+ g_HoOAMInfo.serveParms.msTxPwrMax = MS_TXPWR_MAX_DEF;
+ g_HoOAMInfo.serveParms.rxLevMin = RXLEV_MIN_DEF;
+
+ /* for unit test */
+ if(g_loopBackMode == LOCAL_LOOPBACK) {
+ g_BBInfo[0].TNInfo[2].u.group1.tch.NCell[0].rxLev = 1;
+ //g_BBInfo[0].TNInfo[2].u.group1.tch.NCell[1].rxLev = 2;
+ //g_BBInfo[0].TNInfo[2].u.group1.tch.NCell[2].rxLev = -3;
+ //g_BBInfo[0].TNInfo[2].u.group1.tch.NCell[3].rxLev = 4;
+ //g_BBInfo[0].TNInfo[2].u.group1.tch.NCell[4].rxLev = 1;
+ //g_BBInfo[0].TNInfo[2].u.group1.tch.NCell[5].rxLev = -6;
+ //g_BBInfo[0].TNInfo[2].u.group1.sacch.dlsigstrenSCell.rxLevNew = 0;
+
+ //g_HoOAMInfo.uniqueParms[0].rfCh = 20;
+ //g_HoOAMInfo.uniqueParms[0].bsic = 61;
+ //g_HoOAMInfo.uniqueParms[21].rfCh = 9;
+ //g_HoOAMInfo.uniqueParms[21].bsic = 17;
+ //g_HoOAMInfo.uniqueParms[31].rfCh = 0;
+ //g_HoOAMInfo.uniqueParms[31].bsic = 4;
+ //g_HoOAMInfo.uniqueParms[4].rfCh = 24;
+ //g_HoOAMInfo.uniqueParms[4].bsic = 57;
+ g_HoOAMInfo.uniqueParms[4].rfCh = 0;
+ g_HoOAMInfo.uniqueParms[4].bsic = 55;
+ }
+
+ /* other misc. initializations related to gsm05.08 */
+
+ /*-----------------------------------------------------------
+ * Initialize parameters for co-channel interference processing
+ *----------------------------------------------------------*/
+ g_IntRprtCntr = 0;
+
+
+ /*
+ * Set Defauld radio Link Lost threshold
+ */
+ g_HoOAMInfo.serveParms.radioLinkTimeout = RF_LINK_LOST_THRESHOLD;
+
+ /*
+ * Conversion look up table for translating rxQual [0..7] to bit error rate (ber).
+ * The assumed values in the table are taken from gsm05.08 section 8.2.4.
+ *
+ * Index value is:
+ * rxQual from sacchInfo.sigqual or dlsigqualSCell
+ * or
+ * rxQualAve averaged over OAM defined period (hreqave)
+ *
+ * Output:
+ * ber in units of 0.01% (resolution = 1/10000)
+ * (e.g. 1810 is 18.10%). This was deliberately done
+ * for the sake of readibility.
+ */
+ g_rxQual2ber_LookUpTbl[0] = 14;
+ g_rxQual2ber_LookUpTbl[1] = 28;
+ g_rxQual2ber_LookUpTbl[2] = 57;
+ g_rxQual2ber_LookUpTbl[3] = 113;
+ g_rxQual2ber_LookUpTbl[4] = 226;
+ g_rxQual2ber_LookUpTbl[5] = 453;
+ g_rxQual2ber_LookUpTbl[6] = 905;
+ g_rxQual2ber_LookUpTbl[7] = 1810;
+
+ return;
+}
+
+/*****************************************************************************
+*
+* Function: handOverProc
+*
+* Decription:
+* Averages uplink power over mulitple SACCH intervals and computes
+* MS commanded power (dynamic power control) for Group 1 and Group 5.
+* Checks whether handover is required for Group 1 only. To be called
+* from grouptbl.c for Group 1. Currently called from ulSacchProc3 for
+* Group 5.
+*
+* Input:
+* rfCh TRX number (starting with zero)
+* timeSlot GSM time slot
+*
+* Output:
+* g_DynPwrOAMInfo initialized structure
+* g_HoOAMInfo initialized structure
+*
+******************************************************************************/
+void handOverProc(Uint8 rfCh, Uint8 timeSlot)
+{
+ /* to be called from grouptbl.c ...
+ rfCh is NOT the ARFCN value, but rather the trx number
+ with range of 0..1. Use 0 for now.
+ */
+
+ t_TNInfo *ts;
+ t_TCHInfo *tch;
+ t_PNbufs *PNbufs;
+ Uint8 i, j, P_ulStren, P_dlStren, P_ulQual, P_dlQual, P_ulStrenInt, P_dlStrenInt;
+ Int16 *pHead;
+ Bool hoThreshTestPassed;
+ t_chanState chState;
+ msgStruc hoMsg; /* to assist DEBUG reports */
+ Uint8 tempBuf[32]; /* !! DEBUG */
+ t_SACCHInfo *sacchInfo;
+ Int8 subChan; /* must be signed */
+ Uint8 hoCause;
+ Uint16 temp;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_1:
+
+ chState = ts->u.group1.sacch.state;
+ sacchInfo = & ts->u.group1.sacch;
+
+ if(chState == CHAN_ACTIVE) {
+
+ tch = & g_BBInfo[rfCh].TNInfo[timeSlot].u.group1.tch;
+ pHead = & g_BBInfo[rfCh].TNInfo[timeSlot].u.group1.tch.hoCandidateBuf.rxLev[0];
+ PNbufs = & g_PNbufs[timeSlot]; /* P out of N testing is timeslot dependent */
+
+ /*-----------------------------------------------------------------
+ * Save uplink RXQUAL and recompute average RXQUAL for HO algorithm
+ *-----------------------------------------------------------------*/
+ averageQ(&sacchInfo->ulsigqual,
+ &sacchInfo->dlsigqualSCell,
+ g_DynPwrOAMInfo.ulsigqual.numRxSigSamples,
+ &sacchInfo->ulsigqual.ber,
+ TRUE);
+ /*
+ tempBuf[0] = sacchInfo->ulsigqual.rxQual[0];
+ tempBuf[1] = sacchInfo->ulsigqual.rxQual[1];
+ tempBuf[2] = sacchInfo->ulsigqual.rxQual[2];
+ tempBuf[3] = sacchInfo->ulsigqual.rxQual[3];
+ tempBuf[4] = sacchInfo->ulsigqual.rxQual[4];
+ tempBuf[5] = sacchInfo->ulsigqual.rxQual[5];
+ tempBuf[6] = sacchInfo->ulsigqual.rxQual[6];
+ tempBuf[7] = sacchInfo->ulsigqual.rxQual[7];
+ tempBuf[8] = sacchInfo->ulsigqual.rxQualAve;
+ tempBuf[9] = sacchInfo->ulsigqual.berAve >> 8;
+ tempBuf[10] = sacchInfo->ulsigqual.berAve;
+ tempBuf[11] = sacchInfo->ulsigqual.count;
+
+ sendDiagMsg(0x95,0,ts->tsNumber,12,tempBuf);
+ */
+
+ /*-----------------------------------------------------------
+ * do power computations for uplink automatic gain control
+ *-----------------------------------------------------------*/
+ accumPower(rfCh, timeSlot, ts->groupNum, SACCH_OR_IDLE, sacchInfo, NULL);
+
+
+ /*-----------------------------------------------------------------
+ * Check for ul gain diagnostic.
+ *----------------------------------------------------------------*/
+ //tempBuf[0] = (ts->u.group1.sacch.ulsigstren.rxgain >> 8) & 0xff;
+ //tempBuf[1] = ts->u.group1.sacch.ulsigstren.rxgain & 0xff;
+ //sendDiagMsg(0x98, 0, ts->tsNumber, 2, tempBuf);
+
+ /*-----------------------------------------------------------------
+ * Save uplink RXLEV and recompute average RXLEV for HO algorithm
+ *-----------------------------------------------------------------*/
+ averageS(&ts->u.group1.sacch.ulsigstren,
+ &ts->u.group1.sacch.dlsigstrenSCell,
+ g_DynPwrOAMInfo.ulsigstren.numRxSigSamples,
+ &ts->u.group1.sacch.MSPowerAccum,
+ TRUE);
+ /*
+ tempBuf[0] = sacchInfo->ulsigstrenSCell.rxLev[0] >> 8;
+ tempBuf[1] = sacchInfo->ulsigstrenSCell.rxLev[0];
+ tempBuf[2] = sacchInfo->ulsigstrenSCell.rxLev[1] >> 8;
+ tempBuf[3] = sacchInfo->ulsigstrenSCell.rxLev[1];
+ tempBuf[4] = sacchInfo->ulsigstrenSCell.rxLev[2] >> 8;
+ tempBuf[5] = sacchInfo->ulsigstrenSCell.rxLev[2];
+ tempBuf[6] = sacchInfo->ulsigstrenSCell.rxLev[3] >> 8;
+ tempBuf[7] = sacchInfo->ulsigstrenSCell.rxLev[3];
+ tempBuf[8] = sacchInfo->ulsigstrenSCell.rxLev[4] >> 8;
+ tempBuf[9] = sacchInfo->ulsigstrenSCell.rxLev[4];
+ tempBuf[10] = sacchInfo->ulsigstrenSCell.rxLev[5] >> 8;
+ tempBuf[11] = sacchInfo->ulsigstrenSCell.rxLev[5];
+ tempBuf[12] = sacchInfo->ulsigstrenSCell.rxLev[6] >> 8;
+ tempBuf[13] = sacchInfo->ulsigstrenSCell.rxLev[6];
+ tempBuf[14] = sacchInfo->ulsigstrenSCell.rxLev[7] >> 8;
+ tempBuf[15] = sacchInfo->ulsigstrenSCell.rxLev[7];
+ tempBuf[16] = sacchInfo->ulsigstrenSCell.rxLevAve >> 8;
+ tempBuf[17] = sacchInfo->ulsigstrenSCell.rxLevAve;
+ tempBuf[18] = sacchInfo->ulsigstrenSCell.count;
+
+ sendDiagMsg(0x95,0,ts->tsNumber,19,tempBuf);
+ */
+
+ /*------------------------------------------------------------------
+ * Save downlink RXQUAL and recompute average RXQUAL for HO algorithm
+ *------------------------------------------------------------------*/
+ temp = sacchInfo->dlsigqualSCell.rxQualNew; /* cast to Uint16 */
+ averageQ(&sacchInfo->ulsigqual,
+ &sacchInfo->dlsigqualSCell,
+ g_DynPwrOAMInfo.dlsigqualSCell.hoAveWindow,
+ &temp,
+ FALSE);
+ sacchInfo->dlsigqualSCell.rxQualNew = (Uint8)temp; /* copy to Uint8 */
+ /*
+ tempBuf[0] = sacchInfo->dlsigqualSCell.rxQual[0];
+ tempBuf[1] = sacchInfo->dlsigqualSCell.rxQual[1];
+ tempBuf[2] = sacchInfo->dlsigqualSCell.rxQual[2];
+ tempBuf[3] = sacchInfo->dlsigqualSCell.rxQual[3];
+ tempBuf[4] = sacchInfo->dlsigqualSCell.rxQual[4];
+ tempBuf[5] = sacchInfo->dlsigqualSCell.rxQual[5];
+ tempBuf[6] = sacchInfo->dlsigqualSCell.rxQual[6];
+ tempBuf[7] = sacchInfo->dlsigqualSCell.rxQual[7];
+ tempBuf[8] = sacchInfo->dlsigqualSCell.rxQualAve;
+ tempBuf[9] = sacchInfo->dlsigqualSCell.berAve >> 8;
+ tempBuf[10] = sacchInfo->dlsigqualSCell.berAve;
+ tempBuf[11] = sacchInfo->dlsigqualSCell.count;
+ tempBuf[12] = sacchInfo->dlsigqualSCell.rxQualNew;
+
+ sendDiagMsg(0x95,0,ts->tsNumber,13,tempBuf);
+ */
+
+
+ /*-----------------------------------------------------------------
+ * Save downlink RXLEV and recompute average RXLEV for HO algorithm
+ *-----------------------------------------------------------------*/
+ averageS(&ts->u.group1.sacch.ulsigstren,
+ &ts->u.group1.sacch.dlsigstrenSCell,
+ g_DynPwrOAMInfo.dlsigstrenSCell.hoAveWindow,
+ &ts->u.group1.sacch.dlsigstrenSCell.rxLevNew,
+ FALSE);
+ /*
+ tempBuf[0] = sacchInfo->dlsigstrenSCell.rxLev[0] >> 8;
+ tempBuf[1] = sacchInfo->dlsigstrenSCell.rxLev[0];
+ tempBuf[2] = sacchInfo->dlsigstrenSCell.rxLev[1] >> 8;
+ tempBuf[3] = sacchInfo->dlsigstrenSCell.rxLev[1];
+ tempBuf[4] = sacchInfo->dlsigstrenSCell.rxLev[2] >> 8;
+ tempBuf[5] = sacchInfo->dlsigstrenSCell.rxLev[2];
+ tempBuf[6] = sacchInfo->dlsigstrenSCell.rxLev[3] >> 8;
+ tempBuf[7] = sacchInfo->dlsigstrenSCell.rxLev[3];
+ tempBuf[8] = sacchInfo->dlsigstrenSCell.rxLev[4] >> 8;
+ tempBuf[9] = sacchInfo->dlsigstrenSCell.rxLev[4];
+ tempBuf[10] = sacchInfo->dlsigstrenSCell.rxLev[5] >> 8;
+ tempBuf[11] = sacchInfo->dlsigstrenSCell.rxLev[5];
+ tempBuf[12] = sacchInfo->dlsigstrenSCell.rxLev[6] >> 8;
+ tempBuf[13] = sacchInfo->dlsigstrenSCell.rxLev[6];
+ tempBuf[14] = sacchInfo->dlsigstrenSCell.rxLev[7] >> 8;
+ tempBuf[15] = sacchInfo->dlsigstrenSCell.rxLev[7];
+ tempBuf[16] = sacchInfo->dlsigstrenSCell.rxLevAve >> 8;
+ tempBuf[17] = sacchInfo->dlsigstrenSCell.rxLevAve;
+ tempBuf[18] = sacchInfo->dlsigstrenSCell.count;
+
+ sendDiagMsg(0x95,0,ts->tsNumber,19,tempBuf);
+ */
+
+ if ( g_DPC_ON && !ts->u.group1.sacch.dpcHoldFlag )
+ {
+ if ( ts->u.group1.sacch.averagingHoldCounter > g_DynPwrOAMInfo.ulsigstren.numRxSigSamples )
+ {
+ ts->u.group1.sacch.averagingHoldCounter = g_DynPwrOAMInfo.ulsigstren.numRxSigSamples;
+
+ /* increase/decrease MS power */
+ uplink_dynamic_power_control(& g_BBInfo[rfCh].TNInfo[timeSlot], 0);
+ }
+ else {
+ ts->u.group1.sacch.averagingHoldCounter += 1;
+ }
+ }
+
+ /*-----------------------------------------------------------
+ * HANDOVER PROCESSING
+ *-----------------------------------------------------------*/
+ if( (++tch->hoCandidateBuf.hoReportCnt > HO_REPORT_COUNTER) &&
+ ( ts->u.group1.sacch.averagingHoldCounter > g_DynPwrOAMInfo.ulsigstren.numRxSigSamples ) ) {
+ /*
+ * Do not reset guard period for Ho request
+ */
+ tch->hoCandidateBuf.hoReportCnt == HO_REPORT_COUNTER;
+
+ /* ---------------------------------------------------------------- */
+ /* The following 4 tests are to determine if intercell HO is needed */
+ /* ---------------------------------------------------------------- */
+ /*
+ * Test UL power (from MS) thresholds for possible handover.
+ * Also require MS to be transmitting the max power we allow.
+ */
+ if ( ts->u.group1.sacch.ulsigstren.rxLevAve <
+ g_DynPwrOAMInfo.ulsigstren.LRxPwrULH &&
+ ts->u.group1.sacch.dlsigstrenSCell.MSPwrSetting <=
+ g_HoOAMInfo.serveParms.msTxPwrMax &&
+ ts->u.group1.sacch.powerLevel <=
+ g_HoOAMInfo.serveParms.msTxPwrMax ) {
+ hoThreshTestPassed = TRUE;
+ }
+ else {
+ hoThreshTestPassed = FALSE;
+ }
+
+ P_ulStren = hoPNtest(&g_PNbufs[timeSlot].hoUL.sigstren,
+ g_DynPwrOAMInfo.sigstren.nxH,
+ hoThreshTestPassed);
+
+ /*
+ * Test DL power (from Vipercell) thresholds for possible handover
+ */
+ if((Int16) ts->u.group1.sacch.dlsigstrenSCell.rxLevAve <
+ g_DynPwrOAMInfo.dlsigstrenSCell.LRxLevDLH) {
+ hoThreshTestPassed = TRUE;
+ }
+ else {
+ hoThreshTestPassed = FALSE;
+ }
+
+ P_dlStren = hoPNtest(&g_PNbufs[timeSlot].hoDL.sigstrenSCell,
+ g_DynPwrOAMInfo.sigstren.nxH,
+ hoThreshTestPassed);
+
+ /*
+ * Test UL quality (from MS) thresholds for possible handover
+ */
+ if(ts->u.group1.sacch.ulsigqual.rxQualAve >
+ g_DynPwrOAMInfo.ulsigqual.LRxQualULH) {
+ hoThreshTestPassed = TRUE;
+ }
+ else {
+ hoThreshTestPassed = FALSE;
+ }
+
+ P_ulQual = hoPNtest(&g_PNbufs[timeSlot].hoUL.sigqual,
+ g_DynPwrOAMInfo.sigqual.nxH,
+ hoThreshTestPassed);
+
+ /*
+ * Test DL quality (from Vipercell) thresholds for possible handover
+ */
+ if((Int16) ts->u.group1.sacch.dlsigqualSCell.rxQualAve >
+ g_DynPwrOAMInfo.dlsigqualSCell.LRxQualDLH) {
+ hoThreshTestPassed = TRUE;
+ }
+ else {
+ hoThreshTestPassed = FALSE;
+ }
+
+ P_dlQual = hoPNtest(&g_PNbufs[timeSlot].hoDL.sigqualSCell,
+ g_DynPwrOAMInfo.sigqual.nxH,
+ hoThreshTestPassed);
+
+ /* ---------------------------------------------------------------- */
+ /* The following 2 tests are to determine if intracell HO is needed */
+ /* ---------------------------------------------------------------- */
+
+ /* test UL power (from MS) interference thresholds for possible handover */
+ if(ts->u.group1.sacch.ulsigstren.rxLevAve <
+ g_DynPwrOAMInfo.ulsigstren.RxLevUL_IH) {
+ hoThreshTestPassed = TRUE;
+ }
+ else {
+ hoThreshTestPassed = FALSE;
+ }
+
+ P_ulStrenInt = hoPNtest(&g_PNbufs[timeSlot].hoUL.intsigstren,
+ g_DynPwrOAMInfo.intsigstren.nxH,
+ hoThreshTestPassed);
+
+ /* test DL power (from Vipercell) interference thresholds for possible handover */
+ if((Int16) ts->u.group1.sacch.dlsigstrenSCell.rxLevAve <
+ g_DynPwrOAMInfo.dlsigstrenSCell.RxLevDL_IH) {
+ hoThreshTestPassed = TRUE;
+ }
+ else {
+ hoThreshTestPassed = FALSE;
+ }
+
+ P_dlStrenInt = hoPNtest(&g_PNbufs[timeSlot].hoDL.intsigstrenSCell,
+ g_DynPwrOAMInfo.intsigstren.nxH,
+ hoThreshTestPassed);
+
+ /*-------------------------------------------------------------------
+ * Set Bits 0-5 of the Handover Cause bitmap. Handover is considered
+ * IMPERATIVE if one or more of the six causes is met.
+ *
+ * a) RXLEV
+ * The power level (UL and/or DL) is below the threshold
+ * despite power control (MS or/and BSS have reached the
+ * maximum allowed power).
+ *
+ * b) RXQUAL
+ * The quality of the link (UL and/or DL) is below the
+ * quality threshold and the power level (UL and/or DL)
+ * is below the intracell power threshold.
+ *
+ * c) RXQUAL_IH
+ * The quality of the link (UL and/or DL) is below the
+ * quality threshold while the power level (UL and/or DL)
+ * is above the intracell power threshold. These conditions,
+ * if verified at the same time, indicate a high probability
+ * of co-channel interference.
+ *-------------------------------------------------------------------*/
+ hoCause = ((P_dlStren >= g_DynPwrOAMInfo.sigstren.pxH) * DL_RXLEV) |
+ ((P_ulStren >= g_DynPwrOAMInfo.sigstren.pxH) * UL_RXLEV) |
+ ((P_dlQual >= g_DynPwrOAMInfo.sigqual.pxH) * DL_RXQUAL) |
+ ((P_ulQual >= g_DynPwrOAMInfo.sigqual.pxH) * UL_RXQUAL) |
+ ((P_dlStrenInt < g_DynPwrOAMInfo.intsigstren.pxH &&
+ P_dlQual >= g_DynPwrOAMInfo.sigqual.pxH) * DL_RXQUAL_IH)|
+ ((P_ulStrenInt < g_DynPwrOAMInfo.intsigstren.pxH &&
+ P_ulQual >= g_DynPwrOAMInfo.sigqual.pxH) * UL_RXQUAL_IH);
+
+ /*-------------------------------------------------------------------
+ * If one or more HO cause triggered, send HO Report diagnostic
+ *-------------------------------------------------------------------*/
+ if ( (g_diagData.hoReportTsMask & (1<<timeSlot)) && hoCause )
+ {
+ tempBuf[0] = P_ulStren;
+ tempBuf[1] = g_DynPwrOAMInfo.sigstren.pxH;
+ tempBuf[2] = ts->u.group1.sacch.ulsigstren.rxLevAve;
+ tempBuf[3] = P_dlStren;
+ tempBuf[4] = g_DynPwrOAMInfo.sigstren.pxH;
+ tempBuf[5] = ts->u.group1.sacch.dlsigstrenSCell.rxLevAve;
+
+ tempBuf[6] = P_ulQual;
+ tempBuf[7] = g_DynPwrOAMInfo.sigqual.pxH;
+ tempBuf[8] = ts->u.group1.sacch.ulsigqual.rxQualAve;
+ tempBuf[9] = P_dlQual;
+ tempBuf[10] = g_DynPwrOAMInfo.sigqual.pxH;
+ tempBuf[11] = ts->u.group1.sacch.dlsigqualSCell.rxQualAve;
+
+ tempBuf[12] = P_ulStrenInt;
+ tempBuf[13] = g_DynPwrOAMInfo.intsigstren.pxH;
+ tempBuf[14] = P_dlStrenInt;
+ tempBuf[15] = g_DynPwrOAMInfo.intsigstren.pxH;
+
+ sendDiagMsg(HO_PN_REPORT,0,ts->tsNumber,16,tempBuf);
+ }
+
+ /*-------------------------------------------------------------------
+ * If one or more HO causes triggered, look for a handover candidate.
+ * If multiple causes triggered, then the order of priority from
+ * highest to lowest shall be: RXQUAL (Intracell), RXLEV (Intercell).
+ *-------------------------------------------------------------------*/
+ if ( hoCause )
+ {
+ /* compare with up to 6 neighbor cells sent by MS in
+ * order to find suitable candidates for handover.
+ */
+ hoCompare2NCells(rfCh, timeSlot, hoCause);
+
+ /* sort candidates (if any) from best to worst */
+ if(tch->hoCandidateBuf.size != 0) {
+ handOverProcSort(rfCh, timeSlot);
+
+ /* call the signalling function which sends candidates
+ * (in report buffer) back to layer 3 RRM.
+ */
+ sendAsyncHoMsg(rfCh, timeSlot, hoCause); /* DCCH message */
+
+ /*
+ * Reset guard period to not repeat the Ho request
+ */
+ tch->hoCandidateBuf.hoReportCnt = 0;
+ }
+ /* else no report is sent if there are no candidates */
+ } /* test for P */
+ else {
+ /* else do nothing except update report buffer (without
+ sorting,reporting) by copying the current (upto 6) values from
+ the uplink MS measurement report.
+ */
+ j=0;
+ for(i=0; i < MAX_NUM_NCELL_CANDIDATES; i++) {
+ if(tch->NCell[i].candidate == TRUE) {
+ *(pHead+j) = tch->NCell[i].rxLev;
+ j += 1;
+ }
+ }
+
+ /* function does not send report to layer 3 code */
+ UCopy2SendBuf(rfCh, timeSlot);
+
+ } /* test for P */
+ } /* test for counter */
+ } /* test for channel active */
+
+ else /* non active channel;
+ Collect power measurements for interference calculations */
+ {
+ accumPower(rfCh, timeSlot, ts->groupNum, SACCH_OR_IDLE, sacchInfo, NULL);
+
+ /*-----------------------------------------------------------
+ * average RXLEV for interference reporting
+ * -----------------------------------------------------------*/
+ averageS(&ts->u.group1.sacch.ulsigstren,
+ &ts->u.group1.sacch.dlsigstrenSCell,
+ g_DynPwrOAMInfo.ulsigstren.Intave,
+ &ts->u.group1.sacch.MSPowerAccum,
+ TRUE);
+ }
+
+ /*-------------------------------------------------------------
+ * Send interference report to host every Intave SACCH multiframes
+ *------------------------------------------------------------*/
+ if (g_IntRprtCntr >= g_DynPwrOAMInfo.ulsigstren.Intave)
+ {
+ /* reset counter */
+ g_IntRprtCntr = 0;
+
+ for (i=0; i<NUM_RFS_PER_DSP; i++) {
+ for (j=0; j < NUM_TS_PER_RF; j++) {
+ chState = g_BBInfo[i].TNInfo[j].u.group1.sacch.state;
+
+ if(chState == CHAN_ACTIVE) {
+ tempBuf[j] = 255; /* Set to the max. 8-bit value to signify active chnl. */
+ }
+ else {
+ tempBuf[j] = g_BBInfo[i].TNInfo[j].u.group1.sacch.ulsigstren.rxLevAve;
+ }
+ }
+ }
+
+ /* MCH CAN TURN THIS REPORT ON/OFF */
+ sendDiagMsg(IF_REPORT, rfCh, 0, 8, tempBuf);
+ }
+
+ break;
+
+ case GSM_GROUP_5: /* Do nothing for Group 5. No handover yet. */
+
+ break;
+
+ } /* switch construct */
+
+ return;
+}
+
+/*****************************************************************************
+*
+* Function: hoPNtest
+*
+* Decription:
+* Maintains most recent N pass/fail outcomes
+*
+* Input:
+* nxBuffer ptr to length-N array of outcomes
+* nx number of outcomes to maintain, N
+* pass indicates whether newest outcome passes (1) or not (0)
+*
+* Output:
+* return value number of passing values in most recent N outcomes
+*
+******************************************************************************/
+char hoPNtest(t_nxBuf *nxBuffer, Uint8 nx, Uint8 pass)
+{
+ /* This function was deliberately made to be generic
+ in order for all px-nx buffers to use.
+ */
+ /* pass = 1, fail = 0 */
+
+ Uint8 *pi, *pfl, *pflsum;
+
+ pi = & nxBuffer->index;
+ pfl = & nxBuffer->flag[*pi];
+ pflsum = & nxBuffer->flagsum;
+
+ /* add newest sample, subtract oldest from power */
+ *pflsum += pass - *pfl;
+ *pfl = pass;
+
+ if (*pi == nx-1) {
+ /* circular buffer's last address..rollover */
+ *pi = 0;
+ }
+ else {
+ /* point to the next entry in the flag buffer */
+ *pi += 1;
+ }
+
+ return(*pflsum);
+}
+
+/*****************************************************************************
+*
+* Function: hoCompare2NCells
+*
+* Decription:
+*
+* Input:
+*
+* Output:
+*
+******************************************************************************/
+void hoCompare2NCells(Uint8 rfCh, Uint8 timeSlot, Uint8 hoCause)
+{
+ t_TNInfo *ts;
+ t_TCHInfo *tch;
+ Uint8 i, j;
+ Uint8 matchNCell, matchNCellNum, msTxPwrMax;
+ Int16 rxLvlMin, hoMargin;
+ Uint8 tempBuf[20];
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_1:
+ tch = & g_BBInfo[rfCh].TNInfo[timeSlot].u.group1.tch;
+
+ /* avoid accumulating older values */
+ tch->hoCandidateBuf.size = 0;
+
+ /* Check the neighbor cells reported this sacch period */
+ for(i=0; i<ts->u.group1.sacch.noNCellM; i++) {
+
+ matchNCell = FALSE;
+
+ for(j=0; j<NUM_NCELLS; j++)
+ {
+ /*
+ * search an N Cell matches with candidate
+ */
+ if(tch->NCell[i].rfCh == g_HoOAMInfo.uniqueParms[j].rfCh &&
+ tch->NCell[i].bsic == g_HoOAMInfo.uniqueParms[j].bsic)
+ {
+ /*
+ * found a matching neighbor Cell set
+ */
+ matchNCell = TRUE;
+ matchNCellNum = j;
+ break;
+ }
+ }
+
+ if(!matchNCell)
+ {
+ /*
+ * compare with a default value if no match N Cell is found
+ */
+ hoMargin = g_HoOAMInfo.commonParms.hoMarginDef;
+ rxLvlMin = g_HoOAMInfo.commonParms.rxLevMinDef;
+ msTxPwrMax = g_HoOAMInfo.commonParms.msTxPwrMaxDef;
+
+ tempBuf[0] = tch->NCell[i].bsic;
+ tempBuf[1] = tch->NCell[i].rfCh >> 8;
+ tempBuf[2] = tch->NCell[i].rfCh;
+ /*
+ * The wanted Cell is not in N Cell table
+ */
+ ReportError(0x99,rfCh,timeSlot,3,tempBuf);
+
+ }
+ else
+ {
+ /*
+ * compare with values from NCell Table if matched
+ */
+ hoMargin = g_HoOAMInfo.uniqueParms[matchNCellNum].hoMargin;
+ rxLvlMin = g_HoOAMInfo.uniqueParms[matchNCellNum].rxLevMin;
+ msTxPwrMax = g_HoOAMInfo.uniqueParms[matchNCellNum].msTxPwrMax;
+ }
+
+ /*
+ * Always require a matching neighbor cell and require its DL power to
+ * meet a minimum level. If HO reason is strictly downlink power, also
+ * require the neighbor's DL power to meet the HO power margin.
+ */
+ if ( matchNCell &&
+ tch->NCell[i].rxLev > rxLvlMin &&
+ ( hoCause != DL_RXLEV ||
+ tch->NCell[i].rxLev > (ts->u.group1.sacch.dlsigstrenSCell.rxLevNew +
+ hoMargin +
+ msTxPwrMax -
+ g_HoOAMInfo.serveParms.msTxPwrMax) ) ) {
+ tch->NCell[i].candidate = TRUE;
+ tch->hoCandidateBuf.size += 1; /* one buffer per timeslot */
+ }
+ else {
+ tch->NCell[i].candidate = FALSE;
+ }
+
+ tempBuf[0] = ts->u.group1.sacch.dlsigstrenSCell.rxLevNew;
+ tempBuf[1] = tch->NCell[i].rxLev;
+ tempBuf[2] = hoMargin;
+ tempBuf[3] = rxLvlMin;
+ tempBuf[4] = ts->u.group1.sacch.noNCellM;
+ tempBuf[5] = i;
+
+ sendDiagMsg(0x99,rfCh,timeSlot,6,tempBuf);
+
+ }
+ break;
+
+ case GSM_GROUP_5:
+ break;
+ }
+ return;
+}
+
+/*****************************************************************************
+*
+* Function: handOverProcSort
+*
+* Decription:
+*
+* Input:
+*
+* Output:
+*
+******************************************************************************/
+void handOverProcSort(Uint8 rfCh, Uint8 timeSlot)
+{
+
+ /* sort candidates (given by compare function) from
+ most(head) to least(tail) favorable.
+ */
+ t_TNInfo *ts;
+ t_TCHInfo *tch;
+ Uint8 i, j, k;
+ Uint8 count;
+ Int16 *pTail, *pHead, *pTop;
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_1:
+ /* (re)set pointer values for convenience */
+ tch = & g_BBInfo[rfCh].TNInfo[timeSlot].u.group1.tch;
+ pHead = & g_BBInfo[rfCh].TNInfo[timeSlot].u.group1.tch.hoCandidateBuf.rxLev[0];
+
+ count = 0;
+
+ for(i=0; i<MAX_NUM_NCELL_CANDIDATES; i++) {
+
+ if(tch->NCell[i].candidate == TRUE) {
+
+ if((count > 0) && (count <= MAX_NUM_NCELL_CANDIDATES)) {
+ for(j=0; j<count; j++) {
+
+ if(tch->NCell[i].rxLev < *pHead) {
+ if(pHead == pTail) {
+ /* candidate is least favorable for
+ handover.
+ */
+ pTail += 1;
+ *pTail = tch->NCell[i].rxLev;
+ pHead = pTop; /* reset head back to top
+ of report buffer. */
+ }
+ else {
+ /* use head as pointer to the next array
+ element.
+ */
+ pHead += 1;
+ }
+ }
+ else {
+ /* insert candidate at head or somewhere
+ between head and tail. push all lower values down.
+ */
+ for(k = count; k > j; k--) {
+ *(pTop+k*sizeof(char)) = *(pTop+k-1*sizeof(char));
+ }
+
+ pTail = pTop+count*sizeof(char);
+ *pHead = tch->NCell[i].rxLev;
+ pHead = pTop; /* reset head back to top
+ of report buffer. */
+ j = count; /* to break out of for loop */
+ }
+
+ } /* for loop (count) */
+ } /* non-zero count */
+
+ /* first candidate is always the head. */
+ else if(count == 0) {
+ *pHead = tch->NCell[i].rxLev;
+ pTop = pHead; /* Always points to buffer top */
+ pTail = pHead; /* Initially only. */
+ }
+
+ count += 1;
+
+ } /* test fails, if no candidates exist. */
+ } /* End for loop. */
+ break;
+
+ case GSM_GROUP_5:
+ /* for future usage possibly. */
+ break;
+ } /* switch */
+ return;
+}
+
+/*****************************************************************************
+*
+* Function: sendAsyncHoMsg
+*
+* Decription:
+*
+* Input:
+*
+* Output:
+*
+******************************************************************************/
+void sendAsyncHoMsg(Uint8 rfCh, Uint8 timeSlot, Uint8 hoCause)
+{
+ /* copy oam indices (representing arfcns) and bsics
+ * to report buffer in sendAsyncHoMsg() and send it!
+ */
+ t_TNInfo *ts;
+ t_TCHInfo *tch;
+ msgStruc hoMsg;
+ Uint8 i,j,k;
+ Bool skip[MAX_NUM_NCELL_CANDIDATES]; /* flag to skip candidate, since it has already been chosen. */
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_1:
+ /* (re)set pointer values for convenience */
+ tch = & g_BBInfo[rfCh].TNInfo[timeSlot].u.group1.tch;
+
+ /*
+ * HO request in preference of ordering of candidate
+ */
+ hoMsg.msgSize = 19;
+ hoMsg.function = DCCH_MANAGE_MSG;
+ hoMsg.trx = rfCh;
+
+ // !! a one octet "cause" field wil be appended immediately after the message type.
+ // when this is added, remove 0x0038 ID representing INTRACELL HO
+ if ( (hoCause & DL_RXLEV) || (hoCause & UL_RXLEV) ||
+ (hoCause & DL_RXQUAL) || (hoCause & UL_RXQUAL) ) {
+ hoMsg.typeLoByte = DCH_ASYNC_HO_REQUIRED_IND;
+ hoMsg.typeHiByte = DCH_ASYNC_HO_REQUIRED_IND>>8;
+ }
+ else {
+ hoMsg.typeLoByte = 0x3800;
+ hoMsg.typeHiByte = 0x3800>>8;
+ }
+
+ hoMsg.params[0] = timeSlot| 0x8;
+ hoMsg.params[1] = 0;
+ hoMsg.params[2] = 0;
+ hoMsg.params[3] = tch->hoCandidateBuf.size; /* number of candidates */
+
+ /* refresh report buffer */
+ for(j=0; j < MAX_NUM_NCELL_CANDIDATES; j++) {
+ hoMsg.params[4+(j*2)] = 0;
+ hoMsg.params[5+(j*2)] = 0;
+ skip[j] = 0;
+ }
+
+ /* copy to send buffer */
+ for(i=0; i < tch->hoCandidateBuf.size; i++) {
+ for(j=0; j < MAX_NUM_NCELL_CANDIDATES; j++) {
+ for(k=0; k < MAX_NUM_NCELL_CANDIDATES; k++) {
+ if((skip[k] == 1) || (ts->u.group1.tch.NCell[k].rfCh == 0)
+ || ((ts->u.group1.tch.NCell[k].oamIdx == 0)
+ && (ts->u.group1.tch.NCell[k].bsic == 0)) ) {
+ j += 1; /* either the neighbor is chosen already, or disabled */
+ }
+ else
+ break;
+ }
+
+ if(tch->hoCandidateBuf.rxLev[i] == tch->NCell[j].rxLev) {
+ hoMsg.params[4+(i*2)] = ts->u.group1.tch.NCell[j].oamIdx; /* Frequency of candidate i, 5 bits */
+ hoMsg.params[5+(i*2)] = ts->u.group1.tch.NCell[j].bsic; /* BSIC of candidate i, 6 bits */
+ skip[j] = 1;
+ break;
+ }
+ }
+ }
+
+
+ /* if HO Report enabled for this TS, send diagnostic msg */
+ if ( g_diagData.hoReportTsMask & (1<<timeSlot) )
+ {
+ sendDiagMsg(HO_CAND_REPORT,0,ts->tsNumber,(hoMsg.params[3]*2)+1,&hoMsg.params[3]);
+ }
+
+ SendMsgHost_Que(& hoMsg);
+
+ break;
+
+ case GSM_GROUP_5:
+ break;
+ }
+ return;
+}
+
+/*****************************************************************************
+*
+* Function: UCopy2SendBuf
+*
+* Decription:
+*
+* Input:
+*
+* Output:
+*
+******************************************************************************/
+void UCopy2SendBuf(Uint8 rfCh, Uint8 timeSlot)
+{
+ /* copy oam indices (representing arfcns) and bsics
+ * to report buffer in sendAsyncHoMsg() BUT do not send.
+ */
+ t_TNInfo *ts;
+ t_TCHInfo *tch;
+ msgStruc hoMsg;
+ Uint8 i,j;
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_1:
+ /* (re)set pointer values for convenience */
+ tch = & g_BBInfo[rfCh].TNInfo[timeSlot].u.group1.tch;
+
+ hoMsg.params[3] = tch->hoCandidateBuf.size; /* number of candidates */
+
+ /* copy to send buffer with no sorting */
+ for(i=0; i < tch->hoCandidateBuf.size; i++) {
+ hoMsg.params[4+(i*2)] = ts->u.group1.tch.NCell[i].oamIdx; /* Frequency of candidate i, 5 bits */
+ hoMsg.params[5+(i*2)] = ts->u.group1.tch.NCell[i].bsic; /* BSIC of candidate i, 6 bits */
+ }
+ break;
+
+ case GSM_GROUP_5:
+ break;
+ }
+ return;
+}
+
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/pagch.c b/data/mnet/GP10/Dsp/synchctrl/pagch.c
new file mode 100644
index 0000000..f9ad43c
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/pagch.c
@@ -0,0 +1,583 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/******************************************************************
+* file name: pagch.c
+*
+* Description: The file contains Paging Access Grant channel
+* process routings and RACH processing routine
+*
+******************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "dsprotyp.h"
+#include "intr.h"
+
+/************************************************************
+* Function Prototype:
+* dlPagchProc0(Uint8 rfCh, Uint8 timeSlot)
+*
+*
+* Description: Process downlink PAGCH burst 0
+*
+* Cautions: rfCh is '0' for current situation
+* timeSlot must be from 0 to 7
+*
+* Outputs: embedded in channel structure
+*
+* Output: N/A
+*
+************************************************************/
+void dlPagchProc0(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_DLPPCHBufs *pagMsg;
+ t_TNInfo *ts;
+ Uint8 t1_prime, t2, t3, del_total, delay_offset;
+ Uint32 FN_start_time;
+ msgStruc respMsg;
+ Uint8 PPCHBuffIdx;
+ Uint8 usedBufs;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_5:
+
+ /*
+ * must search the PPCH buffers to find which index matches the paging number.
+ */
+ PPCHBuffIdx = getPPCHBuff(rfCh, timeSlot);
+ pagMsg = &g_dlSigBufsPPCH[rfCh][PPCHBuffIdx];
+
+ /*
+ * check if there is message to send
+ * do channel encode only if there is a valid Paging or
+ * Access Grant message, other build a dummy burst
+ */
+
+ /*
+ * Send Access Grant message first, then Paging message.
+ */
+ if( !pagMsg->valid && (pagMsg->msgReady) )
+ {
+ pagMsg->valid = 1;
+ }
+
+ if(pagMsg->valid)
+ {
+ /*
+ * Send AG Message 1st only if one or less Paging Message in the queue
+ */
+ if(pagMsg->msgReady && (pagMsg->logCh == AGCH) )
+ {
+ /*
+ * Look for IMMEDIATE ASSIGNMENT message types in TBF mode, as we need to
+ * modify starting time IE (04.08) from zeroes (default) to:
+ *
+ * FN_start_time = (51x((t3-t2) mod 26) + t3 + 51x25xt1') + delta, where
+ *
+ * t1' = (FN % 1326) mod 32
+ * t2 = FN % 26
+ * t3 = FN % 51
+ * delta = 3, number or radio blocks.
+ */
+ if(((pagMsg->data[3] & 0x10) >> 4) == 1) {
+ /*
+ * TBF mode
+ */
+
+ del_total = 0;
+ delay_offset = 13; // 26 frames (6 blocks) in initial testing; need at least 3 for RRB case
+
+ if ( (sysFrameNum.t2 == 0) || (sysFrameNum.t2 == 5) ||
+ (sysFrameNum.t2 == 9) || (sysFrameNum.t2 == 13) ||
+ (sysFrameNum.t2 == 18) || (sysFrameNum.t2 == 22) ) {
+ del_total = 8+delay_offset;
+ }
+ else if ( (sysFrameNum.t2 == 4) || (sysFrameNum.t2 == 8) ||
+ (sysFrameNum.t2 == 12) || (sysFrameNum.t2 == 17) ||
+ (sysFrameNum.t2 == 21) || (sysFrameNum.t2 == 25) ) {
+ del_total = 9+delay_offset;
+ }
+ else if ( (sysFrameNum.t2 == 3) || (sysFrameNum.t2 == 7) ||
+ (sysFrameNum.t2 == 11) || (sysFrameNum.t2 == 16) ||
+ (sysFrameNum.t2 == 20) || (sysFrameNum.t2 == 24) ) {
+ del_total = 10+delay_offset;
+ }
+ else if ( (sysFrameNum.t2 == 2) || (sysFrameNum.t2 == 6) ||
+ (sysFrameNum.t2 == 10) || (sysFrameNum.t2 == 15) ||
+ (sysFrameNum.t2 == 19) || (sysFrameNum.t2 == 23) ) {
+ del_total = 11+delay_offset;
+ }
+ else if ( (sysFrameNum.t2 == 1) || (sysFrameNum.t2 == 14) ) {
+ del_total = 12+delay_offset;
+ }
+ FN_start_time = sysFrameNum.FN + del_total;
+
+ /* The starting frame is coded as T1', T2, and T3 as defined in 04.08 section
+ * 10.5.2.38. It occupies 16 consecutive bits with T1' (5 bits) followed by T3
+ * (6 bits) followed by T2 (5 bits). In the IMMEDIATE ASSIGNMENT it starts at
+ * bit 14 of the 15th byte and continues for the next 16 bits (i.e. byte 15 =
+ * xttttttt, byte 16 = tttttttt, byte 17 = txxxxxxx where t=starting time bits
+ * and x=bits that you must not modify).
+ */
+ t1_prime = (FN_start_time / 1326) % 32;
+ t2 = FN_start_time % 26;
+ t3 = FN_start_time % 51;
+
+ if(((pagMsg->data[12] & 0xC0) >> 6) == 3) {
+ /*
+ * IA Rest Octets; first octet
+ */
+ if(((pagMsg->data[12] & 0x30) >> 4) == 0) {
+ /*
+ * Packet Uplink Assignment (usually a Single Block Assignment for control channel);
+ * Send Alerting to the higher GPRS layers in the Host.
+ */
+
+ pagMsg->data[14] |= ( (t1_prime << 2) | ((t3 & 0x30) >> 4) );
+ pagMsg->data[15] |= ( ((t3 & 0x0f) << 4) | ((t2 & 0x1e) >> 1) );
+ pagMsg->data[16] |= ((t2 & 0x01) << 7 );
+
+ respMsg.msgSize = 11;
+ respMsg.function = PDCH_MANAGE_MSG;
+ respMsg.typeHiByte = PDCH_SINGLE_BLOCK_ASSIGN_ALERT >> 8;
+ respMsg.typeLoByte = PDCH_SINGLE_BLOCK_ASSIGN_ALERT;
+ /* respMsg.trx = rfCh; */
+
+ // send 3-bit TN
+ respMsg.params[0] = pagMsg->data[4] & 0x07;
+
+ // send 32-bit calculated FN
+ respMsg.params[1] = FN_start_time >> 24;
+ respMsg.params[2] = FN_start_time >> 16;
+ respMsg.params[3] = FN_start_time >> 8;
+ respMsg.params[4] = FN_start_time;
+
+ // send 10-bit ARFCN
+ respMsg.params[5] = pagMsg->data[5] & 0x03;
+ respMsg.params[6] = pagMsg->data[6];
+
+ SendMsgHost_Que(&respMsg);
+ }
+
+ else {
+ /*
+ * Packet Downlink Assignment
+ */
+ pagMsg->data[19] |= (t1_prime >> 2);
+ pagMsg->data[20] |= ( (t1_prime << 6) | t3 );
+ pagMsg->data[21] |= (t2 << 3 );
+
+ respMsg.msgSize = 12;
+ respMsg.function = PDCH_MANAGE_MSG;
+ respMsg.typeHiByte = PDCH_DL_ASSIGN_ALERT >> 8;
+ respMsg.typeLoByte = PDCH_DL_ASSIGN_ALERT;
+ /* respMsg.trx = rfCh; */
+
+ // send 3-bit TN
+ respMsg.params[0] = pagMsg->data[4] & 0x07;
+
+ // send 32-bit calculated FN
+ respMsg.params[1] = FN_start_time >> 24;
+ respMsg.params[2] = FN_start_time >> 16;
+ respMsg.params[3] = FN_start_time >> 8;
+ respMsg.params[4] = FN_start_time;
+
+ // send 10-bit ARFCN
+ respMsg.params[5] = pagMsg->data[5] & 0x03;
+ respMsg.params[6] = pagMsg->data[6];
+
+ // send 8-bit Tag is stored by Host in the first byte of the Reference Request IE.
+ respMsg.params[7] = pagMsg->data[7];
+
+ SendMsgHost_Que(&respMsg);
+
+ } // UL/DL Assignment
+ } // IA Rest Octets
+ } // TBF/Dedicated Mode
+
+ /*
+ * A message is pending and is ready for transmission. Load the message
+ * into the Channel CODEC input buffer
+ */
+ unpackFromByteBuffer( &g_dlSigBufsPPCH[0][PPCHBuffIdx].data[0],
+ (UChar *)&g_DLCCHData.data[0],
+ NUM_BITS_CCH_FRAME);
+
+ pagMsg->msgReady = 0;
+ pagMsg->logCh = NULL; /* serves similar function to the former pageRepeats[] array */
+ usedBufs = availablePPCHBuff(rfCh, timeSlot);
+
+ g_DLCCHData.bufferValid = TRUE;
+
+ rtsCheck(rfCh, timeSlot, AGCH, 28, (NUM_PPCH_SUBCHANS - usedBufs) );
+ }
+ else
+ {
+ /*
+ * Send a Paging Message
+ */
+ processPCCCHBuff(pagMsg);
+
+ pagMsg->logCh = NULL; /* serves similart function to the former pageRepeats[] array */
+ usedBufs = availablePPCHBuff(rfCh, timeSlot);
+ /*
+ * inform L3 that DSP has room for new paging message
+ */
+ rtsCheck(rfCh, timeSlot, PCH, ts->u.group5.dlPpchSubCh, (NUM_PPCH_SUBCHANS - usedBufs) );
+ }
+
+ if(pagMsg->logCh == NULL)
+ {
+ pagMsg->valid = 0;
+ }
+ }
+
+ else
+ {
+ unpackFromByteBuffer(bcchFiller,
+ (UChar *)&g_DLCCHData.data[0],
+ NUM_BITS_CCH_FRAME);
+
+ g_DLCCHData.bufferValid = TRUE;
+ }
+
+ if(++ts->u.group5.dlPpchSubCh >= g_BBInfo[rfCh].BSPaMfrms*PAGE_BLOCKS_G5) ts->u.group5.dlPpchSubCh = 0;
+
+ /*
+ PAGING RTS will be installed later
+ if(ts->u.group5.pagch.state[ts->u.group5.dlSdcchSubCh] == CHAN_ACTIVE)
+ rtsCheck(rfCh, timeSlot, PCH, ts->u.group5.dlPagchSubCh);
+ */
+
+ break;
+
+ case GSM_GROUP_4:
+ break;
+
+ case GSM_GROUP_11:
+ break;
+
+ case GSM_GROUP_12:
+ break;
+
+ default:
+ break;
+ }
+
+ chanEncoder(PAGCH, 1, timeSlot,0);
+ buildGSMBurst(PAGCH, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, PAGCH);
+}
+
+/************************************************************
+* Function Prototype:
+* dlPagchProc1(Uint8 rfCh, Uint8 timeSlot)
+*
+* Description: Process downlink PAGCH burst 0
+*
+* Cautions: rfCh is '0' for current situation
+* timeSlot must be from 0 to 7
+*
+* Outputs: embedded in channel structure
+*
+* Output: N/A
+*
+************************************************************/
+void dlPagchProc1(Uint8 rfCh, Uint8 timeSlot)
+{
+
+ t_DLSigBufs *pagMsg;
+ t_TNInfo *ts;
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ chanEncoder(PAGCH, 0, timeSlot,0);
+ buildGSMBurst(PAGCH, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, PAGCH);
+}
+
+/************************************************************
+* Function Prototype:
+* dlPagchProc2(Uint8 rfCh, Uint8 timeSlot)
+*
+* Description: Process downlink PAGCH burst 0
+*
+* Cautions: rfCh is '0' for current situation
+* timeSlot must be from 0 to 7
+*
+* Outputs: embedded in channel structure
+*
+* Output: N/A
+*
+************************************************************/
+void dlPagchProc2(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_DLSigBufs *pagMsg;
+ t_TNInfo *ts;
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ chanEncoder(PAGCH, 0, timeSlot,0);
+ buildGSMBurst(PAGCH, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, PAGCH);
+}
+
+/************************************************************
+* Function Prototype:
+* dlPagchProc3(Uint8 rfCh, Uint8 timeSlot)
+*
+* Description: Process downlink PAGCH burst 0
+*
+* Cautions: rfCh is '0' for current situation
+* timeSlot must be from 0 to 7
+*
+* Outputs: embedded in channel structure
+*
+* Output: N/A
+*
+************************************************************/
+void dlPagchProc3(Uint8 rfCh, Uint8 timeSlot)
+{
+ chanEncoder(PAGCH, 0, timeSlot,0);
+ buildGSMBurst(PAGCH, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, PAGCH);
+}
+
+/************************************************************
+* Function Prototype:
+* dlPagchProc3(Uint8 rfCh, Uint8 timeSlot)
+*
+* Description: Process downlink PAGCH burst 0
+*
+* Cautions: rfCh is '0' for current situation
+* timeSlot must be from 0 to 7
+*
+* Outputs: embedded in channel structure
+*
+* Output: N/A
+*
+************************************************************/
+void ulRachProc(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ t_chanSel decodeMsg;
+
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ /*
+ * Input samples offset by -1 to get a head room for case TOA becomes marginal to -1
+ */
+ demodulate( g_BBInfo[rfCh].ulBBSmpl-1,
+ RACH,
+ g_BBInfo[rfCh].tseqNum,
+ &g_ULBurstData,
+ ts->groupNum,
+ rfCh,
+ timeSlot,
+ 0 );
+ /*
+ * Correct effect of sample offset, but not less than zero
+ */
+ if ( g_ULBurstData.toa > 0 )
+ {
+ g_ULBurstData.toa -= 1;
+ }
+
+ /*
+ * channel decoding(Viterbi + CRC)
+ */
+ switch (ts->groupNum){
+ case GSM_GROUP_13:
+ case GSM_GROUP_11:
+ if (g_PrachBits == 11){
+ decodeMsg = PRACH;
+ } else {
+ decodeMsg = RACH;
+ }
+ break;
+ default:
+ decodeMsg = RACH;
+ break;
+ }
+
+ chanDecoder(decodeMsg, 1, timeSlot);
+ ulSyncMsgProcess(RACH, 0, timeSlot, rfCh);
+
+}
+
+/************************************************************
+* Function Prototype:
+* putPPCHBuff(Uint8 rfCh, Uint8 timeSlot)
+*
+*
+* Description: put paging group into PCCH global buffer for (P)CCCH resources.
+*
+* Cautions: rfCh is '0' for current situation
+* timeSlot must be from 0 to 7
+*
+* Outputs: overflow or assignment to a PPCH buffer index.
+*
+************************************************************/
+void putPPCHBuff(Uint8 rfCh, Uint8 timeslot, Uint8 ccch, Uint8 msgDiscrim, msgStruc *p_msg)
+{
+ Uint8 i, temp[5];
+ t_TNInfo *ts;
+ t_DLPPCHBufs *p_dlSigBuf;
+ Uint8 *wrPtr, *rdPtr;
+
+ /*
+ * find right time slot Info to be configured
+ */
+ ts = & g_BBInfo[rfCh].TNInfo[timeslot];
+
+ /* brute force linear search into PCH/PPCH for now since it is less than 64 entries */
+ for (i=0; i<NUM_PPCH_SUBCHANS; i++)
+ {
+ p_dlSigBuf = &g_dlSigBufsPPCH[0][i];
+
+ if ( p_dlSigBuf->logCh == NULL )
+ {
+ p_dlSigBuf->timeslot = timeslot;
+
+ if (msgDiscrim == RR_MANAGE_MSG)
+ {
+ if(ccch < NUM_PAGCH_SUBCHANS)
+ {
+ p_dlSigBuf->logCh = PCH;
+ p_dlSigBuf->pageNum = ccch;
+ }
+ else if(ccch == (NUM_PAGCH_SUBCHANS+1))
+ {
+ /*
+ * AGCH message put into same queue now
+ *
+ */
+ p_dlSigBuf->logCh = AGCH;
+ p_dlSigBuf->pageNum = ccch;
+ }
+ }
+
+ else if (msgDiscrim == PDCH_MANAGE_MSG) /* for GROUP_11, GROUP_12, PPCH and PPAGCH */
+ {
+
+ }
+
+ /*
+ * Copy data to global paging buffer; Reserve 2 bytes L1 Header for SACCH
+ */
+ wrPtr = & (p_dlSigBuf->data[0]);
+ rdPtr = &p_msg->params[3];
+
+ INTR_DISABLE(CPU_INT8);
+ for(i=0; i<DL_SIG_MSG_SIZE; i++) wrPtr[i] = rdPtr[i];
+ INTR_ENABLE(CPU_INT8);
+
+ p_dlSigBuf = &g_dlSigBufsPPCH[0][i];
+
+ return;
+ }
+ }
+
+ /* if you reach this point, the buffer is full */
+ ts->u.group5.ppchOverflow = 1;
+
+ p_dlSigBuf = &g_dlSigBufsPPCH[0][NUM_PPCH_SUBCHANS-1];
+ temp[0] = p_dlSigBuf->timeslot;
+ temp[1] = p_dlSigBuf->logCh;
+ temp[2] = p_dlSigBuf->pageNum;
+ sendDiagMsg(PPCH_BUF_OVERFLOW, rfCh, timeslot, 3, &temp);
+}
+
+
+
+/************************************************************
+* Function Name:
+* getPPCHBuff
+*
+*
+* Description: get location of one paging buffer for (P)CCCH resources.
+*
+* Cautions: rfCh is '0' for current situation
+* timeSlot must be from 0 to 7
+*
+* Outputs: NULL or a PPCH buffer index.
+*
+************************************************************/
+Uint8 getPPCHBuff(Uint8 rfCh, Uint8 timeSlot)
+{
+ Uint8 i, temp[5];
+ t_TNInfo *ts;
+ t_DLPPCHBufs *p_dlSigBuf;
+
+ /*
+ * find right time slot Info to be configured
+ */
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ /* brute force linear search into PCH/PPCH for now since it is less than 64 entries */
+ for (i=0; i<NUM_PPCH_SUBCHANS; i++)
+ {
+ p_dlSigBuf = &g_dlSigBufsPPCH[rfCh][i];
+
+ if ((p_dlSigBuf->logCh == PCH) && (timeSlot == p_dlSigBuf->timeslot))
+ {
+ if ( ts->u.group5.dlPpchSubCh == p_dlSigBuf->pageNum)
+ {
+ /* DEBUG!!
+ //temp[0] = i;
+ //temp[1] = p_dlSigBuf->timeslot;
+ //temp[2] = p_dlSigBuf->logCh;
+ //temp[3] = p_dlSigBuf->pageNum;
+ //temp[4] = ts->u.group5.dlPpchSubCh;
+ //sendDiagMsg(0x9d, rfCh, timeSlot, 5, &temp);
+ */
+
+ p_dlSigBuf->msgReady++;
+ return (i);
+ }
+ }
+
+ else if ((p_dlSigBuf->logCh == AGCH) && (timeSlot == p_dlSigBuf->timeslot))
+ {
+ p_dlSigBuf->msgReady++;
+ return (i);
+ }
+ }
+}
+
+/************************************************************
+* Function Name:
+* availablePPCHBuff
+*
+*
+* Description: find remaining number of open paging buffers for (P)CCCH resources.
+*
+* Cautions: rfCh is '0' for current situation
+* timeSlot must be from 0 to 7
+*
+* Outputs: NULL or a PPCH buffer index.
+*
+************************************************************/
+Uint8 availablePPCHBuff(Uint8 rfCh, Uint8 timeSlot)
+{
+
+ Uint8 i, usedBufs;
+ t_TNInfo *ts;
+ t_DLPPCHBufs *p_dlSigBuf;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ /* brute force linear search into PCH/PPCH for now since it is less than 64 entries */
+ for (i=0; i<NUM_PPCH_SUBCHANS; i++)
+ {
+ p_dlSigBuf = &g_dlSigBufsPPCH[0][i];
+
+ if (p_dlSigBuf->logCh != NULL ) usedBufs++;
+ }
+
+ return(usedBufs);
+}
diff --git a/data/mnet/GP10/Dsp/synchctrl/pbcch.c b/data/mnet/GP10/Dsp/synchctrl/pbcch.c
new file mode 100644
index 0000000..8e3f287
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/pbcch.c
@@ -0,0 +1,384 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* File: pbcch.c
+*
+* Description: Subroutines to Process downlink PBCCH Messages
+* in 4 bursts and CCCH process
+*
+*****************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "dsprotyp.h"
+
+
+
+void UpdateGroupXITableUL(Uint8 rfCh, Uint8 timeSlot);
+void UpdateGroupXITableDL(Uint8 rfCh, Uint8 timeSlot);
+
+
+
+/**********************************************************
+ * Routine: void dlBcchProc0(Uint8 rfCh, Uint8 timeSlot)
+ *
+ * Description:
+ * Synchronousely process 1st of 4 PBCCH bursts,
+ * Channel encode is required
+ *
+ * History: Change Mapping from GSM 05.02-820 Pagaraph
+ *
+ ***********************************************************/
+
+
+
+/* PBCCH is used to send the PSI messages in for Group 11
+
+ PSI1 is a mandatory message that must be sent:
+ - must be sent with TC = 0
+ TC = (FN div 52) mod PSI1_REPEAT
+
+ - Make the assumption that PSI1_REPEAT is equal to
+ at least 7 (1,2,3,3bis,4,5, 13).
+
+
+ Other mandatory messages that are sent 2, 3, and 3bis
+
+
+ The assumption is that the number of instances of each
+ message is equal 1
+ - the spec allows for more but this number is fixed
+ for ease of implementation.
+
+ Assume that PSI_COUNT_HR = 0 - can't find how to define
+ which PSI are high repitition messages
+
+
+
+*/
+void dlPbcchProc0(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_sysInfoQueue *pBcchInfo;
+ t_TNInfo *ts;
+
+
+ /* get pointer to the timeslot */
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+
+
+
+ /* See whether it is time to send PSI 1 */
+
+ if ((sysFrameNum.FN % (g11Params.psi1_cycle)) == 0){
+ if ((g11Params.newAssignment == TRUE) && \
+ (ts->u.group11.dlBlock ==0)){
+ UpdateGroupXITableDL(rfCh, timeSlot);
+ ulGroupXITableInit();
+ UpdateGroupXITableUL(rfCh, timeSlot);
+ g11Params.newAssignment = FALSE; // assignment complete
+ }
+
+ ts->u.group11.pbcchBufIndex = PACKET_TYPE_1;
+ }
+
+
+ /* Point to the correct PSI buffer */
+
+ pBcchInfo = ts->u.group11.pbcch.dlSigBuf + ts->u.group11.pbcchBufIndex ;
+
+
+ /* See if this a valid message to send */
+
+
+
+ while (( pBcchInfo->valid == 0 ) && (ts->u.group11.pbcchBufIndex != PACKET_TYPE_1)){
+
+
+ ++pBcchInfo;
+
+ if (++ts->u.group11.pbcchBufIndex >= NUM_SYSINFO_BUFS){
+ ts->u.group11.pbcchBufIndex = PACKET_TYPE_1;
+ pBcchInfo = ts->u.group11.pbcch.dlSigBuf + PACKET_TYPE_1;
+ }
+
+ }
+
+ /* Modify the USF value with the previous blocks USF value */
+
+ pBcchInfo->data[0][0] |= (ts->u.group11.currentUsf &0x7);
+
+
+
+ unpackFromByteBuffer(&pBcchInfo->data[0][0],
+ (UChar *)&g_DLCCHData.data[0],
+ NUM_BITS_CCH_FRAME);
+
+
+ g_DLCCHData.bufferValid = TRUE;
+
+ chanEncoder(BCCH, 1, timeSlot,0);
+ buildGSMBurst(BCCH, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, BCCH);
+
+}
+
+
+
+void dlPpchProc0(Uint8 rfCh, Uint8 timeSlot)
+{ return; }
+
+void dlPpchProc1(Uint8 rfCh, Uint8 timeSlot)
+{return;}
+void dlPpchProc2(Uint8 rfCh, Uint8 timeSlot)
+{return;}
+void dlPpchProc3(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+
+
+ /* get pointer to the timeslot */
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ if (++ts->u.group11.dlBlock >= MAX_RADIO_BLOCKS){
+ ts->u.group11.dlBlock = 0;
+ }
+
+ return;}
+
+
+
+
+
+
+
+Uint8 RadioBlkPos[12] = {0,4,8,13,17,21,26,30,34,39,43,47};
+Uint8 OrderedBlks[12] = {0,6,3,9,1,7,4,10,2,8,5,11};
+
+
+void UpdateGroupXITableDL(Uint8 rfCh, Uint8 timeSlot){
+
+ Uint8 index;
+ Uint8 offset;
+ t_TNInfo *ts;
+ Uint8 frameNum;
+ Uint8 val;
+ Uint8 numPaging;
+
+
+
+ /* get the struture for the timeslot */
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ /* Determine which frames are PBCCH frames */
+
+ for ( index = 0; index < g11Params.bsPBcchBlks; index++){
+
+ frameNum = RadioBlkPos[OrderedBlks[index]];
+ G11_dlRadioBlkType[OrderedBlks[index]] = D_PBCCH_T;
+
+
+ for (offset = 0 ; offset < 4; offset++){
+ ts->groupDLTable[offset+frameNum] = (UINT32) dlPbcchTable[offset];
+ }
+ }
+
+ /* Determine the PPCH channels */
+
+ numPaging = MAX_GPRS_PAGING +1 - g11Params.bsPBcchBlks;
+ numPaging -= g11Params.bsPagBlksRes;
+
+
+ /* Max sure of the limits */
+
+ if (numPaging >MAX_GPRS_PAGING)
+ numPaging = MAX_GPRS_PAGING;
+
+ if (numPaging <0) numPaging = 0;
+
+ /* Update the scheduling table */
+
+ if (numPaging > 0){
+ for (index = 0; index < numPaging; index++){
+ val = MAX_GPRS_PAGING - index;
+ frameNum = RadioBlkPos[OrderedBlks[val]];
+ G11_dlRadioBlkType[OrderedBlks[val]] = D_PPCH_T;
+ for (offset = 0 ; offset < 4; offset++){
+ ts->groupDLTable[offset+frameNum] = (UINT32) dlPpchTable[offset];
+ }
+ }
+ }
+}
+
+
+
+void UpdateGroupXITableUL(Uint8 rfCh, Uint8 timeSlot){
+/* Determine the position of the PRACH */
+
+
+ Uint8 index;
+ Uint8 offset;
+ t_TNInfo *ts;
+ Uint8 frameNum;
+ Uint8 val,i;
+
+
+ /* get the struture for the timeslot */
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+
+ /* Initialize the group 11 radio block defs */
+
+ for ( i = 0; i < MAX_RADIO_BLOCKS; i++){
+ G11_ulRadioBlkType[i] = U_PDCH_T;
+ }
+
+ /* Set up the blocks for PRACH */
+
+
+ for (index = 0; index < g11Params.bsPrachBlks; index++){
+ frameNum = RadioBlkPos[OrderedBlks[index]];
+ G11_ulRadioBlkType[OrderedBlks[index]] = U_PRACH_T;
+
+ for (offset = 0 ; offset < 3; offset++){
+
+ ts->groupULTable[offset+frameNum] = (Uint32) ulPrachProc0;
+ }
+ ts->groupULTable[frameNum+3] = (Uint32) ulPrachProc3;
+
+ }
+}
+
+
+
+void ulPrachProc0(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ t_chanSel syncMsg, decodeMsg;
+
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ /*
+ * Input samples offset by -1 to get a head room for case TOA becomes marginal to -1
+ */
+ demodulate( g_BBInfo[rfCh].ulBBSmpl-1,
+ RACH,
+ g_BBInfo[rfCh].tseqNum,
+ &g_ULBurstData,
+ ts->groupNum,
+ rfCh,
+ timeSlot,
+ 0 );
+ /*
+ * Correct effect of sample offset, but not less than zero
+ */
+ if ( g_ULBurstData.toa > 0 )
+ {
+ g_ULBurstData.toa -= 1;
+ }
+
+ /*
+ * channel decoding(Viterbi + CRC)
+ */
+ switch (ts->groupNum){
+ case GSM_GROUP_13:
+ case GSM_GROUP_11:
+ if (g_PrachBits == 11){
+ syncMsg = PRACH;
+ decodeMsg = PRACH;
+ } else {
+ syncMsg = PRACH;
+ decodeMsg = RACH;
+ }
+
+ break;
+ default:
+ syncMsg = RACH;
+ decodeMsg = RACH;
+ break;
+ }
+
+ chanDecoder(decodeMsg, 1, timeSlot);
+ ulSyncMsgProcess(syncMsg, 0, timeSlot, rfCh);
+
+
+
+}
+
+
+void ulPrachProc3(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ t_chanSel syncMsg, decodeMsg;
+
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ /*
+ * Input samples offset by -1 to get a head room for case TOA becomes marginal to -1
+ */
+ demodulate( g_BBInfo[rfCh].ulBBSmpl-1,
+ RACH,
+ g_BBInfo[rfCh].tseqNum,
+ &g_ULBurstData,
+ ts->groupNum,
+ rfCh,
+ timeSlot,
+ 0 );
+ /*
+ * Correct effect of sample offset, but not less than zero
+ */
+ if ( g_ULBurstData.toa > 0 )
+ {
+ g_ULBurstData.toa -= 1;
+ }
+
+ /*
+ * channel decoding(Viterbi + CRC)
+ */
+ switch (ts->groupNum){
+ case GSM_GROUP_13:
+ case GSM_GROUP_11:
+ if (g_PrachBits == 11){
+ syncMsg = PRACH;
+ decodeMsg = PRACH;
+ } else {
+ syncMsg = PRACH;
+ decodeMsg = RACH;
+ }
+
+ break;
+ default:
+ syncMsg = RACH;
+ decodeMsg = RACH;
+ break;
+ }
+
+ chanDecoder(decodeMsg, 1, timeSlot);
+ ulSyncMsgProcess(syncMsg, 0, timeSlot, rfCh);
+
+
+ if (++ts->u.group11.ulBlock >= MAX_RADIO_BLOCKS){
+ ts->u.group11.ulBlock = 0;
+ }
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/pdch.c b/data/mnet/GP10/Dsp/synchctrl/pdch.c
new file mode 100644
index 0000000..afe082a
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/pdch.c
@@ -0,0 +1,1623 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: pdch.c
+*
+* Description:
+* This file contains functions that process GPRS frames.
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "rrmsg.h"
+#include "dsprotyp.h"
+#include "agcdata.h"
+#include "diagdata.h"
+
+Uint32 pdchReceived = 0;
+
+Uint8 dlPacketDummyFrame[23] = { 0x40, 0x94, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B,
+ 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B};
+
+
+/*****************************************************************************
+*
+* Function: ulChan2TbfMap
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+tbfStruct * ulChan2TbfMap(Uint8 rfCh, Uint8 timeSlot)
+{
+ Uint16 i;
+ tbfStruct *tbf;
+ t_TNInfo *ts;
+ Uint8 currentUSF;
+ Uint8 offSetFN;
+ t_tagFillCause fillCause;
+ tbfStruct *tbfVal;
+
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+
+ switch (ts->groupNum){
+
+
+ case GSM_GROUP_11:
+ {
+ currentUSF = ts->u.group11.currentUsf;
+ fillCause = ts->u.group11.blkNumWatch[ts->u.group11.ulBlock].tagFillCause;
+ tbfVal = ts->u.group11.blkNumWatch[ts->u.group11.ulBlock].tbf;
+
+ break;
+ }
+
+
+
+ case GSM_GROUP_13:
+ {
+ currentUSF = ts->u.group13.currentUsf;
+ /*
+ * Check watch table to see whether this uplink RLC block is reserved for
+ * single blk assignment, DL assignment response or relative reserved blk
+ */
+
+ fillCause = ts->u.group13.blkNumWatch[ts->u.group13.ulBlock].tagFillCause;
+ tbfVal = ts->u.group13.blkNumWatch[ts->u.group13.ulBlock].tbf;
+
+ break;
+ }
+
+ default:
+ {
+ return(NULL);
+ break;
+ }
+ }
+
+
+
+
+
+
+
+ if ( fillCause == SBA || fillCause == DLA )
+ {
+ return(NULL);
+ }
+ else if ( fillCause == RRB_AB || fillCause == RRB_NB )
+ {
+ return(tbfVal);
+ }
+
+ /*
+ * If this block has not been reserved, then search all TBFs to find a match
+ */
+ for(i=0; i<TBF_NUMBER_MAX; i++)
+ {
+ tbf = & g_tbfInfo[rfCh][i];
+ /*
+ * check TBF State, Time Slot, USF on the TimeSlot to find out right TBF
+ */
+ if( tbf->ulTbf.state == CHAN_ACTIVE &&
+ (((tbf->ulTbf.timeSlotAllocation) >> timeSlot) & 0x01) )
+ {
+ if(g_loopBackMode == LOCAL_LOOPBACK)
+ return(tbf);
+ else
+ {
+ /*
+ * For now, handle dynamic mode only
+ */
+
+ if( tbf->ulTbf.tbfMode == TBF_DYNAMIC &&
+ ((tbf->ulTbf.opMode.dynamic.usfTsMap >> (timeSlot<<2)) & 0x07) == currentUSF )
+ {
+ return(tbf);
+ }
+ }
+ }
+
+ }
+ return(NULL);
+}
+
+/*****************************************************************************
+*
+* Function: dlChan2TbfMap
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+tbfStruct * dlChan2TbfMap(Uint8 rfCh, Uint8 timeSlot, Uint8 TFI, Uint8 dir)
+{
+ Uint16 i;
+ tbfStruct *tbf;
+
+ /*
+ * search all TBFs to find a match
+ */
+ for(i=0; i<TBF_NUMBER_MAX; i++)
+ {
+ tbf = & g_tbfInfo[rfCh][i];
+
+ /*
+ * check TBF State, Time Slot Allocation, and TFI on the TimeSlot to find out right TBF
+ * If dir==0, the input TFI is an uplink TFI. If dir==1, it's a downlink TFI.
+ */
+ if( tbf->dlTbf.state == CHAN_ACTIVE &&
+ (((tbf->dlTbf.timeSlotAllocation) >> timeSlot) & 0x01) )
+ {
+ if(g_loopBackMode == LOCAL_LOOPBACK)
+ return(tbf);
+ else
+ {
+ if( (dir==0 && tbf->ulTbf.tfi==TFI) || (dir==1 && tbf->dlTbf.tfi==TFI) )
+ {
+ /***** >>>> temporary diag
+ Uint8 tempBuf[20];
+ tempBuf[0] = rfCh;
+ tempBuf[1] = timeSlot;
+ tempBuf[2] = TFI;
+ tempBuf[3] = dir;
+ tempBuf[4] = (Uint16)tbf >> 8;
+ tempBuf[5] = (Uint16)tbf & 0xff;
+ tempBuf[6] = (tbf->TLLI >> 24) & 0xff;
+ tempBuf[7] = (tbf->TLLI >> 16) & 0xff;
+ tempBuf[8] = (tbf->TLLI >> 8) & 0xff;
+ tempBuf[9] = (tbf->TLLI ) & 0xff;
+ tempBuf[10] = tbf->ulTbf.state;
+ tempBuf[11] = tbf->dlTbf.state;
+ tempBuf[12] = tbf->ulTbf.tfi;
+ tempBuf[13] = tbf->dlTbf.tfi;
+ tempBuf[14] = tbf->ulTbf.timeSlotAllocation;
+ tempBuf[15] = tbf->dlTbf.timeSlotAllocation;
+ sendDiagMsg(37, rfCh, timeSlot, 16, tempBuf);
+ */
+
+ return(tbf);
+ }
+ }
+ }
+
+ }
+ return(NULL);
+}
+
+/*****************************************************************************
+*
+* Function: ulPdchProc0
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void ulPdchProc0(Uint8 rfCh, Uint8 timeSlot)
+{
+ tbfStruct *TBF;
+ t_TNInfo *ts;
+ Uint8 currentUSF;
+ Uint8 subChan = 0;
+ t_tagFillCause fillCause;
+
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ /*
+ * Search for 4 consecutive access bursts and send an acknowledgement to the Host.
+ * The acknowledgement can be for PACCH (ack or unack mode) or PDTCH (unack mode only).
+ */
+
+ if (ts->groupNum == GSM_GROUP_13){
+ fillCause = ts->u.group13.blkNumWatch[ts->u.group13.ulBlock].tagFillCause ;
+ } else {
+
+ fillCause = ts->u.group11.blkNumWatch[ts->u.group11.ulBlock].tagFillCause;
+ if ( ts->u.group11.currentUsf == USF_FREE){
+ ulPrachProc0(rfCh, timeSlot);
+ return;
+ }
+
+
+ }
+
+
+
+ if((fillCause == RRB_AB) ||(fillCause == DLA))
+ {
+ ulRachProc(rfCh, timeSlot);
+ }
+
+ else if (fillCause == GRP13_AB_FOUND)
+ {
+ return;
+ }
+
+ else /* process as a normal burst */
+ {
+
+ if( !(TBF = ulChan2TbfMap(rfCh, timeSlot)) )
+ {
+ g_ULCCHData.chCodec = GPRS_CS_1;
+ }
+ else
+ {
+ g_ULCCHData.chCodec = TBF->ulTbf.channelCodec;
+ }
+
+ DCOffset( g_BBInfo[rfCh].ulBBSmpl, ts->groupNum, rfCh, timeSlot );
+
+ demodulate( g_BBInfo[rfCh].ulBBSmpl,
+ PDCH,
+ g_BBInfo[rfCh].tseqNum,
+ &g_ULBurstData,
+ ts->groupNum,
+ rfCh,
+ timeSlot,
+ subChan );
+
+ chanDecoder(PDCH, 0, timeSlot);
+
+ if ( TBF != NULL )
+ {
+ accumPower(rfCh, timeSlot, ts->groupNum, PDCH, NULL, TBF);
+ accumToa (rfCh, timeSlot, ts->groupNum, 0, PDCH, TBF);
+ }
+ }
+}
+
+
+/*****************************************************************************
+*
+* Function: ulPdchProc3
+*
+* Description:
+* Processes uplink PDCH bursts for frame 3 of every 0-3 block
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void ulPdchProc3(Uint8 rfCh, Uint8 timeSlot)
+{
+ tbfStruct *TBF;
+ t_TNInfo *ts;
+ Uint8 currentUSF;
+ Uint8 subChan = 0;
+ t_SACCHInfo *sacchInfo;
+ t_ULSignalStrength *sigS;
+ t_blkNumWatch *fillBlk;
+ Uint8 *blkNum;
+ Uint8 tmp[3];
+
+
+
+
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ if (ts->groupNum == GSM_GROUP_13){
+ fillBlk = &ts->u.group13.blkNumWatch[ts->u.group13.ulBlock];
+ blkNum = &(ts->u.group13.ulBlock);
+ } else {
+ fillBlk = &ts->u.group11.blkNumWatch[ts->u.group11.ulBlock];
+ blkNum = &(ts->u.group11.ulBlock);
+ if ( ts->u.group11.currentUsf == USF_FREE){
+ ulPrachProc3(rfCh, timeSlot);
+ return;
+ }
+
+
+ }
+
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ /*
+ * Search for 4 consecutive access bursts and send an acknowledgement to the Host.
+ * The acknowledgement can be for PACCH (ack or unack mode) or PDTCH (unack mode only).
+ */
+ if((fillBlk->tagFillCause== RRB_AB) ||(fillBlk->tagFillCause== DLA))
+ {
+ fillBlk->tagFillCause = LAST_CHANCE_4_AB_DET;
+ ulRachProc(rfCh, timeSlot);
+
+ /* clear this block from the watch table */
+ fillBlk->tbf = NULL;
+ fillBlk->tagFillCause = NONE;
+ }
+
+ else if (fillBlk->tagFillCause == GRP13_AB_FOUND)
+ {
+ /* clear this block from the watch table */
+ fillBlk->tbf = NULL;
+ fillBlk->tagFillCause = NONE;
+ }
+
+ else /* process as a normal burst */
+ {
+
+ if( !(TBF = ulChan2TbfMap(rfCh, timeSlot)) )
+ {
+ g_ULCCHData.chCodec = GPRS_CS_1;
+ }
+ else
+ {
+ g_ULCCHData.chCodec = TBF->ulTbf.channelCodec;
+ }
+
+ DCOffset( g_BBInfo[rfCh].ulBBSmpl, ts->groupNum, rfCh, timeSlot );
+
+ demodulate( g_BBInfo[rfCh].ulBBSmpl,
+ PDCH,
+ g_BBInfo[rfCh].tseqNum,
+ &g_ULBurstData,
+ ts->groupNum,
+ rfCh,
+ timeSlot,
+ subChan );
+
+ /*
+ * frame boundary is 1
+ */
+ chanDecoder(PDCH, 1, timeSlot);
+
+ if(!g_ULCCHData.ulcchword0.bitval.fireStatus)
+ {
+ pdchReceived++;
+ }
+
+ /*
+ * Accumulate power, TOA, bit errors and RLC block errors into
+ * UL TBF accum structure
+ */
+ if ( TBF != NULL )
+ {
+ accumPower(rfCh, timeSlot, ts->groupNum, PDCH4, NULL, TBF);
+ accumToa (rfCh, timeSlot, ts->groupNum, 0, PDCH4, TBF);
+ accumBitBlockErrs(rfCh, timeSlot, PDCH4, TBF);
+
+ /*-----------------------------------------------------------
+ * Update AGC on final burst of RLC block
+ *----------------------------------------------------------*/
+ if(g_AGC_ON)
+ {
+ sigS = & TBF->ulTbf.sigstren;
+ sigS->rxPwrNormSmooth = ul_agc(sigS);
+ }
+ }
+
+ ulSyncMsgProcess(PDCH, subChan, timeSlot, rfCh);
+
+ /*-------------------------------------------------------------
+ * If we detect PDTCH (via g_rateChangeCheck), then check if code
+ * rate selection needs to be done. If so, notify RLC-MAC layer
+ *-------------------------------------------------------------*/
+ if ( TBF != NULL )
+ {
+ if((g_RATE_TRAN_ON) && (g_loopBackMode != LOCAL_LOOPBACK) && (g_rateChangeCheck))
+ rateTransition(rfCh, TBF);
+
+ }
+
+ /* clear this block from the watch table */
+ fillBlk->tbf = NULL;
+ fillBlk->tagFillCause = NONE;
+ }
+
+ /*
+ * updata GPRS Block Index
+ */
+ if(++(*blkNum) >= BLOCKS_PER_GPRS_MULTI_FRAMES) *blkNum = 0;
+
+
+
+
+}
+
+/*****************************************************************************
+*
+* Function: dlPdchProc0
+*
+* Description:
+* Processes downlink PDCH frames and burst 0
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dlPdchProc0(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ tbfStruct *TBF;
+ t_dlPdtchBufs *pdtchMsg;
+ t_DLSigBufs *pacchMsg;
+ Uint8 *payload;
+ Uint8 subChan = 0;
+ Bool msgReady = FALSE;
+ Bool incrementCount = FALSE;
+ Uint8 tempBuf[64], i;
+ Uint8 blockNumber;
+ Uint8 dir;
+ Uint8 tfi;
+ Uint8 chCodec, tag, ackBurstType;
+ Uint8 dlBlock;
+ t_blkNumWatch *fillBlk;
+
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ /*
+ * initialize Channel Codec with Default value CS_1
+ */
+ g_DLCCHData.chCodec = GPRS_CS_1;
+
+
+ /*
+ * PACCH message has higher priority
+ */
+
+
+ switch( ts->groupNum){
+ case GSM_GROUP_13:
+ pacchMsg = ts->u.group13.pacch.dlSigBuf;
+ pdtchMsg = ts->u.group13.pdtch.dlSigBuf;
+ dlBlock = ts->u.group13.dlBlock;
+
+ break;
+
+ case GSM_GROUP_11:
+ pacchMsg = ts->u.group11.pacch.dlSigBuf;
+ pdtchMsg = ts->u.group11.pdtch.dlSigBuf;
+ dlBlock = ts->u.group11.dlBlock;
+
+
+ break;
+
+ default:
+ break;
+ }
+
+
+
+
+
+ tag = pacchMsg->tag[pacchMsg->readIndex];
+ ackBurstType = pacchMsg->burstType[pacchMsg->readIndex];
+ payload = pacchMsg->data[pacchMsg->readIndex];
+
+ if ( pacchMsg->numMsgsReady )
+ {
+ /*
+ * Test to see if Packet Uplink Ack/Nack; "sniff" out its' coding rate to the ulTbf.channelCodec
+ */
+ if ( (payload[1]>>2) == 9)
+ {
+ if (TBF = ulChan2TbfMap(rfCh, timeSlot) )
+ {
+ TBF->ulTbf.channelCodec = payload[3]>>6;
+/**** >>> temporary diag w*/
+ tempBuf[0] = payload[1]>>2;
+ tempBuf[1] = payload[3]>>6;
+ tempBuf[2] = TBF->TLLI >> 24;
+ tempBuf[3] = TBF->TLLI >> 16;
+ tempBuf[4] = TBF->TLLI >> 8;
+ tempBuf[5] = TBF->TLLI;
+ sendDiagMsg(0x03, rfCh, timeSlot, 6, tempBuf);
+
+ }
+ }
+
+
+ /* If next Uplink Block is reserved, set the outgoing USF to the
+ * reserved (unused by MS) value so that no other MS will transmit
+ */
+ blockNumber = (dlBlock + 1) % BLOCKS_PER_GPRS_MULTI_FRAMES;
+
+ /*
+ * assert USF used, need to check if extra delay on uplink ????!!!!!
+ * for AGC and Power Control Purpose
+ */
+ switch (ts->groupNum) {
+ case GSM_GROUP_11:
+ ts->u.group11.currentUsf = ts->u.group11.nextUsf;
+ if ( ts->u.group11.blkNumWatch[blockNumber].tagFillCause != NONE ){
+ ts->u.group11.nextUsf = USF_RESERVED;
+ payload[0] &= 0xf8;
+ payload[0] |= USF_RESERVED;
+ }else{
+ ts->u.group11.nextUsf = payload[0] & 0x7;
+ }
+ break;
+ default:
+ ts->u.group13.currentUsf = ts->u.group13.nextUsf;
+ if ( ts->u.group13.blkNumWatch[blockNumber].tagFillCause != NONE ){
+ ts->u.group13.nextUsf = USF_RESERVED;
+ payload[0] &= 0xf8;
+ payload[0] |= USF_RESERVED;
+ }else{
+ ts->u.group13.nextUsf = payload[0] & 0x7;
+ }
+ break;
+ }
+
+
+
+ /*
+ * If this DL block schedules a Relative Reserved Block, S/P bit (4th) will be set
+ */
+ if ( (payload[0]>>3) & 0x01 ){
+ /*
+ * If the future block is not already reserved for SBA or DLA, then reserve it as RRB
+ */
+ blockNumber = (dlBlock + 3 + ((payload[0]>>4) & 0x3)) % BLOCKS_PER_GPRS_MULTI_FRAMES;
+
+ switch(ts->groupNum){
+
+ case GSM_GROUP_13:
+ fillBlk = &ts->u.group13.blkNumWatch[blockNumber];
+ break;
+
+ case GSM_GROUP_11:
+ fillBlk = &ts->u.group11.blkNumWatch[blockNumber];
+ break;
+ }
+
+ if ( fillBlk->tagFillCause == NONE ){
+ if ( ackBurstType == ACCESS_BURST ){
+ fillBlk->tagFillCause = RRB_AB;
+ } else{
+ fillBlk->tagFillCause = RRB_NB;
+ }
+ fillBlk->tag = tag;
+ tfi = (payload[2]>>1) & 0x1f;
+ dir = payload[2] & 0x1;
+ fillBlk->tbf = dlChan2TbfMap(rfCh, timeSlot, tfi, dir);
+
+ msgReady = TRUE;
+ }
+ }else
+ {
+ msgReady = TRUE;
+ }
+ /*
+ * If the PACCH section of code set msgReady, then send PACCH. The only negative
+ * case is to avoid an uplink collision, in which case a dummy block is sent below.
+ */
+ if ( msgReady ){
+ processCCHBuff(pacchMsg) ;
+ rtsCheck(rfCh, timeSlot, PACCH, subChan, DL_SIG_Q_DEPTH - pacchMsg->numMsgsReady);
+ }
+ }else{
+ /*
+ * PDTCH message has lower priority than PACCH
+ */
+
+
+
+ tag = pdtchMsg->tag[pdtchMsg->readIndex];
+ ackBurstType = pdtchMsg->burstType[pdtchMsg->readIndex];
+ chCodec = pdtchMsg->chCodec[pdtchMsg->readIndex];
+ payload = (Uint8*)pdtchMsg->buffer[pdtchMsg->readIndex];
+ /* Note: payload now points to first byte of PDTCH message */
+
+/* simulate queued pdtch messages during loopback mode */
+ if(g_loopBackMode == LOCAL_LOOPBACK)
+ pdtchMsg->frameCount = 0xff;
+
+ if ( pdtchMsg->frameCount )
+ {
+ /*
+ * check if the message is associated with an active TBF(rfCh, TS, TFI)
+ */
+ tfi = (payload[1]>>1) & 0x1f;
+ dir = 1; // DL direction always
+
+ if( (TBF = dlChan2TbfMap(rfCh, timeSlot, tfi, dir)) )
+ {
+ /*
+ * use assigned channel codec for the active TBF (this one byte preceeds the data bytes)
+ * ...new...use DSPMAIN defined value if local loopback test
+ */
+ if(g_loopBackMode == LOCAL_LOOPBACK)
+ g_DLCCHData.chCodec = TBF->dlTbf.channelCodec;
+ else
+ g_DLCCHData.chCodec = chCodec;
+
+
+
+ switch (ts->groupNum){
+ case GSM_GROUP_13:
+
+ /*
+ * assert USF used, need to check if extra delay on uplink ????!!!!!
+ * for AGC and Power Control Purpose
+ */
+ ts->u.group13.currentUsf = ts->u.group13.nextUsf;
+
+ /*
+ * If next Uplink Block is already reserved, set outgoing USF to the value that
+ * ensures no other MS will transmit. If not reserved, save USF from DL block.
+ */
+ blockNumber = (ts->u.group13.dlBlock + 1) % BLOCKS_PER_GPRS_MULTI_FRAMES;
+ if ( ts->u.group13.blkNumWatch[blockNumber].tagFillCause != NONE )
+ {
+ ts->u.group13.nextUsf = USF_RESERVED;
+ payload[0] &= 0xf8;
+ payload[0] |= USF_RESERVED;
+ }
+ else
+ {
+ ts->u.group13.nextUsf = payload[0] & 0x7;
+ }
+
+ break;
+
+ default:
+
+ /*
+ * assert USF used, need to check if extra delay on uplink ????!!!!!
+ * for AGC and Power Control Purpose
+ */
+ ts->u.group11.currentUsf = ts->u.group11.nextUsf;
+
+ /*
+ * If next Uplink Block is already reserved, set outgoing USF to the value that
+ * ensures no other MS will transmit. If not reserved, save USF from DL block.
+ */
+ blockNumber = (ts->u.group11.dlBlock + 1) % BLOCKS_PER_GPRS_MULTI_FRAMES;
+ if ( ts->u.group11.blkNumWatch[blockNumber].tagFillCause != NONE )
+ {
+ ts->u.group11.nextUsf = USF_RESERVED;
+ payload[0] &= 0xf8;
+ payload[0] |= USF_RESERVED;
+ }
+ else
+ {
+ ts->u.group11.nextUsf = payload[0] & 0x7;
+ }
+
+ break;
+
+ }
+
+ /*
+ * If this DL block schedules a Relative Reserved Block, S/P bit (4th) will be set
+ */
+ if ( (payload[0]>>3) & 0x01 )
+ {
+
+
+ switch(ts->groupNum){
+
+ case GSM_GROUP_13:
+ /*
+ * If the future block is not already reserved for SBA or DLA, then reserve it as RRB
+ */
+ blockNumber = (ts->u.group13.dlBlock + 3 + ((payload[0]>>4) & 0x3)) % BLOCKS_PER_GPRS_MULTI_FRAMES;
+ fillBlk = &ts->u.group13.blkNumWatch[blockNumber];
+ break;
+
+ case GSM_GROUP_11:
+ /*
+ * If the future block is not already reserved for SBA or DLA, then reserve it as RRB
+ */
+ blockNumber = (ts->u.group11.dlBlock + 3 + ((payload[0]>>4) & 0x3)) % BLOCKS_PER_GPRS_MULTI_FRAMES;
+ fillBlk = &ts->u.group11.blkNumWatch[blockNumber];
+ break;
+ }
+
+ if ( fillBlk->tagFillCause == NONE )
+ {
+ if ( ackBurstType == ACCESS_BURST )
+ {
+ fillBlk->tagFillCause = RRB_AB;
+ }
+ else
+ {
+ fillBlk->tagFillCause = RRB_NB;
+ }
+ fillBlk->tag = tag;
+ fillBlk->tbf = TBF;
+
+ msgReady = TRUE;
+ }
+
+
+ }
+ else
+ {
+ msgReady = TRUE;
+ }
+ /*
+ * If the PDTCH section of code set msgReady, then continue to construct PDTCH msg.
+ * The only negative case is to avoid an uplink collision.
+ */
+ if ( msgReady )
+ {
+
+ /*
+ * Added Channel Coding for USF
+ */
+ switch(g_DLCCHData.chCodec)
+ {
+ case GPRS_CS_1:
+ /*
+ * unpack a RLC Frame; channelCodec has to be CS_1
+ */
+ unpackFromByteBuffer(payload,
+ (UChar*)g_DLCCHData.data,
+ g_GPRSCodecBits[g_DLCCHData.chCodec]);
+ break;
+
+ case GPRS_CS_2:
+ case GPRS_CS_3:
+ /*
+ * unpack a RLC Frame; channelCodec has to be CS_2 or CS_4
+ */
+ unpackFromByteBuffer(payload,
+ (UChar*)&g_DLCCHData.data[3],
+ g_GPRSCodecBits[g_DLCCHData.chCodec]);
+ /*
+ * unpack 6-bit Pre-Codec USF
+
+ unpackFromByteBuffer((UChar*)USFCodingTableCS23[ts->u.group13.nextUsf],
+ (UChar*)&g_DLCCHData.data[0],
+ 6);
+ */
+ break;
+
+ case GPRS_CS_4:
+
+ /*
+ * unpack a RLC Frame; channelCodec has to be CS_4
+
+ unpackFromByteBuffer((UChar*)pdtchMsg->buffer[pdtchMsg->readIndex],
+ (UChar*)&g_DLCCHData.data[9],
+ g_GPRSCodecBits[g_DLCCHData.chCodec]);
+ */
+ unpackFromByteBuffer(payload,
+ (UChar*)&g_DLCCHData.data[9],
+ g_GPRSCodecBits[g_DLCCHData.chCodec]);
+ /*
+ * unpack 12-bit Codec USF
+
+ unpackFromByteBuffer((UChar*)USFCodingTableCS4[ts->u.group13.nextUsf],
+ (UChar*)&g_DLCCHData.data[0],
+ 12);
+ */
+ break;
+
+ default:
+ break;
+ }
+ /* Message will be sent. Set flag to increment read index and decrement frameCount. */
+ incrementCount = TRUE;
+ }
+ }
+ else
+ {
+ /* TBF not found. Flush msg. Set flag to increment read index and decrement frameCount. */
+ incrementCount = TRUE;
+ }
+ /* If msg will be sent or TBF was not found, increment read index and decrement frameCount */
+ if ( incrementCount )
+ {
+ /*
+ * If msg is ready to send, update read index and frame count
+ */
+ if(++pdtchMsg->readIndex >= NUM_TCH_JBUF) pdtchMsg->readIndex = 0;
+ pdtchMsg->frameCount--;
+ /*
+ * Report available Buffers to host RLC/MAC layer for flow control
+ */
+ rtsCheck(rfCh, timeSlot, PDTCH, subChan, (NUM_TCH_JBUF - pdtchMsg->frameCount));
+ }
+ }
+ else
+ {
+ /*
+ * Send Packet PSI13 if it is available
+ */
+ if(g_dlSigBufsSYSINFO[0][PACKET_TYPE_13].valid)
+ {
+ g_dlSigBufsSYSINFO[0][PACKET_TYPE_13].data[g_dlSigBufsSYSINFO[0][PACKET_TYPE_13].state][0] |= USF_RESERVED;
+ unpackFromByteBuffer
+ (
+ (UChar*)&g_dlSigBufsSYSINFO[0][PACKET_TYPE_13].data[g_dlSigBufsSYSINFO[0][PACKET_TYPE_13].state],
+ (UChar*)g_DLCCHData.data,
+ NUM_BITS_CCH_FRAME
+ );
+ msgReady = TRUE;
+ }
+ }
+ }
+
+ /*
+ * always send PDCH filler if no message to send
+ */
+ if(!msgReady)
+ {
+ /*
+ * use current USF for dummy frame
+ */
+ //dlPacketDummyFrame[0] |= ts->u.group13.currentUsf;
+ dlPacketDummyFrame[0] |= USF_RESERVED; /* USE TBF Free for PRACH */
+
+ unpackFromByteBuffer(dlPacketDummyFrame,
+ (UChar *)&g_DLCCHData.data[0],
+ NUM_BITS_CCH_FRAME);
+ }
+
+ g_DLCCHData.bufferValid = TRUE;
+ chanEncoder(PDCH, 1, timeSlot,0);
+ buildGSMBurst(SDCCH4, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, SDCCH4);
+ /*
+ * update GPRS Block Index
+ */
+ if (ts->groupNum == GSM_GROUP_13){
+ if(++ts->u.group13.dlBlock >= BLOCKS_PER_GPRS_MULTI_FRAMES) ts->u.group13.dlBlock = 0;
+ } else {
+ if(++ts->u.group11.dlBlock >= BLOCKS_PER_GPRS_MULTI_FRAMES) ts->u.group11.dlBlock = 0;
+ }
+
+
+
+}
+
+/*****************************************************************************
+*
+* Function: dlPdchProc3
+*
+* Description:
+* Processes downlink PDCH frames and burst 1-3
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dlPdchProc3(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ t_DLSigBufs *sdcchMsg;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ chanEncoder(PDCH, 0, timeSlot,0);
+ buildGSMBurst(SDCCH4, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, SDCCH4);
+}
+
+/*****************************************************************************
+*
+* Function: dlPtcchProc0
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dlPtcchProc0(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ t_DLSigBufs *ptcchMsg;
+ Uint8 subChan = 0;
+ Uint8 temp[10];
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ /*
+ * initialize Channel Codec with Default value CS_1
+ */
+ g_DLCCHData.chCodec = GPRS_CS_1;
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_13:
+
+ if (ts->u.group13.currentTAI >= 0 && ts->u.group13.currentTAI <= 15) {
+ ptcchMsg = ts->u.group13.ptcch.dlSigBuf;
+ }
+
+ break;
+
+ case GSM_GROUP_11:
+
+ if (ts->u.group11.currentTAI >= 0 && ts->u.group11.currentTAI <= 15) {
+ ptcchMsg = ts->u.group11.ptcch.dlSigBuf;
+ }
+
+ break;
+ default:
+ break;
+}
+
+
+ /*
+ * check if Timing Advance / Power Control Message is required to send
+ */
+ if(ptcchMsg->numMsgsReady)
+ {
+ /*
+ * assert USF used, need to check if extra delay on uplink ????!!!!!
+ * for AGC and Power Control Purpose
+ */
+
+ switch (ts->groupNum){
+ case GSM_GROUP_13:
+ ts->u.group13.currentUsf = ts->u.group13.nextUsf;
+ ts->u.group13.nextUsf = ptcchMsg->data[ptcchMsg->readIndex][0] & 0x7;
+ break;
+
+ case GSM_GROUP_11:
+ ts->u.group11.currentUsf = ts->u.group11.nextUsf;
+ ts->u.group11.nextUsf = ptcchMsg->data[ptcchMsg->readIndex][0] & 0x7;
+
+ break;
+
+ default:
+ break;
+ }
+
+ processCCHBuff(ptcchMsg);
+ rtsCheck(rfCh, timeSlot, PTCCH, subChan, DL_SIG_Q_DEPTH-ptcchMsg->numMsgsReady);
+ }
+ else if (g_dlSigBufsSYSINFO[0][PACKET_TYPE_13].valid)
+ {
+ /*
+ * Otherwise, Send Packet System Info 13
+ */
+ unpackFromByteBuffer
+ (
+ g_dlSigBufsSYSINFO[0][PACKET_TYPE_13].data[g_dlSigBufsSYSINFO[0][PACKET_TYPE_13].state],
+ (UChar*)g_DLCCHData.data,
+ NUM_BITS_CCH_FRAME
+ );
+ }
+ else
+ {
+ /*
+ * use current USF for dummy frame
+ */
+ dlPacketDummyFrame[0] |= ts->u.group13.currentUsf; // is this needed?
+
+ unpackFromByteBuffer( dlPacketDummyFrame,
+ (UChar *)&g_DLCCHData.data[0],
+ NUM_BITS_CCH_FRAME);
+ }
+
+
+
+
+ g_DLCCHData.bufferValid = TRUE;
+ chanEncoder(PTCCH, 1, timeSlot,0);
+ buildGSMBurst(PTCCH, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, SDCCH4);
+}
+
+/*****************************************************************************
+*
+* Function: dlPtcchProc3
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dlPtcchProc3(Uint8 rfCh, Uint8 timeSlot)
+{
+
+ t_TNInfo *ts;
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ chanEncoder(PTCCH, 0, timeSlot,0);
+ buildGSMBurst(PTCCH, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, SDCCH4);
+
+}
+/*****************************************************************************
+*
+* Function: dlPtcchIdleProc
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dlPtcchIdleProc(Uint8 rfCh, Uint8 timeSlot)
+{
+ Void (** funcTbl ) ();
+ t_TNInfo *ts;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ switch (ts->groupNum){
+
+ case GSM_GROUP_13:
+
+ funcTbl = (void *) & dlPtcchTable[ts->u.group13.dlPtcchIdleIndex];
+ (* funcTbl)(rfCh, timeSlot);
+
+ /*
+ * circular function table size is 8
+ */
+ ts->u.group13.dlPtcchIdleIndex++;
+ ts->u.group13.dlPtcchIdleIndex &= 0x07;
+ break;
+
+
+
+ case GSM_GROUP_11:
+
+ funcTbl = (void *) & dlPtcchTable[ts->u.group11.dlPtcchIdleIndex];
+ (* funcTbl)(rfCh, timeSlot);
+
+
+ /*
+ * circular function table size is 8
+ */
+ ts->u.group11.dlPtcchIdleIndex++;
+ ts->u.group11.dlPtcchIdleIndex &= 0x07;
+ break;
+ default:
+ break;
+ }
+
+
+
+
+
+
+
+}
+
+/*****************************************************************************
+*
+* Function: ulPtcchIdleProc
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void ulPtcchIdleProc(Uint8 rfCh, Uint8 timeSlot)
+{
+ Void (** funcTbl ) ();
+ t_TNInfo *ts;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ switch (ts->groupNum){
+ case GSM_GROUP_13:
+ funcTbl = (void *) & ulPtcchTable[ts->u.group13.ulPtcchIdleIndex];
+ (* funcTbl)(rfCh, timeSlot);
+
+ ts->u.group13.ulPtcchIdleIndex++;
+ ts->u.group13.ulPtcchIdleIndex &= 0x01;
+ break;
+
+ case GSM_GROUP_11:
+ funcTbl = (void *) & ulPtcchTable[ts->u.group11.ulPtcchIdleIndex];
+ (* funcTbl)(rfCh, timeSlot);
+
+ ts->u.group11.ulPtcchIdleIndex++;
+ ts->u.group11.ulPtcchIdleIndex &= 0x01;
+ break;
+ default:
+
+ break;
+
+
+ }
+
+}
+
+/*****************************************************************************
+*
+* Function: ulPtcchIdleProc0
+*
+* Description:
+* Packet Timing Control Channel Processing
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void ulPtcchIdleProc0(Uint8 rfCh, Uint8 timeSlot)
+{
+
+}
+
+
+/*****************************************************************************
+*
+* Function: dlPtcchIdleProc0
+*
+* Description:
+* Packet Timing Control Channel Processing
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dlPtcchIdleProc0(Uint8 rfCh, Uint8 timeSlot)
+{
+
+}
+
+/*****************************************************************************
+*
+* Function: dlPtcchIdleProc3
+*
+* Description:
+* Packet Timing Control Channel Processing
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dlPtcchIdleProc3(Uint8 rfCh, Uint8 timeSlot)
+{
+
+}
+
+
+
+
+/*****************************************************************************
+*
+* Function: ulPtcchProc
+*
+* Description:
+* Packet Timing Control Channel Processing
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void ulPtcchProc(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ Uint16 ptcchReg;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ /*
+ * Demodulate a PRACH burst
+ */
+ demodulate( g_BBInfo[rfCh].ulBBSmpl,
+ RACH,
+ g_BBInfo[rfCh].tseqNum,
+ &g_ULBurstData,
+ ts->groupNum,
+ rfCh,
+ timeSlot,
+ 0 );
+ /*
+ * Decode a PRACH frame
+ */
+ chanDecoder(PTCCH, 1, timeSlot);
+
+
+
+
+ if (ts->groupNum == GSM_GROUP_13){
+ /*
+ * Process a PTCCH message
+ */
+ ulSyncMsgProcess(PTCCH, ts->u.group13.currentTAI, timeSlot, rfCh);
+
+ /*
+ * TAI circulation through 0-15
+ */
+
+ if(++ts->u.group13.currentTAI >= 15) ts->u.group13.currentTAI = 0;
+ } else {
+
+ /*
+ * Process a PTCCH message
+ */
+ ulSyncMsgProcess(PTCCH, ts->u.group11.currentTAI, timeSlot, rfCh);
+
+ if(++ts->u.group11.currentTAI >= 15) ts->u.group11.currentTAI = 0;
+ }
+
+
+}
+
+
+
+
+
+
+
+
+
+
+
+void UpdateGroupXITableUL(Uint8 rfCh, Uint8 timeSlot);
+void UpdateGroupXITableDL(Uint8 rfCh, Uint8 timeSlot);
+
+
+
+/**********************************************************
+ * Routine: void dlBcchProc0(Uint8 rfCh, Uint8 timeSlot)
+ *
+ * Description:
+ * Synchronousely process 1st of 4 PBCCH bursts,
+ * Channel encode is required
+ *
+ * History: Change Mapping from GSM 05.02-820 Pagaraph
+ *
+ ***********************************************************/
+
+
+
+/* PBCCH is used to send the PSI messages in for Group 11
+
+ PSI1 is a mandatory message that must be sent:
+ - must be sent with TC = 0
+ TC = (FN div 52) mod PSI1_REPEAT
+
+ - Make the assumption that PSI1_REPEAT is equal to
+ at least 7 (1,2,3,3bis,4,5, 13).
+
+
+ Other mandatory messages that are sent 2, 3, and 3bis
+
+
+ The assumption is that the number of instances of each
+ message is equal 1
+ - the spec allows for more but this number is fixed
+ for ease of implementation.
+
+ Assume that PSI_COUNT_HR = 0 - can't find how to define
+ which PSI are high repitition messages
+
+
+
+*/
+void dlPbcchProc0(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_sysInfoQueue *pBcchInfo;
+ t_TNInfo *ts;
+
+
+ /* get pointer to the timeslot */
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+
+
+
+ /* See whether it is time to send PSI 1 */
+
+ if ((sysFrameNum.FN % (g11Params.psi1_cycle)) == 0){
+ if ((g11Params.newAssignment == TRUE) && \
+ (ts->u.group11.dlBlock ==0)){
+ UpdateGroupXITableDL(rfCh, timeSlot);
+ ulGroupXITableInit();
+ UpdateGroupXITableUL(rfCh, timeSlot);
+ g11Params.newAssignment = FALSE; // assignment complete
+ }
+
+ ts->u.group11.pbcchBufIndex = PACKET_TYPE_1;
+ }
+
+
+ /* Point to the correct PSI buffer */
+
+ pBcchInfo = ts->u.group11.pbcch.dlSigBuf + ts->u.group11.pbcchBufIndex ;
+
+
+ /* See if this a valid message to send */
+
+
+
+ while (( pBcchInfo->valid == 0 ) && (ts->u.group11.pbcchBufIndex != PACKET_TYPE_1)){
+
+
+ ++pBcchInfo;
+
+ if (++ts->u.group11.pbcchBufIndex >= NUM_SYSINFO_BUFS){
+ ts->u.group11.pbcchBufIndex = PACKET_TYPE_1;
+ pBcchInfo = ts->u.group11.pbcch.dlSigBuf + PACKET_TYPE_1;
+ }
+
+ }
+
+ /* Modify the USF value with the previous blocks USF value */
+
+ pBcchInfo->data[0][0] |= (ts->u.group11.currentUsf &0x7);
+
+
+
+ unpackFromByteBuffer(&pBcchInfo->data[0][0],
+ (UChar *)&g_DLCCHData.data[0],
+ NUM_BITS_CCH_FRAME);
+
+
+ g_DLCCHData.bufferValid = TRUE;
+
+ chanEncoder(BCCH, 1, timeSlot,0);
+ buildGSMBurst(BCCH, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, BCCH);
+
+}
+
+
+
+void dlPpchProc0(Uint8 rfCh, Uint8 timeSlot)
+{ return; }
+
+void dlPpchProc1(Uint8 rfCh, Uint8 timeSlot)
+{return;}
+void dlPpchProc2(Uint8 rfCh, Uint8 timeSlot)
+{return;}
+void dlPpchProc3(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+
+
+ /* get pointer to the timeslot */
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ if (++ts->u.group11.dlBlock >= MAX_RADIO_BLOCKS){
+ ts->u.group11.dlBlock = 0;
+ }
+
+ return;}
+
+
+
+
+
+
+
+Uint8 RadioBlkPos[12] = {0,4,8,13,17,21,26,30,34,39,43,47};
+Uint8 OrderedBlks[12] = {0,6,3,9,1,7,4,10,2,8,5,11};
+
+
+void UpdateGroupXITableDL(Uint8 rfCh, Uint8 timeSlot){
+
+ Uint8 index;
+ Uint8 offset;
+ t_TNInfo *ts;
+ Uint8 frameNum;
+ Uint8 val;
+ Uint8 numPaging;
+
+
+
+ /* get the struture for the timeslot */
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ /* Determine which frames are PBCCH frames */
+
+ for ( index = 0; index < g11Params.bsPBcchBlks; index++){
+
+ frameNum = RadioBlkPos[OrderedBlks[index]];
+ G11_dlRadioBlkType[OrderedBlks[index]] = D_PBCCH_T;
+
+
+ for (offset = 0 ; offset < 4; offset++){
+ ts->groupDLTable[offset+frameNum] = (UINT32) dlPbcchTable[offset];
+ }
+ }
+
+ /* Determine the PPCH channels */
+
+ numPaging = MAX_GPRS_PAGING +1 - g11Params.bsPBcchBlks;
+ numPaging -= g11Params.bsPagBlksRes;
+
+
+ /* Max sure of the limits */
+
+ if (numPaging >MAX_GPRS_PAGING)
+ numPaging = MAX_GPRS_PAGING;
+
+ if (numPaging <0) numPaging = 0;
+
+ /* Update the scheduling table */
+
+ if (numPaging > 0){
+ for (index = 0; index < numPaging; index++){
+ val = MAX_GPRS_PAGING - index;
+ frameNum = RadioBlkPos[OrderedBlks[val]];
+ G11_dlRadioBlkType[OrderedBlks[val]] = D_PPCH_T;
+ for (offset = 0 ; offset < 4; offset++){
+ ts->groupDLTable[offset+frameNum] = (UINT32) dlPpchTable[offset];
+ }
+ }
+ }
+}
+
+
+
+void UpdateGroupXITableUL(Uint8 rfCh, Uint8 timeSlot){
+/* Determine the position of the PRACH */
+
+
+ Uint8 index;
+ Uint8 offset;
+ t_TNInfo *ts;
+ Uint8 frameNum;
+ Uint8 val,i;
+
+
+ /* get the struture for the timeslot */
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+
+ /* Initialize the group 11 radio block defs */
+
+ for ( i = 0; i < MAX_RADIO_BLOCKS; i++){
+ G11_ulRadioBlkType[i] = U_PDCH_T;
+ }
+
+ /* Set up the blocks for PRACH */
+
+
+ for (index = 0; index < g11Params.bsPrachBlks; index++){
+ frameNum = RadioBlkPos[OrderedBlks[index]];
+ G11_ulRadioBlkType[OrderedBlks[index]] = U_PRACH_T;
+
+ for (offset = 0 ; offset < 3; offset++){
+
+ ts->groupULTable[offset+frameNum] = (Uint32) ulPrachProc0;
+ }
+ ts->groupULTable[frameNum+3] = (Uint32) ulPrachProc3;
+
+ }
+}
+
+
+
+void ulPrachProc0(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ t_chanSel syncMsg, decodeMsg;
+
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ /*
+ * Input samples offset by -1 to get a head room for case TOA becomes marginal to -1
+ */
+ demodulate( g_BBInfo[rfCh].ulBBSmpl-1,
+ RACH,
+ g_BBInfo[rfCh].tseqNum,
+ &g_ULBurstData,
+ ts->groupNum,
+ rfCh,
+ timeSlot,
+ 0 );
+ /*
+ * Correct effect of sample offset, but not less than zero
+ */
+ if ( g_ULBurstData.toa > 0 )
+ {
+ g_ULBurstData.toa -= 1;
+ }
+
+ /*
+ * channel decoding(Viterbi + CRC)
+ */
+ switch (ts->groupNum){
+ case GSM_GROUP_13:
+ case GSM_GROUP_11:
+ if (g_PrachBits == 11){
+ syncMsg = PRACH;
+ decodeMsg = PRACH;
+ } else {
+ syncMsg = PRACH;
+ decodeMsg = RACH;
+ }
+
+ break;
+ default:
+ syncMsg = RACH;
+ decodeMsg = RACH;
+ break;
+ }
+
+ chanDecoder(decodeMsg, 1, timeSlot);
+ ulSyncMsgProcess(syncMsg, 0, timeSlot, rfCh);
+
+
+
+}
+
+
+void ulPrachProc3(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ t_chanSel syncMsg, decodeMsg;
+
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ /*
+ * Input samples offset by -1 to get a head room for case TOA becomes marginal to -1
+ */
+ demodulate( g_BBInfo[rfCh].ulBBSmpl-1,
+ RACH,
+ g_BBInfo[rfCh].tseqNum,
+ &g_ULBurstData,
+ ts->groupNum,
+ rfCh,
+ timeSlot,
+ 0 );
+ /*
+ * Correct effect of sample offset, but not less than zero
+ */
+ if ( g_ULBurstData.toa > 0 )
+ {
+ g_ULBurstData.toa -= 1;
+ }
+
+ /*
+ * channel decoding(Viterbi + CRC)
+ */
+ switch (ts->groupNum){
+ case GSM_GROUP_13:
+ case GSM_GROUP_11:
+ if (g_PrachBits == 11){
+ syncMsg = PRACH;
+ decodeMsg = PRACH;
+ } else {
+ syncMsg = PRACH;
+ decodeMsg = RACH;
+ }
+
+ break;
+ default:
+ syncMsg = RACH;
+ decodeMsg = RACH;
+ break;
+ }
+
+ chanDecoder(decodeMsg, 1, timeSlot);
+ ulSyncMsgProcess(syncMsg, 0, timeSlot, rfCh);
+
+
+ if (++ts->u.group11.ulBlock >= MAX_RADIO_BLOCKS){
+ ts->u.group11.ulBlock = 0;
+ }
+
+}
+
+
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/rtscheck.c b/data/mnet/GP10/Dsp/synchctrl/rtscheck.c
new file mode 100644
index 0000000..0becaab
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/rtscheck.c
@@ -0,0 +1,133 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+* file name: rtsCheck.c
+*
+* Description: check RTS for channels
+*
+*****************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "dsp/dsphmsg.h"
+#include "rrmsg.h"
+#include "dsprotyp.h"
+
+/*****************************************************************************
+*
+* Function: rtsCheck
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void rtsCheck(Uint8 rfCh, Uint8 timeSlot, Uint8 logCh, Uint8 subCh, Int8 availableBuf)
+{
+ msgStruc phRTSIndBuf;
+
+ t_TNInfo *ts;
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ if(logCh == PACCH || logCh == PDTCH)
+ {
+ phRTSIndBuf.function = PDCH_MANAGE_MSG;
+ }
+ else if( logCh == CBCH || logCh == CBCH_EXT || logCh == AGCH || logCh == PCH)
+ {
+ phRTSIndBuf.function = DCCH_MANAGE_MSG;
+ if( logCh == CBCH || logCh == CBCH_EXT)
+ {
+ /*
+ * USE SDCCH4 for CHCH and CBCH_EXT until RRM can handle
+ * CHCH and CBCH_EXT !!!
+ */
+ logCh = SDCCH4;
+ }
+ }
+ else
+ {
+ phRTSIndBuf.function = RR_MANAGE_MSG;
+ }
+ phRTSIndBuf.typeHiByte = PH_READY_TO_SEND_IND_HI;
+ phRTSIndBuf.typeLoByte = PH_READY_TO_SEND_IND_LO;
+ phRTSIndBuf.trx = rfCh; /* for now */
+
+ chXlate(ts->groupNum,
+ logCh,
+ subCh,
+ &phRTSIndBuf.params[0],
+ &phRTSIndBuf.params[2]);
+
+ phRTSIndBuf.params[0] |= timeSlot;
+ phRTSIndBuf.params[1] = 0;
+
+ phRTSIndBuf.params[3] = availableBuf;
+
+ phRTSIndBuf.params[4] = (sysFrameNum.t3 >> 3) | (sysFrameNum.t1 << 3);
+ phRTSIndBuf.params[5] = sysFrameNum.t2 | (sysFrameNum.t3 << 5);
+
+ phRTSIndBuf.msgSize= MSG_HEAD_SIZE+6;
+
+ SendMsgHost_Que(&phRTSIndBuf);
+}
+
+#ifdef RTS_MSG_SEND_INDIRECT
+
+/*****************************************************************************
+*
+* Function: rtsSend
+*
+* Description:
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void rtsSend(Uint8 rfCh, Uint8 timeSlot)
+{
+ msgStruc phRTSIndBuf;
+
+ t_TNInfo *ts;
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ if(ts->rtsInfo->numMsgsReady > 0)
+ {
+ phRTSIndBuf.function = RR_MANAGE_MSG;
+ phRTSIndBuf.typeHiByte = PH_READY_TO_SEND_IND_HI;
+ phRTSIndBuf.typeLoByte = PH_READY_TO_SEND_IND_LO;
+ phRTSIndBuf.trx = 0; /* for now */
+
+ chXlate( ts->groupNum,
+ ts->rtsInfo->data[ts->rtsInfo->bufRdIndex].chanSel,
+ ts->rtsInfo->data[ts->rtsInfo->bufRdIndex++].subCh,
+ &phRTSIndBuf.params[0],
+ &phRTSIndBuf.params[2]);
+
+ phRTSIndBuf.params[3] = (ts->rtsInfo->frameNum.t3 >> 3) | (ts->rtsInfo->frameNum.t1 << 3);
+ phRTSIndBuf.params[4] = ts->rtsInfo->frameNum.t2 | (ts->rtsInfo->frameNum.t3 << 5);
+
+ ts->rtsInfo->bufRdIndex &= NUM_RTS_BUFS>>1;
+
+ ts->rtsInfo->numMsgsReady--;
+
+ phRTSIndBuf.params[0] |= timeSlot;
+ phRTSIndBuf.params[1] = 0;
+
+/*
+ phRTSIndBuf.params[0] = timeSlot;
+ phRTSIndBuf.params[0] |= logCh<<3;
+ phRTSIndBuf.params[1] = subCh | 0x08;
+ phRTSIndBuf.params[2] = 0;
+*/
+ phRTSIndBuf.msgSize= MSG_HEAD_SIZE+5;
+
+ SendMsgHost_Que(&phRTSIndBuf);
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Dsp/synchctrl/sacch.c b/data/mnet/GP10/Dsp/synchctrl/sacch.c
new file mode 100644
index 0000000..ee6484d
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/sacch.c
@@ -0,0 +1,987 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: sacch.c
+*
+* Description:
+* This file contains functions that process SACCH frames.
+*
+* Public Functions:
+* ulSacchProc0, ulSacchProc3, dlSacchProc0, dlSacchProc1, dlSacchProc3,
+*
+* Private Functions:
+* idleChanDiagReport
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "oamdata.h"
+#include "dsp/dsphmsg.h"
+#include "bbdata.h"
+#include "dsprotyp.h"
+#include "l1config.h"
+#include "diagdata.h"
+#include "agcdata.h"
+#include "dem_const.h"
+
+
+
+
+
+/*****************************************************************************
+*
+* Function: ulSacchProc0
+*
+* Description:
+* Processes uplink SACCH bursts for frames 0,1,2 of every 0-3 block
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void ulSacchProc0(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ Uint8 subChan;
+ t_SACCHInfo *sacchInfo;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+
+ switch(ts->groupNum)
+ {
+
+ case GSM_GROUP_7:
+ subChan = ts->u.group7.ulSacchSubCh;
+ sacchInfo = & ts->u.group7.sacch[subChan];
+
+ if(sacchInfo->state == CHAN_ACTIVE)
+ {
+ /*--- Update DC offset for SDCCH associated with this SACCH ---*/
+ DCOffset( g_BBInfo[rfCh].ulBBSmpl, ts->groupNum, rfCh, subChan );
+
+ demodulate( g_BBInfo[rfCh].ulBBSmpl,
+ SACCH,
+ g_BBInfo[rfCh].tseqNum,
+ &g_ULBurstData,
+ ts->groupNum,
+ rfCh,
+ timeSlot,
+ subChan );
+ decrypt(rfCh, timeSlot);
+
+ chanDecoder(SACCH, 0, timeSlot);
+
+ /*-----------------------------------------------------------
+ * Accumulate TOA and power Sub (indicated by Burst Phase 0)
+ *-----------------------------------------------------------*/
+ accumPower(rfCh, timeSlot, ts->groupNum, SACCH, sacchInfo, NULL);
+ accumToa (rfCh, timeSlot, ts->groupNum, subChan, SACCH, NULL);
+ }
+
+ break;
+
+
+ case GSM_GROUP_5:
+ subChan = ts->u.group5.ulSacchSubCh;
+ sacchInfo = & ts->u.group5.sacch[subChan];
+ if(sacchInfo->state == CHAN_ACTIVE)
+ {
+ /*--- Update DC offset for SDCCH associated with this SACCH ---*/
+ DCOffset( g_BBInfo[rfCh].ulBBSmpl, ts->groupNum, rfCh, NUM_TN_PER_RF + subChan );
+
+ demodulate( g_BBInfo[rfCh].ulBBSmpl,
+ SACCH,
+ g_BBInfo[rfCh].tseqNum,
+ &g_ULBurstData,
+ ts->groupNum,
+ rfCh,
+ timeSlot,
+ subChan );
+ decrypt(rfCh, timeSlot);
+ chanDecoder(SACCH, 0, timeSlot);
+
+ /*-----------------------------------------------------------
+ * Accumulate TOA and power Sub (indicated by Burst Phase 0)
+ *-----------------------------------------------------------*/
+ accumPower(rfCh, timeSlot, ts->groupNum, SACCH, sacchInfo, NULL);
+ accumToa (rfCh, timeSlot, ts->groupNum, subChan, SACCH, NULL);
+ }
+ break;
+
+ case GSM_GROUP_1:
+ sacchInfo = & ts->u.group1.sacch;
+ if(sacchInfo->state == CHAN_ACTIVE)
+ {
+ /*------------------------------------------------------
+ * If handover, try to detect HO access burst
+ *------------------------------------------------------*/
+ if(ts->u.group1.tch.HOFlag)
+ {
+ ulRachProc(rfCh, timeSlot);
+ }
+ /*------------------------------------------------------
+ * Else demodulate normal burst
+ *------------------------------------------------------*/
+ else
+ {
+ /*--- Update DC offset for TCH associated with this SACCH ---*/
+ DCOffset( g_BBInfo[rfCh].ulBBSmpl, ts->groupNum, rfCh, timeSlot );
+
+ demodulate( g_BBInfo[rfCh].ulBBSmpl,
+ SACCH,
+ g_BBInfo[rfCh].tseqNum,
+ &g_ULBurstData,
+ ts->groupNum,
+ rfCh,
+ timeSlot,
+ 0 );
+ decrypt(rfCh, timeSlot);
+ chanDecoder(SACCH, 0, timeSlot);
+
+ /*-----------------------------------------------------------
+ * Accumulate TOA and power Sub (indicated by SACCH argument)
+ *-----------------------------------------------------------*/
+ accumPower(rfCh, timeSlot, ts->groupNum, SACCH, sacchInfo, NULL);
+ accumToa (rfCh, timeSlot, ts->groupNum, 0, SACCH, NULL);
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+/*****************************************************************************
+*
+* Function: ulSacchProc3
+*
+* Description:
+* Processes uplink SACCH bursts for frame 3 of every 0-3 block
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void ulSacchProc3(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ Uint8 subChan;
+ t_SACCHInfo *sacchInfo;
+ t_chanState chState;
+ t_diagMsReport *msReport;
+ msgStruc ackMsg;
+ Int8 radioLinkLost=FALSE;
+ Uint8 radioLinkLostThrsh;
+ t_ULSignalStrength *sigS;
+
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+
+ /*
+ * Set Radio Link Lost timeout threshold. Convert from MIB units to
+ * SACCH messages, as described in GSM 05.08.
+ */
+ radioLinkLostThrsh = 4 + (4 * g_HoOAMInfo.serveParms.radioLinkTimeout);
+
+
+ switch(ts->groupNum)
+ {
+
+
+ case GSM_GROUP_7:
+ /*----------------------------------------------------------
+ * Get current SACCH subchannel, increment structure value
+ * to next subchannel, and set SACCH info pointer and state
+ *----------------------------------------------------------*/
+
+ subChan = ts->u.group7.ulSacchSubCh;
+
+
+
+ if ( ++ts->u.group7.ulSacchSubCh >= NUM_SACCH8_SUBCHANS )
+ {
+ ts->u.group7.ulSacchSubCh = 0;
+ }
+
+
+ /* --------------------------------------------------------
+ * Get SACCH info pointer and SDCCH state (not SACCH state).
+ *----------------------------------------------------------*/
+ sacchInfo = & ts->u.group7.sacch[subChan];
+ chState = ts->u.group7.sdcch[subChan].state;
+
+
+ /*----------------------------------------------------------
+ * Process the SACCH channel if it's active. NOTE: Check
+ * SACCH state for this, not SDCCH state (chState).
+ *----------------------------------------------------------*/
+ if(sacchInfo->state == CHAN_ACTIVE)
+ {
+
+
+
+
+ /*--- Update DC offset for SDCCH associated with this SACCH ---*/
+ DCOffset( g_BBInfo[rfCh].ulBBSmpl, ts->groupNum, rfCh, subChan );
+
+ demodulate( g_BBInfo[rfCh].ulBBSmpl,
+ SACCH,
+ g_BBInfo[rfCh].tseqNum,
+ &g_ULBurstData,
+ ts->groupNum,
+ rfCh,
+ timeSlot,
+ subChan );
+ decrypt(rfCh, timeSlot);
+ chanDecoder(SACCH, 1, timeSlot);
+
+ /*-----------------------------------------------------------
+ * Finish accumulating bit errors and frame errors
+ *----------------------------------------------------------*/
+ accumBer(rfCh, timeSlot, ts->groupNum, SACCH, subChan,
+ sacchInfo, FALSE, FALSE);
+
+ /*----------------------------------------------------------
+ * Accumulate TOA and power. Indicate SACCH4 to set final
+ * TOA and power, increment dyn pwr rpt count and adjust TA.
+ *----------------------------------------------------------*/
+ accumPower(rfCh, timeSlot, ts->groupNum, SACCH4, sacchInfo, NULL);
+ accumToa (rfCh, timeSlot, ts->groupNum, subChan, SACCH4, NULL);
+
+ /*-----------------------------------------------------------
+ * Update AGC on last sacch subchannel burst
+ *------------------------------------------------------------*/
+ if ( g_AGC_ON )
+ {
+ if ( sacchInfo->agcHoldFlag )
+ {
+ /*----------------------------------------------------------
+ * If SACCH passed parity, reset and release hold on AGC
+ *----------------------------------------------------------*/
+ if ( ! g_ULCCHData.ulcchword0.bitval.fireStatus )
+ {
+ sacchInfo->agcHoldFlag = FALSE;
+ sacchInfo->ulsigstren.rxPwrNormSmooth = 0;
+ }
+ }
+ else
+ {
+ sigS = & sacchInfo->ulsigstren;
+ sigS->rxPwrNormSmooth = ul_agc(sigS);
+ }
+ }
+ /*-----------------------------------------------------------
+ * If SACCH passed parity, release hold on DPC
+ *------------------------------------------------------------*/
+ if ( ! g_ULCCHData.ulcchword0.bitval.fireStatus )
+ {
+ sacchInfo->dpcHoldFlag = FALSE;
+ }
+ /*-----------------------------------------------------------
+ * Accumulate average power and perform dynamic power control
+ *------------------------------------------------------------*/
+ averageS(& sacchInfo->ulsigstren,
+ & sacchInfo->dlsigstrenSCell,
+ g_DynPwrOAMInfo.ulsigstren.numRxSigSamples,
+ & sacchInfo->MSPowerAccum,
+ TRUE);
+
+ if (g_DPC_ON)
+ {
+ uplink_dynamic_power_control(ts, subChan);
+ }
+ /*-----------------------------------------------------------
+ * Process SACCH message
+ *----------------------------------------------------------*/
+ ulSyncMsgProcess(SACCH, subChan, timeSlot, rfCh);
+ }
+ else
+ {
+ /*
+ * when SACCH is deactivated, allow Radio Link Lost counting continue
+ * Set Fire Status for current SACCH frame
+ */
+ g_ULCCHData.ulcchword0.bitval.fireStatus = 1;
+ }
+
+ /*
+ * pre fill channel Number for Radio Link Lost Message to RRM
+ */
+ ackMsg.params[0] = timeSlot | 0x40 | (subChan <<3);
+
+ break;
+
+ case GSM_GROUP_5:
+ /*----------------------------------------------------------
+ * Get current SACCH subchannel, increment structure value
+ * to next subchannel, and set SACCH info pointer and state
+ *----------------------------------------------------------*/
+ subChan = ts->u.group5.ulSacchSubCh;
+ if ( ++ts->u.group5.ulSacchSubCh >= NUM_SACCH_SUBCHANS )
+ {
+ ts->u.group5.ulSacchSubCh = 0;
+ }
+ /*----------------------------------------------------------
+ * Check for cell broadcast. If so, no SACCH to monitor.
+ *----------------------------------------------------------*/
+ if(ts->u.group5.cbchUsed && (subChan == 2))
+ {
+ return;
+ }
+ /*-----------------------------------------------------------
+ * Get SACCH info pointer and SDCCH state (not SACCH state).
+ *----------------------------------------------------------*/
+ sacchInfo = & ts->u.group5.sacch[subChan];
+ chState = ts->u.group5.sdcch[subChan].state;
+ /*----------------------------------------------------------
+ * Process the SACCH channel if it's active. NOTE: Check
+ * SACCH state for this, not SDCCH state (chState).
+ *----------------------------------------------------------*/
+ if(sacchInfo->state == CHAN_ACTIVE)
+ {
+ /*--- Update DC offset for SDCCH associated with this SACCH ---*/
+ DCOffset( g_BBInfo[rfCh].ulBBSmpl, ts->groupNum, rfCh, NUM_TN_PER_RF + subChan );
+
+ demodulate( g_BBInfo[rfCh].ulBBSmpl,
+ SACCH,
+ g_BBInfo[rfCh].tseqNum,
+ &g_ULBurstData,
+ ts->groupNum,
+ rfCh,
+ timeSlot,
+ subChan );
+ decrypt(rfCh, timeSlot);
+ chanDecoder(SACCH, 1, timeSlot);
+
+ /*-----------------------------------------------------------
+ * Finish accumulating bit errors and frame errors
+ *----------------------------------------------------------*/
+ accumBer(rfCh, timeSlot, ts->groupNum, SACCH, subChan,
+ sacchInfo, FALSE, FALSE);
+
+ /*----------------------------------------------------------
+ * Accumulate TOA and power. Indicate SACCH4 to set final
+ * TOA and power, increment dyn pwr rpt count and adjust TA.
+ *----------------------------------------------------------*/
+ accumPower(rfCh, timeSlot, ts->groupNum, SACCH4, sacchInfo, NULL);
+ accumToa (rfCh, timeSlot, ts->groupNum, subChan, SACCH4, NULL);
+
+ /*-----------------------------------------------------------
+ * Update AGC on last sacch subchannel burst
+ *------------------------------------------------------------*/
+ if ( g_AGC_ON )
+ {
+ if ( sacchInfo->agcHoldFlag )
+ {
+ /*----------------------------------------------------------
+ * If SACCH passed parity, reset and release hold on AGC
+ *----------------------------------------------------------*/
+ if ( ! g_ULCCHData.ulcchword0.bitval.fireStatus )
+ {
+ sacchInfo->agcHoldFlag = FALSE;
+ sacchInfo->ulsigstren.rxPwrNormSmooth = 0;
+ }
+ }
+ else
+ {
+ sigS = & sacchInfo->ulsigstren;
+ sigS->rxPwrNormSmooth = ul_agc(sigS);
+ }
+ }
+ /*-----------------------------------------------------------
+ * If SACCH passed parity, release hold on DPC
+ *------------------------------------------------------------*/
+ if ( ! g_ULCCHData.ulcchword0.bitval.fireStatus )
+ {
+ sacchInfo->dpcHoldFlag = FALSE;
+ }
+ /*-----------------------------------------------------------
+ * Accumulate average power and perform dynamic power control
+ *------------------------------------------------------------*/
+ averageS(& sacchInfo->ulsigstren,
+ & sacchInfo->dlsigstrenSCell,
+ g_DynPwrOAMInfo.ulsigstren.numRxSigSamples,
+ & sacchInfo->MSPowerAccum,
+ TRUE);
+
+ if (g_DPC_ON)
+ {
+ uplink_dynamic_power_control(ts, subChan);
+ }
+ /*-----------------------------------------------------------
+ * Process SACCH message
+ *----------------------------------------------------------*/
+ ulSyncMsgProcess(SACCH, subChan, timeSlot, rfCh);
+ }
+ else
+ {
+ /*
+ * when SACCH is deactivated, allow Radio Link Lost counting continue
+ * Set Fire Status for current SACCH frame
+ */
+ g_ULCCHData.ulcchword0.bitval.fireStatus = 1;
+ }
+
+ /*
+ * pre fill channel Number for Radio Link Lost Message to RRM
+ */
+ ackMsg.params[0] = timeSlot | 0x20 | (subChan <<3);
+
+ break;
+
+ case GSM_GROUP_1:
+ /*-----------------------------------------------------------
+ * Get SACCH info pointer and TCH state (not SACCH state).
+ * TCH/F has only one SACCH channel, so subChan is zero.
+ *----------------------------------------------------------*/
+ sacchInfo = & ts->u.group1.sacch;
+ chState = ts->u.group1.tch.state;
+ subChan = 0;
+ /*-----------------------------------------------------------
+ * Process the SACCH channel if it's active. NOTE: Check
+ * SACCH state for this, not TCH state (chState).
+ *----------------------------------------------------------*/
+ if(sacchInfo->state == CHAN_ACTIVE)
+ {
+ /*------------------------------------------------------
+ * If handover, try to detect HO access burst. If found,
+ * set Fire Status for current SACCH frame. NOTE: HO
+ * Access uses the Radio Link Timeout from OAM.
+ *------------------------------------------------------*/
+ if(ts->u.group1.tch.HOFlag)
+ {
+ ulRachProc(rfCh, timeSlot);
+ g_ULCCHData.ulcchword0.bitval.fireStatus = 1;
+ }
+ /*------------------------------------------------------
+ * Else demodulate normal burst
+ *------------------------------------------------------*/
+ else
+ {
+ /*--- Update DC offset for TCH associated with this SACCH ---*/
+ DCOffset( g_BBInfo[rfCh].ulBBSmpl, ts->groupNum, rfCh, timeSlot );
+
+ demodulate( g_BBInfo[rfCh].ulBBSmpl,
+ SACCH,
+ g_BBInfo[rfCh].tseqNum,
+ &g_ULBurstData,
+ ts->groupNum,
+ rfCh,
+ timeSlot,
+ 0 );
+ decrypt(rfCh, timeSlot);
+ chanDecoder(SACCH, 1, timeSlot);
+
+ /*-----------------------------------------------------------
+ * Finish accumulating bit errors and frame errors
+ *----------------------------------------------------------*/
+ accumBer(rfCh, timeSlot, ts->groupNum, SACCH, 0, sacchInfo,
+ ts->u.group1.tch.ULDtxMode, FALSE);
+
+ /*----------------------------------------------------------
+ * Accumulate TOA and power. Indicate Burst 3 to set final
+ * TOA and power, increment dyn pwr rpt count and adjust TA.
+ *----------------------------------------------------------*/
+ accumPower(rfCh, timeSlot, ts->groupNum, SACCH4, sacchInfo, NULL);
+ accumToa (rfCh, timeSlot, ts->groupNum, 0, SACCH4, NULL);
+
+ /*-----------------------------------------------------------
+ * Update AGC on last sacch subchannel burst
+ *------------------------------------------------------------*/
+ if(g_AGC_ON)
+ {
+ if ( sacchInfo->agcHoldFlag )
+ {
+ /*----------------------------------------------------------
+ * If SACCH passed parity, reset and release hold on AGC
+ *----------------------------------------------------------*/
+ if ( ! g_ULCCHData.ulcchword0.bitval.fireStatus )
+ {
+ sacchInfo->agcHoldFlag = FALSE;
+ sacchInfo->ulsigstren.rxPwrNormSmooth = 0;
+ }
+ }
+ else
+ {
+ sigS = & sacchInfo->ulsigstren;
+ sigS->rxPwrNormSmooth = ul_agc(sigS);
+ }
+ }
+ /*-----------------------------------------------------------
+ * If SACCH passed parity, release hold on DPC
+ *------------------------------------------------------------*/
+ if ( ! g_ULCCHData.ulcchword0.bitval.fireStatus )
+ {
+ sacchInfo->dpcHoldFlag = FALSE;
+ }
+ /*-----------------------------------------------------------
+ * Process SACCH message
+ *----------------------------------------------------------*/
+ ulSyncMsgProcess(SACCH, subChan, timeSlot, rfCh);
+ }
+ }
+ else
+ {
+ /*
+ * when SACCH is deactivated, allow Radio Link Lost counting continue
+ * Set Fire Status for current SACCH frame
+ */
+ g_ULCCHData.ulcchword0.bitval.fireStatus = 1;
+ }
+
+ /*
+ * pre fill channel Number for Radio Link Lost Message to RRM
+ */
+ ackMsg.params[0] = timeSlot | 0x8;
+
+ break;
+
+ default: /* Non supported GSM Group */
+ chState = CHAN_INACTIVE;
+ break;
+ }
+
+ /*----------------------------------------------------------------------------------
+ * If TCH or SDCCH is active and this SACCH failed parity, check for RF link lost
+ *----------------------------------------------------------------------------------*/
+ if ( (chState == CHAN_ACTIVE) && g_ULCCHData.ulcchword0.bitval.fireStatus )
+ {
+ /*-----------------------------------------------------------
+ * If lostCount at threshold and RLL enabled, send message
+ *----------------------------------------------------------*/
+ if( ++sacchInfo->lostCount >= radioLinkLostThrsh && g_diagData.sendRadioLinkLost )
+ {
+ /*
+ * allow send additional RLL on next Period, if the channel is not released
+ */
+ sacchInfo->lostCount = 0;
+ /*
+ * send RF link loss indication to RRM to release RF resource
+ */
+ ackMsg.msgSize = 9;
+ ackMsg.function = DCCH_MANAGE_MSG;
+ ackMsg.trx = rfCh;
+ ackMsg.typeLoByte = DCH_RF_LINK_LOST_IND;
+ ackMsg.typeHiByte = DCH_RF_LINK_LOST_IND>>8;
+ /* ackMsg.params[0] is set above */
+ ackMsg.params[1] = 0;
+ ackMsg.params[2] = 0;
+ ackMsg.params[3] = sacchInfo->lostCount;
+ ackMsg.params[4] = g_idleFrameInfo[rfCh][timeSlot].rcvPower;
+ SendMsgHost_Que(&ackMsg);
+
+
+
+
+
+ /*
+ * If enabled, send idle frame I/Q samples to host
+ */
+ if ( g_diagData.sendIdleFrameCapture )
+ {
+ idleChanDiagReport(rfCh, timeSlot);
+ }
+ }
+ }
+}
+
+/*****************************************************************************
+*
+* Function: dlSacchProc0
+*
+* Description:
+* Processes downlink SACCH bursts for frame 0 of every 0-3 block
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dlSacchProc0(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_chanState sacchState;
+ t_DLSigBufs *sacchMsg;
+ t_sysInfoQueue *sysInfoMsg;
+ Uint8 subCh;
+ Uint8 sysInfo, validSacch;
+ Uint8 msTimingAdvance;
+ Uint8 msPowerLevel;
+ Uint8 sendSysInfo = 1;
+
+ t_TNInfo *ts;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ validSacch = 0;
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_1:
+ sacchState = ts->u.group1.sacch.state;
+ sacchMsg = ts->u.group1.sacch.dlSigBuf;
+ msPowerLevel = ts->u.group1.sacch.powerLevel;
+ msTimingAdvance = ts->u.group1.sacch.timingAdvance;
+
+ /*
+ * Check if L2/L3 has SACCH message, otherwise send SYS INFO
+ */
+ if(sacchMsg->numMsgsReady)
+ {
+ sendSysInfo = 0;
+ rtsCheck(rfCh, timeSlot, SACCH, 0, 0);
+ sacchMsg->numMsgsReady--;
+ }
+ else
+ {
+ sysInfo = ts->u.group1.sacch.sysInfo++;
+
+ /*
+ * send only sysinfo TYPE_5 , TYPE_5 and TYPE_6
+ */
+ if(sysInfo >= 2)
+ {
+ sysInfoMsg = & g_dlSigBufsSYSINFO[rfCh][TYPE_6];
+ ts->u.group1.sacch.sysInfo = 0;
+ }
+ else
+ {
+ sysInfoMsg = & g_dlSigBufsSYSINFO[rfCh][TYPE_5];
+ }
+ }
+ break;
+
+ case GSM_GROUP_5:
+ subCh = ts->u.group5.dlSacchSubCh;
+ sacchState = ts->u.group5.sacch[subCh].state;
+ sacchMsg = ts->u.group5.sacch[subCh].dlSigBuf;
+ msPowerLevel = ts->u.group5.sacch[subCh].powerLevel;
+ msTimingAdvance = ts->u.group5.sacch[subCh].timingAdvance;
+
+ /*
+ * Check if L2/L3 has SACCH message, otherwise send SYS INFO
+ */
+ if(sacchMsg->numMsgsReady)
+ {
+ sendSysInfo = 0;
+ rtsCheck(rfCh, timeSlot, SACCH, subCh, 0);
+ sacchMsg->numMsgsReady--;
+ }
+ else
+ {
+ /*
+ * get sysinfo to be sent
+ */
+ sysInfo = ts->u.group5.sacch[subCh].sysInfo++;
+
+ /*
+ * send only sysinfo TYPE_5 , TYPE_5 and TYPE_6
+ */
+ if(sysInfo >= 2)
+ {
+ sysInfoMsg = & g_dlSigBufsSYSINFO[rfCh][TYPE_6];
+ ts->u.group5.sacch[subCh].sysInfo = 0;
+ }
+ else
+ {
+ sysInfoMsg = & g_dlSigBufsSYSINFO[rfCh][TYPE_5];
+ }
+ }
+
+ break;
+
+
+
+ case GSM_GROUP_7:
+ subCh = ts->u.group7.dlSacchSubCh;
+ sacchState = ts->u.group7.sacch[subCh].state;
+ sacchMsg = ts->u.group7.sacch[subCh].dlSigBuf;
+ msPowerLevel = ts->u.group7.sacch[subCh].powerLevel;
+ msTimingAdvance = ts->u.group7.sacch[subCh].timingAdvance;
+
+ /*
+ * Check if L2/L3 has SACCH message, otherwise send SYS INFO
+ */
+ if(sacchMsg->numMsgsReady)
+ {
+ sendSysInfo = 0;
+ rtsCheck(rfCh, timeSlot, SACCH, subCh, 0);
+ sacchMsg->numMsgsReady--;
+ }
+ else
+ {
+ /*
+ * get sysinfo to be sent
+ */
+ sysInfo = ts->u.group7.sacch[subCh].sysInfo++;
+
+ /*
+ * send only sysinfo TYPE_5, TYPE_5 and TYPE_6
+ */
+ if(sysInfo >= 2)
+ {
+ sysInfoMsg = & g_dlSigBufsSYSINFO[rfCh][TYPE_6];
+ ts->u.group7.sacch[subCh].sysInfo = 0;
+ } else {
+ sysInfoMsg = & g_dlSigBufsSYSINFO[rfCh][TYPE_5];
+ }
+ }
+
+ break;
+
+
+ default:
+ sacchState = CHAN_INACTIVE;
+ break;
+ }
+
+ if(sacchState == CHAN_ACTIVE)
+ {
+ if(sendSysInfo)
+ {
+ /*
+ * send SYSTEM_INFO
+ */
+ if(sysInfoMsg->frameNumUpdate == sysFrameNum.FN % (32*1326))
+ {
+ sysInfoMsg->state ^= 0x01;
+ sysInfoMsg->frameNumUpdate = 0xffffffff;
+ sysInfoMsg->valid = 1;
+ }
+ /*
+ * add L1 headers
+ */
+ sysInfoMsg->data[sysInfoMsg->state][0] = msPowerLevel;
+ sysInfoMsg->data[sysInfoMsg->state][1] = msTimingAdvance;
+ // This seems to be a bug that has remained.
+
+ if (ts->groupNum == GSM_GROUP_1){
+ sysInfoMsg->data[sysInfoMsg->state][4] |= ts->u.group1.tch.dlDtxUsed<<7;
+ }
+
+
+
+ unpackFromByteBuffer(&sysInfoMsg->data[sysInfoMsg->state][0],
+ (UChar *)&g_DLCCHData.data[0],
+ NUM_BITS_CCH_FRAME);
+
+ }
+ else
+ {
+ /*
+ * send SACCH MSG, e.g SMS-PP
+ */
+ sacchMsg->data[sacchMsg->readIndex][0] = msPowerLevel;
+ sacchMsg->data[sacchMsg->readIndex][1] = msTimingAdvance;
+ sacchMsg->data[sacchMsg->readIndex][4] |= ts->u.group1.tch.dlDtxUsed<<7;
+
+ unpackFromByteBuffer(&sacchMsg->data[sacchMsg->readIndex++][0],
+ (UChar *)&g_DLCCHData.data[0],
+ NUM_BITS_CCH_FRAME);
+
+ sacchMsg->readIndex &= (DL_SIG_Q_DEPTH-1);
+
+ }
+
+ g_DLCCHData.bufferValid = TRUE;
+ chanEncoder(SACCH, 1, timeSlot,0);
+ encrypt(rfCh, timeSlot, 0);
+ buildGSMBurst(SACCH, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, SACCH);
+ }
+ else
+ {
+ /*
+ * send a filler frame
+ unpackFromByteBuffer(& dcchFiller,
+ (UChar *)&g_DLCCHData.data[0],
+ NUM_BITS_CCH_FRAME);
+ */
+
+ /*
+ * send a dummy burst if channel is not activated
+ */
+ dlIdleProc(rfCh, timeSlot);
+ }
+}
+
+/*****************************************************************************
+*
+* Function: dlSacchProc1
+*
+* Description:
+* Processes downlink SACCH bursts for frames 1 and 2 of every 0-3 block
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dlSacchProc1(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ t_chanState sacchState;
+ Uint8 subCh;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_1:
+ sacchState = ts->u.group1.sacch.state;
+ break;
+
+ case GSM_GROUP_5:
+ subCh = ts->u.group5.dlSacchSubCh;
+ sacchState = ts->u.group5.sacch[subCh].state;
+ break;
+
+ case GSM_GROUP_7:
+ subCh = ts->u.group7.dlSacchSubCh;
+ sacchState = ts->u.group7.sacch[subCh].state;
+ break;
+
+
+ default:
+ sacchState = CHAN_INACTIVE;
+ break;
+ }
+
+ if(sacchState == CHAN_ACTIVE)
+ {
+ chanEncoder(SACCH, 0, timeSlot,0);
+ encrypt(rfCh, timeSlot, 1);
+ buildGSMBurst(SACCH, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, SACCH);
+ }
+ else
+ {
+ /*
+ * send a dummy burst if channel is not activated
+ */
+ dlIdleProc(rfCh, timeSlot);
+ }
+}
+
+/*****************************************************************************
+*
+* Function: dlSacchProc3
+*
+* Description:
+* Processes downlink SACCH bursts for frame 3 of every 0-3 block
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dlSacchProc3(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ t_chanState sacchState;
+ Uint8 subCh;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_1:
+ sacchState = ts->u.group1.sacch.state;
+ break;
+
+ case GSM_GROUP_5:
+ /*----------------------------------------------------------
+ * Get current SACCH subchannel, increment structure value
+ * to next subchannel, and set SACCH info pointer and state
+ *----------------------------------------------------------*/
+ subCh = ts->u.group5.dlSacchSubCh;
+ if ( ++ts->u.group5.dlSacchSubCh >= NUM_SACCH_SUBCHANS )
+ {
+ ts->u.group5.dlSacchSubCh = 0;
+ }
+ sacchState = ts->u.group5.sacch[subCh].state;
+ break;
+
+ case GSM_GROUP_7:
+ /*----------------------------------------------------------
+ * Get current SACCH subchannel, increment structure value
+ * to next subchannel, and set SACCH info pointer and state
+ *----------------------------------------------------------*/
+ subCh = ts->u.group7.dlSacchSubCh;
+ if ( ++ts->u.group7.dlSacchSubCh >= NUM_SACCH8_SUBCHANS )
+ {
+ ts->u.group7.dlSacchSubCh = 0;
+ }
+ sacchState = ts->u.group7.sacch[subCh].state;
+ break;
+
+ default:
+ sacchState = CHAN_INACTIVE;
+ break;
+ }
+
+ if(sacchState == CHAN_ACTIVE)
+ {
+ chanEncoder(SACCH, 0, timeSlot,0);
+ encrypt(rfCh, timeSlot, 3);
+ buildGSMBurst(SACCH, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, SACCH);
+ }
+ else
+ {
+ /*
+ * send a dummy burst if channel is not activated
+ */
+ dlIdleProc(rfCh, timeSlot);
+ }
+}
+
+/*****************************************************************************
+*
+* Function: idleChanDiagReport
+*
+* Description:
+* Sends idle frame I/Q back to host for Diagnostic purpose
+* to check is Any interferences on idle channel or Abnormal signal
+* on I/Q samples
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void idleChanDiagReport(Uint8 rfCh, Uint8 timeSlot)
+{
+ msgStruc idleDiagMsg;
+ Int16 i, j;
+ Uint32 *outBuf;
+
+ idleDiagMsg.msgSize = 60;
+ idleDiagMsg.function = DIAGNOSTIC_MSG;
+ idleDiagMsg.trx = rfCh;
+ idleDiagMsg.typeLoByte = MPH_DSP_DIAG_IDLE_FRAME_LOG_RSP;
+ idleDiagMsg.typeHiByte = MPH_DSP_DIAG_IDLE_FRAME_LOG_RSP>>8;
+ idleDiagMsg.params[0] = timeSlot;
+ idleDiagMsg.params[1] = 0;
+ idleDiagMsg.params[2] = 0;
+
+ /*
+ * Ready pointer to copy longwords
+ */
+ outBuf = (Uint32*)(&idleDiagMsg.params[4]);
+
+ for(j=0; j<13; j++)
+ {
+ idleDiagMsg.params[3] = j; /* block Number of an idle Frame */
+ for(i=0; i<(156/13); i++)
+ outBuf[i] = g_idleFrameInfo[rfCh][timeSlot].data[i+j*(156/13)];
+ SendMsgHost_Que( & idleDiagMsg);
+ }
+}
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/sdcch.c b/data/mnet/GP10/Dsp/synchctrl/sdcch.c
new file mode 100644
index 0000000..e8a2165
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/sdcch.c
@@ -0,0 +1,344 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: sdcch.c
+*
+* Description:
+* This file contains functions that process SDCCH frames.
+*
+* Public Functions:
+* ulSdcchProc0, ulSdcchProc3, dlSdcchProc0, dlSdcchProc3
+*
+* Private Functions:
+* None
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "bbdata.h"
+#include "rrmsg.h"
+#include "dsprotyp.h"
+#include "agcdata.h"
+
+/*****************************************************************************
+*
+* Function: ulSdcchProc0
+*
+* Description:
+* Processes uplink SDCCH bursts for frames 0,1,2 of every 0-3 block
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void ulSdcchProc0(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ Uint8 chType;
+ Uint8 subChan;
+ Uint8 tmpChan;
+ t_chanState chState;
+ t_SACCHInfo *sacchInfo;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+ tmpChan = 0;
+
+ if (ts->groupNum == GSM_GROUP_5)
+ {
+ chType = SDCCH4;
+ subChan = ts->u.group5.ulSdcchSubCh;
+ chState = ts->u.group5.sdcch[subChan].state;
+ sacchInfo = & ts->u.group5.sacch[subChan];
+ tmpChan = subChan +NUM_TN_PER_RF;
+ }
+ else
+ {
+ chState = CHAN_INACTIVE;
+ }
+
+ if (ts->groupNum == GSM_GROUP_7){
+ chType = SDCCH4;
+ subChan = ts->u.group7.ulSdcchSubCh;
+ chState = ts->u.group7.sdcch[subChan].state;
+ sacchInfo = & ts->u.group7.sacch[subChan];
+ tmpChan = subChan;
+ }
+
+
+ if(chState == CHAN_ACTIVE){
+
+ /*--- Update the DC offset for this SDCCH ---*/
+ DCOffset( g_BBInfo[rfCh].ulBBSmpl, ts->groupNum, rfCh, tmpChan );
+
+ demodulate( g_BBInfo[rfCh].ulBBSmpl,
+ chType,
+ g_BBInfo[rfCh].tseqNum,
+ &g_ULBurstData,
+ ts->groupNum,
+ rfCh,
+ timeSlot,
+ subChan );
+
+ chanDecoder(chType, 0, timeSlot);
+ accumPower(rfCh, timeSlot, ts->groupNum, SDCCH, sacchInfo, NULL);
+ }
+}
+
+/*****************************************************************************
+*
+* Function: ulSdcchProc3
+*
+* Description:
+* Processes uplink SDCCH bursts for frame 3 of every 0-3 block
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void ulSdcchProc3(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ Uint8 chType;
+ Uint8 subChan;
+ Uint8 tmpChan;
+ t_chanState chState;
+ t_SACCHInfo *sacchInfo;
+
+ t_ULSignalStrength *sigS;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+ tmpChan = 0;
+
+ if(ts->groupNum == GSM_GROUP_5)
+ {
+ /*----------------------------------------------------------
+ * Get current SDCCH subchannel, increment structure value
+ * to next subchannel, and set its SACCH info pointer
+ *----------------------------------------------------------*/
+ chType = SDCCH4;
+ subChan = ts->u.group5.ulSdcchSubCh;
+ if ( ++ts->u.group5.ulSdcchSubCh >= NUM_SDCCH_SUBCHANS )
+ {
+ ts->u.group5.ulSdcchSubCh = 0;
+ }
+ chState = ts->u.group5.sdcch[subChan].state;
+ sacchInfo = & ts->u.group5.sacch[subChan];
+ tmpChan = subChan + NUM_TN_PER_RF;
+ }
+ else
+ {
+ chState = CHAN_INACTIVE;
+ }
+
+
+ if(ts->groupNum == GSM_GROUP_7)
+ {
+ /*----------------------------------------------------------
+ * Get current SDCCH subchannel, increment structure value
+ * to next subchannel, and set its SACCH info pointer
+ *----------------------------------------------------------*/
+ chType = SDCCH4;
+ subChan = ts->u.group7.ulSdcchSubCh;
+ if ( ++ts->u.group7.ulSdcchSubCh >= NUM_SDCCH8_SUBCHANS )
+ {
+ ts->u.group7.ulSdcchSubCh = 0;
+ }
+ chState = ts->u.group7.sdcch[subChan].state;
+ sacchInfo = & ts->u.group7.sacch[subChan];
+ tmpChan = subChan;
+ }
+
+ if(chState == CHAN_ACTIVE)
+ {
+ /*--- Update the DC offset for this SDCCH ---*/
+ DCOffset( g_BBInfo[rfCh].ulBBSmpl, ts->groupNum, rfCh, tmpChan );
+
+ demodulate( g_BBInfo[rfCh].ulBBSmpl,
+ chType,
+ g_BBInfo[rfCh].tseqNum,
+ &g_ULBurstData,
+ ts->groupNum,
+ rfCh,
+ timeSlot,
+ subChan );
+ /*
+ * frame boundary is 1
+ */
+ chanDecoder(chType, 1, timeSlot);
+ accumPower(rfCh, timeSlot, ts->groupNum, SDCCH4, sacchInfo, NULL);
+
+ /*-----------------------------------------------------------
+ * Accumlate bit errors and frame errors into SACCH structure
+ *-----------------------------------------------------------*/
+ accumBer(rfCh, timeSlot, ts->groupNum, SDCCH4, subChan,
+ sacchInfo, FALSE, FALSE);
+
+ /*-----------------------------------------------------------
+ * Update AGC on final burst of SDCCH frame
+ *----------------------------------------------------------*/
+ if(g_AGC_ON)
+ {
+ sigS = & sacchInfo->ulsigstren;
+ sigS->rxPwrNormSmooth = ul_agc(sigS);
+ }
+
+ ulSyncMsgProcess(chType, subChan, timeSlot, rfCh);
+ }
+}
+
+/*****************************************************************************
+*
+* Function: dlSdcchProc0
+*
+* Description:
+* Processes downlink SDCCH bursts for frame 0 of every 0-3 block
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dlSdcchProc0(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ t_DLSigBufs *sdcchMsg;
+ t_CBCHInfo smscbMsg;
+ Uint8 subCh;
+ Bool msgReady = 0;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_5:
+ subCh = ts->u.group5.dlSdcchSubCh++;
+ /*if(ts->u.group5.sdcch.state[] == CHAN_ACTIVE)*/
+ sdcchMsg = ts->u.group5.sdcch[subCh].dlSigBuf;
+ ts->u.group5.dlSdcchSubCh &= 0x3;
+
+
+ if(sdcchMsg->numMsgsReady)
+ {
+ processCCHBuff(sdcchMsg) ;
+ rtsCheck(rfCh, timeSlot, SDCCH4, subCh, 0);
+ msgReady = 1;
+ }
+ else if(ts->u.group5.cbchUsed && (subCh == 2))
+ {
+ /*
+ * check if SMSCB normal or SMSCB ext
+ */
+ smscbMsg.dlSigBuf = ts->u.group5.cbch[(ts->u.group5.dlSmscbTB/4)].dlSigBuf;
+
+ if(smscbMsg.dlSigBuf->bufValid == 1)
+ {
+ unpackFromByteBuffer( & smscbMsg.dlSigBuf->data[ts->u.group5.dlSmscbTB & 0x03][0],
+ (UChar *)&g_DLCCHData.data[0],
+ NUM_BITS_CCH_FRAME);
+ msgReady = 1;
+
+ if(ts->u.group5.dlSmscbTB == 3)
+ {
+ rtsCheck(rfCh, timeSlot, CBCH, subCh, 0);
+ }
+ else if(ts->u.group5.dlSmscbTB == 7)
+ {
+ rtsCheck(rfCh, timeSlot, CBCH_EXT, subCh, 0);
+ }
+ }
+
+ }
+
+ /*
+ * CBCH phase updates
+ */
+ if(subCh == 2 )
+ {
+ ts->u.group5.dlSmscbTB++;
+ ts->u.group5.dlSmscbTB &= 7;
+ }
+
+ break;
+
+
+ case GSM_GROUP_7:
+ subCh = ts->u.group7.dlSdcchSubCh++;
+ sdcchMsg = ts->u.group7.sdcch[subCh].dlSigBuf;
+ ts->u.group7.dlSdcchSubCh &= 0x7;
+
+
+ if(sdcchMsg->numMsgsReady)
+ {
+ processCCHBuff(sdcchMsg) ;
+ rtsCheck(rfCh, timeSlot, SDCCH8, subCh, 0);
+ msgReady = 1;
+ }
+
+ break;
+
+ default:
+ break;
+ }
+
+ /*
+ * always send DCCH filler if no message to send
+ */
+ if(!msgReady)
+ {
+ unpackFromByteBuffer(dcchFiller,
+ (UChar *)&g_DLCCHData.data[0],
+ NUM_BITS_CCH_FRAME);
+ }
+
+ g_DLCCHData.bufferValid = TRUE;
+ chanEncoder(SDCCH4, 1, timeSlot,0);
+ buildGSMBurst(SDCCH4, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, SDCCH4);
+}
+
+
+/*****************************************************************************
+*
+* Function: dlSdcchProc0
+*
+* Description:
+* Processes downlink SDCCH bursts for frames 1,2,3 of every 0-3 block
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dlSdcchProc3(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ t_DLSigBufs *sdcchMsg;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ chanEncoder(SDCCH4, 0, timeSlot,0);
+ buildGSMBurst(SDCCH4, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, SDCCH4);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/syncmsg.c b/data/mnet/GP10/Dsp/synchctrl/syncmsg.c
new file mode 100644
index 0000000..cc88f2d
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/syncmsg.c
@@ -0,0 +1,958 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/****************************************************************************
+** Filename: syncmsg.c
+**
+** Description:
+** This file contains routines in support of the synchronous message
+** handling. Specifically, the routines in this file are responsible
+** for interfacin the Channel CODEC input and output buffers with the
+** asynchronous control code.
+**
+*****************************************************************************/
+#include "gsmdata.h"
+#include "oamdata.h"
+#include "rrmsg.h"
+#include "bbdata.h"
+#include "dsprotyp.h"
+#include "diagdata.h"
+#include "codec.h"
+
+extern Uint8 USFCodingTableCS23[8];
+extern Uint16 USFCodingTableCS4[8];
+
+static DataBlkSizes[] = {23, 34, 39, 53, 0, 0, 0, 0};
+
+
+
+
+/*****************************************************************************
+** ROUTINE NAME: populateNCellInfo
+**
+** Description:
+**
+** Method:
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+**
+** Returns:
+** None
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+Uint8 populateNCellInfo(Uint8 TN, Uint8 rfCh, Uint8 *outbuf)
+{
+ t_TNInfo *ts;
+ Uint8 tempBSIC[6], tempRXLEV[6], noMeasPerSacch, i, j;
+ Uint8 tempARFCN_IDX[6];
+ Uint8 tempbuf[10]; /* !! */
+
+ ts = & g_BBInfo[rfCh].TNInfo[TN];
+
+ /* NO-NCELL-M is the number of neighbouring cell measurments (octets 4,5) */
+ noMeasPerSacch = ((*outbuf & 0x01) << 2) | (((*(outbuf+1)) & 0xC0) >> 6);
+
+ if(noMeasPerSacch == 7) {
+ noMeasPerSacch = 0;
+ }
+
+ /* global storage area for handover alg */
+ ts->u.group1.sacch.noNCellM = noMeasPerSacch;
+
+ /* each neighbouring cell has 3 values associated with it:
+ * 1) RXLEV-NCELL# (6 bits) ... copy to global data if 2) and 3) are ok.
+ * 2) BCCH-FREQ-NCELL# (5 bits) ... find first
+ * 3) BSIC-NCELL# (6 bits) ... check second
+ */
+
+ if(noMeasPerSacch != 0) {
+ /* brute force copy to 3 temp buffers for easier manipulation. No need to
+ * optimize the hardcoded masks, unless the gsm spec changes */
+ tempRXLEV[0] = *(outbuf+1) & 0x3F;
+ tempARFCN_IDX[0] = (*(outbuf+2) & 0xF8) >> 3;
+ tempBSIC[0] = ((*(outbuf+2) & 0x07) << 3) | ((*(outbuf+3) & 0xE0) >> 5);
+
+ tempRXLEV[1] = ((*(outbuf+3) & 0x1F) << 1) | ((*(outbuf+4) & 0x80) >> 7);
+ tempARFCN_IDX[1] = (*(outbuf+4) & 0x7C) >> 2;
+ tempBSIC[1] = ((*(outbuf+4) & 0x03) << 4) | ((*(outbuf+5) & 0xF0) >> 4);
+
+ tempRXLEV[2] = ((*(outbuf+5) & 0x0F) << 2) | ((*(outbuf+6) & 0xC0) >> 6);
+ tempARFCN_IDX[2] = (*(outbuf+6) & 0x3E) >> 1;
+ tempBSIC[2] = ((*(outbuf+6) & 0x01) << 5) | ((*(outbuf+7) & 0xF8) >> 3);
+
+ tempRXLEV[3] = ((*(outbuf+7) & 0x07) << 3) | ((*(outbuf+8) & 0xE0) >> 5);
+ tempARFCN_IDX[3] = (*(outbuf+8) & 0x1F) >> 0;
+ tempBSIC[3] = (*(outbuf+9) & 0xFC) >> 2;
+
+ tempRXLEV[4] = ((*(outbuf+9) & 0x03) << 4) | ((*(outbuf+10) & 0xF0) >> 4);
+ tempARFCN_IDX[4] = ((*(outbuf+10) & 0x0F) << 1) | (*(outbuf+11) & 0x80) >> 7;
+ tempBSIC[4] = (*(outbuf+11) & 0x7E) >> 1;
+
+ tempRXLEV[5] = ((*(outbuf+11) & 0x01) << 5) | ((*(outbuf+12) & 0xF8) >> 3);
+ tempARFCN_IDX[5] = ((*(outbuf+12) & 0x07) << 2) | ((*(outbuf+13) & 0xC0) >> 6);
+ tempBSIC[5] = (*(outbuf+13) & 0x3F) >> 0;
+ }
+
+ /* refresh always */
+ for(i=0; i < MAX_NUM_NCELL_CANDIDATES; i++) {
+ ts->u.group1.tch.NCell[i].rfCh = 0;
+ ts->u.group1.tch.NCell[i].bsic = 0;
+ ts->u.group1.tch.NCell[i].rxLev = 0;
+ ts->u.group1.tch.NCell[i].oamIdx = 0;
+ }
+
+ for(i=0; i < noMeasPerSacch; i++) {
+ /* search into global struct to copy
+ * 1) oam index mapped to arfcn, 2) bsic, both to NCellInfo struct in tchInfo
+ */
+ if(g_HoOAMInfo.uniqueParms[tempARFCN_IDX[i]].bsic == tempBSIC[i]) {
+ ts->u.group1.tch.NCell[i].rfCh = g_HoOAMInfo.uniqueParms[tempARFCN_IDX[i]].rfCh;
+ ts->u.group1.tch.NCell[i].bsic = tempBSIC[i];
+ ts->u.group1.tch.NCell[i].rxLev = tempRXLEV[i];
+ ts->u.group1.tch.NCell[i].oamIdx = tempARFCN_IDX[i];
+ }
+ }
+
+ return(noMeasPerSacch);
+}
+
+
+/*****************************************************************************
+** ROUTINE NAME: processCCHBuff
+**
+** Description:
+**
+** Method:
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+**
+** Returns:
+** None
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+void processCCHBuff(t_DLSigBufs* sigBufPtr)
+{
+ UShort index;
+
+ if(sigBufPtr->numMsgsReady)
+ {
+ /*
+ * A message is pending and is ready for transmission. Load the message
+ * into the Channel CODEC input buffer
+ */
+ index = sigBufPtr->readIndex;
+
+ unpackFromByteBuffer(&sigBufPtr->data[index][0],
+ (UChar *)&g_DLCCHData.data[0],
+ NUM_BITS_CCH_FRAME);
+
+ g_DLCCHData.bufferValid = TRUE;
+
+ sigBufPtr->numMsgsReady--;
+
+ sigBufPtr->readIndex = (sigBufPtr->readIndex + 1) & (DL_SIG_Q_DEPTH-1);
+ }
+}
+
+
+/*****************************************************************************
+** ROUTINE NAME: processPCCCHBuff
+**
+** Description:
+**
+** Method:
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+**
+** Returns:
+** None
+**
+** Data Store I/O:
+**
+*****************************************************************************/
+void processPCCCHBuff(t_DLPPCHBufs* sigBufPtr)
+{
+ if(sigBufPtr->msgReady)
+ {
+ /*
+ * A message is pending and is ready for transmission. Load the message
+ * into the Channel CODEC input buffer
+ */
+ unpackFromByteBuffer(&sigBufPtr->data[0],
+ (UChar *)&g_DLCCHData.data[0],
+ NUM_BITS_CCH_FRAME);
+
+ g_DLCCHData.bufferValid = TRUE;
+ sigBufPtr->msgReady = 0;
+ }
+}
+
+/*****************************************************************************
+** ROUTINE NAME: ulSyncMsgProcess
+**
+** Description:
+** This routine is responsible for interfacing the Channel CODEC with the
+** aynchronous control code. Specifically, TN, this routine processes recieved
+** frame (if a frame is ready) and loads the uplink signaling buffer
+** (g_BBInfo[0].TNInfo[TN].ulSigBuf) with the frame if a frame has been
+** received.
+**
+** Method:
+** This routine assummes uses the data store in the g_BBInfo data structure as
+** defined in the design document section 5.3.1, and 5.4.1.
+**
+** The design and coding of this routine is based on the description in
+** the design document section 5.4.1, and 4.6.8.1.
+**
+** Error Handling:
+**
+** Limitations:
+**
+** Parameter I/O:
+** TN - Timeslot number
+**
+** Returns:
+** None
+**
+** Data Store I/O:
+** The format of the data and the bit order is consistent with GSM 04.04
+** sections 7.1, 7.3, and 7.5, and GSM 04.06, section 2.8, where the lowest
+** order bit in an octet is assummed to be the LSB of that octet. The first
+** octet is reserved for the channel type to make the frame identification
+** easier. This is shown in the illustration below:
+**
+**
+** MSB LSB
+** 8 7 6 5 4 3 2 1
+**
+** chanSel octet 1
+** d7 d6 d5 d4 d3 d2 d1 d0 octet 2
+** d15 d14 d13 d12 d11 d10 d9 d8 octet 3
+**
+** ....(etc)....
+**
+** dM ..............dM-4 octet N+1
+**
+** Note that for CCH channels, N = 23 and M = 183.
+** For RACH, N = 1 and M = 7.
+**
+*****************************************************************************/
+Int32 rachReceived = 0;
+
+Int32 sacchReceived = 0;
+Int32 sdcchReceived = 0;
+Int32 facchReceived = 0;
+
+Int32 sacch4Received[4] = {0, 0, 0, 0};
+Int32 sdcch4Received[4] = {0, 0, 0, 0};
+
+Int32 sacch8Received[8] = {0, 0, 0, 0, 0, 0 , 0 , 0};
+Int32 sdcch8Received[8] = {0, 0, 0, 0, 0, 0 , 0 , 0};
+
+void ulSyncMsgProcess(t_chanSel chanSel, Uint8 subchan, Uint8 TN, Uint8 rfCh)
+{
+ Uchar frameDetected;
+ UInt i;
+ UChar index;
+ msgStruc ulPhDataMsg;
+ t_encryptState* encryptState;
+ t_TNInfo *ts;
+ Uint8 chanNum;
+ Uint8 subCh;
+ Uint8 linkId;
+ Bool flag = 0;
+ Uint8 tmp[10];
+ Uint8 noSacchMeas = 0;
+ Uint8 j, tempbuf[15];
+ Uint16 tempUsfCode;
+ Uint8 *dataBuf;
+ static Uint8 diagRptCount=0;
+ chActMsgStruc hostChActInfo;
+ Uint8 rxLevFull;
+ Uint8 rxLevSub;
+ Uint8 rxLev;
+ Uint8 rxQualFull;
+ Uint8 rxQualSub;
+ Uint8 rxQual;
+ Uint8 dataBytes;
+ tbfStruct *tbf;
+ Uint8 ulBlock, dlBlock;
+ t_blkNumWatch *blkNumWatch;
+
+
+
+
+
+ ts = & g_BBInfo[rfCh].TNInfo[TN];
+
+
+ switch (ts->groupNum){
+ case GSM_GROUP_13:
+ blkNumWatch = ts->u.group13.blkNumWatch;
+ ulBlock = ts->u.group13.ulBlock;
+ dlBlock = ts->u.group13.dlBlock;
+ break;
+ case GSM_GROUP_11:
+ blkNumWatch = ts->u.group11.blkNumWatch;
+ ulBlock = ts->u.group11.ulBlock;
+ dlBlock = ts->u.group11.dlBlock;
+ break;
+ default:
+ break;
+ }
+
+
+ switch(chanSel)
+ {
+ case RACH:
+
+ if(g_ULRACHData.ulRACHword0.bitval.bufferValid &&
+ g_ULRACHData.ulRACHword0.bitval.rachDet)
+ {
+ /*
+ * A RACH frame has been detected, Obtain a pointer to
+ * the destination uplink signaling buffer. The RACH channel
+ * uses the same uplink signaling buffer.
+ */
+
+ if (sacchReceived+sdcchReceived + rachReceived <156)
+ {
+ g_UlBurstLog[sacchReceived+sdcchReceived+rachReceived] =
+ g_ULBurstData.toa & 0x00ff | g_ULBurstData.rcvPower<<16 | sysFrameNum.t3 <<8;
+ }
+ rachReceived++;
+
+ /*
+ * Copy the unpacked decoded data into the packed buffer
+ * indexed by the local state variable.
+ */
+ packToByteBuffer( & g_ULRACHData.data[0],
+ & ulPhDataMsg.params[3],
+ NUM_BITS_RACH_FRAME );
+
+ /*
+ * Check if it is a HO Access burst
+ */
+ if((ts->groupNum == GSM_GROUP_1) && ts->u.group1.tch.HOFlag)
+ {
+ if(ulPhDataMsg.params[3] == ts->u.group1.tch.HOReference)
+ {
+ /* Settings for MS going to the target cell */
+ hostChActInfo.timeAdv = g_ULBurstData.toa;
+ hostChActInfo.msPowerInit = ts->u.group1.sacch.powerLevelInit;
+ hostChActInfo.msPower = g_ULBurstData.rcvPower;
+ initPower(&hostChActInfo, &ts->u.group1.sacch);
+ ts->u.group1.tch.HOFlag = FALSE;
+ }
+ else
+ {
+ /*
+ * Access Burst does not match HO Reference. Don't send it
+ * to host. Indicate that the UL buffer has been consumed
+ */
+ g_ULRACHData.ulRACHword0.bitval.bufferValid = FALSE;
+ return;
+ }
+ }
+
+ chXlate(ts->groupNum, chanSel, subchan, &chanNum, &linkId);
+
+
+ if ((ts->groupNum == GSM_GROUP_13) || (ts->groupNum == GSM_GROUP_11))
+ {
+ /*
+ * Put tag in UL PACCH and clear tag cause.
+ */
+ if((blkNumWatch[ulBlock].tagFillCause == RRB_AB) ||
+ (blkNumWatch[ulBlock].tagFillCause == DLA) ||
+ (blkNumWatch[ulBlock].tagFillCause == LAST_CHANCE_4_AB_DET))
+ {
+ /* build PH_PACCH_AB_INDication message */
+ ulPhDataMsg.msgSize = 10;
+ ulPhDataMsg.function = PDCH_MANAGE_MSG;
+ ulPhDataMsg.typeHiByte = PH_PACCH_AB_IND>>8;
+ ulPhDataMsg.typeLoByte = PH_PACCH_AB_IND;
+ ulPhDataMsg.trx = rfCh; /* for now */
+ ulPhDataMsg.params[0] = chanNum | TN; /* channel number */
+ ulPhDataMsg.params[1] = 0; /* channel number */
+
+ ulPhDataMsg.params[2] = blkNumWatch[ulBlock].tag;
+ /* ulPhDataMsg.params[3] = 0; /* Access burst info 8 msbs, for 8 or 11 bits */
+ /* ulPhDataMsg.params[4] = 0; /* Access burst info 3 lsbs, if 11 bits */
+ ulPhDataMsg.params[5] = g_ULBurstData.toa; /* same as timing advance for now */
+
+ blkNumWatch[ulBlock].tagFillCause = GRP13_AB_FOUND;
+
+ /**** >>> temporary diag when receiving UL PACCH */
+ tempbuf[0] = dlBlock;
+ tempbuf[1] = ulBlock;
+ tempbuf[2] = blkNumWatch[ulBlock].tagFillCause;
+ tempbuf[3] = blkNumWatch[ulBlock].tag;
+ sendDiagMsg(0x31, rfCh, TN, 4, tempbuf);
+ }
+ }
+
+ else
+ {
+ /* build PH_RANDOM_ACCESS_INDication message */
+ ulPhDataMsg.msgSize = 13;
+ ulPhDataMsg.function = RR_MANAGE_MSG;
+ ulPhDataMsg.typeHiByte = PH_RANDOM_ACCESS_IND_HI;
+ ulPhDataMsg.typeLoByte = PH_RANDOM_ACCESS_IND_LO;
+ ulPhDataMsg.trx = rfCh; /* for now */
+ ulPhDataMsg.params[0] = chanNum | TN; /* channel number */
+ ulPhDataMsg.params[1] = 0; /* channel number */
+ ulPhDataMsg.params[2] = linkId; /* link identifier */
+ /* ulPhDataMsg.params[3] = sigBufPtr->msg[index].data[0]; */
+ ulPhDataMsg.params[4] = (sysFrameNum.t3 >> 3) | (sysFrameNum.t1 << 3); /* Request Referanse */
+ ulPhDataMsg.params[5] = sysFrameNum.t2 | (sysFrameNum.t3 << 5); /* Request Referanse */
+ ulPhDataMsg.params[6] = g_ULBurstData.toa; /* Acsess Delay */
+ ulPhDataMsg.params[7] = g_ULBurstData.rcvPower; /* Access Delay */
+ ulPhDataMsg.params[8] = g_ULBurstData.snr; /* SINR */
+ }
+
+
+
+
+ SendMsgHost_Que(& ulPhDataMsg);
+
+ }
+
+
+
+ else if ((ts->groupNum == GSM_GROUP_13 || ts->groupNum == GSM_GROUP_11) &&
+ blkNumWatch[ulBlock].tagFillCause == LAST_CHANCE_4_AB_DET )
+ {
+ /*
+ * When no access burst message is received and if (1) Reserved Block is expected from PACCH
+ * or (2) DL Assignment (both set on the calling function ulPdchProc3, then send
+ * PACCH negative acknowledgement.
+ */
+ ulPhDataMsg.msgSize = 7; /* always CS-1 */
+ ulPhDataMsg.function = PDCH_MANAGE_MSG;
+ ulPhDataMsg.typeHiByte = PH_PACCH_NACK >> 8;
+ ulPhDataMsg.typeLoByte = PH_PACCH_NACK;
+ ulPhDataMsg.trx = rfCh;
+ ulPhDataMsg.params[0] = chanNum | TN; /* channel number */
+ ulPhDataMsg.params[1] = 0;
+ ulPhDataMsg.params[2] = blkNumWatch[ulBlock].tag;
+
+ SendMsgHost_Que(& ulPhDataMsg);
+ }
+
+ /*
+ * Indicate that the UL buffer has been consumed
+ */
+ g_ULRACHData.ulRACHword0.bitval.bufferValid = FALSE;
+ break;
+
+
+ case PDCH:
+ /*
+ * Other uplink signaling (PACCH) or data (PDTCH) channels
+ * use the same buffers. Format is based on GSM 04.60 (section 10 RLC/MAC messages)
+ */
+ if ( g_ULCCHData.ulcchword0.bitval.bufferValid &&
+ ! g_ULCCHData.ulcchword0.bitval.fireStatus )
+ {
+
+ chXlate(ts->groupNum, chanSel, subchan, &chanNum, &linkId);
+
+ dataBuf = g_ULCCHData.data;
+
+ /*
+ * Obtain a pointer to the destination uplink signaling buffer.
+ * Copy the unpacked decoded data into the packed buffer
+ * indexed by the local state variable.
+ */
+ packToByteBuffer( dataBuf,
+ & ulPhDataMsg.params[3],
+ NUM_BITS_GPRS_CS4 );
+
+ /* Check out MAC header to see if control or data block */
+ switch ( ((ulPhDataMsg.params[3] & 0xC0) >> 6) )
+ {
+ case 0:
+ /*
+ * Data block, GROUP_13 PDTCH message
+ */
+ dataBytes = DataBlkSizes[g_ULCCHData.chCodec];
+
+
+ ulPhDataMsg.msgSize = dataBytes+7; /* Up to 53 octets for CS-4 */
+ ulPhDataMsg.function = PDCH_MANAGE_MSG;
+ ulPhDataMsg.typeHiByte = PH_PDTCH_IND >> 8;
+ ulPhDataMsg.typeLoByte = PH_PDTCH_IND;
+ ulPhDataMsg.trx = rfCh;
+ ulPhDataMsg.params[0] = chanNum | TN; /* channel number */
+ ulPhDataMsg.params[1] = chanSel; /* MAC header */
+ ulPhDataMsg.params[2] = g_ULCCHData.chCodec;
+
+ SendMsgHost_Que(& ulPhDataMsg);
+
+ g_rateChangeCheck= 1;
+
+ /*
+ * L1 proxy debug
+ */
+
+ //ulPhDataMsg.params[0] = g_ULCCHData.chCodec;
+ //ulPhDataMsg.params[1] = tempUsfCode;
+ //ulPhDataMsg.params[2] = tempUsfCode>>8;
+
+ //sendDiagMsg(0x22,0,ts->tsNumber,3, & ulPhDataMsg.params[0]);
+
+ break;
+
+ case 1:
+ /*
+ * Control block, GROUP_13 PACCH message
+ */
+
+ switch ((ulPhDataMsg.params[4] & 0xFC) >> 2) /* RLC control message type */
+ {
+ /*
+ * Decode according to GSM 04.60, section 11.2.0.2, to get uplink RLC/MAC messages.
+ */
+
+ case 0:
+ /*
+ * Packet Cell Change Failure
+ */
+ break;
+
+ case 1:
+ /*
+ * Packet Control Acklowledgement
+ */
+ break;
+
+ case 2:
+
+ break;
+
+ case 3:
+ /*
+ * Uplink Dummy Control blocks (supress for now)
+ */
+ return;
+
+ case 4:
+ /*
+ * Packet Measurement Report
+ */
+ break;
+ }
+
+ ulPhDataMsg.msgSize = 23+7; /* always uses CS-1 coding */
+ ulPhDataMsg.function = PDCH_MANAGE_MSG;
+ ulPhDataMsg.typeHiByte = PH_PACCH_IND >> 8;
+ ulPhDataMsg.typeLoByte = PH_PACCH_IND;
+ ulPhDataMsg.trx = rfCh;
+ ulPhDataMsg.params[0] = chanNum | TN; /* channel number */
+ ulPhDataMsg.params[1] = 0;
+
+ /* temporary diag msg *** try if(1) here as a test for blockNum */
+ if(blkNumWatch[ulBlock].tagFillCause == RRB_NB)
+ {
+ tempbuf[0] = blkNumWatch[ulBlock].tag;
+ tempbuf[1] = dlBlock;
+ tempbuf[2] = ulBlock;
+ sendDiagMsg(19, rfCh, TN, 3, tempbuf);
+ }
+
+ /*
+ * Put tag in UL PACCH and clear tag cause.
+ */
+ if((blkNumWatch[ulBlock].tagFillCause == RRB_NB) ||
+ (blkNumWatch[ulBlock].tagFillCause == DLA))
+ {
+ ulPhDataMsg.params[2] = blkNumWatch[ulBlock].tag;
+ }
+ else
+ {
+ ulPhDataMsg.params[2] = SBA_TAG; /* can be used for NACK also */
+ }
+
+ SendMsgHost_Que(& ulPhDataMsg);
+
+ break;
+
+ default:
+ /*
+ * Reserved for uplink; ignore.
+ */
+ break;
+ }
+ }
+
+ else
+ {
+ /*
+ * When no message is received and if (1) Reserved Block is expected from PACCH
+ * or (2) DL Assignment, then send PACCH negative acknowledgement
+ */
+ if( blkNumWatch[ulBlock].tagFillCause != NONE &&
+ blkNumWatch[ulBlock].tag != SBA_TAG )
+ {
+ ulPhDataMsg.msgSize = 7; /* always CS-1 */
+ ulPhDataMsg.function = PDCH_MANAGE_MSG;
+ ulPhDataMsg.typeHiByte = PH_PACCH_NACK >> 8;
+ ulPhDataMsg.typeLoByte = PH_PACCH_NACK;
+ ulPhDataMsg.trx = rfCh;
+ ulPhDataMsg.params[0] = chanNum | TN; /* channel number */
+ ulPhDataMsg.params[1] = 0;
+ ulPhDataMsg.params[2] = blkNumWatch[ulBlock].tag;
+
+ SendMsgHost_Que(& ulPhDataMsg);
+ }
+ }
+
+ /*
+ * Indicate that the UL buffer has been consume
+ */
+ g_ULCCHData.ulcchword0.bitval.bufferValid = FALSE;
+ break;
+
+
+ case PTCCH:
+
+ if(g_ULRACHData.ulRACHword0.bitval.bufferValid &&
+ g_ULRACHData.ulRACHword0.bitval.rachDet)
+ {
+ /*
+ * A PTCCH (same decode as PRACH) frame has been detected, Obtain a pointer to
+ * the destination uplink signaling buffer. The PTCCH channel
+ * uses the same uplink signaling buffer as PRACH/RACH.
+ * Copy the unpacked decoded data into the packed buffer
+ * indexed by the local state variable.
+ */
+ packToByteBuffer( & g_ULRACHData.data[0],
+ & ulPhDataMsg.params[3],
+ NUM_BITS_PRACH_FRAME );
+
+ chXlate(ts->groupNum, chanSel, subchan, &chanNum, &linkId);
+ }
+
+ /*
+ * Indicate that the UL buffer has been consumed
+ */
+ g_ULRACHData.ulRACHword0.bitval.bufferValid = FALSE;
+ break;
+
+ case PRACH:
+
+ if(g_ULRACHData.ulRACHword0.bitval.bufferValid &&
+ g_ULRACHData.ulRACHword0.bitval.rachDet)
+ {
+ /*
+ * A PRACH frame has been detected, Obtain a pointer to
+ * the destination uplink signaling buffer. The PRACH channel
+ * uses the same uplink signaling buffer as RACH.
+ * Copy the unpacked decoded data into the packed buffer
+ * indexed by the local state variable.
+ */
+ packToByteBuffer( & g_ULRACHData.data[0],
+ & ulPhDataMsg.params[4],
+ NUM_BITS_PRACH_FRAME );
+
+
+ chXlate(ts->groupNum, chanSel, subchan, &chanNum, &linkId);
+
+ /* build Packet Random Access - PRACH message */
+ ulPhDataMsg.msgSize = 12;
+ ulPhDataMsg.function = PDCH_MANAGE_MSG;
+ ulPhDataMsg.typeHiByte = PH_PRACH_IND >> 8;
+ ulPhDataMsg.typeLoByte = PH_PRACH_IND;
+ ulPhDataMsg.trx = rfCh; /* for now */
+ ulPhDataMsg.params[0] = chanNum | TN; /* channel number */
+ ulPhDataMsg.params[1] = 0; /* channel number */
+ ulPhDataMsg.params[2] = (sysFrameNum.t3 >> 3) | (sysFrameNum.t1 << 3); /* Frame Number */
+ ulPhDataMsg.params[3] = sysFrameNum.t2 | (sysFrameNum.t3 << 5); /* Frame Number */
+
+ if ( g_BBInfo[0].frame.offset <= TN){
+ if (ulPhDataMsg.params[3] == 0){
+ ulPhDataMsg.params[2] -=1;
+ }
+
+ ulPhDataMsg.params[3] -= 1;
+ }
+
+
+ // ulPhDataMsg.params[4] = sigBufPtr->msg[index].data[0];
+ // Packet Access Reference (3 MSbits of PRACH)
+ // ulPhDataMsg.params[5] = sigBufPtr->msg[index].data[3];
+ // Packet Access Reference (8 LSbits of PRACH) */
+ ulPhDataMsg.params[6] = g_ULBurstData.toa; /* Access Delay */
+ ulPhDataMsg.params[7] = g_ULBurstData.rcvPower; /* Access Delay */
+
+ SendMsgHost_Que(& ulPhDataMsg);
+ }
+
+ /*
+ * Indicate that the UL buffer has been consumed
+ */
+ g_ULRACHData.ulRACHword0.bitval.bufferValid = FALSE;
+ break;
+
+ default:
+ /*
+ * All other uplink signaling channels (SACCH, SDCCH, FACCH)
+ * use the same buffers and format
+ */
+ if ( g_ULCCHData.ulcchword0.bitval.bufferValid &&
+ ! g_ULCCHData.ulcchword0.bitval.fireStatus )
+ {
+ /*-------------------------------------------------------------
+ * Log received frames and set pointer to encryption mode
+ *-------------------------------------------------------------*/
+ if ( chanSel == SDCCH4 ){
+ if (ts->groupNum == GSM_GROUP_5){
+ sdcchReceived++;
+ sdcch4Received[subchan]++;
+ subCh = ts->u.group5.ulSdcchSubCh;
+ encryptState = & ts->u.group5.sdcch[subCh].encryptState;
+ }
+ if (ts->groupNum == GSM_GROUP_7){
+ sdcchReceived++;
+ sdcch8Received[subchan]++;
+ subCh = ts->u.group7.ulSdcchSubCh;
+ encryptState = & ts->u.group7.sdcch[subCh].encryptState;
+ }
+ }
+ else if ( chanSel == SACCH )
+ {
+ if ( ts->groupNum == GSM_GROUP_5 ){
+ sacch4Received[subchan]++;
+ }
+ else if (ts->groupNum == GSM_GROUP_7){
+ sacch8Received[subchan]++;
+ }else
+ sacchReceived++;
+ }
+ else if ( chanSel == FACCH )
+ {
+ facchReceived++;
+ encryptState = & ts->u.group1.tch.encryptState;
+ }
+ /*-------------------------------------------------------------
+ * If encryption just changed, switch to Normal encryption
+ * mode using the newly commanded algorithm from now on
+ *-------------------------------------------------------------*/
+ if ( (chanSel == SDCCH4 || chanSel == FACCH) &&
+ encryptState->encryptMode == ENCR_CHANGE )
+ {
+ encryptState->encryptMode = ENCR_NORMAL;
+ encryptState->algorithm = encryptState->newAlgorithm;
+ }
+
+ /*
+ * for debug only to find where is UL burst positioned on rcv buffer
+ if(sacchReceived+sdcchReceived + rachReceived <156)
+ {
+ g_UlBurstLog[sacchReceived+sdcchReceived] =
+ g_ULBurstData.toa & 0x00ff | g_ULBurstData.rcvPower<<16;
+ }
+ */
+ /*
+ * A fill frame has a information field octet length of 0.
+ * Therefore, check to see if the Length Indicator Field is 0.
+ * Ignore the Length Indicator Extension Bit and the More Data
+ * Bit.
+ *
+ * If so, frame is a fill frame - don't send up.
+ send back fill frames any way for monitoring channel quality
+ frameDetected = 0;
+ for(i=FILLFRAME_LEN_START; i<FILLFRAME_LEN_END; i++)
+ {
+ frameDetected |= (g_ULCCHData.data[i]);
+ }
+ if(frameDetected)
+ * Send All recovered frames to Host, L1 Agent on Host is filtering out
+ * unnecessary messages to L2/L3
+ */
+
+ {
+ /*
+ * Obtain a pointer to the destination uplink signaling buffer
+ */
+
+ {
+ /*
+ * Copy the unpacked decoded data into the packed buffer
+ * indexed by the local state variable.
+ */
+ if(chanSel == SACCH) /* Take out L1 Headers */
+ {
+ /* populate serving cell (t_SACCHInfo) struct with
+ * octets 2 and 3 of measurement results
+ * information element (gsm04.08)
+ */
+ packToByteBuffer( & g_ULCCHData.data[0],
+ & ulPhDataMsg.params[3],
+ NUM_BITS_CCH_FRAME );
+
+ switch (ts->groupNum)
+ {
+ case GSM_GROUP_1:
+ /* L1 headers from SACCH downlink block format
+ * (gsm 04.04)
+ */
+ ts->u.group1.sacch.dlsigstrenSCell.MSPwrSetting
+ = ulPhDataMsg.params[3] & 0x1f;
+ /* populate actual timing advance used*/
+ if( (ulPhDataMsg.params[4] & 0x7F) != 0x7F) /* check if TA is valid */
+ ts->u.group1.sacch.toaLastGoodActual = ulPhDataMsg.params[4] & 0x7F;
+
+ /* now L3 payload (gsm 04.08) */
+
+ /* If RXLEV Full changed, set flag for diagnostic */
+ if ( (ts->u.group1.sacch.dlsigstrenSCell.rxLevNew !=
+ ulPhDataMsg.params[10] & 0x3f) )
+ {
+ flag = 1;
+ }
+
+ /*
+ * Extract RXLEV and RQUAL full and sub to local variables
+ */
+ rxLevFull = ulPhDataMsg.params[10] & 0x3f;
+ rxLevSub = ulPhDataMsg.params[11] & 0x3f;
+ rxQualFull = (ulPhDataMsg.params[12] >> 4) & 0x7;
+ rxQualSub = (ulPhDataMsg.params[12] >> 1) & 0x7;
+ /*
+ * Use mobile's Full or Sub measurements, depending on whether we're in
+ * DL DTX Mode. Don't use dlDtxUsed unless we add code to handle the delay
+ * between our DLDTX usage and MS measurement reports. Also, DL RXQUAL
+ * seems to be untrustworthy with DL DTX on; hard code here so it doesn't
+ * cause unnecessary handovers.
+ */
+ if ( ts->u.group1.tch.DLDtxMode )
+ {
+ ts->u.group1.sacch.dlsigstrenSCell.rxLevNew = rxLevSub;
+ ts->u.group1.sacch.dlsigqualSCell.rxQualNew = 1; // see note above
+ }
+ else
+ {
+ ts->u.group1.sacch.dlsigstrenSCell.rxLevNew = rxLevFull;
+ ts->u.group1.sacch.dlsigqualSCell.rxQualNew = rxQualFull;
+ }
+ /*
+ * If measurements are not valid, set mid-range values which should be
+ * neutral to our handover decision.
+ */
+ if ( (ulPhDataMsg.params[11] & 0x40) )
+ {
+ ts->u.group1.sacch.dlsigstrenSCell.rxLevNew = 40;
+ ts->u.group1.sacch.dlsigqualSCell.rxQualNew = 1;
+ }
+ break;
+
+ case GSM_GROUP_5:
+ /* do nothing for OAM data population */
+ break;
+ }
+
+ /* now populate t_TCHInfo (t_NCellInfo) with
+ * global neighbour cell info starting
+ * at octet 4 of measurement results
+ * information element (gsm04.08)
+ */
+ if(ts->groupNum == GSM_GROUP_1)
+ {
+ noSacchMeas = populateNCellInfo(TN, rfCh, &ulPhDataMsg.params[12]);
+ diagRptCount += 1;
+
+ if((flag == 1) || (diagRptCount == 16))
+ {
+ /*-----------------------------------------------------------
+ * If MS Report enabled for this TS, accuumulate TOA averages
+ *----------------------------------------------------------*/
+ if ( g_diagData.dlMeasReportTsMask & (1<<TN) )
+ {
+ tempbuf[0] = rxLevFull;
+ tempbuf[1] = rxLevSub;
+ tempbuf[2] = rxQualFull;
+ tempbuf[3] = rxQualSub;
+ tempbuf[4] = noSacchMeas;
+
+ for(i=0; i < noSacchMeas; i++)
+ {
+ tempbuf[5+i*5] = ts->u.group1.tch.NCell[i].rfCh>>8;
+ tempbuf[6+i*5] = ts->u.group1.tch.NCell[i].rfCh;
+ tempbuf[7+i*5] = ts->u.group1.tch.NCell[i].bsic;
+ tempbuf[8+i*5] = ts->u.group1.tch.NCell[i].oamIdx;
+ tempbuf[9+i*5] = ts->u.group1.tch.NCell[i].rxLev;
+ }
+
+ sendDiagMsg(DL_MEAS_REPORT,0,ts->tsNumber,(5+noSacchMeas*5),tempbuf);
+
+ }
+ if(flag== 1)
+ {
+ flag = 0;
+ }
+ if(diagRptCount == 16)
+ {
+ diagRptCount = 0;
+ }
+ }
+ }
+ }
+ else
+ {
+ packToByteBuffer( & g_ULCCHData.data[0],
+ & ulPhDataMsg.params[5],
+ NUM_BITS_CCH_FRAME );
+ }
+
+ ulPhDataMsg.msgSize = 32;
+ ulPhDataMsg.function = RR_MANAGE_MSG;
+ ulPhDataMsg.typeHiByte = PH_DATA_IND_HI;
+ ulPhDataMsg.typeLoByte = PH_DATA_IND_LO;
+ ulPhDataMsg.trx = rfCh; /* for now */
+
+ chXlate(ts->groupNum, chanSel, subchan, &chanNum, &linkId);
+ ulPhDataMsg.params[0] = chanNum | TN; /* channel number */
+ ulPhDataMsg.params[1] = 0; /* channel number */
+ ulPhDataMsg.params[2] = linkId; /* link identifier */
+ /*
+ ulPhDataMsg.params[3] = ((sysFrameNum.t3 >> 3) & 0x7) | (sysFrameNum.t1 << 3);
+ ulPhDataMsg.params[4] = (sysFrameNum.t2 & 0x1f) | (sysFrameNum.t3 << 5);
+ */
+
+ ulPhDataMsg.params[3] = g_ULBurstData.toa; /* Access Delay */
+ ulPhDataMsg.params[4] = g_ULBurstData.rcvPower; /* Rx Power in dBr */
+
+ SendMsgHost_Que(& ulPhDataMsg);
+ }
+ }
+ }
+
+ /*
+ * Indicate that the UL buffer has been consumed
+ */
+ g_ULCCHData.ulcchword0.bitval.bufferValid = FALSE;
+ break;
+ }
+}
+
+
+
diff --git a/data/mnet/GP10/Dsp/synchctrl/tch.c b/data/mnet/GP10/Dsp/synchctrl/tch.c
new file mode 100644
index 0000000..c65d135
--- /dev/null
+++ b/data/mnet/GP10/Dsp/synchctrl/tch.c
@@ -0,0 +1,980 @@
+/****************************************************************************
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*****************************************************************************/
+/*****************************************************************************
+* File: tch.c
+*
+* Description:
+* This file contains functions that process TCH frames and route SACCH
+* frames to the SACCH functions when appropriate.
+*
+* Public Functions:
+* ulTchProcBurst_0, ulTchProcBurst_3, ulIdleProc, dlIdleProc,
+* dlTchProcBurst_0, dlTchProcBurst_3, ulSachIdleProc, dlSachIdleProc
+*
+* Private Functions:
+* none
+*
+******************************************************************************/
+#include "stdlib.h"
+#include "gsmdata.h"
+#include "dsp/dsphmsg.h"
+#include "bbdata.h"
+#include "dsprotyp.h"
+#include "diagdata.h"
+#include "agcdata.h"
+#include "l1config.h"
+
+#pragma DATA_ALIGN(frSilentFrameToast, 4);
+Uint8 frSilentFrameToast[33] = {0xDA, 0xA7, 0xAA, 0xA5, 0x1A, 0x00, 0x20, 0x38,
+ 0xE4, 0x6D, 0xB9, 0x1B, 0x00, 0x20, 0x38, 0xE4,
+ 0x6D, 0xB9, 0x1B, 0x00, 0x20, 0x38, 0xE4, 0x6D,
+ 0xB9, 0x1B, 0x00, 0x20, 0x38, 0xE4, 0x6D, 0xB9,
+ 0x1B};
+
+/*
+* EFR idle frame needs to be refilled !!!!!!!!!!!!!!!!!!!!!
+*/
+#pragma DATA_ALIGN(efrSilentFrameToast, 4);
+Uint8 efrSilentFrameToast[33] = {0xDA, 0xA7, 0xAA, 0xA5, 0x1A, 0x00, 0x20, 0x38,
+ 0xE4, 0x6D, 0xB9, 0x1B, 0x00, 0x20, 0x38, 0xE4,
+ 0x6D, 0xB9, 0x1B, 0x00, 0x20, 0x38, 0xE4, 0x6D,
+ 0xB9, 0x1B, 0x00, 0x20, 0x38, 0xE4, 0x6D, 0xB9,
+ 0x1B};
+
+Uint32 tchReceived = 0;
+Uint32 facchSent[8] = {0, 0 , 0, 0, 0, 0, 0, 0};
+
+/*****************************************************************************
+*
+* Function: ulTchProcBurst_0
+*
+* Description:
+* Processes uplink TCH bursts for frames 0,1,2 of every 0-3 block
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void ulTchProcBurst_0(Uint8 rfCh, Uint8 timeSlot)
+{
+ Uint16 i, k;
+ t_TNInfo *ts;
+ Uint32 *rcvData;
+ t_SACCHInfo *sacchInfo;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+ rcvData = (Uint32*)g_BBInfo[rfCh].ulBBSmpl;
+ sacchInfo = & ts->u.group1.sacch;
+
+ switch(ts->groupNum)
+ {
+ /*-------------------------------------------------------
+ * Channel combination I (TCH/F + SACCH)
+ *------------------------------------------------------*/
+ case GSM_GROUP_1:
+ if(ts->u.group1.tch.state == CHAN_ACTIVE)
+ {
+ /*-------------------------------------------------------
+ * If enabled, save raw samples for I/Q Loopback
+ *------------------------------------------------------*/
+ if ( g_loopBackMode == DSP_IQ_LOOPBACK )
+ {
+ if ( rcvRawIQBufIndex[timeSlot] < 156 )
+ k = 0;
+ else if ( rcvRawIQBufIndex[timeSlot] < 2*156 )
+ k = 156;
+ else if ( rcvRawIQBufIndex[timeSlot] < 3*156 )
+ k = 2*156;
+ else
+ k = 3*156;
+
+ rcvRawIQBufIndex[timeSlot] = k + 156;
+
+ for(i=0; i<156; i++)
+ {
+ rcvdRawIQFrames[timeSlot][k++] = rcvData[i];
+ }
+ }
+ /*-------------------------------------------------------
+ * If enabled, capture samples in one burst
+ *------------------------------------------------------*/
+ if ( g_diagData.burstCapture.state == CAPTURE_ARMED )
+ {
+ for(i=0; i<BURST_CAPTURE_SIZE; i++)
+ {
+ g_diagData.burstCapture.data[i] = rcvData[i];
+ }
+ g_diagData.burstCapture.state = CAPTURE_DONE;
+ }
+ /*-------------------------------------------------------
+ * If HO, try to detect AB, else demodulate NB
+ *------------------------------------------------------*/
+ if(ts->u.group1.tch.HOFlag)
+ {
+ ulRachProc(rfCh, timeSlot);
+ }
+ else
+ {
+ DCOffset( g_BBInfo[rfCh].ulBBSmpl, ts->groupNum, rfCh, timeSlot );
+ demodulate( g_BBInfo[rfCh].ulBBSmpl,
+ TCHF,
+ g_BBInfo[rfCh].tseqNum,
+ &g_ULBurstData,
+ ts->groupNum,
+ rfCh,
+ timeSlot,
+ 0 );
+ decrypt(rfCh, timeSlot);
+ chanDecoder(TCHF, 0, timeSlot);
+ accumPower(rfCh, timeSlot, ts->groupNum, TCHF, sacchInfo, NULL);
+ }
+ }
+ else
+ {
+ /*
+ * perform Fire decode, if there is no uplink burst process is inactive
+ */
+ ulCCHFireDecoder();
+ }
+ break;
+
+ /*-------------------------------------------------------
+ * Default case should never occur
+ *------------------------------------------------------*/
+ default:
+ break;
+ }
+}
+
+/*****************************************************************************
+*
+* Function: ulTchProcBurst_3
+*
+* Description:
+* Processes uplink TCH bursts for frame 3 of every 0-3 block
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void ulTchProcBurst_3(Uint8 rfCh, Uint8 timeSlot)
+{
+ Uint16 i, k;
+ t_TNInfo *ts;
+ Uint32 *rcvData;
+ msgUnionStruc tchMsg;
+ t_SACCHInfo *sacchInfo;
+ Bool dtxSid;
+ Uint8 sidFlag;
+ Int8 writeIndex;
+ t_ULSignalStrength *sigS;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+ rcvData = (Uint32*)g_BBInfo[rfCh].ulBBSmpl;
+ sacchInfo = & ts->u.group1.sacch;
+
+ switch(ts->groupNum)
+ {
+ /*------------------------------------------------------
+ * Channel combination I (TCH/F + SACCH)
+ *------------------------------------------------------*/
+ case GSM_GROUP_1:
+ if ( ts->u.group1.tch.state == CHAN_ACTIVE &&
+ g_loopBackMode != DSP_TCH_TO_HOST_LOOPBACK )
+ {
+ /*
+ * Note: if TCH Loopback to Host, downlink TCH frame is sent
+ * back to host on tchMsgProc(). Don't process UL TCH here.
+ */
+
+ /*------------------------------------------------------
+ * If enabled, save raw samples for I/Q loopback
+ *------------------------------------------------------*/
+ if(g_loopBackMode == DSP_IQ_LOOPBACK)
+ {
+ k = 3*156;
+ rcvRawIQBufIndex[timeSlot] = 0;
+
+ for(i=0; i<156; i++)
+ {
+ rcvdRawIQFrames[timeSlot][k++] = rcvData[i];
+ }
+ }
+ /*------------------------------------------------------
+ * If HO, try to detect AB, else demodulate NB
+ *------------------------------------------------------*/
+ if(ts->u.group1.tch.HOFlag)
+ {
+ ulRachProc(rfCh, timeSlot);
+ }
+ else
+ {
+ DCOffset( g_BBInfo[rfCh].ulBBSmpl, ts->groupNum, rfCh, timeSlot );
+ demodulate( g_BBInfo[rfCh].ulBBSmpl,
+ TCHF,
+ g_BBInfo[rfCh].tseqNum,
+ &g_ULBurstData,
+ ts->groupNum,
+ rfCh,
+ timeSlot,
+ 0 );
+ decrypt(rfCh, timeSlot);
+ chanDecoder(TCHF, 1, timeSlot);
+ accumPower(rfCh, timeSlot, ts->groupNum, TCHF, sacchInfo, NULL);
+
+ /*-----------------------------------------------------------
+ * Accumlate bit errors and frame errors into SACCH structure
+ * Note1: This must come before FACCH processing
+ * Note2: We also use this Boolean, dtxSid, later in function
+ *-----------------------------------------------------------*/
+
+ dtxSid = (ts->u.group1.ulIndex == ((12-timeSlot) & 0x7) && ts->ulTblIndex == 7);
+ accumBer(rfCh, timeSlot, ts->groupNum, TCHF, 0, sacchInfo,
+ ts->u.group1.tch.ulDtxUsed, dtxSid);
+
+ /*----------------------------------------------------------
+ * Update AGC on final burst of every TCH frame, no update if UL DTX is used
+ *----------------------------------------------------------*/
+ if(g_AGC_ON && (!ts->u.group1.tch.ulDtxUsed || dtxSid))
+ {
+ sigS = & sacchInfo->ulsigstren;
+ sigS->rxPwrNormSmooth = ul_agc(sigS);
+ }
+ /*----------------------------------------------------------
+ * If stolen frame, process FACCH message
+ *----------------------------------------------------------*/
+ ulSyncMsgProcess(FACCH, 0, timeSlot, rfCh);
+
+ /*----------------------------------------------------------
+ * Process speech frames only if channel is in speech mode
+ *----------------------------------------------------------*/
+ if( ts->u.group1.tch.speechDataInd == IND_SPEECH &&
+ g_ULTCHData.ultchword0.bitval.bufferValid )
+ {
+
+ g_ULTCHData.ultchword0.bitval.bufferValid = FALSE;
+
+ tchMsg.msgSize = 46;
+ tchMsg.function = TRAFFIC_MSG;
+ tchMsg.typeHiByte = UP_LINK_TCH >> 8;
+ tchMsg.typeLoByte = UP_LINK_TCH;
+ tchMsg.trx = rfCh;
+ tchMsg.u.params[0] = timeSlot | 0x08;
+ tchMsg.u.params[1] = 0;
+
+ /*----------------------------------------------------------
+ * If frame contains good speech (passed parity and did not
+ * trigger perceptual masking), then copy to tchFrame, and
+ * send to host. If not good speech, send nothing to host.
+ *----------------------------------------------------------*/
+ if( ! g_ULTCHData.ultchword0.bitval.bfi &&
+ ! g_ULTCHData.ultchword0.bitval.mask )
+ {
+ tchReceived++;
+
+ /*
+ * Check if an SID Frame is detected. This detection should happen
+ * before it is detected on SACCH frame. Note: Need to use sidFlag
+ * even if we're not in UL DTX mode to properly handle disabling it.
+ */
+ sidFlag = sidDetection( (Uint8*)&g_ULTCHData.data[4], ts->u.group1.tch.vocAlgo);
+ if( ts->u.group1.tch.ULDtxMode )
+ {
+ if( sidFlag == 2 )
+
+ {
+ if(!ts->u.group1.tch.ulDtxUsed)
+ {
+ /*
+ * A SID frame is detected
+ */
+ ts->u.group1.tch.ulDtxUsed = TRUE;
+ sendDiagMsg(5,rfCh, timeSlot,1, &sidFlag);
+ }
+ /*
+ * Erase SID frame Temporary for Incompleted CISCO Gateway to handle
+ * SID frame
+ */
+ if( ts->u.group1.tch.vocAlgo == VOC_GSMF )
+ return;
+ }
+ else
+ {
+ if(ts->u.group1.tch.ulDtxUsed)
+ {
+ ts->u.group1.tch.ulDtxUsed = FALSE;
+ sendDiagMsg(10,rfCh, timeSlot,1, &sidFlag);
+ }
+ }
+ }
+ /*
+ * If the operator disabled UL DTX while the call was active, wait for
+ * the TCH frame that would normally carry SID. If the MS has not yet
+ * realized UL DTX has been disabled, then this frame may contain SID,
+ * indicating the talker is silent and the MS is not sending up all UL
+ * frames. In this case, don't set ulDtxUsed=FALSE yet because our RXLEV
+ * and BER accumlation would go bad. Look for this TCH frame to contain
+ * non-SID before switching ulDtxUsed=FALSE. We still run the risk that
+ * the talker goes silent just after we do this while the MS has not yet
+ * realized UL DTX is off, but we hope it's unlikely and brief. All of
+ * this is to avoid false handover when UL DTX switches from On to Off.
+ */
+ else if ( dtxSid && (sidFlag==0) )
+ {
+ ts->u.group1.tch.ulDtxUsed = FALSE;
+ }
+
+#ifdef ETSI_FRAME_PACKING
+ packToByteBuffer( &g_ULTCHData.data[0],
+ tchMsg.u.tchInfo.tchFrame,
+ NUM_BITS_TCH_FRAME );
+#else
+ /*--------------------------------------------------------
+ * Copy input speech to tchFrame (whether loopback or not)
+ *--------------------------------------------------------*/
+ packToByteMSB( (UChar*)&g_ULTCHData.data[0],
+ tchMsg.u.tchInfo.tchFrame,
+ NUM_BITS_TCH_FRAME+4 );
+#endif
+ /*--------------------------------------------------------
+ * Send the speech frame to the host
+ *--------------------------------------------------------*/
+ SendMsgHost_Que((msgStruc*)(&tchMsg));
+
+ /*
+ * debug code to send back a SID frame
+ if(ts->u.group1.tch.ulDtxUsed &&
+ ts->u.group1.ulIndex == ((12-timeSlot) & 0x7) &&
+ ts->ulTblIndex == 7)
+ {
+ tchMsg.u.params[2] = ts->u.group1.ulIndex;
+ tchMsg.u.params[3] = ts->ulTblIndex;
+ sendDiagMsg(0x11, rfCh, timeSlot, 40, & tchMsg.u.params[2]);
+ }
+ */
+ }
+ /*--------------------------------------------------------
+ * If TCH loopback, pack UL TCH frame to DL TCH buffer
+ *--------------------------------------------------------*/
+ if ( g_loopBackMode == DSP_TCH_LOOPBACK &&
+ !g_ULTCHData.ultchword0.bitval.bfi )
+ {
+ rcvData = (Uint32 *) tchMsg.u.tchInfo.tchFrame;
+ /*
+ * copy uplink GSM TCH frame to downlink TCH buffer
+ */
+ writeIndex = g_dlTchFrame[timeSlot].writeIndex;
+ for(i=0; i<10; i++)
+ {
+ g_dlTchFrame[timeSlot].buffer[writeIndex][i] = rcvData[i];
+ }
+
+ /*
+ * update buffer index (circular)
+ */
+ if(++g_dlTchFrame[timeSlot].writeIndex >= NUM_TCH_JBUF)
+ g_dlTchFrame[timeSlot].writeIndex = 0;
+
+ g_dlTchFrame[timeSlot].frameCount += 1;
+
+ /*----------------------------------------------------
+ * Check overflow
+ *---------------------------------------------------*/
+ if(g_dlTchFrame[timeSlot].frameCount > NUM_TCH_JBUF)
+ {
+ g_dlTchFrame[timeSlot].frameCount = NUM_TCH_JBUF;
+ ReportError(0x91, rfCh, timeSlot, 0, &rfCh);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ /*-----------------------------------------------------
+ * Slot is inactive, run Fire decoder
+ *-----------------------------------------------------*/
+ ulCCHFireDecoder();
+ }
+
+ break;
+
+ /*-------------------------------------------------------
+ * Default case should never occur
+ *------------------------------------------------------*/
+ default:
+ break;
+ }
+}
+
+
+/*****************************************************************************
+*
+* Function: ulIdleProc
+*
+* Description:
+* Processes uplink idle frames
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void ulIdleProc(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ Int16 i;
+ Uint32 *rdPtr;
+ t_SACCHInfo *sacchInfo;
+ Int16 currentRxLev;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+
+
+ sacchInfo = & ts->u.group1.sacch;
+
+
+ rdPtr = (Uint32*)g_BBInfo[rfCh].ulBBSmpl;
+
+ for(i=0; i<156; i++)
+ {
+ g_idleFrameInfo[rfCh][timeSlot].data[i]= rdPtr[i];
+ }
+
+ /*
+ * Update the all-carrier DC offset
+ */
+
+ if (ts->groupNum != GSM_GROUP_7){
+ DCOffset( g_BBInfo[rfCh].ulBBSmpl, ts->groupNum, rfCh, NUM_TN_PER_RF+NUM_SDCCH_SUBCHANS );
+ }
+ else{
+ DCOffset( g_BBInfo[rfCh].ulBBSmpl, GSM_GROUP_5, rfCh, NUM_TN_PER_RF+NUM_SDCCH_SUBCHANS );
+ }
+ /*
+ * Demodulate just to get received power
+ */
+ demodulate( g_BBInfo[rfCh].ulBBSmpl,
+ TCHF,
+ g_BBInfo[rfCh].tseqNum,
+ &g_ULBurstData,
+ ts->groupNum,
+ rfCh,
+ timeSlot,
+ 0 );
+
+ g_idleFrameInfo[rfCh][timeSlot].rcvPower = g_ULBurstData.rcvPower;
+
+ /* used for interference reporting */
+ if ((sacchInfo->state != CHAN_ACTIVE) && (ts->groupNum != GSM_GROUP_7)){
+ /*
+ * set up link gain for idle channel monitoring based on radio board versions.
+ */
+ sacchInfo->ulsigstren.rxgain = g_rxGainMinIdle;
+
+ /*----------------------------------------------------------
+ * Compute uplink RXLEV of burst using rcvPower (dBr) and
+ * current rxgain (0-0x3ff) as input. All other terms are
+ * measured calibration constants specific to ViperCell H/W.
+ *----------------------------------------------------------*/
+ currentRxLev = g_MeasAgcDpcDbm + DBM_2_RXLEV_CONV_FACTOR
+ + (g_ULBurstData.rcvPower - g_MeasAgcDpcDbr)
+ + (((sacchInfo->ulsigstren.rxgain - g_MeasAgcDpcRxgain)
+ * g_gainStepsPerDb.inverseSlope) >> DIVISION_FACTOR);
+
+ if(currentRxLev < 0) { /* Limit to a positive range */
+ currentRxLev = 0;
+ }
+
+ sacchInfo->MSPowerAccumFull += currentRxLev;
+ }
+}
+
+/*****************************************************************************
+*
+* Function: zeroTxBurst
+*
+* Description:
+* Zeroes out buffer (for turning off Tx power)
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void zeroTxBurst(Uint32 *burstBuf)
+{
+ Int16 i;
+ /*
+ * turn off output power
+ * i.e., send zero energy on I/Q channel
+ */
+ for(i=0; i<312; i++)
+ {
+ burstBuf[i] = 0;
+ }
+}
+
+/*****************************************************************************
+*
+* Function: dlIdleProc
+*
+* Description:
+* Processes downlink idle frames
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dlIdleProc(Uint8 rfCh, Uint8 timeSlot)
+{
+ Int16 i;
+
+ t_TNInfo *ts;
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ /*-------------------------------------------------------------
+ * Idle Frame Mode flag determines whether to shut off
+ * Tx during this burst or to send a dummy burst
+ *------------------------------------------------------------*/
+ if( ! g_IdleFrameMode )
+ {
+ zeroTxBurst((Uint32*)g_BBInfo[rfCh].dlBBSmpl);
+ }
+ else
+ {
+ g_DLCodedData.tx = TRUE;
+ buildGSMBurst(IDLE, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, IDLE);
+ }
+}
+
+/*****************************************************************************
+*
+* Function: dlTchProcBurst_0
+*
+* Description:
+* Processes downlink TCH bursts for frame 0 of every 0-3 block
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dlTchProcBurst_0(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ t_DLSigBufs *facchMsg;
+ t_TCHInfo *tch;
+ Int16 i;
+ Uint8 txOn;
+ Uint8 sid;
+ t_chanSel payloadType;
+ Uint8 doRtsCheck = FALSE;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+ dlTchNetProc();
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_1:
+ tch = & ts->u.group1.tch;
+ facchMsg = ts->u.group1.facch.dlSigBuf;
+
+ /*
+ * set TX on as default
+ */
+ txOn = 1;
+
+ if(tch->state == CHAN_ACTIVE)
+ {
+ /*------------------------------------------------------
+ * If enabled, send raw samples for I/Q loopback
+ *------------------------------------------------------*/
+ if(g_loopBackMode == DSP_IQ_LOOPBACK)
+ {
+ compLpbkBuf(& rcvdRawIQFrames[timeSlot][0], (Uint32*)g_BBInfo[rfCh].dlBBSmpl);
+ txRawIQBufIndex[timeSlot] = 156;
+ }
+ /*----------------------------------------------------------
+ * Check for FACCH, speech or data, then build and modulate
+ *----------------------------------------------------------*/
+ else
+ {
+ /*----------------------------------------------------------
+ * If FACCH message is ready, let it override speech or data
+ *----------------------------------------------------------*/
+ if(facchMsg->numMsgsReady > 0)
+ {
+ facchSent[timeSlot]++;
+ /*
+ * Process FACCH first. Set flags to properly encode,
+ * encrypt and check RTS below.
+ */
+ processCCHBuff(facchMsg);
+ payloadType = FACCH;
+ doRtsCheck = TRUE;
+ /*
+ * skip a speech frame if a it is stolen by FACCH
+ */
+ if(g_dlTchFrame[timeSlot].frameCount > 0)
+ {
+ g_dlTchFrame[timeSlot].frameCount--;
+
+ if(++g_dlTchFrame[timeSlot].readIndex >= NUM_TCH_JBUF)
+ g_dlTchFrame[timeSlot].readIndex = 0;
+ }
+ /*
+ * Check if a SID frame is stolen by a FACCH message.
+ */
+ if(g_dlSidFrame[timeSlot].frameCount > 0 &&
+ ts->u.group1.dlIndex == ((12-timeSlot) & 0x7) &&
+ ts->dlTblIndex == 0)
+ {
+ ts->u.group1.tch.stolenSid++;
+ }
+ }
+ /*---------------------------------------------------------------
+ * Process as speech if channel is in speech mode and no FACCH msg
+ *---------------------------------------------------------------*/
+ else if ( ts->u.group1.tch.speechDataInd == IND_SPEECH )
+ {
+
+ #ifdef ETSI_FRAME_PACKING
+
+ unpackFromByteBuffer(g_dlTchFrame[timeSlot].buffer,
+ (UChar *)&g_DLTCHData.data[0],
+ NUM_BITS_TCH_FRAME);
+ payloadType = TCHF;
+ #else
+ /*---------------------------------------------------------------
+ * If speech is not available, send silence, SID or turn off Tx, but
+ * do not send dummy tch data if LOCAL LOOPBACK.
+ *---------------------------------------------------------------*/
+
+ if((g_dlTchFrame[timeSlot].frameCount <=0) && (g_loopBackMode != LOCAL_LOOPBACK))
+
+ {
+ /*
+ * check if a SID is required to send
+ */
+ if( g_dlSidFrame[timeSlot].frameCount > 0 &&
+ ( (ts->u.group1.dlIndex == ((12-timeSlot) & 0x7) && ts->dlTblIndex == 0) ||
+ ts->u.group1.tch.stolenSid > 0) )
+ {
+ if ( ts->u.group1.tch.stolenSid > 0 )
+ {
+ /*
+ * send a SID frame on scheduled frame number or been stolen
+ * by a FACCH message
+ */
+ ts->u.group1.tch.stolenSid--;
+ }
+ else
+ {
+ /*
+ * send a SID frame on schedule
+ */
+ g_dlSidFrame[timeSlot].frameCount--;
+ }
+
+ unpackByteMSB((UChar*)g_dlSidFrame[timeSlot].buffer,
+ (UChar *)&g_DLTCHData.data[0],
+ NUM_BITS_TCH_FRAME+4);
+ payloadType = TCHF;
+
+ sendDiagMsg(0x8, rfCh, timeSlot, 1, &sid);
+ }
+ else
+ { /*
+ * If DL DTX mode and it's not time to send a mandatory frame, then turn off
+ * transmission (zero I/Q output). This should not happen on BCCH carrier!
+ */
+ if ( ts->u.group1.tch.DLDtxMode &&
+ !(ts->u.group1.dlIndex == ((12-timeSlot) & 0x7) && ts->dlTblIndex == 0) )
+ {
+ txOn = 0;
+ }
+
+ /*
+ * Send DCCH filler when not in DTX mode, letting MS mask the gap
+ */
+ unpackFromByteBuffer(dcchFiller,
+ (UChar*)g_DLCCHData.data,
+ NUM_BITS_CCH_FRAME);
+ payloadType = FACCH;
+
+ }
+ }
+ /*---------------------------------------------------------------
+ * Else speech is available, send it. If DTX, copy SID frame.
+ *---------------------------------------------------------------*/
+ else
+ {
+ /*
+ * unpack a speech frame
+ */
+ unpackByteMSB((UChar*)g_dlTchFrame[timeSlot].buffer[g_dlTchFrame[timeSlot].readIndex],
+ (UChar *)&g_DLTCHData.data[0],
+ NUM_BITS_TCH_FRAME+4);
+
+ payloadType = TCHF;
+
+ if( ts->u.group1.tch.DLDtxMode &&
+ (sid = sidDetection((UChar*) & g_DLTCHData.data[4], ts->u.group1.tch.vocAlgo)) == 2)
+ {
+ if ( !ts->u.group1.tch.dlDtxUsed ||
+ (ts->u.group1.dlIndex == ((12-timeSlot) & 0x7) && ts->dlTblIndex == 0) )
+ {
+ /*
+ * it is the first SID frame or on it is on SID TX schedule,
+ * send it immediately
+ */
+ sendDiagMsg(0x7, rfCh, timeSlot, 1, &sid);
+ }
+ else
+ {
+ /*
+ * it is not the right frame to send SID frame
+ */
+ txOn = 0;
+ }
+ /* a valid SID Code found, DL DTX mode is applied */
+ if ( !ts->u.group1.tch.dlDtxUsed )
+ {
+ sendDiagMsg(0x6, rfCh, timeSlot, 1, &sid);
+ ts->u.group1.tch.dlDtxUsed = TRUE;
+ }
+ /*
+ * copy SID frame to SID buffer
+ */
+ for(i=0; i<10; i++)
+ {
+ g_dlSidFrame[timeSlot].buffer[i] =
+ g_dlTchFrame[timeSlot].buffer[g_dlTchFrame[timeSlot].readIndex][i];
+ }
+ g_dlSidFrame[timeSlot].frameCount = 1;
+
+ }
+ else
+ {
+ /*
+ * NON DTX mode or a non-SID Frame found
+ */
+ if ( ts->u.group1.tch.dlDtxUsed )
+ {
+ // sendDiagMsg(11, rfCh, timeSlot, 1, &sid);
+ ts->u.group1.tch.dlDtxUsed = FALSE;
+ }
+ g_dlSidFrame[timeSlot].frameCount = 0;
+ }
+ /*
+ * update read index and frame count
+ */
+ if ( ++g_dlTchFrame[timeSlot].readIndex >= NUM_TCH_JBUF )
+ {
+ g_dlTchFrame[timeSlot].readIndex = 0;
+ }
+ g_dlTchFrame[timeSlot].frameCount--;
+ }
+ #endif
+ /*---------------------------------------------------------------
+ * If speech frame was available, update read index and frame count.
+ * If it is not available, increment frame error count and let
+ * ReportDiagToHost send the diag msg at the next SF boundary.
+ *--------------------------------------------------------------*/
+ if( g_dlTchFrame[timeSlot].frameCount < 0 )
+ {
+ if( g_dlTchFrame[timeSlot].frameStarted &&
+ !ts->u.group1.tch.DLDtxMode &&
+ !ts->u.group1.tch.ULDtxMode )
+ {
+ g_DlUnderflowCount[rfCh][timeSlot] += 1;
+ }
+ g_dlTchFrame[timeSlot].frameCount = 0;
+ }
+ }
+ else
+ {
+ /*---------------------------------------------------------------
+ * Non speech mode, send a filler, if no FACCH message
+ *---------------------------------------------------------------*/
+ unpackFromByteBuffer(dcchFiller,
+ (UChar*)g_DLCCHData.data,
+ NUM_BITS_CCH_FRAME);
+ }
+ /*---------------------------------------------------------------
+ * For TCH, channel encode and encrypt
+ *---------------------------------------------------------------*/
+ if ( payloadType == TCHF )
+ {
+ g_DLTCHData.dltchword0.bitval.bufferValid = 1;
+ g_DLTCHData.dltchword0.bitval.sp = 1;
+ chanEncoder(TCHF, 1, timeSlot, txOn);
+ encrypt(rfCh, timeSlot, 0);
+ }
+ /*---------------------------------------------------------------
+ * For FACCH, channel encode and encrypt. Check RTS on non-filler.
+ *---------------------------------------------------------------*/
+ else /* payloadType is FACCH */
+ {
+ g_DLCCHData.bufferValid = TRUE;
+ chanEncoder(FACCH, 1, timeSlot, txOn);
+ encrypt(rfCh, timeSlot, 0);
+ if ( doRtsCheck )
+ {
+ rtsCheck(rfCh, timeSlot, FACCH, 0, facchMsg->numMsgsReady);
+ }
+ }
+ buildGSMBurst(TCHF, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, TCHF);
+ }
+ }
+ /*----------------------------------------------------------
+ * If TCH inactive, dlIdleProc() sends either dummy burst or
+ * nothing depending on whether this RF is the BCCH carrier
+ *----------------------------------------------------------*/
+ else
+ {
+ dlIdleProc(rfCh, timeSlot);
+ }
+ break;
+
+ default:
+ /*----------------------------------------------------------
+ * If not Group I, dlIdleProc() decides what to do
+ *----------------------------------------------------------*/
+ dlIdleProc(rfCh, timeSlot);
+ break;
+ }
+}
+
+
+/*****************************************************************************
+*
+* Function: dlTchProcBurst_3
+*
+* Description:
+* Processes downlink TCH bursts for frames 1,2,3 of every 0-3 block
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dlTchProcBurst_3(Uint8 rfCh, Uint8 timeSlot)
+{
+ t_TNInfo *ts;
+ t_TCHInfo *tch;
+ t_DLSigBufs *facchMsg;
+ Uint16 k;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ switch(ts->groupNum)
+ {
+ case GSM_GROUP_1:
+ tch = & ts->u.group1.tch;
+ facchMsg = ts->u.group1.facch.dlSigBuf;
+
+ if(tch->state == CHAN_ACTIVE)
+ {
+ if(g_loopBackMode == DSP_IQ_LOOPBACK)
+ {
+ if ( txRawIQBufIndex[timeSlot] < 156 )
+ k = 0;
+ else if ( txRawIQBufIndex[timeSlot] < 2*156 )
+ k = 156;
+ else if ( txRawIQBufIndex[timeSlot] < 3*156 )
+ k = 2*156;
+ else
+ k = 3*156;
+
+ txRawIQBufIndex[timeSlot] = k + 156;
+
+ compLpbkBuf(& rcvdRawIQFrames[timeSlot][k], (Uint32*)g_BBInfo[rfCh].dlBBSmpl);
+ }
+ else
+ {
+ chanEncoder(TCHF, 0, timeSlot, 0);
+ encrypt(rfCh, timeSlot, 3);
+ buildGSMBurst(TCHF, g_BBInfo[rfCh].tseqNum);
+ GMSKModulate(g_BBInfo[rfCh].dlBBSmpl, TCHF);
+ }
+ }
+ /*----------------------------------------------------------
+ * If TCH inactive, dlIdleProc() sends either dummy burst or
+ * nothing depending on whether this RF is the BCCH carrier
+ *----------------------------------------------------------*/
+ else
+ {
+ dlIdleProc(rfCh, timeSlot);
+ }
+ break;
+
+ default:
+ /*----------------------------------------------------------
+ * If not Group I, dlIdleProc() decides what to do
+ *----------------------------------------------------------*/
+ dlIdleProc(rfCh, timeSlot);
+ break;
+ }
+}
+
+/*****************************************************************************
+*
+* Function: ulSachIdleProc
+*
+* Description:
+* Translates to uplink SACCH or Idle function depending on postion in MF
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void ulSachIdleProc(Uint8 rfCh, Uint8 timeSlot)
+{
+ Void (** funcTbl ) ();
+ t_TNInfo *ts;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ funcTbl = (void *) & ulSacchIdleTbl[ts->u.group1.ulIndex++];
+ (* funcTbl)(rfCh, timeSlot);
+
+ ts->u.group1.ulIndex &= 0x7;
+}
+
+/*****************************************************************************
+*
+* Function: dlSachIdleProc
+*
+* Description:
+* Translates to downlink SACCH or Idle function depending on postion in MF
+*
+* Inputs:
+*
+* Outputs:
+*
+******************************************************************************/
+void dlSachIdleProc(Uint8 rfCh, Uint8 timeSlot)
+{
+
+ void (** funcTbl ) ();
+ t_TNInfo *ts;
+
+ ts = & g_BBInfo[rfCh].TNInfo[timeSlot];
+
+ funcTbl = (void *) & dlSacchIdleTbl[ts->u.group1.dlIndex++];
+ (* funcTbl)(rfCh, timeSlot);
+
+ ts->u.group1.dlIndex &= 0x7;
+}
+
diff --git a/data/mnet/GP10/Host/Alarm/Alarm.dsp b/data/mnet/GP10/Host/Alarm/Alarm.dsp
new file mode 100644
index 0000000..26f2a2c
--- /dev/null
+++ b/data/mnet/GP10/Host/Alarm/Alarm.dsp
@@ -0,0 +1,158 @@
+# Microsoft Developer Studio Project File - Name="Alarm" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=Alarm - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "Alarm.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "Alarm.mak" CFG="Alarm - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Alarm - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "Alarm - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Alarm - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ELSEIF "$(CFG)" == "Alarm - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Alarm___Win32_Debug"
+# PROP BASE Intermediate_Dir "Alarm___Win32_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Alarm___Win32_Debug"
+# PROP Intermediate_Dir "Alarm___Win32_Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /X /I ".\include" /I "..\Common_To_Host\include" /I "..\..\..\Common\Alarm\include" /I "..\..\..\Common\include" /I "..\Common_to_host" /I "D:\Tornado86\target\h" /I "D:\Tornado86\target\h\snmp" /I "D:\snapshot\VxVmi860\vxVmi\target\h\snmp" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D CPU=I80486 /D "__VXWORKS__" /FR"Debug/" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ENDIF
+
+# Begin Target
+
+# Name "Alarm - Win32 Release"
+# Name "Alarm - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\Common\Alarm\src\alarm_diskFile.cpp
+
+!IF "$(CFG)" == "Alarm - Win32 Release"
+
+!ELSEIF "$(CFG)" == "Alarm - Win32 Debug"
+
+# ADD CPP /nologo /Gm
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\Alarm\src\alarm_event.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\Alarm\src\alarm_main.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\Alarm\src\alarm_message.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\Alarm\src\alarm_modules.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\Alarm\src\alarm_socket.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\Alarm\src\alarm_sysCmd.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\..\Common\Alarm\include\alarm.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\Alarm\include\alarm_interface.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\Alarm\include\AlarmTask.h
+# End Source File
+# End Group
+# Begin Group "Common To Host Header"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\Common_To_Host\include\AlarmCode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\include\mibtags.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\include\MnetModuleId.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/data/mnet/GP10/Host/Alarm/Alarm.dsw b/data/mnet/GP10/Host/Alarm/Alarm.dsw
new file mode 100644
index 0000000..eea65f1
--- /dev/null
+++ b/data/mnet/GP10/Host/Alarm/Alarm.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "Alarm"=.\Alarm.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/data/mnet/GP10/Host/Alarm/AlarmCode.English b/data/mnet/GP10/Host/Alarm/AlarmCode.English
new file mode 100644
index 0000000..8af8fdb
--- /dev/null
+++ b/data/mnet/GP10/Host/Alarm/AlarmCode.English
@@ -0,0 +1,128 @@
+// AlarmCode.English
+// Copyright (C) 2000 Cisco Systems, Inc.
+// All rights reserved
+// WARNING: This file is automatically generated by an AlarmCode tool
+// Any changes made to this file will be overwritten by
+// subsequent uses of the tool.
+//
+// ALARM_ERROR_CODE | "ALARM_SYNOPSIS" | "ALARM_DETAIL_MESSAGE"
+ 0 | Module alarm has cleared | The alarm code %1 was cleared by module %module. The operational state of GSM Port depends on alarm status from all modules.
+ 16711681 | Module booting up | Module %module is booting up now
+ 16711682 | Module shutting down | Module %module is shutting down now
+ 16711683 | Out of Internal Memory Error | The GSM Port ran out of memory. Module %module did not complete its intended operation. GSM Port must be rebooted to recover from this situation.
+ 16711684 | System Internal Error | GSM Port software system encountered an unexpected error, which resulted in data corruption. GSM Port must be rebooted to recover from this situation.
+ 16711685 | Reboot Started | The GSM Port is rebooting now.
+ 131074 | First DSP/FPGA Hardware Failure | Bit clock at the first DSP/Fpga is not functioning. GSM Port must be rebooted to recover from this situation.
+ 131075 | Second DSP/FPGA Hardware Failure | Bit clock at the second DSP/Fpga is not functioning. GSM Port must be rebooted to recover from this situation.
+ 131076 | First DSP not responding | Link between RM and first DSP is broken. GSM Port must be rebooted to recover from this situation.
+ 131077 | Second DSP not responding | Link between RM and second DSP is broken. GSM Port can function in a reduced-Capacity mode if the first DSP can function properly. GSM Port must be rebooted to recover from this situation.
+ 131078 | DRF SYNTH 0 PLL Unlocked - BCCH | Radio Board BCCH Side TRX 1 PLL is not locked, BTS should be Shut down.
+ 131079 | DRF SYNTH 1 PLL Unlocked - BCCH | Radio Board BCCH Side TRX 2 PLL is not locked, BTS should be Shut down.
+ 131080 | Cell Broadcast Channel unusable | Cell broadcast channel initialization failed. Cell broadcast will not be supported until the next reboot. This channel, however, does not affect the operational state of the GSM Port.
+ 131081 | No usable traffic channel | Initialization of all the traffic channels failed. Please unlock them if they are locked. If the their admin state is already unlocked, please reboot the system.
+ 131082 | No TRX enabled | Initialization of both TRX failed. Please unlock them if they are locked. If the their admin state is already unlocked, please reboot the system.
+ 131083 | Illegal Configuration - No BCCH Channel | No BCCH channel combination is specified in the MIB. Please check the first TRX configuration through GP Manager.
+ 131084 | Illegal Configuration - Unsupported Channel | Unsupported channel combination is detected in the MIB. Please check both first and second TRX configuration through GP Manager
+ 131085 | Illegal Configuration - Two BCCH Channel | Only one BCCH channel is supported at this time but two BCCH channel configuration found. Please correct this problem through GP Manager.
+ 131086 | Illegal Configuration - Too many Channel Combination I | Too many channel combination I configuration found. Please correct this problem through GP Manager.
+ 131087 | Illegal Configuration - Multiple BCCH Channels | Only one BCCH channel is supported at this time but more than two BCCH channels have been configured. Please correct this problem through GP Manager.
+ 131088 | System Call Failure - Watchdog timer create | RM module detects failure in creating WatchDog Timer which is essential for proper software operation. GSM Port must be rebooted to recover from this situation.
+ 131089 | System Call Failure - Message queue receive | RM module encountered failure in receiving message. GSM Port must be rebooted to recover from this situation.
+ 131090 | OAM Api Failure | Could not set a field of a MIB table entry.
+ 131091 | Oam Api Failure | Could not set a MIB integer variable.
+ 131092 | RF board not detected | Failed to detect RF board. Please check if it is there.
+ 135169 | DRF TRX 1 PLL Unlocked -NON BCCH | Radio Board NON-BCCH TRX 1 PLL is not locked, TRX 1 is not usable.
+ 135170 | DRF TRX 2 PLL Unlocked -NON BCCH | Radio Board NON-BCCH TRX 2 PLL is not locked, TRX 2 is not usable.
+ 135171 | GSM Port Locked | The GSM Port was locked successfully. Existing calls (if any) were aborted. No new calls can be made through GSM Port.
+ 135172 | GSM Port Unlocked | The GSM Port was unlocked successfully. GSM Port can accept new calls if its operational state is enabled.
+ 135173 | GSM Port Shutting Down | The GSM Port is being shutdown. No new calls can be made through GSM Port. Existing calls are maintained until terminates normally.
+ 135174 | First TRX Locked | The first TRX was locked successfully. Locking of first TRX is equivalent of locking of GSM Port. Existing calls (if any) were aborted. No new calls can be made through GSM Port.
+ 135175 | Second TRX Locked | The second TRX was locked successfully. Existing calls (if any) were aborted. No new calls will be made through this TRX.
+ 135176 | First TRX Unlocked | The first TRX was unlocked successfully. New calls can be made through this TRX.
+ 135177 | Second TRX Unlocked | The second TRX was unlocked successfully. New calls can be made through this TRX.
+ 135178 | First TRX shutting down | The first TRX is being shutting down. Shutting down first TRX is equivalent of shutting down GSM Port. No new calls can be made through GSM Port. Existing calls are maintained until terminates normally.
+ 135179 | Second TRX shutting down | The second TRX is being shutting down. No new calls can be made through this TRX. Existing calls are maintained until terminates normally.
+ 135180 | First TRX Time Slot 0 locked | Locking of Time Slot 0 of first TRX is equivalent of locking GSM Port. Existing calls (if any) were aborted. No new calls can be made through GSM Port.
+ 135181 | First TRX Time Slot 1 locked | Time slot 1 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135182 | First TRX Time Slot 2 locked | Time slot 2 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135183 | First TRX Time Slot 3 locked | Time slot 3 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135184 | First TRX Time Slot 4 locked | Time slot 4 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135185 | First TRX Time Slot 5 locked | Time slot 5 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135186 | First TRX Time Slot 6 locked | Time slot 6 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135187 | First TRX Time Slot 7 locked | Time slot 7 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135188 | Second TRX Time Slot 0 locked | Time slot 0 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135189 | Second TRX Time Slot 1 locked | Time slot 1 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135190 | Second TRX Time Slot 2 locked | Time slot 2 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135191 | Second TRX Time Slot 3 locked | Time slot 3 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135192 | Second TRX Time Slot 4 locked | Time slot 4 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135193 | Second TRX Time Slot 5 locked | Time slot 5 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135194 | Second TRX Time Slot 6 locked | Time slot 6 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135195 | Second TRX Time Slot 7 locked | Time slot 7 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135196 | First TRX Time Slot 0 Unlocked | Time slot 0 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135197 | First TRX Time Slot 1 Unlocked | Time slot 1 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135198 | First TRX Time Slot 2 Unlocked | Time slot 2 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135199 | First TRX Time Slot 3 Unlocked | Time slot 3 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135200 | First TRX Time Slot 4 Unlocked | Time slot 4 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135201 | First TRX Time Slot 5 Unlocked | Time slot 5 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135202 | First TRX Time Slot 6 Unlocked | Time slot 6 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135203 | First TRX Time Slot 7 Unlocked | Time slot 7 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135204 | Second TRX Time Slot 0 Unlocked | Time slot 0 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135205 | Second TRX Time Slot 1 Unlocked | Time slot 1 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135206 | Second TRX Time Slot 2 Unlocked | Time slot 2 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135207 | Second TRX Time Slot 3 Unlocked | Time slot 3 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135208 | Second TRX Time Slot 4 Unlocked | Time slot 4 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135209 | Second TRX Time Slot 5 Unlocked | Time slot 5 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135210 | Second TRX Time Slot 6 Unlocked | Time slot 6 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135211 | Second TRX Time Slot 7 Unlocked | Time slot 7 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135212 | First TRX Time Slot 0 shutting down | Time slot 0 of the first TRX is being shutdown. Shutting down Time Slot 0 of First TRX is equivalent of shutting down GSM Port. Existing calls will be maintained until terminate normally. No new calls can be made through GSM Port.
+ 135213 | First TRX Time Slot 1 shutting down | Time slot 1 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135214 | First TRX Time Slot 2 shutting down | Time slot 2 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135215 | First TRX Time Slot 3 shutting down | Time slot 3 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135216 | First TRX Time Slot 4 shutting down | Time slot 4 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135217 | First TRX Time Slot 5 shutting down | Time slot 5 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135218 | First TRX Time Slot 6 shutting down | Time slot 6 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135219 | First TRX Time Slot 7 shutting down | Time slot 7 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135220 | Second TRX Time Slot 0 shutting down | Time slot 0 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135221 | Second TRX Time Slot 1 shutting down | Time slot 1 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135222 | Second TRX Time Slot 2 shutting down | Time slot 2 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135223 | Second TRX Time Slot 3 shutting down | Time slot 3 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135224 | Second TRX Time Slot 4 shutting down | Time slot 4 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135225 | Second TRX Time Slot 5 shutting down | Time slot 5 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135226 | Second TRX Time Slot 6 shutting down | Time slot 6 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135227 | Second TRX Time Slot 7 shutting down | Time slot 7 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135228 | Radio for the first TRX is off | Radio for the first TRX is off
+ 135229 | Radio for the second TRX is off | Radio for the second TRX is off
+ 135230 | RM detects corrupted Layer 1 message | RM module detected a corrupted message from Layer 1.
+ 327681 | LAPDm Internal Failure | Data corruption in the LAPDm Layer software. The system needs a reboot
+ 327936 | LAPDm Resource Exhausted | LAPDm Layer ran out of available frame buffer. This is most likely caused by radio link problem with MS.
+ 462848 | (Re)Load MIB | New MIB have been loaded on %1. You most likely need to reboot the GSM Port
+ 462850 | MIB save option Change - Timer enabled | MIB save timer has been disabled on %1.
+ 462849 | MIB save option Change - Timer disabled | MIB save timer has been disabled on %1.
+ 462851 | MIB Option Change - Duplicate save allowed | MIB save option change on %1.
+ 462852 | MIB option change - Duplicate save not allowed | Duplicate saving of the MIB is now disabled. This will improve the response time of the set operation at GP Manager
+ 458753 | GSM Port Operator-Initiated Reboot | The operator has initiated a reboot on %1. GSM Port will reboot within a few seconds.
+ 524289 | GMC Link Down | Detected link lost to GMC. Please check the operational status of GMC and the physical network connectivity between GMC and GSM Port.
+ 1179650 | CDR Client is unable to start | Validate CDR Client settings and reboot.
+ 1179905 | CDR Client is unable to communicate with CDR server | Check CDR client settings. Validate SSL certificate, key and password. Make sure that they are compatible with the CDR server certificates. Reboot application.
+ 1183745 | Missing or invalid CDR password | Validate that CDR password file is present and correct. Regenerate or replace CDR password file. Reboot application.
+ 1183746 | Missing or invalid CDR key file | Unable to decrypt the user certificate key using local password. Validate that CDR key file is present and correct. Check that CDR password is compatible with the key. Regenerate CDR password file if the password is incompatible or replace the key file. Reboot application.
+ 1183747 | Missing or invalid local SSL certificate | Validate the user, root certificates and the key file. Reboot application.
+ 1183748 | Invalid peer SSL certificate | Peer certificate verification has failed. Make sure that CDR Server is running in SSL-enabled mode and has correct certificates. Verify that CDR Server is using trusted root certificate. If the local certificate is changed, reboot application.
+ 917505 | MPC SRAM test failure | MCH Module's Test results indicates that there was a failure in MPC SRAM Test.
+ 917506 | DSP0 internal data RAM test failure | MCH Module's Post Test results indicates that there was a failure in DSP0's internal data RAM Test.
+ 917507 | DSP1 internal data RAM test failure | MCH Module's Post Test results indicates that there was a failure in DSP1's internal data RAM Test.
+ 917508 | DSP0 internal program RAM test failure | MCH Module's Post Test results indicates that there was a failure in DSP0's internal program RAM Test.
+ 917509 | DSP1 internal program RAM test failure | MCH Module's Post Test results indicates that there was a failure in DSP1's internal program RAM Test.
+ 917510 | DSP0 external RAM test failure | MCH Module's Post Test results indicates that there was a failure in DSP0's external RAM Test.
+ 917511 | DSP1 external RAM test failure | MCH Module's Post Test results indicates that there was a failure in DSP1's external RAM Test.
+ 917512 | FPGA0 test failure | MCH Module's Post Test results indicates that there was a failure in FPGA0 Test.
+ 917513 | FPGA1 test failure | MCH Module's Post Test results indicates that there was a failure in FPGA1 Test.
+ 917514 | I2C test failure | MCH Module's Post Test results indicates that there was a failure in I2C Test.
+ 917515 | ViperTask startup delay detected | One or more ViperTask has a delay on startup, reporting readiness late.
+ 917516 | SysCommand_xxx symbol not found | One or more module's SysCommand_xxx() function symbol is not found. Check module loading logs.
+ 917517 | Critical Task suspension detected | Critical Task suspension from ModuleId %1 detected.
+ 917518 | Critical exit abnormally detected | Critical Task abnormally exited from ModuleID %1 detected.
+ 917519 | LoadModule failure | Loading module object codes had problems. Check startup logs.
+ 917761 | Non-Critical Task suspension detected | Non-Critical Task suspension from ModuleId %1 detected.
+ 917762 | Non-Critical exit abnormally detected | Non-Critical Task abnormally exited from ModuleID %1 detected.
+ 917763 | TX power table error | The TX power table in the radio board EEPROM is corrupt.
diff --git a/data/mnet/GP10/Host/Alarm/AlarmTool/AlarmCode.cpp b/data/mnet/GP10/Host/Alarm/AlarmTool/AlarmCode.cpp
new file mode 100644
index 0000000..31c5631
--- /dev/null
+++ b/data/mnet/GP10/Host/Alarm/AlarmTool/AlarmCode.cpp
@@ -0,0 +1,272 @@
+
+/********************************************************************
+*
+* FILE NAME: alarmCodeTool.cpp
+*
+* DESCRIPTION: This file contains alarm code tools. It prints
+* alarm code to English Alarm message to the standard
+* output. The output file can be redirected to a disk file
+* and saved as AlarmCode.English at directory
+* /ViperCall/ViperWatch/Text. The alarm applet reads this
+* file to translate alarm code to English alarm message.
+*
+* COMPONENTS:
+*
+*
+* NOTES:
+*
+* (C) Copyright 2000 Cisco Systems, Inc., CA, USA http://www.cisco.com/
+*
+* REVISION HISTORY
+*__________________________________________________________________
+*----------+--------+----------------------------------------------
+* Name | Date | Reason
+*----------+--------+----------------------------------------------
+* Bhawani |08/26/99| Initial Draft
+*----------+--------+----------------------------------------------
+********************************************************************
+*/
+
+
+#include "AlarmCode.h"
+#include "stdio.h"
+
+
+typedef struct AlarmTableEntry {
+ int errCode;
+ char *synopsis;
+ char *detailMsg;
+} AlarmTableEntry;
+
+
+/* The alarm table contains alarm list. Alarm entries are populated in the following format
+ * {ALARM_ERROR_CODE | "ALARM_SYNOPSIS" | "ALARM_DETAIL_MESSAGE"},
+ *
+ * In the ALARM_DETAIL_MESSAGE, the following variable can be used to replaced relevant texts:
+ * %alarmId : Alarm Id in the alarm message.
+ * %timeStamp : The time when the alarm occurred.
+ * %severity : The alarm severity code [Critical, Major, Minor]
+ * %module : Module identifier name
+ * %alarmCode : Alarm code
+ * %1 : Optional argument 1
+ * %2 : Optional argument 2
+*/
+
+
+static AlarmTableEntry alarmTable[] = {
+
+ /* General Common Alarms */
+ {EC_NOERROR, "Module alarm has cleared", "The alarm code %1 was cleared by module %module. The operational state of GSM Port depends on alarm status from all modules."},
+ {EC_BOOTING_UP, "Module booting up", "Module %module is booting up now"},
+ {EC_SHUTTING_DOWN, "Module shutting down", "Module %module is shutting down now"},
+ {EC_NO_MEMORY, "Out of Internal Memory Error", "The GSM Port ran out of memory. Module %module did not complete its intended operation. GSM Port must be rebooted to recover from this situation."},
+ {EC_INTERNAL_ERROR, "System Internal Error", "GSM Port software system encountered an unexpected error, which resulted in data corruption. GSM Port must be rebooted to recover from this situation."},
+
+ /* Reboot started reported by roottask upon invocation of reboot-hook */
+ {EC_START_REBOOT, "Reboot Started", "The GSM Port is rebooting now."},
+
+
+ /* RM module related Alarms */
+ {EC_RM_DSP_0_NOT_TICKING, "First DSP/FPGA Hardware Failure", "Bit clock at the first DSP/Fpga is not functioning. GSM Port must be rebooted to recover from this situation."},
+ {EC_RM_DSP_1_NOT_TICKING, "Second DSP/FPGA Hardware Failure", "Bit clock at the second DSP/Fpga is not functioning. GSM Port must be rebooted to recover from this situation."},
+
+ {EC_RM_DSP_0_NOT_RESPONDING, "First DSP not responding", "Link between RM and first DSP is broken. GSM Port must be rebooted to recover from this situation."},
+ {EC_RM_DSP_1_NOT_RESPONDING, "Second DSP not responding", "Link between RM and second DSP is broken. GSM Port can function in a reduced-Capacity mode if the first DSP can function properly. GSM Port must be rebooted to recover from this situation."},
+
+ {EC_RM_DRF_SYNTH_0_FAILED_BCCH, "DRF SYNTH 0 PLL Unlocked - BCCH", "Radio Board BCCH Side TRX 1 PLL is not locked, BTS should be Shut down."},
+ {EC_RM_DRF_SYNTH_1_FAILED_BCCH, "DRF SYNTH 1 PLL Unlocked - BCCH", "Radio Board BCCH Side TRX 2 PLL is not locked, BTS should be Shut down."},
+
+ {EC_RM_CBCH_UNUSABLE, "Cell Broadcast Channel unusable", "Cell broadcast channel initialization failed. Cell broadcast will not be supported until the next reboot. This channel, however, does not affect the operational state of the GSM Port."},
+ {EC_RM_NOTCHFS_USABLE, "No usable traffic channel", "Initialization of all the traffic channels failed. Please unlock them if they are locked. If the their admin state is already unlocked, please reboot the system."},
+ {EC_RM_NO_TRX_ENABLED, "No TRX enabled", "Initialization of both TRX failed. Please unlock them if they are locked. If the their admin state is already unlocked, please reboot the system."},
+
+ {EC_RM_CHAN_COMB_5_MISPLACED, "Illegal Configuration - No BCCH Channel", "No BCCH channel combination is specified in the MIB. Please check the first TRX configuration through GP Manager."},
+ {EC_RM_CHAN_COMB_UNSUPPORTED, "Illegal Configuration - Unsupported Channel", "Unsupported channel combination is detected in the MIB. Please check both first and second TRX configuration through GP Manager"},
+ {EC_RM_TWO_CHAN_COMB_5_EXIST, "Illegal Configuration - Two BCCH Channel", "Only one BCCH channel is supported at this time but two BCCH channel configuration found. Please correct this problem through GP Manager."},
+ {EC_RM_TOO_MANY_CHAN_COMB_1_DETECTED, "Illegal Configuration - Too many Channel Combination I", "Too many channel combination I configuration found. Please correct this problem through GP Manager."},
+ {EC_RM_TOO_MANY_CHAN_COMB_5_DETECTED, "Illegal Configuration - Multiple BCCH Channels", "Only one BCCH channel is supported at this time but more than two BCCH channels have been configured. Please correct this problem through GP Manager."},
+
+ {EC_RM_OS_CALL_WDCREATE_FAILED, "System Call Failure - Watchdog timer create", "RM module detects failure in creating WatchDog Timer which is essential for proper software operation. GSM Port must be rebooted to recover from this situation."},
+ {EC_RM_OS_CALL_MSGQRECEIVE_FAILED, "System Call Failure - Message queue receive", "RM module encountered failure in receiving message. GSM Port must be rebooted to recover from this situation."},
+
+ {EC_RM_OAM_CALL_SETTBLENTRYFIELD_FAILED, "OAM Api Failure", "Could not set a field of a MIB table entry."},
+ {EC_RM_OAM_CALL_SETMIBINTVAR_FAILED, "Oam Api Failure", "Could not set a MIB integer variable."},
+ {EC_RM_RF_BOARD_NOT_DETECTED, "RF board not detected", "Failed to detect RF board. Please check if it is there."},
+
+
+ //informational alarm code definitions
+
+ {EC_RM_DRF_SYNTH_0_FAILED_NON_BCCH, "DRF TRX 1 PLL Unlocked -NON BCCH", "Radio Board NON-BCCH TRX 1 PLL is not locked, TRX 1 is not usable."},
+ {EC_RM_DRF_SYNTH_1_FAILED_NON_BCCH, "DRF TRX 2 PLL Unlocked -NON BCCH", "Radio Board NON-BCCH TRX 2 PLL is not locked, TRX 2 is not usable."},
+
+ {EC_RM_BTS_LOCKED, "GSM Port Locked", "The GSM Port was locked successfully. Existing calls (if any) were aborted. No new calls can be made through GSM Port."},
+ {EC_RM_BTS_UNLOCKED, "GSM Port Unlocked", "The GSM Port was unlocked successfully. GSM Port can accept new calls if its operational state is enabled."},
+ {EC_RM_BTS_SHUTTINGDOWN, "GSM Port Shutting Down", "The GSM Port is being shutdown. No new calls can be made through GSM Port. Existing calls are maintained until terminates normally."},
+
+ {EC_RM_TRX_1_LOCKED, "First TRX Locked ", "The first TRX was locked successfully. Locking of first TRX is equivalent of locking of GSM Port. Existing calls (if any) were aborted. No new calls can be made through GSM Port."},
+ {EC_RM_TRX_2_LOCKED, "Second TRX Locked", "The second TRX was locked successfully. Existing calls (if any) were aborted. No new calls will be made through this TRX."},
+
+ {EC_RM_TRX_1_UNLOCKED, "First TRX Unlocked", "The first TRX was unlocked successfully. New calls can be made through this TRX."},
+ {EC_RM_TRX_2_UNLOCKED, "Second TRX Unlocked", "The second TRX was unlocked successfully. New calls can be made through this TRX."},
+
+ {EC_RM_TRX_1_SHUTTINGDOWN, "First TRX shutting down ", "The first TRX is being shutting down. Shutting down first TRX is equivalent of shutting down GSM Port. No new calls can be made through GSM Port. Existing calls are maintained until terminates normally."},
+ {EC_RM_TRX_2_SHUTTINGDOWN, "Second TRX shutting down ", "The second TRX is being shutting down. No new calls can be made through this TRX. Existing calls are maintained until terminates normally."},
+
+
+ {EC_RM_TRX_1_SLOT_1_LOCKED, "First TRX Time Slot 0 locked", "Locking of Time Slot 0 of first TRX is equivalent of locking GSM Port. Existing calls (if any) were aborted. No new calls can be made through GSM Port."},
+ {EC_RM_TRX_1_SLOT_2_LOCKED, "First TRX Time Slot 1 locked", "Time slot 1 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot."},
+ {EC_RM_TRX_1_SLOT_3_LOCKED, "First TRX Time Slot 2 locked", "Time slot 2 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot."},
+ {EC_RM_TRX_1_SLOT_4_LOCKED, "First TRX Time Slot 3 locked", "Time slot 3 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot."},
+ {EC_RM_TRX_1_SLOT_5_LOCKED, "First TRX Time Slot 4 locked", "Time slot 4 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot."},
+ {EC_RM_TRX_1_SLOT_6_LOCKED, "First TRX Time Slot 5 locked", "Time slot 5 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot."},
+ {EC_RM_TRX_1_SLOT_7_LOCKED, "First TRX Time Slot 6 locked", "Time slot 6 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot."},
+ {EC_RM_TRX_1_SLOT_8_LOCKED, "First TRX Time Slot 7 locked", "Time slot 7 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_1_LOCKED, "Second TRX Time Slot 0 locked", "Time slot 0 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_2_LOCKED, "Second TRX Time Slot 1 locked", "Time slot 1 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_3_LOCKED, "Second TRX Time Slot 2 locked", "Time slot 2 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_4_LOCKED, "Second TRX Time Slot 3 locked", "Time slot 3 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_5_LOCKED, "Second TRX Time Slot 4 locked", "Time slot 4 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_6_LOCKED, "Second TRX Time Slot 5 locked", "Time slot 5 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_7_LOCKED, "Second TRX Time Slot 6 locked", "Time slot 6 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_8_LOCKED, "Second TRX Time Slot 7 locked", "Time slot 7 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot."},
+
+ {EC_RM_TRX_1_SLOT_1_UNLOCKED, "First TRX Time Slot 0 Unlocked", "Time slot 0 of the first TRX was unlocked successfully. New calls can be made through this time slot."},
+ {EC_RM_TRX_1_SLOT_2_UNLOCKED, "First TRX Time Slot 1 Unlocked", "Time slot 1 of the first TRX was unlocked successfully. New calls can be made through this time slot."},
+ {EC_RM_TRX_1_SLOT_3_UNLOCKED, "First TRX Time Slot 2 Unlocked", "Time slot 2 of the first TRX was unlocked successfully. New calls can be made through this time slot."},
+ {EC_RM_TRX_1_SLOT_4_UNLOCKED, "First TRX Time Slot 3 Unlocked", "Time slot 3 of the first TRX was unlocked successfully. New calls can be made through this time slot."},
+ {EC_RM_TRX_1_SLOT_5_UNLOCKED, "First TRX Time Slot 4 Unlocked", "Time slot 4 of the first TRX was unlocked successfully. New calls can be made through this time slot."},
+ {EC_RM_TRX_1_SLOT_6_UNLOCKED, "First TRX Time Slot 5 Unlocked", "Time slot 5 of the first TRX was unlocked successfully. New calls can be made through this time slot."},
+ {EC_RM_TRX_1_SLOT_7_UNLOCKED, "First TRX Time Slot 6 Unlocked", "Time slot 6 of the first TRX was unlocked successfully. New calls can be made through this time slot."},
+ {EC_RM_TRX_1_SLOT_8_UNLOCKED, "First TRX Time Slot 7 Unlocked", "Time slot 7 of the first TRX was unlocked successfully. New calls can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_1_UNLOCKED, "Second TRX Time Slot 0 Unlocked", "Time slot 0 of the second TRX was unlocked successfully. New calls can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_2_UNLOCKED, "Second TRX Time Slot 1 Unlocked", "Time slot 1 of the second TRX was unlocked successfully. New calls can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_3_UNLOCKED, "Second TRX Time Slot 2 Unlocked", "Time slot 2 of the second TRX was unlocked successfully. New calls can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_4_UNLOCKED, "Second TRX Time Slot 3 Unlocked", "Time slot 3 of the second TRX was unlocked successfully. New calls can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_5_UNLOCKED, "Second TRX Time Slot 4 Unlocked", "Time slot 4 of the second TRX was unlocked successfully. New calls can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_6_UNLOCKED, "Second TRX Time Slot 5 Unlocked", "Time slot 5 of the second TRX was unlocked successfully. New calls can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_7_UNLOCKED, "Second TRX Time Slot 6 Unlocked", "Time slot 6 of the second TRX was unlocked successfully. New calls can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_8_UNLOCKED, "Second TRX Time Slot 7 Unlocked", "Time slot 7 of the second TRX was unlocked successfully. New calls can be made through this time slot."},
+
+ {EC_RM_TRX_1_SLOT_1_SHUTTINGDOWN, "First TRX Time Slot 0 shutting down", "Time slot 0 of the first TRX is being shutdown. Shutting down Time Slot 0 of First TRX is equivalent of shutting down GSM Port. Existing calls will be maintained until terminate normally. No new calls can be made through GSM Port."},
+ {EC_RM_TRX_1_SLOT_2_SHUTTINGDOWN, "First TRX Time Slot 1 shutting down", "Time slot 1 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot."},
+ {EC_RM_TRX_1_SLOT_3_SHUTTINGDOWN, "First TRX Time Slot 2 shutting down", "Time slot 2 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot."},
+ {EC_RM_TRX_1_SLOT_4_SHUTTINGDOWN, "First TRX Time Slot 3 shutting down", "Time slot 3 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot."},
+ {EC_RM_TRX_1_SLOT_5_SHUTTINGDOWN, "First TRX Time Slot 4 shutting down", "Time slot 4 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot."},
+ {EC_RM_TRX_1_SLOT_6_SHUTTINGDOWN, "First TRX Time Slot 5 shutting down", "Time slot 5 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot."},
+ {EC_RM_TRX_1_SLOT_7_SHUTTINGDOWN, "First TRX Time Slot 6 shutting down", "Time slot 6 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot."},
+ {EC_RM_TRX_1_SLOT_8_SHUTTINGDOWN, "First TRX Time Slot 7 shutting down", "Time slot 7 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_1_SHUTTINGDOWN, "Second TRX Time Slot 0 shutting down", "Time slot 0 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_2_SHUTTINGDOWN, "Second TRX Time Slot 1 shutting down", "Time slot 1 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_3_SHUTTINGDOWN, "Second TRX Time Slot 2 shutting down", "Time slot 2 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_4_SHUTTINGDOWN, "Second TRX Time Slot 3 shutting down", "Time slot 3 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_5_SHUTTINGDOWN, "Second TRX Time Slot 4 shutting down", "Time slot 4 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_6_SHUTTINGDOWN, "Second TRX Time Slot 5 shutting down", "Time slot 5 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_7_SHUTTINGDOWN, "Second TRX Time Slot 6 shutting down", "Time slot 6 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot."},
+ {EC_RM_TRX_2_SLOT_8_SHUTTINGDOWN, "Second TRX Time Slot 7 shutting down", "Time slot 7 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot."},
+
+ {EC_RM_TRX_0_RADIO_OFF,"Radio for the first TRX is off", "Radio for the first TRX is off"},
+ {EC_RM_TRX_1_RADIO_OFF,"Radio for the second TRX is off", "Radio for the second TRX is off"},
+ {EC_RM_RECV_CORRUPTED_DSP_MSG, "RM detects corrupted Layer 1 message ", "RM module detected a corrupted message from Layer 1."},
+
+
+ /* LAPDM Error Alarm Code */
+ {EC_L2_DATA_CORRUPTED, "LAPDm Internal Failure", "Data corruption in the LAPDm Layer software. The system needs a reboot"},
+ {EC_L2_FREE_FRAME_EXHAUSTED, "LAPDm Resource Exhausted", "LAPDm Layer ran out of available frame buffer. This is most likely caused by radio link problem with MS."},
+
+ /* OAM Alarm */
+ {EC_OAM_RELOAD_MIB, "(Re)Load MIB", "New MIB have been loaded on %1. You most likely need to reboot the GSM Port"},
+ {EC_OAM_ENABLE_TIMEX, "MIB save option Change - Timer enabled", "MIB save timer has been disabled on %1."},
+ {EC_OAM_DISABLE_TIMEX, "MIB save option Change - Timer disabled", "MIB save timer has been disabled on %1."},
+ {EC_OAM_ALLOW_DUPS, "MIB Option Change - Duplicate save allowed", "MIB save option change on %1."},
+ {EC_OAM_SUPPRESS_DUPS, "MIB option change - Duplicate save not allowed", "Duplicate saving of the MIB is now disabled. This will improve the response time of the set operation at GP Manager"},
+ {EC_OAM_REBOOT, "GSM Port Operator-Initiated Reboot", "The operator has initiated a reboot on %1. GSM Port will reboot within a few seconds."},
+
+
+ /* GMC Alarm */
+ {EC_VIPERBASE_LINKDOWN, "GMC Link Down", "Detected link lost to GMC. Please check the operational status of GMC and the physical network connectivity between GMC and GSM Port."},
+
+
+ /* CDR Client application */
+ { EC_CDR_CLIENT_INIT_FAILED , "CDR Client is unable to start" , "Validate CDR Client settings and reboot." },
+ { EC_CDR_CLIENT_UNABLE_CONNECT_SERVER, "CDR Client is unable to communicate with CDR server", "Check CDR client settings. Validate SSL certificate, key and password. Make sure that they are compatible with the CDR server certificates. Reboot application." },
+ { EC_CDR_CLIENT_BAD_SSL_PASSWORD_FILE, "Missing or invalid CDR password" , "Validate that CDR password file is present and correct. Regenerate or replace CDR password file. Reboot application." },
+ { EC_CDR_CLIENT_BAD_SSL_KEY_FILE , "Missing or invalid CDR key file" , "Unable to decrypt the user certificate key using local password. Validate that CDR key file is present and correct. Check that CDR password is compatible with the key. Regenerate CDR password file if the password is incompatible or replace the key file. Reboot application." },
+ { EC_CDR_CLIENT_BAD_LOCAL_CERTIFICATE, "Missing or invalid local SSL certificate" , "Validate the user, root certificates and the key file. Reboot application." },
+ { EC_CDR_CLIENT_BAD_PEER_CERTIFICATE , "Invalid peer SSL certificate" , "Peer certificate verification has failed. Make sure that CDR Server is running in SSL-enabled mode and has correct certificates. Verify that CDR Server is using trusted root certificate. If the local certificate is changed, reboot application." },
+
+
+ /* RootTask Alarm */
+ {EC_ROOT_MPC_SRAM_FAIL, "MPC SRAM test failure", "MCH Module's Test results indicates that there was a failure in MPC SRAM Test."},
+ {EC_ROOT_DSP0_INT_DATA_RAM_FAIL,"DSP0 internal data RAM test failure", "MCH Module's Post Test results indicates that there was a failure in DSP0's internal data RAM Test."},
+ {EC_ROOT_DSP1_INT_DATA_RAM_FAIL,"DSP1 internal data RAM test failure", "MCH Module's Post Test results indicates that there was a failure in DSP1's internal data RAM Test."},
+ {EC_ROOT_DSP0_INT_PROG_RAM_FAIL,"DSP0 internal program RAM test failure", "MCH Module's Post Test results indicates that there was a failure in DSP0's internal program RAM Test."},
+ {EC_ROOT_DSP1_INT_PROG_RAM_FAIL,"DSP1 internal program RAM test failure", "MCH Module's Post Test results indicates that there was a failure in DSP1's internal program RAM Test."},
+ {EC_ROOT_DSP0_EXT_RAM_FAIL, "DSP0 external RAM test failure", "MCH Module's Post Test results indicates that there was a failure in DSP0's external RAM Test."},
+ {EC_ROOT_DSP1_EXT_RAM_FAIL, "DSP1 external RAM test failure", "MCH Module's Post Test results indicates that there was a failure in DSP1's external RAM Test."},
+ {EC_ROOT_FPGA0_FAIL, "FPGA0 test failure", "MCH Module's Post Test results indicates that there was a failure in FPGA0 Test."},
+ {EC_ROOT_FPGA1_FAIL, "FPGA1 test failure", "MCH Module's Post Test results indicates that there was a failure in FPGA1 Test."},
+ {EC_ROOT_I2C_FAIL, "I2C test failure", "MCH Module's Post Test results indicates that there was a failure in I2C Test."},
+ {EC_ROOT_TASK_START_DELEY, "ViperTask startup delay detected", "One or more ViperTask has a delay on startup, reporting readiness late."},
+ {EC_ROOT_SYSCMD_SYM_NOT_FOUND, "SysCommand_xxx symbol not found", "One or more module's SysCommand_xxx() function symbol is not found. Check module loading logs."},
+ {EC_ROOT_CRITICAL_TASK_SUSPEND, "Critical Task suspension detected", "Critical Task suspension from ModuleId %1 detected."},
+ {EC_ROOT_CRITICAL_TASK_MISSING, "Critical exit abnormally detected", "Critical Task abnormally exited from ModuleID %1 detected."},
+ {EC_ROOT_LOAD_MODULE_FAIL, "LoadModule failure", "Loading module object codes had problems. Check startup logs."},
+ {EC_ROOT_NON_CRITICAL_TASK_SUSPEND, "Non-Critical Task suspension detected", "Non-Critical Task suspension from ModuleId %1 detected."},
+ {EC_ROOT_NON_CRITICAL_TASK_MISSING, "Non-Critical exit abnormally detected", "Non-Critical Task abnormally exited from ModuleID %1 detected."},
+ {EC_ROOT_TX_POWER_TABLE_ERROR, "TX power table error", "The TX power table in the radio board EEPROM is corrupt."},
+
+ /* Don't alter the last line */
+ {-1, 0, 0}
+
+};
+
+
+extern "C" char * getAlarmSynopsis(int code)
+{
+ int i;
+
+ for (i=0; alarmTable[i].errCode != -1; i++)
+ {
+ if (alarmTable[i].errCode == code)
+ return alarmTable[i].synopsis;
+ }
+
+ return NULL;
+}
+
+extern "C" char * getAlarmDetail(int code)
+{
+ int i;
+
+ for (i=0; alarmTable[i].errCode != -1; i++)
+ {
+ if (alarmTable[i].errCode == code)
+ return alarmTable[i].detailMsg;
+ }
+
+ return NULL;
+}
+
+int main(int argc, char* argv[])
+{
+ int i;
+
+ printf("// AlarmCode.English\n");
+ printf("// Copyright (C) 2000 Cisco Systems, Inc. \n");
+ printf("// All rights reserved \n");
+ printf("// WARNING: This file is automatically generated by an AlarmCode tool \n");
+ printf("// Any changes made to this file will be overwritten by \n");
+ printf("// subsequent uses of the tool. \n");
+ printf("// \n");
+ printf("// ALARM_ERROR_CODE | \"ALARM_SYNOPSIS\" | \"ALARM_DETAIL_MESSAGE\" \n");
+
+ for (i=0; alarmTable[i].errCode != -1; i++)
+ {
+ printf("%10d | ", alarmTable[i].errCode);
+ printf("%s | ", alarmTable[i].synopsis);
+ printf("%s\n", alarmTable[i].detailMsg);
+ }
+
+ return 0;
+}
+
diff --git a/data/mnet/GP10/Host/Alarm/AlarmTool/AlarmTool.dsp b/data/mnet/GP10/Host/Alarm/AlarmTool/AlarmTool.dsp
new file mode 100644
index 0000000..3d21f89
--- /dev/null
+++ b/data/mnet/GP10/Host/Alarm/AlarmTool/AlarmTool.dsp
@@ -0,0 +1,105 @@
+# Microsoft Developer Studio Project File - Name="AlarmTool" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=AlarmTool - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "AlarmTool.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "AlarmTool.mak" CFG="AlarmTool - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "AlarmTool - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "AlarmTool - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName "AlarmTool"
+# PROP Scc_LocalPath "."
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "AlarmTool - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "..\..\Common_To_Host\include" /I "..\..\Common_To_Host" /I "..\..\..\..\Common\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "AlarmTool - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\Common_To_Host\include" /I "..\..\Common_To_Host" /I "..\..\..\..\Common\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# SUBTRACT CPP /X /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "AlarmTool - Win32 Release"
+# Name "AlarmTool - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\AlarmCode.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\Common_To_Host\include\AlarmCode.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/data/mnet/GP10/Host/Alarm/AlarmTool/AlarmTool.dsw b/data/mnet/GP10/Host/Alarm/AlarmTool/AlarmTool.dsw
new file mode 100644
index 0000000..786ebef
--- /dev/null
+++ b/data/mnet/GP10/Host/Alarm/AlarmTool/AlarmTool.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "AlarmTool"=.\AlarmTool.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/data/mnet/GP10/Host/Alarm/AlarmTool/Makefile b/data/mnet/GP10/Host/Alarm/AlarmTool/Makefile
new file mode 100644
index 0000000..de93d10
--- /dev/null
+++ b/data/mnet/GP10/Host/Alarm/AlarmTool/Makefile
@@ -0,0 +1,89 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on AlarmCode.dsp
+
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+CPP=cl.exe
+RSC=rc.exe
+
+OUTDIR=.\.
+INTDIR=.\.
+# Begin Custom Macros
+
+ALARMCODE= ..\AlarmCode.English
+
+# End Custom Macros
+
+ALL : $(ALARMCODE)
+
+
+CLEAN :
+ -@erase "$(INTDIR)\AlarmCode.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(OUTDIR)\AlarmCode.exe"
+ -@erase "$(OUTDIR)\AlarmCode.ilk"
+ -@erase "$(OUTDIR)\AlarmCode.pdb"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP_PROJ= /MLd /W3 /Gm /GX /ZI /Od /I "..\..\Common_To_Host\include" /I "..\..\Common_To_Host" /I "..\..\..\..\Common\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\AlarmCode.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\AlarmCode.pdb" /debug /machine:I386 /out:"$(OUTDIR)\AlarmCode.exe" /pdbtype:sept
+LINK32_OBJS= \
+ "$(INTDIR)\AlarmCode.obj"
+
+$(ALARMCODE) : "$(OUTDIR)\AlarmCode.exe"
+ "$(OUTDIR)\AlarmCode.exe" > "$@"
+
+
+"$(OUTDIR)\AlarmCode.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+
+
+SOURCE=.\AlarmCode.cpp
+
+"$(INTDIR)\AlarmCode.obj" : $(SOURCE) "$(INTDIR)"
+
diff --git a/data/mnet/GP10/Host/Alarm/Makefile b/data/mnet/GP10/Host/Alarm/Makefile
new file mode 100644
index 0000000..7a71147
--- /dev/null
+++ b/data/mnet/GP10/Host/Alarm/Makefile
@@ -0,0 +1,20 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS=src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ -$(CP) bin\*.out $(TOP_OF_VOB)\bin\
+
+testbuild: cleanall
+ $(MAKE) all EXTRA=-D_UT
+ $(MAKE) copyall \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Alarm/Test/Makefile b/data/mnet/GP10/Host/Alarm/Test/Makefile
new file mode 100644
index 0000000..76b0941
--- /dev/null
+++ b/data/mnet/GP10/Host/Alarm/Test/Makefile
@@ -0,0 +1,29 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+INC_DIR = ../include
+MY_OUT = $(OBJDIR)\alarmTest.out
+MY_OBJ = $(MY_OUT:.out=.o)
+C++FLAGS += -g
+
+all: $(MY_OUT)
+ @echo done
+
+$(MY_OUT): $(MODULE_OBJS)
+ $(LD) -r -o $(MY_OBJ) $(MODULE_OBJS)
+ $(NM) $(MY_OBJ)(.out:.o)| munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $(MY_OUT) _ctdt.o $(MY_OBJ)
+ $(RM) _ctdt.c _ctdt.o $(MY_OBJ)
+ $(MV) ..\bin\*.o ..\bin\objs\
+
+$(MODULE_OBJS):$(wildcard $(INC_DIR)/*.h) Makefile \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Alarm/include/alarm_prodSpec.h b/data/mnet/GP10/Host/Alarm/include/alarm_prodSpec.h
new file mode 100644
index 0000000..5cd59f4
--- /dev/null
+++ b/data/mnet/GP10/Host/Alarm/include/alarm_prodSpec.h
@@ -0,0 +1,54 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : AlarmTask.h */
+/* Author(s) : Bhawani Sapkota */
+/* Create Date : 11/20/2000 */
+/* Description : This file contains Gp10 specific Alarm defination */
+/* */
+/*********************************************************************/
+/* REVISION HISTORY
+/*___________________________________________________________________*/
+/*----------+--------+-----------------------------------------------*/
+/* Name | Date | Reason */
+/*----------+--------+-----------------------------------------------*/
+/* Bhawani |11/20/00| First working copy as common alarm module */
+/*----------+--------+-----------------------------------------------*/
+/*********************************************************************/
+
+#if !defined(_ALARM_PRODSPEC_H_)
+#define _ALARM_PRODSPEC_H_
+
+/* Some condition compilation */
+#define _SNMP_AGENT_EXIST
+#define _TCP_SERVER_EXIST
+
+#include "GP10OsTune.h"
+#include "oam_api.h"
+#include <string.h>
+
+
+/* Gp10 specific module and product IDs */
+#define MY_PRODUCT_ID MNET_PRODUCT_GP10
+#define MY_MODULE_ID MODULE_ALARM
+#define MY_LOGID ALARM_LAYER
+#define MNET_MODULE_SNMP MODULE_OAM
+
+/* GP10 specific MIB tags */
+#define MY_MIB_SOURCE_NAME MIB_viperCellName
+#define MY_MIB_ERROR_INFO MIB_viperCellErrorInfoMib
+#define MY_MIB_OAM_OPERATION MIB_oam_operation
+#define MY_MIB_APM1_IP_ADDRESS MIB_h323_GKIPAddress
+#define MY_MIB_OPERATION_STATE MIB_bts_operationalState
+#define MY_MIB_ACCESS_CONTROL_TAG MIB_mibAccessControlFlag
+
+
+#endif // _ALARM_PRODSPEC_H_
diff --git a/data/mnet/GP10/Host/Alarm/src/Makefile b/data/mnet/GP10/Host/Alarm/src/Makefile
new file mode 100644
index 0000000..2787ec9
--- /dev/null
+++ b/data/mnet/GP10/Host/Alarm/src/Makefile
@@ -0,0 +1,51 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = Alarm
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\$(THIS_APP_DIR).out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR = Alarm
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: common $(MY_OUTPUT)
+
+
+# Adds the .o file(s) list needed from the Common VOB
+common:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ $(RM) ..\bin\*.o
+ $(RM) ..\bin\*.out
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) .\bin\*.o
+ $(RM) .\bin\*.out
+endif
diff --git a/data/mnet/GP10/Host/Cdc_bsp/._default b/data/mnet/GP10/Host/Cdc_bsp/._default
new file mode 100644
index 0000000..1874828
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/._default
@@ -0,0 +1 @@
+0
diff --git a/data/mnet/GP10/Host/Cdc_bsp/.include-config-1 b/data/mnet/GP10/Host/Cdc_bsp/.include-config-1
new file mode 100644
index 0000000..10aaa48
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/.include-config-1
@@ -0,0 +1,80 @@
+INCLUDE_ANSI_ALL
+INCLUDE_ANSI_ASSERT
+INCLUDE_ANSI_CTYPE
+INCLUDE_ANSI_LOCALE
+INCLUDE_ANSI_MATH
+INCLUDE_ANSI_STDIO
+INCLUDE_ANSI_STDLIB
+INCLUDE_ANSI_STRING
+INCLUDE_ANSI_TIME
+INCLUDE_BOOTP
+INCLUDE_BSD_SOCKET
+INCLUDE_CACHE_SUPPORT
+INCLUDE_CONSTANT_RDY_Q
+INCLUDE_CPLUS
+INCLUDE_CPM
+INCLUDE_DEBUG
+INCLUDE_ELF
+INCLUDE_ENV_VARS
+INCLUDE_EXC_HANDLING
+INCLUDE_EXC_TASK
+INCLUDE_FLOATING_POINT
+INCLUDE_FORMATTED_IO
+INCLUDE_GCC_FP
+INCLUDE_ICMP
+INCLUDE_IF_USR
+INCLUDE_IGMP
+INCLUDE_IO_SYSTEM
+INCLUDE_JAVA_AGENT
+INCLUDE_JAVA_AWT
+INCLUDE_JAVA_JPEG
+INCLUDE_JAVA_MATH
+INCLUDE_JAVA_MMEDIA
+INCLUDE_JAVA_NET
+INCLUDE_JAVA_SYSRESOURCE
+INCLUDE_JAVA_USER
+INCLUDE_JAVA_ZIP
+INCLUDE_LOADER
+INCLUDE_LOGGING
+INCLUDE_MEM_MGR_FULL
+INCLUDE_MMU_BASIC
+INCLUDE_MSG_Q
+INCLUDE_NET_INIT
+INCLUDE_NET_REM_IO
+INCLUDE_NET_SHOW
+INCLUDE_NETWORK
+INCLUDE_PING
+INCLUDE_PIPES
+INCLUDE_PROXY_CLIENT
+INCLUDE_SELECT
+INCLUDE_SEM_BINARY
+INCLUDE_SEM_COUNTING
+INCLUDE_SEM_MUTEX
+INCLUDE_SHELL
+INCLUDE_SHOW_ROUTINES
+INCLUDE_SIGNALS
+INCLUDE_SM_SEQ_ADDR
+INCLUDE_STANDALONE_SYM_TBL
+INCLUDE_STDIO
+INCLUDE_TASK_HOOKS
+INCLUDE_TASK_VARS
+INCLUDE_TCP
+INCLUDE_TFTP_CLIENT
+INCLUDE_TIMEX
+INCLUDE_TTY_DEV
+INCLUDE_UDP
+INCLUDE_WATCHDOGS
+INCLUDE_WDB
+INCLUDE_WDB_BANNER
+INCLUDE_WDB_BP
+INCLUDE_WDB_CTXT
+INCLUDE_WDB_DIRECT_CALL
+INCLUDE_WDB_EVENTS
+INCLUDE_WDB_EXC_NOTIFY
+INCLUDE_WDB_EXIT_NOTIFY
+INCLUDE_WDB_FUNC_CALL
+INCLUDE_WDB_GOPHER
+INCLUDE_WDB_MEM
+INCLUDE_WDB_REG
+INCLUDE_WDB_TTY_TEST
+INCLUDE_WDB_VIO
diff --git a/data/mnet/GP10/Host/Cdc_bsp/.modules-config-1 b/data/mnet/GP10/Host/Cdc_bsp/.modules-config-1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/.modules-config-1
diff --git a/data/mnet/GP10/Host/Cdc_bsp/.target-config-1 b/data/mnet/GP10/Host/Cdc_bsp/.target-config-1
new file mode 100644
index 0000000..b4816a9
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/.target-config-1
@@ -0,0 +1 @@
+clean 0
diff --git a/data/mnet/GP10/Host/Cdc_bsp/MakeBootrom.exe b/data/mnet/GP10/Host/Cdc_bsp/MakeBootrom.exe
new file mode 100644
index 0000000..6896705
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/MakeBootrom.exe
Binary files differ
diff --git a/data/mnet/GP10/Host/Cdc_bsp/Makefile b/data/mnet/GP10/Host/Cdc_bsp/Makefile
new file mode 100644
index 0000000..fe076d4
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/Makefile
@@ -0,0 +1,130 @@
+# JetCell modification history
+# ----------------------------
+# 00/08/09 ck Add susUser.o in MACH_EXTRA
+# 99/09/11 ck Add usrFsLib.o in MACH_EXTRA
+# 99/03/22 ck Add JetCell modification history
+# 99/02/18 ck Changes for CDCIM.
+# 99/02/18 ck Initial revision. Copied from ads860 bsp.
+
+# Makefile - makefile for bsp/config/ads860
+#
+# Copyright 1984-1996 Wind River Systems, Inc.
+#
+# modification history
+# --------------------
+# 01d,06nov96,tpr replaced RAM_LOW_ADRS from 00100000 to 00010000.
+# + remove RELEASE.
+# 01c,25jun96,tpr removed vxWorks.st of the release rule.
+# 01b,20jun96,tpr added TGT_DIR and replaced $(WIND_BASE) by $(TGT_DIR).
+# 01a,16apr96,tpr written from bsp/ultra603/Makefile 01c version.
+#
+# DESCRIPTION
+# This file contains rules for building VxWorks for the
+# Motorola Application Development Support Board with a PowerPC 860 or
+# PowerPC 821 processor.
+#
+# INCLUDES
+# makeTarget
+#*/
+TOP_OF_VOB = ..\..\..
+
+CPU = PPC860
+TOOL = gnu
+
+TGT_DIR = $(WIND_BASE)/target
+CLI_DIR = $(TOP_OF_VOB)\Common\cli\bin
+CLI_SRC = $(TOP_OF_VOB)\Common\cli
+
+VXSH_DIR= $(TOP_OF_VOB)\Common\vxsh
+
+include $(TGT_DIR)/h/make/defs.bsp
+include $(TGT_DIR)/h/make/make.$(CPU)$(TOOL)
+include $(TGT_DIR)/h/make/defs.$(WIND_HOST_TYPE)
+
+## Only redefine make definitions below this point, or your definitions will
+## be overwritten by the makefile stubs above.
+
+
+TARGET_DIR = ads860
+VENDOR = Motorola
+BOARD = MPC860ads
+
+## The constants ROM_TEXT_ADRS, ROM_SIZE, and RAM_HIGH_ADRS are defined
+## in config.h and Makefile. All definitions for these constants must be
+## identical.
+
+ROM_TEXT_ADRS = 20000100 # ROM entry address
+ROM_SIZE = 00400000 # number of bytes of ROM space
+
+RAM_LOW_ADRS = 00010000 # RAM text/data address
+RAM_HIGH_ADRS = 00200000 # RAM text/data address
+#RAM_HIGH_ADRS = 00000100 # RAM text/data address
+
+HEX_FLAGS = -a $(ROM_TEXT_ADRS)
+
+CLI_EXTRA = $(CLI_DIR)\chain.o \
+ $(CLI_DIR)\parser.o \
+ $(CLI_DIR)\cli_parser_init.o \
+ $(CLI_DIR)\command2.o \
+ $(CLI_DIR)\debug.o \
+ $(CLI_DIR)\imc.o \
+ $(CLI_DIR)\imsg.o \
+ $(CLI_DIR)\command_chain.o\
+ $(CLI_DIR)\exec.o\
+ $(CLI_DIR)\exec_chain.o\
+ $(CLI_DIR)\parser_actions.o \
+ $(CLI_DIR)\parser_input.o \
+ $(CLI_DIR)\parser_modes.o \
+ $(CLI_DIR)\parser_print.o \
+ $(CLI_DIR)\parser_printf.o \
+ $(CLI_DIR)\parser_privilege.o \
+ $(CLI_DIR)\parser_util.o \
+ $(CLI_DIR)\queue.o \
+ $(CLI_DIR)\cfg_chain.o\
+ $(CLI_DIR)\basic_exec_chain.o\
+ $(CLI_DIR)\show_chain.o\
+ $(CLI_DIR)\sys_debug.o \
+ $(CLI_DIR)\cli_shellLib.o\
+ $(CLI_DIR)\usrScript.o\
+ $(CLI_DIR)\util.o\
+ $(CLI_DIR)\ip_address.o\
+
+
+
+ifndef BOOT
+MACH_EXTRA = motFecEnd.o $(CLI_EXTRA) $(TGT_DIR)/lib/objPPC860gnuvx/usrFsLib.o sysUser.o
+else
+MACH_EXTRA = motFecEnd.o
+endif
+
+ORGLIB = $(WIND_BASE)/target/lib/libPPC860gnuvx.a
+
+## Only redefine make definitions above this point, or the expansion of
+## makefile target dependencies may be incorrect.
+
+include $(TGT_DIR)/h/make/rules.bsp
+include $(TGT_DIR)/h/make/rules.$(WIND_HOST_TYPE)
+CC_INCLUDE += -DVIPER_IP
+all: library parser vxWorks
+
+copyall:
+ @$(CP) vxWorks.* ..\..\bin
+
+cleanall:
+ $(MAKE) -C ../snmp cleanall
+ $(MAKE) -C $(CLI_SRC) VOB=GP10 cleanall
+ $(MAKE) clean
+
+
+
+# vxWorks depends on library and that needs to be created this way.
+library:
+ $(MAKE) -C ../snmp all
+
+vxWorks: library
+
+vxsh :
+ $(MAKE) -C $(VXSH_DIR) VOB=GP10 all
+
+parser :
+ $(MAKE) -C $(CLI_SRC) VOB=GP10 all
diff --git a/data/mnet/GP10/Host/Cdc_bsp/README b/data/mnet/GP10/Host/Cdc_bsp/README
new file mode 100644
index 0000000..faec294
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/README
@@ -0,0 +1,65 @@
+
+ README: Motorola MPC821/860ADS & MPC8xxFADS
+
+This file contains board-specific information for the Motorola MPC821/860ADS
+and MPC8xxFADS target boards. Specifically, this file contains information
+on any BSP interface changes from previous software or hardware versions, and
+contains caveats that the user must be aware of before using this BSP.
+Additionally, the target board's manual page entry (i.e., man ads860)
+provides board-specific information necessary to run VxWorks, and
+should be read before this BSP is used.
+-------------------------------------------------------------------------------
+RELEASE 1.1/3 Apr 98, re-release
+ Added support for the MPC8xxFADS mother/daughter boards. Uses SCC2
+ for 823/850 daughterboards.
+
+RELEASE 1.1/2 Jan 97, Tornado 1.0.1 re-release
+ Added a macro DEFAULT_POWER_MGT_MODE to select the default
+ power mode. Turned off cache when EDO dram is selected.
+
+RELEASE 1.1/1 FCS, Nov 1996, (ADS860_1_1_1)
+
+ This release is the first FCS release of the ads860 BSP against
+ Tornado 1.0 PPC (FCS). The same BSP is used by the PowerPC 821
+ and PowerPC 860.
+
+ The default BSP configuration is for a MPC821/860ADS REV A
+ board with either a MPC821 REV A.1 or MPC860 REV A.2 and DRAM
+ NO EDO.
+
+ For the MPC821/860ADS REV A board with EDO DRAM the macro EDO_DRAM
+ located in config.h should be changed from #undef to #define.
+ The EDO DRAM hangs the CPU when the caches are turned on.
+ Consequently the instruction and data cache are turned off when
+ the EDO DRAM is selected. The EDO DRAM is not supported by
+ the MPC821/860ADS REV PILOT or ENG boards.
+
+ The MPC821/860ADS REV PILOT or ENG boards are detected dynamically
+ and VxWorks performs the initialization according the board revision.
+
+ With the MPC821/860 REV 0.2 or 0.3 CPUs, caches and MMUs should be
+ disabled; otherwise, VxWorks hangs the board.
+
+ The UPM (User Programmable Machine) is initialized according the
+ SPLL frequency, the DRAM speed (60 or 70 ns), and whether EDO
+ capability is supported or not. The UPM is initialized once by
+ the romInit() function located in romInit.s.
+ Two sets of UPM initialization tables are provided: one for a
+ SPLL frequency of 25MHz and one for 50MHz. Select the 25MHz set
+ only when the SPLL frequency is 25MHz. If the SPLL
+ frequency is different from 25MHz (for example, 24 MHz), VxWorks
+ is not reliable when cache is enabled. For all other frequencies,
+ select the UPM table for 50MHz. Performance is optimized only
+ for 50MHz, but VxWorks is reliable.
+
+RELEASE 1.1/0 Beta, Jun 1996, (ADS860_1_1_0)
+
+ This release is the first release of the ads860 BSP against
+ Tornado 1.0 PPC (Beta). The same BSP is used by the PowerPC 821
+ and PowerPC 860.
+
+
+ CAVEATS:
+
+ 1) Due to different silicon bugs the data and instruction cache is
+ turned off.
diff --git a/data/mnet/GP10/Host/Cdc_bsp/ataDrv.c b/data/mnet/GP10/Host/Cdc_bsp/ataDrv.c
new file mode 100644
index 0000000..f493dfa
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/ataDrv.c
@@ -0,0 +1,1583 @@
+/* ataDrv.c - ATA/IDE (LOCAL and PCMCIA) disk device driver */
+
+/* Copyright 1989-1998 Wind River Systems, Inc. */
+#include "copyright_wrs.h"
+
+/*
+modification history
+--------------------
+01j,31mar98,map removed INCLUDE_ATA, redefined sys* prototypes.
+01i,23mar98,map renamed macros, made endian safe, added docs.
+01h,30oct97,db added cmd to reinitialize controller with params read. fixed
+ bug reported in SPR #9139. used PCI macros for input/output.
+01g,21apr97,hdn fixed a semaphore timeout problem(SPR 8394).
+01f,28feb97,dat fixed SPRs 8084, 3273 from ideDrv.
+01e,06nov96,dgp doc: final formatting
+01d,01nov96,hdn added support for PCMCIA.
+01c,25sep96,hdn added support for ATA-2.
+01b,01mar96,hdn cleaned up.
+01a,02mar95,hdn written based on ideDrv.c.
+*/
+
+/*
+DESCRIPTION
+
+This is a driver for ATA/IDE devices on PCMCIA, ISA, and other buses. The
+driver can be customized via various macros to run on a variety of boards and
+both big-endian, and little endian CPUs.
+
+USER-CALLABLE ROUTINES
+
+Most of the routines in this driver are accessible only through the I/O
+system. However, two routines must be called directly: ataDrv() to
+initialize the driver and ataDevCreate() to create devices.
+
+Before the driver can be used, it must be initialized by calling ataDrv().
+This routine must be called exactly once, before any reads, writes, or
+calls to ataDevCreate(). Normally, it is called from usrRoot() in
+usrConfig.c.
+
+The routine ataRawio() supports physical I/O access. The first
+argument is a drive number, 0 or 1; the second argument is a pointer
+to an ATA_RAW structure.
+
+NOTE
+Format is not supported, because ATA/IDE disks are already formatted, and bad
+sectors are mapped.
+
+PARAMETERS
+The ataDrv() function requires a configuration flag as a parameter.
+The configuration flag is one of the following:
+
+.TS
+tab(|);
+l l .
+Transfer mode
+
+ATA_PIO_DEF_0 | PIO default mode
+ATA_PIO_DEF_1 | PIO default mode, no IORDY
+ATA_PIO_0 | PIO mode 0
+ATA_PIO_1 | PIO mode 1
+ATA_PIO_2 | PIO mode 2
+ATA_PIO_3 | PIO mode 3
+ATA_PIO_4 | PIO mode 4
+ATA_PIO_AUTO | PIO max supported mode
+ATA_DMA_0 | DMA mode 0
+ATA_DMA_1 | DMA mode 1
+ATA_DMA_2 | DMA mode 2
+ATA_DMA_AUTO | DMA max supported mode
+
+Transfer bits
+
+ATA_BITS_16 | RW bits size, 16 bits
+ATA_BITS_32 | RW bits size, 32 bits
+
+Transfer unit
+
+ATA_PIO_SINGLE | RW PIO single sector
+ATA_PIO_MULTI | RW PIO multi sector
+ATA_DMA_SINGLE | RW DMA single word
+ATA_DMA_MULTI | RW DMA multi word
+
+Geometry parameters
+
+ATA_GEO_FORCE | set geometry in the table
+ATA_GEO_PHYSICAL | set physical geometry
+ATA_GEO_CURRENT | set current geometry
+.TE
+
+DMA transfer is not supported in this release. If ATA_PIO_AUTO or ATA_DMA_AUTO
+is specified, the driver automatically chooses the maximum mode supported by the
+device. If ATA_PIO_MULTI or ATA_DMA_MULTI is specified, and the device does
+not support it, the driver automatically chooses single sector or word mode.
+If ATA_BITS_32 is specified, the driver uses 32-bit transfer mode regardless of
+the capability of the drive.
+
+If ATA_GEO_PHYSICAL is specified, the driver uses the physical geometry
+parameters stored in the drive. If ATA_GEO_CURRENT is specified,
+the driver uses current geometry parameters initialized by BIOS.
+If ATA_GEO_FORCE is specified, the driver uses geometry parameters stored
+in sysLib.c.
+
+The geometry parameters are stored in the structure table
+`ataTypes[]' in sysLib.c. That table has two entries, the first for
+drive 0, the second for drive 1. The members of the structure
+are:
+.CS
+ int cylinders; /@ number of cylinders @/
+ int heads; /@ number of heads @/
+ int sectors; /@ number of sectors per track @/
+ int bytes; /@ number of bytes per sector @/
+ int precomp; /@ precompensation cylinder @/
+.CE
+
+This driver does not access the PCI-chip-set IDE interface, but rather takes
+advantage of BIOS initialization. Thus, the BIOS setting should match
+the modes specified by the configuration flag.
+
+INTERNAL
+
+Delays should be implemented using sysMsDelay() routine rather than BSP/CPU
+dependant sysDelay().
+
+SEE ALSO:
+.pG "I/O System"
+*/
+
+#include "vxWorks.h"
+#include "taskLib.h"
+#include "ioLib.h"
+#include "memLib.h"
+#include "stdlib.h"
+#include "errnoLib.h"
+#include "stdio.h"
+#include "string.h"
+#include "private/semLibP.h"
+#include "intLib.h"
+#include "iv.h"
+#include "wdLib.h"
+#include "sysLib.h"
+#include "sys/fcntlcom.h"
+#include "drv/pcmcia/pcmciaLib.h"
+
+#include "drv/hdisk/ataDrv.h"
+
+#define CF_DATA_BASE_ADDR 0x80800000
+#define CF_REG_BASE_ADDR 0x80C00000
+
+#define CF_DATA(base0) (base0 + 0x10) /* (RW) data register (16 bits) */
+#define CF_ERROR(base0) (base0 + 2) /* (R) error register */
+#define CF_FEATURE(base0) (base0 + 2) /* (W) feature/precompensation */
+#define CF_SECCNT(base0) (base0 + 4) /* (RW) sector count */
+#define CF_SECTOR(base0) (base0 + 6) /* (RW) first sector number */
+#define CF_CYL_LO(base0) (base0 + 8) /* (RW) cylinder low byte */
+#define CF_CYL_HI(base0) (base0 + 10) /* (RW) cylinder high byte */
+#define CF_SDH(base0) (base0 + 12) /* (RW) sector size/drive/head */
+#define CF_COMMAND(base0) (base0 + 14) /* (W) command register */
+#define CF_STATUS(base0) (base0 + 14) /* (R) immediate status */
+#define CF_A_STATUS(base1) (base1 + 28) /* (R) alternate status */
+#define CF_D_CONTROL(base1) (base1 + 28) /* (W) disk controller control */
+#define CF_D_ADDRESS(base1) (base1 + 30) /* (R) disk controller address */
+
+#define VXDOS "VXDOS"
+#define VXEXT "VXEXT"
+
+/* imports */
+
+IMPORT ATA_TYPE ataTypes [ATA_MAX_CTRLS][ATA_MAX_DRIVES];
+IMPORT ATA_RESOURCE ataResources [ATA_MAX_CTRLS];
+IMPORT void sysOutByte (int port, char data);
+IMPORT UCHAR sysInByte (int port);
+IMPORT void sysInWordString (int port, short *pData, int count);
+IMPORT void sysInWordStringRev (int port, short *pData, int count);
+IMPORT void sysOutWordString (int port, short *pData, int count);
+IMPORT void sysInLongString (int port, long *pData, int count);
+IMPORT void sysOutLongString (int port, long *pData, int count);
+IMPORT STATUS sysIntEnablePIC (int intNum);
+IMPORT void sysMsDelay (UINT uSecs);
+IMPORT void sysDelay (void);
+
+/* defines */
+
+#if 0
+/* Read a BYTE from IO port, `ioAdrs' */
+
+#ifndef ATA_IO_BYTE_READ
+#define ATA_IO_BYTE_READ(ioAdrs) sysInByte (ioAdrs)
+#endif /* ATA_IO_BYTE_READ */
+
+/* Write a BYTE `byte' to IO port, `ioAdrs' */
+
+#ifndef ATA_IO_BYTE_WRITE
+#define ATA_IO_BYTE_WRITE(ioAdrs, byte) sysOutByte (ioAdrs, byte)
+#endif /* ATA_IO_BYTE_WRITE */
+
+/* Read 16-bit little-endian `nWords' into `pData' from IO port, `ioAdrs' */
+
+#ifndef ATA_IO_NWORD_READ
+#define ATA_IO_NWORD_READ(ioAdrs, pData, nWords) \
+ sysInWordString (ioAdrs, pData, nWords)
+#endif /* ATA_IO_NWORD_READ */
+
+/* Write 16-bit little-endian `nWords' from `pData' into IO port, `ioAdrs' */
+
+#ifndef ATA_IO_NWORD_WRITE
+#define ATA_IO_NWORD_WRITE(ioAdrs, pData, nWords) \
+ sysOutWordString (ioAdrs, pData, nWords)
+#endif /* ATA_IO_NWORD_WRITE */
+
+/* Read 32-bit little-endian `nLongs' into `pData' from IO port, `ioAdrs' */
+
+#ifndef ATA_IO_NLONG_READ
+#define ATA_IO_NLONG_READ(ioAdrs, pData, nLongs) \
+ sysInLongString (ioAdrs, pData, nLongs)
+#endif /* ATA_IO_NLONG_READ */
+
+/* Write 32-bit little-endian `nLongs' from `pData' into IO port, `ioAdrs' */
+
+#ifndef ATA_IO_NLONG_WRITE
+#define ATA_IO_NLONG_WRITE(ioAdrs, pData, nLongs) \
+ sysOutLongString (ioAdrs, pData, nLongs)
+#endif /* ATA_IO_NLONG_WRITE */
+
+/* Read 32-bit CPU-endian `nWords' into `pData' from IO port, `ioAdrs' */
+
+#ifndef ATA_IO_NWORD_READ_SWAP
+# if (_BYTE_ORDER == _BIG_ENDIAN)
+# define ATA_IO_NWORD_READ_SWAP(ioAdrs, pData, nWords) \
+ sysInWordStringRev (ioAdrs, pData, nWords)
+# else /* (_BYTE_ORDER == _BIG_ENDIAN) */
+# define ATA_IO_NWORD_READ_SWAP(ioAdrs, pData, nWords) \
+ ATA_IO_NWORD_READ (ioAdrs, pData, nWords)
+# endif /* (_BYTE_ORDER == _BIG_ENDIAN) */
+#endif /* ATA_IO_NLONG_READ_SWAP */
+
+#endif /* 0 */
+
+#define ATA_IO_BYTE_READ ataInByte
+#define ATA_IO_BYTE_WRITE ataOutByte
+#define ATA_IO_NWORD_READ ataInWordStringRev
+#define ATA_IO_NWORD_WRITE ataOutWordStringRev
+#define ATA_IO_NWORD_READ_SWAP ataInWordString
+
+
+/* globals */
+
+BOOL ataDrvInstalled = FALSE; /* TRUE if installed */
+ATA_CTRL ataCtrl [ATA_MAX_CTRLS];
+
+int ataNumErrs = 0;
+int ataCFStatErrs = 0;
+
+BOOL ataWriteVerifyBufSet = FALSE;
+int ataWriteVerifyBufSize;
+int ataWriteVerifyNumErrs = 0;
+char *ataWriteVerifyBuf;
+
+
+/* locals */
+
+LOCAL int ataRetry = 3; /* max retry count */
+
+
+/* function prototypes */
+
+LOCAL STATUS ataBlkRd (ATA_DEV *pDev, int startBlk, int nBlks, char *p);
+LOCAL STATUS ataBlkWrt (ATA_DEV *pDev, int startBlk, int nBlks, char *p);
+LOCAL STATUS ataReset (ATA_DEV *pDev);
+LOCAL STATUS ataStatus (ATA_DEV *pDev);
+LOCAL STATUS ataIoctl (ATA_DEV *pDev, int function, int arg);
+LOCAL STATUS ataBlkRW (ATA_DEV *pDev, int startBlk, int nBlks, char *p,
+ int direction);
+LOCAL void ataWdog (int ctrl);
+/* LOCAL void ataIntr (int ctrl); */
+LOCAL STATUS ataInit (int ctrl);
+LOCAL void ataWait (int ctrl, int request);
+LOCAL STATUS ataCmd (int ctrl, int drive, int cmd, int arg0, int arg1);
+LOCAL STATUS ataPread (int ctrl, int drive, void *p);
+LOCAL STATUS ataRW (int ctrl, int drive, int cylinder, int head, int sec,
+ void *p, int nSecs, int direction);
+LOCAL STATUS ataWVerify (int ctrl, int drive, int cylinder, int head, int sec,
+ void *p, int nSecs, int direction);
+
+
+/*******************************************************************************
+ataInByte
+
+Read a BYTE from IO port, `ioAdrs'
+*/
+UCHAR ataInByte(int port)
+{
+ __asm__ volatile (" eieio; sync");
+ return *(short*)port;
+}
+
+/*******************************************************************************
+ataOutByte
+
+Write a BYTE `byte' to IO port, `ioAdrs'
+
+*/
+void ataOutByte(int port, char data)
+{
+ __asm__ volatile (" eieio; sync");
+ *(short*)port = data;
+}
+
+/*******************************************************************************
+ataInWordStringRev
+
+Read 16-bit little-endian `nWords' into `pData' from IO port, `ioAdrs'
+*/
+void ataInWordStringRev(int port, volatile short* pData, int nWords)
+{
+ int i;
+ unsigned short temp;
+
+ for (i = 0; i < nWords; i++)
+ {
+ temp = *(short*)port;
+ __asm__ volatile (" eieio; sync");
+ *pData++ = (temp >> 8) | (temp << 8);
+ }
+}
+
+/*******************************************************************************
+ataOutWordStringRev
+
+Write 16-bit little-endian `nWords' from `pData' into IO port, `ioAdrs'
+*/
+void ataOutWordStringRev(int port, volatile short* pData, int nWords)
+{
+ int i;
+ unsigned short temp;
+
+ for (i = 0; i < nWords; i++)
+ {
+ temp = *pData++;
+ __asm__ volatile (" eieio; sync");
+ *(short*)port = (temp >> 8) | (temp << 8);
+ }
+}
+
+/*******************************************************************************
+ataInWordString
+
+Read 16-bit CPU-endian `nWords' into `pData' from IO port, `ioAdrs'
+
+*/
+void ataInWordString(int port, volatile short* pData, int nWords)
+{
+ int i;
+
+ for (i = 0; i < nWords; i++)
+ {
+ __asm__ volatile (" eieio; sync");
+ *pData++ = *(short*)port;
+ }
+}
+
+
+/*******************************************************************************
+*
+* ataDrv - initialize the ATA driver
+*
+* This routine initializes the ATA/IDE driver, sets up interrupt vectors,
+* and performs hardware initialization of the ATA/IDE chip.
+*
+* This routine must be called exactly once, before any reads, writes,
+* or calls to ataDevCreate(). Normally, it is called by usrRoot()
+* in usrConfig.c.
+*
+* RETURNS: OK, or ERROR if initialization fails.
+*
+* SEE ALSO: ataDevCreate()
+*/
+
+STATUS ataDrv
+(
+ int ctrl, /* controller no. */
+ int drives, /* number of drives */
+ int vector, /* interrupt vector */
+ int level, /* interrupt level */
+ BOOL configType, /* configuration type */
+ int semTimeout, /* timeout seconds for sync semaphore */
+ int wdgTimeout /* timeout seconds for watch dog */
+)
+{
+ ATA_CTRL *pCtrl = &ataCtrl[ctrl];
+/*
+ ATA_RESOURCE *pAta = &ataResources[ctrl];
+ PCCARD_RESOURCE *pResource = &pAta->resource;
+*/
+ ATA_DRIVE *pDrive;
+ ATA_PARAM *pParam;
+ ATA_TYPE *pType;
+ int drive;
+ int ix;
+
+
+ if ((ctrl >= ATA_MAX_CTRLS) || (drives > ATA_MAX_DRIVES))
+ return (ERROR);
+
+ if (!ataDrvInstalled)
+ {
+ for (ix = 0; ix < ATA_MAX_CTRLS; ix++)
+ ataCtrl[ix].wdgId = wdCreate ();
+ ataDrvInstalled = TRUE;
+ }
+
+ if (!pCtrl->installed)
+ {
+ if (semTimeout == 0)
+ pCtrl->semTimeout = ATA_SEM_TIMEOUT_DEF;
+ else
+ pCtrl->semTimeout = semTimeout;
+
+ if (wdgTimeout == 0)
+ pCtrl->wdgTimeout = ATA_WDG_TIMEOUT_DEF;
+ else
+ pCtrl->wdgTimeout = wdgTimeout;
+
+/* semBInit (&pCtrl->syncSem, SEM_Q_FIFO, SEM_EMPTY);
+*/
+ semMInit (&pCtrl->muteSem, SEM_Q_PRIORITY | SEM_DELETE_SAFE |
+ SEM_INVERSION_SAFE);
+/*
+
+ pCtrl->data = ATA_DATA (pResource->ioStart[0]);
+ pCtrl->error = ATA_ERROR (pResource->ioStart[0]);
+ pCtrl->feature = ATA_FEATURE (pResource->ioStart[0]);
+ pCtrl->seccnt = ATA_SECCNT (pResource->ioStart[0]);
+ pCtrl->sector = ATA_SECTOR (pResource->ioStart[0]);
+ pCtrl->cylLo = ATA_CYL_LO (pResource->ioStart[0]);
+ pCtrl->cylHi = ATA_CYL_HI (pResource->ioStart[0]);
+ pCtrl->sdh = ATA_SDH (pResource->ioStart[0]);
+ pCtrl->command = ATA_COMMAND (pResource->ioStart[0]);
+ pCtrl->status = ATA_STATUS (pResource->ioStart[0]);
+ pCtrl->aStatus = ATA_A_STATUS (pResource->ioStart[1]);
+ pCtrl->dControl = ATA_D_CONTROL (pResource->ioStart[1]);
+ pCtrl->dAddress = ATA_D_ADDRESS (pResource->ioStart[1]);
+*/
+ pCtrl->data = CF_DATA (CF_DATA_BASE_ADDR);
+ pCtrl->error = CF_ERROR (CF_REG_BASE_ADDR);
+ pCtrl->feature = CF_FEATURE (CF_REG_BASE_ADDR);
+ pCtrl->seccnt = CF_SECCNT (CF_REG_BASE_ADDR);
+ pCtrl->sector = CF_SECTOR (CF_REG_BASE_ADDR);
+ pCtrl->cylLo = CF_CYL_LO (CF_REG_BASE_ADDR);
+ pCtrl->cylHi = CF_CYL_HI (CF_REG_BASE_ADDR);
+ pCtrl->sdh = CF_SDH (CF_REG_BASE_ADDR);
+ pCtrl->command = CF_COMMAND (CF_REG_BASE_ADDR);
+ pCtrl->status = CF_STATUS (CF_REG_BASE_ADDR);
+ pCtrl->aStatus = CF_A_STATUS (CF_REG_BASE_ADDR);
+ pCtrl->dControl = CF_D_CONTROL (CF_REG_BASE_ADDR);
+ pCtrl->dAddress = CF_D_ADDRESS (CF_REG_BASE_ADDR);
+
+#if 0
+ (void) intConnect ((VOIDFUNCPTR *)INUM_TO_IVEC (vector),
+ (VOIDFUNCPTR)ataIntr, ctrl);
+ sysIntEnablePIC (level); /* unmask the interrupt level */
+#endif
+ pCtrl->intLevel = level;
+ pCtrl->wdgOkay = TRUE;
+
+ semTake (&pCtrl->muteSem, WAIT_FOREVER);
+
+ if (ataInit (ctrl) != OK)
+ {
+ semGive (&pCtrl->muteSem);
+ return (ERROR);
+ }
+
+ for (drive = 0; drive < drives; drive++)
+ {
+ pType = &ataTypes[ctrl][drive];
+ pDrive = &pCtrl->drive[drive];
+ pParam = &pDrive->param;
+ if (pType->cylinders == 0)
+ break;
+
+ if ((pCtrl->ctrlType == ATA_PCMCIA) ||
+ ((pCtrl->ctrlType != ATA_PCMCIA) && (drive == 0)))
+ {
+ if (ataCmd (ctrl, drive, ATA_CMD_DIAGNOSE, NULL, NULL) != OK)
+ {
+ semGive (&pCtrl->muteSem);
+ return (ERROR);
+ }
+ }
+
+ /* find out geometry */
+
+ if ((configType & ATA_GEO_MASK) == ATA_GEO_FORCE)
+ {
+ (void) ataCmd (ctrl, drive, ATA_CMD_INITP, NULL, NULL);
+ (void) ataPread (ctrl, drive, (char *)pParam);
+ }
+ else if ((configType & ATA_GEO_MASK) == ATA_GEO_PHYSICAL)
+ {
+ (void) ataPread (ctrl, drive, (char *)pParam);
+ pType->cylinders = pParam->cylinders - 1;
+ pType->heads = pParam->heads;
+ pType->sectors = pParam->sectors;
+ }
+ else if ((configType & ATA_GEO_MASK) == ATA_GEO_CURRENT)
+ {
+ (void) ataPread (ctrl, drive, (char *)pParam);
+ if ((pParam->currentCylinders != 0) &&
+ (pParam->currentHeads != 0) &&
+ (pParam->currentSectors != 0))
+ {
+ pType->cylinders = pParam->currentCylinders - 1;
+ pType->heads = pParam->currentHeads;
+ pType->sectors = pParam->currentSectors;
+ }
+ else
+ {
+ pType->cylinders = pParam->cylinders - 1;
+ pType->heads = pParam->heads;
+ pType->sectors = pParam->sectors;
+ }
+ }
+ /*
+ * reinitialize the controller with parameters read from the
+ * controller.
+ */
+
+ (void) ataCmd (ctrl, drive, ATA_CMD_INITP, NULL, NULL);
+
+ /* recalibrate */
+
+ (void) ataCmd (ctrl, drive, ATA_CMD_RECALIB, NULL, NULL);
+
+ /* find out supported capabilities of the drive */
+
+ pDrive->multiSecs = pParam->multiSecs & 0x00ff;
+ pDrive->okMulti = (pDrive->multiSecs != 0) ? TRUE : FALSE;
+ pDrive->okIordy = (pParam->capabilities & 0x0800) ? TRUE : FALSE;
+ pDrive->okLba = (pParam->capabilities & 0x0200) ? TRUE : FALSE;
+ pDrive->okDma = (pParam->capabilities & 0x0100) ? TRUE : FALSE;
+
+ /* find out supported max PIO mode */
+
+ pDrive->pioMode = (pParam->pioMode >> 8) & 0x03; /* PIO 0,1,2 */
+ if (pDrive->pioMode > 2)
+ pDrive->pioMode = 0;
+
+ if ((pDrive->okIordy) && (pParam->valid & 0x02)) /* PIO 3,4 */
+ {
+ if (pParam->advancedPio & 0x01)
+ pDrive->pioMode = 3;
+ if (pParam->advancedPio & 0x02)
+ pDrive->pioMode = 4;
+ }
+
+ /* find out supported max DMA mode */
+
+ if ((pDrive->okDma) && (pParam->valid & 0x02))
+ {
+ pDrive->singleDmaMode = (pParam->dmaMode >> 8) & 0x03;
+ if (pDrive->singleDmaMode >= 2)
+ pDrive->singleDmaMode = 0;
+ pDrive->multiDmaMode = 0;
+
+ if (pParam->singleDma & 0x04)
+ pDrive->singleDmaMode = 2;
+ else if (pParam->singleDma & 0x02)
+ pDrive->singleDmaMode = 1;
+ else if (pParam->singleDma & 0x01)
+ pDrive->singleDmaMode = 0;
+
+ if (pParam->multiDma & 0x04)
+ pDrive->multiDmaMode = 2;
+ else if (pParam->multiDma & 0x02)
+ pDrive->multiDmaMode = 1;
+ else if (pParam->multiDma & 0x01)
+ pDrive->multiDmaMode = 0;
+ }
+
+ /* find out transfer mode to use */
+
+ pDrive->rwBits = configType & ATA_BITS_MASK;
+ pDrive->rwPio = configType & ATA_PIO_MASK;
+ pDrive->rwDma = configType & ATA_DMA_MASK;
+ pDrive->rwMode = ATA_PIO_DEF_W;
+
+ switch (configType & ATA_MODE_MASK)
+ {
+ case ATA_PIO_0:
+ case ATA_PIO_1:
+ case ATA_PIO_2:
+ case ATA_PIO_3:
+ case ATA_PIO_4:
+ case ATA_PIO_DEF_0:
+ case ATA_PIO_DEF_1:
+ pDrive->rwMode = configType & ATA_MODE_MASK;
+ break;
+ case ATA_PIO_AUTO:
+ pDrive->rwMode = ATA_PIO_W_0 + pDrive->pioMode;
+ break;
+ case ATA_DMA_0:
+ case ATA_DMA_1:
+ case ATA_DMA_2:
+ if (pDrive->okDma)
+ {
+ if (pDrive->rwDma == ATA_DMA_SINGLE)
+ pDrive->rwMode |= ATA_DMA_SINGLE_0;
+ if (pDrive->rwDma == ATA_DMA_MULTI)
+ pDrive->rwMode |= ATA_DMA_MULTI_0;
+ }
+ break;
+ case ATA_DMA_AUTO:
+ if (pDrive->okDma)
+ {
+ if (pDrive->rwDma == ATA_DMA_SINGLE)
+ pDrive->rwMode = ATA_DMA_SINGLE_0 +
+ pDrive->singleDmaMode;
+ if (pDrive->rwDma == ATA_DMA_MULTI)
+ pDrive->rwMode = ATA_DMA_MULTI_0 +
+ pDrive->multiDmaMode;
+ }
+ break;
+ default:
+ break;
+ }
+
+ /* set the transfer mode */
+
+ (void) ataCmd (ctrl, drive, ATA_CMD_SET_FEATURE, ATA_SUB_SET_RWMODE,
+ pDrive->rwMode);
+
+ if (pDrive->rwPio == ATA_PIO_MULTI)
+ {
+ if (pDrive->okMulti)
+ (void) ataCmd (ctrl, drive, ATA_CMD_SET_MULTI,
+ pDrive->multiSecs, NULL);
+ else
+ pDrive->rwPio = ATA_PIO_SINGLE;
+ }
+ }
+
+ pCtrl->installed = TRUE;
+
+ semGive (&pCtrl->muteSem);
+ }
+
+ return (OK);
+}
+
+/*******************************************************************************
+*
+* ataDevCreate - create a device for a ATA/IDE disk
+*
+* This routine creates a device for a specified ATA/IDE disk.
+*
+* <drive> is a drive number for the hard drive; it must be 0 or 1.
+*
+* The <nBlocks> parameter specifies the size of the device in blocks.
+* If <nBlocks> is zero, the whole disk is used.
+*
+* The <blkOffset> parameter specifies an offset, in blocks, from the start
+* of the device to be used when writing or reading the hard disk. This
+* offset is added to the block numbers passed by the file system during
+* disk accesses. (VxWorks file systems always use block numbers beginning
+* at zero for the start of a device.)
+*
+*
+* RETURNS:
+* A pointer to a block device structure (BLK_DEV) or NULL if memory cannot
+* be allocated for the device structure.
+*
+* SEE ALSO: dosFsMkfs(), dosFsDevInit(), rt11FsDevInit(), rt11FsMkfs(),
+* rawFsDevInit()
+*/
+
+BLK_DEV *ataDevCreate
+(
+ int ctrl,
+ int drive,
+ int nBlocks,
+ int blkOffset
+)
+{
+ ATA_CTRL *pCtrl = &ataCtrl[ctrl];
+ ATA_TYPE *pType = &ataTypes[ctrl][drive];
+ ATA_DEV *pDev;
+ BLK_DEV *pBlkdev;
+ int maxBlks;
+
+ if ((ctrl >= ATA_MAX_CTRLS) || (drive >= ATA_MAX_DRIVES) ||
+ !ataDrvInstalled || !pCtrl->installed)
+ return (NULL);
+
+ if ((pDev = (ATA_DEV *)malloc(sizeof (ATA_DEV))) == NULL)
+ return (NULL);
+
+ pBlkdev = &pDev->blkDev;
+
+ maxBlks = (pType->cylinders * pType->heads * pType->sectors) - blkOffset;
+
+ if (nBlocks == 0)
+ nBlocks = maxBlks;
+
+ if (nBlocks > maxBlks)
+ nBlocks = maxBlks;
+
+ pBlkdev->bd_nBlocks = nBlocks;
+ pBlkdev->bd_bytesPerBlk = pType->bytes;
+ pBlkdev->bd_blksPerTrack = pType->sectors;
+ pBlkdev->bd_nHeads = pType->heads;
+ pBlkdev->bd_removable = TRUE;
+ pBlkdev->bd_retry = 1;
+ pBlkdev->bd_mode = O_RDWR;
+ pBlkdev->bd_readyChanged = TRUE;
+ pBlkdev->bd_blkRd = ataBlkRd;
+ pBlkdev->bd_blkWrt = ataBlkWrt;
+ pBlkdev->bd_ioctl = ataIoctl;
+ pBlkdev->bd_reset = ataReset;
+ pBlkdev->bd_statusChk = ataStatus;
+ pBlkdev->bd_reset = NULL;
+ pBlkdev->bd_statusChk = NULL;
+
+ pDev->ctrl = ctrl;
+ pDev->drive = drive;
+ pDev->blkOffset = blkOffset;
+
+ if (ataWriteVerifyBufSet)
+ {
+ if (ATA_MAX_RW_SECTORS * pType->bytes > ataWriteVerifyBufSize)
+ {
+ free (ataWriteVerifyBuf);
+ ataWriteVerifyBuf = malloc(ATA_MAX_RW_SECTORS * pType->bytes);
+ ataWriteVerifyBufSize = ATA_MAX_RW_SECTORS * pType->bytes;
+ }
+ }
+ else
+ {
+ ataWriteVerifyBuf = malloc(ATA_MAX_RW_SECTORS * pType->bytes);
+ ataWriteVerifyBufSize = ATA_MAX_RW_SECTORS * pType->bytes;
+ ataWriteVerifyBufSet = TRUE;
+ }
+
+ return (&pDev->blkDev);
+}
+
+/*******************************************************************************
+*
+* ataRawio - do raw I/O access
+*
+* This routine is called to perform raw I/O access.
+*
+* <drive> is a drive number for the hard drive: it must be 0 or 1.
+*
+* The <pAtaRaw> is a pointer to the structure ATA_RAW which is defined in
+* ataDrv.h.
+*
+* RETURNS:
+* OK, or ERROR if the parameters are not valid.
+*
+*/
+
+STATUS ataRawio
+(
+ int ctrl,
+ int drive,
+ ATA_RAW *pAtaRaw
+)
+{
+ ATA_CTRL *pCtrl = &ataCtrl[ctrl];
+ ATA_TYPE *pType = &ataTypes[ctrl][drive];
+ ATA_DEV ataDev;
+ BLK_DEV *pBlkdev = &ataDev.blkDev;
+ UINT startBlk;
+
+ if ((ctrl >= ATA_MAX_CTRLS) || (drive >= ATA_MAX_DRIVES) ||
+ !ataDrvInstalled || !pCtrl->installed)
+ return (ERROR);
+
+ if ((pAtaRaw->cylinder >= pType->cylinders) ||
+ (pAtaRaw->head >= pType->heads) ||
+ (pAtaRaw->sector > pType->sectors) ||
+ (pAtaRaw->sector == 0))
+ return (ERROR);
+
+ pBlkdev->bd_nBlocks = pType->cylinders * pType->heads *
+ pType->sectors;
+ pBlkdev->bd_bytesPerBlk = pType->bytes;
+ pBlkdev->bd_blksPerTrack = pType->sectors;
+ pBlkdev->bd_nHeads = pType->heads;
+ pBlkdev->bd_removable = FALSE;
+ pBlkdev->bd_retry = 1;
+ pBlkdev->bd_mode = O_RDWR;
+ pBlkdev->bd_readyChanged = TRUE;
+ pBlkdev->bd_blkRd = ataBlkRd;
+ pBlkdev->bd_blkWrt = ataBlkWrt;
+ pBlkdev->bd_ioctl = ataIoctl;
+ pBlkdev->bd_reset = ataReset;
+ pBlkdev->bd_statusChk = ataStatus;
+
+ ataDev.ctrl = ctrl;
+ ataDev.drive = drive;
+ ataDev.blkOffset = 0;
+
+ startBlk = pAtaRaw->cylinder * (pType->sectors * pType->heads) +
+ pAtaRaw->head * pType->sectors + pAtaRaw->sector - 1;
+
+ return (ataBlkRW (&ataDev, startBlk, pAtaRaw->nSecs, pAtaRaw->pBuf,
+ pAtaRaw->direction));
+}
+
+/*******************************************************************************
+*
+* ataBlkRd - read one or more blocks from a ATA/IDE disk
+*
+* This routine reads one or more blocks from the specified device,
+* starting with the specified block number.
+*
+* If any block offset was specified during ataDevCreate(), it is added
+* to <startBlk> before the transfer takes place.
+*
+* RETURNS: OK, ERROR if the read command didn't succeed.
+*/
+
+LOCAL STATUS ataBlkRd
+(
+ ATA_DEV *pDev,
+ int startBlk,
+ int nBlks,
+ char *pBuf
+)
+{
+ return (ataBlkRW (pDev, startBlk, nBlks, pBuf, O_RDONLY));
+}
+
+/*******************************************************************************
+*
+* ataBlkWrt - write one or more blocks to a ATA/IDE disk
+*
+* This routine writes one or more blocks to the specified device,
+* starting with the specified block number.
+*
+* If any block offset was specified during ataDevCreate(), it is added
+* to <startBlk> before the transfer takes place.
+*
+* RETURNS: OK, ERROR if the write command didn't succeed.
+*/
+
+LOCAL STATUS ataBlkWrt
+(
+ ATA_DEV *pDev,
+ int startBlk,
+ int nBlks,
+ char *pBuf
+)
+{
+ return (ataBlkRW (pDev, startBlk, nBlks, pBuf, O_WRONLY));
+}
+
+/*******************************************************************************
+*
+* ataReset - reset a ATA/IDE disk controller
+*
+* This routine resets a ATA/IDE disk controller.
+*
+* RETURNS: OK, always.
+*/
+
+LOCAL STATUS ataReset
+(
+ ATA_DEV *pDev
+)
+{
+ ATA_CTRL *pCtrl = &ataCtrl[pDev->ctrl];
+
+ if (!pCtrl->installed)
+ return (ERROR);
+
+ semTake (&pCtrl->muteSem, WAIT_FOREVER);
+
+ (void) ataInit (pDev->ctrl);
+
+ semGive (&pCtrl->muteSem);
+
+ return (OK);
+}
+
+/*******************************************************************************
+*
+* ataStatus - check status of a ATA/IDE disk controller
+*
+* This routine check status of a ATA/IDE disk controller.
+*
+* RETURNS: OK, ERROR if the card is removed.
+*/
+
+LOCAL STATUS ataStatus
+(
+ ATA_DEV *pDev
+)
+{
+ ATA_CTRL *pCtrl = &ataCtrl[pDev->ctrl];
+ BLK_DEV *pBlkdev = &pDev->blkDev;
+
+ if (!pCtrl->installed)
+ return (ERROR);
+
+ if (pCtrl->changed)
+ {
+ pBlkdev->bd_readyChanged = TRUE;
+ pCtrl->changed = FALSE;
+ }
+
+ return (OK);
+}
+
+/*******************************************************************************
+*
+* ataIoctl - do device specific control function
+*
+* This routine is called when the file system cannot handle an ioctl()
+* function.
+*
+* RETURNS: OK or ERROR.
+*/
+
+LOCAL STATUS ataIoctl
+(
+ ATA_DEV *pDev,
+ int function,
+ int arg
+)
+{
+ ATA_CTRL *pCtrl = &ataCtrl[pDev->ctrl];
+ FAST int status = ERROR;
+
+ if (!pCtrl->installed)
+ return (ERROR);
+
+ semTake (&pCtrl->muteSem, WAIT_FOREVER);
+
+ switch (function)
+ {
+ case FIODISKFORMAT:
+ (void) errnoSet (S_ioLib_UNKNOWN_REQUEST);
+ break;
+
+ default:
+ (void) errnoSet (S_ioLib_UNKNOWN_REQUEST);
+ }
+
+ semGive (&pCtrl->muteSem);
+ return (status);
+}
+
+/*******************************************************************************
+*
+* ataBlkRW - read or write sectors to a ATA/IDE disk.
+*
+* Read or write sectors to a ATA/IDE disk.
+*
+* RETURNS: OK, ERROR if the command didn't succeed.
+*/
+
+LOCAL STATUS ataBlkRW
+(
+ ATA_DEV *pDev,
+ int startBlk,
+ int nBlks,
+ char *pBuf,
+ int direction
+)
+{
+ ATA_CTRL *pCtrl = &ataCtrl[pDev->ctrl];
+ ATA_DRIVE *pDrive = &pCtrl->drive[pDev->drive];
+ BLK_DEV *pBlkdev = &pDev->blkDev;
+ ATA_TYPE *pType = &ataTypes[pDev->ctrl][pDev->drive];
+ int status = ERROR;
+ int retryRW0 = 0;
+ int retryRW1 = 0;
+ int retrySeek = 0;
+ int cylinder;
+ int head;
+ int sector;
+ int nSecs;
+ int ix;
+
+ /* sanity check */
+
+ if (!pCtrl->installed)
+ return (ERROR);
+
+ nSecs = pBlkdev->bd_nBlocks;
+ if ((startBlk + nBlks) > nSecs)
+ {
+#ifdef ATA_DEBUG
+ printErr ("startBlk=%d nBlks=%d: 0 - %d\n", startBlk, nBlks, nSecs);
+#endif /* ATA_DEBUG */
+ return (ERROR);
+ }
+
+ startBlk += pDev->blkOffset;
+
+ semTake (&pCtrl->muteSem, WAIT_FOREVER);
+
+ for (ix = 0; ix < nBlks; ix += nSecs)
+ {
+ if (pDrive->okLba)
+ {
+ head = (startBlk & 0x0f000000) >> 24;
+ cylinder = (startBlk & 0x00ffff00) >> 8;
+ sector = (startBlk & 0x000000ff);
+ }
+ else
+ {
+ cylinder = startBlk / (pType->sectors * pType->heads);
+ sector = startBlk % (pType->sectors * pType->heads);
+ head = sector / pType->sectors;
+ sector = sector % pType->sectors + 1;
+ }
+ nSecs = min (nBlks - ix, ATA_MAX_RW_SECTORS);
+
+ retryRW1 = 0;
+ retryRW0 = 0;
+ while ((ataRW(pDev->ctrl, pDev->drive, cylinder, head, sector,
+ pBuf, nSecs, direction) != OK) || (ataWVerify(pDev->ctrl,
+ pDev->drive, cylinder, head, sector, pBuf, nSecs, direction) != OK))
+ {
+ if (++retryRW0 > ataRetry)
+ {
+ ataNumErrs++;
+ (void)ataCmd (pDev->ctrl, pDev->drive, ATA_CMD_RECALIB, NULL,
+ NULL);
+ if (++retryRW1 > ataRetry)
+ goto done;
+ retrySeek = 0;
+ while (ataCmd (pDev->ctrl, pDev->drive, ATA_CMD_SEEK, cylinder,
+ head) != OK)
+ if (++retrySeek > ataRetry)
+ goto done;
+ retryRW0 = 0;
+ }
+ }
+
+ startBlk += nSecs;
+ pBuf += pBlkdev->bd_bytesPerBlk * nSecs;
+ }
+
+ status = OK;
+
+done:
+ if (status == ERROR)
+ (void)errnoSet (S_ioLib_DEVICE_ERROR);
+ semGive (&pCtrl->muteSem);
+ return (status);
+}
+
+/*******************************************************************************
+*
+* ataIntr - ATA/IDE controller interrupt handler.
+*
+* RETURNS: N/A
+*/
+#if 0
+LOCAL void ataIntr
+(
+ int ctrl
+)
+{
+ ATA_CTRL *pCtrl = &ataCtrl[ctrl];
+
+ pCtrl->intCount++;
+ pCtrl->intStatus = ATA_IO_BYTE_READ (pCtrl->status);
+ semGive (&pCtrl->syncSem);
+}
+#endif /* 0 */
+/*******************************************************************************
+*
+* ataWdog - ATA/IDE controller watchdog handler.
+*
+* RETURNS: N/A
+*/
+
+LOCAL void ataWdog
+(
+ int ctrl
+)
+{
+ ATA_CTRL *pCtrl = &ataCtrl[ctrl];
+
+ pCtrl->wdgOkay = FALSE;
+}
+
+/*******************************************************************************
+*
+* ataWait - wait the drive ready
+*
+* Wait the drive ready
+*
+* RETURNS: OK, ERROR if the drive didn't become ready in certain period of time.
+*/
+
+LOCAL void ataWait
+(
+ int ctrl,
+ int request
+)
+{
+ ATA_CTRL *pCtrl = &ataCtrl[ctrl];
+
+#ifdef ATA_DEBUG
+ printErr ("ataWait: ctrl=%d request=0x%x\n", ctrl, request);
+#endif /* ATA_DEBUG */
+
+ switch (request)
+ {
+ case ATA_STAT_READY:
+ wdStart (pCtrl->wdgId, (sysClkRateGet() * pCtrl->wdgTimeout),
+ (FUNCPTR)ataWdog, ctrl);
+ while ((ATA_IO_BYTE_READ (pCtrl->aStatus) & ATA_STAT_BUSY) &&
+ (pCtrl->wdgOkay));
+ while (((ATA_IO_BYTE_READ (pCtrl->aStatus) & ATA_STAT_READY) == 0)
+ && (pCtrl->wdgOkay));
+ wdCancel (pCtrl->wdgId);
+
+ if (!pCtrl->wdgOkay)
+ {
+ pCtrl->wdgOkay = TRUE;
+ (void) ataInit (ctrl);
+ }
+ break;
+
+ case ATA_STAT_BUSY:
+ while (ATA_IO_BYTE_READ (pCtrl->aStatus) & ATA_STAT_BUSY);
+ break;
+
+ case ATA_STAT_DRQ:
+ while ((ATA_IO_BYTE_READ (pCtrl->aStatus) & ATA_STAT_DRQ) == 0);
+ break;
+
+ case ATA_STAT_SEEKCMPLT:
+ while ((ATA_IO_BYTE_READ (pCtrl->aStatus) & ATA_STAT_SEEKCMPLT) == 0);
+ break;
+ }
+
+#ifdef ATA_DEBUG
+ printErr ("ataWait end:\n");
+#endif /* ATA_DEBUG */
+}
+
+/*******************************************************************************
+*
+* ataInit - init a ATA/IDE disk controller
+*
+* This routine initializes a ATA/IDE disk controller.
+*
+* RETURNS: OK, ERROR if the command didn't succeed.
+*/
+
+LOCAL STATUS ataInit
+(
+ int ctrl
+)
+{
+ ATA_CTRL *pCtrl = &ataCtrl[ctrl];
+ int ix;
+ int iy;
+
+#ifdef ATA_DEBUG
+ printErr ("ataInit: ctrl=%d\n", ctrl);
+#endif /* ATA_DEBUG */
+
+ ATA_IO_BYTE_WRITE (pCtrl->dControl,
+ ATA_CTL_4BIT | ATA_CTL_RST | ATA_CTL_IDS);
+ for (ix = 0; ix < 100; ix++)
+ /* sysDelay ();
+ */
+ for (iy = 0; iy < 50000; iy++);
+
+ ATA_IO_BYTE_WRITE (pCtrl->dControl, ATA_CTL_4BIT | ATA_CTL_IDS);
+ for (ix = 0; ix < 100; ix++)
+ /* sysDelay ();
+ */
+ for (iy = 0; iy < 50000; iy++);
+
+ pCtrl->wdgOkay = TRUE;
+
+ /* start the ata watchdog */
+
+ wdStart (pCtrl->wdgId, (sysClkRateGet() * pCtrl->wdgTimeout),
+ (FUNCPTR)ataWdog, ctrl);
+
+ while ((ATA_IO_BYTE_READ (pCtrl->aStatus) & ATA_STAT_BUSY) &&
+ (pCtrl->wdgOkay))
+ ;
+
+ ATA_IO_BYTE_WRITE (pCtrl->dControl, ATA_CTL_4BIT);
+ for (ix = 0; ix < 100; ix++)
+ /* sysDelay ();
+ */
+ for (iy = 0; iy < 50000; iy++);
+
+ while (((ATA_IO_BYTE_READ (pCtrl->aStatus) & ATA_STAT_READY) == 0) &&
+ (pCtrl->wdgOkay))
+ ;
+
+ wdCancel (pCtrl->wdgId);
+
+ if (!pCtrl->wdgOkay)
+ {
+#ifdef ATA_DEBUG
+ printErr ("ataInit error:\n");
+#endif /* ATA_DEBUG */
+ pCtrl->wdgOkay = TRUE;
+ return (ERROR);
+ }
+
+#ifdef ATA_DEBUG
+ printErr ("ataInit end:\n");
+#endif /* ATA_DEBUG */
+
+ return (OK);
+}
+
+/*******************************************************************************
+*
+* ataCmd - issue non data command
+*
+* Issue a non data command. Non data commands have the same protocol.
+*
+* RETURNS: OK, ERROR if the command didn't succeed.
+*/
+
+LOCAL STATUS ataCmd
+(
+ int ctrl,
+ int drive,
+ int cmd,
+ int arg0,
+ int arg1
+)
+{
+ ATA_CTRL *pCtrl = &ataCtrl[ctrl];
+ ATA_TYPE *pType = &ataTypes[ctrl][drive];
+ BOOL retry = TRUE;
+ int retryCount = 0;
+ int semStatus = OK;
+
+#ifdef ATA_DEBUG
+ printErr ("ataCmd: ctrl=%d drive=%d cmd=0x%x\n", ctrl, drive, cmd);
+#endif /* ATA_DEBUG */
+
+ while (retry)
+ {
+ ataWait (ctrl, ATA_STAT_READY);
+
+ switch (cmd)
+ {
+ case ATA_CMD_DIAGNOSE:
+ ATA_IO_BYTE_WRITE (pCtrl->sdh, ATA_SDH_IBM | (drive << 4));
+ break;
+ case ATA_CMD_INITP:
+ ATA_IO_BYTE_WRITE (pCtrl->cylLo, pType->cylinders);
+ ATA_IO_BYTE_WRITE (pCtrl->cylHi, pType->cylinders >> 8);
+ ATA_IO_BYTE_WRITE (pCtrl->seccnt, pType->sectors);
+ ATA_IO_BYTE_WRITE (pCtrl->sdh, ATA_SDH_IBM | (drive << 4) |
+ ((pType->heads - 1) & 0x0f));
+ break;
+ case ATA_CMD_RECALIB:
+ ATA_IO_BYTE_WRITE (pCtrl->sdh, ATA_SDH_IBM | (drive << 4));
+ break;
+ case ATA_CMD_SEEK:
+ ATA_IO_BYTE_WRITE (pCtrl->cylLo, arg0);
+ ATA_IO_BYTE_WRITE (pCtrl->cylHi, arg0>>8);
+ ATA_IO_BYTE_WRITE (pCtrl->sdh, ATA_SDH_IBM | (drive << 4) |
+ (arg1 & 0xf));
+ break;
+ case ATA_CMD_SET_FEATURE:
+ ATA_IO_BYTE_WRITE (pCtrl->seccnt, arg1);
+ ATA_IO_BYTE_WRITE (pCtrl->feature, arg0);
+ ATA_IO_BYTE_WRITE (pCtrl->sdh, ATA_SDH_IBM | (drive << 4));
+ break;
+ case ATA_CMD_SET_MULTI:
+ ATA_IO_BYTE_WRITE (pCtrl->seccnt, arg0);
+ ATA_IO_BYTE_WRITE (pCtrl->sdh, ATA_SDH_IBM | (drive << 4));
+ break;
+ }
+
+ ATA_IO_BYTE_WRITE (pCtrl->command, cmd);
+/* semStatus = semTake (&pCtrl->syncSem,
+ sysClkRateGet() * pCtrl->semTimeout);
+*/
+ ataWait (ctrl, ATA_STAT_BUSY);
+ pCtrl->intStatus = ATA_IO_BYTE_READ (pCtrl->status);
+
+
+ if ((pCtrl->intStatus & ATA_STAT_ERR) || (semStatus == ERROR))
+ {
+#ifdef ATA_DEBUG
+ int error = ATA_IO_BYTE_READ(pCtrl->error);
+ printErr ("ataCmd err: status=0x%x semStatus=%d err=0x%x\n",
+ pCtrl->intStatus, semStatus, error);
+#endif /* ATA_DEBUG */
+ if (++retryCount > ataRetry)
+ return (ERROR);
+ }
+ else
+ retry = FALSE;
+ }
+
+ switch (cmd)
+ {
+ case ATA_CMD_SEEK:
+ ataWait (ctrl, ATA_STAT_SEEKCMPLT);
+ break;
+ }
+
+#ifdef ATA_DEBUG
+ printErr ("ataCmd end:\n");
+#endif /* ATA_DEBUG */
+
+ return (OK);
+}
+
+/*******************************************************************************
+*
+* ataPread - Read drive parameters
+*
+* Read drive parameters.
+*
+* RETURNS: OK, ERROR if the command didn't succeed.
+*/
+
+LOCAL STATUS ataPread
+(
+ int ctrl,
+ int drive,
+ void *buffer
+)
+{
+ ATA_CTRL *pCtrl = &ataCtrl[ctrl];
+ BOOL retry = TRUE;
+ int retryCount = 0;
+ int semStatus = OK;
+
+#ifdef ATA_DEBUG
+ printErr ("ataPread: ctrl=%d drive=%d\n", ctrl, drive);
+#endif /* ATA_DEBUG */
+
+ while (retry)
+ {
+ ataWait (ctrl, ATA_STAT_READY);
+
+ ATA_IO_BYTE_WRITE (pCtrl->sdh, ATA_SDH_IBM | (drive << 4));
+ ATA_IO_BYTE_WRITE (pCtrl->command, ATA_CMD_READP);
+/* semStatus = semTake (&pCtrl->syncSem,
+ sysClkRateGet() * pCtrl->semTimeout);
+*/
+ ataWait (ctrl, ATA_STAT_BUSY);
+ pCtrl->intStatus = ATA_IO_BYTE_READ (pCtrl->status);
+
+
+ if ((pCtrl->intStatus & ATA_STAT_ERR) || (semStatus == ERROR))
+ {
+#ifdef ATA_DEBUG
+ int error = ATA_IO_BYTE_READ (pCtrl->error);
+ int status = ATA_IO_BYTE_READ (pCtrl->aStatus);
+ printErr ("ataPread err: stat=0x%x 0x%x semStatus=%d err=0x%x\n",
+ pCtrl->intStatus, status, semStatus, error);
+#endif /* ATA_DEBUG */
+ if (++retryCount > ataRetry)
+ return (ERROR);
+ }
+ else
+ retry = FALSE;
+ }
+
+ ataWait (ctrl, ATA_STAT_DRQ);
+
+ ATA_IO_NWORD_READ_SWAP (pCtrl->data, (short *)buffer, 256);
+
+#ifdef ATA_DEBUG
+ printErr ("ataPread end:\n");
+#endif /* ATA_DEBUG */
+
+ return (OK);
+}
+
+/*******************************************************************************
+*
+* ataWVerify - read back data and verify
+*
+* RETURNS: OK, ERROR if the data does not match.
+*/
+
+LOCAL STATUS ataWVerify
+(
+ int ctrl,
+ int drive,
+ int cylinder,
+ int head,
+ int sector,
+ void *buffer,
+ int nSecs,
+ int direction
+)
+{
+ STATUS stat = OK;
+ ATA_TYPE *pType = &ataTypes[ctrl][drive];
+ int curByte;
+
+ if (direction == O_WRONLY)
+ {
+ if ((stat = ataRW(ctrl, drive, cylinder, head, sector,
+ ataWriteVerifyBuf, nSecs, O_RDONLY)) == OK)
+ {
+ for (curByte=0; curByte < nSecs * pType->bytes; curByte++)
+ {
+ if (ataWriteVerifyBuf[curByte] != ((char *)buffer)[curByte])
+ {
+ stat = ERROR;
+ ataWriteVerifyNumErrs++;
+ break;
+ }
+ }
+ }
+ }
+
+ return (stat);
+}
+
+/*******************************************************************************
+*
+* ataRW - read/write a number of sectors on the current track
+*
+* Read/write a number of sectors on the current track
+*
+* RETURNS: OK, ERROR if the command didn't succeed.
+*/
+
+LOCAL STATUS ataRW
+(
+ int ctrl,
+ int drive,
+ int cylinder,
+ int head,
+ int sector,
+ void *buffer,
+ int nSecs,
+ int direction
+)
+{
+ ATA_CTRL *pCtrl = &ataCtrl[ctrl];
+ ATA_DRIVE *pDrive = &pCtrl->drive[drive];
+ ATA_TYPE *pType = &ataTypes[ctrl][drive];
+ int retryCount = 0;
+ int block = 1;
+ int nSectors = nSecs;
+ int nWords;
+ int semStatus = OK;
+ short *pBuf;
+
+#ifdef ATA_DEBUG
+ printErr ("ataRW: ctrl=%d drive=%d c=%d h=%d s=%d buf=0x%x n=%d dir=%d\n",
+ ctrl, drive, cylinder, head, sector,
+ (int)buffer, nSecs, direction);
+#endif /* ATA_DEBUG */
+
+retryRW:
+ ataWait (ctrl, ATA_STAT_READY);
+
+ pBuf = (short *)buffer;
+ ATA_IO_BYTE_WRITE (pCtrl->feature, pType->precomp);
+ ATA_IO_BYTE_WRITE (pCtrl->seccnt, nSecs);
+ ATA_IO_BYTE_WRITE (pCtrl->sector, sector);
+ ATA_IO_BYTE_WRITE (pCtrl->cylLo, cylinder);
+ ATA_IO_BYTE_WRITE (pCtrl->cylHi, cylinder>>8);
+ if (pDrive->okLba)
+ ATA_IO_BYTE_WRITE (pCtrl->sdh,
+ ATA_SDH_LBA | (drive << 4) | (head & 0xf));
+ else
+ ATA_IO_BYTE_WRITE (pCtrl->sdh,
+ ATA_SDH_IBM | (drive << 4) | (head & 0xf));
+
+ if (pDrive->rwPio == ATA_PIO_MULTI)
+ block = pDrive->multiSecs;
+
+ nWords = (pType->bytes * block) >> 1;
+
+ if (direction == O_WRONLY)
+ {
+ if (pDrive->rwPio == ATA_PIO_MULTI)
+ ATA_IO_BYTE_WRITE (pCtrl->command, ATA_CMD_WRITE_MULTI);
+ else
+ ATA_IO_BYTE_WRITE (pCtrl->command, ATA_CMD_WRITE);
+
+ while (nSectors > 0)
+ {
+ if ((pDrive->rwPio == ATA_PIO_MULTI) && (nSectors < block))
+ {
+ block = nSectors;
+ nWords = (pType->bytes * block) >> 1;
+ }
+
+ ataWait (ctrl, ATA_STAT_BUSY);
+ ataWait (ctrl, ATA_STAT_DRQ);
+/*
+ if (pDrive->rwBits == ATA_BITS_16)
+ ATA_IO_NWORD_WRITE (pCtrl->data, pBuf, nWords);
+ else
+ ATA_IO_NLONG_WRITE (pCtrl->data, (long *)pBuf, nWords >> 1);
+*/
+ ATA_IO_NWORD_WRITE (pCtrl->data, pBuf, nWords);
+
+/* semStatus = semTake (&pCtrl->syncSem,
+ sysClkRateGet() * pCtrl->semTimeout);
+*/
+ ataWait (ctrl, ATA_STAT_BUSY);
+ pCtrl->intStatus = ATA_IO_BYTE_READ (pCtrl->status);
+
+ if ((pCtrl->intStatus & ATA_STAT_ERR) || (semStatus == ERROR))
+ goto errorRW;
+
+ pBuf += nWords;
+ nSectors -= block;
+ }
+ }
+ else
+ {
+ if (pDrive->rwPio == ATA_PIO_MULTI)
+ ATA_IO_BYTE_WRITE (pCtrl->command, ATA_CMD_READ_MULTI);
+ else
+ ATA_IO_BYTE_WRITE (pCtrl->command, ATA_CMD_READ);
+
+ while (nSectors > 0)
+ {
+ if ((pDrive->rwPio == ATA_PIO_MULTI) && (nSectors < block))
+ {
+ block = nSectors;
+ nWords = (pType->bytes * block) >> 1;
+ }
+
+/* semStatus = semTake (&pCtrl->syncSem,
+ sysClkRateGet() * pCtrl->semTimeout);
+*/
+ ataWait (ctrl, ATA_STAT_BUSY);
+ pCtrl->intStatus = ATA_IO_BYTE_READ (pCtrl->status);
+
+ if ((pCtrl->intStatus & ATA_STAT_ERR) || (semStatus == ERROR))
+ goto errorRW;
+
+ ataWait (ctrl, ATA_STAT_DRQ);
+/*
+ if (pDrive->rwBits == ATA_BITS_16)
+ ATA_IO_NWORD_READ (pCtrl->data, pBuf, nWords);
+ else
+ ATA_IO_NLONG_READ (pCtrl->data, (long *)pBuf, nWords >> 1);
+*/
+ ATA_IO_NWORD_READ (pCtrl->data, pBuf, nWords);
+
+ pBuf += nWords;
+ nSectors -= block;
+ }
+ }
+
+#ifdef ATA_DEBUG
+ printErr ("ataRW: end\n");
+#endif /* ATA_DEBUG */
+
+ return (OK);
+
+errorRW:
+#ifdef ATA_DEBUG
+ {
+ int error = ATA_IO_BYTE_READ (pCtrl->error);
+ int status = ATA_IO_BYTE_READ (pCtrl->aStatus);
+ printErr ("ataRW err: stat=0x%x 0x%x semStatus=%d error=0x%x\n",
+ pCtrl->intStatus, status, semStatus, error);
+ }
+#endif /* ATA_DEBUG */
+ ataCFStatErrs++;
+ if (++retryCount < ataRetry)
+ goto retryRW;
+ return (ERROR);
+}
diff --git a/data/mnet/GP10/Host/Cdc_bsp/bootflash.c b/data/mnet/GP10/Host/Cdc_bsp/bootflash.c
new file mode 100644
index 0000000..ffd574d
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/bootflash.c
@@ -0,0 +1,843 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/*
+JetCell modification history
+----------------------------
+99/07/28 to Initial Version
+*/
+
+/* bootFlash.c - Boot Flash Library */
+
+/*
+DESCRIPTION
+This library contains routines to access the flash memory used for target
+bootup.
+*/
+#include <stdio.h>
+#include <fioLib.h>
+#include "bootFlash.h"
+#include "config.h"
+#include "taskLib.h"
+
+
+/******************************************************************************
+*
+* Manufaturers and known parts.
+*
+*****************************************************************************/
+
+#define FLASH_MFG_AMD 1
+#define AMD_29F016B 0xad
+#define AMD_29F032B 0x41
+
+/*****************************************************************************
+* AMD flash device functions
+*****************************************************************************/
+int amdFlashGetDevId ( void );
+int amdFlashGetMfg ( void );
+int amd29F016BGetNumSect ( void );
+int amdGetSectSize ( void );
+int amd29F032BGetNumSect ( void );
+STATUS amdFlashReset ( void );
+STATUS amdFlashSectorErase ( unsigned int sector );
+STATUS amdFlashChipErase ( void );
+STATUS amdFlashProgram ( unsigned int flashAddr, unsigned char *data, int length );
+STATUS amdFlashProgramNoErase ( unsigned int flashAddr, unsigned char *data, int length );
+
+/*****************************************************************************
+* Table of known devices
+*
+* NOTE: Make sure FLASH_NUM_DEVICES is the correct count for the number of
+* entries
+*****************************************************************************/
+#define FLASH_DEFAULT_FLASH_DEV 0
+#define FLASH_NUM_DEVICES 2
+#define FLASH_IDS_MFG 0
+#define FLASH_IDS_DEV 1
+
+/* Index of the currently installed flash device. This value is setup when */
+/* calling the flashInit functions
+ */
+/* NOTE: THIS CODE WAS ORIGINALLY WRITTEN TO HANDLE DIFFERENT FLASH */
+/* TYPES. FOR NOW THIS FUNCTION IS DISABLED */
+/*int currFlashDevice;*/
+#define currFlashDevice 1
+
+int FlashIds[FLASH_NUM_DEVICES][2] =
+{
+ {FLASH_MFG_AMD, AMD_29F016B},
+ {FLASH_MFG_AMD, AMD_29F032B}
+};
+
+flashDevice_t FlashDevices[FLASH_NUM_DEVICES] =
+{
+ /* AMD 29F016B */
+ {amdFlashGetMfg, amdFlashGetDevId, amd29F016BGetNumSect, amdGetSectSize,
+ amdFlashChipErase, amdFlashSectorErase, amdFlashReset, amdFlashProgram,
+ amdFlashProgramNoErase},
+ /* AMD 29F032B */
+ {amdFlashGetMfg, amdFlashGetDevId, amd29F032BGetNumSect, amdGetSectSize,
+ amdFlashChipErase, amdFlashSectorErase, amdFlashReset, amdFlashProgram,
+ amdFlashProgramNoErase}
+};
+
+
+
+/******************************************************************************
+*
+* Routines to access AMD type flash parts.
+*
+*****************************************************************************/
+
+#define AMD_FLASH_RESET_DATA 0xf0
+#define AMD_FLASH_FIRST_ADDR 0x555
+#define AMD_FLASH_FIRST_DATA 0xaa
+#define AMD_FLASH_SECOND_ADDR 0x2aa
+#define AMD_FLASH_SECOND_DATA 0x55
+#define AMD_FLASH_THIRD_ADDR 0x555
+#define AMD_FLASH_THIRD_AUTOSEL_DATA 0x90
+#define AMD_FLASH_THIRD_PROG_DATA 0xa0
+#define AMD_FLASH_THIRD_ERASE_DATA 0x80
+#define AMD_FLASH_FOURTH_MANU_ID_ADDR 0x00
+#define AMD_FLASH_FOURTH_DEV_ID_ADDR 0x01
+#define AMD_FLASH_FOURTH_ERASE_ADDR 0x555
+#define AMD_FLASH_FOURTH_ERASE_DATA 0xaa
+#define AMD_FLASH_FIFTH_ERASE_ADDR 0x2aa
+#define AMD_FLASH_FIFTH_ERASE_DATA 0x55
+#define AMD_FLASH_SIXTH_CHIP_ERASE_ADDR 0x555
+#define AMD_FLASH_SIXTH_CHIP_ERASE_DATA 0x10
+#define AMD_FLASH_SIXTH_SECT_ERASE_DATA 0x30
+
+#define AMD_FLASH_DQ7_MASK 0x80
+#define AMD_29F016B_NUM_SECT 32
+#define AMD_29F032B_NUM_SECT 64
+#define AMD_SECT_SIZE 65536
+
+
+
+/******************************************************************************
+*
+* amdGetSectSize - get the number of bytes in a sector.
+*
+* This routine returns the number of bytes in a sector for an AMD flash device.
+*
+* RETURNS: number of sectors.
+*/
+
+int amdGetSectSize ( void )
+{
+ return (AMD_SECT_SIZE);
+}
+
+
+/******************************************************************************
+*
+* amd29F016BGetNumSect - get the number of sectors.
+*
+* This routine returns the number of sectors for a 29F032B AMD flash device.
+*
+* RETURNS: number of sectors.
+*/
+
+int amd29F032BGetNumSect ( void )
+{
+ return (AMD_29F032B_NUM_SECT);
+}
+
+
+/******************************************************************************
+*
+* amd29F016BGetNumSect - get the number of sectors.
+*
+* This routine returns the number of sectors for a 29F016B AMD flash device.
+*
+* RETURNS: number of sectors.
+*/
+
+int amd29F016BGetNumSect ( void )
+{
+ return (AMD_29F016B_NUM_SECT);
+}
+
+
+
+/******************************************************************************
+*
+* amdFlashGetMfg - get the manufacturer id.
+*
+* This routine returns the manufacturer id for an AMD flash device.
+*
+* RETURNS: valid id or -1.
+*/
+
+int amdFlashGetMfg ( void )
+{
+ unsigned char id;
+
+ id = 0xff;
+
+ amdFlashReset();
+
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_FIRST_ADDR) = AMD_FLASH_FIRST_DATA;
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_SECOND_ADDR) = AMD_FLASH_SECOND_DATA;
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_THIRD_ADDR) = AMD_FLASH_THIRD_AUTOSEL_DATA;
+ id = *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_FOURTH_MANU_ID_ADDR);
+
+ amdFlashReset();
+
+ if (id == 0xff)
+ {
+ return -1;
+ }
+ else
+ {
+ return id;
+ }
+}
+
+
+
+/******************************************************************************
+*
+* amdFlashGetDevId - get the device id.
+*
+* This routine returns the device id for an AMD flash device.
+*
+* RETURNS: valid id or -1.
+*/
+
+int amdFlashGetDevId ( void )
+{
+ unsigned char id;
+
+ id = 0xff;
+
+ amdFlashReset();
+
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_FIRST_ADDR) = AMD_FLASH_FIRST_DATA;
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_SECOND_ADDR) = AMD_FLASH_SECOND_DATA;
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_THIRD_ADDR) = AMD_FLASH_THIRD_AUTOSEL_DATA;
+ id = *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_FOURTH_DEV_ID_ADDR);
+
+ amdFlashReset();
+
+ if (id == 0xff)
+ {
+ return -1;
+ }
+ else
+ {
+ return id;
+ }
+}
+
+
+/******************************************************************************
+*
+* amdFlashReset - reset an AMD flash device.
+*
+* This routine sends a flash reset command to the AMD flash device.
+*
+* RETURNS: OK, ERROR.
+*/
+
+STATUS amdFlashReset ( void )
+{
+ *((unsigned char *)ROM_BASE_ADRS) = AMD_FLASH_RESET_DATA;
+ return OK;
+}
+
+
+
+/******************************************************************************
+*
+* amdFlashChipErase - erase an AMD flash device.
+*
+* This routine sends a command to erase the entire AMD flash device.
+*
+* RETURNS: OK, ERROR.
+*/
+
+STATUS amdFlashChipErase ( void )
+{
+ /* Send a chip erase command */
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_FIRST_ADDR) = AMD_FLASH_FIRST_DATA;
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_SECOND_ADDR) = AMD_FLASH_SECOND_DATA;
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_THIRD_ADDR) = AMD_FLASH_THIRD_ERASE_DATA;
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_FOURTH_ERASE_ADDR) = AMD_FLASH_FOURTH_ERASE_DATA;
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_FIFTH_ERASE_ADDR) = AMD_FLASH_FIFTH_ERASE_DATA;
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_SIXTH_CHIP_ERASE_ADDR) = AMD_FLASH_SIXTH_CHIP_ERASE_DATA;
+
+ /* Spin here until the flash is erased */
+ /* DQ7 outputs a zero until the flash is erased. */
+ printf("Erasing boot flash");
+ while (!(*((unsigned char *)ROM_BASE_ADRS) & AMD_FLASH_DQ7_MASK))
+ {
+ taskDelay(10);
+ printf(".");
+ }
+ printf("Erase Complete!\n");
+ return OK;
+}
+
+
+/******************************************************************************
+*
+* amdFlashSectorErase - erase one sector of an AMD flash device.
+*
+* This routine sends a command to erase one sector of an AMD flash device.
+*
+* RETURNS: OK, ERROR.
+*/
+
+STATUS amdFlashSectorErase ( unsigned int sector )
+{
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_FIRST_ADDR) = AMD_FLASH_FIRST_DATA;
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_SECOND_ADDR) = AMD_FLASH_SECOND_DATA;
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_THIRD_ADDR) = AMD_FLASH_THIRD_ERASE_DATA;
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_FOURTH_ERASE_ADDR) = AMD_FLASH_FOURTH_ERASE_DATA;
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_FIFTH_ERASE_ADDR) = AMD_FLASH_FIFTH_ERASE_DATA;
+ *((unsigned char *)ROM_BASE_ADRS + (sector * flashGetSectSize())) = AMD_FLASH_SIXTH_SECT_ERASE_DATA;
+
+ /* Spin here until the sector is erased */
+ /* DQ7 outputs a zero until the sector is erased. */
+ while (!(*((unsigned char *)ROM_BASE_ADRS + (sector * flashGetSectSize())) &
+ AMD_FLASH_DQ7_MASK))
+ {
+ /* taskDelay(1);*/
+ }
+ return OK;
+}
+
+
+/******************************************************************************
+*
+* amdFlashProgramByte - execute flash programming.
+*
+* This routine will program the flash memory with the specified data.
+*
+* RETURNS: OK, ERROR.
+*/
+STATUS amdFlashProgramByte ( unsigned int flashAddr, unsigned char byte )
+{
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_FIRST_ADDR) = AMD_FLASH_FIRST_DATA;
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_SECOND_ADDR) = AMD_FLASH_SECOND_DATA;
+ *((unsigned char *)ROM_BASE_ADRS + AMD_FLASH_THIRD_ADDR) = AMD_FLASH_THIRD_PROG_DATA;
+ *((unsigned char *)flashAddr) = byte;
+
+ /* Spin here until the byte is programmed */
+ /* DQ7 outputs the complement of the data programmed to DQ7 until the byte */
+ /* is programmed. */
+ while ((*((unsigned char *)flashAddr) & AMD_FLASH_DQ7_MASK) !=
+ (byte & AMD_FLASH_DQ7_MASK))
+ {
+ /* taskDelay(1);*/
+ }
+ return OK;
+}
+
+/******************************************************************************
+*
+* amdFlashProgram - execute flash programming.
+*
+* This routine will program the flash memory with the specified data. Entire
+* sectors will be erased as needed to program the data.
+*
+* RETURNS: OK, ERROR.
+*/
+
+STATUS amdFlashProgram ( unsigned int flashAddr, unsigned char *data,
+ int length )
+{
+ unsigned int sector, startSector, endSector;
+ int i;
+
+ startSector = (flashAddr & (flashGetSectSize() * flashGetNumSect() - 1)) /
+ flashGetSectSize();
+ endSector = ((flashAddr & (flashGetSectSize() * flashGetNumSect() - 1)) +
+ (unsigned int)length - 1) / flashGetSectSize();
+
+ /* Erase the sectors that will be programmed */
+ for (sector = startSector; sector <= endSector; sector++)
+ {
+ amdFlashSectorErase(sector);
+ }
+
+ /* Program the data */
+ for (i = 0; i < length; i++)
+ {
+ amdFlashProgramByte(flashAddr, data[i]);
+ flashAddr++;
+ }
+
+ return OK;
+}
+
+
+/******************************************************************************
+*
+* amdFlashProgramNoErase - execute flash programming.
+*
+* This routine will program the flash memory with the specified data. This
+* function assumes that the flash has been erased before programming.
+*
+* RETURNS: OK, ERROR.
+*/
+
+STATUS amdFlashProgramNoErase ( unsigned int flashAddr, unsigned char *data,
+ int length )
+{
+ int i;
+
+ /* Program the data */
+ for (i = 0; i < length; i++)
+ {
+ amdFlashProgramByte(flashAddr, data[i]);
+ flashAddr++;
+ }
+
+ return OK;
+}
+
+
+/******************************************************************************
+*
+* Generic routines to access flash parts.
+*
+*****************************************************************************/
+
+/******************************************************************************
+*
+* flashInit - initialize the flash driver.
+*
+* This routine tries to determine what type of flash device is present. Once
+* the device has been determined the appropriate flash driver is configured.
+*
+* RETURNS: OK, ERROR.
+*/
+
+STATUS flashInit ( void )
+{
+ int i;
+
+ /* Set the default flash type */
+ /*currFlashDevice = FLASH_DEFAULT_FLASH_DEV;*/
+
+ /* Try to determine what type of flash is installed. */
+ for (i = 0; i < FLASH_NUM_DEVICES; i++)
+ {
+ if (((FlashDevices[i].flashGetMfgId)() == FlashIds[i][FLASH_IDS_MFG]) &&
+ ((FlashDevices[i].flashGetDevId)() == FlashIds[i][FLASH_IDS_DEV]))
+ {
+ /* NOTE: THIS CODE WAS ORIGINALLY WRITTEN TO HANDLE DIFFERENT FLASH */
+ /* TYPES. FOR NOW THIS FUNCTION IS DISABLED */
+ /*currFlashDevice = i; */
+ break;
+ }
+ }
+
+ return OK;
+}
+
+
+/******************************************************************************
+*
+* flashGetDevId - get the manufacturer id.
+*
+* This routine returns the device id for the flash device.
+*
+* RETURNS: valid id or -1.
+*/
+
+int flashGetDevId ( void )
+{
+ return ((FlashDevices[currFlashDevice].flashGetDevId)());
+}
+
+
+/******************************************************************************
+*
+* flashGetMfgId - get the manufacturer id.
+*
+* This routine returns the manufacturer id for the flash device.
+*
+* RETURNS: valid id or -1.
+*/
+
+int flashGetMfgId ( void )
+{
+ return ((FlashDevices[currFlashDevice].flashGetMfgId)());
+}
+
+
+/******************************************************************************
+*
+* flashGetNumSect - get the number of sectors.
+*
+* This routine returns the number of sectors for the flash device.
+*
+* RETURNS: number of sectors.
+*/
+
+int flashGetNumSect ( void )
+{
+ return ((FlashDevices[currFlashDevice].flashGetNumSect)());
+}
+
+
+/******************************************************************************
+*
+* flashGetSectSize - get the number of bytes in a sector.
+*
+* This routine returns the number of bytes in a sector for the flash device.
+*
+* RETURNS: number of sectors.
+*/
+
+int flashGetSectSize ( void )
+{
+ return ((FlashDevices[currFlashDevice].flashGetSectSize)());
+}
+
+
+
+/******************************************************************************
+*
+* flashReset - reset the flash device.
+*
+* This routine sends a flash reset command to the flash device.
+*
+* RETURNS: OK, ERROR.
+*/
+
+STATUS flashReset ( void )
+{
+ return ((FlashDevices[currFlashDevice].flashReset)());
+}
+
+
+/******************************************************************************
+*
+* flashChipErase - erase flash device.
+*
+* This routine sends a command to erase the entire flash device.
+*
+* RETURNS: OK, ERROR.
+*/
+
+STATUS flashChipErase ( void )
+{
+ return ((FlashDevices[currFlashDevice].flashErase)());
+}
+
+
+/******************************************************************************
+*
+* flashSectorErase - erase one sector of a flash device.
+*
+* This routine sends a command to erase one sector of a flash device.
+*
+* RETURNS: OK, ERROR.
+*/
+
+STATUS flashSectorErase ( unsigned int sector )
+{
+ return ((FlashDevices[currFlashDevice].flashSectorErase)(sector));
+}
+
+
+/******************************************************************************
+*
+* flashProgram - execute flash programming.
+*
+* This routine will program the flash memory with the specified data. Entire
+* sectors will be erased as needed to program the data.
+*
+* RETURNS: OK, ERROR.
+*/
+
+STATUS flashProgram ( unsigned int flashAddr, unsigned char *data,
+ int length )
+{
+ return ((FlashDevices[currFlashDevice].flashProgram)(flashAddr, data, length));
+}
+
+
+/******************************************************************************
+*
+* flashProgramNoErase - execute flash programming.
+*
+* This routine will program the flash memory with the specified data. This
+* function assumes that the flash has been erased before programming.
+*
+* RETURNS: OK, ERROR.
+*/
+
+STATUS flashProgramNoErase ( unsigned int flashAddr, unsigned char *data,
+ int length )
+{
+ return ((FlashDevices[currFlashDevice].flashProgramNoErase)(flashAddr, data, length));
+}
+
+
+/******************************************************************************
+*
+* vxBootLoadHex - load boot code into the bootflash.
+*
+* This routine will program the bootflash with the specified file. Entire
+* sectors will be erased as needed to program the data.
+*
+* RETURNS: OK, ERROR.
+*/
+#define MAX_SREC_LENGTH 80
+#define SREC_TYPE_SIZE 2
+#define SREC_COUNT_SIZE 2
+#define SREC_S3_ADDR_SIZE 8
+#define SREC_DATA_SIZE 64
+#define SREC_DATA_ELEMENT_SIZE 2
+#define SREC_CHECKSUM_SIZE 2
+
+#define BOOT_VERSION_SIZE 8
+STATUS vxBootLoadHex ( char *fileName )
+{
+ int fd, i, srecCnt, isVerifyOk;
+ char sRecord[MAX_SREC_LENGTH];
+ char sRecCount[SREC_COUNT_SIZE + 1];
+ char sRecAddr[SREC_S3_ADDR_SIZE + 1];
+ char sRecData[SREC_DATA_ELEMENT_SIZE + 1];
+ char sRecChecksum[SREC_CHECKSUM_SIZE + 1];
+ unsigned char data[SREC_DATA_SIZE + 1];
+ unsigned int addr;
+ unsigned int count, lastEraseSect, startAddrSect, endAddrSect;
+ unsigned int checkSum, calcChkSum;
+
+ FILE *f = fopen(fileName, "r");
+ if (!f)
+ {
+ printf("vxBootLoadHex ERROR: unable to open %s\n", fileName);
+ return ERROR;
+ }
+
+ if ((fd = fileno(f)) == -1)
+ {
+ printf("vxBootLoadHex ERROR: unable to create file desciptor for file %s\n", fileName);
+ fclose(f);
+ return ERROR;
+ }
+
+ /* Reset the flash */
+ if (flashReset() != OK)
+ {
+ printf("vxBootLoadHex ERROR: unable to reset flash\n");
+ fclose(f);
+ return ERROR;
+ }
+
+ printf("Programming flash");
+ srecCnt = 0;
+ lastEraseSect = 0xffffffff;
+ isVerifyOk = TRUE;
+ while (fioRdString(fd, sRecord, MAX_SREC_LENGTH) != EOF)
+ {
+ if (!strncmp("S3", sRecord, SREC_TYPE_SIZE))
+ {
+ /* Extract the count field of the S-Record */
+ strncpy(sRecCount, sRecord + SREC_TYPE_SIZE, SREC_COUNT_SIZE);
+ sRecCount[SREC_COUNT_SIZE] = 0;
+ count = (unsigned int) strtoul(sRecCount, 0, 16);
+
+ /* Extract the address stored in the S-Record */
+ strncpy(sRecAddr, sRecord + SREC_TYPE_SIZE + SREC_COUNT_SIZE, SREC_S3_ADDR_SIZE);
+ sRecAddr[SREC_S3_ADDR_SIZE] = 0;
+ addr = (unsigned int) strtoul(sRecAddr, 0, 16);
+
+ /* Extract the data in the S-Record */
+ for (i = 0; i < (count - (SREC_CHECKSUM_SIZE + SREC_S3_ADDR_SIZE)/2); i++)
+ {
+ strncpy(sRecData, sRecord + SREC_TYPE_SIZE + SREC_COUNT_SIZE + SREC_S3_ADDR_SIZE +
+ (i * SREC_DATA_ELEMENT_SIZE) , SREC_DATA_ELEMENT_SIZE);
+ sRecData[SREC_DATA_ELEMENT_SIZE] = 0;
+ data[i] = (unsigned char) strtoul(sRecData, 0, 16);
+ }
+
+ /* Extract the checksum field of the S-Record */
+ strncpy(sRecChecksum, sRecord + SREC_TYPE_SIZE + SREC_COUNT_SIZE + count*2 -
+ SREC_CHECKSUM_SIZE, SREC_CHECKSUM_SIZE);
+ sRecChecksum[SREC_CHECKSUM_SIZE] = 0;
+ checkSum = (unsigned int) strtoul(sRecChecksum, 0, 16);
+
+ /* calculate a check sum */
+ calcChkSum = 0;
+
+ calcChkSum += count;
+ calcChkSum += addr & 0xff;
+ calcChkSum += (addr>>8) & 0xff;
+ calcChkSum += (addr>>16) & 0xff;
+ calcChkSum += (addr>>24) & 0xff;
+ for(i = 0; i < count - (SREC_CHECKSUM_SIZE + SREC_S3_ADDR_SIZE)/2; i++)
+ {
+ calcChkSum += data[i];
+ }
+
+ calcChkSum = (~calcChkSum) & 0xff;
+
+ if (calcChkSum != checkSum)
+ {
+ printf("vxBootLoadHex WARNING: S-Record contains invalid checksum: addr(0x%x), checksum(0x%x)\n",
+ addr, checkSum);
+ }
+
+ /* If we will cross a sector boundary or this is the first sector */
+ /* then erase the sector. */
+ startAddrSect = (addr - ROM_BASE_ADRS) / flashGetSectSize();
+ endAddrSect = ((addr - ROM_BASE_ADRS) + (count - (SREC_CHECKSUM_SIZE + SREC_S3_ADDR_SIZE)/2)) / flashGetSectSize();
+ if ((lastEraseSect != startAddrSect))
+ {
+ flashSectorErase(startAddrSect);
+ lastEraseSect = startAddrSect;
+ }
+
+ if ((lastEraseSect != endAddrSect))
+ {
+ flashSectorErase(endAddrSect);
+ lastEraseSect = endAddrSect;
+ }
+
+ /* program the flash if a full sector of data has been collected */
+ if (flashProgramNoErase(addr, data, count - (SREC_CHECKSUM_SIZE + SREC_S3_ADDR_SIZE)/2) != OK)
+ {
+ printf("vxBootLoadHex WARNING: unable to program S-Record: addr(0x%x)\n", addr);
+ }
+
+ /* verify data was written properly */
+ for (i = 0; i < (count - (SREC_CHECKSUM_SIZE + SREC_S3_ADDR_SIZE)/2); i++)
+ {
+ if (*(((unsigned char *)addr) + i) != data[i])
+ {
+ isVerifyOk = FALSE;
+ }
+ }
+
+ if (++srecCnt == 1000)
+ {
+ printf(".");
+ taskDelay(1);
+ srecCnt = 0;
+ }
+ }
+ }
+
+ /* Reset the flash */
+ if (flashReset() != OK)
+ {
+ printf("vxBootLoadHex ERROR: unable to reset flash\n");
+ }
+
+ printf("Boot flash programmed!\n");
+
+ if (!isVerifyOk)
+ {
+ printf("vxBootLoad WARNING!!!! Verify failed!!!!!!!!!!!!!\n");
+ }
+
+ fclose(f);
+
+ return OK;
+}
+
+
+
+/******************************************************************************
+*
+* vxBootLoadBin - load boot code into the bootflash.
+*
+* This routine will program the bootflash with the specified file. Entire
+* sectors will be erased as needed to program the data.
+*
+* RETURNS: OK, ERROR.
+*/
+#define BOOT_VERSION_SIZE 8
+#define FLASH_SECTOR_SIZE 65536
+STATUS vxBootLoadBin ( char *fileName )
+{
+ char bootVer[BOOT_VERSION_SIZE+1];
+ char *buf;
+ unsigned int startAddr, endAddr;
+ int size, isVerifyOk, i;
+
+
+ FILE *f = fopen(fileName, "rb");
+ if (!f)
+ {
+ printf("vxBootLoadBin ERROR: unable to open %s\n", fileName);
+ return ERROR;
+ }
+
+ /* Reset the flash */
+ if (flashReset() != OK)
+ {
+ printf("vxBootLoadBin ERROR: unable to reset flash\n");
+ fclose(f);
+ return ERROR;
+ }
+
+ fread (bootVer, 1, BOOT_VERSION_SIZE, f);
+ bootVer[BOOT_VERSION_SIZE] = 0;
+
+ fread ((char *)&startAddr, 1, sizeof(startAddr), f);
+ fread ((char *)&endAddr, 1, sizeof(endAddr), f);
+
+ printf("Programming flash with version %s startAddr(0x%x) endAddr(0x%x)\n",
+ bootVer, startAddr, endAddr);
+
+ buf = malloc(flashGetSectSize());
+
+ /* Skip a dummy line. */
+ fread (buf, 1, 16, f);
+
+ isVerifyOk = TRUE;
+ while ((size = fread(buf, 1 , FLASH_SECTOR_SIZE, f)) != 0)
+ {
+ if (flashProgram(startAddr, buf, size) != OK)
+ {
+ printf ("vxBootLoadBin ERROR: Unable to program sector at 0x%x\n", startAddr);
+ }
+
+ /* verify tha the sector was programmed ok */
+ for (i = 0; i < size; i++)
+ {
+ if (*(((unsigned char *)startAddr) + i) != buf[i])
+ {
+ isVerifyOk = FALSE;
+ }
+ }
+ startAddr += size;
+ printf(".");
+ taskDelay(1);
+ }
+ printf("Boot flash programmed!\n");
+
+ if (!isVerifyOk)
+ {
+ printf("vxBootLoadBin WARNING!!!! Verify failed!!!!!!!!!!!!!\n");
+ }
+
+ /* Reset the flash */
+ if (flashReset() != OK)
+ {
+ printf("vxBootLoadBin ERROR: unable to reset flash\n");
+ free(buf);
+ fclose(f);
+ return ERROR;
+ }
+
+ free(buf);
+ fclose(f);
+
+ return OK;
+}
diff --git a/data/mnet/GP10/Host/Cdc_bsp/bootflash.h b/data/mnet/GP10/Host/Cdc_bsp/bootflash.h
new file mode 100644
index 0000000..0bd3592
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/bootflash.h
@@ -0,0 +1,84 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/*
+JetCell modification history
+----------------------------
+99/07/29 to Initial Version
+*/
+
+/*
+ * File name : bootFlash.h
+ * Description : Constants and Definitions for bootFlash.h
+ * History:
+ *
+ */
+
+#ifndef _BOOTFLASH_H
+#define _BOOTFLASH_H
+
+#include "vxWorks.h"
+
+
+
+
+/******************************************************************************
+*
+* vxBootLoadHex - load a hex (Motorola S-Records) bootfile into the bootflash.
+*
+* This routine will program the bootflash with the specified file. Entire
+* sectors will be erased as needed to program the data.
+*
+* RETURNS: OK, ERROR.
+*/
+extern STATUS vxBootLoadHex ( char *fileName );
+
+/******************************************************************************
+*
+* vxBootLoadBin - load a binary bootfile into the bootflash.
+*
+* This routine will program the bootflash with the specified file. Entire
+* sectors will be erased as needed to program the data.
+*
+* RETURNS: OK, ERROR.
+*/
+extern STATUS vxBootLoadBin ( char *fileName );
+
+
+extern STATUS flashInit(void);
+
+
+extern int flashGetMfgId (void);
+extern int flashGetDevId (void);
+extern int flashGetNumSect (void);
+extern int flashGetSectSize (void);
+extern STATUS flashErase (void);
+extern STATUS flashSectorErase (unsigned int sector);
+extern STATUS flashReset (void);
+extern STATUS flashProgram (unsigned int flashAddr, unsigned char *data, int length);
+extern STATUS flashProgramNoErase (unsigned int flashAddr, unsigned char *data, int length);
+
+
+
+
+
+
+typedef struct {
+ int (*flashGetMfgId) (void);
+ int (*flashGetDevId) (void);
+ int (*flashGetNumSect) (void);
+ int (*flashGetSectSize) (void);
+ STATUS (*flashErase) (void);
+ STATUS (*flashSectorErase) (unsigned int sector);
+ STATUS (*flashReset) (void);
+ STATUS (*flashProgram) (unsigned int flashAddr, unsigned char *data, int length);
+ STATUS (*flashProgramNoErase) (unsigned int flashAddr, unsigned char *data, int length);
+} flashDevice_t;
+
+
+
+#endif /* _BOOTFLASH_H */
diff --git a/data/mnet/GP10/Host/Cdc_bsp/bootflash.o b/data/mnet/GP10/Host/Cdc_bsp/bootflash.o
new file mode 100644
index 0000000..f149805
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/bootflash.o
Binary files differ
diff --git a/data/mnet/GP10/Host/Cdc_bsp/bootrom_build.txt b/data/mnet/GP10/Host/Cdc_bsp/bootrom_build.txt
new file mode 100644
index 0000000..1b7db48
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/bootrom_build.txt
@@ -0,0 +1,37 @@
+Note: For the GP10 product, the Bootrom file is
+ named viperBoot_uncmp.hex. This is created
+ by 1st building the bootrom_uncmp.hex file,
+ then using the MakeBootrom.exe file to
+ insert the version information into the 1st
+ 200 bytes.
+
+
+ Steps to build bootrom file:
+---------------------------------------------------
+
+1. Run the cleanall function.
+ Example: >>make cleanall
+
+2. Set BOOT environment variable to equeal 1
+ Example: >>set BOOT=1
+
+3. Build the bootrom_uncmp.hex file.
+ Example: >>make bootrom_uncmp.hex
+
+4. Check out the "viperBoot_uncmp.hex" file.
+
+5. Run the follwing to store version info in file: MakeBootrom <Version Name>
+ Example: >>MakeBootrom 3.0
+
+6. Check in the new "viperBoot_uncmp.hex" file.
+
+7. Label all files in the Vipercell VOB in the following directories:
+ Cdc_bsp
+ cdcUtils
+ Oam
+
+8. Label all files in the vxVmi860 VOB.
+
+
+
+
diff --git a/data/mnet/GP10/Host/Cdc_bsp/bootrom_updating.txt b/data/mnet/GP10/Host/Cdc_bsp/bootrom_updating.txt
new file mode 100644
index 0000000..28f421e
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/bootrom_updating.txt
@@ -0,0 +1,33 @@
+Note (1): How to update bootRom for pre-FCS3 loads:
+---------------------------------------------------
+1. Connect to the desired vipercell using telnet (or serial port)
+2. FTP bootflash.o, nvram2.o and bootrom_uncmp.hex to /ata/vipercall
+3. Load bootflash.o and nvram2.o from /ata/vipercall directory
+ ld < /ata/vipercall/bootflash.o
+ ld < /ata/vipercall/nvram2.o
+4. Program new bootcode by calling the following function:
+ vxBootLoadHex("/ata/vipercall/bootrom_uncmp.hex")
+5. Update boot parameters by calling the following function:
+ UpdateBootParameters
+6. Use FTP to update to the post FCS 3 build (at the very least you need the new vxWorks that matches the new boot code)
+7. Reboot
+
+Note: bootflash.o, nvram2.o and bootrom_uncmp.hex may be deleted after upgrading.
+
+
+
+Note (2): How to update bootrom from newer, FCS3 and beyond, loads:
+(This sequence can also be used to reload the original bootrom code)
+-------------------------------------------------------------------
+
+1. Connect to the desired vipercell using telnet (or serial port)
+2. FTP ViperBoot_uncmp.hex to /ata/vipercall
+3. Program new bootcode by calling the following function:
+ vxBootLoadHex("/ata/vipercall/ViperBoot_uncmp.hex")
+4. Reboot
+
+Note: ViperBoot_uncmp.hex may be deleted after upgrading.
+
+
+
+
diff --git a/data/mnet/GP10/Host/Cdc_bsp/ds2401.c b/data/mnet/GP10/Host/Cdc_bsp/ds2401.c
new file mode 100644
index 0000000..2c6de2f
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/ds2401.c
@@ -0,0 +1,224 @@
+/*
+JetCell modification history
+----------------------------
+99/06/01 ck Initial Version
+*/
+
+/*
+ * The routines in this file are designed to support the DS2401 Silicon
+ * Serial Number part. The DS2401 is a single line part returning 64-bits or 8
+ * bytes of data. The single line is driven and read on an 860 PORTB bit,
+ * DS2401BIT. The external calling routine is readDs2401, which returns the
+ * data in the global 8 byte buffer ds2401. The buffer will return with an
+ * 8 bit Family Code (01h), 48 bit serial number and an 8 bit CRC. Upon
+ * completion, the global variable ds2401CRC, which contains the calculated CRC
+ * should return zero. The programs in this file use timing loops rather than
+ * vxWorks taskDelays. Consequently, interrupts are disabled for substantial
+ * periods of time. While the routines can be run in a tasking environment,
+ * the intent is that readDs2401 be invoked once on startup to initialize
+ * the ds2401 buffer and ds2401CRC checksum. Applications in tasking space can
+ * then read the global buffer and checksum from memory.
+ */
+#include "vxWorks.h"
+#include "arch/ppc/vxPpcLib.h"
+#include "drv/multi/ppc860Cpm.h"
+#include "drv/multi/ppc860Siu.h"
+#include "intLib.h"
+#include "logLib.h"
+
+#define DS2401BIT 0x0001
+#define DS2401DELAY(x) { int n; for (n = 0; n < x; n++); }
+#define DS2401DELAY500 500*20
+#define DS2401DELAY5 5*20
+#define DS2401DELAY150 150*20
+#define DS2401DELAY15 15*20
+#define DS2401DELAY10 10*20
+#define DS2401DELAY60 60*20
+
+char ds2401[8]; /* global 8 byte buffer */
+int ds2401CRC; /* calculated checksum */
+
+/*
+ * ds2401Crc calculates the 2401 running checksum stored in the ds2401CRC
+ * global. The checksum polynomial is x^8 + x^5 + x^4 + 1.
+ */
+
+void ds2401Crc(int bit)
+{
+ int bit0 = ds2401CRC >> 7;
+ bit0 ^= bit;
+ bit0 &= 1;
+ ds2401CRC ^= (bit0 << 3) | (bit0 << 4);
+ ds2401CRC <<= 1;
+ ds2401CRC |= bit0;
+}
+
+/*
+ * ds2401Pulse emits the 2401 Master Reset Pulse, senses and returns the
+ * Presence Pulse from the 2401.
+ */
+
+int ds2401Pulse(void)
+{
+ int lockKey;
+ unsigned int presence;
+ void *vxImmr = (void *) vxImmrGet();
+ lockKey = intLock();
+ *PBPAR(vxImmr) &= ~DS2401BIT;
+ *PBDIR(vxImmr) &= ~DS2401BIT;
+ *PBODR(vxImmr) |= DS2401BIT;
+ *PBDAT(vxImmr) |= DS2401BIT;
+
+ *PBDIR(vxImmr) |= DS2401BIT;
+ *PBDAT(vxImmr) &= ~DS2401BIT;
+ DS2401DELAY(DS2401DELAY500);
+ *PBDAT(vxImmr) |= DS2401BIT;
+ *PBDIR(vxImmr) &= ~DS2401BIT;
+ DS2401DELAY(DS2401DELAY60);
+ presence = *PBDAT(vxImmr) & DS2401BIT; /* get the 2401 presence bit */
+ intUnlock(lockKey);
+ DS2401DELAY(DS2401DELAY500);
+ ds2401CRC = 0; /* clear the calculated CRC */
+ return presence;
+}
+
+/*
+ * ds2401WriteOne emits a 1 bit to the 2401.
+ */
+
+void ds2401WriteOne(void)
+{
+ int lockKey;
+ void *vxImmr = (void *) vxImmrGet();
+ lockKey = intLock();
+ *PBPAR(vxImmr) &= ~DS2401BIT;
+ *PBDIR(vxImmr) &= ~DS2401BIT;
+ *PBODR(vxImmr) |= DS2401BIT;
+ *PBDAT(vxImmr) |= DS2401BIT;
+
+ *PBDIR(vxImmr) |= DS2401BIT;
+ *PBDAT(vxImmr) &= ~DS2401BIT;
+ DS2401DELAY(DS2401DELAY5);
+ *PBDAT(vxImmr) |= DS2401BIT;
+ DS2401DELAY(DS2401DELAY150);
+ *PBDIR(vxImmr) &= ~DS2401BIT;
+ DS2401DELAY(DS2401DELAY15);
+ intUnlock(lockKey);
+}
+
+/*
+ * ds2401WriteZero emits a 0 bit to the 2401.
+ */
+
+void ds2401WriteZero(void)
+{
+ int lockKey;
+ void *vxImmr = (void *) vxImmrGet();
+ lockKey = intLock();
+ *PBPAR(vxImmr) &= ~DS2401BIT;
+ *PBDIR(vxImmr) &= ~DS2401BIT;
+ *PBODR(vxImmr) |= DS2401BIT;
+ *PBDAT(vxImmr) |= DS2401BIT;
+
+ *PBDIR(vxImmr) |= DS2401BIT;
+ *PBDAT(vxImmr) &= ~DS2401BIT;
+ DS2401DELAY(DS2401DELAY5);
+ *PBDAT(vxImmr) &= ~DS2401BIT;
+ DS2401DELAY(DS2401DELAY150);
+ *PBDIR(vxImmr) &= ~DS2401BIT;
+ DS2401DELAY(DS2401DELAY15);
+ intUnlock(lockKey);
+}
+
+/*
+ * ds2401Read reads and returns a single bit from the 2401.
+ */
+
+int ds2401Read(void)
+{
+ int lockKey;
+ int data;
+ void *vxImmr = (void *) vxImmrGet();
+ lockKey = intLock();
+ *PBPAR(vxImmr) &= ~DS2401BIT;
+ *PBDIR(vxImmr) &= ~DS2401BIT;
+ *PBODR(vxImmr) |= DS2401BIT;
+ *PBDAT(vxImmr) |= DS2401BIT;
+
+ *PBDIR(vxImmr) |= DS2401BIT;
+ *PBDAT(vxImmr) &= ~DS2401BIT;
+ DS2401DELAY(DS2401DELAY5);
+ *PBDAT(vxImmr) |= DS2401BIT;
+ *PBDIR(vxImmr) &= ~DS2401BIT;
+ DS2401DELAY(DS2401DELAY10);
+ data = *PBDAT(vxImmr) & DS2401BIT;
+ intUnlock(lockKey);
+ DS2401DELAY(DS2401DELAY150);
+ ds2401Crc(data); /* update running CRC */
+ return data;
+}
+
+/*
+ * ds2401ReadByte calls ds2401Read 8 times and aggregates the data to return a
+ * ds2401 byte.
+ */
+
+int ds2401ReadByte(void)
+{
+ int n, data, c;
+ c = 0;
+ for (n = 0; n < 8; n++)
+ {
+ data = ds2401Read();
+ c |= data << n;
+ }
+ return c;
+}
+
+/*
+ * ds2401Command will send the 8 bit cmd to the 2401, bit-by-bit.
+ */
+
+void ds2401Command(int cmd)
+{
+ int n;
+
+ for (n = 0; n < 8; n++, cmd >>= 1)
+ {
+ if (cmd & 1)
+ {
+ ds2401WriteOne();
+ } else {
+ ds2401WriteZero();
+ }
+ }
+}
+
+/*
+ * readDs2401 is the only external routine needed to be called. It will
+ * initialize the 8 byte ds2401 global buffer and the global ds2401CRC.
+ * If the first byte of ds2401 is 0x01, and ds2401CRC is zero, then the
+ * read operation was successful.
+ */
+
+void readDs2401(void)
+{
+ int n, data;
+ data = ds2401Pulse();
+#if 0
+ logMsg("Pulse returns %d\n", data, 0, 0, 0, 0, 0);
+#endif
+ ds2401Command(0x33);
+ for (n = 0; n < 8; n++)
+ {
+ data = ds2401ReadByte();
+#if 0
+ logMsg("ReadByte returns %02x\n", data, 0, 0, 0, 0, 0);
+#endif
+ ds2401[n] = data;
+ }
+#if 0
+ logMsg("CRC ---> %02x\n", ds2401CRC & 0xff, 0, 0, 0, 0, 0);
+#endif
+}
+
diff --git a/data/mnet/GP10/Host/Cdc_bsp/i2c.c b/data/mnet/GP10/Host/Cdc_bsp/i2c.c
new file mode 100644
index 0000000..d9119e7
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/i2c.c
@@ -0,0 +1,901 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/*
+JetCell modification history
+----------------------------
+99/07/12 ck Add I2Cread2 and I2Cwrite2. Perform read operation twice
+ on certain error to work around MPC860T bug.
+99/06/01 ck Initial Version
+*/
+
+/* i2c.c - I2C interface library */
+
+#include <vxWorks.h>
+#include <logLib.h>
+#include <taskLib.h>
+#include <intLib.h>
+#include <arch/ppc/vxPpcLib.h>
+#include <drv/multi/ppc860Cpm.h>
+#include <drv/multi/ppc860Siu.h>
+#include <arch/ppc/ivPpc.h>
+#include <drv/intrCtl/ppc860Intr.h>
+
+#include "i2c.h"
+
+/* Rx Buffer Area */
+int even_align; /* align buffer rxbuf on even boundary */
+unsigned char rxbuf[I2C_RX_LEN];
+
+/* Tx Buffer Area */
+unsigned char txbuf0[I2C_TX_LEN];
+unsigned char txbuf1[I2C_TX_LEN];
+
+
+/* vxWorks I2C communications semaphores */
+SEM_ID i2cIntSem; /* semaphore for task sychronization */
+SEM_ID i2cSem; /* semaphore for i2c read/write mutual exclusion */
+
+static unsigned int prevTxbEvCnt = 0;
+static unsigned int rxbEvCnt = 0;
+static unsigned int txbEvCnt = 0;
+static unsigned int txeEvCnt = 0;
+static unsigned int bsyEvCnt = 0;
+static unsigned int multEvCnt = 0;
+static unsigned int totEvCnt = 0;
+
+/*******************************************************************************
+i2cIntHandler - i2c Interrupt Handler
+
+Interrupt service routine for i2c interrupts.
+
+*/
+static void i2cIntHandler(void) {
+ void *vxImmr = (void *) vxImmrGet();
+ unsigned char cer, flag = 0;
+ STATUS status;
+ unsigned int eventChange = 0;
+
+ while ((cer = *I2CER(vxImmr)))
+ {
+ flag |= cer;
+ *I2CER(vxImmr) = cer;
+ }
+#ifdef notnow
+ logMsg("->%02x\n", flag, 0, 0, 0, 0, 0);
+#endif
+
+ totEvCnt++;
+
+ if (flag & 0x01) {
+ rxbEvCnt++;
+ eventChange++;
+ if ((status = semGive(i2cIntSem)) != OK) /* give the semaphore to wake
+ the blocked tasks */
+ {
+ logMsg("semGive on i2cIntSem returns ERROR %d\n", errno, 0, 0, 0, 0, 0);
+ }
+ }
+ if (flag & 0x02) {
+ txbEvCnt++;
+ eventChange++;
+ if ((status = semGive(i2cIntSem)) != OK) /* give the semaphore to wake
+ the blocked tasks */
+ {
+ logMsg("semGive on i2cIntSem returns ERROR %d\n", errno, 0, 0, 0, 0, 0);
+ }
+ }
+ if (flag & 0x04) {
+ bsyEvCnt++;
+ eventChange++;
+ }
+ if (flag & 0x10) {
+ txeEvCnt++;
+ eventChange++;
+ }
+
+ if (eventChange > 1)
+ multEvCnt++;
+}
+
+
+/*******************************************************************************
+bdGet
+
+Returns addres of Buffer Descriptors used for I2C operations
+*/
+
+static void *bdGet(void)
+{
+ void *vxImmr = (void *) vxImmrGet();
+ return ( void * ) ((unsigned char *)vxImmr + 0x2000 + 0x290);
+}
+
+
+/*******************************************************************************
+ * Function Name: I2Cinit
+ *
+ * Description: Setup I2C Controller as follows:
+ * 1) Master Operation Mode
+ * 2) Clock Filter OFF (recommended for RevA,B silicon)
+ * 3) **** I2C NOT Enabled ****
+ * 4) Clock Division factor 96 (260 KHz @ 25MHz)
+ *
+ */
+
+void I2Cinit( void )
+{
+ void *vxImmr = (void *) vxImmrGet();
+ RTXBD *rtx = ( RTXBD * ) bdGet();
+ /*
+ * Configure Port Pins
+ */
+
+ /*
+ * PB27: I2CSDA -- I2C Serial Data In/Out -- Tri-State/Pullup
+ * PB26: I2CSCL -- I2C Serial Clock -- Tri-State/Pullup
+ */
+
+ *PBPAR(vxImmr) |= (0x30);
+ *PBDIR(vxImmr) |= (0x30);
+ *PBODR(vxImmr) |= (0x30);
+
+ /* Set RXBD tbl start at Dual Port */
+ *I2C_RBASE(vxImmr) = (unsigned short) ((unsigned int) &(rtx->rxbd) & 0xffff);
+
+ /* Set TXBD tbl start at Dual Port */
+ *I2C_TBASE(vxImmr) = (unsigned short) ((unsigned int) &(rtx->txbd[0]) & 0xffff);
+
+ /*
+ * Issue Init RX & TX Parameters Command for I2C.
+ */
+
+ while( *CPCR(vxImmr) & CPM_CR_FLG ); /* SPIN UNTIL READY TO ISSUE COMMAND */
+ *CPCR(vxImmr) = CPM_CR_CHANNEL_I2C | CPM_CR_OPCODE_INIT_RT;
+ while( *CPCR(vxImmr) & CPM_CR_FLG ); /* SPIN UNTIL READY TO ISSUE COMMAND */
+ *CPCR(vxImmr) = CPM_CR_CHANNEL_I2C | CPM_CR_OPCODE_CLOSE;
+ while( *CPCR(vxImmr) & CPM_CR_FLG ); /* SPIN UNTIL COMMAND PROCESSED */
+
+ /* Initialize SDMA Configuration Register */
+ *SDCR(vxImmr) = 1;
+
+ /*
+ * Set RFCR,TFCR -- Rx,Tx Function Code
+ */
+
+ /* Normal Operation and Mot byte ordering */
+ *I2C_RFCR(vxImmr) = 0x10;
+
+ /* Mot byte ordering, Normal access */
+ *I2C_TFCR(vxImmr) = 0x10;
+
+ /*
+ * Set MRBLR -- Max. Receive Buffer Length
+ */
+
+ *I2C_MRBLR(vxImmr) = I2C_RX_LEN;
+ *I2C_RSTATE(vxImmr) = 0;
+ *I2C_RBPTR(vxImmr) = *I2C_RBASE(vxImmr);
+ *I2C_TSTATE(vxImmr) = 0;
+ *I2C_TBPTR(vxImmr) = *I2C_TBASE(vxImmr);
+
+ /*
+ * Initialize RxBD.
+ *
+ * Settings: Wrap, Interrupt
+ */
+
+ rtx->rxbd.bd_addr = rxbuf;
+ rtx->rxbd.bd_cstatus = 0x3000; /* Wrap, Interrupt */
+ rtx->rxbd.bd_length = 0;
+
+ /*
+ * Initialize TxBDs.
+ *
+ */
+
+ rtx->txbd[0].bd_addr = txbuf0;
+ rtx->txbd[0].bd_cstatus = 0;
+
+ rtx->txbd[1].bd_addr = txbuf1;
+ rtx->txbd[1].bd_cstatus = 0;
+
+ /*
+ * Setup MPC860 I2C address.
+ */
+
+ *I2ADD(vxImmr) = MPC860_I2C_ADDR;
+ /*
+ * Clear I2C Event Register by writing all 1's.
+ */
+
+ *I2CER(vxImmr) = ~0;
+
+ /*
+ * Set Master Mode in I2C Command Register
+ */
+
+ *I2COM(vxImmr) = 1;
+
+ /*
+ * Configure I2C Mode Register
+ *
+ * REVD=0 -- For Normal I2C operation the UM is incorrect.
+ * 0 is normal operation.
+ */
+
+ *I2MOD(vxImmr) = 0;
+
+ /*
+ * Set the I2C BRG Clock Division Factor
+ *
+ * NOTE: ** Assume MPC8XX Clock Frequency of 24MHz.
+ * NOTE: ** Assume that sccr dfbrg field == 0 (divide BRGCLK by 1) **
+ *
+ * AT24C01 Data Sheet indicates a maximum Serial Clock Frequency of
+ * 400 Khz at 5V operation. Thus, a total division factor of >= 60 is
+ * needed.
+ */
+
+ *I2MOD(vxImmr) |= (BAUD_PREDIV_AT24C01)<<1;
+ *I2MOD(vxImmr) |= 1; /* Enable I2C Operation */
+ *I2BRG(vxImmr) = BAUD_DIV_AT24C01;
+ i2cIntSem = 0;
+}
+
+
+/*******************************************************************************
+ * Function Name: I2CvxInit
+ *
+ * Description: Setup I2C Controller for vxWorks tasking environment:
+ * 1) Call I2Cinit
+ * 2) Create i2cIntSem semaphore
+ * 3) Setup I2c interrupt vectors
+ *
+ */
+
+STATUS I2CvxInit(void)
+{
+ void *vxImmr = (void *) vxImmrGet();
+ I2Cinit();
+ i2cIntSem = semCCreate(SEM_Q_FIFO, SEM_EMPTY);
+ if (i2cIntSem == NULL)
+ {
+ logMsg("ERROR cannot create i2cIntSem\n",0,0,0,0,0,0);
+ return ERROR;
+ }
+ i2cSem = semMCreate(SEM_Q_FIFO | SEM_DELETE_SAFE);
+ if (i2cSem == NULL)
+ {
+ logMsg("ERROR cannot create i2cSem\n",0,0,0,0,0,0);
+ return ERROR;
+ }
+ intConnect(IV_I2C, i2cIntHandler, 0);
+ *I2CMR(vxImmr) = 0x17;
+ *CIMR(vxImmr) |= CIMR_I2C;
+ return OK;
+}
+
+
+/*******************************************************************************
+ * I2Coperation -- Enable/Disable I2C Operation.
+ *
+ * Input Parameter: setting -- Disable I2C Operation iff == OFF;
+ * Enable I2C Operation iff == ON
+ *
+ * Note: Useful for reducing power consumption when access to I2C is not
+ * needed.
+ */
+
+void I2Coperation(setting)
+int setting;
+{
+#if 0 /* Disable turning on and off of I2C because it causes crashes from lack of Txb interrupt */
+ void *vxImmr = (void *) vxImmrGet();
+ if (setting == ON) {
+ *I2MOD(vxImmr) |= 1; /* Enable I2C Operation */
+ } else if (setting == OFF) {
+ *I2MOD(vxImmr) &= ~1; /* Disable I2C Operation */
+ }
+#endif
+}
+
+
+/*******************************************************************************
+ * RxBD -- Turn ON (Ready) or turn OFF (Disable) Receive Buffer Descriptor
+ * to receive data.
+ */
+
+void RxBD(setting)
+int setting;
+{
+ RTXBD *rtx = ( RTXBD * ) bdGet();
+
+ if(setting == ON)
+ rtx->rxbd.bd_cstatus |= RXBD_E; /* Ready */
+ else if(setting == OFF)
+ rtx->rxbd.bd_cstatus &= ~RXBD_E; /* Disable */
+}
+
+
+/*******************************************************************************
+ * TXBDcstatusInit -- Initialized Transmit Buffer Descriptor Control and
+ * Status Register.
+ *
+ * Description: Initialize Transmit Buffer Descriptor indexed by bd_indx
+ * with bd_flags value.
+ *
+ * Input Parameters: bdIndx -- Transmit Buffer Descriptor Index
+ * bdFlags -- Transmit Buffer Descriptor Flags Settings
+ *
+ */
+
+static void TXBDcstatusInit(bdIndx, bdFlags)
+int bdIndx, bdFlags;
+{
+ RTXBD *rtx = ( RTXBD * ) bdGet();
+
+ /* Initialize TX BD Control and Status Field */
+ rtx->txbd[bdIndx].bd_cstatus = bdFlags;
+}
+
+
+/*******************************************************************************
+ * I2CwriteArr -- Write array contents to Transmit Buffer Descriptor
+ *
+ * Description: Write len elements of tx_arr character array to transmit
+ * buffer descriptor indexed by bd_indx.
+ *
+ * Input Parameters: bd_indx -- Transmit Buffer Descriptor Index
+ * txArr -- Array of characters to be transmitted
+ * len -- Number (length) of characters to be transmitted
+ *
+ */
+
+static void I2CwriteArr(bdIndx, txArr, len)
+int bdIndx;
+unsigned char *txArr;
+int len;
+{
+ RTXBD *rtx = ( RTXBD * ) bdGet();
+ int i;
+
+ /* Transmit length in bytes */
+ rtx->txbd[bdIndx].bd_length = len;
+
+ /* Copy in bytes to be transmitted */
+ for (i = 0; i < len; i++) rtx->txbd[bdIndx].bd_addr[i] = txArr[i];
+
+ /* Ready to Transmit */
+ rtx->txbd[bdIndx].bd_cstatus |= TXBD_R;
+}
+
+
+/*******************************************************************************
+ * I2Ctransmit -- Start I2C Transmission
+ *
+ * Description: Initiate I2C Transmit, and check the number of Tx BDs
+ * specified.
+ *
+ * Input Parameter: numTxbds -- number of Tx BDs to be transmitted.
+ *
+ */
+
+static STATUS I2Ctransmit(numTxbds)
+int numTxbds;
+{
+ void *vxImmr = (void *) vxImmrGet();
+ RTXBD *rtx = ( RTXBD * ) bdGet();
+ int i;
+/* unsigned int n; */
+ STATUS status;
+
+ semTake(i2cIntSem, NO_WAIT);
+
+ *I2COM(vxImmr) |= 0x80; /* Transmit */
+
+ /* Spin until all transmit buffers used have finished transmitting */
+ for (i = 0; i < numTxbds; i++)
+ {
+#if 0
+ if (i2cIntSem == 0)
+ {
+ n = 0;
+ while(rtx->txbd[i].bd_cstatus & TXBD_R)
+ {
+ if (++n > LONGTIME)
+ {
+ logMsg("ERROR: Timeout waiting for TXBD_R\n", 0,0,0,0,0,0);
+ return -1;
+ }
+ }
+ }
+ else
+#endif
+ {
+ /* wait upto one second */
+ if ((status = semTake(i2cIntSem, 10 * sysClkRateGet())) != OK)
+ {
+ if (errno == S_objLib_OBJ_TIMEOUT)
+ logMsg("I2C transmit timed out %d curTxbds %d curTxbCnt %d prevTxbCnt %d\n", errno, i, txbEvCnt, prevTxbEvCnt, 0, 0);
+ else
+ logMsg("semTake on i2cIntSem in I2Ctransmit returns ERROR %d\n",
+ errno, 0, 0, 0, 0, 0);
+ return -1;
+ }
+
+ if (rtx->txbd[i].bd_cstatus & TXBD_R)
+ {
+ /* Note MPC860T bug:
+ After a not acknowledged read on I2C, this error is generated
+ on next acknowledged read.
+ */
+ logMsg("TXBD_R and i2cIntSem inconsistent\n", 0, 0, 0, 0, 0, 0);
+ return -2;
+ }
+ if (rtx->txbd[i].bd_cstatus & TXBD_N)
+ {
+ logMsg("No Acknowledge on I2C Transmit\n", 0, 0, 0, 0, 0, 0);
+ return -3;
+ }
+
+ }
+ }
+ return OK;
+}
+
+
+/*******************************************************************************
+ * readBD -- Retrieve characters from buffer descriptor starting with MS byte.
+ * Return number of characters read.
+ */
+
+static int readBD(unsigned char *chr, int numChars)
+{
+ RTXBD *rtx = ( RTXBD * ) bdGet();
+ int i;
+/* unsigned int n; */
+ STATUS status;
+
+ /* limit number of characters read by length of receive data buffer */
+ if (numChars > (rtx->rxbd.bd_length))
+ numChars = (rtx->rxbd.bd_length);
+
+ /* Wait until buffer is ready to read */
+#if 0
+ if (i2cIntSem == 0)
+ {
+ n = 0;
+ while(rtx->rxbd.bd_cstatus & RXBD_E)
+ {
+ if (++n > LONGTIME)
+ {
+ logMsg("ERROR: Timeout waiting for RXBD_E\n", 0,0,0,0,0,0);
+ return 0;
+ }
+ }
+ }
+ else
+#endif
+ {
+ /* wait upto one second */
+ if ((status = semTake(i2cIntSem, 10 * sysClkRateGet())) != OK)
+ {
+ if (errno == S_objLib_OBJ_TIMEOUT)
+ logMsg("I2C readBD timed out %d\n", errno, 0, 0, 0, 0, 0);
+ else
+ logMsg("semTake on i2cIntSem in readBD returns ERROR %d\n",
+ errno, 0, 0, 0, 0, 0);
+ return 0;
+ }
+
+ if (rtx->rxbd.bd_cstatus & RXBD_E)
+ {
+ logMsg("RXBD_E and i2cIntSem inconsistent\n", 0, 0, 0, 0, 0, 0);
+ return 0;
+ }
+ }
+
+ for(i = 0; i < numChars; i++)
+ chr[i] = rtx->rxbd.bd_addr[i];
+
+ return numChars;
+}
+
+
+/*******************************************************************************
+ * readRxBD -- Retrieve characters from receive buffer descriptor.
+ * Return number of characters read.
+ */
+
+int readRxBD(unsigned char *chr, int numChars)
+{
+ RTXBD *rtx = ( RTXBD * ) bdGet();
+ int i;
+
+ /* limit number of characters read by length of receive data buffer */
+ if (numChars > (rtx->rxbd.bd_length))
+ numChars = (rtx->rxbd.bd_length);
+
+
+ for(i = 0; i < numChars; i++)
+ chr[i] = rtx->rxbd.bd_addr[i];
+
+ return numChars;
+}
+
+
+
+
+/*******************************************************************************
+ * Function name: I2Cwrite
+ *
+ * Description: Transmit n Characters using I2C
+ *
+ * Input Parameters:
+ * *chr -- character array
+ * devAddr -- i2c slave device general address
+ * wAddr -- i2c slave device input port address
+ * numChars -- number of characters to be written
+ *
+ */
+
+STATUS I2Cwrite( chr, devAddr, wAddr, numChars )
+unsigned char *chr, devAddr, wAddr;
+int numChars;
+{
+ int i;
+ unsigned char txArr[I2C_TX_LEN]; /* assume numChars <= 126 */
+ STATUS status = ERROR;
+ int myOldTaskPriority;
+
+ /* prevent reentrancy to guard the resource */
+ if ((semTake(i2cSem, WAIT_FOREVER)) != OK)
+ {
+ logMsg("semTake returns ERROR %d\n", errno, 0, 0, 0, 0, 0);
+ return ERROR;
+ }
+
+ /* Set the task to very high priority while transmitting */
+ if (taskPriorityGet(taskIdSelf(),&myOldTaskPriority) != OK)
+ logMsg("I2Cwrite: taskPriorityGet failed \n",0,0,0,0,0,0);
+ if (taskPrioritySet(taskIdSelf(),0) != OK)
+ logMsg("I2Cwrite: taskPrioritySet 1 failed\n",0,0,0,0,0,0);
+
+ TXBDcstatusInit(TXBD_0, TXBD_W | TXBD_L | TXBD_I);
+
+ /*
+ * Transmit:
+ * 7-bit device address, write bit, and
+ * 8-bit word address, and
+ * character data
+ */
+
+ /* Store 7-bit device address and write-bit */
+ txArr[0] = (devAddr << 1) | WRITE_BIT;
+
+ /* Store 8-bit word address */
+ txArr[1] = wAddr;
+
+ /* Store num_chars characters */
+ for(i = 0; i < numChars; i++)
+ txArr[i + 2] = chr[i];
+
+ I2CwriteArr(TXBD_0, txArr, 2 + numChars);
+
+ /* Transmit Byte Write Message (single TXBD) */
+ if (I2Ctransmit(1) == OK)
+ status = OK;
+
+ /* Set the task back to old task priority */
+ if (taskPrioritySet(taskIdSelf(),myOldTaskPriority) != OK)
+ logMsg("I2Cwrite: taskPrioritySet myOldTaskPriority failed\n",0,0,0,0,0,0);
+
+ semGive(i2cSem);
+
+
+ return status;
+}
+
+
+/*******************************************************************************
+ * Function name: I2Cread
+ *
+ * Description: Issue current address read (random read) to get 4 characters
+ * from e2prom.
+ *
+ */
+
+STATUS I2Cread(outch, devAddr, wAddr, numChars)
+unsigned char *outch, devAddr, wAddr;
+int numChars;
+{
+ unsigned char txArr[I2C_RX_LEN]; /* assume numChars <= 127 */
+ STATUS status = ERROR;
+ int transmitStatus;
+ int n;
+ int myOldTaskPriority;
+
+ /* prevent reentrancy to guard the resource */
+ if ((semTake(i2cSem, WAIT_FOREVER)) != OK)
+ {
+ logMsg("semTake returns ERROR %d\n", errno, 0, 0, 0, 0, 0);
+ return ERROR;
+ }
+
+ prevTxbEvCnt = txbEvCnt;
+ /* Set the task to very high priority while transmitting */
+ if (taskPriorityGet(taskIdSelf(),&myOldTaskPriority) != OK)
+ logMsg("I2Cread: taskPriorityGet failed \n",0,0,0,0,0,0);
+ if (taskPrioritySet(taskIdSelf(),0) != OK)
+ logMsg("I2Cread: taskPrioritySet 1 failed\n",0,0,0,0,0,0);
+
+ /* On '-2' error perform the operation twice to work around */
+ for (transmitStatus = -2, n = 0; (transmitStatus == -2) && (n < 2); n++)
+ {
+ /* Ready Receive Buffer Descriptor */
+ RxBD(ON);
+
+ /*
+ * Step 1: Setup Dummy Write
+ * Configure Tx BD 0 for Interrupt
+ * Byte0: Device Address with Write Bit
+ * Byte1: Word Address
+ */
+
+ TXBDcstatusInit(TXBD_0, TXBD_I);
+
+ /* Store 7-bit device address and write-bit */
+ txArr[0] = (devAddr << 1) | WRITE_BIT;
+
+ /* Store word address */
+ txArr[1] = wAddr;
+
+ /* Store Dummy Write in Tx BD 0 */
+ I2CwriteArr (TXBD_0, txArr, 2);
+
+ /*
+ * Step 2: Setup Read Request
+ * Configure Tx BD 1 for: Wrap, Interrupt, Last, Start bits
+ * Byte0: Device Address and Read Bit
+ * numChars: Unintialized Dummy Bytes to Toggle Serial Clock during Read
+ */
+
+ TXBDcstatusInit(TXBD_1, TXBD_W | TXBD_I | TXBD_S | TXBD_L);
+
+ /* Store 7-bit device address and write-bit */
+ txArr[0] = (devAddr << 1) | READ_BIT;
+
+ /* Store Read Request in Tx BD 1 */
+ I2CwriteArr(TXBD_1, txArr, 1 + numChars);
+
+ /* Transmit Random Read Message: Dummy Write + Read Request */
+ if ((transmitStatus = I2Ctransmit(2)) == OK)
+ {
+ /* Read Data */
+ if (readBD(outch, numChars) == numChars)
+ status = OK;
+ }
+ else
+ logMsg("I2Cread: I2Ctransmit returned error\n",0,0,0,0,0,0);
+ }
+
+ /* Set the task back to old task priority */
+ if (taskPrioritySet(taskIdSelf(),myOldTaskPriority) != OK)
+ logMsg("I2Cread: taskPrioritySet myOldTaskPriority failed\n",0,0,0,0,0,0);
+
+ semGive(i2cSem);
+
+ return status;
+}
+
+
+/*******************************************************************************
+ * Function name: I2Cwrite2
+ *
+ * Description: Transmit n Characters using I2C
+ *
+ * Input Parameters:
+ * *chr -- character array
+ * devAddr -- i2c slave device general address
+ * numChars -- number of characters to be written
+ *
+ */
+
+STATUS I2Cwrite2( chr, devAddr, numChars )
+unsigned char *chr, devAddr;
+int numChars;
+{
+ int i;
+ unsigned char txArr[I2C_TX_LEN]; /* assume numChars <= 126 */
+ STATUS status = ERROR;
+ int myOldTaskPriority;
+
+ /* prevent reentrancy to guard the resource */
+ if ((semTake(i2cSem, WAIT_FOREVER)) != OK)
+ {
+ logMsg("semTake returns ERROR %d\n", errno, 0, 0, 0, 0, 0);
+ return ERROR;
+ }
+
+ /* Set the task to very high priority while transmitting */
+ if (taskPriorityGet(taskIdSelf(),&myOldTaskPriority) != OK)
+ logMsg("I2Cwrite: taskPriorityGet failed \n",0,0,0,0,0,0);
+ if (taskPrioritySet(taskIdSelf(),0) != OK)
+ logMsg("I2Cwrite: taskPrioritySet 1 failed\n",0,0,0,0,0,0);
+
+ TXBDcstatusInit(TXBD_0, TXBD_W | TXBD_L | TXBD_I);
+
+ /*
+ * Transmit:
+ * 7-bit device address, write bit, and
+ * character data
+ */
+
+ /* Store 7-bit device address and write-bit */
+ txArr[0] = (devAddr << 1) | WRITE_BIT;
+
+ /* Store num_chars characters */
+ for(i = 0; i < numChars; i++)
+ txArr[i + 1] = chr[i];
+
+ I2CwriteArr(TXBD_0, txArr, 1 + numChars);
+
+ /* Transmit Byte Write Message (single TXBD) */
+ if (I2Ctransmit(1) == OK)
+ status = OK;
+
+ /* Set the task back to old task priority */
+ if (taskPrioritySet(taskIdSelf(),myOldTaskPriority) != OK)
+ logMsg("I2Cwrite: taskPrioritySet myOldTaskPriority failed\n",0,0,0,0,0,0);
+
+ semGive(i2cSem);
+
+ return status;
+}
+
+
+/*******************************************************************************
+ * Function name: I2Cread2
+ *
+ * Description: Issue current address read (random read) to get 4 characters
+ * from e2prom.
+ *
+ */
+
+STATUS I2Cread2(outch, devAddr, numChars)
+unsigned char *outch, devAddr;
+int numChars;
+{
+ unsigned char txArr[I2C_RX_LEN]; /* assume numChars <= 127 */
+ STATUS status = ERROR;
+ int transmitStatus;
+ int n;
+ int myOldTaskPriority;
+
+ /* prevent reentrancy to guard the resource */
+ if ((semTake(i2cSem, WAIT_FOREVER)) != OK)
+ {
+ logMsg("semTake returns ERROR %d\n", errno, 0, 0, 0, 0, 0);
+ return ERROR;
+ }
+
+ /* Set the task to very high priority while transmitting */
+ if (taskPriorityGet(taskIdSelf(),&myOldTaskPriority) != OK)
+ logMsg("I2Cwrite: taskPriorityGet failed \n",0,0,0,0,0,0);
+ if (taskPrioritySet(taskIdSelf(),0) != OK)
+ logMsg("I2Cwrite: taskPrioritySet 1 failed\n",0,0,0,0,0,0);
+
+ /* On '-2' error perform the operation twice to work around */
+ for (transmitStatus = -2, n = 0; (transmitStatus == -2) && (n < 2); n++)
+ {
+ /* Ready Receive Buffer Descriptor */
+ RxBD(ON);
+
+ /*
+ * Setup Read Request
+ * Configure Tx BD 0 for: Wrap, Interrupt, Last, Start bits
+ * Byte0: Device Address and Read Bit
+ * numChars: Unintialized Dummy Bytes to Toggle Serial Clock during Read
+ */
+
+ TXBDcstatusInit(TXBD_0, TXBD_W | TXBD_I | TXBD_S | TXBD_L);
+
+ /* Store 7-bit device address and write-bit */
+ txArr[0] = (devAddr << 1) | READ_BIT;
+
+ /* Store Read Request in Tx BD 0 */
+ I2CwriteArr(TXBD_0, txArr, 1 + numChars);
+
+ /* Transmit Random Read Message: Read Request */
+ if ((transmitStatus = I2Ctransmit(1)) == OK)
+ {
+ /* Read Data */
+ if (readBD(outch, numChars) == numChars)
+ status = OK;
+ }
+ }
+
+ /* Set the task back to old task priority */
+ if (taskPrioritySet(taskIdSelf(),myOldTaskPriority) != OK)
+ logMsg("I2Cwrite: taskPrioritySet myOldTaskPriority failed\n",0,0,0,0,0,0);
+
+/* taskDelay(10); */
+ semGive(i2cSem);
+/* return OK; */
+/*
+ if (outch[0] != '*')
+ printf("I2Cread2: %c,%c,%c,%c\n",outch[0],outch[1],outch[2],outch[3]);
+*/
+ return status;
+}
+
+
+void dumpI2CBD(void)
+{
+ RTXBD *rtx = ( RTXBD * ) bdGet();
+ int i;
+
+ printf("\nRx buffer\n");
+ printf("---------\n");
+ printf("Status(%x)\n", rtx->rxbd.bd_cstatus);
+ printf("Buffer : ");
+ for(i = 0; i < rtx->rxbd.bd_length; i++)
+ printf("%#04x ", rtx->rxbd.bd_addr[i]);
+
+ printf("\n\nTx buffer 0\n");
+ printf("-------------\n");
+ printf("Status(%x)\n", rtx->txbd[0].bd_cstatus);
+ printf("Buffer : ");
+ for(i = 0; i < rtx->txbd[0].bd_length; i++)
+ printf("%#04x ", rtx->txbd[0].bd_addr[i]);
+
+ printf("\n\nTx buffer 1\n");
+ printf("-------------\n");
+ printf("Status(%x)\n", rtx->txbd[1].bd_cstatus);
+ printf("Buffer : ");
+ for(i = 0; i < rtx->txbd[1].bd_length; i++)
+ printf("%#04x ", rtx->txbd[1].bd_addr[i]);
+ printf("\n");
+}
+
+void dumpI2CRegs(void)
+{
+ void *vxImmr = (void *) vxImmrGet();
+
+ printf("I2C Registers\n");
+ printf("-------------\n");
+ printf("I2MOD(%#x)\n", *I2MOD(vxImmr));
+ printf("I2ADD(%#x)\n", *I2ADD(vxImmr));
+ printf("I2BRG(%#x)\n", *I2BRG(vxImmr));
+ printf("I2COM(%#x)\n", *I2COM(vxImmr));
+ printf("I2CER(%#x)\n", *I2CER(vxImmr));
+ printf("I2CMR(%#x)\n", *I2CMR(vxImmr));
+ printf("I2C_RBASE(%#x)\n", *I2C_RBASE(vxImmr));
+ printf("I2C_TBASE(%#x)\n", *I2C_TBASE(vxImmr));
+ printf("I2C_RFCR(%#x)\n", *I2C_RFCR(vxImmr));
+ printf("I2C_TFCR(%#x)\n", *I2C_TFCR(vxImmr));
+ printf("I2C_MRBLR(%#x)\n", *I2C_MRBLR(vxImmr));
+ printf("I2C_RSTATE(%#x)\n", *I2C_RSTATE(vxImmr));
+ printf("I2C_RBPTR(%#x)\n", *I2C_RBPTR(vxImmr));
+ printf("I2C_TSTATE(%#x)\n", *I2C_TSTATE(vxImmr));
+ printf("I2C_TBPTR(%#x)\n", *I2C_TBPTR(vxImmr));
+}
+
+void dumpI2CCnts()
+{
+ printf("I2C Counters\n");
+ printf("---------------\n");
+ printf("rxbEvCnt %d\n", rxbEvCnt);
+ printf("txbEvCnt %d\n", txbEvCnt);
+ printf("txeEvCnt %d\n", txeEvCnt);
+ printf("bsyEvCnt %d\n", bsyEvCnt);
+ printf("multEvCnt %d\n", multEvCnt);
+ printf("totEvCnt %d\n", totEvCnt);
+ printf("prevTxbEvCnt %d\n", prevTxbEvCnt);
+}
+
diff --git a/data/mnet/GP10/Host/Cdc_bsp/i2c.h b/data/mnet/GP10/Host/Cdc_bsp/i2c.h
new file mode 100644
index 0000000..f1c1d13
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/i2c.h
@@ -0,0 +1,138 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/*
+JetCell modification history
+----------------------------
+99/06/01 ck Initial Version
+*/
+
+/*
+ * File name : i2c.h
+ * Description : Constants and Definitions for I2C
+ * History:
+ *
+ * 06-19-97 stu Initial Version
+ *
+ */
+
+#ifndef _I2C_H
+#define _I2C_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ==================== GENERAL CONSTANTS AND DEFINITIONS =============== */
+
+#define TRUE 1
+#define FALSE 0
+
+#define ON 1
+#define OFF 0
+
+/* ================== APPLICATION CONSTANTS AND DEFINITIONS =============== */
+#define I2C_BASE 0x3c80
+#define RPBASE I2C_BASE
+
+#define I2C_RBASE(base) (CAST(VUINT16 *) (base + RPBASE + 0x00))
+#define I2C_TBASE(base) (CAST(VUINT16 *) (base + RPBASE + 0x02))
+#define I2C_RFCR(base) (CAST(VUINT8 *) (base + RPBASE + 0x04))
+#define I2C_TFCR(base) (CAST(VUINT8 *) (base + RPBASE + 0x05))
+#define I2C_MRBLR(base) (CAST(VUINT16 *) (base + RPBASE + 0x06))
+#define I2C_RSTATE(base) (CAST(VUINT32 *) (base + RPBASE + 0x08))
+#define I2C_RBPTR(base) (CAST(VUINT16 *) (base + RPBASE + 0x10))
+#define I2C_TSTATE(base) (CAST(VUINT32 *) (base + RPBASE + 0x18))
+#define I2C_TBPTR(base) (CAST(VUINT16 *) (base + RPBASE + 0x20))
+
+/*
+ * Definitions for ATMEL AT24C01 EEPROM
+ */
+
+/* Hard-wired E2PROM Address -- Determined by Board Designer */
+#define E2PROM_ADDR (0x50)
+
+/* MPC860 I2C address */
+#define MPC860_I2C_ADDR (0x66)
+
+/*
+ * AT24C01 EEPROM Data Sheet specifies a maximum serial clock frequency
+ * of 400 KHz
+ *
+ * ==> Provide an overal clock divider of >=60 for 24MHz System Clock
+ */
+#define BAUD_PREDIV_AT24C01 (0x0)
+#define BAUD_DIV_AT24C01 (0x10)
+#define LONGTIME 0x00100000
+
+/* ----------------------------------------------------------------- */
+
+/* Transmit Buffer Descriptor Indices */
+#define TXBD_0 0
+#define TXBD_1 1
+
+/* I2C Read/Write Bit Definitions */
+#define WRITE_BIT (0) /* write from mpc821 to eeprom */
+#define READ_BIT (1) /* read from eeprom to mpc821 */
+
+/* Transmit Buffer Descriptor Control and Status Bit Definitions */
+#define TXBD_R (0x8000)
+#define TXBD_W (0x2000)
+#define TXBD_I (0x1000)
+#define TXBD_L (0x0800)
+#define TXBD_S (0x0400)
+#define TXBD_N (0x0004)
+
+/* Receive Buffer Descriptor Control and Status Bit Definitions */
+#define RXBD_E (0x8000)
+
+/* Interrupt Level */
+#define INTERRUPT_LEVEL (4)
+
+/* SIU Vector Interrupt Code: Level 4 */
+#define IC_LEVEL_4 (0x24)
+
+/* I2C Bit in CPM In-Service Interrupt Register */
+#define I2C_INTERRUPT (1<<16)
+
+/* I2C Interrupt Vector Code in CPM Vector Register (CIVR) */
+#define I2C_VECTOR (0x10)
+
+/* Address of I2C Condition Flag */
+#define I2C_FLAG_LOC (0x50000)
+
+#define I2C_RX_LEN (512) /* Rx Maximum characters */
+#define I2C_TX_LEN (512) /* Tx Maximum characters */
+
+/*
+ * Buffer Descriptor Format
+ */
+
+typedef struct I2C_BufferDescriptor {
+ unsigned short bd_cstatus; /* control and status */
+ unsigned short bd_length; /* transfer length */
+ unsigned char *bd_addr; /* Pointer to Buffer */
+} I2C_BD;
+
+typedef struct rx_tx_bd {
+ I2C_BD rxbd;
+ I2C_BD txbd[2];
+} RTXBD;
+
+extern STATUS I2Cwrite(unsigned char*, unsigned char, unsigned char, int);
+extern STATUS I2Cread(unsigned char*, unsigned char, unsigned char, int);
+extern STATUS I2Cwrite2(unsigned char*, unsigned char, int);
+extern STATUS I2Cread2(unsigned char*, unsigned char, int);
+extern void I2Coperation(int);
+extern void RxBD(int);
+extern int readRxBD(unsigned char *, int);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _I2C_H */
diff --git a/data/mnet/GP10/Host/Cdc_bsp/nvRam.c b/data/mnet/GP10/Host/Cdc_bsp/nvRam.c
new file mode 100644
index 0000000..710e6ad
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/nvRam.c
@@ -0,0 +1,750 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/*
+JetCell modification history
+----------------------------
+99/06/01 ck Initial Version
+*/
+
+/* nvRam.c - non-volatile RAM library */
+
+/*
+DESCRIPTION
+This library contains non-volatile RAM manipulation routines for targets
+with non-volatile RAM. Read and write routines that return ERROR
+are included.
+*/
+
+#include <vxWorks.h>
+#include <logLib.h>
+#include <taskLib.h>
+#include <tickLib.h>
+#include "nvRam.h"
+#include "bootFlash.h"
+
+/******************************************************************************
+*
+* The boot flash is broken down into the following sections:
+*
+*
+* +----------------------+ flash start - 0x20000000
+* | |
+* | |
+* | vxWorks Boot Code |
+* | |
+* | |
+* | |
+* | |
+* | |
+* | |
+* | |
+* | |
+* | |
+* / +----------------------+ BOOT_PARAM_SECT_OFFSET
+* / | Boot Parameters |
+* | | |
+* | +----------------------+ ETHERNET_SECT_OFFSET
+* | | Ethernet address |
+* | | |
+* | +----------------------+ VC_SN_SECT_OFFSET
+* \ | VC / CDC |
+* / | serial/ Part number |
+* NV_RAM \ +----------------------+ PON_TEST_CONFIG_OFFSET
+* / | Power on test config |
+* | | |
+* | +----------------------+ RADIO_BOARD_EEPROM
+* | | Radio Board Eeprom |
+* | | |
+* | +----------------------+ CLOCK_BOARD_EEPROM
+* | | Clock Board Eeprom |
+* | | |
+* | +----------------------+
+* | | |
+* | | Unused |
+* | | Sectors |
+* \ | |
+* \ +----------------------+ flash end - 0x203fffff
+*
+*
+* The section of flash is dedicated to be used for the vxWorks boot code. The
+* next section is non-volatile RAM. NVRam is used to store various pieces
+* of information unique to a ViperCell.
+*/
+
+/* Sector offsets in nvRam */
+#define BOOT_PARAM_SECT_OFFSET 0
+#define ETHERNET_SECT_OFFSET 1
+#define VC_SN_SECT_OFFSET 2
+#define PON_TEST_CONFIG_OFFSET 3
+#define RADIO_BOARD_EEPROM 4
+#define CLOCK_BOARD_EEPROM 5
+
+/* Power on test offsets withing the power on test configuration sector */
+#define POST_RESULT_OFFSET 0
+#define POST_MASK_OFFSET 4
+
+/* Total size in bytes used in the power on test configuration secotr */
+#define POST_SIZE 8
+
+/* Definitions for serial / Part number sector */
+#define SER_PART_DATA_TYPES 4 /* 4: VC serial num, VC part num, CDC serial num, CDC part num */
+#define SER_PART_DATA_SIZE 100
+#define SER_PART_TOTAL_SIZE (SER_PART_DATA_TYPES * SER_PART_DATA_SIZE)
+
+enum SerialPartDataType
+{
+ ViperCellSerialNum = 0,
+ ViperCellPartNum = 1,
+ CdcSerialNum = 2,
+ CdcPartNum = 3
+};
+
+
+/******************************************************************************
+*
+* sysNvRamGet - get the contents of non-volatile RAM
+*
+* This routine copies the contents of non-volatile memory into a specified
+* string. The string is terminated with an EOS.
+*
+* RETURNS: OK, ERROR.
+*
+* SEE ALSO: sysNvRamSet()
+*/
+
+STATUS sysNvRamGet
+(
+ char *string, /* where to copy non-volatile RAM */
+ int strLen, /* maximum number of bytes to copy */
+ int offset /* byte offset into non-volatile RAM */
+)
+{
+ int n;
+ for (n = 0; n < strLen; n++)
+ {
+ string[n] = *((unsigned char *)ROM_BASE_ADRS +
+ (flashGetNumSect() - NV_RAM_SECT_FROM_END) * flashGetSectSize() +
+ offset + n);
+ }
+ return (OK);
+}
+
+/*******************************************************************************
+*
+* sysNvRamSet - write to non-volatile RAM
+*
+* This routine copies a specified string into non-volatile RAM.
+*
+* NOTE: Entire sectors will be erased as needed to write the data.
+*
+* RETURNS: OK, ERROR.
+*
+* SEE ALSO: sysNvRamGet()
+*/
+
+STATUS sysNvRamSet
+(
+ char *string, /* string to be copied into non-volatile RAM */
+ int strLen, /* maximum number of bytes to copy */
+ int offset /* byte offset into non-volatile RAM */
+)
+{
+ return (flashProgram(ROM_BASE_ADRS + (flashGetNumSect() - NV_RAM_SECT_FROM_END) *
+ flashGetSectSize() + offset, string, strLen));
+}
+
+/*******************************************************************************
+*
+* sysEnetAddrGet
+*
+* This routine gets the Ethernet address from non-volatile RAM.
+*
+* RETURNS: OK, ERROR.
+*
+* SEE ALSO: sysNvRamGet()
+*/
+
+STATUS sysEnetAddrGet
+(
+ int unitNum,
+ char *p
+)
+{
+ return sysNvRamGet(p, 6, flashGetSectSize() * ETHERNET_SECT_OFFSET);
+}
+
+/*******************************************************************************
+*
+* sysEnetAddrSet
+*
+* This routine sets the Ethernet address into non-volatile RAM.
+*
+* RETURNS: OK, ERROR, always.
+*
+* SEE ALSO: sysNvRamSet()
+*/
+
+STATUS sysEnetAddrSet
+(
+ char a0,
+ char a1,
+ char a2,
+ char a3,
+ char a4,
+ char a5
+)
+{
+ char p[] = {a5, a4, a3, a2, a1, a0};
+ return sysNvRamSet(p, 6, flashGetSectSize() * ETHERNET_SECT_OFFSET);
+}
+
+
+
+/*******************************************************************************
+*
+* sysIpAddrSet
+*
+* This routine sets the ip address in the boot string stored in non-volatile RAM.
+* It also sets the ip address in the vipercell.cfg file if one is found.
+*
+* RETURNS: OK, ERROR, always.
+*
+* SEE ALSO: sysNvRamSet()
+*/
+
+STATUS sysIpAddrSet
+(
+ char *ipAddr
+)
+{
+ BOOT_PARAMS bootParams;
+ int fd;
+ char fileName[256];
+ STATUS stat;
+
+ stat = OK;
+
+ /* Get the current boot parameters */
+ bootStringToStruct(BOOT_LINE_ADRS, &bootParams);
+
+ /* Save ip address in non-volitile RAM. */
+ if (ipAddr)
+ {
+ strcpy (bootParams.ead, ipAddr);
+ bootStructToString (BOOT_LINE_ADRS, &bootParams);
+ if ((stat = sysNvRamSet (BOOT_LINE_ADRS, strlen (BOOT_LINE_ADRS) + 1, 0) == OK))
+ {
+ /* If we booted from flash and vipercell.cfg exists then change the ip */
+ /* address there as well. */
+ if (strncmp (bootParams.bootDev, "ata", 3) == 0)
+ {
+ strcpy(fileName, getenv("VIPERCALL_BASE"));
+ strcat(fileName, "/vipercell.cfg");
+
+ if ((fd = open (fileName, O_RDWR, 0)) != ERROR)
+ {
+ close(fd);
+ unlink(fileName);
+ if ((fd = creat(fileName, O_WRONLY)) != ERROR)
+ {
+ fdprintf(fd, "[inet_on_ethernet]\n");
+ fdprintf(fd, "%s\n", ipAddr);
+ close(fd);
+ }
+ }
+ }
+ }
+ }
+
+
+ return (stat);
+}
+
+
+/*******************************************************************************
+*
+* sysIpAddrGet
+*
+* This routine gets the ip address from the boot string stored in non-volatile RAM.
+*
+* RETURNS: OK, ERROR, always.
+*
+* SEE ALSO: sysNvRamSet()
+*/
+
+STATUS sysIpAddrGet
+(
+ char *ipAddr
+)
+{
+ BOOT_PARAMS bootParams;
+ STATUS stat;
+
+ stat = OK;
+
+ /* Get the current boot parameters */
+ bootStringToStruct(BOOT_LINE_ADRS, &bootParams);
+
+ /* Save ip address in non-volitile RAM. */
+ strncpy (ipAddr, bootParams.ead, 32);
+
+ return (stat);
+}
+
+
+/*******************************************************************************
+sysSerialPartDataSet
+
+Common function to set ViperCell/CDC serial numbers and part numbers
+*/
+
+static STATUS sysSerialPartDataSet
+ (
+ enum SerialPartDataType dataType,
+ char* data
+ )
+{
+ STATUS retStat = ERROR;
+
+ char buff[SER_PART_TOTAL_SIZE];
+
+ if (sysNvRamGet(buff, SER_PART_TOTAL_SIZE, flashGetSectSize() * VC_SN_SECT_OFFSET) == OK)
+ {
+ memcpy(&buff[SER_PART_DATA_SIZE * dataType], data, min(strlen(data) + 1, SER_PART_DATA_SIZE));
+ retStat = sysNvRamSet(buff, SER_PART_TOTAL_SIZE, flashGetSectSize() * VC_SN_SECT_OFFSET);
+ }
+ return retStat;
+}
+
+/*******************************************************************************
+sysSerialPartDataGet
+
+Common function to get ViperCell/CDC serial numbers and part numbers
+*/
+static STATUS sysSerialPartDataGet
+ (
+ enum SerialPartDataType dataType, /* type of data to get*/
+ char* data, /* where to put the data */
+ int len /* no. of bytes to read */
+ )
+{
+ STATUS retStat;
+
+ int offset = SER_PART_DATA_SIZE * dataType;
+
+ retStat = sysNvRamGet(data, len,
+ (flashGetSectSize() * VC_SN_SECT_OFFSET) + offset);
+ return retStat;
+}
+
+/*******************************************************************************
+*
+* sysSerialNumGet
+*
+* This routine gets the ViperCell serial number from non-volatile RAM. The pointer 'p'
+* should be of atleast size MAX_VC_SN.
+*
+* RETURNS: OK, ERROR.
+*
+* SEE ALSO: sysNvRamGet()
+*/
+
+STATUS sysSerialNumGet
+(
+ char *p
+)
+{
+ return sysSerialPartDataGet(ViperCellSerialNum, p, MAX_VC_SN);
+}
+
+
+/*******************************************************************************
+*
+* sysSerialNumShow
+*
+* This routine gets ViperCell the serial number from non-volatile RAM and displays it.
+*
+* RETURNS: OK, ERROR.
+*
+* SEE ALSO: sysNvRamGet()
+*/
+
+void sysSerialNumShow()
+{
+ char p[MAX_VC_SN];
+
+ sysSerialNumGet(p);
+ p[MAX_VC_SN-1] = 0;
+ printf ("System Serial Number: %s\n", p);
+}
+
+
+/*******************************************************************************
+*
+* sysSerialNumSet
+*
+* This routine sets the ViperCell serial number into non-volatile RAM.
+*
+* RETURNS: OK, ERROR, always.
+*
+* SEE ALSO: sysNvRamSet()
+*/
+
+STATUS sysSerialNumSet
+(
+ char *sn
+)
+{
+ return sysSerialPartDataSet(ViperCellSerialNum, sn);
+}
+
+
+/*******************************************************************************
+sysVCPartNumSet
+
+Sets the ViperCell part number into the non-volatile memory
+*/
+
+STATUS sysVCPartNumSet(char* partNum)
+{
+ return sysSerialPartDataSet(ViperCellPartNum, partNum);
+}
+
+/*******************************************************************************
+sysVCPartNumGet
+
+Gets the ViperCell part number from the non-volatile memory
+*/
+STATUS sysVCPartNumGet(char* partNum)
+{
+ return sysSerialPartDataGet(ViperCellPartNum, partNum, MAX_VC_PN);
+}
+
+
+/*******************************************************************************
+sysVCPartNumShow
+
+Prints the ViperCell part number
+*/
+void sysVCPartNumShow()
+{
+ char data[SER_PART_DATA_SIZE];
+
+ sysVCPartNumGet(data);
+ data[SER_PART_DATA_SIZE -1] = 0;
+ printf("System Part Number: %s\n", data);
+}
+
+/*******************************************************************************
+sysCDCSerialNumSet
+
+Sets the CDC serial number into the non-volatile memory
+*/
+
+STATUS sysCDCSerialNumSet(char* serNum)
+{
+ return sysSerialPartDataSet(CdcSerialNum, serNum);
+}
+
+/*******************************************************************************
+sysCDCSerialNumGet
+
+Gets the CDC serial number from the non-volatile memory
+*/
+STATUS sysCDCSerialNumGet(char* serNum)
+{
+ return sysSerialPartDataGet(CdcSerialNum, serNum, MAX_CDC_SN);
+}
+
+
+/*******************************************************************************
+sysCDCSerialNumShow
+
+Prints the CDC serial number
+*/
+void sysCDCSerialNumShow()
+{
+ char data[SER_PART_DATA_SIZE];
+
+ sysCDCSerialNumGet(data);
+ data[SER_PART_DATA_SIZE -1] = 0;
+ printf("CDC Serial Number: %s\n", data);
+}
+
+
+/*******************************************************************************
+sysCDCPartNumSet
+
+Sets the CDC part number into the non-volatile memory
+*/
+
+STATUS sysCDCPartNumSet(char* partNum)
+{
+ return sysSerialPartDataSet(CdcPartNum, partNum);
+}
+
+/*******************************************************************************
+sysCDCPartNumGet
+
+Gets the CDC part number from the non-volatile memory
+*/
+STATUS sysCDCPartNumGet(char* partNum)
+{
+ return sysSerialPartDataGet(CdcPartNum, partNum, MAX_CDC_PN);
+}
+
+
+/*******************************************************************************
+sysCDCPartNumShow
+
+Prints the CDC part number
+*/
+void sysCDCPartNumShow()
+{
+ char data[SER_PART_DATA_SIZE];
+
+ sysCDCPartNumGet(data);
+ data[SER_PART_DATA_SIZE -1] = 0;
+ printf("CDC Part Number: %s\n", data);
+}
+
+
+/*******************************************************************************
+*
+* postSetTestResult
+*
+* This routine sets a power on test result into non-volatile RAM.
+*
+* RETURNS: OK, ERROR, always.
+*/
+
+STATUS postSetTestResult (unsigned int testBit, unsigned int result)
+{
+ char saveBuf[POST_SIZE];
+
+ sysNvRamGet (saveBuf, POST_SIZE, flashGetSectSize() * PON_TEST_CONFIG_OFFSET);
+
+ if (result == POST_PASS)
+ {
+ (*(unsigned int *)(saveBuf + POST_RESULT_OFFSET)) |= (testBit);
+ }
+ else
+ {
+ (*(unsigned int *)(saveBuf + POST_RESULT_OFFSET)) &= (~testBit);
+ }
+
+ return sysNvRamSet (saveBuf, POST_SIZE, flashGetSectSize() * PON_TEST_CONFIG_OFFSET);
+}
+
+
+/*******************************************************************************
+*
+* postGetTestResult
+*
+* This routine gets a power on test result from non-volatile RAM.
+*
+* RETURNS: POST_PASS or POST_FAIL.
+*/
+
+unsigned int postGetTestResult (unsigned int testBit)
+{
+ char saveBuf[POST_SIZE];
+
+ sysNvRamGet (saveBuf, POST_SIZE, flashGetSectSize() * PON_TEST_CONFIG_OFFSET);
+
+ return ((*(unsigned int *)(saveBuf + POST_RESULT_OFFSET)) & testBit);
+}
+
+
+
+/*******************************************************************************
+*
+* postSetTestMask
+*
+* This routine sets a power on test mask into non-volatile RAM.
+*
+* RETURNS: OK, ERROR, always.
+*/
+
+STATUS postSetTestMask (unsigned int testBit, unsigned int mask)
+{
+ char saveBuf[POST_SIZE];
+
+ sysNvRamGet (saveBuf, POST_SIZE, flashGetSectSize() * PON_TEST_CONFIG_OFFSET);
+
+ if (mask == POST_ENABLE_TEST)
+ {
+ *(unsigned int *)(saveBuf + POST_MASK_OFFSET) |= (testBit);
+ }
+ else
+ {
+ *(unsigned int *)(saveBuf + POST_MASK_OFFSET) &= (~testBit);
+ }
+
+ return sysNvRamSet (saveBuf, POST_SIZE, flashGetSectSize() * PON_TEST_CONFIG_OFFSET);
+}
+
+
+/*******************************************************************************
+*
+* postGetTestMask
+*
+* This routine gets a power on test mask from non-volatile RAM.
+*
+* RETURNS: POST_PASS or POST_FAIL.
+*/
+
+unsigned int postGetTestMask (unsigned int testBit)
+{
+ char saveBuf[POST_SIZE];
+
+ sysNvRamGet (saveBuf, POST_SIZE, flashGetSectSize() * PON_TEST_CONFIG_OFFSET);
+
+ return ((*(unsigned int *)(saveBuf + POST_MASK_OFFSET) & testBit));
+}
+
+
+
+/*******************************************************************************
+*
+* sysRadioBoardEepromGet
+*
+* This routine gets the saved EEPROM data for the radio board.
+*
+* RETURNS: OK, ERROR.
+*
+* SEE ALSO: sysNvRamGet()
+*/
+
+STATUS sysRadioBoardEepromGet
+(
+ char *p
+)
+{
+ return sysNvRamGet(p, RADIO_BOARD_EEPROM_SIZE, flashGetSectSize() * RADIO_BOARD_EEPROM + 4);
+}
+
+/*******************************************************************************
+*
+* sysRadioBoardEepromSet
+*
+* This routine sets the saved EEPROM data for the radio board.
+*
+* RETURNS: OK, ERROR, always.
+*
+* SEE ALSO: sysNvRamSet()
+*/
+
+STATUS sysRadioBoardEepromSet
+(
+ char *p
+)
+{
+ int i;
+ char buf[RADIO_BOARD_EEPROM_SIZE + 4];
+
+ buf[0] = 0x12;
+ buf[1] = 0x34;
+ buf[2] = 0x45;
+ buf[3] = 0x67;
+
+ for (i = 0; i < RADIO_BOARD_EEPROM_SIZE; i++)
+ buf[i+4] = p[i];
+
+ return sysNvRamSet(buf, RADIO_BOARD_EEPROM_SIZE+4, flashGetSectSize() * RADIO_BOARD_EEPROM);
+}
+
+
+/*******************************************************************************
+*
+* sysRadioBoardEepromSet
+*
+* This routine sets the saved EEPROM data for the radio board.
+*
+* RETURNS: OK, ERROR, always.
+*
+* SEE ALSO: sysNvRamSet()
+*/
+
+int sysIsRadioBoardEepromSet()
+{
+ char tag[4];
+
+ sysNvRamGet(tag, 4, flashGetSectSize() * RADIO_BOARD_EEPROM);
+ return (tag[0] == 0x12 && tag[1] == 0x34 && tag[2] == 0x45 && tag[3] == 0x67);
+}
+
+
+/*******************************************************************************
+*
+* sysClockBoardEepromGet
+*
+* This routine gets the saved EEPROM data for the clock board.
+*
+* RETURNS: OK, ERROR.
+*
+* SEE ALSO: sysNvRamGet()
+*/
+
+STATUS sysClockBoardEepromGet
+(
+ char *p
+)
+{
+ return sysNvRamGet(p, CLOCK_BOARD_EEPROM_SIZE, flashGetSectSize() * CLOCK_BOARD_EEPROM + 4);
+}
+
+/*******************************************************************************
+*
+* sysClockBoardEepromSet
+*
+* This routine sets the saved EEPROM data for the clock board.
+*
+* RETURNS: OK, ERROR, always.
+*
+* SEE ALSO: sysNvRamSet()
+*/
+
+STATUS sysClockBoardEepromSet
+(
+ char *p
+)
+{
+ int i;
+ char buf[CLOCK_BOARD_EEPROM_SIZE + 4];
+
+ buf[0] = 0x89;
+ buf[1] = 0xab;
+ buf[2] = 0xcd;
+ buf[3] = 0xef;
+
+ for (i=0; i < CLOCK_BOARD_EEPROM_SIZE; i++)
+ buf[i+4] = p[i];
+
+ return sysNvRamSet(buf, CLOCK_BOARD_EEPROM_SIZE+4, flashGetSectSize() * CLOCK_BOARD_EEPROM);
+}
+
+
+/*******************************************************************************
+*
+* sysIsClockBoardEepromSet
+*
+* This routine sets the saved EEPROM data for the clock board.
+*
+* RETURNS: OK, ERROR, always.
+*
+* SEE ALSO: sysNvRamSet()
+*/
+
+int sysIsClockBoardEepromSet()
+{
+ char tag[4];
+
+ sysNvRamGet(tag, 4, flashGetSectSize() * CLOCK_BOARD_EEPROM);
+ return (tag[0] == 0x89 && tag[1] == 0xab && tag[2] == 0xcd && tag[3] == 0xef);
+}
diff --git a/data/mnet/GP10/Host/Cdc_bsp/nvRam.h b/data/mnet/GP10/Host/Cdc_bsp/nvRam.h
new file mode 100644
index 0000000..6cf6f62
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/nvRam.h
@@ -0,0 +1,97 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/*
+JetCell modification history
+----------------------------
+99/07/19 to Initial Version
+*/
+
+/*
+ * File name : nvRam.h
+ * Description : Constants and Definitions for NV Ram
+ * History:
+ *
+ */
+
+#ifndef _NVRAM_H
+#define _NVRAM_H
+
+#include "bootFlash.h"
+
+/* Definitions for power on tests */
+#define POST_PASS 1
+#define POST_FAIL 0
+#define POST_ENABLE_TEST 1
+#define POST_DISABLE_TEST 0
+
+/* Amount of stack memory tested at initial startup */
+#define STACK_MEM_TEST_SIZE 0x10000
+
+#define MPC860_SDRAM_TEST 0x1
+#define DSP_0_INTERNAL_DATA_RAM_TEST 0x2
+#define DSP_0_INTERNAL_PROG_RAM_TEST 0x4
+#define DSP_0_EXTERNAL_RAM_TEST 0x8
+#define DSP_1_INTERNAL_DATA_RAM_TEST 0x10
+#define DSP_1_INTERNAL_PROG_RAM_TEST 0x20
+#define DSP_1_EXTERNAL_RAM_TEST 0x40
+#define FPGA_0_TEST 0x80
+#define FPGA_1_TEST 0x100
+#define I2C_TEST 0x200
+#define ALL_POWER_ON_TESTS (MPC860_SDRAM_TEST | \
+ DSP_0_INTERNAL_DATA_RAM_TEST | \
+ DSP_0_INTERNAL_PROG_RAM_TEST | \
+ DSP_0_EXTERNAL_RAM_TEST | \
+ DSP_1_INTERNAL_DATA_RAM_TEST | \
+ DSP_1_INTERNAL_PROG_RAM_TEST | \
+ DSP_1_EXTERNAL_RAM_TEST | \
+ FPGA_0_TEST | \
+ FPGA_1_TEST | \
+ I2C_TEST )
+
+#define NV_RAM_SECT_FROM_END 8
+#define NV_RAM_SIZE (NV_RAM_SECT_FROM_END * flashGetSectSize())
+
+
+#define MAX_VC_SN 64 /* Max length of the ViperCell serial number */
+#define MAX_VC_PN 64 /* Max length of the ViperCell part number */
+#define MAX_CDC_SN 64 /* Max length of the CDC serial number */
+#define MAX_CDC_PN 64 /* Max length of the CDC part number */
+
+#define RADIO_BOARD_EEPROM_SIZE 512
+#define CLOCK_BOARD_EEPROM_SIZE 20
+
+extern STATUS postSetTestResult (unsigned int testBit, unsigned int result);
+extern unsigned int postGetTestResult (unsigned int testBit);
+extern STATUS postSetTestMask (unsigned int testBit, unsigned int mask);
+extern unsigned int postGetTestMask (unsigned int testBit);
+
+extern STATUS sysIpAddrSet (char *ipAddr);
+extern STATUS sysIpAddrGet (char *ipAddr);
+
+extern STATUS sysSerialNumSet (char *sn);
+extern STATUS sysSerialNumGet (char *p);
+extern STATUS sysVCPartNumSet (char *partNum);
+extern STATUS sysVCPartNumGet (char *partNum);
+extern STATUS sysCDCSerialNumSet (char *serNum);
+extern STATUS sysCDCSerialNumGet (char *serNum);
+extern STATUS sysCDCPartNumSet (char *partNum);
+extern STATUS sysCDCPartNumGet (char *partNum);
+
+extern STATUS sysRadioBoardEepromGet(char *pEeprom);
+extern STATUS sysRadioBoardEepromSet(char *pEeprom);
+extern int sysIsRadioBoardEepromSet();
+
+extern STATUS sysClockBoardEepromGet(char *pEeprom);
+extern STATUS sysClockBoardEepromSet(char *pEeprom);
+extern int sysIsClockBoardEepromSet();
+
+extern int sysNvRamGet (char *, int, int);
+extern int sysNvRamSet (char *, int, int);
+
+
+#endif /* _NVRAM_H */
diff --git a/data/mnet/GP10/Host/Cdc_bsp/nvram2.o b/data/mnet/GP10/Host/Cdc_bsp/nvram2.o
new file mode 100644
index 0000000..7aa3f98
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/nvram2.o
Binary files differ
diff --git a/data/mnet/GP10/Host/Cdc_bsp/romInit.s b/data/mnet/GP10/Host/Cdc_bsp/romInit.s
new file mode 100644
index 0000000..976cb31
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/romInit.s
@@ -0,0 +1,1009 @@
+/*
+JetCell modification history
+----------------------------
+99/06/01 ck Add a mcro to load 32 bit constant into a register.
+99/03/22 ck Add JetCell modification history
+99/03/15 ck Use conditional compiles. Modify SIUMCR register value, keep DPC bit 0.
+99/02/18 ck Changes for CDCIM
+99/02/18 ck Initial revision. Copied from ads860 bsp.
+
+*/
+
+/* romInit.s - Motorola 860ads ROM initialization module */
+
+/* Copyright 1984-1996 Wind River Systems, Inc. */
+ .data
+ .globl copyright_wind_river
+ .long copyright_wind_river
+
+/*
+modification history
+--------------------
+01l,09nov98,cn added support for FADS860T boards.
+01k,30jul98,gls fixed to initialize CS0/CS1 earlier to allow access to BCSR3
+01j,18feb98,gls added support for PPC823FADS
+01i,23jun97,map fixed MAMR init for 16/32 DRAM [SPR# 8753]
+01h,17dec96,tpr fixed MAMR init. bug with 16 and 32 Mbytes dram (SPR #7661)
+01g,10nov96,tpr updated UPM table.
+ removed RTCSC initialization.
+01f,08nov96,tpr modified UPM table for EDO Dram @ 50 Mhz.
+01e,06nov96,tpr replaced PLPRCR_MF_SFT by PLPRCR_MF_SHIFT.
+01d,06nov96,tpr Clean up the code (SPR #7336).
+ added DRAM speed selection (SPR #7335).
+01c,24jun96,tpr Reworked all initialization code.
+01b,04jun96,cah Add mem controller minimal init sequence
+01a,19apr96,tpr written.
+*/
+
+/*
+DESCRIPTION
+This module contains the entry code for the VxWorks bootrom.
+The entry point romInit, is the first code executed on power-up.
+It sets the BOOT_COLD parameter to be passed to the generic
+romStart() routine.
+
+The routine sysToMonitor() jumps to the location 4 bytes
+past the beginning of romInit, to perform a "warm boot".
+This entry point allows a parameter to be passed to romStart().
+
+*/
+
+#define _ASMLANGUAGE
+#include "vxWorks.h"
+#include "asm.h"
+#include "cacheLib.h"
+#include "config.h"
+#include "regs.h"
+#include "sysLib.h"
+#include "drv/multi/ppc860Siu.h"
+
+
+ /* load a 32-bit constant into a register using the shortest sequence */
+ .macro li32 reg, const32bit
+ .if (\const32bit & 0xffff0000)
+ .if ((\const32bit & 0xffff8000) - 0xffff8000)
+ lis \reg,(((\const32bit)>>16) & 0xffff)
+ .if (\const32bit & 0xffff)
+ addi \reg,\reg,((\const32bit) & 0xffff)
+ .endif
+ .else
+ li \reg,(\const32bit & -1)
+ .endif
+ .else
+ .if (\const32bit & 0x8000)
+ li \reg,0
+ ori \reg,\reg,(\const32bit)
+ .else
+ li \reg,((\const32bit) & 0xffff)
+ .endif
+ .endif
+ .endm
+
+
+ /* internals */
+
+ .globl _romInit /* start of system code */
+ .globl romInit /* start of system code */
+
+ /* externals */
+
+ .extern romStart /* system initialization routine */
+
+ .text
+ .align 2
+
+/******************************************************************************
+*
+* romInit - entry point for VxWorks in ROM
+*
+
+* romInit
+* (
+* int startType /@ only used by 2nd entry point @/
+* )
+
+*/
+
+_romInit:
+romInit:
+ bl cold /* jump to the cold boot initialization */
+
+ bl start /* jump to the warm boot initialization */
+
+ /* copyright notice appears at beginning of ROM (in TEXT segment) */
+
+ .ascii "Copyright 1984-1996 Wind River Systems, Inc."
+ .align 2
+
+cold:
+ li r3, BOOT_COLD /* set cold boot as start type */
+
+ /*
+ * When the PowerPC 860 is powered on, the processor fletch the
+ * instructions located at the address 0x100. We need to jump
+ * from the address 0x100 to the Flash space.
+ */
+
+ lis r4, HIADJ(start) /* load r4 with the address */
+ addi r4, r4, LO(start) /* of start */
+
+ lis r5, HIADJ(romInit) /* load r5 with the address */
+ addi r5, r5, LO(romInit) /* of romInit() */
+
+ lis r6, HIADJ(ROM_TEXT_ADRS) /* load r6 with the address */
+ addi r6, r6, LO(ROM_TEXT_ADRS) /* of ROM_TEXT_ADRS */
+
+ sub r4, r4, r5 /* */
+ add r4, r4, r6
+
+ mtspr LR, r4 /* save destination address*/
+ /* into LR register */
+ blr /* jump to flash mem address */
+
+start:
+ /* set the MSR register to a known state */
+
+ xor r4, r4, r4 /* clear register R4 */
+ mtmsr r4 /* cleat the MSR register */
+
+ /* DER - clear the Debug Enable Register */
+
+ mtspr DER, r4
+
+ /* ICR - clear the Interrupt Cause Register */
+
+ mtspr ICR, r4
+
+ /*
+ * ICTRL - initialize the Intstruction Support Control register
+ *
+ */
+
+ lis r5, HIADJ(0x00000007)
+ addi r5, r5, LO(0x00000007)
+ mtspr ICTRL, r5
+
+ /* disable the instruction/data cache */
+
+ lis r4, HIADJ ( CACHE_CMD_DISABLE) /* load disable cmd */
+ addi r4, r4, LO (CACHE_CMD_DISABLE)
+ mtspr IC_CST, r4 /* disable I cache */
+ mtspr DC_CST, r4 /* disable D cache */
+
+ /* unlock the instruction/data cache */
+
+ lis r4, HIADJ ( CACHE_CMD_UNLOCK_ALL) /* load unlock cmd */
+ addi r4, r4, LO (CACHE_CMD_UNLOCK_ALL)
+ mtspr IC_CST, r4 /* unlock all I cache lines */
+ mtspr DC_CST, r4 /* unlock all D cache lines */
+
+ /* invalidate the instruction/data cache */
+
+ lis r4, HIADJ (CACHE_CMD_INVALIDATE) /* load invalidate cmd*/
+ addi r4, r4, LO (CACHE_CMD_INVALIDATE)
+ mtspr IC_CST, r4 /* invalidate all I cache lines */
+ mtspr DC_CST, r4 /* invalidate all D cache lines */
+
+ /*
+ * initialize the IMMR register before any non-core registers
+ * modification.
+ */
+
+ lis r4, HIADJ( INTERNAL_MEM_MAP_ADDR)
+ addi r4, r4, LO(INTERNAL_MEM_MAP_ADDR)
+ mtspr IMMR, r4 /* initialize the IMMR register */
+
+ mfspr r4, IMMR /* read it back, to be sure */
+ rlwinm r4, r4, 0, 0, 15 /* only high 16 bits count */
+
+ /* SYPCR - turn off the system protection stuff */
+
+#if 0
+ lis r5, HIADJ( SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF)
+ addi r5, r5, LO(SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF)
+#endif
+ li32 r5, ( SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF)
+ stw r5, SYPCR(0)(r4)
+
+ /*
+ * Map the bank 0 to the flash area - On the ADS board at reset time
+ * the bank 0 is already used to map the flash.
+ */
+
+ lis r5, HIADJ( (ROM_BASE_ADRS & BR_BA_MSK) | (BR_PS_8 & BR_PS_MSK) | BR_V)
+ addi r5, r5, LO((ROM_BASE_ADRS & BR_BA_MSK) | (BR_PS_8 & BR_PS_MSK) | BR_V)
+ stw r5, BR0(0)(r4)
+
+
+ lis r5, HIADJ( 0xffc00000 | OR_CSNT_SAM | OR_BI | OR_SCY_5_CLK | \
+ OR_TRLX)
+ addi r5, r5, LO(0xffc00000 | OR_CSNT_SAM | OR_BI | OR_SCY_5_CLK | \
+ OR_TRLX)
+ stw r5, OR0(0)(r4)
+
+#ifdef CDCIM
+ /* Setup access to the AUXPORT */
+ lis r5, HIADJ( (AUX_PORT_ADDR & BR_BA_MSK) | BR_MS_GPCM | BR_PS_32 | BR_V)
+ addi r5, r5, LO((AUX_PORT_ADDR & BR_BA_MSK) | BR_MS_GPCM | BR_PS_32 | BR_V)
+ stw r5, BR6(0)(r4)
+
+
+ lis r5, HIADJ( AUX_PORT_ADDR_MASK_V2 | OR_CSNT_SAM | OR_BI | OR_SCY_1_CLK | \
+ OR_TRLX)
+ addi r5, r5, LO(AUX_PORT_ADDR_MASK_V2 | OR_CSNT_SAM | OR_BI | OR_SCY_1_CLK | \
+ OR_TRLX)
+ stw r5, OR6(0)(r4)
+#endif
+
+#ifndef CDCIM
+ /*
+ * Map the bank 1 to the Board Status and Control Registers
+ */
+
+ lis r5, HIADJ( (BCSR0 & BR_BA_MSK) | BR_V)
+ addi r5, r5, LO((BCSR0 & BR_BA_MSK) | BR_V)
+ stw r5, BR1(0)(r4)
+
+ lis r5, HIADJ( (0xffff8000 & OR_AM_MSK) | OR_BI | OR_SCY_1_CLK)
+ addi r5, r5, LO((0xffff8000 & OR_AM_MSK) | OR_BI | OR_SCY_1_CLK)
+ stw r5, OR1(0)(r4)
+#endif
+
+#ifndef CDCIM
+ /* Check for FADS, set the SIUMCR accordingly */
+
+
+ lis r5, HIADJ(BCSR3) /* load r5 with the BCSR3 address */
+ lwz r6, LO(BCSR3)(r5) /* load r6 with the BCSR3 value */
+
+ andis. r5, r6, 0x3f00 /* Check for FADS board */
+ bgt fads
+
+ /* set the SIUMCR register for important debug port, etc... stuff */
+
+ lis r6, HIADJ( SIUMCR_FRC | SIUMCR_DLK | SIUMCR_DPC | \
+ SIUMCR_MLRC_3STATES | SIUMCR_AEME | SIUMCR_GB5E)
+ addi r6, r6, LO(SIUMCR_FRC | SIUMCR_DLK | SIUMCR_DPC | \
+ SIUMCR_MLRC_3STATES | SIUMCR_AEME | SIUMCR_GB5E)
+ b siu_done
+
+fads:
+ lis r6, HIADJ(SIUMCR_DLK | SIUMCR_DPC | \
+ SIUMCR_MLRC_3STATES | SIUMCR_GB5E)
+ addi r6, r6, LO( SIUMCR_DLK | SIUMCR_DPC | \
+ SIUMCR_MLRC_3STATES | SIUMCR_GB5E)
+#endif
+
+#ifdef CDCIM
+ lis r6, HIADJ(SIUMCR_DLK | \
+ SIUMCR_MLRC_3STATES | SIUMCR_GB5E)
+ addi r6, r6, LO( SIUMCR_DLK | \
+ SIUMCR_MLRC_3STATES | SIUMCR_GB5E)
+#endif
+
+siu_done:
+
+ lwz r5, SIUMCR(0)(r4)
+ or r5, r5, r6
+ stw r5, SIUMCR(0)(r4)
+
+ /* TBSCR - initialize the Time Base Status and Control register */
+
+ lis r5, HIADJ( TBSCR_REFA | TBSCR_REFB)
+ addi r5, r5, LO(TBSCR_REFA | TBSCR_REFB)
+ sth r5, TBSCR(0)(r4)
+
+ /* set PIT status and control init value */
+
+ li r5, PISCR_PS | PISCR_PITF
+ sth r5, PISCR(0)(r4)
+
+#ifndef CDCIM
+ /* set the SPLL frequency to 20 Mhz */
+
+ lis r5, HIADJ( (SPLL_MUL_FACTOR_20MHZ << PLPRCR_MF_SHIFT) | \
+ PLPRCR_TEXPS)
+ addi r5, r5, LO((SPLL_MUL_FACTOR_20MHZ << PLPRCR_MF_SHIFT) | \
+ PLPRCR_TEXPS)
+ stw r5, PLPRCR(0)(r4)
+
+ /* divide by 16 */
+
+ li r5, MPTPR_PTP_DIV16
+ sth r5, MPTPR(0)(r4)
+#endif
+
+#ifdef CDCIM
+ lis r5, HIADJ((0x13 << MAMR_PTA_SHIFT) | MAMR_PTAE | \
+ MAMR_AMA_TYPE_1 | MAMR_DSA_1_CYCL | \
+ MAMR_G0CLA_A10 | \
+ MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X)
+
+ addi r5, r5, LO((0x13 << MAMR_PTA_SHIFT) | MAMR_PTAE | \
+ MAMR_AMA_TYPE_1 | MAMR_DSA_1_CYCL |MAMR_G0CLA_A10 | \
+ MAMR_RLFA_1X | MAMR_WLFA_1X | \
+ MAMR_TLFA_4X)
+#else
+ lis r5, HIADJ((0x13 << MAMR_PTA_SHIFT) | MAMR_PTAE | \
+ MAMR_AMA_TYPE_2 | MAMR_DSA_1_CYCL | \
+ MAMR_G0CLA_A12 | MAMR_GPL_A4DIS | \
+ MAMR_RLFA_1X | MAMR_WLFA_1X | MAMR_TLFA_4X)
+
+ addi r5, r5, LO((0x13 << MAMR_PTA_SHIFT) | MAMR_PTAE | \
+ MAMR_AMA_TYPE_2 | MAMR_DSA_1_CYCL |MAMR_G0CLA_A12 | \
+ MAMR_GPL_A4DIS | MAMR_RLFA_1X | MAMR_WLFA_1X | \
+ MAMR_TLFA_4X)
+#endif
+
+ stw r5, MAMR(0)(r4)
+
+
+ /* Initialize SDRAM CK */
+
+ /*
+ * load r6/r7 with the start/end address of the UPM table.
+ */
+
+ lis r6, HIADJ( UpmTable)
+ addi r6, r6, LO(UpmTable)
+
+ lis r7, HIADJ( UpmTableEnd)
+ addi r7, r7, LO(UpmTableEnd)
+
+
+#ifndef CDCIM
+ /* get the DRAM speed and if EDO capability supported */
+
+ lis r5, HIADJ(BCSR2) /* load r5 with the BCSR2 address */
+ lwz r6, LO(BCSR2)(r5) /* load r6 with the BCSR2 value */
+ lis r5, HI(BCSR2_DRAM_NO_EDO_L | BCSR2_DRAM_PD_SPEED_MASK)
+ and r6, r6, r5
+
+ lis r5, HI(BCSR2_DRAM_NO_EDO_L | BCSR2_DRAM_PD_60NS_SIMM)
+ cmpw r6, r5
+ beq dram60ns
+
+ lis r5, HI(BCSR2_DRAM_NO_EDO_L | BCSR2_DRAM_PD_70NS_SIMM)
+ cmpw r6, r5
+ beq dram70ns
+
+ lis r5, HI(BCSR2_DRAM_EDO_L | BCSR2_DRAM_PD_60NS_SIMM)
+ cmpw r6, r5
+ beq dramEdo60ns
+
+ lis r5, HI(BCSR2_DRAM_EDO_L | BCSR2_DRAM_PD_70NS_SIMM)
+ cmpw r6, r5
+ beq dramEdo70ns
+
+dram60ns:
+#ifndef EDO_DRAM
+ /*
+ * load r6/r7 with the start/end address of the UPM table for a
+ * none EDO 60ns Dram.
+ */
+
+ lis r6, HIADJ( UpmTable60)
+ addi r6, r6, LO(UpmTable60)
+
+ lis r7, HIADJ( UpmTable60End)
+ addi r7, r7, LO(UpmTable60End)
+ b upmInit
+#endif
+
+dramEdo60ns:
+ /*
+ * load r6/r7 with the start/end address of the UPM table for an
+ * EDO 60ns Dram.
+ */
+
+ lis r6, HIADJ( UpmTableEdo60)
+ addi r6, r6, LO(UpmTableEdo60)
+
+ lis r7, HIADJ( UpmTableEdo60End)
+ addi r7, r7, LO(UpmTableEdo60End)
+ b upmInit
+
+dram70ns:
+#ifndef EDO_DRAM
+ /*
+ * load r6/r7 with the start/end address of the UPM table for a
+ * none EDO 70ns Dram.
+ */
+
+ lis r6, HIADJ( UpmTable70)
+ addi r6, r6, LO(UpmTable70)
+
+ lis r7, HIADJ( UpmTable70End)
+ addi r7, r7, LO(UpmTable70End)
+ b upmInit
+#endif
+
+dramEdo70ns:
+ /*
+ * load r6/r7 with the start/end address of the UPM table for an
+ * EDO 70ns Dram.
+ */
+
+ lis r6, HIADJ( UpmTableEdo70)
+ addi r6, r6, LO(UpmTableEdo70)
+
+ lis r7, HIADJ( UpmTableEdo70End)
+ addi r7, r7, LO(UpmTableEdo70End)
+#endif /* ifndef CDCIM */
+
+upmInit:
+ /* init UPMA for memory access */
+
+ sub r5, r7, r6 /* compute table size */
+ srawi r5, r5, 2 /* in integer size */
+
+ /* convert UpmTable to ROM based addressing */
+
+ lis r7, HIADJ(romInit)
+ addi r7, r7, LO(romInit)
+
+ lis r8, HIADJ(ROM_TEXT_ADRS)
+ addi r8, r8, LO(ROM_TEXT_ADRS)
+
+ sub r6, r6, r7 /* subtract romInit base address */
+ add r6, r6, r8 /* add in ROM_TEXT_ADRS address */
+
+ /* Command: OP=Write, UPMA, MAD=0 */
+ lis r9, HIADJ (MCR_OP_WRITE | MCR_UM_UPMA | MCR_MB_CS0)
+ addi r9, r9, LO(MCR_OP_WRITE | MCR_UM_UPMA | MCR_MB_CS0)
+
+UpmWriteLoop:
+ /* write the UPM table in the UPM */
+
+ lwz r10, 0(r6) /* get data from table */
+ stw r10, MDR(0)(r4) /* store the data to MD register */
+
+ stw r9, MCR(0)(r4) /* issue command to MCR register */
+
+ addi r6, r6, 4 /* next entry in the table */
+ addi r9, r9, 1 /* next MAD address */
+ cmpw r9, r5 /* done yet ? */
+ blt UpmWriteLoop
+
+#ifndef CDCIM
+
+ /* get the DRAM size, and Map the bank 2 & 3 to the Dram area */
+
+ lis r5, HIADJ(BCSR2) /* load r5 with the BCSR2 address */
+ lwz r6, LO(BCSR2)(r5) /* load r6 with the BCSR2 value */
+ lis r5, HI(BCSR2_DRAM_PD_SIZE_MASK)
+ and r6, r6, r5
+
+ lis r5, HI(BCSR2_DRAM_PD_4MEG_SIMM)
+ cmpw r6, r5
+ beq dram4meg
+
+ lis r5, HI(BCSR2_DRAM_PD_8MEG_SIMM)
+ cmpw r6, r5
+ beq dram8meg
+
+ lis r5, HI(BCSR2_DRAM_PD_16MEG_SIMM)
+ cmpw r6, r5
+ beq dram16meg
+
+ lis r5, HI(BCSR2_DRAM_PD_32MEG_SIMM)
+ cmpw r6, r5
+ beq dram32meg
+
+dram32meg:
+ /* program BR3 */
+
+ lis r5, HIADJ( ((0x01000000 + LOCAL_MEM_LOCAL_ADRS) & \
+ BR_BA_MSK) | BR_MS_UPMA | BR_V)
+ addi r5, r5, LO(((0x01000000 + LOCAL_MEM_LOCAL_ADRS) & \
+ BR_BA_MSK) | BR_MS_UPMA | BR_V)
+ stw r5, BR3(0)(r4)
+
+dram16meg:
+ /* compute the OR3/OR2 value for a 16M block size */
+
+ lis r5, HIADJ(0xff000000 | OR_CSNT_SAM)
+ addi r5, r5, LO(0xff000000 | OR_CSNT_SAM)
+ stw r5, OR3(0)(r4) /* Set OR3. Used only when BR3 is valid */
+
+ /* change the Address Multiplexing in MAMR */
+
+ lwz r6, MAMR(0)(r4)
+ lis r9, HIADJ(~MAMR_AMA_MSK)
+ addi r9, r9, LO(~MAMR_AMA_MSK)
+ and r6, r6, r9 /* clear the AMA bits in MAMR */
+ lis r9, HIADJ(MAMR_AMA_TYPE_3)
+ addi r9, r9, LO(MAMR_AMA_TYPE_3)
+ or r6, r6, r9 /* set the AMA bits */
+ stw r6, MAMR(0)(r4)
+
+ b dramInit
+
+dram8meg:
+ /* program BR3 */
+
+ lis r5, HIADJ( ((0x00400000 + LOCAL_MEM_LOCAL_ADRS) & \
+ BR_BA_MSK) | BR_MS_UPMA | BR_V)
+ addi r5, r5, LO(((0x00400000 + LOCAL_MEM_LOCAL_ADRS) & \
+ BR_BA_MSK) | BR_MS_UPMA | BR_V)
+ stw r5, BR3(0)(r4)
+
+dram4meg:
+ /* compute the OR3/OR2 value for a 4M block size */
+
+ lis r5, HIADJ( 0xffc00000 | OR_CSNT_SAM)
+ addi r5, r5, LO(0xffc00000 | OR_CSNT_SAM)
+ stw r5, OR3(0)(r4) /* Set OR3. Used only when BR3 is valid */
+ b dramInit
+
+#endif /* ifndef CDCIM */
+
+dramInit:
+ /* Map the bank 2 to the Dram area */
+
+#ifndef CDCIM
+ stw r5, OR2(0)(r4) /* set OR2 to the previously computed value */
+#endif
+ lis r5, HIADJ( (LOCAL_MEM_LOCAL_ADRS & BR_BA_MSK) | BR_MS_UPMA | \
+ BR_V)
+ addi r5, r5, LO((LOCAL_MEM_LOCAL_ADRS & BR_BA_MSK) | BR_MS_UPMA | \
+ BR_V)
+ stw r5, BR2(0)(r4)
+
+#ifdef CDCIM
+ lis r5, HIADJ(0xf0000000 | OR_CSNT_SAM | OR_ACS_DIV2 | OR_TRLX)
+ addi r5, r5, LO(0xf0000000 | OR_CSNT_SAM | OR_ACS_DIV2 | OR_TRLX)
+ stw r5, OR2(0)(r4)
+#endif
+
+ /* Sdram intializtion */
+
+ lis r5, HIADJ( 0xffff)
+ addi r5, r5, LO (0xffff)
+ lis r6, ( 0x0000)
+
+sdramDelayLoop:
+ addi r6, r6, 1
+ cmpw r6, r5 /* done yet ? */
+ blt sdramDelayLoop
+
+
+ lis r5, HIADJ( MCR_OP_RUN | MCR_MB_CS2 | MCR_MCLF_1X | 5)
+ ori r5, r5, LO( MCR_OP_RUN | MCR_MB_CS2 | MCR_MCLF_1X | 5)
+ stw r5, MCR(0)(r4)
+ lis r5, HIADJ( MCR_OP_RUN | MCR_MB_CS2 | MCR_MCLF_8X | 30)
+ ori r5, r5, LO( MCR_OP_RUN | MCR_MB_CS2 | MCR_MCLF_8X | 30)
+ stw r5, MCR(0)(r4)
+ li r5, ( 0x88)
+ stw r5, MAR(0)(r4)
+ lis r5, HIADJ( MCR_OP_RUN | MCR_MB_CS2 | MCR_MCLF_1X | 6)
+ ori r5, r5, LO( MCR_OP_RUN | MCR_MB_CS2 | MCR_MCLF_1X | 6)
+ stw r5, MCR(0)(r4)
+
+
+#ifndef CDCIM /* skip BSCR stuff CK */
+
+ /* Get the board revision number */
+
+ lis r4, HIADJ(BCSR3) /* load r4 with the BCSR3 address */
+ lwz r5, LO(BCSR3)(r4) /* load r5 with the BCSR3 value */
+
+ andis. r6, r5, 0x3f00 /* 8xxFADS DRAM is active low */
+ bgt noEngBoard
+
+ lis r4, HI(BCSR3_BREVN)
+ and r5, r5, r4 /* extract board revision number */
+
+ /* disable all devices (serial, ethernet, ...) */
+
+ cmpwi r5, 0 /* if board revision number is 0 */
+ bne noEngBoard
+
+ lis r4, HI(BCSR1_RESET_VAL_ENG) /* then use the ENG reset val */
+ bl bscr1Init
+
+noEngBoard:
+ lis r4, HI(BCSR1_RESET_VAL) /* otherwise normal value */
+
+bscr1Init:
+ lis r5, HIADJ(BCSR1)
+ stw r4, LO(BCSR1)(r5) /* reset the BCSR1 register */
+
+#ifdef FADS_860T
+ lis r4, HIADJ(BCSR4) /* load r4 with BCSR4 address */
+ lwz r5, LO(BCSR4)(r4) /* load r5 with BCSR4 value */
+ lis r4, HI(BCSR4_UUFDIS) /* load r4 with disable value */
+ or r5, r5, r4 /* load r5 with BCSR4 value */
+ lis r4, HI(~BCSR4_FETH_RST) /* load r4 with reset value */
+ and r5, r5, r4 /* load r5 with BCSR4 value */
+ lis r4, HIADJ(BCSR4) /* load r4 with BCSR4 address */
+ stw r5, LO(BCSR4)(r4) /* reset the FEC tranceiver */
+#endif
+
+#endif /* ifndef CDCIM */
+
+
+ /* initialize the stack pointer */
+
+ lis sp, HIADJ(STACK_ADRS)
+ addi sp, sp, LO(STACK_ADRS)
+
+ /* initialize r2 and r13 according to EABI standard */
+#if FALSE /* SDA Not supported yet */
+
+ lis r2, HIADJ(_SDA2_BASE_)
+ addi r2, r2, LO(_SDA2_BASE_)
+
+ lis r13, HIADJ(_SDA_BASE_)
+ addi r13, r13, LO(_SDA_BASE_)
+#endif
+
+ /* go to C entry point */
+
+ addi sp, sp, -FRAMEBASESZ /* get frame stack */
+
+ /*
+ * calculate C entry point: routine - entry point + ROM base
+ * routine = romStart
+ * entry point = romInit = R7
+ * ROM base = ROM_TEXT_ADRS = R8
+ * C entry point: romStart - R7 + R8
+ */
+
+ lis r6, HIADJ(romStart)
+ addi r6, r6, LO(romStart) /* load R6 with C entry point */
+
+ sub r6, r6, r7 /* routine - entry point */
+ add r6, r6, r8 /* + ROM base */
+
+ mtlr r6 /* move C entry point to LR */
+ blr /* jump to the C entry point */
+
+#ifndef CDCIM
+
+#if (SPLL_FREQ != FREQ_25_MHZ)
+/* UPM initialization table, 60ns, 50MHz */
+
+UpmTable60:
+#
+# /* DRAM 60ns - single read. (offset 0 in upm RAM) */
+ .long 0x8fffec24, 0x0fffec04, 0x0cffec04, 0x00ffec04
+ .long 0x00ffec00, 0x37ffec47
+# /* offsets 6-7 not used */
+ .long 0xffffffff, 0xffffffff
+# /* DRAM 60ns - burst read. (offset 8 in upm RAM) */
+ .long 0x8fffec24, 0x0fffec04, 0x08ffec04, 0x00ffec0c
+ .long 0x03ffec00, 0x00ffec44, 0x00ffcc08, 0x0cffcc44
+ .long 0x00ffec0c, 0x03ffec00, 0x00ffec44, 0x00ffcc00
+ .long 0x3fffc847
+# /* offsets 15-17 not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 60ns - single write. (offset 18 in upm RAM) */
+ .long 0x8fafcc24, 0x0fafcc04, 0x0cafcc00, 0x11bfcc47
+# /* offsets 1c-1f not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 60ns - burst write. (offset 20 in upm RAM) */
+ .long 0x8fafcc24, 0x0fafcc04, 0x0cafcc00, 0x03afcc4c
+ .long 0x0cafcc00, 0x03afcc4c, 0x0cafcc00, 0x03afcc4c
+ .long 0x0cafcc00, 0x33bfcc4f
+# /* offsets 2a-2f not used */
+ .long 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 60ns - refresh. (offset 30 in upm RAM) */
+ .long 0xc0ffcc84, 0x00ffcc04, 0x07ffcc04, 0x3fffcc06
+ .long 0xffffcc85, 0xffffcc05
+# /* offsets 36-3b not used */
+ .long 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 60ns - exception. (offset 3c in upm RAM) */
+ .long 0x33ffcc07
+# /* offset 3d-3f not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff
+UpmTable60End:
+
+/* UPM initialization table, 70ns, 50MHz */
+
+UpmTable70:
+#
+# /* DRAM 70ns - single read. (offset 0 in upm RAM) */
+ .long 0x8fffcc24, 0x0fffcc04, 0x0cffcc04, 0x00ffcc04
+ .long 0x00ffcc00, 0x37ffcc47
+# /* offsets 6-7 not used */
+ .long 0xffffffff, 0xffffffff
+# /* DRAM 70ns - burst read. (offset 8 in upm RAM) */
+ .long 0x8fffcc24, 0x0fffcc04, 0x0cffcc04, 0x00ffcc04
+ .long 0x00ffcc08, 0x0cffcc44, 0x00ffec0c, 0x03ffec00
+ .long 0x00ffec44, 0x00ffcc08, 0x0cffcc44, 0x00ffec04
+ .long 0x00ffec00, 0x3fffec47
+# /* offsets 16-17 not used */
+ .long 0xffffffff, 0xffffffff
+# /* DRAM 70ns - single write. (offset 18 in upm RAM) */
+ .long 0x8fafcc24, 0x0fafcc04, 0x0cafcc00, 0x11bfcc47
+# /* offsets 1c-1f not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 70ns - burst write. (offset 20 in upm RAM) */
+ .long 0x8fafcc24, 0x0fafcc04, 0x0cafcc00, 0x03afcc4c
+ .long 0x0cafcc00, 0x03afcc4c, 0x0cafcc00, 0x03afcc4c
+ .long 0x0cafcc00, 0x33bfcc4f
+# /* offsets 2a-2f not used */
+ .long 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 70ns - refresh. (offset 30 in upm RAM) */
+ .long 0xe0ffcc84, 0x00ffcc04, 0x00ffcc04, 0x0fffcc04
+ .long 0x7fffcc06, 0xffffcc85, 0xffffcc05
+# /* offsets 37-3b not used */
+ .long 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 70ns - exception. (offset 3c in upm RAM) */
+ .long 0x33ffcc07
+# /* offset 3d-3f not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff
+UpmTable70End:
+
+/* UPM initialization table, EDO, 60ns, 50MHz */
+
+UpmTableEdo60:
+#
+# /* DRAM 60ns - single read. (offset 0 in upm RAM) */
+ .long 0x8ffbec24, 0x0ff3ec04, 0x0cf3ec04, 0x00f3ec04
+ .long 0x00f3ec00, 0x37f7ec47
+# /* offsets 6-7 not used */
+ .long 0xffffffff, 0xffffffff
+# /* DRAM 60ns - burst read. (offset 8 in upm RAM) */
+ .long 0x8fffec24, 0x0ffbec04, 0x0cf3ec04, 0x00f3ec0c
+ .long 0x0cf3ec00, 0x00f3ec4c, 0x0cf3ec00, 0x00f3ec4c
+ .long 0x0cf3ec00, 0x00f3ec44, 0x03f3ec00, 0x3ff7ec47
+# /* offsets 14-17 not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 60ns - single write. (offset 18 in upm RAM) */
+ .long 0x8fffcc24, 0x0fefcc04, 0x0cafcc00, 0x11bfcc47
+# /* offsets 1c-1f not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 60ns - burst write. (offset 20 in upm RAM) */
+ .long 0x8fffcc24, 0x0fefcc04, 0x0cafcc00, 0x03afcc4c
+ .long 0x0cafcc00, 0x03afcc4c, 0x0cafcc00, 0x03afcc4c
+ .long 0x0cafcc00, 0x33bfcc4f
+# /* offsets 2a-2f not used */
+ .long 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 60ns - refresh. (offset 30 in upm RAM) */
+ .long 0xc0ffcc84, 0x00ffcc04, 0x07ffcc04, 0x3fffcc06
+ .long 0xffffcc85, 0xffffcc05
+# /* offsets 36-3b not used */
+ .long 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 60ns - exception. (offset 3c in upm RAM) */
+ .long 0x33ffcc07
+# /* offset 3d-3f not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff
+UpmTableEdo60End:
+
+/* UPM initialization table, EDO, 70ns, 50MHz */
+
+UpmTableEdo70:
+#
+# /* DRAM 70ns - single read. (offset 0 in upm RAM) */
+ .long 0x8ffbcc24, 0x0ff3cc04, 0x0cf3cc04, 0x00f3cc04
+ .long 0x00f3cc00, 0x37f7cc47
+# /* offsets 6-7 not used */
+ .long 0xffffffff, 0xffffffff
+# /* DRAM 70ns - burst read. (offset 8 in upm RAM) */
+ .long 0x8fffcc24, 0x0ffbcc04, 0x0cf3cc04, 0x00f3cc0c
+ .long 0x03f3cc00, 0x00f3cc44, 0x00f3ec0c, 0x0cf3ec00
+ .long 0x00f3ec4c, 0x03f3ec00, 0x00f3ec44, 0x00f3cc00
+ .long 0x33f7cc47
+# /* offsets 15-17 not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 70ns - single write. (offset 18 in upm RAM) */
+ .long 0x8fffcc24, 0x0fefcc04, 0x0cafcc00, 0x11bfcc47
+# /* offsets 1c-1f not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 70ns - burst write. (offset 20 in upm RAM) */
+ .long 0x8fffcc24, 0x0fefcc04, 0x0cafcc00, 0x03afcc4c
+ .long 0x0cafcc00, 0x03afcc4c, 0x0cafcc00, 0x03afcc4c
+ .long 0x0cafcc00, 0x33bfcc47
+# /* offsets 2a-2f not used */
+ .long 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 70ns - refresh. (offset 30 in upm RAM) */
+ .long 0xe0ffcc84, 0x00ffcc04, 0x00ffcc04, 0x0fffcc04
+ .long 0x7fffcc04, 0xffffcc86, 0xffffcc05
+# /* offsets 37-3b not used */
+ .long 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 70ns - exception. (offset 3c in upm RAM) */
+ .long 0x33ffcc07
+# /* offset 3d-3f not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff
+UpmTableEdo70End:
+
+#else /* FALSE/TRUE */
+
+/* UPM initialization table, 60ns, 25MHz */
+
+UpmTable60:
+#
+# /* DRAM 60ns - single read. (offset 0 in upm RAM) */
+ .long 0x0fffcc04, 0x08ffcc00, 0x33ffcc47
+# /* offsets 3-7 not used */
+ .long 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 60ns - burst read. (offset 8 in upm RAM) */
+ .long 0x0fffcc24, 0x0fffcc04, 0x08ffcc00, 0x03ffcc4c
+ .long 0x08ffcc00, 0x03ffcc4c, 0x08ffcc00, 0x03ffcc4c
+ .long 0x08ffcc00, 0x33ffcc47
+# /* offsets 11-17 not used */
+ .long 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 60ns - single write. (offset 18 in upm RAM) */
+ .long 0x0fafcc04, 0x08afcc00, 0x3fbfcc47
+# /* offsets 1b-1f not used */
+ .long 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 60ns - burst write. (offset 20 in upm RAM) */
+ .long 0x0fafcc04, 0x0cafcc00, 0x01afcc4c, 0x0cafcc00
+ .long 0x01afcc4c, 0x0cafcc00, 0x01afcc4c, 0x0cafcc00
+ .long 0x31bfcc43
+# /* offsets 29-2f not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 60ns - refresh. (offset 30 in upm RAM) */
+ .long 0x80ffcc84, 0x13ffcc04, 0xffffcc87, 0xffffcc05
+# /* offsets 34-3b not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 60ns - exception. (offset 3c in upm RAM) */
+ .long 0x33ffcc07
+# /* offset 3d-3f not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff
+UpmTable60End:
+
+/* UPM initialization table, 70ns, 25MHz */
+
+UpmTable70:
+#
+# /* DRAM 70ns - single read. (offset 0 in upm RAM) */
+ .long 0x0fffec04, 0x08ffec04, 0x00ffec00, 0x3fffcc47
+# /* offsets 4-7 not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 70ns - burst read. (offset 8 in upm RAM) */
+ .long 0x0fffcc24, 0x0fffcc04, 0x08ffcc00, 0x03ffcc4c
+ .long 0x08ffcc00, 0x03ffcc4c, 0x08ffcc00, 0x03ffcc4c
+ .long 0x08ffcc00, 0x33ffcc47
+# /* offsets 12-17 not used */
+ .long 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 70ns - single write. (offset 18 in upm RAM) */
+ .long 0x0fafcc04, 0x08afcc00, 0x3fbfcc47
+# /* offsets 1b-1f not used */
+ .long 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 70ns - burst write. (offset 20 in upm RAM) */
+ .long 0x0fafcc04, 0x0cafcc00, 0x01afcc4c, 0x0cafcc00
+ .long 0x01afcc4c, 0x0cafcc00, 0x01afcc4c, 0x0cafcc00
+ .long 0x31bfcc43
+# /* offsets 29-2f not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 70ns - refresh. (offset 30 in upm RAM) */
+ .long 0xc0ffcc84, 0x01ffcc04, 0x7fffcc86, 0xffffcc05
+# /* offsets 34-3b not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 70ns - exception. (offset 3c in upm RAM) */
+ .long 0x33ffcc07
+# /* offset 3d-3f not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff
+UpmTable70End:
+
+/* UPM initialization table, 60ns EDO DRAMs, 25MHz */
+
+UpmTableEdo60:
+/* DRAM 60ns - single read. (offset 0 in upm RAM) */
+ .long 0x0ffbcc04, 0x0cf3cc04, 0x00f3cc00, 0x33f7cc47
+/* offsets 6-7 not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+/* DRAM 60ns - burst read. (offset 8 in upm RAM) */
+ .long 0x0ffbcc04, 0x09f3cc0c, 0x09f3cc0c, 0x09f3cc0c
+ .long 0x08f3cc00, 0x3ff7cc47
+/* offsets 0e-17 not used */
+ .long 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+/* DRAM 60ns - single write. (offset 18 in upm RAM) */
+ .long 0x0fefcc04, 0x08afcc04, 0x00afcc00, 0x3fbfcc47
+/* offsets 1c-1f not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+/* DRAM 60ns - burst write. (offset 20 in upm RAM) */
+ .long 0x0fefcc04, 0x08afcc00, 0x07afcc48, 0x08afcc48
+ .long 0x08afcc48, 0x39bfcc47
+/* offsets 26-2f not used */
+ .long 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+/* DRAM 60ns - refresh. (offset 30 in upm RAM) */
+ .long 0x80ffcc84, 0x13ffcc04, 0xffffcc87, 0xffffcc05
+/* offsets 34-3b not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+/* DRAM 60ns - exception. (offset 3c in upm RAM) */
+ .long 0x33ffcc07
+/* offset 3d-3f not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff
+UpmTableEdo60End:
+
+/* UPM initialization table, EDO, 70ns DRAM, 25MHz */
+
+UpmTableEdo70:
+/* DRAM 70ns - single read. (offset 0 in upm RAM) */
+ .long 0x0ffbcc04, 0x0cf3cc04, 0x00f3cc00, 0x33f7cc47
+/* offsets 6-7 not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+/* DRAM 70ns - burst read. (offset 8 in upm RAM) */
+ .long 0x0ffbec04, 0x08f3ec04, 0x03f3ec48, 0x08f3cc00
+ .long 0x0ff3cc4c, 0x08f3cc00, 0x0ff3cc4c, 0x08f3cc00
+ .long 0x3ff7cc47
+/* offsets 11-17 not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+/* DRAM 70ns - single write. (offset 18 in upm RAM) */
+ .long 0x0fefcc04, 0x08afcc04, 0x00afcc00, 0x3fbfcc47
+/* offsets 1c-1f not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+/* DRAM 70ns - burst write. (offset 20 in upm RAM) */
+ .long 0x0fefcc04, 0x08afcc00, 0x07afcc4c, 0x08afcc00
+ .long 0x07afcc4c, 0x08afcc00, 0x07afcc4c, 0x08afcc00
+ .long 0x37bfcc47
+/* offsets 29-2f not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+/* DRAM 70ns - refresh. (offset 30 in upm RAM) */
+ .long 0xc0ffcc84, 0x01ffcc04, 0x7fffcc86, 0xffffcc05
+/* offsets 34-3b not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+/* DRAM 70ns - exception. (offset 3c in upm RAM) */
+ .long 0x33ffcc07
+/* offset 3d-3f not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff
+UpmTableEdo70End:
+
+#endif
+
+#endif /* ifndef CDCIM */
+
+/* CK */
+UpmTable:
+#
+# /* DRAM - single read. (offset 0 in upm RAM) */
+ .long 0x1f07fc04, 0xeeaefc04, 0x11adfc04, 0xefbbbc00
+ .long 0x1ff77c47, 0x1ff77c35, 0xefeabc34, 0x1fb57c35
+# /* DRAM 70ns - burst read. (offset 8 in upm RAM) */
+ .long 0x1f07fc04, 0xeeaefc04, 0x10adfc04, 0xf0affc00
+ .long 0xf0affc00, 0xf1affc00, 0xefbbbc00, 0x1ff77c47
+ .long 0xffffffff, 0xffffffff
+# /* offsets 12-17 not used */
+ .long 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM - single write. (offset 18 in upm RAM) */
+ .long 0x1f27fc04, 0xeeaebc00, 0x01b93c04
+# /* offsets 1b-1f not used */
+ .long 0x1ff77c47
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM - burst write. (offset 20 in upm RAM) */
+ .long 0x1f07fc04, 0xeeaebc00, 0x10ad7c00, 0xf0affc00
+ .long 0xf0affc00, 0xe1bbbc04, 0x1ff77c47, 0xffffffff
+ .long 0xffffffff
+# /* offsets 29-2f not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM - refresh. (offset 30 in upm RAM) */
+ .long 0x1ff5fc84, 0xfffffc04, 0xfffffc04, 0xfffffc04
+# /* offsets 34-3b not used */
+ .long 0xfffffc84, 0xfffffc07, 0xffffffff, 0xffffffff
+ .long 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+# /* DRAM 70ns - exception. (offset 3c in upm RAM) */
+ .long 0x7ffffc07
+# /* offset 3d-3f not used */
+ .long 0xffffffff, 0xffffffff, 0xffffffff
+UpmTableEnd:
diff --git a/data/mnet/GP10/Host/Cdc_bsp/sysALib.s b/data/mnet/GP10/Host/Cdc_bsp/sysALib.s
new file mode 100644
index 0000000..6b2cae1
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/sysALib.s
@@ -0,0 +1,170 @@
+/*
+JetCell modification history
+----------------------------
+99/03/22 ck Add JetCell modification history
+99/03/15 ck Fix conditional compile
+99/02/18 ck Changes for CDCIM
+99/02/18 ck Initial revision. Copied from ads860 bsp.
+*/
+
+/* sysALib.s - Motorola 860ads system-dependent assembly routines */
+
+/* Copyright 1984-1998 Wind River Systems, Inc. */
+ .data
+ .globl copyright_wind_river
+ .long copyright_wind_river
+
+/*
+modification history
+--------------------
+01e,09nov98,cn added support for FADS860T boards.
+01d,12jan98,dat SPR 20104, correct use of HI and HIADJ macros
+01c,04nov96,tpr clean up + fix SPR # 7173.
+01b,24may96,tpr added MMU initialization.
+01a,19apr96,tpr written.
+*/
+
+/*
+DESCRIPTION
+This module contains system-dependent routines written in assembly
+language.
+
+This module must be the first specified in the \f3ld\f1 command used to
+build the system. The sysInit() routine is the system start-up code.
+*/
+
+#define _ASMLANGUAGE
+#include "vxWorks.h"
+#include "asm.h"
+#include "cacheLib.h"
+#include "config.h"
+#include "regs.h"
+#include "sysLib.h"
+
+ /* globals */
+
+ .globl _sysInit /* start of system code */
+
+ /* externals */
+
+ .extern usrInit
+
+ .text
+
+/*******************************************************************************
+*
+* sysInit - start after boot
+*
+* This is the system start-up entry point for VxWorks in RAM, the
+* first code executed after booting. It disables interrupts, sets up
+* the stack, and jumps to the C routine usrInit() in usrConfig.c.
+*
+* The initial stack is set to grow down from the address of sysInit(). This
+* stack is used only by usrInit() and is never used again. Memory for the
+* stack must be accounted for when determining the system load address.
+*
+* NOTE: This routine should not be called by the user.
+*
+* RETURNS: N/A
+
+* sysInit (void) /@ THIS IS NOT A CALLABLE ROUTINE @/
+
+*/
+
+_sysInit:
+ /*
+ * disable external interrupts and Instruction/Data MMU, set
+ * the exception prefix
+ */
+
+ mfmsr p0 /* p0 = msr */
+ INT_MASK(p0, p1) /* mask EE bit */
+ rlwinm p1, p1, 0, _PPC_MSR_BIT_DR + 1, _PPC_MSR_BIT_IR - 1
+ rlwinm p1, p1, 0, _PPC_MSR_BIT_IP + 1, _PPC_MSR_BIT_IP - 1
+ mtmsr p1 /* msr = p1 */
+ isync /* ISYNC */
+
+ /* disable instruction and data caches */
+
+ lis p1, HIADJ ( CACHE_CMD_DISABLE) /* load disable cmd */
+ addi p1, p1, LO (CACHE_CMD_DISABLE)
+ mtspr IC_CST, p1 /* Disable I cache */
+ mtspr DC_CST, p1 /* Disable D cache */
+
+ /* unlock instruction and data caches */
+
+ lis p1, HIADJ ( CACHE_CMD_UNLOCK_ALL) /* load unlock cmd */
+ addi p1, p1, LO (CACHE_CMD_UNLOCK_ALL)
+ mtspr IC_CST, p1 /* Unlock I cache */
+ mtspr DC_CST, p1 /* Unlock D cache */
+
+ /* invalidate instruction and data caches */
+
+ lis p1, HIADJ ( CACHE_CMD_INVALIDATE) /* load invalidate cmd*/
+ addi p1, p1, LO (CACHE_CMD_INVALIDATE)
+ mtspr IC_CST, p1 /* Invalidate I cache */
+ mtspr DC_CST, p1 /* Invalidate D cache */
+
+ /* invalidate entries within both TLBs */
+
+ tlbia
+
+#ifndef CDCIM
+ /* Get the board revision number */
+
+ lis r4, HIADJ(BCSR3) /* load r4 with the BCSR3 address */
+ lwz r5, LO(BCSR3)(r4) /* load r5 with the BCSR3 value */
+
+ lis r4, HI(BCSR3_BREVN)
+ and r5, r5, r4 /* extract board revision number */
+
+ /* disable all devices (serial, ethernet, ...) */
+
+ cmpwi r5, 0 /* if board revision number is 0 (ENG)*/
+ bne noEngBoard
+
+ lis r4, HI(BCSR1_RESET_VAL_ENG) /* then use the ENG reset val */
+ bl bscr1Init
+
+noEngBoard:
+ lis r4, HI(BCSR1_RESET_VAL) /* otherwise normal value */
+
+bscr1Init:
+ lis r5, HIADJ (BCSR1)
+ stw r4, LO(BCSR1)(r5) /* reset the BCSR1 register */
+
+#ifdef FADS_860T
+ lis r4, HIADJ(BCSR4) /* load r4 with BCSR4 address */
+ lwz r5, LO(BCSR4)(r4) /* load r5 with BCSR4 value */
+ lis r4, HI(BCSR4_UUFDIS) /* load r4 with disable value */
+ or r5, r5, r4 /* load r5 with BCSR4 value */
+ lis r4, HI(~BCSR4_FETH_RST) /* load r4 with reset value */
+ and r5, r5, r4 /* load r5 with BCSR4 value */
+ lis r4, HIADJ(BCSR4) /* load r4 with BCSR4 address */
+ stw r5, LO(BCSR4)(r4) /* reset the FEC tranceiver */
+#endif
+#endif /* CDCIM */
+ /* initialize Small Data Area (SDA) start address */
+
+#if FALSE /* XXX TPR SDA not supported yet */
+ lis r2, HIADJ( _SDA2_BASE_)
+ addi r2, r2, LO(_SDA2_BASE_)
+
+ lis r13, HIADJ ( _SDA_BASE_)
+ addi r13, r13, LO(_SDA_BASE_)
+#endif
+
+ /* initialize the stack pointer */
+
+ lis sp, HIADJ( RAM_LOW_ADRS)
+ addi sp, sp, LO(RAM_LOW_ADRS)
+
+ /* set the default boot code */
+
+ lis r3, HIADJ( BOOT_WARM_AUTOBOOT)
+ addi r3, r3, LO(BOOT_WARM_AUTOBOOT)
+
+ /* jump to usrInit */
+
+ addi sp, sp, -FRAMEBASESZ /* get frame stack */
+ b usrInit /* never returns - starts up kernel */
diff --git a/data/mnet/GP10/Host/Cdc_bsp/sysLib.c b/data/mnet/GP10/Host/Cdc_bsp/sysLib.c
new file mode 100644
index 0000000..63192ab
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/sysLib.c
@@ -0,0 +1,1168 @@
+/*
+JetCell modification history
+----------------------------
+99/09/09 ck Include ataDrv.c to include ata driver
+ Do not include sysHpi.c
+ Add compactFlash in sysPhysMemDesc
+ Add constants for I/O memory addresse
+ Add sysMemMapInit
+99/06/01 ck Add i2c and nvram support. Change sysFecEnetAddrGet.
+99/03/22 ck Add JetCell modification history
+99/03/16 ck Changed ethernet adress to JetCell specific.
+ Changed sysModel to JetCell CDC.
+99/03/15 ck Add HPI support. Modify sysPhysMemDesc
+99/03/15 ck Fix conditional compile
+99/02/18 ck Changes for CDCIM
+99/02/18 ck Initial revision. Copied from ads860 bsp.
+*/
+
+/* sysLib.c - Motorola 860ads board system-dependent library */
+
+/* Copyright 1984-1997 Wind River Systems, Inc. */
+#include "copyright_wrs.h"
+
+/*
+modification history
+--------------------
+01k,12nov98,cn changed sysFecEnetEnable(), sysFecEnetDisable() to
+ include enable/disable of the Ethernet device.
+01j,09nov98,cn added support for FADS860T boards and FEC.
+01i,08may98,gls added clear of all cpm interrups in sysToMonitor
+01h,08mar98,gls added checks to allow BSP to work with the PPC850FADS
+01g,18feb98,gls added code to allow the BSP to work with the PPC823FADS
+01f,12nov97,map updated to use ppc860Timer.c [SPR# 9366]
+01e,21feb97,mas removed NOMANUAL, made sysHwInit2() visible to 'man' (SPR 7879)
+01d,11nov96,tam added power management mode initialization.
+01c,06nov96,tpr reworked sysHwInit().
+01b,28may96,dzb added Ethernet driver support routines.
+ added port initialization, and increased system to 24Mhz.
+01a,19apr96,tpr written.
+*/
+
+/*
+DESCRIPTION
+This library provides board-specific routines. The chip drivers included are:
+
+ ppc860Timer.c - PowerPC/860 Timer library
+
+INCLUDE FILES: sysLib.h
+
+SEE ALSO:
+.pG "Configuration"
+*/
+
+/* includes */
+
+#include "vxWorks.h"
+#include "vme.h"
+#include "memLib.h"
+#include "cacheLib.h"
+#include "sysLib.h"
+#include "config.h"
+#include "string.h"
+#include "intLib.h"
+#include "logLib.h"
+#include "stdio.h"
+#include "taskLib.h"
+#include "vxLib.h"
+#include "tyLib.h"
+#include "arch/ppc/vxPpcLib.h"
+#include "private/vmLibP.h"
+
+#include "drv/multi/ppc860Siu.h"
+/* CK */
+/* #include "ads860.h" */
+#include "cdcim.h"
+
+#ifdef INCLUDE_CPM
+#include "drv/netif/if_cpm.h"
+#endif
+
+#include "ds2401.c"
+#include "i2c.c"
+#include "bootFlash.c"
+#ifdef INCLUDE_ATA
+#include "ataDrv.c"
+#endif
+
+PHYS_MEM_DESC sysPhysMemDesc [] =
+{
+ {
+ (void *) LOCAL_MEM_LOCAL_ADRS,
+ (void *) LOCAL_MEM_LOCAL_ADRS,
+ LOCAL_MEM_SIZE ,
+ VM_STATE_MASK_VALID | VM_STATE_MASK_WRITABLE | VM_STATE_MASK_CACHEABLE,
+ VM_STATE_VALID | VM_STATE_WRITABLE | VM_STATE_CACHEABLE
+ },
+
+#ifndef CDCIM
+ {
+ (void *) BCSR0,
+ (void *) BCSR0,
+ 0x00001000, /* 4 k - Board Control and Status */
+ VM_STATE_MASK_VALID | VM_STATE_MASK_WRITABLE | VM_STATE_MASK_CACHEABLE,
+ VM_STATE_VALID | VM_STATE_WRITABLE | VM_STATE_CACHEABLE_NOT
+ },
+#endif
+
+ {
+ (void *) INTERNAL_MEM_MAP_ADDR,
+ (void *) INTERNAL_MEM_MAP_ADDR,
+ INTERNAL_MEM_MAP_SIZE, /* 64 k - Internal Memory Map */
+ VM_STATE_MASK_VALID | VM_STATE_MASK_WRITABLE | VM_STATE_MASK_CACHEABLE,
+ VM_STATE_VALID | VM_STATE_WRITABLE | VM_STATE_CACHEABLE_NOT
+ },
+
+ {
+ (void *) ROM_BASE_ADRS,
+ (void *) ROM_BASE_ADRS,
+ ROM_SIZE, /* Flach memory */
+ VM_STATE_MASK_VALID | VM_STATE_MASK_WRITABLE | VM_STATE_MASK_CACHEABLE,
+ VM_STATE_VALID | VM_STATE_WRITABLE | VM_STATE_CACHEABLE_NOT
+ },
+
+ {
+ (void *) DSP0_HPI_BASE_ADDR,
+ (void *) DSP0_HPI_BASE_ADDR,
+ 0x00001000,
+ VM_STATE_MASK_VALID | VM_STATE_MASK_WRITABLE | VM_STATE_MASK_CACHEABLE,
+ VM_STATE_VALID | VM_STATE_WRITABLE | VM_STATE_CACHEABLE_NOT
+ },
+
+ {
+ (void *) DSP1_HPI_BASE_ADDR,
+ (void *) DSP1_HPI_BASE_ADDR,
+ 0x00001000,
+ VM_STATE_MASK_VALID | VM_STATE_MASK_WRITABLE | VM_STATE_MASK_CACHEABLE,
+ VM_STATE_VALID | VM_STATE_WRITABLE | VM_STATE_CACHEABLE_NOT
+ },
+
+ {
+ (void *) AUX_PORT_ADDR,
+ (void *) AUX_PORT_ADDR,
+ 0x00001000,
+ VM_STATE_MASK_VALID | VM_STATE_MASK_WRITABLE | VM_STATE_MASK_CACHEABLE,
+ VM_STATE_VALID | VM_STATE_WRITABLE | VM_STATE_CACHEABLE_NOT
+ },
+
+ {
+ (void *) REV_DATA_ADDR,
+ (void *) REV_DATA_ADDR,
+ 0x00001000,
+ VM_STATE_MASK_VALID | VM_STATE_MASK_WRITABLE | VM_STATE_MASK_CACHEABLE,
+ VM_STATE_VALID | VM_STATE_WRITABLE | VM_STATE_CACHEABLE_NOT
+ },
+
+ {
+ (void *) CF_BASE_ADDR,
+ (void *) CF_BASE_ADDR,
+ 0x01000000,
+ VM_STATE_MASK_VALID | VM_STATE_MASK_WRITABLE | VM_STATE_MASK_CACHEABLE,
+ VM_STATE_VALID | VM_STATE_WRITABLE | VM_STATE_CACHEABLE_NOT
+ }
+};
+
+int sysPhysMemDescNumEnt = NELEMENTS (sysPhysMemDesc);
+
+int sysBus = BUS; /* system bus type (VME_BUS, etc) */
+int sysCpu = CPU; /* system CPU type (PPC860) */
+char *sysBootLine = BOOT_LINE_ADRS; /* address of boot line */
+char *sysExcMsg = EXC_MSG_ADRS; /* catastrophic message area */
+int sysProcNum; /* processor number of this CPU */
+int sysFlags; /* boot flags */
+char sysBootHost [BOOT_FIELD_LEN]; /* name of host from which we booted */
+char sysBootFile [BOOT_FIELD_LEN]; /* name of file from which we booted */
+BOOL sysVmeEnable = FALSE; /* by default no VME */
+
+const int sysCfBaseAddr = CF_BASE_ADDR; /* Compact flash base Addr */
+const int sysDsp0HpiBaseAddr = DSP0_HPI_BASE_ADDR; /* DSP0 HPI base Address */
+const int sysDsp1HpiBaseAddr = DSP1_HPI_BASE_ADDR; /* DSP1 HPI base address */
+const int sysAuxPortAddr = AUX_PORT_ADDR; /* Aux. Port address */
+
+
+
+
+#ifdef INCLUDE_CPM
+/* XXX set the following array to a unique Ethernet hardware address XXX */
+
+/* last 5 nibbles are board specific, initialized in sysHwInit */
+
+unsigned char sysCpmEnetAddr [6] = {0x08, 0x00, 0x3e, 0x03, 0x02, 0x01};
+
+extern STATUS cpmattach();
+
+#endif /* INCLUDE_CPM */
+
+#ifdef INCLUDE_ATA
+
+/* global data structures used by the EIDE/ATA driver */
+
+ATA_RESOURCE ataResources[ATA_MAX_CTRLS];
+
+/*
+ * This structure needs to be initialized for each EIDE/ATA device present
+ * in the system. It has the following layout:
+ * int cylinders;
+ * int heads;
+ * int sectorsTrack;
+ * int bytesSector;
+ * int precomp;
+ */
+
+ATA_TYPE ataTypes [ATA_MAX_CTRLS][ATA_MAX_DRIVES] =
+ {
+ {
+ {/* ATA_DEV0_CYL*/ 1, 0, 0, 512, 0xff}, /* controller 0, drive 0 */
+ {/* ATA_DEV1_CYL*/ 0, 0, 0, 512, 0xff}, /* controller 0, drive 1 */
+ },
+ {
+ {/* ATA_DEV2_CYL*/ 0, 0, 0, 512, 0xff}, /* controller 1, drive 0 */
+ {/* ATA_DEV3_CYL*/ 0, 0, 0, 512, 0xff}, /* controller 1, drive 1 */
+ }
+ };
+#endif /* INCLUDE_ATA */
+
+
+/* locals */
+
+void sysCpmEnetDisable (int unit);
+void sysCpmEnetIntDisable (int unit);
+LOCAL void sysAtaInit();
+LOCAL void sysMemMapInit();
+
+#ifdef INCLUDE_MOT_FEC
+
+/* set the following array to a unique Ethernet hardware address */
+/* set to JetCell specific address */
+
+unsigned char sysFecEnetAddr [6] = {0x00, 0xd0, 0x2b, 0x00, 0x00, 0x00};
+
+
+IMPORT STATUS sysFecEnetDisable (UINT32 motCpmaddr);
+
+#endif /* INCLUDE_MOT_FEC */
+
+
+#include "sysSerial.c"
+#include "intrCtl/ppc860Intr.c"
+#include "nvRam.c"
+#include "timer/ppc860Timer.c" /* PPC860 & 821 have on chip timers */
+
+/******************************************************************************
+*
+* sysModel - return the model name of the CPU board
+*
+* This routine returns the model name of the CPU board.
+*
+* RETURNS: A pointer to the string.
+*/
+
+char * sysModel (void)
+ {
+ return ("JetCell CDC - PowerPC 860T");
+ }
+
+/******************************************************************************
+*
+* sysBspRev - return the bsp version with the revision eg 1.0/<x>
+*
+* This function returns a pointer to a bsp version with the revision.
+* for eg. 1.0/<x>. BSP_REV defined in config.h is concatanated to
+* BSP_VERSION and returned.
+*
+* RETURNS: A pointer to the BSP version/revision string.
+*/
+
+char * sysBspRev (void)
+ {
+ return (BSP_VERSION BSP_REV);
+ }
+
+/******************************************************************************
+*
+* sysHwInit - initialize the system hardware
+*
+* This routine initializes various feature of the MPC860ADS boards. It sets up
+* the control registers, initializes various devices if they are present.
+*
+* NOTE: This routine should not be called directly by the user.
+*
+* RETURNS: N/A
+*/
+
+void sysHwInit (void)
+ {
+ int immrVal = vxImmrGet();
+
+ sysMemMapInit();
+
+ sysAtaInit();
+
+ /* initHpi(); */
+
+ /* set the SPLL to the value requested */
+
+ * PLPRCR(immrVal) = (*PLPRCR(immrVal) & ~PLPRCR_MF_MSK) |
+ (SPLL_MUL_FACTOR << PLPRCR_MF_SHIFT);
+
+ /* set the BRGCLK division factor */
+
+ * SCCR(immrVal) = (* SCCR(immrVal) & ~SCCR_DFBRG_MSK) |
+ (BRGCLK_DIV_FACTOR << SCCR_DFBRG_SHIFT);
+ /* set the Periodic Timer A value */
+
+ * MAMR(immrVal) = (* MAMR(immrVal) & ~MAMR_PTA_MSK) |
+ (PTA_VALUE << MAMR_PTA_SHIFT);
+
+ /* set the Periodic Timer PreScale */
+
+ * MPTPR(immrVal) = PTP_VALUE;
+
+ /* reset the port A */
+
+ *PAPAR(immrVal) = 0x0000;
+ *PADIR(immrVal) = 0x0000;
+ *PAODR(immrVal) = 0x0000;
+
+ /* reset the port B */
+
+ *PBPAR(immrVal) = 0x0000000;
+ *PBDIR(immrVal) = 0x0000000;
+ *PBODR(immrVal) = 0x0000000;
+
+ /* reset the port C */
+
+ *PCPAR(immrVal) = 0x0000;
+ *PCDIR(immrVal) = 0x0000;
+ *PCSO(immrVal) = 0x0000;
+
+ /* reset the port D */
+
+ *PDPAR(immrVal) = 0x0000;
+ *PDDIR(immrVal) = 0x0000;
+
+ *SICR(immrVal) = 0x0; /* initialize SI/NMSI connections */
+
+ /* Initialize interrupts */
+
+ ppc860IntrInit(IV_LEVEL4); /* default vector level */
+
+ /* Reset serial channels */
+
+ sysSerialHwInit();
+
+ /* make sure Ethernet is disabled */
+
+ sysCpmEnetDisable (0);
+ sysCpmEnetIntDisable (0);
+
+#ifdef INCLUDE_MOT_FEC
+
+ /* make sure the FEC is disabled */
+
+ sysFecEnetDisable (immrVal);
+
+#endif /* INCLUDE_MOT_FEC */
+
+ /*
+ * The power management mode is initialized here. Reduced power mode
+ * is activated only when the kernel is iddle (cf vxPowerDown).
+ * Power management mode is selected via vxPowerModeSet().
+ * DEFAULT_POWER_MGT_MODE is defined in config.h.
+ */
+
+ vxPowerModeSet (DEFAULT_POWER_MGT_MODE);
+ }
+
+/*******************************************************************************
+*
+* sysPhysMemTop - get the address of the top of physical memory
+*
+* This routine returns the address of the first missing byte of memory,
+* which indicates the top of memory.
+*
+* RETURNS: The address of the top of physical memory.
+*
+* SEE ALSO: sysMemTop()
+*/
+
+char * sysPhysMemTop (void)
+ {
+ static char * physTop = NULL;
+
+ if (physTop == NULL)
+ {
+ physTop = (char *)(LOCAL_MEM_LOCAL_ADRS + LOCAL_MEM_SIZE);
+ }
+
+ return (physTop) ;
+ }
+
+/*******************************************************************************
+*
+* sysMemTop - get the address of the top of VxWorks memory
+*
+* This routine returns a pointer to the first byte of memory not
+* controlled or used by VxWorks.
+*
+* The user can reserve memory space by defining the macro USER_RESERVED_MEM
+* in config.h. This routine returns the address of the reserved memory
+* area. The value of USER_RESERVED_MEM is in bytes.
+*
+* RETURNS: The address of the top of VxWorks memory.
+*/
+
+char * sysMemTop (void)
+ {
+ static char * memTop = NULL;
+
+ if (memTop == NULL)
+ {
+ memTop = sysPhysMemTop () - USER_RESERVED_MEM;
+ }
+
+ return memTop;
+ }
+
+
+/******************************************************************************
+*
+* sysToMonitor - transfer control to the ROM monitor
+*
+* This routine transfers control to the ROM monitor. Normally, it is called
+* only by reboot()--which services ^X--and bus errors at interrupt level.
+* However, in some circumstances, the user may wish to introduce a
+* <startType> to enable special boot ROM facilities.
+*
+* RETURNS: Does not return.
+*/
+
+STATUS sysToMonitor
+ (
+ int startType /* parameter passed to ROM to tell it how to boot */
+ )
+ {
+ FUNCPTR pRom = (FUNCPTR) (ROM_TEXT_ADRS + 4); /* Warm reboot */
+
+ *CIMR(vxImmrGet()) = 0; /* disable all cpm interupts */
+
+ sysCpmEnetDisable (0); /* disable the ethernet device */
+
+#ifdef INCLUDE_MOT_FEC
+
+ /* disable the FEC */
+
+ sysFecEnetDisable (vxImmrGet ());
+
+#endif /* INCLUDE_MOT_FEC */
+
+ sysSerialReset(); /* reset the serail device */
+
+ (*pRom) (startType); /* jump to bootrom entry point */
+
+ return (OK); /* in case we ever continue from ROM monitor */
+ }
+
+/******************************************************************************
+*
+* sysHwInit2 - additional system configuration and initialization
+*
+* This routine connects system interrupts and does any additional
+* configuration necessary.
+*
+* RETURNS: N/A
+*/
+
+void sysHwInit2 (void)
+ {
+ static BOOL configured = FALSE;
+ int immrVal;
+
+ if (!configured)
+ {
+
+ immrVal = vxImmrGet();
+
+ /* initialize serial interrupts */
+
+ sysSerialHwInit2();
+
+ * SCCR(immrVal) &= ~SCCR_TBS;
+
+ /* un-freeze the Time Base clock */
+
+ * TBSCR(immrVal) = TBSCR_TBE ;
+
+ I2CvxInit();
+ readDs2401();
+
+ configured = TRUE;
+ }
+ }
+
+/******************************************************************************
+*
+* sysProcNumGet - get the processor number
+*
+* This routine returns the processor number for the CPU board, which is
+* set with sysProcNumSet().
+*
+* RETURNS: The processor number for the CPU board.
+*
+* SEE ALSO: sysProcNumSet()
+*/
+
+int sysProcNumGet (void)
+ {
+ return (sysProcNum);
+ }
+
+/******************************************************************************
+*
+* sysProcNumSet - set the processor number
+*
+* This routine sets the processor number for the CPU board. Processor numbers
+* should be unique on a single backplane.
+*
+* Not applicable for the busless 860Ads.
+*
+* RETURNS: N/A
+*
+* SEE ALSO: sysProcNumGet()
+*
+*/
+
+void sysProcNumSet
+ (
+ int procNum /* processor number */
+ )
+ {
+ sysProcNum = procNum;
+ }
+
+/******************************************************************************
+*
+* sysLocalToBusAdrs - convert a local address to a bus address
+*
+* This routine gets the VMEbus address that accesses a specified local
+* memory address.
+*
+* Not applicable for the 860Ads
+*
+* RETURNS: ERROR, always.
+*
+* SEE ALSO: sysBusToLocalAdrs()
+*/
+
+STATUS sysLocalToBusAdrs
+ (
+ int adrsSpace, /* bus address space where busAdrs resides */
+ char * localAdrs, /* local address to convert */
+ char ** pBusAdrs /* where to return bus address */
+ )
+ {
+ return (ERROR);
+ }
+
+/******************************************************************************
+*
+* sysBusToLocalAdrs - convert a bus address to a local address
+*
+* This routine gets the local address that accesses a specified VMEbus
+* physical memory address.
+*
+* Not applicable for the 860Ads
+*
+* RETURNS: ERROR, always.
+*
+* SEE ALSO: sysLocalToBusAdrs()
+*/
+
+STATUS sysBusToLocalAdrs
+ (
+ int adrsSpace, /* bus address space where busAdrs resides */
+ char * busAdrs, /* bus address to convert */
+ char ** pLocalAdrs /* where to return local address */
+ )
+ {
+ return (ERROR);
+ }
+
+/******************************************************************************
+*
+* sysBusTas - test and set a location across the bus
+*
+* This routine does an atomic test-and-set operation across the backplane.
+*
+* Not applicable for the 860Ads.
+*
+* RETURNS: FALSE, always.
+*
+* SEE ALSO: vxTas()
+*/
+
+BOOL sysBusTas
+ (
+ char * adrs /* address to be tested-and-set */
+ )
+ {
+ return (FALSE);
+ }
+
+/******************************************************************************
+*
+* sysBusClearTas - test and clear
+*
+* This routine is a null function.
+*
+* RETURNS: N/A
+*/
+
+void sysBusClearTas
+ (
+ volatile char * address /* address to be tested-and-cleared */
+ )
+ {
+ }
+
+/*******************************************************************************
+*
+* sysCpmEnetDisable - disable the Ethernet controller
+*
+* This routine is expected to perform any target specific functions required
+* to disable the Ethernet controller. This usually involves disabling the
+* Transmit Enable (TENA) signal.
+*
+* RETURNS: N/A
+*/
+
+void sysCpmEnetDisable
+ (
+ int unit /* not used - only slave SCC1 is wired to port */
+ )
+ {
+#ifndef CDCIM
+ *BCSR1 |= BCSR1_ETHN_EN_L; /* disable Ethernet device */
+
+ /* If running an 823, use SCC2 */
+ if (((*BCSR3 & BCSR3_DBID_MASK) == BCSR3_823DB_MASK) ||
+ ((*BCSR3 & BCSR3_DBID_MASK) == BCSR3_850DB_MASK))
+ {
+ *PBPAR(vxImmrGet()) &= ~(0x2000); /* set port B -> RTS2 = *TENA */
+ }
+
+ else
+ *PBPAR(vxImmrGet()) &= ~(0x1000); /* set port B -> RTS1 = *TENA */
+#endif /* CDCIM */
+}
+
+/*******************************************************************************
+*
+* sysCpmEnetIntDisable - disable the Ethernet interface interrupt
+*
+* This routine disable the interrupt for the Ethernet interface specified
+* by <unit>.
+*
+* RETURNS: N/A.
+*/
+
+void sysCpmEnetIntDisable
+ (
+ int unit
+ )
+ {
+#ifndef CDCIM
+ /* If running an 823, use SCC2 */
+ if (((*BCSR3 & BCSR3_DBID_MASK) == BCSR3_823DB_MASK) ||
+ ((*BCSR3 & BCSR3_DBID_MASK) == BCSR3_850DB_MASK))
+ {
+ *CIMR(vxImmrGet()) &= ~CIMR_SCC2;
+ }
+ else
+ *CIMR(vxImmrGet()) &= ~CIMR_SCC1;
+#endif /* CDCIM */
+ }
+#ifdef INCLUDE_CPM
+/*******************************************************************************
+*
+* sysCpmEnetEnable - enable the Ethernet controller
+*
+* This routine is expected to perform any target specific functions required
+* to enable the Ethernet controller. These functions typically include
+* enabling the Transmit Enable signal (TENA) and connecting the transmit
+* and receive clocks to the SCC.
+*
+* RETURNS: OK, or ERROR if the Ethernet controller cannot be enabled.
+*/
+
+STATUS sysCpmEnetEnable
+ (
+ int unit /* not used - only slave SCC1 is wired to port */
+ )
+ {
+ int immrVal = vxImmrGet();
+
+ /* If running an 823, use SCC2 */
+ if (((*BCSR3 & BCSR3_DBID_MASK) == BCSR3_823DB_MASK) ||
+ ((*BCSR3 & BCSR3_DBID_MASK) == BCSR3_850DB_MASK))
+ {
+ *PAPAR(immrVal) |= 0x030c;
+ *PADIR(immrVal) &= ~(0x030c);
+
+ *PCPAR(immrVal) &= ~(0x00c0);
+ *PCDIR(immrVal) &= ~(0x00c0);
+ *PCSO(immrVal) |= 0x00c0;
+
+ *BCSR4 &= ~(BCSR4_ETHLOOP | BCSR4_TFPLDL_L | BCSR4_TPSQEL_L |
+ BCSR4_MODEM_EN_L | BCSR4_DATA_VOICE_L);
+
+ *SICR(immrVal) |= 0x2c00; /* connect SCC2 clocks */
+ *SICR(immrVal) &= ~(0x4000); /* NMSI mode */
+
+ *BCSR1 &= ~(BCSR1_ETHN_EN_L);
+
+ *PBPAR(immrVal) |= 0x00002000; /* set port B -> *RTS2 = TENA */
+ *PBDIR(immrVal) |= 0x00002000;
+ }
+
+ else
+ {
+ *PAPAR(immrVal) |= 0x0303;
+ *PADIR(immrVal) &= ~(0x0303);
+
+ *PCPAR(immrVal) &= ~(0x0030);
+ *PCDIR(immrVal) &= ~(0x0030);
+ *PCSO(immrVal) |= 0x0030;
+
+ *PCDIR(immrVal) |= 0x0f00;
+ *PCDAT(immrVal) |= 0x0600;
+ *PCDAT(immrVal) &= ~(0x0900);
+
+ *SICR(immrVal) |= 0x2c; /* connect SCC1 clocks */
+ *SICR(immrVal) &= ~(0x40); /* NMSI mode */
+
+ *BCSR1 &= ~(BCSR1_ETHN_EN_L); /* enable Ethernet */
+
+ *PBPAR(immrVal) |= 0x00001000; /* set port B -> *RTS1 = TENA */
+ *PBDIR(immrVal) |= 0x00001000;
+ }
+
+
+ return (OK);
+ }
+
+/*******************************************************************************
+*
+* sysCpmEnetAddrGet - get the hardware Ethernet address
+*
+* This routine provides the six byte Ethernet hardware address that will be
+* used by each individual Ethernet device unit. This routine must copy
+* the six byte address to the space provided by <addr>.
+*
+* RETURNS: OK, or ERROR if the Ethernet address cannot be returned.
+*/
+
+STATUS sysCpmEnetAddrGet
+ (
+ int unit, /* not used - only slave SCC1 is wired to port */
+ UINT8 * addr
+ )
+ {
+ bcopy ((char *) sysCpmEnetAddr, (char *) addr, sizeof (sysCpmEnetAddr));
+
+ return (OK);
+ }
+
+/*******************************************************************************
+*
+* sysCpmEnetCommand - issue a command to the Ethernet interface controller
+*
+* RETURNS: OK, or ERROR if the Ethernet controller could not be restarted.
+*/
+
+STATUS sysCpmEnetCommand
+ (
+ int unit,
+ UINT16 command
+ )
+ {
+ int immrVal = vxImmrGet();
+
+ /* If running an 823, use SCC2 */
+ if (((*BCSR3 & BCSR3_DBID_MASK) == BCSR3_823DB_MASK) ||
+ ((*BCSR3 & BCSR3_DBID_MASK) == BCSR3_850DB_MASK))
+ {
+ while (*CPCR(immrVal) & CPM_CR_FLG);
+ *CPCR(immrVal) = CPM_CR_CHANNEL_SCC2 | command | CPM_CR_FLG;
+ while (*CPCR(immrVal) & CPM_CR_FLG);
+ }
+
+ else
+ {
+ while (*CPCR(immrVal) & CPM_CR_FLG);
+ *CPCR(immrVal) = CPM_CR_CHANNEL_SCC1 | command | CPM_CR_FLG;
+ while (*CPCR(immrVal) & CPM_CR_FLG);
+ }
+
+ return (OK);
+ }
+
+/*******************************************************************************
+*
+* sysCpmEnetIntEnable - enable the Ethernet interface interrupt
+*
+* This routine enable the interrupt for the Ethernet interface specified
+* by <unit>.
+*
+* RETURNS: N/A.
+*/
+
+void sysCpmEnetIntEnable
+ (
+ int unit
+ )
+ {
+
+ /* If running an 823, use SCC2 */
+ if (((*BCSR3 & BCSR3_DBID_MASK) == BCSR3_823DB_MASK) ||
+ ((*BCSR3 & BCSR3_DBID_MASK) == BCSR3_850DB_MASK))
+ {
+ *CIMR(vxImmrGet()) |= CIMR_SCC2;
+ }
+
+ else
+ *CIMR(vxImmrGet()) |= CIMR_SCC1;
+
+ }
+
+/*******************************************************************************
+*
+* sysCpmEnetIntClear - clear the Ethernet interface interrupt
+*
+* This routine clears the interrupt for the Ethernet interface specified
+* by <unit>.
+*
+* RETURNS: N/A.
+*/
+
+void sysCpmEnetIntClear
+ (
+ int unit
+ )
+ {
+
+ /* If running an 823, use SCC2 */
+ if (((*BCSR3 & BCSR3_DBID_MASK) == BCSR3_823DB_MASK) ||
+ ((*BCSR3 & BCSR3_DBID_MASK) == BCSR3_850DB_MASK))
+ {
+ *CISR(vxImmrGet()) = CISR_SCC2;
+ }
+
+ else
+ *CISR(vxImmrGet()) = CISR_SCC1;
+ }
+
+/*******************************************************************************
+*
+* sysCpmAttach - attach wrapper
+*
+*/
+
+STATUS sysCpmAttach
+ (
+ int unit, /* unit number */
+ SCC * pScc, /* address of SCC parameter RAM */
+ SCC_REG * pSccReg, /* address of SCC registers */
+ VOIDFUNCPTR * ivec, /* interrupt vector offset */
+ SCC_BUF * txBdBase, /* transmit buffer descriptor base address */
+ SCC_BUF * rxBdBase, /* receive buffer descriptor base address */
+ int txBdNum, /* number of transmit buffer descriptors */
+ int rxBdNum, /* number of receive buffer descriptors */
+ UINT8 * bufBase /* address of memory pool; NONE = malloc it */
+ )
+ {
+
+ /* If running an 823, use SCC2 */
+ if (((*BCSR3 & BCSR3_DBID_MASK) == BCSR3_823DB_MASK) ||
+ ((*BCSR3 & BCSR3_DBID_MASK) == BCSR3_850DB_MASK))
+ {
+ return (cpmattach(unit, IF_USR_823ARG1, IF_USR_823ARG2, IF_USR_823ARG3,
+ txBdBase, rxBdBase, txBdNum, rxBdNum, bufBase));
+ }
+
+ /* else use SCC1 */
+ else
+ return (cpmattach(unit, pScc, pSccReg, ivec,
+ txBdBase, rxBdBase, txBdNum, rxBdNum, bufBase));
+ }
+
+
+#endif /* INCLUDE_CPM */
+
+#ifdef INCLUDE_MOT_FEC
+
+/*******************************************************************************
+*
+* sysFecEnetEnable - enable the MII interface of the Fast Ethernet controller
+*
+* This routine is expected to perform any target specific functions required
+* to enable the Ethernet device and the MII interface of the Fast Ethernet
+* controller. These functions include setting the MII-compliant signals on
+* Port D and disabling the IRQ7 signal.
+*
+* This routine does not enable the 7-wire serial interface.
+*
+* RETURNS: OK, or ERROR if the Fast Ethernet controller cannot be enabled.
+*/
+
+STATUS sysFecEnetEnable
+ (
+ UINT32 motCpmAddr /* base address of the on-chip RAM */
+ )
+ {
+ int intLevel = intLock();
+
+ /* enable the Ethernet device for the FEC */
+
+#ifndef CDCIM
+ *BCSR4 |= (BCSR4_FETH_RST | BCSR4_FETH_CFG0
+ | BCSR4_FETH_CFG1 | BCSR4_FETH_FDE);
+ *BCSR4 &= ~BCSR4_UUFDIS;
+#endif /* CDCIM */
+
+ /* mask IRQ7 off, as it is shared with MII_TX_CLK */
+
+ *SIMASK (motCpmAddr) &= ~SIMASK_IRM7;
+
+ /* also clear any pending interrupt */
+
+ *SIPEND (motCpmAddr) |= SIPEND_IRQ7;
+
+ /*
+ * set the arbitration level for the FEC. Do not enable
+ * FEC aggressive mode.
+ */
+
+ *SDCR (motCpmAddr) |= SDCR_FAID_BR6;
+
+ /* set Port D to use MII signals */
+
+ *PDPAR (motCpmAddr) = 0x1fff;
+ *PDDIR (motCpmAddr) = 0x1c58;
+
+ intUnlock (intLevel);
+
+ return (OK);
+ }
+
+/*******************************************************************************
+*
+* sysFecEnetDisable - disable MII interface to the Fast Ethernet controller
+*
+* This routine is expected to perform any target specific functions required
+* to disable the Ethernet device and the MII interface to the Fast Ethernet
+* controller. This involves restoring the default values for all the Port
+* D signals.
+*
+* RETURNS: OK, always.
+*/
+
+STATUS sysFecEnetDisable
+ (
+ UINT32 motCpmAddr /* base address of the on-chip RAM */
+ )
+ {
+ int intLevel = intLock();
+
+ /* disable the Ethernet device for the FEC */
+#ifndef CDCIM
+ *BCSR4 |= BCSR4_UUFDIS;
+ *BCSR4 &= ~BCSR4_FETH_RST;
+#endif /* CDCIM */
+ /* configure all Port D pins as general purpose input pins */
+
+ *PDPAR (motCpmAddr) = 0x0;
+ *PDDIR (motCpmAddr) = 0x0;
+
+ intUnlock (intLevel);
+
+ return (OK);
+ }
+
+/*******************************************************************************
+*
+* sysFecEnetAddrGet - get the hardware Ethernet address
+*
+* This routine provides the six byte Ethernet hardware address that will be
+* used by each individual Fast Ethernet device unit. This routine must copy
+* the six byte address to the space provided by <addr>.
+*
+* RETURNS: OK, or ERROR if the Ethernet address cannot be returned.
+*/
+
+STATUS sysFecEnetAddrGet
+ (
+ UINT32 motCpmAddr, /* base address of the on-chip RAM */
+ UCHAR * addr /* where to copy the Ethernet address */
+ )
+ {
+#if 0
+ bcopy ((char *) sysFecEnetAddr, (char *) addr, sizeof (sysFecEnetAddr));
+#endif
+ if (sysEnetAddrGet(0, sysFecEnetAddr) != OK) return ERROR;
+ addr[0] = sysFecEnetAddr[5];
+ addr[1] = sysFecEnetAddr[4];
+ addr[2] = sysFecEnetAddr[3];
+ addr[3] = sysFecEnetAddr[2];
+ addr[4] = sysFecEnetAddr[1];
+ addr[5] = sysFecEnetAddr[0];
+ return (OK);
+ }
+
+#endif /* INCLUDE_MOT_FEC */
+
+
+/******************************************************************************
+*
+* sysAtaInit - initialize the EIDE/ATA interface
+*
+* Perform the necessary initialization required before starting up the
+* ATA/EIDE driver.
+*/
+
+LOCAL void sysAtaInit
+ (
+#ifndef CDCIM
+ int pciBusNo, /* PCI bus number */
+ int pciDevNo, /* PCI device number */
+ int pciFuncNo /* PCI function number */
+#endif /* CDCIM */
+ )
+ {
+#ifdef INCLUDE_ATA
+
+#ifndef CDCIM
+ UINT16 readValue;
+ int baseAddr;
+
+ /* read the WINBOND IDE Device Control register */
+
+ pciConfigInWord (pciBusNo, pciDevNo, pciFuncNo, PCI_CFG_COMMAND,
+ &readValue);
+
+ /* enable the IDE I/O decodes */
+
+ readValue |= PCI_CMD_IO_ENABLE;
+
+ /* disable bus master mode, memory write and invalidate bits */
+
+ readValue &= ~(PCI_CMD_MASTER_ENABLE | PCI_CMD_WI_ENABLE);
+ pciConfigOutWord (pciBusNo, pciDevNo, pciFuncNo, PCI_CFG_COMMAND,
+ readValue );
+
+ /* read the Port0 and Port1 Primary/Auxillary Register addresses */
+
+ pciConfigInLong (pciBusNo, pciDevNo, pciFuncNo, PCI_CFG_BASE_ADDRESS_0,
+ &baseAddr);
+ ataResources[0].resource.ioStart[0] =
+ (CPU_PCI_IO_BA | (baseAddr & PCI_IOBASE_MASK));
+ pciConfigInLong (pciBusNo, pciDevNo, pciFuncNo, PCI_CFG_BASE_ADDRESS_1,
+ &baseAddr);
+
+ /* Base Address Reg 1 only decodes byte lane 2 */
+
+ ataResources[0].resource.ioStart[1] =
+ (CPU_PCI_IO_BA | ((baseAddr & PCI_IOBASE_MASK) + 2));
+ pciConfigInLong (pciBusNo, pciDevNo, pciFuncNo, PCI_CFG_BASE_ADDRESS_2,
+ &baseAddr);
+ ataResources[1].resource.ioStart[0] =
+ (CPU_PCI_IO_BA | (baseAddr & PCI_IOBASE_MASK));
+ pciConfigInLong (pciBusNo, pciDevNo, pciFuncNo, PCI_CFG_BASE_ADDRESS_3,
+ &baseAddr);
+
+ /* Base Address Reg 3 only decodes byte lane 2 */
+
+ ataResources[1].resource.ioStart[1] =
+ (CPU_PCI_IO_BA | ((baseAddr & PCI_IOBASE_MASK) + 2));
+ pciConfigInLong (pciBusNo, pciDevNo, pciFuncNo, PCI_CFG_BASE_ADDRESS_3,
+ &baseAddr);
+#endif /* CDCIM */
+
+ /*
+ * initialize the remainder of the ataRsources structure
+ *
+ * initialize the Controller 0 data structure
+ */
+
+ ataResources[0].ctrlType = IDE_LOCAL;
+#ifndef CDCIM
+ ataResources[0].drives = 2;
+ ataResources[0].intVector = IVEC_TO_INUM (IV_IDE0); /* Interrupt number */
+ ataResources[0].intLevel = IVEC_TO_ILVL (IV_IDE0); /* Interrupt level */
+ ataResources[0].configType = (ATA_PIO_AUTO | ATA_GEO_PHYSICAL);
+#else if
+ ataResources[0].drives = 1;
+ ataResources[0].intVector = 0; /* Interrupt number */
+ ataResources[0].intLevel = 0; /* Interrupt level */
+ ataResources[0].configType = (ATA_PIO_AUTO | ATA_GEO_PHYSICAL | ATA_BITS_16);
+#endif /* CDCIM */
+ ataResources[0].semTimeout = 0;
+ ataResources[0].wdgTimeout = 0;
+
+ /* initialize the Controller 1 data structure */
+
+ ataResources[1].ctrlType = IDE_LOCAL;
+#ifndef CDCIM
+ ataResources[1].drives = 2;
+ ataResources[1].intVector = IVEC_TO_INUM (IV_IDE1); /* Interrupt Number */
+ ataResources[1].intLevel = IVEC_TO_ILVL (IV_IDE1); /* Interrupt Level */
+ ataResources[1].configType = (ATA_PIO_AUTO | ATA_GEO_PHYSICAL);
+#else if
+ ataResources[1].drives = 1;
+ ataResources[1].intVector = 0; /* Interrupt Number */
+ ataResources[1].intLevel = 0; /* Interrupt Level */
+ ataResources[1].configType = (ATA_PIO_AUTO | ATA_GEO_PHYSICAL | ATA_BITS_16);
+#endif /* CDCIM */
+ ataResources[1].semTimeout = 0;
+ ataResources[1].wdgTimeout = 0;
+
+#endif /* INCLUDE_ATA */
+ }
+
+
+/*******************************************************************************
+sysMemMapInit
+
+set memory controller registers to set memory map (except RAM and boot flash)
+
+*/
+
+LOCAL void sysMemMapInit()
+{
+ /* chip select 1 */ /* Compact Flash */
+ *OR1(INTERNAL_MEM_MAP_ADDR)
+ = ( CF_ADDR_MASK | OR_CSNT_SAM | OR_ACS_DIV2 | OR_BI | OR_SCY_15_CLK | OR_TRLX);
+ *BR1(INTERNAL_MEM_MAP_ADDR)
+ = ( (CF_BASE_ADDR & BR_BA_MSK) | BR_MS_GPCM | BR_PS_16 | BR_V);
+
+ /* chip select 3 */ /* DSP 0 */
+ *BR3(INTERNAL_MEM_MAP_ADDR)
+ = ( (DSP0_HPI_BASE_ADDR & BR_BA_MSK) | BR_MS_GPCM | BR_PS_16 | BR_V);
+ *OR3(INTERNAL_MEM_MAP_ADDR)
+ = ( DSP0_HPI_ADDR_MASK | OR_BI | OR_ACS_DIV2 | OR_SETA);
+
+ /* chip select 4 */ /* DSP 1 */
+ *BR4(INTERNAL_MEM_MAP_ADDR)
+ = ( (DSP1_HPI_BASE_ADDR & BR_BA_MSK) | BR_MS_GPCM | BR_PS_16 | BR_V);
+ *OR4(INTERNAL_MEM_MAP_ADDR)
+ = ( DSP1_HPI_ADDR_MASK | OR_BI | OR_ACS_DIV2 | OR_SETA);
+
+ /* chip select 6 */ /* Aux Port */
+ *BR6(INTERNAL_MEM_MAP_ADDR)
+ = ( (AUX_PORT_ADDR & BR_BA_MSK) | BR_MS_GPCM | BR_PS_32 | BR_V);
+ *OR6(INTERNAL_MEM_MAP_ADDR)
+ = ( AUX_PORT_ADDR_MASK_V2 | OR_CSNT_SAM | OR_BI | OR_SCY_1_CLK | OR_TRLX);
+
+}
+
+
diff --git a/data/mnet/GP10/Host/Cdc_bsp/sysUser.c b/data/mnet/GP10/Host/Cdc_bsp/sysUser.c
new file mode 100644
index 0000000..960ac76
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/sysUser.c
@@ -0,0 +1,763 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/*******************************************************************************
+sysUser
+
+This file contains a set of functions to manage system users. It extends
+VxWorks login user feature by providing persistance records of user name and
+passwords and multiple permission levels.
+
+User records which consists of user name, encrypted password, and permission
+level are stored in a user record file. Each user name is unique. User with
+permission level 0 are considered 'super' users. These users are added to
+VxWorks login table to provide them permission to remote login by telnet
+and FTP. This makes VxWorks login table subset of user record file.
+
+It is ensured that three is at least one user with permission level 0. If there
+is no user with permission level 0 as might be the case at start up, a deafult
+user is considered a valid user with permission level 0. These default user is
+disabled when a user with permission level 0 is added. When the default user is
+a valid user of the system only 'super' user can be added. In other words the
+first user to be added to the system must have permission level 0.
+
+The user record file is a text file with a header and user records. If a file
+exists it is read at initialization. If it does not exist it is created with
+no user records.
+
+Each line in the file can have maximum 200 characters. The header consists of
+some inforation about the file sturcture. The number of lines in header and a
+record is 3. Future versions can increase the number of lines per record.
+A file created with future version is compatible with this version as the file
+structure infomation is obtained from the header. An exception is additon of
+new records.
+
+File Format:
+
+ ------------------------- -
+ |
+ -------------------------
+ 3 3 > Header
+ -------------------------
+ |
+ ------------------------- -
+ Name |
+ -------------------------
+ Encrypted Password > Record
+ -------------------------
+ level |
+ ------------------------- -
+ : :
+ : :
+ : :
+ ------------------------- -
+ Name |
+ -------------------------
+ Encrypted Password > Record
+ -------------------------
+ level |
+ ------------------------- -
+
+Available Functions:
+
+ sysUserInit - Initialize the sub system. Should be called once.
+ sysUserAdd - Adds a user.
+ sysUserDelete - Delets a user.
+ sysUserPasswdChange - Changes user password.
+ sysUserVerify - Verfies a user.
+ sysUserAllGet - Returns a list of user names.
+ sysUserShow - Prints the list of user names on stdio.
+*/
+
+#include <vxWorks.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <usrLib.h>
+#include <sysLib.h>
+#include <semLib.h>
+#include <errnoLib.h>
+#include "config.h"
+#include "sysUser.h"
+
+#define USER_FILE "vx/sysUser" /* User Record File */
+
+#define MAX_LINE_LEN 200 /* Maximum line size in the file */
+
+#define LINES_IN_HEADER 3
+#define LINES_IN_RECORD 3
+
+#define MAX_ENCRPT_PASSWD_LEN 80 /* Maximum length of encrypted password */
+
+ /* User Record stucture */
+typedef struct
+{
+ char name[MAX_USER_NAME_LEN + 1];
+ char passwdEncrpt[MAX_ENCRPT_PASSWD_LEN + 1];
+ int level;
+} UserRecord;
+
+static SEM_ID sysUserSem; /* Mutex semaphore to access user records */
+static char sysUserFileName[100]; /* User Record File */
+static int headerNumLines; /* number of lines in header (read from file) */
+static int recNumLines; /* number of lines in record (read from file) */
+static int numUsers; /* number of current users */
+static int numSuperUsers; /* number of current super user */
+BOOL defaultUserInUse; /* True if defualt user in usre */
+static char* passwdEncrptList[MAX_NUM_USERS]; /* Encrypted passwords for */
+ /* loginUserAdd should be static */
+
+STATUS sysUserPasswdEncrypt(char* in, char* out);
+STATUS sysUserAddFirstUser (const char *,const char *);
+
+/*******************************************************************************
+fSkipLines - File Skip Lines
+
+Moves given file pointer to skip given number of lines
+*/
+static STATUS fSkipLines /* RETURN: OK/ERROR */
+ (
+ FILE* fp, /* IN/OUT: file pointer */
+ int numLines /* IN: number of lines to skip */
+ )
+{
+ const int BuffSize = 80;
+ char buff[BuffSize];
+ char* pData = buff;
+ char lastChar;
+ int i;
+
+ for (i = 0; i < numLines; i++)
+ {
+ do
+ {
+ pData = fgets(buff, BuffSize, fp);
+ }
+ while (lastChar = buff[strlen(buff) -1],
+ ((lastChar != '\n') && (lastChar != '\r')) && (pData != NULL));
+ }
+ return (pData == NULL) ? ERROR : OK;
+}
+
+
+/*******************************************************************************
+sysUserRecGet - User Record Get
+
+Gets the user recoed pointed by fp. fp poines to the next record upon exit.
+*/
+static STATUS sysUserRecGet /* RETUEN: OK/ERROR */
+ (
+ FILE* fp, /* IN: file pointer */
+ UserRecord* rec /* OUT: user recoed */
+ )
+{
+ int retStat = ERROR;
+ const int MaxNameLen = MAX_USER_NAME_LEN + 1;
+ const int MaxPasswdEncrptLen = MAX_ENCRPT_PASSWD_LEN + 1;
+ char* name = rec->name;
+ char* passwdEncrpt = rec->passwdEncrpt;
+ char* pChar;
+
+ if (fgets(name, MaxNameLen, fp) != NULL) /* read name */
+ {
+ pChar = &name[strlen(name) - 2];
+ if ((*pChar == '\n') || (*pChar == '\r'))
+ *pChar = EOS; /* discard NL/CR */
+ pChar++;
+ if ((*pChar == '\n') || (*pChar == '\r'))
+ *pChar = EOS; /* discard NL/CR */
+ if (*pChar != EOS)
+ fSkipLines(fp, 1); /* lines is too long */
+ if (fgets(passwdEncrpt, MaxPasswdEncrptLen, fp) != NULL) /* read password */
+ {
+ pChar = &passwdEncrpt[strlen(passwdEncrpt) - 2];
+ if ((*pChar == '\n') || (*pChar == '\r'))
+ *pChar = EOS; /* discard NL/CR */
+ pChar++;
+ if ((*pChar == '\n') || (*pChar == '\r'))
+ *pChar = EOS; /* discard NL/CR */
+ if (*pChar != EOS)
+ fSkipLines(fp, 1); /* lines is too long */
+ if (fscanf(fp, "%d", &rec->level) != EOF) /* rad permission level */
+ {
+ fSkipLines(fp, 1 + recNumLines - 3); /* move fp to next record */
+ retStat = OK;
+ }
+ }
+ }
+ return retStat;
+}
+
+
+/*******************************************************************************
+sysUserInit - User Initialize
+
+This function initializes the System User sub system. It should be called once
+during vxWorks initialization.
+*/
+void sysUserInit()
+{
+ FILE* fp;
+ BOOL stop;
+ UserRecord usrRec;
+
+ loginEncryptInstall(sysUserPasswdEncrypt, NULL);
+
+ sysUserSem = semMCreate(SEM_Q_PRIORITY | SEM_DELETE_SAFE | SEM_INVERSION_SAFE);
+
+ sprintf(sysUserFileName, "%s/%s", getenv("VIPERCALL_BASE"), USER_FILE);
+ fp = fopen(sysUserFileName, "r");
+ if (fp != NULL)
+ {
+ if (fSkipLines(fp, 1) == OK)
+ if (fscanf(fp, "%d%d", &headerNumLines, &recNumLines) == 2)
+ if (fSkipLines(fp, headerNumLines - 1) == OK)
+ {
+ for (stop = FALSE, numUsers = 0, numSuperUsers = 0;
+ (stop == FALSE) && (numUsers < MAX_NUM_USERS);)
+ {
+ if (sysUserRecGet(fp, &usrRec) == OK)
+ {
+ if (usrRec.level == 0)
+ { /* super user */
+ /* Encrypted passwords for loginUserAdd should be static */
+ passwdEncrptList[numUsers] = malloc(MAX_ENCRPT_PASSWD_LEN + 1);
+ strcpy(passwdEncrptList[numUsers], usrRec.passwdEncrpt);
+ /* add to login table */
+ loginUserAdd(usrRec.name, passwdEncrptList[numUsers]);
+ numSuperUsers++;
+ }
+ numUsers++;
+ }
+ else
+ stop = TRUE;
+ }
+ if (numSuperUsers == 0)
+ { /* Add default user */
+ loginUserAdd(LOGIN_USER_NAME, LOGIN_PASSWORD);
+ defaultUserInUse = TRUE; /* make default user valid user */
+ }
+ else
+ defaultUserInUse = FALSE;
+ }
+ fclose(fp);
+ }
+ else
+ { /* No user record file */
+ /* create the file */
+ fp = fopen(sysUserFileName, "w");
+ /* write header */
+ fprintf(fp,"\n%d %d\n\n", LINES_IN_HEADER, LINES_IN_RECORD);
+ fclose(fp);
+ headerNumLines = LINES_IN_HEADER;
+ recNumLines = LINES_IN_HEADER;
+ /* Add default user to login table */
+ loginUserAdd(LOGIN_USER_NAME, LOGIN_PASSWORD);
+ defaultUserInUse = TRUE; /* make default user valid user */
+ numSuperUsers = 0;
+ }
+}
+
+
+/*******************************************************************************
+sysUserFind - User Find
+
+This functions checks if an entry with a given user name exsists in the user
+record file. It optionally returns index of the user in the file and the record.
+fp should point to begnning of the file.
+*/
+static STATUS sysUserFind /* RETURN: OK if user found else ERROR */
+ (
+ FILE* fp, /* IN: file pointer */
+ const char* userName, /* IN: name of user to find */
+ int* pUserNum, /* OUT: index of user in file if not NULL*/
+ UserRecord* pUserRec /* OUT: user record if not NULL*/
+ )
+{
+ STATUS retStat = ERROR;
+ UserRecord userRec;
+ int count;
+ BOOL stop;
+
+ fSkipLines(fp, headerNumLines);
+ if (pUserRec == NULL) pUserRec = &userRec;
+ for (count = 0, stop = FALSE;
+ (stop == FALSE) && (sysUserRecGet(fp, pUserRec) == OK); count++)
+ {
+ if (strcmp(pUserRec->name, userName) == 0)
+ { /* Found the user */
+ stop = TRUE;
+ retStat = OK;
+ }
+ }
+ if (pUserNum != NULL) *pUserNum = count - 1;
+ return retStat;
+}
+
+
+/*******************************************************************************
+sysUserAdd - User Add
+
+Adds a user to the list of valid system user.
+
+Adds a user name and password entry to user record file and optionally adds the
+user to login table. If user level is 0 ('super' user) user is added to
+vxWorks login table.
+*/
+STATUS sysUserAdd /* RETURN: OK/ERROR */
+ (
+ const char *name, /* IN: user name. Max.len. MAX_USER_NAME_LEN */
+ const char *passwd, /* IN: user password. Max. len MAX_USER_PASSWD_LEN */
+ int level /* IN: user permission level */
+ )
+{
+ STATUS retStat = ERROR;
+ FILE* fp;
+ char passwdEncrpt[MAX_ENCRPT_PASSWD_LEN + 1];
+
+ if ((numUsers > MAX_NUM_USERS) ||
+ (strlen(name) > MAX_USER_NAME_LEN) ||
+ (strlen(passwd) > MAX_USER_PASSWD_LEN))
+ return ERROR;
+
+ if ((defaultUserInUse == TRUE) && (level != 0))
+ return ERROR; /* first user must be 'super' user */
+
+ if (semTake(sysUserSem, sysClkRateGet() * 5) != OK)
+ return ERROR; /* only one access at a time */
+
+ fp = fopen(sysUserFileName, "r+");
+ if (fp != NULL)
+ {
+ if (sysUserFind(fp, name, NULL, NULL) != OK)
+ { /* user name is not in use */
+ if (sysUserPasswdEncrypt((char*)passwd, passwdEncrpt) == OK)
+ { /* password is long enough */
+ fseek(fp, 0, SEEK_END); /* write at the end */
+ if (fprintf(fp, "%s\n%s\n%d\n", name, passwdEncrpt, level) > 0)
+ {
+ if (level == 0)
+ { /* super user */
+ if (defaultUserInUse == TRUE)
+ { /* remove default user */
+ loginUserDelete(LOGIN_USER_NAME, LOGIN_PASSWORD);
+ defaultUserInUse = FALSE;
+ }
+ /* Encrypted passwords for loginUserAdd should be static */
+ passwdEncrptList[numUsers] = malloc(MAX_ENCRPT_PASSWD_LEN +1);
+ strcpy(passwdEncrptList[numUsers], passwdEncrpt);
+ loginUserAdd((char*)name, passwdEncrptList[numUsers]);
+ numSuperUsers++;
+ }
+ numUsers++;
+ retStat = OK;
+ }
+ }
+ }
+ fclose(fp);
+ }
+ semGive(sysUserSem);
+ return retStat;
+}
+
+
+/*******************************************************************************
+sysUserDelete - User Delete
+
+Deletes the user with given user name from list of valid users,
+
+Deletes from user info. file and if user level is 0 from the vxWorks login
+table. Last user with permission level 0 cannot be deleted.
+*/
+STATUS sysUserDelete /* RETURN: OK/ERROR */
+ (
+ const char *name /* IN: user name */
+ )
+{
+ STATUS retStat = ERROR;
+ FILE* fp;
+ FILE* fpTmp;
+ char tmpFile[100];
+ int userNum;
+ UserRecord userRec;
+ char buff[MAX_LINE_LEN + 1];
+ int i, j;
+ BOOL stop;
+
+
+ if (semTake(sysUserSem, sysClkRateGet() * 5) != OK)
+ return ERROR; /* only one access at a time */
+
+ fp = fopen(sysUserFileName, "r");
+ if (fp != NULL)
+ {
+ if (sysUserFind(fp, name, &userNum, &userRec) == OK)
+ { /* user found */
+ if ((userRec.level != 0) || (numSuperUsers > 1))
+ { /* cannot remove last super user */
+ sprintf(tmpFile, "%s.tmp", sysUserFileName);
+ fpTmp = fopen(tmpFile, "w");
+ if (fpTmp != NULL)
+ {
+ rewind(fp);
+ for (i = 0; i < headerNumLines; i++)
+ {
+ fgets(buff, MAX_LINE_LEN, fp);
+ fputs(buff, fpTmp);
+ }
+ for (i = 0, stop = FALSE; stop == FALSE; i++)
+ {
+ for (j = 0; (j < recNumLines) && (stop == FALSE); j++)
+ {
+ if (fgets(buff, MAX_LINE_LEN, fp) != NULL)
+ {
+ if (i != userNum)
+ fputs(buff, fpTmp);
+ }
+ else
+ stop = TRUE;
+ }
+ }
+ fclose(fp);
+ fclose(fpTmp);
+ if (copy(tmpFile, sysUserFileName) == OK)
+ {
+ numUsers--;
+ if (userRec.level == 0)
+ {
+ loginUserDelete(userRec.name, userRec.passwdEncrpt);
+ numSuperUsers--;
+ }
+ free(passwdEncrptList[userNum]);
+ for (i = userNum; i < MAX_NUM_USERS; i++)
+ {
+ passwdEncrptList[i] = passwdEncrptList[i + 1];
+ }
+ retStat = OK;
+ }
+ remove(tmpFile);
+ }
+ else
+ fclose(fp);
+ }
+ else
+ fclose(fp);
+ }
+ else
+ fclose(fp);
+ }
+ semGive(sysUserSem);
+ return retStat;
+}
+
+/*******************************************************************************
+sysUserVerify - User Verify
+
+Verifies if given user is valid system user. Checks for user name and password
+in the user recoed file. If default user name is in use it is returned as valid
+user name. If there us erro reading user record file default user is considerd
+a valid user.
+*/
+int sysUserVerify /* RETURN: permission level, -1 if not a user */
+ (
+ char *name, /* IN: user name */
+ char *passwd /* IN: user password */
+ )
+{
+ int retVal = -1;
+ FILE* fp;
+ UserRecord userRec;
+ char passwdEncrpt[MAX_ENCRPT_PASSWD_LEN + 1];
+
+ if((defaultUserInUse == TRUE) && (strcmp(name,LOGIN_USER_NAME)==0))
+ return 0;
+
+ if (semTake(sysUserSem, sysClkRateGet() * 5) != OK)
+ return ERROR; /* only one access at a time */
+
+ if (sysUserPasswdEncrypt((char*)passwd, passwdEncrpt) == OK)
+ {
+ fp = fopen(sysUserFileName, "r");
+ if (fp != NULL)
+ {
+ if (sysUserFind(fp, name, NULL, &userRec) == OK)
+ {
+ if (strcmp(passwdEncrpt, userRec.passwdEncrpt) == 0)
+ retVal = userRec.level;
+ }
+ fclose(fp);
+ }
+
+ /* if user not found default user may be valid user */
+/* if (retVal == -1)
+ {
+ if ((defaultUserInUse == TRUE) || (fp == NULL))
+ {
+ if ((strcmp(name, LOGIN_USER_NAME) == 0) &&
+ (strcmp(passwdEncrpt, LOGIN_PASSWORD) == 0))
+ retVal = 0;
+ }
+ }
+*/
+ }
+ semGive(sysUserSem);
+ return retVal;
+}
+
+
+
+/*******************************************************************************
+sysUserPasswdChange - User Password Channge
+
+Changes the password of a user.
+*/
+STATUS sysUserPasswdChange /* RETURN: OK/ERROR */
+ (
+ char *name, /* IN: user name. Max.len. MAX_USER_NAME_LEN */
+ char *oldPasswd, /* IN: old user password */
+ char *passwd /* OUT: new user password. Max. len MAX_USER_PASSWD_LEN */
+ )
+{
+ STATUS retStat = ERROR;
+ FILE* fp;
+ FILE* fpTmp;
+ char tmpFile[100];
+ int userNum;
+ UserRecord userRec;
+ char buff[MAX_LINE_LEN + 1];
+ int i, j;
+ BOOL stop;
+ char passwdEncrpt[MAX_ENCRPT_PASSWD_LEN + 1];
+
+
+ if ((strlen(name) > MAX_USER_NAME_LEN) ||
+ (strlen(passwd) > MAX_USER_PASSWD_LEN))
+ return ERROR;
+
+ if (semTake(sysUserSem, sysClkRateGet() * 5) != OK)
+ return ERROR; /* only one access at a time */
+
+ fp = fopen(sysUserFileName, "r");
+ if (fp != NULL)
+ {
+ sysUserPasswdEncrypt(oldPasswd, passwdEncrpt);
+ if ((sysUserFind(fp, name, &userNum, &userRec) == OK) &&
+ (strcmp(passwdEncrpt, userRec.passwdEncrpt) == 0))
+ { /* found the user */
+ if (sysUserPasswdEncrypt(passwd, passwdEncrpt) == OK)
+ { /* new password is long enough */
+ sprintf(tmpFile, "%s.tmp", sysUserFileName);
+ fpTmp = fopen(tmpFile, "w");
+ if (fpTmp != NULL)
+ {
+ rewind(fp);
+ for (i = 0; i < headerNumLines; i++)
+ {
+ fgets(buff, MAX_LINE_LEN, fp);
+ fputs(buff, fpTmp);
+ }
+ for (i = 0, stop = FALSE; stop == FALSE; i++)
+ {
+ for (j = 0; (j < recNumLines) && (stop == FALSE); j++)
+ {
+ if (fgets(buff, MAX_LINE_LEN, fp) != NULL)
+ {
+ if ((i == userNum) && (j == 1))
+ fprintf(fpTmp, "%s\n", passwdEncrpt);
+ else
+ fputs(buff, fpTmp);
+ }
+ else
+ stop = TRUE;
+ }
+ }
+ fclose(fp);
+ fclose(fpTmp);
+ if (copy(tmpFile, sysUserFileName) == OK)
+ {
+ if (userRec.level == 0)
+ { /* super user */
+ loginUserDelete(userRec.name, userRec.passwdEncrpt);
+ strcpy(passwdEncrptList[userNum], passwdEncrpt);
+ loginUserAdd(name, passwdEncrptList[userNum]);
+ }
+ retStat = OK;
+ }
+ remove(tmpFile);
+ }
+ else
+ fclose(fp);
+ }
+ else
+ fclose(fp);
+ }
+ else
+ fclose(fp);
+ }
+ semGive(sysUserSem);
+ return retStat;
+}
+
+
+/*******************************************************************************
+sysUserAllGet - User All Get
+
+Provides the list of current valid system user names.
+*/
+STATUS sysUserAllGet /* RETURN: OK/ERROR */
+ (
+ char *names /* OUT: user names seperated by \n */
+ )
+{
+ STATUS retStat = ERROR;
+ FILE* fp;
+ UserRecord userRec;
+
+ if (semTake(sysUserSem, sysClkRateGet() * 5) != OK)
+ return ERROR; /* only one access at a time */
+
+ *names = EOS;
+ fp = fopen(sysUserFileName, "r");
+ if (fp != NULL)
+ {
+ fSkipLines(fp,headerNumLines);
+ for ( ;sysUserRecGet(fp, &userRec) == OK; )
+ {
+ strcat(names, userRec.name);
+ strcat(names, "\n");
+ }
+ fclose(fp);
+ retStat = OK;
+ }
+ /* default user may be valid user */
+ /* if there is error reading usrer record file,
+ default user is valid user*/
+ if ((defaultUserInUse == TRUE) || (fp == NULL))
+ {
+ strcat(names, LOGIN_USER_NAME);
+ strcat(names, "\n");
+ }
+ semGive(sysUserSem);
+ return retStat;
+}
+
+
+/*******************************************************************************
+sysUserShow - User Show
+
+Prints the list of current system user names.
+*/
+void sysUserShow()
+{
+ char* names;
+
+ names = malloc(((MAX_USER_NAME_LEN + 1) * MAX_NUM_USERS) + 1);
+ sysUserAllGet(names);
+ printf("%s", names);
+ free(names);
+}
+
+
+/*******************************************************************************
+sysUserPasswdEncrpt - Password Encrypt
+
+Password Encryption routine from Tornado 2, patch 1.
+*/
+/******************************************************************************
+*
+* loginDefaultEncrypt - default password encryption routine
+*
+* This routine provides default encryption for login passwords. It employs
+* a simple encryption algorithm. It takes as arguments a string <in> and a
+* pointer to a buffer <out>. The encrypted string is then stored in the
+* buffer.
+*
+* The input strings must be at least 8 characters and no more than 40
+* characters.
+*
+* If a more sophisticated encryption algorithm is needed, this routine can
+* be replaced, as long as the new encryption routine retains the same
+* declarations as the default routine. The routine vxencrypt
+* in \f3host/<hostOs>/bin\fP
+* should also be replaced by a host version of <encryptionRoutine>. For more
+* information, see the manual entry for loginEncryptInstall().
+*
+* RETURNS: OK, or ERROR if the password is invalid.
+*
+* SEE ALSO: loginEncryptInstall(), vxencrypt
+*
+* INTERNAL
+* The encryption is done by summing the password and multiplying it by
+* a magic number.
+*/
+
+STATUS sysUserPasswdEncrypt
+ (
+ char *in, /* input string */
+ char *out /* encrypted string */
+ )
+ {
+ int ix;
+ unsigned long magic = 31695317;
+ unsigned long passwdInt = 0;
+
+ if (strlen (in) < 8 || strlen (in) > 40)
+ {
+ errnoSet (S_loginLib_INVALID_PASSWORD);
+ return (ERROR);
+ }
+
+ for (ix = 0; ix < strlen(in); ix++) /* sum the string */
+ passwdInt += (in[ix]) * (ix+1) ^ (ix+1);
+
+ sprintf (out, "%lu", (passwdInt * magic)); /* convert interger
+ to string */
+ /* make encrypted passwd printable */
+
+ for (ix = 0; ix < strlen (out); ix++)
+ {
+ if (out[ix] < '3')
+ out[ix] = out[ix] + '!'; /* arbitrary */
+
+ if (out[ix] < '7')
+ out[ix] = out[ix] + '/'; /* arbitrary */
+
+ if (out[ix] < '9')
+ out[ix] = out[ix] + 'B'; /* arbitrary */
+ }
+
+ return (OK);
+ }
+
+
+
+
+int sysUserGetUserLevelByName
+ (
+ char *name /* IN: user name */
+ )
+{
+ int retVal = -1;
+ FILE* fp;
+ UserRecord userRec;
+
+ if (semTake(sysUserSem, sysClkRateGet() * 5) != OK)
+ return ERROR; /* only one access at a time */
+
+ fp = fopen(sysUserFileName, "r");
+ if (fp != NULL)
+ {
+ if (sysUserFind(fp, name, NULL, &userRec) == OK)
+ {
+ retVal = userRec.level;
+ }
+ fclose(fp);
+ }
+
+ semGive(sysUserSem);
+ return retVal;
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Cdc_bsp/sysUser.h b/data/mnet/GP10/Host/Cdc_bsp/sysUser.h
new file mode 100644
index 0000000..b6cb97b
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/sysUser.h
@@ -0,0 +1,93 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+#include <loginLib.h>
+
+
+#define MAX_NUM_USERS 100
+
+#define MAX_USER_NAME_LEN 40 /* cannot exceed MAX_LOGIN_NAME_LEN */
+#define MAX_USER_PASSWD_LEN 40 /* cannot exceed 40 */
+
+
+/*******************************************************************************
+sysUserInit - User Initialize
+
+This function initializes the System User sub system. It should be called once
+during vxWorks initialization.
+*/
+void sysUserInit();
+
+/*******************************************************************************
+sysUserAdd - User Add
+
+Adds a user to the list of valid system user.
+
+Adds a user name and password entry to user record file and optionally adds the
+user to login table. If user level is 0 ('super' user) user is added to
+vxWorks login table.
+*/
+STATUS sysUserAdd /* RETURN: OK/ERROR */
+ (
+ const char *name, /* IN: user name. Max.len. MAX_USER_NAME_LEN */
+ const char *passwd, /* IN: user password. Max. len MAX_USER_PASSWD_LEN */
+ int level /* IN: user permission level */
+ );
+
+
+/*******************************************************************************
+sysUserDelete - User Delete
+
+Deletes the user with given user name from list of valid users,
+
+Deletes from user info. file and if user level is 0 from the vxWorks login
+table. Last user with permission level 0 cannot be deleted.
+*/
+STATUS sysUserDelete /* RETURN: OK/ERROR */
+ (
+ const char *name /* IN: user name */
+ );
+
+
+/*******************************************************************************
+sysUserVerify - User Verify
+
+Verifies if given user is valid system user. Checks for user name and password
+in the user recoed file. If default user name is in use it is returned as valid
+user name. If there us erro reading user record file default user is considerd
+a valid user.
+*/
+int sysUserVerify /* RETURN: permission level, -1 if not a user */
+ (
+ char *name, /* IN: user name */
+ char *passwd /* IN: user password */
+ );
+
+
+/*******************************************************************************
+sysUserPasswdChange - User Password Channge
+
+Chnages the password of a user.
+*/
+STATUS sysUserPasswdChange /* RETURN: OK/ERROR */
+ (
+ char *name, /* IN: user name. Max.len. MAX_USER_NAME_LEN */
+ char *oldPasswd, /* IN: old user password. */
+ char *passwd /* OUT: new user password. Max. len MAX_USER_PASSWD_LEN */
+ );
+
+
+/*******************************************************************************
+sysUserAllGet - User All Get
+
+Provides the list of current valid system user names.
+*/
+STATUS sysUserAllGet /* RETURN: OK/ERROR */
+ (
+ char *names /* OUT: user names seperated by \n */
+ );
+
diff --git a/data/mnet/GP10/Host/Cdc_bsp/target.nr b/data/mnet/GP10/Host/Cdc_bsp/target.nr
new file mode 100644
index 0000000..03b141e
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/target.nr
@@ -0,0 +1,185 @@
+'\" t
+.so wrs.an
+.\" ads860/target.nr - Motorola MPC8xx(F)ADS target specific documentation
+.\"
+.\" Copyright 1984-1996 Wind River Systems, Inc.
+.\"
+.\" modification history
+.\" --------------------
+.\" 01d,25nov97,map added info on 860 devices used.
+.\" 01c,12sep97,map info about problems with the "go" command
+.\" 01b,24jul96,tpr added Aux Clock Doc + corrected typo.
+.\" 01a,16jun96,tpr created from mv1604.
+.\"
+.\"
+.TH "ads860" T "Motorola MPC821/860ADS and MPC8xxFADS" "Rev: 17 Jun 96" "VXWORKS REFERENCE MANUAL"
+
+.SH "NAME"
+.aX "Motorola MPC821/860ADS & MPC8xxFADS"
+
+.SH "INTRODUCTION"
+This note provides board-specific information necessary to run
+VxWorks. Before running VxWorks, verify that the board runs in the
+factory configuration.
+The ads860 BSP produces a VxWorks image running either on the PowerPC 8xx processors. From the VxWorks perspective these processors are equivalent.
+
+.SH "BOOT ROMS"
+No VxWorks Boot ROM is provided with this BSP release. Nevertheless VxWorks
+boot code is working if downloaded into the SIMM Flash ROM.
+
+To program the SIMM Flash ROM, the ADI card from Motorola is required.
+This debug card is available for Sun workstation or PC. Connect this ADI card
+to the MPC821/860ADS board via the ADI port. Check that a 12V potential is
+provided to the MPC8xx(F)ADS board; otherwise the SIMM Flash will not be erased
+and/or re-programmed. On the host, start the mpc8bug executable (mpc8bug.exe on
+PC). Once the prompt appears, reset the board with the following command:
+.CS
+ 821Bug> reset:h
+.CE
+
+Then download the bootrom_uncmp.hex file to the Flash:
+
+ 821Bug> loadf /<PATH_TO_THE_ADS860_BSP>/bootrom_uncmp.hex 100000
+
+The 100000 value is the address in DRAM memory where the bootrom_uncmp.hex
+file is temporarily downloaded before it is moved to Flash. A message
+like the following copy should appear:
+
+.CS
+ loadf: Loading Srecords file . . .
+ Loading flash mapped sections to ram memory buffer:
+ Loading block : at 00100000
+ : 0004efd0 bytes loaded
+ Programming flash : 0004efd0 bytes at 02800100-0284f0cf
+ Flash programming completed
+
+ Loading ram mapped sections to ram memory:
+ Entry point (IP) is not set
+ Heap start address set to 0284f0d0
+ 821Bug>
+.CE
+
+Now the SIMM Flash memory is programmed with the new boot program. To execute
+this new boot program turn the board off and on. If the board is still
+connected to the ADI card then the processor is stopped at the first instruction
+to execute. From the mpc8bug prompt call the "go" command to resume FLASH
+code execution.
+.PP
+
+
+This board doesn't have non-volatile RAM; thus boot parameters
+are not preserved when the system is powered off.
+.PP
+
+To load VxWorks, and for more information, follow the instructions in the
+"Getting Started"
+chapter of the
+.I "VxWorks Programmer's Guide."
+
+.PP
+An alternative way to load vxWorks is through the ADI debug card. Plug the ADI
+connector in the ADI port of the board, power on the board and start the
+mpc8bug executable on the host. Execute the reset command to initialize the
+board:
+
+.CS
+ 821Bug> reset:h
+.CE
+
+Then download VxWorks:
+
+.CS
+ 821Bug> load /<ADS860_BSP_PATH>/vxWorks
+ Loading ELF file . . .
+ Entry point set to 00100000
+ Loading section 1 (.text) : 0005fcec bytes at 00100000
+ Loading section 2 (.rodata) : 0000263c bytes at 0015fcec
+ Loading section 4 (.data) : 00001058 bytes at 00162328
+ Loading section 5 (.got) : 00000010 bytes at 00163380
+ Loading section 7 (.sbss) : 00000298 bytes at 00163390 (not loaded)
+ Loading section 8 (.bss) : 000079e8 bytes at 00163628 (not loaded)
+ Heap start address set to 0016b010
+ Loaded 000008da symbols into the symbol table
+ Duplicated symbols (-103) expanded with enumerated suffixes
+ r3 and r5 are set to 0
+.CE
+
+Then reset the DER register
+
+.CS
+ 821Bug> rms DER 0
+.CE
+
+And finally start VxWorks execution:
+
+.CS
+ 821Bug> go 100000
+.CE
+
+On some ADI configurations, resuming execution with the "go" could
+result in exceptions or other problems. In such cases, unplug the ADI
+connector, and reset the target board to start VxWorks.
+
+.PP
+
+
+.SH "DEVICES"
+.PP
+The chip drivers included are:
+ ppc860Timer.c - Timer library for PPC decrementer, CPM timers 2,3,4
+ ppc860Sio.c - Serial Communications library for SMC UART
+ ppc860Intr.c - Programmable Interrupt Controller Library
+ if_cpm.c - Ethernet Communication library for SCC
+.PP
+
+The timer driver, ppc860Timer, implements a system clock using the PPC
+decrementer timer, an auxiliary clock using CPM timer 2, and a 32-bit
+timestamp facilty by cascading CPM timers 3 & 4. The BSP uses SMC1 as
+a UART to implement a console device, while the CPM SCC1 is used as an
+ethernet port.
+
+.PP
+
+.SH "SPECIAL CONSIDERATIONS"
+.PP
+The DRAM controller setup is only performed by the boot program. VxWorks
+doesn't re-initialize the DRAM controller when it is executed.
+The DRAM memory controller initialization code does not recognized either
+the size of the DRAM plugged or the access time or the processor clock
+frequency. The only configuration supported is a 4 megabytes DRAM with
+a 70 nanosecond access time and with a 25 megahertz processor clock. To
+support a different configuration the UpmTable table located in romInit.s
+file of the ads860 BSP must be changed.
+
+.PP
+The MPC8xx(F)ADS boards do not have a unique Ethernet hardware
+address assigned to each board. A unique address is absolutely necessary if
+the user wishes to connect the board to a network. Thus, the user
+must provide a suitable 6 byte Ethernet address for each board used
+on a network. The address is programmed by changing the sysCpmEnetAddr
+character array in the file sysLib.c. The first three bytes (0x08, 0x00, 0x3e)
+are a Motorola-specific prefix that should be kept as-is. The user must
+change the last three bytes from 0x03, 0x02, 0x01 to three unique bytes
+(i.e., bytes not used by any other Motorola Ethernet connection on your net).
+Check with your system administrator if you do not know this information.
+If these bytes need changing (they often will not), a new boot ROM
+must be burned, and a new image must be built.
+.PP
+The MC68160 EEST part is very sensitive to its input power voltage (VDD).
+VDD to the chip must be between 4.75 and 5.25; values outside this
+range may diminish functionality. Therefore, the power supplied to the
+target board and the chip should be checked carefully. Note that there
+may be a significant voltage drop between the power supply connectors
+and the chip (the fuses and connectors alone cause approximately a
+0.1 volts drop).
+In order to get the Ethernet device to work properly the processor clock (PLL)
+should be at least 24 megahertz. Both the boot program and VxWorks set
+the processor clock to 24 megahertz. Configurations with processors running
+at a frequency higher than 24 megahertz or lower than 20 megahertz were not
+tested.
+.PP
+
+.SH "SEE ALSO"
+.pG "Getting Started, Configuration"
+
+
diff --git a/data/mnet/GP10/Host/Cdc_bsp/target.txt b/data/mnet/GP10/Host/Cdc_bsp/target.txt
new file mode 100644
index 0000000..7361552
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/target.txt
@@ -0,0 +1,264 @@
+
+
+
+ads860(T) VXWORKS REFERENCE MANUAL ads860(T)
+
+
+
+NAME
+ Motorola MPC821/860ADS & MPC8xxFADS
+
+
+INTRODUCTION
+ This note provides board-specific information necessary to
+ run VxWorks. Before running VxWorks, verify that the board
+ runs in the factory configuration. The ads860 BSP produces
+ a VxWorks image running either on the PowerPC 8xx proces-
+ sors. From the VxWorks perspective these processors are
+ equivalent.
+
+
+BOOT ROMS
+ No VxWorks Boot ROM is provided with this BSP release.
+ Nevertheless VxWorks boot code is working if downloaded into
+ the SIMM Flash ROM.
+
+ To program the SIMM Flash ROM, the ADI card from Motorola is
+ required. This debug card is available for Sun workstation
+ or PC. Connect this ADI card to the MPC821/860ADS board via
+ the ADI port. Check that a 12V potential is provided to the
+ MPC8xx(F)ADS board; otherwise the SIMM Flash will not be
+ erased and/or re-programmed. On the host, start the mpc8bug
+ executable (mpc8bug.exe on PC). Once the prompt appears,
+ reset the board with the following command:
+
+ 821Bug> reset:h
+
+
+ Then download the bootrom_uncmp.hex file to the Flash:
+
+ 821Bug> loadf
+ /<PATH_TO_THE_ADS860_BSP>/bootrom_uncmp.hex 100000
+
+ The 100000 value is the address in DRAM memory where the
+ bootrom_uncmp.hex file is temporarily downloaded before it
+ is moved to Flash. A message like the following copy should
+ appear:
+
+
+ loadf: Loading Srecords file . . .
+ Loading flash mapped sections to ram memory buffer:
+ Loading block : at 00100000
+ : 0004efd0 bytes loaded
+ Programming flash : 0004efd0 bytes at 02800100-0284f0cf
+ Flash programming completed
+
+ Loading ram mapped sections to ram memory:
+ Entry point (IP) is not set
+ Heap start address set to 0284f0d0
+ 821Bug>
+
+
+
+Rev: 17 Jun 96Motorola MPC821/860ADS and MPC8xxFADS 1
+
+
+
+
+
+
+ads860(T) VXWORKS REFERENCE MANUAL ads860(T)
+
+
+
+ Now the SIMM Flash memory is programmed with the new boot
+ program. To execute this new boot program turn the board off
+ and on. If the board is still connected to the ADI card then
+ the processor is stopped at the first instruction to exe-
+ cute. From the mpc8bug prompt call the "go" command to
+ resume FLASH code execution.
+
+ This board doesn't have non-volatile RAM; thus boot parame-
+ ters are not preserved when the system is powered off.
+
+ To load VxWorks, and for more information, follow the
+ instructions in the "Getting Started" chapter of the VxWorks
+ Programmer's Guide.
+
+
+ An alternative way to load vxWorks is through the ADI debug
+ card. Plug the ADI connector in the ADI port of the board,
+ power on the board and start the mpc8bug executable on the
+ host. Execute the reset command to initialize the board:
+
+
+ 821Bug> reset:h
+
+
+ Then download VxWorks:
+
+
+ 821Bug> load /<ADS860_BSP_PATH>/vxWorks
+ Loading ELF file . . .
+ Entry point set to 00100000
+ Loading section 1 (.text) : 0005fcec bytes at 00100000
+ Loading section 2 (.rodata) : 0000263c bytes at 0015fcec
+ Loading section 4 (.data) : 00001058 bytes at 00162328
+ Loading section 5 (.got) : 00000010 bytes at 00163380
+ Loading section 7 (.sbss) : 00000298 bytes at 00163390 (not loaded)
+ Loading section 8 (.bss) : 000079e8 bytes at 00163628 (not loaded)
+ Heap start address set to 0016b010
+ Loaded 000008da symbols into the symbol table
+ Duplicated symbols (-103) expanded with enumerated suffixes
+ r3 and r5 are set to 0
+
+
+ Then reset the DER register
+
+
+ 821Bug> rms DER 0
+
+
+ And finally start VxWorks execution:
+
+
+ 821Bug> go 100000
+
+
+
+Rev: 17 Jun 96Motorola MPC821/860ADS and MPC8xxFADS 2
+
+
+
+
+
+
+ads860(T) VXWORKS REFERENCE MANUAL ads860(T)
+
+
+
+ On some ADI configurations, resuming execution with the "go"
+ could result in exceptions or other problems. In such cases,
+ unplug the ADI connector, and reset the target board to
+ start VxWorks.
+
+DEVICES
+ The chip drivers included are:
+ ppc860Timer.c - Timer library for PPC decrementer, CPM
+ timers 2,3,4
+ ppc860Sio.c - Serial Communications library for SMC
+ UART
+ ppc860Intr.c - Programmable Interrupt Controller
+ Library
+ if_cpm.c - Ethernet Communication library for SCC
+
+ The timer driver, ppc860Timer, implements a system clock
+ using the PPC decrementer timer, an auxiliary clock using
+ CPM timer 2, and a 32-bit timestamp facilty by cascading CPM
+ timers 3 & 4. The BSP uses SMC1 as a UART to implement a
+ console device, while the CPM SCC1 is used as an ethernet
+ port.
+
+
+SPECIAL CONSIDERATIONS
+ The DRAM controller setup is only performed by the boot pro-
+ gram. VxWorks doesn't re-initialize the DRAM controller when
+ it is executed. The DRAM memory controller initialization
+ code does not recognized either the size of the DRAM plugged
+ or the access time or the processor clock frequency. The
+ only configuration supported is a 4 megabytes DRAM with a 70
+ nanosecond access time and with a 25 megahertz processor
+ clock. To support a different configuration the UpmTable
+ table located in romInit.s file of the ads860 BSP must be
+ changed.
+
+
+ The MPC8xx(F)ADS boards do not have a unique Ethernet
+ hardware address assigned to each board. A unique address
+ is absolutely necessary if the user wishes to connect the
+ board to a network. Thus, the user must provide a suitable
+ 6 byte Ethernet address for each board used on a network.
+ The address is programmed by changing the sysCpmEnetAddr
+ character array in the file sysLib.c. The first three bytes
+ (0x08, 0x00, 0x3e) are a Motorola-specific prefix that
+ should be kept as-is. The user must change the last three
+ bytes from 0x03, 0x02, 0x01 to three unique bytes (i.e.,
+ bytes not used by any other Motorola Ethernet connection on
+ your net). Check with your system administrator if you do
+ not know this information. If these bytes need changing
+ (they often will not), a new boot ROM must be burned, and a
+ new image must be built.
+
+
+
+
+Rev: 17 Jun 96Motorola MPC821/860ADS and MPC8xxFADS 3
+
+
+
+
+
+
+ads860(T) VXWORKS REFERENCE MANUAL ads860(T)
+
+
+
+ The MC68160 EEST part is very sensitive to its input power
+ voltage (VDD). VDD to the chip must be between 4.75 and
+ 5.25; values outside this range may diminish functionality.
+ Therefore, the power supplied to the target board and the
+ chip should be checked carefully. Note that there may be a
+ significant voltage drop between the power supply connectors
+ and the chip (the fuses and connectors alone cause approxi-
+ mately a 0.1 volts drop). In order to get the Ethernet dev-
+ ice to work properly the processor clock (PLL) should be at
+ least 24 megahertz. Both the boot program and VxWorks set
+ the processor clock to 24 megahertz. Configurations with
+ processors running at a frequency higher than 24 megahertz
+ or lower than 20 megahertz were not tested.
+
+SEE ALSO
+ Programmer's Guide: Getting Started, Configuration
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Rev: 17 Jun 96Motorola MPC821/860ADS and MPC8xxFADS 4
+
+
+
diff --git a/data/mnet/GP10/Host/Cdc_bsp/viperBoot_uncmp.hex b/data/mnet/GP10/Host/Cdc_bsp/viperBoot_uncmp.hex
new file mode 100644
index 0000000..04aedeb
--- /dev/null
+++ b/data/mnet/GP10/Host/Cdc_bsp/viperBoot_uncmp.hex
@@ -0,0 +1,31155 @@
+S31520000000467269204175672030332031353a3333c3
+S315200000103a34342032303031000000000000000035
+S3152000002056657273696f6e3a332e330000000000f6
+S31520000030000000000000000000000000000000009a
+S31520000040000000000000000000000000000000008a
+S31520000050000000000000000000000000000000007a
+S3152000006041310000343938323038000000000000b9
+S31520000070000000000000000000000000000000005a
+S3152000008045323144444331333737463342373633aa
+S3152000009030313037324245314546424538343830a2
+S315200000a0000000000000000000000000000000002a
+S315200000b0000000000000000000000000000000001a
+S315200000c0000000000000000000000000000000000a
+S315200000d000000000000000000000000000000000fa
+S315200000e000000000000000000000000000000000ea
+S315200000f000000000000000000000000000000000da
+S31520000100480000354800005D436F70797269676862
+S315200001107420313938342D313939362057696E6497
+S315200001202052697665722053797374656D732C201D
+S31520000130496E632E386000023C80002038840060BF
+S315200001403CA0002038A500003CC0200038C6010095
+S315200001507C8520507C8432147C8803A64E80002027
+S315200001607C8422787C8001247C9523A67C9423A6FB
+S315200001703CA0000038A500077CBE23A63C800400D6
+S31520000180388400007C908BA67C988BA63C800A0045
+S31520000190388400007C908BA67C988BA63C800C0033
+S315200001A0388400007C908BA67C988BA63C80FF0030
+S315200001B0388400007C9E9BA67C9E9AA65484001EB2
+S315200001C038A0FF8890A400043CA0200038A5040194
+S315200001D090A401003CA0FFC038A5095490A40104B6
+S315200001E03CA0E10038A5000190A401303CA0FF000E
+S315200001F038A5091490A401343CC0000138C6044037
+S3152000020080A400007CA5337890A400003CA00000C8
+S3152000021038A500C0B0A4020038A00082B0A40240D5
+S315200002203CA0139038A5411490A401703CC0002036
+S3152000023038C602003CE0002038E703007CA6385090
+S315200002407CA516703CE0002038E700003D00200029
+S31520000250390801007CC730507CC642143D2000007E
+S3152000026039290000814600009144017C91240168CF
+S3152000027038C60004392900017C0928004180FFE89E
+S315200002803CA0000038A5008190A401103CA0F000FD
+S3152000029038A50E0490A401143CA0000138A5FFFF48
+S315200002A03CC0000038C600017C0628004180FFF8CB
+S315200002B03CA0800060A5410590A401683CA0800078
+S315200002C060A5481E90A4016838A0008890A4016407
+S315200002D03CA0800060A5410690A401683C20002037
+S315200002E0382100003821FFF03CC0002038C603002A
+S315200002F07CC730507CC642147CC803A64E800020A2
+S315200003001F07FC04EEAEFC0411ADFC04EFBBBC00E1
+S315200003101FF77C471FF77C35EFEABC341FB57C35C9
+S315200003201F07FC04EEAEFC0410ADFC04F0AFFC008D
+S31520000330F0AFFC00F1AFFC00EFBBBC001FF77C4721
+S31520000340FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF97
+S31520000350FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF87
+S315200003601F27FC04EEAEBC0001B93C041FF77C47F6
+S31520000370FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF67
+S315200003801F07FC04EEAEBC0010AD7C00F0AFFC00F5
+S31520000390F0AFFC00E1BBBC041FF77C47FFFFFFFF6B
+S315200003A0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF37
+S315200003B0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF27
+S315200003C01FF5FC84FFFFFC04FFFFFC04FFFFFC0479
+S315200003D0FFFFFC84FFFFFC07FFFFFFFFFFFFFFFF80
+S315200003E0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7
+S315200003F07FFFFC07FFFFFFFFFFFFFFFFFFFFFFFF62
+S315200004009421FFE87C0802A693E100149001001CC9
+S315200004103CC078003D20E10090C900003D00E1800D
+S31520000420A1280000A0080000700B1000552B07FE25
+S31520000430380B00027D20002655291FFE7D2900D07D
+S315200004407D6B48387C0948787D6B4B78A008000086
+S31520000450392B000454008BFE3000FFFF7C00011076
+S315200004607D6B00387D2000787D6B03797C7F1B783F
+S315200004703940003041820018380A0001540A063EED
+S31520000480356BFFFF418200084BFFFFF03D20FF0048
+S3152000049061293E803CE0FF0060E723003C000A0D16
+S315200004A060004344900700003CE0FF0060E723041F
+S315200004B03C00432060005265900700003CE0FF00AE
+S315200004C060E723083C00762060002020900700008B
+S315200004D03CE0FF0060E7230A5540C00E900700006D
+S315200004E03CA0FF00380000C090050ABC3D6000011A
+S315200004F0616B028A3CE0FF0060E722043D40FF007A
+S31520000500614A230080050AB83D00FF00540006AE6C
+S3152000051090050AB8A0050AC2610822027000FF3FB2
+S31520000520B0050AC2916509F038000200B009000240
+S3152000053038000210B0090000380000019005003094
+S3152000054038000018980900059809000438000010A2
+S31520000550B009000638000000B0090028B009002CB8
+S31520000560B009002E38000001B00900309147000084
+S315200005703800000BB00800003D00FF006108220093
+S315200005803800A000B008000038000091B00509C06E
+S3152000059088050A8698050A8688050A8A7000001743
+S315200005A098050A8A38004820B0050A823800482271
+S315200005B0B0050A82A00800002C80200039602000A7
+S315200005C0418600403920A0002C8B00004186001077
+S315200005D0356BFFFF418200084BFFFFF8A0080000A3
+S315200005E02C800000408600103D00FF00610822009C
+S315200005F0B1280000A00800002C8020004086FFCCF7
+S3152000060038004820B0050A8273E000023CC078001A
+S315200006103D20E10090C90000418204483CE0FF00F3
+S3152000062060E723003C000A0D60004D65900700003E
+S315200006303CE0FF0060E723043C006D6F60007279A8
+S31520000640900700003CE0FF0060E723083C002054B0
+S3152000065060006573900700003CE0FF0060E7230C14
+S315200006603C00742060005374900700003CE0FF00BB
+S3152000067060E723103C0061726000746990070000F7
+S315200006803CE0FF0060E723143C006E6760002E2EDE
+S31520000690900700003CE0FF0060E723183C002E0096
+S315200006A0900700003D00FF00610822023800001A72
+S315200006B0B00800003D00FF00610822003800A000BD
+S315200006C0B008000038004822B0050A82A0080000C1
+S315200006D02C802000418600403920A0002C8B000071
+S315200006E041860010356BFFFF418200084BFFFFF863
+S315200006F0A00800002C800000408600103D00FF006E
+S3152000070061082200B1280000A00800002C802000EB
+S315200007104086FFCC3D20001F394900003D20006166
+S315200007203929FF007C8A48403900000040840014A3
+S31520000730914A0000394A00047C8A48404184FFF4EB
+S315200007403D20001F394900003D2000613929FF0066
+S315200007507C8A4840408400307D274B78800A000000
+S315200007607C0052783000FFFF7C000110394A0004DB
+S315200007707C8A38407D090038300000017D280378C6
+S315200007804184FFDC3D20001F394900003D200061E7
+S315200007903929FF007C8A4840408400187D4050F863
+S315200007A0900A0000394A00047C8A48404184FFF0C0
+S315200007B03D20001F394900003D2000613929FF00F6
+S315200007C07C8A4840408400347D274B787D4950F808
+S315200007D0800A0000394A00047C8A38407C004A7826
+S315200007E03000FFFF7C0001107D0900383000000139
+S315200007F07D2803784184FFD82C880000418600B4E8
+S315200008003CE0FF0060E723003C000A0D60004D65D8
+S31520000810900700003CE0FF0060E723043C006D6F7A
+S3152000082060007279900700003CE0FF0060E7230833
+S315200008303C00205460006573900700003CE0FF00F8
+S3152000084060E7230C3C00742060004661900700009E
+S315200008503CE0FF0060E723103C00696C60006564A3
+S31520000860900700003D00FF006108220238000014B6
+S31520000870B00800003D00FF00610822003800A000FB
+S31520000880B00800003D400003614A0D403D20E100D4
+S315200008902C8A0000394AFFFF4086FFF86CC6080004
+S315200008A090C900003D400003614A0D404BFFFFE424
+S315200008B03CE0FF0060E723003C000A0D60004D6528
+S315200008C0900700003CE0FF0060E723043C006D6FCA
+S315200008D060007279900700003CE0FF0060E7230883
+S315200008E03C00205460006573900700003CE0FF0048
+S315200008F060E7230C3C0074206000506190070000E4
+S315200009003CE0FF0060E723103C00737360006564E1
+S31520000910900700003D00FF00610822023800001405
+S31520000920B00800003D00FF00610822003800A0004A
+S31520000930B0080000A00800002C802000418600405E
+S315200009403920A0002C8B000041860010356BFFFF5C
+S31520000950418200084BFFFFF8A00800002C80000011
+S31520000960408600103D00FF0061082200B1280000EB
+S31520000970A00800002C8020004086FFCC3CE0FF0031
+S3152000098060E723003C000A0D60004C6F90070000D2
+S315200009903CE0FF0060E723043C0061646000696E70
+S315200009A0900700003CE0FF0060E723083C0067203A
+S315200009B060007678900700003CE0FF0060E7230C9B
+S315200009C03C00576F6000726B900700003CE0FF0010
+S315200009D060E723103C00732E60002E2E9007000047
+S315200009E03D00FF006108220238000014B008000014
+S315200009F03D00FF00610822003800A000B00800007A
+S31520000A003D00FF00610809C038000690B0080000CC
+S31520000A103D00FF0061080A8238004822B008000025
+S31520000A203D00FF0061082200A00800002C80200065
+S31520000A3039602000418600242C8B0000418600105E
+S31520000A40356BFFFF418200084BFFFFF8A00800002E
+S31520000A502C8020004086FFE438004820B0050A821A
+S31520000A603C6020003C800020388400003D2020206F
+S31520000A70392909FC7D244850380901007C0803A641
+S31520000A80606301003CA0000F60A5FFC04E800021DE
+S31520000A9073E0000241820038386044003C80002028
+S31520000AA03884AC005484F0BE38A000004800007D95
+S31520000AB03C6000603863FF003C8002007C8320504D
+S31520000AC05484F0BE38A00000480000613D2000207C
+S31520000AD039290AFC91210008800100087C0803A618
+S31520000AE07FE3FB784E8000218001001C7C0803A652
+S31520000AF083E10014382100184E80002054A5103AB6
+S31520000B007D242A147C8448404C84002080030000E5
+S31520000B1090040000388400047C8448403863000434
+S31520000B204184FFEC4E8000205484103A7C0322142A
+S31520000B307C8300404C84002090A30000386300048E
+S31520000B407C8300404184FFF44E8000209421FFF8EE
+S31520000B507C0802A69001000C480000A58001000C2C
+S31520000B607C0803A6382100084E8000209421FFF837
+S31520000B707C0802A69001000C4802BD894801E96163
+S31520000B80480253F94801712148022D7D4802483D0B
+S31520000B90480234AD480297314802097D3C6000285E
+S31520000BA03863CCB83D2000283CA0002838A5B1D415
+S31520000BB08089846838C0010048019BD13D200028E7
+S31520000BC03C600028808984283863CCA848019BBDD6
+S31520000BD03D2000283C600028808984E43863CC9836
+S31520000BE048019BA94802B999480283198001000C43
+S31520000BF07C0803A6382100084E8000209421FFE8B7
+S31520000C007C0802A693A1000C93C1001093E1001466
+S31520000C109001001C7C7F1B7873E000023BA0000142
+S31520000C2041820090386000034800011D386044006E
+S31520000C303C80001F3884000048002DC92C8300000A
+S31520000C404186001438600001388000003BA0000275
+S31520000C50480000343C6000603863FF003C8002009E
+S31520000C6048002DA12C830000418600143860000125
+S31520000C70388000003BA000024800000C38600001CC
+S31520000C8038800001480075CD2C9D0001408600105B
+S31520000C9038600001480000B1480000242C9D000265
+S31520000CA04086001C386000024800009D4800001065
+S31520000CB038600001388000014800759938600001CD
+S31520000CC03880000148012C2D3C60002838639A208A
+S31520000CD03FA000283BBDE1F87C83E85048019039CD
+S31520000CE03D20002893E99A2C38600000480530CD35
+S31520000CF04805281148007F9D4BFFFE75386000008F
+S31520000D0048012C11480080857C661B783C600020B9
+S31520000D1038630E1838804E207FA5EB7838E013888C
+S31520000D20390000004801AE7D8001001C7C0803A626
+S31520000D3083A1000C83C1001083E100143821001820
+S31520000D404E800020394000003D20FF00612923000D
+S31520000D503C000A0D60005068900900003D20FF000D
+S31520000D60612923043C00617360006520900900001E
+S31520000D703D20FF00612923083C00322060004D659C
+S31520000D80900900003D20FF006129230C3C006D6F77
+S31520000D9060007279900900003D20FF006129231030
+S31520000DA03C0020542C8300036000657390090000EA
+S31520000DB03D00FF00408600643D20FF00612923148A
+S31520000DC03C00742060005374900900003D20FF0011
+S31520000DD0612923183C006172600074699009000043
+S31520000DE03D20FF006129231C3C006E6760002E2EEB
+S31520000DF0900900003D20FF00612923203C002E00A1
+S31520000E00900900003D60FF00616B2202380000243B
+S31520000E10B00B00004800008C2C830001408600287F
+S31520000E203D20FF00612923143C007420600050619E
+S31520000E30900900003D20FF00612923183C007373B0
+S31520000E404800002C2C830002408600543D20FF00E1
+S31520000E50612923143C00742060004661900900003B
+S31520000E603D20FF00612923183C00696C6000656401
+S31520000E70900900003D20FF006129231C3C002E2EF6
+S31520000E8060002E00900900003D60FF00616B220289
+S31520000E903800001EB00B0000480000083940000151
+S31520000EA02C8A00004C8600203D60FF00616B2200EA
+S31520000EB03800A000B00B000038004822B0080A8293
+S31520000EC0A00B00002C802000392020004186004005
+S31520000ED03940A0002C890000418600103529FFFFEB
+S31520000EE0418200084BFFFFF8A00B00002C80000079
+S31520000EF0408600103D60FF00616B2200B14B000070
+S31520000F00A00B00002C8020004086FFCC3800482013
+S31520000F10B0080A824E8000209421FFB07C0802A6E9
+S31520000F209381004093A1004493C1004893E1004C73
+S31520000F30900100544801EDDD3C60002038631040EC
+S31520000F4038800000480077713860003C4800784DB2
+S31520000F50480077E138600014388000C03CA00027A4
+S31520000F6038A514A448014D9D3D2000283800FFFFD8
+S31520000F7090099A203BE000003FA000283FC00028AF
+S31520000F80480174BD386100283C800027388414ACA1
+S31520000F903CA0002738A514B47FE6FB784801BA8523
+S31520000FA07FE3FB78480066F57C641B78386100286F
+S31520000FB038A0020038C00200480175012C9F0000AD
+S31520000FC040860040387DAE7C388100284801275D68
+S31520000FD0387DAE7C3880000238A00000480142E10E
+S31520000FE0907E9A203880000438A0258048014591BB
+S31520000FF0807E9A203880000338A0000F4801458162
+S315200010003BFF00012C9F00014085FF7C3FA000286C
+S31520001010809D9A203860000048014BB1809D9A201F
+S315200010203860000148014BA5809D9A203860000257
+S3152000103048014B994801DC39480137593C6000206A
+S3152000104038632D004801381D807D9A2038800005A0
+S3152000105048015C254801396948018B893D200027D4
+S315200010603BA97BE4801D00042C8000003BE00000AF
+S31520001070418600583D2000283BC9AF503F800027BD
+S31520001080809D000480BD000880DD000C80FD0010DE
+S315200010907FE3FB784803FAE957E0103A7C7E012E7D
+S315200010A07C1E002E2C8000004086000C387C14BC50
+S315200010B04801B50D3BBD0018801D00042C800000A2
+S315200010C03BFF00014086FFBC38000000900100086D
+S315200010D09001000C9001001090010014900100185E
+S315200010E09001001C900100203C600027386314D03A
+S315200010F03D2000273CE0002038E7106080897C6C8A
+S315200011003D2000273D6000273900000080A97C7023
+S315200011103920000080CB7C743940000048024EF90B
+S31520001120800100547C0803A68381004083A10044EB
+S3152000113083C1004883E1004C382100504E800020B6
+S315200011409421FFF87C0802A69001000C48027CC579
+S315200011508001000C7C0803A6382100084E80002060
+S315200011609421FD287C0802A6938102C893A102CC73
+S3152000117093C102D093E102D4900102DC38600000D2
+S315200011803880000238A00000480143F53FE00028DF
+S31520001190801F9A2C700900023BC000004182000883
+S315200011A048000709807F9A2C48001E993FA00027F7
+S315200011B0807D7F6048001D09386042003881000824
+S315200011C0813D7F6038000000980900004802DC015C
+S315200011D0815F9A2C71400001816102003D20002828
+S315200011E091699A344082002C716000044082002468
+S315200011F071400004386000074082000C71600008CE
+S31520001200418200083860000148000521547E063ED0
+S315200012103D20002880699A203880000338A0007F6E
+S315200012203B8000003BE102083BA102A84801435154
+S315200012303C600027386314D84801B3856BC9002168
+S31520001240200900007D2049146BC000402160000069
+S315200012507C0B01147D2B0379418200149BC102086B
+S315200012609B8102093BC00000480000203C6000270B
+S31520001270386314DC4801B34938600000388102081D
+S3152000128038A000A04801C899938102BC938102AC82
+S31520001290938102B07FE3FB78480124C57C7F1A1432
+S315200012A03863FFFF7C83F840906102A841840034B4
+S315200012B0394000007FEBFB78812102A888090000D5
+S315200012C02C8000204086001C99490000800102A83D
+S315200012D03000FFFF7C805840900102A84084FFDC4C
+S315200012E093E102A8386102A848001B89812102A83F
+S315200012F038090001900102A888090000288000749E
+S315200013004185041C3D200020392912285400103A1A
+S315200013107C09002E3D200020392912287C004A1401
+S315200013207C0903A64E800420FFFFFF14000003F46F
+S31520001330000003F4000003F4000003F4000003F4AB
+S31520001340000003F4000003F4000003F4000003F49B
+S31520001350000003F4000003F4000003F4000003F48B
+S31520001360000003F4000003F4000003F4000003F47B
+S31520001370000003F4000003F4000003F4000003F46B
+S31520001380000003F4000003F4000003F4000003F45B
+S31520001390000003F4000003F4000003F4000003F44B
+S315200013A0000003F4000003F4000003F4000003F43B
+S315200013B0000003F4000003F400000398000003F487
+S315200013C0000003F4000003F4000003F4000003F41B
+S315200013D0000003F4000003F4000003F4000003F40B
+S315200013E0000003F4000003F4000003F4000003F4FB
+S315200013F0000003F4000003F4000003F4000003F4EB
+S31520001400000003F4000003F4000003F4000003F4DA
+S31520001410000003F4000003F4000003F4000003F4CA
+S31520001420000003F40000039000000398000003F47A
+S31520001430000003F4000003F4000003F4000003F4AA
+S31520001440000003F4000003F4000003F4000003F49A
+S31520001450000003F4000003F4000003F4000003F48A
+S3152000146000000384000003F4000003F4000003F4EA
+S31520001470000003F4000003F4000003F4000003F46A
+S31520001480000003F4000003F4000003F4000003F45A
+S31520001490000003F4000003F4000003F4000003F44A
+S315200014A0000003F4000003F4000003F4000003F43A
+S315200014B0000003F400000334000001D40000021CE5
+S315200014C0000002300000035800000390000003F4DF
+S315200014D0000003F4000003F4000003B8000003003A
+S315200014E000000378000003F400000328000003F442
+S315200014F0000003F4000003F4000002987FA3EB78B9
+S31520001500388102AC38A0000138C0000148001A51C9
+S315200015102C8300004086FD287FA3EB78388102B01B
+S3152000152038A0000038C0000148001A352C8300007E
+S315200015304086FD0C806102AC808102B04800168195
+S315200015404BFFFCFC3D20002780697F60386300014B
+S315200015504800196D4BFFFCE87FA3EB78388102AC7D
+S3152000156038A0000138C00000480019F52C8300007F
+S315200015704086FCCC7FA3EB78388102B438A00000EB
+S3152000158038C00000480019D92C8300004086FCB0E2
+S315200015907FA3EB78388102B838A0000038C000005D
+S315200015A0480019BD2C8300004086FC94806102AC63
+S315200015B0808102B480A102B84800FF4D4BFFFC8019
+S315200015C07FA3EB78388102AC38A0000138C0000038
+S315200015D04800198D2C8300004086FC647FA3EB789D
+S315200015E0388102BC38A0000138C0000048001971BB
+S315200015F02C8300004086FC487FA3EB78388102B418
+S3152000160038A0000138C00000480019552C8300007E
+S315200016104086FC2C806102AC808102BC80A102B491
+S315200016204800FC694BFFFC18386102A8388102ACDF
+S3152000163038A0000138C00000480019252C8300007E
+S315200016404086FBFC806102AC480014A54BFFFBF0F2
+S31520001650386042004802DED14BFFFBE4386042008E
+S315200016604802E03138604200480120F53883000105
+S315200016703860420038A00000480065C54BFFFBC01B
+S31520001680386102A8388102C038A0000138C00000A5
+S31520001690480018CD2C8300004086FBA44800003863
+S315200016A0806102A8480011A54BFFFB94806102A827
+S315200016B0480020C14BFFFB88480002894BFFFB8076
+S315200016C0806102A8388102C0480003C12C83000033
+S315200016D040860038806102C0480013A94BFFFB609A
+S315200016E0806102A8388102C0480003A12C83000033
+S315200016F040860018808102C03C600027386314F0C1
+S315200017004801AEBD4BFFFB38480070854802695141
+S3152000171038600001480164614BFFFB243C600027D0
+S31520001720386315004BFFFB149421FFD07C0802A6DA
+S315200017309361001C9381002093A1002493C100286B
+S3152000174093E1002C900100347C641B793800000062
+S3152000175090010008408100A03C6000273863152CCA
+S315200017607C9F23783F6000284801AE554802778940
+S315200017707C7D1B78480070197C63F9D63F80002752
+S315200017807FDD1A14480277717C7D1B784800700132
+S315200017907FBD1A143C600027386315547FE4FB781C
+S315200017A04801AE1D480277517C83F04040840048B2
+S315200017B0800100082C800000408600A8807B9A20AB
+S315200017C03880000138A1000848013DB54802772934
+S315200017D07C83E8004086FFD04802771D7C7D1B78FD
+S315200017E048006FAD7FBD1A143BFFFFFF387C1554B0
+S315200017F04BFFFFAC800100082C800000408600646F
+S315200018003D20002880699A203880000338A0007F78
+S3152000181048013D6D3C6000273863155C4801ADA149
+S31520001820386042003881000C480002612C83000099
+S31520001830408600108061000C480012494800004490
+S315200018403C600027386315704801AD7548006F412C
+S315200018504802680D386000014801631D48000024D5
+S31520001860388100103D20002880699A2038A0000188
+S3152000187048013CCD886100105463067E480000086C
+S31520001880386000FF800100347C0803A68361001CB9
+S315200018908381002083A1002483C1002883E1002CBA
+S315200018A0382100304E8000209421FFF87C0802A6C3
+S315200018B09001000C3C600027386315884801AD0173
+S315200018C03C600027386315943C8000273884159C9B
+S315200018D03CA0002738A515A04801ACE53C600027B0
+S315200018E0386315B44801ACD9480073917C641B78E1
+S315200018F03C600027386315EC4801ACC53D20002725
+S315200019003C60002780897BD0386315F84801ACB14C
+S315200019103C600027386316084801ACA53D20002707
+S315200019203C60002780897BD43863161C4801AC9123
+S315200019308001000C7C0803A6382100084E80002078
+S315200019409421FFE07C0802A693A1001493C10018FD
+S3152000195093E1001C900100243C600027386314D8D2
+S315200019604801AC5D3D20002780097D742C80000055
+S315200019703BE97D74418600243FC00027809F0000FC
+S3152000198080BF0004387E197C4801AC35841F0008CE
+S315200019902C8000004086FFE83C60002738631988C9
+S315200019A04801AC1D3C600027386319A44801AC11DE
+S315200019B03D2000273BE97BE4801F00042C800000AB
+S315200019C0418600483FC00027801F00142C8000005D
+S315200019D04086002898010008801F00047C0803A682
+S315200019E038610008388000004E800021387E19C0FA
+S315200019F0388100084801ABC93BFF0018801F00044E
+S31520001A002C8000004086FFC43D20002780097C18DA
+S31520001A102C8000003BE97C184186003C3FA0002733
+S31520001A203FC00027389D14A0807F000038A0000208
+S31520001A3048011D592C83000041860010809F00001C
+S31520001A40387E19C04801AB79841F00282C800000FD
+S31520001A504086FFD43C600027386319C44801AB6137
+S31520001A603C600027386314D84801AB558001002418
+S31520001A707C0803A683A1001483C1001883E1001CFF
+S31520001A80382100204E8000209421FD607C0802A68B
+S31520001A90934102889361028C9381029093A10294D0
+S31520001AA093C1029893E1029C900102A47C9A237828
+S31520001AB07C641B79380000009001027C418200186A
+S31520001AC0880400002C8000004186000C386042000B
+S31520001AD048011C593860420038810008480015C169
+S31520001AE02C830000408605EC386042004802DA3933
+S31520001AF03D20002880010200806101FC90099A3473
+S31520001B00480073C1386100083C800027388419CC0E
+S31520001B1038A0000348011C757C631B79408200684D
+S31520001B2090610270906102743861000848011C318E
+S31520001B302C8300034186059C386100083C800027E1
+S31520001B40388419D038A1027038C102744801C0C146
+S31520001B5038A100E480610270808102747F46D378C8
+S31520001B6048000B892C8300004186054C48012B2D0B
+S31520001B70808300003C600027386319E04801AAB141
+S31520001B8048000550386000C04805237D2C83FFFFA0
+S31520001B90418605403FA00025387D4A98388000645C
+S31520001BA038A00002480523B92C83FFFF418605246F
+S31520001BB0387D4A983880001138A00011480523A1A5
+S31520001BC02C83FFFF4186050C387D4A983880000219
+S31520001BD038A00002480523892C83FFFF418604F4A0
+S31520001BE04803365548001DC148041CC53861000805
+S31520001BF03C80002738841A0438A0000348011B8D36
+S31520001C002C83000040860038880100C62C80000006
+S31520001C1038A10044808102044086000C38C100A807
+S31520001C204800000838C100C638610008480018F18D
+S31520001C302C83FFFF408603F448000498386100088F
+S31520001C403C80002738841A0838A0000248011B3D32
+S31520001C502C83000040860038880100C62C800000B6
+S31520001C6038A10044808102044086000C38C100A8B7
+S31520001C704800000838C100C63861000848001875B9
+S31520001C802C83FFFF408603A448000448386102588D
+S31520001C903881000838A0001448011B41386100082B
+S31520001CA03C80002738841A0C38A0000248011ADD2F
+S31520001CB02C8300004186002C386100083C800027D8
+S31520001CC038841A1038A0000248011AC12C8300005B
+S31520001CD0418600103B8100443B60000048000040E4
+S31520001CE0480071D52C830000408600143C600027F4
+S31520001CF038631A144801A8C9480003D83861025825
+S31520001D008081020438A00000480017BD2C83FFFF05
+S31520001D10418603C03B8100763B6000017F83E378E8
+S31520001D203881027838A000004802DBB97C7E1B7916
+S31520001D30408000143C60002738631A504801A8816F
+S31520001D40480003902C9E00024086003080010278D5
+S31520001D502C80FFFF418600243D20002880099A34EC
+S31520001D60700900404182001038000000981C0000D5
+S31520001D70480000083BC00000380000009001027CAB
+S31520001D807F83E3783881027C4802DC793BE102409C
+S31520001D907FE3FB783C800027388414AC3BA10258B3
+S31520001DA080C102047FA5EB784801AC793D2000284C
+S31520001DB0800102043929AF505400103A7C69002E64
+S31520001DC04803EF8D2C830000418600143C600027D9
+S31520001DD038631A7C7FA4EB78480002F480810204E1
+S31520001DE07FA3EB784803FD8D3D20002890699A2833
+S31520001DF03C804004608469103CA0002838A5AFD000
+S31520001E004803F7212C83FFFF418602C8386000066D
+S31520001E10388008003CA0002438A582B84803FFB1CA
+S31520001E20806102047FA4EB784803A4B92C830000C8
+S31520001E30418600143C60002738631A983881028056
+S31520001E404800028C3C60002738631AC080A1020437
+S31520001E507FA4EB784801A7693D20002880099A34A1
+S31520001E6070090140408200108001027C2C80000015
+S31520001E70408600587FE3FB7848035EF57C691B7932
+S31520001E80408200143C60002738631AE47FE4FB7824
+S31520001E904800023C800900602C8000004186002C0E
+S31520001EA0A8690016800900607C0803A64E800021E0
+S31520001EB02C830000418600143C60002738631AFCFE
+S31520001EC07FE4FB78480002083D20002880099A34E8
+S31520001ED07009004041820024386102407F84E37803
+S31520001EE038A100E438C100A838E1027C4800165D1C
+S31520001EF02C83FFFF418601DC3BA102587FA3EB78B0
+S31520001F007F85E3788081020480E1027C38C000006E
+S31520001F10480014BD2C830000408601B88001027C55
+S31520001F202C80000040860070386102407F84E37870
+S31520001F3030BBFFFF7CA52910380100A87C05283876
+S31520001F4038C1027C48033B858001027C2C8000003E
+S31520001F50418600687FA3EB783C800027388414AC48
+S31520001F6080C102047FA5EB784801AAB98081027C52
+S31520001F707FA3EB78480356BD3C6000278081027C16
+S31520001F8038631B244801A6398001027C2C8000007E
+S31520001F90418600283BA102207FA3EB7880A1027C0A
+S31520001FA03C80002738841B384801AA797F83E37850
+S31520001FB07FA4EB78480116E13D20002880099A3459
+S31520001FC06BC90001216900007D2B4914680000407F
+S31520001FD05400D7FE7C0B4839418200448001027CA4
+S31520001FE02C800000408600183861022080A10278EB
+S31520001FF03C80002738841B3C4800001438610220AE
+S3152000200080A102783C80002738841B444801AA1509
+S315200020107F83E378388102204801167D38604200AC
+S31520002020388100084802D18D3F800027387C14A0D3
+S31520002030388000003FA0002738BD1B4C480011BD4A
+S31520002040387C14A03880000038BD1B4C3CC00027CB
+S3152000205038C61B5838E0000048001375880100C6B2
+S315200020602C80000041860020386100A83BA1020890
+S315200020707FA4EB78480398ED7FA3EB78388100C6E0
+S315200020804804532D3861001C3BA100A87FA4EB789F
+S31520002090480331F97FA3EB78388100E438A1018425
+S315200020A038C101987F47D378480000552C8300001B
+S315200020B04086000C386000004800001C480125DDE1
+S315200020C0808300003C600027386319E04801A4F1B2
+S315200020D03860FFFF800102A47C0803A683410288A2
+S315200020E08361028C8381029083A1029483C102982A
+S315200020F083E1029C382102A04E8000209421FEF824
+S315200021007C0802A6932100EC934100F0936100F431
+S31520002110938100F893A100FC93C1010093E101048F
+S315200021209001010C7C7D1B787C9C23787CBB2B78D2
+S315200021307CDE33787CF93B783C600027881E0000E3
+S3152000214038631B647C0000D0541A0FFE4801A4712A
+S315200021503D20002880099A34700900803BE0000069
+S31520002160418200387FA3EB78388000007F85E378B2
+S315200021703CC0002738C61B703CE0002738E71B749C
+S31520002180390100783921007C4804A1312C83FFFFD6
+S3152000219040860090480001BC2C9A000041860044ED
+S315200021A038010078900100087FA3EB787F64DB7804
+S315200021B07FC5F3783CC0002738C6159C3CE0002735
+S315200021C038E71B7C7CC833787F89E3783941007CEB
+S315200021D04803263D2C83FFFF4086004848000174B3
+S315200021E0386100103C80002738841B847F85E37883
+S315200021F04801A8317FA3EB78388002027F65DB781F
+S315200022007CA62B7838E100103901007C48043A7905
+S315200022102C83FFFF3BE0000190610078418601346A
+S31520002220806100787F24CB78480179D12C83000007
+S315200022304086006C2C9F00004086004C8061007810
+S315200022403881001038A00064480132F52C83000044
+S315200022504185FFEC2C9A00004186002C8061007C91
+S315200022603C80002738841B8C38A0000038C0000032
+S3152000227038E0000039000000392000003940000015
+S315200022804803243580610078480131F18061007C63
+S31520002290480131E938600000480000BC2C9F00004E
+S315200022A04086005C806100783881001038A0006488
+S315200022B04801328D2C8300004185FFEC2C9A0000CA
+S315200022C0418600808061007C388000004803280D0C
+S315200022D03C80002738841B8C38A0000038C00000C2
+S315200022E038E0000039000000392000008061007CC1
+S315200022F039400000480323C1480000488061007C23
+S315200023003BE100807FE4FB7838A000644801B78178
+S315200023107C631B794081002C392100107D291A14F9
+S3152000232038000000980900703C60002738631B9431
+S315200023307FA4EB787F85E3787FE6FB784801A2814E
+S3152000234080610078480131358061007C4801312D5B
+S315200023503860FFFF8001010C7C0803A6832100EC76
+S31520002360834100F0836100F4838100F883A100FC9F
+S3152000237083C1010083E10104382101084E80002039
+S315200023809421FFF87C0802A69001000C7C631B793F
+S315200023903960000041820054880300002C80000030
+S315200023A04186003C88030000392B00016800002F7D
+S315200023B07C0000D07C00FE707D6B00387D29007883
+S315200023C07D6B4B78880300002C8B0001386300015D
+S315200023D098040000388400014085FFC038000000C2
+S315200023E098040000480000147C8323783C80002752
+S315200023F03884159C480113358001000C7C0803A6FF
+S31520002400382100084E8000209421FB787C0802A603
+S3152000241093410470936104749381047893A1047C9E
+S3152000242093C1048093E104849001048C7C9C2378DE
+S31520002430289C00017C7B1B787CA32B783BE000004A
+S31520002440408500143C60002738631BA038800001BB
+S31520002450480000FC388100084BFFFF2993E104580F
+S3152000246093E1045C39200001912104603801005871
+S31520002470900104649121046893E1046C7F63DB7806
+S315200024807F84E37838A1045848003F8D3FA0002779
+S31520002490387D1BC0480112C93BC1005B7C651B7897
+S315200024A07FC3F378389D1BC0480112E12C830000BE
+S315200024B03B4102164186003C3FA00027387D1BC8C1
+S315200024C04801129D7C651B787FC3F378389D1BC815
+S315200024D0480112B92C830000418600187F63DB78FF
+S315200024E07F84E3787F45D378480000957C7F1B78EE
+S315200024F07F63DB787F84E37838A000007FE6FB7873
+S3152000250048003CD17C641B79408200184801218D0B
+S31520002510808300003C60002738631BD048000030D1
+S315200025203861000838A0000048050D452C830000BE
+S315200025304186000C386000004800001C4801215DDF
+S31520002540808300003C60002738631BF04801A0E12F
+S315200025503860FFFF8001048C7C0803A68341047049
+S31520002560836104748381047883A1047C83C10480FD
+S3152000257083E10484382104884E8000209421FBD8EE
+S315200025807C0802A693C1042093E104249001042C24
+S315200025907C7F1B787C9E23787CA92B787D2A4B78A0
+S315200025A03860000039600000880900002C80008017
+S315200025B04086004C880900042C8000014186001CBE
+S315200025C0880900042C800004418600108809000434
+S315200025D02C80000640860028806900085469C00EB9
+S315200025E05460421E7D2903785460C42E7D290378C9
+S315200025F05463463E7D231B78480000D8396B000182
+S315200026002C8B0003392900104085FFA07D49537883
+S3152000261039600000880900042C8000014186001CD6
+S31520002620880900042C8000044186001088090004D3
+S315200026302C8000064086000C806900084800009423
+S31520002640396B00012C8B0003392900104085FFC807
+S315200026507D49537839600000880900042C800005E4
+S31520002660408600607FE3FB78A00900027FC4F378F0
+S315200026705400E73E900104088809000138A10408A7
+S315200026809001040C38010008A129000290010414CD
+S315200026903800000190010418380000009001041C45
+S315200026A05529073E9121041048003D6D7FE3FB78B4
+S315200026B07FC4F37838A101C64BFFFEC5480000143D
+S315200026C0396B00012C8B0003392900104085FF8CC3
+S315200026D08001042C7C0803A683C1042083E1042402
+S315200026E0382104284E8000209421FFE87C0802A689
+S315200026F09381000893A1000C93C1001093E100146C
+S315200027009001001C7C7F1B787C9D23787CBE2B78D7
+S315200027107CDC33783D2000281D7F00543929C7D81A
+S315200027207D6B4A14808B003480AB003880CB003C14
+S3152000273080EB0040810B0044812B00484800342167
+S315200027402C83FFFF408600103C60002738631C1056
+S31520002750480000383C60002738631C2848019E61E9
+S315200027603860001448050AB17FE3FB787FA4EB7834
+S315200027707FC5F3784BFFFC952C83FFFF408600181E
+S315200027803C60002738631C4C48019EA53860FFFF3B
+S31520002790480000983C60002738631C6448019E91DD
+S315200027A03C60002738631C6C7FC4F37848019E8107
+S315200027B07FC3F3783880000038A0000048012B0141
+S315200027C07C7F1B782C9FFFFF4086001C3C600027E7
+S315200027D038631C7C7FC4F37848019E553860FFFF20
+S315200027E0480000487FE3FB787F84E3784801740D36
+S315200027F02C8300004186002848011EA1808300000A
+S315200028003C60002738631C9048019E257FE3FB78B7
+S3152000281048012C693860FFFF480000107FE3FB78F1
+S3152000282048012C59386000008001001C7C0803A652
+S315200028308381000883A1000C83C1001083E100146A
+S31520002840382100184E8000209421FFD87C0802A64B
+S3152000285093C1002093E100249001002C7C7E1B79FB
+S3152000286041820034881E00002C800000418600280A
+S31520002870881E00002C800020408600108C1E00013F
+S315200028802C8000204186FFF8881E00002C80000046
+S31520002890408600143C60002738631CB848019D21FF
+S315200028A0480001C83D200028897E0000814981B06A
+S315200028B07C0A58AE700900043BE000004082004CC0
+S315200028C07D3EF8AE5529063E7C0A48AE70090028A2
+S315200028D0408200387D4B53787C1EF8AE2C80000059
+S315200028E0418600283BFF00017D3EF8AE7C0B48AEBA
+S315200028F070090004408200147D3EF8AE7C0B48AE81
+S31520002900700900284182FFD47C1EF8AE2C8000007E
+S31520002910408600089001001C7C1EFA1490010018C5
+S31520002920386100183881001C38A000004802DC29D4
+S315200029302C8300004186000C380000009001001C0A
+S31520002940380000007C1EF9AE386100083C80002764
+S31520002950388414AC80C1001C7FC5F3784801A0C51B
+S31520002960386100083C80002738841A0C38A0000201
+S3152000297048010E192C830000408600204800653946
+S315200029807C651B783C60002738631CD4388100089E
+S3152000299048019C2D480000D44803289D48040F1167
+S315200029A038610008480353C97C6B1B79408200704C
+S315200029B07FC3F3788081001C3FE0002738BF1D04C9
+S315200029C0480008392C830000408600247FC3F37812
+S315200029D08081001C38BF1D0438C0000038E000008C
+S315200029E0480009ED2C830000418600103C6000273A
+S315200029F038631D084800001C3861000848035371DD
+S31520002A007C6B1B79408200183C60002738631D30A0
+S31520002A103881000848019BA948000050A00B001AE5
+S31520002A207009001040820038A00B001A70090008B7
+S31520002A304082002C3C60002738631D5488AB0090F0
+S31520002A4088CB009188EB0092890B0093892B009408
+S31520002A50894B00953881000848019B65386100083C
+S31520002A604803530D4803395D8001002C7C0803A6DA
+S31520002A7083C1002083E10024382100284E800020D5
+S31520002A809421FFE87C0802A693A1000C93C10010B4
+S31520002A9093E100149001001C7C7D1B783C6000278C
+S31520002AA038631D907FA4EB7848019B1548005CE1B4
+S31520002AB0480255AD48033665480062D17C641B78D0
+S31520002AC0386000004801102D7FA803A64E80002103
+S31520002AD08001001C7C0803A683A1000C83C1001082
+S31520002AE083E10014382100184E8000209421FF40F5
+S31520002AF07C0802A693E100BC900100C4547F003CF0
+S31520002B003C60002738631DA8A0BF00007FE4FB7847
+S31520002B1048019AAD386000003881000838A000A02E
+S31520002B204801AFFD2C83FFFF41860074380000006A
+S31520002B303D20002889610008814981B0980100A8BC
+S31520002B407C0A58AE700900283861000841820018B6
+S31520002B507D4B53788D2300017C0B48AE70090028ED
+S31520002B604082FFF4880300002C8000004186002864
+S31520002B703C80002738841DB838A100B038C100B485
+S31520002B804801B08D2C83000140860014A00100B2BC
+S31520002B90B01F00003BFF00024BFFFF683C60002790
+S31520002BA0386314D848019A19800100C47C0803A60A
+S31520002BB083E100BC382100C04E8000209421FFC054
+S31520002BC07C0802A69301002093210024934100282B
+S31520002BD09361002C9381003093A1003493C1003877
+S31520002BE093E1003C90010044549D083D7C7E1B7877
+S31520002BF03800000098010018408200103D20002770
+S31520002C0083A97E3C4800000C3D20002793A97E3CEA
+S31520002C102C9E00004086000C3D20002783C97E386C
+S31520002C2057DE003C386100083880001038A0002E9E
+S31520002C304800E87D3C60002738631DC057C4003635
+S31520002C403BE000004801997957C0073E7C9F000071
+S31520002C50408400503F0000273F8000273B20002073
+S31520002C603B4100087C1B037838781DC848019951E0
+S31520002C7073E000014182000C387C1DCC480199414B
+S31520002C802C9F00074086000C387C1DCC48019931CA
+S31520002C907F3AF9AE3BFF00017C9FD8004184FFCCF0
+S31520002CA07FA0EB782C8000003BBDFFFF408500BC59
+S31520002CB03F8000272C9F00104086002C3C60002778
+S31520002CC038631DD0388100087FC5F378480198F114
+S31520002CD0386100083880001038A0002E3BE0000044
+S31520002CE04800E7CD889E00003C60002738631DE43D
+S31520002CF0480198CD73E000014182000C387C1DCC40
+S31520002D00480198BD2C9F00074086000C387C1DCCBE
+S31520002D10480198AD881E00002C800020418600289E
+S31520002D20881E00002880007F418500283D2000283D
+S31520002D30897E0000812981B07C0958AE7009001F68
+S31520002D4041820010881E0000392100087C09F9AE56
+S31520002D507FA0EB782C8000003BDE00013BFF0001CA
+S31520002D603BBDFFFF4185FF502C9F000F4185004C46
+S31520002D703F4000273FA000273B6000203B81000802
+S31520002D80387A1DC84801983973E000014182000C49
+S31520002D90387D1DCC480198292C9F00074086000CC1
+S31520002DA0387D1DCC480198197F7CF9AE3BFF000188
+S31520002DB02C9F000F4085FFCC3C60002738631DEC1C
+S31520002DC038810008480197F93D20002793C97E38AD
+S31520002DD0800100447C0803A683010020832100246F
+S31520002DE0834100288361002C8381003083A1003435
+S31520002DF083C1003883E1003C382100404E8000200A
+S31520002E009421FF507C0802A693E100AC900100B407
+S31520002E107C7F1B7838810008480190792C83FFFF3E
+S31520002E204186002038610008388000007FE5FB7865
+S31520002E304800EFCD7FE3FB7848025BE148000010B5
+S31520002E403C60002738631DF84801977548005941B2
+S31520002E504802520D3860000148014D1D800100B422
+S31520002E607C0803A683E100AC382100B04E80002008
+S31520002E70812300003D60002889490000812B81B014
+S31520002E807C0950AE700900284D8200203D40002864
+S31520002E908003000030000001900300008003000042
+S31520002EA08123000089690000812A81B07C0958AEFF
+S31520002EB0700900284082FFDC4E8000209421FFE824
+S31520002EC07C0802A693A1000C93C1001093E1001484
+S31520002ED09001001C7C7F1B783C600027386314D847
+S31520002EE0480196DD881F00002880007F4185004824
+S31520002EF03FA000283FC00027893F0000817D81B088
+S31520002F007C0B48AE7009001F40820014893F0000E8
+S31520002F107C0B48AE700900284182001C889F000067
+S31520002F20387E1E30480196998C1F00012880007F2C
+S31520002F304085FFC83C600027386314D84801968135
+S31520002F408001001C7C0803A683A1000C83C100100D
+S31520002F5083E10014382100184E8000209421FFE8D8
+S31520002F607C0802A69381000893A1000C93C100104F
+S31520002F7093E100149001001C7C7F1B787C9D2378B4
+S31520002F807CBC2B787CDE33784BFFFEE9813F00004A
+S31520002F90880900002C800000408600182C9E000026
+S31520002FA04086007C3C60002738631E34480000645D
+S31520002FB07FE3FB787FA4EB787F85E3784802D59979
+S31520002FC02C830000408600447FE3FB784BFFFEA560
+S31520002FD0813F0000880900002C80002C4086001CC0
+S31520002FE0801F00003860000030000001901F0000A4
+S31520002FF0801F00004800002C813F00008809000047
+S315200030002C800000418600183C60002738631E484B
+S31520003010480195AD3860FFFF480000083860000081
+S315200030208001001C7C0803A68381000883A1000C74
+S3152000303083C1001083E10014382100184E8000203F
+S315200030409421FFF87C0802A69001000C7060000213
+S315200030504182003C38604200388000FA38A00000E7
+S3152000306048004B492C83FFFF41860014392042003B
+S31520003070880900002C800000408600143860420039
+S315200030803C80002738841E5C480106A18001000C84
+S315200030907C0803A6382100084E8000209421FFF0EA
+S315200030A07C0802A693C1000893E1000C900100144D
+S315200030B07C7E1B787C9F23784802BD157C641B7818
+S315200030C0880400002C800000418600147FC3F3781A
+S315200030D04802C7D53860FFFF48000058387F003CBB
+S315200030E038800001480000652C8300004086FFE8F8
+S315200030F0387F006E38800001480000512C83000084
+S315200031004086FFD4387F00A0388000004800003D6C
+S315200031102C8300004086FFC0387F00BE3880000028
+S31520003120480000292C8300004086FFAC3860000050
+S31520003130800100147C0803A683C1000883E1000CEB
+S31520003140382100104E8000209421FFC87C0802A65A
+S3152000315093C1003093E100349001003C7C7F1B78C2
+S315200031607C9E2378386100083880001E48016BA9B0
+S31520003170881F00002C8000004186004C3861000822
+S315200031807FE4FB7838A0001D480106512C9E0000E4
+S315200031904186002438610008388100284802C86525
+S315200031A02C830000408400103C60002738631EA852
+S315200031B04800002438610008480384092C83FFFF57
+S315200031C04186000C38600000480000183C6000274B
+S315200031D038631ED438810008480193E53860FFFF24
+S315200031E08001003C7C0803A683C1003083E10034C3
+S315200031F0382100384E8000209421FFC87C0802A682
+S3152000320093A1002C93C1003093E100349001003C3F
+S315200032107C7E1B787C9D2378386100103C800027BB
+S31520003220388414AC7FC5F3787FA6EB78480197F5F0
+S315200032303D20002780097C182C8000003BE97C1863
+S3152000324041860024809F0000386100104801049DBB
+S315200032502C83000041860010841F00282C8000004B
+S315200032604086FFE4801F00002C800000408600403E
+S315200032702C9D0000408600383D20002780097C18C0
+S315200032802C8000003BE97C1841860024809F0000AA
+S315200032907FC3F378480104552C8300004186001033
+S315200032A0841F00282C8000004086FFE4801F000039
+S315200032B02C800000408600143C60002738631F08DD
+S315200032C07FC4F378480000D0801F00042C800000C3
+S315200032D0408600183C60002738631F287FC4F37897
+S315200032E0480192DD480000C83C60002738631F581B
+S315200032F038810010480192C9809F000880BF000CC9
+S3152000330080DF001080FF0014811F0018813F001C01
+S31520003310815F0020801F002490010008801F000488
+S315200033207C0803A67FA3EB784E8000212C83000027
+S3152000333041860070480113653D20000D8003000082
+S31520003340612900057C804800408600143C600027E7
+S3152000335038631F7C48019269480000404801133DAC
+S315200033603D20000D80030000612900077C80480075
+S31520003370408600143C60002738631FB04801924104
+S315200033804800001848011315808300003C60002780
+S3152000339038631FEC480192293860FFFF480000146B
+S315200033A03C60002738631C64480192153860000091
+S315200033B08001003C7C0803A683A1002C83C1003039
+S315200033C083E10034382100384E8000209421FFD03C
+S315200033D07C0802A693A1002493C1002893E1002C27
+S315200033E0900100347CBE2B78881E00007C691B78F7
+S315200033F02C8000007C8B23787CDF33787CFD3B7827
+S315200034004086001C3C600027386320047D244B78CE
+S31520003410480191AD3860FFFF4800009038610008F0
+S315200034203C800027388414AC7D254B787D665B78FC
+S31520003430480195F12C9D0000418600103861000856
+S315200034407FA4EB78480341ED386100087FC4F37808
+S315200034504803405D2C8300004186002C4801123D24
+S315200034607C691B783C60002738632034388100084B
+S3152000347080C900007FC5F378480191453860FFFF79
+S31520003480480000282C9F00004186001C881F000051
+S315200034902C800000418600107FE3FB787FC4F37800
+S315200034A048031DE938600000800100347C0803A62B
+S315200034B083A1002483C1002883E1002C3821003019
+S315200034C04E8000209421FFF87C0802A69001000C73
+S315200034D03C6000273863206C480190E53860FFFF88
+S315200034E08001000C7C0803A6382100084E800020AD
+S315200034F09421FFF87C0802A69001000C3C6000276E
+S31520003500386320A4480190B93860FFFF8001000C81
+S315200035107C0803A6382100084E8000209421FFF85D
+S315200035207C0802A69001000C3C600027386320C06E
+S315200035304801908D3860FFFF8001000C7C0803A6AF
+S31520003540382100084E8000209421FEB07C0802A677
+S3152000355093210134934101389361013C93810140C9
+S3152000356093A1014493C1014893E1014C9001015478
+S315200035707C7E1B787C9D23787CBC2B787CDB337807
+S315200035807CF93B7838000000900101283861012041
+S31520003590388000044801678138610124388000049E
+S315200035A0480167753861010838800012480167694B
+S315200035B038610008388001004801675D7FC3F378D1
+S315200035C03C80002738841A0C38A00002480101BD2F
+S315200035D02C830000418600207FC3F3783C8000279F
+S315200035E038841A1038A00002480101A12C8300005B
+S315200035F040860024881D00002C8000004186009C07
+S315200036007FA3EB7848037FBD2C83FFFF90610120C9
+S3152000361041860088380101209001000838010124E4
+S315200036209001000C938100103801012890010018A8
+S315200036303C600027386320DC7FC4F37848018F8103
+S315200036407FC3F3783880000038A0000038C1000816
+S315200036504802D0592C83FFFF418600403B41012C74
+S315200036607F43D3788121000C3BE1010880090000CB
+S315200036707FE4FB789001012C480384C93C60002735
+S31520003680386321107FE4FB7848018F35881C0000C1
+S315200036902C8000004086000C3860FFFF480000A800
+S315200036A03C600027386321247F84E37848018F110A
+S315200036B0881B00002C800000408600247F63DB7876
+S315200036C07FE4FB7838A00012480101113C600027F6
+S315200036D0386321387F64DB7848018EE5881D000039
+S315200036E02C80000040860030812100087F43D3785B
+S315200036F0800900007FA4EB789001012C48038445C3
+S315200037003C6000273863214C7FC4F3787FA5EB7893
+S3152000371048018EAD801900002C80000040860024D0
+S31520003720800101282C800000418600189019000095
+S31520003730809900003C6000273863216C48018E8107
+S3152000374038600000800101547C0803A683210134DF
+S31520003750834101388361013C8381014083A1014477
+S3152000376083C1014883E1014C382101504E8000205D
+S315200037709421FF187C0802A6936100D4938100D877
+S3152000378093A100DC93C100E093E100E4900100ECFA
+S31520003790906100C0386100C0388100C438A00000A4
+S315200037A04802CDB52C8300004186000C380000006D
+S315200037B0900100C8388100103BE000053BA10008BD
+S315200037C03F6000273BC1000D806100C43B81000A99
+S315200037D0480044ED3C6000273863218448018DE190
+S315200037E03C6000278881001588A1001488C1001339
+S315200037F088E100128901001189210010386321A473
+S3152000380048018DBD380000009801000D380000D019
+S315200038109801000C3800002B9801000B3C60002713
+S31520003820386321C488010012892100109801000AFA
+S3152000383088010011992100089801000948018D810D
+S315200038403C6000273863221048018D75387B22584A
+S315200038507C9DF8AE7CBDF8AE3BDEFFFF48018D6156
+S315200038607C9EE0003BFFFFFF4185FFE43BE000023A
+S315200038703BA100083B8100183BC1000A7C9DF8AEA5
+S315200038803C6000273863226448018D35386000008B
+S315200038907F84E37838A000A04801A2852C83FFFF0F
+S315200038A04186007C380000003D20002889610018F0
+S315200038B0814981B09801001E7C0A58AE7009002803
+S315200038C07F83E378418200187D4B53788D23000156
+S315200038D07C0B48AE700900284082FFF48803000064
+S315200038E02C800000418600283C80002738841DB8A3
+S315200038F038A100C838C100CC4801A3152C8300018B
+S315200039004086001C880100CB7C1DF9AE3BDEFFFF04
+S315200039107C9EE8003BFFFFFF4084FF643C6000275D
+S31520003920386314D83BE000053BC1000848018C9160
+S315200039308861000D8881000C88A1000B88C1000ACF
+S3152000394088E10009890100083FA00027480043BDFF
+S315200039503C6000273863226C48018C657C9EF8AE5B
+S31520003960387D228848018C5937FFFFFF4181FFF0BF
+S31520003970888100083C6000273863229048018C41EA
+S31520003980800100EC7C0803A6836100D4838100D8E3
+S3152000399083A100DC83C100E083E100E4382100E854
+S315200039A04E8000209421FFF87C0802A69001000C8E
+S315200039B03C60002738637CAC4803828148038361DE
+S315200039C0480384113C60002738637C9C4804A0454A
+S315200039D03C60002738637C78480443F93C60002724
+S315200039E038637CA848032015480366113860000018
+S315200039F08001000C7C0803A6382100084E80002098
+S31520003A007C6B1B787C8B204040840014916B0000DB
+S31520003A10396B00047C8B20404184FFF47C6B1B783F
+S31520003A207C8B204040840024800B00007C80580042
+S31520003A304186000C386000014E800020396B00045E
+S31520003A407C8B20404184FFE47C6B1B787C8B204060
+S31520003A50408400187D6058F8900B0000396B0004F4
+S31520003A607C8B20404184FFF07C6B1B787C8B204034
+S31520003A7040840020800B00007D6958F87C80480037
+S31520003A804086FFB4396B00047C8B20404184FFE8DC
+S31520003A90386000004E8000207C6000A65464045EDE
+S31520003AA054840732548406B07C8001244C00012CB7
+S31520003AB03C800400388400007C908BA67C988BA6E2
+S31520003AC03C800A00388400007C908BA67C988BA6CC
+S31520003AD03C800C00388400007C908BA67C988BA6BA
+S31520003AE07C0002E43C200001382100003C600000FC
+S31520003AF0386300003821FFF04BFFD1043D00002839
+S31520003B0081289A3C7D203E707C001A78540007FE5E
+S31520003B10540B1838540A20367D6B53787D295A78F1
+S31520003B205529083C7D29037891289A3C4E8000200F
+S31520003B309421FFF07C0802A693E1000C900100146A
+S31520003B40480187B57C7F1B784801C119801F0ABCB4
+S31520003B505400003C901F0ABC801F0AB85400003C49
+S31520003B60901F0AB8A01F0AC260000001B01F0AC237
+S31520003B70801F0AC460000001901F0AC4801F0AB873
+S31520003B8060000001901F0AB8801F0AC43920270F41
+S31520003B905400003C901F0AC43529FFFF4080FFFCDB
+S31520003BA0801F0AC460000001901F0AC4801F0AB843
+S31520003BB0392004AF5400003C901F0AB83529FFFF76
+S31520003BC04080FFFC801F0AC4541F07FE4801C0A97D
+S31520003BD03800270F3400FFFF4080FFFC3D200028DF
+S31520003BE03800000090099A3C7FE3FB78800100149E
+S31520003BF07C0803A683E1000C382100104E800020AB
+S31520003C009421FFF07C0802A693E1000C9001001499
+S31520003C10480186E57C7F1B784801C049801F0ABC85
+S31520003C205400003C901F0ABC801F0AB85400003C78
+S31520003C30901F0AB8A01F0AC260000001B01F0AC266
+S31520003C40801F0AC460000001901F0AC4801F0AB8A2
+S31520003C5060000001901F0AB8801F0AC43920006343
+S31520003C605400003C901F0AC43529FFFF4080FFFC0A
+S31520003C70801F0AC439200BB760000001901F0AC4B8
+S31520003C803529FFFF4080FFFC801F0AB83920012B11
+S31520003C905400003C901F0AB83529FFFF4080FFFCE6
+S31520003CA04801BFD5800100147C0803A683E1000CDF
+S31520003CB0382100104E8000209421FFF07C0802A6B7
+S31520003CC093E1000C900100144801862D7C7F1B781F
+S31520003CD04801BF91801F0ABC5400003C901F0ABCBB
+S31520003CE0801F0AB85400003C901F0AB8A01F0AC2C1
+S31520003CF060000001B01F0AC2801F0AC460000001D4
+S31520003D00901F0AC4801F0AB860000001901F0AB8DD
+S31520003D10801F0AC4392000635400003C901F0AC447
+S31520003D203529FFFF4080FFFC801F0AC439200BB7CE
+S31520003D305400003C901F0AC43529FFFF4080FFFC39
+S31520003D40801F0AB83920012B5400003C901F0AB866
+S31520003D503529FFFF4080FFFC4801BF1D800100146C
+S31520003D607C0803A683E1000C382100104E80002039
+S31520003D709421FFF07C0802A693E1000C9001001428
+S31520003D80480185757C7F1B784801BED9801F0ABCF7
+S31520003D905400003C901F0ABC801F0AB85400003C07
+S31520003DA0901F0AB8A01F0AC260000001B01F0AC2F5
+S31520003DB0801F0AC460000001901F0AC4801F0AB831
+S31520003DC060000001901F0AB8801F0AC439200063D2
+S31520003DD05400003C901F0AC43529FFFF4080FFFC99
+S31520003DE0801F0AC460000001901F0AC4801F0AB801
+S31520003DF0392000C75400003C901F0AB83529FFFF20
+S31520003E004080FFFC801F0AC4541F07FE4801BE697C
+S31520003E1038000BB73400FFFF4080FFFC7FE3FB78C0
+S31520003E204BFFFCDD7FE3FB78800100147C0803A6B2
+S31520003E3083E1000C382100104E8000209421FFF0F1
+S31520003E407C0802A693C1000893E1000C900100149F
+S31520003E503BC000003BE000004BFFFF197C63F830BD
+S31520003E603BFF00012C9F00077FDE1B784085FFEC7F
+S31520003E707FC3F378800100147C0803A683C1000861
+S31520003E8083E1000C382100104E8000209421FFF0A1
+S31520003E907C0802A693C1000893E1000C900100144F
+S31520003EA07C7F1B783BC0000073E000014182000C40
+S31520003EB04BFFFD51480000084BFFFE013BDE000191
+S31520003EC02C9E00077FFF0E704085FFE080010014C6
+S31520003ED07C0803A683C1000883E1000C382100106A
+S31520003EE04E8000209421FFF07C0802A693C1000892
+S31520003EF093E1000C900100144BFFFC39386000332D
+S31520003F003BE000004BFFFF893D2000283BC99A4437
+S31520003F104BFFFF2D7C7FF1AE3BFF00012C9F00075E
+S31520003F204085FFF0800100147C0803A683C10008A9
+S31520003F3083E1000C382100104E8000209421FFF8E8
+S31520003F407C0802A69001000C480183AD8803087006
+S31520003F502C80000039200000418600187D29037836
+S31520003F6098030870880308702C8000004086FFF0B4
+S31520003F702C890000418600403D20002780697FC0B3
+S31520003F80480208592C8300004186002C4801070D61
+S31520003F90808300003C6000273863229838A0000008
+S31520003FA038C0000038E00000390000003920000049
+S31520003FB048012DC58001000C7C0803A63821000885
+S31520003FC04E8000209421FFF87C0802A69001000C68
+S31520003FD048018325386322908001000C7C0803A6C3
+S31520003FE0382100084E8000209421FFF07C0802A68C
+S31520003FF093E1000C90010014480182FD7C7F1B7820
+S315200040004BFFFFC5801F0ABC60000030901F0ABC12
+S31520004010801F0AB860000030901F0AB8A01F0AC28D
+S315200040203923000860000030B01F0AC27C601B786C
+S31520004030B01F3C80B13F3C82A01F09C0700900011F
+S315200040404082FFF838000010B01F09C0A01F09C029
+S31520004050700900014082FFF838000710B01F09C020
+S31520004060A01F09C0700900014082FFF83800000136
+S31520004070901F003039400010995F3C84995F3C8541
+S3152000408038000200B01F3C8639600000917F3C88D2
+S31520004090A01F3C803D200028B01F3C90917F3C987B
+S315200040A0A01F3C823929B9F8B01F3CA091230004F7
+S315200040B038003000B003000038000000B0030002D2
+S315200040C03D2000283929C8D09123000CB0030008D0
+S315200040D03D2000283929C5D891230014B0030010AB
+S315200040E038000066981F0864380000FF981F087083
+S315200040F038000001981F086C38000000981F0860DF
+S31520004100881F08603D200027981F0860995F08686F
+S3152000411091697FC0800100147C0803A683E1000C0E
+S31520004120382100104E8000209421FFF07C0802A642
+S3152000413093E1000C90010014480181BD7C7F1B781F
+S315200041404BFFFEA938600000388000004801F86166
+S315200041502C8300003D20002790697FC040860010F8
+S315200041603C600027386322C04800005438600004B1
+S31520004170480212D12C8300003D20002790697FC47D
+S3152000418041860034386000303C80002038843E3C34
+S3152000419038A000004804FB7938000017981F0874DF
+S315200041A0801F09483860000064000001901F0948FC
+S315200041B04800002C3C600027386322E0388000004D
+S315200041C038A0000038C0000038E0000039000000A8
+S315200041D03920000048012BA13860FFFF8001001420
+S315200041E07C0803A683E1000C382100104E800020B5
+S315200041F09421FFF07C0802A693E1000C90010014A4
+S315200042007C7F1B78480180F12C9F0001408600109E
+S315200042108803086060000001480000142C9F0000FD
+S3152000422040860010880308605400063C9803086006
+S31520004230800100147C0803A683E1000C38210010BD
+S315200042404E8000209421FFF07C0802A693E1000C0A
+S31520004250900100147C7F1B784BFFFD6D2C9F000185
+S3152000426040860010A0030000600080004800001473
+S315200042702C9F000040860010A00300005400047EFE
+S31520004280B0030000800100147C0803A683E1000C23
+S31520004290382100104E8000209421FFE87C0802A6D9
+S315200042A09381000893A1000C93C1001093E10014A0
+S315200042B09001001C7C7D1B787C9C23784BFFFD099C
+S315200042C057BD18387C63EA14B38300088001001CAC
+S315200042D07C0803A68381000883A1000C83C10010FB
+S315200042E083E10014382100184E8000209421FFE835
+S315200042F07C0802A693A1000C93C1001093E1001440
+S315200043009001001C7C7D1B787C9E23787CBF2B78BB
+S315200043104BFFFCB53960000057A018387C8BF8009D
+S315200043207D2302147FE0FB78B009000A4084002038
+S315200043307D2A4B78812A000C7C1E58AE7C0959AE0A
+S31520004340396B00017C8BF8004184FFEC57A91838A3
+S315200043507D234A14A009000860008000B0090008E7
+S315200043608001001C7C0803A683A1000C83C10010D9
+S3152000437083E10014382100184E8000209421FFE8A4
+S315200043807C0802A69381000893A1000C93C100101B
+S3152000439093E100149001001C7C7C1B7848017F5916
+S315200043A07C7D1B784BFFFC21388000007C7F1B78AE
+S315200043B03D20002780697FC03BC000004802057968
+S315200043C0881D086C7C9EE00060000080981D086CAB
+S315200043D0408401043D20002783A97FC0480043B1C3
+S315200043E07C641B787FA3EB784802054D2C83000064
+S315200043F041860064480102A53D20003D800300005F
+S31520004400612900047C804800408600184801028DFE
+S315200044107C691B783C600027386322FC4800001426
+S31520004420480102797C691B783C6000273863231891
+S3152000443038A0000038C0000038E000003900000035
+S3152000444080890000392000004801292D3860FFFFAF
+S3152000445048000088A01F00087009800041820030B3
+S315200044603C600027386323503880000038A00000C5
+S3152000447038C0000038E00000390000003920000074
+S31520004480480128F53860FFFE48000050A01F0008AC
+S3152000449070090004418200303C6000273863237491
+S315200044A03880000038A0000038C0000038E0000046
+S315200044B03900000039200000480128BD3860FFFD82
+S315200044C0480000183BDE00017C9EE0003BFF000810
+S315200044D04184FF04386000008001001C7C0803A68C
+S315200044E08381000883A1000C83C1001083E100149E
+S315200044F0382100184E8000209421FFE87C0802A66F
+S315200045009381000893A1000C93C1001093E100143D
+S315200045109001001C7C7C1B787C9F23784BFFFAA99A
+S315200045207C7E1B78A01E00027C9F00004085000830
+S31520004530A3FE00023D20002783A97FC048004251E8
+S315200045407C641B787FA3EB78480203ED2C83000064
+S3152000455041860058480101453D20003D800300006A
+S31520004560612900047C804800408600184801012DFE
+S315200045707C691B783C60002738632394480000142C
+S31520004580480101197C691B783C600027386323B0F9
+S3152000459038A0000038C0000038E0000039000000D4
+S315200045A0808900004800002CA01E000070098000B1
+S315200045B0418200303C600027386323E438800000C5
+S315200045C038A0000038C0000038E0000039000000A4
+S315200045D039200000480127A1386000004800002C3F
+S315200045E0396000007C8BF8004084001C813E00046A
+S315200045F07C0958AE7C1C59AE396B00017C8BF800C7
+S315200046004184FFEC7FE3FB788001001C7C0803A635
+S315200046108381000883A1000C83C1001083E100146C
+S31520004620382100184E8000209421FFF07C0802A635
+S3152000463093C1000893E1000C900100147C7E1B7846
+S315200046407C9F23784BFFF981A00300027C9F00000A
+S3152000465040850008A3E30002396000007C8BF80047
+S315200046604084001C812300047C0958AE7C1E59AE70
+S31520004670396B00017C8BF8004184FFEC7FE3FB78EB
+S31520004680800100147C0803A683C1000883E1000C86
+S31520004690382100104E8000209421FDE07C0802A6DF
+S315200046A09361020C9381021093A1021493C1021804
+S315200046B093E1021C900102247C7B1B783D2000277D
+S315200046C080697FC4549C063E3880FFFF7CDF3378A8
+S315200046D054BD063E480202612C8300003BC0FFFF0A
+S315200046E0418600384800FFB57C691B783C6000276E
+S315200046F0386324088089000038A0000038C00000F4
+S3152000470038E0000039000000392000004801266901
+S315200047103860FFFF4800008038600000388038008D
+S315200047204BFFFB79396000007C8BF8005780083CF2
+S31520004730980100089BA10009408400203941000807
+S315200047407D2A5A147C1B58AE396B00017C8BF800ED
+S31520004750980900024184FFEC386000003881000887
+S3152000476038BF00024BFFFB89386000014BFFFC116C
+S315200047707C69FE707D201A787C0048503D200027F9
+S3152000478080697FC47C00FE707FDE00384802004DC1
+S315200047907FC3F378800102247C0803A68361020C80
+S315200047A08381021083A1021483C1021883E1021CB3
+S315200047B0382102204E8000209421FDD87C0802A6B4
+S315200047C0930102089321020C934102109361021473
+S315200047D09381021893A1021C93C1022093E1022423
+S315200047E09001022C7C781B783D20002780697FC4AD
+S315200047F0549F063E3880FFFF7CDD337854B9063E51
+S31520004800480201352C8300003B80FFFF418600389B
+S315200048104800FE897C691B783C60002738632408A1
+S315200048208089000038A0000038C0000038E0000071
+S3152000483039000000392000004801253D3860FFFF7F
+S31520004840480000C83BC0000057FB083C637A0001C3
+S31520004850386000014BFFF9F1386000003880100005
+S315200048604BFFFA399B6100089B2100093860000044
+S315200048703881000838A000024BFFFA753860000125
+S3152000488038803C004BFFFA159B4100083860000138
+S315200048903881000838BD00014BFFFA553860000208
+S315200048A04BFFFADD7C7F1B79408200287F03C3788B
+S315200048B07FA4EB784BFFFC457C63EA787C69FE702D
+S315200048C07D201A787C0048507C00FE707F9C003842
+S315200048D03BDE00012C9E0001213FFFFE2009000047
+S315200048E07D2049144CE623827C000026540047FE96
+S315200048F07D2B00394082FF5C3D20002780697FC4E4
+S315200049004801FED97F83E3788001022C7C0803A628
+S31520004910830102088321020C834102108361021461
+S315200049208381021883A1021C83C1022083E1022411
+S31520004930382102284E8000209421FDE87C0802A61A
+S3152000494093A1020C93C1021093E102149001021C60
+S315200049507C7D1B783D20002780697FC4549E063EBF
+S315200049603880FFFF7CBF2B784801FFCD2C830000C9
+S31520004970418600384800FD257C691B783C6000276D
+S31520004980386324088089000038A0000038C0000061
+S3152000499038E000003900000039200000480123D902
+S315200049A03860FFFF48000068386000003880380013
+S315200049B04BFFF8E9396000007C8BF80057C0083CB3
+S315200049C09801000840840020394100087D2A5A14A5
+S315200049D07C1D58AE396B00017C8BF80098090001CC
+S315200049E04184FFEC386000003881000838BF0001A0
+S315200049F04BFFF8FD386000014BFFF9853D2000276D
+S31520004A0080697FC44801FDD5386000008001021C02
+S31520004A107C0803A683A1020C83C1021083E1021441
+S31520004A20382102184E8000209421FDE07C0802A641
+S31520004A30934102089361020C9381021093A1021400
+S31520004A4093C1021893E1021C900102247C7A1B7800
+S31520004A503D20002780697FC4549F063E3880FFFF93
+S31520004A607CBD2B784801FED12C8300003B80FFFFC4
+S31520004A70418600384800FC257C691B783C6000276D
+S31520004A80386324088089000038A0000038C0000060
+S31520004A9038E000003900000039200000480122D902
+S31520004AA03860FFFF480000A43BC0000057E0083CE8
+S31520004AB0601B0001386000014BFFF78D3860000055
+S31520004AC038803C004BFFF7D59B610008386000001A
+S31520004AD03881000838BD00014BFFF8153860000109
+S31520004AE04BFFF89D7C7F1B79408200287F43D3783B
+S31520004AF07FA4EB784BFFFA057C63EA787C69FE702D
+S31520004B007D201A787C0048507C00FE707F9C0038FF
+S31520004B103BDE00012C9E0001213FFFFE2009000004
+S31520004B207D2049144CE623827C000026540047FE53
+S31520004B307D2B00394082FF803D20002780697FC47D
+S31520004B404801FC997F83E378800102247C0803A630
+S31520004B50834102088361020C8381021083A102141F
+S31520004B6083C1021883E1021C382102204E800020D6
+S31520004B709421FFE87C0802A693A1000C93C10010A3
+S31520004B8093E100149001001C4BFFF43D7C7E1B78C2
+S31520004B903C6000273863242448017A253C6000279E
+S31520004BA03863243048017A193C600027A09E000013
+S31520004BB03863243C48017A093C600027386324483E
+S31520004BC0480179FDA01E00023BE000007C9F00000A
+S31520004BD0408400283FA00027813E00047C89F8AE4F
+S31520004BE0387D2454480179D9A01E00023BFF0001DC
+S31520004BF07C9F00004184FFE43C6000273863245CEE
+S31520004C00480179BD3C6000273863246C480179B19E
+S31520004C103C600027A09E00083863243C480179A107
+S31520004C203C6000273863244848017995A01E000A75
+S31520004C303BE000007C9F0000408400283FA0002726
+S31520004C40813E000C7C89F8AE387D24544801797168
+S31520004C50A01E000A3BFF00017C9F00004184FFE468
+S31520004C603C6000273863247C480179553C60002746
+S31520004C703863246C480179493C600027A09E0010C7
+S31520004C803863243C480179393C600027386324483E
+S31520004C904801792DA01E00123BE000007C9F0000F9
+S31520004CA0408400283FA00027813E00147C89F8AE6E
+S31520004CB0387D245448017909A01E00123BFF0001CB
+S31520004CC07C9F00004184FFE43C6000273863248CED
+S31520004CD0480178ED8001001C7C0803A683A1000C06
+S31520004CE083C1001083E10014382100184E80002073
+S31520004CF09421FFE87C0802A693A1000C93C1001022
+S31520004D0093E100149001001C480175ED7C7D1B7811
+S31520004D103C60002738632490480178A53C60002732
+S31520004D203863246C480178993C600027889D086088
+S31520004D30386324A0480178893C600027889D086450
+S31520004D40386324AC480178793C600027889D086840
+S31520004D50386324B8480178693C600027889D086C30
+S31520004D60386324C4480178593C600027889D087020
+S31520004D70386324D0480178493C600027889D087410
+S31520004D80386324DC480178393C600027A09D3C80AC
+S31520004D90386324E8480178293C600027A09D3C829E
+S31520004DA0386324F8480178193C600027889D3C84A4
+S31520004DB038632508480178093C600027889D3C8592
+S31520004DC038632518480177F93C600027A09D3C866A
+S31520004DD038632528480177E93C600027809D3C8878
+S31520004DE038632538480177D93C600027A09D3C9040
+S31520004DF03863254C480177C93C600027809D3C9844
+S31520004E003863255C480177B93C600027A09D3CA00B
+S31520004E1038632570480177A98001001C7C0803A609
+S31520004E2083A1000C83C1001083E1001438210018EF
+S31520004E304E8000203C6000014E80002038600040FB
+S31520004E404E800020386000204E8000209421FFE80C
+S31520004E507C0802A693A1000C93C1001093E10014D4
+S31520004E609001001C480000ED3D602000616B055557
+S31520004E70380000AA980B00003D202000612902AAD4
+S31520004E80380000559809000038000090980B000063
+S31520004E903D2020008BA90000480000B96BA300FF2D
+S31520004EA03063FFFF7C6319107FBD18787C63EB7835
+S31520004EB08001001C7C0803A683A1000C83C100107E
+S31520004EC083E10014382100184E8000209421FFE849
+S31520004ED07C0802A693A1000C93C1001093E1001454
+S31520004EE09001001C4800006D3D602000616B055557
+S31520004EF0380000AA980B00003D202000612902AA54
+S31520004F00380000559809000038000090980B0000E2
+S31520004F103D202000612900018BA9000048000035B2
+S31520004F206BA300FF3063FFFF7C6319107FBD1878E9
+S31520004F307C63EB788001001C7C0803A683A1000C0F
+S31520004F4083C1001083E10014382100184E80002010
+S31520004F503D202000380000F098090000386000004D
+S31520004F604E8000209421FFF07C0802A693C1000801
+S31520004F7093E1000C900100143D2020006129055585
+S31520004F80390000AA990900003D402000614A02AA82
+S31520004F9039600055996A00003800008098090000A1
+S31520004FA099090000996A000038000010980900004D
+S31520004FB03C60002738632580480176053D20200087
+S31520004FC08809000070090080408200283FC0002721
+S31520004FD03FE020003860000A48023085387E25945C
+S31520004FE0480175DD881F0000700900804182FFE8B6
+S31520004FF03C60002738632598480175C53860000055
+S31520005000800100147C0803A683C1000883E1000CFC
+S31520005010382100104E8000209421FFF07C0802A643
+S3152000502093E1000C900100147C7F1B783D2020002A
+S3152000503061290555390000AA990900003D40200044
+S31520005040614A02AA39600055996A0000380000803A
+S315200050509809000099090000996A00004800031584
+S315200050607C7F19D6380000303C632000980300006E
+S31520005070480003017C7F19D63C632000880300008A
+S31520005080700900804182FFEC386000008001001426
+S315200050907C0803A683E1000C382100104E800020F6
+S315200050A03D602000616B0555380000AA980B000072
+S315200050B03D202000612902AA3800005598090000E9
+S315200050C0380000A0980B00005484063E7C8023788C
+S315200050D09803000088030000548406304800000826
+S315200050E088030000540006307C8020004086FFF4B0
+S315200050F0386000004E8000209421FFE07C0802A644
+S31520005100934100089361000C9381001093A1001431
+S3152000511093C1001893E1001C900100247C7F1B782A
+S315200051207C9A23787CBE2B78480002497C7C1B78AD
+S31520005130480002157C7D1B78480002397F9CE9D601
+S315200051403B9CFFFF7FFCE0387F9C1B964800022596
+S315200051507C7D1B78480001F17C7B1B78480002157A
+S315200051607FBDD9D63BBDFFFF7FFDE8387FBDF2145A
+S315200051703BBDFFFF7FBD1B967C9CE8404185001808
+S315200051807F83E3783B9C00014BFFFE917C9CE840AB
+S315200051904085FFF03BA000007C9DF000408400206D
+S315200051A07FE3FB787C9AE8AE3BBD00014BFFFEF522
+S315200051B07C9DF0003BFF00014184FFE83860000041
+S315200051C0800100247C0803A6834100088361000C2B
+S315200051D08381001083A1001483C1001883E1001C81
+S315200051E0382100204E8000209421FFE87C0802A66A
+S315200051F09381000893A1000C93C1001093E1001441
+S315200052009001001C7CBD2B783BE000007C9FE800D1
+S315200052107C7E1B787C9C2378408400207FC3F37897
+S315200052207C9CF8AE3BFF00014BFFFE797C9FE8009B
+S315200052303BDE00014184FFE8386000008001001C4D
+S315200052407C0803A68381000883A1000C83C100107B
+S3152000525083E10014382100184E8000209421FFE8B5
+S315200052607C0802A693A1000C93C1001093E10014C0
+S315200052709001001C3BA000003D2000273BC97E4436
+S315200052803D2000273BE97E54801F00007C0803A6B2
+S315200052904E800021801E00007C8300004086001C7A
+S315200052A0801F00047C0803A64E800021801E000477
+S315200052B07C830000418600183BBD00012C9D000127
+S315200052C03BDE00083BFF00244085FFC0386000001D
+S315200052D08001001C7C0803A683A1000C83C100105A
+S315200052E083E10014382100184E8000209421FFF815
+S315200052F07C0802A69001000C3D20002780097E7CB8
+S315200053007C0803A64E8000218001000C7C0803A6A1
+S31520005310382100084E8000209421FFF87C0802A640
+S315200053209001000C3D20002780097E787C0803A68A
+S315200053304E8000218001000C7C0803A6382100083D
+S315200053404E8000209421FFF87C0802A69001000CD4
+S315200053503D20002780097E807C0803A64E80002100
+S315200053608001000C7C0803A6382100084E8000200E
+S315200053709421FFF87C0802A69001000C3D2000270E
+S3152000538080097E847C0803A64E8000218001000CC3
+S315200053907C0803A6382100084E8000209421FFF8BF
+S315200053A07C0802A69001000C3D20002780097E90F3
+S315200053B07C0803A64E8000218001000C7C0803A6F1
+S315200053C0382100084E8000209421FFF87C0802A690
+S315200053D09001000C3D20002780097E887C0803A6CA
+S315200053E04E8000218001000C7C0803A6382100088D
+S315200053F04E8000209421FFF87C0802A69001000C24
+S315200054003D20002780097E8C7C0803A64E80002143
+S315200054108001000C7C0803A6382100084E8000205D
+S315200054209421FFF87C0802A69001000C3D2000275D
+S3152000543080097E947C0803A64E8000218001000C02
+S315200054407C0803A6382100084E8000209421FFF80E
+S315200054507C0802A69001000C3D20002780097E983A
+S315200054607C0803A64E8000218001000C7C0803A640
+S31520005470382100084E8000209421FEF87C0802A6E0
+S31520005480922100CC924100D0926100D4928100D822
+S3152000549092A100DC92C100E092E100E4930100E8D1
+S315200054A0932100EC934100F0936100F4938100F87E
+S315200054B093A100FC93C1010093E101049001010C2A
+S315200054C07C7F1B783C800027388425AC4800D3B9E4
+S315200054D07C761B794082001C3C600027386325B00F
+S315200054E07FE4FB78480170D93860FFFF48000354F9
+S315200054F03D20002880160000812981B47C80480048
+S3152000550041860034801600002C800000418600145D
+S3152000551080160000812900247C80480041860018DE
+S315200055204800F1793C00003D600000019003000036
+S315200055304800000CAA360012480000083A20FFFF57
+S315200055402C91FFFF408600183C600027386325D841
+S315200055507FE4FB78480170694800001C4BFFFE4140
+S315200055602C830000418600203C6000273863261CDF
+S315200055704801704D7EC3B3784800D0753860FFFF70
+S31520005580480002C03C600027386326483B200000C4
+S315200055903B00FFFF3AE000013A4100583AA00000E4
+S315200055A03A6100603A8100703B4100084801701161
+S315200055B07E238B783881000838A000504801856109
+S315200055C02C83FFFF418602383C6000273863265C27
+S315200055D03881000838A000024800E1B12C83000081
+S315200055E04086FFD07E4393783881000A38A0000297
+S315200055F04800E1E99AA1005A7E439378388000005A
+S3152000560038A000104800DDE97C7B1B787E639B7800
+S315200056103881000C38A000084800E1C19AA1006832
+S315200056207E639B783880000038A000103BA00000E5
+S315200056304800DDBD381BFFFB7C9D00407C7E1B782F
+S31520005640408400487C1C03783BE0000C7E83A378D2
+S315200056507C9AFA1438A000024800E1819AA10072CF
+S315200056607E83A3783880000038A000104800DD81B2
+S315200056707D3AEA143BBD00017C9DE04098690078A4
+S315200056803BFF00024184FFC83BA100787FA3EB7853
+S315200056905764083C7C84D2143884000238A0000267
+S315200056A04800E1399AA1007A7FA3EB783880000080
+S315200056B038A000104800DD3957C0063E7D7B021415
+S315200056C057C0C63E7D6B021457C0863E7D6B0214C2
+S315200056D03BA00000395BFFFB7C9D504057C0463EF7
+S315200056E07D6B02147C651B784084001C7D3AEA148D
+S315200056F03BBD00017C9D5040880900787D6B0214DB
+S315200057004184FFEC7D6058F8540B063E7C8B2800C4
+S31520005710418600143C600027386326607FC4F378F6
+S3152000572048016E9D4BFFFC4D3C1EE0007FE01B9622
+S315200057304BFFFC413C00DFFF6000FFFB7C98F8003C
+S315200057407C1B02147C1E02147FA01B96418600102F
+S315200057507FE3FB787C781B784BFFFC9D7C98E800E8
+S31520005760418600107FA3EB787C781B784BFFFC8961
+S315200057707FC3F378388100803BFBFFFB7FE5FB7816
+S315200057804BFFFCCD2C830000418600143C60002793
+S31520005790386326B87FC4F37848016E253BA0000005
+S315200057A07C9DF840408400307FE5FB787D3AEA1402
+S315200057B07C1EE8AE3BBD0001892900787C9D2840EF
+S315200057C07C004A783000FFFF7C0001107EF700380D
+S315200057D04184FFDC2C9903E73B3900014086FDD448
+S315200057E03C6000273863259448016DD53860000158
+S315200057F03B200000480228694BFFFDB84BFFFBA168
+S315200058002C830000418600103C6000273863261C4C
+S3152000581048016DAD3C600027386326F848016DA12C
+S315200058202C970000408600103C6000273863271024
+S3152000583048016D8D7EC3B3784800CDB53860000031
+S315200058408001010C7C0803A6822100CC824100D075
+S31520005850826100D4828100D882A100DC82C100E06E
+S3152000586082E100E4830100E8832100EC834100F01B
+S31520005870836100F4838100F883A100FC83C10100C9
+S3152000588083E10104382101084E8000209421FFD0B5
+S315200058907C0802A69381002093A1002493C10028AE
+S315200058A093E1002C900100347C7F1B783C800027FC
+S315200058B0388427444800CFD17C7C1B79408200184D
+S315200058C03C600027386327487FE4FB7848016CF169
+S315200058D0480001984BFFFAC92C830000418600142A
+S315200058E03C6000273863277048016CD54800017456
+S315200058F0386100083880000138A000087F86E378E8
+S315200059004800D03538000000980100103861001892
+S315200059103880000138A000047F86E3784800D0193B
+S315200059203861001C3880000138A000047F86E378A7
+S315200059304800D0053C6000273863279C3881000842
+S3152000594080A1001880C1001C3BA0000148016C7199
+S315200059504BFFFA214801BB3D7C7E1B783880000135
+S3152000596038A000107F86E3784800CFCD7FC3F37838
+S31520005970388000013CA000017F86E3784800CFB93B
+S315200059807C7F1B7941820084806100187FC4F37874
+S315200059907FE5FB784BFFFA8D2C83000041860014AF
+S315200059A0808100183C600027386327E048016C118D
+S315200059B0396000007C8BF8004084002C814100185F
+S315200059C07C0A58AE7D3E58AE396B00017C8BF800C0
+S315200059D07C004A783000FFFF7C0001107FBD003834
+S315200059E04184FFE0800100183C600027386325943D
+S315200059F07C00FA149001001848016BC5386000013C
+S31520005A004802265D4BFFFF683C600027386326F876
+S31520005A1048016BAD2C9D0000408600103C6000279D
+S31520005A203863281848016B994BFFF9752C830000C1
+S31520005A304086001C7FC3F3784801BA857F83E378CC
+S31520005A404800CBAD38600000480000243C600027A9
+S31520005A503863277048016B697FC3F3784801BA61C0
+S31520005A607F83E3784800CB893860FFFF80010034CC
+S31520005A707C0803A68381002083A1002483C10028FB
+S31520005A8083E1002C382100304E8000207C0006ACBB
+S31520005A907C0004ACA06300005463063E4E800020C8
+S31520005AA07C0006AC7C0004AC5484063EB083000027
+S31520005AB04E800020396000007C8B28004C8400201A
+S31520005AC0A00300007C0006AC7C0004AC396B00010E
+S31520005AD07C8B28005409402E5400C23E7D29037831
+S31520005AE0B1240000388400024184FFD84E80002073
+S31520005AF0396000007C8B28004C840020A004000024
+S31520005B00388400027C0006AC7C0004AC396B0001B2
+S31520005B107C8B28005409402E5400C23E7D290378F0
+S31520005B20B12300004184FFD84E8000203920000098
+S31520005B307C8928004C8400207C0006AC7C0004ACC8
+S31520005B4039290001A00300007C892800B004000048
+S31520005B50388400024184FFE44E8000209421FFC057
+S31520005B607C0802A67D8000269261000C928100109E
+S31520005B7092A1001492C1001892E1001C930100200A
+S31520005B8093210024934100289361002C93810030B7
+S31520005B9093A1003493C1003893E1003C9001004466
+S31520005BA0918100087C7B1B787C9523787CD8337880
+S31520005BB07CF93B787D1D43782C9B00012F15000234
+S31520005BC07D3A4B783D6000287C000026540937FE3C
+S31520005BD05400D7FE7D2A03791C1B04C8396BBC48A8
+S31520005BE07F805A144182000C3860FFFF48000598D8
+S31520005BF03D20002780097E9C2C8000004086002CBA
+S31520005C007D7F5B783BDF04C848024771907F04683C
+S31520005C103BFF04C87C9FF0004085FFF03D20002715
+S31520005C203800000190097E9C801C047C2C8000009A
+S31520005C30408605502C9D0000408600103800000547
+S31520005C40901C04704800000893BC04702C9A000035
+S31520005C504086001038000005901C04744800000897
+S31520005C60935C04743BFC044C7FE3FB783880000D86
+S31520005C704801F9313C00808060000010901C04949B
+S31520005C803C0080C060000002901C0498901C049C7C
+S31520005C903C0080C060000004901C04A03C0080C032
+S31520005CA060000006901C04A43C0080C06000000830
+S31520005CB0901C04A83C0080C06000000A901C04AC24
+S31520005CC03C0080C06000000C901C04B03C0080C0EA
+S31520005CD06000000E901C04B4901C04B83C0080C0E8
+S31520005CE06000001C901C04BC901C04C03C0080C0BA
+S31520005CF06000001E901C04C4931C0484380000011C
+S31520005D00901C046C7FE3FB783880FFFF4801EC2968
+S31520005D107F63DB7848000E792C8300004186001CC7
+S31520005D207FE3FB7848000008387C044C4801EAAD44
+S31520005D303860FFFF480004503BA000007C9DA8006F
+S31520005D40408404303B4000005736073E56D3103A75
+S31520005D507ED4B3787F9FE378573805AE1EFB0028A4
+S31520005D602D1803003D2000271D7D001439297F684A
+S31520005D707D6B4A147C17582E2C8000007FD75A142E
+S31520005D80418603F0801C04782C800001418600188F
+S31520005D90801C04782C8000014186002C2C9D00005C
+S31520005DA0408600247F63DB787FA4EB7838A00090C0
+S31520005DB038C0000038E0000048000F392C8300006E
+S31520005DC04086FF682C980100408600307F63DB7890
+S31520005DD07FA4EB7838A0009138C0000038E000009E
+S31520005DE048000F117F63DB787FA4EB787FE5FB7893
+S31520005DF0480011294800008C2C9802004186005842
+S31520005E00408A00807F63DB787FA4EB787FE5FB7890
+S31520005E1048001109A81F006C2C800000418600480C
+S31520005E20A81F006E2C8000004186003CA81F007031
+S31520005E302C80000041860030A81F006C3000FFFF38
+S31520005E40901E0000A81F006E901E0004A81F007060
+S31520005E504800002C7F63DB787FA4EB787FE5FB7816
+S31520005E60480010B9A81F00023000FFFF901E000056
+S31520005E70A81F0006901E0004A81F000C901E0008F4
+S31520005E807F63DB787FA4EB7838A0009138C00000D0
+S31520005E9038E0000048000E5D7F63DB787FA4EB7856
+S31520005EA038A0001038C0000038E0000048000E4539
+S31520005EB0A01F005E5400063EB01F0208A01F020865
+S31520005EC07C0000D054000FFEB01F0200A01F00620D
+S31520005ED05400AFFEB01F0202A01F00625400BFFE96
+S31520005EE0B01F0206A01F00625400C7FEB01F0204A6
+S31520005EF0A81F00665400C7BEB01F020AA81F020AC8
+S31520005F002C80000240850008B35F020AA81F020207
+S31520005F102C80000041860038A01F006A700900020C
+S31520005F204182002CA01F0080700900014182000CD4
+S31520005F3038000003B01F020AA01F0080700900026B
+S31520005F404182000C38000004B01F020AA81F020478
+S31520005F502C800000418600B0A01F006A7009000254
+S31520005F60418200A4A81F00685400C7BEB01F020CBF
+S31520005F70A81F020C2C80000140850008B35F020C8C
+S31520005F80B35F020EA01F007C70090004418200103E
+S31520005F9038000002B01F020C4800002CA01F007C15
+S31520005FA0700900024182001038000001B01F020C67
+S31520005FB048000014A01F007C7009000141820008DF
+S31520005FC0B35F020CA01F007E7009000441820010FE
+S31520005FD038000002B01F020E4800002CA01F007ED1
+S31520005FE0700900024182001038000001B01F020E25
+S31520005FF048000014A01F007E70090001418200089D
+S31520006000B35F020E57200632B01F0212572006B683
+S31520006010B01F02142896000D5720052AB01F02161D
+S31520006020B35F0210418500E83D20002039295F48F2
+S315200060307C13482E3D20002039295F487C004A14D5
+S315200060407C0903A64E80042000000038000000389A
+S315200060500000004C0000004C0000004C00000088AE
+S31520006060000000C4000000C4000000380000003812
+S315200060700000003800000038000000380000004012
+S31520006080B29F021048000088A01F020A30000008B4
+S3152000609048000078A81F02042C800000418600706A
+S315200060A0A81F02162C80040040860010A01F021094
+S315200060B060000010B01F0210A81F02162C800800D6
+S315200060C04086004CA01F0210600000204800003CC3
+S315200060D0A81F02042C80000041860034A81F021647
+S315200060E02C80040040860010A01F020C30000010F7
+S315200060F0B01F0210A81F02162C8008004086001030
+S31520006100A01F020E30000020B01F02107F63DB7834
+S315200061107FA4EB7838A000EFA8FF021038C0000358
+S3152000612048000BD1A81F02142C8000204086003482
+S31520006130A81F02002C800000418600207F63DB78A8
+S315200061407FA4EB7838A000C6A8DF020838E000005C
+S3152000615048000BA14800000C38000010B01F0214A4
+S315200061603BBD00017C9DA8003BFF02184184FBF843
+S3152000617038000001901C047C387C044C4801E65D04
+S315200061803860000080010044818100087C0803A655
+S315200061908261000C8281001082A1001482C1001845
+S315200061A082E1001C830100208321002483410028F2
+S315200061B08361002C8381003083A1003483C10038A1
+S315200061C083E1003C7D820120382100404E80002062
+S315200061D09421FFD07C0802A692E1000C93010010C6
+S315200061E093210014934100189361001C9381002091
+S315200061F093A1002493C1002893E1002C9001003440
+S315200062007C7A1B787C9823787CBD2B787CD7337856
+S315200062103D2000283929BC481C1A04C81D580014E2
+S315200062201F7A00282C9A00012F1800017D004A149D
+S315200062303D2000277C000026540B37FE5400D7FE55
+S315200062407D79037939297F687F8A4A147FDBE214B6
+S31520006250408200303D20002780097E9C2C80000053
+S31520006260418600208008047C2C8000004186001492
+S31520006270386000404801B21D7C7F1B794082000CAB
+S31520006280386000004800015C7D3BE02E801E000443
+S315200062907D2901D6801E00087D2901D67FABFE70A0
+S315200062A07D60EA787C0058507C00FE707FAB003819
+S315200062B07D3748507D2500787D7D2B787C9D480054
+S315200062C03F8000274CE623827C000026540047FEB0
+S315200062D07C0000D07FAB00387D2500787D7D2B7833
+S315200062E093BF0018801E000C3BA00001901F001CCD
+S315200062F0801E00083D200020901F0020801E0004E4
+S31520006300392964B0901F002493BF001493BF00283E
+S3152000631038000002901F002C93BF0030913F0000F0
+S315200063203D200020392964D4913F00043D200020DF
+S31520006330392965C8913F00083D200020392964F895
+S31520006340913F000C3D2000203929657C913F0010AB
+S31520006350933F000C801C7EA8933F00102C800000E9
+S31520006360935F0034931F003892FF003C418600481B
+S315200063703F800028801E000C813C9A305400402E1D
+S315200063807C804800408500583FA00028807D9A40A8
+S315200063904801B12D807E000C5463402E4801B0F593
+S315200063A0801E000C907D9A405400402E901C9A30FE
+S315200063B04800002C807E000C5463402E4801B0D546
+S315200063C03D20002890699A4093BC7EA8801E000C30
+S315200063D03D2000285400402E90099A307FE3FB7818
+S315200063E0800100347C0803A682E1000C83010010A2
+S315200063F083210014834100188361001C83810020BF
+S3152000640083A1002483C1002883E1002C3821003099
+S315200064104E8000209421FFB87C0802A69001004CF3
+S315200064207C6C1B787CA82B783D2000283929BC4819
+S31520006430386100081C0C04C81CCC00282C8C0001D8
+S315200064402F0400017CA04A143D2000271C040014C0
+S315200064507D600026556A37FE556BD7FE7D4A5B79EF
+S3152000646039297F687CE04A147D663A144082005CB4
+S315200064703D20002780097E9C2C8000004186004C10
+S315200064808005047C2C8000004186004080080000A6
+S315200064907D26382E7C8048404084003080080004C9
+S315200064A0812B00047C80484040840020800800081E
+S315200064B0812B00087C804840418500108008000818
+S315200064C02C8000004086000C3860FFFF480000D476
+S315200064D07C06382E812B00047C0049D6812B0008AF
+S315200064E07C0049D690030018800B000C9003001CFA
+S315200064F0800B000890030020800B00043920000147
+S3152000650090030024914300149123002838000002B0
+S315200065109003002C912300303D200020392964B0BF
+S31520006520912100083D200020392964D491230004BC
+S315200065303D200020392965C8912300083D200020F0
+S31520006540392964F89123000C3D2000203929657CE7
+S31520006550912300109181003C90810040914100449C
+S31520006560812B0008800B0004808800007D2901D63D
+S3152000657080080004816B00087C8449D67C0059D6AB
+S315200065808128000880A8001080C8000C80E800142C
+S315200065907C8402147C844A143884FFFF480001A1BD
+S315200065A08001004C7C0803A6382100484E8000203C
+S315200065B09421FFF87C0802A69001000C38E0000028
+S315200065C04800017D8001000C7C0803A638210008C4
+S315200065D04E8000209421FFF87C0802A69001000C32
+S315200065E038E00001480001598001000C7C0803A610
+S315200065F0382100084E8000209421FFE87C0802A65E
+S3152000660093A1000C93C1001093E100149001001C8B
+S315200066107C7F1B78801F00343D2000281C0004C886
+S315200066203929BC487FA04A14801D047C2C80000098
+S315200066304186002C3BBD044C7FA3EB783880FFFFBE
+S315200066404801E2F5807F0034480005457FA3EB78BA
+S315200066504801E18938600000480000083860FFFFE3
+S315200066608001001C7C0803A683A1000C83C10010B6
+S3152000667083E10014382100184E8000208003003466
+S315200066803D2000281C0004C83929BC487D204A1416
+S315200066908009047C2C8000004086000C3860FFFFB7
+S315200066A04E800020800904802C8000004186001442
+S315200066B03800000190030030380000009009048063
+S315200066C0386000004E8000209421FFF07C0802A64E
+S315200066D093C1000893E1000C90010014800300345C
+S315200066E03D2000281C0004C83929BC487FE04A14F4
+S315200066F0801F047C2C8000007C9E23784186002409
+S31520006700387F044C3880FFFF4801E22D3C60000CA6
+S31520006710606300024800DFF9387F044C4801E0BD81
+S315200067203860FFFF800100147C0803A683C100089F
+S3152000673083E1000C382100104E8000209421FFA810
+S315200067407C0802A691C1001091E100149201001864
+S315200067509221001C924100209261002492810028FF
+S3152000676092A1002C92C1003092E1003493010038AE
+S315200067709321003C9341004093610044938100485B
+S3152000678093A1004C93C1005093E100549001005C0A
+S315200067907C7C1B787C9B23787CB22B787CD53378C9
+S315200067A07CF13B7839C0FFFF3D600028396BBC483F
+S315200067B07F93E378801C0034813C00381C0004C899
+S315200067C01D2902187E005A147D304A149121000C8E
+S315200067D03D20002781730034801300388150047CCB
+S315200067E039297F682C8A00001C0000141D6B0028A4
+S315200067F07C004A147EEB02144186001483D30018D1
+S315200068007C1B92147C80F0004085000C3860FFFFD2
+S31520006810480001D83870044C3880FFFF8013003CB4
+S315200068203AC000007F7B02144801E10D7C9690005F
+S31520006830408401943E8000273DE000278181000CA2
+S31520006840A80C02062C80000041860014577A473E89
+S315200068505779C43E577D063E4800004880170008F9
+S31520006860813700047C0049D67F3B03D68137000858
+S31520006870801700047D2901D67C1B4BD68177000822
+S315200068807C0049D6813700087FA0D8507C1D4BD686
+S315200068907C0049D67F5D5BD67C00E85033A00001A2
+S315200068A07FD690502C9E01013B0000003BE000006B
+S315200068B07C00002654002FFE7C0000D07C0900F8C6
+S315200068C0552905EE7FC000387C1E4B787F25CB7876
+S315200068D07F46D3787FA7EB787EA8AB787FC9F378FD
+S315200068E0807C0034809C00387E2A8B784800082DD6
+S315200068F02C830000408600307F25CB787F46D378D6
+S315200069007FA7EB787EA8AB787FC9F378807C0034AC
+S31520006910809C00387E2A8B78480007212C83000033
+S315200069204186008880147FC83BFF00017C9F0000C1
+S315200069304085FF9C38A0001038C0000038E00000D9
+S31520006940800F7EA0807C0034809C003830000001BF
+S31520006950900F7EA04800039D80147FC83B1800013D
+S315200069607C980000418500643BE0000038A0007060
+S315200069707F26CB78807C0034809C00387F47D37874
+S31520006980480003712C8300004186001880147FC8BC
+S315200069903BFF00017C9F0000418500304BFFFFD06C
+S315200069A03BE000004BFFFF287ED6F2148013001C2C
+S315200069B07C9690007C00F1D67F7BF2147EB5021483
+S315200069C04184FE7C39C000002C8EFFFF40860010DB
+S315200069D03C60000C606300034800DD353870044CD1
+S315200069E04801DDF97DC373788001005C7C0803A62D
+S315200069F081C1001081E10014820100188221001C4F
+S31520006A0082410020826100248281002882A1002CFC
+S31520006A1082C1003082E10034830100388321003CAA
+S31520006A2083410040836100448381004883A1004C58
+S31520006A3083C1005083E10054382100584E80002045
+S31520006A403D2000283929BC481C6304C838000000B2
+S31520006A507C634A149003046C4E8000209421FFE846
+S31520006A607C0802A693A1000C93C1001093E10014A8
+S31520006A709001001C7C7E1B783D2000282C84001071
+S31520006A801C1E04C83929BC487FE04A14418600D41C
+S31520006A90418500102C840008418600B4480000D4AB
+S31520006AA02C840040418600102C8400804186008C76
+S31520006AB0480000C083BF046848001CD53CA00020C5
+S31520006AC038A56940801F04747FC6F3787C8301D67D
+S31520006AD07FA3EB7848023D85807F04BC4BFFEFB156
+S31520006AE07060008041820010801F046C2C800000A2
+S31520006AF04086FFE8807F04BC4BFFEF957060004026
+S31520006B0040820010801F046C2C8000004086FFE825
+S31520006B10807F046848023F25801F046C2C8000007B
+S31520006B204086005038000001901F046C7FC3F37824
+S31520006B304800005D4800003C807F04BC4BFFEF51BD
+S31520006B40706000804082FFF448000028807F04BCEB
+S31520006B504BFFEF3D706000084182FFF448000014AF
+S31520006B60807F04BC4BFFEF29706000104182FFF448
+S31520006B708001001C7C0803A683A1000C83C10010A1
+S31520006B8083E10014382100184E8000209421FFE86C
+S31520006B907C0802A693A1000C93C1001093E1001477
+S31520006BA09001001C7C7E1B783D2000281C1E04C8FA
+S31520006BB03929BC487FE04A14807F04C03880000E03
+S31520006BC04BFFEEE139600000616BC34F3920006353
+S31520006BD038000000300000017C8058004085FFF816
+S31520006BE03529FFFF4080FFEC807F04C03880000AF3
+S31520006BF04BFFEEB139600000616BC34F3920006353
+S31520006C0038000000300000017C8058004085FFF8E5
+S31520006C103529FFFF4080FFEC38000001901F046CEF
+S31520006C2083BF046848001B693CA0002038A5694042
+S31520006C30801F04747FC6F3787C8301D67FA3EB780C
+S31520006C4048023C19807F04BC4BFFEE4570600080F3
+S31520006C5041820010801F046C2C8000004086FFE8D3
+S31520006C60807F04C0388000084BFFEE393960000071
+S31520006C70616BC34F392000633800000030000001EB
+S31520006C807C8058004085FFF83529FFFF4080FFECC7
+S31520006C90807F04BC4BFFEDF97060004040820010FD
+S31520006CA0801F046C2C8000004086FFE8807F0468EB
+S31520006CB048023D89801F046C2C8000004186000C10
+S31520006CC0386000004800001038000001901F046C56
+S31520006CD03860FFFF8001001C7C0803A683A1000CFE
+S31520006CE083C1001083E10014382100184E80002053
+S31520006CF09421FFC87C0802A692A1000C92C1001024
+S31520006D0092E10014930100189321001C9341002066
+S31520006D10936100249381002893A1002C93C1003015
+S31520006D2093E100349001003C7C7A1B787CBE2B7862
+S31520006D307CDB33787CF73B783B0000013B2000006E
+S31520006D403AA00000548920363800FFA07D3D037804
+S31520006D5056E0073E7FB603783D2000283929BC48F7
+S31520006D601C1A04C81C8400147FE04A143D20002706
+S31520006D7039297F681C1A00287C844A147F802214B3
+S31520006D807F43D378388000404BFFFCD52C9E009063
+S31520006D90418600C4418500182C9E0010418600B80B
+S31520006DA02C9E00704186006C480000B82C9E00C6C0
+S31520006DB041860098418500102C9E00914186001442
+S31520006DC0480000A02C9E00EF4186006C48000094ED
+S31520006DD0807F04A8809C00004BFFECC9807F04AC18
+S31520006DE0809C00005484C23E4BFFECB9807F04A0F7
+S31520006DF0809C00084BFFECAD807F04B0809C000493
+S31520006E003884FFFF5484073E7FA42378480000502F
+S31520006E10807F04A87F64DB784BFFEC89807F04ACFD
+S31520006E205764C23E4BFFEC7D807F04B07EC4B378AE
+S31520006E304800002C807F04A07EE4BB784BFFEC65E5
+S31520006E40807F049C48000008807F04A07F64DB7854
+S31520006E504BFFEC51807F04B07FA4EB784BFFEC45D1
+S31520006E60807F04B47FC4F3784BFFEC397F43D3781B
+S31520006E70388000804BFFFBE9807F04B84BFFEC1184
+S31520006E805463063E907F048C801F048C7009000199
+S31520006E904082000C2C95FFFF408600203D200027D5
+S31520006EA080097FC83B3900017C990000408500108D
+S31520006EB03860FFFF480000283B0000002C980000A7
+S31520006EC04086FEC02C9E0070408600107F43D378FB
+S31520006ED0388000104BFFFB89386000008001003CA1
+S31520006EE07C0803A682A1000C82C1001082E1001456
+S31520006EF0830100188321001C834100208361002424
+S31520006F008381002883A1002C83C1003083E10034D3
+S31520006F10382100384E8000209421FFD87C0802A614
+S31520006F209321000C93410010936100149381001863
+S31520006F3093A1001C93C1002093E100249001002C12
+S31520006F407C7D1B787CBA2B783B8000013BC00000FF
+S31520006F503B200000548420363800FFA07C9B037819
+S31520006F603D2000281C1D04C83929BC487FE04A144E
+S31520006F707FA3EB78388000404BFFFAE5807F04B092
+S31520006F807F64DB784BFFEB1D807F04B4388000ECF8
+S31520006F904BFFEB117FA3EB78388000804BFFFAC1C3
+S31520006FA0807F04B84BFFEAE95463063E907F048C49
+S31520006FB0801F048C700900014082000C2C99FFFF71
+S31520006FC0408600203D20002780097FC83BDE000147
+S31520006FD07C9E0000408500103860FFFF480000308E
+S31520006FE03B8000002C9C00004086FF887FA3EB7826
+S31520006FF0388000084BFFFA69807F04947F44D37859
+S3152000700038A001004BFFEB29386000008001002CDE
+S315200070107C0803A68321000C8341001083610014A1
+S315200070208381001883A1001C83C1002083E10024F2
+S31520007030382100284E8000209421FFE87C0802A6F3
+S315200070409381000893A1000C93C1001093E10014D2
+S315200070509001001C7C6C1B787D1C43787D3F4B780F
+S31520007060386000003D20002739297F682C8A0001DE
+S315200070701C0400141D6C00287C004A147FCB0214CB
+S31520007080408600787D8363783FA00028811D9A4042
+S315200070907FE9FB7839400000480000817C631B793A
+S315200070A040820058801E000C7C1F01D67C83000085
+S315200070B03960000040840044811D9A403D400027ED
+S315200070C07C0858AE7D3C58AE7C804800418600182E
+S315200070D0800A7EAC3860FFFF30000001900A7EAC4B
+S315200070E048000018801E000C7C1F01D6396B000159
+S315200070F07C8B00004184FFCC8001001C7C0803A609
+S315200071008381000883A1000C83C1001083E1001451
+S31520007110382100184E8000209421FFB07C0802A65A
+S315200071207D80002691E1000C92010010922100142E
+S31520007130924100189261001C9281002092A10024A5
+S3152000714092C1002892E1002C930100309321003453
+S31520007150934100389361003C9381004093A1004401
+S3152000716093C1004893E1004C90010054918100089E
+S315200071707C7A1B787C9723787CB42B787CD33378E5
+S315200071807CF13B787D1043787D324B787D4F537868
+S315200071903AC000003B6000017E5E93783AA0000072
+S315200071A03D2000283929BC481C1A04C81D7702181E
+S315200071B07FE04A147F3F5A143D20002739297F68F3
+S315200071C01C1700141D7A00287C004A147F0B021419
+S315200071D07F43D378388000404BFFF885807F049C1E
+S315200071E0809800104BFFE8BD807F04A07E449378F2
+S315200071F04BFFE8B1807F04A47E248B784BFFE8A563
+S31520007200807F04A87E84A3784BFFE899807F04AC16
+S315200072105684C23E4BFFE88DA81902062C8000003A
+S315200072207E1C837841860014807F04B056E4203685
+S315200072303800FFE048000010807F04B056E4203676
+S315200072403800FFA07C8403785660073E7C84037850
+S315200072504BFFE851A81902142C8000204086000814
+S31520007260AB7902088018000C2C8F00017C00D9D63F
+S315200072707C1D0E70408600C0A81902142C800020A8
+S3152000728040860010807F04B4388000C54800000C7A
+S31520007290807F04B4388000304BFFE8092C9E000024
+S315200072A040850140A81902142C8000204086001C2D
+S315200072B07C9ED800408400148018000C7C00F1D6F7
+S315200072C07FDBF3787C1D0E707F43D3783880008077
+S315200072D04BFFF78D7F43D378388000084BFFF7812B
+S315200072E07F84E378807F04947FA5EB784BFFE805C5
+S315200072F07F43D378388000804BFFF765807F04B8C2
+S315200073004BFFE78D5463063E907F048C801F048CD0
+S3152000731070090001408200D42C95FFFF418600CCE5
+S315200073207FDBF05157A0083C7F9C02144181FF78F7
+S31520007330480000B0A81902142C80002040860010B6
+S31520007340807F04B4388000C44800000C807F04B4D9
+S31520007350388000204BFFE74D2C9E0000408500849E
+S315200073602D15FFFFA81902142C8000204086001C32
+S315200073707C9ED800408400148018000C7C00F1D636
+S315200073807FDBF3787C1D0E707F43D37838800080B6
+S315200073904BFFF6CD807F04B84BFFE6F55463063EDF
+S315200073A0907F048C801F048C700900014082003C71
+S315200073B0418A00387F43D378388000084BFFF6A1F6
+S315200073C07F84E378807F04947FA5EB784BFFE6E902
+S315200073D07FDBF05157A0083C7F9C02144181FF8837
+S315200073E0386000004800002C3AD600013D60002796
+S315200073F03D20002781297FC8800B7EA47C964800EB
+S3152000740030000001900B7EA44184FDC83860FFFF48
+S3152000741080010054818100087C0803A681E1000CCC
+S315200074208201001082210014824100188261001C12
+S315200074308281002082A1002482C1002882E1002CC2
+S315200074408301003083210034834100388361003C6E
+S315200074508381004083A1004483C1004883E1004C1E
+S315200074607D820120382100504E8000209421FFD8B3
+S315200074707C0802A6930100089321000C934100107A
+S31520007480936100149381001893A1001C93C10020DE
+S3152000749093E100249001002C3F0002FA6318F0804B
+S315200074A03FA000273BBD7FCC931D001C48014E49C1
+S315200074B0907D00283B800001939D0020939D002C09
+S315200074C0939D00303B200010933D0034380022006D
+S315200074D0901D003838002210901D003C801D002889
+S315200074E0813D0028939D00483B6000003B40000002
+S315200074F030002300901D004039292380913D00440F
+S31520007500801D0028813D002830003E80901D0058B7
+S3152000751039290A82913D005C9B690008801D00285C
+S31520007520B35D0016813D0028300009F0901D00242F
+S31520007530380000C090090ABC813D00287FA3EB7863
+S315200075409389003048026EA5931D008048014DA9FD
+S31520007550907D008C38000002901D0084901D0090C4
+S31520007560939D0094933D009838002500901D009C23
+S3152000757038002510901D00A0801D008C813D008CB8
+S31520007580939D00AC30002600901D00A4392926804A
+S31520007590913D00A8801D008C813D008C30003F80ED
+S315200075A0901D00BC39290A92913D00C09B690008B4
+S315200075B0801D008CB35D007A813D008C300009F47B
+S315200075C0901D008880090ABC3C60002860000C00E1
+S315200075D090090ABC813D008C386380309389003045
+S315200075E048026E098001002C7C0803A6830100084E
+S315200075F08321000C834100108361001483810018CD
+S3152000760083A1001C83C1002083E1002438210028A7
+S315200076104E8000209421FFE87C0802A693A1000C4E
+S3152000762093C1001093E100149001001C38600024DF
+S315200076303FA00023389DE8383CA0002738A57FCC02
+S315200076404804C6CD48014CB17C691B7838600023BC
+S31520007650389DE8383CA000288009094838A58030A4
+S3152000766060000010900909484804C6A548014C89C5
+S315200076708003094860000008900309488001001C27
+S315200076807C0803A683A1000C83C1001083E10014AB
+S31520007690382100184E8000207C601B782C80000149
+S315200076A0418500183C6000271C00006438637FCCAD
+S315200076B07C601A144E8000203860FFFF4E80002028
+S315200076C09421FFF87C0802A69001000C4BFFFDA137
+S315200076D08001000C7C0803A6382100084E8000207B
+S315200076E09421FFE87C0802A693A1000C93C1001008
+S315200076F093E100149001001C7C7D1B783860050006
+S315200077004804C0DD7C7E1B78386005003C80002064
+S31520007710388477F44804BF393D600028800B93F401
+S315200077202C800000408600103D200020392977C497
+S31520007730912B93F43D600028800B940C2C80000044
+S31520007740408600103D20002039297A08912B940C80
+S315200077503D600028800B94102C800000408600108D
+S315200077603D20002039297A58912B94103BE00000C7
+S315200077707FE3FB787FC4F37838A000003BFF00014D
+S315200077804804C58D2C9F003F4085FFE8381DFFFF2C
+S315200077902880000E418500D43D200020392976BC62
+S315200077A05400103A7C09002E3D200020392976BC51
+S315200077B07C004A147C0903A64E8004200000003C6D
+S315200077C0000000AC00000048000000AC000000549F
+S315200077D0000000AC00000060000000AC0000006C5F
+S315200077E0000000AC0000007C000000AC0000008C13
+S315200077F0000000AC0000009C3BC000003FE04000C1
+S31520007800480000703BC020003FE0100048000064A4
+S315200078103BC040003FE00400480000583BC06000E9
+S315200078203FE001004800004C3BC0000063DE8000C2
+S315200078303FE000404800003C3BC0000063DEA00063
+S315200078403FE000104800002C3BC0000063DEC00073
+S315200078503FE000044800001C3BC0000063DEE0005F
+S315200078603FE000014800000C3860FFFF4800003C64
+S315200078703D20002893A980987FA3EB783C800020A8
+S315200078803884794C7FE5FB784804C48548014A69E9
+S315200078903C0000E460001F807FC00378900309400D
+S315200078A093E30014386000008001001C7C0803A6C6
+S315200078B083A1000C83C1001083E100143821001835
+S315200078C04E8000202C83003F418500243D60002807
+S315200078D0396B9CE8546918387C8B492E7D295A14BB
+S315200078E090A90004386000004E8000203860FFFF19
+S315200078F04E8000209421FFE87C0802A69381000890
+S3152000790093A1000C93C1001093E100149001001C78
+S31520007910480149E57C7F1B783D200028801F001CFC
+S3152000792081298098541C36BE7C9C48004086002CB9
+S3152000793038000001B01F09307C0006AC7C0004AC86
+S31520007940A01F09303D2000285400AAFE90098094EB
+S3152000795033C00020480000087F9EE3783D200028A1
+S3152000796080098B542C800000418600783FA01000AF
+S315200079703D20002880099C0063BD00017C00E8387A
+S315200079807C80E800408600183D20002880099BA8BE
+S315200079907C0803A6387E00664E8000213D20002804
+S315200079A080099B607C00E8387C80E80040860034B3
+S315200079B0387E00663D20002880099B5038800000D4
+S315200079C038A0000038C0000038E000007C0803A67C
+S315200079D03900000039200000394000004E80002187
+S315200079E03860000060638000217C00203920FFFF82
+S315200079F083BF0014801F00147D2958307C0048382E
+S31520007A00901F0014480182713D20002839299CE8E6
+S31520007A10578018387D604A147C09002E7C0803A6FE
+S31520007A20806B00044E80002193BF00148001001C4F
+S31520007A307C0803A68381000883A1000C83C1001063
+S31520007A4083E10014382100184E8000209421FFE0A5
+S31520007A507C0802A6934100089361000C93810010D4
+S31520007A6093A1001493C1001893E1001C90010024F7
+S31520007A707C7B1B78480148813D2000287C7D1B7833
+S31520007A80838980943920FFFF835D0948801D09483A
+S31520007A90397C00017D2958307C004838901D0948E2
+S31520007AA03D600028801D0014396B9CE87C00DB7843
+S31520007AB0901D0014381C0020540018387D205A14BC
+S31520007AC07C0B002E7C0803A6806900044E800021D2
+S31520007AD0380000017C00E030901D094C935D094878
+S31520007AE0800100247C0803A6834100088361000CE2
+S31520007AF08381001083A1001483C1001883E1001C38
+S31520007B00382100204E8000209421FFF07C0802A618
+S31520007B1093E1000C900100147C7F1B78480147D923
+S31520007B20289F001F4185001C201F001F39200001AF
+S31520007B30816300147D2900307D6B4B78916300149E
+S31520007B4038600000800100147C0803A683E1000C45
+S31520007B50382100104E8000209421FFF07C0802A6D8
+S31520007B6093E1000C900100147C7F1B784801478923
+S31520007B70289F001F4185001C201F001F3920FFFE63
+S31520007B80816300145D29003E7D6B483891630014A3
+S31520007B9038600000800100147C0803A683E1000CF5
+S31520007BA0382100104E8000209421FFE07C0802A698
+S31520007BB09361000C9381001093A1001493C10018C7
+S31520007BC093E1001C900100247C9E23783BE000007A
+S31520007BD07C9FF0007C7C1B787CBB2B784084003813
+S31520007BE04BFFD7657C7D1B784BFFD7893BBDFFF8C4
+S31520007BF07FBD19D67FBBEA147FBDFA143FBD200096
+S31520007C00881D00007C1CF9AE3BFF00017C9FF00024
+S31520007C104184FFD038600000800100247C0803A640
+S31520007C208361000C8381001083A1001483C1001896
+S31520007C3083E1001C382100204E8000209421FFE0A3
+S31520007C407C0802A6934100089361000C93810010E2
+S31520007C5093A1001493C1001893E1001C9001002405
+S31520007C607C7B1B787C9A23787CBC2B784BFFD6D9DF
+S31520007C707C7D1B784BFFD6FD3BBDFFF83F9C20004B
+S31520007C807F64DB787FBD19D67F45D3787C7DE2146F
+S31520007C904BFFD791800100247C0803A6834100086E
+S31520007CA08361000C8381001083A1001483C1001816
+S31520007CB083E1001C382100204E8000209421FFE81B
+S31520007CC07C0802A693A1000C93C1001093E1001436
+S31520007CD09001001C7C9D23784BFFD6997C651B78F0
+S31520007CE07FA3EB78388000064BFFFEC18001001C85
+S31520007CF07C0803A683A1000C83C1001083E1001435
+S31520007D00382100184E8000209421FFF07C0802A61E
+S31520007D10900100149901000898E1000998C1000A11
+S31520007D2098A1000B9881000C9861000D4BFFD64559
+S31520007D307C651B7838610008388000064BFFFF0100
+S31520007D40800100147C0803A6382100104E800020F4
+S31520007D509421FCE87C0802A69381030893A1030CD6
+S31520007D6093C1031093E103149001031C7C7C1B78C0
+S31520007D703860420038810008480270552C9C00006B
+S31520007D803BA00000418600F0386100447F84E37800
+S31520007D904800B999386042003881000848027415B5
+S31520007DA0386042004800B9B9388300013860420083
+S31520007DB038A000004BFFFE89200300007FA0191584
+S31520007DC0418200B4386100083C800027388428604E
+S31520007DD038A000034800B9B52C83000040860098DF
+S31520007DE03C600027386328644800C6413BC102082E
+S31520007DF07C641B787FC3F3784800B9317FC3F3785E
+S31520007E003C800027388428744800B88D7FC3F378D7
+S31520007E103880000238A000004800D4A57C7F1B785B
+S31520007E202C9FFFFF418600504800D6517FC3F37830
+S31520007E304800D4117FC3F378388000014800D299D6
+S31520007E407C7F1B782C9FFFFF4186002C3C800027DF
+S31520007E503884288448014B597FE3FB783C800027EF
+S31520007E60388428987F85E37848014B457FE3FB7863
+S31520007E704800D6097FA3EB788001031C7C0803A663
+S31520007E808381030883A1030C83C1031083E10314B8
+S31520007E90382103184E8000209421FDE87C0802A694
+S31520007EA093A1020C93C1021093E102149001021CCB
+S31520007EB07C7D1B78386042003881000848026F11AB
+S31520007EC07FA3EB783881004438A000204800B90D04
+S31520007ED0386000008001021C7C0803A683A1020CE6
+S31520007EE083C1021083E10214382102184E8000203B
+S31520007EF09421FE587C0802A693A1019C93C101A05F
+S31520007F0093E101A4900101AC7C7D1B787C9E2378B3
+S31520007F104BFFD4615465083C3861000838800190D5
+S31520007F204BFFFC892C8300003BE0FFFF4086005C72
+S31520007F307FC3F3781D3D0064380100087FE04A14B2
+S31520007F404800B81D3863000128830063418500146A
+S31520007F507FC3F3784800B80938A300014800000819
+S31520007F6038A000647FE3FB787FC4F3784800B69599
+S31520007F704BFFD4015465083C3861000838800190D5
+S31520007F804BFFFCBD7C7F1B787FE3FB78800101AC37
+S31520007F907C0803A683A1019C83C101A083E101A4DF
+S31520007FA0382101A84E8000209421FFE07C0802A6FB
+S31520007FB09361000C9381001093A1001493C10018C3
+S31520007FC093E1001C900100247C9D23787CBC2B78B7
+S31520007FD01F6300644BFFD39D5465083C7FA3EB7859
+S31520007FE07F84E3787CA5DA144BFFFBC18001002453
+S31520007FF07C0803A68361000C8381001083A10014F2
+S3152000800083C1001883E1001C382100204E80002007
+S315200080109421FFF87C0802A69001000C7C641B7852
+S315200080203860000038A000404BFFFF818001000C23
+S315200080307C0803A6382100084E8000209421FFB832
+S315200080407C0802A69001004C386100084BFFFFC552
+S3152000805038000000980100473C6000273863289CC0
+S3152000806038810008480145598001004C7C0803A648
+S31520008070382100484E8000209421FFF87C0802A673
+S315200080809001000C7C641B78386000004BFFFE6575
+S315200080908001000C7C0803A6382100084E800020B1
+S315200080A09421FFF87C0802A69001000C7C641B78C2
+S315200080B0386000014BFFFE3D8001000C7C0803A6C2
+S315200080C0382100084E8000209421FFF87C0802A663
+S315200080D09001000C7C641B783860000138A00040B9
+S315200080E04BFFFEC98001000C7C0803A6382100083E
+S315200080F04E8000209421FF907C0802A690010074F7
+S31520008100386100084BFFFFC5380000009801006B5E
+S315200081103C600027386328B838810008480144A10C
+S31520008120800100747C0803A6382100704E80002050
+S315200081309421FFF87C0802A69001000C7C641B7831
+S31520008140386000024BFFFDAD8001000C7C0803A6C1
+S31520008150382100084E8000209421FFF87C0802A6D2
+S315200081609001000C7C641B783860000238A0004027
+S315200081704BFFFE398001000C7C0803A6382100083D
+S315200081804E8000209421FF907C0802A69001007466
+S31520008190386100084BFFFFC5380000009801006BCE
+S315200081A03C600027386328D03881000848014411F4
+S315200081B0800100747C0803A6382100704E800020C0
+S315200081C09421FFF87C0802A69001000C7C641B78A1
+S315200081D0386000034BFFFD1D8001000C7C0803A6C0
+S315200081E0382100084E8000209421FFF87C0802A642
+S315200081F09001000C7C641B783860000338A0004096
+S315200082004BFFFDA98001000C7C0803A6382100083D
+S315200082104E8000209421FF907C0802A690010074D5
+S31520008220386100084BFFFFC5380000009801006B3D
+S315200082303C600027386328E83881000848014381DC
+S31520008240800100747C0803A6382100704E8000202F
+S315200082509421FFE07C0802A693A1001493C1001884
+S3152000826093E1001C900100247C7F1B787C9D237861
+S315200082704BFFD1011CA30003386100083880000899
+S315200082804BFFF9292C9D0001408600108001000833
+S315200082907C00FB784800000C800100087C00F87800
+S315200082A0900100084BFFD0CD1CA3000338610008C5
+S315200082B0388000084BFFF989800100247C0803A63A
+S315200082C083A1001483C1001883E1001C38210020FB
+S315200082D04E8000209421FFE07C0802A693A1001482
+S315200082E093C1001893E1001C900100247C7D1B782B
+S315200082F04BFFD0811CA3000338610008388000089A
+S315200083004BFFF8A9806100087C63E83880010024CF
+S315200083107C0803A683A1001483C1001883E1001CF6
+S31520008320382100204E8000209421FFE07C0802A600
+S3152000833093A1001493C1001893E1001C900100241E
+S315200083407C7F1B787C9D23784BFFD0291CA30003C0
+S3152000835038610008388000084BFFF8512C9D000139
+S31520008360408600108001000C7C00FB784800000C41
+S315200083708001000C7C00F8789001000C4BFFCFF5B3
+S315200083801CA3000338610008388000084BFFF8B1B1
+S31520008390800100247C0803A683A1001483C1001851
+S315200083A083E1001C382100204E8000209421FFE02C
+S315200083B07C0802A693A1001493C1001893E1001C27
+S315200083C0900100247C7D1B784BFFCFA91CA30003C2
+S315200083D038610008388000084BFFF7D18061000C17
+S315200083E07C63E838800100247C0803A683A100145E
+S315200083F083C1001883E1001C382100204E80002014
+S315200084009421FFE87C0802A693A1000C93C10010DA
+S3152000841093E100149001001C7C7D1B784BFFCF5507
+S315200084205465103A7FA3EB783880020038A5000403
+S315200084304BFFF7798001001C7C0803A683A1000C62
+S3152000844083C1001083E10014382100184E800020DB
+S315200084509421FDF07C0802A6900102143800001237
+S3152000846098010008380000349801000938000045BA
+S315200084709801000A380000679801000B3960000057
+S31520008480394100087D2A5A147C0358AE396B000105
+S315200084902C8B01FF980900044085FFEC4BFFCED5BD
+S315200084A05465103A38610008388002044BFFF79172
+S315200084B0800102147C0803A6382102104E80002079
+S315200084C09421FFF07C0802A6900100144BFFCEA554
+S315200084D05465103A38610008388000044BFFF6CD09
+S315200084E0880100082C800012386000004086002C8D
+S315200084F0880100092C800034408600208801000A6B
+S315200085002C800045408600148801000B6803006714
+S31520008510212300007C691914800100147C0803A61D
+S31520008520382100104E8000209421FFE87C0802A606
+S3152000853093A1000C93C1001093E100149001001C3C
+S315200085407C7D1B784BFFCE2D1CA300057FA3EB78EB
+S315200085503880001438A500044BFFF6518001001C1A
+S315200085607C0803A683A1000C83C1001083E10014BC
+S31520008570382100184E8000209421FFE07C0802A6B6
+S31520008580900100243800008998010008380000ABCB
+S3152000859098010009380000CD9801000A380000EF44
+S315200085A09801000B39600000394100087D2A5A14D1
+S315200085B07C0358AE396B00012C8B001398090004FC
+S315200085C04085FFEC4BFFCDAD1CA3000538610008AC
+S315200085D0388000184BFFF669800100247C0803A62A
+S315200085E0382100204E8000209421FFF07C0802A62E
+S315200085F0900100144BFFCD7D1CA3000538610008B7
+S31520008600388000044BFFF5A5880100082C800089DE
+S31520008610386000004086002C880100092C8000ABC1
+S31520008620408600208801000A2C8000CD4086001458
+S315200086308801000B680300EF212300007C691914D0
+S31520008640800100147C0803A6382100104E800020EB
+S315200086509421FFF87C0802A69001000C3D200028FA
+S31520008660800980B02C8000003D200028812980AC24
+S315200086707C7602A67C691A154081FFFC7C7603A6CF
+S31520008680418600243D200028800980A02C800000FF
+S31520008690418600147C0803A63D200028806980A41A
+S315200086A04E8000218001000C7C0803A6382100089A
+S315200086B04E8000209421FFE87C0802A693A1000C9E
+S315200086C093C1001093E100149001001C3FE00028A4
+S315200086D0801F80A82C8000007C7E1B787C9D2378C0
+S315200086E0418600204800075D38000000901F80A8C2
+S315200086F0386009003C800021388485504804AF51F9
+S315200087003D20002893C980A03D20002893A980A45D
+S31520008710386000008001001C7C0803A683A1000CA1
+S3152000872083C1001083E10014382100184E800020F8
+S315200087309421FFF87C0802A69001000C3D600028D9
+S31520008740800B80B02C800000408600183800000185
+S315200087503D200028806980AC900B80B048013B21E9
+S315200087608001000C7C0803A6382100084E800020DA
+S315200087703D200028800980B02C8000004D860020F6
+S3152000878038000000900980B04E8000203D2000284F
+S315200087908069809C4E8000203803FFFF28801F3F81
+S315200087A0418500283D200028800980B47C001BD606
+S315200087B03D2000289069809C3D20002838600000DC
+S315200087C0900980AC4E8000203860FFFF4E8000204C
+S315200087D09421FFF87C0802A69001000C3D60FF0062
+S315200087E0616B09B23D40FF00614A094C3D200028DB
+S315200087F0A00B0000810980B8600000022C880000D0
+S31520008800B00B00003C000004900A000041860014D2
+S315200088107D0803A63D200028806980BC4E8000216B
+S315200088208001000C7C0803A6382100084E80002019
+S315200088303D200028906980B83D200028908980BC82
+S31520008840386000004E8000203D400028800A80C00D
+S315200088502C8000004D8600203D20FF00612909481C
+S315200088603D60FF0080090000616B09805400039879
+S315200088709009000039200000A00B0000912A80C03A
+S3152000888060000020B00B00004E8000209421FFF0F5
+S315200088907C0802A693E1000C900100143D6002FAC8
+S315200088A03D200028800980C8616BF0805400402E4E
+S315200088B07D4B03D63D2000283D60000F800980C0F7
+S315200088C0616BFFF0212000007C0901147D6A58109D
+S315200088D0396000007D6B59147C095839418200E8C3
+S315200088E03D20FF00612909803D60FF00A0090000AE
+S315200088F0616B099E390000006108FFFF7C8A4040B9
+S315200089007000FFCFB009000038000000B00B000057
+S31520008910418500243D20FF00612909967D4053783A
+S31520008920B00900003D20FF00612909923800FF1A96
+S31520008930480000203D20FF00612909965540E13E70
+S31520008940B00900003D20FF00612909923800FF1C74
+S31520008950B00900003D20FF00612909B23800FFFF61
+S31520008960B00900003D60FF00616B09483FE0002828
+S31520008970813F80C4800B00002C8900006400000425
+S31520008980900B000040860020386000323C80002199
+S31520008990388486D038A000004804B375380000011A
+S315200089A0901F80C43D40FF00614A0980A12A000033
+S315200089B03D60002838000001900B80C0612900101E
+S315200089C0B12A0000800100147C0803A683E1000C74
+S315200089D0382100104E8000203D200028806980C864
+S315200089E04E8000209421FFF87C0802A69001000CFE
+S315200089F03803FFFF28801F3F4085000C3860FFFFAB
+S31520008A00480000283D200028800980C02C800000D6
+S31520008A103D200028906980C84186000C4BFFFE2D22
+S31520008A204BFFFE6D386000008001000C7C0803A619
+S31520008A30382100084E8000209421FFF87C0802A6E9
+S31520008A409001000C3D60FF00616B09B63D40FF00C0
+S31520008A50614A094C3D200028A00B0000810980D0E6
+S31520008A60600000022C880000B00B00003800008057
+S31520008A70900A0000418600147D0803A63D200028A8
+S31520008A80806980D44E8000218001000C7C0803A6DA
+S31520008A90382100084E8000203D200028906980D093
+S31520008AA03D200028908980D4386000004E80002028
+S31520008AB09421FFE87C0802A693A1000C93C1001024
+S31520008AC093E100149001001C3FC0002883FE80CC57
+S31520008AD02C9F00004186001C3D20FF00612909AC27
+S31520008AE038000000B009000038600000480000C4CB
+S31520008AF03FA00028801D80D82C8000004086001CC6
+S31520008B00386000273C8000213884893838A000004E
+S31520008B104804B1FD93FD80D838000001901E80CC1A
+S31520008B203FA0FF0063BD09803D60FF00616B09A285
+S31520008B30A01D00003D20FF0060008000B01D000049
+S31520008B40A01D0000612909A07000CCFFB01D000007
+S31520008B503800001AB00B000038000000B0090000F1
+S31520008B60480000CD3D20FF00612909A4906900003E
+S31520008B703D20FF00612909AC93E900003D20FF005C
+S31520008B80612909B63800FFFFB00900003D20FF002B
+S31520008B9061290948800900006000008090090000D2
+S31520008BA0A01D00003860000060001100B01D00000C
+S31520008BB08001001C7C0803A683A1000C83C1001041
+S31520008BC083E10014382100184E8000203D40002803
+S31520008BD0800A80CC2C8000004186004C3D20FF007E
+S31520008BE061290948800900003D60FF005400066E97
+S31520008BF09009000080090000616B0980540005245B
+S31520008C0090090000A00B0000392000006000200021
+S31520008C10B00B0000A00B0000912A80CC600002005F
+S31520008C20B00B0000386000004E8000203860FFFF47
+S31520008C304E8000203D20FF00612909A23C0002FA57
+S31520008C40A06900006000F0805463C23E38630001D2
+S31520008C507C601BD64E8000203D20FF00612909AC98
+S31520008C60806900004E8000203D20FF00612909AC6C
+S31520008C70806900004E8000203C6000273863290070
+S31520008C804E8000203C6000273863291C4E8000203F
+S31520008C909421FFE87C0802A693A1000C93C1001042
+S31520008CA093E100149001001C4801364D7C7D1B7811
+S31520008CB0480003DD48000389801D02845400033EDA
+S31520008CC0901D0284801D02803860000954000564CE
+S31520008CD0901D0280801D0170392000005400023E44
+S31520008CE064000C00901D017038000100B01D017A4F
+S31520008CF038000000B01D0952B01D0950B01D09549E
+S31520008D00913D0ABC913D0AB8B01D0AC2B01D096248
+S31520008D10B01D0960B01D0964B01D0972B01D09702F
+S31520008D20913D0AEC4BFFE9BD4BFFE745386000005B
+S31520008D30480001B938600000480001B57FA3EB78F0
+S31520008D4048000225386000014801669D8001001C0C
+S31520008D507C0803A683A1000C83C1001083E10014C4
+S31520008D60382100184E8000203D200028800980DC14
+S31520008D702C8000004086000C3C000200900980DC1C
+S31520008D80806980DC4E8000209421FFF07C0802A6BA
+S31520008D9093E1000C900100143FE00028801F80E042
+S31520008DA02C8000004086000C4BFFFFC1907F80E0A6
+S31520008DB0807F80E0800100147C0803A683E1000CFC
+S31520008DC0382100104E8000209421FFE87C0802A65E
+S31520008DD09381000893A1000C93C1001093E1001425
+S31520008DE09001001C7C7D1B783F802000639C010441
+S31520008DF04801350538000000900309483860000016
+S31520008E00480000E9480134F14800015D4BFFE8B510
+S31520008E107F8803A67FA3EB784E8000213860000070
+S31520008E208001001C7C0803A68381000883A1000C16
+S31520008E3083C1001083E10014382100184E800020E1
+S31520008E409421FFE87C0802A693A1000C93C1001090
+S31520008E5093E100149001001C3FE00028801F80E46D
+S31520008E602C800000408600344801348D7C7D1B78A0
+S31520008E704BFFE7A5801D0280540001CA901D028089
+S31520008E8038000001B01D02004BFFB2A14BFFB059C4
+S31520008E9038000001901F80E48001001C7C0803A696
+S31520008EA083A1000C83C1001083E10014382100182F
+S31520008EB04E8000203D20002880699A4C4E8000205C
+S31520008EC03D20002890699A4C4E8000203860FFFF94
+S31520008ED04E8000203860FFFF4E8000203860000062
+S31520008EE04E8000204E8000204E8000204E800020A4
+S31520008EF09421FFE87C0802A693A1000C93C10010E0
+S31520008F0093E100149001001C7C7D1B7848016D556F
+S31520008F10801D0014540003DA901D0014801D0010DB
+S31520008F2064000002901D0010801D0030901D00304E
+S31520008F3038001FFFB01D097238001C58B01D09707B
+S31520008F4048016D35386000008001001C7C0803A6AE
+S31520008F5083A1000C83C1001083E10014382100187E
+S31520008F604E8000209421FFE87C0802A693A1000CE5
+S31520008F7093C1001093E100149001001C7C7D1B78A6
+S31520008F8048016CE138000000B01D0972B01D09705F
+S31520008F9048016CE5386000008001001C7C0803A6AF
+S31520008FA083A1000C83C1001083E10014382100182E
+S31520008FB04E8000209421FFF07C0802A693C1000871
+S31520008FC093E1000C900100147C9F23783860000008
+S31520008FD03FC00027389E7FB84BFFECE52C8300006E
+S31520008FE040860040393E7FB888090005981F00005A
+S31520008FF088090004981F000188090003981F0002B1
+S3152000900088090002981F000388090001981F0004A0
+S31520009010881E7FB838600000981F000548000008A9
+S315200090203860FFFF800100147C0803A683C1000876
+S3152000903083E1000C382100104E8000203D200028BE
+S315200090403929C7D83800000090090030394000017E
+S3152000905091490034900900389009003C3960024D4E
+S3152000906091690040900900449009004890090084C5
+S31520009070914900889009008C90090090916900948C
+S31520009080900900989009009C4E8000203D20FF000A
+S315200090906129010C3C00FF0060000FF490090000DC
+S315200090A03D20FF00612901083C0080006000080186
+S315200090B0900900003D20FF00612901183C00E000D6
+S315200090C060000801900900003D20FF006129011C75
+S315200090D039608708916900003D20FF006129012041
+S315200090E03C00E00160000801900900003D20FF00DF
+S315200090F061290124916900003D20FF00612901308A
+S315200091003C00E10060000001900900003D20FF00C6
+S31520009110612901343C00FF00600009149009000019
+S315200091204E8000209421FFE87C0802A693C10010FF
+S3152000913093E100149001001C3D2000288009810045
+S31520009140700900107C7E1B784182003C3D2000285F
+S3152000915080099B8C2C8000004186002C3C600027D7
+S31520009160386329243880000138A0000238C0000363
+S315200091707C0803A638E000043900000539200006E3
+S315200091804E8000212C9E000041860238881E000059
+S315200091902C8000004086001C3C6000273863293460
+S315200091A07FC4F37838A00007480080E14800021405
+S315200091B03860074038800001480173C57C7F1B79E1
+S315200091C0418202003860002438800001480173B1D2
+S315200091D0907F073C801F073C2C800000418601E4DD
+S315200091E03D20002893E9813C7FE3FB787FC4F37818
+S315200091F04800037D2C83FFFF418601B8801F02B4FF
+S315200092007C000E70901F02B8801F02AC2C800000DC
+S31520009210418401A07FE3FB78480006ED2C83FFFF05
+S31520009220418601903D20002139298EB42C890000E9
+S3152000923041860028807F02B0388100084BFFFD79E7
+S315200092402C83FFFF408600143C60000D60630007FE
+S315200092504800B4BD4800016C3D20002880098100EB
+S31520009260700900104182003C3D20002880099B8C1B
+S315200092702C8000004186002C3C6000277C0803A639
+S315200092808881000888A1000988C1000A88E1000BAE
+S315200092908901000C8921000D3863293C4E8000216C
+S315200092A038000001901F04F038000000901F04F4DD
+S315200092B038600000388000004801A6F5907F07003E
+S315200092C0801F07002C800000418600E838600000DF
+S315200092D0388000004801A6D9907F0704801F070424
+S315200092E02C800000418600CC7FE3FB787FE4FB786E
+S315200092F03CA0002738A529343CE0002838E78148DF
+S3152000930080DF02AC3D000027390829804802A19160
+S315200093102C83FFFF4186009C3C00009860009680CD
+S31520009320387F008438800006813F073C38A100083A
+S3152000933090090018813F073C38C0000681090018B3
+S3152000934038E005DC48029FE12C83FFFF418600645C
+S315200093507FE3FB7838800000608480224802A29157
+S315200093603D20002880098100700900104182003CC0
+S315200093703D20002880099B8C2C8000004186002CF3
+S315200093803C600027386329B03880000138A00002ED
+S3152000939038C000037C0803A638E000043900000525
+S315200093A0392000064E8000217FE3FB784800001814
+S315200093B07FE3FB78480000297FE3FB7848018101A1
+S315200093C0386000008001001C7C0803A683C10010C1
+S315200093D083E10014382100184E8000209421FFE8F4
+S315200093E07C0802A693A1000C93C1001093E10014FF
+S315200093F09001001C3D200028800981007009001082
+S315200094007C7D1B784182003C3D20002880099B8C76
+S315200094102C8000004186002C3C600027386329C838
+S315200094203880000138A0000238C000037C0803A65B
+S3152000943038E0000439000005392000064E8000215E
+S315200094402C9D00004086000C3860FFFF4800010478
+S3152000945038000000901D04F0A01D02D63BE000005D
+S315200094607C9F0000408400247FBEEB78807E02E84B
+S3152000947048017199A01D02D63BFF00017C9F000088
+S315200094803BDE00044184FFE8387D028848010F2531
+S31520009490387D029848010F1D881D04EC70090001D3
+S315200094A041820018801D02C42C8000004186000CD9
+S315200094B0807D02C44800A6C5801D07102C800000B0
+S315200094C04186000C807D071048017FF57FA3EB784D
+S315200094D048017139801D07002C8000004186000C50
+S315200094E0807D07004801B6FD801D07042C80000002
+S315200094F04186000C807D07044801B6E9807D073C43
+S3152000950048017FBD3D200028800981007009001098
+S315200095104182003C3D20002880099B8C2C80000045
+S315200095204186002C3C600027386329DC3880000106
+S3152000953038A0000238C000037C0803A638E00004E7
+S3152000954039000005392000064E80002138600000D1
+S315200095508001001C7C0803A683A1000C83C1001097
+S3152000956083E10014382100184E8000209421FFE06A
+S315200095707C0802A693A1001493C1001893E1001C55
+S31520009580900100247C7F1B783800000090010008A1
+S315200095907C8323783C800027388429F438A100086E
+S315200095A04800A2A57C631B794182020048009BD912
+S315200095B0907F02AC386000003C800027388429F474
+S315200095C038A100084800A2817C631B79418201DC16
+S315200095D03880000038A0001048009E15907F02B009
+S315200095E0386000003C800027388429F438A1000820
+S315200095F04800A2557C631B79418201B03880000067
+S3152000960038A0001048009DE9907F02B43860000021
+S315200096103FC00027389E29F438A100084800A22917
+S315200096207C631B79418201843880000038A00010B9
+S3152000963048009DBD907F02C438600000389E29F402
+S3152000964038A100084800A2017C631B794182015C95
+S315200096503880000038A0001048009D95907F02C8F1
+S3152000966038600000389E29F438A100084800A1D9A6
+S315200096707C631B79418201343880000038A00010B9
+S3152000968048009D6D907F02BC38600000389E29F40A
+S3152000969038A100084800A1B17C631B794182010CE6
+S315200096A03880000038A0001048009D45907F02C0F9
+S315200096B038600000389E29F438A100084800A189A6
+S315200096C07C631B79418200E43880000038A00010BA
+S315200096D048009D1DB07F02D638600000389E29F4D0
+S315200096E038A100084800A1617C631B79418200BC37
+S315200096F03880000038A0001048009CF5B07F02CCCE
+S3152000970038600000389E29F438A100084800A139A5
+S315200097107C631B79418200943880000038A00010B9
+S3152000972048009CCD7C601B7838600000389E29F468
+S31520009730813F073C38A10008980900104800A1097C
+S315200097407C631B79418200643880000038A00010B9
+S3152000975048009C9D7C601B7838600000389E29F468
+S31520009760813F073C38A10008980900114800A0D97C
+S315200097707C631B79418200343880000038A00010B9
+S3152000978048009C6D5460063E38600000389E29F4DF
+S31520009790813F073C38A10008900900204800A0A975
+S315200097A07C631B794082000C3860FFFF4800013C37
+S315200097B03880000038A0001048009C35907F04E8CF
+S315200097C0A01F02D62C80000041860010A01F02D6C2
+S315200097D02880000241850018881F04EC60000002E2
+S315200097E0981F04EC38000040B01F02D6A01F02CC00
+S315200097F02C80000041860010A01F02CC2880000289
+S3152000980041850018881F04EC60000004981F04ECB2
+S3152000981038000030B01F02CC3FA00028801D8100F8
+S3152000982070090010418200C03FC00028801E9B8C1A
+S315200098302C8000004186002C3C600027386329F8E4
+S315200098407C0803A6809F02AC80BF02B080DF02B4F2
+S3152000985080FF02C4811F02C8392000004E800021EB
+S31520009860801D8100700900104182007C801E9B8C27
+S315200098702C8000004186002C3C60002738632A4C4F
+S315200098807C0803A6809F02BC80BF02C0A0DF02D650
+S31520009890A0FF02CC811F04E8392000004E80002161
+S315200098A0801D8100700900104182003C801E9B8C27
+S315200098B02C800000418600303C60002738632AA0B7
+S315200098C038E0000039000000817F073C7C0803A6B1
+S315200098D0888B001088AB001180CB00203920000037
+S315200098E04E80002138600000800100247C0803A6F9
+S315200098F083A1001483C1001883E1001C38210020B5
+S315200099004E8000209421FFB87C0802A6938100385F
+S3152000991093A1003C93C1004093E100449001004C88
+S315200099207C7F1B78386100183880000038A0001032
+S3152000993048009D19386100283880000038A00010A2
+S3152000994048009D093800060090010028386000581C
+S3152000995048017B41907F02A8801F02A82C8000002E
+S3152000996041860450A01F02D6A17F02CC813F02C4AB
+S315200099702C89FFFF7C005A145400183833C000107D
+S31520009980408601003F800028801C8BC02C80000070
+S315200099903BBC8BC0418600503D20002880098100B9
+S315200099A0700900104182040C3D20002880099B8C00
+S315200099B02C800000418603FC3C60002738632AF493
+S315200099C03880000138A0000238C000037C0803A6B6
+S315200099D038E0000439000005392000064E800021B9
+S315200099E0480003D07FC3F3784800A155907F02C476
+S315200099F0801F02C42C800000408600503D20002895
+S31520009A008009810070090010418203A83D200028AA
+S31520009A1080099B8C2C800000418603983C6000279F
+S31520009A2038632B343880000138A0000238C0000388
+S31520009A307C0803A638E0000439000005392000061A
+S31520009A404E8000214800036C801F02C43000000FA6
+S31520009A5054000036901F02C493DF02C8881F04EC0E
+S31520009A60393F071860000001981F04EC801C8BC04A
+S31520009A70817D0004815D0008811D000C480001B82D
+S31520009A80801F02C82C800000408600503D20002800
+S31520009A908009810070090010418203183D200028AA
+S31520009AA080099B8C2C800000418603083C6000279F
+S31520009AB038632B6C3880000138A0000238C00003C0
+S31520009AC07C0803A638E0000439000005392000068A
+S31520009AD04E800021480002DC881F04EC7009000239
+S31520009AE041820024881F04EC70090004418200187A
+S31520009AF0801F02C85400E13EB01F02D6A01F02D626
+S31520009B00480000A4881F04EC70090002418200204E
+S31520009B10A13F02CC801F02C8552918387C09005065
+S31520009B205400E8FEB01F02D648000080881F04ECCF
+S31520009B30700900044082005C801F02C87C80F040CF
+S31520009B40408400683D2000288009810070090010AB
+S31520009B50418202603D20002880099B8C2C800000D9
+S31520009B60418602503C60002738632B9C38800001D8
+S31520009B7038A0000238C000037C0803A638E00004A1
+S31520009B8039000005392000064E80002148000224B5
+S31520009B90A13F02D6801F02C8552918387C090050DB
+S31520009BA05400E8FEB01F02CCA01F02D62880000673
+S31520009BB040850010A01F02CC28800004418500505B
+S31520009BC03D2000288009810070090010418201E4AF
+S31520009BD03D20002880099B8C2C800000418601D4E2
+S31520009BE03C60002738632BC83880000138A000026B
+S31520009BF038C000037C0803A638E0000439000005BD
+S31520009C00392000064E800021480001A83D6000282A
+S31520009C10881F04EC392B8BB05400063C981F04ECAB
+S31520009C20800B8BB081690004814900088109000CF2
+S31520009C30393F0718901F07189169000491490008B9
+S31520009C409109000C3CE0002839478180390000004A
+S31520009C50910A0008910A000C3D2000283D6000284A
+S31520009C6080098194393F0728816B819090078180F4
+S31520009C70916A0004901F0728916900049109000841
+S31520009C809109000C807F02C480BF02C83880000082
+S31520009C90480099B9A01F02CCA13F02CC3000002772
+S31520009CA0540B043E7D6A5B78392900208001001818
+S31520009CB01D2906002C8000005560103A7C004A14AD
+S31520009CC030802A104086000C5560083C9001001810
+S31520009CD08001002C2C800000408600109141002C31
+S31520009CE03800060090010028800100288121002CE0
+S31520009CF0300000047D2901D638600004912100340B
+S31520009D00480162092C83000090610030418600A43E
+S31520009D10907F070880010034901F070C8001001CEB
+S31520009D202C8000004086000C8001002C9001001C35
+S31520009D30800100202C800000408600388081001899
+S31520009D408001001C7C8402141C84002438600004DA
+S31520009D5090810024480161B52C8300009061002089
+S31520009D6041860050907F071080010024901F071421
+S31520009D703881001838A1002838C00001807F02A849
+S31520009D8038E00000480390E12C83FFFF4186002441
+S31520009D9038800600807F02A838A00000480395E19D
+S31520009DA0907F0738801F07382C8000004086000CE3
+S31520009DB03860FFFF480000503D20002880098100C0
+S31520009DC0700900104182003C3D20002880099B8CB0
+S31520009DD02C8000004186002C3C60002738632BF83D
+S31520009DE03880000038A0000038C000007C0803A698
+S31520009DF038E0000039000000392000004E800021A4
+S31520009E00386000008001004C7C0803A6838100385E
+S31520009E1083A1003C83C1004083E1004438210048EF
+S31520009E204E8000209421FFE87C0802A693C10010F2
+S31520009E3093E100149001001C3D2000288009810038
+S31520009E40700900807C7F1B784182003C3D200028E1
+S31520009E5080099B8C2C8000004186002C3C600027CA
+S31520009E6038632C103880000138A0000238C0000367
+S31520009E707C0803A638E000043900000539200006D6
+S31520009E804E800021801F04F02C800000418602288D
+S31520009E903880000038A00004807F02B038C1000856
+S31520009EA038630E00480155052C830000418600507A
+S31520009EB03D2000288009810070090080418201F838
+S31520009EC03D20002880099B8C2C800000418601E8DB
+S31520009ED03C60002738632C2438A0000238C00003D9
+S31520009EE038E000047C0803A639000005809F02B0F4
+S31520009EF0392000064E800021480001BC7FE3FB7814
+S31520009F00480004CD7C7E1B79408201AC7FE3FB7840
+S31520009F10480022852C83FFFF4186019C7FE3FB7846
+S31520009F2048002F092C83FFFF4186018C93DF02E432
+S31520009F3039200000B13F02DCB13F02DEA01F02D66D
+S31520009F40B01F02E0B13F02D4801F02B42C80000073
+S31520009F50386000004186002C801F04F42C8000000D
+S31520009F604086002038000001901F04F43C80002128
+S31520009F703884A32C807F02B47FE5FB7848049D912A
+S31520009F802C83FFFF41860130801F02B42C80000005
+S31520009F90386000004186000C807F02B448049EC9C8
+S31520009FA02C83FFFF418601103D20002139298DF0A9
+S31520009FB02C89000041860014807F02B04BFFEF35CC
+S31520009FC02C83FFFF418600F07FE3FB784800308139
+S31520009FD02C83FFFF418600E07FE3FB784800406941
+S31520009FE02C830000418600503D20002880098100F6
+S31520009FF070090010418200C03D20002880099B8CFA
+S3152000A0002C800000418600B03C60002738632C4C31
+S3152000A0103880000038A0000038C000007C0803A665
+S3152000A02038E0000039000000392000004E80002171
+S3152000A030480000843D200028800981402C800000B3
+S3152000A040418600747C0803A67FE3FB784E800021BE
+S3152000A0502C830000418600503D2000288009810085
+S3152000A06070090010418200503D20002880099B8CF9
+S3152000A0702C800000418600403C60002738632C700D
+S3152000A0803880000038A0000038C000007C0803A6F5
+S3152000A09038E0000039000000392000004E80002101
+S3152000A0A0480000147FE3FB78480033A12C83FFFF90
+S3152000A0B04086000C3860FFFF480000F0813F073CD7
+S3152000A0C080090018901F0190801F007C7009800075
+S3152000A0D041820010881F04EC60000040981F04ECA9
+S3152000A0E0801F07202C80000040860010801F02B0B1
+S3152000A0F030600E4048000018807F02B0801F072085
+S3152000A1007C0803A638630E404E80002138000002EA
+S3152000A11090030000801F007C60000041901F007C9F
+S3152000A120801F07202C80000040860010801F02B070
+S3152000A13030600E5048000018807F02B0801F072034
+S3152000A1407C0803A638630E504E8000213C00010097
+S3152000A150900300007C0006AC7C0004AC3D20002867
+S3152000A16080098100700900804182003C3D20002842
+S3152000A17080099B8C2C8000004186002C3C600027A7
+S3152000A18038632C903880000138A0000238C00003C4
+S3152000A1907C0803A638E000043900000539200006B3
+S3152000A1A04E800021386000008001001C7C0803A638
+S3152000A1B083C1001083E10014382100184E8000204E
+S3152000A1C09421FFF07C0802A693E1000C9001001474
+S3152000A1D03D20002880098100700900107C7F1B78B3
+S3152000A1E04182003C3D20002880099B8C2C80000069
+S3152000A1F04186002C3C60002738632CA8388000015B
+S3152000A20038A0000238C000037C0803A638E000040A
+S3152000A21039000005392000064E800021801F007C71
+S3152000A2203960FFBE7C005838901F007C801F0720B5
+S3152000A2302C80000040860010801F02B030600F8402
+S3152000A24048000018807F02B0801F07207C0803A6E4
+S3152000A25038630F844E8000213800000190030000EF
+S3152000A260807F07043880FFFF4801A6CD801F072086
+S3152000A2702C80000040860010801F02B030600E48FF
+S3152000A28048000018807F02B0801F07207C0803A6A4
+S3152000A29038630E484E8000213800000090030000ED
+S3152000A2A0801F07202C80000040860010801F02B0EF
+S3152000A2B030600E4048000018807F02B0801F0720C3
+S3152000A2C07C0803A638630E404E800021380000002B
+S3152000A2D090030000801F02B42C800000386000002C
+S3152000A2E04186000C807F02B448049BB12C83FFFF7B
+S3152000A2F041860074801F02B42C8000003860000064
+S3152000A3004186002C3D200028800980FC2C800000FE
+S3152000A3104186001C907F04F47C0803A6807F02B44B
+S3152000A3203C8000213884A32C4E8000212C83FFFF03
+S3152000A330418600343D20002139298E642C89000075
+S3152000A34041860014807F02B04BFFEC1D2C83FFFF5B
+S3152000A350418600147FE3FB7848002C612C830000A3
+S3152000A3604186000C3860FFFF480000503D20002841
+S3152000A37080098100700900104182003C3D200028A0
+S3152000A38080099B8C2C8000004186002C3C60002795
+S3152000A39038632CB83880000138A0000238C000038A
+S3152000A3A07C0803A638E000043900000539200006A1
+S3152000A3B04E80002138600000800100147C0803A62E
+S3152000A3C083E1000C382100104E8000209421FFF8F4
+S3152000A3D07C0802A69001000C7C691B788009072066
+S3152000A3E02C80000040860010800902B030600E40AC
+S3152000A3F048000018806902B0800907207C0803A65F
+S3152000A40038630E404E800021380000019003000082
+S3152000A410386000014801DC49386000008001000CEA
+S3152000A4207C0803A6382100084E8000209421FFE8EE
+S3152000A4307C0802A693A1000C93C1001093E100149E
+S3152000A4409001001C7C7F1B787C0006AC7C0004AC51
+S3152000A450801F07202C80000040860010801F02B03D
+S3152000A46030600E4448000018807F02B0801F07200D
+S3152000A4707C0803A638630E444E80002183C3000067
+S3152000A480801F07202C80000040860010801F02B00D
+S3152000A49030600E4448000018807F02B0801F0720DD
+S3152000A4A07C0803A638630E444E80002157C0001254
+S3152000A4B0900300007C0006AC7C0004AC801F0720C3
+S3152000A4C02C80000040860010801F02B030600E48AD
+S3152000A4D048000018807F02B0801F07207C0803A652
+S3152000A4E038630E484E80002183A30000801F07207A
+S3152000A4F02C80000040860010801F02B030600E4481
+S3152000A50048000018807F02B0801F07207C0803A621
+S3152000A51038630E444E8000213D20002880098100AA
+S3152000A5207009004080A30000418200383D200028A9
+S3152000A53081699B8C2C8B0000418600283C6000277B
+S3152000A54038632CD057C4001238C000007D6803A69B
+S3152000A55038E0000039000000392000004E8000213C
+S3152000A56077C000404182008C3D2000288009810070
+S3152000A570700900404182003C3D20002880099B8CC8
+S3152000A5802C8000004186002C3C60002738632CF488
+S3152000A5903880000038A0000038C000007C0803A6E0
+S3152000A5A038E0000039000000392000004E800021EC
+S3152000A5B03C6000213863A0C07FE4FB787FC5F37838
+S3152000A5C038C0000038E0000039000000480395112B
+S3152000A5D03C60002138639D247FE4FB787FC5F378B7
+S3152000A5E038C0000038E0000039000000480394F12C
+S3152000A5F077C020004182005C3D6000283D20002875
+S3152000A60081298100800B8108712A004030000001D9
+S3152000A610900B81084182003C3D20002880099B8CBC
+S3152000A6202C8000004186002C3C60002738632D18C2
+S3152000A6303880000038A0000038C000007C0803A63F
+S3152000A64038E0000039000000392000004E8000214B
+S3152000A65077C040004182005C3D6000283D200028F4
+S3152000A66081298100800B8104712A0040300000017D
+S3152000A670900B81044182003C3D20002880099B8C60
+S3152000A6802C8000004186002C3C60002738632D3842
+S3152000A6903880000038A0000038C000007C0803A6DF
+S3152000A6A038E0000039000000392000004E800021EB
+S3152000A6B077C008004182000C77A008004082001471
+S3152000A6C077C00200418200B077A00200418200A834
+S3152000A6D0801F07202C80000040860010801F02B0BB
+S3152000A6E030600E4848000018807F02B0801F072087
+S3152000A6F07C0803A638630E484E8000213C00F5FFF7
+S3152000A7006000FFFF7FA00038900300003D20002856
+S3152000A71080098100700900404182003C3D200028CC
+S3152000A72080099B8C2C8000004186002C3C600027F1
+S3152000A73038632D583880000038A0000038C000004B
+S3152000A7407C0803A638E0000039000000392000000C
+S3152000A7504E8000213C6000213863C18C7FE4FB7869
+S3152000A76038A0000038C0000038E0000039000000A2
+S3152000A7704803936D2C9E0000408400783D6000289D
+S3152000A7803D20002881298144800B810C2C890000E2
+S3152000A79030000001900B810C418600107D2803A615
+S3152000A7A07FE3FB784E8000213D2000288009810030
+S3152000A7B0700900404182003C3D20002880099B8C86
+S3152000A7C02C8000004186002C3C60002738632D70C9
+S3152000A7D03880000038A0000038C000007C0803A69E
+S3152000A7E038E0000039000000392000004E800021AA
+S3152000A7F077C00080418200543D20002880098100D6
+S3152000A800700900404182003C3D20002880099B8C35
+S3152000A8102C8000004186002C3C60002738632D9454
+S3152000A8203880000038A0000038C000007C0803A64D
+S3152000A83038E0000039000000392000004E80002159
+S3152000A840807F070048019F9577C010004182005401
+S3152000A8503D20002880098100700900404182003C8B
+S3152000A8603D20002880099B8C2C8000004186002CEE
+S3152000A8703C60002738632DB03880000038A00000E7
+S3152000A88038C000007C0803A638E00000390000002C
+S3152000A890392000004E800021807F070448019F3D1B
+S3152000A8A08001001C7C0803A683A1000C83C1001034
+S3152000A8B083E10014382100184E8000209421FFE8FF
+S3152000A8C07C0802A693C1001093E100149001001C9D
+S3152000A8D07C7F1B787C9E23783D2000288009810080
+S3152000A8E039200000700B0002992100083800000072
+S3152000A8F0B001000A4182003C3D20002880099B8C43
+S3152000A9002C8000004186002C3C60002738632DD027
+S3152000A9103880000138A0000238C000037C0803A656
+S3152000A92038E0000439000005392000064E80002159
+S3152000A9303D20002880099A607C80F8004186000826
+S3152000A94093E99A60807F00783880FFFF48019FE96D
+S3152000A950881F04EC70090008418200207FC3F37829
+S3152000A9604803874948009D353800001690030000AB
+S3152000A9703860FFFF480000F07FC3F3783881000875
+S3152000A98038A1000A4800100D2C83FFFF418600BC29
+S3152000A990A01F02E02C800000408600103800000135
+S3152000A9A0901F02E4480000A488A10008A01F02E02E
+S3152000A9B07C802840418400187FE3FB78A0C1000AF0
+S3152000A9C07FC4F378480000B9480000203800000111
+S3152000A9D0980100087FE3FB787FC4F378A0C1000AC2
+S3152000A9E038A00001480004492C83FFFF4186005C03
+S3152000A9F0807F007848019DE53D2000288009810060
+S3152000AA00700900024182003C3D20002880099B8C71
+S3152000AA102C8000004186002C3C60002738632DE006
+S3152000AA203880000138A0000238C000037C0803A645
+S3152000AA3038E0000439000005392000064E80002148
+S3152000AA403860000048000020387F008438800002EB
+S3152000AA5038A0000148028975807F007848019D7DD5
+S3152000AA603860FFFE8001001C7C0803A683C100100D
+S3152000AA7083E10014382100184E8000209421FFD055
+S3152000AA807C0802A692C1000892E1000C93010010F6
+S3152000AA9093210014934100189361001C9381002098
+S3152000AAA093A1002493C1002893E1002C9001003447
+S3152000AAB07C7F1B783D200028800981007C9E23789E
+S3152000AAC07009000254B7063E3B00000054D6043EEF
+S3152000AAD04182003C3D20002880099B8C2C80000070
+S3152000AAE04186002C3C60002738632DD03880000139
+S3152000AAF038A0000238C000037C0803A638E0000412
+S3152000AB0039000005392000064E8000217FE3FB78BE
+S3152000AB107EE4BB7848000F317C791B794082001493
+S3152000AB2038000001901F02E43860FFFF480002C889
+S3152000AB3093D9000438000002B01900087EC0B3780B
+S3152000AB402C970000B01900027FDAF378801A0018DB
+S3152000AB504186023C839A0008837A000C801F0728CE
+S3152000AB602C8000007F18DA144186001C801F0728DD
+S3152000AB707C0803A6386000017F84E3787F65DB7854
+S3152000AB804E80002183D90010801F07202C800000D2
+S3152000AB904086000C3BBE000448000018801F07209A
+S3152000ABA07C0803A6387E00044E8000217C7D1B781D
+S3152000ABB0801F07202C80000041860018801F072058
+S3152000ABC07C0803A67F83E3784E8000214800000896
+S3152000ABD07F83E378907D0000801F07202C80000073
+S3152000ABE041860018801F07207C0803A67FC3F378C0
+S3152000ABF04E800021480000087FC3F378A3A30000FD
+S3152000AC00835A00002C9A0000418600A43D2000288B
+S3152000AC1080098100700900024182003C3D20002805
+S3152000AC2080099B8C2C8000004186002C3C600027EC
+S3152000AC3038632DF43880000138A0000238C00003A4
+S3152000AC407C0803A638E000043900000539200006F8
+S3152000AC504E800021801F07202C8000004086000C9B
+S3152000AC60387E000248000014801F07207C0803A6B7
+S3152000AC70387E00024E8000217F60DB78B003000022
+S3152000AC80801F07202C80000041860018801F072087
+S3152000AC907C0803A67FC3F3784E8000214800000875
+S3152000ACA07FC3F37863A08000480000CC2C98003B3B
+S3152000ACB041850028381B003C7C1800507C9B0000F6
+S3152000ACC07D20002655292FFE7D2900D07C0048387E
+S3152000ACD07F6448787C1B23783D20002880098100EA
+S3152000ACE0700900024182003C3D20002880099B8C8F
+S3152000ACF02C8000004186002C3C60002738632E0CF7
+S3152000AD007F64DB7838A0000238C000037C0803A6E5
+S3152000AD1038E0000439000005392000064E80002165
+S3152000AD20801F07202C8000004086000C387E000201
+S3152000AD3048000014801F07207C0803A6387E0002E6
+S3152000AD404E8000217F60DB78B0030000801F072043
+S3152000AD502C80000041860018801F07207C0803A64F
+S3152000AD607FC3F3784E800021480000087FC3F37824
+S3152000AD7063A08C00B00300003817FFFF5417063E6F
+S3152000AD802C9700008339000C4086FDCC801F0720BD
+S3152000AD902C80000040860010801F02B030600E54C8
+S3152000ADA048000018807F02B0801F07207C0803A679
+S3152000ADB038630E544E8000213C00010090030000B1
+S3152000ADC07C0006AC7C0004AC2C9600014086001466
+S3152000ADD0801F01D430000001901F01D448000014C8
+S3152000ADE0387F00843880000338A00001480285DDC2
+S3152000ADF038600000800100347C0803A682C1000868
+S3152000AE0082E1000C83010010832100148341001885
+S3152000AE108361001C8381002083A1002483C1002834
+S3152000AE2083E1002C382100304E8000209421FFE061
+S3152000AE307C0802A6934100089361000C93810010C0
+S3152000AE4093A1001493C1001893E1001C90010024E3
+S3152000AE503D200028800981007C7F1B787009000234
+S3152000AE607C9B237854BE063E54DA043E4182003C45
+S3152000AE703D20002880099B8C2C8000004186002CD8
+S3152000AE803C60002738632DD03880000138A00002AE
+S3152000AE9038C000037C0803A638E00004390000050A
+S3152000AEA0392000064E800021807F02A8809F073827
+S3152000AEB0480382D57C7D1B79418200247FE3FB7881
+S3152000AEC07FC4F37848000B817C7E1B79408200206A
+S3152000AED0807F02A87FA4EB784803814D38000001CB
+S3152000AEE0901F02E43860FFFF480001B47F40D3780A
+S3152000AEF0B01E000238000001B01E000893BE0004F8
+S3152000AF007F63DB787FA4EB7838A00000480384BDFC
+S3152000AF107C7C1B787F63DB78480381912C9C003BEB
+S3152000AF20817F07287C000026540037FE7C0000D055
+S3152000AF307C0900F82C8B0000552906BA7F80003842
+S3152000AF407C1C4B784186001C801F07287C0803A6A2
+S3152000AF50386000017FA4EB787F85E3784E8000215E
+S3152000AF6083DE0010801F07202C8000004086000C06
+S3152000AF703B7E000448000018801F07207C0803A69B
+S3152000AF80387E00044E8000217C7B1B78801F0720A2
+S3152000AF902C80000041860018801F07207C0803A60D
+S3152000AFA07FA3EB784E800021480000087FA3EB7832
+S3152000AFB0907B0000801F07202C8000004086000C1C
+S3152000AFC0387E000248000014801F07207C0803A654
+S3152000AFD0387E00024E8000217F80E378B003000097
+S3152000AFE0801F07202C80000041860018801F072024
+S3152000AFF07C0803A67FC3F3784E8000214800000812
+S3152000B0007FC3F378A3A30000801F07202C800000B5
+S3152000B01041860018801F07207C0803A67FC3F3788B
+S3152000B0204E800021480000087FC3F37863A08C007F
+S3152000B030B0030000801F07202C80000040860010EF
+S3152000B040801F02B030600E5448000018807F02B086
+S3152000B050801F07207C0803A638630E544E800021EB
+S3152000B0603C000100900300007C0006AC7C0004AC90
+S3152000B0702C9A000140860014801F01D43000000164
+S3152000B080901F01D448000014387F008438800003C4
+S3152000B09038A0000148028335386000008001002472
+S3152000B0A07C0803A6834100088361000C838100107D
+S3152000B0B083A1001483C1001883E1001C38210020DD
+S3152000B0C04E8000209421FFE87C0802A693A1000C64
+S3152000B0D093C1001093E100149001001C3D2000282C
+S3152000B0E080098100700900027C7F1B787C9D237873
+S3152000B0F054BE043E4182003C3D20002880099B8CA2
+S3152000B1002C8000004186002C3C60002738632DD01F
+S3152000B1103880000138A0000238C000037C0803A64E
+S3152000B12038E0000439000005392000064E80002151
+S3152000B130807F00783880FFFF480197FD881F04EC48
+S3152000B1407009000840820088A01F02E02C800000C1
+S3152000B1504186007C7FE3FB787FA4EB787FC5F3787C
+S3152000B16038C0000138E000024800009D2C83FFFF14
+S3152000B1704186005C807F0078480196613D2000284A
+S3152000B18080098100700900024182003C3D20002890
+S3152000B19080099B8C2C8000004186002C3C60002777
+S3152000B1A038632DE03880000138A0000238C0000343
+S3152000B1B07C0803A638E00004390000053920000683
+S3152000B1C04E8000213860000048000020387F00842F
+S3152000B1D03880000238A00001480281F1807F007883
+S3152000B1E0480195F93860FFFE8001001C7C0803A603
+S3152000B1F083A1000C83C1001083E1001438210018BC
+S3152000B2004E8000209421FFE07C0802A6934100088E
+S3152000B2109361000C9381001093A1001493C1001830
+S3152000B22093E1001C900100247C7F1B783D200028A0
+S3152000B230800981007C9B23787009000254BC043E5F
+S3152000B24054DE063E54FA043E4182003C3D2000284E
+S3152000B25080099B8C2C8000004186002C3C600027B6
+S3152000B26038632DD03880000138A0000238C0000392
+S3152000B2707C0803A638E000043900000539200006C2
+S3152000B2804E800021807F02A8809F073848037EF9E0
+S3152000B2907C7D1B79418200247FE3FB787FC4F37891
+S3152000B2A0480007A57C7E1B7940820020807F02A86B
+S3152000B2B07FA4EB7848037D7138000001901F02E4DB
+S3152000B2C03860FFFF480001A87F40D378B01E0002F7
+S3152000B2D038000001B01E000893BE00047FA3EB785F
+S3152000B2E07F64DB787F85E378480083192C9C003BBC
+S3152000B2F0817F07287C000026540037FE7C0000D082
+S3152000B3007C0900F82C8B0000552906BA7F8000386E
+S3152000B3107C1C4B784186001C801F07287C0803A6CE
+S3152000B320386000017FA4EB787F85E3784E8000218A
+S3152000B33083DE0010801F07202C8000004086000C32
+S3152000B3403B7E000448000018801F07207C0803A6C7
+S3152000B350387E00044E8000217C7B1B78801F0720CE
+S3152000B3602C80000041860018801F07207C0803A639
+S3152000B3707FA3EB784E800021480000087FA3EB785E
+S3152000B380907B0000801F07202C8000004086000C48
+S3152000B390387E000248000014801F07207C0803A680
+S3152000B3A0387E00024E8000217F80E378B0030000C3
+S3152000B3B0801F07202C80000041860018801F072050
+S3152000B3C07C0803A67FC3F3784E800021480000083E
+S3152000B3D07FC3F378A3A30000801F07202C800000E2
+S3152000B3E041860018801F07207C0803A67FC3F378B8
+S3152000B3F04E800021480000087FC3F37863A08C00AC
+S3152000B400B0030000801F07202C800000408600101B
+S3152000B410801F02B030600E5448000018807F02B0B2
+S3152000B420801F07207C0803A638630E544E80002117
+S3152000B4303C000100900300007C0006AC7C0004ACBC
+S3152000B4402C9A000140860014801F01D43000000190
+S3152000B450901F01D448000014387F008438800003F0
+S3152000B46038A0000148027F65386000008001002472
+S3152000B4707C0803A6834100088361000C83810010A9
+S3152000B48083A1001483C1001883E1001C3821002009
+S3152000B4904E8000209421FFE87C0802A693A1000C90
+S3152000B4A093C1001093E100149001001C3860000144
+S3152000B4B038800001480184F93D20002890699A646B
+S3152000B4C03BC000003D2000283BA9CAD038600014AC
+S3152000B4D048015FC157DF103A7C7FE92E7C1FE82E9A
+S3152000B4E02C800000408600303C60002738632E28E0
+S3152000B4F0480110CD341EFFFF41800094541F103A9E
+S3152000B5007C7FE82E48015FB937FFFFFC4080FFF4BF
+S3152000B5104800007C388000003BDE00017C7FE82E5E
+S3152000B52038A00014480081252C9E00317D3FE82E4E
+S3152000B53038001234B00900104085FF943D200028C1
+S3152000B540380000019009817C3D2000283800000049
+S3152000B55090099A503D20002890099A683D2000289D
+S3152000B56090099A703D20002890099A583D2000287D
+S3152000B57090099A743D20002890099A543D2000286D
+S3152000B58090099A6C3D20002890099A5C8001001C45
+S3152000B5907C0803A683A1000C83C1001083E100145C
+S3152000B5A0382100184E8000203D20002880699A60AE
+S3152000B5B04E8000209421FFE87C0802A693A1000C6F
+S3152000B5C093C1001093E100149001001C3D20002837
+S3152000B5D08009817C2C8000007C9E23787CBD2B7882
+S3152000B5E0547F043E418600843D20002880699A6469
+S3152000B5F03880FFFF48019341394000003D20002854
+S3152000B6003909CAD038E000017FE3FB7838C012340C
+S3152000B610554B103A7D2B402E8009000C2C800000C3
+S3152000B620408600307D2B402E90E9000C7D2B402E4D
+S3152000B630B06900087D2B402E93C900007D2B402E3B
+S3152000B64093A900047D2B402EB0C90010480000109D
+S3152000B650394A00012C8A00314085FFB83D20002858
+S3152000B66080699A64480191758001001C7C0803A6B4
+S3152000B67083A1000C83C1001083E100143821001837
+S3152000B6804E8000209421FFF07C0802A693C100087A
+S3152000B69093E1000C900100143D2000288009817C54
+S3152000B6A02C8000007C9E2378547F043E4086002414
+S3152000B6B0480000787D405378B01E00003D200028C9
+S3152000B6C080699A644801911538600001480000603D
+S3152000B6D03D20002880699A643880FFFF48019259EE
+S3152000B6E0394000003D2000283909CAD0554B103A70
+S3152000B6F07D2B402E8009000C2C80000140860014F2
+S3152000B7007D2B402EA00900087C80F8004186FFA8EA
+S3152000B710394A00012C8A00314085FFD43D2000287B
+S3152000B72080699A64480190B5386000008001001451
+S3152000B7307C0803A683C1000883E1000C3821001091
+S3152000B7404E8000209421FFE07C0802A693A10014DD
+S3152000B75093C1001893E1001C900100247C7F1B7884
+S3152000B7607C9D23783BC00000394000643D60002862
+S3152000B7703D2000288129817C800B9A502C8900004D
+S3152000B780B141000830000001900B9A504086000C11
+S3152000B790386000004800015C881F00172C800011CB
+S3152000B7A04186001C3D20002880099A5C38600000F4
+S3152000B7B03000000190099A5C48000138881F002A51
+S3152000B7C02C8000804186001C3D20002880099A6C30
+S3152000B7D0386000003000000190099A6C480001147E
+S3152000B7E0A01F0026288000354085001C3D2000280B
+S3152000B7F080099A54386000003000000190099A545C
+S3152000B800480000F0A07F0024388100084BFFFE7915
+S3152000B8102C830000418600D8381DFFD628800031B1
+S3152000B8203D400028900A9A70390A9A704185009006
+S3152000B830A001000828800031418500843D20002891
+S3152000B8403BC9CAD0540B103A7D2BF02EA00900100C
+S3152000B8502C801234418600243C60002738632E5801
+S3152000B86048010D5D3D20002880099A7430000001B2
+S3152000B87090099A74480000487D2BF02EA0080002FB
+S3152000B88081290004B0090000A00100085400103AE4
+S3152000B8907D3E002E389F002A8069000480AA9A7077
+S3152000B8A03863000248007D5DA00100085400103A6C
+S3152000B8B07D3E002E8069000048018F213D600028D2
+S3152000B8C03D200028800B9A6881299A707C80484008
+S3152000B8D040840008912B9A683D20002880099A58B8
+S3152000B8E03BC000013000000190099A587FC3F378CD
+S3152000B8F0800100247C0803A683A1001483C10018BC
+S3152000B90083E1001C382100204E8000209421FFF87E
+S3152000B9107C0802A69001000C3C60002738632E7834
+S3152000B92048010C9D3D20002880899A503D20002802
+S3152000B93080A99A583D2000283C60002780C99A6833
+S3152000B94038632EDC48010C793D20002880899A5CDA
+S3152000B9503D20002880A99A6C3D20002880C99A5451
+S3152000B9603D2000283C60002780E99A7438632F2CFC
+S3152000B97048010C4D3C60002738632F9448010C4148
+S3152000B9808001000C7C0803A6382100084E80002088
+S3152000B9909421FFF87C0802A69001000C2C8300005D
+S3152000B9A07C691B78408600543D2000288009810050
+S3152000B9B0700900024182003C3D20002880099B8CB2
+S3152000B9C02C8000004186002C3C60002738632FF82D
+S3152000B9D03880000038A0000038C000007C0803A68C
+S3152000B9E038E0000039000000392000004E80002198
+S3152000B9F03860FFFF48000040880400003000000146
+S3152000BA009804000088040000812900002C89000089
+S3152000BA104086FFE88123000888090000700900019C
+S3152000BA20380000024182000838000001B0050000FD
+S3152000BA30386000008001000C7C0803A6382100082D
+S3152000BA404E8000209421FFE87C0802A693810008FE
+S3152000BA5093A1000C93C1001093E100149001001CE7
+S3152000BA607C7F1B7838E000007CFE3B78549D063EA8
+S3152000BA70A39F02DC7C87E8405789103A7D29FA1477
+S3152000BA80812902E87FA0EB78B00900004084008875
+S3152000BA907FE3FB78480000C17C631B794082000C61
+S3152000BAA03860000048000090A13F02DCA11F02D6AA
+S3152000BAB0396900017D4B43D65529103A7D29FA1460
+S3152000BAC080E902E838000000906700107D4A41D6E0
+S3152000BAD0900700047D6A5850556B13BA7D6BFA1493
+S3152000BAE0800B02E89007000CA17F02DCA15F02D642
+S3152000BAF0396B00017D2B53D6381E0001541E043E9F
+S3152000BB007C9EE8407D2951D67D695850B17F02DC64
+S3152000BB104184FF80380000009007000C5789103AB6
+S3152000BB20A01F02E07D29FA147C1D0050B01F02E000
+S3152000BB30806902E88001001C7C0803A68381000836
+S3152000BB4083A1000C83C1001083E100143821001862
+S3152000BB504E8000209421FFF07C0802A693C10008A5
+S3152000BB6093E1000C900100147C7F1B78A13F02DC3E
+S3152000BB70817F02D8801F071C2C8000005529183889
+S3152000BB807FCB4A144186001C801F071C7C0803A615
+S3152000BB90386000017FC4F37838A000084E80002169
+S3152000BBA0801F07202C80000041860018801F072058
+S3152000BBB07C0803A67FC3F3784E8000214800000846
+S3152000BBC07FC3F378A00300007009800041820054EF
+S3152000BBD03D20002880098100700900024182003C36
+S3152000BBE03D20002880099B8C2C8000004186002C5B
+S3152000BBF03C600027386330143880000138A00002EA
+S3152000BC0038C000037C0803A638E00004390000058C
+S3152000BC10392000064E8000213860000048000008C8
+S3152000BC207FC3F378800100147C0803A683C1000833
+S3152000BC3083E1000C382100104E8000209421FFE083
+S3152000BC407C0802A6934100089361000C93810010A2
+S3152000BC5093A1001493C1001893E1001C90010024C5
+S3152000BC603D20002880098100700900027C7E1B7817
+S3152000BC703B6000004182003C3D20002880099B8CCF
+S3152000BC802C8000004186002C3C6000273863303031
+S3152000BC903880000138A0000238C000037C0803A6C3
+S3152000BCA038E0000439000005392000064E800021C6
+S3152000BCB0807E00783880FFFF48018C7DA13E02E01F
+S3152000BCC0A01E02D67C890040408402303B800000C2
+S3152000BCD03B5E0084A13E02DE5529103A7D29F214EE
+S3152000BCE083E902E82C9F00007FFDFB78418600381F
+S3152000BCF0809F00107FC3F378480002792C830002CE
+S3152000BD0040860010807E007848018AD14800023C97
+S3152000BD102C8300044186003483FF000C2C9F0000F6
+S3152000BD204086FFD0A01D00082C80000240860024FB
+S3152000BD30801D00042C80000041860018807D0004B0
+S3152000BD4048037369480000303B6000014BFFFFD871
+S3152000BD50A01D00082C80000140860020801D0004C4
+S3152000BD602C80000041860014807E02A8809D00045D
+S3152000BD70480372B5939D00042C9B00014086004425
+S3152000BD807F43D3783880000238A000014802763DF0
+S3152000BD90A01D00022C80000140860014801E01D4C4
+S3152000BDA03000FFFF901E01D4480000147F43D37853
+S3152000BDB03880000338A0FFFF480276113B60000060
+S3152000BDC07FBFEB79418200AC809F0010A01E02DE6F
+S3152000BDD0A13E02D63929FFFF7C80480040860034E8
+S3152000BDE0801E07202C80000041860018801E072018
+S3152000BDF07C0803A67C8323784E8000214800000817
+S3152000BE007C83237838002000B00300004800002CF3
+S3152000BE10801E07202C80000041860018801E0720E7
+S3152000BE207C0803A67C8323784E80002148000008E6
+S3152000BE307C832378B3830000A01E02E0300000013B
+S3152000BE40B01E02E0A01E02E0A13E02DEA17E02D6C6
+S3152000BE50392900017C095BD67C0059D67D204850C3
+S3152000BE60B13E02DE83FF000C2C9F00004086FF5C63
+S3152000BE70801E02E42C800000418600703D200028B0
+S3152000BE8080098100700900024182003C3D20002883
+S3152000BE9080099B8C2C8000004186002C3C6000276A
+S3152000BEA0386330403880000038A0000038C00000D9
+S3152000BEB07C0803A638E00000390000003920000085
+S3152000BEC04E8000213C60002438631B547FC4F378E5
+S3152000BED038A0000038C0000038E00000390000001B
+S3152000BEE048037BFD939E02E4A01E02E0A13E02D6FB
+S3152000BEF07C8048404184FDE0807E0078480188DDD2
+S3152000BF003D20002880098100700900024182003C02
+S3152000BF103D20002880099B8C2C8000004186002C27
+S3152000BF203C600027386330503880000138A000027A
+S3152000BF3038C000037C0803A638E000043900000559
+S3152000BF40392000064E800021800100247C0803A6AB
+S3152000BF50834100088361000C8381001083A10014B3
+S3152000BF6083C1001883E1001C382100204E80002068
+S3152000BF709421FFF07C0802A693C1000893E1000CEF
+S3152000BF80900100147C7F1B78801F071C2C800000EA
+S3152000BF907C9E237841860018801F071C7C0803A6F8
+S3152000BFA03860000138A000084E800021801F07203D
+S3152000BFB02C80000041860018801F07207C0803A6DD
+S3152000BFC07FC3F3784E800021480000087FC3F378B2
+S3152000BFD0A3E3000073E080004182000C3860000279
+S3152000BFE04800019C73E000804182005C3D200028CF
+S3152000BFF080098100700900024182003C3D20002812
+S3152000C00080099B8C2C8000004186002C3C600027F8
+S3152000C010386330683880000138A0000238C0000339
+S3152000C0207C0803A638E00004390000053920000604
+S3152000C0304E8000213D20002880098110300000011B
+S3152000C0409009811073E000404182005C3D20002869
+S3152000C05080098100700900024182003C3D200028B1
+S3152000C06080099B8C2C8000004186002C3C60002798
+S3152000C070386330883880000138A0000238C00003B9
+S3152000C0807C0803A638E000043900000539200006A4
+S3152000C0904E8000213D2000288009811C30000001AF
+S3152000C0A09009811C73E000024182005C3D2000283B
+S3152000C0B080098100700900024182003C3D20002851
+S3152000C0C080099B8C2C8000004186002C3C60002738
+S3152000C0D0386330AC3880000138A0000238C0000335
+S3152000C0E07C0803A638E00004390000053920000644
+S3152000C0F04E8000213D200028800981143000000157
+S3152000C1009009811473E000014182005C3D200028E3
+S3152000C11080098100700900024182003C3D200028F0
+S3152000C12080099B8C2C8000004186002C3C600027D7
+S3152000C130386330CC3880000138A0000238C00003B4
+S3152000C1407C0803A638E000043900000539200006E3
+S3152000C1504E8000213D2000288009811830000001F2
+S3152000C1609009811873E000C37C0000D07C00FE702B
+S3152000C1705403077A300000017C63037880010014A1
+S3152000C1807C0803A683C1000883E1000C3821001037
+S3152000C1904E8000209421FFE87C0802A693810008A7
+S3152000C1A093A1000C93C1001093E100149001001C90
+S3152000C1B07C7F1B7883BF02C493BF02D8A01F02D600
+S3152000C1C03BC000007C9E0040408400603B80000015
+S3152000C1D0801F07202C80000041860018801F072022
+S3152000C1E07C0803A67FA3EB784E8000214800000838
+S3152000C1F07FA3EB78B38300003860001438800001F9
+S3152000C2004801437D57C9103A7D29FA14906902E8FE
+S3152000C210381E0001A13F02D6541E043E7C9E484093
+S3152000C2203BBD00084184FFAC801F07202C80000006
+S3152000C2303BBDFFF841860018801F07207C0803A617
+S3152000C2407FA3EB784E800021480000087FA3EB787F
+S3152000C25038002000B0030000807F02A8809F0738A6
+S3152000C26048036F25907F04FC386000008001001C85
+S3152000C2707C0803A68381000883A1000C83C10010DB
+S3152000C28083E10014382100184E8000209421FFE815
+S3152000C2907C0802A693A1000C93C1001093E1001420
+S3152000C2A09001001C3D2000288009810070090001B2
+S3152000C2B07C7F1B783BC000004182003C3D2000284B
+S3152000C2C080099B8C2C8000004186002C3C60002736
+S3152000C2D0386330EC3880000038A0000038C00000F9
+S3152000C2E07C0803A638E00000390000003920000051
+S3152000C2F04E8000217FE3FB78480001017FE3FB7835
+S3152000C3004BFFF93D4801395D801F07202C80000036
+S3152000C3107C7D1B7840860010801F02B030600E4462
+S3152000C32048000018807F02B0801F07207C0803A6E3
+S3152000C33038630E444E80002180630000746008003C
+S3152000C3404182000C77C0080040820014746002000D
+S3152000C3504182001877C00200418200107FA3EB784B
+S3152000C360480139154BFFFF90801F07202C800000C5
+S3152000C37040860010801F02B030600E48480000182A
+S3152000C380807F02B0801F07207C0803A638630E48F2
+S3152000C3904E80002183C30000801F07202C800000D0
+S3152000C3A040860010801F02B030600E4848000018FA
+S3152000C3B0807F02B0801F07207C0803A638630E48C2
+S3152000C3C04E80002167C00A00900300007C0006AC66
+S3152000C3D07C0004AC7FA3EB784801389D8001001CCB
+S3152000C3E07C0803A683A1000C83C1001083E10014FE
+S3152000C3F0382100184E8000209421FFE87C0802A6F0
+S3152000C4009381000893A1000C93C1001093E10014BE
+S3152000C4109001001C3D200028800981007009000140
+S3152000C4207C7F1B784182003C3D20002880099B8C24
+S3152000C4302C8000004186002C3C60002738633100A8
+S3152000C4403880000038A0000038C000007C0803A611
+S3152000C45038E0000039000000392000004E8000211D
+S3152000C460A13F02D4817F02D0801F071C2C800000B0
+S3152000C470552918387FAB4A144186001C801F071C9B
+S3152000C4807C0803A6386000017FA4EB7838A000085A
+S3152000C4904E800021801F07202C8000004186001836
+S3152000C4A0801F07207C0803A67FA3EB784E800021FF
+S3152000C4B0480000087FA3EB78A003000070098000E5
+S3152000C4C0408200884801379D801F07202C8000006D
+S3152000C4D07C7C1B7840860010801F02B030600E44A2
+S3152000C4E048000018807F02B0801F07207C0803A622
+S3152000C4F038630E444E80002183C30000801F07202E
+S3152000C5002C80000040860010801F02B030600E4450
+S3152000C51048000018807F02B0801F07207C0803A6F1
+S3152000C52038630E444E80002157C001CA9003000094
+S3152000C5307F83E378480137417FE3FB787FA4EB785C
+S3152000C5404800012D4BFFFF1C801F07202C80000078
+S3152000C55040860010801F02B030600E504800001840
+S3152000C560807F02B0801F07207C0803A638630E5008
+S3152000C5704E80002180030000740901004082008063
+S3152000C5803D20002880098100700900014182003C7D
+S3152000C5903D20002880099B8C2C8000004186002CA1
+S3152000C5A03C600027386331183880000038A000002E
+S3152000C5B038C000007C0803A638E0000039000000DF
+S3152000C5C0392000004E800021801F07202C8000008B
+S3152000C5D040860010801F02B030600E5048000018C0
+S3152000C5E0807F02B0801F07207C0803A638630E5088
+S3152000C5F04E8000213C000100900300007C0006AC28
+S3152000C6007C0004AC3D2000288009810070090001CF
+S3152000C6104182003C3D20002880099B8C2C80000014
+S3152000C6204186002C3C6000273863313C388000006E
+S3152000C63038A0000038C000007C0803A638E00000BF
+S3152000C64039000000392000004E8000218001001CA6
+S3152000C6507C0803A68381000883A1000C83C10010F7
+S3152000C66083E10014382100184E8000209421FFE039
+S3152000C6707C0802A6934100089361000C9381001068
+S3152000C68093A1001493C1001893E1001C900100248B
+S3152000C6903D20002880098100700900017C7F1B78DD
+S3152000C6A07C9E23783B6000004182003C3D20002890
+S3152000C6B080099B8C2C8000004186002C3C60002742
+S3152000C6C03863315CA09F02D438A0000038C0000037
+S3152000C6D07C0803A638E0000039000000392000005D
+S3152000C6E04E800021801F07202C80000041860018E4
+S3152000C6F0801F07207C0803A67FC3F3784E80002185
+S3152000C700480000087FC3F378A3A3000073A0003776
+S3152000C710418202403D2000288009810070090001E5
+S3152000C7204182003C3D20002880099B8C2C80000003
+S3152000C7304186002C3C600027386331783880000120
+S3152000C74038A0000238C000037C0803A638E00004A5
+S3152000C75039000005392000064E800021387F0084EC
+S3152000C7603880000038A0000148026C6173A00020C8
+S3152000C7704182005C3D20002880098100700900016B
+S3152000C7804182003C3D20002880099B8C2C800000A3
+S3152000C7904186002C3C6000273863319038800001A8
+S3152000C7A038A0000238C000037C0803A638E0000445
+S3152000C7B039000005392000064E8000213D20002842
+S3152000C7C080098120300000019009812073A000108B
+S3152000C7D04182005C3D20002880098100700900010B
+S3152000C7E04182003C3D20002880099B8C2C80000043
+S3152000C7F04186002C3C600027386331B03880000128
+S3152000C80038A0000238C000037C0803A638E00004E4
+S3152000C81039000005392000064E8000213D200028E1
+S3152000C82080098124300000019009812473A000042E
+S3152000C8304182005C3D2000288009810070090001AA
+S3152000C8404182003C3D20002880099B8C2C800000E2
+S3152000C8504186002C3C600027386331CC38800001AB
+S3152000C86038A0000238C000037C0803A638E0000484
+S3152000C87039000005392000064E8000213D20002881
+S3152000C88080098128300000019009812873A00002C8
+S3152000C8904182005C3D20002880098100700900014A
+S3152000C8A04182003C3D20002880099B8C2C80000082
+S3152000C8B04186002C3C600027386331E8388000012F
+S3152000C8C038A0000238C000037C0803A638E0000424
+S3152000C8D039000005392000064E8000213D20002821
+S3152000C8E08009812C300000019009812C73A0000161
+S3152000C8F0418203483D2000288009810070090001FB
+S3152000C9004182003C3D20002880099B8C2C80000021
+S3152000C9104186002C3C6000273863320438800001B1
+S3152000C92038A0000238C000037C0803A638E00004C3
+S3152000C93039000005392000064E8000213D200028C0
+S3152000C940800981303000000190098130480002ECD6
+S3152000C950801F07202C8000004086000C387E0002B5
+S3152000C96048000014801F07207C0803A6387E00029A
+S3152000C9704E800021A3430000289A003B41850020D9
+S3152000C9807FE3FB783D200028800981347F64DB78B3
+S3152000C9903000000190098134480002A8801F07203A
+S3152000C9A02C800000381AFFFC541D04BE4086000C63
+S3152000C9B0387E000448000014801F07207C0803A648
+S3152000C9C0387E00044E80002180630000801F0724EB
+S3152000C9D02C80000041860010801F07247C0803A6B7
+S3152000C9E04E8000217C7C1B78801F072C2C80000029
+S3152000C9F04186001C801F072C7C0803A63860000196
+S3152000CA007F84E3787FA5EB784E8000217F83E378CF
+S3152000CA107FA4EB784BFFED312C830000418600206C
+S3152000CA207FE3FB783D200028800981347F64DB7812
+S3152000CA303000000190098134480002083880000146
+S3152000CA40807F02A838A00001480366A17C7E1B785F
+S3152000CA50807F02A8809F07384803672D7C7B1B7840
+S3152000CA60807F02A838800001480366D1201E00007E
+S3152000CA707D20F114217B00007C0BD9147D2B0379BA
+S3152000CA807C7D1B784082000C2C9D00004086006037
+S3152000CA903D6000283D20002881298100800B8138B7
+S3152000CAA0712A000130000001900B8138418201502B
+S3152000CAB03D20002880099B8C2C8000004186014067
+S3152000CAC03C600027386332243880000038A00000FC
+S3152000CAD038C000007C0803A638E0000039000000BA
+S3152000CAE0392000004E800021480001147FA3EB78F6
+S3152000CAF038A0060038C0000038E00000A13F02D46C
+S3152000CB00390000005529103A7D29FA14808905003C
+S3152000CB1039200000480367E52C830000418600E0A9
+S3152000CB207FC3F3787FA4EB78480368192C83000031
+S3152000CB30418600CC881E001160000002981E00115C
+S3152000CB40939E0008381AFFFC5400049E901E000C89
+S3152000CB50801E000C901E0018881C00007009000121
+S3152000CB6041820014801F01BC30000001901F01BCCF
+S3152000CB7048000014387F00843880000138A0000166
+S3152000CB80480268497FE3FB787F64DB78480000E150
+S3152000CB90801F00682C800000418600187FE3FB7808
+S3152000CBA0800300687C0803A67FC4F3784E800021AA
+S3152000CBB03D200028800981007009000141820088FB
+S3152000CBC03D20002880099B8C2C800000418600781F
+S3152000CBD03C600027386332403880000038A00000CF
+S3152000CBE038C000007C0803A638E0000039000000A9
+S3152000CBF0392000004E8000214800004C2C9E000069
+S3152000CC0041860010807F02A87FC4F3784803638999
+S3152000CC102C9D000041860010807F02A87FA4EB781F
+S3152000CC20480363B92C9B000041860010807F02A830
+S3152000CC307F64DB78480363F17FE3FB787F64DB78EE
+S3152000CC404800002D800100247C0803A683410008AB
+S3152000CC508361000C8381001083A1001483C1001816
+S3152000CC6083E1001C382100204E8000209421FFE81B
+S3152000CC707C0802A69381000893A1000C93C10010A2
+S3152000CC8093E100149001001C7C7F1B78A01F02D426
+S3152000CC907C842379813F02D0540018387FC902143E
+S3152000CCA04182006CA13F02D45529103A7D29FA14FD
+S3152000CCB090890500801F07202C8000003804000F73
+S3152000CCC0541C00364086000C3BBE00044800001869
+S3152000CCD0801F07207C0803A6387E00044E80002192
+S3152000CCE07C7D1B78801F07202C8000004186001841
+S3152000CCF0801F07207C0803A67F83E3784E800021CF
+S3152000CD00480000087F83E378907D0000801F07207D
+S3152000CD102C8000004086000C387E0002480000145B
+S3152000CD20801F07207C0803A6387E00024E80002143
+S3152000CD3038000000B0030000A13F02D4A01F02CC9F
+S3152000CD403000FFFF7C89000040860030801F0720CE
+S3152000CD502C80000041860018801F07207C0803A62F
+S3152000CD607FC3F3784E800021480000087FC3F37804
+S3152000CD703800A0004800002C801F07202C800000CF
+S3152000CD8041860018801F07207C0803A67FC3F378FE
+S3152000CD904E800021480000087FC3F37838008000C9
+S3152000CDA0B0030000A15F02D4A11F02CC394A0001C2
+S3152000CDB07D6A43D63D200028800981007009000144
+S3152000CDC07D6B41D67D4B5050B15F02D44182003CF1
+S3152000CDD03D20002880099B8C2C8000004186002C59
+S3152000CDE03C6000273863325C3880000038A00000A1
+S3152000CDF038C000007C0803A638E000003900000097
+S3152000CE00392000004E8000218001001C7C0803A6EA
+S3152000CE108381000883A1000C83C1001083E10014E4
+S3152000CE20382100184E8000209421FFE07C0802A6BD
+S3152000CE309361000C9381001093A1001493C10018F4
+S3152000CE4093E1001C900100247C7F1B78A01F02D652
+S3152000CE50813F02C4540018387FC9021493DF02D0E0
+S3152000CE60A01F02CC3B6000007C9B0040408400EC6D
+S3152000CE70807F02A8809F07384803630D7C7D1B793D
+S3152000CE80418200FC801F07202C800000418600186C
+S3152000CE90801F07207C0803A67FC3F3784E800021DD
+S3152000CEA0480000087FC3F37838008000B0030000F4
+S3152000CEB0801F07202C8000004086000C387E000250
+S3152000CEC048000014801F07207C0803A6387E000235
+S3152000CED04E80002138000000B00300005769103A48
+S3152000CEE07D29FA1493A90500801F07202C800000B5
+S3152000CEF0381D000F541C00364086000C3BBE000433
+S3152000CF0048000018801F07207C0803A6387E0004EE
+S3152000CF104E8000217C7D1B78801F07202C800000FE
+S3152000CF2041860018801F07207C0803A67F83E378AC
+S3152000CF304E800021480000087F83E378907D000022
+S3152000CF40381B0001A13F02CC541B043E7C9B484069
+S3152000CF503BDE00084184FF1C801F07202C80000038
+S3152000CF603BDEFFF841860020801F07207C0803A6B1
+S3152000CF707FC3F3784E800021480000103860FFFF01
+S3152000CF80480000147FC3F3783800A000B0030000E7
+S3152000CF9038600000800100247C0803A68361000C11
+S3152000CFA08381001083A1001483C1001883E1001C33
+S3152000CFB0382100204E8000209421FFF07C0802A614
+S3152000CFC093C1000893E1000C900100147C7E1B782D
+S3152000CFD0801E02D0A01E02CC3BE000007C9F0040B9
+S3152000CFE04084003857E0103A7D20F214800905006D
+S3152000CFF02C80000041860010807E02A880890500D2
+S3152000D00048036025381F0001A13E02CC541F043E70
+S3152000D0107C9F48404184FFD0801E04FC2C80000069
+S3152000D02041860010807E02A8809E04FC48035FF99A
+S3152000D03038600000800100147C0803A683C1000824
+S3152000D04083E1000C382100104E8000209421FFE857
+S3152000D0507C0802A693C1001093E100149001001CE5
+S3152000D0607C7F1B78801F04E8700900803BC000008D
+S3152000D07093C1000893C1000C418200503D20002836
+S3152000D08080098100700900803FC080004182003CF9
+S3152000D0903D20002880099B8C2C8000004186002C96
+S3152000D0A03C600027386332783880000038A00000C2
+S3152000D0B038C000007C0803A638E0000039000000D4
+S3152000D0C0392000004E800021801F07202C80000080
+S3152000D0D067DE7AC040860010801F02B030600E489E
+S3152000D0E048000018807F02B0801F07207C0803A616
+S3152000D0F038630E484E80002193C3000093DF04F866
+S3152000D100801F07202C80000040860010801F02B060
+S3152000D11030600E4448000018807F02B0801F072030
+S3152000D1207C0803A638630E444E8000213C00FFC0D5
+S3152000D13090030000801F07202C80000040860010EE
+S3152000D140801F02B030600E4C48000018807F02B06D
+S3152000D150801F07207C0803A638630E4C4E800021D2
+S3152000D160801F02B85400E80490030000801F02BC10
+S3152000D1702C80FFFF41860038801F07202C8000006E
+S3152000D18040860010801F02B030600EEC4800001868
+S3152000D190807F02B0801F07207C0803A638630EEC30
+S3152000D1A04E800021801F02BC90030000801F02C019
+S3152000D1B02C80FFFF41860038801F07202C8000002E
+S3152000D1C040860010801F02B030600ED04800001844
+S3152000D1D0807F02B0801F07207C0803A638630ED00C
+S3152000D1E04E800021801F02C0900300007FE3FB7861
+S3152000D1F03881000838A1000C4800066D2C830000F9
+S3152000D2004186000C3860FFFF48000228801F072057
+S3152000D2102C80000040860010801F02B030600E0077
+S3152000D22048000018807F02B0801F07207C0803A6D4
+S3152000D23038630E004E800021800100089003000014
+S3152000D240801F07202C80000040860010801F02B01F
+S3152000D25030600E0448000018807F02B0801F07202F
+S3152000D2607C0803A638630E044E8000218001000C42
+S3152000D2703D20002890030000800981982C80000022
+S3152000D28041860074801F07202C8000003800000093
+S3152000D2909009819840860010801F02B030600E0CE5
+S3152000D2A048000018807F02B0801F07207C0803A654
+S3152000D2B038630E0C4E8000213800000090030000D9
+S3152000D2C0801F07202C80000040860010801F02B09F
+S3152000D2D030600E0848000018807F02B0801F0720AB
+S3152000D2E07C0803A638630E084E8000213800000013
+S3152000D2F090030000801F07202C800000408600102D
+S3152000D300801F02B030600E8448000018807F02B073
+S3152000D310801F07207C0803A638630E844E800021D8
+S3152000D3203800001490030000801F07202C80000086
+S3152000D33040860010801F02B030600E18480000188A
+S3152000D340807F02B0801F07207C0803A638630E1852
+S3152000D3504E800021380005F090030000801F072032
+S3152000D3602C80000040860010801F02B030600E1016
+S3152000D37048000018807F02B0801F07207C0803A683
+S3152000D38038630E104E800021801F02D090030000CB
+S3152000D390801F07202C80000040860010801F02B0CE
+S3152000D3A030600E1448000018807F02B0801F0720CE
+S3152000D3B07C0803A638630E144E800021801F02D8F5
+S3152000D3C090030000801F07202C800000408600105C
+S3152000D3D0801F02B030600F3448000018807F02B0F2
+S3152000D3E0801F07207C0803A638630F344E80002157
+S3152000D3F03C00780090030000801F07202C8000004E
+S3152000D40040860010801F02B030600F484800001888
+S3152000D410807F02B0801F07207C0803A638630F4850
+S3152000D4204E8000213800060090030000386000007E
+S3152000D4308001001C7C0803A683C1001083E1001430
+S3152000D440382100184E8000209421FFE87C0802A68F
+S3152000D45093E100149001001C7C7F1B783881000822
+S3152000D460480000E12C83FFFF41860050801F0720E3
+S3152000D4702C80000040860010801F02B031200F440F
+S3152000D4804800001C807F02B0801F07207C0803A66E
+S3152000D49038630F444E8000217C691B787FE3FB783C
+S3152000D4A0800100083881000C900900004800029D88
+S3152000D4B02C83FFFF4086000C3860FFFF4800007079
+S3152000D4C0801F07202C80000040860010801F02B09D
+S3152000D4D030600F8448000018807F02B0801F07202C
+S3152000D4E07C0803A638630F844E8000218001000C3F
+S3152000D4F090030000801F07202C800000408600102B
+S3152000D500801F02B030600E8448000018807F02B071
+S3152000D510801F07207C0803A638630E844E800021D6
+S3152000D5203800000090030000386000008001001CD5
+S3152000D5307C0803A683E10014382100184E800020C1
+S3152000D5409421FFF07C0802A693C1000893E1000C09
+S3152000D550900100147C7E1B78881E04EC7009002044
+S3152000D5607C9F23784182005C801F00003D2000289C
+S3152000D57060000008901F000080098100700900806B
+S3152000D5804182004C3D20002880099B8C2C80000085
+S3152000D5904186003C3C600027386332A0388000007A
+S3152000D5A038A0000038C000007C0803A638E0000040
+S3152000D5B039000000392000004E800021480000106C
+S3152000D5C0801F000054000776901F0000813E073C14
+S3152000D5D080090014700901004182005C801F000050
+S3152000D5E03D200028540007FA901F00008009810082
+S3152000D5F0700900804182004C3D20002880099B8CC8
+S3152000D6002C8000004186003C3C600027386332CCE9
+S3152000D6103880000038A0000038C000007C0803A62F
+S3152000D62038E0000039000000392000004E8000213B
+S3152000D63048000010801F000060000002901F0000BC
+S3152000D640801E04E8700902004182005C801F0000F1
+S3152000D6503D200028540007B8901F00008009810053
+S3152000D660700900804182004C3D20002880099B8C57
+S3152000D6702C8000004186003C3C600027386332F451
+S3152000D6803880000038A0000038C000007C0803A6BF
+S3152000D69038E0000039000000392000004E800021CB
+S3152000D6A048000010801F000060000004901F00004A
+S3152000D6B0801E04E87009040041820068801F000073
+S3152000D6C060000001901F0000801F00003D20002800
+S3152000D6D0540007FA901F000080098100700900801D
+S3152000D6E04182004C3D20002880099B8C2C80000024
+S3152000D6F04186003C3C600027386333203880000098
+S3152000D70038A0000038C000007C0803A638E00000DE
+S3152000D71039000000392000004E800021480000100A
+S3152000D720801F0000540007FA901F00003860000098
+S3152000D730800100147C0803A683C1000883E1000C45
+S3152000D740382100104E8000209421FFF07C0802A68C
+S3152000D75093C1000893E1000C900100147C7E1B7895
+S3152000D760801E04E8700900807C9F23784182005C3B
+S3152000D770801F00003D20002860000002901F00004E
+S3152000D78080098100700900804182004C3D200028DC
+S3152000D79080099B8C2C8000004186003C3C60002741
+S3152000D7A0386333483880000038A0000038C00000B5
+S3152000D7B07C0803A638E0000039000000392000006C
+S3152000D7C04E80002148000010801F0000540007FAF8
+S3152000D7D0901F0000813E073C80090014700901005B
+S3152000D7E04182005C801F00003D200028600000046C
+S3152000D7F0901F000080098100700900804182004C42
+S3152000D8003D20002880099B8C2C8000004186003C0E
+S3152000D8103C600027386333743880000038A000004D
+S3152000D82038C000007C0803A638E00000390000005C
+S3152000D830392000004E80002148000010801F000083
+S3152000D840540007B8901F00003860000080010014C3
+S3152000D8507C0803A683C1000883E1000C3821001050
+S3152000D8604E8000208003019890040000A003019CB4
+S3152000D870386000005400801E900500004E80002075
+S3152000D8809421FFD07C0802A69361001C938100207E
+S3152000D89093A1002493C1002893E1002C9001003429
+S3152000D8A07C7F1B783D200028800981007C9D237881
+S3152000D8B0700900207CBE2B783B6000007FFCFB7843
+S3152000D8C04182003C3D20002880099B8C2C80000052
+S3152000D8D04186002C3C6000273863339C7FA5EB787B
+S3152000D8E07FC6F37838E000007C0803A639000000E4
+S3152000D8F0809C02AC392000004E8000213C00800430
+S3152000D9006000690E7C9D0000418603A84185005079
+S3152000D9103C008004600069067C9D00004186009CD6
+S3152000D920418500183C008004600069047C9D00004D
+S3152000D93041860168480004403C0080046000690A72
+S3152000D9407C9D0000418603303C0080046000690B0A
+S3152000D9507C9D0000418603344800041C3C004004A2
+S3152000D960600069057C9D0000418602B04185002843
+S3152000D9703C0080046000690F7C9D0000418603887E
+S3152000D9803C00C0086000690C7C9D000041860310A5
+S3152000D990480003E43C004004600069077C9D0000C9
+S3152000D9A0418600DC3C004004600069107C9D00003C
+S3152000D9B0418603A8480003C02C9E0000418604002F
+S3152000D9C07FC3F37880BF0194389F0198480038BD03
+S3152000D9D07FE3FB784BFFC7ED2C8300004086009841
+S3152000D9E07FE3FB783881000838A1000C4BFFFE79D5
+S3152000D9F02C83000040860080801F07202C8000009A
+S3152000DA0040860010801F02B030600E0048000018CB
+S3152000DA10807F02B0801F07207C0803A638630E0093
+S3152000DA204E8000218001000890030000801F0720FF
+S3152000DA302C80000040860010801F02B031200E048A
+S3152000DA404800001C807F02B0801F07207C0803A6A8
+S3152000DA5038630E044E8000217C691B788001000CFF
+S3152000DA607FE3FB78900900004BFFC3BD2C830000A9
+S3152000DA70418603503860FFFF4800034C2C9E00006F
+S3152000DA804186033C387F019880BF01947FC4F37898
+S3152000DA90480037F94800032C2C9E000040840010D3
+S3152000DAA0801C007C7C00F0384800000C801C007C28
+S3152000DAB07C00F378901C007C3D20002880098100A2
+S3152000DAC0700900204182003C3D20002880099B8C63
+S3152000DAD02C8000004186002C3C600027386333C030
+S3152000DAE038A0000038C0000038E000007C0803A6FB
+S3152000DAF039000000809C007C392000004E800021E7
+S3152000DB008BDF04EC801F007C7009010041820090AD
+S3152000DB10881F04EC60000020981F04EC881F04EC8A
+S3152000DB207C80F00041860084801C007C7009000106
+S3152000DB30418200787FE3FB78801C007C38810010CE
+S3152000DB403960FFBE7C005838901C007C4BFFF9F5ED
+S3152000DB502C83FFFF4186FF20801F07202C8000009A
+S3152000DB6040860010801F02B030600F444800001825
+S3152000DB70807F02B0801F07207C0803A638630F44ED
+S3152000DB804E8000218001001090030000801C007C44
+S3152000DB9060000041901C007C48000010881F04ECA7
+S3152000DBA0700000DF981F04EC801C007C7009800048
+S3152000DBB041820010881F04EC600000404800000CE1
+S3152000DBC0881F04EC700000BF981F04EC3D2000283D
+S3152000DBD08009810070090020418201E83D2000284B
+S3152000DBE080099B8C2C800000418601D83C60002750
+S3152000DBF0386333D07FC5F37838C0000038E00000A2
+S3152000DC007C0803A639000000809C007C3920000097
+S3152000DC104E800021480001AC3D200028800981006B
+S3152000DC20700900204182003C3D20002880099B8C01
+S3152000DC302C8000004186002C3C600027386333E8A6
+S3152000DC4038C0000038E00000390000007C0803A638
+S3152000DC50809C007C80BE0000392000004E80002180
+S3152000DC602C9E000041860158801C007C901E0000DE
+S3152000DC70480001507FE3FB787FC4F37848001821E1
+S3152000DC807C7B1B784800013C7FE3FB787FC4F378DC
+S3152000DC90480018E17C7B1B78480001287FE3FB784D
+S3152000DCA07FC4F378480019C97C7B1B78480001148F
+S3152000DCB03D20002880098100700900044182003C33
+S3152000DCC03D20002880099B8C2C8000004186002C5A
+S3152000DCD03C600027386334003880000038A00000FC
+S3152000DCE038C000007C0803A638E000003900000098
+S3152000DCF0392000004E8000217FE3FB784800243144
+S3152000DD00480000C03D2000288009810070090004D9
+S3152000DD104182003C3D20002880099B8C2C800000FD
+S3152000DD204186002C3C6000273863341C3880000074
+S3152000DD3038A0000038C000007C0803A638E00000A8
+S3152000DD4039000000392000004E8000217FE3FB7857
+S3152000DD50480024D54800006C2C9E000041860060B7
+S3152000DD60387C00847FC4F37838A002044800351D2F
+S3152000DD70480000503D2000288009810070090020BD
+S3152000DD804182003C3D20002880099B8C2C8000008D
+S3152000DD904186002C3C6000273863343838800000E8
+S3152000DDA038A0000038C000007C0803A638E0000038
+S3152000DDB039000000392000004E8000213B6000160B
+S3152000DDC07F63DB78800100347C0803A68361001C16
+S3152000DDD08381002083A1002483C1002883E1002CB5
+S3152000DDE0382100304E8000209421FFE07C0802A6D6
+S3152000DDF09361000C9381001093A1001493C1001825
+S3152000DE0093E1001C900100247C7D1B78813D073C1A
+S3152000DE108B8900112C9C00FF3B600000418600305E
+S3152000DE207F84E378480001812C83FFFF41860150DF
+S3152000DE302C830000408600187FA3EB787F84E3784C
+S3152000DE40480006ED2C83FFFF418601343BC00000CD
+S3152000DE50813D073C892900107D3E4A147D202E7085
+S3152000DE607C000194540028347D204850553F063EBE
+S3152000DE707C9FE0004186004C7FA3EB787FE4FB7813
+S3152000DE80480001252C83FFFF418600F42C8300FFE8
+S3152000DE90418600307FA3EB787FE4FB784800048935
+S3152000DEA02C8300003B600001408600D47FA3EB78E2
+S3152000DEB07FE4FB78480013FD2C8300004186002078
+S3152000DEC0381E0001541E063E289E001F4085FF84F2
+S3152000DED02C9B000040860010480000A438600000FB
+S3152000DEE0480000A03C60002738633450388000008A
+S3152000DEF03BC0000038A0000038C0000038E0000019
+S3152000DF00390000003920000048008E6D813D073C15
+S3152000DF10892900107D3E4A147D202E707C000194B4
+S3152000DF20540028347D204850553F063E7C9FE00013
+S3152000DF304186003C7FA3EB787FE4FB7848000069AC
+S3152000DF402C83FFFF418600382C8300FF418600206A
+S3152000DF507FA3EB787FE4FB78480013592C83FFFFDF
+S3152000DF604186001C2C8300404086FF74381E000129
+S3152000DF70541E063E289E001F4085FF943860FFFFF2
+S3152000DF80800100247C0803A68361000C8381001095
+S3152000DF9083A1001483C1001883E1001C38210020CE
+S3152000DFA04E8000209421FFF07C0802A690010014E8
+S3152000DFB038A0000038C10008480001D52C83000095
+S3152000DFC04186000C3860FFFF4800006C39200000B5
+S3152000DFD0A00100086129FFFF7C8048004086000CD4
+S3152000DFE0386000FF480000503D200028800981004D
+S3152000DFF0700900084182003C3D20002880099B8C46
+S3152000E0002C8000004186002C3C6000273863347841
+S3152000E0103880000038A0000038C000007C0803A625
+S3152000E02038E0000039000000392000004E80002131
+S3152000E03038600000800100147C0803A638210010F7
+S3152000E0404E8000203C0000988123073C600096808B
+S3152000E050900900188123073C380002009009001C13
+S3152000E0608123073C3800000090090014800304E84F
+S3152000E07070090001408200148123073C80090014A6
+S3152000E08060000010480000108123073C800900141E
+S3152000E0905400073490090014800304E87009000234
+S3152000E0A0418200148123073C80090014600000206F
+S3152000E0B0480000108123073C80090014540006F212
+S3152000E0C090090014800304E87009000840820014B7
+S3152000E0D08123073C8009001460000040480000109E
+S3152000E0E08123073C80090014540006B090090014CF
+S3152000E0F0800304E870090004408200148123073C51
+S3152000E1008009001460000100480000108123073CAC
+S3152000E110800900145400062C90090014800304E89A
+S3152000E12070090020408200148123073C80090014D6
+S3152000E13060000080480000108123073C80090014FD
+S3152000E1405400066E90090014800304E8700900103C
+S3152000E150408200148123073C8009001460000200DD
+S3152000E160480000108123073C80090014540005EA6A
+S3152000E170900900148123073C8009001438600000B0
+S3152000E18060000001900900144E8000209421FFE8D1
+S3152000E1907C0802A693A1000C93C1001093E1001401
+S3152000E1A09001001C7C7F1B7854A5919A801F072024
+S3152000E1B05484B8502C80000064A560027C9E2B7885
+S3152000E1C07CDD337840860010801F02B030600E80E0
+S3152000E1D048000018807F02B0801F07207C0803A615
+S3152000E1E038630E804E80002193C30000807F070095
+S3152000E1F03880FFFF48016741801F07202C800000E0
+S3152000E20040860010801F02B030600E804800001843
+S3152000E210807F02B0801F07207C0803A638630E800B
+S3152000E2204E80002183C30000386000007FC0F37851
+S3152000E230B01D00008001001C7C0803A683A1000CF1
+S3152000E24083C1001083E10014382100184E8000207D
+S3152000E2509421FFF07C0802A693C1000893E1000CEC
+S3152000E260900100147C7F1B785488063E54A4063EF9
+S3152000E27054C6043E548B901A3D20002881298100E3
+S3152000E2805500B810712A0008656B50027C005B7837
+S3152000E2907C1E3378418200383D20002880099B8CE3
+S3152000E2A02C800000418600283C600027386334908B
+S3152000E2B07D0543787FC6F3787C0803A638E0000006
+S3152000E2C039000000392000004E800021801F0720E1
+S3152000E2D02C80000040860010801F02B030600E8027
+S3152000E2E048000018807F02B0801F07207C0803A604
+S3152000E2F038630E804E80002193C30000807F070084
+S3152000E3003880FFFF48016631386000008001001424
+S3152000E3107C0803A683C1000883E1000C3821001085
+S3152000E3204E8000209421FFE07C0802A693810010F5
+S3152000E33093A1001493C1001893E1001C90010024BE
+S3152000E3407C7D1B7838008000B0010008549E063E74
+S3152000E3507FC4F37838A0000038C080004BFFFEF55C
+S3152000E3602C8300003B800000408601503BE00001EA
+S3152000E3703860000148019CE97FA3EB787FC4F378DD
+S3152000E3807F85E37838C100084BFFFE052C8300000B
+S3152000E39040860128A00100087009800041820018EB
+S3152000E3A07FE0FB78288000FF30000001541F043EE8
+S3152000E3B04085FFC0289F00FF408500303D20002873
+S3152000E3C08009810070090008418200F03D20002864
+S3152000E3D080099B8C2C800000418600E03C60002751
+S3152000E3E0386334C0480000B47FA3EB787FC4F37849
+S3152000E3F04800013D2C83FFFF418600C03800000005
+S3152000E400B00100087FA3EB787FC4F3787F85E3789B
+S3152000E41038C000004BFFFE3D2C8300004086009C48
+S3152000E4203BE000013860000148019C357FA3EB7872
+S3152000E4307FC4F3787F85E37838C100084BFFFD5110
+S3152000E4402C83000040860074A00100087009040097
+S3152000E450418200187FE0FB78288000FF3000000111
+S3152000E460541F043E4085FFC0289F00FF408500546E
+S3152000E4703D20002880098100700900084182003C67
+S3152000E4803D20002880099B8C2C8000004186002C92
+S3152000E4903C600027386334DC3880000038A0000058
+S3152000E4A038C000007C0803A638E0000039000000D0
+S3152000E4B0392000004E8000213860FFFF48000050C0
+S3152000E4C03D20002880098100700900084182003C17
+S3152000E4D03D20002880099B8C2C8000004186002C42
+S3152000E4E03C600027386334FC3880000038A00000E8
+S3152000E4F038C000007C0803A638E000003900000080
+S3152000E500392000004E800021386000008001002460
+S3152000E5107C0803A68381001083A1001483C1001800
+S3152000E52083E1001C382100204E8000209421FFE04A
+S3152000E5307C0802A69381001093A1001493C10018B1
+S3152000E54093E1001C90010024549E063E2C9E00FF61
+S3152000E5507C7D1B784186011838000400B001000834
+S3152000E5607FA3EB787FC4F37838A0000038C004007E
+S3152000E5704BFFFCE12C8300003B8000004186000C11
+S3152000E5803860FFFF480000EC3BE0000138600001E6
+S3152000E59048019ACD7FA3EB787FC4F3787F85E37813
+S3152000E5A038C100084BFFFBE92C8300004086FFD4CE
+S3152000E5B0A001000870090400408200187FE0FB7863
+S3152000E5C0288000FF30000001541F043E4085FFC014
+S3152000E5D0289F00FF408500503D20002880098100AB
+S3152000E5E0700900084182FF9C3D20002880099B8CF1
+S3152000E5F02C8000004186FF8C3C6000273863351450
+S3152000E6003880000038A0000038C000007C0803A62F
+S3152000E61038E0000039000000392000004E8000213B
+S3152000E6204BFFFF603D20002880098100700900080B
+S3152000E6304182003C3D20002880099B8C2C800000D4
+S3152000E6404186002C3C6000273863352C388000003A
+S3152000E65038A0000038C000007C0803A638E000007F
+S3152000E66039000000392000004E800021386000006B
+S3152000E670800100247C0803A68381001083A1001456
+S3152000E68083C1001883E1001C382100204E80002021
+S3152000E6909421FFE07C0802A693A1001493C10018E0
+S3152000E6A093E1001C900100247C7F1B78549E063E3B
+S3152000E6B07FC4F37838A0000438C100084BFFFAD194
+S3152000E6C02C8300003BA000044086017C3D200028CE
+S3152000E6D080098100700900084182003C3D20002805
+S3152000E6E080099B8C2C8000004186002C3C600027F2
+S3152000E6F038633548A081000838A0000038C00000E3
+S3152000E7007C0803A638E0000039000000392000000C
+S3152000E7104E8000217FE3FB787FC4F378A0C10008F8
+S3152000E7207FA5EB7854C6047EB0C100084BFFFB25BD
+S3152000E7302C830000408601107FE3FB787FC4F378AA
+S3152000E74038A0000638C1000A4BFFFA452C8300008A
+S3152000E750408600F43D2000288009810070090008C9
+S3152000E7604182003C3D20002880099B8C2C800000A3
+S3152000E7704186002C3C60002738633564A081000A5E
+S3152000E78038A0000038C000007C0803A638E000004E
+S3152000E79039000000392000004E8000217FE3FB78FD
+S3152000E7A07FC4F37838A0000438C100084BFFF9E194
+S3152000E7B02C83000040860090813F073CA001000882
+S3152000E7C03BA00000B0090008817F073C800B0014A5
+S3152000E7D070090020418200783D20002739097BD826
+S3152000E7E057AB083C7C0B42AE2C80FFFF418600587D
+S3152000E7F03D200028392980E8A14100087C0B42AE43
+S3152000E800817F073C714AE01F5400083C7C09022E98
+S3152000E810A12B00087D4003787D2B0039B1410008EB
+S3152000E8207C060378B0C100084182015C7FE3FB7857
+S3152000E8307FC4F37838A000044BFFFA192C8300001C
+S3152000E840418600E43860FFFF48000148800B001431
+S3152000E8507009010040820010A00100087000FCBF72
+S3152000E860B0010008813F073C8009001470090200AE
+S3152000E87040820010A00100087000FF5FB001000870
+S3152000E880813F073C80090014700900404082001037
+S3152000E890A00100087000FC7FB0010008813F073C02
+S3152000E8A0800900147009008040820010A001000831
+S3152000E8B07000FF9FB00100087FE3FB787FC4F378E8
+S3152000E8C0A0C1000838A000044BFFF9892C83000062
+S3152000E8D04086FF743D20002880098100A081000821
+S3152000E8E070090008813F073CB08900084182003842
+S3152000E8F03D20002880099B8C2C8000004186002822
+S3152000E9003C6000273863354838A0000038C0000036
+S3152000E9107C0803A638E000003900000039200000FA
+S3152000E9204E8000217FE3FB787FC4F3784800008186
+S3152000E9302C83FFFF4186FF102C8300104086001C8D
+S3152000E940813F073C8009001470090020408200386E
+S3152000E950386000104800003C7FE3FB787FC4F378E2
+S3152000E960480003D12C8300004086000C386000004C
+S3152000E97048000020813F073C8009001470090020D0
+S3152000E9804182FEC4381D0001541D043E4BFFFE3C4F
+S3152000E990800100247C0803A683A1001483C10018EB
+S3152000E9A083E1001C382100204E8000209421FFE0C6
+S3152000E9B07C0802A69381001093A1001493C100182D
+S3152000E9C093E1001C900100247C7E1B78549D063E1A
+S3152000E9D07FA4EB7838A0000138C100084BFFF7B1BF
+S3152000E9E02C8300003BE0000040860124A0010008A3
+S3152000E9F070090008408200503D20002880098100CF
+S3152000EA0070090008418201083D20002880099B8C5E
+S3152000EA102C800000418600F83C600027386335844E
+S3152000EA203880000038A0000038C000007C0803A60B
+S3152000EA3038E0000039000000392000004E80002117
+S3152000EA40480000CC7FC3F3787FA4EB7838A0000081
+S3152000EA5038C012004BFFF7FD2C830000408600B023
+S3152000EA603B800001813E073C38001200B0090002BD
+S3152000EA7038600001480195E97FE0FB782C80010091
+S3152000EA8030000001541F043E4186002C7FC3F378DA
+S3152000EA907FA4EB787F85E37838C100084BFFF6F139
+S3152000EAA02C83000040860068A00100087009002021
+S3152000EAB04182FFC0289F00FF4085005C3D20002842
+S3152000EAC080098100700900084182003C3D20002811
+S3152000EAD080099B8C2C8000004186002C3C600027FE
+S3152000EAE0386335BC3880000038A0000038C00000EC
+S3152000EAF07C0803A638E00000390000003920000019
+S3152000EB004E80002138600010480000583860FFFF12
+S3152000EB10480000503D200028800981007009000827
+S3152000EB204182003C3D20002880099B8C2C800000DF
+S3152000EB304186002C3C600027386335DCA081000824
+S3152000EB4038A0000038C000007C0803A638E000008A
+S3152000EB5039000000392000004E8000213860000076
+S3152000EB60800100247C0803A68381001083A1001461
+S3152000EB7083C1001883E1001C382100204E8000202C
+S3152000EB809421FFE07C0802A693A1001493C10018EB
+S3152000EB9093E1001C900100247C7E1B78549F063E46
+S3152000EBA07FE4FB7838A0000138C100084BFFF5E16F
+S3152000EBB02C8300003BA00001408600ECA001000849
+S3152000EBC070090004408200603860000A4801949170
+S3152000EBD07FC3F3787FE4FB7838A0000138C10008B2
+S3152000EBE04BFFF5AD2C830000408600BCA0810008B9
+S3152000EBF070800004408200303D200028800981007A
+S3152000EC0070090008418200FC3D20002880099B8C69
+S3152000EC102C800000418600EC3C6000273863360CCF
+S3152000EC20480000C43D2000288009810070090008A2
+S3152000EC304182003C3D20002880099B8C2C800000CE
+S3152000EC404186002C3C60002738633638A0810008B6
+S3152000EC5038A0000038C000007C0803A638E0000079
+S3152000EC6039000000392000004E8000217FC3F37850
+S3152000EC707FE4FB787FA5EB7838C100084BFFF511C0
+S3152000EC802C830000408600207FC3F3787FE4FB7846
+S3152000EC907FA5EB7838C100084BFFF4F52C830000E4
+S3152000ECA04186000C3860FFFF4800006CA161000817
+S3152000ECB071600010418200543D20002880098100A7
+S3152000ECC0700900084182003C3D20002880099B8C69
+S3152000ECD02C8000004186002C3C6000273863366C6F
+S3152000ECE03880000038A0000038C000007C0803A649
+S3152000ECF038E0000039000000392000004E80002155
+S3152000ED003860002048000010813E073C3860000033
+S3152000ED10B1690000800100247C0803A683A10014A9
+S3152000ED2083C1001883E1001C382100204E8000207A
+S3152000ED309421FFE07C0802A693A1001493C1001839
+S3152000ED4093E1001C900100247C7E1B78549F063E94
+S3152000ED507FE4FB784BFFFE2D7C631B797FFDFB78E0
+S3152000ED60408203607FC3F3787FE4FB7838A00006F7
+S3152000ED7038C100084BFFF4192C8300004086029806
+S3152000ED80A081000870800010418200303D200028BC
+S3152000ED9080098100700900084182027C3D200028FC
+S3152000EDA080099B8C2C8000004186026C3C600027E9
+S3152000EDB038633690480002447FC3F3787FE4FB78BB
+S3152000EDC038A0000538C1000A4BFFF3C52C8300008C
+S3152000EDD040860244A081000A7080200041820030D3
+S3152000EDE03D20002880098100700900084182022800
+S3152000EDF03D20002880099B8C2C800000418602182B
+S3152000EE003C600027386336C4480001F07FC3F3789E
+S3152000EE107FA4EB7838A0000438C1000C4BFFF371B7
+S3152000EE202C830000408601F0813E073CA081000C27
+S3152000EE30B0890008813E073CA0A1000AB0A9000ABB
+S3152000EE403D200028817E073C80098100A0E1000842
+S3152000EE5070090008B0EB000C7CA02038541F04F485
+S3152000EE60418200303D20002880099B8C2C800000A8
+S3152000EE70418600203C600027386336E87FE6FB7831
+S3152000EE807C0803A639000000392000004E800021AE
+S3152000EE9073E00100418200543D4005F5614AE100DE
+S3152000EEA03D200028817E073C80098100914B001877
+S3152000EEB070090008813E073C380001009009001CBB
+S3152000EEC04182015C3D20002880099B8C2C8000001B
+S3152000EED04186014C3C600027386337343CA000272C
+S3152000EEE038A53758480000C473E0028041820010DC
+S3152000EEF03D4005F5614AE1004800006C73E00040A2
+S3152000EF00418200543D400098614A96803D20002869
+S3152000EF10817E073C80098100914B0018700900080A
+S3152000EF20813E073C380001009009001C418200F018
+S3152000EF303D20002880099B8C2C800000418600E023
+S3152000EF403C600027386337343CA0002738A5375863
+S3152000EF504800005873E00020418200743D4000982C
+S3152000EF60614A96803D200028817E073C80098100E9
+S3152000EF70914B001870090008813E073C38000200BA
+S3152000EF809009001C418200983D20002880099B8C16
+S3152000EF902C800000418600883C6000273863373487
+S3152000EFA03CA0002738A5376438C0000038E00000B0
+S3152000EFB07C0803A6813E073C3900000080890018A2
+S3152000EFC0392000004E800021480000543D200028B2
+S3152000EFD080098100700900084182003C3D200028FC
+S3152000EFE080099B8C2C8000004186002C3C600027E9
+S3152000EFF0386337703880000038A0000038C0000021
+S3152000F0007C0803A638E00000390000003920000003
+S3152000F0104E8000213860FFFF480000A8817E073C13
+S3152000F0203D2005F5800B00186129E1007C80480011
+S3152000F03040860010800B0014600000404800000C41
+S3152000F040800B0014540006B0900B0014807E073C01
+S3152000F0508003001C2C8001004086001080030014D1
+S3152000F060600001004800000C800300145400062CA8
+S3152000F070900300143D2000288009810070090008B3
+S3152000F0804182003C3D20002880099B8C2C8000007A
+S3152000F0904186002C3C600027386337883880000082
+S3152000F0A038A0000038C000007C0803A638E0000025
+S3152000F0B039000000392000004E8000213860000011
+S3152000F0C0800100247C0803A683A1001483C10018B4
+S3152000F0D083E1001C382100204E8000209421FFE887
+S3152000F0E07C0802A693C1001093E100149001001C35
+S3152000F0F03D20002880098100700900087C7F1B784C
+S3152000F100549E063E4182003C3D20002880099B8C6F
+S3152000F1102C8000004186002C3C600027386337A0F5
+S3152000F1203880000038A0000038C000007C0803A604
+S3152000F13038E0000039000000392000004E80002110
+S3152000F1407FE3FB787FC4F37838A0000138C100083C
+S3152000F1504BFFF03D2C83000040860090A001000864
+S3152000F1607009600038C0000041820024817F073C7E
+S3152000F170800B0014700900404182001438C0200022
+S3152000F1803C0005F56000E100900B0018A001000886
+S3152000F1907009D00041820020817F073C800B00143B
+S3152000F1A0700901004182001038000100900B001CFC
+S3152000F1B060C601007FE3FB787FC4F37838A00000A7
+S3152000F1C0813F073CB0C900024BFFF0892C83000029
+S3152000F1D0408600187FE3FB787FC4F3784BFFF9A5C0
+S3152000F1E02C8300004186000C3860FFFF480000ACED
+S3152000F1F0817F073C3D2005F5800B00186129E10041
+S3152000F2007C80480040860010800B0014600000407F
+S3152000F2104800000C800B0014540006B0900B00141C
+S3152000F220813F073C8009001C2C800100408600108D
+S3152000F23080090014600001004800000C80090014B9
+S3152000F2405400062C900900143D20002880098100D6
+S3152000F25070090008418200403D20002880099B8CCF
+S3152000F2602C800000418600303C600027386337B888
+S3152000F27038C0000038E0000039000000817F073CDC
+S3152000F2807C0803A6808B001880AB001C3920000068
+S3152000F2904E800021386000008001001C7C0803A6F7
+S3152000F2A083C1001083E10014382100184E8000200D
+S3152000F2B09421FFE07C0802A693A1001493C10018B4
+S3152000F2C093E1001C900100243D2000288009810044
+S3152000F2D0700900087C7E1B78549D063E4182003CC6
+S3152000F2E03D20002880099B8C2C8000004186002C24
+S3152000F2F03C600027386337E03880000038A00000E3
+S3152000F30038C000007C0803A638E000003900000061
+S3152000F310392000004E8000217FC3F3787FA4EB784C
+S3152000F32038A0000138C10008817E073C3D20002816
+S3152000F330800B0020392980F25400083C7FE9022EF8
+S3152000F3404BFFEE4D2C83000073FFDEFF408600CC82
+S3152000F35073E0200041820024A00100087009E0002B
+S3152000F360418200703C0005F5813E073C6000E100CB
+S3152000F3709009001848000030A00100087009180004
+S3152000F38041820050813E073C800900143D60009870
+S3152000F390540006B090090014813E073C616B9680AC
+S3152000F3A09169001873E001004182001CA001000849
+S3152000F3B07009D0004182001C813E073C38000100C4
+S3152000F3C048000030A0010008700928004082000C87
+S3152000F3D038600040480000AC813E073C800900149C
+S3152000F3E05400062C90090014813E073C3800020088
+S3152000F3F09009001C7FC3F3787FA4EB7838A0000027
+S3152000F400813E073C7FE6FB78B0C900024BFFEE4504
+S3152000F4102C8300004186000C3860FFFF4800006402
+S3152000F4207FC3F3787FA4EB784BFFF7593D20002864
+S3152000F43080098100700900087C7F1B78418200408A
+S3152000F4403D20002880099B8C2C80000041860030BE
+S3152000F4503C600027386337F438C0000038E00000ED
+S3152000F46039000000817E073C7C0803A6808B0018AB
+S3152000F47080AB001C392000004E8000217FE3FB7802
+S3152000F480800100247C0803A683A1001483C10018F0
+S3152000F49083E1001C382100204E8000209421FFF0BB
+S3152000F4A07C0802A693C1000893E1000C9001001489
+S3152000F4B03D20002880098100700900207C7E1B7871
+S3152000F4C07C9F2378418200503D20002880099B8C18
+S3152000F4D02C800000418600403C60002738633818A5
+S3152000F4E07C0803A6889F000088BF000088DF0000F4
+S3152000F4F088FF0000891F0000893F000038A5000111
+S3152000F50038C6000238E70003390800043929000507
+S3152000F5104E800021387E02887FE4FB7848024E59CF
+S3152000F5202C830034408600247FC3F3788003029422
+S3152000F5307FE4FB783000000190030294800302945C
+S3152000F540480001B5480000147C60FE707C031A78E0
+S3152000F5507C6300507C63FE70800100147C0803A647
+S3152000F56083C1000883E1000C382100104E80002062
+S3152000F5709421FFF07C0802A693C1000893E1000CB9
+S3152000F580900100143D200028800981007009002088
+S3152000F5907C7E1B787C9F2378418200503D2000286A
+S3152000F5A080099B8C2C800000418600403C6000270F
+S3152000F5B03863385C7C0803A6889F000088BF00005B
+S3152000F5C088DF000088FF0000891F0000893F0000B7
+S3152000F5D038A5000138C6000238E7000339080004C0
+S3152000F5E0392900054E800021387E02887FE4FB7889
+S3152000F5F048024F397C7F1B782C9F00344086004878
+S3152000F600801E02947FC3F3783000FFFF901E029481
+S3152000F610801E02944BFFABAD2C8300004086002059
+S3152000F6207FC3F378480002557C7F1B787FC3F3782D
+S3152000F6304BFFA7F52C8300004186000C3860FFFFA6
+S3152000F640480000147FE0FE707C03FA787C6300504B
+S3152000F6507C63FE70800100147C0803A683C1000829
+S3152000F66083E1000C382100104E8000209421FFF009
+S3152000F6707C0802A693C1000893E1000C90010014B7
+S3152000F6803D20002880098100700900207C7F1B789E
+S3152000F6907C9E23784182003C3D20002880099B8C5B
+S3152000F6A02C8000004186002C3C600027386338A05F
+S3152000F6B03880000038A0000038C000007C0803A66F
+S3152000F6C038E0000039000000392000004E8000217B
+S3152000F6D0387F02887FC4F37848024F0580010014E2
+S3152000F6E07C0803A683C1000883E1000C38210010A2
+S3152000F6F04E8000209421FFE87C0802A693C10010CA
+S3152000F70093E100149001001C3D200028800981000F
+S3152000F710700900207C7E1B787C9F237841820050D4
+S3152000F7203D20002880099B8C2C80000041860040CB
+S3152000F7303C600027386338B47C0803A6889F000005
+S3152000F74088BF000088DF000088FF0000891F0000B6
+S3152000F750893F000038A5000138C6000238E70003BB
+S3152000F76039080004392900054E8000217FE3FB7803
+S3152000F770480001D17C641B787FC3F37838A1000848
+S3152000F78038C1000C480002ED2C8300004186000C95
+S3152000F7903860FFFF480000CC3D200028800981000A
+S3152000F7A0700900204182003C3D20002880099B8C66
+S3152000F7B02C8000004186002C3C600027386338F4FA
+S3152000F7C08081000838A0000038C000007C0803A60D
+S3152000F7D038E0000039000000392000004E8000216A
+S3152000F7E0801E07202C80000040860014A121000CDA
+S3152000F7F0801E02B07C604A144800001C807E02B045
+S3152000F800813E07207D2803A6A001000C7C630214FC
+S3152000F8104E80002183E30000801E07202C800000FC
+S3152000F82040860014A121000C801E02B07D204A14BF
+S3152000F83048000020807E02B0813E07207D2803A656
+S3152000F840A001000C7C6302144E8000217C691B7889
+S3152000F85080010008386000007FE0037890090000EE
+S3152000F8608001001C7C0803A683C1001083E10014DC
+S3152000F870382100184E8000209421FFE87C0802A63B
+S3152000F88093E100149001001C7C7F1B78801F0720C9
+S3152000F8902C80000040860010801F02B030600E08C9
+S3152000F8A048000018807F02B0801F07207C0803A62E
+S3152000F8B038630E084E8000213800000090030000B7
+S3152000F8C0801F07202C80000040860010801F02B079
+S3152000F8D030600E0C48000018807F02B0801F072081
+S3152000F8E07C0803A638630E0C4E80002138000000E9
+S3152000F8F090030000387F02884800A8857C631B7926
+S3152000F9004082000C3860000048000024386300085C
+S3152000F910480000317C641B787FE3FB7838A100081F
+S3152000F92038C1000C4800014D3860FFFF8001001CE3
+S3152000F9307C0803A683E10014382100184E8000209D
+S3152000F9409421FFF07C0802A693C1000893E1000CE5
+S3152000F950900100143D2000288009810070090020B4
+S3152000F9607C7E1B783BE0FFFF418200503D20002833
+S3152000F97080099B8C2C800000418600403C6000273B
+S3152000F980386339147C0803A6889E000088BE0000D0
+S3152000F99088DE000088FE0000891E0000893E0000E7
+S3152000F9A038A5000138C6000238E7000339080004EC
+S3152000F9B0392900054E80002138E000003CC004C1F2
+S3152000F9C060C61DB77D1E38AE3940000757E90FFEC9
+S3152000F9D057FF083C550007FE7D2902783129FFFF95
+S3152000F9E07D2949107FE032787FEB4838354AFFFF82
+S3152000F9F07C0048787D7F03785508F87E4080FFD0CC
+S3152000FA0038E700012C8700054085FFBC3D200028F3
+S3152000FA1080098100700900204182003C3D20002899
+S3152000FA2080099B8C2C8000004186002C3C6000279E
+S3152000FA30386339507FE4FB7838A0000038C00000D6
+S3152000FA407C0803A638E000003900000039200000B9
+S3152000FA504E8000217FE3FB78800100147C0803A6FA
+S3152000FA6083C1000883E1000C382100104E8000205D
+S3152000FA70548936FE380000012C8400007C00483072
+S3152000FA8090050000386000004CE62B827C000026A2
+S3152000FA90540047FE7C0000D070000E0C60000E085B
+S3152000FAA0B00600004E8000209421FFD87C0802A6D4
+S3152000FAB09321000C93410010936100149381001848
+S3152000FAC093A1001C93C1002093E100249001002CF7
+S3152000FAD03D20002880098100700900047C7F1B7866
+S3152000FAE07C9C23783B4000004182003C3D2000283E
+S3152000FAF080099B8C2C8000004186002C3C600027CE
+S3152000FB003863396C3880000038A0000038C0000007
+S3152000FB107C0803A638E000003900000039200000E8
+S3152000FB204E8000212C9C000041860320813C000849
+S3152000FB3088090000700900017FE3FB787C0000261D
+S3152000FB4054001FFE7C0000D0540907BC3000000181
+S3152000FB507D3903784BFFC00183BF04FC20030000DE
+S3152000FB607D201914217D00007C0BE9147D2B03795F
+S3152000FB707C7E1B78408202D47F83E3787FA4EB7857
+S3152000FB8038A00000480338457C7C1B782C9C003B21
+S3152000FB90817F07287C000026540037FE7C0000D099
+S3152000FBA07C0900F82C8B0000552906BA7F80003886
+S3152000FBB07C1C4B784186001C801F07287C0803A6E6
+S3152000FBC0386000017FA4EB787F85E3784E800021A2
+S3152000FBD0801F07202C8000004086000C3B7E0004FE
+S3152000FBE048000018801F07207C0803A6387E0004E2
+S3152000FBF04E8000217C7B1B78801F07202C800000F4
+S3152000FC0041860018801F07207C0803A67FA3EB7877
+S3152000FC104E800021480000087FA3EB78907B0000EF
+S3152000FC20801F07202C8000004086000C387E0002B2
+S3152000FC3048000014801F07207C0803A6387E000297
+S3152000FC404E8000217F80E378B0030000801F0720CC
+S3152000FC502C80000041860018801F07207C0803A600
+S3152000FC607FC3F3784E800021480000087FC3F378D5
+S3152000FC70A3A30000801F07202C80000041860018C7
+S3152000FC80801F07207C0803A67FC3F3784E800021BF
+S3152000FC90480000087FC3F37863A08C00B0030000FF
+S3152000FCA0801F07202C80000040860010801F02B095
+S3152000FCB030600E5448000018807F02B0801F072055
+S3152000FCC07C0803A638630E544E8000213C000100B8
+S3152000FCD0900300007C0006AC7C0004AC2C9900014B
+S3152000FCE040860014801F01D430000001901F01D4EB
+S3152000FCF048000014387F00843880000338A00001B3
+S3152000FD00480236C93FA0F0007FE3FB787FC4F37832
+S3152000FD104BFFC2617F40D3787C80E8003B5A0001CC
+S3152000FD204186000C2C8300024186FFE068690004AE
+S3152000FD30200900007D2049147F40EA7821600000D8
+S3152000FD407C0B01147D2B0379418200403BBF00844C
+S3152000FD507FA3EB783880000238A000014802366D78
+S3152000FD602C99000140860014801F01D43000FFFF2B
+S3152000FD70901F01D4480000147FA3EB78388000033D
+S3152000FD8038A0FFFF48023645A01F02DCA13F02D65D
+S3152000FD903929FFFF7C80480040860030801F0720DD
+S3152000FDA02C80000041860018801F07207C0803A6AF
+S3152000FDB07FC3F3784E800021480000087FC3F37884
+S3152000FDC0380020004800002C801F07202C800000CF
+S3152000FDD041860018801F07207C0803A67FC3F3787E
+S3152000FDE04E800021480000087FC3F37838000000C9
+S3152000FDF0B00300007C0006AC7C0004ACA13F02DC12
+S3152000FE00A17F02D6392900017C095BD67C0059D610
+S3152000FE107D204850B13F02DCA13F02DEA17F02D601
+S3152000FE20392900017C095BD66F43F0003063FFFF60
+S3152000FE307C6319107C0059D67063000B7D204850D6
+S3152000FE40B13F02DE48000018387F00843880000267
+S3152000FE5038A00001480235753860000B8001002C5F
+S3152000FE607C0803A68321000C8341001083610014C3
+S3152000FE708381001883A1001C83C1002083E1002414
+S3152000FE80382100284E8000209421FFE07C0802A61D
+S3152000FE909361000C9381001093A1001493C1001864
+S3152000FEA093E1001C900100243D2000288009810058
+S3152000FEB0700900047C7F1B787C9D23783B600000C2
+S3152000FEC04182003C3D20002880099B8C2C8000002C
+S3152000FED04186002C3C6000273863397C388000003E
+S3152000FEE038A0000038C000007C0803A638E00000D7
+S3152000FEF039000000392000004E800021881D0011A5
+S3152000FF007009000141820200A13F02D4817F02D004
+S3152000FF10801F071C2C800000552918387FCB4A14D7
+S3152000FF204186001C801F071C7C0803A63860000140
+S3152000FF307FC4F37838A000084E800021801F072058
+S3152000FF402C80000041860018801F07207C0803A60D
+S3152000FF507FC3F3784E800021480000087FC3F378E2
+S3152000FF60A0630000706080004082019C70600037B2
+S3152000FF70418200503D20002880098100700900043C
+S3152000FF80418201683D20002880099B8C2C8000003E
+S3152000FF90418601583C60002738633178388000015B
+S3152000FFA038A0000238C000037C0803A638E000040D
+S3152000FFB039000005392000064E8000214800012C1A
+S3152000FFC0801F07202C8000004086000C387E00020F
+S3152000FFD048000014801F07207C0803A6387E0002F4
+S3152000FFE04E800021A3830000289C003B41850018F9
+S3152000FFF03D20002880098134300000019009813499
+S31520010000480000E8801D000C7C80E000418400DC73
+S31520010010801F07202C8000004086000C387E0004BB
+S3152001002048000014801F07207C0803A6387E0004A0
+S315200100304E80002180630000801F07242C80000051
+S3152001004041860010801F07247C0803A64E800021CC
+S315200100507C7E1B78881E00007009000141820014F5
+S31520010060801F01BC30000001901F01BC4800001414
+S31520010070387F00843880000138A000014802334DC2
+S31520010080881D001160000002981D0011381CFFFC1C
+S31520010090541C049E939D000C801D000C901D00187D
+S315200100A0801F072C2C8000004186001C80BD000C7F
+S315200100B0801F072C7C0803A6386000017FC4F378D3
+S315200100C04E8000217FC3F378809D00087F85E378E9
+S315200100D0480011B97FE3FB787F64DB784BFFCB9136
+S315200100E03860000048000024387F008438800000F2
+S315200100F038A00001480232D57FE3FB787F64DB78A4
+S315200101004BFFCB6D3860000B800100247C0803A6D1
+S315200101108361000C8381001083A1001483C1001820
+S3152001012083E1001C382100204E8000209421FFF01D
+S315200101307C0802A693C1000893E1000C90010014EB
+S315200101403D20002880098100700900047C7F1B78EE
+S315200101504182003C3D20002880099B8C2C80000098
+S315200101604186002C3C600027386339903880000096
+S3152001017038A0000038C000007C0803A638E0000043
+S3152001018039000000392000004E8000214800FAD5B0
+S31520010190801F02B42C8000007C7E1B783800000072
+S315200101A041860010807F02B448043CF17C601B78B4
+S315200101B02C80FFFF4086000C3860FFFF480000506E
+S315200101C0801F07202C80000040860010801F02B06F
+S315200101D030600E4848000018807F02B0801F07203B
+S315200101E07C0803A638630E484E80002138000000A3
+S315200101F090030000881F04EC7FC3F3786000000899
+S31520010200981F04EC4800FA71386000008001001440
+S315200102107C0803A683C1000883E1000C3821001065
+S315200102204E8000209421FFF07C0802A693C100088D
+S3152001023093E1000C900100147C7F1B784800FA257D
+S31520010240801F02B42C8000007C7E1B7838000000C1
+S3152001025041860010807F02B448043C0D7C601B78E7
+S315200102602C80FFFF4086000C3860FFFF4800009875
+S31520010270801F07202C80000040860010801F02B0BE
+S3152001028030600E4848000018807F02B0801F07208A
+S315200102907C0803A638630E484E800021801F04F88F
+S315200102A090030000881F04EC7FC3F378700000F7E9
+S315200102B0981F04EC4800F9C13D20002880098100DF
+S315200102C0700900044182003C3D20002880099B8C56
+S315200102D02C8000004186002C3C600027386339A41D
+S315200102E03880000038A0000038C000007C0803A632
+S315200102F038E0000039000000392000004E8000213E
+S3152001030038600000800100147C0803A683C1000820
+S3152001031083E1000C382100104E8000209421FFF04B
+S315200103207C0802A693E1000C900100143D200028D0
+S3152001033083E9813C801F07202C8000004086001025
+S31520010340801F02B030600E0048000018807F02B086
+S31520010350801F07207C0803A638630E004E800021EB
+S315200103603D200028A00981022C8000008003000086
+S315200103704186003C3D20002881699B8C2C8B000006
+S315200103804186002C3C600027386339BC7C04037805
+S3152001039038A0000038C000007D6803A638E00000C0
+S315200103A039000000392000004E800021801F0720DF
+S315200103B02C80000040860010801F02B030600E04A1
+S315200103C048000018807F02B0801F07207C0803A602
+S315200103D038630E044E8000213D200028A0098102A9
+S315200103E02C800000800300004186003C3D2000282F
+S315200103F081699B8C2C8B00004186002C3C60002758
+S31520010400386339D47C04037838A0000038C0000052
+S315200104107D6803A638E0000039000000392000007D
+S315200104204E800021801F07202C800000408600106E
+S31520010430801F02B030600E0848000018807F02B08D
+S31520010440801F07207C0803A638630E084E800021F2
+S315200104503D200028A00981022C8000008003000095
+S315200104604186003C3D20002881699B8C2C8B000015
+S315200104704186002C3C600027386339EC7C040378E4
+S3152001048038A0000038C000007D6803A638E00000CF
+S3152001049039000000392000004E800021801F0720EE
+S315200104A02C80000040860010801F02B030600E0CA8
+S315200104B048000018807F02B0801F07207C0803A611
+S315200104C038630E0C4E8000213D200028A0098102B0
+S315200104D02C800000800300004186003C3D2000283E
+S315200104E081699B8C2C8B00004186002C3C60002767
+S315200104F038633A087C04037838A0000038C000002D
+S315200105007D6803A638E0000039000000392000008C
+S315200105104E800021801F07202C800000408600107D
+S31520010520801F02B030600E1048000018807F02B094
+S31520010530801F07207C0803A638630E104E800021F9
+S315200105403D200028A00981022C80000080030000A4
+S315200105504186003C3D20002881699B8C2C8B000024
+S315200105604186002C3C60002738633A247C040378BA
+S3152001057038A0000038C000007D6803A638E00000DE
+S3152001058039000000392000004E800021801F0720FD
+S315200105902C80000040860010801F02B030600E14AF
+S315200105A048000018807F02B0801F07207C0803A620
+S315200105B038630E144E8000213D200028A0098102B7
+S315200105C02C800000800300004186003C3D2000284D
+S315200105D081699B8C2C8B00004186002C3C60002776
+S315200105E038633A407C04037838A0000038C0000004
+S315200105F07D6803A638E0000039000000392000009C
+S315200106004E800021801F07202C800000408600108C
+S31520010610801F02B030600E1848000018807F02B09B
+S31520010620801F07207C0803A638630E184E80002100
+S315200106303D200028A00981022C80000080030000B3
+S315200106404186003C3D20002881699B8C2C8B000033
+S315200106504186002C3C60002738633A5C7C04037891
+S3152001066038A0000038C000007D6803A638E00000ED
+S3152001067039000000392000004E800021801F07200C
+S315200106802C80000040860010801F02B030600E4092
+S3152001069048000018807F02B0801F07207C0803A62F
+S315200106A038630E404E8000213D200028A00981029A
+S315200106B02C800000800300004186003C3D2000285C
+S315200106C081699B8C2C8B00004186002C3C60002785
+S315200106D038633A78540407BE38A0000038C00000B9
+S315200106E07D6803A638E000003900000039200000AB
+S315200106F04E800021801F07202C800000408600109C
+S31520010700801F02B030600E4448000018807F02B07E
+S31520010710801F07207C0803A638630E444E800021E3
+S315200107203D200028A00981022C80000080030000C2
+S315200107304186003C3D20002881699B8C2C8B000042
+S315200107404186002C3C60002738633A9854040012F5
+S3152001075038A0000038C000007D6803A638E00000FC
+S3152001076039000000392000004E800021801F07201B
+S315200107702C80000040860010801F02B030600E4899
+S3152001078048000018807F02B0801F07207C0803A63E
+S3152001079038630E484E8000213D200028A0098102A1
+S315200107A02C800000800300004186003C3D2000286B
+S315200107B081699B8C2C8B00004186002C3C60002794
+S315200107C038633AB45404001238A0000038C000003F
+S315200107D07D6803A638E000003900000039200000BA
+S315200107E04E800021801F07202C80000040860010AB
+S315200107F0801F02B030600E4C48000018807F02B086
+S31520010800801F07207C0803A638630E4C4E800021EA
+S315200108103D200028A00981022C80000080030000D1
+S31520010820418600443D20002881699B8C2C8B000049
+S31520010830418600343C80E0006084000C3C60002747
+S3152001084038633AD07C04203838A0000038C0000034
+S315200108507D6803A638E00000390000003920000039
+S315200108604E800021801F07202C800000408600102A
+S31520010870801F02B030600E5048000018807F02B001
+S31520010880801F07207C0803A638630E504E80002166
+S315200108903D200028A00981022C8000008003000051
+S315200108A04186003C3D20002881699B8C2C8B0000D1
+S315200108B04186002C3C60002738633AF47C04037897
+S315200108C038A0000038C000007D6803A638E000008B
+S315200108D039000000392000004E800021801F0720AA
+S315200108E02C80000040860010801F02B030600E541C
+S315200108F048000018807F02B0801F07207C0803A6CD
+S3152001090038630E544E8000213D200028A009810223
+S315200109102C800000800300004186003C3D200028F9
+S3152001092081699B8C2C8B00004186002C3C60002722
+S3152001093038633B0C7C04037838A0000038C00000E3
+S315200109407D6803A638E00000390000003920000048
+S315200109504E800021801F07202C8000004086001039
+S31520010960801F02B030600E8048000018807F02B0E0
+S31520010970801F07207C0803A638630E804E80002145
+S315200109803D200028A00981022C8000008003000060
+S315200109904186003C3D20002881699B8C2C8B0000E0
+S315200109A04186002C3C60002738633B247C04037875
+S315200109B038A0000038C000007D6803A638E000009A
+S315200109C039000000392000004E800021801F0720B9
+S315200109D02C80000040860010801F02B030600E84FB
+S315200109E048000018807F02B0801F07207C0803A6DC
+S315200109F038630E844E8000213D200028A009810203
+S31520010A002C800000800300004186003C3D20002808
+S31520010A1081699B8C2C8B00004186002C3C60002731
+S31520010A2038633B3C7C04037838A0000038C00000C2
+S31520010A307D6803A638E00000390000003920000057
+S31520010A404E800021801F07202C8000004086001048
+S31520010A50801F02B030600ECC48000018807F02B0A3
+S31520010A60801F07207C0803A638630ECC4E80002108
+S31520010A703D200028A00981022C800000800300006F
+S31520010A804186003C3D20002881699B8C2C8B0000EF
+S31520010A904186002C3C60002738633B547C04037854
+S31520010AA038A0000038C000007D6803A638E00000A9
+S31520010AB039000000392000004E800021801F0720C8
+S31520010AC02C80000040860010801F02B030600ED0BE
+S31520010AD048000018807F02B0801F07207C0803A6EB
+S31520010AE038630ED04E8000213D200028A0098102C6
+S31520010AF02C800000800300004186003C3D20002818
+S31520010B0081699B8C2C8B00004186002C3C60002740
+S31520010B1038633B707C04037838A0000038C000009D
+S31520010B207D6803A638E00000390000003920000066
+S31520010B304E800021801F07202C8000004086001057
+S31520010B40801F02B030600EEC48000018807F02B092
+S31520010B50801F07207C0803A638630EEC4E800021F7
+S31520010B603D200028A00981022C800000800300007E
+S31520010B704186003C3D20002881699B8C2C8B0000FE
+S31520010B804186002C3C60002738633B8C7C0403782B
+S31520010B9038A0000038C000007D6803A638E00000B8
+S31520010BA039000000392000004E800021801F0720D7
+S31520010BB02C80000040860010801F02B030600F3468
+S31520010BC048000018807F02B0801F07207C0803A6FA
+S31520010BD038630F344E8000213D200028A009810270
+S31520010BE02C800000800300004186003C3D20002827
+S31520010BF081699B8C2C8B00004186002C3C60002750
+S31520010C0038633BA87C04037838A0000038C0000074
+S31520010C107D6803A638E00000390000003920000075
+S31520010C204E800021801F07202C8000004086001066
+S31520010C30801F02B030600F4448000018807F02B048
+S31520010C40801F07207C0803A638630F444E800021AD
+S31520010C503D200028A00981022C800000800300008D
+S31520010C604186003C3D20002881699B8C2C8B00000D
+S31520010C704186002C3C60002738633BC87C040378FE
+S31520010C8038A0000038C000007D6803A638E00000C7
+S31520010C9039000000392000004E800021801F0720E6
+S31520010CA02C80000040860010801F02B030600F4863
+S31520010CB048000018807F02B0801F07207C0803A609
+S31520010CC038630F484E8000213D200028A00981026B
+S31520010CD02C800000800300004186003C3D20002836
+S31520010CE081699B8C2C8B00004186002C3C6000275F
+S31520010CF038633BE85404057E38A0000038C0000064
+S31520010D007D6803A638E00000390000003920000084
+S31520010D104E800021801F07202C8000004086001075
+S31520010D20801F02B030600F8448000018807F02B017
+S31520010D30801F07207C0803A638630F844E8000217C
+S31520010D403D200028A00981022C800000800300009C
+S31520010D504186003C3D20002881699B8C2C8B00001C
+S31520010D604186002C3C60002738633C087C040378CC
+S31520010D7038A0000038C000007D6803A638E00000D6
+S31520010D8039000000392000004E8000218001001426
+S31520010D907C0803A683E1000C382100104E80002038
+S31520010DA09421FFF87C0802A69001000C3D20002822
+S31520010DB0546318383D6000288129813CA00B8102AB
+S31520010DC0812902D02C8000007D634A147C834A2E1F
+S31520010DD0A0AB000280CB0004418600303D200028D4
+S31520010DE080099B8C2C800000418600203C600027D6
+S31520010DF038633C287C0803A638E00000390000004F
+S31520010E00392000004E8000218001000C7C0803A6B9
+S31520010E10382100084E8000209421FFF07C0802A68C
+S31520010E2093C1000893E1000C900100143D20002895
+S31520010E30A00981022C800000418600443D20002823
+S31520010E4080099B8C2C800000418600343C60002761
+S31520010E5038633C5038C0000038E0000039000000FB
+S31520010E603D2000287C0803A6808981083D20002892
+S31520010E7080A98104392000004E8000213FC000282E
+S31520010E80801E81005400043E2C800000418600F023
+S31520010E903FE00028801F9B8C2C8000004186003C6F
+S31520010EA03C60002738633C68390000003D2000285B
+S31520010EB0808981103D20002880A981143D200028A9
+S31520010EC07C0803A680C981183D20002880E9811C61
+S31520010ED0392000004E800021801E81005400043EEE
+S31520010EE02C80000041860098801F9B8C2C8000005E
+S31520010EF0418600403C60002738633C9C3D20002809
+S31520010F00808981203D20002880A981243D20002838
+S31520010F1080C981283D2000287C0803A680E9812CF0
+S31520010F203D20002881098130392000004E80002192
+S31520010F30801E81005400043E2C8000004186004022
+S31520010F40801F9B8C2C800000418600343C6000274A
+S31520010F5038633CD838C0000038E000003900000072
+S31520010F603D2000287C0803A6808981343D20002865
+S31520010F7080A98138392000004E800021800100148B
+S31520010F807C0803A683C1000883E1000C38210010E8
+S31520010F904E8000209421FFE87C0802A693A1000C34
+S31520010FA093C1001093E100149001001C3FA000287A
+S31520010FB0801D81005400043E2C8000003D20002825
+S31520010FC083E9813C418601083FC00028801E9B8C15
+S31520010FD02C8000004186002C3C60002738633CF0C1
+S31520010FE07FE4FB7838E00000390000007C0803A686
+S31520010FF080BF02A880DF0738392000004E800021FB
+S31520011000801D81005400043E2C800000418600C0D2
+S31520011010801E9B8C2C8000004186002C3C60002782
+S315200110207C0803A6809F02C480BF02C880DF070810
+S3152001103080FF070C811F0710813F071438633D2469
+S315200110404E800021801D81005400043E2C8000002A
+S315200110504186007C801E9B8C2C8000004186002CC2
+S315200110603C6000277C0803A6A09F02D680BF02D839
+S31520011070A0DF02DCA0FF02DEA11F02E0813F02E425
+S3152001108038633D8C4E800021801D81005400043E32
+S315200110902C80000041860038801E9B8C2C8000000D
+S315200110A04186002C3C60002738633DEC38E0000087
+S315200110B0390000007C0803A6A09F02CC80BF02D085
+S315200110C0A0DF02D4392000004E8000218001001CBF
+S315200110D07C0803A683A1000C83C1001083E10014C0
+S315200110E0382100184E8000209421FFB87C0802A6E2
+S315200110F093A1003C93C1004093E100449001004C30
+S315200111003D20002883E9813C813F073C3D6005F570
+S3152001111080090018616BE1007C8058004086001030
+S315200111203D20002738893E144800000C3D20002729
+S3152001113038893E2038610008480025F1813F073C67
+S315200111408009001C2C800100386100204086001097
+S315200111503D200027388937584800000C3D200027BC
+S3152001116038893764480025C53FA00028801D8100A5
+S315200111705400043E2C800000418600883FC0002890
+S31520011180801E9B8C2C800000418600303C6000270D
+S3152001119038633E2C38810008813F073C7C0803A632
+S315200111A088C9001088E900118109001481290020CD
+S315200111B038A100204E800021801D81005400043E6C
+S315200111C02C8000004186003C801E9B8C2C800000D8
+S315200111D0418600303C600027813F073C7C0803A6FE
+S315200111E0A0890000A0A90002A0C90008A0E9000A60
+S315200111F0A109000CA129000E38633EC84E800021AA
+S315200112008001004C7C0803A683A1003C83C10040D9
+S3152001121083E10044382100484E8000209421FFF8C4
+S315200112207C0802A69001000C3D200028A00981021D
+S315200112302C8000003D2000288169813C4186003CAC
+S315200112403D20002880099B8C2C8000004186002CA3
+S315200112503C60002738633F3C7C0803A6808B01D481
+S3152001126080AB01D080CB01BC80EB01B8810B01DCC6
+S31520011270392000004E8000218001000C7C0803A645
+S31520011280382100084E8000202C0500004D820020C8
+S315200112907C0320404D8200202F050008418100BC9F
+S315200112A07C632A147C842A144198005C706B0003A9
+S315200112B0708C00037D686279418200102C0800023F
+S315200112C041820058480000402C0B00004182001842
+S315200112D07D6903A68CE3FFFF38A5FFFF9CE4FFFF92
+S315200112E04200FFF470A6000354A5F0BE7CA903A614
+S315200112F084E3FFFC94E4FFFC4200FFF87CC53379CC
+S315200113004D8200207CA903A68CE3FFFF9CE4FFFF0E
+S315200113104200FFF84E800020716B000141820010CF
+S315200113208CE3FFFF38A5FFFF9CE4FFFF70A60001B9
+S3152001133054A5F87E7CA903A6A4E3FFFEB4E4FFFE30
+S315200113404200FFF8280600004D82002088E3FFFFB7
+S3152001135098E4FFFF4E80002041980078706B0003CF
+S31520011360708C00037D686279418200102C0800028E
+S315200113704182007C4800005C2C0B00004182002445
+S315200113808CE3000038A5FFFF396B00019CE40000C7
+S3152001139038630001388400012C0B00044082FFE4ED
+S315200113A070A6000354A5F0BE3863FFFC3884FFFC09
+S315200113B07CA903A684E3000494E400044200FFF818
+S315200113C07CC533794D8200203863000438840004BB
+S315200113D03863FFFF3884FFFF7CA903A68CE3000155
+S315200113E09CE400014200FFF84E800020716B000151
+S315200113F0418200188CE3000038A5FFFF9CE4000021
+S31520011400386300013884000170A6000154A5F87ED6
+S315200114103863FFFE3884FFFE7CA903A6A4E30002FD
+S31520011420B4E400024200FFF8280600004D820020A5
+S3152001143088E3000298E400024E8000202C0500007B
+S315200114404D8200207C0320004D8200204181FF84B3
+S315200114507C632A147C842A144BFFFEAC2C050000E5
+S315200114604D8200207C0320004D82002038C00000E0
+S315200114704181FFA054AB083C7C635A147C845A14E6
+S315200114804BFFFEB42C0500004D8200207C0320007A
+S315200114904D82002038C000004181FF1054AB103A24
+S315200114A07C635A147C845A144BFFFE442C04000C92
+S315200114B041800054706B00034182001C3884FFFF79
+S315200114C0396B00019CA30000386300012C0B00043A
+S315200114D04082FFEC70A500FF54A8402E7CA54378DE
+S315200114E054A8801E7CA543785486F0BE70840003E0
+S315200114F07CC903A63863FFFC94A300044200FFFCC9
+S31520011500386300042C0400004D8200207C8903A648
+S315200115103863FFFF9CA300014200FFFC4E800020A0
+S315200115202C0500004D82002054A5F87E396000006C
+S315200115307CA903A67D835E2C7D845B2E396B0002FC
+S315200115404200FFF44E8000202C030001418200401E
+S315200115507C908AA6548500014082014C3C800A0079
+S315200115604C00012C7C908BA64C00012C3C800C005D
+S315200115704C00012C7C908BA64C00012C3C80020057
+S315200115804C00012C7C908BA64800011C7C988AA6D5
+S3152001159054850001408201103C800A007C988BA66C
+S315200115A03C800C007C988BA63C8002007C0004AC1D
+S315200115B07C988BA6480000F02C0300014182002074
+S315200115C07C908AA654840001418200DC3C80040080
+S315200115D04C00012C7C908BA6480000CC7C988AA6D6
+S315200115E054840001418200C03C800E007C988BA669
+S315200115F03C8004004C00012C7C988BA6480000A856
+S315200116007CA52214548400362D830001418E0014BA
+S315200116102C030000408200707C0027AC48000008A3
+S315200116207C0023AC388400107C042840408000785C
+S31520011630418EFFF04BFFFFE47CA522145484003633
+S315200116402C030001408200407C00206C388400106D
+S315200116507C0428404180FFF44800004C7C841A1405
+S31520011660546300367C00186C7C0004AC7C001FACF3
+S31520011670386300107C0320404180FFEC4C00012C94
+S31520011680480000247C0802A6900100049421FFF062
+S31520011690480002B180010014382100107C0803A6FD
+S315200116A04E8000207C0004AC386000004E80002073
+S315200116B09421FFE87C0802A693A1000C93C1001097
+S315200116C093E100149001001C7C9D23783D60002845
+S315200116D03D200021392916EC912B8B7C396B8B7C93
+S315200116E03D20002139291748912B0004380000009C
+S315200116F0900B0008900B000C900B00183D20002148
+S31520011700392918B4912B00243D2000213929199417
+S31520011710912B0028900B002C900B00303D200021AE
+S315200117203929155C912B001C3D20002139291538BA
+S31520011730912B00103D20002139291500912B0014F1
+S31520011740900B00203D20002893A981FC3D200028F4
+S31520011750900982003D200028900982044800045DFA
+S31520011760546300C24800044D73A000014182001455
+S315200117704800045964631000546300C24800000CF9
+S3152001178048000449546301024800043938600000C6
+S315200117908001001C7C0803A683A1000C83C10010D4
+S315200117A083E10014382100184E8000209421FFF88F
+S315200117B07C0802A69001000C288300014085001CAC
+S315200117C048002ED93C00004560000001900300002E
+S315200117D03860FFFF48000008386000008001000CD7
+S315200117E07C0803A6382100084E8000209421FFF0B2
+S315200117F07C0802A693E1000C900100147C7F1B78E3
+S315200118004BFFFFAD2C8300004186000C3860FFFFA3
+S31520011810480000247FE3FB784BFFFD312C9F00011C
+S31520011820408600103D20002893E982004800238D40
+S3152001183038600000800100147C0803A683E1000CB7
+S31520011840382100104E8000209421FFE87C0802A652
+S3152001185093A1000C93C1001093E100149001001C88
+S315200118607C7F1B784BFFFF497C7E1B794182000CD4
+S315200118703860FFFF480000344800E3E97C7D1B788F
+S315200118807FE3FB784BFFFD357FA3EB784800E3E947
+S315200118902C9F0001408600103D20002893C982001C
+S315200118A048002319386000008001001C7C0803A62B
+S315200118B083A1000C83C1001083E100143821001894
+S315200118C04E8000209421FFE87C0802A693A1000CFB
+S315200118D093C1001093E100149001001C7C7F1B78BA
+S315200118E04BFFFECD7C7E1B794182000C3860FFFFC9
+S315200118F0480000344800E36D7C7D1B787FE3FB784C
+S315200119004BFFFCB97FA3EB784800E36D2C9F0001C8
+S31520011910408600103D20002893C982004800229D60
+S31520011920386000008001001C7C0803A683A1000CFE
+S3152001193083C1001083E10014382100184E80002055
+S315200119409421FFF87C0802A69001000C48002D4D39
+S315200119503C00004560000001900300003860FFFF55
+S315200119608001000C7C0803A6382100084E80002047
+S315200119709421FFF87C0802A69001000C7C631B7958
+S315200119804082000C4800A99D480000182C830001C4
+S315200119904186000C386000004800000C4800A9A5CB
+S315200119A054630FFE8001000C7C0803A63821000831
+S315200119B04E8000209421FFF07C0802A693C10008E6
+S315200119C093E1000C900100147C7E1B7838600001A5
+S315200119D04BFFFFA12C830000408600107FC3F378C4
+S315200119E04800FAB1480000983D20002880098B70F4
+S315200119F02C800000418600107C0803A64E80002121
+S31520011A00480000083860FFFF2C83FFFF418600381D
+S31520011A107C1E1B963D20002881299C202C890000B4
+S31520011A207C0019D67FC01A144186001C7D2803A686
+S31520011A30386010007FC4F3784E8000217C7F1B79AB
+S31520011A404082000C38600000480000343D20002808
+S31520011A5080098B642C8000004186002038600000BC
+S31520011A607FE4FB787C0803A67FC5F37838C0003075
+S31520011A7038E000004E8000217FE3FB7880010014CE
+S31520011A807C0803A683C1000883E1000C38210010DD
+S31520011A904E8000209421FFF07C0802A693C1000805
+S31520011AA093E1000C900100147C7E1B7838600001C4
+S31520011AB04BFFFEC12C8300003BE00000418600580D
+S31520011AC03D20002880098B582C80000039298B580D
+S31520011AD0418600448129000C2C890000397EFFF8BB
+S31520011AE04186003080AB0004386000007FC4F37863
+S31520011AF038C000307D2803A638E0001054A5003CEC
+S31520011B0038A5FFF84E8000217C7F1B78480000080D
+S31520011B103BE0FFFF7FC3F3784800F9A57FE3FB781D
+S31520011B20800100147C0803A683C1000883E1000C10
+S31520011B30382100104E8000207C0004AC7C001A6401
+S31520011B407C0004AC4E8000207C8000A62C03000182
+S31520011B5041820014608400207C8001244C00012CE9
+S31520011B604E800020608400107C8001247C0004AC1F
+S31520011B704E8000207C8000A62C03000141820014A7
+S31520011B80548406F27C8001244C00012C4E800020D6
+S31520011B90548407347C8001247C0004AC4E800020D0
+S31520011BA07C72C3A64E8000207C7AC3A64E8000207C
+S31520011BB07C70C3A64E8000207C70C2A64E80002079
+S31520011BC07C78C3A64E8000207C78C2A64E80002059
+S31520011BD07C79C3A64E800020388000207C631A7849
+S31520011BE07C8903A67C73C3A67C76C3A67C7BC3A60D
+S31520011BF07C7EC3A6386310004200FFEC4E80002095
+S31520011C007C0006AC7C78CBA67C78CAA64E800020C8
+S31520011C107C79CAA64E8000207C7ACAA64E800020F6
+S31520011C207C0006AC7C70CBA67C70CAA64E800020B8
+S31520011C307C71CAA64E8000207C72CAA64E800020E6
+S31520011C407C73C3A64E8000207C76C3A64E800020DE
+S31520011C507C7CC3A64E8000207C7BC3A64E800020C0
+S31520011C607C7EC3A64E8000207E5FC3A67E400026D2
+S31520011C709241FFFC7E5CC2A6825200007E5DC3A615
+S31520011C80565207FF418200287E5DC2A6825200007D
+S31520011C907E5EC3A6565207FF418200148241FFFC95
+S31520011CA07E4FF1207E5FC2A64C0000648241FFFC7C
+S31520011CB07E4FF1207E5FC2A6480003027E5FC3A647
+S31520011CC07E4000269241FFFC7E53C2A67E5BC3A6C0
+S31520011CD07E5CC2A6825200007E55C3A67E5DC3A647
+S31520011CE0565207FF418200287E5DC2A6825200001D
+S31520011CF07E56C3A6565207FF4182FFB48241FFFC9E
+S31520011D007E4FF1207E5FC2A64C0000648241FFFC1B
+S31520011D107E4FF1207E5FC2A6480004027E5FC3A6E5
+S31520011D207E4000269241FFFC7E5202A65652004377
+S31520011D30408200C47E5202A656520109408200B852
+S31520011D407E5202A65652018D418200AC9261FFF865
+S31520011D509281FFF492A1FFF07E5CC2A6825200001E
+S31520011D607E5DC3A67E7DC2A6827300005674A00343
+S31520011D7040800010727404004182003C48000064D7
+S31520011D807E9B02A672944000418200185654E6FEBC
+S31520011D907EBAC2A65EB5A0014182001C480000445D
+S31520011DA05654E6FE7EBAC2A65EB5A043418200081D
+S31520011DB048000030627301007E9DC2A69274000025
+S31520011DC07E7EC3A682A1FFF08281FFF48261FFF8A5
+S31520011DD08241FFFC7E4FF1207E5FC2A64C0000644B
+S31520011DE082A1FFF08281FFF48261FFF88241FFFC2C
+S31520011DF07E4FF1207E5FC2A6480003029421FFD8C0
+S31520011E007C0802A69381001893A1001C93C100208F
+S31520011E1093E100249001002C7C7C1B787C9F237805
+S31520011E207CBD2B787FA3EB784801657183C300784D
+S31520011E307FA3EB787F84E37838A1000838C1000CB2
+S31520011E4038E1001039010014480004912C83FFFF6A
+S31520011E50408600283D20002880099C042C80000013
+S31520011E60418600487C0803A63C60002738633FDC96
+S31520011E704E800021480000342C9F00004086000C33
+S31520011E803D2000213BE91F047FC7F378390000007C
+S31520011E90806100088081000C80A1001080C100149F
+S31520011EA07FE9FB78480000258001002C7C0803A6E9
+S31520011EB08381001883A1001C83C1002083E10024B3
+S31520011EC0382100284E8000209421FFA07C0802A6FC
+S31520011ED092E1003C93010040932100449341004844
+S31520011EE09361004C9381005093A1005493C10058F3
+S31520011EF093E1005C900100647C781B787C9C2378BC
+S31520011F007CB72B787D1A43782C9A004F7CDD337869
+S31520011F107CFB3B787D394B784185008483FD00002D
+S31520011F2057E0077E7C0000D054000FFE7D3DF8105F
+S31520011F307D2949107D2900D07C0B4B794082009464
+S31520011F407D3FD8107D2949107D2900D0217F0000B1
+S31520011F507C0BF9147D2B03794082007838800000B0
+S31520011F6038A0000483DF000438C100307FC3F37832
+S31520011F704800D4392C83FFFF418600247F83E378F0
+S31520011F807FC4F3787FA5EB787FE6FB787F67DB78E4
+S31520011F90391A00017F29CB784BFFFF317F03C378A4
+S31520011FA07F84E378480001B1906100307EE4BB78FC
+S31520011FB038A100084800059D7C651B787F2803A66B
+S31520011FC07F83E3788081003038C100084E8000216C
+S31520011FD0800100647C0803A682E1003C8301004065
+S31520011FE083210044834100488361004C8381005052
+S31520011FF083A1005483C1005883E1005C382100602D
+S315200120004E8000209421FFD87C0802A69321000C43
+S3152001201093410010936100149381001893A1001C31
+S3152001202093C1002093E100249001002C7C691B7848
+S315200120303FE00028801F9C047C8B23782C800000A5
+S315200120407CBE2B787CD933783B400000418600DC6E
+S315200120503C6000277C0803A6386340047D244B7826
+S315200120607D655B784E8000212C9E000040860030E5
+S315200120703D200028800981A82C800000418600206F
+S315200120807C1E0378801F9C047C0803A63B4000012C
+S315200120903C600027386340104E8000212C9E0000B2
+S315200120A0408500503FA000283F6000273F80002741
+S315200120B03BE0000057DE103A2C9F000041860014B9
+S315200120C0801D9C047C0803A6387B40144E80002189
+S315200120D0801D9C047C0803A6387C40187C9FC82E52
+S315200120E03BFF00044E8000217C9FF0004184FFCC01
+S315200120F02C9A00004186001C3D20002880099C0462
+S315200121007C0803A63C6000273863401C4E800021D2
+S315200121103D20002880099C047C0803A63C600027FA
+S31520012120386340204E8000218001002C7C0803A6C4
+S315200121308321000C834100108361001483810018E0
+S3152001214083A1001C83C1002083E1002438210028BB
+S315200121504E8000209421FFE87C0802A693C100103E
+S3152001216093E100149001001C7C7F1B783804FFFC4E
+S31520012170900100088064FFFC3D2048005460000A5D
+S315200121807C8048006C004000216000007C0B01141B
+S315200121907D20002655293FFE7D2B0379418200644F
+S315200121A04086001474600200546301BA6469FC001D
+S315200121B048000010706080005463043A6469FFFF90
+S315200121C07C00002654001FFE7C0000D07C6B00386A
+S315200121D07D2000787D630378812100088009000035
+S315200121E07D234A145400FFFE7C0000D07C00FE7043
+S315200121F07C6300387D2000787C6303784800007476
+S315200122003FC00028807E81AC3880000038A00004C1
+S3152001221038C100085463103A7C63F8504800D18DC8
+S315200122202C83FFFF41860048801E81AC5400103A62
+S315200122307C00F8507C9F004093E1000840850030E7
+S315200122403D6094217C0903788061000880030000A9
+S315200122505400001E7C805800418600183803FFFC7C
+S315200122607C804840900100084185FFE07FE3FB78B0
+S315200122708001001C7C0803A683C1001083E10014A1
+S31520012280382100184E800020380300507C830040FE
+S31520012290408400403D6094217C090378800300003E
+S315200122A05400001E7C8058004086000C38600001D6
+S315200122B04E8000207C8320004086000C3860000080
+S315200122C04E800020386300047C8348404184FFD03F
+S315200122D0386000014E8000209421FFC07C0802A6B0
+S315200122E092A1001492C1001892E1001C93010020D2
+S315200122F093210024934100289361002C938100307F
+S3152001230093A1003493C1003893E1003C900100442D
+S315200123107C791B787C9A23787CB72B787CD8337888
+S315200123207CF63B7883DA00047D15437873C0000779
+S315200123303B8000013B60000183BA008C408201840E
+S3152001234048016059800300807C9E004041840174CD
+S315200123507F23CB7848016045800300787C9E00402E
+S31520012360418501602C9E00004086005048000154A2
+S315200123707FA3EB78809A00843B6000004BFFFDD958
+S315200123807FA4EB784BFFFF053003FFFF7F801910F9
+S31520012390480000E83B6000003B800001480000DC6B
+S315200123A03B6000013B800001480000D03B600000FB
+S315200123B03B800000480000C47FA3EB7838800000F2
+S315200123C038A0000438C100084800CFE12C83FFFF64
+S315200123D0418600A83880000038A000043FE000288C
+S315200123E0807F81AC38C100085463103A7C7D1A1471
+S315200123F04800CFB92C83FFFF41860080801F81AC26
+S315200124005400103A7C1D02147C9D004093A10008C3
+S31520012410408400683CA07C0860A502A63CC04C0014
+S3152001242060C600203CE07C0860E703A63C8094213E
+S315200124307C08037881410008812A0000552B02CAB5
+S315200124407C8B28004186FF2C5520040A7C80300095
+S315200124504186FF447C8B38004186FF485520001E6B
+S315200124607C8020004186FF48380A00047C80404059
+S31520012470900100084184FFC02C9C00004186004C3D
+S3152001248083FE000057E0077E7C0000D054000FFE3B
+S315200124907D3EF8107D2949107D2900D07C0B4B7992
+S315200124A0408200207F23CB7848015EF180030078AB
+S315200124B07C9F00404185000C2C9F00004086001423
+S315200124C03860FFFF480000507FDFF3783BDFFFF8DD
+S315200124D02C9B000093B7000093D6000093F50000D3
+S315200124E04186000C801F000448000008801A0084E1
+S315200124F090180000807800003880000038A0000481
+S3152001250038C100084800CEA52063FFFF3063FFFFD6
+S315200125107C631910800100447C0803A682A1001463
+S3152001252082C1001882E1001C83010020832100243E
+S31520012530834100288361002C8381003083A10034EC
+S3152001254083C1003883E1003C382100404E800020C1
+S315200125509421FFF093E1000C380300507C83004066
+S3152001256039400000408400783D804C00618C002079
+S315200125703FE048007C06037838E000003D0000601B
+S315200125808163000065099000556000147C80480035
+S3152001259040860024394A00015560043E7C04002E01
+S315200125A02C8A00093D0800207C07292E38E70004E3
+S315200125B04185002C812300005520040A7C8060007F
+S315200125C04186001C5520000A7C80F80041860010B7
+S315200125D0386300047C8330404184FFA87D435378CF
+S315200125E083E1000C382100104E8000209421FFF059
+S315200125F07C0802A693C1000893E1000C9001001407
+S315200126007C7F1B783D200028817F0000812981B4B1
+S315200126107C8B4800418600282C8B000041860010C7
+S31520012620800900247C8B0000418600144800206D1F
+S315200126303C00003D6000000148000018A13F001049
+S315200126402C890000408600184800205138000009D6
+S31520012650900300003860FFFF4800009C71200008AD
+S31520012660418200147FE3FB78480001257C7E1B789C
+S31520012670480000083BC000007FE3FB78480006C500
+S31520012680A01F00107C6318F8700900807C63FE701F
+S315200126907C60F0387C1E1B384182000C807F001440
+S315200126A04800EE1D807F00202C8300004186001CFF
+S315200126B0381F00307C830000418600084800EE0167
+S315200126C038000000901F0020807F00342C830000FA
+S315200126D0418600104800EDE938000000901F0034C3
+S315200126E038000000B01F00107FE3FB78480007C1C7
+S315200126F07FC3F378800100147C0803A683C10008F8
+S3152001270083E1000C382100104E8000209421FFF82F
+S315200127107C0802A69001000C3D2000288163000060
+S31520012720812981B47C8B4800418600282C8B0000AE
+S3152001273041860010800900247C8B0000418600140C
+S3152001274048001F593C00003D600000014800002060
+S315200127502C83000041860010A00300107009000898
+S315200127604082001848001F353800000990030000F8
+S315200127703860FFFF48000008480000158001000C62
+S315200127807C0803A6382100084E8000209421FFE80A
+S315200127907C0802A693A1000C93C1001093E10014BA
+S315200127A09001001C7C7D1B783D200028817D000046
+S315200127B0812981B47C8B4800418600302C8B000016
+S315200127C041860010800900247C8B00004186001C74
+S315200127D048001EC93C00003D600000019003000036
+S315200127E03860FFFF48000084A87D00107060000853
+S315200127F04182007483DD00142C9E0000418600680E
+S3152001280070600003801D000493DD00047FFE0050EC
+S3152001281040820020801D00184800001CA01D0010C9
+S315200128203860FFFF60000040B01D00104800003CEA
+S3152001283038000000901D000C2C9F000040850028C8
+S315200128407FA3EB787FC4F3787FE5FB7848000429E2
+S315200128507C631B794081FFC87FE3F8517FDE1A1420
+S315200128604181FFE0386000008001001C7C0803A63E
+S3152001287083A1000C83C1001083E1001438210018C4
+S315200128804E8000209421FFE07C0802A693A100142B
+S3152001289093C1001893E1001C900100247C7E1B78D3
+S315200128A07C83237838810008480446417C7D1B7946
+S315200128B041820038480005457C7F1B794182002CE6
+S315200128C07FC3F3788081000838A001B6480029F13A
+S315200128D07C631B794080001C38000000B01F00106B
+S315200128E07FE3FB78480005C9386000004800002CCA
+S315200128F08001000870090008B07F0012B3BF0010E4
+S31520012900418200147FE3FB783880000038A0000262
+S31520012910480003DD7FE3FB78800100247C0803A6C1
+S3152001292083A1001483C1001883E1001C38210020F3
+S315200129304E8000209421FFD87C0802A69321000C0A
+S3152001294093410010936100149381001893A1001CF8
+S3152001295093C1002093E100249001002C7CDE337882
+S315200129603D200028817E0000812981B47C8B48008E
+S315200129707C9923787CBB2B78418600302C8B0000F8
+S3152001298041860010800900247C8B00004186001CB2
+S3152001299048001D093C00003D600000019003000035
+S315200129A038600000480000B47F9BC9D740820018D8
+S315200129B07F63DB78480000A47C7CD0507C63CB9677
+S315200129C048000098801E00082C8000004084000CDE
+S315200129D038000000901E000883FE00087C9CF84009
+S315200129E07C7D1B787F9AE378408500447FA4EB7831
+S315200129F0807E00047FE5FB784BFFE891801E000472
+S31520012A007FC3F3787C00FA14901E0004480000B1BD
+S31520012A102C8300007FBDFA147F9FE0504086FF9CE7
+S31520012A2083FE00087C9CF8404185FFC47FA4EB7897
+S31520012A30807E00047F85E3784BFFE8517F63DB7856
+S31520012A40813E0008801E00047D3C4850913E0008CE
+S31520012A507C00E214901E00048001002C7C0803A651
+S31520012A608321000C834100108361001483810018A7
+S31520012A7083A1001C83C1002083E100243821002882
+S31520012A804E8000209421FFF87C0802A69001000CBC
+S31520012A90A0030010700000092C8000094186000C5B
+S31520012AA038600000480000084BFFFCE58001000C5F
+S31520012AB07C0803A6382100084E8000209421FFF0CF
+S31520012AC07C0802A693C1000893E1000C9001001432
+S31520012AD07C7F1B78A13F0010713E0020380000004A
+S31520012AE0901F000840820020712000044082005C73
+S31520012AF0712000104082001848001BA138000009EF
+S31520012B00900300003860FFFF480001007120000893
+S31520012B10418200287FE3FB784BFFFC752C83000064
+S31520012B204086FFE493DF000CA01F001093DF001CFA
+S31520012B307000FFF7B01F0010A01F001060000004F6
+S31520012B40B01F001048000044807F00202C83000025
+S31520012B5041860038381F00307C83000041860008FA
+S31520012B604800E95D801F002C2C80000093DF0020A7
+S31520012B70901F000841860014801F0028386000003D
+S31520012B80901F000448000084801F00142C80000040
+S31520012B904086000C7FE3FB784804449DA01F00106B
+S31520012BA0700900034182000C7FE3FB784BFFFED9BD
+S31520012BB07FE3FB78809F001480BF0018909F00045C
+S31520012BC048000061907F0008801F00082C800000CB
+S31520012BD0A01F0010540004E2B01F001041850028F8
+S31520012BE04086000C600000204800001439200000B7
+S31520012BF0A01F0010913F000860000040B01F001088
+S31520012C004BFFFF0438600000800100147C0803A6F6
+S31520012C1083C1000883E1000C382100104E8000207A
+S31520012C209421FFF07C0802A693E1000C9001001488
+S31520012C307C7F1B78A87F0012480029057C631B79BD
+S31520012C4041800014801F00407C001A14901F004010
+S31520012C5048000010A01F00107000EFFFB01F0010E9
+S31520012C60800100147C0803A683E1000C38210010A2
+S31520012C704E8000209421FFE87C0802A693A1000C37
+S31520012C8093C1001093E100149001001C7C7F1B78F6
+S31520012C90A01F0010700901007C9E23787CBD2B7833
+S31520012CA041820014A87F00123880000038A000025B
+S31520012CB0480028ED7FC4F3787FA5EB78A01F00108C
+S31520012CC0A87F00127000EFFFB01F00104800289166
+S31520012CD08001001C7C0803A683A1000C83C100107F
+S31520012CE083E10014382100184E8000209421FFF042
+S31520012CF07C0802A693E1000C900100147C7F1B78CE
+S31520012D00A87F0012480028992C83FFFF40860010D7
+S31520012D10A01F00107000EFFF48000010A01F001038
+S31520012D20907F004060001000B01F00108001001449
+S31520012D307C0803A683E1000C382100104E80002078
+S31520012D409421FFF87C0802A69001000CA80300122A
+S31520012D502880000238600000408500187C03037833
+S31520012D60480027197C6318F87C63FE707C6318F889
+S31520012D708001000C7C0803A6382100084E80002023
+S31520012D809421FFF07C0802A693E1000C9001001427
+S31520012D903FE00028801F81EC2C8000004086004403
+S31520012DA03D200028806981B43880004838A0000081
+S31520012DB038C0000038E00000390000004800C80192
+S31520012DC02C8300004086001C3D2000283D60002108
+S31520012DD0396B24EC91699BEC38000001901F81EC42
+S31520012DE038600000800100147C0803A683E1000CF2
+S31520012DF0382100104E8000209421FFE87C0802A68D
+S31520012E0093A1000C93C1001093E100149001001CC2
+S31520012E104BFFFF717C7E1B793BE0000040820070F6
+S31520012E203FA00028807D81B44800FF1D7C7F1B794F
+S31520012E304182005C93DF000493DF000893DF000CDE
+S31520012E4038000001B01F00103800FFFFB01F00122C
+S31520012E5093DF001493DF001893DF001C93DF00201B
+S31520012E6093DF002493DF003493DF003893DF003CA7
+S31520012E7093DF00407FE3FB783D20002880099AF408
+S31520012E80809D81B4901F00444800FF717FE3FB7849
+S31520012E908001001C7C0803A683A1000C83C10010BD
+S31520012EA083E10014382100184E8000209421FFE888
+S31520012EB07C0802A693A1000C93C1001093E1001493
+S31520012EC09001001C7C7D1B784800FF453D20002891
+S31520012ED0806981B47FA4EB784800FE958001001CAF
+S31520012EE07C0803A683A1000C83C1001083E1001492
+S31520012EF0382100184E8000209421FFF07C0802A67C
+S31520012F0093C1000893E1000C900100143BC000001E
+S31520012F107C7F1B78807F00C42C83000041860008BB
+S31520012F204BFFF6CD3BDE00012C9E00023BFF000449
+S31520012F304085FFE4800100147C0803A683C10008B4
+S31520012F4083E1000C382100104E8000209421FFF0EF
+S31520012F507C0802A693C1000893E1000C900100149D
+S31520012F607C7E1B784BFFFE957C7F1B794082000C73
+S31520012F703860FFFF480000C82C9E000141860028CA
+S31520012F80418500102C9E000041860014480000282F
+S31520012F902C9E0002418600184800001C38000004BF
+S31520012FA04800001038000008480000083800000AD0
+S31520012FB0B01F0010B3DF00123D6000283D2000281D
+S31520012FC0800981F0816B9AF42C80000057C9103A50
+S31520012FD07D295A1493E900C44086006048000119EE
+S31520012FE0800300007C9F000041860024480000C128
+S31520012FF0800300007C9F00004186001448000141A7
+S31520013000800300007C9F0000408600303D20002880
+S3152001301080099C0C2C8000004086000848004C89C1
+S315200130203C60002138632DF8480050813D2000285E
+S3152001303038000001900981F03860000080010014F9
+S315200130407C0803A683C1000883E1000C3821001007
+S315200130504E8000209421FFF07C0802A693C100082F
+S3152001306093E1000C900100143FC00028813E9AF4A0
+S31520013070547F103A7D3F4A14800900C42C800000F9
+S31520013080408600084BFFFEC9813E9AF47D3F4A14D3
+S31520013090806900C4800100147C0803A683C100084E
+S315200130A083E1000C382100104E8000209421FFF08E
+S315200130B07C0802A693E1000C900100143FE0002851
+S315200130C0813F9AF4800900C42C8000004086000CC0
+S315200130D0386000004BFFFE79807F9AF4386300C484
+S315200130E0800100147C0803A683E1000C382100101E
+S315200130F04E8000209421FFF07C0802A693E1000C6B
+S31520013100900100143FE00028813F9AF4800900C80D
+S315200131102C8000004086000C386000014BFFFE31F8
+S31520013120807F9AF4386300C8800100147C0803A6C6
+S3152001313083E1000C382100104E8000209421FFF0FD
+S315200131407C0802A693E1000C900100143FE00028C0
+S31520013150813F9AF4800900CC2C8000004086000C27
+S31520013160386000024BFFFDE9807F9AF4386300CC7A
+S31520013170800100147C0803A683E1000C382100108D
+S315200131804E8000209421FFF87C0802A69001000CB5
+S315200131903880000038A0000A480000158001000C84
+S315200131A07C0803A6382100084E8000209421FFE0E8
+S315200131B07C0802A69361000C9381001093A1001450
+S315200131C093C1001893E1001C900100247C7B1B789D
+S315200131D07C9C23787F7EDB7838E000003D20002828
+S315200131E0816981B0895E00007C0B50AE7009002890
+S315200131F03BDE00014082FFF02C8A002D4086000C28
+S3152001320038E000014800000C2C8A002B4086000C77
+S31520013210895E00003BDE0001200500007D20291487
+S3152001322068A00010216000007C0B01147D2B03791E
+S315200132304182003C2C8A003040860034881E0000E2
+S3152001324068090078216900007D2B4914680000581F
+S31520013250216000007C0B01147D2B03794182001033
+S31520013260895E00013BDE000238A000102C8500009B
+S3152001327040860020694000307C09FE707D2002785E
+S315200132807C0048507C00FE707000000A6005000832
+S315200132903127FFFF7D2949107D2048F85400000081
+S315200132A05529007E7D2803787D682B963BE000001A
+S315200132B03BA000003D2000287C0B29D6808981B0C7
+S315200132C07CC040507D685B787D2450AE712000041F
+S315200132D04182000C394AFFD04800002471200003A6
+S315200132E04182007C712000014182000C380AFFC90D
+S315200132F048000008380AFFA97C0A03787C8A28003E
+S315200133004084005C57A00FFE7D3F40107D29491067
+S315200133107D2900D07C0B4B79408200247C8A3000A9
+S315200133207FE94278200900007D2049147C0000268F
+S31520013330540037FE7D2B00394182000C3BA0FFFF54
+S31520013340480000107FFF29D63BA000017FFF5214C1
+S31520013350895E00003BDE00014BFFFF702C9D0000C3
+S315200133604084002C3127FFFF7D2949107D2048F814
+S31520013370540000005529007E7D3F03784800131D27
+S3152001338038000026900300004800001C3007FFFF8C
+S315200133907C0001107D3F00D07FEB00387D23007833
+S315200133A07D7F1B782C9C00004186001C2C9D0000F3
+S315200133B041860010381EFFFF901C000048000008BF
+S315200133C0937C00007FE3FB78800100247C0803A620
+S315200133D08361000C8381001083A1001483C100182E
+S315200133E083E1001C382100204E8000209421FFE03B
+S315200133F07C0802A69361000C9381001093A100140E
+S3152001340093C1001893E1001C900100247C7B1B785A
+S315200134107C9C23787F7EDB78388000003D20002845
+S31520013420816981B0895E00007C0B50AE700900284D
+S315200134303BDE00014082FFF02C8A002D4086000CE5
+S31520013440388000014800000C2C8A002B4086000C95
+S31520013450895E00003BDE0001200500007D20291445
+S3152001346068A00010216000007C0B01147D2B0379DC
+S315200134704182003C2C8A003040860034881E0000A0
+S3152001348068090078216900007D2B491468000058DD
+S31520013490216000007C0B01147D2B037941820010F1
+S315200134A0895E00013BDE000238A000102C85000059
+S315200134B040860020694000307C09FE707D2002781C
+S315200134C07C0048507C00FE707000000A60050008F0
+S315200134D03800FFFF7D002B963BE000003BA000005B
+S315200134E03D2000287C0829D680C981B07C0700F8B8
+S315200134F07D2650AE712000044182000C394AFFD04E
+S3152001350048000024712000034182007C71200001C3
+S315200135104182000C380AFFC948000008380AFFA971
+S315200135207C0A03787C8A28004084005C57A00FFE21
+S315200135307D3F40107D2949107D2900D07C0B4B7998
+S31520013540408200247C8A38007FE9427820090000E5
+S315200135507D2049147C000026540037FE7D2B00393E
+S315200135604182000C3BA0FFFF480000107FFF29D6B7
+S315200135703BA000017FFF5214895E00003BDE000163
+S315200135804BFFFF702C9D0000408400183BE0FFFF9D
+S315200135904800110938000026900300004800001C4D
+S315200135A03004FFFF7C0001107D3F00D07FEB003807
+S315200135B07D2300787D7F1B782C9C00004186001C92
+S315200135C02C9D000041860010381EFFFF901C000034
+S315200135D048000008937C00007FE3FB7880010024EB
+S315200135E07C0803A68361000C8381001083A100144B
+S315200135F083C1001883E1001C382100204E80002061
+S315200136009421FFE87C0802A693A1000C93C1001027
+S3152001361093E100149001001C7C7D1B787C83237828
+S315200136207FA4EB784BFFDC657FA3EB788001001C40
+S315200136307C0803A683A1000C83C1001083E100143A
+S31520013640382100184E8000209421FFE87C0802A62C
+S3152001365093A1000C93C1001093E100149001001C6A
+S315200136607C7D1B787C8023787CA42B787C05037851
+S315200136704BFFDE3D7FA3EB788001001C7C0803A66F
+S3152001368083A1000C83C1001083E1001438210018A6
+S315200136904E800020880300002C8000003923000181
+S315200136A041860014880900002C8000003929000178
+S315200136B04086FFF4880400002C8000003884000135
+S315200136C09C09FFFF392900014D860020880400004E
+S315200136D02C80000038840001980900003929000156
+S315200136E04086FFEC4E800020480000188803FFFF2B
+S315200136F02C8000004086000C386000004E8000209F
+S3152001370088030000892400007C8048003884000159
+S31520013710386300014186FFD88803FFFF8864FFFFD5
+S315200137207C6300504E800020880400002C8000001D
+S315200137303884000139230001980300004D860020BA
+S31520013740880400002C8000003884000198090000BC
+S31520013750392900014086FFEC4E80002088030000B5
+S315200137602C800000392300017D234B7841860014EB
+S31520013770880300002C800000386300014086FFF496
+S315200137807C6918504E8000207CA52B79408200242C
+S31520013790386000004E8000208803FFFF2C80000047
+S315200137A04186FFF034A5FFFF408200084BFFFFE46E
+S315200137B088030000892400007C80480038840001A9
+S315200137C0386300014186FFD48803FFFF8864FFFF29
+S315200137D07C6300504E8000207CA52B794D820020F1
+S315200137E0880400002C800000388400013923000160
+S315200137F0980300004186002834A5FFFF4082000877
+S3152001380048000040880400002C8000003884000114
+S3152001381098090000392900014086FFE034A5FFFF01
+S31520013820408200084800001C38000000980900006A
+S315200138303929000134A5FFFF418200084BFFFFF023
+S315200138404E8000209421FFE87C0802A693A1000C5B
+S3152001385093C1001093E100149001001C7C7F1B7919
+S315200138607C9D23787CBE2B784082001883FE000045
+S315200138702C9F00004086000C38600000480000584C
+S315200138807FE3FB787FA4EB7848043A2D7C1F18EE62
+S315200138905400063E2C80000040860010901E000039
+S315200138A038600000480000307FE3FB787FA4EB7886
+S315200138B0480439B12C830000907E00004186001413
+S315200138C038030001901E0000380000009803000014
+S315200138D07FE3FB788001001C7C0803A683A1000CF2
+S315200138E083C1001083E10014382100184E80002086
+S315200138F09421FFF87C0802A69001000C4BFFDDB550
+S315200139008001000C7C0803A6382100084E80002087
+S315200139109421FFF87C0802A69001000C3D20002886
+S3152001392080098B7C2C800000418600107C0803A630
+S315200139304E800021480000083860FFFF8001000CFE
+S315200139407C0803A6382100084E8000209421FFF828
+S315200139507C0802A69001000C3D20002880098B805E
+S315200139602C800000418600107C0803A64E80002191
+S31520013970480000083860FFFF8001000C7C0803A680
+S31520013980382100084E8000209421FFF87C0802A6E9
+S315200139909001000C3D20002880098B842C8000009A
+S315200139A0418600107C0803A64E80002148000008AD
+S315200139B03860FFFF8001000C7C0803A6382100082F
+S315200139C04E8000209421FFF87C0802A69001000C6D
+S315200139D03D20002880098B882C800000418600101C
+S315200139E07C0803A64E800021480000083860FFFFAE
+S315200139F08001000C7C0803A6382100084E80002097
+S31520013A009421FFF87C0802A69001000C3D20002895
+S31520013A1080098B8C2C800000418600107C0803A62F
+S31520013A204E80002148000008386000008001000C0B
+S31520013A307C0803A6382100084E8000209421FFF837
+S31520013A407C0802A69001000C3D20002880098B905D
+S31520013A502C800000418600107C0803A64E800021A0
+S31520013A6048000008386000008001000C7C0803A68D
+S31520013A70382100084E8000209421FFF87C0802A6F8
+S31520013A809001000C3D20002880098B942C80000099
+S31520013A90418600107C0803A64E80002148000008BC
+S31520013AA03860FFFF8001000C7C0803A6382100083E
+S31520013AB04E8000209421FFF87C0802A69001000C7C
+S31520013AC03D20002880098B9C2C8000004186001017
+S31520013AD07C0803A64E8000214800000838600000BB
+S31520013AE08001000C7C0803A6382100084E800020A6
+S31520013AF09421FFF87C0802A69001000C2C83FFFF7D
+S31520013B004086000C3860FFFF480000243D20002835
+S31520013B1080098B982C800000418600107C0803A622
+S31520013B204E80002148000008386000008001000C0A
+S31520013B307C0803A6382100084E8000209421FFF836
+S31520013B407C0802A69001000C3D200028800981F402
+S31520013B502C800000418600107C0803A64E8000219F
+S31520013B60480000084800D92D8001000C7C0803A6D6
+S31520013B70382100084E8000209421FFF87C0802A6F7
+S31520013B809001000C3D200028800981F82C8000003E
+S31520013B90408600104800D929386000004800000CF2
+S31520013BA07C0803A64E8000218001000C7C0803A618
+S31520013BB0382100084E8000203D20002880098200FF
+S31520013BC02C800000418600143D200028816981FC5B
+S31520013BD071680010418200643D20002838000000F1
+S31520013BE0900981F43D200028900981F83D20002884
+S31520013BF03D60002880E98BB039298BB090EB8BD0C2
+S31520013C0081090004396B8BD0910B000480090008CF
+S31520013C108149000C3D200028900B0008914B000C97
+S31520013C2090E98BC039298BC09109000490090008BD
+S31520013C309149000C4E8000203D4000283D2000285F
+S31520013C4038E98B7C7160000180070014392A8BD0FA
+S31520013C50900900044182000C910A8BD04800000C87
+S31520013C6080070010900A8BD03D200028800982040D
+S31520013C702C8000004186004C3D20002838000000A1
+S31520013C8090098BC039298BC0900900043D6000281A
+S31520013C90396B8B7C800B002C814B003090090008FE
+S31520013CA09149000C800B00243D200028900981F4C5
+S31520013CB0800B00283D200028900981F84E800020A5
+S31520013CC03D200028900981F43D200028900981F8A3
+S31520013CD03D2000283D60002880098BD039298BD0D2
+S31520013CE0900B8BC080090004396B8BC0900B0004AC
+S31520013CF0800900088129000C900B0008912B000CEB
+S31520013D004E8000209421FFF87C0802A69001000C29
+S31520013D10800300002C800000418600147C0803A645
+S31520013D20386000014E8000214800000838600000FC
+S31520013D308001000C7C0803A6382100084E80002053
+S31520013D409421FFF87C0802A69001000C8003000450
+S31520013D502C800000418600147C0803A638600001EF
+S31520013D604E80002148000008386000008001000CC8
+S31520013D707C0803A6382100084E8000209421FFF8F4
+S31520013D807C0802A69001000C800300082C8000000C
+S31520013D90418600147C0803A67C8323784E8000216B
+S31520013DA0480000087C8323788001000C7C0803A648
+S31520013DB0382100084E8000209421FFF87C0802A6B5
+S31520013DC09001000C8003000C2C8000004186001419
+S31520013DD07C0803A67C8323784E80002148000008B6
+S31520013DE07C8323788001000C7C0803A638210008F7
+S31520013DF04E8000209421FFF07C0802A693E1000C5E
+S31520013E00900100147C7F1B783860003238800004D2
+S31520013E104800C76D2C8300003D20002890699A78C0
+S31520013E204186004C3D20002838000032900982ACA2
+S31520013E302C9F00003D20002838000000900982B008
+S31520013E40418600343C60002138633D8C48003E7D2C
+S31520013E502C830000408600183C60002138633FA86F
+S31520013E60480042492C8300004186000C3860FFFF40
+S31520013E704800000838600000800100147C0803A671
+S31520013E8083E1000C382100104E8000209421FFF0A0
+S31520013E907C0802A693E1000C900100147C7F1B781C
+S31520013EA0801F003870000080418200883860000041
+S31520013EB0480144E9800300DC2C8000004086002074
+S31520013EC03D20002880099A783D200028808982ACEF
+S31520013ED03D20002880A982B04800000C808300E0A4
+S31520013EE080A300E47C0303787FE6FB784800005D2D
+S31520013EF02C83FFFF408600403C6000273863412821
+S31520013F003880000038A0000038C0000038E00000EA
+S31520013F10390000003920000048002E5D7FE3FB7840
+S31520013F203880008038A0000048007E2D4800000817
+S31520013F30901F00DC800100147C0803A683E1000C9D
+S31520013F40382100104E8000209421FFD87C0802A63B
+S31520013F509321000C93410010936100149381001862
+S31520013F6093A1001C93C1002093E100249001002C11
+S31520013F707C791B787C9F23787CBD2B787CDC3378FD
+S31520013F807FE3FB78388000044800C5F57C7B1B79EC
+S31520013F90408200203860FFFF48000080809C00E4BA
+S31520013FA07F63DB78480000A13860FFFF4800006C82
+S31520013FB093FC00E02C9D000038000000901C00E4DA
+S31520013FC0937C00DC408500503BC0000057BA103A74
+S31520013FD07FBEC82E7FA3EB784BFFF78538630001A0
+S31520013FE04800D4B17C7F1B794182FFB47FE3FB7803
+S31520013FF07FA4EB784BFFF7357FFED92E3BDE0004FD
+S31520014000801C00E47C9ED00030000001901C00E45E
+S315200140104184FFC0386000008001002C7C0803A683
+S315200140208321000C834100108361001483810018D1
+S3152001403083A1001C83C1002083E1002438210028AC
+S315200140404E8000209421FFE87C0802A693A1000C53
+S3152001405093C1001093E100149001001C7C84237904
+S315200140607C7E1B78408100203BE00000549D103A65
+S315200140707C7FF02E3BFF00044800D4457C9FE8005E
+S315200140804184FFF07FC3F3784800D4358001001CBA
+S315200140907C0803A683A1000C83C1001083E10014D0
+S315200140A0382100184E8000209421FFF87C0802A6B2
+S315200140B09001000C80030038700900804182001CA9
+S315200140C0800300DC2C80000041860010808300E400
+S315200140D07C0303784BFFFF718001000C7C0803A64B
+S315200140E0382100084E8000209421FFE07C0802A69A
+S315200140F09361000C9381001093A1001493C10018C1
+S3152001410093E1001C900100242C84FFFF7C7F1B7807
+S31520014110418600102C84000041860044480000603E
+S3152001412038600032388000044800C4557C7D1B79F4
+S315200141304182008C7FE3FB78480142617C691B79CF
+S315200141404182007C38000032900900E038000000EE
+S31520014150900900E493A900DC4800006C3D2000286A
+S315200141603D6000283D40002883A99A78838B82AC44
+S31520014170836A82B0480141AD480000287FE3FB787D
+S31520014180480142197C691B7941820034386000005C
+S3152001419083A900DC838900E0836900E4480141FDAD
+S315200141A07C661B787FA3EB787F84E3787F65DB7859
+S315200141B04BFFFD992C83FFFF4086000C3860FFFFE3
+S315200141C0480000187FE3FB783880008038A0008003
+S315200141D048007B8538600000800100247C0803A606
+S315200141E08361000C8381001083A1001483C1001810
+S315200141F083E1001C382100204E8000209421FFF00D
+S315200142007C0802A693C1000893E1000C90010014DA
+S315200142107C7E1B78480141857C7F1B794182003059
+S31520014220807F00DC809F00E44BFFFE1D38000000EC
+S31520014230901F00DC7FC3F3783880008038A000000F
+S3152001424048007B1538600000480000083860FFFFF1
+S31520014250800100147C0803A683C1000883E1000CB9
+S31520014260382100104E8000209421FFE87C0802A608
+S315200142709381000893A1000C93C1001093E10014CF
+S315200142809001001C7C7C1B78386000004801410DA0
+S31520014290881C0000680900207D2900D055290FFEC1
+S315200142A0680000097C0000D054000FFE7D2B0039E8
+S315200142B07F9FE3787C7D1B7841820048881F000020
+S315200142C06809003D7D2900D055290FFE7C0000D0CC
+S315200142D054000FFE7D2B0039418200288C1F0001DE
+S315200142E0680900207D2900D055290FFE68000009A4
+S315200142F07C0000D054000FFE7D2B00394082FFC088
+S315200143007F83E3787C9CF850480001D97C7F1B7918
+S31520014310408200D0807D00DC2C8300004086003066
+S315200143203D2000283D60002880699A783D2000289C
+S3152001433083CB82B0814982AC381E0001900B82B0BA
+S3152001434057C0103A7FE302144800002083DD00E4C1
+S31520014350815D00E0813D00DC381E0001901D00E4F6
+S3152001436057C0103A7FE902147C8AF0004086007C0F
+S31520014370389E00325484103A4800C25D7C7F1B79F6
+S315200143804082000C3860FFFF4800008057C3103A76
+S315200143907C7F1A14388000C84800597D801D00DCB6
+S315200143A02C800000408600203D6000283D2000280A
+S315200143B0800982AC93EB9A7830000032900982AC66
+S315200143C048000014801D00E093FD00DC300000321F
+S315200143D0901D00E057C0103A7FFF02144800000CE0
+S315200143E0807F00004800D0D97F83E3784BFFF371AB
+S315200143F0386300014800D09D907F00007F84E378D8
+S315200144004BFFF329386000008001001C7C0803A6BD
+S315200144108381000883A1000C83C1001083E100146D
+S31520014420382100184E8000209421FFF07C0802A636
+S3152001443093C1000893E1000C900100147C7F1B7846
+S315200144404BFFF31D7C641B787FE3FB7848000095C6
+S315200144507C7E1B794082000C386000004800006C8D
+S315200144607FE3FB784BFFF2F9817E00007D0B18AECE
+S3152001447069090020200900007D20491469000009EE
+S31520014480214000007C0A01147D2A03797C6B1A14D1
+S315200144904082000C2C88003D408600308D4300016F
+S315200144A069490020200900007D204914694000093E
+S315200144B0216000007C0B01147D2B03794082FFE0F3
+S315200144C02C8A003D4186FFD8800100147C0803A672
+S315200144D083C1000883E1000C382100104E800020A2
+S315200144E09421FFE07C0802A69361000C93810010C1
+S315200144F093A1001493C1001893E1001C900100249C
+S315200145007C7B1B787C9C23783860000048013E8D9B
+S315200145107C691B78806900DC2C83000040860018AA
+S315200145203D20002883E99A783D20002883A982B07E
+S315200145304800000C7C7F1B7883A900E43BC0000067
+S315200145407C9EE800408400787F63DB78809F0000B2
+S315200145507F85E3784BFFF2352C830000408600509F
+S31520014560813F00007D49E0AE694900202009000015
+S315200145707D20491469400009216000007C0B01144B
+S315200145807D2B0379408200206949003D20090000E6
+S315200145907D204914216A00007C0B51147D2B03795F
+S315200145A04182000C7FE3FB78480000183BDE0001C6
+S315200145B07C9EE8003BFF00044184FF9038600000A8
+S315200145C0800100247C0803A68361000C83810010EE
+S315200145D083A1001483C1001883E1001C3821002027
+S315200145E04E8000209421FFE87C0802A693810008D2
+S315200145F093A1000C93C1001093E100149001001CBB
+S3152001460048013D997C7F1B78801F00DC2C800000AF
+S31520014610408600243C6000273863416048007FA122
+S315200146203D20002883C99A783D20002883A982B09D
+S31520014630480000183C6000273863417848007F8194
+S3152001464083DF00DC83BF00E43BE000007C9FE800C1
+S31520014650408400283F800027387C41907FE4FB7806
+S3152001466080BE00003BFF000148007F557C9FE8008B
+S315200146703BDE00044184FFE48001001C7C0803A684
+S315200146808381000883A1000C83C1001083E10014FB
+S31520014690382100184E8000203C60002838639A7C1F
+S315200146A04E8000203D20002880699A7C4E80002083
+S315200146B09421FFF07C0802A693E1000C90010014DE
+S315200146C07C7F1B794182001048013C597C9F180050
+S315200146D0408600103D20002880699A7C4800001CF5
+S315200146E07FE3FB7848013CB57C691B793860FFFF85
+S315200146F04182000880690084800100147C0803A699
+S3152001470083E1000C382100104E8000203D20002836
+S3152001471090699A7C386000004E8000209421FFF039
+S315200147207C0802A693C1000893E1000C90010014B5
+S315200147307C7F1B797C9E23784182001048013BE5D2
+S315200147407C9F1800408600143D20002893C99A7C3E
+S3152001475038600000480000247FE3FB7848013C3D97
+S315200147607C631B794182001093C30084386000006A
+S31520014770480000083860FFFF800100147C0803A66A
+S3152001478083C1000883E1000C382100104E800020EF
+S315200147909421FFD07C0802A693E1002C90010034DD
+S315200147A0480422C97C7F1B79408200343D60002861
+S315200147B03D2000213929476C912B9C303860000A15
+S315200147C03880001C38A000004800CDE92C83000069
+S315200147D03D20002890699A804086000C3860FFFFB2
+S315200147E04800006C93E1000893E1000C93E100106E
+S315200147F093E1001493E1001893E1001C93E100205A
+S315200148003D2000283C60002738634198808982B486
+S315200148103D2000283D6000283CE0002138E747F490
+S315200148203900000080A982B83920000080CB82BCE3
+S3152001483039400000480117E13D20002890699A88F7
+S315200148402063FFFF3063FFFF7C6319108001003472
+S315200148507C0803A683E1002C382100304E800020FD
+S315200148603D20002890699A844E8000209421FFD80B
+S315200148707C0802A69001002C906100089081000C12
+S3152001488090A1001090C1001490E100189101001C24
+S31520014890912100203D6000283D2000283881000814
+S315200148A038A0001C38E0000080C98304806B9A8000
+S315200148B03806FFFF7CC603787CC6FE704800D4FD0F
+S315200148C02C8300004086000C386000004800001848
+S315200148D03D200028800982C03860FFFF300000019A
+S315200148E0900982C08001002C7C0803A6382100286B
+S315200148F04E8000209421FFD07C0802A693C1002877
+S3152001490093E1002C900100343FC000283D2000286F
+S3152001491080699A803881000838A0001C38C0FFFFC2
+S315200149204800D7E92C83001C418600304BFFFD6DE2
+S31520014930808300003C600027386341A438A0000032
+S3152001494038C0000038E0000039000000392000009E
+S3152001495048002425480000288061000C8081001031
+S3152001496080A100148001000880C100187C0803A6DC
+S3152001497080E1001C810100204E8000213D2000287D
+S3152001498083E982C0801E82C47C9F00004186FF800D
+S315200149903C600027386341D47C80F85038A0000061
+S315200149A038C0000038E0000039000000392000003E
+S315200149B0480023C593FE82C44BFFFF549421FFF088
+S315200149C07C0802A693E1000C900100143FE0002828
+S315200149D0801F83002C800000408600403D20002857
+S315200149E0806982C83880001838A000003CC00021A8
+S315200149F038C6493C3CE0002138E749D03D0000213A
+S31520014A0039084AA84800ABB92C8300004086000C1F
+S31520014A1038000001901F83003D2000288069830013
+S31520014A203063FFFF7C631910800100147C0803A604
+S31520014A3083E1000C382100104E8000209421FFD8FC
+S31520014A407C0802A6936100149381001893A1001C8F
+S31520014A5093C1002093E100249001002C7C7E1B78D9
+S31520014A607C9D23787CBC2B787CDB33783D20002809
+S31520014A70806982C8388000087C84F03038A100081B
+S31520014A804800E1F97C7F1B79418200207FE3FB7896
+S31520014A90808100087FC5F3787FA6EB787F87E3784E
+S31520014AA07F68DB784800002D7FE3FB788001002CAE
+S31520014AB07C0803A6836100148381001883A1001C4E
+S31520014AC083C1002083E10024382100284E80002064
+S31520014AD09421FFF07C0802A693C1000893E1000C03
+S31520014AE0900100147C7E1B78380000017C00283060
+S31520014AF0901E000490DE0008801E00043BE00000AA
+S31520014B007C9F000090FE000C911E0010909E0014C8
+S31520014B1040840024801E001457E318387C601A1440
+S31520014B2048006EB5801E00043BFF00017C9F0000FB
+S31520014B304184FFE43D200028808982C87FC3F37821
+S31520014B404800E2B938600000800100147C0803A601
+S31520014B5083C1000883E1000C382100104E8000201B
+S31520014B609421FFF87C0802A69001000C38800001F0
+S31520014B70480000398001000C7C0803A63821000872
+S31520014B804E8000209421FFF87C0802A69001000C9B
+S31520014B9038800000480000158001000C7C0803A61F
+S31520014BA0382100084E8000209421FFF07C0802A6BF
+S31520014BB093C1000893E1000C900100147C7F1B78BF
+S31520014BC03D200028817F0000812982C87C8B4800F6
+S31520014BD07C9E2378418600302C8B00004186001074
+S31520014BE0800900247C8B00004186001C4BFFFAAD16
+S31520014BF03C00003D60000001900300003860FFFF8B
+S31520014C004800002C7FE3FB784800E2052C9E00003B
+S31520014C104086000C38600000480000143D20002822
+S31520014C20806982C87FE4FB784800E1458001001451
+S31520014C307C0803A683C1000883E1000C38210010FB
+S31520014C404E8000209421FFF07C0802A693C1000823
+S31520014C5093E1000C900100147C7F1B783D200028F5
+S31520014C60817F0000812982C87C8B48007C9E237825
+S31520014C70418600302C8B00004186001080090024DB
+S31520014C807C8B00004186001C4BFFFA113C00003D45
+S31520014C9060000001900300003860FFFF48000034E7
+S31520014CA0801F000C7C0803A6807F000480BF0010B3
+S31520014CB07FC4F3784E8000217FC4F378801F0014CF
+S31520014CC0546318387C601A1448006D4D3860000012
+S31520014CD0800100147C0803A683C1000883E1000C2F
+S31520014CE0382100104E8000209421FFE87C0802A67E
+S31520014CF09381000893A1000C93C1001093E1001445
+S31520014D009001001C7C7E1B783D200028817E0000BE
+S31520014D10812982C87C8B48007C9D23787CBC2B789A
+S31520014D20418600302C8B000041860010800900242A
+S31520014D307C8B00004186001C4BFFF9613C00003D45
+S31520014D406000000190030000386000004800006008
+S31520014D50801E000C7C0803A6807E000480BE001005
+S31520014D607FA4EB784E800021813E001454631838CD
+S31520014D707FE3482E2C9F000041860030801E0008CC
+S31520014D807C0803A67FA3EB787FE4FB787F85E37815
+S31520014D904E8000212C8300004086001083FF0000F6
+S31520014DA02C9F00004086FFD87FE3FB788001001C02
+S31520014DB07C0803A68381000883A1000C83C100100F
+S31520014DC083E10014382100184E8000209421FFE849
+S31520014DD07C0802A693A1000C93C1001093E1001454
+S31520014DE09001001C7C7F1B783D200028817F0000DC
+S31520014DF0812982C87C8B48007C9E2378418600309D
+S31520014E002C8B000041860010800900247C8B000039
+S31520014E104186001C4BFFF8853C00003D60000001E7
+S31520014E20900300003860FFFF48000048801F000CF7
+S31520014E307C0803A6807F000480BF00107FC4F3781E
+S31520014E404E8000217FC4F378801F0014547D1838CA
+S31520014E507C60EA1448006C617C651B78807F0014B5
+S31520014E607FC4F3787C63EA1448006C15386000002F
+S31520014E708001001C7C0803A683A1000C83C10010BD
+S31520014E8083E10014382100184E8000209421FFE888
+S31520014E907C0802A69381000893A1000C93C10010FF
+S31520014EA093E100149001001C7C7E1B783D20002894
+S31520014EB0817E0000812982C87C8B48007C9D2378D5
+S31520014EC07CBC2B7838600000418600302C8B00009A
+S31520014ED041860010800900247C8B00004186001C3D
+S31520014EE04BFFF7B93C00003D600000019003000034
+S31520014EF03860000048000064801E00042163000021
+S31520014F007D2B1914200000007C0001D454000FFED3
+S31520014F107C0B48393BE000004182004057E31838BA
+S31520014F207FA4EB78801E00147F85E3787C601A14B9
+S31520014F3048006BF9801E00043BFF00017C9F0000A6
+S31520014F40216300007C0B19147D20002655292FFE94
+S31520014F507D2B00394082FFC88001001C7C0803A6F6
+S31520014F608381000883A1000C83C1001083E1001412
+S31520014F70382100184E80002081640004892B00000E
+S31520014F802C89000038000000418600187C0029D6B3
+S31520014F907C0902148D2B00012C8900004086FFF02C
+S31520014FA03863FFFF7C0318384E80002080040004FC
+S31520014FB07D202BD67D2929D63863FFFF7C09005019
+S31520014FC07C0318384E8000209421FFE87C0802A635
+S31520014FD09381000893A1000C93C1001093E1001462
+S31520014FE09001001C7C7C1B7883A400047FBD29D6FC
+S31520014FF048041D71206300213B9CFFFF7FBD1E30AD
+S315200150007FA3E0388001001C7C0803A68381000869
+S3152001501083A1000C83C1001083E1001438210018FC
+S315200150204E80002080030004806400047C031A78EB
+S31520015030212300007C6919144E8000209421FFF859
+S315200150407C0802A69001000C806300048084000481
+S315200150504BFFE699200300007C6019148001000CA7
+S315200150607C0803A6382100084E8000209421FFF8F1
+S315200150707C0802A69001000C480000392C83000010
+S315200150804186001C4BFFF6153C00004360000001E1
+S31520015090900300003860FFFF4800000838600000D8
+S315200150A08001000C7C0803A6382100084E800020D0
+S315200150B03D200028800983047C03FE707C60185003
+S315200150C054630FFE4E8000203D2000288069830412
+S315200150D04E8000209421FED87C0802A693610114FB
+S315200150E09381011893A1011C93C1012093E101240D
+S315200150F09001012C7C7D1B78881D00002C800000EE
+S315200151007C9B2378408600183C60000C6063000776
+S315200151104BFFF5FD3860FFFF480001047FA3EB78C4
+S315200151203C800027388441FC4BFFE5C17C69FE7039
+S315200151307D201A787C0048507C00FE70393D0001A4
+S315200151407FAB00387D2300787D7D1B787FA3EB78AC
+S315200151503881010838A10008480006FD2C83FFFF8D
+S315200151604186FFB4806101083880000038A0000024
+S31520015170480014C17C7C1B782C9CFFFF4186FF983C
+S3152001518080610108388100087F65DB78480015A118
+S315200151907C661B782C86FFFF408600107F83E37890
+S315200151A0480012D54BFFFF702C86FFFE4086005C1F
+S315200151B03BC10008386100083881010C48001059AC
+S315200151C07C7F1B794182FF508081010C7C9E2000CF
+S315200151D0418600107FC3F3784BFFE5514800000854
+S315200151E083E101087FE3FB78388100087F65DB785E
+S315200151F04800153D7C661B782C86FFFF4186FFA063
+S315200152002C86FFFE4186FFB07F83E37880810108EB
+S315200152107FA5EB78480013517F83E3788001012C29
+S315200152207C0803A6836101148381011883A1011CD3
+S3152001523083C1012083E10124382101284E800020E9
+S315200152409421FFF87C0802A69001000C4800001565
+S315200152508001000C7C0803A6382100084E8000201E
+S315200152609421FEF07C0802A6900101148803000017
+S315200152702C800000418600283881010838A10008C9
+S31520015280480005D52C83FFFF418600208061010857
+S3152001529038810008480014E1480000143C60000CE5
+S315200152A0606300074BFFF4693860FFFF800101143A
+S315200152B07C0803A6382101104E8000209421FED0BF
+S315200152C07C0802A693210114934101189361011CC4
+S315200152D09381012093A1012493C1012893E1012CFB
+S315200152E0900101347C7E1B78881E00002C800000F2
+S315200152F07C9A23787CB92B783B6000004086001885
+S315200153003C60000C606300074BFFF4053860FFFF2B
+S315200153104800013C3C600027386341FC7FC4F37898
+S315200153204BFFE3C97C69FE707D201A787C004850CA
+S315200153307C00FE70393E00017FCB00387D2300784A
+S315200153407D7E1B787FC3F3783881010838A1000858
+S31520015350480005052C83FFFF4186FFB480610108C3
+S315200153603880000038A00000480012C97C7C1B78D8
+S315200153702C9CFFFF4186FF98806101083881000837
+S315200153807F45D3787F26CB78480014397C661B78F5
+S315200153902C86FFFF408600107F83E378480010D9D2
+S315200153A04BFFFF6C2C86FFFE408600903BA1000838
+S315200153B0386100083881010C48000E5D7C7F1B791D
+S315200153C04182FF4C8081010C7C9D2000418600108A
+S315200153D07FA3EB784BFFE3554800000883E10108E2
+S315200153E07FE3FB78388100087F45D3787F26CB7809
+S315200153F0480013D17C661B782C86FFFE4086002C44
+S315200154003D200028812983087F60DB787C80480045
+S315200154103B7B0001408500144BFFF28138000040A0
+S315200154209003000038C0FFFF2C86FFFF4186FF6CEA
+S315200154302C86FFFE4186FF7C7F83E37880810108ED
+S315200154407FC5F378480011217F83E37880010134F9
+S315200154507C0803A683210114834101188361011C61
+S315200154608381012083A1012483C1012883E1012CA9
+S31520015470382101304E8000209421FFF87C0802A6B5
+S315200154809001000C480013898001000C7C0803A6BA
+S31520015490382100084E8000209421FFE87C0802A6CE
+S315200154A093A1000C93C1001093E100149001001CFC
+S315200154B0200300007D201914216400007C0B211497
+S315200154C07D2B03797C9D237840820010881D000066
+S315200154D02C80000040860010386000024BFFF2311C
+S315200154E04800003C3880000038A000004BFFFDD169
+S315200154F07C7F1B79418000287FE3FB783880000A76
+S315200155007FA5EB78480000797C7D1B787FE3FB78CB
+S315200155104BFFFF697FA3EB78480000083860FFFF47
+S315200155208001001C7C0803A683A1000C83C1001006
+S3152001553083E10014382100184E8000209421FFF8C1
+S315200155407C0802A69001000C480013B58001000CCE
+S315200155507C0803A6382100084E8000209421FFF8FC
+S315200155607C0802A69001000C4800148D8001000CD5
+S315200155707C0803A6382100084E8000209421FFF8DC
+S315200155807C0802A69001000C480015658001000CDC
+S315200155907C0803A6382100084E8000209421FFE0D4
+S315200155A07C0802A693A1001493C1001893E1001C64
+S315200155B0900100242C8500017C7D1B787C9E23781C
+S315200155C04186002C418500102C850000418600145F
+S315200155D0480000B42C85000241860040480000A8FE
+S315200155E07FA3EB7838800007480000787FA3EB780B
+S315200155F03880000838A000004BFFFF857C7F1B7890
+S315200156002C9FFFFF418600807FDEFA147FA3EB7873
+S31520015610388000074800004C7FA3EB7838800008CB
+S3152001562038A000004BFFFF597C7F1B782C9FFFFF82
+S31520015630418600547FA3EB783880000138A1000809
+S315200156404BFFFF3D2C83FFFF4186003C7FA3EB7878
+S3152001565080010008388000077C1F02147FDE0214B7
+S315200156607FC5F3784BFFFF197C60FE707C031A78A7
+S315200156707C6300507C63FE707FC418787C6323783A
+S31520015680480000083860FFFF800100247C0803A63B
+S3152001569083A1001483C1001883E1001C3821002056
+S315200156A04E8000209421FFD87C0802A69321000C6D
+S315200156B093410010936100149381001893A1001C5B
+S315200156C093C1002093E100249001002C7CB92B7812
+S315200156D03BC000007C9EC8007C7A1B783B600000A2
+S315200156E0408400707C9C237883FC00042C9F00005E
+S315200156F083BC00004085004C7F43D3787FA4EB78A0
+S315200157007FE5FB78480011F92C83FFFF4086001CBA
+S31520015710387EFFFF7FC31B787C63FE707FC01878BD
+S315200157207C630378480000302C83000041860024E6
+S315200157307FE3F8517FDE1A147FBD1A144181FFBC25
+S315200157403B7B00017C9BC8003B9C00084184FF9C5D
+S315200157507FC3F3788001002C7C0803A68321000CEB
+S3152001576083410010836100148381001883A1001CEA
+S3152001577083C1002083E10024382100284E800020A7
+S315200157809421FFD87C0802A69321000C9341001096
+S31520015790936100149381001893A1001C93C10020EA
+S315200157A093E100249001002C7CB92B783BA00000CA
+S315200157B07C9DC8007C7A1B783B6000004084006891
+S315200157C07C9C237883FC00042C9F000083DC000052
+S315200157D0408500447F43D3787FC4F3787FE5FB7807
+S315200157E0480012152C83FFFF4086001C387DFFFFE1
+S315200157F07FA31B787C63FE707FA018787C63037877
+S31520015800480000287FE3F8517FBD1A147FDE1A1461
+S315200158104181FFC43B7B00017C9BC8003B9C000867
+S315200158204184FFA47FA3EB788001002C7C0803A68A
+S315200158308321000C834100108361001483810018A9
+S3152001584083A1001C83C1002083E100243821002884
+S315200158504E8000209421FEE07C0802A693A101142B
+S3152001586093C1011893E1011C900101247C7D1B78D1
+S315200158707C9F23787CBE2B78386100083880010014
+S31520015880480044953C6000283863CB987FA4EB7888
+S3152001589038A1000848001F292C83FFFF41860030CC
+S315200158A038610008388101084800096D2C83000001
+S315200158B0907F000041860018808101087FC3F3781C
+S315200158C04BFFDE6938600000480000083860FFFFA2
+S315200158D0800101247C0803A683A1011483C1011838
+S315200158E083E1011C382101204E8000209421FFE80C
+S315200158F07C0802A693E100149001001C7C7F1B7892
+S3152001590093E10008388100084800090D2C83000026
+S3152001591041860050800100087C80F80040860010F6
+S315200159203C60000C60630009480000347FE3FB788B
+S315200159304BFFDE2D288300FF4185001C3C6000289B
+S315200159403863CB987FE4FB784BFFDDE138600000BC
+S31520015950480000143C60000C6063000A4BFFEDB167
+S315200159603860FFFF8001001C7C0803A683E1001438
+S31520015970382100184E8000209421FFF87C0802A6C9
+S315200159809001000C3C8000283884CB984BFFDD9D8C
+S315200159908001000C7C0803A6382100084E800020D7
+S315200159A09421FFF87C0802A69001000C4BFFFF41D1
+S315200159B08001000C7C0803A6382100084E800020B7
+S315200159C09421FFE87C0802A693A1000C93C1001044
+S315200159D093E100149001001C7C9F23797C7E1B7827
+S315200159E04181000C38600016480000343FA0002891
+S315200159F0387DCB984BFFDD69386300017C9F1840C9
+S31520015A00418400187FC3F378389DCB984BFFDD1D69
+S31520015A107FC3F37848000010386000264BFFECF175
+S31520015A20386000008001001C7C0803A683A1000CBD
+S31520015A3083C1001083E10014382100184E80002014
+S31520015A409421FFE87C0802A693A1000C93C10010C3
+S31520015A5093E100149001001C7C7D1B783C8000287A
+S31520015A603884CB984BFFDCC57FA3EB788001001CE3
+S31520015A707C0803A683A1000C83C1001083E10014D6
+S31520015A80382100184E8000209421FEE87C0802A6C9
+S31520015A9093C1011093E101149001011C7C641B78D0
+S31520015AA03FC00028387ECB9838A1000848001D1138
+S31520015AB02C83FFFF418600483861000838810108A0
+S31520015AC048000755800101083BE100087C80F80069
+S31520015AD0418600207FE3FB7848001A01387ECB9867
+S31520015AE07FE4FB784BFFDC4538600000480000145A
+S31520015AF03C60000C606300094BFFEC153860FFFF2A
+S31520015B008001011C7C0803A683C1011083E10114D5
+S31520015B10382101184E8000209421FFE87C0802A636
+S31520015B2093E100149001001C7C7F1B783C600028C7
+S31520015B303863CB9838810008480006DD7C631B79E1
+S31520015B404082001038000000981F00004800001015
+S31520015B508083000C7FE3FB784BFFDBD18001001CA7
+S31520015B607C0803A683E10014382100184E8000200A
+S31520015B709421FFE87C0802A693E100149001001C01
+S31520015B807C7F1B783C6000283863CB9838810008DD
+S31520015B90480006852C83000040860010380000004E
+S31520015BA0981F000048000010808100087FE3FB78E1
+S31520015BB04BFFDB798001001C7C0803A683E10014DE
+S31520015BC0382100184E800020288300024D850020B0
+S31520015BD03D2000283929830C5460103A7C89012EF6
+S31520015BE04E80002028830002418500183D20002890
+S31520015BF03929830C5460103A7C69002E4E8000208E
+S31520015C003860FFFF4E8000209421FFF07C0802A619
+S31520015C1093C1000893E1000C900100147C9F237826
+S31520015C20289F00027CBE2B784185001C4801276DE8
+S31520015C307C631B794182001057E9103A7D291A1499
+S31520015C4093C900D0800100147C0803A683C10008F3
+S31520015C5083E1000C382100104E8000209421FFF0B2
+S31520015C607C0802A693E1000C900100147C9F237806
+S31520015C70289F000241850038480127217C631B7932
+S31520015C804182002C57E9103A7D291A14806900D0E7
+S31520015C90288300024185001C3D2000283929830CD8
+S31520015CA05460103A7C69002E480000083860FFFFD6
+S31520015CB0800100147C0803A683E1000C3821001022
+S31520015CC04E8000209421FFF87C0802A69001000C4A
+S31520015CD03880001438A000004BFFF8A56863000146
+S31520015CE0200300007C6019148001000C7C0803A6A7
+S31520015CF0382100084E8000207CA32B784E8000207E
+S31520015D009421FFE87C0802A69381000893A1000C48
+S31520015D1093C1001093E100149001001C7CBC2B78E8
+S31520015D203D20002890699A943FC00028909E9A9021
+S31520015D303D200028380000009809CB98549F203632
+S31520015D407FE3FB784800B74D2C8300003D200028D7
+S31520015D5090699A984186005C7FE4FB7848003FB9B8
+S31520015D60801E9A903BE000007C9F0000408400202A
+S31520015D703FC00028387F0003480006FD801E9A9008
+S31520015D803BFF00017C9F00004184FFEC3FA00028DF
+S31520015D90801D9A94541F28347FE3FB784800B6F57A
+S31520015DA02C8300003FC00028907E9A8C4086000CF0
+S31520015DB03860FFFF480000907FE4FB7848003F5998
+S31520015DC0801D9A943BE000007C9F000040840020C7
+S31520015DD039600000813E9A8C3BFF00017C9F0000C8
+S31520015DE09169001C392900204184FFF03C6000287C
+S31520015DF0386383283880000138A000014800DD215E
+S31520015E003C60002838639A9C480040213C60002869
+S31520015E10386383447F84E37838A000003D2000283E
+S31520015E2081699A8C3D20002139295BF8912B001438
+S31520015E30480002C93D200028380000019009831C32
+S31520015E40386000008001001C7C0803A683810008BD
+S31520015E5083A1000C83C1001083E1001438210018AE
+S31520015E604E8000209421FFD07C0802A692E1000CEE
+S31520015E709301001093210014934100189361001C93
+S31520015E809381002093A1002493C1002893E1002C43
+S31520015E90900100347C7D1B787C9C23787CBB2B78FD
+S31520015EA07CDA33787CF93B787D1843787D374B78DB
+S31520015EB048000D713D20002881699A943BC000015C
+S31520015EC07C9E58003BE00000408400343D200028A1
+S31520015ED080099A8C7D6A5B78316000207D695B78C8
+S31520015EE08009001C2C8000004186004C3BDE00010D
+S31520015EF07C9E5000396900204184FFE42C9F0000DC
+S31520015F004186003C38000001901F001C93BF000011
+S31520015F10939F0004937F0008935F000C933F00102A
+S31520015F20931F001492FF001848000D257FC3F378B4
+S31520015F30480000207D7F5B784BFFFFC43C60000D4D
+S31520015F40606300024BFFE7C948000D053860FFFF7B
+S31520015F50800100347C0803A682E1000C8301001035
+S31520015F6083210014834100188361001C8381002052
+S31520015F7083A1002483C1002883E1002C382100302D
+S31520015F804E8000209421FFD87C0802A67D80002621
+S31520015F909321000C93410010936100149381001802
+S31520015FA093A1001C93C1002093E100249001002CB1
+S31520015FB0918100087C7C1B787C9B23783D200028DE
+S31520015FC081299A8C578028347FC9021483BE000CFC
+S31520015FD048000C513D20002880099A903BE00000A2
+S31520015FE07C9F0000408400743F2000283F40002809
+S31520015FF02D9B00002D1D000081799A9857E92036A6
+S315200160007D4B4A14800A000C2C8000004186003CFE
+S315200160107D2B482EA80900087C80E0004086002CB4
+S31520016020408E001048000C293860FFFF4800009878
+S31520016030418A00107FA803A6806A00044E800021B1
+S31520016040387F000348000431801A9A903BFF0001F3
+S315200160507C9F00004184FFA43D20002883E99A9C6F
+S315200160602C9F0000418600343FA00028A81F00086D
+S315200160707C80E00040860018807F000C4800B441F7
+S31520016080387D9A9C7FE4FB7848003E4583FF0000DB
+S315200160902C9F00004086FFD838000000901E001C6F
+S315200160A0901E0000901E0004901E0008901E000CF9
+S315200160B0901E0010901E0014901E001848000B918F
+S315200160C0386000008001002C818100087C0803A62D
+S315200160D08321000C83410010836100148381001801
+S315200160E083A1001C83C1002083E100247D8301203C
+S315200160F0382100284E8000209421FFE87C0802A642
+S3152001610093A1000C93C1001093E100149001001C8F
+S315200161107C7E1B787C9F23787CBD2B787FE3FB7864
+S315200161204800017D7C631B79418200288063000C35
+S315200161307FE4FB784BFFD5B52C8300004086001405
+S315200161403C60000D606300064BFFE5C5480000502A
+S315200161507FE3FB784BFFD609386300014800B3354E
+S31520016160907E000C807E000C2C830000B3BE0008BC
+S315200161704186002C7FE4FB784BFFD5B148000AA568
+S315200161803C60002838639A9C7FC4F37848003D1907
+S3152001619048000ABD38600000480000083860FFFF4B
+S315200161A08001001C7C0803A683A1000C83C100107A
+S315200161B083E10014382100184E8000209421FFE845
+S315200161C07C0802A693A1000C93C1001093E1001450
+S315200161D09001001C7C7D1B7848000A493C60002800
+S315200161E038639A9C7FA4EB7848003CE548000A6115
+S315200161F0807D000C4800B2C98001001C7C0803A6E2
+S3152001620083A1000C83C1001083E1001438210018FA
+S315200162104E8000209421FFE87C0802A693A1000C61
+S3152001622093C1001093E100149001001C7C7E1B7821
+S315200162307C9D2378480000697C7F1B794182001868
+S31520016240807F000C4BFFD5197C7E1A14907D0000AF
+S31520016250480000183C6000283863CB98480000416C
+S315200162607C7F1B7893DD00002C9F00004086001068
+S315200162703C60000D606300014BFFE4957FE3FB78F2
+S315200162808001001C7C0803A683A1000C83C1001099
+S3152001629083E10014382100184E8000209421FFE06C
+S315200162A07C0802A69361000C9381001093A100142F
+S315200162B093C1001893E1001C900100247C7B1B787C
+S315200162C0480009613D20002883C99A9C2C9E000024
+S315200162D03B8000003BA0000041860044807E000CEC
+S315200162E04BFFD47D7C7F1B787F64DB78807E000C1E
+S315200162F07FE5FB784BFFD4952C8300004086001464
+S315200163007C9FE8004085000C7FDCF3787FFDFB78DD
+S3152001631083DE00002C9E00004086FFC44800093120
+S315200163207F83E378800100247C0803A68361000C27
+S315200163308381001083A1001483C1001883E1001C0E
+S31520016340382100204E8000207C631B794182000C7D
+S31520016350806300004E8000203D20002880699A9CA1
+S315200163604E8000209421FFF87C0802A69001000CA3
+S315200163707C641B7828840002418500143860000063
+S315200163804BFFF8DD3863FFFD480000083864FFFD48
+S315200163902C830000418400383D20002880099A90F2
+S315200163A07C830000408400283D20002881299A987A
+S315200163B0546020367D204A148009000C2C80000070
+S315200163C04186000C80690004480000143C60000DE1
+S315200163D0606300034BFFE3393860FFFF8001000C47
+S315200163E07C0803A6382100084E8000209421FFF85E
+S315200163F07C0802A69001000C7C641B78288400028C
+S3152001640041850014386000004BFFF8553863FFFDC5
+S31520016410480000083864FFFD2C83000041840038C1
+S315200164203D20002880099A907C8300004084002822
+S315200164303D20002881699A98546320367D235A1479
+S315200164408009000C2C8000004186000C7C63582EAC
+S31520016450480000143C60000D606300034BFFE2B16D
+S31520016460386000008001000C7C0803A63821000852
+S315200164704E8000209421FFF07C0802A693C10008DB
+S3152001648093E1000C900100147C7E1B78289E00026B
+S3152001649041850018386000007FC4F3784BFFF7C1AF
+S315200164A03863FFFD48000008387EFFFD2C8300007D
+S315200164B0418400383D20002880099A907C83000081
+S315200164C0408400283D20002881299A98546020364E
+S315200164D07D204A148009000C2C8000004186000C86
+S315200164E07D3F4B78480000143C60000D606300033B
+S315200164F04BFFE21D3BE000002C9F0000418600502F
+S31520016500807F00082C83000041860020813F000007
+S315200165108009000C7C830000418600084800AFA159
+S3152001652038000000901F00083D20002880098324A0
+S315200165302C800000418600107C0803A67FC3F378D7
+S315200165404E80002138000000901F000C80010014AD
+S315200165507C0803A683C1000883E1000C38210010C2
+S315200165604E8000209421FFE87C0802A69381000832
+S3152001657093A1000C93C1001093E100149001001C1B
+S315200165803D2000285463203680099A983863FFD02D
+S315200165907FE01A14807F00082C8300007C9D2378DD
+S315200165A07CBE2B787CDC337841860014801D000C60
+S315200165B07C830000418600084800AF052C9E000020
+S315200165C04086000C93DF000848000040809D000CA7
+S315200165D07FC3F3784BFFD1152C8300004086001032
+S315200165E0801D000C901F0008480000207FC3F3780F
+S315200165F04BFFD16D386300014800AE99907F0008AA
+S315200166007FC4F3784BFFD12593BF0000939F0004ED
+S315200166108001001C7C0803A68381000883A1000C4D
+S3152001662083C1001083E10014382100184E80002018
+S315200166309421FFE87C0802A69381000893A1000C0F
+S3152001664093C1001093E100149001001C7C7E1B78FD
+S315200166507C9D23787CBC2B78480005C93D200028E9
+S3152001666080099A903BE000007C9F00004084003026
+S315200166703D20002881099A987C0A037857E0203624
+S315200166807D2802148169000C2C8B00004186003C78
+S315200166903BFF00017C9F50004184FFE4480005B187
+S315200166A03D20002880099A903BFF00037C9F000033
+S315200166B0418400283C60000D606300044BFFE051DB
+S315200166C03860FFFF48000048380000019009000C9F
+S315200166D0916900084BFFFFC87FE3FB787FC4F378FD
+S315200166E07FA5EB787F86E3784BFFFE7D3D20002852
+S315200166F0800983202C800000418600107C0803A697
+S315200167007FE3FB784E8000217FE3FB788001001C2C
+S315200167107C0803A68381000883A1000C83C1001095
+S3152001672083E10014382100184E8000209421FFF8BF
+S315200167307C0802A69001000C3D600028A9230008D0
+S31520016740816B9A8C552928347C09582E2C8000007F
+S315200167504086000C386000004800000C7C0803A627
+S315200167604E8000218001000C7C0803A638210008F8
+S315200167704E8000209421FFF87C0802A69001000C8F
+S315200167803D600028A9230008800B9A8C55292834BE
+S315200167907D290214800900042C8000004086000C0B
+S315200167A0386000004800000C7C0803A64E800021BA
+S315200167B08001000C7C0803A6382100084E800020A9
+S315200167C09421FFF87C0802A69001000C3D60002868
+S315200167D0A9230008800B9A8C552928347D29021477
+S315200167E0800900082C8000004086000C38600000DB
+S315200167F04800000C7C0803A64E8000218001000C75
+S315200168007C0803A6382100084E8000209421FFF041
+S315200168107C0802A693C1000893E1000C90010014A4
+S315200168207C641B78288400024185001438600000AE
+S315200168304BFFF42D3BC3FFFD480000083BC4FFFD81
+S315200168402C9E0000418400383D20002880099A9022
+S315200168507C9E0000408400283D20002881299A98AA
+S3152001686057C020367D204A148009000C2C80000058
+S315200168704186000C7D2A4B78480000143C60000DAF
+S31520016880606300034BFFDE89394000002C8A00003B
+S315200168904086000C3BE0FFFF48000048812A0000AB
+S315200168A03D600028A9290008800B9A8C5529283497
+S315200168B07D2902148009000C2C80000041860018D5
+S315200168C07C0803A6806A00044E8000217C7F1B7809
+S315200168D0480000083BE00000387E00034BFFFB998F
+S315200168E07FE3FB78800100147C0803A683C100089E
+S315200168F083E1000C382100104E8000209421FFF006
+S315200169007C0802A693C1000893E1000C90010014B3
+S315200169107C601B78288000027C9F23787CBE2B78A4
+S3152001692041850018386000007C0403784BFFF33161
+S315200169303863FFFD480000083060FFFD2C8300000E
+S31520016940418400383D20002880099A907C830000EC
+S31520016950408400283D20002881299A9854602036B9
+S315200169607D204A148009000C2C8000004186000CF1
+S315200169707D2A4B78480000143C60000D60630003BB
+S315200169804BFFDD8D394000002C8A00004186004CEA
+S31520016990812A00003D600028A9290008800B9A8CD5
+S315200169A0552928347D290214800900102C800000E5
+S315200169B04186001C7C0803A6806A00047FE4FB78DC
+S315200169C07FC5F3784E800021480000144BFFDCCDB3
+S315200169D038000023900300003860FFFF8001001477
+S315200169E07C0803A683C1000883E1000C382100102E
+S315200169F04E8000209421FFF07C0802A693C1000856
+S31520016A0093E1000C900100147C601B782880000221
+S31520016A107C9F23787CBE2B78418500183860000046
+S31520016A207C0403784BFFF2393863FFFD48000008E8
+S31520016A303060FFFD2C830000418400383D20002872
+S31520016A4080099A907C830000408400283D200028FC
+S31520016A5081299A98546020367D204A148009000C99
+S31520016A602C8000004186000C7D2A4B7848000014BA
+S31520016A703C60000D606300034BFFDC95394000004C
+S31520016A802C8A00004186004C812A00003D600028A6
+S31520016A90A9290008800B9A8C552928347D290214AE
+S31520016AA0800900142C8000004186001C7C0803A666
+S31520016AB0806A00047FE4FB787FC5F3784E8000214D
+S31520016AC0480000144BFFDBD538000023900300005B
+S31520016AD03860FFFF800100147C0803A683C10008EB
+S31520016AE083E1000C382100104E8000209421FFF014
+S31520016AF07C0802A693C1000893E1000C90010014C2
+S31520016B007C601B78288000027C9F23787CBE2B78B2
+S31520016B1041850018386000007C0403784BFFF14161
+S31520016B203863FFFD480000083060FFFD2C8300001C
+S31520016B30418400383D20002880099A907C830000FA
+S31520016B40408400283D20002881299A9854602036C7
+S31520016B507D204A148009000C2C8000004186000CFF
+S31520016B607D2A4B78480000143C60000D60630003C9
+S31520016B704BFFDB9D394000002C8A00004086000C2B
+S31520016B803860FFFF480000842C9F001240860018C1
+S31520016B90808A00087FC3F3784BFFCB9138600000D1
+S31520016BA048000068812A00003D600028A9290008C4
+S31520016BB0800B9A8C552928347D29021480090018C6
+S31520016BC02C800000408600302C9F00014086001456
+S31520016BD038000000981E0000386000004800002C94
+S31520016BE03C60000C606300024BFFDB253860FFFF31
+S31520016BF0480000187C0803A6806A00047FE4FB781D
+S31520016C007FC5F3784E800021800100147C0803A6FD
+S31520016C1083C1000883E1000C382100104E8000203A
+S31520016C209421FFF87C0802A69001000C3C60002804
+S31520016C30386383283880FFFF4800DCFD8001000C83
+S31520016C407C0803A6382100084E8000209421FFF8F5
+S31520016C507C0802A69001000C3C600028386383283A
+S31520016C604800DB798001000C7C0803A63821000846
+S31520016C704E8000209421FFC87C0802A693A1002CF7
+S31520016C8093C1003093E100349001003C3FA00028DD
+S31520016C9083FD83542C9F00007C7E1B787C83237884
+S31520016CA0408600B43880002038A000004800A9059D
+S31520016CB02C8300003D200028906983884186009816
+S31520016CC093E1000893E1000C93E1001093E1001495
+S31520016CD093E1001893E1001C93E100203D20002858
+S31520016CE03C60002738634200808983583D20002874
+S31520016CF03D6000283CE0002138E76F603900000044
+S31520016D0080A9835C3920000080CB83603940000054
+S31520016D104800F3052C83FFFF907D8354418600387C
+S31520016D203D6000283D20002139296C74912B9B8CD4
+S31520016D303D200028808983643C6000283863836C69
+S31520016D404800E8617FC3F3784800012138600000DC
+S31520016D50480000083860FFFF8001003C7C0803A63C
+S31520016D6083A1002C83C1003083E10034382100380F
+S31520016D704E8000209421FFB87C0802A69321002C86
+S31520016D8093410030936100349381003893A1003CF4
+S31520016D9093C1004093E100449001004C7C7F1B7815
+S31520016DA07C9E23787D394B783D20002880098304F9
+S31520016DB07CBD2B782C8000007CDC33787CFB3B78F7
+S31520016DC07D1A4378408500143800FFFF90010008A2
+S31520016DD038C000004800001048011549906100089C
+S31520016DE038C0FFFF93E1000C93C1001093A100145A
+S31520016DF0938100189361001C934100209321002464
+S31520016E003D200028806983883881000838A0002029
+S31520016E1038E000004800AFA52C8300004086000C16
+S31520016E2038600020480000183D200028800983A4EE
+S31520016E303860FFFF30000001900983A48001004CD7
+S31520016E407C0803A68321002C834100308361003412
+S31520016E508381003883A1003C83C1004083E1004443
+S31520016E60382100484E8000209421FFE87C0802A6A4
+S31520016E709381000893A1000C93C1001093E10014A3
+S31520016E809001001C7C7D1B783FC00028807E83A852
+S31520016E902C83FFFF3B80FFFF41860008480000DD71
+S31520016EA03FE00028807F83682C83FFFF4186000C0A
+S31520016EB0480000C9939F83687FA3EB784800003977
+S31520016EC02C8300004086000C93BE83A8480000084E
+S31520016ED0939E83A88001001C7C0803A68381000859
+S31520016EE083A1000C83C1001083E10014382100180E
+S31520016EF04E8000209421FFF07C0802A693C1000851
+S31520016F0093E1000C900100147C7E1B783FE0002861
+S31520016F10387F836C3880FFFF4800DA1D3D600028EA
+S31520016F20800B83A0312000012C8900054185002892
+S31520016F30912B83A03D2000283929838C5400103AB7
+S31520016F407FC9012E387F836C4800D89138600000B4
+S31520016F5048000010387F836C4800D8813860FFFFD5
+S31520016F60800100147C0803A683C1000883E1000C7C
+S31520016F70382100104E8000209421FFF07C0802A6C3
+S31520016F8093E1000C900100147C7F1B783C60002863
+S31520016F903863836C3880FFFF4800D99D3D20002847
+S31520016FA0800983A0396000007C8B000039400000F5
+S31520016FB0408400603D20002838E9838C7C060378D4
+S31520016FC0390000007C08382E7C80F8005569103A7B
+S31520016FD07C09392E408600287D405A787C09FE702E
+S31520016FE07D2002787C0048507C00FE70392BFFFF03
+S31520016FF07D6B00387D2900787D6B4B78394A0001FD
+S315200170007C8A300039080004396B00014184FFB8BD
+S315200170107C8A5800418600283D200028800983A0CB
+S315200170203C6000283863836C3000FFFF900983A001
+S315200170304800D7A938600000480000143C600028A9
+S315200170403863836C4800D7953860FFFF80010014B0
+S315200170507C0803A683E1000C382100104E80002015
+S315200170609421FFD07C0802A693C1002893E1002C2D
+S31520017070900100343FC000283D2000288069838884
+S315200170803881000838A0002038C0FFFF4800B07DB5
+S315200170902C830020418600283C6000273863420C5F
+S315200170A03880000038A0000038C0000038E0000019
+S315200170B03900000039200000480000AC806100083A
+S315200170C02C83FFFF408600183C600027386342343A
+S315200170D03880000038A000004800003048004E7D6E
+S315200170E07C651B79408200183C600027386342404A
+S315200170F08081000838A00000480000103C6000276D
+S31520017100386342548081000838C0000038E000000E
+S315200171103900000039200000480000918061000CF0
+S315200171202C830000408600283C600027386342609B
+S315200171303880000038A0000038C0000038E0000088
+S3152001714039000000392000004800001C8081001011
+S3152001715080A1001480C1001880E1001C810100205B
+S3152001716081210024480000453D20002883E983A48D
+S31520017170801E83AC7C9F00004186FF003C60002777
+S31520017180386342787C80F85038A0000038C000006F
+S3152001719038E0000039000000392000004800000DC9
+S315200171A093FE83AC4BFFFED49421FFC87C0802A634
+S315200171B092A1000C92C1001092E1001493010018D3
+S315200171C09321001C93410020936100249381002880
+S315200171D093A1002C93C1003093E100349001003C2F
+S315200171E07C7D1B787C9C23787CBB2B787CDA33785E
+S315200171F07CF93B787D1843787D374B783C600028B5
+S315200172003863836C3880FFFF4800D72D3D20002846
+S31520017210800983A03BE000007C9F00004084004C55
+S315200172203D2000283AA9838C3EC000283BC000009F
+S315200172307FA4EB787F85E3787F66DB787F47D378F9
+S315200172407F28CB787F09C3787C7EA82E7EEABB78FF
+S315200172504800575D801683A03BFF00017C9F0000FC
+S315200172603BDE00044184FFCC3C6000283863836CFC
+S315200172704800D5698001003C7C0803A682A1000C48
+S3152001728082C1001082E10014830100188321001CB1
+S3152001729083410020836100248381002883A1002C5F
+S315200172A083C1003083E10034382100384E8000202C
+S315200172B09421FFE07C0802A69361000C93810010C3
+S315200172C093A1001493C1001893E1001C900100249E
+S315200172D03FA00027387D42983C800027388442A46D
+S315200172E03CA0002738A542A8480052D5387D4298AF
+S315200172F03C800027388442AC3CA0002738A542B008
+S31520017300480052BD3D200028800983A03BA00000F3
+S315200173107C9D00004084003C3D2000283B69838CF5
+S315200173203F8000273FC000283BE00000387C42B464
+S315200173307CBFD82E7FA4EB7848005285801E83A07F
+S315200173403BBD00017C9D00003BFF00044184FFE022
+S31520017350800100247C0803A68361000C8381001030
+S3152001736083A1001483C1001883E1001C3821002069
+S315200173704E8000209421FFD87C0802A69321000C80
+S3152001738093410010936100149381001893A1001C6E
+S3152001739093C1002093E100249001002C7C9A23784C
+S315200173A0880300007CB92B782C8000007F3ECB78A7
+S315200173B03B8000007C7F1B78418600C83B60000033
+S315200173C0895F0000480000102C8A00004186002CAD
+S315200173D08D5F00015540063E6809002F7D2900D0AA
+S315200173E055290FFE6800005C7C0000D054000FFE7A
+S315200173F07D2B00394082FFD47C83F8004086001023
+S31520017400386300013BFF00014800006C7FC4F3781C
+S315200174107FA3F8507FA5EB784BFF9E7138000000C3
+S315200174207C1EE9AE7FDBD12E3BBD00017FDEEA1457
+S315200174303B7B0004881F00003B9C00016809002F4C
+S31520017440216900007D2B49146800005C2160000041
+S315200174507C0B01147D2903783129FFFF7D294910F1
+S31520017460381F00017FEB48387C0348787D631B7801
+S315200174707C7F1B78880300002C8000004086FF4417
+S315200174802C9C00004086001C7F23CB783C80002763
+S31520017490388442C04BFFC295933A00003B800001DD
+S315200174A05789103A380000007C09D12E8001002C22
+S315200174B07C0803A68321000C8341001083610014FC
+S315200174C08381001883A1001C83C1002083E100244D
+S315200174D0382100284E8000209421FD607C0802A6D8
+S315200174E093A1029493C1029893E1029C900102A474
+S315200174F0388102884BFFED2138810008806102889E
+S3152001750038A100884BFFFE713861000848000085CC
+S3152001751081210288894900005540063E6809002FCD
+S31520017520216900007D2B49146800005C2160000060
+S315200175307C0B01147D2B037941820014994101882A
+S3152001754038000000980101894800000C380000002D
+S315200175509801018838610008388000003BA1018824
+S315200175607FA5EB7848000101806102887FA4EB7832
+S315200175704BFFC1B9800102A47C0803A683A1029412
+S3152001758083C1029883E1029C382102A04E8000200B
+S315200175909421FFE07C0802A69361000C93810010E0
+S315200175A093A1001493C1001893E1001C90010024BB
+S315200175B07C7E1B7883FE00002C9F00007FDDF37804
+S315200175C0418600803F6000273B8000007FE3FB78F7
+S315200175D0389B42C04BFFC1152C8300004086001406
+S315200175E09B9F0000480000509B8B000048000048EC
+S315200175F07FE3FB783C800027388442C44BFFC0EDF3
+S315200176002C83000040860030393EFFFC7C89E8400F
+S315200176109B9F00004184002081690000880B0000A7
+S315200176202C8000004086FFC43929FFFC7C89E84074
+S315200176304084FFE887FE00042C9F00004086FF90CF
+S31520017640800100247C0803A68361000C838100103D
+S3152001765083A1001483C1001883E1001C3821002076
+S315200176604E8000209421FFE07C0802A69361000C45
+S315200176709381001093A1001493C1001893E1001C7B
+S31520017680900100247C7E1B787C9C23787CBD2B7802
+S315200176907FA3EB784BFFC0C97C7F1B782C9F00FF13
+S315200176A039400000408500183C60000C6063000AE8
+S315200176B04BFFD05D3860FFFF480000E02C9F0000A3
+S315200176C0408500407D1FEA148808FFFF6809002FC6
+S315200176D07D2900D055290FFE6800005C7C0000D072
+S315200176E054000FFE7D2B0039418200183800002FEF
+S315200176F07C1DF9AE380000009808000139400001D0
+S315200177007FDEF379418200743F600027807E00008E
+S315200177103003FFFF7D2019107FC0E2783160FFFF23
+S315200177207C0B01107D2B003941820050880300001B
+S315200177302C8000004186003C4BFFC0257C7F1A141B
+S315200177403BE3000123FF01007FFFF9107FFF00D1FA
+S315200177504082FF58809E00007FA3EB784BFFBF3904
+S315200177607FA3EB78389B42C84BFFBF2D39400001E0
+S3152001777037DE00044082FF982C8A000041860018DB
+S315200177807FA3EB784BFFBFD97C63EA143800000056
+S315200177909803FFFF38600000800100247C0803A6BF
+S315200177A08361000C8381001083A1001483C100181A
+S315200177B083E1001C382100204E8000209421FFE027
+S315200177C07C0802A693A1001493C1001893E1001C22
+S315200177D0900100247C9D23797C7F1B787CBE2B78AD
+S315200177E041820010881D00002C8000004086001474
+S315200177F07FC3F3787FE4FB784BFFBF31480001005C
+S315200178002C9F000041860010881F00002C8000005C
+S31520017810408600147FC3F3787FA4EB784BFFBF0D1E
+S31520017820480000DC7FA3EB78388100084BFFE9E9AB
+S31520017830800100087C80E800418600147FC3F3782C
+S315200178407FA4EB784BFFBEE5480000B4380000006A
+S31520017850981E0000881F00002C80002F41860030D2
+S315200178607FE3FB78388100084BFFE9AD80A1000852
+S315200178707C85F800418600187FC3F3787FE4FB7886
+S315200178807CA428504803F96583E10008889D0000FF
+S315200178903C600027386342CC480024A12C83000099
+S315200178A04086004C881F00002C8000004186004045
+S315200178B07FC3F3787FE4FB7838A000FF480000619E
+S315200178C07FE3FB784BFFBE997C63FA148803FFFFA5
+S315200178D02C80002F418600187FC3F3783C80002737
+S315200178E0388442C838A000FF480000357FC3F378AA
+S315200178F07FA4EB7838A000FF4800002538600000FF
+S31520017900800100247C0803A683A1001483C10018EA
+S3152001791083E1001C382100204E8000209421FFE0C5
+S315200179207C0802A69361000C9381001093A1001498
+S3152001793093C1001893E1001C900100247C7E1B78E2
+S315200179407C9B23787CBC2B784BFFBE157C7F1B78D8
+S315200179507C9FE000408400507F63DB784BFFBE01B3
+S315200179607C7D1B787D3FE0507C9D48007F63DB78E2
+S315200179707C9EFA144CE623827C000026540047FEA6
+S315200179807C0000D07FBD00387D2000787FBD037844
+S315200179907FA5EB784BFF98F57FBFEA1438000000EE
+S315200179A07C1EE9AE7FC3F378800100247C0803A600
+S315200179B08361000C8381001083A1001483C1001808
+S315200179C083E1001C382100204E8000209421FFF005
+S315200179D07C0802A693E1000C900100147C7F1B78A1
+S315200179E04800006D7C631B794182000C38630001DD
+S315200179F0480000087FE3FB78800100147C0803A679
+S31520017A0083E1000C382100104E8000209421FFE8EC
+S31520017A107C0802A693A1000C93C1001093E10014E7
+S31520017A209001001C7C9D23784BFFFFA5907D0000D3
+S31520017A308001001C7C0803A683A1000C83C10010D1
+S31520017A4083E10014382100184E8000209421FFE89C
+S31520017A507C0802A69381000893A1000C93C1001013
+S31520017A6093E100149001001C7C7D1B783880002F47
+S31520017A704800230D7C7C1B787FA3EB783880005C43
+S31520017A80480022FD7C03E0107C0001107C63003855
+S31520017A907F8000787C6303788001001C7C0803A624
+S31520017AA08381000883A1000C83C1001083E10014A7
+S31520017AB0382100184E8000209421FFE87C0802A678
+S31520017AC09381000893A1000C93C1001093E1001447
+S31520017AD09001001C7C7D1B797C9C23787CBE2B78B5
+S31520017AE0418200587FA3EB784BFFFF657C7F1B7992
+S31520017AF0408200207FC3F3787FA4EB784BFFBC2D17
+S31520017B007F83E3783C800027388442D448000044B0
+S31520017B107F83E3787FA4EB787FA4F8507FA5EB7869
+S31520017B204BFFBCB9380000007C1CE9AE7FC3F3785B
+S31520017B30389F00014800001C7FC3F3783FA000272F
+S31520017B40389D42D44BFFBBE57F83E378389D42D4F1
+S31520017B504BFFBBD98001001C7C0803A6838100084A
+S31520017B6083A1000C83C1001083E100143821001881
+S31520017B704E8000209421FFF07C0802A693C10008C4
+S31520017B8093E1000C900100143D200028800983B860
+S31520017B902C8000007C7E1B78418600303D20002809
+S31520017BA083E983B02C9F000041860020801F0008B6
+S31520017BB07C0803A67FC3F3784E80002183FF000053
+S31520017BC02C9F00004086FFE8480080993D20002830
+S31520017BD080098B942C800000418600187C0803A61E
+S31520017BE0386000013880000038A0FFFF4E80002158
+S31520017BF07FC3F3784BFF11D5800100147C0803A6BF
+S31520017C0083C1000883E1000C382100104E8000203A
+S31520017C109421FFF07C0802A693C1000893E1000C91
+S31520017C20900100143FE00028801F83B82C800000BB
+S31520017C307C7E1B78408600183C600028386383B020
+S31520017C40480021E938000001901F83B83D20002813
+S31520017C50806985943880000C480091F57C7F1B79DA
+S31520017C604182002893DF00084800FE793C60002805
+S31520017C70386383B07FE4FB784800222D4800FF2536
+S31520017C8038600000480000083860FFFF80010014BA
+S31520017C907C0803A683C1000883E1000C382100106B
+S31520017CA04E8000203D6000283D20002139297BC8D7
+S31520017CB0912B9B543D6000283D20002139297FA826
+S31520017CC0912B9C0C4E8000209421FFF87C0802A663
+S31520017CD09001000C3C8000283884CDFC38A000108F
+S31520017CE0480004858001000C7C0803A63821000881
+S31520017CF04E8000209421FFF87C0802A69001000CFA
+S31520017D003C8000283884CDFC38A00010480004EDC2
+S31520017D108001000C7C0803A6382100084E80002033
+S31520017D209421FFF87C0802A69001000C3C800028D3
+S31520017D303884CD3038A000104800042D8001000C75
+S31520017D407C0803A6382100084E8000209421FFF8E4
+S31520017D507C0802A69001000C3C8000283884CD3096
+S31520017D6038A00010480004958001000C7C0803A669
+S31520017D70382100084E8000209421FFF07C0802A6BD
+S31520017D8093E1000C900100147C7F1B784800FD557F
+S31520017D903D2000283949CE403D2000283929CD747F
+S31520017DA038000000816900002C8B000040860018F5
+S31520017DB093E900007D6A012E4800FDE93860000044
+S31520017DC048000028300000042C80003C392900049A
+S31520017DD04085FFD44800FDCD3C600003606300660A
+S31520017DE04BFFC92D3860FFFF800100147C0803A6D4
+S31520017DF083E1000C382100104E8000209421FFD809
+S31520017E007C0802A69321000C934100109361001473
+S31520017E109381001893A1001C93C1002093E10024B3
+S31520017E209001002C7C7A1B787C9923787CBC2B785A
+S31520017E307CDB33784800FCAD388000003D200028EB
+S31520017E403969CD74301CFFFF7FC0E110301BFFFF65
+S31520017E507FA0D9103D2000283BE9CE4039200000E3
+S31520017E607C09582E7C80D00040860050801F00005F
+S31520017E707F23CB787F85E3787F66DB787C00F214DD
+S31520017E807C00EA14901F0000480004152C83000092
+S31520017E904186001C801F00007C1E00507C1D005066
+S31520017EA0901F00004800FCFD480000344800FCF506
+S31520017EB0386000004800002C388400012C84000F13
+S31520017EC03BFF0004392900044085FF984800FCD572
+S31520017ED03C600003606300674BFFC8353860FFFFD5
+S31520017EE08001002C7C0803A68321000C834100100D
+S31520017EF0836100148381001883A1001C83C10020A3
+S31520017F0083E10024382100284E8000209421FFD8C7
+S31520017F107C0802A69321000C934100109361001462
+S31520017F209381001893A1001C93C1002093E10024A2
+S31520017F309001002C7C7C1B787C9B23787CBE2B7843
+S31520017F407CDD33784800FB9D388000003D200028E9
+S31520017F503969CD74301EFFFF7F40F110301DFFFFC0
+S31520017F607F20E9103D2000283BE9CE403920000042
+S31520017F707C09582E7C80E000408600407F63DB78B8
+S31520017F807FC5F3787FA6EB78480003E52C830000B4
+S31520017F904186000C4800FC0D48000044801F00006B
+S31520017FA07C1A00507C190050901F00004800FBF5F8
+S31520017FB0386000004800002C388400012C84000F12
+S31520017FC03BFF0004392900044085FFA84800FBD562
+S31520017FD03C600003606300674BFFC7353860FFFFD5
+S31520017FE08001002C7C0803A68321000C834100100C
+S31520017FF0836100148381001883A1001C83C10020A2
+S3152001800083E10024382100284E8000209421FFF0AE
+S315200180107C0802A693E1000C900100147C7F1B785A
+S315200180204800FAC13D2000283909CE403D200028CC
+S315200180303949CD7439600000800A00007C80F8003F
+S31520018040408600307D2B402E2C890000418600146D
+S315200180504800FB513C600003606300684800003023
+S31520018060912A00004800FB3D3860000048000028A6
+S31520018070396B00042C8B003C394A00044085FFBC37
+S315200180804800FB213C600003606300674BFFC6810B
+S315200180903860FFFF800100147C0803A683E1000CF1
+S315200180A0382100104E8000209421FFF07C0802A682
+S315200180B093C1000893E1000C900100147C7E1B788B
+S315200180C04800FA213D2000283969CDB8800B0040AF
+S315200180D02C8000003BE00000418600183C60000334
+S315200180E0606300664BFFC6293BE0FFFF4800002C7A
+S315200180F03D2000283949CDBC7D695B78396000383F
+S315200181007C0B482E7C0B512E356BFFFC4080FFF4F7
+S315200181103D20002893C9CDB84800FA897FE3FB7832
+S31520018120800100147C0803A683C1000883E1000CAA
+S31520018130382100104E8000209421FFF87C0802A6E9
+S315200181409001000C3C8000283884CDB838A000105E
+S31520018150480000A98001000C7C0803A638210008EC
+S315200181604E8000209421FFE87C0802A693A1000CF2
+S3152001817093C1001093E100149001001C7C7D1B78B3
+S315200181807C9E23787CBF2B784800F9593920000042
+S315200181907C89F800408400347FC4F3788004000091
+S315200181A02C8000004086001493A400004800F9F5B5
+S315200181B03860000048000028392900017C89F80030
+S315200181C0388400044184FFD84800F9D93C60000373
+S315200181D0606300664BFFC5393860FFFF8001001CD4
+S315200181E07C0803A683A1000C83C1001083E100143F
+S315200181F0382100184E8000209421FFE87C0802A631
+S3152001820093A1000C93C1001093E100149001001C6E
+S315200182107C7D1B787C9F23787CBE2B784800F8C513
+S31520018220392000007C89F00040840044552B103A07
+S315200182307C0BF82E7C80E800408600287C8BFA1483
+S315200182408004000490040000840400042C800000B3
+S315200182504086FFF04800F94D3860000048000024B0
+S31520018260392900017C89F0004184FFC44800F93591
+S315200182703C600003606300674BFFC4953860FFFFD5
+S315200182808001001C7C0803A683A1000C83C1001079
+S3152001829083E10014382100184E8000209421FFE844
+S315200182A07C0802A693A1000C93C1001093E100144F
+S315200182B09001001C7C9D23787CBF2B787CDE337853
+S315200182C0480100D923BD000F7C631B7938000001CA
+S315200182D07C00E830540B043E4082000C3860FFFFDE
+S315200182E0480000702C9F000041860010A003005812
+S315200182F07C095839408200182C9E000041860028AE
+S31520018300A003005A7C0958394182001C4BFFC38DBA
+S315200183103C00000360000069900300003860FFFF05
+S31520018320480000302C9F000041860010A003005811
+S315200183307C005B78B00300582C9E0000418600101B
+S31520018340A003005A7C005B78B003005A3860000015
+S315200183508001001C7C0803A683A1000C83C10010A8
+S3152001836083E10014382100184E8000209421FFE873
+S315200183707C0802A693A1000C93C1001093E100147E
+S315200183809001001C7C9D23787CBF2B787CDE337882
+S315200183904801000923BD000F7C631B7938000001C9
+S315200183A07C00E830540B043E4082000C3860FFFF0D
+S315200183B0480000702C9F000041860010A003005841
+S315200183C07C095839418200182C9E000041860028DC
+S315200183D0A003005A7C0958394082001C4BFFC2BDBC
+S315200183E03C0000036000006A900300003860FFFF34
+S315200183F0480000302C9F000041860010A003005841
+S315200184007C005878B00300582C9E0000418600104D
+S31520018410A003005A7C005878B003005A3860000047
+S315200184208001001C7C0803A683A1000C83C10010D7
+S3152001843083E10014382100184E8000209421FFF09A
+S315200184407C0802A693E1000C900100143FE000286D
+S31520018450801F83BC2C8000004085000C3860000002
+S31520018460480000443C600022386384EC38800000D8
+S315200184707C651B7838C000003CE0002238E78C542C
+S315200184803D00002239088B383D200022392984F00D
+S315200184904BFFD9D5907F83BC2063FFFF3063FFFF5D
+S315200184A07C631910800100147C0803A683E1000C6B
+S315200184B0382100104E8000209421FFE07C0802A67E
+S315200184C0934100089361000C9381001093A100143D
+S315200184D093C1001893E1001C900100243F4000281D
+S315200184E0801A83BC7C7B1B782C8000007C9E2378A1
+S315200184F07CBD2B787CDC3378418500143C60000CF4
+S31520018500606300014BFFC209480000B8386000E4EF
+S3152001851048008F817C7F1B79418200A87FE3FB780D
+S315200185207FA4EB787F85E3783CC0002238C6859806
+S31520018530480001992C8300004086008093DF00E0EB
+S31520018540813E00007FC3F37880090008388000014E
+S315200185507C0803A63CA0002238A58E387FE6FB784E
+S315200185604E800021813E00007FC3F37880090008F8
+S31520018570388000027C0803A63CA0002238A58FB4CF
+S315200185807FE6FB784E8000217FC3F37881230000AC
+S31520018590800900007C0803A63880100738A0000255
+S315200185A04E8000217FE3FB7880BA83BC7F64DB7831
+S315200185B04BFFDB49480000107FE3FB7848008F0121
+S315200185C03860FFFF800100247C0803A68341000850
+S315200185D08361000C8381001083A1001483C10018DC
+S315200185E083E1001C382100204E8000204E8000208F
+S315200185F09421FFE87C0802A693A1000C93C10010E8
+S3152001860093E100149001001C7C9E23782C9E00048B
+S315200186107C7F1B787CBD2B7840860030807F00E0F4
+S3152001862081230000800900007C0803A638801003FE
+S315200186304E8000217C60FE707C031A787C6300509A
+S315200186407C63FE7048000038807F00E081230000B3
+S31520018650800900007C0803A67FC4F3787FA5EB7808
+S315200186604E8000212C830047408600147FE3FB784F
+S315200186707FC4F3787FA5EB78480002FD8001001CBA
+S315200186807C0803A683A1000C83C1001083E100149A
+S31520018690382100184E8000209421FFF87C0802A67C
+S315200186A09001000C806300E0812300008009000412
+S315200186B07C0803A64E8000218001000C7C0803A6BD
+S315200186C0382100084E8000209421FFE87C0802A66C
+S315200186D09381000893A1000C93C1001093E100142B
+S315200186E09001001C7C7F1B787C9E23787CBD2B7897
+S315200186F07CDC3378388000E04800161D7FA3EB78B8
+S3152001870048002E252C830000907F005041860018BA
+S315200187107FC3F37848002E112C830000907F001030
+S315200187204086000C3860FFFF48000060939F007C64
+S31520018730387F00143880000138A000004800B3E1DA
+S31520018740387F00543880000138A000004800B3D19A
+S315200187503D200028808983C4387F00304800CE45DB
+S315200187603D20002880099B6C2C800000418600104A
+S315200187707C0803A6387F00884E8000217FE3FB78A2
+S3152001878048000029386000008001001C7C0803A6EF
+S315200187908381000883A1000C83C1001083E10014AA
+S315200187A0382100184E8000209421FFE87C0802A67B
+S315200187B093A1000C93C1001093E100149001001CB9
+S315200187C07C7D1B78480000297FA3EB78480000D1E7
+S315200187D08001001C7C0803A683A1000C83C1001024
+S315200187E083E10014382100184E8000209421FFE8EF
+S315200187F07C0802A693A1000C93C1001093E10014FA
+S315200188009001001C7C7F1B783BDF00307FC3F3780F
+S315200188103880FFFF4800C12138000001807F001009
+S31520018820981F004F48002DC14BFFBE7183A3000046
+S31520018830387F0014388000004800C0FD4BFFBE5D24
+S315200188403D20003D80030000612900027C80480014
+S315200188504086000C4BFFBE4593A300003BA00000C1
+S315200188609BBF00769BBF00777FE3FB7838800000B3
+S3152001887048000E219BBF004F7FC3F3784800BF5DA0
+S315200188808001001C7C0803A683A1000C83C1001073
+S3152001889083E10014382100184E8000209421FFE83E
+S315200188A07C0802A693A1000C93C1001093E1001449
+S315200188B09001001C7C7F1B783BBF00307FA3EB78A7
+S315200188C03880FFFF4800C07138000001807F0050CA
+S315200188D0981F007448002D11387F00544800BEFDB2
+S315200188E038000000981F00747FA3EB784800BEED86
+S315200188F03D20002880099C442C80000041860014DC
+S315200189007C0803A6387F0088388000014E8000212C
+S315200189108001001C7C0803A683A1000C83C10010E2
+S3152001892083E10014382100184E8000203D200028C4
+S31520018930906983D84E8000203D200028986983C8FD
+S315200189404E8000203D200028986983C04E8000205B
+S315200189503D200028986983C14E8000203D200028B3
+S31520018960986983C24E8000203D200028986983C9DA
+S315200189704E8000209421FFE87C0802A693810008FE
+S3152001898093A1000C93C1001093E100149001001CE7
+S315200189903804FFFF2880001C7C7F1B783BC0000029
+S315200189A07CBD2B78418502603D200022392988CC67
+S315200189B05400103A7C09002E3D200022392988CC0A
+S315200189C07C004A147C0903A64E8004200000007412
+S315200189D00000008C000000B80000023800000238B8
+S315200189E00000023800000238000002380000023878
+S315200189F000000238000002380000007C0000023826
+S31520018A000000010800000238000002380000023888
+S31520018A1000000238000000B00000013800000238D2
+S31520018A20000001400000014800000150000001A89B
+S31520018A30000000A4000000980000020800000214B3
+S31520018A40807F001048000008807F005048002EB526
+S31520018A50907D0000480001C07FE3FB784BFFFD4D70
+S31520018A60480001B47FE3FB784BFFFE35480001A89F
+S31520018A707FE3FB784BFFFD794800019CA07F0078BE
+S31520018A8048000198A39F007857A90672578006725D
+S31520018A907C804800B3BF00784186000C7FE3FB78D9
+S31520018AA04BFFFD4D738000044182016CA01F0078AD
+S31520018AB070090004408201607FE3FB783880000062
+S31520018AC048000BD17FE3FB783880000048000C4139
+S31520018AD0480001443B9F00307F83E3783880FFFFC5
+S31520018AE04800BE553BA000019BBF004E387F0014B5
+S31520018AF04800BCE99BBF0073387F00544800BCDDA9
+S31520018B00480000C83BC000014800010C93BF00800B
+S31520018B104800010493BF0084480000FC3B9F0030BD
+S31520018B207F83E3783880FFFF4800BE0D807F0010E9
+S31520018B302C83000038000001981F004F4186000851
+S31520018B4048002A5D7FA3EB78480029DD907F00103D
+S31520018B507C69FE707D201A787C0048507C00FE706E
+S31520018B607C09F0387D3E033838000000981F004FFD
+S31520018B70480000583B9F00307F83E3783880FFFF11
+S31520018B804800BDB5807F00502C83000038000001CD
+S31520018B90981F00744186000848002A057FA3EB78B8
+S31520018BA048002985907F00507C69FE707D201A78C7
+S31520018BB07C0048507C00FE707C09F0387D3E0338ED
+S31520018BC038000000981F00747F83E3784800BC0DAD
+S31520018BD0480000443D20002880099BE84800000CFD
+S31520018BE03D20002880099BA42C8000004186002876
+S31520018BF07C0803A67FE3FB787FA4EB784E800021D7
+S31520018C00480000143C60000C606300024BFFBB016E
+S31520018C103BC0FFFF7FC3F3788001001C7C0803A6BD
+S31520018C208381000883A1000C83C1001083E1001415
+S31520018C30382100184E8000209421FFD87C0802A6F6
+S31520018C409321000C93410010936100149381001825
+S31520018C5093A1001C93C1002093E100249001002CD4
+S31520018C607C7F1B787C9B23787CB92B782C99000000
+S31520018C707F3ECB7838000000981F0073408500A8FE
+S31520018C803B5F00543B9F00307F43D3783880FFFF02
+S31520018C904800BCA57F83E3783880FFFF4800BC9954
+S31520018CA0881F00732C800000418600207F83E37893
+S31520018CB04800BB293C60000C606300084BFFBA5199
+S31520018CC07C7EC8504800006438000001981F00755A
+S31520018CD07F64DB78807F00507FC5F37848002A5572
+S31520018CE038000000981F00757C7D1B787FE3FB7898
+S31520018CF048000A9D807F005048002BE52C83000008
+S31520018D007FDDF0507F7BEA144085000C7F43D378CA
+S31520018D104800BAC97F83E3784800BAC12C9E000077
+S31520018D204185FF687F23CB788001002C7C0803A630
+S31520018D308321000C83410010836100148381001874
+S31520018D4083A1001C83C1002083E10024382100284F
+S31520018D504E8000209421FFE07C0802A69361000C3E
+S31520018D609381001093A1001493C1001893E1001C74
+S31520018D70900100247C7F1B787C9B23787CBC2B78FC
+S31520018D8038000000981F004E3BDF0030387F00146A
+S31520018D903880FFFF4800BBA17FC3F3783880FFFFEF
+S31520018DA04800BB95881F004E2C800000408600C0DD
+S31520018DB083BF00107FA3EB7848002ADD2C830000B7
+S31520018DC0418600107FC3F3784800BA114BFFFFC0DC
+S31520018DD0A01F007870090040418200B0881F0077EB
+S31520018DE02C80000040860044817D0004801D000007
+S31520018DF07C80580041860034813D000C7C0958AEA8
+S31520018E00981F0077801D0008396B00017D6002786C
+S31520018E107C09FE707D2002787C0048507C00FE7023
+S31520018E207D600038901D00048BDF00777C9EE0007A
+S31520018E307FA3EB787F64DB784CE623827C000026D7
+S31520018E40540047FE7C0000D07FC900387F8500781A
+S31520018E507D3E2B787FC5F3784800279D881F0077B4
+S31520018E607C1E0050981F0077480000347FC3F3789A
+S31520018E704800B9693C60000C606300084BFFB8915B
+S31520018E8038600000480000907FA3EB787F64DB7890
+S31520018E907F85E378480027617C7E1B78A01F0078B8
+S31520018EA0700900044182004C881F004C2C80000070
+S31520018EB0418600407FA3EB7848002A25A01F007831
+S31520018EC07009004041820010893F00763803FFFF78
+S31520018ED07C6900503D200028800983D07C830000D6
+S31520018EE0408500107FE3FB7838800000480007A505
+S31520018EF07FA3EB78480029A12C8300004086000C33
+S31520018F00387F00144800B8D5387F00304800B8CDE6
+S31520018F107FC3F378800100247C0803A68361000CBB
+S31520018F208381001083A1001483C1001883E1001CF2
+S31520018F30382100204E8000209421FFF07C0802A6D3
+S31520018F4093E1000C900100147C7F1B78881F004D53
+S31520018F502C800000807F0050418600583920000077
+S31520018F60881F004C993F004D7C0000D07C00FE708C
+S31520018F70700000136000001198040000881F004C47
+S31520018F802C800000418601103D4000283D600028CC
+S31520018F90812A83DC800B83E07C89000040850008E0
+S31520018FA0912B83E038000000900A83DC480000E81A
+S31520018FB0881F00712C80000040860040881F0074A5
+S31520018FC02C80000040860034881F00722C8000000F
+S31520018FD0418600183800000D980400003800000072
+S31520018FE0981F0072480000B08163000480030000CE
+S31520018FF07C8058004086001038000000981F0070C1
+S31520019000480000948123000C7C0958AE9804000086
+S3152001901080030008396B00017D6002787C09FE70AF
+S315200190207D2002787C0048507C00FE707D600038EF
+S3152001903090030004A01F0078700900023920000166
+S31520019040993F007041820014880400002C80000A98
+S3152001905040860008993F0072480028853D20002857
+S31520019060800983D47C8300004086002C387F0054FD
+S315200190704800B7693D20002880099C442C800000C7
+S31520019080418600147C0803A6387F008838800001B9
+S315200190904E800021887F00703063FFFF7C631910AA
+S315200190A0800100147C0803A683E1000C38210010FE
+S315200190B04E8000209421FFE07C0802A693410008FF
+S315200190C09361000C9381001093A1001493C10018A1
+S315200190D093E1001C900100247C7D1B78881D004FA4
+S315200190E0549E063E2C8000003B8000003B40000041
+S315200190F0A37D00784186000C3860FFFF4800056C8F
+S31520019100801D00802C800000418600247C0803A657
+S31520019110807D00847FC4F3784E8000212C8300015A
+S315200191204086000C38600000480005407360000846
+S315200191304182000857DE067E3D200028880983C823
+S315200191407C9E00004086002873600020418200201A
+S315200191503D200028800983D82C80000041860010FC
+S315200191607C0803A64E800021480004FC3D200028EF
+S31520019170880983C97C9E00004086003873600010F0
+S31520019180418200303D20002880099C302C8000003F
+S31520019190418600147C0803A63C60002138637A745A
+S315200191A0480004BC386000004BFFE9CD480004B8F4
+S315200191B06BC40013200400007C8021146BC00011B5
+S315200191C0212000007C0901147C8903794182001841
+S315200191D073600004418200107FA3EB7848000531BB
+S315200191E048000484881D004C2C8000004186001410
+S315200191F03D200028800983DC30000001900983DCB2
+S315200192005760FFFE6BC9000D216900007D2B4914B3
+S315200192107C004838736B00013000FFFF7C00011091
+S315200192207C0900F87FC000384C8000007129000AB3
+S315200192307C1E4B7841860208801D00747408FFFF4E
+S31520019240408201FC736A004083FD00504182018CFB
+S315200192503D200028880983C17C9E00004086005459
+S31520019260813F0004817F00003809FFFF7C8B0000CD
+S31520019270418601B8801F00083000FFFF7C8B00006B
+S31520019280408600202C890000418601A0813F000CE8
+S315200192903800000A7C0959AE911F00004800018C54
+S315200192A0813F000C3800000A7C0959AE4800017044
+S315200192B03D200028880983C07C9E00004086002826
+S315200192C0881D00762C800000418601647FE3FB78AF
+S315200192D03C800027388442D838A000034800245512
+S315200192E048000148213E001F392000007D294914EC
+S315200192F06BC0000A5400063E7C0000D054000FFECD
+S315200193007D2A0039418200AC813F0004817F000023
+S315200193103809FFFF7C8B000041860048801F00082A
+S315200193203000FFFF7C8B0000408600202C89000046
+S3152001933041860030813F000C3800005E7C0959AE21
+S31520019340911F00004800001C813F000C3800005E80
+S315200193507C0959AE801F000030000001901F0000DB
+S31520019360813F0004817F00003809FFFF7C8B0000CC
+S31520019370418600B8801F00083000FFFF7C8B00006B
+S31520019380408600202C890000418600A0813F000CE8
+S31520019390381E00407C0959AE38000000480000887C
+S315200193A0813F000C381E00407C0959AE48000070F0
+S315200193B0813F0004817F00003809FFFF7C8B00007C
+S315200193C041860068801F00083000FFFF7C8B00006B
+S315200193D04186002C48000040813F0004817F000027
+S315200193E03809FFFF7C8B000041860040801F000862
+S315200193F03000FFFF7C8B00004086001C2C8900007A
+S3152001940041860028813F000C7FC959AE915F00003B
+S3152001941048000018813F000C7FC959AE801F00000B
+S3152001942030000001901F00003B8000012C9C0000B1
+S315200194304186000C7FA3EB784800035573600040FA
+S3152001944083FD00103B80000040820088813F00049C
+S31520019450817F00003809FFFF7C8B00004186004494
+S31520019460801F00083000FFFF7C8B00004086001C17
+S315200194702C8900004186002C813F000C7FC959AE02
+S31520019480939F000048000020813F000C7FC959AE00
+S31520019490801F000030000001901F000048000008D6
+S315200194A03B40FFFF7FE3FB784800245968630001B6
+S315200194B07C69FE707D201A787C0048507C00FE7005
+S315200194C07F890038300000017D3C0378480000FC8C
+S315200194D07FE3FB78480024093D200028880983C0C2
+S315200194E07C9E00004086001C881D00762C80000092
+S315200194F0418600A83000FFFF981D00764800009C99
+S315200195003D200028880983C17C9E000040860010EA
+S3152001951038000000981D0076480000803D20002874
+S31520019520880983C27C9E0000408600183803FFFF0D
+S315200195307C6003787C00FE70338000014800005C6B
+S315200195402C83000140850050893D007638090002B0
+S315200195507C8300004184001038090001981D0076A3
+S31520019560480000083B40FFFF7FE3FB7888BD00767B
+S315200195707FC4F378480023AD2C9E000A4186001053
+S31520019580881D00762C8000FF408600103B8000015C
+S31520019590480000083B40FFFF2C9C00004186002C20
+S315200195A07FE3FB78889D007638A00000480023756C
+S315200195B0889D00767FE3FB78388400014800239D4F
+S315200195C038000000981D007673600004418200680F
+S315200195D07FE3FB7848002309A01D0078700900402D
+S315200195E041820010893D00763803FFFF7C690050D7
+S315200195F0881D004C2C800000408600203D2000283C
+S31520019600800983CC7C8300004084002C7FA3EB78E7
+S31520019610388000014800001C3D200028800983D0A5
+S315200196207C830000408500107FA3EB783880000002
+S31520019630480000612C9C00004186002C387D0014D6
+S315200196404800B1993D20002880099C442C800000C7
+S31520019650418600147C0803A6387D008838800000E6
+S315200196604E8000217F43D378800100247C0803A605
+S31520019670834100088361000C8381001083A10014BB
+S3152001968083C1001883E1001C382100204E80002070
+S315200196909421FFF07C0802A693C1000893E1000CF7
+S315200196A0900100147C7F1B787C9E2378480065B549
+S315200196B0881F004C7C80F00041860038881F00708E
+S315200196C02C8000009BDF004C38000001981F004DC4
+S315200196D040860020981F00704800659D801F007CF1
+S315200196E07C0803A67FE3FB784E8000214800000812
+S315200196F048006585800100147C0803A683C1000803
+S3152001970083E1000C382100104E8000209421FFF0C7
+S315200197107C0802A693C1000893E1000C9001001475
+S315200197207C7E1B787C9F237848006539881E0071D2
+S315200197307C80F8004186003C2C9F00009BFE007136
+S3152001974040860030881E00702C8000004086002450
+S3152001975038000001981E00704800651D801E007C9F
+S315200197607C0803A67FC3F3784E80002148000008B9
+S3152001977048006505800100147C0803A683C1000802
+S3152001978083E1000C382100104E8000209421FFF047
+S315200197907C0802A693E1000C900100147C7F1B78C3
+S315200197A0881F00702C80000040860038480064B570
+S315200197B0881F00702C80000040860024380000019C
+S315200197C0981F0070480064B1801F007C7C0803A6A6
+S315200197D07FE3FB784E800021480000084800649909
+S315200197E0800100147C0803A683E1000C38210010B7
+S315200197F04E8000209421FFF87C0802A69001000CDF
+S315200198004800428D7C631B79408100143D2000284D
+S31520019810800983E47C001A14900983E48001000CFA
+S315200198207C0803A6382100084E8000209421EFE809
+S315200198307C0802A693A1100C93C1101093E1101479
+S315200198409001101C7C7D1B787CA02B782C8000013C
+S315200198507C9E23783D20002880A983E44086000C45
+S315200198607FDE2A1448000010418500642C80000008
+S315200198704086005C7C9E2800418400547FE5F050A0
+S31520019880289F0FFF408500287FA3EB7838810008A9
+S3152001989038A010004BFFFF612C831000408600305A
+S315200198A03BFFF000289F0FFF4185FFE02C9F000022
+S315200198B0408500247FA3EB78388100087FE5FB787B
+S315200198C04BFFFF357C83F8004186000C3860FFFF93
+S315200198D0480000087FC3F3788001101C7C0803A68A
+S315200198E083A1100C83C1101083E1101438211018A4
+S315200198F04E8000209421FFA07C0802A693210044DB
+S31520019900934100489361004C9381005093A10054E8
+S3152001991093C1005893E1005C900100647C7C1B7824
+S315200199207C99237838810008480001F92C830000AE
+S315200199303B600000418600103C60006160630001CD
+S3152001994048000050800100242C8000004186001C24
+S31520019950A06100342C83000041860010A001003252
+S315200199602C800020418600103C600061606300026B
+S3152001997048000020547F28347FE3FB7848007B157C
+S315200199807C7A1B79408200183C6000616063000389
+S315200199904BFFAD7D3860FFFF4800015C7F83E37894
+S315200199A08081002438A000004BFFFE852C83FFFF19
+S315200199B04186001C7F83E3787F44D3787FE5FB785B
+S315200199C04BFFFE357C83F800418600203C60006118
+S315200199D0606300044BFFAD397F43D37848007AE1B9
+S315200199E03860FFFF48000110A00100343BA00000B1
+S315200199F07C9D00007F5ED378408400E43BFE00140A
+S31520019A00801E00002C800001408600BC2C9B00009B
+S31520019A103B7B0001408600103D200027388942E427
+S31520019A204800000C3D200027388942E83C60002789
+S31520019A3080BF0000386342DC48002B85801FFFFC75
+S31520019A402C800000418600487F83E378809FFFF0C9
+S31520019A5038A000004BFFFDD9801FFFF07C8300005A
+S31520019A6040860020809FFFF480BFFFFC7F83E37840
+S31520019A704BFFFD85801FFFFC7C8300004186001083
+S31520019A803C600061606300074BFFFF4C801FFFFCB9
+S31520019A90809F00007C80204040840014807FFFF45A
+S31520019AA07C8020507C6302144800026D801F0004D4
+S31520019AB07009000141820010807FFFF4809F000021
+S31520019AC04BFFA031A00100343BBD00017C9D00006D
+S31520019AD03BFF00203BDE00204184FF283C6000271D
+S31520019AE0386342EC48002AD9800100203860000002
+S31520019AF090190000800100647C0803A6832100449C
+S31520019B00834100488361004C8381005083A1005426
+S31520019B1083C1005883E1005C382100604E8000201B
+S31520019B209421FFF07C0802A693E1000C9001001419
+S31520019B307C9F23783D20002838000000900983E48B
+S31520019B4038A000344BFFFCB12C8300344186001031
+S31520019B503C600027386342F0480000347FE3FB78FD
+S31520019B603C8000273884430838A000044BFF9C1D05
+S31520019B702C8300004086001CA01F00282C80003466
+S31520019B80418600183C6000273863431048002A317B
+S31520019B903860FFFF48000038A01F00126809001432
+S31520019BA07D2900D055290FFE680000117C0000D0C8
+S31520019BB054000FFE7D2B00394082FFD8A07F001074
+S31520019BC03863FFFF206300017C63191080010014B4
+S31520019BD07C0803A683E1000C382100104E8000206A
+S31520019BE03D6000283D200022392997F4912B83E8F6
+S31520019BF0386000004E8000209421FFF87C0802A6E0
+S31520019C009001000C3D200028800983E82C8000006B
+S31520019C10418600107C0803A64E80002148000014CE
+S31520019C203C600052606300014BFFAAE53860FFFFEC
+S31520019C308001000C7C0803A6382100084E800020F4
+S31520019C407CA52B7940820018386000004E800020C8
+S31520019C5034A5FFFF408200084BFFFFF08803000078
+S31520019C60892400007C804800388400013863000183
+S31520019C704186FFE08803FFFF8864FFFF7C63005075
+S31520019C804E8000207C8322143884FFFF7C83204071
+S31520019C904C840020880400008923000098030000DA
+S31520019CA0992400003884FFFF386300017C8320401B
+S31520019CB04184FFE44E80002034A5FFFF4D80002023
+S31520019CC0880400008923000034A5FFFF98030000C3
+S31520019CD03863000199240000388400014080FFE4A4
+S31520019CE04E8000207D642A147C8458404C840020B8
+S31520019CF0880300008D230001992400009C040001A3
+S31520019D00388400017C845840386300014184FFE493
+S31520019D104E8000209421FFF87C0802A69001000CB9
+S31520019D2038A000004BFF77898001000C7C0803A630
+S31520019D30382100084E8000204800000C2C800000AD
+S31520019D4041860014880300007C80200038630001CE
+S31520019D504086FFEC7C0000D054000FFE21640000F9
+S31520019D607D2B21147C0B4B794182000C3863FFFF3C
+S31520019D704E800020386000004E8000209421FFF0A4
+S31520019D807C0802A693C1000893E1000C90010014FF
+S31520019D907C7F1B787C9E23784BFF99C57C631B793E
+S31520019DA0418000247C63FA147FE9FB788803000054
+S31520019DB07C80F000418600143863FFFF7C834800D5
+S31520019DC04084FFEC38600000800100147C0803A663
+S31520019DD083C1000883E1000C382100104E80002049
+S31520019DE09421FFE87C0802A693A1000C93C10010E0
+S31520019DF093E100149001001C386000084800769514
+S31520019E007C7D1B78480000257FA3EB788001001C10
+S31520019E107C0803A683A1000C83C1001083E10014F2
+S31520019E20382100184E8000203800000090030000E1
+S31520019E3090030004386000004E8000209421FFF832
+S31520019E407C0802A69001000C480076753860000057
+S31520019E508001000C7C0803A6382100084E800020D2
+S31520019E60386000004E8000207C84237940820010D7
+S31520019E708123000090A300004800000C81240000EB
+S31520019E8090A400002C8900004086000C90A30004B9
+S31520019E904800000890A9000491250000908500043F
+S31520019EA04E8000209421FFF87C0802A69001000C28
+S31520019EB07C852378808300044BFFFFB18001000C51
+S31520019EC07C0803A6382100084E8000208124000446
+S31520019ED02C890000408600108004000090030000B9
+S31520019EE04800000C80040000900900008124000035
+S31520019EF02C89000040860010800400049003000491
+S31520019F004E80002080040004900900044E80002029
+S31520019F10816300002C8B000041860028800B000005
+S31520019F2090030000812B00002C8900004086000C44
+S31520019F30912300044800000C380000009009000419
+S31520019F407D635B784E800020806300002C830000B7
+S31520019F503800000041860014806300002C83000035
+S31520019F60300000014086FFF47C0303784E800020F8
+S31520019F709421FFE87C0802A693A1000C93C100104E
+S31520019F8093E100149001001C83E300002C9F000044
+S31520019F907C9E23787CBD2B78418600287FC803A62A
+S31520019FA07FE3FB787FA4EB784E8000212C83000091
+S31520019FB04186001083FF00002C9F00004086FFE0B1
+S31520019FC07FE3FB788001001C7C0803A683A1000C9B
+S31520019FD083C1001083E10014382100184E8000202F
+S31520019FE0380000009003000090030004900300084D
+S31520019FF04E8000209421FFF87C0802A69001000CD7
+S3152001A0007C85237880830004480001C18001000CEF
+S3152001A0107C0803A6382100084E8000209421FFF8F1
+S3152001A0207C0802A69001000C816400082C8B00009C
+S3152001A03041860060800300082C8000004086001CB9
+S3152001A040800400008124000491630008900300002D
+S3152001A0509123000448000034812300048004000079
+S3152001A0609009000081240000800300049009000467
+S3152001A0708004000490030004800300088124000862
+S3152001A0807C004A14900300087C8323784BFFFF55FC
+S3152001A0908001000C7C0803A6382100084E80002090
+S3152001A0A0806300084E800020812400042C89000052
+S3152001A0B04086001080040000900300004800000C38
+S3152001A0C08004000090090000812400002C890000F2
+S3152001A0D04086001080040004900300044800000C10
+S3152001A0E08004000490090004800300083000FFFF6B
+S3152001A0F0900300084E800020812400042C89000052
+S3152001A1004086001080050000900300004800000CE6
+S3152001A1108005000090090000812500002C8900009F
+S3152001A1204086001080040004900300044800000CBF
+S3152001A13080040004900900049086000090A6000483
+S3152001A140380000007C8923799004000490050000E2
+S3152001A1503960000041820014812900002C89000009
+S3152001A160396B00014086FFF4800300087C0B005008
+S3152001A17090030008916600084E800020806300004D
+S3152001A1804E800020816300002C8B00004186003424
+S3152001A190800B000090030000812B00002C89000019
+S3152001A1A04086000C912300044800000C3800000072
+S3152001A1B090090004800300083000FFFF9003000887
+S3152001A1C07D635B784E8000207C8423794082001059
+S3152001A1D08123000090A300004800000C8124000088
+S3152001A1E090A400002C8900004086000C90A3000456
+S3152001A1F04800000890A900049125000090850004DC
+S3152001A2008003000830000001900300084E800020E2
+S3152001A210806300044E800020806300004E80002071
+S3152001A2207C84237940810010812300087C844800A6
+S3152001A2304085000C386000004E8000207D200E7085
+S3152001A2407C840000408400203484FFFF806300006A
+S3152001A2504C8100203484FFFF806300004181FFF898
+S3152001A2604E8000207C8920507C8023782C80000021
+S3152001A27080630004388400014C8400207C8023788C
+S3152001A2802C80000080630004388400014184FFF0A3
+S3152001A2904E800020806300044E8000209421FFE838
+S3152001A2A07C0802A67D80002693A1000C93C1001094
+S3152001A2B093E100149001001C918100087C7F1B789A
+S3152001A2C03BC000007C9D23794D0000007FA3EB78E5
+S3152001A2D04803CED17C9E1800408400284088000C7B
+S3152001A2E083FF00044800000C4089000883FF00001A
+S3152001A2F02C9F00004186000C3BDE00014BFFFFD066
+S3152001A3007FE3FB788001001C818100087C0803A67D
+S3152001A31083A1000C83C1001083E100147D820120FA
+S3152001A320382100184E8000209421FFF07C0802A6D7
+S3152001A33093C1000893E1000C900100147C9E2378C0
+S3152001A3404BFFFE3D3003FFFF7D2019107C60F27824
+S3152001A3503160FFFF7C0B01107D2B00393BE00001B2
+S3152001A360418200284BFFFEB53003FFFF7D201910E7
+S3152001A3707C60F2783160FFFF7C0B01107D2B003968
+S3152001A3803BFF00014082FFE03063FFFF7C63191031
+S3152001A3907FE018787C630378800100147C0803A68B
+S3152001A3A083C1000883E1000C382100104E80002073
+S3152001A3B09421FFE87C0802A693A1000C93C100100A
+S3152001A3C093E100149001001C7C7F1B78801F0008FC
+S3152001A3D02C80000040850030807F00002C83000007
+S3152001A3E04186001483A30000480070D57FA3EB7932
+S3152001A3F04082FFF438000000901F0008901F0004DF
+S3152001A400901F00008001001C7C0803A683A1000C7C
+S3152001A41083C1001083E10014382100184E800020EA
+S3152001A4209421FFF07C0802A693E1000C9001001410
+S3152001A430386000084800705D7C7F1B7941820014DA
+S3152001A4407FE3FB78480000257FE3FB78480000087E
+S3152001A45038600000800100147C0803A683E1000C0B
+S3152001A460382100104E8000209421FFF87C0802A696
+S3152001A4709001000C4BFFF9B5386000008001000CFB
+S3152001A4807C0803A6382100084E8000209421FFF87D
+S3152001A4907C0802A69001000C480070253860000057
+S3152001A4A08001000C7C0803A6382100084E8000207C
+S3152001A4B09421FFF87C0802A69001000C2C85FFFF51
+S3152001A4C07C80237840860014388000007C05037840
+S3152001A4D04BFFF9994800000C7C0403784BFFF9C91E
+S3152001A4E08001000C7C0803A6382100084E8000203C
+S3152001A4F09421FFF87C0802A69001000C800300003D
+S3152001A5002C8000004186000C4BFFFA094800000808
+S3152001A510386000008001000C7C0803A63821000861
+S3152001A5204E8000209421FFF87C0802A69001000CA1
+S3152001A5304BFFF99D386000008001000C7C0803A6C2
+S3152001A540382100084E8000209421FFF87C0802A6BD
+S3152001A5509001000C2C8400007C6B1B78812B000061
+S3152001A5607C832378408600107D635B784BFFF9DD81
+S3152001A570480000302C8900004186002034A5FFFFC9
+S3152001A5804180001891230000812900002C890000B8
+S3152001A590386300044086FFE87C6418507C6316709B
+S3152001A5A08001000C7C0803A6382100084E8000207B
+S3152001A5B09421FFE87C0802A693A1000C93C1001008
+S3152001A5C093E100149001001C83E300002C9F0000FE
+S3152001A5D07C9E23787CBD2B78418600287FC803A6E4
+S3152001A5E07FE3FB787FA4EB784E8000212C8300004B
+S3152001A5F04186001083FF00002C9F00004086FFE06B
+S3152001A6007FE3FB788001001C7C0803A683A1000C54
+S3152001A61083C1001083E10014382100184E800020E8
+S3152001A620386000004E8000209421FF407C0802A65D
+S3152001A63093C100B893E100BC900100C49061000869
+S3152001A6409081000C90A1001090C1001490E1001897
+S3152001A6509101001C91210020914100247C7E1B78D0
+S3152001A660801E00387C80F0004186001C4BFFA02D07
+S3152001A6703C00003B600000019003000038600000B0
+S3152001A680480000F0380000019801008038000000E1
+S3152001A690980100813801000890010088380100C81E
+S3152001A6A09001008439000000394100808921008011
+S3152001A6B0552B063E380B00012880000838EA001089
+S3152001A6C04185001C380900019801008081210088FC
+S3152001A6D05560103A7D29021448000010812100841A
+S3152001A6E03809000490010084390800012C880009EA
+S3152001A6F080090000394A0004900700004085FFB018
+S3152001A7003860001048006D8D7C7F1B794182006086
+S3152001A71080A1009080C1009480E100988101009C75
+S3152001A720812100A0800100A8814100A49001000898
+S3152001A730800100AC9001000C800100B07FE3FB7822
+S3152001A74090010010800100B47FC4F37890010014B9
+S3152001A750480000392C830000418600147FE3FB78F2
+S3152001A76048006D5D38600000480000087FE3FB78F3
+S3152001A770800100C47C0803A683C100B883E100BC24
+S3152001A780382100C04E8000209421FF487C0802A673
+S3152001A790900100BC9081000C90A1001090C1001482
+S3152001A7A090E100189101001C912100209141002483
+S3152001A7B07C8C2378800C00387C8060004186001CCC
+S3152001A7C04BFF9ED93C00003B600000019003000036
+S3152001A7D03860FFFF480000C438000002980100805D
+S3152001A7E03800000098010081380100089001008896
+S3152001A7F0380100C0900100843900000039410080F1
+S3152001A80089210080552B063E380B0001288000083F
+S3152001A81038EA00104185001C3809000198010080A2
+S3152001A820812100885560103A7D29021448000010C4
+S3152001A830812100843809000490010084390800012F
+S3152001A8402C88000980090000394A0004900700007D
+S3152001A8504085FFB09183000C8081009080A10094F7
+S3152001A86080C1009880E1009C810100A0812100A483
+S3152001A870800100AC814100A890010008800100B050
+S3152001A8809001000C800100B490010010800C00049E
+S3152001A8907C0803A64E800021800100BC7C0803A60B
+S3152001A8A0382100B84E8000209421FFF07C0802A6B2
+S3152001A8B093E1000C900100147C7F1B78480000393D
+S3152001A8C07C631B7940820018907F000C7FE3FB7824
+S3152001A8D048006BED38600000480000083860FFFF33
+S3152001A8E0800100147C0803A683E1000C38210010A6
+S3152001A8F04E8000209421FFF07C0802A693E1000CF3
+S3152001A900900100147C7F1B78813F000C8009000C8C
+S3152001A9107C0803A64E8000217C631B7940820010AF
+S3152001A920907F000C38600000480000083860FFFF67
+S3152001A930800100147C0803A683E1000C3821001055
+S3152001A9404E800020806300004E8000209421FFF875
+S3152001A9507C0802A69001000C8123000C80090010BE
+S3152001A9607C0803A64E8000218001000C7C0803A6EA
+S3152001A970382100084E8000209421FFF87C0802A689
+S3152001A9809001000C8123000C800900147C0803A689
+S3152001A9904E8000218001000C7C0803A63821000886
+S3152001A9A04E8000209421FFF87C0802A69001000C1D
+S3152001A9B08123000C800900187C0803A64E80002103
+S3152001A9C08001000C7C0803A6382100084E80002057
+S3152001A9D09421FFF87C0802A69001000C8123000C2B
+S3152001A9E08009001C7C0803A64E8000218001000CF2
+S3152001A9F07C0803A6382100084E8000209421FFF808
+S3152001AA007C0802A69001000C8123000C80090020FD
+S3152001AA107C0803A64E8000218001000C7C0803A639
+S3152001AA20382100084E8000209421FFF87C0802A6D8
+S3152001AA309001000C8123000C800900247C0803A6C8
+S3152001AA404E8000218001000C7C0803A638210008D5
+S3152001AA504E8000209421FFF87C0802A69001000C6C
+S3152001AA608123000C800900287C0803A67C83237897
+S3152001AA707CA42B784E8000218001000C7C0803A643
+S3152001AA80382100084E8000209421FFF87C0802A678
+S3152001AA909001000C8123000C8009002C7C0803A660
+S3152001AAA04E8000218001000C7C0803A63821000875
+S3152001AAB04E8000209421FFF87C0802A69001000C0C
+S3152001AAC08123000C800900307C0803A64E800021DA
+S3152001AAD08001000C7C0803A6382100084E80002046
+S3152001AAE09421FFF87C0802A69001000C8123000C1A
+S3152001AAF0800900347C0803A64E8000218001000CC9
+S3152001AB007C0803A6382100084E8000209421FFF8F6
+S3152001AB107C0802A69001000C200300007D20191458
+S3152001AB20200301007C0001107C0000D07D2B0379DD
+S3152001AB3040820018206301005463183820630824DA
+S3152001AB404800695148000008386000008001000C67
+S3152001AB507C0803A6382100084E8000209421FFF8A6
+S3152001AB607C0802A69001000C480069553860000057
+S3152001AB708001000C7C0803A6382100084E800020A5
+S3152001AB809421FFE87C0802A693A1000C93C1001032
+S3152001AB9093E100149001001C7C9E2378201E000066
+S3152001ABA07D20F114201E01007C0001107C0000D0C4
+S3152001ABB07D2B03797C7D1B784082003C3860000C1C
+S3152001ABC0480068D17C7F1B794182002C7FE3FB788A
+S3152001ABD07FA4EB787FC5F3784800003D2C830000E5
+S3152001ABE04086000C7FE3FB78480000107FE3FB786A
+S3152001ABF0480068CD386000008001001C7C0803A64F
+S3152001AC0083A1000C83C1001083E1001438210018B0
+S3152001AC104E8000209421FFE07C0802A69361000C5F
+S3152001AC209381001093A1001493C1001893E1001C95
+S3152001AC30900100247CBD2B78201D00007D20E91485
+S3152001AC40201D01007C0001107C0000D07D2B0379A2
+S3152001AC507C7B1B787C9C23784182000C3860FFFF2B
+S3152001AC604800006C2C9C0000408600183C60003F88
+S3152001AC70606300014BFF9A993860FFFF480000503E
+S3152001AC803BE000007C9FE840939B00044084002029
+S3152001AC903BC000247C7CF2144BFFF1913BFF000169
+S3152001ACA07C9FE8403BDE00084184FFEC3800000031
+S3152001ACB0901B000093BB0008901C0000387C000408
+S3152001ACC0388000204BFFF0513860000080010024BD
+S3152001ACD07C0803A68361000C8381001083A10014E4
+S3152001ACE083C1001883E1001C382100204E800020FA
+S3152001ACF09421FFF87C0802A69001000C480067C148
+S3152001AD00386000008001000C7C0803A63821000869
+S3152001AD104E8000209421FFE87C0802A693A1000C16
+S3152001AD2093C1001093E100149001001C7C7E1B78D6
+S3152001AD307C9D23787CBF2B7893FD0008813E000003
+S3152001AD402C89000041860010800900087C9F004064
+S3152001AD504084000893BE0000807E00047FE4FB78D7
+S3152001AD60480003397FA4EB7857E31838801E000486
+S3152001AD70386300247C601A144BFFF12D8001001CDE
+S3152001AD807C0803A683A1000C83C1001083E1001473
+S3152001AD90382100184E8000209421FFF07C0802A65D
+S3152001ADA093E1000C9001001483E300002C9F000026
+S3152001ADB04186000C7FE4FB784800001D7FE3FB7889
+S3152001ADC0800100147C0803A683E1000C38210010C1
+S3152001ADD04E8000209421FFF07C0802A693C1000832
+S3152001ADE093E1000C900100147C7F1B787C9E2378D4
+S3152001ADF0807E0008801F00045463183838630024BD
+S3152001AE007C601A144BFFF0C9809E0008807F0004E5
+S3152001AE10548918387D291A14812900242C89000087
+S3152001AE2040860034480002AD801F00007C9E000051
+S3152001AE3040860034807F0004480002D9801F000428
+S3152001AE40546318387C63021480030024901F000089
+S3152001AE5048000014801F00007C9E000040860008E8
+S3152001AE60913F000038600000800100147C0803A691
+S3152001AE7083C1000883E1000C382100104E80002098
+S3152001AE809421FFE87C0802A693A1000C93C100102F
+S3152001AE9093E100149001001C7C9F2378801F0008F9
+S3152001AEA07CBD2B787C80E8007C7E1B78418600184F
+S3152001AEB04BFFFF257FC3F3787FE4FB787FA5EB78F3
+S3152001AEC04BFFFE558001001C7C0803A683A1000CC4
+S3152001AED083C1001083E10014382100184E80002020
+S3152001AEE0806300084E8000209421FFE87C0802A69A
+S3152001AEF09381000893A1000C93C1001093E10014E3
+S3152001AF009001001C2C8400007C7D1B787C83237897
+S3152001AF103B80000040860044801D00087C84004060
+S3152001AF203BE000004084002C3BC00024807D0004CF
+S3152001AF307C63F2144BFFF015801D00083BFF0001D6
+S3152001AF407C9F00407F9C1A143BDE00084184FFE071
+S3152001AF507F83E37848000068801D00083BE00000FD
+S3152001AF607C9F004040840050801D000457E918381A
+S3152001AF707D290214812900242C8900004186002084
+S3152001AF8034A5FFFF41800030912300008129000074
+S3152001AF902C890000386300044086FFE82C850000D8
+S3152001AFA041840014801D00083BFF00017C9F004066
+S3152001AFB04184FFB87C6418507C6316708001001CA4
+S3152001AFC07C0803A68381000883A1000C83C100109D
+S3152001AFD083E10014382100184E8000209421FFE0DF
+S3152001AFE07C0802A69361000C9381001093A10014A2
+S3152001AFF093C1001893E1001C900100247C7D1B78ED
+S3152001B000801D00083BE000007C9F00407C9C23784B
+S3152001B0107CBB2B783BC0000040840050801D00047F
+S3152001B02057C918387D29021483E900242C9F000072
+S3152001B030418600287F8803A67FE3FB787F64DB783F
+S3152001B0404E8000212C8300004186002083FF0000D2
+S3152001B0502C9F00004086FFE0801D00083BDE00019A
+S3152001B0607C9E00404184FFB87FE3FB788001002469
+S3152001B0707C0803A68361000C8381001083A1001440
+S3152001B08083C1001883E1001C382100204E80002056
+S3152001B090386000004E800020208400FF7C8A1E70CC
+S3152001B0A0396000017D695030800300005484077E99
+S3152001B0B07C004B78900300007C63521488030004C3
+S3152001B0C07D6B20307C005B78980300044E80002045
+S3152001B0D0208400FF7C8B1E707D235A145484077EA6
+S3152001B0E039400001880900047D4420307C04207801
+S3152001B0F02C840000988900044C86002081230000BE
+S3152001B1007D4058307D200078900300004E8000203D
+S3152001B1109421FFE87C0802A69381000893A1000CE4
+S3152001B12093C1001093E100149001001C7C7C1B78D4
+S3152001B130807C00004803BC2D3BA3FFFF57BD063E84
+S3152001B1407F9CEA14887C00044803BC193863FFFFFE
+S3152001B1505463063E57BD1E387FBD1B78207D00FFF8
+S3152001B1608001001C7C0803A68381000883A1000CB2
+S3152001B17083C1001083E10014382100184E8000207D
+S3152001B1809421FFF07C0802A693E1000C90010014A3
+S3152001B19038600008480062FD7C7F1B7941820014DB
+S3152001B1A07FE3FB78480000257FE3FB784800000811
+S3152001B1B038600000800100147C0803A683E1000C9E
+S3152001B1C0382100104E8000209421FFF87C0802A629
+S3152001B1D09001000C4BFFEC55386000008001000CFB
+S3152001B1E07C0803A6382100084E8000209421FFF810
+S3152001B1F07C0802A69001000C480062C53860000058
+S3152001B2008001000C7C0803A6382100084E8000200E
+S3152001B210386000004E8000209421FFF87C0802A6A9
+S3152001B2209001000C812300002C8900007C8B23785F
+S3152001B23090AB000841860024800900087C850040E7
+S3152001B2404084000C808900044800001481290000F4
+S3152001B2502C8900004086FFE4808300047D655B78AD
+S3152001B2604BFFEC098001000C7C0803A6382100085D
+S3152001B2704E8000209421FFF87C0802A69001000C44
+S3152001B2807C892378808300042C84000090A90008FF
+S3152001B2904186001C800400087C85004040840014FF
+S3152001B2A0808400042C8400004086FFEC3880000056
+S3152001B2B07D254B784BFFEBB58001000C7C0803A65E
+S3152001B2C0382100084E8000209421FFF87C0802A630
+S3152001B2D09001000C800300002C8000004186000CA8
+S3152001B2E04BFFEC3148000008386000008001000C5B
+S3152001B2F07C0803A6382100084E8000209421FFF8FF
+S3152001B3007C0802A69001000C4BFFEBC538600000BB
+S3152001B3108001000C7C0803A6382100084E800020FD
+S3152001B3209421FFE87C0802A693A1000C93C100108A
+S3152001B33093E100149001001C7C9F2378813F000437
+S3152001B3402C8900007C7D1B787CBE2B78817F0000B8
+S3152001B35041860010800900087C9E0040418400201F
+S3152001B3602C8B000041860010800B00087C9E00403B
+S3152001B3704185000C93DF0008480000207FA3EB786D
+S3152001B3807FE4FB784BFFFF797FA3EB787FE4FB78A3
+S3152001B3907FC5F3784BFFFE858001001C7C0803A640
+S3152001B3A083A1000C83C1001083E100143821001809
+S3152001B3B04E8000204E8000209421FFF87C0802A6B2
+S3152001B3C09001000C816300002C8B00004186002037
+S3152001B3D03D200028816B000880099B047C8B00405E
+S3152001B3E04185000C4BFFEB2D48000008386000001A
+S3152001B3F08001000C7C0803A6382100084E8000201D
+S3152001B400806300002C8300004D8600208003000805
+S3152001B4107C00221490030008806300002C83000026
+S3152001B4204086FFEC4E8000202C84000041860018C7
+S3152001B4303D2000288003000880699B047C6300501E
+S3152001B4404E800020806300084E8000209421FFF862
+S3152001B4507C0802A69001000C2C8400007C6B1B78D2
+S3152001B460812B00007C832378408600107D635B78E6
+S3152001B4704BFFEAD9480000302C8900004186002084
+S3152001B48034A5FFFF41800018912300008129000087
+S3152001B4902C890000386300044086FFE87C6418503C
+S3152001B4A07C6316708001000C7C0803A638210008F5
+S3152001B4B04E8000209421FFE87C0802A693A1000C6F
+S3152001B4C093C1001093E100149001001C83E3000056
+S3152001B4D02C9F00007C9E23787CBD2B7841860028FA
+S3152001B4E07FC803A67FE3FB787FA4EB784E800021FB
+S3152001B4F02C8300004186001083FF00002C9F000052
+S3152001B5004086FFE07FE3FB788001001C7C0803A6D0
+S3152001B51083A1000C83C1001083E100143821001897
+S3152001B5204E8000209421FFF07C0802A693C10008DA
+S3152001B53093E1000C900100147C7E1B78386000108A
+S3152001B54048005F517C7F1B79418200383BDE000138
+S3152001B5507FC3F37848005F3D7C631B794182001CE1
+S3152001B56093DF0008907F000C7FE3FB784800007989
+S3152001B5707FE3FB78480000107FE3FB7848005F41BA
+S3152001B58038600000800100147C0803A683C10008EE
+S3152001B59083E1000C382100104E8000209421FFE821
+S3152001B5A07C0802A693A1000C93C1001093E100141C
+S3152001B5B09001001C7C7D1B78807D000C48005F017A
+S3152001B5C07FA3EB7848005EF98001001C7C0803A666
+S3152001B5D083A1000C83C1001083E1001438210018D7
+S3152001B5E04E800020380000009003000090030004E4
+S3152001B5F04E8000209421FFE07C0802A69361000C76
+S3152001B6009381001093A1001493C1001893E1001CAB
+S3152001B610900100247C7E1B78839E0000801E0004FE
+S3152001B6207C9C00007C9B23787CBD2B7840840098F1
+S3152001B630813E00087FBFEB787D2048507C9F4800E3
+S3152001B640807E000C7F64DB787C6302144CE62382C7
+S3152001B6507C000026540047FE7C0000D07FEB00389A
+S3152001B6607D2500787D7F2B787FE5FB784BFF5C1D60
+S3152001B670801E0004813E00087C00FA147C8048006C
+S3152001B680408600847FBFE8507C9DE000807E000CD0
+S3152001B6907C9BFA144CE623827C000026540047FE4C
+S3152001B6A07C0000D07FBD00387F8B00787FBD5B7822
+S3152001B6B07FA5EB784BFF5BD593BE00047FFFEA1491
+S3152001B6C0480000487FBFEB787D60E0507C9F5800A2
+S3152001B6D0807E000C7C6302144CE623827C000026CB
+S3152001B6E0540047FE7C0000D07FE900387D65007854
+S3152001B6F07D3F2B787FE5FB784BFF5B91801E000415
+S3152001B7007C00FA14901E00047FE3FB78800100245C
+S3152001B7107C0803A68361000C8381001083A1001499
+S3152001B72083C1001883E1001C382100204E800020AF
+S3152001B7309421FFE07C0802A69361000C93810010FE
+S3152001B74093A1001493C1001893E1001C90010024D9
+S3152001B7507C7E1B7883BE0004801E00007C9D000039
+S3152001B7607C9B23787CBC2B78408500507F9FE37897
+S3152001B7707D20E8503929FFFF7C9F4800809E000CE0
+S3152001B7807F63DB787C8402144CE623827C000026CE
+S3152001B790540047FE7C0000D07FEB00387D250078E1
+S3152001B7A07D7F2B787FE5FB784BFF5AE1801E0000D9
+S3152001B7B07C00FA14480000B42C9D00004086001439
+S3152001B7C0813E00087F9FE3787D2048504BFFFFA8EC
+S3152001B7D0813E00087F9FE3787D2048507C9F48006A
+S3152001B7E0809E000C7F63DB787C8402144CE62382E6
+S3152001B7F07C000026540047FE7C0000D07FEB0038F9
+S3152001B8007D2500787D7F2B787FE5FB784BFF5A7D60
+S3152001B810801E0000813E00087C00FA147C804800CE
+S3152001B82040860048393DFFFF7FBFE0507C9D4800A0
+S3152001B8307C7BFA14809E000C4CE623827C00002639
+S3152001B840540047FE7C0000D07FBD00387D20007863
+S3152001B8507FBD03787FA5EB784BFF5A3193BE00005D
+S3152001B8607FFFEA1448000008901E00007FE3FB7862
+S3152001B870800100247C0803A68361000C83810010CB
+S3152001B88083A1001483C1001883E1001C3821002004
+S3152001B8904E80002080030000806300047C031A7818
+S3152001B8A0212300007C6919144E80002080030000AA
+S3152001B8B0812300047C0900503520000139600000F5
+S3152001B8C041820010800300087C8900004086000820
+S3152001B8D0396000017D635B784E8000207C6B1B788C
+S3152001B8E0800B0004812B00007C0900503460FFFF8F
+S3152001B8F04C800020800B00087C6302144E800020BF
+S3152001B9007C6B1B78812B0000800B00047C604851E6
+S3152001B9104C800020800B00087C6302144E8000209E
+S3152001B92081230000816300087D292A147C8958001F
+S3152001B9307D6B48507C00002654002FFE7C0000D0F1
+S3152001B9407D2900387D6000788163000C7D2903788C
+S3152001B9507C8B49AE4E8000208003000081230008A5
+S3152001B9607C8402147C8448007D2920507C0000269A
+S3152001B97054002FFE7C0000D07C8400387D20007886
+S3152001B9807C840378908300004E8000209421FFE878
+S3152001B9907C0802A693A1000C93C1001093E1001428
+S3152001B9A09001001C3860000848005AE97C7D1B780C
+S3152001B9B0480000257FA3EB788001001C7C0803A6A4
+S3152001B9C083A1000C83C1001083E1001438210018E3
+S3152001B9D04E800020380000009003000090030004F0
+S3152001B9E0386000004E8000209421FFF87C0802A6D2
+S3152001B9F09001000C48005AC9386000008001000CF3
+S3152001BA007C0803A6382100084E80002038600000FB
+S3152001BA104E800020800300002C800000900400004E
+S3152001BA204086000890830004908300004E80002009
+S3152001BA303800000090040000800300002C800000E4
+S3152001BA404086001090830000908300044800000C7B
+S3152001BA508123000490890000908300044E800020F9
+S3152001BA607C691B78806900002C8300004D860020AC
+S3152001BA7080030000900900004E8000207CA52B79D0
+S3152001BA8040820020800300047C8020008004000086
+S3152001BA90900300004C86002090A300044E800020D5
+S3152001BAA08004000090050000800300047C802000B3
+S3152001BAB04BFFFFE480630000200300007D20191462
+S3152001BAC07C602278216000007C0B01147D2B037998
+S3152001BAD04182001C386000004E8000208003000057
+S3152001BAE07C8020004D8600207C03037880030000A3
+S3152001BAF02C8000004086FFE8386000004E80002040
+S3152001BB00806300002C830000380000004186001469
+S3152001BB10806300002C830000300000014086FFF482
+S3152001BB207C0303784E8000209421FFE87C0802A63E
+S3152001BB309381000893A1000C93C1001093E1001496
+S3152001BB409001001C83E300002C9F00007C9D23783C
+S3152001BB507CBC2B78418600287FA803A67FE3FB784F
+S3152001BB6083DF00007F84E3784E8000212C83000050
+S3152001BB704186000C7FDFF3794082FFE07FE3FB788B
+S3152001BB808001001C7C0803A68381000883A1000C88
+S3152001BB9083C1001083E10014382100184E80002053
+S3152001BBA09421FDB87C0802A692E102249301022881
+S3152001BBB09321022C934102309361023493810238FE
+S3152001BBC093A1023C93C1024093E102449001024CAD
+S3152001BBD07C771B783F20002838840007548400385E
+S3152001BBE090999AB438A5000754BF00387D0343784D
+S3152001BBF054DB00383BA7000757BD0038480382D1E4
+S3152001BC003D2000283B80000093899ABC3D200028D6
+S3152001BC1093899B043F4000287C1FEA14901A9AA41A
+S3152001BC203D20002893E99AB07FE3FB787FA4EB7847
+S3152001BC3038A000EE4BFF5879807A9AA44801277DD7
+S3152001BC403F00002893989AF438610030388001EC3F
+S3152001BC5038A0000083FA9AA483B99AB43F400028F9
+S3152001BC607F7DD850937A9AB83BBDFDF07F7BEA144D
+S3152001BC703B7B00184BFF58399381000C93810010B0
+S3152001BC8093810014938100189381001C93810020D5
+S3152001BC9093810024938100287F63DB783C800027F1
+S3152001BCA03884432438A0000038C000067F67DB783B
+S3152001BCB07FA8EB787EE9BB78801A9AB87FEAFB7871
+S3152001BCC07C1F0050900100084800A6153D20002841
+S3152001BCD093699AA83801003090189AF47F63DB782B
+S3152001BCE04800AAC58001024C7C0803A682E10224F1
+S3152001BCF0830102288321022C83410230836102348D
+S3152001BD008381023883A1023C83C1024083E102443C
+S3152001BD10382102484E8000203C600027386343309A
+S3152001BD204E8000207C631B79408200103D20002834
+S3152001BD3090699ABC480000183D20002890699AAC69
+S3152001BD403D2000283800000190099ABC3860000087
+S3152001BD504E8000209421FFE87C0802A693810008EA
+S3152001BD6093A1000C93C1001093E100149001001CD3
+S3152001BD703D200028800983042C8000007C7F1B78CD
+S3152001BD807C9D23787CBC2B784085001C4BFF890D3C
+S3152001BD903C00004360000001900300003860FFFF73
+S3152001BDA04800007C4800BD3D7FE3FB784800C5ED97
+S3152001BDB07C7E1B79408200104800BDE93860FFFF78
+S3152001BDC04800005C73A000024182003C2C9F0000C9
+S3152001BDD0418600143D20002880099AF47C9F0000AA
+S3152001BDE0408600243D20002880099AE82C80000006
+S3152001BDF0418600147C0803A66B8300025463FFFE70
+S3152001BE004E800021801E00387C00E8787C00E37893
+S3152001BE10901E00384800BD8D386000008001001C4E
+S3152001BE207C0803A68381000883A1000C83C100102E
+S3152001BE3083E10014382100184E8000209421FFF060
+S3152001BE407C0802A693E1000C900100147C9F2378C4
+S3152001BE504800C5497C631B79418200148003003860
+S3152001BE6038600000901F0000480000083860FFFF7E
+S3152001BE70800100147C0803A683E1000C3821001000
+S3152001BE804E8000203D20002890699AE84E800020AF
+S3152001BE909421FFF07C0802A693C1000893E1000CCF
+S3152001BEA0900100147C9E23784800C4F17C7F1B7985
+S3152001BEB04082000C3860FFFF48000038807F00FC7C
+S3152001BEC02C83000041860018389F013C38A0009C35
+S3152001BED04BFF53B938000000901F00FC387F013C0E
+S3152001BEE07FC4F37838A0009C4BFF53A13860000033
+S3152001BEF0800100147C0803A683C1000883E1000C9D
+S3152001BF00382100104E8000209421FFF07C0802A6E3
+S3152001BF1093E1000C900100147C9F23784800C47D96
+S3152001BF207C641B794182001C7FE3FB783884013CC9
+S3152001BF3038A0009C4BFF535538600000480000088C
+S3152001BF403860FFFF800100147C0803A683E1000C02
+S3152001BF50382100104E8000209421FFF87C0802A68B
+S3152001BF609001000C4800C4357C631B794082000C8B
+S3152001BF703860000048000018806300342C830000DC
+S3152001BF804086000C3C600027386343448001000C46
+S3152001BF907C0803A6382100084E8000209421FFF852
+S3152001BFA07C0802A69001000C7C651B783C60002869
+S3152001BFB03863CCA88123000C800900347C0803A6B1
+S3152001BFC03C8000223884BF004E8000217C631B798F
+S3152001BFD04182000C3863FFE0480000184BFF86BD04
+S3152001BFE03C00000360000065900300003860FFFFFD
+S3152001BFF08001000C7C0803A6382100084E80002011
+S3152001C0009421FFF07C0802A693E1000C9001001414
+S3152001C010806300142C8300003BE000004186001061
+S3152001C0204BFF76C92C830000418600083BE00001C6
+S3152001C0307FE3FB78800100147C0803A683E1000CD2
+S3152001C040382100104E8000207C631B794182000C30
+S3152001C0503D200028906984EC3D200028806984ECED
+S3152001C0604E8000209421FFF87C0802A69001000C46
+S3152001C0704800C3297C631B793800000041820010E7
+S3152001C0808003003C212000007C0901147C030378F5
+S3152001C0908001000C7C0803A6382100084E80002070
+S3152001C0A09421FFF87C0802A69001000C4800C2EDFD
+S3152001C0B07C631B79380000004182000C8003003C20
+S3152001C0C0540007FE7C0303788001000C7C0803A63C
+S3152001C0D0382100084E8000209421FFE87C0802A622
+S3152001C0E093A1000C93C1001093E100149001001C50
+S3152001C0F07C7F1B787C9D23784800B9E93C60002829
+S3152001C1003863CCA88123000C800900307C0803A663
+S3152001C1107FE4FB787FA5EB784E8000217C7D1B7820
+S3152001C1204800BA81392000007C89E8004084002437
+S3152001C1307FE3FB7839290001800300007C89E80030
+S3152001C1403000FFE090030000386300044184FFE8DB
+S3152001C1507FA3EB788001001C7C0803A683A1000C39
+S3152001C16083C1001083E10014382100184E8000207D
+S3152001C1703C8080007C0006AC7CA018282C050000A1
+S3152001C180408200187C80192D7C0006AC40A2FFE479
+S3152001C190386000014E800020386000004E8000206B
+S3152001C1A07C6000A64E8000207C6001244C00012C7E
+S3152001C1B04E8000207C7302A64E8000207C7202A64F
+S3152001C1C04E8000207C7A02A64E8000207C7B02A62F
+S3152001C1D04E8000207C7303A64E8000207C7203A62D
+S3152001C1E04E8000207C7A03A64E8000207C7B03A60D
+S3152001C1F04E8000207C6300344E8000207C7F42A646
+S3152001C2004E8000207C0006AC4E8000203C60002839
+S3152001C210806385282C030001408200287C8000A6AB
+S3152001C220548304214082000C3860FFFF4E80002099
+S3152001C2307C0004AC648400047C8001244C00012C25
+S3152001C240386000004E80002038A000007CBC43A648
+S3152001C2507C7D43A67C9C43A64E8000207CAD42E695
+S3152001C2607CCC42E67CED42E67C0538004082FFF03C
+S3152001C27090A3000090C400004E8000207C7603A687
+S3152001C2804E8000207C7602A64E8000203943000095
+S3152001C2907C631A782C0A000140820014892400004C
+S3152001C2A0992500004C00012C4E8000202C0A00020A
+S3152001C2B040820014A1240000B12500004C00012C6D
+S3152001C2C04E8000202C0A00044082001481240000A4
+S3152001C2D0912500004C00012C4E8000203860FFFF84
+S3152001C2E04E8000204CC632424E8000207C7E9BA68A
+S3152001C2F04E8000207C7E9AA65463001E4E8000202C
+S3152001C3007C7523A64E8000207C7522A64E800020B7
+S3152001C3107C7CC3A64E8000207C708BA64E8000209C
+S3152001C3207C708AA64E8000207C718BA64E800020D0
+S3152001C3307C728AA64E8000207C788BA64E800020B7
+S3152001C3407C788AA64E8000207C798BA64E800020A0
+S3152001C3507C7A8AA64E80002000600000C9CBFF703F
+S3152001C360C9EBFF78CA0BFF80CA2BFF88CA4BFF9007
+S3152001C370CA6BFF98CA8BFFA0CAABFFA8CACBFFB076
+S3152001C380CAEBFFB8CB0BFFC0CB2BFFC8CB4BFFD0E3
+S3152001C390CB6BFFD8800B0004CB8BFFE07C0803A678
+S3152001C3A0CBABFFE8CBCBFFF0CBEBFFF86161000015
+S3152001C3B04E800020CBABFFE8CBCBFFF0800B0004F7
+S3152001C3C0CBEBFFF87C0803A6616100004E800020BC
+S3152001C3D000400000D9CBFF70D9EBFF78DA0BFF8044
+S3152001C3E0DA2BFF88DA4BFF90DA6BFF98DA8BFFA006
+S3152001C3F0DAABFFA8DACBFFB0DAEBFFB8DB0BFFC075
+S3152001C400DB2BFFC8DB4BFFD0DB6BFFD8DB8BFFE0E1
+S3152001C410DBABFFE8DBCBFFF0DBEBFFF8900B000497
+S3152001C4204E8000200060000081CBFFB881EBFFBC6D
+S3152001C430820BFFC0822BFFC4824BFFC8826BFFCCCD
+S3152001C440828BFFD082ABFFD482CBFFD882EBFFDC7D
+S3152001C450830BFFE0832BFFE4834BFFE8836BFFEC29
+S3152001C460838BFFF083ABFFF483CBFFF883EBFFFCD9
+S3152001C4704E8000200040000091CBFFB891EBFFBC1D
+S3152001C480920BFFC0922BFFC4924BFFC8926BFFCC3D
+S3152001C490928BFFD092ABFFD492CBFFD892EBFFDCED
+S3152001C4A0930BFFE0932BFFE4934BFFE8936BFFEC99
+S3152001C4B0938BFFF093ABFFF493CBFFF893EBFFFC49
+S3152001C4C04E8000200060000081CBFFB881EBFFBCCD
+S3152001C4D0820BFFC0822BFFC4824BFFC8826BFFCC2D
+S3152001C4E0828BFFD082ABFFD482CBFFD882EBFFDCDD
+S3152001C4F0830BFFE0832BFFE4834BFFE8800B0004D3
+S3152001C500836BFFEC7C0803A6838BFFF083ABFFF4E0
+S3152001C51083CBFFF883EBFFFC616100004E80002096
+S3152001C520838BFFF083ABFFF483CBFFF8800B0004F2
+S3152001C53083EBFFFC7C0803A6616100004E8000208E
+S3152001C5400040000091CBFFB891EBFFBC920BFFC0DE
+S3152001C550922BFFC4924BFFC8926BFFCC928BFFD0DC
+S3152001C56092ABFFD492CBFFD892EBFFDC930BFFE08B
+S3152001C570932BFFE4934BFFE8936BFFEC938BFFF038
+S3152001C58093ABFFF493CBFFF893EBFFFC900B0004E6
+S3152001C5904E8000203D6000283D2000223929C52CEF
+S3152001C5A0912B9C044E8000203D20002890698518FF
+S3152001C5B03D2000289089851C4E8000209421FF80F3
+S3152001C5C07C0802A690010084906100089081000CED
+S3152001C5D090A1001090C1001490E100189101001C57
+S3152001C5E0912100209141002438000001980100701A
+S3152001C5F03800000098010071380100089001007888
+S3152001C6003801008890010074388100703CA0002216
+S3152001C61038A5D92C38C00001480005418001008485
+S3152001C6207C0803A6382100804E8000209421FF80BB
+S3152001C6307C0802A690010084906100089081000C7C
+S3152001C64090A1001090C1001490E100189101001CE6
+S3152001C65091210020914100243800000198010070A9
+S3152001C6603800000098010071380100089001007817
+S3152001C6703801008890010074388100703CA00022A6
+S3152001C68038A5D92C38C00002480004D18001008485
+S3152001C6907C0803A6382100804E8000209421FFC803
+S3152001C6A07C0802A692E10014930100189321001C34
+S3152001C6B093410020936100249381002893A1002CAB
+S3152001C6C093C1003093E100349001003C7C7D1B78BE
+S3152001C6D07C9B23783D200028800983047CBA2B7813
+S3152001C6E02C8000007CD933787CF83B787D17437801
+S3152001C6F0418500143D2000288009CCA82C8000000B
+S3152001C7004086025C3D20002880098B582C80000041
+S3152001C71039298B5841860214812900182C89000059
+S3152001C720418600147D2803A64E8000217C7F1B783C
+S3152001C730480000083BE0FFFF3D20002780097F607D
+S3152001C7403D2000287C00FB9681298B682C890000DE
+S3152001C7507F80F9D6418601D47D2803A63860000062
+S3152001C7607F84E37838A100084E8000212C83FFFFC7
+S3152001C770418601B8800100087009000C408201AC95
+S3152001C7803D20002880098B542C800000418600F82A
+S3152001C7903D6010003D20002880099C00616B000748
+S3152001C7A07C0058387C8058004086008C3D2000282B
+S3152001C7B081699AF42C8B0000418600543D20002883
+S3152001C7C0816B0030812987C87C8B48004186002CEB
+S3152001C7D02C8B000041860010800900247C8B0000F0
+S3152001C7E0418600184BFF7EB53C00003D60000001EC
+S3152001C7F090030000480000183D20002881299AF462
+S3152001C80081290030800900304800000838000000E6
+S3152001C8102C800000418600203D2000287C0803A6AC
+S3152001C82080A99AF43860271680C5006038800002F6
+S3152001C8304E8000213D6010003D20002880099B602C
+S3152001C840616B01007C0058387C8058004086003896
+S3152001C8503860271638800002390000003D20002864
+S3152001C8603D60002880A99AF4800B9B503920000056
+S3152001C8707C0803A63940000080E500607CA62B7861
+S3152001C8804E8000213D20002881299AF480090060EC
+S3152001C89030000001900900603D2000283BC98B58DB
+S3152001C8A0801E000C2C80000041860020386000008C
+S3152001C8B07F84E3787C0803A67FE5FB7838C0000CEB
+S3152001C8C038E000044E8000217FA4EB787F65DB7879
+S3152001C8D07F46D3787F27CB787F08C3783FA0002770
+S3152001C8E0807D7F607EE9BB7848000139813E000C5E
+S3152001C8F0801D7F602C8900007C001A14901D7F60AA
+S3152001C90041860020386000007F84E3787D2803A6D5
+S3152001C9107FE5FB7838C0000C38E000004E8000210E
+S3152001C9204800B551480000547FA4EB787F65DB7839
+S3152001C9307F46D3787F27CB787F08C3783FA000270F
+S3152001C940807D7F607EE9BB78480000D9801D7F60AD
+S3152001C9507C001A14901D7F60480000207FA3EB788D
+S3152001C9607F64DB787F45D3787F26CB787F07C378B2
+S3152001C9707EE8BB784BFFFCB98001003C7C0803A60E
+S3152001C98082E10014830100188321001C83410020C9
+S3152001C990836100248381002883A1002C83C1003078
+S3152001C9A083E10034382100384E8000209421FF8015
+S3152001C9B07C0802A6900100847C6B1B789081000C78
+S3152001C9C090A1001090C1001490E100189101001C63
+S3152001C9D09121002091410024380000029801007025
+S3152001C9E03800000098010071380100089001007894
+S3152001C9F038010088900100747C8323783881007087
+S3152001CA003CA0002238A5D92C7D665B784800014DD3
+S3152001CA10800100847C0803A6382100804E800020F6
+S3152001CA209421FF687C0802A693A1008C93C10090F3
+S3152001CA3093E100949001009C906100809081000C0C
+S3152001CA4090A1001090C1001490E100189101001CE2
+S3152001CA5091210020914100243800000298010070A4
+S3152001CA603BA000009BA100713801000890010078CD
+S3152001CA70380100A0900100747C83237838810070EE
+S3152001CA803CA0002238A5D8CC38C10080480000CD72
+S3152001CA90812100809BA900008001009C7C0803A6BF
+S3152001CAA083A1008C83C1009083E1009438210098F2
+S3152001CAB04E8000209421FFF87C0802A69001000CEC
+S3152001CAC03CA0002238A5D92C38C000014800008D91
+S3152001CAD08001000C7C0803A6382100084E80002026
+S3152001CAE09421FFF87C0802A69001000C7C661B7835
+S3152001CAF07C8323787CA42B783CA0002238A5D92CD2
+S3152001CB00480000598001000C7C0803A63821000842
+S3152001CB104E8000209421FFF07C0802A6900100148B
+S3152001CB20906100087C8323787CA42B783CA000228A
+S3152001CB3038A5D8CC38C10008480000218121000839
+S3152001CB403800000098090000800100147C0803A623
+S3152001CB50382100104E8000209421FE107C0802A668
+S3152001CB6091C101A891E101AC920101B0922101B4D8
+S3152001CB70924101B8926101BC928101C092A101C486
+S3152001CB8092C101C892E101CC930101D0932101D434
+S3152001CB90934101D8936101DC938101E093A101E4E2
+S3152001CBA093C101E893E101EC900101F47C781B78B3
+S3152001CBB07C9E23787CB72B787CD6337839C00000CD
+S3152001CBC03A6000003DE000287F1DC3788B5D0000A0
+S3152001CBD02C9A0000418600182C9A002541860010C7
+S3152001CBE08F5800012C9A00004086FFF07FFDC0512E
+S3152001CBF0418200247EE803A67FA3EB787FE4FB78BD
+S3152001CC007EC5B3784E8000212C83000040860D64BA
+S3152001CC107E73FA142C9A000041860A4C3B180001B7
+S3152001CC20394000003900000038A000003A00000019
+S3152001CC303A4000003A200000920101983AA00000F3
+S3152001CC4039800000918101A43A8000003B60FFFFFA
+S3152001CC50398000009981019C8B5800003B18000106
+S3152001CC60381AFFE028800058418509F43D2000222A
+S3152001CC703929CB905400103A7C09002E3D20002200
+S3152001CC803929CB907C004A147C0903A64E800420C6
+S3152001CC9000000164000009CC000009CC0000017CE1
+S3152001CCA0000009CC000009CC000009CC000009CC09
+S3152001CCB0000009CC000009CC00000184000001D449
+S3152001CCC0000009CC000001CC000001E0000009CCE5
+S3152001CCD0000002840000028C0000028C0000028CFD
+S3152001CCE00000028C0000028C0000028C0000028CE5
+S3152001CCF00000028C0000028C000009CC000009CC47
+S3152001CD00000009CC000009CC000009CC000009CCA8
+S3152001CD10000009CC000009CC000009CC000009CC98
+S3152001CD200000031C000008C8000009CC000008C848
+S3152001CD30000009CC000009CC000009CC000009CC78
+S3152001CD40FFFFFFC8000009CC000009CC00000490B9
+S3152001CD50000009CC000009CC000009CC000009CC58
+S3152001CD60000009CC00000640000009CC000009CCD7
+S3152001CD70000006F0000009CC000009CC000009CC17
+S3152001CD80000009CC000009CC000009CC000009CC28
+S3152001CD90000009CC000009CC000009CC000002C823
+S3152001CDA000000320000008C8000008C8000008C8C9
+S3152001CDB0000002B800000320000009CC000009CCC5
+S3152001CDC0000002C0000009CC000003E0000004942A
+S3152001CDD000000540000009CC000009CC00000594A4
+S3152001CDE0000009CC00000644000009CC000009CC53
+S3152001CDF0000006FC8801019C2C8000004086FE5C18
+S3152001CE00380000209801019C4BFFFE5038A00001FC
+S3152001CE104BFFFE48893E0000552B063E380B00018C
+S3152001CE20288000084185001C38090001981E000051
+S3152001CE30813E00085560103A7D29021448000010F1
+S3152001CE40813E000438090004901E000482890000F6
+S3152001CE502C9400004084FE047E9400D03A00000108
+S3152001CE604BFFFDF83800002B9801019C4BFFFDEC90
+S3152001CE708B5800002C9A002A3B180001408600544A
+S3152001CE80893E0000552B063E380B000128800008FC
+S3152001CE904185001C38090001981E0000813E0008CA
+S3152001CEA05560103A7C89021448000010809E0004C7
+S3152001CEB038040004901E000483E400007FE0F8F8A3
+S3152001CEC07C00FE707C09F8387D3B03384BFFFD8CD6
+S3152001CED0381AFFD0288000093BE000004185002454
+S3152001CEE01C1F000A3000FFD07FE0D2148B580000AF
+S3152001CEF0381AFFD0288000093B1800014085FFE43D
+S3152001CF007FE0F8F87C00FE707C09F8387D3B033819
+S3152001CF104BFFFD503A4000014BFFFD403BE0000036
+S3152001CF201C1F000A3000FFD07FE0D2148B5800006E
+S3152001CF30381AFFD0288000093B1800014085FFE4FC
+S3152001CF407FF4FB784BFFFD1C390000014BFFFD0CE4
+S3152001CF50394000014BFFFD04893E0000552B063E5A
+S3152001CF60380B0001288000083BA100084185001CE0
+S3152001CF7038090001981E0000813E00085560103ACC
+S3152001CF807D29021448000010813E0004380900045E
+S3152001CF90901E00043B8000018809000339800000AF
+S3152001CFA09981019C98010008480006D83940000162
+S3152001CFB02C8A00004186001C893E0000552B063E26
+S3152001CFC0380B00012880000840850064480000785D
+S3152001CFD02C88000041860044893E0000552B063EE0
+S3152001CFE0380B0001288000084185001C3809000102
+S3152001CFF0981E0000813E00085560103A7D290214D2
+S3152001D00048000010813E000438090004901E0004E7
+S3152001D010A909000248000040893E0000552B063E22
+S3152001D020380B0001288000084185001C38090001C1
+S3152001D030981E0000813E00085560103A7D29021491
+S3152001D04048000010813E000438090004901E0004A7
+S3152001D050810900002C880000408400107D0800D042
+S3152001D0603800002D9801019C39400001480003F841
+S3152001D0702C8A00004186001C893E0000552B063E65
+S3152001D080380B000128800008408500684800007C94
+S3152001D0902C88000041860048893E0000552B063E1B
+S3152001D0A0380B0001288000084185001C3809000141
+S3152001D0B0981E0000813E00085560103A7D29021411
+S3152001D0C048000010813E000438090004901E000427
+S3152001D0D081290000B26900004BFFFAF0893E000069
+S3152001D0E0552B063E380B0001288000084185001C7F
+S3152001D0F038090001981E0000813E00085560103A4B
+S3152001D1007D29021448000010813E000438090004DC
+S3152001D110901E000481290000926900004BFFFAACA1
+S3152001D120394000012C8A00004186001C893E0000FE
+S3152001D130552B063E380B00012880000840850064E7
+S3152001D140480000782C88000041860044893E000072
+S3152001D150552B063E380B0001288000084185001C0E
+S3152001D16038090001981E0000813E00085560103ADA
+S3152001D1707D29021448000010813E0004380900046C
+S3152001D180901E0004A109000248000040893E0000CB
+S3152001D190552B063E380B0001288000084185001CCE
+S3152001D1A038090001981E0000813E00085560103A9A
+S3152001D1B07D29021448000010813E0004380900042C
+S3152001D1C0901E0004810900003940000048000290A9
+S3152001D1D0893E0000552B063E380B000128800008A9
+S3152001D1E04185001C38090001981E0000813E000877
+S3152001D1F05560103A7D29021448000010813E000432
+S3152001D20038090004901E00048109000039400002FB
+S3152001D2103D20002739C943483A2000013B40007888
+S3152001D2204800023C893E0000552B063E380B000182
+S3152001D230288000084185001C38090001981E00003D
+S3152001D240813E00085560103A7C690214480000109E
+S3152001D250807E000438030004901E000483A300008E
+S3152001D2602C9D00004086000C3D2000273BA9435CF5
+S3152001D2702C9B00004184004C7FA3EB783880000072
+S3152001D2807F65DB7848039F2D7C631B794182002CC7
+S3152001D2907F9D18507C9CD8004CE623827C0000267A
+S3152001D2A0540047FE7C0000D07F8900387F600078DB
+S3152001D2B07D3C0378480003C47F7CDB78480003BCAF
+S3152001D2C07FA3EB784BFF64997C7C1B78480003ACE9
+S3152001D2D0394000012C8A00004186001C893E00004D
+S3152001D2E0552B063E380B0001288000084085006436
+S3152001D2F0480000782C88000041860044893E0000C1
+S3152001D300552B063E380B0001288000084185001C5C
+S3152001D31038090001981E0000813E00085560103A28
+S3152001D3207D29021448000010813E000438090004BA
+S3152001D330901E0004A109000248000040893E000019
+S3152001D340552B063E380B0001288000084185001C1C
+S3152001D35038090001981E0000813E00085560103AE8
+S3152001D3607D29021448000010813E0004380900047A
+S3152001D370901E00048109000039400001480000E0A8
+S3152001D3803D20002739C943644800000C3D20002771
+S3152001D39039C943482C8A00004186001C893E000079
+S3152001D3A0552B063E380B0001288000084085006475
+S3152001D3B0480000782C88000041860044893E000000
+S3152001D3C0552B063E380B0001288000084185001C9C
+S3152001D3D038090001981E0000813E00085560103A68
+S3152001D3E07D29021448000010813E000438090004FA
+S3152001D3F0901E0004A109000248000040893E000059
+S3152001D400552B063E380B0001288000084185001C5B
+S3152001D41038090001981E0000813E00085560103A27
+S3152001D4207D29021448000010813E000438090004B9
+S3152001D430901E000481090000394000023128FFFFB7
+S3152001D4407C0941107CA000383000FFFF7C000110D0
+S3152001D4507E290038300000017D31037839800000B3
+S3152001D4609981019C7F75DB783008FFFF7D20411073
+S3152001D4703175FFFF7C0BA9107D2B03797EA0FE70F1
+S3152001D4807E5200383BA10198418200C42C8A0001BA
+S3152001D49041860048288A0001418400102C8A000216
+S3152001D4A04186007C480000905500077E5508E8FF1C
+S3152001D4B0600000309C1DFFFF4082FFF02C8500009C
+S3152001D4C04186008C2C800030418600843800003053
+S3152001D4D09C1DFFFF480000782888000940850034FC
+S3152001D4E03D60CCCC616BCCCD7D2858167D4859D674
+S3152001D4F05529E8FE1C09000A7C0040507D284B78FE
+S3152001D50028880009300000309C1DFFFF4185FFDC83
+S3152001D510380800309C1DFFFF480000345500073EA7
+S3152001D5205508E13F7C0E00AE9C1DFFFF4082FFF0B7
+S3152001D5304800001C3D2000273BA943787FA3EB78B8
+S3152001D5404BFF621D7C7C1B78480001387C1D0850EE
+S3152001D550338001984800012C3D2000288009851838
+S3152001D5602C800000418600F82C9B00274085003C3A
+S3152001D5706B4000677C0000D054000FFE6B490047CA
+S3152001D5807D2900D055290FFE7C0B48394082000C9D
+S3152001D5902C8500004186000C3B7BFFD9936101A4B9
+S3152001D5A03B600027480000287F60D8F87C09FE7080
+S3152001D5B07D2002787C0048507C00FE707C0900F8B2
+S3152001D5C05529077C7F6000387C1B4B783BA10008DE
+S3152001D5D039800000998100087FC3F3787F64DB7866
+S3152001D5E03D2000288009851838E101987C0803A68A
+S3152001D5F07F46D3787FA8EB787CE93B784E80002163
+S3152001D6007C7C1B7940800024800101982C800000BD
+S3152001D6107F9C00D03A400000418600683800002DEA
+S3152001D6209801019C4800005C800101982C80000033
+S3152001D6304186000C3800002D9801019C88010008C4
+S3152001D640392100097C0000D07C00FE707FAB0038B8
+S3152001D6507D2000787D7D0378480000282C9A0000E3
+S3152001D6604086000C7E639B784800030C3BA1000892
+S3152001D6709B4100083B800001398000009981019C73
+S3152001D6808801019C2C800000818101A47F7C621489
+S3152001D6904186002C3D200028800984F43B7B000133
+S3152001D6A0393500013000FFFF7C0001107EAB0038C8
+S3152001D6B07D2000787D7503784800001C3011FFFF1E
+S3152001D6C07C000110393B00027F6B00387D290078F0
+S3152001D6D07D7B4B787EB9AB787C99D8006A0B0001AB
+S3152001D6E0215200007C0A91147D6A00394CE62B8276
+S3152001D6F07D200026552947FE7D2900D07F204838E8
+S3152001D7007F6948787C194B78418200607FF9A05166
+S3152001D710408100582C9F0010408500303D80002814
+S3152001D7207EE803A6386C84F8388000107EC5B3786D
+S3152001D7304E8000212C830000408602383BFFFFF0FB
+S3152001D7402C9F00104185FFD83D8000287EE803A646
+S3152001D750386C84F87FE4FB787EC5B3784E8000214F
+S3152001D7602C8300004086020C8801019C2C8000003D
+S3152001D770418600247EE803A63861019C3880000199
+S3152001D7807EC5B3784E8000212C8300004186002877
+S3152001D790480001E02C9100004186001C63403000C6
+S3152001D7A0B001019E7EE803A63861019E3880000201
+S3152001D7B04BFFFFD06A0900013172FFFF7C0B9110EC
+S3152001D7C07D2B0039418200587FF9A05140810050BC
+S3152001D7D02C9F00104085002C7EE803A6386F850813
+S3152001D7E0388000107EC5B3784E8000212C8300003E
+S3152001D7F0408601803BFFFFF02C9F00104185FFDC16
+S3152001D8007EE803A6386F85087FE4FB787EC5B3786A
+S3152001D8104E8000212C830000408601587FFBA851B1
+S3152001D820408100502C9F00104085002C7EE803A6E5
+S3152001D830386F8508388000107EC5B3784E80002168
+S3152001D8402C8300004086012C3BFFFFF02C9F00100B
+S3152001D8504185FFDC7EE803A6386F85087FE4FB78E7
+S3152001D8607EC5B3784E8000212C83000040860104BA
+S3152001D8707EE803A67FA3EB787F84E3787EC5B37821
+S3152001D8804E8000212C830000408600E8818101A47E
+S3152001D8907D9F6379408100502C9F00104085002C8C
+S3152001D8A07EE803A6386F8508388000107EC5B378D8
+S3152001D8B04E8000212C830000408600B83BFFFFF0FC
+S3152001D8C02C9F00104185FFDC7EE803A6386F850872
+S3152001D8D07FE4FB787EC5B3784E8000212C8300003F
+S3152001D8E0408600902C900000418600607FF9A0516F
+S3152001D8F0408100582C9F0010408500303D80002833
+S3152001D9007EE803A6386C84F8388000107EC5B3788B
+S3152001D9104E8000212C830000408600583BFFFFF0FB
+S3152001D9202C9F00104185FFD83D8000287EE803A664
+S3152001D930386C84F87FE4FB787EC5B3784E8000216D
+S3152001D9402C8300004086002C7C94C8004CE62B8258
+S3152001D9507C000026540047FE7C0000D07E890038DA
+S3152001D9607F2000787D2903787E734A144BFFF25C71
+S3152001D9703860FFFF800101F47C0803A681C101A85C
+S3152001D98081E101AC820101B0822101B4824101B859
+S3152001D990826101BC828101C082A101C482C101C808
+S3152001D9A082E101CC830101D0832101D4834101D8B5
+S3152001D9B0836101DC838101E083A101E483C101E864
+S3152001D9C083E101EC382101F04E8000209421FFE80B
+S3152001D9D07C0802A69381000893A1000C93C1001034
+S3152001D9E093E100149001001C7C9C23787CBD2B784C
+S3152001D9F0809D00007F85E3784BFF3891801D0000D4
+S3152001DA00386000007C00E214901D00008001001C9B
+S3152001DA107C0803A68381000883A1000C83C1001022
+S3152001DA2083E10014382100184E8000209421FFE85C
+S3152001DA307C0802A693A1000C93C1001093E1001467
+S3152001DA409001001C7C601B787C9D23787CA32B781D
+S3152001DA507C0403787FA5EB784BFF7B057C63EA7812
+S3152001DA607C60FE707C031A787C6300507C63FE70B8
+S3152001DA708001001C7C0803A683A1000C83C1001031
+S3152001DA8083E10014382100184E8000209421FFE8FC
+S3152001DA907C0802A69381000893A1000C93C1001073
+S3152001DAA093E100149001001C7CBD2B782C9D000075
+S3152001DAB07C7C1B787C9E23787FBFEB784085003C5D
+S3152001DAC07F83E3787FC4F3787FE5FB784BFF7A7118
+S3152001DAD07C631B794080000C3860FFFF48000020E2
+S3152001DAE04082000C7C7FE850480000147FE3F85107
+S3152001DAF07FDE1A144181FFCC7FA3EB788001001CC5
+S3152001DB007C0803A68381000883A1000C83C1001031
+S3152001DB1083E10014382100184E8000209421FFD87B
+S3152001DB207C0802A6936100149381001893A1001C1E
+S3152001DB3093C1002093E100249001002C7CBD2B7819
+S3152001DB403BE000007C9FE8007C7C1B787C9E237850
+S3152001DB5038600000408400683B6000007F83E378E2
+S3152001DB603881000838A000014BFF79D52C83FFFFAF
+S3152001DB70418600702C8300014086002889410008D7
+S3152001DB805540063E6809000A216900007D2B49148B
+S3152001DB90216000007C0B01147D2B0379418200104A
+S3152001DBA07F7EF9AE3BFF0001480000147D5EF9AE91
+S3152001DBB03BFF00017C9FE8004184FFA42C83FFFFEB
+S3152001DBC041860020200300007D2019146BE000010E
+S3152001DBD0216000007C0B01147D2B00394182000855
+S3152001DBE03BE0FFFF7FE3FB788001002C7C0803A646
+S3152001DBF0836100148381001883A1001C83C1002046
+S3152001DC0083E10024382100284E8000209421FF78CA
+S3152001DC107C0802A69001008C906100809081000C06
+S3152001DC2090A1001090C1001490E100189101001CF0
+S3152001DC3091210020914100243800000298010070B2
+S3152001DC403800000098010071380100089001007821
+S3152001DC5038010090900100747C8323783C80002257
+S3152001DC603884DB8438A1008038C1008438E1007013
+S3152001DC704800003D8001008C7C0803A638210088DD
+S3152001DC804E80002081230000896900002C8B000032
+S3152001DC904186001438090001900300007D635B78FA
+S3152001DCA04E8000203860FFFF4E8000209421FFB86F
+S3152001DCB07C0802A692A1001C92C1002092E10024B8
+S3152001DCC0930100289321002C934100309361003465
+S3152001DCD09381003893A1003C93C1004093E1004415
+S3152001DCE09001004C906100087CFE3B783B200000AF
+S3152001DCF093210014893E00007C9C2378552B063EF7
+S3152001DD00380B0001288000087CBB2B787CD6337821
+S3152001DD103B4000004185001C38090001981E000087
+S3152001DD20813E00085560103A7C8902144800001093
+S3152001DD30809E000438040004901E00047F8803A6F8
+S3152001DD40830400007F63DB784E8000212C9A00003B
+S3152001DD5090610010408603E83EE000283D20002225
+S3152001DD603AA9DD3481210008880900002C800000B1
+S3152001DD70418603CC2C8000203BA000014186002453
+S3152001DD80408500102C8000254186007048000360E4
+S3152001DD902C80000A418503582C80000941840350B8
+S3152001DDA080010008817781B08121001030000001B7
+S3152001DDB0900100087C0B48AE700900284182037847
+S3152001DDC03FE000287F63DB78800100147F8803A66B
+S3152001DDD03880FFFF30000001900100144E800021A1
+S3152001DDE0813F81B0906100107C0918AE700900282E
+S3152001DDF04082FFD448000340380900019001000801
+S3152001DE00880900012C800025418602E43000FFD6D6
+S3152001DE1028800044418501B05400103A7C15002E1B
+S3152001DE203D2000223929DD347C004A147C0903A6D1
+S3152001DE304E80042000000114000001900000019092
+S3152001DE400000019000000190000001900000019067
+S3152001DE500000019000000190000001900000019057
+S3152001DE600000019000000190000001900000019047
+S3152001DE700000019000000190000001900000019037
+S3152001DE800000019000000190000001900000019027
+S3152001DE900000019000000190000001900000019017
+S3152001DEA00000019000000190000001900000019007
+S3152001DEB0000001900000019000000190000001780F
+S3152001DEC000000190000001900000019000000190E7
+S3152001DED000000190000001900000019000000190D7
+S3152001DEE000000190000001900000019000000190C7
+S3152001DEF00000019000000190000001D8000001906F
+S3152001DF0000000190000001900000019000000190A6
+S3152001DF100000019000000190000001D8000001904E
+S3152001DF20000001900000019000000190000001789E
+S3152001DF30000001900000019000000190000001788E
+S3152001DF400000019000000188812100088809000154
+S3152001DF502C80005B418600B82C800063418600B08E
+S3152001DF60817781B0812100107C0B48AE7009002891
+S3152001DF704182009C3FE000287F63DB78800100140A
+S3152001DF807F8803A63880FFFF30000001900100142E
+S3152001DF904E800021813F81B0906100107C0918AE2E
+S3152001DFA0700900284082FFD44800006481210008BE
+S3152001DFB0880900012C80006E4086000C3BA00000E1
+S3152001DFC04800004C817781B0812100107C0B48AE3E
+S3152001DFD070090028418200383FE000287F63DB7802
+S3152001DFE0800100147F8803A63880FFFF30000001DE
+S3152001DFF0900100144E800021813F81B09061001074
+S3152001E0007C0918AE700900284082FFD480010010D7
+S3152001E0102C80FFFF4086004C8121000888090000E2
+S3152001E0202C80006841860028418500102C80004CF8
+S3152001E0304186001C480000282C80006C4186001077
+S3152001E0402C80006E408600184800001881210008A7
+S3152001E050880900012C80006E418600083B400001A2
+S3152001E060386100087F04C3787F85E3787F66DB7893
+S3152001E07038E1000C39010010392100144800012132
+S3152001E0802C830000418600AC8001000C2C8000000E
+S3152001E090408600A4313DFFFF7D294910895E00009D
+S3152001E0A0397900015548063E3808000128800008C4
+S3152001E0B07D6348787F2048387C191B784185001C70
+S3152001E0C0380A0001981E0000813E00085500103ACA
+S3152001E0D07C89021448000010809E00043804000444
+S3152001E0E0901E0004830400004800004C8121000892
+S3152001E0F080010010892900007C8048004086003478
+S3152001E1007F63DB787F8803A6800100143880FFFFB8
+S3152001E11030000001900100144E800021800100088A
+S3152001E12090610010300000019001000848000008AD
+S3152001E1303B4000012C9A00004186FC2C2C990000C2
+S3152001E140800100107F23CB789016000040860014B2
+S3152001E150806100102063FFFF3063FFFF7C6319108D
+S3152001E1608001004C7C0803A682A1001C82C10020EC
+S3152001E17082E10024830100288321002C8341003081
+S3152001E180836100348381003883A1003C83C1004030
+S3152001E19083E10044382100484E8000209421FFE885
+S3152001E1A07C0802A69381000893A1000C93C100105C
+S3152001E1B093E100149001001C7C7C1B787CAC2B78AD
+S3152001E1C07CDD337883FC000038C00000881F000006
+S3152001E1D038A000006800002A216000007C0B011491
+S3152001E1E02C8000007D1E43787D2A4B789007000005
+S3152001E1F04186000C3BFF0001388000003D200028AD
+S3152001E200897F0000810981B0480000141C06000A9C
+S3152001E2103000FFD07CCB02148D7F00015569063E6C
+S3152001E2207C0848AE700900044082FFE4881F000084
+S3152001E2302C8000684186001C418500102C80004CF2
+S3152001E24041860010480000142C80006C4086000C8A
+S3152001E25088BF00003BFF00012C8600004086001C81
+S3152001E260881F0000680000637C0000D07C00FE70DF
+S3152001E2705400007E60060001881F00003000FFBBAD
+S3152001E280288000334185025C3D2000223929E1ACFA
+S3152001E2905400103A7C09002E3D2000223929E1AC98
+S3152001E2A07C004A147C0903A64E800420000001D874
+S3152001E2B0000001D8000001D8000002340000023419
+S3152001E2C0000002340000023400000234000002344F
+S3152001E2D0000002340000023400000234000002343F
+S3152001E2E0000002340000023400000234000002342F
+S3152001E2F00000023400000234000000F00000023465
+S3152001E300000002340000023C000002340000023406
+S3152001E31000000234000002340000023400000234FE
+S3152001E32000000234000000D0000000F0000001D8F7
+S3152001E330000001D8000001D800000234000000F0DE
+S3152001E34000000234000002340000023400000234CE
+S3152001E35000000280000000F0000000F000000234FE
+S3152001E360000002340000021000000234000000F018
+S3152001E3700000023400000234000000F07C83237880
+S3152001E3807CC433787D8563787FA6EB787FC7F37865
+S3152001E3907D4853784800030548000140881F000046
+S3152001E3A03000FFA828800020418500C43D2000229E
+S3152001E3B03929E2D05400103A7C09002E3D20002252
+S3152001E3C03929E2D07C004A147C0903A64E80042018
+S3152001E3D0000000940000009C0000009C0000009CAE
+S3152001E3E00000009C0000009C0000009C0000009C96
+S3152001E3F00000009C0000009C0000009C0000009C86
+S3152001E4000000008C0000009C0000009C0000009C85
+S3152001E4100000009C0000009C0000009C0000009C65
+S3152001E4200000009C0000009C0000009C000000846D
+S3152001E430000000940000009C0000009C0000009C4D
+S3152001E4400000009C0000008C0000009C0000009C45
+S3152001E4500000009438600008480000183860000A5F
+S3152001E460480000103860001048000008386000009D
+S3152001E4707D8763787FA8EB787FC9F37848000545C7
+S3152001E480480000583D2000288009851C2C8000006A
+S3152001E490418600507C8323787CA42B787CC53378F5
+S3152001E4A07D8663787C0803A67FA7EB787FC8F378FF
+S3152001E4B07D4953784E800021480000207C832378B3
+S3152001E4C07CC433787D8563787FA6EB787FC7F37824
+S3152001E4D07D485378480000A92C83000040860074AB
+S3152001E4E038600000480000787C8323787CC4337828
+S3152001E4F07FE5FB787D8663787FA7EB787FC8F37805
+S3152001E5007D495378480002852C8300004186FFD43B
+S3152001E510881F00002C80005D418600388C1F000179
+S3152001E5202C80005D4086FFF8480000282C840000DE
+S3152001E530418600202C85006840860010A00A000232
+S3152001E540B00400004800000C800A0000900400007E
+S3152001E550381F0001901C0000386000018001001C5A
+S3152001E5607C0803A68381000883A1000C83C10010C7
+S3152001E57083E10014382100184E8000209421FFD811
+S3152001E5807C0802A6930100089321000C93410010F8
+S3152001E590936100149381001893A1001C93C100205C
+S3152001E5A093E100249001002C7C7F1B787C9D2378AD
+S3152001E5B07CFA3B78807A00007CBC2B787C6018F84A
+S3152001E5C03120FFFF7C090110213D00007D2901D466
+S3152001E5D055290FFE7C0B48397CDB33787D1943782E
+S3152001E5E03BC000004182005C3F000028813881B099
+S3152001E5F07C0918AE70090028408200482C9F000033
+S3152001E6004186000C987F00003BFF00017F8803A60E
+S3152001E6103BDE00017F63DB783880FFFF4E800021DF
+S3152001E6207C9EE8007C6018F83120FFFF7C090110F0
+S3152001E6307D20002655292FFE7C0B48394082FFB0CC
+S3152001E6402C9F00004186000C38000000981F000016
+S3152001E650907A000080190000313EFFFF7C69F1109D
+S3152001E6607C00F214901900008001002C7C0803A67E
+S3152001E670830100088321000C83410010836100146B
+S3152001E6808381001883A1001C83C1002083E100241B
+S3152001E690382100284E8000209421FFD87C0802A62C
+S3152001E6A09321000C9341001093610014938100186B
+S3152001E6B093A1001C93C1002093E100249001002C1A
+S3152001E6C07C7E1B787C9D23787CFA3B78807A0000BF
+S3152001E6D07CBC2B787C6018F83120FFFF7C09011067
+S3152001E6E0213D00007D2901D455290FFE7C0B483997
+S3152001E6F07CDB33787D1943783BE00000418200487A
+S3152001E7002C9E00004186000C987E00003BDE000115
+S3152001E7107F8803A63BFF00017F63DB783880FFFFFC
+S3152001E7204E8000217C9FE8007C6018F83120FFFF95
+S3152001E7307C0901107D20002655292FFE7C0B4839A6
+S3152001E7404082FFC0907A000080190000313FFFFF10
+S3152001E7507C69F9107C00FA14901900008001002CC4
+S3152001E7607C0803A68321000C8341001083610014D9
+S3152001E7708381001883A1001C83C1002083E100242A
+S3152001E780382100284E8000209421FF587C0802A6BB
+S3152001E790930100889321008C93410090936100940A
+S3152001E7A09381009893A1009C93C100A093E100A4BA
+S3152001E7B0900100AC7C7E1B787C9C23787CDB3378B3
+S3152001E7C07CFA3B78880500007D1943782C80005B14
+S3152001E7D07D384B783880000038A5000140860188B5
+S3152001E7E0880500002C80005E40860010390000005C
+S3152001E7F038A500014800000839000001690B000115
+S3152001E8003921008738010008996900003929FFFF5D
+S3152001E8107C8900004084FFF4894500006949002D68
+S3152001E820200900007D2049146940005D2160000017
+S3152001E8307C0B01147D2B03794182001039210008BC
+S3152001E8407D0951AE38A5000138E000007D064378E8
+S3152001E85039010008894500006949005D2009000049
+S3152001E8607D204914216A00007C0B51147D2B0379EC
+S3152001E870408200642C8A002D4086004088050001D4
+S3152001E8807C840040408400342C80005D4186002C2D
+S3152001E8908C0500017C9F23787C9F00004185002800
+S3152001E8A07CC8F9AE880500003BFF00017C9F000073
+S3152001E8B04085FFF048000010880500007CC801AEA5
+S3152001E8C08885000038E700012C87007F38A50001E4
+S3152001E8D04085FF84880500002C80005D40860088E5
+S3152001E8E0807900007C6018F83120FFFF7C09011037
+S3152001E8F0213C00007D2901D455290FFE7C0B483986
+S3152001E9003BE00000418200583BA100087C1D18AE67
+S3152001E9102C800000418600482C9E00004186000C78
+S3152001E920987E00003BDE00017F6803A63BFF0001C5
+S3152001E9307F43D3783880FFFF4E8000217C9FE00003
+S3152001E9407C6018F83120FFFF7C0901107D2000260C
+S3152001E95055292FFE7C0B48394082FFB42C9F00009D
+S3152001E9604086000C38600000480000282C9E0000DC
+S3152001E9704186000C38000000981E000090790000A6
+S3152001E98080180000386000017C00FA1490180000FD
+S3152001E990800100AC7C0803A6830100888321008CBA
+S3152001E9A083410090836100948381009883A1009C18
+S3152001E9B083C100A083E100A4382100A84E80002055
+S3152001E9C09421FFC87C0802A69281000892A1000C1E
+S3152001E9D092C1001092E10014930100189321001CAA
+S3152001E9E093410020936100249381002893A1002C58
+S3152001E9F093C1003093E100349001003C7C7E1B786A
+S3152001EA007C9923787CB62B787CDC33787CFB3B782D
+S3152001EA107D1A43787D354B787D5453783BE0000051
+S3152001EA207C9FE0003B0000003BA0000080750000B9
+S3152001EA30408400345469063E2C89002B41860014FB
+S3152001EA406938002D201800007F00C1154182001869
+S3152001EA507F6803A63BE000017F43D3783880FFFF20
+S3152001EA604E8000217C9FE00068600030216000001C
+S3152001EA707C0B01147D20002655292FFE7D2B003984
+S3152001EA80418200947F6803A63BFF00017F43D37830
+S3152001EA903880FFFF4E8000217C9FE0004084005C8F
+S3152001EAA068690078200900007D20491468600058B3
+S3152001EAB0216000007C0B01147D2B03794182003CEF
+S3152001EAC06BC90010200900007D204914217E000019
+S3152001EAD07C0BF1147D2B0379418200203BC0001071
+S3152001EAE07F6803A63BFF00017F43D3783880FFFF71
+S3152001EAF04E800021480000407FC9FE707D20F278BB
+S3152001EB007C0048507C00FE707C0900F855290738A6
+S3152001EB104800001C7FC9FE707D20F2787C00485099
+S3152001EB207C00FE707C0900F87129000A7FC000383C
+S3152001EB307C1E4B787C9FE0007C6018F83120FFFF1B
+S3152001EB407C0901107D20002655292FFE7C0B483992
+S3152001EB50418200803EE00028813781B07D2918AEB0
+S3152001EB60712000044182000C3923FFD04800002087
+S3152001EB70712000024182000C3923FFA948000010B0
+S3152001EB80712000014182004C3923FFC97C89F000A4
+S3152001EB90408400403BFF00017F43D3787F6803A672
+S3152001EBA07C1DF1D63880FFFF7FA04A144E800021BC
+S3152001EBB07C9FE0007C6018F83120FFFF7C09011062
+S3152001EBC07D20002655292FFE7C0B48394082FF8C5B
+S3152001EBD02C9F00004086000C386000004800005041
+S3152001EBE03138FFFF7D2949107D7D00D02C99000009
+S3152001EBF07FA048387D6B48787C1D5B78418600185C
+S3152001EC002C9600684086000CB3B900004800000825
+S3152001EC1093B900009075000080140000313FFFFF7A
+S3152001EC207C69F9107C00FA14901400008001003CE4
+S3152001EC307C0803A68281000882A1000C82C10010F3
+S3152001EC4082E10014830100188321001C83410020E6
+S3152001EC50836100248381002883A1002C83C1003095
+S3152001EC6083E10034382100384E8000209421FFF0C2
+S3152001EC707C0802A693E1000C900100143FE00028D5
+S3152001EC80801F85242C8000004086003838600000D3
+S3152001EC90388000003CA0002238A5ECC838C000000E
+S3152001ECA03CE0002238E7ED1C3D0000223908ED7CCE
+S3152001ECB03D2000223929EEF84BFF71AD907F852446
+S3152001ECC0807F85242063FFFF3063FFFF7C6319105B
+S3152001ECD0800100147C0803A683E1000C3821001072
+S3152001ECE04E8000209421FFE07C0802A69361000C4F
+S3152001ECF09381001093A1001493C1001893E1001C85
+S3152001ED00900100243F600028801B85242C80000070
+S3152001ED107C7C1B787C9E23787CBD2B7841850014D6
+S3152001ED203C60000C606300014BFF59E5480000740C
+S3152001ED30387D000F546300387C7E19D6386300C0B5
+S3152001ED40480027517C7F1B7941820058387F00106B
+S3152001ED507FC4F3787FA5EB783D20002880C98520E4
+S3152001ED6038FF00C0480029E52C8300004086002C8E
+S3152001ED70387F00684803A1717FE3FB7880BB852437
+S3152001ED807F84E3784BFF73752C8300004086000C4B
+S3152001ED9038600000480000107FE3FB7848002721F7
+S3152001EDA03860FFFF800100247C0803A68361000CE4
+S3152001EDB08381001083A1001483C1001883E1001C04
+S3152001EDC0382100204E8000209421FFF07C0802A6E5
+S3152001EDD093E1000C900100147C7F1B787C832379BE
+S3152001EDE0418200244BFF49792C830000418600187B
+S3152001EDF03C60000C606300094BFF59153860FFFF2A
+S3152001EE00480000087FE3FB78800100147C0803A6F4
+S3152001EE1083E1000C382100104E8000209421FFF060
+S3152001EE207C0802A693C1000893E1000C900100140E
+S3152001EE307C7E1B78387E001038C0FFFF480032CD1B
+S3152001EE407C7F1B782C9FFFFF41860018387E006847
+S3152001EE503880000148039E397FE3FB78480000088B
+S3152001EE603860FFFF800100147C0803A683C10008D7
+S3152001EE7083E1000C382100104E8000209421FFE808
+S3152001EE807C0802A69381000893A1000C93C100106F
+S3152001EE9093E100149001001C3D2000288009830481
+S3152001EEA02C8000007C7D1B787C9E23787CBC2B7873
+S3152001EEB04185009C3D20002880098B542C80000030
+S3152001EEC0418600783FE010003D20002880099C0003
+S3152001EED063FF00017C00F8387C80F800408600182A
+S3152001EEE03D20002880099BA87C0803A638600039AC
+S3152001EEF04E8000213D20002880099B607C00F83847
+S3152001EF007C80F80040860034386000393880000063
+S3152001EF1038A0000038C000003D20002880099B5001
+S3152001EF2038E000007C0803A63900000039200000E3
+S3152001EF30394000004E8000213D20002881299AF485
+S3152001EF40800900503000000190090050387D0010E2
+S3152001EF507FC4F3787F85E3783FC0002880DE830471
+S3152001EF6038E000003806FFFF7CC603787CC6FE70B9
+S3152001EF7048002E492C8300004186001C801E8304F4
+S3152001EF802C8000004185000848008C193860FFFF5D
+S3152001EF9048000048801E83042C800000418500140F
+S3152001EFA0387D00683880FFFF4800598D48008BF571
+S3152001EFB03BFD00687FE3FB783880000048039CD145
+S3152001EFC0801E83042C8000004185000C7FE3FB78A2
+S3152001EFD0480058097F83E3788001001C7C0803A63A
+S3152001EFE08381000883A1000C83C1001083E10014F2
+S3152001EFF0382100184E8000209421FFB87C0802A6F3
+S3152001F0009381003893A1003C93C1004093E10044D1
+S3152001F0109001004C7C7F1B783804FFFF2880001C60
+S3152001F0203B8000007CBE2B787FDDF378418501682B
+S3152001F0303D2000223929EF545400103A7C09002E34
+S3152001F0403D2000223929EF547C004A147C0903A66D
+S3152001F0504E80042000000074000000B4000001402E
+S3152001F0600000014000000140000001400000014075
+S3152001F0700000014000000140000001400000014065
+S3152001F0800000014000000140000001400000014055
+S3152001F09000000140000000A40000014000000140E2
+S3152001F0A00000014000000140000001400000014035
+S3152001F0B00000014000000140000001400000014025
+S3152001F0C0000000DC00000130386100083880003083
+S3152001F0D04BFFAC45380000019001002C93C1003450
+S3152001F0E038000000901E0000387F0010388100088B
+S3152001F0F04800346D480000B0387F0010480032F5D2
+S3152001F100907E0000480000A0480089D9387F001071
+S3152001F1103880000038A0000038C0000048002FEDDC
+S3152001F1202C83FFFF4086FFE848008A794800007853
+S3152001F130387F00687FC4F37848039C21801D00181E
+S3152001F1402C800000418600102C8000014186001889
+S3152001F15048000054387F0010480032992C83000063
+S3152001F16048000014387F001048003289801F00585B
+S3152001F1707C801800408500307FC3F37848039A8D40
+S3152001F18048000024387F00687FC4F37848039C89AF
+S3152001F190480000143B80FFFF3C60000C60630002C6
+S3152001F1A04BFF556D7F83E3788001004C7C0803A6D5
+S3152001F1B08381003883A1003C83C1004083E1004460
+S3152001F1C0382100484E8000203D2000223929C1DC0B
+S3152001F1D0912300A4386000004E8000209421FFD0A6
+S3152001F1E07C0802A692E1000C9301001093210014E1
+S3152001F1F0934100189361001C9381002093A1002460
+S3152001F20093C1002893E1002C900100347CBC2B781B
+S3152001F210381CFFFF2880000F7C7F1B787C97237882
+S3152001F2207CDE3378418500983D2000223929F14C36
+S3152001F2305400103A7C09002E3D2000223929F14C38
+S3152001F2407C004A147C0903A64E8004200000007825
+S3152001F25000000078000000700000004000000070EF
+S3152001F26000000070000000700000005000000070D7
+S3152001F27000000070000000700000007000000070A7
+S3152001F28000000070000000700000006073E00003C1
+S3152001F2904082002C73C000034800002073E0000761
+S3152001F2A04082001C73C000074800001073E0000F65
+S3152001F2B04082000C73C0000F4182000C3860FFFFB2
+S3152001F2C0480000B44800099D7C781B78386002000C
+S3152001F2D04803450D7C791B78386002003FA0002247
+S3152001F2E0389DF0C84803445138600300480344F16F
+S3152001F2F07C7A1B7838600300389DF0C8480344396E
+S3152001F30038600600480344D97C7B1B7838600600A8
+S3152001F310389DF0C8480344212C97000040860014EC
+S3152001F3207F83E3787FE4FB787FC5F378480000107C
+S3152001F3307F83E3787FC4F3787FE5FB784BFFCF515A
+S3152001F3407C7F1B78386002007F24CB78480343E911
+S3152001F350386003007F44D378480343DD38600600D4
+S3152001F3607F64DB78480343D17F03C37848000909CA
+S3152001F3707FE3FB78800100347C0803A682E1000C40
+S3152001F3808301001083210014834100188361001C2E
+S3152001F3908381002083A1002483C1002883E1002CDE
+S3152001F3A0382100304E8000209421FFF87C0802A6E7
+S3152001F3B09001000C3D2000288009852C2C8000001E
+S3152001F3C0418600107C0803A64E80002148000008D3
+S3152001F3D04BFFFE0D8001000C7C0803A63821000896
+S3152001F3E04E8000209421FFF07C0802A693C10008DC
+S3152001F3F093E1000C900100147C7F1B784BFFCEF922
+S3152001F4002C9F00043BC000007C6B1B784186005C6E
+S3152001F410289F0004418500182C9F00014186003851
+S3152001F4202C9F000241860060480000742C9F00201A
+S3152001F43041860048289F0020418500102C9F0010FE
+S3152001F44041860030480000582C9F008041860034B8
+S3152001F4504800004C3D20002893E985303D200028B6
+S3152001F46093C98528480000403BC001004800001888
+S3152001F4703BC00200480000103BC0030048000008C2
+S3152001F4803BC043003D20002893E985303D200028DC
+S3152001F49038000001900985284800000C3860FFFFDC
+S3152001F4A048000018800B0284386000005400062AA8
+S3152001F4B07C00F378900B0284800100147C0803A65B
+S3152001F4C083C1000883E1000C382100104E80002002
+S3152001F4D03D200028806985304E8000209421FFF848
+S3152001F4E07C0802A69001000C3D2000288069853405
+S3152001F4F03880003438A000003CC0002238C6F428E9
+S3152001F5003CE0002238E7F4BC3D0000223908F5240E
+S3152001F510480000AD386000008001000C7C0803A67D
+S3152001F520382100084E8000209421FFE07C0802A6A5
+S3152001F530934100089361000C9381001093A100145C
+S3152001F54093C1001893E1001C900100247C7E1B7856
+S3152001F5507C9D23787CBC2B787CDB33783D2000286E
+S3152001F560806985347CFA3B78480037DD7C7F1B79BE
+S3152001F570418200207FE3FB787FC4F3787FA5EB7877
+S3152001F5807F86E3787F67DB787F48D3784800003130
+S3152001F5907FE3FB78800100247C0803A683410008D1
+S3152001F5A08361000C8381001083A1001483C100189C
+S3152001F5B083E1001C382100204E8000209421FFF891
+S3152001F5C07C0802A69001000C9083000838000000F8
+S3152001F5D09003000C90030010900300149003001870
+S3152001F5E090A3001C90C3002090E3002491030028DF
+S3152001F5F09003002C900300303D2000283D60002818
+S3152001F60080098594808B853490030004480037ED6A
+S3152001F610386000008001000C7C0803A63821000810
+S3152001F6204E8000209421FFF87C0802A69001000C50
+S3152001F6304BFF50693C00004260000002900300002D
+S3152001F6403860FFFF8001000C7C0803A638210008E2
+S3152001F6504E8000209421FFF87C0802A69001000C20
+S3152001F6603D20002881630000812985347C8B480058
+S3152001F670418600302C8B0000418600108009002431
+S3152001F6807C8B00004186001C4BFF50113C00003D45
+S3152001F69060000001900300003860FFFF4800002C45
+S3152001F6A03D20002880099BD42C8000009083002CCB
+S3152001F6B041860014806300242C83000041860008C3
+S3152001F6C09083002C386000008001000C7C0803A682
+S3152001F6D0382100084E8000209421FFF87C0802A6DC
+S3152001F6E09001000C3D20002881630000812985348A
+S3152001F6F07C8B4800418600302C8B0000418600100F
+S3152001F700800900247C8B00004186001C4BFF4F8D15
+S3152001F7103C00003D60000001900300003860FFFFBF
+S3152001F7204800000C90830030386000008001000CF6
+S3152001F7307C0803A6382100084E8000209421FFF87A
+S3152001F7407C0802A69001000C3D2000288163000060
+S3152001F750812985347C8B4800418600182C8B00003A
+S3152001F76041860038800900247C8B00004086002CCD
+S3152001F7703D200028816400008129858C7C8B4800EE
+S3152001F780418600302C8B0000418600108009002420
+S3152001F7907C8B00004186001C4BFF4F013C00003D45
+S3152001F7A060000001900300003860FFFF4800000C54
+S3152001F7B090830004386000008001000C7C0803A6B9
+S3152001F7C0382100084E8000209421FFF87C0802A6EB
+S3152001F7D09001000C7C6A1B783D200028816A00007C
+S3152001F7E0812985347C8B48007C83237841860030AF
+S3152001F7F02C8B000041860010800900247C8B0000A0
+S3152001F8004186001C4BFF4E953C00003D60000001E7
+S3152001F810900300003860FFFF480000683D20002863
+S3152001F820800985943960000090030004800A00084D
+S3152001F8309163000C91630010916300149163001889
+S3152001F84090030008800A001C3D2000289003001C1C
+S3152001F850800A00209143002490030020814A002839
+S3152001F8609163002C80099C583D200028808985348D
+S3152001F870900300309143002848003581386000000C
+S3152001F8808001000C7C0803A6382100084E80002048
+S3152001F8907C7243A67C9043A67C8000267C7142A67E
+S3152001F8A0386300017C7143A62C0300014182000CC0
+S3152001F8B09421FF4048000014386100003C200028B4
+S3152001F8C080219AA49461FF40908100A87C7A02A6A7
+S3152001F8D0906100A47C9B02A690810098548406B670
+S3152001F8E07C6000A67C6323787C6001244C00012C7B
+S3152001F8F07C7242A69061009C7C7342A69061002492
+S3152001F9007C9042A6908100283C60002880639A7CE6
+S3152001F910906100083C8000288064830438630001DC
+S3152001F920906483047C6102A6906100AC7C6902A686
+S3152001F930906100A0900100189041002090A1002C18
+S3152001F94090C1003090E10034910100389121003CB2
+S3152001F95091410040916100449181004891A1004C60
+S3152001F9604E8000207C6000A6546307FA5463045E2F
+S3152001F9707C6001244C00012C3D20002880698B5499
+S3152001F9802C030000418200F03D20002880E99C00E4
+S3152001F9903C801000608400017CE920383C80100006
+S3152001F9A0608400017C044800408200443CC0002859
+S3152001F9B080A69B342C0500004182000C386000642F
+S3152001F9C048000008386000659421FFE89121001065
+S3152001F9D03D20002880899BA87C8803A64E80002193
+S3152001F9E0812100107D2803A6382100183D200028FA
+S3152001F9F080E99B603C801000608400017CE7203810
+S3152001FA003C801000608400017C043800408200683C
+S3152001FA103CC0002880A69B342C0500004182000CA6
+S3152001FA203860006448000008386000653D200028E1
+S3152001FA3080899B502C0400004182003C9421FFE8E0
+S3152001FA40912100107C8803A63880000038A0000090
+S3152001FA5038C0000038E000003900000039200000DD
+S3152001FA60394000004E800021812100107D2803A607
+S3152001FA7038210018800100188041002080E10034DF
+S3152001FA80810100388121003C81410040816100448F
+S3152001FA908181004881A1004C806100AC7C6103A674
+S3152001FAA0806100A07C6903A63C60002880C1000813
+S3152001FAB090C39A7C8061009C7C6803A63C800028C8
+S3152001FAC080A4830438A5FFFF90A483047C7142A6F9
+S3152001FAD03863FFFF7C7143A62C030000408200445B
+S3152001FAE03CA0002880659B202C0300004082003426
+S3152001FAF03C60002880639AF43C8000288084CCB83E
+S3152001FB007C0320004182001C808300502C040000CD
+S3152001FB10418200688083003C2C0400004082005C06
+S3152001FB208081002880A1002C80C10030806100A83E
+S3152001FB307C6FF120806100A47C7043A680610098CF
+S3152001FB407C7343A6806100247C7243A68021000039
+S3152001FB507C6000A6546307327C6001244C00012C92
+S3152001FB607C7042A67C7A03A67C7342A67C7B03A684
+S3152001FB707C7242A64C0000643880000190859B204F
+S3152001FB8090C30084808100A4908301C8808100985D
+S3152001FB90908301BC8081009C908301C09003013C2D
+S3152001FBA0904301448081002490830148808100286C
+S3152001FBB09083014C8081002C9083015080810030FC
+S3152001FBC090830154808100A8908301CC802100007C
+S3152001FBD0902301407C8902A6908301C47C8102A6E0
+S3152001FBE0908301D090E301589103015C9123016038
+S3152001FBF091430164916301689183016C91A3017022
+S3152001FC0091C3017491E301789203017C92230180CF
+S3152001FC1092430184926301889283018C92A301907D
+S3152001FC2092C3019492E301989303019C932301A02B
+S3152001FC30934301A4936301A8938301AC93A301B0D9
+S3152001FC4093C301B493E301B87CA000A660A580020A
+S3152001FC507CA001244C00012C9421FFF0480039C0DE
+S3152001FC607C6000A65464045E7C8001244C00012C37
+S3152001FC704E800020546304207C8000A67C831B7860
+S3152001FC807C6001244C00012C4E8000203D40002840
+S3152001FC90800A85742C800000408600683D6000281B
+S3152001FCA03D2000223929FE34912B9BB43D6000284A
+S3152001FCB03D2000223929FE08912B9C203D600028F9
+S3152001FCC03D20002239290388912B859C3D600028FF
+S3152001FCD03D2000223929032C912B85A03D60002847
+S3152001FCE03D2000223929055C912B85A43D20002841
+S3152001FCF0380001B0900985A838000001900A857462
+S3152001FD00806A85743063FFFF7C6319104E80002062
+S3152001FD109421FFE87C0802A69381000893A1000C98
+S3152001FD2093C1001093E100149001001C7C7D1B7887
+S3152001FD307C9C23784BFFFF597FA3EB787F84E37864
+S3152001FD40480009498001001C7C0803A6838100081C
+S3152001FD5083A1000C83C1001083E10014382100180F
+S3152001FD604E8000209421FFE87C0802A693A1000C76
+S3152001FD7093C1001093E100149001001C3D2000283E
+S3152001FD80800985742C8000007C7E1B787C9F2378DB
+S3152001FD90408600184BFFFEF92C8300004186000C9B
+S3152001FDA03860FFFF4800014873C000014182003CD2
+S3152001FDB03D20002880099AC02C8000004086001032
+S3152001FDC04BFF48D93C000058480000503D200028F0
+S3152001FDD07C0803A680699B287FE4FB787C7E1A1425
+S3152001FDE04E800021480001083D200028817E000028
+S3152001FDF08129858C7C8B4800418600302C8B000024
+S3152001FE0041860010800900247C8B00004186001C5D
+S3152001FE104BFF48893C00003D600000019003000033
+S3152001FE203860FFFF480000C83BBE000C7FA3EB787B
+S3152001FE303880FFFF48004B0173E0000F41820084A8
+S3152001FE4073E0000163E900207C00002654001FFEB8
+S3152001FE507C0000D07FEB00387D2000787D7F037801
+S3152001FE6073E0000263E900607C00002654001FFE57
+S3152001FE707C0000D07FEB00387D2000787D7F0378E1
+S3152001FE8073E0000463E900807C00002654001FFE15
+S3152001FE907C0000D07FEB00387D2000787D7F0378C1
+S3152001FEA073E0000863E901807C00002654001FFEF0
+S3152001FEB07C0000D07FEB00387D2000787D7F0378A1
+S3152001FEC057E005F03000FFFF7C00011063E90010C8
+S3152001FED07FEB00387D2000787D7F037893FE00300C
+S3152001FEE07FA3EB78480048F5386000008001001CAC
+S3152001FEF07C0803A683A1000C83C1001083E10014B2
+S3152001FF00382100184E8000209421FFF87C0802A693
+S3152001FF109001000C7C651B783D2000288069859422
+S3152001FF2048000C698001000C7C0803A638210008D2
+S3152001FF304E8000209421FFF07C0802A693E1000C5C
+S3152001FF40900100143D20002880098B702C80000030
+S3152001FF507C7F1B78418600107C0803A64E800021F9
+S3152001FF60480000083860FFFF2C83FFFF4186001000
+S3152001FF707FE4FB784BFFFF95480000184BFF471D98
+S3152001FF803C0000116000000590030000386000006D
+S3152001FF90800100147C0803A683E1000C382100109F
+S3152001FFA04E8000209421FFE07C0802A693410008A0
+S3152001FFB09361000C9381001093A1001493C1001842
+S3152001FFC093E1001C900100247C7F1B7873E00001E3
+S3152001FFD07C9B23787CBC2B783BBBFFF8418200407D
+S3152001FFE03D20002880099AC82C80000040860010F8
+S3152001FFF04BFF46A93C000058480000547F64DB783B
+S315200200003D2000287C0803A680699B287F85E3780B
+S315200200107C7F1A144E800021480002E83D200028E9
+S31520020020817F00008129858C7C8B480041860030A7
+S315200200302C8B000041860010800900247C8B000056
+S315200200404186001C4BFF46553C00003D60000001E6
+S315200200509003000038600000480002A82C9B000094
+S31520020060408600147FE3FB787F84E37848000DE125
+S31520020070480002902C9C00004086001C3D2000284F
+S31520020080806985947F64DB7848000E3D38600000E5
+S31520020090480002703BDF000C7FC3F3783880FFFFF5
+S315200200A048004895381C00075400003830000008E4
+S315200200B0541AF87E817F002C801F00307D2BD010B1
+S315200200C07D2949107D294BB8700A00107F40483897
+S315200200D07D6948787C1A4B78418200407FE3FB7821
+S315200200E07FA4EB7838A00000480010C92C830000BA
+S315200200F0408600287FC3F378480046E17FE3FB78F9
+S315200201007F64DB783CA0002738A543F44800037DB2
+S3152002011038600000480001EC801D00045409F87E76
+S315200201207C9A4840408501945520083C7FDD021484
+S31520020130817E000471600001418200145560F87EC0
+S315200201407C0902147C80D04040840054387F000C05
+S31520020150480046897FE3FB787F84E37848000CF1E8
+S315200201607C7E1B794082000C386000004800019496
+S315200201707F63DB7880BD00047FC4F37854A5003CFE
+S3152002018038A5FFF84BFF11057FE3FB787F64DB7808
+S3152002019048000D357FC3F37848000168387F000494
+S315200201A0389E00084BFF9D293D400028813D0004D2
+S315200201B0801E0004814A8B54552BF87E5400F87E0B
+S315200201C02C8A00007D6B02145169083C913D000483
+S315200201D0418600B43D6010003D20002880099C0025
+S315200201E0616B00077C0058387C80580040860048A6
+S315200201F02C9F000041860010813F000080090030BC
+S3152002020048000008380000002C80000041860028A3
+S3152002021038602731388000047FE5FB787F66DB78FB
+S315200202207C0803A680FD00047F88E37854E7003C1F
+S315200202304E8000213D6010003D20002880099B60F1
+S31520020240616B01007C0058387C805800408600385B
+S3152002025038602731388000027FE5FB787FE6FB781D
+S315200202607F67DB783D600028800B9B507F89E3788F
+S315200202707C0803A6811D0004394000005508003C75
+S315200202804E800021801E0004813F00385400F87EF3
+S315200202907D290214913F0038801E0004813F0040D0
+S315200202A05400F87E7D290214913F0040801D0004EF
+S315200202B05400003C7FBD012E7FA3EB78808300048F
+S315200202C080BF002C5484F87E7C9A2050480002215C
+S315200202D07C7E1B78387F000C480045012C9E00004E
+S315200202E04186001C7FE3FB78389E000848000BD924
+S315200202F0801F003430000001901F00347F63DB78BA
+S31520020300800100247C0803A6834100088361000C37
+S315200203108381001083A1001483C1001883E1001C8D
+S31520020320382100204E8000209421FFF07C0802A66E
+S3152002033093C1000893E1000C900100147C7E1B7887
+S3152002034073C000013BE00000418200383D200028B6
+S3152002035080099AC42C800000408600104BFF433D42
+S315200203603C0000584800004C3D2000287C0803A68B
+S3152002037080699B287C7E1A144E80002148000098B2
+S315200203803D200028817E00008129858C7C8B4800B7
+S31520020390418600302C8B0000418600108009002403
+S315200203A07C8B00004186001C4BFF42F13C00003D45
+S315200203B060000001900300003860FFFF48000058EB
+S315200203C0387E000C3880FFFF4800456D815E0004B0
+S315200203D02C8A000041860030800AFFFC814A0000F8
+S315200203E05400F87E7D20F8107D2949107D294BB8CE
+S315200203F02C8A00007FEB48387C0348787D7F1B7867
+S315200204004086FFD8387E000C480043D157E3083C8B
+S315200204103863FFF8800100147C0803A683C1000814
+S3152002042083E1000C382100104E8000209421FFF831
+S315200204307C0802A69001000C3D20002881699B8C35
+S315200204402C8B00007C651B784186003080050030AD
+S3152002045070090020418200243D2000288069857889
+S3152002046038C000007D6803A638E00000390000008D
+S31520020470392000004E8000218001000C7C0803A652
+S31520020480382100084E8000209421FFF87C0802A61D
+S315200204909001000C3D20002881699B8C2C8B00004A
+S315200204A07C661B787C8A23787CA42B784186003054
+S315200204B08006003070090080418200243D200028F9
+S315200204C08069857C7D4553787D6803A638E00000E7
+S315200204D039000000392000004E8000218001000CE6
+S315200204E07C0803A6382100084E8000207C84284000
+S315200204F07C691B7841840018806900045460F87E68
+S315200205007C0400507C8028404084000C3860000027
+S315200205104E8000205003083C906900045463003C3E
+S315200205207D29192E7C691A14800300045080083C08
+S315200205309003000481290004552907FE512007FE55
+S31520020540900300045400003C7C63012E4E80002060
+S315200205509421FFF87C0802A69001000C7C641B788B
+S315200205603D200028806985944BFFF7FD8001000C11
+S315200205707C0803A6382100084E8000209421FFF033
+S315200205807C0802A693C1000893E1000C9001001496
+S315200205903D2000287FC321D6806985947FC4F378C5
+S315200205A0480008AD7C7F1B79418200107FE3FB78EF
+S315200205B07FC4F3784BFF97617FE3FB7880010014B9
+S315200205C07C0803A683C1000883E1000C38210010B1
+S315200205D04E8000209421FFF87C0802A69001000C90
+S315200205E07C601B787C8523783D2000288069859451
+S315200205F07C0403784BFFF9B18001000C7C0803A62A
+S31520020600382100084E8000209421FFF87C0802A69B
+S315200206109001000C7C641B783D200028806985941B
+S31520020620480008A58001000C7C0803A63821000892
+S315200206304E8000209421FFF87C0802A69001000C2F
+S315200206403D200028806985944BFFFCE18001000C47
+S315200206507C0803A6382100084E8000209421FFF84A
+S315200206607C0802A69001000C3D2000288089857016
+S315200206703863000C48004F2D8001000C7C0803A62D
+S31520020680382100084E8000209421FFE87C0802A62B
+S315200206909381000893A1000C93C1001093E10014EA
+S315200206A09001001C3F800028801C86242C8000009C
+S315200206B07C7E1B787C9D2378408600683FE000285C
+S315200206C0807F858C3880004438A000003CC0002200
+S315200206D038C606503CE0002238E707743D00002267
+S315200206E03908082C4BFFEED92C83000040860034B3
+S315200206F03D200028807F858C8089859090830024E8
+S315200207004BFFF0C93C600028386385AC7FC4F37880
+S315200207107FA5EB784800016138000001901C8624F1
+S315200207203D200028806986243063FFFF7C631910F0
+S315200207308001001C7C0803A68381000883A1000C8B
+S3152002074083C1001083E10014382100184E80002056
+S315200207509421FFE87C0802A67D80002693A1000C46
+S3152002076093C1001093E100149001001C91810008AE
+S315200207707C7E1B783D2000288069858C7C9D237891
+S31520020780480025C57C7F1B794D000000418A001454
+S315200207907FE3FB787FC4F3787FA5EB78480000D906
+S315200207A03D20002880098B542C800000418600A021
+S315200207B03D6010003D20002880099C00616B0007E7
+S315200207C07C0058387C80580040860038418A0010C8
+S315200207D0813F0000800900304800000838000000F0
+S315200207E02C8000004186001C386027307C0803A636
+S315200207F0388000027FE5FB787FA6EB784E800021C9
+S315200208003D6010003D20002880099B60616B01003D
+S315200208107C0058387C805800408600343860273067
+S31520020820388000027FE5FB787FE6FB783D200028B2
+S3152002083080099B507FA7EB787C0803A6390000002D
+S3152002084039200000394000004E8000217FE3FB78EA
+S315200208508001001C818100087C0803A683A1000C6C
+S3152002086083C1001083E100147D8201203821001803
+S315200208704E8000209421FFE87C0802A693A1000C5A
+S3152002088093C1001093E100149001001C7C7F1B7819
+S315200208907C9E23787CBD2B783880004438A00000CB
+S315200208A04BFF0C0D38000008901F002C3D2000281D
+S315200208B03D600028800985A8812B85A47D2803A672
+S315200208C07FE3FB78901F00304E800021387F0004A2
+S315200208D04BFF95593D20002880099C4C2C80000016
+S315200208E0418600103D200028808985904800000C12
+S315200208F03D2000288089858C7FE3FB78480024FDF3
+S315200209007FE3FB787FC4F3787FA5EB78480000511C
+S315200209108001001C7C0803A683A1000C83C1001061
+S3152002092083E10014382100184E8000209421FFF81C
+S315200209307C0802A69001000C4BFF3D613C00001191
+S3152002094060000004900300003860FFFF8001000C65
+S315200209507C0803A6382100084E8000209421FFE857
+S315200209607C0802A693A1000C93C1001093E1001407
+S315200209709001001C7C7F1B7873E000017CBE2B78E3
+S31520020980418200403D200028800985802C8000007D
+S31520020990408600144BFF3D053C00005860000001D4
+S315200209A0480000A03D2000287C0803A680699B28D9
+S315200209B07FC5F3787C7F1A144E800021480001B04F
+S315200209C03D200028817F00008129858C7C8B480070
+S315200209D0418600282C8B00004186001080090024C5
+S315200209E07C8B0000418600144BFF3CB13C00003D4D
+S315200209F0600000014800004C380400075409003802
+S31520020A007C0448507C9E00404184000C7FC0F050FC
+S31520020A10480000083BC00000801F002C57DE00382B
+S31520020A205400083C300000187C9E00407D244B7800
+S31520020A304084001C4BFF3C653C0000116000000214
+S31520020A40900300003860FFFF4800012438000000B0
+S31520020A5090040000380000089004000490840008E6
+S31520020A603BA40008381EFFF060000001901D000420
+S31520020A705409003C7FBD492E380000087D3D4A14AA
+S31520020A8090090004387F000C3880FFFF48003EA9F9
+S31520020A903D20002880098B542C800000418600A42A
+S31520020AA03D6010003D20002880099C00616B0007F4
+S31520020AB07C0058387C8058004086003C2C9F0000E1
+S31520020AC041860010813F000080090030480000085E
+S31520020AD0380000002C8000004186001C3860273236
+S31520020AE07C0803A6388000027FE5FB787FC6F37870
+S31520020AF04E8000213D6010003D20002880099B6029
+S31520020B00616B01007C0058387C8058004086003496
+S31520020B1038602732388000027FE5FB787FE6FB7853
+S31520020B203D20002880099B507FC7F3787C0803A6C6
+S31520020B303900000039200000394000004E80002193
+S31520020B40387F00043880000038BD00084BFF931D13
+S31520020B50387F000C801F002857C9F87E7C004A1473
+S31520020B60901F002848003C75386000008001001C58
+S31520020B707C0803A683A1000C83C1001083E1001424
+S31520020B80382100184E8000209421FFE07C0802A61E
+S31520020B90934100089361000C9381001093A10014E5
+S31520020BA093C1001893E1001C900100247C7E1B78DF
+S31520020BB03D200028817E00008129858C7C8B48007F
+S31520020BC07C9A23787CBC2B78418600302C8B0000C3
+S31520020BD041860010800900247C8B00004186001C7F
+S31520020BE04BFF3AB93C00003D600000019003000033
+S31520020BF03860000048000230381A000754000038D6
+S31520020C0030000008541DF87E387E000C817E002CB0
+S31520020C103880FFFF7C0BE8107C0001107C0003B8B3
+S31520020C207FA900387D6000787D3D037848003D0924
+S31520020C305780F87E7F7D021483FE00042C9F0000DD
+S31520020C4041860040801FFFFC5409F87E7C89D840EB
+S31520020C50418500287C1FE3967C00E1D67C9F00001C
+S31520020C604086000C7C89E8004186001083FF000044
+S31520020C702C9F00004086FFD02C9F000040860064F7
+S31520020C80387E000C48003B553D200028800985A06F
+S31520020C902C800000418600147C0803A67FC3F378CB
+S31520020CA07F44D3784E8000213C60001160630001AE
+S31520020CB04BFF3A5D801E0030700900404182FF34AE
+S31520020CC03D20002881299AF4800900387009000203
+S31520020CD04082FF2038600000480064094BFFFF1461
+S31520020CE07FC3F378389FFFF87FA5EB7880DE002C50
+S31520020CF07F87E378480006197C631B794082000CC3
+S31520020D0083FF00004BFFFF387C7F1B783D200028A5
+S31520020D1081298B54801F00042C8900005400003C3A
+S31520020D20901F0004418600B43D6010003D2000283B
+S31520020D3080099C00616B00077C0058387C80580033
+S31520020D40408600482C9E000041860010813E00000D
+S31520020D508009003048000008380000002C8000007E
+S31520020D60418600283860272E388000047FC5F37814
+S31520020D7038DF00087C0803A680FF00047F48D3786A
+S31520020D8054E7003C4E8000213D6010003D200028A3
+S31520020D9080099B60616B01007C0058387C8058007A
+S31520020DA0408600383860272E388000027FC5F378C7
+S31520020DB07FC6F37838FF00083D600028800B9B50E1
+S31520020DC07F49D3787C0803A6811F0004394000009E
+S31520020DD05508003C4E800021387E000C813E0034AE
+S31520020DE0801E003C39290001913E0034300000016A
+S31520020DF0901E003C801F0004813E00385400F87E7D
+S31520020E007D290214913E0038801F0004813E004055
+S31520020E105400F87E7D290214913E0040480039BDD7
+S31520020E20387F0008800100247C0803A6834100083D
+S31520020E308361000C8381001083A1001483C10018F2
+S31520020E4083E1001C382100204E8000209421FFF8E7
+S31520020E507C0802A69001000C7C6B1B787160000155
+S31520020E60418200443D200028800985882C8000008C
+S31520020E704086001C4BFF38253C00005860000001CC
+S31520020E8090030000386000004800002C3D20002816
+S31520020E907C0803A680699B287C6B1A144E8000214D
+S31520020EA0480000143D20002880A985987D635B7840
+S31520020EB04BFFFCD98001000C7C0803A638210008D0
+S31520020EC04E8000209421FFE87C0802A69381000828
+S31520020ED093A1000C93C1001093E100149001001C11
+S31520020EE07C7E1B7873C000017C9C23784182003C67
+S31520020EF03D200028800985842C8000004086001031
+S31520020F004BFF37993C000058480000503D200028EE
+S31520020F107C0803A680699B287F84E3787C7E1A144A
+S31520020F204E8000214800026C3D200028817E000070
+S31520020F308129858C7C8B4800418600302C8B0000D1
+S31520020F4041860010800900247C8B00004186001C0B
+S31520020F504BFF37493C00003D600000019003000032
+S31520020F603860FFFF4800022C2C9C0000418602209C
+S31520020F703BBE000C7FA3EB783880FFFF480039B9CF
+S31520020F80801E0030700900103BFCFFF84182008869
+S31520020F907FC3F3787FE4FB7838A00000480002156F
+S31520020FA02C830000408600707FA3EB784800382D02
+S31520020FB03D2000288009859C2C8000004186001C4B
+S31520020FC07FC3F3787C0803A67F84E3783CA00027BE
+S31520020FD038A544044E800021801E0030700901008D
+S31520020FE0418200203D20002881299AF48009003878
+S31520020FF0700900024082000C38600000480060E55B
+S315200210003C600011606300034BFF37053860FFFF29
+S31520021010480001803D20002880098B542C80000046
+S31520021020418600B03D6010003D20002880099C00CA
+S31520021030616B00077C0058387C805800408600444B
+S315200210402C9E000041860010813E0000800900305F
+S3152002105048000008380000002C8000004186002449
+S315200210603860272F388000037FC5F3787C0803A6D3
+S3152002107080FF00047F86E37854E7003C4E800021FF
+S315200210803D6010003D20002880099B60616B0100B5
+S315200210907C0058387C805800408600383860272FDC
+S315200210A0388000027FC5F3787FC6F3787F87E3789E
+S315200210B03D600028800B9B50392000007C0803A647
+S315200210C0811F0004394000005508003C4E80002153
+S315200210D0813F00008009000470090001801F00047E
+S315200210E0541DF87E418200285400003C901F0004C3
+S315200210F083FF0000813F00045520F87E7C00EA141D
+S315200211005009083C913F00044800001C6000000181
+S31520021110901F0004387E00043880000038BF000883
+S315200211204BFF8D49817F0004556AF87E5540083C65
+S315200211307C9F021481240004712000014182002434
+S315200211407D605B785529F87E7D2A4A145120083C19
+S31520021150901F0004387E0004388400084BFF8D71EE
+S31520021160801F0004387E000C5400003C7FFF012EB5
+S31520021170813E0034801E00383929FFFF913E00341B
+S315200211807C1D0050901E0038480036513860000001
+S315200211908001001C7C0803A68381000883A1000C21
+S315200211A083C1001083E10014382100184E800020EC
+S315200211B09421FFE87C0802A69381000893A1000CE3
+S315200211C093C1001093E100149001001C7C7D1B78D2
+S315200211D07C9E23787CBC2B783D20002880098B546A
+S315200211E02C800000418600783FE010003D20002838
+S315200211F080099C0063FF00017C00F8387C80F8009F
+S31520021200408600183D20002880099BA87C0803A65A
+S31520021210386000394E8000213D20002880099B60DD
+S315200212207C00F8387C80F80040860034386000392B
+S31520021230388000003D20002880099B5038A00000FD
+S3152002124038C0000038E000007C0803A63900000000
+S3152002125039200000394000004E8000213D20002820
+S3152002126081299AF48009005030000001900900502B
+S31520021270387D000C4800356573C000073BE000004E
+S3152002128040820058817E00045569F87E552A083C22
+S315200212907140000640820044801D00287C8900405F
+S315200212A041850038556007FE7C80E0004086002C90
+S315200212B07C0AF02E7C9E000040860020813E0000A3
+S315200212C0800900045400003C7D2902147FDF4A78FD
+S315200212D0201F00007FE0F914387D000C3880FFFFC4
+S315200212E048003655480068BD7FE3FB788001001C24
+S315200212F07C0803A68381000883A1000C83C1001009
+S3152002130083E10014382100184E8000209421FFE04A
+S315200213107C0802A6934100089361000C9381001079
+S3152002132093A1001493C1001893E1001C900100249C
+S315200213307CBC2B787CDB3378800400047CE700D0ED
+S315200213405400003C7FC40214381CFFFC5400083CA5
+S315200213507FA0F0507FBD38383BFDFFF87C04F85063
+S315200213607C090E707D2901947C89D8407C7A1B7871
+S31520021370408400247C9F200040860014387A000492
+S315200213807FA4EB784BFF8B494800001C3860000095
+S31520021390480000A4909DFFF8800400045120083CD8
+S315200213A0900400047C1FF0505789083C7C090050A9
+S315200213B05769083C7C80484040840028813F0004CD
+S315200213C07C1DF050300000085009003C61290001C4
+S315200213D0913F00045529003C7FE9F92E480000542C
+S315200213E0801F0004387A00045380083C6000000104
+S315200213F0901F00045400003C7FBF0214813D00046C
+S315200214007D7DF0505169003C913D00047FFF012E05
+S31520021410801D0004389D000860000001901D000414
+S315200214204BFF8A85801D00045400003C7FBD012E9F
+S315200214307FE3FB78800100247C0803A68341000811
+S315200214408361000C8381001083A1001483C10018DC
+S3152002145083E1001C382100204E8000209421FFF8D1
+S315200214607C0802A69001000C7C601B787C85237880
+S315200214703C600028386385AC7C0403784BFFF4E19A
+S315200214808001000C7C0803A6382100084E8000202B
+S315200214909421FFF87C0802A69001000C7C641B783C
+S315200214A03C600028386385AC4BFFF9A58001000C0F
+S315200214B07C0803A6382100084E8000209421FFF8DC
+S315200214C07C0802A69001000C7C641B783C600028F4
+S315200214D0386385AC4BFFF9F18001000C7C0803A62A
+S315200214E0382100084E8000209421FFF87C0802A6AD
+S315200214F09001000C3863000C3880000138A00001EE
+S315200215004800261D8001000C7C0803A6382100080D
+S315200215104E8000209421FFF07C0802A693C1000889
+S3152002152093E1000C900100143FC00028801E86CC57
+S315200215302C800000408600543FE00028807F865C95
+S315200215403880005838A000003CC0002238C614B0AB
+S315200215503CE0002238E716483D0000223908185898
+S315200215604BFFE05D2C830000408600203D200028B2
+S31520021570807F865C80898660908300244BFFE24DC3
+S3152002158038000001901E86CC3D200028806986CC3A
+S315200215903063FFFF7C631910800100147C0803A6C8
+S315200215A083C1000883E1000C382100104E80002000
+S315200215B09421FFD87C0802A6936100149381001817
+S315200215C093A1001C93C1002093E100249001002CDA
+S315200215D07C7E1B787C9D23783D200028800983040D
+S315200215E07CBC2B782C800000381D000F540000385C
+S315200215F07FFE01D64085001C4BFF30A13C000043F4
+S3152002160060000001900300003860000048000118C5
+S315200216103D200028800986CC2C80000040860010C0
+S315200216204BFFFEF52C8300004086FFE03F6000283A
+S31520021630807B865C7FE4FB7838A100084800163D53
+S315200216407C7F1B794182FFC47FE3FB787FC4F378DA
+S315200216507FA5EB7880E100087F86E378480000EDDD
+S315200216602C83000041860014807B865C7FE4FB7815
+S31520021670480016FD4BFFFF943D20002880098B541D
+S315200216802C8000004186009C3D6010003D200028F1
+S3152002169080099C00616B00077C0058387C805800CA
+S315200216A040860034813F0000800900302C800000F3
+S315200216B04186002438602724388000047FE5FB78A1
+S315200216C07C0803A67FC6F3787FA7EB787F88E3782A
+S315200216D04E8000213D6010003D20002880099B603D
+S315200216E0616B01007C0058387C80580040860034AB
+S315200216F038602724388000027FE5FB787FE6FB7876
+S315200217003D20002880099B507FC7F3787C0803A6DA
+S315200217107FA8EB787F89E378394000004E8000214C
+S315200217207FE3FB788001002C7C0803A683610014EA
+S315200217308381001883A1001C83C1002083E1002439
+S31520021740382100284E8000209421FFC87C0802A65A
+S31520021750930100189321001C9341002093610024D9
+S315200217609381002893A1002C93C1003093E1003489
+S315200217709001003C7C7E1B787C9C23787CB82B785D
+S315200217803D200028800986CC7CD933782C80000025
+S315200217907CFD3B783818000F541A0038408600101A
+S315200217A04BFFFD752C830000408600487FC3F378EB
+S315200217B0388000584BFF856173200001418200105A
+S315200217C02C800001418600144800001C3D20002880
+S315200217D083E98428480000243D20002883E984E404
+S315200217E0480000183C600041606300034BFF2F2134
+S315200217F03860FFFF480000EC380000009001000826
+S315200218009001000C9001001090010014387E000413
+S315200218107FE5FB7838C0000038E000003900000080
+S31520021820392000003F600028809B870C3940000049
+S315200218304BFF8F597C631B794082FFB89061000869
+S315200218409061000C9061001090610014387E002493
+S315200218507FE5FB7838C0000038E000003900000040
+S3152002186039200000809B870C394000004BFF8F1DDA
+S315200218702C8300004086FF7C3BE000007C9FE0003A
+S3152002188040840024387E00247FA4EB7838A000010F
+S31520021890480016E13BFF00017C9FE0007FBDD21489
+S315200218A04184FFE43D20002880099C4C2C800000C6
+S315200218B0933E0044939E0048931E004C418600109E
+S315200218C03D200028808986604800000C3D200028A3
+S315200218D08089865C7FC3F378480015213860000032
+S315200218E08001003C7C0803A6830100188321001C8A
+S315200218F083410020836100248381002883A1002C58
+S3152002190083C1003083E10034382100384E80002024
+S315200219109421FFF87C0802A69001000C3880000072
+S31520021920480000398001000C7C0803A638210008F3
+S315200219304E8000209421FFF87C0802A69001000C1C
+S3152002194038800001480000158001000C7C0803A69F
+S31520021950382100084E8000209421FFE87C0802A648
+S315200219609381000893A1000C93C1001093E1001407
+S315200219709001001C7C7D1B7873A000017C9C23783F
+S31520021980418200144BFF2D153C00005860000007D1
+S31520021990480000203D200028800983042C80000076
+S315200219A04085001C4BFF2CF53C00004360000001E3
+S315200219B0900300003860FFFF480003E03D20002826
+S315200219C080098B542C800000418600F83D6010006F
+S315200219D03D20002880099C00616B00077C00583856
+S315200219E07C8058004086008C3D20002881699AF42C
+S315200219F02C8B0000418600543D200028816B00304C
+S31520021A00812987C87C8B48004186002C2C8B0000BC
+S31520021A1041860010800900247C8B00004186001834
+S31520021A204BFF2C793C00003D600000019003000032
+S31520021A30480000183D20002881299AF48129003087
+S31520021A408009003048000008380000002C80000081
+S31520021A50418600203D2000287C0803A680A99AF40E
+S31520021A603860271680C50060388000024E8000212B
+S31520021A703D6010003D20002880099B60616B0100BB
+S31520021A807C0058387C8058004086003838602716FB
+S31520021A9038800002390000003D60002880AB9AF4AD
+S31520021AA03D600028800B9B50392000007C0803A64D
+S31520021AB03940000080E500607CA62B784E8000210C
+S31520021AC03D20002881299AF4800900603000000117
+S31520021AD0900900603D20002880098B542C8000004C
+S31520021AE0418600783FE010003D20002880099C00B6
+S31520021AF063FF00017C00F8387C80F80040860018DD
+S31520021B003D20002880099BA87C0803A6386000395E
+S31520021B104E8000213D20002880099B607C00F838F9
+S31520021B207C80F80040860034386000393880000016
+S31520021B3038A0000038C000003D600028800B9B5072
+S31520021B4038E000007C0803A6390000003920000096
+S31520021B50394000004E8000213D20002881299AF438
+S31520021B608009005030000001900900503D200028D5
+S31520021B7080098B542C800000418600A03D60100015
+S31520021B803D20002880099C00616B00077C005838A4
+S31520021B907C805800408600382C9D0000418600102B
+S31520021BA0813D00008009003048000008380000000E
+S31520021BB02C800000418600187C0803A63860272561
+S31520021BC0388000017FA5EB784E8000213D60100011
+S31520021BD03D20002880099B60616B01007C005838FB
+S31520021BE07C805800408600343860272538800002E1
+S31520021BF07FA5EB787FA6EB783D600028800B9B5073
+S31520021C0038E000007C0803A63900000039200000D5
+S31520021C10394000004E8000213D200028817D0000B1
+S31520021C208129865C7C8B4800418600382C8B0000FB
+S31520021C3041860010800900247C8B00004186002406
+S31520021C404BFF2A593C00003D600000019003000032
+S31520021C5048005F514800621D3860FFFF4800013C82
+S31520021C607FA3EB78480011A93D20002880098B54D8
+S31520021C702C800000418600843D6010003D20002813
+S31520021C8080099C00616B00037C0058387C805800D8
+S31520021C904086001C3D20002880099B787C0803A6EC
+S31520021CA0386002717FA4EB784E8000213D601000DF
+S31520021CB03D20002880099B60616B00107C0058380B
+S31520021CC07C805800408600343860027138800001DA
+S31520021CD038A000007FA6EB783D600028800B9B5041
+S31520021CE038E000007C0803A63900000039200000F5
+S31520021CF0394000004E80002148005EA9801D004820
+S31520021D003BE000007C9F00003BC000004084005C5A
+S31520021D10387D00247FC4F378480015C57C631B797F
+S31520021D20418200142C83FFFF4186000C3BFF0001F9
+S31520021D304BFFFFE0387D00047FC4F378480015A1ED
+S31520021D407C631B79418200142C83FFFF4186000CA1
+S31520021D503BFF00014BFFFFE0801D00487C9F0000F7
+S31520021D603BC000014184FFAC387D0004480011CD00
+S31520021D70387D0024480011C52C9C000041860014A1
+S31520021D803D2000288069865C7FA4EB7848000FE11D
+S31520021D90480060E1386000008001001C7C0803A630
+S31520021DA08381000883A1000C83C1001083E1001403
+S31520021DB0382100184E8000209421FFE07C0802A6DC
+S31520021DC0934100089361000C9381001093A10014A3
+S31520021DD093C1001893E1001C900100247C7E1B789D
+S31520021DE07C9B237873C000017CBC2B787CDD337806
+S31520021DF07CFA3B78418200543D20002880099AD4FF
+S31520021E002C8000004086001C4BFF28913C00005885
+S31520021E1060000001900300003860FFFF480002C402
+S31520021E207F64DB787F85E3787FA6EB783D200028E8
+S31520021E307C0803A680699B287F47D3787C7E1A1468
+S31520021E404E8000214800029C3D2000288009830400
+S31520021E502C800000418500A03D20002880098B545B
+S31520021E602C800000418600783FE010003D200028AB
+S31520021E7080099C0063FF00017C00F8387C80F80012
+S31520021E80408600183D20002880099BA87C0803A6CE
+S31520021E90386000394E8000213D20002880099B6051
+S31520021EA07C00F8387C80F80040860034386000399F
+S31520021EB03880000038A0000038C000003D600028AD
+S31520021EC0800B9B5038E000007C0803A639000000F6
+S31520021ED039200000394000004E8000213D20002894
+S31520021EE081299AF48009005030000001900900509F
+S31520021EF0480000182C9D0000418600103C600041DD
+S31520021F0060630002480001383D200028817E0000DF
+S31520021F108129865C7C8B4800418600402C8B000000
+S31520021F2041860010800900247C8B00004186002C0B
+S31520021F304BFF27693C00003D600000019003000032
+S31520021F403D200028800983042C8000004185FECC98
+S31520021F5048005C514BFFFEC43D20002880098B546B
+S31520021F602C800000418600B03D6010003D200028F4
+S31520021F7080099C00616B00077C0058387C805800E1
+S31520021F80408600482C9E000041860010813E0000BB
+S31520021F908009003048000008380000002C8000002C
+S31520021FA04186002838602727388000057FC5F378C8
+S31520021FB07F66DB787C0803A67F87E3787FA8EB78A9
+S31520021FC07F49D3784E8000213D6010003D200028B5
+S31520021FD080099B60616B01007C0058387C80580028
+S31520021FE04086003438602727388000027FC5F37880
+S31520021FF07FC6F3783D600028800B9B507F67DB7895
+S315200220007C0803A67F88E3787FA9EB787F4AD3787A
+S315200220104E800021801E004C7C9C0040408500287A
+S315200220203D200028800983042C8000004185000879
+S3152002203048005B713C600041606300014BFF26D182
+S315200220404BFFFDD8387E00247FA4EB7848001291FE
+S315200220507C7F1B782C9FFFFF408600203D20002896
+S3152002206080099C507C0803A67FA3EB784E80002132
+S315200220707C7D1B784BFFFE942C9F00004086002817
+S315200220803D20002881298304801E00502C890000CF
+S3152002209030000001901E00504185FD8048005B05FE
+S315200220A04BFFFD78939F00047F63DB78389F0008FF
+S315200220B07F85E3784BFEF1D5387E00047FE4FB78FA
+S315200220C07F45D37848000EAD3D2000288009830441
+S315200220D02C8000004185000848005AC9386000005B
+S315200220E0800100247C0803A6834100088361000C3A
+S315200220F08381001083A1001483C1001883E1001C90
+S31520022100382100204E8000209421FFE07C0802A680
+S315200221109361000C9381001093A1001493C10018BF
+S3152002212093E1001C900100247C7E1B7873C0000181
+S315200221307C9B23787CBC2B787CDD337841820050D3
+S315200221403D20002880099ACC2C8000004086001C65
+S315200221504BFF25493C000058600000019003000017
+S315200221603860FFFF480002687F64DB787F85E3786A
+S315200221703D2000287C0803A680699B287FA6EB7851
+S315200221807C7E1A144E800021480002442C9C0000BA
+S31520022190408400183C600041606300014BFF2571BA
+S315200221A03860FFFF480002283D20002880098B5412
+S315200221B02C800000418600783FE010003D20002858
+S315200221C080099C0063FF00017C00F8387C80F800BF
+S315200221D0408600183D20002880099BA87C0803A67B
+S315200221E0386000394E8000213D20002880099B60FE
+S315200221F07C00F8387C80F80040860034386000394C
+S315200222003880000038A0000038C000003D60002859
+S31520022210800B9B5038E000007C0803A639000000A2
+S3152002222039200000394000004E8000213D20002840
+S3152002223081299AF48009005030000001900900504B
+S315200222403D200028817E00008129865C7C8B480007
+S315200222504186002C2C8B0000418600108009002428
+S315200222607C8B0000418600184BFF24313C00003D48
+S315200222706000000190030000480001043D20002870
+S3152002228080098B542C800000418600AC3D601000F2
+S315200222903D20002880099C00616B00077C0058388D
+S315200222A07C805800408600442C9E00004186001007
+S315200222B0813E0000800900304800000838000000F6
+S315200222C02C800000418600243860272638800004AE
+S315200222D07FC5F3787C0803A67F66DB787F87E37861
+S315200222E07FA8EB784E8000213D6010003D2000281B
+S315200222F080099B60616B01007C0058387C80580005
+S315200223004086003438602726388000027FC5F3785D
+S315200223107FC6F3783D600028800B9B507F67DB7871
+S315200223207C0803A67F88E3787FA9EB7839400000F2
+S315200223304E800021387E00047FA4EB7848000FA14E
+S315200223407C7F1B782C9FFFFF408600203D200028A3
+S3152002235080099C507C0803A67FA3EB784E8000213F
+S315200223607C7D1B784BFFFEDC2C9F00004086001CE8
+S31520022370801E005430000001901E0054480058254B
+S315200223803860FFFF48000048387F0008813F00047C
+S315200223907F64DB787C1C48107C0001107C0003B82B
+S315200223A07F9D00387D2000787FBD03787FA5EB785E
+S315200223B04BFEEED9387E00247FE4FB7838A000015C
+S315200223C048000BB1480057DD7FA3EB78800100243B
+S315200223D07C0803A68361000C8381001083A100146C
+S315200223E083C1001883E1001C382100204E80002082
+S315200223F09421FFF87C0802A69001000C7C6A1B78C7
+S3152002240071400001418200383D20002880099AD07F
+S315200224102C800000408600104BFF22813C00005891
+S315200224204800004C3D2000287C0803A680699B2892
+S315200224307C6A1A144E800021480000483D2000285C
+S31520022440816A00008129865C7C8B480041860030A7
+S315200224502C8B000041860010800900247C8B000012
+S315200224604186001C4BFF22353C00003D60000001E6
+S31520022470900300003860FFFF48000008806A000CC5
+S315200224808001000C7C0803A6382100084E8000201B
+S315200224909421FFE87C0802A693A1000C93C10010A8
+S315200224A093E100149001001C4BFFF06D7C631B79B5
+S315200224B0408200383D20002890699AD83D20002885
+S315200224C090699ADC3D2000283FA000228069865C24
+S315200224D0389D26204BFFD1813D20002880698660C9
+S315200224E0389D26204BFFD1718001001C7C0803A653
+S315200224F083A1000C83C1001083E100143821001847
+S315200225004E800020816400282C8B00004186001416
+S3152002251081240000380300085529103A7C09592ED7
+S315200225208164002C2C8B000041860014812400003B
+S31520022530800300045529103A7C09592E8004000094
+S3152002254081240024300000017C8048009004000091
+S315200225507C60002654632FFE4E8000209421FFE8E3
+S315200225607C0802A69381000893A1000C93C1001057
+S3152002257093E100149001001C7C7E1B7873C000013D
+S315200225807C9F2378418200483D20002880099ADCDE
+S315200225902C8000004086001C4BFF21013C00005885
+S315200225A060000001900300003860FFFF48000154DC
+S315200225B03D2000287C0803A680699B287FE4FB78BF
+S315200225C07C7E1A144E800021480001384BFFD69596
+S315200225D03D200028817E00008129865C7C8B480074
+S315200225E07C7C1B78418600382C8B000041860010AB
+S315200225F0800900247C8B0000418600244BFF209D0D
+S315200226003C00003D60000001900300007F83E378D8
+S315200226104BFFD6653860FFFF480000E8801E000C9D
+S315200226202C8000004086000C3BBE001448000008A7
+S315200226303BBE0034809F00202C8400004186001C73
+S31520022640813D000C800900307C0803A680BF001C57
+S315200226507FA3EB784E800021801F00282C8000006B
+S3152002266040860010801F002C2C80000041860038F6
+S31520022670801F00242C80000038000000901F0000DC
+S3152002268040850024813E001080090034387E0004F3
+S315200226907C0803A63C800022388424047FE5FB784C
+S315200226A04E800021801E000C7FA3EB78901F000035
+S315200226B08123000C800900307C0803A638800000A4
+S315200226C038A000004E800021907F0004801E004426
+S315200226D0901F0010801E0048901F0014801E004C80
+S315200226E0901F0018801E0050901F0008801E005464
+S315200226F07F83E378901F000C4BFFD57D3860000066
+S315200227008001001C7C0803A68381000883A1000C9B
+S3152002271083C1001083E10014382100184E80002066
+S315200227209421FE707C0802A69361017C938101802C
+S3152002273093A1018493C1018893E1018C90010194B4
+S315200227407C7E1B7873C000017C9C237841820048E2
+S315200227503D20002880099AD82C8000004086001C43
+S315200227604BFF1F393C000058600000019003000017
+S315200227703860FFFF4800042C3D2000287C0803A671
+S3152002278080699B287F84E3787C7E1A144E80002100
+S315200227904800041038610008388000304BFF7579F4
+S315200227A02C9C000040850028380100389001002822
+S315200227B03920001491210024380100D890010030DC
+S315200227C038010128900100349121002C4BFFD49529
+S315200227D07C7B1B787FC3F378388100084BFFFD8111
+S315200227E02C83FFFF408600247F63DB784BFFD4894E
+S315200227F03C600027386344107FC4F3784BFF9DC1A9
+S315200228003860FFFF4800039C8141000C7F89FE70DF
+S315200228107D3C485055290FFE7D40FE707C0A0050B3
+S3152002282054000FFE7C0B483941820084288A00130B
+S315200228303BE00000380000004185000C7C9F5040A0
+S3152002284048000068288000134185006457E0103A4A
+S31520022850392100087FA04A14807D00308003003C85
+S3152002286070000004418200283D2000288129CCA442
+S31520022870800900287C0803A63863001038800001EE
+S315200228804E800021907D008048000008901D008027
+S315200228908121000C288900133BFF00017FE0FB7891
+S315200228A04185FFA47C9F48404184FFA47F63DB7857
+S315200228B04BFFD3C53C600027386344304BFF9D0154
+S315200228C03C600027386344343C80002738844444E3
+S315200228D07FC5F3784BFF9CE980010018700900013F
+S315200228E0408200203C600027386344583C80002701
+S315200228F0388444683CA0002738A544784800001C48
+S315200229003C600027386344583C800027388444685A
+S315200229103CA0002738A544804BFF9CA53FE000271A
+S31520022920387F448C3C80002780A100203884449C38
+S315200229304BFF9C8D387F448C3C80002780A1001C55
+S31520022940388444B04BFF9C79387F448C3C800027E6
+S3152002295080A10008388444C04BFF9C658121000871
+S315200229608001001C7C89000040860018387F448C38
+S3152002297080A1000C3C800027388444D048000014F3
+S31520022980387F448C80A1000C3C800027388444E0A8
+S315200229904BFF9C2D3FA00027387D448C3C8000278E
+S315200229A080A10010388444F44BFF9C15387D448C5A
+S315200229B03C80002780A10014388445044BFF9C01EB
+S315200229C03C600027386344304BFF9BF52C9C00006B
+S315200229D0408501C08001000C2C800000408500C08B
+S315200229E0800100088121001C7C804800408600105E
+S315200229F03D200027388945284800000C3D20002725
+S31520022A00388945303C600027386345184BFF9BB117
+S31520022A103C600027386344304BFF9BA53C6000276F
+S31520022A203863453C4BFF9B993C60002738634560E1
+S31520022A304BFF9B8D8121000C288900133BE000006F
+S31520022A40380000004800004C2880001341850050C1
+S31520022A5057FD103A380100087FBD0214807D0030F0
+S31520022A604BFF94F97C641B783C60002780BD0030C4
+S31520022A7080FD008080C50040386345844BFF9B4122
+S31520022A808121000C288900133BFF00017FE0FB789F
+S31520022A904185FFB87C9F48404184FFB880010008E9
+S31520022AA02C800000408500EC3C6000273863459C62
+S31520022AB04BFF9B0D81210008288900133BE0000073
+S31520022AC038000000480000C028800013418500C459
+S31520022AD03C600027386345CC389F000157E9103AFD
+S31520022AE0380100087D290214836900D083C9012098
+S31520022AF07F65DB787FC6F3784BFF9AC52C9E00153F
+S31520022B003BA000007C00002654002FFE7C0000D053
+S31520022B107C0900F8712900147FC000387C1C4B7890
+S31520022B207C9DE0004084003073A0000340820010A8
+S31520022B303C600027386345DC4BFF9A853C600027C2
+S31520022B40386345E07C9BE8AE3BBD00014BFF9A71A2
+S31520022B504BFFFFD02C9E0014408500103C600027BE
+S31520022B60386345E84BFF9A593C6000273863443066
+S31520022B704BFF9A4D8121000828890013381F000136
+S31520022B807C1F03784185FF447C8048404184FF4472
+S31520022B903C600027386344304BFF9A25386000009A
+S31520022BA0800101947C0803A68361017C83810180D4
+S31520022BB083A1018483C1018883E1018C382101909C
+S31520022BC04E8000209421FFF87C0802A69001000C7A
+S31520022BD03D200028812987C88009001C7D63002E9C
+S31520022BE07C8B480041860018800900247C8B0000DB
+S31520022BF04186000C814300004800000C3D2000283D
+S31520022C00814987C83D200028816A000081298534B0
+S31520022C107C8B48004186002C2C8B000041860010BC
+S31520022C20800900247C8B0000418600184BFF1A6D18
+S31520022C303C00003D6000000190030000480000288F
+S31520022C40800A002C2C800000418600107C0803A6F6
+S31520022C504E800021480000143C60003D6063000560
+S31520022C604BFF1AAD3860FFFF8001000C7C0803A6DB
+S31520022C70382100084E8000209421FFF07C0802A60D
+S31520022C8093C1000893E1000C900100143D20002816
+S31520022C90800983042C8000007C7F1B787C8A237821
+S31520022CA07CBE2B78408500104BFF19F13C00004377
+S31520022CB0480000343D200028817F00008129853488
+S31520022CC07C8B4800418600302C8B00004186001008
+S31520022CD0800900247C8B00004186001C4BFF19BD15
+S31520022CE03C00003D600000019003000038600000B7
+S31520022CF04800003C809F0008807F00047C84521498
+S31520022D004BFFE14D7C631B7941820024801F000C1E
+S31520022D102C9E000030000001901F000C41860010FE
+S31520022D20801F00087C030214901E000080010014FC
+S31520022D307C0803A683C1000883E1000C3821001019
+S31520022D404E8000209421FFF87C0802A69001000CF8
+S31520022D503880000038A000004BFFFF218001000CC4
+S31520022D607C0803A6382100084E8000209421FFF01B
+S31520022D707C0802A693E1000C900100147C7F1B784C
+S31520022D803D200028817F0000812985347C8B4800E4
+S31520022D904186002C2C8B00004186001080090024DD
+S31520022DA07C8B0000418600184BFF18F13C00003D49
+S31520022DB0600000019003000048000014807F000498
+S31520022DC04BFFE1052C8300004186000C3860FFFF93
+S31520022DD048000014801F00103860000030000001F7
+S31520022DE0901F0010800100147C0803A683E1000CCA
+S31520022DF0382100104E8000209083000080040014A9
+S31520022E0030000001900400144E800020812300002F
+S31520022E1080090018300000019009001838000000CF
+S31520022E20900300004E8000209421FFF07C0802A629
+S31520022E3093C1000893E1000C900100147C7E1B785C
+S31520022E40386000204BFFE64D7C7F1B7941820028AB
+S31520022E507FE3FB787FC4F378480000392C83000097
+S31520022E604086000C7FE3FB78480000107FE3FB7866
+S31520022E704BFFE64D38600000800100147C0803A653
+S31520022E8083C1000883E1000C382100104E80002007
+S31520022E909421FFE87C0802A69001001C380000005D
+S31520022EA0900300009003000490030008900100089C
+S31520022EB09001000C9001001090010014386300105C
+S31520022EC038A0000038C0000038E0000039000000B9
+S31520022ED039200000394000004BFF78B138600000ED
+S31520022EE08001001C7C0803A6382100184E80002091
+S31520022EF09421FFE87C0802A693A1000C93C100103E
+S31520022F0093E100149001001C7C7D1B784800002D63
+S31520022F107FA3EB784BFFE5A9386000008001001CF7
+S31520022F207C0803A683A1000C83C1001083E1001450
+S31520022F30382100184E8000209421FFF87C0802A632
+S31520022F409001000C3D2000283800000190099B20AA
+S31520022F5038630010480094A14800B1D938600000B7
+S31520022F608001000C7C0803A6382100084E80002030
+S31520022F709421FFF07C0802A693C1000893E1000C7D
+S31520022F80900100147CA52B797C7E1B787C9F23786C
+S31520022F904082003490BF00004BFFCCC9801E000047
+S31520022FA02C8000004086001093FE000093FE000451
+S31520022FB048000030813E000493E9000093FE00049D
+S31520022FC0480000204BFFCC9D801E00002C80000074
+S31520022FD0901F00004086000893FE000493FE000026
+S31520022FE03D600028800B9B20813E00082C8000013A
+S31520022FF039290001913E00084086001C4BFFCC79FE
+S315200230003C6000223863307C7FC4F37848009629DE
+S3152002301048000154801E00102C8000004086000CBF
+S315200230204BFFCC554800014038000001900B9B20F5
+S315200230304BFFCC453D200028817EFFFC8129865C02
+S315200230407C8B480041860010800900247C8B00007E
+S31520023050408600783D20002880098B542C80000071
+S31520023060418600F83D6010003D20002880099C0022
+S31520023070616B00037C0058387C8058004086001C17
+S315200230803D20002880099B787C0803A63860026FC1
+S31520023090389EFFFC4E8000213D6010003D20002816
+S315200230A080099B60616B00107C0058387C80580038
+S315200230B0408600A83860026F3880000138A00000E0
+S315200230C038DEFFFC480000743D20002880098B541E
+S315200230D02C800000418600843D6010003D2000289F
+S315200230E080099C00616B00037C0058387C80580064
+S315200230F04086001C3D20002880099B787C0803A678
+S3152002310038600270389EFFDC4E8000213D60100040
+S315200231103D20002880099B60616B00107C00583896
+S315200231207C80580040860034386002703880000166
+S3152002313038A0000038DEFFDC3D600028800B9B5063
+S3152002314038E000007C0803A6390000003920000080
+S31520023150394000004E800021387E001048008C49FC
+S315200231604800AFD1800100147C0803A683C1000861
+S3152002317083E1000C382100104E8000209421FFF0BC
+S315200231807C0802A693E1000C900100147C7F1B7838
+S31520023190801F00102C800000418601303D2000282F
+S315200231A0817FFFFC8129865C7C8B4800418600104A
+S315200231B0800900247C8B0000408600783D20002870
+S315200231C080098B542C800000418600F83D60100057
+S315200231D03D20002880099C00616B00037C00583842
+S315200231E07C8058004086001C3D20002880099B7860
+S315200231F07C0803A63860026F389FFFFC4E800021B0
+S315200232003D6010003D20002880099B60616B001004
+S315200232107C0058387C805800408600A83860026FAF
+S315200232203880000138A0000038DFFFFC4800007417
+S315200232303D20002880098B542C8000004186008482
+S315200232403D6010003D20002880099C00616B000330
+S315200232507C0058387C8058004086001C3D2000287F
+S3152002326080099B787C0803A638600270389FFFDCB1
+S315200232704E8000213D6010003D20002880099B6081
+S31520023280616B00107C0058387C80580040860034E0
+S31520023290386002703880000138A0000038DFFFDC79
+S315200232A03D600028800B9B5038E000007C0803A676
+S315200232B03900000039200000394000004E800021EC
+S315200232C0387F001048008AE1800100147C0803A69A
+S315200232D083E1000C382100104E8000209421FFD07B
+S315200232E07C0802A692E1000C93010010932100149F
+S315200232F0934100189361001C9381002093A100241E
+S3152002330093C1002893E1002C900100347C7E1B7827
+S315200233107C9B23784BFFC94D83FE00002C9F000027
+S31520023320408601903EE000283F0000283F801000A2
+S31520023330639C00033F2000283FA0100063BD0010BD
+S315200233403F4000282C9B00004086001C4BFFC929C9
+S315200233503C60003D606300024BFF13B538600000FD
+S315200233604800016C3D2000283800000190099B206E
+S315200233704BFFC9053D200028801EFFFC8129865C63
+S315200233807C80480041860010816900247C80580098
+S315200233904086005C80178B542C800000418600D426
+S315200233A080189C007C00E0387C80E0004086001873
+S315200233B080199B787C0803A638600270389EFFFC31
+S315200233C04E8000213D20002880099B607C00E83841
+S315200233D07C80E8004086009C3860027038800001BC
+S315200233E038A0000038DEFFFC4800006C801EFFDC9F
+S315200233F07C8048004186000C7C8058004086007400
+S3152002340080178B542C8000004186006880189C000F
+S315200234107C00E0387C80E0004086001880199B788A
+S315200234207C0803A63860026F389EFFDC4E8000219E
+S315200234303D20002880099B607C00E8387C80E800DB
+S31520023440408600303860026F3880000138A00000C4
+S3152002345038DEFFDC801A9B5038E000007C0803A689
+S315200234603900000039200000394000004E8000213A
+S31520023470387E00107F64DB7848008D694800ACB541
+S315200234802C8300014086000C3860FFFF4800004074
+S315200234902C8300004186000C386000004800003072
+S315200234A04BFFC7C183FE00002C9F00004186FE9879
+S315200234B0801F0000813E0008901E00003929FFFF70
+S315200234C0913E00084BFFC7B17FE3FB7880010034B1
+S315200234D07C0803A682E1000C8301001083210014DC
+S315200234E0834100188361001C8381002083A100246C
+S315200234F083C1002883E1002C382100304E80002031
+S315200235009421FFE87C0802A693A1000C93C1001027
+S3152002351093E100149001001C7C9D23797C7F1B780B
+S315200235207CBE2B784082000C807F00084800004039
+S315200235304BFFC731813F00002C8900007FBFEB780B
+S315200235404186002037DEFFFF41800018913F0000B0
+S31520023550812900002C8900003BFF00044086FFE8F9
+S315200235604BFFC7157C7DF8507C6316708001001CCA
+S315200235707C0803A683A1000C83C1001083E10014FA
+S31520023580382100184E8000209421FFE87C0802A6EC
+S315200235909381000893A1000C93C1001093E10014BB
+S315200235A09001001C7C7D1B787C9F23787CBE2B7827
+S315200235B04BFFC6B183BD00002C9D00007C7C1B788E
+S315200235C0418600287FE803A67FA3EB787FC4F378A1
+S315200235D04E8000212C8300004186001083BD00000E
+S315200235E02C9D00004086FFE07F83E3784BFFC6894F
+S315200235F07FA3EB788001001C7C0803A68381000848
+S3152002360083A1000C83C1001083E100143821001825
+S315200236104E800020386000004E8000209421FFE07A
+S315200236207C0802A69361000C9381001093A10014DA
+S3152002363093C1001893E1001C900100243D2000282C
+S3152002364083A99AF4480091613D20002880098B5471
+S315200236502C8000003D2000283800000190099B2C78
+S31520023660418600883D2000288009CCB82C800000A5
+S31520023670408600AC3FE010003D20002880099C00D7
+S3152002368063FF00017C00F8387C80F8004086001831
+S315200236903D20002880099BA87C0803A638600038B4
+S315200236A04E8000213D20002880099B607C00F8384E
+S315200236B07C80F8004086003438600038388000006C
+S315200236C038A0000038C000003D600028800B9B50C7
+S315200236D038E000007C0803A63900000039200000EB
+S315200236E0394000004E8000213D2000288009CCB8B8
+S315200236F02C800000408600283FC000283FE000289A
+S31520023700480090A5807E96684BFFC56D4BFF8B01C6
+S31520023710801FCCB82C8000004186FFE83D2000287F
+S315200237208169CCB83D200028380000007C8BE80057
+S3152002373090099B2C3D20002891699AF4418600909D
+S31520023740A00B0058A13D005A7C1F4B782C9F0000ED
+S315200237504186003C3D2000283B69CD743F800028ED
+S315200237603BC0000073E08000418200187C1ED82EE8
+S315200237707C0803A6809C9AF47FA3EB784E800021D6
+S3152002378057FF0C3D3BDE00044082FFDC3BC00000BD
+S315200237903D2000283B69CD303F8000283BE00000D9
+S315200237A07C1FD82E2C800000418600247C0803A68C
+S315200237B07FA3EB78809C9AF43BDE00014E800021A9
+S315200237C02C9E000F3BFF00044085FFD84BFFC4957B
+S315200237D03D20002880099B342C8000004086000C66
+S315200237E04BFFC4954BFFFE583D20002880098B5481
+S315200237F02C800000418600DC3FC00028809E9AF47F
+S315200238008004004480A400407C80284040850050EB
+S315200238103FE010003D20002880099C0063FF000144
+S315200238207C00F8387C80F800408600183D2000286D
+S3152002383080099B5C7C0803A6386000364E800021F6
+S315200238403D20002880099B607C00F8387C80F800A7
+S3152002385040860080386000364800004C3FE0100069
+S315200238603D20002880099C0063FF00017C00F83877
+S315200238707C80F800408600183D20002880099B5C49
+S315200238807C0803A6386000344E8000213D200028A3
+S3152002389080099B607C00F8387C80F80040860034E2
+S315200238A0386000343880000038A00000390000005B
+S315200238B03D600028800B9B5080DE9AF47C0803A68C
+S315200238C03920000080E60040394000004E80002169
+S315200238D03D2000283800000090099B204800A9DDE1
+S315200238E0800100247C0803A68361000C83810010DA
+S315200238F083A1001483C1001883E1001C3821002013
+S315200239004E8000209421FFF07C0802A693E1000C51
+S31520023910900100143FE00028801F87102C800000B1
+S31520023920408600683D6000283D20002239293B540C
+S31520023930912B87203D6000283D20002239293CA476
+S31520023940912B87403D6000283D200022392950B026
+S31520023950912B87603D6000283D20002239293E6C4C
+S31520023960912B87803D6000283D200022392951FC79
+S31520023970912B87A048000DD12C8300004086000C95
+S3152002398038000001901F87103D200028806987108B
+S315200239903063FFFF7C631910800100147C0803A6A4
+S315200239A083E1000C382100104E8000209421FFE094
+S315200239B07C0802A69381001093A1001493C10018DB
+S315200239C093E1001C900100243D20002880098710E5
+S315200239D02C8000007C7E1B787C9D237840860018F4
+S315200239E04BFFFF252C8300004186000C3860000027
+S315200239F04800010C3F800028807C87184BFFF34942
+S31520023A007C7F1B79418200307FE3FB787FC4F37889
+S31520023A107FA5EB78480001092C8300004186001817
+S31520023A20807C87187FE4FB784BFFF34538600000E3
+S31520023A30480000CC3D20002880098B542C800000B1
+S31520023A40418600B83D6010003D20002880099C0078
+S31520023A50616B00077C0058387C80580040860048FD
+S31520023A602C9F000041860010813F000081290030F2
+S31520023A7048000008392000002C89000041860028D1
+S31520023A8038602718388000037FE5FB787FC6F378F5
+S31520023A907D2803A6801F001838E10008900100083F
+S31520023AA04E8000213D6010003D20002880099B6049
+S31520023AB0616B01007C0058387C8058004086003CAF
+S31520023AC038602718388000027FE5FB787FE6FB788E
+S31520023AD0801F00183D60002890010008800B9B5033
+S31520023AE07FC7F3787C0803A6390100083920000035
+S31520023AF0394000004E8000217FE3FB7880010024BC
+S31520023B007C0803A68381001083A1001483C10018B8
+S31520023B1083E1001C382100204E8000209421FFE8FA
+S31520023B207C0802A693A1000C93C1001093E1001415
+S31520023B309001001C3D200028800987102C8000005F
+S31520023B407C7F1B787C9E23787CBD2B784086001058
+S31520023B504BFFFDB52C8300004086002C7FE3FB78CB
+S31520023B607FC4F378480015892C830000408600180C
+S31520023B707FE3FB787FC4F3787FA5EB7848000029A2
+S31520023B80480000083860FFFF8001001C7C0803A65D
+S31520023B9083A1000C83C1001083E100143821001890
+S31520023BA04E8000209421FFF87C0802A69001000C8A
+S31520023BB07080000C418200144BFF0AE13C00001683
+S31520023BC060000066480000342C8500004186001003
+S31520023BD02C85000141860010480000143D20002853
+S31520023BE080099AF4900300184800001C4BFF0AAD86
+S31520023BF03C00001660000065900300003860FFFF5D
+S31520023C004800004498830005380000009803000409
+S31520023C103D20002880099C4C2C80000038000000A2
+S31520023C20B0030006418600103D2000288089871CAB
+S31520023C304800000C3D200028808987184BFFF1BDE3
+S31520023C40386000008001000C7C0803A63821000899
+S31520023C504E8000209421FFF07C0802A693C1000822
+S31520023C6093E1000C900100147C7F1B784BFFBFF57B
+S31520023C703D200028817F0000812987187C8B4800FF
+S31520023C807C7E1B78418600382C8B000041860010F2
+S31520023C90800900247C8B0000418600244BFF09FD0D
+S31520023CA03C00003D60000001900300007FC3F378D2
+S31520023CB04BFFBFC53860FFFF480000D4801F0008B5
+S31520023CC02C800000901F0018408600107FC3F378D6
+S31520023CD04BFFBFA5480000B43D2000283800000154
+S31520023CE090099B207FC3F3784BFFBF8D3D20002890
+S31520023CF080098B542C800000418600843D60100090
+S31520023D003D20002880099C00616B00037C00583806
+S31520023D107C8058004086001C3D20002880099B7824
+S31520023D207C0803A63860026C7FE4FB784E80002173
+S31520023D303D6010003D20002880099B60616B0010C9
+S31520023D407C0058387C805800408600343860026CEB
+S31520023D50388000013D20002880099B5038A00000B1
+S31520023D607FE6FB7838E000007C0803A639000000D5
+S31520023D7039200000394000004E800021387F00089B
+S31520023D80480080254800A3AD386000008001001459
+S31520023D907C0803A683C1000883E1000C38210010A9
+S31520023DA04E8000209421FFE87C0802A693A1000CF5
+S31520023DB093C1001093E100149001001C3D200028BD
+S31520023DC0800983042C8000007C7E1B787C9D2378CE
+S31520023DD04085001C4BFF08C53C00004360000001E3
+S31520023DE0900300003860FFFF480001684BFFBE7554
+S31520023DF03D200028817E0000812987187C8B48007F
+S31520023E007C7F1B78418600382C8B0000418600106F
+S31520023E10800900247C8B0000418600244BFF087D0C
+S31520023E203C00003D60000001900300007FE3FB7828
+S31520023E304BFFBE453860FFFF48000118801E001860
+S31520023E402C800000408600203D20002880099AF41C
+S31520023E507FE3FB78901E00184BFFBE1D38600000E2
+S31520023E60480000F03D2000283800000190099B20E0
+S31520023E707FE3FB784BFFBE013D20002880098B544F
+S31520023E802C800000418600843D6010003D200028E1
+S31520023E9080099C00616B00037C0058387C805800A6
+S31520023EA04086001C3D20002880099B787C0803A6BA
+S31520023EB03860026D7FC4F3784E8000213D60100089
+S31520023EC03D20002880099B60616B00107C005838D9
+S31520023ED07C805800408600343860026D38800001AC
+S31520023EE03D20002880099B5038A000007FC6F37829
+S31520023EF038E000007C0803A63900000039200000C3
+S31520023F00394000004E800021387E00087FA4EB78DD
+S31520023F10480082D12C830000418600104800A21559
+S31520023F203860FFFF4800002C4800A2092C830001BC
+S31520023F30408600203D20002880099C507C0803A64C
+S31520023F407FA3EB784E8000217C7D1B784BFFFEA061
+S31520023F508001001C7C0803A683A1000C83C10010EB
+S31520023F6083E10014382100184E8000209421FFF0AE
+S31520023F707C0802A693E1000C900100147C7F1B783A
+S31520023F80801F00082C800000901F00184186009C8C
+S31520023F903D20002880098B542C8000004186008415
+S31520023FA03D6010003D20002880099C00616B0003C3
+S31520023FB07C0058387C8058004086001C3D20002812
+S31520023FC080099B787C0803A63860026C7FE4FB7824
+S31520023FD04E8000213D6010003D20002880099B6014
+S31520023FE0616B00107C0058387C8058004086003473
+S31520023FF03860026C388000013D20002880099B50E1
+S3152002400038A000007FE6FB7838E000007C0803A693
+S315200240103900000039200000394000004E8000217E
+S31520024020387F000848007D81800100147C0803A6A1
+S3152002403083E1000C382100104E8000209421FFF0ED
+S315200240407C0802A693E1000C900100143FE00028B0
+S31520024050801F87142C800000408600683D6000285F
+S315200240603D2000223929424C912B87283D60002889
+S315200240703D200022392943A4912B87483D60002800
+S315200240803D200022392950B0912B87683D600028B7
+S315200240903D20002239294568912B87883D600028DA
+S315200240A03D200022392951FC912B87A848000699E8
+S315200240B02C8300004086000C38000001901F8714D4
+S315200240C03D200028806987143063FFFF7C63191026
+S315200240D0800100147C0803A683E1000C382100101D
+S315200240E04E8000209421FFE87C0802A693810008D6
+S315200240F093A1000C93C1001093E100149001001CBF
+S315200241003D200028800987142C8000007C7E1B78A5
+S315200241107C9D2378408600184BFFFF252C830000C8
+S315200241204186000C38600000480000FC3F800028D1
+S31520024130807C87184BFFEC117C7F1B7941820030F3
+S315200241407FE3FB787FC4F3787FA5EB78480000F9FC
+S315200241502C83000041860018807C87187FE4FB7838
+S315200241604BFFEC0D38600000480000BC3D200028C3
+S3152002417080098B542C800000418600A83D601000E7
+S315200241803D20002880099C00616B00077C0058387E
+S315200241907C805800408600402C9F000041860010FB
+S315200241A0813F0000800900304800000838000000E6
+S315200241B02C800000418600203860271938800003B1
+S315200241C07C0803A67FE5FB787FC6F3787FA7EB788A
+S315200241D04E8000213D6010003D20002880099B6012
+S315200241E0616B01007C0058387C8058004086003480
+S315200241F038602719388000027FE5FB787FE6FB7856
+S315200242003D20002880099B507FC7F3787C0803A6AF
+S315200242107FA8EB7839200000394000004E8000212B
+S315200242207FE3FB788001001C7C0803A683810008BB
+S3152002423083A1000C83C1001083E1001438210018E9
+S315200242404E8000209421FFE87C0802A693A1000C50
+S3152002425093C1001093E100149001001C3D20002818
+S31520024260800987142C8000007C7F1B787C9E237813
+S315200242707CBD2B78408600104BFFFDC52C830000A9
+S315200242804086002C7FE3FB787FC4F37848000E61DA
+S315200242902C830000408600187FE3FB787FC4F378E6
+S315200242A07FA5EB7848000029480000083860FFFF08
+S315200242B08001001C7C0803A683A1000C83C1001088
+S315200242C083E10014382100184E8000209421FFF843
+S315200242D07C0802A69001000C7080000C4182001C12
+S315200242E04BFF03B93C0000166000006690030000F5
+S315200242F03860FFFF48000048988300053800000216
+S31520024300980300043D20002880099C4C2C80000044
+S3152002431090A3001838000000B00300064186001062
+S315200243203D2000288089871C4800000C3D2000285B
+S31520024330808987184BFFEAC5386000008001000C8F
+S315200243407C0803A6382100084E8000209421FFF025
+S315200243507C0802A693C1000893E1000C9001001488
+S315200243607C7F1B784BFFB8FD3D200028817F000013
+S31520024370812987187C8B48007C7E1B7841860038F1
+S315200243802C8B000041860010800900247C8B0000C3
+S31520024390418600244BFF03053C00003D60000001DE
+S315200243A0900300007FC3F3784BFFB8CD3860FFFF40
+S315200243B0480000DC801F00082C8000004086001C7C
+S315200243C0801F00187FC3F37830000001901F001869
+S315200243D04BFFB8A5480000B43D2000283800000154
+S315200243E090099B207FC3F3784BFFB88D3D20002890
+S315200243F080098B542C800000418600843D60100089
+S315200244003D20002880099C00616B00037C005838FF
+S315200244107C8058004086001C3D20002880099B781D
+S315200244207C0803A63860026C7FE4FB784E8000216C
+S315200244303D6010003D20002880099B60616B0010C2
+S315200244407C0058387C805800408600343860026CE4
+S31520024450388000013D20002880099B5038A00000AA
+S315200244607FE6FB7838E000007C0803A639000000CE
+S3152002447039200000394000004E800021387F000894
+S315200244804800792548009CAD386000008001001460
+S315200244907C0803A683C1000883E1000C38210010A2
+S315200244A04E8000209421FFE87C0802A693A1000CEE
+S315200244B093C1001093E100149001001C3D200028B6
+S315200244C0800983042C8000007C7E1B787C9D2378C7
+S315200244D04085001C4BFF01C53C00004360000001E3
+S315200244E0900300003860FFFF480001644BFFB77558
+S315200244F03D200028817E0000812987187C8B480078
+S315200245007C7F1B78418600382C8B00004186001068
+S31520024510800900247C8B0000418600244BFF017D0C
+S315200245203C00003D60000001900300007FE3FB7821
+S315200245304BFFB7453860FFFF48000114801E001864
+S315200245402C8000004186001C3000FFFF901E0018C0
+S315200245507FE3FB784BFFB72138600000480000F06C
+S315200245603D2000283800000190099B207FE3FB783C
+S315200245704BFFB7053D20002880098B542C80000074
+S31520024580418600843D6010003D20002880099C0061
+S31520024590616B00037C0058387C8058004086001CE2
+S315200245A03D20002880099B787C0803A63860026D8E
+S315200245B07FC4F3784E8000213D6010003D20002804
+S315200245C080099B60616B00107C0058387C80580003
+S315200245D0408600343860026D388000013D20002874
+S315200245E080099B5038A000007FC6F37838E000008F
+S315200245F07C0803A63900000039200000394000005B
+S315200246004E800021387E00087FA4EB7848007BD5B7
+S315200246102C8300004186001048009B193860FFFF5A
+S315200246204800002C48009B0D2C8300014086002068
+S315200246303D20002880099C507C0803A67FA3EB78A6
+S315200246404E8000217C7D1B784BFFFEA48001001C3E
+S315200246507C0803A683A1000C83C1001083E1001409
+S31520024660382100184E8000209421FFF07C0802A6F3
+S3152002467093E1000C900100147C7F1B78801F0008B8
+S315200246802C80000040860014801F00183000000194
+S31520024690901F00184800009C3D20002880098B545A
+S315200246A02C800000418600843D6010003D200028B9
+S315200246B080099C00616B00037C0058387C8058007E
+S315200246C04086001C3D20002880099B787C0803A692
+S315200246D03860026C7FE4FB784E8000213D6010003A
+S315200246E03D20002880099B60616B00107C005838B1
+S315200246F07C805800408600343860026C3880000185
+S315200247003D20002880099B5038A000007FE6FB78D8
+S3152002471038E000007C0803A639000000392000009A
+S31520024720394000004E800021387F00084800767903
+S31520024730800100147C0803A683E1000C38210010B6
+S315200247404E8000209421FFF07C0802A693C1000827
+S3152002475093E1000C900100143FC00028801E87C000
+S315200247602C8000004086004C3FE00028807F87187E
+S315200247703880001C38A0000038C0000038E0000055
+S315200247803D00002239084B284BFFAE352C83000012
+S31520024790408600203D200028807F87188089871C3C
+S315200247A0908300244BFFB02538000001901E87C05D
+S315200247B03D200028806987C03063FFFF7C63191083
+S315200247C0800100147C0803A683C1000883E1000C43
+S315200247D0382100104E8000209421FFE87C0802A692
+S315200247E093E100149001001C7C7F1B7873E000018A
+S315200247F0418200303D20002880699B283D200028E8
+S315200248007C7F1A148003000439298720540016FA63
+S315200248107C09002E7C0803A64E8000214800010454
+S315200248203D20002880098B542C800000418600B848
+S315200248303D6010003D20002880099C00616B000726
+S315200248407C0058387C805800408600482C9F000007
+S3152002485041860010813F000081290030480000086F
+S31520024860392000002C890000418600283860271C48
+S31520024870388000037FE5FB78801F00187D2803A679
+S3152002488090010008A0FF000638C100084E800021D2
+S315200248903D6010003D20002880099B60616B01006D
+S315200248A07C0058387C8058004086003C3860271CA3
+S315200248B0388000027FE5FB787FE6FB78801F0018B0
+S315200248C03D60002890010008800B9B5038E10008CB
+S315200248D07C0803A639200000A11F000639400000EB
+S315200248E04E8000213D20002880099B202C8000003C
+S315200248F0408600283D200028881F00043929872069
+S31520024900540016FA7C09002E7C0803A67FE3FB7866
+S315200249104E8000214800000C7FE3FB784800060108
+S315200249208001001C7C0803A683E1001438210018AC
+S315200249304E8000209421FFE87C0802A693C1001035
+S3152002494093E100149001001C7C7F1B7873E0000128
+S315200249507C9E23784182002C3D20002880699B285A
+S315200249603D2000287C7F1A148003000439298740C1
+S31520024970540016FA7C09002E7C0803A6480000E89B
+S315200249803D20002880098B542C800000418600B8E7
+S315200249903D6010003D20002880099C00616B0007C5
+S315200249A07C0058387C805800408600482C9F0000A6
+S315200249B041860010813F000081290030480000080E
+S315200249C0392000002C890000418600283860271FE4
+S315200249D0388000037FE5FB78801F00187D2803A618
+S315200249E090010008A0FF000638C100084E80002171
+S315200249F03D6010003D20002880099B60616B01000C
+S31520024A007C0058387C8058004086003C3860271F3E
+S31520024A10388000027FE5FB787FE6FB78801F00184E
+S31520024A203D60002890010008800B9B5038E1000869
+S31520024A307C0803A639200000A11F00063940000089
+S31520024A404E8000217FE3FB783D2000288803000466
+S31520024A5039298740540016FA7C09002E7C0803A6C1
+S31520024A607FC4F3784E8000218001001C7C0803A6B7
+S31520024A7083C1001083E10014382100184E800020E3
+S31520024A809421FFE87C0802A693E100149001001C01
+S31520024A907C7F1B7873E00001418200303D20002894
+S31520024AA080699B283D2000287C7F1A1480030004FD
+S31520024AB039298760540016FA7C09002E7C0803A641
+S31520024AC04E800021480001083D20002880098B5491
+S31520024AD02C800000418600BC3D6010003D2000284D
+S31520024AE080099C00616B00077C0058387C80580046
+S31520024AF04086004C2C9F000041860010813F00001A
+S31520024B008129003048000008392000002C89000045
+S31520024B104186002C3860271B388000047FE5FB780D
+S31520024B2038C10008801F00187D2803A690010008BE
+S31520024B30A0FF0006391F00084E8000213D601000AC
+S31520024B403D20002880099B60616B01007C0058385B
+S31520024B507C8058004086003C3860271B3880000243
+S31520024B607FE5FB787FE6FB78801F00183D600028F2
+S31520024B7090010008800B9B5038E100087C0803A6B0
+S31520024B80393F0008A11F0006394000004E8000214F
+S31520024B903D20002880099B202C800000408600288A
+S31520024BA03D200028881F000439298760540016FA00
+S31520024BB07C09002E7C0803A67FE3FB784E80002129
+S31520024BC04800000C7FE3FB78480003E58001001CC7
+S31520024BD07C0803A683E10014382100184E800020A9
+S31520024BE09421FFF87C0802A69001000C388000016F
+S31520024BF0480000398001000C7C0803A638210008F1
+S31520024C004E8000209421FFF87C0802A69001000C19
+S31520024C1038800000480000158001000C7C0803A69D
+S31520024C20382100084E8000209421FFE07C0802A64D
+S31520024C3093A1001493C1001893E1001C9001002453
+S31520024C403D200028800983042C8000007C7F1B786D
+S31520024C507C9D2378408500144BFEFA413C0000439C
+S31520024C60600000014800001873E000014182001C28
+S31520024C704BFEFA293C000058600000079003000012
+S31520024C803860FFFF4800027C3D20002880098B54B3
+S31520024C902C800000418600BC3D6010003D2000288B
+S31520024CA080099C00616B00077C0058387C80580084
+S31520024CB04086004C2C9F000041860010813F000058
+S31520024CC08129003048000008392000002C89000084
+S31520024CD04186002C3860271A388000047FE5FB784D
+S31520024CE038C10008801F00187D2803A690010008FD
+S31520024CF0A0FF0006391F00084E8000213D601000EB
+S31520024D003D20002880099B60616B01007C00583899
+S31520024D107C8058004086003C3860271A3880000282
+S31520024D207FE5FB787FE6FB78801F00183D60002830
+S31520024D3090010008800B9B5038E100087C0803A6EE
+S31520024D40393F0008A11F0006394000004E8000218D
+S31520024D504BFFAF113D200028817F00008129871853
+S31520024D607C8B48007C7E1B78418600382C8B000089
+S31520024D7041860010800900247C8B00004186002495
+S31520024D804BFEF9193C00003D600000019003000033
+S31520024D907FC3F3784BFFAEE13860FFFF4800016422
+S31520024DA07FE3FB784BFFE0693D20002838000001B5
+S31520024DB090099B207FC3F3784BFFAEBD7FE3FB7840
+S31520024DC0480064E53D20002880098B542C80000091
+S31520024DD0418600F83D6010003D20002880099C0095
+S31520024DE0616B00077C0058387C8058004086008C16
+S31520024DF03D20002881699AF42C8B000041860054BC
+S31520024E003D200028816B0030812987C87C8B480091
+S31520024E104186002C2C8B000041860010800900243C
+S31520024E207C8B0000418600184BFEF8713C00003D49
+S31520024E306000000190030000480000183D20002871
+S31520024E4081299AF48129003080090030480000081F
+S31520024E50380000002C800000418600203D200028DA
+S31520024E607C0803A680A99AF43860271680C50060BC
+S31520024E70388000024E8000213D6010003D2000282F
+S31520024E8080099B60616B01007C0058387C80580049
+S31520024E904086003838602716388000023900000024
+S31520024EA03D60002880AB9AF43D600028800B9B5021
+S31520024EB0392000007C0803A63940000080E5006006
+S31520024EC07CA62B784E8000213D20002881299AF449
+S31520024ED08009006030000001900900604800925568
+S31520024EE02C9D0000418600143D20002880698718E9
+S31520024EF07FE4FB784BFFDE7948002F79386000008B
+S31520024F00800100247C0803A683A1001483C1001813
+S31520024F1083E1001C382100204E8000209421FFF8D6
+S31520024F207C0802A69001000C7C641B783D20002898
+S31520024F3081640000812987187C8B480041860024E1
+S31520024F402C8B000041860010800900247C8B0000F7
+S31520024F50418600104BFEF7453C00003D48000034D8
+S31520024F603D20002888040004392987805400103AFD
+S31520024F707C69002E2C83000041860010480076B9F9
+S31520024F8038600000480000184BFEF7113C00004331
+S31520024F9060000001900300003860FFFF8001000CD2
+S31520024FA07C0803A6382100084E8000209421FFF8B1
+S31520024FB07C0802A69001000C7C641B783D20002808
+S31520024FC081640000812987187C8B48004186002451
+S31520024FD02C8B000041860010800900247C8B000067
+S31520024FE0418600104BFEF6B53C00003D48000034D9
+S31520024FF03D20002888040004392987A05400103A4D
+S315200250007C69002E2C8300004186001048007629F8
+S3152002501038600000480000184BFEF6813C00004331
+S3152002502060000001900300003860FFFF8001000C41
+S315200250307C0803A6382100084E8000209421FFF820
+S315200250407C0802A69001000C3D2000288063000007
+S31520025050812987187C834800418600282C830000FA
+S3152002506041860010800900247C83000041860014BA
+S315200250704BFEF6293C00003D60000001480000106E
+S315200250804BFEF6193C0000166000006890030000F3
+S315200250903860FFFF8001000C7C0803A63821000837
+S315200250A04E8000209421FFF87C0802A69001000C75
+S315200250B03D200028800983042C8000004085001CA6
+S315200250C04BFEF5D93C00004360000001900300002E
+S315200250D03860FFFF48000008386000008001000C9D
+S315200250E07C0803A6382100084E8000209421FFE088
+S315200250F07C0802A693E1001C900100247084000320
+S315200251003BE00000418200102C8400014186003CD5
+S315200251104800007493E1000893E1000C93E100102B
+S3152002512093E100143863000838A0000038C000005C
+S3152002513038E0000039000000392000003D600028D8
+S31520025140808B84284800003493E1000893E1000C08
+S3152002515093E1001093E100143863000838A00000A0
+S3152002516038C0000038E00000390000003920000075
+S315200251703D600028808B84E4394000004BFF560DA9
+S31520025180480000184BFEF5153C000016600000672B
+S31520025190900300003BE0FFFF7FE3FB7880010024C1
+S315200251A07C0803A683E1001C382100204E800020C3
+S315200251B09421FFF07C0802A693C1000893E1000C1B
+S315200251C0900100147C7F1B784BFFAA993D20002872
+S315200251D0817F0000812987187C8B48007C7E1B7882
+S315200251E0418600382C8B000041860010800900245D
+S315200251F07C8B0000418600244BFEF4A13C00003D3E
+S3152002520060000001900300007FC3F3784BFFAA6978
+S315200252103860FFFF480000D0801F00082C80000065
+S31520025220408600107FC3F3784BFFAA4D480000B496
+S315200252303D2000283800000190099B207FC3F37887
+S315200252404BFFAA353D20002880098B542C80000074
+S31520025250418600843D6010003D20002880099C0084
+S31520025260616B00037C0058387C8058004086001C05
+S315200252703D20002880099B787C0803A63860026EB0
+S315200252807FE4FB784E8000213D6010003D200028FF
+S3152002529080099B60616B00107C0058387C80580026
+S315200252A0408600343860026E388000013D20002896
+S315200252B080099B5038A000007FE6FB7838E000008A
+S315200252C07C0803A63900000039200000394000007E
+S315200252D04E800021387F000848006D8D48008E558B
+S315200252E038600000800100147C0803A683C10008F0
+S315200252F083E1000C382100104E8000209421FFF01B
+S315200253007C0802A693E1000C900100147C7F1B7896
+S31520025310801F00082C8000004186009C3D2000282A
+S3152002532080098B542C800000418600843D60100049
+S315200253303D20002880099C00616B00037C005838C0
+S315200253407C8058004086001C3D20002880099B78DE
+S315200253507C0803A63860026E7FE4FB784E8000212B
+S315200253603D6010003D20002880099B60616B001083
+S315200253707C0058387C805800408600343860026EA3
+S31520025380388000013D20002880099B5038A000006B
+S315200253907FE6FB7838E000007C0803A6390000008F
+S315200253A039200000394000004E800021387F000855
+S315200253B048006CB5800100147C0803A683E1000C2A
+S315200253C0382100104E8000209421FFF07C0802A68E
+S315200253D093E1000C900100143FE00028801F87C44F
+S315200253E02C800000408600383D6000283D200022A7
+S315200253F039295598912B87243D6000283D2000228B
+S315200254003929575C912B87444BFFF33D2C830000AF
+S315200254104086000C38000001901F87C43D200028DA
+S31520025420806987C43063FFFF7C63191080010014F2
+S315200254307C0803A683E1000C382100104E80002050
+S315200254409421FFE07C0802A693A1001493C10018C0
+S3152002545093E1001C900100243D200028800987C486
+S315200254602C8000007C7E1B78408600184BFFFF5D57
+S315200254702C8300004186000C386000004800010899
+S315200254803FA00028807D87184BFFD8BD7C7F1B79E3
+S315200254904182002C7FE3FB787FC4F3784800010524
+S315200254A02C83000041860018807D87187FE4FB78D4
+S315200254B04BFFD8BD38600000480000CC3D200028B4
+S315200254C080098B542C800000418600B83D60100074
+S315200254D03D20002880099C00616B00077C0058381B
+S315200254E07C805800408600482C9F00004186001090
+S315200254F0813F000081290030480000083920000041
+S315200255002C890000418600283860271D3880000338
+S315200255107FE5FB787FC6F3787D2803A6801F0018D7
+S3152002552038E10008900100084E8000213D601000FD
+S315200255303D20002880099B60616B01007C00583861
+S315200255407C8058004086003C3860271D3880000247
+S315200255507FE5FB787FE6FB78801F00183D600028F8
+S3152002556090010008800B9B507FC7F3787C0803A626
+S315200255703901000839200000394000004E80002100
+S315200255807FE3FB78800100247C0803A683A1001414
+S3152002559083C1001883E1001C382100204E800020A0
+S315200255A09421FFF07C0802A693C1000893E1000C27
+S315200255B0900100143D200028800987C42C80000019
+S315200255C07C7E1B787C9F2378408600104BFFFDFD56
+S315200255D02C8300004086004473E0000B2C800008D8
+S315200255E0418600287FC3F3787FE4FB784BFFFB01DB
+S315200255F02C830000408600247FC3F3787FE4FB7867
+S3152002560048000035480000184BFEF0913C00001679
+S3152002561060000066900300003860FFFF80010014DE
+S315200256207C0803A683C1000883E1000C3821001000
+S315200256304E8000209421FFF87C0802A69001000CDF
+S315200256409883000538000001980300043D200028B5
+S3152002565080099C4C392000002C80000091230018E0
+S3152002566038000000B0030006418600103D200028C5
+S315200256708089871C4800000C3D20002880898718D5
+S315200256804BFFD779386000008001000C7C0803A606
+S31520025690382100084E8000209421FFE87C0802A6CB
+S315200256A093A1000C93C1001093E100149001001CF9
+S315200256B03D200028800983042C8000007C7E1B78F4
+S315200256C03BE00000408500104BFEEFD13C0000433A
+S315200256D0480000343D200028817E00008129871859
+S315200256E07C8B4800418600302C8B000041860010BE
+S315200256F0800900247C8B00004186001C4BFEEF9D16
+S315200257003C00003D60000001900300003860FFFF6E
+S31520025710480001303FA00028817D9AF4801E00189F
+S315200257207C8B0000418600183C600016606300688E
+S315200257304BFEEFDD3860FFFF48000108A01E000681
+S315200257402C800000418600103000FFFFB01E0006AC
+S31520025750480000EC881E00057009000841820048B6
+S31520025760800B00483000FFFF2C800000900B004881
+S31520025770408600344BFFA4ED813D9AF48009004017
+S31520025780812900447C004A783000FFFF7C0001100A
+S3152002579063E900047FEB00387D2900787D7F4B7812
+S315200257A0480000084BFFA4BD63EB0001801E0008E1
+S315200257B0893E0005901E00183000FFFF7C00011074
+S315200257C0712A00047FE900387D6B00787D3F5B7883
+S315200257D04182003C3D20002881299AF480090060FC
+S315200257E03000FFFF2C8000009009006040860020D8
+S315200257F08009006463E900023000FFFF7C0001108B
+S315200258007FEB00387D2900787D7F4B782C9F000026
+S31520025810418600283D2000283800000190099B205F
+S315200258204BFFA4553D20002893E99AE07FC3F378E5
+S31520025830480004494800000C4BFFA43D3860000094
+S315200258408001001C7C0803A683A1000C83C10010E2
+S3152002585083E10014382100184E8000209421FFE8AD
+S315200258607C0802A693A1000C93C1001093E10014B8
+S315200258709001001C3D200028800983042C80000012
+S315200258807C7F1B787C9D23784085001C4BFEEE0D89
+S315200258903C00004360000001900300003860FFFFD7
+S315200258A0480001304BFFA3BD3D200028817F000028
+S315200258B0812987187C8B48007C7E1B78418600389C
+S315200258C02C8B000041860010800900247C8B00006E
+S315200258D0418600244BFEEDC53C00003D60000001E0
+S315200258E0900300007FC3F3784BFFA38D3860FFFF40
+S315200258F0480000E0817F00182C8B00004086004C77
+S31520025900881F00053D60002870090008812B9AF443
+S31520025910913F0018418200108009004830000001A2
+S3152002592090090048881F000570090004418200146E
+S31520025930812B9AF4800900603000000190090060F2
+S315200259407FC3F378480000243D20002880099AF47A
+S315200259507C8B000040860020A01F00067FC3F378C0
+S3152002596030000001B01F00064BFFA30D3860000077
+S31520025970480000603D2000283800000190099B2045
+S315200259807FC3F3784BFFA2F17FE3FB787FA4EB780A
+S31520025990480004D52C8300004186001048008795D4
+S315200259A03860FFFF4800002C480087892C830001BD
+S315200259B0408600203D20002880099C507C0803A6B2
+S315200259C07FA3EB784E8000217C7D1B784BFFFED88F
+S315200259D08001001C7C0803A683A1000C83C1001051
+S315200259E083E10014382100184E8000209421FFE81C
+S315200259F07C0802A693C1001093E100149001001CBA
+S31520025A003D200028800983042C8000007C7F1B789F
+S31520025A10408500104BFEEC853C00004348000034D4
+S31520025A203D200028817F0000812987187C8B480031
+S31520025A30418600302C8B000041860010800900240C
+S31520025A407C8B00004186001C4BFEEC513C00003D45
+S31520025A5060000001900300003860FFFF4800020446
+S31520025A603D20002880098B542C800000418600B8F6
+S31520025A703D6010003D20002880099C00616B0007D4
+S31520025A807C0058387C805800408600482C9F0000B5
+S31520025A9041860010813F000081290030480000081D
+S31520025AA0392000002C890000418600283860271EF4
+S31520025AB0388000037FE5FB78801F00187D2803A627
+S31520025AC09001000888DF000538E100084E80002199
+S31520025AD03D6010003D20002880099B60616B01001B
+S31520025AE07C0058387C8058004086003C3860271E4F
+S31520025AF0388000027FE5FB787FE6FB78801F00185E
+S31520025B003D60002890010008800B9B503901000857
+S31520025B107C0803A63920000088FF000539400000D2
+S31520025B204E8000213D200028817F001880099AF4AA
+S31520025B307C8B0000408600283FC000287FE3FB784C
+S31520025B404BFFEC99813F0018801E9AF47C89000055
+S31520025B504186FFEC38600000480001083D200028FD
+S31520025B6038000001817F000890099B202C8B0000C1
+S31520025B7038000000B01F0006917F0018418600E021
+S31520025B803D20002880098B542C8000004186008409
+S31520025B903D6010003D20002880099C00616B0003B7
+S31520025BA07C0058387C8058004086001C3D20002806
+S31520025BB080099B787C0803A63860026C7FE4FB7818
+S31520025BC04E8000213D6010003D20002880099B6008
+S31520025BD0616B00107C0058387C8058004086003467
+S31520025BE03860026C3880000138A000007FE6FB781E
+S31520025BF03D600028800B9B5038E000007C0803A6FD
+S31520025C003900000039200000394000004E80002172
+S31520025C10387F000848006191813F00183800000053
+S31520025C209009004C881F0005700900044182001467
+S31520025C30813F001880090060300000019009006051
+S31520025C40881F00057009000841820014813F001850
+S31520025C50800900483000000190090048480084D598
+S31520025C608001001C7C0803A683C1001083E1001476
+S31520025C70382100184E8000209421FFF07C0802A6CD
+S31520025C8093C1000893E1000C900100143D200028E6
+S31520025C9080099AE0700900017C7F1B78418200E02E
+S31520025CA03D20002880098B542C80000041860084E8
+S31520025CB03D6010003D20002880099C00616B000396
+S31520025CC07C0058387C8058004086001C3D200028E5
+S31520025CD080099B787C0803A63860026C7FE4FB78F7
+S31520025CE04E8000213D6010003D20002880099B60E7
+S31520025CF0616B00107C0058387C8058004086003446
+S31520025D003860026C3880000138A000007FE6FB78FC
+S31520025D103D600028800B9B5038E000007C0803A6DB
+S31520025D203900000039200000394000004E80002151
+S31520025D30387F000848006071813F00183800000053
+S31520025D409009004C881F0005700900044182001446
+S31520025D50813F001880090060300000019009006030
+S31520025D60881F00057009000841820014813F00182F
+S31520025D708009004830000001900900483FC00028F1
+S31520025D80801E9AE070090004418200143D200028FA
+S31520025D9080699AF480830044480052B1801E9AE0BA
+S31520025DA070090002418200A43D20002880098B54FC
+S31520025DB02C800000418600843D6010003D20002892
+S31520025DC080099C00616B00037C0058387C80580057
+S31520025DD04086001C3D20002880099B787C0803A66B
+S31520025DE03860026C7FE4FB784E8000213D60100013
+S31520025DF03D20002880099B60616B00107C0058388A
+S31520025E007C805800408600343860026C388000015D
+S31520025E1038A000007FE6FB783D600028800B9B506F
+S31520025E2038E000007C0803A6390000003920000073
+S31520025E30394000004E8000213D20002880699AF4D6
+S31520025E403863006448006221480082E98001001418
+S31520025E507C0803A683C1000883E1000C38210010C8
+S31520025E604E8000209421FFF07C0802A693C10008F0
+S31520025E7093E1000C900100147C7F1B787C9E237892
+S31520025E803D20002880098B542C8000004186008406
+S31520025E903D6010003D20002880099C00616B0003B4
+S31520025EA07C0058387C8058004086001C3D20002803
+S31520025EB080099B787C0803A63860026D7FE4FB7814
+S31520025EC04E8000213D6010003D20002880099B6005
+S31520025ED0616B00107C0058387C8058004086003464
+S31520025EE03860026D388000013D20002880099B50D1
+S31520025EF038A000007FE6FB7838E000007C0803A685
+S31520025F003900000039200000394000004E8000216F
+S31520025F10387F00087FC4F378480062C92C830000CA
+S31520025F204186000C3860FFFF48000038881F0005B4
+S31520025F3070090008418200283D20002881299AF410
+S31520025F4093E9004C807F001880890040800300403E
+S31520025F507C84004040840008480050F138600000EC
+S31520025F60800100147C0803A683C1000883E1000C8B
+S31520025F70382100104E8000209421FFF07C0802A6D2
+S31520025F8093C1000893E1000C900100143FC0002841
+S31520025F90801E88242C800000408600543FE0002882
+S31520025FA0807F87C83880020038A000303CC000229B
+S31520025FB038C65FC03CE0002238E761DC3D000022A3
+S31520025FC0390867C04BFF95F92C83000040860020D4
+S31520025FD03D200028807F87C8808987E89083002417
+S31520025FE04BFF97E938000001901E88243D200028A7
+S31520025FF0806988243063FFFF7C63191080010014B6
+S315200260007C0803A683C1000883E1000C3821001016
+S315200260104E8000209421FFB87C0802A69321002CF2
+S3152002602093410030936100349381003893A1003C60
+S3152002603093C1004093E100449001004C800100503E
+S315200260408161005483A100588381005C83610060D2
+S315200260508341006483210068900100089161000C4D
+S3152002606093A1001093810014936100189341001CA0
+S31520026070932100204800004D7C7D1B79418200142B
+S315200260807FA3EB78480007217FA3EB78480000081E
+S315200260903860FFFF8001004C7C0803A68321002C78
+S315200260A083410030836100348381003883A1003C20
+S315200260B083C1004083E10044382100484E800020FD
+S315200260C09421FF707C0802A691E1004C92010050B7
+S315200260D092210054924100589261005C92810060A4
+S315200260E092A1006492C1006892E1006C9301007053
+S315200260F093210074934100789361007C9381008000
+S3152002610093A1008493C1008893E1008C90010094AE
+S315200261107C9823787CBB2B787CDC33787CF73B78A5
+S315200261207D1643787D3F4B787D5953787C7D1B794C
+S3152002613082A100988281009C826100A0824100A4F3
+S31520026140822100A8820100AC81E100B0408200AC2D
+S315200261503D200028808987CC386100304BFED5CD82
+S31520026160386100304BFED5F97C681B7838C0000AAE
+S315200261703D20002838E9885C3D20002880098820B7
+S315200261803941003030000001900988207C0B0378C9
+S315200261907C0B33D61D20000A7D2958507D2938AE26
+S315200261A07C0B03797D2A19AE386300014082FFE415
+S315200261B0380100307D4042147C001A143160FFFF02
+S315200261C07C8A584040840024880B0000892A0000DB
+S315200261D0980A0000992B0000396BFFFF394A00010B
+S315200261E07C8A58404184FFE438000000392100307F
+S315200261F07C0919AE7D3D4B78381C0007541C0038AB
+S315200262003F400028807A87C87F84E37838A0000040
+S315200262104BFFCA697C7E1B794182006C93E10008A0
+S315200262209321000C92A10010928100149261001811
+S315200262309241001C922100209201002491E1002823
+S315200262407FFEE2147FE3FB787FA4EB787F05C37899
+S31520026250636600047FE7FB787F88E3787EE9BB7874
+S315200262607ECAB378480000792C8300004086000C51
+S315200262707FE3FB7848000014807A87C87FC4F378CE
+S315200262804BFFCAED38600000800100947C0803A60B
+S3152002629081E1004C82010050822100548241005843
+S315200262A08261005C8281006082A1006482C10068F2
+S315200262B082E1006C8301007083210074834100789F
+S315200262C08361007C8381008083A1008483C100884E
+S315200262D083E1008C382100904E8000209421FF78A3
+S315200262E07C0802A691C1004091E100449201004837
+S315200262F09221004C924100509261005492810058A2
+S3152002630092A1005C92C1006092E100649301006850
+S315200263109321006C934100709361007493810078FD
+S3152002632093A1007C93C1008093E100849001008CAC
+S315200263307C7E1B787C9923787CBC2B787CDA33781C
+S315200263407CFD3B787D1B43787D384B787D5F537887
+S315200263503D20002839C000008009830482E1009094
+S3152002636082C1009482A100988281009C826100A051
+S31520026370824100A42C800000822100A8820100AC68
+S3152002638081E100B04085001C4BFEE3113C00004336
+S3152002639060000001900300003860FFFF480003B050
+S315200263A03D200028800988242C8000004086001881
+S315200263B04BFFFBC92C8300004186000C3860FFFF8F
+S315200263C04800038C93E1001892E1001C92C1002040
+S315200263D092A10024928100289261002C92410030E1
+S315200263E0922100349201003891E1003C935E0038FC
+S315200263F038000001901E003C939E0040939E00446C
+S315200264003BE0000093FE004893FE004C93FE0050B2
+S3152002641093FE005438000000B01E0058B01E005AE9
+S3152002642093FE005C93FE006093E1000893E1000C6A
+S3152002643093E1001093E10014387E006438A0000036
+S3152002644038C0000038E00000390000003920000082
+S315200264503D600028808B84E4394000004BFF432DA9
+S31520026460931E007493BE0078734001007C1BE85093
+S31520026470901E007C901E008040820014807E007C4C
+S315200264807F64DB7838A000EE4BFEB0257FC3F3781D
+S315200264907FA4EB784803094593FE008493FE008887
+S315200264A093FE008C93FE00AC93FE00DC93FE00B0BC
+S315200264B093FE00B493FE011893FE00B893FE00BC2F
+S315200264C093FE00C0387E00F03880000C38A0000011
+S315200264D04BFEAFDD38000000396000007FC9F3783B
+S315200264E0900900D0300000012C800002916900C47E
+S315200264F0392900044085FFEC38000000901E00E890
+S31520026500901E00EC901E00FC901E0100901E0104BD
+S31520026510901E0108901E010C901E0110901E01145F
+S31520026520901E01D8901E01E87FC3F3787FA4EB78F2
+S3152002653038A10018480309213FA00028801D8B544A
+S315200265402C800000418601643C0010003FE00028B8
+S31520026550813F9C00600000077D2900387C8900006D
+S315200265604086003038602710388000057FC5F378D2
+S315200265703D20002880099C587F86E3787C0803A664
+S315200265807F67DB787F08C3787F49D3784E800021E6
+S315200265903D6010003D20002880099B60616B010050
+S315200265A07C0058387C80580040860034386027109A
+S315200265B03880000238A000007FC6F3783D600028AC
+S315200265C0800B9B507F87E3787C0803A67F68DB7865
+S315200265D07F09C3787F4AD3784E800021801D8B5451
+S315200265E02C800000418600C43C001000813F9C00A4
+S315200265F0600000017D2900387C8900004086006009
+S3152002660038600003388000013D20002880099BF86D
+S315200266107FC7F3787C0803A680BE004080DE005048
+S315200266207F28CB784E800021801F9C0070091000A5
+S315200266304182002C38600003388000013D2000286A
+S3152002664080099B4C7FC7F3787C0803A680BE004056
+S3152002665080DE00507F28CB784E8000213D601000DE
+S315200266603D20002880099B60616B00017C00583820
+S315200266707C80580040860034386000033880000051
+S3152002668038A0000038C000013D600028800B9B50D6
+S315200266907FC9F3787C0803A680FE0040811E005045
+S315200266A07F2ACB784E8000213D2000283800000129
+S315200266B090099B207FC3F378480044FD3D200028A3
+S315200266C080099C4C2C800000418600103D20002829
+S315200266D0808987E84800000C3D200028808987C8E9
+S315200266E0387E00304BFFC71548007A492C990000A6
+S315200266F0418600247F23CB784BFED0653883000168
+S315200267007FC3F37848001D057C6E1B787F24CB78E7
+S315200267104BFED01991DE00343D2000283BA9CDFC4A
+S315200267203BE000007C1FE82E2C80000041860010F2
+S315200267307C0803A67FC3F3784E8000213BFF00042A
+S315200267402C9F003C4085FFE0386000008001008CD1
+S315200267507C0803A681C1004081E1004482010048F1
+S315200267608221004C8241005082610054828100586D
+S3152002677082A1005C82C1006082E10064830100681C
+S315200267808321006C834100708361007483810078C9
+S3152002679083A1007C83C1008083E1008438210088A4
+S315200267A04E8000209421FFF87C0802A69001000C5E
+S315200267B048000B398001000C7C0803A6382100080A
+S315200267C04E8000209421FFF07C0802A693E1000C63
+S315200267D0900100143FE00028813F9AF490690088D6
+S315200267E0480013013D20002880099AE82C800000E9
+S315200267F0418600107C0803A6386000004E800021E6
+S31520026800813F9AF48009003860000002900900381E
+S3152002681048001391386000003880000138A0FFFF3D
+S3152002682038C000004800009D800100147C0803A6A1
+S3152002683083E1000C382100104E8000209421FFF8BD
+S315200268407C0802A69001000C3880000138A0FFFFC8
+S3152002685038C000004800006D8001000C7C0803A6A9
+S31520026860382100084E8000209421FFF87C0802A6D9
+S315200268709001000C3880000138A0FFFF38C00001CB
+S31520026880480000418001000C7C0803A6382100083C
+S315200268904E8000209421FFF87C0802A69001000C6D
+S315200268A03880000038A0FFFF38C0000048000015DD
+S315200268B08001000C7C0803A6382100084E800020A7
+S315200268C09421FFE07C0802A69361000C93810010BC
+S315200268D093A1001493C1001893E1001C9001002497
+S315200268E03D200028800983042C8000007C9B23788D
+S315200268F07CBD2B787CDC3378408500144BFEDD9DF5
+S315200269003C00004360000001480004002C83000084
+S31520026910408600103D20002883C99AF448000008CA
+S315200269207C7E1B783D20002880098B542C80000019
+S31520026930418600E03D6010003D20002880099C0031
+S31520026940616B00077C0058387C80580040860078AE
+S315200269502C9E00004186004C3D200028817E00307E
+S31520026960812987C87C8B48004186002C2C8B00000D
+S3152002697041860010800900247C8B00004186001885
+S315200269804BFEDD193C00003D600000019003000033
+S3152002699048000010813E003080090030480000087F
+S315200269A0380000002C8000004186001C3860271128
+S315200269B07C0803A63880000280DE00607FC5F3785B
+S315200269C04E8000213D6010003D20002880099B60FA
+S315200269D0616B01007C0058387C8058004086003468
+S315200269E038602711388000027FC5F3787FC6F37896
+S315200269F03D600028800B9B50390000007C0803A6CE
+S31520026A003920000080FE0060394000004E800021BF
+S31520026A103D20002880099AF47C9E00004086005C76
+S31520026A203D20002880099C302C8000004186004CA5
+S31520026A30480000084800143D801E00602C8000009B
+S31520026A404086FFF43C600022386367C03D20002860
+S31520026A5080099C307FC4F3787C0803A67F65DB78A7
+S31520026A6038C0000038E000004E8000213860000067
+S31520026A70480006714BFFFFF84BFF91E92C9E000060
+S31520026A807C7F1B784186003C3D200028817E003099
+S31520026A90812987C87C8B4800418600382C8B0000D0
+S31520026AA041860010800900247C8B00004186002448
+S31520026AB04BFEDBE93C00003D600000019003000034
+S31520026AC07FE3FB784BFF91B13860FFFF480005F06A
+S31520026AD0813E008C2C890000418602383800FFFF57
+S31520026AE0900902904800022C801E00502C80000043
+S31520026AF0418602383D2000283800000190099B205B
+S31520026B007FE3FB784BFF91712C9C0000408600149A
+S31520026B103D20002880099AF47C9E0000408600BC15
+S31520026B20801E00642C80000038000000901E006049
+S31520026B30901E00504186009C3D20002880098B54DF
+S31520026B402C800000418600843D6010003D200028F4
+S31520026B5080099C00616B00037C0058387C805800B9
+S31520026B604086001C3D20002880099B787C0803A6CD
+S31520026B703860026B7FC4F3784E8000213D6010009E
+S31520026B803D20002880099B60616B00107C005838EC
+S31520026B907C805800408600343860026B38800001C1
+S31520026BA038A000007FC6F3783D600028800B9B50FA
+S31520026BB038E000007C0803A63900000039200000D6
+S31520026BC0394000004E800021387E006448005499E6
+S31520026BD048007561480000D83D20002880098B5462
+S31520026BE02C800000418600843D6010003D20002854
+S31520026BF080099C00616B00037C0058387C80580019
+S31520026C004086001C3D20002880099B787C0803A62C
+S31520026C103860026B7FC4F3784E8000213D601000FD
+S31520026C203D20002880099B60616B00107C0058384B
+S31520026C307C805800408600343860026B3880000120
+S31520026C4038A000007FC6F3783D600028800B9B5059
+S31520026C5038E000007C0803A6390000003920000035
+S31520026C60394000004E800021387E00647FA4EB78F4
+S31520026C70480055712C8300004086030C480074B5E9
+S31520026C802C83FFFF4186FE442C8300014086002090
+S31520026C903D20002880099C507C0803A67FA3EB7820
+S31520026CA04E8000217C7D1B784BFFFDD04BFF8FB59C
+S31520026CB02C9E00007C7F1B784186003C3D200028CC
+S31520026CC0817E0030812987C87C8B4800418600441A
+S31520026CD02C8B000041860010800900247C8B00004A
+S31520026CE0418600304BFED9B53C00003D60000001D4
+S31520026CF0900300007FE3FB784BFF8F7D4BFED99DEF
+S31520026D003C00003D60000003900300004BFFFDBCE9
+S31520026D10801E00602C8000004086FDDC801E003C28
+S31520026D202C8000004186FDC43D20002880098B541A
+S31520026D302C800000418600F83D6010003D2000288E
+S31520026D4080099C00616B00077C0058387C805800C3
+S31520026D504086008C3D20002881699AF42C8B000005
+S31520026D60418600543D200028816B0030812987C846
+S31520026D707C8B48004186002C2C8B0000418600101B
+S31520026D80800900247C8B0000418600184BFED90D19
+S31520026D903C00003D600000019003000048000018FE
+S31520026DA03D20002881299AF481290030800900306B
+S31520026DB048000008380000002C8000004186002090
+S31520026DC03D2000287C0803A680A99AF4386027165D
+S31520026DD080C50060388000024E8000213D60100090
+S31520026DE03D20002880099B60616B01007C00583899
+S31520026DF07C8058004086003838602716388000028A
+S31520026E00390000003D60002880AB9AF43D600028DE
+S31520026E10800B9B50392000007C0803A639400000D5
+S31520026E2080E500607CA62B784E8000213D2000283C
+S31520026E3081299AF4800900603000000190090060DF
+S31520026E40801E00607C9E480030000001901E00607B
+S31520026E50418600283D2000283800000190099B2009
+S31520026E607FE3FB784BFF8E117FC3F37848003FDD2B
+S31520026E70480072C14800000C7FE3FB784BFF8DF976
+S31520026E803D2000283BA9CDB83BE000007C1FE82E20
+S31520026E902C800000418600107C0803A67FC3F3786D
+S31520026EA04E8000213BFF00042C9F003C4085FFE0E2
+S31520026EB03D20002880098B542C80000041860078D2
+S31520026EC03FE010003D20002880099C0063FF00015E
+S31520026ED07C00F8387C80F800408600183D20002887
+S31520026EE080099BA87C0803A6386000394E800021C1
+S31520026EF03D20002880099B607C00F8387C80F800C1
+S31520026F0040860034386000393880000038A00000FE
+S31520026F1038C000003D600028800B9B5038E00000FE
+S31520026F207C0803A639000000392000003940000001
+S31520026F304E8000213D20002881299AF480090050A4
+S31520026F4030000001900900502C9B00004186005021
+S31520026F50801E003870090004418200443D2000282A
+S31520026F6080099AA87C9E0000408600243D200028A5
+S31520026F7080699AB83D20002880899AB44BFFA4E103
+S31520026F804800001C480071AD4BFFFB403D20002805
+S31520026F90806987C8809E00804BFFBDD54BFF8CC57C
+S31520026FA07C7F1B78387E00304BFFBE653D20002853
+S31520026FB03800000190099B207FE3FB784BFF8CB9B8
+S31520026FC07FC3F37848003CCD3D600028800B87E4E0
+S31520026FD07C9E00007C691B784086000C38000000ED
+S31520026FE0900B87E4807E00E82C8300004186001CFB
+S31520026FF02C890000408600143D20002880099AF042
+S315200270007C0803A64E800021801E00642C8000008E
+S315200270104186009C3D20002880098B542C8000004C
+S31520027020418600843D6010003D20002880099C0096
+S31520027030616B00037C0058387C8058004086001C17
+S315200270403D20002880099B787C0803A63860026BC5
+S315200270507FC4F3784E8000213D6010003D20002839
+S3152002706080099B60616B00107C0058387C80580038
+S31520027070408600343860026B3880000138A0000058
+S315200270807FC6F3783D600028800B9B5038E00000D5
+S315200270907C0803A639000000392000003940000090
+S315200270A04E800021387E006448004FBD480070851E
+S315200270B048000AF148000DBD386000008001002416
+S315200270C07C0803A68361000C8381001083A100142F
+S315200270D083C1001883E1001C382100204E80002045
+S315200270E09421FFF07C0802A693C1000893E1000CCC
+S315200270F0900100147C7F1B782C9F00007FFEFB787A
+S315200271004086000C3D20002883C99AF43D200028A1
+S3152002711080098B542C800000418600DC3D601000E3
+S315200271203D20002880099C00616B00077C005838AE
+S315200271307C805800408600742C9E00004186004CBC
+S315200271403D200028817E0030812987C87C8B48001B
+S315200271504186002C2C8B00004186001080090024D9
+S315200271607C8B0000418600184BFED5313C00003D49
+S31520027170600000019003000048000010813E0030AC
+S315200271808009003048000008380000002C800000EA
+S31520027190418600187C0803A638602714388000012F
+S315200271A07FC5F3784E8000213D6010003D200028E7
+S315200271B080099B60616B01007C0058387C805800F6
+S315200271C04086003438602714388000027FC5F37861
+S315200271D03D20002880099B507CA62B7838E00000B1
+S315200271E07C0803A63900000039200000394000003F
+S315200271F04E8000213D600028800B9B202C800000C1
+S315200272004186005C2C9F0000418600B03D2000286C
+S31520027210817F0030812987C87C8B48004186002CDB
+S315200272202C8B000041860010800900247C8B0000F4
+S31520027230418600184BFED4653C00003D60000001EB
+S3152002724090030000480000743C6000233863AD4878
+S315200272507FE4FB78480053E1480000742C9F00002D
+S315200272604086000C3D20002883E99AF42C9F0000DA
+S3152002727038000001900B9B204186003C3D200028CF
+S31520027280817F0030812987C87C8B48004186003463
+S315200272902C8B000041860010800900247C8B000084
+S315200272A0418600204BFED3F53C00003D60000001E4
+S315200272B09003000048006E7D3860FFFF48000014EE
+S315200272C07FE3FB7848003B8548006E693860000002
+S315200272D0800100147C0803A683C1000883E1000C08
+S315200272E0382100104E8000209421FFF07C0802A64F
+S315200272F093E1000C900100143D20002880098B5454
+S315200273002C8000007C7F1B78418600E03D601000C7
+S315200273103D20002880099C00616B00077C005838BC
+S315200273207C805800408600782C9F00004186004CC5
+S315200273303D200028817F0030812987C87C8B480028
+S315200273404186002C2C8B00004186001080090024E7
+S315200273507C8B0000418600184BFED3413C00003D49
+S31520027360600000019003000048000010813F0030B9
+S315200273708009003048000008380000002C800000F8
+S315200273804186001C386027157C0803A63880000237
+S3152002739080DF00407FE5FB784E8000213D601000B3
+S315200273A03D20002880099B60616B01007C005838D3
+S315200273B07C805800408600343860271538800002C9
+S315200273C07FE5FB787FE6FB783D600028800B9B50AB
+S315200273D0390000007C0803A63920000080FF004007
+S315200273E0394000004E8000213D400028800A9B2023
+S315200273F02C8000004186005C2C9F0000418600A064
+S315200274003D200028817F0030812987C87C8B480057
+S315200274104186002C2C8B0000418600108009002416
+S315200274207C8B0000418600184BFED2713C00003D49
+S315200274306000000190030000480000643C600023C5
+S315200274403863AE347FE4FB78480051ED480000648F
+S315200274502C9F00004186005C3D200028817F003061
+S31520027460812987C87C8B480038000001900A9B201E
+S31520027470418600342C8B00004186001080090024AE
+S315200274807C8B0000418600204BFED2113C00003D41
+S31520027490600000019003000048006C993860FFFFED
+S315200274A0480000147FE3FB7848003A8D48006C853B
+S315200274B038600000800100147C0803A683E1000CDA
+S315200274C0382100104E8000209421FF807C0802A6DD
+S315200274D092E1005C9301006093210064934100686D
+S315200274E09361006C9381007093A1007493C100781C
+S315200274F093E1007C900100843D20002880098304CA
+S315200275002C8000007C7D1B783B8000004085001C7F
+S315200275104BFED1893C00004360000001900300002D
+S315200275203860FFFF480002F42C9D000041860014BB
+S315200275303D20002880099AF47C9D00004086009810
+S315200275403D20002881299AF4800900602C800000C1
+S315200275504186001C3FE0002848000919813F9AF421
+S31520027560800900602C8000004086FFF03800000071
+S31520027570900100089001000C900100109001001467
+S31520027580900100189001001C900100203CE000228E
+S3152002759038E773C8392000003D600028806B87D009
+S315200275A03D6000283D000028808B87D43D6000285E
+S315200275B080A887DC3D00002880CB87D881089AF4F2
+S315200275C0394000004BFFEA51386000004BFFFB15A3
+S315200275D04BFFFFF87FA3EB7848000DC17C7E1B7919
+S315200275E04082000C3860FFFF480002307FC3F378E8
+S315200275F038A10030837E0078801E0080835E00449E
+S31520027600833E003882FE00747F64DB787F00D85088
+S315200276104802F87183FE00342C9F00004186002C1C
+S315200276207FE3FB784BFEC139386300014BFF9E6531
+S315200276307C7C1B79418200107F83E3787FE4FB7890
+S315200276404BFEC0E97F9FE3783D20002880098B54BA
+S315200276502C800000418600F83D6010003D20002865
+S3152002766080099C00616B00077C0058387C8058009A
+S315200276704086008C3D20002881699AF42C8B0000DC
+S31520027680418600543D200028816B0030812987C81D
+S315200276907C8B48004186002C2C8B000041860010F2
+S315200276A0800900247C8B0000418600184BFECFED1A
+S315200276B03C00003D600000019003000048000018D5
+S315200276C03D20002881299AF4812900308009003042
+S315200276D048000008380000002C8000004186002067
+S315200276E03D2000287C0803A680A99AF43860271634
+S315200276F080C50060388000024E8000213D60100067
+S315200277003D20002880099B60616B01007C0058386F
+S315200277107C80580040860038386027163880000260
+S31520027720390000003D60002880AB9AF43D600028B5
+S31520027730800B9B50392000007C0803A639400000AC
+S3152002774080E500607CA62B784E8000213D20002813
+S3152002775081299AF4800900603000000190090060B6
+S315200277607FA3EB784BFFF1312C830000418600107A
+S31520027770480007013860FFFF480000A0800100345E
+S315200277808141003090010008800100389001000CF0
+S315200277908001003C7FC3F3789001001080010040F5
+S315200277A07FE4FB7890010014800100447F45D37862
+S315200277B090010018800100487F26CB789001001C9A
+S315200277C08001004C7F67DB78900100208001005009
+S315200277D07F08C37890010024800100547EE9BB789B
+S315200277E0900100284BFFEAF92C8300003BE00000C1
+S315200277F0408600147FC3F3784BFFEFAD2C83000045
+S31520027800418600083BE00001480006697F83E37851
+S315200278104BFF9CAD7C7F00D0800100847C0803A6B0
+S3152002782082E1005C83010060832100648341006859
+S315200278308361006C8381007083A1007483C1007808
+S3152002784083E1007C382100804E8000209421FFE8CD
+S315200278507C0802A693A1000C93C1001093E10014A8
+S315200278609001001C7C7E1B782C9E00007C9D237838
+S315200278707FDFF3784086000C3D20002883E99AF4C6
+S315200278803D20002880098B542C800000418600E48C
+S315200278903D6010003D20002880099C00616B000796
+S315200278A07C0058387C8058004086007C2C9F000043
+S315200278B04186004C3D200028817F0030812987C8DF
+S315200278C07C8B48004186002C2C8B000041860010C0
+S315200278D0800900247C8B0000418600184BFECDBD1A
+S315200278E03C00003D600000019003000048000010AB
+S315200278F0813F00308009003048000008380000002F
+S315200279002C8000004186002038602713388000032F
+S315200279107C0803A67FE5FB7880FF00407FA6EB78F4
+S315200279204E8000213D6010003D20002880099B608A
+S31520027930616B01007C0058387C80580040860034F8
+S3152002794038602713388000027FE5FB787CA62B78E7
+S315200279503D600028800B9B507FA7EB787C0803A60E
+S315200279603920000081050040394000004E80002168
+S315200279703D200028800987E02C8000004186001CDB
+S31520027980289D00FF408500144BFECD113C000003CC
+S315200279906000006D480000503D600028800B9B204F
+S315200279A02C800000418600602C9E0000418600B497
+S315200279B03D200028817E0030812987C87C8B4800A3
+S315200279C04186002C2C8B0000418600108009002461
+S315200279D07C8B0000418600184BFECCC13C00003D4A
+S315200279E06000000190030000480000783C600023FC
+S315200279F03863AF247FC4F3787FA5EB7848004CE93F
+S31520027A00480000782C9E00004086000C3D2000286D
+S31520027A1083C99AF42C9E000038000001900B9B200B
+S31520027A204186003C3D200028817E0030812987C87E
+S31520027A307C8B4800418600342C8B00004186001046
+S31520027A40800900247C8B0000418600204BFECC4D11
+S31520027A503C00003D6000000190030000480066D50E
+S31520027A603860FFFF480000187FC3F3787FA4EB78C5
+S31520027A70480035B5480066BD386000008001001C0C
+S31520027A807C0803A683A1000C83C1001083E10014A5
+S31520027A90382100184E8000209421FFF07C0802A68F
+S31520027AA093E1000C900100147C9F2378480008ED96
+S31520027AB07C631B79418200148003004038600000F9
+S31520027AC0901F0000480000083860FFFF8001001464
+S31520027AD07C0803A683E1000C382100104E8000208A
+S31520027AE09421FFF07C0802A693E1000C9001001479
+S31520027AF03D20002880098B542C8000004186007886
+S31520027B003FE010003D20002880099C0063FF000111
+S31520027B107C00F8387C80F800408600183D2000283A
+S31520027B2080099BA87C0803A6386000394E80002174
+S31520027B303D20002880099B607C00F8387C80F80074
+S31520027B4040860034386000393D20002880099B5049
+S31520027B503880000038A0000038C0000038E000005D
+S31520027B607C0803A6390000003920000039400000B5
+S31520027B704E8000213D20002881299AF48009005058
+S31520027B803000000190090050386000008001001486
+S31520027B907C0803A683E1000C382100104E800020C9
+S31520027BA09421FFF07C0802A693C1000893E1000C01
+S31520027BB0900100143D20002880098B542C8000005F
+S31520027BC03D20002883C99AF4418600783FE01000C0
+S31520027BD03D20002880099C0063FF00017C00F838C4
+S31520027BE07C80F800408600183D20002880099BA84A
+S31520027BF07C0803A63860003A4E8000213D200028EA
+S31520027C0080099B607C00F8387C80F800408600342E
+S31520027C103860003A3880000038A0000038C00000E2
+S31520027C203D600028800B9B5038E000007C0803A6AC
+S31520027C303900000039200000394000004E80002122
+S31520027C40801E00502C800000418600D43000FFFFA9
+S31520027C502C800000901E0050408600C4801E0064C6
+S31520027C602C8000003D2000283800000190099B202E
+S31520027C70418600A8801E00602C8000004086009C61
+S31520027C803D20002880098B542C80000041860084E8
+S31520027C903D6010003D20002880099C00616B000396
+S31520027CA07C0058387C8058004086001C3D200028E5
+S31520027CB080099B787C0803A63860026B7FC4F37820
+S31520027CC04E8000213D6010003D20002880099B60E7
+S31520027CD0616B00107C0058387C8058004086003446
+S31520027CE03860026B3880000138A000007FC6F37826
+S31520027CF03D600028800B9B5038E000007C0803A6DC
+S31520027D003900000039200000394000004E80002151
+S31520027D10387E0064480043514800641938600000E8
+S31520027D20800100147C0803A683C1000883E1000CAD
+S31520027D30382100104E8000209421FFF87C0802A6EC
+S31520027D409001000C3D20002880098B542C800000D5
+S31520027D50418600F83D6010003D20002880099C00E5
+S31520027D60616B00077C0058387C8058004086008C66
+S31520027D703D20002881699AF42C8B0000418600540C
+S31520027D803D200028816B0030812987C87C8B4800E2
+S31520027D904186002C2C8B000041860010800900248D
+S31520027DA07C8B0000418600184BFEC8F13C00003D4A
+S31520027DB06000000190030000480000183D200028C2
+S31520027DC081299AF481290030800900304800000870
+S31520027DD0380000002C800000418600203D2000282B
+S31520027DE07C0803A680A99AF43860271680C500600D
+S31520027DF0388000024E8000213D6010003D20002880
+S31520027E0080099B60616B01007C0058387C80580099
+S31520027E1040860038386027163D2000283880000228
+S31520027E203D6000283900000080A99AF4800B9B50FF
+S31520027E30392000007C0803A63940000080E5006056
+S31520027E407CA62B784E8000213D20002881299AF499
+S31520027E50800900603000000190090060386000004F
+S31520027E608001000C7C0803A6382100084E800020E1
+S31520027E709421FFF07C0802A693E1000C90010014E5
+S31520027E803D20002880098B542C8000003D200028AC
+S31520027E9083E99AF4418600E03D6010003D200028E7
+S31520027EA080099C00616B00077C0058387C80580052
+S31520027EB0408600782C9F00004186004C3D200028F9
+S31520027EC0817F0030812987C87C8B48004186002C1F
+S31520027ED02C8B000041860010800900247C8B000038
+S31520027EE0418600184BFEC7B53C00003D60000001EC
+S31520027EF09003000048000010813F003080090030C6
+S31520027F0048000008380000002C8000004186001C32
+S31520027F10386027177C0803A63880000280DF0060BD
+S31520027F207FE5FB784E8000213D6010003D20002831
+S31520027F3080099B60616B01007C0058387C80580068
+S31520027F404086003438602717388000027FE5FB78A8
+S31520027F507FE6FB783D600028800B9B5039000000AD
+S31520027F607C0803A63920000080FF0060394000000B
+S31520027F704E800021801F00602C800000418600C8B0
+S31520027F803000FFFF2C800000901F0060408600B862
+S31520027F90801F00642C8000003D200028380000014C
+S31520027FA090099B204186009C3D20002880098B5405
+S31520027FB02C800000418600843D6010003D20002870
+S31520027FC080099C00616B00037C0058387C80580035
+S31520027FD04086001C3D20002880099B787C0803A649
+S31520027FE03860026B7FE4FB784E8000213D601000F2
+S31520027FF03D20002880099B60616B00107C00583868
+S315200280007C805800408600343860026B388000013C
+S3152002801038A000007FE6FB783D600028800B9B504D
+S3152002802038E000007C0803A6390000003920000051
+S31520028030394000004E800021387F006448004029E4
+S31520028040480060F138600000800100147C0803A615
+S3152002805083E1000C382100104E8000209421FFE895
+S315200280607C0802A69381000893A1000C93C10010FC
+S3152002807093E100149001001C3D200028800983040E
+S315200280802C8000007C7C1B783D20002883A99AF452
+S315200280904085001C4BFEC6053C00004360000001E3
+S315200280A0900300003860FFFF480001703D20002841
+S315200280B080098B542C800000418600DC3D60100034
+S315200280C03D20002880099C00616B00077C005838FF
+S315200280D07C805800408600742C9D00004186004C0E
+S315200280E03D200028817D0030812987C87C8B48006D
+S315200280F04186002C2C8B000041860010800900242A
+S315200281007C8B0000418600184BFEC5913C00003D49
+S31520028110600000019003000048000010813D0030FD
+S315200281208009003048000008380000002C8000003A
+S31520028130418600187C0803A6386027123880000181
+S315200281407F85E3784E8000213D6010003D20002887
+S3152002815080099B60616B01007C0058387C80580046
+S315200281604086003438602712388000027FA5EB78DB
+S315200281703D20002880099B507F86E37838E0000066
+S315200281807C0803A63900000039200000394000008F
+S315200281904E8000212C9C00003D2000283800000142
+S315200281A090099B20408600483FA000283BBDCCB8C2
+S315200281B0813D000C800900187C0803A63F80002818
+S315200281C0809C9AF47FA3EB784E8000217FA3EB78E4
+S315200281D08123000C80090010809C9AF47C0803A657
+S315200281E080A400404E8000214800000C7F83E37863
+S315200281F0480036BD48005F3D7C7D1B782C9D0001E2
+S31520028200408600143BA0FFFF4BFEC49138000004B9
+S31520028210900300007FA3EB788001001C7C0803A654
+S315200282208381000883A1000C83C1001083E100141E
+S31520028230382100184E8000209421FFF87C0802A6DF
+S315200282409001000C3D20002880099B202C800000F4
+S315200282507C641B78418600582C8400004186009C51
+S315200282603D20002881640030812987C87C8B480004
+S315200282704186002C2C8B00004186001080090024A8
+S315200282807C8B0000418600184BFEC4113C00003D49
+S315200282906000000190030000480000603C6000235B
+S315200282A03863B90C48004391480000642C840000CE
+S315200282B03800000190099B204186003C3D20002881
+S315200282C081640030812987C87C8B4800418600342E
+S315200282D02C8B000041860010800900247C8B000034
+S315200282E0418600204BFEC3B53C00003D60000001E4
+S315200282F09003000048005E3D3860FFFF48000014EE
+S315200283007C8323784800370948005E2938600000BC
+S315200283108001000C7C0803A6382100084E8000202C
+S315200283203D20002880699AF44E8000209421FFF88F
+S315200283307C0802A69001000C7C631B7941820048CE
+S315200283403D20002880630030812987C87C8348002D
+S315200283504186002C2C8300004186001080090024CF
+S315200283607C830000418600184BFEC3313C00003D51
+S3152002837060000001900300004800000C38600000F5
+S31520028380480000083860FFFF8001000C7C0803A625
+S31520028390382100084E8000209421FFF87C0802A68E
+S315200283A09001000C7C631B79408200143D2000283A
+S315200283B080699AF42C8300004186003C3D200028E7
+S315200283C081630030812987C87C8B48004186002C36
+S315200283D02C8B000041860010800900247C8B000033
+S315200283E0418600184BFEC2B53C00003D60000001EC
+S315200283F090030000386000008001000C7C0803A670
+S31520028400382100084E8000209421FFF07C0802A625
+S3152002841093E1000C900100147C9F23784BFFFF7D93
+S315200284207C691B79381F0007541F003841820018C7
+S315200284308069007C800900787C0300507C9F004084
+S315200284404085000C386000004800000C7C03FA14BA
+S315200284509009007C800100147C0803A683E1000CAD
+S31520028460382100104E8000209421FFE87C0802A6C5
+S3152002847093A1000C93C1001093E100149001001CFB
+S315200284804BFFDAF92C830000408600283D20002885
+S315200284903FA00023806987C8389D85144BFF71B998
+S315200284A03D200028806987E8389D85144BFF71A9F5
+S315200284B08001001C7C0803A683A1000C83C1001046
+S315200284C083E10014382100184E8000209421FFE811
+S315200284D07C0802A693A1000C93C1001093E100141C
+S315200284E09001001C7C7D1B787C9E23784BFFFEAD81
+S315200284F07C7F1B794082000C3860FFFF480000FC1D
+S3152002850093FE0000801F0034901E0004801F00404E
+S31520028510901E0008801F003C901E000C801F003811
+S31520028520901E0010801F0074901E0014801F0140B0
+S31520028530901E0018801F007C901E0020801F00784D
+S31520028540901E001C801F0080901E0024801F003871
+S31520028550700901004182000C817F007C48000020C6
+S31520028560817F007C880B00002C8000EE4086001064
+S315200285708C0B00012C8000EE4186FFF8813F007CA7
+S31520028580801F00787C090050901E0028801F0078EA
+S315200285907C0B0050901E0030801F007C813E00180C
+S315200285A07C005850901E0034801F00787FA3EB7801
+S315200285B07C090050901E002C4BFEC0F9907E00389C
+S315200285C0801F003C70000004418200283D200028C4
+S315200285D08129CCA4800900287C0803A6387F0010B4
+S315200285E0388000014E800021907E003C4800000821
+S315200285F0901E003C386000008001001C7C0803A607
+S3152002860083A1000C83C1001083E1001438210018D5
+S315200286104E8000209421F6D87C0802A69381091860
+S3152002862093A1091C93C1092093E109249001092CE5
+S315200286307C9E23784BFF3A152C9E00017C7F1B786B
+S3152002864041860038418501482C9E00004086014023
+S31520028650388100084BFFFE792C83000040860030CB
+S315200286603C6000283863886C4BFF3F553861000810
+S31520028670480001AD480001847FE3FB783881000879
+S315200286804BFFFE4D2C830000418600183C600027DC
+S315200286903863460C4BFF3F993860FFFF4800016064
+S315200286A07FE3FB78388108184800061D3C600028C5
+S315200286B03863886C4BFF3F09386100084800016126
+S315200286C03C6000278081002480A1002C80C10030DC
+S315200286D0386346204BFF3EE98001001870090100ED
+S315200286E04182001C3C600027386346503C800027AC
+S315200286F0388446687C852378480000143C6000272D
+S315200287008081003880A1003C3863466C4BFF3EB125
+S315200287103C600027386346848081001838A10818F7
+S315200287204BFF3E9D4BFFFBFD7C9F18004186002898
+S315200287307FE3FB78480002E53D20002880099C184B
+S315200287402C800000418600107C0803A67FE3FB787C
+S315200287504E8000213FC00028801E9B482C800000AE
+S31520028760418600987FE3FB784BFFFC317C631B79C3
+S3152002877041820088801E9B487C0803A63863011824
+S31520028780388000004E800021480000703C6000289E
+S315200287903863886C4BFF3E293BA100487FA3EB78C8
+S315200287A0388001F44BFF39357C7C1B787FA3EB782C
+S315200287B07F84E3784800019D3BE000007C9FE00037
+S315200287C0408400383BA100087FBEEB78807D0040C4
+S315200287D07FC4F3784BFFFCF92C8300004086000C03
+S315200287E07FC3F378480000393BFF00017C9FE000FD
+S315200287F03BBD00044184FFD8386000008001092C6B
+S315200288007C0803A68381091883A1091C83C1092038
+S3152002881083E10924382109284E8000209421FE284C
+S315200288207C0802A6938101C893A101CC93C101D0F1
+S3152002883093E101D4900101DC7C7F1B783800000093
+S31520028840900101C0807F0000388100A8480002F113
+S3152002885038000000980100B83C600027809F000481
+S31520028860386346984BFF3D593D20002880099C5489
+S315200288702C800000418600343D20002880699A24FD
+S315200288802C83000041860024809F001438A100B862
+S3152002889038C101C07C0803A638E101C439000005AD
+S315200288A0392000054E800021809F0014800101C0DE
+S315200288B07C840000408600143C600027386346A46E
+S315200288C0388100B84800000C3C600027386346B067
+S315200288D04BFF3CED807F0000388100084BFF35B509
+S315200288E083BF0000839F00084BFFFA39801F0000D8
+S315200288F07C8300003BC100A84186000C80E10094E5
+S315200289004800000C3D20002338E9871C3C600027E4
+S31520028910386346B87FA4EB787F85E3788101000C23
+S31520028920813F0038815F003C7FC6F3784BFF3C9144
+S31520028930800101DC7C0803A6838101C883A101CCC6
+S3152002894083C101D083E101D4382101D84E80002091
+S315200289509421FFD87C0802A6936100149381001803
+S3152002896093A1001C93C1002093E100249001002CC6
+S315200289702C8400007C7D1B785484103A7F7D22143F
+S3152002898041860074807D0000388100083BFD00048A
+S315200289904BFFF1097C9FD8403B8000004084005069
+S315200289A07FBEEB78807F00003881000C4BFFF0ED14
+S315200289B0812100088001000C7C8900004085001876
+S315200289C03B800001801E0000813F0000901F0000B6
+S315200289D0913E00003BFF00047C9FD8408001000CA2
+S315200289E03BDE0004900100084184FFBC2C9C000061
+S315200289F04086FF948001002C7C0803A68361001424
+S31520028A008381001883A1001C83C1002083E10024F6
+S31520028A10382100284E8000209421FF487C0802A697
+S31520028A20938100A893A100AC93C100B093E100B456
+S31520028A30900100BC3D20002880099AF82C80000075
+S31520028A407C7F1B78418600107C0803A64E8000217D
+S31520028A50480000CC7FE3FB78388100084BFF343591
+S31520028A602C83FFFF408600183C600027386346DCD3
+S31520028A707FE4FB784BFF3B49480000A43BC0000043
+S31520028A803D200028392995307C09F02E2C800000C3
+S31520028A90418600803FA000273B8100087D3F4B781E
+S31520028AA073C00003408200143C60002738634700ED
+S31520028AB04BFF3B0D480000143C60002738634704F7
+S31520028AC0389D47084BFF3AF9809F00008804000032
+S31520028AD02C8000004186001C3D200028801F0004B7
+S31520028AE0806988687CBC002E4BFF3AD5480000146A
+S31520028AF03C6000273863470C389D47084BFF3AC134
+S31520028B00841F00082C8000003BDE00014086FF9473
+S31520028B103C600027386347004BFF3AA5800100BC22
+S31520028B207C0803A6838100A883A100AC83C100B080
+S31520028B3083E100B4382100B84E8000209421FFF052
+S31520028B407C0802A693C1000893E1000C9001001450
+S31520028B507C9F23784BFFF8457C7E1B794082000C54
+S31520028B603860FFFF4800014880BE003C2885000887
+S31520028B70418501003D20002339298A9854A0103AC4
+S31520028B807C09002E3D20002339298A987C004A142C
+S31520028B907C0903A64E80042000000024000000B0B9
+S31520028BA00000006000000088000000380000004C31
+S31520028BB0000000740000009C000000C47FE3FB78E4
+S31520028BC03C800027388447144BFEAB61480000BC2A
+S31520028BD07FE3FB783C8000273884471C4BFEAB4D55
+S31520028BE0480000A87FE3FB783C800027388447248E
+S31520028BF04BFEAB39480000947FE3FB783C8000278C
+S31520028C003884472C4BFEAB25480000807FE3FB7857
+S31520028C103C800027388447344BFEAB114800006C59
+S31520028C207FE3FB783C8000273884473C4BFEAAFD35
+S31520028C30480000587FE3FB783C800027388447446D
+S31520028C404BFEAAE9480000447FE3FB783C800027DC
+S31520028C50388447504BFEAAD5480000307FE3FB7884
+S31520028C603C800027388447584BFEAAC14800001C86
+S31520028C707FE3FB783C800027388447604BFF3DA585
+S31520028C803860FFFF48000028801E0040813E0044D5
+S31520028C907C804800418600147FE3FB783C800027D5
+S31520028CA0388447684BFEA9F1386000008001001421
+S31520028CB07C0803A683C1000883E1000C382100103A
+S31520028CC04E8000209421FFF07C0802A693C1000862
+S31520028CD093E1000C900100147C9E23784BFFF6BD95
+S31520028CE07C7F1B794082000C3860FFFF4800010C14
+S31520028CF038000000981E0000801F0038700900010D
+S31520028D00418200147FC3F3783C8000273884476C65
+S31520028D104BFEA985801F003870090002418200148B
+S31520028D207FC3F3783C800027388447844BFEA969A9
+S31520028D30801F003870090004418200147FC3F37833
+S31520028D403C8000273884479C4BFEA94D801F003863
+S31520028D5070090008418200147FC3F3783C80002703
+S31520028D60388447B44BFEA931801F003870090010A1
+S31520028D70418200147FC3F3783C800027388447CC95
+S31520028D804BFEA915801F003870090020418200146D
+S31520028D907FC3F3783C800027388447E44BFEA8F94A
+S31520028DA0801F003870090040418200147FC3F37887
+S31520028DB03C800027388447FC4BFEA8DD801F003804
+S31520028DC070090080418200147FC3F3783C8000271B
+S31520028DD0388448144BFEA8C1801F00387009010050
+S31520028DE0418200147FC3F3783C8000273884482CC4
+S31520028DF04BFEA8A538600000800100147C0803A65B
+S31520028E0083C1000883E1000C382100104E80002027
+S31520028E109421FFF07C0802A693E1000C9001001435
+S31520028E203D20002880098B542C8000004186007842
+S31520028E303FE010003D20002880099C0063FF0001CE
+S31520028E407C00F8387C80F800408600183D200028F7
+S31520028E5080099BA87C0803A63860003B4E8000212F
+S31520028E603D20002880099B607C00F8387C80F80031
+S31520028E70408600343860003B3D20002880099B5004
+S31520028E803880000038A0000038C0000038E000001A
+S31520028E907C0803A639000000392000003940000072
+S31520028EA04E8000213D20002880099B202C80000036
+S31520028EB0418600143C6000233863B32C480036E513
+S31520028EC0480000143800000190099B2048002561C3
+S31520028ED048005261800100147C0803A683E1000C3D
+S31520028EE0382100104E8000203D20002890699AFCEF
+S31520028EF04E8000203D20002880699AFC4E8000206A
+S31520028F009421FFF87C0802A69001000C3D2000283F
+S31520028F10800989302C8000004086009C3D20002854
+S31520028F20806989103880004838A000003CC00023A0
+S31520028F3038C692003CE0002338E78ED43D00002359
+S31520028F403908945C4BFF66792C83000040860068C2
+S31520028F50386000C84BFF853D3D20002890699B085C
+S31520028F60480000757C631B794182000C3860FFFF44
+S31520028F70480000543D20002890699B1C3D20002873
+S31520028F8090699B103D20002890699B0C3D2000286B
+S31520028F903929CEB839600000380000C47D69012E17
+S31520028FA03400FFFC4080FFF83D20002838000001F5
+S31520028FB0900989303D200028806989303063FFFF7F
+S31520028FC07C6319108001000C7C0803A63821000856
+S31520028FD04E8000203D20002880099B082C8000001E
+S31520028FE04086000C3860FFFF4E8000207C0B037801
+S31520028FF038000000392000C47C09592E3529FFFC8F
+S315200290004080FFF83D6000283D20002339299DB489
+S31520029010912B9B50386000004E8000209421FFD86F
+S315200290207C0802A69001002C3D2000288009893464
+S315200290302C800001418600803D200028800989304D
+S315200290402C800000408600184BFFFEB92C830000BE
+S315200290504186000C3860FFFF48000060380000009F
+S31520029060900100089001000C90010010900100145C
+S31520029070900100189001001C900100203C600027FE
+S31520029080386348443880006438A0000238C008009B
+S315200290903CE0002338E79CA8390000003920000074
+S315200290A0394000004BFFCF713D20002838000001D7
+S315200290B090098934386000008001002C7C0803A6C0
+S315200290C0382100284E8000209421FFF07C0802A639
+S315200290D093C1000893E1000C900100143D20002862
+S315200290E0800989302C800000408600104BFFFE1537
+S315200290F02C830000408600643D20002888098B5777
+S315200291002C80000140860008480006653FC00028E2
+S31520029110801E89342C8000014186000C38600000B4
+S31520029120480000783C600027386348444BFF2E7184
+S315200291304BFFD70D2C83FFFF418600203D200028C0
+S3152002914080699B143BE0000093FE89344BFFBA955D
+S315200291502C83FFFF4086000C3860FFFF4800003C4E
+S315200291603D20002893E99B1C3D20002893E99B1073
+S315200291703D20002893E99B0C3D2000283929CEB8B2
+S3152002918039600000380000C47D69012E3400FFFCDE
+S315200291904080FFF84BFFFE89800100147C0803A65D
+S315200291A083C1000883E1000C382100104E80002084
+S315200291B05463043E2C8300307C691B784086000C65
+S315200291C0386000054E8000203803FFCE2880022515
+S315200291D04185000C386000004E8000203803FDA82F
+S315200291E0288024B74185000C386000014E8000207B
+S315200291F03803D8F02880270F4185000C38600002FA
+S315200292004E80002039600000616B9C3F7C83584071
+S315200292104085000C386000034E8000203869FF9A92
+S31520029220206301F17C631910606300044E800020E4
+S315200292309421FFB07C0802A692E1002C9301003013
+S3152002924093210034934100389361003C938100407E
+S3152002925093A1004493C1004893E1004C900100542D
+S315200292607C641B783964000484AB000484CB00043C
+S3152002927084EB0004850B0004852B0004854B000437
+S31520029280876B0004874B0004872B0004870B00049E
+S3152002929086EB000480640000878B0004808400042F
+S315200292A087AB0004800B0004936100089341000CF5
+S315200292B0932100109301001492E100189381001C5F
+S315200292C093A1002090010024480000398001005417
+S315200292D07C0803A682E1002C83010030832100341E
+S315200292E0834100388361003C8381004083A100448E
+S315200292F083C1004883E1004C382100504E80002073
+S315200293009421FFB07C0802A691C1000891E1000CCD
+S315200293109201001092210014924100189261001CC1
+S315200293209281002092A1002492C1002892E1002C71
+S315200293309301003093210034934100389361003C1D
+S315200293409381004093A1004493C1004893E1004CCD
+S31520029350900100547C9A23787CB72B787CD633787C
+S315200293607CF83B787D1B43787D3E4B787D5C537839
+S315200293703D2000285479043E88098B578281005863
+S315200293808261005C82410060822100648201006861
+S315200293902C80000181C1006C82A1007081E10074E1
+S315200293A0418600343D200028800989302C80000027
+S315200293B0408600104BFFFB4D2C8300004086001890
+S315200293C03FA00028807D89104BFF997D7C7F1B79E9
+S315200293D04082000C386000004800012C809D8910D4
+S315200293E07FE3FB784BFF9A152C9B0001B33F0004C9
+S315200293F0937F0020408600382C9E000193DF0024B4
+S315200294004186001C418500102C9E000041860010DA
+S31520029410480000102C9E000240860008939F0028D8
+S31520029420929F002C927F0030480000183800FFFFE0
+S31520029430901F0024901F0028901F002C901F0030A0
+S31520029440931F001492FF000C92DF0010925F000817
+S31520029450923F0018921F003492BF004091DF0038DD
+S3152002946091FF003CB35F00062C95000038000000F7
+S31520029470901F0044901F001C418600183D200028A2
+S31520029480800989342C800000408600084BFFFB911E
+S315200294902C9A0001408600143D20002880099B70EA
+S315200294A03000000190099B707F23CB784BFFFD058E
+S315200294B03D2000285463103A3D60002881099B080C
+S315200294C03D20002839298918800B9B607D43402E38
+S315200294D07D23482E2C8A00007C004B78900B9B60C3
+S315200294E0408600107FE3412E48000018814A001C66
+S315200294F0800A001C2C8000004086FFF493EA001CA0
+S315200295007FE3FB78800100547C0803A681C1000812
+S3152002951081E1000C82010010822100148241001890
+S315200295208261001C8281002082A1002482C100283F
+S3152002953082E1002C830100308321003483410038EC
+S315200295408361003C8381004083A1004483C100489B
+S3152002955083E1004C382100504E8000209421FFE800
+S315200295607C0802A69381000893A1000C93C10010E7
+S3152002957093E100149001001C7C7E1B794182003C01
+S315200295803D200028817E0000812989107C8B48009D
+S31520029590418600302C8B0000418600108009002471
+S315200295A07C8B00004186001C4BFEB0F13C00003D46
+S315200295B060000001900300003860FFFF48000104AC
+S315200295C0A01E00062C800001408600203D20002897
+S315200295D080099B703000FFFF2C80000090099B7051
+S315200295E040860008480001897FC3F3784BFF982103
+S315200295F0A07E00044BFFFBBD3F800028813C9B08D8
+S31520029600547D103A7FFD482E2C9F00004186FFACE8
+S315200296107C9FF000408600543800000083FE001C28
+S31520029620901E001C3D200028806989107FC4F37893
+S315200296304BFF973D2C9F0000813C9B087FFD492EC6
+S315200296404086007C3D6000283D2000283929891863
+S315200296507C1D482E812B9B607D200078900B9B6081
+S315200296604800010D48000058801F001C2C80000075
+S315200296704186FF48801F001C7C80F0004186001432
+S315200296807C1F0378801F001C2C8000004086FFE888
+S31520029690817F001C2C8B00004186FF207FC4F3783B
+S315200296A03D200028800B001C80698910901F001C19
+S315200296B0380000009004001C4BFF96B5386000006D
+S315200296C08001001C7C0803A68381000883A1000C6C
+S315200296D083C1001083E10014382100184E80002037
+S315200296E09421FFF87C0802A69001000C3D20002858
+S315200296F088098B572C800001418600603D20002876
+S3152002970080099B602C800000418600503D20002865
+S31520029710800989302C800000408600104BFFF7E537
+S315200297202C830000408600344BFF65393D400028DB
+S315200297303D600028812A8B54800B9B6061290001A1
+S31520029740912A8B5464001000900B9B604BFF652975
+S3152002975038600000480000083860FFFF8001000CD6
+S315200297607C0803A6382100084E8000209421FFF0B1
+S315200297707C0802A693E1000C900100143FE0002829
+S31520029780801F8B545400063E2C8000014086002800
+S315200297904BFF64D13D600028812B9B60801F8B5438
+S315200297A055290104912B9B605400003C901F8B5439
+S315200297B04BFF64C5800100147C0803A683E1000CDC
+S315200297C0382100104E8000207C631B794082000CD9
+S315200297D03860FFFF4E800020A00300062C80000187
+S315200297E04186001C3D20002880099B7039600001BB
+S315200297F0B16300063000000190099B7038600000BA
+S315200298004E8000209421FFF07C0802A693E1000CF2
+S31520029810900100147C7F1B794082000C3860FFFF88
+S315200298204800005C4BFF643DA01F00062C80000010
+S31520029830408600104BFF64413860FFFF480000401D
+S3152002984038000000B01F00064BFF642D3D20002883
+S3152002985080099B703000FFFF2C80000090099B70CE
+S31520029860408600183D20002888098B572C8000014D
+S31520029870408600084BFFFEF9386000008001001484
+S315200298807C0803A683E1000C382100104E800020BC
+S315200298907C631B794082000C3860FFFF4E800020DB
+S315200298A0800300183120FFFF7C0901103164FFFF7D
+S315200298B07D2B21107C0B48394082001090830018A2
+S315200298C0386000004E8000203860FFFF4E80002066
+S315200298D07C6B1B78800B000C28800005418500D804
+S315200298E03D200023392998045400103A7C09002E81
+S315200298F03D200023392998047C004A147C0903A6BA
+S315200299004E800420000000180000006C0000002C8D
+S315200299100000009800000098000000203860000136
+S315200299204E8000203D20002880699B204E8000200A
+S315200299303D20002880099B202C80000038600000F2
+S315200299404C8600203D200028800983042C800000BC
+S315200299504D8500203D200028816B001080099AF455
+S315200299607D630278212300007C6919144E80002031
+S315200299703D20002880099B202C80000038600000B2
+S315200299804C8600203D200028800983043120FFFFD9
+S315200299907C004B7854030FFE4E8000203D20002889
+S315200299A0800983047C03FE707C60185054630FFE8A
+S315200299B04E800020386000004E8000209421FFE86F
+S315200299C07C0802A693A1000C93C1001093E1001417
+S315200299D09001001C7C7E1B787C9F23784BFF62853E
+S315200299E0801E002C288000077C7D1B784185033849
+S315200299F03D200023392999145400103A7C09002E5F
+S31520029A003D200023392999147C004A147C0903A697
+S31520029A104E80042000000020000000A40000015017
+S31520029A2000000208000000F8000001A800000268F9
+S31520029A30000002B8801E00242C80000141860020EE
+S31520029A40418500102C80000041860034480002D84F
+S31520029A502C80000241860048480002CC813E002824
+S31520029A60801E0030812900007FA3EB787D3F02789B
+S31520029A70217F00007FEBF914480002A0801E0028F7
+S31520029A807C0803A64E800021801E00307C7F02784F
+S31520029A90213F00007FE9F9144800027C801E00283D
+S31520029AA07C0803A6809E00307FE3FB784E8000214F
+S31520029AB07C7F1B7848000260801E00242C800000D8
+S31520029AC04186002C2C8000014086025C813E0028C3
+S31520029AD080090000813E00307FA3EB787C004A7823
+S31520029AE03120FFFF7FE9011048000230801E002846
+S31520029AF07C0803A64E800021801E00307C630278FB
+S31520029B003003FFFF7FE019104800020C801E00245C
+S31520029B102C8000004186002C2C8000014086020801
+S31520029B20813E0028801E0030812900007C890000A9
+S31520029B307FA3EB787FE0002657FF37FE480001DC43
+S31520029B40801E00287C0803A64E800021801E00303D
+S31520029B507C8300007FA3EB787FE0002657FF37FE49
+S31520029B60480001B8801E00242C8000004186002C6B
+S31520029B702C800001408601B0813E0028801E0030E4
+S31520029B80812900007C8900007FA3EB787FE00026F4
+S31520029B9057FF2FFE48000184801E00287C0803A65A
+S31520029BA04E800021801E00307C8300007FA3EB784C
+S31520029BB07FE0002657FF2FFE48000160801E00240A
+S31520029BC02C800000418600302C80000140860158FE
+S31520029BD0813E0028801E0030812900007C890000F9
+S31520029BE07FA3EB784CE62B827FE0002657FF47FEC9
+S31520029BF048000128801E00287C0803A64E800021EA
+S31520029C00801E00307C8300007FA3EB784CE62B82FB
+S31520029C107FE0002657FF47FE48000100801E0024F1
+S31520029C202C800000418600302C800001408600F8FE
+S31520029C30813E0028801E0030812900007C89000098
+S31520029C407FA3EB784CE623827FE0002657FF47FE70
+S31520029C50480000C8801E00287C0803A64E800021EA
+S31520029C60801E00307C8300007FA3EB784CE62382A3
+S31520029C707FE0002657FF47FE480000A0801E0024F2
+S31520029C802C8000004186001C2C8000014086009812
+S31520029C90813E0028800900002C8000004800001424
+S31520029CA0801E00287C0803A64E8000212C830000FB
+S31520029CB03BE0000040860010801E00302C80000011
+S31520029CC0418600543BE000014800004C801E0024DF
+S31520029CD02C8000004186001C2C8000014086004812
+S31520029CE0813E0028800900002C80000048000014D4
+S31520029CF0801E00287C0803A64E8000212C830000AB
+S31520029D003BE0000041860010801E00303120FFFF1C
+S31520029D107FE901107FA3EB784BFF5F5D7FE3FB7842
+S31520029D20480000107FA3EB784BFF5F4D38600000A0
+S31520029D308001001C7C0803A683A1000C83C10010AD
+S31520029D4083E10014382100184E8000209421FFF868
+S31520029D507C0802A69001000C800300342C800003AC
+S31520029D60418500382C800001418400308003003870
+S31520029D702C800000418600248063003C2C83000056
+S31520029D80418600107C0803A64E8000214800000C64
+S31520029D907C0803A64E8000218001000C7C0803A6C5
+S31520029DA0382100084E8000209421FFE87C0802A674
+S31520029DB093A1000C93C1001093E100149001001CA2
+S31520029DC038600000388000004BFF9BE52C830000A2
+S31520029DD03D20002890699B144086000C3860FFFFC6
+S31520029DE0480000B83D20002880699B143880FFFF78
+S31520029DF04BFFAB453FE00028801F9B1C2C800000B8
+S31520029E00418600303C600027386348503880000085
+S31520029E1038A0000038C0000038E0000039000000F9
+S31520029E20392000004BFECF5138000000901F9B1CAA
+S31520029E303FE000283D2000283BA9CEB83BC00000C9
+S31520029E40817F9B105560103A7C7D002E2C8300006A
+S31520029E50418600184BFFFEF9801F9B105400103AD2
+S31520029E607FDD012E480000143D20002880099B0C2E
+S31520029E707C8B00004186FF70801F9B10288000305B
+S31520029E804085000C93DF9B104BFFFFB8300000018A
+S31520029E90901F9B104BFFFFAC8001001C7C0803A681
+S31520029EA083A1000C83C1001083E10014382100181D
+S31520029EB04E8000209421FFC87C0802A692A1000CA5
+S31520029EC092C1001092E10014930100189321001C04
+S31520029ED093410020936100249381002893A1002CB2
+S31520029EE093C1003093E100349001003C7C962378A4
+S31520029EF07CBD2B785477043E3B0000003D20002891
+S31520029F0081699B0856C9103A7FE9582E3C001000F9
+S31520029F10600001007C960000408600103D2000284B
+S31520029F203800001490099B182C9F00004186027865
+S31520029F303D2000233AA99EEC3F4000283F6000289E
+S31520029F403F8000283D2000283B29CEB83D2000280E
+S31520029F50817F0000812989107C8B48004186002C54
+S31520029F602C8B000041860010800900247C8B000087
+S31520029F70418600184BFEA7253C00003D60000001EB
+S31520029F809003000048000214A01F00062C80000146
+S31520029F9040860208A01F00042C8000304186000C57
+S31520029FA07C80B800408601F4801F00142C800000BB
+S31520029FB0418600142C9D00004186000C7C9D0000E9
+S31520029FC0408601D8801F000C28800005418501CCDF
+S31520029FD05400103A7C15002E3D20002339299EEC90
+S31520029FE07C004A147C0903A64E80042000000080CF
+S31520029FF000000058000000280000007400000074D1
+S3152002A00000000018801A9B202C80000040860060E9
+S3152002A01048000188801A9B202C8000004086017C03
+S3152002A020801B83042C800000418501703D2000287E
+S3152002A030817F001080099AF47C8B000041860030D3
+S3152002A04048000158801A9B202C8000004086014C33
+S3152002A050801B83042C800000408500144800013CAC
+S3152002A060801B83042C80000040850130801F002045
+S3152002A0702C80000140860024801F00282C800000AE
+S3152002A080418600187FE3FB787FA4EB784BFFF931FA
+S3152002A0902C830000418601044BFF5BC9801F000808
+S3152002A0A02C8000017C7E1B78408600207FE3FB7893
+S3152002A0B04BFFF7552C83FFFF408600107FC3F378B2
+S3152002A0C04BFF5BB5480000D47FC3F3784BFF5BA9F7
+S3152002A0D0813F0034801F00442C890000300000019B
+S3152002A0E0901F004441860090801F00402C80000073
+S3152002A0F0408600107FE3FB784BFFFC554800007832
+S3152002A1004BFF5B61801C9B0C5409103A7D69C82E5B
+S3152002A1102C8B00007C7E1B78408600242880003011
+S3152002A1207FE9C92E4085000C917C9B0C4800002CAF
+S3152002A13030000001901C9B0C480000203D20002886
+S3152002A1403800000190099B1C4BFFF6257FC3F3784C
+S3152002A1504BFF5B25480000787FC3F3784BFF5B19E2
+S3152002A1603D20002880899B143C60002238633E6C87
+S3152002A170480024C5807F00182C8300004186001CDD
+S3152002A1804BFFF6493D20002888098B572C80000179
+S3152002A190418600084BFFF54D83FF001C2C9F0000D3
+S3152002A1A04086FDAC2C980000408600243D200028E5
+S3152002A1B081299B08806900142C83000041860010A7
+S3152002A1C03B0000017C7F1B784BFFFD448001003C55
+S3152002A1D07C0803A682A1000C82C1001082E1001431
+S3152002A1E0830100188321001C8341002083610024FF
+S3152002A1F08381002883A1002C83C1003083E10034AF
+S3152002A200382100384E8000209421FF507C0802A677
+S3152002A21093C100A893E100AC900100B47C7F1B7827
+S3152002A2207C9E2378388100084BFF1C6980010094AC
+S3152002A2303D20002539296C6C7C8048004086003000
+S3152002A240801F00742C800000418600247C80F00050
+S3152002A2504086001C3C60002238636FE07FE4FB7876
+S3152002A260480023D538600001480000083860000005
+S3152002A270800100B47C0803A683C100A883E100AC58
+S3152002A280382100B04E8000209421FFF87C0802A6D7
+S3152002A2909001000C3880000338A0000038C000006E
+S3152002A2A038E0000039000000392000003940000063
+S3152002A2B04BFFFC058001000C7C0803A63821000810
+S3152002A2C04E8000209421FFE87C0802A693A1000C70
+S3152002A2D093C1001093E100149001001C3FC0002896
+S3152002A2E0801E89402C800000408600643FE00028C2
+S3152002A2F0807F89383880002038A000003CC00023A7
+S3152002A30038C6A2783CE0002338E7A3C03D000023EC
+S3152002A3103908A4904BFF52A92C83000040860030B6
+S3152002A3203FA00028807F8938809D893C9083002425
+S3152002A3304BFF54993D20002839600001815D893CFC
+S3152002A34080099B68917E8940900A00303D20002832
+S3152002A350806989403063FFFF7C6319108001001CED
+S3152002A3607C0803A683A1000C83C1001083E100149C
+S3152002A370382100184E8000209421FFF07C0802A686
+S3152002A38093C1000893E1000C900100143D2000289F
+S3152002A390800989402C800000408600184BFFFF2947
+S3152002A3A02C8300004186000C38600000480000FC27
+S3152002A3B03FC00028807E89384BFF898D7C7F1B79A0
+S3152002A3C0418200287FE3FB78480000F92C830000B5
+S3152002A3D041860018807E89387FE4FB784BFF89917D
+S3152002A3E038600000480000C44BFF58793D20002801
+S3152002A3F080098B542C8000007C7E1B78418600A02D
+S3152002A4003D6010003D20002880099C00616B0007FA
+S3152002A4107C0058387C805800408600382C9F0000EB
+S3152002A42041860010813F0000800900304800000864
+S3152002A430380000002C800000418600187C0803A604
+S3152002A44038602720388000017FE5FB784E80002186
+S3152002A4503D6010003D20002880099B60616B010051
+S3152002A4607C0058387C80580040860034386027208B
+S3152002A470388000027FE5FB783D20002880099B502A
+S3152002A4807FE6FB7838E000007C0803A6390000004E
+S3152002A49039200000394000004E8000217FC3F37826
+S3152002A4A04BFF57D57FE3FB78800100147C0803A677
+S3152002A4B083C1000883E1000C382100104E80002061
+S3152002A4C09421FFF07C0802A693E1000C900100146F
+S3152002A4D03D200028800989402C8000007C7F1B7843
+S3152002A4E0408600184BFFFDE12C8300004186000CBC
+S3152002A4F03860FFFF480000403D20002880099C4C20
+S3152002A5002C80000038000000B01F0014B01F001677
+S3152002A510418600103D2000288089893C4800000C95
+S3152002A5203D200028808989387FE3FB784BFF88CD40
+S3152002A53038600000800100147C0803A683E1000C29
+S3152002A540382100104E8000209421FFF87C0802A6B4
+S3152002A5509001000C38800001480000398001000C6F
+S3152002A5607C0803A6382100084E8000209421FFF89B
+S3152002A5707C0802A69001000C3880000048000015D5
+S3152002A5808001000C7C0803A6382100084E8000209A
+S3152002A5909421FFE87C0802A693A1000C93C1001027
+S3152002A5A093E100149001001C3D20002880098304B9
+S3152002A5B02C8000007C7F1B787C9D23784085001CA4
+S3152002A5C04BFEA0D93C00004360000001900300002E
+S3152002A5D03860FFFF480002684BFF56893D2000285D
+S3152002A5E0817F0000812989387C8B48007C7E1B78FC
+S3152002A5F0418600382C8B00004186001080090024F9
+S3152002A6007C8B0000418600244BFEA0913C00003D3D
+S3152002A61060000001900300007FC3F3784BFF565978
+S3152002A6203860FFFF480002183D20002880098B541D
+S3152002A6302C800000418600A03D6010003D200028AD
+S3152002A64080099C00616B00077C0058387C8058008A
+S3152002A650408600382C9F000041860010813F000072
+S3152002A6608009003048000008380000002C800000D5
+S3152002A670418600187C0803A638602721388000010D
+S3152002A6807FE5FB784E8000213D6010003D200028AA
+S3152002A69080099B60616B01007C0058387C805800E1
+S3152002A6A04086003438602721388000027FE5FB7817
+S3152002A6B07FE6FB783D600028800B9B5038E0000047
+S3152002A6C07C0803A63900000039200000394000002A
+S3152002A6D04E8000217FE3FB784BFF87353D20002803
+S3152002A6E03800000190099B207FC3F3784BFF5589E0
+S3152002A6F07FE3FB78480015C938000002B01F00141A
+S3152002A7003D20002880098B542C800000418600F8C9
+S3152002A7103D6010003D20002880099C00616B0007E7
+S3152002A7207C0058387C8058004086008C3D200028CA
+S3152002A73081699AF42C8B0000418600543D20002822
+S3152002A740816B0030812987C87C8B48004186002C8A
+S3152002A7502C8B000041860010800900247C8B00008F
+S3152002A760418600184BFE9F353C00003D60000001EB
+S3152002A77090030000480000183D20002881299AF401
+S3152002A7808129003080090030480000083800000086
+S3152002A7902C800000418600203D2000287C0803A64C
+S3152002A7A080A99AF43860271680C500603880000296
+S3152002A7B04E8000213D6010003D20002880099B60CC
+S3152002A7C0616B01007C0058387C8058004086003836
+S3152002A7D03860271638800002390000003D600028C4
+S3152002A7E080AB9AF43D600028800B9B5039200000F4
+S3152002A7F07C0803A63940000080E500607CA62B7801
+S3152002A8004E8000213D20002881299AF4800900608B
+S3152002A8103000000190090060480039192C9D000083
+S3152002A820418600143D200028806989387FE4FB7820
+S3152002A8304BFF853D4BFFD63D386000008001001C52
+S3152002A8407C0803A683A1000C83C1001083E10014B7
+S3152002A850382100184E8000209421FFE07C0802A6B1
+S3152002A8609361000C9381001093A1001493C10018E8
+S3152002A87093E1001C900100247C7F1B787C9E237828
+S3152002A8807CBB2B787CDC33784BFF53D93D200028C8
+S3152002A890817F0000812989387C8B48007C7D1B784A
+S3152002A8A0418600382C8B0000418600108009002446
+S3152002A8B07C8B0000418600244BFE9DE13C00003D3E
+S3152002A8C060000001900300007FA3EB784BFF53A9A1
+S3152002A8D03860FFFF480001403D20002880098B5444
+S3152002A8E02C800000418600A43D6010003D200028F7
+S3152002A8F080099C00616B00077C0058387C805800D8
+S3152002A9004086003C2C9F000041860010813F0000BB
+S3152002A9108009003048000008380000002C80000022
+S3152002A9204186001C386027227C0803A63880000254
+S3152002A9307FE5FB787FC6F3784E8000213D601000CC
+S3152002A9403D20002880099B60616B01007C005838FD
+S3152002A9507C805800408600343860272238800002E6
+S3152002A9607FE5FB787FE6FB783D20002880099B5017
+S3152002A9707FC7F3787C0803A639000000392000003F
+S3152002A980394000004E8000213D20002880099B206E
+S3152002A9902C80000041860038939F001C937F00186C
+S3152002A9A0A01F00167FA3EB7830000001B01F00160F
+S3152002A9B04BFF52C53C6000233863BA407FE4FB78E4
+S3152002A9C07FC5F37848001D21480000483800000161
+S3152002A9D0B01F0016939F001C937F001838000001B9
+S3152002A9E090099B207FA3EB784BFF528D7FE3FB7868
+S3152002A9F07FC4F3784800114D2C8300004186001055
+S3152002AA00480037313860FFFF4800000C48003725E0
+S3152002AA1038600000800100247C0803A68361000CB4
+S3152002AA208381001083A1001483C1001883E1001CD6
+S3152002AA30382100204E8000209421FFF07C0802A6B7
+S3152002AA4093C1000893E1000C900100147C7F1B78CF
+S3152002AA504BFF52113D200028817F00008129893831
+S3152002AA607C8B48007C7E1B78418600382C8B00002C
+S3152002AA7041860010800900247C8B00004186002438
+S3152002AA804BFE9C193C00003D600000019003000033
+S3152002AA907FC3F3784BFF51E13860FFFF480000FC8B
+S3152002AAA03D20002880098B542C800000418600A07E
+S3152002AAB03D6010003D20002880099C00616B000744
+S3152002AAC07C0058387C805800408600382C9F000035
+S3152002AAD041860010813F00008009003048000008AE
+S3152002AAE0380000002C800000418600187C0803A64E
+S3152002AAF038602723388000017FE5FB784E800021CD
+S3152002AB003D6010003D20002880099B60616B01009A
+S3152002AB107C0058387C8058004086003438602723D1
+S3152002AB20388000027FE5FB783D20002880099B5073
+S3152002AB307FE6FB7838E000007C0803A63900000097
+S3152002AB4039200000394000004E8000213D20002897
+S3152002AB5080099B202C800000418600207FC3F37849
+S3152002AB604BFF51153C6000233863BBBC7FE4FB7866
+S3152002AB7048001AC5480000203800000190099B2091
+S3152002AB807FC3F3784BFF50F17FE3FB784800113106
+S3152002AB90480035A138600000800100147C0803A615
+S3152002ABA083C1000883E1000C382100104E8000206A
+S3152002ABB04E8000209421FFF07C0802A693E1000C2F
+S3152002ABC0900100143D20002880098B542C8000001F
+S3152002ABD07C7F1B78418600883D6010003D2000283E
+S3152002ABE080099C00616B00037C0058387C805800E9
+S3152002ABF0408600203D20002880099BDC7C0803A695
+S3152002AC003860025880BF00407FE4FB784E800021E6
+S3152002AC103D6010003D20002880099B60616B00107A
+S3152002AC207C0058387C8058004086003438600258B0
+S3152002AC303880000138A000003D6000287FE6FB78BE
+S3152002AC40800B9B50390000007C0803A639200000A7
+S3152002AC5080FF0040394000004E8000213C600028E1
+S3152002AC603863CCA88123000C800900107C0803A637
+S3152002AC70389F002038A000004E8000218001001459
+S3152002AC807C0803A683E1000C382100104E800020A8
+S3152002AC909421FFF07C0802A693C1000893E1000CE0
+S3152002ACA0900100147C7F1B783BC000003D200028C9
+S3152002ACB080098B542C800000418600843D60100060
+S3152002ACC03D20002880099C00616B00037C005838D7
+S3152002ACD07C8058004086001C3D20002880099B78F5
+S3152002ACE07C0803A6386002597FE4FB784E80002157
+S3152002ACF03D6010003D20002880099B60616B00109A
+S3152002AD007C0058387C8058004086003438600259CE
+S3152002AD10388000013D20002880099B5038A0000081
+S3152002AD207FE6FB7838E000007C0803A639000000A5
+S3152002AD3039200000394000004E800021813F003C2E
+S3152002AD402C890000408600203C6000283863CCB85D
+S3152002AD508123000C800900187C0803A67FE4FB7877
+S3152002AD604800003C71200002418200107FE3FB78FC
+S3152002AD70480016217C7E1B78801F003C7009000447
+S3152002AD80418200203C6000283863CC988123000C45
+S3152002AD90800900187C0803A6389F00104E800021E7
+S3152002ADA0A17F00582C8B00004186002C3D200028D4
+S3152002ADB03929CE407160800041820010800900004E
+S3152002ADC03000FFFF90090000556B0C3D3929000425
+S3152002ADD04082FFE4A17F005A2C8B00004186002C82
+S3152002ADE03D2000283929CE40716080004182001022
+S3152002ADF0800900003000FFFF90090000556B0C3DD2
+S3152002AE00392900044082FFE43C6000283863CCA83C
+S3152002AE108123000C800900187C0803A6389F002095
+S3152002AE204E80002138000008901F003C7FC3F37833
+S3152002AE30800100147C0803A683C1000883E1000C6C
+S3152002AE40382100104E8000209421FFF07C0802A6B3
+S3152002AE5093E1000C900100147C7F1B783D20002892
+S3152002AE6080098B542C800000418600843D601000AE
+S3152002AE703D20002880099C00616B00037C00583825
+S3152002AE807C8058004086001C3D20002880099B7843
+S3152002AE907C0803A63860025A7FE4FB784E800021A4
+S3152002AEA03D6010003D20002880099B60616B0010E8
+S3152002AEB07C0058387C805800408600343860025A1C
+S3152002AEC0388000013D20002880099B5038A00000D0
+S3152002AED07FE6FB7838E000007C0803A639000000F4
+S3152002AEE039200000394000004E800021801F003C9E
+S3152002AEF02C800000408600203C6000283863CCB8B5
+S3152002AF008123000C800900187C0803A67FE4FB78C5
+S3152002AF104E800021801F003C60000001901F003CF3
+S3152002AF20800100147C0803A683E1000C382100105E
+S3152002AF304E8000209421FFF07C0802A693E1000CAB
+S3152002AF40900100147C7F1B783D20002880098B54B9
+S3152002AF502C800000418600843D6010003D200028A0
+S3152002AF6080099C00616B00037C0058387C80580065
+S3152002AF704086001C3D20002880099B787C0803A679
+S3152002AF803860025B7FE4FB784E8000213D60100032
+S3152002AF903D20002880099B60616B00107C00583898
+S3152002AFA07C805800408600343860025B388000017D
+S3152002AFB038A000003D20002880099B507FE6FB78C0
+S3152002AFC038E000007C0803A6390000003920000082
+S3152002AFD0394000004E800021801F003C2C80000159
+S3152002AFE0408600243C6000283863CCB88123000CBC
+S3152002AFF0800900107C0803A680BF00407FE4FB780E
+S3152002B0004E800021801F003C5400003C901F003CD3
+S3152002B010800100147C0803A683E1000C382100106D
+S3152002B0204E8000209421FFF87C0802A69001000C95
+S3152002B03090830044480000158001000C7C0803A67A
+S3152002B040382100084E8000209421FFE07C0802A6C9
+S3152002B050934100089361000C9381001093A1001480
+S3152002B06093C1001893E1001C900100247C7F1B7879
+S3152002B070801F00482C8000007C9E2378408600E8B2
+S3152002B08080BF00407C85F040408400DC3D200028C3
+S3152002B09080098B542C800000418600883D60100078
+S3152002B0A03D20002880099C00616B00037C005838F3
+S3152002B0B07C805800408600203D20002880099BB8CD
+S3152002B0C07C0803A63860025D7FE4FB787FC6F378AE
+S3152002B0D04E8000213D6010003D20002880099B60A3
+S3152002B0E0616B00107C0058387C8058004086003402
+S3152002B0F03860025D3880000138A000007FE6FB78C8
+S3152002B1003D600028800B9B507FC8F3787C0803A6FD
+S3152002B1103920000080FF0040394000004E80002187
+S3152002B120813F003C2C89000093DF004040860010BE
+S3152002B1303C6000283863CCB8480000107120000219
+S3152002B1404182013C807F005C8123000C8009001C27
+S3152002B1507C0803A67FE4FB787FC5F3784E80002126
+S3152002B1604800011C80BF00407C85F04040850110CC
+S3152002B1703F801000639C00033F4000283FA0100040
+S3152002B18063BD00103D2000283B69CCB83D20002835
+S3152002B19080098B542C800000418600743D200028B3
+S3152002B1A080099C007C00E0387C80E0004086001C00
+S3152002B1B0801A9BB87C0803A63860025C7FE4FB7881
+S3152002B1C07FC6F3784E8000213D20002880099B60AF
+S3152002B1D07C00E8387C80E800408600343860025CD7
+S3152002B1E03880000138A000007FE6FB783D60002809
+S3152002B1F0800B9B507FC8F3787C0803A63920000079
+S3152002B20080FF0040394000004E800021813F003CF3
+S3152002B2102C89000093DF004040860024813B000CED
+S3152002B2208009001C7C0803A67F63DB787FE4FB7819
+S3152002B2307FC5F3784E800021480000387120000235
+S3152002B24041820030807F005C8123000C8009001C33
+S3152002B2507C0803A67FE4FB787FC5F3784E80002125
+S3152002B260813F004C2C8900004186000883E90018A2
+S3152002B27080BF00407C85F0404185FF148001002478
+S3152002B2807C0803A6834100088361000C8381001099
+S3152002B29083A1001483C1001883E1001C38210020F9
+S3152002B2A04E8000209421FFF07C0802A693C100085C
+S3152002B2B093E1000C900100147C7E1B783D2000282F
+S3152002B2C080098B542C800000418600843D6010004A
+S3152002B2D03D20002880099C00616B00037C005838C1
+S3152002B2E07C8058004086001C3D20002880099B78DF
+S3152002B2F07C0803A63860025E7FC4F3784E80002164
+S3152002B3003D6010003D20002880099B60616B001083
+S3152002B3107C0058387C805800408600343860025EB3
+S3152002B320388000013D20002880099B5038A000006B
+S3152002B3307FC6F37838E000007C0803A639000000B7
+S3152002B34039200000394000004E800021387E000856
+S3152002B350480010A5881E00042C800001408600B8F3
+S3152002B36083FE00182C9F0000418600AC3D20002859
+S3152002B370817F0030812987C87C8B48004186002C3A
+S3152002B3802C8B000041860010800900247C8B000053
+S3152002B390418600184BFE93053C00003D60000001EB
+S3152002B3A09003000048000070881E000570090008FE
+S3152002B3B041820030801F00483000FFFF2C800000B1
+S3152002B3C0901F00484086001C801F0040809F00443A
+S3152002B3D07C8020004186000C7FE3FB784BFFFC6DCE
+S3152002B3E0881E0005700900044182002C801F00601F
+S3152002B3F03000FFFF2C800000901F0060408600185E
+S3152002B400801F00642C8000004186000C387F006477
+S3152002B41048000C55800100147C0803A683C100084D
+S3152002B42083E1000C382100104E8000209421FFD0A9
+S3152002B4307C0802A692E1000C9301001093210014CD
+S3152002B440934100189361001C9381002093A100244C
+S3152002B45093C1002893E1002C900100343D4000283E
+S3152002B4603D600028812A9B04800B9AFC3929000121
+S3152002B470300000012C800000912A9B04900B9AFC3C
+S3152002B480396B9AFC40860010800B000430000001C4
+S3152002B490900B00043C6000283863CC987C771B789C
+S3152002B4A03F2000283F4000283FE0100063FF0003B2
+S3152002B4B08123000C3F600028800900203FC000281D
+S3152002B4C07C0803A63F801000639C00103F000028E2
+S3152002B4D04E8000218137000C800900247C0803A6B7
+S3152002B4E07EE3BB784E8000217C631B794182026C0D
+S3152002B4F03BA3FFF03D200028817D0030800987C8CC
+S3152002B5007C8B0000418600143D200028800987E8B4
+S3152002B5107C8B00004086018C813D003C552007B87B
+S3152002B5202C800000901D003C4086007880198B54A8
+S3152002B5302C800000418600FC801A9C007C00F83892
+S3152002B5407C80F80040860018801B9B787C0803A626
+S3152002B5503860026A7FA4EB784E800021801E9B60B1
+S3152002B5607C00E0387C80E000408600C83860026AB1
+S3152002B5703880000138A000007FA6EB783D600028C5
+S3152002B580800B9B5038E000007C0803A6390000009F
+S3152002B59039200000394000004E80002148000094E6
+S3152002B5A071200002418200CC80198B542C8000002D
+S3152002B5B041860068801A9C007C00F8387C80F8005E
+S3152002B5C040860018801B9B787C0803A63860027789
+S3152002B5D07FA4EB784E800021801E9B607C00E038A1
+S3152002B5E07C80E00040860034386002773880000193
+S3152002B5F038A000007FA6EB783D600028800B9B5088
+S3152002B60038E000007C0803A639000000392000003B
+S3152002B610394000004E8000217FA3EB7848000D754B
+S3152002B6202C83FFFF4186001C2C8300014086002CC0
+S3152002B6307FA3EB78388000004802B84148000034E6
+S3152002B6407FA3EB783880FFFF4802B8313C000058D0
+S3152002B65060000006480000187FA3EB783880FFFFC1
+S3152002B6604802B8193C00003D60000004901D008489
+S3152002B670801D003C2C8000004086FE5C3C60002839
+S3152002B6803863CCB88123000C800900107C0803A6FD
+S3152002B69080BD00407FA4EB784E8000214BFFFE3810
+S3152002B6A03BA3FFFC80198B542C8000004186006846
+S3152002B6B0801A9C007C00F8387C80F80040860018AE
+S3152002B6C0801B9B787C0803A6386002607FA4EB78F7
+S3152002B6D04E800021801E9B607C00E0387C80E0004A
+S3152002B6E040860034386002603880000138A00000AD
+S3152002B6F07FA6EB783D600028800B9B5038E0000047
+S3152002B7007C0803A6390000003920000039400000D9
+S3152002B7104E80002138000000B01D001480188304DA
+S3152002B720A13D0016807D001C2C89000030000001FE
+S3152002B73090188304801D00184086000C7C0803A6FE
+S3152002B7404E800021801883043000FFFF9018830466
+S3152002B750480010554BFFFD803D20002880099ABCE9
+S3152002B7602C800000418601143D20002881699AF42C
+S3152002B770800B00502C80000040860100800B003C8C
+S3152002B7802C800000408600F43D200028800B0054C7
+S3152002B79081299AAC300000017C804840900B0054ED
+S3152002B7A0418400D83D20002880098B542C8000003B
+S3152002B7B0418600803D6010003D20002880099C00C3
+S3152002B7C0616B00037C0058387C8058004086001844
+S3152002B7D03D20002880099C247C0803A63860025F4D
+S3152002B7E04E8000213D6010003D20002880099B608C
+S3152002B7F0616B00107C0058387C80580040860034EB
+S3152002B8003860025F3880000138A0000038C000008E
+S3152002B8103D600028800B9B5038E000007C0803A680
+S3152002B8203900000039200000394000004E800021F6
+S3152002B8303F800028380000003FA00028809C9AF410
+S3152002B8403BBDCCB890040054813D000C8009001801
+S3152002B8507C0803A67FA3EB784E8000217FA3EB789A
+S3152002B8608123000C80090010809C9AF47C0803A690
+S3152002B87080A400404E800021800100347C0803A66B
+S3152002B88082E1000C830100108321001483410018F9
+S3152002B8908361001C8381002083A1002483C10028A8
+S3152002B8A083E1002C382100304E8000209421FFE8CD
+S3152002B8B07C0802A693A1000C93C1001093E1001408
+S3152002B8C09001001C7C7F1B783D20002880098B5428
+S3152002B8D02C800000418600843D6010003D20002817
+S3152002B8E080099C00616B00037C0058387C805800DC
+S3152002B8F04086001C3D20002880099B787C0803A6F0
+S3152002B900386002617FE4FB784E8000213D601000A2
+S3152002B9103D20002880099B60616B00107C0058380E
+S3152002B9207C805800408600343860026138800001ED
+S3152002B93038A000003D20002880099B507FE6FB7836
+S3152002B94038E000007C0803A63900000039200000F8
+S3152002B950394000004E8000213C6000283863CCB874
+S3152002B9608123000C800900187C0803A63FA000282A
+S3152002B970809D9AF44E8000213FC00028809E9B0421
+S3152002B9807C04FA147C8020404084002C3C600028F1
+S3152002B9903863CC988123000C8009002C7C0803A6EE
+S3152002B9A07C8420F8388400014E8000213800000073
+S3152002B9B0901E9B043C6000283863CC988123000C9F
+S3152002B9C080090010809D9AF47C0803A680BE9B0401
+S3152002B9D0388400107CBF2A144E800021813D9AF4BF
+S3152002B9E08009003C38600000600000049009003C99
+S3152002B9F08001001C7C0803A683A1000C83C10010D1
+S3152002BA0083E10014382100184E8000209421FFF093
+S3152002BA107C0802A693E1000C900100147C7F1B781F
+S3152002BA20801F003C70090004418201003D2000284D
+S3152002BA3080098B542C800000418600843D601000D2
+S3152002BA403D20002880099C00616B00037C00583849
+S3152002BA507C8058004086001C3D20002880099B7867
+S3152002BA607C0803A6386002627FE4FB784E800021C0
+S3152002BA703D6010003D20002880099B60616B00100C
+S3152002BA807C0058387C805800408600343860026238
+S3152002BA903880000138A000003D20002880099B50F4
+S3152002BAA07FE6FB7838E000007C0803A63900000018
+S3152002BAB039200000394000004E8000213C600028D9
+S3152002BAC0801F003C3863CC98540007B8901F003C76
+S3152002BAD08123000C800900187C0803A6389F0010D9
+S3152002BAE04E8000217FE3FB783880FFFF4802B38D2A
+S3152002BAF0801F003C2C8000003C0000036000006C8C
+S3152002BB00901F0084408600243C6000283863CCB80D
+S3152002BB108123000C800900107C0803A680BF004008
+S3152002BB207FE4FB784E8000213860000080010014FB
+S3152002BB307C0803A683E1000C382100104E800020E9
+S3152002BB409421FFE87C0802A69381000893A1000CA9
+S3152002BB5093C1001093E100149001001C7C7F1B7896
+S3152002BB607C9C23783D20002880098B542C80000061
+S3152002BB70418600843D6010003D20002880099C00FB
+S3152002BB80616B00037C0058387C8058004086001C7C
+S3152002BB903D20002880099B787C0803A63860026332
+S3152002BBA07FE4FB784E8000213D6010003D20002876
+S3152002BBB080099B60616B00107C0058387C8058009D
+S3152002BBC040860034386002633880000138A00000C5
+S3152002BBD03D20002880099B507FE6FB7838E0000054
+S3152002BBE07C0803A6390000003920000039400000F5
+S3152002BBF04E8000214BFF406DA01F00163000FFFF34
+S3152002BC00B01F0016541D043E4BFF406D2C9D0000B4
+S3152002BC10408600883FC00028809E9B047C04E21454
+S3152002BC207C802040408400283C6000283863CC98E1
+S3152002BC308123000C8009002C7C0803A67C8420F832
+S3152002BC40388400014E80002193BE9B04A01F00145D
+S3152002BC502C800001408600183C6000283863CC986E
+S3152002BC608123000C8009001C480000143C60002837
+S3152002BC703863CC988123000C800900107C0803A627
+S3152002BC8080BE9B04389F00047CBC2A144E8000216F
+S3152002BC9038000001B01F0014386000008001001C2B
+S3152002BCA07C0803A68381000883A1000C83C10010AF
+S3152002BCB083E10014382100184E8000209421FFF0E1
+S3152002BCC07C0802A693E1000C900100147C7F1B786D
+S3152002BCD03D20002880098B542C8000004186008458
+S3152002BCE03D6010003D20002880099C00616B000306
+S3152002BCF07C0058387C8058004086001C3D20002855
+S3152002BD0080099B787C0803A6386002647FE4FB786E
+S3152002BD104E8000213D6010003D20002880099B6056
+S3152002BD20616B00107C0058387C80580040860034B5
+S3152002BD3038600264388000013D20002880099B502B
+S3152002BD4038A000007FE6FB7838E000007C0803A6D6
+S3152002BD503900000039200000394000004E800021C1
+S3152002BD60A01F00142C800001408600283C60002879
+S3152002BD703863CC988123000C800900187C0803A61E
+S3152002BD80389F00044E80002138000000B01F0014A6
+S3152002BD90800100147C0803A683E1000C38210010E0
+S3152002BDA04E8000209421FFF07C0802A693E1000C2D
+S3152002BDB0900100148123000C800900147C0803A63C
+S3152002BDC04E8000217C7F1B783D20002880098B54E1
+S3152002BDD02C800000418600843D6010003D20002812
+S3152002BDE080099C00616B00037C0058387C805800D7
+S3152002BDF04086001C3D20002880099B787C0803A6EB
+S3152002BE00386002657FE4FB784E8000213D60100099
+S3152002BE103D20002880099B60616B00107C00583809
+S3152002BE207C805800408600343860026538800001E4
+S3152002BE3038A000003D20002880099B507FE6FB7831
+S3152002BE4038E000007C0803A63900000039200000F3
+S3152002BE50394000004E8000217FE3FB78801F003CA2
+S3152002BE6038800000540007FA901F003C4802B00DAB
+S3152002BE70813F003C7120000441820028552007B8EA
+S3152002BE80901F003C3C6000283863CC988123000C2C
+S3152002BE90800900187C0803A6389F00104E800021D6
+S3152002BEA0801F003C2C800000408600243C60002835
+S3152002BEB03863CCB88123000C800900107C0803A6C5
+S3152002BEC080BF00407FE4FB784E8000218001001471
+S3152002BED07C0803A683E1000C382100104E80002046
+S3152002BEE09421FFF07C0802A693E1000C9001001435
+S3152002BEF07C7F1B78801F003C38800000540007FAA4
+S3152002BF00901F003C4802AF75813F003C712000041F
+S3152002BF1041820028552007B8901F003C3C6000282B
+S3152002BF203863CC988123000C800900187C0803A66C
+S3152002BF30389F00104E800021801F003C2C8000007C
+S3152002BF40408600243C6000283863CCB88123000C4C
+S3152002BF50800900107C0803A680BF00407FE4FB789E
+S3152002BF604E800021800100147C0803A683E1000C88
+S3152002BF70382100104E8000209421FFE87C0802A67A
+S3152002BF8093A1000C93C1001093E100149001001CB0
+S3152002BF907C7D1B783C6000283863CCB88123000C5A
+S3152002BFA0800900187C9F23787C0803A63FC00028BE
+S3152002BFB0809E9AF44E800021813E9AF42C9FFFFFA8
+S3152002BFC08009003C93A9005C600000029009003CB5
+S3152002BFD0418600783FA00028809D9B047C04FA14A9
+S3152002BFE07C8020404084002C3C6000283863CC981A
+S3152002BFF08123000C8009002C7C0803A67C8420F86F
+S3152002C000388400014E80002138000000901D9B04D8
+S3152002C0103C6000283863CC988123000C80090010EC
+S3152002C020809E9AF47C0803A680BD9B043884001067
+S3152002C0307CBF2A144E800021813E9AF48009003C5E
+S3152002C040600000049009003C8001001C7C0803A6C5
+S3152002C05083A1000C83C1001083E10014382100184B
+S3152002C0604E8000209421FFE07C0802A6934100081E
+S3152002C0709361000C9381001093A1001493C10018C0
+S3152002C08093E1001C900100247C7C1B783FA01000C9
+S3152002C09063BD00033FC0100063DE00103D20002870
+S3152002C0A03B49CC983D2000283B69CCB8813C000C0A
+S3152002C0B0800900147C0803A67F83E3784E80002142
+S3152002C0C07C7F1B79418200F43D20002880098B5415
+S3152002C0D02C800000418600743D20002880099C00A7
+S3152002C0E07C00E8387C80E8004086001C3D20002841
+S3152002C0F080099B787C0803A6386002667FE4FB7879
+S3152002C1004E8000213D20002880099B607C00F0386B
+S3152002C1107C80F00040860034386002663880000158
+S3152002C12038A000003D20002880099B507FE6FB783E
+S3152002C13038E000007C0803A6390000003920000000
+S3152002C140394000004E8000217FE3FB78801F003CAF
+S3152002C15038800000540007FA901F003C4802AD1DAB
+S3152002C160813F003C7120000441820024552007B8FB
+S3152002C170901F003C813A000C800900187C0803A617
+S3152002C1807F43D378389F00104E800021801F003CC9
+S3152002C1902C8000004086FF18813B000C800900108D
+S3152002C1A07C0803A67F63DB7880BF00407FE4FB78B0
+S3152002C1B04E8000214BFFFEF8800100247C0803A656
+S3152002C1C0834100088361000C8381001083A100143F
+S3152002C1D083C1001883E1001C382100204E800020F4
+S3152002C1E09421FFE87C0802A693A1000C93C10010BB
+S3152002C1F093E100149001001C7C9E23797C7F1B789E
+S3152002C2004082001C4BFE84953C00003D60000002EB
+S3152002C210900300003860FFFF4800015C3D200028A3
+S3152002C22080098B542C800000418600803D601000DE
+S3152002C2303D20002880099C00616B00037C00583851
+S3152002C2407C805800408600183D20002880099C24C6
+S3152002C2507C0803A6386002674E8000213D601000EC
+S3152002C2603D20002880099B60616B00107C005838B5
+S3152002C2707C8058004086003438600267388000018E
+S3152002C28038A000003D20002880099B5038C00000BD
+S3152002C29038E000007C0803A639000000392000009F
+S3152002C2A0394000004E8000213C6000283863CCB81B
+S3152002C2B08123000C800900187C0803A63FA00028D1
+S3152002C2C0809D9AF44E800021809D9AF47FE3FB782C
+S3152002C2D08004003C9064005C600000029004003CF4
+S3152002C2E08123000C800900107C0803A680A400404C
+S3152002C2F04E8000212C9EFFFF418600783FE00028D9
+S3152002C300809F9B047C04F2147C8020404084002C75
+S3152002C3103C6000283863CC988123000C8009002CCD
+S3152002C3207C0803A67C8420F8388400014E800021F4
+S3152002C33038000000901F9B043C6000283863CC988C
+S3152002C3408123000C80090010809D9AF47C0803A6A4
+S3152002C35080BF9B04388400107CBE2A144E800021A4
+S3152002C360813D9AF48009003C600000049009003C5B
+S3152002C370386000008001001C7C0803A683A1000C03
+S3152002C38083C1001083E10014382100184E8000205A
+S3152002C3909421FFE87C0802A693A1000C93C1001009
+S3152002C3A093E100149001001C7C7D1B78807D005C4B
+S3152002C3B08123000C800900187C0803A67FA4EB7851
+S3152002C3C04E80002138000000901D004C801D003C4C
+S3152002C3D0540007FA901D003C8001001C7C0803A62D
+S3152002C3E083A1000C83C1001083E1001438210018B8
+S3152002C3F04E8000209421FFE07C0802A69361000C67
+S3152002C4009381001093A1001493C1001893E1001C9C
+S3152002C410900100247C7D1B783FC0100063DE000360
+S3152002C4203D2000283B69CC983D2000283B89CCB88A
+S3152002C430813D000C800900147C0803A67FA3EB78BB
+S3152002C4404E8000217C7F1B79418201103D200028ED
+S3152002C45080098B542C8000004186007C3D200028D8
+S3152002C46080099C007C00F0387C80F0004086001C0D
+S3152002C4703D20002880099B787C0803A63860026943
+S3152002C4807FE4FB784E8000213D6010003D2000288D
+S3152002C49080099B60616B00107C0058387C805800B4
+S3152002C4A040860034386002693880000138A00000D6
+S3152002C4B03D20002880099B507FE6FB7838E000006B
+S3152002C4C07C0803A63900000039200000394000000C
+S3152002C4D04E80002138000000901F004C3C00003D99
+S3152002C4E060000003901F00847FE3FB78801F003CDE
+S3152002C4F03880FFFF540007FA901F003C4802A97DAE
+S3152002C500813F003C7120000441820024552007B857
+S3152002C510901F003C813B000C800900187C0803A672
+S3152002C5207F63DB78389F00104E800021801F003CFD
+S3152002C5302C8000004086FEFC813C000C8009001005
+S3152002C5407C0803A67F83E37880BF00407FE4FB78E4
+S3152002C5504E8000214BFFFEDC800100247C0803A6CE
+S3152002C5608361000C8381001083A1001483C100180B
+S3152002C57083E1001C382100204E8000203D20002827
+S3152002C5803800000098099B303D20002898099B31ED
+S3152002C5903D2000283800000190099B344E8000205F
+S3152002C5A09421FFE87C0802A69381000893A1000C3F
+S3152002C5B093C1001093E100149001001C7C7C1B782F
+S3152002C5C04BFF36A13D20002889699B307C7F1B7852
+S3152002C5D0380B000498099B303D20002889299B317D
+S3152002C5E05400063E7C804800557E103A3D200028A5
+S3152002C5F03BA9CF8040860008480002757FE3FB787E
+S3152002C6004BFF36753D2000283800000090099B34E8
+S3152002C6107F9EE92E8001001C7C0803A683810008E8
+S3152002C62083A1000C83C1001083E100143821001875
+S3152002C6304E8000209421FFE07C0802A69341000848
+S3152002C6409361000C9381001093A1001493C10018EA
+S3152002C65093E1001C900100247C7B1B787C9A237832
+S3152002C6604BFF36013D20002889699B307C7D1B7853
+S3152002C670380B000498099B30557E103A3D2000283D
+S3152002C68089299B315400063E7C8048003D200028A3
+S3152002C6903B89CF807FFEE21440860008480001D104
+S3152002C6A07FA3EB784BFF35D13D20002838000000D0
+S3152002C6B090099B347F7EE12E935F00048001002443
+S3152002C6C07C0803A6834100088361000C8381001045
+S3152002C6D083A1001483C1001883E1001C38210020A5
+S3152002C6E04E8000209421FFD87C0802A69321000CBC
+S3152002C6F093410010936100149381001893A1001CAA
+S3152002C70093C1002093E100249001002C7C7B1B78AE
+S3152002C7107C9A23787CB92B784BFF35493D2000281B
+S3152002C72089699B307C7D1B78380B000498099B30E5
+S3152002C730557E103A3D20002889299B315400063E19
+S3152002C7407C8048003D2000283B89CF807FFEE21472
+S3152002C75040860008480001197FA3EB784BFF351964
+S3152002C7603D2000283800000090099B347F7EE12E70
+S3152002C770935F0004933F00088001002C7C0803A6E7
+S3152002C7808321000C834100108361001483810018E9
+S3152002C79083A1001C83C1002083E1002438210028C4
+S3152002C7A04E8000209421FFE07C0802A693410008D7
+S3152002C7B09361000C9381001093A1001493C1001879
+S3152002C7C093E1001C900100244BFE7ED13D200028DF
+S3152002C7D03D60002889299B31880B9B307C8900008B
+S3152002C7E083430000418600583FE000283D20002870
+S3152002C7F03BC9CF803F6000283B8000013FA0002834
+S3152002C800881F9B31316000045400103A7D20F214B7
+S3152002C8107C1E002E7C0803A68069000480890008FD
+S3152002C820997F9B314E800021893F9B31881D9B3009
+S3152002C8307C890000939B9B344086FFC84BFE7E5D1D
+S3152002C84093430000800100247C0803A6834100084C
+S3152002C8508361000C8381001083A1001483C1001818
+S3152002C86083E1001C382100204E8000209421FFF80D
+S3152002C8707C0802A69001000C3D4000273D2000289E
+S3152002C880810A7F60816989AC38080001900A7F603D
+S3152002C890380B0001900989AC880B00002C8000001F
+S3152002C8A098080000418600343D0000273D400028BC
+S3152002C8B081687F60812A89AC380B000190087F60ED
+S3152002C8C038090001900A89AC880900002C800000F2
+S3152002C8D0980B00004086FFDC3D20002780097F6000
+S3152002C8E0386000003000FFFF90097F604BFEB2895E
+S3152002C8F08001000C7C0803A6382100084E80002007
+S3152002C9009421FFF87C0802A69001000C4802C7BDBC
+S3152002C9108001000C7C0803A6382100084E800020E6
+S3152002C9209421FFF87C0802A69001000C4802C7C198
+S3152002C9308001000C7C0803A6382100084E800020C6
+S3152002C9409421FFE87C0802A693A1000C93C1001053
+S3152002C95093E100149001001C7C7D1B784802C85587
+S3152002C9603D20002893A989C88001001C7C0803A6C3
+S3152002C97083A1000C83C1001083E100143821001822
+S3152002C9804E8000209421FFF87C0802A69001000C1C
+S3152002C9903D20002881699BF42C8B000041860020D3
+S3152002C9A03D20002880098B545400042E2C8001003F
+S3152002C9B04186000C7D6803A64E8000213D2000287A
+S3152002C9C080099B942C8000004186000C7C0803A6DB
+S3152002C9D04E8000213D600028380000003D4000289E
+S3152002C9E0900B89C43D600028812A8B54800B9C00C1
+S3152002C9F061290100912A8B5464001000900B9C003F
+S3152002CA008001000C7C0803A6382100084E800020F5
+S3152002CA109421FFF87C0802A69001000C3D400028D4
+S3152002CA20386000023D600028812A9C00800B8B54CE
+S3152002CA3055290104912A9C005400062C900B8B54F4
+S3152002CA40480000D12C830001408600543860000142
+S3152002CA503880000038A000024800011D386000021C
+S3152002CA603880000038A000024800010D386000031B
+S3152002CA703880000038A00002480000FD386000041B
+S3152002CA803880000038A00002480000ED386000051A
+S3152002CA903880000038A00002480000DD386000021D
+S3152002CAA0480003E13D20002880099BF42C800000E9
+S3152002CAB04186000C7C0803A64E8000218001000CD2
+S3152002CAC07C0803A6382100084E8000203D2000283D
+S3152002CAD080099C007C001B7890099C004E800020D7
+S3152002CAE03D20002880699C004E8000203D200028A1
+S3152002CAF080099C007C03187890699C004E80002057
+S3152002CB003D2000283800000090099C004E8000201D
+S3152002CB102C830001408600283D20002880099C4C59
+S3152002CB202C8000014086000C386000014E800020D7
+S3152002CB3090699C4C386000024E8000202C830002B3
+S3152002CB404086002C3D20002880099C4C2C80000029
+S3152002CB504086000C386000024E800020380000001B
+S3152002CB6090099C4C386000014E8000203860FFFFFF
+S3152002CB704E8000209421FFF07C0802A693E1000C4F
+S3152002CB80900100147C9F23794082012C2C85000180
+S3152002CB904086009C3803FFFF28800004418502CC92
+S3152002CBA03D2000233929CAC45400103A7C09002E9C
+S3152002CBB03D2000233929CAC47C004A147C0903A6D5
+S3152002CBC04E80042000000014000000200000002CEB
+S3152002CBD000000038000000503D200028816987C8E7
+S3152002CBE04800003C3D200028816987184800003013
+S3152002CBF03D2000288169865C480000243D200028CB
+S3152002CC00816989383D2000263929959C912B00304F
+S3152002CC10480002583D2000288169858C3D20002647
+S3152002CC20392994E4912B0030480002403803FFFF53
+S3152002CC3028800004418502343D2000233929CB5C1B
+S3152002CC405400103A7C09002E3D2000233929CB5C62
+S3152002CC507C004A147C0903A64E800420000000149E
+S3152002CC60000000200000002C0000003800000044D4
+S3152002CC703D200028812987C8480000303D20002811
+S3152002CC8081298718480000243D2000288129865CB6
+S3152002CC90480000183D200028812989384800000CC8
+S3152002CCA03D2000288129858C38000000900900301B
+S3152002CCB0480001B83803FFFF28800004418501ACF3
+S3152002CCC03D2000233929CBE45400103A7C09002E5A
+S3152002CCD03D2000233929CBE47C004A147C0903A693
+S3152002CCE04E80042000000014000000580000006856
+S3152002CCF000000078000000882C9F00004186016C0D
+S3152002CD003D200028817F0030812987C87C8B4800FE
+S3152002CD104186006C2C8B000041860010800900247D
+S3152002CD207C8B0000418600584BFE79713C00003D09
+S3152002CD306000000190030000480001303D200028D9
+S3152002CD40817F0000812987184BFFFFC43D200028E0
+S3152002CD50817F00008129865C4BFFFFB43D2000289D
+S3152002CD60817F0000812989384BFFFFA43D200028BE
+S3152002CD70817F00008129858C4BFFFF942C85000141
+S3152002CD804086006C2C9F00004186003C3D200028F6
+S3152002CD90817F0030812987C87C8B48004186003CF0
+S3152002CDA02C8B000041860010800900247C8B000019
+S3152002CDB0418600284BFE78E53C00003D60000001DC
+S3152002CDC090030000813F0000800900302C80000083
+S3152002CDD04086009048000068813F0030800900307C
+S3152002CDE02C8000004086007C480000702C9F0000AA
+S3152002CDF04186003C3D200028817F0030812987C85A
+S3152002CE007C8B4800418600442C8B00004186001012
+S3152002CE10800900247C8B0000418600304BFE787D01
+S3152002CE203C00003D6000000190030000813F0000AD
+S3152002CE30800900302C8000004186002880090024C9
+S3152002CE40901F00004800001C813F003080090030FE
+S3152002CE502C8000004186000C80090024901F00309F
+S3152002CE6038600000480000083860FFFF8001001487
+S3152002CE707C0803A683E1000C382100104E80002096
+S3152002CE802C830001408600183D6000283D200026A4
+S3152002CE90392994E4912B9CDC480000202C83000243
+S3152002CEA04186000C3860FFFF4E8000203D2000287E
+S3152002CEB03800000090099CDC386000004E8000207B
+S3152002CEC09421FFF87C0802A69001000C3D20002840
+S3152002CED080098B545400042E2C8001007C862378F2
+S3152002CEE05463043E4186000C386000004800000C62
+S3152002CEF0388000004802CA258001000C7C0803A65F
+S3152002CF00382100084E8000209421FFD87C0802A6F2
+S3152002CF10930100089321000C9341001093610014A1
+S3152002CF209381001893A1001C93C1002093E1002451
+S3152002CF309001002C7CBA2B783B6000007C7C1B790C
+S3152002CF403BE000007F5DD3787C9E23784182007887
+S3152002CF50801C00002C8000004186006C7C9FD00043
+S3152002CF60408400843F0000283F200028801889BC86
+S3152002CF707C9B000040840070801C00007C0803A675
+S3152002CF807F83E3787FC4F3787FA5EB784E800021F8
+S3152002CF907C631B79408000384BFE770180030000BA
+S3152002CFA02C800046418600144BFE76F18003000059
+S3152002CFB02C80000B40860010807989C04BFFB0A1DF
+S3152002CFC0480000183860FFFF4800002C7FFF1A1423
+S3152002CFD07FA3E8507FDE1A147C9FD0003B7B0001A2
+S3152002CFE04184FF8C7C9FD0007C60002654632FFEF8
+S3152002CFF07C6300D08001002C7C0803A683010008F4
+S3152002D0008321000C83410010836100148381001860
+S3152002D01083A1001C83C1002083E10024382100283B
+S3152002D0204E8000209421FFC87C0802A692E10014BB
+S3152002D030930100189321001C934100209361002440
+S3152002D0409381002893A1002C93C1003093E10034F0
+S3152002D0509001003C7C771B794082000C3860FFFFF0
+S3152002D06048000238801700282C80000041860010D4
+S3152002D070807700242C830000408600143800FFFFAE
+S3152002D0809017002C3860FFFF480002107C1B0378A3
+S3152002D0907C781B784BFF2BCD801B00147C0803A6C3
+S3152002D0A07C7F1B787F63DB784E8000217C7D1B781A
+S3152002D0B07FE3FB784BFF2BC1801700202C800000DA
+S3152002D0C03B4000003B2000004086001C801B0034B1
+S3152002D0D07C9D000040840010387B00183880FFFFBA
+S3152002D0E04BFF7855801B0034480001704BFF2B758F
+S3152002D0F0801B00047C0803A67C7F1B787F63DB7879
+S3152002D100388100084E8000217C7D1B787FE3FB78E6
+S3152002D1104BFF2B652C9DFFFF408600384BFF2B458E
+S3152002D1207C7F1B784BFFF8ED7FE3FB784BFF2B4987
+S3152002D130801800047C0803A67F03C3784E80002152
+S3152002D14093B7002C3C600027386348A8480000E0CB
+S3152002D150813B00347D3A48507C9D48007F03C3784A
+S3152002D160808100087C000026540037FE7C0000D017
+S3152002D1707D2900387FA500787D3E2B787FC5F37800
+S3152002D1804BFFFD897C7C1B782C9CFFFF201D000019
+S3152002D1907F20E914408600384BFF2AC97C7F1B7802
+S3152002D1A04BFFF8717FE3FB784BFF2ACD80180004F2
+S3152002D1B07C0803A67F03C3784E8000219397002C18
+S3152002D1C03C600027386348D0480000644BFF2A950C
+S3152002D1D0801B00087C0803A67C7F1B787F63DB7894
+S3152002D1E07FC4F3784E8000217C7D1B787FE3FB7819
+S3152002D1F04BFF2A852C9DFFFF408600584BFF2A6550
+S3152002D2007C7F1B784BFFF80D7FE3FB784BFF2A6967
+S3152002D210801800047C0803A67F03C3784E80002171
+S3152002D22093B7002C3C600027386348F4388000000E
+S3152002D23038A0000038C0000038E0000039000000A5
+S3152002D240392000004BFE9B313860FFFF4800004C1E
+S3152002D250801B00347F5AF2147C9A00006B20000156
+S3152002D2607D20002655292FFE7D2B00394082FE8007
+S3152002D270801700203120FFFF7C0901107C09C83964
+S3152002D2804182FE14380000009017002C38770004E3
+S3152002D2904BFF7549386000008001003C7C0803A6DC
+S3152002D2A082E10014830100188321001C834100209F
+S3152002D2B0836100248381002883A1002C83C100304E
+S3152002D2C083E10034382100384E8000209421FFC0AB
+S3152002D2D07C0802A69361002C9381003093A100342E
+S3152002D2E093C1003893E1003C9001004420030000E2
+S3152002D2F07D201914216400007C0B21147D3E0379C4
+S3152002D3007CBB2B787C7D1B787C9C2378408200F822
+S3152002D310386000304BFF417D7C7F1B7940820010B4
+S3152002D3203C60002738634924480000C0387F000447
+S3152002D3303880000138A000004BFF67E52C83FFFFF1
+S3152002D340408600103C600027386349584800009CFC
+S3152002D3502C9B000093BF0028939F002493DF002C70
+S3152002D3604186000C93DF00204800000C38000001A3
+S3152002D370901F002038000000900100089001000C48
+S3152002D3809001001090010014900100189001001CD9
+S3152002D390900100203C600027386349843CE000234A
+S3152002D3A038E7CF247FE8FB783D200028808989B0A2
+S3152002D3B0392000003D6000283D40002880AB89B816
+S3152002D3C080CA89B4394000004BFF8C4D2C83FFFF65
+S3152002D3D0907F00004186000C7FE3FB784800002CFA
+S3152002D3E03C600027386349903880000038A000004E
+S3152002D3F038C0000038E00000390000003920000063
+S3152002D4004BFE997538600000800100447C0803A613
+S3152002D4108361002C8381003083A1003483C10038CC
+S3152002D42083E1003C382100404E8000209421FFE811
+S3152002D4307C0802A693A1000C93C1001093E100146C
+S3152002D4409001001C7C7D1B794082000C3860FFFF16
+S3152002D4504800004838000001807D0028901D0020E9
+S3152002D460386300184BFF7375801D002C2C8000003A
+S3152002D47040860010387D00043880FFFF4BFF74B9C8
+S3152002D480387D00044BFF77817FA3EB7883A3002CA2
+S3152002D4904BFF402D7FA3EB788001001C7C0803A65E
+S3152002D4A083A1000C83C1001083E1001438210018E7
+S3152002D4B04E8000203D200028906989B43D20002816
+S3152002D4C0908989B04E8000209421FFD87C0802A63C
+S3152002D4D09321000C9341001093610014938100184C
+S3152002D4E093A1001C93C1002093E100249001002CFB
+S3152002D4F07C7F1B783880000C4BFF39557C7E1B794C
+S3152002D5004082000C38600000480002204BFDB76DB7
+S3152002D5104BFE624D3803003A70090001901E00044A
+S3152002D5204182000C3803003B901E0004809E0004BA
+S3152002D5307FE3FB784BFF39192C830000907E00088D
+S3152002D540408600187FE3FB787FC4F3784BFF397956
+S3152002D55038600000480001D43D20002880099B90B5
+S3152002D5607C0803A693FE00004E8000213D20002861
+S3152002D57080099BC87C0803A67C7A1B784E800021F2
+S3152002D5807C791B783D20002880699BA83D200028B5
+S3152002D59080099B587C0803A6388000024E80002111
+S3152002D5A03B6300014BFDB1E93D20002883A99C0085
+S3152002D5B07C7C1B7857BD077E6BBD0001201D0000B9
+S3152002D5C07FA0E9144BFDB8F1813E00083800000423
+S3152002D5D0B00900003800B0B07D3F4B78B41F00027E
+S3152002D5E038000002B01F00025740843EB41F0004D8
+S3152002D5F0B35F00025720843EB41F0004B33F0002EB
+S3152002D6005760843EB41F0004B37F00025780843ED5
+S3152002D610B41F0004B39F000238000000B41F0004A8
+S3152002D620B3BF00025460843EB41F0004B07F0002E0
+S3152002D6303BFF0004396000053D20002880099B2C11
+S3152002D6402C800000408600103D20002881299AF473
+S3152002D650480000083920FFFFB17F00005520843E94
+S3152002D660B41F0002B13F00023BFF00043D20002709
+S3152002D67083697F584BFDB6054BFE60E57C7D1B78A2
+S3152002D6803D2000283D6000283B20000083499AF473
+S3152002D690838B9C00B33F000073A00001393D00013B
+S3152002D6A0579C077E6B9C0001201C00007F80E114A2
+S3152002D6B07C00002654001FFE7C0000D07FBD00386F
+S3152002D6C07D2000787FBD03785760843EB41F000218
+S3152002D6D0B37F000257A0843EB41F0004B3BF0002EA
+S3152002D6E03BFF00044BFDB5957C641B787FE3FB78FA
+S3152002D6F07FA5EB784BFE60E55740843E7C1FEB6EA0
+S3152002D700B35F000238000000B41F0004B39F00027A
+S3152002D7103BFF0004B33F000038000002B01F0002A6
+S3152002D7204802C3257FC3F3788001002C7C0803A618
+S3152002D7308321000C83410010836100148381001829
+S3152002D74083A1001C83C1002083E100243821002804
+S3152002D7504E8000209421FFF07C0802A693E1000C63
+S3152002D76090010014200300007D201914216400007A
+S3152002D7707C0B21147D2B03797C7F1B787C83237879
+S3152002D78040820020800300007C0803A6809F0008B8
+S3152002D79080BF00044E8000212C8300004084000CB0
+S3152002D7A03860FFFF480000303D20002880099B3862
+S3152002D7B02C8000004186001C807F0000809F00088C
+S3152002D7C04BFF3705807F00007FE4FB784BFF36F95D
+S3152002D7D038600000800100147C0803A683E1000C57
+S3152002D7E0382100104E8000203D200028806989C8FB
+S3152002D7F04E8000209421F8087C0802A6930107D8BF
+S3152002D800932107DC934107E0936107E4938107E8BC
+S3152002D81093A107EC93C107F093E107F4900107FC6B
+S3152002D820480003657C781B794082000C3860000032
+S3152002D830480000943D200028930989CC38610008CD
+S3152002D840388001F44BFEE8953BC000007C791B78BA
+S3152002D8507C9EC8004084005C3BE10008807F00007B
+S3152002D8604BFFAACD2C8300004086003883BF0000E0
+S3152002D8707FA3EB78839D003C837D0040835D00502F
+S3152002D8804BFEE6D97C681B78386000037FA7EB78CD
+S3152002D8907F84E3787F65DB787F46D378480001C1B1
+S3152002D8A03BDE00017C9EC8003BFF00044184FFB0A2
+S3152002D8B03D20002880099C007F03C3786000100069
+S3152002D8C090099C00800107FC7C0803A6830107D8E7
+S3152002D8D0832107DC834107E0836107E4838107E82C
+S3152002D8E083A107EC83C107F083E107F4382107F807
+S3152002D8F04E8000209421FFE07C0802A69361000C52
+S3152002D9009381001093A1001493C1001893E1001C87
+S3152002D91090010024200300007D20191421640000B8
+S3152002D9207C0B21147D2B03797C7B1B787C9F2378AF
+S3152002D930408201047F7CDB787F83E3784800048D74
+S3152002D9407C7D1B79418200F07F63DB787FA4EB78B4
+S3152002D950480005617C7E1B79408200207FA3EB78FC
+S3152002D9607F84E378480004C17F83E3784800057505
+S3152002D97038600000480000C4801F00007C0803A60F
+S3152002D9807FE3FB787FC4F37838A000024E80002123
+S3152002D990801F00007C0803A67FE3FB78389E0004E4
+S3152002D9A038A000044E800021801F00007C0803A6B8
+S3152002D9B07FE3FB78389E000838A000044E800021C1
+S3152002D9C0801F00007C0803A67FE3FB78389E000CAC
+S3152002D9D038A000044E800021801F00007C0803A688
+S3152002D9E07FE3FB78389E001038A000044E80002189
+S3152002D9F0801F00007C0803A67FE3FB78389E001474
+S3152002DA0038A000044E800021801F00007C0803A657
+S3152002DA10809E001880BE00147FE3FB784E80002192
+S3152002DA202C8300004084FF247FA3EB787F84E37855
+S3152002DA30480003F53860FFFF800100247C0803A616
+S3152002DA408361000C8381001083A1001483C1001816
+S3152002DA5083E1001C382100204E8000209421FFD82B
+S3152002DA607C0802A6930100089321000C9341001022
+S3152002DA70936100149381001893A1001C93C1002086
+S3152002DA8093E100249001002C7C9D23787CBC2B788A
+S3152002DA907CDB33787CF93B787D1843783F4000283D
+S3152002DAA0813A89CC7C7E0734806900043880001C48
+S3152002DAB04BFF339D7C7F1B794082000C3860FFFF31
+S3152002DAC048000094B3DF000093BF0004939F000830
+S3152002DAD0937F000C933F00107F03C3784BFE5C813B
+S3152002DAE07C641B78813A89CC909F0014806900045B
+S3152002DAF04BFF335D2C830000907F00184186003C4B
+S3152002DB0080BF00147F04C3784BFE5CD17FE4FB7890
+S3152002DB10807A89CC80BF001038C00000480001BD41
+S3152002DB202C83FFFF4086002C813A89CC809F0018E7
+S3152002DB30806900044BFF3391813A89CC80690004C5
+S3152002DB407FE4FB784BFF33813860FFFF48000008F3
+S3152002DB50386000008001002C7C0803A6830100089F
+S3152002DB608321000C834100108361001483810018F5
+S3152002DB7083A1001C83C1002083E1002438210028D0
+S3152002DB804E8000209421FFD87C0802A6930100082B
+S3152002DB909321000C93410010936100149381001885
+S3152002DBA093A1001C93C1002093E100249001002C34
+S3152002DBB07C7C1B787C9923783880000C4BFF329131
+S3152002DBC07C7A1B79418200847F83E3785724103A3A
+S3152002DBD04BFF327D7C7B1B79418200703BA000008B
+S3152002DBE07C9DC800408400943B0000007F7FDB7848
+S3152002DBF03BC000007F83E3783880000C4BFF325114
+S3152002DC002C830000907F0000408600487C83E80039
+S3152002DC103BE000004185001C7F83E3787C9ED82E62
+S3152002DC203BFF00014BFF32A17C9FE8004085FFECC1
+S3152002DC307F83E3787F64DB784BFF328D7F83E378C3
+S3152002DC407F44D3784BFF3281386000004800003C85
+S3152002DC50930300083BDE00043BBD0001813F000028
+S3152002DC607C9DC80093090004813F00003BFF00040D
+S3152002DC70930900004184FF80933A0000939A00049E
+S3152002DC80937A00087F43D3788001002C7C0803A670
+S3152002DC90830100088321000C834100108361001454
+S3152002DCA08381001883A1001C83C1002083E1002404
+S3152002DCB0382100284E8000203800001F7C0403D61D
+S3152002DCC0806300001C00001F3863FFFF7C80205009
+S3152002DCD07C8318384E8000209421FFE87C0802A617
+S3152002DCE09381000893A1000C93C1001093E10014C4
+S3152002DCF09001001C7C7E1B797C9C23787CBD2B7832
+S3152002DD004182008C7FC3F3787FA4EB784BFFFFAD73
+S3152002DD10813E00085463103A7D23482E814900082B
+S3152002DD202C8A0000390000007D3F4B784186003462
+S3152002DD30800A00047C80E8004086000C390000013D
+S3152002DD404800000C7D5F5378815F00086909000155
+S3152002DD50316AFFFF7C0B51107D2B00394082FFD4A4
+S3152002DD602C8800004186001093AA0004938A0000A2
+S3152002DD7048000034807E00043880000C4BFF30D1EE
+S3152002DD807C631B793BC000004082000C3860FFFF99
+S3152002DD90480000189383000093C3000893A300044D
+S3152002DDA0907F0008386000008001001C7C0803A6D2
+S3152002DDB08381000883A1000C83C1001083E1001433
+S3152002DDC0382100184E8000209421FFF07C0802A6FC
+S3152002DDD093E1000C900100147C7F1B794182003074
+S3152002DDE0386000084BFF36AD7C631B7941820020E8
+S3152002DDF03800000090030000813F000881290000BE
+S3152002DE0080090008900300044800000838600000DA
+S3152002DE10800100147C0803A683E1000C382100103F
+S3152002DE204E8000209421FFF87C0802A69001000C67
+S3152002DE302C840000418600084BFF36858001000CA9
+S3152002DE407C0803A6382100084E8000207C6A1B79B4
+S3152002DE504082000C386000004E80002038600000AE
+S3152002DE6081240000800A00007C8900004C84002066
+S3152002DE70800400042C8000004086002039290001FD
+S3152002DE8091240000816A00085529103A7D29582ECE
+S3152002DE90800900084800000C7C03037880030008F0
+S3152002DEA0900400042C8300004186FFB84E80002097
+S3152002DEB09421FFF87C0802A69001000C4BFFFF91EB
+S3152002DEC07C691B7938600000418200088069000065
+S3152002DED08001000C7C0803A6382100084E80002011
+S3152002DEE09421FFE87C0802A693A1000C93C100109E
+S3152002DEF093E100149001001C3D20002880099B38E4
+S3152002DF002C8000007C7E1B78418600BC2C9E000063
+S3152002DF10418600147FC3F3784BFFFEB17C7D1B79CB
+S3152002DF204082000C3860FFFF480000A07FC3F378D0
+S3152002DF307FA4EB784BFFFF197C7F1B79418200304F
+S3152002DF40813F0000807E0004808900184BFF2F79D4
+S3152002DF50807E0004809F00004BFF2F6D807E000490
+S3152002DF607FE4FB784BFF2F614BFFFFC47FA3EB7847
+S3152002DF707FC4F3784BFFFEB1801E00003BE0000019
+S3152002DF807C9F00004084002857E9103A817E0008D1
+S3152002DF90807E00047C89582E4BFF2F2D801E000088
+S3152002DFA03BFF00017C9F00004184FFE0807E00044D
+S3152002DFB0809E00084BFF2F11807E00047FC4F378D9
+S3152002DFC04BFF2F05386000008001001C7C0803A649
+S3152002DFD083A1000C83C1001083E1001438210018AC
+S3152002DFE04E8000209421FFE87CA802A690A1001072
+S3152002DFF0906100143CA0002880A59B342C050000CB
+S3152002E00040820028806100147C6001244C00012C8F
+S3152002E0104BFFE7957C6000A65464045E7C80012455
+S3152002E0204C00012C4BFFFFD03D20002880698B54E9
+S3152002E0305464043E2C040000418200E43D20002862
+S3152002E04080E99C003C801000608400017CE9203835
+S3152002E0503C801000608400017C0448004082002C31
+S3152002E0603CE0002880879AF480A4004080C40044C3
+S3152002E0707C0530404080000C38600037480000089C
+S3152002E080386000354802BA953D20002880E99B6019
+S3152002E0903C801000608400017CE720383C80100020
+S3152002E0A0608400017C043800408200743CE0002831
+S3152002E0B080879AF480E40040810400447C07404033
+S3152002E0C04080000C38600037480000083860003570
+S3152002E0D03D20002880899B502C040000418200406C
+S3152002E0E09421FFE87D2802A6912100107C8803A6B0
+S3152002E0F03880000038A0000038C0000038E0000058
+S3152002E1003900000039200000394000004E800021ED
+S3152002E110812100107D2803A63821001880A1001035
+S3152002E120382100187CA803A67C6000A64E80002019
+S3152002E1307C7142A62C030000418200547C6000A61A
+S3152002E1409421FFE8906100105464045E7C800124CF
+S3152002E1504C00012C7CA802A690A100144BFFFE893C
+S3152002E1607C631A783CA0002838A59B209065000085
+S3152002E170808100107C8001244C00012C80A1001497
+S3152002E180382100187CA803A64E8000207C6000A6B9
+S3152002E1909421FFF8906100005464045E7C8001247F
+S3152002E1A04C00012C3D400028814A9AF43C800028EC
+S3152002E1B08084CCB87C0A20004182001C808A0050D0
+S3152002E1C02C0400004182006480AA003C2C05000039
+S3152002E1D0408200583CC0002880C69B342C06000092
+S3152002E1E0408200289421FFF07CE802A690E10014E8
+S3152002E1F07C6000A64BFFFDF13821001080E100046F
+S3152002E2007CE803A64BFFFFA07C631A783C8000289B
+S3152002E21090649B2080C100007CC001244C00012C0C
+S3152002E220382100084E8000203C80002880849A7C79
+S3152002E2307CA802A6908A008480C1000090AA01C808
+S3152002E240388000003821000890CA01BC902A01407B
+S3152002E250908A01487C800026908A01CC904A01440B
+S3152002E26091AA017091CA017491EA0178920A017CFD
+S3152002E270922A0180924A0184926A0188928A018CAA
+S3152002E28092AA019092CA019492EA0198930A019C59
+S3152002E290932A01A0934A01A4936A01A8938A01AC06
+S3152002E2A093AA01B093CA01B493EA01B87CC00124AF
+S3152002E2B04C00012C4BFF53683C60002880639AF483
+S3152002E2C0808300843CA0002890859A7C8003013CB0
+S3152002E2D080A3015080C30154808301C080E301588A
+S3152002E2E07C8803A68103015C808301C481230160AB
+S3152002E2F07C8903A681430164808301D081630168FE
+S3152002E3007C8103A68183016C81A3017081C3017480
+S3152002E31081E301788203017C822301808243018486
+S3152002E320826301888283018C82A3019082C3019435
+S3152002E33082E301988303019C832301A0834301A4E2
+S3152002E340836301A8838301AC83A301B083C301B491
+S3152002E35083E301B88043014480230140808301CCBA
+S3152002E3607C8FF1207C8000A65484045E7C8001246C
+S3152002E3704C00012C808301C87C9043A6808301BC7B
+S3152002E3807C9343A68083014C806301487C7243A61A
+S3152002E3907C6000A6546307327C6001244C00012C69
+S3152002E3A07C7042A67C7A03A67C7342A67C7B03A65B
+S3152002E3B07C7242A64C0000647C8000A65485045ED2
+S3152002E3C07CA001244C00012C7C7043A638A00000BE
+S3152002E3D07CB143A63CC0002890669AA47C80012486
+S3152002E3E04C00012C4E800020380000108123002C86
+S3152002E3F0814300283929FFFF7C004E303D2000282A
+S3152002E400816A0948392989D07D600078900A0948AD
+S3152002E4103800258090030018912300004E800020AA
+S3152002E4209421FFF07C0802A693C1000893E1000C18
+S3152002E430900100147C7F1B784BFF18297C7E1B7869
+S3152002E440801F002C813F00203140FFFF3929FFFF2A
+S3152002E4502C890001380000107C005630901F006085
+S3152002E46041860028408500142C8900024186002C12
+S3152002E4702C89000341860034813F002880090AE066
+S3152002E48090090AE048000040554A2036817F00283C
+S3152002E4903800100048000020554A2036817F002887
+S3152002E4A03800200048000010554A2036817F002877
+S3152002E4B038003000812B0AE07C0050307D29037819
+S3152002E4C0912B0AE0813F00248009000064000002AB
+S3152002E4D090090000817F0024800B0000740900024D
+S3152002E4E04082FFF87FE3FB7880BF00183880100354
+S3152002E4F0480001E1801F0028813F00387C004A1431
+S3152002E500901F0038813F0058A01F003AB009000230
+S3152002E510813F0058A01F003AB0090020801F00301A
+S3152002E520390000007C88000038000000901F00504F
+S3152002E5304084004038E01000813F0038550A1838E0
+S3152002E5407CEA4B2E813F0048817F0038801F0040A5
+S3152002E5507D2849D67D4A5A147C004A14900A000422
+S3152002E560801F0030390800017C8800004184FFCCDE
+S3152002E570801F0038550918387D290214A009FFF892
+S3152002E58060002000B009FFF8801F0028813F003C70
+S3152002E5907C004A14901F003C813F0058A01F003E79
+S3152002E5A0B0090000813F0058A01F003EB0090010AC
+S3152002E5B0801F0034390000007C88000038000000EB
+S3152002E5C0901F00544084004838E0900039400001F2
+S3152002E5D0813F003C550B18387CEB4B2E813F003C8B
+S3152002E5E07D2B4A14B1490002813F003C801F004422
+S3152002E5F07D6B4A147C004214900B0004801F003469
+S3152002E600390800017C8800004184FFC8801F003C35
+S3152002E610550918387D290214A009FFF86000200048
+S3152002E620B009FFF8813F005C38004820B00900009D
+S3152002E630813F00583800001898090004813F00588D
+S3152002E64098090005813F005839600001B16900062A
+S3152002E650813F005838000000B0090028813F005849
+S3152002E660B009002C813F0058B009002E813F005886
+S3152002E670B1690030813F005C380000179809000418
+S3152002E680813F005CA009000060000003B009000081
+S3152002E690813F005C3800000398090008817F00282A
+S3152002E6A0800B0948813F00607FC3F3787C004B785A
+S3152002E6B0900B09484BFF15C1800100147C0803A664
+S3152002E6C083C1000883E1000C382100104E8000200F
+S3152002E6D09421FFE07C0802A69361000C938100102E
+S3152002E6E093A1001493C1001893E1001C9001002409
+S3152002E6F03804EFFD288000067C7F1B783BA00000B3
+S3152002E7007CBE2B78418502083D2000233929E62C40
+S3152002E7105400103A7C09002E3D2000233929E62C8C
+S3152002E7207C004A147C0903A64E8004200000001CAB
+S3152002E7300000008C000001E0000001E000000098CB
+S3152002E740000001C8000001D4381EFFCE3B60000045
+S3152002E750637B95CE7C80D84041850078801F001C43
+S3152002E76057C918387C004A1457C920367C004BD624
+S3152002E7703000FFFF2C800FFF408500283D600001FE
+S3152002E780616B0001813F0024300000087C00267066
+S3152002E7907C00019454000CFC7C005B78480000103D
+S3152002E7A0813F002454000CFC640000019009000003
+S3152002E7B093DF00184800015C801F0018901E00009D
+S3152002E7C048000150381EFFFF288000014085000CBA
+S3152002E7D03BA000054800013C4BFF1489A81F0016E8
+S3152002E7E02C8000007C7C1B784086000C7FE3FB7823
+S3152002E7F04BFFFC31A81F00162C80000140860080AA
+S3152002E8002C9E0002408600BC817F00303900000029
+S3152002E8107C8858004084006880DF005080FF0038E2
+S3152002E8207D2642147C095BD67C0059D67D20485031
+S3152002E830552918387C093A2E700980004182003009
+S3152002E840801F0050817F00307C0042147D205BD6E1
+S3152002E8507D2959D6815F00387C090050540B18381F
+S3152002E8607C0B522E700980004082FFF8817F003097
+S3152002E870390800017C8858004184FFA82C9E00029A
+S3152002E88040860040813F0028801F00609009094C85
+S3152002E890817F0028800B0948813F00607C004B78ED
+S3152002E8A0900B0948813F005C38000001980900045A
+S3152002E8B0813F005C380000039809000848000024C4
+S3152002E8C0813F005C3800000098090008817F0028FB
+S3152002E8D0801F0060812B09487D200078900B094813
+S3152002E8E07FC0F378B01F00167F83E3784BFF13892E
+S3152002E8F048000020A81F0016901E000048000014A1
+S3152002E90038000003901E0000480000083BA0004784
+S3152002E9107FA3EB78800100247C0803A68361000C88
+S3152002E9208381001083A1001483C1001883E1001C97
+S3152002E930382100204E8000209421FFE87C0802A680
+S3152002E94093C1001093E100149001001C7C7F1B7878
+S3152002E950817F005C880B0004700900013BC0000027
+S3152002E9604182009C38000001980B00044800007880
+S3152002E970556B18387D6B5214813F0054815F003CE1
+S3152002E980816B0004552918387C09522E890B000008
+S3152002E990600080007C09532E813F0054817F003421
+S3152002E9A0392900017C095BD67C0059D699010008D9
+S3152002E9B07D204850913F0054813F005C3800000181
+S3152002E9C098090004801F00087C0803A6807F001097
+S3152002E9D0888100084E800021A81F00162C80000185
+S3152002E9E04186001C817F0054815F003C556918389E
+S3152002E9F07C09522E700980004182FF78817F005C5B
+S3152002EA00880B000470090002418200ECA81F001640
+S3152002EA102C800001418600E038000002980B000499
+S3152002EA20801F00047C0803A6807F000C3881000822
+S3152002EA304E8000212C830000408600BC4800002C1A
+S3152002EA40801F00487C9E000040840054801F0004E2
+S3152002EA507C0803A6807F000C388100084E800021A6
+S3152002EA602C83000040860038813F0050801F0038EA
+S3152002EA70552918387D290214816900048801000865
+S3152002EA807FC9F3787C0B49AEA81F00162C800001A3
+S3152002EA9039290001553E043E4086FFA8813F005099
+S3152002EAA0801F0038552918387D2902147FC0F37833
+S3152002EAB0B0090002813F005C380000029809000478
+S3152002EAC0813F0050817F0038552918387C095A2EFB
+S3152002EAD0600080007C095B2E813F0050817F0030E0
+S3152002EAE0392900017C095BD67C0059D67D20485005
+S3152002EAF0913F0050813F005C880900045400063A89
+S3152002EB0098090004813F0028801F00609009094C63
+S3152002EB108001001C7C0803A683C1001083E1001437
+S3152002EB20382100184E8000209421FFE87C0802A696
+S3152002EB3093C1001093E100149001001C7C7F1B7886
+S3152002EB40A81F00162C8000013BC00000418600D47D
+S3152002EB50813F0050817F0038552918387C095A2E6A
+S3152002EB6070098000408200BC801F00047C0803A636
+S3152002EB70807F000C388100084E8000212C83000003
+S3152002EB80408600A0813F0050801F00385529183842
+S3152002EB907D29021481690004880100087FC9F3785F
+S3152002EBA07C0B49AE39290001801F0048553E043EA0
+S3152002EBB07C9E000040840020801F00047C0803A65F
+S3152002EBC0807F000C388100084E8000212C830000B3
+S3152002EBD04186FFB4813F0050801F003855291838DE
+S3152002EBE07D2902147FC0F378B0090002813F0050CC
+S3152002EBF0817F0038552918387C095A2E60008000FA
+S3152002EC007C095B2E813F0050817F0030392900012B
+S3152002EC107C095BD67C0059D67D204850913F005016
+S3152002EC208001001C7C0803A683C1001083E1001426
+S3152002EC30382100184E8000208123005C88090004B8
+S3152002EC40700900014082000C3860000B4E800020C3
+S3152002EC50812300548163003C552918387C095A2E99
+S3152002EC60700A80007D295A144082FFE0812900041F
+S3152002EC708809000098040000812300548163003C27
+S3152002EC80552918387C095A2E600080007C095B2E93
+S3152002EC908123005481630034392900017C095BD623
+S3152002ECA07C0059D68163003C7D2048509123005434
+S3152002ECB0552918387C095A2E700980004182001085
+S3152002ECC08123005C380000019809000438600000A6
+S3152002ECD04E8000205484063E396000007C681B78F2
+S3152002ECE08008005080E80038540A18387C0A3A2EE8
+S3152002ECF07009800041820010396B00012C8B270F8E
+S3152002ED004085FFEC7C0A3A2E700980004082007C06
+S3152002ED108128005C380000029809000481280050EE
+S3152002ED2080080038552918387D29021481290004C3
+S3152002ED309889000081280050800800385529183803
+S3152002ED407D29021438000001B009000281280050F2
+S3152002ED5081680038552918387C095A2E60008000AF
+S3152002ED607C095B2E812800508168003039290001F8
+S3152002ED707C095BD67C0059D6386000007D2048503D
+S3152002ED80912800504E8000203860000B4E800020D3
+S3152002ED902C840001418600102C8400024186001832
+S3152002EDA04800002490A3000490C3000C38600000A1
+S3152002EDB04E80002090A3000890C300103860000007
+S3152002EDC04E800020386000474E8000209421FF6844
+S3152002EDD07C0802A69321007C9341008093610084E3
+S3152002EDE09381008893A1008C93C1009093E10094B3
+S3152002EDF09001009C7C9F2378906100707FE3FB78D2
+S3152002EE00388002004BFEAF113BA100707FA3EB7846
+S3152002EE107FE4FB7838A000143CC0002738C649B8E6
+S3152002EE2048000E1D2C830000418603587FA3EB78F1
+S3152002EE303C800027388449BC48000EC12C83000040
+S3152002EE40418603407FA3EB78389F01FC48000FA13F
+S3152002EE502C8300004186032C7FA3EB783C8000277D
+S3152002EE60388449C048000E952C830000418603143D
+S3152002EE707FA3EB78389F01F448000F752C8300009E
+S3152002EE80418603007FA3EB783C800027388449C45F
+S3152002EE9048000E692C830000418602E87FA3EB78A6
+S3152002EEA03881000838A000643FC0002738DE49C8F0
+S3152002EEB083A1007048000D89386100083880003A25
+S3152002EEC04BFEAE792C8300004186004C38010008A7
+S3152002EED0900100743BA100747FA3EB78389F001445
+S3152002EEE038A000143F80002738DC49CC48000D5159
+S3152002EEF07FA3EB78389C49CC48000E017FA3EB78A0
+S3152002EF00389F00DC38A0005038DE49C848000D3151
+S3152002EF104800000893A100703BA100703B3F003CD3
+S3152002EF203B5F006E3B7F00A03BDF00BE3B9F017C28
+S3152002EF307FA3EB78480015D981210070880900004B
+S3152002EF402C8000004186023C7FA3EB783C80002780
+S3152002EF50388449D07F25CB7838C0003248000F3D0F
+S3152002EF602C8300004086FFCC7FA3EB783C800027D1
+S3152002EF70388449D47F25CB7838C0003248000F1D0B
+S3152002EF802C8300004086FFAC7FA3EB783C800027D1
+S3152002EF90388449D87F45D37838C0003248000EFDE0
+S3152002EFA02C8300004086FF8C7FA3EB783C800027D1
+S3152002EFB0388449DC7F45D37838C0003248000EDDDC
+S3152002EFC02C8300004086FF6C7FA3EB783C800027D1
+S3152002EFD0388449E07F65DB7838C0001E48000EBDC4
+S3152002EFE02C8300004086FF4C7FA3EB783C800027D1
+S3152002EFF0388449E47F65DB7838C0001E48000E9DC0
+S3152002F0002C8300004086FF2C7FA3EB783C800027D0
+S3152002F010388449E87FC5F37838C0001E48000E7D43
+S3152002F0202C8300004086FF0C7FA3EB783C800027D0
+S3152002F030388449EC7FC5F37838C0001E48000E5D3F
+S3152002F0402C8300004086FEEC7FA3EB783C800027D1
+S3152002F050388449F07F85E37838C0001448000E3D95
+S3152002F0602C8300004086FECC7FA3EB783C800027D1
+S3152002F070388449F47F85E37838C0001448000E1D91
+S3152002F0802C8300004086FEAC7FA3EB783C800027D1
+S3152002F090388449F838BF019038C0001448000DFD65
+S3152002F0A02C8300004086FE8C7FA3EB783C800027D1
+S3152002F0B0388449FC38BF01A438C0005048000DDD11
+S3152002F0C02C8300004086FE6C7FA3EB783C800027D1
+S3152002F0D038844A0038BF002838C0001448000DBDC5
+S3152002F0E02C8300004086FE4C7FA3EB783C800027D1
+S3152002F0F038844A0438BF001438C0001448000D9DD5
+S3152002F1002C8300004086FE2C7FA3EB783C800027D0
+S3152002F11038844A0838BF00DC38C0005048000D7DCC
+S3152002F1202C8300004086FE0C7FA3EB783C800027D0
+S3152002F13038844A0C38BF012C38C0005048000D5D77
+S3152002F1402C8300004086FDEC7FA3EB783C800027D1
+S3152002F15038844A1038BF01F448000DE52C8300009C
+S3152002F1604086FDD07FA3EB783C80002738844A1462
+S3152002F17038BF01F848000DC92C8300004086FDB433
+S3152002F180806100708001009C7C0803A68321007C9C
+S3152002F19083410080836100848381008883A1008C5F
+S3152002F1A083C1009083E10094382100984E8000208C
+S3152002F1B09421FFD87C0802A693610014938100183B
+S3152002F1C093A1001C93C1002093E100249001002CFE
+S3152002F1D07C7E1B787C9F23783D20002880098B58D3
+S3152002F1E03B6000002C8000003BA000003B8000001A
+S3152002F1F039298B58418601AC812900182C890000B7
+S3152002F200418600147D2803A64E8000217C7D1B7832
+S3152002F210480000083BA0FFFF3D2000287C1EEB96FD
+S3152002F22081298B682C8900007F80E9D6418601746A
+S3152002F2307D2803A6386000007F84E37838A1000881
+S3152002F2404E8000212C83FFFF418601588001000851
+S3152002F2507009000C4082014C3B6000013D200028D1
+S3152002F26080098B542C800000418600F83D601000F6
+S3152002F2703D20002880099C00616B00077C005838DD
+S3152002F2807C8058004086008C3D20002881699AF4B3
+S3152002F2902C8B0000418600543D200028816B0030D3
+S3152002F2A0812987C87C8B48004186002C2C8B000044
+S3152002F2B041860010800900247C8B000041860018BC
+S3152002F2C04BFE53D93C00003D600000019003000034
+S3152002F2D0480000183D20002881299AF4812900300F
+S3152002F2E08009003048000008380000002C80000009
+S3152002F2F0418600203D2000287C0803A680A99AF496
+S3152002F3003860271680C50060388000024E800021B2
+S3152002F3103D6010003D20002880099B60616B010042
+S3152002F3207C0058387C805800408600383860271682
+S3152002F33038800002390000003D2000283D60002868
+S3152002F34080A99AF4800B9B50392000007C0803A6E2
+S3152002F3503940000080E500607CA62B784E80002193
+S3152002F3603D20002881299AF480090060300000019E
+S3152002F370900900603D20002880098B642C800000C3
+S3152002F38041860020386000007F84E3787C0803A64B
+S3152002F3907FA5EB7838C0000C38E000044E800021AF
+S3152002F3A0881F00142C80000040860030881F00DC55
+S3152002F3B02C800000408600247FC3F3783C800027FF
+S3152002F3C038844A1880DF01FC80FF01F47FE5FB7850
+S3152002F3D04BFED651480000287FC3F3783C80002795
+S3152002F3E038844A247FE5FB78391F001480DF01FC2C
+S3152002F3F080FF01F4393F00DC4BFED6297FC3F37828
+S3152002F4003C800027388449D438BF003C480007C9CD
+S3152002F4107FC3F3783C800027388449DC38BF006EEE
+S3152002F420480007B57FC3F3783C800027388449E437
+S3152002F43038BF00A0480007A17FC3F3783C8000278D
+S3152002F440388449EC38BF00BE4800078D7FC3F37865
+S3152002F4503C800027388449F438BF017C480007796C
+S3152002F4607FC3F3783C800027388449F838BF01905F
+S3152002F470480007657FC3F37880BF01F83C800027E8
+S3152002F48038844A14480006D97FC3F3783C80002783
+S3152002F49038844A0038BF00284800073D7FC3F378E6
+S3152002F4A03C80002738844A0C38BF012C48000729A3
+S3152002F4B07FC3F3783C800027388449FC38BF01A4F7
+S3152002F4C0480007152C9B0000418600343D20002869
+S3152002F4D080098B642C800000418600203860000061
+S3152002F4E07F84E3787C0803A67FA5EB7838C0000CDE
+S3152002F4F038E000004E8000214BFF897938600000F9
+S3152002F5008001002C7C0803A68361001483810018E5
+S3152002F51083A1001C83C1002083E100243821002816
+S3152002F5204E8000209421FDE87C0802A693A1020CBD
+S3152002F53093C1021093E102149001021C7C7D1B7878
+S3152002F540388100084BFFF8897C641B788804000008
+S3152002F5502C800000418600107FA3EB7848000349E7
+S3152002F560480001143FA00027387D4A344BFED05173
+S3152002F5703C600028386389E43881000848000B4142
+S3152002F5803C60002838638AB48081020438A00000D7
+S3152002F59048000AE13C60002838638AC0808101FC69
+S3152002F5A038A0000048000ACD3C600028386389F064
+S3152002F5B03881001C48000B093C60002838638A10F9
+S3152002F5C0388100E448000AF93C60002838638A1C26
+S3152002F5D03881004448000AE93C60002838638A34AE
+S3152002F5E03881007648000AD93C60002838638A4C64
+S3152002F5F0388100A848000AC93C60002838638A5C22
+S3152002F600388100C648000AB93C60002838638A70EF
+S3152002F6103881018448000AA93C60002838638A7C24
+S3152002F6203881019848000A993C60002838638AD4B8
+S3152002F6308081020038A0000148000A393C60002877
+S3152002F640386389FC3881003048000A753C600028FE
+S3152002F65038638AE03881013448000A653C60002814
+S3152002F66038638AF4388101AC48000A55387D4A3419
+S3152002F6704BFECF4D8001021C7C0803A683A1020CFF
+S3152002F68083C1021083E10214382102184E80002021
+S3152002F6909421FDE87C0802A693A1020C93C10210D4
+S3152002F6A093E102149001021C7C7E1B783BE0000051
+S3152002F6B0388100084BFFF7193C60002738634A3827
+S3152002F6C04BFECEFD3D2000233BA9F5F0289F000DE1
+S3152002F6D04185017457E0103A7C1D002E3D200023FF
+S3152002F6E03929F5F07C004A147C0903A64E800420B1
+S3152002F6F000000038000000540000006C0000007C6E
+S3152002F7000000008C0000009C000000B4000000C431
+S3152002F710000000DC000000EC000000FC00000114E8
+S3152002F7200000012C0000013C3C600028386389E47B
+S3152002F7303881000838A1020438C00014480009DDC7
+S3152002F740480001083C60002838638AC0388101FCE1
+S3152002F75038A0000048000C29480000F03C60002830
+S3152002F760386389F03881001C480000A83C600028D4
+S3152002F77038638A10388100E4480000C03C600028C3
+S3152002F78038638A1C38810044480000103C600028F7
+S3152002F79038638A343881007638A0003248000B3923
+S3152002F7A0480000A83C60002838638A4C388100A8AB
+S3152002F7B0480000103C60002838638A5C388100C605
+S3152002F7C038A0001E48000B11480000803C6000282B
+S3152002F7D038638A7038810184480000383C600028EA
+S3152002F7E038638A9038810198480000283C600028B6
+S3152002F7F038638AD43881020038A0000148000B8180
+S3152002F800480000483C600028386389FC3881003073
+S3152002F81038A0001448000AC1480000303C60002885
+S3152002F82038638AE038810134480000103C600028A1
+S3152002F83038638AF4388101AC38A0005048000A990E
+S3152002F840480000083860FF9D2C83FF9D41860024D6
+S3152002F8502003FF9E3000FFFF7C0001107D3F1A141B
+S3152002F8607FEB00387D2000787D7F03784BFFFE609A
+S3152002F8703C60002738634A344BFECD457FC3F3787C
+S3152002F880388100084BFFF92D8001021C7C0803A653
+S3152002F89083A1020C83C1021083E1021438210218CB
+S3152002F8A04E8000209421FFF87C0802A69001000CCD
+S3152002F8B07C601B783C60002738634A787CA0205005
+S3152002F8C07C04037838A5000138C0005E4BFECCF1DB
+S3152002F8D08001000C7C0803A6382100084E800020F7
+S3152002F8E09421FFE07C0802A69381001093A10014C4
+S3152002F8F093C1001893E1001C900100247C7D1B78A3
+S3152002F9007C9C23787CBE2B783880003A4BFEA42D33
+S3152002F9107C631B7941820064386300013880003A97
+S3152002F9204BFEA4197C631B79418200503863000187
+S3152002F9303881000838A0003A4800019D7C7F1B7858
+S3152002F9406BE90001200900007D204914317EFFFF6A
+S3152002F9507C0BF1107D2B00394182000C80010008BE
+S3152002F960901E00007FA3EB783880003A4BFEA3CD91
+S3152002F9707C631B794082000C3860000048000064DA
+S3152002F980386300013881000C38A0003A480001494A
+S3152002F9907C6A1B7869490001200900007D204914F0
+S3152002F9A0317CFFFF7C0BE1107D2B00394182000C5C
+S3152002F9B08001000C901C00002C9F00004186002034
+S3152002F9C057E30FFE55400FFE7C6303787C6300D01D
+S3152002F9D05463003C60630002480000087D4353786C
+S3152002F9E0800100247C0803A68381001083A10014D1
+S3152002F9F083C1001883E1001C382100204E8000209C
+S3152002FA009421FFE07C0802A693A1001493C100185A
+S3152002FA1093E1001C900100247C7E1B787C9D237838
+S3152002FA203880003A4BFEA3157C7F1B794082000C5E
+S3152002FA303860000048000060381F0001900100086D
+S3152002FA403861000848000AC9812100088809000097
+S3152002FA506809003A216900007D2B491421600000C3
+S3152002FA607C0B01147D2B0379408200187FC3F37827
+S3152002FA707FA4EB7838A0003A4800005D48000018C1
+S3152002FA8038000000981F000038000000901D00007A
+S3152002FA9038600001800100247C0803A683A100149B
+S3152002FAA083C1001883E1001C382100204E800020EB
+S3152002FAB09421FFF87C0802A69001000C38A0003D94
+S3152002FAC0480000158001000C7C0803A63821000896
+S3152002FAD04E8000209421FFE87C0802A693C10010E4
+S3152002FAE093E100149001001C906100087C9E23780B
+S3152002FAF054A4063E4BFEA2457C7F1B794082000C15
+S3152002FB003860000048000040381F000190010008BC
+S3152002FB10386100083881000C38A0000148000A39F3
+S3152002FB202C8300004086001C38000000981F00002D
+S3152002FB308001000C38600001901E00004800000879
+S3152002FB403860FFFF8001001C7C0803A683C10010D9
+S3152002FB5083E10014382100184E8000209421FFE80A
+S3152002FB607C0802A693A1000C93C1001093E1001415
+S3152002FB709001001C7CBE2B797C7F1B787C9D237890
+S3152002FB80418200384BFE3BD92C9E00077FFF1A1478
+S3152002FB90418500103D20002738894A944800000CF0
+S3152002FBA03D20002738894A9C7FE3FB787FA5EB78A6
+S3152002FBB07FC6F3784BFECE6D8001001C7C0803A61F
+S3152002FBC083A1000C83C1001083E1001438210018A0
+S3152002FBD04E8000209421FFE87C0802A693A1000C07
+S3152002FBE093C1001093E100149001001C7CBE2B7877
+S3152002FBF0881E00002C8000007C7F1B787C9D237849
+S3152002FC00418600204BFE3B597C7F1A143C800027FC
+S3152002FC1038844AA87FA5EB787FC6F3784BFECE05BB
+S3152002FC208001001C7C0803A683A1000C83C100105E
+S3152002FC3083E10014382100184E8000209421FFE031
+S3152002FC407C0802A69361000C9381001093A10014F4
+S3152002FC5093C1001893E1001C900100247C7C1B7840
+S3152002FC607C9D23787CBE2B787CDB3378480008A1E8
+S3152002FC7037DEFFFF83FC0000480000287F63DB7825
+S3152002FC804BFEA0B92C83000040860028881F000066
+S3152002FC9037DEFFFF3BFF0001981D00003BBD000140
+S3152002FCA040810010889F00002C8400004086FFD0EF
+S3152002FCB038000000981D0000801C00007C9F000078
+S3152002FCC04086000C386000004800000C93FC0000BF
+S3152002FCD038600001800100247C0803A68361000CA1
+S3152002FCE08381001083A1001483C1001883E1001CC4
+S3152002FCF0382100204E8000209421FFF07C0802A6A5
+S3152002FD0093C1000893E1000C900100147C7E1B78BD
+S3152002FD107C9F2378480007F9881F00002C8000006A
+S3152002FD20811E0000418600A83D20002880E981B07E
+S3152002FD3089480000288A007F418500307C0750AE22
+S3152002FD407009000141820024380AFFBF20000019F1
+S3152002FD507C000110392A00207D4B00387D20007856
+S3152002FD607D600378480000087D405378897F000033
+S3152002FD70288B007F7C0A0378418500307C0758AEA9
+S3152002FD807009000141820024380BFFBF20000019B0
+S3152002FD907C000110392B00207D6B00387D200078F5
+S3152002FDA07D600378480000087D605B787C8A0000CD
+S3152002FDB04186000C386000004800001C8C1F0001A0
+S3152002FDC02C800000390800014086FF68911E000041
+S3152002FDD038600001800100147C0803A683C1000854
+S3152002FDE083E1000C382100104E8000209421FFE888
+S3152002FDF07C0802A693A1000C93C1001093E1001483
+S3152002FE009001001C7C7F1B787C9D2378480007018B
+S3152002FE10807F00003C80002738844AB07FA5EB789B
+S3152002FE204BFEDDED2C8300014186000C386000007C
+S3152002FE304800004C3D200028811F0000812981B006
+S3152002FE40896800007C0958AE700900044182002CA2
+S3152002FE503CE0002839480001915F00007D09437883
+S3152002FE6089690001812781B07C0958AE7009000496
+S3152002FE707D4853784082FFE0386000018001001CF3
+S3152002FE807C0803A683A1000C83C1001083E1001421
+S3152002FE90382100184E8000209421FFE87C0802A613
+S3152002FEA09381000893A1000C93C1001093E10014E2
+S3152002FEB09001001C7C7F1B787C9D23787CBE2B784E
+S3152002FEC07CDC3378480006497FE3FB787FA4EB7815
+S3152002FED04BFFFE292C830000418600407FE3FB78FE
+S3152002FEE04800062D7FE3FB783C80002738844AB4FD
+S3152002FEF04BFFFE092C830000418600207FE3FB781E
+S3152002FF007FC4F3787F85E3783CC0002738C649C88A
+S3152002FF104BFFFD2D48000008386000008001001CC0
+S3152002FF207C0803A68381000883A1000C83C10010EC
+S3152002FF3083E10014382100184E8000209421FF7896
+S3152002FF407C0802A693C1008093E100849001008C74
+S3152002FF507C7F1B783921000891210074386100705A
+S3152002FF607CBE2B78801F00007D254B7838C000642C
+S3152002FF70900100704BFFFF252C8300004186002C48
+S3152002FF80386100743881007838A00000480005C91D
+S3152002FF902C83000040860014812100748809000009
+S3152002FFA02C8000004186000C3860000048000018B2
+S3152002FFB080010070901F00008001007838600001E7
+S3152002FFC0901E00008001008C7C0803A683C100805D
+S3152002FFD083E10084382100884E8000209421FFE8A6
+S3152002FFE07C0802A693A1000C93C1001093E1001491
+S3152002FFF09001001C7C7F1B78897F00002C8B0000DF
+S315200300003BFF0001418600503FA000283FC0002748
+S31520030010288B007F3880003F41850024813D81B0B5
+S315200300207C0958AE540006FE3000FFFF7C00011009
+S31520030030540906BE7D6400787D242378387E4AB829
+S315200300404BFEC57D897F00002C8B00003BFF000102
+S315200300504086FFC08001001C7C0803A683A1000CF8
+S3152003006083C1001083E10014382100184E8000203C
+S315200300709421FFF87C0802A69001000C2C85000031
+S315200300807C601B787C862378418600103D200027E0
+S3152003009038694ABC4800000C3D20002738694ACC01
+S315200300A0388000157C0503784BFEC5158001000CAE
+S315200300B07C0803A6382100084E8000209421FFF0F7
+S315200300C07C0802A693E1000C900100147C9F237800
+S315200300D0881F00002C8000007C651B784186002841
+S315200300E03C60002738634AD8388000154BFEC4D1BC
+S315200300F07FE3FB784BFFFEE93C60002738634A34F5
+S315200301004BFEC4BD800100147C0803A683E1000CCA
+S31520030110382100104E8000209421FF787C0802A607
+S3152003012093A1007C93C1008093E100849001008C0D
+S315200301307C9F23787CBE2B787CDD3378386100085E
+S315200301403C80002738844AE080DE00007FE5FB7888
+S315200301504BFEC8D13C60002738634AD83880001547
+S315200301603CA0002838A589E44BFEC4553861000815
+S315200301704BFFFE6D880100082C800000418600108D
+S315200301803C60002738634AE84BFEC43538610008D3
+S315200301907FA4EB78480002BD7C6A1B794182000C60
+S315200301A07D43537848000114880100082C80002ED3
+S315200301B04086001838000000981F0000915E00005A
+S315200301C038600001480000F4390100083D2000286A
+S315200301D07D6850AE812981B07C0958AE7009000430
+S315200301E04082004C3CC000287CE850AE54E0063EDA
+S315200301F06809003D7D2900D055290FFE7C0000D0DB
+S3152003020054000FFE7D2B00397D094378418200205F
+S315200302107CFF51AE394A00017D6950AE812681B0FB
+S315200302207C0958AE700900044182FFC038000000E3
+S315200302307C1F51AE388100083D2000287D6450AED6
+S31520030240812981B07C0958AE7000000441820044A4
+S315200302507C04521490010070386100703881007458
+S3152003026038A00000480002F12C83000041860018C4
+S315200302703C60002738634AEC4BFEC3453860FF9E3B
+S3152003028048000038808100707FE3FB784800001C1B
+S31520030290900100747C0450AE2C80003D40860010F3
+S315200302A07FE3FB787C8452144BFE33ED800100748C
+S315200302B038600001901E00008001008C7C0803A694
+S315200302C083A1007C83C1008083E1008438210088D8
+S315200302D04E8000209421FF887C0802A693C10070DB
+S315200302E093E100749001007C7C601B787C9F2378CB
+S315200302F07CBE2B783C60002738634AD838800015AB
+S315200303007C0503784BFEC2B97FE3FB784BFFFCD118
+S31520030310881F00002C800000418600103C600027C7
+S3152003032038634AE84BFEC299386100087FC4F378E4
+S31520030330480001217C631B794082002C8801000838
+S315200303402C80002E418600147FE3FB783881000839
+S315200303504BFE33D94800000C38000000981F0000DC
+S31520030360386000018001007C7C0803A683C10070ED
+S3152003037083E10074382100784E8000209421FF8089
+S315200303807C0802A693E1007C900100842C85000062
+S315200303907C601B787C9F2378418600103D200027B4
+S315200303A038694B044800000C3D20002738694B1060
+S315200303B03880001580DF00007C0503784BFEC201E0
+S315200303C03861000838800064480000897C631B7903
+S315200303D04082006C880100082C80002E4086001085
+S315200303E0907F00003860000148000054380100085F
+S315200303F090010070386100703881007438A00000C5
+S31520030400480001552C83000040860014812100708A
+S31520030410880900002C800000418600183C600027D4
+S3152003042038634B1C4BFEC1993860FF9E4800001071
+S315200304308001007438600001901F00008001008451
+S315200304407C0803A683E1007C382100804E800020AF
+S315200304509421FFF07C0802A693C1000893E1000CC7
+S31520030460900100147C7E1B787C9F237838600000E3
+S315200304707FC4F3787FE5FB784BFED6A52C83FFFF5D
+S315200304804086000C3860FF9D4800006C2C830001D9
+S315200304904086000C386000014800005C2C83000273
+S315200304A040860018881E00002C80002D4086000CF4
+S315200304B03860FFFF480000407C83F8004184003405
+S315200304C03C60002738634B307FE4FB784BFEC0F15A
+S315200304D0386000007FC4F3787FE5FB784BFED64176
+S315200304E07C83F8004084FFEC3860FF9E48000008B8
+S315200304F038600000800100147C0803A683C100082D
+S3152003050083E1000C382100104E8000203D20002876
+S3152003051081030000812981B0896800007C0958AED7
+S31520030520700900284D8200203CE00028394800014C
+S31520030530914300007D09437889690001812781B0B1
+S315200305407C0958AE700900287D4853784082FFE025
+S315200305504E8000209421FFE87C0802A693810008A0
+S3152003056093A1000C93C1001093E100149001001C89
+S315200305707C7E1B787C9C23787CBD2B784BFFFF915C
+S31520030580807E0000880300002C8000243BE00000CE
+S315200305904086001438030001901E00003BA0000192
+S315200305A04800002C3C80002738844B5838A0000292
+S315200305B04BFE31D92C83000040860014801E000098
+S315200305C03BA0000130000002901E0000815E000067
+S315200305D0896A0000288B007F418500883D200028FA
+S315200305E0810981B02F1D00007D2858AE712000049B
+S315200305F04182000C392BFFD048000048419A006401
+S315200306007120000141820028380BFFBF5400063EAB
+S315200306102880001941850010380B00205400063E1F
+S31520030620480000087D605B787C0B0378380BFF9FBE
+S315200306305400063E2880000541850028392BFFA952
+S31520030640419A000C57E02036480000081C1F000A78
+S315200306507FE04A148D6A0001288B007F4085FF8C3A
+S31520030660801E00007C8A00004186001C915E0000EB
+S315200306707FC3F3784BFFFE9993FC0000386000009C
+S31520030680480000083860FFFF8001001C7C0803A691
+S315200306908381000883A1000C83C1001083E1001429
+S315200306A0382100184E8000209421FEB07C0802A633
+S315200306B09381014093A1014493C1014893E1014CE5
+S315200306C0900101547C7E1B787C9D23787CBC2B78FF
+S315200306D07CDF3378386100083880012C4BFE96394D
+S315200306E0813F00002C8900004186000C8009000010
+S315200306F090010014813F00042C89000041860010DC
+S31520030700800900002C8000004086000C3D20002834
+S3152003071080098B0090010138807F00082C8300001C
+S31520030720418600384BFE30397C651B782C85008149
+S3152003073038610074809F00087D20002655292FFEEE
+S315200307407D2900D07D2048F8540006307CA5483802
+S315200307507CA503784BFE30857FE3FB784800008930
+S315200307602C8300004186002C3C60002838638B08CC
+S31520030770388100F438A000044BFE0B113C6000289E
+S3152003078038638B0C388100F838A000014BFE0AFD34
+S315200307907FC3F378388101387FA5EB7838C1000809
+S315200307A07F87E3784800224D2C83FFFF4186001480
+S315200307B07FE3FB78480003213860000048000008E7
+S315200307C03860FFFF800101547C0803A68381014022
+S315200307D083A1014483C1014883E1014C382101509F
+S315200307E04E800020800300102C800000392000005A
+S315200307F0408602BC800300142C800000408602B091
+S31520030800800300182C800000408602A48003001C6D
+S315200308102C80000040860298800300202C80000054
+S315200308204086028C800300242C80000040860280B0
+S31520030830800300282C800000408602748003002C4D
+S315200308402C80000040860268800300302C80000044
+S315200308504086025C800300342C80000040860250D0
+S31520030860800300382C800000408602448003003C2D
+S315200308702C80000040860238800300402C80000034
+S315200308804086022C800300442C80000040860220F0
+S31520030890800300482C800000408602148003004C0D
+S315200308A02C80000040860208800300502C80000024
+S315200308B0408601FC800300542C800000408601F012
+S315200308C0800300582C800000408601E48003005CEE
+S315200308D02C800000408601D8800300602C80000015
+S315200308E0408601CC800300642C800000408601C032
+S315200308F0800300682C800000408601B48003006CCE
+S315200309002C800000408601A8800300702C80000004
+S315200309104086019C800300742C8000004086019051
+S31520030920800300782C800000408601848003007CAD
+S315200309302C80000040860178800300802C800000F4
+S315200309404086016C800300842C8000004086016071
+S31520030950800300882C800000408601548003008C8D
+S315200309602C80000040860148800300902C800000E4
+S315200309704086013C800300942C8000004086013091
+S31520030980800300982C800000408601248003009C6D
+S315200309902C80000040860118800300A02C800000D4
+S315200309A04086010C800300A42C80000040860100B1
+S315200309B0800300A82C800000408600F4800300AC4E
+S315200309C02C800000408600E8800300B02C800000C5
+S315200309D0408600DC800300B42C800000408600D0D3
+S315200309E0800300B82C800000408600C4800300BC2E
+S315200309F02C800000408600B8800300C02C800000B5
+S31520030A00408600AC800300C42C800000408600A0F2
+S31520030A10800300C82C80000040860094800300CC0D
+S31520030A202C80000040860088800300D02C800000A4
+S31520030A304086007C800300D42C8000004086007012
+S31520030A40800300D82C80000040860064800300DCED
+S31520030A502C80000040860058800300E02C80000094
+S31520030A604086004C800300E42C8000004086004032
+S31520030A70800300E82C80000040860034800300ECCD
+S31520030A802C80000040860028800300F02C80000084
+S31520030A904086001C800300F42C8000004086001052
+S31520030AA0800300F82C8000004186000C39200001C9
+S31520030AB04800001C800300FC3000FFFF7C0001106F
+S31520030AC07D290038300000017D2903787D234B786A
+S31520030AD04E8000209421FFE07C0802A6938100101B
+S31520030AE093A1001493C1001893E1001C90010024E4
+S31520030AF07C7C1B78817C00002C8B000041860014B3
+S31520030B003D20002881298B1080090010900B0000BE
+S31520030B10817C00042C8B0000418600143D20002894
+S31520030B2081298B1080090014900B0000807C00081B
+S31520030B302C830000418600483D20002880898B10A5
+S31520030B408804006C2C8000004086002C3C60002723
+S31520030B5038634B5C4BFEBA693C60002738634B9085
+S31520030B604BFEBA5D813C000838000000980900005E
+S31520030B704800000C3884006C4BFE2BB1807C000CA3
+S31520030B802C8300004186002C3D20002880898B1071
+S31520030B908804002C2C8000004086001038000000BA
+S31520030BA0980300004800000C3884002C4BFE2B7D54
+S31520030BB0801C00102C8000004186004C3800000069
+S31520030BC090010008388000013D20002880698B10A1
+S31520030BD038A10008386300EC480023117C7E1B797A
+S31520030BE041820018809C001080A100087FC3F378FF
+S31520030BF04BFE069948000010807C001038800004C4
+S31520030C004BFE9115801C00142C8000004186004465
+S31520030C103800000090010008388000023D2000289B
+S31520030C2080698B1038A10008386300EC480022BD88
+S31520030C307C7E1B7941820010813C0014A01E00009B
+S31520030C404800000C813C001438000000B009000065
+S31520030C50813C00182C890000418600AC80090004E1
+S31520030C602C800000418600A0380000009001000877
+S31520030C70388000033D20002880698B1038A10008A6
+S31520030C80386300EC480022657C7E1B793BA000007C
+S31520030C904182006C813C0018800100088BA900006A
+S31520030CA0540BF0BE7C9D58003BE000004CE62382AB
+S31520030CB07C000026540047FE7C0000D07FA9003824
+S31520030CC07D6000787D3D03787C9FE800408400307A
+S31520030CD07FC3F37838A00004813C001857E0103A0C
+S31520030CE0808900043BFF00017C8402144BFE059D92
+S31520030CF07C9FE8003BDE00044184FFD8813C00183A
+S31520030D009BA90000813C001C2C890000418600AC75
+S31520030D10800900042C800000418600A038000000D2
+S31520030D2090010008388000043D20002880698B103C
+S31520030D3038A10008386300EC480021B17C7E1B797A
+S31520030D403BA000004182006C813C001C800100080E
+S31520030D508BA90000540BF0BE7C9D58003BE000009D
+S31520030D604CE623827C000026540047FE7C0000D0FC
+S31520030D707FA900387D6000787D3D03787C9FE8005D
+S31520030D80408400307FC3F37838A00004813C001CE4
+S31520030D9057E0103A808900043BFF00017C8402144B
+S31520030DA04BFE04E97C9FE8003BDE00044184FFD828
+S31520030DB0813C001C9BA90000813C00202C8900005B
+S31520030DC0418600AC800900042C800000418600A0E7
+S31520030DD03800000090010008388000053D200028D7
+S31520030DE080698B1038A10008386300EC480020FD89
+S31520030DF07C7E1B793BA000004182006C813C002055
+S31520030E00800100088BA90000540BF0BE7C9D58007E
+S31520030E103BE000004CE623827C000026540047FE7C
+S31520030E207C0000D07FA900387D6000787D3D037863
+S31520030E307C9FE800408400307FC3F37838A0000409
+S31520030E40813C002057E0103A808900043BFF0001D3
+S31520030E507C8402144BFE04357C9FE8003BDE0004B1
+S31520030E604184FFD8813C00209BA90000813C0024BB
+S31520030E702C890000418600AC800900042C800000E8
+S31520030E80418600A038000000900100083880000643
+S31520030E903D20002880698B1038A10008386300ECB8
+S31520030EA0480020497C7E1B793BA000004182006CD0
+S31520030EB0813C0024800100088BA90000540BF0BE5E
+S31520030EC07C9D58003BE000004CE623827C000026F4
+S31520030ED0540047FE7C0000D07FA900387D6000784F
+S31520030EE07D3D03787C9FE800408400307FC3F37800
+S31520030EF038A00004813C002457E0103A808900047E
+S31520030F003BFF00017C8402144BFE03817C9FE80097
+S31520030F103BDE00044184FFD8813C00249BA90000CA
+S31520030F20813C00282C890000418600AC80090004FE
+S31520030F302C800000418600A03800000090010008A4
+S31520030F40388000073D20002880698B1038A10008CF
+S31520030F50386300EC48001F957C7E1B793BA000007C
+S31520030F604182006C813C0028800100088BA9000087
+S31520030F70540BF0BE7C9D58003BE000004CE62382D8
+S31520030F807C000026540047FE7C0000D07FA9003851
+S31520030F907D6000787D3D03787C9FE80040840030A7
+S31520030FA07FC3F37838A00004813C002857E0103A29
+S31520030FB0808900043BFF00017C8402144BFE02CD92
+S31520030FC07C9FE8003BDE00044184FFD8813C002857
+S31520030FD09BA90000813C002C2C890000418600AC93
+S31520030FE0800900042C800000418600A03800000000
+S31520030FF090010008388000083D20002880698B1066
+S3152003100038A10008386300EC48001EE17C7E1B797A
+S315200310103BA000004182006C813C002C800100082B
+S315200310208BA90000540BF0BE7C9D58003BE00000CA
+S315200310304CE623827C000026540047FE7C0000D029
+S315200310407FA900387D6000787D3D03787C9FE8008A
+S31520031050408400307FC3F37838A00004813C002C01
+S3152003106057E0103A808900043BFF00017C84021478
+S315200310704BFE02197C9FE8003BDE00044184FFD827
+S31520031080813C002C9BA90000813C00302C89000068
+S31520031090418600AC800900042C800000418600A014
+S315200310A03800000090010008388000093D20002800
+S315200310B080698B1038A10008386300EC48001E2D88
+S315200310C07C7E1B793BA000004182006C813C003072
+S315200310D0800100088BA90000540BF0BE7C9D5800AC
+S315200310E03BE000004CE623827C000026540047FEAA
+S315200310F07C0000D07FA900387D6000787D3D037891
+S315200311007C9FE800408400307FC3F37838A0000436
+S31520031110813C003057E0103A808900043BFF0001F0
+S315200311207C8402144BFE01657C9FE8003BDE0004B1
+S315200311304184FFD8813C00309BA90000813C0034C8
+S315200311402C890000418600AC800900042C80000015
+S31520031150418600A038000000900100083880000A6C
+S315200311603D20002880698B1038A10008386300ECE5
+S3152003117048001D797C7E1B793BA000004182006CD0
+S31520031180813C0034800100088BA90000540BF0BE7B
+S315200311907C9D58003BE000004CE623827C00002621
+S315200311A0540047FE7C0000D07FA900387D6000787C
+S315200311B07D3D03787C9FE800408400307FC3F3782D
+S315200311C038A00004813C003457E0103A808900049B
+S315200311D03BFF00017C8402144BFE00B17C9FE80098
+S315200311E03BDE00044184FFD8813C00349BA90000E8
+S315200311F0813C00382C890000418600AC800900041C
+S315200312002C800000418600A03800000090010008D1
+S315200312103880000B3D20002880698B1038A10008F8
+S31520031220386300EC48001CC57C7E1B793BA000007C
+S315200312304182006C813C0038800100088BA90000A4
+S31520031240540BF0BE7C9D58003BE000004CE6238205
+S315200312507C000026540047FE7C0000D07FA900387E
+S315200312607D6000787D3D03787C9FE80040840030D4
+S315200312707FC3F37838A00004813C003857E0103A46
+S31520031280808900043BFF00017C8402144BFDFFFD93
+S315200312907C9FE8003BDE00044184FFD8813C003874
+S315200312A09BA90000801C003C2C8000004186005C2A
+S315200312B038000000900100083880000C3D200028EB
+S315200312C080698B1038A10008386300EC48001C1D88
+S315200312D07C7E1B7941820028809C003C80A10008EB
+S315200312E07FC3F3784BFDFFA5817C003C8121000859
+S315200312F0380000007C0B49AE48000010813C003CBE
+S315200313003800000098090000801C00402C80000053
+S315200313104186004438000000900100083880000D03
+S315200313203D20002880698B1038A10008386300EC23
+S3152003133048001BB97C7E1B7941820010813C00400A
+S31520031340A01E00004800000C813C0040380000002D
+S31520031350B0090000801C00442C8000004186005CFC
+S3152003136038000000900100083880000E3D20002838
+S3152003137080698B1038A10008386300EC48001B6D88
+S315200313807C7E1B7941820028809C004480A1000832
+S315200313907FC3F3784BFDFEF5817C00448121000851
+S315200313A0380000007C0B49AE48000010813C004405
+S315200313B03800000098090000801C00482C8000009B
+S315200313C04186005C38000000900100083880000F39
+S315200313D03D20002880698B1038A10008386300EC73
+S315200313E048001B097C7E1B7941820028809C00488B
+S315200313F080A100087FC3F3784BFDFE91817C0048D2
+S3152003140081210008380000007C0B49AE48000010FB
+S31520031410813C00483800000098090000801C004CDD
+S315200314202C8000004186004C380000009001000803
+S31520031430388000103D20002880698B1038A10008D1
+S31520031440386300EC48001AA57C7E1B79418200187C
+S31520031450809C004C80A100087FC3F3784BFDFE2DB2
+S3152003146048000010807C004C388000044BFE88A97D
+S31520031470801C00502C8000004186005C3800000050
+S3152003148090010008388000113D20002880698B10C8
+S3152003149038A10008386300EC48001A517C7E1B797A
+S315200314A041820028809C005080A100087FC3F378E6
+S315200314B04BFDFDD9817C00508121000838000000B6
+S315200314C07C0B49AE48000010813C005038000000D8
+S315200314D098090000801C00542C8000004186005C83
+S315200314E03800000090010008388000123D200028B3
+S315200314F080698B1038A10008386300EC480019ED89
+S315200315007C7E1B7941820028809C005480A10008A0
+S315200315107FC3F3784BFDFD75817C00548121000840
+S31520031520380000007C0B49AE48000010813C005473
+S315200315303800000098090000801C00582C80000009
+S3152003154041860044380000009001000838800013CB
+S315200315503D20002880698B1038A10008386300ECF1
+S31520031560480019897C7E1B7941820010813C0058F2
+S31520031570881E00004800000C813C005838000000FB
+S3152003158098090000801C005C2C80000041860044E2
+S315200315903800000090010008388000143D20002800
+S315200315A080698B1038A10008386300EC4800193D88
+S315200315B07C7E1B7941820010813C005C881E0000E2
+S315200315C04800000C813C005C3800000098090000AC
+S315200315D0813C00602C890000418600AC8009000410
+S315200315E02C800000418600A03800000090010008EE
+S315200315F0388000153D20002880698B1038A100080B
+S31520031600386300EC480018E57C7E1B793BA000007C
+S315200316104182006C813C0060800100088BA9000098
+S31520031620540BE8FE7C9D58003BE000004CE62382E9
+S315200316307C000026540047FE7C0000D07FA900389A
+S315200316407D6000787D3D03787C9FE80040840030F0
+S315200316507FC3F37838A00008813C006057E0183830
+S31520031660808900043BFF00017C8402144BFDFC1D92
+S315200316707C9FE8003BDE00084184FFD8813C006064
+S315200316809BA90000801C00642C8000004186004436
+S315200316903800000090010008388000163D200028FD
+S315200316A080698B1038A10008386300EC4800183D88
+S315200316B07C7E1B7941820010813C0064A01E0000C1
+S315200316C04800000C813C006438000000B00900008B
+S315200316D0801C00682C8000004186004438000000EE
+S315200316E090010008388000173D20002880698B1060
+S315200316F038A10008386300EC480017F17C7E1B797B
+S3152003170041820010813C0068881E00004800000CBE
+S31520031710813C00683800000098090000801C006C9A
+S315200317202C80000041860044380000009001000808
+S31520031730388000183D20002880698B1038A10008C6
+S31520031740386300EC480017A57C7E1B794182001480
+S31520031750813C006C801E0000900900004800000CAC
+S31520031760813C006C93C90000813C00702C890000E9
+S31520031770418600A4800900042C800000418600983D
+S315200317803800000090010008388000193D20002809
+S3152003179080698B1038A10008386300EC4800174D88
+S315200317A07C7E1B793BA0000041820064813C007053
+S315200317B0800100088BA90000540BF87E7C9D5800FD
+S315200317C03BE000004CE623827C000026540047FEC3
+S315200317D07C0000D07FA900387D6000787D3D0378AA
+S315200317E07C9FE8004084002857EB083C3BFF000120
+S315200317F07C9FE800813C0070A01E00008129000424
+S315200318003BDE00027C0B4B2E4184FFE0813C0070C3
+S315200318109BA90000801C00742C8000004186004494
+S3152003182038000000900100083880001A3D20002867
+S3152003183080698B1038A10008386300EC480016AD88
+S315200318407C7E1B7941820010813C0074A01E00001F
+S315200318504800000C813C007438000000B0090000E9
+S31520031860801C00782C80000041860044380000004C
+S31520031870900100083880001B3D20002880698B10CA
+S3152003188038A10008386300EC480016617C7E1B797A
+S3152003189041820010813C0078881E00004800000C1D
+S315200318A0813C00783800000098090000801C007CE9
+S315200318B02C8000004186004C38000000900100086F
+S315200318C03880001C3D20002880698B1038A1000831
+S315200318D0386300EC480016157C7E1B79418200187C
+S315200318E0809C007C80A100087FC3F3784BFDF99D83
+S315200318F048000010807C007C388000044BFE84194D
+S31520031900801C00802C8000004186004438000000A3
+S31520031910900100083880001D3D20002880698B1027
+S3152003192038A10008386300EC480015C17C7E1B797A
+S3152003193041820010813C0080881E00004800000C74
+S31520031940813C00803800000098090000801C008438
+S315200319502C800000418600443800000090010008D6
+S315200319603880001E3D20002880698B1038A100088E
+S31520031970386300EC480015757C7E1B794182001084
+S31520031980813C0084881E00004800000C813C0084B2
+S315200319903800000098090000801C00882C80000075
+S315200319A04186004438000000900100083880001F5B
+S315200319B03D20002880698B1038A10008386300EC8D
+S315200319C0480015297C7E1B7941820010813C0088C2
+S315200319D0881E00004800000C813C00883800000067
+S315200319E098090000801C008C2C8000004186004C46
+S315200319F03800000090010008388000203D20002890
+S31520031A0080698B1038A10008386300EC480014DD88
+S31520031A107C7E1B7941820018809C008C80A1000863
+S31520031A207FC3F3784BFDF86548000010807C008C5B
+S31520031A30388000044BFE82E1813C00902C89000013
+S31520031A40418600AC800900042C800000418600A05A
+S31520031A503800000090010008388000213D2000282E
+S31520031A6080698B1038A10008386300EC4800147D88
+S31520031A707C7E1B793BA000004182006C813C009058
+S31520031A80800100088BA90000540BE8FE7C9D5800BA
+S31520031A903BE000004CE623827C000026540047FEF0
+S31520031AA07C0000D07FA900387D6000787D3D0378D7
+S31520031AB07C9FE800408400307FC3F37838A0000879
+S31520031AC0813C009057E01838808900043BFF0001D1
+S31520031AD07C8402144BFDF7B57C9FE8003BDE0008AF
+S31520031AE04184FFD8813C00909BA90000801C009470
+S31520031AF02C80000041860044380000009001000835
+S31520031B00388000223D20002880698B1038A10008E8
+S31520031B10386300EC480013D57C7E1B794182001084
+S31520031B20813C0094881E00004800000C813C0094F0
+S31520031B303800000098090000801C00982C800000C3
+S31520031B4041860044380000009001000838800023B5
+S31520031B503D20002880698B1038A10008386300ECEB
+S31520031B60480013897C7E1B7941820014813C0098AE
+S31520031B70801E0000900900004800000C813C00985C
+S31520031B8093C90000801C009C2C80000041860044E1
+S31520031B903800000090010008388000243D200028EA
+S31520031BA080698B1038A10008386300EC4800133D88
+S31520031BB07C7E1B7941820010813C009C881E00009C
+S31520031BC04800000C813C009C380000009809000066
+S31520031BD0801C00A02C8000004186004438000000B1
+S31520031BE090010008388000253D20002880698B104D
+S31520031BF038A10008386300EC480012F17C7E1B797B
+S31520031C0041820010813C00A0881E00004800000C81
+S31520031C10813C00A03800000098090000801C00A425
+S31520031C202C80000041860044380000009001000803
+S31520031C30388000263D20002880698B1038A10008B3
+S31520031C40386300EC480012A57C7E1B794182001480
+S31520031C50813C00A4801E0000900900004800000C6F
+S31520031C60813C00A493C90000801C00A82C8000009E
+S31520031C704186004438000000900100083880002780
+S31520031C803D20002880698B1038A10008386300ECBA
+S31520031C90480012597C7E1B7941820010813C00A8A2
+S31520031CA0881E00004800000C813C00A83800000074
+S31520031CB098090000801C00AC2C8000004186005C43
+S31520031CC03800000090010008388000283D200028B5
+S31520031CD080698B1038A10008386300EC4800120D88
+S31520031CE07C7E1B7941820028809C00AC80A1000861
+S31520031CF07FC3F3784BFDF595817C00AC81210008E9
+S31520031D00380000007C0B49AE48000010813C00AC33
+S31520031D103800000098090000813C00B02C8900009F
+S31520031D20418600AC800900042C800000418600A077
+S31520031D303800000090010008388000293D20002843
+S31520031D4080698B1038A10008386300EC4800119D88
+S31520031D507C7E1B793BA000004182006C813C00B055
+S31520031D60800100088BA90000540BF0BE7C9D58000F
+S31520031D703BE000004CE623827C000026540047FE0D
+S31520031D807C0000D07FA900387D6000787D3D0378F4
+S31520031D907C9FE800408400307FC3F37838A000049A
+S31520031DA0813C00B057E0103A808900043BFF0001D4
+S31520031DB07C8402144BFDF4D57C9FE8003BDE0004B3
+S31520031DC04184FFD8813C00B09BA90000813C00B42C
+S31520031DD02C890000418600AC800900042C80000079
+S31520031DE0418600A038000000900100083880002AB0
+S31520031DF03D20002880698B1038A10008386300EC49
+S31520031E00480010E97C7E1B793BA000004182006CD0
+S31520031E10813C00B4800100088BA90000540BF0BE5E
+S31520031E207C9D58003BE000004CE623827C00002684
+S31520031E30540047FE7C0000D07FA900387D600078DF
+S31520031E407D3D03787C9FE800408400307FC3F37890
+S31520031E5038A00004813C00B457E0103A808900047E
+S31520031E603BFF00017C8402144BFDF4217C9FE80098
+S31520031E703BDE00044184FFD8813C00B49BA90000CB
+S31520031E80801C00B82C8000004186005C38000000CE
+S31520031E90900100083880002B3D20002880698B1094
+S31520031EA038A10008386300EC480010417C7E1B797A
+S31520031EB041820028809C00B880A100087FC3F37864
+S31520031EC04BFDF3C9817C00B881210008380000004E
+S31520031ED07C0B49AE48000010813C00B83800000056
+S31520031EE098090000813C00BC2C890000418600AC87
+S31520031EF0800900042C800000418600A038000000E1
+S31520031F00900100083880002C3D20002880698B1022
+S31520031F1038A10008386300EC48000FD17C7E1B797A
+S31520031F203BA000004182006C813C00BC800100087C
+S31520031F308BA90000540BF0BE7C9D58003BE00000AB
+S31520031F404CE623827C000026540047FE7C0000D00A
+S31520031F507FA900387D6000787D3D03787C9FE8006B
+S31520031F60408400307FC3F37838A00004813C00BC52
+S31520031F7057E0103A808900043BFF00017C84021459
+S31520031F804BFDF3097C9FE8003BDE00044184FFD828
+S31520031F90813C00BC9BA90000813C00C02C89000029
+S31520031FA0418600AC800900042C800000418600A0F5
+S31520031FB038000000900100083880002D3D200028BD
+S31520031FC080698B1038A10008386300EC48000F1D88
+S31520031FD07C7E1B793BA000004182006C813C00C0C3
+S31520031FE0800100088BA90000540BF0BE7C9D58008D
+S31520031FF03BE000004CE623827C000026540047FE8B
+S315200320007C0000D07FA900387D6000787D3D037871
+S315200320107C9FE800408400307FC3F37838A0000417
+S31520032020813C00C057E0103A808900043BFF000141
+S315200320307C8402144BFDF2557C9FE8003BDE0004B2
+S315200320404184FFD8813C00C09BA90000801C00C4AA
+S315200320502C800000418600443800000090010008CF
+S315200320603880002E3D20002880698B1038A1000877
+S31520032070386300EC48000E757C7E1B794182001084
+S31520032080813C00C4881E00004800000C813C00C42B
+S315200320903800000098090000801C00C82C8000002E
+S315200320A04186005C38000000900100083880002F2C
+S315200320B03D20002880698B1038A10008386300EC86
+S315200320C048000E297C7E1B7941820028809C00C80B
+S315200320D080A100087FC3F3784BFDF1B1817C00C852
+S315200320E081210008380000007C0B49AE480000100F
+S315200320F0813C00C83800000098090000813C00CCD0
+S315200321002C890000418600AC800900042C80000045
+S31520032110418600A038000000900100083880003076
+S315200321203D20002880698B1038A10008386300EC15
+S3152003213048000DB97C7E1B793BA000004182006CD0
+S31520032140813C00CC800100088BA90000540BF0BE13
+S315200321507C9D58003BE000004CE623827C00002651
+S31520032160540047FE7C0000D07FA900387D600078AC
+S315200321707D3D03787C9FE800408400307FC3F3785D
+S3152003218038A00004813C00CC57E0103A8089000433
+S315200321903BFF00017C8402144BFDF0F17C9FE80099
+S315200321A03BDE00044184FFD8813C00CC9BA9000080
+S315200321B0813C00D02C890000418600AC80090004B4
+S315200321C02C800000418600A0380000009001000802
+S315200321D0388000313D20002880698B1038A1000803
+S315200321E0386300EC48000D057C7E1B793BA000007C
+S315200321F04182006C813C00D0800100088BA900003D
+S31520032200540BF0BE7C9D58003BE000004CE6238235
+S315200322107C000026540047FE7C0000D07FA90038AE
+S315200322207D6000787D3D03787C9FE8004084003004
+S315200322307FC3F37838A00004813C00D057E0103ADE
+S31520032240808900043BFF00017C8402144BFDF03D92
+S315200322507C9FE8003BDE00044184FFD8813C00D00C
+S315200322609BA90000801C00D42C8000004186005CC2
+S315200322703800000090010008388000403D200028E7
+S3152003228080698B1038A10008386300EC48000C5D88
+S315200322907C7E1B7941820028809C00D480A1000883
+S315200322A07FC3F3784BFDEFE5817C00D481210008C1
+S315200322B0380000007C0B49AE48000010813C00D456
+S315200322C03800000098090000813C00D82C890000C2
+S315200322D0418600AC800900042C800000418600A0C2
+S315200322E03800000090010008388000413D20002876
+S315200322F080698B1038A10008386300EC48000BED89
+S315200323007C7E1B793BA000004182006C813C00D877
+S31520032310800100088BA90000540BF0BE7C9D580059
+S315200323203BE000004CE623827C000026540047FE57
+S315200323307C0000D07FA900387D6000787D3D03783E
+S315200323407C9FE800408400307FC3F37838A00004E4
+S31520032350813C00D857E0103A808900043BFF0001F6
+S315200323607C8402144BFDEF257C9FE8003BDE0004B2
+S315200323704184FFD8813C00D89BA90000813C00DC26
+S315200323802C890000418600AC800900042C800000C3
+S31520032390418600A0380000009001000838800044E0
+S315200323A03D20002880698B1038A10008386300EC93
+S315200323B048000B397C7E1B793BA000004182006CD0
+S315200323C0813C00DC800100088BA90000540BF0BE81
+S315200323D07C9D58003BE000004CE623827C000026CF
+S315200323E0540047FE7C0000D07FA900387D6000782A
+S315200323F07D3D03787C9FE800408400307FC3F378DB
+S3152003240038A00004813C00DC57E0103A80890004A0
+S315200324103BFF00017C8402144BFDEE717C9FE80098
+S315200324203BDE00044184FFD8813C00DC9BA90000ED
+S31520032430813C00E02C890000418600AC8009000421
+S315200324402C800000418600A038000000900100087F
+S31520032450388000453D20002880698B1038A100086C
+S31520032460386300EC48000A857C7E1B793BA000007C
+S315200324704182006C813C00E0800100088BA90000AA
+S31520032480540BF0BE7C9D58003BE000004CE62382B3
+S315200324907C000026540047FE7C0000D07FA900382C
+S315200324A07D6000787D3D03787C9FE8004084003082
+S315200324B07FC3F37838A00004813C00E057E0103A4C
+S315200324C0808900043BFF00017C8402144BFDEDBD93
+S315200324D07C9FE8003BDE00044184FFD8813C00E07A
+S315200324E09BA90000813C00E42C890000418600ACB6
+S315200324F0800900042C800000418600A038000000DB
+S3152003250090010008388000463D20002880698B1002
+S3152003251038A10008386300EC480009D17C7E1B797A
+S315200325203BA000004182006C813C00E4800100084E
+S315200325308BA90000540BF0BE7C9D58003BE00000A5
+S315200325404CE623827C000026540047FE7C0000D004
+S315200325507FA900387D6000787D3D03787C9FE80065
+S31520032560408400307FC3F37838A00004813C00E424
+S3152003257057E0103A808900043BFF00017C84021453
+S315200325804BFDED097C9FE8003BDE00044184FFD828
+S31520032590813C00E49BA90000813C00E82C890000D3
+S315200325A0418600AC800900042C800000418600A0EF
+S315200325B03800000090010008388000473D2000289D
+S315200325C080698B1038A10008386300EC4800091D88
+S315200325D07C7E1B793BA000004182006C813C00E895
+S315200325E0800100088BA90000540BF0BE7C9D580087
+S315200325F03BE000004CE623827C000026540047FE85
+S315200326007C0000D07FA900387D6000787D3D03786B
+S315200326107C9FE800408400307FC3F37838A0000411
+S31520032620813C00E857E0103A808900043BFF000113
+S315200326307C8402144BFDEC557C9FE8003BDE0004B2
+S315200326404184FFD8813C00E89BA90000813C00EC33
+S315200326502C890000418600AC800900042C800000F0
+S31520032660418600A038000000900100083880004809
+S315200326703D20002880698B1038A10008386300ECC0
+S31520032680480008697C7E1B793BA000004182006CD0
+S31520032690813C00EC800100088BA90000540BF0BE9E
+S315200326A07C9D58003BE000004CE623827C000026FC
+S315200326B0540047FE7C0000D07FA900387D60007857
+S315200326C07D3D03787C9FE800408400307FC3F37808
+S315200326D038A00004813C00EC57E0103A80890004BE
+S315200326E03BFF00017C8402144BFDEBA17C9FE80099
+S315200326F03BDE00044184FFD8813C00EC9BA900000B
+S31520032700813C00F02C890000418600AC800900043E
+S315200327102C800000418600A03800000090010008AC
+S31520032720388000493D20002880698B1038A1000895
+S31520032730386300EC480007B57C7E1B793BA000007C
+S315200327404182006C813C00F0800100088BA90000C7
+S31520032750540BF0BE7C9D58003BE000004CE62382E0
+S315200327607C000026540047FE7C0000D07FA9003859
+S315200327707D6000787D3D03787C9FE80040840030AF
+S315200327807FC3F37838A00004813C00F057E0103A69
+S31520032790808900043BFF00017C8402144BFDEAED93
+S315200327A07C9FE8003BDE00044184FFD8813C00F097
+S315200327B09BA90000813C00F42C890000418600ACD3
+S315200327C0800900042C800000418600A03800000008
+S315200327D0900100083880004A3D20002880698B102C
+S315200327E038A10008386300EC480007017C7E1B797A
+S315200327F03BA000004182006C813C00F4800100086C
+S315200328008BA90000540BF0BE7C9D58003BE00000D2
+S315200328104CE623827C000026540047FE7C0000D031
+S315200328207FA900387D6000787D3D03787C9FE80092
+S31520032830408400307FC3F37838A00004813C00F441
+S3152003284057E0103A808900043BFF00017C84021480
+S315200328504BFDEA397C9FE8003BDE00044184FFD828
+S31520032860813C00F49BA90000813C00F82C890000E0
+S31520032870418600AC800900042C800000418600A01C
+S3152003288038000000900100083880004B3D200028C6
+S3152003289080698B1038A10008386300EC4800064D88
+S315200328A07C7E1B793BA000004182006C813C00F8B2
+S315200328B0800100088BA90000540BF0BE7C9D5800B4
+S315200328C03BE000004CE623827C000026540047FEB2
+S315200328D07C0000D07FA900387D6000787D3D037899
+S315200328E07C9FE800408400307FC3F37838A000043F
+S315200328F0813C00F857E0103A808900043BFF000131
+S315200329007C8402144BFDE9857C9FE8003BDE0004B2
+S315200329104184FFD8813C00F89BA90000813C00FC40
+S315200329202C890000418600AC800900042C8000001D
+S31520032930418600A038000000900100083880004C32
+S315200329403D20002880698B1038A10008386300ECED
+S31520032950480005997C7E1B793BA000004182006CD0
+S31520032960813C00FC800100088BA90000540BF0BEBB
+S315200329707C9D58003BE000004CE623827C00002629
+S31520032980540047FE7C0000D07FA900387D60007884
+S315200329907D3D03787C9FE800408400307FC3F37835
+S315200329A038A00004813C00FC57E0103A80890004DB
+S315200329B03BFF00017C8402144BFDE8D17C9FE80099
+S315200329C03BDE00044184FFD8813C00FC9BA9000028
+S315200329D0800100247C0803A68381001083A10014B0
+S315200329E083C1001883E1001C382100204E8000207B
+S315200329F09421FF887C0802A67D80002692810048C8
+S31520032A0092A1004C92C1005092E1005493010058C8
+S31520032A109321005C93410060936100649381006875
+S31520032A2093A1006C93C1007093E100749001007C24
+S31520032A30918100447C9523787CDA33797CB72B7893
+S31520032A407CFB3B783B000001418200104800532168
+S31520032A507C7E1B79408200144BFE1C413C000049BE
+S31520032A606000000148000078807E0000A89E0016C2
+S31520032A704800F1BD7C791B7941820030386100180A
+S31520032A803D200028A97E00163929AE901D6B00C073
+S31520032A903C8000277D6B4A1480AB00A838844BAC5E
+S31520032AA038A500084BFE9F7D38610038801500004D
+S31520032AB07FC4F37890010038480085252C830000D5
+S31520032AC041860028A01E001A700900024082001CBD
+S31520032AD04BFE1BC93C000049600000039003000025
+S31520032AE03860FFFF480002C03D60002839200000FF
+S31520032AF0A01E001A912B8B1460000041B01E001AF1
+S31520032B004BFF63F57C741B78386100387FC4F378F8
+S31520032B103D200028801A000C83898B0490010038FD
+S31520032B20480084BD2C83000038000000408600083E
+S31520032B30801A000C9001003C4BFD5C55893E0095A4
+S31520032B40881E0094897E00937D2902147D295A14B8
+S31520032B50380000057C0903D6388001481C0000058F
+S31520032B603FA000287D2048507EC919D6387D9EE88F
+S31520032B704BFE71A53BBD9EE8387D001C7F44D37870
+S31520032B8038A0012C4BFE0A7D3BE000019BFD001C77
+S31520032B904BFF6365881D001E2C800000907D00205E
+S31520032BA0408600249BFD001D38000006981D001E4C
+S31520032BB0387E00903C80002838849F2038A0000669
+S31520032BC04BFDE6C92C97000038000044B01D0014C5
+S31520032BD04186000CB2FD00164800000C3800004365
+S31520032BE0B01D00163CC0002838C69EE838000134C4
+S31520032BF0B006001838000000B006001A386000112D
+S31520032C003881003C7EA5AB7838E001484800327510
+S31520032C102C990000418600183C60002338632CEC75
+S31520032C20A8BE001638810018480000143C60002313
+S31520032C3038632CEC3880000038A0000048000F4988
+S31520032C402C83FFFF4186FE9C7FC3F3783C800028BC
+S31520032C5038849EE838A001484800336D2C83FFFF53
+S31520032C60408600342C9900004186001C3C600023DA
+S31520032C7038632CECA8BE001638810018480010C90A
+S31520032C804BFFFE603C60002338632CEC480010B9F0
+S31520032C904BFFFE504BFD5AF92C9800007FBC19D6EA
+S31520032CA04186000C7FBDB2143B0000003FE00023A9
+S31520032CB02D1900003D20002880098B142C8000004C
+S31520032CC041860040418A0018387F2CECA8BE0016A6
+S31520032CD038810018480010714800000C387F2CEC0E
+S31520032CE0480010653D20002880698B107F44D378E7
+S31520032CF038A0012C4BFDE59538600000480000A85C
+S31520032D00386000014BFF53592C9B00004186004439
+S31520032D10377BFFFF41820008480000384BFE197DB0
+S31520032D203C0000496000000690030000418A001819
+S31520032D30387F2CECA8BE00163881001848001009ED
+S31520032D404BFFFDA0387F2CEC48000FFD4BFFFD9475
+S31520032D507FA0EB782C8000003BBDFFFF4185FF5809
+S31520032D60579C083C2C9C00117C00002654002FFE07
+S31520032D707C0000D07C0900F8552906F67F800038B0
+S31520032D807C1C4B784BFF61717C7D1B784BFD5A0174
+S31520032D907FB4E8507FBD1B963D200028B3A99F0C26
+S31520032DA04BFFFEA88001007C818100447C0803A69A
+S31520032DB08281004882A1004C82C1005082E10054E6
+S31520032DC0830100588321005C834100608361006492
+S31520032DD08381006883A1006C83C1007083E1007442
+S31520032DE07D820120382100784E8000209421FFE83F
+S31520032DF07C0802A69381000893A1000C93C10010BE
+S31520032E0093E100149001001C3FE00028801F8B14DF
+S31520032E102C800000408600A02C85000E408500985B
+S31520032E20A004000C2C8008004086008C3864000E19
+S31520032E303F800028389CA0303BA5FFF27FA5EB7886
+S31520032E404BFDE5FD387CA0307FA4EB7838A000113C
+S31520032E50480030E97C631B794182005CA0030002B1
+S31520032E602C800044408600503FA0002838030008E9
+S31520032E70901D8B10880300082C80000240860038A2
+S31520032E80386300243C80002838849F2038A000061D
+S31520032E904BFE6DB12C8300004086001C3D6000284C
+S31520032EA0813D8B10800B9F08812900047C890000BB
+S31520032EB04186000C386000004800001038000001ED
+S31520032EC0901F8B14386000018001001C7C0803A628
+S31520032ED08381000883A1000C83C1001083E10014C1
+S31520032EE0382100184E8000209421FFE87C0802A692
+S31520032EF093A1000C93C1001093E100149001001CD0
+S31520032F00200500007D202914216300007C0B191461
+S31520032F107D2B03797C9D23787CBE2B787C7F1B7845
+S31520032F20418200184BFE17753C00004960000001E2
+S31520032F3090030000480000E8381DFFFF288000FDAD
+S31520032F40408500184BFE17553C00004960000005DC
+S31520032F5090030000480000C83C60002838638B08B3
+S31520032F607FE4FB7838A000044BFE6CD92C83000049
+S31520032F70418600344BFE17253C00004960000002C1
+S31520032F8090030000480000984BFE17113C000049AF
+S31520032F9060000004900300004800007C38630002B0
+S31520032FA048000080881F00042C8000FF387F00041F
+S31520032FB041860064389F004057AB063E7C83204001
+S31520032FC040840054880300002C8000004186003C86
+S31520032FD0380300017C8020404084FFB08923000110
+S31520032FE0380900027C0302147C802040913E0000B5
+S31520032FF04185FF98880300007C8058004186FFA006
+S31520033000380900017C6302148C0300012C8000FF25
+S315200330104086FFAC38000000901E00003860000098
+S315200330208001001C7C0803A683A1000C83C1001029
+S3152003303083E10014382100184E8000209421FFE0FC
+S315200330407C0802A693E1001C900100247C3F0B78A8
+S31520033050907F0008909F000C813F0008800900683C
+S315200330602C80000041860024813F00088169006886
+S31520033070917F0014807F0008809F000C817F0014BD
+S315200330807D6803A64E80002181610000800B000429
+S315200330907C0803A683EBFFFC7D615B784E800020D2
+S315200330A09421FFE87C0802A693E100149001001CFA
+S315200330B07C3F0B78907F0008909F000C813F00088F
+S315200330C080690078809F000C4BFF186D816100009A
+S315200330D0800B00047C0803A683EBFFFC7D615B78F1
+S315200330E04E8000209421FFE87C0802A693E1001479
+S315200330F09001001C7C3F0B78907F0008813F0008DD
+S31520033100806900784BFF16D581610000800B00048F
+S315200331107C0803A683EBFFFC7D615B784E80002051
+S315200331209421FFE893E100147C3F0B78907F0008FD
+S31520033130909F000C813F0008817F0008815F000C6F
+S315200331407D4050F8816B007C7D6000389009007CBF
+S315200331508161000083EBFFFC7D615B784E8000205C
+S315200331609421FFE893E100147C3F0B78907F0008BD
+S31520033170909F000C813F0008817F0008800B007C14
+S31520033180817F000C7C005B789009007C81610000C4
+S3152003319083EBFFFC7D615B784E8000209421FFE862
+S315200331A093E100147C3F0B78907F0008813F000851
+S315200331B08069007C480000048161000083EBFFFCEA
+S315200331C07D615B784E8000209421FFE87C0802A66F
+S315200331D093E100149001001C7C3F0B78907F00083C
+S315200331E0813F0008380902887C0303784BFE6EB5BD
+S315200331F07C601B787C03037848000004816100000F
+S31520033200800B00047C0803A683EBFFFC7D615B78BF
+S315200332104E8000209421FFE87C0802A693E1001447
+S315200332209001001C7C3F0B78907F0008813F0008AB
+S31520033230380902887C0303784BFE6F457C601B7834
+S315200332407C0303784800000481610000800B00049E
+S315200332507C0803A683EBFFFC7D615B784E80002010
+S315200332609421FFE87C0802A693E100149001001C38
+S315200332707C3F0B78907F0008807F00084BFE6F9D74
+S315200332807C601B787C03037848000004816100007E
+S31520033290800B00047C0803A683EBFFFC7D615B782F
+S315200332A04E8000209421FFE893E100147C3F0B78A5
+S315200332B0907F0008813F0008380900087C030378C3
+S315200332C0480000048161000083EBFFFC7D615B788D
+S315200332D04E8000209421FFE87C0802A693E1001487
+S315200332E09001001C7C3F0B78907F0008813F0008EB
+S315200332F0380902887C0303784BFE70B9813F0008A6
+S31520033300380902987C0303784BFE70A9816100007B
+S31520033310800B00047C0803A683EBFFFC7D615B78AE
+S315200333204E8000209421FFD87C0802A693E1002436
+S315200333309001002C7C3F0B78907F0008909F000C17
+S3152003334090BF001090DF001490FF0018911F001CFF
+S31520033350807F0008388002044BFE69BD813F000848
+S31520033360801F001490090110813F000838090114B9
+S31520033370813F0008807F00107C04037880A9011018
+S315200333804BFDDF09813F0008801F000C90090104D3
+S31520033390813F0008801F001890090108813F00081B
+S315200333A0801F001C9009010C3860000048000004AF
+S315200333B081610000800B00047C0803A683EBFFFCDD
+S315200333C07D615B784E8000209421FFE093E1001C11
+S315200333D07C3F0B78907F0008909F000C90BF0010D5
+S315200333E0801F000C2C800001418600482C800001A0
+S315200333F0418500102C8000004186001C48000018DF
+S315200334002C800002418600482C8000034186005C04
+S3152003341048000004813F0008817F0008800B01409B
+S31520033420817F00107C005A149009014048000058FF
+S31520033430813F0008817F0008800B0134817F0010C3
+S315200334407C005A14900901344800003C813F00084F
+S31520033450817F0008800B0158817F00107C005A145D
+S315200334609009015848000020813F0008817F000809
+S31520033470800B014C817F00107C005A149009014C6B
+S315200334804800000438600000480000048161000001
+S3152003349083EBFFFC7D615B784E8000209421FFD86F
+S315200334A07C0802A693E100249001002C7C3F0B7834
+S315200334B0907F0008909F000C90BF001090DF0014AF
+S315200334C090FF0018911F001C813F0008801F000CED
+S315200334D0900900643860000D4BFF1F697C601B78E0
+S315200334E0813F000890090078813F00088009007811
+S315200334F02C8000004086000C3860FFFF480000D86F
+S31520033500813F0008380000009009007C813F0008B5
+S31520033510380902987C0303784BFE6AC9807F001022
+S315200335204BFE023D7C601B782880000840850014F2
+S31520033530801F001031200004380000009809000085
+S31520033540813F0008380900087C030378809F001018
+S315200335504BFE01D9807F001C4BFE02057C601B7845
+S315200335602880005040850014801F001C3120000451
+S315200335703800000098090000813F0008380900142C
+S315200335807C030378809F001C4BFE01A1813F00082A
+S31520033590801F001490090010813F0008801F001827
+S315200335A090090080813F0008380902887C0303784C
+S315200335B04BFE6A31813F00083800000090090294CF
+S315200335C0813F000838000000900902A438600000FB
+S315200335D04800000481610000800B00047C0803A6D8
+S315200335E083EBFFFC7D615B784E8000209421FFE80E
+S315200335F093E100147C3F0B78907F0008909F000C8A
+S31520033600813F00083800000190090074813F0008BB
+S31520033610801F000C9009007C3860000048000004DD
+S315200336208161000083EBFFFC7D615B784E80002087
+S315200336309421FFE07C0802A693E1001C900100245C
+S315200336407C3F0B78907F0008909F000C90BF001062
+S31520033650813F0008817F0008814B001C80090008F8
+S31520033660812A00007C0900502C80000D4085003003
+S31520033670813F0008817F0008800B00083160FFF23C
+S3152003368091690008813F0008817F0008800B000CA8
+S315200336903160000E9169000C48000018807F0008F5
+S315200336A03880000E38A000014801BCE5907F000851
+S315200336B0801F00082C80000041860030813F0008CF
+S315200336C088090011540907BC5520063E2C800000AA
+S315200336D041860018813F0008817F0008800B00186F
+S315200336E03160000E91690018801F00082C800000AD
+S315200336F041860060813F0010817F0008815F0010B2
+S3152003370080690008808B000880AA000C4BFDDB7DB6
+S31520033710813F000C817F0008815F0010800B000829
+S31520033720816A000C7C005A14817F000C8069000892
+S315200337307C04037880AB000C4BFDDB51817F0008B2
+S31520033740812B0008817F0010A00B0012B009000C0A
+S31520033750807F00084800000481610000800B00047C
+S315200337607C0803A683EBFFFC7D615B784E800020FB
+S315200337709421FFE07C0802A693E1001C900100241B
+S315200337807C3F0B78907F0008909F000C90BF001021
+S31520033790813F0008817F0008814B001C80090008B7
+S315200337A0812A00007C0900502C80000D40850030C2
+S315200337B0813F0008817F0008800B00083160FFF2FB
+S315200337C091690008813F0008817F0008800B000C67
+S315200337D03160000E9169000C48000018807F0008B4
+S315200337E03880000E38A000014801BBA5907F000851
+S315200337F0801F00082C80000041860030813F00088E
+S3152003380088090011540907BC5520063E2C80000068
+S3152003381041860018813F0008817F0008800B00182D
+S315200338203160000E91690018801F00082C8000006B
+S3152003383041860050813F0010817F0008806900087F
+S31520033840808B000838A000064BFDDA41813F000C2F
+S31520033850817F0008814B0008380A0006806900082A
+S315200338607C04037838A000064BFDDA21817F00080B
+S31520033870812B0008817F0010A00B0012B009000CD9
+S31520033880807F00084800000481610000800B00044B
+S315200338907C0803A683EBFFFC7D615B784E800020CA
+S315200338A09421FFD893E100247C3F0B78907F000876
+S315200338B0909F000C813F000C380000009009000007
+S315200338C0813F000C3800000690090004813F000C5C
+S315200338D03800000690090008813F000C38000006D6
+S315200338E09009000C813F000880090008901F0010F2
+S315200338F0813F0010A009000CB01F0018A13F00183B
+S315200339005520043E288005DB41850060801F00107A
+S315200339103120000E913F0014813F00148969000075
+S315200339205560063E2C8000AA40860020813F001465
+S31520033930A0090006B01F0018813F000C38000016AE
+S315200339409009001C48000020813F000C380000111C
+S315200339509009001C813F0014880900005409063E83
+S31520033960B13F001848000010813F000C3800000EBC
+S315200339709009001C813F000CA01F0018540B043E25
+S315200339809169001838600000480000048161000036
+S3152003399083EBFFFC7D615B784E8000209421FFD86A
+S315200339A07C0802A693E100249001002C7C3F0B782F
+S315200339B0907F0008909F000C90BF001090DF0014AA
+S315200339C090FF0018801F000C2C80000041860038D1
+S315200339D0807F0008809F000C4800FA7D7C601B785E
+S315200339E0901F000C813F000C817F000C800B000888
+S315200339F03160000691690008813F000C38000006FB
+S31520033A009009000C801F00102C80000041860024A2
+S31520033A10807F0008809F00104800FA3D7C601B7859
+S31520033A20901F0010813F0010380000069009000CFB
+S31520033A30801F00142C80000041860038807F0008F8
+S31520033A40809F00144800FA117C601B78901F001495
+S31520033A50813F0014817F0014800B0008316000062B
+S31520033A6091690008813F0014380000069009000C74
+S31520033A70801F00182C80000041860024807F0008C8
+S31520033A80809F00184800F9D17C601B78901F00188E
+S31520033A90813F0018380000069009000C38600000AA
+S31520033AA04800000481610000800B00047C0803A603
+S31520033AB083EBFFFC7D615B784E8000209421FFD849
+S31520033AC07C0802A693A1001C93C1002093E1002445
+S31520033AD09001002C7C7E1B787C892378380000009B
+S31520033AE09801000938000010980100087CA32B7860
+S31520033AF07CC4337838A000007FC6F37880090000A1
+S31520033B008169000481490008A109000C3921000AB2
+S31520033B1038E0FFFF9001000A9169000491490008EB
+S31520033B20B109000C48005DC97C7F1B7941820038AE
+S31520033B304801EEAD7C7D1B787FC3F3788003006458
+S31520033B407C0803A67FE4FB7838A1000838C0000070
+S31520033B504E8000217FA3EB784801EF5538600000A3
+S31520033B60480000083860FFFF8001002C7C0803A66C
+S31520033B7083A1001C83C1002083E10024382100286F
+S31520033B804E8000209421FFE07C0802A6938100103A
+S31520033B9093A1001493C1001893E1001C9001002403
+S31520033BA07C9E23797C7C1B787CBD2B7841820118F3
+S31520033BB03FE00028801F8B382C8000004086002899
+S31520033BC03D20002880098B182C8000004086001099
+S31520033BD03C60002838638B204BFE640938000001C3
+S31520033BE0901F8B383C60002838638B204BFE6591F1
+S31520033BF07C7F1B7941820040387F00107FC4F37895
+S31520033C004BFDFAE92C8300004086001C801F001818
+S31520033C107C80E80040860010801F00087C80E0003E
+S31520033C20418600887FE3FB784BFE65F17C7F1B7919
+S31520033C304082FFC83860001C4BFED8597C7F1B7915
+S31520033C40418200687FC3F3787FA4EB784800DF25A1
+S31520033C507C631B7941820054806302A42C83000079
+S31520033C6040860050906100087FC3F3787FA4EB78E9
+S31520033C703CA0002338A5418C38C0000038E0000062
+S31520033C8039000000392001013D400027394A4BB055
+S31520033C904800D3192C830000907F000C4086001423
+S31520033CA07FE3FB784BFED8193860FFFF4800007886
+S31520033CB0387F00107FC4F3784BFDFA7193BF001849
+S31520033CC04800004C3860001C4BFED7C97C7F1B790B
+S31520033CD04182FFD83D600028800B8B182C80000082
+S31520033CE04086002C3D20002880098B382C8000003C
+S31520033CF03D2000233929405C912B8B1840860010E8
+S31520033D003C60002838638B204BFE62D9939F0008C2
+S31520033D103C60002838638B207FE4FB784BFE62D916
+S31520033D2038600000800100247C0803A683810010EC
+S31520033D3083A1001483C1001883E1001C38210020CD
+S31520033D404E8000209421FFD87C0802A6936100149C
+S31520033D509381001893A1001C93C1002093E10024B2
+S31520033D609001002C7C9E23797C7D1B787CBB2B7851
+S31520033D70418200A43C60002838638B204BFE6401FB
+S31520033D807C7F1B79418200E83F800028387F001022
+S31520033D90813F0000815F00047FC4F37891210008EE
+S31520033DA09141000C4BFDF9452C83000040860054BD
+S31520033DB0801F00087C80E80040860048801F00188A
+S31520033DC07C80D8004086003C387C8B204BFE62D515
+S31520033DD02C83000140860018807F000C3880010167
+S31520033DE03CA0002338A5418C4800D8D9387C8B20A9
+S31520033DF07FE4FB784BFE62B57FE3FB784BFED6C1AF
+S31520033E00386100084BFE64157C7F1B794082FF8056
+S31520033E104800005C3C60002838638B204BFE6361BE
+S31520033E207C7F1B79418200483FC00028813F0000E8
+S31520033E30815F0004912100089141000C801F000836
+S31520033E407C80E80040860018387E8B207FE4FB7850
+S31520033E504BFE62597FE3FB784BFED665386100083B
+S31520033E604BFE63B97C7F1B794082FFC43FE0002869
+S31520033E70387F8B204BFE622D2C830000418500204A
+S31520033E803D2000283800000090098B383D2000286B
+S31520033E9090098B18387F8B204BFE65198001002CE7
+S31520033EA07C0803A6836100148381001883A1001C68
+S31520033EB083C1002083E10024382100284E8000207E
+S31520033EC09421FFF07C0802A693C1000893E1000C1D
+S31520033ED0900100147C7E1B783860001C4BFED5B500
+S31520033EE07C7F1B794082000C3860FFFF480000442A
+S31520033EF03D600028800B8B1C2C8000004086001C14
+S31520033F003D200023392940F4912B8B1C3C6000284B
+S31520033F1038638B2C4BFE60CD93DF00083C60002872
+S31520033F2038638B2C7FE4FB784BFE60CD3860000032
+S31520033F30800100147C0803A683C1000883E1000CDA
+S31520033F40382100104E8000209421FFE07C0802A631
+S31520033F5093A1001493C1001893E1001C900100243F
+S31520033F607C7E1B783C60002838638B2C4BFE6211C9
+S31520033F707C7F1B79418200483FA00028813F0000B7
+S31520033F80815F0004912100089141000C801F0008E5
+S31520033F907C80F00040860018387D8B2C7FE4FB78EC
+S31520033FA04BFE61097FE3FB784BFED515386100088C
+S31520033FB04BFE62697C7F1B794082FFC43FE0002869
+S31520033FC0387F8B2C4BFE60DD2C8300004185001847
+S31520033FD03D2000283800000090098B1C387F8B2C4D
+S31520033FE04BFE63D1800100247C0803A683A1001421
+S31520033FF083C1001883E1001C382100204E80002055
+S315200340009421FFC87C0802A69341002093610024D3
+S315200340109381002893A1002C93C1003093E10034AF
+S315200340209001003C7C7B1B787C9D23787CBC2B7980
+S315200340307CDF33783BC000007CFA3B784182002446
+S315200340407FA3EB78480016692C83FFFF4086001C6C
+S315200340507FA3EB784800756D2C83FFFF4086000C09
+S315200340603860FFFF480000AC3800001098010008B4
+S3152003407038000002980100099061000C9061001835
+S31520034080386100187F64DB7848006F552C83000065
+S31520034090418600203C60002838638D4C7F84E3787A
+S315200340A038A000064BFDD1E53860000048000064C7
+S315200340B02C9FFFFF418600147FE0FB782C800000B5
+S315200340C03BFFFFFF408500447F63DB783880000099
+S315200340D038A0000038C100087F87E378480042DD16
+S315200340E07C7E1B79408200247F43D3784BFF3F712C
+S315200340F02C9FFFFF4186FFD47FE0FB782C800000B6
+S315200341003BFFFFFF4185FFC4307EFFFF7C63191011
+S315200341108001003C7C0803A68341002083610024A0
+S315200341208381002883A1002C83C1003083E10034DE
+S31520034130382100384E8000207C691B78A069000C4A
+S31520034140288305DB4D850020886900002C8300AA7F
+S315200341504C860020A06900064E8000209421FFE8AB
+S315200341607C0802A69381000893A1000C93C100103A
+S3152003417093E100149001001C7C7E1B787C9D2378A0
+S315200341807CBC2B783C60002838638B204BFE5FF188
+S315200341907C7F1B794182003C801F00087C0803A694
+S315200341A07FC3F3787FA4EB787F85E3784E80002165
+S315200341B02C8300004186000C38600001480000185B
+S315200341C07FE3FB784BFE60557C7F1B794082FFCCD7
+S315200341D0386000008001001C7C0803A68381000848
+S315200341E083A1000C83C1001083E100143821001839
+S315200341F04E8000209421FFE87C0802A693810008C4
+S3152003420093A1000C93C1001093E100149001001CAC
+S315200342107C7E1B787C9D23787CBC2B783C60002895
+S3152003422038638B2C4BFE5F597C7F1B794182003C84
+S31520034230801F00087C0803A67FC3F3787FA4EB784E
+S315200342407F85E3784E8000212C8300004186000C75
+S3152003425038600001480000187FE3FB784BFE5FBD02
+S315200342607C7F1B794082FFCC386000008001001CD4
+S315200342707C0803A68381000883A1000C83C1001058
+S3152003428083E10014382100184E8000209421F94040
+S315200342907C0802A693A106B493C106B893E106BC93
+S315200342A0900106C47C7D1B787CBF2B783861061869
+S315200342B0388000904BFE5A613861000890610618D9
+S315200342C0389D00084BFDF4657FA3EB783C804004C2
+S315200342D060846905A003001238A106A8B001062E42
+S315200342E04800D2417FE3FB7838810028A00106AA43
+S315200342F038A00000B00106324800F0D17C7E1B783E
+S315200343003C60002838638B204BFE5E757C7D1B79D1
+S3152003431041820044801D00087C0803A638610618E4
+S31520034320388100287FC5F3784E8000212C83000036
+S31520034330418600147FE3FB784800ED713860000165
+S31520034340480000187FA3EB784BFE5ED17C7D1B795A
+S315200343504082FFC438600000800106C47C0803A69F
+S3152003436083A106B483C106B883E106BC382106C0FF
+S315200343704E8000209421FFE87C0802A693A1000C1E
+S3152003438093C1001093E100149001001C7C9E2378B6
+S31520034390881E0000700900017C7D1B784082004046
+S315200343A03D20002880098B3C2C8000004186002874
+S315200343B03C60002738634BC03880000138A00002D8
+S315200343C038C0000338E00004390000053920000610
+S315200343D04BFE29A538600016480001347FA3EB78ED
+S315200343E04BFE5D9D7C7F1B794182007C387F0008D4
+S315200343F07FC4F37838A000064BFE58492C8300006F
+S31520034400418600147FE3FB784BFE5E117C7F1B798C
+S315200344104082FFDC2C9F00004186004C3D20002873
+S3152003442080098B3C2C800000418600283C600027B5
+S3152003443038634BD43880000138A0000238C000030B
+S3152003444038E0000439000005392000064BFE2929EF
+S31520034450801F00103860000030000001901F0010FC
+S31520034460480000AC386000144BFED0297C7F1B79B2
+S31520034470408200403D20002880098B3C2C80000090
+S31520034480418600283C60002738634BF038800001C2
+S3152003449038A0000238C0000338E0000439000005C4
+S315200344A0392000064BFE28D13860003748000060CB
+S315200344B07FC3F378389F000838A000064BFDCDCD87
+S315200344C038000001901F00107FA3EB787FE4FB7870
+S315200344D04BFE5B253D20002880098B3C2C80000069
+S315200344E0418600283C600027889F000888BF000972
+S315200344F088DF000A88FF000B891F000C893F000D07
+S3152003450038634C084BFE2871386000348001001C48
+S315200345107C0803A683A1000C83C1001083E1001449
+S31520034520382100184E8000209421FFE87C0802A63B
+S3152003453093A1000C93C1001093E100149001001C79
+S315200345407C7D1B787C9E23784BFE5C357C7F1B7998
+S3152003455041820034387F00087FC4F37838A00006F0
+S315200345604BFE56E12C830000418600147FE3FB7843
+S315200345704BFE5CA97C7F1B794082FFDC2C9F0000CD
+S315200345804086000C3860000648000038801F001063
+S315200345903000FFFF2C800000901F00104086002073
+S315200345A07FA3EB787FE4FB784BFE5B017FE3FB780D
+S315200345B04BFECF0D386000344800000838600000F9
+S315200345C08001001C7C0803A683A1000C83C1001074
+S315200345D083E10014382100184E8000209421FFE83F
+S315200345E07C0802A69381000893A1000C93C10010B6
+S315200345F093E100149001001C7C9D23783BC00000AE
+S31520034600839D000093DD00004BFE5B75480000642C
+S315200346103D20002880098B3C2C8000004186002801
+S315200346203C600027889F000888BF000988DF000AAE
+S3152003463088FF000B891F000C893F000D38634C2C23
+S315200346404BFE2735387F0008809D000438A00006DE
+S315200346507C84F2144BFDCC353BDE0006801D000026
+S315200346607FE3FB7830000006901D00004BFE5BAD18
+S315200346707C9EE0007C7F1B78301FFFFF7D20F91096
+S315200346807C00002654002FFE7D2B00394082FF84B8
+S31520034690386000008001001C7C0803A68381000883
+S315200346A083A1000C83C1001083E100143821001874
+S315200346B04E8000209421FF587C0802A6930100888F
+S315200346C09321008C934100909361009493810098E9
+S315200346D093A1009C93C100A093E100A4900100AC98
+S315200346E07C781B787C9F23787CBD2B787D3A4B780E
+S315200346F03D20002880098B447CDC33782C80000005
+S315200347007CFE3B787D1B43787D5953784186003C5C
+S315200347103C60002738634C404BFE7F157FE3FB78D4
+S315200347207FA4EB787F85E3787FC6F3787F67DB7892
+S315200347307F48D3787F29CB784BFE7EF53C600027D4
+S3152003474038634C484BFE7EE9386100087FE4FB78EA
+S315200347507FA5EB787F86E3787FC7F3787F68DB785E
+S315200347607F49D3787F2ACB784BFE82B938610008FC
+S315200347704BFDEFED3B8100087C7C1A143C8000271F
+S3152003478038844C4C3CA0002738A54C504BFE8295D0
+S315200347907F83E3784BFDEFC97C7D1B787F03C3784A
+S315200347A07F84E3787FA5EB784BFE0DB57C83E80009
+S315200347B0418400287FE3FB783C80002738844C54CF
+S315200347C04BFDEF29200300007C8019147F03C37857
+S315200347D048000309480000083860FFFF800100AC49
+S315200347E07C0803A6830100888321008C83410090E3
+S315200347F0836100948381009883A1009C83C100A0D8
+S3152003480083E100A4382100A84E8000209421FFB024
+S315200348107C0802A692C1002892E1002C9301003065
+S3152003482093210034934100389361003C93810040E7
+S3152003483093A1004493C1004893E1004C9001005496
+S315200348407C9E23787CBC2B787CDB33787CF83B7886
+S315200348507D1A43787D374B787D56537883210058CC
+S31520034860480004BD7C7F1B782C9FFFFF3BA0FFFFE6
+S315200348704186020C7FC4F3787F85E3787F66DB78F5
+S315200348804800057D2C830000408601F47FE3FB78F6
+S315200348903C80002738844C5C38A0000038C00000D8
+S315200348A038E00000390000003920000039400000BC
+S315200348B04BFFFE052C830002408601C4881A0000A4
+S315200348C02C800000418600347FE3FB783C80002760
+S315200348D038844C647F45D37838C0000038E0000024
+S315200348E03900000039200000394000004BFFFDC984
+S315200348F02C830002408601882C99000040860034D0
+S315200349007FE3FB787F04C3787EE5BB7838C000005D
+S3152003491038E000003900000039200000394000004B
+S315200349204BFFFD952C83000141860164480001500D
+S315200349307FE3FB78480005A57C7D1B782C9DFFFF34
+S315200349404186013C7FE3FB787F04C3787EE5BB7811
+S3152003495038C0000038E0000039000000392000008C
+S31520034960394000004BFFFD517C7C1B782C9C0001B9
+S31520034970418600187FA3EB784BFE0B012C9C000489
+S315200349804186FFB0480000F83861000838800020CF
+S315200349904BFE53853BC100087FC4F37838A0000043
+S315200349A038C0000038E0000057FBE8FA57E906FE56
+S315200349B07F9A483057ABE8FA7C1BF02E7C9DF80093
+S315200349C07C00D3787C1BF12E57A006FE7D2BF02E80
+S315200349D07F8000307D2903787D2BF12E4CE62B82B8
+S315200349E07C000026540047FE7C0000D07FA30038BD
+S315200349F07FE000787C6303783863000148023CA596
+S31520034A002C83FFFF408600107FA3EB784BFE0A6DB5
+S31520034A104800006C7C1BF02E7C09D0394182004C67
+S31520034A207FA3EB784BFE0A557FE3FB7838800000A3
+S31520034A30480000A92C8300044186FEF87FE3FB7817
+S31520034A403C80002738844C5438A0000038C000002E
+S31520034A5038E000003900000039200000394000000A
+S31520034A604BFFFC55480000187FA3EB78480006351A
+S31520034A707C7D1B782C9DFFFF408600147FE3FB780B
+S31520034A804BFE09F93860FFFF480000182C990000F7
+S31520034A9093F600004186000893B9000038600000B1
+S31520034AA0800100547C0803A682C1002882E1002CE1
+S31520034AB08301003083210034834100388361003C25
+S31520034AC08381004083A1004483C1004883E1004CD5
+S31520034AD0382100504E8000209421FFC87C0802A66E
+S31520034AE092C1001092E10014930100189321001C37
+S31520034AF093410020936100249381002893A1002CE5
+S31520034B0093C1003093E100349001003C7C791B78FB
+S31520034B107C9623783B6000003B8000003EE0002823
+S31520034B203F0000283BE000003BC000003B40000064
+S31520034B307F23CB783881000838A000014BFE0A0179
+S31520034B40200300007FA01915408200DC894100085C
+S31520034B502C8A000A418600D03BFF00016BE000014E
+S31520034B607C09FE707D2002787C0048507C00FE7014
+S31520034B70396AFFD02C9F00037F8900387D60007837
+S31520034B807D3C0378418500343D200028812981B06E
+S31520034B907C0950AE700900044082000C3BC0FFFF25
+S31520034BA0480000182C9EFFFF418600101C1E000A99
+S31520034BB03000FFD07FC052142F1F0004409A0014E8
+S31520034BC088010008681A002D213A00007F49D11474
+S31520034BD0880100082C80000D4186FF5880178B40E2
+S31520034BE02C800000408600206B89000520090000E8
+S31520034BF07D2049147C0000265400D7FE7D2B0039E6
+S31520034C004182FF3080188B4C2C8000004086FF2485
+S31520034C10386000023881000838A000014BFE0941A4
+S31520034C204BFFFF1080178B403120FFFF7C090110BB
+S31520034C306B890005216900007D2B49147C0B4B7978
+S31520034C404182001C80188B4C2C800000408600106B
+S31520034C503C60002738634C484BFE79D57F69FE704C
+S31520034C607D20DA787C0048507C00FE702C9D000065
+S31520034C707F6900387FC000787D3B0378408600300B
+S31520034C802C9F00027FC0DA783160FFFF7C0B011076
+S31520034C904CE623827D200026552947FE7D2B03796A
+S31520034CA04082FE842C9A00004086FE7C7F63DB785C
+S31520034CB04BFDFA5D2C960000408600142C9D0000C7
+S31520034CC04186000C3860FFFF4800001C3C6051EB16
+S31520034CD06063851F7C7B18967F60FE707C632E70D5
+S31520034CE07C6018508001003C7C0803A682C100101A
+S31520034CF082E10014830100188321001C83410020D4
+S31520034D00836100248381002883A1002C83C1003082
+S31520034D1083E10034382100384E8000209421FFE0BF
+S31520034D207C0802A693C1001893E1001C900100247D
+S31520034D307C7F1B784800688D7C7E1B782C9EFFFF2A
+S31520034D40408600187FE3FB78480009657C7E1B7844
+S31520034D502C9EFFFF4186008C3860000238800001BC
+S31520034D6038A000004801F2A97C7F1B79418000749A
+S31520034D703800000298010009380000009001000C59
+S31520034D8038000000B001000A7FE3FB783881000871
+S31520034D9038A000104801F3292C8300004184003CED
+S31520034DA093C1000C38000015B001000A7FE3FB789D
+S31520034DB03881000838A000104801F4E92C8300004C
+S31520034DC0418400187FE3FB78388000004BFFFD0DFC
+S31520034DD07FE3FB78480000107FE3FB784BFE069DBC
+S31520034DE03860FFFF800100247C0803A683C10018D6
+S31520034DF083E1001C382100204E8000209421FFE807
+S31520034E007C0802A693A1000C93C1001093E1001421
+S31520034E109001001C7C7F1B787C8023787CBE2B78BA
+S31520034E207CDD33783C80002738844C6C7C05037802
+S31520034E3038C0000038E000003900000039200000A7
+S31520034E40394000004BFFF8712C8300034086005C39
+S31520034E507FE3FB783C80002738844C747FC5F37846
+S31520034E6038C0000038E00000390000003920000077
+S31520034E70394000004BFFF8412C8300034086002C69
+S31520034E807FE3FB783C80002738844C7C7FA5EB7836
+S31520034E9038C0000038E00000390000003920000047
+S31520034EA0394000004BFFF811686000027C09FE7050
+S31520034EB07D2302787C6348507C63FE708001001C4E
+S31520034EC07C0803A683A1000C83C1001083E1001490
+S31520034ED0382100184E8000209421FFB87C0802A6B2
+S31520034EE093410030936100349381003893A1003CB1
+S31520034EF093C1004093E100449001004C7C7B1B78D6
+S31520034F003B40001093410028388100083B8100284C
+S31520034F107F85E3784801FA752C8300004184015884
+S31520034F20386000023880000138A000004801F0E113
+S31520034F307C7F1B79418001407FE3FB783BC10018CE
+S31520034F407FC4F37838A00010800100083BA1000835
+S31520034F5090010018801D0004813D0008817D000C0E
+S31520034F60901E0004913E0008917E000C380000003C
+S31520034F70B001001A4801F1492C830000418400F056
+S31520034F807FE3FB78388000014801F1D12C830000B0
+S31520034F90418400DC934100287FE3FB787FC4F378C8
+S31520034FA07F85E3784801F9E52C830000418400C01E
+S31520034FB07F63DB783C80002788A1001C88C1001D05
+S31520034FC088E1001E8901001F8921001A8941001BDF
+S31520034FD038844C844BFFF6E12C8300054186001070
+S31520034FE02C830002408600884800007C7FE3FB7800
+S31520034FF04BFE0489386000023880000138A0000087
+S315200350004801F00D7C7F1B794180006C380000013C
+S315200350109001002C7FE3FB78388000006084FFFF3B
+S3152003502038A0000438C1002C38E000044801F7E515
+S315200350302C830000418400387FE3FB787FA4EB7840
+S3152003504038A000104801F0792C8300004184002009
+S315200350507FE3FB78388000014801F1012C830000AF
+S315200350604184000C7FE3FB78480000107FE3FB7844
+S315200350704BFE04093860FFFF8001004C7C0803A621
+S3152003508083410030836100348381003883A1003C4F
+S3152003509083C1004083E10044382100484E8000202C
+S315200350A09421FFD07C0802A69381002093A100249B
+S315200350B093C1002893E1002C900100347C7C1B785B
+S315200350C038000010900100183881000838A1001814
+S315200350D04801F1157C7D1B787F83E3784BFE039D86
+S315200350E07FA3EB78800100347C0803A6838100200C
+S315200350F083A1002483C1002883E1002C38210030BA
+S315200351004E8000209421EDB87C0802A693411230EC
+S31520035110936112349381123893A1123C93C11240A6
+S3152003512093E112449001124C7C7F1B783881122024
+S3152003513038A100104BFE0721812112203BA101102B
+S315200351408089000C7FA3EB784BFDE5E17FA3EB7809
+S315200351504BFDE60D3B4100107C7A1A143800000003
+S31520035160980300FF3B6101507F63DB783B8101B8E5
+S315200351707F84E37848010E553801122890010008F0
+S315200351807FA3EB787F64DB787F85E3783CC00027B9
+S3152003519038C64C9C3CE0002738E74CA07F48D378A0
+S315200351A07CC93378394112244BFFF6652C830000E2
+S315200351B04186001C3C60002738634CA87FE4FB78BB
+S315200351C04BFE746D3860FFFF480000443BA102206C
+S315200351D0806112287FA4EB7838A004004BFE03617C
+S315200351E07C651B7940810014386000017FA4EB782D
+S315200351F04BFE036D4BFFFFDC806112244BFE027DC9
+S31520035200806112284BFE0275386000008001124C23
+S315200352107C0803A6834112308361123483811238BA
+S3152003522083A1123C83C1124083E1124438211248E0
+S315200352304E8000209421FFF87C0802A69001000CE2
+S315200352403D20002880098C6C2C8000004086002C91
+S315200352503800000190098C6C3C6000283863D380A9
+S315200352604BFE4D813D2000283C60002880898BE839
+S315200352703863D38C4BFF032D8001000C7C0803A6D7
+S31520035280382100084E8000209421FFE87C0802A6DE
+S315200352909381000893A1000C93C1001093E100149D
+S315200352A09001001C200300007D20191421640000B6
+S315200352B07C0B21147D2B03797C7D1B787C832378BF
+S315200352C0418200103C6000326063000348000120E5
+S315200352D0480062F17C7E1B782C9EFFFF4086000CE3
+S315200352E03860FFFF480001343C6000283863D38CC4
+S315200352F03880FFFF4BFEF6413C6000283863D3809D
+S315200353004BFE4E7D7C7F1B79418200983F8000288F
+S31520035310801F00107C80F000408600783BFF000849
+S315200353202C9F00007FFEFB784186FFB8807E000419
+S315200353307FA4EB784BFDE3B52C8300004186009CCC
+S315200353407FDFF37883DF00002C9E00004086FFE09A
+S315200353502C9F00004186FF8C3860000138800008AE
+S315200353604BFEB21D2C830000907F00004186001463
+S315200353707FA4EB78480005492C83FFFF4086000C69
+S31520035380387CD38C4800004C387CD38C480000846E
+S315200353907FE3FB784BFE4E857C7F1B794082FF742F
+S315200353A038600001388000144BFEB1D57C7F1B7911
+S315200353B041820018387F00087FA4EB784800050156
+S315200353C02C83FFFF408600303C6000283863D38C53
+S315200353D04BFEF4094BFFFF0C3C6000283863D38C4B
+S315200353E04BFEF3F93C600032606300024BFDF32170
+S315200353F04BFFFEF093DF00103C6000283863D38018
+S315200354007FE4FB784BFE4BF13C6000283863D38C5A
+S315200354104BFEF3C9386000008001001C7C0803A6FC
+S315200354208381000883A1000C83C1001083E100144B
+S31520035430382100184E8000209421FFE07C0802A624
+S31520035440934100089361000C9381001093A10014EB
+S3152003545093C1001893E1001C90010024200300004F
+S315200354607D201914216400007C0B21147D2B0379E4
+S315200354707C7B1B787C832378418200143C6000323A
+S31520035480606300034BFDF28948000108480061353B
+S315200354907C7A1B782C9AFFFF4086004C480000F448
+S315200354A03C6000283863D3807FC4F3784BFE4BFDE2
+S315200354B03C6000283863D38C4BFEF3217FC3F378FB
+S315200354C048000018939D00003C6000283863D38C65
+S315200354D04BFEF3097FE3FB784BFEBFE53860000004
+S315200354E0480000B43C6000283863D38C3880FFFF23
+S315200354F04BFEF4453C6000283863D3804BFE4C8139
+S315200355007C7E1B7941820074801E00107C80D00033
+S3152003551040860018807E000C7F64DB784BFDE1CD4E
+S315200355202C8300004186FF7C801E00107C80D000E7
+S315200355303BBE0008408600347FBFEB794182002CB6
+S315200355407F64DB78807F0004839F00004BFDE19D11
+S315200355502C8300004186FF707FFDFB7883FF0000CC
+S315200355602C9F00004086FFDC7FC3F3784BFE4CADB7
+S315200355707C7E1B794082FF943C600032606300018D
+S315200355804BFDF18D3C6000283863D38C4BFEF24DE6
+S315200355903860FFFF800100247C0803A683410008AE
+S315200355A08361000C8381001083A1001483C100183A
+S315200355B083E1001C382100204E8000209421FFE047
+S315200355C07C0802A69361000C9381001093A100141A
+S315200355D093C1001893E1001C900100247C7C1B7866
+S315200355E03C6000283863D38C3880FFFF4BFEF34999
+S315200355F03C6000283863D3804BFE4B857C7E1B7929
+S315200356003BA0FFFF418200743F600028807E000C90
+S315200356107F84E3784BFDE0D52C8300004086002071
+S3152003562083BE00104800005483BE0010387BD3800D
+S315200356304BFE4BE17C7E1B784800003083FE00083E
+S315200356402C9F000041860024807F00047F84E3781A
+S315200356504BFDE0992C8300004186FFD083FF000099
+S315200356602C9F00004086FFE47FC3F3784BFE4BADAF
+S315200356707C7E1B794082FF983C6000283863D38C5C
+S315200356804BFEF1597FA3EB78800100247C0803A607
+S315200356908361000C8381001083A1001483C1001849
+S315200356A083E1001C382100204E8000209421FFF046
+S315200356B07C0802A693C1000893E1000C9001001414
+S315200356C07C7E1B79408200183C60003260630003B5
+S315200356D04BFDF03D3860FFFF480000507FC3F37851
+S315200356E04BFFFEDD7C7F1B782C9FFFFF4086003817
+S315200356F03D20002880098BE02C8000004186001481
+S315200357007C0803A67FC3F3784E8000217C7F1B7819
+S315200357102C9FFFFF408600103C600032606300012F
+S315200357204BFDEFED7FE3FB78800100147C0803A695
+S3152003573083C1000883E1000C382100104E8000202D
+S315200357409421FFE87C0802A69381000893A1000C0C
+S3152003575093C1001093E100149001001C7C9C2378D4
+S315200357607C7D1B783C6000283863D38C3880FFFF10
+S315200357704BFEF1C53C6000283863D3804BFE4A01BB
+S315200357807C7F1B793BC0FFFF41820060801F001096
+S315200357907C80E80040860044807F000C4BFDDFC1FF
+S315200357A0392300012C8900423BC000007F83E37824
+S315200357B0809F000C7C00002654002FFE7C0000D026
+S315200357C07C0500F870A500417D2900387D252B78BE
+S315200357D04BFDE009480000147FE3FB784BFE4A3D6E
+S315200357E07C7F1B794082FFA83C6000283863D38CDA
+S315200357F04BFEEFE97FC3F3788001001C7C0803A6E8
+S315200358008381000883A1000C83C1001083E1001467
+S31520035810382100184E8000209421FFE87C0802A638
+S3152003582093A1000C93C1001093E100149001001C76
+S315200358307C9E23797C7D1B78408200183C60003255
+S31520035840606300034BFDEEC93860FFFF4800005438
+S315200358507FA3EB787FC4F3784BFFFEE97C7F1B792C
+S315200358604182003C3D20002880098BE42C800000E7
+S31520035870418600187C0803A67FA3EB787FC4F378C0
+S315200358804E8000217C7F1B782C9F000041860010D0
+S315200358903C600032606300014BFDEE757FE3FB78CD
+S315200358A08001001C7C0803A683A1000C83C1001081
+S315200358B083E10014382100184E8000209421FFE84C
+S315200358C07C0802A693A1000C93C1001093E1001457
+S315200358D09001001C7C7D1B787C9E23787FC3F37804
+S315200358E04BFDDE7D386300014BFEBBA97C7F1B7914
+S315200358F0418200247FE3FB787FC4F3784BFDDE2DC2
+S3152003590093FD000438000000901D0000386000005D
+S31520035910480000083860FFFF8001001C7C0803A6AE
+S3152003592083A1000C83C1001083E1001438210018E1
+S315200359304E8000209421FFF87C0802A69001000CDB
+S315200359407C6B1B78312BFFFF7C0959102084007F49
+S31520035950388000007C8421147C0920394082000C85
+S315200359603860FFFF480000183C60002838638BEC42
+S315200359707D645B784BFDDDB5386000008001000C4B
+S315200359807C0803A6382100084E8000209421FFE8D6
+S315200359907C0802A693A1000C93C1001093E1001486
+S315200359A09001001C7C7F1B797C9E23784182002CEE
+S315200359B03FA00028387D8BEC4BFDDDA57C83F04092
+S315200359C0408400187FE3FB78389D8BEC4BFDDD5D2F
+S315200359D038600000480000083860FFFF8001001C83
+S315200359E07C0803A683A1000C83C1001083E1001465
+S315200359F0382100184E8000203CA0002880E58EF830
+S31520035A00288700077C661B784085000C3860FFFFDB
+S31520035A104E8000203D2000281C0700343929D3A8B6
+S31520035A207D404A14810A00042C8800004086009495
+S31520035A30396000037D69032E3D20002839298D789E
+S31520035A40912A000438000001B00A0008B16A000A4E
+S31520035A503D2000243929D23C912A000C3D200024E4
+S31520035A6039295538912A0010910A00143D20002423
+S31520035A70392956A4912A00183D200024392958088B
+S31520035A80912A001C3D2000243929CF0C912A00207D
+S31520035A90910A0024910A0028910A002C910A0030C9
+S31520035AA03807000190058EF8386000008006000054
+S31520035AB03D200028540007FE90098DB84E80002013
+S31520035AC0386000004E8000209421FFA87C0802A69F
+S31520035AD07D80002692E10034930100389321003C17
+S31520035AE093410040936100449381004893A1004C65
+S31520035AF093C1005093E100549001005C91810030E2
+S31520035B007C9E23787CBD2B787CD833784800226111
+S31520035B107C7F1B79408200144BFDEB813C00004ABD
+S31520035B206000000348000248807F0000A89F0016FB
+S31520035B304800C0FD7C791B7941820030386100081A
+S31520035B403D200028A97F00163929AE901D6B00C081
+S31520035B503C8000277D6B4A1480AB00A838844CC454
+S31520035B6038A500084BFE6EBD2C9E00004086000C17
+S31520035B7093C10028480000147FC3F37848005A4590
+S31520035B8090610028907F00982C9D00004086002C71
+S31520035B90A01F001A70090002408200144BFDEAFD83
+S31520035BA03C00004A60000002480001C43800FFFFA1
+S31520035BB09001002C480000107FA3EB7848005A057B
+S31520035BC09061002C3D2000283800000090098C703D
+S31520035BD03FA00028387D8C78A01F001A388000301B
+S31520035BE060000041B01F001A4BFE412D3BBD8C784F
+S31520035BF038000011981D001438000000981D001568
+S31520035C0038000000B01D00163C60002838638C8CD9
+S31520035C103880000C4802345DB07D001638600001E0
+S31520035C203881002838A1002C7FA6EB7838E00020A5
+S31520035C30480002512C9900003AE000014186001CDD
+S31520035C403C60002338635CB0A8BF00163881000887
+S31520035C504BFFDF35480000103C60002338635CB0FF
+S31520035C604BFFDF253B8000003FC000233F60002819
+S31520035C703F4000282D1900007FE3FB783C80002855
+S31520035C8038848C7838A000204800033D2C83FFFFFE
+S31520035C9040860028418A0018387E5CB0A8BF0016CB
+S31520035CA0388100084BFFE0A1480000C8387E5CB06D
+S31520035CB04BFFE095480000BC4BFD2AD57FB719D68C
+S31520035CC07FA0EB782C8000003BBDFFFF4085005C66
+S31520035CD0801B8C702C80000041860038418A001876
+S31520035CE0387E5CB0A8BF0016388100084BFFE05908
+S31520035CF04800000C387E5CB04BFFE04D813A8C7433
+S31520035D0080090008386000009018000048000068E9
+S31520035D10386000014BFF23497FA0EB782C800000DD
+S31520035D203BBDFFFF4185FFAC3B9C00012C9C000142
+S31520035D304085FF482C9900004186001C3C600023C7
+S31520035D4038635CB0A8BF0016388100084BFFDFF923
+S31520035D50480000103C60002338635CB04BFFDFE94A
+S31520035D604BFDE9393C00004A600000019003000026
+S31520035D703860FFFF8001005C818100307C0803A628
+S31520035D8082E10034830100388321003C83410040B3
+S31520035D90836100448381004883A1004C83C1005062
+S31520035DA083E100547D820120382100584E80002053
+S31520035DB09421FFE87C0802A69381000893A1000C96
+S31520035DC093C1001093E100149001001C3FE00028CA
+S31520035DD0801F8C702C800000408600742C85000E5A
+S31520035DE04085006CA004000C2C80080040860060CF
+S31520035DF03864000E3F800028389CA60C3BA5FFF292
+S31520035E007FA5EB784BFDB639387CA60C7FA4EB78BF
+S31520035E1038A00001480001252C8300003FA000285C
+S31520035E20907D8C74418600283880000C48023245C8
+S31520035E305463043E2C83000040860014813D8C74F9
+S31520035E40880900002C8000124186000C386000006F
+S31520035E504800001038000001901F8C703860000144
+S31520035E608001001C7C0803A68381000883A1000C03
+S31520035E7083C1001083E10014382100184E800020CE
+S31520035E809421FFE07C0802A6934100089361000C4D
+S31520035E909381001093A1001493C1001893E1001C71
+S31520035EA0900100247C7C1B787C9B23787CBA2B78FE
+S31520035EB07CDD3378801D0000392000045120E00664
+S31520035EC0392000055120C10E901D0000B0FD0002AF
+S31520035ED04BFF3025B07D0004380000FF981D0008D5
+S31520035EE09B9D00097FA3EB78801B0000809D00000B
+S31520035EF0901D000C38000000813A0000B01D000AF6
+S31520035F00548456BA913D001048023169B07D000A87
+S31520035F10800100247C0803A6834100088361000CCA
+S31520035F208381001083A1001483C1001883E1001C20
+S31520035F30382100204E8000209421FFF07C0802A601
+S31520035F4093E1000C90010014288400137C7F1B78B6
+S31520035F5040850050881F000954A9063E7C804800CE
+S31520035F6040860040809F00007FE3FB78548456BA26
+S31520035F70480231015463043E2C83000040860024EA
+S31520035F80817F00003D204000556000067C8048004C
+S31520035F9040860010A01F000670093FFF4182000CB7
+S31520035FA0386000004800000C556356BA7C7F1A14EB
+S31520035FB0800100147C0803A683E1000C382100101D
+S31520035FC04E8000209421FFB87C0802A693810038D6
+S31520035FD093A1003C93C1004093E100449001004CFF
+S31520035FE07C7F1B787C9E23787CBC2B7838610008C9
+S31520035FF03880000E4BFE3D213BA100307FA3EB787A
+S31520036000801E00107FE4FB789001003048004FD1BA
+S315200360102C830000408600487FA3EB78801E001067
+S315200360203BA100187FA4EB789001003048005B1554
+S315200360304BFD275D5467083C7FE3FB787FA4EB7811
+S3152003604038A1000838C000054BFFDFB92C83FFFFBA
+S31520036050408600203860FFFF480000403C6000284F
+S3152003606038638D4C3881000838A000064BFDB21DDD
+S3152003607038000800B00100147FE3FB78388100085C
+S315200360807FC5F3787F86E3784BFFDA352063FFFFFE
+S315200360903063FFFF7C6319108001004C7C0803A644
+S315200360A08381003883A1003C83C1004083E10044FF
+S315200360B0382100484E8000209421FFF87C0802A650
+S315200360C09001000C3D20002881699C5C2C8B0000EC
+S315200360D0418600283D20002881298CB0800B00882A
+S315200360E02C80000040860008912B0088816B0004D9
+S315200360F02C8B00004086FFE84BFF42813D20002881
+S3152003610090698CAC48000BF18001000C7C0803A637
+S31520036110382100084E8000209421FFF07C0802A637
+S3152003612093C1000893E1000C900100144801C8B103
+S315200361303D20002883E99C5C2C9F00007C7E1B78F5
+S3152003614041860028801F00702C80000041860010A5
+S315200361507C0803A6A87F00164E80002183FF000437
+S315200361602C9F00004086FFE07FC3F3784801C94196
+S31520036170800100147C0803A683C1000883E1000C78
+S31520036180382100104E8000209421FFC07C0802A6EF
+S3152003619092E1001C930100209321002493410028BF
+S315200361A09361002C9381003093A1003493C100386E
+S315200361B093E1003C900100447C7C1B783FC000287F
+S315200361C0801C0088A13C001A2C8000003BFE9C5CAE
+S315200361D061290020B13C001A408600103D2000288A
+S315200361E080098CB0901C00884801C7F5801E9C5CF2
+S315200361F02C8000007C7E1B7841860018813F00009E
+S31520036200800900042C8000003BE900044086FFF04F
+S315200362107FC3F3784801C899939F0000388100080B
+S3152003622038A0000C3D4000283D600028812A9C6050
+S31520036230A87C0016800B8CA839290001912A9C6022
+S3152003624030000001900B8CA8B01C00144800108964
+S315200362507C781B78807C00004BFDD5057C7D1B78E4
+S315200362607F03C3784BFDD4F93880000D38A0000096
+S315200362707C7B1B783B3D0008881C001D7EFBCA14D3
+S315200362807D770214380BFFFF6000000331600001A5
+S31520036290212B00137D2949107D2048F87000001416
+S315200362A07D6948387D3A03785740083C33C000203F
+S315200362B07FC3F3784801C9AD7C7F1B79418200D027
+S315200362C07FE3FB787FC4F3784BFE3A4D3BDF002018
+S315200362D09B5F002038000012981E0001389F00287B
+S315200362E07FA5EB78807C00007FBDDA144BFDAF9D44
+S315200362F07F03C3787C9ECA147F65DB784BFDAF8D05
+S315200363009BBE00053D200023A01C0014392969F0FB
+S31520036310B01E0002881C001C2C9D0000981E000441
+S31520036320939F000C801C0008913F0014901F0010BF
+S3152003633093FC000893DF00007FDED21493DF00086E
+S315200363409AFE00004186001C380000FF3BBDFFFF7C
+S315200363502C9D00007D3EEA14980900084086FFF034
+S315200363604801C67D801C00643D20002439298E986F
+S315200363707C8048007C7E1B784086000C7F83E378F4
+S31520036380480030DD7FC3F3784801C72580010044E8
+S315200363907C0803A682E1001C8301002083210024BC
+S315200363A0834100288361002C8381003083A100343C
+S315200363B083C1003883E1003C382100404E80002011
+S315200363C09421FFE87C0802A693A1000C93C1001038
+S315200363D093E100149001001C7C7F1B784801C601C1
+S315200363E03D20002880099C5C2C8000003BC99C5CD6
+S315200363F07C7D1B78418600A8813E00007C89F800BD
+S315200364004086008C800900082C8000003BE90008A8
+S3152003641041860054807F000080030010901F0000F7
+S3152003642081230000880900012C8000024086000C8D
+S3152003643048004B3148000024A123001A7D2007344D
+S315200364402C8000004185000C480006514800000CB2
+S315200364503809FFFFB003001A801F00002C800000BC
+S315200364604086FFB4813E00008069005C2C830000D7
+S315200364704186000C3880000048004DE5813E00002F
+S3152003648080090004901E00004800001480090004BF
+S315200364902C8000003BC900044086FF603D20002875
+S315200364A080099C607FA3EB783000000190099C60F3
+S315200364B04801C5FD8001001C7C0803A683A1000CAE
+S315200364C083C1001083E10014382100184E80002078
+S315200364D09421FFF07C0802A693C1000893E1000CE7
+S315200364E0900100147C7E1B784801C4F53D200028CA
+S315200364F083E99C5C2C9F00004186001CA01F00148E
+S315200365007C80F0004186001083FF00042C9F00004E
+S315200365104086FFEC4801C5997FE3FB788001001490
+S315200365207C0803A683C1000883E1000C38210010F0
+S315200365304E8000209421FFE87C0802A693A1000C3C
+S3152003654093C1001093E100149001001C3D20002804
+S3152003655083C99C5C2C9E00007C7D1B78418600842D
+S3152003656083FE00082C9F00004186006C809F00005C
+S31520036570893D0001880400017C8048004086004C48
+S3152003658088BD00007FA3EB784BFE36B92C83000031
+S3152003659041860030A01E001A700900024182002C99
+S315200365A0807F00042C8300004186002088A30000FE
+S315200365B07FA4EB784BFE368D2C8300004086000C9F
+S315200365C07FE3FB784800002083FF00102C9F000008
+S315200365D04086FF9C83DE00042C9E00004086FF84B9
+S315200365E0386000008001001C7C0803A683A1000CF0
+S315200365F083C1001083E10014382100184E80002047
+S315200366009421FFE87C0802A693A1000C93C10010F5
+S3152003661093E100149001001C3D20002883C99C5C53
+S315200366202C9E00007C7D1B7841860068A01E001AE4
+S31520036630700900104182005083FE00082C9F000041
+S3152003664041860044813F0000881D000189290001FD
+S315200366507C89000040860024809F000488BD0000BA
+S315200366607FA3EB784BFE35DD2C8300004086000CA0
+S315200366707FE3FB784800002083FF00102C9F000057
+S315200366804086FFC483DE00042C9E00004086FFA0C4
+S31520036690386000008001001C7C0803A683A1000C3F
+S315200366A083C1001083E10014382100184E80002096
+S315200366B09421FFE07C0802A69361000C93810010CD
+S315200366C093A1001493C1001893E1001C90010024A8
+S315200366D08B8300012C9C00123BA000003B6300022D
+S315200366E040860054A06300022C83000041860048A4
+S315200366F03D20002880098CA87C8300004185003832
+S315200367004BFFFDD183E300082C9F00004186002028
+S31520036710813F0000880900017C80E000418600104B
+S3152003672083FF00102C9F00004086FFE87FE3FB7861
+S31520036730480000C03D20002883C99C5C2C9E000095
+S31520036740418600AC83FE00082C9F000041860094FE
+S31520036750813F0000880900017C80E00040860078A4
+S31520036760817F00082C8B00004186006C880B00007B
+S31520036770394B00027CCB02147C8A30407F67DB785E
+S315200367803909000240840030880700008928000068
+S31520036790896A00007C004A787D690039394A0001FC
+S315200367A03908000138E700014082002C7C8A3040FA
+S315200367B04184FFD82C9D000041860018807F000865
+S315200367C0809D00084800D4A52C830000418600083C
+S315200367D07FFDFB7883FF00102C9F00004086FF740B
+S315200367E083DE00042C9E00004086FF5C7FA3EB78AB
+S315200367F0800100247C0803A68361000C838100109A
+S3152003680083A1001483C1001883E1001C38210020D2
+S315200368104E8000203D20002881699C5C2C8B000043
+S315200368207C6A1B7841860038806B00082C83000025
+S315200368304186002081230000880900017C805000C6
+S315200368404D860020806300102C8300004086FFE8DD
+S31520036850816B00042C8B00004086FFD0386000003B
+S315200368604E8000209421FFE87C0802A6938100082D
+S3152003687093A1000C93C1001093E100149001001C16
+S315200368807C7E1B788B9E0001289C00193BA0000070
+S315200368904085001438600000480000D07FE3FB7871
+S315200368A0480000C883E400082C9F0000418600B8F6
+S315200368B0809F0000880400017C80E0004086009CC5
+S315200368C07FFDFB78817D00082C8B00004086003CF1
+S315200368D088BE00007FC3F3784BFE33692C83000008
+S315200368E041860084809D00042C8400004186006C30
+S315200368F088BE00007FC3F3784BFE33492C83000008
+S315200369004086005848000060880B0000394B00027F
+S315200369107CEB02147C8A3840391E0002388400023C
+S31520036920408400308808000089240000896A00001A
+S315200369307C004A787D6900393884000139080001D2
+S3152003694040820010394A00017C8A38404184FFD8AE
+S315200369507C8A38004186FF4883FF00102C9F000065
+S315200369604086FF507FA3EB788001001C7C0803A69A
+S315200369708381000883A1000C83C1001083E10014E6
+S31520036980382100184E8000209421FFE87C0802A6B7
+S3152003699093A1000C93C1001093E100149001001CF5
+S315200369A0706000027C9F23787CBD2B784082003068
+S315200369B07060000439600000418200107FE3FB7899
+S315200369C04BFFFC417C6B1B782C8B000040860068B8
+S315200369D07FA3EB784BFFFB614800000C7FA3EB788A
+S315200369E04BFFFC217C6B1B782C8B000040860048D8
+S315200369F07FA3EB784BFFFCBD7C6B1B794082003871
+S31520036A007FE3FB78388000004800F94D7C631B79CF
+S31520036A104182001C81630040A00300362C8B0000BA
+S31520036A203000FFFFB00300364086000C38600000BC
+S31520036A304800004C812B0000881F00018929000192
+S31520036A407C890000418600347FE3FB78808B000C31
+S31520036A507D7D5B784BFFFE117C6B1B787D69FE7019
+S31520036A607D205A787C0048507C00FE707D69003872
+S31520036A707FA300787D2B1B787D635B788001001CC8
+S31520036A807C0803A683A1000C83C1001083E10014B4
+S31520036A90382100184E8000209421FFF07C0802A69E
+S31520036AA093E1000C900100147C7F1B794082001037
+S31520036AB03C60002738634CC84801C129A01F001A2F
+S31520036AC02C800000408600107FE3FB784801C1ED4F
+S31520036AD04800000C3000FFFFB01F001A800100148D
+S31520036AE07C0803A683E1000C382100104E80002089
+S31520036AF09421FFE87C0802A69381000893A1000C49
+S31520036B0093C1001093E100149001001C7C7D1B7837
+S31520036B102C9D00017C9E23787CBC2B784086009894
+S31520036B2083FE00402C9F00004186008C809F000C32
+S31520036B302C84000041860080807E000C2C8300007C
+S31520036B40418600744BFFFD217C7F1B7941820068BF
+S31520036B50807E0040A123001A7D2007342C8000006C
+S31520036B604185000C4BFFFF354800000C3809FFFF19
+S31520036B70B003001A93FE0040817F0014A01F001A61
+S31520036B802C8B000030000001B01F001A418600281C
+S31520036B903D200023392969F07C8B48004186001863
+S31520036BA07D6803A67FA3EB787FC4F3787F85E3789C
+S31520036BB04E8000218001001C7C0803A683810008E7
+S31520036BC083A1000C83C1001083E10014382100182F
+S31520036BD04E8000209421FFF07C0802A693C1000872
+S31520036BE093E1000C900100147C7E1B7883FE000841
+S31520036BF0A01E001A2C9F00005400043CB01E001A4D
+S31520036C004186001C809F0000386000004801813DBA
+S31520036C1083FF00102C9F00004086FFEC387E007C0B
+S31520036C20480000793D20002880098F182C80000019
+S31520036C30418600107C0803A67FC3F3784E8000218B
+S31520036C40800100147C0803A683C1000883E1000C9D
+S31520036C50382100104E8000209421FFF87C0802A6DC
+S31520036C609001000C3D20002881298F18A003001ACB
+S31520036C702C89000060000001B003001A4186000C35
+S31520036C807D2803A64E8000218001000C7C0803A6E4
+S31520036C90382100084E8000209421FFF07C0802A6AC
+S31520036CA093C1000893E1000C900100147C7E1B78AD
+S31520036CB083FE00004800000C83E300044800C3ED74
+S31520036CC02C9F00007FE3FB784086FFF0380000000E
+S31520036CD0901E0000901E0004901E000880010014E0
+S31520036CE07C0803A683C1000883E1000C3821001029
+S31520036CF04E8000209421FFE87C0802A693A1000C75
+S31520036D0093C1001093E100149001001C3D2000283C
+S31520036D1083A99C5C2C9D000041860048A01D001879
+S31520036D202C800000418600303000FFFF7C090734A9
+S31520036D302C890000B01D00184086001C801D007899
+S31520036D402C800000418600107C0803A6A87D00162F
+S31520036D504E80002183BD00042C9D00004086FFC089
+S31520036D603D20002883A98CAC4BFD1A257C641B7817
+S31520036D703CA0002438A539DC3CC0002338C66BF47C
+S31520036D807FA3EB784BFF3AD58001001C7C0803A632
+S31520036D9083A1000C83C1001083E10014382100185D
+S31520036DA04E8000209421FFE07C0802A69361000C0C
+S31520036DB09381001093A1001493C1001893E1001C42
+S31520036DC0900100247C9E23783C00C008600069144F
+S31520036DD07C9E00007C7D1B787CBC2B784186004CF6
+S31520036DE07C9E0040418500203C0080246000691E73
+S31520036DF07C9E0000418600443C008024600069207C
+S31520036E004800001C3C00C008600069247C9E0000EA
+S31520036E10418600183C00C0246000691F7C9E000048
+S31520036E2041860018480000247FC3F3787F84E378E3
+S31520036E30480001FD480001D47FC3F3787F84E378BB
+S31520036E4048001EC9480001C47F83E37848000F2108
+S31520036E507C7F1B797F9BE3784082000C3860000699
+S31520036E60480001A83C008020600069317C9E000018
+S31520036E70418601387C9E0040418500283C008020C5
+S31520036E80600069107C9E0000418600703C008020D3
+S31520036E90600069187C9E0000418601044800013089
+S31520036EA03C00C020600069117C9E000041860034AE
+S31520036EB07C9E0040418500183C008020600069329A
+S31520036EC07C9E0000418600E4480001043C00C0206B
+S31520036ED0600069177C9E000041860014480000F07C
+S31520036EE0A01F001AB01C00104800011C801F00249C
+S31520036EF0901C001048000110A01F001A7009000101
+S31520036F0041820028A01C001070090001408200283D
+S31520036F104801BB357C7D1B787FE3FB784BFFFCB9AF
+S31520036F207FA3EB784801BB89A01C001070090001E0
+S31520036F3041820028A01F001A700900014082001C0C
+S31520036F404801BB057C7D1B787FE3FB784BFFFD0D5A
+S31520036F507FA3EB784801BB5939608E52A13F001AB3
+S31520036F60A01B00107D295838700071AD7D29037848
+S31520036F70B13F001AB13B0010801F006C2C8000002B
+S31520036F80418600847C0803A67FE3FB787FC4F378DD
+S31520036F907F85E3784E8000214800006C801C00101A
+S31520036FA0901F002448000060801F006C2C80000086
+S31520036FB0418600287C0803A67FE3FB787FC4F37809
+S31520036FC07F85E3784E80002148000040813D000CF8
+S31520036FD02C8900004086000C3860002D4800002CC8
+S31520036FE07FA3EB788009001C3880000B7C0803A65E
+S31520036FF07FC5F3787F86E3787FE7FB784E80002191
+S315200370004800000838600000800100247C0803A69D
+S315200370108361000C8381001083A1001483C10018AF
+S3152003702083E1001C382100204E8000209421FFB0EC
+S315200370307C0802A692E1002C9301003093210034B0
+S31520037040934100389361003C9381004093A100440F
+S3152003705093C1004893E1004C900100547C97237818
+S315200370603D2000288397000083499C5C213C002017
+S315200370707D2949107D2900D0317AFFFF7C0BD11061
+S315200370807D2B00393B6000003B01001683B70004CB
+S31520037090418201603B21001838610008809A000074
+S315200370A038A0000E4BFDC735396100087C8BC040E4
+S315200370B04084001C880B00002C80000041860010B1
+S315200370C0396B00017C8BC0404184FFEC3800000003
+S315200370D0893A0017980B000139290030992B0000B3
+S315200370E083DA00082C9E0000408600CC3861001805
+S315200370F0388000104BFE2C21386100087FA4EB78E2
+S3152003710038A000204BFDA1853B6000003B9CFFE09F
+S315200371103BBD0020480000BC83FE0000893F0000E1
+S315200371202889001041850040386100087FA4EB7848
+S3152003713038A000203B6000003BBD0020801F0000DC
+S31520037140813F0004817F0008815F000C90010018B5
+S3152003715091390004917900089159000C4BFDA12D1A
+S3152003716048000044381C00107F890050289C001FCB
+S3152003717040850060386100087FA4EB7838A00010B2
+S315200371804BFDA1097FE3FB7888BF0000389D0010E3
+S315200371904BFDA0F9881F00003B6000003000001063
+S315200371A07FBD02142C9B0000408600283B9CFFE0F9
+S315200371B083DE0010213C00207D2949107D2900D043
+S315200371C0317EFFFF7C0BF1107D2B00394082FF4C73
+S315200371D0835A0004213C00207D2949107D2900D0B3
+S315200371E0317AFFFF7C0BD1107D2B00394082FEAC18
+S315200371F0801700007F63DB787C1C0050901700000B
+S31520037200800100547C0803A682E1002C8301003010
+S3152003721083210034834100388361003C838100400D
+S3152003722083A1004483C1004883E1004C38210050E8
+S315200372304E8000209421FFD87C0802A69001002CC2
+S31520037240A003001A700900014082000C3860003E3A
+S31520037250480000742C840000418600248003000C1F
+S31520037260300000012C8000019003000C408600248E
+S31520037270A003001A60000100480000288003000CC8
+S315200372803000FFFF2C8000009003000C4085000C8B
+S315200372903860000048000030A003001A7000FEFF8B
+S315200372A0B003001AA003001AB00100188003006C73
+S315200372B07C0803A63C8080206084691038A10008DE
+S315200372C04E8000218001002C7C0803A6382100284B
+S315200372D04E8000207CA42A143965FFFF3800000065
+S315200372E09805FFFF3D00CCCC6108CCCD3D2000277F
+S315200372F038E94CD07D2340167D4341D65529E8FEF7
+S315200373001C09000A7C0018507D234B797C0700AEAC
+S315200373109C0BFFFF4082FFE07D635B784E8000205D
+S315200373209421FF987C0802A69321004C9341005098
+S31520037330936100549381005893A1005C93C100602C
+S3152003734093E100649001006C7C7A1B787C9D237802
+S315200373507CBE2B787CDB337838610008388000408C
+S315200373604BFE29B57FA3EB78480042593BE1001831
+S315200373702C83FFFF907F00043B8100283B210038AC
+S31520037380408600247FA3EB784BFFE3252063FFFF92
+S31520037390200300007C6019142C830000907F0004D6
+S315200373A0408600D42C9E0000418600387FC3F378A4
+S315200373B0480042112C83FFFF907C00044086002462
+S315200373C07FC3F3784BFFE2E92063FFFF200300002E
+S315200373D07C6019142C830000907C0004408600985E
+S315200373E0386100087F44D37838A000104BFDC3EDE5
+S315200373F0392000102C9E0000992100183800000225
+S31520037400980100194186000C99210028980100292A
+S315200374102C9B0000418600109921003898010039E1
+S3152003742093790004386000023880000338A00000F6
+S315200374304801CBDD7C7E1B794180003C7FC3F378FA
+S315200374403C8080406084691A38A100084BFDE131F5
+S315200374507C7F1B787FC3F3784BFDE0212C9F0000B4
+S315200374604186001C2C9FFFFF4186000C7FE3FB789F
+S315200374704BFDD29D3860FFFF4800000838600000AE
+S315200374808001006C7C0803A68321004C83410050B5
+S31520037490836100548381005883A1005C83C100600B
+S315200374A083E10064382100684E8000209421FFF890
+S315200374B07C0802A69001000C7C8523783C808020E2
+S315200374C06084690C480003158001000C7C0803A620
+S315200374D0382100084E8000209421FFF87C0802A65C
+S315200374E09001000C7C8523783C80C0206084692130
+S315200374F0480000C58001000C7C0803A6382100083B
+S315200375004E8000209421FFF87C0802A69001000CEF
+S315200375107C8523783C80802060846913480002BDE3
+S315200375208001000C7C0803A6382100084E80002029
+S315200375309421FFF87C0802A69001000C7C85237811
+S315200375403C80C020608469234800006D8001000CC4
+S315200375507C0803A6382100084E8000209421FFF8DA
+S315200375607C0802A69001000C7C8523783C80802031
+S315200375706084690E480002658001000C7C0803A61E
+S31520037580382100084E8000209421FFF87C0802A6AB
+S315200375909001000C7C8523783C80C020608469227E
+S315200375A0480000158001000C7C0803A6382100083A
+S315200375B04E8000209421FFD07C0802A693E1002C64
+S315200375C0900100347CBF2B7940820014386000166A
+S315200375D04BFDD13D3860FFFF4800004438A1002011
+S315200375E0480001F92C8300004186000C3860FFFF18
+S315200375F04800002C386100248001002038810008CF
+S31520037600900100244800453D7FE3FB78388100083C
+S3152003761038A000124BFDC1C538600000800100343C
+S315200376207C0803A683E1002C382100304E800020FD
+S315200376309421FFF87C0802A69001000C7C85237810
+S315200376403C80802060846916480001918001000CEB
+S315200376507C0803A6382100084E8000209421FFF0E1
+S315200376607C0802A693E1000C900100147C9F2378EA
+S315200376703C80C020608469257FE5FB784800015D56
+S315200376802C83FFFF4186000C801F0000901F000003
+S31520037690800100147C0803A683E1000C3821001026
+S315200376A04E8000209421FFE07C0802A693A10014BB
+S315200376B093C1001893E1001C900100247C7D1B7864
+S315200376C07C9E23787CBF2B7838810008480000896C
+S315200376D02C83FFFF4086000C3860FFFF48000030F4
+S315200376E02C9F000041860010800100087C00F3785F
+S315200376F04800000C800100087C00F0789001000807
+S31520037700808100087FA3EB784800002180010024B4
+S315200377107C0803A683A1001483C1001883E1001CFF
+S31520037720382100204E8000209421FFF87C0802A6F1
+S315200377309001000C7C8523783C808020608469102E
+S31520037740480000998001000C7C0803A63821000814
+S315200377504E8000209421FFF87C0802A69001000C9D
+S315200377607C8523783C80C020608469114800006DA5
+S315200377708001000C7C0803A6382100084E800020D7
+S315200377809421FFF87C0802A69001000C7C852378BF
+S315200377903C80802060846918480000418001000CE9
+S315200377A07C0803A6382100084E8000209421FFF888
+S315200377B07C0802A69001000C7C8523783C80C0209F
+S315200377C060846917480000158001000C7C0803A615
+S315200377D0382100084E8000209421FFE87C0802A669
+S315200377E093A1000C93C1001093E100149001001C97
+S315200377F07C9F23783C008020600069197C9F0000D1
+S315200378007C7D1B787CBE2B78418600D84185007011
+S315200378103C008020600069107C9F0000418600FCAC
+S31520037820418500203C0080206000690C7C9F00007D
+S31520037830418600B03C0080206000690E480000208D
+S315200378403C008020600069167C9F0000418600CCA6
+S31520037850418500183C008020600069137C9F00004E
+S3152003786041860080480000DC3C00802060006918C7
+S315200378707C9F0000418600A4480000C83C00C0202D
+S31520037880600069177C9F0000418600A44185002083
+S315200378903C0080406000691A7C9F000041860044BA
+S315200378A03C00C020600069114800002C3C00C02029
+S315200378B0600069217C9F0000418400883C00C02031
+S315200378C0600069237C9F0000408500643C00C02043
+S315200378D0600069257C9F00004186005448000064AF
+S315200378E07FC3F37848003CDD7C651B782C85FFFF3E
+S315200378F0408600187FC3F3784BFFDDB57C651B7884
+S315200379002C85FFFF418600447FA3EB787FE4FB7839
+S3152003791048000059480000387FA3EB787FE4FB78C2
+S315200379207FC5F37848000045480000247FA3EB7801
+S315200379307FE4FB787FC5F378480000D94800001020
+S315200379403860002D4BFDCDC93860FFFF8001001C38
+S315200379507C0803A683A1000C83C1001083E10014D5
+S31520037960382100184E8000209421FFD07C0802A6DF
+S3152003797093C1002893E1002C900100347C601B788E
+S315200379807C9E23787CBF2B78386100087C0403789F
+S3152003799038A000104BFDBE453C00802060006910D6
+S315200379A07C9E0000418600183C00802060006918F8
+S315200379B07C9E00004186001048000014B3E10018A5
+S315200379C04800002C93E10018480000243861001871
+S315200379D0388000104BFE2341380000109801001810
+S315200379E0380000029801001993E1001C7FC3F37845
+S315200379F038810008480000C1800100347C0803A6B2
+S31520037A0083C1002883E1002C382100304E800020DA
+S31520037A109421FFD07C0802A693C1002893E1002C71
+S31520037A20900100347C601B787C9F23787CBE2B7866
+S31520037A30386100087C04037838A000104BFDBD9DF7
+S31520037A407FE3FB78388100084800006D2C83FFFF15
+S31520037A504086000C3860FFFF480000443C00C020ED
+S31520037A60600069117C9F0000418600183C00C020FD
+S31520037A70600069177C9F00004186001048000014AF
+S31520037A80A8010018480000108001001848000008CB
+S31520037A908001001C901E0000386000008001003425
+S31520037AA07C0803A683C1002883E1002C38210030FB
+S31520037AB04E8000209421FFE87C0802A693A1000CA7
+S31520037AC093C1001093E100149001001C7C7E1B7867
+S31520037AD07C9D2378386000023880000338A000009C
+S31520037AE04801C52D7C7F1B794080000C3860FFFF41
+S31520037AF0480000407FE3FB787FC4F3787FA5EB78CB
+S31520037B004BFDDA7D7C7E1B787FE3FB784BFDD96DBD
+S31520037B102C9E0000418600182C9EFFFF4186FFD035
+S31520037B207FC3F3784BFDCBE94BFFFFC438600000DE
+S31520037B308001001C7C0803A683A1000C83C10010CE
+S31520037B4083E10014382100184E8000209421FF88F9
+S31520037B507C0802A692E10054930100589321005C0D
+S31520037B6093410060936100649381006893A1006C44
+S31520037B7093C1007093E100749001007C7C781B799B
+S31520037B807C9723784082000C3860FFFF480001ACC5
+S31520037B903D20002883899C5C2C9C00003BC0000070
+S31520037BA0418601943B4100483B6100183B2100304C
+S31520037BB0A81C00167C80B80040860170809C0000BB
+S31520037BC07F03C3784BFDBB252C8300004086015CD5
+S31520037BD03D20002883A99C802C9D00004186001C03
+S31520037BE0801D000C7C80E0004186001083BD00349C
+S31520037BF02C9D00004086FFEC83FC00082C9F000090
+S31520037C0041860128813F0000880900012C8000025B
+S31520037C104086010C7F43D378800900047F64DB7898
+S31520037C209001004848003F1D7F63DB783880FFFFC3
+S31520037C3038A0000038C00004480100257C69FE7086
+S31520037C407D201A787C0048507C00FE70393E000166
+S31520037C507FCB00387D2300787D7E1B787F43D378C6
+S31520037C60813F0000801D002C812900047F64DB787E
+S31520037C707C0048389001000C9001004848003EC51E
+S31520037C807F63DB7838A00000809D002C38C000007D
+S31520037C904800FFCD7C69FE707D201A787C00485011
+S31520037CA07C00FE70A13C001A397E0001712A001067
+S31520037CB07D6300787FC900387D3E1B784182006052
+S31520037CC0813F00047F43D378800900047F64DB78F7
+S31520037CD09001004848003E6D813F00007F43D378E2
+S31520037CE0800900047F24CB789001004848003E5544
+S31520037CF07F63DB787F24CB784800F7B97C69FE70F5
+S31520037D007D201A787C0048507C00FE70393E0001A5
+S31520037D107FCB00387D2300787D7E1B7883FF001080
+S31520037D202C9F00004086FEE0839C00042C9C0000D0
+S31520037D304086FE807FC3F3788001007C7C0803A6FF
+S31520037D4082E10054830100588321005C8341006053
+S31520037D50836100648381006883A1006C83C1007002
+S31520037D6083E10074382100784E8000209421FFD0CF
+S31520037D707C0802A69361001C9381002093A1002412
+S31520037D8093C1002893E1002C900100347C641B7876
+S31520037D903861000838A000104BFDBA41394100086C
+S31520037DA0392100187C8A484040840028880A00002C
+S31520037DB02C800000418600383000FFD0288000093F
+S31520037DC040850010394A00017C8A48404184FFE0FF
+S31520037DD0892A0000552B063E2C8B00004186001075
+S31520037DE0380100187C8A00004086000C38600000A9
+S31520037DF0480000943BC000007C0150503929FFD035
+S31520037E00288900093380FFF97D7B5B787D5D537874
+S31520037E1041850024896A00008C0A00011D3E000A60
+S31520037E203000FFD0288000097D295A143BC9FFD092
+S31520037E304085FFE438000000981D00003D200028FF
+S31520037E4083E99C5C2C9F000041860034807F0000E0
+S31520037E50388100087F85E3784BFE1DE92C830000DB
+S31520037E6040860010A81F00167C9E00004186001045
+S31520037E7083FF00042C9F00004086FFD49B7D0000D7
+S31520037E807FE3FB78800100347C0803A68361001C12
+S31520037E908381002083A1002483C1002883E1002C51
+S31520037EA0382100304E8000209421FFE87C0802A66A
+S31520037EB093A1000C93C1001093E100149001001CC0
+S31520037EC03D2000283BC98CB483E98CB43D2000288F
+S31520037ED083A98D204BFD08B93D2000283CA0002412
+S31520037EE038A539DC3CC0002380898CE838C67DA8B8
+S31520037EF07C8419D67FA3EB784BFF29617C9FF00006
+S31520037F004186003483BF0008801D005C2C8000005E
+S31520037F1083FF00004186FFE84BFF0FDD801D005CD9
+S31520037F207C8018404185FFD8807F000448000C716F
+S31520037F304BFFFFCC8001001C7C0803A683A1000C09
+S31520037F4083C1001083E10014382100184E800020DD
+S31520037F509421FFE07C0802A69361000C9381001014
+S31520037F6093A1001493C1001893E1001C90010024EF
+S31520037F703D20002880098CE47C7C1B782C80000023
+S31520037F807C9F237883BF003083DF0048408600240C
+S31520037F903800000190098CE44BFF23E13D200028A3
+S31520037FA090698D203C60002338637DA84800BB314F
+S31520037FB0A17F0034717B00024082024C2C9C00027C
+S31520037FC0418601FC418500102C9C0001418600144A
+S31520037FD0480002342C9C000B418600A84800022846
+S31520037FE0716000044082001C813F00108009000458
+S31520037FF02C80FFFF4186000C61600100B01F003416
+S31520038000A13F003471200100418200507FE3FB78B9
+S315200380103CA00028809F000C38A58CFC4800EE6D00
+S31520038020813F003C83BF00308809001C981D000453
+S31520038030813F003CA0090014B01D00024BFF0EB97E
+S315200380402C830000907F005C408601BC3800000131
+S31520038050901F005C480001B071204000418200243B
+S31520038060809F000C807F003C88DD00053884000457
+S315200380707C85237838C600087CDD3214480001D974
+S31520038080881D00012C80001240860010881D0000E8
+S3152003809028800013418500103C60002738634CDCA0
+S315200380A04800004C813F003C8809001C981D0004B1
+S315200380B0813F003C2C9E0000A0090014B01D000245
+S315200380C040860144386000143880000538A000013A
+S315200380D04801AB917C7E1B782C9E000093DF0048E1
+S315200380E04086002C3C60002738634D003880000012
+S315200380F038A0000038C0000038E000003900000036
+S31520038100392000004BFDEC71480000FC7FC3F37857
+S315200381103D400028388000143D600028812A9C6851
+S31520038120800B9C6439290001912A9C683000000148
+S31520038130900B9C644BFE1BE193FE00087FC3F378F0
+S315200381403C800028A01F003438848CB460000400CF
+S31520038150B01F00344801AA59813F000C817F00409B
+S3152003816081290004800B003C7C890000408600980E
+S3152003817038000000901F005C38000006807F003C1A
+S31520038180981D000638A00006889D000538630090D8
+S31520038190388400087C9D22144BFD90F13D20002855
+S315200381A080098CE02C8000004186005C3D2000285D
+S315200381B03929D97C913F003C4800004C2C9E000075
+S315200381C0418600443D20002880099C687FC3F378BC
+S315200381D03000FFFF90099C684801A9EDA01F0034D9
+S315200381E0937F00487000FBFFB01F0034807E000C95
+S315200381F02C830000418600084800AEB17FC3F37884
+S315200382004801AAB9800100247C0803A68361000CD7
+S315200382108381001083A1001483C1001883E1001C0D
+S31520038220382100204E8000209421FFF87C0802A6E6
+S315200382309001000C7C8523783883009838C30090FE
+S31520038240480000158001000C7C0803A6382100088D
+S315200382504E8000209421FFC07C0802A692E1001CD8
+S315200382609301002093210024934100289361002C3D
+S315200382709381003093A1003493C1003893E1003CED
+S31520038280900100447C771B787C9923787CB82B78E3
+S315200382907CDE3378386000013880000138A0001C6A
+S315200382A038C0000148016FD97C7F1B79418200D8F1
+S315200382B03800001C901F000C901F0018813F001CE3
+S315200382C03880001C83890004835F00083B9CFFE4FD
+S315200382D0579C003A7FBAE21493BF00087FA3EB783A
+S315200382E04BFE1A353C60002838638D4C3B61000AEF
+S315200382F07F64DB7838A000064BFD8F913800080693
+S31520038300B01B000C392000017D3AE32E380008000B
+S31520038310B01D000238000006981D00043800000432
+S31520038320981D0005B13D00067FC3F378389D0008EC
+S3152003833038A000064BFD8F557F23CB78389D000E42
+S3152003834038A000044BFD8F457F03C378389D001862
+S3152003835038A000044BFD8F35380000009801000932
+S3152003836038000010980100087EE3BB788003006480
+S315200383707C0803A67FE4FB7838A1000838C00000F8
+S315200383804E800021800100447C0803A682E1001C64
+S315200383908301002083210024834100288361002C4C
+S315200383A08381003083A1003483C1003883E1003CFC
+S315200383B0382100404E8000209421FFD07C0802A65D
+S315200383C09301001093210014934100189361001C1C
+S315200383D09381002093A1002493C1002893E1002CCC
+S315200383E0900100347C791B787CBB2B797C9F237886
+S315200383F07CDA33787CFC3B7841820068893B001128
+S3152003840071200010418200183C60002838638D4C8F
+S315200384107F84E37838A000064800010471200020F9
+S315200384204182004038000001981C000038000000FB
+S31520038430981C00013800005E981C0002881A00056B
+S315200384405400067E981C0003881A0006981C000414
+S31520038450881A000738600001981C00054800021896
+S315200384602C9F00004186000C83BF00484800002053
+S31520038470807A00043880000138A00000480007C92C
+S315200384807C7D1B794182000883FD0008201D0000A6
+S315200384907D20E914217F00007C0BF9147D2B0379C1
+S315200384A0418200343C60002738634D203880000029
+S315200384B038A0000038C0000038E000003900000072
+S315200384C0392000004BFDE8B17F63DB784800ABDD44
+S315200384D0480001A0801F005C2C80000083DF003051
+S315200384E0418600144BFF0A11801F005C7C801840D4
+S315200384F040850038881E00012C8000124086002CFF
+S3152003850088BE00062C85000041860020887E000553
+S315200385107F84E378386300087C7E1A144BFD8D6DC7
+S315200385203860000148000150A019001A7018008015
+S3152003853041820078801F005C2C8000004086000C5E
+S315200385404BFF09B5907F005C897E0006300BFFFF49
+S315200385507C0001105409077C7D6500787D3F2B78CC
+S315200385602C9F00024085010C387900907F84E378A4
+S3152003857038BFFFFD4BFD8D15801A000438610008B6
+S315200385809001000848001D717D3FE2149869FFFFA2
+S315200385905460C23E9809FFFE5463867E9869FFFDA8
+S315200385A038600001480000D0807D000C2C83000039
+S315200385B0418600084800AAF5937D000C801F005CC5
+S315200385C02C800000418600AC3FC00028813E8CF4FD
+S315200385D0A01F00342C8900007000FFF7B01F003461
+S315200385E04084000C4BFD01A9907E8CF4801D001065
+S315200385F02C8000004186001C4BFF08FD801F005C79
+S31520038600813E8CF47C6018507C834840418400640E
+S315200386104BFF08E5907F005C3D200028801D00105D
+S3152003862081298CDC7C80480030000001901D0010DD
+S31520038630408400147F23CB78389A00044BFFFBED4C
+S3152003864048000030A01F003460000008B01F00342B
+S315200386504BFD013D3D20002880098CF07C6301D62B
+S31520038660801F005C7C001A14901F005C931D001071
+S3152003867038600000800100347C0803A683010010C3
+S3152003868083210014834100188361001C8381002009
+S3152003869083A1002483C1002883E1002C38210030E4
+S315200386A04E8000209421FFE87C0802A693A1000CAB
+S315200386B093C1001093E100149001001C3D20002873
+S315200386C080098CC82C800000418600FC3FC000280E
+S315200386D03BBE8CC84801A37183FE8CC82C9F000027
+S315200386E04186002C801F00042C800000901E8CC81D
+S315200386F040860008901D000438000000901F0004E7
+S31520038700801D00083000FFFF901D00084801A3A12B
+S315200387102C9F000041860010881F0011700900025B
+S31520038720408200103C60002738634D444801A4B5BD
+S31520038730815F000C288A000740850078817F000826
+S315200387402C8B00004186006CA00B00002C800001BE
+S3152003875040860060880B0004892B00057C004A14A0
+S315200387605400083C300000087C8A004041840044C1
+S31520038770A00B00022C8008004186000C2C801000E0
+S31520038780408600303D20002880098CF82C8000008C
+S31520038790418600147C0803A6807F00147FE4FB78BF
+S315200387A04E8000217FE3FB78480000394800000C07
+S315200387B07FE3FB784800A8F5801E8CC82C80000038
+S315200387C04086FF148001001C7C0803A683A1000CAD
+S315200387D083C1001083E10014382100184E80002045
+S315200387E09421FFB87C0802A692E100249301002875
+S315200387F09321002C934100309361003493810038F8
+S3152003880093A1003C93C1004093E100449001004CA6
+S315200388107C781B783881001838A0000483780008F8
+S3152003882083380014387B000EA2FB00064BFD8A5DBD
+S31520038830387B00183881001C38A000044BFD8A4D74
+S315200388403D20002880899C802C8400003BE000008A
+S315200388504186003C8161001C812100188004000CA4
+S315200388607C80C8004086001C7C9F2378801F003CA8
+S315200388707C8B0000418600187C890000418600100D
+S31520038880808400342C8400004086FFD42C9F000073
+S31520038890418601D82C8400004186000C8344003C89
+S315200388A048000008835F003C3BBB00087FA3EB78AE
+S315200388B03899009038A000064BFE13892C830000BC
+S315200388C0418601A87FA3EB783C80002838848D4C11
+S315200388D038A000064BFE136D2C8300004086002C27
+S315200388E03C60002738634D4C8081001838A0000077
+S315200388F038C0000038E000003900000039200000AD
+S315200389004BFDE47548000164806100187C83D00028
+S31520038910408600387FA3EB784800061D7C651B78CC
+S315200389203C60002738634D807F44D37838C00000ED
+S3152003893038E0000039000000392000004BFDE439FF
+S315200389409341001C4800011C8081001C38A00000B4
+S315200389507C84D278200400007C802114480002E91C
+S315200389607C7C1B79418200FC83DC00082C9E000062
+S31520038970418600F083FE00302C9F0000418600E4F0
+S3152003898088BF00062C85000041860050889F00057D
+S315200389907FA3EB78388400087C9F22144BFE12A514
+S315200389A02C830000418600347FA3EB7883A1001833
+S315200389B0480005857C651B783C60002738634DBCE1
+S315200389C038C0000038E000003900000039200000DC
+S315200389D07FA4EB784BFDE3A138000006981F000621
+S315200389E0387B0008889F000538A0000638840008D5
+S315200389F07C9F22144BFD8895801E005C2C800000F2
+S31520038A00418600244BFF04F17C7D1B784BFCFD81C2
+S31520038A103D20002880098CEC7C6301D67FBD1A1487
+S31520038A2093BE005CA01E00347000FFF7B01E003416
+S31520038A30809C000C2C8400003BE0000093FC00107B
+S31520038A4041860020801900647C0803A67F23CB7807
+S31520038A5080BE000C7FC6F3784E80002193FC000C69
+S31520038A602C970001418600107F03C3784800A63D5A
+S31520038A70480000F88061001C7C83D00040860028D3
+S31520038A803BBB00087FA3EB78389B001238A0000677
+S31520038A904BFD87F9387900907FA4EB7838A0000640
+S31520038AA0480000483880000038A00001480001999A
+S31520038AB07C7C1B794182FFB43BBB00087FA3EB7808
+S31520038AC0389B001238A0000683DC00084BFD87BDC7
+S31520038AD083FE00307FA4EB78887F000538A000064C
+S31520038AE0386300087C7F1A144BFD87A13BBB000E1D
+S31520038AF07FA3EB78389B001838A000044BFD878DA5
+S31520038B003861001C7FA4EB7838A000044BFD877DD9
+S31520038B1038000002B01B000638000800B01B000214
+S31520038B20387B00123BA1000A7FA4EB7838A000060D
+S31520038B304BFD875938000806B01D000C380000008D
+S31520038B409801000938000010980100087F23CB788C
+S31520038B50800300647C0803A67F04C37838A1000839
+S31520038B6038C000004E8000218001004C7C0803A6FB
+S31520038B7082E10024830100288321002C83410030D5
+S31520038B80836100348381003883A1003C83C1004084
+S31520038B9083E10044382100484E8000209421FFF0D1
+S31520038BA07C0802A693C1000893E1000C90010014EF
+S31520038BB07C7E1B7883FE00082C9F000040860010D5
+S31520038BC03C60002738634DE44801A019A81F0036EE
+S31520038BD02C8000004085003C813F00302C8900001A
+S31520038BE041860030880900012C800012408600242B
+S31520038BF0380000009809000638000000901E001077
+S31520038C00A01F00347000FFF7B01F00344800002077
+S31520038C103860000238A0000038E00000809F000C76
+S31520038C2080DF0010390000004800DE518001001467
+S31520038C307C0803A683C1000883E1000C38210010B9
+S31520038C404E8000209421FFF07C0802A693C10008E1
+S31520038C5093E1000C900100147C7E1B787C9F237883
+S31520038C603C60002838638D1093C300043005FFFF52
+S31520038C707CA02910B0A3000E4800D6DD7C631B79A7
+S31520038C804082000C3860000048000068A0030036CC
+S31520038C903000FFFFB0030036800300343D2004007C
+S31520038CA0740004027C80480040860014812300302F
+S31520038CB0880900012C800012418600342C9F000075
+S31520038CC04186FFC43C60002738634DF07FC4F378A8
+S31520038CD038A0000038C0000038E00000390000004A
+S31520038CE0392000004BFDE0914BFFFF9C8063004839
+S31520038CF0800100147C0803A683C1000883E1000CCD
+S31520038D00382100104E8000209421FFE07C0802A623
+S31520038D109361000C9381001093A1001493C1001852
+S31520038D2093E1001C900100247C9E2378881E000179
+S31520038D302C800002408600108BBE00112C9D000063
+S31520038D404186000C3860002F480001C83C0080246F
+S31520038D50600069207C8300007FDBF378418600E492
+S31520038D60418500183C0080246000691E7C83000036
+S31520038D704186001C480001903C00C0246000691F06
+S31520038D807C830000418600E04800017C807E00044D
+S31520038D903880000138A000004BFFFEAD7C7F1B7995
+S31520038DA04082000C3860003348000168387E001288
+S31520038DB0839F000838A00006813C00303800000657
+S31520038DC08889000598090006388400087C892214BE
+S31520038DD04BFD84B9801E00207009000440820020C8
+S31520038DE04BFF01157C7D1B784BFCF9A53D20002804
+S31520038DF080098CEC7C6301D67FBD1A1493BC005C7E
+S31520038E00A01C00345400077660000800B01C003410
+S31520038E1038000000901F0010801E002070090008F3
+S31520038E20418200EC389B0004A01C0034807C003C6B
+S31520038E3060004000B01C00344BFFF3F1480000D023
+S31520038E40807E00043880000038A000004BFFFDF927
+S31520038E507C7F1B79418200407FE3FB784BFFFD41FA
+S31520038E60480000AC807E00043880000038A0000053
+S31520038E704BFFFDD57C7F1B794182001C839F000815
+S31520038E80813C003093BE002088A900062C85000073
+S31520038E904086000C38600031480000788869000558
+S31520038EA0389E0012386300087C691A144BFD83DD53
+S31520038EB0817E002061600002901E0020A01C0034E9
+S31520038EC0700900014182000C61600003901E00209E
+S31520038ED0A01C00347009400041820010801E00202F
+S31520038EE060000008901E0020801C005C2C8000007F
+S31520038EF04086001C801E002060000004901E002077
+S31520038F004800000C3860001648000008386000004E
+S31520038F10800100247C0803A68361000C8381001052
+S31520038F2083A1001483C1001883E1001C382100208B
+S31520038F304E8000203D20002839698D3839400000B5
+S31520038F403D20002839298D243900003A8803000062
+S31520038F505400E13E7C0900AE394A0001980B00001B
+S31520038F60880300002C8A00055400073E7C0900AEC6
+S31520038F70386300019C0B00019D0B0001396B000136
+S31520038F804085FFCC38000000980BFFFF3C6000288B
+S31520038F9038638D384E8000209421FFC07C0802A6BA
+S31520038FA092E1001C93010020932100249341002881
+S31520038FB09361002C9381003093A1003493C1003830
+S31520038FC093E1003C900100447C7D1B787CDE337862
+S31520038FD03B6000007C9C2378A01D001A3B200000E8
+S31520038FE0700000412C8000417CBA2B787FB8EB7847
+S31520038FF082FC00184186000C3B60003E48000308B3
+S315200390004BFEFEF57FDFF379907D0058418200CC3D
+S31520039010A01F0034700900014082002C7F43D378BF
+S31520039020388000014800D3317C7F1B782C9F0000B9
+S315200390307FFEFB784186005CA01F00363000FFFFD1
+S31520039040B01F0036A01F0034700900024182004C75
+S31520039050801F004C2C800000418600207C1F037853
+S31520039060A01F003470090001408200307FE3FB78A3
+S315200390704800D5397FDFF378807F003038800001C0
+S315200390804800D2D5907F004C7C7F1B794082000C10
+S315200390903B60004148000270A01F0034700900089D
+S315200390A041820038801F005C2C800000418600141A
+S315200390B04BFEFE45801F005C7C8300404084001CE1
+S315200390C07FE0F2783000FFFF7C0001107000004340
+S315200390D0601B00414800023088DA00012C8600001C
+S315200390E04186007C2C860002408600947F03C37849
+S315200390F07FE4FB787F85E3787F46D37838E10008E1
+S315200391004BFFF2B92C8300004086000C3860000028
+S3152003911048000208881C001170090010418200349F
+S31520039120A01D001A70090800418200283D2000284E
+S31520039130806991D47F84E37838A000003CC03B9AB1
+S3152003914060C6CA0038E000014800A3C57C791B78B5
+S3152003915038000800B0010010480000403BDA000246
+S315200391607FC3F3783881000838A000064BFD811DA4
+S31520039170A01E000CB0010010480000203C60002710
+S3152003918038634E08809D0000A8BD00163B60002F63
+S315200391904BFE342D480001702C990000418600189F
+S315200391A07FA3EB787F24CB787F45D3787FE6FB7844
+S315200391B048019CB5813C001C817C00088009000085
+S315200391C07C0058502880000D4085001C392BFFF267
+S315200391D0801C000C913C00083000000E901C000CF3
+S315200391E0480000187F83E3783880000E38A00001FA
+S315200391F04801619D7C7C1B782C9C00004086000CDA
+S315200392003B60003748000100881C001170090002EA
+S3152003921041820010801C00183000000E901C00189C
+S315200392203861001083DC000838A00002389E000C49
+S315200392304BFD8059386100087FC4F37838A00006B7
+S315200392404BFD804938780090389E000638A00006EA
+S315200392504BFD8039480197F1813D0084801D0088AC
+S315200392607C8900007C7F1B784184001C801D008C38
+S315200392703B60003730000001901D008C4801983177
+S315200392804800008438000000901C0004813D0080C3
+S315200392902C8900004086000C939D007C4800000822
+S315200392A093890004A01D001A813D0084700B0400DD
+S315200392B0939D008039290001913D0084408200144A
+S315200392C0801D00687C0803A67FA3EB784E800021CF
+S315200392D07FE3FB78480197D9801D00443000000EB8
+S315200392E07C00BA14901D0044801C001074090030C1
+S315200392F041820024801D004C30000001901D004C4B
+S31520039300480000142C9C00004186000C7F83E378E0
+S3152003931048009D997F63DB78800100447C0803A67F
+S3152003932082E1001C8301002083210024834100283D
+S315200393308361002C8381003083A1003483C10038EC
+S3152003934083E1003C382100404E8000209421FFE831
+S315200393507C0802A69381000893A1000C93C10010F8
+S3152003936093E100149001001C7C7E1B787FDDF3784B
+S31520039370A01D001A700900017C9C23787CBF2B78E2
+S315200393804182009C4BFEFB71907D0058801D00405E
+S31520039390813F00183000000E7C004A14901D0040C7
+S315200393A0881C000070090001418200443C600028AB
+S315200393B038638D4C7F84E37838A000064BFE0885FE
+S315200393C02C83000040860010881F001160000010C7
+S315200393D04800000C881F001160000020981F001110
+S315200393E0801E004830000001901E0048A01E001A6F
+S315200393F07009010041820034881F00117009003072
+S3152003940040820028387D00907F84E37838A00006C8
+S315200394104BFE08312C830000418600107FE3FB7846
+S3152003942048009C89480000187FE4FB78A07C000C48
+S3152003943080C400187FA5EB78480007F18001001C43
+S315200394407C0803A68381000883A1000C83C1001036
+S3152003945083E10014382100184E8000209421FFF860
+S315200394607C0802A69001000C7C6A1B783800000653
+S31520039470980A001C980A001D816A00083800000E0D
+S315200394802C8B0000980A001E380005DC900A002069
+S315200394904186005439000006812B00002C890000E8
+S315200394A041860038880900012C8000124086002C52
+S315200394B099090004386A0090880A001D88890005E6
+S315200394C0980900063884000888AA001D7C8922147E
+S315200394D04BFD7DB948000010816B00102C8B0000DA
+S315200394E04086FFB88001000C7C0803A638210008BB
+S315200394F04E8000209421FFD87C0802A693A1001C4D
+S3152003950093C1002093E100249001002C7C7F1B78DB
+S315200395107C9E237848019531881F00112C800000FA
+S315200395207C7D1B78418600102C800002418600201A
+S31520039530480000A0387F00123881000838A00006B2
+S315200395404BFD7D493861000848000030393F001043
+S31520039550800900042C800000408600303C600028EF
+S3152003956038638D543881000838A000064BFD7D1DD5
+S315200395703C60002838638D5C3881001038A00006D3
+S315200395804BFD7D094800005C380000019801000866
+S3152003959038000000980100093800005E9801000A8F
+S315200395A088090005386100085400067E9801000BDF
+S315200395B088090006388100109801000C88090007E5
+S315200395C038A000069801000D4BFD7CC1480000140D
+S315200395D07FA3EB78480194D93860002F4800011007
+S315200395E088010008700900014182001088010010DB
+S315200395F070090001408200147FA3EB78480194B1DF
+S3152003960038600016480000E883FE009C2C9F00006B
+S31520039610418600647FE3FB783881000838A0000682
+S315200396204BFE06212C8300004086001C387F000653
+S315200396303881001038A000064BFE06092C83000053
+S315200396404186001083FF00142C9F00004086FFC82C
+S315200396502C9F000041860020801F00107FA3EB78FB
+S3152003966030000001901F0010480194453860000027
+S315200396704800007C386000183880001238A00001AA
+S31520039680480195E17C7F1B794182005838610008A7
+S315200396907FE4FB7838A000064BFD7BF13861001090
+S315200396A0389F000638A000064BFD7BE193DF000CB4
+S315200396B038000001901F0010801E009C7FA3EB78CA
+S315200396C0901F0014801E00A093FE009C3000000112
+S315200396D0901E00A0480193D938600034480000103A
+S315200396E07FA3EB78480193C9386000378001002CAB
+S315200396F07C0803A683A1001C83C1002083E10024E8
+S31520039700382100284E8000209421FFD87C0802A609
+S3152003971093A1001C93C1002093E100249001002C07
+S315200397207C7F1B787C9D23784801931D881F00111D
+S315200397302C8000007C7E1B78418600102C80000242
+S3152003974041860020480000A0387F00123881000897
+S3152003975038A000064BFD7B353861000848000030F1
+S31520039760393F0010800900042C8000004086003019
+S315200397703C60002838638D543881000838A00006E1
+S315200397804BFD7B093C60002838638D5C38810010D3
+S3152003979038A000064BFD7AF54800005C380000012E
+S315200397A09801000838000000980100093800005E7F
+S315200397B09801000A88090005386100085400067ECE
+S315200397C09801000B88090006388100109801000CC7
+S315200397D08809000738A000069801000D4BFD7AADD5
+S315200397E0480000147FC3F378480192C53860002FE0
+S315200397F0480000DC83FD009C2C9F00004186004826
+S315200398007FE3FB783881000838A000064BFE043539
+S315200398102C8300004086001C387F00063881001008
+S3152003982038A000064BFE041D2C8300004186001041
+S3152003983083FF00142C9F00004086FFC82C9F000046
+S31520039840408600147FC3F37848019265386000068A
+S315200398504800007C801F00103000FFFF2C80000092
+S31520039860901F0010418600147FC3F378480192416C
+S315200398703860000048000058813F000C8009009C96
+S315200398807C80F8003969009C41860018812B0000F2
+S31520039890800900147C80F800396900144086FFF0A3
+S315200398A0812B0000800900147FE3FB78900B0000D6
+S315200398B048019409801D00A07FC3F3783000FFFF81
+S315200398C0901D00A0480191E9386000348001002CE6
+S315200398D07C0803A683A1001C83C1002083E1002406
+S315200398E0382100284E8000204E8000209421FFF846
+S315200398F07C0802A69001000C7CE53B7838E000004A
+S3152003990048015F558001000C7C0803A63821000816
+S315200399104E8000209421FFD87C0802A69341001094
+S31520039920936100149381001893A1001C93C1002016
+S3152003993093E100249001002C7C7A1B787C9F23786A
+S315200399402C85FFFF7F5ED378392000007FFBFB78D1
+S31520039950408600342C9B000041860164807F0008EA
+S3152003996080BF000C7FC4F3784BFD7921801F000C48
+S3152003997083FF00002C9F00007FDE02144086FFE059
+S315200399804800013C2C850001408600342C9B0000B6
+S315200399904186012C807F000880BF000C7FC4F378AA
+S315200399A04BFD7A9D801F000C83FF00002C9F000037
+S315200399B07FDE02144086FFE0480001042C85000266
+S315200399C0408600682C9B0000418600F42C89000009
+S315200399D083BF000C807F000840850028A41EFFFF5C
+S315200399E0B0010008880300003BBDFFFF9801000972
+S315200399F0A001000838630001B01E00003BDE000210
+S31520039A007FC4F37838BD00017CA50E704BFD7A51D7
+S31520039A1083FF00002C9F00007FDEEA1457A907FE70
+S31520039A204086FFAC480000982C85000440860084BD
+S31520039A302C9B0000418600883B8100082C8900006E
+S31520039A4083BF000C807F0008408500407FC9F0500B
+S31520039A502C890003801E0000900100084185002008
+S31520039A60880300007C1C49AE392900012C89000398
+S31520039A70386300013BBDFFFF4085FFE880010008F6
+S31520039A80901E00003BDE00047FC4F37838BD00033C
+S31520039A907CA516704BFD79F183FF00002C9F0000F7
+S31520039AA07FDEEA1457A907BE4086FF9448000010BC
+S31520039AB03C60002738634E24480191297F63DB7875
+S31520039AC0480095E97C7AF0508001002C7C0803A697
+S31520039AD083410010836100148381001883A1001C35
+S31520039AE083C1002083E10024382100284E800020F2
+S31520039AF09421FFD07C0802A692E1000C930100106A
+S31520039B0093210014934100189361001C9381002034
+S31520039B1093A1002493C1002893E1002C90010034E3
+S31520039B207C7D1B787C9B23787CBC2B783FC00028CC
+S31520039B30807E91D47D394B78812300547D1A4378D6
+S31520039B40800900147D5853787C0803A638800001C9
+S31520039B5038A0000182E100384E8000217C7F1B79EA
+S31520039B6041820090807E91D481230054800900187D
+S31520039B707C0803A6388000014E8000217C631B7974
+S31520039B8041820068939F0014937F001893BF0008B7
+S31520039B9038000003981F0011801F0018907F001CB7
+S31520039BA0901F000C93A30000813F001C801F001808
+S31520039BB090090004813F001C9349000C813F001C3F
+S31520039BC093290010813F001C93090014813F001C38
+S31520039BD07FE3FB7892E900188123001C38000001FB
+S31520039BE090090008480000107FE3FB784800947D25
+S31520039BF038600000800100347C0803A682E1000C53
+S31520039C008301001083210014834100188361001C03
+S31520039C108381002083A1002483C1002883E1002CB3
+S31520039C20382100304E8000209421FFE87C0802A6CC
+S31520039C309381000893A1000C93C1001093E10014B3
+S31520039C409001001C547F043E2C9F08007C9E2378A1
+S31520039C507CBD2B787CDC3378418600102C9F08064C
+S31520039C6041860018480000243BA000013D2000281F
+S31520039C703BE9D7604800007C3BA000023D2000283A
+S31520039C803BE98CC84800006C3C60002838638D642F
+S31520039C904BFE04ED7C631B79418200408003000C5C
+S31520039CA07C80F80040860028800300082C80000072
+S31520039CB0418600B07C0803A67FA3EB787FC4F378A4
+S31520039CC07F85E3784E800021480000984BFE054DA2
+S31520039CD07C631B794082FFC8801D00547FC3F378C1
+S31520039CE030000001901D0054480093C148000074C1
+S31520039CF048018D55813F0008801F000C7C89000098
+S31520039D007C7C1B784184001C801F00107FC3F37862
+S31520039D1030000001901F0010480093914800003C3A
+S31520039D2038000000901E0004813F00042C890000A7
+S31520039D304086000C93DF00004800000893C9000406
+S31520039D4093DF0004801F00087FA3EB783000000117
+S31520039D50901F000848009E597F83E37848018D5160
+S31520039D608001001C7C0803A68381000883A1000CC4
+S31520039D7083C1001083E10014382100184E8000208F
+S31520039D809421FFF07C0802A693C1000893E1000CFE
+S31520039D90900100147C7F1B787C9E2378813F006092
+S31520039DA0A01F001A7D2803A6A87F001660000001C5
+S31520039DB0B01F001A4E8000217C631B79408200501D
+S31520039DC0813E0000888900012C8400024086001C05
+S31520039DD07FE3FB78801E003C389E003C900300986E
+S31520039DE04BFFE449480000243C60002738634E3487
+S31520039DF038A0000038C0000038E000003900000019
+S31520039E00392000004BFDCF7138600000800100141B
+S31520039E107C0803A683C1000883E1000C38210010C7
+S31520039E204E8000209421FFD07C0802A692E1000CEC
+S31520039E309301001093210014934100189361001C91
+S31520039E409381002093A1002493C1002893E1002C41
+S31520039E50900100347C7D1B787C9C23787CBB2B78FB
+S31520039E607CDA33787CF93B787D1843787D374B78D9
+S31520039E70388000904BFDFEA1B39D0016937D000014
+S31520039E80380005DC901D0020935D0060933D006C37
+S31520039E90931D006492FD007038000002B01D001A65
+S31520039EA07FA3EB784BFFC2E5800100347C0803A631
+S31520039EB082E1000C830100108321001483410018E2
+S31520039EC08361001C8381002083A1002483C1002891
+S31520039ED083E1002C382100304E8000209421FFF0AE
+S31520039EE07C0802A693C1000893E1000C900100149C
+S31520039EF07C7F1B787C9E2378386000013880001095
+S31520039F004BFE667D7C641B794182002093E4000C22
+S31520039F1093C400083C60002838638D644BFE00D947
+S31520039F2038600000480000083860FFFF80010014F5
+S31520039F307C0803A683C1000883E1000C38210010A6
+S31520039F404E8000209421FFE87C0802A693A1000CF2
+S31520039F5093C1001093E100149001001C7C7E1B78B2
+S31520039F603C60002838638D644BFE02157C7F1B7989
+S31520039F70418200403FA00028801F000C7C9E0000E9
+S31520039F8040860020387D8D647FE4FB784BFE011DDF
+S31520039F907FE3FB784BFE75293860000048000018E4
+S31520039FA07FE3FB784BFE02757C7F1B794082FFCCD7
+S31520039FB03860FFFF8001001C7C0803A683A1000CE8
+S31520039FC083C1001083E10014382100184E8000203D
+S31520039FD09421FFF87C0802A69001000C3C6000281F
+S31520039FE038638D644BFDFFFD8001000C7C0803A6BE
+S31520039FF0382100084E8000203CC0002880E68EF8D9
+S3152003A000288700074085000C3860FFFF4E8000201C
+S3152003A0103D2000281C0700343929D3A87D404A1443
+S3152003A020810A00042C8800004086008C39600003D6
+S3152003A0307D69032E3D20002839298D78912A000435
+S3152003A04038000002B00A0008B16A000A3D20002643
+S3152003A0503929BB58912A000C3D200024392955382B
+S3152003A060912A0010910A00143D200024392956A470
+S3152003A070912A00183D20002439295808912A001CCA
+S3152003A0803D2000263929BB24912A00203D20002685
+S3152003A0903929BF6C912A0024910A0028910A002CA1
+S3152003A0A0910A00303807000190068EF838600000C8
+S3152003A0B04E800020386000004E8000209421FFE06F
+S3152003A0C07C0802A69381001093A1001493C1001863
+S3152003A0D093E1001C900100247C9C237880030004D8
+S3152003A0E03861000890010008480000457C7D1B78F4
+S3152003A0F0801C0004386100089001000848000031E4
+S3152003A1007FA31A78200300007C60191480010024A1
+S3152003A1107C0803A68381001083A1001483C1001841
+S3152003A12083E1001C382100204E800020816300003B
+S3152003A1302C8B00004184000C5563000E4800005C04
+S3152003A140556000023D2080007C8048004086000C3C
+S3152003A1505563001E48000044556000043D20C0009E
+S3152003A1607C8048004086000C5563002E4800002C56
+S3152003A170556000063D20E0007C804800418600189B
+S3152003A180386000004E8000208069002C7D631838DB
+S3152003A1904E8000203C60E0003D20002881299C80E1
+S3152003A1A02C8900004D860020800900207C83000036
+S3152003A1B04186FFD8812900342C8900004086FFEC94
+S3152003A1C04E8000203D20002880098D702C800000C1
+S3152003A1D080630000418600403D20002881699C80E1
+S3152003A1E02C8B000041860060800B0024812B0020ED
+S3152003A1F07C6000387C80480041860014816B0034E3
+S3152003A2002C8B00004086FFE44800003C38600001A8
+S3152003A2104E8000203D20002881699C802C8B0000E5
+S3152003A22041860024800B002C812B00287C6000387B
+S3152003A2307C8048004186FFD8816B00342C8B00003C
+S3152003A2404086FFE4386000004E80002081430000F2
+S3152003A250554000066C09F000216900007D2B491446
+S3152003A2606C00E000216000007C0B01147D2B037938
+S3152003A2704182000C386000004E8000202C8A0000AA
+S3152003A280386000014D8400207540FF007D200026A4
+S3152003A29055291FFE6C007F00216000007C0B0114F2
+S3152003A2A07D2B03797C60002654631FFE4E8000209D
+S3152003A2B039230007396300047C895840380000009D
+S3152003A2C0980300004D840020880900002C8000009C
+S3152003A2D0418600147C034850300000019803000097
+S3152003A2E04E8000203929FFFF7C8958404084FFDCBB
+S3152003A2F04E800020806300002C8300007C6B1B783B
+S3152003A30041840010546A000E546B023E48000064D8
+S3152003A310546000023D2080007C8048004086001067
+S3152003A320546A001E546B043E4800004854600004DF
+S3152003A3303D20C0007C80480040860010546A002ED1
+S3152003A340546B063E4800002C546000063D20E00076
+S3152003A3507C804800418600144E8000208069002CB2
+S3152003A3607D6318784E8000203D40E000556B013E0A
+S3152003A3703D20002881299C802C8900004186001CD1
+S3152003A380800900207C8A00004186FFD4812900347D
+S3152003A3902C8900004086FFEC7D635B784E8000208D
+S3152003A3A09421FFC87C0802A6930100189321001C60
+S3152003A3B093410020936100249381002893A1002CCC
+S3152003A3C093C1003093E100349001003C7C9D2378B7
+S3152003A3D07CB92B787CDC33793BE000007F3ACB7861
+S3152003A3E07F3BCB784182002C3D20002883E99C804B
+S3152003A3F02C9F00004186001C801F000C7C80E000FF
+S3152003A4004186001083FF00342C9F00004086FFEC1A
+S3152003A4103C008020600069197C9D0000418600ACC9
+S3152003A4207C9D00404185004C3C0080206000690EE5
+S3152003A4307C9D0000418600F47C9D004041850010F0
+S3152003A4403C0080206000690C4800001C3C008020F2
+S3152003A450600069137C9D0000418601E83C00802052
+S3152003A460600069167C9D0000418600C0480001F803
+S3152003A4703C00C020600069227C9D0000418601D8F3
+S3152003A4807C9D0040418500203C0080406000691A85
+S3152003A4907C9D0000418600343C00C0206000692179
+S3152003A4A04800001C3C00C020600069237C9D0000FE
+S3152003A4B0418601A43C00C020600069257C9D0000E4
+S3152003A4C041860194480001A0881B00112C800002BC
+S3152003A4D0408600342C9F00004186002C801F000CF0
+S3152003A4E07C80E00040860014801F003C813B0014E2
+S3152003A4F07C8048004186001083FF00342C9F000097
+S3152003A5004086FFDC3F008020631869197FA9C27843
+S3152003A510200900007D204914217F00007C0BF914BB
+S3152003A5207D2B003940820138A00300067009008084
+S3152003A5304182011C2C9C0000408600103C600027B1
+S3152003A54038634E5C4801869D2C9F00004086011887
+S3152003A550386000683880000D38A000004801870560
+S3152003A5607C7E1B794082000C386000374800069CAD
+S3152003A5707FC3F378388000684BFDF79D3D20002884
+S3152003A58083E99C802C9F0000418600204800000818
+S3152003A59083FF0034801F00342C8000004086FFF4A4
+S3152003A5A093DF00344800000893C99C80813C00084F
+S3152003A5B02C8900007FDFF3784186002048000008BD
+S3152003A5C081290010800900102C8000004086FFF4AA
+S3152003A5D093E900104800000893DC0008381F003870
+S3152003A5E0901F0000381F0048901F0004381F005892
+S3152003A5F0901F000838000008981F0058A01C001A56
+S3152003A600700900024182001438000010981F004888
+S3152003A61038000002981F00493D2000283929D97C9B
+S3152003A6207C9C4800939F000C4186003C3D200028DB
+S3152003A63080099C783000000190099C784800002806
+S3152003A640A0030006700900804082000C38600001D8
+S3152003A650480005B82C9F00004086000C3860003166
+S3152003A660480005A83C008020600069197C9D0000F5
+S3152003A6704186042C7C9D0040418500543C0080206B
+S3152003A6806000690E7C9D00004186013C7C9D004054
+S3152003A690418500183C0080206000690C7C9D0000E9
+S3152003A6A0418602504800052C3C0080206000691337
+S3152003A6B07C9D0000418601FC3C00802060006916D9
+S3152003A6C07C9D000041860244480005083C00C020CA
+S3152003A6D0600069227C9D0000418600A07C9D00408D
+S3152003A6E0418500283C0080406000691A7C9D00005B
+S3152003A6F0418602283C00C020600069217C9D000021
+S3152003A7004186002C480004CC3C00C020600069230D
+S3152003A7107C9D0000418600383C00C02060006925EE
+S3152003A7207C9D000041860080480004A8393F0038FC
+S3152003A730801F003881690004814900088109000CC3
+S3152003A740393A0010901A001048000198A01C001AEC
+S3152003A7507009000241820168393F0048801F004882
+S3152003A76081690004814900088109000C393A0010E7
+S3152003A770901A00104800016CA01C001A70090010E2
+S3152003A7804182013C393F0048801F0048816900040B
+S3152003A790814900088109000C393A0010901A0010EB
+S3152003A7A048000140393F0058801F00588169000442
+S3152003A7B0814900088109000C393A0010901A0010CB
+S3152003A7C048000120A01C001A70090010418200F0E5
+S3152003A7D03BDF00483BA10008801F0048813E000460
+S3152003A7E0817E0008815E000C90010008913D0004E3
+S3152003A7F0917D0008915D000C393A0010801A0010F3
+S3152003A80081690004814900088129000C901F0048B2
+S3152003A810917E0004915E0008913E000C801C006C22
+S3152003A8202C8000004186004C7F83E3787C0803A6B6
+S3152003A8303C8080206084690E7FE5FB784E80002172
+S3152003A8407C7A1B794182002C7F43D37880010008D0
+S3152003A850813D0004817D0008815D000C901F004826
+S3152003A860913E0004917E0008915E000C4800039CF3
+S3152003A870A01F0018700900014182038C38010008CB
+S3152003A880901F00047FE3FB783880000238A0000481
+S3152003A8904800C845381F0048901F00047FE3FB7813
+S3152003A8A03880000138A000054800C82D4800035809
+S3152003A8B0A01C001A700900024082000C38600016A2
+S3152003A8C048000348393A0010801A001081690004B1
+S3152003A8D0814900088109000C393F0048901F004830
+S3152003A8E091690004914900089109000C4800031856
+S3152003A8F07F83E3787FE4FB7838BA001038C0000101
+S3152003A900480003A548000304801B0014901F005C25
+S3152003A910901F002C480002F0881F00392C8000026B
+S3152003A92038E000003BC000013B4000004086005455
+S3152003A930881B00102C800000408600343BC000009A
+S3152003A940393F0038801F0038816900048149000897
+S3152003A9508109000C393B0010901B001091690004FB
+S3152003A960914900089109000C48000018801B001427
+S3152003A970813F003C7C004A783120FFFF7FC90110CC
+S3152003A980881B00302C800000418600447F83E378B7
+S3152003A9907FE4FB78480002A5393B0030801B00305A
+S3152003A9A081690004814900088109000C393F005858
+S3152003A9B0901F005891690004914900089109000CE1
+S3152003A9C0801F005C38E00001901F002CA01C001A99
+S3152003A9D07009001041820048881B00212C80000248
+S3152003A9E04086003C7F83E3787FE4FB784800024D72
+S3152003A9F038E00001393B0020801B002081690004D8
+S3152003AA00814900088109000C393F0048901F0048FE
+S3152003AA1091690004914900089109000C881B0011D3
+S3152003AA202C800002408600247FC03B794182001C93
+S3152003AA307F83E3787FE4FB7838BB001038C00000BF
+S3152003AA40480002657C7A1B78A01C001A7009000254
+S3152003AA5041820044881B00212C8000024086003856
+S3152003AA60801B00242C8000004186002C393B0020CB
+S3152003AA70801B002081690004814900088109000C9C
+S3152003AA80393F0048901F0048916900049149000806
+S3152003AA909109000C7F43D378480001707F83E378C4
+S3152003AAA07FE4FB7848000195813C00087C89F80007
+S3152003AAB040860010801F0010901C00084800006884
+S3152003AAC0800900102C800000418600388009001080
+S3152003AAD07C80F800418600147C09037880090010E5
+S3152003AAE02C8000004086FFE8800900102C8000009F
+S3152003AAF041860010801F001090090010480000288E
+S3152003AB003C60002738634E683880000038A0000078
+S3152003AB1038C0000038E0000039000000392000006A
+S3152003AB204BFDC2557FFEFB783D20002883E99C80A0
+S3152003AB307C9EF80040860010801E003490099C807D
+S3152003AB4048000068801F00342C80000041860038AE
+S3152003AB50801F00347C80F000418600147C1F03781C
+S3152003AB60801F00342C8000004086FFE8801F0034BD
+S3152003AB702C80000041860010801E0034901F003474
+S3152003AB80480000283C60002738634E8C388000003C
+S3152003AB9038A0000038C0000038E00000390000006B
+S3152003ABA0392000004BFDC1D1A13E001A7D20073478
+S3152003ABB02C800000418500107FC3F3784BFFBEDD58
+S3152003ABC0480000443809FFFFB01E001A4800003829
+S3152003ABD02C9C000041860010801C006C2C800000F9
+S3152003ABE04086000C3860002D480000207C0803A610
+S3152003ABF07F83E3787FA4EB787F25CB784E80002173
+S3152003AC0048000008386000008001003C7C0803A649
+S3152003AC10830100188321001C8341002083610024C3
+S3152003AC208381002883A1002C83C1003083E1003473
+S3152003AC30382100384E8000209421FFF07C0802A69C
+S3152003AC4093E1000C900100147C9F2378A01F001829
+S3152003AC50700900014182003CA003001A7009001804
+S3152003AC60418200147FE3FB783880000238A0000479
+S3152003AC70480000107FE3FB783880000238A00000EC
+S3152003AC804800C455A01F00185400043CB01F0018E8
+S3152003AC90800100147C0803A683E1000C38210010F0
+S3152003ACA04E8000209421FFB87C0802A692E100245E
+S3152003ACB0930100289321002C9341003093610034A3
+S3152003ACC09381003893A1003C93C1004093E1004453
+S3152003ACD09001004C7C7B1B787C9F23787CBD2B7852
+S3152003ACE07CD73378831D000448017D5D3BDF003824
+S3152003ACF03B810008801F0038813E0004817E0008C6
+S3152003AD00815E000C90010008913C0004917C0008B0
+S3152003AD10915C000C801D0000813D0004817D0008AC
+S3152003AD20815D000C901F0038913E0004917E00083F
+S3152003AD30915E000C801B006C2C8000003B200001E0
+S3152003AD407C7A1B78418600547F63DB787C0803A6D4
+S3152003AD503C8080206084690C7FE5FB784E8000214F
+S3152003AD607C7D1B79418200347F43D37848017D4122
+S3152003AD707FA3EB7880010008813C0004817C0008D6
+S3152003AD80815C000C901F0038913E0004917E0008E0
+S3152003AD90915E000C48000198801B00643D2000242E
+S3152003ADA039298E987C8048004086001C3D2000234C
+S3152003ADB039297E50A01F0018913F0014600001001E
+S3152003ADC0B01F00187F43D37848017CE52C970000F9
+S3152003ADD04186002038010008901F00007F63DB783E
+S3152003ADE07FE4FB784BFFFE55381F0038901F000089
+S3152003ADF02C9800004184000C3C00FF0048000020F2
+S3152003AE00570000023D2080007C8048004086000CCD
+S3152003AE103C00FFFF480000083800FF00901F002475
+S3152003AE20813F002C2C89000040860014801F0024BB
+S3152003AE30901F002C901F005C48000010801F0024E8
+S3152003AE407C004838901F0024387F0058813F002417
+S3152003AE50801F002C7F094838913F00207F0000384F
+S3152003AE60901F00284BFFF44D801B0024901F001CCD
+S3152003AE70A13B001A7120000241820028813F002C49
+S3152003AE80801F0028817F00207C094B38801F0024E7
+S3152003AE90913F004C7D600338901F00304800003CF2
+S3152003AEA07120000841820014801F000063390004CA
+S3152003AEB0901F000448000024712000104182001CCA
+S3152003AEC0881F00492C8000024186000C3860000050
+S3152003AED04800005C633900047FE3FB783880000177
+S3152003AEE07F25CB784800C1F17C7D1B7940820010F9
+S3152003AEF0A01F001860000001B01F0018A81B001A2D
+S3152003AF0070098000418200243C00E00060000001BB
+S3152003AF1090010018386100187F64DB7838A00000A0
+S3152003AF204800015D907B005C7FA3EB788001004C99
+S3152003AF307C0803A682E10024830100288321002CB8
+S3152003AF4083410030836100348381003883A1003C30
+S3152003AF5083C1004083E10044382100484E8000200D
+S3152003AF609421FFF87C0802A69001000C3D200028BE
+S3152003AF7080099C802C8000007C6B1B7839299C805F
+S3152003AF804186004C806900007C835800408600304F
+S3152003AF908003003490090000A123001A7D20073482
+S3152003AFA02C8000004185000C4BFFBAF1480000209D
+S3152003AFB03809FFFFB003001A480000148003003449
+S3152003AFC02C800000392300344086FFBC8001000C0E
+S3152003AFD07C0803A6382100084E80002080630000E9
+S3152003AFE02123FFFF200900007D204914216300004F
+S3152003AFF07C0B19147D2B03794182000C38600001E8
+S3152003B0004E800020A004001A700900024082000C22
+S3152003B010386000004E800020808400082C840000C5
+S3152003B0207C6B1B784186005081240000880900012F
+S3152003B0302C800002408600348004004C7C83000070
+S3152003B0404186FFBC800400307C8300004186FFB02C
+S3152003B050800400287C8B00004186FFA48004002006
+S3152003B0607C8B00004186FF98808400102C8400008E
+S3152003B0704086FFB8386000004E8000209421FFC030
+S3152003B0807C0802A6934100289361002C938100300B
+S3152003B09093A1003493C1003893E1003C900100440E
+S3152003B0A07C7C1B787C9F23787CBB2B784801793169
+S3152003B0B07C7A1B78807C00007FE4FB784800040DB3
+S3152003B0C07C7E1B793BA00000418200483D2000285E
+S3152003B0D0806991D881230054800900147C0803A633
+S3152003B0E03880000138A000114E8000217C7D1B7919
+S3152003B0F041820128807EFFFC7FA4EB784800835998
+S3152003B100801E001030000001901E0010480000B47D
+S3152003B1103860001C3880001138A0000148017B45A7
+S3152003B1207C7E1B79418200F47FC3F3783880001C30
+S3152003B13083BEFFFC4BFDEBE1813C000093FE000C3C
+S3152003B14038000001901E00107FC3F378913E00085B
+S3152003B150480002A12C830000408600C0380000026C
+S3152003B16098010019801C00009001001C801F006CB0
+S3152003B1702C800000418600247FE3FB787C0803A60D
+S3152003B1803C8080206084693138A100084E800021EC
+S3152003B1902C830000418600107FC3F378480002D930
+S3152003B1A0480000783D20002880098EFC2C80000072
+S3152003B1B0418600107C0803A67FC3F3784E800021C6
+S3152003B1C02C9B0000418600443D200028806991D8AD
+S3152003B1D081230054800900147C0803A638800001CB
+S3152003B1E038A000044E8000217C7F1B794182002CED
+S3152003B1F0807BFFFC7FE4FB784800825D801E00187D
+S3152003B200901F000093FE00187F43D378480178A14E
+S3152003B2107FA3EB78480000207F43D37848017891B9
+S3152003B2202C9D00004186000C7FA3EB7848007E3DD1
+S3152003B23038600000800100447C0803A6834100286F
+S3152003B2408361002C8381003083A1003483C10038BD
+S3152003B25083E1003C382100404E8000209421FFC822
+S3152003B2607C0802A69381002893A1002C93C1003069
+S3152003B27093E100349001003C7C7D1B787C9E2378EF
+S3152003B2804801775D2C9E000083FD00087C7C1B789B
+S3152003B290397F001841860044807F00182C830000E4
+S3152003B2A041860048800300087C9E000041860018E2
+S3152003B2B0816B0000806B00002C8300004086FFE832
+S3152003B2C048000028812B000080090000900B000015
+S3152003B2D048007D9948000014807F00182C830000C5
+S3152003B2E04186000848007DC5801F00103000FFFFFF
+S3152003B2F02C800000901F0010408600543D2000281B
+S3152003B30080098F002C800000418600107C0803A64C
+S3152003B3107FE3FB784E800021380000029801001954
+S3152003B320801F00089001001C807F000C8003006CA6
+S3152003B3307C0803A63C8080206084693238A10008FB
+S3152003B3404E8000217FE3FB784800012D7FA3EB7815
+S3152003B35048007D197F83E3784801775538600000DC
+S3152003B3608001003C7C0803A68381002883A1002C4E
+S3152003B37083C1003083E10034382100384E80002019
+S3152003B3807C6B1B783D20002880699C802C830000E1
+S3152003B3904186001C800300287C8058004D860020AF
+S3152003B3A0806300342C8300004086FFEC3860000065
+S3152003B3B04E8000209421FFF87C0802A69001000C01
+S3152003B3C03D20002880698D74388000113CA0002818
+S3152003B3D038A59C74480179113D20002890699C70FA
+S3152003B3E08001000C7C0803A6382100084E8000202B
+S3152003B3F09421FFF07C0802A693E1000C900100142F
+S3152003B4007C7F1B78480175D93D400028396A9C709A
+S3152003B410801F0008816B00045409843E7C004A780F
+S3152003B420813F000C814A9C707C004A787C00583806
+S3152003B430540B103A7C0A582E2C800000901F0000D3
+S3152003B4407C0A5A144186000C7D2A582E93E900045F
+S3152003B4507FEA592E901F0004480176553860000074
+S3152003B460800100147C0803A683E1000C3821001018
+S3152003B4704E8000209421FFF07C0802A693E1000C65
+S3152003B480900100147C7F1B7848017555813F00008D
+S3152003B4902C8900004186000C801F000490090004BB
+S3152003B4A0813F0004801F00009009000048017601B7
+S3152003B4B038600000800100147C0803A683E1000C99
+S3152003B4C0382100104E8000209421FFE87C0802A634
+S3152003B4D093A1000C93C1001093E100149001001C6A
+S3152003B4E07C7E1B787C9D2378480174F53D4000289B
+S3152003B4F0396A9C707FC986707FC94A787D29EA7824
+S3152003B500800B0004816A9C707D2900385529103AE6
+S3152003B5107FEB482E2C9F00007D6B4A144186002822
+S3152003B520801F00087C80F00040860010801F000CDE
+S3152003B5307C80E8004186001C83FF00002C9F0000CE
+S3152003B5404086FFE0480175693860000048000058CE
+S3152003B550800B00007C9F000041860044813F000051
+S3152003B5602C8900004186000C801F000490090004EA
+S3152003B570813F0004801F000090090000800B00001B
+S3152003B5802C800000901F00004186000C812B0000B8
+S3152003B59093E9000493EB0000917F000448017511A1
+S3152003B5A07FE3FB788001001C7C0803A683A1000CA3
+S3152003B5B083C1001083E10014382100184E80002037
+S3152003B5C09421FFE87C0802A69001001C7C631B796A
+S3152003B5D039010008418201EC880300002C800030E9
+S3152003B5E03940000038E0000A4086000C38E00008A5
+S3152003B5F03863000188030000680900782169000088
+S3152003B6007D2B491468000058216000007C0B01142F
+S3152003B6107D2B03794182000C38E00010386300014A
+S3152003B620896300002C8B00004186006C3D20002896
+S3152003B63080C981B02F0700107D2658AE71200004E3
+S3152003B640418200187C0A39D6386300013000FFD0C6
+S3152003B6507D405A1448000034409A003C7120004033
+S3152003B6604182003471200002392B000A55402036CE
+S3152003B6704182000C3000FF9F480000083000FFBFC6
+S3152003B6807D404A1438630001896300002C8B000037
+S3152003B6904086FFA8896300002C8B002E4086003845
+S3152003B6A0380100147C004010380000007C0001148F
+S3152003B6B0212A00FF7D2949107D2900D07C0B4B7957
+S3152003B6C040820100914800003908000438630001D4
+S3152003B6D04BFFFF082C8B0000418600183D200028D5
+S3152003B6E0812981B07C0958AE70090028418200D493
+S3152003B6F07C0140503000FFFC7C0016702C80000239
+S3152003B700914800007C09037841860030418500106A
+S3152003B7102C8000014186001C480000A82C890003C8
+S3152003B7204186003C2C89000441860064480000942D
+S3152003B73081410008480000A03C0000FF6000FFFF95
+S3152003B7407C8A00404185007C800100088121000C11
+S3152003B7505400C00E7C0A4B784800007C38A00000B9
+S3152003B76060A5FFFF7C8A2840418500588001000898
+S3152003B7708121000C816100105400C00E5529801EC2
+S3152003B7807C004B787C0A5B784800004C288A00FFB3
+S3152003B79041850030800100088121000C8161001061
+S3152003B7A05400C00E5529801E7C004B78556B402EC5
+S3152003B7B0812100147C005B787C0A4B7848000018B2
+S3152003B7C03C60002B606300014BFD8F453860FFFF13
+S3152003B7D0480000087D4353788001001C7C0803A69B
+S3152003B7E0382100184E8000202C8300007C6B1B78A8
+S3152003B7F04184000C5463023E4E80002054600002B4
+S3152003B8003D2080007C8048004086000C5463043E23
+S3152003B8104E800020546000043D20C0007C804800F8
+S3152003B8204186000C5463013E4E8000205563063E3C
+S3152003B8304E8000202C83007F418500105469C00E62
+S3152003B8405480023E48000044380000006000FFFF99
+S3152003B8507C830000418500105469801E5480043E79
+S3152003B860480000283C0000FF6000FFFF7C830000A7
+S3152003B870418500105469402E5480063E4800000C32
+S3152003B8805469E0065480013E7D2903789125000002
+S3152003B8904E8000209421FFD87C0802A693810018AD
+S3152003B8A093A1001C93C1002093E100249001002C56
+S3152003B8B07C7C1B787C9E23787CBD2B7838600004A7
+S3152003B8C04BFE5BD17C7F1B79418200147FC3F378C7
+S3152003B8D07FA4EB787FE5FB784BFFFF5D7F83E378DF
+S3152003B8E07FE4FB7838A000044BFD7D197F83E37842
+S3152003B8F08001002C7C0803A68381001883A1001CE9
+S3152003B90083C1002083E10024382100284E800020B3
+S3152003B910806300002C8300007C6B1B784184000C21
+S3152003B9205463463E4E800020546000023D20800032
+S3152003B9307C8048004086000C5463843E4E80002061
+S3152003B940546000043D20C0007C8048004186000CE2
+S3152003B9505463273E4E8000205563C23E4E8000200E
+S3152003B9609421FFE07C0802A693A1001493C100183A
+S3152003B97093E1001C900100247C9D23784BFFFC451A
+S3152003B98090610008386100084BFFE7A59061000825
+S3152003B990386100087FA4EB78480001A980010024C0
+S3152003B9A07C0803A683A1001483C1001883E1001C2D
+S3152003B9B0382100204E8000209421FFE87C0802A62F
+S3152003B9C09001001C39010008880300002C800030F8
+S3152003B9D03940000038E0000A4086000C38E00008B1
+S3152003B9E03863000188030000680900782169000094
+S3152003B9F07D2B491468000058216000007C0B01143C
+S3152003BA007D2B03794182000C38E000103863000156
+S3152003BA10896300002C8B00004186006C3D200028A2
+S3152003BA2080C981B02F0700107D2658AE71200004EF
+S3152003BA30418200187C0A39D6386300013000FFD0D2
+S3152003BA407D405A1448000034409A003C712000403F
+S3152003BA504182003471200002392B000A55402036DA
+S3152003BA604182000C3000FF9F480000083000FFBFD2
+S3152003BA707D404A1438630001896300002C8B000043
+S3152003BA804086FFA8896300002C8B002E4086002069
+S3152003BA90380100187C8800404084004C91480000FF
+S3152003BAA039080004386300014BFFFF202C8B00006C
+S3152003BAB0418600183D200028812981B07C0958AE93
+S3152003BAC070090028418200209148000039080004AB
+S3152003BAD0392100087C0940507C0016702880000418
+S3152003BAE0408500183C60002B606300024BFD8C21CF
+S3152003BAF03860FFFF4800003C394000007C8A004044
+S3152003BB004084002C7D284B7839200000540B103AB2
+S3152003BB107C09402E392900047C895840554A402EF9
+S3152003BB205400063E7D4A03784184FFE87D435378DB
+S3152003BB308001001C7C0803A6382100184E800020B3
+S3152003BB409421FFF07C0802A69001001480030000D4
+S3152003BB507C8323783C8000279001000888A1000875
+S3152003BB6088C1000988E1000A8901000B38844EBC8C
+S3152003BB704BFE0EB1800100147C0803A63821001069
+S3152003BB804E8000209421FFE87C0802A693C1001072
+S3152003BB9093E100149001001C83C300003860001257
+S3152003BBA04BFE58F17C7F1B794182001493C1000818
+S3152003BBB0386100087FE4FB784BFFFF897FE3FB783E
+S3152003BBC08001001C7C0803A683C1001083E10014B6
+S3152003BBD0382100184E8000209421FFF07C0802A60D
+S3152003BBE093C1000893E1000C900100147C9E2378F6
+S3152003BBF04BFFF9D17C7F1B784BFD8AA13D20002B7F
+S3152003BC0080030000612900017C8048004086000CE7
+S3152003BC103860FFFF4800000C93FE000038600000E8
+S3152003BC20800100147C0803A683C1000883E1000C6D
+S3152003BC30382100104E8000203CA0002880E58EF895
+S3152003BC40288700077C661B784085000C3860FFFF39
+S3152003BC504E8000203D2000281D0700343929D3A813
+S3152003BC607D684A14814B00042C8A0000408600A874
+S3152003BC70380000007C084B2E3D20002839298D787A
+S3152003BC80912B0004B00B0008B00B000A914B000C5B
+S3152003BC903D2000243929F270912B0010914B00147A
+S3152003BCA0914B0018914B001C3D2000243929DAC002
+S3152003BCB0912B0020914B00243D2000243929E5B8FF
+S3152003BCC0912B00283D2000243929E668912B002C4E
+S3152003BCD0914B00303807000190058EF8386000003C
+S3152003BCE0800600003D20002890099C8480060004DD
+S3152003BCF03D20002890098DF0800600083D2000286D
+S3152003BD0090098DFC8006000C3D20002890098DF4B7
+S3152003BD104E800020386000004E8000203CC0002862
+S3152003BD2080E68EF8288700074085000C3860FFFFE1
+S3152003BD304E8000203D2000281C0700343929D3A833
+S3152003BD407D404A14810A00042C8800004086007C2A
+S3152003BD50396000037D69032E3D20002839298D781B
+S3152003BD60912A0004380000FFB00A0008B16A000ACD
+S3152003BD703D20002439295348912A000C3D200024D4
+S3152003BD8039295538912A0010910A00143D200024A0
+S3152003BD90392956A4912A00183D2000243929580808
+S3152003BDA0912A001C910A0020910A0024910A002856
+S3152003BDB0910A002C910A00303807000190068EF86C
+S3152003BDC0386000004E800020386000004E8000203E
+S3152003BDD03CC0002880E68EF8288700074085000CA3
+S3152003BDE03860FFFF4E8000203D2000281C070034CA
+S3152003BDF03929D3A87D404A14810A00042C880000DF
+S3152003BE0040860084396000037D69032E3D20002887
+S3152003BE1039298D78912A000438000000B00A0008D9
+S3152003BE20B16A000A3D20002439295348912A000C7F
+S3152003BE303D20002439295538912A0010910A0014EF
+S3152003BE403D200024392956A4912A00183D20002498
+S3152003BE5039295808912A001C3D200024392952E00B
+S3152003BE60912A0020910A0024910A0028910A002C85
+S3152003BE70910A00303807000190068EF838600000DA
+S3152003BE804E800020386000004E8000209421FFD889
+S3152003BE907C0802A69321000C9341001093610014A1
+S3152003BEA09381001893A1001C93C1002093E10024E1
+S3152003BEB09001002C7CFE3B797C9923787CBF2B78E0
+S3152003BEC07CDB33784082002C3C60002738634EC8E5
+S3152003BED03880000138A0000238C0000338E000048F
+S3152003BEE039000005392000064BFDAE8D4800015C64
+S3152003BEF0A01E001A700900017FDCF378408200142B
+S3152003BF00801E003030000001901E00304800013CA6
+S3152003BF10801E002C7C7A1B7830000001901E002C9A
+S3152003BF204BFECFD5907E0058801E0040813F0018DF
+S3152003BF307C004A14901E0040801F000C809B001C2E
+S3152003BF407C8020007FFDFB784084001C7FE3FB7808
+S3152003BF504801369D7C7F1B794082000C7FBFEB789E
+S3152003BF60480000E8881C001C2C80000641840090B1
+S3152003BF702C80000A4085000C2C80000F4086008010
+S3152003BF80809F000888040000700900014182004058
+S3152003BF903C60002838638D4C38A000064BFDDCA599
+S3152003BFA02C83000040860010881F001160000010BB
+S3152003BFB04800000C881F001160000020981F001104
+S3152003BFC0801C004830000001901C0048A01C001A69
+S3152003BFD07009010041820028881F00117009003072
+S3152003BFE04082001C809F000880BA0194387A019809
+S3152003BFF04BFDDC512C83000040860050801F000837
+S3152003C000813B001C7F23CB787C004A14901F0008B9
+S3152003C010801F000C813B001C7FE4FB787C090050C9
+S3152003C0209004000C80040018813B001C7FC5F37824
+S3152003C0307C0900509004001880C4001890A40014B2
+S3152003C0404BFFDBE9480000142C9F00004186000CBF
+S3152003C0507FE3FB7848007055386000018001002C8F
+S3152003C0607C0803A68321000C8341001083610014FE
+S3152003C0708381001883A1001C83C1002083E100244F
+S3152003C080382100284E8000209421FFF07C0802A648
+S3152003C09093E1000C900100147C9F2378801F00AC51
+S3152003C0A02C800000418600547FE3FB784BFFA315C9
+S3152003C0B0807F00A8388008003CA0002438A5BD8CCA
+S3152003C0C0480056012C8300004086000C386000008F
+S3152003C0D04800002C3C60002738634EE4388000017A
+S3152003C0E038A0000238C0000338E0000439000005F8
+S3152003C0F0392000064BFDAC813860FFFF8001001418
+S3152003C1007C0803A683E1000C382100104E80002012
+S3152003C1109421FFF87C0802A69001000C800400AC51
+S3152003C1202C8000004186004C806400A438800806D9
+S3152003C1303CA0002438A5BD8C480055892C830000DB
+S3152003C1404086000C386000004800002C3C60002725
+S3152003C15038634F083880000138A0000238C0000336
+S3152003C16038E0000439000005392000064BFDAC09F0
+S3152003C1703860FFFF8001000C7C0803A638210008E5
+S3152003C1804E8000209421FFF07C0802A693E1000C48
+S3152003C190900100143D20002880098DA42C800000E6
+S3152003C1A07C6B1B787CBF2B7841860124800400009E
+S3152003C1B03000FFFF28800004418501143D20002420
+S3152003C1C03929C0E05400103A7C09002E3D20002472
+S3152003C1D03929C0E07C004A147C0903A64E8004203A
+S3152003C1E0000000140000002C00000044000000ACF6
+S3152003C1F00000007C80C400042C860000418600D009
+S3152003C2003C60002738634F2C4800006880C4000434
+S3152003C2102C860000418600B83C60002738634F50C7
+S3152003C2204800005080C400042C8600004186002468
+S3152003C2303C60002738634F74388B000880AB0010AE
+S3152003C24038E0000439000005392000064BFDAB29F0
+S3152003C2504BFECCA5907F00584800007480C4000490
+S3152003C2602C860000418600683C60002738634F987F
+S3152003C270388B000880AB001038E000043900000535
+S3152003C280392000064BFDAAF14800004480C400046F
+S3152003C2902C860000418600243C60002738634FBC6F
+S3152003C2A0388B000880AB001038E000043900000505
+S3152003C2B0392000064BFDAAC14BFECC3DA01F001A18
+S3152003C2C0907F00587000FFBEB01F001A8001001433
+S3152003C2D07C0803A683E1000C382100104E80002041
+S3152003C2E09421FDC07C0802A69321022493410228AF
+S3152003C2F09361022C9381023093A1023493C10238B5
+S3152003C30093E1023C900102443D20002780097C14DE
+S3152003C3107C7B1B783000FFFF7C9B00007C9C237872
+S3152003C32040850014386000164BFD83E53860FFFF17
+S3152003C330480003083D2000281F5B00C03B29AE9020
+S3152003C3407FFACA15408200143C60002738634FE009
+S3152003C35038800001480000A093E100087F83E3783A
+S3152003C3607F64DB783FA0002438BDBD8C3CC000240D
+S3152003C37038C6BF883FC0002438FEC5643D0000246C
+S3152003C3803908C084392008003D400027394A500027
+S3152003C39048004C192C830000907F00A8408600108B
+S3152003C3A03C600027386350104800004893E100089A
+S3152003C3B07F83E3787F64DB7838BDBD8C3CC0002463
+S3152003C3C038C6C01038FEC564390000003920080677
+S3152003C3D03D400027394A503848004BD12C83000072
+S3152003C3E0907F00A4408600303C6000273863504489
+S3152003C3F07F84E37838A0000238C0000338E00004C5
+S3152003C40039000005392000064BFDA96D3860FFFF72
+S3152003C4104800022883DF00A838800001807E02A816
+S3152003C42038A0000148006CC52C830000907F00B81B
+S3152003C4304086000C3860FFFF48000200807E02A879
+S3152003C4403880000138A0000148006CA12C8300002D
+S3152003C450907F00BC418600187F83E3784BFD7301F0
+S3152003C4604BFE50317C7D1B7940820044807E02A89E
+S3152003C470809F00B848006B213860FFFF480001BC4D
+S3152003C480387E0090881E001C888B0005980B0004BC
+S3152003C490881E001D38840008980B000688BE001DE0
+S3152003C4A07C8B22144BFD4DE54800012C7FA3EB78B2
+S3152003C4B07F84E3784BFD72753C8040046084690772
+S3152003C4C0807F00A838BF0090480050593C80400424
+S3152003C4D060846905807F00A838A10218480050456A
+S3152003C4E03C80400460846910807F00A838A1001036
+S3152003C4F0480050317FE3FB78388000904BFDD819F4
+S3152003C500B37F00167FBAC92E380000008161011857
+S3152003C510901F00603D2000243929C818913F006CE4
+S3152003C5203D2000243929CB78913F0064901F007069
+S3152003C530917F0020806101143880080048005991BA
+S3152003C540A01F001A907F007460000002B01F001A1B
+S3152003C55088010117981F001C88010123813F00B819
+S3152003C560981F001D9009000C813F00BC881F001DE9
+S3152003C5703C8040049009000C807F00A888BF001EE1
+S3152003C5806084691248004F9D2C8300007FFEFB7850
+S3152003C5904186000C38000000981F001E7FE3FB78BD
+S3152003C5A04BFF9BE9813F00082C8900004186002828
+S3152003C5B0816900002C8B000041860010880B000146
+S3152003C5C02C8000124186FEBC812900102C89000094
+S3152003C5D04086FFE03D2000243929C598913F006815
+S3152003C5E0807F00A83C8040046084690938BF00B47A
+S3152003C5F048004F312C8300004186000C3800FFFF92
+S3152003C600901F00B43C80400460846908807F00A8A2
+S3152003C61038BF00B048004F0DA001021A3860000051
+S3152003C62060000061B01F001A38000001892101173C
+S3152003C630901F00AC993F001C800102447C0803A68E
+S3152003C64083210224834102288361022C83810230C1
+S3152003C65083A1023483C1023883E1023C382102409C
+S3152003C6604E8000209421FFF87C0802A69001000C3E
+S3152003C6707C83237941820010480000213860000022
+S3152003C680480000083860FFFF8001000C7C0803A6E1
+S3152003C690382100084E8000209421FFE87C0802A65A
+S3152003C6A09381000893A1000C93C1001093E1001419
+S3152003C6B09001001C7C7F1B78801F00AC2C8000001F
+S3152003C6C0408600603D20002880098DA42C80000030
+S3152003C6D0418601BC3C6000273863506838800001DE
+S3152003C6E038A0000238C0000338E0000439000005F2
+S3152003C6F0392000064BFDA68148000194801F008C3B
+S3152003C7007FC3F37830000001901F008C4800699D99
+S3152003C710801F003830000001901F00384800017048
+S3152003C720801F007C2C800000418601643B9F007C97
+S3152003C7303FA0002883DF007C2C9E00004186002C2E
+S3152003C740801E00042C800000901F007C4086000879
+S3152003C750901F008038000000901E0004801F008474
+S3152003C7603000FFFF901C00083D20002880098B1C09
+S3152003C7702C800000418600207C0803A6809E0008AA
+S3152003C78080BE000C7FE3FB784E8000212C830000C3
+S3152003C790408600F0801D8DA42C8000004186002851
+S3152003C7A03C600027386350843880000138A000029B
+S3152003C7B038C0000338E0000439000005392000069C
+S3152003C7C04BFDA5B5807F00A87FC4F37848004A0DAA
+S3152003C7D02C83FFFE40860070801D8DA42C800000D4
+S3152003C7E0418600283C600027386350A0388000012A
+S3152003C7F038A0000238C0000338E0000439000005E1
+S3152003C800392000064BFDA571801F0084813F0088D7
+S3152003C8107C8048004084FEE8801F007C901E000434
+S3152003C820801F00802C8000004086000893DF008054
+S3152003C830801F008493DF007C30000001901C0008D9
+S3152003C8404800004C801D8DA4813F00342C800000BD
+S3152003C85039290001913F0034418600283C60002796
+S3152003C860386350B43880000138A0000238C0000372
+S3152003C87038E0000439000005392000064BFDA4F9F1
+S3152003C880801F007C2C8000004086FEAC8001001CAB
+S3152003C8907C0803A68381000883A1000C83C10010B2
+S3152003C8A083E10014382100184E8000209421FFE8EC
+S3152003C8B07C0802A69381000893A1000C93C1001063
+S3152003C8C093E100149001001C3D2000281F8300C023
+S3152003C8D03929AE907F9C4A14807C00A87F84E37814
+S3152003C8E04BFFF7A97C7D1B78807C00A47F84E378AB
+S3152003C8F04BFFF8217FA31B788001001C7C0803A62D
+S3152003C9008381000883A1000C83C1001083E10014F6
+S3152003C910382100184E8000209421FDD07C0802A6E1
+S3152003C92093A1022493C1022893E1022C900102349D
+S3152003C9303C008020600069327C8400007CBE2B781A
+S3152003C9403BA00000815E003C4186021C41850040DD
+S3152003C9503C008020600069107C8400004186028CA4
+S3152003C960418500183C0080206000690C7C8400000F
+S3152003C97041860058480002C03C008020600069318F
+S3152003C9807C84000041860164480002AC3C004004DC
+S3152003C99060006D007C84000041860090418500186C
+S3152003C9A03C00C018600069337C840000418602ACD9
+S3152003C9B0480002843C00400460006D017C84000032
+S3152003C9C0418600AC480002703D20002881699C8086
+S3152003C9D02C8B000041860028800B000C7C801800DD
+S3152003C9E040860010800B003C7C805000418600105E
+S3152003C9F0816B00342C8B00004086FFE03D20002312
+S3152003CA0039297E50A00B0018912B001460000100D9
+S3152003CA10B00B0018801E003C389E003C9003009803
+S3152003CA204BFFB80948000234A80300163D2000280E
+S3152003CA301C0000C03929AE907FE04A154182006070
+S3152003CA40807F00A83C8040046084691038A10010D0
+S3152003CA5048004AD17C7D1B79408200448001011421
+S3152003CA6093BE0004901E0000480001F03C80400461
+S3152003CA7060846910A80300163D2000281C0000C00E
+S3152003CA803929AE907FE04A14807F00A838A1001090
+S3152003CA9048004A917C7D1B794182000C3860001640
+S3152003CAA0480001BC8001011C901E0000800101404A
+S3152003CAB0901E000480010148901E00088001014C4D
+S3152003CAC0901E000C80010154901E00108001015815
+S3152003CAD0901E001480010160901E001880010164DD
+S3152003CAE0901E001C480001748803001C2C8000063D
+S3152003CAF0418400F02C80000A4085000C2C80000F16
+S3152003CB00408600E038000001A9630016813E001428
+S3152003CB109801000838000000980100093800005EDB
+S3152003CB209801000A912102183D2000283929AE9048
+S3152003CB301D6B00C0880102197FEB4A145400067E40
+S3152003CB409801000B8801021A8921021B9801000C07
+S3152003CB509921000D807F00A83881000848004A816A
+S3152003CB60480000F48803001C2C80000641840074CE
+S3152003CB702C80000A4085000C2C80000F4086006420
+S3152003CB8038000001A9630016813E001498010008AD
+S3152003CB9038000000980100093800005E9801000A59
+S3152003CBA0912102183D2000283929AE901D6B00C023
+S3152003CBB0880102197FEB4A145400067E9801000B64
+S3152003CBC08801021A8921021B9801000C9921000D64
+S3152003CBD0807F00A83881000848004A514800007821
+S3152003CBE03BA00016480000743C80800460846904DE
+S3152003CBF03D200028A80300163929AE901C0000C04A
+S3152003CC00A0BE00107FE04A14807F00A864A5FFFF22
+S3152003CC10480049117C7D1B783C808004807F00A8D6
+S3152003CC20A0BE001060846904480048F97FBD1B78C4
+S3152003CC3048000028A80300163D2000281C0000C039
+S3152003CC403929AE907FE04A14807F00A87FC5F37808
+S3152003CC50480048D17C7D1B787FA3EB788001023482
+S3152003CC607C0803A683A1022483C1022883E1022C24
+S3152003CC70382102304E8000209421FFC87C0802A66A
+S3152003CC8092C1001092E10014930100189321001C15
+S3152003CC9093410020936100249381002893A1002CC3
+S3152003CCA093C1003093E100349001003C7C7E1B78D5
+S3152003CCB07CDD33783B4000007C9C23783B000000DE
+S3152003CCC07CB92B787FD7F3783D600028A01E001A05
+S3152003CCD0A93E0016700000411D2900C02C8000418A
+S3152003CCE0396BAE907F695A1482DB00A84186000C0B
+S3152003CCF03B40003E480002CC4BFEC1FD7FBFEB7993
+S3152003CD00907E0058418200CCA01F00347009000198
+S3152003CD104082002C7F23CB78388000014800963947
+S3152003CD207C7F1B782C9F00007FFDFB784186005C6F
+S3152003CD30A01F00363000FFFFB01F0036A01F0034AF
+S3152003CD40700900024182004C801F004C2C80000099
+S3152003CD50418600207C1F0378A01F00347009000140
+S3152003CD60408200307FE3FB78480098417FBFEB7811
+S3152003CD70807F003038800001480095DD907F004C8D
+S3152003CD807C7F1B794082000C3B40004148000234E3
+S3152003CD90A01F00347009000841820038801F005C00
+S3152003CDA02C800000418600144BFEC14D801F005C81
+S3152003CDB07C8300404084001C7FE0EA783000FFFF3C
+S3152003CDC07C00011070000043601A0041480001F402
+S3152003CDD088D900012C860000418600882C86000213
+S3152003CDE04086009C801E00742C8000004186003003
+S3152003CDF07EE3BB787FE4FB787C0803A67F85E37814
+S3152003CE007F26CB7838E100084E8000212C83000052
+S3152003CE104086000C38600000480001BC881C0011C5
+S3152003CE207009001041820034A01E001A7009080000
+S3152003CE30418200283D200028806991D47F84E378AD
+S3152003CE4038A000003CC03B9A60C6CA0038E0000107
+S3152003CE50480066BD7C781B783BA008004800004844
+S3152003CE603BB900027FA3EB783881000838A000067F
+S3152003CE704BFD4419A3BD000C4800002C3C60002741
+S3152003CE80386350C838E000003B40002F39000000CB
+S3152003CE90809E0000A8BE0016392000004BFD9ED9B7
+S3152003CEA0480001202C980000418600187FC3F378A0
+S3152003CEB07F04C3787F25CB787FE6FB7848015FA97B
+S3152003CEC0813B00BC3801000890090008813B00B86B
+S3152003CED03817009090090008813B00BC7FA0EB78AF
+S3152003CEE0B0090012813B00B87EC3B378B0090012A3
+S3152003CEF080BB00B880DB00BC7F84E37848004A51BE
+S3152003CF007C7C1B794082000C3B400037480000B4F0
+S3152003CF1048015B35813E0084801E00887C890000A1
+S3152003CF207C7F1B784184001C801E008C3B4000378D
+S3152003CF3030000001901E008C48015B754800008478
+S3152003CF4038000000901C0004813E00802C890000DC
+S3152003CF504086000C939E007C4800000893890004B9
+S3152003CF60A01E001A813E0084700B0400939E00804D
+S3152003CF7039290001913E008440820014801E0068F6
+S3152003CF807C0803A67FC3F3784E8000217FE3FB78DA
+S3152003CF9048015B1D801E0044813C000C7C004A1422
+S3152003CFA0901E0044801C0010740900304182002426
+S3152003CFB0801E004C30000001901E004C48000014D7
+S3152003CFC02C9C00004186000C7F83E378480060DDBB
+S3152003CFD07F43D3788001003C7C0803A682C10010DE
+S3152003CFE082E10014830100188321001C8341002061
+S3152003CFF0836100248381002883A1002C83C1003010
+S3152003D00083E10034382100384E8000203D6000281B
+S3152003D010800B8F042C8000004C8600203D200024AA
+S3152003D0203929CF2C912B8F044E8000209421FFC8C1
+S3152003D0307C0802A69281000892A1000C92C10010DE
+S3152003D04092E10014930100189321001C93410020C0
+S3152003D050936100249381002893A1002C93C100306F
+S3152003D06093E100349001003C7C761B787C9E2378E8
+S3152003D0707CB72B787CD43378839600082C9E0005C6
+S3152003D080801C00007CF53B78541856BA4186001460
+S3152003D0903D2000288009D548300000019009D54855
+S3152003D0A0A81C0006540904E14082024C893C00096D
+S3152003D0B069290001200900007D2049146BC0000561
+S3152003D0C03160FFFF7C0B01107D2B003941820080EC
+S3152003D0D08016000C393800087C8048404184007053
+S3152003D0E07D5CC0AE5540063E7D2000D055290FFEFF
+S3152003D0F0680000087C0000D054000FFE7D2B003909
+S3152003D1004182004C380AFFF7288000014085004001
+S3152003D110380AFFF32880000140850034380AFFF1DE
+S3152003D1202880000140850028380AFFEF2880000167
+S3152003D1304085001C3D2000283929D5488009000850
+S3152003D1403000000190090008480001AC8816001140
+S3152003D15070090030408201A0386000013880000247
+S3152003D16038A0008038C00001480121157C7F1B7937
+S3152003D17041820184A0BC0002288500084185000C59
+S3152003D1807F582A14480000083B580008397A0008BB
+S3152003D190917F000C813F001C289E00128009000409
+S3152003D1A0837F00087C0B00505419003A7C1BCA1459
+S3152003D1B0901F00087C1D0378408500103C600027E3
+S3152003D1C0386350E448015A1D3D2000283929D548A3
+S3152003D1D057CB103A7D6B4A14800B000C2C9E00050E
+S3152003D1E030000001900B000C7FDBC9AE4086000C9B
+S3152003D1F0929D0004480000502C9E000C380000002D
+S3152003D200901D0004408600109AFD00043AE00000B9
+S3152003D210480000346BC90003200900007D2049140F
+S3152003D2206AE00004216000007C0B01147D2B003989
+S3152003D230418200142C9500004186000CA015002283
+S3152003D240B01D00069AFD00017F83E3783BBD0008ED
+S3152003D2507FA4EB787F45D3784BFD4031A01D000298
+S3152003D2607C00C214B01D0002813F001C801F0008F1
+S3152003D270812900003000FFEC7C8048404084001068
+S3152003D2803C600027386350F0480159597F83E3787F
+S3152003D29038A00014813F0008801F000C3929FFECB9
+S3152003D2A0913F000830000014901F000C901F0018B7
+S3152003D2B08016001483BF0008901F00147FA4EB7808
+S3152003D2C04BFD3FC938000001A13F000E981D000900
+S3152003D2D07FE3FB78B13D0002801D00003920000565
+S3152003D2E05120C10E901D000038000000981D00013A
+S3152003D2F04800051D7EC3B37848005DB18001003C1C
+S3152003D3007C0803A68281000882A1000C82C100103A
+S3152003D31082E10014830100188321001C834100202D
+S3152003D320836100248381002883A1002C83C10030DC
+S3152003D33083E10034382100384E8000209421FFE019
+S3152003D3407C0802A6934100089361000C9381001088
+S3152003D35093A1001493C1001893E1001C90010024AB
+S3152003D3607C7E1B78837E0008A39B00022C9C0007EF
+S3152003D3707C9A23784185001C3D2000283929D548ED
+S3152003D3808009005C300000019009005C48000450CD
+S3152003D390289C00234185000C7C9AE214480000084F
+S3152003D3A0389A0024801E000C7C8020004084002CA8
+S3152003D3B07FC3F378480122397C7E1B794082001C87
+S3152003D3C03D2000283929D5488009005C300000011A
+S3152003D3D09009005C480004107FC3F3787F84E378C8
+S3152003D3E0801E000C837E000883BE00087C1A005032
+S3152003D3F0901E000C7C1DD214901E00087C1F0378FF
+S3152003D4004801EEDD2C8300004186001C3D200028C8
+S3152003D4103929D54880090060300000019009006051
+S3152003D420480003BC801E000C813E00087C00D214F9
+S3152003D430901E000C7D3A4850913E00087D7DD0AE6B
+S3152003D440288B00124185038C3D2000283929D54895
+S3152003D450556B103A7D6B4A14800B006C300000012B
+S3152003D460900B006C7C1DD0AE28800012887F0001B3
+S3152003D470418503603D2000243929D3985400103A6E
+S3152003D4807C09002E3D2000243929D3987C004A1498
+S3152003D4907C0903A64E8004200000033800000338CD
+S3152003D4A0000003380000004C000000EC000002A03E
+S3152003D4B00000033800000338000001A400000338ED
+S3152003D4C000000338000000CC000000DC000001B09F
+S3152003D4D0000003380000033800000338000001D0A1
+S3152003D4E0000003382883000C4185013C3D2000249D
+S3152003D4F03929D4105460103A7C09002E3D2000248B
+S3152003D5003929D4107C004A147C0903A64E800420B2
+S3152003D5100000003400000034000000340000003412
+S3152003D5200000003C00000034000000440000004CD2
+S3152003D5300000004C000000440000004C00000044A2
+S3152003D5400000004C38630008480000483860000596
+S3152003D5504800004038600008480000383860000959
+S3152003D560480000302C830001418500BC386300123B
+S3152003D570480000202C830001418500AC386000144C
+S3152003D580480000102C8300004086009C386000046D
+S3152003D590289C002340850024801F00085409473E09
+S3152003D5A05520103A300000107C9C00404184000C2A
+S3152003D5B0288900044185001C3D2000283929D548A7
+S3152003D5C080090064300000019009006448000210BD
+S3152003D5D03D200028A01F000A38898DBCB01F000AF1
+S3152003D5E0801F00183D20002890040004881F001186
+S3152003D5F03929D6007D6900AE3D2000281D6B0034F5
+S3152003D6003929D3A87D6B4A14800B00142C80000083
+S3152003D610418601C07C0803A638BF00084E8000213E
+S3152003D620480001B03D2000283929D54880090058F3
+S3152003D6303000000190090058480001983800000086
+S3152003D640981F0000480000B0289C00134085011C49
+S3152003D6503800000E981F000048001019907F000C18
+S3152003D660907F0010480000903D20002880098DB847
+S3152003D6702C8000004186015C2C9C000B40850154C4
+S3152003D680801B00102C8000004186000C2C80FFFF9D
+S3152003D69040860008801B000C3D20002890098DD071
+S3152003D6A0809E00143C60002838638DCC4BFF91B9D3
+S3152003D6B07C631B794182011C38000012981F0000ED
+S3152003D6C08003005C901F0008801B000C2C80000048
+S3152003D6D0408600248123000CA129001A7120000210
+S3152003D6E04082000C712000104182000C8003004C04
+S3152003D6F0901B000C3D600028A01B0002396BD54807
+S3152003D7007C00D214B01B0002800B0068300000019D
+S3152003D710900B0068893F00005529103A7D295A1439
+S3152003D7208009000C7FC3F378300000019009000CB8
+S3152003D730480000DD480000B02C8300034185FEE845
+S3152003D740289C002340850024801F00085409473E57
+S3152003D7505520103A300000107C9C00404184000C78
+S3152003D760288900044185001C3D2000283929D548F5
+S3152003D77080090064300000019009006448000054C9
+S3152003D7803FA000283BBD8DBC7FA3EB783CE000285F
+S3152003D79038E78DDC3C80002838848DCC801B000C38
+S3152003D7A038A0000090070004801F000438C000063C
+S3152003D7B090040004801F001839000000901D000407
+S3152003D7C048008ED53860000F7FA4EB784801157D7D
+S3152003D7D07FC3F37848007C754800000C7FC3F37839
+S3152003D7E0480058C9800100247C0803A68341000809
+S3152003D7F08361000C8381001083A1001483C1001868
+S3152003D80083E1001C382100204E8000209421FFD084
+S3152003D8107C0802A693210014934100189361001CEF
+S3152003D8209381002093A1002493C1002893E1002C27
+S3152003D830900100347C7A1B78837A000838610008CB
+S3152003D840801B0000813B000C540056BA3320FFECAA
+S3152003D850912100084BFFC9F92C8300003BA000004F
+S3152003D86040860024801B000C3D207F005400000EC0
+S3152003D8707C804800418600107F43D3784800582D8A
+S3152003D880480002443D20002880699C802C830000A8
+S3152003D890801B000C817B0010901B001041860038F2
+S3152003D8A08003003C7C8B00004186002C8123000CE6
+S3152003D8B0A009001A70090002418200108003004C5F
+S3152003D8C07C8B000041860010806300342C8300008B
+S3152003D8D04086FFD02C8300003D20002839298DCC9B
+S3152003D8E09169000440860020809A00147D234B789A
+S3152003D8F04BFF8F757C631B794082000C3D200028EB
+S3152003D90080699C803D2000288163003C2C9900007F
+S3152003D91088098DF3917B000C981B000840850190A4
+S3152003D9204800140D7C7D1B782C9D00003B9B001426
+S3152003D9307FBFEB78408600383860000138800002CC
+S3152003D94038A0008038C00001480119357C7D1B7939
+S3152003D95041820104380000042C9D0000813D00080B
+S3152003D960901D000C93E90000418600EC2C990000E1
+S3152003D9707F3ECB7840850098895C00002C8A000086
+S3152003D9804186008C2C8A00014086000C3BE0000176
+S3152003D990480000248BFC0001201F00007D20F91481
+S3152003D9A07C1FF0107C0001107C0000D07D2B0379B6
+S3152003D9B04082005C69490007200900007D20491444
+S3152003D9C069400044216000007C0B01147D2B037900
+S3152003D9D04082000C2C8A0082408600287F83E378CD
+S3152003D9E0801D0008809D000C7FE5FB787C80221437
+S3152003D9F04BFD3899801D000C7C00FA14901D000CF9
+S3152003DA007FDFF0517F9CFA144181FF70813D000C2A
+S3152003DA107D2016707C0001945400103A7FC0485133
+S3152003DA20418200342C9E00034185002C394000009E
+S3152003DA303BDE0001817D0008813D000C2C9E000306
+S3152003DA407D4B49AE801D000C30000001901D000C5B
+S3152003DA504085FFE0A01B00027C190050B01B00028A
+S3152003DA60801B0000392000055120C10E901B0000A9
+S3152003DA70881A001170090002801A000C7C190050C4
+S3152003DA80901A000C41820010801A00187C1900504D
+S3152003DA90901A00183B3900147C7BCA1480BA000CF8
+S3152003DAA0389B001438A5FFEC4BFD37E17F43D37831
+S3152003DAB0880300117FA4EB78700000CF9803001130
+S3152003DAC0480000412C9D00004186000C7FA3EB7883
+S3152003DAD048005599800100347C0803A6832100144D
+S3152003DAE0834100188361001C8381002083A10024C5
+S3152003DAF083C1002883E1002C382100304E8000208A
+S3152003DB009421FFE07C0802A6934100089361000C50
+S3152003DB109381001093A1001493C1001893E1001C74
+S3152003DB20900100247C7D1B78817D00087C9A2378D4
+S3152003DB30838B0000801D000C579C56BA7D2BE21464
+S3152003DB40913D00087C1C0050901D000C837D00082D
+S3152003DB5038000000B01B0002A08B00027C9C2050E2
+S3152003DB604801E77DB07B00027FA3EB787F44D3781F
+S3152003DB7038A0000038C0000038E0000081230008E8
+S3152003DB808003000C7D3C4850912300087C00E2145E
+S3152003DB909003000C480017DD800100247C0803A6AF
+S3152003DBA0834100088361000C8381001083A1001444
+S3152003DBB083C1001883E1001C382100204E800020F9
+S3152003DBC09421FFF07C0802A693E1000C9001001437
+S3152003DBD038600002388000FF38A0000348010FDDBB
+S3152003DBE07C7F1B79408200103C600027386350FC01
+S3152003DBF048014FF13C00C4EC60004EC53D6000284F
+S3152003DC00396BD6003D2000283929D3A87D29F85021
+S3152003DC107D2901D6394B00FF5529F0BE992A0000EC
+S3152003DC20394AFFFF7C8A58004084FFF43D200028B0
+S3152003DC3039698D7883EB0014800B00187C9F004094
+S3152003DC40408400843D2000283889D6003D200028C2
+S3152003DC5038A9D3A83CE0C4EC60E74EC57D665B7863
+S3152003DC60395F0008812AFFFC2C8900004186004485
+S3152003DC70800900002C80000240860038A90A000093
+S3152003DC805500043E7D2000D055290FFE680000FF75
+S3152003DC907C0000D054000FFE7D2B003941820014F6
+S3152003DCA07C05F8507C0039D65400F0BE7C0821AEA2
+S3152003DCB0800600183BFF00347C9F0040394A00341D
+S3152003DCC04184FFA43D600028392BD788912900047D
+S3152003DCD0912BD7884800099D3D200028B0699C7C5C
+S3152003DCE03D20002880098DFC3D2000289009D76C13
+S3152003DCF0800100147C0803A683E1000C3821001060
+S3152003DD004E8000209421FFE87C0802A693C10010D0
+S3152003DD1093E100149001001C48014D2D3D6000281D
+S3152003DD20812BD7602C890000394BD76091210008BD
+S3152003DD304186002C800900042C800000900BD760BC
+S3152003DD4040860008900A0004380000009009000469
+S3152003DD50800A00083000FFFF900A000848014D5151
+S3152003DD60806100082C8300004186055C3D20002845
+S3152003DD7080099C802C800000418605403D20002898
+S3152003DD808009D700300000019009D7008003000CDA
+S3152003DD90288000133BE9D7004185002838800014EA
+S3152003DDA04801184D2C83000090610008408600141A
+S3152003DDB0801F000C30000001901F000C4BFFFF5CFE
+S3152003DDC08061000881630008808B00003C004000CE
+S3152003DDD0548900067C8900009161000C4186001C51
+S3152003DDE03D2000283929D70080090058300000013A
+S3152003DDF090090058480004C4549E56BA289E00131E
+S3152003DE004185001C3D2000283929D70080090010B0
+S3152003DE103000000190090010480004A08003000C84
+S3152003DE207C9E0000408500387FC4F378480117C1E3
+S3152003DE307C691B79906100084082001C3D200028E4
+S3152003DE403929D700800900103000000190090010FD
+S3152003DE504BFFFEC8800900089001000C3D200028D6
+S3152003DE6080099C84700900104182003C806100086F
+S3152003DE707FC4F3784801E4695460043E2C80000093
+S3152003DE808121000CB069000A4186001C3D20002830
+S3152003DE903929D700800900043000000190090004C5
+S3152003DEA0480004188161000CA00B00027C80F0401E
+S3152003DEB0B00B00024084001C3D2000283929D700DE
+S3152003DEC0800900143000000190090014480003EC77
+S3152003DED0A00B0004A12B0006B00B0004B12B0006F7
+S3152003DEE080610008A08B0002812300187C892040D2
+S3152003DEF04084001C3D2000283929D70080090008CA
+S3152003DF003000000190090008480003B0408500282E
+S3152003DF108003000C7C804800408600149083000C0C
+S3152003DF20A00B0002900300184800000C7C892050A7
+S3152003DF30480115453D20002880098F082C800000C4
+S3152003DF404186002838810008812100087C0803A621
+S3152003DF5038A1000C806900147FC6F3784E80002117
+S3152003DF602C8300014186FDB4289E00143D20002801
+S3152003DF703800000090098E00408500148061000857
+S3152003DF80480008612C8300004086FD903D20002830
+S3152003DF9081699C802C8B0000418600943D200028BB
+S3152003DFA08101000880098DF880E1000C2F00000113
+S3152003DFB0409A0014800B000C812800147C804800B2
+S3152003DFC040860060800B003C814700107C80500017
+S3152003DFD041860140812B000C800800147C890000B7
+S3152003DFE040860040A009001A7009000241820034CD
+S3152003DFF0800B004C7C80500041860118800B00303A
+S3152003E0007C8A00004186010C800B00287C8A000054
+S3152003E01041860100800B00207C8A0000418600F4A3
+S3152003E020816B00342C8B00004086FF888141000CD5
+S3152003E030816A00103D20E000556000067C80480080
+S3152003E040408600803D20002881298F102C890000DE
+S3152003E05041860050A00A0004806100087D2803A69B
+S3152003E060B00A0004808300144E8000212C83000014
+S3152003E070408600708121000C880900092C8000024B
+S3152003E080A0090004B0090004418600883D20002829
+S3152003E0903929D70080090024300000019009002483
+S3152003E0A08121000C8161000880690010808B001497
+S3152003E0B04BFFD4192C8300004086005848000024C7
+S3152003E0C02C8BFFFF4186004C2C8B0000418600449D
+S3152003E0D03D20002880099C84700900014082002489
+S3152003E0E03D2000283929D7008009002880610008AF
+S3152003E0F0300000019009002848004FB14BFFFC1C5B
+S3152003E100806100083880000048000DA94BFFFC0CF5
+S3152003E1108161000CA80B0006540904A14182011455
+S3152003E1203D2000288069D7883929D7887C834800F1
+S3152003E13041860054A14B00047D284B78A003000A96
+S3152003E1407C8A000040860034800B000C8123001457
+S3152003E1507C80480040860024800B00108123001811
+S3152003E1607C80480040860014880B00098923000917
+S3152003E1707C80480041860014806300007C83400035
+S3152003E1804086FFBC386000008121000CA169000293
+S3152003E190880900017D7E58505400063C98090001E9
+S3152003E1A08141000CB1690002A00A00067009200013
+S3152003E1B041820010880A000160000001980A0001CC
+S3152003E1C08121000C88090001700B0001A0090006BB
+S3152003E1D0540B1838B16900064082000C7160FFF8B1
+S3152003E1E0418200407C641B783D2000283BE9D70010
+S3152003E1F0801F00188061000830000001901F00185E
+S3152003E200480000DD2C830000906100084186FB0C4A
+S3152003E210801F004030000001901F0040480000206E
+S3152003E2202C83000041860018480003D948000010BB
+S3152003E230A00B00027C1E0050B00B00028061000878
+S3152003E2408803001170090010418200203D20002818
+S3152003E25080098DEC2C800000418600107C0803A6E3
+S3152003E260808300144E8000213D2000283929D700C1
+S3152003E27080090034806100083000000190090034D1
+S3152003E2808161000C3D200028880B00093929D6001E
+S3152003E2907D6900AE3D2000281D6B00343929D3A8A3
+S3152003E2A07D6B4A14800B000C7C0803A67FC4F3788D
+S3152003E2B04E8000214BFFFA648061000848004DED33
+S3152003E2C04BFFFA588001001C7C0803A683C100106B
+S3152003E2D083E10014382100184E8000209421FFD8B2
+S3152003E2E07C0802A6930100089321000C9341001099
+S3152003E2F0936100149381001893A1001C93C10020FD
+S3152003E30093E100249001002C7C7A1B787C99237955
+S3152003E3103BE0000093FA0004837A00084082006CF5
+S3152003E320386000013880000B38A0001C38C000017B
+S3152003E33048010E957C7E1B79418202783C80002819
+S3152003E340833E00083884D7887F23CB7848014861E9
+S3152003E3503D20002888098DF798190008881B000995
+S3152003E36098190009A01B0004B019000A801B000C91
+S3152003E37090190014801B001093D9000C9359001098
+S3152003E380901900184800012C801900102C800000D9
+S3152003E3903BD900104186011C3B00000083FE000090
+S3152003E3A0839F0008A95B0006A97C00067C8A580087
+S3152003E3B04085004CA13C00027C095A147FAA0051D7
+S3152003E3C040810024A01B00027C9D0040408401E480
+S3152003E3D07C1D4850B01C00027FE3FB787C9D00D057
+S3152003E3E048011095801F00042C800000408600B051
+S3152003E3F0935F0004901A0004480000B8A01B000293
+S3152003E400A13C00027C0A02147D2B4A147C804840DE
+S3152003E4104184004C813E0000800900047FE3FB78A1
+S3152003E420901E00009303000448004C8183FE0000E5
+S3152003E4302C9F00004186005C839F0008A93B0006B1
+S3152003E440A15B0002A81C0006A17C00027D295214B0
+S3152003E4507C005A147C8900404084FFBC2C9F00001A
+S3152003E46041860030A81B0006A17B0002A93C0006BA
+S3152003E4707C0B02147FA90051408100187C1D585043
+S3152003E480B01B00027F43D3787C9D00D048010FE95F
+S3152003E49093FA0004935E000048000018813E0000B2
+S3152003E4A0800900042C8000003BC900044086FEF04E
+S3152003E4B083F900102C9F00003BA000004186002812
+S3152003E4C0839F0008A81C00067C80E8004086010084
+S3152003E4D083FF00042C9F0000A01C00027FBD0214B2
+S3152003E4E04086FFE0881C000170000001408200E0A6
+S3152003E4F08359001083DA00042C9E0000901A00042E
+S3152003E500418600503B6000007FDFF378839E00083E
+S3152003E5107F43D378801C00007FE4FB78540056BAEF
+S3152003E5207C1C0214901E0008801C0000813E000CF7
+S3152003E530540056BA7D204850913E000C83DE0004D9
+S3152003E5409364000448010F0D2C9E00004086FFBCF7
+S3152003E550839A00087F23CB78881C0001B3BC000272
+S3152003E5605400063C981C00014801465D8079000C46
+S3152003E57048004AF9881A0011700900024182002CCA
+S3152003E5802C9A00003BA000007F5ED37841860018BA
+S3152003E590801E000C83DE00002C9E00007FBD02142B
+S3152003E5A04086FFF093BA00187F43D37848000024AF
+S3152003E5B03D2000283929D7008009001C7F43D378C2
+S3152003E5C0300000019009001C48004AE13860000031
+S3152003E5D08001002C7C0803A6830100088321000CFC
+S3152003E5E083410010836100148381001883A1001CDA
+S3152003E5F083C1002083E10024382100284E80002097
+S3152003E6009421FFE87C0802A693A1000C93C1001075
+S3152003E61093E100149001001C7C7E1B78801E001061
+S3152003E6202C8000003BFE00104186001C807F0000EA
+S3152003E63083A3000448004A752C9D000093BF000065
+S3152003E6404086FFEC7FC3F3784801457D807E000C2E
+S3152003E65048004A198001001C7C0803A683A1000CEC
+S3152003E66083C1001083E10014382100184E80002056
+S3152003E6709421FFE87C0802A693A1000C93C1001005
+S3152003E68093E100149001001C4BFEA86D7C7D1B7842
+S3152003E6904BFCA0FD1FBD03E87C7D1BD68001001C1F
+S3152003E6A07C0803A683A1000C83C1001083E1001418
+S3152003E6B0382100184E8000209421FFE87C0802A60A
+S3152003E6C09381000893A1000C93C1001093E10014D9
+S3152003E6D09001001C480143093D20002883E9D7887F
+S3152003E6E02C9F00007C7D1B783809D78841860058EB
+S3152003E6F07C9F00004186004C3D2000283BC9D70063
+S3152003E7007C1C0378881F00083000FFFF981F000831
+S3152003E71083FF0000813F0004880900082C80000045
+S3152003E72040860018801E002030000001901E002025
+S3152003E730807F00044BFFFECD7C9FE0004086FFC810
+S3152003E7407FA3EB78480143698001001C7C0803A65C
+S3152003E7508381000883A1000C83C1001083E1001488
+S3152003E760382100184E8000209421FFE87C0802A659
+S3152003E77093A1000C93C1001093E100149001001C97
+S3152003E7803D2000288009D7883969D7887C8058009E
+S3152003E790418600343D2000283BC9D7003FE00028AE
+S3152003E7A07D7D5B78801E001C807FD788300000012A
+S3152003E7B0901E001C4BFFFE4D801FD7887C80E800EF
+S3152003E7C04086FFE48001001C7C0803A683A1000C7D
+S3152003E7D083C1001083E10014382100184E800020E5
+S3152003E7E09421FFB87C0802A6926100149281001836
+S3152003E7F092A1001C92C1002092E1002493010028DB
+S3152003E8009321002C93410030936100349381003887
+S3152003E81093A1003C93C1004093E100449001004C36
+S3152003E8207C761B7883960008801C00003AE0000C57
+S3152003E830540056BA3720FFEC3B0000003BBC0014C3
+S3152003E840827C0010408102EC3E8000283B548E04DB
+S3152003E8503EA000288BFD00002C9F0000418602D499
+S3152003E8602C9F00014186002C8B7D00017C9BC800D8
+S3152003E870201B00007D20D9147C000026540037FE7F
+S3152003E8807D2B037941820010381CFFFF480002E4E8
+S3152003E8903B6000012C9F0044418601804185001086
+S3152003E8A02C9F0007418601004800027C2C9F008391
+S3152003E8B04186000C2C9F00894086026C8BDD00026A
+S3152003E8C02C9E0003408502A8801C0010901A000489
+S3152003E8D0881C00017F43D378981A00034BFF7C5989
+S3152003E8E02C830000408600102C9F00894086023826
+S3152003E8F0480002643BDEFFFF381BFFFC7C9E004082
+S3152003E9004085001C7FA3EB78801C000C388100080F
+S3152003E91090010008480003B54800020C7C7DF214E0
+S3152003E92038958E0838A000044BFD29612C9F008959
+S3152003E930408600207F43D3784BFF7CC97C631B79B9
+S3152003E940408200287F43D3784BFF7D69480000141B
+S3152003E950801A00043861000890010008480002B1BB
+S3152003E9602C830000418601F03863003C7C9DF21421
+S3152003E970801A000438A00004901C00104BFD290DBA
+S3152003E980881D000230000004981D0002801C001020
+S3152003E990541800066F00E0003120FFFF7F090110A5
+S3152003E9A0480001848BDD00022C9E0003408501C0B4
+S3152003E9B03BDEFFFF381BFFFC7C9E00404185016840
+S3152003E9C0387C001038958E0838A000044BFD28BDEE
+S3152003E9D038748E044BFF7B617C631B794082001C59
+S3152003E9E0801A0004386100089001000848000221BB
+S3152003E9F07C631B794182016C3863003C7C9DF21455
+S3152003EA0038A000044BFD2885881D00023000000431
+S3152003EA10981D000248000110895D0001288A000420
+S3152003EA207CBCE8507FBEEB784085014C897D000293
+S3152003EA30380AFFFC7C8B004040850024801D0000A3
+S3152003EA405409E73E39290001712B000F5120263640
+S3152003EA50901D000041820120480000CC801D00004B
+S3152003EA605409073E2C8900017C1D5A1433E0FFFF0D
+S3152003EA704186001828890001418400802C890003DF
+S3152003EA8041860040480000F0380B00087C80504047
+S3152003EA90418500E4927A0004809600147F43D3785C
+S3152003EAA04BFF7DC57C631B794182007C3863003C28
+S3152003EAB07FE4FB7838A000044BFD27D148000030C3
+S3152003EAC0380B00087C805040418500AC7FE3FB78FF
+S3152003EAD038958E0838A000044BFD27B138748E0470
+S3152003EAE04BFF7A552C8300004186003C881D00028B
+S3152003EAF030000004981D00024BFFFB799061000C47
+S3152003EB003861000C889E000238A000047C9D2214E4
+S3152003EB103884FFFF4BFD2775881E00023000000452
+S3152003EB20981E00027F3BC8517FBDDA144181FD2820
+S3152003EB302C980000418600187EC3B37838800001E4
+S3152003EB4048000371386000014800008038600000E7
+S3152003EB50480000783AE0000338A000054800001872
+S3152003EB603AE0000338A000014800000C381CFFFEE1
+S3152003EB707CA0E8503D20002881698F04881C000072
+S3152003EB80A13C00022C8B0000540016BA7D2048506D
+S3152003EB90B13C00024186001C7EC3B3787D6803A680
+S3152003EBA07EE4BB7838C0000038E000004E800021A8
+S3152003EBB03D2000283929D7008009005038600001FC
+S3152003EBC030000001900900508001004C7C0803A608
+S3152003EBD0826100148281001882A1001C82C1002058
+S3152003EBE082E10024830100288321002C8341003005
+S3152003EBF0836100348381003883A1003C83C10040B4
+S3152003EC0083E10044382100484E8000209421FFF000
+S3152003EC107C0802A693C1000893E1000C900100141E
+S3152003EC203D2000288169D7742C8B00003D200028C5
+S3152003EC303BE9D77883C3000041860040801F000448
+S3152003EC407C9E000041860054A12B00367D2007348C
+S3152003EC502C800001418500107D635B784800794D47
+S3152003EC604800000C3809FFFFB00B00363D20002872
+S3152003EC70380000009009D77438000002981F00015D
+S3152003EC8038000010981F000093DF00043C60002822
+S3152003EC903863D774480076653D2000288129D774C8
+S3152003ECA02C890000386000004186000880690040F6
+S3152003ECB0800100147C0803A683C1000883E1000CAD
+S3152003ECC0382100104E8000209421FFF07C0802A6F4
+S3152003ECD093C1000893E1000C900100148BE300011B
+S3152003ECE0289F002B83C400004185002C3C800028EC
+S3152003ECF038848E317FE5FB784BFD25913D20002816
+S3152003ED00381FFFFD5400F0BE90098E003D200028D9
+S3152003ED1093C98E2C800100147C0803A683C10008A6
+S3152003ED2083E1000C382100104E8000209421FFF04F
+S3152003ED307C0802A693C1000893E1000C90010014FD
+S3152003ED403FE00028801F8E002C8000004186002093
+S3152003ED50386000013880000A38A0008038C00001DE
+S3152003ED60480104657C7E1B794082000C38600000D4
+S3152003ED70480000983C60002838638E3038A0000491
+S3152003ED80813F8E00817E00085529103A38090008F4
+S3152003ED90901E000C7FE91A147C09182E3D200028AA
+S3152003EDA039298E2C900B00003800000198090004A5
+S3152003EDB03800000498090007809E00083BFFFFFCEB
+S3152003EDC0388400044BFD24C53D20002839298E3480
+S3152003EDD07C9F4840801E0008316000084184001C47
+S3152003EDE0801F00003BFFFFFC7C9F4840900B0000E8
+S3152003EDF0396B00044084FFEC3D20002880098E2CCB
+S3152003EE007FC3F378900B0000800100147C0803A6CF
+S3152003EE1083C1000883E1000C382100104E800020B6
+S3152003EE209421FFE87C0802A693A1000C93C100104D
+S3152003EE3093E100149001001C7C7F1B7883BF00089C
+S3152003EE40801F000C80BD0000389D001454A556BABF
+S3152003EE503BC5FFEC7C64F2147CA500504BFD242DAE
+S3152003EE60881F001170090002801F000C7C1E0050B1
+S3152003EE70901F000C41820010801F00187C1E00503A
+S3152003EE80901F0018801D0000392000055120C10E57
+S3152003EE90901D00008001001C7C0803A683A1000CA2
+S3152003EEA083C1001083E10014382100184E8000200E
+S3152003EEB09421FFD07C0802A693010010932100140D
+S3152003EEC0934100189361001C9381002093A1002491
+S3152003EED093C1002893E1002C900100347C7E1B789B
+S3152003EEE07C982378881E00113B600000700900106F
+S3152003EEF03B4000003B20000083FE00084082001CAC
+S3152003EF00801F001038610008900100084BFFB341B1
+S3152003EF102C830000408600243D2000283929D70071
+S3152003EF20800900287FC3F378300000019009002868
+S3152003EF30480041794800040C893F000828890001CC
+S3152003EF40A01F0004B01F0004418500383D2000287F
+S3152003EF5081298F042C890000418603E87FC3F37837
+S3152003EF603880000B38A0000038C000007D2803A697
+S3152003EF70A01F000238E00000B01F0002480003C0B3
+S3152003EF803809FFFF981F00083D20002883A9D7745E
+S3152003EF902F1D00003D2000283B89D778419A004841
+S3152003EFA0801F0010813C00047C8048004186009825
+S3152003EFB0419A0034A13D00367D2007342C80000180
+S3152003EFC0418500107FA3EB78480075E14800000CCB
+S3152003EFD03809FFFFB01D00363D2000283800000009
+S3152003EFE09009D77438000002981C000138000010DD
+S3152003EFF0981C00003FA00028801F0010387DD7747E
+S3152003F000901C0004480072F5807DD7742C83000081
+S3152003F010408600303D20002880098F042C80000084
+S3152003F020418603207FC3F378388000037C0803A638
+S3152003F03038A000017F26CB7838E000004800030083
+S3152003F0407C7D1B787FC4F37838A0000038E000016C
+S3152003F0503D200028A17F0002806991D4200B003F28
+S3152003F0607C000110540606727D6000787CC6037806
+S3152003F0704800449D813D003C801E00147C8900008D
+S3152003F0807C7C1B7840860080A15D00347140003073
+S3152003F09040820074813D000C800900042C8000000E
+S3152003F0A0418600643D20002880099C842178000045
+S3152003F0B07D2BC1145400FFFE7C0B48394182004846
+S3152003F0C0813D00402C890000817F000C4186003859
+S3152003F0D08009002C812900287D6000387C80480027
+S3152003F0E0408600247140000241820010813D003099
+S3152003F0F08329000448000008833F00103B60000575
+S3152003F1003B4000017FC3F378388000003CA00028F1
+S3152003F11038A5D7743D20002880C99C8438E0000098
+S3152003F12054C607FE60C60020480002497C631B794B
+S3152003F1304182001C3D2000283929D7008009002858
+S3152003F1403000000190090028480000403D20002897
+S3152003F1503929D700800900242C9B000030000001A8
+S3152003F16090090024408600182C9C0000418601D477
+S3152003F1707F83E37848003F35480001C88009002C87
+S3152003F180300000019009002C2C9C0000418601B41C
+S3152003F1902883004338E00000418501383D200024C0
+S3152003F1A03929F0C05460103A7C09002E3D200024F2
+S3152003F1B03929F0C07C004A147C0903A64E8004201A
+S3152003F1C0000001580000011000000110000001108A
+S3152003F1D000000110000001100000011000000110C2
+S3152003F1E000000110000001100000011000000110B2
+S3152003F1F000000110000001100000011000000110A2
+S3152003F2000000011000000110000001100000011091
+S3152003F2100000011000000110000001100000011081
+S3152003F2200000011000000110000001100000011071
+S3152003F2300000011000000110000001100000011061
+S3152003F2400000011000000110000001100000011051
+S3152003F2500000011C00000110000001100000011035
+S3152003F2600000011000000110000001100000011031
+S3152003F2700000011000000110000001100000011021
+S3152003F2800000011000000110000001100000011011
+S3152003F29000000110000001100000011000000150C1
+S3152003F2A000000110000001100000011000000110F1
+S3152003F2B000000110000001100000011000000110E1
+S3152003F2C000000110000001100000011000000110D1
+S3152003F2D03B6000033B400001480000403D200028DE
+S3152003F2E08129D7742C8900003B6000033B4000042E
+S3152003F2F04186000880E9003C3D2000283929D700B3
+S3152003F3008009004C300000019009004C4800000C95
+S3152003F3103B6000043B4000003D20002880098F0409
+S3152003F3202C8000004186001C7F83E3787C0803A69B
+S3152003F3307F64DB787F45D3787F26CB784E80002188
+S3152003F340800100347C0803A6830100108321001466
+S3152003F350834100188361001C8381002083A100243C
+S3152003F36083C1002883E1002C382100304E80002001
+S3152003F3709421FF907C0802A691C1002891E1002CDC
+S3152003F3809201003092210034924100389261003C70
+S3152003F3909281004092A1004492C1004892E1004C20
+S3152003F3A09301005093210054934100589361005CCC
+S3152003F3B09381006093A1006493C1006893E1006C7C
+S3152003F3C0900100747C771B787CB52B787EFBBB7809
+S3152003F3D03A4000147C8423793A8000007CCE33782B
+S3152003F3E07CFF3B784182001438A100204800082581
+S3152003F3F07C7B1B788241002071C00003839B00081D
+S3152003F4004082005C39200004801C00003D600028F7
+S3152003F4105120E006901C0000A13C0006A00B9C7C1A
+S3152003F42055290462B13C000631400001B01C00049A
+S3152003F430801C00007E4916705120C10E901C0000CE
+S3152003F4403D2000283929D70080090038B14B9C7C00
+S3152003F45030000001900900384800000C801C000091
+S3152003F460541256BA2C950000408600143AA100087F
+S3152003F4707EA3AB78388000144BFDA89D80750000D1
+S3152003F4802C8300003AD5000441860054A00300349F
+S3152003F490700900014182001480160004813C00108B
+S3152003F4A07C8048004186002CA12300367D2007342A
+S3152003F4B02C8000014185000C480070F14800000CA7
+S3152003F4C03809FFFFB003003638000000901500000E
+S3152003F4D0801500002C80000040860024380000029E
+S3152003F4E0981600013800001098160000801C0010A2
+S3152003F4F090160004881C00019816000371C00010A2
+S3152003F500418200347EC3B3784BFF70F97C7E1B792E
+S3152003F510408200147EC3B3784BFF71997C7E1B799E
+S3152003F52041820184831E000C38000001981C0008C8
+S3152003F530480000A0801C0010540000066C00E00068
+S3152003F5403120FFFF7C090110217F00007D2BF91458
+S3152003F5507C0B4B7940820010801F00002C8000001A
+S3152003F56040860070801500002C80000040860038FD
+S3152003F5707EA3AB7848006D85801500002C800000A3
+S3152003F580408600243D2000283929D70080090054CD
+S3152003F5903A800041480001208009003C901600046F
+S3152003F5A048000090813500008009003830000001B2
+S3152003F5B09009003881550000A00A0034700B000220
+S3152003F5C083C900408309003C4182000882CA003077
+S3152003F5D0801C00103D20E000540000067C8048007B
+S3152003F5E0408601B4881B00112C9F00003AD50004E5
+S3152003F5F060000020981B001141860098801F0000A0
+S3152003F6002C800000418600603D20002881299C80B3
+S3152003F6102C8900004186001C8009000C7C80C000D8
+S3152003F6204186FF78812900342C8900004086FFEC2F
+S3152003F630807500002C8300004186002CA123003610
+S3152003F6407D2007342C8000014185000C48006F5D26
+S3152003F6504800000C3809FFFFB003003638000000CD
+S3152003F660901500002C9F000041860028881F000467
+S3152003F670981C0008817F0000300BFFFF7C000110DF
+S3152003F6807F0900387D6300787D381B784800000C9D
+S3152003F69038000001981C0008A818001A7009800079
+S3152003F6A04082002C3D2000283929D70080090054A8
+S3152003F6B03A8000333000000190090054480004F0DA
+S3152003F6C08009003C901C000C48000038801C000C6C
+S3152003F6D02C8000004086002C3D20002881299C8018
+S3152003F6E02C8900004186001C8009000C7C80C00008
+S3152003F6F04186FFD0812900342C8900004086FFEC07
+S3152003F700807C00107F04C3784BFFBDC12C8300008F
+S3152003F7104186002C2C9F000041860010881F00057F
+S3152003F7202C800000418600187F03C3787F64DB7832
+S3152003F7307EC5B37848001271480000343D20002866
+S3152003F74081298F102C8900004186002471C0000175
+S3152003F7504082001C7D2803A67F63DB787F04C37861
+S3152003F7604E8000212C83000040860020881C000840
+S3152003F7702C800000418600143D2000283929D97C9D
+S3152003F7807C9848004086009C7F63DB784800391DBF
+S3152003F790480003D4801C000C2C8000004086000CFB
+S3152003F7A0801E003C901C000C386100248016000447
+S3152003F7B07F04C378900100244BFFB8252C830000D7
+S3152003F7C041860054A018001A700900024082000CDA
+S3152003F7D03A800031480003D871C000204082000CD3
+S3152003F7E03A80000D480003C8A01C0002813800207F
+S3152003F7F07C804840408500143D20002880099C8455
+S3152003F80070090004418200C0881B001160000010AB
+S3152003F8104800000C881B0011700000EF981B001194
+S3152003F820A01C0002817800207C8058404185005C22
+S3152003F830B01C00023D20002880099C84392000004A
+S3152003F840700B0008A01C0006B13C000AB01C000681
+S3152003F850418200147F63DB787E4493784801CA8112
+S3152003F860B07C000A7F03C378800300647C0803A668
+S3152003F8707F64DB7880D500007EC5B3784E80002177
+S3152003F8807C741B78480002E0A01C00067009400027
+S3152003F890418200203D2000283929D7008009004CC9
+S3152003F8A03A800024300000019009004C48000300F0
+S3152003F8B07C125850540000382C80000790010020F9
+S3152003F8C0418500303A800024480002E47F63DB78D8
+S3152003F8D0480037993D2000283929D7008009003C64
+S3152003F8E03A800037300000019009003C48000204AA
+S3152003F8F07C0F0378A01C00027F527A147C9A0000A6
+S3152003F9003A7B00047F77DB783B2000144084019008
+S3152003F9103A0000003D2000283A29D700386000012C
+S3152003F9203880000238A0008038C000014800F95111
+S3152003F9307C7B1B794182FFA03D200028881700117C
+S3152003F94083DB0008981B001183E99CC428920014CA
+S3152003F9507D3EFA14913B00087D3D4B78801C0000C8
+S3152003F960817C0004815C0008811C000C7C1EF92E1E
+S3152003F970917D0004915D0008911D000C801C0010F0
+S3152003F980901D0010408500247F83E3787FA4EB78C5
+S3152003F990480003AD3B2300147C1EF82E7F291670E6
+S3152003F9A05120C10E7C1EF92E933B000C7D32D05084
+S3152003F9B0A01C00067D291E70540004E27D690214F2
+S3152003F9C0B17D0006A01C0006700920004182000CB0
+S3152003F9D061602000B01D000680010020A13C0002CA
+S3152003F9E07C1A02147C804800418400107C1A4850FB
+S3152003F9F09001002048000010A01D00066000200092
+S3152003FA00B01D00067EE4BB787F45D3783D200028D1
+S3152003FA1038E00001806991D4A001002280C1002032
+S3152003FA207C00CA14B01D000248003AE52C8300006E
+S3152003FA30907B00004186FE9880010020921B0014D3
+S3152003FA403D20002881299C847C190214901B0018D0
+S3152003FA5071200008A01D0006B21D000AB01D000675
+S3152003FA60418200147F63DB787F24CB784801C871F9
+S3152003FA70B07D000A93730000801100483000000116
+S3152003FA809011004880010020A13C00027F5A0214F5
+S3152003FA907C9A48003A7B00044184FE847EE3BB784B
+S3152003FAA0A09C00027FB27A147C84E8504800F9C9EE
+S3152003FAB093B70018396000003D200028A157001A8B
+S3152003FAC080099C84B17C000A70090008A01C0006EA
+S3152003FAD0B15C000260002000B01C000641820014C5
+S3152003FAE07EE3BB787E4493784801C7F5B07C000A51
+S3152003FAF02C9700007EFBBB78418600503BE000003C
+S3152003FB002C94000082FB000493FB0004408600280B
+S3152003FB10801800647F03C3787C0803A67F64DB78A0
+S3152003FB2080D500007EC5B3784E8000217C741B7877
+S3152003FB304800000C7F63DB78480035712C97000062
+S3152003FB407EFBBB784086FFBC2C94000040860018C1
+S3152003FB503D2000283929D7008009004430000001C0
+S3152003FB6090090044380100087C950000408600383F
+S3152003FB7071C0001040820030806100082C83000091
+S3152003FB8041860024A12300367D2007342C800001E2
+S3152003FB904185000C48006A154800000C3809FFFF10
+S3152003FBA0B00300367E83A378480000107EE3BB783B
+S3152003FBB0480034F94BFFFFB0800100747C0803A68C
+S3152003FBC081C1002881E1002C82010030822100348A
+S3152003FBD0824100388261003C8281004082A1004438
+S3152003FBE082C1004882E1004C8301005083210054E6
+S3152003FBF0834100588361005C8381006083A1006494
+S3152003FC0083C1006883E1006C382100704E80002098
+S3152003FC109421FFE07C0802A6934100089361000C1F
+S3152003FC209381001093A1001493C1001893E1001C43
+S3152003FC30900100247C7F1B7839400000614AFFFF36
+S3152003FC4083DF000883A4000CA01E00023B9DFFFC5B
+S3152003FC507C1C02147C8050407CBA2B788364000879
+S3152003FC60418500B4801B00002C80000041860008DB
+S3152003FC70901E0010386000013880000238A00080F2
+S3152003FC8038C000014800F5F97C6B1B79418200845A
+S3152003FC907FC3F37838A00014801F00183BBD0010E3
+S3152003FCA07C00E214900B0018813F000C801F000893
+S3152003FCB03929FFEC913F000C30000014901F0008F7
+S3152003FCC093EB00007D7F5B783D200028809F000812
+S3152003FCD080099CC493BF000C7C840214909F000867
+S3152003FCE04BFD15A9387B000483DF00087F85E37865
+S3152003FCF0389E00144BFD159593BA0000A01E0002F2
+S3152003FD007FE3FB787C00E214B01E00024800000863
+S3152003FD107FE3FB78800100247C0803A68341000847
+S3152003FD208361000C8381001083A1001483C1001812
+S3152003FD3083E1001C382100204E8000209421FFE01F
+S3152003FD407C0802A6934100089361000C938100105E
+S3152003FD5093A1001493C1001893E1001C9001002481
+S3152003FD6080030000540056BA37A0FFEC7C9B23780F
+S3152003FD703B8300143BDB0014408100783B400001A9
+S3152003FD80897C00002C8B0000418600682C8B0001A7
+S3152003FD90408600149B5E00003BDE00013BE0000131
+S3152003FDA0480000448BFC00017C9FE80071690080B9
+S3152003FDB04CE623827C000026540047FE7C0000D0BC
+S3152003FDC07FE900387FA000787D3F037841820018C1
+S3152003FDD07F83E3787FC4F3787FE5FB784BFD14AD0F
+S3152003FDE07FDEFA147FBFE8517F9CFA144181FF948A
+S3152003FDF0381EFFEC7FFB005073E000034182001C9A
+S3152003FE00392000003BFF000173E00003993E000008
+S3152003FE103BDE00014082FFF07FE3FB788001002474
+S3152003FE207C0803A6834100088361000C83810010AC
+S3152003FE3083A1001483C1001883E1001C382100200C
+S3152003FE404E8000209421FFE07C0802A693410008FF
+S3152003FE509361000C9381001093A1001493C10018A1
+S3152003FE6093E1001C900100243B4000007CFB3B787F
+S3152003FE702C8500007CDC337883BB000083C4000818
+S3152003FE80418600142C8300013B4000164086032C38
+S3152003FE904800018C2C830000418601982C830001A5
+S3152003FEA040860318381CFFFF2880000C4185016C0F
+S3152003FEB03D2000243929FDD45400103A7C09002E14
+S3152003FEC03D2000243929FDD47C004A147C0903A64D
+S3152003FED04E8004200000003400000144000000444A
+S3152003FEE000000044000000440000004400000044D9
+S3152003FEF0000001440000012C0000012C0000012C0D
+S3152003FF000000012C0000012C387E00587FA4EB78DA
+S3152003FF10480002D5480002A8801D000C2C8000044E
+S3152003FF204186000C3B400016480000F4381CFFFDB8
+S3152003FF3028800004813D000883E90000418500E014
+S3152003FF403D2000243929FE645400103A7C09002EF2
+S3152003FF503D2000243929FE647C004A147C0903A62B
+S3152003FF604E800420000000140000001C0000002422
+S3152003FF700000004C000000749BFE0045480000A0D2
+S3152003FF809BFE004C480000982C9F000041860014DD
+S3152003FF90801E004060000001901E00404800008043
+S3152003FFA0801E00405400003C901E00404800007014
+S3152003FFB02C9F000041860014801E00406000000232
+S3152003FFC0901E004048000058801E0040540007FA47
+S3152003FFD0901E0040480000482C9F000041860014D4
+S3152003FFE0801E004060000004901E00404800003040
+S3152003FFF0801E0040540007B8901E00404800002091
+S315200400007F83E3787FC4F3787FA5EB784800039158
+S315200400107C7A1B78480000083B40002A2C9D00006F
+S31520040020418601987FA3EB78480030414800018C33
+S31520040030381CFFFF2880000C4185017C3D200024CC
+S315200400403929FF605400103A7C09002E3D200024F3
+S315200400503929FF607C004A147C0903A64E800420BB
+S3152004006000000034000001540000008800000088CD
+S31520040070000000880000008800000088000000348A
+S315200400800000013C0000013C0000013C0000013C52
+S315200400900000013C386000003880000A38A0008047
+S315200400A038C000014800F1217C7D1B782C9D00007E
+S315200400B093BB000041860058813E00582C890000DD
+S315200400C04186002080A9000C90BD000C813E00587A
+S315200400D0809D0008806900084BFD11B1480000DCB2
+S315200400E0913D000C480000D4386000003880000A96
+S315200400F038A0008038C000014800F0CD7C7D1B78F4
+S315200401002C9D000093BB00004086000C3B4000372A
+S31520040110480000A8387CFFFD28830004380000042A
+S31520040120901D000C4185006C3D2000243929004C8B
+S315200401305460103A7C09002E3D2000243929004CB5
+S315200401407C004A147C0903A64E8004200000001477
+S315200401500000001C00000024000000300000003CC9
+S315200401608BFE00454800002C8BFE004C48000024E2
+S31520040170801E0040541F07FE48000018801E0040C1
+S31520040180541FFFFE4800000C801E0040541FF7FE3B
+S31520040190813D000893E90000480000207F83E3782E
+S315200401A0809E005C7F65DB78480006597C7A1B7844
+S315200401B0480000083B40002A7F43D378800100246E
+S315200401C07C0803A6834100088361000C8381001008
+S315200401D083A1001483C1001883E1001C3821002068
+S315200401E04E8000209421FFD87C0802A67D8000261C
+S315200401F093410010936100149381001893A1001C6D
+S3152004020093C1002093E100249001002C9181000CDD
+S315200402107C7A1B78807A00002C8300007C9B2378D0
+S315200402204186000848002E452C9B0000380000001B
+S31520040230901A00004186012480BB000C2D05000085
+S31520040240408A00107F63DB7848002E214800010C89
+S3152004025070A000034082010C813B0008817B001CB6
+S315200402607D292A14800B0000816B0004392900049F
+S315200402707C005A147C890040408400E87CBC2B789E
+S31520040280381C0004901B000C807B00083BC3000430
+S315200402907FC4F3784BFD0FF5807B0008388000047B
+S315200402A04BFD9A75408900A4895E00002C8A0000C3
+S315200402B0418600982C8A00014086000C3BE0000110
+S315200402C0480000288BFE00012C9F00017F1FE000C0
+S315200402D04CE623827C000026540947FE5400D7FEB0
+S315200402E07D2B03794082007C2C8A00834186000C76
+S315200402F02C8A008940860048289F00064085006491
+S315200403003B9CFFFC3BFFFFFC3BBE0003801B000C19
+S315200403107FA3EB783000FFFC901B000C9BFE0001B2
+S31520040320809B000838A000044BFD0F61387E00072F
+S315200403307FA4EB7838BC00044BFD0F517F9FE0511E
+S315200403407FDEFA144181FF64801B000C2880002C78
+S3152004035041850010937A00003860000048000010A0
+S315200403607F63DB7848002D05386000168001002C59
+S315200403708181000C7C0803A683410010836100144C
+S315200403808381001883A1001C83C1002083E10024FB
+S315200403907D820120382100284E8000209421FFC030
+S315200403A07C0802A69301002093210024934100286F
+S315200403B09361002C9381003093A1003493C10038BB
+S315200403C093E1003C900100447C7E1B787C99237841
+S315200403D083B9005C7CBF2B782C9D00003B60000019
+S315200403E03B4000003B19005C408600443860000C0A
+S315200403F03880001038A00000480128697C7D1B79CC
+S315200404004082000C38600037480003C893B9005C6A
+S31520040410937D000038000001981D0004981D0005F6
+S3152004042038000000B01D0006937D0008381EFFF733
+S31520040430288000044185036C3D2000243929035C6F
+S315200404405400103A7C09002E3D2000243929035CEF
+S315200404507C004A147C0903A64E8004200000001464
+S3152004046000000094000000B8000000E400000238F8
+S315200404702C9F00004186024C801F000C2C80000417
+S3152004048040860240813F0008816900002C8B0000D1
+S315200404904086000C917D00004800030C3D20002876
+S315200404A081299C802C8900004186001C8009003CFF
+S315200404B07C80580041860010812900342C89000054
+S315200404C04086FFEC2C8900003BC0000041860008D2
+S315200404D083C9000C2C9E000041860248A81E001ADF
+S315200404E0700980004182023C93DD0000480002B876
+S315200404F02C9F0000418601CC801F000C2C8000011B
+S31520040500408601C0813F000888090000981D000428
+S31520040510480002942C9F0000418601A8801F000CED
+S315200405202C8000014086019C813F00088809000038
+S31520040530288000014185018C981D00054800026829
+S315200405402C9F00004186017C801F000C2C80000813
+S3152004055040860170839F0008801C00003D20E00037
+S31520040560540000067C80480040860158801C000404
+S315200405702C800000408600449001000838000010BA
+S315200405809801000C3921000C38000002980900015A
+S31520040590801C0000386100089009000448005D5D55
+S315200405A0806100082C8300004186017883C3003CC7
+S315200405B048005FF9480000403D20002881299C809E
+S315200405C02C890000418600207C0B03788009003C9E
+S315200405D07C80580041860010812900342C89000033
+S315200405E04086FFEC2C8900003BC0000041860008B1
+S315200405F083C9000C2C9E000041860128A81E001ADF
+S31520040600700980004182011C801D00082C80000096
+S315200406103BFD000841860044817F0000812B0008B1
+S315200406208009000C7C80F0004086001480090008B4
+S31520040630813C00007C804800418600147D7F5B78E5
+S31520040640801F00002C8000004086FFD0801F000001
+S315200406502C800000408600387F83E3787FC4F378BB
+S315200406607F25CB784BFFAA197C7A1B794082000C14
+S315200406703B60003748000130935F0000A01D000650
+S3152004068030000001B01D00064800011C3B6000300C
+S31520040690480001142C9F000041860028801F000C6E
+S315200406A02C8000084086001C839F0008801C0000C4
+S315200406B03D20E000540000067C8048004186000C62
+S315200406C03B600016480000E0801C00042C800000DB
+S315200406D04086000C3BC00000480000603D200028F6
+S315200406E081299C802C890000418600207C0B03787C
+S315200406F08009003C7C805800418600108129003402
+S315200407002C8900004086FFEC2C8900003BC00000A9
+S315200407104186000883C9000C2C9E00004086001CDC
+S315200407203B600031480000807D7A5B78801A0000A7
+S31520040730901F000048000048801D00082C800000FF
+S315200407403BFD000841860038817F0000812B00088C
+S315200407508009000C7C80F000408600148009000883
+S31520040760813C00007C8048004186FFC07D7F5B7809
+S31520040770801F00002C8000004086FFD02C9A0000A9
+S315200407804186FFA07F43D3787F24CB784BFFAAD121
+S31520040790A01D00063000FFFFB01D0006480000081B
+S315200407A03B60002D83FD00002C9F00004086002026
+S315200407B0801D00043D2001017C80480040860010F5
+S315200407C080780000480124F593F800007F63DB78E5
+S315200407D0800100447C0803A6830100208321002491
+S315200407E0834100288361002C8381003083A1003457
+S315200407F083C1003883E1003C382100404E8000202C
+S315200408009421FFE87C0802A693A1000C93C1001052
+S3152004081093E100149001001C7C7F1B787C9E237836
+S315200408207CBD2B78386000003880000A38A0008010
+S3152004083038C000014800E9912C830000907D000017
+S315200408404086000C38600037480000D82C9F0009E9
+S315200408504186001C418400C82C9F000A41860078EA
+S315200408602C9F000B4186008C480000B42C9E00006F
+S31520040870380000049003000C806300084186004879
+S31520040880809E00002C8400004186003C3D200028E8
+S3152004089081299C802C8900004186002C8009000C2B
+S315200408A07C80200041860010812900342C89000098
+S315200408B04086FFEC2C8900004186000C8009003C10
+S315200408C0480000083800000090030000386000004B
+S315200408D0480000502C9E0000380000019003000CB4
+S315200408E08063000841860028881E000448000024EE
+S315200408F02C9E0000380000019003000C8063000841
+S315200409004186000C881E00054800000838000001B6
+S315200409109803000038600000480000083860002D65
+S315200409208001001C7C0803A683A1000C83C100104F
+S3152004093083E10014382100184E8000209421FFE81A
+S315200409407C0802A693A1000C93C1001093E1001425
+S315200409509001001C7C7E1B797C9D23784182002C8F
+S3152004096083FE00084800001083E300007FA4EB7890
+S315200409704BFFA8ED2C9F00007FE3FB784086FFEC1D
+S315200409807FC3F378480123358001001C7C0803A625
+S3152004099083A1000C83C1001083E1001438210018C0
+S315200409A04E8000209421FFE07C0802A69361000C6F
+S315200409B09381001093A1001493C1001893E1001CA5
+S315200409C0900100247C7B1B783D200028806991D4EB
+S315200409D07CBC2B7838A000003CC03B9A60C6CA0079
+S315200409E038E0000148002B297C7F1B79418200E0F6
+S315200409F083DF0008386000013880000138A0001425
+S31520040A0038C000014800E7C17C7D1B794082001074
+S31520040A107FE3FB7848002695480000B47FC3F3782B
+S31520040A20809D000838A000144BFD0861380000148E
+S31520040A30901D000C881F001139600000981D0011BC
+S31520040A40813F0014815F001893FD0000913D00143E
+S31520040A50915D0018881F0011813F000C700000FD75
+S31520040A60981F00113929FFEC913F000C801F0008C4
+S31520040A703D20002830000014901F00087FBFEB782B
+S31520040A8083DF000880099C84B17E000A700900086F
+S31520040A90A01E0002A13E0006B01E0002B13E0006C2
+S31520040AA041820018809E00007FE3FB78548456BA66
+S31520040AB04801B82DB07E000A7F63DB787FE4FB789B
+S31520040AC07F85E37838C000004801239D80010024F7
+S31520040AD07C0803A68361000C8381001083A1001483
+S31520040AE083C1001883E1001C382100204E80002099
+S31520040AF09421FFF07C0802A693C1000893E1000C20
+S31520040B00900100143FE00028801F8E602C80000096
+S31520040B104086005038600001388000014BFE2E913B
+S31520040B202C830000907F8E604086000C3860FFFF87
+S31520040B30480000343D2000283BE9ABE83BDF02882F
+S31520040B407FE3FB784BFD949D3BFF000C7C9FF000DC
+S31520040B504085FFF03C60002838638E644BFD948505
+S31520040B6038600000800100147C0803A683C10008B5
+S31520040B7083E1000C382100104E8000209421FED8F9
+S31520040B807C0802A6934101109361011493810118F4
+S31520040B9093A1011C93C1012093E101249001012C0E
+S31520040BA07C7D1B787C9C23787CBB2B787CFA3B78D9
+S31520040BB038610008388000FF4BFD915D3BE1010858
+S31520040BC07FE3FB78388000084BFD914D3D200028BB
+S31520040BD080698E603880FFFF4BFE3D5D7F8803A6CB
+S31520040BE07FE3FB78388000004E8000212C830000B0
+S31520040BF03BC00000408601147FE3FB787FA4EB789A
+S31520040C0048000F712C830000408601003C600028B8
+S31520040C1038638E644BFD95697C7F1B79418200285D
+S31520040C20387F0008388101084BFD2AC12C83000037
+S31520040C30418600D07FE3FB784BFD95E17C7F1B79D1
+S31520040C404082FFE02C9E0000408600483860001C4D
+S31520040C504BFE08417C7F1B79418200B07FE3FB7801
+S31520040C603880001C4BFD90B1387F0008388101087C
+S31520040C7038A000074BFD2B6538000000981F000F95
+S31520040C803C60002838638E647FE4FB784BFD9369CF
+S31520040C90386100083C800027388451047FA5EB780E
+S31520040CA07F66DB784BFDBD7D7F8803A6386100080F
+S31520040CB07F44D3784E8000217C7E1B794182004C70
+S31520040CC07FC3F3783C80800480BE007C6084690402
+S31520040CD048000851387F00107FC4F3784BFD9319E0
+S31520040CE03D20002880698E603D200024392911B4D6
+S31520040CF0913E00684BFE3AE57FC3F378480000280E
+S31520040D003BC000014BFFFF403C60006D6063000167
+S31520040D104BFD39FD3D20002880698E604BFE3ABD8F
+S31520040D20386000008001012C7C0803A68341011051
+S31520040D30836101148381011883A1011C83C10120CD
+S31520040D4083E10124382101284E8000209421FFF0DC
+S31520040D507C0802A693E1000C900100147C7F1B7989
+S31520040D60408200183C60006D606300024BFD39A18F
+S31520040D703860003E48000018813F0080800900004A
+S31520040D807C0803A6807F00644E8000212C8300000B
+S31520040D904086001038000001901F01A8901F01AC66
+S31520040DA0800100147C0803A683E1000C382100107E
+S31520040DB04E8000209421FFF87C0802A69001000CA6
+S31520040DC02C830000408600183C60006D606300029E
+S31520040DD04BFD393D3860003E4800001881230080D1
+S31520040DE0800900047C0803A6806300644E800021E9
+S31520040DF08001000C7C0803A6382100084E800020C0
+S31520040E009421FFE87C0802A69381000893A1000C94
+S31520040E1093C1001093E100149001001C7C7F1B7980
+S31520040E207C9D2378418200A87FE3FB7848000D450A
+S31520040E307C7E1B794082001C3C6000273863510C61
+S31520040E407FE4FB787FA5EB784BFDB7754800013C22
+S31520040E503C6000273863512C80BE0010389E000861
+S31520040E604BFDB75D3C60002738635144389E00141F
+S31520040E704BFDB74D809E006C2C84000041860010EB
+S31520040E803C600027386351584BFDB735387E0298AD
+S31520040E904BFD92ED7C7F1B79418200F03FC00027F9
+S31520040EA0387E517880BF002880DF003080FF0034F0
+S31520040EB0389F00084BFDB7097FE3FB784BFD935D14
+S31520040EC07C7F1B794082FFDC480000C03C60002800
+S31520040ED038638E644BFD92A97C7D1B79418200ACDC
+S31520040EE03F800027387D00104BFD92957C7E1B7930
+S31520040EF0418200883C6000273863512C80BE001054
+S31520040F00389E00084BFDB6B93C600027386351442F
+S31520040F10389E00144BFDB6A9809E006C2C840000DC
+S31520040F20418600103C600027386351584BFDB6912A
+S31520040F30387E02984BFD92497C7F1B794182002C96
+S31520040F40387C517880BF002880DF003080FF003451
+S31520040F50389F00084BFDB6697FE3FB784BFD92BDB5
+S31520040F607C7F1B794082FFDC7FC3F3784BFD92ADF7
+S31520040F707C7E1B794082FF807FA3EB784BFD929D7C
+S31520040F807C7D1B794082FF608001001C7C0803A6BF
+S31520040F908381000883A1000C83C1001083E100141F
+S31520040FA0382100184E8000209421FFD07C0802A608
+S31520040FB092E1000C93010010932100149341001830
+S31520040FC09361001C9381002093A1002493C10028DF
+S31520040FD093E1002C900100347CBC2B787CDA3378A6
+S31520040FE07CF93B787D1843787D3D4B787D5B53783F
+S31520040FF082E1003848000B7D7C7E1B7940820010FC
+S315200410003C60006D606300024800017C2C9D010158
+S3152004101040860018801E02A42C8000004186000C05
+S3152004102038600000480001802C9D01024086001C87
+S31520041030801E006C2C80000040860144939E006C28
+S3152004104092FE00704800015C387E02984BFD913177
+S315200410507C631B794182001C800300287C80E80085
+S315200410604186011C4BFD91B57C631B794082FFECC4
+S31520041070386000444BFE041D7C7F1B79408200347B
+S315200410803C600027386351AC3880000138A0000248
+S3152004109038C0000338E00004390000053920000672
+S315200410A04BFD5CD53C60006D60630004480000D8AD
+S315200410B07FE3FB78388000444BFD8C5D939F0030A2
+S315200410C0935F0034933F0038931F003C93BF00285E
+S315200410D02C9B000038000000901F002C92FF00403B
+S315200410E041860018387F00087F64DB7838A000200A
+S315200410F04BFD26E948000024387E02984BFD8FA537
+S31520041100381F00087C651B787C0303783C80002705
+S31520041110388451D44BFDB90D2C9D01004186001015
+S315200411202C9D01014186001848000030387E029823
+S315200411307FE4FB784BFD8EC148000068387E029818
+S31520041140388000007FE5FB784BFD90813800000154
+S31520041150901E02A44800004C801E02A42C8000008D
+S31520041160418600303BBE02987FA3EB784BFD90115D
+S315200411707C641B787FA3EB78480000203C60006DDC
+S31520041180606300054BFD358938600000480000186F
+S31520041190387E0298388000007FE5FB784BFD902D41
+S315200411A07FC3F378800100347C0803A682E1000C17
+S315200411B08301001083210014834100188361001CDD
+S315200411C08381002083A1002483C1002883E1002C8D
+S315200411D0382100304E8000209421FFD07C0802A6BE
+S315200411E093C1002893E1002C900100347C7F1B7965
+S315200411F07C9E2378408200183C60006D6063000268
+S315200412004BFD350D3860003E480000942C9E0000AE
+S315200412104186001C801E0010740900304182001093
+S31520041220801F01D430000001901F01D4801F006C60
+S315200412302C800000418600507FC4F37838A1000832
+S315200412404800084D2C83FFFF4086000C3860FFFFC2
+S315200412504800004C7FC5F378801F006C807F0064B3
+S315200412607C0803A68081002080FF007038C1000816
+S315200412704E8000212C8300014086000C386000003B
+S315200412804800001C813F0080800900107C0803A6CA
+S31520041290807F00647FC4F3784E800021800100346F
+S315200412A07C0803A683C1002883E1002C3821003062
+S315200412B04E8000209421FFC87C0802A69381002832
+S315200412C093A1002C93C1003093E100349001003C9B
+S315200412D07C7D1B787FBCEB797C9E2378408200281A
+S315200412E03C60006D606300024BFD34252C9E00009B
+S315200412F04186000C7FC3F37848001DB13860FFFF98
+S31520041300480000F43BFC02987FE3FB784BFD8D9567
+S315200413102C8300004185001C2C9E0000480000C838
+S31520041320801C01C430000001901C01C4480000A8A0
+S315200413307FE3FB784BFD8E497C7F1B7941820098A5
+S315200413407FA3EB787FC4F37838A1000848000741CF
+S315200413502C83FFFF4186FFCC801F00282C800101AF
+S31520041360808100204086002C801F00307FA3EB78EC
+S315200413707C0803A67FC5F37880FF004038C10008A7
+S315200413804E8000212C8300014086003C48000064E6
+S315200413907C8020004186FFD42C80010040860028D2
+S315200413A0801F00307FA3EB787C0803A67FC5F378E3
+S315200413B080FF004038C000004E8000212C830001AD
+S315200413C0418600307FE3FB784BFD8E517C7F1B7971
+S315200413D04082FF70801C01C82C9E00003000000152
+S315200413E0901C01C84186000C7FC3F37848001CBDBD
+S315200413F0386000008001003C7C0803A68381002815
+S3152004140083A1002C83C1003083E1003438210038C5
+S315200414104E8000209421FFD07C0802A693C1002888
+S3152004142093E1002C900100347C7F1B797C9E2378E9
+S31520041430408200183C60006D606300024BFD32D18F
+S315200414403860003E48000078801F006C2C80000025
+S31520041450418600547FE3FB787FC4F37838A10008E3
+S315200414604800062D2C83FFFF4086000C3860FFFFC2
+S315200414704800004C7FC5F378801F006C807F006491
+S315200414807C0803A68081002080FF007038C10008F4
+S315200414904E8000212C8300004086000C386000001A
+S315200414A04800001C813F0080800900207C0803A698
+S315200414B0807F00647FC4F3784E800021800100344D
+S315200414C07C0803A683C1002883E1002C3821003040
+S315200414D04E8000209421FFF87C0802A69001000C7F
+S315200414E07C631B79408200183C60006D60630002B7
+S315200414F04BFD321D3860003E4800001881230080D1
+S31520041500800900247C0803A6806300644E800021A1
+S315200415108001000C7C0803A6382100084E80002098
+S315200415209421FFF87C0802A69001000C7C631B79A9
+S31520041530408200183C60006D606300024BFD31D18F
+S315200415403860003E480000883C0080046000690B37
+S315200415507C8400004186003C418500183C008004C0
+S315200415606000690A7C8400004186001C4800004C07
+S315200415703C00C0086000690C7C8400004186002081
+S315200415804800003881230080800900144800001890
+S3152004159081230080800900184800000C81230080E4
+S315200415A08009001C7C0803A6806300647CA42B7835
+S315200415B04E80002148000018812300808009000CF9
+S315200415C07C0803A6806300644E8000218001000C01
+S315200415D07C0803A6382100084E8000209421FFF8B9
+S315200415E07C0802A69001000C7C631B7940820018BB
+S315200415F03C60006D606300024BFD31153860003E8F
+S315200416004800001881230080800900147C0803A662
+S31520041610806300644E8000218001000C7C0803A6B0
+S31520041620382100084E8000209421FFF87C0802A669
+S315200416309001000C7C631B79408200183C60006D8D
+S31520041640606300024BFD30C93860003E4800001834
+S3152004165081230080800900187C0803A68063006427
+S315200416604E8000218001000C7C0803A63821000846
+S315200416704E8000209421FFF87C0802A69001000CDD
+S315200416807C631B79408200183C60006D6063000215
+S315200416904BFD307D3860003E4800001881230080D1
+S315200416A08009001C7C0803A6806300644E80002108
+S315200416B08001000C7C0803A6382100084E800020F7
+S315200416C09421FFE07C0802A69361000C938100100C
+S315200416D093A1001493C1001893E1001C90010024E7
+S315200416E07C7E1B797C9D23787CBC2B7840820014DD
+S315200416F03C60006D606300024BFD30154800009C81
+S315200417002C9D010240860030801E006C2C80000037
+S315200417104186001438000000901E006C38600000DA
+S315200417204800007C386000164BFD2FE53860FFFF2B
+S315200417304800006C387E02984BFD8A457C7F1B79D5
+S31520041740418200583B600000801F00307C80E0000E
+S3152004175040860038801F00287C80E8004086002CC4
+S315200417602C80010140860008937E02A4387E0298CC
+S315200417707FE4FB784BFD89357FE3FB784BFDFD4108
+S3152004178038600000480000187FE3FB784BFD8A8D03
+S315200417907C7F1B794082FFB43860001680010024C8
+S315200417A07C0803A68361000C8381001083A10014A6
+S315200417B083C1001883E1001C382100204E800020BC
+S315200417C09421FFE87C0802A69381000893A1000CCB
+S315200417D093C1001093E100149001001C7C7E1B78B9
+S315200417E0480003917C7C1B79418201303D200028EE
+S315200417F080698E603880FFFF4BFE313D3C600028B7
+S3152004180038638E644BFD89797C7F1B79418200285D
+S31520041810387F00087FC4F3784BFD1ED12C8300004B
+S31520041820418600147FE3FB784BFD89F17C7F1B798D
+S315200418304082FFE0387C02984BFD89457C7D1B79EC
+S315200418404182004C7FA3EB784BFD89D1801D003467
+S315200418502C8000007C7E1B78418600187C0803A619
+S31520041860809D00407F83E3784E8000214800001845
+S31520041870387C02987FA4EB784BFD88317FA3EB78E4
+S315200418804BFDFC3D7FDDF3794082FFBC813C00802B
+S31520041890800900087C0803A6807C00644E80002111
+S315200418A07C7E1B79418200243C60006D60630006C7
+S315200418B04BFD2E5D3D20002880698E604BFE2F1D3A
+S315200418C03860FFFF480000683BBF00107FA3EB7819
+S315200418D07F84E3784BFD87D5807C00644BFDFBE158
+S315200418E07FA3EB784BFD87BD2C8300004086001C2C
+S315200418F03C60002838638E647FE4FB784BFD87AD1B
+S315200419007FE3FB784BFDFBB93D20002880698E6080
+S315200419104BFE2EC9480000143C60006D6063000233
+S315200419204BFD2DED3BC0FFFF7FC3F3788001001CE8
+S315200419307C0803A68381000883A1000C83C10010C0
+S3152004194083E10014382100184E8000209421FFE8FA
+S315200419507C0802A693A1000C93C1001093E1001405
+S315200419609001001C7C9F23787C631B797CBD2B789B
+S315200419707CDE337839600000408200183C60006DBC
+S31520041980606300024BFD2D8938600000480000E4A6
+S3152004199081230080800900282C80000041860020B5
+S315200419A07C0803A67FE3FB787FA4EB787FC5F378D6
+S315200419B04E8000217C6B1B78480000B4806301882C
+S315200419C02C830007418500A82C830006418400A0AF
+S315200419D0813F001C817F0008800900007C0058504C
+S315200419E02C80000D4085001C392BFFF2801F000C33
+S315200419F0913F00083000000E901F000C480000188C
+S31520041A007FE3FB783880000E38A000014800D98196
+S31520041A107C7F1B782C9F00004186001C881F0011A8
+S31520041A207009000241820010801F00183000000E49
+S31520041A30901F0018807E0008809F000880BE000C3E
+S31520041A404BFCF849807D0008801F0008809E000C0E
+S31520041A5080BD000C7C8022144BFCF831813F0008A9
+S31520041A60A01E00127FEBFB78B009000C7D635B7827
+S31520041A708001001C7C0803A683A1000C83C10010EE
+S31520041A8083E10014382100184E8000209421FFF8A9
+S31520041A907C0802A69001000C7C631B794082001806
+S31520041AA03C60006D606300024BFD2C653860FFFFCF
+S31520041AB04800002C812300808009002C2C80000003
+S31520041AC04086000C3860FFFF480000147C0803A6FB
+S31520041AD07C8323787CA42B784E8000218001000C03
+S31520041AE07C0803A6382100084E8000209421FFF8A4
+S31520041AF07C0802A69001000C7C631B793920000027
+S31520041B00408200183C60006D606300024BFD2C018E
+S31520041B103860FFFF4800004C806300808003002863
+S31520041B202C80000041860034800300302C80000085
+S31520041B304186002C7C8323787CA42B787C0803A6FE
+S31520041B407CC533787CE63B787D0743784E8000213C
+S31520041B507C691B78480000083920FFFF7D234B78D9
+S31520041B608001000C7C0803A6382100084E80002042
+S31520041B709421FFE87C0802A69381000893A1000C17
+S31520041B8093C1001093E100149001001C7C7D1B7806
+S31520041B907C9C23783C60002838638E644BFD85E169
+S31520041BA07C7F1B793BC0000041820030387F0008CF
+S31520041BB07FA4EB784BFD1B352C8300004086000C5C
+S31520041BC03BC00001480000147FE3FB784BFD864DA3
+S31520041BD07C7F1B794082FFD82C9E00004186002CF6
+S31520041BE0387F00104BFD85997C631B794182001C4C
+S31520041BF0800300107C80E000418600144BFD861D86
+S31520041C007C631B794082FFEC386000008001001C55
+S31520041C107C0803A68381000883A1000C83C10010DD
+S31520041C2083E10014382100184E8000209421FFF807
+S31520041C307C0802A69001000C4BFFFF393003FFFFFE
+S31520041C407C6019108001000C7C0803A6382100084A
+S31520041C504E8000209421FFF07C0802A693C1000840
+S31520041C6093E1000C900100147C7E1B7940820014C1
+S31520041C703C60006D606300024BFD2A9548000074A9
+S31520041C803D20002880098E5C2C8000004186002897
+S31520041C903C600027386351E03880000138A00002F8
+S31520041CA038C0000338E00004390000053920000656
+S31520041CB04BFD50C5387E02984BFD84C57C7F1B792D
+S31520041CC041820030801F00382C8000004186001499
+S31520041CD07C0803A6809F00407FC3F3784E800021B2
+S31520041CE07FE3FB784BFD85357C7F1B794082FFD8CB
+S31520041CF0800100147C0803A683C1000883E1000C3C
+S31520041D00382100104E8000209421FFE87C0802A68A
+S31520041D1093A1000C93C1001093E100149001001CC0
+S31520041D207C7E1B797C9D2378408200143C60006D68
+S31520041D30606300024BFD29D9480000783D20002825
+S31520041D4080098E5C2C800000418600283C60002798
+S31520041D50386351F03880000138A0000238C00003EF
+S31520041D6038E0000439000005392000064BFD5009EF
+S31520041D70387E02984BFD84097C7F1B79418200348E
+S31520041D80801F003C2C800000418600187C0803A696
+S31520041D907FC3F37880BF00407FA4EB784E80002178
+S31520041DA07FE3FB784BFD84757C7F1B794082FFD4CF
+S31520041DB08001001C7C0803A683A1000C83C10010AB
+S31520041DC083E10014382100184E8000209421FFE876
+S31520041DD07C0802A69381000893A1000C93C10010ED
+S31520041DE093E100149001001C7C7E1B782C9E003607
+S31520041DF07C9F23787CBC2B783BA00000418500ACDB
+S31520041E003D2000281C1E000C3929ABE87C604A15AD
+S31520041E1040820034386000004BFD81C938600010D0
+S31520041E204BFDF6717C641B79418200809384000CFF
+S31520041E3093E4000838600000480000643BA00001D9
+S31520041E404800002C4BFD83397C641B794182002099
+S31520041E50800400087C80F8004186FFE47C83237894
+S31520041E604BFD83B97C641B794082FFE82C9D0000DE
+S31520041E7040860038386000104BFDF6197C641B79C7
+S31520041E80418200289384000C93E400083C600028D7
+S31520041E901C1E000C3863ABE87C601A144BFD815978
+S31520041EA038600000480000083860FFFF8001001CED
+S31520041EB07C0803A68381000883A1000C83C100103B
+S31520041EC083E10014382100184E8000209421FFF06D
+S31520041ED07C0802A693E1000C900100142C830036A2
+S31520041EE07C9F2378418500483D2000281C03000C54
+S31520041EF03929ABE87C604A1540820010480000303E
+S31520041F008063000C4800002C4BFD82757C631B7992
+S31520041F104182001C800300087C80F8004186FFE48F
+S31520041F204BFD82F97C631B794082FFEC386000000C
+S31520041F30800100147C0803A683E1000C38210010DC
+S31520041F404E8000209421FFE87C0802A693A1000C71
+S31520041F5093C1001093E100149001001C7C7E1B7831
+S31520041F602C9E00367C9D23784185006C3D200028DC
+S31520041F701C1E000C3929ABE87C604A1540820030CF
+S31520041F80480000543C6000283863ABE81C1E000C53
+S31520041F907FE4FB787C601A144BFD81117FE3FB7888
+S31520041FA04BFDF51D38600000480000304BFD81D103
+S31520041FB07C7F1B7941820020801F00087C80E800FA
+S31520041FC04186FFC47FE3FB784BFD82517C7F1B79DE
+S31520041FD04082FFE83860FFFF8001001C7C0803A6CE
+S31520041FE083A1000C83C1001083E10014382100185A
+S31520041FF04E8000209421FFD87C0802A69301000875
+S315200420009321000C934100109361001493810018CE
+S3152004201093A1001C93C1002093E100249001002C7D
+S315200420207C7D1B787C9F23787CBC2B787CD833786A
+S31520042030387D00243880002C4BFD7CDD386000017F
+S31520042040388004104BFDE5392C830000907D005028
+S31520042050418603002C9F000038000000901D0000DC
+S31520042060418600D4813F0004807F0000817F000CDC
+S315200420701C030024552928347C004A147C8B0040F8
+S31520042080408400144BFD26153C00007360000001BB
+S31520042090480002B43880002080DF000838A00004FD
+S315200420A0480003C92C830000408602A0809F0000BC
+S315200420B080BF00087FA3EB78480002CD907D000006
+S315200420C0801F0000901D0008801F0000813D0050E5
+S315200420D0901D000C801F000090090010813D0050C7
+S315200420E0801F000090090000813F0000807F0004CB
+S315200420F0801F00082C8300001D2900247FC04A1459
+S31520042100408500343880002038A000007FC6F3784C
+S31520042110480003592C83000040860230807F000447
+S315200421207FC4F378480002B92C830000907D000414
+S315200421304186021838000000901D00107F9BE37929
+S31520042140901D0014901D001C3B400000418201C4D8
+S315200421503B2000013B9B0004813C00007C9AC0008C
+S315200421607D20FE707C09005054000FFE7D20002641
+S3152004217055292FFE7C0B483941820198807B00002B
+S31520042180390000006108FFC03803FFC07C8040404E
+S31520042190418501A848014BCD3BC3FFFF801D001498
+S315200421A0813D00102C8000007F20F0307D290378AB
+S315200421B0913D001040860018801D001C2C800000D4
+S315200421C04086000C93DD001C93DD0014813D001431
+S315200421D07C9E4800386000013880001C817D001CEC
+S315200421E07C00002654002FFE7C0000D07D29003878
+S315200421F07C9E58007FC000787D290378913D001489
+S315200422004CE623827C000026540047FE7C0000D046
+S315200422107FC900387D6000787D290378913D001CB4
+S31520042220817D0014801D001C7F2B5830917D001861
+S315200422307F200030901D00204BFDE3457C7F1B79D9
+S31520042240418200D857C9103A7D3D4A1493E9000CBF
+S31520042250801D0010397EFFFF7C005E30700900016E
+S31520042260408200305560103A7D40EA14340BFFFA60
+S315200422704180002093EA000C801D0010396BFFFF7B
+S315200422807C005E3070090001394AFFFC4182FFE080
+S31520042290801B000093DF000493BF0018901F0000EA
+S315200422A0809B0000807C0000813C000838040004E8
+S315200422B07C0301D67C8900404184007080DC0004C4
+S315200422C038A00004480001A52C8300004086007C29
+S315200422D0809C000080BB000080DC00047FE3FB7848
+S315200422E04800013D2C830000907F00144186005C49
+S315200422F03B5A0001801C0000377B0010901F000809
+S31520042300801C00003B9C0010901F000C4082FE4C59
+S3152004231038600000480000404BFD23813C000073D8
+S3152004232060000003480000204BFD23713C0000732D
+S3152004233060000001480000104BFD23613C0000733F
+S3152004234060000002900300007FA3EB7848000B7125
+S315200423503860FFFF8001002C7C0803A68301000857
+S315200423608321000C834100108361001483810018AB
+S3152004237083A1001C83C1002083E100243821002886
+S315200423804E8000209421FFF03940000038000000E0
+S315200423907C8A2000900100083961000838E0002476
+S315200423A0408400303900000038050004900B0000FA
+S315200423B090650000394A0001812B00007C8A2000A8
+S315200423C07CA53A1499090010816B00004184FFDC36
+S315200423D080610008382100104E8000209421FFF0EF
+S315200423E0392000007C89180038000000900100087C
+S315200423F0396100084084001C392900017C891800B1
+S31520042400908B00007C8B2378388400204184FFEC59
+S3152004241080610008382100104E8000209421FFF0AE
+S3152004242039200000380000007C8920009001000833
+S315200424303961000838A500044084002438060004C5
+S31520042440900B0000392900017C8920009066000049
+S31520042450816B00007CC62A144184FFE48061000855
+S31520042460382100104E8000209421FFF87C0802A613
+S315200424709001000C5480003A7C8020007C691B78F3
+S315200424807CC33378418600144BFD22113C00007333
+S3152004249060000005480000482C8300007C842A1430
+S315200424A0408600144BFD21F53C00007360000006B5
+S315200424B04800002C5460003A7C80180040860014A2
+S315200424C07C8921D64BFD78513860000048000018DD
+S315200424D04BFD21C93C0000736000000490030000FA
+S315200424E03860FFFF8001000C7C0803A63821000811
+S315200424F04E8000209421FFE87C0802A693810008E0
+S3152004250093A1000C93C1001093E100149001001CC8
+S315200425107C7C1B787C9D237838000000901D000469
+S315200425204BFDD741893D0010801C00505529103A97
+S315200425307D290214800900103000FFFF9009001045
+S31520042540813C0050800900103D60002830000001C5
+S315200425509009001038000000981D0010812B8EC0B1
+S31520042560801C00002C890000901D000093BC0000F4
+S31520042570408500343809FFFF900B8EC04BFDD6F9F9
+S315200425803D20002880098E742C8000004186001C82
+S315200425907C0803A63C60002838638EA44E80002164
+S315200425A0480000084BFDD6D18001001C7C0803A6F8
+S315200425B08381000883A1000C83C1001083E10014E9
+S315200425C0382100184E8000209421FFE87C0802A6BA
+S315200425D093A1000C93C1001093E100149001001CF8
+S315200425E07C7F1B7883BF001C83DF00004BFDD675E0
+S315200425F02C9E0000418600BC801F00083000FFFF8F
+S315200426002C800000901F0008408600B4801F000C18
+S315200426102C800000418600244BFDD65D801F000CD3
+S31520042620807F00107C0803A6809F001480BF0018BA
+S315200426304E80002148000078815EFFFC800A001449
+S315200426403CE00028901E000093CA001438000001C4
+S31520042650816A0004810A00187C0058308128001001
+S3152004266081678EE07D290378912800102C8B000049
+S31520042670800A000C30000001900A000C40850034CA
+S31520042680380BFFFF90078EE04BFDD5ED3D2000284B
+S3152004269080098E742C800000418600147C0803A6D1
+S315200426A03C60002838638EC44E8000214BFDD5B58E
+S315200426B0801D0004901F000093FD00044BFDD5B936
+S315200426C08001001C7C0803A683A1000C83C1001092
+S315200426D083E10014382100184E8000209421FFE85D
+S315200426E07C0802A69381000893A1000C93C10010D4
+S315200426F093E100149001001C7C9D2378839DFFFCAC
+S315200427004BFDD561801C001439200001901D00006A
+S3152004271093BC0014815C0018817C0004800A00109C
+S315200427207D2958307C004B78900A0010801C000CC0
+S3152004273030000001901C000C4BFDD53D8001001C8F
+S315200427407C0803A68381000883A1000C83C10010A2
+S3152004275083E10014382100184E8000209421FFE8DC
+S315200427607C0802A693A1000C93C1001093E10014E7
+S315200427709001001C7C9F2378881F00102C80000069
+S315200427807C7D1B784086001C4BFD1F113C0000738A
+S315200427906000000790030000386000004800002C09
+S315200427A0881F00117009000183DF00004182000C9C
+S315200427B0807F001C4BFFFE157FA3EB787FE4FB781C
+S315200427C04BFFFD357FC3F3788001001C7C0803A6EC
+S315200427D083A1000C83C1001083E100143821001862
+S315200427E04E8000209421FFE07C0802A69361000C11
+S315200427F09381001093A1001493C1001893E1001C47
+S31520042800900100247C7F1B787C9D237854BB063E54
+S315200428104BFDD45183DF00002C9E000041860074BA
+S31520042820801E0000813F0050901F00008009001088
+S315200428303000FFFF90090010801F00505769103A9E
+S315200428407D2902148009001030000001900900102F
+S315200428504BFDD425881E00102C8000004186001CC8
+S315200428604BFD1E393C0000736000000790030000F6
+S3152004287038600000480000889B7E0010901E0000EF
+S31520042880901E000438000000981E00114800006CB9
+S315200428902C9D0000408600443F800028801C8E70BA
+S315200428A02C800000418600344BFDD3CD3C600028AB
+S315200428B038638EA43BA00001801C8E707FE4FB78D5
+S315200428C07C0803A63CA0002880DF005038A58EC0D3
+S315200428D04E8000214BFFFF3C813F005080090004BD
+S315200428E030000001900900044BFDD38D3C60007339
+S315200428F06063000A4BFD1E197FC3F3788001002410
+S315200429007C0803A68361000C8381001083A1001434
+S3152004291083C1001883E1001C382100204E8000204A
+S315200429209421FFE87C0802A69381000893A1000C59
+S3152004293093C1001093E100149001001C7C7E1B7847
+S315200429407C9D23784BFDD31D83FE00042C9F000021
+S3152004295041860028801F0000901E00044BFDD319D9
+S3152004296038000000901F0000901F000C901F0008E4
+S3152004297093DF001C4800005C2C9D00004086004428
+S315200429803F800028801C8E702C80000041860034F5
+S315200429904BFDD2E53C60002838638EC43BA0000181
+S315200429A0801C8E70389E00047C0803A63CA0002858
+S315200429B080DE005038A58EE04E8000214BFFFF8834
+S315200429C04BFDD2B53C6000736063000A4BFD1D418C
+S315200429D07FE3FB788001001C7C0803A68381000822
+S315200429E083A1000C83C1001083E100143821001850
+S315200429F04E8000209421FFE87C0802A693A1000CB7
+S31520042A0093C1001093E100149001001C7C7D1B7877
+S31520042A107C9F23784BFDD24D83DF00142C9E00002F
+S31520042A20408600104BFDD251386000004800004C0F
+S31520042A30801E00002C800000901F00144086001C7D
+S31520042A403800FFFE817F0004813D00105C00583E63
+S31520042A507D290038913D0010801F000C813F001015
+S31520042A603000FFFF901F000C39290001913F001010
+S31520042A704BFDD2057FC3F3788001001C7C0803A696
+S31520042A8083A1000C83C1001083E1001438210018AF
+S31520042A904E8000209421FFD87C0802A693010008CA
+S31520042AA09321000C93410010936100149381001824
+S31520042AB093A1001C93C1002093E100249001002CD3
+S31520042AC07C7D1B787CBF2B787C9923797CDA3378C0
+S31520042AD03B8000007CF83B78418202387F44D378DF
+S31520042AE04BFFFE417C7C1B7941820238801D0018F5
+S31520042AF07C9F0000408500142C98000040860068C6
+S31520042B00813D00144800004C801D00207C9F00005D
+S31520042B104084000C813D001C480000387FE3FB788C
+S31520042B20480142413923FFFF380000017C00483028
+S31520042B307C9F00004CE623827C000026540047FE3E
+S31520042B407C0000D07D2900387C6300787D291B78A1
+S31520042B505529103A7D3D4A1483C9000C2C9E000049
+S31520042B60408600184BFD1B353C00007360000002B4
+S31520042B70900300004800019C4BFDD0E9801E001400
+S31520042B802C8000007C7B1B78408600D03800000116
+S31520042B90813E0004817D00107C0348307C8B180024
+S31520042BA0418400387C7F1B783C0000017C9F000018
+S31520042BB0418500A87D635B783D6000017C60F8391F
+S31520042BC04082008C57FF083C7C9F5800392900011D
+S31520042BD04085FFEC480000842C98000040860024A1
+S31520042BE02C8B00004186001C7D635B78480141756F
+S31520042BF05463103A7C7D1A1483C300084800005C91
+S31520042C002C9A0000408600543FE00028801F8E70D6
+S31520042C102C800000418600447F63DB784BFDD0592D
+S31520042C203C60002838638EC4389E0014801F8E7042
+S31520042C303B4000017C0803A63CA0002880DD005010
+S31520042C4038A58EE04E8000214BFFFF305529103ADF
+S31520042C507D3D4A1483C9000C83FE00142C9F00007A
+S31520042C6041860050801F00002C800000901E001416
+S31520042C704086001C3800FFFE817E0004813D001042
+S31520042C805C00583E7D290038913D00107F63DB7837
+S31520042C90801E000C813E00103000FFFF901E000CA9
+S31520042CA039290001913E00104BFDCFCD4800002C60
+S31520042CB0813D0050800900047F63DB7830000001E9
+S31520042CC0900900044BFDCFB13C6000736063000A99
+S31520042CD04BFD1A3D4800003C93F900088819001161
+S31520042CE038600000600000019819001193FC000070
+S31520042CF038000000813E0000901C000C38000001C2
+S31520042D00901C0008913C00049399001C480000186C
+S31520042D102C9C00004186000C7F83E3784BFFF8ADA2
+S31520042D203860FFFF8001002C7C0803A6830100087D
+S31520042D308321000C834100108361001483810018D1
+S31520042D4083A1001C83C1002083E1002438210028AC
+S31520042D504E8000209421FFF07C0802A693C100082F
+S31520042D6093E1000C900100147C7E1B78801E0018D1
+S31520042D707C9F23787C9F0000408500182C850000CA
+S31520042D80813E0014418600543860000048000058F3
+S31520042D90801E00207C9F00004084000C813E001C85
+S31520042DA0480000387FE3FB7848013FB93923FFFF09
+S31520042DB0380000017C0048307C9F00004CE62382CA
+S31520042DC07C000026540047FE7C0000D07D29003874
+S31520042DD07C6300787D291B785529103A7D3E4A1458
+S31520042DE08069000C800100147C0803A683C10008B6
+S31520042DF083E1000C382100104E8000209421FFF03E
+S31520042E007C0802A693E1000C900100143FE0002800
+S31520042E10801F8EE42C800000408600343C6000280D
+S31520042E2038638EA43880000138A000004BFE0CF1D4
+S31520042E303C60002838638EC43880000138A0000026
+S31520042E404BFE0CDD38000001901F8EE43860000034
+S31520042E50800100147C0803A683E1000C38210010AD
+S31520042E604E8000209421FFF87C0802A69001000CD5
+S31520042E707C631B794082000C3860FFFF48000030D9
+S31520042E802C8700004186000C90E300544800001073
+S31520042E903D20002880098EA09003005481230054ED
+S31520042EA0800900007C0803A64E8000218001000CC6
+S31520042EB07C0803A6382100084E8000209421FFE8D0
+S31520042EC07C0802A69381000893A1000C93C10010EC
+S31520042ED093E100149001001C7C7D1B78807D0050BA
+S31520042EE02C8300004086001C4BFD17B13C00007368
+S31520042EF060000008900300003860FFFF4800007857
+S31520042F004BFDE5BD3BE000003B8000007FBEEB7837
+S31520042F10807E00242C8300004186003C397F0001FA
+S31520042F202C8B000A4185002C5560103A7D20EA142A
+S31520042F30800900247C8300004086000893890024AD
+S31520042F40396B00012C8B000A392900044085FFE4E3
+S31520042F504BFDE56D3BFF00012C9F000A3BDE000480
+S31520042F604085FFB07FA3EB78388000584BFD6DA9D0
+S31520042F70386000008001001C7C0803A683810008B9
+S31520042F8083A1000C83C1001083E1001438210018AA
+S31520042F904E8000209421FFF87C0802A69001000CA4
+S31520042FA07C631B7941820024812300542C890000F0
+S31520042FB041860018800900042C8000004186000CFC
+S31520042FC07C0803A64E8000218001000C7C0803A601
+S31520042FD0382100084E8000209421FFF87C0802A6A0
+S31520042FE09001000C7C8323788123001C2C8900000B
+S31520042FF041860024812900542C890000418600182A
+S31520043000800900082C8000004186000C7C0803A659
+S315200430104E8000218001000C7C0803A6382100087C
+S315200430204E8000209421FFF87C0802A69001000C13
+S315200430307C631B7941820024812300542C8900005F
+S31520043040418600188009000C2C8000004186000C63
+S315200430507C0803A64E8000218001000C7C0803A670
+S31520043060382100084E8000209421FFF87C0802A60F
+S315200430709001000C7C641B794182001C8064FFFC57
+S3152004308081230054800900107C0803A64E80002169
+S3152004309048000008386000008001000C7C0803A664
+S315200430A0382100084E8000209421FFF87C0802A6CF
+S315200430B09001000C7C641B79418200208064FFFC13
+S315200430C081230054800900107C0803A64E80002129
+S315200430D07C641B794082FFE88001000C7C0803A6EF
+S315200430E0382100084E8000209421FFF87C0802A68F
+S315200430F09001000C7C631B7954A5063E4182001C7A
+S31520043100812300542C890000418600108009001474
+S315200431102C8000004086000C386000004800000C1B
+S315200431207C0803A64E8000218001000C7C0803A69F
+S31520043130382100084E8000209421FFF87C0802A63E
+S315200431409001000C7C631B794182001C812300546E
+S315200431502C89000041860010800900182C8000006C
+S315200431604086000C386000004800000C7C0803A64A
+S315200431704E8000218001000C7C0803A6382100081B
+S315200431804E8000209421FFF87C0802A69001000CB2
+S315200431907C631B794182001C812300542C89000006
+S315200431A0418600108009001C2C8000004086000CFB
+S315200431B0386000004800000C7C0803A64E800021DD
+S315200431C08001000C7C0803A6382100084E800020CC
+S315200431D09421FFF87C0802A69001000C7C631B79DD
+S315200431E04182001C812300542C8900004186001052
+S315200431F0800900202C8000004086000C3860FFFFE8
+S315200432004800000C7C0803A64E8000218001000C97
+S315200432107C0803A6382100084E8000209421FFE074
+S315200432207C0802A69361000C9381001093A10014DC
+S3152004323093C1001893E1001C900100247C9C237800
+S315200432407CBD2B787C7F1B793BC000007CFB3B78C4
+S3152004325054C5063E4182006C813F00542C890000EF
+S3152004326041860060800900147C0803A67FE3FB786E
+S315200432707FA4EB784E8000217C7E1B79418200540A
+S31520043280813F00547FE3FB78800900207FC4F378D4
+S315200432907C0803A67F85E3787FA6EB787F67DB78B7
+S315200432A04E8000212C830000418600287FE3FB7892
+S315200432B07FC4F3784BFFFCE13BC0000048000014B8
+S315200432C04BFD13D93C0000736000000890030000F6
+S315200432D07FC3F378800100247C0803A68361000C55
+S315200432E08381001083A1001483C1001883E1001C8C
+S315200432F0382100204E8000207D2A4B7820030000B0
+S315200433007D201914216400007C0B21147D2B037964
+S31520043310408200289083000090A3000490C3000CF0
+S3152004332090E3001091030014914300183800000123
+S31520043330900300084E800020386000004E80002054
+S31520043340200300007D201914216400007C0B211425
+S315200433507D2B037940820020812400009083001C69
+S3152004336088030011912300086000000198030011CE
+S315200433704E800020386000004E8000209421FFF803
+S315200433807C0802A69001000C7C631B794182001CF8
+S31520043390812300542C8900004186001080090024D2
+S315200433A02C8000004086000C386000004800000C89
+S315200433B07C0803A64E8000218001000C7C0803A60D
+S315200433C0382100084E8000209421FFE87C0802A6BC
+S315200433D09381000893A1000C93C1001093E100147B
+S315200433E09001001C7CBD2B797C7F1B787C9E2378E6
+S315200433F04082000C3D2000213BA911882C9F00000F
+S315200434007FDCF3784186002C7FA803A6807F000802
+S3152004341080BF000C7FC4F3784E800021801F000CEF
+S3152004342083FF00002C9F00007FDE02144086FFDC11
+S315200434307C7CF0508001001C7C0803A68381000854
+S3152004344083A1000C83C1001083E1001438210018E5
+S315200434504E8000209421FFF07C0802A693E1000C04
+S3152004346090010014200300007D201914216400001B
+S315200434707C0B21147D2B03797C9F23784182000CBD
+S31520043480386000004800007489230011712000016F
+S3152004349041820060712000024182001481230014BD
+S315200434A081430018913F0014915F0018800300089F
+S315200434B0901F00088003000C901F000C8803001046
+S315200434C0981F001088030011981F00118003001C08
+S315200434D0901F001C4BFDC78D813F001C80090008EE
+S315200434E030000001900900084BFDC78D48000008F4
+S315200434F03BE000007FE3FB78800100147C0803A6F0
+S3152004350083E1000C382100104E8000209421FFC84E
+S315200435107C0802A692C1001092E1001493010018BF
+S315200435209321001C93410020936100249381002859
+S3152004353093A1002C93C1003093E100349001003C08
+S315200435407C781B787C9E23787CB72B787CDD33783B
+S315200435507CF63B787EFCBB7857800FFE57A90FFE7E
+S315200435607C0B4B793BE0000093E100083B200000F4
+S31520043570408201602C9C00004086000C881E0011AD
+S315200435805419FFFE408500242C9E000041860144E8
+S31520043590801E000C7C9C0000418400107F80E0513A
+S315200435A083DE00004181FFE42C9D00003B6100087E
+S315200435B0408501083F403B9A635ACA002C9E00006E
+S315200435C0408600107C9DD000418600F0480001040E
+S315200435D081380054800900147C0803A67F03C3782D
+S315200435E088BE00107EC4B3784E8000217C7F1B7871
+S315200435F02C9F000093FB0000418600C82C990000F4
+S31520043600418600347C9DD000813E0014815E0018E2
+S31520043610913F0014915F001840860014801F001803
+S315200436207C170050901F00184800000893BF00180C
+S315200436303B200000881E0011981F0011817E000C7B
+S315200436407D7C58507C9D58004CE623827C000026C5
+S31520043650540047FE7C0000D07FA900387D600078A6
+S315200436607D290378913F000C801E00087C00E2141B
+S31520043670901F0008801E001C901F001C4BFDC5E5F2
+S31520043680813F001C800900083000000190090008D1
+S315200436904BFDC5E57C9DD0004186000C801F000CA7
+S315200436A07FA0E8502C9D00003B80000083DE0000B4
+S315200436B07FFBFB784185FF088061000848000038BD
+S315200436C04BFD0FD93C0000736000000A480000102F
+S315200436D04BFD0FC93C0000736000000990030000F5
+S315200436E0806100082C830000418600084BFFF9BD49
+S315200436F0386000008001003C7C0803A682C10010CB
+S3152004370082E10014830100188321001C83410020D8
+S31520043710836100248381002883A1002C83C1003087
+S3152004372083E10034382100384E8000209421FFD8CC
+S315200437307C0802A69321000C934100109361001487
+S315200437409381001893A1001C93C1002093E10024C7
+S315200437509001002C7C7E1B787CFB3B797CBC2B78EF
+S315200437607CDD33787F99E3784082000C3D2000216C
+S315200437703B69118854800FFE57A90FFE7C0B4B79A9
+S31520043780408200EC2C9E0000418600E4480000188C
+S31520043790801E000C7C840000418400287C802050FC
+S315200437A083DE00007C80FE707C04005054000FFEF3
+S315200437B0317EFFFF7D2BF1107C0B48394082FFD4EC
+S315200437C07FA0FE707C1D005054000FFE317EFFFF4B
+S315200437D07D2BF1107C0B48394182008C3F403B9A6B
+S315200437E0635ACA007C9DD00041860034801E000C9A
+S315200437F07FE400507C9FE8004CE623827C00002670
+S31520043800540047FE7C0000D07FE900387FA0007872
+S315200438107D3F03787FBFE8504800000C801E000CD3
+S315200438207FE40050807E00087F6803A67FE5FB784E
+S315200438307C6322147F84E3784E8000217FA0FE706F
+S315200438407C1D005083DE000054000FFE317EFFFFF6
+S315200438507D2BF1107C0B48397F9CFA1438800000AC
+S315200438604082FF847C79E050480000184BFD0E2DE1
+S315200438703C000073600000099003000038600000DB
+S315200438808001002C7C0803A68321000C83410010B0
+S31520043890836100148381001883A1001C83C1002046
+S315200438A083E10024382100284E8000209421FFD073
+S315200438B07C0802A693E1002C900100343D200028C8
+S315200438C083E98F442C9F0000418600103D20002868
+S315200438D080699C88480001003800000190098F44C3
+S315200438E0386007F84BFD7C412C8300003D200028DE
+S315200438F090698F3C408600103C600027386351FC59
+S315200439004800F2E13C600023386360184BFD430510
+S315200439102C83FFFF408600283C600027386352240E
+S315200439203880000038A0000038C0000038E00000CD
+S3152004393039000000392000004BFD343D3880000159
+S315200439403D20002880698EE838A000004BFE01D176
+S315200439504800F05D4800B7314BFF27613C600028E2
+S3152004396038638D784800B0E54800B1094800295DE0
+S315200439704BFF7A454BFF665D93E1000893E1000C0B
+S3152004398093E1001093E1001493E1001893E1001CE5
+S3152004399093E100203C6000273863524C3CE000242D
+S315200439A038E738F4390000003D20002880898EEC61
+S315200439B0392000003D6000283D40002880AB8EF071
+S315200439C080CA8EF4394000004BFE264D3D20002847
+S315200439D090699C882063FFFF3063FFFF7C63191086
+S315200439E0800100347C0803A683E1002C38210030B2
+S315200439F04E8000209421FFD07C0802A693810020CB
+S31520043A0093A1002493C1002893E1002C9001003453
+S31520043A103FA000283F8000273FC000283D200028E3
+S31520043A2080698EE83880FFFF4BFE0F0D807D8F3C2A
+S31520043A304BFD7E652C83000040860058807D8F3C9C
+S31520043A403881000838A000184BFD7BAD2C83001864
+S31520043A504186000C387C52584800F1894800EF8191
+S31520043A607C7F1B788061000C808100108001000817
+S31520043A7080A100147C0803A680C1001880E1001CE4
+S31520043A804E8000217FE3FB784800F0254BFFFFA002
+S31520043A904800EF4D801E8F40700900027C7F1B7802
+S31520043AA0418200144BFFA261801E8F40540007FA06
+S31520043AB0901E8F40801E8F4070090004418200149E
+S31520043AC04BFF4BE5801E8F40540007B8901E8F4055
+S31520043AD07FE3FB784800EFD94BFFFF449421FFD0C6
+S31520043AE07C0802A69381002093A1002493C1002878
+S31520043AF093E1002C90010034906100089081000C21
+S31520043B0090A1001090C1001490E100189101001CAE
+S31520043B104BFDC1517C7C1B783D20002880698F3C5D
+S31520043B203881000838A000184BFD7C09687D0018F0
+S31520043B30201D00007FA0E9147F83E3784BFDC13963
+S31520043B402C9D0000418600183D20002880698EE8BF
+S31520043B504BFE0C8938600000480000143C600027A6
+S31520043B60386352784800F07D3860FFFF80010034C6
+S31520043B707C0803A68381002083A1002483C1002816
+S31520043B8083E1002C382100304E8000209421FFF858
+S31520043B907C0802A69001000C4BFD0B758001000CDD
+S31520043BA07C0803A6382100084E8000209421FFF8C3
+S31520043BB07C0802A69001000C3D4000283920000113
+S31520043BC07D2918303D600028800A8F40806B8EE85E
+S31520043BD07C004B78900A8F404BFE0C018001000C30
+S31520043BE07C0803A6382100084E80002048000024C3
+S31520043BF08004000C8924000A7C0300AE7D2B003946
+S31520043C004182000C8084001448000008808400103F
+S31520043C10A80400082C8000004084FFD87C832378E5
+S31520043C204E800020480000308164000C8944000A3C
+S31520043C307C0558AE7D490039418200187C0358AE74
+S31520043C407D4900394182000C808400144800000814
+S31520043C5080840010A80400082C8000004084FFCC37
+S31520043C607C8323784E80002089240000880300006A
+S31520043C707D044A14388400017CC048503806FFFF6E
+S31520043C807CC003787C00FE707D2640507D0B003876
+S31520043C907D2000787D6B03787C845840386300014E
+S31520043CA038E0000140840050894400008923000044
+S31520043CB07D4048794182000C386000004E80002007
+S31520043CC0388400017C845840386300017D404A785A
+S31520043CD03000FFFF7C0001107CE700384184FFCCD4
+S31520043CE048000014880400002C8000003884000159
+S31520043CF04086FFC87C8440404184FFEC3007FFFFA8
+S31520043D007D20391054C00FFE7D2B003941820028B6
+S31520043D107D0618507C8340404084001C88030000A4
+S31520043D202C800000386300014186FFEC38600001D6
+S31520043D304E800020200700007C6039144E8000202D
+S31520043D409421FFE87C0802A693A1000C93C10010DD
+S31520043D5093E100149001001C7C7D1B787C832379DD
+S31520043D603BE000007CBE2B7841820028813E000087
+S31520043D7080A9000C38800001480005657C631B7906
+S31520043D804082000C386000004800004C83E3000C9D
+S31520043D907FA3EB787FC4F3784800010D3003FFFF3F
+S31520043DA07D201910317FFFFF7C0BF9107D2B003904
+S31520043DB0418200242C8300004186001C80030010CD
+S31520043DC07C80F80041860010806300142C83000058
+S31520043DD04086FFEC8001001C7C0803A683A1000C0E
+S31520043DE083C1001083E10014382100184E8000207E
+S31520043DF080E4000C896300008104001089270000F8
+S31520043E002C8800007C0958107C0001107C0003B823
+S31520043E107D2900387D6000787D2A03784086001845
+S31520043E203D20002881098F5C48000030386000005E
+S31520043E304E800020896800007C8A58004CE6238244
+S31520043E407C000026540047FE7C0000D07D490038C3
+S31520043E507D6000787D2A03787D4352147C632A147E
+S31520043E607C8350407D082A147CE72A144084003041
+S31520043E708803000089270000896800007C004A78AE
+S31520043E807D6900394082FFA8386300017C83504055
+S31520043E9038E70001390800014184FFD83860000161
+S31520043EA04E8000209421FFD87C0802A693010008A6
+S31520043EB09321000C93410010936100149381001800
+S31520043EC093A1001C93C1002093E100249001002CAF
+S31520043ED083A400007C7A1B78A81D00087F4AD37827
+S31520043EE02C800000891A00007FB8EB78839D000C93
+S31520043EF041840030801D000C893D000A7C0A00AEF6
+S31520043F007D2B00394182000C83BD00144800000833
+S31520043F1083BD0010A81D00082C8000004084FFD813
+S31520043F20813D00102C890000418600088909000083
+S31520043F307D4AE2147D3A42147C8A4840801D000C56
+S31520043F407CA0E21440840024896A000088050000CD
+S31520043F507C8B000040860044394A00017C8A484014
+S31520043F6038A500014184FFE4881D000B7009000276
+S31520043F7041820080801D00143120FFFF7D294910D5
+S31520043F807FAB48387C0348787D7D1B7848000064E5
+S31520043F907FE3FB784800014C7D6002787C000E713B
+S31520043FA039600007408100107C000E71396BFFFFD9
+S31520043FB04181FFF87F7A5050801D001057691838C8
+S31520043FC02C8000007D6B4A147D7958F87FBFEB78EE
+S31520043FD0408600444800003C881D000B70090001FF
+S31520043FE041820018A81D00087C9900004185002400
+S31520043FF07FA3EB78480000EC7F43D3787FA4EB784B
+S315200440007F65DB784BFFFDED2C8300004086FFE4C3
+S3152004401083BD00142C9D00004086FFC07FFDFB78E5
+S3152004402083BD000483DD00002C9E0000418600A889
+S31520044030881E00037009000141820018A81E000092
+S315200440407C99000041850084807E00084800009405
+S31520044050839D000C7C9CD8007F43D3787FA4EB7887
+S3152004406080BE00084CE623827C000026540047FECE
+S315200440707C0000D07F8900387F6000787D3C0378FF
+S315200440804BFFFBA57C7F1B7941820040813E0008C3
+S31520044090801F00107C8048004186001083FF001496
+S315200440A02C9F00004086FFEC2C9F00004186001CBC
+S315200440B07F43D3787FE4FB787F85E3784BFFFD3518
+S315200440C02C8300004086FECC83DE00042C9E000058
+S315200440D04086FF607C9DC0004086FF483860000013
+S315200440E08001002C7C0803A6830100088321000C90
+S315200440F083410010836100148381001883A1001C6E
+S3152004410083C1002083E10024382100284E8000202A
+S3152004411039250018B0890008548B077E38000080A2
+S315200441207C005E309809000A90A900107C841E70D9
+S315200441309089000C3800FFFFB00500089065000C3C
+S3152004414091250004380000049809000B9805000BFB
+S315200441507D234B784E8000209421FFD87C0802A62C
+S315200441609321000C9341001093610014938100184D
+S3152004417093A1001C93C1002093E100249001002CFC
+S315200441807C7E1B787CBA2B787CD9337883640000B8
+S315200441908BBE00007F64DB78839B000C4BFFFA51B7
+S315200441A07D5EEA148003000C7FFEE2147C9F50405F
+S315200441B07D60E2147FDCF37840840024880B0000C1
+S315200441C0893F00007C8048003BFF0001396B0001D9
+S315200441D0408600187C9F50404184FFE4380000014B
+S315200441E0901A0000480000CC38000000901A000005
+S315200441F0893FFFFF880BFFFF7D2902782C89000069
+S315200442007C1CF85054041838418600107D290E7100
+S315200442103884FFFF4082FFF87F7DDB787F9FE37839
+S31520044220801D000C7D3F00AE881D000A7D2B0039C1
+S315200442307FBCEB784182000C83BD00144800000843
+S3152004424083BD0010A81D00087C8400404185FFD44E
+S315200442507FC3F3787F25CB784BFFFEB9801C000CF7
+S315200442607D3F00AE881C000A7D2B00398143001057
+S315200442704082000C907C001048000008907C0014BA
+S31520044280907D00048003000C938300047D3F00AEE0
+S315200442908803000A7D2B00394082000C93A3001466
+S315200442A04800000C9143001493A300107D435378D7
+S315200442B08001002C7C0803A68321000C8341001076
+S315200442C0836100148381001883A1001C83C100200C
+S315200442D083E10024382100284E8000209421FFD039
+S315200442E07C0802A693010010932100149341001820
+S315200442F09361001C9381002093A1002493C100287C
+S3152004430093E1002C900100347CBC2B787C7A1B78BA
+S315200443103D2000287F8BFE707D60E2787C0058501B
+S315200443208BDA000081699C947C00FE707C9E580088
+S315200443307F890038300000017D3C03784CE62382D7
+S315200443407C000026540047FE7C0000D07FC900383C
+S315200443507D6000787D3E03787C9EE0007C992378FE
+S315200443603B600000408500982C9C00014085002479
+S3152004437038BCFFFF3D2000283D60002880698F5C03
+S31520044380808B8F5438630001388400014BFCCEFDAA
+S315200443907C7AE2143FA00028809D8F547CBCF05088
+S315200443A07C84E2144BFCCEE5813D8F547FA9F21424
+S315200443B07C9D48407FDFF3784800000C3BBDFFFF1F
+S315200443C07C9D484040850010881DFFFF2C800000FE
+S315200443D04186FFEC3F400028807A8F547FC3E85003
+S315200443E07C9EE000418500283D20002880098F60BE
+S315200443F07C9F00004184000893C98F603D200028DB
+S3152004440080699C8C3863002C480001D43FA0002886
+S31520044410809D8F607C9F2000408400107C63FA146A
+S315200444207C9F20504BFD58F193DD8F60813A8F5449
+S315200444303F0000289BC9000081389C8C807A8F54C9
+S31520044440808900004BFFF7A92C9E00007C7F1B78F7
+S3152004445041860020807A8F54809F000C7FC5F37894
+S315200444604BFD57E13063FFFF7C6319107FFF18383B
+S31520044470301FFFFF7D20F9103179FFFF7C0BC91017
+S315200444807D2B037940820154388000053FA0002803
+S31520044490807D9C9438A00001386300304800E7C52D
+S315200444A07C7F1B782C9F00007FF9FB784086000CCC
+S315200444B038600000480001287FE3FB78809D9C94A7
+S315200444C03BBF0030388400304BFD584D7FA4EB7839
+S315200444D0807A8F547FC5F3784BFCCDB17FA3EB78DC
+S315200444E038A1000880989C8C7FE6FB784BFFFC6DF6
+S315200444F0800100082C8000007FBAEB787C7F1B7833
+S31520044500418600343C6000273863529C3880000082
+S3152004451038A0000038C0000038E000003900000050
+S31520044520392000004BFD28517F23CB784800E78DA6
+S31520044530480000A87CBDF2147FBDE2147C9D28406F
+S31520044540394000014084001C881D00002C8000FF97
+S31520044550408600103BBD00017C9D28404184FFEC31
+S315200445607C9D28004186004C897D00007160008076
+S3152004457039200080418200147D290E707D2058390F
+S315200445803B7B00014082FFF43D20002839298F48D7
+S31520044590897D00007C1B48AE7C8B00004086001081
+S315200445A03805FFFF7C9D0000418600083940000045
+S315200445B07C1AE850540018382C8A00007F7B021499
+S315200445C07F60D8F8B01F000841860010881F000BB2
+S315200445D060000001981F000B7FE3FB788001003404
+S315200445E07C0803A68301001083210014834100184C
+S315200445F08361001C8381002083A1002483C10028B9
+S3152004460083E1002C382100304E80002088030000EE
+S31520044610892400007C8048404085000C38600001D5
+S315200446204E8000207C804800408600307D63021442
+S315200446307C83584040840024880300008924000099
+S315200446407C80484038840001386300014185FFD0CE
+S315200446507C8358404184FFE4386000004E8000206B
+S315200446609421FFE87C0802A693A1000C93C10010B4
+S3152004467093E100149001001C7C7E1B783D200028C9
+S3152004468080699C902C8300007C9D237841860014AD
+S315200446907C7F1B78801F000490099C90480000189A
+S315200446A0386000103880000538A000014800E5B5C0
+S315200446B07C7F1B782C9F0000408600303C600027BE
+S315200446C0386352C83880000038A0000038C0000083
+S315200446D038E0000039000000392000004BFD2699FF
+S315200446E038600000480000487FE3FB7838800010DB
+S315200446F04BFD5625A01E0008B01F0000881E000B87
+S31520044700981F0003881E000B700900014182000CCB
+S3152004471093DF00084800000C801E0010901F00083C
+S3152004472093BF000493FE00007FE3FB788001001C06
+S315200447307C0803A683A1000C83C1001083E1001426
+S31520044740382100184E8000209421FFC07C0802A640
+S315200447507D80002692C1001892E1001C930100205E
+S3152004476093210024934100289361002C93810030E7
+S3152004477093A1003493C1003893E1003C9001004496
+S31520044780918100147CBF2B787CDC33783BC00000FD
+S315200447903B0000007C9A23793B2000007C761B7822
+S315200447A082FF0000418200387F43D37880B7000C13
+S315200447B0388000004BFFFB297C7E1B794082000C4D
+S315200447C03860000048000358A01E0008835E000CD1
+S315200447D07C1907347C0000F87C1807347EC3B37830
+S315200447E07FE4FB7838A100087F86E3784BFFF96DD8
+S315200447F0800100082C8000007C7D1B787FBFEB782D
+S31520044800418600F02C9D00007FBBEB78418600603A
+S315200448102D1A0000809D00107C84D0004186FFA4C0
+S31520044820418A004C2C84000041860034A81D0008CF
+S315200448307C990000418400387F43D3784BFFF42DC4
+S315200448402C83000040860028809D00107F43D37867
+S315200448504BFFFDBD2C830000408600147FBBEB7804
+S3152004486083BD00142C9D00004086FFAC7C9DF8007F
+S31520044870408600487F9DE378937D0014881B000BB7
+S315200448807FC9F378981D000B83DB000493DD0004B5
+S3152004489093BB0004801E00107C80D8004086000C48
+S315200448A093BE00104800000893BE00147FBFEB7827
+S315200448B07D3E4B7848000028801B00147F9DE378BA
+S315200448C0901D001493BB0014813D00142C89000014
+S315200448D0937D00044186000893A9000492DD000C10
+S315200448E03800FFFFB01D000838000004981D000B97
+S315200448F02C9A000041860024935D0010A01E000817
+S31520044900B01D0008881E000B893D000B540007FECD
+S315200449107D290378993D000B800100082C80000036
+S31520044920837F0004408600D4801B0014A93B000822
+S315200449307C80F8007D3948F87C1E03784086000880
+S3152004494083DB0010A81E00082C8000004084007021
+S315200449502C9E00007F7CDB78418600A0801E001000
+S315200449602C80000041860048A81E00087C80C800D0
+S315200449704184003C801E00002C80000040860030CC
+S315200449807FC3F378388000004BFFFCD97C7F1B78EB
+S3152004499093FC0000301FFFFF7C000110393F000408
+S315200449A07F8B00387D2400787D7C237883DE001479
+S315200449B02C9E00004086FFA848000040807E000010
+S315200449C02C830000418600347FDCF3787C7F1B78BF
+S315200449D0A81F00007C80C800408400143B9F00046C
+S315200449E083FF00042C9F00004086FFE893FB000011
+S315200449F038000000901C00002C9A00004186011CFF
+S31520044A00A81B00087C980000408500204800010C63
+S31520044A10801F000C7FA3EB7830000001901F000C50
+S31520044A2093E30000480000F8AB3D00087F7EDB7866
+S31520044A30837E0004A81B00087C9800007FC0BA78F7
+S31520044A403160FFFF7C0B01104CE623827D2000267B
+S31520044A50552947FE7D2B00394082FFD47FDCF3782D
+S31520044A6083FC00002C9F0000418600A0A81F0000A4
+S31520044A707C80C8004184008441850090881F0003FF
+S31520044A807009000141820040881D000B7009000155
+S31520044A90813F000883C90010418200303C60002712
+S31520044AA0386352E43880000038A0000038C0000083
+S31520044AB038E0000039000000392000004BFD22B9FF
+S31520044AC04800005883DF00087C9ED0004186FF44BE
+S31520044AD07F43D3787FC4F3784BFFF1912C83000076
+S31520044AE0408600287F43D3787FC4F3784BFFFB218D
+S31520044AF02C830000408600143B9F000483FF00049F
+S31520044B002C9F00004086FF68809C00007FA3EB78E2
+S31520044B104BFFFB51907C00007FA3EB78800100447F
+S31520044B20818100147C0803A682C1001882E1001C3E
+S31520044B308301002083210024834100288361002CE3
+S31520044B408381003083A1003483C1003883E1003C93
+S31520044B507D820120382100404E8000209421FFE0F0
+S31520044B607C0802A6934100089361000C93810010EF
+S31520044B7093A1001493C1001893E1001C9001002412
+S31520044B807C7E1B787C9C237883E500007FE4FB787D
+S31520044B904BFFF05D7C7D1B787FBAEB782C9D000063
+S31520044BA07FFBFB7883FB000C88BE0000418600CC8B
+S31520044BB07C85F800418600207C7EFA14809D000CBA
+S31520044BC07CBF28507C84FA144BFD50792C8300003A
+S31520044BD0408600A82C9C00004186003C7F83E37815
+S31520044BE0388000017FE5FB784BFFF6F57C7F1B7947
+S31520044BF041820088839F000C4800001083BD001466
+S31520044C002C9D000041860074801D00107C80E000ED
+S31520044C104086FFEC817D00102C8B000041860170BC
+S31520044C2080BD00002C8500007CA82B78418601607D
+S31520044C30881D000B70090001418200488005000888
+S31520044C407C80E800408600108005000C2C80000043
+S31520044C50408500943C600027386353103880000058
+S31520044C6038A0000038C0000038E0000039000000F9
+S31520044C70392000004BFD210138600000480003D094
+S31520044C80800500087C805800418600483C60002747
+S31520044C90386353103880000038A0000038C0000064
+S31520044CA038E0000039000000392000004BFD20C9FF
+S31520044CB0480000DC800500043D2000289003000005
+S31520044CC080099C9090A99C90900500044800008837
+S31520044CD08005000C3000FFFF2C8000009005000C9E
+S31520044CE0408400AC83DA0004A81D0008A93E00080D
+S31520044CF07C0A00F87C8A4800418500947FDFF3789B
+S31520044D0083DE0004A81E00087C8A00007FE0DA788F
+S31520044D103160FFFF7C0B01104CE623827D200026A8
+S31520044D20552947FE7D2B00394082FFD480BF0000E1
+S31520044D302C8500007FE3FB78418600247C85400097
+S31520044D404186FF743865000480A500042C85000084
+S31520044D504086FFEC2C850000408600343C6000270A
+S31520044D60386353343880000038A0000038C000006F
+S31520044D7038E0000039000000392000004BFD1FF9FF
+S31520044D80881D000B700900014082FEF0881D000B6F
+S31520044D90700900024082FEE4801A00142C80000070
+S31520044DA083DD00044186010C7C9DD00040860028CA
+S31520044DB07C1F037893DF0004801E00107C80E800AB
+S31520044DC04086000C93FE00104800007893FE0014E1
+S31520044DD0480000707F49D3782C8900007D3F4B78AA
+S31520044DE04186003C800900147C80E8004186000C42
+S31520044DF07C0903794082FFF02C890000418600203B
+S31520044E00801D001490090014817D00142C8B000051
+S31520044E1041860030912B0004480000283C6000277E
+S31520044E20386353603880000038A0000038C0000082
+S31520044E3038E0000039000000392000004BFD1F39FE
+S31520044E403BDD0018881E000B70090004418201E432
+S31520044E50801D0018813E0004817E0008815E000CBE
+S31520044E60941F0018913F0004917F0008915F000C65
+S31520044E70801E0010813E0014901F0010913F0014E4
+S31520044E80813E0004800900107C80F0004086000CDE
+S31520044E9093E900104800000893E90014813F0010AC
+S31520044EA093E90004813F001493E900044800018437
+S31520044EB0801E00107C80E8007C1F03784086000852
+S31520044EC083FE0014813E0004800900147C80F000D7
+S31520044ED04086000C93E900144800000893E900106A
+S31520044EE0913F000480BE00002C850000418600DC32
+S31520044EF0A81F00082C8000004184003080BF0000D9
+S31520044F002C8500007FE3FB78418600143865000475
+S31520044F1080A500042C8500004086FFF4801E000036
+S31520044F2090030000480000A43005FFFF7D202910CF
+S31520044F30317FFFFF7C0BF9107D2B00394182006005
+S31520044F40390000003D400028801F00007C850000B9
+S31520044F504086003081250004911F00008005000C46
+S31520044F603000FFFF2C8000009005000C40840010C8
+S31520044F70800A9C9090AA9C90900500047D254B78ED
+S31520044F8083FF00143005FFFF7D202910317FFFFFAA
+S31520044F907C0BF9107D2B00394082FFB02C85000054
+S31520044FA0418600283C600027386353803C800027D4
+S31520044FB0388453907FE6FB7838E0000039000000FF
+S31520044FC0392000004BFD1DB13BFD00187C9EF800E6
+S31520044FD041860060801D0018813F0004817F0008FF
+S31520044FE0815F000C901E0000913E0004917E000813
+S31520044FF0915E000C801F0010817F0014901E00100B
+S31520045000813E0010917E001493C90004813E001451
+S3152004501093C90004813F0004800900107C80F800B5
+S315200450204086000C93C900104800000893C9001458
+S315200450307FA3EB78893D000B88030023712900FBAD
+S315200450409923000B700000FB9803002380010024A1
+S315200450507C0803A6834100088361000C8381001029
+S3152004506083A1001483C1001883E1001C3821002089
+S315200450704E8000209421FFE87C0802A69381000834
+S3152004508093A1000C93C1001093E100149001001C1D
+S3152004509080630000A80300082C8000007C9D2378F0
+S315200450A07CBC2B784184001480630010A80300087C
+S315200450B02C8000004084FFF481630004800B0014DC
+S315200450C07C8018007C7F1B78480000147D635B7805
+S315200450D081630004800B00147C8018004086001035
+S315200450E08803000B700900024182FFE48123000437
+S315200450F0806900144800000880630010A803000893
+S315200451002C8000004084FFF47C7E1B787FE3FB79AF
+S315200451104182002C8803000B7009000283E30014EB
+S315200451204082FFEC7FA803A67F84E3784E8000218B
+S315200451307C631B794082001C4BFFFFD47FC3F3782A
+S315200451408803000B700900024182FF70386000005A
+S315200451508001001C7C0803A68381000883A1000C1F
+S3152004516083C1001083E10014382100184E800020EA
+S315200451709421FFE87C0802A693A1000C93C1001099
+S3152004518093E100149001001C7C7E1B78801E000095
+S315200451902C8000007C9D23784186000C3860000119
+S315200451A0480000F0386000743880000538A00001FB
+S315200451B04800DAB17C7F1B79418200D47FE3FB78F7
+S315200451C0388000744BFD4B5193FE00007FA4EB788E
+S315200451D03D20002880698F5838BF002C4BFFEF35BF
+S315200451E07C661B78397F005C9166001490C60004A7
+S315200451F0380000069806000B7FAAE8F881260010DE
+S31520045200386000019809000BB149000880090000A4
+S31520045210814900048109000880E9000C901F005C84
+S31520045220914B0004910B000890EB000C3D400028A4
+S3152004523081090010800A8F5C81290014900B000CD0
+S31520045240910B0010912B00143D2000243929464847
+S31520045250913F000C3D20002439294A5C913F0014DB
+S315200452603D20002439293DA4913F001C3D200024E3
+S3152004527039293C40913F00203D20002439294F7490
+S31520045280913F002890DF00004800000838600000A5
+S315200452908001001C7C0803A683A1000C83C1001096
+S315200452A083E10014382100184E8000209421FFF059
+S315200452B07C0802A693C1000893E1000C9001001417
+S315200452C03D20002881299CC82C890000418600287D
+S315200452D03D40002881690028800A9C947C8B00002C
+S315200452E040850008916A9C948129001C2C89000021
+S315200452F04086FFE43FC00028807E9C942C830000D7
+S315200453004086002C3C600027386353AC388000006C
+S3152004531038A0000038C0000038E000003900000042
+S31520045320392000004BFD1A51480000A038800005A2
+S315200453301C63000338A000014800D9292C830000EF
+S315200453403FE00028907F8F58408600103C6000275D
+S31520045350386353E04800D88D809E9C94807F8F5874
+S315200453601C8400034BFD49B1801F8F58813E9C94B9
+S315200453703D6000287D404A147C0A4A147C8A0040F9
+S31520045380914B8F5C3D20002890098F54408400184F
+S31520045390392000FF992A0000394A00017C8A0040FE
+S315200453A04184FFF43C60002838639C8C38800000DC
+S315200453B04BFFFDC12C830000408600103C60002773
+S315200453C0386353E84800D81D800100147C0803A6DE
+S315200453D083C1000883E1000C382100104E80002090
+S315200453E09421FFE87C0802A693A1000C93C1001027
+S315200453F093E100149001001C3D2000283800000091
+S3152004540090098F7C39298F7C3FA00028913D8F807D
+S31520045410386000013BBD8F80388000043CA0002802
+S3152004542038A58F884800D8C1907D00048001001CCF
+S315200454307C0803A683A1000C83C1001083E1001419
+S31520045440382100184E8000209421FFE07C0802A613
+S31520045450934100089361000C9381001093A10014DA
+S3152004546093C1001893E1001C900100247C7A1B78D8
+S315200454703B8000003D20002883A98F7C837A000886
+S315200454802C9D0000801B000C3D20002890098F686D
+S31520045490418600EC893D004D2C8900004186001090
+S315200454A0881B00097C890000408600C8813D001CB9
+S315200454B02C89000041860010801B00107C89000086
+S315200454C0408600B0813D00142C89000041860010DE
+S315200454D0801B000C7C890000408600982C9C0000D0
+S315200454E04186008C3D200028806991D47F44D3785E
+S315200454F038A000003CC03B9A60C6CA0038E00001D0
+S315200455004BFFE00D7C7F1B79418200643BDC00501D
+S315200455107FC3F3783C80002838848F647FE5FB784A
+S3152004552038C000004800CD3D2C8300004086001082
+S315200455307FE3FB784BFFDB75480000347F83E378F9
+S315200455407FC4F37838A000004800C93D801C00D0F1
+S315200455502C800000418600187C0803A67F83E3780C
+S31520045560808300D438A000014E800021839D00242E
+S3152004557083BD00002C9D00004086FF1C2C9C00004F
+S31520045580418600683BFC00507FE3FB783C80002882
+S3152004559038848F647F45D37838C000004800CCC552
+S315200455A02C830000408600107F43D3784BFFDAFD1E
+S315200455B0480000607F83E3787FE4FB7838A000000E
+S315200455C04800C8C5801C00D02C80000041860044B9
+S315200455D07C0803A67F83E378808300D438A0000167
+S315200455E04E8000214800002C7F43D3784BFFDABD40
+S315200455F03D600028396BD700800B0030812B0034A6
+S3152004560030000001900B00303929FFFF912B003424
+S31520045610800100247C0803A6834100088361000CD2
+S315200456208381001083A1001483C1001883E1001C28
+S31520045630382100204E8000209421FFE87C0802A611
+S3152004564093A1000C93C1001093E100149001001C57
+S3152004565083E400087CBD2B78813F0040A00400022F
+S31520045660712B0008540006F6600000207C1E0734C7
+S31520045670408200A48123001C816300088009000065
+S315200456807C005850288000134085001C392BFFECE1
+S315200456908003000C91230008300000149003000CB2
+S315200456A0480000103880001438A0000048009CE10F
+S315200456B02C8300004186007C8803001170090002B7
+S315200456C04182001080030018300000149003001853
+S315200456D08143000838000000980A000138000000C1
+S315200456E0B00A0006881F004D980A0009A003001A74
+S315200456F03D200028B00A0002817F001C88098DF312
+S3152004570093AA0010980A0008916A000C809F0058FA
+S31520045710480000688003000C288000134185001C83
+S315200457203880001448009EC97C631B794082000C93
+S31520045730386000374800005481430008A00A00045A
+S315200457402C800000408600183D200028A1699C7CFE
+S31520045750380B0001B0099C7CB16A00043880000033
+S315200457603D2000283929D7008009005C63DE000229
+S31520045770300000019009005C38BF002C80FF005CDB
+S315200457807FC6F3784BFF9BED8001001C7C0803A6A3
+S3152004579083A1000C83C1001083E100143821001872
+S315200457A04E8000209421FFE87C0802A693A1000CD9
+S315200457B093C1001093E100149001001C7CA52B7961
+S315200457C07C8923787CFF3B7883C9000841820024A6
+S315200457D02C83000140860014807F00002C83000067
+S315200457E0418600084BFFD885386000164800010022
+S315200457F02C8600024186001C418400CC2C86006B3A
+S31520045800418500C42C860064418400BC480000D035
+S315200458102C8300013BA0000040860060813F0000ED
+S315200458202C890000418600108009000C2880000382
+S315200458304185000C3BA000164800002C8129000855
+S31520045840800900002C80000041860010801E004044
+S31520045850600000084800000C801E004054000776B3
+S31520045860901E0040807F00002C830000418600505B
+S315200458704BFFD7F948000048386000003880000AFA
+S3152004588038A0008038C000014800993D2C830000D0
+S31520045890907F00004086000C3BA000374800002083
+S315200458A0380000049003000C813F0000801E004055
+S315200458B08129000854000738900900007FA3EB785B
+S315200458C04800002C2C860063418500147D244B78E7
+S315200458D07FE7FB784BFFA571480000147CC433781E
+S315200458E07D254B787FE6FB784800030D8001001C5C
+S315200458F07C0803A683A1000C83C1001083E1001455
+S31520045900382100184E8000209421FFE07C0802A64E
+S315200459109361000C9381001093A1001493C1001885
+S3152004592093E1001C900100247C7D1B787CBB2B78A2
+S315200459307CDE33782C84000B7CE63B783BE000004D
+S31520045940839D0008408600147F64DB787FC5F37846
+S315200459504BFF4A514800027C288400114185025499
+S315200459603D200024392958845480103A7C09002E7D
+S315200459703D200024392958847C004A147C0903A636
+S315200459804E80042000000048000000C8000000E803
+S31520045990000002040000014000000204000000B4DC
+S315200459A00000019C00000204000001A8000000C0C1
+S315200459B00000022C000001FC000002040000020486
+S315200459C00000020C0000021C000002042C9C0000B3
+S315200459D0418600103C600027386353F44800D20502
+S315200459E0A01D0006700900804082000C3BE0000DDB
+S315200459F0480001CC3D20002880898F743D20002852
+S31520045A0080A98F787FA3EB784800C4D57C7F1B7947
+S31520045A10408201AC7FA3EB783C80002838848F80B9
+S31520045A2048016C6D7C7F1B7940820194839D00081C
+S31520045A309BDC004D48000188A01D00067009000269
+S31520045A40418201187FA3EB784800BEA52C9C000058
+S31520045A50408600103C600027386354004800D185F6
+S31520045A607F83E3784801729148000154801E000C1C
+S31520045A702C80001083DE00084086005C3D20002830
+S31520045A8080099C5C2C80000041860064881E0001ED
+S31520045A903000FFFE2880000141850054801E00044A
+S31520045AA02C800000418600147FC3F3784BFF0A89BB
+S31520045AB02C83000041860038801E0004901C001CA4
+S31520045AC0480000FC801E000C2C800010807E0008FC
+S31520045AD04186000C3BE00016480000E43D200028E7
+S31520045AE080099C5C2C8000004086000C3BE0003141
+S31520045AF0480000CC880300013000FFFE2880000106
+S31520045B004085000C3BE0002F480000B480030004CD
+S31520045B107FA3EB78901C00144800BC61480000A0C9
+S31520045B207FA3EB784800C11948000094A01D000605
+S31520045B30700900024182001C2C9E00004186000C44
+S31520045B403BE000384800007880BC00144800001C64
+S31520045B502C9E00004086000C3BE000394800006083
+S31520045B60813E000880A900047F63DB787FA4EB785C
+S31520045B704BFFFAC97C7F1B783B600000480000403D
+S31520045B80386000004800004C3BE0002D48000030FF
+S31520045B907F83E3787FC4F37848017211480000209C
+S31520045BA07F83E3787FC4F378480172794800001034
+S31520045BB03C6000273863540C4800D0292C9B0000F5
+S31520045BC04186000C7F63DB784BFFD4E17FE3FB78CF
+S31520045BD0800100247C0803A68361000C83810010C5
+S31520045BE083A1001483C1001883E1001C38210020FE
+S31520045BF04E8000209421FFF07C0802A693C1000861
+S31520045C0093E1000C900100147CDE33797CAB2B7875
+S31520045C103BE000164082000C386000164800005015
+S31520045C202C830001408600343D20002880098F0CF7
+S31520045C302C800000418600207C0803A67C832378E0
+S31520045C4080BE00007D645B784E8000217C7F1B78BB
+S31520045C50480000083BE0002D807E00002C830000D5
+S31520045C60418600084BFFD4057FE3FB7880010014AE
+S31520045C707C0803A683C1000883E1000C38210010A8
+S31520045C804E8000209421FF907C0802A69321005484
+S31520045C90934100589361005C9381006093A1006452
+S31520045CA093C1006893E1006C900100747C7F1B789B
+S31520045CB038000000900100403800000298010009D5
+S31520045CC0B081000A7CBB2B787CDA33787CF93B786C
+S31520045CD07D1C43784BFEF9D92C83FFFF3BA00000A3
+S31520045CE09061000C408600187FE3FB784BFF58D563
+S31520045CF02C83FFFF9061000C4186020C3861004022
+S31520045D004800023D7C7F1B782C9FFFFF418601F8CB
+S31520045D103881000838A000104800E5892C83FFFF4D
+S31520045D20408600247FE3FB784BFCF7513BBD000102
+S31520045D30800100402C9D00053000FFFF90010040AB
+S31520045D404085FFBC2C9D0005418501BC2C9C000090
+S31520045D50408600247FE3FB783C800027388454184F
+S31520045D6038A0000138C000004800E74D9381004068
+S31520045D70480000AC80010040386100443000FFFF39
+S31520045D809001004090010044480001B57C7E1B78B8
+S31520045D902C9EFFFF4086000C7FE3FB7848000164BD
+S31520045DA07FC3F378388000014800E3B13BA1002883
+S31520045DB07FA3EB7880A100443C8000273884541CC0
+S31520045DC04BFD6C617FA3EB784BFCD99538A300017E
+S31520045DD07FE3FB787FA4EB7838C000004800E6D93F
+S31520045DE038000010900100487FC3F37838810018EA
+S31520045DF038A100484800E3F12C83FFFF907C000083
+S31520045E00408600147FE3FB784BFCF6717FC3F3785E
+S31520045E10480000F07FC3F3784BFCF6617F63DB78A0
+S31520045E204BFCD93D38A300017FE3FB787F64DB7804
+S31520045E3038C000004800E6817F43D3784BFCD92143
+S31520045E4038A300017FE3FB787F44D37838C0000071
+S31520045E504800E6657F23CB784BFCD90538A300019F
+S31520045E607FE3FB787F24CB7838C000004800E649DE
+S31520045E702C830000408500787FE3FB783BC1004CEF
+S31520045E807FC4F37838A0000138C000004800E83DFC
+S31520045E902C830000408500588801004C2C8000008B
+S31520045EA04186006C7FDDF3787FE3FB787FA4EB7873
+S31520045EB038A0000138C000004800E8112C830001F6
+S31520045EC040860020386000027FA4EB7838A00001C9
+S31520045ED04BFCF68D8801004C2C80000A4086FFCCB2
+S31520045EE03C600025606300024BFCE8257FE3FB78D9
+S31520045EF04BFCF5892C9C00004186000C807C00001C
+S31520045F004BFCF5793860FFFF480000087FE3FB78F7
+S31520045F10800100747C0803A6832100548341005821
+S31520045F208361005C8381006083A1006483C100686F
+S31520045F3083E1006C382100704E8000209421FFE01C
+S31520045F407C0802A693C1001893E1001C900100244A
+S31520045F507C7E1B7838000002980100093800000076
+S31520045F609001000C38600002A01E00023880000157
+S31520045F7038A00000B001000A4800E0957C7F1B7819
+S31520045F802C9FFFFF418600287FE3FB783881000899
+S31520045F90480001CD2C83000041840014A001000A8E
+S31520045FA07FE3FB78901E0000480000083860FFFF5E
+S31520045FB0800100247C0803A683C1001883E1001C09
+S31520045FC0382100204E8000209421FFF07C0802A670
+S31520045FD093E1000C900100147C631B797C9F237849
+S31520045FE0418200103C80002838848F944BFCD73D96
+S31520045FF02C9F0000418600147FE3FB783C80002818
+S3152004600038848FF84BFCD725800100147C0803A61E
+S3152004601083E1000C382100104E8000209421FFF0EB
+S315200460207C0802A693C1000893E1000C9001001499
+S315200460307C7F1B797C9E2378418200147FE3FB7846
+S315200460404BFCD71D288300634185001C2C9E000031
+S31520046050418600287FC3F3784BFCD7052883006349
+S31520046060408500183C600025606300034BFCE6A1D4
+S315200460703860FFFF480000582C9F0000408600141B
+S315200460803D2000283800000098098F944800001409
+S315200460903C60002838638F947FE4FB784BFCD68DD4
+S315200460A02C9E0000408600143D2000283800000065
+S315200460B098098FF8480000143C60002838638FF84C
+S315200460C07FC4F3784BFCD665386000008001001449
+S315200460D07C0803A683C1000883E1000C3821001044
+S315200460E04E8000209421FFF87C0802A69001000C23
+S315200460F04BFFFF2D2C8300004086000C38600000E7
+S31520046100480000143C600027386354204BFD652169
+S315200461103860FFFF8001000C7C0803A638210008A4
+S315200461204E8000209421FF907C0802A690010074E2
+S3152004613038610008388000004BFFFE913C60002740
+S3152004614038635440388100084BFD6475800100741F
+S315200461507C0803A6382100704E8000209421FFD8A5
+S315200461607C0802A69381001893A1001C93C10020E9
+S3152004617093E100249001002C7C9E23797C7C1B785F
+S3152004618041820018881E00012C80000241860024CA
+S315200461903860002E4800009C3BC100087FC3F3787A
+S315200461A0388000104BFD3B7138000002981E000118
+S315200461B0A01E00022C800000408600103D200028EE
+S315200461C0A0098F92B01E0002A3FE00027FFDFB7879
+S315200461D03BFFFFFF2C9F02707C000026540037FEF5
+S315200461E07C0000D07C0900F8552905BE7FE00038E4
+S315200461F07C1F4B787C9FE80041860030B3FE00026A
+S315200462007F83E3787FC4F37838A000104800DEB19A
+S315200462102C83FFFF4186FFBC3D20002893E98F9005
+S3152004622038600000480000143C60002560630001CB
+S315200462304BFCE4DD3860FFFF8001002C7C0803A6BC
+S315200462408381001883A1001C83C1002083E10024DC
+S31520046250382100284E8000209421FFF07C0802A6D5
+S3152004626093C1000893E1000C900100143D200028FE
+S3152004627083E99CC82C9F00007C7E1B7841860034D1
+S31520046280801F00202C8000004186001C7C0803A669
+S31520046290807F0000809F00245463103A7C7E1A1469
+S315200462A04E80002183FF001C2C9F00004086FFD4D3
+S315200462B0800100147C0803A683C1000883E1000C36
+S315200462C0382100104E8000209421FFF87C0802A675
+S315200462D09001000C4BFFEFD93C6000283863D7A40B
+S315200462E04BFFFF79386000008001000C7C0803A670
+S315200462F0382100084E8000209421FFF07C0802A655
+S3152004630093E1000C900100147C7F1B78813F0000F0
+S315200463102C8900004186001C8009003C2C8000004A
+S3152004632041860010A009003470090001408200143F
+S31520046330387F0004388000014800001D907F00004B
+S31520046340800100147C0803A683E1000C3821001088
+S315200463504E8000209421FFA07C0802A692E1003CF6
+S315200463609301004093210044934100489361004CDB
+S315200463709381005093A1005493C1005893E1005C8B
+S31520046380900100647C7E1B787C9923783800000079
+S31520046390897E0001900100303B8000003B400007CD
+S315200463A03BA000003D2000283929D7A4556B103A7C
+S315200463B07F6B482E4800C6297C771B788B1E0003EA
+S315200463C02C9B0000418600B0801B001C7C0803A681
+S315200463D07FC3F3787F64DB784E8000217C631B794E
+S315200463E0418200948803000B7009000240820088D1
+S315200463F02C9900007C7F1B7893E10030418600684D
+S31520046400A01F0034700901004182005C3860000B33
+S315200464107FC4F37838A0000038C0000038E00000BC
+S3152004642039010030480006557C7C1B7941820018CE
+S31520046430A01F003693E1003030000001B01F003663
+S315200464404800004883E100302C9F00004186007CF0
+S31520046450A01F003470090200418200703B40000BEB
+S3152004646048000028A01F003630000001B01F003667
+S31520046470480000583D2000283929D820A0090006C4
+S3152004648030000001B00900062C9900004186003C2A
+S3152004649038610008388000244BFD387D3D200028D3
+S315200464A080098F142C80000093C1000C4186001CA7
+S315200464B07F43D3787C0803A63881000838A00000DF
+S315200464C07F86E3784E800021881E00032C800000FE
+S315200464D04186001C38000000981E000383A100306A
+S315200464E038000000900100304BFFFED82C9D0000A0
+S315200464F041860074806100302C830000418600446C
+S31520046500813D00108163001081290004800B000462
+S315200465107C8900004186002CA12300367D20073487
+S315200465202C8000014185000C480000814800000CA5
+S315200465303809FFFFB003003693A100304800002835
+S31520046540A13D00367D2007342C80000141850010B2
+S315200465507FA3EB78480000554800000C3809FFFF5C
+S31520046560B01D00369B1E00037EE3BB784800C54160
+S3152004657080610030800100647C0803A682E1003C2F
+S315200465808301004083210044834100488361004CF9
+S315200465908381005083A1005483C1005883E1005CA9
+S315200465A0382100604E8000209421FFF07C0802A64A
+S315200465B093E1000C900100147C7F1B79408200102B
+S315200465C03C600027386354444800C619A01F00368F
+S315200465D03000FFFF7C0907342C890000B01F0036E9
+S315200465E0418500A0A01F0034700900014082009458
+S315200465F0881F000B70090006418200103C600027AA
+S315200466003863544C4800C5DD3D600028A93F003658
+S31520046610800B9C982C8900003000FFFF900B9C98DF
+S315200466204084002C3C600027386354587FE4FB7870
+S3152004663038A0000038C0000038E00000390000000F
+S31520046640392000004BFD073148000038807F004088
+S31520046650A123001A7D2007342C8000004185000CDC
+S315200466604BFF04394800000C3809FFFFB003001A19
+S31520046670807F000C4800C6457FE3FB784800C63D72
+S31520046680800100147C0803A683E1000C3821001045
+S315200466904E8000209421FFA87C0802A692C10030D7
+S315200466A092E10034930100389321003C9341004049
+S315200466B0936100449381004893A1004C93C10050F8
+S315200466C093E100549001005C7C791B787C9A2378B2
+S315200466D07CB62B787CDD33787CF83B787D17437841
+S315200466E07F43D3784BFEFFCD7C7B1B793BC00000D8
+S315200466F03B8000004082000C3BC00033480001640C
+S315200467007F23CB78388000004BFFFC4D7C7F1B78A1
+S315200467106BA000405400D7FE317FFFFF7D2BF9107C
+S315200467207C0B483941820030809F003088B80000B5
+S315200467307F03C3784BFD350D2C8300004086001063
+S31520046740801F00407C80D8004186000C3BC0001688
+S31520046750480000247F43D3784BFEFDDD3063FFFFE2
+S315200467607C6319107C6018F8700000417FC31838C8
+S315200467707C7E03782C9E0000408600B82C9F000067
+S3152004678041860038813F00102C8900004186001084
+S31520046790880900002880000140850020A13F00349C
+S315200467A07120000241820088712000044082003C4E
+S315200467B073A000044182003463BD001238600001D6
+S315200467C07F24CB787F45D3787EC6B3787FA7EB78B2
+S315200467D039000000480002A57C7E1B783D20002855
+S315200467E03B89D8224800004C63BD00203D20002868
+S315200467F03B89D8247FE3FB787F45D378A01F0034D8
+S31520046800809F000C60000020B01F00344800067DE5
+S315200468104BFE26E53D2000288009905C907F0050A1
+S31520046820300000019009905C480000083BC00041FC
+S315200468302C9F00004186002C3017FFFF7D20B910C5
+S31520046840217E00007C0BF1147D2B00394182000C43
+S3152004685093F700004800000C7FE3FB784BFFFD4DC7
+S315200468602C9E0000418600183D200028A009D8202F
+S3152004687030000001B009D820480000182C9C0000E4
+S3152004688041860010A01C000030000001B01C00004E
+S3152004689038610008388000244BFD347D3D200028D3
+S315200468A080098F149321000C2C8000009341001042
+S315200468B092C10014930100244186001C386000060E
+S315200468C07C0803A6388100087FA5EB787FC6F37879
+S315200468D04E8000217FC3F3788001005C7C0803A6E8
+S315200468E082C1003082E10034830100388321003CD8
+S315200468F083410040836100448381004883A1004C86
+S3152004690083C1005083E10054382100584E80002072
+S315200469109421FFD87C0802A693A1001C93C10020D1
+S3152004692093E100249001002C7C7D1B783C007FCBD6
+S3152004693060008DF67C1D0214288000017C85237856
+S315200469403BE100084085000C386000164800011021
+S315200469503C0080346000720A7FA002787C09FE70B5
+S315200469607D2002787C0048507C00FE70540907BCC8
+S31520046970300000017D3D03787FE3FB7838800010EA
+S315200469807CBE2B784BFD3391817E00082C8B000036
+S31520046990418600B0380000022C8B0000981F0001AD
+S315200469A03800000898010008418400143C00FF00C8
+S315200469B0901F0004556B000E4800005055600002DD
+S315200469C03D2080007C804800408600143C00FFFF68
+S315200469D0901F0004556B001E4800003055600004CB
+S315200469E03D20C0007C804800408600143800FF000B
+S315200469F0901F0004556B002E480000103C00F00048
+S31520046A00901F0004556B00063D20002881299C8098
+S31520046A102C89000041860024800900207C8B0000FC
+S31520046A204086000C8009002C901F00048129003424
+S31520046A302C8900004086FFE47FE3FB784BFF387502
+S31520046A407FA3EB78389E000438BE00147FE6FB78DB
+S31520046A50A8FE002439000000480000218001002CF3
+S31520046A607C0803A683A1001C83C1002083E10024A3
+S31520046A70382100284E8000209421FFB87C0802A6E5
+S31520046A809281001892A1001C92C1002092E1002458
+S31520046A90930100289321002C934100309361003404
+S31520046AA09381003893A1003C93C1004093E10044B4
+S31520046AB09001004C7C751B787C9A23787CB72B78C4
+S31520046AC07CDD33787CFE3B787D1943784800BF1102
+S31520046AD03D200028881A00013929D7A45400103AE9
+S31520046AE07EC9002E2C9600003B0000007C741B7887
+S31520046AF04186006873C000047C00002654001FFEF3
+S31520046B007C0000D07FBD00394182000C3800001F74
+S31520046B10981D00032C950002418600204185001013
+S31520046B202C95000141860170480003142C95000B16
+S31520046B304186011048000308801600147C0803A629
+S31520046B407F43D3787FA4EB787EC5B3784E8000212B
+S31520046B507C7E1B794082000C3B000003480002E047
+S31520046B60881E000B70090006418200103C60002735
+S31520046B703863547C4800C06D7FDFF378813F004C36
+S31520046B80A01F00342C8900005400043CB01F00349C
+S31520046B90418600387D3F4B78A13F00367D2007345F
+S31520046BA02C800001418500107FE3FB784BFFF9FD23
+S31520046BB04800000C3809FFFFB01F00367FDFF3784A
+S31520046BC038000000901F004C839F00402C9C00003E
+S31520046BD041860024801C00142C8000004186001865
+S31520046BE07C0803A6386000027FE4FB7838A0000006
+S31520046BF04E8000213D20002880099C982C99000075
+S31520046C003000000190099C984186000C93F90000FD
+S31520046C1048000024A13F00367D2007342C80000044
+S31520046C204185001438090001B01F00367FE3FB7844
+S31520046C304BFFF9793D2000288009905C480001F833
+S31520046C402C9900004186001083F900002C9F000037
+S31520046C504086000C3B000016480001E4839F004058
+S31520046C6082FF0030A81F003483BF0044541E062C24
+S31520046C707FA9FE707D20EA787C0048507C00FE7057
+S31520046C8063C900047FCB00387D2000787D7E03789D
+S31520046C90480000247FC3F3787F44D3787EE5BB780D
+S31520046CA04BFEFCE97C7C1B794082000C3B000033C4
+S31520046CB04800018C386000803880000538A0000127
+S31520046CC04800BFA17C7F1B794082000C3B00003723
+S31520046CD04800016C7FE3FB78388000804BFD303917
+S31520046CE063C00001B01F00347FE3FB787F44D37870
+S31520046CF07EE5BB78480001952C830000418600146C
+S31520046D007FE3FB784800BFB53B00003748000130DD
+S31520046D102C9D0000837F000C418600187F43D37886
+S31520046D207F64DB787FA5EB784800030D48000014C8
+S31520046D307F43D37888BA00007F64DB784BFCA54D6B
+S31520046D407EC5B3788005000C7C0803A67F63DB78B8
+S31520046D507FA4EB787FE6FB784E8000212C950001FA
+S31520046D607C7E1B7840860018881700012C80000240
+S31520046D704086000C881A0002981B00022C9E0000F4
+S31520046D804086002C807F004C2C830000418600081E
+S31520046D904BFFF819807F000C3B0000114800BF1DF3
+S31520046DA07FE3FB784800BF1548000094A01C001A16
+S31520046DB02C95000B30000001B01C001A939F004054
+S31520046DC0801C000C901F003C40860018387F00541D
+S31520046DD08099000038A00024388400544BFCC82530
+S31520046DE0801C00142C800000418600242C9900006D
+S31520046DF038A000004186000880B900007C0803A65C
+S31520046E007EA3AB787FE4FB784E8000212C9900008A
+S31520046E104186001493F90000A01F003630000001BB
+S31520046E20B01F00364BFE20D13D2000288009905CFF
+S31520046E30907F0050300000019009905C7E83A378F7
+S31520046E404800BC6D7F03C3788001004C7C0803A6F0
+S31520046E508281001882A1001C82C1002082E10024C4
+S31520046E60830100288321002C834100308361003470
+S31520046E708381003883A1003C83C1004083E1004420
+S31520046E80382100484E8000209421FFD87C0802A691
+S31520046E90930100089321000C934100109361001480
+S31520046EA09381001893A1001C93C1002093E1002430
+S31520046EB09001002C7C992378881900002C800000EE
+S31520046EC07C781B787CBA2B78418600143000FFFF2F
+S31520046ED06000000333600001480000083B600004A2
+S31520046EE0881A00002C800000418600143000FFFF21
+S31520046EF06000000333A00001480000083BA0000402
+S31520046F007F1EC378813E00302C89000041860030E4
+S31520046F10880900002C8000004186001C3000FFFFF9
+S31520046F2060000003300000017C9D00404185001074
+S31520046F3048000038289D000440850030839E000CBC
+S31520046F407C7BEA143880000538A000014800BD1572
+S31520046F507C7F1B794082000C38600001480000A821
+S31520046F6093FE000C4800000C83FE000C3B800000BE
+S31520046F707C9FDA14909E00307F43D3787FA5EB78EC
+S31520046F804BFCA3092C9C00004186001C7F23CB7854
+S31520046F907FE4FB787F65DB784BFCA2F17F83E37883
+S31520046FA04800BD19801E004C2C8000004186003804
+S31520046FB07C1E0378A13E00367D2007342C800001F8
+S31520046FC0418500107FC3F3784BFFF5E14800000CA0
+S31520046FD03809FFFFB01E00367F1EC3783800000034
+S31520046FE0901E004CA01E0034700900024182001439
+S31520046FF07F43D378388000014BFFF35D907E004CAD
+S31520047000386000008001002C7C0803A68301000858
+S315200470108321000C834100108361001483810018AE
+S3152004702083A1001C83C1002083E100243821002889
+S315200470304E8000209421FFF87C0802A69001000CC3
+S315200470407C6A1B787C83237888050000892A0000C3
+S315200470507D630214992300007C891A147C0B20106A
+S315200470607C0001107C0003B87D6B00387C8000789E
+S315200470708D2A00017D6B03789D230001386300016E
+S315200470807C83584038A50002394A000140840028F0
+S31520047090880A0000892500007C00483898030000EF
+S315200470A0386300017C83584038A50001394A000121
+S315200470B04184FFE07C8320404084000C7C83205064
+S315200470C04BFD2C558001000C7C0803A638210008B2
+S315200470D04E8000209421FFD87C0802A693410010FC
+S315200470E0936100149381001893A1001C93C100207E
+S315200470F093E100249001002C7C7C1B787CBB2B78AC
+S31520047100736000047C9A23783BC0000093C1000876
+S315200471104182000C83BC00044800000883BC0000A4
+S315200471202C9A0002408600B0736000044082004816
+S31520047130801C00082C8000004186003C386000003A
+S315200471403880000838A0008038C0000148008079C3
+S315200471507C7E1B794082000C386000374800022868
+S315200471607FA3EB7883BE000880BC00087FA4EB785D
+S315200471704BFFFEC57FA3EB78388000004BFFF1D987
+S315200471807C7F1B7941820050801F0040A13F00363E
+S315200471907C80E0003929FFFFB13F00364186003864
+S315200471A02C9E00004186000C7FC3F3784BFFBEBDA6
+S315200471B0736000047C60002654631FFE7C6300D049
+S315200471C07C6018F870000041706300337C63037898
+S315200471D0480001B47F43D3787FA4EB7839010008B3
+S315200471E080BC0000A0FC001880DC00087F673B7888
+S315200471F04BFFF8892C9E00007C7D1B784186000C71
+S315200472007FC3F3784BFFBE656B490002200900005B
+S315200472107D204914217D00007C0BE9147D2B003947
+S315200472204182005883E100082C9F00004186004CCF
+S315200472303D20002880098F1C2C8000004186001CDC
+S315200472407F43D3787C0803A67F84E3787FA5EB78F5
+S315200472507FE6FB784E800021A13F00367D2007344F
+S315200472602C8000004185001438090001B01F003627
+S315200472707FE3FB784BFFF3356B49000120090000BF
+S315200472807D204914217D00007C0BE9147D2B0039D7
+S31520047290418200F083E100082C9F0000418600E42F
+S315200472A080BF0040A01F00367C85E0003000FFFF31
+S315200472B0B01F0036418600A43C60002738635490F2
+S315200472C07F84E37838C0000038E0000039000000ED
+S315200472D0392000004BFCFAA1813F004080090014AC
+S315200472E02C800000418600187C0803A63860000222
+S315200472F07FE4FB7838A000004E800021807F004088
+S31520047300A123001A7D2007342C8000004185000C1F
+S315200473104BFEF7894800000C3809FFFFB003001A1A
+S31520047320939F0040801C000C901F003C813C00145D
+S31520047330A01C001A2C89000030000001B01C001A81
+S31520047340418600187D2803A6386000017FE4FB7877
+S3152004735038A000004E8000213D20002880098F1C83
+S315200473602C8000004186001C7F43D3787C0803A62A
+S315200473707F84E37880C100087FA5EB784E800021C6
+S315200473807FA3EB788001002C7C0803A683410010A0
+S31520047390836100148381001883A1001C83C100200B
+S315200473A083E10024382100284E8000209421FFF810
+S315200473B07C0802A69001000C3CA0803460A5720AC9
+S315200473C0480001198001000C7C0803A63821000816
+S315200473D04E8000209421FFB07C0802A693810040B1
+S315200473E093A1004493C1004893E1004C90010054BA
+S315200473F07C7C1B787C9F23784BFEE2B57C7D1B78B6
+S315200474002C9DFFFF408600187F83E3784BFF41B510
+S315200474107C7D1B782C9DFFFF4186002C7FE3FB7827
+S315200474204BFEE28D7C651B782C85FFFF4086002071
+S315200474307FE3FB784BFF418D7C651B782C85FFFF12
+S315200474404086000C3860FFFF480000483861000879
+S315200474507FA4EB7838C00000480001B538600002EC
+S315200474603880000338A000004800CBA57C7C1B781C
+S315200474703C8080346084720A38A100084BFCE10108
+S315200474807C7D1B787F83E3784BFCDFF17FA3EB784D
+S31520047490800100547C0803A68381004083A1004414
+S315200474A083C1004883E1004C382100504E800020DF
+S315200474B09421FFF87C0802A69001000C3CA080349D
+S315200474C060A5720B480000158001000C7C0803A6F9
+S315200474D0382100084E8000209421FFE87C0802A66B
+S315200474E09381000893A1000C93C1001093E100142A
+S315200474F09001001C7C7E1B787C9D23787CBC2B7899
+S315200475004BFEE1AD7C7F1B782C9FFFFF4086001845
+S315200475107FC3F3784BFF40AD7C7F1B782C9FFFFF06
+S315200475204186002C7FA3EB784BFEE1857C641B7897
+S315200475302C84FFFF408600207FA3EB784BFF4085F9
+S315200475407C641B782C84FFFF4086000C3860FFFF88
+S31520047550480000107FE3FB787F85E3784800002508
+S315200475608001001C7C0803A68381000883A1000CEB
+S3152004757083C1001083E10014382100184E800020B6
+S315200475809421FFB07C0802A69381004093A1004475
+S3152004759093C1004893E1004C900100547C601B7811
+S315200475A07C8923787CBD2B78386100087C04037899
+S315200475B07D254B7838C0000148000055386000020C
+S315200475C03880000338A000004800CA457C7C1B781C
+S315200475D07FA4EB7838A100084BFCDFA57C7D1B78C3
+S315200475E07F83E3784BFCDE957FA3EB788001005400
+S315200475F07C0803A68381004083A1004483C10048FC
+S3152004760083E1004C382100504E8000209421FFD085
+S315200476107C0802A693210014934100189361001C50
+S315200476209381002093A1002493C1002893E1002C88
+S31520047630900100347C7E1B787C9923787CBA2B7845
+S315200476407CDB3378388000344BFD26CD3BFE0004AA
+S315200476507FE3FB78388000104BFD26BD3B8000027B
+S315200476609B9F00013BA000109BBE0004933F000497
+S315200476703BFE00147FE3FB78388000104BFD2699EF
+S315200476809B9F00019BBE00142C9B0000935F00046B
+S3152004769038000001B01E00244186002493210008EE
+S315200476A0386100084BFF2C512C83000041860010C2
+S315200476B0A01E002460000004B01E0024387E00149E
+S315200476C04BFEEE752C83000040860010A01E00247D
+S315200476D060000002B01E0024800100347C0803A64A
+S315200476E083210014834100188361001C83810020B8
+S315200476F083A1002483C1002883E1002C3821003093
+S315200477004E8000209421FFE07C0802A69361000CA1
+S315200477109381001093A1001493C1001893E1001CD7
+S31520047720900100247C9F23787CBD2B787CDC3378E5
+S315200477307CFB3B784BFF3E8D7C7E1B782C9EFFFF8B
+S31520047740418600187FE3FB784BFF3E797C641B78E7
+S315200477502C84FFFF4086000C3860FFFF4800001C85
+S315200477607FC3F3787FA5EB787F86E3787F67DB7822
+S315200477703900000148000239800100247C0803A650
+S315200477808361000C8381001083A1001483C1001837
+S3152004779083E1001C382100204E8000209421FFA87C
+S315200477A07C0802A69321003C934100409361004447
+S315200477B09381004893A1004C93C1005093E1005457
+S315200477C09001005C7C7D1B787C9C23787CFE3B7836
+S315200477D07CBF2B797CDA33787D1B43787D394B78D3
+S315200477E04182000C73C000044082015C38610008A9
+S315200477F0388000104BFD2521386100183880001090
+S315200478004BFD251538610028388000104BFD2509CD
+S315200478102C9F0000418600107FA0F8389001000CB0
+S315200478204800000893A1000C9381001C3800000234
+S3152004783098010029980100199801000938000010C0
+S31520047840980100289801001898010008386100184A
+S315200478504BFEECE57C69FE707D201A787C0048504E
+S315200478607C00FE7063C900027FCB00387D27007838
+S315200478707D7E3B787FE0F8F87C09FE707D200278D7
+S315200478807C0048507C00FE7063C900027FCB003820
+S315200478907D2700787D7E3B7893E1002C3800001FFD
+S315200478A09801002B3B8100287F83E3784BFF2A0530
+S315200478B09B41000B9B61000A3D20002883A9D7AC7D
+S315200478C04800B11D801D00207C7F1B787C0803A600
+S315200478D0386100087F84E3787FA5EB784E80002109
+S315200478E07C631B79418200688163000C3D2000285B
+S315200478F0880B0002392990607D6900AE7C1B48AE56
+S315200479007C8B0040408500147FE3FB784800B1A1BE
+S31520047910386000004800006C7FE3FB784800B19192
+S31520047920386000023881000838A000007F86E3789A
+S315200479307FC7F378390000004BFFF1412C83000008
+S31520047940418600143860FFFF480000387FE3FB7847
+S315200479504800B15D386000013881000838A100185C
+S3152004796038C100287FC7F3787F28CB784BFFF10DE9
+S315200479707C60FE707C031A787C6300507C63FE7006
+S315200479808001005C7C0803A68321003C83410040DF
+S31520047990836100448381004883A1004C83C1005045
+S315200479A083E10054382100584E8000209421FFF8AA
+S315200479B07C0802A69001000C392000004BFFFDE153
+S315200479C08001000C7C0803A6382100084E80002084
+S315200479D09421FFA87C0802A69321003C93410040F1
+S315200479E0936100449381004893A1004C93C10050B5
+S315200479F093E100549001005C7C7E1B787C9C237868
+S31520047A007CBD2B797CFF3B787CDA33787D194378EF
+S31520047A104182001473E000044182000C3860FFFFA9
+S31520047A204800015438610008388000104BFD22E9D3
+S31520047A3038610018388000104BFD22DD386100289B
+S31520047A40388000104BFD22D12C9D00004186001069
+S31520047A507FC0E8389001000C4800000893C1000C50
+S31520047A609381001C3800000298010029980100190E
+S31520047A709801000938000010980100289801001880
+S31520047A80980100083B6100187F63DB784BFEEAA966
+S31520047A907C69FE707D201A787C0048507C00FE703C
+S31520047AA063E900027FEB00387D2700787D7F3B78F1
+S31520047AB093A1002C3800001F9801002B3BC10028FD
+S31520047AC07FC3F3784BFF27ED7FA0E8F87C09FE708F
+S31520047AD07D2002787C0048507C00FE7063E9000219
+S31520047AE07FEB00387D2700787D7F3B789B41000B18
+S31520047AF03D20002883A9D7AC4800AEE5801D002090
+S31520047B007C7C1B787C0803A6386100087FC4F37844
+S31520047B107FA5EB784E8000217C631B79418200147B
+S31520047B208123000C880900027C80C8004186001449
+S31520047B307F83E3784800AF79386000004800003836
+S31520047B407F83E3784800AF693860000238810008F3
+S31520047B507F65DB787FC6F3787FE7FB783900000002
+S31520047B604BFFEF197C60FE707C031A787C6300500F
+S31520047B707C63FE708001005C7C0803A68321003CA4
+S31520047B8083410040836100448381004883A1004CE3
+S31520047B9083C1005083E10054382100584E800020D0
+S31520047BA09421FFD87C0802A6930100089321000C97
+S31520047BB093410010936100149381001893A1001C33
+S31520047BC093C1002093E100249001002C7C7F1B7834
+S31520047BD07C9E23787CBC2B787CDB33787CFA3B78C0
+S31520047BE07D1943787D3D4B784800ADF52C9D0000EA
+S31520047BF07C781B784186000C7FA3EB784BFFE9AD9C
+S31520047C007FE3FB787FC4F3787F85E3787F66DB7830
+S31520047C107F47D3787F28CB784BFFFDB97C7D1B78B3
+S31520047C207F03C3784800AE897FA3EB788001002CBC
+S31520047C307C0803A6830100088321000C83410010DD
+S31520047C40836100148381001883A1001C83C1002052
+S31520047C5083E10024382100284E8000209421FFC08F
+S31520047C607C0802A69361002C9381003093A10034F2
+S31520047C7093C1003893E1003C900100447C9F237912
+S31520047C807C7D1B787CBB2B787CDC33784182000C92
+S31520047C907380000440820034386100083880001064
+S31520047CA04BFD20753BC100187FC3F3783880001044
+S31520047CB04BFD20657FA3EB784BFF39092C83FFFF0F
+S31520047CC09061000C4086000C3860FFFF4800006875
+S31520047CD02C9F00004186000C7C60F8389001000C33
+S31520047CE03800000298010019980100093800001094
+S31520047CF0980100189801000893E1001C7FC3F378CB
+S31520047D004BFF25B19B61000B3860000238810008C7
+S31520047D1038A000007FC6F3787F87E3783900000017
+S31520047D204BFFED597C60FE707C031A787C6300500F
+S31520047D307C63FE70800100447C0803A68361002CCA
+S31520047D408381003083A1003483C1003883E1003C61
+S31520047D50382100404E8000209421FFF07C0802A6A2
+S31520047D6093C1000893E1000C900100147C7E1B78DB
+S31520047D707C9F2378381EFFFF2000000D7C00011015
+S31520047D807C0000D057E90FFE7C0B4B794082000C17
+S31520047D902C9F00C84085000C3860FFFF4800001C5B
+S31520047DA04800AC3D3D200028392990607FFE49AE2D
+S31520047DB04800ACFD38600000800100147C0803A64E
+S31520047DC083C1000883E1000C382100104E80002076
+S31520047DD03CA0002880C58EF8288600077C6A1B787C
+S31520047DE04085000C3860FFFF4E8000203D2000288F
+S31520047DF01D0600343929D3A87D684A1480EB000473
+S31520047E002C87000040860110380000017C084B2E88
+S31520047E103D20002839298D78912B0004380000064E
+S31520047E20B00B00083800000CB00B000A3D200025DA
+S31520047E30392980AC912B000C90EB00103D200025B5
+S31520047E403929B1C4912B00143D2000253929BD7C44
+S31520047E50912B00183D2000253929B834912B001C7C
+S31520047E603D2000253929A9A0912B00203D2000255D
+S31520047E703929B2A4912B00243D2000253929B34069
+S31520047E80912B00283D2000253929B0EC912B002C7C
+S31520047E9090EB00303806000190058EF8386000001B
+S31520047EA0800A00003D200028540007FE9009909087
+S31520047EB0800A00043D200028900990EC800A0008DE
+S31520047EC03D200028900990F0800A000C3D200028CF
+S31520047ED0900990A4800A00103D20002890099074EF
+S31520047EE0800A00143D20002890099088800A0018F2
+S31520047EF03D2000289009908C800A001C3D200028F3
+S31520047F0090099098800A00203D200028900990A08E
+S31520047F104E800020386000004E8000209421FFE02F
+S31520047F207C0802A6934100089361000C93810010FB
+S31520047F3093A1001493C1001893E1001C900100241E
+S31520047F407C7C1B787C9E2379813C00207CBB2B780F
+S31520047F50834900244182015C83FC00007C9FE0006D
+S31520047F6041860020817E0018801F00187D2B005139
+S31520047F704181001083FF00007C9FE0004086FFECD7
+S31520047F80801F00047C80E000418600A87C1F0378C3
+S31520047F90A81F000A813F0018817E00187D2902143B
+S31520047FA07FAB485140810088A81E000A7C9D0000B2
+S31520047FB0418400583D2000283929D83C8009007C7A
+S31520047FC0300000019009007CA97E000A8009008007
+S31520047FD07F63DB787C005A14900900804BFFB0CD78
+S31520047FE038600000480001A07C0B2214901F001862
+S31520047FF0A01F000A807F00147C040050B01F000AD2
+S3152004800048007475480000A07F63DB787FA4EB7872
+S3152004801048007465A01E000A813E00187C1D00508D
+S31520048020B01E000A7D29EA14913E001883FF000041
+S315200480303D2000283929D83C8009008C30000001D5
+S315200480409009008CA97E000A800900907C9FE0009C
+S315200480507C005A1490090090937E001441860048AF
+S31520048060A93E000A801E0018817F00187C004A144D
+S315200480707C8B005140810030A81F000A7C840000BC
+S315200480804184FF6883FF0000807F0004836300141B
+S315200480904800AB357F63DB784BFFB0117C9FE00053
+S315200480A04086FFC0809F00047FC3F3784800AB015D
+S315200480B0A97C00082C8B00024085FF2883DC000065
+S315200480C07C9EE0004186FF1C801E0018813C0044F3
+S315200480D07C8048004086FF0C2C8B000340860010D1
+S315200480E0A81E000A2C8000004086FEF8A93E000A3D
+S315200480F0801C00447C004A14901C0044881E0021E5
+S315200481007FC3F378541F07FE4800AABDA01A0006B1
+S3152004811070090020837E001483DE00004182001053
+S315200481207F63DB784BFFAF8548000010387A005018
+S315200481307F64DB7848009F117C9EE0004186001412
+S31520048140801E0018813C00447C8048004186FFA0A4
+S315200481507F43D378389A005038A0000048009D29E0
+S31520048160801A00D02C800000418600187C0803A6C3
+S315200481707F43D378808300D438A000014E80002129
+S315200481807FE3FB78800100247C0803A68341000852
+S315200481908361000C8381001083A1001483C100181D
+S315200481A083E1001C382100204E8000209421FF907A
+S315200481B07C0802A6920100309221003492410038B4
+S315200481C09261003C9281004092A1004492C10048F1
+S315200481D092E1004C9301005093210054934100589E
+S315200481E09361005C9381006093A1006493C100684D
+S315200481F093E1006C900100747C781B783AE00000CF
+S315200482003A8000003BE000003B4000003A4000007A
+S315200482103A2000003A6000003AA000009341002072
+S315200482203D2000283BA9D83C801D006428840014E6
+S3152004823030000001901D006483D800084085000C9E
+S31520048240388000004BFF6BDD8018000C2880002747
+S315200482504185002C7F03C378388000284800739119
+S315200482607C781B7940820014801D00783000000140
+S31520048270901D00784800175483D80008A3BE000236
+S3152004828038000000901E0004901E000038000000F4
+S31520048290981E00087F03C378B3BE000A389D0014D5
+S315200482A04801403D5460043E2C800000B07E0024EA
+S315200482B04186001C3D2000283929D83C80090070BD
+S315200482C03000000190090070480016A4801E00208A
+S315200482D0541B36BA7C9BE800213B0013392000004E
+S315200482E07D2949147C000026540037FE7D2B037912
+S315200482F04182001C3D2000283929D83C800900747D
+S31520048300300000019009007448001664289B00146C
+S315200483107C1BE850B01E000A408500A08018000C83
+S31520048320389B00147C802040408400307F03C3782F
+S31520048330480072BD7C781B794082001C3D200028B1
+S315200483403929D83C8009007830000001900900784A
+S315200483504800167883D800083A9BFFEC2C94000C2E
+S31520048360817800083AEB0028418600144085004CA9
+S315200483708817000C2C800000408600403D20010117
+S31520048380800B00286129080A7C8048004086002C3E
+S31520048390881E002170090002408200203800000156
+S315200483A09001002080170004900100248017000803
+S315200483B03AE00000900100288B3E0021801E001820
+S315200483C0813E001C901E0018913E001CA01E002217
+S315200483D0A13E0026B01E0022B13E00263D200028E4
+S315200483E0838990782C9C000041860044A01C0020A0
+S315200483F0A13E00167C80480040860034A01C00184C
+S31520048400A13E00147C80480040860024801C001471
+S31520048410813E000C7C80480040860014801C001C91
+S31520048420813E00107C8048004186005C3C60002828
+S315200484303863D90C801E000C38810018900100186E
+S31520048440801E001038C1001C9001001CA0BE001420
+S31520048450A0FE00163900000148014E397C7C1B79A8
+S315200484604082001C3D2000283929D83C800900C4BC
+S3152004847030000001900900C4480014583D2000280B
+S315200484809389907883FC00282C9F0000418614440D
+S31520048490A81F00082C800000418614D473200002F3
+S315200484A040820014A13E0022881F00787D360030C9
+S315200484B048000008A2DE0022835C0024A13A0002C0
+S315200484C071200003418200E4712000014182001CD6
+S315200484D0AA3F00083C6000283863D91C7FC4F3787F
+S315200484E038A000284BFCB11DA01A00027009000216
+S315200484F0418200B8732000162C8000024186002495
+S3152004850073200010418214683D2000283929D83C64
+S31520048510800900CC30000001900900CC480013B437
+S315200485207F43D37838800000480094457C7A1B79B1
+S315200485304182143C839A0008801E0010901C001C63
+S31520048540A01E00167F83E378B01C002048014F75D7
+S315200485504BFF67DD83FC0028907C0058897F007AD6
+S31520048560288B000D3A73000138000001B01F000863
+S315200485704185003839400000614AFFFF5560063EB8
+S31520048580813A00547D4000307C8048404084001C61
+S31520048590380B00015409063E2889000D981F007ADD
+S315200485A07C0B03784085FFD8396000003D200028E5
+S315200485B02C970000A009909AB17F0060B01F000E8E
+S315200485C041860030A81F00082C8000014186002423
+S315200485D07FE3FB787EE4BB787E85A3787FC6F37839
+S315200485E038E1002039010024392100284800142DBF
+S315200485F0A81F00082C80000440860300732000373F
+S315200486002C800010408602F4800100202F000000F8
+S31520048610419A001480010024813F007C7D69005129
+S31520048620418002D8815E0018801F00447D40027874
+S31520048630212000007C0901143176FFFF7D2BB11027
+S315200486407C0B4839418202B4801F003C7C96000092
+S31520048650408602A8801F0028813F00547C80480061
+S3152004866040860298419A0024801F00847D20505120
+S31520048670418100183D20002880099CA881210024DE
+S31520048680901F0080913F007CA91E000A2C880000C0
+S315200486904086014C817E001C801F00247D20585179
+S315200486A040810258801F00547D2058514181024C3C
+S315200486B0801F0058813F003C7C8048404184023C16
+S315200486C03D2000283929D83C81610020800900BC3E
+S315200486D02C8B000030000001900900BC418600204C
+S315200486E03D20002880899CA8800100287FE3FB7810
+S315200486F07C8020503884000148000024A89F006212
+S315200487002C8400004186001C801E001C813F0064CE
+S315200487107D6900514081000C7FE3FB784800156594
+S31520048720387A00903D600028396BD83C815E001C65
+S31520048730801F0024812B00AC7FA0505039290001D2
+S31520048740912B00AC800B00B07FA4EB787C00EA145C
+S31520048750900B00B04800A06D801E001C7F03C378D8
+S31520048760901F00244BFFA945813F0024801F0054FD
+S315200487707C8900004086000C380000004800001464
+S31520048780A81F000C2C8000004086000CA01F00149B
+S31520048790B01F000A801A00CC2C80000041850020DE
+S315200487A0801A00A82C800000408600143D20002852
+S315200487B0800992902C800000418600147F43D37850
+S315200487C0389A009038A00001480096BD801A00907F
+S315200487D02C800000418611F4480010C4801E001C21
+S315200487E0813F00247C80480040860110801F0000C1
+S315200487F07C80F80040860104815A0054813A005056
+S31520048800817A005C801A00587D4950507D6058500A
+S315200488107C8A5800408400107C88500040850010D3
+S31520048820480000D87C885800418500D03D20002887
+S315200488303929D83C800900C030000001900900C0C5
+S31520048840A97E000A801F00443BBA00507C005A14BB
+S31520048850901F0044800900687FA3EB783000000154
+S3152004886090090068A97E000A8009006C7F04C378F9
+S315200488707C005A149009006C81240008381B0014CB
+S315200488807D2902148004000C912400083000FFEC9A
+S315200488907C1B00509004000C480097AD7F43D3788E
+S315200488A07FA4EB7838A00000480095DD801A00D01C
+S315200488B02C800000418600187C0803A67F43D378C9
+S315200488C0808300D438A000014E800021881E002118
+S315200488D07009000841820014881F001B60000001F3
+S315200488E0981F001B480010E4881F001B600000022C
+S315200488F0981F001B480010D481380008381B001428
+S315200489007D2902148018000C913800083000FFECF1
+S315200489107C1B00509018000C817A0054815A005018
+S31520048920813A005C801A00587D6A58507D20485050
+S315200489307C8B4800815F00504CE62B827C0000260D
+S31520048940540047FE7C0000D07D2900387D600078E5
+S315200489507D2903787D2048F87C00FE70817F0044C1
+S315200489607D2900387D4B50507C895000A97F000812
+S315200489704CE62B827C000026540047FE7C0000D067
+S315200489807D2900382C8B00017D4000787D290378D1
+S31520048990913F0040418600102C8B0002418601D471
+S315200489A048000350881800117009003040820FC017
+S315200489B0817E00103D20E000556000067C80480042
+S315200489C041860FAC3D200028880990702C80000039
+S315200489D041860020A01E0014A13E00167C8048007B
+S315200489E040860010801E000C7C80580041860F8033
+S315200489F0386000013880000838A0008038C00001A3
+S31520048A00480067C57C7D1B7941820F6438000010BD
+S31520048A10901D000C813D00083800000298090001D1
+S31520048A203800001098090000801E000C38800008C9
+S31520048A3090090004A01E001438690008B009000239
+S31520048A404BFD12D5837C001C2C9B00004086000C19
+S31520048A50801E0010901C001C7F83E3787FA4EB7893
+S31520048A60480141652C83000041860014937C001C38
+S31520048A707FA3EB784BFFA5F548000EF47FA3EB7894
+S31520048A804BFFA5E97FE3FB78480020C92C8300002F
+S31520048A90907F001C4086001C7FE3FB7838800037DB
+S31520048AA04800246D7C7F1B783A60000048000EC085
+S31520048AB02C970000418600247FE3FB787EE4BB7874
+S31520048AC07E85A3787FC6F37838E100203901002417
+S31520048AD03921002848000F452C9500004186000CBA
+S31520048AE092BF0038480000103D20002880099CB021
+S31520048AF0901F0038390000006108FA003D60002804
+S31520048B0039200003815E0018B13F0008800B9CB019
+S31520048B103D2000287C004214900B9CB0915F004CB1
+S31520048B20801F0038817F004C901F002C901F00541A
+S31520048B30901F0028901F0024396B0001917F004468
+S31520048B40881F001B917F005060000001981F001BA6
+S31520048B50A00990A63D2000283929D83CB01F000E34
+S31520048B608009000430000001900900044800011423
+S31520048B70732000104C80000041860020817E001C5A
+S31520048B80801F00387D20585140810D48801F005495
+S31520048B907D20585141810D3C732000044182001CE4
+S31520048BA041860DCC7FE3FB783880003D4800236165
+S31520048BB07C7F1B7848000DB87320000241820DB0DB
+S31520048BC041860024817E001C801F00287D2B0051B5
+S31520048BD0917F002440800008917F002838000000FF
+S31520048BE0B01F000A801E0018893F001B732B00103B
+S31520048BF0901F004C30000001901F0044901F00502D
+S31520048C0061290001993F001B418200703D20002804
+S31520048C103929D83C800900087F43D37830000001E5
+S31520048C209009000848008B55881F001B54000674C1
+S31520048C302C80006038000004B01F00084086001411
+S31520048C40881F007B893F007A981F0078993F007916
+S31520048C507FE3FB783880000038A000004BFFF2C188
+S31520048C60A89F00622C840000418600187FE3FB78CD
+S31520048C70480010114800000C38000003B01F0008FB
+S31520048C80801E0018A89E000A30000001901E0018BD
+S31520048C90801F00407C840040408500407FA02050F7
+S31520048CA07F03C3787C9D00D0480067CD3D600028B3
+S31520048CB0396BD83CA01F00425739003CB01E000A2D
+S31520048CC0812B0094800B009839290001912B009464
+S31520048CD07C00EA14900B0098801E00183000FFFFD9
+S31520048CE0901F0030801E0018901F00484800080876
+S31520048CF0800100202C8000004186007C732A000419
+S31520048D0040820074817F007C2C8B000041860068A1
+S31520048D10800100247D2B00514080005C3D60003F93
+S31520048D203D20002880099CA8813F0080616B480073
+S31520048D307C0900507C805800418500383D2000285D
+S31520048D403929D83C8009007C816900B830000001AB
+S31520048D509009007C396B0001A95E000A8009008015
+S31520048D60916900B87C0052149009008048000B3C9D
+S31520048D70915F007C801F0044817E00187FAB0051E8
+S31520048D80408100C87320000241820030A13E0026A3
+S31520048D9028890001573907FA380B0001901E00185C
+S31520048DA0408500103809FFFFB01E00264800000841
+S31520048DB0573906F23BBDFFFFA81E000A7C9D000022
+S31520048DC0418500104086002073200001408200184F
+S31520048DD0881F001B5739003C60000001981F001BA8
+S31520048DE0ABBE000A7F03C3783D600028396BD83CAC
+S31520048DF07FA4EB78812B0080800B007C7D29EA14EC
+S31520048E00912B008030000001900B007C480066699D
+S31520048E10813E0018A17E0026A01E000A7D29EA14A0
+S31520048E207C8BE800913E00187C1D0050B01E000A81
+S31520048E304085000C7C1D58504800000C573906F21A
+S31520048E4038000000B01E0026A01A00067009000192
+S31520048E5041820040A81F00082C800005408500346C
+S31520048E60A81E000A2C800000418600287FE3FB7898
+S31520048E70480021513D2000283929D83C8009009CEE
+S31520048E807C7F1B78300000019009009C48000A442E
+S31520048E90A95E000A813E0018801F0044817F00409D
+S31520048EA07D2952147C005A147FA04851408100E049
+S31520048EB03D2000283969D83C800B009430000001FD
+S31520048EC0900B0094A95E000A7C9D50004184009476
+S31520048ED0800B0098732900027C005214900B009892
+S31520048EE041820040A81F00082C80000A40860034D6
+S31520048EF0801E0018813F00447D6900514081002472
+S31520048F003C0000036000E800813F00287FE3FB78F3
+S31520048F107EA90214480020AD7C7F1B784BFFF4C049
+S31520048F20801F00402C80000040860980801E001887
+S31520048F30813F00447C804800408609703D200028FB
+S31520048F40881F001B3929D83C60000001981F001B8C
+S31520048F50800900A030000001900900A048000010FC
+S31520048F60800B00987C00EA14900B00987F03C3784A
+S31520048F707C9D00D048006501A01E000A3A00FFF639
+S31520048F807F3980387C1D0050B01E000A80010020E5
+S31520048F902C8000004186003481410024801F007CFF
+S31520048FA07D20505141800024801E0018813F00847A
+S31520048FB07D690051418100143D20002880099CA828
+S31520048FC0915F007C901F00807320000441820090F2
+S31520048FD0A01F00083000FFFD7C000734288000070E
+S31520048FE04185007C3D20002539298F085400103AFC
+S31520048FF07C09002E3D20002539298F087C004A143F
+S315200490007C0903A64E8004200000002000000028CE
+S315200490100000002800000028000004D0000004D02E
+S3152004902000000028000004D03800003D4800000855
+S3152004903038000036B01A004838000000B01F000877
+S315200490403D2000283929D83C8009000C7FE3FB7891
+S31520049050300000019009000C4800048473200002AB
+S31520049060418200187FE3FB783880003648001EA131
+S315200490707C7F1B784800085C73200010418208F02E
+S31520049080A81F00082C80000341860014418404682C
+S315200490902C80000A4185046048000080801F00243B
+S315200490A0817E001C7D2B005141810828801F00549D
+S315200490B07D2058514181081C3D2000283929D83C5F
+S315200490C0800900087F43D378300000019009000806
+S315200490D0480086A9881F001B540006742C80006053
+S315200490E038000004B01F000840860014881F007B47
+S315200490F0893F007A981F0078993F00797FE3FB78AF
+S315200491003880000038A000004BFFEE15801E0018A2
+S315200491103000FFFF901F0030801E001C813F00247A
+S315200491207D69005141810138A81E000A2C80000067
+S3152004913040860120801F003C7C9600004086011456
+S315200491403D2000283929D83C800900A4300000019C
+S31520049150900900A4A81F000A2C800000418600F470
+S31520049160801E001C813F00247C804800408600E449
+S315200491703D200028A17F001681299074396B0001B7
+S315200491807D6007347C804800B17F0016408600A4A9
+S31520049190801F003C817F0058A15F00187D20581055
+S315200491A07D2949107D294BB87C0048387D6948784B
+S315200491B07C004B785400F87E7C00539639200000BE
+S315200491C0B13F000AB13F0062216000017D6B591056
+S315200491D07D6958F8552907BC7C0058387C004B78A3
+S315200491E07C0051D67FE3FB78901F005CA01F0018FB
+S315200491F0813E001C83DF0028901F0058913F0028E1
+S3152004920048000E01A13F0018801F0028A97F0016E0
+S315200492107D40F0517D2959D6801F005C7C004A147C
+S31520049220901F00584081074893DF002848000740D4
+S31520049230408502C4A01F0018813F00587FE3FB78B5
+S315200492407D290214913F005848000DB94800072093
+S3152004925038000000B01F00164800029C3D2000285C
+S31520049260A97F0016800990747C8B00004085001825
+S31520049270801F0058813F005C7C8048404085000860
+S31520049280913F005838000000B01F0016809E001C35
+S31520049290801F00547D2020514081001C3D20002841
+S315200492A03929D83C800900A830000001900900A87B
+S315200492B0480005F83D600028396BD83C801F0024FF
+S315200492C0812B00AC7FA02050800100203929000189
+S315200492D02C800000800B00B0912B00AC7C00EA149B
+S315200492E0900B00B0418600203D20002880899CA850
+S315200492F0800100287FE3FB787C802050388400019D
+S3152004930048000024A89F00622C8400004186001C8B
+S31520049310801E001C813F00647D6900514081000C41
+S315200493207FE3FB784800095D801E001C813F0054C2
+S315200493307C8048004086001438000000B01F000AD4
+S315200493403A40000148000018A81F000C2C80000099
+S315200493504086000CA01F0014B01F000A817F00580D
+S31520049360801F005C7C8B0040A15F00184085000CA8
+S315200493707C0A51D67D405B96380000006000FFFFD2
+S31520049380893F00787D6B52147C0048307D2058102C
+S315200493907D2949107D294BB87C0048387D69487859
+S315200493A07C004B78901F0058813A00907C9D484061
+S315200493B040850024801F003C387A00907C090050A8
+S315200493C0901F003C809A00903B800001480093F552
+S315200493D048000020387A00907FA4EB78480093E573
+S315200493E0801F003C3B8000007C1D0050901F003CE9
+S315200493F0801A00CC2C80000041850020801A00A809
+S315200494002C800000408600143D200028800992907C
+S315200494102C800000418600147F43D378389A00902C
+S3152004942038A0000148008A61817E001C801F002824
+S315200494307D2B0051917F002440800008917F0028D5
+S31520049440A81F00082C8000074186005C4185001077
+S315200494502C8000064186001C4800009C2C800008B5
+S31520049460418600702C80000A4186008048000088CE
+S315200494702C9C000041860080A01A0006700900205A
+S31520049480418200187F43D378480084653D20002814
+S31520049490A0099CB6B01F001038000009B01F0008B0
+S315200494A0480000542C9C00004186004C3800000AD9
+S315200494B0B01F00087FE3FB784800210538000078B8
+S315200494C0B01F00107F43D378480084254800002825
+S315200494D02C9C0000418600207FE3FB7848001AE597
+S315200494E07C7F1B784800048838000078B01F001061
+S315200494F0480003B873200010418200A8817F003001
+S31520049500813E00187C095851418000307C8B4800EC
+S3152004951040860090817F0034813E001C7C0958518E
+S31520049520418000187C8B480040860078801F003CD0
+S315200495307C9600404085006CA81E000A2C80000002
+S3152004954040860034801F0034813E001C7C80480005
+S3152004955040860024801F003C7C96004040850018ED
+S315200495603D2000283929D83C800900B43000000168
+S31520049570900900B492DF003C813E0018817F003CB4
+S31520049580801F0070913F00307C8B0040801E001CA1
+S31520049590901F003440850008917F00703A400001F6
+S315200495A073200020418200CCA17E00262C8B000053
+S315200495B0418600C0A81F00082C800009418500B4FC
+S315200495C03D200028801A0050812992947C0B021495
+S315200495D07C8048404085001438000000B01E0026D8
+S315200495E0573906F2480000A0801E0018813F004823
+S315200495F07D605A147C09585140810048917F004867
+S31520049600801F0044813A00507C0058507D29021462
+S315200496103929FFFF2C890000913A004C408600101E
+S31520049620A01A000660000040B01A00067F43D378D3
+S3152004963048008021881F00745400063A981F00743D
+S31520049640A01E0026A93E000A7C80480041850038D9
+S31520049650A01A0002700901004082002C7F43D378AF
+S315200496607FC4F3787F05C3784800056D4800001849
+S31520049670817F0044801F00487D2058514081000886
+S31520049680917F0048A81E000A2C8000004086000C0A
+S3152004969073200001418200E4A97F00082C8B000975
+S315200496A0418500D8801E0018813F00447C804800F4
+S315200496B0408600A4801F00007C80F8004086009825
+S315200496C02C8B0004408600903BBA0050881F001B58
+S315200496D07FA3EB7860000002981F001BA93E000AB6
+S315200496E0801F00447F04C3787C004A14901F0044E2
+S315200496F03D2000283929D83C80090068895E00214C
+S315200497003000000190090068A97E000A8009006CD7
+S31520049710555907FE7C005A149009006C4800892983
+S315200497207F43D3787FA4EB7838A00000480087597C
+S31520049730801A00D02C8000004186004C7C0803A6A9
+S315200497407F43D378809A00D438A000014E8000212C
+S31520049750480000347FE3FB787FC4F3787F05C37821
+S315200497604BFFE7BD881F001B7C791B786000000136
+S31520049770981F001B480000107F03C3784BFF992DC8
+S315200497805739003C73200001418200CCA81F0008F1
+S315200497902C800009418500247F43D378480084D552
+S315200497A0881F001B813F004460000001981F001B96
+S315200497B039290001913F0044A01F00083000FFFD15
+S315200497C07C000734288000074185008C3D20002535
+S315200497D0392996F05400103A7C09002E3D200025A4
+S315200497E0392996F07C004A147C0903A64E8004206D
+S315200497F00000002000000020000000640000002C6F
+S315200498000000006400000064000000380000005CD2
+S3152004981038000005B01F00084800003C3800000747
+S31520049820B01F0008480000303800000AB01F0008A6
+S315200498307FE3FB7848001D8938000078B01F0010AC
+S315200498407F43D378480080A94800000C380000786C
+S31520049850B01F0010A01A0002700900014182002CDA
+S31520049860386000007E248B783D200028800990E40F
+S315200498707FE5FB787C0803A63CC0002838C6D91CA3
+S3152004988038E000004E8000212C9200004086001013
+S31520049890881F001B70090001418201307FE3FB7899
+S315200498A0480007614800012473200004408200C058
+S315200498B07F03C3784BFF97F5881F001B7FE3FB7854
+S315200498C0600000019803001B48000739480000FC8B
+S315200498D07320000440820098881800117009003013
+S315200498E04082008C801E00103D20E00054000006BB
+S315200498F07C80480041860078732000104182002035
+S315200499007FE3FB787FC4F3787F05C37838C00000F3
+S3152004991080E4001C3900000448000038732000024B
+S3152004992041820010A01E000A30000001B01E000A69
+S315200499307FE3FB787FC4F3787F05C37838E00000A3
+S31520049940A804000A80C40018390000147CC6021436
+S31520049950480012D13D20002880099C9C2C930000AD
+S315200499603000000190099C9C480000542C9F000064
+S3152004997041860040813F002081290024A00900025D
+S31520049980700900014182002C386000047E248B7803
+S315200499903D200028800990E47FE5FB787C0803A617
+S315200499A03CC0002838C6D91C38E000004E8000216F
+S315200499B07F03C3784BFF96F52C9300004186000C59
+S315200499C07F43D37848006589800100747C0803A608
+S315200499D08201003082210034824100388261003CB9
+S315200499E08281004082A1004482C1004882E1004C69
+S315200499F08301005083210054834100588361005C15
+S31520049A008381006083A1006483C1006883E1006CC4
+S31520049A10382100704E8000209421FFD07C0802A6B5
+S31520049A209301001093210014934100189361001CA4
+S31520049A309381002093A1002493C1002893E1002C54
+S31520049A40900100347C7E1B787C9D23787CD93378E6
+S31520049A507CBB2B797CF83B787D1C43787D3A4B780C
+S31520049A6040810144881D00002C8000004186013875
+S31520049A702C8000014086000C3BE0000148000010C9
+S31520049A808BFD00012C9F00004085011C2C800003C7
+S31520049A9041860058418500102C800002418600141E
+S31520049AA0480000F82C80000841860088480000EC15
+S31520049AB02C9F0004408600E48819002170090002C6
+S31520049AC0418200D8387D00023881000838A000027F
+S31520049AD04BFC77B9A08100087FC3F378B0810008D6
+S31520049AE04800029D480000B42C9F0003408600AC29
+S31520049AF08819002170090002418200A0881E001BDB
+S31520049B0060000040981E001B893D00022009000EBB
+S31520049B107C0001107C0003B87D2900387C0000F805
+S31520049B205400073C7D290378993E007B4800006C4D
+S31520049B302C9F000A4086006438000001901800001B
+S31520049B40387D00027F84E37838A000044BFC773DFF
+S31520049B50387D00067F44D378801C000038A000049A
+S31520049B60901C00004BFC7725801A0000901A0000F8
+S31520049B70881900217009000241820020881E001BDA
+S31520049B803D200028981E001B801C000081299CA8CB
+S31520049B90901E007C913E00807F7FD8517FBDFA14B1
+S31520049BA04181FEC4800100347C0803A68301001091
+S31520049BB083210014834100188361001C83810020C3
+S31520049BC083A1002483C1002883E1002C382100309E
+S31520049BD04E8000209421FFF07C0802A693E1000C1D
+S31520049BE090010014A00400263540FFFF7CBF2B788B
+S31520049BF041800070801F000C7C8050004085004C02
+S31520049C0081230008809F0008812900287D6450AEA6
+S31520049C107C845214880900749969007560000001D7
+S31520049C209809007480BF000C386400017CAA28506F
+S31520049C3038A5FFFF4BFC7655801F000C3000FFFF34
+S31520049C40901F000C4800002883FF00002C9F000072
+S31520049C507D4050504186000C2C8A00004084FF9899
+S31520049C603C600027386354B448008F79800100147F
+S31520049C707C0803A683E1000C382100104E800020C6
+S31520049C803D2000283929D83C8009001C30000001D9
+S31520049C909009001CA12300687D2007342C80000035
+S31520049CA07C8407347C8B2378418600707C001E706C
+S31520049CB0300000017C0020507C0B07347D295A1487
+S31520049CC07D2007342C800000B12300684185000CD8
+S31520049CD038000001B00300682C8B00004084000C7F
+S31520049CE07C0B00D07C0B0734A123006A7D2007342B
+S31520049CF07C0016707C0058507C0B07347D295A143E
+S31520049D007D2007342C800000B123006A4185001C85
+S31520049D10380000014800001055601838B003006868
+S31520049D205560083CB003006AA8030068A123006AB2
+S31520049D30A143006C7C001E707D29021438000000AB
+S31520049D407D2B07347C8B5000B0030062B0030012D5
+S31520049D50B12300144084000CB143001448000014BD
+S31520049D602C8B00804085000C38000080B003001442
+S31520049D7038000000B00300764E8000209421FFD8DE
+S31520049D807C0802A6936100149381001893A1001CF9
+S31520049D9093C1002093E100249001002C7C7E1B7843
+S31520049DA083FE002083BF002C2C9D00007C9C2378FE
+S31520049DB0387F002C4086004C801F00142C80000025
+S31520049DC04186002838000002980300053800001058
+S31520049DD098030004801F001490030008881F004580
+S31520049DE0980300074BFFC51583BF002C2C9D00004C
+S31520049DF0408600103D20002880699088480001E0B4
+S31520049E00A81E00682C800000811D003C837F00244E
+S31520049E10408600BC817D006C2C8B0000418600B0FE
+S31520049E20801D005470090040418200203C00431BE1
+S31520049E306000DE837C0B00967D69FE707C008E704C
+S31520049E407C090050B01E006C3D40431B614ADE83F2
+S31520049E507C0B50967D69FE707C0076707C090050E0
+S31520049E60B01E0068813D00702C89000041860010D8
+S31520049E707C09501654008BFE480000107C000734E1
+S31520049E807C000E707C000194B01E006AA81E006837
+S31520049E90A93E006AA17E006C7C0016707C004A14E0
+S31520049EA05400F87E7C0907347C895800B01E0014BF
+S31520049EB04084000CB17E0014480000142C890080D4
+S31520049EC04085000C38000080B01E0014801D005808
+S31520049ED02C8000004186000C33E0FFD84800004C5B
+S31520049EE03861000880080020813F001433E0FFD841
+S31520049EF0912100084BFF02D12C8300004086002CC0
+S31520049F003D200028816990887C9F58004CE6238256
+S31520049F107C000026540047FE7C0000D07FE90038F0
+S31520049F207D6000787D3F03782C9C000041860018D4
+S31520049F307C1CF8107C0001107FE900387F800078B3
+S31520049F407D3F03782C9F00207C00002654002FFEA2
+S31520049F507C0000D0540906B47FE30078A01E0018C4
+S31520049F607D3F1B787C9F0000317CFFFF7C0BE1103A
+S31520049F707D20002655292FFE7D2B03794182003032
+S31520049F80817D00642C8B000040860008817B009430
+S31520049F907C1F58107C0001107C0003B87FE9003830
+S31520049FA07D6000787D3F0378B3FE001893FE005849
+S31520049FB0801D00682C8000004186002057EB083C59
+S31520049FC07D2058107D2949107C0048387D694878C1
+S31520049FD07C004B78901E005C7FE3FB788001002C8C
+S31520049FE07C0803A6836100148381001883A1001CC6
+S31520049FF083C1002083E10024382100284E800020DC
+S3152004A0009421FFA07C0802A69281003092A10034FC
+S3152004A01092C1003892E1003C930100409321004410
+S3152004A020934100489361004C9381005093A10054BE
+S3152004A03093C1005893E1005C900100647C7F1B78F7
+S3152004A040813F0054801F00247D340278217400004F
+S3152004A0507E8BA115813F0020830900244182001CA8
+S3152004A060A01F0060A93F00147C8048004184000C96
+S3152004A070A01F0018901F0058837F003C817F005842
+S3152004A0803AA000007C1B58107C0001107C0003B809
+S3152004A0907F6900387D6A00787D3B53783D2000280F
+S3152004A0A03929907C881F001A815F0028817F00242B
+S3152004A0B02C800000A81F00087ECB50507F8900AE5C
+S3152004A0C0418600402C9B00004086002C801800907E
+S3152004A0D03B6000015789003C7C00B0107C000110D5
+S3152004A0E07C0003B87F8B00387D2000787D7C037844
+S3152004A0F04800001038000000B01F000CB01F0012EA
+S3152004A100801800907C80D8404084000C7F560050F4
+S3152004A110480000087F56D8502C9A0000408400201E
+S3152004A1202C9B00003B4000004086001438000000B1
+S3152004A130813F0024B01F000A913F0028A0DF0018A9
+S3152004A1407C9A30004085000C7CDA33783AA00001F2
+S3152004A1505787003C813F0028801F002480B8009048
+S3152004A16081580054811800508178005C7D29D214CE
+S3152004A1707C002A147D2048507D2948F87D29FE70CC
+S3152004A180801800587D4850507D6058507C8A58006D
+S3152004A1907CE748787F8048387C1C3B784CE62B82C9
+S3152004A1A07C000026540047FE7C0000D02C9A000038
+S3152004A1B07D6B00387D4900787D7B4B78418600583D
+S3152004A1C07C9A3000418601302C9400004086001091
+S3152004A1D0881F001B70090004418200107C1AB214E7
+S3152004A1E07C80284040840110881F001A2C8000009F
+S3152004A1F040860104801F00705400F87E7C9A00403B
+S3152004A200408400F4801F0028813F00547D6900515A
+S3152004A210418000E42C9B0000408500643920000026
+S3152004A220881F00796129FFFF7D2900307C9B480027
+S3152004A2304CE623827C000026540047FE7C0000D096
+S3152004A2407F6B00387D2A0078813F0050801F0044B0
+S3152004A2507D6B53787D204850A01F00187D295850C7
+S3152004A2605400083C7C8900004084008C80180054EB
+S3152004A2705529083C7C8900004084007C895F001BAA
+S3152004A280714000014082007073800006408200689D
+S3152004A290801F002C817F00247D2B00514181005892
+S3152004A2A073800001418200187140001041820048E9
+S3152004A2B0801F00287C8058004186003C801800902E
+S3152004A2C02C800000418606E4A81F000A2C8000008A
+S3152004A2D0408606D8A81F000C2C800000408606CC99
+S3152004A2E038000000B01F00127FE3FB784800070106
+S3152004A2F0480006B8738000023B2000003AE000289C
+S3152004A30041820084881F001B70090008801F0038C2
+S3152004A310901F00284082007038000002980100082F
+S3152004A32038000004980100097FE3FB783880000098
+S3152004A3304BFFFA4DB0610028386100283881000AA5
+S3152004A34038A000024BFC6F45893F001B712000207A
+S3152004A3503B20000441820030738000104182000CAF
+S3152004A36071200040418200203C000103893F007A8D
+S3152004A37060000300396100087D2903787D2BC92EEE
+S3152004A3803B200008893F001B712000882C80008018
+S3152004A39040860044738000044082003C738000128F
+S3152004A3A02C800002408600303C0001016000080A2F
+S3152004A3B0392100087C09C92E3D600028800B9CA801
+S3152004A3C07D29CA1494090004801F007C3B39000CA3
+S3152004A3D090090004A01F00187C1900507C9A0040A4
+S3152004A3E07EF7CA14408500107C1A03783AA000012F
+S3152004A3F0579C003C2C9A000041860130881F001A85
+S3152004A4006B490001216900007D2B49147C0000D092
+S3152004A41054000FFE7C0B48394182001C3D20002845
+S3152004A4203929D83C80090054300000019009005491
+S3152004A43048000058801F0028813F00547D69005140
+S3152004A440408000283D2000283929D83C800900482E
+S3152004A4508169004C30000001900900487D6BD214BC
+S3152004A4609169004C480000243D2000283929D83C15
+S3152004A47080090040816900443000000190090040B1
+S3152004A4807D6BD21491690044386000013880000243
+S3152004A4903FC0002880BE9CC438C000017CA5BA14E5
+S3152004A4A048004DDD7C7D1B794182004892FD000CDD
+S3152004A4B07EC5B3787F46D3783D600028801D00088A
+S3152004A4C0813E9CC4806B91D47C004A14901D000864
+S3152004A4D0809800A438E000014BFF90352C830000BF
+S3152004A4E0907D0000408600147FA3EB784BFF8B7D84
+S3152004A4F03860003748000418813800907C16D2143E
+S3152004A5007C004A787C09FE707D2002787C004850C5
+S3152004A5107C00FE70638900087F8B00387D200078DC
+S3152004A5207D7C0378480000BC881F001B700900014D
+S3152004A5304182001C3D2000283929D83C800900503E
+S3152004A5403000000190090050480000607380000725
+S3152004A5504182001C3D2000283929D83C800900600E
+S3152004A560300000019009006048000040801F002C44
+S3152004A570813F00247D6900514081001C3D20002834
+S3152004A5803929D83C80090058300000019009005828
+S3152004A590480000183D2000283929D83C8009005C51
+S3152004A5A0300000019009005C386000013880000208
+S3152004A5B03FC0002880BE9CC438C000017CA5BA14C4
+S3152004A5C048004CBD7C7D1B794182FF28801D0008F4
+S3152004A5D0813E9CC492FD000C7C004A14901D000808
+S3152004A5E038000000901D0014801F001C2C800000E1
+S3152004A5F083DD0008408600103C600027386354C879
+S3152004A600480085E1813F001C7FC4F37880690008F7
+S3152004A61038A000284BFC6C75738000014182002809
+S3152004A620881F001B700900104182001C813F0028EE
+S3152004A630801F00547C8900004086000C3809FFFFE7
+S3152004A640901F00282C9A000040860018738000036F
+S3152004A65040820010A81F000C2C8000004186000CAC
+S3152004A660801F002848000008801F0054901E0018F0
+S3152004A6702C990000801F0044901E001C418600284F
+S3152004A68038610008389E00287F25CB784BFC6BFD6B
+S3152004A690813E0020381900145400F0BE5009E0060B
+S3152004A6A0913E00209B9E0021801800545400F0BE49
+S3152004A6B07C9B000040840020A01F00187C9B000087
+S3152004A6C04CE62B827C000026540047FE7C0000D0FA
+S3152004A6D07F7B003839200000895F00796129FFFFDC
+S3152004A6E07D2950307C9B48004CE623827C00002642
+S3152004A6F0540047FE7C0000D07F6B00387D2800780C
+S3152004A700813F0050801F00447D7B43787D20485044
+S3152004A7107C9B48004CE62B827C000026540047FE96
+S3152004A7207C0000D07F6B00387D2900787D7B4B78B8
+S3152004A7307F6A5630B15E0022813F002C801F00289C
+S3152004A7407D60485140810024A01F002EA13F002A8D
+S3152004A7507C090050893E0021B01E00266129002074
+S3152004A760993E00214800000C801F0024901F002CD5
+S3152004A7707C1ACA142C80000041860010381A001452
+S3152004A7807C190214B01E000A7FA3EB787C97D2149E
+S3152004A79048011B4DB07E0024881F001A2C8000001F
+S3152004A7A041860010A81F000C2C800000408600C89B
+S3152004A7B073800003815F0028418200347380000285
+S3152004A7C04182000C380A0001901F00287380000182
+S3152004A7D04182001C801F0028893F001B3000000195
+S3152004A7E0901F002861290010993F001B801F002814
+S3152004A7F0813F00547D60D2147C095851917F0028F2
+S3152004A80040810034A81F00622C800000917F0054F0
+S3152004A8104086002438000001B01F0062915F006466
+S3152004A8203D2000283929D83C800900183000000131
+S3152004A83090090018A81F000A2C80000040860050AA
+S3152004A840801F0028813F00247C80480041860040E8
+S3152004A850A81F000C2C800000A01F0014B01F000AA3
+S3152004A8604186002C38000000B01F000CB01F0012D7
+S3152004A8704800001C801F0028813F00547D60D214AC
+S3152004A8807C09585140810008917F0054A018000289
+S3152004A8907009000141820028386000013D2000280B
+S3152004A8A0800990E47FE5FB787C0803A67FC6F378CD
+S3152004A8B0A89F000838E000004E8000217C17D2149F
+S3152004A8C0901D0018A01D001AB01E0002813F002012
+S3152004A8D08809004C981E0008813F00207FA3EB784E
+S3152004A8E08809004538E00000981E0001813F0020B9
+S3152004A8F0A0D8000238A9002C8089005854C606F630
+S3152004A9004BFF4A717C631B79418200502C830037AC
+S3152004A91040860014807F00203880000048000A7199
+S3152004A9204800008868690041200900007D204914F8
+S3152004A9306860003E216000007C0B01147D2B0379A6
+S3152004A9404182006CA81F00082C800002408500600C
+S3152004A950B07F0076480000543D2000283929D83C91
+S3152004A9608009003C2C9B0000300000019009003C2B
+S3152004A9704085001C801F0044813F00507D40DA142E
+S3152004A9807C09505140810008915F0050801F00448B
+S3152004A990893F001B2C950000901F00845529063AF8
+S3152004A9A0993F001B4086F6D438600000800100647D
+S3152004A9B07C0803A68281003082A1003482C100383B
+S3152004A9C082E1003C83010040832100448341004806
+S3152004A9D08361004C8381005083A1005483C10058B5
+S3152004A9E083E1005C382100604E8000209421FFF032
+S3152004A9F07C0802A693C1000893E1000C9001001480
+S3152004AA007C7F1B78A81F000A2C800000A81F0068E2
+S3152004AA10A93F006A7C0016707C004A147C1E0E70C6
+S3152004AA20418600103C600027386354D4480081B521
+S3152004AA303D200028A81F0012392990AC5400103A52
+S3152004AA407C09002E7C1E01D67C0907342C8900093A
+S3152004AA50B01F000C4185000C3800000A4800001085
+S3152004AA602C8900784085000C38000078B01F000C33
+S3152004AA70A13F00127D2007342C80000B4185000C59
+S3152004AA8038090001B01F0012800100147C0803A6B7
+S3152004AA9083C1000883E1000C382100104E80002079
+S3152004AAA09421FFE87C0802A693A1000C93C1001010
+S3152004AAB093E100149001001C48012ED13D2000286A
+S3152004AAC090699CB03D2000283800000090099CAC79
+S3152004AAD039299CAC3FA00028913DD90C3D20002863
+S3152004AAE03BBDD90C388000043CA00028A069909472
+S3152004AAF038A5D914480081F13D20002880099CBC42
+S3152004AB0028800027907D00044185000C3800002809
+S3152004AB1090099CBC3D20002880099CC43000002854
+S3152004AB2028800080408500103C600027386354E864
+S3152004AB30480080B18001001C7C0803A683A1000C78
+S3152004AB4083C1001083E10014382100184E800020B0
+S3152004AB509421FFF07C0802A693E1000C90010014D6
+S3152004AB608143001C2C8A000083E3002040860030A9
+S3152004AB70386000013880000238A0002838C000015F
+S3152004AB80480046457C6A1B794082000C38600000E8
+S3152004AB904800007C38000028900A000C3960000028
+S3152004ABA039000000812A0008380000069169000453
+S3152004ABB091690000990900089809000938000014D1
+S3152004ABC0B009000A801F001C9009000C801F001485
+S3152004ABD090090010A01F00207D435378B00900146B
+S3152004ABE0A15F0018916900189169001C3800005073
+S3152004ABF0980900209909002138000000B009002294
+S3152004AC00B0090024B0090026B149001680010014B9
+S3152004AC107C0803A683E1000C382100104E80002016
+S3152004AC209421FFC07C0802A692E1001C9301002017
+S3152004AC3093210024934100289361002C93810030B2
+S3152004AC4093A1003493C1003893E1003C9001004461
+S3152004AC507C9F23787CBE2B787CD733787CF83B7812
+S3152004AC607C7B1B797D1A43783B8000003B200000C7
+S3152004AC704182004880FB002081270024814900541A
+S3152004AC80810900508169005C800900587D48505034
+S3152004AC907D6058507C8A58003B27002C4CE62B823A
+S3152004ACA07C000026540047FE7C0000D07D6B0038D3
+S3152004ACB07D4000787D7C03782C9E000040860050E1
+S3152004ACC0386000013880000238A0008038C00001B6
+S3152004ACD0480045AD7C7E1B79418201203BA00000C3
+S3152004ACE07FE4FB7838A000283D200028807E0008D9
+S3152004ACF080099CC43B4000107C630214907E0008AB
+S3152004AD004BFC890183FE000848000044807E000035
+S3152004AD103BA000004BFF839538000000901E0000E6
+S3152004AD2093FE000838000028901E000C801F000C9B
+S3152004AD30813F0010901F0010913F000CA01F0014AB
+S3152004AD40A13F0016B01F0016B13F0014381D001491
+S3152004AD50B01F000A3BBD002893BE000C93BE00180A
+S3152004AD6038000000901E0014901F0004901F00005D
+S3152004AD7038000000981F0008931F0018801F002029
+S3152004AD8092FF001C392000052C9B0000540002066B
+S3152004AD905120E006901F00209B5F0021418600146D
+S3152004ADA0881B00797F800630B01F002248000008E7
+S3152004ADB0B39F002238000000B01F0026B01F0024D5
+S3152004ADC07FC3F3787FA4EB7848011515B07F002460
+S3152004ADD0B3BF00027FC3F378388000007F25CB7889
+S3152004ADE03D20002888098DF338C0000038E0000093
+S3152004ADF0981F00084BFF457D800100447C0803A66C
+S3152004AE0082E1001C83010020832100248341002841
+S3152004AE108361002C8381003083A1003483C10038F0
+S3152004AE2083E1003C382100404E8000209421FFF02D
+S3152004AE307C0802A693C1000893E1000C900100143B
+S3152004AE407C7E1B783860008C3880000438A0000192
+S3152004AE5048007E117C7F1B794082000C38600000FC
+S3152004AE60480000947FE3FB783880008C4BFCEEA9E5
+S3152004AE7093FF000493FF000093DF002038000000B6
+S3152004AE80B01F006838000002B01F006C3800000CA8
+S3152004AE90B01F00143C003FFF6000C000901F005804
+S3152004AEA0901F005C3D200028800990907FE3FB786A
+S3152004AEB07C09FE707D2002787C0048507C00FE7060
+S3152004AEC0700000A03D200028A169908A9803001BE9
+S3152004AED03D2000288009908C3D20002889298DF367
+S3152004AEE0B163001854001838B003006A993E004C28
+S3152004AEF0907E0028800100147C0803A683C10008E4
+S3152004AF0083E1000C382100104E8000209421FFE8B4
+S3152004AF107C0802A693A1000C93C1001093E10014AF
+S3152004AF209001001C7C7F1B78A81F00082C8000023F
+S3152004AF30813F00207C9E237883A900244085002815
+S3152004AF4038000000B01F00084BFFF0B93D20002850
+S3152004AF503929D83C8009000C300000019009000CE6
+S3152004AF60480000183D2000283929D83C80090010C3
+S3152004AF7030000001900900102C9E003C4086001CE5
+S3152004AF80A81F00763120FFFF7D294910552B06BACC
+S3152004AF907C0448787D7E2378B3DD00487FE3FB7804
+S3152004AFA0480000218001001C7C0803A683A1000C14
+S3152004AFB083C1001083E10014382100184E8000203C
+S3152004AFC09421FFE07C0802A69361000C9381001073
+S3152004AFD093A1001493C1001893E1001C900100244E
+S3152004AFE07C7E1B78839E0020837C0024801E003870
+S3152004AFF0813B0094817E0054552920367C004A14D6
+S3152004B0007D2B00514080013C811C002C2C880000A3
+S3152004B010418601308128000C800900042C80000020
+S3152004B0204186012080080054700900404082004473
+S3152004B030392000006129F424A81E006880E8006CE9
+S3152004B0407D4049D63007FFFF7D203910316AFFFF46
+S3152004B0507C0B51107D2B0039418200147C0752143D
+S3152004B0605400F87E9008006C480000089148006C53
+S3152004B0708008005470090080408200443D2000016D
+S3152004B0806129E848A81E006A80E800707D4049D6F8
+S3152004B0903007FFFF7D203910316AFFFF7C0B5110EA
+S3152004B0A07D2B0039418200147C0752145400F87E0B
+S3152004B0B090080070480000089148007080080054E9
+S3152004B0C0700900204082001C815E005C2C8A0000EE
+S3152004B0D041860010800800682C80000040860014F9
+S3152004B0E0800800645400F87E7C8A00404084005422
+S3152004B0F0A17E00185560F87E7C0A02147D405B967A
+S3152004B10080E80068396B00282C870000200A00019B
+S3152004B1107C0001107C0900F8552907BC7D400038C5
+S3152004B1207C0A4B787D4A59D6418600147C075214F2
+S3152004B1305400F87E9008006848000008914800688A
+S3152004B14083FE00007C9FF0004186002483FF0000DC
+S3152004B150807F000483A3001448007A6D7FA3EB78D4
+S3152004B1604BFF7F497C9FF0004086FFE4807E001CD5
+S3152004B1702C830000418600084BFF7EF17FC3F378C1
+S3152004B18048007B393BE0000093FC00287F63DB7892
+S3152004B1904800675D3D200028800990787C9C00004B
+S3152004B1A04086000893E990787F83E37848011B4919
+S3152004B1B03D2000283929D83C800900143860000035
+S3152004B1C03000000190090014800100247C0803A6A5
+S3152004B1D08361000C8381001083A1001483C10018AD
+S3152004B1E083E1001C382100204E8000204E80002060
+S3152004B1F09421FFF07C0802A693E1000C9001001430
+S3152004B20081430028A90A00082C88000483E300242B
+S3152004B2104086002C68890041200900007D204914BD
+S3152004B22068800033216000007C0B01147D2B037998
+S3152004B230408200802C840043418600782C880003B9
+S3152004B24041850024A80A00122C800003408500189A
+S3152004B250A80A00762C8000004186000CB09F004886
+S3152004B26048000008B08A0076387F00144800792107
+S3152004B2707FE3FB78389F005038A0000048006C0913
+S3152004B280801F00D02C800000418600187C0803A66D
+S3152004B2907FE3FB78809F00D438A000014E800021F4
+S3152004B2A07FE3FB783883009038A0000148006BD9EF
+S3152004B2B0800100147C0803A683E1000C38210010C9
+S3152004B2C04E8000209421FFF07C0802A690010014F1
+S3152004B2D07C681B782C8800047CAB2B783D200025C9
+S3152004B2E03949B0F0418600303808FFF2288000033F
+S3152004B2F04085002C28880015418500843D2000289F
+S3152004B30039298E147C0848AE2C8000004086001013
+S3152004B3104800006C3D2000253949B28C2C8B000056
+S3152004B320418600343C60002838639CAC38C1000850
+S3152004B330812B000C800B000091210008540056BA82
+S3152004B3407D2B0214A0A900027CEB022E7D495378A2
+S3152004B350480000283C60002838639CAC38A00000D4
+S3152004B36038C1000838E000003D20002880099CE40C
+S3152004B3707D4953789001000848011B21800100145F
+S3152004B3807C0803A6382100104E8000208123002843
+S3152004B3902C8900004D860020A00900189009005829
+S3152004B3A04E8000209421FFE87C0802A693A1000C7D
+S3152004B3B093C1001093E100149001001C48007621EB
+S3152004B3C03D20002883E99CAC2C9F00007C7D1B78C3
+S3152004B3D04186004C3D2000283BC9D83C807F00286C
+S3152004B3E02C8300004186002C8923001B7120000237
+S3152004B3F041820020712000FD600000019803001B9B
+S3152004B400801E002030000001901E00204BFFEBF52B
+S3152004B41083FF00002C9F00004086FFC47FA3EB78A7
+S3152004B4204800768D8001001C7C0803A683A1000CAD
+S3152004B43083C1001083E10014382100184E800020B7
+S3152004B4409421FFE07C0802A6934100089361000C36
+S3152004B4509381001093A1001493C1001893E1001C5A
+S3152004B46090010024480075793D2000283D6000287D
+S3152004B4703D400028800990A0812B909C816A9CAC39
+S3152004B4807C7A1B782C8B00007C0049D63D20002832
+S3152004B49090099CB4418600FC3F60002883EB002879
+S3152004B4A02C9F0000838B0000418600B4A81F00084F
+S3152004B4B02C800001418600A83BC0000057C0083CF0
+S3152004B4C07D60FA14A00B000A2C80000041860064DB
+S3152004B4D03000FFFF7C0907342C890000B00B000ADA
+S3152004B4E0408600507FE3FB787FC4F378ABA3000843
+S3152004B4F0480000E97C7F1B7941820064813F00205B
+S3152004B50081290024A0090002700900014182002437
+S3152004B51038600002801B90E47FA4EB787C0803A6A5
+S3152004B5207FE5FB7838C0000038E000134E80002108
+S3152004B5303BDE00012C9E00034085FF84A13F006270
+S3152004B540A01F00602C89000030000001B01F00609D
+S3152004B5504186000C38090001B01F00627F8BE37915
+S3152004B5604082FF3C3C0000016000F4003D4000287E
+S3152004B5707F43D378812A9CB03D6000287D2902141C
+S3152004B580800B9CA8912A9CB030000001900B9CA8AB
+S3152004B5904800751D800100247C0803A68341000809
+S3152004B5A08361000C8381001083A1001483C10018D9
+S3152004B5B083E1001C382100204E8000203800000042
+S3152004B5C039230006B009000A3929FFFE7C891800B0
+S3152004B5D04084FFF44E8000209421FFF07C0802A6CC
+S3152004B5E093E1000C900100142C8400017C7F1B78CD
+S3152004B5F0418601C8418500102C84000041860054F0
+S3152004B6004800031C2C840002418602442C84000337
+S3152004B6104086030CA81F00082C80000A41860028B7
+S3152004B6203D200028A17F006080099CB47C8B00000B
+S3152004B630418500143D200028A009909EB01F0010CB
+S3152004B640480002DC7FE3FB784BFFF979480002CC03
+S3152004B650A01F0012300000017C0907342C89000C3D
+S3152004B660B01F0012408500403800000CB01F0012A5
+S3152004B6703D2000283929D83C8009002430000001C7
+S3152004B68090090024A93F00767FE3FB783009FFFF69
+S3152004B6907C000110540406BA7D2000787C8403784B
+S3152004B6A0480002743D2000283929D83C3D600028F2
+S3152004B6B080090028396B90AC3000000190090028DD
+S3152004B6C0A81F0068A93F0012A95F006A7C001E70AB
+S3152004B6D05529103A7D29582E7C0052147C0049D6CF
+S3152004B6E0A17F006C7C0907347C895800B01F0014A4
+S3152004B6F04084000CB17F0014480000142C8900807B
+S3152004B7004085000C38000080B01F0014A81F0012CA
+S3152004B7102C800003A01F0014B01F000A40850028B7
+S3152004B720807F00204801190D38000000A93F0068D9
+S3152004B730B01F0068A01F006A7D291E707C004A1471
+S3152004B740B01F006A39400000801F003C817F0058EA
+S3152004B750A11F00187D2058107D2949107D294BB83A
+S3152004B7607C0048387D6948787C004B785400F87E04
+S3152004B7707C004396B15F0062B15F0016813F0024CE
+S3152004B7807FE3FB78913F0028216000017D6B5910EF
+S3152004B7907D6958F8552907BC7C005838A17F0018C4
+S3152004B7A07C004B787C0059D6911F0058901F005C72
+S3152004B7B04BFFE851480001683D2000283909D83C50
+S3152004B7C08008002C300000019008002CA81F0012CD
+S3152004B7D02C80000C408600543D200028A15F006088
+S3152004B7E0800990A87C8A0000408400283D200028F7
+S3152004B7F0A81F0068A97F006A812990E07C001E703A
+S3152004B8007C005A147C0049D67C8A00004184001CA2
+S3152004B8107FE3FB78800800C83880003C30000001B4
+S3152004B820900800C8480000F07FE3FB784BFFF1C185
+S3152004B83038000001981F001A7FE3FB784BFFE7C509
+S3152004B84038000000981F001A480000D43D20002824
+S3152004B8503949D83C800A003030000001900A003073
+S3152004B860A97F00082C8B000340850090813F00208F
+S3152004B87081290024A0090002700900084182006C75
+S3152004B8802C8B0005418500643D2000283D6000285E
+S3152004B89080099098812B9CB4A17F00607C004A1477
+S3152004B8A07C8B0000408400547FE3FB7838A00000A2
+S3152004B8B0800A00343900000030000001900A003468
+S3152004B8C0813F001C80FF002480DF0044808900081B
+S3152004B8D038E7FFFF4BFFF34D3D200028A009909E3B
+S3152004B8E0B01F000E480000383D200028A009909A79
+S3152004B8F0B01F000E480000287FE3FB783D20002877
+S3152004B9003929D83C800900383880003C30000001B1
+S3152004B910900900384BFFF5F97C7F1B787FE3FB7891
+S3152004B920800100147C0803A683E1000C3821001052
+S3152004B9304E8000209421FFD07C0802A692E1000CC0
+S3152004B9409301001093210014934100189361001C65
+S3152004B9509381002093A1002493C1002893E1002C15
+S3152004B960900100347C7A1B787C9923787CBC2B78D4
+S3152004B9707CDB33782C99000B7CE63B783BE000009B
+S3152004B9803BA00000408600147F84E3787F65DB7843
+S3152004B9904BFEEA11480004B42C860000418600249C
+S3152004B9A08006000C2C800000418600187CC3337866
+S3152004B9B04BFF76F92C9C0000418600644800005811
+S3152004B9C04800701D83DA00082C9E00003179FFFFA1
+S3152004B9D07C0BC9107D20002655293FFE7D2B00397E
+S3152004B9E07C781B7841820040480070C52C9C00005E
+S3152004B9F04186002C6B290009200900007D2049146A
+S3152004BA006B20000E216000007C0B01147D2B037932
+S3152004BA104182000C7F83E3784BFF769138600016D1
+S3152004BA20480004284186001083FE0028AAFF000847
+S3152004BA30480000083AE0000028990013418503BC19
+S3152004BA403D2000253929B9645720103A7C09002E57
+S3152004BA503D2000253929B9647C004A147C0903A6B3
+S3152004BA604E80042000000050000001E40000009CE9
+S3152004BA70000000B0000000E000000368000001E4BC
+S3152004BA80000001F4000002100000021C000002382D
+S3152004BA90000003940000024C00000264000002D857
+S3152004BAA00000035800000368000001DC0000039432
+S3152004BAB0000003782C9E00004186000C3BA0003831
+S3152004BAC0480003447F43D378480005B17C7D1B7925
+S3152004BAD040820334A01A00027009008041820018B3
+S3152004BAE0A81A00042C8000004086000C3800007838
+S3152004BAF0B01A0004813A000883E9002848000308A4
+S3152004BB007FC3F3787F64DB7848010C4D7C7D1B78FA
+S3152004BB10480002F4A01E00202C8000004086001459
+S3152004BB207FC3F3783880000048010C2D7C7D1B7878
+S3152004BB302C9D0000408602D038000001B01F00086A
+S3152004BB40480002C4A01E00202C8000004086001855
+S3152004BB507FC3F3783880000048010BFD7C7D1B7978
+S3152004BB60408202A47FC3F3787F64DB7848011059AE
+S3152004BB707C7D1B79408202907FE3FB784BFFEFD5D7
+S3152004BB802C830000907F001C408600147FC3F3782A
+S3152004BB90480111113BA000374800026C897F007AC6
+S3152004BBA0288B000D4185003839400000614AFFFF8B
+S3152004BBB05560063E813A00547D4000307C804840E2
+S3152004BBC04084001C380B00015409063E2889000DC8
+S3152004BBD0981F007A7C0B03784085FFD87F43D3785F
+S3152004BBE048005B8139400000614AFA003D20002864
+S3152004BBF07FE3FB788009D83C3D60002830000001B3
+S3152004BC009009D83C38000002B01F00083D200028C7
+S3152004BC10A12990A6800B9CB0B13F000E901F00383E
+S3152004BC207C005214813F0038900B9CB0913F002C2D
+S3152004BC30913F0054913F0028913F0024480000542E
+S3152004BC403BA0002D480001C07FE3FB784800050196
+S3152004BC507C7F1B78480001B07F43D37848005FE19E
+S3152004BC607FE3FB78480005917C7F1B79418201D0D4
+S3152004BC704800001C7FE3FB784BFFE38948000188DA
+S3152004BC80387A00907F84E378480063BD7FE3FB78AD
+S3152004BC904BFFE3717C7D1B784800016C7FE3FB78C6
+S3152004BCA0388000354BFFF2697C7F1B7848000158A9
+S3152004BCB0801A00947F03C378901C002448006DF1F9
+S3152004BCC03860000048000184801A004C2C80000053
+S3152004BCD040860010A01A0006700900404182001C0C
+S3152004BCE0A01A00027009010040820010893F0074E6
+S3152004BCF0712000024182000C3BA000164800010876
+S3152004BD00712000014082000C3BA00046480000F848
+S3152004BD1038000001901C000C813C0008736000026E
+S3152004BD20881F007598090000408200DC881F007473
+S3152004BD3068000003981F0074480000CC815A0094C0
+S3152004BD40813A0090817A009C801A00987D4950504F
+S3152004BD507D6058507C8A5800408400102C8AFE004E
+S3152004BD60418400104800001C2C8BFE0040840014E3
+S3152004BD707F83E3784BFF73353BA000374800008868
+S3152004BD80387A00907F84E378480062BD3800000149
+S3152004BD90813A0090981F001A801F00247FE3FB78C5
+S3152004BDA07C004A14901F002C4BFFE2597C7D1B78A3
+S3152004BDB038000000981F001A4800004C7FC3F3780F
+S3152004BDC07F64DB7848010FE54800003C7FC3F378A5
+S3152004BDD07F64DB784801104D4800002C7FE3FB7814
+S3152004BDE07F64DB784BFFF7F57C7F1B785760402E0A
+S3152004BDF07F390378480000103C600027386354F4E8
+S3152004BE0048006DE12C9F000041860034A01A0002F0
+S3152004BE107009000141820028386000023D20002874
+S3152004BE20800990E47EE4BB787C0803A67FE5FB7852
+S3152004BE3038C000007F27CB784E8000217F03C3784B
+S3152004BE4048006C6D7FA3EB78800100347C0803A640
+S3152004BE5082E1000C83010010832100148341001821
+S3152004BE608361001C8381002083A1002483C10028D0
+S3152004BE7083E1002C382100304E8000209421FFD805
+S3152004BE807C0802A69321000C9341001093610014B0
+S3152004BE909381001893A1001C93C1002093E10024F0
+S3152004BEA09001002C7C7F1B787C9E23787CBA2B788F
+S3152004BEB07CDD33787CFB3B7848006B25813E00088B
+S3152004BEC02C8900003B8000007C791B784086002862
+S3152004BED048006BDD2C9F000140860014807B000007
+S3152004BEE02C830000418600084BFF718138600036A0
+S3152004BEF04800015C2C9A0006418600247FE3FB78E7
+S3152004BF007FC4F3787F45D3787FA6EB787F67DB7889
+S3152004BF104BFF3F357C7C1B78480001282C9F000072
+S3152004BF2083C90028418600B02C9F00014086011455
+S3152004BF302C9D0001807B0000418600102C9D000270
+S3152004BF404186004C4800007C2C8300004186006C0E
+S3152004BF508003000C288000034085006081230008AC
+S3152004BF60800900002C80000041860014881E001BD6
+S3152004BF7060000004981E001B4800004C881E001B0D
+S3152004BF80700000FB981E001B4800003C2C83000018
+S3152004BF904186002881230008812900002C8900007D
+S3152004BFA040850018A01E00187C8900004185000CDD
+S3152004BFB0B13E0018480000103B80001648000008D7
+S3152004BFC03B80002A2C830000418600784BFF709D1D
+S3152004BFD048000070386000003880000A38A00080CD
+S3152004BFE038C00001480031E12C830000907B00001A
+S3152004BFF04086000C3B800037480000482C9D0001F9
+S3152004C000380000049003000C418600102C9D000289
+S3152004C0104186001C48000028881E001B8123000836
+S3152004C0205400077A9009000048000018812300086C
+S3152004C030A01E001890090000480000083B80002A32
+S3152004C0407F23CB7848006A697F83E3788001002CBC
+S3152004C0507C0803A68321000C83410010836100140D
+S3152004C0608381001883A1001C83C1002083E100245E
+S3152004C070382100284E8000209421FFE87C0802A65F
+S3152004C08093A1000C93C1001093E100149001001CAD
+S3152004C0907C7F1B78801F00942C8000004186001032
+S3152004C0A0801F00542C800000408600243D20002858
+S3152004C0B0808990EC3D20002880A990F07FE3FB78CE
+S3152004C0C048005E1D7C631B79408200687FE3FB7811
+S3152004C0D03C8000283884D90C480105B57C631B793B
+S3152004C0E04082005083DF00087FC3F3784BFFED4185
+S3152004C0F07C631B794182001438000000B0030008D9
+S3152004C100386000004800002CA3BF00067FC3F378E4
+S3152004C11057A0043CB01F000657BD07FE48010BD9A3
+S3152004C120A01F0006386000377C00EB78B01F00069D
+S3152004C1308001001C7C0803A683A1000C83C1001087
+S3152004C14083E10014382100184E8000209421FFF04A
+S3152004C1507C0802A693C1000893E1000C9001001408
+S3152004C1607C7F1B78A81F00082C800003813F0020B9
+S3152004C17083C90024418500104BFFEE497C7F1B7840
+S3152004C18048000058A01E0002700900804182002445
+S3152004C190A81E00042C800000408600187FE3FB784C
+S3152004C1A0388000004BFFED697C7F1B784800002C0B
+S3152004C1B07FC3F378480056B9387E00504800658519
+S3152004C1C07FE3FB78480000317C7F1B794182000C99
+S3152004C1D07FE3FB784BFFDE2D7FE3FB7880010014A1
+S3152004C1E07C0803A683C1000883E1000C38210010D3
+S3152004C1F04E8000209421FFF07C0802A693E1000CD7
+S3152004C200900100147C7F1B78A81F00082880000555
+S3152004C210418500683D2000253929C1385400103A4B
+S3152004C2207C09002E3D2000253929C1387C004A147A
+S3152004C2307C0903A64E800420000000180000001884
+S3152004C2400000001800000030000000300000003814
+S3152004C25038000000B01F00087FE3FB784BFFED6534
+S3152004C2607C7F1B784800001438000006480000082C
+S3152004C27038000008B01F00082C9F00004186001CCF
+S3152004C280A81F00082C80000840850010813F00204C
+S3152004C29080690024480056597FE3FB788001001406
+S3152004C2A07C0803A683E1000C382100104E80002070
+S3152004C2B04E8000204E8000209421FFB07C0802A6E8
+S3152004C2C09301003093210034934100389361003C5C
+S3152004C2D09381004093A1004493C1004893E1004C0C
+S3152004C2E0900100547C7A1B787C9923787CB82B782F
+S3152004C2F07CDC3378200800007D604114214900004D
+S3152004C3007C0A49147D7F03797CFB3B787D1E437828
+S3152004C3107D3D4B78418200184BFC83813C00004BC9
+S3152004C3206000000190030000480000C87FC3F37832
+S3152004C33038810028480015412C83FFFF418600B42C
+S3152004C3407FA3EB783881002C4800152D2C83FFFF22
+S3152004C35040860014807E00004BFC912180610028D9
+S3152004C3604800008C938100089361000C3C600027F0
+S3152004C370386355003D200028808991043D200028FB
+S3152004C3803D6000283CE0002538E7C3247F48D37865
+S3152004C39080A991087F29CB787F0AC3788001002859
+S3152004C3A080CB910C900100108001002C93E10018A1
+S3152004C3B093E1001C93E10020900100144BFD9C594D
+S3152004C3C02C83FFFF4186000C3860000048000028BB
+S3152004C3D0807E00004BFC90A5807D00004BFC909D48
+S3152004C3E0806100284BFC90958061002C4BFC908D3D
+S3152004C3F03860FFFF800100547C0803A683010030C7
+S3152004C40083210034834100388361003C83810040CA
+S3152004C41083A1004483C1004883E1004C38210050A5
+S3152004C4204E8000209421FF807C0802A693A10074EC
+S3152004C43093C1007893E1007C900100847D1D4378AC
+S3152004C4407D3E4B78480000717C7F1B782C9FFFFF34
+S3152004C450408600344BFC824580A3000038610008E6
+S3152004C4603C8000273884550C4BFD05B938610008FB
+S3152004C4704BFC72ED7C651B787FC3F378388100080A
+S3152004C4804BFC90DD7FC3F3784BFC8FF17FA3EB78D5
+S3152004C4904BFC8FE97FE3FB78800100847C0803A6AC
+S3152004C4A083A1007483C1007883E1007C3821008055
+S3152004C4B04E8000209421FFD87C0802A69321000CEC
+S3152004C4C093410010936100149381001893A1001CDA
+S3152004C4D093C1002093E100249001002C7C7F1B78DB
+S3152004C4E07C9D23787CBA2B787CDB33787CFC3B7868
+S3152004C4F07D1943784800010D7C7E1B794082000C0F
+S3152004C5003860FFFF480000D07FC3F3787FE4FB78D0
+S3152004C5107FA5EB78480003312C83FFFF418600205A
+S3152004C5202C9C0000418600287FC3F3787F84E3781F
+S3152004C530480001992C83FFFF408600147FC3F378BB
+S3152004C54048000A7D3860FFFF4800008C7F63DB7853
+S3152004C5503C800027388455304BFC71912C83000095
+S3152004C560408600207FC3F3787F44D3787F25CB7819
+S3152004C57038C00000480006917C7F1B784800004C98
+S3152004C5807F63DB783C800027388455344BFC715D0F
+S3152004C5902C830000408600207FC3F3787F44D37821
+S3152004C5A07F25CB7838C00000480003D97C7F1B78D0
+S3152004C5B0480000184BFC80E53C00004B600000035B
+S3152004C5C0900300003BE0FFFF7FC3F378480009F1A6
+S3152004C5D07FE3FB788001002C7C0803A68321000CD2
+S3152004C5E083410010836100148381001883A1001CF9
+S3152004C5F083C1002083E10024382100284E800020B6
+S3152004C6009421FFE07C0802A693E1001C90010024FB
+S3152004C610386000013880013C4BFD3F657C7F1B79E7
+S3152004C620418200907FE3FB783C800027388455388C
+S3152004C6304BFC70F938000000901F0020386000027F
+S3152004C6403880000238A00000480079C52C83FFFFFB
+S3152004C650907F00B4408600107FE3FB784BFD4E614B
+S3152004C6604800005038610008388000104BFCD6A9D9
+S3152004C670380000029801000938000000B001000AC1
+S3152004C680807F00B43881000838A0001048007A3131
+S3152004C6902C83FFFF4186000C7FE3FB7848000018BB
+S3152004C6A07FE3FB784BFD4E19807F00B44BFC8DCD88
+S3152004C6B038600000800100247C0803A683E1001C66
+S3152004C6C0382100204E8000209421FFE07C0802A619
+S3152004C6D0934100089361000C9381001093A10014E8
+S3152004C6E093C1001893E1001C900100247C7E1B79E1
+S3152004C6F07C9D23783D2000273B89554440820018A1
+S3152004C7004BFC7F993C00004B600000029003000024
+S3152004C710480001082C9D0000408600184BFC7F7DB4
+S3152004C7203C00004B6000000190030000480000EC30
+S3152004C7303D200028800991102C8000003BE99110AF
+S3152004C740418600583F6000283F400027809F000014
+S3152004C7507FA3EB784BFC6F952C830000408600303A
+S3152004C760809F00047FC3F3784BFC6FC1801B90F439
+S3152004C7702C80000041860010387A55687FC4F378EF
+S3152004C7804BFCFE3D3860000048000094841F0008DE
+S3152004C7902C8000004086FFB84BFC7F013C00004BF8
+S3152004C7A060000004900300003C6000273863557C39
+S3152004C7B07FA4EB784BFCFE793C60002738635590C8
+S3152004C7C04BFCFE6D3D200028800991102C80000032
+S3152004C7D03BE99110418600383FA000273FC000273F
+S3152004C7E0387D55A080BF00007F84E3784BFCFE4152
+S3152004C7F0881C00002C800020408600083B9E55A8FB
+S3152004C800841F00082C8000004086FFD83C60002747
+S3152004C810386355AC4BFCFE193860FFFF80010024B9
+S3152004C8207C0803A6834100088361000C83810010E1
+S3152004C83083A1001483C1001883E1001C3821002041
+S3152004C8404E8000209421FFE87C0802A693810008EC
+S3152004C85093A1000C93C1001093E100149001001CD5
+S3152004C8607C7F1B797C9E23787CBD2B7840820014A8
+S3152004C8704BFC7E293C00004B6000000248000084EB
+S3152004C88057A00FFE217E00007D2BF1147C1C4B79D2
+S3152004C890418200144BFC7E053C00004B60000001E5
+S3152004C8A048000060387F00A4388000104BFCD4690F
+S3152004C8B038000002981F00A57FC3F3784BFE8DF144
+S3152004C8C02C83FFFF907F00A8408600447FC3F37823
+S3152004C8D04BFEECF12C83FFFF907F00A840860030AE
+S3152004C8E0939F00203C600027386355B07FC4F378BB
+S3152004C8F04BFCFD3D4BFC7DA53C00004B6000000538
+S3152004C900900300003860FFFF48000058387F002459
+S3152004C9107FC4F3784BFC6E152C9D00004186000CD9
+S3152004C920B3BF00B84800000C38000045B01F00B85B
+S3152004C9303D200028800990F42C8000003800000156
+S3152004C940901F0020418600183C600027386355D08C
+S3152004C950A0BF00B87FC4F3784BFCFC6538600000A8
+S3152004C9608001001C7C0803A68381000883A1000C97
+S3152004C97083C1001083E10014382100184E80002062
+S3152004C9809421FBC07C0802A693010420932104244D
+S3152004C990934104289361042C9381043093A1043495
+S3152004C9A093C1043893E1043C900104447C7E1B79B2
+S3152004C9B07C9B23787CBC2B787CD9337840820018E6
+S3152004C9C04BFC7CD93C00004B600000029003000025
+S3152004C9D04800020057890FFE217B00007C0BD914E6
+S3152004C9E07D2B0379418200184BFC7CB13C00004B23
+S3152004C9F06000000190030000480001D8801E00203A
+S3152004CA002C800000408600243C600027386355E8CB
+S3152004CA104BFCFC1D4BFC7C853C00004B6000000657
+S3152004CA2090030000480001AC7FC3F3783C800027C4
+S3152004CA30388455384BFC6CB5380000009801041C2A
+S3152004CA40200300007F00191438610008388002048E
+S3152004CA504BFCD2C53B4102107F43D3783880020475
+S3152004CA604BFCD2B53FE00028801F90F42C800000B8
+S3152004CA70A01E00B83BA00000B01E00A64186001CE4
+S3152004CA803C60002738635610389E00247F65DB7887
+S3152004CA907FC6F3784BFCFB292C990000408600B016
+S3152004CAA038610008388000027F65DB787FC6F3781A
+S3152004CAB048000AFD801F90F42C8000007C7F1B78A0
+S3152004CAC041860014A09E00B83C600027386356288F
+S3152004CAD04BFCFAED7FC3F378388100087FE5FB78B9
+S3152004CAE07F46D37838E00004390000003921041841
+S3152004CAF0480005252C83FFFF4086004C480000D4BF
+S3152004CB00386100083880000048000B497C7F1B7878
+S3152004CB107FC3F378388100087FE5FB7838C00000AE
+S3152004CB2038E000003900000039200000480004E9FC
+S3152004CB307F83E3784BFC89457F63DB784BFC870551
+S3152004CB4048000090A001041AB01E00A62C980000EC
+S3152004CB504186001C7F83E3783881000C38A00200CC
+S3152004CB6038C1041C480007F9480000147F83E37881
+S3152004CB703881000C38A002004BFD0F157C7F1B78F2
+S3152004CB802C9FFFFF4186FF7C3BBD0001380000033C
+S3152004CB90B0010008B3A1000A7FC3F37838810008E6
+S3152004CBA038BF000438C1021038E000047FA8EB78AF
+S3152004CBB039200000480004612C83FFFF41860014BD
+S3152004CBC02C9F02004186FF88386000004800000838
+S3152004CBD03860FFFF800104447C0803A683010420F7
+S3152004CBE083210424834104288361042C8381043013
+S3152004CBF083A1043483C1043883E1043C38210440EE
+S3152004CC004E8000209421FBB87C0802A692C1042001
+S3152004CC1092E10424930104289321042C93410430A3
+S3152004CC20936104349381043893A1043C93C1044052
+S3152004CC3093E104449001044C7C7B1B797C992378F2
+S3152004CC407CB82B787CDF3378408200144BFC7A4DF9
+S3152004CC503C00004B600000024800004C57090FFEC0
+S3152004CC60217900007C0BC9147D2B037941820014A1
+S3152004CC704BFC7A293C00004B600000014800002848
+S3152004CC80801B00202C800000408600283C60002762
+S3152004CC90386356404BFCF9994BFC7A013C00004B17
+S3152004CCA060000006900300003860FFFF480001EC96
+S3152004CCB038610008388002044BFCD05D38610210CC
+S3152004CCC0388002044BFCD0513AE104187F63DB78A8
+S3152004CCD03C800027388455384BFC6A113800000004
+S3152004CCE09801041C3D200028800990F4A13B00B83B
+S3152004CCF02C8000003B400001B13B00A6200300002D
+S3152004CD007EC019144186001C3C600027386356688F
+S3152004CD10389B00247F25CB787F66DB784BFCF8A1F3
+S3152004CD202C9F00014086001C38000004B001000836
+S3152004CD3038000000B001000A38A000044800001C96
+S3152004CD4038610008388000017F25CB787F66DB7840
+S3152004CD504800085D7C651B787F63DB783881000892
+S3152004CD6038C1021038E000037F48D3787EE9BB78C7
+S3152004CD70480002A57C7D1B782C9DFFFF418600C8B8
+S3152004CD802C9A00013BBDFFFC40860010A001041A2A
+S3152004CD903AE00000B01B00A62C960000418600381D
+S3152004CDA07F03C3782C9D01FF388102147FA5EB787D
+S3152004CDB038C1041C4CE623827CE0002654E747FE57
+S3152004CDC0480006BD7C7C1B78480000483B80FFFF5A
+S3152004CDD0480000403B8000007C9CE8003BE00000CB
+S3152004CDE03BC102144084002C7F03C3787FC4F378AC
+S3152004CDF07CBFE8504BFC87697C631B794081FFD05C
+S3152004CE007FFF1A147C9FE8007FDE1A144184FFDC1E
+S3152004CE102C9CFFFF408600403861000838800000C3
+S3152004CE20480008317C651B787F63DB7838810008ED
+S3152004CE3038C0000038E00000390000003920000026
+S3152004CE40480001D57F23CB784BFC83F93860FFFF5C
+S3152004CE5048000048380000042C9D01FFB00100085A
+S3152004CE60B341000A38A000044085000C3B5A000157
+S3152004CE704BFFFEE87F63DB783881000838A0000486
+S3152004CE8038C0000038E000003900000039200000D6
+S3152004CE9048000185386000008001044C7C0803A604
+S3152004CEA082C1042082E10424830104288321042CE2
+S3152004CEB083410430836104348381043883A1043C90
+S3152004CEC083C1044083E10444382104484E80002071
+S3152004CED09421FFF07C0802A693E1000C9001001433
+S3152004CEE07C7F1B794082001C4BFC77B13C00004BB5
+S3152004CEF060000002900300003860FFFF480000AC89
+S3152004CF00801F00202C8000014086001C3C600027E6
+S3152004CF1038635684A0BF00B8389F00244BFCF6A182
+S3152004CF20480000103C6000273863569C4BFCF69161
+S3152004CF303D200028800990F42C80000041860010B2
+S3152004CF403D20002738A956D44800000C3D20002750
+S3152004CF5038A956D83D200028800990F82C80000056
+S3152004CF60418600103D20002738C956D44800000CBD
+S3152004CF703D20002738C956D83C600027386356AC74
+S3152004CF807FE4FB784BFCF6393D200028808991000C
+S3152004CF903D2000283C60002780A990FC386356DC9D
+S3152004CFA04BFCF61D38600000800100147C0803A6A3
+S3152004CFB083E1000C382100104E8000209421FFF0DC
+S3152004CFC07C0802A693E1000C900100147C7F1B7957
+S3152004CFD04182001C807F00B44BFC84A17FE3FB7854
+S3152004CFE04BFD44DD38600000480000184BFC76AD4C
+S3152004CFF03C00004B60000002900300003860FFFFF5
+S3152004D000800100147C0803A683E1000C382100105B
+S3152004D0104E8000209421FD807C0802A67D80002677
+S3152004D02092A1025492C1025892E1025C93010260D9
+S3152004D03093210264934102689361026C9381027086
+S3152004D04093A1027493C1027893E1027C9001028435
+S3152004D050918102507C7E1B787C9723787CB92B782F
+S3152004D0607CDD33787CF53B787D1843787D364B78A8
+S3152004D07038610038388000084BFCCC9D3D200028C0
+S3152004D0803B600000834990FC3D20002881299100C3
+S3152004D0907F4BD0F87D6BFE707D6058F82C8900009C
+S3152004D0A07000000A7F4B58387D7A0378418400103B
+S3152004D0B07C89D00041840010480000302C9A00025C
+S3152004D0C0408500283D200028816991007D6058F81C
+S3152004D0D07C00FE707C0900F8552907BC7D60003869
+S3152004D0E07C0B4B78480000087F4BD378916100383D
+S3152004D0F03B8100082D1600003D200028800990F869
+S3152004D1002C800000418600183C60002738635714A1
+S3152004D1107EE4BB787F25CB7848000611807E00B458
+S3152004D1207EE4BB787F25CB7838C0000038FE00A487
+S3152004D13039000010480072B57C83C800408601D8A7
+S3152004D1402C9D00004086003438600000480001CC45
+S3152004D1503C60002738635740A09D000238BD000478
+S3152004D1604BFCF4CD4BFC75353C00004B60000008AD
+S3152004D17090030000480001A0386100083880002090
+S3152004D1804BFCCB95386001007F84E37838A00000FF
+S3152004D19038C0000038E10038817E00B43800000130
+S3152004D1A0556AE8FA556B06FE7D2AE02E7C00583037
+S3152004D1B07D2903787D2AE12E4800B4E97C7F1B78FB
+S3152004D1C02C9FFFFF418601502C9F0000408600348F
+S3152004D1D0800100387F7B02147C9BD0004184FF1C95
+S3152004D1E03C6000273863571C4BFCF4454BFC74AD5C
+S3152004D1F03C00004B60000007900300004800011823
+S3152004D200807E00B43880000138A100404BFC837135
+S3152004D2102C83FFFF41860100800100402C80000002
+S3152004D2204186FF583800001090010044807E00B4E7
+S3152004D2307FA4EB7838A0020438C0000038E1002827
+S3152004D24039010044480073B97C7F1B782C9FFFFF6B
+S3152004D250418600C43D200028800990F82C800000D7
+S3152004D260418600183C600027386357347FA4EB7846
+S3152004D2707FE5FB78480004B5A17D00002C8B0005D2
+S3152004D2804186FED0408A0014A001002AA13E00A6B1
+S3152004D2907C8048004086FEE47C9558004086FEDC6F
+S3152004D2A0A01D00027C80C00040860018418A000C24
+S3152004D2B0A001002A901600007FE3FB784800005C5A
+S3152004D2C0807E00B43880000138A100404BFC82B136
+S3152004D2D02C83FFFF41860040800100402C80000003
+S3152004D2E041860024807E00B43881004838A0020498
+S3152004D2F038C0000038E000003900000048007301FF
+S3152004D3004BFFFFC0A01D00023938FFFF7C80480078
+S3152004D3104186FDE83860FFFF800102848181025046
+S3152004D3207C0803A682A1025482C1025882E1025CCF
+S3152004D3308301026083210264834102688361026C53
+S3152004D3408381027083A1027483C1027883E1027C03
+S3152004D3507D820120382102804E8000209421FFD82E
+S3152004D3607C0802A69341001093610014938100184F
+S3152004D37093A1001C93C1002093E100249001002C6A
+S3152004D3807C7B1B787CBC2B783BC000007C9EE00019
+S3152004D3907C9A23787CDD33787F5FD378408400B40D
+S3152004D3A0881D0000680B000A212B00007D69591492
+S3152004D3B06800000D212000007C0901147D69037991
+S3152004D3C04182001C7C0B00D07000000A98010008E2
+S3152004D3D038000000981D0000480000607F63DB7859
+S3152004D3E03881000838A000014BFC81552C83FFFFAF
+S3152004D3F04086000C3860FFFF4800005C2C83000048
+S3152004D40041860050894100085540063E6809000AB5
+S3152004D410216900007D2B49146800000D216000005D
+S3152004D4207C0B01147D2B037941820010995D000049
+S3152004D4303800000D980100083BDE00018801000831
+S3152004D4407C9EE000981F00003BFF00014184FF54AE
+S3152004D4507C7AF8508001002C7C0803A683410010B6
+S3152004D460836100148381001883A1001C83C10020DA
+S3152004D47083E10024382100284E8000209421FFD8FF
+S3152004D4807C0802A6936100149381001893A1001CC2
+S3152004D49093C1002093E100249001002C7C7C1B780E
+S3152004D4A07C9D23782C8500003BE5FFFF7CDE3378CA
+S3152004D4B07CFB3B7841860094893D00009921000835
+S3152004D4C0881E00002C80000D3BBD00013960000041
+S3152004D4D0408600302C89000A4186001C7F83E3782D
+S3152004D4E07FC4F37838A000014BFC80752C830000A0
+S3152004D4F04085008488010008212000007D690114EC
+S3152004D50088010008696900016800000D7C0000D0CC
+S3152004D51054000FFE7D2B00394182001C7F83E37863
+S3152004D5203881000838A000014BFC80352C8300008C
+S3152004D530408500442C9F0000880100083BFFFFFF24
+S3152004D540981E00004086FF742C9B000041860038FC
+S3152004D550881E00002C80000D4086002C7F83E378F3
+S3152004D5607FC4F37838A000014BFC7FF52C830000A0
+S3152004D5704185000C3860FFFF480000103800000089
+S3152004D580981E0000386000008001002C7C0803A649
+S3152004D590836100148381001883A1001C83C10020A9
+S3152004D5A083E10024382100284E8000209421FFE0C6
+S3152004D5B07C0802A6934100089361000C9381001015
+S3152004D5C093A1001493C1001893E1001C9001002438
+S3152004D5D07C7B1B78B09B00003BBB00027FA3EB78CF
+S3152004D5E07CBC2B787F84E3787CDA33784BFC613DF2
+S3152004D5F07F83E3784BFC61693B8000007F9D19EEB5
+S3152004D6003BBD00017FA3EB787F44D3784BFC611D9F
+S3152004D6107F43D3784BFC61497FBD1A149B9D000040
+S3152004D6203BBD00017C7BE850800100247C0803A6D6
+S3152004D630834100088361000C8381001083A10014B8
+S3152004D64083C1001883E1001C382100204E8000206D
+S3152004D6509421FFF07C0802A693E1000C90010014AB
+S3152004D6603C0000296000000D7C8400004186003CBB
+S3152004D670418500183C000014600000037C840000EF
+S3152004D68041860028480000283C0000306000000243
+S3152004D6907C840000418600143C00003860000003AE
+S3152004D6A07C84000040860008388000013D20002844
+S3152004D6B0800991402C8000003BE991404184002858
+S3152004D6C0801F00007C80200041860010841F0008F3
+S3152004D6D02C8000004084FFEC801F00002C8000007A
+S3152004D6E04084000C3D2000283BE991403800000589
+S3152004D6F0B0030000A01F0002B0030002809F0004B4
+S3152004D700386300044BFC6025807F00044BFC605189
+S3152004D71038630005800100147C0803A683E1000C0D
+S3152004D720382100104E8000209421FFE87C0802A6B0
+S3152004D7309381000893A1000C93C1001093E1001477
+S3152004D7409001001C7C9D23787CBC2B78A0BD000016
+S3152004D750200500007D202914200500057C000110E9
+S3152004D7607C0000D07D2B03797C7E1B787CBF2B78B4
+S3152004D770418200143C600027386358247FC4F37820
+S3152004D780480000D0386000004BFCE7D17C641B784D
+S3152004D7903C600027386358343D2000283929918875
+S3152004D7A057E0103A7CC9002E7FC5F3784BFCEE1166
+S3152004D7B0381FFFFF288000044185009C3D2000255A
+S3152004D7C03929D6E05400103A7C09002E3D20002544
+S3152004D7D03929D6E07C004A147C0903A64E8004200D
+S3152004D7E00000001400000014000000380000004C63
+S3152004D7F0000000603BBD00027FA3EB783880000068
+S3152004D8004BFCC53938A300013C60002738635844D3
+S3152004D8107FA4EB784800003C3C60002738635858C6
+S3152004D820A09D000238BCFFFC48000028A09D0002F1
+S3152004D8303C600027386358704BFCED85480000187F
+S3152004D8403C6000273863587CA09D000238BD000444
+S3152004D8504BFCED6D8001001C7C0803A68381000827
+S3152004D86083A1000C83C1001083E100143821001821
+S3152004D8704E8000209421FFA07C0802A693810050AC
+S3152004D88093A1005493C1005893E1005C9001006475
+S3152004D8907C7E1B787C9C23783861000838800010B5
+S3152004D8A04BFCC475380000029801000938000000BA
+S3152004D8B0B001000A3C600027386358903BE1001809
+S3152004D8C07FE4FB784BFE9C152C83FFFF41860110D9
+S3152004D8D07FE3FB784BFEDCED2C83FFFF9061000C8D
+S3152004D8E0418600FC386000023880000138A0000020
+S3152004D8F04800671D7C7F1B782C9FFFFF418600E034
+S3152004D900386000023880000138A000004800670112
+S3152004D9102C83FFFF907E00004086000C7FE3FB787B
+S3152004D920480000B83BA100407FA3EB78388000086C
+S3152004D9304BFCC3E538000005900100403800000088
+S3152004D9409001004438000010900100489001004CDA
+S3152004D9507FE3FB783881000838A00010480067610F
+S3152004D9602C83FFFF418600687FE3FB78388100081B
+S3152004D97038A10048480070152C83FFFF41860050CB
+S3152004D9807FE3FB7838800005480067D12C83FFFFAE
+S3152004D9904186003C807E00003881000838A00010B3
+S3152004D9A07FA6EB78480069992C83FFFF41860020E7
+S3152004D9B07FE3FB783881003038A1004C4800682981
+S3152004D9C02C83FFFF907C00004086001C7FE3FB78BD
+S3152004D9D04BFC7AA9807E00004BFC7AA13860FFFFBD
+S3152004D9E0480000107FE3FB784BFC7A9138600000F6
+S3152004D9F0800100647C0803A68381005083A100541F
+S3152004DA0083C1005883E1005C382100604E800020E9
+S3152004DA103CA0002880E58EF8288700077C661B78C2
+S3152004DA204085000C3860FFFF4E8000203D200028F2
+S3152004DA301D0700343929D3A87D684A14814B000474
+S3152004DA402C8A0000408600C0380000027C084B2E39
+S3152004DA503D20002839298D78912B000438000011A7
+S3152004DA60B00B000838000003B00B000A3D20002547
+S3152004DA703929DA78912B000C914B00103D20002592
+S3152004DA803929E304912B00143D2000243929FD442F
+S3152004DA90912B00183D2000253929E5F8912B001CEF
+S3152004DAA03D2000253929DA0C912B0020914B0024A6
+S3152004DAB0914B0028914B002C914B003038070001E4
+S3152004DAC090058EF838600000800600003D2000286E
+S3152004DAD0540007FE900991A0800600003D200028EE
+S3152004DAE05400FFFE900991A4800600043D200028DE
+S3152004DAF0900991C0800600083D200028900991C411
+S3152004DB004E800020386000004E8000209421FFE8DB
+S3152004DB107C0802A693A1000C93C1001093E1001483
+S3152004DB209001001C3D2000283800000090099CB874
+S3152004DB3039299CB83FA00028913DD96C3D20002866
+S3152004DB40A06991C83BBDD96C388000043CA000284C
+S3152004DB5038A5D97448005191907D00048001001C99
+S3152004DB607C0803A683A1000C83C1001083E1001462
+S3152004DB70382100184E8000209421FFA87C0802A694
+S3152004DB8092E10034930100389321003C93410040F4
+S3152004DB90936100449381004893A1004C93C10050A3
+S3152004DBA093E100549001005C7C7A1B787C9D237859
+S3152004DBB038000000900100283D2000288009D9441F
+S3152004DBC0289D00143BE9D944300000019009D9442A
+S3152004DBD040850010388000004BFF12493BA00014FA
+S3152004DBE0801A000C389D00087C802040837A000827
+S3152004DBF0408400287F43D378480019F57C7A1B7922
+S3152004DC0040820014801F000430000001901F00048D
+S3152004DC10480006B4837A00087F1BEA14A3F800049C
+S3152004DC20289F000740850018A01B00027C80F8006E
+S3152004DC30418600307C9F00404085001C3D20002802
+S3152004DC403929D9448009000C300000019009000CC0
+S3152004DC504800065C7F43D3787C80F8504800181926
+S3152004DC6039610008801B0000813B0004815B0008A9
+S3152004DC70811B000C90010008912B0004914B000895
+S3152004DC803D200028800991A4910B000C2C800000D3
+S3152004DC90801B0010900B001041860064A01800061B
+S3152004DCA02C8000004186005838000000901B00009C
+S3152004DCB0901B000438000000981B00087F43D3788B
+S3152004DCC0A0180004389F0014B01B000A4800E6116F
+S3152004DCD05460043E2C800000B07800064186002063
+S3152004DCE03D2000283929D944800900087F43D37868
+S3152004DCF03000000190090008480005C8807B001008
+S3152004DD003D20E000546000067C804800408601BC2B
+S3152004DD10809A00144BFED7B57C631B79418201ACF3
+S3152004DD203D200028A0180000392991A8B009000236
+S3152004DD30801B000C90090004801A000C813A00080C
+S3152004DD403000FFE4901A000C3929001C913A00088F
+S3152004DD50832300182C9900003B800000418601187B
+S3152004DD603D2000283AE9D94483D90008A138000285
+S3152004DD70A01E00207C804800408600F0813E001CC6
+S3152004DD802C89000041860010801B00107C8900002D
+S3152004DD90408600D8813E00142C890000418600204C
+S3152004DDA0801B000C7C890000408600C0A01E001841
+S3152004DDB0A13800007C804800408600B02C9C0000DE
+S3152004DDC0418600983D200028806991D47F44D378E9
+S3152004DDD038A000003CC03B9A60C6CA0038E0000167
+S3152004DDE04BFF572D7C7F1B79418200703BBC005032
+S3152004DDF07FA3EB783C800028388491A87FE5FB78C4
+S3152004DE0038C000004800445D2C8300004086001C76
+S3152004DE107FE3FB784BFF52958017001830000001F2
+S3152004DE2090170018480000347F83E3787FA4EB78AA
+S3152004DE3038A0000048004051801C00D02C800000EF
+S3152004DE40418600187C0803A67F83E378808300D468
+S3152004DE5038A000014E800021839E0024A01C0002CD
+S3152004DE607009020441820010833900002C990000B5
+S3152004DE704086FEF82C9C0000418601C83BFC0050DD
+S3152004DE807FE3FB783C800028388491A87F45D378AB
+S3152004DE9038C00000480043CD2C830000418603FC93
+S3152004DEA07F83E3787FE4FB7838A0000048003FD9DD
+S3152004DEB0801C00D02C8000004186040C7C0803A61C
+S3152004DEC07F83E378480003C4801B00109001002060
+S3152004DED0809A0014386100204BFED1052C83000063
+S3152004DEE0418601C43D200028A0180000392991A8A4
+S3152004DEF0B0090002801B000C90090004801A000C53
+S3152004DF00813A00083000FFE4901A000C3929001CDD
+S3152004DF10913A00083D20002883C99CB82C9E000015
+S3152004DF203B800000418601143D2000283B29D9442A
+S3152004DF30A01E0020A13800027C804800408600F004
+S3152004DF40813E001C2C89000041860010801B001095
+S3152004DF507C890000408600D8813E00142C8900006C
+S3152004DF6041860020801B000C7C890000408600C06E
+S3152004DF70A01E0018A13800007C804800408600B00E
+S3152004DF802C9C0000418600983D200028806991D46D
+S3152004DF907F44D37838A000003CC03B9A60C6CA00B0
+S3152004DFA038E000014BFF55697C7F1B794182007064
+S3152004DFB03BBC00507FA3EB783C800028388491A892
+S3152004DFC07FE5FB7838C00000480042992C83000086
+S3152004DFD04086001C7FE3FB784BFF50D18019001844
+S3152004DFE03000000190190018480000347F83E3783C
+S3152004DFF07FA4EB7838A0000048003E8D801C00D01A
+S3152004E0002C800000418600187C0803A67F83E378D1
+S3152004E010808300D438A000014E800021839E0024F2
+S3152004E020A01C0002700902044182001083DE000055
+S3152004E0302C9E00004086FEFC2C9C00004086001C82
+S3152004E0403D2000283929D9448009001430000001D4
+S3152004E05090090014480002583BFC00507FE3FB78EB
+S3152004E0603C800028388491A87F45D37838C00000A6
+S3152004E070480041F12C830000418602207F83E37807
+S3152004E0807FE4FB7838A0000048003DFD801C00D0CA
+S3152004E0902C800000418602307C0803A67F83E37827
+S3152004E0A0480001E83D20002883C991B82C9E000031
+S3152004E0B041860044A01E0020A13800027C8048002E
+S3152004E0C040860034A01E0018A13800007C80480039
+S3152004E0D040860024801E0014813B000C7C8048006E
+S3152004E0E040860014801E001C813B00107C80480062
+S3152004E0F0418600E83D2000283BE9D9443C600028BD
+S3152004E100801F001C3863D96C30000001901F001C4E
+S3152004E110801B000C3881002090010020801B0010F9
+S3152004E12038C1002490010024A0B80000A0F8000201
+S3152004E130390000014800F15D7C7E1B794082009401
+S3152004E140801F0020813F001030000001901F002016
+S3152004E15039290001913F0010881A001170090030F6
+S3152004E16041820014801F001430000001901F001407
+S3152004E1704800013C3961000880010008812B000415
+S3152004E180814B0008810B000C901B0000913B00047E
+S3152004E190915B00083D20002881298F04911B000CE7
+S3152004E1A02C890000800B0010901B0010418601185A
+S3152004E1B07F43D378388000037D2803A638A0000344
+S3152004E1C038C0000038E000004E800021480000F8E6
+S3152004E1D03D20002893C991B83D200028A0180000AE
+S3152004E1E0392991A8B0090002801B000C900900046B
+S3152004E1F0813E0040712000074182002071200004E6
+S3152004E20041820018387B00103880000438A00007AB
+S3152004E210480000E9906100283BBD00083C800028A6
+S3152004E220388491A87F45D378801A000C813A001847
+S3152004E2307C1D0050901A000C7D3D4850801A000821
+S3152004E240913A00187C00EA14901A0008807E002473
+S3152004E25080C1002838630050480040092C83000000
+S3152004E26041860038807E002438A000003883005080
+S3152004E27048003C15807E0024800300D02C800000BA
+S3152004E280418600447C0803A6808300D438A000017C
+S3152004E2904E800021480000303D2000283929D944E9
+S3152004E2A08009001830000001900900187F43D378B4
+S3152004E2B04BFF4DF9806100282C830000418600081D
+S3152004E2C04BFF4DE98001005C7C0803A682E1003403
+S3152004E2D0830100388321003C83410040836100444C
+S3152004E2E08381004883A1004C83C1005083E10054FC
+S3152004E2F0382100584E8000209421FFE87C0802A68D
+S3152004E3009381000893A1000C93C1001093E100149B
+S3152004E3109001001C7C7D1B787C9F23787CBC2B7809
+S3152004E320386000013880000E38A0008038C0000113
+S3152004E33048000E957C7E1B79418200387FA3EB78BA
+S3152004E3407FE5FB7883BE00083BFF000C389D000C5C
+S3152004E3504BFC2F3993FE000C93FD0000380000007F
+S3152004E360901D0004939D00087FC3F378480000089D
+S3152004E370386000008001001C7C0803A68381000805
+S3152004E38083A1000C83C1001083E1001438210018F6
+S3152004E3904E8000209421FFF07C0802A693E1000C15
+S3152004E3A0900100147C7F1B78813F0024B0890048AB
+S3152004E3B0807F002438A000003883005048003AC9E2
+S3152004E3C0807F0024800300D02C8000004186001426
+S3152004E3D07C0803A6808300D438A000014E80002147
+S3152004E3E0807F002438A000013883009048003A99A1
+S3152004E3F0800100147C0803A683E1000C3821001058
+S3152004E4004E8000209421FFF07C0802A6900100147F
+S3152004E4107C681B783808FFF2288000037CAB2B78B5
+S3152004E4204085002028880014418500803D2000284E
+S3152004E43039298E147C0848AE2C8000004186006C55
+S3152004E4402C8B0000418600383C60002838639CB839
+S3152004E45038C10008812B000C800B00009121000894
+S3152004E460540056BA7D2B0214A0A900023D20002593
+S3152004E4707CEB022E3929E2944800002C3C600028CB
+S3152004E48038639CB838A0000038C1000838E0000082
+S3152004E4903D20002880099CE43D2000253929E2946A
+S3152004E4A0900100084800E9F5800100147C0803A6C1
+S3152004E4B0382100104E8000209421FFD87C0802A623
+S3152004E4C09321000C9341001093610014938100184A
+S3152004E4D093A1001C93C1002093E100249001002CF9
+S3152004E4E07C7D1B787CC333797C9E23787CBB2B78FC
+S3152004E4F0839E0018418200084BFF4BB12C9B0000E1
+S3152004E50041860044801D00142C800000833D001C9D
+S3152004E5104186000C3BE00038480001A8480044C16D
+S3152004E5207C7A1B787FA3EB787F64DB784800E699B6
+S3152004E5307C7F1B79418200247F43D3784800457130
+S3152004E54048000180801D00142C8000004086000CA9
+S3152004E5503BE000394800016C813E001C817E0008A6
+S3152004E560800900007C0058502880001B4085001C30
+S3152004E570392BFFE4801E000C913E00083000001C5D
+S3152004E580901E000C480000187FC3F3783880001CC6
+S3152004E59038A0000148000DF97C7E1B782C9E0000D3
+S3152004E5A04086000C3BE0003748000118881E001105
+S3152004E5B07009000241820010801E00183000001CE1
+S3152004E5C0901E0018393C000883FE0008380000001D
+S3152004E5D0901F0004901F000038000000981F0008B8
+S3152004E5E038000011981F0009B13F000A801D001C45
+S3152004E5F03D200028901F000C801D0014812991A025
+S3152004E600901F0010A01D00202C890000B01F0014AC
+S3152004E610A01F000AA17D0018B01F001838000000B2
+S3152004E620B01F001AB17F0016418600287FC3F378F5
+S3152004E630389C001C4800DCA95460043E2C80000051
+S3152004E640B07F001A4086000C3800FFFFB01F001A66
+S3152004E650381C001CB01F00027FC3F378881D004CB1
+S3152004E6603D200028981F0008881D00453929D944D3
+S3152004E670981F00018009002438BD002C30000001B9
+S3152004E68090090024813D0024809D0058A0C90002E1
+S3152004E69080FD005C54C606B64BFF0CD92C9B0000AB
+S3152004E6A07C7F1B78418600247FA3EB784800E5F520
+S3152004E6B0933D001C7F43D378480043F54800000C63
+S3152004E6C07FC3F3784BFF49E57FE3FB788001002C79
+S3152004E6D07C0803A68321000C834100108361001467
+S3152004E6E08381001883A1001C83C1002083E10024B8
+S3152004E6F0382100284E8000209421FFD87C0802A6C9
+S3152004E7009321000C93410010936100149381001807
+S3152004E71093A1001C93C1002093E100249001002CB6
+S3152004E7207C7C1B787CBA2B787CDB33782C84000B9E
+S3152004E7307CF93B783BA0000083FC00084086001847
+S3152004E7407F44D3787F65DB787F26CB784BFEBC5518
+S3152004E7504800026C201F00007D20F9143164FFFF5D
+S3152004E7607C0B21107D2B00394082009028840015D3
+S3152004E770418502103D2000253929E6985480103A17
+S3152004E7807C09002E3D2000253929E6987C004A1470
+S3152004E7907C0903A64E80042000000058000001A432
+S3152004E7A0000000C8000001D8000000EC000001D8D9
+S3152004E7B00000013400000178000001E0000001841B
+S3152004E7C00000019C000001E8000001D0000001E0E7
+S3152004E7D0000001D8000001B0000001C0000001D8EB
+S3152004E7E0000001D8000001D8000001D8000001D89B
+S3152004E7F02C9F00004186000C3BA000164800019087
+S3152004E800480041DD7C7E1B787F83E3783C800028AA
+S3152004E8103884D96C4800DE797C7D1B787FC3F378F5
+S3152004E8204800428D2C9D0000408601643D2000282E
+S3152004E830808991C03D20002880A991C47F83E378F4
+S3152004E8404800369D7C7D1B79408201443D2000286A
+S3152004E850817C000888098DF3980B004C4800013010
+S3152004E8604800417D7C7E1B787FE3FB787F64DB78E0
+S3152004E8704800DEE57C7D1B787FC3F378480042316F
+S3152004E8804800010C801F00142C8000004186000CD7
+S3152004E8903BA00038480000F8480041457C7E1B78A0
+S3152004E8A07FE3FB787F64DB784800E31D7C7D1B785F
+S3152004E8B07FC3F378480041F92C9D0000408600D0A0
+S3152004E8C07F83E37848002EB5480000C4801F0014D7
+S3152004E8D02C8000004086000C3BA00039480000B084
+S3152004E8E0480040FD7C7E1B787FE3FB784800E3B537
+S3152004E8F038000000901F001C7FC3F378480041B104
+S3152004E900A01C00067000FFFDB01C00064800008015
+S3152004E9107F83E37848003329480000747FE3FB783B
+S3152004E9207F44D3787F65DB787F26CB784BFFFB8DBE
+S3152004E9304800008C7F83E37848002FB57FE3FB787B
+S3152004E940480000A9480000487FE3FB787F64DB7811
+S3152004E9504800E459480000387FE3FB787F64DB787D
+S3152004E9604800E4C1480000283860000048000050F0
+S3152004E9703BA0002D480000183860002D48000040B8
+S3152004E9803C60002738635894480042592C9900006B
+S3152004E990418600183C600027386358A04BFCDC21D4
+S3152004E9A07F23CB784BFF47052C9A00004186000C29
+S3152004E9B07F43D3784BFF46F57FA3EB788001002C69
+S3152004E9C07C0803A68321000C834100108361001474
+S3152004E9D08381001883A1001C83C1002083E10024C5
+S3152004E9E0382100284E8000209421FFF07C0802A6BE
+S3152004E9F093C1000893E1000C900100147C7F1B78DE
+S3152004EA0048003FDD3D200028800991B87C9F000006
+S3152004EA107C7E1B784086000C38000000900991B853
+S3152004EA207FE3FB784800E2D17FC3F3784800408136
+S3152004EA30800100147C0803A683C1000883E1000C2E
+S3152004EA40382100104E8000207C6B1B794182001CEB
+S3152004EA503D20002880099CC891699CC83860000024
+S3152004EA60900B001C4E8000203860FFFF4E80002053
+S3152004EA709421FFF07C0802A693C1000893E1000CC0
+S3152004EA80900100143D20002883C99CC82C9E0000B8
+S3152004EA9041860058801E00082C8000004186000C08
+S3152004EAA07C0803A64E80002183FE0014801E0018D5
+S3152004EAB07C9F004040840028801F00202C8000007A
+S3152004EAC04186000C7C0803A64E800021801E001877
+S3152004EAD03BFF00347C9F00404184FFE083DE001C22
+S3152004EAE02C9E00004086FFB03D600028800B9CC40D
+S3152004EAF02C80000F4185000C38000010900B9CC41C
+S3152004EB003D200028800B9CC481299CBC3D600028A4
+S3152004EB107C004A14900B9CC04BFDB8613D20002814
+S3152004EB20906991D04BFDB8553D200028906991CC31
+S3152004EB3048000369480002B5800100147C0803A636
+S3152004EB4083C1000883E1000C382100104E80002088
+S3152004EB503D20002881299CC82C8900004186001C60
+S3152004EB60800900007C801800418600188129001C39
+S3152004EB702C8900004086FFEC386000004E8000207F
+S3152004EB8080690014800900187C8300404084002496
+S3152004EB90A92300002C8900004186000C7C892000D2
+S3152004EBA04D860020386300347C8300404184FFE492
+S3152004EBB0386000004E8000207C631B7939000000F9
+S3152004EBC04082000C386000004E8000203D20002842
+S3152004EBD081299CC82C8900004186FFEC800900000D
+S3152004EBE07C8018004186001C8129001C2C89000089
+S3152004EBF04086FFEC4BFFFFD07D4353784E800020A8
+S3152004EC0081490014800900187C8A004040840070E1
+S3152004EC107C06037838EA00082F050003A96700005C
+S3152004EC207C8B200040860010A80A00007C802800E7
+S3152004EC304186FFC8409A0038A80A00002C800003A9
+S3152004EC404086002C212B00007C09591421680000E1
+S3152004EC507D2B41147C0048383000FFFF7C000110D6
+S3152004EC607D0900387D4300787D281B78394A003495
+S3152004EC707C8A304038E700344184FFA47D034378FE
+S3152004EC804E8000209421FFF87C0802A69001000CF7
+S3152004EC90288400024185000C386000154800009C39
+S3152004ECA0816300002C8B0000814300044086000C05
+S3152004ECB038600000480000843D20002881299CC833
+S3152004ECC02C89000041860070800900007C80580051
+S3152004ECD0418600288129001C2C8900004086FFECEF
+S3152004ECE0480000547C0803A6386300083884FFFED5
+S3152004ECF04E800021480000448169001480090018D0
+S3152004ED007C8B004040840030392B00303160003049
+S3152004ED10A809FFD87C805000408600108009000096
+S3152004ED202C8000004086FFC0392900347C89584055
+S3152004ED304184FFE03860002A8001000C7C0803A689
+S3152004ED40382100084E8000209421FFE87C0802A682
+S3152004ED509381000893A1000C93C1001093E1001441
+S3152004ED609001001C3D20002883C99CC82C9E0000CD
+S3152004ED707C7D1B787C9C23784186005083FE00147E
+S3152004ED80801E00187C9F004040840034801F00149D
+S3152004ED902C800000418600187C0803A67FA3EB780C
+S3152004EDA07F84E37838A000004E800021801E00185E
+S3152004EDB03BFF00347C9F00404184FFD483DE001C4B
+S3152004EDC02C9E00004086FFB88001001C7C0803A608
+S3152004EDD08381000883A1000C83C1001083E1001401
+S3152004EDE0382100184E8000209421FFE87C0802A6D2
+S3152004EDF093A1000C93C1001093E100149001001C10
+S3152004EE003D20002883E99CC82C9F000041860044AD
+S3152004EE1083BF0014801F00187C9D00404084002876
+S3152004EE20801D00282C8000004186000C7C0803A647
+S3152004EE304E800021801F00183BBD00347C9D00407D
+S3152004EE404184FFE083FF001C2C9F00004086FFC402
+S3152004EE503D20002883A991CC4BFB99357C640E7008
+S3152004EE607C8401943CA0002438A539DC3CC00025D0
+S3152004EE7038C6ECE87FA3EB784BFDB9E18001001C92
+S3152004EE807C0803A683A1000C83C1001083E100142F
+S3152004EE90382100184E8000209421FFE87C0802A621
+S3152004EEA093A1000C93C1001093E100149001001C5F
+S3152004EEB03D20002883E99CC82C9F000041860044FD
+S3152004EEC083BF0014801F00187C9D004040840028C6
+S3152004EED0801D00242C8000004186000C7C0803A69B
+S3152004EEE04E800021801F00183BBD00347C9D0040CD
+S3152004EEF04184FFE083FF001C2C9F00004086FFC452
+S3152004EF003D20002883A991D04BFB98853C0066665A
+S3152004EF10600066677C641B787C0400967C84FE70A3
+S3152004EF203CA0002438A539DC3CC0002538C6ED9821
+S3152004EF307FA3EB787C000E707C8400504BFDB91DBA
+S3152004EF408001001C7C0803A683A1000C83C1001049
+S3152004EF5083E10014382100184E8000209421FFD824
+S3152004EF607C0802A69321000C93410010936100149F
+S3152004EF709381001893A1001C93C1002093E10024DF
+S3152004EF809001002C7C9C2378801C00082C80000097
+S3152004EF907C791B787CBA2B787CDB33784086004CD2
+S3152004EFA0807C0000801C00041C6300245400283448
+S3152004EFB07C630214907C000C4BFD24D92C83000026
+S3152004EFC0907C0008408600243C600027386358C89B
+S3152004EFD04800000C3C600027386358E048003C0594
+S3152004EFE03860FFFF480000743BC000007C9ED800B8
+S3152004EFF07F5DD3784084004C3BFA0008801F0000D4
+S3152004F0002C80000040860028801D0000807FFFFCA5
+S3152004F010300000047C6301D6907F00044BFD2475E8
+S3152004F0202C830000907F00004186FFAC3BDE00016C
+S3152004F0307C9ED8003BFF00103BBD00104184FFC0DE
+S3152004F0407F23CB787F84E3787F45D3787F66DB780C
+S3152004F05038E000004BFF3E118001002C7C0803A6FB
+S3152004F0608321000C834100108361001483810018DE
+S3152004F07083A1001C83C1002083E1002438210028B9
+S3152004F0804E8000209421FFF87C0802A69001000CF3
+S3152004F0904BFF3D6D3D6000283D2000253929F02891
+S3152004F0A0912B8E703D6000283D20002539292A8C1D
+S3152004F0B0912B8E743C80002738847CBC3D2000280C
+S3152004F0C0806991D43D2000273CA0002780C97D1C5F
+S3152004F0D038A57CCC4BFFFE892C830000408600306B
+S3152004F0E03C80002738847D203D200028806991D8E3
+S3152004F0F03D2000273CA0002780C97D7038A57D309F
+S3152004F1004BFFFE5D2C830000418600103C600027E7
+S3152004F110386358F448003ACD8001000C7C0803A6D5
+S3152004F120382100084E8000209421FFE87C0802A69E
+S3152004F13093A1000C93C1001093E100149001001CCC
+S3152004F1403D20002883C99CC82C9E00007CDD337892
+S3152004F1504186004483FE0014801E00187C9F0040D4
+S3152004F16040840028801F002C2C8000004186000C3F
+S3152004F1707C0803A64E800021801E00183BFF003425
+S3152004F1807C9F00404184FFE083DE001C2C9E00000F
+S3152004F1904086FFC44BFD0ACD801D000C30000001C3
+S3152004F1A0901D000C4BFD0AD18001001C7C0803A68F
+S3152004F1B083A1000C83C1001083E1001438210018B8
+S3152004F1C04E8000209421FFE07C0802A69361000C67
+S3152004F1D09381001093A1001493C1001893E1001C9D
+S3152004F1E0900100247C7D1B785480063E3F600028D5
+S3152004F1F0807B91D47CBC2B78812300547C050378B6
+S3152004F200800900147C0803A67FA4EB787CDE33787F
+S3152004F2104E8000217C7F1B794182003C807B91D4E7
+S3152004F22081230054800900207FE4FB787C0803A610
+S3152004F2307F85E3787FA6EB787FC7F3784E8000211D
+S3152004F2402C830000418600107FE3FB784BFF3E1D94
+S3152004F2503BE000007FE3FB78800100247C0803A6C2
+S3152004F2608361000C8381001083A1001483C10018DC
+S3152004F27083E1001C382100204E8000209421FFE0E9
+S3152004F2807C0802A69361000C9381001093A10014BC
+S3152004F29093C1001893E1001C900100247C7E1B7806
+S3152004F2A05480063E3F600028807B91D47CBC2B781A
+S3152004F2B0812300547C050378800900147C0803A666
+S3152004F2C07FC4F3787CDD33784E8000217C7F1B79E4
+S3152004F2D04082000C386000004800004C881F001152
+S3152004F2E060000002981F0011807B91D48123005472
+S3152004F2F0800900207FE4FB787C0803A67F85E378D9
+S3152004F3007FC6F3787FA7EB784E8000212C830000FC
+S3152004F310418600107FE3FB784BFF3D513BE0000024
+S3152004F3207FE3FB78800100247C0803A68361000C1C
+S3152004F3308381001083A1001483C1001883E1001C7B
+S3152004F340382100204E8000209421FFF07C0802A65C
+S3152004F35093E1000C900100144BFFFE6D7C7F1B791A
+S3152004F36041820014813F001C807F000880890004AC
+S3152004F3704BFCA9A57FE3FB78800100147C0803A637
+S3152004F38083E1000C382100104E8000209421FFF0E8
+S3152004F3907C0802A693C1000893E1000C9001001496
+S3152004F3A07C7F1B787C9E23787CA32B78889F0010F7
+S3152004F3B07FC5F37838C000014BFFFE0D7C631B79B3
+S3152004F3C0408200147FE3FB784BFF3CE13860000069
+S3152004F3D048000068881F0011700900024182002835
+S3152004F3E0813F0014815F0018912300149143001873
+S3152004F3F0881F001198030011881F0011700000FD5A
+S3152004F400981F001193E300007C7F1B78813F001C2A
+S3152004F410800900047C9E0040408400187C1E005015
+S3152004F420813F00085400003A7D290214913F0008C8
+S3152004F43093DF000C7FE3FB78800100147C0803A68D
+S3152004F44083C1000883E1000C382100104E8000207F
+S3152004F4504800000880630000800300002C80000020
+S3152004F4604086FFF42C8400004D8600209083000003
+S3152004F4704E8000207C6A1B797C8723784D8200206D
+S3152004F4802C84000041840098300AFFFF7D2051100F
+S3152004F4907C80FE707C04005054000FFE7D2B0039C6
+S3152004F4A04182005839000000812A000C7C89200002
+S3152004F4B0418500147C892050910A000C814A000061
+S3152004F4C04800001C7D244850800A0008912A000C1C
+S3152004F4D07C002214900A000838800000300AFFFFBE
+S3152004F4E07D2051107C80FE707C04005054000FFE59
+S3152004F4F07D2B00394082FFB47C6A1B78880A001170
+S3152004F500700900024D820020800A00187D2438509C
+S3152004F5107C090050900A00184E800020800A0000C2
+S3152004F5202C8000007C8400D0816A000C4186001C5B
+S3152004F530814A0000800A00002C800000800A000C0A
+S3152004F5407D6B02144086FFEC800A000C7C80200030
+S3152004F550418400307C040050900A000C880300117A
+S3152004F560700900024D820020800300187C0400509C
+S3152004F570900300184E800020916A000C4800004C2D
+S3152004F5807C6A1B78880A00117D6458507009000231
+S3152004F5907D6058F87C00FE707D6B0038418200083F
+S3152004F5A0916A00182C8A000041860020800A000CEB
+S3152004F5B07C8058004084FFC4814A00002C8A0000C5
+S3152004F5C07D6058504086FFE8814A00002C8A00005E
+S3152004F5D04D86002038000000900A000C814A000065
+S3152004F5E02C8A00004086FFF44E8000209421FFE000
+S3152004F5F07C0802A6934100089361000C93810010B5
+S3152004F60093A1001493C1001893E1001C90010024D7
+S3152004F6107C7E1B787C9D2378817E001C813E00089D
+S3152004F620800B0000816B00047D29EA147C005A14A7
+S3152004F6307C89004040840030813E00002C890000F3
+S3152004F64041860024801E000C7C80E800408401E072
+S3152004F6507FDBF378801B000C7D3E4B787FA0E8503F
+S3152004F6604800005838600001889E00107FA5EB787A
+S3152004F67038C000014BFFFB517C7B1B7941820194EE
+S3152004F68038000000901B000C881E0011700900022F
+S3152004F69041820028813E0014815E0018913B0014AB
+S3152004F6A0915B0018881E0011981B0011881E0011FA
+S3152004F6B0700000FD981E00113F400028817B001C2D
+S3152004F6C0801B0008812B0000814B0004817B000CE9
+S3152004F6D07D2952147C005A147F804850801A9CBC81
+S3152004F6E07C9D0000813E000C418400107C9DE0003E
+S3152004F6F041840010480000307C80E00040840028CB
+S3152004F700801A9CBC7C9D0000418400107C9D48008E
+S3152004F7104184001C480000647C8048004184001019
+S3152004F720480000587C9C480040840050801A9CBCA9
+S3152004F7307C9D0000418400107C9DE00041840010E3
+S3152004F740480000307C80E00040840028801A9CBC5D
+S3152004F7507C9D00007D20002655292FFE7D2900D082
+S3152004F7607C0048387FA548787C1F2B7848000010F9
+S3152004F7707F9FE3784800000883FE000C7FE5FB7832
+S3152004F780801B0008809B000C807E00087C8022144D
+S3152004F7904BFC1AF9801B000C7C00FA14901B000CFD
+S3152004F7A0801E000C7C1F00502C8000007FBFE85078
+S3152004F7B07F9FE050901E000C41860014801E000896
+S3152004F7C07C00FA14901E0008480000107FC3F378CA
+S3152004F7D04BFF38997C7E1B787FA0FE707C1D0050E1
+S3152004F7E054000FFE317EFFFF7D2BF1107C0B483930
+S3152004F7F04082FEEC2C9D00004185001093DB000026
+S3152004F8007F63DB78480000287F63DB784BFF385D15
+S3152004F8107FC3F3784BFF38953D200028800991DC7F
+S3152004F8203860000030000001900991DC800100243A
+S3152004F8307C0803A6834100088361000C83810010A1
+S3152004F84083A1001483C1001883E1001C3821002001
+S3152004F8504E8000209421FFC87C0802A692E1001461
+S3152004F860930100189321001C9341002093610024E6
+S3152004F8709381002893A1002C93C1003093E1003496
+S3152004F8809001003C7CBB2B787CD833787CF93B7880
+S3152004F890380000007C9D2379900100083B41000834
+S3152004F8A07C7C1B78408101983EE00028386000016A
+S3152004F8B0388000017FA5EB7838C000004BFFF9099A
+S3152004F8C07C7F1B794082001C806100082C83000009
+S3152004F8D0418600084BFF37D5386000004800016494
+S3152004F8E0800100082C80000040860070931F0014BD
+S3152004F8F093BF00183D600028881F0011813F001C1B
+S3152004F90060000002981F001181090004800B9CC02E
+S3152004F9107D28E8107D2949107C8800407FA048383E
+S3152004F9207D0548787C1E2B784085004C81579CC4E5
+S3152004F9307D2A40507C09F0107C0001107FCB0038D2
+S3152004F9407D250078801F00087D7E2B787C0052144C
+S3152004F950901F000848000020813F001C8169000494
+S3152004F9607C0BE8107C0001107FA900387D600078AC
+S3152004F9707D3E03782C99000093DF000C4186001C01
+S3152004F9807F2803A67F83E378809F00087FC5F378CA
+S3152004F9904E800021480000942C9B00014186003CA7
+S3152004F9A0418500102C9BFFFF4186001C48000070F7
+S3152004F9B02C9B0002418600382C9B0004418600487B
+S3152004F9C04800005C7F83E378809F00087FC5F37836
+S3152004F9D04BFC18B9480000547F83E378809F0008C5
+S3152004F9E07FC5F3784BFC1A59480000407F83E3789F
+S3152004F9F0809F000838BE00017CA50E704BFC1A615E
+S3152004FA00480000287F83E378809F000838BE0003DF
+S3152004FA107CA516704BFC1A71480000103C60002728
+S3152004FA20386358FC480031BD7FBEE8517F9CF214F0
+S3152004FA3093FA00007FFAFB784181FE748061000806
+S3152004FA408001003C7C0803A682E10014830100188F
+S3152004FA508321001C834100208361002483810028A4
+S3152004FA6083A1002C83C1003083E10034382100387F
+S3152004FA704E8000209421FFE07C0802A69361000CAE
+S3152004FA809381001093A1001493C1001893E1001CE4
+S3152004FA90900100247CDC33797C9B23787CBE2B78F4
+S3152004FAA0418200107F84E3784BFFF1114800000C5B
+S3152004FAB07FC4F3784BFFF09D7C7D1B782C9D000042
+S3152004FAC041860010801D001C2C8000004086000CFE
+S3152004FAD03860002B480000ECA81D00007C80F00054
+S3152004FAE04186000C38600029480000D8386001306F
+S3152004FAF03880000338A00000480031697C7F1B79D8
+S3152004FB004082000C38600037480000B87FE3FB7859
+S3152004FB10388001304BFCA20138000000B01F0002DF
+S3152004FB20B3DF000038000080B01F000693BF000C2E
+S3152004FB30387F00143880000138A000004BFD3FE1D7
+S3152004FB40387F00703880000138A000004BFD3FD17B
+S3152004FB50387F00B03880000138A000004BFD3FC13B
+S3152004FB6038000000901F008C901F00CC387F00D8EE
+S3152004FB70480093757FE3FB78801D001C38800000C5
+S3152004FB807C0803A638A000007F86E37838E00000CE
+S3152004FB904E8000217C7E1B794082001093FB00005E
+S3152004FBA0386000004800001CA01F00067FE3FB7895
+S3152004FBB060000001B0030006480001917FC3F3787A
+S3152004FBC0800100247C0803A68361000C8381001035
+S3152004FBD083A1001483C1001883E1001C382100206E
+S3152004FBE04E8000209421FFE07C0802A69361000C3D
+S3152004FBF09381001093A1001493C1001893E1001C73
+S3152004FC00900100247C7D1B787C9C237848002DD190
+S3152004FC107C7B1B787FA3EB788123000C8009001C56
+S3152004FC20388000027C0803A638A000007F86E3788B
+S3152004FC3038E000004E8000217C7D1B787F63DB78D2
+S3152004FC4048002E6D7FA3EB78800100247C0803A650
+S3152004FC508361000C8381001083A1001483C10018E2
+S3152004FC6083E1001C382100204E8000209421FFE8E7
+S3152004FC707C0802A69381000893A1000C93C100106E
+S3152004FC8093E100149001001C7C7E1B787C9D2378D4
+S3152004FC9048002D4D7C7C1B78813E000C7FC3F37875
+S3152004FCA08009001C388000037C0803A638A00000C5
+S3152004FCB038C0000038E000004E8000217C7F1B798C
+S3152004FCC0418200147F83E37848002DE57FE3FB78A7
+S3152004FCD048000058801E003C2C80000040860010FE
+S3152004FCE0A01E000260000002B01E00027FA0E8F8F9
+S3152004FCF07C00FE707FBD00382C9D00067F83E37850
+S3152004FD007C00002654002FFE7C0000D07C0900F8DD
+S3152004FD10712900057FA000387C004B78B01E004472
+S3152004FD2048002D8D386000008001001C7C0803A645
+S3152004FD308381000883A1000C83C1001083E1001491
+S3152004FD40382100184E8000209421FFF07C0802A65A
+S3152004FD5093E1000C900100147C7F1B78801F00081F
+S3152004FD602C8000004086006CA01F0006700900014C
+S3152004FD7041820060801F00342C8000004186003CB4
+S3152004FD803880000048001E312C8300004086002461
+S3152004FD907FE3FB783880000148001E1D2C83000079
+S3152004FDA0408600103C6000273863592048002E35D1
+S3152004FDB038000000901F0034387F0090480022410C
+S3152004FDC07FE3FB78480013097FE3FB7848002EED98
+S3152004FDD0800100147C0803A683E1000C382100105E
+S3152004FDE04E8000209421FFE87C0802A693A1000CF3
+S3152004FDF093C1001093E100149001001C7C7F1B78B2
+S3152004FE0048002BDDA01F0002700900023BC0000041
+S3152004FE107C7D1B78418200344800000C807F0038AA
+S3152004FE204800012D801F00382C8000004086FFF0FA
+S3152004FE304800000C807F003C48000115801F003CD0
+S3152004FE402C8000004086FFF0801F00082C800000D4
+S3152004FE50418600A8A13F000671200002418200507D
+S3152004FE6071200008408200147FE3FB7848000301D8
+S3152004FE707C7E1B7940820038A01F00027009008016
+S3152004FE804182002C801F0004700001082C80010888
+S3152004FE904186001C4800000C387F001448002C4979
+S3152004FEA0A01F0006700900024082FFF0801F000890
+S3152004FEB02C80000041860044813F000C7FE3FB78C0
+S3152004FEC08009001C388000017C0803A638A00000A5
+S3152004FED038C0000038E000004E8000217FC9FE7043
+S3152004FEE07D20F2787C0048507C00FE707FC9003863
+S3152004FEF07C6300787D3E1B78A01F000670090001F4
+S3152004FF00418200103C6000273863592C48002CD5C8
+S3152004FF10A01F00067FE3FB7860000001B003000603
+S3152004FF204BFFFE297FA3EB7848002B857FC3F3780C
+S3152004FF308001001C7C0803A683A1000C83C1001049
+S3152004FF4083E10014382100184E8000209421FFF804
+S3152004FF507C0802A69001000C8123000C8009001C59
+S3152004FF603880000A7C0803A638A0000038C00000A8
+S3152004FF7038E000004E8000218001000C7C0803A696
+S3152004FF80382100084E8000209421FFE87C0802A630
+S3152004FF9093A1000C93C1001093E100149001001C5E
+S3152004FFA07C7D1B787C9F237848002A35A01D00067B
+S3152004FFB0700900017C7E1B78408200103C6000277B
+S3152004FFC03863594048002C1D7FA3EB78A01D0006FA
+S3152004FFD08123000C5400043CB00300068009001C55
+S3152004FFE0388000057C0803A638A000007FE6FB784D
+S3152004FFF038E000004E8000217C7D1B787FC3F37897
+S3152005000048002AAD7FA3EB788001001C7C0803A657
+S3152005001083A1000C83C1001083E100143821001848
+S315200500204E8000209421FFE87C0802A693A1000CAF
+S3152005003093C1001093E100149001001C7C7F1B786E
+S31520050040A01F0002700900027C9E23784182000CC5
+S315200500503860002D4800007448002985A01F000639
+S31520050060700900067C7D1B784182002C813F000C9F
+S31520050070A009000A70090004408200147FE3FB787A
+S31520050080480000ED2C8300004186000C3BE000383B
+S315200500904800002C7FE3FB788123000C8009001C97
+S315200500A0388000047C0803A638A000007FC6F378B4
+S315200500B038E000004E8000217C7F1B787FA3EB78FB
+S315200500C0480029ED7FE3FB788001001C7C0803A608
+S315200500D083A1000C83C1001083E100143821001888
+S315200500E04E8000209421FFE07C0802A69361000C37
+S315200500F09381001093A1001493C1001893E1001C6D
+S31520050100900100247C7D1B787C9C2378480028D18F
+S315200501107C7B1B787FA3EB788123000C8009001C50
+S31520050120388000117C0803A638A000007F86E37876
+S3152005013038E000004E8000217C7D1B787F63DB78CC
+S315200501404800296D7FA3EB78800100247C0803A64F
+S315200501508361000C8381001083A1001483C10018DC
+S3152005016083E1001C382100204E8000209421FFF0D9
+S315200501707C0802A693C1000893E1000C90010014A7
+S315200501807C7F1B7848002859A13F00067120000274
+S315200501907C7E1B784082000C3BE000394800003C01
+S315200501A0712000084182000C3BE000454800002CE8
+S315200501B07FE3FB788123000C8009001C388000062C
+S315200501C07C0803A638A0000038C0000038E00000EF
+S315200501D04E8000217C7F1B787FC3F378480028D189
+S315200501E07FE3FB78800100147C0803A683C1000801
+S315200501F083E1000C382100104E8000209421FFA0B9
+S315200502007C0802A67D80002691C1001891E1001C7C
+S315200502109201002092210024924100289261002C0F
+S315200502209281003092A1003492C1003892E1003CBF
+S315200502309301004093210044934100489361004C6B
+S315200502409381005093A1005493C1005893E1005C1B
+S3152005025090010064918100147C7A1B787C90237828
+S3152005026090C10008813A000C7CB82B78A009000AB9
+S315200502707CF63B78700900017D0F43783BE0000052
+S315200502803A2000004082000C2C860000418600089A
+S315200502903A2000012C9800004186000C8378000C3A
+S315200502A04800000C81210008836900182C9B00005A
+S315200502B04084002C38600016480004083BA0002026
+S315200502C0480003C47C7D1B78480003BC3BA000285E
+S315200502D0480003B43BA00037480003AC71E0000496
+S315200502E039C000004182001CA01A000270090010C6
+S315200502F040820010813A000CA009000A540E07FE20
+S315200503002C9600004186000883F6000CA01A0006EC
+S315200503105414C7FE480026C97C771B7871E0000176
+S315200503203E6000282D9100004C80000071E00008F9
+S315200503307C00002654003FFE7EA000D07EB2A8F8A1
+S315200503405652073C4E000000A17A00067160001047
+S315200503504082FF6CA07A00482C8300004086FF6807
+S315200503607160000240820044813A000CA009000A0F
+S31520050370700900044182002C716004004082002C23
+S31520050380301BFFFF7D20D910217F00007C0BF9143F
+S315200503907D2B0379418200143BA00039480002E8F1
+S315200503A02C9000004186FF28815A0094817A00907E
+S315200503B0813A009C801A00987D6B50507D204850CC
+S315200503C07C8B48004CE62B827C000026540047FE99
+S315200503D07C0000D07D2900387D6000787D3C03783F
+S315200503E0381C04007F89A8387C00A8787D3C0378D2
+S315200503F0418E000C7C9B50404185000C7C9F5040D3
+S315200504004085000C3BA000244800027C7C1BFA1486
+S315200504107C9C00004084005C408E00287C9CF80073
+S31520050420801A00A07C00E0107C0001107C0000D022
+S315200504307D20002655292FFE7C0B4B7941820034E1
+S31520050440A01A0006700901004182001C75E0000112
+S315200504504182000C38000000900100083BA00046B0
+S3152005046048000224387A0090480019094BFFFEB04F
+S315200504703B2100087F9FE0502D0E00002C980000A0
+S31520050480408600143B6000004192017481210008DA
+S31520050490480001487C9BE00083A100084CE62382A6
+S315200504A07C000026540047FE7C0000D02C9D0000D1
+S315200504B07F6900387F8400787D3E237840860090CA
+S315200504C07E83A3783880000180B39CC038C00000A5
+S315200504D07CBE2A144BFFECF17C7F1B794182FDF80B
+S315200504E0881F0011813F001C6000000281690004FD
+S315200504F0981F001193BF001893BF00147C0BF010B2
+S315200505007C0001107FC900387D6400787D3E237804
+S31520050510418E007481739CC0801F0008813F001C9A
+S315200505207C005A1481290004901F00087D2B485011
+S315200505307C1E48107C0001107C0003B87FCB003858
+S315200505407D2400787D7E23784800003C7E83A37831
+S31520050550388000017FC5F37838C000004BFFEC6971
+S315200505607C7F1B794182FD70813F001C81690004D7
+S315200505707C0BF0107C0001107FC900387D64007863
+S315200505807D3E23787FC4F3787F05C378813F001CA1
+S31520050590381CFFE081290004807F00087F890050F0
+S315200505A0480010B58378000C93DF000C93F9000002
+S315200505B0812100087C7D1B79800900187C00F214B6
+S315200505C090090018408200C02C9B00007FF9FB781B
+S315200505D04185001841920028880900116000000411
+S315200505E098090011480000187F80FE707C1C005079
+S315200505F054000FFE7C0988394082FE9C418A0010F2
+S31520050600A01A000260000010B01A00027F43D378BA
+S31520050610813A000C72A400098009001C7C84937819
+S315200506207C0803A67E06837880A100087EC7B3785A
+S315200506304E8000217C7D1B78418A0010A01A00027D
+S315200506407000FFEFB01A00023BE000002C9D000071
+S315200506503AC0000092C100083B21000840860028C8
+S31520050660301BFFFF7D20D9107F80FE707C1C00503B
+S3152005067054000FFE7D2B00394082FE042C9B000082
+S315200506804086FCC87EE3BB784800242580610008A7
+S315200506902C830000418600084BFF2A112C9600006A
+S315200506A04186000C7EC3B3784BFF2A012C9D0000A2
+S315200506B04186000C7FA3EB784BFF34D57FA3EB78DF
+S315200506C080010064818100147C0803A681C100187D
+S315200506D081E1001C8201002082210024824100281C
+S315200506E08261002C8281003082A1003482C10038CB
+S315200506F082E1003C83010040832100448341004878
+S315200507008361004C8381005083A1005483C1005826
+S3152005071083E1005C7D838120382100604E800020A6
+S315200507209421FFB07C0802A67D80002691E1000C6D
+S315200507309201001092210014924100189261001C2A
+S315200507409281002092A1002492C1002892E1002CDA
+S315200507509301003093210034934100389361003C86
+S315200507609381004093A1004493C1004893E1004C36
+S3152005077090010054918100087C7D1B787CF63B789E
+S315200507803B2000007CD833787CBB2B787C92237960
+S315200507907D104378827B000C829D000C41820008E7
+S315200507A0933200002C9600004186000893360000FF
+S315200507B02C9000004186001080100000541C0776FE
+S315200507C0480000083B8000002D180000418A000CD7
+S315200507D0380000009018000073800001418200FC5B
+S315200507E0386000003880000138A0008038C000013C
+S315200507F04BFFE9D57C7F1B794082000C386000379A
+S31520050800480007F47FA3EB788014001C3880000D80
+S315200508107C0803A67FE5FB78578607BC38E00000F1
+S315200508204E8000217C791B794082009C418A0030CC
+S31520050830801B000C813F000C7C090050901B000C8E
+S3152005084093F800007FF8FB78801800002C800000C4
+S3152005085083FF00004086FFDC4800006C809B000C6F
+S31520050860813F000C7C8448007F65DB78807F00080B
+S315200508704CE623827C000026540047FE7C0000D0EF
+S315200508807C8400387D2000787C84037848000DC957
+S315200508907C791B787FE3FB784BFF27D1801B000CE7
+S315200508A03120FFFF7C090110217900007D2BC91419
+S315200508B07C0B48397C7F1B784182000C2C9F0000DD
+S315200508C04086FF9C2C9F0000418607207FE3FB780E
+S315200508D04BFF27D948000714A01D00067009040000
+S315200508E041820030801B000C2C80000041860024AC
+S315200508F07FA3EB788014001C388000087C0803A6AB
+S3152005090038A0000038C0000038E000004E800021E5
+S31520050910480020CD7C6F1B7883FD00642C9F00004A
+S31520050920418600547380008040820114813D005029
+S31520050930817B000C7C89584040840104801D006021
+S315200509407C8900404184001873800040418200F074
+S31520050950801D00547C8B0040418500E4801F0004E7
+S315200509602C800000408600D8A014000A70090001DA
+S31520050970408200CCA13D00482C89000041860024F8
+S315200509802C9F0000408600B8738000027D394B7885
+S315200509904082064838000000B01D00484800063C45
+S315200509A0A01D000670090020418200342C9F0000FE
+S315200509B04086008C48000624881F00102C80000FD6
+S315200509C041860010881F0011700900044182000C21
+S315200509D083FD00644800006883FF00002C9F00000B
+S315200509E04086FFD8A01D0006700900064082001C1F
+S315200509F0813D000CA009000A700900044182000C03
+S31520050A003B200039480005D4801B000C2C800000B3
+S31520050A10418605C8A01D0006700901004082000C0C
+S31520050A20738000804182000C3B200046480005ACBF
+S31520050A30387D00504800133D4BFFFEE0A014000A08
+S31520050A407009000282BF0004418200A8738000025B
+S31520050A503A600000418200342C9200004186002431
+S31520050A607FE4FB7838A000003D200028806991D4DA
+S31520050A7080DF000C38E000014BFF2A9590720000BC
+S31520050A8083FF00004800006C801D0050813F000C4C
+S31520050A907C090050813D0058901D00503969FFE0C2
+S31520050AA0917D0058881F00117009000141820014AC
+S31520050AB0813F001C800900047C005850901D005879
+S31520050AC02C9200004186001C93F20000801F000036
+S31520050AD0901D0064927F000083FD00644800001489
+S31520050AE07FE3FB784BFF2585907D00647C7F1B7813
+S31520050AF02C9F000041860148738000024D000000AE
+S31520050B00881F00106800000E212000007C090114B2
+S31520050B10217900007D2BC9147C0B4839418200ECD4
+S31520050B20418A00342C960000418600247FE4FB7818
+S31520050B3038A000003D200028806991D480DF000C74
+S31520050B4038E000014BFF29C99076000083FF00009D
+S31520050B50480000A0813D0050801F000C7D20485094
+S31520050B60801D0058913D00503160FFE0917D005871
+S31520050B70881F00117009000141820014813F001C65
+S31520050B80800900047C005850901D00582C960000C2
+S31520050B9041860050813400048169000C2C8B0000AD
+S31520050BA041860024813F0008800900082C80000129
+S31520050BB0408600147D6803A67FE3FB784E800021DE
+S31520050BC07C791B7893F60000801F0000901D006439
+S31520050BD038000000901F000083FD006448000014C3
+S31520050BE07FE3FB784BFF2485907D00647C7F1B7813
+S31520050BF02C9600004186000C3A60000082D6000043
+S31520050C002C9F00004086FEFC2C9F0000418600306C
+S31520050C10738000024082000892BF00048A3F0010BC
+S31520050C20638900016A20000F7C0000D07C00FE70DD
+S31520050C307F8B00387D2000787D7C03782C9F0000F3
+S31520050C403B4000003AE00000418602F8813B000C5B
+S31520050C507D20FE707C09005054000FFE217900008E
+S31520050C607D2BC9147C0B4839418202B0881F0010A0
+S31520050C702C80000F408600102C91000F4086029C88
+S31520050C804800000C2C91000F41860290813D004CB6
+S31520050C90A01D00062C8900007000FFBFB01D0006B0
+S31520050CA083DB000C418600207C1748507D3E0010D2
+S31520050CB07D2949107D294BB87FCB48387C04487857
+S31520050CC07D7E2378817F000C7D7A58507C9E580046
+S31520050CD04CE623827C000026540047FE7C0000D08B
+S31520050CE02C9800007FC900387D6400787D3E2378E6
+S31520050CF0408600207FC4F378807F00087F65DB78F7
+S31520050D007C63D214480009517C791B784800001071
+S31520050D10801B000C7C1E0050901B000C815F000C74
+S31520050D207C1A50507C9E0000408600B4881F001116
+S31520050D3070090004638900087C00002654001FFE04
+S31520050D407C0000D07F8B00387D2000787D7C037861
+S31520050D50738800024182001083FF00003B4000009B
+S31520050D60480000D8801D005082BF0004813D0058F0
+S31520050D707C0A0050901D00503969FFE0917D00588E
+S31520050D80881F00117009000141820014813F001C53
+S31520050D90800900047C005850901D00582C980000AE
+S31520050DA04186001C93F800007FF8FB7883FF00003E
+S31520050DB093FD006491180000480000147FE3FB783A
+S31520050DC04BFF22A9907D00647C7F1B782C9F000019
+S31520050DD04186006892BF00044800006073800002C7
+S31520050DE04182000C7F5AF214480000502C980000CE
+S31520050DF0418600243D200028806991D47FE4FB7834
+S31520050E0038A000007FC6F37838E000004BFF2701A5
+S31520050E1090780000801F0008813F000C7C00F214AA
+S31520050E20901F00087D3E4850913F000C801D0050C4
+S31520050E307C1E0050901D0050813D004C2C890000E1
+S31520050E404186003873800002408200247C1E48506B
+S31520050E502C800000901D004C40860020A01D000619
+S31520050E6060000040B01D0006480000B07EF7F21471
+S31520050E707C974800418600A4738000084082009C28
+S31520050E805789D7FE217F00007C0BF9147D2B00396D
+S31520050E9041820080801B000C2C8000004085007458
+S31520050EA0579ED7FE813D000CA009000A217500003A
+S31520050EB07D2BA91468000001540007FE7C0B4839D8
+S31520050EC041820050A01D00482C8000004086004429
+S31520050ED0A01D00067009002040820038387D00508C
+S31520050EE048000E9183FD00642C9F00004186000872
+S31520050EF082BF00047C00002654003FFE7FC90039CE
+S31520050F0041820010801B000C2C8000004185FF9833
+S31520050F102C9F00004086FD382C9F0000418600242A
+S31520050F20A014000A7009000141820018639C001074
+S31520050F30738000024082005C387D0050480019F11C
+S31520050F40738000024082004C2C9F000040860008DA
+S31520050F5092BD0064A014000A70090008418200347D
+S31520050F60801D00082C800000418600287FA3EB7891
+S31520050F70388000088014001C38A000007C0803A6D1
+S31520050F807F86E37838E00000390000004E80002196
+S31520050F90801B000C7E600278212000007C0901144C
+S31520050FA03173FFFF7D2B99107C0B48394182001840
+S31520050FB07380000840820010A01D000670090020DD
+S31520050FC04182F9582C9000004186001080100000BF
+S31520050FD07C00E378901000007DE37B7848001AD1E9
+S31520050FE02C9900004186000C7F23CB784BFF2BA143
+S31520050FF07F23CB7880010054818100087C0803A6D5
+S3152005100081E1000C82010010822100148241001822
+S315200510108261001C8281002082A1002482C10028D1
+S3152005102082E1002C8301003083210034834100387E
+S315200510308361003C8381004083A1004483C100482D
+S3152005104083E1004C7D820120382100504E8000200E
+S315200510509421FFE87C0802A693A1000C93C10010F9
+S3152005106093E100149001001C3BE4000173E00001AC
+S315200510707C7E1B7883BE000C418200084800005107
+S3152005108073E000024082000C38600000480000240E
+S315200510907FC3F378801D001C388000077C0803A6D3
+S315200510A038A0000038C0000038E000004E8000213E
+S315200510B08001001C7C0803A683A1000C83C10010B7
+S315200510C083E10014382100184E8000209421FF90DA
+S315200510D07C0802A69361005C9381006093A100645D
+S315200510E093C1006893E1006C900100747C7D1B78A8
+S315200510F03B9D0050A01C001E83FD000C6000004097
+S31520051100B01C001E480019417C7B1B787FA3EB7819
+S3152005111048000B61386100187F84E37838A00040C9
+S315200511204BFC24E17F83E378388000404BFC8BE938
+S315200511307F63DB7848001979A01F000A7009001023
+S3152005114041820020813F0004800900102C80000088
+S31520051150418600107C0803A68061002C4E80002164
+S315200511603861001848000E99800100747C0803A692
+S315200511708361005C8381006083A1006483C100686C
+S3152005118083E1006C382100704E8000209421FFD821
+S315200511907C0802A6936100149381001893A1001C74
+S315200511A093C1002093E100249001002C7C7D1B78BF
+S315200511B07C9B23787CBF2B78380000006000FFFFDE
+S315200511C07C9B000090C100083B8000007CDE3378C4
+S315200511D041860044813D000C2C8900004186003063
+S315200511E0800900182C800000418600243860000103
+S315200511F07FA4EB787C0803A67F65DB787FE6FB7802
+S3152005120038E100084E800021480001FC3B80002A79
+S31520051210480001E02C9F00804186007C41850048DE
+S315200512202C9F000841860090418500182C9F0001BF
+S31520051230418600842C9F00044186007C480001706D
+S315200512402C9F002041860070418500102C9F0010A0
+S3152005125041860064480001582C9F0040418600586D
+S315200512604800014C2F9F1004419D00202F1F10017F
+S31520051270409800882C9F01004186003C2C9F020047
+S3152005128041860034480001282C9F100641850120FF
+S31520051290480000E82C9E000041860074801E000C44
+S315200512A02C80000840860068813E0008A0090006BB
+S315200512B0B01D00042C9E000041860054801E000CA3
+S315200512C02880000340850048813E000880090000EB
+S315200512D02C80000041860014A01D00027C00FB78AE
+S315200512E0B01D0002480000CCA01D00027C00F87845
+S315200512F0B01D0002480000BC2C9E0000418600104F
+S31520051300801E000C288000034185000C3B800016BA
+S31520051310480000E02C9F1003418600404085000CC4
+S31520051320419E00484800008C41980088409A000C50
+S31520051330387D009048000008387D0050813E000821
+S315200513408089000048000C4D2C83000040860064EF
+S315200513503B8000374800009C813E0008800900003C
+S31520051360901D00A04800004C813E00088009000021
+S31520051370901D00604800003C2C9F100541860010FA
+S315200513802C9F10064186001848000028813E00083B
+S31520051390A0090002B01D00AC48000018813E0008D7
+S315200513A0A0090002B01D006C480000083B80002AF9
+S315200513B02C9C00004086003C813D000C2C890000B9
+S315200513C041860030800900182C80000041860024C3
+S315200513D0386000017FA4EB787C0803A67F65DB785F
+S315200513E07FE6FB7838E100084E8000213BC00000EF
+S315200513F02C9E00004186000C7FC3F3784BFF1C6DA5
+S315200514007F83E3788001002C7C0803A68361001482
+S315200514108381001883A1001C83C1002083E1002459
+S31520051420382100284E8000209421FFE87C0802A65A
+S3152005143093A1000C93C1001093E100149001001CA8
+S315200514407C8B2378380000006000FFFF7C8B000032
+S315200514507C7E1B787CBF2B787CDD33784186003CEF
+S31520051460813E000C2C890000418601BC80090018AC
+S315200514702C800000418601B0386000007FC4F378D7
+S315200514807C0803A67D655B787FE6FB787FA7EB78EE
+S315200514904E800021480001A0386000003880000AEF
+S315200514A038A0008038C000014BFFDD1D2C9F0200AF
+S315200514B0380000049003000C418600C84185006071
+S315200514C02C9F0010418600BC418500282C9F0004D6
+S315200514D0418600B0418500102C9F0001418600A45D
+S315200514E0480001402C9F0008418600984800013499
+S315200514F02C9F00404186008C418500102C9F0020A2
+S31520051500418600804800011C2C9F00804186004CA6
+S315200515102C9F01004186006C480001082C9F100471
+S31520051520418600CC4185001C2C9F1002418600A0D7
+S31520051530418500AC2C9F100141860084480000E4BB
+S315200515402C9F100741860060418400B42C9F10080B
+S3152005155041860044480000CC380000089003000C62
+S31520051560A01E0002812300085400063090090000C1
+S3152005157081230008A81E000490090004480000B035
+S31520051580A81E0002812300087C00F8389009000077
+S315200515904800009C81230008A81E00009009000031
+S315200515A04800008C81230008A01E004890090000F1
+S315200515B038000000B01E004848000074812300084A
+S315200515C0801E0094900900004800006481230008CD
+S315200515D0801E00549009000048000054812300080D
+S315200515E0801E00A0900900004800004481230008C1
+S315200515F0801E006090090000480000342C9F1005CD
+S315200516008123000840860010A81E00AC9009000022
+S315200516104800001CA81E006C900900004800001018
+S315200516204BFF1A493860002A4800000C907D0000BF
+S31520051630386000008001001C7C0803A683A1000CED
+S3152005164083C1001083E10014382100184E80002044
+S315200516504E8000209421FFE07C0802A69361000CB1
+S315200516609381001093A1001493C1001893E1001CE7
+S31520051670900100247C9C23797C7B1B787CBD2B7870
+S31520051680408100B8801D000C2C800000418600ACEE
+S3152005169083DD000083FE00042C9F00004086001C8D
+S315200516A0393E0008801D0004913D00003000FFFFF3
+S315200516B0901D00044800007C801D00147D3FE0102D
+S315200516C07D2949107D294BB82C8000007F854878D7
+S315200516D07FE048387C1F2B78408600107F63DB78B7
+S315200516E0809E00004800000C807E00007F64DB7829
+S315200516F07FE5FB784BFBFB957F7BFA147F9FE050BC
+S31520051700813E0000801E00047D29FA14913E0000CA
+S315200517107C1F0050901E0004813D000C801D000892
+S315200517207D3F4850913D000C7C00FA14901D000821
+S315200517302C9C00004185FF50386000008001002464
+S315200517407C0803A68361000C8381001083A1001405
+S3152005175083C1001883E1001C382100204E8000201B
+S31520051760A00300063920FFF57C00483860000004F8
+S31520051770B00300064E8000209421FFF07C0802A6C7
+S3152005178093C1000893E1000C900100147C7F1B781F
+S315200517903920FBF383DF0034A01F00062C9E0000B2
+S315200517A07C00483860000002B01F000641860060B4
+S315200517B038800000480004012C8300004186005033
+S315200517C07FC3F3787FE4FB7838A0000148000365E2
+S315200517D07FC3F378389E005038A00000480006A93C
+S315200517E0801E00D02C800000418600187C0803A6A8
+S315200517F07FC3F378809E00D438A000014E80002157
+S31520051800387E0014480013894800004C387F0014A0
+S315200518104800137D7FE3FB78389F005038A00000F1
+S3152005182048000665801F00D02C80000041860018E0
+S315200518307C0803A67FE3FB78809F00D438A00001AF
+S315200518404E8000217FE3FB783883009038A0000185
+S3152005185048000635800100147C0803A683C10008CC
+S3152005186083E1000C382100104E8000209421FFF0E2
+S315200518707C0802A693E1000C900100147C7F1B785E
+S31520051880A01F0006387F0014540007B860000038F2
+S31520051890B01F0006480012F97FE3FB78389F0090B9
+S315200518A038A00001480005E17FE3FB78389F00500A
+S315200518B038A00000480005D1801F00D02C800000EC
+S315200518C0418600187C0803A67FE3FB78808300D435
+S315200518D038A000014E800021800100147C0803A653
+S315200518E083E1000C382100104E8000209421FFF062
+S315200518F07C0802A693E1000C900100147C7F1B78DE
+S31520051900A01F0006387F0014540007F6600000303B
+S31520051910B01F0006480012797FE3FB78389F0090B8
+S3152005192038A00001480005617FE3FB78389F005009
+S3152005193038A0000048000551801F00D02C800000EB
+S31520051940418600187C0803A67FE3FB78808300D4B4
+S3152005195038A000014E800021800100147C0803A6D2
+S3152005196083E1000C382100104E8000209421FFE8E9
+S315200519707C0802A69381000893A1000C93C1001050
+S3152005198093E100149001001C7C7E1B78A93E004241
+S31520051990A81E0044A97E00401C0000037D295A1478
+S315200519A07C000E707C0001947C8900007C9D237848
+S315200519B0301DFFFF7F80E910418501003860013029
+S315200519C03880000338A00001480012997C7F1B79D6
+S315200519D0418200E87FE3FB78388001304BFC833970
+S315200519E0A01E0000B01F0000A01E00027000FFFD13
+S315200519F0B01F0002A01E0004B01F0004A01E000692
+S31520051A0060000001B01F0006801E000C387F001400
+S31520051A10901F000CA01E004638800001B01F00460E
+S31520051A20A01E004A38A00000B01F004A4BFD20F139
+S31520051A30387F00703880000138A000004BFD20E17A
+S31520051A40387F00B03880000138A000004BFD20D13A
+S31520051A50387F00D848007491809E009480BE00543B
+S31520051A607FE3FB78480004797FC3F3787FE4FB782E
+S31520051A707F85E378480000BD813F000C7FE3FB7836
+S31520051A808009001C388000007C0803A638A00000C9
+S31520051A9038C0000038E000004E8000212C8300006D
+S31520051AA0418600207FE3FB787F84E378480001099F
+S31520051AB07FE3FB7848001205386000004800005493
+S31520051AC02C9D0000418600487FC3F378389E005040
+S31520051AD038A00000480003B1801E00D02C800000ED
+S31520051AE0418600187C0803A67FC3F378809E00D420
+S31520051AF038A000014E800021387E00144800109140
+S31520051B00A01F00067C00EB78B01F00067FE3FB785C
+S31520051B108001001C7C0803A68381000883A1000C94
+S31520051B2083C1001083E10014382100184E8000205F
+S31520051B307CA52B79906400344082003CA0030040AC
+S31520051B4030000001B003004090A40038800300381F
+S31520051B502C8000003863003841860054812300001C
+S31520051B60800900382C800000386900384086FFF04F
+S31520051B704800003CA003004230000001B0030042AB
+S31520051B80380000009004003C8003003C2C800000B7
+S31520051B903863003C41860018812300008009003CFB
+S31520051BA02C8000003869003C4086FFF090830000B9
+S31520051BB04E800020814300347C8423797D495378E7
+S31520051BC04182000C8169003C480000088169003883
+S31520051BD07C8B1800418600142C8B00004186002C36
+S31520051BE07D695B784BFFFFDC2C8400004086002452
+S31520051BF0800B003890090038A00A00403000FFFF0E
+S31520051C00B00A004048000020386000004E800020C1
+S31520051C10800B003C9009003CA00A00423000FFFFE3
+S31520051C20B00A004238000000900B003C900B0038AB
+S31520051C30900B0034386000014E8000209421FFF877
+S31520051C407C0802A69001000CA003000638830090AC
+S31520051C5038A0000160000010B003000648000229E4
+S31520051C608001000C7C0803A6382100084E80002040
+S31520051C709421FFF07C0802A693E1000C9001001444
+S31520051C807C7F1B78389F0050A01F000638A00000D7
+S31520051C9060000020B01F0006480001ED801F00D01F
+S31520051CA02C800000418600187C0803A67FE3FB787C
+S31520051CB0808300D438A000014E80002180010014C5
+S31520051CC07C0803A683E1000C382100104E800020F5
+S31520051CD09421FFF07C0802A693E1000C90010014E4
+S31520051CE07C9F2378386300D87CA42B784800706DB8
+S31520051CF02C83FFFF4186000C38000001901F001839
+S31520051D00800100147C0803A683E1000C382100100D
+S31520051D104E8000209421FFE87C0802A693A1000CA2
+S31520051D2093C1001093E100149001001C7C9F237839
+S31520051D303BA300D87FA3EB787CA42B78480070D9E9
+S31520051D407FA3EB78480071F17C631B7940820008FC
+S31520051D50907F00188001001C7C0803A683A1000C37
+S31520051D6083C1001083E10014382100184E8000201D
+S31520051D709421FFF87C0802A69001000C8003003C04
+S31520051D80A123001E300000019003003C61290004B8
+S31520051D90B123001E3863002048000D4D8001000C3C
+S31520051DA07C0803A6382100084E8000209421FFF0E8
+S31520051DB07C0802A693E1000C900100147C7F1B7819
+S31520051DC04800001461200002B01F001E387F002045
+S31520051DD048000D15A13F001E712000014082FFE835
+S31520051DE0A01F001E3860000060000001B01F001E05
+S31520051DF0800100147C0803A683E1000C382100101D
+S31520051E004E8000209421FFE87C0802A693A1000CB1
+S31520051E1093C1001093E100149001001C7C9F237848
+S31520051E20801F003C2C8000007C7E1B787CBD2B7897
+S31520051E30408500183000FFFF901F003C387F0020AA
+S31520051E4048000D4D4800000C38000000901F003C4E
+S31520051E50801F00182C80000041860010387E00D88F
+S31520051E607FA4EB7848006E298001001C7C0803A618
+S31520051E7083A1000C83C1001083E1001438210018CA
+S31520051E804E8000209421FFF07C0802A693C100080D
+S31520051E9093E1000C900100147C7E1B787CBF2B7887
+S31520051EA04BFFFF653D200028800992902C8000007D
+S31520051EB0418600147C0803A67FC3F3787FE4FB786C
+S31520051EC04E800021800100147C0803A683C10008EA
+S31520051ED083E1000C382100104E8000209421FFE874
+S31520051EE07C0802A693A1000C93C1001093E100146F
+S31520051EF09001001C7C7F1B783BBF00907FA3EB786D
+S31520051F007CBE2B784800008D2C830000418600641A
+S31520051F10387F00507FC4F378480000792C83000071
+S31520051F2041860048801F00602C8000004086000CFA
+S31520051F3038000001901F0060801F00A02C80000043
+S31520051F404086000C38000040901F00A0801F00A08E
+S31520051F50813F00947C80484040850008913F00A041
+S31520051F6038600000480000107FA3EB7848000091F8
+S31520051F70386000378001001C7C0803A683A1000C6D
+S31520051F8083C1001083E10014382100184E800020FB
+S31520051F903D60FC0F3D20002881499294616BC0FD70
+S31520051FA0554058287C0058165400AAFE7C840040CB
+S31520051FB04085000C386000004E8000209083000488
+S31520051FC01C04000581230010810300047D60501048
+S31520051FD07D6B59107D6B5BB87C0058387C894040F9
+S31520051FE07D4958787C004B789003000C4085000885
+S31520051FF091030010386000014E8000209421FFE8EF
+S315200520007C0802A693A1000C93C1001093E100144D
+S315200520109001001C7C7D1B784800072938000000AC
+S31520052020901D000C901D00048001001C7C0803A651
+S3152005203083A1000C83C1001083E100143821001808
+S315200520404E8000209421FFF87C0802A69001000C02
+S315200520507C8423794182005080A300142C850000BE
+S31520052060418600404800000880A50004800500043C
+S315200520702C8000004086FFF48805001170090004B5
+S315200520804182000C480000314800001C80050000F4
+S315200520902C8000004186000C7C0503784BFFFFDC75
+S315200520A0480004D58001000C7C0803A638210008C9
+S315200520B04E8000209421FFF87C0802A69001000C92
+S315200520C07C852379418200A8808300142C84000016
+S315200520D04186001848000008808400048004000416
+S315200520E02C8000004086FFF4800300008125000C2B
+S315200520F07C004A14812300089003000039690020DA
+S3152005210091630008880500117009000141820014B9
+S315200521108125001C800900047C0B0214900300080D
+S315200521202C8400004186000C90A400044800000879
+S3152005213090A30014808500002C8400003800000040
+S315200521409005000041860024892500117120000490
+S3152005215041820018712000FB9805001188040011A2
+S3152005216060000004980400114800040D8001000C4D
+S315200521707C0803A6382100084E8000209421FFF80C
+S315200521807C0802A69001000C7C852379418200C437
+S31520052190808300142C84000039630014418600389E
+S315200521A0880400102C80000E4086001080840000D4
+S315200521B02C8400004800001C2C80000F4086001847
+S315200521C0812B0000808900042C84000039690004D5
+S315200521D04086FFD0800300008125000C7C004A1430
+S315200521E08123000890030000394900209143000807
+S315200521F08805001170090001418200148125001C03
+S31520052200800900047C0A021490030008800B000054
+S315200522109005000490AB0000808500002C8400000A
+S31520052220380000009005000041860024892500110C
+S315200522307120000441820018712000FB98050011C9
+S315200522408804001160000004980400114800032941
+S315200522508001000C7C0803A6382100084E8000204A
+S315200522609421FFE07C0802A6934100089361000CA7
+S315200522709381001093A1001493C1001893E1001CCB
+S31520052280900100247C7D1B787CBB2B797C9C237854
+S315200522907CDA33788BDC000041820024881B001110
+S315200522A070090002408200103C60002738635954AB
+S315200522B048000931801B00187FDE02147F5FD37921
+S315200522C041820020813F00002C890000801F000CE0
+S315200522D07FDE02144186000C7D3F4B784BFFFFE8DD
+S315200522E0815D0004813D0000817D000C801D000874
+S315200522F07D4950507D6058507C8A58004084000C9A
+S315200523007C9E5000480000087C9E58004185002C84
+S31520052310881C000028800080418500203860000147
+S315200523203880000838A0008038C000014BFFCE99C0
+S315200523307C7E1B794082000C38600000480000B482
+S31520052340881C0000809E0008901E000C88BC00009A
+S315200523507F83E3784BFBEF352C9F00004186000CED
+S31520052360937F0000480000087F7ADB782C9E0000CA
+S31520052370935E00007FDFF37841860048813D0000AB
+S31520052380801F000C7D290214801D0008913D000048
+S3152005239031600020917D0008881F00117009000119
+S315200523A041820014813F001C800900047C0B021425
+S315200523B0901D000883FF00002C9F00004086FFC06B
+S315200523C083FD00142C9F000041860020480000084C
+S315200523D083FF0004801F00042C8000004086FFF444
+S315200523E093DF00044800000893DD001438600001DF
+S315200523F0800100247C0803A6834100088361000C24
+S315200524008381001083A1001483C1001883E1001C79
+S31520052410382100204E8000209421FFE87C0802A662
+S3152005242093A1000C93C1001093E100149001001CA8
+S315200524307CBE2B797C7F1B787C9D2378408200107F
+S315200524403C6000273863596448000799801E0000C0
+S315200524502C8000007FCBF378811E000C4186001C62
+S31520052460816B0000800B00002C800000800B000C87
+S315200524707D0802144086FFEC7D675B787FABEB79A0
+S3152005248041820018800B000C816B00002C8B00000C
+S315200524907D0802144086FFF0815F0004813F00001D
+S315200524A0817F000C801F00087D4950507D60585063
+S315200524B07C8A5800408400107C8850004185001095
+S315200524C0480000147C8858004085000C38600000C0
+S315200524D0480000882C9E000093A700007FCBF37848
+S315200524E041860048813F0000800B000C7D2902149F
+S315200524F0801F0008913F000031400020915F0008B1
+S31520052500880B00117009000141820014812B001CE3
+S31520052510800900047C0A0214901F0008816B0000C4
+S315200525202C8B00004086FFC080FF00142C870000FE
+S31520052530418600204800000880E700048007000443
+S315200525402C8000004086FFF493C70004480000084D
+S3152005255093DF0014386000018001001C7C0803A667
+S3152005256083A1000C83C1001083E1001438210018D3
+S315200525704E8000209421FFE87C0802A6938100085E
+S3152005258093A1000C93C1001093E100149001001C47
+S315200525907C9F23797C7D1B787CBE2B783B80000035
+S315200525A041820154801F000C893F00112C800000B8
+S315200525B05529077A7F9C4B784086003C2C9C000049
+S315200525C04186002C813F00002C89000040860010A2
+S315200525D02C9E00007FC9F378418600BC880900102F
+S315200525E0893F00107C8048004086000C7FE3FB78FD
+S315200525F0480000882C9E00004186009C881E0011FC
+S31520052600700900044082008080BF000C2C85003FA5
+S3152005261041850074817E0008801E000C813E001CC9
+S315200526207C8B021480090000812900047D642A140C
+S315200526307C004A147C8B00404084004C881E001088
+S31520052640893F00107C8048004086003C807F00083A
+S315200526504BFBEC39801E000C813F000C7C004A1494
+S31520052660901E000C801D0000813F000C7FE3FB7847
+S315200526707C004A14901D00004BFF09F17C7F1B78D6
+S315200526804800006C2C9E00004186000C93FE00003D
+S315200526904800000893FD0014813D0000801F000CB2
+S315200526A07D290214801D0008913D0000316000201F
+S315200526B0917D0008881F00117009000141820014D0
+S315200526C0813F001C800900047C0B0214901D000824
+S315200526D07FFEFB783800000083FE0000893E00114E
+S315200526E0901E0000712900FB993E00112C9F0000C9
+S315200526F04086FEB42C9C0000418600282C9E0000B6
+S3152005270041860014881E00117C00E378981E00116E
+S31520052710480000103C600027386359744BFC9EA185
+S315200527208001001C7C0803A68381000883A1000C78
+S3152005273083C1001083E10014382100184E80002043
+S315200527409421FFF07C0802A693E1000C9001001469
+S315200527507C7F1B78A01F001E700900014182002086
+S315200527603C6000273863598C4800047948000010DE
+S31520052770809F00007FE3FB7848000049801F000802
+S315200527802C8000004086FFEC801F00002C80000076
+S3152005279040860010801F00142C8000004186001002
+S315200527A03C60002738635994480004398001001499
+S315200527B07C0803A683E1000C382100104E800020FA
+S315200527C09421FFE87C0802A69381000893A1000CBA
+S315200527D093C1001093E100149001001C7C7F1B78A7
+S315200527E0807F00142C8300007C9E23783BA000006C
+S315200527F04186000883A300042C9E00004085007CAA
+S315200528003F8000272C830000408600202C9D000059
+S315200528104086000C387C59A0480003C97FA3EB7875
+S3152005282083BD00044800004C8163000C7C8BF000BE
+S31520052830418500B4801F0000813F00087C0B0050B5
+S31520052840901F00003949FFE0915F000888030011B9
+S31520052850700900017FCBF050418200148123001CB2
+S31520052860800900047C005050901F00084BFF07FD8F
+S315200528702C9E00004185FF902C8300004186008C0C
+S3152005288048000044801F00007C090050813F000855
+S31520052890901F00003969FFE0917F00088803001129
+S315200528A070090001418200148123001C800900045F
+S315200528B07C005850901F00084BFF07B17C631B799D
+S315200528C0418200488123000C2C8900004186FFB8EF
+S315200528D02C83000041860034907F001493A30004C6
+S315200528E04800002C7D3E5850800300089123000C9B
+S315200528F07C00F21490030008801F00007C1E005007
+S31520052900901F00004BFFFF7493BF00148001001C2D
+S315200529107C0803A68381000883A1000C83C10010CF
+S3152005292083E10014382100184E8000209421FFF001
+S315200529307C0802A693E1000C900100147C7F1B788D
+S31520052940807F00142C8300004186005080030004FC
+S31520052950901F0014813F00008003000C7D20485005
+S31520052960801F0008913F00003160FFE0917F00083D
+S315200529708803001170090001418200148123001C7F
+S31520052980800900047C005850901F00084BFF06DD87
+S315200529902C8300004086FFC0800100147C0803A616
+S315200529A083E1000C382100104E8000209421FFF889
+S315200529B07C0802A69001000C3D2000283C600028DA
+S315200529C08089929C386392A44BFD2BD98001000CFB
+S315200529D07C0803A6382100084E8000209421FFF0AC
+S315200529E07C0802A693C1000893E1000C900100140F
+S315200529F03FE000283FC00028801F9AF4813E9CCCEA
+S31520052A007C804800418600243D20002880699298D4
+S31520052A103880FFFF4BFD1F21801F9AF43860000088
+S31520052A20901E9CCC480000083860000180010014E7
+S31520052A307C0803A683C1000883E1000C3821001019
+S31520052A404E8000209421FFF07C0802A693C1000841
+S31520052A5093E1000C900100143FE000283FC00028B8
+S31520052A60801F9AF4813E9CCC7C80480041860024B8
+S31520052A703D200028806992983880FFFF4BFD1EB9BE
+S31520052A80801F9AF438600000901E9CCC48000008F0
+S31520052A9038600001800100147C0803A683C1000864
+S31520052AA083E1000C382100104E8000209421FFF888
+S31520052AB07C0802A69001000C7C601B7940820018D8
+S31520052AC03D200028806992983D20002890099CCCBD
+S31520052AD04BFD1D098001000C7C0803A63821000842
+S31520052AE04E8000209421FFE87C0802A67D800026E2
+S31520052AF093A1000C93C1001093E100149001001CD2
+S31520052B00918100083FE000283FA00028801F9CCC2B
+S31520052B10813D9AF47C004A78216000007C0B0114E3
+S31520052B202D0000007C7E1B78418A00183D20002858
+S31520052B308069929838000000901F9CCC4BFD1C9D07
+S31520052B407FC3F3783880FFFF4BFD1DED418A001CBE
+S31520052B503D200028806992983880FFFF4BFD1DD9BE
+S31520052B60801D9AF4901F9CCC8001001C8181000851
+S31520052B707C0803A683A1000C83C1001083E1001401
+S31520052B807D820120382100184E8000209421FFF8EF
+S31520052B907C0802A69001000C4BFD1C418001000C0F
+S31520052BA07C0803A6382100084E80002081240000D9
+S31520052BB0906400009069000491230000908300042E
+S31520052BC04E80002081230004800300009009000028
+S31520052BD08123000080030004900900044E80002014
+S31520052BE09421FFF87C0802A69001000C3D200028C0
+S31520052BF0800992A02C8000007C641B7841860010F9
+S31520052C007C0803A64E800021480000483C6000272A
+S31520052C10386359A838A0000038C0000038E0000005
+S31520052C2039000000392000004BFC414D4BFC248522
+S31520052C302C8300004086001C3D20002880099CD05E
+S31520052C402C8000004186000C386000004BFD449521
+S31520052C508001000C7C0803A6382100084E80002040
+S31520052C609421FFF87C0802A69001000C5486063EA6
+S31520052C703D20002838830004806991D838E000017A
+S31520052C804BFF059D7C6B1B794082000C386000004C
+S31520052C9048000018812B000891690000806B000808
+S31520052CA038630004906B00088001000C7C0803A69D
+S31520052CB0382100084E8000209421FFF87C0802A6C2
+S31520052CC09001000C7C631B794182000C8063FFFC1C
+S31520052CD04BFF03998001000C7C0803A638210008C8
+S31520052CE04E8000209421FFE87C0802A693A1000CC3
+S31520052CF093C1001093E100149001001C7C7E1B7982
+S31520052D007CBD2B78418100103C600027386359B47F
+S31520052D104BFFFED13BE000017C9FF0004185001072
+S31520052D2057FF083C7C9FF0004085FFF87FFF0E701B
+S31520052D3057FE103A7FC3F3784BFCE7592C9F0000CA
+S31520052D404085002039600000380000007FC9F378EF
+S31520052D507D63012E300000047C8048004184FFF409
+S31520052D60381FFFFF901D00008001001C7C0803A66C
+S31520052D7083A1000C83C1001083E1001438210018BB
+S31520052D804E8000209421FFE87C0802A69381000846
+S31520052D9093A1000C93C1001093E100149001001C2F
+S31520052DA07C3F0B783B8000002C9C0000408500086A
+S31520052DB0480000881C1C00903D600028392BD97CD2
+S31520052DC07FA04A147FA3EB78388000904BFC6F498F
+S31520052DD07F80E378B01D00163D200027380959CCA1
+S31520052DE0901D00003800000060008000901D002026
+S31520052DF038008008B01D001A3D2000253809301CF2
+S31520052E00901D006C3D20002538092D64901D006419
+S31520052E1038000018981D001C38000000981D001E5B
+S31520052E2038000000981D001D7FA3EB784BFE335D0F
+S31520052E303B9C00014BFFFF743860000048000004EE
+S31520052E4081610000800B00047C0803A6838BFFF0BC
+S31520052E5083ABFFF483CBFFF883EBFFFC7D615B78C7
+S31520052E604E8000209421FFD07C0802A69361001C89
+S31520052E709381002093A1002493C1002893E1002C7F
+S31520052E80900100347C3F0B78907F00087C9D237849
+S31520052E9090BF000C7CDC33783B600000881D001158
+S31520052EA0540907BC5520063E2C800000408600109C
+S31520052EB03D200027386959D04BFFFD294BFD603948
+S31520052EC07C601B78813F000890090058801F000808
+S31520052ED0901D00142C9C000041860064A01C003423
+S31520052EE0700910087D2007342C800000418600508B
+S31520052EF07FA3EB784BFF01B5A01C0034540904E6EB
+S31520052F007D2007342C80000040860028A01C003434
+S31520052F105409077A7D2007342C8000004186000C51
+S31520052F2038000041480000083800003348000008F2
+S31520052F30380000007C03037848000178801F0008CC
+S31520052F40813F0008817F0008814B0034380A000143
+S31520052F507C0B037891690034813F0008817F000846
+S31520052F60800B0044817D00187C005A14900900448A
+S31520052F70813F000C896900015560063E2C800002C0
+S31520052F8041860008480000183D2000283B69D76087
+S31520052F9038000001901F001448000050813F0008AA
+S31520052FA0A16900167D600734813F000C89690001FF
+S31520052FB05569063E3D600027386B59E07C04037849
+S31520052FC07D254B7838C0000038E000003900000028
+S31520052FD0392000004BFC3DA17FA3EB784BFF00CDAC
+S31520052FE03860002F480000CC4BFFFA5D7C601B78CB
+S31520052FF0901F0010801B0008813B000C7C80480038
+S315200530004184002C813B0010380900017C09037896
+S31520053010913B00107FA3EB784BFF0091807F00103A
+S315200530204BFFFA8D386000374800008838000000CD
+S31520053030901D0004801B00042C8000004086000C97
+S3152005304093BB00004800000C813B000493A90004B3
+S3152005305093BB0004813B0008380900017C090378ED
+S31520053060913B0008807F00144BFF0B45801F00080D
+S31520053070813F0008817F0008814B002C380A00011A
+S315200530807C0B03789169002C813F0008817F00081D
+S31520053090800B0040817D00187C005A149009004061
+S315200530A0807F00104BFFFA093860000048000004B5
+S315200530B081610000800B00047C0803A6836BFFEC6E
+S315200530C0838BFFF083ABFFF483CBFFF883EBFFFC09
+S315200530D07D615B784E8000209421FFE093E1001C02
+S315200530E07C3F0B78907F0008909F000C90BF0010C6
+S315200530F0801F000C2C80000041860014813F000CA7
+S3152005310038000000600080009009005881610000A9
+S3152005311083EBFFFC7D615B784E8000209421FFE8E0
+S3152005312093E100147C3F0B787C691B78909F0008FF
+S3152005313090BF000C38000000811F00083CE080206D
+S3152005314060E7690C7C883800418600383CE08020A1
+S3152005315060E7690C7C883800418400A03CE080202B
+S3152005316060E769327C883800418500903CE0802004
+S3152005317060E769317C883800418400804800004436
+S31520053180A109001A610700417CE83B78B109001ABC
+S31520053190817F000C2C8B000041860024810B0000CA
+S315200531A088E8000154E8063E2C8800074086001072
+S315200531B03CE0002539072FD8910B00144800004024
+S315200531C0815F000C2C8A00004086000C3800002FF9
+S315200531D04800002C88EA001154E8063E2C88000297
+S315200531E041860008480000084800000C3800002FDA
+S315200531F04800000448000008380000167C030378C0
+S31520053200480000048161000083EBFFFC7D615B784B
+S315200532104E8000209421FFF87C0802A69001000C20
+S3152005322038600000480181492C83FFFF4186002C28
+S315200532304801B7714801109148012FA94800E57D3D
+S31520053240480143D93D20002838000001900992CC39
+S3152005325038600000480000083860FFFF8001000C38
+S315200532607C0803A6382100084E8000209421FFF013
+S315200532707C0802A693C1000893E1000C9001001476
+S315200532807C9F23797C7E1B78408200143C60003825
+S31520053290606380164BFC1479480000983D20002871
+S315200532A0800992CC2C8000004086000C38600000F6
+S315200532B04BFFFF657FE3FB78388000003D20002823
+S315200532C080A992C07FC6F3784800AAC57C641B797D
+S315200532D0418200607FC3F37838A0000038C0FFFF25
+S315200532E0480181092C830000408600483860000487
+S315200532F0388000014BFCD2897C7F1B7941820034C2
+S315200533007FC3F3784BFC0459386300014BFCE185F8
+S315200533102C830000907F0000418600187FC4F37837
+S315200533204BFC0409480001297FE3FB784800000887
+S3152005333038600000800100147C0803A683C10008BC
+S3152005334083E1000C382100104E80002038600000F3
+S315200533504E8000209421FFE87C0802A693A1000C4C
+S3152005336093C1001093E100149001001C7C7E1B780C
+S315200533707C9D2378480000D97FC3F3787FA4EB781A
+S315200533803D200028800992C438A00000541F35EE40
+S315200533904BFFFEDD7C7D1B794082000C38600000EA
+S315200533A0480000207FC3F3787FE4FB7838A000002F
+S315200533B048013F0D3063FFFF7C6319107FA3183842
+S315200533C08001001C7C0803A683A1000C83C1001084
+S315200533D083E10014382100184E8000203D20002866
+S315200533E0906992C4386000004E8000203860000045
+S315200533F04E800020386000004E8000209421FFF882
+S315200534007C0802A69001000C38800001480181ED58
+S315200534108001000C7C0803A6382100084E80002078
+S315200534204E8000204E8000203800000090040000C9
+S31520053430386000004E800020386000004E80002055
+S315200534403D200028906992C84E8000209421FFA037
+S315200534507C0802A693A1005493C1005893E1005C11
+S31520053460900100643D200028800992C82C80000028
+S31520053470418600747C0803A6386100084E80002129
+S315200534803BA0000093A1003893A1003C93A10040E6
+S31520053490386100208001001C812100149001002044
+S315200534A091210028800100188121000C900100241B
+S315200534B0800100103929FFFF9001002C80010008AA
+S315200534C0912100303000F8949001003448003E4D9B
+S315200534D09061004893A1004C38600000388100486F
+S315200534E048004FDD800100647C0803A683A10054B3
+S315200534F083C1005883E1005C382100604E8000209E
+S315200535009421FFF07C0802A693E1000C900100149B
+S315200535103D200028386992D4800300082C800000BD
+S315200535204186002C7C7F1B78801F00047C0803A61F
+S31520053530807F0000809F00083BFF000C4E80002105
+S31520053540801F00082C8000004086FFE038600000C0
+S31520053550800100147C0803A683E1000C38210010A5
+S315200535604E8000209421FFE07C0802A693A100143A
+S3152005357093C1001893E1001C900100247C7D1B78E3
+S315200535807C9F23783800000090010008480002FD42
+S315200535907FBD1B783C600028386393D07FA4EB78E9
+S315200535A038A000204BFBDCE53D20002880098B5800
+S315200535B02C8000004186000C386100084800064929
+S315200535C03D604800616B00033D2000253929678849
+S315200535D0552901BE7D295B78913D000857E001BE3E
+S315200535E07C005B78901D00143D20002539296874E0
+S315200535F0552901BE7D295B78913D001C3D2000287B
+S3152005360080098B982C800000418600147C0803A62F
+S315200536107FA3EB78388000204E80002180010008AA
+S315200536202C800000418600084800053538600000DA
+S31520053630800100247C0803A683A1001483C10018F9
+S3152005364083E1001C382100204E8000209421FFE0D4
+S315200536507C0802A693A1001493C1001893E1001CCF
+S31520053660900100247C7D1B787C9F23783800000000
+S3152005367090010008480002157FBD1B783C60002894
+S31520053680386393D07FA4EB7838A000204BFBDBFD75
+S315200536903D20002880098B582C8000004186000C8F
+S315200536A038610008480005613D604800616B0003EC
+S315200536B03D2000223929F790552901BE7D295B78C1
+S315200536C0913D000857E001BE7C005B78901D0014F3
+S315200536D03D2000223929F864552901BE7D295B78CC
+S315200536E0913D001C3D20002880098B982C800000E8
+S315200536F0418600147C0803A67FA3EB78388000203A
+S315200537004E800021800100082C800000418600089B
+S315200537104800044D38600000800100247C0803A67B
+S3152005372083A1001483C1001883E1001C38210020E1
+S315200537304E8000209421FFE07C0802A693A1001468
+S3152005374093C1001893E1001C900100247C7D1B7811
+S315200537507C9F237838000000900100084800012D41
+S315200537603D20002880098B582C8000007FBD1B78C2
+S315200537704186000C386100084800048D3D2048002C
+S315200537806129000357E001BE7C004B78901D00148B
+S315200537903D20002880098B982C8000004186001446
+S315200537A07C0803A6387D0014388000044E8000214D
+S315200537B0800100082C80000041860008480003A1EE
+S315200537C0800100247C0803A683A1001483C1001868
+S315200537D083E1001C382100204E8000209421FFE83B
+S315200537E07C0802A693A1000C93C1001093E1001456
+S315200537F09001001C7C7D1B78480000917FBD1B78BD
+S31520053800801D001474090200540001BA6409FC00E5
+S315200538107C60002654631FFE7C6300D07C0018382C
+S315200538207D2318787C031B788001001C7C0803A661
+S3152005383083A1000C83C1001083E1001438210018F0
+S315200538404E8000209421FFF87C0802A69001000CEA
+S31520053850200300007D2019146C60FFF02160000014
+S315200538607C0B01147D2B0379418200103D20002815
+S31520053870906993F0480031F18001000C7C0803A67D
+S31520053880382100084E8000203D200028806993F0CD
+S315200538904E8000209421FFC07C0802A6938100302B
+S315200538A093A1003493C1003893E1003C9001004474
+S315200538B07C7F1B78811F0098750000023BBF00188E
+S315200538C083DF0004418200443D200028814992D0AF
+S315200538D02C8A000041860034813F00A43D607FE0AC
+S315200538E080090000616B00087C8058004086001C1A
+S315200538F0550003DA7D4803A6901F00987FA4EB7830
+S315200539004E800021480001287FC3F3787FE4FB78A9
+S3152005391038A10008480001A53D20002880099BC440
+S315200539202C800000418600247FC3F3787C0803A6FB
+S315200539307FE4FB787FA5EB7838C100084E8000210F
+S315200539402C830000408600E83D200028800983045A
+S315200539502C800000408500383D20002880099B9852
+S315200539602C8000004186001C7FC3F3787C0803A6C3
+S315200539707FE4FB787FA5EB7838C100084E800021CF
+S31520053980386000004BFC41F1480000A43F80002828
+S31520053990807C9AF493A300FC4BFC86B13861000821
+S315200539A0809C9AF438A00024388401184BFBD8DD76
+S315200539B03D20002880099B7C2C800000418600182C
+S315200539C07C0803A67FC3F3787FC4F3787FA5EB78BD
+S315200539D04E8000213D20002880099B482C80000030
+S315200539E0418600147C0803A638610008388000014A
+S315200539F04E8000213D20002880099A842C800000D5
+S31520053A00418600187C0803A6807C9AF47FC4F37847
+S31520053A107FE5FB784E800021386000004BFD36C5DA
+S31520053A20813C9AF438000000900900FC800100448E
+S31520053A307C0803A68381003083A1003483C1003826
+S31520053A4083E1003C382100404E8000209421FFF878
+S31520053A507C0802A69001000C3D20002880099B7455
+S31520053A602C8000004186000C7C0803A64E80002190
+S31520053A703D20002880099B8C2C8000004186002C47
+S31520053A803C600027386359FC3880000038A00000C8
+S31520053A9038C000007C0803A638E000003900000085
+S31520053AA0392000004E8000218001000C7C0803A6E9
+S31520053AB0382100084E80002090650004800400A46B
+S31520053AC090050008800400982C8310009005000CB2
+S31520053AD0800400A8900500144186007441850040A5
+S31520053AE02C8306004186004C418500282C83030043
+S31520053AF041860040418500102C8302004186003412
+S31520053B004800004C2C8304004186001C48000040D8
+S31520053B102C83080041860040480000342C8314007D
+S31520053B204800002C3800000060008025480000244D
+S31520053B308004001090050020380000AF8124000C79
+S31520053B4090050000912500104800000C380000273C
+S31520053B5090050000386000C04E8000209421FFF0BB
+S31520053B607C0802A693E1000C900100143D20002854
+S31520053B7080098B582C80000039298B5840860018DF
+S31520053B804BFC0B193C00004360000002900300002B
+S31520053B904800005C812900182C8900004186001404
+S31520053BA07D2803A64E8000217C7F1B7848000008CF
+S31520053BB03BE0FFFF480002393D2000287C63FB9649
+S31520053BC080098B642C8000007C83F9D641860020F1
+S31520053BD0386000007C0803A657E5083C38C0000C71
+S31520053BE038E000004E800021480000083860FFFFBD
+S31520053BF0800100147C0803A683E1000C38210010FF
+S31520053C004E8000209421FFE07C0802A693A1001493
+S31520053C1093C1001893E1001C900100243D20002843
+S31520053C2080098B582C8000007C7D1B7839298B5880
+S31520053C30408600184BFC0A653C00004360000002E4
+S31520053C4090030000480000A8812900182C8900004F
+S31520053C50418600147D2803A64E8000217C7F1B7893
+S31520053C60480000083BE0FFFF480001853D2000286D
+S31520053C707C63FB9680098B682C8000007FC3F9D670
+S31520053C804186001C7C0803A6386000007FC4F378B3
+S31520053C9038A100084E800021480000083860FFFF43
+S31520053CA02C83FFFF4186004C800100087009000C1B
+S31520053CB04082004038000001901D00003D2000286C
+S31520053CC080098B642C800000418600243860000022
+S31520053CD07FC4F3787C0803A657E5083C38C0000C5A
+S31520053CE038E000044E800021480000083860FFFFB8
+S31520053CF0800100247C0803A683A1001483C1001833
+S31520053D0083E1001C382100204E8000209421FFF8F5
+S31520053D107C0802A69001000C3D200028800993F41A
+S31520053D202C800000418600107C0803A64E800021C9
+S31520053D30480000083860FFFF8001000C7C0803A6B8
+S31520053D40382100084E8000209421FFF87C0802A621
+S31520053D509001000C3D200028800993F82C80000056
+S31520053D604186000C7C0803A64E8000218001000CAC
+S31520053D707C0803A6382100084E8000209421FFF8F0
+S31520053D807C0802A69001000C3D200028800993FCA2
+S31520053D902C800000418600107C0803A64E80002159
+S31520053DA048000008386000008001000C7C0803A646
+S31520053DB0382100084E8000209421FFF87C0802A6B1
+S31520053DC09001000C3D200028800994002C800000DD
+S31520053DD04186000C7C0803A64E8000218001000C3C
+S31520053DE07C0803A6382100084E8000209421FFF880
+S31520053DF07C0802A69001000C3D2000288009940429
+S31520053E002C800000418600107C0803A64E800021E8
+S31520053E1048000008386000008001000C7C0803A6D5
+S31520053E20382100084E8000209421FFF87C0802A640
+S31520053E309001000C3D200028800994082C80000064
+S31520053E40418600107C0803A64E8000214800000804
+S31520053E503860FFFF8001000C7C0803A63821000886
+S31520053E604E8000209421FFF87C0802A69001000CC4
+S31520053E703D2000288009940C2C8000004186000CEA
+S31520053E807C0803A64E8000218001000C7C0803A631
+S31520053E90382100084E8000209421FFF87C0802A6D0
+S31520053EA09001000C3D200028800994102C800000EC
+S31520053EB04186000C7C0803A64E8000218001000C5B
+S31520053EC07C0803A6382100084E8000204E8000205D
+S31520053ED03860FFFF4E800020812300805520045E38
+S31520053EE0900300807D234B784E8000208003008040
+S31520053EF0548404205400045E7C00237890030080BB
+S31520053F004E8000209421FFF07C0802A693E1000C48
+S31520053F10900100143FE00028801F94142C80000097
+S31520053F207C641B784186000C386000004800001C24
+S31520053F30386000015484103A4BFCC645907F941492
+S31520053F403063FFFF7C631910800100147C0803A6EB
+S31520053F5083E1000C382100104E8000209421FFE8D3
+S31520053F607C0802A69381000893A1000C93C100103A
+S31520053F7093E100149001001C3D200028800994142B
+S31520053F802C8000007C7E1B787C9D23787CBC2B783E
+S31520053F9041860038386000104BFCD4F97C7F1B79AC
+S31520053FA0418200282C9E0000418600187FC803A662
+S31520053FB04E8000212C830000907F00084086001447
+S31520053FC07FE3FB784BFCD4F93860FFFF48000020DF
+S31520053FD093BF0000939F00043D2000288009941874
+S31520053FE093E9941838600000901F000C8001001C8E
+S31520053FF07C0803A68381000883A1000C83C10010D9
+S3152005400083E10014382100184E8000209421FFF00A
+S315200540107C0802A693E1000C900100143D2000289F
+S31520054020800994142C8000004186007C3D200028C0
+S3152005403083E994182C9F000041860034801F0000D8
+S315200540407C8018004186001083FF000C2C9F000001
+S315200540504086FFEC2C9F000041860014813F000816
+S315200540608009003C2C800000408600103860002323
+S315200540704BFEFB1D480000307C0803A6807F00040C
+S315200540804E8000212C83FFFF4186001C3D20002801
+S3152005409081699414801F00085469103A7C09592EA9
+S315200540A0480000083860FFFF800100147C0803A63D
+S315200540B083E1000C382100104E8000209421FFE872
+S315200540C07C0802A693A1000C93C1001093E100146D
+S315200540D09001001C7C7F1B787C9E23787CBD2B78E9
+S315200540E04BFC22852C83FFFF4086000C3860FFFFA2
+S315200540F04800004C3D2000288169941457E9103A60
+S315200541007D29582E2C89000041860010800900083B
+S315200541102C80000040860014386000234BFEFA717F
+S315200541203860FFFF480000187C0803A67FE3FB786C
+S315200541307FC4F3787FA5EB784E8000218001001C93
+S315200541407C0803A683A1000C83C1001083E100141B
+S31520054150382100184E8000209421FFF07C0802A605
+S3152005416093C1000893E1000C900100147C7F1B7815
+S315200541707C9E23784BFC21F12C83FFFF4086000C87
+S315200541803860FFFF480000483D20002881699414C7
+S3152005419057E9103A7D29582E2C89000041860010B2
+S315200541A08009001C2C8000004086001438600023FE
+S315200541B04BFEF9DD3860FFFF480000147C0803A696
+S315200541C07FE3FB787FC4F3784E80002180010014BD
+S315200541D07C0803A683C1000883E1000C3821001062
+S315200541E04E8000209421FFE07C0802A69361000CF6
+S315200541F09381001093A1001493C1001893E1001C2C
+S31520054200900100247C7F1B787C9D23787CBC2B78B1
+S315200542104BFC21552C83FFFF418600603F6000281B
+S31520054220813B941457EB103A7FCB482E2C9E0000E9
+S3152005423041860010801E00042C8000004086001058
+S31520054240386000234BFEF949480000307C0803A658
+S315200542507FE3FB787FA4EB787F85E3784E8000218A
+S315200542602C83FFFF41860014817B94145469103AF0
+S315200542707FC9592E480000083860FFFF80010024B9
+S315200542807C0803A68361000C8381001083A100149A
+S3152005429083C1001883E1001C382100204E800020B0
+S315200542A09421FFE87C0802A693A1000C93C1001077
+S315200542B093E100149001001C7C7F1B787C9E23785B
+S315200542C07CBD2B784BFC20A12C83FFFF4086000C60
+S315200542D03860FFFF4800004C3D2000288169941472
+S315200542E057E9103A7D29582E2C8900004186001061
+S315200542F08009000C2C8000004086001438600023BD
+S315200543004BFEF88D3860FFFF480000187C0803A691
+S315200543107FE3FB787FC4F3787FA5EB784E80002179
+S315200543208001001C7C0803A683A1000C83C1001014
+S3152005433083E10014382100184E8000209421FFE8DF
+S315200543407C0802A69381000893A1000C93C1001056
+S3152005435093E100149001001C7C7F1B787C9E2378BA
+S315200543607CBD2B787CDC33784BFC1FFD2C83FFFF33
+S315200543704086000C3860FFFF480000503D2000288D
+S315200543808169941457E9103A7D29582E2C89000005
+S3152005439041860010800900102C80000040860014FC
+S315200543A0386000234BFEF7E93860FFFF4800001C04
+S315200543B07FE3FB787C0803A67FC4F3787FA5EB789B
+S315200543C07F86E3784E8000218001001C7C0803A6A9
+S315200543D08381000883A1000C83C1001083E10014AA
+S315200543E0382100184E8000209421FFE07C0802A683
+S315200543F0934100089361000C9381001093A100144A
+S3152005440093C1001893E1001C900100247C7F1B7842
+S315200544107C9E23787CBD2B787CDC33787CFB3B78B3
+S315200544207D1A43784BFC1F412C83FFFF4086000CE9
+S315200544303860FFFF480000583D2000288169941404
+S3152005444057E9103A7D29582E2C89000041860010FF
+S31520054450800900302C800000408600143860002337
+S315200544604BFEF72D3860FFFF480000247FE3FB78DD
+S315200544707FC4F3787FA5EB787C0803A67F86E3784F
+S315200544807F67DB787F48D3784E8000218001002422
+S315200544907C0803A6834100088361000C83810010F4
+S315200544A083A1001483C1001883E1001C3821002054
+S315200544B04E8000209421FFE87C0802A693810008FF
+S315200544C093A1000C93C1001093E100149001001CE8
+S315200544D07C7F1B787C9E23787CBD2B787CDC33788F
+S315200544E04BFC1E852C83FFFF4086000C3860FFFFA2
+S315200544F0480000503D2000288169941457E9103A58
+S315200545007D29582E2C890000418600108009002C13
+S315200545102C80000040860014386000234BFEF6717F
+S315200545203860FFFF4800001C7FE3FB787C0803A664
+S315200545307FC4F3787FA5EB787F86E3784E800021CC
+S315200545408001001C7C0803A68381000883A1000C3A
+S3152005455083C1001083E10014382100184E80002005
+S315200545609421FFE87C0802A693A1000C93C10010B4
+S3152005457093E100149001001C7C7F1B787C9E237898
+S315200545807CBD2B784BFC1DE12C83FFFF4086000C60
+S315200545903860FFFF4800004C3D20002881699414AF
+S315200545A057E9103A7D29582E2C890000418600109E
+S315200545B0800900342C8000004086001438600023D2
+S315200545C04BFEF5CD3860FFFF480000187C0803A692
+S315200545D07FE3FB787FC4F3787FA5EB784E800021B7
+S315200545E08001001C7C0803A683A1000C83C1001052
+S315200545F083E10014382100184E8000209421FFE025
+S315200546007C0802A6934100089361000C9381001053
+S3152005461093A1001493C1001893E1001C9001002476
+S315200546207C7F1B787C9E23787CBD2B787CDC33783D
+S315200546307CFB3B787D1A43784BFC1D2D2C83FFFF95
+S315200546404086000C3860FFFF480000583D200028B2
+S315200546508169941457E9103A7D29582E2C89000032
+S3152005466041860010800900242C8000004086001415
+S31520054670386000234BFEF5193860FFFF48000024FB
+S315200546807FE3FB787FC4F3787FA5EB787C0803A6C8
+S315200546907F86E3787F67DB787F48D3784E80002155
+S315200546A0800100247C0803A6834100088361000C51
+S315200546B08381001083A1001483C1001883E1001CA7
+S315200546C0382100204E8000209421FFE87C0802A690
+S315200546D09381000893A1000C93C1001093E1001467
+S315200546E09001001C7C7F1B787C9E23787CBD2B78D3
+S315200546F07CDC33784BFC1C712C83FFFF4086000C39
+S315200547003860FFFF480000503D2000288169941439
+S3152005471057E9103A7D29582E2C890000418600102C
+S31520054720800900202C800000408600143860002374
+S315200547304BFEF45D3860FFFF4800001C7FE3FB78E5
+S315200547407C0803A67FC4F3787FA5EB787F86E3787C
+S315200547504E8000218001001C7C0803A68381000869
+S3152005476083A1000C83C1001083E1001438210018B1
+S315200547704E8000209421FFE87C0802A693A1000C18
+S3152005478093C1001093E100149001001C7C7F1B78D7
+S315200547907C9E23787CBD2B784BFC1BCD2C83FFFF81
+S315200547A04086000C3860FFFF4800004C3D2000285D
+S315200547B08169941457E9103A7D29582E2C890000D1
+S315200547C041860010800900282C80000040860014B0
+S315200547D0386000234BFEF3B93860FFFF4800001808
+S315200547E07C0803A67FE3FB787FC4F3787FA5EB7867
+S315200547F04E8000218001001C7C0803A683A1000CA5
+S3152005480083C1001083E10014382100184E80002052
+S315200548109421FFE07C0802A69361000C9381001089
+S3152005482093A1001493C1001893E1001C9001002464
+S315200548307C7F1B787C9E23787CBD2B787CDC33782B
+S315200548407CFB3B784BFC1B212C83FFFF4086000C11
+S315200548503860FFFF480000543D20002881699414E4
+S3152005486057E9103A7D29582E2C89000041860010DB
+S31520054870800900442C8000004086001438600023FF
+S315200548804BFEF30D3860FFFF480000207FE3FB78E1
+S315200548907FC4F3787C0803A67FA5EB787F86E3782B
+S315200548A07F67DB784E800021800100247C0803A6E3
+S315200548B08361000C8381001083A1001483C1001835
+S315200548C083E1001C382100204E8000209421FFE042
+S315200548D07C0802A69361000C9381001093A1001415
+S315200548E093C1001893E1001C900100247C7F1B785E
+S315200548F07C9E23787CBD2B787CDC33787CFB3B78CF
+S315200549004BFC1A652C83FFFF4086000C3860FFFFA1
+S31520054910480000543D2000288169941457E9103A2F
+S315200549207D29582E2C8900004186001080090040DB
+S315200549302C80000040860014386000234BFEF2517F
+S315200549403860FFFF480000207FE3FB787FC4F378BB
+S315200549507C0803A67FA5EB787F86E3787F67DB78DF
+S315200549604E800021800100247C0803A68361000C6B
+S315200549708381001083A1001483C1001883E1001CE4
+S31520054980382100204E8000209421FFE87C0802A6CD
+S3152005499093A1000C93C1001093E100149001001C13
+S315200549A07C7F1B787C9E23787CBD2B784BFC19B9A4
+S315200549B02C83FFFF4086000C3860FFFF4800004C23
+S315200549C03D2000288169941457E9103A7D29582EEF
+S315200549D02C89000041860010800900182C800000D3
+S315200549E040860014386000234BFEF1A53860FFFF92
+S315200549F0480000187C0803A67FE3FB787FC4F3787C
+S31520054A007FA5EB784E8000218001001C7C0803A63B
+S31520054A1083A1000C83C1001083E1001438210018FE
+S31520054A204E8000209421FFE87C0802A693A1000C65
+S31520054A3093C1001093E100149001001C7C7F1B7824
+S31520054A407C9E23787CBD2B784BFC191D2C83FFFF80
+S31520054A504086000C3860FFFF4800004C3D200028AA
+S31520054A608169941457E9103A7D29582E2C8900001E
+S31520054A7041860010800900142C8000004086001411
+S31520054A80386000234BFEF1093860FFFF4800001807
+S31520054A907C0803A67FE3FB787FC4F3787FA5EB78B4
+S31520054AA04E8000218001001C7C0803A683A1000CF2
+S31520054AB083C1001083E10014382100184E800020A0
+S31520054AC09421FFF07C0802A693C1000893E1000C0F
+S31520054AD0900100147C7F1B787C9E23784BFC1889DB
+S31520054AE02C83FFFF4086000C3860FFFF48000048F6
+S31520054AF03D2000288169941457E9103A7D29582EBE
+S31520054B002C89000041860010800900382C80000081
+S31520054B1040860014386000234BFEF0753860FFFF91
+S31520054B20480000147C0803A67FE3FB787FC4F3784E
+S31520054B304E800021800100147C0803A683C100084D
+S31520054B4083E1000C382100104E8000209421FFF0CF
+S31520054B507C0802A693E1000C900100147C7F1B784B
+S31520054B604BFC18052C83FFFF418600183D200028A5
+S31520054B708169941457E9103A7C69582E4800000833
+S31520054B8038600000800100147C0803A683E1000C30
+S31520054B90382100104E8000209421FFF07C0802A6C3
+S31520054BA093C1000893E1000C900100143FE0002812
+S31520054BB0801F947C2C8000003BDF947C4085001070
+S31520054BC03C600028386394204800006C386000005B
+S31520054BD03880000038A000003CC0002538C64C1897
+S31520054BE03CE0002538E75D6C3D0000253908564038
+S31520054BF03D2000263929D9484BFC126D2C83FFFF11
+S31520054C00907F947C4186002C3C6000283863942054
+S31520054C103D2000283929946C3D600028A01E0002FD
+S31520054C20816B9480B00900089169000C4800000842
+S31520054C3038600000800100147C0803A683C10008A3
+S31520054C4083E1000C382100104E8000209421FFD8E6
+S31520054C507C0802A6934100109361001493810018E5
+S31520054C6093A1001C93C1002093E100249001002C00
+S31520054C707C7D1B787C9C23787CBB2B784BFFDD6168
+S31520054C807C7A1B787FA3EB78388100087F85E378CB
+S31520054C907F66DB784BFFADE17C7D1B787F43D37840
+S31520054CA04BFFDE0D2C9D0000418600107FA3EB787F
+S31520054CB04BFEEEDD480000383D2000283C600028EC
+S31520054CC08089948080A100083863946C4BFC196513
+S31520054CD02C83FFFF41860010812100089069003052
+S31520054CE04800001080610008480000313860FFFF49
+S31520054CF08001002C7C0803A68341001083610014E3
+S31520054D008381001883A1001C83C1002083E1002430
+S31520054D10382100284E8000209421FFE87C0802A631
+S31520054D2093A1000C93C1001093E100149001001C7F
+S31520054D307C7F1B784BFFDCA9A01F000670090001AC
+S31520054D407C7E1B7883BF00304182000C3BE000004F
+S31520054D50480000107FE3FB784BFFB08D7C7F1B78E6
+S31520054D607FC3F3784BFFDD497FE3FB783D200028A1
+S31520054D708169941457A9103A380000007C09592EE8
+S31520054D808001001C7C0803A683A1000C83C10010AA
+S31520054D9083E10014382100184E8000209421FFE07D
+S31520054DA07C0802A693A1001493C1001893E1001C68
+S31520054DB0900100247C9F23787CBE2B784BFC15A97B
+S31520054DC07C7D1B782C9DFFFF4186005838610008A5
+S31520054DD07FE4FB787FC5F37838C00008480017457F
+S31520054DE07C631B794182000C4BFEEDA548000034FF
+S31520054DF0808100087FA3EB784BFFADED7C631B79A3
+S31520054E0040820014806100084BFEE2A13860000054
+S31520054E10480000144BFEED79806100084BFEE28DBB
+S31520054E203860FFFF800100247C0803A683A10014B7
+S31520054E3083C1001883E1001C382100204E80002004
+S31520054E409421FFF07C0802A693E1000C9001001442
+S31520054E507C9F23784BFC15112C83FFFF4186002070
+S31520054E607FE4FB784BFFAE097C631B794082000CFF
+S31520054E70386000004800000C4BFEED153860FFFF3A
+S31520054E80800100147C0803A683E1000C382100105C
+S31520054E904E8000209421FFD87C0802A69361001439
+S31520054EA09381001893A1001C93C1002093E100244F
+S31520054EB09001002C7CBB2B78801B00007C9C2378E2
+S31520054EC0900100084BFC14A17C7F1B782C9FFFFFCB
+S31520054ED0418601C44BFFDB09A01F000270090002B1
+S31520054EE07C7D1B7840820018386000164BFEECA1AD
+S31520054EF07FA3EB784BFFDBB94800019CA01F00067A
+S31520054F007009010041820030A81F00422C80000054
+S31520054F1040860068386000464BFEEC757FA3EB782B
+S31520054F204BFFDB8D4800017038000035B01F004867
+S31520054F3048000048A81F00422C8000004086003CFF
+S31520054F40A01F00482C8000004086003CA01F0006BC
+S31520054F50700900204082FFD4387F00144BFFDB897F
+S31520054F60A81F00422C80000040860010A01F004884
+S31520054F702C8000004186FFD8A01F00482C80000009
+S31520054F8041860020A07F00484BFEEC053800000036
+S31520054F90B01F00487FA3EB784BFFDB15480000F8D0
+S31520054FA0386000003880000838A0008038C000012D
+S31520054FB04BFFA2157C7E1B7940820018386000378E
+S31520054FC04BFEEBCD7FA3EB784BFFDAE5480000C817
+S31520054FD083FF003C388000017FE3FB784BFFCBD96C
+S31520054FE02C830000408600103C60002738635A2435
+S31520054FF04BFFDBF17FE3FB787FC4F3784BFFAF8D67
+S315200550002C9C000041860050813E000C8001000842
+S315200550107C8048004085000891210008807E000894
+S3152005502080A100087F84E3784BFBC26138610008C4
+S315200550307F64DB7838A000044BFBC2513D20002855
+S315200550408009941C2C8000004186000C7F83E37820
+S31520055050480015B17FC3F3784BFEE0517FA3EB786B
+S315200550604BFFDA4D3C6000283863946C3D200028C0
+S31520055070808994807FE5FB784BFC15B92C83FFFF4F
+S315200550804186000C907F0030480000107FE3FB78B6
+S315200550904BFFFC893860FFFF8001002C7C0803A6A6
+S315200550A0836100148381001883A1001C83C100201D
+S315200550B083E10024382100284E8000209421FFE03A
+S315200550C07C0802A69381001093A1001493C10018B1
+S315200550D093E1001C900100247C9F23787CBC2B78CF
+S315200550E04BFC12857C7E1B782C9EFFFF4086000C90
+S315200550F03860FFFF480001384BFFD8E5801E0004C5
+S31520055100700001042C8001047C7D1B7840860010EC
+S315200551104BFFD99D386000454800002C7FA3EB78CE
+S315200551204BFFD98D386100087FE4FB787F85E378CE
+S3152005513038C00008480013ED7C7F1B794182001496
+S315200551407FE3FB784BFEEA493860FFFF480000E025
+S31520055150808100087FC3F3784BFFAECD7C7F1B791A
+S31520055160418200207FE3FB784BFEEA25A01E000640
+S31520055170806100087000FFFBB01E00064800003065
+S315200551804BFFD85D801E0004700001042C800104AD
+S315200551907C7D1B7840860024386000444BFEE9F16F
+S315200551A07FA3EB784BFFD909806100084BFEDEFD16
+S315200551B03860FFFF48000078A01E0006700900042D
+S315200551C041820030A01E00482C8000004086003019
+S315200551D0387E00144BFFD911A01E00067009000465
+S315200551E041820010A01E00482C8000004186FFE465
+S315200551F0A01E00482C8000004186001CA07E004889
+S315200552003BE0FFFF4BFEE98938000000B01E004851
+S31520055210480000083BE000007FA3EB784BFFD891C0
+S31520055220806100084BFEDE857FE3FB788001002444
+S315200552307C0803A68381001083A1001483C100186E
+S3152005524083E1001C382100204E8000209421FFA8F0
+S315200552507C0802A69341004093610044938100484F
+S3152005526093A1004C93C1005093E100549001005C3A
+S315200552707C7D1B787C9F23787CBE2B787CDA3379E2
+S3152005528038000000900100383B60FFFF4082000C8B
+S315200552904BFFFE2D480001387FA3EB784BFC10C948
+S315200552A02C83FFFF4186011CA0030006700901001F
+S315200552B04082002438000001900100387FA3EB7856
+S315200552C03880001038A100384BFC02B52C83FFFF2F
+S315200552D0418600F07FA3EB787FE4FB787FC5F378E2
+S315200552E04BFFFDDD2C830000408400A84BFBF3B962
+S315200552F05463043E3863FFBC28830001418500982A
+S3152005530038610008388000204BFC4A0D38600100C2
+S31520055310388000003BE100087FE5FB7857BEE8FAB8
+S3152005532057AB06FE392000017C1EF82E7D3C5830F1
+S3152005533038C000007F47D3787C00E3787C1EF92EA1
+S31520055340480033612C8300004085003C7C1EF82EE6
+S315200553507C09E03941820040380000109001003C6C
+S315200553607FA3EB783881002838A1003C480013AD8F
+S315200553702063FFFF3063FFFF7C6319107F7B18389E
+S31520055380480000143860003C4BFEE805480000083C
+S315200553903B600000800100382C8000004186002CEF
+S315200553A038000000900100387FA3EB783880001084
+S315200553B038A100384BFC01C92C83FFFF4086000C21
+S315200553C03860FFFF480000087F63DB788001005CBA
+S315200553D07C0803A6834100408361004483810048FD
+S315200553E083A1004C83C1005083E100543821005825
+S315200553F04E8000209421FFA87C0802A692E1003465
+S31520055400930100389321003C934100409361004469
+S315200554109381004893A1004C93C1005093E1005419
+S315200554209001005C7C9D23787CBC2B787CDB3378D3
+S315200554307CFF3B787D1A43784BFC0F2D7C791B78B6
+S315200554402C99FFFF3B0000003BC00000408600244E
+S31520055450576987FE317DFFFF7C0BE9107D2B0039CF
+S31520055460418201387FA3EB784BFEDC414800012CB5
+S315200554704BFFD56D7C771B78386100207FE4FB7860
+S315200554807F45D37838C00008480010997C7F1B7962
+S31520055490418200347FE3FB784BFEE6F5576987FEAC
+S315200554A0317DFFFF7C0BE9107D2B00394182000CF5
+S315200554B07FA3EB784BFEDBF57EE3BB784BFFD5F17F
+S315200554C0480000D8776000014182000C7FB8EB7850
+S315200554D048000030380100289001000838000001F6
+S315200554E09001000C93C100109381001493C10018FC
+S315200554F09001001C93A100289381002C3BC1000834
+S315200555007F9DE3787F23CB787FC5F3787F06C378A5
+S3152005551038E00000808100207F68DB784BFFACE116
+S315200555207C7F1B78806100204BFEDB417EE3BB78C8
+S315200555304BFFD57D2C9F0000418600482C9E000000
+S3152005554041860038801E000C7C80E8004186002CB0
+S315200555506BE00004212000007C0901146BE900465C
+S31520055560216900007D2B49147C004B783000FFFF14
+S315200555707C0001107FFF00382C9F00004086001C10
+S315200555802C9E00007FA3EB7841860014801E000C1C
+S315200555907C601850480000083860FFFF8001005CD9
+S315200555A07C0803A682E10034830100388321003C70
+S315200555B083410040836100448381004883A1004CD8
+S315200555C083C1005083E10054382100584E800020C5
+S315200555D09421FFB87C0802A69321002C9341003024
+S315200555E0936100349381003893A1003C93C1004018
+S315200555F093E100449001004C7C9D23787CBF2B7859
+S315200556007CDC33784BFC0D617C7B1B782C9BFFFF68
+S315200556103B4000003BC0000040860024578987FE9A
+S31520055620317DFFFF7C0BE9107D2B0039418200E49B
+S315200556307FA3EB784BFEDA75480000D84BFFD3A144
+S31520055640778000017C791B784182000C7FBAEB7844
+S31520055650480000303801002090010008380000017C
+S315200556609001000C93C1001093E1001493C100181A
+S315200556709001001C93A1002093E100243BC1000862
+S315200556807FFDFB787F63DB78388000007FC5F37864
+S315200556907F46D37838E000007F88E3784BFFAB61FF
+S315200556A07C7F1B787F23CB784BFFD4052C9F00006E
+S315200556B0418600482C9E000041860038801E000C3D
+S315200556C07C80E8004186002C6BE000042120000048
+S315200556D07C0901146BE90046216900007D2B4914DC
+S315200556E07C004B783000FFFF7C0001107FFF0038DF
+S315200556F02C9F00004086001C2C9E00007FA3EB7883
+S3152005570041860014801E000C7C6018504800000855
+S315200557103860FFFF8001004C7C0803A68321002CFE
+S3152005572083410030836100348381003883A1003CA6
+S3152005573083C1004083E10044382100484E80002083
+S315200557409421FFC07C0802A69361002C938100302A
+S3152005575093A1003493C1003893E1003C90010044A5
+S315200557607C7B1B787C9C23787CBD2B784BFFD27168
+S315200557703801002090010008392000019121000CF4
+S31520055780380000009001001093A100149001001824
+S315200557909121001C9381002093A100247C7C1B78F9
+S315200557A07F63DB783880000038A1000838C0000008
+S315200557B038E00000390000004BFFAA457C7B1B78AA
+S315200557C07F83E3784BFFD2E92C9B0000418600407E
+S315200557D0800100147C80E8004186002C6B60000463
+S315200557E0212000007C0901146B690046216900000F
+S315200557F07D2B49147C004B783000FFFF7C0001107F
+S315200558007F7B00382C9B0000408600108001001409
+S315200558107C60E850480000083860FFFF800100449E
+S315200558207C0803A68361002C8381003083A1003484
+S3152005583083C1003883E1003C382100404E8000209A
+S315200558409421FF787C0802A67D8000269321006C92
+S3152005585093410070936100749381007893A1007C35
+S3152005586093C1008093E100849001008C91810068AA
+S315200558707CB92B78772000017C9D23784182000C0A
+S3152005588038600016480000544BFC0ADD7C7A1B78EC
+S315200558902C9AFFFF4086000C3860FFFF48000294D3
+S315200558A0807D000C2883000740850040288303FF60
+S315200558B04085000C386000244800002054631838C1
+S315200558C03880000138A000004BFFD3997C7E1B79D8
+S315200558D040820010386000374BFEE2B54BFFFFBC17
+S315200558E03B6000014800000C3BC100203B600000E6
+S315200558F04BFFD0ED93C1000839200000817D000CB7
+S315200559009121001891210010380000019001001CFA
+S31520055910912100149161000C801D000C39000000B6
+S315200559207C8800407C7C1B78815D0008408400745F
+S31520055930396A00042D1B0000800B00002C80000016
+S3152005594040840024386000164BFEE2457F83E378C9
+S315200559504BFFD15D418AFF44806100084BFFD35D33
+S315200559604BFFFF3841860024901E0004800A000064
+S31520055970901E000080010014812B00003BDE0008EC
+S315200559807C004A1490010014801D000C3908000182
+S315200559907C880040396B0008394A00084184FF9C01
+S315200559A0809D00002C84000083C1000841860040AC
+S315200559B03861006080BD000438C0000848000B65CA
+S315200559C07C7F1B794182002C7FE3FB784BFEE1C16E
+S315200559D07F83E3784BFFD0D92C9B00004186FEBC04
+S315200559E07FC3F3784BFFD2D54BFFFEB09081006085
+S315200559F0809D00102C84000041860050386100648B
+S31520055A0080BD001438C0000E48000B197C7F1B7919
+S31520055A104182003C806100602C830000418600089D
+S31520055A204BFED6897FE3FB784BFEE1657F83E378E2
+S31520055A304BFFD07D2C9B00004186FE607FC3F3780B
+S31520055A404BFFD2794BFFFE54908100647F43D37878
+S31520055A5038A1000838C000007F28CB7880810060F7
+S31520055A6080E1006483A100144BFFA7957C7F1B78FA
+S31520055A702C9F0016800100147F40E85040860028A0
+S31520055A80386000164BFEE1097F83E3784BFFD02172
+S31520055A902C9B00004186FE047FC3F3784BFFD21D65
+S31520055AA04BFFFDF8806100642C83000041860008C9
+S31520055AB04BFED5F9806100602C83000041860008E5
+S31520055AC04BFED5E97F83E3784BFFCFE52C9B000082
+S31520055AD04186000C7FC3F3784BFFD1E12C9F000054
+S31520055AE041860038800100147C80E8004186002C20
+S31520055AF06BE00004212000007C0901146BE90046B7
+S31520055B00216900007D2B49147C004B783000FFFF6E
+S31520055B107C0001107FFF00387FE0FE707C03FA7859
+S31520055B207C6300507C63FE707F4018787C63037825
+S31520055B308001008C818100687C0803A68321006C86
+S31520055B4083410070836100748381007883A1007C82
+S31520055B5083C1008083E100847D820120382100886D
+S31520055B604E8000209421FFB07C0802A693010030C8
+S31520055B7093210034934100389361003C9381004082
+S31520055B8093A1004493C1004893E1004C9001005431
+S31520055B907C9923787CBD2B787CDC33787CFA3B7822
+S31520055BA07D1B43784BFC07C17C7E1B782C9EFFFF13
+S31520055BB03BE000004186015C4BFFCE2538010020E5
+S31520055BC090010008380000019001000C93E10010B7
+S31520055BD093A1001493E1001893E1001C9321002062
+S31520055BE093A100249381002C7C781B787FC3F378BE
+S31520055BF0388100287780000138A1000838E00000A8
+S31520055C003901002C7CC0002654C61FFE30C6FFFF76
+S31520055C107CC631107CC6C8384BFFAB09301AFFFF4E
+S31520055C207D20D110317BFFFF7C0BD9107D2B0039D0
+S31520055C307C7E1B784182007483FB00002C9F00002C
+S31520055C4040850010812100282C8900004086000C03
+S31520055C503BE00000480000388169000C7C9F580015
+S31520055C607F44D378806900084CE623827C00002691
+S31520055C70540047FE7C0000D07FE900387D6500781A
+S31520055C807D3F2B787FE5FB784BFBB60193FB000028
+S31520055C903D2000288009941C2C8000004186000C9C
+S31520055CA07F43D3784800095D806100282C83000056
+S31520055CB0418600084BFED3F57F03C3784BFFCDF114
+S31520055CC02C9E000041860040800100147C80E8005F
+S31520055CD04186002C6BC00004212000007C0901149C
+S31520055CE06BC90046216900007D2B49147C004B7841
+S31520055CF03000FFFF7C0001107FDE00382C9E00005F
+S31520055D0040860010800100147C60E8504800000899
+S31520055D103860FFFF800100547C0803A6830100300C
+S31520055D2083210034834100388361003C8381004010
+S31520055D3083A1004483C1004883E1004C38210050EB
+S31520055D404E8000209421FFB87C0802A6936100347A
+S31520055D509381003893A1003C93C1004093E1004410
+S31520055D609001004C7C9B23787CBE2B787CDD337898
+S31520055D704BFC05F57C7C1B782C9CFFFF3BE000004B
+S31520055D80418600C44BFFCC593801002090010008FC
+S31520055D90380000019001000C93E1001093C1001416
+S31520055DA093E1001893E1001C9361002093C1002420
+S31520055DB093A1002877A000017C7D1B787F83E3785B
+S31520055DC03880000038A1000838E000003901002895
+S31520055DD07CC0002654C61FFE30C6FFFF7CC6311088
+S31520055DE07CC6D8384BFFA93D7C7F1B787FA3EB78F3
+S31520055DF04BFFCCBD2C9F000041860040800100143E
+S31520055E007C80F0004186002C6BE0000421200000F8
+S31520055E107C0901146BE90046216900007D2B491494
+S31520055E207C004B783000FFFF7C0001107FFF003897
+S31520055E302C9F000040860010800100147C60F050E5
+S31520055E40480000083860FFFF8001004C7C0803A647
+S31520055E50836100348381003883A1003C83C10040DF
+S31520055E6083E10044382100484E8000209421FFB864
+S31520055E707C0802A693410030936100349381003853
+S31520055E8093A1003C93C1004093E100449001004C4E
+S31520055E907C7A1B787C9B23787CBC2B783BA00000E6
+S31520055EA093A100284BFFCB3938010020900100082B
+S31520055EB0380000019001000C93A100109381001475
+S31520055EC093A1001893A1001C9361002093810024BF
+S31520055ED07C7D1B787F43D3783880000038A1000865
+S31520055EE038C0000038E00000390100284BFFA835EE
+S31520055EF07C7B1B787FA3EB784BFFCBB52C9B0000D7
+S31520055F0041860040800100147C80E0004186002CFB
+S31520055F106B600004212000007C0901146B69004692
+S31520055F20216900007D2B49147C004B783000FFFF4A
+S31520055F307C0001107F7B00382C9B000040860010DA
+S31520055F40800100147C60E050480000083860FFFF9F
+S31520055F508001004C7C0803A6834100308361003410
+S31520055F608381003883A1003C83C1004083E100443E
+S31520055F70382100484E8000209421FF687C0802A61F
+S31520055F807D800026930100789321007C9341008033
+S31520055F90936100849381008893A1008C93C100901E
+S31520055FA093E100949001009C918100747C9F237855
+S31520055FB07CBD2B7877A00001380000009001006099
+S31520055FC0900100644182000C386000164800005498
+S31520055FD04BFC03957C7A1B782C9AFFFF4086000C98
+S31520055FE03860FFFF480002F8807F000C28830007F1
+S31520055FF040850040288303FF4085000C3860002437
+S3152005600048000020546318383880000138A0000065
+S315200560104BFFCC517C7E1B794082001038600037BF
+S315200560204BFEDB6D4BFFFFBC3B6000014800000CBF
+S315200560303BC100203B6000004BFFC9A593BF00185C
+S3152005604093C1000838000000813F000C900100181C
+S3152005605090010010900100149001001C39000000E9
+S315200560609121000C801F000C7C7C1B787C880040CD
+S315200560703B3F00043B1F0014815F000840840074E9
+S31520056080396A00042D1B0000800B00002C800000BF
+S3152005609040840024386000164BFEDAF57F83E378CA
+S315200560A04BFFCA0D418AFF3C7FC3F3784BFFCC0DCE
+S315200560B04BFFFF3041860024901E0004800A000015
+S315200560C0901E000080010014812B00003BDE000895
+S315200560D07C004A1490010014801F000C3908000129
+S315200560E07C880040396B0008394A00084184FF9CAA
+S315200560F07F43D3783881006038A1000838C0000076
+S31520056100391F001883C1000880010014813F001043
+S31520056110900100687D20FE707C074A787CE7005058
+S315200561207CE7FE70380100647C0738384BFFA5F5FF
+S31520056130801F0000812100142C800000800100684A
+S315200561407C7D1B787F49005041860074801F0004A2
+S315200561502C80000090010068408500108121006098
+S315200561602C89000040860010380000009001006848
+S31520056170480000248169000C7C8058004085000871
+S315200561809161006880690008809F000080A10068F1
+S315200561904BFBB0F9386100687F24CB7838A0000422
+S315200561A04BFBB0E93D2000288009941C2C8000007B
+S315200561B04186000C807F000048000449801F00109E
+S315200561C02C8000004186005C801F00142C80000076
+S315200561D09001006840850010812100642C8900000B
+S315200561E04086001038000000900100684800002411
+S315200561F08169000C7C805800408500089161006803
+S3152005620080690008809F001080A100684BFBB07D47
+S31520056210386100687F04C37838A000044BFBB06D55
+S315200562202C9D001640860028386000164BFED96145
+S315200562307F83E3784BFFC8792C9B00004186FDA41C
+S315200562407FC3F3784BFFCA754BFFFD9880610064C9
+S315200562502C830000418600084BFECE5180610060EC
+S315200562602C830000418600084BFECE417F83E378D0
+S315200562704BFFC83D2C9B00004186000C7FC3F3785D
+S315200562804BFFCA392C9D00004186003C8001001435
+S31520056290812100687C8048004186002C6BA0000483
+S315200562A0212000007C0901146BA900462169000004
+S315200562B07D2B49147C004B783000FFFF7C000110B4
+S315200562C07FBD00387FA0FE707C03EA787C63005092
+S315200562D07C63FE707F4018787C6303788001009C80
+S315200562E0818100747C0803A6830100788321007CC4
+S315200562F083410080836100848381008883A1008C8B
+S3152005630083C1009083E100947D8201203821009885
+S315200563104E8000209421FFE07C0802A693410008C8
+S315200563209361000C9381001093A1001493C100186A
+S3152005633093E1001C900100247C9B23787CBA2B7862
+S315200563407CDD33787CFE3B784BFC001D7C7C1B7802
+S315200563502C9CFFFF3BE000004186007C2C9E0080A4
+S315200563604085000C38600016480000682C9D00000A
+S315200563704186003C386000003880000A38A000803D
+S3152005638038C000014BFF8E417C7F1B794082000C73
+S31520056390386000374800003C7FA3EB78809F0008D3
+S315200563A07FC5F3784BFBAEE593DF000C7F83E3785F
+S315200563B07F64DB787F45D3787FE6FB784BFFADD1CD
+S315200563C07C631B794082000C386000004800000C75
+S315200563D04BFED7BD3860FFFF800100247C0803A64D
+S315200563E0834100088361000C8381001083A100147A
+S315200563F083C1001883E1001C382100204E8000202F
+S315200564009421FFD87C0802A6936100149381001875
+S3152005641093A1001C93C1002093E100249001002C38
+S315200564207C9D23787CBC2B787CDF33787CFB3B7882
+S31520056430380000009001000C4BFBFF2D7C7E1B785D
+S315200564402C9EFFFF4086000C3860FFFF480000B0F9
+S315200564502C9F0000418600187F63DB783881000871
+S3152005646038A000044BFBAE254800000893E1000840
+S315200564707FC3F3787FA4EB787F85E37838C1000C5A
+S315200564804BFFAFA97C631B79418200104BFED701D8
+S315200564903860FFFF480000682C9F00004186004CAD
+S315200564A0816100082C8B0000418600408121000C6B
+S315200564B02C890000418600448009000C7C8B000055
+S315200564C040850008900100088069000880A1000821
+S315200564D07FE4FB784BFBADB5386100087F64DB783C
+S315200564E038A000044BFBADA58061000C2C83000071
+S315200564F0418600084BFECB75386000008001002CD4
+S315200565007C0803A6836100148381001883A1001CDF
+S3152005651083C1002083E10024382100284E800020F5
+S315200565209421FFE07C0802A69361000C938100105C
+S3152005653093A1001493C1001893E1001C9001002437
+S315200565407CBE2B782C9E00807C7B1B787C9C2378BC
+S315200565507CDD33784085000C3860001648000080C5
+S31520056560386000007FA4EB7838A0008038C0000191
+S315200565704BFF8C557C7F1B794082000C3860003799
+S315200565804800005C93DF000C7F83E378809F00083A
+S315200565907FC5F3784BFBACF52C9D000893FB0000DB
+S315200565A0408600383D2000288009941C2C80000058
+S315200565B0807F000841860020880300012C8000008A
+S315200565C040860014880300002C80000240860008BF
+S315200565D0980300019BC30000386000008001002459
+S315200565E07C0803A68361000C8381001083A1001417
+S315200565F083C1001883E1001C382100204E8000202D
+S3152005660038000000980300004E8000209421FFE802
+S315200566107C0802A69381000893A1000C93C1001063
+S3152005662093E100149001001C7C9C23787CBD2B787B
+S315200566304BFBFD357C7F1B782C9FFFFF4086000C8E
+S315200566403860FFFF480000B4386000003880000835
+S3152005665038A0008038C000014BFF8CF17C7E1B7969
+S315200566604082000C386000374800003C7FE3FB7809
+S315200566708123000C8009001C3880000F7C0803A6A6
+S3152005668038A000007FC6F37838E000004E80002150
+S315200566907C7F1B794182001C7FC3F3784BFECA0D94
+S315200566A07FE3FB784BFED4E93860FFFF4800004CBA
+S315200566B0801D0000813E000C7C8048004085000836
+S315200566C0913D0000807E000880BD00007F84E37830
+S315200566D04BFBABB93D2000288009941C2C8000007B
+S315200566E04186000C7F83E3784BFFFF197FC3F37840
+S315200566F04BFEC9B9386000008001001C7C0803A642
+S315200567008381000883A1000C83C1001083E1001456
+S31520056710382100184E8000209421FFE87C0802A627
+S315200567209381000893A1000C93C1001093E10014F6
+S315200567309001001C7C9C23787CBD2B784BFBFC2987
+S315200567407C7F1B782C9FFFFF4086000C3860FFFF5F
+S31520056750480000CCA01F0006700900024082000CEC
+S315200567603860003948000024386000003880000869
+S3152005677038A0008038C000014BFF8BD17C7E1B7969
+S3152005678040820014386000374BFED4053860FFFF81
+S315200567904800008C7FE3FB788123000C8009001CD0
+S315200567A0388000107C0803A638A000007FC6F37841
+S315200567B038E000004E8000217C631B794182001859
+S315200567C04BFED3CD7FC3F3784BFEC8E13860FFFF80
+S315200567D04800004C801D0000813E000C7C8048004E
+S315200567E040850008913D0000807E000880BD0000A0
+S315200567F07F84E3784BFBAA953D2000288009941CCD
+S315200568002C8000004186000C7F83E3784BFFFDF545
+S315200568107FC3F3784BFEC895386000008001001CC5
+S315200568207C0803A68381000883A1000C83C1001080
+S3152005683083E10014382100184E8000209421FFF0B2
+S315200568407C0802A693E1000C900100147C9F237816
+S315200568504BFBFB152C83FFFF418600107FE4FB785D
+S315200568604BFFA7F1480000083860FFFF80010014A0
+S315200568707C0803A683E1000C382100104E800020F9
+S31520056880386000014E8000209421FF409061009CD5
+S315200568907C7342A6906100247C7A02A6906100A4AE
+S315200568A07C7B02A690610098908100287C8000263A
+S315200568B0908100A87C8000A6706380327C841B783A
+S315200568C07C8001244C00012C7C6802A6546304AE0E
+S315200568D0906100047C6902A6906100A07C8102A6D5
+S315200568E0908100AC7C9302A69081000C7C9202A636
+S315200568F09081001090010018380100C09001001CFD
+S315200569009041002090A1002C90C1003090E10034E8
+S31520056910910100389121003C91410040916100444C
+S315200569209181004891A1004C91C1005091E10054FC
+S31520056930920100589221005C9241006092610064A8
+S315200569409281006892A1006C92C1007092E1007458
+S31520056950930100789321007C934100809361008404
+S315200569609381008893A1008C93C1009093E10094B4
+S315200569704E8000208001001880410020808100285B
+S3152005698080A1002C80C1003080E1003481010038CF
+S315200569908121003C8141004081610044818100487C
+S315200569A081A1004C81C1005081E10054820100582B
+S315200569B08221005C824100608261006482810068D8
+S315200569C082A1006C82C1007082E100748301007887
+S315200569D08321007C83410080836100848381008834
+S315200569E083A1008C83C1009083E10094806100A07F
+S315200569F07C6903A6806100AC7C6103A68061009C4E
+S31520056A007C6803A6806100A87C6FF1207C6000A6C7
+S31520056A10546307FA5463045E7C6001244C00012C00
+S31520056A20806100A47C7043A6806100987C7343A690
+S31520056A30806100247C7243A68021001C7C6000A610
+S31520056A40546307327C6001244C00012C7C7042A6DD
+S31520056A507C7A03A67C7342A67C7B03A67C7242A61F
+S31520056A604C0000644E8000203D6000283D20002516
+S31520056A7039296990912B9B483D6000283D200025AA
+S31520056A8039296BD0912B9B98386000004E800020C9
+S31520056A909421FFE87C0802A693A1000C93C100105F
+S31520056AA093E100149001001C7C7D1B7883FD00007A
+S31520056AB073E000017C9E2378815D0004418200807D
+S31520056AC0396000003D200028392994887C09582EF4
+S31520056AD07C80500041860020800900042C8000001F
+S31520056AE04186003C840900087C805000396B0001F2
+S31520056AF04086FFE83D20002839299488556B1838AB
+S31520056B007D6B4A14808B00042C840000418600107E
+S31520056B103C60002738635C64480000103C60002711
+S31520056B2038635C6C7D44537838A0000038C000007B
+S31520056B3038E00000390000004BFC5B6573E000027D
+S31520056B40418200243C60002738635C98809D0008BC
+S31520056B5038A0000038C0000038E0000039000000E9
+S31520056B604BFC5B3D73E08000418200243C6000279E
+S31520056B7038635CC8809D000838A0000038C0000036
+S31520056B8038E00000390000004BFC5B1573E000047B
+S31520056B90418200243C60002738635CF4809D000C0C
+S31520056BA038A0000038C0000038E000003900000099
+S31520056BB04BFC5AED73E00008418200243C60002717
+S31520056BC038635D18809D001038A0000038C000008D
+S31520056BD038E00000390000004BFC5AC573E0001070
+S31520056BE0418200243C60002738635D38809D00186B
+S31520056BF038A0000038C0000038E000003900000049
+S31520056C004BFC5A9D73E00020418200243C600027FE
+S31520056C1038635D58809D001438A0000038C00000F8
+S31520056C2038E00000390000004BFC5A7573E000403F
+S31520056C30418200243C60002738635D74809D001CDA
+S31520056C4038A0000038C0000038E0000039000000F8
+S31520056C504BFC5A4D73E00080418200243C6000279E
+S31520056C6038635D9C809D002038A0000038C0000058
+S31520056C7038E00000390000004BFC5A252C9E000008
+S31520056C80418600343D20002883A99AF47FA3EB781A
+S31520056C904BFC52C97C651B783C60002738635DC870
+S31520056CA07FA4EB7838C0000038E0000039000000EA
+S31520056CB04BFC59ED8001001C7C0803A683A1000C22
+S31520056CC083C1001083E10014382100184E8000206E
+S31520056CD09421FFE87C0802A69381000893A1000C65
+S31520056CE093C1001093E100149001001C7CBC2B7805
+S31520056CF07CDD33783C60002738635DDC3880000016
+S31520056D0038A0000038C0000038E000003900000037
+S31520056D104BFC598D7FA3EB78388000004BFFFD7522
+S31520056D203C60002738635E007F84E37838A0000046
+S31520056D3038C0000038E00000390000004BFC5961DE
+S31520056D408001001C7C0803A68381000883A1000C12
+S31520056D5083C1001083E10014382100184E800020DD
+S31520056D607C630034206300204E8000209421FFE8B8
+S31520056D707C0802A693E100149001001C3D20002802
+S31520056D8081299AF48149007883E90074396AFFD804
+S31520056D907FE803A6806AFFD8808B000480AB0008B5
+S31520056DA080CB000C80EB0010810B0014812B001882
+S31520056DB0800B0020814B001C90010008800B0024CD
+S31520056DC09001000C4E8000217C7F1B787FE3FB78A9
+S31520056DD04BFCF9F54BFFFFF89421FFE87C0802A64A
+S31520056DE09381000893A1000C93C1001093E1001430
+S31520056DF09001001C7C7C1B787C9D2378387C013C8B
+S31520056E003880009C4BFC2F114BFC539960639000F6
+S31520056E10907C01BC3D20002539296C6C913C01C82C
+S31520056E203BBDFFC057BD003893BC0140380000006C
+S31520056E30901D00008001001C7C0803A683810008A4
+S31520056E4083A1000C83C1001083E1001438210018AA
+S31520056E504E8000203960000139200024396B00015D
+S31520056E602C8B000A7C09282E3929FFFC9404FFFC6B
+S31520056E704085FFEC4E800020908301484E800020FF
+S31520056E803960000139200024396B00018404FFFC98
+S31520056E902C8B000A7C09292E3929FFFC4085FFEC1D
+S31520056EA04E8000209421FFF07C0802A693E1000C79
+S31520056EB0900100147C9F23784BFD14E17C631B799C
+S31520056EC04182001093E301BC3860000048000008A9
+S31520056ED03860FFFF800100147C0803A683E1000CBF
+S31520056EE0382100104E8000209421FFF87C0802A648
+S31520056EF09001000C880300002C8000723863000185
+S31520056F0041860020418500102C8000614186003491
+S31520056F10480000402C800077418600184800003440
+S31520056F203900000439200000396000004800003887
+S31520056F30390000083920000139600600480000287C
+S31520056F403900000839200001396002084800001878
+S31520056F504BFBD74938000016900300003860000027
+S31520056F60480000C4880300002C80002B41860018A9
+S31520056F702C80006240860018880300012C80002B97
+S31520056F804086000C39000010392000027D205B78F0
+S31520056F9090040000894300006949002B7D2900D013
+S31520056FA055290FFE694000627C0000D054000FFE73
+S31520056FB07D2B00394182000C2C8A00004086FFA0DB
+S31520056FC0880300002C8000003863000141860040BC
+S31520056FD0894300006940002B7C0000D054000FFE39
+S31520056FE0694900627D2900D055290FFE7C0B483959
+S31520056FF04182000C2C8A00004086FF64880300002D
+S315200570002C800000386300014086000C7D03437800
+S3152005701048000014886300003063FFFF7C63191065
+S315200570207D0318388001000C7C0803A6382100084A
+S315200570304E8000209421FFA07C0802A693A100542F
+S3152005704093C1005893E1005C900100647C7F1B7816
+S31520057050A13F0010712000024182001C381F003319
+S31520057060901F0014901F000438000001901F00187F
+S3152005707048000114A87F00122C83000040840014C8
+S315200570803BA000003BC004006120080048000088A2
+S315200570903880002638A100084BFBE4E52C83000048
+S315200570A0408400143BA00001A01F00103BC0040033
+S315200570B04800006039400000614A8000A121001087
+S315200570C08161002C55290426693D2000201D0000DC
+S315200570D07FA0E914380BFFFF7D6003787C00FE70E6
+S315200570E07C8950005409056A7D6300787D3E1B78AE
+S315200570F04086001CA01F001060000400B01F001071
+S315200571008001002C901F003C48000010A01F001095
+S3152005711060000800B01F00107FC3F3784BFCA375F1
+S315200571207C631B7940820024381F0033901F00049E
+S31520057130901F0014A01F001039200001913F001850
+S31520057140600000024800003C907F0004907F0014F8
+S31520057150A01F00102C9D000093DF00186000008002
+S31520057160B01F001041860020A87F00124BFBEB596B
+S315200571702C83000041860010A01F0010600000012E
+S31520057180B01F0010800100647C0803A683A100546B
+S3152005719083C1005883E1005C382100604E800020C1
+S315200571A07C60FE707C031A787C6018504E80002027
+S315200571B07CA52B794182002C5484063E8803000049
+S315200571C07C802000386300014086000C3863FFFF71
+S315200571D04E80002034A5FFFF418200084BFFFFE0CB
+S315200571E0386000004E8000207CA52B794D8200203A
+S315200571F0880300002C8000003923000141860014F5
+S31520057200880900002C800000392900014086FFF4FA
+S31520057210880400002C800000388400019C09FFFFAB
+S31520057220392900014186002834A5FFFF4082000840
+S3152005723048000024880400002C80000038840001C2
+S3152005724098090000392900014086FFE02C850000B9
+S315200572504C86002038000000980900004E8000204A
+S315200572604800003C7C892378880900002C80000092
+S3152005727039290001418600283943FFFF7C805800C3
+S315200572804086000C7D4353784E80002088090000F7
+S315200572902C800000392900014086FFE4896300001F
+S315200572A02C8B0000386300014086FFBC3860000047
+S315200572B04E800020896300002C8B000039030001D5
+S315200572C07D0343784186004C7C8923788809000014
+S315200572D07C80580039290001418600287D481850B0
+S315200572E02C8000004086000C7D4353784E8000207C
+S315200572F0880900007C805800392900014086FFE472
+S31520057300896300002C8B0000386300014086FFBC92
+S315200573107C6818504E8000209421FFC87C0802A660
+S3152005732093A1002C93C1003093E100349001003CD9
+S315200573307C7F1B78480000E9807F0014809F001021
+S31520057340817F000480BF000C813F0008801F00005C
+S315200573501D6B003C1D290E107C005A147FC04A1453
+S31520057360480183A5813F00143809076C2C8007B195
+S315200573703883FFFF909F001C4185000C3860FFFF76
+S31520057380480000803869FFBA4801833D7C6A1B782E
+S31520057390396A0004380000077C0B03D63D2000011E
+S315200573A0612951807FE3FB783FA00028809D994085
+S315200573B07D2A49D61C0000077FDE4A147D60585079
+S315200573C0917F001848000A452C830000907F0020F5
+S315200573D0418600103BDEF1F07FE3FB784800004153
+S315200573E03861000880BD99403880000248000CB1FC
+S315200573F0386100084BFBBD911C63003C7C7E1A144A
+S315200574008001003C7C0803A683A1002C83C10030A3
+S3152005741083E10034382100384E8000209421FFB0C6
+S315200574207C0802A69381004093A1004493C100489D
+S3152005743093E1004C900100547C7E1B78386100183E
+S315200574407FC4F37838A000244BFBC1B93B81001CCF
+S315200574507F83E3783881001838A0003C480000E98E
+S315200574603BA100207FA3EB787F84E37838A0003CFE
+S31520057470480000D5386100247FA4EB7838A0001891
+S31520057480480000C53861002C3881002838A0000C3A
+S31520057490480000B58061002C8081002880A1002449
+S315200574A0480182657C7F1B79408000148001002C71
+S315200574B03BFF016D3000FFFF9001002C3BA0000033
+S315200574C08061002C3B9D00017F84E37838A0000075
+S315200574D0480182357C9F1800408500142C9D000AA2
+S315200574E04185000C7F9DE3784BFFFFD893A10028AB
+S315200574F08061002C7FA4EB7838A000004801820922
+S315200575007C63F8509061002438000000900100301B
+S31520057510900100347FC3F3783881001838A0002401
+S315200575204BFBC0E1800100547C0803A68381004003
+S3152005753083A1004483C1004883E1004C38210050D3
+S315200575404E800020812400007D292BD68003000053
+S315200575507C004A1490030000812400007C092BD668
+S315200575607C0029D67D2048507C092BD67C0029D63F
+S315200575707D604851912400004C8000208003000046
+S315200575803000FFFF90030000800400007C002A14D1
+S31520057590900400004E8000209421FFF87C0802A666
+S315200575A09001000C3D20002880E9994048000015EF
+S315200575B08001000C7C0803A6382100084E80002097
+S315200575C09421FFB07C0802A693210034934100380C
+S315200575D09361003C9381004093A1004493C10048E8
+S315200575E093E1004C900100547C9C23787CD9337818
+S315200575F07CFA3B787CBE2B787C7F1B783800000094
+S31520057600900100283BA000003B610008895E000030
+S315200576107FA0E2783160FFFF7C0B011069490025C8
+S315200576207D2900D055290FFE7D2B00394182003C4E
+S315200576302C8A000041860034995F00008D5E00018A
+S315200576403BBD00017FA0E2783160FFFF7C0B011076
+S31520057650694900257D2900D055290FFE7D2B003946
+S315200576603BFF00014082FFCC7C9DE000418600C0A7
+S31520057670881E00002C8000003BDE0001418600B0FC
+S31520057680386100087F24CB787F45D37838C1002818
+S315200576907FC7F378480000D180A100282C850000FB
+S315200576A0418400507C1D2A147C9C00404085002482
+S315200576B07FE3FB78388100084BFBBF498001002812
+S315200576C03BDE00017FBD02147FFF02144BFFFF4006
+S315200576D07FE3FB78388100087FBDE0507FA5EB78F6
+S315200576E04BFBBF217FFFEA147F9DE37848000040CE
+S315200576F07CA32B784BFFFAAD380000007C1B19AE16
+S315200577007FE3FB787C9DE0507F65DB787F26CB7811
+S315200577107F47D3784BFFFEAD906100287FFF1A1473
+S315200577207FBD1A143BDE00014BFFFEE43800000046
+S31520057730981F00007FA3EB78800100547C0803A6E0
+S3152005774083210034834100388361003C83810040D6
+S3152005775083A1004483C1004883E1004C38210050B1
+S315200577604E8000209421FFF07C0802A693C10008D4
+S3152005777093E1000C90010014880700007C7F1B789C
+S315200577803000FFDB288000547C8B23787CAA2B785D
+S315200577907CDE3378418503C03D200025392976BC1A
+S315200577A05400103A7C09002E3D200025392976BC47
+S315200577B07C004A147C0903A64E8004200000037C25
+S315200577C00000039800000398000003980000039822
+S315200577D00000039800000398000003980000039812
+S315200577E00000039800000398000003980000039802
+S315200577F000000398000003980000039800000398F2
+S3152005780000000398000003980000039800000398E1
+S3152005781000000398000003980000039800000398D1
+S3152005782000000398000003980000039800000164F7
+S3152005783000000190000003980000039800000398BB
+S315200578400000039800000398000001E0000001F005
+S3152005785000000398000003980000039800000248E2
+S315200578600000039800000398000003980000039881
+S3152005787000000398000002640000039800000274CB
+S3152005788000000398000002A0000002F0000003405B
+S315200578900000036000000398000003980000039889
+S315200578A00000039800000398000003980000015487
+S315200578B000000180000001AC000001D00000039803
+S315200578C00000039800000398000003980000039821
+S315200578D0000002100000039800000398000002280B
+S315200578E00000039800000398000002580000039842
+S315200578F000000398000003980000039800000398F1
+S315200579000000039800000284000002CC0000031446
+S315200579107FE3FB78808B001838A000014800001013
+S315200579207FE3FB78808B001838A000007D465378CE
+S315200579307FC7F378480003C1480002247FE3FB781C
+S31520057940808B001038A00001480000107FE3FB78EB
+S31520057950808B001038A000007D4653787FC7F378CA
+S315200579604800041D480001F87FE3FB7838800000B5
+S315200579707D655B787D4653787FC7F378480002415D
+S31520057980801E00007C0000D0480001D0808B000CB2
+S3152005799038000002901E0000480000E0808B000899
+S315200579A038000002901E0000480000D0812B0008F8
+S315200579B03880000C7C8923D638000002901E0000F2
+S315200579C07FE3FB781C84000C48000124808B001C77
+S315200579D038000003901E00007FE3FB7838A00003E3
+S315200579E048000018808B001038000002901E000009
+S315200579F07FE3FB7838A0000238840001480002B9ED
+S31520057A004800015C808B000438000002901E0000AF
+S31520057A10480000687FE3FB783880000348000108AA
+S31520057A20808B000038000002901E00004800004CA4
+S31520057A30808B001880AB001C386000004800002CA5
+S31520057A40808B001838000001901E00007FE3FB782C
+S31520057A5038A000014800026148000104808B001807
+S31520057A6080AB001C386000014800010D380000027B
+S31520057A70901E00007C641B787FE3FB7838A000020B
+S31520057A8048000235480000D87FE3FB78388000019E
+S31520057A907D655B787D4653787FC7F378480001215D
+S31520057AA0801E00007C0000D0480000B07FE3FB78F4
+S31520057AB0388000027D655B787D4653787FC7F378ED
+S31520057AC0480000FD801E00007C0000D04800008C88
+S31520057AD0812B0014388000647C8923D63800000267
+S31520057AE0901E00007FE3FB781C84006438A000020A
+S31520057AF07C844850480001C148000064808B0014EE
+S31520057B0038000004901E00007FE3FB7838A00004AF
+S31520057B103884076C480001A1480000447FE3FB78C0
+S31520057B20388000047D655B787D4653787FC7F3787A
+S31520057B304800008D480000287FE3FB783C8000271D
+S31520057B4038845EA838A000014BFBBAB9380000017D
+S31520057B504800000838000000901E0000800100142F
+S31520057B607C0803A683C1000883E1000C3821001098
+S31520057B704E8000207C83205038840007380000077B
+S31520057B807C0403D63D2092491C00000761292493D5
+S31520057B907C8020507CA4285038A5000C7C6548960E
+S31520057BA07C8549D67C651A147C6316707CA5FE7087
+S31520057BB07C6518503863FFFF4E8000209421FFC84E
+S31520057BC07C0802A693A1002C93C1003093E10034D2
+S31520057BD09001003C7C7D1B787CAB2B7828840004A7
+S31520057BE07CC533787CFE3B783BE0000041850094DC
+S31520057BF03D20002539297B145480103A7C09002E16
+S31520057C003D20002539297B147C004A147C0903A6CE
+S31520057C104E800420000000140000001C00000024F3
+S31520057C200000002C0000005C83E500984800005405
+S31520057C3083E5009C4800004C83E500A048000044ED
+S31520057C40800B00082C80000D392500A4396500A875
+S31520057C507C00002654002FFE7C0000D07D290038AC
+S31520057C607D6000787D29037883E9000048000014AB
+S31520057C703861000838800000480004253BE10008EB
+S31520057C807FE3FB784BFBBAD9907E00007FA3EB7888
+S31520057C907FE4FB784BFBBA958001003C7C0803A664
+S31520057CA083A1002C83C1003083E1003438210038BC
+S31520057CB04E8000207C632A1434A5FFFF7C8020F8A3
+S31520057CC07C00FE707C8400384D8000203960000AD7
+S31520057CD07D245BD61C09000A34A5FFFF7C002050B5
+S31520057CE0300000309C03FFFF7D244B784080FFE465
+S31520057CF04E8000209421FFE07C0802A69361000CAB
+S31520057D009381001093A1001493C1001893E1001CE0
+S31520057D10900100247C7B1B7868A5000130A5FFFF18
+S31520057D207CA52910380400077C8428387C0528780A
+S31520057D307C842B785484103A7F84302E7CFD3B78C6
+S31520057D407F83E3784BFBBA19907D00007F63DB7850
+S31520057D507F84E3784BFBB9D5800100247C0803A6F4
+S31520057D608361000C8381001083A1001483C1001850
+S31520057D7083E1001C382100204E8000209421FFE05D
+S31520057D807C0802A69361000C9381001093A1001430
+S31520057D9093C1001893E1001C900100247C7B1B787D
+S31520057DA068A5000130A5FFFF7CA529103804000C25
+S31520057DB07C8428387C0528787C842B785484103A52
+S31520057DC07C843214838400387CFD3B787F83E3787A
+S31520057DD04BFBB98D907D00007F63DB787F84E3784C
+S31520057DE04BFBB949800100247C0803A68361000C5E
+S31520057DF08381001083A1001483C1001883E1001C30
+S31520057E00382100204E8000209421FFB07C0802A650
+S31520057E109301003093210034934100389361003C4F
+S31520057E209381004093A1004493C1004893E1004CFF
+S31520057E30900100547C7F1B787C9D23783D2000276C
+S31520057E403B895EAC938100283C60002738635EB091
+S31520057E504BFBC5D97C641B794182006038610008DB
+S31520057E604BFBB8C9386100083F800027389C5EBCAB
+S31520057E703BA100287FA5EB784BFBB9CD38600000E8
+S31520057E80389C5EBC7FA5EB784BFBB9BD38600000FE
+S31520057E90389C5EBC7FA5EB784BFBB9AD7C7E1B7809
+S31520057EA038600000389C5EBC7FA5EB784BFBB99902
+S31520057EB07C7B1B78480000347F84E37883DD00B81B
+S31520057EC0837D00BC7FC3F3784BFBB8212C83000050
+S31520057ED0418600DC7F63DB787F84E3784BFBB80D36
+S31520057EE02C830000418600C8201E00007D20F11449
+S31520057EF0217B00007C0BD9147D2B0379408200B0B1
+S31520057F003BA1002C7FA3EB787FC4F37838A0000231
+S31520057F104BFBB8C94BFBB2713B23FFFF7FA3EB7825
+S31520057F207F64DB7838A000024BFBB8B14BFBB25916
+S31520057F30801F00107F00C8003B03FFFF419800709B
+S31520057F407C80C00041850068419A00084086011C56
+S31520057F507FA3EB78389E000238A000024BFBB87D44
+S31520057F604BFBB2257C7C1B787FA3EB78389B0002E4
+S31520057F7038A000024BFBB8654BFBB20D813F0010C4
+S31520057F807C89C8007C7A1B7840860010801F000CEF
+S31520057F907C80E000418400187C89C000408600185A
+S31520057FA0801F000C7C80D0004085000C38600000C6
+S31520057FB0480000BC813F00107C89C800408600101F
+S31520057FC0801F000C7C80E000418600187C89C0005B
+S31520057FD040860098801F000C7C80D0004086008C4F
+S31520057FE03BA1002C7FA3EB78389E000438A0000225
+S31520057FF04BFBB7E94BFBB1917C7E1B787FA3EB78D6
+S31520058000389B000438A000024BFBB7D14BFBB17956
+S31520058010801F00107C80C800392000004086001C87
+S31520058020801F000C7C80E00040860010801F000821
+S315200580307C80F0004184002C801F00107C80C000CD
+S315200580404086001C801F000C7C80D00040860010D6
+S31520058050801F00087C801800418500083920000112
+S315200580607D234B78480000083860000180010054C4
+S315200580707C0803A683010030832100348341003820
+S315200580808361003C8381004083A1004483C100486D
+S3152005809083E1004C382100504E8000209421FFE0DA
+S315200580A07C0802A69361000C9381001093A100140D
+S315200580B093C1001893E1001C900100247C7D1B7858
+S315200580C07C9C23787CBF2B783C60002738635EB088
+S315200580D04BFBC3597C7E1B79418200B47FC3F37861
+S315200580E03C80002738845EAC4BFBB6012C83000010
+S315200580F04186009C7FC3F3783F600027389B5EBC92
+S315200581004BFFF1612C9C00007C7F1B784086001478
+S315200581107FA3EB787FC4F3784BFBB611480000604C
+S315200581203BDF00017FC3F378389B5EBC4BFFF135FF
+S315200581302C9C00017C7F1B78408600147FA3EB785E
+S315200581407FC4F3784BFBB5E5480000343BDF0001DF
+S315200581507FC3F378389B5EBC4BFFF1092C9C00024C
+S315200581607C7F1B78408600607FA3EB787FC4F378FD
+S315200581704BFBB5B92C9F00004186004C7D3EF8503F
+S31520058180380000007C1D49AE4800003C5780103A57
+S315200581907FE0FA14807F00AC3C80002738845EACF3
+S315200581A04BFBB5492C83000041860014809F00AC0B
+S315200581B07FA3EB784BFBB5754800000C3800000013
+S315200581C0981D0000800100247C0803A68361000C0D
+S315200581D08381001083A1001483C1001883E1001C4C
+S315200581E0382100204E8000209421FFE87C0802A635
+S315200581F093A1000C93C1001093E100149001001C7B
+S315200582003FA00028801D966C2C80000040860058D3
+S315200582104BFB057D2C8300004085004C3800000172
+S31520058220901D966C3FA00028387DDA0C3880001406
+S315200582304BFC1AE54BFB0559907DDA0C3C003B9A25
+S315200582406000CA007C001BD6386000003D2000284F
+S3152005825081299B043BBDDA0C913D0008901D000445
+S31520058260480000083860FFFF8001001C7C0803A633
+S3152005827083A1000C83C1001083E100143821001866
+S315200582804E8000209421FFF07C0802A693C10008A9
+S3152005829093E1000C900100147C7E1B787C9F23784B
+S315200582A04BFFFF492C9E0000418600184BFBC3ED72
+S315200582B038000016900300003860FFFF48000020B4
+S315200582C02C9F00004186001493DF00003D200028E6
+S315200582D08009DA10901F0004386000008001001420
+S315200582E07C0803A683C1000883E1000C3821001011
+S315200582F04E8000209421FFE87C0802A693A1000C5D
+S3152005830093C1001093E100149001001C7C7D1B781D
+S315200583107C9F23784BFFFED52C9D000040860024AC
+S315200583202C9F00004186004C801F00002C800000F9
+S3152005833040860010809F00042C840000408600188B
+S315200583404BFBC35938000016900300003860FFFF29
+S31520058350480000243C003B9A6000CA007C0023D6D6
+S315200583603D600028392BDA0C90890004900BDA0C35
+S31520058370386000008001001C7C0803A683A1000C40
+S3152005838083C1001083E10014382100184E80002097
+S315200583909421FFE87C0802A693A1000C93C1001046
+S315200583A093E100149001001C7C7D1B787C9F23782B
+S315200583B04BFFFE392C9D0000418600104BFBC2DD8C
+S315200583C038000016480000142C9F0000408600182F
+S315200583D04BFBC2C93800000E900300003860FFFF32
+S315200583E0480000C03D2000283D400028390ADA0C07
+S315200583F081299B0480080008816ADA0C7C00485094
+S315200584007C005B96901F000080080008816ADA0CC4
+S315200584107D2048507C095B967C0059D681680004EE
+S315200584207D2048507D2959D6801F0000913F0004A4
+S315200584308128000C3D603B9A7C004A14901F000061
+S31520058440813F000480080010616BC9FF7D29021455
+S315200584507C895800913F00044085001C3D60C46519
+S31520058460616B3600813F0000801F00043929000119
+S31520058470480000202C890000408400243D603B9A5A
+S31520058480616BCA00813F0000801F00043929FFFF68
+S31520058490913F00007C005A14901F000438600000AC
+S315200584A08001001C7C0803A683A1000C83C1001053
+S315200584B083E10014382100184E8000209421FFE81E
+S315200584C07C0802A693A1000C93C1001093E1001429
+S315200584D09001001C7C7D1B787C9F23784BFFFD0D2E
+S315200584E02C9D0000408600202C9F00004186001808
+S315200584F03D203B9A801F00046129C9FF7C804840A6
+S31520058500408500184BFBC1953800001690030000E6
+S315200585103860FFFF4800002C3D6000283D200028DC
+S3152005852080099B04396BDA0C900B0008813F00000B
+S31520058530815F000438600000912B000C914B0010E0
+S315200585408001001C7C0803A683A1000C83C10010B2
+S3152005855083E10014382100184E8000209421FFE085
+S315200585607C0802A693A1001493C1001893E1001C70
+S31520058570900100247C7D1B784BFFFC712C9D00000F
+S315200585804086006038600000388100084BFFFE05F4
+S315200585903D200028806996704BFC40253D2000280B
+S315200585A0806996744BFC40193D2000283969DA0C00
+S315200585B03C6000278081000880A1000C80C9DA0C68
+S315200585C080EB0004810B0008812B000C814B0010E9
+S315200585D038635F684BFC3FE93860000048000014AB
+S315200585E04BFBC0B938000016900300003860FFFF2A
+S315200585F0800100247C0803A683A1001483C10018EA
+S3152005860083E1001C382100204E8000209421FFF8AC
+S315200586107C0802A69001000C3D6000283D2000261E
+S3152005862039298EC0912B9BE83D6000283D200026E8
+S3152005863039298F4C912B9BA43D6000283D2000268F
+S3152005864039298B8C912B9C443D6000283D200026A2
+S3152005865039298DE4912B9B6C3C60002638638E600E
+S315200586604BFBFA492C830000418600283C600027F5
+S3152005867038635FA43880000038A0000038C00000A9
+S3152005868038E0000039000000392000004BFBE6E900
+S315200586908001000C7C0803A6382100084E800020A6
+S315200586A09421FF587C0802A67D80002692C1008071
+S315200586B092E10084930100889321008C93410090D8
+S315200586C0936100949381009893A1009C93C100A087
+S315200586D093E100A4900100AC9181007C7C7A1B7803
+S315200586E03B6000003BE000007C9E23797CBC2B7818
+S315200586F07CD933787CF73B784182004C3921003888
+S31520058700801E0000817E0004815E0008811E000C0B
+S315200587109001003891690004914900089109000CDF
+S31520058720801E0010817E0014815E0018811E001CAB
+S315200587309009001091690014914900189109001CAF
+S315200587404800001038610038388000204BFC15C9D8
+S315200587502C9C00004186004C39210058801C0000C5
+S31520058760817C0004815C0008811C000C9001005866
+S3152005877091690004914900089109000C801C00109C
+S31520058780817C0014815C0018811C001C9009001056
+S3152005879091690014914900189109001C48000010A0
+S315200587A038610058388000204BFC156D2C97000049
+S315200587B0418600344BFAFFD93C00431B6000DE831B
+S315200587C081770004813700007D6B19D67D2919D65E
+S315200587D07C0B00967D6BFE707C0096707C0B0050A2
+S315200587E07FE9021493C10024938100289321002C4C
+S315200587F03B010038930100303AC1005892C100343C
+S315200588004BFCFB2190610018388000013FA0002811
+S31520058810807D9AF438A00000386300904BFCB301A4
+S31520058820801D9AF42D1E0000300000909001001046
+S31520058830381A001F541DE8FA418A00107FC3F378C1
+S315200588407FA4EB784BFC14D12D9C0000418E0010A3
+S315200588507F83E3787FA4EB784BFC14BD2C9900002D
+S31520058860418600107F23CB787FA4EB784BFC14A997
+S315200588703BA00000418A003093A100207F03C378E6
+S315200588807F44D37838A0001C38C1000838E00001A1
+S315200588904800029D7C69FE707D201A787C00485030
+S315200588A07C1DFE702C9DFFFF41860038418E0034CD
+S315200588B038000001900100207EC3B3787F44D37829
+S315200588C038A0001C38C1000838E0000148000261C4
+S315200588D03063FFFF7C6319107C60E8387C1D1B38EC
+S315200588E02C9D00004186006C4BFBBDBD7C7D1B7815
+S315200588F03800000090010020386100387F44D37885
+S3152005890038A0001D38C1000838E0000048000221C3
+S315200589103800000190010020386100587F44D37843
+S3152005892038A0001D38C1000838E0000048000201C3
+S315200589303C00000C600000027C9D0000408600E89B
+S315200589403C600039606300014BFBBDC5480000D87B
+S315200589507EE0FE707C07BA787CE7005054E90FFE6E
+S31520058960217F00007C0BF9147D2B00394182000CF8
+S315200589703BE00000480000107CE9FE707D20F838B9
+S315200589807C1F4B387FE4FB783F2000283BE100081D
+S3152005899081399AF42D1E000093E900AC8061001000
+S315200589A03BA000004BFCBF91418A003093A10020DB
+S315200589B0386100387F44D37838A0001D7FE6FB78E0
+S315200589C038E00000480001697C69FE707D201A7830
+S315200589D07C0048507C1DFE702C9C0000418600348E
+S315200589E03800000190010020386100587F44D37873
+S315200589F038A0001D7FE6FB7838E0000048000131ED
+S31520058A003063FFFF7C6319107C60E8387C1D1B38BA
+S31520058A102C9DFFFF81399AF438000000900900AC9F
+S31520058A204086000C3860FFFF480000C4418A005C80
+S31520058A30394000007C8AD000408400505540E8FA31
+S31520058A407D3E002E2C8900004086000C394A001FE9
+S31520058A504800002C554006FE7D2006307009000191
+S31520058A60393B00017C00002654001FFE7C0000D007
+S31520058A707F6B00387D2300787D7B1B78394A000182
+S31520058A807C8AD0004184FFB82C9C00004186005C7E
+S31520058A90394000007C8AD000408400505540E8FAD1
+S31520058AA07D3C002E2C8900004086000C394A001F8B
+S31520058AB04800002C554006FE7D2006307009000131
+S31520058AC0393B00017C00002654001FFE7C0000D0A7
+S31520058AD07F6B00387D2300787D7B1B78394A000122
+S31520058AE07C8AD0004184FFB87F63DB78800100ACA7
+S31520058AF08181007C7C0803A682C1008082E10084F6
+S31520058B00830100888321008C834100908361009432
+S31520058B108381009883A1009C83C100A083E100A4E2
+S31520058B207D830120382100A84E8000209421FFD87E
+S31520058B307C0802A67D8000269341001093610014CF
+S31520058B409381001893A1001C93C1002093E1002472
+S31520058B509001002C9181000C7C7B1B787C9C2378D2
+S31520058B603BA000007C9DE0007CBA2B787CDE337828
+S31520058B703BE00000408400602D07000057E0E8FA3E
+S31520058B807D3B002E2C8900004086000C3BFF001FF4
+S31520058B904800003857E006FE7D20063070090001A2
+S31520058BA04182002893FE00147FE3FB787F44D37827
+S31520058BB07FC5F3784BFBC9C92C8300004186000C81
+S31520058BC03BA0FFFF408A00103BFF00017C9FE00091
+S31520058BD04184FFAC7FA3EB788001002C8181000CBA
+S31520058BE07C0803A683410010836100148381001845
+S31520058BF083A1001C83C1002083E100247D820120FE
+S31520058C00382100284E8000209421FFF87C0802A6F2
+S31520058C109001000C810300182C8800004186001065
+S31520058C202C880001418600304800004C38000001A0
+S31520058C30816300148143001C5568E8FA556B06FECE
+S31520058C407D28502E7C0058307D2903787D28512E8D
+S31520058C50480000248123001481630020552AE8FA60
+S31520058C60552906FE7C0A582E7D0948307C004B780E
+S31520058C707C0A592E806300084BFCBB618001000CE1
+S31520058C807C0803A6382100084E8000209421FFE8A1
+S31520058C907C0802A693A1000C93C1001093E1001451
+S31520058CA09001001C7C7E1B787C9D23783BFE004C26
+S31520058CB07FE3FB784BFC13ED2C8300004186008077
+S31520058CC04BFBC3F12C8300004186002C3C6000261B
+S31520058CD038638B8C7FC4F3787FA5EB7838C000008A
+S31520058CE038E0000039000000392000004BFBBB812D
+S31520058CF04800004C7FC3F3783880FFFF4BFCBC3916
+S31520058D007FE3FB784BFC14797C7F1B794182002815
+S31520058D10801F00187C80E8004086000C7FE3FB78E6
+S31520058D204BFFFEE97FE3FB784BFC14F17C7F1B7937
+S31520058D304082FFE07FC3F3784BFCBAA18001001C7B
+S31520058D407C0803A683A1000C83C1001083E10014CF
+S31520058D50382100184E8000209421FFD87C0802A6D1
+S31520058D609381001893A1001C93C1002093E1002450
+S31520058D709001002C7C7E1B787C9C23783880FFFF15
+S31520058D804BFCBBB5387E004C4BFC13192C830000DD
+S31520058D90408600103BFE001C3BA000014800001445
+S31520058DA0386000304BFC86ED7C7F1B783BA00000AD
+S31520058DB02C9F0000418600347FE3FB787F84E3788F
+S31520058DC038A000304BFBA83D93BF000C387E004CE5
+S31520058DD07FE4FB784BFC12217FC3F3784BFCB9FD6E
+S31520058DE038600000480000107FC3F3784BFCB9EDCE
+S31520058DF03860FFFF8001002C7C0803A683810018BC
+S31520058E0083A1001C83C1002083E10024382100288A
+S31520058E104E8000209421FFE87C0802A693A1000C31
+S31520058E2093C1001093E100149001001C7C7E1B78F1
+S31520058E307C9D23783880FFFF4BFCBAFD387E004C9D
+S31520058E404BFC133D7C7F1B7941820074801F0010EB
+S31520058E50813D00107C80480040860054801F000814
+S31520058E60813D00087C80480040860044801F00180C
+S31520058E70813D00187C80480040860034387E004CB1
+S31520058E807FE4FB784BFC1225801F000C2C8000000C
+S31520058E904086000C7FE3FB784BFC86257FC3F37861
+S31520058EA04BFCB93938600000480000207FE3FB7889
+S31520058EB04BFC13697C7F1B794082FF947FC3F37833
+S31520058EC04BFCB9193860FFFF8001001C7C0803A6FE
+S31520058ED083A1000C83C1001083E1001438210018FA
+S31520058EE04E8000209421FFE87C0802A693A1000C61
+S31520058EF093C1001093E100149001001C7C7D1B7822
+S31520058F00387D004C4BFC10DD3D2000288089967865
+S31520058F107FA3EB784BFCC68D8001001C7C0803A63D
+S31520058F2083A1000C83C1001083E1001438210018A9
+S31520058F304E8000209421FFF87C0802A69001000CA3
+S31520058F403863004C4BFC115D8001000C7C0803A6A0
+S31520058F50382100084E800020806300184E800020AE
+S31520058F609421FFF07C0802A693E1000C90010014E1
+S31520058F7083E300AC2C9F0000418600343880010035
+S31520058F8038A0001D7FE6FB78807F002838E00000AA
+S31520058F904BFFFB9D3880010038A0001D7FE6FB783E
+S31520058FA08066002C38E000004BFFFB85800100140D
+S31520058FB07C0803A683E1000C382100104E80002092
+S31520058FC09421FFF07C0802A693C1000893E1000CCA
+S31520058FD0900100147C7E1B787C9F2378387E008840
+S31520058FE04BFFFD797FE3FB784BFFFF712C83000058
+S31520058FF04086001C807E00104BFC29092C8300002E
+S315200590004085000C7FE3FB784BFFFC017FE3FB7873
+S315200590104BFFFF492C8300014086001C807E0050B3
+S315200590204BFC28BD2C8300004085000C7FE3FB7894
+S315200590304BFFFBD9800100147C0803A683C10008D9
+S3152005904083E1000C382100104E8000209421FFF882
+S315200590507C0802A69001000C386300884BFFFDB9F9
+S315200590608001000C7C0803A6382100084E800020CC
+S315200590702C840001396000004085001C3884FFFEE1
+S315200590802C840001A0030000386300027D6B0214C6
+S315200590904185FFEC2C8400014086001088030000E2
+S315200590A05400402E7D6B02147D6986705560043E02
+S315200590B07D6902147D6086707D6B02147D6358F888
+S315200590C05463043E4E8000203D6000283D20002646
+S315200590D03929959C912B9B683D6000283D200026CB
+S315200590E0392994E4912B9C584E8000203D60002818
+S315200590F03D2000263929927C912B9C243D60002811
+S315200591003D200026392992F0912B9B783D60002839
+S315200591103D2000263929937C912B9BDC3D60002838
+S315200591203D20002639299424912B9BB83D600028A3
+S315200591303D200026392990BC912B9BA83D6000280F
+S315200591403D200026392991D0912B9C083D60002889
+S315200591503D20002639299154912B9BE03D6000281E
+S315200591603D20002639299B88912B9B403D60002870
+S315200591703D20002639299A18912B9B5C3D600028B5
+S315200591803D20002639299818912B9BBC3D60002847
+S315200591903D200026392996F8912B9BF83D6000281D
+S315200591A03D2000233929D95C912B9B4C4E800020EC
+S315200591B03D20002890699CD84E8000209421FFE808
+S315200591C07C0802A693A1000C93C1001093E100141C
+S315200591D09001001C547E043E4BFC6A893D200028E4
+S315200591E081299CD87C7D1B787D234B788003000CB8
+S315200591F07C0803A63880000038A000064E80002192
+S315200592007C7F1B794082000C4BFD380948000024E1
+S31520059210B3DF00003D20002880099BCC7C0803A6EF
+S315200592204E8000215460843EB41F0002B07F0002A8
+S315200592307FA3EB784BFC6A418001001C7C0803A6C2
+S3152005924083A1000C83C1001083E100143821001886
+S315200592504E8000209421FFF07C0802A693C10008C9
+S3152005926093E1000C90010014547E043E3D20002815
+S3152005927080699CD88003000C7C0803A638800000F2
+S3152005928038A000064E8000217C7F1B794082000C89
+S315200592904BFD378148000024B3DF00003D20002820
+S315200592A080099BCC7C0803A64E8000215460843E11
+S315200592B0B41F0002B07F0002800100147C0803A6BB
+S315200592C083C1000883E1000C382100104E80002060
+S315200592D09421FFE87C0802A693A1000C93C10010F7
+S315200592E093E100149001001C7C9F2378547D043E55
+S315200592F04BFC69713D20002881299CD87C7E1B78F2
+S315200593007D234B788003000C7C0803A6388000005B
+S3152005931038A0000A4E8000217C631B794082000C10
+S315200593204BFD36F148000034B3A300003D2000284C
+S3152005933080099BCC7C0803A63BA300024E80002116
+S315200593405460843EB01D0000B07D000257E0843E87
+S31520059350B41D0004B3FD00027FC3F3784BFC6919E5
+S315200593608001001C7C0803A683A1000C83C1001084
+S3152005937083E10014382100184E8000209421FFF047
+S315200593807C0802A693C1000893E1000C9001001405
+S31520059390547E043E4BFC68CD3D20002881299CD86F
+S315200593A07C7F1B787D234B788003000C7C0803A6E5
+S315200593B03880000038A000024E8000217C631B798E
+S315200593C04082000C4BFD364D48000008B3C3000013
+S315200593D07FE3FB784BFC68A1800100147C0803A67B
+S315200593E083C1000883E1000C382100104E8000203F
+S315200593F09421FFE87C0802A693A1000C93C10010D6
+S3152005940093E100149001001C7C9F2378547D043E33
+S315200594104BFC68513D20002881299CD87C7E1B78F1
+S315200594207D234B788003000C7C0803A6388000003A
+S3152005943038A000064E8000217C631B794082000CF3
+S315200594404BFD35D148000014B3A3000057E0843EF8
+S31520059450B4030002B3E300027FC3F3784BFC68191B
+S315200594608001001C7C0803A683A1000C83C1001083
+S3152005947083E10014382100184E8000209421FFE84E
+S315200594807C0802A69381000893A1000C93C10010C5
+S3152005949093E100149001001C7C9F23787CBE2B78D9
+S315200594A0547C043E4BFC67BD3D20002881299CD871
+S315200594B07C7D1B787D234B788003000C7C0803A6D6
+S315200594C03880000038A0000A4E8000217C631B7975
+S315200594D04082000C4BFD353D48000024B383000037
+S315200594E057E0843E7C691B78B4090002B3E9000283
+S315200594F057C0843EB4090004B3C900027FA3EB78A4
+S315200595004BFC67758001001C7C0803A68381000837
+S3152005951083A1000C83C1001083E1001438210018B3
+S315200595204E8000209421FFE07C0802A69361000C62
+S315200595309381001093A1001493C1001893E1001C98
+S31520059540900100247C9F23787CBE2B787CDD3378A4
+S31520059550547C043E4BFC670D3D20002881299CD870
+S315200595607C7B1B787D234B788003000C7C0803A627
+S315200595703880000038A0000E4E8000217C631B79C0
+S315200595804082000C4BFD348D48000030B38300002B
+S3152005959057E0843E7C691B78B4090002B3E90002D2
+S315200595A057C0843EB4090004B3C9000257A0843EBF
+S315200595B0B4090004B3A900027F63DB784BFC66B9C6
+S315200595C0800100247C0803A68361000C838100109A
+S315200595D083A1001483C1001883E1001C38210020D3
+S315200595E04E8000209421FFD07C0802A692C1000857
+S315200595F092E1000C93010010932100149341001869
+S315200596009361001C9381002093A1002493C1002817
+S3152005961093E1002C900100347C9B23787CBA2B782F
+S315200596207CD933787CF83B787D1743787D364B7823
+S31520059630547D043E4BFC662D7C7C1B787FA3EB7802
+S315200596407F64DB787F45D3787F26CB787F07C37801
+S315200596507EE8BB787EC9B378480000457F83E378EA
+S315200596604BFC6615800100347C0803A682C10008E0
+S3152005967082E1000C83010010832100148341001828
+S315200596808361001C8381002083A1002483C10028D7
+S3152005969083E1002C382100304E8000209421FFD80C
+S315200596A07C0802A69321000C9341001093610014B7
+S315200596B09381001893A1001C93C1002093E10024F7
+S315200596C09001002C7C9923787CBA2B787CDB337827
+S315200596D07CFC3B787D3E4B783D20002881299CD813
+S315200596E0547F043E7D234B788003000C7D1D4378F3
+S315200596F07C0803A65725103A3880000038A50006B1
+S315200597004E8000217C631B794082000C4BFD33057E
+S31520059710480000BCB3E300003D20002880099BCC0F
+S315200597207C0803A63BE300024E8000215460843E5C
+S31520059730B01F0000B07F00023BFF00043819FFFF71
+S3152005974028800004418500883D2000263929966C0D
+S315200597505400103A7C09002E3D2000263929966CA6
+S315200597607C004A147C0903A64E8004200000005480
+S31520059770000000440000003400000024000000140E
+S3152005978057C0843EB01F0000B3DF00023BFF000434
+S3152005979057A0843EB01F0000B3BF00023BFF000464
+S315200597A05780843EB01F0000B39F00023BFF000494
+S315200597B05760843EB01F0000B37F00023BFF0004C4
+S315200597C05740843EB01F0000B35F00028001002C85
+S315200597D07C0803A68321000C8341001083610014B5
+S315200597E08381001883A1001C83C1002083E1002406
+S315200597F0382100284E8000209421FFD87C0802A617
+S31520059800930100089321000C9341001093610014E5
+S315200598109381001893A1001C93C1002093E1002495
+S315200598209001002C7C9E23787CBD2B787CDC3378BC
+S315200598307CFB3B787D184378547A043E7F03C378B6
+S315200598404BFB9F1D38630007547F00384BFC64157E
+S315200598503D20002881299CD88009000C38800000ED
+S315200598607C0803A638BF00167C791B787D234B78A8
+S315200598704E8000217C691B794082000C4BFD319579
+S3152005988048000060B349000057C0843E7D234B78CD
+S31520059890B4030002B3C3000257A0843EB4030004F8
+S315200598A0B3A300025780843EB4030004B3830002A9
+S315200598B05760843EB4030004B363000257E0843E38
+S315200598C0B4030004B3E30002386300042C9F0000B0
+S315200598D0418600107F04C3787FE5FB784BFB9EFD10
+S315200598E07F23CB784BFC63918001002C7C0803A653
+S315200598F0830100088321000C834100108361001435
+S315200599008381001883A1001C83C1002083E10024E4
+S31520059910382100284E8000209421FFE07C0802A6ED
+S315200599209361000C9381001093A1001493C1001834
+S3152005993093E1001C900100247C9D237838639C408C
+S315200599405463043E39600000616B9C3F7C8358401C
+S315200599507CBE2B787CDB33787C7F1B784185000C9D
+S315200599603860FFFF480000BC4BFC62F93D2000280B
+S3152005997081299CD88009000C388000007C0803A624
+S3152005998038BE000E7C7C1B787D234B784E800021CB
+S315200599907C631B79408200184BFD30797F83E37801
+S315200599A04BFC62D53860FFFF48000078B3E3000022
+S315200599B03D20002880099BCC7C0803A63BE30002BA
+S315200599C04E8000215460843EB01F0000B07F000207
+S315200599D057A0843EB41F0004B3BF000257C0843E7F
+S315200599E0B41F0004B3DF00023BFF0004301EFFFF57
+S315200599F07D20F110317BFFFF7C0BD9107D2B0039A3
+S31520059A00418200147FE3FB787F64DB787FC5F3789A
+S31520059A104BFB9BF17F83E3784BFC625D386000004E
+S31520059A20800100247C0803A68361000C8381001035
+S31520059A3083A1001483C1001883E1001C382100206E
+S31520059A404E8000209421F8087C0802A6932107DC85
+S31520059A50934107E0936107E4938107E893A107EC17
+S31520059A6093C107F093E107F4900107FC38610008DC
+S31520059A70388001F44BFC26657C791B783861000813
+S31520059A807F24CB784BFCEECD3BC000007C9EC800E6
+S31520059A904084005C3BE10008807F00004BFCE89198
+S31520059AA02C8300004086003883BF00007FA3EB7817
+S31520059AB0839D003C837D0040835D00504BFC249DA7
+S31520059AC07C681B78386000037FA7EB787F84E37872
+S31520059AD07F65DB787F46D3784BFFFD213BDE000192
+S31520059AE07C9EC8003BFF00044184FFB0800107FC33
+S31520059AF07C0803A6832107DC834107E0836107E40D
+S31520059B00838107E883A107EC83C107F083E107F486
+S31520059B10382107F84E8000209421FFE87C0802A60C
+S31520059B209381000893A1000C93C1001093E10014C2
+S31520059B309001001C3D20002880099BCC7C0803A6AB
+S31520059B407C9D23787CBE2B78547C043E4E80002158
+S31520059B50381CFFCC288000047C7F1B784185010CAE
+S31520059B603D20002639299A845400103A7C09002E76
+S31520059B703D20002639299A847C004A147C0903A6AF
+S31520059B804E8004200000008C000000500000008C50
+S31520059B9000000050000000143D20002880699CD854
+S31520059BA08003000C7C0803A63880000038A0000638
+S31520059BB04E8000217C631B794182007CB3830000A3
+S31520059BC057E0843E7C691B78B4090002B3E900029C
+S31520059BD0480000983D20002880699CD88003000C09
+S31520059BE07C0803A63880000038A0000A4E80002194
+S31520059BF07C631B7941820040B383000057E0843E95
+S31520059C007C691B78B4090002B3E9000248000050BC
+S31520059C103D20002880699CD88003000C7C0803A67B
+S31520059C203880000038A0000E4E8000217C631B7909
+S31520059C304082000C4BFD2DDD48000030B38300002B
+S31520059C4057E0843E7C691B78B4090002B3E900021B
+S31520059C5057A0843EB4090004B3A9000257C0843E28
+S31520059C60B4090004B3C900028001001C7C0803A6C0
+S31520059C708381000883A1000C83C1001083E10014B1
+S31520059C80382100184E8000209421FFF07C0802A67A
+S31520059C9093C1000893E1000C900100143D20002893
+S31520059CA081299CD8547E043E7D234B788003000C65
+S31520059CB07C0803A67C9F23783880000038A0000600
+S31520059CC04E8000217C631B794082000C4BFD2D457F
+S31520059CD048000014B3C3000057E0843EB4030002D5
+S31520059CE0B3E30002800100147C0803A683C10008A3
+S31520059CF083E1000C382100104E8000209421FFF0CE
+S31520059D007C0802A693E1000C900100143FE0002890
+S31520059D10801F967C2C800000408600583D600028D8
+S31520059D203D20002639299DB4912B9C503D60002865
+S31520059D303D2000263929BAC4912B9B7C3D600028FD
+S31520059D403D2000263929A130912B9C283C600026F0
+S31520059D5038639D184BFBE3552C83FFFF4086000C8B
+S31520059D603860FFFF4800001038000001901F967CE0
+S31520059D7038600000800100147C0803A683E1000CEE
+S31520059D80382100104E8000209421FFF07C0802A681
+S31520059D9093E1000C900100143D200028800996804F
+S31520059DA02C8000007C7F1B78408600582C9F000065
+S31520059DB0408500141C7F00244BFC76D97C631B79D7
+S31520059DC04082000C3860FFFF4800003C3BFFFFFF48
+S31520059DD03D6000287FE0FB783BFFFFFF812B9CE061
+S31520059DE02C80000091230000906B9CE038630024B2
+S31520059DF04185FFE43D200028380000019009968022
+S31520059E0038600000800100147C0803A683E1000C5D
+S31520059E10382100104E8000209421FFF87C0802A6E8
+S31520059E209001000C80C3008C2C86000041860078AA
+S31520059E303D2000283800000190099B20388000002D
+S31520059E403CA00028394001807CC733788167018092
+S31520059E507C0652147C8B0000418600387C080378EA
+S31520059E607D695B788009000C2C800002816B0000DF
+S31520059E7090890004908900004086001080059CE0AA
+S31520059E809009000091259CE07C8B40004086FFD4FC
+S31520059E90394A00082C8A027838E700084085FFB041
+S31520059EA04BFD42918001000C7C0803A63821000851
+S31520059EB04E8000204E8000203800000090030000D0
+S31520059EC0386000004E8000203800FFFF9003000018
+S31520059ED0386000004E8000209421FFF87C0802A6F9
+S31520059EE09001000C3884FFFF2884001E7C6B1B78AC
+S31520059EF040850014386000164BFBA8153860FFFF17
+S31520059F004800001C3860000038000001812B000045
+S31520059F107C0020307D290378912B00008001000CE0
+S31520059F207C0803A6382100084E8000209421FFF8DE
+S31520059F307C0802A69001000C3884FFFF2884001EA9
+S31520059F407C6B1B7840850014386000164BFBA7C137
+S31520059F503860FFFF4800001C386000003800FFFE0F
+S31520059F60812B00005C00203E7D290038912B0000C6
+S31520059F708001000C7C0803A6382100084E800020AD
+S31520059F809421FFF87C0802A69001000C3884FFFF77
+S31520059F902884001E40850014386000164BFBA771E7
+S31520059FA03860FFFF4800001C380000018063000070
+S31520059FB07C0020307C6300383003FFFF7C6019105D
+S31520059FC08001000C7C0803A6382100084E8000205D
+S31520059FD09421FFC87C0802A693A1002C93C10030CA
+S31520059FE093E100349001003C7C7D1B78908100082C
+S31520059FF038000000900100103861000C4BFFFEBDB3
+S3152005A0007FA3EB783881000838A10018480000396D
+S3152005A010800100182063FFFF3063FFFF7C63191062
+S3152005A0207C0018787C6303788001003C7C0803A6B5
+S3152005A03083A1002C83C1003083E100343821003808
+S3152005A0404E8000209421FFE87C0802A69381000813
+S3152005A05093A1000C93C1001093E100149001001CFC
+S3152005A0607C7E1B78381EFFFF2880001E7C9D23786A
+S3152005A0707CBC2B7840850014386000164BFBA691D6
+S3152005A0803860FFFF4800018C480010D57C7F1B797E
+S3152005A0904082000C3860FFFF480001783D200028EB
+S3152005A0A080098B542C800000418600943D60100069
+S3152005A0B03D20002880099C00616B00077C005838EC
+S3152005A0C07C8058004086002C3D20002880099CDC99
+S3152005A0D02C8000004186001C386027287C0803A6B2
+S3152005A0E03880000280DD00007FC5F3784E80002190
+S3152005A0F03D6010003D20002880099B60616B0100B2
+S3152005A1007C0058387C8058004086003438602728E3
+S3152005A1103880000238A000007FC6F3783D6000280D
+S3152005A120800B9B50390000007C0803A639200000CF
+S3152005A13080FD0000394000004E8000212C9C000047
+S3152005A1401D1E000C7D5F42144186001C7C1F402E7F
+S3152005A150812A0004816A0008901C0000913C0004B5
+S3152005A160917C00082C9D0000418600A4801D0000DE
+S3152005A170813D0004817D00087C1F412E912A000423
+S3152005A180916A00087C1F402E2C8000013D20002866
+S3152005A1903800000190099B2040860070387F029484
+S3152005A1A07FC4F3784BFFFD89387F028C7FC4F37813
+S3152005A1B04BFFFD7D57C018387D3F0214814901802C
+S3152005A1C0300001807C7F02147C8A18004186003C81
+S3152005A1D038E000003D0000287D4B5378800B000CAD
+S3152005A1E02C800002814A000090EB000490EB0000D1
+S3152005A1F04086001080089CE0900B000091689CE04A
+S3152005A2007C8A18004086FFD44BFD3F293860000024
+S3152005A2108001001C7C0803A68381000883A1000C0D
+S3152005A22083C1001083E10014382100184E800020D8
+S3152005A2309421FFE87C0802A693A1000C93C1001087
+S3152005A24093E100149001001C7C7F1B787C9E23786B
+S3152005A2507CBD2B7848000F097C631B794082000C56
+S3152005A2603860FFFF480000A82C9D00003D200028EF
+S3152005A2703800000190099B204186000C800302903E
+S3152005A280901D00002C9E0000418600702C9F000228
+S3152005A29041860034418500102C9F0001418600141B
+S3152005A2A0480000442C9F00034186003048000038B2
+S3152005A2B080030290813E00007C004B78900302903B
+S3152005A2C048000044801E0000812302907D200078EE
+S3152005A2D09003029048000024801E000090030290FF
+S3152005A2E0480000184BFD3E4D386000164BFBA42157
+S3152005A2F03860FFFF4800001848000F312C83000006
+S3152005A300408600084BFD3E2D386000008001001C6C
+S3152005A3107C0803A683A1000C83C1001083E10014E9
+S3152005A320382100184E8000209421FFF07C0802A6D3
+S3152005A33093E1000C900100147C7F1B7848000E21C8
+S3152005A3407C631B79418200148003029438600000E7
+S3152005A350901F0000480000083860FFFF80010014A8
+S3152005A3607C0803A683E1000C382100104E800020CE
+S3152005A3709421FFC87C0802A693C1003093E10034DE
+S3152005A3809001003C7C7F1B7848000DD57C7E1B798F
+S3152005A390418201F03D20002880098B542C80000045
+S3152005A3A0418600943D6010003D20002880099C00D0
+S3152005A3B0616B00077C0058387C8058004086002C4D
+S3152005A3C03D20002880099CDC2C8000004186001C4D
+S3152005A3D0386027297C0803A63880000180BF000045
+S3152005A3E038C000004E8000213D6010003D20002829
+S3152005A3F080099B60616B01007C0058387C80580081
+S3152005A40040860034386027293880000238A00000AD
+S3152005A41038E000003D600028800B9B503900000085
+S3152005A4207C0803A63920000080DF000039400000A3
+S3152005A4304E8000213D60002838000001813E0290B3
+S3152005A440900B9B2091210028801F00007FC3F37865
+S3152005A4509003029048000DD52C83000140860020EC
+S3152005A460386000033881002838A000004BFFFDC561
+S3152005A470386000044BFBA29948000108380000000B
+S3152005A480900100089001000C900100109001001425
+S3152005A4903861001838A0000038C0000038E00000F8
+S3152005A4A039000000392000003D600028808B842873
+S3152005A4B0394000004BFC02D53D20002880098B54ED
+S3152005A4C02C800000418600843D6010003D20002838
+S3152005A4D080099C00616B00037C0058387C805800FD
+S3152005A4E04086001C3D20002880099B787C0803A611
+S3152005A4F0386002737FE4FB784E8000213D601000B2
+S3152005A5003D20002880099B60616B00107C0058382F
+S3152005A5107C805800408600343860027338800001FC
+S3152005A52038A000007FE6FB783D600028800B9B5015
+S3152005A53038E000007C0803A6390000003920000019
+S3152005A540394000004E800021386100183880FFFF11
+S3152005A5504BFD1C912C830000408600244BFD3BD5EA
+S3152005A560386000033881002838A000004BFFFCC561
+S3152005A570386000044BFBA199480000084BFD3BB50C
+S3152005A5803860FFFF8001003C7C0803A683C10030AC
+S3152005A59083E10034382100384E8000209421FFD8ED
+S3152005A5A07C0802A69001002C3D20002880098B54AA
+S3152005A5B02C8000004186009C3D6010003D2000282F
+S3152005A5C080099C00616B00077C0058387C80580008
+S3152005A5D0408600303D20002880099CDC2C80000028
+S3152005A5E0418600203860272A388000017C0803A68A
+S3152005A5F03D20002880A99AF438C000004E8000210D
+S3152005A6003D6010003D20002880099B60616B01009C
+S3152005A6107C0058387C805800408600383860272AC8
+S3152005A6203880000238A000003D60002880CB9AF4CF
+S3152005A6303D600028800B9B5038E000007C0803A66F
+S3152005A6403900000039200000394000004E800021E5
+S3152005A65038000000900100089001000C90010010C0
+S3152005A660900100143861001838A0000038C0000099
+S3152005A67038E0000039000000392000003D60002840
+S3152005A680808B8428394000004BFC01013D200028A1
+S3152005A6903800000190099B203D20002880098B5415
+S3152005A6A02C8000004186008C3D6010003D2000284E
+S3152005A6B080099C00616B00037C0058387C8058001B
+S3152005A6C0408600203D20002880899AF43D200028D8
+S3152005A6D080099B787C0803A6386002724E8000218B
+S3152005A6E03D6010003D20002880099B60616B0010AD
+S3152005A6F07C0058387C8058004086003838600272C5
+S3152005A7003880000138A000003D60002880CB9AF4EF
+S3152005A7103D600028800B9B5038E000007C0803A68E
+S3152005A7203900000039200000394000004E80002104
+S3152005A730386100183880FFFF4BFD1AA92C830000CD
+S3152005A740408600144BFD39ED386000044BFB9FC154
+S3152005A750480000084BFD39DD3860FFFF8001002CDD
+S3152005A7607C0803A6382100284E8000209421FF90DE
+S3152005A7707C0802A6934100589361005C9381006092
+S3152005A78093A1006493C1006893E1006C9001007465
+S3152005A7907C7B1B787C9F23787CBD2B78480009C160
+S3152005A7A07C7E1B794082000C3860FFFF48000250F2
+S3152005A7B02C9D0000418600484BFADFD53D203B9A6B
+S3152005A7C0801D00046129CA007C8048404085001808
+S3152005A7D04BFB9EC938000016900300003860FFFF2A
+S3152005A7E04800021C7D291BD67D204BD6801D0000E6
+S3152005A7F07C0019D67F404A14480000083B40FFFFDD
+S3152005A8003D2000283800000190099B207FC3F3785E
+S3152005A8107F64DB783BA100387FA5EB7848000AC921
+S3152005A8207C7C1B79408100304BFD39092C9F00002B
+S3152005A8304186001C80010038813D0004817D000889
+S3152005A840901F0000913F0004917F00087F83E378E5
+S3152005A850480001AC3B8100287F83E37838A00000BF
+S3152005A86038C0000038E0000039000000392000001B
+S3152005A870394000003D600028801B0000808B84281D
+S3152005A8809001001838000000900100089001000C86
+S3152005A89090010010900100144BFBFEF138010018C1
+S3152005A8A0901E02883D20002880098B542C800000AC
+S3152005A8B0418600C43D6010003D20002880099C008B
+S3152005A8C0616B00037C0058387C8058004086003C2C
+S3152005A8D03881004880010028813C0004817C0008DD
+S3152005A8E0815C000C90010048912400043D2000283D
+S3152005A8F080099B787C0803A6386002789164000855
+S3152005A9009144000C4E8000213D6010003D2000281A
+S3152005A91080099B60616B00107C0058387C8058004C
+S3152005A92040860054386002783880000138A000003F
+S3152005A93038C1004838E000003900000080010028B1
+S3152005A940817C000483BC0008839C000C9001004890
+S3152005A950916600043D600028800B9B50392000003D
+S3152005A9607C0803A63940000093A600089386000CB0
+S3152005A9704E800021386100287F44D3784BFD186529
+S3152005A9807C7D1B79418200104BFD37A93860FFFF7E
+S3152005A9904800006C4BFD379D7C631B7993BE02886E
+S3152005A9A041820034686000017C09FE707D230278AF
+S3152005A9B07C6348507C63FE707C6018F85400077AE7
+S3152005A9C07063000B7C6303784BFB9D453860FFFF66
+S3152005A9D04800002C2C9F0000418600203921001CB0
+S3152005A9E08001001C8169000481290008901F000050
+S3152005A9F0917F0004913F00088061001C800100744E
+S3152005AA007C0803A6834100588361005C838100602E
+S3152005AA1083A1006483C1006883E1006C382100703E
+S3152005AA204E8000209421FFF87C0802A69001000C98
+S3152005AA3038A000004BFFFD398001000C7C0803A6D9
+S3152005AA40382100084E8000209421FFD07C0802A6DC
+S3152005AA5093E1002C900100347C8923797CBF2B78E7
+S3152005AA604182002880090000900100088009000421
+S3152005AA70388100089001000C8009000838A10018CB
+S3152005AA80900100104800000C3880000038A10018FD
+S3152005AA904BFFF5B52C9F00004186001C8001001850
+S3152005AAA0901F00008001001C901F000480010020DB
+S3152005AAB0901F0008800100347C0803A683E1002C42
+S3152005AAC0382100304E8000209421FFE87C0802A61C
+S3152005AAD093A1000C93C1001093E100149001001C72
+S3152005AAE07C7D1B7838600003389D000838A000005F
+S3152005AAF04BFFF741387D0018480142CD8001001CE7
+S3152005AB007C0803A683A1000C83C1001083E10014F1
+S3152005AB10382100184E8000209421FFF07C0802A6DB
+S3152005AB209001001490610008386000033881000800
+S3152005AB3038A1000C4BFFF6FD8061000C8001001446
+S3152005AB407C0803A6382100104E8000209421FFF0B2
+S3152005AB507C0802A690010014906100083860000167
+S3152005AB603881000838A1000C4BFFF6C98061000C1E
+S3152005AB70800100147C0803A6382100104E80002091
+S3152005AB809421FFF87C0802A69001000C7C641B78B2
+S3152005AB903D20002880699AF4480000158001000CA4
+S3152005ABA07C0803A6382100084E8000209421FFF05A
+S3152005ABB07C0802A693C1000893E1000C90010014BD
+S3152005ABC07C9E2378381EFFFF2880001E7C7F1B78FD
+S3152005ABD0418501903D20002880098B542C8000005A
+S3152005ABE0418600943D6010003D20002880099C0088
+S3152005ABF0616B00077C0058387C8058004086002C05
+S3152005AC003D20002880099CDC2C8000004186001C04
+S3152005AC103860272B7C0803A6388000027FC5F37889
+S3152005AC207FE6FB784E8000213D6010003D20002800
+S3152005AC3080099B60616B01007C0058387C80580038
+S3152005AC40408600343860272B3880000238A0000063
+S3152005AC507FC6F3783D600028800B9B507FE7FB7805
+S3152005AC607C0803A639000000392000003940000081
+S3152005AC704E8000213D20002880099B202C80000045
+S3152005AC80408600243D200028800983042C8000006E
+S3152005AC90408500803D20002880099AF47C80F800B4
+S3152005ACA0408600702C9F0000418600B83D20002874
+S3152005ACB0817F0030812987C87C8B48004186002CFE
+S3152005ACC02C8B000041860010800900247C8B000017
+S3152005ACD0418600184BFB99C53C00003D60000001EC
+S3152005ACE0900300004800007C3C6000263863AAAC2F
+S3152005ACF07FE4FB787FC5F37838C0000038E0000094
+S3152005AD0039000000392000004BFB9B654800007484
+S3152005AD102C9F00003D2000283800000190099B202B
+S3152005AD204186003C3D200028817F0030812987C847
+S3152005AD307C8B48004186003C2C8B00004186001008
+S3152005AD40800900247C8B0000418600284BFB994D09
+S3152005AD503C00003D60000001900300004BFD33D50B
+S3152005AD60386000164BFB99A93860FFFF480000188C
+S3152005AD707FE3FB787FC4F37848000C194BFD33B588
+S3152005AD8038600000800100147C0803A683C10008F2
+S3152005AD9083E1000C382100104E8000209421FFC04D
+S3152005ADA07C0802A693A1003493C1003893E1003CA8
+S3152005ADB0900100447C9E2378381EFFFF2880001EC4
+S3152005ADC07C7F1B7883A500004085000C3860001623
+S3152005ADD0480001F83D20002880098B542C8000006E
+S3152005ADE0418600943D6010003D20002880099C0086
+S3152005ADF0616B00077C0058387C8058004086002C03
+S3152005AE003D20002880099CDC2C8000004186001C02
+S3152005AE103860272B7C0803A6388000027FC5F37887
+S3152005AE207FE6FB784E8000213D6010003D200028FE
+S3152005AE3080099B60616B01007C0058387C80580036
+S3152005AE40408600343860272B3880000238A0000061
+S3152005AE507FC6F3783D600028800B9B507FE7FB7803
+S3152005AE607C0803A63900000039200000394000007F
+S3152005AE704E8000213D20002880099B202C80000043
+S3152005AE80408600243D200028800983042C8000006C
+S3152005AE90408500983D20002880099AF47C80F8009A
+S3152005AEA0408600882C9F00004186003C3D200028D6
+S3152005AEB0817F0030812987C87C8B480041860030F8
+S3152005AEC02C8B000041860010800900247C8B000015
+S3152005AED04186001C4BFB97C53C00003D60000001E8
+S3152005AEE09003000038600016480000E03D20002849
+S3152005AEF080099CE02C800000418600CC3C60002621
+S3152005AF003863AC9C7FE4FB787FC5F3787FA6EB7826
+S3152005AF1038E0000039000000392000004BFB99512C
+S3152005AF2038600000480000AC2C9F00003D2000281A
+S3152005AF303800000190099B204186003C3D200028D1
+S3152005AF40817F0030812987C87C8B48004186003463
+S3152005AF502C8B000041860010800900247C8B000084
+S3152005AF60418600204BFB97353C00003D60000001E3
+S3152005AF70900300004BFD31BD386000164800004C9B
+S3152005AF803D20002880099CE02C8000004186003465
+S3152005AF90386100084800092993C1001038000002CD
+S3152005AFA09001001493A100187FE3FB7838810008EF
+S3152005AFB04800045D4BFD317D3860000048000014D3
+S3152005AFC04BFD31713860000B4BFB97453860FFFF11
+S3152005AFD0800100447C0803A683A1003483C1003880
+S3152005AFE083E1003C382100404E8000209421FFE873
+S3152005AFF07C0802A69381000893A1000C93C100103A
+S3152005B00093E100149001001C7C7D1B783D400028AF
+S3152005B0103D20002883FD000C80098B5480CA9AF4B4
+S3152005B0201D7F000C2C8000008126008C7F895A14F8
+S3152005B0307FC9582E418600943D6010003D2000288A
+S3152005B04080099C00616B00077C0058387C8058007D
+S3152005B050408600283D20002880099CDC2C800000A5
+S3152005B060418600187C0803A63860272D3880000203
+S3152005B0707FE5FB784E8000213D6010003D200028AD
+S3152005B08080099B60616B01007C0058387C805800E4
+S3152005B090408600383860272D3880000238A0000009
+S3152005B0A07FE6FB783D6000283D400028800B9B50BD
+S3152005B0B0390000007C0803A63920000080EA9AF4AE
+S3152005B0C0394000004E800021801C000870090010C0
+S3152005B0D0418200107FE3FB78388000004BFFEEF5B8
+S3152005B0E0301EFFFF7D20F1106BC000013160FFFF90
+S3152005B0F07C0B01107D2B00394182003C2C9EFFFFE5
+S3152005B10041860034801C0008700900024182001423
+S3152005B1107FC803A67FE3FB78389D000C4800001006
+S3152005B1207FC803A67FE3FB78809D00147FA5EB7877
+S3152005B1304E8000217FA3EB784BFFF9918001001CFF
+S3152005B1407C0803A68381000883A1000C83C1001017
+S3152005B15083E10014382100184E8000209421FFF049
+S3152005B1607C0802A693C1000893E1000C9001001407
+S3152005B1703D200028800983042C8000003D200028DE
+S3152005B18083C99AF44085001C4BFB95113C0000436E
+S3152005B190600000019003000038600000480000743C
+S3152005B1A0807E008C2C830000408600687FC3F37860
+S3152005B1B03880029C4BFCD2557C7F1B79408200143B
+S3152005B1C03860000C4BFB9549386000004800004468
+S3152005B1D093FE008C7FE3FB783880029C4BFBEB3992
+S3152005B1E039400000396001807FE9FB787C1F5A14BD
+S3152005B1F090090184394A00012C8A001F9009018093
+S3152005B200396B0008392900084085FFE47FE3FB7880
+S3152005B210800100147C0803A683C1000883E1000C85
+S3152005B220382100104E8000209421FF307C0802A68C
+S3152005B23093E100CC900100D47C7F1B78801F02907F
+S3152005B240388100C038A100147C0000F8900100C0A8
+S3152005B250480000957C631B79408100743800000006
+S3152005B260900100089001000C39600001801F0290B2
+S3152005B2701D23000C900100107D3F4A143803FFFF63
+S3152005B2807D6B003080090004813F02907C005B784D
+S3152005B2907D290378913F02904BFD2E993BE10020B5
+S3152005B2A07FE3FB7848013AE92C83000040860018A5
+S3152005B2B07FE3FB783880000148013B9D3861000813
+S3152005B2C04BFFFD2D3860000148000008386000005E
+S3152005B2D0800100D47C0803A683E100CC382100D068
+S3152005B2E04E8000209421FFE87C0802A693A1000C3D
+S3152005B2F093C1001093E100149001001C7C7E1B78FD
+S3152005B30081240000801E02947D3F00397CBD2B7868
+S3152005B3104082000C38600000480000D87C1F00D011
+S3152005B3207FFF00387FE3FB784BFFBA39801E028CFE
+S3152005B3307FE80039418200247C00F878901E028C33
+S3152005B340907D000038000001901D000438000000A3
+S3152005B350901D000848000074546918387D3E4A142B
+S3152005B36081490180812A0004800A00009009000095
+S3152005B370812A0000800A000490090004910A000031
+S3152005B380910A0004392A0008800A00088169000408
+S3152005B39081290008901D0000917D0004913D00083B
+S3152005B3A0800A000C2C800002800A0018910A0018D9
+S3152005B3B0900A0014408600143D20002880099CE050
+S3152005B3C0900A000091499CE0546018387D3E02148D
+S3152005B3D030000180812901807C1E02147C890000B1
+S3152005B3E040860010801E02947C00F878901E0294F8
+S3152005B3F08001001C7C0803A683A1000C83C10010D4
+S3152005B40083E10014382100184E8000209421FF0086
+S3152005B4107C0802A692E100DC930100E0932100E47A
+S3152005B420934100E8936100EC938100F093A100F429
+S3152005B43093C100F893E100FC900101047C7A1B7806
+S3152005B440837A008C2C9B00007C9F237883BF000881
+S3152005B45041860308807B02882C830000418600EC08
+S3152005B4607FA4EB784BFFEB1D2C830001408600DC87
+S3152005B470811B0288800800102C800000418600CCA4
+S3152005B480393F0008801F00088169000481490008AA
+S3152005B49039280004900800049169000491490008A0
+S3152005B4A03D20002880098B542C800000418600848D
+S3152005B4B03D6010003D20002880099C00616B00033B
+S3152005B4C07C0058387C8058004086001C3D2000288A
+S3152005B4D080099B787C0803A6386002747F44D3785C
+S3152005B4E04E8000213D6010003D20002880099B608C
+S3152005B4F0616B00107C0058387C80580040860034EB
+S3152005B500386002743880000138A000007F46D37861
+S3152005B5103D20002880099B5038E000007C0803A6C2
+S3152005B5203900000039200000394000004E800021F6
+S3152005B530807B0288386300104BFD086D38000000BB
+S3152005B540901B0288480002141F1D000C7C1BC02E70
+S3152005B5502C800000418602042C800001418601FCD6
+S3152005B560393DFFFF3AE00001801B02907EF9483005
+S3152005B5707C1EC839418200A8813F000C2C89000118
+S3152005B58040860020801B028C813B02947C00CB7870
+S3152005B590901B028C7D29CB78913B0294480001BCF7
+S3152005B5A0801F00002C80000041860014801F001893
+S3152005B5B030000001901F0018480001A02C890002C8
+S3152005B5C057A01838300001807FDB021440860024FE
+S3152005B5D07FE4FB783D20002880699CE038A0002484
+S3152005B5E0800300007C7F1B7890099CE04BFB80152F
+S3152005B5F0801E0004901F0004813F000493DF000095
+S3152005B60093E9000093FE0004801B02947C00CB780E
+S3152005B610901B0294937F0020480001403D2000287E
+S3152005B62080099AF47C80D000418600A83B9A013C8B
+S3152005B6307F83E3784801382992E100183BA3FF4828
+S3152005B64057BD003893A1001C93DB028893DD0000CB
+S3152005B6507F43D37848000375907D0004387D001814
+S3152005B6607F84E37838A0009C801B02907D3BC21422
+S3152005B670901D000880090004813B02907C00CB7850
+S3152005B6807D290378913B0290393F0008801F0008E9
+S3152005B6908169000481490008393D000C901D000C84
+S3152005B6A091690004914900084BFB7F597F83E37814
+S3152005B6B07FA4EB783CA0002638A5AEEC801F001CA5
+S3152005B6C038C10018900400B44801379D4800008C05
+S3152005B6D093C1002093C10024801B02907D3BC21498
+S3152005B6E09001002880090004813B02907C00CB78DC
+S3152005B6F07D290378913B0290393F0008801F000879
+S3152005B70081690004814900083921002C9001002C0B
+S3152005B7109169000491490008801F001C900100D4FE
+S3152005B7204BFD2A113BE100387FE3FB784801366162
+S3152005B7302C8300003BC10020408600187FE3FB7860
+S3152005B74038800001480137117FC3F3784BFFF8A1F4
+S3152005B7503D20002892E99B20800101047C0803A650
+S3152005B76082E100DC830100E0832100E4834100E8D7
+S3152005B770836100EC838100F083A100F483C100F886
+S3152005B78083E100FC382101004E8000209421FFF83A
+S3152005B7907C0802A69001000C3D20002880099B20EC
+S3152005B7A02C8000007C6A1B787C85237840860024C3
+S3152005B7B03D200028800983042C8000004085007CDC
+S3152005B7C03D20002880099AF47C8050004086006C34
+S3152005B7D02C8A0000418600B43D200028816A00306D
+S3152005B7E0812987C87C8B48004186002C2C8B00003C
+S3152005B7F041860010800900247C8B000041860018B4
+S3152005B8004BFB8E993C00003D600000019003000033
+S3152005B810480000783C6000263863B68C7D44537812
+S3152005B82038C0000038E0000039000000392000004B
+S3152005B8304BFB903D480000742C8A00003D200028D3
+S3152005B8403800000190099B204186003C3D200028B8
+S3152005B850816A0030812987C87C8B48004186003C57
+S3152005B8602C8B000041860010800900247C8B00006B
+S3152005B870418600284BFB8E253C00003D60000001DB
+S3152005B880900300004BFD28AD386000164BFB8E81DA
+S3152005B8903860FFFF480000187D4353787CA42B7839
+S3152005B8A04BFFFB6D4BFD288D386000008001000C99
+S3152005B8B07C0803A6382100084E80002038000000A9
+S3152005B8C09003000090030004900300149003001CCD
+S3152005B8D04E8000209421FFF87C0802A69001000CDA
+S3152005B8E03D200028800983042C8000004085001C0B
+S3152005B8F04BFB8DA93C00004360000001900300002E
+S3152005B9003860FFFF4800007C390000008163000095
+S3152005B910910300142C8B00003D200028394000019E
+S3152005B92091499B2041860054800300047C8B0000AE
+S3152005B9304086002880030008816300203000FFFF31
+S3152005B9407D400030814B028C812B02947D4003384B
+S3152005B9507D290038912B0294812300008003000461
+S3152005B960900900048123000480030000900900004B
+S3152005B97091030000910300044BFD27B938600000B0
+S3152005B9808001000C7C0803A6382100084E80002083
+S3152005B9909421FFD07C0802A69001003490810010E6
+S3152005B9A038000001900100143800000090010018AD
+S3152005B9B0388100084BFFFA59800100347C0803A61C
+S3152005B9C0382100304E8000209421FFE87C0802A60D
+S3152005B9D09381000893A1000C93C1001093E10014F4
+S3152005B9E09001001C7C7F1B78801F003C7009000697
+S3152005B9F03BA0FFFF418200FC388000014BFFB47D50
+S3152005BA00813F003C712000044182004C552007B837
+S3152005BA10901F003C3FA000283BBDCC98813D000CE3
+S3152005BA20800900187C0803A67FA3EB783B9F0010AE
+S3152005BA307F84E3784E800021813D000C8009002813
+S3152005BA407C0803A67F83E378388000014E80002199
+S3152005BA507C7D1B78801F003C7009000241820068AE
+S3152005BA6039200000913F004C801F003C807F005C00
+S3152005BA70540007FA901F003C8123000C800900180A
+S3152005BA807C0803A67FE4FB784E8000212C83FFFFEC
+S3152005BA904186001C2C8300014086002C7FE3FB7821
+S3152005BAA0388000004BFFB3D54800001C7FE3FB78A8
+S3152005BAB03880FFFF4BFFB3C53C00005860000006E9
+S3152005BAC0901F0084801F003C2C80000040860024A7
+S3152005BAD03C6000283863CCB88123000C800900100F
+S3152005BAE07C0803A680BF00407FE4FB784E800021BA
+S3152005BAF07FA3EB788001001C7C0803A683810008C0
+S3152005BB0083A1000C83C1001083E10014382100189D
+S3152005BB104E8000209421FFB07C0802A693010030B8
+S3152005BB2093210034934100389361003C9381004072
+S3152005BB3093A1004493C1004893E1004C9001005421
+S3152005BB407C7B1B787C9A23787CB92B783861000816
+S3152005BB503F800028813C9AF43BA00000830900FC25
+S3152005BB6093A900FC4BFFFD599361001093A1001486
+S3152005BB709341001893210024807C9AF4388100088B
+S3152005BB804BFFFC0D386100084BFFFD4D813C9AF4B7
+S3152005BB90930900FC800100547C0803A6830100302C
+S3152005BBA083210034834100388361003C8381004032
+S3152005BBB083A1004483C1004883E1004C382100500D
+S3152005BBC04E8000209421FFF87C0802A69001000CE7
+S3152005BBD03D200028800998302C800000392998308E
+S3152005BBE048000024800900007C801800408600104B
+S3152005BBF0806900044BFFFF214800001C84090008CA
+S3152005BC002C8000004086FFE0800900042C8000007F
+S3152005BC104086FFD48001000C7C0803A63821000845
+S3152005BC204E8000203C00E000600000013D200028F9
+S3152005BC30900996883D6000283D2000263929BE9822
+S3152005BC40912B8EFC3D6000283D2000263929BF68B2
+S3152005BC50912B8F004E8000209421FFE07C0802A6C0
+S3152005BC609361000C9381001093A1001493C10018D1
+S3152005BC7093E1001C900100247C7F1B787C9E237811
+S3152005BC803D2000288009DA20839F0014300000011A
+S3152005BC909009DA20809F0008A36400022C9B0007E8
+S3152005BCA03BA9DA2041850018801D000430000001DB
+S3152005BCB0901D00044BFE73F5480002BC881F001139
+S3152005BCC070090001389E000840820010801F000C74
+S3152005BCD07C802000408400247FE3FB784BFF3911CC
+S3152005BCE07C7F1B7940820014801D000430000001F2
+S3152005BCF0901D0004480002807FE3FB787F64DB7893
+S3152005BD00813F0008801F000C7D29F214913F000811
+S3152005BD107C1E0050901F000C83BF0008480005C1FB
+S3152005BD202C830000418600243D2000283929DA206D
+S3152005BD30800900087FE3FB783000000190090008A0
+S3152005BD404BFE736948000230801F0008813F000CB6
+S3152005BD507C1E0050901F00087D29F214913F000C8F
+S3152005BD60881D00002C800011809F00084186001048
+S3152005BD702C80001241860128480001F43D20002828
+S3152005BD803969DA20800B000C3D2000283929D97C19
+S3152005BD907C9C480030000001900B000C418601D0A8
+S3152005BDA03D20002880840010800996887C84000028
+S3152005BDB04186001C800B00107FE3FB7830000001D4
+S3152005BDC0900B00104BFE72E5480001AC3D20002883
+S3152005BDD039699C70800B0004390000007C8800407E
+S3152005BDE04185018C3D8000283FA000283D20002864
+S3152005BDF083C99C807D7B5B78812C9C705503103A8A
+S3152005BE007C091A142C800000418600807C69182E36
+S3152005BE102C830000418600743CE051EB60E7851FCA
+S3152005BE203CA0002838C000018003000C7C80E0007F
+S3152005BE304086004C800300142C800000408600407C
+S3152005BE40816300087C8B200041860034801DD70045
+S3152005BE50813E003C7C004A147C005A147D2038160D
+S3152005BE607D4039D65529E13E1D29003290C5968457
+S3152005BE707C09005030000001900300148063000007
+S3152005BE802C8300004086FFA4801B0004390800018E
+S3152005BE907C8800404085FF64480000D43D2000286A
+S3152005BEA03949DA20800A00143D2000283929D97C11
+S3152005BEB07C9C480030000001900A0014418600B0A1
+S3152005BEC0817D00043D20E000556000067C80480009
+S3152005BED040860010800400107C8B00004186001CE3
+S3152005BEE0800A00187FE3FB7830000001900A0018CD
+S3152005BEF04BFE71B9480000808004000C7409FF00D0
+S3152005BF004082003C3D20002881299C802C89000008
+S3152005BF104186002C8009000C7C80E00041860010BB
+S3152005BF20812900342C8900004086FFEC2C890000ED
+S3152005BF304186000C800900289004000C807D0004B1
+S3152005BF407F84E3784BFDF5857C631B794182002050
+S3152005BF5038000000900300143D2000283929DA20F6
+S3152005BF608009001C300000019009001C7FE3FB7846
+S3152005BF704BFE94D9800100247C0803A68361000C1E
+S3152005BF808381001083A1001483C1001883E1001C5E
+S3152005BF90382100204E8000209421FFF07C0802A63F
+S3152005BFA093C1000893E1000C900100147C7F1B7857
+S3152005BFB04BFF6A2D3D200028817F00088009968841
+S3152005BFC07C8B00007C7E1B7841860018801F000C28
+S3152005BFD03D2000283929D97C7C8048004086000CE4
+S3152005BFE038000000480000607FE3FB784800018D9B
+S3152005BFF03D4051EB614A851F3D6000283D200028C4
+S3152005C0003D00002881299C80800BD7008129003C92
+S3152005C010817F00087C004A147C005A147CC0501687
+S3152005C0207CE051D6396000017CC933787CEA3B78BF
+S3152005C0305529E13E1D290032916896847C090050D8
+S3152005C04030000001901F00147FC3F3784BFF6A610F
+S3152005C050800100147C0803A683C1000883E1000C37
+S3152005C060382100104E8000204E8000209421FFD8D4
+S3152005C0707C0802A69321000C9341001093610014BD
+S3152005C0809381001893A1001C93C1002093E10024FD
+S3152005C0909001002C3FE00028801F96842C8000000C
+S3152005C0A0418600AC4BFF69393D20002839299C7013
+S3152005C0B0800900043BC000007C9E00407C7B1B78E9
+S3152005C0C038000000901F96844185007C3F2000287B
+S3152005C0D03F8000283BA000017D3A4B7881399C7032
+S3152005C0E057C3103A7C091A142C8000004186004853
+S3152005C0F07FE9182E2C9F00004186003C801F0014E6
+S3152005C1002C800000418600243000FFFF2C80000093
+S3152005C110901F0014408600107FE3FB784800005DE1
+S3152005C1204800000893BC968483FF00002C9F0000DE
+S3152005C1304086FFCC801A00043BDE00017C9E004031
+S3152005C1404085FF9C7F63DB784BFF69658001002C6A
+S3152005C1507C0803A68321000C83410010836100140B
+S3152005C1608381001883A1001C83C1002083E100245C
+S3152005C170382100284E8000209421FFD87C0802A66D
+S3152005C18093A1001C93C1002093E100249001002C6B
+S3152005C1907C7E1B78386000013880000238A000803C
+S3152005C1A038C000014BFF30D97C7F1B7941820114B1
+S3152005C1B03960001C917F000C3D200028917F0018D6
+S3152005C1C03940000039600000801F000881299CC481
+S3152005C1D07FE3FB787C004A14901F0008813F000806
+S3152005C1E03800001C99490001B0090002B169000612
+S3152005C1F03800000298090009380000009009000C53
+S3152005C200801E00083880000890090010813F00082C
+S3152005C210801F000C39290014913F00083000FFECDF
+S3152005C220901F000C83BF000838000012981D0000DF
+S3152005C230995D0001801E0008B17D0002901D000455
+S3152005C2404800009DB07D00023BA100087FA3EB7846
+S3152005C2503880000C813F0008801F000C3929FFEC2F
+S3152005C260913F000830000014901F000C4BFBDAA903
+S3152005C2707FE3FB783880000038A000003D200028A9
+S3152005C280801E000C38C0000090010008380000010F
+S3152005C290981D000480098F107FA7EB783120FFFFBA
+S3152005C2A07C090110981D00054BFE30C93D2000284C
+S3152005C2B03929DA2080090020300000019009002064
+S3152005C2C08001002C7C0803A683A1001C83C10020C5
+S3152005C2D083E10024382100284E8000209421FFC0C8
+S3152005C2E07C0802A6924100089261000C92810010FA
+S3152005C2F092A1001492C1001892E1001C930100201E
+S3152005C30093210024934100289361002C93810030CA
+S3152005C31093A1003493C1003893E1003C9001004479
+S3152005C3207C731B787C9523783013FFFF7D2099102D
+S3152005C3303175FFFF7C0BA9107D2B00393BE00000F2
+S3152005C3403BC000003A4000004182029C3A80000032
+S3152005C3506294FFFF8013000C2C8000004186026C3E
+S3152005C3602C9EFFFF82F300084086002489370000B3
+S3152005C3703AF7000133C0FFFF3AB5FFFF56C0042E3A
+S3152005C3807D3603787FF6FA14480000087C1E03786C
+S3152005C3907C95F0004CE62B827C000026540047FE57
+S3152005C3A07C0000D07FC900387EA000787D3E0378CA
+S3152005C3B056E907FE7FC0FE707C1E005054000FFE16
+S3152005C3C07D2B00397EBEA8504182004C57E9843E1C
+S3152005C3D057E0043E7FE90214881700003AF700016A
+S3152005C3E03BDEFFFF7C9FA0003A4000017D34F850DC
+S3152005C3F05016442E4CE623827C000026540047FE28
+S3152005C4007C0000D07FEB00387D2000787D7F037887
+S3152005C41057FF402E37DEFFE0418000983997001EF2
+S3152005C420A12CFFE4A16CFFE6A14CFFE8A10CFFEAD5
+S3152005C430A0ECFFECA0CCFFEEA0ACFFF0A08CFFF2A9
+S3152005C440A06CFFF4A3ACFFF6A38CFFF8A36CFFFA50
+S3152005C450A34CFFFCA32CFFFEA30C0000398C002067
+S3152005C460A01700003AF7002037DEFFE07FFF021411
+S3152005C4707FFF4A147FFF5A147FFF52147FFF421411
+S3152005C4807FFF3A147FFF32147FFF2A147FFF221481
+S3152005C4907FFF1A147FFFEA147FFFE2147FFFDA1469
+S3152005C4A07FFFD2147FFFCA147FFFC2144080FF741A
+S3152005C4B037DE00184180003839170006A128FFFC11
+S3152005C4C0A168FFFEA148000039080008A017000052
+S3152005C4D03AF7000837DEFFF87FFF02147FFF4A147C
+S3152005C4E07FFF5A147FFF52144080FFD437DE0008A1
+S3152005C4F06A4900017C00002654001FFE7C0B483942
+S3152005C500408200C857E9843E57E0043E7FE902147D
+S3152005C5107C9FA0007D74F85037DEFFFE4CE6238213
+S3152005C5207C000026540047FE7C0000D07FE90038B9
+S3152005C5307D6000787D3F03784180001837DEFFFE59
+S3152005C540A01700003AF700027FFF02144080FFF093
+S3152005C5502C9200004186006457E9843E57E0043E4C
+S3152005C5607FE902147C9FA0003A4000007D34F850F4
+S3152005C5704CE623827C000026540047FE7C0000D032
+S3152005C5807FEB00382C9EFFFF7D2000787D7F03788A
+S3152005C59057FF402E4086001C3BC00000893700000F
+S3152005C5A056C0042E7D3603787FF6FA144800001C03
+S3152005C5B03BC0FFFF480000142C9EFFFF4086000C61
+S3152005C5C0881700005016442E827300003013FFFF93
+S3152005C5D07D2099103175FFFF7C0BA9107D2B003925
+S3152005C5E04082FD742C950000418600103C60002792
+S3152005C5F038635FD44BFBFFC92C9EFFFF4086000C9A
+S3152005C60056C0042E7FFF021457E9843E57E0043EA8
+S3152005C6107FE90214392000006129FFFF7C9F48002D
+S3152005C6207D29F8504CE623827C000026540047FEDF
+S3152005C6307C0000D07FE300387D2000787C0318F845
+S3152005C6405463043E800100447C0803A68241000809
+S3152005C6508261000C8281001082A1001482C100181B
+S3152005C66082E1001C830100208321002483410028C8
+S3152005C6708361002C8381003083A1003483C1003877
+S3152005C68083E1003C382100404E8000209421FFE8BC
+S3152005C6907C0802A69381000893A1000C93C1001083
+S3152005C6A093E100149001001C7C7C1B787C9E2378EA
+S3152005C6B0386000603880000438A000014BFF65A56E
+S3152005C6C07C7F1B794082000C386000374800006863
+S3152005C6D07FE3FB78388000604BFBD63D93DF001067
+S3152005C6E0939F00244BFF62F9813E000080090000DC
+S3152005C6F02C8000007C7D1B78901F00004186001051
+S3152005C700813E00008129000093E90004813E000056
+S3152005C71093E90000801E00007FE3FB78901F00044C
+S3152005C72048000D457FA3EB784BFF638593FC0008F6
+S3152005C730386000008001001C7C0803A68381000860
+S3152005C74083A1000C83C1001083E100143821001851
+S3152005C7504E8000209421FFD87C0802A69341001024
+S3152005C760936100149381001893A1001C93C10020A6
+S3152005C77093E100249001002C7C7F1B783BC00000B0
+S3152005C7803B4000003D20002880099C80815F0024D5
+S3152005C7902C800000A16A0002801F0010557B05AC85
+S3152005C7A03380000C41860098A01F00202C800000B5
+S3152005C7B04086004C801F001C2C80000040860040CF
+S3152005C7C07160020440820020812A000CA009000A1B
+S3152005C7D0700900044182000C716000024082000845
+S3152005C7E03B4000012C840000418600E08004000CBB
+S3152005C7F02C80001083A400084186000C38600016A2
+S3152005C80048000140817D00043D20E000556000067A
+S3152005C8107C804800A3DD00024186002C2C8B00007D
+S3152005C8204186004838000000B01D00027FA3EB7842
+S3152005C8304BFD9D052C830000408600303860003175
+S3152005C84048000100A00A0002700900047C000026A9
+S3152005C85054001FFE7C0000D07C0900F871290204D3
+S3152005C8607F6000387C1B4B782C9E00004186005447
+S3152005C8703881000838A000003D20002880099CE466
+S3152005C88038C1000C90010008801D00047FC7F3788D
+S3152005C8909001000C807F00107F48D37848000899C6
+S3152005C8A07C631B794182001C81230024A809000290
+S3152005C8B07F6900394082000C3860003048000084CA
+S3152005C8C0801D0004901F001C2C9E000040860064DD
+S3152005C8D03B6004003FA00028A01C0000300000019A
+S3152005C8E03120FC005529043E28890F88B01C0000FC
+S3152005C8F040850008B37C00003881000C38A0000074
+S3152005C90038C10008801D9CE4A3DC00009001000CC2
+S3152005C910801F001C7F48D37890010008807F001077
+S3152005C9207FC7F378480008112C8300004086FFACAA
+S3152005C930B3DF00207FE3FB7848000B8938600000D1
+S3152005C9408001002C7C0803A6834100108361001416
+S3152005C9508381001883A1001C83C1002083E1002464
+S3152005C960382100284E8000209421FFE07C0802A66D
+S3152005C9709361000C9381001093A1001493C10018B4
+S3152005C98093E1001C900100248004000C2C800010EB
+S3152005C9907C7C1B787CBB2B7883A400084186000C05
+S3152005C9A038600016480001FC881D00012C80000215
+S3152005C9B04186000C3860002F480001E8A01D0002C2
+S3152005C9C02C800000418601C83D20002881699C8075
+S3152005C9D02C8B000041860038801D00042C80000029
+S3152005C9E04086000C800B003C480000202C80FFFF71
+S3152005C9F04086001C812B000CA009001A7009000234
+S3152005CA004182000C800B004C901D0004801C001CEC
+S3152005CA102C80000040860188807C002C2C83000019
+S3152005CA203BE000003BDC002C4186004C801E0008C4
+S3152005CA30813D00047C80480040860014813C00240A
+S3152005CA40A0090002700900104182003CA12300368E
+S3152005CA507D2007342C8000014185000C4BFE9B4D23
+S3152005CA604800000C3809FFFFB003003638000000E7
+S3152005CA70901E0000813C0024A009000270090010C8
+S3152005CA8040820044813E00002C890000418600102A
+S3152005CA908009003C2C8000004086002C38000002CE
+S3152005CAA0981E000538000010981E0004801D0004FD
+S3152005CAB0901E0008881C00457FC3F378981E000742
+S3152005CAC04BFE9839807E00002C8300004186001895
+S3152005CAD08123003CA009001A70090008408200083D
+S3152005CAE083E300402C9F000040860048A3DD00021A
+S3152005CAF038000000B01D00027FA3EB784BFD9B0597
+S3152005CB007C7F1B79408200107FA3EB784BFD9BA58C
+S3152005CB107C7F1B782C9F0000B3DD00024086001425
+S3152005CB203D20002883E99C802C9F000041860060DB
+S3152005CB30801D00043D20E000540000067C8048004E
+S3152005CB4040860054807C005C2C830000418600488A
+S3152005CB50806300002C8300004186003C3D20002890
+S3152005CB6083E99C802C9F000041860024801F000CB1
+S3152005CB707C8018004186001083FF00342C9F00001E
+S3152005CB804086FFEC2C9F00004086000C3860003163
+S3152005CB9048000010381F0038901B00003860000040
+S3152005CBA0800100247C0803A68361000C8381001084
+S3152005CBB083A1001483C1001883E1001C38210020BD
+S3152005CBC04E8000209421FFE07C0802A693C1001820
+S3152005CBD093E1001C900100247C7F1B7838A1000876
+S3152005CBE083C400084BFFFD857C631B794082009C2E
+S3152005CBF0801E00049001000C801F001C2C80000064
+S3152005CC004086000C8121000880090004900100104F
+S3152005CC103881000C38C10010807F0010A0BE0002AC
+S3152005CC20A0FF002039000000480006692C8300007B
+S3152005CC304186000C3860003048000050801F001CDB
+S3152005CC402C80000040860028A01F00202C80000094
+S3152005CC50408600107FE3FB78388000004BFFFAF909
+S3152005CC608121000880090004901F001C801E0004F5
+S3152005CC70901F0014A01E00027FE3FB78B003001866
+S3152005CC804800084138600000800100247C0803A67E
+S3152005CC9083C1001883E1001C382100204E80002026
+S3152005CCA09421FFF07C0802A693E1000C9001001464
+S3152005CCB07C7F1B7838000000901F00143800000088
+S3152005CCC0B01F0018480007FD813F0024A009000673
+S3152005CCD0700900014182000C7FE3FB7848000019AA
+S3152005CCE0800100147C0803A683E1000C382100107E
+S3152005CCF04E8000209421FFF07C0802A693E1000CCB
+S3152005CD00900100147C7F1B78807F0024380000006A
+S3152005CD10900300084BFF3035807F00582C83000098
+S3152005CD20418600084BFE6345807F002C2C8300003E
+S3152005CD30418600084BFE9875807F005C7FE4FB7872
+S3152005CD404BFE3BFD4BFF5C99813F00082C8900007B
+S3152005CD504186000C801F000C9009000C813F000CB9
+S3152005CD60801F000890090000813F00002C890000E3
+S3152005CD704186000C801F000490090004813F0004B1
+S3152005CD80801F0000900900004BFF5D257FE3FB789F
+S3152005CD904BFF5F29800100147C0803A683E1000C64
+S3152005CDA0382100104E8000209421FFE87C0802A639
+S3152005CDB09381000893A1000C93C1001093E1001400
+S3152005CDC09001001C7C7C1B78380000109004000C18
+S3152005CDD083A40008388000107FA3EB784BFBCF395E
+S3152005CDE038000002981D000138000010981D00002B
+S3152005CDF0A01C0020B01D0002801C001C901D0004F4
+S3152005CE008001001C7C0803A68381000883A1000CF1
+S3152005CE1083C1001083E10014382100184E800020BC
+S3152005CE209421FFE87C0802A69381000893A1000CB3
+S3152005CE3093C1001093E100149001001C7C7C1B78A3
+S3152005CE40380000109004000C83A4000838800010D8
+S3152005CE507FA3EB784BFBCEC138000002981D00015D
+S3152005CE6038000010981D0000A01C0018B01D0002F7
+S3152005CE70801C0014901D00048001001C7C0803A65C
+S3152005CE808381000883A1000C83C1001083E100146F
+S3152005CE90382100184E8000209421FFD07C0802A658
+S3152005CEA07D800026930100109321001493410018DC
+S3152005CEB09361001C9381002093A1002493C100282F
+S3152005CEC093E1002C900100349181000C7C7E1B7827
+S3152005CED0836600007D1F4378289F00157D3D4B788E
+S3152005CEE054BC043E54FA043E4185011088040001D1
+S3152005CEF02C80000240860104832400042C9900001E
+S3152005CF00418600F82C9F0006381FFFF220000003FB
+S3152005CF10380000007C0001147D20002655293FFE9F
+S3152005CF207C0B4B794182001C3B8000003B40000076
+S3152005CF303B6000004186000C3D2000263BA9CFF42E
+S3152005CF404BFB77593D20002839298E147C1F48AE86
+S3152005CF50900300004BFF5A8983FE00002C9F00009A
+S3152005CF607C781B784186008C2D1A0000801F0014C2
+S3152005CF707C80C80040860048801F00242C80000045
+S3152005CF804186003C418A0010A01F00207C80D000ED
+S3152005CF904086002C2C9B000041860010801F001C1B
+S3152005CFA07C80D800408600182C9C000041860018FD
+S3152005CFB0A01F00187C80E0004186000C83FF00003E
+S3152005CFC0480000282C9D00007FFEFB7883FF00008B
+S3152005CFD0418600184BFB76C57FA803A680830000F3
+S3152005CFE07FC3F3784E8000212C9F00004086FF806A
+S3152005CFF07F03C3784BFF5AB9800100348181000C29
+S3152005D0007C0803A6830100108321001483410018A0
+S3152005D0108361001C8381002083A1002483C100280D
+S3152005D02083E1002C7D820120382100304E800020AE
+S3152005D0309421FFC87C0802A693C1003093E10034F1
+S3152005D0409001003C7C7E1B7883FE002C2C9F0000E3
+S3152005D0504186008C38000000901E002C386100089F
+S3152005D060388000244BFBCCB1381E00309001000CD3
+S3152005D0703D200028801F003081298F149001001043
+S3152005D0802C890000801F0010900100144186001C89
+S3152005D090386000057D2803A638810008A8BF00341E
+S3152005D0A038C000004E800021A0FF003470E000103B
+S3152005D0B041820024386000027CE70734809F000CFB
+S3152005D0C080BF003080DF0010390000004BFE99AD8F
+S3152005D0D04800000C7FE3FB784BFE94D18001003C91
+S3152005D0E07C0803A683C1003083E10034382100384B
+S3152005D0F04E8000209421FFF07C0802A693E1000CC7
+S3152005D100900100147C7F1B78807F002C2C830000E7
+S3152005D110418600104BFE949538000000901F002C88
+S3152005D120800100147C0803A683E1000C3821001039
+S3152005D1304E8000209421FFD87C0802A69321000C5E
+S3152005D14093410010936100149381001893A1001C4C
+S3152005D15093C1002093E100249001002C7C7D1B784F
+S3152005D1607D1B437854B9043E54FA043E838400005B
+S3152005D17083C600004BFF5869813D000081490000A8
+S3152005D1802C8A00003BE000003BA00003418600D02E
+S3152005D190301CFFFF7C00011030C0000130FEFFFF70
+S3152005D1A07CE73910201B00007D00D9142F9C000038
+S3152005D1B02F1E0000A00A00207C80D0004086009407
+S3152005D1C0800A00142C800000396000004186002862
+S3152005D1D0409E000C39600001480000207C80E0005C
+S3152005D1E040860070A00A00187C80C800408600642E
+S3152005D1F0480000087CCB3378800A001C2C80000070
+S3152005D2004186001C409A000C396B0001480000201D
+S3152005D2107C80F0004086003C48000014380B000155
+S3152005D2207D6938387C0038787D2B0378312BFFFFD4
+S3152005D2307C0959107C094039408200187C8BE8000E
+S3152005D240408400107D7D5B797D5F53784182001097
+S3152005D250814A00002C8A00004086FF5C4BFF58510E
+S3152005D2607FE3FB788001002C7C0803A68321000C34
+S3152005D27083410010836100148381001883A1001C5B
+S3152005D28083C1002083E10024382100284E80002018
+S3152005D2909421FFD87C0802A69321000C9341001007
+S3152005D2A0936100149381001893A1001C93C100205B
+S3152005D2B093E100249001002C7C7D1B787D19437811
+S3152005D2C054BC043E54FB043E83C400008346000040
+S3152005D2D04BFF570D801D0008817D000457C9843EEC
+S3152005D2E07FC94A787D29DA787D29E2787D29003833
+S3152005D2F05529103A7FEB482E2C9F00007D6B4A144A
+S3152005D30041860040801F00147C80F000408600285E
+S3152005D310A01F00187C80E0004086001CA01F00206E
+S3152005D3207C80D80040860010801F001C7C80D000A1
+S3152005D330418600B083FF00082C9F00004086FFC869
+S3152005D3402C99000041860090813D0008817D0004CE
+S3152005D3507F6948385529103A7FEB482E2C9F0000C7
+S3152005D360394000007D6B4A144186005C801F0014FD
+S3152005D3702C80000040860044A01F00182C80000049
+S3152005D38040860038A01F00207C80D8004086002CCF
+S3152005D390801F001C7C80D000418600487C09FE70D9
+S3152005D3A07D2002787C0048507C00FE707D4900383F
+S3152005D3B07FE000787D2A037883FF00082C9F0000F4
+S3152005D3C04086FFAC2C8A00004186000C7D5F537891
+S3152005D3D0480000104BFF56D9386000004800005C15
+S3152005D3E0800B00007C9F000041860048813F000895
+S3152005D3F02C8900004186000C801F000C9009000C2A
+S3152005D400813F000C801F000890090000800B00005A
+S3152005D4102C800000901F000841860010812B0000FB
+S3152005D420381F00089009000C93EB0000917F000C33
+S3152005D4304BFF567D7FE3FB788001002C7C0803A6F5
+S3152005D4408321000C83410010836100148381001819
+S3152005D45083A1001C83C1002083E1002438210028F4
+S3152005D4604E80002080030014A16300208143001014
+S3152005D4705409843E7C004A787C005A78A1230018FA
+S3152005D480816A0008814A00047C004A787C00583865
+S3152005D490540B103A7C0A582E2C8000007D0A5A140B
+S3152005D4A090030008418600107D2A582E380300086F
+S3152005D4B09009000C7C6A592E9103000C4E800020A1
+S3152005D4C09421FFF07C0802A693E1000C900100143C
+S3152005D4D07C7F1B784BFF5509813F00082C8900006E
+S3152005D4E04186000C801F000C9009000C813F000C22
+S3152005D4F0801F000890090000801F0014A17F0020CE
+S3152005D500815F00105409843E7C004A787C005A7855
+S3152005D510A13F0018816A0008814A00047C004A78E8
+S3152005D5207C005838540B103A7C0A582E2C80000063
+S3152005D5307D0A5A14901F0008418600107D2A582E10
+S3152005D540381F00089009000C7FEA592E911F000C00
+S3152005D5504BFF555D800100147C0803A683E1000C72
+S3152005D560382100104E8000209421FFF07C0802A669
+S3152005D57093C1000893E1000C900100143D2000287A
+S3152005D580800997402C800000408600143D20002805
+S3152005D5908129973C90690000480000B43D60002829
+S3152005D5A0812B973C906900003D20002881299744CE
+S3152005D5B03BE000017C9F4800408400383D4041C641
+S3152005D5C0614A4E6D800B973C7D2B4B7831200004AC
+S3152005D5D08009FFFC3BFF00017C0051D67C9F58004B
+S3152005D5E03000303990090000392900044184FFE4D0
+S3152005D5F03BE000003D0000283D2000283D40002856
+S3152005D600816997483D200028800997443D200028B8
+S3152005D610814A973C1C00000A556B103A7C9F0000F6
+S3152005D6207D6A5A1491689734914997384084002029
+S3152005D6303FC0002848000355801E97441C00000A59
+S3152005D6403BFF00017C9F00004184FFEC8001001414
+S3152005D6507C0803A683C1000883E1000C382100104D
+S3152005D6604E8000209421FFF07C0802A693C1000875
+S3152005D67093E1000C900100143D2000288149974034
+S3152005D6803D2000282C8A00008169973C7CBF2B7899
+S3152005D6903BCBFFFC4086000C914BFFFC480000204D
+S3152005D6A03D200028800997387C0B00507C00167099
+S3152005D6B01C0000057C005214900BFFFC2C9F0007D4
+S3152005D6C0418500244BFB5A79806300003C80002766
+S3152005D6D038845FE87FE5FB78480119253860000026
+S3152005D6E04800012C2C9F001F418500203D20002845
+S3152005D6F038000000900997403D200028900997445E
+S3152005D7003D2000284800009C2C9F003F418500288D
+S3152005D7103D20002838000001900997403D2000282B
+S3152005D72038000007900997443D200028380000035B
+S3152005D730480000702C9F007F4185001C3D20002855
+S3152005D74038000002900997403D2000283800000F38
+S3152005D750480000442C9F00FF418500283D200028D5
+S3152005D76039600003916997403D2000283800001F45
+S3152005D770900997443D20002891699748480000283C
+S3152005D7803D20002838000004900997403D200028B8
+S3152005D7903800003F900997443D20002838000001B5
+S3152005D7A0900997483FE0002839640004917F973C0B
+S3152005D7B03D200028800997443D2000285400103A32
+S3152005D7C07D6B02149169974C4BFFFDA13D200028E6
+S3152005D7D0814997402C8A000040860010813F973C5E
+S3152005D7E09149FFFC480000243D200028817F973C75
+S3152005D7F0800997387C0B00507C0016701C000005AC
+S3152005D8007C005214900BFFFC7FC3F3788001001433
+S3152005D8107C0803A683C1000883E1000C382100108B
+S3152005D8204E8000209421FFE87C0802A693A1000CD7
+S3152005D83093C1001093E100149001001C7C7F1B7896
+S3152005D840813F0000396000057D695BD61C0B00050C
+S3152005D8507CE048503D200028810997403D2000283E
+S3152005D8602C8800008149973C7D7E5B783BAAFFFC8E
+S3152005D8704086000C910AFFFC480000203D20002828
+S3152005D880800997387C0A00507C0016701C0000051C
+S3152005D8907C004214900AFFFC2C8700044185004435
+S3152005D8A02C8700004184003C3D20002890E99740C4
+S3152005D8B03D2000283929968C54EB103A7C0B482EAE
+S3152005D8C03D200028900997443D200028392996A017
+S3152005D8D07C0B482E3D2000289009974848000018C3
+S3152005D8E04BFB585D806300003C8000273884601818
+S3152005D8F04801170D3D200028800997402C800000FF
+S3152005D9003D20002838FF000490E9973C41860044D5
+S3152005D9103D2000283D60002881299748810B9744A2
+S3152005D9207D3E4A147D6943D63D40002857C0103AAE
+S3152005D9307C070214900A97387D6B41D63D40002816
+S3152005D9407D2B48505529103A7D274A14912A97341C
+S3152005D9507FA3EB783D200028800997443D200028A9
+S3152005D9605400103A7C0702149009974C8001001C3C
+S3152005D9707C0803A683A1000C83C1001083E1001453
+S3152005D980382100184E8000203D2000288009974028
+S3152005D9902C800000408600303D2000288169973C78
+S3152005D9A03D2041C6800B000061294E6D7C0049D67D
+S3152005D9B0300030395400007E900B00007C0303783C
+S3152005D9C04E8000203D0000283CE0002881689734E1
+S3152005D9D081279738800B0000812900007C004A1496
+S3152005D9E0900B00003D200028816897348149974C8B
+S3152005D9F0380B00047C805040812B0000900897341A
+S3152005DA005523F87E418400203D2000288129973C16
+S3152005DA108007973891289734300000049007973867
+S3152005DA204E80002080079738300000047C805040C7
+S3152005DA30900797384D8400203D2000288009973C83
+S3152005DA40900797384E8000209421FFF07C0802A687
+S3152005DA5093E1000C900100147C8923782C89001C05
+S3152005DA607C6B1B787CA62B78418600D041850030BF
+S3152005DA702C89000141860088418500183C008004D8
+S3152005DA80600073087C8900004186007C480000D42C
+S3152005DA902C8900104186003C480000C83C00400403
+S3152005DAA0600073077C8900004186007C4185001053
+S3152005DAB02C89001D41860098480000A83C0040049A
+S3152005DAC0600073097C8900004186004C480000945B
+S3152005DAD0800600002C80000041860010A00B000661
+S3152005DAE0600001004800000CA00B00067000FEFF38
+S3152005DAF0B00B000638600000480000E0800B00509F
+S3152005DB0048000018A006000238600000B00B004A45
+S3152005DB10480000C8A80B004A38600000900600009F
+S3152005DB20480000B8A00B0006386000005400D7FE58
+S3152005DB3090060000480000A47D635B787CC433789A
+S3152005DB40480000AD38600000480000907D635B7892
+S3152005DB507CC43378480001BD386000004800007C4D
+S3152005DB605520C63E2C800069408600187D635B786B
+S3152005DB707D244B787CC533784BFD922D4800003C9F
+S3152005DB802C800072408600147D234B787CC4337824
+S3152005DB904BFE8D81480000247D635B787D254B787F
+S3152005DBA08123000C8009001C7C0803A63880000B05
+S3152005DBB038E000004E8000217C7F1B782C9F0000DA
+S3152005DBC04086000C38600000480000104BFB6ACDEB
+S3152005DBD093E300003860FFFF800100147C0803A64C
+S3152005DBE083E1000C382100104E8000209421FFF09F
+S3152005DBF07C0802A693C1000893E1000C900100144D
+S3152005DC007C7F1B787C9E23787FC3F3784BFFB34DAF
+S3152005DC107C631B79418200102C83000141860044D8
+S3152005DC20480000CC7FE3FB78389F00507FC5F3780A
+S3152005DC304BFF40A1813F0050801F00607C8900403A
+S3152005DC404084009CA01F0006700900204082009099
+S3152005DC50A81F00422C8000004086008448000074DE
+S3152005DC607FE3FB78389F00907FC5F3784BFF4065AF
+S3152005DC70815F0094813F0090817F009C801F0098E2
+S3152005DC807D4950507D6058507C8A5800801F00A0E1
+S3152005DC90408400107C8A00404084001048000028FB
+S3152005DCA07C8B004041840020A01F000670090002DD
+S3152005DCB04082002C813F000CA009000A700900044F
+S3152005DCC04182001CA01F000670090010408200102A
+S3152005DCD0A01F00482C8000004186001C7FC3F378D6
+S3152005DCE04BFFAF2938600001480000103860FFFF60
+S3152005DCF04800000838600000800100147C0803A64F
+S3152005DD0083C1000883E1000C382100104E800020D5
+S3152005DD109421FFF07C0802A693C1000893E1000C2C
+S3152005DD20900100147C7E1B787C9F23787FE3FB780B
+S3152005DD304BFFB2297C631B79418200102C8300019D
+S3152005DD4041860014480000247FC3F37838830050A9
+S3152005DD504800000C7FC3F378388300907FE5FB7875
+S3152005DD604BFF3FB54800000C3860FFFF4800000810
+S3152005DD7038600000800100147C0803A683C10008D2
+S3152005DD8083E1000C382100104E8000209421FFC02D
+S3152005DD907C0802A69361002C9381003093A1003460
+S3152005DDA093C1003893E1003C900100447C9C237884
+S3152005DDB07CBE2B787CDD33784801254D7C7B1B7911
+S3152005DDC03BE00000418201002C9E00004086003881
+S3152005DDD04BFC28653C0000026000EFFF7C63267043
+S3152005DDE07C6301947C830000418500144BFC284903
+S3152005DDF07C7E26707FDE01944800000C3FC0000221
+S3152005DE0063DEF0004801243D3D200028812999DC68
+S3152005DE10800900202C800000418600187C0803A676
+S3152005DE207F83E3787FC4F3784E8000217C7F1B783F
+S3152005DE302C9F0000408600144800008C7C0B4A1459
+S3152005DE40901F00804800006438000000901F008065
+S3152005DE503D2000263929ED44913F00203D2000260E
+S3152005DE603929EFFC913F00243D2000263929F3F876
+S3152005DE70913F002C3D2000263929F204913F0028A8
+S3152005DE804BFC9C613D2000283929DA443960000085
+S3152005DE907C0B482E2C8000004186FFA4396B007828
+S3152005DEA0288B07084085FFEC807F00802C830000A7
+S3152005DEB04086001C4BFC9CED4BFB67E138000013AC
+S3152005DEC09003000038600000480000D038800078B4
+S3152005DED04BFBBE45813F008093E900004BFC9CC56A
+S3152005DEE02C9D0000813F008093690004418600280F
+S3152005DEF07FA3EB784BFB5869386300014BFC3595BE
+S3152005DF007FA4EB784BFB5825813F00809069001054
+S3152005DF1048000014817F00803D20002739296104AF
+S3152005DF20912B00107FE3FB7848001E8D3FC000280B
+S3152005DF30801E97502C8000004086005C90010008CA
+S3152005DF409001000C9001001090010014900100181A
+S3152005DF509001001C900100203D2000283C600027F0
+S3152005DF6038636108808997543D2000283D60002844
+S3152005DF703CE0002638E7FDB43900000080A9975C0F
+S3152005DF803920000080CB9758394000004BFC80890A
+S3152005DF90907E97507FE3FB78800100447C0803A69A
+S3152005DFA08361002C8381003083A1003483C100382E
+S3152005DFB083E1003C382100404E8000209421FFE873
+S3152005DFC07C0802A69381000893A1000C93C100103A
+S3152005DFD093E100149001001C7C7E1B787C9D2378A0
+S3152005DFE07CBC2B784BFB66B52C9D0000800300007E
+S3152005DFF03BE0FFFF901E005441860010801D00085F
+S3152005E000901E00504800000893FE0050813E008077
+S3152005E010806900048003004C2C8000004086002483
+S3152005E0208003002C7C0803A63C80CB10608400016D
+S3152005E03038A000004E8000212C83FFFF4086000C6F
+S3152005E04038000001901E004C801E004C2C800000DC
+S3152005E050418600344BFB66452C9C00013C00000C98
+S3152005E0606000000690030000408600843C6000287E
+S3152005E070386397607FC4F3783CE0002738E761145E
+S3152005E080480000584BFB6615800300002C800000D5
+S3152005E090408600144BFB66053C00000C600000031F
+S3152005E0A0900300002C9C00004186001C3C60002843
+S3152005E0B0386397607FC4F3783CE0002738E7615CD6
+S3152005E0C0480000183C600028386397607FC4F378C1
+S3152005E0D03CE0002738E761483900000080A400505D
+S3152005E0E080C40054392000004BFB8C8D3860FFFF1F
+S3152005E0F08001001C7C0803A68381000883A1000CEF
+S3152005E10083C1001083E10014382100184E800020B9
+S3152005E1108003003C540BF87F386000008144000CD6
+S3152005E1204C810020A00A0000556907BE356BFFFF0C
+S3152005E130394A00027C0048307C6302144181FFE89D
+S3152005E1404E800020800400145409273F8143008017
+S3152005E15041820068816A00342C8B00004186005C70
+S3152005E160800400087D205B967D2959D6814A00309A
+S3152005E1707C090050540B103A7D2A582E7C892000A4
+S3152005E1804086001C800400107C0A592E4800002C6D
+S3152005E1908004001090090010480000202C890000FA
+S3152005E1A041860018800900107C8020004186FFE406
+S3152005E1B07C0903794082FFF03920FFFF912400086E
+S3152005E1C080040014392000005400014690040014F0
+S3152005E1D080040014912400105120E00690040014B8
+S3152005E1E04E8000209421FFE87C0802A69381000832
+S3152005E1F093A1000C93C1001093E100149001001C1B
+S3152005E2007C7F1B787C9C23784BFCACED813F008082
+S3152005E2103880000038A0000038C000019069002829
+S3152005E2207FE3FB7848000A317C7E1B7941820068B2
+S3152005E230801E0014541D273E2C9D00014086003467
+S3152005E2402C9C0000418600107FE3FB787FC4F37881
+S3152005E2504BFFFEF57FE3FB787FC4F3784BFFFEB5D6
+S3152005E260813F00808009002C7C8018004086000CA8
+S3152005E2703860000048000024813F008093BF004C91
+S3152005E2809069002C4BFB64153C00000C60000006D1
+S3152005E290900300003860FFFF8001001C7C0803A660
+S3152005E2A08381000883A1000C83C1001083E100143B
+S3152005E2B0382100184E8000209421FFF87C0802A6FC
+S3152005E2C09001000C800300002C8000007C852378BB
+S3152005E2D04086000C4BFBBBD14800003480830004EC
+S3152005E2E02C84000041860020812500088004000832
+S3152005E2F07C80484041840014808400042C840000DE
+S3152005E3004086FFEC388000004BFBBB618001000C8A
+S3152005E3107C0803A6382100084E8000209421FFC8DA
+S3152005E3207C0802A67D80002692A1000C92C10010D1
+S3152005E33092E10014930100189321001C93410020BB
+S3152005E340936100249381002893A1002C93C100306A
+S3152005E35093E100349001003C918100087C791B787B
+S3152005E360801900347C9823782C8000007CB62B7885
+S3152005E3703AE0000083590080418600404BFCAB798A
+S3152005E3807C7D1B784BFAA4095463083C801A002827
+S3152005E3907FA3E8507C80E840408400207F23CB780B
+S3152005E3A0388000004BFFFE412C83FFFF4086000C82
+S3152005E3B03860FFFF480001B0839800002C9C0000C0
+S3152005E3C0418601983AA00001817A001C3B60000134
+S3152005E3D07C9B58407F9DE3784185003083BD0000B6
+S3152005E3E02C9D000041860024801C0008813D0008E4
+S3152005E3F07C00DA147C890000408600103B7B0001F6
+S3152005E4007C9B58404085FFD82C9B000140860034D4
+S3152005E410807A000438A000018003002038E000013E
+S3152005E4207C0803A6809C000880DC000C39000000CF
+S3152005E4304E800021801C0008300000014800008421
+S3152005E440817A001C3BC000007C0BD8107C00011093
+S3152005E4507F6900387D6500787D3B2B787C9ED800CA
+S3152005E4607F9DE37883FA00184084002C7FE4FB78AF
+S3152005E470807D000C80B9003C3BDE00014BFB2E0D58
+S3152005E4807C9ED8008019003C83BD00007FFF0214C6
+S3152005E4904184FFDC807A00047F65DB7880030020D9
+S3152005E4A038E000017C0803A6809C000880DA001865
+S3152005E4B0390000004E800021801C00087C00DA14FB
+S3152005E4C0901A00202C83FFFF4086001C7F23CB78E3
+S3152005E4D07F84E37838A000014BFFFAE57EF71B78A9
+S3152005E4E03AC000013BC000007C9ED80040840060F5
+S3152005E4F02D160000801A00543000FFFF901A005494
+S3152005E500418A00147F23CB787F84E3784BFFFC393F
+S3152005E51048000010801C001452A0E006901C001430
+S3152005E52083BC00007F03C3787F84E3784BFBB9A1C6
+S3152005E530387A00087F84E3784BFBB96D3BDE000112
+S3152005E5407C9ED8007FBCEB784184FFAC8398000085
+S3152005E5502C9C00004086FE744BFCA99D907A0028D1
+S3152005E5607EE3BB788001003C818100087C0803A6F8
+S3152005E57082A1000C82C1001082E1001483010018DB
+S3152005E5808321001C83410020836100248381002888
+S3152005E59083A1002C83C1003083E100347D820120D4
+S3152005E5A0382100384E8000209421FFC07C0802A621
+S3152005E5B092A1001492C1001892E1001C930100203B
+S3152005E5C093210024934100289361002C93810030E8
+S3152005E5D093A1003493C1003893E1003C9001004497
+S3152005E5E07C7E1B787C9923787CB82B787CD73378EE
+S3152005E5F07CFB3B787D1A4378386100084BFBB82DA8
+S3152005E600813E008083E9000C2C9F00003AC0000063
+S3152005E6103B800000418600943AA00001801F000837
+S3152005E6207C80C84083BF00044184006C7C80C04048
+S3152005E63041850064801F00145400273E2C8000016C
+S3152005E64041860040288000014184004C2C80000230
+S3152005E650408600442C970000418600287FE4FB78FD
+S3152005E660807E00803B9C0001386300084BFBB86127
+S3152005E670386100087FE4FB784BFFFC414800001811
+S3152005E6802C9B0000418600107FC3F3787FE4FB783E
+S3152005E6904BFFFAB57FBFEB78313FFFFF7C09F910B9
+S3152005E6A07C09A8394082FF78800100082C8000006B
+S3152005E6B04186002C7FC3F378388100087F65DB7897
+S3152005E6C04BFFFC5D2C9A00007C761B78418600105A
+S3152005E6D0801A00007C00E214901A00007EC3B378ED
+S3152005E6E0800100447C0803A682A1001482C100187B
+S3152005E6F082E1001C83010020832100248341002818
+S3152005E7008361002C8381003083A1003483C10038C6
+S3152005E71083E1003C382100404E8000209421FFE013
+S3152005E7207C0802A69361000C9381001093A1001426
+S3152005E73093C1001893E1001C900100247C7D1B7871
+S3152005E7407C9B2378839D00803BC0000A7FC0F3789D
+S3152005E7502C80000083FC000C3BDEFFFF4185002456
+S3152005E7604BFB5F393800000B900300003860000032
+S3152005E770480000C083FF00042C9F0000418600202E
+S3152005E780801F00145400273E3000FFFE288000011C
+S3152005E7904085FFE42C9F0000408600307FA3EB7860
+S3152005E7A03880000038A0FFFF38C0000138E000009F
+S3152005E7B0391C00684BFFFDF52C83FFFF4086FF9033
+S3152005E7C0386000004800006C801F00145409273F5C
+S3152005E7D0418200107FA3EB787FE4FB784BFFF96934
+S3152005E7E0937F0008801F0014392000035120E0067E
+S3152005E7F0901F0014801C00342C80000041860030B8
+S3152005E8007D3B03967D2901D6817C00307D29D85014
+S3152005E8105529103A7C0B482E901F00107FEB492E68
+S3152005E820801F001464000800901F00147FE3FB7806
+S3152005E830800100247C0803A68361000C83810010D7
+S3152005E84083A1001483C1001883E1001C3821002010
+S3152005E8504E8000209421FFD87C0802A69321000C27
+S3152005E86093410010936100149381001893A1001C15
+S3152005E87093C1002093E100249001002C7C7A1B781B
+S3152005E880801A00342C8000007C9F23783B60000092
+S3152005E890839A008041860048801F00082C8000004E
+S3152005E8A04186003C4BFCA6517C7D1B784BFA9EE1AC
+S3152005E8B05463083C801C00287FA3E8507C80E840F0
+S3152005E8C04084001C7F43D378388000004BFFF9191C
+S3152005E8D07C7B1B782C9BFFFF418600B880BC001CE7
+S3152005E8E02885000140850190811C00482888000163
+S3152005E8F0408501847CBD2B787C1D40107C00011051
+S3152005E9007C0003B87FA900387D0500787D3D2B78EE
+S3152005E910801C0014813C005483DF0008809C002065
+S3152005E9207C0900505400F87E7D20E8107D29491089
+S3152005E9307FAB48387C0548787D7D2B787FD9F37861
+S3152005E940813A0038801C00507D3E48507D69E8108C
+S3152005E9507D6B59107C00F0507C8400407FAA583886
+S3152005E9607D2558787D5D2B78408400207F43D3789C
+S3152005E9707CBEEA1438C0000138E00000391C00705E
+S3152005E9804BFFFC297C7B1B782C9BFFFF4086000CCC
+S3152005E9903860FFFF4800014C807C00047FC4F37873
+S3152005E9A0800300207FA5EB787C0803A638E00000CD
+S3152005E9B080DC0018390000004E8000212C83FFFFE3
+S3152005E9C0418600B47C1EEA14901C00203B7C00087E
+S3152005E9D03BDE000138000003813F0014809F000CB8
+S3152005E9E0807F00085009E006801A003C913F0014FC
+S3152005E9F07C7918507C6301D6801C001880BA003CAF
+S3152005EA007C601A144BFB28857F63DB787FE4FB78D3
+S3152005EA104BFBB4BD7F63DB78388000007FE5FB7850
+S3152005EA204BFBB44937BDFFFF813F00143800000179
+S3152005EA305009E006913F00144081002C7F43D3788E
+S3152005EA407FC4F378480001712C83000040860018A6
+S3152005EA507F43D3787FC4F3784BFFFCC57C7F1B7936
+S3152005EA604082FF704BFCA491907C00283860000002
+S3152005EA7048000070807C000438A000018003002037
+S3152005EA8038E000007C0803A6809F000880DF000C84
+S3152005EA90390000004E8000217C7B1B782C9BFFFFD4
+S3152005EAA04086001C7F43D3787FE4FB7838A000009E
+S3152005EAB04BFFF50D7C7B1B7848000014801F001446
+S3152005EAC0392000015120E006901F0014801F000800
+S3152005EAD0901C00204BFCA421907C00287F63DB78CA
+S3152005EAE08001002C7C0803A68321000C834100109D
+S3152005EAF0836100148381001883A1001C83C1002033
+S3152005EB0083E10024382100284E8000209421FFE04F
+S3152005EB107C0802A6934100089361000C938100109E
+S3152005EB2093A1001493C1001893E1001C90010024C1
+S3152005EB307C7C1B787C9B237883DC00807CBA2B78B5
+S3152005EB40807E0004800300207C0803A67CFD3B789C
+S3152005EB50390000004E8000217C7F1B782C9FFFFF0B
+S3152005EB60408600187F83E378388000007FA5EB7800
+S3152005EB704BFFF44D7C7F1B787C1BD214901E002006
+S3152005EB804BFCA375907E00287FE3FB78800100244B
+S3152005EB907C0803A6834100088361000C838100104D
+S3152005EBA083A1001483C1001883E1001C38210020AD
+S3152005EBB04E80002081430080800A00342C8000008E
+S3152005EBC0418600687D2403967D2901D6816A003019
+S3152005EBD07D2920505529103A7C69582E800A0038FF
+S3152005EBE02C83000030000001900A00384186001C65
+S3152005EBF0800300087C8020004D860020806300105D
+S3152005EC002C8300004086FFEC38600000812A0038FE
+S3152005EC10800A003C3929FFFF912A0038300000017F
+S3152005EC20900A003C4E800020806A00082C83000054
+S3152005EC304186001C800300087C8020004D8600202C
+S3152005EC40806300002C8300004086FFEC38600000BE
+S3152005EC504E8000209421FFE07C0802A693410008FF
+S3152005EC609361000C9381001093A1001493C10018A1
+S3152005EC7093E1001C900100247C7E1B787C9C2378E4
+S3152005EC807CBD2B793BE000003B6000007CDA3378C5
+S3152005EC904182004C801D00002C80000041860040EA
+S3152005ECA07C1F0378801F00087C80E0004086001CBE
+S3152005ECB0813E0080800900587FE3FB783000000103
+S3152005ECC09009005848000158813E00808009005C63
+S3152005ECD03BE00000300000019009005C2C9F0000FD
+S3152005ECE0408600487FC3F3787F84E3784BFFFEC9CF
+S3152005ECF07C7F1B7940820034813E00807FC3F37878
+S3152005ED00800900647F84E37830000001900900645F
+S3152005ED104BFFFA0D7C7F1B793B6000014082001C6E
+S3152005ED2038600000480000F8813E008080090060B8
+S3152005ED3030000001900900602C9A000040860034BE
+S3152005ED40801F00145400273E2C80000241860014A3
+S3152005ED50813E00808009005430000001900900544E
+S3152005ED60801F0014392000025120E006901F001450
+S3152005ED702C9D00004186000893FD0000313AFFFFD7
+S3152005ED807C09D1107C09D8394182002C7FC3F378C0
+S3152005ED907FE4FB784BFFFAC12C83FFFF40860018E2
+S3152005EDA07FC3F3787FE4FB784BFFF39D3860000043
+S3152005EDB04800006C807E00807FE4FB78386300087D
+S3152005EDC04BFBB10D38800000807E00807FE5FB7807
+S3152005EDD0386300084BFBB09580BF00087C85E000B2
+S3152005EDE0418600383C6000273863618C7FC4F37800
+S3152005EDF038C0000038E00000390000003920000046
+S3152005EE004BFB7F754BFB58953800000B9003000094
+S3152005EE1038600000480000087FE3FB788001002465
+S3152005EE207C0803A6834100088361000C83810010BA
+S3152005EE3083A1001483C1001883E1001C382100201A
+S3152005EE404E8000209421FFC87C0802A67D800026DE
+S3152005EE5092A1000C92C1001092E1001493010018B2
+S3152005EE609321001C9341002093610024938100285F
+S3152005EE7093A1002C93C1003093E100349001003C0E
+S3152005EE80918100087C771B787C9C23787CBB2B782A
+S3152005EE907EFEBB78801E004C7CD933782C80000002
+S3152005EEA07CF83B787D1543783B4000004186001869
+S3152005EEB04BFB57E93C00000C600000069003000060
+S3152005EEC0480001F4813E00387C9C4840418500106D
+S3152005EED07C1CDA147C804840408500144BFB57BDCA
+S3152005EEE03800001690030000480001CC3ADE0004E5
+S3152005EEF07EC3B378801E00403880FFFF7F9C0214B6
+S3152005EF004BFC5A352C83FFFF418601AC811E0080C0
+S3152005EF10800800407C9B0040408500988088002022
+S3152005EF207C84E040201800007FE0C1146B1D0001A1
+S3152005EF30201D00007FA0E914408400207FC3F378BC
+S3152005EF407F85E37838C0000138E000003908007075
+S3152005EF504BFFF6597C7A1B782C9AFFFF4186015088
+S3152005EF607FC3F3787F84E3787CBCDA1438A5FFFF6A
+S3152005EF707FE6FB78811E00807FA7EB783908007035
+S3152005EF804BFFF6297C7A1B79408200287FC3F378CC
+S3152005EF907F84E3787F65DB787F26CB787F07C37808
+S3152005EFA04BFFFB6D7C7A1B787EC3B378480000F453
+S3152005EFB02C9B0000418600B02D1800007FC3F378F6
+S3152005EFC07F84E3787EA5AB787CC0002654C65FFE99
+S3152005EFD04BFFFC857C7F1B79418200D4418A00103A
+S3152005EFE02C9800014186001C48000064807F000C97
+S3152005EFF080BE003C7F24CB784BFB229148000050F5
+S3152005F0007F23CB7883BF0014809F000C57A000BEBA
+S3152005F01064003000901F001480BE003C57BD273E7B
+S3152005F0204BFB22692C9D0002418600148137008006
+S3152005F030800900543000000190090054801F0014F7
+S3152005F040392000025120E006901F0014801E003C46
+S3152005F0503B9C00017F390214377BFFFF4182000864
+S3152005F0604BFFFF5C8137008081690054800900448D
+S3152005F0707C8B0040408500287FC3F37838800000CC
+S3152005F08038A0FFFF38C00001811E008038E000004F
+S3152005F090390800684BFFF5157C7A1B78387E000405
+S3152005F0A04BFC57397F43D37848000010387E00043F
+S3152005F0B04BFC57293860FFFF8001003C8181000801
+S3152005F0C07C0803A682A1000C82C1001082E10014EF
+S3152005F0D0830100188321001C8341002083610024BD
+S3152005F0E08381002883A1002C83C1003083E100346D
+S3152005F0F07D820120382100384E8000209421FFD0C2
+S3152005F1007C0802A692C1000892E1000C930100102A
+S3152005F11093210014934100189361001C93810020CC
+S3152005F12093A1002493C1002893E1002C900100347B
+S3152005F1307C9F23787CBB2B787CD833787CFC3B78EA
+S3152005F1407C7E1B78801E004C7D1943782C80000020
+S3152005F1507D374B783AC00000835E008041860018D3
+S3152005F1604BFB55393C00000C60000006900300005F
+S3152005F17048000158801E00387C9F004040850014B9
+S3152005F1804BFB551938000016900300004800013C3A
+S3152005F190813E003C7C1BE2147C0048107C0001105B
+S3152005F1A07C0000D057690FFE7C0B4B794082000C02
+S3152005F1B02C9C0000408600144BFB54E138000016B9
+S3152005F1C090030000480001043BBE00047FA3EB78B2
+S3152005F1D0801E00403880FFFF7FFF02144BFC5759E5
+S3152005F1E02C83FFFF418600E47FC3F3787FE4FB7819
+S3152005F1F07EE5BB7838C000014BFFFA5D7C7F1B7925
+S3152005F200418200C02C990000418600102C990001EE
+S3152005F21041860020480000687F04C378807F000C63
+S3152005F2207F85E3787C63DA144BFB20614800005028
+S3152005F2307F03C3787F85E37883BF0014809F000C06
+S3152005F24057A000BE64003000901F00147C84DA1499
+S3152005F25057BD273E4BFB20352C9D000241860010CD
+S3152005F260801A005430000001901A0054801F0014A3
+S3152005F270392000025120E006901F0014801A005400
+S3152005F280813A00447C804840408500287FC3F37836
+S3152005F2903880000038A0FFFF38C00001811E00809D
+S3152005F2A038E00000390800684BFFF3017C761B78AF
+S3152005F2B0387E00044BFC55257EC3B37848000010E4
+S3152005F2C07FA3EB784BFC55153860FFFF8001003492
+S3152005F2D07C0803A682C1000882E1000C8301001088
+S3152005F2E083210014834100188361001C838100203B
+S3152005F2F083A1002483C1002883E1002C3821003016
+S3152005F3004E8000209421FFD87C0802A69301000890
+S3152005F3109321000C934100109361001493810018EA
+S3152005F32093A1001C93C1002093E100249001002C99
+S3152005F3307C781B787F1EC378801E004C2C800000AD
+S3152005F3407C9B23787CBA2B787CD933784186001828
+S3152005F3504BFB53493C00000C60000006900300005F
+S3152005F36048000164813E00387C9B48404185000C5D
+S3152005F3707C9A4840408500144BFB532138000016E3
+S3152005F38090030000480001407C1BCA147C8048403D
+S3152005F390418500107C1ACA147C804840408500149B
+S3152005F3A04BFB52F93800001690030000480001185F
+S3152005F3B0387E0004801E00403880FFFF7F7B0214C4
+S3152005F3C07F5A02144BFC55712C83FFFF418600F8AA
+S3152005F3D02C990000418600D8813800808169005427
+S3152005F3E0800900447C8B00404085002C7FC3F37840
+S3152005F3F03880000038A0FFFF38C00001811E00803C
+S3152005F40038E00000390800684BFFF1A12C83FFFF87
+S3152005F410418600AC7FC3F3787F64DB7838A0000093
+S3152005F42038C000014BFFF8317C7C1B794182009066
+S3152005F4307FC3F3787F44D37838A0000038C0000016
+S3152005F4404BFFF8157C7F1B794182007483BF00141E
+S3152005F450809F000C57A000BE64003000901F00144A
+S3152005F460807C000C80BE003C57BD273E4BFB1E1DF5
+S3152005F4702C9D0002418600148138008080090054A5
+S3152005F4803000000190090054813F00143B7B0001A8
+S3152005F4903B5A0001380000025009E006913F00144E
+S3152005F4A03739FFFF418200084BFFFF30387E0004C5
+S3152005F4B04BFC53293860000048000010387E0004B4
+S3152005F4C04BFC53193860FFFF8001002C7C0803A6EE
+S3152005F4D0830100088321000C8341001083610014F9
+S3152005F4E08381001883A1001C83C1002083E10024A9
+S3152005F4F0382100284E8000209421FFD87C0802A6BA
+S3152005F500936100149381001893A1001C93C10020D8
+S3152005F51093E100249001002C7C7F1B783D20002858
+S3152005F520817F0000812999DC7C9D23787C8B48008E
+S3152005F5307CBC2B783B60000083DF00804186003849
+S3152005F5402C8B000041860010800900247C8B00004E
+S3152005F550418600244BFB51453FA0003D63BD00017C
+S3152005F56093A300004BFB513593A300003860FFFFA2
+S3152005F570480002B0813F004C3009FFFF7D2049102D
+S3152005F5806FA0CB103160FFFF7C0B01107D2B00395E
+S3152005F5904182001C4BFB51053C00000C6000000617
+S3152005F5A0900300003860FFFF48000278387F00048A
+S3152005F5B03880FFFF4BFC53812C83FFFF4086000CD0
+S3152005F5C03860FFFF4800025C3C00CB106000000459
+S3152005F5D07C9D0000418500303C00CB106000000278
+S3152005F5E07C9D0000408402143C00CB107C9D0000CD
+S3152005F5F041860050600000017C9D00004186016423
+S3152005F600480001F83C00CB10600000307C9D0000CE
+S3152005F61041860130418500183C00CB106000001062
+S3152005F6207C9D000041860090480001D03C00CB100F
+S3152005F630600000507C9D000041860198480001BC71
+S3152005F640807E00048003002C7C0803A63C80CB101A
+S3152005F6507F85E3784E800021813E000483A9004CF6
+S3152005F6602C9D000093BF004C408600207FE3FB784D
+S3152005F670480007457C7B1B787FE3FB7838800001B3
+S3152005F6804BFFEB6593BF004C2C9BFFFF4086018803
+S3152005F6904BFB5009800300002C8000004086017832
+S3152005F6A04BFB4FF93C00000C600000069003000060
+S3152005F6B048000164801E004C2C8000004186001401
+S3152005F6C03FA00028801D97502C80000040860024EE
+S3152005F6D07FE3FB783880000038A0FFFF38C00001A3
+S3152005F6E038E00000391E00744BFFEEC148000124A6
+S3152005F6F02C9C0000408600304BFC97FD907E002414
+S3152005F700807D97504BFC8B3538600000388100088A
+S3152005F7104BFC8389807D9750808100084BFC813185
+S3152005F720480000F44BFA90697C7D1B784BFC97C901
+S3152005F7307FBCE9D67FBD1A1493BE0024480000D8A5
+S3152005F7407FE3FB783880000038A0FFFF38C0000132
+S3152005F75038E00001391E00744BFFEE51480000B415
+S3152005F7604BFC97957C7D1B784BFA90255463083C7A
+S3152005F770801E00287FA3E8507C80E84040840098BE
+S3152005F780807E00048003002C7C0803A63C80CB10D9
+S3152005F7906084000138A000004E8000217C7B1B7808
+S3152005F7A0813E00042C9BFFFF8009004C901F004CD6
+S3152005F7B0418600647FE3FB78388000014BFFEA2908
+S3152005F7C07C7B1B784BFC9731907E002848000048AF
+S3152005F7D07FE3FB7838A00000809F004038C00000FA
+S3152005F7E07C9C22144BFFF4718063000C809F003CA7
+S3152005F7F04BFBA52548000020807E00048003002CB5
+S3152005F8007C0803A67FA4EB787F85E3784E800021CC
+S3152005F8107C7B1B78387F00044BFC4FC17F63DB78EC
+S3152005F8208001002C7C0803A68361001483810018BF
+S3152005F83083A1001C83C1002083E1002438210028F0
+S3152005F8404E8000207C691B783860000071200001FD
+S3152005F8504C820020386300012C83001F5529F87E31
+S3152005F8604085FFEC4E8000203CE0CCCC80C3008058
+S3152005F87060E7CCCD812600488146004421690001F8
+S3152005F8807D6B59107D6058F8540007BC7D29583882
+S3152005F8907D2903788166001C912600487C0B48103B
+S3152005F8A07C0001107C0003B87D6B00387D20007834
+S3152005F8B07D6B0378916600488126001C8166004091
+S3152005F8C05529083C7C0A48107C0001107D4A0038E1
+S3152005F8D07D2000787D4A037891460044210B00015E
+S3152005F8E07D0841107D0040F8540007BC7D6B4038EB
+S3152005F8F0812600147D6B03785529103A7D29381603
+S3152005F900916600405529F0BE7C0950107C000110F7
+S3152005F9107C0003B87D2900387D4000787D29037851
+S3152005F92091260044800300342C8000004186002067
+S3152005F9308166004C212B00017D294910552007FEA3
+S3152005F9407D6948787C004B789006004CA8030044D6
+S3152005F950A9230046816600447C0049D67D2058109F
+S3152005F9607D2949107C0048387D6948787C004B788C
+S3152005F970900600504E8000209421FFD07C0802A6D8
+S3152005F98092E1000C93010010932100149341001875
+S3152005F9909361001C9381002093A1002493C1002824
+S3152005F9A093E1002C900100347C791B7883790080C3
+S3152005F9B0387B00084BFBA4758159005C8179003C96
+S3152005F9C07C0A5B96541AF0BE2C9A00017C00002610
+S3152005F9D0540037FE7C0000D07F5A00382C9A0080D0
+S3152005F9E07C00002654002FFE7C0000D07C0900F800
+S3152005F9F05529067E7F4000387C1A4B787C1A59D6C5
+S3152005FA00396B00187D4050507D6A5B963BC00000DF
+S3152005FA103D2000273909604439200000917B0014D8
+S3152005FA207C09402E7C8B0040408500143BDE00017E
+S3152005FA30289E0006392900184085FFE81D3E001836
+S3152005FA407D2942148009000881690004901B004421
+S3152005FA50917B00408009000C81690010901B0048AD
+S3152005FA60917B003480090014813B0034901B004CA7
+S3152005FA705529103A8019003C7D4950503000001810
+S3152005FA807D6A0396917B00147D7E5B791C0B00189D
+S3152005FA9083B900587F9D0214408100583AE0FFFF44
+S3152005FAA03B0000003BFD001092FFFFF8939FFFFCF3
+S3152005FAB0931F0000387B0008801F00047FA4EB7885
+S3152005FAC05300E006901F0004801F00043BBD00186C
+S3152005FAD054000146901F00044BFBA3CD37DEFFFFE4
+S3152005FAE08019003C3BFF00187F9C02144181FFBC16
+S3152005FAF02C9A0000935B001C4085000C939B0018F4
+S3152005FB004800000C38000000901B00188019003CA6
+S3152005FB107C1A01D6809B00347F9C0214939B00306F
+S3152005FB20807B00305484103A4BFBA1ED7F23CB78A4
+S3152005FB304BFFFD3938600000800100347C0803A6A0
+S3152005FB4082E1000C830100108321001483410018F3
+S3152005FB508361001C8381002083A1002483C10028A2
+S3152005FB6083E1002C382100304E8000209421FFD8D7
+S3152005FB707C0802A69321000C934100109361001482
+S3152005FB809381001893A1001C93C1002093E10024C2
+S3152005FB909001002C7C7F1B787C9E23783D200028B5
+S3152005FBA0817F0000812999DC7CBB2B787C8B4800E2
+S3152005FBB07CDA33787CF93B7883BF00804186003830
+S3152005FBC02C8B000041860010800900247C8B0000C8
+S3152005FBD0418600244BFB4AC53FA0003D63BD00017D
+S3152005FBE093A300004BFB4AB593A300003860FFFFA3
+S3152005FBF0480000683B9F00047F83E3783880FFFF39
+S3152005FC004BFC4D352C83FFFF4086000C3860FFFFEB
+S3152005FC10480000482C9E00004085000893DD0044DE
+S3152005FC202C9B000040850008937D00402C9A0000FF
+S3152005FC3040850008935D00482C9900004184000802
+S3152005FC40933D004C7FE3FB784BFFFC217F83E378D4
+S3152005FC504BFC4B89386000008001002C7C0803A6EC
+S3152005FC608321000C834100108361001483810018D1
+S3152005FC7083A1001C83C1002083E1002438210028AC
+S3152005FC804E8000209421FFE07C0802A69361000C9B
+S3152005FC909381001093A1001493C1001893E1001CD1
+S3152005FCA0900100247C7F1B783D200028817F000061
+S3152005FCB0812999DC7C8B48007C9B23783BC00000FE
+S3152005FCC083BF0080418600382C8B000041860010BA
+S3152005FCD0800900247C8B0000418600244BFB49BD0E
+S3152005FCE03FA0003D63BD000193A300004BFB49AD3A
+S3152005FCF093A300003860FFFF480000983B9F00044F
+S3152005FD007F83E3783880FFFF4BFC4C2D2C83FFFF48
+S3152005FD104086000C3860FFFF480000787FE3FB78BB
+S3152005FD203880000038A0FFFF38C0000138E0000108
+S3152005FD30391D00744BFFE8757C7D1B7940820014C4
+S3152005FD40807F00587F64DB784BFC088D7C7E1B7892
+S3152005FD507FC9FE707D20F2787C0048507C00FE70BD
+S3152005FD607C09E8387D3D03382C9D00004086001827
+S3152005FD7093DF0058937F005C7FE3FB7848000039CA
+S3152005FD807C7D1B787F83E3784BFC4A517FA3EB78F8
+S3152005FD90800100247C0803A68361000C8381001062
+S3152005FDA083A1001483C1001883E1001C382100209B
+S3152005FDB04E8000209421FFF07C0802A693C10008FE
+S3152005FDC093E1000C900100147C7F1B78813F008015
+S3152005FDD08129000483C9003C7FC3F3784BFFFA6968
+S3152005FDE05463063E380000017C0018307C9E0000D6
+S3152005FDF04086009C3D200027392961C8913F003067
+S3152005FE0093DF003C39600000917F0040917F004CD4
+S3152005FE103940FFFF915F0050813F0080917F00545C
+S3152005FE208129000480090034813F0080901F003419
+S3152005FE3081290004A0090044813F0080B01F0044A9
+S3152005FE408129000480090038813F0080901F0038F1
+S3152005FE5081290004A0090046813F0080B01F004685
+S3152005FE6081290004A0090048813F0080B01F004871
+S3152005FE7091690054813F00807FE3FB7891490020FA
+S3152005FE804BFFFAF938600000480000144BFB480D7B
+S3152005FE9038000016900300003860FFFF800100142B
+S3152005FEA07C0803A683C1000883E1000C38210010D5
+S3152005FEB04E8000209421FFE87C0802A69381000845
+S3152005FEC093A1000C93C1001093E100149001001C2E
+S3152005FED03D2000283B89DA44386000003D20002873
+S3152005FEE0808997547F9EE3784BFC79654BFA88A1E8
+S3152005FEF07C6316704BFC81694BFC8FFD7C7D1B78E2
+S3152005FF0083FE00002C9F0000418600B8801E002439
+S3152005FF107C80E840418500AC801F004C2C80000089
+S3152005FF20408600A0387F0004388000004BFC4A0933
+S3152005FF302C83FFFF4186008C4BFA8855801E004C8A
+S3152005FF40813E00547C0019D62C8900007C00EA14D9
+S3152005FF50901E0024418600207FE3FB783880000030
+S3152005FF6038A0FFFF38C00001811F008038E000005F
+S3152005FF7048000040801F00342C8000004186003C4C
+S3152005FF804BFA880D5463083C801E00287C63E85094
+S3152005FF907C801840408400247FE3FB78388000006D
+S3152005FFA038A0FFFF38C00001811F008038E000011E
+S3152005FFB03908006C4BFFE5F5387F00044BFC481DDE
+S3152005FFC03BDE0078381C07087C9E00404085FF34C0
+S3152005FFD04BFFFF089421FFD87C0802A69321000C2D
+S3152005FFE093410010936100149381001893A1001C7E
+S3152005FFF093C1002093E100249001002C7C9C23785A
+S315200600003B4000003BA000007C7E1B78201E0000A3
+S315200600107F20F1142C99000041860028289A000F8B
+S31520060020418502283D2000281C1A00783929DA4401
+S315200600307FC9002E2C9E00003B5A00014186FFD820
+S31520060040813E00803C60002780890010386361DC91
+S315200600504BFBC56D7FC3F3787F84E3784800FFDDCD
+S315200600602C9C0000418600D83C600027386361F04E
+S315200600704BFBC54D813E008083E900082C9F00007E
+S31520060080418600AC301CFFFF7F60E110801F001404
+S315200600905400273E2C8000013BBD000141860028E6
+S315200600A028800001418400102C8000024186001021
+S315200600B04800001C38A000204800001838A000443C
+S315200600C04800001038A000434800000838A0003F2A
+S315200600D068A000207C0000D054000FFE7F690039FE
+S315200600E0418200143C600027809F0008386362081E
+S315200600F04BFBC4CD2C9C0000418600287FA01E7099
+S315200601007C000194540018387C00E8502C800007A7
+S31520060110408600103C600027386362184BFBC4A15A
+S3152006012083FF00002C9F00004086FF643C6000276A
+S31520060130386362184BFBC4894800000C813E008058
+S3152006014083A90014813E008080A900541CC5006442
+S315200601507CC6EB963C6000273863621C7FA4EB784E
+S315200601604BFBC45D3C600027386362504BFBC45191
+S31520060170813E00803C6000278089004080A900449B
+S3152006018080C9004880E9004C386362644BFBC43161
+S31520060190813E00803C6000278089005880A9005C4B
+S315200601A0386362BC4BFBC419813E00803C60002745
+S315200601B08089003480A9003880C9003C386362E40F
+S315200601C04BFBC3FD813E008080A9006480890060C8
+S315200601D038C500011C0400647CC432147CC03396E6
+S315200601E03C600027386363084BFBC3D5813E0080FD
+S315200601F03C6000278089006880A9006C80C9007051
+S3152006020080E90074386363384BFBC3B53C6000272E
+S31520060210386362184BFBC3A93C60002738636380AA
+S315200602204BFBC39D813E0080806900047F84E37872
+S315200602304800FE093C6000273863639C4BFBC3815C
+S315200602402C9900004086FDD88001002C7C0803A648
+S315200602508321000C834100108361001483810018DA
+S3152006026083A1001C83C1002083E1002438210028B5
+S315200602704E8000209421FFD87C0802A69381001880
+S3152006028093A1001C93C1002093E100249001002C29
+S315200602907C7C1B7883FC0000881F00AF2C80000026
+S315200602A083DF00A8418601843C600027386363B853
+S315200602B03FA0002738FD63D480DF00843900000A7A
+S315200602C038A000004800E92D3C600027386363D833
+S315200602D038FD63D480DE00903900000A38A000007D
+S315200602E04800E9113C600027386363F438FD63D47F
+S315200602F080DE00943900000A38A000004800E8F5A0
+S31520060300819E009088BF00A4A01F007E3960000051
+S315200603107C0A0378392000007C6C50167C8C51D6DA
+S315200603207C0C49D67D6A59D67C6302147C635A14A2
+S315200603304800F5917C651B787C8623783C600027EF
+S315200603403863641038FD63D43900000A4800E90989
+S31520060350813F0020800900187C0803A67F83E37866
+S315200603604E8000217C6A1B783920000088BF00A4B5
+S315200603707D234B787D4453784800F5497C651B7868
+S315200603807C8623783C6000273863642C3CE0002773
+S3152006039038E764503900000A4800E8593C600027CF
+S315200603A03863645838FD63D480DE00883900000A35
+S315200603B038A000004800E83D3C6000273863646C9E
+S315200603C038FD63D480DE00843900000A38A0000098
+S315200603D04800E8213C6000273863648038FD63D4F2
+S315200603E080BE007080DE00743900000A4800E86985
+S315200603F03C6000273863649C38FD63D480DE008C1D
+S315200604003900000A38A000004800E7E93C600027CA
+S31520060410386364B838FD63D480BE007880DE007CFD
+S315200604203900000A4800E8318001002C7C0803A622
+S315200604308381001883A1001C83C1002083E1002448
+S31520060440382100284E8000209421FFF07C0802A641
+S3152006045093E1000C900100147C7F1B78813F0000FD
+S31520060460812900A8806900002C83000041860008A7
+S315200604704BFC104D813F0000806900A84BFC1041C3
+S31520060480813F000038000000900900A88001001472
+S315200604907C0803A683E1000C382100104E8000203C
+S315200604A09421FFE07C0802A693A1001493C10018AC
+S315200604B093E1001C900100247C7E1B7890C10008E5
+S315200604C083BE0000813D00A8800900A42C80000080
+S315200604D07C88237840860064288800034185001896
+S315200604E0288800024084001C2C88000141860024AE
+S315200604F0480000402C8800FF41860028480000342A
+S315200605008169000054A9103A7C69582E4800012CAE
+S315200605108169000054A9103A7CC9592E4800001456
+S31520060520809D0084806900005484103A4BFB97E92D
+S315200605303860000048000104817D00202C880002D6
+S31520060540880B003430000001541F063E4186002CDD
+S3152006055028880002418500102C8800014186005C0F
+S31520060560480000D42C880003418600302C8800FFE2
+S3152006057041860088480000C0800B00307C0803A610
+S315200605807FC3F3787FE4FB7838C100084E800021CC
+S3152006059080610008480000A454ABE8FA54AA06FE77
+S315200605A081290000386000017C0B482E7C63503080
+S315200605B07C0318384800008454AAE8FA81690000AA
+S315200605C054A006FE7D2A582E7D0000307D2903780C
+S315200605D07D2A592E813D00208009002C7FC3F37881
+S315200605E07C0803A67FE4FB787CC7337838C00040B6
+S315200605F04E80002148000044809D008480690000CA
+S315200606005484E8FE388400044BFB970D813D002078
+S315200606107FC3F3788009002C7FE4FB787C0803A649
+S3152006062038A0000038C0008038E000004E80002147
+S31520060630480000083860FFFF800100247C0803A6D6
+S3152006064083A1001483C1001883E1001C38210020F1
+S315200606504E8000209421FF387C0802A67D80002645
+S31520060660930100A8932100AC934100B0936100B496
+S31520060670938100B893A100BC93C100C093E100C446
+S31520060680900100CC918100A47C7E1B787C9D2378EA
+S315200606907CBB2B787CD93378386100187FC4F378F5
+S315200606A0813E000038A00040834900A84BFB2F5509
+S315200606B03BE100587FE3FB78809E000438A0004883
+S315200606C04BFB2F412C9D000093E1001C7F78DB78A5
+S315200606D03B9A000440860034813E00008129001C96
+S315200606E080090000386100187C0803A63C80002794
+S315200606F0388464DC38A000004E8000212C83FFFF5E
+S3152006070040860060480000CC2C9DFFFF40860048AE
+S31520060710813E00008129001C8009000038610018EE
+S315200607207C0803A63C800027388464DC38A00000B9
+S315200607304E8000212C83FFFF41860098813E0000D3
+S315200607408089000C387A000C4BFB2FE138600000BC
+S315200607504800008493BF000C38000010981F0046FE
+S3152006076038000000901C00042D9900002D19000168
+S31520060770813E00008129001C800900047C0803A60E
+S31520060780386100187F84E3787FC5F3784E80002190
+S315200607902C8300004086003C418E000C418A0018BE
+S315200607A04BFFFFD0813E00048009000C7C80C000F0
+S315200607B0480000147F63DB78389C00084BFB2F2DFE
+S315200607C02C8300004086FFAC3860000048000008F5
+S315200607D03860FFFF800100CC818100A47C0803A637
+S315200607E0830100A8832100AC834100B0836100B455
+S315200607F0838100B883A100BC83C100C083E100C405
+S315200608007D830120382100C84E8000209421FF4098
+S315200608107C0802A6932100A4934100A8936100AC0C
+S31520060820938100B093A100B493C100B893E100BCB4
+S31520060830900100C47C7C1B78813C000083C900A8FB
+S31520060840388004003B7E00F07F63DB784BFB94C93F
+S31520060850813C000488090046700900103BFE04EF1F
+S31520060860418200103BFE04EE3800002F981E04EE4F
+S31520060870386100187F84E37838A000404BFB2D852D
+S315200608803BA100587FA3EB78809C000438A0004843
+S315200608903B20FFFF3BDE000C3B80002E3B40002F1B
+S315200608A04BFB2D6193A1001C3861001880810070D6
+S315200608B080A1006438C000004BFFFD9D2C83FFFFFE
+S315200608C04086000C3860FFFF480000D87FC3F378C7
+S315200608D04BFB2E8D5463043E7C1BF8507C83000014
+S315200608E0408500447FE3FB784BFB2E75381F0001BD
+S315200608F07C651B787C0303783880002F4BFF68B510
+S315200609007C7F1B787C1BF8502C8000034085FFD803
+S315200609109F9FFFFC9B9F00019B9F00029B5F0003FE
+S31520060920480000647FC3F3784BFB2E357FE3F850EF
+S315200609307FC3F3784BFB2E297C651B787FC3F37820
+S315200609407FE4FB784BFB09458121001C80090018B2
+S315200609502C80FFFF418600309F5FFFFF808100705D
+S315200609602C8400004086000C932100704BFFFF3C30
+S315200609703861001838A1007038C10064480014ADEB
+S315200609804BFFFF287FE3FB784BFB2DD538A30001D1
+S315200609907F63DB787FE4FB784800EA213860000035
+S315200609A0800100C47C0803A6832100A4834100A8F5
+S315200609B0836100AC838100B083A100B483C100B8F3
+S315200609C083E100BC382100C04E8000209421FFD848
+S315200609D07C0802A69321000C934100109361001413
+S315200609E09381001893A1001C93C1002093E1002453
+S315200609F09001002C7C7F1B787C9D23787CDA3378CB
+S31520060A007CF93B782C8500007D1C43787D3B4B7812
+S31520060A107D5E537840860014813F0000800900A839
+S31520060A2033E004F1480000207FE3FB784BFFFDE12D
+S31520060A302C83000040860060813F0000800900A8C4
+S31520060A4033E000F03C600027386364E04BFBBB7163
+S31520060A507FA3EB787FE4FB787F45D3787F26CB7818
+S31520060A607F87E3787F68DB784BFBBB552C9E00009F
+S31520060A7041860018881E00002C8000004186000C46
+S31520060A807FC3F3784BFBBB393C600027386363D4BE
+S31520060A904BFBBB2D8001002C7C0803A68321000C72
+S31520060AA083410010836100148381001883A1001CF2
+S31520060AB083C1002083E10024382100284E800020AF
+S31520060AC09421FFF07C0802A693C1000893E1000C4E
+S31520060AD0900100147C7F1B787C9E23787CA42B783F
+S31520060AE07CC533787CE63B787D0743787D284B7832
+S31520060AF07D4953783D400027394A64E44BFFFED1B1
+S31520060B00813F0000812900A880090080300000016D
+S31520060B1090090080813F0000880900AE28800001E8
+S31520060B20408500308129001C800900087C0803A620
+S31520060B307FE3FB783880010038A000004E80002134
+S31520060B402C83FFFF4086000C3860FFFF48000028F4
+S31520060B502C9E00004186000C7FE3FB784800135943
+S31520060B60813F000480090008386000006400800088
+S31520060B7090090008800100147C0803A683C100089A
+S31520060B8083E1000C382100104E8000209421FEF8C7
+S31520060B907C0802A6936100F4938100F893A100FCD9
+S31520060BA093C1010093E101049001010C7C7F1B781F
+S31520060BB03B80000138610018388000404BFB915974
+S31520060BC03BC100587FC3F378388000484BFB9149D8
+S31520060BD09381005493C1001C801F00007FE3FB789D
+S31520060BE090010018813F000438A100E88089000C96
+S31520060BF038C100EC4800123538610018808100E8BB
+S31520060C0080A100EC38C000004BFFFA4D2C83FFFF75
+S31520060C103B6000014086000C3860FFFF480001203B
+S31520060C20813F00008129001C8009000C7C0803A650
+S31520060C307FE3FB783BA100A07FA4EB784E800021C2
+S31520060C40813F00008129001C8009000C7C0803A630
+S31520060C50386100187FA4EB7883A100C04E8000215E
+S31520060C608121001C800900182C80FFFF4186001078
+S31520060C70800100C07C9D00404184007038610018C8
+S31520060C803C8000273884650038A0000138C0000063
+S31520060C9038E0000039000000392000003D400027DA
+S31520060CA0394A65284BFFFD29386100187FE4FB7811
+S31520060CB038A000404BFB294D7FC3F378809F000464
+S31520060CC038A000484BFB293D93C1001C813F0004F8
+S31520060CD03B600000800900083B800000640080001D
+S31520060CE090090008480000307FE3FB783C80002707
+S31520060CF03884650038A0000038C0000038E00000BF
+S31520060D0039000000392000003D400027394A652871
+S31520060D104BFFFCBD386100187F64DB783CA00027BA
+S31520060D2038A565007F86E37838E0000039000000A4
+S31520060D3039200000394000004BFFFD898001010C57
+S31520060D407C0803A6836100F4838100F883A100FC56
+S31520060D5083C1010083E10104382101084E80002069
+S31520060D609421FFE87C0802A69381000893A1000C33
+S31520060D7093C1001093E100149001001C7C7E1B7821
+S31520060D80813E000480090018813E00002C80FFFF6A
+S31520060D90800900A87C9C237833A00004418600B0F5
+S31520060DA03BE00001813E00008129001C80090004E9
+S31520060DB07C0803A67FC3F3787FA4EB787F85E37848
+S31520060DC04E8000212C8300004086007C881D00086A
+S31520060DD02C80002E408600707D3FEA148809000785
+S31520060DE02C80002E40860060880900082C80000092
+S31520060DF0408600542C9F00014086001C813E00043C
+S31520060E00817C00048129000C800B000C7C89000063
+S31520060E10408600342C9F00024086001C813E00043A
+S31520060E20817C00048129000C800B00187C89000037
+S31520060E3040860014381F0001541F063E289F0002D4
+S31520060E404085FF64289F00024085000C386000001C
+S31520060E504800002C7FC3F378388000013CA0002789
+S31520060E6038A5654038C0000038E00000390000008B
+S31520060E7039200000394000004BFFFC498001001C48
+S31520060E807C0803A68381000883A1000C83C1001079
+S31520060E9083E10014382100184E8000209421FF5843
+S31520060EA07C0802A693410090936100949381009852
+S31520060EB093A1009C93C100A093E100A4900100ACED
+S31520060EC07C7E1B7838610008813E00003880004011
+S31520060ED083E900A84BFB8E413BA100487FA3EB7814
+S31520060EE0388000484BFB8E313800000190010044C3
+S31520060EF093A1000C801E000090010008813E00048C
+S31520060F00800900182C80FFFF408600208009000CEF
+S31520060F102C800000418600147FC3F37848000C75A8
+S31520060F202C83000040860158387F04F14BFB28317C
+S31520060F30386304F17F9F1A143800002F7C1F19AEE0
+S31520060F4038000000901F00087FC3F3783881000818
+S31520060F504BFFFE117C7D1B793B9C000141820018CC
+S31520060F60801F00807FA3EB7830000001901F008051
+S31520060F70480002783F400027813E00008129001C58
+S31520060F80800900047C0803A67FC3F378389F0004F3
+S31520060F9038A100084E8000212C83000040860230AE
+S31520060FA07F83E378837F00084BFB27B57C7D1B7800
+S31520060FB07F83E378389F000C4BFB2771813E000028
+S31520060FC0880900AF28800001408500343C60002750
+S31520060FD038636568389F04F14BFBB5E57F83E37874
+S31520060FE04BFB277D7C9D184041840014387A656C1E
+S31520060FF04BFBB5CD3BBDFFFF4BFFFFE48801008EC3
+S315200610007009001040820014801F008830000001FD
+S31520061010901F008848000010801F008430000001C1
+S31520061020901F0084807E00008123001C8009001406
+S315200610302C800000418600507C0803A6389F000CB1
+S315200610404E8000212C83FFFF4086003C3861000835
+S31520061050388000003CA0002738A5657038C00000FF
+S3152006106038E0000039000000392000003940000031
+S315200610704BFFFA512C83FFFF4086014C3860FFFF59
+S31520061080480001683861000848000B092C83FFFFD9
+S315200610904186FFEC800100502C8000004084003001
+S315200610A08801008E7009001040820014801F008877
+S315200610B03000FFFF901F00884800010C801F008427
+S315200610C03000FFFF901F0084480000FC817F0070DF
+S315200610D0819F0074812100488141004C7D4A60141D
+S315200610E07D295914913F0070915F0074813E00005E
+S315200610F08129001C8009000C7C0803A6386100089B
+S31520061100389F00A84E8000212C83FFFF4186FF7062
+S31520061110801F0098813F00C87C8048404084000894
+S31520061120913F0098801F009C813F00C47C804840E8
+S3152006113040840008913F009C801F00A0813F00C08C
+S315200611407C80484040840008913F00A08801008E9C
+S315200611507009001041820070881F04F02C8000144C
+S315200611604186003030000001981F04F038610008DF
+S315200611704BFFFD2D881F04F07C7D1B793000FFFF79
+S31520061180981F04F0418200407FA3EB784800005C5C
+S3152006119038610008388000013CA0002738A5658CF8
+S315200611A038C0000038E00000390000003920000071
+S315200611B0801F00803940000030000001901F00800B
+S315200611C04BFFF901937F00084BFFFDB0813E0000DF
+S315200611D0812900188009004C7C09FE707D2302783F
+S315200611E07C6348507C63FE70800100AC7C0803A6B5
+S315200611F083410090836100948381009883A1009C9B
+S3152006120083C100A083E100A4382100A84E800020D7
+S315200612109421FFE87C0802A69381000893A1000C7E
+S3152006122093C1001093E100149001001C7C7E1B786C
+S3152006123083FE000083BF00A82C9D0000408601087F
+S31520061240386009F84BFC024D2C830000907F00A8DD
+S315200612504086000C3860FFFF4800014093A300A497
+S31520061260813F00A893A900004BFBF3CD813F008464
+S315200612705520103A300000207C830040408500200F
+S315200612807D234B78388000044BFBF2F52C83000037
+S31520061290813F00A89069000040860078801F009450
+S315200612A02C80000240860040813F0020881F008255
+S315200612B0892900343000FFFF7C89000041860028FA
+S315200612C0809F0084386000045484E8FE3884000435
+S315200612D04BFBEC392C830000813F00A89069000067
+S315200612E040860024809F000C3C600027386365BC3E
+S315200612F04BFBB2CD7FC3F3784BFFF1513860FFFF2E
+S3152006130048000098813F00A838000001900900A4F3
+S31520061310881F00AF2C8000004186002C7FC3F378FF
+S315200613203C800027388465E838A0000138C00000D4
+S3152006133038E000003900000039200000394000005E
+S315200613404BFFF68D807F00A8388009F883A300001E
+S31520061350838300A44BFB89C1813F00A893A9000083
+S31520061360813F00A8938900A4813F00208009002898
+S315200613707C0803A67FE3FB78388000004E80002198
+S315200613807FC3F378388000FF38A0000038C00000FD
+S315200613904BFFF111386000008001001C7C0803A673
+S315200613A08381000883A1000C83C1001083E1001409
+S315200613B0382100184E8000209421FFE07C0802A6E2
+S315200613C09381001093A1001493C1001893E1001C89
+S315200613D0900100247C7E1B783BE000017FC3F378D6
+S315200613E04BFFFE312C83FFFF41860260813E0000C3
+S315200613F0812900A89BE904F0813E0000806900A8A7
+S315200614008089000C386304F14BFB23217FC3F378D4
+S315200614104BFFFA8D7C7C1B782C9C00024186FFC0F4
+S315200614203C600027386364E04BFBB1953BE0000047
+S315200614303FA00027813E0000806900A8386304F19A
+S315200614404BFB231D7C9F184040840018387D660C74
+S31520061450388000204BFBB1693BFF00014BFFFFD8CC
+S315200614603C600027386364E04BFBB1552C9CFFFF9C
+S31520061470418602F8386000004800E3F13C0034A1BA
+S315200614806000A1FF7C830040418500E0813E00008C
+S31520061490812900A88149009C816900A07C8A584040
+S315200614A080090098418400107C80504041840010B9
+S315200614B0480000347C8058404084002C813E000041
+S315200614C0812900A88169009C800900A07D205810EA
+S315200614D07D2949107C0048387D6948787C004B7800
+S315200614E048000010813E0000812900A88009009846
+S315200614F090010008386000004800E371800100086A
+S315200615007C80184040850064813E0000880900AF33
+S315200615102C80000041860040386000004800E34DDC
+S315200615209061000C386100084800DEF97C641B785F
+S315200615303C600027386366104BFBB0853861000C8B
+S315200615404800DEE17C641B783C6000273863662C05
+S315200615504BFBB06D380000019001000C386000008E
+S31520061560388100084BFF6F59813E000080690018BC
+S315200615708003002C7C0803A63C80CB1060840010D8
+S3152006158038A0FFFF4E8000212C83FFFF4086000CEB
+S315200615903B80FFFF480001D4813E0000806900A8F9
+S315200615A08089000C386304F14BFB2181813E0000C3
+S315200615B03C800027806900A83884663C386304F19D
+S315200615C04BFB20D57FC3F378480009912C83FFFF78
+S315200615D041860018813E0000812900A880090080E6
+S315200615E02C8000004186006C7FC3F37848000BDD13
+S315200615F0813E0000880900AE2C800001408600341A
+S315200616007FC3F3783C8000273884664C38A00001D7
+S3152006161038C0000038E000003900000039200000FC
+S31520061620394000004BFFF3A93B80FFFF4800004CE2
+S31520061630288000014085012C7FC3F3783C80002753
+S31520061640388466B4480000183860FFFF4800014C0D
+S315200616507FC3F3783C8000273884670038A00001D2
+S3152006166038C0000038E000003900000039200000AC
+S31520061670394000004BFFF359809E0000880400AED7
+S3152006168028800001408500DC8084006C2004000050
+S315200616907D2021142004FFFF216000007C0B01140D
+S315200616A07D2B0379418200BC3C6000273863671492
+S315200616B04BFBAF0D4BFC7841813E00009869006CD0
+S315200616C04BFC7835813E00005463C23E9869006D16
+S315200616D04BFC7825813E00005463843E9869006E53
+S315200616E04BFC7815813E00005463463E9869006F90
+S315200616F0817E000038E00004806B00183900000166
+S3152006170080030024392000007C0803A6808B00680D
+S31520061710A0AB00A038CB006C4E800021815E000075
+S31520061720880A006F892A006E896A006D5400C00EE9
+S315200617305529801E7C004B78556B402E892A006CD5
+S315200617407C005B787C004B78900A006C813E00001A
+S315200617503C6000278089006C386367304BFBAE619E
+S315200617607FC3F3784BFFEB117FC3F3784BFFECDD9A
+S31520061770807E000081230020800900287C0803A69D
+S31520061780388000014E8000217F80FE707C03E2783F
+S315200617907C6300507C63FE70800100247C0803A6CF
+S315200617A08381001083A1001483C1001883E1001CE5
+S315200617B0382100204E8000203D6000283D2000264E
+S315200617C0392912B8912B980C4E8000209421FFE8D7
+S315200617D07C0802A693A1000C93C1001093E1001485
+S315200617E09001001C7C7F1B787C9E23787CBD2B7801
+S315200617F0388000027FC5F37838C000004BFFECA581
+S315200618002C830000408600207FE3FB783880000189
+S315200618107FC5F3787FA6EB784BFFEC89386000000E
+S31520061820480000083860FFFF8001001C7C0803A6DC
+S3152006183083A1000C83C1001083E10014382100180F
+S315200618404E8000209421FFB07C0802A692810020BB
+S3152006185092A1002492C1002892E1002C9301003027
+S3152006186093210034934100389361003C93810040D4
+S3152006187093A1004493C1004893E1004C9001005483
+S315200618807C7C1B787C9723787CBF2B787CDE337810
+S31520061890817C00043B600000880B00463B4000002C
+S315200618A070090010829C00003B20000182D4002093
+S315200618B04082003CA014007EA134007C7C0049D6E0
+S315200618C0812B0000814B00047C06037838A000009B
+S315200618D07D4A30147D292914308AFFFF7C6901D47C
+S315200618E04800E0617C952378480000083AA0FFFF6F
+S315200618F093C100187C95C8003B0000087EFDBB7886
+S3152006190083C100184086002C3D2000273B69673896
+S315200619107EFABB78480000AC7F83E37838800001E6
+S315200619207FE5FB787EE6BB784BFFEB794800009493
+S315200619307F83E3787FE4FB787EE5BB784BFFFE91D9
+S315200619402C830000418600307F83E37838800002AE
+S315200619507FE5FB7838C000004BFFEB493C00C00012
+S315200619607C8300004186FFB43D2000273B696764DF
+S315200619704800004C801600307F83E3787C0803A657
+S315200619807FC5F3788896003438C100184E8000212A
+S315200619907C781B782C9800083B3900014086002469
+S315200619A07C95C8007FFDFB787FDFF37883C100181E
+S315200619B04086FF803D2000273B6967387FBAEB7853
+S315200619C03818FFFF2880001F418500C83D200026C5
+S315200619D0392918F05400103A7C09002E3D2000269D
+S315200619E0392918F07C004A147C0903A64E80042067
+S315200619F000000094000000A0000000A00000008067
+S31520061A00000000A0000000A0000000A0000000A02A
+S31520061A10000000A0000000A0000000A0000000A01A
+S31520061A20000000A0000000A0000000A00000009416
+S31520061A30000000A0000000A0000000A0000000A0FA
+S31520061A40000000A0000000A0000000A0000000A0EA
+S31520061A50000000A0000000A0000000A0000000A0DA
+S31520061A60000000A0000000A0000000A000000094D6
+S31520061A703D2000273B69678C7FBAEB783B39FFFF11
+S31520061A80480000103D2000273B69678C7FFAFB78CB
+S31520061A902C9B0000418600387F83E3787F64DB78C1
+S31520061AA038A0000038C0000038E0000039000000E9
+S31520061AB039200000394000004BFFEF15813400A87D
+S31520061AC08009008030000001900900802C9A0000D1
+S31520061AD041860030881400AE288000014085002407
+S31520061AE07F83E3788016002C7F45D3787C0803A66F
+S31520061AF038C000028896003438E000004E80002167
+S31520061B00813C0004880900467D35C8107D29491088
+S31520061B107D2900D0680000105400E7FE7C0B48396A
+S31520061B204182002C7F83E378388000013CA0002781
+S31520061B3038A567B038C0000038E00000390000003C
+S31520061B4039200000394000004BFFEF797F23CB7800
+S31520061B50800100547C0803A68281002082A10024ED
+S31520061B6082C1002882E1002C8301003083210034C3
+S31520061B70834100388361003C8381004083A1004471
+S31520061B8083C1004883E1004C382100504E80002056
+S31520061B909421FFD07C0802A69321001493410018B5
+S31520061BA09361001C9381002093A1002493C10028F1
+S31520061BB093E1002C900100347C7F1B7838000000CE
+S31520061BC09001000C38C10008837F0000839F000423
+S31520061BD083DB0020813F0004801E0030835C000CDE
+S31520061BE07C0803A683290018889E00347F45D3786F
+S31520061BF04E8000217C7D1B782C9D00084186004462
+S31520061C002C9D000140860028881C0046700900107D
+S31520061C104082001C801C00002C800000408600109C
+S31520061C20801C00042C800000418601D07FE3FB78CF
+S31520061C30388000003CA0002738A567DC4800014C08
+S31520061C40801E00307FE3FB787C0803A6889E00343E
+S31520061C5080A1000838C1000C4E8000217C7D1B78AF
+S31520061C6073A0000A408200842C9D0004408600183A
+S31520061C707FE3FB78388000003CA0002738A567DC88
+S31520061C80480001087FE3FB783C800027388467DC20
+S31520061C9038A0000038C0000038E0000039000000F7
+S31520061CA039200000394000004BFFED25813B00A876
+S31520061CB0800900803000000190090080881B00AE54
+S31520061CC028800001408500247FE3FB78801E002CB7
+S31520061CD07F45D3787C0803A638C00002889E003448
+S31520061CE038E000004E8000212C9D000841860054D5
+S31520061CF0881C00467009001040820048A01B007E02
+S31520061D00A13B007C7C0049D67C0A03787C09FE70C0
+S31520061D10801C00007C8048004185001440860024F3
+S31520061D20801C00047C805040408500187FE3FB78A9
+S31520061D30388000003CA0002738A567B04800004C34
+S31520061D407FE3FB787F44D378673E80007FC5F378B0
+S31520061D504BFFFA7D2C830000418600747FE3FB78D7
+S31520061D60388000027F45D37838C000004BFFE73520
+S31520061D702C830000418400307FE3FB783880000006
+S31520061D803CA0002738A5676438C0000038E000006C
+S31520061D903900000039200000394000004BFFED25B0
+S31520061DA04800005C7FE3FB784BFFEDE5801C0008CE
+S31520061DB02C800000418400447FE3FB7838800001B4
+S31520061DC07F45D3787FC6F3784BFFE6D92C9D00084E
+S31520061DD0408600287FE3FB7880A1000880C1000C9E
+S31520061DE07F44D3784BFFFA612C83FFFF4086000C95
+S31520061DF03860FFFF48000008386000008001003484
+S31520061E007C0803A683210014834100188361001CE5
+S31520061E108381002083A1002483C1002883E1002C2E
+S31520061E20382100304E8000209421FFE87C0802A647
+S31520061E309381000893A1000C93C1001093E100142E
+S31520061E409001001C7C7E1B787C9F23787CBC2B789B
+S31520061E507CDD3378388000027FE5FB7838C00000C9
+S31520061E604BFFE6417C631B794180001C7C7F1B78F7
+S31520061E707FC3F378388000027FE5FB7838C0000000
+S31520061E804BFFE62193FD00005460007E901C000067
+S31520061E90386000008001001C7C0803A683810008A8
+S31520061EA083A1000C83C1001083E100143821001899
+S31520061EB04E8000209421FFE07C0802A693A1001400
+S31520061EC093C1001893E1001C900100247C7E1B78A8
+S31520061ED0813E0000817E000483A9002083EB000C4E
+S31520061EE0801D00307FC3F3787C0803A67FE5FB7848
+S31520061EF0889D003438C100084E8000212C830008B6
+S31520061F004086003C7FC3F378388000027FE5FB7865
+S31520061F1038C000004BFFE58D2C830000418600204B
+S31520061F207FC3F378388000017FE5FB7838C0000050
+S31520061F304BFFE57183E100084BFFFFA880010024D3
+S31520061F407C0803A683A1001483C1001883E1001C24
+S31520061F50382100204E8000209421FFC07C0802A64E
+S31520061F609281001092A1001492C1001892E1001CE1
+S31520061F709301002093210024934100289361002C8D
+S31520061F809381003093A1003493C1003893E1003C3D
+S31520061F90900100447C7F1B783AC0000082FF000037
+S31520061FA03B400000801700843B8000027C9C00405A
+S31520061FB03B0000008337002083D700A8408401A871
+S31520061FC03D2000263A891F583D2000263AA91F584B
+S31520061FD07FE3FB78388000037F85E37838C00000EE
+S31520061FE04BFFE4C12C8300004086016883BF003086
+S31520061FF0931F0030801900307FE3FB787C0803A608
+S315200620007F85E3788899003438C100084E80002100
+S31520062010801900307FE3FB787C0803A68899003474
+S3152006202080A1000838C1000C4E8000217C7B1B78DD
+S31520062030381BFFFF2880001F831F003093BF003008
+S31520062040418501105400103A7C14002E7C00AA14F7
+S315200620507C0903A64E800420000000EC00000080C8
+S31520062060000000F8000000DC000000F8000000F880
+S31520062070000000F800000080000000F8000000F8CC
+S31520062080000000F8000000F8000000F8000000F844
+S31520062090000000F800000080000000F8000000F8AC
+S315200620A0000000F8000000F8000000F8000000F824
+S315200620B0000000F8000000F8000000F8000000F814
+S315200620C0000000F8000000F8000000F8000000F804
+S315200620D0000000F8000000807FE3FB7838800001CE
+S315200620E07F85E3783CC0C000813E008C801E008040
+S315200620F039290001913E008C30000001901E008097
+S315200621004BFFE3A12C9B00083AC0FFFF4086002028
+S315200621107FE3FB7880A1000880C1000C7F84E378EA
+S315200621204BFFF7257F5A1A14480000283B5A000110
+S3152006213048000020801E009430000001901E009466
+S3152006214048000010801E009030000001901E00906E
+S31520062150813F0000800900843B9C00017C9C004056
+S315200621604184FE70A017007EA177007C7C1A01D6DA
+S315200621707C0059D67EC3B3787C0A037839200000C2
+S31520062180913E0078915E007C800100447C0803A67F
+S315200621908281001082A1001482C1001882E1001CEF
+S315200621A08301002083210024834100288361002C9B
+S315200621B08381003083A1003483C1003883E1003C4B
+S315200621C0382100404E8000209421FFE07C0802A69C
+S315200621D09381001093A1001493C1001893E1001C6B
+S315200621E0900100247C7D1B78813D0000880900AE85
+S315200621F02880000183E90020408500DC80090084D0
+S315200622003B8000027C9C0040408400CC7FA3EB7878
+S31520062210388000027F85E37838C000004BFFE285D0
+S315200622203C00C0007C8300007F9EE37840860094B5
+S31520062230801F00307FA3EB787C0803A67F85E37892
+S31520062240889F003438C100084E800021801F003048
+S315200622507FA3EB787C0803A6889F003480A100081C
+S3152006226038C1000C4E8000212C830008408600349D
+S315200622707FA3EB78801F002C7FC5F3787C0803A606
+S3152006228038C00001889F003438E000004E800021C7
+S315200622908001000C83C10008900100084BFFFFB0A7
+S315200622A07FA3EB78801F002C7FC5F3787C0803A6D6
+S315200622B038C00001889F003438E000004E80002197
+S315200622C0813D0000800900843B9C00017C9C0040E7
+S315200622D04184FF3C38600000800100247C0803A668
+S315200622E08381001083A1001483C1001883E1001C9A
+S315200622F0382100204E8000209421FFF07C0802A67B
+S3152006230093E1000C900100147C842379812300003C
+S315200623108143000480C9001C38AA00183BE6004CFD
+S31520062320408200583960FFFF916A00183900000084
+S3152006233038E0000080060020812300049003001860
+S315200623408006002490E300089103000C9003001CED
+S315200623503800001098090046812300048006005C98
+S315200623609009000C91650004916500089083002071
+S315200623709085001448000168800A000C900A00180F
+S3152006238080030018900500048003000C39800000A5
+S31520062390900500088003002039600000900500148F
+S315200623A03800000090030020916300089183000CFA
+S315200623B0900300189003001C881F00038123000445
+S315200623C07C0400AE9809004681230000897F000A16
+S315200623D081430004800900947D245A142C8000022F
+S315200623E0880900017D2458AE5400402E7D2B0378A3
+S315200623F040860028881F000B7D24021489290001A7
+S315200624007C0400AE5529402E7C004B785400801E55
+S315200624107D2B0214480000087D695B78912A000C02
+S3152006242088FF000C7D043A14880800038968000298
+S31520062430890800015400C00E556B801E7C005B780F
+S315200624405508402E7D6438AE7C0043787C005B7848
+S315200624507C0A03788163000439200000912B000052
+S31520062460914B0004899F000D2C8C00FF418600703D
+S315200624707CA462148965000389050002880500018B
+S31520062480556BC00E5508801E7D6B43785400402E32
+S315200624907D6B03787C0460AE891F000E7D6B037806
+S315200624A0550818383800FFFF7C0040307D600078DC
+S315200624B07C0A037839200000816300047D46537820
+S315200624C0812B0000814B000438E000007D4A381439
+S315200624D07D293114912B0000914B00043863002886
+S315200624E0388000104BFB7831800100147C0803A647
+S315200624F083E1000C382100104E8000209421FFF83D
+S315200625007C0802A69001000C398000003960000084
+S3152006251081230000380000008149001C91630008D1
+S315200625209183000C9003001C81230004900300185D
+S31520062530800900182C80FFFF40860024800A00248C
+S315200625402C80000041860018800A0020900300187F
+S31520062550800A00249003001C4800002081230000E6
+S31520062560812900208009000C7C0803A63880FFFFFD
+S3152006257038A000004E8000218001000C7C0803A6AE
+S31520062580382100084E8000209421FFF87C0802A6F8
+S315200625909001000C38000000900500008804000019
+S315200625A02C80000038600000418601B8540A063E99
+S315200625B06949002F200900007D2049146940005CE6
+S315200625C0216000007C0B01147D2B037940820034A8
+S315200625D02C8A002E4086008489440001200A0000A9
+S315200625E07D2051146940002F216000007C0B0114C8
+S315200625F07D2B03794082000C2C8A005C4086000CD9
+S3152006260038840001480001242C8A002E4086004C7E
+S3152006261089440002200A00007D2051146940002FBB
+S31520062620216000007C0B01147D2B03794082000C6F
+S315200626302C8A005C408600243003FFFF7C000110B4
+S315200626403923FFFF7C6B00387D2300787D631B785A
+S3152006265038840002480000D428830013418500D818
+S31520062660546918387C89292E7D292A1438000000B9
+S315200626709009000888E4000054E0063E6809002F09
+S315200626807D2900D055290FFE6800005C7C0000D00D
+S3152006269054000FFE7D2B003938C0000041820068A9
+S315200626A054E0063E2C8000004186005C680B002E16
+S315200626B07D6B00D0556B0FFE6800002021200000A0
+S315200626C07C0901147D6B0378316BFFFF7D6B5910F6
+S315200626D07C8858788CE4000154E0063E6809002F71
+S315200626E07D2900D055290FFE6800005C7C0000D0AD
+S315200626F054000FFE7D2A00397CCB58387D664378F8
+S315200627004082FFA02C8600004186003C546918387A
+S315200627107D292A14A0090002386300013000FFFF34
+S315200627207C003050B0090004880400002C8000008C
+S315200627304086FE7C880400002C800000408600141B
+S31520062740480000203C600038606307004800000C03
+S315200627503C60003860631F004BFB1FB53860FFFFE7
+S315200627608001000C7C0803A6382100084E80002034
+S315200627709421FFB07C0802A693A1004493C1004889
+S3152006278093E1004C900100547C7E1B787C9D237837
+S315200627907CBF2B78386100183880000038A00024CA
+S315200627A04BFB0EA92C9F0002394000003960000021
+S315200627B041860030289F0002418500102C9F00018B
+S315200627C041860014480000302C9F000441860020D4
+S315200627D048000024895E0050897E00514800001872
+S315200627E0895E0052897E00534800000C895E00549B
+S315200627F0897E00552C8B00FF418600387D3D5A1474
+S31520062800880900017D3D58AE5400402E7D29037867
+S31520062810552006FE900100245520DF3E3000FFFF9E
+S31520062820900100285520BA7E300000509001002CD9
+S315200628302C8A00FF418600307D3D5214880900010E
+S315200628407D3D50AE5400402E7D29037855200EBC82
+S31520062850900100185520DEBE9001001C5520AAFEC8
+S3152006286090010020386100184BFF4AB180010054C0
+S315200628707C0803A683A1004483C1004883E1004C5B
+S31520062880382100504E8000209421FFB87C0802A6ED
+S3152006289093A1003C93C1004093E100449001004C73
+S315200628A07C7F1B787C9E23787CBD2B7890C100305C
+S315200628B038610030388100084800CF0181210008A0
+S315200628C08801000F8161000C8141001C7D290E7054
+S315200628D0540028347D28037899010034556B283412
+S315200628E07D295B78800100102C8A005054005828D8
+S315200628F07D2903785529C23E992100358921001B59
+S315200629008801001739290001552928347C004B787F
+S3152006291098010036812100187C00002654002FFEDF
+S315200629207C0000D0700B00507D4000787D6B0378CC
+S315200629309161001C3929000155292834396BFFB0CD
+S3152006294080010014556B482C7C004B7873A9000136
+S315200629507C005B785400C23E9801003741820044D1
+S31520062960881F00512C8000FF41860038881F0050A2
+S315200629707D1E01AE893F0050880100357D29F2145F
+S3152006298098090001893F0051880100367C1E49AE10
+S31520062990893F0051880100377D29F21498090001E4
+S315200629A073A0000241820048881F00532C8000FF36
+S315200629B04186003C893F0052880100347C1E49AE80
+S315200629C0893F0052880100357D29F21498090001B5
+S315200629D0893F0053880100367C1E49AE893F005345
+S315200629E0880100377D29F2149809000173A0000496
+S315200629F041820050881F00552C8000FF41860044E6
+S31520062A00893F00542C8900FF4186001C880100342A
+S31520062A107C1E49AE893F0054880100357D29F21473
+S31520062A2098090001893F0055880100367C1E49AE6B
+S31520062A30893F0055880100377D29F214980900013F
+S31520062A408001004C7C0803A683A1003C83C100407C
+S31520062A5083E10044382100484E8000209421FFE07F
+S31520062A607C0802A69361000C9381001093A10014A2
+S31520062A7093C1001893E1001C900100247C7E1B78EC
+S31520062A80801E00482C8000007C9D23787CBF2B78F6
+S31520062A908B7E004E408600103D2000273B8967FC32
+S31520062AA04800000C3D2000273B8968807FE3FB78A1
+S31520062AB0881E004D889E004E38A000207C80221459
+S31520062AC04BFAE9ED390000002F1B0000815D00005E
+S31520062AD0881E004DA17D00047D2058107D294910B1
+S31520062AE07D294BB87C0048387D6948787C004B7830
+S31520062AF07C8800004084004C419A0010880A000019
+S31520062B002C80002E4186003C892A000071200080F8
+S31520062B104182000C993F0000480000185520063EC9
+S31520062B207C1C00AE2C80007C981F0000418600B4D9
+S31520062B30390800013BFF0001394A00014BFFFF948B
+S31520062B40A01D00047C880000418600902C9B000076
+S31520062B5041860090880A00002C80002E408600843C
+S31520062B60394A000139600000881E004D7C8BD8004A
+S31520062B707C0800507FFF021439080001408400506B
+S31520062B80A01D00047C88000040840050892A00008D
+S31520062B90712000804182000C993F000048000018F1
+S31520062BA05520063E7C1C00AE2C80007C981F00001B
+S31520062BB041860030396B00017C8BD800390800012C
+S31520062BC03BFF0001394A00014184FFB8A01D0004DD
+S31520062BD07C8800004184000C386000004800001400
+S31520062BE03C600038606307004BFB1B253860FFFFFF
+S31520062BF0800100247C0803A68361000C83810010D3
+S31520062C0083A1001483C1001883E1001C382100200B
+S31520062C104E8000209421FF987C0802A693810058B6
+S31520062C2093A1005C93C1006093E100649001006C5F
+S31520062C307C7F1B787C9C23782C850003813F0000B3
+S31520062C40801F00048129001C33C000188BA9004C64
+S31520062C504086003C386100187FE4FB7838A00040A7
+S31520062C604BFB09A1801E000490010030801E00083F
+S31520062C707C0A03787C09FE7091210020914100246C
+S31520062C80801E001490010038480000D82C850001CB
+S31520062C90418600D02C850000408600107FE3FB7815
+S31520062CA04BFFF85D480000702C85000240860068C0
+S31520062CB07FAAEB783920000080FF0008811F000CD0
+S31520062CC07D4A40147D293914811F0000913F000852
+S31520062CD0915F000CA008007C3000FFFF7C0C037877
+S31520062CE07C0BFE707D2758387D4860382C8700007F
+S31520062CF0408600242C8800004086001C801F001871
+S31520062D00813F001C30000001901F00183929FFFF63
+S31520062D10913F001C83DF001C2C9E00004086003459
+S31520062D20813F000081290020800900007C0803A637
+S31520062D307FE3FB78388000004E8000212C83FFFF3E
+S31520062D404086000C3860FFFF4800005C93DF0020B9
+S31520062D50386100187FE4FB7838A000404BFB08A5B5
+S31520062D607F86E3788121001880010024A0A9007CB3
+S31520062D708069001838A5FFFF7C05283880030024C3
+S31520062D807FA7EB787C0803A63900000080810030F7
+S31520062D90392100384E8000212063FFFF3063FFFF74
+S31520062DA07C6319108001006C7C0803A68381005879
+S31520062DB083A1005C83C1006083E10064382100683A
+S31520062DC04E8000209421FF707C0802A69321007471
+S31520062DD0934100789361007C9381008093A10084BF
+S31520062DE093C1008893E1008C900100947C7F1B7828
+S31520062DF07CBD2B78813F000038A100088349001C42
+S31520062E0038000000897A004D893A004E901D00044C
+S31520062E10901D00087F43D3787F2B4A144BFFFC4135
+S31520062E202C83FFFF418600E87FE3FB78388100305C
+S31520062E3038A000004BFFFDE17C7E1B782C9EFFFF11
+S31520062E403B600000418600C83B810008896100304E
+S31520062E502C8B00004186006C893A004F7D3C4A1433
+S31520062E608809002870090008408200382C8B00E566
+S31520062E7040860018801F0018901D0004801F000C35
+S31520062E80901D00084800001C7F83E37838810030B7
+S31520062E907F25CB784BFB6DAD2C8300004186002425
+S31520062EA07FE3FB783881003038A000024BFFFD69AE
+S31520062EB07C7E1B782C9EFFFF3B7B00014086FF9085
+S31520062EC02C9EFFFF41860048813F0004800900189A
+S31520062ED02C80FFFF40860010801A00607C9B0040F5
+S31520062EE04185002C880100302C8000004086002871
+S31520062EF0801D00042C80000040860014801F0018C8
+S31520062F00901D0004801F000C901D00083860FFFFEE
+S31520062F10480000147FE3FB78388100304BFFF3DD51
+S31520062F2038600000800100947C0803A68321007483
+S31520062F30834100788361007C8381008083A100849D
+S31520062F4083C1008883E1008C382100904E800020C2
+S31520062F509421FFF07C0802A693C1000893E1000C99
+S31520062F60900100147C7E1B78813E0000812900207A
+S31520062F70800900007C0803A63C808000608400014E
+S31520062F804E8000212C83FFFF4086000C3860FFFF11
+S31520062F904800005C83FE0018801E001C7C1F02145D
+S31520062FA07C9F004040840044813E000080690018D2
+S31520062FB08003002C7C0803A63C80CB10608400503E
+S31520062FC07FE5FB784E8000212C83FFFF4186FFC0DC
+S31520062FD0801E0018813E001C3BFF00017C004A141F
+S31520062FE07C9F00404184FFC43860000080010014A5
+S31520062FF07C0803A683C1000883E1000C3821001053
+S315200630004E8000209421FF987C0802A693610054E6
+S315200630109381005893A1005C93C1006093E10064FC
+S315200630209001006C7C7F1B787C9B23787CBC2B785C
+S315200630302C9C0000813F00007F83E37883C9001C17
+S315200630404086000C386000004800C821813F0004F5
+S31520063050800900182C80FFFF7C7C1B784086001890
+S315200630607360000241820008939E00643860000067
+S31520063070480001C47FE3FB783881000838A00003A6
+S315200630804BFFFB952C83FFFF4086000C3860FFFF25
+S31520063090480001A47360010041820010380000E553
+S315200630A09801000848000154813F0004897E004F9C
+S315200630B0880900463BA100087C1D59AE813F0004C5
+S315200630C0897E00568809000F7C1D59AE813F000473
+S315200630D08009000C893E00565400C23E7D3D4A14A6
+S315200630E098090001813F0004897E00578809000D52
+S315200630F07C1D59AE817F0004893E0057880B000C43
+S315200631007D3D4A1498090001813F0004897E0058B6
+S31520063110880900077C1D59AE813F0004816900009D
+S31520063120818900045568C00E5580C23E7D0A037803
+S315200631307D694670897E00587D7D5A14994B00011B
+S31520063140813F000481690000818900045568801E3C
+S315200631505580843E7D0A03787D698670897E00586F
+S315200631607D7D5A14994B0002813F00048169000037
+S31520063170818900045568402E5580463E7D0A03788F
+S315200631807D69C670897E00587D7D5A14994B000349
+S31520063190881E00592C8000FF4186004C817F000442
+S315200631A0818B0004816B0000386100487D6A5B785C
+S315200631B07D69FE707D405378980100485409C23EC9
+S315200631C0992100495409843E9921004A5400463ED5
+S315200631D09801004B889E005988BE005A7C9D221471
+S315200631E04BFAE0A97FC3F3787FA4EB787F65DB787B
+S315200631F07F86E3784BFFF69538C10008817F00006D
+S31520063200813F0004806B0018A0AB007C800900205B
+S3152006321038A5FFFF7C0528388003002439000001E5
+S315200632207C0803A688FE004C8089001C3929002CC0
+S315200632304E8000218001006C7C0803A68361005421
+S315200632408381005883A1005C83C1006083E100640A
+S31520063250382100684E8000209421FF807C0802A633
+S315200632609301006093210064934100689361006C8A
+S315200632709381007093A1007493C1007893E1007C3A
+S31520063280900100847C7F1B787C9823787CBA2B78E7
+S315200632907CDE3378386100183880000038A000407C
+S315200632A0801F0004813F00003380001883A9001C7C
+S315200632B04BFB0399815F0004880A004670090001CA
+S315200632C08B7D004C418200103C60003860632100F3
+S315200632D04800009057400426680980007D2900D0C2
+S315200632E055290FFE680040007C0000D054000FFED2
+S315200632F07D2B0039418200103C60003860638016C1
+S31520063300480000607FA3EB787F04C378800A001804
+S3152006331038A100182320FFFF213900007F29C91470
+S315200633204BFFF73D2C83FFFF4186003C801E0004A1
+S315200633302C80000040860058813F00048009001832
+S315200633402C80FFFF40860028801D00603920FFFE66
+S315200633507C804840418500183C60003860630D003B
+S315200633604BFB13AD3860FFFF480003907FE3FB78E5
+S315200633704BFFFBE12C83FFFF4186FFEC801F0018E5
+S31520063380901E0004801F000C901E00083860000066
+S315200633904800C4D97C651B787FE3FB783880000219
+S315200633A04BFFFC65386000004800C4C17C661B786C
+S315200633B07FA3EB783881001838A000014BFFF4CDA7
+S315200633C07FE3FB7838810018801E0004817C001478
+S315200633D0901F0018801E0008916100587C0A037809
+S315200633E07C09FE70913F0008915F000C4BFFEF0DA4
+S315200633F03920000061298000574004267C80480039
+S315200634004086004038C100187F67DB783900000106
+S31520063410817F000039210058806B0018A0AB007C04
+S3152006342081630024809E00047D6803A6801E000812
+S3152006343038A5FFFF7C0528384E800021480002BCAF
+S3152006344039600010881D004F3BC100187D7E01AEF5
+S31520063450813F00047FE3FB78996900464BFFFAF526
+S315200634602C83FFFF4186FF00813F0004897D00569D
+S315200634708809000F7C1E59AE813F00048009000C86
+S31520063480893D00565400C23E7D3E4A1498090001E5
+S31520063490813F0004897D00578809000D7FC3F37894
+S315200634A07C1E59AE817F0004893D0057880B000C8F
+S315200634B07D3E4A1498090001881D004D889D004EC0
+S315200634C038A000207C8022144BFADFE53800002E37
+S315200634D098010018817F000038A00000806B001834
+S315200634E07FC6F378800300247F67DB787C0803A6F3
+S315200634F039000001809F0018393C00144E800021B7
+S315200635002C83FFFF4186FE607F6ADB783920000028
+S3152006351080FF0008811F000C7D4A40147D2939143E
+S31520063520811F0000913F0008915F000CA008007CD7
+S315200635303000FFFF7C0C03787C0BFE707D27583805
+S315200635407D4860382C870000408600242C880000A1
+S315200635504086001C801F001C813F00183000FFFF9C
+S31520063560901F001C39290001913F0018801F001C5E
+S315200635702C800000408600147FE3FB784BFFF9D5AC
+S315200635802C83FFFF4186FDE02C99000041860038FA
+S3152006359039400000881D0056396100187D4B01AE62
+S315200635A0893D00567D2B4A1499490001881D0057EE
+S315200635B07D4B01AE881D00577D6B0214994B000189
+S315200635C048000044893D0056881C000339610018CE
+S315200635D07C0B49AE801C0000893D00565400C23E35
+S315200635E07D2B4A1498090001893D0057881C000145
+S315200635F07C0B49AE881D0057893C00007D6B021462
+S31520063600992B00013800002E9801001938C10018A0
+S315200636107F67DB78390000013BDC0014817F0000E0
+S315200636207FC9F378806B0018A0AB007C81630024E9
+S31520063630809F00187D6803A6801F000C38A5FFFF13
+S315200636407C0528384E8000212C83FFFF4186FD18F5
+S315200636507FE3FB784BFFEEA97FA3EB787F04C37845
+S3152006366038A100184BFFF3F9813F0004897D0056E7
+S315200636708809000F38C100187C0659AE813F000420
+S315200636807F67DB788009000C893D00565400C23ED0
+S315200636907D264A1498090001813F0004897D00573A
+S315200636A08809000D390000017C0659AE817F000489
+S315200636B0881D0057894B000C7D660214994B000124
+S315200636C0817F00007FC9F378806B0018A0AB007C51
+S315200636D081630024809C00047D6803A6801C000864
+S315200636E038A5FFFF7C0528384E8000212063FFFF82
+S315200636F03063FFFF7C631910800100847C0803A6D3
+S315200637008301006083210064834100688361006C25
+S315200637108381007083A1007483C1007883E1007CD5
+S31520063720382100804E8000207CA92B7838E00000C6
+S315200637308903004D38C000003980002E394000002C
+S315200637407C8A4000408400388804000038840001C2
+S31520063750394A00017C8A400098090000680000204A
+S315200637603000FFFF7C000110392900017CAB0038B0
+S315200637707D2500787D652B784184FFD08803004E11
+S315200637802C800000418600402C87000041860018C8
+S31520063790380700017C8028004086001C7CE53B78A3
+S315200637A0480000247CA72B789985000038A50001BF
+S315200637B07CA92B7838C600012C8600018903004E89
+S315200637C04085FF7C38000000980500004E800020CA
+S315200637D09421FF907C0802A69361005C9381006089
+S315200637E093A1006493C1006893E1006C9001007474
+S315200637F07C9C2378801C00047C7F1B782C80FFFF12
+S31520063800813F00007CBE2B7883A9001C4086000CD5
+S315200638103860FFFF48000100813F0008815F000CE9
+S3152006382039600000554C077E2C8B00004086000C24
+S315200638302C8C0000418600183C6000386063801698
+S315200638404BFB0ECD3860FFFF480000CC7C09FE708E
+S315200638507D2002787C004850540517BC3B61001831
+S315200638607FE3FB78388100184BFFF3AD2C83FFFFEF
+S315200638704186003C896100182C8B00E538A00002A1
+S315200638804186FFE0881D004F7C1B00AE70090008AC
+S315200638904082FFD02C8B0000408600203800FFFF98
+S315200638A0901C00043860FFFF4800006C907C0004E2
+S315200638B03860FFFF480000607FA3EB783881001848
+S315200638C038BC00084BFFFE652C9E0000418600385A
+S315200638D07FC3F3787FE4FB7838A0004083BE0004DC
+S315200638E04BFAFD2138A0004893BE0004809F0004B1
+S315200638F07FA3EB784BFAFD0D7FC3F378388100184A
+S315200639004BFFE9F9801F000C3860000060000001BB
+S31520063910901C0004800100747C0803A68361005C69
+S315200639208381006083A1006483C1006883E1006C03
+S31520063930382100704E8000209421FF287C0802A69C
+S31520063940934100C0936100C4938100C893A100CC23
+S3152006395093C100D093E100D4900100DC7C7E1B78D5
+S31520063960807E00007CBA2B7838A100084BFFEC1D20
+S315200639707C7D1B782C9DFFFF418600E47FC3F37870
+S31520063980388000004BFFE9754BFB0D1D7C7B1B78B1
+S31520063990386000004BFB0D793BE000007C9FE80079
+S315200639A0408400543B810008813E00048809004675
+S315200639B070090010418200407FC3F37857E4183817
+S315200639C07C9C221438A100B04BFFF3FD2C83FFFF0D
+S315200639D0408600144BFB0CD12C8300004186001830
+S315200639E04800007C381F0001541F063E7C9FE800D5
+S315200639F04184FFB84BFB0CB12C8300004086000C9B
+S31520063A007F63DB784BFB0D097C9FE8004186003CF3
+S31520063A10381DFFFF7C9F0000408600387340020059
+S31520063A20418200307FC3F37857E4183838010008FE
+S31520063A307C8022147F45D37838C100B04BFFF81D11
+S31520063A402C830000408600183860000048000014C9
+S31520063A503C600038606380024BFB0CB53860FFFF84
+S31520063A60800100DC7C0803A6834100C0836100C474
+S31520063A70838100C883A100CC83C100D083E100D412
+S31520063A80382100D84E8000209421FFB07C0802A65B
+S31520063A9093C1004893E1004C900100548123000411
+S31520063AA0800900182C80FFFF812300007C9E237846
+S31520063AB083E9001C40860014801F006438600000DD
+S31520063AC0901E001C480000603881000838A00003BC
+S31520063AD04BFFF1452C83FFFF418600487FE3FB78A9
+S31520063AE03881000838A000014BFFEC89907E002023
+S31520063AF07FE3FB783881000838A000024BFFEC757F
+S31520063B00907E001C7FE3FB783881000838A00004ED
+S31520063B104BFFEC61907E00183860000048000008D4
+S31520063B203860FFFF800100547C0803A683C1004845
+S31520063B3083E1004C382100504E8000209421FF1846
+S31520063B407C0802A6934100D0936100D4938100D8C5
+S31520063B5093A100DC93C100E093E100E4900100EC20
+S31520063B607C7A1B787C9E23787CBB2B78381BFFDFE0
+S31520063B7028800001839A001C3D20002739296904E4
+S31520063B80408500103C600038606380164800011CA2
+S31520063B902C9E00004086001C2C9B0022418600108D
+S31520063BA03C60003860638016480001007D3E4B78F5
+S31520063BB093410008380100489001000C386100083E
+S31520063BC0388000004BFFE7353861000838810090C1
+S31520063BD038A000004BFFF0412C83FFFF3BE000009E
+S31520063BE0418600443BA10008880100902C800000F5
+S31520063BF041860034893C004F7D3D4A148809008859
+S31520063C0070090008408200207FA3EB783881009057
+S31520063C1038A000024BFFF0012C83FFFF3BFF00017B
+S31520063C204086FFC82C9B0021408600642C83FFFF1C
+S31520063C3041860010880100902C80000040860014E2
+S31520063C40387A00883881009038A0000B4BFAD63D8A
+S31520063C50386100907FC4F37838A0000B4BFAD62D36
+S31520063C6039600000393E000B7FC3F3788809FFFFD1
+S31520063C702C800020408600109D69FFFF7C89180055
+S31520063C804086FFEC38600000480000E02C83FFFFEA
+S31520063C904086003C801C00607C9F004041840018C2
+S31520063CA03C60003860630D004BFB0A653860FFFFF9
+S31520063CB0480000B8386100084BFFF2992C83FFFFB5
+S31520063CC04086000C3860FFFF480000A03BA100900C
+S31520063CD07FA3EB78388000404BFB603D7FA3EB78D3
+S31520063CE0881C004D889C004E38A000207C8022141B
+S31520063CF04BFAD7BD7FC3F3784BFAFA652883000BB8
+S31520063D00418500147FC3F3784BFAFA557C651B78F8
+S31520063D104800000838A0000B7FC3F3787FA4EB7811
+S31520063D204BFAD569881C004F38C100907D210214B4
+S31520063D303800000898090090807A0018A0BA007CFE
+S31520063D408001001438A5FFFF7C052838800300244F
+S31520063D50390000017C0803A68081002088FC004CDF
+S31520063D60392100744E800021800100EC7C0803A6D0
+S31520063D70834100D0836100D4838100D883A100DCEF
+S31520063D8083C100E083E100E4382100E84E8000206C
+S31520063D909421FF907C0802A69381006093A100647B
+S31520063DA093C1006893E1006C900100747C9D237892
+S31520063DB08383001C386100183880000038A0004034
+S31520063DC04BFAF88993A100587FA3EB784BFAF99121
+S31520063DD0B061005C3881005838A100187F83E378EB
+S31520063DE04BFFEC7D800100747C0803A6838100606E
+S31520063DF083A1006483C1006883E1006C38210070CA
+S31520063E004E8000209421FFF07C0802A693E1000C48
+S31520063E1090010014800300142C80000083E3001C0C
+S31520063E2041860078801F00482C80000040860010BE
+S31520063E303D200027388969284800000C3D200027A8
+S31520063E40388969343C600027386369104BFB8771D3
+S31520063E50809F00202C840000418600303C6000278D
+S31520063E603863693C4BFB87593C600027809F0024BA
+S31520063E703863695C4BFB87493C600027809F00605E
+S31520063E803863697C48000010809F005C3C600027F0
+S31520063E90386369A04BFB8729800100147C0803A69A
+S31520063EA083E1000C382100104E8000204E80002031
+S31520063EB09421FF607C0802A693A1009493C10098E2
+S31520063EC093E1009C900100A47C7E1B783BE00000D9
+S31520063ED093E1008838A0000038C10008A01E007CA7
+S31520063EE0807E001820E000807CE7391054EB0630EF
+S31520063EF07C07387880030024390000007C0803A656
+S31520063F0039210088809E00687D673B784E80002197
+S31520063F102C83FFFF418602E4813E001C2C8900008B
+S31520063F204186002C800900183D20002639293DAC03
+S31520063F307C804800418600302C8000004186001097
+S31520063F407C0803A67FC3F3784E800021807E001C62
+S31520063F50388000684BFBC6812C830000907E001CAF
+S31520063F604186029883FE001C388000687FE3FB7832
+S31520063F704BFB5DA53FA00027387D69C04BFAF7E1CC
+S31520063F803801000B7C651B787C030378389D69C055
+S31520063F904BFB5CB12C8300003BBF004C408600B82F
+S31520063FA03D200028800997982C8000094085002806
+S31520063FB03C600027386369C83880000038A00000B6
+S31520063FC038C0000038E00000390000003920000023
+S31520063FD04BFB2DA538000001901F004838000040F5
+S31520063FE0981F004C39200028993D00013800000012
+S31520063FF0981D000238000035981D0003993D0004DF
+S315200640003800002A981D000538000036981D00063F
+S3152006401038000038981D00073800002C981D000827
+S315200640203800002E981D00093800003A981D000A0F
+S3152006403038000030981D000B3800003C981D000CF7
+S3152006404038000032981D000D38000002981D000E1B
+S31520064050480000A43D200028800997982C80000956
+S31520064060408500283C600027386369E838800000D0
+S3152006407038A0000038C0000038E0000039000000F3
+S31520064080392000004BFB2CF138000000901F004819
+S3152006409038000020981F004C38000008981D0001A3
+S315200640A038000003981D00023800000B981D0003F7
+S315200640B039200016993D000438000018981D000581
+S315200640C0993D0006981D0007392000FF993D0008F6
+S315200640D0993D00093800001A981D000A3800001478
+S315200640E0981D000B3800001C981D000C993D000DEC
+S315200640F0993D000EA13E007E881E00A488BD0000C4
+S315200641007D2400307C852000408500203D20002827
+S31520064110800997982C800000418400D43C600027B3
+S3152006412038636A08480000B4801E00942C8000027A
+S315200641304086006C88010037892100368961003562
+S315200641405400C00E5529801E7C004B78556B402E98
+S31520064150892100347C005B787C044B782884000116
+S31520064160909F005C418500203D2000288009979875
+S315200641702C800000408500783C60002738636A481A
+S315200641804800005438000000901F0020901F00248D
+S315200641903800FFFF901F0060480000A08801001A23
+S315200641A0892100195400402E7D2903782C89000088
+S315200641B0913F00604086004C3D2000288009979854
+S315200641C02C800000408500283C60002738636A90D2
+S315200641D03880000038A0000038C0000038E0000013
+S315200641E039000000392000004BFB2B8D3C6000383F
+S315200641F0606322004BFB05193860FFFF480000ACC0
+S3152006420038000000901F005CA13E007C881D00003F
+S315200642107D2903D6801F00607C004B96901F0024C4
+S31520064220801E0098813F0024901F0020801E009843
+S315200642307C004A14901E0098386000004800B62D6F
+S31520064240907F00643D20002639293838913F0000AA
+S315200642503D200026392936D0913F00043D200026F0
+S3152006426039292F04913F00083D200026392939880F
+S31520064270913F000C3D20002639293A3C913F0010FB
+S315200642803D20002639293C90913F00143D200026EA
+S3152006429039293DAC913F00183D20002639293D0499
+S315200642A0913F001C38600000800100A47C0803A60C
+S315200642B083A1009483C1009883E1009C382100A045
+S315200642C04E8000209421FFE87C0802A69001001C5F
+S315200642D038000002900100083D20002639293DB00D
+S315200642E09121000C38000000900100103C60002847
+S315200642F0386397DC38810008480077458001001C22
+S315200643007C0803A6382100184E8000209421FFD869
+S315200643107C0802A69341001093610014938100182D
+S3152006432093A1001C93C1002093E100249001002C48
+S31520064330812300048369001483C300002C9B00009C
+S31520064340839E0020835E0018418600F0801C00684C
+S315200643502C800000418600E4881E00823BE0000196
+S315200643607C9F0000801E00707FBB021440840040A4
+S31520064370801A00287F43D3787C0803A67F64DB78DF
+S315200643807FA5EB7838C000014E8000212C830000E3
+S31520064390408600A0881E00823BFF00017C9F00000D
+S315200643A0801E00707FBD02144184FFC8801E0094C3
+S315200643B02C80000240860084893C004B801C0048E5
+S315200643C0992100085400C23E98010009881C00491C
+S315200643D09801000A881C00487F43D3789801000B71
+S315200643E0893C0063801C00609921000C5400C23E63
+S315200643F09801000D881C0061388000019801000E86
+S31520064400881C006038A001E89801000F800300246C
+S3152006441038C100087C0803A638E0000839000001E8
+S31520064420392000004E8000212C8300004186000C96
+S315200644303860FFFF48000008386000008001002C25
+S315200644407C0803A68341001083610014838100182B
+S3152006445083A1001C83C1002083E100243821002883
+S315200644604E8000209421FFE07C0802A69341000896
+S315200644709361000C9381001093A1001493C1001838
+S3152006448093E1001C900100247C7E1B782C8400007E
+S31520064490835E0020909A00684186009C3B8000003F
+S315200644A0813E0020801E0070892900347C9C0040B5
+S315200644B07D2901D6801A00407F604A144084007800
+S315200644C0881E00823BE000007C9F0040801A004048
+S315200644D07FA0E2144084004C813E002088090034E7
+S315200644E07C9F000041860020807E001880030028DD
+S315200644F07C0803A67F64DB787FA5EB7838C00001AD
+S315200645004E800021381F0001893E0082541F063E38
+S315200645107C9F4840801E00707FBD02144184FFBCEC
+S31520064520801E00703B9C00017C9C00403B7B00016A
+S315200645304184FF90800100247C0803A6834100085D
+S315200645408361000C8381001083A1001483C10018A7
+S3152006455083E1001C382100204E8000209421FFD8BC
+S315200645607C0802A6934100109361001493810018DB
+S3152006457093A1001C93C1002093E100249001002CF6
+S315200645807C7C1B7838C10008390000003B5C003073
+S315200645907CBB2B78576AF87E83BC00007D5B521461
+S315200645A0A01D007C83DD001830A0FFFF7D4528383E
+S315200645B07FE50050217F00027D6B59107D6B5BB82D
+S315200645C07D6058F8540007BC7FEB58387D6B03781E
+S315200645D07D7F5B78801D0070817D00207C8401D6DE
+S315200645E0800B0040897D00A47C0022147D4A5C3025
+S315200645F07FA05214801E00247F49D3787C0803A608
+S315200646007FC3F3787FE7FB787FA4EB784E80002183
+S315200646102C8300004186001438000001901C0034CB
+S31520064620386000014800006C2C9F0001408600403F
+S315200646307FC3F378389D000138A00000800300244C
+S3152006464038C100097C0803A638E0000139000000BD
+S315200646507F49D3784E8000212C83000041860010A6
+S3152006466093FC0034386000014800002888010009C0
+S3152006467073690001892100085400402E7D230378A2
+S315200646804182000C5463E13E480000085463053E0F
+S315200646908001002C7C0803A6834100108361001448
+S315200646A08381001883A1001C83C1002083E1002496
+S315200646B0382100284E8000209421FFD07C0802A6AF
+S315200646C093210014934100189361001C93810020C6
+S315200646D093A1002493C1002893E1002C9001003475
+S315200646E07C7D1B787CB92B78801D0030572BF87E75
+S315200646F09001000883FD00007F795A14801F007000
+S31520064700813F00207C0401D681290040817D00045A
+S315200647107D290214881F00A4816B00147F60043053
+S315200647207F8902147C8BE0007CDA337883DF0018DD
+S3152006473041860020813F0020880900347C840000C1
+S31520064740408600104BFFFBC9813D00049389001467
+S315200647507FC3F3787F84E378A17F007C38C1000C81
+S31520064760380BFFFF7F7B00387FFB5850217F0002E6
+S315200647707D6B59107D6B5BB87D6058F8540007BC7D
+S315200647807FEB58387D7F0378801E00243900000091
+S315200647907C0803A6392100087F65DB787FE7FB784E
+S315200647A04E8000212C830000408600E42C9F0001C9
+S315200647B0408600347FC3F378389C000138A0000079
+S315200647C0801E002438C1000D7C0803A638E00001AF
+S315200647D039000000393D00304E8000212C83000030
+S315200647E0408600AC73200001418200245740E13EFA
+S315200647F08921000C9801000D574020365529073E81
+S315200648007D2903789921000C4800001C8801000D9B
+S315200648109B41000C5749C73E540006367C004B7810
+S315200648209801000D7FC3F3787F84E3787F65DB7874
+S31520064830801E002438C1000C7C0803A67FE7FB787F
+S3152006484039000001392100084E8000212C83000002
+S315200648504086003C2C9F00014086003C7FC3F378AF
+S31520064860389C000138A000008003002438C1000DC2
+S315200648707C0803A638E0000139000001393D0030E6
+S315200648804E8000212C8300004186000C3860FFFFF5
+S315200648904800000838600000800100347C0803A622
+S315200648A083210014834100188361001C8381002024
+S315200648B083A1002483C1002883E1002C38210030FF
+S315200648C04E8000209421FFE87C0802A693E100147E
+S315200648D09001001C7C7F1B78813F000038C10008B0
+S315200648E08069001880090070816900207C8401D6C1
+S315200648F054A0083C816B0040A0A9007C7D6B221445
+S3152006490038A5FFFF888900A47C0528387C04243036
+S315200649108003002438E000027C0803A63900000044
+S31520064920393F00307C8B22144E8000212C830000D8
+S315200649304086001888610009880100085463402EC5
+S315200649407C031B784800001038000001901F0034B5
+S31520064950386000018001001C7C0803A683E1001450
+S31520064960382100184E8000209421FFD87C0802A604
+S3152006497093410010936100149381001893A1001CA3
+S3152006498093C1002093E100249001002C7C7C1B78A7
+S3152006499083FC000054BD083C801F0070815F002008
+S315200649A07C0401D6812A0040817C00047D290214DC
+S315200649B0881F00A4816B00147FA004307FC90214CF
+S315200649C07C8BF0007CDB3378835F00184186001CE5
+S315200649D0880A00347C840000408600104BFFF9319B
+S315200649E0813C000493C900145769C63E5760063EAB
+S315200649F05400402E7C004B78A0BF007CB0010008F6
+S31520064A007F43D3787FC4F37838C1000838E00002A4
+S31520064A1080030024390000017C0803A6393C0030B7
+S31520064A2038A5FFFF7FA528384E8000218001002C5F
+S31520064A307C0803A683410010836100148381001835
+S31520064A4083A1001C83C1002083E10024382100288D
+S31520064A504E8000209421FFE87C0802A693C1001010
+S31520064A6093E100149001001C7C7F1B78817F000057
+S31520064A70814B002038C10008880A0034806B001854
+S31520064A807C8002787C09FE707D2002787C00485066
+S31520064A907C00FE705400063E601E000F54A0103A9D
+S31520064AA0812B0070A0AB007C7C8449D6812A0040ED
+S31520064AB038A5FFFF7D292214888B00A47C0528387B
+S31520064AC07C0424308003002438E000047C0803A6F6
+S31520064AD0390000007C892214393F00304E8000219F
+S31520064AE02C8300004086003488010009896100086D
+S31520064AF08921000A8861000B5400402E7D6B0378BD
+S31520064B005529801E7D6B4B787C63F0385463C00E26
+S31520064B107D631B784800001038000001901F003482
+S31520064B20386000018001001C7C0803A683C10010A2
+S31520064B3083E10014382100184E8000209421FFD0EE
+S31520064B407C0802A693210014934100189361001C49
+S31520064B509381002093A1002493C1002893E1002C81
+S31520064B60900100347C7B1B7883DB0000813E00208D
+S31520064B708809003454BC103A7C8002787C0AFE7080
+S31520064B807D4B02787D6B50507D6BFE70556B063ED5
+S31520064B90616B000F801E007081490040813B000436
+S31520064BA07C8401D6881E00A4812900147D4A2214FD
+S31520064BB07F8004307FAA02147D29EA783009FFFF18
+S31520064BC07D204910696000FF7C0000D054000FFE4E
+S31520064BD07D2A00397CDF3378833E00187D7A5B7820
+S31520064BE0418200104BFFF729813B000493A900144C
+S31520064BF0A0BE007C9BE1000857E0C23E9801000952
+S31520064C0057E0843E9801000A57E0463E7F4000382A
+S31520064C109801000B7F23CB787FA4EB7838C1000858
+S31520064C2038E0000480030024390000017C0803A62E
+S31520064C30393B003038A5FFFF7F8528384E80002176
+S31520064C40800100347C0803A68321001483410018C2
+S31520064C508361001C8381002083A1002483C1002850
+S31520064C6083E1002C382100304E8000209421FFD08D
+S31520064C707C0802A692E1000C9301001093210014F1
+S31520064C80934100189361001C9381002093A1002470
+S31520064C9093C1002893E1002C900100347C7A1B787E
+S31520064CA07C9723783B3A002883D9000483FA002888
+S31520064CB0831A0000289E000183BA00047FDBF3785E
+S31520064CC08398002040850010801C00447C9E00406E
+S31520064CD041840068201E00007D20F114217F0000FB
+S31520064CE07C0BF9147D2B00394182000883DD000CEC
+S31520064CF0801C00547C9E004040850020801C003885
+S31520064D007C0803A67F43D378889C00347FE5FB780E
+S31520064D104E8000217C7E1B78289E0001408500104F
+S31520064D20801C00447C9E00404184001093D90004D8
+S31520064D303860FFFF480000E4813D00107C9E484015
+S31520064D4040840030801D000C7C9E00404184002457
+S31520064D507FFEBA147C9F4840418400107D3F4B78E5
+S31520064D60837C00584800007C7FFBFB784800007453
+S31520064D70817C00447FBEBA147C1D58107C0001102D
+S31520064D807C0003B87FA900387D6400787D3D2378B2
+S31520064D907C9EE8407FDFF37840840034801C003810
+S31520064DA07F43D3787C0803A67FE5FB78889C00346E
+S31520064DB03BFF00014E8000217C7B1B787C9BF80004
+S31520064DC04086000C7C9FE8404184FFD48019000C65
+S31520064DD02C8000014086000C3860FFFF4800003C0E
+S31520064DE093790004381FFFFF90190000A138007E32
+S31520064DF0381EFFFE7C0049D6813800987C004A146E
+S31520064E00901A0018A138007E7C1EF8507C0049D6E0
+S31520064E1038600000901A001C800100347C0803A626
+S31520064E2082E1000C830100108321001483410018BF
+S31520064E308361001C8381002083A1002483C100286E
+S31520064E4083E1002C382100304E8000209421FFE893
+S31520064E507C0802A69381000893A1000C93C100103A
+S31520064E6093E100149001001C7C7D1B787C8B2378B3
+S31520064E707CAB2A1438A5FFFF7C8B2840813D000099
+S31520064E8083C90020408400487CBC2B787FA3EB781E
+S31520064E90801E003C7D655B787C0803A63BE5000109
+S31520064EA0889E00347FE6FB784E8000212C83000006
+S31520064EB0408600547FEBFB78801E00487C8BE040C2
+S31520064EC03000FFFF901E00484184FFC4801E003C30
+S31520064ED07FA3EB787C0803A6889E003480DE0058E4
+S31520064EE07D655B784E8000212C8300004086001865
+S31520064EF0801E0048386000003000FFFF901E0048E4
+S31520064F00480000083860FFFF8001001C7C0803A6C5
+S31520064F108381000883A1000C83C1001083E100145D
+S31520064F20382100184E8000209421FFC07C0802A656
+S31520064F30924100089261000C9281001092A1001401
+S31520064F4092C1001892E1001C9301002093210024AF
+S31520064F50934100289361002C9381003093A100345D
+S31520064F6093C1003893E1003C900100447C771B787E
+S31520064F70825700007C94237883920020809C005CD4
+S31520064F80827700044BFFFCE92C8300003AD70028E1
+S31520064F904086000C38600000480002A08016000CEF
+S31520064FA02C800001418602902C94000040840288C1
+S31520064FB03B0000003D608000815C0060616B000163
+S31520064FC07D49FE707D2052787C0048507C00FE701C
+S31520064FD07C0900F8552907C07E8000387C144B785A
+S31520064FE07F1458003B20000183B6000482B70028B0
+S31520064FF0419A0008833C005C801C00547C9D00403E
+S315200650004085000C7EB8AB7848000028201D00009D
+S315200650107D20E914217500007C0BA9147D2B00390F
+S31520065020418200107D585378409A0008831C0064FC
+S315200650302C980000408600143C60003860632300EC
+S315200650404BFAF6CD480001F07F1FC3783BA000003F
+S315200650503BC00000387C006C3880FFFF801C004473
+S315200650603B4000003360FFFF4BFBF8CD4800007045
+S31520065070801C00387C0803A67EE3BB78889C003417
+S315200650807FE5FB784E8000212C83000140860010A8
+S315200650908016000C2C80000141860194801C004C51
+S315200650A07C830000408600307FC9FE707D20F27822
+S315200650B07C0048503BDE00017C00FE707C9EC800CA
+S315200650C07FA900387FE000787D3D037841860088F9
+S315200650D0480000083BC000003BFF00017C9FD840EB
+S315200650E04085FF903B5A0001289A00013B78FFFF36
+S315200650F03BE000023BC000004085FFE42C9D0000FB
+S315200651004086004C3C6000386063801C4BFAF601F2
+S315200651103D2000288009979C2C80000040850110A0
+S315200651203C60002738636ADC3C80002738846B089D
+S3152006513038A0000038C0000038E000003900000022
+S31520065140392000004BFB1C31480000E493DC00604C
+S315200651503B2000017EE3BB787FA4EB787F25CB78C6
+S315200651604BFFFCED2C830000408600C4387C006C87
+S315200651704BFBF6697C98A80040860038801C003CCC
+S315200651807EE3BB787C0803A67EA5AB78889C003494
+S315200651907FA6EB784E8000212C830000408600985F
+S315200651A0801300107C9D000040860044480000388D
+S315200651B03C008000600000017C94000040860010C0
+S315200651C0381D0001901C006448000018801C0060F1
+S315200651D02C8000004186000C7C1DCA14901C0060A1
+S315200651E093B3000C7C1DCA14901300107C1DCA14A0
+S315200651F03000FFFF813C00589016000091360004CF
+S31520065200A132007E381DFFFE7C0049D681320098E9
+S315200652107C004A1490170018A012007E7C1901D62D
+S31520065220386000009017001C48000010387C006C7F
+S315200652304BFBF5A93860FFFF800100447C0803A6D6
+S31520065240824100088261000C8281001082A100142E
+S3152006525082C1001882E1001C8301002083210024DC
+S31520065260834100288361002C8381003083A100348A
+S3152006527083C1003883E1003C382100404E8000205F
+S315200652809421FFE07C0802A69361000C938100100E
+S3152006529093A1001493C1001893E1001C90010024E9
+S315200652A07C7C1B782C84FFFF817C0000837C000499
+S315200652B083CB00204086001C83BB000C289D000162
+S315200652C038000000901B001041850024480000DCB1
+S315200652D0800B00987C840040418400D0A12B007E60
+S315200652E07C0020507C004B9633A00002801E004492
+S315200652F07C9D0040408400B42C8500004186001029
+S315200653002C85000141860034480000A02C84FFFF2E
+S3152006531041860020812B0098A16B007E7D29205096
+S315200653207C095B967C0059D67C8900004086000C59
+S315200653307FBFEB7848000084801E00387C0803A6D1
+S315200653407F83E378889E00347FA5EB784E80002104
+S31520065350801E00547C7F1B787C9F00404085000C75
+S31520065360386000004800010C289F00014085003463
+S31520065370801E00447C9F004040840028801E003CFE
+S315200653807F83E3787C0803A6889E003480DE005857
+S315200653907FA5EB784E8000212C8300004186001CD9
+S315200653A03860FFFF480000CC3C60003860638016FA
+S315200653B04BFAF35D4BFFFFEC801B00107C9F0040F1
+S315200653C040840014801B000C7C9F0040418400080A
+S315200653D093FB0010801E00602C800000408600088B
+S315200653E093FE0060801E00647C80F840408500089D
+S315200653F093FE0064289F000140850068801E0044B5
+S315200654007C9F00404084005C801E00387C0803A6F2
+S315200654107F83E378889E00347FE5FB784E800021E3
+S315200654207C7D1B78801E003C7F83E3787C0803A660
+S31520065430889E003480DE004C7FE5FB784E80002176
+S315200654402C8300004086FF5C7FBFEB78801E0048D9
+S31520065450289F000130000001901E00484185FFA0CC
+S31520065460807E00547C7F18107C6319107C631BB8E1
+S31520065470800100247C0803A68361000C838100102A
+S3152006548083A1001483C1001883E1001C3821002063
+S315200654904E8000209421FFE07C0802A69361000C32
+S315200654A09381001093A1001493C1001893E1001C68
+S315200654B0900100247C7E1B782C84FFFF815E0000F1
+S315200654C07CBB2B78838A002040860040380000006B
+S315200654D0901E002C901E0028901E0030901E00184C
+S315200654E0813E0004901E001C80A9000C2C8500001D
+S315200654F04086000C38600000480001182885000107
+S315200655004185003048000108812A00987C8448405D
+S31520065510418400FCA00A007E7D2920507D690396E1
+S315200655207C0B01D638AB00027D2048507F7B4A147F
+S31520065530801C00447C850040408400D4A00A007E5E
+S315200655407FBB0396813E0004816900107C85584006
+S315200655507C1D01D67F60D850408400388009000C17
+S315200655607C8500404184002C7C0558503000FFFF86
+S315200655707D3D00107D2949107D294BB87FAB4838E3
+S315200655807C0048787D7F03787CA5FA147FBFE85097
+S315200655903BE000007C9FE8404084003C801C0038AD
+S315200655A07C0803A6889C00347FC3F3784E800021AE
+S315200655B02883000140850058801C00447C830040D7
+S315200655C04084004C3BFF00017C9FE8407C651B78AD
+S315200655D04184FFCC90BE002C809C005C7FC3F37870
+S315200655E04BFFF68D2C830000408600243860000091
+S315200655F0813E0018801E001C7D29DA14913E001873
+S315200656007C1B0050901E001C480000083860FFFFD7
+S31520065610800100247C0803A68361000C8381001088
+S3152006562083A1001483C1001883E1001C38210020C1
+S315200656304E8000209421FFD07C0802A69361001C90
+S315200656409381002093A1002493C1002893E1002C86
+S31520065650900100347C7C1B78837C000083BB002071
+S3152006566083DD00482C9EFFFF40860090801D004467
+S315200656703BE000027C9F00403BC00000408400784F
+S31520065680801D00387C0803A67F83E378889D003436
+S315200656907FE5FB784E8000217C691B782C890001EA
+S315200656A04086001C801C00342C8000014086001099
+S315200656B03880FFFF3860FFFF480000743BFF00017B
+S315200656C0801D004C397E00017D2002787C09FE7003
+S315200656D07D2002787C004850813D00447C00FE7087
+S315200656E07C9F48407D6B00787FC900387D3E5B787D
+S315200656F04184FF9093DD00487FCCF3783960000023
+S31520065700A01B007E88BB00A47C0A037839200000F3
+S315200657107C6C50167C8C51D67C0C49D67D6A59D623
+S315200657207C6302147C635A144800A19980010034D4
+S315200657307C0803A68361001C8381002083A10024A4
+S3152006574083C1002883E1002C382100304E800020BA
+S315200657509421FFE87C0802A69381000893A1000CF9
+S3152006576093C1001093E100149001001C7C7D1B78E8
+S31520065770839D000483FC000C2C9F0000813D0000C5
+S3152006578083C9002041860058289F00014085006C69
+S31520065790801E00447C9F004040840060801E0038A6
+S315200657A07FA3EB787C0803A67FE5FB78889E0034EA
+S315200657B03BFF00014E8000217C83F8004186FFE0F6
+S315200657C0801D00342C8000014186003C93FC00108D
+S315200657D0801E00547C8300404085000C3860000003
+S315200657E0480000282883000140850010801E0044BA
+S315200657F07C830040418400103C60003860632300AF
+S315200658004BFAEF0D3860FFFF8001001C7C0803A6CB
+S315200658108381000883A1000C83C1001083E1001454
+S31520065820382100184E8000209421FFD87C0802A635
+S31520065830930100089321000C9341001093610014F4
+S315200658409381001893A1001C93C1002093E10024A4
+S315200658509001002C7C7A1B78813A00007C9823786C
+S3152006586083A900203B600002801D00443BC0000047
+S315200658707C9B00403B2000003B8000003BE0000272
+S3152006588040840074801D00387C0803A67F43D378A5
+S31520065890889D00347FE5FB784E8000212C8300010D
+S315200658A040860018801A00342C8000014086000CA1
+S315200658B03860000048000058801D004C7C8300009C
+S315200658C04086000C3BDE00014800001C7C9EE04022
+S315200658D03B7F00014085000C7F79DB787FDCF378FF
+S315200658E03BC00000801D00443BFF00017C9F00401A
+S315200658F04184FF947C9EE0404085000C7F79DB78CE
+S315200659007FDCF378933800007F83E3788001002CD0
+S315200659107C0803A6830100088321000C834100101E
+S31520065920836100148381001883A1001C83C1002093
+S3152006593083E10024382100284E8000209421FFD0C0
+S315200659407C0802A693210014934100189361001C3B
+S315200659509381002093A1002493C1002893E1002C73
+S31520065960900100347C7B1B787C9C23782C9CFFFF43
+S31520065970813B0000833B000483A900204086003437
+S31520065980387D006C3880FFFF4BFBEFAD7F63DB78FD
+S31520065990388100084BFFFE957C7C1B79408200D41B
+S315200659A03C6000386063801C4BFAED65480000FCBD
+S315200659B03BC0000093C10008387D006CA129007EFB
+S315200659C03880FFFF7C1C4A143000FFFF7F804B96F1
+S315200659D04BFBEF65801D00443B4000027C9A00404D
+S315200659E03BE0000240840064801D00387C0803A644
+S315200659F07F63DB78889D00347FE5FB784E80002127
+S31520065A002C83000140860010801B00342C80000168
+S31520065A1041860098801D004C7C8300004086001439
+S31520065A203BDE00017C9EE0004086001048000040D8
+S31520065A303B5F00013BC00000801D00443BFF000188
+S31520065A407C9F00404184FFA4800100082C80000032
+S31520065A50408600207C9EE040408400143C6000384E
+S31520065A60606312004BFAECA94800004093410008F7
+S31520065A707F63DB78808100087F85E3784BFFF3D14F
+S31520065A802C83000040860024387D006C4BFBED4DB0
+S31520065A9080010008386000009019000C7C00E21492
+S31520065AA09019001048000010387D006C4BFBED2D38
+S31520065AB03860FFFF800100347C0803A6832100148A
+S31520065AC0834100188361001C8381002083A1002462
+S31520065AD083C1002883E1002C382100304E80002027
+S31520065AE09421FFE07C0802A693A1001493C1001816
+S31520065AF093E1001C900100247C7D1B7838810008E8
+S31520065B004BFFFD29813D0000A009007E7C6301D65E
+S31520065B10800100247C0803A683A1001483C10018F3
+S31520065B2083E1001C382100204E8000209421FF9816
+S31520065B307C0802A69381005893A1005C93C100605D
+S31520065B4093E100649001006C7C7D1B783861001817
+S31520065B503880000038A00040839D00204BFADAEDFD
+S31520065B6093A100183C60002738636B184BFB6A51DB
+S31520065B703C60002738636B344BFB6A453C60002744
+S31520065B80809C005C38636B504BFB6A353861001885
+S31520065B904BFFFAA57C651B787C8623783C6000271C
+S31520065BA038636B783CE0002738E76B943900000AA7
+S31520065BB0480090418001006C7C0803A6838100582A
+S31520065BC083A1005C83C1006083E1006438210068FC
+S31520065BD04E8000209421FF987C0802A6934100500F
+S31520065BE0936100549381005893A1005C93C1006091
+S31520065BF093E100649001006C7C7A1B787C8B237879
+S31520065C007CBC2B787CDF33782C9F0008837A0000B7
+S31520065C107CFE3B78813B002041860078289F000841
+S31520065C204185002C2C9F000241860050289F0002A9
+S31520065C30418500102C9F000141860038480001341A
+S31520065C402C9F00044186003C480001282C9F0020FA
+S31520065C5041860038289F0020408501182C9F004049
+S31520065C60418600302C9F0080418600304800010482
+S31520065C7083E9004C480000FC83E90058480000F4FC
+S31520065C8083E90054480000EC83E90050480000E40C
+S31520065C907FDFF378480000DC3800000090010048DA
+S31520065CA038610008388000407FC5F378801B007075
+S31520065CB0812900407C0B01D683BB00187FE902149C
+S31520065CC04BFAB7ED813A0000A009007C3B80000024
+S31520065CD07C9C0040408400487FA3EB787FE4FB78D9
+S31520065CE07F85E378801D002438C100087C0803A63A
+S31520065CF038E0004039000001392100484E80002155
+S31520065D002C83000040860064813A0000A009007CAE
+S31520065D103B9C00407C9C00404184FFC07FFEFB7874
+S31520065D2048000028801D00287FA3EB787C0803A660
+S31520065D307FC4F3787FE5FB7838C000014E800021CA
+S31520065D402C83000040860024801B00703BFF000148
+S31520065D507C1E02143000FFFF7C9F00404184FFC852
+S31520065D6038600000480000283860FFFF4800002001
+S31520065D708009003C7F43D3787C0803A67D645B7844
+S31520065D807F85E3787FE6FB784E8000218001006CD4
+S31520065D907C0803A683410050836100548381005802
+S31520065DA083A1005C83C1006083E10064382100681A
+S31520065DB04E8000209421FFF07C0802A693C100089D
+S31520065DC093E1000C9001001454A5013F7C7F1B78BB
+S31520065DD0817F00007CDE3378812B00204082000CF8
+S31520065DE03860000148000094800900547C850040F4
+S31520065DF04085000C38600002480000807C85000043
+S31520065E004086000C38600004480000708009005067
+S31520065E107C8500404184000C386000204800005CE8
+S31520065E202885000140850010800B00847C85004073
+S31520065E304184000C38600010480000408009003874
+S31520065E407C0803A67FE3FB784E800021907E000027
+S31520065E503D201111801F00346129111168000001AF
+S31520065E603000FFFF7C0001107C0300F854630738DE
+S31520065E707C0048387C031B78800100147C0803A626
+S31520065E8083C1000883E1000C382100104E800020D3
+S31520065E904E8000209421FF907C0802A69381006004
+S31520065EA093A1006493C1006893E1006C900100748D
+S31520065EB07C7E1B78386100183880000038A00040A8
+S31520065EC0839E00184BFAD785813E00202C89000038
+S31520065ED04186002C8009001C3D20002639295D902C
+S31520065EE07C804800418600182C80000041860010E0
+S31520065EF07C0803A67FC3F3784E800021807E00208F
+S31520065F00388000884BFBA6D12C830000907E00208B
+S31520065F10418602AC7C7F1B78388000884BFB3DF996
+S31520065F2093C10018801E0078813E0098A17E007ECF
+S31520065F307C0900507C005B9630000002901F0044CE
+S31520065F4083BE00942C9D0002901E0084408600E0AD
+S31520065F507F83E3783880000138A001E88003002497
+S31520065F6038C100587C0803A638E00008390000002E
+S31520065F70392000004E8000212C83000040860238FE
+S31520065F808801005B8921005A896100595400C00E98
+S31520065F905529801E7C004B78556B402E892100584A
+S31520065FA07C005B787C004B78901F00488801005F58
+S31520065FB08921005E8961005D5400C00E5529801E28
+S31520065FC07C004B78556B402E8921005C7C005B78E3
+S31520065FD07C094B7828890001913F00604085001096
+S31520065FE0801F00447C8900404184000893BF0060DE
+S31520065FF03D20002639294954913F00383D20002668
+S3152006600039294A3C913F003C3C000FFF6000FFF0D7
+S31520066010901F00503C000FFF6000FFF7901F0054B2
+S315200660203C000FFF6000FFFF480000903800FFFF8E
+S31520066030901F004838000002901F0060801E0094C2
+S315200660402C800001408600403D200026392947C481
+S31520066050913F00383D20002639294868913F003C6B
+S31520066060380000006000FFF0901F00503800000046
+S315200660706000FFF7901F0054380000006000FFFF05
+S31520066080480000382C8000004086012C3D20002642
+S315200660903929445C913F00383D200026392945B8E8
+S315200660A0913F003C38000FF0901F005038000FF744
+S315200660B0901F005438000FFF901F00583D200026E1
+S315200660C039295D90913F001C3D20002639294E280E
+S315200660D0913F00003D20002639295650913F000465
+S315200660E03D20002639295A2C913F00203D200026A6
+S315200660F039295180913F00083D200026392953949D
+S31520066100913F000C3D2000263929583C913F00142A
+S315200661103D200026392959E0913F00183D200026CA
+S3152006612039295534913F00103D2000263929420C45
+S31520066130913F00243D20002639294364913F0028BB
+S315200661403D20002639295AD4913F002C3D20002691
+S3152006615039295CB4913F003038000000A11E00802A
+S31520066160981F00343D60002839400000813F0044D6
+S31520066170800B97A0915F004C7D290396387F006C93
+S315200661803880000D38000001901F0068911F0040DE
+S3152006619039290001913F005C4BFBF40938000002C7
+S315200661A0901F0064386100184BFFF48D386000009C
+S315200661B0480000107FC3F3784BFFFCD93860FFFFF9
+S315200661C0800100747C0803A68381006083A1006495
+S315200661D083C1006883E1006C382100704E80002060
+S315200661E09421FFE87C0802A69001001C380000FFD7
+S315200661F0900100083D20002639295D949121000C46
+S3152006620038000000900100103C600028386397ACE7
+S3152006621038810008480058298001001C7C0803A6FE
+S31520066220382100184E8000209421FFE87C0802A61B
+S3152006623093A1000C93C1001093E100149001001C59
+S315200662407C7D1B783C600027809D000080BD000871
+S3152006625038636B9C4BFB63693C600027889D001066
+S3152006626080BD001880DD001438636BD84BFB635164
+S315200662703C600027A89D000C881D001080DD0014B8
+S3152006628080BD001C7CC601D638636C0C4BFB633183
+S315200662903C600027A89D000E80BD000480DD0020FE
+S315200662A038636C404BFB63193C60002738636C7877
+S315200662B0389D002A4BFB63098001001C7C0803A637
+S315200662C083A1000C83C1001083E100143821001835
+S315200662D04E8000209421FFE87C0802A693A1000C9C
+S315200662E093C1001093E100149001001C7CC73378FB
+S315200662F070E001007C00002654001FFE7C0000D0C2
+S315200663007C0900F855290672540006B47C064B789B
+S315200663107C853000418403FC3BA0000063BDFFFE64
+S315200663202C85003F7F04E8404CE623827C0000262D
+S31520066330540947FE5400D7FE7D2B0039408203D4EC
+S315200663402C8501FF41850044800300082C8000002F
+S315200663504086000C380000019003000888030029B7
+S315200663602C8000004086000C380000FD980300298A
+S31520066370880300102C800000408600583800000153
+S31520066380980300104800004C1C0500037C8400403E
+S315200663904084004C800300082C8000004086000CB8
+S315200663A03800000190030008800300002C800000BE
+S315200663B04086000C3800000C900300008803002954
+S315200663C02C8000004086000C380000FD980300292A
+S315200663D01C0600707D802BD648000068288413880A
+S315200663E041850034800300082C8000004086000C7E
+S315200663F03800000190030008880300292C8000003D
+S315200664004086000C380000F8980300293980000ED3
+S3152006641048000030800300082C8000004086000CCF
+S315200664203800000290030008880300292C8000000B
+S315200664304086000C380000F8980300293980002091
+S31520066440A803000E2C8000004186000C7C0031D665
+S315200664507D802BD67C0C29D67C0033D6892300104A
+S315200664602C890000B003000E4086000C380000027E
+S31520066470980300108963001081230000200B00106A
+S315200664807C0001107C0003B87D6B00387C0000F888
+S31520066490540006F67D6B03782C89000080030008DD
+S315200664A0996300107D0403964086003428880FF5EC
+S315200664B04185000C3800000C480000203C00003FB7
+S315200664C06000FFFF7C8400404185000C38000010E8
+S315200664D048000008380000209003000080030000D2
+S315200664E02C8000104186004428800010418500102B
+S315200664F02C80000C41860058480000302C80002055
+S3152006650040860028A803000C2C8000004086000C3C
+S3152006651038000020B003000C3D60001F616BFFFEB3
+S315200665203920000848000044A803000C2C800000EF
+S315200665304086000C38000002B003000C39600000CB
+S31520066540616BFFFE3920000248000020A803000CDC
+S315200665502C8000004086000C38000002B003000C98
+S3152006656039600FF5392000017C8858404185001096
+S31520066570800300087C80484040840024800300086D
+S315200665805400083C7D0403967C88584090030008F6
+S315200665904185FFEC7C8048404184FFE48003000867
+S315200665A02C8000FF814300007D20002655292FFEE2
+S315200665B07D2900D07D2B48F8556B063C7C00483853
+S315200665C02C8A00107C005B78900300087D040396D5
+S315200665D04186003C288A00104085002C2C8A002003
+S315200665E04086002C800300042C800000550B103AB0
+S315200665F039800000408600543D20002739296C90BA
+S31520066600480000442C8A000C4186002080030004A2
+S315200666102C800000550B083C408600303D20002784
+S3152006662039296C9C48000020800300042C80000039
+S315200666301C080003540BF87E408600103D200027D8
+S3152006664039296CA89123000470E0010041820010CC
+S315200666503D20002739296CB4912300047C0B2A148B
+S315200666603000FFFF7C002BD67CEC29D6A923000C14
+S31520066670896300107CE733D6A943000C7D29205078
+S3152006668090030014800300147D2C48507C0059D6B4
+S31520066690816300087D2048507D095B967D4A2050FF
+S315200666A07D4C5050892300108003001480C30008B7
+S315200666B07C0049D6812300087D405050A803000C53
+S315200666C0910300187D2849D6890300108163001896
+S315200666D07D4950507C0A0214812300147C006214E2
+S315200666E07D2941D67D6B31D67C004A147C005A140E
+S315200666F07C802000B0E3000E9143001C40860014E7
+S315200667002C8600FF4185000C3860000048000014E6
+S315200667104BFADF8938000016900300003860FFFF29
+S315200667208001001C7C0803A683A1000C83C10010EF
+S3152006673083E10014382100184E8000209421FDE0C4
+S315200667407C0802A6934102089361020C93810210EB
+S3152006675093A1021493C1021893E1021C900102240C
+S315200667607C7A1B78837A003C289B02007C9C2378C3
+S315200667703BC00064408500147F63DB784BFBAD1578
+S315200667807C7D1B78480000083BA100087FA3EB7898
+S315200667907F64DB784BFB35817F43D37838800000D6
+S315200667A0801A002038A000017C0803A67FA6EB7875
+S315200667B038E00000390000004E8000212C83FFFFC0
+S315200667C04086000C3860FFFF480003E07D5BEA1434
+S315200667D0881D0000397EFFFB680900E97D2900D067
+S315200667E055290FFE680000EB7C0000D054000FFEF2
+S315200667F07D290038880AFFFE3129FFFF7D294910A9
+S315200668002C8000557D6348787FC048387C1E1B78CF
+S3152006681040860010880AFFFF2C8000AA41860008C1
+S315200668203BDEFFEC881D000C893D000B5400402EF4
+S315200668307D2903787D29DA783129FFFF7D294910BC
+S31520066840381EFFF67FCB48387C0348787D7E1B783A
+S31520066850881D000D393EFFF6901C00087C0000D0EE
+S315200668607C00FE707FCB00387D2000787D7E037805
+S31520066870893D0015395EFFFE993C00297D2900D009
+S315200668807D29FE70881D000F897D000E5400402E3E
+S315200668907D7F03797D4348787FC048387C1E1B78E8
+S315200668A04082000C3BDEFFF648000008B3FC000CD5
+S315200668B0893D0010395EFFF6993C00107D2900D0EF
+S315200668C07D29FE70881D0012897D00115400402EF8
+S315200668D07D7F03797D4348787FC048387C1E1B78A8
+S315200668E04082000C3BDEFFF648000008B3FC000E93
+S315200668F0881D0014893D00135400402E7D3F0379E0
+S315200669004082004C881D0023893D0022897D002176
+S315200669105400C00E5529801E7C004B78556B402EA0
+S31520066920893D00207C005B787C1F4B787FE9FE70D2
+S315200669307D20FA787C0048507C00FE70393EFFF6B2
+S315200669407FCB00387D2000787D7E0378807A0038DC
+S315200669507C9F18404085000C3BDEFFF64800002051
+S315200669607FE01A783000FFFF7C000110393EFFFEDB
+S315200669707FCB00387D2000787D7E0378881D001722
+S31520066980893D00165400402E7D3F03794082005CE7
+S3152006699038000020901C0000881D0027893D00260F
+S315200669A0897D00255400C00E5529801E7C004B7813
+S315200669B0556B402E893D00247C005B787C1F4B78E6
+S315200669C07FE9FE707D20FA787C0048507C00FE70B8
+S315200669D0393EFFF67FCB00387D2000787D7E037812
+S315200669E093FC0014480000287C1FD9D65400F87E54
+S315200669F028800FF593FC00144185000C3800000C06
+S31520066A004800000838000010901C0000881D001A57
+S31520066A10393EFFFB981C00287C0000D07C00FE70C7
+S31520066A207FCB00387D2000787D7E0378881D001B6D
+S31520066A30893D001A897D00195400C00E5529801EED
+S31520066A407C004B78556B402E7C005B78893D001880
+S31520066A50397EFFFB7C004B78901C00247C09FE7057
+S31520066A607D2002787C004850813C00007C00FE7028
+S31520066A702C8900207FC900387D6000787D3E03780A
+S31520066A8040860028881D0046893D0045897D0044AC
+S31520066A905400C00E5529801E7C004B78556B402E1F
+S31520066AA0893D004348000024881D002A893D002987
+S31520066AB0897D00285400C00E5529801E7C004B78FF
+S31520066AC0556B402E893D00277C005B787C1F4B78D2
+S31520066AD057E0043E57E9843E7C8048004186000CF8
+S31520066AE077E0FFFF408200143BDEFFFB4BFC2409C8
+S31520066AF05463801E7FFF1B7893FC0020389C002A57
+S31520066B00801C000038A0000B680000207C09FE705F
+S31520066B107D2002787C0048507C00FE707C0900F8B7
+S31520066B20712900477000002B7C084B787C7D421427
+S31520066B304BFAA759390000003CA0002838C000208F
+S31520066B407CFC42148947002A812581B07C0950AEF7
+S31520066B50700900056940005F7C0000D054000FFED6
+S31520066B607D20002655291FFE7D2B003941820010E7
+S31520066B702C8A00244186000898C7002A3908000175
+S31520066B802888000A4085FFBC380100087C9D000045
+S31520066B904186000C7FA3EB784BFBA9257FC3F0F833
+S31520066BA07C63FE707FC31838800102247C0803A606
+S31520066BB0834102088361020C8381021083A1021499
+S31520066BC083C1021883E1021C382102204E80002050
+S31520066BD0380000EB980300003800003E98030001B9
+S31520066BE03800009098030002380000C39803003C42
+S31520066BF09803003E9803003F7C841A1438000055FB
+S31520066C009804FFFE380000AA9804FFFF4E80002055
+S31520066C109421FDD07C0802A692C1020892E1020CBC
+S31520066C209301021093210214934102189361021CC8
+S31520066C309381022093A1022493C1022893E1022C78
+S31520066C40900102347C7B1B787C9E23787CB72B783C
+S31520066C503AC0FFFF70C00100833B003C3B00FFFFAC
+S31520066C60289902007C00002654001FFE7C0000D0D6
+S31520066C707C0900F855290672540006B47C1C4B780C
+S31520066C80408500147F23CB784BFBA8097C7F1B7895
+S31520066C90480000083BE100087FE3FB787F24CB7899
+S31520066CA04BFB3075893E0010801E00147D6049D747
+S31520066CB03BA000004182004C7F63DB7838A00001B0
+S31520066CC07FE6FB78801B002038E000017C0803A6BF
+S31520066CD0A89E000C390000007C9D22144E800021BF
+S31520066CE02C83FFFF41860588881E0010813E0014EE
+S31520066CF07D2901D63BBD00017C9D48404184FFBCD1
+S31520066D00801E00002C8000204086000C839E0008F2
+S31520066D1048000010A81E000E7C00E1D67F80CBD648
+S31520066D203BA00000881E0010813E00147C9DE0409A
+S31520066D307D2901D6A81E000C7F404A144084003CBB
+S31520066D407F63DB787C9DD214801B002038A000014F
+S31520066D507C0803A67FE6FB7838E0000139000000B0
+S31520066D604E8000212C83FFFF418605043BBD000192
+S31520066D707C9DE0404184FFCC801E00002C800020B4
+S31520066D80408600143B80000B3800000F981F000B2E
+S31520066D9048000028680000107C09FE707D200278D5
+S31520066DA07C0048507C00FE707C0900F85529077A3D
+S31520066DB0540007BE7C1C4B783BA000017C9DE0401E
+S31520066DC0881E0029981F000040840018380000FFFE
+S31520066DD07C1FE9AE3BBD00017C9DE0404184FFF46B
+S31520066DE0881E0010813E0014ABBE000C7D2901D6FC
+S31520066DF07D3D4A147C9D4840408400507F63DB7865
+S31520066E007FA4EB78801B002038A000017C0803A60F
+S31520066E107FE6FB7838E00001390000004E8000212D
+S31520066E202C83FFFF41860448817E0014893E00108C
+S31520066E30A81E000C7D2B49D67FBD5A147C004A1409
+S31520066E407C9D00404184FFB8801E00002C800020D7
+S31520066E50408600947FE3FB787F24CB784BFB2EB9C4
+S31520066E6038000052981F0000981F00013940006123
+S31520066E70995F000239600041997F00037D39FA1433
+S31520066E80380000729809FFE49809FFE59969FFE63C
+S31520066E909949FFE7380000AA9809FFFF38000055F0
+S31520066EA09809FFFE380000FF9809FFE89809FFE9D0
+S31520066EB09809FFEA9809FFEB7F63DB7838800001A3
+S31520066EC0801B002038A000017C0803A67FE6FB78FD
+S31520066ED038E00001390000004E8000212C83FFFF98
+S31520066EE04186038C2C970000418600347F63DB782D
+S31520066EF038800000801B002038A000017C0803A6ED
+S31520066F007FE6FB7838E00000390000004E8000213D
+S31520066F102C83FFFF418603584800001C7FE3FB783D
+S31520066F207F24CB784BFB2DF17FE3FB787F24CB7830
+S31520066F304BFFFCA1881E000B981F000D881E001013
+S31520066F40981F0010881E0029389F0003981F0015D9
+S31520066F50807E000438A000084BFAA3312C97000047
+S31520066F6040860050801E00242C8000004086000C9F
+S31520066F70A81B0044901E0024881E00282C80000092
+S31520066F804086000C881B0047981E0028881E00276E
+S31520066F90981F0018801E00245400C23E981F001910
+S31520066FA038000000893E0028981F001B993F001ACA
+S31520066FB0881E000D981F000EA81E000C5400C23E07
+S31520066FC0981F000F881E000F5729C23E981F0011D2
+S31520066FD0A81E000E9B3F000B993F000C5400C23E94
+S31520066FE0981F0012801B00387409FFFF4082001C80
+S31520066FF0881B003B981F0013801B00385400C23E96
+S31520067000981F00144800003C2C99003F40850260DA
+S3152006701038000000981F0013981F0014881B003B99
+S31520067020981F0020801B00385400C23E981F00215E
+S31520067030881B0039981F0022881B0038981F0023BA
+S31520067040A93E000C2C89001F4085000C3B0000063B
+S31520067050480000242C8900023929FFFF7C000026DF
+S3152006706054002FFE7C0000D07F0B00387D2400784C
+S315200670707D782378801E00002C800020408600D84C
+S3152006708038000029981F004239200000993F001633
+S31520067090993F0017881E0017981F0024801E00148B
+S315200670A05400C23E981F0025881E0015570AC23E68
+S315200670B0981F0026897E0014993F0028993F0029AB
+S315200670C0993F002A993F002B38000002981F002C72
+S315200670D0993F002D993F002E993F002F3800000139
+S315200670E0981F0030993F00319B1F0032995F00336D
+S315200670F0997F0027881E0023387E002A981F004382
+S31520067100801E00203BBF00475400C23E981F004405
+S31520067110881E00217FA4EB78981F0045881E002034
+S3152006712038A0000B981F00464BFAA1613C60002749
+S3152006713038636CC07FA4EB7838A000084BFAA14DC3
+S315200671402C970000408600A838000080981F004033
+S315200671504800009C38000029981F0026881E001F1C
+S31520067160981F001C801E001C5400C23E981F001D3E
+S31520067170881E001D981F001E881E001C981F001FB3
+S31520067180881E0023981F0027801E00205400C23E1A
+S31520067190981F0028881E0021981F0029881E002077
+S315200671A0387E002A981F002A881E0017389F002B33
+S315200671B0981F0016801E001438A0000B5400C23EED
+S315200671C0981F00174BFAA0C52C9700004086002072
+S315200671D0801E00006800000C7C09FE707D20027867
+S315200671E07C00485054004630981F00244BFC1D094D
+S315200671F07C7C1B787D39FA142C98FFFF9B89FFFC33
+S315200672005780C23E9809FFFD418600307F63DB78B2
+S315200672107F04C378801B002038A000017C0803A6C3
+S315200672207FE6FB7838E00001390000004E80002119
+S315200672302C83FFFF418600387F63DB783880000089
+S315200672408003002038A000017C0803A67FE6FB7891
+S3152006725038E00001390000004E8000212063FFFF40
+S315200672603063FFFF7C6319107ED618383801000874
+S315200672707C9F00004186000C7FE3FB784BFBA241F6
+S315200672807EC3B378800102347C0803A682C1020835
+S3152006729082E1020C83010210832102148341021823
+S315200672A08361021C8381022083A1022483C10228D2
+S315200672B083E1022C382102304E8000209421FF588B
+S315200672C07C0802A6934100909361009493810098CE
+S315200672D093A1009C93C100A093E100A4900100AC69
+S315200672E07C7D1B783D200028817D0000812999DC44
+S315200672F07C8B48007C9B23787CBA2B783BC0FFFF8F
+S31520067300418600842C8B00004186001080090024CB
+S315200673107C8B0000418600704BFAD3813FE0003D0E
+S3152006732063FF000193E300003F80DFAC801D001061
+S31520067330639C97237C80E000418600487FA3EB78F8
+S31520067340388100884BFAEED17C631B794182001C7A
+S31520067350800100887C80E8004186001080030010AA
+S315200673607C80E000418600144BFAD33193E300007B
+S315200673703860FFFF4800027C83A3001848000008F7
+S3152006738083BD00183D200028817D0000812999DCD7
+S315200673907C8B4800418600382C8B000041860010E5
+S315200673A0800900247C8B0000418600244BFAD2ED0E
+S315200673B03FA0003D63BD000193A300004BFAD2DD3A
+S315200673C093A300003860FFFF4800022838610018A2
+S315200673D0388000384BFB29413BE100507FE3FB78A0
+S315200673E0388000384BFB2931387D00043880FFFF72
+S315200673F04BFBD5452C83FFFF4086000C3860FFFFEC
+S31520067400480001F0801D002C7C0803A67FA3EB789C
+S315200674103C80CB1038A000004E8000212C83000033
+S31520067420408601C4A81D00482C800000408600180E
+S315200674304BFAD2693C00003860000C00900300002D
+S31520067440480001A47FA3EB787FE4FB784BFFF2F19B
+S31520067450736000047C7E1B784082001C3C600027FB
+S3152006746038636CCC7FC4F3784BFB51557FE3FB78AE
+S315200674704BFFEDB9576007BE2C80000141860020E0
+S315200674802C800002418600442C9E0059418500240A
+S315200674903861007A38810042480000382C9E003137
+S315200674A0418500103861007A388100424800002460
+S315200674B0386100187FE4FB7838A000384BFAC145BE
+S315200674C03BE0000148000020386100423881007AFE
+S315200674D038A0000B800100703BE0000090010038C8
+S315200674E04BFA9DA9736000204182000C38000020CB
+S315200674F048000010736000104182000C380000100E
+S315200675009001001838610018809D003880BD003C27
+S315200675107F66DB784BFFEDC12C9A00007C7E1B78BC
+S31520067520418600287F4803A6386100184E80002130
+S3152006753038610018809D003880BD003C7F66DB7868
+S315200675404BFFED957C7E1B787360000440820020FD
+S315200675503C600027809D003880BD003C38636D0066
+S315200675604BFB505D386100184BFFECC12C9E00008A
+S315200675704186001C4BFAD125808300003C600027FB
+S3152006758038636D3C4BFB50A94800005C7FA3EB7823
+S31520067590388100187FE5FB787F66DB784BFFF6752A
+S315200675A07C7E1B78801D002C7FA3EB787C0803A6A7
+S315200675B03C80CB106084003038A000004E8000212D
+S315200675C07FDE1B79418200184BFAD0D180830000DA
+S315200675D03C60002738636D704BFB50553800000120
+S315200675E0901D004C387D00044BFBD1F17FC3F37808
+S315200675F0800100AC7C0803A6834100908361009439
+S315200676008381009883A1009C83C100A083E100A406
+S31520067610382100A84E8000203D6000283D20002607
+S31520067620392971BC912B98104E8000207C6A1B78D4
+S315200676307C69FE702C890000386000004086000CAC
+S315200676402C8A00004D860020386000014E800020DE
+S315200676509421FFF07C0802A6900100147C6A1B790F
+S315200676604082000C3D20002739496D9C7C89FE709E
+S315200676707D2022787C0048507C00FE703921000847
+S315200676807C8B00387D2400787C631B797D64237887
+S315200676903800000090040000418200183D20DFAC2F
+S315200676A080030010612997237C8048004186003894
+S315200676B07D4353784BFAEB617C631B794182001834
+S315200676C03D20DFAC80030010612997237C8048008B
+S315200676D0418600143C600038606380164BFAD03130
+S315200676E038600000800100147C0803A638210010AB
+S315200676F04E8000209421FFF87C0802A69001000CFB
+S315200677003D6038E381230000806300048009006021
+S31520067710616B8E397C6018507C6359D6800900646B
+S315200677207C631E701C63001C7C601A144BFBD209FA
+S315200677308001000C7C0803A6382100084E80002014
+S315200677409421FFF87C0802A69001000C3D6038E3E0
+S31520067750812300008063000480090060616B8E39F6
+S315200677607C6018507C6359D6800900647C631E7041
+S315200677701C63001C7C601A144BFBD0618001000C34
+S315200677807C0803A6382100084E8000209421FFF0AD
+S315200677907C0802A693E1000C9001001438800000B4
+S315200677A04BFFFEB17C7F1B7941820024801F00148B
+S315200677B02C80000041860018387F00243880FFFF81
+S315200677C04BFBD1752C83FFFF4086000C3860FFFFEC
+S315200677D0480000A0A01F009C396000007C8B00009A
+S315200677E04084003C813F005C556030327D204A143F
+S315200677F08009003C2C800000418600148129000463
+S31520067800800900086400400090090008A01F009C1B
+S31520067810396B00017C8B00004184FFCC38000000C8
+S31520067820807F0018B01F009E8003002C7C0803A6CC
+S315200678303C80CB106084001038A0FFFF4E800021CC
+S31520067840807F00188003002C7C0803A63C80CB1082
+S315200678506084003038A000004E80002138000000E9
+S31520067860901F0014387F00244BFBCF713860000030
+S31520067870800100147C0803A683E1000C3821001041
+S315200678804E8000209421FFF07C0802A693C10008B2
+S3152006789093E1000C900100143D2000288009980CE5
+S315200678A02C80000083E300004086004C3C600038B4
+S315200678B0606380234BFACE593D200028800997A87D
+S315200678C02C800000418600283C60002738636DA086
+S315200678D03880000038A0000038C0000038E00000DC
+S315200678E039000000392000004BFAF48D3860FFFF7E
+S315200678F0480000EC5480063E7C0000D0813F0018EC
+S315200679007C00FE70A9290048608B00012C890000A6
+S315200679107C8900387D6000787D2403784086000CBB
+S315200679205480002E600400015489063E2109000277
+S315200679307D0841107D0843B87D0B40F8556B07BC82
+S3152006794039400000614AFF005480042E7C80500096
+S315200679507D2940387D295B78993F00AE4186000C0B
+S315200679605480C23E4800000838000000981F00AF29
+S315200679703D2000288009980C7C0803A64E8000210D
+S315200679807C7E1B78807F00188003002C7C0803A64B
+S315200679903C80CB106084003038A0FFFF4E8000214B
+S315200679A038000000981F00AE807F0018981F00AF91
+S315200679B08003004C2C8000004186000C3BC0FFFF54
+S315200679C0480000188003002C7C0803A63C80CB10B8
+S315200679D038A000004E8000217FC3F3788001001472
+S315200679E07C0803A683C1000883E1000C3821001019
+S315200679F04E8000209421FFF87C0802A69001000CF8
+S31520067A003D200028800997A87C8300404185002CCC
+S31520067A102C8600004086000C3D20002738C96E10B3
+S31520067A203C60002738636DD038E00000390000003E
+S31520067A30392000004BFAF3418001000C7C0803A68E
+S31520067A40382100084E8000209421FF587C0802A683
+S31520067A5093C100A093E100A4900100AC7C7F1B7823
+S31520067A60386100183880000038A000804BFABBDD4C
+S31520067A703BC0000093DF0068807F00188003002C3F
+S31520067A807C0803A63C80CB1038A000004E8000213F
+S31520067A902C83FFFF418606D8813F00188009003CCB
+S31520067AA028800080900100984085000C38000080D0
+S31520067AB09001009838A00000807F001838C1001871
+S31520067AC080030024390000007C0803A6809F0068F6
+S31520067AD080E10098392000004E8000212C83FFFF8C
+S31520067AE04186003838C1009838E00002807F0018A9
+S31520067AF03900000080030024392000007C0803A6F4
+S31520067B0080A3003C809F006838A5FFFE4E8000219A
+S31520067B102C83FFFF4086004C3D200028800997A82D
+S31520067B202C800000418600283C60002738636E14AE
+S31520067B303880000038A0000038C0000038E0000079
+S31520067B4039000000392000004BFAF22D813F00183B
+S31520067B508009004C2C800000418605A048000610AE
+S31520067B6088A1001868A000E97C0000D054000FFE0A
+S31520067B7068A900EB7D2900D055290FFE7C0B4839D4
+S31520067B804182001C386000013880000038C00000A1
+S31520067B9038E0049B4BFFFE6148000560880100998A
+S31520067BA0892100985400402E7D25037868A9AA5578
+S31520067BB07D2900D055290FFE68A0FACE7C0000D07C
+S31520067BC054000FFE7D2B003990A100984182002893
+S31520067BD0386000013CC00027813F001838C66E3C3D
+S31520067BE08089003C38E004A53884FFFE4BFFFE0959
+S31520067BF04800050888010024892100235400402EC8
+S31520067C007D25037890A100982C850000A001009A76
+S31520067C10B01F007C4086004C386000013880000B7F
+S31520067C2038A0000038C0000038E004AF4BFFFDC97D
+S31520067C303D200028800997A828800009408504BC95
+S31520067C403C60002738636E583880000038A0000054
+S31520067C5038C0000038E000003900000048000294D1
+S31520067C60813F00188009003C7C850000418600582B
+S31520067C70386000013880000B38C0000038E004B5B3
+S31520067C804BFFFD753D200028800997A8288000090E
+S31520067C90408504683C60002738636E7838C000004B
+S31520067CA038E0000039000000813F001880A10098C6
+S31520067CB08089003C4800023C8801009B981F00A44E
+S31520067CC04800003C38000000981F00A43800000534
+S31520067CD09001009839400001A17F007C81210098FF
+S31520067CE07D4048307C8058004186FFD03809000107
+S31520067CF02880000F900100984085FFE4881F00A485
+S31520067D002C80000040860020386000013880000B59
+S31520067D10A0BF007C38C0000038E004CB4BFFFCD95E
+S31520067D20480003D88801002C8921002B5400402EB8
+S31520067D307D2903782C8900009121009840860054DD
+S31520067D408801003B8921003A896100395400C00E1A
+S31520067D505529801E7C004B78556B402E892100388C
+S31520067D607C005B787C004B782C8000009001009884
+S31520067D7040860020386000013880002038A00000A8
+S31520067D8038C0000038E004D84BFFFC6D4800036C71
+S31520067D9080810098813F0018909F007880A900383E
+S31520067DA07C842800418600847C84284041840050B7
+S31520067DB0386000013880002038A0000038C0000056
+S31520067DC038E004EA4BFFFC313D200028800997A8BD
+S31520067DD028800009408503243C60002738636EE826
+S31520067DE038C0000038E0000039000000813F001846
+S31520067DF08081009880A90038480000F83D20002898
+S31520067E00800997A828800009408500203C60002725
+S31520067E1038636EB038C0000038E000003900000034
+S31520067E20392000004BFAEF51880100252C800000EE
+S31520067E30B01F007E40860020386000013880000D85
+S31520067E4038A0000038C0000038E004F74BFFFBA935
+S31520067E50480002A8880100282C800000981F00826E
+S31520067E6040860020386000013880001038A00000C7
+S31520067E7038C0000038E005004BFFFB7D4800027C39
+S31520067E808801002F8921002E5400402E7D25037857
+S31520067E902C85000090BF007041860098A01F007CAC
+S31520067EA03D2000027D2903D67C854840408500502A
+S31520067EB0386000013880001638C0000038E0050F0B
+S31520067EC04BFFFB353D200028800997A8288000090E
+S31520067ED0408502283C60002738636F1838C00000AA
+S31520067EE038E0000039000000809F0070A0BF007CAB
+S31520067EF0392000004BFAEE8148000200881F00A4B4
+S31520067F003000FFFF7CA0003028800FF54185000C4D
+S31520067F10380000004800000838000001901F009431
+S31520067F2038000027B01F00A03800002B4800006C40
+S31520067F3038000002901F00948801003F8921003EE8
+S31520067F408961003D5400C00E5529801E7C004B7861
+S31520067F50556B402E8921003C7C005B787C004B7853
+S31520067F602C800000901F0070408600243860000197
+S31520067F703880002438A000003CC0002738C66F4C45
+S31520067F8038E005344BFFFA7148000170380000438B
+S31520067F90B01F00A038000047B01F00A28801003598
+S31520067FA0892100345400402E7D290378913F0074A0
+S31520067FB088010027892100265400402E7D29037832
+S31520067FC0552B043E2C8B0000B13F008040860020B6
+S31520067FD0386000013880000E38A0000038C0000046
+S31520067FE038E0054A4BFFFA1148000110389F0088F1
+S31520067FF038A0000B39410018893F0082801F007087
+S31520068000A07F00A2A11F00A07C0049D67C6A1A1474
+S315200680107C0B0214901F00987D6A4214880B00037D
+S31520068020892B0002896B00015400C00E5529801E3B
+S315200680307C004B78556B402E7D2A40AE7C005B78C3
+S315200680407C004B78901F006C4BFA9241801F00688B
+S315200680502C80000038000000981F0093418600946B
+S315200680603D200028800997A82880000940850028F9
+S315200680703C60002738636F543880000038A0000023
+S3152006808038C0000038E00000390000003920000022
+S315200680904BFAECE52C9E000040860058807F00189F
+S315200680A0800300287C0803A638A00000809F00686D
+S315200680B038C000014E8000212C8300004086003403
+S315200680C0807F00188003002C7C0803A63C80CB10FA
+S315200680D06084001038A0FFFF4E8000217C631B7948
+S315200680E0408200103BC00001907F00684BFFF98C50
+S315200680F0386000004800007C801F0068813F001819
+S3152006810031600001917F0068A80900447C8B0040FD
+S31520068110408400442C8B00014086F9603D200028CF
+S31520068120800997A82C8000004186F9503C600027DC
+S3152006813038636F903880000038A0000038C00000F1
+S3152006814038E0000039000000392000004BFAEC29FF
+S315200681504BFFF9284BFAC5512C83000040860010A8
+S315200681603C600038606322004BFAC5A53860FFFFE5
+S31520068170800100AC7C0803A683C100A083E100A48D
+S31520068180382100A84E8000209421FFE07C0802A614
+S315200681909361000C9381001093A1001493C10018DB
+S315200681A093E1001C900100247C7D1B784BFAC4F9D0
+S315200681B02C9D00003B80FFFF7C7B1B7841860018A8
+S315200681C03D20DFAC801D0010612997237C80480066
+S315200681D0418600183C600038606380164BFAC5312C
+S315200681E03860FFFF480001CC387D00243880FFFF29
+S315200681F04BFBC7452C83FFFF4086000C3860FFFFEC
+S31520068200480001B0801D00142C8000004186001C09
+S31520068210813D00188009004C2C80000041860160B3
+S315200682207FA3EB784BFFF56938000000901D0014FC
+S31520068230386000004BFAC4D97FA3EB784BFFF80DC4
+S315200682402C83FFFF408600204BFAC45D2C8300005A
+S315200682504086012C3C600038606322004BFAC4B18C
+S315200682604800011C3BC000003D2000283BE997DC66
+S31520068270801F00042C8000004186001C7C0803A673
+S31520068280809F00087FA3EB784E8000212C83000078
+S31520068290418600143BDE0001289E00033BFF000CAE
+S315200682A04085FFD02C9E0004418600D43BC00000AA
+S315200682B03D2000283BE997AC801F00042C80000057
+S315200682C04186001C7C0803A6809F00087FA3EB78C6
+S315200682D04E8000212C830000418600143BDE0001DF
+S315200682E0289E00033BFF000C4085FFD02C9E0004F1
+S315200682F04186008C7F63DB784BFAC4153D20002827
+S315200683008009980C2C80000038000001901D00146E
+S315200683104186006C881D00AC2C80000041860060DA
+S315200683208BFD00AE2C9F0000408600547FA3EB7881
+S315200683303C80002738846D9C38A0000038C0000099
+S31520068340480009497C7C1B782C9CFFFF41860050FF
+S31520068350889D00AD881D00AC5484402E7C0423786D
+S315200683604BFFF5252C83000041860014881D00ACA2
+S315200683702C8000014186000893FD00142C9CFFFFEB
+S315200683804186001C813C0004800900087F83E3782F
+S31520068390540000809009000848000D15387D0024F9
+S315200683A04BFBC439807D00143063FFFF7C631910B4
+S315200683B0800100247C0803A68361000C83810010BB
+S315200683C083A1001483C1001883E1001C38210020F4
+S315200683D04E8000209421FFE87C0802A6938100089F
+S315200683E093A1000C93C1001093E100149001001C88
+S315200683F07C7C1B7883BC00003880FFFF3BBD0024B5
+S315200684007FA3EB784BFBC531813C0004A0090044D1
+S315200684107FA3EB783000FFFFB00900443800000048
+S31520068420901C003C4BFBC3B58001001C7C0803A6B0
+S315200684308381000883A1000C83C1001083E1001408
+S31520068440382100184E8000209421FFE87C0802A6D9
+S3152006845093A1000C93C1001093E100149001001C17
+S315200684607C7E1B78387E00243880FFFF4BFBC4C9F0
+S315200684702C83FFFF3BE000003BA000004086001453
+S3152006848038600000480000E07D3F4B784800003801
+S31520068490A01E009C813E005C540030327C090214EA
+S315200684A07C890040408400207C0B03788009003CB0
+S315200684B02C8000004186FFD4392900407C8958400B
+S315200684C04184FFEC2C9F00004086001C3C6000384F
+S315200684D0606380174BFAC239480000807D3D4B7891
+S315200684E0480000607FE3FB78388000404BFB182964
+S315200684F093DF000038000001813F0000901F003CFA
+S31520068500A009009E30000001B009009EA01E009C16
+S31520068510813E00601C0000487C0902147C890040CC
+S31520068520408400207C0B0378A00900442C800000A0
+S315200685304186FFAC392900487C8958404184FFECA6
+S315200685407FA3EB78388000484BFB17CD3800000117
+S31520068550B01D004493BF0004387E00244BFBC27D29
+S315200685607FE3FB788001001C7C0803A683A1000C10
+S3152006857083C1001083E10014382100184E800020A4
+S315200685809421FFE07C0802A69361000C93810010DB
+S3152006859093A1001493C1001893E1001C90010024B6
+S315200685A07C7D1B783880FFFF837D0000801D0004BC
+S315200685B0387B00243380001883DB00604BFBC379AD
+S315200685C0A01B009C396000007C8B00004084008044
+S315200685D03BFE0044A01F00002C8000004186005868
+S315200685E0807D00047C9E18004186004C801FFFC4B7
+S315200685F07409C00040820040801FFFD8813C0004D9
+S315200686007C80480040860030801FFFDC813C0008C5
+S315200686107C80480040860020388000484BFB16F9AF
+S3152006862093DD0004A01F000030000001B01F0000EB
+S315200686304800001CA01B009C396B00017C8B0000A7
+S315200686403BFF00483BDE00484184FF8C387B0024F4
+S315200686504BFBC189800100247C0803A68361000C9C
+S315200686608381001083A1001483C1001883E1001CB6
+S31520068670382100204E8000209421FFD07C0802A6B7
+S31520068680934100189361001C9381002093A1002436
+S3152006869093C1002893E1002C900100347C7F1B783F
+S315200686A07CBD2B787CDE33783B40FFFF398000008B
+S315200686B0801F0008813F00047C9D00003960000071
+S315200686C08369000083890004917F0010919F00141E
+S315200686D040860018801F000C7C9E00004086000CF9
+S315200686E0386000004800026C817F0004880B004633
+S315200686F070090010418200183900FFFF3CE07FFF19
+S3152006870060E7FFFF90EB0000910B0004813F000419
+S31520068710800900007C9D00004185001440860020CB
+S31520068720800900047C9E00404085001493BF0010FB
+S3152006873093DF00143860000048000218801F0018D6
+S315200687402C80000041860084801F001C2C8000009F
+S315200687504086004439200001913F001C801F0018E6
+S31520068760813F00003000FFFF901F0018896900A492
+S31520068770801F001C7C0058307C0A0378817F000805
+S31520068780819F000C392000007D4A60107D295910F2
+S3152006879048000030817F000080FF0008811F000C02
+S315200687A0A00B007C3000FFFF7C0A03787C09FE7054
+S315200687B07CEB48387D0C50387D4C40107D2B39108B
+S315200687C0913F0008915F000C801F00087C80E8001E
+S315200687D04185002040860010801F000C7C80F040DA
+S315200687E041850010801F00182C800000408600540A
+S315200687F0813F00048149000481290000314AFFFF98
+S315200688007D2901D47C89E8007FA3EB787FC4F378A1
+S31520068810418500184086000C7C8AF0404185000C74
+S315200688207D234B787D445378813F000088A900A498
+S31520068830480070D17C8523783880FFFF4800007871
+S31520068840813F00048149000481290000314AFFFF47
+S315200688507D2901D47C89E8007FA3EB787FC4F37851
+S31520068860418500184086000C7C8AF0404185000C24
+S315200688707D234B787D445378801F000C813F000072
+S315200688807CA02050880900A4813F001C7CA50430CA
+S315200688907C8548404084001C7D254850801F001852
+S315200688A0913F001C7C002A14901F001848000028BF
+S315200688B0809F0018813F0000812900208009000C36
+S315200688C07C0803A67FE3FB784E8000212C83FFFFDE
+S315200688D041860070813F000493BF000893DF000C99
+S315200688E0800900007C9D00003B4000004086005425
+S315200688F0800900047C9E000040860048817F000097
+S31520068900A00B007C3000FFFF7C0A03787C09FE70F2
+S315200689107FAB48387FCC50382C8B0000408600240D
+S315200689202C8C00004086001C801F001C813F0018EE
+S315200689303000FFFF901F001C39290001913F0018C7
+S31520068940813F00047F43D37893690000938900040E
+S31520068950800100347C0803A6834100188361001C2D
+S315200689608381002083A1002483C1002883E1002C73
+S31520068970382100304E8000209421FFD87C0802A69C
+S3152006898093A1001C93C1002093E100249001002CA2
+S315200689907C7F1B78800400045400003C7C0C037802
+S315200689A07C0BFE70801F00087C80580040860018CD
+S315200689B0801F000C7C8060004086000C386000001A
+S315200689C0480000C0813F0004800900182C80FFFF64
+S315200689D0408600A0815F0000812A001C81090024B0
+S315200689E02C8800004186008C880A00A47D00003071
+S315200689F07C0A0378392000007C89580041850024AA
+S31520068A004086000C7C8A6040418500183C60003810
+S31520068A10606380164BFABCF93860FFFF4800006495
+S31520068A2083BF0000917F0008919F000C88BD00A49B
+S31520068A307D635B787D84637848006EC9813D001C22
+S31520068A407C6B1B787C8C237880090020813F000074
+S31520068A507C006214901F00188129001C80090024BE
+S31520068A60386000007C0C0050901F001C4800001443
+S31520068A707FE3FB787D655B787D8663784BFFFBFD20
+S31520068A808001002C7C0803A683A1001C83C100203C
+S31520068A9083E10024382100284E8000209421FF28D7
+S31520068AA07C0802A693A100CC93C100D093E100D402
+S31520068AB0900100DC7C7D1B783BE100887FE3FB7818
+S31520068AC07FA4EB78813D000038A0004083C9001CB6
+S31520068AD04BFAAB31813D0004800900182C80FFFF3C
+S31520068AE041860074380000009001001C801E000498
+S31520068AF07C0803A67FE3FB783881001838A000009F
+S31520068B004E8000212C83FFFF41860058801E0004DC
+S31520068B107C0803A67FE3FB783881001838A000007E
+S31520068B204E8000212C83FFFF41860038801E0004DC
+S31520068B307C0803A67FE3FB783881001838A000005E
+S31520068B404E8000212C83FFFF4086000C38600000F3
+S31520068B50480000143C6000386063800F4BFABBB1B6
+S31520068B603860FFFF800100DC7C0803A683A100CCC9
+S31520068B7083C100D083E100D4382100D84E8000205E
+S31520068B809421FFE87C0802A693A1000C93C100104D
+S31520068B9093E100149001001C7C7F1B78817F0004E2
+S31520068BA0880B004670090010813F000041820010A4
+S31520068BB03C60003860638015480000AC800B0000DE
+S31520068BC07C80280040860018800B00047C803000BC
+S31520068BD04086000C3860000048000094800B000098
+S31520068BE07C850000418500144086001C800B00040D
+S31520068BF07C860040408500103C6000386063050096
+S31520068C0048000064881F00382C80000041860050EA
+S31520068C1090AB000090CB00043860000083A9001CAE
+S31520068C2048006C49801D00087C0803A67C651B78D5
+S31520068C307FE3FB78388000024E8000212C830000DB
+S31520068C4040860028813F000480090008386000001D
+S31520068C506400200090090008480000143C60003893
+S31520068C6060630C004BFABAA93860FFFF8001001C2E
+S31520068C707C0803A683A1000C83C1001083E100149F
+S31520068C80382100184E8000209421FFD07C0802A6A9
+S31520068C9092E1000C930100109321001493410018D1
+S31520068CA09361001C9381002093A1002493C1002880
+S31520068CB093E1002C900100347C9A23787CBC2B7897
+S31520068CC07CDB33783BE000007C7E1B793B00000092
+S31520068CD03AE000003B200001418200183D20DFAC2F
+S31520068CE0801E0010612997237C804800418600104B
+S31520068CF03C60003860638016480000242C9A0000E9
+S31520068D00418600147F43D3784BFAAA55288300FF61
+S31520068D10408500183C60003860631F004BFAB9F1A5
+S31520068D203860FFFF4800028C387E00243880FFFF1B
+S31520068D304BFBBC052C83FFFF41860238801E0014A0
+S31520068D402C8000003B00000141860038807E0018FA
+S31520068D508003002C7C0803A63C80CB10608400018F
+S31520068D6038A000004E8000212C83FFFF4186001488
+S31520068D70813E00188009004C2C8000004186001494
+S31520068D807FC3F3784BFFF4052C83FFFF418601E46E
+S31520068D9057690426817E0018692940003129FFFF7C
+S31520068DA07D294910A96B00487D2048F82C8B0000A8
+S31520068DB0540004207F6948387D3B03784086001C92
+S31520068DC073800603418200143C60000C6063000534
+S31520068DD04BFAB93D4800019C7FC3F3784BFFF66DED
+S31520068DE07C7F1B794182018C4BFAB8BD7C7D1B7832
+S31520068DF0386000004BFAB9193CA00002813E001CDF
+S31520068E0060A50F00800900007FE3FB787C0803A697
+S31520068E107F44D3787F8528387CA5DB784E80002151
+S31520068E202C83FFFF408600204BFAB87D2C8300005A
+S31520068E30408601403C600038606380024BFAB8D118
+S31520068E40480001307FA3EB784BFAB8C57FE3FB7861
+S31520068E504BFFF731813F000488090046700900015F
+S31520068E604182001C7380000F418200143C6000384A
+S31520068E7060630C004BFAB899480000F85780073E05
+S31520068E80981F0038387E00244BFBB951813F0004D9
+S31520068E9088090046700900103B0000004082002425
+S31520068EA0738002004182001C576004262C804000F5
+S31520068EB0408600103C6000386063801148000058E8
+S31520068EC03C000001600004007F890039418200A031
+S31520068ED07FE3FB783880FFFF4BFFE81D801F003CB1
+S31520068EE02C8000003AE00001408600143C600038E1
+S31520068EF0606380164BFAB81948000078813F000453
+S31520068F00800900087409C000418200183C600038B8
+S31520068F10606380024BFAB7F93B20000148000054F3
+S31520068F20738004004182002C8BBF00383800000273
+S31520068F30981F00387FE3FB7838C0000038A0000071
+S31520068F404BFFFC412C83FFFF9BBF00384186002444
+S31520068F507780000141820018813E002080090004A6
+S31520068F607C0803A67FE3FB784E8000213B20000089
+S31520068F702C9800004186000C387E00244BFBB85DF9
+S31520068F802C9700004186000C7FE3FB784BFFE7B564
+S31520068F902C990000418600182C9F00004186FD84EE
+S31520068FA07FE3FB784BFFF4314BFFFD787FE3FB78BD
+S31520068FB0800100347C0803A682E1000C83010010A0
+S31520068FC083210014834100188361001C83810020BD
+S31520068FD083A1002483C1002883E1002C3821003098
+S31520068FE04E8000209421FFE87C0802A693A1000C5F
+S31520068FF093C1001093E100149001001C7C7D1B7820
+S3152006900060A5060038C0000060C680004BFFFC7DC8
+S315200690107C7F1B782C9FFFFF4086000C3860FFFF65
+S31520069020480000707FE3FB783880FFFF4BFFE6C9D8
+S31520069030801F003C2C80000041860014813F0004DE
+S31520069040800900087409C000418200183C60003877
+S31520069050606380024BFAB6B93BE0FFFF4800002862
+S315200690603860000083BD001C48006801801D00088A
+S315200690707C0803A67C651B787FE3FB783880000195
+S315200690804E8000217FE3FB784BFFE6B97FE3FB7832
+S315200690908001001C7C0803A683A1000C83C1001056
+S315200690A083E10014382100184E8000209421FFD831
+S315200690B07C0802A6930100089321000C9341001018
+S315200690C0936100149381001893A1001C93C100207C
+S315200690D093E100249001002C7C7F1B78201F000042
+S315200690E07D20F914201FFFFF216000007C0B011450
+S315200690F07D2B03793BA0FFFF3B00000083DF0004A6
+S3152006910040820028801F003C2C8000004186001CDF
+S31520069110817F00003D20DFAC800B0010612997235C
+S315200691207C804800418600183C60003860638016C3
+S315200691304BFAB5DD3860FFFF480001EC7FE3FB788C
+S315200691403880FFFF7D795B784BFFE5AD2C83FFFFEB
+S315200691504086000C3860FFFF480001CC801E0008C0
+S3152006916074094000418200143C6000386063140094
+S315200691704BFAB59D48000150A019009E3000FFFF0E
+S31520069180B019009E801E00082C8000004084001C1A
+S315200691904BFAB5093C000038600015009003000024
+S315200691A03B00000148000120881E00467009001079
+S315200691B04082011081390018A80900482C80000039
+S315200691C041860058801F00247409FFFF4182004C07
+S315200691D0386000008BBF00248399001C33BDFFFF37
+S315200691E07FBDE9107FA0E8F85400077A57BD07BC73
+S315200691F07FBD037848006675801C00087C0803A698
+S315200692007C651B787FE3FB787FA4EB784E80002174
+S3152006921038000000981F0024881F00252C80000097
+S315200692204086001C801E0008740920004182009496
+S31520069230A01E00442C80000140860088A01E004403
+S315200692402C80000140860070801E00002C800000C5
+S3152006925040860010801E00042C80000041860018DF
+S31520069260813E0000815E0004336AFFFF7F4901D4F8
+S315200692704800000C3B6000003B4000007FE3FB7883
+S315200692807F45D3787F66DB784BFFF3F18139002063
+S31520069290800900087C0803A67FE3FB78809F0018D8
+S315200692A038A000014E800021801E0008540000C20E
+S315200692B0901E00083B00000138000000981F00257C
+S315200692C03BA000002C98000041860018813900201A
+S315200692D0800900247C0803A67FE3FB784E800021C4
+S315200692E07FE3FB784BFFE45D7FE3FB784BFFF0E9FA
+S315200692F0A019009E212000007C0901147C09C3794F
+S3152006930041820020807900188003002C7C0803A661
+S315200693103C80CB106084001038A000004E800021CF
+S315200693207FA3EB788001002C7C0803A68301000826
+S315200693308321000C83410010836100148381001869
+S3152006934083A1001C83C1002083E100243821002844
+S315200693504E8000209421FFE07C0802A69361000C33
+S315200693609381001093A1001493C1001893E1001C69
+S31520069370900100247C7F1B783880FFFF83DF000066
+S315200693804BFFE3752C83FFFF3BA0FFFF3B800000CE
+S315200693904086000C3860FFFF48000114801F003C01
+S315200693A02C8000003B600001408600143C6000389B
+S315200693B0606380164BFAB359480000D0813F0004FB
+S315200693C08129000875204000418200143C6000383F
+S315200693D0606314004BFAB339480000B02C890000AC
+S315200693E0418400A4387E00243880FFFF4BFBB54914
+S315200693F02C83FFFF41860094813F0004880900469E
+S31520069400700900103B800001418200147FE3FB783F
+S315200694104BFFF68D2C83FFFF41860070813E001C94
+S31520069420800900087C0803A67FE3FB7838800100C4
+S3152006943038A000004E8000212C83FFFF4186004C79
+S31520069440813F000480090008640080009009000816
+S31520069450813F00048009000C2C80000041860028EC
+S31520069460813E0020800900087C0803A67FE3FB785E
+S315200694703880FFFF38A000004E8000212C83FFFF96
+S31520069480418600083BA000002C9C00004186000C6B
+S31520069490387E00244BFBB3452C9B00004186000CEE
+S315200694A07FE3FB784BFFE29D7FA3EB7880010024C8
+S315200694B07C0803A68361000C8381001083A1001417
+S315200694C083C1001883E1001C382100204E8000202D
+S315200694D09421FFE87C0802A69381000893A1000C3C
+S315200694E093C1001093E100149001001C38A00001DE
+S315200694F038C000004BFFF7957C7F1B782C9FFFFF1B
+S315200695004186002C4BFFFE517C7C1B784BFAB19989
+S315200695107C7D1B787FE3FB784BFFFB957FA3EB785F
+S315200695204BFAB1ED7F83E378480000083860FFFFE9
+S315200695308001001C7C0803A68381000883A1000CF9
+S3152006954083C1001083E10014382100184E800020C4
+S315200695509421FFD87C0802A69321000C9341001083
+S31520069560936100149381001893A1001C93C10020D7
+S3152006957093E100249001002C7C7F1B787C9923782C
+S31520069580837F0004839F000083BF001083DF0014BF
+S3152006959080BB000080DB0004835C00184BFFF0DDF7
+S315200695A02C83FFFF4086000C3860FFFF480001F041
+S315200695B0801B00002C80000041850014408601C0D7
+S315200695C0801B000428800000408501B4A01C007C76
+S315200695D0817F0008819F000C3000FFFF7C0A0378FC
+S315200695E07C09FE707D6748387D8850382C870000B8
+S315200695F04086000C2C8800004186018480DF001CF2
+S31520069600801F001838C6FFFF90DF001C30000001BF
+S31520069610901F001880BF000880DF000CA01C007C6D
+S315200696207C86F0107C65E9107C08037838E000001B
+S315200696303000FFFF7C0A03787C09FE707CAB483835
+S315200696407CCC50387D0C40107CEB39107C8718007A
+S31520069650418500184086000C7C8820404185000CF8
+S315200696607CE33B787D044378813F0008815F000CCC
+S315200696707D4A20147D291914913F0008915F000C1C
+S31520069680913B0000915B0004480000F4801F001CFB
+S315200696902C80000040860024813C002080090000A2
+S315200696A07C0803A67FE3FB787F24CB784E800021B7
+S315200696B02C83FFFF4186FEF4801A002C7F43D37845
+S315200696C07C0803A63C80CB1080BF0018608400501F
+S315200696D04E8000212C83FFFF4186FED0A01C007CF5
+S315200696E0813F0008815F000C7C0C037839600000FE
+S315200696F07D0AF0107CE9E9107C8B3800418500183C
+S315200697004086000C7C8C40404185000C7D675B784A
+S315200697107D886378813F0008815F000C7D4A40146E
+S315200697207D293914913F0008915F000C913B00007A
+S31520069730915B0004A01C007C813F0008815F000C21
+S315200697403000FFFF7C0C03787C0BFE707D27583893
+S315200697507D4860382C870000408600242C8800002F
+S315200697604086001C801F0018813F001C3000000127
+S31520069770901F00183929FFFF913F001C801F000803
+S315200697807C9D00004185FF0840860010801F000C46
+S315200697907C9E00404185FEF8386000008001002C42
+S315200697A07C0803A68321000C8341001083610014E4
+S315200697B08381001883A1001C83C1002083E1002435
+S315200697C0382100284E8000209421FFC87C0802A656
+S315200697D09281000892A1000C92C1001092E1001419
+S315200697E0930100189321001C9341002093610024C5
+S315200697F09381002893A1002C93C1003093E1003475
+S315200698009001003C7C7F1B787C9823787CB72B784C
+S315200698107CD533787EFABB783A800001201F00007B
+S315200698207D20F914201FFFFF216000007C0B011408
+S315200698307D2B0379839F0000837F0004833C0018D9
+S31520069840408200183D20DFAC801C0010612997233A
+S315200698507C804800418600143C6000386063801690
+S315200698604BFAAEAD480005FC801C00142C80000087
+S31520069870418600108019004C2C8000004186001479
+S315200698803C600038606314004BFAAE85480005D468
+S31520069890881B004670090010418200143C6000387F
+S315200698A0606380154BFAAE69480005B82C97000010
+S315200698B04086000C38600000480005AC7FE3FB7844
+S315200698C03880FFFF4BFFDE312C83FFFF4186059450
+S315200698D0801F003C2C800000408600143C60003827
+S315200698E0606380164BFAAE29480004E0813B0008E7
+S315200698F075204000418200143C60003860631400E5
+S315200699004BFAAE0D480004C42C890000408400148E
+S315200699103C600038606315004BFAADF5480004AC90
+S31520069920813F00102C89000040860010801F0014FD
+S315200699302C8000004186003C801B00007C890000AC
+S315200699404185003040860014801F0014813B0004A8
+S315200699507C8048404185001C80BF001080DF0014B3
+S315200699607FE3FB784BFFED152C83FFFF4186045CD6
+S315200699702C950001408600BC881F00382C800001EB
+S31520069980408600143C600038606319004BFAAD81AE
+S3152006999048000438801F00102C80000040860010E6
+S315200699A0801F00142C800000418600143C6000387D
+S315200699B0606320004BFAAD594800040C801F00084E
+S315200699C0813B00007C80480040860014801F000CE6
+S315200699D0813B00047C804800418603EC3800000168
+S315200699E0981F00247EE8BB78817B0000819B0004BB
+S315200699F0813F0008815F000C7EE7FE707D8A60103D
+S31520069A007D6959107C8B38003AA000003AC00000C8
+S31520069A10418500184086000C7C8C40404185000C10
+S31520069A207D675B787D8863787D1743784800009844
+S31520069A30881F00382C800000408600143C600038C1
+S31520069A4060630C004BFAACC948000380A01C007E5C
+S31520069A50893C00A47C0048307C970000813F00109A
+S31520069A604CE623827C000026540047FE2C89000003
+S31520069A707C0000D0540007C0641680004086001083
+S31520069A80801F00142C800000418600187FE3FB7897
+S31520069A907EC4B3784BFFFABD2C83FFFF4186032C89
+S31520069AA03AA00001801B00083A80000064002000CE
+S31520069AB0901B000838000001981F0025380000007A
+S31520069AC0981F0024801F001C2C80000083BB000CDE
+S31520069AD040860024813C0020800900007C0803A6DD
+S31520069AE07FE3FB787EC4B3784E8000212C83FFFF6C
+S31520069AF0418602D82C9D000040860048813C001CE9
+S31520069B00800900087C0803A67FE3FB7838800000DE
+S31520069B1038A000004E8000212C83FFFF40860024BB
+S31520069B20801B000864004000901B0008813F00004F
+S31520069B30A009009E3000FFFFB009009E4800028C57
+S31520069B40A17C007C813F000C380BFFFF7D3D003950
+S31520069B507EFABB78418200C07C1D58507D20B81005
+S31520069B607D2949107D294BB87C0048387EE5487802
+S31520069B707C1E2B787F23CB787FA5EB787F06C37850
+S31520069B80801900247FC7F3787C0803A67EA8AB78C5
+S31520069B90809F0018393F00204E8000212C83FFFF2E
+S31520069BA0418602287FCAF3783920000080FF000804
+S31520069BB0811F000C7D4A40147D293914913F0008E7
+S31520069BC0915F000CA01C007C3000FFFF7C0C037804
+S31520069BD07C0BFE707D2758387D4860382C87000020
+S31520069BE07F5EB8507F18F2143800000040860028A1
+S31520069BF02C88000040860020901F0020813F0018F8
+S31520069C00801F001C39290001913F00183000FFFFF4
+S31520069C10901F001CA01C007C7C9A0040418400D426
+S31520069C20801F001C2C80000040860024813C0020DA
+S31520069C30800900007C0803A67FE3FB787EC4B37800
+S31520069C404E8000212C83FFFF418601807F23CB781F
+S31520069C507F06C378881C00A4817F001C7F5E0430A3
+S31520069C607C1E58107C0001107C0003B87FC9003882
+S31520069C707D6000787D3E0378801900207EA7AB782C
+S31520069C807C0803A639000000809F00187FC5F3785C
+S31520069C904E8000212C83FFFF41860130881C00A4BC
+S31520069CA0817F0008819F000C7FDD00307FAAEB783C
+S31520069CB07FA9FE707D4A60147D295914913F0008BC
+S31520069CC0915F000C817F0018801F001C7D6BF214AB
+S31520069CD0917F00187C1E0050901F001CA01C007C43
+S31520069CE07F5DD0507C9A00407F18EA144084FF346A
+S31520069CF02C9A00007F5ED378418600CC801F001CFC
+S31520069D002C80000040860024813C0020800900002B
+S31520069D107C0803A67FE3FB787EC4B3784E800021B9
+S31520069D202C83FFFF418600A4813B0000801F00088C
+S31520069D307C8900004185003C40860014801B000477
+S31520069D40813F000C7C804840418500288019002CE4
+S31520069D507F23CB787C0803A63C80CB1080BF0018D7
+S31520069D60608400504E8000212C83FFFF4186005CD4
+S31520069D707F23CB7838A000007F06C3788003002493
+S31520069D807FC7F3787C0803A67EA8AB78809F001849
+S31520069D90393F00204E8000212C83FFFF4186002C70
+S31520069DA07F5ED0507FCAF378817F0008819F000CA2
+S31520069DB0392000007D4A60147D295914913F0008F8
+S31520069DC0915F000C3A8000006AA900012009000074
+S31520069DD07D2049147C17D0107C0001107C0000D011
+S31520069DE07D2B003941820064813F0008801B0000DC
+S31520069DF07C8900004185001840860024801F000CBF
+S31520069E00813B00047C80484040850014813F000841
+S31520069E10815F000C913B0000915B000438600000D6
+S31520069E2083BC001C48005A45801D00087C0803A6F2
+S31520069E307C651B787FE3FB78388000064E80002100
+S31520069E4038000000981F00257FE3FB784BFFD8F5E6
+S31520069E502C9400004086000C7C7AB85048000008F6
+S31520069E603860FFFF8001003C7C0803A6828100083B
+S31520069E7082A1000C82C1001082E100148301001821
+S31520069E808321001C834100208361002483810028CE
+S31520069E9083A1002C83C1003083E1003438210038A9
+S31520069EA04E8000209421FFF87C0802A69001000C23
+S31520069EB038C000014BFFF9158001000C7C0803A66B
+S31520069EC0382100084E8000209421FFF87C0802A63F
+S31520069ED09001000C38C000024BFFF8F18001000CFF
+S31520069EE07C0803A6382100084E8000209421FFE82E
+S31520069EF07C0802A69381000893A1000C93C100104A
+S31520069F0093E100149001001C7C7C1B787C9F2378AF
+S31520069F107FE3FB783880004883DC000483BC00009E
+S31520069F204BFAFDF538000001B01F000A93BF00006A
+S31520069F30801E0004901F0014807E0000809E000470
+S31520069F404BFFD6ED2C8300004186000C3800FFFF20
+S31520069F50901F0014A13D007E897D00A4801F001459
+S31520069F607D2958307C004A147C004B96913F00246C
+S31520069F70901F0028380001FF893E0046B01F0008C2
+S31520069F80993F002C881E0046700900014182000C6C
+S31520069F903800016DB01F0008881E004670090010A3
+S31520069FA04182001CA01F0008813F0024600040005B
+S31520069FB0B01F0008913F001448000010A01F00089B
+S31520069FC060008000B01F0008813D001C8009000C3F
+S31520069FD07C0803A67F83E3787FE4FB784E80002106
+S31520069FE02063FFFF3063FFFF7C6319108001001C8E
+S31520069FF07C0803A68381000883A1000C83C1001078
+S3152006A00083E10014382100184E8000209421FFD0C9
+S3152006A0107C0802A6934100189361001C93810020B8
+S3152006A02093A1002493C1002893E1002C90010034CB
+S3152006A0307C7B1B787C9D23783B400000935D00004B
+S3152006A040813B0000A009007E892900A47C004830B7
+S3152006A050901D0004813B000080090084901D0008A5
+S3152006A060813B000081290020800900107C0803A678
+S3152006A0704E800021839B000088BC00A4480058859A
+S3152006A080A01C007E7C06037838A00000480058B540
+S3152006A0907C802378901D000C901D00103800FFFF51
+S3152006A0A0901D0014901D0018813B000038600000AA
+S3152006A0B08009006C935D0020901D001C80010034F1
+S3152006A0C07C0803A6834100188361001C8381002037
+S3152006A0D083A1002483C1002883E1002C3821003087
+S3152006A0E04E8000209421FE487C0802A69321019CDE
+S3152006A0F0934101A0936101A4938101A893A101AC88
+S3152006A10093C101B093E101B4900101BC7C7A1B781E
+S3152006A1107C8323793B20FFFF83DA000441820010EB
+S3152006A120880300002C800000408600103C60000C4E
+S3152006A13060630007480001AC3881019038A1009081
+S3152006A1404BFAB7152C8300004086019C816101904D
+S3152006A150801A00007C8B0000418600103C60003887
+S3152006A160606380124800017C812B0018A8090048EC
+S3152006A1702C800000408600103C60000C60630005C1
+S3152006A18048000160812B001C8009000C7C0803A670
+S3152006A1907F43D378388100184E8000212C83FFFF19
+S3152006A1A04186014480610190388100903CA00002DE
+S3152006A1B060A5020138C000004BFFEAD17C7F1B78E0
+S3152006A1C02C9FFFFF41860120801F00047C80F00023
+S3152006A1D0418601003880FFFF7C1D03784BFFD51989
+S3152006A1E02C83FFFF41860178806101903880FFFF2E
+S3152006A1F0386300244BFBA74180610190800300143D
+S3152006A2002C80000041860010813D00087520400004
+S3152006A210418200143C600038606301004BFAA4F1C9
+S3152006A2204800013C2C89000040840018386300242D
+S3152006A2304BFBA5A97FE3FB784BFFD5094BFFFF68B0
+S3152006A240881D004670090010418200143C600038C3
+S3152006A250606380154BFAA4B9480001043B8100606F
+S3152006A2607F83E3783BDE00187FC4F378801D0008E1
+S3152006A27038A0002C64008000901D00084BFA9385B8
+S3152006A2807FC3F3783B7D00187F64DB7838A0002CEB
+S3152006A2904BFA9371812101908129001C80090008BF
+S3152006A2A07C0803A67F43D37880A100383880000136
+S3152006A2B04E8000212C83FFFF408600347FC3F3782F
+S3152006A2C07F84E37838A0002C4BFA93394800009017
+S3152006A2D07FE3FB784BFFEDD93C6000386063801640
+S3152006A2E04BFAA42D3860FFFF480000BC7FC3F378E5
+S3152006A2F07F84E37838A0002C4BFA930981210190BC
+S3152006A3008129001C800900087C0803A67F43D37890
+S3152006A3103880010038A000004E8000217FC3F378E4
+S3152006A3207F64DB7838A0002C4BFA92D9801D000C6E
+S3152006A3302C8000004186002481210190812900205D
+S3152006A340800900087C0803A67FE3FB783880FFFF98
+S3152006A35038A000004E8000213B200000806101903D
+S3152006A360386300244BFBA4757FE3FB784BFFD3D5DC
+S3152006A3704BFAA3357C7D1B787FE3FB784BFFED31CB
+S3152006A3807FA3EB784BFAA3892C990000408600140C
+S3152006A3907F43D3783880000238A0FFFF4800032980
+S3152006A3A07F23CB78800101BC7C0803A68321019CF0
+S3152006A3B0834101A0836101A4838101A883A101AC05
+S3152006A3C083C101B083E101B4382101B84E80002053
+S3152006A3D09421FFC87C0802A69321001C93410020E5
+S3152006A3E0936100249381002893A1002C93C1003009
+S3152006A3F093E100349001003C7C7F1B787C84237992
+S3152006A400813F0004835F00008329000C40820010F0
+S3152006A4103C600038606380164800005880040000BF
+S3152006A4202C8000004086001C800400042C8000003E
+S3152006A430408600103C600038606305004800003402
+S3152006A440813F0004880900467009001041820010E9
+S3152006A4503C6000386063801548000018881F003865
+S3152006A4602C800000408600183C60003860630C0093
+S3152006A4704BFAA29D3860FFFF480001988004000031
+S3152006A4802C80FFFF40860018800400042C80FFFFE6
+S3152006A4904086000C3880FFFF48000030A01A007C5A
+S3152006A4A088BA00A481640000818400047C0A0378AB
+S3152006A4B0392000007D4A60147D295914308AFFFF11
+S3152006A4C07C6901D44800543D813A00208009001455
+S3152006A4D07C0803A67FE3FB784E8000212C83FFFFB2
+S3152006A4E04186FF943BC00000813F00043BA000004C
+S3152006A4F093A9000093C90004813A001C800900082C
+S3152006A5007C0803A67FE3FB783880000038A000008D
+S3152006A5104E8000212C83FFFF4186FF5C2C9900008C
+S3152006A520418600C8813F000483A9000C9329000CAC
+S3152006A530813A0020800900087C0803A67FE3FB7881
+S3152006A5403880FFFF38A000004E800021813F00049E
+S3152006A55093A9000C815F0004A00A004438C00001BC
+S3152006A5607C860000813F000080E9005C4084007CF8
+S3152006A57038A0000039070018812800243009FFFF7B
+S3152006A5807D2049107CE0FA783160FFFF7C0B0110B4
+S3152006A5907D2B00394182003C8008FFEC7C805000F0
+S3152006A5A04086003038C600013B8000003B60000034
+S3152006A5B08128FFF08148FFF49368FFF09388FFF423
+S3152006A5C090A8000490A800009128FFF89148FFFC67
+S3152006A5D0815F0004A00A00447C86000039080040FA
+S3152006A5E038E700404184FF94813A00208009000C18
+S3152006A5F07C0803A67FE3FB783880FFFF38A000009F
+S3152006A6004E8000212063FFFF3063FFFF7C63191015
+S3152006A6108001003C7C0803A68321001C8341002080
+S3152006A620836100248381002883A1002C83C1003006
+S3152006A63083E10034382100384E8000209421FEE83C
+S3152006A6407C0802A693E101149001011C7C7F1B78ED
+S3152006A6507C8323783881010838A100084BFAB1F9A2
+S3152006A6602C8300004086001C800101087C80F800AF
+S3152006A670418600183C600038606380124BFAA09130
+S3152006A6803860FFFF4800002C7FE3FB7838810008FE
+S3152006A69038A0020038C040004BFFE5F12C83FFFFAF
+S3152006A6A0906101084186FFDC4BFFEA053860000011
+S3152006A6B08001011C7C0803A683E1011438210118B8
+S3152006A6C04E8000209421FFC07C0802A692E1001C41
+S3152006A6D09301002093210024934100289361002CA6
+S3152006A6E09381003093A1003493C1003893E1003C56
+S3152006A6F0900100447C9D23787CBC2B787C7E1B783D
+S3152006A70039600000201E00007D20F114201EFFFF68
+S3152006A710214000007C0A01147D2A037991610014E8
+S3152006A720916100103BE0FFFF4082001C807E000006
+S3152006A7303D20DFAC80030010612997237C804800EA
+S3152006A740418600103C600038606380164800010888
+S3152006A7502C9D000D7C7B1B784086001838600000F7
+S3152006A760813B0018380000019009004C48000BCCAC
+S3152006A770381DFFFA28800026418500E83D2000275F
+S3152006A7803929A6A05400103A7C09002E3D20002720
+S3152006A7903929A6A07C004A147C0903A64E800420EB
+S3152006A7A00000009C000000C0000000C0000000C0A1
+S3152006A7B0000000C0000000C0000000C0000000C06D
+S3152006A7C0000000C00000009C000000C0000000C081
+S3152006A7D0000000C0000000C0000000C0000000C04D
+S3152006A7E0000000C0000000C0000000C0000000C03D
+S3152006A7F0000000C0000000C0000000C0000000C02D
+S3152006A800000000C0000000C0000000C0000000C01C
+S3152006A8100000009C0000009C000000C0000000C054
+S3152006A820000000C0000000C0000000C0000000C0FC
+S3152006A830000000C0000000C00000009C813B0018FC
+S3152006A840A80900482C800000408600183C60000CB1
+S3152006A850606300054BFA9EB93860FFFF48000ADCA4
+S3152006A8607FC3F3783880FFFF4BFFCE8D2C83FFFF07
+S3152006A8704086000C3860FFFF48000AC0801E003C58
+S3152006A8802C80000041860A30801B00142C80000094
+S3152006A89041860024813B00188009004C2C8000004C
+S3152006A8A040860014817E0004812B00087520400016
+S3152006A8B0418200143C600038606314004BFA9E51B6
+S3152006A8C048000A6C2C890000408400143C6000383D
+S3152006A8D0606315004BFA9E3948000A542C9D0025C4
+S3152006A8E0418607B8418500982C9D00154186028C25
+S3152006A8F0418500582C9D00074186015C418500282C
+S3152006A9002C9D000241860354418500102C9D000192
+S3152006A910418603C0480009FC2C9D0006418600F8A6
+S3152006A920480009F02C9D000A4186011C418500102D
+S3152006A9302C9D000841860198480009D82C9D000FB9
+S3152006A94041860228480009CC2C9D0021418605D83F
+S3152006A9504185001C2C9D001F418605804185058C5E
+S3152006A9602C9D001E418604F0480009A82C9D002334
+S3152006A9704186060C41850644480005C82C9D002EB6
+S3152006A980418607B0418500342C9D002A418607B4AE
+S3152006A9904185001C2C9D0027418604B041840784EE
+S3152006A9A02C9D002941860640480009682C9D002CCE
+S3152006A9B0418608F84800095C2C9D191E418604F03C
+S3152006A9C0418500282C9D1907418600C8418500101F
+S3152006A9D02C9D1901418603D8480009382C9D190853
+S3152006A9E04186014C4800092C2C9D19294186065C76
+S3152006A9F0418500102C9D1924418605DC4800091442
+S3152006AA002C9D192A418607502C9D19644186076874
+S3152006AA10480009003D200028800998102C80000057
+S3152006AA20408600103C600038606380234800062C70
+S3152006AA307C0803A6807B00187F84E37838A0000074
+S3152006AA40480008E47FC3F3787F84E3784BFFF699C2
+S3152006AA50480008D8938100147F80FE70813E00044A
+S3152006AA609001001088090046700900103BE0FFFFA0
+S3152006AA70408200302C9C00004184083C80A10010B6
+S3152006AA8080C100147FC3F3784BFFDBF14800089C96
+S3152006AA90880B0046700900103BE0FFFF4182001438
+S3152006AAA03C600038606380154BFA9C654800088038
+S3152006AAB02C9C00004186080080BC000080DC000437
+S3152006AAC07FC3F3784BFFDBB548000860801E001075
+S3152006AAD02C800000813E0010815E0014912100101A
+S3152006AAE09141001440860020801E00142C80000010
+S3152006AAF040860014813E0008815E000C91210010DC
+S3152006AB009141001480610010808100144BFFCB21F7
+S3152006AB102C830000418600103C6000386063801B51
+S3152006AB204800053883E10014480008042C9C0000E0
+S3152006AB303BE0FFFF41860780801E00102C80000028
+S3152006AB40813E0010815E001440860018801E001487
+S3152006AB502C8000004086000C813E0008815E000C99
+S3152006AB60913C0000915C00043BE00000480007C0D1
+S3152006AB703BE0FFFF480000DC93C10008A01B009CB9
+S3152006AB8083DB005C540030327C1E02147C9E00005F
+S3152006AB903BE00000418600803BBE0004801D003855
+S3152006ABA02C800000418600507FC3F3783880FFFF53
+S3152006ABB04BFFCB452C83FFFF4186FFB8813D000026
+S3152006ABC080090008740940004082001C813B002051
+S3152006ABD0800900247C0803A67FC3F3784E800021D3
+S3152006ABE07C7F1B787FC3F3784BFFCB592C9FFFFFC7
+S3152006ABF0418600603BDE0040A01B009C813B005C3A
+S3152006AC00540030327D2902147C9E48003BBD00400C
+S3152006AC104086FF8C807B00188003002C7C0803A6C8
+S3152006AC203C80CB106084001038A0FFFF4E800021A8
+S3152006AC307C7F1B78807B00188003002C7C0803A66B
+S3152006AC403C80CB106084003038A000004E80002166
+S3152006AC5083C10008480006D8801E00247409FFFF19
+S3152006AC603BE0000041820048881E00242C8000001C
+S3152006AC7041860010380000049001000848000008AC
+S3152006AC8093A100083860000083BB001C48004BDDFA
+S3152006AC90801D00087C0803A67C651B788081000839
+S3152006ACA07FC3F3784E8000217C7F1B782C9F000083
+S3152006ACB04086067C807B00188003002C7C0803A631
+S3152006ACC03C80CB106084001038A0FFFF4800065851
+S3152006ACD0801E00102C800000813E0010815E00142C
+S3152006ACE0912100109141001440860020801E0014F8
+S3152006ACF02C80000040860014813E0008815E000CF0
+S3152006AD009121001091410014817E000480010010DB
+S3152006AD10812B00007C890000418500184086003082
+S3152006AD20800B0004812100147C8048404085002049
+S3152006AD30818B0004816B0000812100108141001463
+S3152006AD407F4A60107F2959104800000C3B400000BE
+S3152006AD503B2000002C9C00009321001093410014F8
+S3152006AD603BE0FFFF418605507F23CB787F44D3788F
+S3152006AD704BFFC8BD2C830000418600183C60003876
+S3152006AD806063801B4BFA998993FC0000480005A056
+S3152006AD90813E000480090004813E000C3BE0000051
+S3152006ADA07C090050901C0000480005842C9C00005D
+S3152006ADB03BE0FFFF41860500801E00102C80000028
+S3152006ADC0813E0010815E00149121001091410014ED
+S3152006ADD040860020801E00142C8000004086001429
+S3152006ADE0813E0008815E000C9121001091410014DD
+S3152006ADF0817E000480010010812B00007C890000E2
+S3152006AE004185001840860030800B000481210014FD
+S3152006AE107C80484040850020818B0004816B0000A1
+S3152006AE2081210010814100147F0A60107EE95910A5
+S3152006AE304800000C3B0000003AE0000092FC0000AF
+S3152006AE40931C00044BFFFD247F63DB784BFFC9412F
+S3152006AE50480004D8813B0020800900107C0803A600
+S3152006AE607FC3F3784E8000212C9C00003BE0FFFF39
+S3152006AE7090610010908100144186043C4BFFC7B1B7
+S3152006AE802C8300004186001893FC00003C600038A5
+S3152006AE906063801B4BFA987948000494800100145D
+S3152006AEA03BE00000901C0000480004842C9C000017
+S3152006AEB0418601A0813B0020800900107C0803A65C
+S3152006AEC07FC3F3783BE000004E800021907C000093
+S3152006AED0909C000448000458807E00007F84E37816
+S3152006AEE04BFFF75D480004447F83E37838810008EA
+S3152006AEF04BFFC7617C9B18004186001C8001000819
+S3152006AF007C80E000418600103C6000386063801239
+S3152006AF1048000148808100087F63DB784BFFE5B552
+S3152006AF20480004087F63DB788123001C8009001013
+S3152006AF307C0803A67F84E37838A00021480003E82E
+S3152006AF407FC3F3783880FFFF4BFFC7AD2C83FFFF07
+S3152006AF503BE0FFFF418603D87F63DB788123001C15
+S3152006AF60800900107C0803A67F84E37838A0002297
+S3152006AF704E8000217C7F1B7848000324880B0046E0
+S3152006AF8038600000600000E77C00E038980B004639
+S3152006AF9083BB001C480048D5801D00083BE0000006
+S3152006AFA07C0803A67C651B787FC3F3783880000669
+S3152006AFB04E80002148000378938100147F80FE701E
+S3152006AFC0900100107FC3F378388100104BFFF405FB
+S3152006AFD0480003587FC3F3787F84E3784BFFF3F565
+S3152006AFE048000348813B0020800900187C0803A6F8
+S3152006AFF07FC3F3784E800021881B00A47C63003033
+S3152006B0007C6A1B783920000091210010914100149A
+S3152006B0107D234B787D4453784BFFC6152C83000041
+S3152006B0204086FB482C9C0000408600143C60003875
+S3152006B030606380164BFA96D94BFFFB3080010014CD
+S3152006B040901C00004BFFFB242C9C00004086001819
+S3152006B0503C600038606380164BFA96B53BE0FFFFEE
+S3152006B060480002CC813B0020800900187C0803A6F4
+S3152006B0707FC3F3783BE000004E800021881B00A4A6
+S3152006B0807C6300307C6A1B7839200000913C0000E6
+S3152006B090915C0004480002982C9C00003BE0FFFFD0
+S3152006B0A041860214880B004670090010408200145F
+S3152006B0B03C600038606380144BFA9655480002704F
+S3152006B0C0801C00042C80FFFF418602645400003C4D
+S3152006B0D07C0A03787C09FE70801E00087C80480066
+S3152006B0E040860010801E000C7C8050004186001889
+S3152006B0F07FC3F3787F84E3784BFFD8812C830000C7
+S3152006B1004086022C813B001C800900047C0803A68D
+S3152006B1107FC3F3787F84E37838A0000048000208CE
+S3152006B1207FC3F3787F84E3784BFFEDC5480001FCA7
+S3152006B1307FC3F3787F84E3784BFFEED5480001EC96
+S3152006B1407F86E3787F85FE707FC3F3784BFFDA35FB
+S3152006B150480001D82C9C00003BE0FFFF41860158A1
+S3152006B16080BC000080DC00047FC3F3784BFFDA1531
+S3152006B170480001B83D2000288009980C2C80000044
+S3152006B1803BA000003BE0FFFF408600483C600038BD
+S3152006B190606380234BFA95793D200028800997A87D
+S3152006B1A02C800000418601883C60002738636DA00C
+S3152006B1B03880000038A0000038C0000038E00000C3
+S3152006B1C039000000392000004BFABBAD480001606B
+S3152006B1D0813E0004800900182C80FFFF408600D897
+S3152006B1E07FC3F3783880FFFF4BFFC50D2C83FFFF07
+S3152006B1F04186013C807B00183880FFFF38630004B7
+S3152006B2004BFB97352C83FFFF3B400001418600749C
+S3152006B210813E000480090008740940003BA0000115
+S3152006B220418200143C600038606314004BFA94E1B6
+S3152006B2304800005038000001981B00AE7F63DB787B
+S3152006B2404BFFC54D7F63DB784BFFCF417C7F1B7859
+S3152006B2502C9FFFFF38000000981B00AE4186002475
+S3152006B260813E00047FC3F378800900087F84E37853
+S3152006B27054000080900900084BFFC60D7C7F1B7882
+S3152006B2802C9D000041860010807B00183863000440
+S3152006B2904BFB95492C9A0000418600947FC3F37890
+S3152006B2A04BFFC4A1480000882C9C00003BE0FFFF12
+S3152006B2B0408600143C600038606380164BFA945131
+S3152006B2C04800006C80BC00042C85000041860020C6
+S3152006B2D0813B001C800900087C0803A67FC3F378FF
+S3152006B2E0388000024E8000217C7F1B7880BC0000BF
+S3152006B2F02C85000041860038813B001C81290008E8
+S3152006B3007D2803A67FC3F3783880000448000018FA
+S3152006B310807B00188003002C7C0803A67FA4EB788C
+S3152006B3207F85E3784E8000217C7F1B787FC3F37868
+S3152006B3304BFFC4117FE3FB78800100447C0803A6FB
+S3152006B34082E1001C830100208321002483410028FA
+S3152006B3508361002C8381003083A1003483C10038A9
+S3152006B36083E1003C382100404E8000209421FFF0E6
+S3152006B3707C0802A693E1000C900100143FE0002809
+S3152006B380801F97A42C80FFFF408600483C6000273C
+S3152006B39038638EE43C800027388493D03CA000276F
+S3152006B3A038A58B883CC0002738C68FAC3CE00027E2
+S3152006B3B038E79DA43D00002739089DC83D20002773
+S3152006B3C03929A5C44BFAAAA1907F97A4480000085C
+S3152006B3D038600000800100147C0803A683E1000C77
+S3152006B3E0382100104E8000209421FFE07C0802A61A
+S3152006B3F09361000C9381001093A1001493C1001849
+S3152006B40093E1001C900100243D200028800997A482
+S3152006B4107C7B1B782C80FFFF7C9F23787CBD2B783A
+S3152006B4207CDC337840860014386000004BFFFF41F1
+S3152006B4302C83FFFF418600387FE3FB7848004EC900
+S3152006B4407C7F1B79408200303C60002738636FC8BA
+S3152006B4503880000038A0000038C0000038E0000020
+S3152006B46039000000392000004BFAB90D3860FFFF7D
+S3152006B4704800016438600001388000B44BFB510156
+S3152006B4807C7E1B794182FFE893FE0018387E0024D5
+S3152006B490388000054BFBA10D387E0040388000051C
+S3152006B4A04BFBA1017FA9FE707D20EA787C004850DF
+S3152006B4B07C00FE707C0900F8712900147FA00038F4
+S3152006B4C07C1D4B783BBD00027FA3EB78388000407D
+S3152006B4D04BFB50AD907E005C7FA3EB78388000480E
+S3152006B4E04BFB509D907E00607FA3EB783880001C36
+S3152006B4F04BFB508D801E005C2C800000907E0064E5
+S3152006B5004186FF6C801E00602C8000004186FF600D
+S3152006B5102C8300004186FF587FA0EB783BA00000D5
+S3152006B5205409043E7C9D4840B01E009C4084002C55
+S3152006B5303BE00000807E0064388000057C63FA14B8
+S3152006B5404BFBA061A01E009C3BBD00017C9D0040DC
+S3152006B5503BFF001C4184FFE03C00DFAC60009723E4
+S3152006B560901E001038000000901E00147FC3F3784A
+S3152006B5703D20002880A997A47F64DB784BFAAB7D13
+S3152006B5802C83FFFF4086000C907E00104BFFFEE0CA
+S3152006B5902C9CFFFF4186003C5780063E2C800001EE
+S3152006B5A04086000C380000014800000838000002DA
+S3152006B5B0981E00AC5780042E288002004185000C78
+S3152006B5C05780C23E4800000838000000981E00AD8D
+S3152006B5D038600000800100247C0803A68361000CE5
+S3152006B5E08381001083A1001483C1001883E1001C07
+S3152006B5F0382100204E8000209421FFC07C0802A618
+S3152006B600934100289361002C9381003093A1003446
+S3152006B61093C1003893E1003C900100447C7D1B7861
+S3152006B620386100183880000038A0000C4BFA801DBF
+S3152006B6307FA3EB78388000004BFFC0197C7C1B79F2
+S3152006B640408200183C60002738636FEC4BFB0F7175
+S3152006B6503860FFFF480003C07F83E3783C800027DD
+S3152006B6603884700438A0000038C000004BFFD61D71
+S3152006B6707C7D1B782C9DFFFF418600084BFFDA3127
+S3152006B6803C6000273863700880BC00187F84E37806
+S3152006B6904BFB0F2D3C6000273863705C4BFB0F215C
+S3152006B6A0881C00AC2C800000408600143C600027D5
+S3152006B6B0386370784BFB0F09480000642C80000124
+S3152006B6C0408600103D200027388970944800000CDB
+S3152006B6D03D200027388970A4881C00AD2C8000FFE9
+S3152006B6E05400402E418600242C80010040860010FE
+S3152006B6F03D20002738A970B4480000183D200027B1
+S3152006B70038A970C44800000C3D20002738A970D4FB
+S3152006B7103C600027386370884BFB0EA53B40000033
+S3152006B7203BC00000A01C009C83BC005C5400303249
+S3152006B7307D3D02147C9D48403B6000003BE00000B6
+S3152006B740801C0060408400807D284B7831400008AC
+S3152006B750397F0001801D003CA12A003C3000FFFFF6
+S3152006B7607C0001102C8900007FE900387D64007872
+S3152006B7707D3F237841860040812A000075204000BF
+S3152006B7803B7B00014182000C3B5A00014800002801
+S3152006B7902C890000393E00014CE62B827C000026CF
+S3152006B7A0540047FE7C0000D07FCB00387D240078ED
+S3152006B7B07D7E23783BBD00407C9D4040394A00482B
+S3152006B7C04184FF903C600027A09C009C386370E86B
+S3152006B7D04BFB0DED3C600027386371107FE4FB7848
+S3152006B7E04BFB0DDD3C600027386371307F64DB78C8
+S3152006B7F04BFB0DCD3C600027386371547FC4F3782C
+S3152006B8004BFB0DBD3C6000273863717C7F44D378A3
+S3152006B8104BFB0DAD801C00142C80000040860014C6
+S3152006B8203C600027386371A04BFB0D9548000190BC
+S3152006B8303C600027386371B84BFB0D857F83E37820
+S3152006B8404BFFCC097C7D1B794182001C7FA3EB78BC
+S3152006B8503880002138A100184BFFEE6D7FA3EB78C8
+S3152006B8604BFFCB75880100182C8000004186000C02
+S3152006B870388100184800000C3D20002738897204BC
+S3152006B8803C600027386371D838BC00884BFB0D31E5
+S3152006B8903C600027809C006C386372104BFB0D21A0
+S3152006B8A03C600027386372243FA0002738FD724487
+S3152006B8B080DC00783900000A38A0000048003335BD
+S3152006B8C03C6000273863724838FD7244A0DC007C51
+S3152006B8D03900000A38A000004800337D3C60002766
+S3152006B8E03863726038FD7244A0DC007E3900000A97
+S3152006B8F038A00000480033613C6000273863728018
+S3152006B90038FD7244A0DC00803900000A38A0000009
+S3152006B91048003345801C00942C8000004186002474
+S3152006B9202C800001408600103D200027388972B4FD
+S3152006B930480000183D200027388972BC4800000CB4
+S3152006B9403D200027388972C43C6000273863729CE4
+S3152006B9504BFB0C6D3C600027386372CC3FA000275A
+S3152006B96038FD724480DC00703900000A38A00000D9
+S3152006B970480032E53C600027889C0082386372ECDA
+S3152006B9804BFB0C3D3C6000273863730C38FD724434
+S3152006B99080DC00743900000A38A00000480032B95D
+S3152006B9A03C6000273863732838FD724480DC009893
+S3152006B9B03900000A38A000004800329D813C001C50
+S3152006B9C02C8900004186001C8009001C2C80000062
+S3152006B9D0418600107C0803A67F83E3784E800021EB
+S3152006B9E03C600027386372444BFB0BD5813C002014
+S3152006B9F02C8900004186001C800900202C8000002E
+S3152006BA00418600107C0803A67F83E3784E800021BA
+S3152006BA1038600000800100447C0803A68341002884
+S3152006BA208361002C8381003083A1003483C10038D2
+S3152006BA3083E1003C382100404E8000209421FFD02F
+S3152006BA407C0802A693E1002C900100347C8423799D
+S3152006BA503BE0FFFF408200203D200028800997A872
+S3152006BA602C800000418600643C6000273863734CB6
+S3152006BA704800003C3D200028392997AC7C834800A5
+S3152006BA80418600503D200028392997DC7C834800D2
+S3152006BA90418600403D200028800997A82C8000007A
+S3152006BAA0418600283C6000273863737C3880000076
+S3152006BAB038A0000038C0000038E000003900000039
+S3152006BAC0392000004BFAB2B13860FFFF480000D893
+S3152006BAD039010018392100087D2A4B7838E30024DD
+S3152006BAE08004000081240004816400089001000877
+S3152006BAF0912A0004916A0008816300002C8B0000BD
+S3152006BB0041860010800100087C8B00404085004C51
+S3152006BB103BE00000800300048123000891610018A1
+S3152006BB20900800049128000880010008812A000454
+S3152006BB30816A00089003000091230004916300089F
+S3152006BB4080010018812800048168000890010008F9
+S3152006BB50912A0004916A00083863000C7C83380019
+S3152006BB604085FF982C9FFFFF408600383D20002801
+S3152006BB70800997A82C800000418600283C60002773
+S3152006BB80386373A43880000038A0000038C000004F
+S3152006BB9038E0000039000000392000004BFAB1D900
+S3152006BBA07FE3FB78800100347C0803A683E1002C22
+S3152006BBB0382100304E8000209421FFF07C0802A612
+S3152006BBC093C1000893E1000C900100147CBF2B78EA
+S3152006BBD07C842379812300008143000480A9001CEC
+S3152006BBE038CA00183BC5004C408200603960FFFF0A
+S3152006BBF0916A00183900000038E000008005002010
+S3152006BC0081230004900300188005002490E3000891
+S3152006BC109103000C9003001C38000010980900467A
+S3152006BC20812300048005005C9009000C91660004BF
+S3152006BC30916600089086000C90860010908300205E
+S3152006BC40908600144800018C800A000C900A001881
+S3152006BC5080030018900600048003000C2C9F000029
+S3152006BC6090060008800300209006001441860018DE
+S3152006BC70801F00049006000C801F00089006001006
+S3152006BC804800000C93E6000C93E6001038000000EE
+S3152006BC909003002039800000396000009163000877
+S3152006BCA09183000C900300189003001C881E000345
+S3152006BCB0812300047C0400AE9809004681230000F7
+S3152006BCC0897E000A81430004800900947D245A1443
+S3152006BCD02C800002880900017D2458AE5400402E8F
+S3152006BCE07D2B037840860028881E000B7D240214AF
+S3152006BCF0892900017C0400AE5529402E7C004B780C
+S3152006BD005400801E7D2B0214480000087D695B784E
+S3152006BD10912A000C88FE000C7D043A14880800033C
+S3152006BD2089680002890800015400C00E556B801EE2
+S3152006BD307C005B785508402E7D6438AE7C004378BF
+S3152006BD407C005B787C0A0378816300043920000036
+S3152006BD50912B0000914B0004899E000D2C8C00FF30
+S3152006BD60418600707CA46214896500038905000259
+S3152006BD7088050001556BC00E5508801E7D6B4378DD
+S3152006BD805400402E7D6B03787C0460AE891E000E1F
+S3152006BD907D6B0378550818383800FFFF7C00403045
+S3152006BDA07D6000787C0A03783920000081630004D0
+S3152006BDB07D465378812B0000814B000438E0000035
+S3152006BDC07D4A38147D293114912B0000914B0004AD
+S3152006BDD038630028388000104BFADF3D80010014B6
+S3152006BDE07C0803A683C1000883E1000C38210010D5
+S3152006BDF04E8000209421FFF87C0802A69001000CB4
+S3152006BE0039800000396000008123000038000000D8
+S3152006BE108149001C916300089183000C9003001C45
+S3152006BE208123000490030018800900182C80FFFF48
+S3152006BE3040860024800A00242C80000041860018B3
+S3152006BE40800A002090030018800A00249003001C14
+S3152006BE504800002081230000812900208009000C4B
+S3152006BE607C0803A63880FFFF38A000004E800021FC
+S3152006BE708001000C7C0803A6382100084E8000208D
+S3152006BE809421FFF87C0802A69001000C38000000D9
+S3152006BE9090050000880400002C8000003860000011
+S3152006BEA0418601B8540A063E6949002F200900003A
+S3152006BEB07D2049146940005C216000007C0B01143A
+S3152006BEC07D2B0379408200342C8A002E40860084FE
+S3152006BED089440001200A00007D2051146940002F64
+S3152006BEE0216000007C0B01147D2B03794082000C17
+S3152006BEF02C8A005C4086000C388400014800012408
+S3152006BF002C8A002E4086004C89440002200A000016
+S3152006BF107D2051146940002F216000007C0B0114FE
+S3152006BF207D2B03794082000C2C8A005C40860024F7
+S3152006BF303003FFFF7C0001103923FFFF7C6B00389E
+S3152006BF407D2300787D631B7838840002480000D460
+S3152006BF5028830013418500D8546918387C89292EF0
+S3152006BF607D292A14380000009009000888E400007C
+S3152006BF7054E0063E6809002F7D2900D055290FFE7C
+S3152006BF806800005C7C0000D054000FFE7D2B003933
+S3152006BF9038C000004182006854E0063E2C8000002E
+S3152006BFA04186005C680B002E7D6B00D0556B0FFE1C
+S3152006BFB068000020212000007C0901147D6B03788F
+S3152006BFC0316BFFFF7D6B59107C8858788CE4000115
+S3152006BFD054E0063E6809002F7D2900D055290FFE1C
+S3152006BFE06800005C7C0000D054000FFE7D2A0039D4
+S3152006BFF07CCB58387D6643784082FFA02C8600008D
+S3152006C0004186003C546918387D292A14A009000265
+S3152006C010386300013000FFFF7C003050B009000471
+S3152006C020880400002C8000004086FE7C88040000E0
+S3152006C0302C80000040860014480000203C60003812
+S3152006C040606307004800000C3C60003860631F00F0
+S3152006C0504BFA86BD3860FFFF8001000C7C0803A6DC
+S3152006C060382100084E8000207C681B783860000046
+S3152006C070394000007D6850AE394A000154603E3092
+S3152006C0805469F87E288A000A7C004B787D6B021458
+S3152006C0905563063E4085FFE04E8000209421FFB082
+S3152006C0A07C0802A693A1004493C1004893E1004C64
+S3152006C0B0900100547C7E1B787C9D23787CBF2B7850
+S3152006C0C0386100183880000038A000244BFA757DA8
+S3152006C0D02C9F00023940000039600000418600305E
+S3152006C0E0289F0002418500102C9F000141860014DE
+S3152006C0F0480000302C9F000441860020480000247A
+S3152006C100895E0050897E005148000018895E0052DB
+S3152006C110897E00534800000C895E0054897E0055AE
+S3152006C1202C8B00FF418600387D3D5A148809000174
+S3152006C1307D3D58AE5400402E7D290378552006FEB7
+S3152006C140900100245520DF3E3000FFFF9001002895
+S3152006C1505520BA7E300000509001002C2C8A00FF14
+S3152006C160418600307D3D5214880900017D3D50AE42
+S3152006C1705400402E7D29037855200EBC90010018C8
+S3152006C1805520DEBE9001001C5520AAFE90010020F7
+S3152006C190386100184BFEB185800100547C0803A641
+S3152006C1A083A1004483C1004883E1004C3821005016
+S3152006C1B04E8000209421FFB87C0802A693A1003C5D
+S3152006C1C093C1004093E100449001004C7C7F1B788C
+S3152006C1D07C9E23787CBD2B7890C100303861003058
+S3152006C1E038810008480035D5812100088801000FCE
+S3152006C1F08161000C8141001C7D290E705400283473
+S3152006C2007D28037899010034556B28347D295B787F
+S3152006C210800100102C8A0050540058287D29037866
+S3152006C2205529C23E992100358921001B8801001710
+S3152006C23039290001552928347C004B789801003687
+S3152006C240812100187C00002654002FFE7C0000D099
+S3152006C250700B00507D4000787D6B03789161001C41
+S3152006C2603929000155292834396BFFB0800100147D
+S3152006C270556B482C7C004B7873A900017C005B78B3
+S3152006C2805400C23E9801003741820044881F00515F
+S3152006C2902C8000FF41860038881F00507D1E01AE87
+S3152006C2A0893F0050880100357D29F214980900013E
+S3152006C2B0893F0051880100367C1E49AE893F0051D0
+S3152006C2C0880100377D29F2149809000173A000021F
+S3152006C2D041820048881F00532C8000FF4186003C7F
+S3152006C2E0893F0052880100347C1E49AE893F0052A0
+S3152006C2F0880100357D29F21498090001893F0053EB
+S3152006C300880100367C1E49AE893F005388010037D6
+S3152006C3107D29F2149809000173A000044182005079
+S3152006C320881F00552C8000FF41860044893F005413
+S3152006C3302C8900FF4186001C880100347C1E49AEEC
+S3152006C340893F0054880100357D29F2149809000199
+S3152006C350893F0055880100367C1E49AE893F005527
+S3152006C360880100377D29F214980900018001004CC6
+S3152006C3707C0803A683A1003C83C1004083E10044D8
+S3152006C380382100484E8000208863000070600080B7
+S3152006C3904182000C98640000480000205460063E46
+S3152006C3A07CA500AE2C85007C4086000C3860FFFFFD
+S3152006C3B04E80002098A40000386000004E800020A1
+S3152006C3C09421FFD07C0802A692E1000C930100106E
+S3152006C3D093210014934100189361001C9381002039
+S3152006C3E093A1002493C1002893E1002C90010034E8
+S3152006C3F07C791B787C9A23787CBE2B783B60000060
+S3152006C4007FD7F3787EE3BB7838A000208B19004EC1
+S3152006C4108899004D3BA000007C84C2144BFA5091AB
+S3152006C42083FA00008819004DA17A00047D20581051
+S3152006C4307D2949107D294BB87C0048387D69487886
+S3152006C4407C004B787C9D0000408400642C9800007C
+S3152006C45041860010881F00002C80002E4186005041
+S3152006C4607FE3FB787FC4F3783CA0002738A573DCEE
+S3152006C4704BFFFF192C83FFFF418600E03BBD0001E1
+S3152006C480881E00003BDE0001893F00003BFF0001BD
+S3152006C4907C004A783000FFFF7C0001107F69003857
+S3152006C4A0300000017D3B03784BFFFF7CA01A000479
+S3152006C4B07C9D00004186009C881F00002C80002E53
+S3152006C4C0408600983BFF00013B8000008819004DFE
+S3152006C4D07C9CC0007C1D00507FDE02143BBD000103
+S3152006C4E0408400643F200027A01A00047C9D00009B
+S3152006C4F0408400607FE3FB787FC4F37838B973DC29
+S3152006C5004BFFFE892C83FFFF418600503BBD000171
+S3152006C5103B9C0001881E00003BDE0001893F00008F
+S3152006C5203BFF00017C9CC0007C004A783000FFFF60
+S3152006C5307C0001107F690038300000017D3B0378BE
+S3152006C5404184FFA8A01A00047C9D00004184000CAB
+S3152006C5507F63DB78480000147EE3BB7838800020B2
+S3152006C5604BFAD7B538600002800100347C0803A652
+S3152006C57082E1000C830100108321001483410018F8
+S3152006C5808361001C8381002083A1002483C10028A7
+S3152006C59083E1002C382100304E8000209421FFD0E4
+S3152006C5A07C0802A692E1000C930100109321001448
+S3152006C5B0934100189361001C9381002093A10024C7
+S3152006C5C093C1002893E1002C900100347C9B2378AC
+S3152006C5D0A13B00047C771B78288900FF7CBF2B783B
+S3152006C5E07CDE3378839B0000418501683C004EC47F
+S3152006C5F06000EC4F7FE3FB783929000C3880002059
+S3152006C6007C0900967D29FE707C0016707C090050F8
+S3152006C6105419063E4BFAD7017EE3BB787F64DB7856
+S3152006C6207FE5FB784BFFFD9D7C631B7940820020CE
+S3152006C630801E00002C8000004086000C3860000119
+S3152006C64048000120907E00004800000C38000001BA
+S3152006C650901E00007FE3FB78573D28347C9FEA1422
+S3152006C66038A000204BFA4C257FE3FB787FA4EB7895
+S3152006C6704BFAD6A53BC000017C9EC8403819FFFF61
+S3152006C680540028347FFF0214418500B43D2000273C
+S3152006C6903B4973CC3F0000279BDF00003BA00000F0
+S3152006C6A08937004F3800000F7C1F49AEA01B0004B7
+S3152006C6B0813B00007D2902147C9C4840408400343E
+S3152006C6C07F83E3787C9DD0AE38B874607C9F221435
+S3152006C6D04BFFFCB92C83FFFF41860078381D0001ED
+S3152006C6E0541D063E289D000C3B9C00014085FFC03C
+S3152006C6F0381D0001541D063E289D000C4185002C40
+S3152006C700396000FF7C1DD0AE7D7F01AE381D00014D
+S3152006C7107D3DD0AE541D063E289D000C7D3F4A1415
+S3152006C720996900014085FFE0381E0001541E063E29
+S3152006C7307C9EC8403BFFFFE04085FF608C1F0020A3
+S3152006C7403879000160000040981F00004800001458
+S3152006C7503C600038606307004BFA7FB53860FFFF00
+S3152006C760800100347C0803A682E1000C83010010B8
+S3152006C77083210014834100188361001C83810020D5
+S3152006C78083A1002483C1002883E1002C38210030B0
+S3152006C7904E8000209421FFF07C0802A693C1000853
+S3152006C7A093E1000C900100147C7E1B787C89FE7038
+S3152006C7B07D2022787C004850813E00007C00FE7059
+S3152006C7C081290020541F07C0800900007C0803A683
+S3152006C7D07FE4FB784E8000212C83FFFF4086000CE9
+S3152006C7E03860FFFF480000642C9F000041860058F1
+S3152006C7F083FE0018801E001C7C1F02147C9F0040AE
+S3152006C80040840044813E0000806900188003002C85
+S3152006C8107C0803A63C80CB10608400507FE5FB781D
+S3152006C8204E8000212C83FFFF4186FFB8801E00180C
+S3152006C830813E001C3BFF00017C004A147C9F004081
+S3152006C8404184FFC438600000800100147C0803A6DA
+S3152006C85083C1000883E1000C382100104E80002099
+S3152006C8609421FF987C0802A69381005893A1005C28
+S3152006C87093C1006093E100649001006C7C7F1B7875
+S3152006C8807C9C23782C850003813F0000801F0004B2
+S3152006C8908129001C33C000188BA9004C4086003C19
+S3152006C8A0386100187FE4FB7838A000404BFA6D55B6
+S3152006C8B0801E000490010030801E00087C0A037842
+S3152006C8C07C09FE709121002091410024801E0014CF
+S3152006C8D090010038480000D82C850001418600D0FA
+S3152006C8E02C850000408600107FE3FB784BFFF50978
+S3152006C8F0480000702C850002408600687FAAEB78E7
+S3152006C9003920000080FF0008811F000C7D4A401454
+S3152006C9107D293914811F0000913F0008915F000C84
+S3152006C920A008007C3000FFFF7C0C03787C0BFE7091
+S3152006C9307D2758387D4860382C870000408600249D
+S3152006C9402C8800004086001C801F0018813F001C92
+S3152006C95030000001901F00183929FFFF913F001C67
+S3152006C96083DF001C2C9E000040860034813F000099
+S3152006C97081290020800900007C0803A67FE3FB7836
+S3152006C980388000004E8000212C83FFFF4086000C55
+S3152006C9903860FFFF4800005C93DF002038610018EE
+S3152006C9A07FE4FB7838A000404BFA6C597F86E37803
+S3152006C9B08121001880010024A0A9007C8069001826
+S3152006C9C038A5FFFF7C052838800300247FA7EB784F
+S3152006C9D07C0803A639000000808100303921003802
+S3152006C9E04E8000212063FFFF3063FFFF7C63191012
+S3152006C9F08001006C7C0803A68381005883A1005C15
+S3152006CA0083C1006083E10064382100684E800020DF
+S3152006CA109421FFE07C0802A69361000C9381001006
+S3152006CA2093A1001493C1001893E1001C90010024E1
+S3152006CA307C7F1B787C9D237870E000027CBB2B785C
+S3152006CA407CDC337883DF000041820060817F00082A
+S3152006CA50819F000C811F0000318C00207D6B019484
+S3152006CA60917F0008919F000CA008007C3000FFFFF4
+S3152006CA707C0A03787C09FE707D6548387D865038A9
+S3152006CA802C850000408600242C8600004086001C4B
+S3152006CA90801F0018813F001C30000001901F0018DF
+S3152006CAA03929FFFF913F001C801F001C2C800000A7
+S3152006CAB0408600207FE3FB7854E406304BFFFCD902
+S3152006CAC02C83FFFF4086000C3860FFFF4800004895
+S3152006CAD07F86E3787F67DB78807E0018A01E007C41
+S3152006CAE080BF000C3000FFFF7CA5003880030024A1
+S3152006CAF0390000017C0803A6393F0020809F0018D4
+S3152006CB007CA5EA144E8000212063FFFF3063FFFFD9
+S3152006CB107C631910800100247C0803A68361000C1F
+S3152006CB208381001083A1001483C1001883E1001CB1
+S3152006CB30382100204E8000209421FF287C0802A65A
+S3152006CB40938100C893A100CC93C100D093E100D471
+S3152006CB50900100DC7C7E1B787C9C23787CBF2B781E
+S3152006CB607CDD3378386100183880000038A0004014
+S3152006CB704BFA6AD92C9D000038000000900100C0AF
+S3152006CB8040860010881E00AE288000014085010CD4
+S3152006CB903BA100587FA3EB78388000484BFAD17921
+S3152006CBA093C1001893A1001C809C00043800FFFF47
+S3152006CBB090810030817C0008900100647D6A5B7854
+S3152006CBC07D69FE709121002091410024801E0098E7
+S3152006CBD07C8400404184002C813E00208009000C84
+S3152006CBE07C0803A63861001838A000004E80002174
+S3152006CBF02C83FFFF408600143860FFFF480000A004
+S3152006CC007C040050900100342C9F00004086004C86
+S3152006CC1038C100A0807E0018A0BE007C80010024BA
+S3152006CC2038A5FFFF7C0528388003002438E000203D
+S3152006CC307C0803A63900000080810030392100C017
+S3152006CC404E8000212C83FFFF4186FFB0880100A07D
+S3152006CC50540006FE33E000012C9F0000380000E554
+S3152006CC60980100A038E0000141860030386100189E
+S3152006CC703880000038A0000138C100A04BFFFD9582
+S3152006CC802C83FFFF4186FF7438E0000237FFFFFF43
+S3152006CC90418200084BFFFFD838600000800100DC87
+S3152006CCA07C0803A6838100C883A100CC83C100D05B
+S3152006CCB083E100D4382100D84E8000209421FFC875
+S3152006CCC07C0802A692A1000C92C1001092E10014E3
+S3152006CCD0930100189321001C9341002093610024A0
+S3152006CCE09381002893A1002C93C1003093E1003450
+S3152006CCF09001003C7C7B1B787C9923783B40000086
+S3152006CD00813B00007CDD33788129001C7CF63B784C
+S3152006CD108AA9004F935D0008935D00044BFFFB45EF
+S3152006CD207C7C1B782C9CFFFF7F3FCB783BC0FFFF8C
+S3152006CD303AE000004186020C3F000028881F0000CA
+S3152006CD402C8000004186001080160000300000016D
+S3152006CD50901600002F1EFFFF409A00107C1FA8AEDB
+S3152006CD602C80000F408601E4895F00005540063E70
+S3152006CD70680900E5216900007D2B49142160000021
+S3152006CD807C0B01147D2B0379408201C07D3FA8AE22
+S3152006CD90712000084182000C2C89000F408601ACC8
+S3152006CDA02C89000F4086010871400040418200A46C
+S3152006CDB0419A005C801898142C800009408500282A
+S3152006CDC03C600027386374E43880000038A00000F1
+S3152006CDD038C0000038E00000390000003920000085
+S3152006CDE04BFA9F95807B00007FA4EB787CBED050C3
+S3152006CDF038C000004BFFFD457FE3FB787F24CB78C8
+S3152006CE0038A000204BFA44857F3FCB78881F000048
+S3152006CE10541E06FE2C9E00147FDAF3784085001CED
+S3152006CE20801898142C800009408500D43C60002781
+S3152006CE30386375184800004C801B00188AFF000DC1
+S3152006CE40901D0004801B000C901D0008480000540D
+S3152006CE50419A00AC554006FE7C9E00004086001096
+S3152006CE60881F000D7C97000041860038801898148C
+S3152006CE702C800009408500883C6000273863754C65
+S3152006CE803880000038A0000038C0000038E00000D6
+S3152006CE9039000000392000004BFA9EDD480000606C
+S3152006CEA03BDEFFFF3BFF00204800007C2C9E000057
+S3152006CEB0408600187FE3FB784BFFF1B15463063EAC
+S3152006CEC07C83B8004186007C801898142C80000943
+S3152006CED0408500783C6000273863757C38800000E2
+S3152006CEE038A0000038C0000038E0000039000000F5
+S3152006CEF0392000004BFA9E8148000050807B0000B6
+S3152006CF007FA4EB787CBED05038C000003BC0FFFF24
+S3152006CF107F3FCB784BFFFC2538000000901D00088C
+S3152006CF20901D00047F63DB787FE4FB7838A000023F
+S3152006CF304BFFF9317C7C1B782C9CFFFF4086FE003C
+S3152006CF407F83E378480000742C9EFFFF4186005CB1
+S3152006CF503D200028800998142C8000094085002849
+S3152006CF603C600027386375A43880000038A000008E
+S3152006CF7038C0000038E000003900000039200000E3
+S3152006CF804BFA9DF5807B00007FA4EB787CBED050C3
+S3152006CF9038C000004BFFFBA57FE3FB787F24CB78C8
+S3152006CFA038A000204BFA42E538000000901D000804
+S3152006CFB0901D0004386000008001003C7C0803A612
+S3152006CFC082A1000C82C1001082E1001483010018A0
+S3152006CFD08321001C8341002083610024838100284D
+S3152006CFE083A1002C83C1003083E100343821003828
+S3152006CFF04E8000208804000089250000540306FE82
+S3152006D000552906FE7C834800408600342C83000082
+S3152006D010408500B83D200027398973CC2F060000AD
+S3152006D02038E00000419A00207C0760AE7D2400AEE1
+S3152006D0307C0500AE7C890000418600583860FFFFDB
+S3152006D0404E8000207C0760AE7D2400AE7D0500AEB6
+S3152006D050552A063E3929FF9F212900197D2949107F
+S3152006D060396AFFE03808FF9F288000197D40483836
+S3152006D0707D6948787C0A4B78418500103808FFE0A0
+S3152006D0807C8A0000480000087C8A40004086FFB063
+S3152006D0907C0760AE7C0400AE2C800000418600141E
+S3152006D0A0380700017C0707342C87000C4085FF785B
+S3152006D0B03803FFFF7C0307342C83000038840020C6
+S3152006D0C038A500204185FF5C386000004E80002090
+S3152006D0D09421FFA07C0802A692A1003492C10038B2
+S3152006D0E092E1003C9301004093210044934100487D
+S3152006D0F09361004C9381005093A1005493C100582C
+S3152006D10093E1005C900100647C7B1B787C9A2378F3
+S3152006D1107CBF2B787CD6337838610018388000009F
+S3152006D120813B000038A0000C8309001C3B20000030
+S3152006D13082F800284BFA6515933F0000933F0004BA
+S3152006D140933F00083878002C3880FFFF4BFB77E9A1
+S3152006D1502C83FFFF3BA0FFFF3BC000003B9702A0AE
+S3152006D1604086000C3860FFFF480001D438000001D5
+S3152006D170900100287F03C3787F44D3787EE5BB7869
+S3152006D18038C100284BFFF4197C7A07342C9AFFFF06
+S3152006D1904186018880010028393AFFFF2C8000004D
+S3152006D1A0552928347D3907347EB7CA144086000CA3
+S3152006D1B03B400001480000142C9600004186000CD6
+S3152006D1C0380000007C17C9AE380000009001002CFC
+S3152006D1D038A000007F63DB787F84E37838C10018A7
+S3152006D1E038E1002C4BFFFAD97C7D1B782C9DFFFF5E
+S3152006D1F0418600AC881C00002C800000418600A0D9
+S3152006D2002C8000E54086002C2C9E00004086001CC3
+S3152006D2108001002C901F0000801B0018901F000420
+S3152006D220801B000C901F00083BDE000148000068AA
+S3152006D2308818004F7D3C00AE2C89000F7C1AF01012
+S3152006D2407C0001107C0003B87FDE00384186002C66
+S3152006D25071200008408200407EA3AB787F84E37865
+S3152006D26038A0000B4BFAC9DD2C8300004086002827
+S3152006D2703B200000480000A47F03C3787EE4BB78E9
+S3152006D2807F85E3787EC6B3784BFFFD6D2C83000041
+S3152006D2904186008838A000024BFFFF3C7C9ED0408A
+S3152006D2A04084002438000000901F00048121002CB1
+S3152006D2B0901F0008201DFFFF200000007D290194F5
+S3152006D2C0913F00002C9DFFFF41860068813B0004AC
+S3152006D2D0800900182C80FFFF3BA0FFFF4086001820
+S3152006D2E08001002C813800607C00D2147C80484066
+S3152006D2F041850028801F00042C8000004086001CE3
+S3152006D3008001002C901F0000801B0018901F00042F
+S3152006D310801B000C901F00082C9DFFFF41860014E1
+S3152006D3207F63DB787C9CCA1438A100184BFFE88DF6
+S3152006D3303878002C4BFB74A57FA3EB78800100641C
+S3152006D3407C0803A682A1003482C1003882E1003C13
+S3152006D3508301004083210044834100488361004CB9
+S3152006D3608381005083A1005483C1005883E1005C69
+S3152006D370382100604E8000209421FFC87C0802A632
+S3152006D3809321001C93410020936100249381002859
+S3152006D39093A1002C93C1003093E100349001003C08
+S3152006D3A07C9D23787CBB2B787CDC33783C00431B26
+S3152006D3B06000DE833D60000F616B42407F63DB7851
+S3152006D3C07D3C00167D5C01D63880000B552974BE3F
+S3152006D3D07D2959D638A000207D29E0507F895850CE
+S3152006D3E04BFA40CD83FD0000881F00002C80002EBE
+S3152006D3F07F7EDB78408600108C1F00012C80002E55
+S3152006D4004186FFF8A01D0004813D00007D290214F7
+S3152006D4107C9F4800418600503B5B00083F20002742
+S3152006D4207C9ED000418600407FE3FB787FC4F3785C
+S3152006D43038B973DC4BFFEF552C83FFFF4186002856
+S3152006D4408C1F00012C80002E3BDE00014186001831
+S3152006D450A01D0004813D00007D2902147C9F480002
+S3152006D4604086FFC0386100083C800027388475CC8A
+S3152006D47038A0007E7F86E3784BFAF5A93861000846
+S3152006D4804BFA62DD7C7C1B7838610008381CFFF875
+S3152006D4907C00D8507D3E00107D2949107D294BB849
+S3152006D4A07FC448387C0048787C8403787F85E37877
+S3152006D4B04BFA3DD9A01D0004813D00007C090214CB
+S3152006D4C033E0FFFF7C9F48003BDB0008418600884F
+S3152006D4D0881F00002C80002E418600103BFFFFFF90
+S3152006D4E07C9F48004086FFEC801D00007C9F000044
+S3152006D4F041860064381B000B7C9E00003BFF000122
+S3152006D500418600543F6000273B4000207C1C037860
+S3152006D510A01D0004813D00007D2902147C9F480041
+S3152006D520418600347FE3FB787FC4F37838BB73DC0F
+S3152006D5304BFFEE592C83FFFF4086000C9B5E0000B6
+S3152006D540480000143BDE00017C9EE0003BFF000104
+S3152006D5504086FFC08001003C7C0803A68321001C70
+S3152006D56083410020836100248381002883A1002C27
+S3152006D57083C1003083E10034382100384E800020F4
+S3152006D5809421FFA87C0802A6936100449381004853
+S3152006D59093A1004C93C1005093E100549001005C86
+S3152006D5A07C7F1B787C9B23787CBC2B782C9C00006C
+S3152006D5B0813F00007F83E37883C9001C4086000CE8
+S3152006D5C038600000480022A5813F00048009001823
+S3152006D5D02C80FFFF7C7C1B78408600187360000237
+S3152006D5E041820008939E00643860000048000204C9
+S3152006D5F07360010041820050800900242C800000BF
+S3152006D60038A000004086001C8009001C9001002CD2
+S3152006D610813F00048009002038A000014800001040
+S3152006D6209001002C813F00048009002890010030DB
+S3152006D630807F00003881002838C000014BFFF4FDAA
+S3152006D640480001B07FE3FB783881000838A0000344
+S3152006D6504BFFF2112C83FFFF4086000C3860FFFF3C
+S3152006D66048000190813F0004897E00568809000FF4
+S3152006D6703BA100087C1D59AE813F00048009000CA1
+S3152006D680893E00565400C23E7D3D4A149809000143
+S3152006D690813F0004897E00578809000D7C1D59AEFE
+S3152006D6A0817F0004893E0057880B000C7D3D4A1475
+S3152006D6B098090001813F0004897E004F88090046AB
+S3152006D6C07C1D59AE813F0004897E005888090007D3
+S3152006D6D07C1D59AE813F00048169000081890004C2
+S3152006D6E05568C00E5580C23E7D0A03787D69467010
+S3152006D6F0897E00587D7D5A14994B0001813F00048E
+S3152006D70081690000818900045568801E5580843E03
+S3152006D7107D0A03787D698670897E00587D7D5A1438
+S3152006D720994B0002813F000481690000818900042B
+S3152006D7305568402E5580463E7D0A03787D69C6701B
+S3152006D740897E00587D7D5A14994B0003881E005900
+S3152006D7502C8000FF4186004C817F0004818B0004CB
+S3152006D760816B0000386100387D6A5B787D69FE70C2
+S3152006D7707D405378980100385409C23E99210039D4
+S3152006D7805409843E9921003A5400463E9801003BAE
+S3152006D790889E005988BE005A7C9D22144BFA3AED83
+S3152006D7A07FC3F3787FA4EB787F65DB787F86E37883
+S3152006D7B04BFFEA057FA6EB78817F0000813F0004B8
+S3152006D7C0806B0018A0AB007C8009002038A5FFFFDF
+S3152006D7D07C05283880030024390000017C0803A62E
+S3152006D7E088FE004C8089001C3929002C4E80002199
+S3152006D7F08001005C7C0803A683610044838100487F
+S3152006D80083A1004C83C1005083E10054382100587F
+S3152006D8104E8000209421FFB87C0802A6926100144F
+S3152006D8209281001892A1001C92C1002092E1002448
+S3152006D830930100289321002C9341003093610034F4
+S3152006D8409381003893A1003C93C1004093E10044A4
+S3152006D8509001004C7C7D1B787C9F23787CB42B78AA
+S3152006D8607CDA337838000000900100083AA0FFFFE2
+S3152006D870815D0004813D0000880A00468389001CDC
+S3152006D880700B0001801D000483DC002832E000189E
+S3152006D890418200103C600038606321004800003059
+S3152006D8A056800426680980007D2900D055290FFE5A
+S3152006D8B0680040007C0000D054000FFE7D2B003906
+S3152006D8C0418200183C600038606380164BFA6E4130
+S3152006D8D03860FFFF480003B8387C002C800A001801
+S3152006D8E03880FFFF2260FFFF213300007E699914EE
+S3152006D8F04BFB70452C83FFFF4086000C3860FFFFEC
+S3152006D9004800038C7F83E3787FE4FB787FC5F37832
+S3152006D91038C100084BFFEC897C7B1B782C9BFFFFCC
+S3152006D92041860360381BFFFF540028347D3E00AE37
+S3152006D9302C8900007F3E02144086001C7F83E378F4
+S3152006D9407FE4FB7880DA00007F25CB787CC6DA1464
+S3152006D9504BFFFA293860000048001F117C661B78A9
+S3152006D9607F83E3787F24CB7838A000074BFFE849EE
+S3152006D9707F23CB784BFFE6F5817A00042C8B0000BB
+S3152006D9805476063E41860084813D000480090018AF
+S3152006D9902C80FFFF40860034801C00603920FFFE65
+S3152006D9A07C80484041850024801D0018813D001C4E
+S3152006D9B07C0B00507D290214913D001C801A000420
+S3152006D9C0901D00184800002C813D0000812900206A
+S3152006D9D08009000C7C0803A67FA3EB78809A0004B6
+S3152006D9E038A000004E8000212C83FFFF418602943A
+S3152006D9F0801A00087C0A03787C09FE70913D00088F
+S3152006DA00915D000C48000034813D00048009001811
+S3152006DA102C80FFFF40860024801C00603920FFFEF4
+S3152006DA207C804840418500143C60003860630D00C8
+S3152006DA304BFA6CDD4800024C2C9B00007F7FDB787E
+S3152006DA4038E00001408500643B00000F2C9F000152
+S3152006DA50408500109ADE000D881C004F7F1E01AE01
+S3152006DA607FA3EB783880000038A000207FC6F378A5
+S3152006DA7060E700804BFFEF9D2C83FFFF4186020463
+S3152006DA807C9FD80040860014801D0018901A00043A
+S3152006DA90801D000C901A000837FFFFFF3BDE002092
+S3152006DAA038E000024181FFA83860000048001DBD0D
+S3152006DAB07C651B787FA3EB78388000024BFFFAC57E
+S3152006DAC02C9B00027FA3EB787F24CB784CE62B8217
+S3152006DAD07CA0002654A547FE7CA500D07F45283885
+S3152006DAE04BFFE0D9392000006129800056800426A4
+S3152006DAF07C804800418601887F3ECB787FA3EB78E1
+S3152006DB00881C004F396000107D7E01AE813D0004E1
+S3152006DB1038800080996900464BFFEC7D2C83FFFFF9
+S3152006DB2041860160813D0004897C00568809000FE4
+S3152006DB307FC3F3787C1E59AE813D00047FC4F378FB
+S3152006DB408009000C893C00565400C23E7D3E4A148C
+S3152006DB5098090001813D0004897C00578809000D3B
+S3152006DB6038A000207C1E59AE817D0004893C0057D2
+S3152006DB70880B000C7D3E4A14980900014BFA370D96
+S3152006DB807FC3F378881C004D889C004E38A0002061
+S3152006DB907C8022144BFA39193800002E981E000074
+S3152006DBA07FA3EB783880000038A000207FC6F37864
+S3152006DBB038E000014BFFEE5D2C83FFFF418600C453
+S3152006DBC02C93000041860034881C005639600000DC
+S3152006DBD07D7E01AE893C00567D3E4A149969000138
+S3152006DBE0881C00577D7E01AE893C00577D3E4A142F
+S3152006DBF09969000148000040893C005688170003B1
+S3152006DC007C1E49AE80170000893C00565400C23E51
+S3152006DC107D3E4A1498090001893C00578817000161
+S3152006DC207C1E49AE893C0057881700007D3E4A1463
+S3152006DC30980900013800002E981E00017FA3EB7874
+S3152006DC403880000038A000207FC6F37838E00082AE
+S3152006DC504BFFEDC12C83FFFF418600287FA3EB787F
+S3152006DC603880000038A000004BFFF9192C83FFFFEF
+S3152006DC70418600107FA3EB784BFFE17D3AA000009A
+S3152006DC80387C002C4BFB6B557EA3AB788001004C71
+S3152006DC907C0803A6826100148281001882A1001CDA
+S3152006DCA082C1002082E10024830100288321002CE2
+S3152006DCB083410030836100348381003883A1003C90
+S3152006DCC083C1004083E10044382100484E8000206D
+S3152006DCD07CA92B7838E000008903004D38C0000067
+S3152006DCE03980002E394000007C8A40004084003866
+S3152006DCF08804000038840001394A00017C8A4000E5
+S3152006DD0098090000680000203000FFFF7C00011003
+S3152006DD10392900017CAB00387D2500787D652B7876
+S3152006DD204184FFD08803004E2C80000041860040A7
+S3152006DD302C87000041860018380700017C802800C1
+S3152006DD404086001C7CE53B78480000247CA72B787F
+S3152006DD509985000038A500017CA92B7838C60001D4
+S3152006DD602C8600018903004E4085FF7C3800000082
+S3152006DD70980500004E8000209421FFE87C0802A624
+S3152006DD8093A1000C93C1001093E100149001001C8E
+S3152006DD907C7E1B78881E004F7C0400AE2C80000FEC
+S3152006DDA07CBF2B784186000C4BFFFF29480000B02C
+S3152006DDB0880400003D200027394973CC54002DB431
+S3152006DDC07C8402147C9D23783884FFE03920000069
+S3152006DDD07C0950AE7D6400AE2C8B00004186006C1B
+S3152006DDE07C1F28502C8000634086004C3D2000284E
+S3152006DDF0800998142C800009408500283C6000275D
+S3152006DE00386375D43880000038A0000038C000007A
+S3152006DE1038E0000039000000392000004BFA8F59FF
+S3152006DE207FC3F3787FA4EB787FE5FB784BFFFEA5CF
+S3152006DE304800002C392900012C89000C9965000020
+S3152006DE4038A500014085FF8C880400007009004033
+S3152006DE504182FF7838000000980500008001001CEA
+S3152006DE607C0803A683A1000C83C1001083E100145D
+S3152006DE70382100184E8000209421FFB07C0802A687
+S3152006DE8093210034934100389361003C93810040EE
+S3152006DE9093A1004493C1004893E1004C900100549D
+S3152006DEA07C7E1B787C9923787CBB2B78386100187E
+S3152006DEB038800000813E000038A0000C8389001CB3
+S3152006DEC04BFA5789811900043B40FFFF2C88FFFF38
+S3152006DED0380000009001002883FC0028418600585F
+S3152006DEE0813E0008815E000C39600000554C077E95
+S3152006DEF02C8B00007D09FE707D2042787C004850E0
+S3152006DF00541D17BC4086000C2C8C0000418600143C
+S3152006DF103C600038606380164BFA67F5480000E0DF
+S3152006DF20387C002C3880FFFF4BFB6A0D2C83FFFFC5
+S3152006DF304086000C3860FFFF480000EC7FC3F3786C
+S3152006DF407FE4FB787FA5EB7838C1001838E10028F6
+S3152006DF504BFFED6D2C83FFFF418600A4897F0000D1
+S3152006DF602C8B00E53BA000024186FFD4881C004F7F
+S3152006DF707D3F00AE2C89000F4186000C71200008DB
+S3152006DF804082FFBC2C8B0000418600747F83E37899
+S3152006DF907FE4FB7838B900084BFFFDE12C9B000097
+S3152006DFA0418600587F63DB787FC4F37838A000402B
+S3152006DFB083BB00044BFA564D38A0004893BB000499
+S3152006DFC0809E00047FA3EB784BFA5639881C004FB7
+S3152006DFD07C1F00AE2C80000F40860010881F000094
+S3152006DFE054002DB47FFF02147F63DB787FE4FB7831
+S3152006DFF038A100184BFFDBC53B4000002C9A0000D9
+S3152006E00040860010801E000C6000000148000008B3
+S3152006E0103800FFFF90190004387C002C4BFB67BDA7
+S3152006E0207F43D378800100547C0803A683210034DD
+S3152006E030834100388361003C8381004083A10044EC
+S3152006E04083C1004883E1004C382100504E800020D1
+S3152006E0509421FF287C0802A6934100C0936100C440
+S3152006E060938100C893A100CC93C100D093E100D43C
+S3152006E070900100DC7C7E1B78807E00007CBC2B78A1
+S3152006E08038A100084BFFDDFD7C7D1B782C9DFFFF0C
+S3152006E090418600EC7FC3F3783880000038A0000064
+S3152006E0A04BFFDB194BFA66017C7A1B783860000039
+S3152006E0B04BFA665D3BE000007C9FE80040840058F2
+S3152006E0C03B610008813E000488090046700900105D
+S3152006E0D0418200447FC3F37857E418387C9B221488
+S3152006E0E038A100B057867FFE4BFFEFE92C83FFFF52
+S3152006E0F0408600144BFA65B12C8300004186001831
+S3152006E1004800007C381F0001541F063E7C9FE8000D
+S3152006E1104184FFB44BFA65912C8300004086000C9F
+S3152006E1207F43D3784BFA65E97C9FE8004186003C1D
+S3152006E130381DFFFF7C9F0000408600387380020052
+S3152006E140418200307FC3F37857E418383801000837
+S3152006E1507C8022147F85E37838C100B04BFFF6B960
+S3152006E1602C83000040860018386000004800001402
+S3152006E1703C600038606380024BFA65953860FFFF85
+S3152006E180800100DC7C0803A6834100C0836100C4AD
+S3152006E190838100C883A100CC83C100D083E100D44B
+S3152006E1A0382100D84E8000209421FFD07C0802A674
+S3152006E1B093C1002893E1002C9001003481230004AA
+S3152006E1C0800900182C80FFFF812300007C9E23787F
+S3152006E1D083E9001C40860014801F00643860000016
+S3152006E1E0901E001C480000603881000838A00003F5
+S3152006E1F04BFFE6712C83FFFF418600487FE3FB78C1
+S3152006E2003881000838A000014BFFDE95907E00205D
+S3152006E2107FE3FB783881000838A000024BFFDE81B9
+S3152006E220907E001C7FE3FB783881000838A0000426
+S3152006E2304BFFDE6D907E001838600000480000080F
+S3152006E2403860FFFF800100347C0803A683C10028BE
+S3152006E25083E1002C382100304E8000209421FF389F
+S3152006E2607C0802A6934100B0936100B4938100B85E
+S3152006E27093A100BC93C100C093E100C4900100CCD9
+S3152006E2807C7B1B787CBA2B787C9E2379839B001C0F
+S3152006E2903D200027392976084082001C2C9A002228
+S3152006E2A0418600103C600038606380164800010CE9
+S3152006E2B07D3E4B7893610028380100689001002C3A
+S3152006E2C03BA100287FA3EB783880000038A0000009
+S3152006E2D04BFFD8E97FA3EB783881000838A00000E9
+S3152006E2E04BFFE5812C83FFFF3BE00000418600487B
+S3152006E2F03BA10008880100082C80000041860038D2
+S3152006E300881C004F7D3D00AE2C89000F4186000CEF
+S3152006E3107120000840820020386100287FA4EB780F
+S3152006E32038A000024BFFE53D2C83FFFF3BFF000193
+S3152006E3304086FFC42C9A0021408600642C83FFFF6A
+S3152006E34041860010880100082C80000040860014B3
+S3152006E350387B00883881000838A0000B4BFA2F2D11
+S3152006E360386100087FC4F37838A0000B4BFA2F1DBE
+S3152006E37039600000393E000B7FC3F3788809FFFF1A
+S3152006E3802C800020408600109D69FFFF7C8918009E
+S3152006E3904086FFEC38600000480000A42C83FFFF6F
+S3152006E3A040860024801C00607C9F00404184001823
+S3152006E3B03C60003860630D004BFA63553860FFFFFA
+S3152006E3C04800007C38610008388000204BFAB9499D
+S3152006E3D038610008881C004D889C004E38A0002015
+S3152006E3E07C8022144BFA30C97FC3F3784BFA5371DB
+S3152006E3F02883000B418500147FC3F3784BFA5361BB
+S3152006E4007C651B784800000838A0000B7FC3F3788C
+S3152006E410388100084BFA2E753861002838800000AE
+S3152006E42038A00020893C004F3800000838C1000873
+S3152006E43038E000817C0649AE4BFFE5D9800100CC49
+S3152006E4407C0803A6834100B0836100B4838100B8AB
+S3152006E45083A100BC83C100C083E100C4382100C863
+S3152006E4604E8000209421FFD87C0802A693A1001C8A
+S3152006E47093C1002093E100249001002C380000016E
+S3152006E4809001001083A3001C908100087C832378CA
+S3152006E4904BFA52CDB061000C3880FFFF3BFD002CB5
+S3152006E4A07FE3FB784BFB64912C83FFFF4086000CB1
+S3152006E4B03860FFFF480000307FA3EB7838810008DC
+S3152006E4C080A3002838C100104BFFE0D57C7D1B7841
+S3152006E4D07FE3FB784BFB6305207DFFFF3063FFFF61
+S3152006E4E07C6319108001002C7C0803A683A1001CDE
+S3152006E4F083C1002083E10024382100284E80002095
+S3152006E5009421FFE87C0802A693A1000C93C1001073
+S3152006E51093E100149001001C7C7D1B783C6000274B
+S3152006E5203863761483FD001C4BFAE095801D001493
+S3152006E5302C8000004186004C809F00202C84000001
+S3152006E540418600303C600027386376344BFAE0710A
+S3152006E5503C600027809F0024386376544BFAE0619E
+S3152006E5603C600027809F0060386376744800001060
+S3152006E570809F005C3C600027386376984BFAE04122
+S3152006E5808001001C7C0803A683A1000C83C1001011
+S3152006E59083E10014382100184E8000209421FFF0D4
+S3152006E5A07C0802A693C1000893E1000C9001001492
+S3152006E5B083E3001C2C9F0000418600343BDF002CA1
+S3152006E5C07FC3F3783880FFFF4BFB636D807F00287F
+S3152006E5D02C830000418600104BFB2EE538000000F8
+S3152006E5E0901F00287FC3F3784BFB61F1800100144E
+S3152006E5F07C0803A683C1000883E1000C382100109D
+S3152006E6004E8000209421FF607C0802A693A10094E8
+S3152006E61093C1009893E1009C900100A47C7E1B7810
+S3152006E6203BE0000093E1008838A0000038C10008CE
+S3152006E630A01E007C807E001820E000807CE7391032
+S3152006E64054EB06307C073878800300243900000016
+S3152006E6507C0803A639210088809E00687D673B7862
+S3152006E6604E8000212C83FFFF41860240813E001CFE
+S3152006E6702C8900004186002C800900183D200027A1
+S3152006E6803929E49C7C804800418600382C8000008D
+S3152006E690418600107C0803A67FC3F3784E800021AE
+S3152006E6A0807E001C388000684BFB1F2D2C830000C3
+S3152006E6B0907E001C418601F4388000684BFAB659D4
+S3152006E6C083FE001C3FA00027387D76B84BFA509172
+S3152006E6D03801000B7C651B787C030378389D76B859
+S3152006E6E04BFAB5612C8300003BBF004C40860044A4
+S3152006E6F03D200028800998142C800000408500289B
+S3152006E7003C600027386376C03880000038A00000B9
+S3152006E71038C0000038E0000039000000392000002B
+S3152006E7204BFA86553C6000386063802348000178A2
+S3152006E73039400000915F004838000020981F004CA1
+S3152006E74038000008981D000138000003981D0002B5
+S3152006E7503800000B981D00033800000E981D000493
+S3152006E76038000010981D0005392000FF993D000845
+S3152006E77038000012981D000938000016981D00065C
+S3152006E78038000018981D00073800001A981D000A40
+S3152006E79038000014981D000B3800001C981D000C2C
+S3152006E7A0993D000D993D000EA13E007E881E00A4CF
+S3152006E7B088BF004C7D2400307C85200040850020C3
+S3152006E7C03D200028800998142C800000408500D022
+S3152006E7D03C600027386376FC480000B0801E009413
+S3152006E7E02C80000240860068880100378921003681
+S3152006E7F0896100355400C00E5529801E7C004B7851
+S3152006E800556B402E892100347C005B787C044B783E
+S3152006E81028840001909F005C418500203D20002829
+S3152006E820800998142C800000408500743C600027DF
+S3152006E8303863773C48000050915F0020915F0024A2
+S3152006E8403800FFFF901F00604800009C8801001AD0
+S3152006E850892100195400402E7D2903782C89000031
+S3152006E860913F00604086004C3D2000288009981480
+S3152006E8702C800000408500283C600027386377847A
+S3152006E8803880000038A0000038C0000038E00000BC
+S3152006E89039000000392000004BFA84DD3C60003840
+S3152006E8A0606322004BFA5E693860FFFF480000D895
+S3152006E8B0915F005CA13E007C881F004C7D2903D613
+S3152006E8C0801F00607C004B96901F0024801E0098B7
+S3152006E8D0813F0024901F0020801E00987C004A1449
+S3152006E8E0901E00983860000048000F81907F0064D3
+S3152006E8F03D2000273929DF50913F00003D20002783
+S3152006E9003929DD78913F00043D2000273929D48016
+S3152006E910913F00083D2000273929E0A8913F000CA9
+S3152006E9203D2000273929E15C913F00103D20002734
+S3152006E9303929E364913F00143D2000273929E49CB8
+S3152006E940801F0028913F00182C8000003D200027BC
+S3152006E9503929E400913F001C4086002838600002D1
+S3152006E960388002A04BFB1C192C830000907F0028C0
+S3152006E9704186FF38387F002C388000054BFB6C25F6
+S3152006E98038600000800100A47C0803A683A10094B9
+S3152006E99083C1009883E1009C382100A04E80002088
+S3152006E9A09421FFE87C0802A69001001C380000018D
+S3152006E9B0900100083D2000273929E5049121000C05
+S3152006E9C038000000900100103C600028386397DC70
+S3152006E9D0388100084BFFD0698001001C7C0803A6FD
+S3152006E9E0382100184E8000209421FF407C0802A67C
+S3152006E9F0930100A0932100A4934100A8936100AC43
+S3152006EA00938100B093A100B493C100B893E100BCF2
+S3152006EA10900100C47D1C43787D3A4B787F89FE7031
+S3152006EA207D20E2787C0048507C00FE707C0900F848
+S3152006EA307129000A7F8000387C1C4B786B8900027E
+S3152006EA403009FFFF7D2049106B80000A3160FFFFE9
+S3152006EA507C0B01107D2B00397CBE2B787CDF33782E
+S3152006EA607CF83B783BA100994182000C2C9C001037
+S3152006EA70408600346B890002200900007D20491457
+S3152006EA806B800010216000007C0B01147D2B03791E
+S3152006EA904182000C3B20002E480000242C9C000AB4
+S3152006EAA0418600183C600027386377DC7F84E3784C
+S3152006EAB04BFADB0D4800010C3B20002C7F49FE70EB
+S3152006EAC07D20D2787C0048502C8300007C00FE7086
+S3152006EAD07C09D0387D3A0338418600084BFADAE1BC
+S3152006EAE02C9E00004086001C2C9F000040860014A9
+S3152006EAF03C600027386377F84BFADAC5480000B43D
+S3152006EB002C9E000038000000981D00003B60000186
+S3152006EB10480000687FE9FB787C09E3967C00E1D60D
+S3152006EB207D604850392B00305520063E2880003916
+S3152006EB309D3DFFFF4085000C380B0057981D0000B1
+S3152006EB407C1BD3967C00D1D67C9B00004086000891
+S3152006EB509F3DFFFF7F86E37838A000007FC3F378CA
+S3152006EB607FE4FB7848000DDD7C7E1B787C9F23782E
+S3152006EB702C9E00003B7B00014086FF9C2C9F0000BC
+S3152006EB804086FF94881D00003C600027386377FC8A
+S3152006EB90393D00017C00CA787C0000D07C00FE70DE
+S3152006EBA07FA400387D2000787C8403784BFADA111E
+S3152006EBB02C9800004186000C7F03C3784BFADA01B5
+S3152006EBC0800100C47C0803A6830100A0832100A43B
+S3152006EBD0834100A8836100AC838100B083A100B481
+S3152006EBE083C100B883E100BC382100C04E800020D6
+S3152006EBF09421FFF87C0802A69001000C2C880002BE
+S3152006EC00418600186900000A3000FFFF7C000110CB
+S3152006EC10540907BE48000008392000044BFFFDCDE5
+S3152006EC208001000C7C0803A6382100084E800020AF
+S3152006EC309421FFF87C0802A69001000C3920FFFFDC
+S3152006EC404BFFFDA98001000C7C0803A6382100088D
+S3152006EC504E8000209421FFD87C0802A693A1001C92
+S3152006EC6093C1002093E100249001002C7CAB2B78E5
+S3152006EC707CCC33782C8B00007C7D1B787CFE3B7805
+S3152006EC803BE00000480000403D2000283929981C1A
+S3152006EC9057E0103A7C09002E2C8000004186003C65
+S3152006ECA07D635B787D84637838C0040038A00000D5
+S3152006ECB048000C917C6B1B787C8C23782C8B00006F
+S3152006ECC03BFF00014185FFC4408600103C00001032
+S3152006ECD07C8C00404185FFB47FA3EB787D655B780D
+S3152006ECE07D8663783D2000283929981857E0103A02
+S3152006ECF07CE9002E3900000A392000034BFFFCED83
+S3152006ED002C9E00004186000C7FC3F3784BFAD8B1BF
+S3152006ED108001002C7C0803A683A1001C83C1002049
+S3152006ED2083E10024382100284E8000209421FFB05C
+S3152006ED307CA802A690A10004906100089421FFF009
+S3152006ED40480001D1382100108061000880A1000406
+S3152006ED50382100507CA803A64826EC8E9421FFB0C5
+S3152006ED607CA802A690A100049061000838800001C4
+S3152006ED709421FFF04800019D38210010806100088B
+S3152006ED8080A10004382100507CA803A6BC030000FD
+S3152006ED907C8000A6908300807CA802A690A300848F
+S3152006EDA090A3008C7C8902A6908300887C8000260E
+S3152006EDB0908300907CA102A690A300947C631A7887
+S3152006EDC04E8000207C8000A65484045E7C8001242C
+S3152006EDD04C00012C80030000802300048043000899
+S3152006EDE0B8A30014808300847C8803A680830088C9
+S3152006EDF07C8903A6808300947C8103A68083009069
+S3152006EE007C8FF1208083008C7C9043A680830080B3
+S3152006EE107C9343A6808300108063000C7C7243A6F5
+S3152006EE207C6000A6546307327C6001244C00012CCA
+S3152006EE307C7042A67C7A03A67C7342A67C7B03A6BC
+S3152006EE403C60002880639AA47C7043A67C7242A606
+S3152006EE504C0000649083000C4E80002080630004E2
+S3152006EE604E8000209421FFE87C0802A693810008A4
+S3152006EE7093A1000C93C1001093E100149001001C8D
+S3152006EE807C7F1B787C9C23787CBD2B787CDE337834
+S3152006EE903880009C4BFAAE814BFAD309606390000A
+S3152006EEA0907F008093BF008C381CFFD85400003812
+S3152006EEB0901F0004392000007C09F02E3929000411
+S3152006EEC02C890024941CFFFC4085FFF03960000045
+S3152006EED07FC6F3783920000C396B000184060004BE
+S3152006EEE02C8B00077C09F92E392900044085FFEC76
+S3152006EEF08001001C7C0803A68381000883A1000CE0
+S3152006EF0083C1001083E10014382100184E800020AA
+S3152006EF103D2000282C84000081299AF4396300A01C
+S3152006EF20912300A04D86002061200001900300A0B9
+S3152006EF308129008C2C8900003800000041860008B3
+S3152006EF4080090290900B00044E8000209421FFF049
+S3152006EF507C0802A693C1000893E1000C90010014D8
+S3152006EF607C7F1B783D200028801F00A081299AF4EB
+S3152006EF705400003C7C8048007C9E23784186000C09
+S3152006EF80386000004BFB815D801F00A070090001E0
+S3152006EF90418200283D20002880099C282C800000DC
+S3152006EFA0418600187C0803A638600003389F00A413
+S3152006EFB038A000004E8000217FE3FB787FC9FE70D3
+S3152006EFC07D20F2787C0048507C00FE707FC4003895
+S3152006EFD0300000017C8403784BFFFE7D7FE3FB78BF
+S3152006EFE04BFFFDE5800100147C0803A683C10008BB
+S3152006EFF083E1000C382100104E8000209421FF80EA
+S3152006F0007C0802A6900100849081000C90A1001035
+S3152006F01090C1001490E100189101001C9121002056
+S3152006F020914100243D20002881630000812981B476
+S3152006F0307C8B4800418600302C8B000041860010D0
+S3152006F040800900247C8B00004186001C4BFA564D15
+S3152006F0503C00003D60000001900300003860FFFF81
+S3152006F0604800002C38000002980100703800000085
+S3152006F070980100713801000890010078380100884F
+S3152006F0809001007438A100704800001580010084A4
+S3152006F0907C0803A6382100804E8000209421FBA000
+S3152006F0A07C0802A69381045093A1045493C1045864
+S3152006F0B093E1045C900104647C7E1B783D20002845
+S3152006F0C0817E0000812981B47C8B48007C9F237831
+S3152006F0D07CBC2B78418600302C8B000041860010A4
+S3152006F0E0800900247C8B00004186001C4BFA55AD16
+S3152006F0F03C00003D60000001900300003860FFFFE1
+S3152006F1004800017CA01E00107009000841820010EC
+S3152006F110801E00142C8000004086001C7FC3F378D6
+S3152006F1204800220D2C8300004186000C3860FFFF24
+S3152006F1304800014CA13E00107120001A2C80000ABE
+S3152006F140408600C4A81E00122C800000418400B808
+S3152006F1507120FFFDB001041838010008A17E0012B7
+S3152006F1609001040C9001041C38000400900104143C
+S3152006F1709001042038000000900104249001041018
+S3152006F180900104289001042C9001043C900104402F
+S3152006F1903BA104087FA3EB783D200028808981B413
+S3152006F1A0B161041A4BFB3C557FE3FB787F84E378F9
+S3152006F1B03CA0002738A5F19C7FA6EB784BFAD99D73
+S3152006F1C07C7F1B794180001C7FA3EB784BFA354167
+S3152006F1D03063FFFF7C6319107C60F8387C1F1B3870
+S3152006F1E0A00104187009004041820010A01E0010DC
+S3152006F1F060000040B01E00107FA3EB784BFB3C114D
+S3152006F200480000787FE3FB787F84E3783CA00027DC
+S3152006F21038A5F19C7FC6F3784BFAD9413D200028C4
+S3152006F220817E0000812981B47C8B48007C7F1B78F7
+S3152006F2304186002C2C8B0000418600108009002474
+S3152006F2407C8B0000418600184BFA54513C00003D49
+S3152006F250600000019003000048000020A01E001058
+S3152006F260700900407C00002654001FFE7C0000D05A
+S3152006F2707C09F8387D3F03387FE3FB7880010464F8
+S3152006F2807C0803A68381045083A1045483C10458B1
+S3152006F29083E1045C382104604E8000209421FFE03F
+S3152006F2A07C0802A69361000C9381001093A100149A
+S3152006F2B093C1001893E1001C900100247C9C2379BD
+S3152006F2C07C7D1B787CBF2B78408100C83F60002858
+S3152006F2D07FBEEB78813F0000817B81B47C89580014
+S3152006F2E04186002C2C89000041860010800B0024C4
+S3152006F2F07C890000418600184BFA53A13C00003D4C
+S3152006F300600000019003000048000078801F000C72
+S3152006F3103120FFFF2C890000913F000C4084004CD1
+S3152006F320801F001C7C89000041840030813F000438
+S3152006F330881E000098090000813F00048809000005
+S3152006F3402C80000A4186000C38090001480000304E
+S3152006F3503860000A48000008887E00007FE4FB78B3
+S3152006F36048001EDD4800001C813F0004881E000060
+S3152006F37098090000801F000430000001901F000439
+S3152006F3803BDE00017C1CEA147C9E00004184FF487B
+S3152006F39038600000800100247C0803A68361000CE7
+S3152006F3A08381001083A1001483C1001883E1001C09
+S3152006F3B0382100204E8000207C8418407C691B78EA
+S3152006F3C0408400387C042A147C8300404084002C28
+S3152006F3D02C8500007D232A147C0403784D86002084
+S3152006F3E08C04FFFF9C09FFFF34A5FFFF418200081E
+S3152006F3F04BFFFFF04E8000202C8500004D86002016
+S3152006F4008804000038840001980900003929000183
+S3152006F41034A5FFFF418200084BFFFFE84E800020FF
+S3152006F4209421FFF07C0802A6900100143800001BE8
+S3152006F430900100083C8000283884994438A10008A9
+S3152006F44048000015800100147C0803A63821001008
+S3152006F4504E8000209421FFE87C0802A693810008AE
+S3152006F46093A1000C93C1001093E100149001001C97
+S3152006F4707C9C23787CBD2B78480002FD7F84E3782C
+S3152006F4807FA5EB78480020917F83E3788001001CD6
+S3152006F4907C0803A68381000883A1000C83C1001083
+S3152006F4A083E10014382100184E8000209421FFE8BD
+S3152006F4B07C0802A693A1000C93C1001093E10014C8
+S3152006F4C09001001C3FA00028389D999048000025F1
+S3152006F4D0387D99908001001C7C0803A683A1000C28
+S3152006F4E083C1001083E10014382100184E800020C5
+S3152006F4F09421FFF87C0802A69001000C8063000088
+S3152006F500480000158001000C7C0803A63821000857
+S3152006F5104E8000209421FFD87C0802A69341001035
+S3152006F520936100149381001893A1001C93C10020B7
+S3152006F53093E100249001002C3C00C22E6000450772
+S3152006F5403D2000017C03001661295180541B843E10
+S3152006F5507C1B49D67F7CDB787F6018517C9A237882
+S3152006F5604080000C7F7B4A143B9CFFFF3C00B38CFB
+S3152006F5706000F9B17D3C00967D5C01D67F80FE70E9
+S3152006F5807D3C4A147D2946707FA048507FA3EB78A0
+S3152006F59038800000480001317C83E0004085000C5D
+S3152006F5A03BBDFFFF4BFFFFE8381C00043920000750
+S3152006F5B07D204BD61D2900077C0900502C80000093
+S3152006F5C0901A00184084000C30000007901A001884
+S3152006F5D07FA3EB7838800000480000ED7F83E0505B
+S3152006F5E03BBD07B23BC00000387DF8943BFE0001C8
+S3152006F5F07FE4FB7838A000004800010D7C9C1800AB
+S3152006F600418400142C9E000A4185000C7FFEFB785F
+S3152006F6104BFFFFD8381DF894901A001493DA001081
+S3152006F6207FC4F378807A001438A00000480000D9F9
+S3152006F6307CA3E05038A5000190BA000C807A00140D
+S3152006F6407FC4F378480000C13863FFFF907A001C18
+S3152006F6503C0091A26000B3C53880003C38A1000862
+S3152006F6607D3B00967D5B01D67F60FE707D3B4A140E
+S3152006F6707D295E707D2048501C690E10913A00083F
+S3152006F6807C63D85048001E0180010008901A0004A9
+S3152006F6908001000C38600000901A00008001002CC2
+S3152006F6A07C0803A683410010836100148381001819
+S3152006F6B083A1001C83C1002083E100243821002871
+S3152006F6C04E8000207C631B79408000203803FFFE95
+S3152006F6D01C63016D7C0016707C0001947C63021409
+S3152006F6E07C6322144E800020380300011C63016DC2
+S3152006F6F07C0016707C0001947C6302147C632214C1
+S3152006F7004E8000203863076C706000033960000065
+S3152006F71040820018380000647C0303D61C0000646F
+S3152006F7207C83000040860018380001907C0303D6AF
+S3152006F7301C0001907C830000408600202C84000259
+S3152006F7407C00002654002FFE7C0000D07D69003800
+S3152006F750300000017D2B03783D2000283929996049
+S3152006F7605480103A7C69002E7C632A147C635A14D2
+S3152006F7704E8000209421FFE87C0802A693A1000C67
+S3152006F78093C1001093E100149001001C3FA00028AD
+S3152006F790389D99B448000025387D99B48001001C0F
+S3152006F7A07C0803A683A1000C83C1001083E1001404
+S3152006F7B0382100184E8000209421FFC87C0802A616
+S3152006F7C093A1002C93C1003093E100349001003CB4
+S3152006F7D07C7E1B787C9F2378386100083FA0002812
+S3152006F7E080BD9940388000024BFE88B538610008F6
+S3152006F7F04BFA39951C03003C807E00007FE4FB789B
+S3152006F8007C6018504BFFFD11809D99407FE3FB7865
+S3152006F8104BFE85F97C7D1B782C9D000093BF00202E
+S3152006F82041860028386100084BFA395D7FE4FB786B
+S3152006F830801E00001C63003C1D3D0E107C030050FC
+S3152006F8407C604A144BFFFCD1386000008001003CE6
+S3152006F8507C0803A683A1002C83C1003083E10034F3
+S3152006F860382100384E8000209421FFE87C0802A625
+S3152006F87093E100149001001C7C7F1B783860000001
+S3152006F880388100084BFE8B0D2C8300004086001C19
+S3152006F8902C9F00004186000C80010008901F000066
+S3152006F8A080610008480000083860FFFF8001001CC0
+S3152006F8B07C0803A683E10014382100184E80002018
+S3152006F8C07CA52B794D820020200500202C80000067
+S3152006F8D041850014398000007C0000D07C8B0030E6
+S3152006F8E0480000147C8904307C8C28307C602830C3
+S3152006F8F07C0B4B787D635B787D8463784E80002015
+S3152006F9007CA52B794D820020200500202C80000026
+S3152006F910418500147C6BFE707C0000D07C6C063022
+S3152006F920480000147C6900307C6B2E307C802C309D
+S3152006F9307C0C4B787D635B787D8463784E800020D3
+S3152006F9409421FFD89321000C934100109361001453
+S3152006F9509381001893A1001C93C1002093E10024F3
+S3152006F960398000002C830000408400243980FFFF64
+S3152006F9707D0400D07C0300D03128FFFF7D6941102D
+S3152006F9807CEB00507CE33B787D0443782C85000095
+S3152006F990408400247D8C60F87FE600D07C0500D06C
+S3152006F9A0313FFFFF7D69F9107FCB00507FC5F37885
+S3152006F9B07FE6FB787CC733787C9F23787CA62B79D9
+S3152006F9C0408203047C8718404085011C7CE93B78ED
+S3152006F9D03B2000006339FFFF7C87C8404185001421
+S3152006F9E0200700FF7C000110540B07384800001C36
+S3152006F9F03C0000FF6000FFFF7C0900107C00011020
+S3152006FA00540006F8600B00107D205C303D20002750
+S3152006FA10392979347C0900AE7C005A14212000202D
+S3152006FA202C8900004186001C7CE748307C634830E0
+S3152006FA30200900207FE004307C6303787FFF48306E
+S3152006FA4054EB843E54E6043E7D235B967C0959D6C8
+S3152006FA507C6018507D284B787D4831D65469801EA7
+S3152006FA6057E0843E7D2303787C83504040840024DF
+S3152006FA703908FFFF7C633A147C833840418400149E
+S3152006FA807C8350404084000C3908FFFF7C633A147F
+S3152006FA907C6A18507D235B967C0959D67C001850C3
+S3152006FAA07D2B4B787D4B31D65409801E57E0043E7C
+S3152006FAB07D2003787C80504040840020396BFFFFF0
+S3152006FAC07C003A147C803840418400107C8050406B
+S3152006FAD040840008396BFFFF5500801E7C065B7844
+S3152006FAE0480003D42C8700004086000C380000010D
+S3152006FAF07CE03B967CE93B783B2000006339FFFFA0
+S3152006FB007C87C84041850014200700FF7C00011031
+S3152006FB10540B07384800001C3C0000FF6000FFFF1E
+S3152006FB207C0900107C000110540006F8600B0010BA
+S3152006FB307D205C303D200027392979347C0900AEAA
+S3152006FB407C005A14212000202C89000040860010B3
+S3152006FB507C67185038A00001480000C821490020BB
+S3152006FB607CE748307C6B54307C6348307FE05430E9
+S3152006FB707C6303787FFF483054E8843E54E5043E90
+S3152006FB807D2B43967C0941D67D6058507D264B7841
+S3152006FB907D4629D65569801E5460843E7D2B037882
+S3152006FBA07C8B50404084002438C6FFFF7D6B3A1478
+S3152006FBB07C8B3840418400147C8B50404084000C5A
+S3152006FBC038C6FFFF7D6B3A147D6A58507D2B4396C7
+S3152006FBD07C0941D67D6058507D284B787D4829D6AC
+S3152006FBE05569801E5460043E7D2B03787C8B5040DD
+S3152006FBF0408400243908FFFF7D6B3A147C8B3840FD
+S3152006FC00418400147C8B50404084000C3908FFFF49
+S3152006FC107D6B3A1454C0801E7C0543787C6A585006
+S3152006FC2054EB843E54E6043E7D235B967C0959D6E6
+S3152006FC307C6018507D284B787D4831D65469801EC5
+S3152006FC4057E0843E7D2303787C83504040840024FD
+S3152006FC503908FFFF7C633A147C83384041840014BC
+S3152006FC607C8350404084000C3908FFFF7C633A149D
+S3152006FC707C6A18507D235B967C0959D67C001850E1
+S3152006FC807D2B4B787D4B31D65409801E57E0043E9A
+S3152006FC907D2003787C80504040840020396BFFFF0E
+S3152006FCA07C003A147C803840418400107C80504089
+S3152006FCB040840008396BFFFF5500801E7C065B7862
+S3152006FCC0480001F87C8618404085000C38C00000A4
+S3152006FCD0480001E47CC933783B2000006339FFFFE6
+S3152006FCE07C86C84041850014200600FF7C00011052
+S3152006FCF0540B07384800001C3C0000FF6000FFFF3D
+S3152006FD007C0900107C000110540006F8600B0010D8
+S3152006FD107D205C303D200027392979347C0900AEC8
+S3152006FD207C005A14212000202C89000040860030B1
+S3152006FD307C0330107C0001107C0000D07D27F81053
+S3152006FD40392000007D2949147C0B4B7938C00000E8
+S3152006FD504182016438C000014800015C2149002027
+S3152006FD607CC648307CE054307CC603787CE7483035
+S3152006FD707C6B54307C6348307FE054307C63037858
+S3152006FD807FFF483054CA843E54C4043E7D2B539686
+S3152006FD907C0951D67D6058507D254B787D0521D628
+S3152006FDA05569801E5460843E7D2B03787C8B4040AB
+S3152006FDB04084002438A5FFFF7D6B32147C8B3040AF
+S3152006FDC0418400147C8B40404084000C38A5FFFFFC
+S3152006FDD07D6B32147D6858507D2B53967C0951D6FF
+S3152006FDE07D4058507D2B4B787D0B21D65549801E5C
+S3152006FDF05460043E7D2A03787C8A40404084002451
+S3152006FE00396BFFFF7D4A32147C8A304041840014C8
+S3152006FE107C8A40404084000C396BFFFF7D4A3214B1
+S3152006FE2054A0801E7C065B787C68505054C9043EDC
+S3152006FE3054CB843E54EA043E54E0843E7D0951D692
+S3152006FE407D2901D67D4B51D67D6B01D65500843E44
+S3152006FE507D2902147D2952147D4A48107D4A511067
+S3152006FE607D4A53B83C0B00017D6B50387C00507898
+S3152006FE707D6A03785520843E7D6A02145529801EA4
+S3152006FE805508043E7D4942147C8B18404185002442
+S3152006FE907D691A78200900007D2049147C0AF8100D
+S3152006FEA07C0001107C0000D07D2B003941820008A1
+S3152006FEB038C6FFFF38A000007CDB33787CBA2B7867
+S3152006FEC07F43D3787F64DB782C8C00004186002024
+S3152006FED07FA400D07C0300D0313DFFFF7D69E91069
+S3152006FEE07F8B00507F83E3787FA4EB788321000CF9
+S3152006FEF083410010836100148381001883A1001CAE
+S3152006FF0083C1002083E10024382100284E8000206A
+S3152006FF109421FFE87C0802A69381000893A1000C91
+S3152006FF2093C1001093E100149001001C3D20002887
+S3152006FF30800999E47C7C1B782C8000007C9D2378A4
+S3152006FF403BE000003BC0000040860010480002F55A
+S3152006FF502C83FFFF418600A02C9D000041860028A9
+S3152006FF602C9C0000408600147FA3EB784BFB1525BE
+S3152006FF707C7E1B78480000087F9EE3782C9E000036
+S3152006FF80418600843F800028807C99DC4BFB2DB976
+S3152006FF907C7F1B7941820060387F00043880000D03
+S3152006FFA04BFB56012C83FFFF3920FFFF4186004875
+S3152006FFB038000000901F004C913F0050901F0054BF
+S3152006FFC093DF005893BF005C901F0020901F002CE3
+S3152006FFD0901F0024901F0028809C99DC7FE3FB78E5
+S3152006FFE04BFB2E193D20002893E999E87FE3FB7801
+S3152006FFF0480000282C9E00004186000C7FC3F3781B
+S315200700004BFB14BD2C9F00004186000C7FE3FB7839
+S315200700104BFB14AD386000008001001C7C0803A64A
+S315200700208381000883A1000C83C1001083E100149B
+S31520070030382100184E8000209421FFE87C0802A66C
+S3152007004093A1000C93C1001093E100149001001CAA
+S315200700507C7D1B79408200243D20002883A999E8CE
+S315200700602C9D0000408600144BFA46313C00003D8B
+S3152007007060000001480000603D200028817D0000C7
+S31520070080812999DC7C8B4800418600382C8B00001F
+S3152007009041860010800900247C8B000041860024BD
+S315200700A04BFA45F93FA0003D63BD000193A300002D
+S315200700B04BFA45E993A300003860FFFF4800016823
+S315200700C0801D003C2C800000408600184BFA45CD49
+S315200700D038000016900300003860FFFF48000148EB
+S315200700E03C60002738637A347FA4EB784BFAC4D177
+S315200700F03C600027809D003038637A5C4BFAC4C188
+S31520070100809D003C288403FF418500203800040099
+S315200701107C802396801D00383D20002738A97A70D9
+S315200701207C8023964800001C5484B2BE801D00386C
+S315200701303D20002738A97A785400B2BE7C8021D684
+S3152007014028842710408500443D20002739297A70C6
+S315200701507C854800408600103D20002738A97A78FC
+S315200701605484B2BE28842710408500203D200027CE
+S3152007017039297A787C854800408600103D2000275B
+S3152007018038A97A805484B2BE3C60002780DD005CA3
+S3152007019038637A884BFAC4293C600027809D003C47
+S315200701A0A8BD0046A8DD004480FD003838637AB034
+S315200701B04BFAC40D801D00342C800000809D004022
+S315200701C0418600103D20002738A97B244800000CD3
+S315200701D03D20002738A97B30801D004C2C8000004D
+S315200701E0418600103D20002738C97B384800000C7F
+S315200701F03D20002738C97B3C3C60002738637AECD2
+S315200702004BFAC3BD809D00542C8400004186001400
+S315200702103C60002780BD005038637B404BFAC3A162
+S31520070220386000008001001C7C0803A683A1000C0F
+S3152007023083C1001083E10014382100184E80002066
+S315200702409421FFE87C0802A693A1000C93C1001015
+S3152007025093E100149001001C3FC00028801E99E4FA
+S315200702602C8000004186000C3860000048000050B2
+S31520070270388000843FA0002838A000003CC0002713
+S3152007028038C6FE1038E00000807D99DC3900000072
+S315200702904BFAF32D7C7F1B783C800027807D99DCE9
+S315200702A03884FF384BFAF3B12C9F00004086000CA8
+S315200702B038000001901E99E47FE3FB788001001C3B
+S315200702C07C0803A683A1000C83C1001083E10014D8
+S315200702D0382100184E8000207C691B783860000082
+S315200702E0712000014C820020386300012C83001FF7
+S315200702F05529F87E4085FFEC4E80002038600000A7
+S315200703004E8000209421FFE87C0802A693810008EE
+S3152007031093A1000C93C1001093E100149001001CD7
+S315200703207C7F1B783D200028838999E04BFFFF15AA
+S315200703303D200028817F0000812999DC7C8B48009D
+S315200703403BA000007FFEFB784186002C2C8B00000B
+S3152007035041860010800900247C8B00004186001806
+S315200703604BFA43393C00003D600000019003000032
+S315200703704800000C7FC3F378480001A483DF000000
+S315200703802C9E000041860160807F00042C8300009C
+S3152007039041860154801F00082C80000041860148B1
+S315200703A07C7E18504BFE6DFD7C83E000418501382D
+S315200703B0807F00087C7E18504BFE6DE97C83E00029
+S315200703C041850124807F00102C830000418600147C
+S315200703D07C7E18504BFE6DCD7C83E000418501085D
+S315200703E0807F001C4BFFFEF5547E063E3800000139
+S315200703F0813F001C7C00F0307C890000408600E8A5
+S31520070400801F00102C800000408600103D2000270A
+S31520070410392901FC913F00103D200028812999DCCC
+S31520070420800900202C800000418600187C0803A63E
+S3152007043038600000388000004E8000217C7D1B78C4
+S315200704402C9D0000418600D493FD00803D20002787
+S3152007045039297B64913D003039200000801F001424
+S31520070460913D004C901D0034801F0018901D0038C8
+S31520070470801F001C901D003CA01F00227FA3EB7845
+S31520070480B0030044A01F002691230040B003004676
+S315200704903800FFFFA17F002E9003005091230054C0
+S315200704A0900300689123006493C300603D200027D2
+S315200704B0392904F8912300203D2000273929087877
+S315200704C0912300243D20002739290A9491230028C7
+S315200704D03D20002739290C809123002CB163004841
+S315200704E04800003C3C60002738637B743880000056
+S315200704F038A0000038C0000038E0000039000000AE
+S31520070500392000004BFA68714BFA41913C00003DB7
+S315200705106000000190030000386000008001001C85
+S315200705207C0803A68381000883A1000C83C10010E1
+S3152007053083E10014382100184E8000209421FFF013
+S315200705407C0802A693C1000893E1000C90010014D1
+S315200705507C7F1B78807F00582C83000041860030E3
+S31520070560801F005C813F003C7C8048004186001448
+S315200705704BFB0F4D38000000901F0058901F005C62
+S31520070580801F00582C8000004086004883DF005CCF
+S315200705902C9E00004086003C807F003C907F005CBC
+S315200705A04BFB0EF12C830000907F005841860030CC
+S315200705B03D20002739290718913F00203800FFFFE3
+S315200705C0901F006893DF006438600000480000141D
+S315200705D04BFA40C938000016900300003860FFFF29
+S315200705E0800100147C0803A683C1000883E1000C60
+S315200705F0382100104E8000209421FFC87C0802A6CF
+S3152007060092A1000C92C1001092E1001493010018E8
+S315200706109321001C93410020936100249381002895
+S3152007062093A1002C93C1003093E100349001003C44
+S315200706307C7A1B787C9B23787CB72B787CD633787F
+S315200706407CF53B787F5ED37883FE00803B000000F5
+S31520070650801F00302C80000040860010801A004C36
+S315200706602C8000004186001C38000001901A004C9F
+S315200706704BFA40293C00000C600000064800007435
+S31520070680813E00387C9B4840418500107C1BBA146C
+S315200706907C804840408500104BFA40013800001600
+S315200706A0480000502C950000418600102C9500012B
+S315200706B04186001048000030801F000048000008CF
+S315200706C0801F00047FE3FB787C0803A67F64DB7822
+S315200706D07EE5BB787EC6B3784E8000217C7C1B786E
+S315200706E04800001C4BFA3FB53C00000C6000000296
+S315200706F0900300003860FFFF480000E42C9CFFFFB2
+S31520070700408600D8937E00504BFA3F918003000025
+S31520070710901E00544BFA3F853D20000C80030000B5
+S31520070720612900067C8048004086000C38000001BD
+S31520070730901A004C7FC3F3783C80CB10608400016D
+S3152007074038A000004800063D2C8300004086008C18
+S31520070750801F00287F09C3787C8900003B18000189
+S31520070760408400784BFB8791801F00302C80000047
+S315200707707C791B7840860064801A004C2C80000008
+S3152007078040860058801F000C2C80000041860010F0
+S315200707907C0803A67FE3FB784E8000217FC3F3788E
+S315200707A03C80CB106084000138A00000480005D5A6
+S315200707B02C8300004186FE9C386000054BFB78A100
+S315200707C04BFB87357C7D1B784BF97FC57C791A14C3
+S315200707D07C9D18404184FFC87F83E3788001003CD5
+S315200707E07C0803A682A1000C82C1001082E10014B6
+S315200707F0830100188321001C834100208361002484
+S315200708008381002883A1002C83C1003083E1003433
+S31520070810382100384E8000209421FFD07C0802A67C
+S3152007082092E1000C930100109321001493410018C4
+S315200708309361001C9381002093A1002493C1002873
+S3152007084093E1002C900100347C7B1B787C9C2378D9
+S315200708507CBA2B787CD933787CF83B787D1743781C
+S315200708607F7FDB783BBF00047FA3EB783880FFFFD1
+S315200708704BFB40C52C83FFFF3BC00000418600C4CD
+S31520070880801F00582C800000408600207FE3FB78DD
+S315200708904BFFFCAD2C83FFFF408600107FA3EB7830
+S315200708A04BFB3F394800009C809F00682C84FFFF44
+S315200708B03920FFFF418600547C84E0404184004C68
+S315200708C07C1CD2147C84004040840040801F006436
+S315200708D02C80000041860030913F006838000000D8
+S315200708E0901F00647FE3FB7838A0000180DF005863
+S315200708F038E00001390000004BFFFD017C7E1B78A4
+S3152007090048000008913F00682C9EFFFF418600346F
+S315200709107F63DB787F84E3787F45D3787F26CB7820
+S315200709207F07C3787EE8BB784BFFFCD17C7E1B789C
+S31520070930387F00044BFB3EA57FC3F37848000008A9
+S315200709403860FFFF800100347C0803A682E1000C93
+S315200709508301001083210014834100188361001C42
+S315200709608381002083A1002483C1002883E1002CF2
+S31520070970382100304E8000209421FFD87C0802A61B
+S315200709809321000C93410010936100149381001862
+S3152007099093A1001C93C1002093E100249001002C11
+S315200709A07C7F1B78813F00807C9D237880090030DF
+S315200709B07CBB2B782C8000007CD933787CFC3B7859
+S315200709C07D1A437840860010801F004C2C8000003B
+S315200709D04186001C38000001901F004C4BFA3CBD95
+S315200709E03C00000C6000000648000040801F0038CD
+S315200709F07C9D00404084002C813F003C7C1BE214F8
+S31520070A007C0048107C0001107C0000D057690FFE3F
+S31520070A107C0B4B794082000C2C9C000040860018EA
+S31520070A204BFA3C7938000016900300003860FFFF28
+S31520070A30480001383BDF00047FC3F3783880FFFF87
+S31520070A404BFB3EF52C83FFFF4086000C3860FFFFEB
+S31520070A5048000118801F00582C8000004086001C83
+S31520070A607FE3FB784BFFFAD92C83FFFF4086000CE8
+S31520070A707FC3F37848000094809F00682C84FFFF8B
+S31520070A803920FFFF418600447C84E8004186003CEC
+S31520070A90801F00642C80000041860030913F00684B
+S31520070AA038000000901F00647FE3FB7838A0000120
+S31520070AB080DF005838E00001390000004BFFFB3D7E
+S31520070AC02C83FFFF41860040801F00687C9D000025
+S31520070AD04186004C83DF00642C9E00004086004040
+S31520070AE07FE3FB787FA4EB7838A0000180DF0058EE
+S31520070AF038E00000390000004BFFFB012C83FFFF85
+S31520070B0040860014387F00044BFB3CD13860FFFF3A
+S31520070B104800005893BF006893DF00642C9A0000B2
+S31520070B20801F00587C80DA14418600102C9A000119
+S31520070B304186001C480000287C8323787F24CB78B5
+S31520070B407F85E3784BFA0745480000147F23CB7847
+S31520070B507F85E3784BFA0735935F0064387F000477
+S31520070B604BFB3C79386000008001002C7C0803A6EB
+S31520070B708321000C834100108361001483810018B0
+S31520070B8083A1001C83C1002083E10024382100288B
+S31520070B904E8000209421FFE07C0802A6934100089E
+S31520070BA09361000C9381001093A1001493C1001840
+S31520070BB093E1001C900100247C7F1B78813F0080F5
+S31520070BC0800900307C9C23782C8000007CBB2B7806
+S31520070BD07CDD33783BC0000040860010801F004C28
+S31520070BE02C8000004186001C38000001901F004C15
+S31520070BF04BFA3AA93C00000C600000064800003872
+S31520070C00813F00387C9C4840418500247C9B484096
+S31520070C104185001C7C1CEA147C80484041850010D5
+S31520070C207C1BEA147C804840408500184BFA3A6DB5
+S31520070C3038000016900300003860FFFF4800011CAB
+S31520070C403B5F00047F43D3783880FFFF4BFB3CE9AB
+S31520070C502C83FFFF4086000C3860FFFF480000FC0E
+S31520070C60801F00582C8000004086001C7FE3FB78FD
+S31520070C704BFFF8CD2C83FFFF4086000C7F43D378AC
+S31520070C8048000044809F00682C84FFFF418600446B
+S31520070C90801F00642C800000418600387FE3FB78A4
+S31520070CA038A0000180DF005838E000013900000035
+S31520070CB04BFFF9497C7E1B782C9EFFFF408600144C
+S31520070CC0387F00044BFB3B153860FFFF4800008C3C
+S31520070CD03800FFFF2C9D0000901F00683800000099
+S31520070CE0901F0064418600687FE3FB787F84E37862
+S31520070CF038A0000180DF005838E0000039000000E6
+S31520070D004BFFF8F97C7E1B782C9EFFFF418600401F
+S31520070D107FE3FB787F64DB7838A0000180DF00580B
+S31520070D2038E00001390000004BFFF8D17C7E1B78A4
+S31520070D302C9EFFFF418600183B9C00013B7B000150
+S31520070D4037BDFFFF418200084BFFFFA0387F000415
+S31520070D504BFB3A897FC3F378800100247C0803A6DE
+S31520070D60834100088361000C8381001083A100144E
+S31520070D7083C1001883E1001C382100204E80002003
+S31520070D809421FFD87C0802A6930100089321000C22
+S31520070D9093410010936100149381001893A1001CBE
+S31520070DA093C1002093E100249001002C7C791B78C5
+S31520070DB07F3FCB783D200028817F0000812999DC61
+S31520070DC07C9E23787C8B48007CBB2B783B8000005D
+S31520070DD083BF0080418600382C8B00004186001097
+S31520070DE0800900247C8B0000418600244BFA38AD0D
+S31520070DF03FA0003D63BD000193A300004BFA389D39
+S31520070E0093A300003860FFFF480004043B1F00043B
+S31520070E107F03C3783880FFFF4BFB3B1D2C83FFFFE7
+S31520070E204086000C3860FFFF480003E43C00CB10E7
+S31520070E307F1E0000317BFFFF7C0BD9107D2000260B
+S31520070E405529DFFE7D3A0039418201143D200028CD
+S31520070E5083C999E04BFA38453800001690030000FD
+S31520070E603D200028817B0000812999DC7C8B480066
+S31520070E703B80FFFF4186038C2C8B000041860010A8
+S31520070E80800900247C8B0000418603784BFA380DB5
+S31520070E903C00003D6000000190030000813B0000FC
+S31520070EA02C8900004186035C807B00042C8300008C
+S31520070EB041860350801B00082C800000418603448E
+S31520070EC07D3D4B787C7D18504BFE62D97C83F000A4
+S31520070ED041850330807B00087C7D18504BFE62C518
+S31520070EE07C83F0004185031C807B00102C83000047
+S31520070EF0418600147C7D18504BFE62A97C83F00046
+S31520070F0041850300807B001C4BFFF3D13BC00001CA
+S31520070F10801B001C7FC318307C801800408602E4A3
+S31520070F20801B00102C800000408600103D200027E3
+S31520070F30392901FC913B00103B8000004BFA375DB5
+S31520070F409383000093D9004C937900807F03C3785D
+S31520070F504BFB388938600000480002B4409A010CE0
+S31520070F603B8000004BFA373593830000801D000C29
+S31520070F702C800000418600107C0803A67FA3EB780F
+S31520070F804E800021801D00102C8000004086001016
+S31520070F903D200027392901FC913D0010801D0010B6
+S31520070FA07C0803A67FA3EB784E8000217C7C1B78E8
+S31520070FB0201CFFFF212000007C0901142C80000043
+S31520070FC0901F004C40860078801D0018935D0030E6
+S31520070FD0901F0038801D001C807F0058901F003C02
+S31520070FE0A01D00222C830000B01F0044A01D002650
+S31520070FF0935F0040B01F0046A01D002EB01F00487B
+S315200710004186002C801F005C813D001C7C804800A7
+S315200710104186001C4BFB04A9935F0058935F005C35
+S315200710203D200027392904F8913F00203800FFFF8B
+S31520071030901F005038000000901F00542C9CFFFF83
+S31520071040408601C04BFA3655800300002C800000ED
+S31520071050408601B04BFA36453C00000C600000067E
+S31520071060900300004800019C801D00302C80000062
+S3152007107040860010835F004C2C9A00004186002C86
+S3152007108038000001901F004C4BFA36113C00000C2B
+S3152007109060000006900300007F03C3784BFB373DB3
+S315200710A03860FFFF480001683C00CB106000000451
+S315200710B07C9E00004185002C3C00CB10600000027E
+S315200710C07C9E000040840128419A01243C00CB10D5
+S315200710D0600000017C9E00004186003C480000F02D
+S315200710E03C00CB10600000307C9E000041860054F7
+S315200710F0418500103C00CB10600000104800000C12
+S315200711003C00CB10600000507C9E000041860034D6
+S31520071110480000BC801D00107C0803A67FA3EB783F
+S315200711204E8000217C7C1B78201CFFFF212000009D
+S315200711307C090114901F004C935D0030480000C4C1
+S3152007114080DF00582C86000041860034809F006887
+S315200711502C84FFFF41860028801F00642C80000016
+S315200711604186001C7FE3FB7838A0000138E00001A8
+S31520071170390000004BFFF4857C7C1B78807F005864
+S315200711803D40CB10614A00503003FFFF7D201910E8
+S315200711907FC05278216000007C0B01147D2900391D
+S315200711A04182001C809F005C4BFA8B6D937F006801
+S315200711B038000001901F0064480000483800FFFFF0
+S315200711C0901F0068913F0064480000387FA3EB78A2
+S315200711D0800300087C0803A67FC4F3787F65DB7845
+S315200711E04E8000217C7C1B78480000184BFA34ADD2
+S315200711F03C00000C60000002900300003B80FFFFCC
+S31520071200387F00044BFB35D57F83E3788001002C9C
+S315200712107C0803A6830100088321000C8341001064
+S31520071220836100148381001883A1001C83C10020D9
+S3152007123083E10024382100284E8000209421FFF0E6
+S315200712407C0802A693C1000893E1000C90010014C4
+S315200712507C9F2378A01F001070090008801F001CA0
+S315200712607C7E1B78901F000C41820010801F001483
+S315200712702C800000408600147FE3FB78480000B1ED
+S315200712802C83000040860084817F0004801F001481
+S31520071290813F00187D6058507C8B480057DE063EFC
+S315200712A0418400187FE3FB784BFA14652C830000F2
+S315200712B04086005839600000801F000C813F0004DB
+S315200712C03000FFFF901F000C38090001901F000413
+S315200712D09BC90000801F0018396B00017C8B00001A
+S315200712E041860018A01F00107009000141820024C2
+S315200712F02C9E000A4086001C7FE3FB784BFA1411CC
+S315200713002C8300004186000C3860FFFF4800000848
+S315200713107FC3F378800100147C0803A683C10008E5
+S3152007132083E1000C382100104E8000209421FFF025
+S315200713307C0802A693C1000893E1000C90010014D3
+S315200713407C7F1B78A13F0010713E00084082006415
+S31520071350712000104082000C3860FFFF480000A46F
+S315200713607120000441820040807F00202C830000EA
+S3152007137041860018381F00307C830000418600080C
+S315200713804BFB013D93DF002039200000913F0008E9
+S31520071390A01F0010813F00147000FFDBB01F001054
+S315200713A0913F0004A01F001060000008B01F001026
+S315200713B0801F00142C8000004086000C7FE3FB78FA
+S315200713C04BFE5C75A13F0010712000014182001C75
+S315200713D039200000801F0018913F000C7C0000D0A8
+S315200713E0901F001C480000187120000238000000DA
+S315200713F040820008801F0018901F000C38600000EC
+S31520071400800100147C0803A683C1000883E1000C31
+S31520071410382100104E8000209421FFE87C0802A680
+S315200714209381000893A1000C93C1001093E1001447
+S315200714309001001C7C7C1B787C8323787CA42B78EA
+S315200714403FA0002838BD99EC4800003D3BBD99ECEC
+S31520071450813D0000815D00047F83E37891230000AE
+S31520071460914300048001001C7C0803A683810008A1
+S3152007147083A1000C83C1001083E1001438210018D2
+S315200714804E8000207C0323D690050000812500008E
+S315200714907C0401D62C8900007C60185090650004D6
+S315200714A04C8400202C8300004C850020392900011C
+S315200714B080050004912500007C0400509005000457
+S315200714C04E8000209421FFE07C0802A693A10014F9
+S315200714D093C1001893E1001C900100243800001BDB
+S315200714E0900100083FA00028389D99F438A10008EC
+S315200714F048000025387D99F4800100247C0803A63E
+S3152007150083A1001483C1001883E1001C3821002021
+S315200715104E8000209421FFF87C0802A69001000C3B
+S315200715207C661B787C832378808500003CA0002777
+S3152007153038A57BB44BFE60658001000C7C0803A6AA
+S31520071540382100084E800020352E332E310000002A
+S3152007155041756720203320323030312C2031353AFF
+S3152007156033313A3338000000307866663030303011
+S3152007157030303A307830373A2D313A3078303A2D84
+S31520071580313A2D313A307832303A307832303A3073
+S3152007159078303A307866663A323A30783400000046
+S315200715A06C6F00002F6E756C6C0000002573256428
+S315200715B0000000002F7479436F2F00006D75784C5B
+S315200715C06F6164206661696C6564210A000000000A
+S315200715D074426F6F740000000A0000005B5678574C
+S315200715E06F726B7320426F6F745D3A2000000000A4
+S315200715F0656E747279203D20307825780A000000C0
+S31520071600556E7265636F676E697A656420636F6D61
+S315200716106D616E642E205479706520273F272066DA
+S315200716206F722068656C702E0A0000000A5072657A
+S31520071630737320616E79206B657920746F207374BC
+S315200716406F70206175746F2D626F6F742E2E2E0A40
+S31520071650000000002532640D000000000A61757441
+S315200716606F2D626F6F74696E672E2E2E0A0A000021
+S3152007167043616E2774206C6F616420626F6F7420DC
+S3152007168066696C6521210A000A0A0A0A0A0A0A0AF1
+S315200716900A0A0A0025323873257300000000000065
+S315200716A05678576F726B732053797374656D204222
+S315200716B06F6F74000A0A0A436F70797269676874D4
+S315200716C020313938342D31393938202057696E641D
+S315200716D02052697665722053797374656D732C2051
+S315200716E0496E632E0A0A0A0A0A0A00004350553A27
+S315200716F02025730A0000000056657273696F6E3ADB
+S315200717002025730A00000000425350207665727325
+S31520071710696F6E3A20312E312F340A004372656184
+S3152007172074696F6E20646174653A2025730A0A000E
+S3152007173020203078313030202D2075736520707247
+S315200717406F78792061727000202030783830202019
+S315200717502D20757365207466747020746F206765F5
+S315200717607420626F6F7420696D61676500000000E1
+S3152007177020203078343020202D2075736520626F25
+S315200717806F747020746F2067657420626F6F742082
+S31520071790706172616D657465727300002020307800
+S315200717A0323020202D2064697361626C65206C6F4E
+S315200717B067696E2073656375726974790000000026
+S315200717C020203078303820202D20717569636B20D2
+S315200717D06175746F626F6F7420286E6F20636F75E3
+S315200717E06E74646F776E290020203078303420207D
+S315200717F02D20646F6E2774206175746F626F6F7406
+S315200718000000000020203078303220202D206C6FF9
+S315200718106164206C6F63616C2073797374656D20C6
+S3152007182073796D626F6C7300426F6F7420666C619B
+S3152007183067733A00626F6F74206465766963653AE9
+S31520071840206174613D6374726C2C647269766520BD
+S315200718502020202020202020202066696C65206EED
+S31520071860616D653A202F617461302F7678576F72D4
+S315200718706B730000202020202020202020202020DD
+S315200718802020202020202020202020202020746E89
+S315200718903D7461726765746E616D6520733D736310
+S315200718A072697074206F3D6F74686572000000005E
+S315200718B02464657628302C70726F636E756D29687F
+S315200718C06F73743A2F66696C6520683D2320653DE2
+S315200718D02320623D2320673D2320753D75737220A3
+S315200718E05B70773D7061737377645D20663D230077
+S315200718F02D207365742065746865726E6574206122
+S3152007190064647265737300004E0000002D207072A8
+S31520071910696E74206E6574776F726B20696E746555
+S3152007192072666163652064657669636520616464B0
+S3152007193072657373000000006E206E657469660019
+S315200719402D207072696E7420666174616C206578CB
+S3152007195063657074696F6E00650000002D20636FE4
+S315200719607079206D656D6F7279000000742061644F
+S3152007197072732C20616472732C206E62797465737E
+S31520071980000000002D2066696C6C206D656D6F72F6
+S31520071990790000006620616472732C206E62797468
+S315200719A065732C2076616C75650000002D206D6FA0
+S315200719B064696679206D656D6F7279006D20616443
+S315200719C0727300002D20646973706C6179206D65D0
+S315200719D06D6F7279000000006420616472735B2C5E
+S315200719E06E5D00002D20676F20746F20616472730F
+S315200719F00000000067206164727300002D206C6F61
+S31520071A00616420626F6F742066696C650000000050
+S31520071A106C0000002D206368616E676520626F6F1A
+S31520071A207420706172616D7300000000630000000E
+S31520071A302D207072696E7420626F6F7420706172C8
+S31520071A40616D7300700000002D20626F6F7420286F
+S31520071A506C6F616420616E6420676F290000000047
+S31520071A60400000002D207072696E742074686973B7
+S31520071A70206C6973740000003F00000020252D327A
+S31520071A8031732025730A00000A617661696C6162E9
+S31520071A906C6520626F6F7420646576696365733A37
+S31520071AA000000000456E68616E636564204E6574AC
+S31520071AB0776F726B20446576696365730A00000049
+S31520071AC020257300206174610000000061746100A5
+S31520071AD0252A3373252A632564252A63256400006E
+S31520071AE00A4572726F72206C6F6164696E67206631
+S31520071AF0696C653A206572726E6F203D20307825B5
+S31520071B00782E0A0070707000736C000062700000F7
+S31520071B10736D00004572726F723A2070726F63653B
+S31520071B2073736F72206E756D626572206D7573742F
+S31520071B30206265206E6F6E2D7A65726F20746F2016
+S31520071B40626F6F742066726F6D2062700A000000E4
+S31520071B504572726F722072656164696E672074615F
+S31520071B6072676574206164647265737320696E6633
+S31520071B706F726D6174696F6E2E0A00004661696C1B
+S31520071B80656420746F207374617274206465766946
+S31520071B9063652025730A00004661696C65642074B5
+S31520071BA06F20617474616368205443502F49502015
+S31520071BB0746F2064657669636520257300000000CD
+S31520071BC04174746163686564205443502F495020DB
+S31520071BD0696E7465726661636520746F2025732547
+S31520071BE0642E0A00696E76616C696420646576697D
+S31520071BF0636520222573220A00000000696E697436
+S31520071C0069616C697A6174696F6E206661696C6552
+S31520071C106420666F72206465766963652022257362
+S31520071C20220A00005375626E6574204D61736B3A04
+S31520071C3020307825780A00003A2578003A3A256C2C
+S31520071C40780000003A256C78000000003132372EE4
+S31520071C50302E302E310000006C6F63616C686F7315
+S31520071C60740000004C6F6164696E672E2E2E20006B
+S31520071C706765740062696E61727900005245545235
+S31520071C80202573006361742025730000515549543C
+S31520071C90000000000A25733A25733A2025730A00A7
+S31520071CA06472697665206973206F7574206F662064
+S31520071CB072616E67652028302D2564292E0A00005B
+S31520071CC05658444F530000005658455854000000B4
+S31520071CD04572726F7220647572696E6720617461CE
+S31520071CE04465764372656174653A2025780A000053
+S31520071CF04572726F7220647572696E6720646F739E
+S31520071D004673446576496E69743A2025780A000039
+S31520071D10436F756C64206E6F7420696E6974696190
+S31520071D206C697A652E0A0000417474616368696E6E
+S31520071D306720746F20415441206469736B20646562
+S31520071D40766963652E2E2E2000000000757372417A
+S31520071D507461436F6E666967206661696C65642E78
+S31520071D600A000000646F6E652E0A00004C6F6164DE
+S31520071D70696E672025732E2E2E0000000A43616E9A
+S31520071D806E6F74206F70656E20222573222E0A00CF
+S31520071D900A6572726F72206C6F6164696E6720665E
+S31520071DA0696C653A20737461747573203D203078A9
+S31520071DB025782E0A00000000496E746572666163F5
+S31520071DC065206E6F74207370656369666965640A3A
+S31520071DD0000000004164647265737320666F722089
+S31520071DE06465766963652022257322203D3D203070
+S31520071DF0303A30303A30303A30303A30303A25308F
+S31520071E0032780A003000000043616E6E6F742069D5
+S31520071E106E697469616C697A6520696E7465726624
+S31520071E20616365206E616D656420222573220A0031
+S31520071E30446576696365206E616D65642022257326
+S31520071E402220646F65736E27742065786973742EF4
+S31520071E500A0000004164647265737320666F7220FE
+S31520071E606465766963652022257322203D3D2025FA
+S31520071E703032783A253032783A253032783A25305A
+S31520071E8032783A253032783A253032780A000000FF
+S31520071E905374617274696E6720617420307825786F
+S31520071EA02E2E2E0A0A000000253036783A202025C5
+S31520071EB03034782D00000000257825317300000086
+S31520071EC0253036783A202000202000002000000008
+S31520071ED020202A253136732A0A253036783A2020BB
+S31520071EE000000000253032780000000020202A2537
+S31520071EF03136732A0A000000626F6F74457863488B
+S31520071F00616E646C65723A20657863657074696F73
+S31520071F106E2063617567687420627574206E6F2002
+S31520071F2076616C6964207461736B2E0A0000000069
+S31520071F30256300006D697373696E6720706172612E
+S31520071F406D657465720A0000696E76616C69642036
+S31520071F50706172616D657465720A00006D6F7466D3
+S31520071F60656328302C3029617374726F3A63646312
+S31520071F702F7678576F726B7320683D31302E312E4E
+S31520071F80312E3520653D31302E312E312E323030EF
+S31520071F9020753D616E6F6E796D6F75732070773D15
+S31520071FA0746F726E61646F004572726F723A206940
+S31520071FB06E76616C6964206E65746D61736B2069DA
+S31520071FC06E20626F6F74206669656C6420222573A4
+S31520071FD0222E0A004572726F723A20696E76616CFC
+S31520071FE0696420696E657420616464726573732001
+S31520071FF0696E20626F6F74206669656C642022257E
+S3152007200073222E0A000000004E6574776F726B20CC
+S31520072010696E7465726661636520257320756E6BBC
+S315200720206E6F776E2E0A00004E6574776F726B207F
+S31520072030696E7465726661636520257320686173AE
+S31520072040206E6F2061747461636820726F7574697E
+S315200720506E652E0A00000000417474616368696E1C
+S3152007206067206E6574776F726B20696E746572660A
+S315200720706163652025732E2E2E2000006661696C0C
+S3152007208065642E0A4572726F723A20535F696F73C1
+S315200720904C69625F434F4E54524F4C4C45525F4EEC
+S315200720A04F545F50524553454E542E0A00000000A8
+S315200720B06661696C65643A20535F696F734C696220
+S315200720C05F494E56414C49445F45544845524E4513
+S315200720D0545F414444524553532C20757365204E13
+S315200720E020636F6D6D616E640A0000006661696C1E
+S315200720F065643A206572726E6F203D202523782EFF
+S315200721000A0000004E6F20696E6574206164647250
+S315200721106573732073706563696669656420666F86
+S315200721207220696E746572666163652025732E0A4F
+S31520072130000000004572726F722073657474696EB1
+S315200721406720696E65742061646472657373206F96
+S315200721506620257320746F2025732C206572726E76
+S315200721606F203D202523780A000000000A45727259
+S315200721706F723A206261636B706C616E6520647260
+S3152007218069766572207265666572656E6365642019
+S31520072190627574206E6F7420696E636C75646564EE
+S315200721A02E0A00000A4572726F723A20736C6970A4
+S315200721B0206E6F7420696E636C756465642E0A00E1
+S315200721C00A4572726F723A20707070206E6F742093
+S315200721D0696E636C756465642E0A000047657474BE
+S315200721E0696E6720626F6F7420706172616D6574A6
+S315200721F065727320766961206E6574776F726B20BE
+S31520072200696E746572666163652025730000000038
+S315200722100A426F6F7470205365727665723A25731A
+S315200722200A00000020202020426F6F742066696C08
+S31520072230653A2025730A000020202020426F6F74FC
+S3152007224020686F73743A2025730A00002020202007
+S31520072250426F6F7420646576696365204164647292
+S3152007226020282573293A2025730A000020202020BC
+S315200722705375626E6574206D61736B3A20307825CD
+S31520072280780A000043757272656E74204574686516
+S31520072290726E657420416464726573732069733A3C
+S315200722A020000000253032783A253032783A25301A
+S315200722B032783A253032783A253032783A25303214
+S315200722C0780A00004D6F64696679206F6E6C7920F5
+S315200722D0746865206C617374203320627974657322
+S315200722E02028626F61726420756E6971756520702A
+S315200722F06F7274696F6E29206F66204574686572E0
+S315200723006E657420416464726573732E0A0000003B
+S315200723105468652066697273742033206279746500
+S315200723207320617265206669786564206174206D03
+S31520072330616E75666163747572657227732064654D
+S315200723406661756C74206164647265737320626C50
+S315200723506F636B2E0A000000253032782D2025303A
+S3152007236032780A00253032782D2000004E657720F6
+S3152007237045746865726E657420416464726573730B
+S315200723802069733A20000000253032783A00000091
+S31520072390253032780A00000073656D476976652017
+S315200723A06F6E20693263496E7453656D207265744A
+S315200723B075726E73204552524F522025640A0000CB
+S315200723C04552524F522063616E6E6F742063726559
+S315200723D061746520693263496E7453656D0A00001E
+S315200723E04552524F522063616E6E6F742063726539
+S315200723F06174652069326353656D0A00493243204B
+S315200724007472616E736D69742074696D6564206F6B
+S3152007241075742025640A000073656D54616B652009
+S315200724206F6E20693263496E7453656D20696E201D
+S315200724304932437472616E736D697420726574755F
+S31520072440726E73204552524F522025640A000000AF
+S31520072450545842445F5220616E6420693263496E44
+S315200724607453656D20696E636F6E73697374656ED9
+S31520072470740A00004E6F2041636B6E6F776C65643C
+S315200724806765206F6E20493243205472616E736DE3
+S3152007249069740A0049324320726561644244207494
+S315200724A0696D6564206F75742025640A0000000035
+S315200724B073656D54616B65206F6E20693263496E53
+S315200724C07453656D20696E2072656164424420727B
+S315200724D0657475726E73204552524F522025640AD1
+S315200724E000000000525842445F4520616E6420690F
+S315200724F03263496E7453656D20696E636F6E7369B7
+S315200725007374656E740A000073656D54616B65207C
+S3152007251072657475726E73204552524F5220256428
+S315200725200A0000000A5278206275666665720A00FC
+S315200725302D2D2D2D2D2D2D2D2D0A00005374617433
+S315200725407573282578290A00427566666572203ACA
+S315200725502000000025233034782020000A0A5478EA
+S315200725602062756666657220300A00002D2D2D2D96
+S315200725702D2D2D2D2D2D2D2D2D0A00000A0A5478AF
+S315200725802062756666657220310A00000A0000001F
+S31520072590493243205265676973746572730A00006E
+S315200725A049324D4F4428252378290A004932414488
+S315200725B04428252378290A004932425247282523C9
+S315200725C078290A004932434F4D28252378290A00BE
+S315200725D0493243455228252378290A004932434D53
+S315200725E05228252378290A004932435F524241530C
+S315200725F04528252378290A004932435F5442415307
+S315200726004528252378290A004932435F52464352F3
+S3152007261028252378290A00004932435F5446435226
+S3152007262028252378290A00004932435F4D52424C18
+S315200726305228252378290A004932435F52535441A9
+S31520072640544528252378290A000000004932435F8C
+S31520072650524250545228252378290A004932435F8B
+S3152007266054535441544528252378290A000000004D
+S315200726704932435F544250545228252378290A0069
+S3152007268045726173696E6720626F6F7420666C612D
+S31520072690736800002E000000457261736520436F42
+S315200726A06D706C657465210A0000000072000000D9
+S315200726B07678426F6F744C6F61644865782045520F
+S315200726C0524F523A20756E61626C6520746F206F87
+S315200726D070656E2025730A007678426F6F744C6F8B
+S315200726E06164486578204552524F523A20756E618B
+S315200726F0626C6520746F20637265617465206669F4
+S315200727006C6520646573636970746F7220666F7277
+S315200727102066696C652025730A0000007678426F6B
+S315200727206F744C6F6164486578204552524F523A10
+S3152007273020756E61626C6520746F2072657365748F
+S3152007274020666C6173680A0050726F6772616D6DDF
+S31520072750696E6720666C617368000000533300005A
+S315200727607678426F6F744C6F61644865782057415D
+S31520072770524E494E473A20532D5265636F72642055
+S31520072780636F6E7461696E7320696E76616C6964B6
+S3152007279020636865636B73756D3A2061646472287C
+S315200727A030782578292C20636865636B73756D28C7
+S315200727B030782578290A00007678426F6F744C6F37
+S315200727C06164486578205741524E494E473A2075ED
+S315200727D06E61626C6520746F2070726F6772616DAF
+S315200727E020532D5265636F72643A206164647228A0
+S315200727F030782578290A0000426F6F7420666C614D
+S3152007280073682070726F6772616D6D6564210A0047
+S315200728107678426F6F744C6F6164205741524E49E8
+S315200728204E472121212120566572696679206661E6
+S31520072830696C656421212121212121212121212141
+S31520072840210A0000726200007678426F6F744C6F1F
+S31520072850616442696E204552524F523A20756E6125
+S31520072860626C6520746F206F70656E2025730A0071
+S315200728707678426F6F744C6F616442696E20455259
+S31520072880524F523A20756E61626C6520746F2072C2
+S315200728906573657420666C6173680A0050726F678A
+S315200728A072616D6D696E6720666C617368207769E2
+S315200728B074682076657273696F6E2025732073742A
+S315200728C06172744164647228307825782920656E90
+S315200728D064416464722830782578290A000000004C
+S315200728E07678426F6F744C6F616442696E204552E9
+S315200728F0524F523A20556E61626C6520746F207074
+S31520072900726F6772616D20736563746F722061746D
+S3152007291020307825780A00007678426F6F744C6FDE
+S31520072920616442696E205741524E494E4721212103
+S315200729302120566572696679206661696C6564210E
+S315200729402121212121212121212121210A000000C4
+S3152007295080000000E0000000E0010000E100000028
+S3152007296061746100564950455243414C4C5F424180
+S31520072970534500002F766970657263656C6C2E630C
+S31520072980666700005B696E65745F6F6E5F65746866
+S3152007299065726E65745D0A0025730A005379737430
+S315200729A0656D2053657269616C204E756D6265721F
+S315200729B03A2025730A00000053797374656D2050F9
+S315200729C0617274204E756D6265723A2025730A000E
+S315200729D04344432053657269616C204E756D626569
+S315200729E0723A2025730A00004344432050617274CB
+S315200729F0204E756D6265723A2025730A0000000025
+S31520072A004A657443656C6C20434443202D20506FE0
+S31520072A10776572504320383630540000312E312FD7
+S31520072A20340000004C6F6164696E6720656E642E02
+S31520072A302E2E0A006D6F7466656300006D6F7446EF
+S31520072A406563456E644C6F61643A20656E657441B3
+S31520072A506464723D200A090909092020202030785C
+S31520072A6025782030782578203078257820307825E5
+S31520072A707820307825782030782578200A2000009D
+S31520072A804D6F746F726F6C6120464543204574689D
+S31520072A9065726E657420456E68616E636564204E47
+S31520072AA06574776F726B20447269766572000000D1
+S31520072AB06D6F74466563456E644C6F61642E2E2E6A
+S31520072AC020446F6E65200A00556E6C6F6164696ECF
+S31520072AD06720656E642E2E2E000000006D6F7446EB
+S31520072AE06563556E6C6F61642E2E2E20446F6E655E
+S31520072AF00A0000003A0000006D6F74466563456E54
+S31520072B006450617273653A20756E69743D25642039
+S31520072B106D6F7443706D416464723D3078257820FB
+S31520072B20697665633D307825780A090920627566D6
+S31520072B30426173653D307825782062756653697AD8
+S31520072B40653D30782578200A000000006D6F7446B1
+S31520072B506563456E6450617273653A206669666F70
+S31520072B605478426173653D30782578206669666FAB
+S31520072B705278426173653D307825780A09092074B1
+S31520072B8062644E756D3D2564207262644E756D3D97
+S31520072B90256420666C6167733D307825780A0000C6
+S31520072BA06D6F74466563456E6450617273653A202E
+S31520072BB0706879416464723D307825782069736F2F
+S31520072BC0506879416464723D307825780A20202040
+S31520072BD02020202020202020202020202020207078
+S31520072BE068794465664D6F64653D30782578200A97
+S31520072BF0000000006D6F74466563496E69744D6504
+S31520072C006D3A20736861726564200A090909090902
+S31520072C1020202020202020206D656D6F7279206E60
+S31520072C206F7420636163686520636F686572656E7C
+S31520072C30740A00006D6F74466563496E69744D6545
+S31520072C406D3A20636F756C64206E6F74200A0909CC
+S31520072C5009090920202020202020206F627461691D
+S31520072C606E206D656D6F72790A0000006D6F744670
+S31520072C706563496E69744D656D3A206E6F7420657C
+S31520072C806E6F756768200A0909090909202020201F
+S31520072C90202020206D656D6F72790A006D6F74464E
+S31520072CA06563496E69744D656D3A206E6F7420654C
+S31520072CB06E6F756768200A09090909090920202006
+S31520072CC06D656D6F72790A006D6F74466563496E1F
+S31520072CD069744D656D3A206E6F7420656E6F7567E2
+S31520072CE068200A0909090909202020202020206DAB
+S31520072CF0656D6F72790A00006D6F74466563496E5C
+S31520072D0069744D656D2E2E2E20446F6E650A000060
+S31520072D105374617274696E6720656E642E2E2E0A4F
+S31520072D20000000003A206E656564204D4D55206DE4
+S31520072D30617070696E6720666F7220616464726560
+S31520072D40737320307825780A000000004661696C85
+S31520072D50656420746F207072652D696E6974696168
+S31520072D606C697A6520746865205048590A00000006
+S31520072D704661696C656420746F20696E6974696140
+S31520072D806C697A6520746865205048590A000000E6
+S31520072D905374617274696E6720656E642E2E2E20B9
+S31520072DA0446F6E650A0000006D6F74466563537441
+S31520072DB06F702E2E2E0A00006D6F7446656353744E
+S31520072DC06F702E2E2E20446F6E65200A000000009D
+S31520072DD06D6F74466563496E743A206576656E74C1
+S31520072DE020307825782C2073746174757320307899
+S31520072DF025780A006D6F74466563496E743A2062BA
+S31520072E007573206572726F722C2072657374617286
+S31520072E107420636869700A006D6F74466563496E2E
+S31520072E20743A20626162626C696E672074782065E5
+S31520072E3072726F720A0000006D6F74466563496E81
+S31520072E40743A20626162626C696E672072782065C7
+S31520072E5072726F720A0000006D6F74466563496E61
+S31520072E60743A2074782F727820696E74720A00007B
+S31520072E706D6F74466563496E743A2068656172742E
+S31520072E806265617420636865636B206661696C0A95
+S31520072E90000000006D6F74466563496E743A206DB5
+S31520072EA06969207472616E736665720A0000000094
+S31520072EB06D6F74466563496E743A20677261636500
+S31520072EC066756C207472616E736D69740A000000F2
+S31520072ED06D6F7446656353656E642E2E2E0A000049
+S31520072EE06D6F7446656353656E642E2E2E446F6E22
+S31520072EF0650A00006D6F7446656353656E64206DC1
+S31520072F006F7265206D626C6B73200A006D6F744655
+S31520072F10656353656E64206C617374206C656E3DC2
+S31520072F20307825780A000000436F756C64206E6F31
+S31520072F307420616C6C6F63617465206D656D6F724B
+S31520072F407920666F72206A65746665632064726984
+S31520072F5076657221210A00006A6574466563527494
+S31520072F60705461626C65206C6F6F6B75702066613B
+S31520072F70696C6564210A00000A2A2A2A2A2A2A2A2B
+S31520072F802A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A74
+S31520072F902A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A64
+S31520072FA02A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A54
+S31520072FB02A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A44
+S31520072FC02A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A34
+S31520072FD02A2A2A2A2A2A2A2A2A2A0A00546F74617E
+S31520072FE06C207061636B6574732070726F63657391
+S31520072FF073656420256C643B2052545020706163AE
+S315200730006B6574732070726F6365737365642025AF
+S315200730106C642C4D617820525450207061636B6527
+S3152007302074206C656E2025640A0000005061636B6E
+S31520073030657473206E6F742070726F636573736522
+S31520073040643A204E6F6E2D55445020256C642C20F3
+S315200730504E6F6E2D52545020256C642C205061796A
+S315200730606C6F616420746F6F206C617267652025B1
+S315200730706C642C2052545020506F7274206E6F74DB
+S31520073080207265676973746572656420256C640AA6
+S31520073090000000002A2A2A2A2A2A2A2A2A2A2A2A0B
+S315200730A02A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A53
+S315200730B02A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A43
+S315200730C02A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A33
+S315200730D02A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A23
+S315200730E02A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A13
+S315200730F02A2A2A2A2A0A00006D6F744665635365B1
+S315200731006E643A20696E76616C696420704D626CD4
+S315200731106B0A00006D6F7446656353656E642E2EC9
+S315200731202E206E6F74206F757220546264200A00F9
+S315200731306D6F74466563546264436C65616E0A00FD
+S3152007314052657374617274206D7578200A000000C9
+S315200731506D6F74466563546264436C65616E2E2E8B
+S315200731602E446F6E650A00006D6F74466563546260
+S3152007317064436865636B3A206C61746520636F6C82
+S315200731806C6973696F6E0A006D6F74466563546266
+S3152007319064436865636B3A2072657472616E736DFA
+S315200731A06974206C696D6974000000006D6F744640
+S315200731B06563546264436865636B3A207478207547
+S315200731C06E64657272756E0A000000006D6F744634
+S315200731D06563546264436865636B3A206361727200
+S315200731E06965722073656E7365200A006D6F744674
+S315200731F065635278547848616E646C653A200A0094
+S315200732006D6F7446656348616E646C655265637657
+S31520073210496E743A200A00006D6F744665634861EB
+S315200732206E646C6552656376496E743A20525520F2
+S315200732304E4F542052454144590A00006D6F74463B
+S31520073240656348616E646C6552656376496E742E54
+S315200732502E2E20446F6E652C200A00006D6F744653
+S3152007326065635265636569766520726264496E6433
+S3152007327065783D25640A00006D6F7446656352655F
+S3152007328063656976653A20626164207262640A0022
+S315200732906D6F74466563526563656976653A206C1A
+S315200732A0656E2076696F6C6174696F6E0A0000001F
+S315200732B06D6F74466563526563656976653A206EF8
+S315200732C06F7420616C69676E65640A006D6F74465A
+S315200732D06563526563656976653A2043524320657F
+S315200732E072726F720A0000006D6F744665635265CD
+S315200732F063656976653A207278206F76657272758E
+S315200733006E0A00006D6F744665635265636569765C
+S31520073310653A207472756E63206672616D65200A40
+S31520073320000000006D6F74466563526563656976B4
+S3152007333065206D656D2070726F626C656D0A000081
+S315200733406D6F74466563526563656976652E2E2EA5
+S3152007335020446F6E652C200A000000006D6F7446AE
+S315200733606563526264436C65616E2E2E2E20446F10
+S315200733706E652C200A0000006D6F744665635072D7
+S3152007338065506879436F6E6669673A20686561722A
+S31520073390746265617420636F6E74726F6C200A00A5
+S315200733A06D6F7446656352784374726C52656756BF
+S315200733B0616C4765743A2070726F6D6973636F75B8
+S315200733C073206D6F6465200A000000006D6F7446D8
+S315200733D0656352784374726C52656756616C4765AC
+S315200733E0743A2066756C6C206475706C6578200A53
+S315200733F0000000006D6F7446656352784374726CE3
+S3152007340052656756616C4765743A207365726961C0
+S315200734106C20696E74657266616365200A00000018
+S315200734206D6F7446656352784374726C526567563E
+S31520073430616C4765743A206C6F6F706261636B20AD
+S315200734406D6F6465200A00006D6F74466563547856
+S315200734504374726C52656756616C4765743A206887
+S31520073460656172746265617420636F6E74726F6CC6
+S31520073470200A00006D6F7446656354784374726C36
+S3152007348052656756616C4765743A2066756C6C2081
+S315200734906475706C6578200A00000000496F6374B4
+S315200734A06C20756E69743D3078257820636D643D90
+S315200734B0256420646174613D307825780A00000010
+S315200734C0656E64466C6167733D30782578200A00FF
+S315200734D045494F4353464C4147533A203078257840
+S315200734E03A20307825780A0045494F4347464C41CC
+S315200734F047533A20307825783A20307825780A00BD
+S31520073500494F43544C2063616C6C206D6F7446653C
+S3152007351063506F6C6C53746172740A00494F43543D
+S315200735204C2063616C6C206D6F74466563506F6CBD
+S315200735306C53746F700A0000494E56414C4944201B
+S31520073540494F20434F4D4D414E442121200A00002B
+S315200735506D6F74466563506879496E697420636830
+S3152007356065636B206361626C6520636F6E6E65634E
+S3152007357074696F6E200A00006D6F744665634D6926
+S315200735806950726F62652E2E2E20656E64730A004F
+S315200735906D6F744665634D696957726974652072E4
+S315200735A065673D2564200A09090909202020504816
+S315200735B0593D256420646174613D307825780A0079
+S315200735C06D6F744665634D696944696167207265E5
+S315200735D0736574206661696C0A0000006D6F744616
+S315200735E065634D6969446961672064652D69736FF1
+S315200735F06C617465206661696C0A00006D6F74469C
+S3152007360065634D6969446961672E2E2E20656E6450
+S31520073610730A00006D6F744665634D696949736F58
+S315200736206C617465206661696C0A00006D6F74466B
+S3152007363065634D696949736F6C6174652E2E2E20FB
+S31520073640656E64730A0000006D6F744665634D6985
+S3152007365069416E52756E207068794164733D307882
+S3152007366025780A006D6F744665634D6969416E5208
+S31520073670756E20657870537461743D307825780AA5
+S31520073680000000006D6F744665634D6969416E538E
+S315200736907461727420706879206E6F74200A090924
+S315200736A00909202020202020206175746F206E654F
+S315200736B0672063617061626C650A00006D6F7446EE
+S315200736C065634D6969416E537461727420617574BF
+S315200736D06F206E6567206661696C0A006D6F744698
+S315200736E065634D6969416E5374617274206175749F
+S315200736F06F206E656720646F6E65207068795374D6
+S3152007370061743D307825780A000000006D6F744695
+S3152007371065634D69694261736963436865636B20B5
+S315200737200A0909090909202020706879207374611C
+S31520073730743D307825780A006D6F744665634D6948
+S31520073740694261736963436865636B0A09090909F5
+S315200737502020204C696E6B2075702120737461744C
+S3152007376075733D307825780A000000006D6F744622
+S3152007377065634D69694261736963436865636B2055
+S3152007378072656D6F7465206661756C740A0000003A
+S315200737906D6F744665634D6969416E436865636BF2
+S315200737A03A0A090909092020202020202066617568
+S315200737B06C7420657870537461743D307825780A67
+S315200737C0000000006D6F744665634D6969416E435D
+S315200737D06865636B20706172746E6572207374619D
+S315200737E0743D307825780A006D6F744665634D6998
+S315200737F069416E436865636B207068794164733DE0
+S31520073800307825780A090909092020207068795017
+S3152007381072746E3D3078257820636F6D6D6F6E3DBF
+S3152007382030782578207068794578703D3078257806
+S315200738300A0000006D6F744665634D6969416E43E2
+S315200738406865636B2073706565643D2564206D6FBD
+S3152007385064653D25730A000066756C6C2064757077
+S315200738606C65780068616C66206475706C65780095
+S315200738706D6F744665634D6969416E436865636B11
+S31520073880206661696C210A006D6F744665634D6910
+S3152007389069416E436865636B204F4B0A0000000041
+S315200738A06D6F744665634D69694D6F6465466F72C2
+S315200738B06365200A000000006D6F744665634D69D5
+S315200738C0694D6F6465466F726365207370656564BD
+S315200738D03D2564206D6F64653D25640A0000000060
+S315200738E06D6F744665634D6969446566466F726395
+S315200738F065200A006D6F744665634D696944656680
+S31520073900466F7263652073706565643D2564206D17
+S315200739106F64653D25640A006D6F744665634D4384
+S3152007392061737441646472416464206164647220C3
+S315200739303D203078257820307825780A0909090925
+S3152007394020202020203078257820307825782030B0
+S3152007395078257820307825780A0000006D6F744620
+S3152007396065634D436173744164647244656C206179
+S31520073970646472203D203078257820307825780AAF
+S315200739800909090920202020203078257820307839
+S315200739902578203078257820307825780A00000089
+S315200739A06D6F744665634D436173744164647247F2
+S315200739B065740A006D6F744665634861736854625F
+S315200739C06C4164642061646472203D2030782578D8
+S315200739D020307825780A0909090920202020203057
+S315200739E07825782030782578203078257820307803
+S315200739F025780A006D6F744665634861736854625B
+S31520073A006C41646420686173685265673D30782528
+S31520073A10780A00006D6F7446656343726347657461
+S31520073A202061646472203D203078257820307825FF
+S31520073A30780A0909090920202020203078257820AE
+S31520073A4030782578203078257820307825780A0030
+S31520073A506D6F74466563437263476574206372634B
+S31520073A60203D2030782578200A0000006D6F7446A7
+S31520073A706563506F6C6C53656E640A006D6F744690
+S31520073A806563506F6C6C526563656976650A0000DD
+S31520073A906D6F74466563506F6C6C53746172740AEC
+S31520073AA0000000006D6F74466563506F6C6C53742D
+S31520073AB06F702E2E2E20656E640A00004164647294
+S31520073AC0206C6F773A202020202020307825780A0E
+S31520073AD0000000004164647220686967683A202004
+S31520073AE020202020307825780A0000004861736856
+S31520073AF0207461626C6520686967683A20202020F7
+S31520073B002020307825780A0048617368207461621E
+S31520073B106C65206C6F773A2020202020203078256E
+S31520073B20780A000052782072696E67207374617272
+S31520073B30743A202020202020307825780A0000009B
+S31520073B4054782072696E672073746172743A2020E4
+S31520073B5020202020307825780A0000005278206D12
+S31520073B606178206275666665723A202020202020BB
+S31520073B70307825780A00000045746865726E65748A
+S31520073B8020436F6E74726F6C6C65723A202020200A
+S31520073B902020307825780A00496E74657272757010
+S31520073BA074206576656E743A202020202020307890
+S31520073BB025780A00496E74657272757074206D6176
+S31520073BC0736B3A202020202020307825780A0000A1
+S31520073BD0496E7465727275707420766563746F7238
+S31520073BE02F6C6576656C3A2020202020203078259A
+S31520073BF0780A00005278206163746976653A202036
+S31520073C0020202020307825780A000000547820616B
+S31520073C1063746976653A202020202020307825781D
+S31520073C200A0000004D49492064617461203A20202A
+S31520073C3020202020307825780A0000004D49492089
+S31520073C407370656564203A2020202020203078254F
+S31520073C50780A00005278204649464F20626F756ED3
+S31520073C60643A202020202020307825780A0000007A
+S31520073C705278204649464F20626173653A202020B4
+S31520073C80202020307825780A000000005478204626
+S31520073C9049464F20626173653A2020202020203034
+S31520073CA07825780A0000000053444D412046756E5A
+S31520073CB06374696F6E20436F64653A202020202045
+S31520073CC020307825780A0000527820436F6E747268
+S31520073CD06F6C2052656769737465723A20202020BD
+S31520073CE02020307825780A005278204D6178206682
+S31520073CF072616D65206C656E6774683A2020202096
+S31520073D002020307825780A00547820436F6E747205
+S31520073D106F6C2052656769737465723A202020207C
+S31520073D202020307825780A0072626453746174758E
+S31520073D30733D30782578207262644C656E3D307805
+S31520073D402578207262644275663D307825780A00A8
+S31520073D5054784261623D30782578205278426162F4
+S31520073D603D307825780A000054784C633D30782515
+S31520073D707820547855723D307825782054784373C7
+S31520073D806C3D30782578200A090909092020205416
+S31520073D9078526C3D307825780A00000052784C67B7
+S31520073DA03D307825782052784E6F3D30782578201B
+S31520073DB052784372633D30782578200A0909090924
+S31520073DC020202052784F763D307825782052785417
+S31520073DD0723D307825780A0052784C733D30782525
+S31520073DE0782052784D656D3D307825780A00000099
+S31520073DF0704472764374726C3D3078257820704E05
+S31520073E006574506F6F6C3D30782578200A0909094B
+S31520073E100920202070436C506F6F6C3D30782578D1
+S31520073E200A000000627566426173653D3078257821
+S31520073E302062756653697A653D3078257820704308
+S31520073E406C426C6B417265613D307825780A0909A9
+S31520073E500909202020636C426C6B53697A653D30D3
+S31520073E6078257820704D426C6B417265613D3078BC
+S31520073E702578200A090909092020206D426C6B53F1
+S31520073E80697A653D307825780A0000007462644EA9
+S31520073E90756D3D256420746264426173653D307893
+S31520073EA02578746264496E6465783D2564200A091D
+S31520073EB009090920202075736564546264496E6474
+S31520073EC065783D2564200A09090909202020636CA5
+S31520073ED065616E5462644E756D3D25642074785312
+S31520073EE074616C6C3D2564200A0000007262644E82
+S31520073EF0756D3D256420726264426173653D307835
+S31520073F00257820726264496E6465783D2564200AA7
+S31520073F10000000003130304D6269742F73000000B5
+S31520073F2031304D6269742F73000000007068795331
+S31520073F30706565643D2573207068794D6F64653DAE
+S31520073F40257320706879416464723D307825780A34
+S31520073F502020202020202020202020202020202034
+S31520073F602020202020202020202020202020202024
+S31520073F7020202069736F506879416464723D3078D8
+S31520073F80257820706879466C6167733D3078257887
+S31520073F900A2020202020202020202020202020200A
+S31520073FA020202020202020202020202020202020E4
+S31520073FB0202020207068794465664D6F64653D3002
+S31520073FC07825780A00000000706879537461747543
+S31520073FD0733D30782578207068794374726C3D304C
+S31520073FE0782578207068794164733D307825780A7A
+S31520073FF02020202020202020202020202020202094
+S315200740002020202020202020202020202020202083
+S315200740102020207068795072746E3D30782578207C
+S315200740207068794578703D30782578207068794EA4
+S315200740306578743D307825780A00000069664F75E3
+S31520074040744E5563617374506B74733D2564206990
+S31520074050664F75745563617374506B74733D25642D
+S315200740600A20202020202020202020202020202039
+S315200740702020202020202020202020202020202013
+S31520074080202020206966496E4E5563617374506BF4
+S3152007409074733D25640A20202020202020202020FC
+S315200740A020202020202020202020202020202020E3
+S315200740B02020202020202020206966496E55636114
+S315200740C07374506B74733D25642069664F75744508
+S315200740D072726F72733D25640A000000747263530F
+S315200740E07461636B2061626F727465643A206572CE
+S315200740F0726F7220696E20746F70206672616D65AB
+S315200741000A0000002536783A202578202800000066
+S315200741105B0000002C200000257800005D000000D1
+S31520074120290A00000080808080808080808020206F
+S315200741302020208080808080808080808080808072
+S31520074140808080808008101010101010101010101A
+S31520074150101010101044444444444444444444102A
+S315200741601010101010104141414141410101010138
+S315200741700101010101010101010101010101010102
+S31520074180101010101010424242424242020202020E
+S3152007419002020202020202020202020202020202D2
+S315200741A01010101080000000000000000000000022
+S315200741B000000000000000000000000000000000D2
+S315200741C000000000000000000000000000000000C2
+S315200741D000000000000000000000000000000000B2
+S315200741E000000000000000000000000000000000A2
+S315200741F00000000000000000000000000000000092
+S315200742000000000000000000000000000000000081
+S315200742100000000000000000000000000000000071
+S31520074220000000000000000065766E437265617429
+S3152007423065486F6F6B3A20636F756C646E277420C1
+S31520074240637265617465207072697661746520652D
+S315200742506E7669726F6E6D656E74210A00000000B6
+S3152007426028676C6F62616C20656E7669726F6E6DFA
+S31520074270656E74290A000000287072697661746574
+S3152007428020656E7669726F6E6D656E74290A0000F9
+S3152007429025643A2025730A00744578635461736B45
+S315200742A0000000006578635461736B3A206572726B
+S315200742B06F7220726563656976696E67206D7367AD
+S315200742C02C20737461747573203D202523782E0A5C
+S315200742D0000000002564206D657373616765732090
+S315200742E066726F6D20696E74657272757074206C54
+S315200742F06576656C206C6F73742E0A002E0000009D
+S31520074300744C6F675461736B000000006C6F6754C1
+S3152007431061736B3A206572726F7220726561646988
+S315200743206E67206C6F67206D657373616765732E83
+S315200743300A000000696E746572727570743A2000FF
+S315200743402523782028293A207461736B20646561B8
+S315200743506400000025237820282573293A200000A9
+S315200743603C6E756C6C2022666D74222070617261BA
+S315200743706D657465723E0A006C6F675461736B3A9C
+S31520074380202564206C6F67206D657373616765737D
+S31520074390206C6F73742E0A00253373202533730A16
+S315200743A0000000006E756D00666400002D2D2D003F
+S315200743B02D2D0000253364202533640A00000000D4
+S315200743C02E0000002E2E00002F0000002F5C7E24DA
+S315200743D0000000000000000008200800257325645F
+S315200743E00000000000000000202B20000A0000002B
+S315200743F04572726F6E656F75732068656164657245
+S3152007440020726561640A00007F454C460000000063
+S3152007441053697A6520697320696E636F7272656363
+S31520074420740A000074526F6F745461736B00000036
+S3152007443057494E442076657273696F6E20322E3542
+S3152007444000000000000000003031323334353637A3
+S31520074450383961626364656600000000286E756CF2
+S315200744606C290000303132333435363738394142FA
+S31520074470434445460000000062756720696E207632
+S31520074480667072696E74663A20626164206261732F
+S31520074490650000006D656D50617274416C6C6F63C9
+S315200744A03A20626C6F636B20746F6F206269672096
+S315200744B02D20256420696E20706172746974696F76
+S315200744C06E202523782E0A0025733A20696E766199
+S315200744D06C696420626C6F636B2025237820696E74
+S315200744E020706172746974696F6E202523782E0A8D
+S315200744F0000000006D656D506172745265616C6CC9
+S315200745006F6300006D656D50617274467265650054
+S31520074510496E76616C6964206D6573736167652082
+S3152007452071756575652069643A202523780A000028
+S315200745300A000000252D3230733A203078252D3198
+S3152007454030780A004D657373616765205175657507
+S315200745506520496400000000252D3230733A202556
+S315200745602D3130730A0000005461736B2051756535
+S3152007457075696E67000000004649464F0000000037
+S315200745805052494F5249545900000000252D3230C8
+S31520074590733A20252D3130640A0000004D65737368
+S315200745A06167652042797465204C656E00000000BE
+S315200745B04D65737361676573204D61780000000050
+S315200745C04D657373616765732051756575656400FD
+S315200745D053656E6465727320426C6F636B65640006
+S315200745E052656365697665727320426C6F636B6586
+S315200745F06400000053656E642074696D656F757479
+S3152007460073000000526563656976652074696D6578
+S315200746106F75747300000000257320426C6F636BFF
+S3152007462065643A0A0000000053656E64657273007C
+S315200746305265636569766572730000002020204EF7
+S31520074640414D452020202020205449442020202049
+S315200746505052492054494D454F55540A00000000F1
+S315200746602D2D2D2D2D2D2D2D2D2D202D2D2D2D2D5A
+S315200746702D2D2D202D2D2D202D2D2D2D2D2D2D0A7A
+S3152007468000000000252D31312E3131732538782051
+S31520074690253364202537750A000000004D6573739E
+S315200746A061676573207175657565643A0A202023ED
+S315200746B02020202061646472657373206C656E67A1
+S315200746C074682076616C75650A00000025336420BE
+S315200746D025233130782020253464200020307800A7
+S315200746E02530327800000000202E2E2E00000000F4
+S315200746F074000000745265737461727400000000C0
+S31520074700252D3673203D2025387800005461736B9C
+S31520074710206E6F7420666F756E642E0A0000000087
+S315200747200A737461636B3A2062617365203078255A
+S315200747302D36782020656E64203078252D36782012
+S315200747402073697A6520252D356420200000000016
+S31520074750686967682025357320206D617267696EE1
+S31520074760202535730A0000003F3F3F0068696768C8
+S3152007477020252D356420206D617267696E20252DD1
+S3152007478035640A000A6F7074696F6E733A20307841
+S3152007479025780A25730A0000252D31312E313173EC
+S315200747A000000000252D31322E3132730000000023
+S315200747B0252D3132780000002025387820253364CE
+S315200747C020252D31302E3130732025387820253875
+S315200747D07820253778202535750A00007461736B94
+S315200747E05265677353686F773A20696E76616C698D
+S315200747F064207461736B206964202523780A00007E
+S315200748000A000000253373000000000025313773A6
+S3152007481000000000524541445900000044454C41E0
+S315200748205900000044454C41592B530050454E44EE
+S315200748300000000050454E442B54000050454E447E
+S315200748402B53000050454E442B532B540000000099
+S3152007485053555350454E44004445414400000000FB
+S3152007486030782530327800002B49000056585F53A0
+S31520074870555045525649534F525F4D4F4445202078
+S315200748800000000056585F554E425245414B414263
+S315200748904C452020202020200000000056585F4449
+S315200748A045414C4C4F435F535441434B20202020D6
+S315200748B00000000056585F46505F5441534B202056
+S315200748C020202020202020200000000056585F535B
+S315200748D05444494F202020202020202020202020FB
+S315200748E00000000056585F4144415F444542554702
+S315200748F020202020202020200000000056585F4638
+S315200749004F525452414E2020202020202020202064
+S315200749100000000056585F505249564154455F459E
+S315200749204E562020202020200000000056585F4E9B
+S315200749304F5F535441434B5F46494C4C2020202020
+S3152007494000000000747267416374446566000000C6
+S315200749504572726F723A2054726967676572696E1B
+S315200749606720576F726B205175657565206F766561
+S3152007497072666C6F7721200A000000000A776F7233
+S315200749806B5150616E69633A204B65726E656C2078
+S31520074990776F726B207175657565206F76657266A0
+S315200749A06C6F772E0A00000074577655706C6F610E
+S315200749B0643A206661696C656420746F207265614C
+S315200749C0642066726F6D206275666665722E0A00B0
+S315200749D074575655706C6F61643A206661696C65C9
+S315200749E0642077726974696E6720746F20686F73A5
+S315200749F0742E0A0074577655706C6F61643A206678
+S31520074A0061696C656420746F20636F6D6D697420AE
+S31520074A1075706C6F616465642062797465732E0A9C
+S31520074A2000000000777655706C6F6164537461726D
+S31520074A30743A2063616E277420616C6C6F632075EE
+S31520074A40706C6F61645461736B206964206D656D4A
+S31520074A506F72792E0A000000777655706C6F616445
+S31520074A6053746172743A2063616E277420696E6984
+S31520074A70742075706C6F61645461736B2073656DF8
+S31520074A802E0A000074575655706C6F61640000003B
+S31520074A90777655706C6F616453746172743A2063CC
+S31520074AA0616E277420737061776E2075706C6F61E5
+S31520074AB0645461736B2E0A00200928002800000021
+S31520074AC02C00000029000000200900003A00000001
+S31520074AD06561640065000000626164006200000091
+S31520074AE06861640068000000676164006700000071
+S31520074AF07573720075000000707700006F00000064
+S31520074B00746E0000686E0000666E00007300000079
+S31520074B106E0000006600000025732825642C256496
+S31520074B202900000025732825642C25642925733A36
+S31520074B30257300000A0000000A272E27203D206340
+S31520074B406C656172206669656C643B2020272D277A
+S31520074B50203D20676F20746F2070726576696F75A8
+S31520074B6073206669656C643B20205E44203D207176
+S31520074B707569740A0A0000004572726F7220696EA1
+S31520074B8020626F6F74206C696E653A0A25730A2551
+S31520074B902A630A002025733D256400002025733DDE
+S31520074BA030782578000000002025733D2573000006
+S31520074BB0256400003D00000025630000252D2A738B
+S31520074BC03A2030782578200A00000000252D2A7300
+S31520074BD03A202564200A0000252D2A733A20000052
+S31520074BE0257325640000000020000000696E7661A9
+S31520074BF06C696420756E6974206E756D6265722E98
+S31520074C000A000000252D2A733A20307825782000BF
+S31520074C10252D2A733A20256420000000696E7661C7
+S31520074C206C6964206E756D6265722E0A000000003D
+S31520074C30746F6F20626967202D206D6178696D75A5
+S31520074C406D206669656C64207769647468203D20E9
+S31520074C5025642E0A00000000307800000A6E6F20B7
+S31520074C60626F6F742066696C652073706563696609
+S31520074C706965642E2020436865636B2066696C65C9
+S31520074C80207065726D697373696F6E73000000001B
+S31520074C9020286D75737420626520776F726C642087
+S31520074CA07265616461626C65292E0A0025730000AE
+S31520074CB06574686572496E707574486F6F6B00000E
+S31520074CC0496E76616C6964206164647265737321C9
+S31520074CD00A0000004164647265737320616C726513
+S31520074CE061647920657869737473210A000000006E
+S31520074CF043616E6E6F7420706572666F726D206D7C
+S31520074D00616C6C6F63210A00416464656420616489
+S31520074D1064726573732069732025783A25783A2556
+S31520074D20783A25783A25783A25780A0025783A2553
+S31520074D30783A25783A25783A25783A25780A000068
+S31520074D402D2D2D3E200000000A00000025730000AF
+S31520074D500D0A00005155495400000000545950458A
+S31520074D6020490000435744202573000055534552D8
+S31520074D702025730050415353202573004143435444
+S31520074D8020257300504F52542025642C25642C254A
+S31520074D90642C25642C25642C256400000000000063
+S31520074DA04E4C53540000000043616E2774206F70E9
+S31520074DB0656E206469726563746F72792022257324
+S31520074DC0220A000025730000696661667265650020
+S31520074DD03031323334353637383900006172705FF7
+S31520074DE07274726571756573743A2062616420679F
+S31520074DF06174657761792076616C756500000000BE
+S31520074E006172705F7274726571756573743A206D1D
+S31520074E10616C6C6F63206661696C65640A000000CB
+S31520074E206172707265736F6C76653A2063616E275F
+S31520074E307420616C6C6F63617465206C6C696E6637
+S31520074E406F000000617270696E7472006172703A49
+S31520074E50206574686572206164647265737320695E
+S31520074E60732062726F61646361737420666F722048
+S31520074E7049502061646472657373202578210A007E
+S31520074E806475706C69636174652049502061646438
+S31520074E907265737320253038782073656E742066A3
+S31520074EA0726F6D2065746865726E657420616464BF
+S31520074EB0726573732025730A0000000061727020E3
+S31520074EC0696E666F206F7665727772697474656E20
+S31520074ED020666F7220253038782062792025730A5C
+S31520074EE0000000006172707466726565000000003C
+S31520074EF0617270746E6577206661696C6564206F70
+S31520074F006E2025780A000000257325643A20636100
+S31520074F106E27742068616E646C6520616625640A55
+S31520074F2000000000636F707946726F6D4D6275667B
+S31520074F307300000065683A207365745F69665F6170
+S31520074F4064647220756E6B6E6F776E2066616D690D
+S31520074F506C7920307825780A00000000696E5F6337
+S31520074F606F6E74726F6C0000436F756C646E277476
+S31520074F7020756E6C696E6B20696E696661646472F2
+S31520074F802066726F6D206966700A00004469646E38
+S31520074F90277420756E6C696E6B20696E696661640D
+S31520074FA0722066726F6D206C6973740A00000000A8
+S31520074FB0696E7465726E65740000000025642E257F
+S31520074FC0642E25642E256400697050726F746F3ABB
+S31520074FD020756E6B6E6F776E206465766963650ADA
+S31520074FE000000000436F756C64206E6F7420756E29
+S31520074FF02D62696E642066726F6D2074686520491C
+S3152007500050204D5558210000436F756C64206E6FF4
+S315200750107420756E2D62696E642066726F6D2074BA
+S31520075020686520415250204D55582100494E464F1C
+S315200750303A204465766963653A20257320556E695B
+S31520075040743A202564204D73673A2025730A000099
+S315200750505741524E3A204465766963653A2025734F
+S3152007506020556E69743A202564204D73673A2025AA
+S31520075070730A000052455345543A204465766963BE
+S31520075080653A20257320556E69743A202564204D8C
+S3152007509073673A2025730A0055503A204465766986
+S315200750A063653A20257320556E69743A2025642056
+S315200750B04D73673A2025730A00000000444F574E68
+S315200750C03A204465766963653A20257320556E69CB
+S315200750D0743A202564204D73673A2025730A000009
+S315200750E043616E6E6F74206D616C6C6F63204950DF
+S315200750F05F4452565F4354524C2E200A000000004C
+S31520075100495020342E34205443502F495000000054
+S315200751105443502F495020636F756C64206E6F740B
+S315200751202062696E6420746F20746865204D555817
+S315200751302120257300000000495020342E342041B9
+S315200751405250000041525020636F756C64206E6F79
+S31520075150742062696E6420746F20746865204D55CB
+S3152007516058212025730000006970547853746172A2
+S31520075170747570206E6F74206174746163686564DA
+S31520075180210A00006970547853746172747570200F
+S315200751905472616E736D6974696E67210A00000027
+S315200751A05472616E736D6974206572726F72210A0B
+S315200751B0000000006970547853746172747570200A
+S315200751C0646F6E65210A0000257325643A206361A2
+S315200751D06E27742068616E646C6520616625640A93
+S315200751E00000000069636D705F6572726F72000060
+S315200751F069636D70206C656E0000000069705F69D9
+S315200752006E69740025643A25730000004465766943
+S31520075210636520257320756E6974202564206E6F5B
+S315200752207420666F756E642E0A00000044657669E1
+S3152007523063653A20257320556E69743A2025640ADA
+S31520075240000000004465736372697074696F6E3A73
+S315200752502025730A000000004F757470757420703E
+S31520075260726F746F636F6C3A20526563762030785D
+S31520075270256C780A0000000050726F746F636F6C9C
+S315200752803A20257309547970653A20256C640952AA
+S31520075290656376203078256C780953687574646F52
+S315200752A0776E203078256C780A0000006D75784275
+S315200752B0696E642063616E6E6F7420616C6C6F63B8
+S315200752C06174652070726F746F636F6C206E6F6484
+S315200752D06500000050726F746F636F6C2025640041
+S315200752E06D75785478526573746172740A0000007C
+S315200752F06D75784572726F720A0000006E65744C80
+S315200753006962496E69743A20636F756C646E277497
+S3152007531020637265617465206A6F622072696E67A1
+S315200753200A0000006E65744C6962496E69743A20FA
+S31520075330756E61626C6520746F2061646420726586
+S3152007534073657420686F6F6B0A000000744E65746E
+S315200753505461736B000000006E65745461736B3A79
+S31520075360206E65744A6F6252696E67206F76657222
+S31520075370666C6F77210A00006E65744A6F62416416
+S31520075380643A2072696E6720627566666572206F59
+S31520075390766572666C6F77210A000000726E5F6110
+S315200753A064646D61736B3A206D61736B20696D70F0
+S315200753B06F737369626C7920616C72656164792099
+S315200753C0696E2074726565004D61736B20666F7216
+S315200753D020726F757465206E6F7420656E746572A2
+S315200753E065640A004E6F6E2D756E69717565206E40
+S315200753F06F726D616C20726F7574652C206D617389
+S315200754006B206E6F7420656E74657265640000008C
+S31520075410726E5F64656C6574653A20696E636F6E3C
+S3152007542073697374656E7420616E6E6F74617469C7
+S315200754306F6E0A00726E5F64656C6574653A2063E9
+S315200754406F756C646E27742066696E64206F75723B
+S3152007545020616E6E6F746174696F6E0A00000000BA
+S31520075460726E5F64656C6574653A20636F756C64EC
+S315200754706E27742066696E642075730A0000000023
+S3152007548025732025782061742025780A00000000DE
+S31520075490726E5F64656C6574653A204F72706861D9
+S315200754A06E6564204D61736B00000000726E5F6944
+S315200754B06E69743A2072616469782066756E6374C2
+S315200754C0696F6E732072657175697265206D617873
+S315200754D05F6B65796C656E206265207365740A005B
+S315200754E0726E5F696E697400726E5F696E69742089
+S315200754F0320000007269705F61747461636800002E
+S315200755007269705F64657461636800007269705FB1
+S315200755107573727265710000000000002564000033
+S3152007552055736572206E616D65206F722070617389
+S3152007553073776F726420746F6F206C6F6E670A00C3
+S3152007554025730A0072746672656500007274667246
+S3152007555065652032000000007274667265653A2020
+S315200755602578206E6F7420667265656420286E65BF
+S31520075570672072656673290A0000000072747265D7
+S3152007558071756573742064656C6574650000000029
+S315200755907274696E69743A2077726F6E67206966CE
+S315200755A06120282578292077617320282578290ADC
+S315200755B0000000007463705F70756C6C6F75746F94
+S315200755C06662616E640000007463705F6F75747045
+S315200755D0757400007463705F6F75747075742052EC
+S315200755E045584D54000000007463705F696E6974F6
+S315200755F0000000007463705F757372726571000036
+S3152007560074546674705461736B000000746674700A
+S31520075610207472616E73666572206661696C656453
+S315200756203A206572726F7220307825780A0000005A
+S3152007563067657400707574006E6574617363696954
+S315200756400000000020000000696D6167650000000A
+S315200756506F6374657400000062696E617279000079
+S3152007566061736369690000006D6F646520736574F3
+S3152007567020746F2025732E0A0000000025733A2018
+S31520075680756E6B6E6F776E206D6F64650A0000000E
+S3152007569076616C6964206D6F6465733A205B0000E0
+S315200756A02573257300000000207C2000205D0A005A
+S315200756B074667470506565725365742025733A2035
+S315200756C0756E6B6E6F776E20686F73742E0A000087
+S315200756D0436F6E6E656374656420746F202573202F
+S315200756E05B25645D0A000000746674705075743A11
+S315200756F0204E6F20746172676574206D61636869D7
+S315200757006E65207370656369666965642E0A000095
+S3152007571070757474696E6720746F2025733A2573C4
+S31520075720205B25735D0A000053656E64696E6720EA
+S3152007573057525120746F20706F72742025640A00A7
+S31520075740746674704765743A204E6F207461726769
+S315200757506574206D616368696E652073706563691A
+S31520075760666965642E0A000067657474696E67202A
+S3152007577066726F6D2025733A2573205B25735D0A44
+S315200757800000000009436F6E6E65637465642074BC
+S315200757906F202573205B25645D0A0000094E6F7410
+S315200757A020636F6E6E65637465640A00094D6F64C6
+S315200757B0653A2025732020566572626F73653A20F5
+S315200757C02573202054726163696E673A2025730A10
+S315200757D0000000006F6E00006F666600095265784C
+S315200757E06D742D696E74657276616C3A2025642016
+S315200757F07365636F6E64732C204D61782D74696DA4
+S31520075800656F75743A202564207365636F6E6473BC
+S315200758100A00000073656E74000000005472616E02
+S31520075820736665722054696D6564204F75742E0AF8
+S3152007583000000000726563656976656400000000F4
+S315200758404572726F7220636F64652025643A20253E
+S31520075850730A00004E6F207375636820757365722F
+S315200758600000000046696C6520616C726561647989
+S315200758702065786973747300556E6B6E6F776E202B
+S315200758807472616E7366657220494400496C6C6553
+S3152007589067616C2054465450206F70657261746935
+S315200758A06F6E00004469736B2066756C6C206F728F
+S315200758B020616C6C6F636174696F6E2065786365B0
+S315200758C06564656400000000416363657373207631
+S315200758D0696F6C6174696F6E0000000046696C65BC
+S315200758E0206E6F7420666F756E640000556E646552
+S315200758F066696E6564206572726F7220636F646570
+S31520075900000000004552524F5200000041434B0011
+S315200759104441544100000000575251005252510051
+S31520075920233000002573206F70636F64653D2578EB
+S315200759300A0000007B253135737D202573202573CA
+S31520075940200000003C66696C653D25732C206D6F31
+S3152007595064653D25733E0A003C626C6F636B3D258B
+S31520075960642C2025642062797465733E0A00000042
+S315200759703C626C6F636B3D25643E0A003C636F6433
+S31520075980653D25642C206D73673D25733E0A00000F
+S315200759906C6F30007564705F757372726571000085
+S315200759A075647020636F6E74726F6C2064617461A6
+S315200759B020756E65787065637465646C7920726589
+S315200759C07461696E65640A006E6F206D656D6F720E
+S315200759D0793A206D426C6B732F636C426C6B730044
+S315200759E06E6F206D656D6F72793A20636C7573746F
+S315200759F0657273006D62696E697400006D5F646518
+S31520075A0076676574202D2D20696E76616C69642012
+S31520075A106D656D20636F70792077696474680000FF
+S31520075A20736F66726565206471000000736F636C1F
+S31520075A306F73653A204E4F46445245460000000094
+S31520075A40736F6163636570743A20214E4F464452E3
+S31520075A50454600007362617070656E6461646472A6
+S31520075A60000000007362617070656E64636F6E7408
+S31520075A70726F6C0073656D692D70616E69633A206C
+S31520075A807362636F6D70726573730A007362666CF7
+S31520075A90757368007362666C757368203200000040
+S31520075AA0736264726F70000070616E69633A2025B5
+S31520075AB0730A000068617368696E69743A206261C7
+S31520075AC06420656C656D656E747300006C6F0000ED
+S31520075AD06C6F6F7574707574206E6F204844520012
+S31520075AE06C6F25643A2063616E27742068616E6443
+S31520075AF06C6520616625640A00000000556E696E94
+S31520075B00697469616C697A656420696E74657272F5
+S31520075B107570740A0000000028736F636B6574291B
+S31520075B20000000006163636570740000496D706C46
+S31520075B30656D656E746174696F6E20446570656EF8
+S31520075B4064656E74204E6F6E204D61736B61626C57
+S31520075B506520446576656C6F706D656E7420506F31
+S31520075B6072740000496D706C656D656E7461746939
+S31520075B706F6E20446570656E64656E74205065721D
+S31520075B806970686572616C20427265616B706F69B6
+S31520075B906E740000496D706C656D656E746174690D
+S31520075BA06F6E20446570656E64656E7420496E73EA
+S31520075BB07472756374696F6E20427265616B706F5C
+S31520075BC0696E7400496D706C656D656E7461746974
+S31520075BD06F6E20446570656E64656E7420446174CB
+S31520075BE06120427265616B706F696E7420000000D8
+S31520075BF0496D706C656D656E746174696F6E20444E
+S31520075C006570656E64656E74204461746120544CBA
+S31520075C1042204572726F7200496D706C656D656EB4
+S31520075C20746174696F6E20446570656E64656E7401
+S31520075C3020496E737472756374696F6E20544C4273
+S31520075C40204572726F720000496D706C656D656EC6
+S31520075C50746174696F6E20446570656E64656E74D1
+S31520075C60204461746120544C42204D6973730000AF
+S31520075C70496D706C656D656E746174696F6E2044CD
+S31520075C806570656E64656E7420496E73747275638C
+S31520075C9074696F6E20544C42204D6973730000005F
+S31520075CA0496D706C656D656E746174696F6E20449D
+S31520075CB06570656E64656E7420536F66747761725E
+S31520075CC06520456D756C6174696F6E0074726163CA
+S31520075CD06500000073797374656D2063616C6C00D1
+S31520075CE064656372656D656E74657200667020758E
+S31520075CF06E617661696C61626C65000070726F67B0
+S31520075D0072616D00616C69676E6D656E7400000067
+S31520075D1065787465726E616C20696E7465727275CA
+S31520075D2070740000696E737472756374696F6E2080
+S31520075D3061636365737300006461746120616363E3
+S31520075D40657373006D616368696E65206368656353
+S31520075D506B00000073797374656D207265736574C3
+S31520075D60000000000A25730A000000000A54726129
+S31520075D707020746F20756E696E697469616C697AB3
+S31520075D80656420766563746F72206E756D626572C1
+S31520075D9020307825782E0A00457863657074696FF8
+S31520075DA06E2063757272656E7420696E7374727570
+S31520075DB06374696F6E20616464726573733A203009
+S31520075DC078253038780A0000457863657074696FDE
+S31520075DD06E206E65787420696E7374727563746944
+S31520075DE06F6E20616464726573733A20307825304C
+S31520075DF038780A004D616368696E6520537461744B
+S31520075E0075732052656769737465723A20307825F1
+S31520075E103038780A000000004461746120416363CA
+S31520075E206573732052656769737465723A20307893
+S31520075E30253038780A000000466978656420506F57
+S31520075E40696E742052656769737465723A20307873
+S31520075E50253038780A000000436F6E646974696FCD
+S31520075E606E2052656769737465723A2030782530DB
+S31520075E7038780A00467020436F6E74726F6C206103
+S31520075E806E642053746174757320526567697374E1
+S31520075E9065723A203078253038780A004461746173
+S31520075EA02073746F7261676520696E746572727587
+S31520075EB070742052656769737465723A2030782545
+S31520075EC03038780A000000005461736B3A20252386
+S31520075ED0782022257322070A00000000200A457829
+S31520075EE063657074696F6E20617420696E7465725C
+S31520075EF072757074206C6576656C3A0A000000002E
+S31520075F005265677320617420307825780A0000006F
+S31520075F107865720063720000706300006374720014
+S31520075F206C7200006D737200723331007233300069
+S31520075F3072323900723238007232370072323600C6
+S31520075F4072323500723234007232330072323200C6
+S31520075F5072323100723230007231390072313800B4
+S31520075F6072313700723136007231350072313400A2
+S31520075F7072313300723132007231310072313000A2
+S31520075F80723900007238000072370000723600003E
+S31520075F90723500007234000072330000723200003E
+S31520075FA0737000007230000025000000000000001A
+S31520075FB054494D455A4F4E45000000003A0000000F
+S31520075FC020207365636F6E6473202020206E616EB8
+S31520075FD06F736563732020667265712028687A2936
+S31520075FE020207265736F6C7574696F6E20206261ED
+S31520075FF07365207469636B732020626173652073F0
+S31520076000656373202062617365206E736563730A07
+S31520076010000000002D2D2D2D2D2D2D2D2D2D202D44
+S315200760202D2D2D2D2D2D2D2D2D2D202D2D2D2D2D80
+S315200760302D2D2D2D2D202D2D2D2D2D2D2D2D2D2D70
+S3152007604020202D2D2D2D2D2D2D2D2D2D20202D2D87
+S315200760502D2D2D2D2D2D2D2D202D2D2D2D2D2D2D50
+S315200760602D2D2D0A000000002025382E38642020EB
+S315200760702025392E396420202025382E38642020E3
+S315200760802025382E38642020202025382E386420D5
+S3152007609020202025382E386420202025392E3964C3
+S315200760A00A00000073656C656374496E69743A204B
+S315200760B0636F756C646E277420696E7374616C6C7C
+S315200760C0207461736B2064656C65746520686F6FD7
+S315200760D06B210A00636B73756D3A206F7574206F99
+S315200760E06620646174610A0072616E646F6D3A207E
+S315200760F06E6F7420656E6F7567682073746174653B
+S3152007610020282564206279746573293B2069676E88
+S315200761106F7265642E0A000072616E646F6D3A2095
+S31520076120737461746520696E666F20636F7272750A
+S31520076130707465643B206E6F74206368616E676553
+S31520076140642E0A000000001000000004000000076B
+S3152007615000000001000000000000000000000020F1
+S31520076160000000080000000F0000000400000025C2
+S315200761700000000000000040000000080000001991
+S315200761800000000700000043000000000000008018
+S3152007619000000010000000320000000A0000008303
+S315200761A00000000100000100000000180000006444
+S315200761B0000000160000010D00000001000002008B
+S315200761C000000020000000C80000001C0000022379
+S315200761D0000000020000040000000040000001F457
+S315200761E0000000200000040900000005FFFFFFFF54
+S315200761F000000080000003E800000040000008AD12
+S315200762000000000F00000000744463616368655551
+S31520076210706400006469736B2072656D6F766564C0
+S31520076220207768696C652077726974696E67206460
+S315200762306174612C2070726F6261626C6520646183
+S315200762407461206C6F7373006469736B2072656168
+S3152007625064206661696C6564000000006469736B7D
+S31520076260207772697465206661696C65642C206481
+S31520076270617461206C6F7373206D61792068617614
+S3152007628065206F63637572656400000064636163EC
+S3152007629068654362696F3A206465763D25237820D1
+S315200762A0636163686520696E7465726E616C2065CB
+S315200762B072726F72202D2073746172766174696FA2
+S315200762C06E2025640A0000004469736B20436163CE
+S315200762D06865202D204C5255000000004469736BD9
+S315200762E02043616368652C2025733A0A0000000065
+S315200762F043616368656420626C6F636B206E756D9E
+S31520076300626572733A0A000020626C6B20256C6402
+S315200763102025632C000000000A000000546F7461DA
+S315200763206C20636163686520426C6F636B732025FD
+S31520076330642C20256C6420626C6F636B7320282580
+S3152007634025256C64292064697274790A0000000087
+S3152007635054756E61626C6520506172616D733A0A7D
+S315200763600000000020202042797061737320546852
+S31520076370726573686F6C6420256C642C204D617878
+S3152007638020446972747920256C642C2052656164D7
+S3152007639020416865616420256C6420626C6F636B9D
+S315200763A0732C2053796E6320696E74657276616CDF
+S315200763B020256C64207365630A00000048697420F1
+S315200763C053746174733A20436F6F6B69652048690C
+S315200763D0747320256C64204D69737320256C642C97
+S315200763E020000000486173682073697A6520256C50
+S315200763F064204869747320256C64204D6973732063
+S31520076400256C640A000000002020204C52552048A5
+S3152007641069747320256C642C204D6973736573200A
+S31520076420256C642C2048697420526174696F202575
+S3152007643025256C640A00000057726974652053731A
+S31520076440746174733A20466F726567726F756E64EE
+S3152007645020256C642C204261636B67726F756E64AE
+S3152007646020256C642C2048696464656E20256C643D
+S315200764702C20466F7263656420256C640A00000031
+S315200764805375626F7264696E6174652044657669B7
+S3152007649063652053746172743A0A00005375626FFC
+S315200764A07264696E61746520446576696365204503
+S315200764B06E643A0A000000000A092020746F74618E
+S315200764C06C2023206F6620636C7573746572733A2C
+S315200764D0090000000A0000000920202023206F66FB
+S315200764E0206672656520636C7573746572733A09E5
+S315200764F000000000092020202023206F66206261EB
+S315200765006420636C7573746572733A090000000022
+S31520076510092020202020746F74616C2066726565BF
+S315200765202073706163653A0900000000202020204F
+S31520076530206D617820636F6E7469676F7573206647
+S315200765407265652073706163653A2020000000003C
+S315200765502062797465730A00090920202023206F99
+S31520076560662066696C65733A0900000009092023CD
+S31520076570206F6620666F6C646572733A09000000A7
+S315200765800920746F74616C20627974657320696E53
+S315200765902066696C65733A090000000009202020EF
+S315200765A0202023206F66206C6F73742063686169CF
+S315200765B06E733A0900000000202020746F74616C06
+S315200765C020627974657320696E206C6F73742063FB
+S315200765D06861696E733A2020000000000000000001
+S315200765E00D00000020456E7472792077696C6C2047
+S315200765F062652064656C657465642E200000000062
+S31520076600222573222069732063726F73732D6C6939
+S315200766106E6B6564206F6E20666972737420636C77
+S3152007662075737465722E2000456E747279207265B3
+S315200766306D61696E7320696E746163742E20000024
+S3152007664022257322206469726563746F72792068C4
+S31520076650617320696E76616C6964207374727563E1
+S31520076660747572652E0000000D257300200000004A
+S315200766702225732220697320616E20696C6C6567F9
+S31520076680616C206E616D652E20000000646972655D
+S3152007669063746F7279206E657374696E67206C698F
+S315200766A06D697420726561636865642C2022257381
+S315200766B02220736B69707065640000002573202D96
+S315200766C0204E6F7420656E6F75676820726F6F6DC9
+S315200766D020746F2072756E20636865636B2064690A
+S315200766E0736B2E0A00000000257320202D20646975
+S315200766F0736B20636865636B20696E2070726F67A2
+S3152007670072657373202E2E2E000000002534630039
+S3152007671053797374656D20636C6F636B206973207F
+S3152007672073657420746F202573000000696E737477
+S31520076730656164206F66202573000000202D206C7C
+S315200767406F737420636861696E7320002573202038
+S315200767502D204572726F7273206465746563746544
+S31520076760642E20546F20636F727265637420646988
+S31520076770736B207374727563747572652C20706CD5
+S315200767806561736520737461727420636865636BD2
+S31520076790206469736B20776974682061207065723D
+S315200767A06D697373696F6E20746F20726570616986
+S315200767B0722E00004572726F72732064657465636A
+S315200767C07465642E20416C6C20636F7272656374E6
+S315200767D0696F6E732073746F72656420746F20649B
+S315200767E069736B20616E64206C6F737420636861B4
+S315200767F0696E73207265636F76657265642E000015
+S31520076800257320202D20566F6C756D6520697320A2
+S315200768104F4B20004368616E676520766F6C756DF8
+S31520076820652049642066726F6D2025702000000060
+S31520076830746F2025700A00002225732220746F6F3B
+S31520076840206D616E7920636C757374657273206928
+S315200768506E2066696C652C2061646A75737465643D
+S315200768602E000000222573222063726F73732D6C0E
+S31520076870696E6B6564207769746820616E6F7468CA
+S31520076880657220636861696E000000002225732205
+S315200768902068617320696C6C6567616C20636C7511
+S315200768A07374657220696E20636861696E000000E3
+S315200768B0222573222066696C65206C617267657272
+S315200768C0207468656E2069747320636861696E2019
+S315200768D06F6620636C757374657273002225732245
+S315200768E02068617320696C6C6567616C20737461BD
+S315200768F0727420636C757374657200007C7C7C7C73
+S315200769007C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C9A
+S315200769107C7C7C7C7C7C7C7C7C7C7C7C20217C239A
+S315200769202425262728297C7C7C2D7C7C30313233F4
+S315200769303435363738397C7C7C7C7C7C40414243F5
+S315200769404445464748494A4B4C4D4E4F5051525362
+S315200769505455565758595A7C7C7C5E5F6041424352
+S315200769604445464748494A4B4C4D4E4F5051525342
+S315200769705455565758595A7B7C7D7E7C000000001B
+S315200769807C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C1A
+S315200769907C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C0A
+S315200769A020217C232425262728297C2B2C2D2E7C49
+S315200769B0303132333435363738397C3B7C3D7C7C35
+S315200769C0404142434445464748494A4B4C4D4E4F22
+S315200769D0505152535455565758595A5B7C5D5E5FF2
+S315200769E0606162636465666768696A6B6C6D6E6F02
+S315200769F0707172737475767778797A7B7C7D7E7CF5
+S31520076A00000000004E4F204C4142454C000000003C
+S31520076A10202D206E616D6573207374796C653A0934
+S31520076A20090925730A000000382E332053544420C1
+S31520076A30444F530056784C6F6E670000202D207206
+S31520076A406F6F742064697220737461727420736522
+S31520076A5063746F723A090925750A0000202D2023D1
+S31520076A60206F6620736563746F727320706572205A
+S31520076A70726F6F743A090925750A0000202D206D5B
+S31520076A8061782023206F6620656E7472696573208E
+S31520076A90696E20726F6F743A090925750A0000001E
+S31520076AA0202D20726F6F742064697220737461724F
+S31520076AB07420636C75737465723A090925750A0023
+S31520076AC05658455854000000646F734469724F6CDA
+S31520076AD0644C69622E63203A2056784C6F6E672085
+S31520076AE06E616D65730A0000646F734469724F6C3B
+S31520076AF0644C69622E63203A20444F5320382E3344
+S31520076B00206E616D65730A00646F734469724F6CFA
+S31520076B10644C69622E63203A20636C7573746572C0
+S31520076B202073697A652025642062797465732069E4
+S31520076B307320746F6F20736D616C6C2C206D696E7A
+S31520076B40203D2025640A0000646F734469724F6CE8
+S31520076B50644C69622E63203A204D616C666F726DB4
+S31520076B60656420766F6C756D6520666F726D6174CE
+S31520076B70202846415433323A20726F6F745374611A
+S31520076B807274436C75737420203D202575290A007D
+S31520076B90646F734469724F6C644C69622E63203A42
+S31520076BA0204D616C666F726D656420766F6C756DAE
+S31520076BB06520666F726D6174202846415431322FE5
+S31520076BC031363A20726F6F744D6178456E747269EB
+S31520076BD06573203D2030290A00000000646F734644
+S31520076BE0734661742E63203A2031303538203A2097
+S31520076BF02573203A20212121204449534B204655ED
+S31520076C004C4C202121210A00666174313647657470
+S31520076C104E657874000000004641542068616E6412
+S31520076C206C657220696E666F726D6174696F6E3AF4
+S31520076C300A0000002D2D2D2D2D2D2D2D2D2D2D2D01
+S31520076C402D2D2D2D2D2D2D2D2D2D2D2D0A000000F1
+S31520076C50202D20616C6C6F636174696F6E2067727B
+S31520076C606F75702073697A653A09256C6420636CA1
+S31520076C707573746572730A00202D20667265652008
+S31520076C807370616365206F6E20766F6C756D653ADC
+S31520076C90090000002062797465730A00566F6C75C7
+S31520076CA06D6520506172616D65746572733A204611
+S31520076CB0415420747970653A2046415425642C2026
+S31520076CC0736563746F72732070657220636C757356
+S31520076CD07465722025640A002020256420464154C5
+S31520076CE020636F706965732C20256C6420636C752F
+S31520076CF073746572732C20256C6420736563746FB7
+S31520076D00727320706572204641540A00202053650D
+S31520076D1063746F7273207265736572766564202556
+S31520076D20642C2068696464656E20256C642C204673
+S31520076D30415420736563746F727320256C640A004F
+S31520076D402020526F6F742064697220656E74726991
+S31520076D5065732025642C20737973496420252D3883
+S31520076D60732C2073657269616C206E756D6265720E
+S31520076D7020256C780A00000020204C6162656C3A59
+S31520076D8022252D31317322202E2E2E0A00000000B7
+S31520076D905658444F53353332000000005658444F57
+S31520076DA053353136000000005658444F533531329B
+S31520076DB0000000005658455854312E310000000077
+S31520076DC04641543332202020200000005265747239
+S31520076DD06569766564206F6C6420766F6C756D6562
+S31520076DE020706172616D7320776974682025252567
+S31520076DF06420636F6E666964656E63653A0A000090
+S31520076E004469736B207769746820256C64207365E1
+S31520076E1063746F7273206F662025642062797465A8
+S31520076E20732077696C6C20626520666F726D61745A
+S31520076E3074656420776974683A0A0000646F73463C
+S31520076E4073566F6C466F726D61743A206261642067
+S31520076E50666F726D617420706172616D657465729B
+S31520076E60732C206572726E6F203D202523780A00C9
+S31520076E70646F734673566F6C466F726D61743A20F2
+S31520076E80666F726D6174206661696C65642C206516
+S31520076E9072726E6F3D2523780A00000000000000FD
+S31520076EA0646F7346734C69622E63203A2043686584
+S31520076EB0636B206469736B207574696C69747920B8
+S31520076EC06E6F7420697374616C6C65640A000000C8
+S31520076ED0646F7346734C69622E63203A204D616C4A
+S31520076EE0666F726D656420626F6F74207365637455
+S31520076EF06F722E204F66667365742025752C207653
+S31520076F00616C75652025752E2025730A0000000003
+S31520076F1020000000646F7346734C69622E63203A23
+S31520076F20204552524F52207265616420626F6F74FA
+S31520076F3020736563746F720A000000004174207421
+S31520076F40686520656E64206F6620626F6F74207394
+S31520076F506563746F72000000646F7346734C6962D1
+S31520076F602E63203A20627974657350657253656380
+S31520076F70203D20300A000000646F7346734C696217
+S31520076F802E63203A206362696F5F62797465735056
+S31520076F906572426C6B20257520213D2062797465C8
+S31520076FA0732D7065722D7365632025750A000000A1
+S31520076FB0646F7346734C69622E63203A2057415299
+S31520076FC04E494E473A206E756D2D736563746F7201
+S31520076FD073202575203C206362696F5F6E426C6F54
+S31520076FE0636B732025750A00646F7346734C696259
+S31520076FF02E63203A206E756D2D736563746F7273D9
+S31520077000202575203E206362696F5F6E426C6F6331
+S315200770106B732025750A0000646F7346734C69628B
+S315200770202E63203A2073656350657246617420315A
+S31520077030322F3136203D2025752C207768696C65DF
+S3152007704020425053203D2025750A000028464154EA
+S3152007705033322900646F7346734C69622E63203A74
+S315200770602054727920746F207265636C616D652078
+S315200770706F726967696E616C20636F7079206F66BE
+S3152007708020626F6F7420736563746F720A00000045
+S31520077090646F7346734C69622E63203A2054727963
+S315200770A020746F20616363657074206F74686572DE
+S315200770B020626F6F7420626C6F636B20636F7079C9
+S315200770C02E2E2E0A00000000646F7346734C6962E9
+S315200770D02E63203A204E554C4C20626C6F636B20F2
+S315200770E0646576696365207074720A00204E6F7432
+S315200770F0204120444F534653204465766963650AE9
+S31520077100000000002F0000000A766F6C756D652061
+S3152007711064657363726970746F7220707472202845
+S3152007712070566F6C44657363293A0925700A636143
+S3152007713063686520626C6F636B20492F4F206465F7
+S315200771407363726970746F7220707472202870432B
+S3152007715062696F293A0925700A0000006175746F04
+S31520077160206469736B20636865636B206F6E206D7F
+S315200771706F756E743A0909004E4F5420454E4142A9
+S315200771804C45440A000000002573207C2025730AFD
+S3152007719000000000444F535F43484B5F4F4E4C5906
+S315200771A000000000444F535F43484B5F5245504110
+S315200771B049520000444F535F43484B5F564552425E
+S315200771C05F310000444F535F43484B5F5645524259
+S315200771D05F320000444F535F43484B5F5645524248
+S315200771E05F53494C454E54006D61782023206F66C6
+S315200771F02073696D756C74616E656F75736C792014
+S315200772006F70656E2066696C65733A0925750A0085
+S3152007721066696C652064657363726970746F7273CF
+S3152007722020696E207573653A090925640A000000EE
+S3152007723023206F6620646966666572656E742066AC
+S31520077240696C657320696E207573653A090925642B
+S315200772500A00000023206F662064657363726970D5
+S31520077260746F727320666F722064656C65746564CB
+S315200772702066696C65733A0925640A0023206F66C0
+S3152007728020206F62736F6C65746520646573637203
+S315200772906970746F72733A090925640A0A00000037
+S315200772A063616E2774206D6F756E7420766F6C75AB
+S315200772B06D650A0A0000000063757272656E742098
+S315200772C0766F6C756D6520636F6E6669677572611B
+S315200772D074696F6E3A0A0000202D20766F6C756DE3
+S315200772E065206C6162656C3A092573203B20286905
+S315200772F06E20626F6F7420736563746F723A092507
+S3152007730073290A004E4F204C4142454C000000008D
+S31520077310202D20766F6C756D652049643A090925FD
+S31520077320700A0000202D20746F74616C206E756DB5
+S31520077330626572206F6620736563746F72733A098C
+S31520077340000000000A000000202D20627974657372
+S315200773502070657220736563746F723A090900009D
+S31520077360202D2023206F6620736563746F72732028
+S3152007737070657220636C75737465723A0900000034
+S31520077380202D2023206F66207265736572766564CB
+S3152007739020736563746F72733A090000202D2046A7
+S315200773A0415420656E7472792073697A653A0909A2
+S315200773B025730A00464154313600000046415433AE
+S315200773C0320000004641543132000000202D202390
+S315200773D0206F6620736563746F72732070657220E1
+S315200773E046415420636F70793A090000202D2023E7
+S315200773F0206F6620464154207461626C6520636F56
+S31520077400706965733A0925750A000000202D202327
+S31520077410206F662068696464656E20736563746F80
+S3152007742072733A0909000000202D20666972737469
+S3152007743020636C757374657220697320696E207377
+S315200774406563746F7220230900000000646F73461A
+S31520077450734C69622E63203A2007204E554C4C20E8
+S3152007746068616E646C657220646573637269707493
+S315200774706F722070747220070A000000646F7346CB
+S31520077480734C69622E63203A200720556E6B6E6F08
+S31520077490776E2068616E646C6572206C69737420E0
+S315200774A0070A0000646F7346734C69622E63203A9D
+S315200774B020072048616E646C6572206E6F742069A0
+S315200774C06E7374616C6C656420070A0001030507F7
+S315200774D0090E10121416181C1E0000007C7C7C7CDA
+S315200774E07C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7CAF
+S315200774F07C7C7C7C7C7C7C7C7C7C7C7C20217C23AF
+S315200775002425262728297C7C7C2D7C7C3031323308
+S315200775103435363738397C7C7C7C7C7C4041424309
+S315200775204445464748494A4B4C4D4E4F5051525376
+S315200775305455565758595A7C7C7C5E5F6041424366
+S315200775404445464748494A4B4C4D4E4F5051525356
+S315200775505455565758595A7B7C7D7E7C000000002F
+S315200775607C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C2E
+S315200775707C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C1E
+S3152007758020217C232425262728297C2B2C2D2E7C5D
+S31520077590303132333435363738397C3B7C3D7C7C49
+S315200775A0404142434445464748494A4B4C4D4E4F36
+S315200775B0505152535455565758595A5B7C5D5E5F06
+S315200775C0606162636465666768696A6B6C6D6E6F16
+S315200775D0707172737475767778797A7B7C7D7E7C09
+S315200775E000000000646F73564469724C69622E630B
+S315200775F0203A20426164206C6F6E67206E616D654C
+S31520077600207374727563747572652028627265615A
+S31520077610636B656429290A00646F73564469724C43
+S3152007762069622E63203A20426164206C6F6E672060
+S315200776306E616D6520737472756374757265202823
+S31520077640746F6F206C6F6E67290A0000646F73561C
+S315200776504469724C69622E63203A204D616C666FCD
+S31520077660726D6564206C6F6E67206E616D65207321
+S3152007767074727563747572650A000000646F7356B9
+S315200776804469724C69622E63203A20426164206CF9
+S315200776906F6E67206E616D6520737472756374757E
+S315200776A072650A00646F73564469724C69622E6369
+S315200776B0203A204572726F6E656F757365206C6F01
+S315200776C06E67206E616D650A0000000025632575CB
+S315200776D000000000646F73564469724C69622E631A
+S315200776E0203A204E616D6520697320746F6F206C78
+S315200776F06F6E673B2075736520616C6961732069BE
+S315200777006E73746561640A004E4F204C41424C45A6
+S3152007771000000000202D206469726563746F7279FA
+S31520077720207374727563747572653A0909564641F2
+S31520077730540A0000202D20726F6F7420646972200E
+S31520077740737461727420736563746F723A090925BD
+S31520077750750A0000202D2023206F66207365637429
+S315200777606F72732070657220726F6F743A090925DC
+S31520077770750A0000202D206D61782023206F662052
+S31520077780656E747269657320696E20726F6F743ABD
+S31520077790090925750A000000202D20726F6F7420B5
+S315200777A064697220737461727420636C757374656F
+S315200777B0723A0925750A00005658455854000000A4
+S315200777C0646F73564469724C69622E63203A205659
+S315200777D078576F726B732070726F707269746172EB
+S315200777E079206C6F6E67206E616D6573206E6F747E
+S315200777F020737570706F727465640A00646F7356B0
+S315200778004469724C69622E63203A20636C757374DF
+S3152007781065722073697A6520256420627974657399
+S3152007782020697320746F6F20736D616C6C2C206DCB
+S31520077830696E203D2025640A00000000646F735698
+S315200778404469724C69622E63203A204D616C666FDB
+S31520077850726D656420766F6C756D6520666F726DC7
+S315200778606174202846415433323A20726F6F74531D
+S3152007787074617274436C75737420203D20257529B5
+S315200778800A000000646F73564469724C69622E635E
+S31520077890203A204D616C666F726D656420766F6C39
+S315200778A0756D6520666F726D617420284641543167
+S315200778B0322F31363A20726F6F744D6178456E7468
+S315200778C072696573203D2030290A00002054620022
+S315200778D020476200204D6200204B62005261646996
+S315200778E07820256420206E6F7420737570706F72F0
+S315200778F07465640A0000000030000000257300004C
+S315200779000000000055544300504D0000414D000033
+S3152007791025483A254D3A25530000000025622025A3
+S31520077920642025590000000025622025642025486B
+S315200779303A254D3A25533A255900000044454345F3
+S315200779404D424552000000004E4F56454D42455286
+S31520077950000000004F43544F4245520053455054B0
+S31520077960454D4245520000004155475553540000A6
+S315200779704A554C59000000004A554E450000000064
+S31520077980415052494C0000004D41524348000000E7
+S315200779904645425255415259000000004A414E552C
+S315200779A041525900444543004E4F56004F43540019
+S315200779B053455000415547004A554C004A554E00FD
+S315200779C04D415900415052004D4152004645420013
+S315200779D04A414E0053415455524441590000000034
+S315200779E04652494441590000544855525344415937
+S315200779F0000000005745444E4553444159000000B6
+S31520077A0054554553444159004D4F4E444159000062
+S31520077A1053554E444159000053415400465249009C
+S31520077A205448550057454400545545004D4F4E0080
+S31520077A3053554E0000010202030303030404040402
+S31520077A4004040404050505050505050505050505BD
+S31520077A50050505050606060606060606060606069D
+S31520077A600606060606060606060606060606060689
+S31520077A70060606060707070707070707070707076D
+S31520077A800707070707070707070707070707070759
+S31520077A900707070707070707070707070707070749
+S31520077AA00707070707070707070707070707070739
+S31520077AB0070707070808080808080808080808081D
+S31520077AC00808080808080808080808080808080809
+S31520077AD008080808080808080808080808080808F9
+S31520077AE008080808080808080808080808080808E9
+S31520077AF008080808080808080808080808080808D9
+S31520077B0008080808080808080808080808080808C8
+S31520077B1008080808080808080808080808080808B8
+S31520077B2008080808080808080808080808080808A8
+S31520077B300808080843616368656420426C6F636BB5
+S31520077B4020492F4F204465766963652C2068616E2E
+S31520077B50646C653D25236C780A000000094465732B
+S31520077B606372697074696F6E3A2025730A00000084
+S31520077B704B427974657300004D4279746573000032
+S31520077B804742797465730000094469736B207369EA
+S31520077B907A6520256C642025732C2052414D20536D
+S31520077BA0697A652025642062797465730A00000066
+S31520077BB009426C6F636B2073697A652025642C20D4
+S31520077BC068656164732025642C20626C6F636B7310
+S31520077BD02F747261636B2025642C2023206F662007
+S31520077BE0626C6F636B7320256C640A00097061727F
+S31520077BF0746974696F6E206F666673657420256471
+S31520077C0020626C6F636B732C2074797065202573E3
+S31520077C102C204D65646961206368616E6765642001
+S31520077C2025730A0052656D6F7661626C65000000E8
+S31520077C304669786564000000596573004E6F000039
+S31520077C40094C617374206572726F72206572726E49
+S31520077C506F3D25782C20626C6F636B3D256C640A1B
+S31520077C6000000000426C6F636B204465766963658C
+S31520077C70000000006362696F44657656657269661F
+S31520077C80793A2064657669636520252378206973A8
+S31520077C90206E6569746E6572204342494F206E6F68
+S31520077CA07220626C6B496F20706F696E7465720AF9
+S31520077CB00000000025612025622025642025483AFA
+S31520077CC0254D3A25532025590A000000002782080A
+S31520077CD0002714480027145000040003000200015F
+S31520077CE00000FFFF000000000020902400271468F2
+S31520077CF00000000100000000000000000000000056
+S31520077D000000000000000000000000000000000046
+S31520077D100000000000000001002714A000252C8485
+S31520077D200000000000000000000000000000000026
+S31520077D300000000000000000000000000000000016
+S31520077D400000000000000000000000000000000006
+S31520077D5000000000000000000000000000000000F6
+S31520077D6000000000000000000000000000000001E5
+S31520077D700000000100001B58000000010000200041
+S31520077D80000020000000009600000003000002000B
+S31520077D900000000300003840000000080000000330
+S31520077DA0000024000000A280000000000000001B45
+S31520077DB000000040000000320000003C000000C820
+S31520077DC00000008C000000000000000000000040BA
+S31520077DD000000032000000000000000000000080C4
+S31520077DE00000003200000000000000000000010033
+S31520077DF00000000A0000000000000000000002004A
+S31520077E000000000A00000000000000000000040037
+S31520077E10000000140000000000000000000000051C
+S31520077E200000003C0000003C0000000000000000AD
+S31520077E3000000040000000140000000000000000C1
+S31520077E40000000800000000F000000000000000076
+S31520077E50000001000000000F0000000000000000E5
+S31520077E60000002000000000A0000000000000000D9
+S31520077E7000000004002719780027196400271960D5
+S31520077E800027194800271944002719300027192CDD
+S31520077E900027191400271910002718FC002718F4A3
+S31520077EA0002718E4002718D8002718C4002718BC6D
+S31520077EB0002718AC00271894002718840027186C69
+S31520077EC00027185C0027185800271840002718385D
+S31520077ED00027180C00271808002717F0002717B0C7
+S31520077EE00027159C002717740027159C0027173491
+S31520077EF00027159C002717280027159C00271704FD
+S31520077F000027159C002716E80027159C002716C072
+S31520077F100027159C0027169C0027159C00271670FE
+S31520077F200027159C002716480027159C0027163082
+S31520077F300027159C000000000000000000000080BC
+S31520077F400027820800000001000000AD00000001A4
+S31520077F500000004100204D4C00204DCC00204D4410
+S31520077F6000204D3400204E6400204F1800204E502C
+S31520077F7000204FF8002050E800204D4C00204DCC23
+S31520077F8000204D3C00204D3400204E6400204F1821
+S31520077F9000204E5000204FF8002050E80000000037
+S31520077FA000000000000000000000000000000000A4
+S31520077FB00000000000000000020000000000003F53
+S31520077FC000000015FF000000FF0000000001000070
+S31520077FD00000003F000000052000000020000000F0
+S31520077FE0004000000000003F00000005E000000000
+S31520077FF0E0000000000010000000003F0000000520
+S31520078000E0010000E0010000000010000000003F32
+S3152007801000000005E1000000E1000000000010005C
+S315200780200000003F00000005E1800000E18000001D
+S31520078030000010000000003F00000005800000003F
+S3152007804080000000010000000000003F000000053E
+S315200780500000000800000000000000610000420048
+S31520078060000043000000000000000001000000009F
+S315200780700000000000000200000000FF00000000D2
+S31520078080000000000000000000000200000000FFC2
+S3152007809000000000000000000000000000000200B1
+S315200780A0000000FF000000000000000000000000A4
+S315200780B000000200000000FF00D02B000000000097
+S315200780C00000000000000000000000030000000080
+S315200780D00000000000000000000000000000000073
+S315200780E00000000000000000000000000000000063
+S315200780F00000000000000000000000000000000053
+S315200781000000000000000000000000000000000042
+S315200781100000000000000000000000000000000032
+S315200781200000000000000000000000000000000022
+S315200781300000000000000000000000000000000012
+S315200781400000000000000000000000000000000002
+S3152007815000000000000000000000000000000000F2
+S3152007816000000000000000000000000000000000E2
+S3152007817000000000000000000000000000000000D2
+S3152007818000000000000000000000000000000000C2
+S315200781900000000000000000000000000000003C76
+S315200781A000000000000000000000000100989680F3
+S315200781B000000000002FAF080000000000000000AC
+S315200781C000000000000000000000003C0000000046
+S315200781D00000000000000000000000000000000072
+S315200781E00000000000000000002000400080010081
+S315200781F002000000010020002100210000000000ED
+S315200782000000000000000000000000000000000041
+S315200782100000000000000000000000000000000031
+S315200782200000000000000000000000000000000021
+S315200782300000000000000000000000000000000011
+S315200782400020DCE80000000000209D240020A0C0BC
+S31520078250002092DC0020D7800020A7BC0020F39CBA
+S315200782600020F4700020F56C0020F9A80020FD8876
+S3152007827000233670002337A00023389C0000000017
+S3152007828000000000000000000000000000000000C1
+S31520078290002115000021153800000001002782085B
+S315200782A0000100000027820800000000000000FAF5
+S315200782B000274025002781B80000000000000000A5
+S315200782C00000000000000000000000000000000081
+S315200782D00000000000000000000000000000000071
+S315200782E00000000000000000000000000000000061
+S315200782F00000000000000000000000000000000051
+S315200783000000000000000000436F707972696768FB
+S315200783107420313938342D313939362057696E640E
+S315200783202052697665722053797374656D732C2094
+S31520078330496E632E0A546869732070726F6772617B
+S315200783406D20636F6E7461696E7320636F6E6669E5
+S3152007835064656E7469616C20696E666F726D61748F
+S31520078360696F6E206F662057696E6420526976653D
+S31520078370722053797374656D732C20496E632E0AA8
+S31520078380616E6420646973636C6F737572652061AF
+S315200783906E6420636F7079696E67206172652070DD
+S315200783A0726F686962697465642E000000000000B8
+S315200783B000000000000000000000000300001F402E
+S315200783C00000000000000000002782CC000000000B
+S315200783D00000000000000000000000000000000070
+S315200783E00000000000000000000000000000000060
+S315200783F00000000000000000000000000000000050
+S31520078400000000000000000000000014000000002B
+S31520078410000000000000000000000004000000002B
+S31520078420000000000000000000000000000000001F
+S31520078430000000000000000000000000000000000F
+S3152007844000000000000000000000000000000000FF
+S3152007845000000000000000000000000000000002ED
+S315200784600000138800000004FFFFFFFF0000000044
+S3152007847000000000000000000000000000000000CF
+S3152007848000000000000000000000000000000000BF
+S3152007849000000000000000000000000000000000AF
+S315200784A00000000000000000FFFFFFFF00000000A3
+S315200784B0000000000000000000000000000000008F
+S315200784C008150400000000040318000000000050EF
+S315200784D000000064000000140000000000000000F7
+S315200784E00000000000000000000000000021A3207B
+S315200784F00021A3680021A38C0021A5200021A3B079
+S315200785000021A3F00021A4240021A5200021A520D5
+S315200785100021A5200021A5200021A5200021A4486F
+S315200785200021A4B0002783EC002783EC0021AA8032
+S315200785300021AB140021ABF00021AF900021AC1431
+S315200785400021AC980021ACD40021AD800021AF904A
+S315200785500021AF900021ADE00021AF900021ADE8CA
+S315200785600021AEDC0027842C0027842C0021B08034
+S315200785700021B0C80021B0EC0021B1100021B118AC
+S315200785800021B1C80021B1FC0021B2200021B2B4DC
+S315200785900021B2B80021B3280021B3000021B34C33
+S315200785A00021B3B40027846C0021B0800021B0C815
+S315200785B00021B0EC0021B1100021B1740021B1C80F
+S315200785C00021B1FC0021B2200021B2B40021B2B8AB
+S315200785D00021B3280021B3000021B34C0021B3B4F6
+S315200785E0002784A80027846C002784A800000000A1
+S315200785F0002782080000000120202020202020209C
+S3152007860020202020202020203030303030303030BD
+S3152007861030303030303030300000000000000000AD
+S31520078620000000000000000000000000000000001D
+S315200786300000000100278538000000000000000028
+S3152007864000000000000000000000000000000000FD
+S3152007865000000000000000000000000000000000ED
+S31520078660000000000000000000000000002782082C
+S315200786700000000D0000000000274394002743C890
+S31520078680000000000000000000000000002785F021
+S3152007869000278628002785AC000000080000000078
+S315200786A000000000002213E800000110000000006F
+S315200786B0000000000000000000000000000000008D
+S315200786C0000000000000000000000000000000007D
+S315200786D0000000000000000000000000000000006D
+S315200786E0000000000000000000000000000000005D
+S315200786F0000000000000000000000000000000004D
+S31520078700000000000000000000000000000000003C
+S31520078710000000000000000000000000000000002C
+S31520078720000000000000000000000000000000001C
+S31520078730000000000000000000000000000000000C
+S3152007874000000000000000000000000000000000FC
+S3152007875000000000000000000000000000278664DB
+S315200787600027869800000000000000000000000097
+S3152007877000000000000000000000000000000000CC
+S3152007878000000000000000000000000000000000BC
+S3152007879000000000000000000000000000000000AC
+S315200787A0000000000000000000000000000000009C
+S315200787B0000000000000000000000000000000008C
+S315200787C0000000000000000000000000000000007C
+S315200787D000222D2800222D9000222DF000222E384F
+S315200787E000222E70002231DC002235140022351497
+S315200787F000223514002235140022351400223514A0
+S315200788000022340000223488002786D0002786D00D
+S3152007881000000000000000000027CCC80027CCFC81
+S3152007882000224F3C00224F3C00224F3C00224F3C67
+S3152007883000224F3C00224F3C00224F3C00224F3C57
+S3152007884000224F3C00224F3C00224F3C00224F3C47
+S3152007885000224F3C00224F3C00224F3C00224F3C37
+S3152007886000224F3C00224F3C00224F3C00224F3C27
+S3152007887000224F3C00224F3C00224F3C00224F3C17
+S3152007888000000000000000000000000000000000BB
+S3152007889000000000000000000000000000000000AB
+S315200788A0000000000000000000000000000000009B
+S315200788B0000000000000000000000000000000008B
+S315200788C00000000000000000002787EC002745F085
+S315200788D0002745F400000000000017700000010281
+S315200788E00000000100000000002788280000000083
+S315200788F0000000000000000000000000000000004B
+S31520078900000000000000000000000000000000003A
+S31520078910000000000000000000000000000000002A
+S31520078920000000000000000000000000000000001A
+S31520078930000000000000000000000000000000000A
+S3152007894000000000000000000000000000000000FA
+S315200789500000000000000000000000003031323324
+S315200789603435363738390000002746000A20204E8E
+S31520078970414D452020202020202020454E54525965
+S3152007898020202020202020544944202020205052D7
+S31520078990492020205354415455532020202020205D
+S315200789A050432020202020202053502020202020E4
+S315200789B04552524E4F202044454C41590A2D2D2DC4
+S315200789C02D2D2D2D2D2D2D202D2D2D2D2D2D2D2DB7
+S315200789D02D2D2D2D202D2D2D2D2D2D2D2D202D2DB4
+S315200789E02D202D2D2D2D2D2D2D2D2D2D202D2D2DA4
+S315200789F02D2D2D2D2D202D2D2D2D2D2D2D2D202D94
+S31520078A002D2D2D2D2D2D202D2D2D2D2D0A00000020
+S31520078A100027CE840000000000000001000000109F
+S31520078A2000000100000010000001000001111111D3
+S31520078A3000000000000000000027894400278978ED
+S31520078A4000000000000000000000000000000000F9
+S31520078A5000000000000000000000000000000000E9
+S31520078A6000000000000000000000000000000000D9
+S31520078A7000000000000000000000000000000000C9
+S31520078A8000000000000000000000000000000000B9
+S31520078A9000000000000000000000000000000000A9
+S31520078AA00000000000000000000000000027487CAE
+S31520078AB0000000960000138800000002000000C88E
+S31520078AC00000000600000000000000000000000073
+S31520078AD00022E5D00022EA280022EC900022EB387B
+S31520078AE00022EBD4626F6F74206465766963650034
+S31520078AF0686F7374206E616D65000000746172671C
+S31520078B006574206E616D652028746E29000000004B
+S31520078B1066696C65206E616D65000000696E657417
+S31520078B20206F6E2065746865726E657420286529C6
+S31520078B3000000000696E6574206F6E206261636BAA
+S31520078B40706C616E6520286229000000686F737457
+S31520078B5020696E657420286829000000676174659E
+S31520078B6077617920696E65742028672900000000DF
+S31520078B7075736572202875290000000066747020B9
+S31520078B8070617373776F72642028707729000000ED
+S31520078B906674702070617373776F7264202870779C
+S31520078BA0292028626C616E6B203D207573652072C3
+S31520078BB073682900756E6974206E756D626572001B
+S31520078BC070726F636573736F72206E756D626572EF
+S31520078BD000000000666C6167732028662900000084
+S31520078BE07374617274757020736372697074202848
+S31520078BF0732900006F7468657220286F29000000AA
+S31520078C00FFFFFFFF0000000263825363FF0000009F
+S31520078C100000000000000000000000000000000027
+S31520078C200000000000000000000000000000000017
+S31520078C300000000000000000000000000000000007
+S31520078C4000000000000000000000000000000000F7
+S31520078C5000000000000000000000000000000000E7
+S31520078C6000000000000000000000000000000000D7
+S31520078C7000000000000000000000000000000000C7
+S31520078C8000000000000000000000000000000000B7
+S31520078C9000000000000000000000000000000000A7
+S31520078CA00000000000000000000000000000000097
+S31520078CB00000000000000000000000000000000087
+S31520078CC00000000000000000000000000000000077
+S31520078CD00000000000000000000000000000000067
+S31520078CE00000000000000000000000040000000053
+S31520078CF00000000000000000000000000000000047
+S31520078D000000000000000000000000000000000036
+S31520078D100000000000000000000000000000000026
+S31520078D200000000000000000000000000000000016
+S31520078D300000000000000000000000000000000006
+S31520078D4000000000000000000000000000000000F6
+S31520078D5000000000000000000000000000000000E6
+S31520078D6000000000000000000000000000000000D6
+S31520078D7000000000000000000000000000000000C6
+S31520078D8000000000000000000000000000000000B6
+S31520078D9000000000000000000000000000000000A6
+S31520078DA00000000000000000000000000000000096
+S31520078DB00000003200278CB400278CB40000000086
+S31520078DC00000000000000000000000000000000076
+S31520078DD0000000000000003200000000000000052F
+S31520078DE000000001000000000000003C000004B065
+S31520078DF000000014FFFFFFFF000000001412000010
+S31520078E000000000000000000000000000000000035
+S31520078E101002000000000000000000000000000013
+S31520078E200000000030313233343536373839616245
+S31520078E306364656600000000000000000000000073
+S31520078E40000000000000000000000000FFFFFFFFF9
+S31520078E50FFFF000001005E000000000001005E7FAA
+S31520078E60FFFF0000000000000000000000000000D7
+S31520078E7000000001000000400000000200274EB05D
+S31520078E800000000000000000000000000027D3A813
+S31520078E900027D54800000000002450700000001B62
+S31520078EA0000000100000000008000000000000007D
+S31520078EB00000000000000000000000001002000073
+S31520078EC00000000000000000000000001002000063
+S31520078ED00000000000000000000000001002000053
+S31520078EE00000000000000000000000000000000055
+S31520078EF0000000400000003C000000000000003297
+S31520078F000000000010020000000000000000000022
+S31520078F1000000000000000000024434141413D3D80
+S31520078F2024410000000000002A0000000000000085
+S31520078F300000000000000000000000000000000004
+S31520078F4000000000000000000000000000000000F4
+S31520078F5000000000000000000000000000000000E4
+S31520078F6000000000000000000000000000000000D4
+S31520078F70000000000000000000241EF4002423F453
+S31520078F80002424C8002425DC0024265C002426E4AB
+S31520078F9000242820002428F40024299400242C5473
+S31520078FA000278E7800000000000000000000000067
+S31520078FB00000000000000000000000000000000084
+S31520078FC00000000000000000000000000000000074
+S31520078FD00000000000000000000000000000000064
+S31520078FE0000000000000000000278F20000000324C
+S31520078FF0000000030000271000000000000000000A
+S315200790000000000000000000000000000000000033
+S315200790100000000000000000000000000000000023
+S315200790200000000000000000000000000000000013
+S315200790300000000000000000000000000000000003
+S3152007904000000000000000000080C0E0F0F8FCFEF1
+S31520079050FF000000000000000000000000000000E4
+S3152007906000000000100200000000000000000000C1
+S315200790700000000000002000000020000000000083
+S3152007908000000000000000000000000000000000B3
+S31520079090000003FF000000000000000000000000A1
+S315200790A00000000000000000000000000000000093
+S315200790B00000000000000000000000000000000083
+S315200790C00000000000000000000000000000000073
+S315200790D00000000000000000000000000000000063
+S315200790E00000000000000000000000000000000053
+S315200790F00000000000000000000000000000000043
+S315200791000000000000000000000000000000000032
+S315200791100000000000000000000000000000000022
+S315200791200000000000000000000000000000000012
+S315200791300000000000000000000000000000000002
+S3152007914000000000000000000000000000000000F2
+S3152007915000000000000000000000000000000000E2
+S3152007916000000000000000000000000000000000D2
+S315200791700000000000000003000000001400021297
+S31520079180101011111110100000000200000000033A
+S315200791900000000100800000000038400000009613
+S315200791A0000000080000009600003840000000017B
+S315200791B00000000200000004000000080000001064
+S315200791C00000002000000040000000400000004092
+S315200791D00000004000000040000000400000004062
+S315200791E0000001FF0024C1B00024C1B40000200004
+S315200791F00000200000000000000000000000000A18
+S3152007920000000002000000460000000000001B5876
+S315200792100027556000275538002755380027553829
+S3152007922000275558002755500027554800275550E1
+S315200792300027555000275550000000000000000069
+S3152007924000000000002757EC00000001002757DC2C
+S3152007925000000002002757C800000003002757A474
+S31520079260000000040027578C0000000500275778C8
+S315200792700000000600275764000000070027575400
+S31520079280FFFFFFFF00000000002758200027581C7B
+S3152007929000275818002758100027580C002758046D
+S315200792A0000000010000000110020000000000007D
+S315200792B00000000000000000000000000000001E63
+S315200792C0000024000000A2800040000000000000EB
+S315200792D000000000002791E00027923800000000D8
+S315200792E00000000000000000000000000000000051
+S315200792F00000000000000000000000000000000041
+S315200793000000000000000000000000000000000030
+S315200793100000000000000000000000000000000020
+S315200793200000000000000000000000000000000010
+S315200793300000000000000000000000000000000000
+S3152007934000000000000000000000000000000000F0
+S3152007935000000000000000000000000000000000E0
+S3152007936000000000000000000000000000000000D0
+S3152007937000000000000000000000000000000000C0
+S3152007938000000000000000000000000000000000B0
+S315200793900000000000040000002792A40000000D32
+S315200793A00000000000000000000000000000000090
+S315200793B00000000000000000000000000000000080
+S315200793C0000200000000000000000000000000006E
+S315200793D000000000000001000025346400253794B2
+S315200793E0000002000025346400253794000003009E
+S315200793F000253464002537940000040000253464D2
+S3152007940000253794000005000025354C0025394CEA
+S315200794100000060000253464002537940000070065
+S31520079420002534640025379400000800002534649D
+S3152007943000253794000009000025354C0025394CB6
+S3152007944000000C00002534640025379400000D0029
+S315200794500025346400253794000010000025346465
+S315200794600025379400001100002534640025379421
+S3152007947000001200002534640025379400001300ED
+S315200794800025346400253794000014000025346431
+S315200794900025379400001C000025346400253794E6
+S315200794A000001D00002534640025379400001E00A7
+S315200794B0002534640025379400001F0000253464F6
+S315200794C0002537940000000000000000000000007F
+S315200794D07C7343A67C6802A6480000033861000017
+S315200794E09421FFF0480000033821001048000003AC
+S315200794F0000000000000000000000000000000003F
+S31520079500000000000000000000000000000000002E
+S31520079510000000000000000000000000000000001E
+S3152007952000254A9800254D9400254C9C00254FBCC4
+S315200795300025514C002566180025650C00254D4051
+S3152007954000255C4400255A6400255E78002554D002
+S31520079550002552F4002557400025673C00254B4C33
+S31520079560002563000025621400256780000000009F
+S3152007957000000000000000000000000000000000BE
+S3152007958000275A18002782080000010000275C548C
+S315200795900000020000275C440000030000275C3817
+S315200795A00000040000275C240000050000275C104B
+S315200795B00000060000275C040000070000275BFC6C
+S315200795C00000080000275BEC0000090000275BE08D
+S315200795D000000C0000275BD400000D0000275BCCA1
+S315200795E00000100000275BA00000110000275B7019
+S315200795F00000120000275B480000130000275B18B5
+S315200796000000140000275AF000001C0000275AC447
+S3152007961000001D0000275A9400001E0000275A64E8
+S3152007962000001F0000275A2C000000000000000041
+S3152007963000275EA40000000000275EA000000004AB
+S3152007964000275E9C0000000800275E980000000C9B
+S3152007965000275E940000001000275E90000000148B
+S3152007966000275E8C0000001800275E880000001C7B
+S3152007967000275E840000002000275E80000000246B
+S3152007968000275E7C0000002800275E780000002C5B
+S3152007969000275E740000003000275E70000000344B
+S315200796A000275E6C0000003800275E680000003C3B
+S315200796B000275E640000004000275E60000000442B
+S315200796C000275E5C0000004800275E580000004C1B
+S315200796D000275E540000005000275E50000000540B
+S315200796E000275E4C0000005800275E480000005CFB
+S315200796F000275E440000006000275E4000000064EB
+S3152007970000275E3C0000006800275E380000006CDA
+S3152007971000275E340000007000275E3000000074CA
+S3152007972000275E2C0000007800275E280000007CBA
+S3152007973000275E240000008000275E2000000084AA
+S3152007974000275E1C0000008800275E180000008C9A
+S3152007975000275E140000009000275E10000000948A
+S31520079760000000000000000000009000000000003C
+S3152007977000275EC000275F140000000400000000D9
+S3152007978000000000000000000000000000000000AC
+S31520079790000000070000000F0000001F0000003F28
+S315200797A00000000000000003000000010000000385
+S315200797B000000001000000039A31903932D9C024F5
+S315200797C09B6631825DA1F342DE3B81E0DF0A6FB5FE
+S315200797D0F103BC0248F340FB7449E56BBEB1DBB02D
+S315200797E0AB5C5918946554FD8C2E680FEB3D799F19
+S315200797F0B11EE0B72D436B86DA672E2A1588CA88ED
+S31520079800E369735D904F35F7D7158FD66FA6F0515D
+S31520079810616E6B96AC94EFDC36413F93C622C298B5
+S31520079820F5A42AB88A88D77BF5AD9D0E8999220B90
+S3152007983027FB47B9002796C4002796B8002796B86E
+S31520079840000000030000001F0000000300279734D4
+S3152007985000000000000000FA000013880000000343
+S315200798606469736B206361636865206572726F72C2
+S315200798703A2064657669636520257820626C6F6374
+S315200798806B202564206572726E6F2025782C202523
+S31520079890730A00000000000100000001000000001C
+S315200798A000002710FFFFFFFF000000010000000057
+S315200798B0000000000000000000000000000000007B
+S315200798C0000000000000000000000000000000006B
+S315200798D0000000000000000000000000000000005B
+S315200798E0000000000000000000000000000000004B
+S315200798F0000000000000000000000000000000003B
+S31520079900000000000000000000000000000000002A
+S31520079910000000000000000100000000002777D8A3
+S31520079920002777D4002777D0002777CC00000000C0
+S31520079930000002000000000A000004000000000AE0
+S31520079940000006000000000A0000070000000004CF
+S31520079950000003000000000A0000080000000008BD
+S3152007996000000D0000000005000011000000000B9C
+S3152007997000000C00000000040000000000000000AA
+S31520079980002779300027792C002779280027792482
+S31520079990002779200027791C0027791800277910B6
+S315200799A00027790800277900002778F4002778E828
+S315200799B0002778E0002778D4002778D0002778CCAE
+S315200799C0002778C8002778C4002778C0002778BCE6
+S315200799D0002778B8002778B4002778B0002778AC16
+S315200799E0002778A8002778A40027789C0027789056
+S315200799F00027788800277880002778C0002778787E
+S31520079A0000277870002778680027785C0027785425
+S31520079A10002778480027783C002778280027781CD5
+S31520079A20002778100027780C002778080027780465
+S31520079A300027780400277800002778000027780079
+S31520079A4000279880000000000000000000000000AA
+S31520079A5000000000000000000000000000000000D9
+S31520079A60000000000000001F0000003B0000005A15
+S31520079A700000007800000097000000B5000000D421
+S31520079A80000000F300000111000001300000014E24
+S31520079A900000000000000000000000000000000099
+S31520079AA00000000000000000000000000000000089
+S31520079AB00000000000000000000000000000000079
+S31520079AC00000000000000000000000000000000069
+S31520079AD00000000000000000000000000027E1C48D
+S31520079AE00010000000000000000000000000000039
+S31520079AF00000000000000000000000000000000039
+S31520079B000000000000000000000000000000000028
+S31520079B104E80002100000000000000000000000029
+S904000000FB
diff --git a/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_const.h b/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_const.h
new file mode 100644
index 0000000..5f6bb05
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_const.h
@@ -0,0 +1,109 @@
+ /*
+ *******************************************************************
+ **
+ ** (c) Copyright Cisco 2000
+ ** All Rights Reserved
+ **
+ ******************************************************************
+ */
+ #ifndef __CSU_CONST_H__
+ #define __CSU_CONST_H__
+
+ //General definition of boolean return codes
+ typedef enum {
+ CSU_RESULT_FAILED=0,
+ CSU_RESULT_SUCCESS,
+ CSU_RESULT_NOT_RESSTATE_USED,
+ CSU_RESULT_RTP_HANDLER_NOT_FOUND,
+ CSU_RESULT_INVALID_PORT_TYPE,
+ CSU_RESULT_SRC_PORT_CONNECTED_AS_EXPECTED,
+ CSU_RESULT_SNK_PORT_CONNECTED_AS_EXPECTED
+ } T_CSU_RESULT;
+
+ //State definition of either src or snk port
+ typedef enum {
+ CSU_RESSTATE_NULL=0,
+ CSU_RESSTATE_FREE,
+ CSU_RESSTATE_USED,
+ CSU_RESSTATE_IGNORE,
+ } T_CSU_RESSTATE;
+
+ //define _EMBEDDED_FILE , which is in "/ata/vipercall/scripts"
+ static char * EMBEDDED_FILE[]={
+ "/speech.gsm",
+ "/emf30.gsm"
+ };
+
+ //Size definintion of one announcement period
+ #define ANN_PERIOD 33 //33 buffer
+
+ //1500=6000/4 ie 6+ seconds elapsed
+ #define CSU_TRAFFIC_FLOW_6_SEC_COUNT 500
+
+ //Size definition of connections per port
+ #define CSU_SRC_CONN_MAX 3
+ #define CSU_SNK_CONN_MAX 3
+
+ //Size definition of source ports
+ #define CSU_GSM_SRC_TRX_MAX 2
+ #define CSU_GSM_SRC_SLOT_MAX 8
+ #define CSU_RTP_SRC_PORT_MAX 45
+ //Add definition for ANN here
+ #define CSU_ANN_SRC_PORT_MAX 2
+
+ //Size definition of sink ports
+ #define CSU_GSM_SNK_TRX_MAX 2
+ #define CSU_GSM_SNK_SLOT_MAX 8
+ #define CSU_RTP_SNK_PORT_MAX 45
+ //Add definition for ANN here
+
+ //Size definition of peer ports of either src or snk ports
+ #define CSU_PEER_PORT_MAX 3 //N in 1->N conn.
+ #define CSU_PEER_PORT_NULL 0xFF //no peer exists
+
+ //Interface definition between CSU and DSP
+ #define CSU_GSM_SPEECH_MSG_MD 0x04
+ #define CSU_GSM_SPEECH_DLMSG_MSB 0x30
+ #define CSU_GSM_SPEECH_DLMSG_LSB 0x01
+ #define CSU_GSM_SPEECH_ULMSG_MSB 0x30
+ #define CSU_GSM_SPEECH_ULMSG_LSB 0x00
+ #define CSU_GSM_SPEECH_MSG_LEN 45
+ #define CSU_GSM_SPEECH_DAT_POS 12 //Speech start
+ #define CSU_GSM_SPEECH_DAT_LEN 33 //Speech length
+ #define CSU_GSM_SPEECH_MSG_TRX_POS 7
+ #define CSU_GSM_SPEECH_MSG_SLOT_POS 8
+ #define CSU_GSM_BM_ACCH_CBITS 8
+
+ //Defintion of RTP GSM speech frame description
+ //#define CSU_RTP_SPEECH_DAT_PAYLOAD 0x60 //Used for GSM
+ #define CSU_RTP_SPEECH_DAT_PAYLOAD 3 //Used for CSCO test use
+ #define CSU_RTP_SPEECH_DAT_PAYLOADefr 20
+ #define CSU_RTP_SPEECH_DAT_LENefr 32 //In fact, it's 31
+ #define CSU_RTP_SPEECH_DAT_PTSBYTE 12 //Speech start
+ #define CSU_RTP_SPEECH_DAT_RAT 160 //Sampling rate
+ #define CSU_RTP_SPEECH_DAT_POS 12 //Speech start
+ #define CSU_RTP_SPEECH_DAT_LEN 33 //Speech length
+ #define CSU_RTP_SPEECH_MSG_LEN 45
+ #define CSU_RTP_SPEECH_MSG_LENefr 44 //for efr
+
+ //Definition of REC speech framce description
+ #define CSU_REC_SPEECH_DAT_LEN 33 //!!! = RTP/GSM speech data len
+
+ //Definition of jitter buffer control parameters
+ #define CSU_JBUF_LEN 330 //330 bytes for jitter buffering
+
+ //Definition of relevant max capacity
+ #define CSU_MAX_SPEECH_MSG_LEN 45
+ #define CSU_MAX_SPEECH_DAT_LEN 33
+
+ //Definition of test control selections
+ #define CSU_RECD_BUF_LEN 27000 //800 speech frames,16s
+ #define CSU_PLAY_BUF_LEN 27000 //800 speech frames,16s
+ #define CSU_TEST_FUNC_NULL 0
+ #define CSU_TEST_PLAY_SPEECH_FROM_FILE_TO_SNK 1
+ #define CSU_TEST_RECORD_SRC_SPEECH_TO_FILE 2
+ #define CSU_TEST_LOOPBACK_SPEECH_TO_SRC_SELF 3
+ #define CSU_TEST_PRINT_SNK_HANDLER_USED 4
+ #define CSU_TEST_PRINT_SRC_HANDLER_USED 5
+ #endif /* __CSU_CONST_H__ */
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_data.h b/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_data.h
new file mode 100644
index 0000000..06d8a8d
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_data.h
@@ -0,0 +1,36 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __CSU_DATA_H__
+#define __CSU_DATA_H__
+
+#include "csu_head.h"
+
+extern T_CSU_SRC_PORT csu_GsmSrcPort[CSU_GSM_SRC_TRX_MAX][CSU_GSM_SRC_SLOT_MAX];
+extern T_CSU_SRC_PORT csu_RtpSrcPort[CSU_RTP_SRC_PORT_MAX];
+extern T_CSU_SRC_PORT csu_AnnSrcPort[CSU_ANN_SRC_PORT_MAX];
+
+extern T_CSU_SNK_PORT csu_GsmSnkPort[CSU_GSM_SNK_TRX_MAX][CSU_GSM_SNK_SLOT_MAX];
+extern T_CSU_SNK_PORT csu_RtpSnkPort[CSU_RTP_SNK_PORT_MAX];
+
+
+// Data definition for test function purpose
+extern Uint8 csu_recdbuf[CSU_RECD_BUF_LEN]; //buffer for recording-speech-to-file purpose
+extern Uint8 csu_playbuf[CSU_PLAY_BUF_LEN]; //buffer for playing-speech-from-file purpose
+extern Uint32 csu_recdidx;
+
+// Data definition of semaphore
+extern SEM_ID csu_SemaId;
+
+// Data definition for announcement
+extern Uint8 csu_annbuf_FR[CSU_ANN_SRC_PORT_MAX][CSU_PLAY_BUF_LEN]; //buffer for announcement, CSU_ANN_SRC_PORT_MAX is the same as CSU_ANN_ID_MAX
+extern Uint8 csu_annbuf_EFR[CSU_ANN_SRC_PORT_MAX][CSU_PLAY_BUF_LEN]; //buffer for announcement, for support EFR codec
+
+extern Uint32 csu_TimeStamp;
+
+#endif /*__CSU_DATA_H__*/
diff --git a/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_head.h b/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_head.h
new file mode 100644
index 0000000..a260d83
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_head.h
@@ -0,0 +1,29 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __CSU_HEAD_H__
+#define __CSU_HEAD_H__
+
+#include "vxWorks.h"
+#include "string.h"
+#include "sysLib.h"
+#include "tickLib.h"
+#include "ioLib.h"
+#include "semLib.h"
+#include "logging\vclogging.h"
+#include "ril3\ril3irt.h"
+#include "csunew\csu_jetrtp.h"
+#include "csunew\csu_const.h"
+#include "csunew\csu_types.h"
+#include "csunew\csu_intf.h"
+#include "csunew\csu_table.h"
+#include "csunew\csu_data.h"
+#include "csunew\csu_proto.h"
+#include "ril3\ie_bearer_capability.h"
+
+#endif /*__CSU_HEAD_H__*/
diff --git a/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_intf.h b/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_intf.h
new file mode 100644
index 0000000..2c93d8f
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_intf.h
@@ -0,0 +1,255 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __CSU_INTF_H__
+#define __CSU_INTF_H__
+
+#include "csu_const.h"
+#include "csu_types.h"
+#include "csu_jetrtp.h"
+
+
+#define CSU_CONN_MAX 3
+
+//Announcemnt port ID,expected to change later
+typedef unsigned short T_CSU_ANN_ID;
+
+//definition of trunk type
+typedef enum {
+ CSU_GSM_PORT = 10, //GSM
+ CSU_RTP_PORT = 20, //RTP
+ CSU_ANN_PORT = 30, //announcement
+ CSU_NIL_PORT = 255,
+} T_CSU_PORT_TYPE;
+
+//definition of port ID
+typedef struct {
+ T_CSU_PORT_TYPE portType;
+ union {
+ T_CNI_IRT_ID gsmHandler; //ID of GSM port
+ HJCRTPSESSION rtpHandler; //ID of RTP port
+ T_CSU_ANN_ID annHandler; //ID of ANN port
+ } portId;
+ T_CNI_RIL3_SPEECH_VERSION speechVersion;
+} T_CSU_PORT_ID;
+
+//definition of port ID list
+typedef struct {
+ Uint8 count;
+ T_CSU_PORT_ID port[CSU_CONN_MAX];
+} T_CSU_PORT_LIST;
+
+// Return codes for register/unregister functions
+// related to H323/RTP tasks
+typedef enum {
+ CSU_RESULT_REG_SUCCESS=0,
+ CSU_RESULT_REG_PORT_ALREADY_REGISTERED,
+ CSU_RESULT_REG_PORT_REGISTER_FAILED,
+ CSU_RESULT_REG_PORT_NOT_REGISTERED,
+ CSU_RESULT_REG_PORT_UNREGISTER_PENDING,
+ CSU_RESULT_REG_PORT_UNREGISTER_FAILED,
+ CSU_RESULT_REG_PORT_TYPE_UNSUPPORTED,
+ CSU_RESULT_REG_PORT_REGISTER_OVERFLOW
+} T_CSU_RESULT_REG;
+
+// Defs of annoucement Identifiers
+typedef enum {
+ CSU_ANN_RINGBACK=0
+} T_CSU_ANN_REG;
+
+
+// Return codes for connection-establishment functions
+// related to CC/connection functionality
+typedef enum {
+ //Common for all successful cases
+ CSU_RESULT_CON_SUCCESS=0,
+
+ //Return codes from connection functions
+ CSU_RESULT_CON_SRC_PORT_NOT_READY,
+ CSU_RESULT_CON_SNK_PORT_NOT_READY,
+ CSU_RESULT_CON_SRC_PORT_OVERFLOW,
+ CSU_RESULT_CON_SNK_PORT_OVERFLOW,
+
+ //Return codes from break functions
+ CSU_RESULT_CON_SRC_PORT_NOT_ENGAGED,
+ CSU_RESULT_CON_SNK_PORT_NOT_ENGAGED,
+
+ //Return codes from inquiry function
+ CSU_RESULT_CON_FAILED
+
+} T_CSU_RESULT_CON;
+
+//
+//CSU functional calls for use by CC/connection entity
+
+//Request for establishing a simplex connction from source port to sink port
+T_CSU_RESULT_CON csu_SimplexConnect(T_CSU_PORT_ID *source, T_CSU_PORT_ID *sink);
+
+//Request for establish a duplex connction between source port and sink port
+T_CSU_RESULT_CON csu_DuplexConnect(T_CSU_PORT_ID *source, T_CSU_PORT_ID *sink);
+
+//Request for breaking a simplex connection from source port to sink port
+T_CSU_RESULT_CON csu_SimplexBreak(T_CSU_PORT_ID *source, T_CSU_PORT_ID *sink);
+
+//Request for breaking a duplex connection between source port and sink port
+T_CSU_RESULT_CON csu_DuplexBreak(T_CSU_PORT_ID *source, T_CSU_PORT_ID *sink);
+
+//Request for breaking all the connections Originating from the given port
+T_CSU_RESULT_CON csu_OrigBreakAll(T_CSU_PORT_ID *source);
+
+//Request for breaking all the connections terminated at the given port
+T_CSU_RESULT_CON csu_TermBreakAll(T_CSU_PORT_ID *sink);
+
+//Request for breaking all the connections either originating from or terminated
+//at the given port
+T_CSU_RESULT_CON csu_OrigTermBreakAll(T_CSU_PORT_ID *port);
+
+//Return all the ports involved in connections with source as originating side. count
+//containing the total number of ports involved and sink pointing to these ports.
+T_CSU_RESULT_CON csu_SrcStatus(T_CSU_PORT_ID *source, T_CSU_PORT_LIST *sink);
+
+//Return all the ports involved in connections with sink as terminated side. count
+//containing the total number of ports involved and source pointing to these ports.
+T_CSU_RESULT_CON csu_SnkStatus(T_CSU_PORT_ID *sink, T_CSU_PORT_LIST *source);
+
+//Return all the ports involved in connections with port as originating or terminated sides,
+//count containing the total number of ports involved and source pointing to these ports.
+T_CSU_RESULT_CON csu_AllStatus(T_CSU_PORT_ID *port, T_CSU_PORT_LIST *source, T_CSU_PORT_LIST *sink);
+
+//
+//CSU functional calls for use by H323/RTP task
+//
+//Register port as src port in future connection
+T_CSU_RESULT_REG csu_RegSrcPort(T_CSU_PORT_ID *port);
+
+//Register port as snk port in future connection
+T_CSU_RESULT_REG csu_RegSnkPort(T_CSU_PORT_ID *port);
+
+//Register port as both src and snk ports in future connection
+T_CSU_RESULT_REG csu_RegSrcSnkPort(T_CSU_PORT_ID *port);
+
+//Unregister port's src port registration
+T_CSU_RESULT_REG csu_UnregSrcPort(T_CSU_PORT_ID *port);
+
+//Unregister port's snk port registration
+T_CSU_RESULT_REG csu_UnregSnkPort(T_CSU_PORT_ID *port);
+
+//Unregister port's both src and snk ports registration
+T_CSU_RESULT_REG csu_UnregSrcSnkPort(T_CSU_PORT_ID *port);
+
+//CSU eventhandler provided for H323/RTP task's calling
+//void H323RTPEventHandler(HRTPSESSION hrtp, H323CALL hCall, T_CNI_IRT_ID entryId);
+RTP_READ_STATUS RTPEventHandler( HJCRTPSESSION RtpHandle, VOIP_CALL_HANDLE VoipCallHandle, TXN_ID TxnId);
+void RTPFastReadHandler(HJCRTPSESSION RtpHandle,unsigned char *newPacket,
+ int packetLength,rtpParam RtpParams,VOIP_CALL_HANDLE CallHandle,T_CNI_IRT_ID MobileHandle);
+
+//
+//CSU functional call provided for L1PROXY's calling
+//
+Int32 procUlTchFrame(Uint8 *buf);
+
+//
+//CSU functional call provided to RootTask
+//
+void csu_TblInitAll(void);
+
+//
+//CSU functional calls which might be invoked from OAM
+//
+
+//Show GSM-orig connections
+void csu_ShowGsmSrcTable(void);
+
+//Show RTP-orig connections
+void csu_ShowRtpSrcTable(void);
+
+//Show ANN-orig connections
+void csu_ShowAnnSrcTable(void);
+
+//Show all-orig connections
+void csu_ShowAllSrcTable(void);
+
+//Show GSM-term connections
+void csu_ShowGsmSnkTable(void);
+
+//Show RTP-term connections
+void csu_ShowRtpSnkTable(void);
+
+//Show all-term connections
+void csu_ShowAllSnkTable(void);
+
+//Show all orig/term connections
+void csu_ShowAllTable(void);
+
+//Clear all orig/term connections
+void csu_ClearAllTable(void);
+
+//Manually register given port as src port
+void csu_ManRegSrcPort(Uint8 type, Uint32 handler);
+
+//Manually register given port as snk port
+void csu_ManRegSnkPort(Uint8 type, Uint32 handler);
+
+//Manually register given port as both src and snk port
+void csu_ManRegSrcSnkPort(Uint8 type, Uint32 handler);
+
+//Manually connect from src port to snk port uni-directionally
+void csu_ManUniConnect(Uint8 s_type, Uint32 s_handler, Uint8 d_type, Uint32 d_handler);
+
+//Manually connect src port and snk port bi-directionally
+void csu_ManBiConnect(Uint8 s_type, Uint32 s_handler, Uint8 d_type, Uint32 d_handler);
+
+//Manually break connection from src port to snk port uni-directionally
+void csu_ManUniBreak(Uint8 s_type, Uint32 s_handler, Uint8 d_type, Uint32 d_handler);
+
+//Manually break connection between src port and snk port bi-directionally
+void csu_ManBiBreak(Uint8 s_type, Uint32 s_handler, Uint8 d_type, Uint32 d_handler);
+
+//Manually break all connections originating from given port
+void csu_ManOrigBreakAll(Uint8 type, Uint32 handler);
+
+//Manually break all connections terminated at given port
+void csu_ManTermBreakAll(Uint8 type, Uint32 handler);
+
+//Manually break all connections either originating from or terminated at given port
+void csu_ManOrigTermBreakAll(Uint8 type, Uint32 handler);
+
+//Start record speech to a given snk port identified by (type, handler)
+void csu_StartRecordSpeech(Uint8 type, Uint32 handler);
+
+//Stop record speech to a given snk port identified by (type, handler)
+void csu_StopRecordSpeech(Uint8 type, Uint32 handler);
+
+//Start play speech to a given snk port identified by (type, handler)
+void csu_StartPlaySpeech(Uint8 type, Uint32 handler);
+
+//Stop play speech to a given snk port identified by (type, handler)
+void csu_StopPlaySpeech(Uint8 type, Uint32 handler);
+
+//Start loopback voice from a given src port to itself
+void csu_StartLoopback(Uint8 type, Uint32 handler);
+
+//Stop loopback voice from a given src port to itself
+void csu_StopLoopback(Uint8 type, Uint32 handler);
+
+//Write speech recorded to a file
+void csu_WriteSpeechToFile(void);
+
+//Start showing occurrence of writing to a given sink port
+void csu_ShowWriteToSnk(Uint8 type, Uint32 handler);
+
+//Clear showing occurrence of writing to a given sink port
+void csu_ClrShowWriteToSnk(Uint8 type, Uint32 handler);
+
+//Start showing occurrence of receiving to a given source port
+void csu_ShowReceiveFromSrc(Uint8 type, Uint32 handler);
+
+//Clear showing occurrence of receiving to a given source port
+void csu_ClrShowReceiveFromSrc(Uint8 type, Uint32 handler);
+
+#endif /* __CSU_INTF_H__ */
diff --git a/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_jetrtp.h b/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_jetrtp.h
new file mode 100644
index 0000000..9546eb4
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_jetrtp.h
@@ -0,0 +1,23 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __CSU_JETRTP_H__
+#define __CSU_JETRTP_H__
+
+#define HRTPSESSION HJCRTPSESSION
+#define rtpOpen jcRtpOpen
+#define rtpGetPort jcRtpGetPort
+#define rtpSetRemoteAddress jcRtpSetRemoteAddress
+#define rtpSetEventHandler jcRtpSetEventHandler
+#define rtpWrite jcRtpWrite
+#define rtpReadEx jcRtpReadEx
+#define rtpInit jcRtpInit
+//#include "voip\h323api.h"
+#include "voip\voipapi.h"
+
+#endif /*__CSU_JETRTP_H__*/
diff --git a/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_proto.h b/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_proto.h
new file mode 100644
index 0000000..ea5b081
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_proto.h
@@ -0,0 +1,80 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __CSU_PROTO_H__
+#define __CSU_PROTO_H__
+
+#include "csu_head.h"
+
+// Functions handling voice passing
+T_CSU_RESULT csu_TblGetSnk(T_CSU_PORT_ID *src,Uint8 *test,Uint8 *count,T_CSU_SRC_PEER **peer);
+T_CSU_RESULT csu_PassVoice(T_CSU_SRC_PEER *peer, Uint8 *buf, Uint16 seqNumber, Uint8 cd);
+T_CSU_RESULT csu_TblGetRtpParam(T_CSU_SRC_PEER *peer,rtpParam *param, Uint8 cd);
+
+// Callback function provided by L1PROXY to CSU
+void sendDsp( unsigned char *buffer, int len );
+
+// Functions defined in RM for conversion between entryId and gsmHandler
+Bool rm_EntryIdToTrxSlot(T_CNI_IRT_ID entryId, Uint16 *gsmHandler);
+Bool rm_TrxSlotToEntryId(Uint16 gsmHandler, T_CNI_IRT_ID *entryId);
+Bool rm_TrxIsNotBlocked(Uint8 trx);
+Bool rm_CodecMatch(Uint16 gsmHandler, Uint8 codec);
+
+// Functions initializing connection tables
+void csu_TblInitGsmSrcPort(void);
+void csu_TblInitRtpSrcPort(void);
+void csu_TblInitGsmSnkPort(void);
+void csu_TblInitRtpSnkPort(void);
+void csu_TblInitAnnSrcPort(void);
+void csu_TblInitAll(void);
+
+// Functions handling connection managment
+T_CSU_RESULT csu_AddToSrcPortList(T_CSU_PORT_LIST *src, Uint8 type, Uint16 pidx);
+T_CSU_RESULT csu_AddToSnkPortList(T_CSU_PORT_LIST *snk, Uint8 type, Uint16 pidx);
+T_CSU_RESULT csu_FindSrcPortPIdx(T_CSU_PORT_ID *src, Uint8 *type, Uint16 *pidx);
+T_CSU_RESULT csu_FindSnkPortPIdx(T_CSU_PORT_ID *snk, Uint8 *type, Uint16 *pidx);
+T_CSU_RESULT csu_CheckSrcCapable(Uint8 s_type,Uint16 s_pidx, Uint8 d_type, Uint16 d_pidx);
+T_CSU_RESULT csu_CheckSnkCapable(Uint8 d_type,Uint16 d_pidx, Uint8 s_type, Uint16 s_pidx);
+T_CSU_RESULT csu_ConnSrcPort(Uint8 s_type, Uint16 s_pidx, Uint8 d_type, Uint16 d_pidx, T_CSU_PORT_ID *port_id);
+T_CSU_RESULT csu_ConnSnkPort(Uint8 d_type, Uint16 d_pidx, Uint8 s_type, Uint16 s_pidx, T_CSU_PORT_ID *port_id);
+T_CSU_RESULT csu_CheckSrcConn(Uint8 s_type, Uint16 s_pidx, Uint8 d_type, Uint16 d_pidx);
+T_CSU_RESULT csu_CheckSnkConn(Uint8 d_type, Uint16 d_pidx, Uint8 s_type, Uint16 s_pidx);
+T_CSU_RESULT csu_BreakSrcConn(Uint8 s_type, Uint16 s_pidx, Uint8 d_type, Uint16 d_pidx);
+T_CSU_RESULT csu_BreakSnkConn(Uint8 d_type, Uint16 d_pidx, Uint8 s_type, Uint16 s_pidx);
+
+// Functions handling port registration
+T_CSU_RESULT csu_DoSrcPortReg(T_CSU_SRC_PORT *src);
+T_CSU_RESULT csu_DoSnkPortReg(T_CSU_SNK_PORT *snk);
+T_CSU_RESULT csu_DoSrcPortUnreg(T_CSU_SRC_PORT *src);
+T_CSU_RESULT csu_DoSnkPortUnreg(T_CSU_SNK_PORT *snk);
+T_CSU_RESULT_REG csu_RegAllGsmSrcPort(void);
+T_CSU_RESULT_REG csu_RegAllGsmSnkPort(void);
+T_CSU_RESULT_REG csu_RegAllAnnSrcPort(void);
+
+
+// Functions handling connection tables
+void csu_TblInitGsmSrcPort(void);
+void csu_TblInitRtpSrcPort(void);
+void csu_TblInitGsmSnkPort(void);
+void csu_TblInitRtpSnkPort(void);
+void csu_TblInitAnnSrcPort(void);
+
+// Functions interfacing with old-csu environment for new csu moudule test purpose
+void csu_Init(void);
+Int32 setRtpTchConnection( Uint8 trx, Uint8 slot, HRTPSESSION rtpHandler );
+Int32 clrConnectionByTrxSlot( Uint8 trx, Uint8 slot );
+void csu_ReadSpeechFromFile(int);
+void csu_RecdSpeechToBuffer(Uint8 *buf);
+void csu_LoopbackSpeechToSrcSelf(T_CSU_PORT_ID *src, Uint8 *buf);
+
+// Functions handling semaphore
+void csu_CreateSemaphore(void);
+void csu_TakeSemaphore(void);
+void csu_GiveSemaphore(void);
+
+#endif /*__CSU_PROTO_H__*/
diff --git a/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_table.h b/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_table.h
new file mode 100644
index 0000000..792feda
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_table.h
@@ -0,0 +1,108 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+
+#ifndef __CSU_TABLE_H__
+#define __CSU_TABLE_H__
+
+#include "csu_head.h"
+
+typedef struct {
+ Uint16 pidx;
+ Uint8 type;
+ Uint8 ldty; // Payload type to this peer
+ Uint8 term; // Term type of connection peer
+ Uint8 mark; // Indication of a speech start
+ Uint8 head; // Head pointer of jitter buffer
+ Uint8 rear; // Rear pointer of jitter buffer
+ Uint8 seqc; // Out of sequence counting
+ Uint16 seqn;
+ Uint32 rtim;
+ Uint32 ltim;
+ Uint32 tick; // Representing sampling rate
+ Uint32 dlNg; // For downlink watch purpose
+ Uint32 dlNr; // For uplink watch purpose
+ Uint8 jitc;
+ Uint8 start;
+ Uint8 jbuf[CSU_JBUF_LEN];
+ Uint32 ppos; //Current pos of embedded announcement to play
+ T_CNI_RIL3_SPEECH_VERSION speech_version;
+} T_CSU_SRC_PEER;
+
+typedef struct {
+ Uint16 pidx;
+ Uint8 type;
+ Uint8 ldty; // Payload type to this peer
+ Uint8 term; // Term type of connection peer
+ Uint8 mark; // Indication of a speech start
+ Uint8 head; // Head pointer of jitter buffer
+ Uint8 rear; // Rear pointer of jitter buffer
+ Uint8 seqc; // Out of sequence counting
+ Uint16 seqn;
+ Uint32 rtim;
+ Uint32 ltim;
+ Uint32 tick; // Representing sampling rate
+ Uint32 dlNg; // For downlink watch purpose
+ Uint32 dlNr; // For uplink watch purpose
+ Uint8 jitc;
+ Uint8 start;
+ Uint8 jbuf[CSU_JBUF_LEN];
+} T_CSU_SNK_PEER;
+
+typedef struct {
+ Uint8 state;
+ Uint8 resvd;
+ Uint8 count;
+ Uint8 type;
+ Uint8 limit;
+ Uint8 test;
+ Uint8 prnt;
+ Uint16 seqc; // Out of sequence counting
+ Uint16 seqn;
+ Uint32 wcnt;
+ Uint32 ppos; //Current pos of recorded speech to play
+ Uint32 lpts; //loopback time stamp used in rtpParam
+ Uint32 nopr;
+ Uint32 alen;
+ union {
+ T_CNI_IRT_ID gsmHandler;
+ HJCRTPSESSION rtpHandler;
+ T_CSU_ANN_ID annHandler; //Annoucement port handler
+ };
+ T_CNI_IRT_ID entryId; //For housekeeping purpose only right now
+ T_CSU_SRC_PEER peer[CSU_SRC_CONN_MAX];
+
+} T_CSU_SRC_PORT;
+
+typedef struct {
+ Uint8 state;
+ Uint8 resvd;
+ Uint8 count;
+ Uint8 type;
+ Uint8 limit;
+ Uint8 test;
+ Uint8 prnt;
+ Uint16 seqc; // Out of sequence counting
+ Uint16 seqn;
+ Uint32 wcnt;
+ Uint32 ppos; //Current pos of recorded speech to play
+ Uint32 lpts; //loopback time stamp used in rtpParam
+ Uint32 nopr;
+
+ union {
+ T_CNI_IRT_ID gsmHandler;
+ HJCRTPSESSION rtpHandler;
+ T_CSU_ANN_ID annHandler; //Annoucement port handler
+ };
+ T_CNI_IRT_ID entryId; //For housekeeping purpose only right now
+ T_CSU_SNK_PEER peer[CSU_SNK_CONN_MAX];
+ T_CNI_RIL3_SPEECH_VERSION speech_version;
+
+} T_CSU_SNK_PORT;
+
+#endif /*__CSU_TABLE_CPP__*/
diff --git a/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_types.h b/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_types.h
new file mode 100644
index 0000000..70c59fc
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/CsuNew/csu_types.h
@@ -0,0 +1,23 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __CSU_TYPES_H__
+#define __CSU_TYPES_H__
+
+#include "csu_const.h"
+
+typedef char Int8 ;
+typedef short Int16;
+typedef long Int32;
+typedef unsigned char Uint8;
+typedef unsigned short Uint16;
+typedef unsigned long Uint32;
+typedef unsigned char Bool;
+#endif /* __CSU_TYPES_H__ */
+
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/Mch/MCHDefs.h b/data/mnet/GP10/Host/Common_To_Host/Mch/MCHDefs.h
new file mode 100644
index 0000000..af02965
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/Mch/MCHDefs.h
@@ -0,0 +1,84 @@
+#ifndef MCHDefs_H
+#define MCHDefs_H
+
+/* *******************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/* *******************************************************************/
+
+/* *******************************************************************/
+
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : MCHDefs.h */
+/* Author(s) : Lou Travaglione */
+/* Create Date : 6/16/00 */
+/* Description : */
+
+/* *******************************************************************/
+
+#define MCH_MAX_COMMAND_LINE_LEN 256
+#define MCH_MAX_COMMAND_LEN 80
+#define MAX_DIAGNOSTIC_MSG 256
+
+/* Valid functions codes recognized by the maintenance command handler. */
+typedef enum {
+ MCH_NETWORK_REQ = 0x55550000,
+ MCH_TERMINAL_REQ,
+ MCH_DELETE_DIAGNOSTIC,
+ MCH_DIAG_SPECIFIC_MSG
+} MCHFuncType;
+
+
+/* These are the diagnostic test messages. These are processed in the */
+/* DiagnosticMsgLoop function. If a derived diagnostic wants to process additional */
+/* messages of its own it should define the function codes here. NOTE: DO NOT */
+/* SHARE FUNCTION IDS BETWEEN DIAGNOSTICS EXCEPT FOR COMMON FUNCTIONS!!!!! */
+enum DIAG_TEST_MSGS {DIAG_TEST_STOP_TEST = 0x000, /* Common function ids */
+ DIAG_TEST_INTERNAL_STOP_TEST,
+
+ CDC_DIAG_FUNC_IDS = 0x100,
+ I2C_LOOPBACK_CONTINUE,
+ DSP_MEM_TEST_CONTINUE,
+
+ DSP_DIAG_FUNC_IDS = 0x200,
+ DIAG_MS_REPORT,
+ DIAG_HO_PN_REPORT,
+ DIAG_HO_CAND_REPORT,
+ DIAG_DL_REPORT,
+ DIAG_DSP_ECHO_MSG,
+ HPI_ECHO_TEST_CONTINUE,
+ DSP_TONE_GENERATE_RSP,
+ DSP_TONE_MEASURE_RSP,
+ DSP_BBLB_BOOTUP_RSP,
+ DSP_EXTMEM_BOOTUP_RSP,
+ DSP_EXTMEM_TEST_RSP,
+ DSP_EXTMEM_ERROR_RSP,
+ DIAG_IF_REPORT,
+ DIAG_GPRS_MS_REPORT,
+
+ RF_DIAG_FUNC_IDS = 0x300,
+
+ CLK_DIAG_FUNC_IDS = 0x400,
+
+ GPS_DIAG_FUNC_IDS = 0x500,
+
+ SYSTEM_DIAG_FUNC_IDS = 0x600,
+ NETWORK_TEST_CONTINUE
+ };
+
+
+
+
+
+typedef struct
+{
+ int func;
+ int msgLen;
+ char msgBody[MAX_DIAGNOSTIC_MSG];
+} DiagnosticMsgType;
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Common_To_Host/Mch/MCHIntf.h b/data/mnet/GP10/Host/Common_To_Host/Mch/MCHIntf.h
new file mode 100644
index 0000000..191f985
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/Mch/MCHIntf.h
@@ -0,0 +1,52 @@
+#ifndef MCHIntf_H
+#define MCHIntf_H
+
+/* ******************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/* ******************************************************************/
+
+/* *******************************************************************/
+
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : MCHIntf.h */
+/* Author(s) : Tim Olson */
+/* Create Date : 6/29/99 */
+/* Description : */
+
+/* *******************************************************************/
+
+#include "Mch/MCHDefs.h"
+
+/* Delete diagnostic message sent by a diagnostic which has terminated. */
+class Diagnostic;
+typedef struct {
+ Diagnostic *diag;
+} DeleteDiagMsgType;
+
+typedef struct {
+ MCHFuncType func;
+ union {
+ char commLine[MCH_MAX_COMMAND_LINE_LEN];
+ DeleteDiagMsgType delDiagMsg;
+ DiagnosticMsgType diagMsg;
+ };
+} MCHMessageType;
+
+
+/* Indicate what was the source of the maintenance request. */
+typedef enum {
+ NETWORK_REQ,
+ TERMINAL_REQ
+} ReqSourceType;
+
+extern void DiagSendMsg(char *msg, int msgLen, int func);
+extern void MaintCmdTcpServer(char *commLine, short size, unsigned long clientId);
+
+
+
+
+#endif /* MCHIntf_H */
diff --git a/data/mnet/GP10/Host/Common_To_Host/Mch/post.h b/data/mnet/GP10/Host/Common_To_Host/Mch/post.h
new file mode 100644
index 0000000..bea019b
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/Mch/post.h
@@ -0,0 +1,43 @@
+#ifndef POST_H
+#define POST_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : post.h
+// Author(s) : Tim Olson
+// Create Date : 7/26/99
+// Description :
+//
+// *******************************************************************
+
+
+//********************************************************************
+// Power on tests will execute prior to any application code being
+// loaded or exectued. The following functions may be called to
+// determine the outcome of a particular power on test.
+//
+// A return value of "1" means the test failed.
+//********************************************************************
+extern bool postAllTestsOkay();
+extern bool postMpcSramOkay();
+extern bool postDsp0IntDataRamOkay();
+extern bool postDsp0IntProgRamOkay();
+extern bool postDsp0ExtRamOkay();
+extern bool postDsp1IntDataRamOkay();
+extern bool postDsp1IntProgRamOkay();
+extern bool postDsp1ExtRamOkay();
+extern bool postFPGA0Okay();
+extern bool postFPGA1Okay();
+extern bool postI2COkay();
+
+
+#endif // POST_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/Pm/pm_class.h b/data/mnet/GP10/Host/Common_To_Host/Pm/pm_class.h
new file mode 100644
index 0000000..91d6a19
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/Pm/pm_class.h
@@ -0,0 +1,111 @@
+#ifndef __PMCLASS_H__
+#define __PMCLASS_H__
+
+#include "pm/pm_common.h"
+
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : pm_class.h
+// Author(s) : MindTree
+// Create Date : 5/15/01
+// Description : PM GP10 Specifoc Implementation
+//
+// *******************************************************************
+/*
+ * The PM_CellMeasurmentPackage class declaration
+ */
+class PM_CellMeasurmentPackage
+{ /* {viperCellGsmMib 10} */
+public:
+ PM_StatisticCounter meanPCHAGCHQueueLength; /* {cellMeasurmentPackage 1} */
+ PM_SimpleCounter attTransOfPagingMessagesThePCH; /* {cellMeasurmentPackage 2} */
+ PM_SimpleCounter unsuccTransOfPagingMessagesThePCH; /* {cellMeasurmentPackage 3} */
+ PM_SimpleCounter attImmediateAssingProcs; /* {cellMeasurmentPackage 4} */
+ PM_SimpleCounter succImmediateAssingProcs; /* {cellMeasurmentPackage 5} */
+ PM_PerCauseCounter attImmediateAssingProcsPerCauseTable; /* {cellMeasurmentPackage 6} */
+ PM_PerCauseCounter succImmediateAssingProcsPerCauseTable; /* {cellMeasurmentPackage 7} */
+ PM_SimpleCounter nbrOfPagesDiscardedFromPCHQueue; /* {cellMeasurmentPackage 8} */
+ PM_StatisticCounter meanDurationOfSuccPagingProcs; /* {cellMeasurmentPackage 9} */
+ PM_SimpleCounter nbrOfAvailableTCHs; /* {cellMeasurmentPackage 10} */
+ PM_StatisticCounter meanNbrOfBusyTCHs; /* {cellMeasurmentPackage 11} */
+ PM_SimpleCounter maxNbrOfBusyTCHs; /* {cellMeasurmentPackage 12} */
+ PM_StatisticCounter meanNbrOfIdleTCHsPerInterferenceBand; /* {cellMeasurmentPackage 13} */
+ PM_SimpleCounter attTCHSeizures; /* {cellMeasurmentPackage 14} */
+ PM_SimpleCounter succTCHSeizures; /* {cellMeasurmentPackage 15} */
+ PM_SimpleCounter attTCHSeizuresMeetingTCHBlockedState; /* {cellMeasurmentPackage 16} */
+ PM_AccumTimeCounter allAvailableTCHAllocatedTime; /* {cellMeasurmentPackage 17} */
+ PM_StatisticCounter meanTCHBusyTime; /* {cellMeasurmentPackage 18} */
+ PM_StatisticCounter meanTCHQueueLength; /* {cellMeasurmentPackage 19} */
+ PM_SimpleCounter nbrOfLostRadioLinksTCH; /* {cellMeasurmentPackage 20} */
+ PM_SimpleCounter nbrOfAvailableSDCCHs; /* {cellMeasurmentPackage 21} */
+ PM_StatisticCounter meanNbrOfBusySDCCHs; /* {cellMeasurmentPackage 22} */
+ PM_SimpleCounter maxNbrOfBusySDCCHs; /* {cellMeasurmentPackage 23} */
+ PM_SimpleCounter attSDCCHSeizuresMeetingSDCCHBlockedState; /* {cellMeasurmentPackage 24} */
+ PM_AccumTimeCounter allAvailableSDCCHAllocatedTime; /* {cellMeasurmentPackage 25} */
+ PM_StatisticCounter meanSDCCHQueueLength; /* {cellMeasurmentPackage 26} */
+ PM_SimpleCounter nbrOfLostRadioLinksSDCCH; /* {cellMeasurmentPackage 27} */
+ PM_SimpleCounter relativeTimeDLPowerControlAtMax; /* {cellMeasurmentPackage 28} */
+ PM_SimpleCounter relativeTimeULPowerControlAtMax; /* {cellMeasurmentPackage 29} */
+ PM_SimpleCounter succInternalHDOsIntraCell; /* {cellMeasurmentPackage 30} */
+ PM_SimpleCounter unsuccInternalHDOsIntraCell; /* {cellMeasurmentPackage 31} */
+};
+
+
+/*
+ * The PM_CallControlMeasurmentPackage class declaration
+ */
+struct PM_CallControlMeasurmentPackage
+{ /* {viperCellGsmMib 11} */
+public:
+ PM_SimpleCounter nbrOfClassMarkUpdates; /* {callControlMeasurmentPackage 1} */
+ PM_SimpleCounter attMobileOriginatingCalls; /* {callControlMeasurmentPackage 2} */
+ PM_SimpleCounter succMobileOriginatingCalls; /* {callControlMeasurmentPackage 3} */
+ PM_SimpleCounter ansMobileOriginatingCalls; /* {callControlMeasurmentPackage 4} */
+ PM_SimpleCounter attMobileTerminatingCalls; /* {callControlMeasurmentPackage 5} */
+ PM_SimpleCounter succMobileTerminatingCalls; /* {callControlMeasurmentPackage 6} */
+ PM_SimpleCounter ansMobileTerminatingCalls; /* {callControlMeasurmentPackage 7} */
+ PM_SimpleCounter attMobileEmergencyCalls; /* {callControlMeasurmentPackage 8} */
+ PM_SimpleCounter succMobileEmergencyCalls; /* {callControlMeasurmentPackage 9} */
+ PM_SimpleCounter ansMobileEmergencyCalls; /* {callControlMeasurmentPackage 10} */
+ PM_SimpleCounter attCipheringModeControlProcs; /* {callControlMeasurmentPackage 11} */
+ PM_SimpleCounter succCipheringModeControlProcs; /* {callControlMeasurmentPackage 12} */
+ PM_SimpleCounter attInterrogationOfHLRsForRouting; /* {callControlMeasurmentPackage 13} */
+ PM_SimpleCounter succInterrogationOfHLRsMSRNObtained; /* {callControlMeasurmentPackage 14} */
+ PM_SimpleCounter succInterrogationOfHLRsCallForwarding; /* {callControlMeasurmentPackage 15} */
+ PM_SimpleCounter attOpForMobileOriginatingPointToPointSMs; /* {callControlMeasurmentPackage 16} */
+ PM_SimpleCounter succOpForMobileOriginatingPointToPointSMs; /* {callControlMeasurmentPackage 17} */
+ PM_SimpleCounter attOpForMobileTerminatingPointToPointSMs; /* {callControlMeasurmentPackage 18} */
+ PM_SimpleCounter succOpForMobileTerminatingPointToPointSMs; /* {callControlMeasurmentPackage 19} */
+ PM_StatisticCounter meanTimeToCallSetupService; /* {callControlMeasurmentPackage 20} */
+ PM_StatisticCounter meanTimeToLocationUpdateService; /* {callControlMeasurmentPackage 21} */
+ PM_SimpleCounter transSubIdentifiedWithIMSI; /* {callControlMeasurmentPackage 22} */
+ PM_SimpleCounter imsiDetachProcs; /* {callControlMeasurmentPackage 23} */
+ PM_SimpleCounter imsiAttachProcs; /* {callControlMeasurmentPackage 24} */
+ PM_SimpleCounter attIncomingInterMSCHDOs; /* {callControlMeasurmentPackage 25} */
+ PM_SimpleCounter succIncomingInterMSCHDOs; /* {callControlMeasurmentPackage 26} */
+ PM_SimpleCounter attOutgoingInterMSCHDOs; /* {callControlMeasurmentPackage 27} */
+ PM_SimpleCounter succOutgoingInterMSCHDOs; /* {callControlMeasurmentPackage 28} */
+ PM_PerCauseCounter externalHDOsPerCauseTable; /* {callControlMeasurmentPackage 29} */
+ PM_SimpleCounter unsuccExternHDOsWithReconnectionPerMSC; /* {callControlMeasurmentPackage 30} */
+ PM_SimpleCounter unsuccExternHDOsWithLossOfConnectionPerMSC; /* {callControlMeasurmentPackage 31} */
+};
+
+void pm_update_mib(void);
+int pm_map_cause_to_index(CauseCode cause);
+CauseCode pm_map_index_to_cause(int index);
+char *pm_map_cause_code_to_str(CauseCode cause);
+
+extern PM_CellMeasurmentPackage PM_CellMeasurement;
+extern PM_CallControlMeasurmentPackage PM_CCMeasurement;
+
+
+#endif /* __PMCLASS_H__ */ \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Common_To_Host/Pm/pmdefs.h b/data/mnet/GP10/Host/Common_To_Host/Pm/pmdefs.h
new file mode 100644
index 0000000..888af36
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/Pm/pmdefs.h
@@ -0,0 +1,28 @@
+#ifndef __PMDEFS_H__
+#define __PMDEFS_H__
+//*******************************************************************
+//
+// (c) Copyright CISCO Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// File : PmDefs.h
+// Author(s) : Sandeep Agarwal
+// Create Date : 5/15/01
+// Description : Application (GP10) dependant settings
+//
+// *******************************************************************
+
+// Module ID specific for GP10 application
+#include "logging/VClogging.h"
+
+// specific value for GP10
+#define LAYER_ID PM_LAYER
+#define PM_MAX_CAUSES 25
+#define PM_CURRENT_MAX_CAUSES 8
+
+#endif //__PMDEFS_H__ \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Common_To_Host/Rlc_mac/RlcMacIntf.h b/data/mnet/GP10/Host/Common_To_Host/Rlc_mac/RlcMacIntf.h
new file mode 100644
index 0000000..675a1e3
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/Rlc_mac/RlcMacIntf.h
@@ -0,0 +1,104 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : RlcMacIntf.h
+// Author(s) : Tim Olson
+// Create Date : 11/14/2000
+// Description :
+//
+// *******************************************************************
+#ifndef __RLCMACINTF_H__
+#define __RLCMACINTF_H__
+
+#include "Os/JCMsgQueue.h"
+#include "ril3/ril3md.h"
+#include "rm/rml1_intf.h"
+#include "bssgp/bssgp_api.h"
+#include "vipermib.h"
+
+extern JCMsgQueue *RlcMacMsgQ;
+
+
+//----------------------------------------------------------------------------
+// RLC/MAC Interface Functions
+//----------------------------------------------------------------------------
+
+// Configuration API
+JC_STATUS RlcMacGrrReadyToGo(void);
+JC_STATUS RlcMacConfigureTS(int trx, int timeslot, int chanComb);
+
+// Admin state change API
+JC_STATUS RlcMacTSAdminState(int trx, int timeSlot, AdministrativeState state);
+JC_STATUS RlcMacTRXAdminState(int trx, AdministrativeState state);
+JC_STATUS RlcMacGPAdminState(AdministrativeState state);
+
+// Operational state change API
+JC_STATUS RlcMacTSOpState(int trx, int timeSlot, EnableDisable state);
+JC_STATUS RlcMacTRXOpState(int trx, EnableDisable state);
+JC_STATUS RlcMacGPOpState(EnableDisable state);
+
+
+// Msg processing API
+JC_STATUS RlcMacL1MsgInd(unsigned char *msg, int len);
+JC_STATUS RlcMacRmMdMsgInd(T_CNI_RIL3MD_RRM_MSG *msg);
+JC_STATUS RlcMacBssgpUnitDataRequest(BSSGP_DL_UNITDATA_MSG *msg);
+
+// Timers
+JC_STATUS RlcMacT3169Expiry(int tbfPointer);
+JC_STATUS RlcMacT3195Expiry(int tbfPointer);
+JC_STATUS RlcMacT3191Expiry(int tbfPointer);
+JC_STATUS RlcMacT3193Expiry(int tbfPointer);
+JC_STATUS RlcMacULActivityTimerExpiry(int tbfPointer);
+JC_STATUS RlcMacDLActivityTimerExpiry(int tbfPointer);
+
+//----------------------------------------------------------------------------
+// RLC/MAC Interface Structures
+//
+// All RLC/MAC messages are packed into these structures by the interface
+// functions and sent to the RLC/MAC task.
+//----------------------------------------------------------------------------
+
+
+typedef enum
+{
+ RLC_MAC_TIMESLOT,
+ RLC_MAC_TRX,
+ RLC_MAC_GP
+} RLC_MAC_OAM_OBJ;
+
+struct RlcMacL1MsgIndType
+{
+ int len;
+ unsigned char l1Msg[L1RM_MAXMSG_LEN];
+};
+
+struct RlcMacAdminStateChangeType
+{
+ AdministrativeState adminState;
+ RLC_MAC_OAM_OBJ oamObj;
+ int timeSlot;
+ int trx;
+};
+
+struct RlcMacOpStateChangeType
+{
+ EnableDisable opState;
+ RLC_MAC_OAM_OBJ oamObj;
+ int timeSlot;
+ int trx;
+};
+
+struct RlcMacTSConfiguration
+{
+ int trx;
+ int timeslot;
+ int chanComb;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Common.h b/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Common.h
new file mode 100644
index 0000000..6a7a606
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Common.h
@@ -0,0 +1,164 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+// PRODUCT: GSM 08.08 A Interface ED
+// PLATFORM: COMMON CORE
+// FILE: ($CC)/include/A_Handover_Common.h
+// RELEASE:
+//
+// FILE DESCRIPTION:
+//
+//
+// CHANGE HISTORY:
+//
+// Date Description
+// ---------- --------------------------------------------
+// 2001-05-18 First Incarnation
+//
+// =================================================================
+
+#ifndef A_HANDOVER_COMMON_H
+#define A_HANDOVER_COMMON_H
+
+#include "CC\A_Handover_Ie.h"
+#include "CC\A_Handover_Request_Msg.h"
+#include "CC\A_Handover_Request_Ack_Msg.h"
+#include "CC\A_Handover_Complete_Msg.h"
+#include "CC\A_Handover_Detect_Msg.h"
+#include "CC\A_Handover_Failure_Msg.h"
+
+
+#define A_CHECK_MANDATORY_IE_RETURN_CODE(resultCode) \
+ if(resultCode != A_RESULT_SUCCESS) \
+ { \
+ if(resultCode == A_IE_MISSING) \
+ return A_MANDATORY_IE_MISSING; \
+ else if(resultCode == A_MISC_IE_ERROR) \
+ return A_NON_SEMANTICAL_MANDATORY_IE_ERROR; \
+ else \
+ return resultCode;\
+ }
+
+
+#define A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode) \
+ if(resultCode != A_RESULT_SUCCESS) \
+ { \
+ if(resultCode == A_MISC_IE_ERROR) \
+ return A_NON_IMPERATIVE_MESSAGE_PART_ERROR; \
+ else \
+ return resultCode;\
+ }
+
+// 3.2.2.1
+typedef enum
+{
+// Assignment Messages
+ A_ASSIGNMENT_REQUEST_TYPE = 0x1,
+ A_ASSIGNMENT_COMPLETE_TYPE = 0x2,
+ A_ASSIGNMENT_FAILURE_TYPE = 0x3,
+// Handover Message
+ A_HANDOVER_REQUEST_TYPE = 0x10,
+ A_HANDOVER_REQUIRED_TYPE = 0x11,
+ A_HANDOVER_REQUEST_ACK_TYPE = 0x12,
+ A_HANDOVER_COMMAND_TYPE = 0x13,
+ A_HANDOVER_COMPLETE_TYPE = 0x14,
+ A_HANDOVER_SUCCEEDED_TYPE = 0x15,
+ A_HANDOVER_FAILURE_TYPE = 0x16,
+ A_HANDOVER_PERFORMED_TYPE = 0x17,
+ A_HANDOVER_CANDIDATE_ENQUIRE_TYPE = 0x18,
+ A_HANDOVER_CANDIDATE_RESPONSE_TYPE = 0x19,
+ A_HANDOVER_REQUIRED_REJECT_TYPE = 0x1A,
+ A_HANDOVER_DETECT_TYPE = 0x1B,
+// Release Messages
+ A_CLEAR_COMMAND_TYPE = 0x20,
+ A_CLEAR_COMPLETE_TYPE = 0x21,
+ A_CLEAR_REQUEST_TYPE = 0x22,
+ A_SAPI_N_REJECT_TYPE = 0x25,
+ A_CONFUSION_TYPE = 0x26,
+// Other Connection Related Messages
+ A_SUSPEND_TYPE = 0x28,
+ A_RESUME_TYPE = 0x29,
+// General Messages
+ A_RESET_TYPE = 0x30,
+ A_RESET_ACK_TYPE = 0x31,
+ A_OVERLOAD_TYPE = 0x32,
+ A_RESET_CIRCUIT_TYPE = 0x34,
+ A_RESET_CIRCUIT_ACK_TYPE = 0x35,
+ A_MSC_INVOKE_TRACE_TYPE = 0x36,
+ A_BSS_INVOKE_TRACE_TYPE = 0x37,
+// Terrestrial Resource Messages
+ A_BLOCK_TYPE = 0x40,
+ A_BLOCKING_ACK_TYPE = 0x41,
+ A_UNBLOCK_TYPE = 0x42,
+ A_UNBLOCK_ACK_TYPE = 0x43,
+ A_CIRCUIT_GROUP_BLOCK_TYPE = 0x44,
+ A_CIRCUIT_GROUP_BLOCKING_ACK_TYPE = 0x45,
+ A_CIRCUIT_GROUP_UNBLOCKING_TYPE = 0x46,
+ A_CIRCUIT_GROUP_UNBLOCKING_ACK_TYPE = 0x47,
+ A_UNEQUIPPED_CIRCUIT_TYPE = 0x48,
+ A_CHANGE_CIRCUIT_TYPE = 0x4E,
+ A_CHANGE_CIRCUIT_ACK_TYPE = 0x4F,
+// Radio Resource Messages
+ A_RESOURCE_REQUEST_TYPE = 0x50,
+ A_RESORUCE_INDICATION_TYPE = 0x51,
+ A_PAGING_TYPE = 0x52,
+ A_CIPHER_MODE_COMMAND_TYPE = 0x53,
+ A_CLASSMARK_UPDATE_TYPE = 0x54,
+ A_CIPHER_MODE_COMPLETE_TYPE = 0x55,
+ A_QUEUING_INDICATION_TYPE = 0x56,
+ A_COMPLETE_LAYER3_INFORMATION_TYPE = 0x57,
+ A_CLASSMARK_REQUEST_TYPE = 0x58,
+ A_CIPHER_MODE_REJECT_TYPE = 0x59,
+ A_LOAD_INDICATION_TYPE = 0x5A,
+// VGCS/VBS
+ A_VGCS_VBS_SETUP_TYPE = 0x4,
+ A_VGCS_VBS_SETUP_ACK_TYPE = 0x5,
+ A_VGCS_VBS_SETUP_REFUSE_TYPE = 0x6,
+ A_VGCS_VBS_ASSIGNMENT_REQUEST_TYPE = 0x7,
+ A_VGCS_VBS_ASSIGNMENT_RESULT_TYPE = 0x1C,
+ A_VGCS_VBS_ASSIGNMENT_FAILURE_TYPE = 0x1D,
+ A_VGCS_VBS_QUEUING_INDICATION_TYPE = 0x1E,
+ A_UPLINK_REQUEST_TYPE = 0x1F,
+ A_UPLINK_REQUEST_ACK_TYPE = 0x27,
+ A_UPLINK_REQUEST_CONFIRMATION_TYPE = 0x49,
+ A_UPLINK_RELEASE_INDICATION_TYPE = 0x4A,
+ A_UPLINK_REJECT_COMMAND_TYPE = 0x4B,
+ A_UPLINK_RELEASE_COMMAND_TYPE = 0x4C,
+ A_UPLINK_SEIZED_COMMAND_TYPE = 0x4D,
+} A_IE_MESSAGE_TYPE;
+
+typedef struct
+{
+ A_Ie_Message_Type_t msgType;
+} AIF_Header_t;
+
+#define AIF_MSG_LENGTH 251
+typedef struct
+{
+ unsigned short msgLength;
+ unsigned char buffer[AIF_MSG_LENGTH];
+} T_AIF_MessageUnit;
+
+typedef union
+{
+ A_Ie_Message_Type_t msgType; //ext-HO <xxu:06-08-01>
+ AIF_Header_t header;
+ A_Handover_Request_t handoverRequest;
+ A_Handover_Request_Ack_t handoverRequestAck;
+ A_Handover_Complete_t handoverComplete;
+ A_Handover_Failure_t handoverFailure;
+ A_Handover_Detect_t handoverDetect;
+} T_AIF_MSG;
+
+extern A_Result_t
+AIF_Encode(
+ T_AIF_MSG *, T_AIF_MessageUnit *);
+
+extern A_Result_t
+AIF_Decode(
+ T_AIF_MessageUnit *, T_AIF_MSG *);
+
+#endif // A_HANDOVER_COMMON_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Complete_Msg.h b/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Complete_Msg.h
new file mode 100644
index 0000000..29efb12
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Complete_Msg.h
@@ -0,0 +1,56 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2001
+// All Rights Reserved
+//
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : ($CC)/src/A_Handover_Complete_Msg.h
+// Author(s) : Tai Yu
+// Description :
+//
+// FILE DESCRIPTION:
+//
+//
+// CHANGE HISTORY:
+//
+// Date Description
+// ---------- --------------------------------------------
+// 2001-05-15 First Incarnation
+//
+// =================================================================
+
+#ifndef A_HANDOVER_COMPLETE_MSG_H
+#define A_HANDOVER_COMPLETE_MSG_H
+
+#include "CC\A_Handover_Ie.h"
+
+// 3.2.1.40 Handover Complete
+
+typedef struct {
+ // 3.2.2.1 Mandatory
+ A_Ie_Message_Type_t msgType;
+ // 3.2.2.22 Optional
+ A_Ie_RR_Cause_t rrCause;
+} A_Handover_Complete_t;
+
+#include "CC\A_Handover_Common.h"
+
+extern A_Result_t
+A_EncodeHandoverComplete(
+ A_Handover_Complete_t &handoverComplete,
+ unsigned char *buffer,
+ int &length
+ );
+
+extern A_Result_t
+A_DecodeHandoverComplete(
+ unsigned char *buffer,
+ int length,
+ A_Handover_Complete_t &handoverComplete
+ );
+
+#endif // A_HANDOVER_COMPLETE_MSG_H
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Detect_Msg.h b/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Detect_Msg.h
new file mode 100644
index 0000000..62e1973
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Detect_Msg.h
@@ -0,0 +1,55 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2001
+// All Rights Reserved
+//
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : ($CC)/src/A_Handover_Detect_Msg.h
+// Author(s) : Tai Yu
+// Description :
+//
+// FILE DESCRIPTION:
+//
+//
+// CHANGE HISTORY:
+//
+// Date Description
+// ---------- --------------------------------------------
+// 2001-05-15 First Incarnation
+//
+// =================================================================
+
+#ifndef A_HANDOVER_DETECT_MSG_H
+#define A_HANDOVER_DETECT_MSG_H
+
+#include "CC\A_Handover_Ie.h"
+
+
+// 3.2.1.40 Handover Detect
+
+typedef struct {
+ // 3.2.2.1 Mandatory
+ A_Ie_Message_Type_t msgType;
+} A_Handover_Detect_t;
+
+#include "CC\A_Handover_Common.h"
+
+extern A_Result_t
+A_EncodeHandoverDetect(
+ A_Handover_Detect_t &handoverDetect,
+ unsigned char *buffer,
+ int &length
+ );
+
+extern A_Result_t
+A_DecodeHandoverDetect(
+ unsigned char *buffer,
+ int length,
+ A_Handover_Detect_t &handoverDetect
+ );
+
+#endif // A_HANDOVER_DETECT_MSG_H
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Failure_Msg.h b/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Failure_Msg.h
new file mode 100644
index 0000000..0667ae2
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Failure_Msg.h
@@ -0,0 +1,62 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2001
+// All Rights Reserved
+//
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : ($CC)/src/A_Handover_Failure_Msg.h
+// Author(s) : Tai Yu
+// Description :
+//
+// FILE DESCRIPTION:
+//
+//
+// CHANGE HISTORY:
+//
+// Date Description
+// ---------- --------------------------------------------
+// 2001-05-15 First Incarnation
+//
+// =================================================================
+
+#ifndef A_HANDOVER_FAILURE_H
+#define A_HANDOVER_FAILURE_H
+
+#include "CC\A_Handover_Ie.h"
+
+// 3.2.1.16 Handover Failure
+
+typedef struct {
+ // 3.2.2.1 Mandatory
+ A_Ie_Message_Type_t msgType;
+ // 3.2.2.5 Mandatory
+ A_Ie_Cause_t cause;
+ // 3.2.2.22 Optional
+ A_Ie_RR_Cause_t rrCause;
+ // 3.2.2.45 Optional
+ A_Ie_Circuit_Pool_t circuitPool;
+ // 3.2.2.46 Optional
+ A_Ie_Circuit_Pool_List_t circuitPoolList;
+} A_Handover_Failure_t;
+
+#include "CC\A_Handover_Common.h"
+
+extern A_Result_t
+A_EncodeHandoverFailure(
+ A_Handover_Failure_t &handoverFailure,
+ unsigned char *buffer,
+ int &length
+ );
+
+extern A_Result_t
+A_DecodeHandoverFailure(
+ unsigned char *buffer,
+ int length,
+ A_Handover_Failure_t &handoverFailure
+ );
+
+#endif // A_HANDOVER_FAILURE_MSG_H
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Ie.h b/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Ie.h
new file mode 100644
index 0000000..ce83c4d
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Ie.h
@@ -0,0 +1,606 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2001
+// All Rights Reserved
+//
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : ($CC)/src/A_Handover_Ie.h
+// Author(s) : Tai Yu
+// Description :
+//
+// FILE DESCRIPTION:
+//
+//
+// CHANGE HISTORY:
+//
+// Date Description
+// ---------- --------------------------------------------
+// 2001-05-15 First Incarnation
+//
+// =================================================================
+
+#ifndef A_HANDOVER_IE_H
+#define A_HANDOVER_IE_H
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <vxworks.h>
+#include <string.h>
+
+typedef enum
+{
+ A_RESULT_SUCCESS = 0,
+ A_UNKNOWN_MESSAGE_TYPE = 1,
+ A_MANDATORY_IE_MISSING = 2,
+ A_INCORRECT_LENGTH = 3,
+ A_NON_SEMANTICAL_MANDATORY_IE_ERROR = 4,
+ A_NON_IMPERATIVE_MESSAGE_PART_ERROR = 5,
+ A_SKIP = 6,
+ A_NON_RRM_MESSAGE = 7,
+ A_NON_MM_MESSAGE = 8,
+ A_NON_CC_MESSAGE = 9,
+ A_NON_SS_MESSAGE = 10,
+ // below are used for internal encoding/decoding purpose
+ A_IE_MISSING = 11,
+ A_MISC_IE_ERROR = 12,
+ A_CONTINUE = 13
+} A_RESULT_t;
+
+typedef unsigned int A_Result_t;
+
+typedef unsigned char A_Ie_Message_Type_t;
+
+typedef enum
+{
+ A_CIRCUIT_IDENTITY_CODE_TYPE = 0x1, // 3.2.2.2
+ A_RESOURCE_AVAILABLE_TYPE = 0x3, // 3.2.2.4
+ A_CAUSE_TYPE = 0x4, // 3.2.2.5
+ A_CELL_IDENTIFIER_TYPE = 0x5, // 3.2.2.17
+ A_PRIORITY_TYPE = 0x6, // 3.2.2.18
+ A_LAYER3_HEADER_INFORMATION_TYPE = 0x7, // 3.2.2.9
+ A_IMSI_TYPE = 0x8, // 3.2.2.6
+ A_TMSI_TYPE = 0x9, // 3.2.2.7
+ A_ENCRYPTION_INFORMATION_TYPE = 0xA, // 3.2.2.10
+ A_CHANNEL_TYPE_TYPE = 0xB, // 3.2.2.11
+ A_PERIODITY_TYPE = 0xC, // 3.2.2.12
+ A_EXTENDED_RESOURCE_INDICATOR_TYPE = 0xD, // 3.2.2.13
+ A_NUMBER_OF_MSS_TYPE = 0xE, // 3.2.2.8
+ A_CLASSMARK_INFORMATION2_TYPE = 0x12, // 3.2.2.19
+ A_CLASSMARK_INFORMATION3_TYPE = 0x13, // 3.2.2.20
+ A_INTERFERENCE_BAND_TO_BE_USED_TYPE = 0x14, // 3.2.2.21
+ A_RR_CAUSE_TYPE = 0x15, // 3.2.2.22
+ A_LAYER3_INFORMATION_TYPE = 0x17, // 3.2.2.24
+ A_DLCI_TYPE = 0x18, // 3.2.2.25
+ A_DOWNLINK_DTX_FLAG_TYPE = 0x19, // 3.2.2.26
+ A_CELL_IDENTIFIER_LIST_TYPE = 0x1A, // 3.2.2.27
+ A_RESPONSE_REQUEST_TYPE = 0x1B, // 3.2.2.28
+ A_RESORUCE_INDICATION_METHOD_TYPE = 0x1C, // 3.2.2.29
+ A_CLASSMARK_INFORMATION1_TYPE = 0x1D, // 3.2.2.30
+ A_CIRCUIT_IDENTITY_CODE_LIST_TYPE = 0x1E, // 3.2.2.31
+ A_DIAGNOSTIC_TYPE = 0x1F, // 3.2.2.32
+ A_LAYER3_MESSAGE_CONTENTS_TYPE = 0x20, // 3.2.2.35
+ A_CHOSEN_CHANNEL_TYPE = 0x21, // 3.2.2.33
+ A_TOTAL_RESOURCE_ACCESSIBLE_TYPE = 0x22, // 3.2.2.14
+ A_CIPHER_RESPONSE_MODE_TYPE = 0x23, // 3.2.2.34
+ A_CHANNEL_NEEDED_TYPE = 0x24, // 3.2.2.36
+ A_TRACE_TYPE_TYPE = 0x25, // 3.2.2.37
+ A_TRIGGERID_TYPE = 0x26, // 3.2.2.38
+ A_TRACE_REFERENCT_TYPE = 0x27, // 3.2.2.39
+ A_TRANSACTIONID_TYPE = 0x28, // 3.2.2.40
+ A_MOBILE_IDENTITY_TYPE = 0x29, // 3.2.2.41
+ A_OMCID_TYPE = 0x2A, // 3.2.2.42
+ A_FORWARD_INDICATOR_TYPE = 0x2B, // 3.2.2.43
+ A_CHOSEN_ENCRYPTION_ALGORITHM_TYPE = 0x2C, // 3.2.2.44
+ A_CIRCUIT_POOL_TYPE = 0x2D, // 3.2.2.45
+ A_CIRCUIT_POOL_LIST_TYPE = 0x2E, // 3.2.2.46
+ A_TIME_INDICATION_TYPE = 0x2F, // 3.2.2.47
+ A_RESOURCE_SITUATION_TYPE = 0x30, // 3.2.2.48
+ A_CURRENT_CHANNEL_TYPE1_TYPE = 0x31, // 3.2.2.49
+ A_QUEUEING_INDICATOR_TYPE = 0x32, // 3.2.2.50
+ A_SPEECH_VERSION_TYPE = 0x40, // 3.2.2.51
+ A_ASSIGNMENT_REQUIREMENT_TYPE = 0x33, // 3.2.2.52
+ A_TALKER_FLAG_TYPE = 0x35, // 3.2.2.54
+ A_CONNECTION_RELEASE_REQUESTED_TYPE = 0x36, // 3.2.2.3
+ A_GROUP_CALL_REFERENCE_TYPE = 0x37, // 3.2.2.55
+ A_EMLPPP_PRIORITY_TYPE = 0x38, // 3.2.2.56
+ A_CONFIGURATION_EVOLUTION_INDICATION = 0x39, // 3.2.2.57
+ A_OLD_BSS_TO_NEW_BSS_INFORMATION_TYPE = 0x3A // 3.2.2.59
+} A_ELEMENT_IDENTIFIER_TYPE;
+
+// 3.2.2.2
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned short pcmMultiplex:11;
+ unsigned short timeslot:5;
+} A_Ie_Circuit_Identity_Code_t;
+
+// 3.2.2.5
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char cause;
+ unsigned char cause2;
+} A_Ie_Cause_t;
+
+// 3.2.2.10
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char permittedAlgorithm;
+ unsigned char key[8];
+} A_Ie_Encryption_Information_t;
+
+// 3.2.2.11
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char speechDataIndicator;
+ unsigned char channelRateAndType;
+ unsigned char permittedIndicator[8];
+} A_Ie_Channel_Type_t;
+
+// 3.2.2.17
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char cellIdDescriminator;
+ unsigned char mcc[3];
+ unsigned char mnc[3];
+ unsigned short lac;
+ unsigned short ci;
+} A_Ie_Cell_Identifier_t;
+
+// 3.2.2.18
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char priority;
+} A_Ie_Priority_t;
+
+// 3.2.2.9
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char protocolDisc;
+ unsigned char transactionID;
+} A_Ie_Layer3_Header_Information_t;
+
+// 3.2.2.19
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char classmark[3];
+} A_Ie_Classmark_Information2_t;
+
+// 3.2.2.20
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char classmark[12];
+} A_Ie_Classmark_Information3_t;
+
+// 3.2.2.21
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char bandToBeUsed;
+} A_Ie_Interference_Band_To_Be_Used_t;
+
+// 3.2.2.22
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char rrCause;
+} A_Ie_RR_Cause_t;
+
+// 3.2.2.24
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char layer3Info[256];
+} A_Ie_Layer3_Information_t;
+
+// 3.2.2.26
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char downlinkDTXFlag;
+} A_Ie_Downlink_DTX_Flag_t;
+
+// 3.2.2.30 (One of Information1 or Information2)
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char classmark;
+} A_Ie_Classmark_Information1_t;
+
+// 3.2.2.33
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char channelMode:4;
+ unsigned char channel:4;
+} A_Ie_Chosen_Channel_t;
+
+// 3.2.2.44
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char algorithmId;
+} A_Ie_Chosen_Encrypt_Algorithm_t;
+
+// 3.2.2.45
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char circuitPoolNumber;
+} A_Ie_Circuit_Pool_t;
+
+// 3.2.2.46
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char circuitPoolList[32];
+} A_Ie_Circuit_Pool_List_t;
+
+// 3.2.2.49
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char channelMode:4;
+ unsigned char channel:4;
+} A_Ie_Current_Channel_Type1_t;
+
+// 3.2.2.51
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char speechVersionId;
+} A_Ie_Speech_Version_t;
+
+// 3.2.2.54
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+} A_Ie_Talker_Flag_t;
+
+// 3.2.2.55
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char groupDesc[4];
+} A_Ie_Group_Call_Reference_t;
+
+// 3.2.2.57
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char SMI;
+} A_Ie_Config_Evolution_Indication_t;
+
+// 3.2.2.59
+typedef struct {
+ unsigned char ie_present;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char oldBssToNewBssIe[256];
+} A_Ie_Old_BSS_To_New_BSS_Info_t;
+
+
+extern A_Result_t
+A_EncodeMessageType(
+ A_Ie_Message_Type_t messageType,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeMessageType(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Message_Type_t &messageType);
+
+extern A_Result_t
+A_EncodeCircuitIdentityCode(
+ A_Ie_Circuit_Identity_Code_t &cirIdenCode,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeCircuitIdentityCode(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Circuit_Identity_Code_t &cirIdenCode);
+
+extern A_Result_t
+A_EncodeCause(
+ A_Ie_Cause_t &cause,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeCause(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Cause_t &cause);
+
+extern A_Result_t
+A_EncodeEncryptInformation(
+ A_Ie_Encryption_Information_t &encryptInfo,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeEncryptInformation(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Encryption_Information_t &encryptInfo);
+
+extern A_Result_t
+A_EncodeChannelType(
+ A_Ie_Channel_Type_t &channelType,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeChannelType(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Channel_Type_t &channelType);
+
+extern A_Result_t
+A_EncodeCellIdentifier(
+ A_Ie_Cell_Identifier_t &cellIdentifier,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeCellIdentifier(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Cell_Identifier_t &cellIdentifier);
+
+extern A_Result_t
+A_EncodePriority(
+ A_Ie_Priority_t &priority,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodePriority(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Priority_t &priority);
+
+extern A_Result_t
+A_EncodeLayer3HeaderInformation(
+ A_Ie_Layer3_Header_Information_t &layer3HeaderInfo,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeLayer3HeaderInformation(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Layer3_Header_Information_t &layer3HeaderInfo);
+
+extern A_Result_t
+A_EncodeClassmarkInformation2(
+ A_Ie_Classmark_Information2_t &classmarkInfo2,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeClassmarkInformation2(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Classmark_Information2_t &classmarkInfo2);
+
+extern A_Result_t
+A_EncodeClassmarkInformation3(
+ A_Ie_Classmark_Information3_t &classmarkInfo3,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeClassmarkInformation3(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Classmark_Information3_t &classmarkInfo3);
+
+extern A_Result_t
+A_EncodeInterferenceBandToBeUsed(
+ A_Ie_Interference_Band_To_Be_Used_t &interferenceBandToBeUsed,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeInterferenceBandToBeUsed(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Interference_Band_To_Be_Used_t &interferenceBandToBeUsed);
+
+extern A_Result_t
+A_EncodeRRCause(
+ A_Ie_RR_Cause_t &rrCause,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeRRCause(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_RR_Cause_t &rrCause);
+
+extern A_Result_t
+A_EncodeLayer3Information(
+ A_Ie_Layer3_Information_t &layer3Info,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeLayer3Information(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Layer3_Information_t &layer3Info);
+
+extern A_Result_t
+A_EncodeDownlinkDTXFlag(
+ A_Ie_Downlink_DTX_Flag_t &downlinkDTXFlag,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeDownlinkDTXFlag(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Downlink_DTX_Flag_t &downlinkDTXFlag);
+
+extern A_Result_t
+A_EncodeClassmarkInformation1(
+ A_Ie_Classmark_Information1_t &classmarkInfo1,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeClassmarkInformation1(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Classmark_Information1_t &classmarkInfo1);
+
+extern A_Result_t
+A_EncodeChosenChannel(
+ A_Ie_Chosen_Channel_t &chosenChannel,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeChosenChannel(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Chosen_Channel_t &chosenChannel);
+
+extern A_Result_t
+A_EncodeChosenEncryptAlorithm(
+ A_Ie_Chosen_Encrypt_Algorithm_t &chosenAlgorithm,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeChosenEncryptAlorithm(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Chosen_Encrypt_Algorithm_t &chosenAlgorithm);
+
+extern A_Result_t
+A_EncodeCircuitPool(
+ A_Ie_Circuit_Pool_t &circuitPool,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeCircuitPool(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Circuit_Pool_t &circuitPool);
+
+extern A_Result_t
+A_EncodeCircuitPoolList(
+ A_Ie_Circuit_Pool_List_t &circuitPoolList,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeCircuitPoolList(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Circuit_Pool_List_t &circuitPoolList);
+
+extern A_Result_t
+A_EncodeCurrentChannelType1(
+ A_Ie_Current_Channel_Type1_t &currentChannelType,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeCurrentChannelType1(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Current_Channel_Type1_t &currentChannelType);
+
+extern A_Result_t
+A_EncodeSpeechVersion(
+ A_Ie_Speech_Version_t &speechVersion,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeSpeechVersion(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Speech_Version_t &speechVersion);
+
+extern A_Result_t
+A_EncodeTalkerFlag(
+ A_Ie_Talker_Flag_t &talkerFlag,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeTalkerFlag(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Talker_Flag_t &talkerFlag);
+
+extern A_Result_t
+A_EncodeGroupCallReference(
+ A_Ie_Group_Call_Reference_t &groupCallReference,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeGroupCallReference(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Group_Call_Reference_t &groupCallReference);
+
+extern A_Result_t
+A_EncodeConfigEvolutionIndication(
+ A_Ie_Config_Evolution_Indication_t &configEvolutionIndication,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeConfigEvolutionIndication(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Config_Evolution_Indication_t &configEvolutionIndication);
+
+extern A_Result_t
+A_EncodeBssToNewBssInfo(
+ A_Ie_Old_BSS_To_New_BSS_Info_t &oldBssToNewBssInfo,
+ int &ieLength,
+ unsigned char *buffer);
+
+extern A_Result_t
+A_DecodeBssToNewBssInfo(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Old_BSS_To_New_BSS_Info_t &oldBssToNewBssInfo);
+
+#endif // A_HANDOVER_REQUEST_ACK_MSG_H
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Request_Ack_Msg.h b/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Request_Ack_Msg.h
new file mode 100644
index 0000000..98f85cf
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Request_Ack_Msg.h
@@ -0,0 +1,67 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2001
+// All Rights Reserved
+//
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : ($CC)/src/A_Handover_Request_Ack_Msg.h
+// Author(s) : Tai Yu
+// Description :
+//
+// FILE DESCRIPTION:
+//
+//
+// CHANGE HISTORY:
+//
+// Date Description
+// ---------- --------------------------------------------
+// 2001-05-15 First Incarnation
+//
+// =================================================================
+
+#ifndef A_HANDOVER_REQUEST_ACK_MSG_H
+#define A_HANDOVER_REQUEST_ACK_MSG_H
+
+#include "CC\A_Handover_Ie.h"
+
+// 3.2.1.10 Handover Request Acknowledge
+
+typedef struct {
+ // 3.2.2.1 Mandatory
+ A_Ie_Message_Type_t msgType;
+ // 3.2.2.24 Mandatory
+ A_Ie_Layer3_Information_t layer3Information;
+ // 3.2.2.33 Optional
+ A_Ie_Chosen_Channel_t chosenChannel;
+ // 3.2.2.44 Optional
+ A_Ie_Chosen_Encrypt_Algorithm_t chosenEncryptAlgorithm;
+ // 3.2.2.45 Optional
+ A_Ie_Circuit_Pool_t circuitPool;
+ // 3.2.2.51 Optional
+ A_Ie_Speech_Version_t speechVersionChosen;
+ // 3.2.2.2 Optional
+ A_Ie_Circuit_Identity_Code_t circuitIdentityCode;
+} A_Handover_Request_Ack_t;
+
+
+#include "CC\A_Handover_Common.h"
+
+extern A_Result_t
+A_EncodeHandoverRequestAck(
+ A_Handover_Request_Ack_t &handoverRequestAck,
+ unsigned char *buffer,
+ int &length
+ );
+
+extern A_Result_t
+A_DecodeHandoverRequestAck(
+ unsigned char *buffer,
+ int length,
+ A_Handover_Request_Ack_t &handoverRequestAck
+ );
+
+#endif // A_HANDOVER_REQUEST_ACK_MSG_H
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Request_Msg.h b/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Request_Msg.h
new file mode 100644
index 0000000..3a11bb6
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/A_Handover_Request_Msg.h
@@ -0,0 +1,91 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2001
+// All Rights Reserved
+//
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : ($CC)/src/A_Handover_Request_Msg.h
+// Author(s) : Tai Yu
+// Description :
+//
+// FILE DESCRIPTION:
+//
+//
+// CHANGE HISTORY:
+//
+// Date Description
+// ---------- --------------------------------------------
+// 2001-05-15 First Incarnation
+//
+// =================================================================
+
+#ifndef A_HANDOVER_REQUEST_MSG_H
+#define A_HANDOVER_REQUEST_MSG_H
+
+#include "CC\A_Handover_Ie.h"
+
+// 3.2.1.8 Handover Request
+
+typedef struct {
+ // 3.2.2.1 Mandatory
+ A_Ie_Message_Type_t msgType;
+ // 3.2.2.11 Mandatory
+ A_Ie_Channel_Type_t channelType;
+ // 3.2.2.10 Mandatory
+ A_Ie_Encryption_Information_t encryptionInformation;
+ // 3.2.2.30 Mandatory (One of Information1 or Information2)
+ A_Ie_Classmark_Information1_t classmarkInformation1;
+ // 3.2.2.19 Mandatory (One of Information1 or Information2)
+ A_Ie_Classmark_Information2_t classmarkInformation2;
+ // 3.2.2.17 Mandatory
+ A_Ie_Cell_Identifier_t cellIdentifierServing;
+ // 3.2.2.18 Optional
+ A_Ie_Priority_t priority;
+ // 3.2.2.2 Optional
+ A_Ie_Circuit_Identity_Code_t circuitIdentityCode;
+ // 3.2.2.26 Optional
+ A_Ie_Downlink_DTX_Flag_t downlinkDTXFlag;
+ // 3.2.2.17 Mandatory
+ A_Ie_Cell_Identifier_t cellIdentifierTarget;
+ // 3.2.2.21 Optional
+ A_Ie_Interference_Band_To_Be_Used_t interferenceBandToBeUsed;
+ // 3.2.2.5 Optional
+ A_Ie_Cause_t cause;
+ // 3.2.2.20 Optional
+ A_Ie_Classmark_Information3_t classmarkInformation3;
+ // 3.2.2.49 Optional
+ A_Ie_Current_Channel_Type1_t currentChannelType1;
+ // 3.2.2.51 Optional
+ A_Ie_Speech_Version_t speechVersionUsed;
+ // 3.2.2.55 Optional
+ A_Ie_Group_Call_Reference_t groupCallReference;
+ // 3.2.2.54 Optional
+ A_Ie_Talker_Flag_t talkerFlag;
+ // 3.2.2.57 Optional
+ A_Ie_Config_Evolution_Indication_t configEvolIndication;
+ // 3.2.2.44 Optional
+ A_Ie_Chosen_Encrypt_Algorithm_t chosenEncryptAlgorithmServing;
+ // 3.2.2.59 Optional
+ A_Ie_Old_BSS_To_New_BSS_Info_t oldBSSToNewBSSInfo;
+} A_Handover_Request_t;
+
+#include "CC\A_Handover_Common.h"
+
+extern A_Result_t
+A_EncodeHandoverRequest(
+ A_Handover_Request_t &handoverRequest,
+ unsigned char *buffer,
+ int &length
+ );
+
+extern A_Result_t
+A_DecodeHandoverRequest(
+ unsigned char *buffer,
+ int length,
+ A_Handover_Request_t &handoverRequest
+ );
+#endif // A_HANDOVER_REQUEST_MSG_H
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/CCH323Util.h b/data/mnet/GP10/Host/Common_To_Host/cc/CCH323Util.h
new file mode 100644
index 0000000..af3d86f
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/CCH323Util.h
@@ -0,0 +1,56 @@
+#ifndef CCH323Util_H
+#define CCH323Util_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCH23Util.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 02-01-98
+// Description : Utility functions to send/receive VOIP(H323) messages
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "JCC/JCCL3Msg.h"
+#include "CC/CCTypes.h"
+#include "CC/CCHalfCall.h"
+#include "CC/CallLeg.h"
+
+//ext-HO <chenj:06-06-11>
+#include "CC/HOCallLeg.h"
+
+//CDR <xxu:08-23-00>
+bool sendH323DisconnectMsg( IntraL3Msg_t *h323InMsg,
+ CdrRecCauseTerm_t cdrCause,
+ T_CNI_RIL3_CAUSE_VALUE ccCause );
+
+
+bool sendH323Msg(TwoPartyCallLeg *parent,
+ JCCEvent_t remoteEvent,
+ CCRemMsgData_t remMsgData);
+
+//ext-HO <chenj:06-06-11>
+bool sendH323MsgExtHo(HOCallLeg *parent,
+ JCCEvent_t remoteEvent,
+ CCRemMsgData_t remMsgData,
+ unsigned short callLegId);
+
+//ext-HO <xxu:06-01-01>
+bool sendH323DisconnectMsgExtHo( VOIP_CALL_HANDLE callHandle,
+ T_CNI_RIL3_CAUSE_VALUE ccCause );
+
+
+#endif // CCH323Util_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/CCHalfCall.h b/data/mnet/GP10/Host/Common_To_Host/cc/CCHalfCall.h
new file mode 100644
index 0000000..03a2c35
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/CCHalfCall.h
@@ -0,0 +1,394 @@
+#ifndef CCHalfCall_H
+#define CCHalfCall_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCHalfCall.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// included L3 Message header for messages from other Layer 3 modules (MM, RR)
+#include "JCC/JCCL3Msg.h"
+
+#include "JCC/JCCEvent.h"
+#include "JCC/JCCState.h"
+#include "JCC/JCCTimer.h"
+#include "JCC/JCCLog.h"
+
+#include "logging/vclogging.h"
+
+// included MD and IRT headers for messages from MS
+#include "ril3/ril3md.h"
+#include "ril3/ril3_cc_msg.h"
+
+#include "CC/CCTypes.h"
+
+//BCT <xxu:09-22-00>
+#include "csunew/csu_head.h"
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+class TwoPartyCallLeg;
+
+// *******************************************************************
+// Constant definitions.
+// *******************************************************************
+
+// 4.07 Transaction Identifier
+const UINT8 ORIG_OR_MASK = 0x08;
+const UINT8 TERM_AND_MASK = 0x07;
+
+const int MAX_GENERATED_EVENTS
+= (CC_MAKE_CONNECTION_REQ - CC_INTERNAL_GEN_EVENT_BASE + 1);
+
+const int MAX_CALL_STATES
+= (THC_ST_MM_CONN_REQ + 1);
+
+const int MAX_CALL_EXTERNAL_EVENTS
+= (THC_REMOTE_TERM_ADDRESS - CC_INTERNAL_CALL_EVENT_BASE + 1);
+
+const int MAX_CHANN_STATES
+= (RES_ST_REL_REQ + 1);
+
+const int MAX_CHANN_EXTERNAL_EVENTS
+= (CC_RESOURCE_ASSIGN_FAIL - CC_INTERNAL_CHANN_EVENT_BASE + 1);
+
+//typedefs
+
+class CCHalfCall
+{
+ public:
+
+ // Following covered in CCHalfCall.cpp
+
+ CCHalfCall();
+
+ virtual void cleanup(void);
+ void printData(JCCPrintStFn);
+
+ JCCEvent_t handleInvalidEvent(void);
+
+ JCCEvent_t handleMobProtocolProblem(void);
+
+ int handleMMMsg(IntraL3Msg_t *mmInMsg,
+ JCCEvent_t currEvent);
+ int handleRRMsg(IntraL3Msg_t *rrInMsg,
+ JCCEvent_t currEvent);
+
+ int handleMobMsg(T_CNI_RIL3CC_MSG *msInMsg,
+ T_CNI_RIL3_RESULT msDecodeResult,
+ T_CNI_RIL3_CAUSE_VALUE causeValue,
+ JCCEvent_t currEvent);
+
+ int handleTimeoutMsg(IntraL3Msg_t *ccInMsg);
+ int handleRemoteEvent(IntraL3Msg_t* h323InMsg, JCCEvent_t remoteEvent,
+ CCRemMsgData_t inRemMsg);
+
+ int smHandleEvent(void);
+ int smHandleFirstCallEvent(void);
+
+ virtual bool sendRemote(JCCEvent_t remoteEvent);
+
+ public:
+ // Remote Handlers in CCMobRemHnd.cpp
+
+ //BCT <xxu:09-22-00> BEGIN
+ JCCEvent_t handleBctNumberReqTimeout(void);
+ JCCEvent_t handleGetBctNumberNack(void);
+ JCCEvent_t handleBctUpdateHandles(void);
+ JCCEvent_t handleMobRemoteAlerting2nd(void);
+ JCCEvent_t handleMobRemoteChannSelected2nd(void);
+ JCCEvent_t handleMobRemoteAnswer2nd(void);
+ //BCT <xxu:09-22-00> END
+
+ JCCEvent_t handleMobRemoteDisconnect(void);
+ JCCEvent_t handleMobRemoteAbnormalRelCom(void);
+ JCCEvent_t handleMobRemoteAlerting(void);
+ JCCEvent_t handleMobRemoteAnswer(void);
+ JCCEvent_t handleMobRemoteCallProgress(void);
+ JCCEvent_t handleMobRemoteCallProgress1(void);
+ JCCEvent_t handleMobRemoteTermAddress(void);
+ JCCEvent_t handleMobRemoteH323ChannReady(void);
+
+ // External Mobile Handlers in CCMobExtHnd.cpp
+ JCCEvent_t handleMobAlerting(void);
+ JCCEvent_t handleMobCallProgress(void);
+ JCCEvent_t handleMobAnswer(void);
+ JCCEvent_t handleConnectAck(void);
+ JCCEvent_t handleMobTermAddress(void);
+ JCCEvent_t handleMobEmergencyOrigination(void);
+ JCCEvent_t handleDisconnectReq(void);
+ JCCEvent_t handleReleaseReq(void);
+ JCCEvent_t handleMobReleaseComplete(void);
+
+ //CAUSE<xxu:03-21-00> BEGIN
+ JCCEvent_t handleMobReleaseCompleteUtil(void);
+ //CAUSE<xxu:03-21-00> END
+
+ JCCEvent_t handleMobStatusInfo(void);
+ JCCEvent_t handleMobStatusEnquiry(void);
+
+ JCCEvent_t handleMobNoReply(void);
+
+ // Internal/Generated Event Handlers in CCMobIntHnd.cpp
+ JCCEvent_t handleNullEvent(void);
+
+ JCCEvent_t handleInvalidChannEvent(void);
+ JCCEvent_t handleChannAssignReq(void);
+ JCCEvent_t handleChannAssignComplt(void);
+ JCCEvent_t handleChannAssignFail(void);
+
+ JCCEvent_t handleConnReq(void);
+
+ //CH<xxu:Mod 12-13-99>
+ JCCEvent_t handleConnComplt(void);
+ JCCEvent_t handleConnFail(void);
+
+ JCCEvent_t handleDisconnectTimeout(void);
+ JCCEvent_t handleReleaseTimeout(void);
+
+ JCCEvent_t handleMobResRelease(void);
+
+ JCCEvent_t handleMMRelInd(void);
+ JCCEvent_t handleMMEstCnf(void);
+ JCCEvent_t handleMMEstRej(void);
+
+ // DTMF Handlers
+ JCCEvent_t handleStartDtmf(void);
+ JCCEvent_t handleStopDtmf(void);
+
+ //CH<xxu:11-10-99> Call Hold & Retrieve & Swap handlers
+ JCCEvent_t handleHoldAct();
+ JCCEvent_t handleHoldRej();
+ JCCEvent_t handleRetvAct();
+ JCCEvent_t handleRetvRej();
+ JCCEvent_t handleHoldReq();
+ JCCEvent_t handleRetvReq(); //CH<xxu:Mod 12-13-99>
+ JCCEvent_t handleSwapTimerExpiry();
+
+ // Chann Selection Handler
+ JCCEvent_t handleMobRemoteChannSelected(void);
+
+
+ private:
+ // Message Builders in CCBldMSMsg.cpp
+ void buildMSMsgCommon(void);
+
+ T_CNI_RIL3_RESULT buildMSMsg(T_CNI_LAPDM_L3MessageUnit
+ *msEncodedMsg);
+
+ T_CNI_RIL3_RESULT buildStartDtmfAck(T_CNI_LAPDM_L3MessageUnit
+ *msEncodedMsg);
+
+ T_CNI_RIL3_RESULT buildStartDtmfRej(T_CNI_LAPDM_L3MessageUnit
+ *msEncodedMsg);
+
+ T_CNI_RIL3_RESULT buildStopDtmfAck(T_CNI_LAPDM_L3MessageUnit
+ *msEncodedMsg);
+
+ T_CNI_RIL3_RESULT buildAlerting(T_CNI_LAPDM_L3MessageUnit
+ *msEncodedMsg);
+ T_CNI_RIL3_RESULT
+ buildProgress(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg);
+
+ T_CNI_RIL3_RESULT buildCallProceeding(T_CNI_LAPDM_L3MessageUnit
+ *msEncodedMsg);
+ T_CNI_RIL3_RESULT buildConnect(T_CNI_LAPDM_L3MessageUnit
+ *msEncodedMsg);
+ T_CNI_RIL3_RESULT buildConnectAck(T_CNI_LAPDM_L3MessageUnit
+ *msEncodedMsg);
+ T_CNI_RIL3_RESULT buildDisconnect(T_CNI_LAPDM_L3MessageUnit
+ *msEncodedMsg);
+ T_CNI_RIL3_RESULT buildReleaseComplete(T_CNI_LAPDM_L3MessageUnit
+ *msEncodedMsg);
+ T_CNI_RIL3_RESULT buildReleaseReq(T_CNI_LAPDM_L3MessageUnit
+ *msEncodedMsg);
+ T_CNI_RIL3_RESULT buildSetup(T_CNI_LAPDM_L3MessageUnit
+ *msEncodedMsg);
+ T_CNI_RIL3_RESULT buildStatusInfo(T_CNI_LAPDM_L3MessageUnit
+ *msEncodedMsg);
+
+ //CH<xxu:11-10-99>
+ T_CNI_RIL3_RESULT buildHoldAck(T_CNI_LAPDM_L3MessageUnit
+ *msEncodedMsg);
+ T_CNI_RIL3_RESULT buildHoldRej(T_CNI_LAPDM_L3MessageUnit
+ *msEncodedMsg);
+ T_CNI_RIL3_RESULT buildRetvAck(T_CNI_LAPDM_L3MessageUnit
+ *msEncodedMsg);
+ T_CNI_RIL3_RESULT buildRetvRej(T_CNI_LAPDM_L3MessageUnit
+ *msEncodedMsg);
+
+ // Other Class and data members start
+
+ protected:
+
+ virtual void initData(void);
+
+ // Save MS message data for use
+ //T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER
+ // cpn;
+ //T_CNI_RIL3_IE_CALLING_PARTY_BCD_NUMBER
+ // callingPartyNum;
+
+ short releaseCounter;
+
+ // For building data for remote events
+ CCRemMsgData_t remMsgData;
+
+ T_CNI_RIL3_RESULT msOutResult;
+ T_CNI_RIL3CC_MSG msOutMsg;
+
+ IntraL3Msg_t * mmInMsg;
+ IntraL3Msg_t * rrInMsg;
+ IntraL3Msg_t * h323InMsg;
+
+ public:
+
+ // Save MS message data for use
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER
+ cpn;
+ T_CNI_RIL3_IE_CALLING_PARTY_BCD_NUMBER
+ callingPartyNum;
+
+ //CAUSE<xxu:03-21-00> moved here from private
+ T_CNI_RIL3_CAUSE_VALUE voipReleaseCause_;
+
+ //BCT <xxu:09-23-00> BEGIN
+ AnnStates_t annState_;
+ T_CSU_PORT_ID annSrcPort_;
+ T_CSU_PORT_ID annSnkPort_;
+ //BCT <xxu:08-23-00> END
+
+ //CH<xxu:11-10-99>
+ ChStates_t chState_;
+ T_CNI_RIL3_CAUSE_VALUE chCause_;
+
+ JCCTimer *hcTimer; //CH<xxu:12-06-99>
+
+ HalfCallStates_t callState_ ;
+
+ ResStates_t channState_;
+
+ SpeechChann_t currSpeechCh_;
+
+ T_CNI_RIL3_SI_TI ti;
+
+ T_CNI_RIL3_IE_CAUSE rlsCause;
+
+ DbgOutput Dbg;
+
+ T_CNI_RIL3_FIELD_SPEECH_VERSION_INDICATOR bearCap1speechVersionInd_[3];
+
+ protected:
+ T_CNI_RIL3CC_MSG *msDecodedMsg;
+
+ TwoPartyCallLeg *parent;
+
+ JCCEvent_t currEvent;
+
+ bool isEmergencyCall;
+ private:
+ T_CNI_RIL3_RESULT msDecodeResult;
+
+ T_CNI_RIL3_IE_BEARER_CAPABILITY
+ bearerCap;
+
+
+ T_CNI_RIL3_IE_KEYPAD_FACILITY
+ currKeypadFacility_;
+
+ //CAUSE<xxu:03-21-00> moved to public
+ //MOBILE_CALL_DISCONNECT_CAUSE
+ //T_CNI_RIL3_CAUSE_VALUE
+ // voipReleaseCause_;
+
+ bool alertingSent_;
+ bool connectSent_;
+ bool progressSent_;
+
+ ULONG setupTime_;
+
+ private:
+
+ // hide the assignment, and copy ctor and other defaults as needed.
+
+ CCHalfCall (const CCHalfCall& rhs) ;
+
+ CCHalfCall& operator= (const CCHalfCall& rhs) ;
+
+ int operator==(const CCHalfCall& rhs) const ;
+
+};
+
+class CCOrigHalfCall : public CCHalfCall
+{
+ public:
+ //PR1378 <xxu:08-16-00>
+ CCOrigHalfCall(TwoPartyCallLeg *callLeg, JCCTimer *tclTimer);
+ void setupNewCall(T_CNI_RIL3_SI_TI ti = 0,
+ T_CNI_RIL3_CM_SERVICE_TYPE serviceRequested = CNI_RIL3_CM_SERVICE_TYPE_MO_CALL_OR_PACKET_MODE);
+
+ protected:
+ virtual void initData(void);
+
+ private:
+
+ // hide the assignment, and copy ctor and other defaults as needed.
+ CCOrigHalfCall();
+
+ CCOrigHalfCall (const CCOrigHalfCall& rhs) ;
+
+ CCOrigHalfCall& operator= (const CCOrigHalfCall& rhs) ;
+
+ int operator==(const CCOrigHalfCall& rhs) const ;
+
+};
+
+class CCTermHalfCall : public CCHalfCall
+{
+ public:
+ //PR1378 <xxu:08-16-00>
+ CCTermHalfCall(TwoPartyCallLeg *callLeg, JCCTimer *tclTimer);
+
+ protected:
+ virtual void initData(void);
+
+ private:
+
+ // hide the assignment, and copy ctor and other defaults as needed.
+ CCTermHalfCall();
+
+ CCTermHalfCall (const CCTermHalfCall& rhs) ;
+
+ CCTermHalfCall& operator= (const CCTermHalfCall& rhs) ;
+
+ int operator==(const CCTermHalfCall& rhs) const ;
+};
+
+// pointer to member type
+typedef JCCEvent_t (CCHalfCall::* HalfCallMsgHandler_t) ();
+
+extern HalfCallMsgHandler_t channStateHandler[MAX_CHANN_STATES][MAX_CHANN_EXTERNAL_EVENTS];
+extern HalfCallMsgHandler_t generatedEventHandler[MAX_GENERATED_EVENTS];
+extern HalfCallMsgHandler_t callStateHandler[MAX_CALL_STATES][MAX_CALL_EXTERNAL_EVENTS];
+
+#endif // CCHalfCall_H
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/CCHandover.h b/data/mnet/GP10/Host/Common_To_Host/cc/CCHandover.h
new file mode 100644
index 0000000..f74d28f
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/CCHandover.h
@@ -0,0 +1,641 @@
+#ifndef CCHandover_H
+#define CCHandover_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCHandover.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "csunew/csu_head.h"
+#include "JCC/JcVcToVc.h"
+#include "JCC/JCCEvent.h"
+#include "JCC/JCCState.h"
+#include "JCC/JCCL3Msg.h"
+#include "JCC/JCCLog.h"
+#include "CC/smqueue.h"
+
+// ext-HO <chenj: 05-29-01>
+#include "cc/A_Handover_Common.h"
+#include "voip/exchangeho.h"
+
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+class CCSessionHandler;
+
+const int MAX_HO_SRC_DOWNLINK_QUEUE_LENGTH
+= 5;
+
+const int MAX_HO_SRC_STATES
+= (HAND_ST_ANCH_EHO_COMPLT + 1); // ext-HO <chenj:06-13-01>
+
+const int MAX_HO_TRG_STATES
+= MAX_HO_SRC_STATES;
+
+const int MAX_HO_SRC_EVENTS
+= (HAND_END_HO - HAND_SRC_EVENT_BASE + 1); // ext-HO <chenj:06-13-01>
+
+const int MAX_HO_TRG_EVENTS
+= MAX_HO_SRC_EVENTS;
+
+
+//typedefs
+
+class CCHandover
+{
+ friend SmQueueMm;
+
+ public:
+
+ // Destructor
+ // ~CCHandover() ;
+
+ // Constructors
+ CCHandover(CCSessionHandler *, int, MSG_Q_ID);
+
+ // Operators
+
+ // primary behaviour methods
+ JCCEvent_t handleInvalidEvent(void);
+ JCCEvent_t handleNullEvent(void);
+ JCCEvent_t handleMMLateEstCnf(void);
+
+ JCCEvent_t handleInternalEvent(JCCEvent_t);
+
+ int handleMMMsg(IntraL3Msg_t *mmInMsg,
+ JCCEvent_t currEvent);
+ int handleRRMsg(IntraL3Msg_t *rrInMsg,
+ JCCEvent_t currEvent);
+ int handleVcCcMsg(InterVcMsg_t *vcCcInMsg);
+
+ //ext-HO <xxu:05-22-01>
+ int handleHoaCcMsg(InterHoaVcMsg_t *hoaCcInMsg);
+ int handleTimeoutMsg(IntraL3Msg_t *ccInMsg);
+ void classmarkFill( T_AIF_MSG *AIF_Msg );
+ void channelTypeFill( T_AIF_MSG *AIF_Msg );
+ void currentChannelTypeFill( T_AIF_MSG *AIF_Msg );
+ void encryptionInformationFill( T_AIF_MSG *AIF_Msg );
+ void currentEncryptionAlgorithmFill( T_AIF_MSG *AIF_Msg );
+ void populateAHandoverRequest(GlobalCellId_t *, GlobalCellId_t *);
+ int selectEncryption(void);
+ int selectChannelType(void);
+
+ // Handover Utility functions
+ void initData(void);
+ void printData(JCCPrintStFn fn);
+
+ bool isEqualGlobalCellId(const GlobalCellId_t *gCell1,
+ const GlobalCellId_t *gCell2);
+
+ void sendVcMsg(JcModuleId_t origModuleId,
+ JcModuleId_t destModuleId);
+
+ virtual void sendMMMsgToRemoteCC (IntraL3Msg_t *) = 0;
+
+ void emptyMMQueue (void);
+
+ // HO<xxu:02-02-00> send msg from MSC-A to MSC-B'
+ void sendVcMsgH3(JcModuleId_t origModuleId,
+ JcModuleId_t destModuleId);
+ //RETRY<xxu:05-01-00> BEGIN
+ int getNextHoCandidate(void);
+ //RETRY<xxu:05-01-00> END
+
+ // Ciphering <chenj:07-17-01>
+ unsigned char findGpCipheringCapability(void);
+
+ // maintenance methods
+
+ // Handle Handover cleanup
+ virtual BOOL cleanup(BOOL force = FALSE) = 0;
+
+ // get and set for private data members
+
+ private:
+
+ // hide the assignment, and copy ctor and other defaults as needed.
+ // CCHandover();
+
+ CCHandover (const CCHandover& rhs) ;
+
+ CCHandover& operator= (const CCHandover& rhs) ;
+
+ int operator==(const CCHandover& rhs) const ;
+
+ protected:
+ CCSessionHandler * parent;
+ MSG_Q_ID msgQId;
+
+ bool hoSrcLinkLost_;
+
+ IntraL3Msg_t mmOutMsg;
+ IntraL3Msg_t rrOutMsg;
+
+ InterVcMsg_t * vcInMsg; //HO<xxu:02-07-00>
+
+
+
+ InterVcMsg_t vcOutMsg;
+
+ IntraL3Msg_t * mmInMsg;
+ IntraL3Msg_t * rrInMsg;
+
+
+ // Handover Rtp data
+ // BCT <xxu:07-14-00> BEGIN
+ // HJCRTPSESSION hoRtpSession_;
+ // BCT <xxu:07-14-00> END
+
+ UINT32 hoVcIpAddress_;
+ JcSubId_t hoVcCallIndex_;
+
+ // Rtp data
+ UINT16 otherHoIncomingRtpPort_;
+
+ JCCEvent_t currEvent;
+
+ protected: //HO<xxu:01-26-00> Handto3rd Rtp data
+ HJCRTPSESSION h3RtpSession_;
+ UINT32 h3VcIpAddress_;
+ JcSubId_t h3VcCallIndex_;
+ UINT16 otherH3IncomingRtpPort_;
+ bool h3SrcLinkLost_;
+
+ //RETRY<xxu:04-21-00> BEGIN
+ VBLINK_API_CELL_LOCATION_REQUEST_MSG cellLocationRequest;
+ IntraL3HandoverRequired_t handReqd;
+ UINT16 candIndex_;
+ UINT16 hoRetry_;
+ UINT16 hoNextCandidate_;
+ //RETRY<xxu:04-21-00> END
+
+ public: //HO<xxu:01-26-00>
+ GlobalCellId_t h3GlobalCellId_;
+ HandoverTypes_t hoType_;
+
+ SmQueueMm mmQueue_;
+
+ //ext-HO <xxu:05-30-01>
+ InterHoaVcMsg_t *hoaInMsg;
+ InterHoaVcMsg_t hoaOutMsg;
+ T_AIF_MSG aifMsg;
+ JcSubId_t hoAgId_;
+ JcSubId_t h3AgId_;
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER hoNumber_;
+ int hoEndCause_;
+ IntraL3CipherModeCommand_t currEncrypt_;
+ A_Ie_Encryption_Information_t reqEncrypt_;
+ A_Ie_Chosen_Encrypt_Algorithm_t optCurrEncrypt_;
+ SpeechChann_t currSpeechCh_;
+ A_Ie_Channel_Type_t reqChannelType_;
+ A_Ie_Current_Channel_Type1_t optCurrChannelType_;
+ L3RMChannelType_t currChannel_;
+ A_Ie_Classmark_Information2_t currClassmark_;
+ int callIndex;
+
+ private:
+
+ int smHandleEvent();
+
+ public:
+ // data members
+
+ // BCT <xxu:07-14-00> BEGIN
+ HJCRTPSESSION hoRtpSession_;
+ // BCT <xxu:07-14-00> END
+
+ HandoverStates_t hoState_;
+
+ GlobalCellId_t hoGlobalCellId_;
+};
+
+class CCAnchorHandover : public CCHandover
+{
+
+ public:
+
+ // Destructor
+ // ~CCAnchorHandover() ;
+
+ // Constructors
+ CCAnchorHandover(CCSessionHandler *session,
+ int callId,
+ MSG_Q_ID qid);
+
+ // Operators
+
+ // primary behaviour methods
+ void addToDownlinkQueue (T_CNI_LAPDM_L3MessageUnit *msEncodedMsg);
+ void emptyDownlinkQueue (void);
+ void addToRRQueue (IntraL3Msg_t *rrMsg);
+ void emptyRRQueue (void);
+
+ void sendL2MsgToTargetCC(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg);
+ void sendRRMsgToTargetCC(IntraL3Msg_t *rrMsg);
+
+ // ext-HO <chenj:06-12-01>
+ void sendL2MsgToTargetPLMN(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg);
+ void sendRRMsgToTargetPLMN(IntraL3Msg_t *rrMsg);
+ void sendMMMsgToRemotePLMN (IntraL3Msg_t *);
+
+ T_CSU_PORT_ID mobileCsuPort(void);
+
+ JCCEvent_t handleInternalEvent(JCCEvent_t);
+
+ int handleMMMsg(IntraL3Msg_t *mmInMsg,
+ JCCEvent_t currEvent);
+ int handleRRMsg(IntraL3Msg_t *rrInMsg,
+ JCCEvent_t currEvent);
+ int handleVcCcMsg(InterVcMsg_t *vcCcInMsg);
+ int handleTimeoutMsg(IntraL3Msg_t *ccInMsg);
+
+ // used for getting the vipercell address of a neighbouring cell.
+ int handleVbCcMsg(IntraL3Msg_t *vbCcInMsg);
+
+ virtual void sendMMMsgToRemoteCC (IntraL3Msg_t *);
+
+ // Handover Src Handlers in CCHoSrcHnd.cpp
+ void releaseMobRes();
+ void releaseMobAndConnRes();
+
+ JCCEvent_t handleAnchPostHoRls();
+
+ //HO<xxu:02-23-00>
+ JCCEvent_t handleAnchPostH3Rls();
+ JCCEvent_t cleanHoCallWiCause(InterVcMsgType_t msg, JcFailureCause_t cause);
+ JCCEvent_t cleanH3CallWiCause(InterVcMsgType_t msg, JcFailureCause_t cause);
+
+ JCCEvent_t handleAnchPostHoMobEvent();
+
+ JCCEvent_t handleAnchDuringHoRls();
+
+ JCCEvent_t handleAnchHoReqd();
+
+ JCCEvent_t handleVcAddressRsp();
+ JCCEvent_t handleAnchHoFail();
+
+ // Handover Target To Anchor Handlers in CCHoSrcHnd.cpp
+ JCCEvent_t handleTrgToAnchPerfHoAck();
+ JCCEvent_t handleTrgToAnchPerfHoNack();
+ JCCEvent_t handleTrgToAnchCompltHo();
+
+ JCCEvent_t handleAnchThoTimerExpiry();
+ JCCEvent_t handleAnchT103TimerExpiry();
+
+ //RETRY<xxu:04-21-00> BEGIN
+ JCCEvent_t handleAnchTvbTimerExpiry();
+ //RETRY<xxu:04-21-00> END
+
+ // Handback Target to Anchor Handlers in CCHoSrcHnd.cpp
+ JCCEvent_t handleTrgToAnchPerfHbReq();
+ JCCEvent_t handleTrgToAnchAbortHb();
+
+ JCCEvent_t handleAnchT104TimerExpiry();
+
+ // Handback Target Handlers in CCHoSrcHnd.cpp
+ JCCEvent_t handleAnchHoReqAck();
+ JCCEvent_t handleAnchHoReqNack();
+ JCCEvent_t handleAnchHoComplt();
+
+ //HO<xxu:01-27-00> Sendback HoReqNack to target cell with failure cause
+ JCCEvent_t handleAnchHoReqNackWiCos(JcFailureCause_t cause);
+ JCCEvent_t handleAnchAbortWiCos(JcFailureCause_t cause);
+
+ // ext-HO <chenj:05-15-01>
+ int handleHoaCcMsg(InterHoaVcMsg_t *hoaCcInMsg);
+ JCCEvent_t handleExtPerformHOAck(void);
+ JCCEvent_t handleExtPerformHONack(void);
+ JCCEvent_t handleTrgToAnchEndHandover(void);
+ JCCEvent_t handleAnchPostExtHoRls();
+ JCCEvent_t cleanExtHoCallWiCause(InterEHOMsgType_t msg, JcFailureCause_t cause);
+ JCCEvent_t ExtPerformHO(void);
+ JCCEvent_t handleAnchExtHoTimerExpiry(void);
+ JCCEvent_t handleAnchPostExtHoMobEvent(void);
+ JCCEvent_t handleAnchPostExtHoHandbackEvent(void);
+ JCCEvent_t sendHandbackAck(void);
+ JCCEvent_t sendHandbackNack(void);
+ JCCEvent_t handleAnchExtHoReqAck(void);
+ JCCEvent_t handleAnchExtHOT104TimerExpiry();
+ JCCEvent_t handleAnchExtHoComplt();
+ JCCEvent_t handleAnchExtHoFail(void);
+ JCCEvent_t handleAnchExtHandbackFail(void);
+ JCCEvent_t do_Handback_scenario(void);
+ JCCEvent_t do_Handover_To_Third_PLMN_scenario(void);
+ JCCEvent_t do_Handback_To_Third_MNET_scenario(void);
+ JCCEvent_t do_MNET_Handback_scenario(void);
+ JCCEvent_t do_MNET_Handback_To_Third_MNET_scenario(void);
+ JCCEvent_t do_MNET_Handback_To_External_PLMN_scenario(void);
+ void initExtHandbackData(void);
+ void initExtHandmsc3Data(void);
+ void swapH3Data(void);
+
+ // maintenance methods
+ void initData();
+
+ void initHandbackData();
+
+ //HO<xxu:01-27-00>
+ void initHandmsc3Data();
+
+ // Handle Handover cleanup
+ virtual BOOL cleanup(BOOL force = FALSE);
+
+ // get and set for private data members
+
+ //BCT <xxu:09-23-00>
+ public:
+ bool hoSimplexConnected_;
+ bool h3SimplexConnected_;
+
+ // ext-HO <chenj:06-29-01>
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER targetMscNumber_;
+
+ private:
+
+ // hide the assignment, and copy ctor and other defaults as needed.
+ // CCAnchorHandover();
+
+ CCAnchorHandover (const CCAnchorHandover& rhs) ;
+
+ CCAnchorHandover& operator= (const CCAnchorHandover& rhs) ;
+
+ int operator==(const CCAnchorHandover& rhs) const ;
+
+ private:
+
+ int smHandleEvent();
+
+ // ext-HO <chenj:05-11-01>
+ void sendEndHandover(void);
+
+ // For building data for remote events
+ CCRemMsgData_t remMsgData;
+
+ int msMsgsQueued_;
+ T_CNI_LAPDM_L3MessageUnit downlinkQueue_[MAX_HO_SRC_DOWNLINK_QUEUE_LENGTH];
+
+ bool rrMsgsQueued_;
+ IntraL3Msg_t savedRRMsg_;
+
+ //BCT <xxu:09-23-00>
+ //bool hoSimplexConnected_;
+
+ //HO<xxu:01-26-00>
+ //bool h3SimplexConnected_;
+
+};
+
+class CCTargetHandover : public CCHandover
+{
+
+ public:
+
+ // Destructor
+ // ~CCTargetHandover() ;
+
+ // Constructors
+ CCTargetHandover(CCSessionHandler *session,
+ int callId,
+ MSG_Q_ID qid);
+
+ // Operators
+
+ // primary behaviour methods
+
+ void sendRRMsgToAnchorCC(IntraL3Msg_t *rrMsg);
+ void sendMSMsgToAnchorCC(T_CNI_RIL3MD_CCMM_MSG *msInMsg);
+ virtual void sendMMMsgToRemoteCC (IntraL3Msg_t *);
+
+ JCCEvent_t handleInternalEvent(JCCEvent_t);
+
+ int handleMMMsg(IntraL3Msg_t *mmInMsg,
+ JCCEvent_t currEvent);
+ int handleRRMsg(IntraL3Msg_t *rrInMsg,
+ JCCEvent_t currEvent);
+ int handleVcCcMsg(InterVcMsg_t *vcCcInMsg);
+ int handleTimeoutMsg(IntraL3Msg_t *ccInMsg);
+
+ // Handover Anchor To Target Handlers in CCHoTrgHnd.cpp
+ JCCEvent_t handleAnchToTrgPerfHoReq();
+ JCCEvent_t handleAnchToTrgAbortHo();
+
+ JCCEvent_t handleTrgT204TimerExpiry();
+
+ // Handover Target Handlers in CCHoTrgHnd.cpp
+ JCCEvent_t handleTrgHoReqAck();
+ JCCEvent_t handleTrgHoReqNack();
+ JCCEvent_t handleTrgHoComplt();
+
+ // Handback Src Handlers in CCHoTrgHnd.cpp
+ JCCEvent_t handleTrgHoReqd();
+ JCCEvent_t handleTrgHoFail();
+
+ // Handback Anchor to Target Handlers in CCHoTrgHnd.cpp
+ JCCEvent_t handleAnchToTrgPerfHbAck();
+ JCCEvent_t handleAnchToTrgPerfHbNack();
+ JCCEvent_t handleAnchToTrgCompltHb();
+
+ JCCEvent_t handleTrgTshoTimerExpiry();
+ JCCEvent_t handleTrgT203TimerExpiry();
+
+ // Post Handover Mobile Events
+ JCCEvent_t handleTrgPostHoRls();
+
+ // maintenance methods
+ void initHandbackData();
+
+ void printData(JCCPrintStFn fn);
+
+ // Handle Handover cleanup
+ virtual BOOL cleanup(BOOL force = FALSE);
+
+ // get and set for private data members
+
+ private:
+
+ // hide the assignment, and copy ctor and other defaults as needed.
+ // CCTargetHandover();
+
+ CCTargetHandover (const CCTargetHandover& rhs) ;
+
+ CCTargetHandover& operator= (const CCTargetHandover& rhs) ;
+
+ int operator==(const CCTargetHandover& rhs) const ;
+
+ private:
+ int smHandleEvent();
+
+ void initData(void);
+
+ bool voiceConnected;
+
+ SpeechChann_t currSpeechCh_;
+ L3RMChannelType_t currChannel_; //ext-HO <xxu:06-08-01>
+
+};
+
+
+//ext-HO <xxu:06-07-01>
+class CCTargetHandoverExtHo : public CCHandover
+{
+
+ public:
+
+ // Destructor
+ // ~CCTargetHandoverExtHo() ;
+
+ // Constructors
+ CCTargetHandoverExtHo(CCSessionHandler *session,
+ int callId,
+ MSG_Q_ID qid);
+
+ // Operators
+
+ // Primary behaviour methods
+ int handleHoaCcMsg(InterHoaVcMsg_t *hoaCcInMsg);
+ int handleVcCcMsg(InterVcMsg_t *vcCcInMsg);
+ int handleVbCcMsg (IntraL3Msg_t *vbCcInMsg);
+ int handleRRMsg(IntraL3Msg_t *rrMsg, JCCEvent_t hoEvent);
+ int handleMMMsg(IntraL3Msg_t *mmMsg, JCCEvent_t hoEvent);
+ int handleTimeoutMsg (IntraL3Msg_t *ccInMsg);
+ void sendMSMsgToAnchorCC(T_CNI_RIL3MD_CCMM_MSG *msInMsg);
+ virtual void sendMMMsgToRemoteCC(IntraL3Msg_t *mmInMsg);
+
+ //External Handover common event handlers
+ JCCEvent_t handleAnchToTrgPostHoHoaEvent(void);
+ JCCEvent_t handleTrgToAnchPostHoMobEvent(void);
+ JCCEvent_t handleNullEvent(void);
+
+ JCCEvent_t handleAnchToTrgEndHandover(void);
+ JCCEvent_t handleTrgToAnchAbortHb(void);
+ JCCEvent_t handleVcAddressRsp(void);
+ JCCEvent_t handleAnchPostHoRls(void);
+ JCCEvent_t handleTrgMmRelInd(void);
+
+ JCCEvent_t handleAnchTvbTimerExpiry(void);
+ JCCEvent_t handleTrgT202TimerExpiry(void); //interBSS handover under MSC-B
+ JCCEvent_t handleTrgT204TimerExpiry(void);
+ JCCEvent_t handleTrgT211TimerExpiry(void); //formerly Tsho timer
+
+ //External Handover handin case handlers
+ JCCEvent_t handleAnchToTrgPerfHoReq(void);
+ JCCEvent_t handleTrgHoReqAck(void);
+ JCCEvent_t handleTrgHoReqNack(void);
+ JCCEvent_t handleTrgHoAccess(void);
+ JCCEvent_t handleTrgHoComplt(void);
+
+ //External Handover postHandin--handback anchor GP->PLMN case handlers
+ JCCEvent_t handleTrgHoReqd(void);
+//JCCEvent_t handleAnchToTrgPerfHbAck(void);
+//JCCEvent_t handleAnchToTrgPerfHbNack(void);
+
+ JCCEvent_t handleTrgHoFail(void);
+ JCCEvent_t handleAnchToTrgCompltHb(void);
+
+ //External Handover postHandin--handover anchor GP->another GP case handlers
+ JCCEvent_t handleTrgToAnchPerfHoAck(void);
+ JCCEvent_t handleTrgToAnchPerfHoNack(void);
+ JCCEvent_t handleTrgToAnchCompltHo(void);
+ JCCEvent_t handleAnchHoFail(void);
+
+ //External Handover postHandin-->handback nonanchor GP->PLMN case handlers
+ JCCEvent_t handleTrgToAnchPerfHbReq(void);
+ JCCEvent_t handleAnchToTrgPerfHbAck(void);
+ JCCEvent_t handleAnchToTrgPerfHbNack(void);
+ JCCEvent_t handleTrgToAnchHbFail(void); //revert to old cell case
+ JCCEvent_t handleTrgToAnchHoAccess(void);
+//JCCEvent_t handleAnchToTrgCompltHb(void);
+
+ //External Handover postHandin-->handback nonanchor GP->anchor GP case handlers
+ JCCEvent_t handleAnchHoReqAck(void);
+ JCCEvent_t handleAnchHoReqNack(void);
+ JCCEvent_t handleAnchHoComplt(void);
+ JCCEvent_t handleTrgToAnchHoFail(void);
+
+ //External Handover postHandin-->handover non-anchor GP->3rd non-anchor GP case handlers
+ //JCCEvent_t handleTrgToAnchPerfHoAck(void);
+ //JCCEvent_t handleTrgToAnchPerfHoNack(void);
+ //JCCEvent_t handleTrgToAnchAbortHb(void);
+ //JCCEvent_t handleTrgToAnchCompltHo(void);
+ //JCCEvent_t handleTrgToAnchHbFail(void);
+
+ void printData(JCCPrintStFn fn);
+
+ // Handle Handover cleanup
+ virtual BOOL cleanup(BOOL force = FALSE);
+
+ public:
+ bool hoSimplexConnected_;
+ bool h3SimplexConnected_;
+
+ private:
+
+ // hide the assignment, and copy ctor and other defaults as needed.
+ // CCTargetHandoverExtHo();
+
+ CCTargetHandoverExtHo (const CCTargetHandoverExtHo& rhs) ;
+
+ CCTargetHandoverExtHo& operator= (const CCTargetHandoverExtHo& rhs) ;
+
+ int operator==(const CCTargetHandoverExtHo& rhs) const ;
+
+ private:
+ int smHandleEvent();
+
+ void sendL2MsgToGpBCc(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg);
+ bool sendL2MsgToGpACc (T_CNI_LAPDM_L3MessageUnit *msEncodedMsg);
+ void addToDownlinkQueue (T_CNI_LAPDM_L3MessageUnit *msEncodedMsg);
+ void emptyDownlinkQueue (void);
+ void addToRRQueue (IntraL3Msg_t *rrMsg);
+ void emptyRRQueue (void);
+
+ //External Handover initialization handlers
+ void initData(void);
+ int ccReleaseCall(void);
+ int ccReleaseOwn(void);
+ void ccReleaseGpHo(void);
+ void ccReleaseGpHb(void);
+ void ccReleaseGpH3(void);
+ void ccReleaseEhHb(void);
+ void ccReleaseGpEhHb(void);
+
+ int msMsgsQueued_;
+ bool rrMsgsQueued_;
+ IntraL3Msg_t savedRRMsg_;
+
+ bool voiceConnected;
+ T_CNI_LAPDM_L3MessageUnit downlinkQueue_[MAX_HO_SRC_DOWNLINK_QUEUE_LENGTH];
+
+};
+
+// pointer to member type
+typedef JCCEvent_t (CCAnchorHandover::* AnchorHandoverMsgHandler_t) ();
+typedef JCCEvent_t (CCTargetHandover::* TargetHandoverMsgHandler_t) ();
+
+extern AnchorHandoverMsgHandler_t hoSrcHandler[MAX_HO_SRC_STATES][MAX_HO_SRC_EVENTS];
+extern TargetHandoverMsgHandler_t hoTrgHandler[MAX_HO_TRG_STATES][MAX_HO_TRG_EVENTS];
+
+//ext-HO <xxu:06-07-01>
+typedef JCCEvent_t (CCTargetHandoverExtHo::* ExtHoTargetHandoverMsgHandler_t) ();
+extern ExtHoTargetHandoverMsgHandler_t extHoTrgHandler[MAX_HO_TRG_STATES+MAX_HO_SRC_STATES][MAX_HO_TRG_EVENTS+MAX_HO_SRC_EVENTS];
+
+#endif // CCHandover_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/CCInt.h b/data/mnet/GP10/Host/Common_To_Host/cc/CCInt.h
new file mode 100644
index 0000000..46ba5bd
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/CCInt.h
@@ -0,0 +1,52 @@
+#ifndef CCInt_H
+#define CCInt_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCInt.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : CC types shared with other modules.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// included L3 Message header for messages from other Layer 3 modules (MM, RR)
+#include "JCC/JCCL3Msg.h"
+
+// included MD and IRT headers for messages from MS
+#include "ril3/ril3md.h"
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+// defines the message queue ID for CC interface
+//
+#include "vxWorks.h"
+#include "msgQLib.h"
+extern MSG_Q_ID ccMsgQId;
+extern T_CNI_L3_ID cc_id;
+
+// *******************************************************************
+// Constant Definitions
+// *******************************************************************
+
+// defines the size of buffer for holding each message
+//
+const int CC_MAX_MSG_LENGTH = sizeof(CCMMInputMsg_t);
+
+#endif // CCInt_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/CCMsgAnal.h b/data/mnet/GP10/Host/Common_To_Host/cc/CCMsgAnal.h
new file mode 100644
index 0000000..c4d1066
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/CCMsgAnal.h
@@ -0,0 +1,55 @@
+#ifndef CCMsgAnal_H
+#define CCMsgAnal_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCMsgAnal.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+//
+#include "JCC/JCCEvent.h"
+
+// included MD and IRT headers for messages from MS
+#include "ril3/ril3md.h"
+#include "ril3/ril3_cc_msg.h"
+#include "ril3/ril3_sms_cp.h"
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+//typedefs
+
+class CCMsgAnalyzer
+{
+ public:
+ JCCEvent_t mapToCcEvent (T_CNI_RIL3MD_CCMM_MSG *msInMsg);
+ JCCEvent_t mapToSmsEvent (T_CNI_RIL3MD_CCMM_MSG *msInMsg);
+
+ T_CNI_RIL3CC_MSG msDecodedMsg ;
+ T_CNI_RIL3SMS_CP_MSG msDecodedSmsMsg;
+
+ T_CNI_RIL3_RESULT msDecodeResult ;
+
+ T_CNI_RIL3_CAUSE_VALUE causeValue;
+};
+
+#endif // CCMsgAnal_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/CCSessionHandler.h b/data/mnet/GP10/Host/Common_To_Host/cc/CCSessionHandler.h
new file mode 100644
index 0000000..7e1045d
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/CCSessionHandler.h
@@ -0,0 +1,286 @@
+#ifndef CCSessionHandler_H
+#define CCSessionHandler_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCSessionHandler.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+#include "csunew/csu_head.h"
+#include "CC/CCHandover.h"
+#include "CC/CallLeg.h"
+#include "CC/SmsLeg.h"
+// EHO <chenj:05-15-01>
+#include "CC/HOCallLeg.h"
+
+#include "JCC/JCCEvent.h"
+#include "JCC/JCCL3Msg.h"
+#include "JCC/JCCTimer.h"
+
+// message analyzer
+#include "CCMsgAnal.h"
+
+#include "SmQueue.h"
+
+//CDR <xxu:08-24-00>
+#include "ril3/ie_mobile_id.h"
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+
+// *******************************************************************
+// Constant definitions.
+// *******************************************************************
+
+
+//typedefs
+
+class CCSessionHandler
+{
+
+ public:
+
+ // Destructor
+ // ~CCSessionHandler(void) ;
+
+ // Constructors
+ CCSessionHandler(CCSession_t *session);
+
+ // Operators
+
+ // primary behaviour methods
+
+ //ext-HO <xxu:06-07-01>
+ void setReleaseCause(T_CNI_RIL3_CAUSE_VALUE cause);
+
+ //BCT <xxu:09-22-00>
+ bool getBctArrival(void);
+
+ void sendL2Msg(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg );
+ void sendDLMsg(L3L2MsgType_t msgType = L3L2_DL_EST_REQ,
+ T_CNI_LAPDM_SAPI sapi = SAPI_SMS );
+
+ void sendRRMsg(IntraL3PrimitiveType_t primType ,
+ IntraL3MsgType_t msgType ,
+ IntraL3Msg_t *rrOutMsg);
+ void sendMMMsg(IntraL3Msg_t *mmOutMsg);
+
+ T_CSU_PORT_ID mobileCsuPort(void);
+
+ bool setupOrig(T_CNI_IRT_ID irtId,
+ T_CNI_RIL3_CM_SERVICE_TYPE cmServType);
+
+ bool setupTerm(VOIP_CALL_HANDLE voipCallHandle,
+ int cdrIndex ,
+ int callRefValue ,
+ bool isFirst );
+
+ //ext-HO <xxu:05-16-01>
+ bool setupTermExtHo(IntraL3Msg_t* h323InMsg);
+ bool setupTargetHandoverExtHo(void);
+ void handleReleaseCallLegExtHo(CallLeg *leg);
+ void handleReleaseCallLegExtH3(CallLeg *leg);
+ BOOL hoCallVoiceConnected(void);
+ BOOL h3CallVoiceConnected(void);
+ HalfCallStates_t hoCallState(void);
+
+
+
+ //CH<xxu:11-23-99>
+ int handleMobHoldRetvReq(JCCEvent_t& event, TwoPartyCallLeg* leg);
+
+ bool setupTargetHandover(void);
+
+ int handleMMMsg (IntraL3Msg_t *);
+ int handleRRMsg (IntraL3Msg_t *);
+ int handleTimeoutMsg(IntraL3Msg_t *);
+ int handleMobMsg (T_CNI_RIL3MD_CCMM_MSG *);
+ int handleH323Msg (IntraL3Msg_t *);
+
+ // ext-HO <chenj:05-15-01>
+ bool setupOrigExtHo(void);
+ bool setupOrigExtHo3(void);
+ int handleHoaCcMsg (InterHoaVcMsg_t *hoaCCInMsg);
+
+ //ext-HO <xxu:05-16-01>
+ int handleH323MsgExtHo(IntraL3Msg_t* h323InMsg);
+ int handleH323MsgExtH3(IntraL3Msg_t* h323InMsg);
+ JCCEvent_t h323MapToEventExtHo(IntraL3Msg_t* h323InMsg,
+ CCRemMsgData_t &remMsgData);
+ JCCEvent_t h323MapToEventExtH3(IntraL3Msg_t* h323InMsg,
+ CCRemMsgData_t &remMsgData);
+
+
+ int handleVcCcMsg (InterVcMsg_t *);
+ int handleVbCissMsg (CISSVblinkMsg_t & );
+
+ int smHandleEvent(JCCEvent_t);
+
+ JCCEvent_t handleMMRelInd(void);
+ JCCEvent_t handleMMEstCnf(void);
+ JCCEvent_t handleMMEstInd(void);
+
+ bool findHandle (VOIP_CALL_HANDLE callHandle);
+ SmsLeg * findSmsReference (UINT32 refNum );
+
+ SpeechChann_t currSpeechCh (void);
+ TwoPartyCallLeg * activeLeg (void);
+ bool isHandoverAllowed(void);
+
+ bool setIrt (T_CNI_IRT_ID, T_CNI_L3_ID&);
+ bool resetIrt ();
+
+ // maintenance methods
+ void printData(JCCPrintStFn fn);
+ void cleanup(T_CNI_RIL3_CAUSE_VALUE cause = CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING,
+ BOOL normClear = TRUE );
+
+ // get and set for private data members
+
+ void setMmTermSetup (CallLeg *leg) {setupMmTermLeg = leg ;}
+ void resetMmTermSetup () {setupMmTermLeg = NULL ;}
+ CallLeg * getMmTermSetupLeg () {return(setupMmTermLeg) ;}
+ bool isMmSetupTermActive() {return(setupMmTermLeg != NULL);}
+
+ void setSapi3 () {sapi3Exist_ = true ;}
+ void resetSapi3 () {sapi3Exist_ = false;}
+ bool getSapi3Status () {return sapi3Exist_ ;}
+
+ bool isMmConnected () {return (entryId != (T_CNI_IRT_ID)JCC_UNDEFINED ||
+ handoverSession == anchorHandoverSession ||
+ handoverSession == targetHandoverSession );}
+
+ bool isSmsHoAllowed ();
+
+ void flashSapi3Queue ();
+ protected:
+
+ private:
+
+
+ // Internal Utility functions
+ void handleReleaseCallLeg(CallLeg *leg);
+
+ void initData(void);
+ bool routeFromVoipToCallLeg(IntraL3Msg_t *h323InMsg ,
+ TwoPartyCallLeg *&whichLeg );
+ bool routeFromVoipToSmsLeg (IntraL3Msg_t * h323InMsg ,
+ SmsLeg *&whichLeg );
+ bool routeFromMsToCallLeg (T_CNI_RIL3CC_MSG *msInDecodedMsg,
+ TwoPartyCallLeg *&whichLeg );
+ bool routeFromMsToSmsLeg (T_CNI_RIL3_CP_HEADER& msInDecodedHdr,
+ SmsLeg *&whichLeg );
+
+ CallLeg *getCallLegForNewTermination(bool &);
+ CallLeg *getSmsLegForNewTermination (bool &);
+
+ bool forwardPdu (T_CNI_LAPDM_L3MessageUnit *msEncodedMsg );
+
+
+ // hide the assignment, and copy ctor and other defaults as needed.
+ CCSessionHandler();
+
+ CCSessionHandler (const CCSessionHandler& rhs) ;
+
+ CCSessionHandler& operator= (const CCSessionHandler& rhs) ;
+
+ int operator==(const CCSessionHandler& rhs) const ;
+
+ public:
+ //CDR <xxu:08-18-00>
+ TwoPartyCallLeg * callLeg1;
+ TwoPartyCallLeg * callLeg2;
+ TwoPartyCallLeg * callLeg3;
+
+ // ext-HO <chenj:05-15-01>
+ HOCallLeg * hoCallLeg;
+ HOCallLeg * h3CallLeg;
+
+ T_CNI_RIL3_IE_MOBILE_ID mobileId;
+
+ private:
+ CCMsgAnalyzer *ma;
+ CCSession_t * parent;
+
+ //CDR <xxu:08-18-00>
+ //TwoPartyCallLeg * callLeg1;
+ //TwoPartyCallLeg * callLeg2;
+ //TwoPartyCallLeg * callLeg3;
+
+ SmsLeg * smsLeg1; // MT SMS-PP
+ SmsLeg * smsLeg2; // M0 SMS-PP
+ // Igal: smsLeg3 Currently is NOT IN USE!!!
+ SmsLeg * smsLeg3; // MT SMS-PP
+
+ CISSCallLeg * cissCallLeg;
+
+ T_CNI_RIL3_CAUSE_VALUE releaseCause;
+
+ IntraL3Msg_t * mmInMsg;
+ IntraL3Msg_t * rrInMsg;
+
+ bool isEmergencyCall;
+
+ CallLeg * setupMmTermLeg;
+ bool sapi3Exist_ ;
+ SmQueue sapi3Queue_ ;
+
+ public:
+ // data members
+
+ //BCT <xxu:07-06-00> BEGIN
+ bool bctInvoke_;
+ T_CNI_RIL3_SI_TI bctTi_;
+ TwoPartyCallLeg *bctLeg_;
+ TwoPartyCallLeg *bctMainLeg_;
+ VOIP_CALL_CALLING_PARTY_NUMBER CallingPartyNumber;
+ VOIP_CALL_DESTINATION_ADDRESS CalledPartyNumber;
+ VOIP_CALL_DESTINATION_ADDRESS XltCalledPartyNumber;
+
+ //BCT <xxu:07-06-00> END
+
+ JCCTimer * sessionTimer;
+
+ CCHandover * handoverSession;
+
+ CCAnchorHandover * anchorHandoverSession;
+ CCTargetHandover * targetHandoverSession;
+
+ //ext-HO <xxu:05-16-01>
+ CCTargetHandoverExtHo * targetHandoverSessionExtHo;
+ VOIP_CALL_HANDLE hoCallHandle; // used for hand-in only
+ T_CNI_RIL3_IE_MS_CLASSMARK_2 classmark2Info;
+
+ T_CNI_LAPDM_OID oid;
+ T_CNI_IRT_ID entryId;
+
+ short ludbIndex;
+
+ bool isOtherLegHeld(short legNum);
+
+ // to test status message
+ friend
+ void sendStatusMsg (int sessionNum ,
+ int callLeg );
+};
+
+
+
+#endif // CCSessionHandler_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/CCTypes.h b/data/mnet/GP10/Host/Common_To_Host/cc/CCTypes.h
new file mode 100644
index 0000000..d373920
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/CCTypes.h
@@ -0,0 +1,97 @@
+#ifndef CCTypes_H
+#define CCTypes_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCTypes.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : CC types shared between all CC modules.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "semLib.h"
+
+#include "JCC/JCCTimer.h"
+
+#include "RIL3/ie_called_bcd.h"
+
+#include "VOIP/voipapi.h"
+
+#include "oam_api.h"
+
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+class CCSessionHandler;
+
+//typedefs
+
+// Data Structures needed inside the CC Module
+typedef struct
+{
+ MSG_Q_ID msgQId;
+ int taskId;
+ int callIndex;
+
+ SEM_ID semId;
+
+ bool free;
+
+ // Timer to watch for the calls not to run off in a loop.
+ JCCTimer * safetyTimer;
+
+ CCSessionHandler * sessionHandler;
+
+} CCSession_t;
+
+// Remote Message Data Structure
+typedef struct
+{
+ // this is the only data needed for remote setup msg
+ // - THC_REMOTE_TERM_ADDRESS event
+ union
+ {
+ //BCT <xxu:07-13-00> BEGIN
+ VOIP_CALL_TRANSFER_MSG callTransfer;
+ //BCT <xxu:07-13-00> END
+
+ //BCT <xxu:09-21-00>
+ VOIP_CALL_UPDATE_HANDLES_MSG callUpdateHandles;
+
+ VOIP_API_CALL_PROCEEDING_MSG callProceeding;
+ VOIP_API_CALL_SETUP_MSG setup;
+ VOIP_API_CALL_OFFERING_MSG callOffering;
+ VOIP_API_CODEC_SELECTED_MSG codecSelected;
+ VOIP_API_CALL_RELEASE_MSG callRelease;
+ short cellId;
+ short dtmfDigit;
+ VOIP_API_CALL_EVENT_MSG basicCallInMsg;
+ };
+
+} CCRemMsgData_t;
+
+// call timer action - with the Qid
+extern FUNCPTR callTimerExpiry;
+
+// allow multiple calls
+extern CCSession_t ccSession[];
+
+//
+extern INT_32_T ccOldBTSState;
+
+#endif // CCTypes_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/CCUtil.h b/data/mnet/GP10/Host/Common_To_Host/cc/CCUtil.h
new file mode 100644
index 0000000..e60a225
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/CCUtil.h
@@ -0,0 +1,127 @@
+#ifndef CCUtil_H
+#define CCUtil_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCUtil.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// included L3 Message header for messages from other Layer 3 modules (MM, RR)
+#include "JCC/JCCComMsg.h"
+#include "JCC/JCCLog.h"
+
+// included MD and IRT headers for messages from MS
+#include "ril3/ril3md.h"
+
+// Need to include CC Message QueueTypes
+#include "CC/CCTypes.h"
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+//ext-HO <xxu:05-16-01>
+
+#ifndef __CC_EXTHO_DEBUG__
+#define __CC_EXTHO_DEBUG__
+
+#include "logging/vclogging.h"
+
+extern DbgOutput ccExtHoEiDbg;
+extern DbgOutput ccExtHoEoDbg;
+extern DbgOutput ccExtHoHoDbg;
+
+#define DBG_ENTERei(); ccExtHoEiDbg.Enter()
+#define DBG_LEAVEei(); ccExtHoEiDbg.Leave()
+#define DBG_TRACEei ccExtHoEiDbg.Trace
+#define DBG_CALL_TRACEei ccExtHoEiDbg.CallTrace
+#define DBG_WARNINGei ccExtHoEiDbg.Warning
+#define DBG_ERRORei ccExtHoEiDbg.Error
+#define DBG_HEXDUMPei(x,y); ccExtHoEiDbg.HexDump(x,y)
+
+#define DBG_ENTEReo(); ccExtHoEoDbg.Enter()
+#define DBG_LEAVEeo(); ccExtHoEoDbg.Leave()
+#define DBG_TRACEeo ccExtHoEoDbg.Trace
+#define DBG_CALL_TRACEeo ccExtHoEoDbg.CallTrace
+#define DBG_WARNINGeo ccExtHoEoDbg.Warning
+#define DBG_ERROReo ccExtHoEoDbg.Error
+#define DBG_HEXDUMPeo(x,y); ccExtHoEoDbg.HexDump(x,y)
+
+#define DBG_ENTERho(); ccExtHoHoDbg.Enter()
+#define DBG_LEAVEho(); ccExtHoHoDbg.Leave()
+#define DBG_TRACEho ccExtHoHoDbg.Trace
+#define DBG_CALL_TRACEho ccExtHoHoDbg.CallTrace
+#define DBG_WARNINGho ccExtHoHoDbg.Warning
+#define DBG_ERRORho ccExtHoHoDbg.Error
+#define DBG_HEXDUMPho(x,y); ccExtHoHoDbg.HexDump(x,y)
+
+extern bool ccCallTrace;
+#define DBG_CCDATA(X) if (ccCallTrace) ccEntryPrint(ccSession[X], JCCPrintf)
+
+#endif //__CC_EXTHO_DEBUG__
+
+// *******************************************************************
+// Constant Definitions
+// *******************************************************************
+
+//typedefs
+
+// Utility functions
+
+bool
+sendRR (IntraL3PrimitiveType_t prim,
+ IntraL3MsgType_t msgType,
+ T_CNI_IRT_ID entryId,
+ IntraL3Msg_t *rrOutMsg);
+bool
+sendMM (IntraL3PrimitiveType_t prim,
+ IntraL3MsgType_t msgType,
+ T_CNI_IRT_ID entryId,
+ IntraL3Msg_t *mmOutMsg);
+
+void ccEntryInit(CCSession_t *session);
+
+void handleReleaseSession(CCSession_t *session);
+
+short ccCallAlloc();
+
+short mobInCall (const short ludbIndex);
+short mobInCall2(const T_CNI_IRT_ID entryId );
+
+short initNewMSConn(const T_CNI_IRT_ID entryId,
+ short &callIndex);
+
+void ccEntryPrint(CCSession_t &session,
+ JCCPrintStFn);
+
+void ccDataPrint();
+
+//ext-HO <xxu:06-08-01>
+short ccIsHandoverCallSetup(IntraL3Msg_t * );
+short ccHoNumberCompare(T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER *hoNumber,
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER *cpn ,
+ int length );
+short ccHoNumberCompare(T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER *hoNumber,
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER *cpn ,
+ int length );
+
+
+#endif // CCUtil_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/CCconfig.h b/data/mnet/GP10/Host/Common_To_Host/cc/CCconfig.h
new file mode 100644
index 0000000..e773ac6
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/CCconfig.h
@@ -0,0 +1,75 @@
+#ifndef CCconfig_H
+#define CCconfig_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCconfig.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : Configuration Data for the parent CC task
+// - to be set through OA&M means.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+#include "vxWorks.h"
+#include "msgQLib.h"
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+// *******************************************************************
+// Constant Definitions
+// *******************************************************************
+
+// Maximum number of CC Connections allowed
+// Also max number of CC Call tasks
+extern short CC_MAX_CC_CALLS; //
+
+const int CC_MAX_CC_CALLS_DEF_VAL = 30;
+
+extern UINT32 MY_VIPERCELL_IP_ADDRESS;
+
+// defines the size of VxWorks Message queue
+// The value of this parameter is system dependent
+//
+const int CC_MAX_L3_MSGS = 32;
+
+// defines the priority of the VxWorks message queue
+//
+const int CC_L3_MSG_Q_PRIORITY = MSG_Q_PRIORITY;
+
+// The following two sets of constants define the priority and the
+// working stack size for the CC task.
+//
+//const int CC_TASK_PRIORITY = 70;
+//const int CC_TASK_STACK_SIZE = 10000;
+
+// Timers
+//
+// The timer value is based on VxWorks "tick" which is BSP (Board Support
+// Package) dependent. A translation between real-world time unit (seconds
+// or millisecond) and VxWorks ticks muct be done first to set the proper
+// timer values.
+//
+
+// extern int CC_SAMPLE_T3113; = 10000 Sample Timer - Network
+
+
+// Typedefs
+//
+
+#endif // CCconfig_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/CallConfig.h b/data/mnet/GP10/Host/Common_To_Host/cc/CallConfig.h
new file mode 100644
index 0000000..97a197f
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/CallConfig.h
@@ -0,0 +1,133 @@
+#ifndef CallConfig_H
+#define CallConfig_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CallConfig.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : Configuration Data for an individual Call task
+// - to be set through OA&M means.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+#include "vxWorks.h"
+#include "msgQLib.h"
+#include "jcc\JCCComIE.h"
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+// *******************************************************************
+// Constant Definitions
+// *******************************************************************
+
+// defines the size of VxWorks Message queue
+// The value of this parameter is system dependent
+//
+const int CALL_MAX_L3_MSGS = 32;
+
+// defines the priority of the VxWorks message queue
+//
+const int CALL_L3_MSG_Q_PRIORITY = MSG_Q_PRIORITY;
+
+// Timers
+//
+// The timer value is based on VxWorks "tick" which is BSP (Board Support
+// Package) dependent. A translation between real-world time unit (seconds
+// or millisecond) and VxWorks ticks muct be done first to set the proper
+// timer values.
+//
+
+extern int CALL_MM_CONN_EST_T999; // = 2000 MM Connection Established - Network (MO)
+extern int CALL_ALERTING_T301; // = 18000 Alerting received Timer - Network (MT)
+extern int CALL_SETUP_T303; // = 2000 Setup sent - Network (MT)
+extern int CALL_CALL_CONFIRMED_T310; // = 2000 Call Confirmed received Timer - Network (MT)
+extern int CALL_CONNECT_T313; // = 2000 Connect sent Timer - Network (MO)
+extern int CALL_DISCONNECT_T305; // = 3000 Disconnect sent Timer - Network (MO and MT)
+extern int CALL_RELEASE_T308; // = 2000 Release sent Timer - Network (MO and MT)
+
+extern int SMS_WAIT_CP_ACK_TC1; // = 1000 Wait for CP-ACK (MO and MT) 5-15 sec
+extern int SMS_WAIT_DISCONNECT; // = 150 Allows to send the last CP-ACK on SACCH/TCH
+
+extern int CALL_SAFETY_TIMER; // = 500 Call Task running too long
+
+// Handover Config
+extern int CALL_HAND_SRC_THO; // = 1000 Handover - waiting for Target Perform Ho Req Ack (ANCH)
+extern int CALL_HAND_SRC_T103; // = 2000 Handover - waiting for Target Ho Complt (ANCH)
+extern int CALL_HAND_TRG_T204; // = 2000 Handover - waiting for Mobile Handover Complt (TRG)
+
+
+//ext-HO <xxu:07-01-01>
+extern int CALL_HAND_TRG_T211; // = 2000 Handover - waiting for A-HO_REQUEST_ACK/A-HO_FAILURE) (TRG)
+extern int CALL_HAND_TRG_T202; // = 500 Handover - waiting for Mobile Handover Complt btw BSSs under MSC-B
+
+extern int CALL_HAND_SRC_TSHO; // = 1000 Handover - waiting for Target Perform Hb Req Ack (TRG)
+extern int CALL_HAND_SRC_T203; // = 2000 Handover - waiting for Target Hb Complt (TRG)
+extern int CALL_HAND_TRG_T104; // = 2000 Handover - waiting for Mobile Handover Complt (ANCH)
+
+//CDR <xxu:08-24-00>
+extern int CALL_CDR_10M; // = 39528 10m call duration timer for CDR
+
+//CH<xxu:11-24-99>
+extern int CALL_HOLD_RETV_TIMER; // = 5000 Time control for call swapping
+
+//RETRY<xxu:05-01-00> BEGIN
+extern int CALL_HAND_SRC_TVB; // = 10000 Time control for shake-hand btw anchor and VB
+//RETRY<xxu:05-01-00> END
+
+extern SpeechChann_t currChannDef;
+
+// Default values
+const int CALL_MM_CONN_EST_T999_DEF_VAL = 2000; // MM Connection Established - Network (MO)
+const int CALL_ALERTING_T301_DEF_VAL = 18000; // Alerting received Timer - Network (MT)
+const int CALL_SETUP_T303_DEF_VAL = 2000; // Setup sent - Network (MT)
+const int CALL_CALL_CONFIRMED_T310_DEF_VAL = 2000; // Call Confirmed received Timer - Network (MT)
+const int CALL_CONNECT_T313_DEF_VAL = 2000; // Connect sent Timer - Network (MO)
+const int CALL_DISCONNECT_T305_DEF_VAL = 3000; // Disconnect sent Timer - Network (MO and MT)
+const int CALL_RELEASE_T308_DEF_VAL = 2000; // Release sent Timer - Network (MO and MT)
+
+// CH<xxu:11-24-99
+const int CALL_HOLD_RETV_TIMER_DEF_VAL = 5000; // Time out for control call swap
+
+// CDR <xxu:08-24-00>
+const int CALL_CDR_10M_DEF_VAL = 35928; // 10M call duration timer for CDR
+
+// RETRY<xxu:05-01-00> BEGIN
+const int CALL_HAND_SRC_TVB_DEF_VAL = 10000; // Time out for shake hand btw anchor and target
+// RETRY<xxu:05-01-00> END
+const int CALL_SAFETY_TIMER_DEF_VAL = 500; // Call Task running too long
+
+// Handover Config Default Values
+const int CALL_HAND_SRC_THO_DEF_VAL = 1000; // Handover - waiting for Target Perform Ho Req Ack (ANCH)
+const int CALL_HAND_SRC_T103_DEF_VAL = 2000; // Handover - waiting for Target Ho Complt (ANCH)
+const int CALL_HAND_TRG_T204_DEF_VAL = 2000; // Handover - waiting for Mobile Handover Complt (TRG)
+
+//ext-HO <xxu:07-01-01>
+const int CALL_HAND_TRG_T211_DEF_VAL = 2000; // Handover - waiting for A-HO_REQUEST_ACK/A-HO_FAILURE) (TRG)
+const int CALL_HAND_TRG_T202_DEF_VAL = 500; // Handover - waiting for Mobile Handover Complt btw BSSs under MSC-B
+
+const int CALL_HAND_SRC_TSHO_DEF_VAL = 1000; // Handover - waiting for Target Perform Hb Req Ack (TRG)
+const int CALL_HAND_SRC_T203_DEF_VAL = 2000; // Handover - waiting for Target Hb Complt (TRG)
+const int CALL_HAND_TRG_T104_DEF_VAL = 2000; // Handover - waiting for Mobile Handover Complt (ANCH)
+
+const int SMS_WAIT_CP_ACK_TC1_DEF_VAL= 1200; // Wait for CP-ACK (MO and MT) 10 sec (5-15 sec)
+const int SMS_WAIT_DISCONNECT_DEF_VAL= 150 ; // Allows to send CP-ACK on SACCH/TCH before channel release
+ // at the end of MT SMS-PP scenario (2 sec)
+// Typedefs
+//
+
+#endif // CallConfig_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/CallLeg.h b/data/mnet/GP10/Host/Common_To_Host/cc/CallLeg.h
new file mode 100644
index 0000000..721369d
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/CallLeg.h
@@ -0,0 +1,276 @@
+#ifndef CallLeg_H
+#define CallLeg_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CallLeg.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-10-99
+// Description : interface specification for - CallLeg
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "JCC/JCCState.h"
+
+#include "VOIP/voipapi.h"
+
+//BCT <xxu:07-17-00> BEGIN
+#include "CC/CCHandover.h"
+//BCT <xxu:07-17-00> END
+
+#include "CC/CCHalfCall.h"
+
+#include "CDR/CdrVoiceCall.h"
+
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+class CCSessionHandler;
+
+//typedefs
+
+typedef enum
+{
+
+ CC_PROC_NULL = 0,
+ CC_PROC_MOB_ORIG = 1,
+ CC_PROC_MOB_TERM = 2
+
+} CCProcedureType_t;
+
+typedef enum
+{
+ CISS_ST_BASE = 0,
+ CISS_ST_IDLE,
+ CISS_ST_MS,
+ CISS_ST_VB
+} CISSStates_t;
+
+class CallLeg
+{
+
+public:
+
+ // Destructor
+ // ~CallLeg() ;
+
+ // Constructors
+ CallLeg();
+
+ // Operators
+
+ // primary behaviour methods
+ virtual void cleanup (T_CNI_RIL3_CAUSE_VALUE cause ) = 0;
+ virtual int handleTimeoutMsg (IntraL3Msg_t *ccInMsg ) = 0;
+ virtual void printData (JCCPrintStFn fnPtr ) ;
+ virtual void setupTerm (VOIP_CALL_HANDLE, int, int, bool) {;};
+
+ // maintenance methods
+
+ // get and set for private data members
+
+protected:
+
+ void initData(void);
+
+private:
+
+ // hide the assignment, and copy ctor and other defaults as needed.
+
+ CallLeg (const CallLeg& rhs) ;
+
+ CallLeg& operator= (const CallLeg& rhs) ;
+
+ int operator==(const CallLeg& rhs) const ;
+
+protected:
+
+public:
+ // data members
+
+ CCSessionHandler * parent;
+
+ T_CNI_LAPDM_OID oid();
+ T_CNI_IRT_ID entryId();
+ short ludbIndex();
+
+
+ //CDR <xxu:08-22-00>
+ CCdrVoiceCall ccCdr;
+ bool ccCdrCallState;
+ JCCTimer *ccCdrTimer;
+
+ // CDR information
+ int cdrIndex;
+
+ int callRefValue;
+
+ short callLegNum;
+
+ bool idle;
+
+ int callIndex;
+ MSG_Q_ID msgQId;
+
+};
+
+class TwoPartyCallLeg : public CallLeg
+{
+
+public:
+
+ // Destructor
+ // ~TwoPartyCallLeg() ;
+
+ // Constructors
+ TwoPartyCallLeg(CCSessionHandler *session, int callId, MSG_Q_ID qid, short legNum);
+
+ // Operators
+
+ // primary behaviour methods
+ virtual void cleanup (T_CNI_RIL3_CAUSE_VALUE cause);
+ virtual void printData(JCCPrintStFn fnPtr);
+ void setupOrig(T_CNI_RIL3_SI_TI ti = 0,
+ T_CNI_RIL3_CM_SERVICE_TYPE serviceRequested = CNI_RIL3_CM_SERVICE_TYPE_MO_CALL_OR_PACKET_MODE);
+ void setupTerm(VOIP_CALL_HANDLE voipCallHandle,
+ int cdrIndex ,
+ int callRefValue ,
+ bool callWaiting );
+ void handleReleaseCall(void);
+ virtual int handleTimeoutMsg(IntraL3Msg_t *ccInMsg);
+
+ bool isActive(void);
+ // maintenance methods
+
+ // get and set for private data members
+ //BCT <xxu:07-12-00> BEGIN
+ T_CNI_RIL3_SI_TI getBctTi();
+ bool getBctInvoke();
+ TwoPartyCallLeg *getBctLeg();
+ T_CNI_IRT_ID getEntryId();
+ CCHandover *getHandoverSession();
+ CCAnchorHandover *getAnchorHandoverSession();
+ HJCRTPSESSION getHoRtpSession();
+ //BCT <xxu:07-12-00> END
+
+
+protected:
+
+ void initData(void);
+
+private:
+
+ // hide the assignment, and copy ctor and other defaults as needed.
+ TwoPartyCallLeg();
+
+ TwoPartyCallLeg (const TwoPartyCallLeg& rhs) ;
+
+ TwoPartyCallLeg& operator= (const TwoPartyCallLeg& rhs) ;
+
+ int operator==(const TwoPartyCallLeg& rhs) const ;
+
+private:
+
+public:
+
+ //CDR <xxu:08-22-00>
+ //CCdrVoiceCall ccCdr;
+ //bool ccCdrCallState;
+ //JCCTimer *ccCdrTimer;
+
+ // data members
+ bool waitingCallLeg;
+
+ CCProcedureType_t procType;
+
+ // Only one of the two half calls below is valid depending on the type of call
+ void * halfCallStorage;
+ CCOrigHalfCall * origSide;
+ CCTermHalfCall * termSide;
+ CCHalfCall * msSide;
+
+ // H323 Channel state
+ ResStates_t h245ChannState;
+
+ // Connection State - Connection Manager Functionality
+ bool voiceConnected;
+
+ // H323 side call state - only need to store the Call Handle
+ VOIP_CALL_HANDLE h323CallHandle;
+
+ //BCT <xxu:09-21-00>
+ VOIP_CALL_HANDLE oH323CallHandle;
+ VOIP_CALL_HANDLE nH323CallHandle;
+ bool bctArrival_;
+
+ bool disconnectSentToVoip;
+
+ bool isEmergencyCall;
+
+ //PR1378 <xxu:08-16-00>
+ JCCTimer *tclTimer;
+
+};
+
+class CISSCallLeg : public CallLeg
+{
+
+public:
+
+ // Destructor
+ ~CISSCallLeg();
+
+ // Constructors
+ CISSCallLeg(CCSessionHandler *session, int callId, MSG_Q_ID qid, short callLegNum);
+
+ // Operators
+
+ // primary behaviour methods
+ handleMsMsg(T_CNI_RIL3MD_CCMM_MSG *msInMsg);
+ handleVbMsg(CISSVblinkMsg_t &netInMsg);
+
+ // maintenance methods
+ virtual void cleanup (T_CNI_RIL3_CAUSE_VALUE cause);
+ virtual void printData (JCCPrintStFn fnPtr);
+
+ virtual int handleTimeoutMsg(IntraL3Msg_t *ccInMsg);
+
+
+ // get and set for private data members
+
+protected:
+ void initData(void);
+
+private:
+
+ // hide the assignment, and copy ctor and other defaults as needed.
+ CISSCallLeg();
+
+ CISSCallLeg (const CISSCallLeg& rhs) ;
+
+ CISSCallLeg& operator= (const CISSCallLeg& rhs) ;
+
+ int operator==(const CISSCallLeg& rhs) const ;
+
+private:
+
+ // ciss state
+ CISSStates_t cissState_;
+};
+
+
+#endif // CallLeg_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/HOCallLeg.h b/data/mnet/GP10/Host/Common_To_Host/cc/HOCallLeg.h
new file mode 100644
index 0000000..6d19d34
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/HOCallLeg.h
@@ -0,0 +1,107 @@
+#ifndef HOCallLeg_H
+#define HOCallLeg_H
+
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : HOCallLeg.h
+// Author(s) : Joe Chen
+// Create Date : 05-15-01
+// Description : class specification for - HOCallLeg for external HO
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+
+// Parent Class
+#include "CC/CallLeg.h"
+
+#include "CC/HOHalfCall.h"
+
+class HOCallLeg : public CallLeg
+{
+
+public:
+
+ // Destructor
+ // ~HOCallLeg() ;
+
+ // Constructors
+ HOCallLeg(CCSessionHandler *session, int callId, MSG_Q_ID qid, short legNum);
+
+ // Operators
+
+ // primary behaviour methods
+ virtual void cleanup (T_CNI_RIL3_CAUSE_VALUE cause);
+ virtual void printData(JCCPrintStFn fnPtr);
+ void setupOrigExtHo(void);
+ void disconnectOrigExtHo(void);
+ void setupTermExtHo(IntraL3Msg_t* h323InMsg);
+ void handleReleaseCall(void);
+ virtual int handleTimeoutMsg(IntraL3Msg_t *ccInMsg);
+
+
+ //ext-HO <xxu:06-07-01>
+ JcSubId_t hoAgId(void);
+ int callIndexEHO(void);
+ BOOL authTerm(void);
+ BOOL cancelHoTimerIfNeeded(void);
+ T_CNI_RIL3_SPEECH_VERSION speechVersion(void);
+
+protected:
+
+ void initData(void);
+
+private:
+
+ // hide the assignment, and copy ctor and other defaults as needed.
+ HOCallLeg();
+
+ HOCallLeg (const HOCallLeg& rhs) ;
+
+ HOCallLeg& operator= (const HOCallLeg& rhs) ;
+
+ int operator==(const HOCallLeg& rhs) const ;
+
+private:
+
+public:
+
+ // data members
+ CCProcedureType_t procType;
+
+ // Only one of the two half calls below is valid depending on the type of call
+ void * halfExtHoCallStorage;
+ HOMoHalfCall * origSide;
+ HOMtHalfCall * termSide;
+ HOHalfCall * msSide;
+
+
+ // Connection State - Connection Manager Functionality
+ bool voiceConnected;
+
+ // H323 side call state - only need to store the Call Handle
+ VOIP_CALL_HANDLE h323CallHandle;
+
+ bool disconnectSentToVoip;
+
+ JCCTimer *tclTimer;
+
+};
+
+
+#endif //HOCallLeg_h
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/HOHalfCall.h b/data/mnet/GP10/Host/Common_To_Host/cc/HOHalfCall.h
new file mode 100644
index 0000000..94173e1
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/HOHalfCall.h
@@ -0,0 +1,237 @@
+#ifndef HOHALFCALL_H
+#define HOHALFCALL_H
+
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : HOHalfCall.h
+// Author(s) : Xiaode and Joe
+// Create Date : 05-15-01
+// Description : Definition of HOHalfCall class and the derived
+// classes HOMoHalfCall, HOMtHalfCall
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "ril3/ril3md.h"
+#include "ril3/ril3_cc_msg.h"
+
+#include "jcc/JCCComMsg.h"
+#include "jcc/Jcctimer.h"
+
+
+// *******************************************************************
+// Forward declarations
+// *******************************************************************
+class HOCallLeg;
+
+
+// *******************************************************************
+// Constant definitions.
+// *******************************************************************
+
+const int MAX_EHO_CALL_STATES
+= (EHO_ST_ACTIVE + 1);
+
+const int MAX_EHO_CALL_EXTERNAL_EVENTS
+= (CC_EHO_LAST_EVENT - CC_INTERNAL_EHO_CALL_EVENT_BASE + 1);
+
+
+/*******************************************************************/
+class HOHalfCall
+{
+
+ public:
+
+ // Following covered in HOHalfCall.cpp
+
+ HOHalfCall ();
+
+ virtual void cleanup(void);
+ void printData(JCCPrintStFn);
+
+ JCCEvent_t handleInvalidEvent(void);
+
+
+ int handleTimeoutMsg(IntraL3Msg_t *ccInMsg);
+ int handleRemoteEvent(IntraL3Msg_t* h323InMsg, JCCEvent_t remoteEvent,
+ CCRemMsgData_t inRemMsg);
+
+ int smHandleEvent(void);
+
+ int smHandleFirstCallEvent(void);
+
+ virtual bool sendRemote(JCCEvent_t remoteEvent);
+
+ //ext-HO <xxu:06-07-01>
+ JCCEvent_t fakeEHOMobCallProgress(void);
+ JCCEvent_t handleHoCallTimeout(void);
+ JCCEvent_t handleEHOMobRemoteTermAddress(void);
+ JCCEvent_t handleEHOMobRemoteChannSelectedEi(void);
+ JCCEvent_t fakeEHOMobConnect(void);
+ JCCEvent_t handleEHOMobRemoteChannReady(void);
+
+ public:
+
+ JCCEvent_t handleEHOMobTermAddress(void);
+ JCCEvent_t handleEHOMobRemoteChannSelected(void);
+ JCCEvent_t handleEHOMobRemoteAnswer(void);
+ JCCEvent_t handleEHOMobRemoteDisconnect(void);
+ JCCEvent_t handleEHOMobCallProgress(void);
+ JCCEvent_t handleEHOMobLocalDisconnect(void);
+ JCCEvent_t handleNullEvent(void);
+
+ private:
+
+ protected:
+
+ virtual void initData(void);
+
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER
+ cpn;
+ T_CNI_RIL3_IE_CALLING_PARTY_BCD_NUMBER
+ callingPartyNum;
+
+ short releaseCounter;
+
+ // For building data for remote events
+ CCRemMsgData_t remMsgData;
+
+ IntraL3Msg_t * h323InMsg;
+
+ public:
+
+ //CAUSE<xxu:03-21-00> moved here from private
+ T_CNI_RIL3_CAUSE_VALUE voipReleaseCause_;
+
+ //CH<xxu:11-10-99>
+ ChStates_t chState_;
+ T_CNI_RIL3_CAUSE_VALUE chCause_;
+
+ JCCTimer *hcTimer; //CH<xxu:12-06-99>
+
+ HalfCallStates_t callState_ ;
+
+ ResStates_t channState_;
+
+ SpeechChann_t currSpeechCh_;
+
+ T_CNI_RIL3_IE_CAUSE rlsCause;
+
+ DbgOutput Dbg;
+
+ protected:
+
+ HOCallLeg *parent;
+
+ JCCEvent_t currEvent;
+
+ private:
+
+
+ T_CNI_RIL3_IE_BEARER_CAPABILITY
+ bearerCap;
+
+
+ T_CNI_RIL3_IE_KEYPAD_FACILITY
+ currKeypadFacility_;
+
+ private:
+
+ // hide the assignment, and copy ctor and other defaults as needed.
+
+ HOHalfCall (const HOHalfCall& rhs) ;
+
+ HOHalfCall& operator= (const HOHalfCall& rhs) ;
+
+ int operator==(const HOHalfCall& rhs) const ;
+
+};
+
+/*******************************************************************/
+class HOMoHalfCall : public HOHalfCall
+{
+
+public:
+
+ // Constructors
+ HOMoHalfCall (HOCallLeg *HOLeg, JCCTimer *tclTimer);
+
+ // Destructor
+ ~HOMoHalfCall () {};
+
+ // Operators
+
+ void setupNewCall(void);
+ void disconnectNewCall(void);
+
+ void initData(void);
+
+ // maintenance methods
+
+ // Even handler methods
+
+ // get and set for private data members
+
+//protected:
+
+private:
+ // hide the assignment, and copy ctor and other defaults as needed
+
+ HOMoHalfCall();
+
+};
+
+
+
+/*******************************************************************/
+class HOMtHalfCall : public HOHalfCall
+{
+
+public:
+
+ // Constructors
+ HOMtHalfCall (HOCallLeg *callLeg, JCCTimer *tclTimer);
+
+ // Destructor
+ ~HOMtHalfCall () {};
+
+ // Operators
+ void initData(void);
+
+ // maintenance methods
+
+ // Even handler methods
+
+ // get and set for private data members
+
+//protected:
+
+private:
+ // hide the assignment, and copy ctor and other defaults as needed
+
+ HOMtHalfCall();
+
+};
+
+
+// *******************************************************************
+// State machine storage
+// *******************************************************************
+
+
+typedef JCCEvent_t (HOHalfCall::* HOHalfCallMsgHandler_t) ();
+extern HOHalfCallMsgHandler_t ehoCallStateHandler[MAX_EHO_CALL_STATES][MAX_EHO_CALL_EXTERNAL_EVENTS];
+
+#endif // HOHALFCALL_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/SMSLeg.h b/data/mnet/GP10/Host/Common_To_Host/cc/SMSLeg.h
new file mode 100644
index 0000000..65a7187
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/SMSLeg.h
@@ -0,0 +1,146 @@
+#ifndef SmsLeg_H
+#define SmsLeg_H
+
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SmsLeg.h
+// Author(s) : Igal Gutkin
+// Create Date : 01-19-00
+// Description : class specification for - SmsLeg
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+
+// Parent Class
+#include "CC/CallLeg.h"
+
+#include "ril3\ril3_sms_cp.h"
+#include "ril3\ril3_sms_rp.h"
+
+#include "CC/SmsHandler.h"
+#include "CC/SmsMsgBuilder.h"
+#include "CC/SmsHalfCall.h"
+
+typedef enum
+{
+ SMS_NONE_LEG,
+ SMS_MO_LEG ,
+ SMS_MT_LEG
+} SmsLegType_t;
+
+class SmsLeg : public CallLeg
+{
+
+public:
+
+ // Destructor
+ ~SmsLeg();
+
+ // Constructors
+ SmsLeg (CCSessionHandler *session, int callId, MSG_Q_ID qid, short callLegNum);
+
+ // Operators
+
+ // primary behaviour methods
+ virtual int handleTimeoutMsg (IntraL3Msg_t *);
+
+ bool handleMsMsg (T_CNI_RIL3SMS_CP_MSG &, JCCEvent_t);
+ bool handleL2Msg (T_CNI_RIL3MD_CCMM_MSG&, JCCEvent_t);
+ bool handleMmMsg (IntraL3Msg_t &, JCCEvent_t);
+ bool handleVbMsg (SmsVblinkMsg_t &, JCCEvent_t);
+
+ bool setupOrig (T_CNI_RIL3_SI_TI ti = 0 );
+ void setupTerm (VOIP_CALL_HANDLE, int, int, bool );
+
+ bool isHoAllowed ();
+
+ // maintenance methods
+ virtual void cleanup (T_CNI_RIL3_CAUSE_VALUE cause );
+
+ virtual void printData (JCCPrintStFn fnPtr );
+
+ // get and set for private data members
+ SmsHalfCall * getHc() {return (smsFsm_);};
+
+ // idle is a member of the parent class CallLeg
+ bool isIdle () {return (idle);}
+ void setBusy () {idle = false ;}
+ void setIdle () {idle = true ;}
+
+ void setRemRelCause (T_CNI_RIL3_RP_CAUSE_VALUE cause) {remCause_ = cause;}
+ T_CNI_RIL3_RP_CAUSE_VALUE getRemRelCause () {return remCause_ ;}
+
+ void setTi (T_CNI_RIL3_SI_TI nt) {mainTi_ = nt ;}
+ void resetTi () {mainTi_ = SMS_TI_INVALID;}
+ T_CNI_RIL3_SI_TI getTi () {return (mainTi_ ) ;}
+ void allocateTi ();
+
+ SmsLegType_t getSmsLegType () {return (legType_) ;}
+
+ void setVbRefNum (UINT32 refNum = INVALID_VC_SMS_REF_NUM);
+ UINT32 getVbRefNum () {return (vbRefNum_) ;}
+ void resetVbRefNum () {vbRefNum_ = INVALID_VC_SMS_REF_NUM;}
+
+protected:
+ void initData ();
+
+ bool InitMoLeg ();
+ bool InitMtLeg ();
+
+private:
+
+ // hide the assignment, and copy ctor and other defaults as needed.
+ SmsLeg ();
+
+ bool handleMsg (JCCEvent_t, void *, INT32);
+ bool releaseRemSide (T_CNI_RIL3_RP_CAUSE_VALUE);
+
+ static UINT32 allocateVbRefNum ();
+
+ SmsLeg& operator = (const SmsLeg& rhs) ;
+ int operator == (const SmsLeg& rhs) const;
+
+public:
+ // SMS message build & send class
+ SmsMsgBuilder *msgBuilder;
+
+private:
+
+ // SMS Leg Type
+ SmsLegType_t legType_;
+
+ // SMS FSM instance
+ SmsHalfCall *smsFsm_ ;
+
+ // Transaction Identifier associated with the leg
+ T_CNI_RIL3_SI_TI mainTi_ ;
+
+ // ViperCell 1 - 32767, ViperBase 32768 - 65535
+ UINT32 vbRefNum_;
+
+ //Disconnect cause
+ T_CNI_RIL3_RP_CAUSE_VALUE remCause_;
+
+ // Vb Reference number counter
+ static UINT32 lastVbRefNum_;
+
+};
+
+
+#endif //SmsLeg_h
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/SmsCommonDef.h b/data/mnet/GP10/Host/Common_To_Host/cc/SmsCommonDef.h
new file mode 100644
index 0000000..b22d770
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/SmsCommonDef.h
@@ -0,0 +1,49 @@
+#ifndef SMSCOMMONDEF_H
+#define SMSCOMMONDEF_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SmsCommonDef.h
+// Author(s) : Igal Gutkin
+// Create Date : 24-01-00
+// Description : SMS specific definitions
+//
+// *******************************************************************
+
+
+#define NULL_PTR ((void *)0)
+
+//Leg number allocated for the MO SMS
+#define SMS_MO_LEG_NUM 5
+
+// TI values allocated for the MT SMS
+#define SMS_TI_1 4
+#define SMS_TI_2 5
+#define SMS_TI_3 6
+#define SMS_TI_4 7
+#define SMS_TI_INVALID 255
+
+#define TI_ORIG_OR_MASK ((UINT8)0x08)
+#define TI_TERM_AND_MASK ((UINT8)0x07)
+
+// List of the CM common events:
+
+#define SMS_EVENT_MM_EST_CNF CC_MM_CONNECTION_CNF
+#define SMS_EVENT_MM_EST_REJ CC_MM_CONNECTION_REJ
+#define SMS_EVENT_MM_REL_IND CC_MM_CONNECTION_REL
+#define SMS_EVENT_MM_EST_IND CC_MM_CONNECTION_IND
+
+#define SMS_LEGNUM_OFFSET 3
+
+#endif // SMSCOMMONDEF_H
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/SmsHalfCall.h b/data/mnet/GP10/Host/Common_To_Host/cc/SmsHalfCall.h
new file mode 100644
index 0000000..a52dadf
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/SmsHalfCall.h
@@ -0,0 +1,200 @@
+#ifndef SMSHALFCALL_H
+#define SMSHALFCALL_H
+
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SmsHalfCall.h
+// Author(s) : Igal Gutkin
+// Create Date : 01-19-00
+// Description : class specification for SmsHalfCall and the derived
+// classes SmsMoHalfCall, SmsMtHalfCall
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "ril3/ril3md.h"
+#include "ril3/ril3_cc_msg.h"
+#include "ril3/ril3_sms_cp.h"
+
+#include "jcc/JCCComMsg.h"
+#include "jcc/Jcctimer.h"
+
+#include "CC/SmsHandler.h"
+
+// *******************************************************************
+// Forward declarations
+// *******************************************************************
+class SmsLeg;
+
+/*******************************************************************/
+class SmsHalfCall
+{
+
+ friend bool smsHandlerDef (SmsHalfCall *, void * , INT32 );
+
+ friend bool smsHandlerMdErrInd (SmsHalfCall *, void * , INT32 );
+
+ friend bool smsHandlerMmEstInd (SmsHalfCall *, void * , T_CNI_RIL3_SI_TI);
+ friend bool smsHandlerMmEstCnf (SmsHalfCall *, void * , INT32 );
+ friend bool smsHandlerMmEstRej (SmsHalfCall *, void * , INT32 );
+ friend bool smsHandlerMmRelInd (SmsHalfCall *, void * , INT32 );
+
+ friend bool smsHandlerCpData (SmsHalfCall *, T_CNI_RIL3SMS_MSG_CP_DATA *, INT32 );
+ friend bool smsHandlerCpAck (SmsHalfCall *, T_CNI_RIL3SMS_MSG_CP_ACK *, INT32 );
+ friend bool smsHandlerCpError (SmsHalfCall *, T_CNI_RIL3SMS_MSG_CP_ERROR*, INT32 );
+ friend bool smsHandlerCpReject (SmsHalfCall *, T_CNI_RIL3SMS_CP_MSG *, INT32 );
+
+ friend bool smsHandlerMnEstReq (SmsHalfCall *, SmsVblinkMsg_t *, T_CNI_RIL3_CP_CAUSE_VALUE);
+ friend bool smsHandlerMnDataReq (SmsHalfCall *, SmsVblinkMsg_t *, T_CNI_RIL3_CP_CAUSE_VALUE);
+ friend bool smsHandlerMnAbortReq(SmsHalfCall *, SmsVblinkMsg_t *, T_CNI_RIL3_CP_CAUSE_VALUE);
+ friend bool smsHandlerMnRelReq (SmsHalfCall *, SmsVblinkMsg_t *, T_CNI_RIL3_CP_CAUSE_VALUE);
+
+ friend bool smsHandlerTimeout (SmsHalfCall *, void * , INT32 );
+ friend bool smsHandlerTimeoutAck(SmsHalfCall *, void * , INT32 );
+ friend bool smsHandlerTimerDisc (SmsHalfCall *, void * , INT32 );
+
+public:
+
+ // Constructors
+ SmsHalfCall (class SmsLeg& smsLeg, smsEventTableEntry_t **table);
+
+ // Destructor
+ ~SmsHalfCall ();
+
+ // Operators
+
+ // maintenance methods
+
+ void cleanup (T_CNI_RIL3_CAUSE_VALUE cause);
+
+ //Parse Timer Message
+ int handleTimeoutMsg (IntraL3Msg_t *smsTimerMsg);
+
+ bool validateEvent (JCCEvent_t event)
+ {
+ return ((event > SMS_EVENT_BASE && event <= SMS_EVENT_DEFAULT ) ||
+ (event > CC_INTERNAL_CALL_EVENT_BASE && event <= HC_LOCAL_EVENT_BASE) );
+ }
+
+ // Main FSM access method Move to Protected?
+ bool invokeHandler (JCCEvent_t event, void *data, INT32 param1);
+
+ // Retreive saved RPDU data
+ const T_CNI_RIL3_IE_CP_USER_DATA & getRpdu () {return (rpdu_);}
+ bool isRpdu () {return (rpdu_.ie_present);}
+
+ // get and set for private data members
+ SmsState_t getState () {return (currentState_);}
+ SmsLeg & getParent () {return (parent_ );}
+
+ void setLastAttemt () {lastAttempt_ = true ;}
+ void resetLastAttemt () {lastAttempt_ = false ;}
+ bool isLastAttemt () {return (lastAttempt_) ;}
+
+ static const char * getEventName (JCCEvent_t);
+
+ bool isActive () {return (currentState_ >= SMS_STATE_CONNECTED);}
+
+protected:
+
+ void setNextState (SmsState_t state)
+ {nextState_ = state ;}
+ void resetNextState () {nextState_ = SMS_STATE_MAX;}
+
+ void resetRpdu ();
+ void saveRpdu (SmsVblinkMsg_t *);
+
+private:
+
+ void initData ();
+ void setNewState (SmsState_t);
+
+protected:
+
+ smsEventTableEntry_t **smsTable_ ; //pointer to the FSM Table
+ SmsLeg & parent_ ; //SmsLeg
+ JCCTimer *smsTimer_ ; //Protocol Timer
+ T_CNI_RIL3_IE_CP_USER_DATA rpdu_ ; //PDU data storage. Contains data till
+ //CP PDU is finally sent
+ SmsState_t nextState_ ; //Override default next state from FSM
+ SmsState_t currentState_; //Current SMS FSM state
+ bool lastAttempt_ ; //CP-DATA resend attempt flag
+
+private:
+
+
+};
+
+
+/*******************************************************************/
+class SmsMoHalfCall : public SmsHalfCall
+{
+
+public:
+
+ // Constructors
+ SmsMoHalfCall (class SmsLeg& smsLeg);
+
+ // Destructor
+ ~SmsMoHalfCall () {};
+
+ // Operators
+
+ // maintenance methods
+
+ // get and set for private data members
+
+protected:
+
+//private:
+
+ // hide the assignment, and copy ctor and other defaults as needed.
+
+public:
+
+};
+
+
+/*******************************************************************/
+class SmsMtHalfCall : public SmsHalfCall
+{
+
+public:
+
+ // Constructors
+ SmsMtHalfCall (class SmsLeg& smsLeg);
+
+ // Destructor
+ ~SmsMtHalfCall () {};
+
+ // Operators
+
+ // maintenance methods
+
+ // Even handler methods
+
+ // get and set for private data members
+
+//protected:
+
+private:
+
+ // hide the assignment, and copy ctor and other defaults as needed.
+
+private:
+
+};
+
+#endif // SMSHALFCALL_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/SmsHandler.h b/data/mnet/GP10/Host/Common_To_Host/cc/SmsHandler.h
new file mode 100644
index 0000000..6beb4cf
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/SmsHandler.h
@@ -0,0 +1,54 @@
+#ifndef SmsHandler_H
+#define SmsHandler_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SmsLeg.h
+// Author(s) : Igal Gutkin
+// Create Date : 01-19-00
+// Description : class specification for - SmsLeg
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "jcc\jccevent.h"
+#include "jcc\jccstate.h"
+
+#include "CC/SmsCommonDef.h"
+
+class SmsHalfCall;
+
+
+typedef bool (*fsmHandle_t)(SmsHalfCall *, void *, INT32);
+
+#define SFH fsmHandle_t
+
+// Event Entry
+typedef struct
+{
+ JCCEvent_t event ;
+ fsmHandle_t handler ;
+ SmsState_t nextState;
+} smsEventTableEntry_t;
+
+// State entry
+typedef smsEventTableEntry_t smsStateTableEntry_t[];
+
+// FSM Table (array of pointers)
+typedef smsStateTableEntry_t *smsFsmTable_t [SMS_STATE_MAX];
+
+
+#endif // SmsHandler_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/SmsMsgBuilder.h b/data/mnet/GP10/Host/Common_To_Host/cc/SmsMsgBuilder.h
new file mode 100644
index 0000000..5958eba
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/SmsMsgBuilder.h
@@ -0,0 +1,89 @@
+#ifndef __SMSMSGBUILDER_H__
+#define __SMSMSGBUILDER_H__
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SmsMsgBuilder.h
+// Author(s) : Igal Gutkin
+// Create Date : 02-10-00
+// Description : class specification for - SmsMsgBuilder
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include <vxworks.h>
+
+#include "ril3\ril3_sms_cp.h"
+#include "ril3\ril3_sms_rp.h"
+
+#include "CC\SmsCommonDef.h"
+
+class SmsLeg;
+
+
+class SmsMsgBuilder
+{
+
+public:
+
+ // Destructor
+ ~SmsMsgBuilder() {};
+
+ // Constructors
+ SmsMsgBuilder (SmsLeg& parent) : parent_(parent) {;}
+
+ // Operators
+
+ // primary behaviour methods
+
+ T_CNI_RIL3_RESULT sendCpError (T_CNI_RIL3_CP_CAUSE_VALUE);
+ T_CNI_RIL3_RESULT sendCpData ();
+ T_CNI_RIL3_RESULT sendCpAck ();
+
+ bool sendMnSmsEstInd (UINT32 , UINT8* );
+ bool sendMnSmsDataInd (UINT32 , UINT8* );
+ bool sendMnSmsErrorInd (T_CNI_RIL3_RP_CAUSE_VALUE, UINT32 tempRefNum = 0);
+
+ // maintenance methods
+
+ // get and set for private data members
+ UINT32 getVbRefNum ();
+ void setVbRefNum ();
+
+protected: // methods
+
+private:
+ bool buildMsMsgCommon ();
+ T_CNI_RIL3_RESULT sendMsMsg ();
+
+ bool sendVbMsg (SMS_VBLINK_MSGTYPE, UINT32 ,
+ UINT8* , UINT32 status = 0,
+ UINT32 tempRefNum = 0 );
+
+private: // data members
+
+ SmsLeg& parent_;
+
+ // MS output message
+ T_CNI_RIL3SMS_CP_MSG msOutMsg_;
+
+ // VBLink output message
+ SmsVblinkMsg_t vbOutMsg_;
+public:
+
+};
+
+
+#endif //__SMSMSGBUILDER_H__ \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/cc_util_ext.h b/data/mnet/GP10/Host/Common_To_Host/cc/cc_util_ext.h
new file mode 100644
index 0000000..6db3350
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/cc_util_ext.h
@@ -0,0 +1,24 @@
+#ifndef __CC_UTIL_EXT_H__
+#define __CC_UTIL_EXT_H__
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+//
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : cc_util_ext.h
+// Author(s) : Igal Gutkin
+// Create Date : 04-11-01
+// Description : CC API for external modules
+//
+// *******************************************************************
+
+bool CcNotifyPurge (short ludbIndex);
+
+#endif //__CC_UTIL_EXT_H__ \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/hortp.h b/data/mnet/GP10/Host/Common_To_Host/cc/hortp.h
new file mode 100644
index 0000000..88d5e2c
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/hortp.h
@@ -0,0 +1,36 @@
+#ifndef HORTP_HDR_INC
+#define HORTP_HDR_INC
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <vxworks.h>
+#include "voip/jetrtp.h"
+#include "csunew/csu_intf.h"
+
+#define HANDOVER_RTP_POOL_BEGIN 18000
+#define MAX_HANDOVER_CHANNELS 12
+
+
+typedef struct {
+ HJCRTPSESSION RtpHandle;
+ BOOL Used;
+ short LocalPort;
+} HANDOVER_CHANNEL, *PHANDOVER_CHANNEL;
+
+
+BOOL InitializeHandoverRtpPool(void);
+HJCRTPSESSION AssignHandoverRtpChannel(void);
+void ReleaseHandoverRtpChannel(HJCRTPSESSION RtpHandle);
+UINT16 GetIncomingHandoverRtpPort(HJCRTPSESSION RtpHandle);
+void SetRemoteHandoverRtpPort(HJCRTPSESSION RtpHandle,UINT32 ip,UINT16 port);
+RTP_READ_STATUS HoRtpEventHandler(HJCRTPSESSION RtpHandle,void *Context);
+void HoRtpFastReadHandler(HJCRTPSESSION RtpHandle,unsigned char *newPacket,int packetLength,rtpParam RtpParam,void *Context);
+
+#endif /* #ifndef HORTP_HDR_INC */
diff --git a/data/mnet/GP10/Host/Common_To_Host/cc/smqueue.h b/data/mnet/GP10/Host/Common_To_Host/cc/smqueue.h
new file mode 100644
index 0000000..b94ab3f
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cc/smqueue.h
@@ -0,0 +1,122 @@
+#ifndef __SMQUEUE_H__
+#define __SMQUEUE_H__
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : smqueue.h
+// Author(s) : Igal Gutkin
+// Create Date : 26-05-00
+// Description : Session Manager queue for SAPI=3 messages
+//
+// *******************************************************************
+
+#include "lapdm\lapdm_l3intf.h"
+
+//Forward definition
+class CCSessionHandler;
+class CCHandover ;
+
+// Queue message capacity
+#define MAX_SM_QUEUE_DEPTH 5
+
+
+class SmQueueBasic
+{
+
+public:
+ SmQueueBasic () : queueCounter_(0), queueLock_(false){;}
+
+ ~SmQueueBasic () {;}
+
+ bool isEmpty () {return (queueCounter_ == 0);}
+ bool isFull () {return (queueCounter_ >= MAX_SM_QUEUE_DEPTH);}
+
+ void lock () {queueLock_ = true ; }
+ void unlock () {queueLock_ = false; }
+ bool isLocked () {return (queueLock_);}
+
+ // Remove the data from the queue
+ void reset () {initData ();}
+
+ // Send all the queued messages
+ virtual
+ void flash () = 0;
+
+
+protected:
+
+ virtual
+ void initData () {queueCounter_ = 0; queueLock_ = false;}
+
+// Data members
+ unsigned queueCounter_;
+ bool queueLock_ ;
+
+private:
+
+};
+
+
+class SmQueue : public SmQueueBasic
+{
+
+public:
+ SmQueue (CCSessionHandler *smHandler) : SmQueueBasic(), parent_(*smHandler) {;}
+ ~SmQueue () {;}
+
+
+ // Send all the queued messages
+ virtual
+ void flash ();
+
+ // Add new message to the queue. Returns false in the queue is full
+ bool add (const T_CNI_LAPDM_L3MessageUnit *);
+
+protected:
+
+// Data members
+ T_CNI_LAPDM_L3MessageUnit storage_ [MAX_SM_QUEUE_DEPTH];
+ CCSessionHandler& parent_ ;
+
+private:
+
+};
+
+
+class SmQueueMm : public SmQueueBasic
+{
+
+public:
+ SmQueueMm (CCHandover *hoHandler) : SmQueueBasic(), parent_(*hoHandler) {;}
+ ~SmQueueMm () {;}
+
+
+ // Send all the queued messages
+ virtual
+ void flash ();
+
+ // Add new message to the queue. Returns false in the queue is full
+ bool add (const IntraL3Msg_t *);
+
+protected:
+
+// Data members
+ IntraL3Msg_t storage_ [MAX_SM_QUEUE_DEPTH];
+ CCHandover& parent_ ;
+
+private:
+
+};
+
+
+#endif //__SMQUEUE_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/cdcUtils/CPU_Mon.h b/data/mnet/GP10/Host/Common_To_Host/cdcUtils/CPU_Mon.h
new file mode 100644
index 0000000..cd9fc6f
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cdcUtils/CPU_Mon.h
@@ -0,0 +1,37 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/********************************************************************
+*
+* FILE NAME: CPU_Mon.h
+*
+* DESCRIPTION: This file contains definitions for the DS1780 operation.
+*
+* NOTES:
+*
+* VERSION: 1.0 10/06/99 14:45:15
+*
+* SCCS ID: "@(#)CPU_Mon.h"
+*
+********************************************************************/
+
+#if !defined(CPU_MON_H)
+#define CPU_MON_H
+
+typedef struct
+{
+ UINT8 _2_5_V_Mon_Value;
+ UINT8 _3_3_V_Mon_Value;
+ UINT8 _5_V_Mon_Value;
+
+ UINT8 Temp_Mon_Value;
+ UINT8 Chassis_Intrusion_Status;
+
+} t_DS1780;
+
+
+#endif /* CPU_MON_H */
diff --git a/data/mnet/GP10/Host/Common_To_Host/cdcUtils/CPU_Mon_IF.h b/data/mnet/GP10/Host/Common_To_Host/cdcUtils/CPU_Mon_IF.h
new file mode 100644
index 0000000..20e09b0
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cdcUtils/CPU_Mon_IF.h
@@ -0,0 +1,36 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/********************************************************************
+*
+* FILE NAME: CPU_Mon_IF.h
+*
+* DESCRIPTION: This file contains extern prototypes for the DS1780 code.
+*
+* NOTES:
+*
+* VERSION: 1.0 10/06/99 14:45:15
+*
+* SCCS ID: "@(#)CPU_Mon_IF.h"
+*
+********************************************************************/
+
+#if !defined(CPU_MON_IF_H)
+#define CPU_MON_IF_H
+
+#include "dsp/dsptypes.h"
+#include "CPU_Mon.h"
+
+/* CPU_Mon.c Extern Prototypes */
+
+extern STATUS DS1780_Init (void);
+extern STATUS DS1780_Poll (void);
+extern STATUS DS1780_Read (t_DS1780 *data);
+extern STATUS DS1780_Set_Voltage_Thresholds(UINT8 Threshold_ID, UINT8 High, UINT8 Low);
+extern STATUS DS1780_Set_Temp_Thresholds (UINT8 High, UINT8 Low);
+
+#endif /* CPU_MON_IF_H */
diff --git a/data/mnet/GP10/Host/Common_To_Host/cdcUtils/auxPort.h b/data/mnet/GP10/Host/Common_To_Host/cdcUtils/auxPort.h
new file mode 100644
index 0000000..c47234c
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cdcUtils/auxPort.h
@@ -0,0 +1,74 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+#ifndef AUXPORT_H
+#define AUXPORT_H
+
+/* Prototypes for AuxPort Functions */
+void auxPortOutSet
+(
+ int val, /* value to write to aux out port */
+ int mask /* bit mask with which to set the value */
+);
+
+
+UINT auxPortOutGet(void);
+
+
+/* Output Auxillary port bit definitionas */
+
+#define CF_RESET 0x80000000
+#define LED1_OFF 0x40000000 /* led 1 active low */
+#define LED2_OFF 0x20000000 /* led 2 active low */
+#define LED3_OFF 0x10000000 /* led 3 active low */
+#define FAULT_LED_OFF 0x08000000 /* fault led active low */
+#define NET_ID_MASK 0x06000000
+
+#define RF1_EN 0x00800000 /* RF1 enable */
+#define RF2_EN 0x00400000 /* RF2 enable */
+#define GSM_SYNC1 0x00200000
+#define GSM_SYNC2 0x00100000
+
+#define WATCH_DOG 0x00040000
+#define GPS_RESET 0x00020000
+#define RF_RESET_NOT 0x00010000
+
+
+#define EXT_RST 0x00002000
+
+#define DSPA_RST_NOT 0x00000800 /* 0 - DSPA reset */
+#define DSPB_RST_NOT 0x00000400 /* 0 - DSPB reset */
+#define CPU2BBA1 0x00000200
+#define CPU2BBA2 0x00000100
+#define FPGA_DCLK 0x00000080 /* clock for FPGA download */
+#define FPGA_DATA 0x00000040 /* data for FPGA download */
+#define FPGA_NCONFIG 0x00000020 /* signal for FPGA download */
+#define CDC_POWER_OFF 0x00000010 /* 1 - cdc power off */
+#define LED5_ON 0x00000008 /* led 5 active high */
+#define CPU2BBB1 0x00000004 /* signal 1 to base band FPGA */
+#define CPU2BBB2 0x00000002 /* signal 2 to base band FPGA */
+#define SEL_DEBUG 0x00000001 /* SMC2 use: 0 - GPS, 1 - debug */
+
+/* Input Auxillary port bit definitionas */
+
+#define SYNTH1_LOCKED 0x80000000 /* synthesizer1 locked */
+#define SYNTH2_LOCKED 0x40000000 /* synthesizer1 locked */
+#define RF1_PRESENT 0x20000000 /* RF Module 1 present */
+#define RF2_PRESENT 0x10000000 /* RF Module 2 present */
+#define LIU_ID_MASK 0x0E000000
+#define FPGA1A 0x01000000 /* signal 1 from fpga 1 */
+#define FPGA2A 0x00800000 /* signal 2 from fpga 1 */
+#define FRDY 0x00400000 /* Flash Ready */
+#define BCF_CD1 0x00100000 /* compactFlash card detect 1 */
+#define BCF_CD2 0x00080000 /* compactFlash card detect 1 */
+#define BCF_RDY 0x00040000 /* compactFlash ready */
+#define FPGA1B 0x00020000 /* signal 1 from fpga 2 */
+#define FPGA2B 0x00010000 /* signal 2 from fpga 2 */
+
+
+
+#endif /* AUXPORT_H */
diff --git a/data/mnet/GP10/Host/Common_To_Host/cdcUtils/cdcUtils.h b/data/mnet/GP10/Host/Common_To_Host/cdcUtils/cdcUtils.h
new file mode 100644
index 0000000..ff31eb7
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cdcUtils/cdcUtils.h
@@ -0,0 +1,41 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/* *******************************************************************/
+
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : cdcUtils.h */
+
+/* *******************************************************************/
+
+#ifndef cdcUtils_H
+#define cdcUtils_H
+
+
+/*---- Function Declarations ----*/
+
+/*******************************************************************************
+cdcSerialNumReturn - CDC Serial Number Return
+
+*/
+char* cdcSerialNumReturn();
+
+/*******************************************************************************
+cdcMacAddrGet - CDC MAC Address Get
+
+*/
+char* cdcMacAddrGet();
+
+void dspReset(void);
+
+int ldCoff(char *file, char *base_prefix);
+
+STATUS LoadDSPCode(char *fileName, char *base_prefix);
+
+
+#endif /* cdcUtils_H */
diff --git a/data/mnet/GP10/Host/Common_To_Host/cdcUtils/drfInterface.h b/data/mnet/GP10/Host/Common_To_Host/cdcUtils/drfInterface.h
new file mode 100644
index 0000000..8312750
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cdcUtils/drfInterface.h
@@ -0,0 +1,100 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/* drf status bits */
+#define EEPROM_REQUIRED 0x8000 /* EEPROM contents required */
+#define EEPROM_DEFAULT_USED 0x4000 /* Default EEPROM values in use */
+#define FPGA_SYNC_LOST 0x2000 /* FPGA sychronization lost */
+#define PLL_IF_LOCK 0x0080 /* Intermediate Frequencey PLL Lock Detect */
+#define PLL_2B_LOCK 0x0040 /* Transceiver 2B PLL Lock Detect */
+#define PLL_2A_LOCK 0x0020 /* Transceiver 2A PLL Lock Detect */
+#define PLL_1_LOCK 0x0010 /* Transceiver 1 PLL Lock Detect */
+#define PLL_REF_LOCK 0x0008 /* Reference Frequency PLL Lock Detect */
+#define PLL_MON_LOCK 0x0004 /* Monitor Frequency PLL Lock Detect */
+
+
+typedef enum
+{
+ Mon,
+ Ref,
+ T1,
+ T2A,
+ T2B,
+ IF
+}PLLType;
+
+
+extern STATUS drfPllRefFreqSet /* RETURN : OK, ERROR */
+ (
+ unsigned int freq /* IN : the freq to set */
+ );
+
+extern int drfPllRefFreqGet(); /* RETURN : 0 - 10Mhz, 1 - 13Mhz, -1 - Error */
+
+extern STATUS drfNullAttenSet /* RETURN : OK, ERROR */
+ (
+ int attenLevel /* IN : attenuation Level * 10 */
+ );
+
+extern STATUS drfNullAttenGet /* RETURN : OK, ERROR */
+ (
+ int* level /* OUT : Attenuator level * 10 */
+ );
+
+extern STATUS drfNullAttenMin(); /* RETUEN : OK, ERROR */
+
+extern int drfLockStatGet /* RETUEN : 0 - not locked, 1 - locked, -1 - error */
+ (
+ PLLType pll /* IN : pll type */
+ );
+
+extern int drfRSSIGet(); /* RETURN : RSSI or -1 for error */
+
+extern STATUS drfLoopbackSet /* RETURN : OK, ERROR */
+ (
+ int txNum, /* IN : transmitter, 0 or 1 */
+ int lowHigh /* IN : 0 - set low, !0 - set high */
+ );
+
+extern STATUS drfTxPwrSet /* RETURN : OK, ERROR */
+ (
+ int txNum, /* IN : transmitter, 0 or 1 */
+ int lowHigh /* IN : 0 - set low, !0 - set high */
+ );
+
+extern STATUS drfFpgaTxPwrEnable /* RETURN : OK, ERROR */
+ (
+ int txNum /* IN : transmitter, 0 or 1 */
+ );
+
+extern STATUS drfFpgaTxPwrDisable /* RETURN : OK, ERROR */
+ (
+ int txNum /* IN : transmitter, 0 or 1 */
+ );
+
+extern STATUS drfFreqHopEnable(); /* RETURN : OK, ERROR */
+
+extern STATUS drfFreqHopDisable(); /* RETURN : OK, ERROR */
+
+extern STATUS drfStatGet /* RETURN: OK ro ERROR */
+ (
+ int* pStatus /* OUT: drf status here */
+ );
+
+extern char* drfVersionReturn();
+
+extern char* drfSerialNumReturn();
+
+extern int drfTypeGet(); /* RETUEN: 0,1,2, or -1 */
+
+
+
+extern int drfFreqHopGet /* RETURN: TRUE /FALSE */
+ (
+ UINT trx /* IN: trx number */
+ );
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/cdc_bsp/bootflash.h b/data/mnet/GP10/Host/Common_To_Host/cdc_bsp/bootflash.h
new file mode 100644
index 0000000..0bd3592
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cdc_bsp/bootflash.h
@@ -0,0 +1,84 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/*
+JetCell modification history
+----------------------------
+99/07/29 to Initial Version
+*/
+
+/*
+ * File name : bootFlash.h
+ * Description : Constants and Definitions for bootFlash.h
+ * History:
+ *
+ */
+
+#ifndef _BOOTFLASH_H
+#define _BOOTFLASH_H
+
+#include "vxWorks.h"
+
+
+
+
+/******************************************************************************
+*
+* vxBootLoadHex - load a hex (Motorola S-Records) bootfile into the bootflash.
+*
+* This routine will program the bootflash with the specified file. Entire
+* sectors will be erased as needed to program the data.
+*
+* RETURNS: OK, ERROR.
+*/
+extern STATUS vxBootLoadHex ( char *fileName );
+
+/******************************************************************************
+*
+* vxBootLoadBin - load a binary bootfile into the bootflash.
+*
+* This routine will program the bootflash with the specified file. Entire
+* sectors will be erased as needed to program the data.
+*
+* RETURNS: OK, ERROR.
+*/
+extern STATUS vxBootLoadBin ( char *fileName );
+
+
+extern STATUS flashInit(void);
+
+
+extern int flashGetMfgId (void);
+extern int flashGetDevId (void);
+extern int flashGetNumSect (void);
+extern int flashGetSectSize (void);
+extern STATUS flashErase (void);
+extern STATUS flashSectorErase (unsigned int sector);
+extern STATUS flashReset (void);
+extern STATUS flashProgram (unsigned int flashAddr, unsigned char *data, int length);
+extern STATUS flashProgramNoErase (unsigned int flashAddr, unsigned char *data, int length);
+
+
+
+
+
+
+typedef struct {
+ int (*flashGetMfgId) (void);
+ int (*flashGetDevId) (void);
+ int (*flashGetNumSect) (void);
+ int (*flashGetSectSize) (void);
+ STATUS (*flashErase) (void);
+ STATUS (*flashSectorErase) (unsigned int sector);
+ STATUS (*flashReset) (void);
+ STATUS (*flashProgram) (unsigned int flashAddr, unsigned char *data, int length);
+ STATUS (*flashProgramNoErase) (unsigned int flashAddr, unsigned char *data, int length);
+} flashDevice_t;
+
+
+
+#endif /* _BOOTFLASH_H */
diff --git a/data/mnet/GP10/Host/Common_To_Host/cdc_bsp/i2c.h b/data/mnet/GP10/Host/Common_To_Host/cdc_bsp/i2c.h
new file mode 100644
index 0000000..f1c1d13
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cdc_bsp/i2c.h
@@ -0,0 +1,138 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/*
+JetCell modification history
+----------------------------
+99/06/01 ck Initial Version
+*/
+
+/*
+ * File name : i2c.h
+ * Description : Constants and Definitions for I2C
+ * History:
+ *
+ * 06-19-97 stu Initial Version
+ *
+ */
+
+#ifndef _I2C_H
+#define _I2C_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ==================== GENERAL CONSTANTS AND DEFINITIONS =============== */
+
+#define TRUE 1
+#define FALSE 0
+
+#define ON 1
+#define OFF 0
+
+/* ================== APPLICATION CONSTANTS AND DEFINITIONS =============== */
+#define I2C_BASE 0x3c80
+#define RPBASE I2C_BASE
+
+#define I2C_RBASE(base) (CAST(VUINT16 *) (base + RPBASE + 0x00))
+#define I2C_TBASE(base) (CAST(VUINT16 *) (base + RPBASE + 0x02))
+#define I2C_RFCR(base) (CAST(VUINT8 *) (base + RPBASE + 0x04))
+#define I2C_TFCR(base) (CAST(VUINT8 *) (base + RPBASE + 0x05))
+#define I2C_MRBLR(base) (CAST(VUINT16 *) (base + RPBASE + 0x06))
+#define I2C_RSTATE(base) (CAST(VUINT32 *) (base + RPBASE + 0x08))
+#define I2C_RBPTR(base) (CAST(VUINT16 *) (base + RPBASE + 0x10))
+#define I2C_TSTATE(base) (CAST(VUINT32 *) (base + RPBASE + 0x18))
+#define I2C_TBPTR(base) (CAST(VUINT16 *) (base + RPBASE + 0x20))
+
+/*
+ * Definitions for ATMEL AT24C01 EEPROM
+ */
+
+/* Hard-wired E2PROM Address -- Determined by Board Designer */
+#define E2PROM_ADDR (0x50)
+
+/* MPC860 I2C address */
+#define MPC860_I2C_ADDR (0x66)
+
+/*
+ * AT24C01 EEPROM Data Sheet specifies a maximum serial clock frequency
+ * of 400 KHz
+ *
+ * ==> Provide an overal clock divider of >=60 for 24MHz System Clock
+ */
+#define BAUD_PREDIV_AT24C01 (0x0)
+#define BAUD_DIV_AT24C01 (0x10)
+#define LONGTIME 0x00100000
+
+/* ----------------------------------------------------------------- */
+
+/* Transmit Buffer Descriptor Indices */
+#define TXBD_0 0
+#define TXBD_1 1
+
+/* I2C Read/Write Bit Definitions */
+#define WRITE_BIT (0) /* write from mpc821 to eeprom */
+#define READ_BIT (1) /* read from eeprom to mpc821 */
+
+/* Transmit Buffer Descriptor Control and Status Bit Definitions */
+#define TXBD_R (0x8000)
+#define TXBD_W (0x2000)
+#define TXBD_I (0x1000)
+#define TXBD_L (0x0800)
+#define TXBD_S (0x0400)
+#define TXBD_N (0x0004)
+
+/* Receive Buffer Descriptor Control and Status Bit Definitions */
+#define RXBD_E (0x8000)
+
+/* Interrupt Level */
+#define INTERRUPT_LEVEL (4)
+
+/* SIU Vector Interrupt Code: Level 4 */
+#define IC_LEVEL_4 (0x24)
+
+/* I2C Bit in CPM In-Service Interrupt Register */
+#define I2C_INTERRUPT (1<<16)
+
+/* I2C Interrupt Vector Code in CPM Vector Register (CIVR) */
+#define I2C_VECTOR (0x10)
+
+/* Address of I2C Condition Flag */
+#define I2C_FLAG_LOC (0x50000)
+
+#define I2C_RX_LEN (512) /* Rx Maximum characters */
+#define I2C_TX_LEN (512) /* Tx Maximum characters */
+
+/*
+ * Buffer Descriptor Format
+ */
+
+typedef struct I2C_BufferDescriptor {
+ unsigned short bd_cstatus; /* control and status */
+ unsigned short bd_length; /* transfer length */
+ unsigned char *bd_addr; /* Pointer to Buffer */
+} I2C_BD;
+
+typedef struct rx_tx_bd {
+ I2C_BD rxbd;
+ I2C_BD txbd[2];
+} RTXBD;
+
+extern STATUS I2Cwrite(unsigned char*, unsigned char, unsigned char, int);
+extern STATUS I2Cread(unsigned char*, unsigned char, unsigned char, int);
+extern STATUS I2Cwrite2(unsigned char*, unsigned char, int);
+extern STATUS I2Cread2(unsigned char*, unsigned char, int);
+extern void I2Coperation(int);
+extern void RxBD(int);
+extern int readRxBD(unsigned char *, int);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _I2C_H */
diff --git a/data/mnet/GP10/Host/Common_To_Host/cdc_bsp/nvRam.h b/data/mnet/GP10/Host/Common_To_Host/cdc_bsp/nvRam.h
new file mode 100644
index 0000000..6cf6f62
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cdc_bsp/nvRam.h
@@ -0,0 +1,97 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/*
+JetCell modification history
+----------------------------
+99/07/19 to Initial Version
+*/
+
+/*
+ * File name : nvRam.h
+ * Description : Constants and Definitions for NV Ram
+ * History:
+ *
+ */
+
+#ifndef _NVRAM_H
+#define _NVRAM_H
+
+#include "bootFlash.h"
+
+/* Definitions for power on tests */
+#define POST_PASS 1
+#define POST_FAIL 0
+#define POST_ENABLE_TEST 1
+#define POST_DISABLE_TEST 0
+
+/* Amount of stack memory tested at initial startup */
+#define STACK_MEM_TEST_SIZE 0x10000
+
+#define MPC860_SDRAM_TEST 0x1
+#define DSP_0_INTERNAL_DATA_RAM_TEST 0x2
+#define DSP_0_INTERNAL_PROG_RAM_TEST 0x4
+#define DSP_0_EXTERNAL_RAM_TEST 0x8
+#define DSP_1_INTERNAL_DATA_RAM_TEST 0x10
+#define DSP_1_INTERNAL_PROG_RAM_TEST 0x20
+#define DSP_1_EXTERNAL_RAM_TEST 0x40
+#define FPGA_0_TEST 0x80
+#define FPGA_1_TEST 0x100
+#define I2C_TEST 0x200
+#define ALL_POWER_ON_TESTS (MPC860_SDRAM_TEST | \
+ DSP_0_INTERNAL_DATA_RAM_TEST | \
+ DSP_0_INTERNAL_PROG_RAM_TEST | \
+ DSP_0_EXTERNAL_RAM_TEST | \
+ DSP_1_INTERNAL_DATA_RAM_TEST | \
+ DSP_1_INTERNAL_PROG_RAM_TEST | \
+ DSP_1_EXTERNAL_RAM_TEST | \
+ FPGA_0_TEST | \
+ FPGA_1_TEST | \
+ I2C_TEST )
+
+#define NV_RAM_SECT_FROM_END 8
+#define NV_RAM_SIZE (NV_RAM_SECT_FROM_END * flashGetSectSize())
+
+
+#define MAX_VC_SN 64 /* Max length of the ViperCell serial number */
+#define MAX_VC_PN 64 /* Max length of the ViperCell part number */
+#define MAX_CDC_SN 64 /* Max length of the CDC serial number */
+#define MAX_CDC_PN 64 /* Max length of the CDC part number */
+
+#define RADIO_BOARD_EEPROM_SIZE 512
+#define CLOCK_BOARD_EEPROM_SIZE 20
+
+extern STATUS postSetTestResult (unsigned int testBit, unsigned int result);
+extern unsigned int postGetTestResult (unsigned int testBit);
+extern STATUS postSetTestMask (unsigned int testBit, unsigned int mask);
+extern unsigned int postGetTestMask (unsigned int testBit);
+
+extern STATUS sysIpAddrSet (char *ipAddr);
+extern STATUS sysIpAddrGet (char *ipAddr);
+
+extern STATUS sysSerialNumSet (char *sn);
+extern STATUS sysSerialNumGet (char *p);
+extern STATUS sysVCPartNumSet (char *partNum);
+extern STATUS sysVCPartNumGet (char *partNum);
+extern STATUS sysCDCSerialNumSet (char *serNum);
+extern STATUS sysCDCSerialNumGet (char *serNum);
+extern STATUS sysCDCPartNumSet (char *partNum);
+extern STATUS sysCDCPartNumGet (char *partNum);
+
+extern STATUS sysRadioBoardEepromGet(char *pEeprom);
+extern STATUS sysRadioBoardEepromSet(char *pEeprom);
+extern int sysIsRadioBoardEepromSet();
+
+extern STATUS sysClockBoardEepromGet(char *pEeprom);
+extern STATUS sysClockBoardEepromSet(char *pEeprom);
+extern int sysIsClockBoardEepromSet();
+
+extern int sysNvRamGet (char *, int, int);
+extern int sysNvRamSet (char *, int, int);
+
+
+#endif /* _NVRAM_H */
diff --git a/data/mnet/GP10/Host/Common_To_Host/cdc_bsp/readme.txt b/data/mnet/GP10/Host/Common_To_Host/cdc_bsp/readme.txt
new file mode 100644
index 0000000..dbe581b
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cdc_bsp/readme.txt
@@ -0,0 +1,16 @@
+
+
+Note: All of the files in this directory are soft links. To check out
+ any of these files go to the GP10/Host/Cdc_bsp directory.
+
+
+If you need to make another soft link, here is the syntax:
+
+From a DOS window in this directory:
+cleartool ln -s <"Path to Top of view"\"directory"\filename filename
+
+Example:
+
+cleartool ln -s ..\..\..\..\GP10\Host\Oam\include\oam_api.h oam_api.h
+
+Note: The path is case sensitive !! \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Common_To_Host/cdc_bsp/sysuser.h b/data/mnet/GP10/Host/Common_To_Host/cdc_bsp/sysuser.h
new file mode 100644
index 0000000..b6cb97b
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cdc_bsp/sysuser.h
@@ -0,0 +1,93 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+#include <loginLib.h>
+
+
+#define MAX_NUM_USERS 100
+
+#define MAX_USER_NAME_LEN 40 /* cannot exceed MAX_LOGIN_NAME_LEN */
+#define MAX_USER_PASSWD_LEN 40 /* cannot exceed 40 */
+
+
+/*******************************************************************************
+sysUserInit - User Initialize
+
+This function initializes the System User sub system. It should be called once
+during vxWorks initialization.
+*/
+void sysUserInit();
+
+/*******************************************************************************
+sysUserAdd - User Add
+
+Adds a user to the list of valid system user.
+
+Adds a user name and password entry to user record file and optionally adds the
+user to login table. If user level is 0 ('super' user) user is added to
+vxWorks login table.
+*/
+STATUS sysUserAdd /* RETURN: OK/ERROR */
+ (
+ const char *name, /* IN: user name. Max.len. MAX_USER_NAME_LEN */
+ const char *passwd, /* IN: user password. Max. len MAX_USER_PASSWD_LEN */
+ int level /* IN: user permission level */
+ );
+
+
+/*******************************************************************************
+sysUserDelete - User Delete
+
+Deletes the user with given user name from list of valid users,
+
+Deletes from user info. file and if user level is 0 from the vxWorks login
+table. Last user with permission level 0 cannot be deleted.
+*/
+STATUS sysUserDelete /* RETURN: OK/ERROR */
+ (
+ const char *name /* IN: user name */
+ );
+
+
+/*******************************************************************************
+sysUserVerify - User Verify
+
+Verifies if given user is valid system user. Checks for user name and password
+in the user recoed file. If default user name is in use it is returned as valid
+user name. If there us erro reading user record file default user is considerd
+a valid user.
+*/
+int sysUserVerify /* RETURN: permission level, -1 if not a user */
+ (
+ char *name, /* IN: user name */
+ char *passwd /* IN: user password */
+ );
+
+
+/*******************************************************************************
+sysUserPasswdChange - User Password Channge
+
+Chnages the password of a user.
+*/
+STATUS sysUserPasswdChange /* RETURN: OK/ERROR */
+ (
+ char *name, /* IN: user name. Max.len. MAX_USER_NAME_LEN */
+ char *oldPasswd, /* IN: old user password. */
+ char *passwd /* OUT: new user password. Max. len MAX_USER_PASSWD_LEN */
+ );
+
+
+/*******************************************************************************
+sysUserAllGet - User All Get
+
+Provides the list of current valid system user names.
+*/
+STATUS sysUserAllGet /* RETURN: OK/ERROR */
+ (
+ char *names /* OUT: user names seperated by \n */
+ );
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/cdr/CdrVoiceCall.h b/data/mnet/GP10/Host/Common_To_Host/cdr/CdrVoiceCall.h
new file mode 100644
index 0000000..4a30ea4
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/cdr/CdrVoiceCall.h
@@ -0,0 +1,115 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+// CdrVoiceCall.h: interface for the CCdrVoiceCall class.
+//
+//////////////////////////////////////////////////////////////////////
+#ifndef _CDR_VOICECALL_H_
+#define _CDR_VOICECALL_H_
+
+#ifdef VXWORKS
+#include "cdr\include\CdrBase.h"
+
+class CCdrVoiceCall : public CCdrBase
+{
+private:
+ bool isInit ;
+// bool is
+ CCdrFieldIMEI served_imei ; // fix string length = 15
+ CCdrFieldE164 calling_party_number; // max string length = 23
+ CCdrFieldE164 called_party_number ; // max string length = 23
+ CCdrFieldLACID la_cell_id ; // max string length = 14
+ unsigned char loc_change_count ; // 0..5
+ CCdrFieldLACID loc_change_la_cid[5];
+ CCdrFieldDateTime loc_change_time [5];
+ CCdrFieldDateTime seisure_time ; // fix string length = 15
+ CCdrFieldDateTime answer_time ; // fix string length = 15
+ CCdrFieldDateTime release_time ; // fix string length = 15
+ CCdrFieldDateTime begin_time ; // fix string length = 15
+ CCdrFieldDateTime end_time ; // fix string length = 15
+ T_CNI_RIL3_CAUSE_VALUE cc_cause ;
+ CdrRecCauseTerm_t cdr_cause ;
+ unsigned long call_duration ;
+ int transaction_id ;
+ unsigned short q931_crv ;
+ unsigned short seq_number ;
+ bool emergency_call ;
+ T_CDR_FIELD_STATUS radioChannelUsedStatus ;
+ unsigned char radio_channel_used_bearer_type;
+ unsigned char radio_channel_used_codec ;
+
+ void seisure (int newTI);
+ void initLaChange ();
+
+public:
+ CCdrVoiceCall ();
+ virtual ~CCdrVoiceCall () {};
+
+ virtual void initialize ();
+
+ void setServedIMEI (T_CNI_RIL3_IE_MOBILE_ID *p_imei );
+ void setCallingPartyNumber (T_SUBSC_IE_ISDN *p_CgPN );
+ void setCallingPartyNumber (T_CNI_RIL3_IE_CALLING_PARTY_BCD_NUMBER *);
+ void setCalledPartyNumber (T_SUBSC_IE_ISDN *p_CdPN );
+ void setCalledPartyNumber (T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER *);
+ void setLocationAreaCID (T_CNI_RIL3_IE_LOCATION_AREA_ID * ,
+ T_CNI_RIL3_IE_CELL_ID * );
+
+ void setQ931Crv (unsigned short crv ) { q931_crv = crv; };
+ void seisure_NormalOrigination (int trans_id);
+ void seisure_EmergencyOrigination(int trans_id);
+ void seisure_NormalTermination (int trans_id);
+ void answer (unsigned char bear_type,
+ unsigned char codec );
+ void generateCallRecord (bool partial);
+ void release (T_CNI_RIL3_CAUSE_VALUE cc_cause_value ,
+ CdrRecCauseTerm_t cdr_cause_value);
+ void handover (T_CNI_RIL3_IE_LOCATION_AREA_ID *p_la_id ,
+ T_CNI_RIL3_IE_CELL_ID *p_cell_id);
+};
+
+
+// Sample usage of VoiceCall record for normal orignation case
+//
+// #include "CdrVoiceCall.h"
+// ....
+// {
+// CCdrVoiceCall moc_record;
+// .....
+// ..... // when call get originated
+// moc_record.setServedIMSI( <pointer-to-IMSI> );
+// moc_record.setServedMSISDN( <pointer-to-MSISDN> );
+// moc_record.setServedIMEI( <pointer-to-IMEI> );
+// moc_record.setCallingPartyNumber( <pointer-to-E164> );
+// moc_record.setCalledNumber( <pointer-to-E164> );
+// moc_record.seisure_NormalOrigination( <trana-id from RIL3 header> )
+// .....
+// .....
+// ..... // when receiving answer (connect_ack) from MS
+// moc_record.answer( <bear-type>, <codec> );
+// // need to start a 10 miniutes timer for long duration call
+// .....
+// ..... // when perfoming a handover to a new cell
+// moc_record.handover( <pointer-to-new-la-id>, <pointer-to-new-cell-id> );
+// .....
+// .....
+// ..... // when long duration timer expires
+// moc_record.generateCallRecord(true);
+// // re-start 10-minute long duration timer
+// .....
+// ..... // when call is disconnected (from either sides) or aborted duye to error
+// moc_record.release( <cc-cause-value>, <cdr-cause-value> );
+//
+// // at this point, the record is generated, and the moc_record can be safely discard!
+//
+// }
+
+
+
+
+
+#endif // VXWORKS
+#endif // _CDR_VOICECALL_H_
diff --git a/data/mnet/GP10/Host/Common_To_Host/grr/grr_const.h b/data/mnet/GP10/Host/Common_To_Host/grr/grr_const.h
new file mode 100644
index 0000000..2d3c755
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/grr/grr_const.h
@@ -0,0 +1,293 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*******************************************************************
+*/
+
+#ifndef __GRR_CONST_H__
+#define __GRR_CONST_H__
+
+#define GRR_OFF 0
+#define GRR_ON 1
+
+#define GRR_WDOG 1
+#define GRR_DSP_WDOG_EXPIRED 2
+#define GRR_INIT_WATCH_TIME 36000
+
+
+//GRR Task Options
+//
+#define GRR_TASK_PRIORITY 100
+#define GRR_TASK_STACK_SIZE 10000
+#define GRR_TASK_OPTION 0
+#define GRR_MAX_RXMSGS 100 // Max # of messages
+#define GRR_MAX_RXQMSG_LENGTH sizeof(T_CNI_RIL3MD_RRM_MSG)
+#define GRR_MAX_TXQMSG_LENGTH sizeof(T_CNI_RIL3MD_RRM_MSG)
+#define GRR_MAX_L1MSG_LEN 100
+#define GRR_MAX_GRRMSG_LEN 100
+
+//DSP initialization states
+#define GRR_TRXMGMT_S0_BOOTSTRAP_IND 1
+#define GRR_TRXMGMT_S1_TRXCONFIG_ACK 2
+#define GRR_TRXMGMT_S2_SLOTACTIV_ACK 3
+#define GRR_TRXMGMT_S3_TRXCONFIG_END 4
+
+//L1 message group defs
+#define GRR_L1MG_TRXMGMT 0x10
+#define GRR_L1MG_COMCHAN 0x0C
+#define GRR_L1MG_DEDMGMT 0x08
+#define GRR_L1MG_LNKMGMT 0x02
+#define GRR_L1MG_OAMMGMT 0x18
+
+//L1 message types
+
+#define GRR_L1MT_CBCHRTS 0x0300
+#define GRR_L1MT_CBCHRTS_MSB 0x03
+#define GRR_L1MT_CBCHRTS_LSB 0x00
+
+#define GRR_L1MT_PING 0x1300
+#define GRR_L1MT_PING_MSB 0x13
+#define GRR_L1MT_PING_LSB 0x00
+
+#define GRR_L1MT_PINGACK 0x1301
+#define GRR_L1MT_PINGACK_MSB 0x13
+#define GRR_L1MT_PINGACK_LSB 0x01
+
+#define GRR_L1MT_ARFCN 0x2900
+#define GRR_L1MT_ARFCN_MSB 0x29
+#define GRR_L1MT_ARFCN_LSB 0x00
+
+#define GRR_L1MT_BCCHINFO 0x0011
+#define GRR_L1MT_BCCHINFO_MSB 0x00
+#define GRR_L1MT_BCCHINFO_LSB 0x11
+
+#define GRR_L1MT_SYNCH 0x001D
+#define GRR_L1MT_SYNCH_MSB 0x00
+#define GRR_L1MT_SYNCH_LSB 0x1D
+
+#define GRR_L1MT_SYNCHACK 0x001E
+#define GRR_L1MT_SYNCHACK_MSB 0x00
+#define GRR_L1MT_SYNCHACK_LSB 0x1E
+
+#define GRR_L1MT_TRXCONFIG 0x1500
+#define GRR_L1MT_TRXCONFIG_MSB 0x15
+#define GRR_L1MT_TRXCONFIG_LSB 0x00
+
+#define GRR_L1MT_TRXCONFIGACK 0x1600
+#define GRR_L1MT_TRXCONFIGACK_MSB 0x16
+#define GRR_L1MT_TRXCONFIGACK_LSB 0x00
+
+#define GRR_L1MT_SACCHFILL 0x001A
+#define GRR_L1MT_SACCHFILL_MSB 0x00
+#define GRR_L1MT_SACCHFILL_LSB 0x1A
+
+#define GRR_L1MT_RFRESIND 0x0019
+#define GRR_L1MT_RFRESIND_MSB 0x00
+#define GRR_L1MT_RFRESIND_LSB 0x19
+
+#define GRR_L1MT_OVERLOAD 0x001B
+#define GRR_L1MT_OVERLOAD_MSB 0x00
+#define GRR_L1MT_OVERLOAD_LSB 0x1B
+
+#define GRR_L1MT_SLOTACTIV 0x1700
+#define GRR_L1MT_SLOTACTIV_MSB 0x17
+#define GRR_L1MT_SLOTACTIV_LSB 0x00
+
+#define GRR_L1MT_SLOTACTIVACK 0x1800
+#define GRR_L1MT_SLOTACTIVACK_MSB 0x18
+#define GRR_L1MT_SLOTACTIVACK_LSB 0x00
+
+#define GRR_L1MT_SLOTACTIVNACK 0x1900
+#define GRR_L1MT_SLOTACTIVNACK_MSB 0x19
+#define GRR_L1MT_SLOTACTIVNACK_LSB 0x00
+
+#define GRR_L1MT_SETUGAIN 0x1000
+#define GRR_L1MT_SETUGAIN_MSB 0x10
+#define GRR_L1MT_SETUGAIN_LSB 0x00
+
+#define GRR_L1MT_SETDGAIN 0x1100
+#define GRR_L1MT_SETDGAIN_MSB 0x11
+#define GRR_L1MT_SETDGAIN_LSB 0x00
+
+#define GRR_L1MT_TUNESYNTH 0x1200
+#define GRR_L1MT_TUNESYNTH_MSB 0x12
+#define GRR_L1MT_TUNESYNTH_LSB 0x00
+
+#define GRR_L1MT_CONFIGFPGADELAY 0x14
+#define GRR_L1MT_CONFIGFPGADELAY_MSB 0x14
+#define GRR_L1MT_CONFIGFPGADELAY_LSB 0x00
+
+#define GRR_L1MT_BOOTSTRAPCNF 0x2000
+#define GRR_L1MT_BOOTSTRAPCNF_MSB 0x20
+#define GRR_L1MT_BOOTSTRAPCNF_LSB 0x00
+
+#define GRR_L1MT_CHANACTIV 0x0021
+#define GRR_L1MT_CHANACTIV_MSB 0x00
+#define GRR_L1MT_CHANACTIV_LSB 0x21
+
+#define GRR_L1MT_CHANACTIVACK 0x0022
+#define GRR_L1MT_CHANACTIVACK_MSB 0x00
+#define GRR_L1MT_CHANACTIVACK_LSB 0x22
+
+#define GRR_L1MT_CHANACTIVNACK 0x0023
+#define GRR_L1MT_CHANACTIVNACK_MSB 0x00
+#define GRR_L1MT_CHANACTIVNACK_LSB 0x23
+
+#define GRR_L1MT_RFCHANREL 0x002E
+#define GRR_L1MT_RFCHANREL_MSB 0x00
+#define GRR_L1MT_RFCHANREL_LSB 0x2E
+
+#define GRR_L1MT_RFCHANRELACK 0x0033
+#define GRR_L1MT_RFCHANRELACK_MSB 0x00
+#define GRR_L1MT_RFCHANRELACK_LSB 0x33
+
+#define GRR_L1MT_RSL 0x0035
+#define GRR_L1MT_RSL_MSB 0x00
+#define GRR_L1MT_RSL_LSB 0x35
+
+#define GRR_L1MT_MEASRES 0x0028
+#define GRR_L1MT_MEASRES_MSB 0x00
+#define GRR_L1MT_MEASRES_LSB 0x28
+
+#define GRR_L1MT_MODEMODIFY 0x0029
+#define GRR_L1MT_MODEMODIFY_MSB 0x00
+#define GRR_L1MT_MODEMODIFY_LSB 0x29
+
+#define GRR_L1MT_ENCRYPTION 0x0026
+#define GRR_L1MT_ENCRYPTION_MSB 0x00
+#define GRR_L1MT_ENCRYPTION_LSB 0x26
+
+#define GRR_L1MT_MODEMODIFYACK 0x002A
+#define GRR_L1MT_MODEMODIFYACK_MSB 0x00
+#define GRR_L1MT_MODEMODIFYACK_LSB 0x2A
+
+#define GRR_L1MT_MODEMODIFYNACK 0x002B
+#define GRR_L1MT_MODEMODIFYNACK_MSB 0x00
+#define GRR_L1MT_MODEMODIFYNACK_LSB 0x2B
+
+#define GRR_L1MT_DEACTIVSACCH 0x0025
+#define GRR_L1MT_DEACTIVSACCH_MSB 0x00
+#define GRR_L1MT_DEACTIVSACCH_LSB 0x25
+
+#define GRR_L1MT_PHDATAREQ 0x0001
+#define GRR_L1MT_PHDATAREQ_MSB 0x00
+#define GRR_L1MT_PHDATAREQ_LSB 0x01
+
+#define GRR_L1MT_ASYNCHO_REQUIRED 0x0036
+#define GRR_L1MT_ASYNCHO_REQUIRED_MSB 0x00
+#define GRR_L1MT_ASYNCHO_REQUIRED_LSB 0x36
+
+#define GRR_L1MT_AYSNCHO_REQ 0x0037
+#define GRR_L1MT_AYSNCHO_REQ_MSB 0x00
+#define GRR_L1MT_AYSNCHO_REQ_LSB 0x37
+
+#define GRR_L1MT_DPCCFG 0x5000
+#define GRR_L1MT_DPCCFG_MSB 0x50
+#define GRR_L1MT_DPCCFG_LSB 0x00
+
+#define GRR_L1MT_DPCCFGACK 0x5001
+#define GRR_L1MT_DPCCFGACK_MSB 0x50
+#define GRR_L1MT_DPCCFGACK_LSB 0x01
+
+#define GRR_L1MT_HOSCELLCFG 0x5002
+#define GRR_L1MT_HOSCELLCFG_MSB 0x50
+#define GRR_L1MT_HOSCELLCFG_LSB 0x02
+
+#define GRR_L1MT_HOSCELLCFGACK 0x5003
+#define GRR_L1MT_HOSCELLCFGACK_MSB 0x50
+#define GRR_L1MT_HOSCELLCFGACK_LSB 0x03
+
+#define GRR_L1MT_HONCELLCFG 0x5004
+#define GRR_L1MT_HONCELLCFG_MSB 0x50
+#define GRR_L1MT_HONCELLCFG_LSB 0x04
+
+#define GRR_L1MT_HONCELLCFGACK 0x5005
+#define GRR_L1MT_HONCELLCFGACK_MSB 0x50
+#define GRR_L1MT_HONCELLCFGACK_LSB 0x05
+
+#define GRR_L1MT_BTSPACKAGE 0x5008
+#define GRR_L1MT_BTSPACKAGE_MSB 0x50
+#define GRR_L1MT_BTSPACKAGE_LSB 0x08
+
+#define GRR_L1MT_TXPWMAXRDCTCFG 0x5006
+#define GRR_L1MT_TXPWMAXRDCTCFG_MSB 0x50
+#define GRR_L1MT_TXPWMAXRDCTCFG_LSB 0x06
+
+#define OAM_L1MT_TXPWRMAXRDCTCFGACK 0x5007
+#define OAM_L1MT_TXPWRMAXRDCTCFGACK_MSB 0x50
+#define OAM_L1MT_TXPWRMAXRDCTCFGACK_LSB 0x07
+
+//Channel Number
+#define GRR_L1CH_TCHF 0x0800
+#define GRR_L1CH_TCHF_MSB 0x08
+#define GRR_L1CH_TCHF_LSB 0x00
+
+#define GRR_L1CH_SDCCH4 0x2000
+#define GRR_L1CH_SDCCH4_MSB 0x20
+#define GRR_L1CH_SDCCH4_LSB 0x00
+
+#define GRR_L1CH_RACH 0x8800
+#define GRR_L1CH_RACH_MSB 0x88
+#define GRR_L1CH_RACH_LSB 0x00
+
+#define GRR_L1CH_PCH 0x9000
+#define GRR_L1CH_PCH_MSB 0x90
+#define GRR_L1CH_PCH_LSB 0x00
+
+#define GRR_L1CH_AGCH 0x9000
+#define GRR_L1CH_AGCH_MSB 0x90
+#define GRR_L1CH_AGCH_LSB 0x00
+
+#define GRR_L1CH_BCCH 0x8000
+#define GRR_L1CH_BCCH_MSB 0x80
+#define GRR_L1CH_BCCH_LSB 0x00
+
+#define GRR_L1CH_CBCH 0xa000
+#define GRR_L1CH_CBCH_MSB 0xa0
+#define GRR_L1CH_CBCH_LSB 0x00
+
+//Link Identifer
+#define GRR_L1CH_MAIN 0x00
+#define GRR_L1CH_ACCH 0x40
+#define GRR_L1CH_VOID 0x20
+
+//Channel Mode
+#define GRR_L1CH_ACTTYPE_IMMASS 0x00
+#define GRR_L1CH_ACTTYPE_ASYNC_HO 0x02
+#define GRR_L1CH_ACTTYPE_CBCH 0x06
+#define GRR_L1CH_DTXCTRL_D0U0 0x00
+#define GRR_L1CH_DATATTR_SPEECH 0x01
+#define GRR_L1CH_DATATTR_DATA 0x02
+#define GRR_L1CH_DATATTR_SIGNALING 0x03
+#define GRR_L1CH_RATTYPE_SDCCH 0x01
+#define GRR_L1CH_RATTYPE_TCHF 0x08
+#define GRR_L1CH_CODALGO_NORES 0x00
+#define GRR_L1CH_CODALGO_GSMV1 0x01
+#define GRR_L1CH_CODALGO_GSMV2 0x21
+#define GRR_L1CH_CODALGO_GSMV3 0x41
+
+//Encription
+#define GRR_L1CH_CIPHNUL 0x01
+#define GRR_L1CH_CIPHKEY_LEN 9
+
+//System information
+#define GRR_L1SI_TYPE_8 0x00
+#define GRR_L1SI_TYPE_1 0x01
+#define GRR_L1SI_TYPE_2 0x02
+#define GRR_L1SI_TYPE_3 0x03
+#define GRR_L1SI_TYPE_4 0x04
+#define GRR_L1SI_TYPE_5 0x05
+#define GRR_L1SI_TYPE_6 0x06
+#define GRR_L1SI_TYPE_7 0x07
+#define GRR_L1SI_TYPE_13 0x0D
+
+// Air Interface standard
+#define GRR_L1ST_PCS1900 0x02
+
+
+#endif //__GRR_CONST_H__
+
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/grr/grr_data.h b/data/mnet/GP10/Host/Common_To_Host/grr/grr_data.h
new file mode 100644
index 0000000..83186e5
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/grr/grr_data.h
@@ -0,0 +1,118 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_DATA_H__
+#define __GRR_DATA_H__
+
+#include "grr_head.h"
+
+extern JCTask grrTaskObj;
+extern JCTask grrMonTaskObj;
+
+//G2TEST
+extern int grr_DbgDump;
+extern int grr_GprsCtrl;
+
+extern unsigned char grr_DspCiphCap;
+extern grr_OamData_t grr_OamData;
+extern grr_TrxMgmt_t grr_TrxMgmt[OAMgrr_MAX_TRXS];
+extern MSG_Q_ID grr_MsgQId;
+
+extern unsigned char grr_ItcRxOrigin;
+extern grr_ItcRxMsg_t grr_ItcRxMsg;
+
+extern grr_ItcRxDspMsg_t *grr_pItcRxDspMsg;
+extern grr_ItcRxRlcMsg_t *grr_pItcRxRlcMsg;
+extern grr_ItcRxGrrMsg_t *grr_pItcRxGrrMsg;
+extern grr_ItcRxOamMsg_t *grr_pItcRxOamMsg;
+extern grr_ItcRxRrmMsg_t *grr_pItcRxRrmMsg;
+
+extern T_CNI_RIL3RRM_MSG grr_Msg;
+extern grr_Si2_t grr_Si2;
+extern grr_Si3_t grr_Si3;
+extern grr_Si4_t grr_Si4;
+extern grr_Si5_t grr_Si5;
+extern grr_Si6_t grr_Si6;
+extern grr_Si13_t grr_Si13;
+
+
+//OAM tables definitions
+//
+extern const unsigned short grr_phTrxSelectBit[2]; //b14
+extern const unsigned short grr_phTrxSynthSelectBit[2]; //b15
+extern const unsigned short grr_phTrxHoppingSelectBit[2]; //b13
+extern const unsigned short grr_phTrxPwrSelectBit[2]; //b12
+
+//Tables in Basic Package
+extern CellAllocationEntry cellAllocationTable[CellAllocationTableLimit];
+extern PlmnPermittedEntry plmnPermittedTable[PlmnPermittedTableLimit];
+
+//Table in Option Package
+extern NotAllowedAccessClassEntry notAllowedAccessClassTable[NotAllowedAccessClassTableLimit];
+
+//Table in TRX packages
+extern ChannelEntry firstTrxPackageChannelTable[ChannelTableLimit];
+extern ChannelEntry secondTrxPackageChannelTable[ChannelTableLimit];
+
+extern CarrierFrequencyEntry firstRadioCarrierPackageFrequencyListTable[CarrierFrequencyTableLimit];
+extern CarrierFrequencyEntry secondRadioCarrierPackageFrequencyListTable[CarrierFrequencyTableLimit];
+
+//Tables in AdjCell Packages
+extern AdjCell_HandoverEntry adjCell_HandoverTable[HandoverTableLimit];
+extern AdjCell_HandoverEntry adjCell_HandoverTable_t[HandoverTableLimit];
+extern AdjCell_ReselectionEntry adjCell_ReselectionTable[ReselectionTableLimit];
+
+//A complete list of GRR-raised alarms from reference
+
+//Section I: critical alarms
+
+//EC_BOOTING_UP
+
+//EC_GRR_OS_CALL_WDCREATE_FAILED
+//EC_GRR_OS_CALL_WDSTART_FAILED
+//EC_GRR_OS_CALL_MSGQCREATE_FAILED
+//EC_GRR_OS_CALL_MSGQRECEIVE_FAILED
+//EC_GRR_OS_CALL_MSGQSEND_FAILED
+
+//EC_GRR_OAM_CALL_SETMIBINTVAR_FAILED
+//EC_GRR_OAM_CALL_SETTBLENTRYFIELD_FAILED
+//EC_GRR_OAM_CALL_GETMIBSTRUCT_FAILED
+//EC_GRR_OAM_CALL_GETMIBTBL_FAILED
+//EC_GRR_OAM_CALL_UNSETTRAPBYMODULE_FAILED
+//EC_GRR_OAM_CALL_SETTRAP_FAILED
+
+//EC_GRR_RIL3_CALL_RRM_ENCODER_FAILED
+
+//EC_GRR_BTS_LOCKED
+//EC_GRR_BTS_UNLOCKED
+//EC_GRR_BTS_SHUTTINGDOWN
+
+//Critical alarms
+extern const Alarm_errorCode_t grr_DspNotResponding[OAMgrr_MAX_TRXS];
+extern const Alarm_errorCode_t grr_DspNotTickingAnyMore[OAMgrr_MAX_TRXS];
+extern const Alarm_errorCode_t grr_DspInitWatchTimerExpiredAlarmCode[OAMgrr_MAX_TRXS];
+extern const Alarm_errorCode_t grr_TrxSlotActNackAlarmCode[OAMgrr_MAX_TRXS][8];
+
+//Informational Alarms
+extern const Alarm_errorCode_t grr_TrxSlotChanCombChangeAlarmCode[OAMgrr_MAX_TRXS][8];
+extern const Alarm_errorCode_t grr_TrxAmStateLockedAlarmCode[OAMgrr_MAX_TRXS];
+extern const Alarm_errorCode_t grr_TrxAmStateUnlockedAlarmCode[OAMgrr_MAX_TRXS];
+extern const Alarm_errorCode_t grr_TrxAmStateShuttingdownAlarmCode[OAMgrr_MAX_TRXS];
+extern const Alarm_errorCode_t grr_TrxAmStateInvalidAlarmCode[OAMgrr_MAX_TRXS];
+
+extern const Alarm_errorCode_t grr_TrxSlotAmStateLockedAlarmCode[OAMgrr_MAX_TRXS][8];
+extern const Alarm_errorCode_t grr_TrxSlotAmStateUnlockedAlarmCode[OAMgrr_MAX_TRXS][8];
+extern const Alarm_errorCode_t grr_TrxSlotAmStateShuttingdownAlarmCode[OAMgrr_MAX_TRXS][8];
+
+//Variables defined outside
+//
+extern MSG_Q_ID rlcMsgQId;
+extern MSG_Q_ID rm_MsgQId;
+
+#endif //__GRR_DATA_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/grr/grr_head.h b/data/mnet/GP10/Host/Common_To_Host/grr/grr_head.h
new file mode 100644
index 0000000..bbb4996
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/grr/grr_head.h
@@ -0,0 +1,55 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_HEAD_H__
+#define __GRR_HEAD_H__
+
+#include "vxWorks.h"
+#include "stdio.h"
+#include "string.h"
+#include "msgQlib.h"
+#include "wdLib.h"
+#include "taskLib.h"
+#include "sysLib.h"
+#include "MnetModuleId.h" //#include "jcc\sys_const.h"
+#include "logging\vclogging.h"
+#include "lapdm\lapdm_common.h"
+#include "lapdm\lapdm_config.h"
+#include "lapdm\lapdm_l3intf.h"
+#include "ril3\ril3irt.h"
+#include "ril3\ril3md.h"
+#include "ril3\ril3msgtype.h"
+#include "ril3\ril3_common.h"
+#include "ril3\ie_ia_rest_octets.h"
+#include "ril3\ie_neighbour_cells_description.h"
+#include "ril3\ie_rach_control_param.h"
+#include "ril3\ie_control_channel_description.h"
+#include "ril3\ie_cell_options.h"
+#include "ril3\ie_cell_selection.h"
+#include "ril3\ie_bearer_capability.h"
+#include "ril3\com_freqlistbitmap.h"
+#include "ril3\ril3_gmm_msg.h"
+#include "AlarmCode.h" //#include "alarm\alarm_errorcode.h"
+#include "Os\JCTask.h" //#include "root\viperTask.h"
+#include "GP10OsTune.h"
+#include "mibtags.h"
+#include "vipermib.h"
+#include "oam_api.h"
+#include "Rlc_mac\RlcMacIntf.h"
+#include "grr_const.h"
+#include "grr_import.h"
+#include "grr_type.h"
+#include "grr_marco.h"
+#include "grr_struct.h"
+#include "grr_oamif.h"
+#include "grr_data.h"
+#include "grr_proto.h"
+#include "grr_intf.h"
+
+#endif //__GRR_HEAD_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/grr/grr_import.h b/data/mnet/GP10/Host/Common_To_Host/grr/grr_import.h
new file mode 100644
index 0000000..993a723
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/grr/grr_import.h
@@ -0,0 +1,20 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_IMPORT_H__
+#define __GRR_IMPORT_H__
+
+typedef T_CNI_RIL3RRM_MSG_SYSTEM_INFO_TYPE2 grr_Si2_t;
+typedef T_CNI_RIL3RRM_MSG_SYSTEM_INFO_TYPE3 grr_Si3_t;
+typedef T_CNI_RIL3RRM_MSG_SYSTEM_INFO_TYPE4 grr_Si4_t;
+typedef T_CNI_RIL3RRM_MSG_SYSTEM_INFO_TYPE5 grr_Si5_t;
+typedef T_CNI_RIL3RRM_MSG_SYSTEM_INFO_TYPE6 grr_Si6_t;
+typedef T_CNI_RIL3RRM_MSG_SYSTEM_INFO_TYPE13 grr_Si13_t;
+
+#endif //__GRR_IMPORT_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/grr/grr_intf.h b/data/mnet/GP10/Host/Common_To_Host/grr/grr_intf.h
new file mode 100644
index 0000000..bb1190d
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/grr/grr_intf.h
@@ -0,0 +1,106 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_INTF_H__
+#define __GRR_INTF_H__
+
+//#include "grr_head.h" //message structure def. btw grr and rlc&rrm
+#include "vxWorks.h"
+#include "stdio.h"
+#include "string.h"
+#include "msgQlib.h"
+#include "vipermib.h"
+#include "ril3/ril3_common.h"
+#include "ril3\ril3_gmm_msg.h"
+
+extern MSG_Q_ID grr_MsgQId;
+
+//Administrative & operational state & chan config related inquiries
+//
+extern AdministrativeState grr_GetBtsAmState (void);
+extern AdministrativeState grr_GetTrxAmState (int trx);
+extern AdministrativeState grr_GetTrxSlotAmState (int trx, int slot);
+
+extern EnableDisable grr_GetBtsOpState (void);
+extern EnableDisable grr_GetTrxOpState (int trx);
+extern EnableDisable grr_GetTrxSlotOpState (int trx, int slot);
+
+extern bool grr_IsPccchExisting (int *trx, int* slot, int* comb);
+extern int grr_GetTrxSlotChanComb (int trx, int slot);
+extern int grr_GetTrxSlotTsc (int trx, int slot);
+extern int grr_GetTrxSlotArfcn (int trx, int slot);
+extern int grr_getBtsGprsNetworkMode (void);
+
+
+
+extern bool grr_IsBtsBlocked (void);
+extern bool grr_IsBtsAmTypeBlocked (void);
+extern bool grr_IsBtsOpTypeBlocked (void);
+extern bool grr_IsBtsGprsFeatureActive(void);
+extern bool grr_IsBtsCbFeatureActive (void);
+
+//Update application modules i.e. RLC, RRM with current setting
+//
+extern void grr_SendTrxSlotChanComb (int src_module, MSG_Q_ID dst_q, int trx, int slot, int chanComb);
+extern void grr_SendGprsFeatureSetting (int src_module, MSG_Q_ID dst_q);
+extern void grr_SendGprsFeatureSetting (int src_module, MSG_Q_ID dst_q);
+extern void grr_SendCbFeatureSetting (int src_module, MSG_Q_ID dst_q);
+extern void grr_SendReadyToGoReq (int src_module, MSG_Q_ID dst_q);
+extern void grr_SendReadyToGoAck (int src_module, MSG_Q_ID dst_q);
+
+
+//Administrative State related operations: requests and acknowledgements
+//
+//extern void grr_SendBtsLockReq (int src_module, MSG_Q_ID dst_q);
+//extern void grr_SendBtsUnlockReq (int src_module, MSG_Q_ID dst_q);
+//extern void grr_SendBtsShutdownReq (int src_module, MSG_Q_ID dst_q);
+//extern void grr_SendBtsLockAck (int src_module, MSG_Q_ID dst_q);
+//extern void grr_SendBtsUnlockAck (int src_module, MSG_Q_ID dst_q);
+//extern void grr_SendBtsShutdownAck (int src_module, MSG_Q_ID dst_q);
+
+//extern void grr_SendTrxLockReq (int src_module, MSG_Q_ID dst_q, int trx);
+//extern void grr_SendTrxUnlockReq (int src_module, MSG_Q_ID dst_q, int trx);
+//extern void grr_SendTrxShutdownReq (int src_module, MSG_Q_ID dst_q, int trx);
+//extern void grr_SendTrxLockAck (int src_module, MSG_Q_ID dst_q, int trx);
+//extern void grr_SendTrxUnlockAck (int src_module, MSG_Q_ID dst_q, int trx);
+//extern void grr_SendTrxShutdownAck (int src_module, MSG_Q_ID dst_q, int trx);
+
+extern void grr_SendTrxSlotLockReq (int src_module, MSG_Q_ID dst_q, int trx, int slot);
+extern void grr_SendTrxSlotShutdownReq (int src_module, MSG_Q_ID dst_q, int trx, int slot);
+extern void grr_SendTrxSlotLockAck (int src_module, MSG_Q_ID dst_q, int trx, int slot);
+extern void grr_SendTrxSlotShutdownAck (int src_module, MSG_Q_ID dst_q, int trx, int slot);
+//extern void grr_SendTrxSlotUnlockAck(int src_module, MSG_Q_ID dst_q, int trx, int slot);
+//extern void grr_SendTrxSlotUnlockReq(int src_module, MSG_Q_ID dst_q, int trx, int slot);
+
+//Synchronize with partners
+//
+extern void grr_SendCbCfgSetting (int src_module, MSG_Q_ID dst_q);
+extern void grr_SendReadyToGoReq (int src_module, MSG_Q_ID dst_q);
+extern void grr_SendReadyToGoAck (int src_module, MSG_Q_ID dst_q);
+extern void grr_OverloadedCellBarOff (void);
+
+//Messaging related to radio resource scheduling
+//
+extern void grr_ReportRadioResUsage (int src_module, MSG_Q_ID dst_q);
+extern void grr_GetRadioResRelCandiate (int *trx, int *slot);
+
+//Pass messages from L1proxy to GRR
+//
+void grr_SendMsgFromL1ToGrr(unsigned short length, unsigned char* buf);
+
+T_CNI_RIL3_ACCESS_TECHNOLOGY_TYPE grr_GetRadioAccessTechnology(void);
+
+//Test functions
+//
+void grr_SetTrxSlotCombination(int trx, int slot, int comb);
+
+short grr_DecideCipherAlgo(T_CNI_RIL3_IE_CIPHER_MODE_SETTING *setting,
+ T_CNI_RIL3_IE_MS_CLASSMARK_2 *classmark2);
+
+#endif //__GRR_INTF_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/grr/grr_marco.h b/data/mnet/GP10/Host/Common_To_Host/grr/grr_marco.h
new file mode 100644
index 0000000..91a47cc
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/grr/grr_marco.h
@@ -0,0 +1,24 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_MARCO_H__
+#define __GRR_MARCO_H__
+
+#define GRR_MEMSET( X,Y ) memset(X, (int) 0, (size_t) Y )
+#define GRR_MEMCPY( X,Y,Z ) memcpy(X, Y, Z)
+#define GRR_L1MSGCMP(X,Y,Z) \
+ ((X==grr_pItcRxDspMsg->buffer[0])&& \
+ (Y==grr_pItcRxDspMsg->buffer[1])&& \
+ (Z==grr_pItcRxDspMsg->buffer[2]) )
+
+#define GRR_DSPA52(X) (X & 2)
+#define GRR_DSPA51(X) (X & 1)
+
+
+#endif //__GRR_MARCO_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/grr/grr_oamif.h b/data/mnet/GP10/Host/Common_To_Host/grr/grr_oamif.h
new file mode 100644
index 0000000..6ce5bbe
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/grr/grr_oamif.h
@@ -0,0 +1,662 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_OAMIF_H__
+#define __GRR_OAMIF_H__
+
+#include "grr_head.h"
+
+//G2TEST
+#define OAMgrr_GPRS_FEATURE_SETTING grr_GprsCtrl
+
+#define OAMgrr_GPRS_RA_COLOR 0
+#define OAMgrr_SI13_POS 0
+#define OAMgrr_GPRS_NETWORK_MODE 1
+#define OAMgrr_CBCH_TRX_SLOT 0
+#define OAMgrr_CBCH_TRX 0
+#define OAMgrr_BCCH_CHANGE_MARK 0
+#define OAMgrr_SI_CHANGE_FIELD 0
+#define OAMgrr_GPRS_RAC 0x01
+#define OAMgrr_GPRS_NMO 0x01
+#define OAMgrr_GPRS_T3168 4
+#define OAMgrr_GPRS_T3192 7
+#define OAMgrr_GPRS_DRX_TIMER_MAX 7
+#define OAMgrr_GPRS_ACCESS_BURST_TYPE 0
+#define OAMgrr_GPRS_CONTROL_ACK_TYPE 0
+#define OAMgrr_GPRS_BS_CV_MAX 7
+#define OAMgrr_GPRS_PAN_DEC 1
+#define OAMgrr_GPRS_PAN_INC 1
+#define OAMgrr_GPRS_PAN_MAX 4
+
+#define OAMgrr_GPRS_ALPHA 10
+#define OAMgrr_GPRS_T_AVG_W 15
+#define OAMgrr_GPRS_T_AVG_T 5
+#define OAMgrr_GPRS_PC_MEAS_CHAN 1
+#define OAMgrr_GPRS_N_AVG_I 4
+
+//
+// Slot combination: Mapped to definition given in OAM vipermib.h
+//
+#define OAMgrr_SLOT_COMB_1 tCHFull //0x01 Type I
+#define OAMgrr_SLOT_COMB_5 bCCHCombined //0x05 Type V
+#define OAMgrr_SLOT_COMB_11 pBCCH //0x0B type xi
+#define OAMgrr_SLOT_COMB_12 pCCCH //0x0C type xii
+#define OAMgrr_SLOT_COMB_13 pDCHData //0x0D type xiii
+#define OAMgrr_SLOT_BEACON OAMgrr_SLOT_COMB_5 //0x05 Beacon
+#define OAMgrr_SLOT_UNUSED 0xFF //0xFF Unused
+#define OAMgrr_TRX_SLOT_COMB_1 tCHFull //0x01 Type I
+#define OAMgrr_TRX_SLOT_COMB_5 bCCHCombined //0x05 Type V
+#define OAMgrr_TRX_SLOT_COMB_13 pDCHData //0x0D Type XIII
+#define OAMgrr_TRX_SLOT_BEACON OAMgrr_SLOT_COMB_5 //0x05 Beacon
+#define OAMgrr_TRX_SLOT_UNUSED 0xFF //0xFF Unused
+
+
+#define OAMgrr_HO_ADJCELL_NO_MAX 16
+#define OAMgrr_RESEL_ADJCELL_NO_MAX 16
+
+#define OAMgrr_NCC_PERMITTED_MAX 8
+
+#define OAMgrr_HO_ADJCELL_ID_NULL 0
+#define OAMgrr_RESEL_ADJCELL_ID_NULL 0
+
+//
+// BtsBasicPackage
+//
+
+//1. info
+//<NA>
+
+//2. bts_ncc
+#define OAMgrr_NCC \
+ ((unsigned char)(grr_OamData.btsBasicPackage.bts_ncc))
+ //5:oam_Ncc, bts_ncc may be combined with
+//3. bts_cid
+#define OAMgrr_BCC \
+ ((unsigned char)(grr_OamData.btsBasicPackage.bts_cid))
+ //5:oam_Bcc
+
+//3a. comb of 2&3:(bts_ncc<<3)|(bts_cid)
+#define OAMgrr_POCKETBTS_BSIC \
+ ((unsigned char)(grr_OamData.btsBasicPackage.bts_ncc<<3)| \
+ (unsigned char)(grr_OamData.btsBasicPackage.bts_cid))
+ //0x2d: oam_PocketBTSBsic
+//4. btsID
+#define OAMgrr_CELLID \
+ ((unsigned int)(grr_OamData.btsBasicPackage.btsID))
+ //0x0001: hi-byte network ID, lo-byte cell ID
+
+//5. cellAllocationTable[0]
+#define OAMgrr_BCCH_ARFCN \
+ (((CellAllocationEntry*) \
+ (grr_OamData.btsBasicPackage.cellAllocationTable))[0].cellAllocation)
+ //661:1st element of cellAllocation table is BCCH ARFCN, oam_BcchArfcn
+#define OAMgrr_CA_ARFCN(X) \
+ (((CellAllocationEntry*)(grr_OamData.btsBasicPackage.cellAllocationTable))[X].cellAllocation)
+
+//6. gsmdcsIndicator
+#define OAMgrr_GSMDCS_INDICATOR \
+ grr_OamData.btsBasicPackage.gsmdcsIndicator
+
+//7. bts_mcc
+#define OAMgrr_MCC(X) \
+ ((unsigned char*)&(grr_OamData.btsBasicPackage.bts_mcc))[X]
+ //001: bts_mcc is an integer which will be converted to char string, oam_Mcc
+//8. bts_mnc
+#define OAMgrr_MNC(X) \
+ ((unsigned char*)&(grr_OamData.btsBasicPackage.bts_mnc))[X]
+ //01: bts_mnc is an integer which will be converted to char string, oam_Mnc
+//9. bts_lac
+#define OAMgrr_LAC \
+ ((short)(grr_OamData.btsBasicPackage.bts_lac))
+ //1:oam_Lac[X]
+//10. cellReselectHysteresis
+#define OAMgrr_CELL_RESEL_HYSTERESIS \
+ ((unsigned char)(grr_OamData.btsBasicPackage.cellReselectHysteresis))
+ //2:4 dBm
+//11. ny1
+#define OAMgrr_NY1 \
+ ((unsigned char)(grr_OamData.btsBasicPackage.ny1))
+ //3
+//12. plmnPermittedTable
+#define OAMgrr_NCC_PERMITTED(X) \
+ (((PlmnPermittedEntry*)(grr_OamData.btsBasicPackage.plmnPermittedTable))[X]. \
+ plmnPermitted)
+ //1 for X=5, 0 for other X values, X:0-7
+//13. radioLinkTimeout
+#define OAMgrr_RADIO_LINK_TIMEOUT \
+ ((unsigned char)(grr_OamData.btsBasicPackage.radioLinkTimeout))
+ //3: ie 16
+//14. relatedTranscoder
+// <NA>
+
+//15. rxLevAccessMin
+#define OAMgrr_MS_RELEV_ACCESS_MIN ((unsigned char)(grr_OamData.btsBasicPackage.rxLevAccessMin))
+ //6:104dBm
+
+//16. bts_administrativeState
+#define OAMgrr_BTS_AMSTATEa grr_OamData.btsBasicPackage.bts_administrativeState
+#define OAMgrr_BTS_AMSTATE grr_OamData.btsBasicPackage.bts_administrativeState
+
+//17. bts_alarmStatus
+// <NA>
+
+//18. bts_operationalState
+#define OAMgrr_BTS_OPSTATEa grr_OamData.btsBasicPackage.bts_operationalState
+#define OAMgrr_BTS_OPSTATE grr_OamData.btsBasicPackage.bts_operationalState
+
+//19. maxNumberRetransmissions
+#define OAMgrr_RA_RETRY_MAX \
+ ((unsigned char)(grr_OamData.btsBasicPackage.maxNumberRetransmissions))
+ //3:retry 7 times
+//20. mSTxPwrMaxCCH
+#define OAMgrr_MS_TX_PWR_MAX_CCH \
+ ((unsigned char)(grr_OamData.btsBasicPackage.mSTxPwrMaxCCH))
+ //0:30dBm, previous value is 11 i.e. 8dBm, oam_MsTxPwrMax
+
+//20a. PR1101
+#define OAMgrr_MS_TX_PWR_MAX_CCHa \
+ grr_OamData.btsBasicPackage.mSTxPwrMaxCCH
+ //0:30dBm, previous value is 11 i.e. 8dBm, oam_MsTxPwrMax
+
+//21. numberOfSlotsSpreadTrans
+#define OAMgrr_RA_TX_INTEGER \
+ ((unsigned char)(grr_OamData.btsBasicPackage.numberOfSlotsSpreadTrans))
+ //7:spread 10 time slots
+//22. noOfBlocksForAccessGrant
+#define OAMgrr_BS_AG_BLK_RES \
+ ((unsigned char)(grr_OamData.btsBasicPackage.noOfBlocksForAccessGrant))
+ //0:oam_bsAgBlkRes
+
+//23. noOfMultiframesBetweenPaging
+#define OAMgrr_BS_PA_MFRMS \
+ ((unsigned char)(grr_OamData.btsBasicPackage.noOfMultiframesBetweenPaging))
+ //1:oam_bsPaMfrms
+
+//
+// BtsOptionsPackage
+//
+
+//1. info
+// <NA>
+
+//2. allowIMSIAttachDetach
+#define OAMgrr_ATT_STATE \
+ ((T_CNI_RIL3_ATT)(grr_OamData.btsOptionsPackage.allowIMSIAttachDetach))
+ //1:ie CNI_RIL3_ATT_IMSI_ATACH_DETACH_ALLOWED,oam_att
+//3. callReestablishmentAllowed
+#define OAMgrr_RA_REST_ALLOWED_STATE \
+ ((T_CNI_RIL3_REESTABLISHMENT_ALLOWED) \
+ (grr_OamData.btsOptionsPackage.callReestablishmentAllowed))
+ //1:not allowed
+//4. cellBarred
+#define OAMgrr_RA_CELL_BARRED_STATE \
+ ((T_CNI_RIL3_CELL_BARRED_ACCESS)(grr_OamData.btsOptionsPackage.cellBarred))
+ //0:not barred
+#define OAMgrr_RA_CELL_BARRED_STATEa \
+ grr_OamData.btsOptionsPackage.cellBarred
+ //0:not barred
+//5. dtxDownlink
+#define OAMgrr_MS_DNLINK_DTX_STATE \
+ ((int)(grr_OamData.btsOptionsPackage.dtxDownlink))
+ //2:downlink DTX control ON/OFF
+
+//5a. dtxUpLink
+#define OAMgrr_MS_UPLINK_DTX_STATE \
+ ((T_CNI_RIL3_DTX_SACCH)(grr_OamData.btsOptionsPackage.dtxUplink))
+ //2:uplink DTX not allowed for MS
+
+#define OAMgrr_MS_UPLINK_DTX_STATEa \
+ ((T_CNI_RIL3_DTX_BCCH)(grr_OamData.btsOptionsPackage.dtxUplink))
+ //2:uplink DTX not allowed for MS
+
+//6. emergencyCallRestricted
+#define OAMgrr_RA_EC_ALLOWED_STATE \
+ ((T_CNI_RIL3_EMERGENCY_CALL_ALLOWED) \
+ (grr_OamData.btsOptionsPackage.emergencyCallRestricted))
+ //1:only allowed to special class mobiles
+
+//7. notAllowedAccessClassTable
+#define OAMgrr_RA_AC_ALLOWED_STATE(X) \
+ ((unsigned char)(((NotAllowedAccessClassEntry*) \
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[X].notAllowedAccessClass))
+ //1:barred
+
+//8. timerPeriodicUpdateMS
+#define OAMgrr_T3212 \
+ ((unsigned char)(grr_OamData.btsOptionsPackage.timerPeriodicUpdateMS))
+ //0:no periodic LUP needed, oam_T3212
+//9. maxQueueLength
+// <NA>
+
+//10. msPriorityUsedInQueueing
+// <NA>
+
+//11. timeLimitCall
+// <NA>
+
+//12. timeLimitHandover
+// <NA>
+
+//
+// AdjacentCellPackage
+//
+
+//1. adjCell_handoverTable
+//1.1 adjCell_handoverTable:adjCell_handoverIndex
+// <NA>
+
+//1.2 adjCell_handoverTable:adjCell_handoverCellID
+
+#define OAMgrr_NCELL_NETWORKID(X) \
+ ((short)((((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_handoverCellID))>>16)
+ //2 for X=0, 3 for X=1, 0xFFFFFFFF for other X values, X:0-31
+#define OAMgrr_NCELL_CELLID(X) \
+ ((short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_handoverCellID))
+ //2 for X=0, 3 for X=1, 0xFFFFFFFF for other X values, X:0-31
+#define OAMgrr_NCELL_NETWORKID_t(X) \
+ ((short)((((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_handoverCellID))>>16)
+ //2 for X=0, 3 for X=1, 0xFFFFFFFF for other X values, X:0-31
+#define OAMgrr_NCELL_CELLID_t(X) \
+ ((short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_handoverCellID))
+ //2 for X=0, 3 for X=1, 0xFFFFFFFF for other X values, X:0-31
+#define OAMgrr_HO_ADJCELL_ID(X) \
+ ((unsigned int)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[X].adjCell_handoverCellID))
+#define OAMgrr_HO_ADJCELL_ID_t(X) \
+ ((unsigned int)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_handoverCellID))
+ //2 for X=0, 3 for X=1, 0xFFFFFFFF for other X values, X:0-31
+
+//1.3 adjCell_handoverTable:adjCell_mcc
+#define OAMgrr_HO_ADJCELL_MCC(X,Y) \
+ ((unsigned char*)&(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[X].adjCell_mcc))[Y]
+
+#define OAMgrr_HO_ADJCELL_MCC_t(X,Y) \
+ ((unsigned char*)&(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_mcc))[Y]
+
+//1.4 adjCell_handoverTable:adjCell_mnc
+#define OAMgrr_HO_ADJCELL_MNC(X,Y) \
+ ((unsigned char*)&(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[X].adjCell_mnc))[Y]
+
+#define OAMgrr_HO_ADJCELL_MNC_t(X,Y) \
+ ((unsigned char*)&(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_mnc))[Y]
+
+//1.5 adjCell_handoverTable:adjCell_lac
+#define OAMgrr_HO_ADJCELL_LAC(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[X].adjCell_lac))
+
+#define OAMgrr_HO_ADJCELL_LAC_t(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_lac))
+
+//1.6 adjCell_handoverTable:adjCell_ci
+#define OAMgrr_HO_ADJCELL_CI(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[X].adjCell_ci))
+
+#define OAMgrr_HO_ADJCELL_CI_t(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_ci))
+
+//1.7 adjCell_handoverTable:adjCell_bCCHFrequency
+#define OAMgrr_HO_ADJCELL_BCCH_ARFCN(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[X].adjCell_bCCHFrequency))
+
+#define OAMgrr_HO_ADJCELL_BCCH_ARFCN_t(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_bCCHFrequency))
+
+#define OAMgrr_NARFCN(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[X].adjCell_bCCHFrequency))
+
+#define OAMgrr_NARFCN_t(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_bCCHFrequency))
+
+//1.8 adjCell_handoverTable:adjCell_ncc
+#define OAMgrr_HO_ADJCELL_NCC(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[X].adjCell_ncc))
+
+#define OAMgrr_HO_ADJCELL_NCC_t(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_ncc))
+
+//1.9 adjCell_handoverTable:adjCell_cid
+#define OAMgrr_HO_ADJCELL_BCC(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[X].adjCell_cid))
+
+#define OAMgrr_HO_ADJCELL_BCC_t(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_cid))
+
+//1.10 adjCell_handoverTable:adjCell_synchronized
+#define OAMgrr_HO_ADJCELL_HO_SYNCH(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[X].adjCell_synchronized))
+
+#define OAMgrr_HO_ADJCELL_HO_SYNCH_t(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_synchronized))
+
+//1.11 adjCell_handoverTable:adjCell_hoPriorityLevel
+#define OAMgrr_HO_ADJCELL_HO_PRILEVEL(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[X].adjCell_hoPriorityLevel))
+
+#define OAMgrr_HO_ADJCELL_HO_PRILEVEL_t(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_hoPriorityLevel))
+
+//1.12 adjCell_handoverTable:adjCell_hoMargin
+#define OAMgrr_HO_ADJCELL_HO_MARGIN(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[X].adjCell_hoMargin))
+
+#define OAMgrr_HO_ADJCELL_HO_MARGIN_t(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_hoMargin))
+
+//1.13 adjCell_handoverTable:adjCell_msTxPwrMaxCell
+#define OAMgrr_HO_ADJCELL_MSTXPWR_MAX_CELL(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[X].adjCell_msTxPwrMaxCell))
+
+#define OAMgrr_HO_ADJCELL_MSTXPWR_MAX_CELL_t(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_msTxPwrMaxCell))
+
+//1.14 adjCell_handoverTable:adjCell_rxLevMinCell
+#define OAMgrr_HO_ADJCELL_RXLEV_MIN_CELL(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[X].adjCell_rxLevMinCell))
+
+#define OAMgrr_HO_ADJCELL_RXLEV_MIN_CELL_t(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_rxLevMinCell))
+
+//2. adjCell_reselectionTable
+//2.1 adjCell_reselectionTable:adjCell_reselectionIndex
+// <TBD>
+
+//2.2 adjCell_reselectionTable:adjCell_reselectionCellID
+#define OAMgrr_RESEL_ADJCELL_ID(X) \
+ ((unsigned int)(((AdjCell_ReselectionEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_reselectionTable))[X].adjCell_reselectionCellID))
+ //2 for X=0, 3 for X=1, 0xFFFFFFFF for other X values
+//2.3 adjCell_reselectionTable:adjCell_reselectionBCCHFrequency
+#define OAMgrr_RESEL_ADJCELL_BCCH_ARFCN(X) \
+ ((short)(((AdjCell_ReselectionEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_reselectionTable))[X].adjCell_reselectionBCCHFrequency))
+ //561 for X=0,761 for X=1, 0 for other X values
+
+//
+// BtsTimerPackage:T31xx
+//
+
+//1. info
+// <TBD>
+
+//2. t3101
+#define OAMgrr_T3101 \
+ ((int)(grr_OamData.t31xx.t3101))
+ //0x2FF:oam_T3101
+//3. t3103
+#define OAMgrr_T3103 \
+ ((int)(grr_OamData.t31xx.t3103))
+
+//4. t3105
+#define OAMgrr_T3105 \
+ ((int)(grr_OamData.t31xx.t3105))
+ //2:16.6 by 2 ms
+//5. t3107
+#define OAMgrr_T3107 \
+ ((int)(grr_OamData.t31xx.t3107))
+
+//6. t3109
+#define OAMgrr_T3109 \
+ ((int)(grr_OamData.t31xx.t3109))
+ //0x1FF:oam_T3109
+//7. t3111
+#define OAMgrr_T3111 \
+ ((int)(grr_OamData.t31xx.t3111))
+ //0x2FF:oam_T3111
+//8. t3113
+#define OAMgrr_T3113 \
+ ((int)(grr_OamData.t31xx.t3113))
+
+//
+// TransceiverPackage
+//
+
+//1. info
+// <TBD>
+//2. basebandTransceiverID
+// <TBD>
+
+//3. relatedRadioCarrier
+#define OAMgrr_TRX_RC(X) \
+ ((unsigned char)(grr_OamData.transceiverPackage[X].relatedRadioCarrier))
+
+//4. basebandAdministrativeState
+#define OAMgrr_TRX_AMSTATEa(X) grr_OamData.transceiverPackage[X].basebandAdministrativeState
+#define OAMgrr_TRX_AMSTATE(X) grr_OamData.transceiverPackage[X].basebandAdministrativeState
+
+//5. basebandAlarmStatus
+// <TBD>
+
+//6. basebandOperationalState
+#define OAMgrr_TRX_OPSTATEa(X) grr_OamData.transceiverPackage[X].basebandOperationalState
+#define OAMgrr_TRX_OPSTATE(X) grr_OamData.transceiverPackage[X].basebandOperationalState
+
+//7. channelTable
+//7.1 channelTable:channelIndex
+// <TBD>
+//7.2 channelTable:channelID
+// <TBD>
+
+//7.3 channelTable:channelCombination
+#define OAMgrr_TRX_SLOT_CHANCOMB(X,Y) \
+ ((unsigned char)(((ChannelEntry*) \
+ (grr_OamData.transceiverPackage[X].channelTable))[Y].channelCombination))
+#define OAMgrr_TRX_SLOT_COMB(X,Y) \
+ ((unsigned char)(((ChannelEntry*) \
+ (grr_OamData.transceiverPackage[X].channelTable))[Y].channelCombination))
+
+#define OAMgrr_TRX_SLOT_COMBa(X,Y) \
+ (((ChannelEntry*) \
+ (grr_OamData.transceiverPackage[X].channelTable))[Y].channelCombination)
+
+//7.4 channelTable:channelFrequencyUsage
+#define OAMgrr_TRX_SLOT_ARFCN(X,Y) \
+ ((unsigned short)(((CarrierFrequencyEntry*)(grr_OamData.radioCarrierPackage[ \
+ grr_OamData.transceiverPackage[X].relatedRadioCarrier \
+ ].carrierFrequencyList))[0].carrierFrequency))
+// ((unsigned char)(((ChannelEntry*) \
+// (grr_OamData.transceiverPackage[X].channelTable))[Y].channelFrequencyUsage))
+
+
+//7.5 channelTable:channelTsc
+#define OAMgrr_TRX_SLOT_TSC(X,Y) ((unsigned char)(grr_OamData.btsBasicPackage.bts_cid))
+// ((unsigned char)(((ChannelEntry*) \
+// (grr_OamData.transceiverPackage[X].channelTable))[Y].channelTsc))
+
+//7.6 channelTable:channelAdministrativeState
+#define OAMgrr_TRX_SLOT_AMSTATEa(X,Y) \
+ ((ChannelEntry*) \
+ (grr_OamData.transceiverPackage[X].channelTable))[Y \
+ ].channelAdministrativeState
+ //Check needed
+#define OAMgrr_CHN_AMSTATEa(X,Y) \
+ ((ChannelEntry*) \
+ (grr_OamData.transceiverPackage[X].channelTable))[Y \
+ ].channelAdministrativeState
+ //Check needed
+#define OAMgrr_TRX_SLOT_AMSTATE(X,Y) \
+ ((AdministrativeState)(((ChannelEntry*) \
+ (grr_OamData.transceiverPackage[X].channelTable))[Y \
+ ].channelAdministrativeState))
+#define OAMgrr_CHN_AMSTATE(X,Y) \
+ ((AdministrativeState)(((ChannelEntry*) \
+ (grr_OamData.transceiverPackage[X].channelTable))[Y \
+ ].channelAdministrativeState))
+
+//7.7 channelTable:channelOperationalState
+#define OAMgrr_TRX_SLOT_OPSTATEa(X,Y) \
+ ((ChannelEntry*) \
+ (grr_OamData.transceiverPackage[X].channelTable))[Y \
+ ].channelOperationalState
+#define OAMgrr_CHN_OPSTATEa(X,Y) \
+ ((ChannelEntry*) \
+ (grr_OamData.transceiverPackage[X].channelTable))[Y \
+ ].channelOperationalState
+#define OAMgrr_TRX_SLOT_OPSTATE(X,Y) \
+ ((EnableDisable)(((ChannelEntry*) \
+ (grr_OamData.transceiverPackage[X].channelTable))[Y \
+ ].channelOperationalState))
+#define OAMgrr_CHN_OPSTATE(X,Y) \
+ ((EnableDisable)(((ChannelEntry*) \
+ (grr_OamData.transceiverPackage[X].channelTable))[Y \
+ ].channelOperationalState))
+
+
+//
+// radioCarrierPackage
+//
+
+//1. info
+// <TBD>
+//2. carrierFrequencyList
+//2.1 carrierFrequencyList:carrierFrequencyIndex
+// <TBD>
+//2.2 carrierFrequencyList:carrierFrequency
+#define OAMgrr_ARFCN(X) \
+ ((unsigned short)(((CarrierFrequencyEntry*)(grr_OamData.radioCarrierPackage[ \
+ grr_OamData.transceiverPackage[X].relatedRadioCarrier \
+ ].carrierFrequencyList))[0].carrierFrequency))
+ //661 for X=0; 561 for X=1, X:0-1
+#define OAMgrr_TRX_RC_ARFCN(X,Y) \
+ ((unsigned short)(((CarrierFrequencyEntry*)(grr_OamData.radioCarrierPackage[ \
+ grr_OamData.transceiverPackage[X].relatedRadioCarrier \
+ ].carrierFrequencyList))[0].carrierFrequency))
+
+//3. powerClass
+#define OAMgrr_TRX_RC_PWR_CLASS(X) \
+ ((unsigned short)(grr_OamData.radioCarrierPackage[ \
+ grr_OamData.transceiverPackage[X].relatedRadioCarrier \
+ ].powerClass))
+
+//4. radioCarrierID
+#define OAMgrr_TRX_RC_NO(X) \
+ ((unsigned short)(grr_OamData.radioCarrierPackage[ \
+ grr_OamData.transceiverPackage[X].relatedRadioCarrier \
+ ].radioCarrierID))
+
+//5. txPwrMaxReduction
+#define OAMgrr_TRX_RC_MAXPWR_CUT(X) \
+ ((unsigned short)(grr_OamData.radioCarrierPackage[ \
+ grr_OamData.transceiverPackage[X].relatedRadioCarrier \
+ ].txPwrMaxReduction))
+
+//6. carrier_administrativeState
+#define OAMgrr_RC_AMSTATE(X) \
+ grr_OamData.radioCarrierPackage[X].carrier_administrativeState
+//7. carrier_alarmStatus
+// <TBD>
+
+//8. carrier_operationalState
+#define OAMgrr_RC_OPSTATE(X) \
+ grr_OamData.radioCarrierPackage[X].carrier_operationalState
+#define OAMgrr_RC_OPSTATEa(X) \
+ grr_OamData.radioCarrierPackage[X].carrier_operationalState
+
+//
+// Bts System Feature Control
+//
+//auto-detection of RF board
+#define OAMgrr_IQ_SWAP grr_OamData.grr_IQSwap
+#define OAMgrr_BTS_AMSTATEold grr_OamData.grrBtsAmStateOld
+#define OAMgrr_BTS_OPSTATEold grr_OamData.grrBtsOpStateOld
+#define OAMgrr_TRX0_AMSTATEold grr_OamData.grrTrx0AmStateOld
+#define OAMgrr_TRX0SLOT0_AMSTATEold grr_OamData.grrTrx0Slot0AmStateOld
+//
+// GRR Configuration Package
+//
+#define OAMgrr_CB_FEATURE_SETTING grr_OamData.grrConfigData.rm_nim[0][1]
+#define OAMgrr_BCCH_CARRIER_phTRX grr_OamData.grrConfigData.rm_nim[0][0]
+#define OAMgrr_TRX_SWAP_SETTING grr_OamData.grrConfigData.rm_nim[0][0]
+#define OAMgrr_IMSI_REQUIRED_FOR_EC grr_OamData.grrConfigData.rm_nim[1][0]
+#define OAMgrr_CELL_BAR_QUALIFY grr_OamData.grrConfigData.rm_nim[0][6]
+#define OAMgrr_OVERLOAD_CELLBAR grr_OamData.grrConfigData.rm_nim[1][1]
+#define OAMgrr_HOPPING_CTRL grr_OamData.grrConfigData.rm_nim[0][2]
+#define OAMgrr_HOPPING_CTRLa grr_OamData.grrConfigData.rm_nim[0][2]
+#define OAMgrr_CELL_RESELECT_OFFSET ((unsigned char)(grr_OamData.grrConfigData.rm_nim[0][3]))
+#define OAMgrr_CELL_RESELECT_OFFSETa grr_OamData.grrConfigData.rm_nim[0][3]
+#define OAMgrr_TEMP_OFFEST ((unsigned char)(grr_OamData.grrConfigData.rm_nim[0][4]))
+#define OAMgrr_TEMP_OFFESTa grr_OamData.grrConfigData.rm_nim[0][4]
+#define OAMgrr_PENALTY_TIME ((unsigned char)(grr_OamData.grrConfigData.rm_nim[0][5]))
+#define OAMgrr_PENALTY_TIMEa grr_OamData.grrConfigData.rm_nim[0][5]
+
+//#define OAMgrr_T3L01 grr_OamData.rmConfigData.rm_t3L01
+//#define OAMgrr_BS_CC_CHANS ((unsigned char)(grr_OamData.grrConfigData.rm_bsCcChans))) //0x01
+//#define OAMgrr_BSCCCHSDCCH_COMB ((unsigned char)(grr_OamData.grrConfigData.rm_bsCcchSdcchComb))) //0x01
+//#define OAMgrr_AIRINTERFACE ((unsigned char)(grr_OamData.grrConfigData.rm_airInterface))) //0x02
+//#define OAMgrr_POCKETBTS_TSC ((unsigned char)(grr_OamData.grrConfigData.rm_viperCellTsc))) //0x05
+//#define OAMgrr_SLOTS_PER_TRX ((unsigned char)(grr_OamData.grrConfigData.rm_maxSlotPerTrx))) //0x08
+//#define OAMgrr_MAX_TRXS ((unsigned char)(grr_OamData.grrConfigData.rm_maxTrxs))) //0x02
+//#define OAMgrr_MAX_TCHFS ((unsigned char)(grr_OamData.grrConfigData.rm_maxTchfs))) //0x0f
+//#define OAMgrr_MAX_SDCCH4S ((unsigned char)(grr_OamData.grrConfigData.rm_maxSdcch4s))) //0x04
+//#define OAMgrr_TRX_ONOFF_MAP ((unsigned char)(grr_OamData.grrConfigData.rm_trxOnOffMap))) //0x03
+//#define OAMgrr_NETWORKIFCONFIG ((unsigned char)(grr_OamData.grrConfigData.rm_networkIfConfig))) //0x00
+//#define OAMgrr_BCCH_TRX ((unsigned char)(grr_OamData.grrConfigData.rm_bcchTrx))) //0x00
+//#define OAMgrr_PREALPHA_TRX ((unsigned char)(grr_OamData.grrConfigData.rm_preAlphaTrx))) //0x00
+//#define OAMgrr_CCCH_SDCCH_COMB ((unsigned char)(grr_OamData.grrConfigData.rm_ccchBcchComb))) //0x01
+//#define OAMgrr_CCCH_CONF ((unsigned char)(grr_OamData.grrConfigData.rm_ccchConf))) //0x01
+//#define OAMgrr_NIM(X,Y) ((unsigned char)(grr_OamData.grrConfigData.rm_nim[i][j])))
+
+#define OAMgrr_CCCH_CONF ((T_CNI_RIL3_CCCH_CONF)1)
+#define OAMgrr_BS_CC_CHANS 1
+#define OAMgrr_BSCCCHSDCCH_COMB 1
+#define OAMgrr_CCCH_SDCCH_COMB 1
+#define OAMgrr_T3L01 555
+#define OAMgrr_T3L02 4
+#define OAMgrr_SYSINFO_ONOFF_MAP 0
+#define OAMgrr_AIRINTERFACE ((unsigned char)(grr_OamData.btsBasicPackage.gsmdcsIndicator))
+#define OAMgrr_POCKETBTS_TSC ((unsigned char)(grr_OamData.btsBasicPackage.bts_cid))
+#define OAMgrr_SLOTS_PER_TRX 8
+#define OAMgrr_MAX_TRXS 2
+#define OAMgrr_MAX_TCHFS (8*OAMgrr_MAX_TRXS)
+#define OAMgrr_MAX_SDCCH4S 4
+#define OAMgrr_NETWORKIFCONFIG 0
+#define OAMgrr_NIM(X,Y) 0
+#define OAMgrr_SYNCH_CHANINFO 0
+#define OAMgrr_TRX_ONOFF_MAP 3
+#define OAMgrr_NETWORKIFCONFIG 0
+#define OAMgrr_BCCH_TRX 0
+#define OAMgrr_PREALPHA_TRX 0
+
+#define OAMgrr_phTRX_SELECT(X) grr_phTrxSelectBit[X]
+#define OAMgrr_phTRX_SYNTH_SELECT(X) grr_phTrxSynthSelectBit[X]
+#define OAMgrr_phTRX_HOPPING(X) grr_phTrxHoppingSelectBit[X]
+#define OAMgrr_phTRX_PWR_SELECT(X) grr_phTrxPwrSelectBit[X]
+#define OAMgrr_WDOG_TIME 18000
+
+#endif //__GRR_OAMIF_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/grr/grr_proto.h b/data/mnet/GP10/Host/Common_To_Host/grr/grr_proto.h
new file mode 100644
index 0000000..85cba43
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/grr/grr_proto.h
@@ -0,0 +1,242 @@
+/*
+********************************************************************
+**
+** (c); Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_PROTO_H__
+#define __GRR_PROTO_H__
+
+#include "grr_head.h"
+
+//Functions defined in grr_TestUtil.cpp
+//
+
+void grr_PrintGsmOamData(int selection=0);
+void grr_PrintCellAllocationTable(Table *tbl);
+void grr_PrintPlmnPermittedTable(Table *tbl);
+void grr_PrintNotAllowedAccessClassTable(Table *tbl);
+void grr_PrintChannelTable(Table *tbl);
+void grr_PrintCarrierFrequencyTable(Table *tbl);
+void grr_PrintAdjCellHandoverTable(Table *tbl);
+void grr_PrintAdjCellReselectionTable(Table *tbl);
+void grr_PrintBtsBasicPackage(BtsBasicPackage *btsBasicPackage);
+void grr_PrintBtsOptionsPackage(BtsOptionsPackage *btsOptionsPackage);
+void grr_PrintTransceiverPackage(TransceiverPackage *transceiverPackage);
+void grr_PrintFirstTransceiverPackage(FirstTransceiverPackage *firstTransceiverPackage);
+void grr_PrintSecondTransceiverPackage(SecondTransceiverPackage *secondTransceiverPackage);
+void grr_PrintRadioCarrierPackage(RadioCarrierPackage *radioCarrierPackage);
+void grr_PrintFirstRadioCarrierPackage(FirstRadioCarrierPackage *firstRadioCarrierPackage);
+void grr_PrintSecondRadioCarrierPackage(SecondRadioCarrierPackage *secondRadioCarrierPackage);
+void grr_PrintT31xx(T31xx *t31xx);
+void grr_PrintAdjacentCellPackage(AdjacentCellPackage *adjacentCellPackage);
+void grr_PrintHandoverControlPackage(HandoverControlPackage *handoverControlPackage);
+void grr_PrintPowerControlPackage(PowerControlPackage *powerControlPackage);
+
+void grr_PrintIntBtsBasicPackage(void);
+void grr_PrintIntBtsBcchConfigurationPackage(void);
+void grr_PrintIntBtsCellAllocationTable(void);
+void grr_PrintIntBtsOptionsPackage(void);
+void grr_PrintIntFirstTransceiverPackage(void);
+void grr_PrintIntSecondTransceiverPackage(void);
+void grr_PrintIntT31xxPackage(void);
+void grr_PrintIntFirstTrxRadioCarrierPackage(void);
+void grr_PrintIntSecondTrxRadioCarrierPackage(void);
+void grr_PrintIntAdjacentCellHandoverPackage(void);
+void grr_PrintIntAdjacentCellReselectPackage(void);
+void grr_PrintIntGrrConfigData(void);
+
+void grr_SetDbgDump(void);
+void grr_ResetDbgDump(void);
+void grr_SetGprsCtrl(void);
+void grr_ResetGprsCtrl(void);
+void grr_GprsSetting(void);
+
+
+//Functions defined in grr_Task.cpp
+//
+void grr_CreateQ(void);
+void grr_Main(void);
+int SysCommand_GRR(T_SYS_CMD action);
+
+//Functions defined in grr_SysInfo.cpp
+//
+void grr_PopulateSi2(T_CNI_RIL3_CELL_BARRED_ACCESS barState);
+void grr_PopulateSi3(T_CNI_RIL3_CELL_BARRED_ACCESS barState);
+void grr_PopulateSi4(T_CNI_RIL3_CELL_BARRED_ACCESS barState);
+void grr_PopulateSi5(void);
+void grr_PopulateSi6(void);
+void grr_PopulateSi13(void);
+
+//Functions defined in grr_SetOamMib.cpp
+//
+void grr_SetOamBtsAmState(AdministrativeState state);
+void grr_SetOamTrxAmState(unsigned char trx, AdministrativeState state);
+void grr_SetOamTrxSlotAmState(unsigned char trx, unsigned char slot, AdministrativeState state);
+void grr_SetOamTrxOpState(unsigned char trx, EnableDisable state);
+void grr_SetOamAllTrxSlotOpState(unsigned char trx, EnableDisable state);
+void grr_SetOamTrxSlotOpState(unsigned char trx, unsigned char slot, EnableDisable state);
+void grr_SetOamTrxRcOpState(unsigned char trx, EnableDisable state);
+
+//Functions defined in grr_SendDspMsg.cpp
+//
+void grr_SendDspSynInf(unsigned char trx);
+void grr_SendDspArfcn(unsigned char trx, int swap);
+void grr_SendDspPing(int dsp);
+void grr_SendDspSlotActivate(unsigned char trx, unsigned char slot);
+void grr_SendDspTrxConfig(unsigned char trx);
+void grr_SendDspTuneSynth( unsigned char phTrx, unsigned char synth, unsigned char hopping,
+ unsigned char state, unsigned short arfcn);
+
+//Functions defined in grr_ProcRrmMsg.cpp
+//
+void grr_ProcRrmMsg(void);
+bool grr_ProcRrmValidateMsg(void);
+void grr_ProcRrmTrxSlotShutdownAck(unsigned char trx, unsigned char slot);
+void grr_ProcRrmTryShutdownTrx(unsigned char trx);
+void grr_ProcRrmTryShutdownBts(void);
+
+//Functions defined in grr_ProcRlcMsg.cpp
+//
+void grr_ProcRlcMsg(void);
+bool grr_ProcRlcValidateMsg(void);
+void grr_ProcRlcTrxSlotShutdownAck(unsigned char trx, unsigned char slot);
+void grr_ProcRlcTryShutdownTrx(unsigned char trx);
+void grr_ProcRlcTryShutdownBts(void);
+
+//Functions defined in grr_ProcOamMsg.cpp
+//
+void grr_ProcOamMsg(void);
+void grr_ProcOamBtsBasicPackage(void);
+void grr_ProcOamBtsOpStateChange(void);
+void grr_ProcOamBtsAmStateChange(void);
+void grr_ProcOamBtsAmStateLocked(void);
+void grr_ProcOamTrxAmStateLocked(unsigned char trx);
+void grr_ProcOamTrxSlotAmStateLocked(unsigned char trx, unsigned char slot);
+void grr_ProcOamBtsAmStateUnlocked(void);
+void grr_ProcOamTrxAmStateUnlocked(unsigned char trx);
+void grr_ProcOamTrxSlotAmStateUnlocked(unsigned char trx, unsigned char slot);
+void grr_ProcOamBtsAmStateShuttingdown(void);
+void grr_ProcOamTrxAmStateShuttingdown(unsigned char trx);
+void grr_ProcOamTrxSlotAmStateShuttingdown(unsigned char trx, unsigned char slot);
+void grr_ProcOamBtsOptionsPackage(void);
+void grr_ProcOamTransceiverPackage(unsigned char trx);
+void grr_ProcOamTrx0AmStateChange(void);
+void grr_ProcOamTrx0Slot0AmStateChange(void);
+void grr_ProcOamRadioCarrierPackage(unsigned char rc, MibTag tag);
+void grr_ProcOamT31xxPackage(void);
+void grr_ProcOamAdjacentCellPackage(void);
+void grr_ProcOamHandoverControlPackage(void);
+void grr_ProcOamPowerControlPackage(void);
+void grr_ProcOamResourceConfigData(void);
+bool grr_ProcOamValidateMsg(void);
+
+//Functions defined in grr_ProcGrrMsg.cpp
+//
+void grr_ProcGrrMsg(void);
+bool grr_ProcGrrValidateMsg(void);
+
+//Functions defined in grr_ProcDspMsg.cpp
+//
+void grr_ProcDspMsg(void);
+bool grr_ProcDspValidateMsg(int *msgType);
+void grr_ProcDspPingAck(void);
+
+//Functions defined in grr_PassOamMib.cpp
+//
+void grr_PassOamDspBtsPackage(unsigned char trx);
+void grr_PassOamDspPwrCtrl(unsigned char trx);
+void grr_PassOamDspHoServCell(unsigned char trx);
+void grr_PassOamDspHoNeighCell(unsigned char trx, unsigned char cell, unsigned char noCells);
+void grr_PassOamDspPwrRedStep(unsigned char trx);
+void grr_PassOamMsSystemInformation2(unsigned char trx, unsigned char SI,T_CNI_RIL3_CELL_BARRED_ACCESS barState);
+void grr_PassOamMsSystemInformation3(unsigned char trx,unsigned char SI,T_CNI_RIL3_CELL_BARRED_ACCESS barState);
+void grr_PassOamMsSystemInformation4(unsigned char trx,unsigned char SI, T_CNI_RIL3_CELL_BARRED_ACCESS barState);;
+void grr_PassOamMsSystemInformation5(unsigned char trx, unsigned char SI, T_CNI_RIL3_CELL_BARRED_ACCESS barState);
+void grr_PassOamMsSystemInformation6(unsigned char trx, unsigned char SI, T_CNI_RIL3_CELL_BARRED_ACCESS barState);
+void grr_PassOamMsSystemInformation13(unsigned char trx, unsigned char SI, T_CNI_RIL3_CELL_BARRED_ACCESS barState);
+void grr_PassOamMsParams(unsigned char trx);
+void grr_PassOamDspParams(unsigned char trx);
+void grr_PassOamParams(unsigned char trx);
+
+//Functions defined in grr_OamUtil.cpp
+//
+void grr_RegOamTrap(void);
+void grr_FixOamData(void);
+unsigned char grr_GetOamTotalAvailableHoNCells(void);
+
+
+//Functions defined in grr_init.cpp
+//
+int grr_InitWatchTimerExpired(int trx);
+void grr_InitWatchTimerStop(unsigned char trx);
+void grr_InitWatchTimerStart(int trx);
+bool grr_InitDspOver(unsigned char trx);
+void grr_InitDspMsgProc(unsigned char trx);
+void grr_InitTrxMgmtData(unsigned char trx);
+void grr_InitWdogTimer(unsigned char trx);
+void grr_InitOamTrxPkg(unsigned char trx);
+void grr_InitDsp(void);
+void grr_InitWaitForRlcRrmGoAck(void);
+void grr_InitOam(void);
+void grr_Init(void);
+bool grr_GotAllDspsUpSignals(char *dsp);
+void grr_InitWaitForDspsUpSignal(void);
+
+//Functions defined in grr_GetOamMib.cpp
+//
+void grr_GetOamBtsBasicPackage(void);
+void grr_GetOamBtsOptionPackage(void);
+void grr_GetOamBtsFirstTrxPackage(void);
+void grr_GetOamBtsSecondTrxPackage(void);
+void grr_GetOamBtsFirstRadioCarrierPackage(void);
+void grr_GetOamBtsSecondRadioCarrierPackage(void);
+void grr_GetOamT31xxTimerStructure(void);
+void grr_GetOamAdjacentCellPackage(void);
+void grr_GetOamHandoverControlPackage(void);
+void grr_GetOamPowerControlPackage(void);
+void grr_GetOamGsmData(void);
+void grr_GetOamRrmData(void);
+void grr_GetOamData(void);
+
+//Functions defined in grr_DspUtil.cpp
+//
+void grr_RadioCtrl(unsigned char pwr);
+void grr_TuneTrxSynth(unsigned char trx, unsigned char pwr);
+void grr_StartDspsWatch(void);
+void grr_InitDspWdog(unsigned char dsp);
+void grr_StartDspWdog(unsigned char dsp);
+int grr_ProcDspWdogExpired(int param);
+void grr_ActTrxSlot(unsigned char trx, unsigned char slot);
+void grr_StartDspWdog(unsigned char dsp);
+void grr_FirstRadioCtrl(void);
+
+//Functions defined in grr_glob.cpp
+//
+void grr_SubmitAlarm(Alarm_errorCode_t code);
+void grr_SendMsg(int src_module, MSG_Q_ID dst_q, grr_MessageType_t msgType, int trx, int slot, int ctrl);
+void grr_SendMsgFromL1ToGrr(unsigned short length, unsigned char* buf);
+
+//Functions defined in grr_ProcUtil.cpp
+//
+void grr_ProcUtilTryShutdownTrx(unsigned char trx);
+void grr_ProcUtilTryShutdownBts(void);
+
+//Functions defined in grr_RadioCtrl.cpp
+//
+void ConfigTxPwrValues(unsigned char trx);
+void grr_RadioMonitor();
+
+//Functions defined in other modules
+//
+void sendDsp (unsigned char *buffer, int len);
+STATUS l1pTrxSwap(unsigned char trxA, unsigned char trxB);
+extern "C" {
+ int drfIQSwapGet(void);
+}
+
+#endif //__GRR_PROTO_H__
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/grr/grr_struct.h b/data/mnet/GP10/Host/Common_To_Host/grr/grr_struct.h
new file mode 100644
index 0000000..6c22643
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/grr/grr_struct.h
@@ -0,0 +1,57 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_STRUCT_H__
+#define __GRR_STRCUT_H__
+
+#include "grr_head.h"
+
+typedef struct {
+ unsigned char state;
+ int time;
+ WDOG_ID timer_id;
+} grr_Timer_t;
+
+
+typedef struct {
+ unsigned char tdma1;
+ unsigned char tdma2;
+ unsigned char tdma3;
+ unsigned char tdma4;
+ unsigned char done;
+ unsigned char slot;
+ unsigned char state;
+ unsigned char alive;
+ grr_Timer_t wdog;
+} grr_TrxMgmt_t;
+
+
+typedef struct {
+ BtsBasicPackage btsBasicPackage;
+ BtsOptionsPackage btsOptionsPackage;
+ TransceiverPackage transceiverPackage[2];
+ RadioCarrierPackage radioCarrierPackage[2];
+ T31xx t31xx;
+ AdjacentCellPackage adjacentCellPackage;
+ AdjacentCellPackage adjacentCellPackage_t;
+ HandoverControlPackage handoverControlPackage;
+ PowerControlPackage powerControlPackage;
+ ResourceConfigData grrConfigData;
+ int grr_IQSwap;
+ int grrBtsOpStateOld;
+ int grrBtsAmStateOld;
+ int grrTrx0AmStateOld;
+ int grrTrx0Slot0AmStateOld;
+ int grrIQSwap;
+
+} grr_OamData_t;
+
+
+#endif //__GRR_STRCUT_H__
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/grr/grr_type.h b/data/mnet/GP10/Host/Common_To_Host/grr/grr_type.h
new file mode 100644
index 0000000..f3f4967
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/grr/grr_type.h
@@ -0,0 +1,95 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_TYPE_H__
+#define __GRR_TYPE_H__
+
+#include "oam_api.h" //#include "oam\oam_api.h"
+
+
+//Message types between GRR and RLC/RRM
+//
+typedef enum {
+ GRR_MESSAGE_TYPE_BASE = 0,
+
+ GRR_CB_FEATURE_CONTROL,
+ GRR_GPRS_FEATURE_CONTROL,
+
+ GRR_READY_TO_GO_REQ,
+ GRR_READY_TO_GO_ACK,
+
+ GRR_TRX_SLOT_CHANCOMB,
+
+ //GRR_CHAN_USAGE_REPORT
+
+ //GRR_BTS_LOCK_REQ,
+ //GRR_BTS_LOCK_ACK,
+ //GRR_BTS_UNLOCK_REQ,
+ //GRR_BTS_UNLOCK_ACK,
+ //GRR_BTS_SHUTDOWN_REQ,
+ //GRR_BTS_SHUTDOWN_ACK,
+
+ //GRR_TRX_LOCK_REQ,
+ //GRR_TRX_LOCK_ACK,
+ //GRR_TRX_UNLOCK_REQ,
+ //GRR_TRX_UNLOCK_ACK,
+ //GRR_TRX_SHUTDOWN_REQ,
+ //GRR_TRX_SHUTDOWN_ACK,
+
+ GRR_TRX_SLOT_LOCK_REQ,
+ GRR_TRX_SLOT_LOCK_ACK,
+ GRR_TRX_SLOT_SHUTDOWN_REQ,
+ GRR_TRX_SLOT_SHUTDOWN_ACK,
+ //GRR_TRX_SLOT_UNLOCK_REQ,
+ //GRR_TRX_SLOT_UNLOCK_ACK,
+
+} grr_MessageType_t;
+
+
+//Message structure between GRR and RLC/RRM
+//
+typedef struct {
+
+ unsigned char module_id;
+ int primitive_type;
+ grr_MessageType_t message_type;
+ unsigned char trx;
+ unsigned char slot;
+
+ union {
+ unsigned char feat_ctrl;
+ unsigned char chan_comb;
+ unsigned char timer_id;
+ unsigned char buffer[100];//GRR_MAX_RXQMSG_LENGTH];
+ };
+
+} grr_ItcMsg_t;
+
+
+//GRR internal-use data structures
+//
+typedef grr_ItcMsg_t grr_ItcRxGrrMsg_t;
+typedef grr_ItcMsg_t grr_ItcRxRlcMsg_t;
+typedef grr_ItcMsg_t grr_ItcRxRrmMsg_t;
+typedef grr_ItcMsg_t grr_ItcRxDspMsg_t;
+typedef TrapMsg grr_ItcRxOamMsg_t;
+
+typedef union {
+ unsigned char module_id;
+
+ grr_ItcRxGrrMsg_t itcRxGrrMsg;
+ grr_ItcRxRrmMsg_t itcRxRrmMsg;
+ grr_ItcRxRlcMsg_t itcRxRlcMsg;
+ grr_ItcRxDspMsg_t itcRxDspMsg;
+ grr_ItcRxOamMsg_t itcRxOamMsg;
+
+} grr_ItcRxMsg_t;
+
+#endif //__GRR_TYPE_H__
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/include/AlarmCode.h b/data/mnet/GP10/Host/Common_To_Host/include/AlarmCode.h
new file mode 100644
index 0000000..d2e1773
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/include/AlarmCode.h
@@ -0,0 +1,435 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : AlarmTask.h */
+/* Author(s) : Bhawani Sapkota */
+/* Create Date : 9/18/2000 */
+/* Description : GP10 Alarm Code files */
+/* */
+/*********************************************************************/
+/* REVISION HISTORY
+/*___________________________________________________________________*/
+/*----------+--------+-----------------------------------------------*/
+/* Name | Date | Reason */
+/*----------+--------+-----------------------------------------------*/
+/* Bhawani |07/14/00| Initial Draft */
+/* Bhawani |11/20/00| resturctured to share among GP, GMS and GS */
+/*----------+--------+-----------------------------------------------*/
+/*********************************************************************/
+
+#if !defined(_ALARMCODE_H_)
+#define _ALARMCODE_H_
+
+
+/* This is GP10 */
+#define MNET_PRODUCT_SPECIFIC_GP10
+
+#include "MnetProductId.h"
+#include "MnetModuleId.h"
+#include "JcErr.h"
+#include "MibTags.h"
+
+
+#define MAX_MODULE_SPECIFIC_ALARM 0xFFFF
+
+
+/* Allocation default severity of AlarmCode space per module */
+#define ALARM_CRITICAL_START_POINT 0x0001
+#define ALARM_MAJOR_START_POINT 0x0100
+#define ALARM_MINOR_START_POINT 0x0800
+#define ALARM_INFO_START_POINT 0x1000
+
+
+/* Common across products */
+#define MNET_MODULE_COMMON 0xFF
+
+/* Mnet Alarm error codes are allocated as follows: */
+/* */
+/* 31 23 15 7 0 */
+/* +----------------------------------------------------------+ */
+/* | spare | Module ID | Alaram ID | */
+/* +----------------------------------------------------------+ */
+/* */
+
+typedef enum {
+ EC_NOERROR = 0,
+ EC_COMMON_NOERROR = EC_NOERROR,
+
+ EC_GP10_START = (MNET_PRODUCT_GP10 << 24), /* GS Alarm Start point */
+
+
+ /* GP10 DSP Interface Driver Module */
+ EC_L1_START = ((MNET_PRODUCT_GP10 << 24) | (MODULE_L1 << 16)),
+
+
+ /* RIL3 Message Delivery */
+ EC_MD_START = ((MNET_PRODUCT_GP10 << 24) | (MODULE_MD << 16)),
+
+
+ //critical alarm code definitions
+ //
+ EC_GRR_START = ((MNET_PRODUCT_GP10 << 24) | (MODULE_GRR << 16)),
+ EC_GRR_BOOTING_UP,
+ EC_GRR_OS_CALL_WDCREATE_FAILED,
+ EC_GRR_OS_CALL_WDSTART_FAILED,
+ EC_GRR_OS_CALL_MSGQCREATE_FAILED,
+ EC_GRR_OS_CALL_MSGQRECEIVE_FAILED,
+ EC_GRR_OS_CALL_MSGQSEND_FAILED,
+ EC_GRR_OAM_CALL_SETMIBINTVAR_FAILED,
+ EC_GRR_OAM_CALL_SETTBLENTRYFIELD_FAILED,
+ EC_GRR_OAM_CALL_GETMIBSTRUCT_FAILED,
+ EC_GRR_OAM_CALL_GETMIBTBL_FAILED,
+ EC_GRR_OAM_CALL_UNSETTRAPBYMODULE_FAILED,
+ EC_GRR_OAM_CALL_SETTRAP_FAILED,
+ EC_GRR_RIL3_CALL_RRM_ENCODER_FAILED,
+
+ EC_GRR_DSP_1_NOT_RESPONDING,
+ EC_GRR_DSP_2_NOT_RESPONDING,
+
+ EC_GRR_DSP_1_NOT_TICKING,
+ EC_GRR_DSP_2_NOT_TICKING,
+
+ EC_GRR_DSP_1_INIT_WATCH_TIMER_EXPIRED,
+ EC_GRR_DSP_2_INIT_WATCH_TIMER_EXPIRED,
+
+ EC_GRR_TRX_1_SLOT_1_ACT_NACK,
+ EC_GRR_TRX_1_SLOT_2_ACT_NACK,
+ EC_GRR_TRX_1_SLOT_3_ACT_NACK,
+ EC_GRR_TRX_1_SLOT_4_ACT_NACK,
+ EC_GRR_TRX_1_SLOT_5_ACT_NACK,
+ EC_GRR_TRX_1_SLOT_6_ACT_NACK,
+ EC_GRR_TRX_1_SLOT_7_ACT_NACK,
+ EC_GRR_TRX_1_SLOT_8_ACT_NACK,
+ EC_GRR_TRX_2_SLOT_1_ACT_NACK,
+ EC_GRR_TRX_2_SLOT_2_ACT_NACK,
+ EC_GRR_TRX_2_SLOT_3_ACT_NACK,
+ EC_GRR_TRX_2_SLOT_4_ACT_NACK,
+ EC_GRR_TRX_2_SLOT_5_ACT_NACK,
+ EC_GRR_TRX_2_SLOT_6_ACT_NACK,
+ EC_GRR_TRX_2_SLOT_7_ACT_NACK,
+ EC_GRR_TRX_2_SLOT_8_ACT_NACK,
+
+ EC_GRR_TRX_1_AMSTATE_INVALID,
+ EC_GRR_TRX_2_AMSTATE_INVALID,
+
+ //Informational alarm code definitions
+ //
+ EC_GRR_INFO_BASE = (EC_GRR_START | ALARM_INFO_START_POINT),
+ EC_GRR_MIB_INVALID_CB_CONFIG,
+ EC_GRR_TRX_1_SLOT_1_CHANCOMB_CHANGED,
+ EC_GRR_TRX_1_SLOT_2_CHANCOMB_CHANGED,
+ EC_GRR_TRX_1_SLOT_3_CHANCOMB_CHANGED,
+ EC_GRR_TRX_1_SLOT_4_CHANCOMB_CHANGED,
+ EC_GRR_TRX_1_SLOT_5_CHANCOMB_CHANGED,
+ EC_GRR_TRX_1_SLOT_6_CHANCOMB_CHANGED,
+ EC_GRR_TRX_1_SLOT_7_CHANCOMB_CHANGED,
+ EC_GRR_TRX_1_SLOT_8_CHANCOMB_CHANGED,
+ EC_GRR_TRX_2_SLOT_1_CHANCOMB_CHANGED,
+ EC_GRR_TRX_2_SLOT_2_CHANCOMB_CHANGED,
+ EC_GRR_TRX_2_SLOT_3_CHANCOMB_CHANGED,
+ EC_GRR_TRX_2_SLOT_4_CHANCOMB_CHANGED,
+ EC_GRR_TRX_2_SLOT_5_CHANCOMB_CHANGED,
+ EC_GRR_TRX_2_SLOT_6_CHANCOMB_CHANGED,
+ EC_GRR_TRX_2_SLOT_7_CHANCOMB_CHANGED,
+ EC_GRR_TRX_2_SLOT_8_CHANCOMB_CHANGED,
+
+ EC_GRR_BTS_LOCKED,
+ EC_GRR_BTS_UNLOCKED,
+ EC_GRR_BTS_SHUTTINGDOWN,
+
+ EC_GRR_TRX_1_LOCKED,
+ EC_GRR_TRX_2_LOCKED,
+
+ EC_GRR_TRX_1_UNLOCKED,
+ EC_GRR_TRX_2_UNLOCKED,
+
+ EC_GRR_TRX_1_SHUTTINGDOWN,
+ EC_GRR_TRX_2_SHUTTINGDOWN,
+
+ EC_GRR_TRX_1_SLOT_1_LOCKED,
+ EC_GRR_TRX_1_SLOT_2_LOCKED,
+ EC_GRR_TRX_1_SLOT_3_LOCKED,
+ EC_GRR_TRX_1_SLOT_4_LOCKED,
+ EC_GRR_TRX_1_SLOT_5_LOCKED,
+ EC_GRR_TRX_1_SLOT_6_LOCKED,
+ EC_GRR_TRX_1_SLOT_7_LOCKED,
+ EC_GRR_TRX_1_SLOT_8_LOCKED,
+ EC_GRR_TRX_2_SLOT_1_LOCKED,
+ EC_GRR_TRX_2_SLOT_2_LOCKED,
+ EC_GRR_TRX_2_SLOT_3_LOCKED,
+ EC_GRR_TRX_2_SLOT_4_LOCKED,
+ EC_GRR_TRX_2_SLOT_5_LOCKED,
+ EC_GRR_TRX_2_SLOT_6_LOCKED,
+ EC_GRR_TRX_2_SLOT_7_LOCKED,
+ EC_GRR_TRX_2_SLOT_8_LOCKED,
+
+ EC_GRR_TRX_1_SLOT_1_UNLOCKED,
+ EC_GRR_TRX_1_SLOT_2_UNLOCKED,
+ EC_GRR_TRX_1_SLOT_3_UNLOCKED,
+ EC_GRR_TRX_1_SLOT_4_UNLOCKED,
+ EC_GRR_TRX_1_SLOT_5_UNLOCKED,
+ EC_GRR_TRX_1_SLOT_6_UNLOCKED,
+ EC_GRR_TRX_1_SLOT_7_UNLOCKED,
+ EC_GRR_TRX_1_SLOT_8_UNLOCKED,
+ EC_GRR_TRX_2_SLOT_1_UNLOCKED,
+ EC_GRR_TRX_2_SLOT_2_UNLOCKED,
+ EC_GRR_TRX_2_SLOT_3_UNLOCKED,
+ EC_GRR_TRX_2_SLOT_4_UNLOCKED,
+ EC_GRR_TRX_2_SLOT_5_UNLOCKED,
+ EC_GRR_TRX_2_SLOT_6_UNLOCKED,
+ EC_GRR_TRX_2_SLOT_7_UNLOCKED,
+ EC_GRR_TRX_2_SLOT_8_UNLOCKED,
+
+ EC_GRR_TRX_1_SLOT_1_SHUTTINGDOWN,
+ EC_GRR_TRX_1_SLOT_2_SHUTTINGDOWN,
+ EC_GRR_TRX_1_SLOT_3_SHUTTINGDOWN,
+ EC_GRR_TRX_1_SLOT_4_SHUTTINGDOWN,
+ EC_GRR_TRX_1_SLOT_5_SHUTTINGDOWN,
+ EC_GRR_TRX_1_SLOT_6_SHUTTINGDOWN,
+ EC_GRR_TRX_1_SLOT_7_SHUTTINGDOWN,
+ EC_GRR_TRX_1_SLOT_8_SHUTTINGDOWN,
+ EC_GRR_TRX_2_SLOT_1_SHUTTINGDOWN,
+ EC_GRR_TRX_2_SLOT_2_SHUTTINGDOWN,
+ EC_GRR_TRX_2_SLOT_3_SHUTTINGDOWN,
+ EC_GRR_TRX_2_SLOT_4_SHUTTINGDOWN,
+ EC_GRR_TRX_2_SLOT_5_SHUTTINGDOWN,
+ EC_GRR_TRX_2_SLOT_6_SHUTTINGDOWN,
+ EC_GRR_TRX_2_SLOT_7_SHUTTINGDOWN,
+ EC_GRR_TRX_2_SLOT_8_SHUTTINGDOWN,
+
+ /* RIL3-RR functional entity */
+
+ /* Critical alarm code definitions */
+ EC_RM_START = ((MNET_PRODUCT_GP10 << 24) | (MODULE_RM << 16)),
+ EC_RM_VC_INIT_FAILED,
+
+ EC_RM_DSP_0_NOT_TICKING,
+ EC_RM_DSP_1_NOT_TICKING,
+ EC_RM_DSP_0_NOT_RESPONDING,
+ EC_RM_DSP_1_NOT_RESPONDING,
+
+ EC_RM_DRF_SYNTH_0_FAILED_BCCH,
+ EC_RM_DRF_SYNTH_1_FAILED_BCCH,
+
+ EC_RM_CBCH_UNUSABLE,
+ EC_RM_NOTCHFS_USABLE,
+ EC_RM_NO_TRX_ENABLED,
+
+ EC_RM_CHAN_COMB_5_MISPLACED,
+ EC_RM_CHAN_COMB_UNSUPPORTED,
+ EC_RM_TWO_CHAN_COMB_5_EXIST,
+ EC_RM_TOO_MANY_CHAN_COMB_1_DETECTED,
+ EC_RM_TOO_MANY_CHAN_COMB_5_DETECTED,
+
+ EC_RM_OS_CALL_WDCREATE_FAILED,
+ EC_RM_OS_CALL_MSGQRECEIVE_FAILED,
+ EC_RM_OAM_CALL_SETTBLENTRYFIELD_FAILED,
+ EC_RM_OAM_CALL_SETMIBINTVAR_FAILED,
+ EC_RM_RF_BOARD_NOT_DETECTED,
+
+ //informational alarm code definitions
+ EC_RM_INFO_BASE = (EC_RM_START | ALARM_INFO_START_POINT),
+
+ EC_RM_DRF_SYNTH_0_FAILED_NON_BCCH,
+ EC_RM_DRF_SYNTH_1_FAILED_NON_BCCH,
+
+ EC_RM_BTS_LOCKED,
+ EC_RM_BTS_UNLOCKED,
+ EC_RM_BTS_SHUTTINGDOWN,
+ EC_RM_TRX_1_LOCKED,
+ EC_RM_TRX_2_LOCKED,
+ EC_RM_TRX_1_UNLOCKED,
+ EC_RM_TRX_2_UNLOCKED,
+ EC_RM_TRX_1_SHUTTINGDOWN,
+ EC_RM_TRX_2_SHUTTINGDOWN,
+ EC_RM_TRX_1_SLOT_1_LOCKED,
+ EC_RM_TRX_1_SLOT_2_LOCKED,
+ EC_RM_TRX_1_SLOT_3_LOCKED,
+ EC_RM_TRX_1_SLOT_4_LOCKED,
+ EC_RM_TRX_1_SLOT_5_LOCKED,
+ EC_RM_TRX_1_SLOT_6_LOCKED,
+ EC_RM_TRX_1_SLOT_7_LOCKED,
+ EC_RM_TRX_1_SLOT_8_LOCKED,
+ EC_RM_TRX_2_SLOT_1_LOCKED,
+ EC_RM_TRX_2_SLOT_2_LOCKED,
+ EC_RM_TRX_2_SLOT_3_LOCKED,
+ EC_RM_TRX_2_SLOT_4_LOCKED,
+ EC_RM_TRX_2_SLOT_5_LOCKED,
+ EC_RM_TRX_2_SLOT_6_LOCKED,
+ EC_RM_TRX_2_SLOT_7_LOCKED,
+ EC_RM_TRX_2_SLOT_8_LOCKED,
+ EC_RM_TRX_1_SLOT_1_UNLOCKED,
+ EC_RM_TRX_1_SLOT_2_UNLOCKED,
+ EC_RM_TRX_1_SLOT_3_UNLOCKED,
+ EC_RM_TRX_1_SLOT_4_UNLOCKED,
+ EC_RM_TRX_1_SLOT_5_UNLOCKED,
+ EC_RM_TRX_1_SLOT_6_UNLOCKED,
+ EC_RM_TRX_1_SLOT_7_UNLOCKED,
+ EC_RM_TRX_1_SLOT_8_UNLOCKED,
+ EC_RM_TRX_2_SLOT_1_UNLOCKED,
+ EC_RM_TRX_2_SLOT_2_UNLOCKED,
+ EC_RM_TRX_2_SLOT_3_UNLOCKED,
+ EC_RM_TRX_2_SLOT_4_UNLOCKED,
+ EC_RM_TRX_2_SLOT_5_UNLOCKED,
+ EC_RM_TRX_2_SLOT_6_UNLOCKED,
+ EC_RM_TRX_2_SLOT_7_UNLOCKED,
+ EC_RM_TRX_2_SLOT_8_UNLOCKED,
+ EC_RM_TRX_1_SLOT_1_SHUTTINGDOWN,
+ EC_RM_TRX_1_SLOT_2_SHUTTINGDOWN,
+ EC_RM_TRX_1_SLOT_3_SHUTTINGDOWN,
+ EC_RM_TRX_1_SLOT_4_SHUTTINGDOWN,
+ EC_RM_TRX_1_SLOT_5_SHUTTINGDOWN,
+ EC_RM_TRX_1_SLOT_6_SHUTTINGDOWN,
+ EC_RM_TRX_1_SLOT_7_SHUTTINGDOWN,
+ EC_RM_TRX_1_SLOT_8_SHUTTINGDOWN,
+ EC_RM_TRX_2_SLOT_1_SHUTTINGDOWN,
+ EC_RM_TRX_2_SLOT_2_SHUTTINGDOWN,
+ EC_RM_TRX_2_SLOT_3_SHUTTINGDOWN,
+ EC_RM_TRX_2_SLOT_4_SHUTTINGDOWN,
+ EC_RM_TRX_2_SLOT_5_SHUTTINGDOWN,
+ EC_RM_TRX_2_SLOT_6_SHUTTINGDOWN,
+ EC_RM_TRX_2_SLOT_7_SHUTTINGDOWN,
+ EC_RM_TRX_2_SLOT_8_SHUTTINGDOWN,
+
+ EC_RM_TRX_0_RADIO_OFF, //Radio for TRX 0 is off
+ EC_RM_TRX_1_RADIO_OFF, //Radio for TRX 1 is off
+ EC_RM_RECV_CORRUPTED_DSP_MSG, //RM received corrupted DSP message
+ EC_RM_END,
+
+ /* RIL3-MM functional entity */
+ EC_MM_START = ((MNET_PRODUCT_GP10 << 24) | (MODULE_MM << 16)),
+
+ /* RIL3-CC functional entity */
+ EC_CC_START = ((MNET_PRODUCT_GP10 << 24) | (MODULE_CC << 16)),
+
+
+ /* LAPDm functional entity */
+ EC_L2_DATA_START = ((MNET_PRODUCT_GP10 << 24) | (MODULE_L2 << 16)),
+ EC_L2_DATA_CORRUPTED, /* critical error, data corrupted */
+
+ EC_L2_FREE_FRAME_EXHAUSTED = (EC_L2_DATA_START | ALARM_MAJOR_START_POINT), /* non-critical error, no more free LAPDm available */
+ EC_L2_END,
+
+
+ /* RIL3-SMS functional entity */
+ EC_SMS_START = ((MNET_PRODUCT_GP10 << 24) | (MODULE_SMS << 16)),
+
+ /* OAM functional entity informational alarms */
+ EC_OAM_START = ((MNET_PRODUCT_GP10 << 24) | (MODULE_OAM << 16)),
+
+ /* Oam critical */
+ EC_OAM_REBOOT, /* ViperCell is being reboot via OAM interface */
+
+ EC_OAM_RELOAD_MIB = (EC_OAM_START | ALARM_INFO_START_POINT), // New MIB has been loaded (re-loaded */
+ EC_OAM_DISABLE_TIMEX, /* Timer for saving mib has be disabled */
+ EC_OAM_ENABLE_TIMEX, /* MIB saving timer has been enabled */
+ EC_OAM_ALLOW_DUPS, /* Allow duplicate saving */
+ EC_OAM_SUPPRESS_DUPS, /* Do not allow duplicate saving */
+ EC_OAM_END,
+
+ /* H323 Stack and Application Layers */
+ EC_VOIP_START = ((MNET_PRODUCT_GP10 << 24) | (MODULE_H323 << 16)),
+ EC_VIPERBASE_LINKDOWN,
+ EC_VOIP_END,
+
+ /* LUDB Module specific error code*/
+ EC_LUDB_START = ((MNET_PRODUCT_GP10 << 24) | (MODULE_LUDB << 16)),
+
+
+ /* ViperLog Task */
+ EC_LOG_START = ((MNET_PRODUCT_GP10 << 24) | (MODULE_LOG << 16)),
+
+ /* Maintenance Command Handler */
+ EC_MCH_START = ((MNET_PRODUCT_GP10 << 24) | (MODULE_MCH << 16)),
+
+ /* Alarm Module ID*/
+ EC_ALARM_START = ((MNET_PRODUCT_GP10 << 24) | (MODULE_ALARM << 16)),
+
+ /* System Initialization Module */
+ EC_SYSINIT_START = ((MNET_PRODUCT_GP10 << 24) | (MODULE_SYSINIT << 16)),
+ EC_ROOT_MPC_SRAM_FAIL, /* MPC SRAM test failure */
+ EC_ROOT_DSP0_INT_DATA_RAM_FAIL, /* DSP0 internal data RAM test failure */
+ EC_ROOT_DSP1_INT_DATA_RAM_FAIL, /* DSP1 internal data RAM test failure */
+ EC_ROOT_DSP0_INT_PROG_RAM_FAIL, /* DSP0 internal program RAM test failure */
+ EC_ROOT_DSP1_INT_PROG_RAM_FAIL, /* DSP1 internal program RAM test failure */
+ EC_ROOT_DSP0_EXT_RAM_FAIL, /* DSP0 external RAM test failure */
+ EC_ROOT_DSP1_EXT_RAM_FAIL, /* DSP1 external RAM test failure */
+ EC_ROOT_FPGA0_FAIL, /* FPGA0 test failure */
+ EC_ROOT_FPGA1_FAIL, /* FPGA1 test failure */
+ EC_ROOT_I2C_FAIL, /* I2C test failure */
+ EC_ROOT_TASK_START_DELEY, /* ViperTask startup delay detected */
+ EC_ROOT_SYSCMD_SYM_NOT_FOUND, /* SysCommand_xxx symbol not found */
+ EC_ROOT_CRITICAL_TASK_SUSPEND, /* ViperTask suspension detected */
+ EC_ROOT_CRITICAL_TASK_MISSING, /* ViperTask exit abnormally detected */
+ EC_ROOT_LOAD_MODULE_FAIL,
+ EC_SYSINIT_MAJOR_BASE = (EC_SYSINIT_START | ALARM_MAJOR_START_POINT),
+ EC_ROOT_NON_CRITICAL_TASK_SUSPEND, /* ViperTask suspension detected */
+ EC_ROOT_NON_CRITICAL_TASK_MISSING, /* ViperTask exit abnormally detected */
+ EC_ROOT_TX_POWER_TABLE_ERROR, /* TX power table is corrupted */
+ EC_ROOT_END,
+
+ /* CDR Client Alarm */
+ EC_CDR_CLIENT_START_POINT = ((MNET_PRODUCT_GP10 << 24) | (MODULE_CDR << 16)),
+ EC_CDR_CLIENT_CRITICAL_START_POINT = (EC_CDR_CLIENT_START_POINT | ALARM_CRITICAL_START_POINT),
+ EC_CDR_CLIENT_INIT_FAILED ,
+ EC_CDR_CLIENT_MAJOR_START_POINT = (EC_CDR_CLIENT_START_POINT | ALARM_MAJOR_START_POINT ),
+ EC_CDR_CLIENT_UNABLE_CONNECT_SERVER,
+ EC_CDR_CLIENT_INFO_START_POINT = (EC_CDR_CLIENT_START_POINT | ALARM_INFO_START_POINT ),
+ EC_CDR_CLIENT_BAD_SSL_PASSWORD_FILE,
+ EC_CDR_CLIENT_BAD_SSL_KEY_FILE ,
+ EC_CDR_CLIENT_BAD_LOCAL_CERTIFICATE,
+ EC_CDR_CLIENT_BAD_PEER_CERTIFICATE ,
+ EC_CDR_CLIENT_END ,
+
+ /* Common and Generic Alarm from 1 to 255 */
+ EC_COMMON_START = ((MNET_PRODUCT_GP10 << 24) | (MNET_MODULE_COMMON << 16)),
+
+ /* Common and Generic Alarm from 1 to 255 */
+ EC_BOOTING_UP, /* ViperCell boot up */
+ EC_SHUTTING_DOWN, /* The module shutting down */
+
+ EC_NO_MEMORY, /* temporarily out of memory */
+ EC_INTERNAL_ERROR, /* memory curruption etc, exit is necessary */
+ EC_START_REBOOT, /* reboot started and captured using reboot hook. */
+ EC_COMMON_END,
+
+ EC_GP10_END
+
+}AlarmCode_t;
+
+/* For compatibility of the old version */
+#define Alarm_errorCode_t AlarmCode_t
+
+extern "C" JC_STATUS alarm_raise
+(
+ MNET_MODULE_ID mid, /* GP10 Source module ID */
+ MibTag moduleErrorTag, /* GP10 Source module's MIB error tag */
+ AlarmCode_t alarm_code /* GP10 specific alarm code */
+);
+
+extern "C" JC_STATUS alarm_raise_args
+(
+ MNET_MODULE_ID mid, /* GMC Source module ID */
+ MibTag moduleErrorTag, /* GMC Source module's MIB error tag */
+ AlarmCode_t alarm_code, /* GMC specific alarm code */
+ int arg1, /* first arguments */
+ int arg2 /* second argument */
+ );
+
+extern "C" JC_STATUS alarm_clear
+(
+ MNET_MODULE_ID mid, /* GP10 Source module ID */
+ MibTag moduleErrorTag, /* GP10 Source module's MIB error tag */
+ AlarmCode_t alarm_code /* GP10 specific alarm code */
+);
+
+
+#endif // _ALARMCODE_H_ \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Common_To_Host/include/GP10Err.h b/data/mnet/GP10/Host/Common_To_Host/include/GP10Err.h
new file mode 100644
index 0000000..bbe9990
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/include/GP10Err.h
@@ -0,0 +1,51 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : GP10Err.h */
+/* Author(s) : Tim Olson */
+/* Create Date : 9/18/2000 */
+/* Description : */
+/* */
+/*********************************************************************/
+#ifndef _GSERR_H_
+#define _GSERR_H_ /* include once only */
+
+#include "JCErr.h"
+#include "MnetModuleId.h"
+
+
+
+/* VxWorks reserves module id's 1-500 */
+/* Common code uses - module number 0x1ff (511 decimal) */
+
+/* All platform specific error codes should be entered below here. */
+/* Format for error codes is as follows: */
+/* +-------------------------------------------+ */
+/* | Module Id + 512 | Error Code | */
+/* +-------------------------------------------+ */
+/* */
+/* 0x01ff0000 - Common code error codes */
+/* 0x02000000 - First target module error codes */
+/* 0x02010000 - Second target module error codes */
+/* . */
+/* . */
+/* 0xffff0000 - Last target module error codes */
+
+typedef enum
+{
+ /* Logger error codes */
+ MODULE_L1_ERR_CODE_START = ((JC_TARGET_ERR_CODE_START + MODULE_L1) << 16)
+
+ /* Add next module error codes below */
+
+} GP10_ERROR_CODES;
+
+#endif
diff --git a/data/mnet/GP10/Host/Common_To_Host/include/GP10MsgTypes.h b/data/mnet/GP10/Host/Common_To_Host/include/GP10MsgTypes.h
new file mode 100644
index 0000000..2dc721a
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/include/GP10MsgTypes.h
@@ -0,0 +1,76 @@
+#ifndef _GP10MSGTYPES_H_
+#define _GP10MSGTYPES_H_ /* include once only */
+
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : GP10MsgTypes.h */
+/* Author(s) : Tim Olson */
+/* Create Date : 9/18/2000 */
+/* Description : GSMsgTypes contains the message types for all */
+/* modules in the GS project */
+/* */
+/*********************************************************************/
+/* REVISION HISTORY
+/*___________________________________________________________________*/
+/*----------+--------+-----------------------------------------------*/
+/* Name | Date | Reason */
+/*----------+--------+-----------------------------------------------*/
+/* Bhawani |09/28/00| Added SNDCP message types */
+/* Igal |10/19/00| Added LLC internal and BSSGP message types */
+/*----------+--------+-----------------------------------------------*/
+/*********************************************************************/
+
+
+#include "MnetModuleId.h"
+
+
+/* All platform specific msg types should be entered below here. */
+/* Format for message types is as follows: */
+/* +-------------------------------------------+ */
+/* | Module Id | MsgType | */
+/* +-------------------------------------------+ */
+/* */
+/* 0x00000000 - First target module message types */
+/* 0x00010000 - Second target module message types */
+/* . */
+/* . */
+/* 0xffff0000 - Last target module message types */
+
+typedef enum
+{
+/* RLC_MAC receiving message types */
+ RLCMAC_MSG_TYPE_START = (MODULE_RLCMAC << 16),
+ RLCMAC_RM_MD_MSG_IND,
+ RLCMAC_L1_MSG_IND,
+ RLCMAC_L1_RTS,
+ RLCMAC_READY_TO_GO,
+ RLCMAC_ADMIN_STATE_CHANGE,
+ RLCMAC_OP_STATE_CHANGE,
+ RLCMAC_TIMESLOT_CONFIG,
+ RLCMAC_DL_PDU_REQ,
+ RLCMAC_LAST_MSG_TYPE,
+ RLCMAC_T3169_EXPIRY,
+ RLCMAC_T3195_EXPIRY,
+ RLCMAC_T3191_EXPIRY,
+ RLCMAC_T3193_EXPIRY,
+ RLCMAC_UL_ACTIVITY_TIMER_EXPIRY,
+ RLCMAC_DL_ACTIVITY_TIMER_EXPIRY,
+
+
+/* common message type could be received by multiple modules */
+ GP10_COMMON_MSG_TYPE_START = 0x80000000,
+ GP10_COMMON_LAST_MSG_TYPE
+
+} GP10_MESSAGE_TYPES;
+
+
+#endif /* _GP10MSGTYPES_H_ */ \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Common_To_Host/include/GP10OsTune.h b/data/mnet/GP10/Host/Common_To_Host/include/GP10OsTune.h
new file mode 100644
index 0000000..a13de3f
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/include/GP10OsTune.h
@@ -0,0 +1,140 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : GSOsTune.h */
+/* Author(s) : Tim Olson */
+/* Create Date : 9/18/2000 */
+/* Description : This file contains task specific tuning parameters */
+/* such task priorities, stack sizes, etc. */
+/* */
+/*********************************************************************/
+/* REVISION HISTORY
+/*___________________________________________________________________*/
+/*----------+--------+-----------------------------------------------*/
+/* Name | Date | Reason */
+/*----------+--------+-----------------------------------------------*/
+/*----------+--------+-----------------------------------------------*/
+/*********************************************************************/
+
+#ifndef _GP10OSTUNE_H_
+#define _GP10OSTUNE_H_ /* include once only */
+
+/* RootTask Os parameters */
+#define NET_TASK_PRIORITY 10
+#define ROOT_TASK_PRIORITY1 9
+#define ROOT_TASK_PRIORITY2 150
+#define ROOT_TASK_OPTION 0
+#define ROOT_TASK_STACK_SIZE 10000
+
+/* Add next module Os parameters below */
+
+#define RTPMAIN_TASK_PRIORITY 10
+#define RTPMAIN_TASK_OPTION 0
+#define RTPMAIN_TASK_STACK_SIZE 60000
+
+#define RTPSUB_TASK_PRIORITY 10
+#define RTPSUB_TASK_OPTION 0
+#define RTPSUB_TASK_STACK_SIZE 10240
+
+#define CC_SUB_TASK_PRIORITY 70
+#define CC_SUB_TASK_OPTION 0
+#define CC_SUB_TASK_STACK_SIZE 10000
+
+#define VPCHAN_TASK_PRIORITY 50
+#define VPCHAN_TASK_OPTION 0
+#define VPCHAN_TASK_STACK_SIZE 100000
+
+#define VBLINK_TASK_PRIORITY 150
+#define VBLINK_TASK_OPTION 0
+#define VBLINK_TASK_STACK_SIZE 30000
+
+#define LOG_TASK_PRIORITY 150
+#define LOG_TASK_OPTION 0
+#define LOG_TASK_STACK_SIZE 100000
+
+#define MCH_TASK_PRIORITY 150
+#define MCH_TASK_OPTION 0
+#define MCH_TASK_STACK_SIZE 100000
+
+#define CNI_LAPDM_PH_SERVER_PRIORITY 10
+#define CNI_LAPDM_PH_SERVER_OPTION 0
+#define CNI_LAPDM_PH_SERVER_STACK_SIZE 20000
+
+#define CNI_LAPDM_DL_SERVER_PRIORITY 50
+#define CNI_LAPDM_DL_SERVER_OPTION 0
+#define CNI_LAPDM_DL_SERVER_STACK_SIZE 20000
+
+#define H323_TASK_PRIORITY 70
+#define H323_TASK_OPTION 0
+#define H323_TASK_STACK_SIZE 100000
+
+#define CC_TASK_PRIORITY 70
+#define CC_TASK_OPTION 0
+#define CC_TASK_STACK_SIZE 10000
+
+#define RM_TASK_PRIORITY 70
+#define RM_TASK_OPTION 0
+#define RM_TASK_STACK_SIZE 20000
+
+#define GRR_MONITOR_TASK_PRIORITY 150
+#define GRR_MONITOR_TASK_OPTION 0
+#define GRR_MONITOR_TASK_STACK_SIZE 5000
+
+#define L1UP_TASK_PRIORITY 10
+#define L1UP_TASK_OPTION 0
+#define L1UP_TASK_STACK_SIZE (32 * 1024)
+
+#define L1DN_TASK_PRIORITY 10
+#define L1DN_TASK_OPTION 0
+#define L1DN_TASK_STACK_SIZE (32 * 1024)
+
+#define DSP_TASK_PRIORITY 50
+#define DSP_TASK_OPTION 0
+#define DSP_TASK_STACK_SIZE (1024 * 1024)
+
+#define LUDB_TASK_PRIORITY 70
+#define LUDB_TASK_OPTION 0
+#define LUDB_TASK_STACK_SIZE 200000
+
+#define MM_TASK_PRIORITY 70
+#define MM_TASK_OPTION 0
+#define MM_TASK_STACK_SIZE 200000
+
+#define PM_TASK_PRIORITY 150
+#define PM_TASK_OPTION 0
+#define PM_TASK_STACK_SIZE 10000
+
+#define ALARM_TASK_PRIORITY 100
+#define ALARM_TASK_OPTION 0
+#define ALARM_TASK_STACK_SIZE 10000
+
+#define CDR_TASK_PRIORITY 150
+#define CDR_TASK_OPTION 0
+#define CDR_TASK_STACK_SIZE 20000
+
+#define TCPSRV_TASK_PRIORITY 150
+#define TCPSRV_TASK_OPTION 0
+#define TCPSRV_TASK_STACK_SIZE 20000
+
+#define RLCMAC_TASK_PRIORITY 70
+#define RLCMAC_TASK_OPTION 0
+#define RLCMAC_TASK_STACK_SIZE 40000
+
+#define BSSGP_TASK_PRIORITY 70
+#define BSSGP_TASK_OPTION 0
+#define BSSGP_TASK_STACK_SIZE 10240
+
+#define GSLINK_TASK_PRIORITY 150
+#define GSLINK_TASK_OPTION 0
+#define GSLINK_TASK_STACK_SIZE 10000
+
+
+#endif
diff --git a/data/mnet/GP10/Host/Common_To_Host/include/MnetModuleId.h b/data/mnet/GP10/Host/Common_To_Host/include/MnetModuleId.h
new file mode 100644
index 0000000..860476a
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/include/MnetModuleId.h
@@ -0,0 +1,88 @@
+#ifndef _MNETMODULES_H_
+#define _MNETMODULES_H_ /* include once only */
+
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : MnetModules.h */
+/* Author(s) : Tim Olson */
+/* Create Date : 9/18/2000 */
+/* Description : */
+/* */
+/*********************************************************************/
+/* REVISION HISTORY */
+/*___________________________________________________________________*/
+/*----------+--------+-----------------------------------------------*/
+/* Name | Date | Reason */
+/*----------+--------+-----------------------------------------------*/
+/*----------+--------+-----------------------------------------------*/
+/*********************************************************************/
+
+
+#define MNET_MAX_MODULE_ID_NAME 128
+
+typedef enum
+{
+ MODULE_L1 = 0x00, /* DSP Interface Driver Module */
+ MODULE_MD = 0x01, /* RIL3 Message Delivery */
+ MODULE_RM = 0x02, /* RIL3-RR functional entity */
+ MODULE_MM = 0x03, /* RIL3-MM functional entity */
+ MODULE_CC = 0x04, /* RIL3-CC functional entity */
+ MODULE_L2 = 0x05, /* LAPDm functional entity */
+ MODULE_SMS = 0x06, /* RIL3-SMS functional entity */
+ MODULE_OAM = 0x07, /* BTS OAM functional entity */
+ MODULE_H323 = 0x08, /* H323 Stack and Application Layers */
+ MODULE_LUDB = 0x09, /* LUDB Task - 5/17/99 klim */
+ MODULE_EXT_VC = 0x0A, /* Msg from External ViperCell */
+ MODULE_LOG = 0x0B, /* ViperLog Task - 7/14/99 klim */
+ MODULE_MCH = 0x0C, /* Maintenance Command Handler - 7/15/99 klim */
+ MODULE_ALARM = 0x0D, /* Alarm Module ID*/
+ MODULE_SYSINIT = 0x0E,
+ MODULE_PM = 0x0F, /* Performance Measurement Module */
+ MODULE_SMSCBC = 0x10,/* SMS-Cell broadcast center, out of VC */
+ MODULE_VBLINK = 0x11,/* ViperBase - ViperCell link client */
+ MODULE_CDR = 0x12, /* CDR Task */
+ MODULE_CISS = 0x13, /* CISS SUB MODULE */
+ MODULE_TCPSRV = 0x14, /* TCP Server */
+ MODULE_EXTHOA = 0x15, /* ext-HO <xxu:05-16-01> HOA */
+ MODULE_BSSGP = 0x16, /* BSSGP module */
+ MODULE_RLCMAC = 0x17, /* RLC_MAC module */
+ MODULE_GRR = 0x18, /* GRR module */
+ MODULE_GSLINK = 0x19, /* GRR module */
+ /*
+ ......
+ Other module IDs added here if needed later
+ ......
+ */
+ MNET_MAX_MODULE_IDS
+
+} MNET_MODULE_ID;
+
+
+extern char MnetModuleNames [][MNET_MAX_MODULE_ID_NAME];
+
+#ifdef __cplusplus
+inline char *GetMnetModuleName(MNET_MODULE_ID id)
+#else
+static char *GetMnetModuleName(MNET_MODULE_ID id)
+#endif
+{
+ if (id < MNET_MAX_MODULE_IDS)
+ {
+ return (MnetModuleNames[id]);
+ }
+ else
+ {
+ return("UNKNOWN_MODULE");
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Common_To_Host/include/mibhand.h b/data/mnet/GP10/Host/Common_To_Host/include/mibhand.h
new file mode 100644
index 0000000..c44f165
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/include/mibhand.h
@@ -0,0 +1,63 @@
+/******************************************************************************
+ ******************************************************************************
+ **** This file was automatically generated by Wind River Systems
+ **** Emissary SNMP MIB Compiler, version 7.0.
+ **** This file was generated using the -skel.h switch.
+ ****
+ **** This file contains declarations of stub functions to aid in building
+ **** the agent MIB interface. It declares all the MIB get, set, test and
+ **** next method routines that you will need to supply. You'll probably
+ **** want to FORCE-INCLUDE this file when using the -mib.c output mode.
+ ****
+ **** To generate the skeletal stub functions themselves, run mibcomp
+ **** with the -skel switch.
+ ****
+ **** YOU MAY MODIFY THIS FILE BUT BEWARE ACCIDENTALLY OVERWRITING IT
+ **** BY REGENERATING IT WITH THE MIB COMPILER.
+ ****
+ **** Last build date: Wed Apr 25 12:07:55 2001
+ **** from files:
+ **** ../mibs/rfc1155.smi, ../mibs/rfc1213.mib, mnet.mib, snmpMib2.mib
+ ******************************************************************************
+ ******************************************************************************
+ */
+
+void systemGet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void null_test_async(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void systemSet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void systemTest(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void interfacesGet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void ifEntryGet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void ifEntryNext(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void ifEntrySet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void ifEntryTest(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void ipNetToMediaEntryGet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void ipNetToMediaEntrySet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void ipNetToMediaEntryTest(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void ipNetToMediaEntryNext(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void ipGet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void ipSet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void ipTest(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void ipAddrEntryGet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void ipAddrEntryNext(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void ipRouteEntryGet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void ipRouteEntrySet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void ipRouteEntryTest(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void ipRouteEntryNext(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void icmpGet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void tcpGet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void tcpConnEntryGet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void tcpConnEntrySet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void tcpConnEntryTest(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void tcpConnEntryNext(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void udpGet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void udpEntryGet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void udpEntryNext(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void snmpGet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void snmpSet(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void snmpTest(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void _snmp_getMethod(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void _snmp_setMethod(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void _snmp_testMethod(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void _snmp_nextMethod(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
+void null_next_async(OIDC_T, int, OIDC_T*, SNMP_PKT_T*, VB_T*);
diff --git a/data/mnet/GP10/Host/Common_To_Host/include/mibleaf.h b/data/mnet/GP10/Host/Common_To_Host/include/mibleaf.h
new file mode 100644
index 0000000..697b3f1
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/include/mibleaf.h
@@ -0,0 +1,1270 @@
+/******************************************************************************
+ ******************************************************************************
+ **** This file was automatically generated by Wind River Systems
+ **** Emissary SNMP MIB Compiler, version 7.0.
+ **** This file was generated using the -leaf switch.
+ ****
+ **** This file #defines C preprocessor macros providing a variety of
+ **** information for the leaf objects in the MIB.
+ ****
+ **** The file includes a LEAF_xxx macro for each leaf object in the
+ **** MIB (xxx is replaced by the object's name). The value of the
+ **** LEAF_xxx macro is the final component of the object's object
+ **** identifier.
+ ****
+ **** If the object's SYNTAX clause included named INTEGER values,
+ **** then there is a VAL_xxx_yyy macro for each named value (xxx is
+ **** replaced by the object's name and yyy by the value's name). The
+ **** value of the VAL_xxx_yyy macro is the value associated with the
+ **** named value.
+ ****
+ **** If the object's SYNTAX clause specified a set of range limitations
+ **** for the value of the object, then there are one or more sets of
+ **** MIN_xxx and MAX_xxx macros specifying the lower and upper bound of
+ **** each range limitation.
+ ****
+ **** If the object's SYNTAX clause specified a set of size constraints
+ **** for the value of the object, then there are one or more sets of
+ **** MINSIZE_xxx and MAXSIZE_xxx macros specifying the lower and upper
+ **** bound of each size constraint. (If the size constraint is a single
+ **** value rather than a range then the MINSIZE_xxx and MAXSIZE_xxx
+ **** macros are replaced by a single SIZE_xxx macro.)
+ ****
+ **** DO NOT MODIFY THIS FILE BY HAND.
+ ****
+ **** Last build date: Wed Apr 25 12:07:54 2001
+ **** from files:
+ **** ../mibs/rfc1155.smi, ../mibs/rfc1213.mib, mnet.mib, snmpMib2.mib
+ ******************************************************************************
+ ******************************************************************************
+ */
+
+#define LEAF_sysDescr 1
+#define MINSIZE_sysDescr 0L
+#define MAXSIZE_sysDescr 255L
+#define LEAF_sysObjectID 2
+#define LEAF_sysUpTime 3
+#define LEAF_sysContact 4
+#define MINSIZE_sysContact 0L
+#define MAXSIZE_sysContact 255L
+#define LEAF_sysName 5
+#define MINSIZE_sysName 0L
+#define MAXSIZE_sysName 255L
+#define LEAF_sysLocation 6
+#define MINSIZE_sysLocation 0L
+#define MAXSIZE_sysLocation 255L
+#define LEAF_sysServices 7
+#define MIN_sysServices 0L
+#define MAX_sysServices 127L
+#define LEAF_ifNumber 1
+#define LEAF_ifIndex 1
+#define LEAF_ifDescr 2
+#define MINSIZE_ifDescr 0L
+#define MAXSIZE_ifDescr 255L
+#define LEAF_ifType 3
+#define VAL_ifType_other 1L
+#define VAL_ifType_regular1822 2L
+#define VAL_ifType_hdh1822 3L
+#define VAL_ifType_ddn_x25 4L
+#define VAL_ifType_rfc877_x25 5L
+#define VAL_ifType_ethernet_csmacd 6L
+#define VAL_ifType_iso88023_csmacd 7L
+#define VAL_ifType_iso88024_tokenBus 8L
+#define VAL_ifType_iso88025_tokenRing 9L
+#define VAL_ifType_iso88026_man 10L
+#define VAL_ifType_starLan 11L
+#define VAL_ifType_proteon_10Mbit 12L
+#define VAL_ifType_proteon_80Mbit 13L
+#define VAL_ifType_hyperchannel 14L
+#define VAL_ifType_fddi 15L
+#define VAL_ifType_lapb 16L
+#define VAL_ifType_sdlc 17L
+#define VAL_ifType_ds1 18L
+#define VAL_ifType_e1 19L
+#define VAL_ifType_basicISDN 20L
+#define VAL_ifType_primaryISDN 21L
+#define VAL_ifType_propPointToPointSerial 22L
+#define VAL_ifType_ppp 23L
+#define VAL_ifType_softwareLoopback 24L
+#define VAL_ifType_eon 25L
+#define VAL_ifType_ethernet_3Mbit 26L
+#define VAL_ifType_nsip 27L
+#define VAL_ifType_slip 28L
+#define VAL_ifType_ultra 29L
+#define VAL_ifType_ds3 30L
+#define VAL_ifType_sip 31L
+#define VAL_ifType_frame_relay 32L
+#define LEAF_ifMtu 4
+#define LEAF_ifSpeed 5
+#define LEAF_ifPhysAddress 6
+#define LEAF_ifAdminStatus 7
+#define VAL_ifAdminStatus_up 1L
+#define VAL_ifAdminStatus_down 2L
+#define VAL_ifAdminStatus_testing 3L
+#define LEAF_ifOperStatus 8
+#define VAL_ifOperStatus_up 1L
+#define VAL_ifOperStatus_down 2L
+#define VAL_ifOperStatus_testing 3L
+#define LEAF_ifLastChange 9
+#define LEAF_ifInOctets 10
+#define LEAF_ifInUcastPkts 11
+#define LEAF_ifInNUcastPkts 12
+#define LEAF_ifInDiscards 13
+#define LEAF_ifInErrors 14
+#define LEAF_ifInUnknownProtos 15
+#define LEAF_ifOutOctets 16
+#define LEAF_ifOutUcastPkts 17
+#define LEAF_ifOutNUcastPkts 18
+#define LEAF_ifOutDiscards 19
+#define LEAF_ifOutErrors 20
+#define LEAF_ifOutQLen 21
+#define LEAF_ifSpecific 22
+#define LEAF_atIfIndex 1
+#define LEAF_atPhysAddress 2
+#define LEAF_atNetAddress 3
+#define LEAF_ipForwarding 1
+#define VAL_ipForwarding_forwarding 1L
+#define VAL_ipForwarding_not_forwarding 2L
+#define LEAF_ipDefaultTTL 2
+#define LEAF_ipInReceives 3
+#define LEAF_ipInHdrErrors 4
+#define LEAF_ipInAddrErrors 5
+#define LEAF_ipForwDatagrams 6
+#define LEAF_ipInUnknownProtos 7
+#define LEAF_ipInDiscards 8
+#define LEAF_ipInDelivers 9
+#define LEAF_ipOutRequests 10
+#define LEAF_ipOutDiscards 11
+#define LEAF_ipOutNoRoutes 12
+#define LEAF_ipReasmTimeout 13
+#define LEAF_ipReasmReqds 14
+#define LEAF_ipReasmOKs 15
+#define LEAF_ipReasmFails 16
+#define LEAF_ipFragOKs 17
+#define LEAF_ipFragFails 18
+#define LEAF_ipFragCreates 19
+#define LEAF_ipAdEntAddr 1
+#define LEAF_ipAdEntIfIndex 2
+#define LEAF_ipAdEntNetMask 3
+#define LEAF_ipAdEntBcastAddr 4
+#define LEAF_ipAdEntReasmMaxSize 5
+#define MIN_ipAdEntReasmMaxSize 0L
+#define MAX_ipAdEntReasmMaxSize 65535L
+#define LEAF_ipRouteDest 1
+#define LEAF_ipRouteIfIndex 2
+#define LEAF_ipRouteMetric1 3
+#define LEAF_ipRouteMetric2 4
+#define LEAF_ipRouteMetric3 5
+#define LEAF_ipRouteMetric4 6
+#define LEAF_ipRouteNextHop 7
+#define LEAF_ipRouteType 8
+#define VAL_ipRouteType_other 1L
+#define VAL_ipRouteType_invalid 2L
+#define VAL_ipRouteType_direct 3L
+#define VAL_ipRouteType_indirect 4L
+#define LEAF_ipRouteProto 9
+#define VAL_ipRouteProto_other 1L
+#define VAL_ipRouteProto_local 2L
+#define VAL_ipRouteProto_netmgmt 3L
+#define VAL_ipRouteProto_icmp 4L
+#define VAL_ipRouteProto_egp 5L
+#define VAL_ipRouteProto_ggp 6L
+#define VAL_ipRouteProto_hello 7L
+#define VAL_ipRouteProto_rip 8L
+#define VAL_ipRouteProto_is_is 9L
+#define VAL_ipRouteProto_es_is 10L
+#define VAL_ipRouteProto_ciscoIgrp 11L
+#define VAL_ipRouteProto_bbnSpfIgp 12L
+#define VAL_ipRouteProto_ospf 13L
+#define VAL_ipRouteProto_bgp 14L
+#define LEAF_ipRouteAge 10
+#define LEAF_ipRouteMask 11
+#define LEAF_ipRouteMetric5 12
+#define LEAF_ipRouteInfo 13
+#define LEAF_ipNetToMediaIfIndex 1
+#define LEAF_ipNetToMediaPhysAddress 2
+#define LEAF_ipNetToMediaNetAddress 3
+#define LEAF_ipNetToMediaType 4
+#define VAL_ipNetToMediaType_other 1L
+#define VAL_ipNetToMediaType_invalid 2L
+#define VAL_ipNetToMediaType_dynamic 3L
+#define VAL_ipNetToMediaType_static 4L
+#define LEAF_ipRoutingDiscards 23
+#define LEAF_icmpInMsgs 1
+#define LEAF_icmpInErrors 2
+#define LEAF_icmpInDestUnreachs 3
+#define LEAF_icmpInTimeExcds 4
+#define LEAF_icmpInParmProbs 5
+#define LEAF_icmpInSrcQuenchs 6
+#define LEAF_icmpInRedirects 7
+#define LEAF_icmpInEchos 8
+#define LEAF_icmpInEchoReps 9
+#define LEAF_icmpInTimestamps 10
+#define LEAF_icmpInTimestampReps 11
+#define LEAF_icmpInAddrMasks 12
+#define LEAF_icmpInAddrMaskReps 13
+#define LEAF_icmpOutMsgs 14
+#define LEAF_icmpOutErrors 15
+#define LEAF_icmpOutDestUnreachs 16
+#define LEAF_icmpOutTimeExcds 17
+#define LEAF_icmpOutParmProbs 18
+#define LEAF_icmpOutSrcQuenchs 19
+#define LEAF_icmpOutRedirects 20
+#define LEAF_icmpOutEchos 21
+#define LEAF_icmpOutEchoReps 22
+#define LEAF_icmpOutTimestamps 23
+#define LEAF_icmpOutTimestampReps 24
+#define LEAF_icmpOutAddrMasks 25
+#define LEAF_icmpOutAddrMaskReps 26
+#define LEAF_tcpRtoAlgorithm 1
+#define VAL_tcpRtoAlgorithm_other 1L
+#define VAL_tcpRtoAlgorithm_constant 2L
+#define VAL_tcpRtoAlgorithm_rsre 3L
+#define VAL_tcpRtoAlgorithm_vanj 4L
+#define LEAF_tcpRtoMin 2
+#define LEAF_tcpRtoMax 3
+#define LEAF_tcpMaxConn 4
+#define LEAF_tcpActiveOpens 5
+#define LEAF_tcpPassiveOpens 6
+#define LEAF_tcpAttemptFails 7
+#define LEAF_tcpEstabResets 8
+#define LEAF_tcpCurrEstab 9
+#define LEAF_tcpInSegs 10
+#define LEAF_tcpOutSegs 11
+#define LEAF_tcpRetransSegs 12
+#define LEAF_tcpConnState 1
+#define VAL_tcpConnState_closed 1L
+#define VAL_tcpConnState_listen 2L
+#define VAL_tcpConnState_synSent 3L
+#define VAL_tcpConnState_synReceived 4L
+#define VAL_tcpConnState_established 5L
+#define VAL_tcpConnState_finWait1 6L
+#define VAL_tcpConnState_finWait2 7L
+#define VAL_tcpConnState_closeWait 8L
+#define VAL_tcpConnState_lastAck 9L
+#define VAL_tcpConnState_closing 10L
+#define VAL_tcpConnState_timeWait 11L
+#define VAL_tcpConnState_deleteTCB 12L
+#define LEAF_tcpConnLocalAddress 2
+#define LEAF_tcpConnLocalPort 3
+#define MIN_tcpConnLocalPort 0L
+#define MAX_tcpConnLocalPort 65535L
+#define LEAF_tcpConnRemAddress 4
+#define LEAF_tcpConnRemPort 5
+#define MIN_tcpConnRemPort 0L
+#define MAX_tcpConnRemPort 65535L
+#define LEAF_tcpInErrs 14
+#define LEAF_tcpOutRsts 15
+#define LEAF_udpInDatagrams 1
+#define LEAF_udpNoPorts 2
+#define LEAF_udpInErrors 3
+#define LEAF_udpOutDatagrams 4
+#define LEAF_udpLocalAddress 1
+#define LEAF_udpLocalPort 2
+#define MIN_udpLocalPort 0L
+#define MAX_udpLocalPort 65535L
+#define LEAF_snmpInPkts 1
+#define LEAF_snmpOutPkts 2
+#define LEAF_snmpInBadVersions 3
+#define LEAF_snmpInBadCommunityNames 4
+#define LEAF_snmpInBadCommunityUses 5
+#define LEAF_snmpInASNParseErrs 6
+#define LEAF_snmpInTooBigs 8
+#define LEAF_snmpInNoSuchNames 9
+#define LEAF_snmpInBadValues 10
+#define LEAF_snmpInReadOnlys 11
+#define LEAF_snmpInGenErrs 12
+#define LEAF_snmpInTotalReqVars 13
+#define LEAF_snmpInTotalSetVars 14
+#define LEAF_snmpInGetRequests 15
+#define LEAF_snmpInGetNexts 16
+#define LEAF_snmpInSetRequests 17
+#define LEAF_snmpInGetResponses 18
+#define LEAF_snmpInTraps 19
+#define LEAF_snmpOutTooBigs 20
+#define LEAF_snmpOutNoSuchNames 21
+#define LEAF_snmpOutBadValues 22
+#define LEAF_snmpOutGenErrs 24
+#define LEAF_snmpOutGetRequests 25
+#define LEAF_snmpOutGetNexts 26
+#define LEAF_snmpOutSetRequests 27
+#define LEAF_snmpOutGetResponses 28
+#define LEAF_snmpOutTraps 29
+#define LEAF_snmpEnableAuthenTraps 30
+#define VAL_snmpEnableAuthenTraps_enabled 1L
+#define VAL_snmpEnableAuthenTraps_disabled 2L
+#define LEAF_bts_ncc 1
+#define MIN_bts_ncc 0L
+#define MAX_bts_ncc 7L
+#define LEAF_bts_cid 2
+#define MIN_bts_cid 0L
+#define MAX_bts_cid 65535L
+#define LEAF_btsID 3
+#define LEAF_cellAllocationIndex 1
+#define MIN_cellAllocationIndex 0L
+#define MAX_cellAllocationIndex 31L
+#define LEAF_cellAllocation 2
+#define MIN_cellAllocation 0L
+#define MAX_cellAllocation 1023L
+#define LEAF_gsmdcsIndicator 5
+#define VAL_gsmdcsIndicator_gsm 0L
+#define VAL_gsmdcsIndicator_extendedgsm 1L
+#define VAL_gsmdcsIndicator_dcs 2L
+#define VAL_gsmdcsIndicator_pcs1900 3L
+#define LEAF_bts_mcc 6
+#define LEAF_bts_mnc 7
+#define LEAF_bts_lac 8
+#define MIN_bts_lac 0L
+#define MAX_bts_lac 65535L
+#define LEAF_bts_ci 9
+#define MIN_bts_ci 0L
+#define MAX_bts_ci 65535L
+#define LEAF_cellReselectHysteresis 10
+#define MIN_cellReselectHysteresis 0L
+#define MAX_cellReselectHysteresis 7L
+#define LEAF_ny1 11
+#define LEAF_plmnPermittedIndex 1
+#define LEAF_plmnPermitted 2
+#define LEAF_radioLinkTimeout 13
+#define MIN_radioLinkTimeout 0L
+#define MAX_radioLinkTimeout 15L
+#define LEAF_relatedTranscoder 14
+#define LEAF_rxLevAccessMin 15
+#define MIN_rxLevAccessMin 0L
+#define MAX_rxLevAccessMin 63L
+#define LEAF_bts_administrativeState 16
+#define VAL_bts_administrativeState_locked 0L
+#define VAL_bts_administrativeState_unlocked 1L
+#define VAL_bts_administrativeState_shuttingDown 2L
+#define LEAF_bts_alarmStatus 17
+#define VAL_bts_alarmStatus_underRepair 0L
+#define VAL_bts_alarmStatus_critical 1L
+#define VAL_bts_alarmStatus_major 2L
+#define VAL_bts_alarmStatus_minor 3L
+#define VAL_bts_alarmStatus_alarmOutstanding 4L
+#define LEAF_bts_operationalState 18
+#define VAL_bts_operationalState_disabled 0L
+#define VAL_bts_operationalState_enabled 1L
+#define LEAF_maxNumberRetransmissions 19
+#define VAL_maxNumberRetransmissions_one 1L
+#define VAL_maxNumberRetransmissions_two 2L
+#define VAL_maxNumberRetransmissions_four 4L
+#define VAL_maxNumberRetransmissions_seven 7L
+#define LEAF_mSTxPwrMaxCCH 20
+#define LEAF_numberOfSlotsSpreadTrans 21
+#define MIN_numberOfSlotsSpreadTrans 0L
+#define MAX_numberOfSlotsSpreadTrans 15L
+#define LEAF_noOfBlocksForAccessGrant 22
+#define MIN_noOfBlocksForAccessGrant 0L
+#define MAX_noOfBlocksForAccessGrant 7L
+#define LEAF_noOfMultiframesBetweenPaging 23
+#define MIN_noOfMultiframesBetweenPaging 2L
+#define MAX_noOfMultiframesBetweenPaging 9L
+#define LEAF_allowIMSIAttachDetach 1
+#define VAL_allowIMSIAttachDetach_false 0L
+#define VAL_allowIMSIAttachDetach_true 1L
+#define LEAF_callReestablishmentAllowed 2
+#define VAL_callReestablishmentAllowed_false 0L
+#define VAL_callReestablishmentAllowed_true 1L
+#define LEAF_cellBarred 3
+#define VAL_cellBarred_false 0L
+#define VAL_cellBarred_true 1L
+#define LEAF_dtxDownlink 4
+#define VAL_dtxDownlink_false 0L
+#define VAL_dtxDownlink_true 1L
+#define LEAF_dtxUplink 5
+#define VAL_dtxUplink_msMayUseDTx 0L
+#define VAL_dtxUplink_msShallUseDTx 1L
+#define VAL_dtxUplink_msShallNotUseDTx 2L
+#define LEAF_emergencyCallRestricted 6
+#define VAL_emergencyCallRestricted_false 0L
+#define VAL_emergencyCallRestricted_true 1L
+#define LEAF_notAllowedAccessClassIndex 1
+#define LEAF_notAllowedAccessClass 2
+#define MIN_notAllowedAccessClass 0L
+#define MAX_notAllowedAccessClass 15L
+#define LEAF_timerPeriodicUpdateMS 8
+#define MIN_timerPeriodicUpdateMS 0L
+#define MAX_timerPeriodicUpdateMS 255L
+#define LEAF_maxQueueLength 9
+#define MIN_maxQueueLength 0L
+#define MAX_maxQueueLength 100L
+#define LEAF_msPriorityUsedInQueueing 10
+#define VAL_msPriorityUsedInQueueing_false 0L
+#define VAL_msPriorityUsedInQueueing_true 1L
+#define LEAF_timeLimitCall 11
+#define LEAF_timeLimitHandover 12
+#define LEAF_basebandTransceiverID_0 1
+#define LEAF_relatedRadioCarrier_0 2
+#define LEAF_basebandAdministrativeState_0 3
+#define VAL_basebandAdministrativeState_0_locked 0L
+#define VAL_basebandAdministrativeState_0_unlocked 1L
+#define VAL_basebandAdministrativeState_0_shuttingDown 2L
+#define LEAF_basebandAlarmStatus_0 4
+#define VAL_basebandAlarmStatus_0_underRepair 0L
+#define VAL_basebandAlarmStatus_0_critical 1L
+#define VAL_basebandAlarmStatus_0_major 2L
+#define VAL_basebandAlarmStatus_0_minor 3L
+#define VAL_basebandAlarmStatus_0_alarmOutstanding 4L
+#define LEAF_basebandOperationalState_0 5
+#define VAL_basebandOperationalState_0_disabled 0L
+#define VAL_basebandOperationalState_0_enabled 1L
+#define LEAF_channelIndex_0 1
+#define MIN_channelIndex_0 0L
+#define MAX_channelIndex_0 7L
+#define LEAF_channelID_0 2
+#define MIN_channelID_0 0L
+#define MAX_channelID_0 7L
+#define LEAF_channelCombination_0 3
+#define VAL_channelCombination_0_tCHFull 0L
+#define VAL_channelCombination_0_tCHHalf 1L
+#define VAL_channelCombination_0_tCHHalf2 2L
+#define VAL_channelCombination_0_sDCCH 3L
+#define VAL_channelCombination_0_mainBCCH 4L
+#define VAL_channelCombination_0_bCCHCombined 5L
+#define VAL_channelCombination_0_cCH 6L
+#define VAL_channelCombination_0_bCCHwithCBCH 7L
+#define VAL_channelCombination_0_sDCCHwithCBCH 8L
+#define LEAF_channelFrequencyUsage_0 4
+#define LEAF_channelTsc_0 5
+#define LEAF_channelAdministrativeState_0 6
+#define VAL_channelAdministrativeState_0_locked 0L
+#define VAL_channelAdministrativeState_0_unlocked 1L
+#define VAL_channelAdministrativeState_0_shuttingDown 2L
+#define LEAF_channelOperationalState_0 7
+#define VAL_channelOperationalState_0_disabled 0L
+#define VAL_channelOperationalState_0_enabled 1L
+#define LEAF_basebandTransceiverID_1 1
+#define LEAF_relatedRadioCarrier_1 2
+#define LEAF_basebandAdministrativeState_1 3
+#define VAL_basebandAdministrativeState_1_locked 0L
+#define VAL_basebandAdministrativeState_1_unlocked 1L
+#define VAL_basebandAdministrativeState_1_shuttingDown 2L
+#define LEAF_basebandAlarmStatus_1 4
+#define VAL_basebandAlarmStatus_1_underRepair 0L
+#define VAL_basebandAlarmStatus_1_critical 1L
+#define VAL_basebandAlarmStatus_1_major 2L
+#define VAL_basebandAlarmStatus_1_minor 3L
+#define VAL_basebandAlarmStatus_1_alarmOutstanding 4L
+#define LEAF_basebandOperationalState_1 5
+#define VAL_basebandOperationalState_1_disabled 0L
+#define VAL_basebandOperationalState_1_enabled 1L
+#define LEAF_channelIndex_1 1
+#define MIN_channelIndex_1 0L
+#define MAX_channelIndex_1 7L
+#define LEAF_channelID_1 2
+#define MIN_channelID_1 0L
+#define MAX_channelID_1 7L
+#define LEAF_channelCombination_1 3
+#define VAL_channelCombination_1_tCHFull 0L
+#define VAL_channelCombination_1_tCHHalf 1L
+#define VAL_channelCombination_1_tCHHalf2 2L
+#define VAL_channelCombination_1_sDCCH 3L
+#define VAL_channelCombination_1_mainBCCH 4L
+#define VAL_channelCombination_1_bCCHCombined 5L
+#define VAL_channelCombination_1_cCH 6L
+#define VAL_channelCombination_1_bCCHwithCBCH 7L
+#define VAL_channelCombination_1_sDCCHwithCBCH 8L
+#define LEAF_channelFrequencyUsage_1 4
+#define LEAF_channelTsc_1 5
+#define LEAF_channelAdministrativeState_1 6
+#define VAL_channelAdministrativeState_1_locked 0L
+#define VAL_channelAdministrativeState_1_unlocked 1L
+#define VAL_channelAdministrativeState_1_shuttingDown 2L
+#define LEAF_channelOperationalState_1 7
+#define VAL_channelOperationalState_1_disabled 0L
+#define VAL_channelOperationalState_1_enabled 1L
+#define LEAF_carrierFrequencyIndex_0 1
+#define LEAF_carrierFrequency_0 2
+#define MIN_carrierFrequency_0 0L
+#define MAX_carrierFrequency_0 1023L
+#define LEAF_powerClass_0 2
+#define VAL_powerClass_0_m1 1L
+#define VAL_powerClass_0_m3 2L
+#define VAL_powerClass_0_m2 3L
+#define LEAF_radioCarrierID_0 3
+#define LEAF_txPwrMaxReduction_0 4
+#define MIN_txPwrMaxReduction_0 0L
+#define MAX_txPwrMaxReduction_0 6L
+#define LEAF_carrier_administrativeState_0 5
+#define VAL_carrier_administrativeState_0_locked 0L
+#define VAL_carrier_administrativeState_0_unlocked 1L
+#define VAL_carrier_administrativeState_0_shuttingDown 2L
+#define LEAF_carrier_alarmStatus_0 6
+#define VAL_carrier_alarmStatus_0_underRepair 0L
+#define VAL_carrier_alarmStatus_0_critical 1L
+#define VAL_carrier_alarmStatus_0_major 2L
+#define VAL_carrier_alarmStatus_0_minor 3L
+#define VAL_carrier_alarmStatus_0_alarmOutstanding 4L
+#define LEAF_carrier_operationalState_0 7
+#define VAL_carrier_operationalState_0_disabled 0L
+#define VAL_carrier_operationalState_0_enabled 1L
+#define LEAF_carrierFrequencyIndex_1 1
+#define LEAF_carrierFrequency_1 2
+#define MIN_carrierFrequency_1 0L
+#define MAX_carrierFrequency_1 1023L
+#define LEAF_powerClass_1 2
+#define VAL_powerClass_1_m1 1L
+#define VAL_powerClass_1_m3 2L
+#define VAL_powerClass_1_m2 3L
+#define LEAF_radioCarrierID_1 3
+#define LEAF_txPwrMaxReduction_1 4
+#define MIN_txPwrMaxReduction_1 0L
+#define MAX_txPwrMaxReduction_1 6L
+#define LEAF_carrier_administrativeState_1 5
+#define VAL_carrier_administrativeState_1_locked 0L
+#define VAL_carrier_administrativeState_1_unlocked 1L
+#define VAL_carrier_administrativeState_1_shuttingDown 2L
+#define LEAF_carrier_alarmStatus_1 6
+#define VAL_carrier_alarmStatus_1_underRepair 0L
+#define VAL_carrier_alarmStatus_1_critical 1L
+#define VAL_carrier_alarmStatus_1_major 2L
+#define VAL_carrier_alarmStatus_1_minor 3L
+#define VAL_carrier_alarmStatus_1_alarmOutstanding 4L
+#define LEAF_carrier_operationalState_1 7
+#define VAL_carrier_operationalState_1_disabled 0L
+#define VAL_carrier_operationalState_1_enabled 1L
+#define LEAF_sdcchSAPI0 1
+#define LEAF_facchTCHF 2
+#define LEAF_facchTCHH 3
+#define LEAF_sacchTCHSAPI0 4
+#define LEAF_sacchSDCCH 5
+#define LEAF_sdcchSAPI3 6
+#define LEAF_sdcchTCHSAPI3 7
+#define LEAF_t3101 1
+#define LEAF_t3103 2
+#define LEAF_t3105 3
+#define LEAF_t3107 4
+#define LEAF_t3109 5
+#define LEAF_t3111 6
+#define LEAF_t3113 7
+#define LEAF_adjCell_handoverIndex 1
+#define LEAF_adjCell_handoverCellID 2
+#define LEAF_adjCell_mcc 3
+#define LEAF_adjCell_mnc 4
+#define LEAF_adjCell_lac 5
+#define MIN_adjCell_lac 0L
+#define MAX_adjCell_lac 65535L
+#define LEAF_adjCell_ci 6
+#define MIN_adjCell_ci 0L
+#define MAX_adjCell_ci 65535L
+#define LEAF_adjCell_bCCHFrequency 7
+#define MIN_adjCell_bCCHFrequency 0L
+#define MAX_adjCell_bCCHFrequency 1023L
+#define LEAF_adjCell_ncc 8
+#define MIN_adjCell_ncc 0L
+#define MAX_adjCell_ncc 7L
+#define LEAF_adjCell_cid 9
+#define MIN_adjCell_cid 0L
+#define MAX_adjCell_cid 65535L
+#define LEAF_adjCell_synchronized 10
+#define VAL_adjCell_synchronized_false 0L
+#define VAL_adjCell_synchronized_true 1L
+#define LEAF_adjCell_hoPriorityLevel 11
+#define MIN_adjCell_hoPriorityLevel 0L
+#define MAX_adjCell_hoPriorityLevel 7L
+#define LEAF_adjCell_hoMargin 12
+#define MIN_adjCell_hoMargin 0L
+#define MAX_adjCell_hoMargin 24L
+#define LEAF_adjCell_msTxPwrMaxCell 13
+#define LEAF_adjCell_rxLevMinCell 14
+#define MIN_adjCell_rxLevMinCell 0L
+#define MAX_adjCell_rxLevMinCell 63L
+#define LEAF_adjCell_isExternal 15
+#define VAL_adjCell_isExternal_false 0L
+#define VAL_adjCell_isExternal_true 1L
+#define LEAF_adjCell_reselectionIndex 1
+#define MIN_adjCell_reselectionIndex 0L
+#define MAX_adjCell_reselectionIndex 31L
+#define LEAF_adjCell_reselectionCellID 2
+#define LEAF_adjCell_reselectionBCCHFrequency 3
+#define MIN_adjCell_reselectionBCCHFrequency 0L
+#define MAX_adjCell_reselectionBCCHFrequency 1023L
+#define LEAF_frequencyHoppingSystemID 1
+#define LEAF_hoppingSequenceNumber 2
+#define MIN_hoppingSequenceNumber 0L
+#define MAX_hoppingSequenceNumber 63L
+#define LEAF_mobileAllocationIndex 1
+#define LEAF_mobileAllocation 2
+#define MIN_mobileAllocation 0L
+#define MAX_mobileAllocation 1023L
+#define LEAF_handoverControlID 1
+#define LEAF_enableOptHandoverProcessing 2
+#define VAL_enableOptHandoverProcessing_enablePwrBudget 0L
+#define VAL_enableOptHandoverProcessing_enableMSDistanceProcess 1L
+#define LEAF_hoAveragingAdjCellParamHreqave 1
+#define MIN_hoAveragingAdjCellParamHreqave 0L
+#define MAX_hoAveragingAdjCellParamHreqave 31L
+#define LEAF_hoAveragingAdjCellParamHreqt 2
+#define MIN_hoAveragingAdjCellParamHreqt 0L
+#define MAX_hoAveragingAdjCellParamHreqt 31L
+#define LEAF_hoAveragingAdjCellParamWeighting 3
+#define MIN_hoAveragingAdjCellParamWeighting 0L
+#define MAX_hoAveragingAdjCellParamWeighting 3L
+#define LEAF_hoAveragingDistParamHreqave 1
+#define MIN_hoAveragingDistParamHreqave 0L
+#define MAX_hoAveragingDistParamHreqave 31L
+#define LEAF_hoAveragingDistParamHreqt 2
+#define MIN_hoAveragingDistParamHreqt 0L
+#define MAX_hoAveragingDistParamHreqt 31L
+#define LEAF_hoAveragingLevParamHreqave 1
+#define MIN_hoAveragingLevParamHreqave 0L
+#define MAX_hoAveragingLevParamHreqave 31L
+#define LEAF_hoAveragingLevParamHreqt 2
+#define MIN_hoAveragingLevParamHreqt 0L
+#define MAX_hoAveragingLevParamHreqt 31L
+#define LEAF_hoAveragingLevParamWeighting 3
+#define MIN_hoAveragingLevParamWeighting 0L
+#define MAX_hoAveragingLevParamWeighting 3L
+#define LEAF_hoAveragingQualParamHreqave 1
+#define MIN_hoAveragingQualParamHreqave 0L
+#define MAX_hoAveragingQualParamHreqave 31L
+#define LEAF_hoAveragingQualParamHreqt 2
+#define MIN_hoAveragingQualParamHreqt 0L
+#define MAX_hoAveragingQualParamHreqt 31L
+#define LEAF_hoAveragingQualParamWeighting 3
+#define MIN_hoAveragingQualParamWeighting 0L
+#define MAX_hoAveragingQualParamWeighting 3L
+#define LEAF_hoMarginDef 7
+#define MIN_hoMarginDef 0L
+#define MAX_hoMarginDef 24L
+#define LEAF_hoThresholdDistParamTimeadv 1
+#define LEAF_hoThresholdDistParamP8 2
+#define MIN_hoThresholdDistParamP8 0L
+#define MAX_hoThresholdDistParamP8 31L
+#define LEAF_hoThresholdDistParamN8 3
+#define MIN_hoThresholdDistParamN8 0L
+#define MAX_hoThresholdDistParamN8 31L
+#define LEAF_hoThresholdInterfaceParamRxLevelUL 1
+#define MIN_hoThresholdInterfaceParamRxLevelUL 0L
+#define MAX_hoThresholdInterfaceParamRxLevelUL 63L
+#define LEAF_hoThresholdInterfaceParamRxLevelDL 2
+#define MIN_hoThresholdInterfaceParamRxLevelDL 0L
+#define MAX_hoThresholdInterfaceParamRxLevelDL 63L
+#define LEAF_hoThresholdInterfaceParamPx 3
+#define MIN_hoThresholdInterfaceParamPx 0L
+#define MAX_hoThresholdInterfaceParamPx 31L
+#define LEAF_hoThresholdInterfaceParamNx 4
+#define MIN_hoThresholdInterfaceParamNx 0L
+#define MAX_hoThresholdInterfaceParamNx 31L
+#define LEAF_hoThresholdLevParamRxLevelUL 1
+#define MIN_hoThresholdLevParamRxLevelUL 0L
+#define MAX_hoThresholdLevParamRxLevelUL 63L
+#define LEAF_hoThresholdLevParamRxLevelDL 2
+#define MIN_hoThresholdLevParamRxLevelDL 0L
+#define MAX_hoThresholdLevParamRxLevelDL 63L
+#define LEAF_hoThresholdLevParamPx 3
+#define MIN_hoThresholdLevParamPx 0L
+#define MAX_hoThresholdLevParamPx 31L
+#define LEAF_hoThresholdLevParamNx 4
+#define MIN_hoThresholdLevParamNx 0L
+#define MAX_hoThresholdLevParamNx 31L
+#define LEAF_hoThresholdQualParamRxQualUL 1
+#define MIN_hoThresholdQualParamRxQualUL 0L
+#define MAX_hoThresholdQualParamRxQualUL 7L
+#define LEAF_hoThresholdQualParamRxQualDL 2
+#define MIN_hoThresholdQualParamRxQualDL 0L
+#define MAX_hoThresholdQualParamRxQualDL 7L
+#define LEAF_hoThresholdQualParamPx 3
+#define MIN_hoThresholdQualParamPx 0L
+#define MAX_hoThresholdQualParamPx 31L
+#define LEAF_hoThresholdQualParamNx 4
+#define MIN_hoThresholdQualParamNx 0L
+#define MAX_hoThresholdQualParamNx 31L
+#define LEAF_interferenceAveragingParamAveragingPeriod 1
+#define MIN_interferenceAveragingParamAveragingPeriod 0L
+#define MAX_interferenceAveragingParamAveragingPeriod 31L
+#define LEAF_interferenceAveragingParamThresholdBoundary0 2
+#define MIN_interferenceAveragingParamThresholdBoundary0 0L
+#define MAX_interferenceAveragingParamThresholdBoundary0 63L
+#define LEAF_interferenceAveragingParamThresholdBoundary1 3
+#define MIN_interferenceAveragingParamThresholdBoundary1 0L
+#define MAX_interferenceAveragingParamThresholdBoundary1 63L
+#define LEAF_interferenceAveragingParamThresholdBoundary2 4
+#define MIN_interferenceAveragingParamThresholdBoundary2 0L
+#define MAX_interferenceAveragingParamThresholdBoundary2 63L
+#define LEAF_interferenceAveragingParamThresholdBoundary3 5
+#define MIN_interferenceAveragingParamThresholdBoundary3 0L
+#define MAX_interferenceAveragingParamThresholdBoundary3 63L
+#define LEAF_interferenceAveragingParamThresholdBoundary4 6
+#define MIN_interferenceAveragingParamThresholdBoundary4 0L
+#define MAX_interferenceAveragingParamThresholdBoundary4 63L
+#define LEAF_interferenceAveragingParamThresholdBoundary5 7
+#define MIN_interferenceAveragingParamThresholdBoundary5 0L
+#define MAX_interferenceAveragingParamThresholdBoundary5 63L
+#define LEAF_msTxPwrMaxCellDef 13
+#define LEAF_rxLevMinCellDef 14
+#define MIN_rxLevMinCellDef 0L
+#define MAX_rxLevMinCellDef 63L
+#define LEAF_pcAveragingLevHreqave 1
+#define MIN_pcAveragingLevHreqave 0L
+#define MAX_pcAveragingLevHreqave 31L
+#define LEAF_pcAveragingLevHreqt 2
+#define MIN_pcAveragingLevHreqt 0L
+#define MAX_pcAveragingLevHreqt 31L
+#define LEAF_pcAveragingLevWeighting 3
+#define MIN_pcAveragingLevWeighting 0L
+#define MAX_pcAveragingLevWeighting 3L
+#define LEAF_pcAveragingQualHreqave 1
+#define MIN_pcAveragingQualHreqave 0L
+#define MAX_pcAveragingQualHreqave 31L
+#define LEAF_pcAveragingQualHreqt 2
+#define MIN_pcAveragingQualHreqt 0L
+#define MAX_pcAveragingQualHreqt 31L
+#define LEAF_pcAveragingQualWeighting 3
+#define MIN_pcAveragingQualWeighting 0L
+#define MAX_pcAveragingQualWeighting 3L
+#define LEAF_pcLowerThresholdLevParamRxLevelUL 1
+#define MIN_pcLowerThresholdLevParamRxLevelUL 0L
+#define MAX_pcLowerThresholdLevParamRxLevelUL 63L
+#define LEAF_pcLowerThresholdLevParamRxLevelDL 2
+#define MIN_pcLowerThresholdLevParamRxLevelDL 0L
+#define MAX_pcLowerThresholdLevParamRxLevelDL 63L
+#define LEAF_pcLowerThresholdLevParamPx 3
+#define MIN_pcLowerThresholdLevParamPx 0L
+#define MAX_pcLowerThresholdLevParamPx 31L
+#define LEAF_pcLowerThresholdLevParamNx 4
+#define MIN_pcLowerThresholdLevParamNx 0L
+#define MAX_pcLowerThresholdLevParamNx 31L
+#define LEAF_pcLowerThresholdQualParamRxQualUL 1
+#define MIN_pcLowerThresholdQualParamRxQualUL 0L
+#define MAX_pcLowerThresholdQualParamRxQualUL 7L
+#define LEAF_pcLowerThresholdQualParamRxQualDL 2
+#define MIN_pcLowerThresholdQualParamRxQualDL 0L
+#define MAX_pcLowerThresholdQualParamRxQualDL 7L
+#define LEAF_pcLowerThresholdQualParamPx 3
+#define MIN_pcLowerThresholdQualParamPx 0L
+#define MAX_pcLowerThresholdQualParamPx 31L
+#define LEAF_pcLowerThresholdQualParamNx 4
+#define MIN_pcLowerThresholdQualParamNx 0L
+#define MAX_pcLowerThresholdQualParamNx 31L
+#define LEAF_pcUpperThresholdLevParamRxLevelUL 1
+#define MIN_pcUpperThresholdLevParamRxLevelUL 0L
+#define MAX_pcUpperThresholdLevParamRxLevelUL 63L
+#define LEAF_pcUpperThresholdLevParamRxLevelDL 2
+#define MIN_pcUpperThresholdLevParamRxLevelDL 0L
+#define MAX_pcUpperThresholdLevParamRxLevelDL 63L
+#define LEAF_pcUpperThresholdLevParamPx 3
+#define MIN_pcUpperThresholdLevParamPx 0L
+#define MAX_pcUpperThresholdLevParamPx 31L
+#define LEAF_pcUpperThresholdLevParamNx 4
+#define MIN_pcUpperThresholdLevParamNx 0L
+#define MAX_pcUpperThresholdLevParamNx 31L
+#define LEAF_pcUpperThresholdQualParamRxQualUL 1
+#define MIN_pcUpperThresholdQualParamRxQualUL 0L
+#define MAX_pcUpperThresholdQualParamRxQualUL 7L
+#define LEAF_pcUpperThresholdQualParamRxQualDL 2
+#define MIN_pcUpperThresholdQualParamRxQualDL 0L
+#define MAX_pcUpperThresholdQualParamRxQualDL 7L
+#define LEAF_pcUpperThresholdQualParamPx 3
+#define MIN_pcUpperThresholdQualParamPx 0L
+#define MAX_pcUpperThresholdQualParamPx 31L
+#define LEAF_pcUpperThresholdQualParamNx 4
+#define MIN_pcUpperThresholdQualParamNx 0L
+#define MAX_pcUpperThresholdQualParamNx 31L
+#define LEAF_powerControlInterval 7
+#define MIN_powerControlInterval 0L
+#define MAX_powerControlInterval 31L
+#define LEAF_powerIncrStepSize 8
+#define MIN_powerIncrStepSize 0L
+#define MAX_powerIncrStepSize 2L
+#define LEAF_powerRedStepSize 9
+#define MIN_powerRedStepSize 0L
+#define MAX_powerRedStepSize 1L
+#define LEAF_meanPCHAGCHQueueLength 1
+#define LEAF_attTransOfPagingMessagesThePCH 2
+#define LEAF_unsuccTransOfPagingMessagesThePCH 3
+#define LEAF_attImmediateAssingProcs 4
+#define LEAF_succImmediateAssingProcs 5
+#define LEAF_attImmediateAssingProcsCause 1
+#define LEAF_attImmediateAssingProcsValue 2
+#define LEAF_succImmediateAssingProcsCause 1
+#define LEAF_succImmediateAssingProcsValue 2
+#define LEAF_nbrOfPagesDiscardedFromPCHQueue 8
+#define LEAF_meanDurationOfSuccPagingProcs 9
+#define LEAF_nbrOfAvailableTCHs 10
+#define LEAF_meanNbrOfBusyTCHs 11
+#define LEAF_maxNbrOfBusyTCHs 12
+#define LEAF_meanNbrOfIdleTCHsPerInterferenceBand 13
+#define LEAF_attTCHSeizures 14
+#define LEAF_succTCHSeizures 15
+#define LEAF_attTCHSeizuresMeetingTCHBlockedState 16
+#define LEAF_allAvailableTCHAllocatedTime 17
+#define LEAF_meanTCHBusyTime 18
+#define LEAF_meanTCHQueueLength 19
+#define LEAF_nbrOfLostRadioLinksTCH 20
+#define LEAF_nbrOfAvailableSDCCHs 21
+#define LEAF_meanNbrOfBusySDCCHs 22
+#define LEAF_maxNbrOfBusySDCCHs 23
+#define LEAF_attSDCCHSeizuresMeetingSDCCHBlockedState 24
+#define LEAF_allAvailableSDCCHAllocatedTime 25
+#define LEAF_meanSDCCHQueueLength 26
+#define LEAF_nbrOfLostRadioLinksSDCCH 27
+#define LEAF_relativeTimeDLPowerControlAtMax 28
+#define LEAF_relativeTimeULPowerControlAtMax 29
+#define LEAF_succInternalHDOsIntraCell 30
+#define LEAF_unsuccInternalHDOsIntraCell 31
+#define LEAF_nbrOfClassMarkUpdates 1
+#define LEAF_attMobileOriginatingCalls 2
+#define LEAF_succMobileOriginatingCalls 3
+#define LEAF_ansMobileOriginatingCalls 4
+#define LEAF_attMobileTerminatingCalls 5
+#define LEAF_succMobileTerminatingCalls 6
+#define LEAF_ansMobileTerminatingCalls 7
+#define LEAF_attMobileEmergencyCalls 8
+#define LEAF_succMobileEmergencyCalls 9
+#define LEAF_ansMobileEmergencyCalls 10
+#define LEAF_attCipheringModeControlProcs 11
+#define LEAF_succCipheringModeControlProcs 12
+#define LEAF_attInterrogationOfHLRsForRouting 13
+#define LEAF_succInterrogationOfHLRsMSRNObtained 14
+#define LEAF_succInterrogationOfHLRsCallForwarding 15
+#define LEAF_attOpForMobileOriginatingPointToPointSMs 16
+#define LEAF_succOpForMobileOriginatingPointToPointSMs 17
+#define LEAF_attOpForMobileTerminatingPointToPointSMs 18
+#define LEAF_succOpForMobileTerminatingPointToPointSMs 19
+#define LEAF_meanTimeToCallSetupService 20
+#define LEAF_meanTimeToLocationUpdateService 21
+#define LEAF_transSubIdentifiedWithIMSI 22
+#define LEAF_imsiDetachProcs 23
+#define LEAF_imsiAttachProcs 24
+#define LEAF_attIncomingInterMSCHDOs 25
+#define LEAF_succIncomingInterMSCHDOs 26
+#define LEAF_attOutgoingInterMSCHDOs 27
+#define LEAF_succOutgoingInterMSCHDOs 28
+#define LEAF_externalHDOsPerCauseCode 1
+#define LEAF_externalHDOsPerCauseValue 2
+#define LEAF_unsuccExternHDOsWithReconnectionPerMSC 30
+#define LEAF_unsuccExternHDOsWithLossOfConnectionPerMSC 31
+#define LEAF_h323_GKPort 1
+#define LEAF_h323_GKIPAddress 2
+#define LEAF_h323_Q931ResponseTimeOut 3
+#define LEAF_h323_Q931ConnectTimeOut 4
+#define LEAF_h323_Q931CallSignalingPort 5
+#define LEAF_h323_t35CountryCode 6
+#define LEAF_h323_rasRequestTimeout 7
+#define LEAF_h323_viperbaseHeartbeatTimeout 8
+#define LEAF_cc_max_L3_msgs 1
+#define LEAF_cc_l3_msg_q_priority 2
+#define LEAF_cc_task_priority 3
+#define LEAF_cc_task_stack_size 4
+#define LEAF_cc_mm_conn_est_T999 5
+#define LEAF_cc_alerting_T301 6
+#define LEAF_cc_setup_T303 7
+#define LEAF_cc_call_confirmed_T310 8
+#define LEAF_cc_connect_T313 9
+#define LEAF_cc_disconnect_T305 10
+#define LEAF_cc_release_T308 11
+#define LEAF_cc_safety_timer 12
+#define LEAF_cc_max_calls 13
+#define LEAF_mm_max_mm_connections 1
+#define LEAF_mm_max_L3_msgs 2
+#define LEAF_task_priority 3
+#define LEAF_task_stack_size 4
+#define LEAF_mm_paging_t3113 5
+#define LEAF_mm_authenticationRequired 6
+#define VAL_mm_authenticationRequired_false 0L
+#define VAL_mm_authenticationRequired_true 1L
+#define LEAF_mm_cipheringRequired 7
+#define VAL_mm_cipheringRequired_false 0L
+#define VAL_mm_cipheringRequired_true 1L
+#define LEAF_mm_IMEICheckRequired 8
+#define VAL_mm_IMEICheckRequired_false 0L
+#define VAL_mm_IMEICheckRequired_true 1L
+#define LEAF_rm_t3L01 1
+#define LEAF_rm_bsCcChans 2
+#define LEAF_rm_bsCcchSdcchComb 3
+#define LEAF_rm_sysInfoOnOffMap 4
+#define LEAF_rm_airInterface 5
+#define LEAF_rm_viperCellTsc 6
+#define LEAF_rm_maxSlotPerTrx 7
+#define LEAF_rm_maxTrxs 8
+#define LEAF_rm_maxTchfs 9
+#define LEAF_rm_maxSdcch4s 10
+#define LEAF_rm_trxOnOffMap 11
+#define LEAF_rm_networkIfConfig 12
+#define LEAF_rm_bcchTrx 13
+#define LEAF_rm_preAlphaTrx 14
+#define LEAF_rm_ccchBcchComb 15
+#define LEAF_rm_ccchConf 16
+#define LEAF_rm_nim_0_0 17
+#define LEAF_rm_nim_0_1 18
+#define LEAF_rm_nim_0_2 19
+#define LEAF_rm_nim_0_3 20
+#define LEAF_rm_nim_0_4 21
+#define LEAF_rm_nim_0_5 22
+#define LEAF_rm_nim_0_6 23
+#define LEAF_rm_nim_0_7 24
+#define LEAF_rm_nim_1_0 25
+#define LEAF_rm_nim_1_1 26
+#define LEAF_rm_nim_1_2 27
+#define LEAF_rm_nim_1_3 28
+#define LEAF_rm_nim_1_4 29
+#define LEAF_rm_nim_1_5 30
+#define LEAF_rm_nim_1_6 31
+#define LEAF_rm_nim_1_7 32
+#define LEAF_rm_trxSynthSetting_0_0 33
+#define LEAF_rm_trxSynthSetting_0_1 34
+#define LEAF_rm_trxSynthSetting_0_2 35
+#define LEAF_rm_trxSynthSetting_0_3 36
+#define LEAF_rm_trxSynthSetting_1_0 37
+#define LEAF_rm_trxSynthSetting_1_1 38
+#define LEAF_rm_trxSynthSetting_1_2 39
+#define LEAF_rm_trxSynthSetting_1_3 40
+#define LEAF_rm_trxFpgaDelay_0_0 41
+#define LEAF_rm_trxFpgaDelay_0_1 42
+#define LEAF_rm_trxFpgaDelay_1_0 43
+#define LEAF_rm_trxFpgaDelay_1_1 44
+#define LEAF_rm_SGainCtrlSetting_0_0 45
+#define LEAF_rm_SGainCtrlSetting_0_1 46
+#define LEAF_rm_SGainCtrlSetting_1_0 47
+#define LEAF_rm_SGainCtrlSetting_1_1 48
+#define LEAF_rm_synchChanInfo 49
+#define LEAF_oamCommand 1
+#define VAL_oamCommand_none 0L
+#define VAL_oamCommand_reloadMib 1L
+#define VAL_oamCommand_flushMib 2L
+#define VAL_oamCommand_loadMibFromAltFile 4L
+#define VAL_oamCommand_saveMibToAltFile 8L
+#define VAL_oamCommand_saveMibMinDelay 16L
+#define VAL_oamCommand_saveMibMinFileIo 32L
+#define VAL_oamCommand_reboot 64L
+#define VAL_oamCommand_delayedReboot 128L
+#define LEAF_oamCommandExecutionStatus 2
+#define VAL_oamCommandExecutionStatus_none 0L
+#define VAL_oamCommandExecutionStatus_inProgress 1L
+#define VAL_oamCommandExecutionStatus_sucessful 2L
+#define VAL_oamCommandExecutionStatus_failed 3L
+#define LEAF_oamAlternateMibFileName 3
+#define LEAF_oamCommandLastError 4
+#define LEAF_mibAccessControlFlag 5
+#define VAL_mibAccessControlFlag_false 0L
+#define VAL_mibAccessControlFlag_true 1L
+#define LEAF_maintenance_operation 1
+#define LEAF_maintenance_response 2
+#define LEAF_trapFwdIndex 1
+#define MIN_trapFwdIndex 0L
+#define MAX_trapFwdIndex 4L
+#define LEAF_trapType 2
+#define VAL_trapType_snmpv1Trap 1L
+#define VAL_trapType_snmpv2Trap 2L
+#define LEAF_trapIpAddress 3
+#define LEAF_trapPort 4
+#define MIN_trapPort 112L
+#define MAX_trapPort 65535L
+#define LEAF_trapCommunity 5
+#define LEAF_sysTrapOid 2
+#define LEAF_monitorReceiverPLL_LockDetectStatus 1
+#define LEAF_referenceFrequencyPLL_LockDetectStatus 2
+#define LEAF_transceiver_1_PLL_LockDetectStatus 3
+#define LEAF_transceiver_2A_PLL_LockDetectStatus 4
+#define LEAF_transceiver_2B_PLL_LockDetectStatus 5
+#define LEAF_intermediateFrequency_LockDetectStatus 6
+#define LEAF_trxSerialNumber 7
+#define LEAF_trxSoftwareVersion 8
+#define LEAF_trxLoopBackMode 9
+#define VAL_trxLoopBackMode_disable 0L
+#define VAL_trxLoopBackMode_enable 1L
+#define LEAF_arfcnRssiControlMode 1
+#define VAL_arfcnRssiControlMode_disable 0L
+#define VAL_arfcnRssiControlMode_enable 1L
+#define LEAF_clockRecoveryControlMode 2
+#define VAL_clockRecoveryControlMode_disable 0L
+#define VAL_clockRecoveryControlMode_enable 1L
+#define VAL_clockRecoveryControlMode_now 2L
+#define LEAF_arfcnRssiClockControlIndex 1
+#define LEAF_arfcnRssiClockControlArfcn 2
+#define MIN_arfcnRssiClockControlArfcn 0L
+#define MAX_arfcnRssiClockControlArfcn 1023L
+#define LEAF_arfcnRssiClockRecoveryMode 3
+#define VAL_arfcnRssiClockRecoveryMode_disable 0L
+#define VAL_arfcnRssiClockRecoveryMode_enable 1L
+#define LEAF_clockCardType 1
+#define LEAF_clockCardSoftwareVersion 2
+#define LEAF_clockCardStatus 3
+#define LEAF_clockCardCrystalUpTime 4
+#define LEAF_clockCardDAC 5
+#define LEAF_gpsCardType 1
+#define LEAF_gpsCardSoftwareVersion 2
+#define LEAF_gpsCardStatus 3
+#define LEAF_gpsPosition 4
+#define LEAF_gpsTime 5
+#define LEAF_utcTime 6
+#define LEAF_clockStatusFrequencyError 7
+#define LEAF_clockStatusDACVoltage 8
+#define LEAF_gpsAntennaStatus 9
+#define LEAF_gpsSatelliteStatus 10
+#define LEAF_powerCardType 1
+#define LEAF_powerCardStatus 2
+#define LEAF_powerOn 3
+#define VAL_powerOn_power_off 0L
+#define VAL_powerOn_power_on 1L
+#define LEAF_powerSupplyType 1
+#define VAL_powerSupplyType_basic 0L
+#define VAL_powerSupplyType_ups 1L
+#define LEAF_powerSupplyStatus 2
+#define LEAF_cdcBoardSerialNumber 1
+#define LEAF_cdcBoardMACAddress 2
+#define LEAF_apaEnable 1
+#define VAL_apaEnable_disable 0L
+#define VAL_apaEnable_enabled 1L
+#define LEAF_apaScanFrequencyLowBound 2
+#define LEAF_apaScanFrequencyHighBound 3
+#define LEAF_apaMaxPowerSetting 4
+#define LEAF_apaMinRSSIThresholdForNeighborId 5
+#define LEAF_apaScanRate 6
+#define LEAF_apaHysteresisForBCCHPower 7
+#define LEAF_apaInvalidFrequencyIndex 1
+#define LEAF_apaInvalidFrequencyArfcn 2
+#define MIN_apaInvalidFrequencyArfcn 0L
+#define MAX_apaInvalidFrequencyArfcn 1023L
+#define LEAF_apaClockSourceFrequencyIndex 1
+#define LEAF_apaClockSourceFrequencyArfcn 2
+#define MIN_apaClockSourceFrequencyArfcn 0L
+#define MAX_apaClockSourceFrequencyArfcn 1023L
+#define LEAF_viperCellName 1
+#define LEAF_viperCellIPAddress 2
+#define LEAF_viperCellDefGateway 3
+#define LEAF_viperCellLocation 4
+#define LEAF_viperCellSerialNumber 5
+#define LEAF_viperCellAssetNumber 6
+#define LEAF_viperCellSoftwareBuild 7
+#define LEAF_viperCellCustomerName 8
+#define LEAF_viperCellCustomerAddress 9
+#define LEAF_viperCellCustomerPhone 10
+#define LEAF_viperCellCustomerEmail 11
+#define LEAF_viperCellCustomerInfo 12
+#define LEAF_errorCode_L1 1
+#define LEAF_errorCode_MD 2
+#define LEAF_errorCode_RM 3
+#define LEAF_errorCode_MM 4
+#define LEAF_errorCode_CC 5
+#define LEAF_errorCode_L2 6
+#define LEAF_errorCode_SMS 7
+#define LEAF_errorCode_OAM 8
+#define LEAF_errorCode_H323 9
+#define LEAF_errorCode_LUDB 10
+#define LEAF_errorCode_EXT_LC 11
+#define LEAF_errorCode_LOG 12
+#define LEAF_errorCode_MCH 13
+#define LEAF_errorCode_ALARM 14
+#define LEAF_errorCode_SYSINIT 15
+#define LEAF_errorCode_GRR 16
+#define LEAF_errorCode_CDR 17
+#define LEAF_gprsServerIpAddress 1
+#define LEAF_gprsRac 2
+#define LEAF_enableGprs 3
+#define VAL_enableGprs_disable 0L
+#define VAL_enableGprs_enable 1L
+#define LEAF_gprsOperationalStatus 4
+#define VAL_gprsOperationalStatus_disabled 0L
+#define VAL_gprsOperationalStatus_enabled 1L
+#define LEAF_nmo 1
+#define MIN_nmo 0L
+#define MAX_nmo 3L
+#define LEAF_t3168 2
+#define MIN_t3168 0L
+#define MAX_t3168 7L
+#define LEAF_t3192 3
+#define MIN_t3192 0L
+#define MAX_t3192 7L
+#define LEAF_drxTimerMax 4
+#define MIN_drxTimerMax 0L
+#define MAX_drxTimerMax 7L
+#define LEAF_accessBurstType 5
+#define MIN_accessBurstType 0L
+#define MAX_accessBurstType 1L
+#define LEAF_controlAckType 6
+#define MIN_controlAckType 0L
+#define MAX_controlAckType 1L
+#define LEAF_bsCvMax 7
+#define MIN_bsCvMax 0L
+#define MAX_bsCvMax 15L
+#define LEAF_panDec 8
+#define MIN_panDec 0L
+#define MAX_panDec 7L
+#define LEAF_panInc 9
+#define MIN_panInc 0L
+#define MAX_panInc 7L
+#define LEAF_panMax 10
+#define MIN_panMax 0L
+#define MAX_panMax 7L
+#define LEAF_raColour 11
+#define LEAF_si13Position 12
+#define LEAF_cbchTrxSlot 13
+#define LEAF_cbchTrx 14
+#define LEAF_bcchChangeMark 15
+#define LEAF_siChangeField 16
+#define LEAF_gprsMsTxpwrMaxCch 1
+#define MIN_gprsMsTxpwrMaxCch 0L
+#define MAX_gprsMsTxpwrMaxCch 31L
+#define LEAF_gprsRexLevAccessMin 2
+#define MIN_gprsRexLevAccessMin 0L
+#define MAX_gprsRexLevAccessMin 63L
+#define LEAF_gprsReselectOffset 3
+#define MIN_gprsReselectOffset 0L
+#define MAX_gprsReselectOffset 31L
+#define LEAF_priorityClass 4
+#define MIN_priorityClass 0L
+#define MAX_priorityClass 7L
+#define LEAF_lsaId 5
+#define LEAF_hcsThreshold 6
+#define MIN_hcsThreshold 0L
+#define MAX_hcsThreshold 31L
+#define LEAF_gprsTemporaryOffset 7
+#define MIN_gprsTemporaryOffset 0L
+#define MAX_gprsTemporaryOffset 7L
+#define LEAF_gprsPenaltyTime 8
+#define MIN_gprsPenaltyTime 0L
+#define MAX_gprsPenaltyTime 31L
+#define LEAF_gprsCellReselectHysteresis 9
+#define MIN_gprsCellReselectHysteresis 0L
+#define MAX_gprsCellReselectHysteresis 7L
+#define LEAF_gprsRaReselectHysteresis 10
+#define MIN_gprsRaReselectHysteresis 0L
+#define MAX_gprsRaReselectHysteresis 7L
+#define LEAF_c32Qual 11
+#define VAL_c32Qual_false 0L
+#define VAL_c32Qual_true 1L
+#define LEAF_c31Hysteresis 12
+#define VAL_c31Hysteresis_false 0L
+#define VAL_c31Hysteresis_true 1L
+#define LEAF_alpha 13
+#define MIN_alpha 0L
+#define MAX_alpha 10L
+#define LEAF_pB 14
+#define MIN_pB 0L
+#define MAX_pB 15L
+#define LEAF_networkControlOrder 15
+#define MIN_networkControlOrder 0L
+#define MAX_networkControlOrder 3L
+#define LEAF_ncFrequencyListIndex 1
+#define MIN_ncFrequencyListIndex 0L
+#define MAX_ncFrequencyListIndex 15L
+#define LEAF_ncFrequency 2
+#define MIN_ncFrequency 0L
+#define MAX_ncFrequency 1023L
+#define LEAF_ncReportingPeriodI 17
+#define MIN_ncReportingPeriodI 0L
+#define MAX_ncReportingPeriodI 7L
+#define LEAF_ncReportingPeriodT 18
+#define MIN_ncReportingPeriodT 0L
+#define MAX_ncReportingPeriodT 7L
+#define LEAF_extMeasurementOrder 19
+#define MIN_extMeasurementOrder 0L
+#define MAX_extMeasurementOrder 3L
+#define LEAF_extReportingPeriod 20
+#define MIN_extReportingPeriod 0L
+#define MAX_extReportingPeriod 7L
+#define LEAF_extReportingType 21
+#define MIN_extReportingType 1L
+#define MAX_extReportingType 3L
+#define LEAF_intFrequency 22
+#define MIN_intFrequency 0L
+#define MAX_intFrequency 31L
+#define LEAF_nccPermitted 23
+#define LEAF_pcMeasChan 24
+#define MIN_pcMeasChan 0L
+#define MAX_pcMeasChan 1L
+#define LEAF_tavgW 25
+#define MIN_tavgW 0L
+#define MAX_tavgW 25L
+#define LEAF_tavgT 26
+#define MIN_tavgT 0L
+#define MAX_tavgT 25L
+#define LEAF_navgI 27
+#define MIN_navgI 0L
+#define MAX_navgI 15L
+#define LEAF_gprsMsTargetPower 28
+#define MIN_gprsMsTargetPower 0L
+#define MAX_gprsMsTargetPower 63L
+#define LEAF_spgcCcchSup 29
+#define VAL_spgcCcchSup_false 0L
+#define VAL_spgcCcchSup_true 1L
+#define LEAF_t3169 1
+#define MIN_t3169 1L
+#define MAX_t3169 30L
+#define LEAF_t3191 2
+#define MIN_t3191 1L
+#define MAX_t3191 30L
+#define LEAF_t3193 3
+#define LEAF_t3195 4
+#define MIN_t3195 1L
+#define MAX_t3195 30L
+#define LEAF_blockTimer 1
+#define MIN_blockTimer 1L
+#define MAX_blockTimer 30L
+#define LEAF_resetTimer 2
+#define MIN_resetTimer 1L
+#define MAX_resetTimer 120L
+#define LEAF_suspendTimer 3
+#define MIN_suspendTimer 1L
+#define MAX_suspendTimer 10L
+#define LEAF_resumeTimer 4
+#define MIN_resumeTimer 1L
+#define MAX_resumeTimer 10L
+#define LEAF_capUpdateTimer 5
+#define MIN_capUpdateTimer 1L
+#define MAX_capUpdateTimer 30L
+#define LEAF_blockRetries 6
+#define LEAF_unBlockRetries 7
+#define LEAF_resetRetries 8
+#define LEAF_suspendRetries 9
+#define LEAF_resumeRetries 10
+#define LEAF_raCapUpdateRetries 11
+#define LEAF_timeInterval 12
+#define MIN_timeInterval 5L
+#define MAX_timeInterval 6000L
+#define LEAF_networkPort 13
+#define MIN_networkPort 1024L
+#define MAX_networkPort 65535L
+#define LEAF_flushReqRecvd 1
+#define LEAF_pagingReqRecvd 2
+#define LEAF_meanPsInterArrivalTime 3
+#define LEAF_availablePdch 4
+#define LEAF_meanAvailablePdch 5
+#define LEAF_maxAvailablePdch 6
+#define LEAF_minAvailablePdch 7
+#define LEAF_meanOccupiedPdch 8
+#define LEAF_maxOccupiedPdch 9
+#define LEAF_minOccupiedPdch 10
+#define LEAF_availablePdchAllocTime 11
+#define LEAF_packetPagingMessages 12
+#define LEAF_pagchQueueLength 13
+#define LEAF_pagesDiscardedFromPpch 14
+#define LEAF_assignmentRequest 15
+#define LEAF_succAssignmentProc 16
+#define LEAF_succPdtchSeizures 17
+#define LEAF_meanPacketQueueLength 18
+#define LEAF_serviceChanges 19
+#define LEAF_cdrClientSSLEnable 1
+#define VAL_cdrClientSSLEnable_false 0L
+#define VAL_cdrClientSSLEnable_true 1L
+#define LEAF_cdrLongCallTimer 2
+#define MIN_cdrLongCallTimer 1L
+#define MAX_cdrLongCallTimer 30L
+#define LEAF_t101 1
+#define LEAF_t102 2
+#define LEAF_t103 3
+#define LEAF_t104 4
+#define LEAF_t201 5
+#define LEAF_t202 6
+#define LEAF_t204 7
+#define LEAF_t210 8
+#define LEAF_t211 9
+#define LEAF_snmpServiceEnabled 1
+#define VAL_snmpServiceEnabled_disabled 0L
+#define VAL_snmpServiceEnabled_enabled 1L
+#define LEAF_httpServiceEnabled 2
+#define VAL_httpServiceEnabled_disabled 0L
+#define VAL_httpServiceEnabled_enabled 1L
+#define LEAF_telnetServiceEnabled 3
+#define VAL_telnetServiceEnabled_disabled 0L
+#define VAL_telnetServiceEnabled_enabled 1L
+#define LEAF_sshServiceEnabled 4
+#define VAL_sshServiceEnabled_disabled 0L
+#define VAL_sshServiceEnabled_enabled 1L
+#define LEAF_ftpServiceEnabled 5
+#define VAL_ftpServiceEnabled_disabled 0L
+#define VAL_ftpServiceEnabled_enabled 1L
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/include/mibtags.h b/data/mnet/GP10/Host/Common_To_Host/include/mibtags.h
new file mode 100644
index 0000000..99a5263
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/include/mibtags.h
@@ -0,0 +1,951 @@
+#ifndef MIB_TAG
+#include "mibleaf.h"
+
+/* A MIB tag is a 32 bit variable that uniquely defines the
+ * location of a MIB variable within the SNMP database.
+ * It contains several indicies and has the following format:
+ */
+#if 0 /* Can't pass the structure easily as an arg */
+typedef struct MibTag_t
+{ /* so use the int definition for MibTag. */
+ unsigned type:4; /* Type of MIB item */
+ unsigned size:12; /* Size or Item number of a table */
+ unsigned table:8; /* MIB Table this item is in. */
+ unsigned item:8; /* element # of the item. */
+} MibTag;
+#else
+typedef int MibTag;
+#endif
+
+#define MTYPE_STRUCT 0
+#define MTYPE_NUMBER 1
+#define MTYPE_IPADDR 2
+#define MTYPE_STRING 3
+#define MTYPE_TABLE 4
+
+#define MTYPE_TENTRY 8
+#define MTYPE_TNUMBER 9
+#define MTYPE_TIPADDR 10
+#define MTYPE_TSTRING 11
+
+
+#define MTYPE_IS_TABLE(T) (T>=8)
+#define MTYPE_IS_SCALAR(T) (T<8)
+#define MTYPE_IS_INT(T) ((T==MTYPE_NUMBER) || (T== MTYPE_IPADDR))
+#define MTYPE_IS_TINT(T) ((T==MTYPE_TNUMBER) || (T== MTYPE_TIPADDR))
+#define MTYPE_IS_STR(T) (T==MTYPE_STRING)
+#define MTYPE_IS_TSTR(T) (T==MTYPE_TSTRING)
+
+#define MIB_TAG(typ, siz, tbl, itm) ((typ<<28) | (siz<<16) | (tbl<<8) | (itm))
+
+#define MIB_STRUCT(tbl, itm, siz) MIB_TAG (MTYPE_STRUCT, siz, tbl, itm)
+#define MIB_ITEM(tbl, itm) MIB_TAG (MTYPE_NUMBER, 4, tbl, itm)
+#define MIB_IPADDR(tbl, itm) MIB_TAG (MTYPE_IPADDR, 4, tbl, itm)
+#define MIB_STRING(tbl, itm, siz) MIB_TAG (MTYPE_STRING, siz, tbl, itm)
+#define MIB_TABLE(tbl, itm) MIB_TAG (MTYPE_TABLE, 4, tbl, itm)
+
+#define MIB_TENTRY(tbl, itm, siz) MIB_TAG (MTYPE_TENTRY, siz, tbl, itm)
+#define MIB_TITEM(tbl, itm, elmt) MIB_TAG (MTYPE_TNUMBER, elmt,tbl, itm)
+#define MIB_TIPADDR(tbl,itm, elmt) MIB_TAG (MTYPE_TIPADDR, elmt,tbl, itm)
+#define MIB_TSTRING(tbl,itm, elmt) MIB_TAG (MTYPE_TSTRING, elmt,tbl, itm)
+
+
+
+#define MIB_TYP(tag) ((tag>>28)&0xF)
+#define MIB_SIZ(tag) ((tag>>16)&0xFFF)
+#define MIB_TBL(tag) ((tag>>8)&0xFF)
+#define MIB_ITM(tag) (tag&0xFF)
+
+#define MTBL_btsBasicPackage 0
+#define MTBL_btsOptionsPackage 1
+#define MTBL_firstTransceiverPackage 2
+#define MTBL_secondTransceiverPackage 3
+#define MTBL_firstRadioCarrierPackage 4
+#define MTBL_secondRadioCarrierPackage 5
+#define MTBL_btsTimerPackage 6
+#define MTBL_t200 7
+#define MTBL_t31xx 8
+#define MTBL_adjacentCellPackage 9
+#define MTBL_frequencyHoppingPackage 10
+#define MTBL_handoverControlPackage 11
+#define MTBL_hoAveragingAdjCellParam 12
+#define MTBL_hoAveragingDistParam 13
+#define MTBL_hoAveragingLevParam 14
+#define MTBL_hoAveragingQualParam 15
+#define MTBL_hoThresholdDistParam 16
+#define MTBL_hoThresholdInterfaceParam 17
+#define MTBL_hoThresholdLevParam 18
+#define MTBL_hoThresholdQualParam 19
+#define MTBL_interferenceAveragingParam 20
+#define MTBL_powerControlPackage 21
+#define MTBL_pcAveragingLev 22
+#define MTBL_pcAveragingQual 23
+#define MTBL_pcLowerThresholdLevParam 24
+#define MTBL_pcLowerThresholdQualParam 25
+#define MTBL_pcUpperThresholdLevParam 26
+#define MTBL_pcUpperThresholdQualParam 27
+#define MTBL_cellMeasurmentPackage 28
+#define MTBL_callControlMeasurmentPackage 29
+#define MTBL_callConfigData 30
+#define MTBL_mobilityConfigData 31
+#define MTBL_resourceConfigData 32
+#define MTBL_oamConfigData 33
+#define MTBL_h323Data 34
+#define MTBL_dualTRXSCard 35
+#define MTBL_arfcnRssiFunction 36
+#define MTBL_clockCard 37
+#define MTBL_gpsCard 38
+#define MTBL_powerCard 39
+#define MTBL_externalPowerSupply 40
+#define MTBL_cdcBoard 41
+#define MTBL_automaticParameterAllocation 42
+#define MTBL_gp10MgmtInfoMib 43
+#define MTBL_maintenanceConfigData 44
+#define MTBL_gp10ErrorInfoMib 45
+#define MTBL_viperAccessMib 46
+#define MTBL_trapFwdData 47
+
+/* New Defines for supporting GS */
+#define MTBL_btsGsBasicPackage 48
+#define MTBL_btsGsOptionPackage 49
+#define MTBL_rss 50
+#define MTBL_rlcMac 51
+#define MTBL_bssgp 52
+#define MTBL_btsGsMeasPackage 53
+
+#define MTBL_gp10CdrMib 54
+#define MTBL_handoverTimerMib 55
+#define MTBL_gp10ServiceStatusMib 56
+
+#define MTBL_last 56
+
+#ifndef LEAF_bts_ncc /* Grab the leaf definitions */
+#include "mibleaf.h"
+#endif
+
+/* The mibcomp -leaf option does not create a complete list of the leaf
+ * nodes. In particular, it does not generate them for all structure and
+ * table entries. The following is is a list of the missing ones. The
+ * LEAF_... definitions contain the final digit of the object OID string.
+ */
+
+#define LEAF_btsBasicPackage 0
+#define LEAF_cellAllocationTable 4
+#define LEAF_cellAllocationEntry 0
+#define LEAF_plmnPermittedTable 12
+#define LEAF_plmnPermittedEntry 0
+#define LEAF_btsOptionsPackage 0
+#define LEAF_cellBarred 3
+#define LEAF_notAllowedAccessClassTable 7
+#define LEAF_notAllowedAccessClassEntry 0
+#define LEAF_firstTransceiverPackage 0
+#define LEAF_channel_0_Table 6
+#define LEAF_channel_0_Entry 0
+#define LEAF_secondTransceiverPackage 0
+#define LEAF_channel_1_Table 6
+#define LEAF_channel_1_Entry 0
+#define LEAF_firstRadioCarrierPackage 0
+#define LEAF_carrierFrequency_0_Table 1
+#define LEAF_carrierFrequency_0_Entry 0
+#define LEAF_secondRadioCarrierPackage 0
+#define LEAF_carrierFrequency_1_Table 1
+#define LEAF_carrierFrequency_1_Entry 0
+#define LEAF_btsTimerPackage 0
+#define LEAF_t200 1
+#define LEAF_t31xx 2
+#define LEAF_adjacentCellPackage 0
+#define LEAF_adjCell_handoverTable 1
+#define LEAF_adjCell_handoverEntry 0
+#define LEAF_adjCell_reselectionTable 2
+#define LEAF_adjCell_reselectionEntry 0
+#define LEAF_frequencyHoppingPackage 0
+#define LEAF_mobileAllocationTable 3
+#define LEAF_mobileAllocationEntry 0
+#define LEAF_handoverControlPackage 0
+#define LEAF_hoAveragingAdjCellParam 3
+#define LEAF_hoAveragingDistParam 4
+#define LEAF_hoAveragingLevParam 5
+#define LEAF_hoAveragingQualParam 6
+#define LEAF_hoThresholdDistParam 8
+#define LEAF_hoThresholdInterfaceParam 9
+#define LEAF_hoThresholdLevParam 10
+#define LEAF_hoThresholdQualParam 11
+#define LEAF_interferenceAveragingParam 12
+#define LEAF_powerControlPackage 0
+#define LEAF_pcAveragingLev 1
+#define LEAF_pcAveragingQual 2
+#define LEAF_pcLowerThresholdLevParam 3
+#define LEAF_pcLowerThresholdQualParam 4
+#define LEAF_pcUpperThresholdLevParam 5
+#define LEAF_pcUpperThresholdQualParam 6
+#define LEAF_cellMeasurmentPackage 0
+#define LEAF_attImmediateAssingProcsPerCauseTable 6
+#define LEAF_attImmediateAssingProcsPerCauseEntry 0
+#define LEAF_succImmediateAssingProcsPerCauseTable 7
+#define LEAF_succImmediateAssingProcsPerCauseEntry 0
+#define LEAF_callControlMeasurmentPackage 0
+#define LEAF_externalHDOsPerCauseTable 29
+#define LEAF_externalHDOsPerCauseEntry 0
+#define LEAF_callConfigData 0
+#define LEAF_mobilityConfigData 0
+#define LEAF_resourceConfigData 0
+#define LEAF_oamConfigData 0
+#define LEAF_h323Data 0
+
+#define LEAF_dualTRXSCard 0
+#define LEAF_arfcnRssiFunction 0
+#define LEAF_arfcnRssiClockControlTable 3
+#define LEAF_arfcnRssiClockControlEntry 0
+#define LEAF_clockCard 0
+#define LEAF_gpsCard 0
+#define LEAF_powerCard 0
+#define LEAF_externalPowerSupply 0
+#define LEAF_cdcBoard 0
+#define LEAF_automaticParameterAllocation 0
+#define LEAF_apaInvalidFrequencyTable 8
+#define LEAF_apaInvalidFrequencyEntry 0
+#define LEAF_apaClockSourceFrequencyTable 9
+#define LEAF_apaClockSourceFrequencyEntry 0
+#define LEAF_gp10MgmtInfoMib 0
+
+#define LEAF_maintenanceConfigData 0
+#define LEAF_gp10ErrorInfoMib 0
+
+#define LEAF_viperAccessMib 0
+#define LEAF_readCommunity 1
+#define LEAF_writeCommunity 2
+
+
+#define LEAF_gp10CdrMib 0
+#define LEAF_handoverTimerMib 0
+#define LEAF_gp10ServiceStatusMib 0
+
+/* New Defines for supporting GS */
+#define LEAF_btsGsBasicPackage 0
+#define LEAF_btsGsOptionPackage 0
+#define LEAF_rss 0
+#define LEAF_ncFrequencyListTable 16
+#define LEAF_ncFrequencyListEntry 0
+#define LEAF_rlcMac 0
+#define LEAF_bssgp 0
+#define LEAF_btsGsMeasPackage 0
+
+
+#define SIZE_DisplayString 255
+
+#define VALUE_Default 0
+#define VALUE_Average 1
+#define VALUE_Deviation 2
+#define VALUE_Maximum 3
+#define VALUE_Minimum 4
+#define VALUE_Reset 5
+
+#define MIB_btsBasicPackage MIB_STRUCT (MTBL_btsBasicPackage, LEAF_btsBasicPackage, sizeof(BtsBasicPackage))
+#define MIB_bts_ncc MIB_ITEM (MTBL_btsBasicPackage, LEAF_bts_ncc)
+#define MIB_bts_cid MIB_ITEM (MTBL_btsBasicPackage, LEAF_bts_cid)
+#define MIB_btsID MIB_ITEM (MTBL_btsBasicPackage, LEAF_btsID)
+#define MIB_cellAllocationTable MIB_TABLE (MTBL_btsBasicPackage, LEAF_cellAllocationTable)
+#define MIBT_cellAllocationEntry MIB_TENTRY (MTBL_btsBasicPackage, LEAF_cellAllocationTable, sizeof(CellAllocationEntry))
+#define MIBT_cellAllocationIndex MIB_TITEM (MTBL_btsBasicPackage, LEAF_cellAllocationTable, LEAF_cellAllocationIndex)
+#define MIBT_cellAllocation MIB_TITEM (MTBL_btsBasicPackage, LEAF_cellAllocationTable, LEAF_cellAllocation)
+#define MIB_gsmdcsIndicator MIB_ITEM (MTBL_btsBasicPackage, LEAF_gsmdcsIndicator)
+#define MIB_bts_mcc MIB_ITEM (MTBL_btsBasicPackage, LEAF_bts_mcc)
+#define MIB_bts_mnc MIB_ITEM (MTBL_btsBasicPackage, LEAF_bts_mnc)
+#define MIB_bts_lac MIB_ITEM (MTBL_btsBasicPackage, LEAF_bts_lac)
+#define MIB_bts_ci MIB_ITEM (MTBL_btsBasicPackage, LEAF_bts_ci)
+#define MIB_cellReselectHysteresis MIB_ITEM (MTBL_btsBasicPackage, LEAF_cellReselectHysteresis)
+#define MIB_ny1 MIB_ITEM (MTBL_btsBasicPackage, LEAF_ny1)
+#define MIB_plmnPermittedTable MIB_TABLE (MTBL_btsBasicPackage, LEAF_plmnPermittedTable)
+#define MIBT_plmnPermittedEntry MIB_TENTRY (MTBL_btsBasicPackage, LEAF_plmnPermittedTable, sizeof(PlmnPermittedEntry))
+#define MIBT_plmnPermittedIndex MIB_TITEM (MTBL_btsBasicPackage, LEAF_plmnPermittedTable, LEAF_plmnPermittedIndex)
+#define MIBT_plmnPermitted MIB_TITEM (MTBL_btsBasicPackage, LEAF_plmnPermittedTable, LEAF_plmnPermitted)
+#define MIB_radioLinkTimeout MIB_ITEM (MTBL_btsBasicPackage, LEAF_radioLinkTimeout)
+#define MIB_relatedTranscoder MIB_ITEM (MTBL_btsBasicPackage, LEAF_relatedTranscoder)
+#define MIB_rxLevAccessMin MIB_ITEM (MTBL_btsBasicPackage, LEAF_rxLevAccessMin)
+#define MIB_bts_administrativeState MIB_ITEM (MTBL_btsBasicPackage, LEAF_bts_administrativeState)
+#define MIB_bts_alarmStatus MIB_ITEM (MTBL_btsBasicPackage, LEAF_bts_alarmStatus)
+#define MIB_bts_operationalState MIB_ITEM (MTBL_btsBasicPackage, LEAF_bts_operationalState)
+#define MIB_maxNumberRetransmissions MIB_ITEM (MTBL_btsBasicPackage, LEAF_maxNumberRetransmissions)
+#define MIB_mSTxPwrMaxCCH MIB_ITEM (MTBL_btsBasicPackage, LEAF_mSTxPwrMaxCCH)
+#define MIB_numberOfSlotsSpreadTrans MIB_ITEM (MTBL_btsBasicPackage, LEAF_numberOfSlotsSpreadTrans)
+#define MIB_noOfBlocksForAccessGrant MIB_ITEM (MTBL_btsBasicPackage, LEAF_noOfBlocksForAccessGrant)
+#define MIB_noOfMultiframesBetweenPaging MIB_ITEM (MTBL_btsBasicPackage, LEAF_noOfMultiframesBetweenPaging)
+
+#define MIB_btsOptionsPackage MIB_STRUCT (MTBL_btsOptionsPackage, LEAF_btsOptionsPackage, sizeof(BtsOptionsPackage))
+#define MIB_allowIMSIAttachDetach MIB_ITEM (MTBL_btsOptionsPackage, LEAF_allowIMSIAttachDetach)
+#define MIB_callReestablishmentAllowed MIB_ITEM (MTBL_btsOptionsPackage, LEAF_callReestablishmentAllowed)
+#define MIB_cellBarred MIB_ITEM (MTBL_btsOptionsPackage, LEAF_cellBarred)
+#define MIB_dtxDownlink MIB_ITEM (MTBL_btsOptionsPackage, LEAF_dtxDownlink)
+#define MIB_dtxUplink MIB_ITEM (MTBL_btsOptionsPackage, LEAF_dtxUplink)
+#define MIB_emergencyCallRestricted MIB_ITEM (MTBL_btsOptionsPackage, LEAF_emergencyCallRestricted)
+#define MIB_notAllowedAccessClassTable MIB_TABLE (MTBL_btsOptionsPackage, LEAF_notAllowedAccessClassTable)
+#define MIBT_notAllowedAccessClassEntry MIB_TENTRY (MTBL_btsOptionsPackage, LEAF_notAllowedAccessClassTable, sizeof(NotAllowedAccessClassEntry))
+#define MIBT_notAllowedAccessClassIndex MIB_TITEM (MTBL_btsOptionsPackage, LEAF_notAllowedAccessClassTable, LEAF_notAllowedAccessClassIndex)
+#define MIBT_notAllowedAccessClass MIB_TITEM (MTBL_btsOptionsPackage, LEAF_notAllowedAccessClassTable, LEAF_notAllowedAccessClass)
+#define MIB_timerPeriodicUpdateMS MIB_ITEM (MTBL_btsOptionsPackage, LEAF_timerPeriodicUpdateMS)
+#define MIB_maxQueueLength MIB_ITEM (MTBL_btsOptionsPackage, LEAF_maxQueueLength)
+#define MIB_msPriorityUsedInQueueing MIB_ITEM (MTBL_btsOptionsPackage, LEAF_msPriorityUsedInQueueing)
+#define MIB_timeLimitCall MIB_ITEM (MTBL_btsOptionsPackage, LEAF_timeLimitCall)
+#define MIB_timeLimitHandover MIB_ITEM (MTBL_btsOptionsPackage, LEAF_timeLimitHandover)
+
+#define MIB_firstTransceiverPackage MIB_STRUCT (MTBL_firstTransceiverPackage, LEAF_firstTransceiverPackage, sizeof(FirstTransceiverPackage))
+#define MIB_basebandTransceiverID_0 MIB_ITEM (MTBL_firstTransceiverPackage, LEAF_basebandTransceiverID_0)
+#define MIB_relatedRadioCarrier_0 MIB_ITEM (MTBL_firstTransceiverPackage, LEAF_relatedRadioCarrier_0)
+#define MIB_basebandAdministrativeState_0 MIB_ITEM (MTBL_firstTransceiverPackage, LEAF_basebandAdministrativeState_0)
+#define MIB_basebandAlarmStatus_0 MIB_ITEM (MTBL_firstTransceiverPackage, LEAF_basebandAlarmStatus_0)
+#define MIB_basebandOperationalState_0 MIB_ITEM (MTBL_firstTransceiverPackage, LEAF_basebandOperationalState_0)
+#define MIB_channel_0_Table MIB_TABLE (MTBL_firstTransceiverPackage, LEAF_channel_0_Table)
+#define MIBT_channel_0_Entry MIB_TENTRY (MTBL_firstTransceiverPackage, LEAF_channel_0_Table, sizeof(ChannelEntry))
+#define MIBT_channelIndex_0 MIB_TITEM (MTBL_firstTransceiverPackage, LEAF_channel_0_Table, LEAF_channelIndex_0)
+#define MIBT_channelCombination_0 MIB_TITEM (MTBL_firstTransceiverPackage, LEAF_channel_0_Table, LEAF_channelCombination_0)
+#define MIBT_channelID_0 MIB_TITEM (MTBL_firstTransceiverPackage, LEAF_channel_0_Table, LEAF_channelID_0)
+#define MIBT_channelFrequencyUsage_0 MIB_TITEM (MTBL_firstTransceiverPackage, LEAF_channel_0_Table, LEAF_channelFrequencyUsage_0)
+#define MIBT_channelTsc_0 MIB_TITEM (MTBL_firstTransceiverPackage, LEAF_channel_0_Table, LEAF_channelTsc_0)
+#define MIBT_channelAdministrativeState_0 MIB_TITEM (MTBL_firstTransceiverPackage, LEAF_channel_0_Table, LEAF_channelAdministrativeState_0)
+#define MIBT_channelOperationalState_0 MIB_TITEM (MTBL_firstTransceiverPackage, LEAF_channel_0_Table, LEAF_channelOperationalState_0)
+#define MIB_secondTransceiverPackage MIB_STRUCT (MTBL_secondTransceiverPackage, LEAF_secondTransceiverPackage, sizeof(SecondTransceiverPackage))
+#define MIB_basebandTransceiverID_1 MIB_ITEM (MTBL_secondTransceiverPackage, LEAF_basebandTransceiverID_1)
+#define MIB_relatedRadioCarrier_1 MIB_ITEM (MTBL_secondTransceiverPackage, LEAF_relatedRadioCarrier_1)
+#define MIB_basebandAdministrativeState_1 MIB_ITEM (MTBL_secondTransceiverPackage, LEAF_basebandAdministrativeState_1)
+#define MIB_basebandAlarmStatus_1 MIB_ITEM (MTBL_secondTransceiverPackage, LEAF_basebandAlarmStatus_1)
+#define MIB_basebandOperationalState_1 MIB_ITEM (MTBL_secondTransceiverPackage, LEAF_basebandOperationalState_1)
+#define MIB_channel_1_Table MIB_TABLE (MTBL_secondTransceiverPackage, LEAF_channel_1_Table)
+#define MIBT_channel_1_Entry MIB_TENTRY (MTBL_secondTransceiverPackage, LEAF_channel_1_Table, sizeof(ChannelEntry))
+#define MIBT_channelIndex_1 MIB_TITEM (MTBL_secondTransceiverPackage, LEAF_channel_1_Table, LEAF_channelIndex_1)
+#define MIBT_channelID_1 MIB_TITEM (MTBL_secondTransceiverPackage, LEAF_channel_1_Table, LEAF_channelID_1)
+#define MIBT_channelCombination_1 MIB_TITEM (MTBL_secondTransceiverPackage, LEAF_channel_1_Table, LEAF_channelCombination_1)
+#define MIBT_channelFrequencyUsage_1 MIB_TITEM (MTBL_secondTransceiverPackage, LEAF_channel_1_Table, LEAF_channelFrequencyUsage_1)
+#define MIBT_channelTsc_1 MIB_TITEM (MTBL_secondTransceiverPackage, LEAF_channel_1_Table, LEAF_channelTsc_1)
+#define MIBT_channelAdministrativeState_1 MIB_TITEM (MTBL_secondTransceiverPackage, LEAF_channel_1_Table, LEAF_channelAdministrativeState_1)
+#define MIBT_channelOperationalState_1 MIB_TITEM (MTBL_secondTransceiverPackage, LEAF_channel_1_Table, LEAF_channelOperationalState_1)
+
+#define MIB_firstRadioCarrierPackage MIB_STRUCT (MTBL_firstRadioCarrierPackage, LEAF_firstRadioCarrierPackage, sizeof(RadioCarrierPackage))
+
+#define MIB_carrierFrequency_0_Table MIB_TABLE (MTBL_firstRadioCarrierPackage, LEAF_carrierFrequency_0_Table)
+#define MIBT_carrierFrequency_0_Entry MIB_TENTRY (MTBL_firstRadioCarrierPackage, LEAF_carrierFrequency_0_Table, sizeof(CarrierFrequencyEntry))
+#define MIBT_carrierFrequencyIndex_0 MIB_TITEM (MTBL_firstRadioCarrierPackage, LEAF_carrierFrequency_0_Table, LEAF_carrierFrequencyIndex_0)
+#define MIBT_carrierFrequency_0 MIB_TITEM (MTBL_firstRadioCarrierPackage, LEAF_carrierFrequency_0_Table, LEAF_carrierFrequency_0)
+#define MIB_powerClass_0 MIB_ITEM (MTBL_firstRadioCarrierPackage, LEAF_powerClass_0)
+#define MIB_radioCarrierID_0 MIB_ITEM (MTBL_firstRadioCarrierPackage, LEAF_radioCarrierID_0)
+#define MIB_txPwrMaxReduction_0 MIB_ITEM (MTBL_firstRadioCarrierPackage, LEAF_txPwrMaxReduction_0)
+#define MIB_carrier_administrativeState_0 MIB_ITEM (MTBL_firstRadioCarrierPackage, LEAF_carrier_administrativeState_0)
+#define MIB_carrier_alarmStatus_0 MIB_ITEM (MTBL_firstRadioCarrierPackage, LEAF_carrier_alarmStatus_0)
+#define MIB_carrier_operationalState_0 MIB_ITEM (MTBL_firstRadioCarrierPackage, LEAF_carrier_operationalState_0)
+
+#define MIB_secondRadioCarrierPackage MIB_STRUCT (MTBL_secondRadioCarrierPackage, LEAF_secondRadioCarrierPackage, sizeof(RadioCarrierPackage))
+#define MIB_carrierFrequency_1_Table MIB_TABLE (MTBL_secondRadioCarrierPackage, LEAF_carrierFrequency_1_Table)
+#define MIBT_carrierFrequency_1_Entry MIB_TENTRY (MTBL_secondRadioCarrierPackage, LEAF_carrierFrequency_1_Table, sizeof(CarrierFrequencyEntry))
+#define MIBT_carrierFrequencyIndex_1 MIB_TITEM (MTBL_secondRadioCarrierPackage, LEAF_carrierFrequency_1_Table, LEAF_carrierFrequencyIndex_1)
+#define MIBT_carrierFrequency_1 MIB_TITEM (MTBL_secondRadioCarrierPackage, LEAF_carrierFrequency_1_Table, LEAF_carrierFrequency_1)
+#define MIB_powerClass_1 MIB_ITEM (MTBL_secondRadioCarrierPackage, LEAF_powerClass_1)
+#define MIB_radioCarrierID_1 MIB_ITEM (MTBL_secondRadioCarrierPackage, LEAF_radioCarrierID_1)
+#define MIB_txPwrMaxReduction_1 MIB_ITEM (MTBL_secondRadioCarrierPackage, LEAF_txPwrMaxReduction_1)
+#define MIB_carrier_administrativeState_1 MIB_ITEM (MTBL_secondRadioCarrierPackage, LEAF_carrier_administrativeState_1)
+#define MIB_carrier_alarmStatus_1 MIB_ITEM (MTBL_secondRadioCarrierPackage, LEAF_carrier_alarmStatus_1)
+#define MIB_carrier_operationalState_1 MIB_ITEM (MTBL_secondRadioCarrierPackage, LEAF_carrier_operationalState_1)
+
+#define MIB_btsTimerPackage MIB_STRUCT (MTBL_btsTimerPackage, LEAF_btsTimerPackage, sizeof(BtsTimerPackage))
+#define MIB_t200 MIB_STRUCT (MTBL_btsTimerPackage, LEAF_t200, sizeof(T200))
+
+#define MIB_t200Package MIB_STRUCT (MTBL_t200, 0, sizeof(T200)) /* added on Aug 9 */
+#define MIB_sdcchSAPI0 MIB_ITEM (MTBL_t200, LEAF_sdcchSAPI0)
+#define MIB_facchTCHF MIB_ITEM (MTBL_t200, LEAF_facchTCHF)
+#define MIB_facchTCHH MIB_ITEM (MTBL_t200, LEAF_facchTCHH)
+#define MIB_sacchTCHSAPI0 MIB_ITEM (MTBL_t200, LEAF_sacchTCHSAPI0)
+#define MIB_sacchSDCCH MIB_ITEM (MTBL_t200, LEAF_sacchSDCCH)
+#define MIB_sdcchSAPI3 MIB_ITEM (MTBL_t200, LEAF_sdcchSAPI3)
+#define MIB_sdcchTCHSAPI3 MIB_ITEM (MTBL_t200, LEAF_sdcchTCHSAPI3)
+#define MIB_t31xx MIB_STRUCT (MTBL_btsTimerPackage, LEAF_t31xx, sizeof(T31xx))
+
+/* Modified to solve nested table reference problem. When an application gets the address of the
+ * structure, it should get the actual address of the sturcture rather than address to the pointer
+ * to the structure. Similar change is needed for all the nested struct. This applies only for the
+ * nested struct, outermost struct is fine.
+ */
+
+#define MIB_t31xxPackage MIB_STRUCT (MTBL_t31xx, 0, sizeof(T31xx))
+#define MIB_t3101 MIB_ITEM (MTBL_t31xx, LEAF_t3101)
+#define MIB_t3103 MIB_ITEM (MTBL_t31xx, LEAF_t3103)
+#define MIB_t3105 MIB_ITEM (MTBL_t31xx, LEAF_t3105)
+#define MIB_t3107 MIB_ITEM (MTBL_t31xx, LEAF_t3107)
+#define MIB_t3109 MIB_ITEM (MTBL_t31xx, LEAF_t3109)
+#define MIB_t3111 MIB_ITEM (MTBL_t31xx, LEAF_t3111)
+#define MIB_t3113 MIB_ITEM (MTBL_t31xx, LEAF_t3113)
+#define MIB_adjacentCellPackage MIB_STRUCT (MTBL_adjacentCellPackage, LEAF_adjacentCellPackage, sizeof(AdjacentCellPackage))
+#define MIB_adjCell_handoverTable MIB_TABLE (MTBL_adjacentCellPackage, LEAF_adjCell_handoverTable)
+#define MIBT_adjCell_handoverEntry MIB_TENTRY (MTBL_adjacentCellPackage, LEAF_adjCell_handoverTable, sizeof(AdjCell_HandoverEntry))
+#define MIBT_adjCell_handoverIndex MIB_TITEM (MTBL_adjacentCellPackage, LEAF_adjCell_handoverTable, LEAF_adjCell_handoverIndex)
+#define MIBT_adjCell_handoverCellID MIB_TITEM (MTBL_adjacentCellPackage, LEAF_adjCell_handoverTable, LEAF_adjCell_handoverCellID)
+#define MIBT_adjCell_mcc MIB_TITEM (MTBL_adjacentCellPackage, LEAF_adjCell_handoverTable, LEAF_adjCell_mcc)
+#define MIBT_adjCell_mnc MIB_TITEM (MTBL_adjacentCellPackage, LEAF_adjCell_handoverTable, LEAF_adjCell_mnc)
+#define MIBT_adjCell_lac MIB_TITEM (MTBL_adjacentCellPackage, LEAF_adjCell_handoverTable, LEAF_adjCell_lac)
+#define MIBT_adjCell_ci MIB_TITEM (MTBL_adjacentCellPackage, LEAF_adjCell_handoverTable, LEAF_adjCell_ci)
+#define MIBT_adjCell_bCCHFrequency MIB_TITEM (MTBL_adjacentCellPackage, LEAF_adjCell_handoverTable, LEAF_adjCell_bCCHFrequency)
+#define MIBT_adjCell_ncc MIB_TITEM (MTBL_adjacentCellPackage, LEAF_adjCell_handoverTable, LEAF_adjCell_ncc)
+#define MIBT_adjCell_cid MIB_TITEM (MTBL_adjacentCellPackage, LEAF_adjCell_handoverTable, LEAF_adjCell_cid)
+#define MIBT_adjCell_synchronized MIB_TITEM (MTBL_adjacentCellPackage, LEAF_adjCell_handoverTable, LEAF_adjCell_synchronized)
+#define MIBT_adjCell_hoPriorityLevel MIB_TITEM (MTBL_adjacentCellPackage, LEAF_adjCell_handoverTable, LEAF_adjCell_hoPriorityLevel)
+#define MIBT_adjCell_hoMargin MIB_TITEM (MTBL_adjacentCellPackage, LEAF_adjCell_handoverTable, LEAF_adjCell_hoMargin)
+#define MIBT_adjCell_msTxPwrMaxCell MIB_TITEM (MTBL_adjacentCellPackage, LEAF_adjCell_handoverTable, LEAF_adjCell_msTxPwrMaxCell)
+#define MIBT_adjCell_rxLevMinCell MIB_TITEM (MTBL_adjacentCellPackage, LEAF_adjCell_handoverTable, LEAF_adjCell_rxLevMinCell)
+#define MIBT_adjCell_isExternal MIB_TITEM (MTBL_adjacentCellPackage, LEAF_adjCell_handoverTable, LEAF_adjCell_isExternal)
+#define MIB_adjCell_reselectionTable MIB_TABLE (MTBL_adjacentCellPackage, LEAF_adjCell_reselectionTable)
+#define MIBT_adjCell_reselectionEntry MIB_TENTRY (MTBL_adjacentCellPackage, LEAF_adjCell_reselectionTable, sizeof(AdjCell_ReselectionEntry))
+#define MIBT_adjCell_reselectionIndex MIB_TITEM (MTBL_adjacentCellPackage, LEAF_adjCell_reselectionTable, LEAF_adjCell_reselectionIndex)
+#define MIBT_adjCell_reselectionCellID MIB_TITEM (MTBL_adjacentCellPackage, LEAF_adjCell_reselectionTable, LEAF_adjCell_reselectionCellID)
+#define MIBT_adjCell_reselectionBCCHFrequency MIB_TITEM (MTBL_adjacentCellPackage, LEAF_adjCell_reselectionTable, LEAF_adjCell_reselectionBCCHFrequency)
+#define MIB_frequencyHoppingPackage MIB_STRUCT (MTBL_frequencyHoppingPackage, LEAF_frequencyHoppingPackage, sizeof(FrequencyHoppingPackage))
+#define MIB_frequencyHoppingSystemID MIB_ITEM (MTBL_frequencyHoppingPackage, LEAF_frequencyHoppingSystemID)
+#define MIB_hoppingSequenceNumber MIB_ITEM (MTBL_frequencyHoppingPackage, LEAF_hoppingSequenceNumber)
+#define MIB_mobileAllocationTable MIB_TABLE (MTBL_frequencyHoppingPackage, LEAF_mobileAllocationTable)
+#define MIBT_mobileAllocationEntry MIB_TENTRY (MTBL_frequencyHoppingPackage, LEAF_mobileAllocationTable, sizeof(MobileAllocationEntry))
+#define MIBT_mobileAllocationIndex MIB_TITEM (MTBL_frequencyHoppingPackage, LEAF_mobileAllocationTable, LEAF_mobileAllocationIndex)
+#define MIBT_mobileAllocation MIB_TITEM (MTBL_frequencyHoppingPackage, LEAF_mobileAllocationTable, LEAF_mobileAllocation)
+#define MIB_handoverControlPackage MIB_STRUCT (MTBL_handoverControlPackage, LEAF_handoverControlPackage, sizeof(HandoverControlPackage))
+#define MIB_handoverControlID MIB_ITEM (MTBL_handoverControlPackage, LEAF_handoverControlID)
+#define MIB_enableOptHandoverProcessing MIB_ITEM (MTBL_handoverControlPackage, LEAF_enableOptHandoverProcessing)
+#define MIB_hoAveragingAdjCellParam MIB_STRUCT (MTBL_handoverControlPackage, LEAF_hoAveragingAdjCellParam, sizeof(HoAveragingAdjCellParam))
+#define MIB_hoAveragingAdjCellPackage MIB_STRUCT (MTBL_hoAveragingAdjCellParam, 0, sizeof(HoAveragingAdjCellParam)) /* added on Aug 9 */
+
+#define MIB_hoAveragingAdjCellParamHreqave MIB_ITEM (MTBL_hoAveragingAdjCellParam, LEAF_hoAveragingAdjCellParamHreqave)
+#define MIB_hoAveragingAdjCellParamHreqt MIB_ITEM (MTBL_hoAveragingAdjCellParam, LEAF_hoAveragingAdjCellParamHreqt)
+#define MIB_hoAveragingAdjCellParamWeighting MIB_ITEM (MTBL_hoAveragingAdjCellParam, LEAF_hoAveragingAdjCellParamWeighting)
+#define MIB_hoAveragingDistParam MIB_STRUCT (MTBL_handoverControlPackage, LEAF_hoAveragingDistParam, sizeof(HoAveragingDistParam))
+#define MIB_hoAveragingDistPackage MIB_STRUCT (MTBL_hoAveragingDistParam, 0, sizeof(HoAveragingDistParam)) /* added on Aug 9 */
+
+#define MIB_hoAveragingDistParamHreqave MIB_ITEM (MTBL_hoAveragingDistParam, LEAF_hoAveragingDistParamHreqave)
+#define MIB_hoAveragingDistParamHreqt MIB_ITEM (MTBL_hoAveragingDistParam, LEAF_hoAveragingDistParamHreqt)
+#define MIB_hoAveragingLevParam MIB_STRUCT (MTBL_handoverControlPackage, LEAF_hoAveragingLevParam, sizeof(HoAveragingLevParam))
+#define MIB_hoAveragingLevPackage MIB_STRUCT (MTBL_hoAveragingLevParam, 0, sizeof(HoAveragingLevParam)) /* added on Aug 9 */
+
+#define MIB_hoAveragingLevParamHreqave MIB_ITEM (MTBL_hoAveragingLevParam, LEAF_hoAveragingLevParamHreqave)
+#define MIB_hoAveragingLevParamHreqt MIB_ITEM (MTBL_hoAveragingLevParam, LEAF_hoAveragingLevParamHreqt)
+#define MIB_hoAveragingLevParamWeighting MIB_ITEM (MTBL_hoAveragingLevParam, LEAF_hoAveragingLevParamWeighting)
+#define MIB_hoAveragingQualParam MIB_STRUCT (MTBL_handoverControlPackage, LEAF_hoAveragingQualParam, sizeof(HoAveragingQualParam))
+#define MIB_hoAveragingQualPackage MIB_STRUCT (MTBL_hoAveragingQualParam, 0, sizeof(HoAveragingQualParam)) /* added on Aug 9 */
+
+#define MIB_hoAveragingQualParamHreqave MIB_ITEM (MTBL_hoAveragingQualParam, LEAF_hoAveragingQualParamHreqave)
+#define MIB_hoAveragingQualParamHreqt MIB_ITEM (MTBL_hoAveragingQualParam, LEAF_hoAveragingQualParamHreqt)
+#define MIB_hoAveragingQualParamWeighting MIB_ITEM (MTBL_hoAveragingQualParam, LEAF_hoAveragingQualParamWeighting)
+#define MIB_hoMarginDef MIB_ITEM (MTBL_handoverControlPackage, LEAF_hoMarginDef)
+#define MIB_hoThresholdDistParam MIB_STRUCT (MTBL_handoverControlPackage, LEAF_hoThresholdDistParam, sizeof(HoThresholdDistParam))
+#define MIB_hoThresholdDistPackage MIB_STRUCT (MTBL_hoThresholdDistParam, 0, sizeof(HoThresholdDistParam)) /* added on Aug 9 */
+
+#define MIB_hoThresholdDistParamTimeadv MIB_ITEM (MTBL_hoThresholdDistParam, LEAF_hoThresholdDistParamTimeadv)
+#define MIB_hoThresholdDistParamP8 MIB_ITEM (MTBL_hoThresholdDistParam, LEAF_hoThresholdDistParamP8)
+#define MIB_hoThresholdDistParamN8 MIB_ITEM (MTBL_hoThresholdDistParam, LEAF_hoThresholdDistParamN8)
+#define MIB_hoThresholdInterfaceParam MIB_STRUCT (MTBL_handoverControlPackage, LEAF_hoThresholdInterfaceParam, sizeof(HoThresholdInterfaceParam))
+#define MIB_hoThresholdInterfacePackage MIB_STRUCT (MTBL_hoThresholdInterfaceParam, 0, sizeof(HoThresholdInterfaceParam)) /* added on Aug 9 */
+
+#define MIB_hoThresholdInterfaceParamRxLevelUL MIB_ITEM (MTBL_hoThresholdInterfaceParam, LEAF_hoThresholdInterfaceParamRxLevelUL)
+#define MIB_hoThresholdInterfaceParamRxLevelDL MIB_ITEM (MTBL_hoThresholdInterfaceParam, LEAF_hoThresholdInterfaceParamRxLevelDL)
+#define MIB_hoThresholdInterfaceParamPx MIB_ITEM (MTBL_hoThresholdInterfaceParam, LEAF_hoThresholdInterfaceParamPx)
+#define MIB_hoThresholdInterfaceParamNx MIB_ITEM (MTBL_hoThresholdInterfaceParam, LEAF_hoThresholdInterfaceParamNx)
+#define MIB_hoThresholdLevParam MIB_STRUCT (MTBL_handoverControlPackage, LEAF_hoThresholdLevParam, sizeof(HoThresholdLevParam))
+#define MIB_hoThresholdLevPackage MIB_STRUCT (MTBL_hoThresholdLevParam, 0, sizeof(HoThresholdLevParam)) /* added on Aug 9 */
+
+#define MIB_hoThresholdLevParamRxLevelUL MIB_ITEM (MTBL_hoThresholdLevParam, LEAF_hoThresholdLevParamRxLevelUL)
+#define MIB_hoThresholdLevParamRxLevelDL MIB_ITEM (MTBL_hoThresholdLevParam, LEAF_hoThresholdLevParamRxLevelDL)
+#define MIB_hoThresholdLevParamPx MIB_ITEM (MTBL_hoThresholdLevParam, LEAF_hoThresholdLevParamPx)
+#define MIB_hoThresholdLevParamNx MIB_ITEM (MTBL_hoThresholdLevParam, LEAF_hoThresholdLevParamNx)
+#define MIB_hoThresholdQualParam MIB_STRUCT (MTBL_handoverControlPackage, LEAF_hoThresholdQualParam, sizeof(HoThresholdQualParam))
+#define MIB_hoThresholdQualPackage MIB_STRUCT (MTBL_hoThresholdQualParam, 0, sizeof(HoThresholdQualParam)) /* added on Aug 9 */
+
+#define MIB_hoThresholdQualParamRxQualUL MIB_ITEM (MTBL_hoThresholdQualParam, LEAF_hoThresholdQualParamRxQualUL)
+#define MIB_hoThresholdQualParamRxQualDL MIB_ITEM (MTBL_hoThresholdQualParam, LEAF_hoThresholdQualParamRxQualDL)
+#define MIB_hoThresholdQualParamPx MIB_ITEM (MTBL_hoThresholdQualParam, LEAF_hoThresholdQualParamPx)
+#define MIB_hoThresholdQualParamNx MIB_ITEM (MTBL_hoThresholdQualParam, LEAF_hoThresholdQualParamNx)
+#define MIB_interferenceAveragingParam MIB_STRUCT (MTBL_handoverControlPackage, LEAF_interferenceAveragingParam, sizeof(InterferenceAveragingParam))
+#define MIB_interferenceAveragingPackage MIB_STRUCT (MTBL_interferenceAveragingParam, 0, sizeof(InterferenceAveragingParam)) /* added on Aug 9 */
+
+#define MIB_interferenceAveragingParamAveragingPeriod MIB_ITEM (MTBL_interferenceAveragingParam, LEAF_interferenceAveragingParamAveragingPeriod)
+#define MIB_interferenceAveragingParamThresholdBoundary0 MIB_ITEM (MTBL_interferenceAveragingParam, LEAF_interferenceAveragingParamThresholdBoundary0)
+#define MIB_interferenceAveragingParamThresholdBoundary1 MIB_ITEM (MTBL_interferenceAveragingParam, LEAF_interferenceAveragingParamThresholdBoundary1)
+#define MIB_interferenceAveragingParamThresholdBoundary2 MIB_ITEM (MTBL_interferenceAveragingParam, LEAF_interferenceAveragingParamThresholdBoundary2)
+#define MIB_interferenceAveragingParamThresholdBoundary3 MIB_ITEM (MTBL_interferenceAveragingParam, LEAF_interferenceAveragingParamThresholdBoundary3)
+#define MIB_interferenceAveragingParamThresholdBoundary4 MIB_ITEM (MTBL_interferenceAveragingParam, LEAF_interferenceAveragingParamThresholdBoundary4)
+#define MIB_interferenceAveragingParamThresholdBoundary5 MIB_ITEM (MTBL_interferenceAveragingParam, LEAF_interferenceAveragingParamThresholdBoundary5)
+#define MIB_msTxPwrMaxCellDef MIB_ITEM (MTBL_handoverControlPackage, LEAF_msTxPwrMaxCellDef)
+#define MIB_rxLevMinCellDef MIB_ITEM (MTBL_handoverControlPackage, LEAF_rxLevMinCellDef)
+#define MIB_powerControlPackage MIB_STRUCT (MTBL_powerControlPackage, LEAF_powerControlPackage, sizeof(PowerControlPackage))
+#define MIB_pcAveragingLev MIB_STRUCT (MTBL_powerControlPackage, LEAF_pcAveragingLev, sizeof(PcAveragingLev))
+#define MIB_pcAveragingLevPackage MIB_STRUCT (MTBL_pcAveragingLev, 0, sizeof(PcAveragingLev)) /* added on Aug 9 */
+
+#define MIB_pcAveragingLevHreqave MIB_ITEM (MTBL_pcAveragingLev, LEAF_pcAveragingLevHreqave)
+#define MIB_pcAveragingLevHreqt MIB_ITEM (MTBL_pcAveragingLev, LEAF_pcAveragingLevHreqt)
+#define MIB_pcAveragingLevWeighting MIB_ITEM (MTBL_pcAveragingLev, LEAF_pcAveragingLevWeighting)
+#define MIB_pcAveragingQual MIB_STRUCT (MTBL_powerControlPackage, LEAF_pcAveragingQual, sizeof(PcAveragingQual))
+#define MIB_pcAveragingQualPackage MIB_STRUCT (MTBL_pcAveragingQual, 0, sizeof(PcAveragingQual)) /* added on Aug 9 */
+
+#define MIB_pcAveragingQualHreqave MIB_ITEM (MTBL_pcAveragingQual, LEAF_pcAveragingQualHreqave)
+#define MIB_pcAveragingQualHreqt MIB_ITEM (MTBL_pcAveragingQual, LEAF_pcAveragingQualHreqt)
+#define MIB_pcAveragingQualWeighting MIB_ITEM (MTBL_pcAveragingQual, LEAF_pcAveragingQualWeighting)
+#define MIB_pcLowerThresholdLevParam MIB_STRUCT (MTBL_powerControlPackage, LEAF_pcLowerThresholdLevParam, sizeof(PcLowerThresholdLevParam))
+#define MIB_pcLowerThresholdLevPackage MIB_STRUCT (MTBL_pcLowerThresholdLevParam, 0, sizeof(PcLowerThresholdLevParam)) /* added on Aug 9 */
+
+#define MIB_pcLowerThresholdLevParamRxLevelUL MIB_ITEM (MTBL_pcLowerThresholdLevParam, LEAF_pcLowerThresholdLevParamRxLevelUL)
+#define MIB_pcLowerThresholdLevParamRxLevelDL MIB_ITEM (MTBL_pcLowerThresholdLevParam, LEAF_pcLowerThresholdLevParamRxLevelDL)
+#define MIB_pcLowerThresholdLevParamPx MIB_ITEM (MTBL_pcLowerThresholdLevParam, LEAF_pcLowerThresholdLevParamPx)
+#define MIB_pcLowerThresholdLevParamNx MIB_ITEM (MTBL_pcLowerThresholdLevParam, LEAF_pcLowerThresholdLevParamNx)
+#define MIB_pcLowerThresholdQualParam MIB_STRUCT (MTBL_powerControlPackage, LEAF_pcLowerThresholdQualParam, sizeof(PcLowerThresholdQualParam))
+#define MIB_pcLowerThresholdQualPackage MIB_STRUCT (MTBL_pcLowerThresholdQualParam, 0, sizeof(PcLowerThresholdQualParam)) /* added on Aug 9 */
+
+#define MIB_pcLowerThresholdQualParamRxQualUL MIB_ITEM (MTBL_pcLowerThresholdQualParam, LEAF_pcLowerThresholdQualParamRxQualUL)
+#define MIB_pcLowerThresholdQualParamRxQualDL MIB_ITEM (MTBL_pcLowerThresholdQualParam, LEAF_pcLowerThresholdQualParamRxQualDL)
+#define MIB_pcLowerThresholdQualParamPx MIB_ITEM (MTBL_pcLowerThresholdQualParam, LEAF_pcLowerThresholdQualParamPx)
+#define MIB_pcLowerThresholdQualParamNx MIB_ITEM (MTBL_pcLowerThresholdQualParam, LEAF_pcLowerThresholdQualParamNx)
+#define MIB_pcUpperThresholdLevParam MIB_STRUCT (MTBL_powerControlPackage, LEAF_pcUpperThresholdLevParam, sizeof(PcUpperThresholdLevParam))
+#define MIB_pcUpperThresholdLevPackage MIB_STRUCT (MTBL_pcUpperThresholdLevParam, 0, sizeof(PcUpperThresholdLevParam)) /* added on Aug 9 */
+
+#define MIB_pcUpperThresholdLevParamRxLevelUL MIB_ITEM (MTBL_pcUpperThresholdLevParam, LEAF_pcUpperThresholdLevParamRxLevelUL)
+#define MIB_pcUpperThresholdLevParamRxLevelDL MIB_ITEM (MTBL_pcUpperThresholdLevParam, LEAF_pcUpperThresholdLevParamRxLevelDL)
+#define MIB_pcUpperThresholdLevParamPx MIB_ITEM (MTBL_pcUpperThresholdLevParam, LEAF_pcUpperThresholdLevParamPx)
+#define MIB_pcUpperThresholdLevParamNx MIB_ITEM (MTBL_pcUpperThresholdLevParam, LEAF_pcUpperThresholdLevParamNx)
+#define MIB_pcUpperThresholdQualParam MIB_STRUCT (MTBL_powerControlPackage, LEAF_pcUpperThresholdQualParam, sizeof(PcUpperThresholdQualParam))
+#define MIB_pcUpperThresholdQualPackage MIB_STRUCT (MTBL_pcUpperThresholdQualParam, 0, sizeof(PcUpperThresholdQualParam)) /* added on Aug 9 */
+
+#define MIB_pcUpperThresholdQualParamRxQualUL MIB_ITEM (MTBL_pcUpperThresholdQualParam, LEAF_pcUpperThresholdQualParamRxQualUL)
+#define MIB_pcUpperThresholdQualParamRxQualDL MIB_ITEM (MTBL_pcUpperThresholdQualParam, LEAF_pcUpperThresholdQualParamRxQualDL)
+#define MIB_pcUpperThresholdQualParamPx MIB_ITEM (MTBL_pcUpperThresholdQualParam, LEAF_pcUpperThresholdQualParamPx)
+#define MIB_pcUpperThresholdQualParamNx MIB_ITEM (MTBL_pcUpperThresholdQualParam, LEAF_pcUpperThresholdQualParamNx)
+#define MIB_powerControlInterval MIB_ITEM (MTBL_powerControlPackage, LEAF_powerControlInterval)
+#define MIB_powerIncrStepSize MIB_ITEM (MTBL_powerControlPackage, LEAF_powerIncrStepSize)
+#define MIB_powerRedStepSize MIB_ITEM (MTBL_powerControlPackage, LEAF_powerRedStepSize)
+#define MIB_cellMeasurmentPackage MIB_STRUCT (MTBL_cellMeasurmentPackage, LEAF_cellMeasurmentPackage, sizeof(CellMeasurmentPackage))
+#define MIB_meanPCHAGCHQueueLength MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_meanPCHAGCHQueueLength)
+#define MIB_attTransOfPagingMessagesThePCH MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_attTransOfPagingMessagesThePCH)
+#define MIB_unsuccTransOfPagingMessagesThePCH MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_unsuccTransOfPagingMessagesThePCH)
+#define MIB_attImmediateAssingProcs MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_attImmediateAssingProcs)
+#define MIB_succImmediateAssingProcs MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_succImmediateAssingProcs)
+#define MIB_attImmediateAssingProcsPerCauseTable MIB_TABLE (MTBL_cellMeasurmentPackage, LEAF_attImmediateAssingProcsPerCauseTable)
+#define MIBT_attImmediateAssingProcsPerCauseEntry MIB_TENTRY (MTBL_cellMeasurmentPackage, LEAF_attImmediateAssingProcsPerCauseTable, sizeof(AttImmediateAssingProcsPerCauseEntry))
+#define MIBT_attImmediateAssingProcsCause MIB_TITEM (MTBL_cellMeasurmentPackage, LEAF_attImmediateAssingProcsPerCauseTable, LEAF_attImmediateAssingProcsCause)
+#define MIBT_attImmediateAssingProcsValue MIB_TITEM (MTBL_cellMeasurmentPackage, LEAF_attImmediateAssingProcsPerCauseTable, LEAF_attImmediateAssingProcsValue)
+#define MIB_succImmediateAssingProcsPerCauseTable MIB_TABLE (MTBL_cellMeasurmentPackage, LEAF_succImmediateAssingProcsPerCauseTable)
+#define MIBT_succImmediateAssingProcsPerCauseEntry MIB_TENTRY (MTBL_cellMeasurmentPackage, LEAF_succImmediateAssingProcsPerCauseTable, sizeof(SuccImmediateAssingProcsPerCauseEntry))
+#define MIBT_succImmediateAssingProcsCause MIB_TITEM (MTBL_cellMeasurmentPackage, LEAF_succImmediateAssingProcsPerCauseTable, LEAF_succImmediateAssingProcsCause)
+#define MIBT_succImmediateAssingProcsValue MIB_TITEM (MTBL_cellMeasurmentPackage, LEAF_succImmediateAssingProcsPerCauseTable, LEAF_succImmediateAssingProcsValue)
+#define MIB_nbrOfPagesDiscardedFromPCHQueue MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_nbrOfPagesDiscardedFromPCHQueue)
+#define MIB_meanDurationOfSuccPagingProcs MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_meanDurationOfSuccPagingProcs)
+#define MIB_nbrOfAvailableTCHs MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_nbrOfAvailableTCHs)
+#define MIB_meanNbrOfBusyTCHs MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_meanNbrOfBusyTCHs)
+#define MIB_maxNbrOfBusyTCHs MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_maxNbrOfBusyTCHs)
+#define MIB_meanNbrOfIdleTCHsPerInterferenceBand MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_meanNbrOfIdleTCHsPerInterferenceBand)
+#define MIB_attTCHSeizures MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_attTCHSeizures)
+#define MIB_succTCHSeizures MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_succTCHSeizures)
+#define MIB_attTCHSeizuresMeetingTCHBlockedState MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_attTCHSeizuresMeetingTCHBlockedState)
+#define MIB_allAvailableTCHAllocatedTime MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_allAvailableTCHAllocatedTime)
+#define MIB_meanTCHBusyTime MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_meanTCHBusyTime)
+#define MIB_meanTCHQueueLength MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_meanTCHQueueLength)
+#define MIB_nbrOfLostRadioLinksTCH MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_nbrOfLostRadioLinksTCH)
+#define MIB_nbrOfAvailableSDCCHs MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_nbrOfAvailableSDCCHs)
+#define MIB_meanNbrOfBusySDCCHs MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_meanNbrOfBusySDCCHs)
+#define MIB_maxNbrOfBusySDCCHs MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_maxNbrOfBusySDCCHs)
+#define MIB_attSDCCHSeizuresMeetingSDCCHBlockedState MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_attSDCCHSeizuresMeetingSDCCHBlockedState)
+#define MIB_allAvailableSDCCHAllocatedTime MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_allAvailableSDCCHAllocatedTime)
+#define MIB_meanSDCCHQueueLength MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_meanSDCCHQueueLength)
+#define MIB_nbrOfLostRadioLinksSDCCH MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_nbrOfLostRadioLinksSDCCH)
+#define MIB_relativeTimeDLPowerControlAtMax MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_relativeTimeDLPowerControlAtMax)
+#define MIB_relativeTimeULPowerControlAtMax MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_relativeTimeULPowerControlAtMax)
+#define MIB_succInternalHDOsIntraCell MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_succInternalHDOsIntraCell)
+#define MIB_unsuccInternalHDOsIntraCell MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_unsuccInternalHDOsIntraCell)
+#if THESE_ARE_NOT_USED_IN_VIPERCELL
+#define MIB_attIncomingInternalInterCellHDOs MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_attIncomingInternalInterCellHDOs)
+#define MIB_succIncomingInternalInterCellHDOs MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_succIncomingInternalInterCellHDOs)
+#define MIB_attOutgoingInternalInterCellHDOs MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_attOutgoingInternalInterCellHDOs)
+#define MIB_succOutgoingInternalInterCellHDOs MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_succOutgoingInternalInterCellHDOs)
+#define MIB_unsuccHDOsWithReconnection MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_unsuccHDOsWithReconnection)
+#define MIB_unsuccHDOsWithLossOfConnection MIB_ITEM (MTBL_cellMeasurmentPackage, LEAF_unsuccHDOsWithLossOfConnection)
+#endif
+#define MIB_callControlMeasurmentPackage MIB_STRUCT (MTBL_callControlMeasurmentPackage, LEAF_callControlMeasurmentPackage, sizeof(CallControlMeasurmentPackage))
+#define MIB_nbrOfClassMarkUpdates MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_nbrOfClassMarkUpdates)
+#define MIB_attMobileOriginatingCalls MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_attMobileOriginatingCalls)
+#define MIB_succMobileOriginatingCalls MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_succMobileOriginatingCalls)
+#define MIB_ansMobileOriginatingCalls MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_ansMobileOriginatingCalls)
+#define MIB_attMobileTerminatingCalls MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_attMobileTerminatingCalls)
+#define MIB_succMobileTerminatingCalls MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_succMobileTerminatingCalls)
+#define MIB_ansMobileTerminatingCalls MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_ansMobileTerminatingCalls)
+#define MIB_attMobileEmergencyCalls MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_attMobileEmergencyCalls)
+#define MIB_succMobileEmergencyCalls MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_succMobileEmergencyCalls)
+#define MIB_ansMobileEmergencyCalls MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_ansMobileEmergencyCalls)
+#define MIB_attCipheringModeControlProcs MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_attCipheringModeControlProcs)
+#define MIB_succCipheringModeControlProcs MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_succCipheringModeControlProcs)
+#define MIB_attInterrogationOfHLRsForRouting MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_attInterrogationOfHLRsForRouting)
+#define MIB_succInterrogationOfHLRsMSRNObtained MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_succInterrogationOfHLRsMSRNObtained)
+#define MIB_succInterrogationOfHLRsCallForwarding MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_succInterrogationOfHLRsCallForwarding)
+#define MIB_attOpForMobileOriginatingPointToPointSMs MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_attOpForMobileOriginatingPointToPointSMs)
+#define MIB_succOpForMobileOriginatingPointToPointSMs MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_succOpForMobileOriginatingPointToPointSMs)
+#define MIB_attOpForMobileTerminatingPointToPointSMs MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_attOpForMobileTerminatingPointToPointSMs)
+#define MIB_succOpForMobileTerminatingPointToPointSMs MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_succOpForMobileTerminatingPointToPointSMs)
+#define MIB_meanTimeToCallSetupService MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_meanTimeToCallSetupService)
+#define MIB_meanTimeToLocationUpdateService MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_meanTimeToLocationUpdateService)
+#define MIB_transSubIdentifiedWithIMSI MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_transSubIdentifiedWithIMSI)
+#define MIB_imsiDetachProcs MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_imsiDetachProcs)
+#define MIB_imsiAttachProcs MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_imsiAttachProcs)
+#define MIB_attIncomingInterMSCHDOs MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_attIncomingInterMSCHDOs)
+#define MIB_succIncomingInterMSCHDOs MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_succIncomingInterMSCHDOs)
+#define MIB_attOutgoingInterMSCHDOs MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_attOutgoingInterMSCHDOs)
+#define MIB_succOutgoingInterMSCHDOs MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_succOutgoingInterMSCHDOs)
+#define MIB_externalHDOsPerCauseTable MIB_TABLE (MTBL_callControlMeasurmentPackage, LEAF_externalHDOsPerCauseTable)
+#define MIBT_externalHDOsPerCauseEntry MIB_TENTRY (MTBL_callControlMeasurmentPackage, LEAF_externalHDOsPerCauseTable, sizeof(ExternalHDOsPerCauseEntry))
+#define MIBT_externalHDOsPerCauseCode MIB_TITEM (MTBL_callControlMeasurmentPackage, LEAF_externalHDOsPerCauseTable, LEAF_externalHDOsPerCauseCode)
+#define MIBT_externalHDOsPerCauseValue MIB_TITEM (MTBL_callControlMeasurmentPackage, LEAF_externalHDOsPerCauseTable, LEAF_externalHDOsPerCauseValue)
+#define MIB_unsuccExternHDOsWithReconnectionPerMSC MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_unsuccExternHDOsWithReconnectionPerMSC)
+#define MIB_unsuccExternHDOsWithLossOfConnectionPerMSC MIB_ITEM (MTBL_callControlMeasurmentPackage, LEAF_unsuccExternHDOsWithLossOfConnectionPerMSC)
+#define MIB_callConfigData MIB_STRUCT (MTBL_callConfigData, LEAF_callConfigData, sizeof(CallConfigData))
+#define MIB_cc_max_L3_msgs MIB_ITEM (MTBL_callConfigData, LEAF_cc_max_L3_msgs)
+#define MIB_cc_l3_msg_q_priority MIB_ITEM (MTBL_callConfigData, LEAF_cc_l3_msg_q_priority)
+#define MIB_cc_task_priority MIB_ITEM (MTBL_callConfigData, LEAF_cc_task_priority)
+#define MIB_cc_task_stack_size MIB_ITEM (MTBL_callConfigData, LEAF_cc_task_stack_size)
+#define MIB_cc_mm_conn_est_T999 MIB_ITEM (MTBL_callConfigData, LEAF_cc_mm_conn_est_T999)
+#define MIB_cc_alerting_T301 MIB_ITEM (MTBL_callConfigData, LEAF_cc_alerting_T301)
+#define MIB_cc_setup_T303 MIB_ITEM (MTBL_callConfigData, LEAF_cc_setup_T303)
+#define MIB_cc_call_confirmed_T310 MIB_ITEM (MTBL_callConfigData, LEAF_cc_call_confirmed_T310)
+#define MIB_cc_connect_T313 MIB_ITEM (MTBL_callConfigData, LEAF_cc_connect_T313)
+#define MIB_cc_disconnect_T305 MIB_ITEM (MTBL_callConfigData, LEAF_cc_disconnect_T305)
+#define MIB_cc_release_T308 MIB_ITEM (MTBL_callConfigData, LEAF_cc_release_T308)
+#define MIB_cc_safety_timer MIB_ITEM (MTBL_callConfigData, LEAF_cc_safety_timer)
+#define MIB_cc_max_calls MIB_ITEM (MTBL_callConfigData, LEAF_cc_max_calls)
+#define MIB_mobilityConfigData MIB_STRUCT (MTBL_mobilityConfigData, LEAF_mobilityConfigData, sizeof(MobilityConfigData))
+#define MIB_mm_max_mm_connections MIB_ITEM (MTBL_mobilityConfigData, LEAF_mm_max_mm_connections)
+#define MIB_mm_max_L3_msgs MIB_ITEM (MTBL_mobilityConfigData, LEAF_mm_max_L3_msgs)
+#define MIB_task_priority MIB_ITEM (MTBL_mobilityConfigData, LEAF_task_priority)
+#define MIB_task_stack_size MIB_ITEM (MTBL_mobilityConfigData, LEAF_task_stack_size)
+#define MIB_mm_paging_t3113 MIB_ITEM (MTBL_mobilityConfigData, LEAF_mm_paging_t3113)
+#define MIB_mm_authenticationRequired MIB_ITEM (MTBL_mobilityConfigData, LEAF_mm_authenticationRequired)
+#define MIB_mm_cipheringRequired MIB_ITEM (MTBL_mobilityConfigData, LEAF_mm_cipheringRequired)
+#define MIB_mm_IMEICheckRequired MIB_ITEM (MTBL_mobilityConfigData, LEAF_mm_IMEICheckRequired)
+#define MIB_resourceConfigData MIB_STRUCT (MTBL_resourceConfigData, LEAF_resourceConfigData, sizeof(ResourceConfigData))
+#define MIB_rm_t3L01 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_t3L01)
+#define MIB_rm_bsCcChans MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_bsCcChans)
+#define MIB_rm_bsCcchSdcchComb MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_bsCcchSdcchComb)
+#define MIB_rm_sysInfoOnOffMap MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_sysInfoOnOffMap)
+#define MIB_rm_airInterface MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_airInterface)
+#define MIB_rm_viperCellTsc MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_viperCellTsc)
+#define MIB_rm_maxSlotPerTrx MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_maxSlotPerTrx)
+#define MIB_rm_maxTrxs MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_maxTrxs)
+#define MIB_rm_maxTchfs MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_maxTchfs)
+#define MIB_rm_maxSdcch4s MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_maxSdcch4s)
+#define MIB_rm_trxOnOffMap MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_trxOnOffMap)
+#define MIB_rm_networkIfConfig MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_networkIfConfig)
+#define MIB_rm_bcchTrx MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_bcchTrx)
+#define MIB_rm_preAlphaTrx MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_preAlphaTrx)
+#define MIB_rm_ccchBcchComb MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_ccchBcchComb)
+#define MIB_rm_ccchConf MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_ccchConf)
+#define MIB_rm_nim_0_0 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_nim_0_0)
+#define MIB_rm_nim_0_1 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_nim_0_1)
+#define MIB_rm_nim_0_2 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_nim_0_2)
+#define MIB_rm_nim_0_3 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_nim_0_3)
+#define MIB_rm_nim_0_4 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_nim_0_4)
+#define MIB_rm_nim_0_5 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_nim_0_5)
+#define MIB_rm_nim_0_6 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_nim_0_6)
+#define MIB_rm_nim_0_7 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_nim_0_7)
+#define MIB_rm_nim_1_0 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_nim_1_0)
+#define MIB_rm_nim_1_1 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_nim_1_1)
+#define MIB_rm_nim_1_2 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_nim_1_2)
+#define MIB_rm_nim_1_3 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_nim_1_3)
+#define MIB_rm_nim_1_4 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_nim_1_4)
+#define MIB_rm_nim_1_5 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_nim_1_5)
+#define MIB_rm_nim_1_6 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_nim_1_6)
+#define MIB_rm_nim_1_7 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_nim_1_7)
+#define MIB_rm_trxSynthSetting_0_0 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_trxSynthSetting_0_0)
+#define MIB_rm_trxSynthSetting_0_1 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_trxSynthSetting_0_1)
+#define MIB_rm_trxSynthSetting_0_2 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_trxSynthSetting_0_2)
+#define MIB_rm_trxSynthSetting_0_3 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_trxSynthSetting_0_3)
+#define MIB_rm_trxSynthSetting_1_0 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_trxSynthSetting_1_0)
+#define MIB_rm_trxSynthSetting_1_1 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_trxSynthSetting_1_1)
+#define MIB_rm_trxSynthSetting_1_2 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_trxSynthSetting_1_2)
+#define MIB_rm_trxSynthSetting_1_3 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_trxSynthSetting_1_3)
+#define MIB_rm_trxFpgaDelay_0_0 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_trxFpgaDelay_0_0)
+#define MIB_rm_trxFpgaDelay_0_1 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_trxFpgaDelay_0_1)
+#define MIB_rm_trxFpgaDelay_1_0 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_trxFpgaDelay_1_0)
+#define MIB_rm_trxFpgaDelay_1_1 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_trxFpgaDelay_1_1)
+#define MIB_rm_SGainCtrlSetting_0_0 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_SGainCtrlSetting_0_0)
+#define MIB_rm_SGainCtrlSetting_0_1 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_SGainCtrlSetting_0_1)
+#define MIB_rm_SGainCtrlSetting_1_0 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_SGainCtrlSetting_1_0)
+#define MIB_rm_SGainCtrlSetting_1_1 MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_SGainCtrlSetting_1_1)
+#define MIB_rm_synchChanInfo MIB_ITEM (MTBL_resourceConfigData, LEAF_rm_synchChanInfo)
+
+#define MIB_oamConfigData MIB_STRUCT (MTBL_oamConfigData, LEAF_oamConfigData, sizeof(OamConfigData))
+#define MIB_oamCommand MIB_ITEM (MTBL_oamConfigData, LEAF_oamCommand)
+#define MIB_oamCommandExecutionStatus MIB_ITEM (MTBL_oamConfigData, LEAF_oamCommandExecutionStatus)
+#define MIB_oamAlternateMibFileName MIB_STRING (MTBL_oamConfigData, LEAF_oamAlternateMibFileName, SIZE_DisplayString)
+#define MIB_oamCommandLastError MIB_STRING (MTBL_oamConfigData, LEAF_oamCommandLastError, SIZE_DisplayString)
+#define MIB_mibAccessControlFlag MIB_ITEM (MTBL_oamConfigData, LEAF_mibAccessControlFlag)
+
+
+
+#define MIB_maintenanceConfigData MIB_STRUCT (MTBL_maintenanceConfigData, LEAF_maintenanceConfigData, sizeof(MaintenanceConfigData))
+#define MIB_maintenance_operation MIB_STRING (MTBL_maintenanceConfigData, LEAF_maintenance_operation, SIZE_DisplayString)
+#define MIB_maintenance_response MIB_STRING (MTBL_maintenanceConfigData, LEAF_maintenance_response, SIZE_DisplayString)
+
+/* For h323 tags */
+
+#define MIB_h323Data MIB_STRUCT (MTBL_h323Data, LEAF_h323Data, sizeof(H323Data))
+#define MIB_h323_GKPort MIB_ITEM (MTBL_h323Data, LEAF_h323_GKPort)
+#define MIB_h323_GKIPAddress MIB_IPADDR (MTBL_h323Data, LEAF_h323_GKIPAddress)
+#define MIB_h323_Q931ResponseTimeOut MIB_ITEM (MTBL_h323Data, LEAF_h323_Q931ResponseTimeOut)
+#define MIB_h323_Q931ConnectTimeOut MIB_ITEM (MTBL_h323Data, LEAF_h323_Q931ConnectTimeOut)
+#define MIB_h323_Q931CallSignalingPort MIB_ITEM (MTBL_h323Data, LEAF_h323_Q931CallSignalingPort)
+#define MIB_h323_t35CountryCode MIB_ITEM (MTBL_h323Data, LEAF_h323_t35CountryCode)
+#define MIB_h323_rasRequestTimeout MIB_ITEM (MTBL_h323Data, LEAF_h323_rasRequestTimeout)
+#define MIB_h323_viperbaseHeartbeatTimeout MIB_ITEM (MTBL_h323Data, LEAF_h323_viperbaseHeartbeatTimeout)
+
+/* ViperSpecific MIB items */
+
+#define MIB_dualTRXSCard MIB_STRUCT (MTBL_dualTRXSCard, LEAF_dualTRXSCard, sizeof(DualTRXSCard))
+#define MIB_monitorReceiverPLL_LockDetectStatus MIB_ITEM (MTBL_dualTRXSCard, LEAF_monitorReceiverPLL_LockDetectStatus)
+#define MIB_referenceFrequencyPLL_LockDetectStatus MIB_ITEM(MTBL_dualTRXSCard, LEAF_referenceFrequencyPLL_LockDetectStatus)
+#define MIB_transceiver_1_PLL_LockDetectStatus MIB_ITEM (MTBL_dualTRXSCard, LEAF_transceiver_1_PLL_LockDetectStatus)
+#define MIB_transceiver_2A_PLL_LockDetectStatus MIB_ITEM (MTBL_dualTRXSCard, LEAF_transceiver_2A_PLL_LockDetectStatus)
+#define MIB_transceiver_2B_PLL_LockDetectStatus MIB_ITEM (MTBL_dualTRXSCard, LEAF_transceiver_2B_PLL_LockDetectStatus)
+#define MIB_intermediateFrequency_LockDetectStatus MIB_ITEM (MTBL_dualTRXSCard, LEAF_intermediateFrequency_LockDetectStatus)
+#define MIB_trxSerialNumber MIB_STRING (MTBL_dualTRXSCard, LEAF_trxSerialNumber, SIZE_DisplayString)
+#define MIB_trxSoftwareVersion MIB_STRING (MTBL_dualTRXSCard, LEAF_trxSoftwareVersion, SIZE_DisplayString)
+#define MIB_trxLoopBackMode MIB_ITEM (MTBL_dualTRXSCard, LEAF_trxLoopBackMode)
+
+#define MIB_arfcnRssiFunction MIB_STRUCT (MTBL_arfcnRssiFunction, LEAF_arfcnRssiFunction, sizeof(ArfcnRssiFunction))
+#define MIB_arfcnRssiControlMode MIB_ITEM (MTBL_arfcnRssiFunction, LEAF_arfcnRssiControlMode)
+#define MIB_clockRecoveryControlMode MIB_ITEM (MTBL_arfcnRssiFunction, LEAF_clockRecoveryControlMode)
+#define MIB_arfcnRssiClockControlTable MIB_TABLE (MTBL_arfcnRssiFunction, LEAF_arfcnRssiClockControlTable)
+#define MIBT_arfcnRssiClockControlEntry MIB_TENTRY (MTBL_arfcnRssiFunction, LEAF_arfcnRssiClockControlTable, sizeof(ArfcnRssiClockControlEntry))
+#define MIBT_arfcnRssiClockControlIndex MIB_TITEM (MTBL_arfcnRssiFunction, LEAF_arfcnRssiClockControlTable, LEAF_arfcnRssiClockControlIndex)
+#define MIBT_arfcnRssiClockControlArfcn MIB_TITEM (MTBL_arfcnRssiFunction, LEAF_arfcnRssiClockControlTable, LEAF_arfcnRssiClockControlArfcn)
+#define MIBT_arfcnRssiClockRecoveryMode MIB_TITEM (MTBL_arfcnRssiFunction, LEAF_arfcnRssiClockControlTable, LEAF_arfcnRssiClockRecoveryMode)
+#define MIB_clockCard MIB_STRUCT (MTBL_clockCard, LEAF_clockCard, sizeof(ClockCard))
+#define MIB_clockCardType MIB_ITEM (MTBL_clockCard, LEAF_clockCardType)
+#define MIB_clockCardSoftwareVersion MIB_STRING (MTBL_clockCard, LEAF_clockCardSoftwareVersion, SIZE_DisplayString)
+#define MIB_clockCardStatus MIB_ITEM (MTBL_clockCard, LEAF_clockCardStatus)
+#define MIB_clockCardCrystalUpTime MIB_STRING (MTBL_clockCard, LEAF_clockCardCrystalUpTime, SIZE_DisplayString)
+#define MIB_clockCardDAC MIB_ITEM (MTBL_clockCard, LEAF_clockCardDAC)
+#define MIB_gpsCard MIB_STRUCT (MTBL_gpsCard, LEAF_gpsCard, sizeof(GpsCard))
+#define MIB_gpsCardType MIB_ITEM (MTBL_gpsCard, LEAF_gpsCardType)
+#define MIB_gpsCardSoftwareVersion MIB_STRING (MTBL_gpsCard, LEAF_gpsCardSoftwareVersion, SIZE_DisplayString)
+#define MIB_gpsCardStatus MIB_ITEM (MTBL_gpsCard, LEAF_gpsCardStatus)
+#define MIB_gpsPosition MIB_STRING (MTBL_gpsCard, LEAF_gpsPosition, SIZE_DisplayString)
+#define MIB_gpsTime MIB_STRING (MTBL_gpsCard, LEAF_gpsTime, SIZE_DisplayString)
+#define MIB_utcTime MIB_STRING (MTBL_gpsCard, LEAF_utcTime, SIZE_DisplayString)
+#define MIB_clockStatusFrequencyError MIB_ITEM (MTBL_gpsCard, LEAF_clockStatusFrequencyError)
+#define MIB_clockStatusDACVoltage MIB_ITEM (MTBL_gpsCard, LEAF_clockStatusDACVoltage)
+#define MIB_gpsAntennaStatus MIB_ITEM (MTBL_gpsCard, LEAF_gpsAntennaStatus)
+#define MIB_gpsSatelliteStatus MIB_ITEM (MTBL_gpsCard, LEAF_gpsSatelliteStatus)
+#define MIB_powerCard MIB_STRUCT (MTBL_powerCard, LEAF_powerCard, sizeof(PowerCard))
+#define MIB_powerCardType MIB_ITEM (MTBL_powerCard, LEAF_powerCardType)
+#define MIB_powerCardStatus MIB_ITEM (MTBL_powerCard, LEAF_powerCardStatus)
+#define MIB_powerOn MIB_ITEM (MTBL_powerCard, LEAF_powerOn)
+#define MIB_externalPowerSupply MIB_STRUCT (MTBL_externalPowerSupply, LEAF_externalPowerSupply, sizeof(ExternalPowerSupply))
+#define MIB_powerSupplyType MIB_ITEM (MTBL_externalPowerSupply, LEAF_powerSupplyType)
+#define MIB_powerSupplyStatus MIB_ITEM (MTBL_externalPowerSupply, LEAF_powerSupplyStatus)
+#define MIB_cdcBoard MIB_STRUCT (MTBL_cdcBoard, LEAF_cdcBoard, sizeof(CdcBoard))
+#define MIB_cdcBoardSerialNumber MIB_STRING (MTBL_cdcBoard, LEAF_cdcBoardSerialNumber, SIZE_DisplayString)
+#define MIB_cdcBoardMACAddress MIB_STRING (MTBL_cdcBoard, LEAF_cdcBoardMACAddress, SIZE_DisplayString)
+#define MIB_automaticParameterAllocation MIB_STRUCT (MTBL_automaticParameterAllocation, LEAF_automaticParameterAllocation, sizeof(AutomaticParameterAllocation))
+#define MIB_apaEnable MIB_ITEM (MTBL_automaticParameterAllocation, LEAF_apaEnable )
+#define MIB_apaScanFrequencyLowBound MIB_ITEM (MTBL_automaticParameterAllocation, LEAF_apaScanFrequencyLowBound )
+#define MIB_apaScanFrequencyHighBound MIB_ITEM (MTBL_automaticParameterAllocation, LEAF_apaScanFrequencyHighBound )
+#define MIB_apaMaxPowerSetting MIB_ITEM (MTBL_automaticParameterAllocation, LEAF_apaMaxPowerSetting)
+#define MIB_apaMinRSSIThresholdForNeighborId MIB_ITEM (MTBL_automaticParameterAllocation, LEAF_apaMinRSSIThresholdForNeighborId)
+#define MIB_apaScanRate MIB_ITEM (MTBL_automaticParameterAllocation, LEAF_apaScanRate)
+#define MIB_apaHysteresisForBCCHPower MIB_ITEM (MTBL_automaticParameterAllocation, LEAF_apaHysteresisForBCCHPower)
+#define MIB_apaInvalidFrequencyTable MIB_TABLE (MTBL_automaticParameterAllocation, LEAF_apaInvalidFrequencyTable)
+#define MIBT_apaInvalidFrequencyEntry MIB_TENTRY (MTBL_automaticParameterAllocation, LEAF_apaInvalidFrequencyTable, sizeof(ApaInvalidFrequencyEntry))
+#define MIBT_apaInvalidFrequencyIndex MIB_TITEM (MTBL_automaticParameterAllocation, LEAF_apaInvalidFrequencyTable, LEAF_apaInvalidFrequencyIndex)
+#define MIBT_apaInvalidFrequencyArfcn MIB_TITEM (MTBL_automaticParameterAllocation, LEAF_apaInvalidFrequencyTable, LEAF_apaInvalidFrequencyArfcn)
+#define MIB_apaClockSourceFrequencyTable MIB_TABLE (MTBL_automaticParameterAllocation, LEAF_apaClockSourceFrequencyTable)
+#define MIBT_apaClockSourceFrequencyEntry MIB_TENTRY (MTBL_automaticParameterAllocation, LEAF_apaClockSourceFrequencyTable, sizeof(ApaClockSourceFrequencyEntry))
+#define MIBT_apaClockSourceFrequencyIndex MIB_TITEM (MTBL_automaticParameterAllocation, LEAF_apaClockSourceFrequencyTable, LEAF_apaClockSourceFrequencyIndex)
+#define MIBT_apaClockSourceFrequencyArfcn MIB_TITEM (MTBL_automaticParameterAllocation, LEAF_apaClockSourceFrequencyTable, LEAF_apaClockSourceFrequencyArfcn)
+
+#define MIB_gp10MgmtInfoMib MIB_STRUCT (MTBL_gp10MgmtInfoMib, LEAF_gp10MgmtInfoMib, sizeof(Gp10MgmtInfoMib))
+#define MIB_viperCellName MIB_STRING (MTBL_gp10MgmtInfoMib, LEAF_viperCellName, SIZE_DisplayString)
+#define MIB_viperCellIPAddress MIB_IPADDR (MTBL_gp10MgmtInfoMib, LEAF_viperCellIPAddress)
+#define MIB_viperCellDefGateway MIB_IPADDR (MTBL_gp10MgmtInfoMib, LEAF_viperCellDefGateway)
+#define MIB_viperCellLocation MIB_STRING (MTBL_gp10MgmtInfoMib, LEAF_viperCellLocation, SIZE_DisplayString)
+#define MIB_viperCellSerialNumber MIB_STRING (MTBL_gp10MgmtInfoMib, LEAF_viperCellSerialNumber, SIZE_DisplayString)
+#define MIB_viperCellAssetNumber MIB_STRING (MTBL_gp10MgmtInfoMib, LEAF_viperCellAssetNumber, SIZE_DisplayString)
+#define MIB_viperCellSoftwareBuild MIB_STRING (MTBL_gp10MgmtInfoMib, LEAF_viperCellSoftwareBuild, SIZE_DisplayString)
+#define MIB_viperCellCustomerName MIB_STRING (MTBL_gp10MgmtInfoMib, LEAF_viperCellCustomerName, SIZE_DisplayString)
+#define MIB_viperCellCustomerAddress MIB_STRING (MTBL_gp10MgmtInfoMib, LEAF_viperCellCustomerAddress,SIZE_DisplayString)
+#define MIB_viperCellCustomerPhone MIB_STRING (MTBL_gp10MgmtInfoMib, LEAF_viperCellCustomerPhone, SIZE_DisplayString)
+#define MIB_viperCellCustomerEmail MIB_STRING (MTBL_gp10MgmtInfoMib, LEAF_viperCellCustomerEmail, SIZE_DisplayString)
+#define MIB_viperCellCustomerInfo MIB_STRING (MTBL_gp10MgmtInfoMib, LEAF_viperCellCustomerInfo, SIZE_DisplayString)
+
+#define MIB_viperAccessMib MIB_STRUCT (MTBL_viperAccessMib, LEAF_viperAccessMib, sizeof(ViperAccessMib))
+#define MIB_readCommunity MIB_STRING (MTBL_viperAccessMib, LEAF_readCommunity, SIZE_DisplayString)
+#define MIB_writeCommunity MIB_STRING (MTBL_viperAccessMib, LEAF_writeCommunity, SIZE_DisplayString)
+
+
+#define MIB_gp10ErrorInfoMib MIB_STRUCT (MTBL_gp10ErrorInfoMib, LEAF_gp10ErrorInfoMib, sizeof(Gp10ErrorInfoMib))
+#define MIB_errorCode_L1 MIB_ITEM (MTBL_gp10ErrorInfoMib, LEAF_errorCode_L1)
+#define MIB_errorCode_MD MIB_ITEM (MTBL_gp10ErrorInfoMib, LEAF_errorCode_MD)
+#define MIB_errorCode_RM MIB_ITEM (MTBL_gp10ErrorInfoMib, LEAF_errorCode_RM)
+#define MIB_errorCode_MM MIB_ITEM (MTBL_gp10ErrorInfoMib, LEAF_errorCode_MM)
+#define MIB_errorCode_CC MIB_ITEM (MTBL_gp10ErrorInfoMib, LEAF_errorCode_CC)
+#define MIB_errorCode_L2 MIB_ITEM (MTBL_gp10ErrorInfoMib, LEAF_errorCode_L2)
+#define MIB_errorCode_SMS MIB_ITEM (MTBL_gp10ErrorInfoMib, LEAF_errorCode_SMS)
+#define MIB_errorCode_OAM MIB_ITEM (MTBL_gp10ErrorInfoMib, LEAF_errorCode_OAM)
+#define MIB_errorCode_H323 MIB_ITEM (MTBL_gp10ErrorInfoMib, LEAF_errorCode_H323)
+#define MIB_errorCode_LUDB MIB_ITEM (MTBL_gp10ErrorInfoMib, LEAF_errorCode_LUDB)
+#define MIB_errorCode_EXT_LC MIB_ITEM (MTBL_gp10ErrorInfoMib, LEAF_errorCode_EXT_LC)
+#define MIB_errorCode_LOG MIB_ITEM (MTBL_gp10ErrorInfoMib, LEAF_errorCode_LOG)
+#define MIB_errorCode_MCH MIB_ITEM (MTBL_gp10ErrorInfoMib, LEAF_errorCode_MCH)
+#define MIB_errorCode_ALARM MIB_ITEM (MTBL_gp10ErrorInfoMib, LEAF_errorCode_ALARM)
+#define MIB_errorCode_SYSINIT MIB_ITEM (MTBL_gp10ErrorInfoMib, LEAF_errorCode_SYSINIT)
+
+#define MIB_gp10CdrMib MIB_STRUCT (MTBL_gp10CdrMib, LEAF_gp10CdrMib, sizeof(Gp10CdrMib))
+#define MIB_cdrClientSSLEnable MIB_ITEM (MTBL_gp10CdrMib, LEAF_cdrClientSSLEnable)
+#define MIB_cdrLongCallTimer MIB_ITEM (MTBL_gp10CdrMib, LEAF_cdrLongCallTimer)
+
+#define MIB_handoverTimerMib MIB_STRUCT(MTBL_handoverTimerMib, LEAF_handoverTimerMib, sizeof(HandoverTimerMib))
+#define MIB_t101 MIB_ITEM(MTBL_handoverTimerMib, LEAF_t101)
+#define MIB_t102 MIB_ITEM(MTBL_handoverTimerMib, LEAF_t102)
+#define MIB_t103 MIB_ITEM(MTBL_handoverTimerMib, LEAF_t103)
+#define MIB_t104 MIB_ITEM(MTBL_handoverTimerMib, LEAF_t104)
+#define MIB_t201 MIB_ITEM(MTBL_handoverTimerMib, LEAF_t201)
+#define MIB_t202 MIB_ITEM(MTBL_handoverTimerMib, LEAF_t202)
+#define MIB_t204 MIB_ITEM(MTBL_handoverTimerMib, LEAF_t204)
+#define MIB_t210 MIB_ITEM(MTBL_handoverTimerMib, LEAF_t210)
+#define MIB_t211 MIB_ITEM(MTBL_handoverTimerMib, LEAF_t211)
+
+#define MIB_gp10ServiceStatusMib MIB_STRUCT(MTBL_gp10ServiceStatusMib, LEAF_gp10ServiceStatusMib, sizeof(Gp10ServiceStatusMib))
+#define MIB_snmpServiceEnabled MIB_ITEM(MTBL_gp10ServiceStatusMib, LEAF_snmpServiceEnabled)
+#define MIB_httpServiceEnabled MIB_ITEM(MTBL_gp10ServiceStatusMib, LEAF_httpServiceEnabled)
+#define MIB_telnetServiceEnabled MIB_ITEM(MTBL_gp10ServiceStatusMib, LEAF_telnetServiceEnabled)
+#define MIB_sshServiceEnabled MIB_ITEM(MTBL_gp10ServiceStatusMib, LEAF_sshServiceEnabled)
+#define MIB_ftpServiceEnabled MIB_ITEM(MTBL_gp10ServiceStatusMib, LEAF_ftpServiceEnabled)
+
+/* New Defines for supporting GS */
+#define MIB_btsGsBasicPackage MIB_STRUCT (MTBL_btsGsBasicPackage, LEAF_btsGsBasicPackage, sizeof(BtsGsBasicPackage))
+#define MIB_gprsServerIpAddress MIB_IPADDR (MTBL_btsGsBasicPackage, LEAF_gprsServerIpAddress)
+#define MIB_gprsRac MIB_ITEM (MTBL_btsGsBasicPackage, LEAF_gprsRac)
+#define MIB_enableGprs MIB_ITEM (MTBL_btsGsBasicPackage, LEAF_enableGprs)
+#define MIB_gprsOperationalStatus MIB_ITEM (MTBL_btsGsBasicPackage, LEAF_gprsOperationalStatus)
+
+#define MIB_btsGsOptionPackage MIB_STRUCT (MTBL_btsGsOptionPackage, LEAF_btsGsOptionPackage, sizeof(BtsGsOptionPackage))
+#define MIB_nmo MIB_ITEM (MTBL_btsGsOptionPackage, LEAF_nmo)
+#define MIB_t3168 MIB_ITEM (MTBL_btsGsOptionPackage, LEAF_t3168)
+#define MIB_t3192 MIB_ITEM (MTBL_btsGsOptionPackage, LEAF_t3192)
+#define MIB_drxTimerMax MIB_ITEM (MTBL_btsGsOptionPackage, LEAF_drxTimerMax)
+#define MIB_accessBurstType MIB_ITEM (MTBL_btsGsOptionPackage, LEAF_accessBurstType)
+#define MIB_controlAckType MIB_ITEM (MTBL_btsGsOptionPackage, LEAF_controlAckType)
+#define MIB_bsCvMax MIB_ITEM (MTBL_btsGsOptionPackage, LEAF_bsCvMax)
+#define MIB_panDec MIB_ITEM (MTBL_btsGsOptionPackage, LEAF_panDec)
+#define MIB_panInc MIB_ITEM (MTBL_btsGsOptionPackage, LEAF_panInc)
+#define MIB_panMax MIB_ITEM (MTBL_btsGsOptionPackage, LEAF_panMax)
+#define MIB_raColour MIB_ITEM (MTBL_btsGsOptionPackage, LEAF_raColour)
+#define MIB_si13Position MIB_ITEM (MTBL_btsGsOptionPackage, LEAF_si13Position)
+#define MIB_cbchTrxSlot MIB_ITEM (MTBL_btsGsOptionPackage, LEAF_cbchTrxSlot)
+#define MIB_cbchTrx MIB_ITEM (MTBL_btsGsOptionPackage, LEAF_cbchTrx)
+#define MIB_bcchChangeMark MIB_ITEM (MTBL_btsGsOptionPackage, LEAF_bcchChangeMark)
+#define MIB_siChangeField MIB_ITEM (MTBL_btsGsOptionPackage, LEAF_siChangeField)
+
+#define MIB_rss MIB_STRUCT (MTBL_rss, LEAF_rss, sizeof(Rss))
+#define MIB_gprsMsTxpwrMaxCch MIB_ITEM (MTBL_rss, LEAF_gprsMsTxpwrMaxCch)
+#define MIB_gprsRexLevAccessMin MIB_ITEM (MTBL_rss, LEAF_gprsRexLevAccessMin)
+#define MIB_gprsReselectOffset MIB_ITEM (MTBL_rss, LEAF_gprsReselectOffset)
+#define MIB_priorityClass MIB_ITEM (MTBL_rss, LEAF_priorityClass)
+#define MIB_lsaId MIB_ITEM (MTBL_rss, LEAF_lsaId)
+#define MIB_hcsThreshold MIB_ITEM (MTBL_rss, LEAF_hcsThreshold)
+#define MIB_gprsTemporaryOffset MIB_ITEM (MTBL_rss, LEAF_gprsTemporaryOffset)
+#define MIB_gprsPenaltyTime MIB_ITEM (MTBL_rss, LEAF_gprsPenaltyTime)
+#define MIB_gprsCellReselectHysteresis MIB_ITEM (MTBL_rss, LEAF_gprsCellReselectHysteresis)
+#define MIB_gprsRaReselectHysteresis MIB_ITEM (MTBL_rss, LEAF_gprsRaReselectHysteresis)
+#define MIB_c32Qual MIB_ITEM (MTBL_rss, LEAF_c32Qual)
+#define MIB_c31Hysteresis MIB_ITEM (MTBL_rss, LEAF_c31Hysteresis)
+#define MIB_alpha MIB_ITEM (MTBL_rss, LEAF_alpha)
+#define MIB_pB MIB_ITEM (MTBL_rss, LEAF_pB)
+#define MIB_networkControlOrder MIB_ITEM (MTBL_rss, LEAF_networkControlOrder)
+
+#define MIB_ncFrequencyListTable MIB_TABLE (MTBL_rss, LEAF_ncFrequencyListTable)
+#define MIBT_ncFrequencyListEntry MIB_TENTRY (MTBL_rss, LEAF_ncFrequencyListTable, sizeof(NcFrequencyListEntry))
+#define MIBT_ncFrequencyListIndex MIB_TITEM (MTBL_rss, LEAF_ncFrequencyListTable, LEAF_ncFrequencyListIndex)
+#define MIBT_ncFrequency MIB_TITEM (MTBL_rss, LEAF_ncFrequencyListTable, LEAF_ncFrequency)
+
+#define MIB_ncReportingPeriodI MIB_ITEM (MTBL_rss, LEAF_ncReportingPeriodI)
+#define MIB_ncReportingPeriodT MIB_ITEM (MTBL_rss, LEAF_ncReportingPeriodT)
+#define MIB_extMeasurementOrder MIB_ITEM (MTBL_rss, LEAF_extMeasurementOrder)
+#define MIB_extReportingPeriod MIB_ITEM (MTBL_rss, LEAF_extReportingPeriod)
+#define MIB_extReportingType MIB_ITEM (MTBL_rss, LEAF_extReportingType)
+#define MIB_intFrequency MIB_ITEM (MTBL_rss, LEAF_intFrequency)
+#define MIB_nccPermitted MIB_ITEM (MTBL_rss, LEAF_nccPermitted)
+#define MIB_pcMeasChan MIB_ITEM (MTBL_rss, LEAF_pcMeasChan)
+#define MIB_tavgW MIB_ITEM (MTBL_rss, LEAF_tavgW)
+#define MIB_tavgT MIB_ITEM (MTBL_rss, LEAF_tavgT)
+#define MIB_navgI MIB_ITEM (MTBL_rss, LEAF_navgI)
+#define MIB_gprsMsTargetPower MIB_ITEM (MTBL_rss, LEAF_gprsMsTargetPower)
+#define MIB_spgcCcchSup MIB_ITEM (MTBL_rss, LEAF_spgcCcchSup)
+
+#define MIB_rlcMac MIB_STRUCT (MTBL_rlcMac, LEAF_rlcMac, sizeof(RlcMac))
+#define MIB_t3169 MIB_ITEM (MTBL_rlcMac, LEAF_t3169)
+#define MIB_t3191 MIB_ITEM (MTBL_rlcMac, LEAF_t3191)
+#define MIB_t3193 MIB_ITEM (MTBL_rlcMac, LEAF_t3193)
+#define MIB_t3195 MIB_ITEM (MTBL_rlcMac, LEAF_t3195)
+
+#define MIB_bssgp MIB_STRUCT (MTBL_bssgp, LEAF_bssgp, sizeof(Bssgp))
+#define MIB_blockTimer MIB_ITEM (MTBL_bssgp, LEAF_blockTimer)
+#define MIB_resetTimer MIB_ITEM (MTBL_bssgp, LEAF_resetTimer)
+#define MIB_suspendTimer MIB_ITEM (MTBL_bssgp, LEAF_suspendTimer)
+#define MIB_resumeTimer MIB_ITEM (MTBL_bssgp, LEAF_resumeTimer)
+#define MIB_capUpdateTimer MIB_ITEM (MTBL_bssgp, LEAF_capUpdateTimer)
+#define MIB_blockRetries MIB_ITEM (MTBL_bssgp, LEAF_blockRetries)
+#define MIB_unBlockRetries MIB_ITEM (MTBL_bssgp, LEAF_unBlockRetries)
+#define MIB_resetRetries MIB_ITEM (MTBL_bssgp, LEAF_resetRetries)
+#define MIB_suspendRetries MIB_ITEM (MTBL_bssgp, LEAF_suspendRetries)
+#define MIB_resumeRetries MIB_ITEM (MTBL_bssgp, LEAF_resumeRetries)
+#define MIB_raCapUpdateRetries MIB_ITEM (MTBL_bssgp, LEAF_raCapUpdateRetries)
+#define MIB_timeInterval MIB_ITEM (MTBL_bssgp, LEAF_timeInterval)
+#define MIB_networkPort MIB_ITEM (MTBL_bssgp, LEAF_networkPort)
+
+#define MIB_btsGsMeasPackage MIB_STRUCT (MTBL_btsGsMeasPackage, LEAF_btsGsMeasPackage, sizeof(BtsGsMeasPackage))
+#define MIB_flushReqRecvd MIB_ITEM (MTBL_btsGsMeasPackage, LEAF_flushReqRecvd)
+#define MIB_pagingReqRecvd MIB_ITEM (MTBL_btsGsMeasPackage, LEAF_pagingReqRecvd)
+#define MIB_meanPsInterArrivalTime MIB_ITEM (MTBL_btsGsMeasPackage, LEAF_meanPsInterArrivalTime)
+#define MIB_availablePdch MIB_ITEM (MTBL_btsGsMeasPackage, LEAF_availablePdch)
+#define MIB_meanAvailablePdch MIB_ITEM (MTBL_btsGsMeasPackage, LEAF_meanAvailablePdch)
+#define MIB_maxAvailablePdch MIB_ITEM (MTBL_btsGsMeasPackage, LEAF_maxAvailablePdch)
+#define MIB_minAvailablePdch MIB_ITEM (MTBL_btsGsMeasPackage, LEAF_minAvailablePdch)
+#define MIB_meanOccupiedPdch MIB_ITEM (MTBL_btsGsMeasPackage, LEAF_meanOccupiedPdch)
+#define MIB_maxOccupiedPdch MIB_ITEM (MTBL_btsGsMeasPackage, LEAF_maxOccupiedPdch)
+#define MIB_minOccupiedPdch MIB_ITEM (MTBL_btsGsMeasPackage, LEAF_minOccupiedPdch)
+#define MIB_availablePdchAllocTime MIB_ITEM (MTBL_btsGsMeasPackage, LEAF_availablePdchAllocTime)
+#define MIB_packetPagingMessages MIB_ITEM (MTBL_btsGsMeasPackage, LEAF_packetPagingMessages)
+#define MIB_pagchQueueLength MIB_ITEM (MTBL_btsGsMeasPackage, LEAF_pagchQueueLength)
+#define MIB_pagesDiscardedFromPpch MIB_ITEM (MTBL_btsGsMeasPackage, LEAF_pagesDiscardedFromPpch)
+#define MIB_assignmentRequest MIB_ITEM (MTBL_btsGsMeasPackage, LEAF_assignmentRequest)
+#define MIB_succAssignmentProc MIB_ITEM (MTBL_btsGsMeasPackage, LEAF_succAssignmentProc)
+#define MIB_succPdtchSeizures MIB_ITEM (MTBL_btsGsMeasPackage, LEAF_succPdtchSeizures)
+#define MIB_meanPacketQueueLength MIB_ITEM (MTBL_btsGsMeasPackage, LEAF_meanPacketQueueLength)
+#define MIB_serviceChanges MIB_ITEM (MTBL_btsGsMeasPackage, LEAF_serviceChanges)
+
+
+#define MIB_errorCode_GRR MIB_ITEM (MTBL_gp10ErrorInfoMib, LEAF_errorCode_RM)
+#define MIB_errorCode_CDR MIB_ITEM (MTBL_gp10ErrorInfoMib, LEAF_errorCode_CDR)
+
+
+/* special section to redefine some common MIB objects */
+#define MIB_mnetIpAddress MIB_viperCellIPAddress
+#define MIB_mnetName MIB_viperCellName
+#define MIB_mnetSoftwareBuild MIB_viperCellSoftwareBuild
+#define MIBL_mnetErrorInfoMib MTBL_gp10ErrorInfoMib
+
+/* Trap Forwarding table */
+#define LEAF_trapFwdData 0
+#define LEAF_trapFwdTable 1
+#define LEAF_trapFwdEntry 0
+
+
+#define MIB_trapFwdData MIB_STRUCT (MTBL_trapFwdData, LEAF_trapFwdData, sizeof(TrapFwdData))
+#define MIB_trapFwdTable MIB_TABLE (MTBL_trapFwdData, LEAF_trapFwdTable)
+#define MIBT_trapFwdEntry MIB_TENTRY (MTBL_trapFwdData, LEAF_trapFwdTable, sizeof(TrapFwdEntry))
+
+#define MIBT_trapFwdIndex MIB_TITEM (MTBL_trapFwdData, LEAF_trapFwdTable, LEAF_trapFwdIndex)
+#define MIBT_trapType MIB_TITEM (MTBL_trapFwdData, LEAF_trapFwdTable, LEAF_trapType)
+#define MIBT_trapIpAddress MIB_TIPADDR (MTBL_trapFwdData, LEAF_trapFwdTable, LEAF_trapIpAddress)
+#define MIBT_trapPort MIB_TITEM (MTBL_trapFwdData, LEAF_trapFwdTable, LEAF_trapPort)
+#define MIBT_trapCommunity MIB_TSTRING (MTBL_trapFwdData, LEAF_trapFwdTable, LEAF_trapCommunity)
+
+#define SNMP_AGENT_MODULE_ID MODULE_OAM
+
+#endif /* MIB_TAG */
+
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/include/socdefs.h b/data/mnet/GP10/Host/Common_To_Host/include/socdefs.h
new file mode 100644
index 0000000..9d922fd
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/include/socdefs.h
@@ -0,0 +1,42 @@
+#ifndef __SOCDEFS_H__
+#define __SOCDEFS_H__
+//*******************************************************************
+//
+// (c) Copyright CISCO Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// File : SocDefs.h
+// Author(s) : Igal Gutkin
+// Create Date : 8/22/00
+// Description : Application (GP10) dependant settings
+//
+// *******************************************************************
+
+// CDR Module ID specific for GP10 application
+#include "logging/VCLOGGING.h"
+
+
+// Debug interface definitions
+
+// Use stdiout for debug output
+//#define __STDIOUT
+
+#ifdef __STDIOUT
+ #define _AM_TRACE_
+ #define _AM_DEBUG_
+ #define _AM_WARNING_
+#endif //__STDIOUT
+
+// specific value for GMC
+#define SOC_LAYER_ID SOCKET_LAYER
+
+// use RSA SSL library
+#define _RSA_SSL_LIB_
+
+
+#endif //__SOCDEFS_H__ \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Common_To_Host/include/vipermib.h b/data/mnet/GP10/Host/Common_To_Host/include/vipermib.h
new file mode 100644
index 0000000..bfa6fb9
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/include/vipermib.h
@@ -0,0 +1,979 @@
+/*-------------------------------------------------------------------------
+ *
+ * ViperMib.h ViperCell MIB support header file
+ *
+ ***************************************************************************
+ * Modification history
+ * ----------------------------
+ * 03/16/00 Bhawani removeed build id realted unused constants
+ * 02/08/01 Bhawani Fi
+ *--------------------------------------------------------------------------
+ */
+
+#ifndef CISCO_GP10_MIB
+#define CISCO_GP10_MIB
+
+#include <stdarg.h>
+#include "table.h"
+#include "mibtags.h"
+
+extern void snmp_mibInitialize(); /* Function prototypes */
+extern int snmp_getValue( MibTag, ... );
+extern Status snmp_getEntry( MibTag, ... );
+extern Status snmp_setValue( MibTag, ... );
+
+extern Status snmp_setEntry(MibTag, int, void*, int);
+extern void *snmp_getAddress( MibTag, ... );
+extern Table *snmp_getTableAddress( MibTag );
+extern int snmp_setItem ( char*, ...);
+extern int snmp_getItem ( char *, ...);
+
+typedef char *TBCD_STRING;
+typedef char *OCTET;
+typedef int INTEGER;
+typedef INTEGER AbsoluteRFChannelNo;
+typedef INTEGER AveragingNumber;
+typedef INTEGER CauseCode;
+typedef INTEGER CellIdentity;
+typedef INTEGER CellReselectHysteresis;
+typedef INTEGER ChannelID;
+typedef INTEGER ClassNumber;
+typedef INTEGER FrequencyUsage;
+typedef INTEGER GSMGeneralObjectID;
+typedef INTEGER HoMargin;
+typedef INTEGER HoPriorityLevel ;
+typedef INTEGER HoppingSequenceNumber;
+typedef INTEGER IpAddress;
+typedef INTEGER L2Timer;
+typedef INTEGER L3Timer;
+typedef INTEGER HandoverTimer;
+typedef INTEGER LocationAreaCode;
+typedef INTEGER MaxQueueLength;
+typedef INTEGER MobileCountryCode;
+typedef INTEGER MobileNetworkCode;
+typedef INTEGER MSRangeMax;
+typedef INTEGER NetworkColourCode;
+typedef INTEGER NoOfBlocksForAccessGrant;
+typedef INTEGER NoOfMultiframesBetweenPaging;
+typedef INTEGER Ny1;
+typedef INTEGER PlmnPermitted;
+typedef INTEGER PowerControlInterval;
+typedef INTEGER PowerIncrStepSize;
+typedef INTEGER PowerRedStepSize;
+typedef INTEGER QueueTimeLimit;
+typedef INTEGER RadioLinkTimeout;
+typedef INTEGER RxLev;
+typedef INTEGER RxQual;
+typedef INTEGER TimerPeriodicUpdateMS;
+typedef INTEGER Tsc;
+typedef INTEGER TxInteger;
+typedef INTEGER TxPower;
+typedef INTEGER TxPwrMaxReduction;
+typedef INTEGER Weighting;
+typedef INTEGER Si13Position;
+typedef INTEGER CbchTrxSlot;
+typedef INTEGER CbchTrx;
+typedef INTEGER BcchChangeMark;
+typedef INTEGER SiChangeField;
+
+typedef union MibTableInfo_t {
+ Int32 value;
+ struct {
+ unsigned unused :28;
+ unsigned lock :1;
+ unsigned getTrap :1;
+ unsigned setTrap :1;
+ unsigned dirty :1;
+ } info;
+} MibTableInfo;
+
+typedef enum AdministrativeState_t { locked=0,
+ unlocked=1,
+ shuttingDown=2
+} AdministrativeState;
+
+typedef enum AlarmStatus_t { underRepair=0,
+ critical=1,
+ major=2,
+ minor=3,
+ alarmOutstanding=4
+} AlarmStatus;
+
+
+typedef enum Boolean_t { bfalse=0,
+ btrue=1
+} Boolean;
+
+typedef enum ChannelCombination_t { tCHFull=1, /* TCH/F + FACCH/F + SACCH/F */
+ tCHHalf=2, /* TCH/H(0,1) + FACCH/H(0,1) + SACCH/H(0,1) */
+ tCHHalf2=3, /* TCH/H(0,0) + FACCH/H(0,1) + SACCH/H(0,1) + TCH/H(1,1) */
+ /* sDCCH=3, SDCCH/8(0..7) + SACCH/C8(0..7) */
+ mainBCCH=4, /* FCCH + SCH + BCCH + CCCH */
+ bCCHCombined=5, /*FCCH + SCH + BCCH + CCCH + SDCCH/4(0..3) + SACCH/C4(0..3) */
+ cCH=6, /* BCCH + CCCH */
+ bCCHwithCBCH=7, /* combination 5 with CBCH as 05.02 Note 1 */
+ sDCCHwithCBCH=8, /* combination 3 with CBCH as 05.02 Note 1 */
+ pBCCH=11, /* combination XI for GPRS */
+ pCCCH=12, /* combination XII for GPRS */
+ pDCHData=13 /* combination XIII for GPRS */
+} ChannelCombination;
+
+typedef enum DtxUplink_t { msMayUseDTx=0,
+ msShallUseDTx=1,
+ msShallNotUseDTx=2
+} DtxUplink;
+
+typedef enum EnableoType_t { enablePwrBudget=0,
+ enableMSDistanceProcess=1
+} EnableHoType;
+
+typedef enum EnableDisable_t { opStateDisabled=0,
+ opStateEnabled=1
+} EnableDisable;
+
+typedef enum OperationalState_t { disabled=0,
+ enabled=1
+} OperationalState;
+
+typedef enum GsmdcsIndicator_t { gsm=0,
+ extendedgsm=1,
+ dcs=2,
+ pcs1900=3
+} GsmdcsIndicator;
+
+typedef enum MaxRetrans_t { one=1,
+ two=2,
+ four=4,
+ seven=7
+} MaxRetrans;
+
+typedef enum PowerClass_t {
+ m1 = 1, /* M1 (0.2W - GSM 900) */
+ m3 = 2, /* M3 (0.1W - DCS 1800) */
+ m2 = 3, /* M2 (0.2W - PCS 1900) */
+} PowerClass;
+
+typedef enum PowerStatus_t {
+ power_off=0,
+ power_on=1
+} PowerStatus;
+
+typedef enum PowerSupplyType_t {
+ basic=0,
+ ups=1
+} PowerSupplyType;
+
+typedef enum RecoveryMode_t {
+ disable=0,
+ enable=1,
+ now=2
+} RecoveryMode;
+
+typedef enum OamOperation_t {
+ clearStatus=0,
+ reloadMib=1, /* Load in the default MIB file. */
+ flushMib=2, /* Save the active MIB variables. */
+ loadMibFile=3, /* Load in an Alternate MIB file. */
+ saveMibFile=4, /* Save to an Alternate file name. */
+ loadAsciiMib=5,
+ saveAsciiMib=6
+} OamOperation;
+
+typedef enum OamOperationStatus_t { clear=0,
+ inProgress=1, /* Load in the default MIB file. */
+ sucessful=2, /* The last opertion was sucessful. */
+ failed=3 /* The last operation failed. */
+} OamOperationStatus;
+
+typedef enum SnmpTrapType_t { none=0,
+ snmpv1Trap=1, /* Send a Version 1 style Trap. */
+ snmpv2Trap=2, /* Send a Version 2 style Trap. */
+} SnmpTrapType;
+
+/* First structures that are used within the base structures @ vipertbl.h */
+
+
+typedef struct CellAllocationEntry_t {
+ INTEGER cellAllocationIndex; /* {cellAllocationEntry 1} */
+ AbsoluteRFChannelNo cellAllocation; /* {cellAllocationEntry 2} */
+} CellAllocationEntry;
+
+typedef struct PlmnPermittedEntry_t {
+ INTEGER plmnPermittedIndex; /* {plmnPermittedEntry 1} */
+ PlmnPermitted plmnPermitted; /* {plmnPermittedEntry 2} */
+} PlmnPermittedEntry;
+
+typedef struct CarrierFrequencyEntry_t {
+ INTEGER carrierFrequencyIndex; /* {carrierFrequencyEntry-x 1} */
+ AbsoluteRFChannelNo carrierFrequency; /* {carrierFrequencyEntry-x 2} */
+} CarrierFrequencyEntry;
+
+typedef CarrierFrequencyEntry CarrierFrequencyEntry_0; /* Different names for this table */
+typedef CarrierFrequencyEntry CarrierFrequencyEntry_1; /* One for each transmitter. */
+
+typedef struct ChannelEntry_t {
+ INTEGER channelIndex; /* {channelEntry-x 1} */
+ ChannelID channelID; /* {channelEntry-x 2} */
+ ChannelCombination channelCombination; /* {channelEntry-x 3} */
+ FrequencyUsage channelFrequencyUsage; /* {channelEntry-x 4} */
+ Tsc channelTsc; /* {channelEntry-x 5} */
+ AdministrativeState channelAdministrativeState; /* {channelEntry-x 6} */
+ EnableDisable channelOperationalState; /* {channelEntry-x 7} */
+} ChannelEntry;
+
+typedef ChannelEntry ChannelEntry_0;
+typedef ChannelEntry ChannelEntry_1;
+
+typedef struct T200_t {
+ MibTableInfo info; /* Current Status of table. */
+ L2Timer sdcchSAPI0; /* {t200 1} */
+ L2Timer facchTCHF; /* {t200 2} */
+ L2Timer facchTCHH; /* {t200 3} */
+ L2Timer sacchTCHSAPI0; /* {t200 4} */
+ L2Timer sacchSDCCH; /* {t200 5} */
+ L2Timer sdcchSAPI3; /* {t200 6} */
+ L2Timer sdcchTCHSAPI3; /* {t200 7} */
+} T200;
+typedef struct T31xx_t {
+ MibTableInfo info; /* Current Status of table. */
+ L3Timer t3101; /* {t31xx 1} */
+ L3Timer t3103; /* {t31xx 2} */
+ L3Timer t3105; /* {t31xx 3} */
+ L3Timer t3107; /* {t31xx 4} */
+ L3Timer t3109; /* {t31xx 5} */
+ L3Timer t3111; /* {t31xx 6} */
+ L3Timer t3113; /* {t31xx 7} */
+} T31xx;
+
+typedef struct AdjCell_HandoverEntry_t {
+ INTEGER adjCell_handoverIndex; /* {adjCell-handoverEntry 1} */
+ GSMGeneralObjectID adjCell_handoverCellID; /* {adjCell-handoverEntry 2} */
+ MobileCountryCode adjCell_mcc; /* {adjCell-handoverEntry 3} */
+ MobileNetworkCode adjCell_mnc; /* {adjCell-handoverEntry 4} */
+ LocationAreaCode adjCell_lac; /* {adjCell-handoverEntry 5} */
+ CellIdentity adjCell_ci; /* {adjCell-handoverEntry 6} */
+ AbsoluteRFChannelNo adjCell_bCCHFrequency; /* {adjCell-handoverEntry 7} */
+ NetworkColourCode adjCell_ncc; /* {adjCell-handoverEntry 8} */
+ CellIdentity adjCell_cid; /* {adjCell-handoverEntry 9} */
+ Boolean adjCell_synchronized; /* {adjCell-handoverEntry 10} */
+ HoPriorityLevel adjCell_hoPriorityLevel; /* {adjCell-handoverEntry 11} */
+ HoMargin adjCell_hoMargin; /* {adjCell-handoverEntry 12} */
+ TxPower adjCell_msTxPwrMaxCell; /* {adjCell-handoverEntry 13} */
+ RxLev adjCell_rxLevMinCell; /* {adjCell-handoverEntry 14} */
+ Boolean adjCell_isExternal; /* {adjCell-handoverEntry 15} */
+} AdjCell_HandoverEntry;
+
+typedef struct AdjCell_ReselectionEntry_t {
+ INTEGER adjCell_reselectionIndex; /* {adjCell-reselectionEntry 1} */
+ GSMGeneralObjectID adjCell_reselectionCellID; /* {adjCell-reselectionEntry 2} */
+ AbsoluteRFChannelNo adjCell_reselectionBCCHFrequency; /* {adjCell-reselectionEntry 3} */
+} AdjCell_ReselectionEntry;
+
+typedef struct MobileAllocationEntry_t {
+ INTEGER mobileAllocationIndex; /* {mobileAllocationEntry 1} */
+ AbsoluteRFChannelNo mobileAllocation; /* {mobileAllocationEntry 2} */
+} MobileAllocationEntry;
+
+typedef struct BtsBasicPackage_t {
+ MibTableInfo info; /* Current Status of table. */
+ NetworkColourCode bts_ncc; /* {btsBasicPackage 1} */
+ CellIdentity bts_cid; /* {btsBasicPackage 2} */
+ GSMGeneralObjectID btsID; /* {btsBasicPackage 3} */
+ Table *cellAllocationTable; /* {btsBasicPackage 4} */
+ GsmdcsIndicator gsmdcsIndicator ; /* {btsBasicPackage 5} */
+ MobileCountryCode bts_mcc; /* {btsBasicPackage 6} */
+ MobileNetworkCode bts_mnc; /* {btsBasicPackage 7} */
+ LocationAreaCode bts_lac; /* {btsBasicPackage 8} */
+ CellIdentity bts_ci; /* {btsBasicPackage 9} */
+ CellReselectHysteresis cellReselectHysteresis; /* {btsBasicPackage 10} */
+ Ny1 ny1; /* {btsBasicPackage 11} */
+ Table *plmnPermittedTable; /* {btsBasicPackage 12} */
+ RadioLinkTimeout radioLinkTimeout; /* {btsBasicPackage 13} */
+ GSMGeneralObjectID relatedTranscoder; /* {btsBasicPackage 14} */
+ RxLev rxLevAccessMin; /* {btsBasicPackage 15} */
+ AdministrativeState bts_administrativeState; /* {btsBasicPackage 16} */
+ AlarmStatus bts_alarmStatus; /* {btsBasicPackage 17} */
+ EnableDisable bts_operationalState; /* {btsBasicPackage 18} */
+#if 0 /* Make this an integer for the RM module. */
+ MaxRetrans maxNumberRetransmissions; /* {btsBasicPackage 19} */
+#else
+ int maxNumberRetransmissions; /* {btsBasicPackage 19} */
+#endif
+ TxPower mSTxPwrMaxCCH; /* {btsBasicPackage 20} */
+ TxInteger numberOfSlotsSpreadTrans; /* {btsBasicPackage 21} */
+ NoOfBlocksForAccessGrant noOfBlocksForAccessGrant; /* {btsBasicPackage 22} */
+ NoOfMultiframesBetweenPaging noOfMultiframesBetweenPaging; /* {btsBasicPackage 23} */
+} BtsBasicPackage;
+
+typedef struct NotAllowedAccessClassEntry_t {
+ INTEGER notAllowedAccessClassIndex; /* {notAllowedAccessClassEntry 1} */
+ ClassNumber notAllowedAccessClass; /* {notAllowedAccessClassEntry 2} */
+} NotAllowedAccessClassEntry;
+
+typedef struct BtsOptionsPackage_t { /* {viperCellGsmMib 2} */
+ MibTableInfo info; /* Current Status of table. */
+ Boolean allowIMSIAttachDetach; /* {btsOptionsPackage 1} */
+ Boolean callReestablishmentAllowed; /* {btsOptionsPackage 2} */
+ Boolean cellBarred; /* {btsOptionsPackage 3} */
+ Boolean dtxDownlink; /* {btsOptionsPackage 4} */
+ DtxUplink dtxUplink; /* {btsOptionsPackage 5} */
+ Boolean emergencyCallRestricted; /* {btsOptionsPackage 6} */
+ Table *notAllowedAccessClassTable; /* {btsOptionsPackage 7} */
+ TimerPeriodicUpdateMS timerPeriodicUpdateMS; /* {btsOptionsPackage 8} */
+ MaxQueueLength maxQueueLength; /* {btsOptionsPackage 9} */
+ Boolean msPriorityUsedInQueueing; /* {btsOptionsPackage 10} */
+ QueueTimeLimit timeLimitCall; /* {btsOptionsPackage 11} */
+ QueueTimeLimit timeLimitHandover; /* {btsOptionsPackage 12} */
+} BtsOptionsPackage;
+
+typedef struct TransceiverPackage_t { /* firstTra... {viperCellGsmMib 3} */
+ MibTableInfo info; /* secondTr... {viperCellGsmMib 4} */
+ GSMGeneralObjectID basebandTransceiverID; /* {....TransceiverPackage 1} */
+ GSMGeneralObjectID relatedRadioCarrier; /* {....TransceiverPackage 2} */
+ AdministrativeState basebandAdministrativeState; /* {....TransceiverPackage 3} */
+ AlarmStatus basebandAlarmStatus; /* {....TransceiverPackage 4} */
+ EnableDisable basebandOperationalState; /* {....TransceiverPackage 5} */
+ Table *channelTable; /* {....TransceiverPackage 6} */
+} TransceiverPackage;
+
+typedef TransceiverPackage FirstTransceiverPackage; /* The entire package is duplicated */
+typedef TransceiverPackage SecondTransceiverPackage; /* since a vipercell has 2 radios. */
+
+typedef struct RadioCarrierPackage_t { /* firstRadio... {viperCellGsmMib 5} */
+ MibTableInfo info; /* secondRadio.. {viperCellGsmMib 6} */
+ Table *carrierFrequencyList; /* {....RadioCarrierPackage 1} */
+ PowerClass powerClass; /* {....RadioCarrierPackage 2} */
+ GSMGeneralObjectID radioCarrierID; /* {....RadioCarrierPackage 3} */
+ TxPwrMaxReduction txPwrMaxReduction; /* {....RadioCarrierPackage 4} */
+ AdministrativeState carrier_administrativeState; /* {....RadioCarrierPackage 5} */
+ AlarmStatus carrier_alarmStatus; /* {....RadioCarrierPackage 6} */
+ EnableDisable carrier_operationalState; /* {....RadioCarrierPackage 7} */
+} RadioCarrierPackage;
+
+typedef RadioCarrierPackage FirstRadioCarrierPackage;
+typedef RadioCarrierPackage SecondRadioCarrierPackage;
+
+typedef struct BtsTimerPackage_t { /* {viperCellGsmMib 7} */
+ MibTableInfo info; /* Current Status of table. */
+ T200 *t200; /* {btsTimerPackage 1} */
+ T31xx *t31xx; /* {btsTimerPackage 2} */
+} BtsTimerPackage;
+
+typedef struct AdjacentCellPackage_t { /* {viperCellGsmMib 8} */
+ MibTableInfo info; /* Current Status of table. */
+ Table *adjCell_handoverTable; /* {adjacentCellPackage 1} */
+ Table *adjCell_reselectionTable; /* {adjacentCellPackage 2} */
+} AdjacentCellPackage;
+
+typedef struct HandoverTimerMib_t {
+ MibTableInfo info; /* Current Status of table. */
+ HandoverTimer t101;
+ HandoverTimer t102;
+ HandoverTimer t103;
+ HandoverTimer t104;
+ HandoverTimer t201;
+ HandoverTimer t202;
+ HandoverTimer t204;
+ HandoverTimer t210;
+ HandoverTimer t211;
+} HandoverTimerMib;
+
+typedef struct Gp10ServiceStatusMib_t {
+ MibTableInfo info;
+ INTEGER snmpServiceEnabled;
+ INTEGER httpServiceEnabled;
+ INTEGER telnetServiceEnabled;
+ INTEGER sshServiceEnabled;
+ INTEGER ftpServiceEnabled;
+} Gp10ServiceStatusMib;
+
+
+typedef struct FrequencyHoppingPackage_t { /* {viperCellGsmMib 9} */
+ MibTableInfo info; /* Current Status of table. */
+ GSMGeneralObjectID frequencyHoppingSystemID; /* {frequencyHoppingPackage 1} */
+ HoppingSequenceNumber hoppingSequenceNumber; /* {frequencyHoppingPackage 2} */
+ Table *mobileAllocationTable; /* {frequencyHoppingPackage 3} */
+} FrequencyHoppingPackage;
+
+typedef struct HoAveragingAdjCellParam_t { /* {handoverControlPackage 3}*/
+ MibTableInfo info; /* Current Status of table. */
+ AveragingNumber hreqave; /*{hoAveragingAdjCellParam 1}*/
+ AveragingNumber hreqt; /*{hoAveragingAdjCellParam 2}*/
+ Weighting weighting; /*{hoAveragingAdjCellParam 3}*/
+} HoAveragingAdjCellParam;
+typedef struct HoAveragingDistParam_t { /* {handoverControlPackage 4}*/
+ MibTableInfo info; /* Current Status of table. */
+ AveragingNumber hreqave; /* {hoAveragingDistParam 1} */
+ AveragingNumber hreqt; /* {hoAveragingDistParam 2} */
+} HoAveragingDistParam;
+typedef struct HoAveragingLevParam_t { /* {handoverControlPackage 5}*/
+ MibTableInfo info; /* Current Status of table. */
+ AveragingNumber hreqave; /* {hoAveragingLevParam 1} */
+ AveragingNumber hreqt; /* {hoAveragingLevParam 2} */
+ Weighting weighting; /* {hoAveragingLevParam 3} */
+} HoAveragingLevParam;
+typedef struct HoAveragingQualParam_t { /* {handoverControlPackage 6}*/
+ MibTableInfo info; /* Current Status of table. */
+ AveragingNumber hreqave; /* {hoAveragingQualParam 1} */
+ AveragingNumber hreqt; /* {hoAveragingQualParam 2} */
+ Weighting weighting; /* {hoAveragingQualParam 3} */
+} HoAveragingQualParam;
+typedef struct HoThresholdDistParam_t { /* {handoverControlPackage 8}*/
+ MibTableInfo info; /* Current Status of table. */
+ MSRangeMax timeadv; /* {hoThresholdDistParam 1} */
+ AveragingNumber p8; /* {hoThresholdDistParam 2} */
+ AveragingNumber n8; /* {hoThresholdDistParam 3} */
+} HoThresholdDistParam;
+typedef struct HoThresholdInterfaceParam_t { /* {handoverControlPackage 9}*/
+ MibTableInfo info; /* Current Status of table. */
+ RxLev rxLevelUL; /* {hoThresholdInterfaceParam 1} */
+ RxLev rxLevelDL; /* {hoThresholdInterfaceParam 2} */
+ AveragingNumber px; /* {hoThresholdInterfaceParam 3} */
+ AveragingNumber nx; /* {hoThresholdInterfaceParam 4} */
+} HoThresholdInterfaceParam;
+typedef struct HoThresholdLevParam_t { /* {handoverControlPackage 10} */
+ MibTableInfo info; /* Current Status of table. */
+ RxLev rxLevelUL; /* {hoThresholdLevParam 1} */
+ RxLev rxLevelDL; /* {hoThresholdLevParam 2} */
+ AveragingNumber px; /* {hoThresholdLevParam 3} */
+ AveragingNumber nx; /* {hoThresholdLevParam 4} */
+} HoThresholdLevParam;
+typedef struct HoThresholdQualParam_t { /* {handoverControlPackage 11} */
+ MibTableInfo info; /* Current Status of table. */
+ RxQual rxQualUL; /* {hoThresholdQualParam 1} */
+ RxQual rxQualDL; /* {hoThresholdQualParam 2} */
+ AveragingNumber px; /* {hoThresholdQualParam 3} */
+ AveragingNumber nx; /* {hoThresholdQualParam 4} */
+} HoThresholdQualParam;
+typedef struct InterferenceAveragingParam_t { /* {handoverControlPackage 12} */
+ MibTableInfo info; /* Current Status of table. */
+ AveragingNumber interferenceAveragingParamAveragingPeriod; /* {interferenceAveragingParam 1}*/
+ RxLev interferenceAveragingParamThresholdBoundary0; /* {interferenceAveragingParam 2}*/
+ RxLev interferenceAveragingParamThresholdBoundary1; /* {interferenceAveragingParam 3}*/
+ RxLev interferenceAveragingParamThresholdBoundary2; /* {interferenceAveragingParam 4}*/
+ RxLev interferenceAveragingParamThresholdBoundary3; /* {interferenceAveragingParam 5}*/
+ RxLev interferenceAveragingParamThresholdBoundary4; /* {interferenceAveragingParam 6}*/
+ RxLev interferenceAveragingParamThresholdBoundary5; /* {interferenceAveragingParam 7}*/
+} InterferenceAveragingParam;
+
+typedef struct HandoverControlPackage_t { /* {viperCellGsmMib 10} */
+ MibTableInfo info; /* Current Status of table. */
+ GSMGeneralObjectID handoverControlID; /* {handoverControlPackage 1} */
+ EnableHoType enableOptHandoverProcessing; /* {handoverControlPackage 2} */
+ HoAveragingAdjCellParam *hoAveragingAdjCellParam; /* {handoverControlPackage 3} */
+ HoAveragingDistParam *hoAveragingDistParam; /* {handoverControlPackage 4} */
+ HoAveragingLevParam *hoAveragingLevParam; /* {handoverControlPackage 5} */
+ HoAveragingQualParam *hoAveragingQualParam; /* {handoverControlPackage 6} */
+ HoMargin hoMarginDef; /* {handoverControlPackage 7} */
+ HoThresholdDistParam *hoThresholdDistParam; /* {handoverControlPackage 8} */
+ HoThresholdInterfaceParam *hoThresholdInterfaceParam; /* {handoverControlPackage 9} */
+ HoThresholdLevParam *hoThresholdLevParam; /* {handoverControlPackage 10} */
+ HoThresholdQualParam *hoThresholdQualParam; /* {handoverControlPackage 11} */
+ InterferenceAveragingParam *interferenceAveragingParam; /* {handoverControlPackage 12} */
+ TxPower mxTxPwrMaxCellDef; /* {handoverControlPackage 13} */
+ RxLev rxLevMinCellDef; /* {handoverControlPackage 14} */
+} HandoverControlPackage;
+
+typedef struct PcAveragingLev_t { /* {powerControlPackage 1} */
+ MibTableInfo info; /* Current Status of table. */
+ AveragingNumber hreqave; /* {pcAveragingLev 1} */
+ AveragingNumber hreqt; /* {pcAveragingLev 2} */
+ Weighting weighting; /* {pcAveragingLev 3} */
+} PcAveragingLev;
+
+typedef struct PcAveragingQual_t { /* {powerControlPackage 2} */
+ MibTableInfo info; /* Current Status of table. */
+ AveragingNumber hreqave; /* {pcAveragingQual 1} */
+ AveragingNumber hreqt; /* {pcAveragingQual 2} */
+ Weighting weighting; /* {pcAveragingQual 3} */
+} PcAveragingQual;
+
+typedef struct PcLowerThresholdLevParam_t { /* {powerControlPackage 3} */
+ MibTableInfo info; /* Current Status of table. */
+ RxLev rxLevelUL; /* {pcLowerThresholdLevParam 1} */
+ RxLev rxLevelDL; /* {pcLowerThresholdLevParam 2} */
+ AveragingNumber px; /* {pcLowerThresholdLevParam 3} */
+ AveragingNumber nx; /* {pcLowerThresholdLevParam 4} */
+} PcLowerThresholdLevParam;
+
+typedef struct PcLowerThresholdQualParam_t { /* {powerControlPackage 4} */
+ MibTableInfo info; /* Current Status of table. */
+ RxQual rxQualUL; /* {pcLowerThresholdQualParam 1} */
+ RxQual rxQualDL; /* {pcLowerThresholdQualParam 2} */
+ AveragingNumber px; /* {pcLowerThresholdQualParam 3} */
+ AveragingNumber nx; /* {pcLowerThresholdQualParam 4} */
+} PcLowerThresholdQualParam;
+
+typedef struct PcUpperThresholdLevParam_t { /* {powerControlPackage 5} */
+ MibTableInfo info; /* Current Status of table. */
+ RxLev rxLevelUL; /* {pcUpperThresholdLevParam 1} */
+ RxLev rxLevelDL; /* {pcUpperThresholdLevParam 2} */
+ AveragingNumber px; /* {pcUpperThresholdLevParam 3} */
+ AveragingNumber nx; /* {pcUpperThresholdLevParam 4} */
+} PcUpperThresholdLevParam;
+
+typedef struct PcUpperThresholdQualParam_t { /* {powerControlPackage 6} */
+ MibTableInfo info; /* Current Status of table. */
+ RxQual rxQualUL; /* {pcUpperThresholdQualParam 1} */
+ RxQual rxQualDL; /* {pcUpperThresholdQualParam 2} */
+ AveragingNumber px; /* {pcUpperThresholdQualParam 3} */
+ AveragingNumber nx; /* {pcUpperThresholdQualParam 4} */
+} PcUpperThresholdQualParam;
+
+typedef struct PowerControlPackage_t { /* {viperCellGsmMib 11} */
+ MibTableInfo info; /* Current Status of table. */
+ PcAveragingLev *pcAveragingLev; /* {powerControlPackage 1} */
+ PcAveragingQual *pcAveragingQual; /* {powerControlPackage 2} */
+ PcLowerThresholdLevParam *pcLowerThresholdLevParam; /* {powerControlPackage 3} */
+ PcLowerThresholdQualParam *pcLowerThresholdQualParam; /* {powerControlPackage 4} */
+ PcUpperThresholdLevParam *pcUpperThresholdLevParam; /* {powerControlPackage 5} */
+ PcUpperThresholdQualParam *pcUpperThresholdQualParam; /* {powerControlPackage 6} */
+ PowerControlInterval powerControlInterval; /* {powerControlPackage 7} */
+ PowerIncrStepSize powerIncrStepSize; /* {powerControlPackage 8} */
+ PowerRedStepSize powerRedStepSize; /* {powerControlPackage 9} */
+} PowerControlPackage;
+
+typedef struct AttImmediateAssingProcsPerCauseEntry_t {
+ CauseCode attImmediateAssingProcsCause; /* {attImmediateAssingProcsPerCauseEntry 1} */
+ INTEGER attImmediateAssingProcsValue; /* {attImmediateAssingProcsPerCauseEntry 2} */
+} AttImmediateAssingProcsPerCauseEntry;
+
+typedef struct SuccImmediateAssingProcsPerCauseEntry_t {
+ CauseCode succImmediateAssingProcsCause; /* {succImmediateAssingProcsPerCauseEntry 1} */
+ INTEGER succImmediateAssingProcsValue; /* {succImmediateAssingProcsPerCauseEntry 2} */
+} SuccImmediateAssingProcsPerCauseEntry;
+
+typedef struct CellMeasurmentPackage_t { /* {viperCellGsmMib 12} */
+ MibTableInfo info; /* Current Status of table. */
+ INTEGER meanPCHAGCHQueueLength; /* {cellMeasurmentPackage 1} */
+ INTEGER attTransOfPagingMessagesThePCH; /* {cellMeasurmentPackage 2} */
+ INTEGER unsuccTransOfPagingMessagesThePCH; /* {cellMeasurmentPackage 3} */
+ INTEGER attImmediateAssingProcs; /* {cellMeasurmentPackage 4} */
+ INTEGER succImmediateAssingProcs; /* {cellMeasurmentPackage 5} */
+ Table *attImmediateAssingProcsPerCauseTable; /* {cellMeasurmentPackage 6} */
+ Table *succImmediateAssingProcsPerCauseTable; /* {cellMeasurmentPackage 7} */
+ INTEGER nbrOfPagesDiscardedFromPCHQueue; /* {cellMeasurmentPackage 8} */
+ INTEGER meanDurationOfSuccPagingProcs; /* {cellMeasurmentPackage 9} */
+ INTEGER nbrOfAvailableTCHs; /* {cellMeasurmentPackage 10} */
+ INTEGER meanNbrOfBusyTCHs; /* {cellMeasurmentPackage 11} */
+ INTEGER maxNbrOfBusyTCHs; /* {cellMeasurmentPackage 12} */
+ INTEGER meanNbrOfIdleTCHsPerInterferenceBand; /* {cellMeasurmentPackage 13} */
+ INTEGER attTCHSeizures; /* {cellMeasurmentPackage 14} */
+ INTEGER succTCHSeizures; /* {cellMeasurmentPackage 15} */
+ INTEGER attTCHSeizuresMeetingTCHBlockedState; /* {cellMeasurmentPackage 16} */
+ INTEGER allAvailableTCHAllocatedTime; /* {cellMeasurmentPackage 17} */
+ INTEGER meanTCHBusyTime; /* {cellMeasurmentPackage 18} */
+ INTEGER meanTCHQueueLength; /* {cellMeasurmentPackage 19} */
+ INTEGER nbrOfLostRadioLinksTCH; /* {cellMeasurmentPackage 20} */
+ INTEGER nbrOfAvailableSDCCHs; /* {cellMeasurmentPackage 21} */
+ INTEGER meanNbrOfBusySDCCHs; /* {cellMeasurmentPackage 22} */
+ INTEGER maxNbrOfBusySDCCHs; /* {cellMeasurmentPackage 23} */
+ INTEGER attSDCCHSeizuresMeetingSDCCHBlockedState; /* {cellMeasurmentPackage 24} */
+ INTEGER allAvailableSDCCHAllocatedTime; /* {cellMeasurmentPackage 25} */
+ INTEGER meanSDCCHQueueLength; /* {cellMeasurmentPackage 26} */
+ INTEGER nbrOfLostRadioLinksSDCCH; /* {cellMeasurmentPackage 27} */
+ INTEGER relativeTimeDLPowerControlAtMax; /* {cellMeasurmentPackage 28} */
+ INTEGER relativeTimeULPowerControlAtMax; /* {cellMeasurmentPackage 29} */
+ INTEGER succInternalHDOsIntraCell; /* {cellMeasurmentPackage 30} */
+ INTEGER unsuccInternalHDOsIntraCell; /* {cellMeasurmentPackage 31} */
+#if THESE_ARE_NOT_USED_IN_VIPERCELL
+ INTEGER attIncomingInternalInterCellHDOs; /* {cellMeasurmentPackage 32} */
+ INTEGER succIncomingInternalInterCellHDOs; /* {cellMeasurmentPackage 33} */
+ INTEGER attOutgoingInternalInterCellHDOs; /* {cellMeasurmentPackage 34} */
+ INTEGER succOutgoingInternalInterCellHDOs; /* {cellMeasurmentPackage 35} */
+ INTEGER unsuccHDOsWithReconnection; /* {cellMeasurmentPackage 36} */
+ INTEGER unsuccHDOsWithLossOfConnection; /* {cellMeasurmentPackage 37} */
+#endif
+} CellMeasurmentPackage;
+
+typedef struct ExternalHDOsPerCauseEntry_t {
+ CauseCode externalHDOsPerCauseCode; /* {externalHDOsPerCauseEntry 1} */
+ INTEGER externalHDOsPerCauseValue; /* {externalHDOsPerCauseEntry 2} */
+} ExternalHDOsPerCauseEntry;
+typedef struct CallControlMeasurmentPackage_t { /* {viperCellGsmMib 13} */
+ MibTableInfo info; /* Current Status of table. */
+ INTEGER nbrOfClassMarkUpdates; /* {callControlMeasurmentPackage 1} */
+ INTEGER attMobileOriginatingCalls; /* {callControlMeasurmentPackage 2} */
+ INTEGER succMobileOriginatingCalls; /* {callControlMeasurmentPackage 3} */
+ INTEGER ansMobileOriginatingCalls; /* {callControlMeasurmentPackage 4} */
+ INTEGER attMobileTerminatingCalls; /* {callControlMeasurmentPackage 5} */
+ INTEGER succMobileTerminatingCalls; /* {callControlMeasurmentPackage 6} */
+ INTEGER ansMobileTerminatingCalls; /* {callControlMeasurmentPackage 7} */
+ INTEGER attMobileEmergencyCalls; /* {callControlMeasurmentPackage 8} */
+ INTEGER succMobileEmergencyCalls; /* {callControlMeasurmentPackage 9} */
+ INTEGER ansMobileEmergencyCalls; /* {callControlMeasurmentPackage 10} */
+ INTEGER attCipheringModeControlProcs; /* {callControlMeasurmentPackage 11} */
+ INTEGER succCipheringModeControlProcs; /* {callControlMeasurmentPackage 12} */
+ INTEGER attInterrogationOfHLRsForRouting; /* {callControlMeasurmentPackage 13} */
+ INTEGER succInterrogationOfHLRsMSRNObtained; /* {callControlMeasurmentPackage 14} */
+ INTEGER succInterrogationOfHLRsCallForwarding; /* {callControlMeasurmentPackage 15} */
+ INTEGER attOpForMobileOriginatingPointToPointSMs; /* {callControlMeasurmentPackage 16} */
+ INTEGER succOpForMobileOriginatingPointToPointSMs; /* {callControlMeasurmentPackage 17} */
+ INTEGER attOpForMobileTerminatingPointToPointSMs; /* {callControlMeasurmentPackage 18} */
+ INTEGER succOpForMobileTerminatingPointToPointSMs; /* {callControlMeasurmentPackage 19} */
+ INTEGER meanTimeToCallSetupService; /* {callControlMeasurmentPackage 20} */
+ INTEGER meanTimeToLocationUpdateService; /* {callControlMeasurmentPackage 21} */
+ INTEGER transSubIdentifiedWithIMSI; /* {callControlMeasurmentPackage 22} */
+ INTEGER imsiDetachProcs; /* {callControlMeasurmentPackage 23} */
+ INTEGER imsiAttachProcs; /* {callControlMeasurmentPackage 24} */
+ INTEGER attIncomingInterMSCHDOs; /* {callControlMeasurmentPackage 25} */
+ INTEGER succIncomingInterMSCHDOs; /* {callControlMeasurmentPackage 26} */
+ INTEGER attOutgoingInterMSCHDOs; /* {callControlMeasurmentPackage 27} */
+ INTEGER succOutgoingInterMSCHDOs; /* {callControlMeasurmentPackage 28} */
+ Table *externalHDOsPerCauseTable; /* {callControlMeasurmentPackage 29} */
+ INTEGER unsuccExternHDOsWithReconnectionPerMSC; /* {callControlMeasurmentPackage 30} */
+ INTEGER unsuccExternHDOsWithLossOfConnectionPerMSC; /* {callControlMeasurmentPackage 31} */
+} CallControlMeasurmentPackage;
+
+typedef struct CallConfigData { /* {viperCellConfigMib 1} */
+ MibTableInfo info; /* Current Status of table. */
+ INTEGER cc_max_L3_msgs; /* {callConfigData 1} */
+ INTEGER cc_l3_msg_q_priority; /* {callConfigData 2} */
+ INTEGER cc_task_priority; /* {callConfigData 3} */
+ INTEGER cc_task_stack_size; /* {callConfigData 4} */
+ INTEGER cc_mm_conn_est_T999; /* {callConfigData 5} */
+ INTEGER cc_alerting_T301; /* {callConfigData 6} */
+ INTEGER cc_setup_T303; /* {callConfigData 7} */
+ INTEGER cc_call_confirmed_T310; /* {callConfigData 8} */
+ INTEGER cc_connect_T313; /* {callConfigData 9} */
+ INTEGER cc_disconnect_T305; /* {callConfigData 10} */
+ INTEGER cc_release_T308; /* {callConfigData 11} */
+ INTEGER cc_safety_timer; /* {callConfigData 12} */
+ INTEGER cc_max_calls; /* {callConfigData 13} */
+} CallConfigData;
+typedef struct mobilityConfigData_t { /* {viperCellConfigMib 2} */
+ MibTableInfo info; /* Current Status of table. */
+ INTEGER mm_max_mm_connections; /* {mobilityConfigData 1} */
+ INTEGER mm_max_L3_msgs; /* {mobilityConfigData 2} */
+ INTEGER task_priority; /* {mobilityConfigData 3} */
+ INTEGER task_stack_size; /* {mobilityConfigData 4} */
+ INTEGER mm_paging_t3113; /* {mobilityConfigData 5} */
+ Boolean mm_authenticationRequired; /* {mobilityConfigData 6} */
+ Boolean mm_cipheringRequired; /* {mobilityConfigData 7} */
+ Boolean mm_IMEICheckRequired; /* {mobilityConfigData 8} */
+} MobilityConfigData;
+typedef struct ResourceConfigData_t { /* {viperCellConfigMib 3} */
+ MibTableInfo info; /* Current Status of table. */
+ INTEGER rm_t3L01; /* {resourceConfigData 1} */
+ INTEGER rm_bsCcChans; /* {resourceConfigData 2} */
+ INTEGER rm_bsCcchSdcchComb; /* {resourceConfigData 3} */
+ INTEGER rm_sysInfoOnOffMap; /* {resourceConfigData 4} */
+ INTEGER rm_airInterface; /* {resourceConfigData 5} */
+ INTEGER rm_viperCellTsc; /* {resourceConfigData 6} */
+ INTEGER rm_maxSlotPerTrx; /* {resourceConfigData 7} */
+ INTEGER rm_maxTrxs; /* {resourceConfigData 8} */
+ INTEGER rm_maxTchfs; /* {resourceConfigData 9} */
+ INTEGER rm_maxSdcch4s; /* {resourceConfigData 10} */
+ INTEGER rm_trxOnOffMap; /* {resourceConfigData 11} */
+ INTEGER rm_networkIfConfig; /* {resourceConfigData 12} */
+ INTEGER rm_bcchTrx; /* {resourceConfigData 13} */
+ INTEGER rm_preAlphaTrx; /* {resourceConfigData 14} */
+ INTEGER rm_ccchBcchComb; /* {resourceConfigData 15} */
+ INTEGER rm_ccchConf; /* {resourceConfigData 16} */
+ INTEGER rm_nim[2][8]; /* {resourceConfigData 17 - 32} */
+ INTEGER rm_trxSynthSetting[2][4]; /* {resourceConfigData 33 - 40} */
+ INTEGER rm_trxFpgaDelay[2][2]; /* {resourceConfigData 41 - 44} */
+ INTEGER rm_SGainCtrlSetting[2][2]; /* {resourceConfigData 45 - 48} */
+ INTEGER rm_synchChanInfo; /* {resourceConfigData 49} */
+} ResourceConfigData;
+
+typedef struct OamConfigData_t { /* {viperCellConfigMib 4} */
+ MibTableInfo info; /* Current Status of table. */
+ INTEGER oamCommand; /* {oamConfigData 1} */
+ INTEGER oamCommandExecutionStatus; /* {oamConfigData 2} */
+ OCTET *oamAlternateMibFileName; /* {oamConfigData 3} */
+ INTEGER *oamCommandLastError; /* {oamConfigData 4} */
+ Boolean mibAccessControlFlag; /* {oamConfigData 5} */
+} OamConfigData;
+
+typedef struct MaintenanceConfigData_t { /* {viperCellConfigMib 4} */
+ MibTableInfo info; /* Current Status of table. */
+ char *maintenance_operation; /* {maintenanceConfigData 1} */
+ char *maintenance_response; /* {maintenanceConfigData 2} */
+} MaintenanceConfigData;
+
+typedef struct TrapFwdData_t {
+ MibTableInfo info; /* {viperCellConfigMib 6} */
+ Table *trapFwdTable; /* {trapFwdData 1} */
+} TrapFwdData;
+
+
+typedef struct TrapFwdEntry_t
+{
+ INTEGER trapFwdIndex; /* Index into the Table. */
+ SnmpTrapType trapType; /* Type of trap SNMPv1 / SNMPv2 */
+ IpAddress trapIpAddress; /* Trap Manager's IP Address */
+ INTEGER trapPort; /* Trap Manager's Trap Port */
+ char* trapCommunity; /* Expected Community string */
+}TrapFwdEntry;
+
+/* Structure used to store H323 Management informaiton */
+typedef struct H323Data_t {
+ MibTableInfo info; /* Current Status of table. */
+ INTEGER GKPort; /* Gate Keeper's listline Port */
+ IpAddress GKIPAddress; /* Gate Keeper's IP address */
+ INTEGER Q931ResponseTimeOut; /* Q931 Response Time Out */
+ INTEGER Q931ConnectTimeOut; /* Q931 Connect time out */
+ INTEGER Q931CallSignalingPort; /* Q931 Call Singaling Port */
+ INTEGER t35CountryCode; /* t35 Country Code */
+ INTEGER rasRequestTimeout; /* Ras Request Timeout */
+ INTEGER viperbaseHeartbeatTimeout; /*...*/
+} H323Data;
+
+/* Structures for the Viper Specific MIB */
+typedef struct DualTRXSCard_t {
+ MibTableInfo info; /* Current Status of table. */
+ INTEGER monitorReceiverPLL_LockDetectStatus; /* Lock Detect Status of the Monitor Receiver's PLL */
+ INTEGER referenceFrequencyPLL_LockDetectStatus; /* Lock Detect Status of the Reference Frequency's PLL */
+ INTEGER transceiver_1_PLL_LockDetectStatus; /* Lock Detect Status of the Transceiver #1 PLL */
+ INTEGER transceiver_2A_PLL_LockDetectStatus; /* Lock Detect Status of the Transceiver #2A PLL */
+ INTEGER transceiver_2B_PLL_LockDetectStatus; /* Lock Detect Status of the Transceiver #2B PLL */
+ INTEGER intermediateFrequency_LockDetectStatus; /* Lock Detect Status of the Intermediate Frequency's PLL */
+ char *trxSerialNumber; /* Hardware Serial Number of the TRX Card */
+ char *trxSoftwareVersion; /* Software Version Number of the TRX Card */
+ EnableDisable trxLoopBackMode; /* Loop Back Mode */
+} DualTRXSCard;
+
+typedef struct ArfcnRssiFunction_t {
+ MibTableInfo info; /* Current Status of table. */
+ EnableDisable arfcnRssiControlMode; /* ARFCN/RSSI Function Control */
+ RecoveryMode clockRecoveryControlMode; /* Clock Recovery Feature Control */
+ Table *arfcnRssiClockControlTable; /* This entry is required to define a table of values. */
+} ArfcnRssiFunction;
+
+typedef struct ArfcnRssiClockControlEntry_t {
+ INTEGER arfcnRssiClockControlIndex; /* Index to the ARFCN/RSSI/ClockControl table. */
+ AbsoluteRFChannelNo arfcnRssiClockControlArfcn; /* RF Channel No */
+ EnableDisable arfcnRssiClockRecoveryMode; /* Clock Syncronization */
+} ArfcnRssiClockControlEntry;
+
+typedef struct ClockCard_t {
+ MibTableInfo info; /* Current Status of table. */
+ INTEGER clockCardType; /* Clock Card types */
+ char *clockCardSoftwareVersion; /* Software Version of the Clock Card */
+ INTEGER clockCardStatus; /* Clock Card Status - validity of clock output */
+ char *clockCardCrystalUpTime; /* Crystal Up-time of the Clock Card */
+ INTEGER clockCardDAC; /* Clock Card DAC value */
+} ClockCard;
+
+typedef struct GpsCard_t {
+ MibTableInfo info; /* Current Status of table. */
+ INTEGER gpsCardType; /* GPS Card types */
+ char *gpsCardSoftwareVersion; /* Software Version of the GPS Card */
+ INTEGER gpsCardStatus; /* GPS Card General Status */
+ char *gpsPosition; /* Longitude and Latitude */
+ char *gpsTime; /* GPS Time */
+ char *utcTime; /* UTC Time */
+ INTEGER clockStatusFrequencyError; /* Clock Status - Frequency Error */
+ INTEGER clockStatusDACVoltage; /* Clock Status - DAC Voltage */
+ INTEGER gpsAntennaStatus; /* Antenna Status */
+ INTEGER gpsSatelliteStatus; /* Satellite Status */
+} GpsCard;
+
+typedef struct PowerCard_t {
+ MibTableInfo info; /* Current Status of table. */
+ INTEGER powerCardType; /* powerCard types */
+ INTEGER powerCardStatus; /* Power Card General Status */
+ PowerStatus powerOn; /* Switch of the power Card (none-reversible action when turn-off) */
+} PowerCard;
+
+typedef struct ExternalPowerSupply_t {
+ MibTableInfo info; /* Current Status of table. */
+ INTEGER powerSupplyType; /* External Power Supply type */
+ INTEGER powerSupplyStatus; /* Power Supply General Status */
+} ExternalPowerSupply;
+
+typedef struct CdcBoard_t {
+ MibTableInfo info; /* Current Status of table. */
+ char *cdcBoardSerialNumber; /* cdcBoard Serial Number */
+ char *cdcBoardMACAddress; /* CDC board MAC Address */
+} CdcBoard;
+
+typedef struct AutomaticParameterAllocation_t {
+ MibTableInfo info; /* Current Status of table. */
+ INTEGER apaEnable ; /* Feature Enable */
+ INTEGER apaScanFrequencyLowBound ; /* Low bound of the Feaquencies to be scaned */
+ INTEGER apaScanFrequencyHighBound ; /* High bound of the Feaquencies to be scaned */
+ INTEGER apaMaxPowerSetting; /* Max power setting for ViperCell */
+ INTEGER apaMinRSSIThresholdForNeighborId; /* Minimum RSSI value below which the unit is not a neighbor */
+ INTEGER apaScanRate; /* Scan Rate for checking RSSI value (in unit of TBD) */
+ INTEGER apaHysteresisForBCCHPower; /* Hysteresis for change the power on the BCCH */
+ Table *apaInvalidFrequencyTable; /* This attribute defines the set of invalid frequencies within the scan frequency range. */
+ Table *apaClockSourceFrequencyTable; /* This attribute defines the set of clock source frequencies. */
+} AutomaticParameterAllocation;
+
+typedef struct ApaInvalidFrequencyEntry_t {
+ INTEGER apaInvalidFrequencyIndex; /* Index to the apa Invalid Frequency table. */
+ AbsoluteRFChannelNo apaInvalidFrequencyArfcn; /* Index to the apa Invalid Frequency table. */
+} ApaInvalidFrequencyEntry;
+
+typedef struct ApaClockSourceFrequencyEntry_t {
+ INTEGER apaClockSourceFrequencyIndex; /* Index to the apa Invalid Frequency table. */
+ AbsoluteRFChannelNo apaClockSourceFrequencyArfcn; /* Apa Invalid Frequency. */
+} ApaClockSourceFrequencyEntry;
+
+typedef struct Gp10MgmtInfoMib_t {
+ MibTableInfo info; /* Current Status of table. */
+ char *viperCellName; /* The name of the ViperCell */
+ IpAddress viperCellIPAddress; /* IP Address of the ViperCell*/
+ IpAddress viperCellIDefGateway; /* Default gateway*/
+ char *viperCellLocation; /* Location of the ViperCell */
+ char *viperCellSerialNumber; /* Serial Number of the ViperCell */
+ char *viperCellAssetNumber; /* Asset Number or other Customer tracking information */
+ char *viperCellSoftwareBuild; /* Date upon which the ViperCell software was created */
+ char *viperCellCustomerName; /* Name of the Customer who owns the ViperCell */
+ char *viperCellCustomerAddress; /* Address of who Customer who owns the ViperCell */
+ char *viperCellCustomerPhone; /* Phone Number of who Customer who owns the ViperCell */
+ char *viperCellCustomerEmail; /* Email of who to Customer who owns the ViperCell */
+ char *viperCellCustomerInfo; /* For any general information the customer wishes to store */
+} Gp10MgmtInfoMib;
+
+typedef struct ViperAccessMib_t
+{
+ MibTableInfo info; /* Current Status of table. */
+ char *readCommunity; /* Read Community */
+ char *writeCommunity; /* write Community */
+} ViperAccessMib;
+
+
+typedef struct Gp10ErrorInfoMib_t {
+ MibTableInfo info; /* Current Status of table. */
+ char *errorCode_L1;
+ char *errorCode_MD;
+ char *errorCode_RM;
+ char *errorCode_MM;
+ char *errorCode_CC;
+ char *errorCode_L2;
+ char *errorCode_SMS;
+ char *errorCode_OAM;
+ char *errorCode_H323;
+ char *errorCode_LUDB;
+ char *errorCode_EXT;
+ char *errorCode_LOG;
+ char *errorCode_MCH;
+ char *errorCode_ALARM;
+ char *errorCode_SYSINIT;
+ char *errorCode_GRR;
+ char *errorCode_CDR;
+} Gp10ErrorInfoMib;
+
+typedef struct Gp10CdrMib_t {
+ MibTableInfo info; /* Current Status of table. */
+ Boolean cdrClientSSLEnable;
+ INTEGER cdrLongCallTimer;
+} Gp10CdrMib;
+
+/* New Structures to support GPRS */
+
+typedef struct BtsGsBasicPackage_t {
+ IpAddress gprsServerIpAddress ; /* Ip Address of GPRS Server */
+ INTEGER gprsRac ; /* Routing Area Code Number */
+ EnableDisable enableGprs ; /* Enable / Disable GPRS */
+ OperationalState gprsOperationalStatus; /* Operational Status of GPRS Server */
+} BtsGsBasicPackage;
+
+
+typedef struct BtsGsOptionPackage_t {
+ INTEGER nmo;
+ INTEGER t3168;
+ INTEGER t3192;
+ INTEGER drxTimerMax;
+ INTEGER accessBurstType;
+ INTEGER controlAckType;
+ INTEGER nmbsCvMax;
+ INTEGER panDec;
+ INTEGER panInc;
+ INTEGER panMax;
+ NetworkColourCode raColour;
+ Si13Position si13Position;
+ CbchTrxSlot cbchTrxSlot;
+ CbchTrx cbchTrx;
+ BcchChangeMark bcchChangeMark;
+ SiChangeField siChangeField;
+}BtsGsOptionPackage;
+
+
+typedef struct NcFrequencyListEntry_t {
+ INTEGER ncFrequencyListIndex;
+ AbsoluteRFChannelNo ncFrequency;
+} NcFrequencyListEntry;
+
+typedef struct Rss_t {
+ INTEGER gprsMsTxpwrMaxCch;
+ INTEGER gprsRexLevAccessMin;
+ INTEGER gprsReselectOffset;
+ INTEGER priorityClass;
+ INTEGER lsaId;
+ INTEGER hcsThreshold;
+ INTEGER gprsTemporaryOffset;
+ INTEGER gprsPenaltyTime;
+ INTEGER gprsCellReselectHysteresis;
+ INTEGER gprsRaReselectHysteresis;
+ INTEGER c32Qual;
+ INTEGER c31Hysteresis;
+ INTEGER alpha;
+ INTEGER pB;
+ INTEGER networkControlOrder;
+ Table* ncFrequencyListTable;
+ INTEGER ncReportingPeriodI;
+ INTEGER ncReportingPeriodT;
+ INTEGER extMeasurementOrder;
+ INTEGER extReportingPeriod;
+ INTEGER extReportingType;
+ INTEGER intFrequency;
+ INTEGER nccPermitted;
+ INTEGER pcMeasChan;
+ INTEGER tavgW;
+ INTEGER tavgT;
+ INTEGER navgI;
+ RxLev gprsMsTargetPower;
+ Boolean spgcCcchSup;
+}Rss;
+
+typedef struct RlcMac_t {
+ INTEGER t3169;
+ INTEGER t3191;
+ INTEGER t3193;
+ INTEGER t3195;
+} RlcMac;
+
+typedef struct Bssgp_t {
+ INTEGER blockTimer;
+ INTEGER resetTimer;
+ INTEGER suspendTimer;
+ INTEGER resumeTimer;
+ INTEGER capUpdateTimer;
+ INTEGER blockRetries;
+ INTEGER unBlockRetries;
+ INTEGER resetRetries;
+ INTEGER suspendRetries;
+ INTEGER resumeRetries;
+ INTEGER raCapUpdateRetries;
+ INTEGER timeInterval;
+ INTEGER networkPort;
+} Bssgp;
+
+typedef struct BtsGsMeasPackage_t {
+ INTEGER flushReqRecvd;
+ INTEGER pagingReqRecvd;
+ INTEGER meanPsInterArrivalTime;
+ INTEGER availablePdch;
+ INTEGER meanAvailablePdch;
+ INTEGER maxAvailablePdch;
+ INTEGER minAvailablePdch;
+ INTEGER meanOccupiedPdch;
+ INTEGER maxOccupiedPdch;
+ INTEGER minOccupiedPdch;
+ INTEGER availablePdchAllocTime;
+ INTEGER packetPagingMessages;
+ INTEGER pagchQueueLength;
+ INTEGER pagesDiscardedFromPpch;
+ INTEGER assignmentRequest;
+ INTEGER succAssignmentProc;
+ INTEGER succPdtchSeizures;
+ INTEGER meanPacketQueueLength;
+ INTEGER serviceChanges;
+} BtsGsMeasPackage;
+
+
+#endif /* defined CISCO_GP10_MIB */
diff --git a/data/mnet/GP10/Host/Common_To_Host/include/vipertbl.h b/data/mnet/GP10/Host/Common_To_Host/include/vipertbl.h
new file mode 100644
index 0000000..3112b8e
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/include/vipertbl.h
@@ -0,0 +1,334 @@
+#ifndef JETCELL_VIPERCELL_MIB_CONTROL_TABLES
+#define JETCELL_VIPERCELL_MIB_CONTROL_TABLES
+
+#include <sys/times.h> /* For the timeval structure */
+
+#define USECS_PER_SEC 1000000 /* Timers for delayed callbacks */
+#define NSECS_PER_SEC 1000000000 /* Timers for delayed callbacks */
+#define NSECS_TO_USECS (NSECS_PER_SEC/USECS_PER_SEC)
+#define TICKS_PER_SEC 64
+
+#define SECONDS USECS_PER_SEC /* Use microsecond based timers */
+#define IN_HALF_SECOND (SECONDS/2)
+#define IN_1_SECOND (SECONDS)
+#define IN_2_SECONDS (2*SECONDS)
+#define IN_3_SECONDS (3*SECONDS)
+#define IN_5_SECONDS (5*SECONDS)
+#define IN_10_SECONDS (10*SECONDS)
+#define IN_15_SECONDS (15*SECONDS)
+#define IN_30_SECONDS (30*SECONDS)
+Status snmp_loadMib( char * );
+Status snmp_saveMib( char * );
+STATUS snmp_initDefaultMib() ;
+int snmpMibWriteDelayTimeoutHandler(int arg);
+void snmp_initIoTask();
+int snmp_reboot(int);
+
+
+/* defined in vipermib.c */
+extern char* int2ip(UINT32 nIp);
+Status snmp_lockMib( int );
+void snmp_fixupTable( Table * );
+int strncasecmp(char *, char *, int);
+int snmp_retryLoad(int, int, int, int);
+void snmp_log(int flag, char *name, char *, ...);
+char * snmp_tagName(MibTag tag);
+void snmp_mibTimerInit();
+void snmp_mibTimerDelete();
+int snmpMibWriteDelayTimeoutHandler(int arg);
+void snmp_mibTimerSet(char* arg);
+void snmp_trapBroadcast(MibTag tag);
+int snmp_findTag(const void *, const void *);
+Status snmp_validTag( MibTag );
+
+extern Table *mnetMibDataTypeTable;
+extern int snmpRemoteIP;
+
+typedef struct MnetMib_t { /* Mib Table ID*/
+ BtsBasicPackage btsBasicPackage; /* 0 */
+ BtsOptionsPackage btsOptionsPackage; /* 1 */
+ FirstTransceiverPackage firstTransceiverPackage; /* 2 */
+ SecondTransceiverPackage secondTransceiverPackage; /* 3 */
+ FirstRadioCarrierPackage firstRadioCarrierPackage; /* 4 */
+ SecondRadioCarrierPackage secondRadioCarrierPackage; /* 5 */
+ BtsTimerPackage btsTimerPackage; /* 6 */
+ T200 t200; /* 7 */
+ T31xx t31xx; /* 8 */
+ AdjacentCellPackage adjacentCellPackage; /* 9 */
+ FrequencyHoppingPackage frequencyHoppingPackage; /* 10 */
+ HandoverControlPackage handoverControlPackage; /* 11 */
+ HoAveragingAdjCellParam hoAveragingAdjCellParam; /* 12 */
+ HoAveragingDistParam hoAveragingDistParam; /* 13 */
+ HoAveragingLevParam hoAveragingLevParam; /* 14 */
+ HoAveragingQualParam hoAveragingQualParam; /* 15 */
+ HoThresholdDistParam hoThresholdDistParam; /* 16 */
+ HoThresholdInterfaceParam hoThresholdInterfaceParam; /* 17 */
+ HoThresholdLevParam hoThresholdLevParam; /* 18 */
+ HoThresholdQualParam hoThresholdQualParam; /* 19 */
+ InterferenceAveragingParam interferenceAveragingParam; /* 20 */
+ PowerControlPackage powerControlPackage; /* 21 */
+ PcAveragingLev pcAveragingLev; /* 22 */
+ PcAveragingQual pcAveragingQual; /* 23 */
+ PcLowerThresholdLevParam pcLowerThresholdLevParam; /* 24 */
+ PcLowerThresholdQualParam pcLowerThresholdQualParam; /* 25 */
+ PcUpperThresholdLevParam pcUpperThresholdLevParam; /* 26 */
+ PcUpperThresholdQualParam pcUpperThresholdQualParam; /* 27 */
+ CellMeasurmentPackage cellMeasurmentPackage; /* 28 */
+ CallControlMeasurmentPackage callControlMeasurmentPackage; /* 29 */
+ CallConfigData callConfigData; /* 30 */
+ MobilityConfigData mobilityConfigData; /* 31 */
+ ResourceConfigData resourceConfigData; /* 32 */
+ OamConfigData oamConfigData; /* 33 */
+ H323Data h323Data; /* 34 */
+ DualTRXSCard dualTRXSCard; /* 35 */
+ ArfcnRssiFunction arfcnRssiFunction; /* 36 */
+ ClockCard clockCard; /* 37 */
+ GpsCard gpsCard; /* 38 */
+ PowerCard powerCard; /* 39 */
+ ExternalPowerSupply externalPowerSupply; /* 40 */
+ CdcBoard cdcBoard; /* 41 */
+ AutomaticParameterAllocation automaticParameterAllocation; /* 42 */
+ Gp10MgmtInfoMib gp10MgmtInfoMib; /* 43 */
+ MaintenanceConfigData maintenanceConfigData; /* 44 */
+ Gp10ErrorInfoMib gp10ErrorInfoMib; /* 45 */
+ ViperAccessMib viperAccessMib; /* 46 */
+ TrapFwdData trapFwdData; /* 47 */
+
+ /* New Structures for supporting GS */
+ BtsGsBasicPackage btsGsBasicPackage;
+ BtsGsOptionPackage btsGsOptionPackage;
+ Rss rss;
+ RlcMac rlcMac;
+ Bssgp bssgp;
+ BtsGsMeasPackage btsGsMeasPackage;
+ Gp10CdrMib gp10CdrMib; /* 54 */
+ HandoverTimerMib handoverTimerMib; /* 55 */
+ Gp10ServiceStatusMib gp10ServiceStatusMib; /* 56 */
+} MnetMib;
+
+extern MnetMib mnetMib;
+
+/* The following are used to process the varbinds for the SNMP PDU's
+ */
+
+#define VB_TAG (int)VB_TO_COOKIE
+#define VB_TYPE(vb) ((((int)VB_TAG(vb))>>28)&0xF)
+#define VB_SIZE(vb) ((((int)VB_TAG(vb))>>16)&0xFFF)
+#define VB_TBL(vb) ((((int)VB_TAG(vb))>>8)&0xFF)
+#define VB_ITM(vb) (((int)VB_TAG(vb))&0xFF)
+
+#define VB_STATIC MTYPE_STATIC
+#define VB_NUMBER MTYPE_NUMBER
+#define VB_STRING MTYPE_STRING
+#define VB_TABLE MTYPE_TABLE
+#define VB_TENTRY MTYPE_TENTRY
+#define VB_TSTRING MTYPE_TSTRING
+
+
+
+/* In addition to the root structure, there are several tables that are
+ * used inthe MIB. These tables are allocated at runtime in the initialization
+ * routine. The following variables define the limits of these tables.
+ */
+
+#define CellAllocationTableLimit 32
+#define PlmnPermittedTableLimit 16
+#define NotAllowedAccessClassTableLimit 16
+#define CarrierFrequencyTableLimit 16
+#define ChannelTableLimit 8
+#define HandoverTableLimit 16
+#define ReselectionTableLimit 16
+#define MobileAllocationTableLimit 16
+#define AttImmediateAssingProcsPerCauseTableLimit 16
+#define SuccImmediateAssingProcsPerCauseTableLimit 16
+#define ExternalHDOsPerCauseTableLimit 16
+#define Oam_TestTableLimit 4
+#define ArfcnRssiClockControlTableLimit 64
+#define ApaInvalidFrequencyTableLimit 64
+#define ApaClockSourceFrequencyTableLimit 64
+#define TrapFwdTableLimit 8
+
+/* New defines to support Gs */
+#define NcFrequencyListTableLimit 16
+
+
+#define LIMIT_oam_testValue MIN_oam_testValue
+
+/* Note: This table is written out to the MIB data file as an index
+ to the contents. Because of this, it is difficult to change
+ the contents of this table. Once can use the SNMP MIB version
+ number to indicate a different format of the MIB data and do
+ a conversion upon loading the data I suppose. */
+
+typedef struct MnetMibIndex_t {
+ MibTag tag; /* Tag for this table address. */
+ void *addr; /* Address of the struct */
+ int size; /* Size of the structure */
+ int limit; /* Table limit. */
+ int offset; /* Seek offset. */
+} MnetMibIndex;
+
+extern MnetMibIndex mnetMibIndex[];
+
+typedef struct OidPrefix_t {
+ MibTag tag;
+ char *prefix;
+} OidPrefix;
+
+typedef struct Mib2Access_t {
+ STATUS (*get)(char *);
+ STATUS (*set)(unsigned int, char *);
+} Mib2Access;
+
+extern MnetMibIndex *mibFileIndex;
+
+typedef enum Access_t {
+ no_access=0,
+ read_only=1,
+ write_only=2,
+ read_write=3,
+} Access;
+
+typedef struct ViewAccess_t {
+ struct ViewAccess_t *next; /* Null = Last item in list. */
+ int view; /* The view this applies to. */
+ Access allowed; /* the access for this view. */
+} ViewAccess;
+
+/* The following table is used to supply the data types for each of the
+ * items in the MIB. It would be nice if this information were stored
+ * in the SNMP control information, but that would require changes to
+ * mibcomp. We can extract most of the TYPE_... flags with the -array
+ * switch to mibcomp. Unfortunately, it does not include any structural
+ * elements. Since we need an entry for each MIB_TAG, we cannot use
+ * mibcomp to directly generate this table.
+ */
+
+typedef struct MnetMibDataType_T
+ {
+ int tag;
+ int type;
+ int value;
+ int flag;
+ ViewAccess *access;
+ char *name;
+} MnetMibDataType;
+
+#define DTYPE(tag, typ, val, flg) { tag, typ, val, flg, 0, #tag }
+
+extern MnetMibDataType mnetMibDataType[];
+
+#define SAVE_ASCII_OMIT 1
+
+#define TYPE_INTEGER 0
+#define TYPE_OBJECT_IDENTIFIER 1
+#define TYPE_BITS 2
+#define TYPE_OCTET_STRING 3
+#define TYPE_ObjectName 4
+#define TYPE_NetworkAddress 5
+#define TYPE_IpAddress 6
+#define TYPE_Counter 7
+#define TYPE_Gauge 8
+#define TYPE_TimeTicks 9
+#define TYPE_Opaque 10
+/* #define TYPE_ObjectName 11 */
+#define TYPE_NotificationName 12
+#define TYPE_Integer32 13
+/* #define TYPE_IpAddress 14 */
+#define TYPE_Counter32 15
+#define TYPE_Gauge32 16
+/* #define TYPE_TimeTicks 17 */
+/* #define TYPE_Opaque 18 */
+#define TYPE_Counter64 19
+#define TYPE_Unsigned32 20
+#define TYPE_DisplayString 21
+#define TYPE_PhysAddress 22
+#define TYPE_MacAddress 23
+#define TYPE_TruthValue 24
+#define TYPE_TestAndIncr 25
+#define TYPE_AutonomousType 26
+#define TYPE_InstancePointer 27
+#define TYPE_VariablePointer 28
+#define TYPE_RowPointer 29
+#define TYPE_RowStatus 30
+#define TYPE_TimeStamp 31
+#define TYPE_TimeInterval 32
+#define TYPE_DateAndTime 33
+#define TYPE_StorageType 34
+#define TYPE_TDomain 35
+#define TYPE_TAddress 36
+#define TYPE_SnmpUDPAddress 37
+#define TYPE_SnmpOSIAddress 38
+#define TYPE_SnmpNBPAddress 39
+#define TYPE_SnmpIPXAddress 40
+#define TYPE_TBCD_STRING 41
+#define TYPE_AbsoluteRFChannelNo 42
+#define TYPE_AveragingNumber 43
+#define TYPE_CauseCode 44
+#define TYPE_CellIdentity 45
+#define TYPE_CellReselectHysteresis 46
+#define TYPE_ChannelID 47
+#define TYPE_ClassNumber 48
+#define TYPE_FrequencyUsage 49
+#define TYPE_GSMGeneralObjectID 50
+#define TYPE_HoMargin 51
+#define TYPE_HoPriorityLevel 52
+#define TYPE_HoppingSequenceNumber 53
+#define TYPE_L2Timer 54
+#define TYPE_L3Timer 55
+#define TYPE_LocationAreaCode 56
+#define TYPE_MaxQueueLength 57
+#define TYPE_MobileCountryCode 58
+#define TYPE_MobileNetworkCode 59
+#define TYPE_MSRangeMax 60
+#define TYPE_NetworkColourCode 61
+#define TYPE_NoOfBlocksForAccessGrant 62
+#define TYPE_NoOfMultiframesBetweenPaging 63
+#define TYPE_Ny1 64
+#define TYPE_PlmnPermitted 65
+#define TYPE_PowerControlInterval 66
+#define TYPE_PowerIncrStepSize 67
+#define TYPE_PowerRedStepSize 68
+#define TYPE_QueueTimeLimit 69
+#define TYPE_RadioLinkTimeout 70
+#define TYPE_RxLev 71
+#define TYPE_RxQual 72
+#define TYPE_TimerPeriodicUpdateMS 73
+#define TYPE_Tsc 74
+#define TYPE_TxInteger 75
+#define TYPE_TxPower 76
+#define TYPE_TxPwrMaxReduction 77
+#define TYPE_Weighting 78
+#define TYPE_AdministrativeState 79
+#define TYPE_AlarmStatus 80
+#define TYPE_Boolean 81
+#define TYPE_ChannelCombination 82
+#define TYPE_DtxUplink 83
+#define TYPE_EnableHoType 84
+#define TYPE_GsmdcsIndicator 85
+#define TYPE_MaxRetrans 86
+#define TYPE_OperationalState 87
+#define TYPE_PowerClass 88
+#define TYPE_SnmpTrapType 89
+#define TYPE_Si13Position 90
+#define TYPE_CbchTrxSlot 91
+#define TYPE_CbchTrx 92
+#define TYPE_BcchChangeMark 93
+#define TYPE_SiChangeField 94
+
+
+#define TYPE_StructurePointer 1000
+#define TYPE_TablePointer 1001
+#define TYPE_TableEntryPointer 1002
+#define TYPE_String 1003
+#define TYPE_Complex 1004
+#define TYPE_Average 1005
+#define TYPE_Deviation 1006
+#define TYPE_Maximum 1007
+#define TYPE_Minimum 1008
+#define TYPE_ResetValue 1009
+#define TYPE_MIB2_Value 1010
+
+#endif /* defined JETCELL_VIPERCELL_MIB_CONTROL_TABLES */
+
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/JCCComIE.h b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCComIE.h
new file mode 100644
index 0000000..fae1f25
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCComIE.h
@@ -0,0 +1,79 @@
+#ifndef JCCComIE_H
+#define JCCComIE_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCCComIE.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 05-10-99
+// Description : Common ie interface among Application (Layer 3)
+// modules.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// included MD and IRT headers for messages from MS
+#if !defined(_WINDOWS_) && !defined(WIN32)
+#include "ril3/ril3md.h"
+#endif
+
+#include "ril3/ie_bearer_capability.h"
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+// *******************************************************************
+// Constant Definitions
+// *******************************************************************
+
+// Typedefs
+//
+
+typedef struct {
+ unsigned short networkId; // Identifies the network
+ unsigned short cellId; // Identifies the cell within the network
+}JcVipercellId_t ;
+
+// Bearer Type
+typedef enum {
+ BEARER_BASE = 0,
+ BEARER_SPEECH = BEARER_BASE,
+ BEARER_DATA,
+ BEARER_SIGNALING
+
+} BearerType_t;
+
+// Speech Chann Rate, etc
+typedef struct {
+
+ T_CNI_RIL3_SPEECH_VERSION version;
+
+} SpeechChann_t;
+
+// Resource (Channel) Type - Needs expansion later.
+typedef struct {
+ BearerType_t bearerType;
+ union
+ {
+ // If bearer type indicates speech
+ SpeechChann_t speechChann;
+ // If bearer type indicates data
+ // DataChann_t dataChann;
+ };
+
+} L3RMChannelType_t;
+
+#endif // JCCComIE_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/JCCComMsg.h b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCComMsg.h
new file mode 100644
index 0000000..6b8a6e7
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCComMsg.h
@@ -0,0 +1,299 @@
+#ifndef JCCComMsg_H
+#define JCCComMsg_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCCComMsg.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : message and ie interface among Application (Layer 3)
+// modules.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+#include "MnetModuleId.h"
+
+#include "ril3/ie_cause.h" //CASUE<xxu:03-20-00>
+#include "ril3/ie_mobile_id.h"
+#include "ril3/msg_paging_response.h"
+#include "ril3/msg_cm_service_request.h"
+#include "ril3/msg_cipher_mode_command.h"
+#include "ril3/msg_cipher_mode_complete.h"
+
+// include Handover Message definitions
+#include "jcchomsg.h"
+#include "JCCVcMsg.h"
+#include "SmsPP/smspp_inf.h"
+
+#include "cc/CCTypes.h"
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+// *******************************************************************
+// Constant Definitions
+// *******************************************************************
+
+const int JCC_UNDEFINED = -1;
+const int JCC_ERROR = -1;
+const int JCC_SUCCESS = 0;
+
+const int SAPI_MAIN = 0;
+const int SAPI_SMS = 3;
+
+// Typedefs
+//
+
+// Primitive Type for Intra L3 Messages
+typedef enum {
+
+ // Data Request / Data Indication ----------------------------
+
+ INTRA_L3_DATA = 0,
+
+ // RR Primitives ----------------------------------------------
+ INTRA_L3_RR_PRIM_BASE = 9,
+ INTRA_L3_RR_EST_REQ,
+ INTRA_L3_RR_REL_REQ,
+ INTRA_L3_RR_REL_CNF,
+ INTRA_L3_RR_EST_CNF,
+ INTRA_L3_RR_REL_IND,
+ INTRA_L3_RR_EST_REJ,
+
+ // MM Primitives ----------------------------------------------
+ INTRA_L3_MM_PRIM_BASE = 19,
+ INTRA_L3_MM_EST_IND,
+ INTRA_L3_MM_EST_REQ,
+ INTRA_L3_MM_EST_CNF,
+ INTRA_L3_MM_EST_REJ,
+
+ INTRA_L3_MM_REL_REQ,
+ INTRA_L3_MM_REL_IND
+
+} IntraL3PrimitiveType_t;
+
+// Message Type for Intra L3 Messages
+typedef enum {
+
+ INTRA_L3_NULL_MSG = 0,
+
+ // CC <-> RR Messages -----------------------------------------
+
+ INTRA_L3_CC_TO_RR_BASE = INTRA_L3_NULL_MSG,
+ INTRA_L3_RR_CHANN_ASSIGN_CMD,
+ INTRA_L3_RR_CHANN_ASSIGN_COM,
+ INTRA_L3_RR_CHANN_ASSIGN_FAIL,
+ INTRA_L3_RR_HANDOVER_REQUIRED,
+ INTRA_L3_RR_HANDOVER_COMMAND,
+ INTRA_L3_RR_HANDOVER_COMPLETE,
+ INTRA_L3_RR_HANDOVER_FAILURE,
+ INTRA_L3_RR_HANDOVER_ACCESS, //ext-HO <xxu:06-08-01>
+
+ // MM <-> RR Messages -----------------------------------------
+ INTRA_L3_MM_TO_RR_BASE = 9,
+ INTRA_L3_RR_PAGE_REQ,
+ INTRA_L3_RR_PAGE_RSP,
+ INTRA_L3_RR_HANDOVER_REQ,
+ INTRA_L3_RR_HANDOVER_REQ_ACK,
+ INTRA_L3_RR_HANDOVER_REQ_NACK,
+ INTRA_L3_RR_CIPHER_COMMAND,
+ INTRA_L3_RR_CIPHER_COMPLETE,
+
+ // MM <-> CC Messages -----------------------------------------
+
+ INTRA_L3_MM_LOCATE_MS = 20,
+
+
+ // CM (Connection Management) Messages
+ INTRA_L3_CM_BASE = 40,
+ INTRA_L3_CM_CONN_CMD,
+ INTRA_L3_CM_DISC_CMD,
+
+
+ // CC <-> H323 Messages -----------------------------------------
+ INTRA_L3_CC_Q931_BASE = 60,
+ INTRA_L3_CC_Q931_SETUP = INTRA_L3_CC_Q931_BASE,
+ INTRA_L3_CC_Q931_CALL_PROC = INTRA_L3_CC_Q931_BASE + (VOIP_MOBILE_CALL_EVENT_PROCEEDING - VOIP_MOBILE_CALL_EVENT_BASE),
+ INTRA_L3_CC_Q931_ALERTING = INTRA_L3_CC_Q931_BASE + (VOIP_MOBILE_CALL_EVENT_ALERTING - VOIP_MOBILE_CALL_EVENT_BASE),
+ INTRA_L3_CC_Q931_CONNECT = INTRA_L3_CC_Q931_BASE + (VOIP_MOBILE_CALL_EVENT_CONNECTED - VOIP_MOBILE_CALL_EVENT_BASE),
+ INTRA_L3_CC_H245_CHANN_READY = INTRA_L3_CC_Q931_BASE + (VOIP_MOBILE_CALL_EVENT_VOICE_CONNECTED - VOIP_MOBILE_CALL_EVENT_BASE),
+ INTRA_L3_CC_Q931_DISCONNECT = INTRA_L3_CC_Q931_BASE + (VOIP_MOBILE_CALL_EVENT_DISCONNECTED - VOIP_MOBILE_CALL_EVENT_BASE),
+
+ //BCT <xxu:07-13-00> BEGIN
+ INTRA_L3_CC_H450_BCT_STATUS = INTRA_L3_CC_Q931_BASE + (VOIP_MOBILE_CALL_EVENT_TRANSFER_STATUS - VOIP_MOBILE_CALL_EVENT_BASE),
+ //BCT <xxu:07-13-00> END
+
+ //Handle Call Progress message
+ INTRA_L3_CC_Q931_PROGRESS = INTRA_L3_CC_Q931_BASE + (VOIP_MOBILE_CALL_EVENT_PROGRESS - VOIP_MOBILE_CALL_EVENT_BASE),
+
+ INTRA_L3_CC_RAS_IP_ADDRESS_RESPONSE,
+
+ //BCT <xxu:08-11-00> BEGIN
+ INTRA_L3_CC_RAS_BCT_NUMBER_RESPONSE,
+ //BCT <xxu:08-11-00> END
+
+ //BCT <xxu:09-21-00>
+ INTRA_L3_CC_BCT_UPDATE_HANDLES ,
+
+
+ INTRA_L3_CC_H245_CHANN_SELECT ,
+ INTRA_L3_CC_VC_UPDATE_INFO ,
+
+ INTRA_L3_SMS_MESSAGE ,
+
+ // LUDB <-> H323 Messages -----------------------------------------
+ INTRA_L3_LUDB_RAS_BASE = 80,
+ INTRA_L3_LUDB_RAS_URQ = INTRA_L3_LUDB_RAS_BASE,
+
+ // LUDB <-> CC Messages -----------------------------------------
+ // <Igal: 04-10-01>
+ INTRA_L3_LUDB_CC_BASE = 90,
+ INTRA_L3_LUDB_PURGE_PROFILE = INTRA_L3_LUDB_CC_BASE,
+
+ // Miscellaneous Messages ------------------------------------
+
+ INTRA_L3_TIMEOUT_MSG = 120
+
+} IntraL3MsgType_t;
+
+
+// messages sent from CM to LAPDM (DL)
+typedef enum
+{
+ L3L2_DL_EST_REQ = 1
+
+} L3L2MsgType_t;
+
+
+// Resource (Channel) Assignment Command
+typedef struct {
+ L3RMChannelType_t channelType;
+} IntraL3ChannAssignCmd_t;
+
+// Paging Request
+typedef struct {
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+ MSG_Q_ID qid;
+} IntraL3PageRequest_t;
+
+typedef T_CNI_RIL3RRM_MSG_PAGING_RESPONSE IntraL3PageResponse_t;
+
+typedef T_CNI_RIL3MM_MSG_CM_SERVICE_REQUEST IntraL3CMServiceRequest_t;
+
+//CIPH<xxu:02-10-00>moved to jcchomsg.h Begin
+// RM <--> MM Ciphering Message
+//#define CIPHER_KC_LEN 8
+//typedef struct{
+// T_CNI_RIL3RRM_MSG_CIPHER_MODE_COMMAND cmd;
+// unsigned char Kc[CIPHER_KC_LEN];
+//} IntraL3CipherModeCommand_t;
+
+//typedef struct{
+// T_CNI_RIL3RRM_MSG_CIPHER_MODE_COMPLETE cmp;
+//} IntraL3CipherModeComplete_t;
+//CIPH<xxu:02-10-00> moved to jcchomsg.h End
+
+// CISS <--> CC Message
+typedef struct
+{
+ long Magic;
+ long callIdx;
+ long msgType;
+ long status; // holds cause if any
+ long msgLen;
+ unsigned char msg[CNI_LAPDM_MAX_L3MSG_LENGTH];
+}CISSVblinkMsg_t;
+
+#define kCissVbLinkMsgHdrLen (sizeof(long) * 5)
+
+// Intra L3 Setup Message
+typedef struct {
+ VOIP_API_CALL_OFFERING_MSG callOffering;
+ VOIP_MOBILE_HANDLE mobHandle;
+} IntraL3Setup_t;
+
+// Not needed with the new CSU - should be removed with CSU regression testing
+// Connection Command
+typedef struct {
+ HJCRTPSESSION hrtpHandle; // RTP Handle
+
+} IntraL3ConnectCmd_t;
+
+//RR and MM Release Indication
+typedef struct {
+ T_CNI_RIL3_CAUSE_VALUE cause;
+
+} IntraL3RrRelInd_t, IntraL3MmRelInd_t;
+
+union IntraL3MsgData_t
+{
+ IntraL3ChannAssignCmd_t channAssignCmd;
+ IntraL3PageRequest_t pageReq;
+ IntraL3PageResponse_t pageRsp;
+ IntraL3CMServiceRequest_t servReq;
+ IntraL3Setup_t setup;
+ IntraL3ConnectCmd_t connectCmd;
+
+ // Handover Messages
+ IntraL3HandoverRequest_t handReq;
+ IntraL3HandoverRequestAck_t handReqAck;
+ IntraL3HandoverRequestNack_t handReqNack;
+ IntraL3HandoverRequired_t handReqd;
+ IntraL3HandoverCommand_t handCmd;
+ IntraL3HandoverComplete_t handCmplt;
+ IntraL3HandoverFailure_t handFail;
+
+ // Ciphering
+ IntraL3CipherModeCommand_t cipherCmd;
+ IntraL3CipherModeComplete_t cipherCmplt;
+
+ // Voip Messages
+ VBLINK_API_VC_IP_ADDRESS_RESPONSE_MSG ipAddressResponse;
+ VBLINK_API_VC_BCT_NUMBER_RESPONSE_MSG bctNumberResponse;
+ CCRemMsgData_t voipMsg;
+ CISSVblinkMsg_t cissMsg;
+ SmsVblinkMsg_t smsVbMsg;
+
+ IntraL3InfoVC_t statusVCMsg;
+};
+
+// Message format between RM, MM and CC */
+
+typedef struct {
+ T_CNI_MODULE_ID module_id; // origin of a message
+ T_CNI_IRT_ID entry_id; // entry ID in IRT table
+ union
+ {
+ IntraL3PrimitiveType_t primitive_type; // Intra-L3 primitive type
+ VOIP_CALL_HANDLE call_handle; // call handle
+ VOIP_MOBILE_HANDLE mob_handle; // mobile handle
+
+ int signature; // CDR <xxu:08-22-00>
+ };
+ IntraL3MsgType_t message_type; // Intra-L3 Message type
+ IntraL3MsgData_t l3_data; // Enclosed Message
+
+ // T_CNI_LAPDM_SAPI sapi; // associated SAPI
+
+ //CASUE<xxu:03-20-00> cause value if it is release indication
+ T_CNI_RIL3_CAUSE_VALUE cause;
+
+ unsigned short H323CRV; // CDR <xxu:08-24-00>
+ unsigned short callleg_id; // ext-HO <chenj:06-25-01>
+
+} IntraL3Msg_t;
+
+#endif // JCCComMsg_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/JCCEHoMsg.h b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCEHoMsg.h
new file mode 100644
index 0000000..f538e0d
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCEHoMsg.h
@@ -0,0 +1,160 @@
+#ifndef JCCEHoMsg_H
+#define JCCEHoMsg_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCCEHoMsg.h
+// Author(s) : Xiaode, Tai and Joe
+// Create Date : 05-15-01
+// Description : External handover message and interface among
+// applications
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+#include "MnetModuleId.h"
+
+// Instead of including JcVcToVc.h, just define the types that
+// are needed in this module. For the long term, must solve
+// this cyclical include problem
+//#include "JcVcToVc.h"
+// ---------------------------------------------------------------
+typedef MNET_MODULE_ID JcModuleId_t;
+typedef short JcSubId_t;
+// ---------------------------------------------------------------
+
+#include "voip/exchangeho.h"
+#include "ril3/ril3md.h"
+#include "ril3/ie_called_bcd.h"
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+// *******************************************************************
+// Constant Definitions
+// *******************************************************************
+
+// *******************************************************************
+// Type Definitions
+// *******************************************************************
+
+// Perform Handover Request
+typedef struct {
+ GlobalCellId_t globalCellID;
+ USHORT hoCause;
+ bool hoNumberReqd;
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER handoverNumber;
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER mscNumber;
+ A_INTERFACE_MSG_STRUCT_t A_HANDOVER_REQUEST;
+} InterHoaVcPerformHandover_t;
+
+// End Handover
+typedef struct {
+ USHORT reason;
+} InterHoaVcEndHandover_t;
+
+// Post Handover Mob Event
+typedef struct {
+ LAYER3PDU_STRUCT_t LAYER3PDU;
+} InterHoaVcPostHoMobEventData_t;
+
+// Perform Handover Ack
+typedef struct {
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER handoverNumber;
+ A_INTERFACE_MSG_STRUCT_t A_INTERFACE_MSG;
+ USHORT reason;
+} InterHoaVcPerformHandoverAck_t;
+
+// Perform Handover Access Message
+typedef struct
+{
+ A_INTERFACE_MSG_STRUCT_t A_INTERFACE_MSG;
+} InterHoaVcHandoverAccess_t;
+
+// Perform Handover Success Message
+typedef struct
+{
+ A_INTERFACE_MSG_STRUCT_t A_INTERFACE_MSG;
+} InterHoaVcHandoverSuccess_t;
+
+// Perform Handback Request Message
+typedef struct
+{
+ GlobalCellId_t globalCellID;
+ USHORT hoCause;
+ bool externalCell;
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER mscNumber;
+ A_INTERFACE_MSG_STRUCT_t A_HANDOVER_REQUEST;
+} InterHoaVcPerformHandback_t;
+
+// Perform Handback Ack Message
+typedef struct
+{
+ A_INTERFACE_MSG_STRUCT_t A_INTERFACE_MSG;
+ USHORT reason;
+} InterHoaVcPerformHandbackAck_t;
+
+// Release HOA Message
+typedef struct
+{
+} InterHoaVcReleaseHOA_t;
+
+
+// Message Type for External Handover Messages
+typedef enum {
+
+ INTER_EHO_NULL_MSG = 0,
+ INTER_EHO_BASE = INTER_EHO_NULL_MSG,
+
+ INTER_EHO_PERFORM_HANDOVER_REQUEST,
+ INTER_EHO_PERFORM_HANDOVER_ACK,
+ INTER_EHO_END_HANDOVER,
+ INTER_EHO_HANDOVER_ACCESS,
+ INTER_EHO_HANDOVER_SUCCESS,
+ INTER_EHO_HANDOVER_MOB_EVENT,
+ INTER_EHO_PERFORM_HANDBACK_REQUEST,
+ INTER_EHO_PERFORM_HANDBACK_ACK,
+ INTER_EHO_COMPLETE_HANDBACK //ext-HO <xxu:06-08-01>
+} InterEHOMsgType_t;
+
+
+union InterEHOMsgData_t
+{
+ InterHoaVcPerformHandover_t perfExtHandoverReq;
+ InterHoaVcPerformHandoverAck_t perfExtHandoverAck;
+ InterHoaVcEndHandover_t extEndHandover;
+ InterHoaVcHandoverAccess_t extHandoverAccess;
+ InterHoaVcHandoverSuccess_t extHandoverSuccess;
+ InterHoaVcReleaseHOA_t extReleaseHOA;
+ InterHoaVcPostHoMobEventData_t postExtHoMobEventData;
+
+ InterHoaVcPerformHandback_t perfExtHandbackReq;
+ InterHoaVcPerformHandbackAck_t perfExtHandbackAck;
+} ;
+
+
+// Message format between CC and HOA
+typedef struct {
+ T_CNI_MODULE_ID module_id; // origin of a message
+
+ JcSubId_t origSubId; // optional origination Sub Id
+ JcSubId_t destSubId; // optional destination Sub Id
+
+ InterEHOMsgType_t msgType;
+ InterEHOMsgData_t msgData;
+
+} InterHoaVcMsg_t;
+
+#endif // JCCEHoMsg_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/JCCEvent.h b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCEvent.h
new file mode 100644
index 0000000..53ed283
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCEvent.h
@@ -0,0 +1,244 @@
+#ifndef JCCEvent_H
+#define JCCEvent_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCCEvent.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 10-19-98
+// Description : The Event space in the ViperCell
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+
+typedef enum
+{
+ // Internal common event definitions
+ // JCCInternalEvents
+
+ JCC_NULL_EVENT = 0,
+
+ // Internal event definitions for Call Control
+ // CCInternalEvents
+ CC_INTERNAL_EVENT_BASE = 30,
+
+ CC_RELEASE_CALL,
+
+ CC_RELEASE_OWN, //ext-HO <xxu:06-08-01>
+ CC_RELEASE_GP_HO, //ext-HO <xxu:06-30-01>
+ CC_RELEASE_GP_HB, //ext-HO <xxu:06-30-01>
+ CC_RELEASE_GP_H3, //ext-HO <xxu:06-30-01>
+ CC_RELEASE_EH_HB, //ext-HO <xxu:06-30-01>
+ CC_RELEASE_GP_EH_HB, //ext-HO <xxu:06-30-01>
+
+ CC_RELEASE_HOCALLLEG, //ext-HO <chenj:06-11-01>
+ CC_RELEASE_H3CALLLEG, //ext-HO <chenj:06-11-01>
+ CC_RELEASE_ALLHOCALLLEG, //ext-HO <chenj:06-11-01>
+
+ CC_MESSAGE_PROCESSING_COMPLT,
+
+ CC_INTERNAL_CHANN_EVENT_BASE = 50,
+
+ CC_RESOURCE_ASSIGN_COMPLT,
+ CC_RESOURCE_ASSIGN_FAIL,
+
+ CC_INTERNAL_GEN_EVENT_BASE = 60,
+
+ CC_TWO_STAGE_DISCONNECT,
+ CC_RESOURCE_ASSIGN_REQ,
+ CC_RES_RELEASE,
+
+ CC_MAKE_CONNECTION_REQ,
+ CC_CONNECT_COMPLT,
+ CC_CONNECT_FAIL,
+ CC_BREAK_CONNECTION_REQ,
+ CC_DISCONNECT_COMPLT,
+ CC_DISCONNECT_FAIL,
+ CC_APPLY_TONE,
+
+ CC_INTERNAL_CALL_EVENT_BASE = 90, //Igal: 22.03.00
+
+ CC_MM_CONNECTION_REQ, // 91
+ CC_MM_CONNECTION_CNF, // 92
+ CC_MM_CONNECTION_REJ, // 93
+ CC_MM_CONNECTION_REL, // 94
+ CC_MM_CONNECTION_IND, // 95 Igal: 22.03.00
+
+ // Local event definitions for CC Half Call State Machine
+ // HalfCallLocalEvents
+
+ HC_LOCAL_EVENT_BASE = 100,
+
+ HC_LOCAL_DISCONNECT_REQ,
+ HC_LOCAL_RELEASE_COMPLETE,
+ HC_LOCAL_CALL_PROGRESS,
+ HC_LOCAL_PROTOCOL_PROBLEM,
+ HC_LOCAL_INVALID_MSG_ERR,
+ HC_LOCAL_PROTOCOL_TIMEOUT,
+
+ // Mobile only
+ HC_LOCAL_RELEASE_REQ,
+ HC_LOCAL_STATUS_INFO,
+ HC_LOCAL_STATUS_ENQUIRY,
+
+ HC_LOCAL_START_DTMF,
+ HC_LOCAL_STOP_DTMF,
+
+ //CH<xxu:11-10-99>
+ HC_LOCAL_HOLD_ACT,
+ HC_LOCAL_HOLD_REJ,
+ HC_LOCAL_RETV_ACT,
+ HC_LOCAL_RETV_REJ,
+ HC_LOCAL_HOLD_REQ,
+ HC_LOCAL_RETV_REQ, //CH<xxu:Mod 12-13-99>
+ HC_LOCAL_CHTR_EXP,
+ HC_EXTNL_HOLD_REQ, //exception: handler given in sessionHandler
+ HC_EXTNL_RETV_REQ, //exception: handler given in sessionHandler
+
+ // Local event definitions for CC Term Half Call State Machine
+ // TermHalfCallEvents
+
+ //CH<xxu:11-24-99> 110->118
+ //Status Msg <bn> 118->130
+ THC_LOCAL_EVENT_BASE = 130,
+
+ THC_LOCAL_ALERTING,
+ THC_LOCAL_ANSWER,
+
+ // Local event definitions for CC Orig Half Call State Machine
+ // OrigHalfCallEvents
+
+ //CH<xxu:11-24-99> 115->121
+ //Status Msg <bn> 121->140
+ OHC_LOCAL_EVENT_BASE = 140,
+
+
+ OHC_LOCAL_ORIGINATION,
+ OHC_LOCAL_TERM_ADDRESS,
+ OHC_LOCAL_EMERGENCY_ORIGINATION,
+
+ // Mobile only
+ OHC_LOCAL_CONNECT_ACK,
+
+ // Remote event definitions for CC Half Call State Machine
+ // HalfCallRemoteEvents
+
+ //CH<xxu:11-24-99> 120->125
+ //Status Msg <bn> 125->150
+ HC_REMOTE_EVENT_BASE = 150,
+
+ HC_REMOTE_DISCONNECT_REQ,
+ HC_REMOTE_RELEASE_COMPLETE,
+ HC_REMOTE_CALL_PROGRESS,
+ HC_REMOTE_CONNECTION_CONTROL,
+ HC_REMOTE_CHANN_SELECT,
+
+ HC_REMOTE_DTMF_REQ,
+
+ OHC_REMOTE_ALERTING,
+ OHC_REMOTE_ANSWER,
+
+ THC_REMOTE_TERM_ADDRESS,
+
+ // BCT <xxu:07-07-00> BEGIN
+ OHC_REMOTE_BCT_INVOKE,
+ OHC_REMOTE_BCT_STATUS,
+ HC_VB_GET_BCT_NUMBER_RSP,
+ // BCT <xxu:07-07-00> END
+
+ // BCT <xxu:09-21-00>
+ HC_REMOTE_BCT_UPDATE_HANDLES,
+
+ HC_REMOTE_CALL_PROGRESS_1,
+
+ //Status Msg <bn> 150->170
+ HAND_SRC_EVENT_BASE = 170,
+
+ HC_VB_GET_VC_ADDRESS_REQ,
+ HC_VB_GET_VC_ADDRESS_RSP,
+
+ HAND_SRC_HO_REQD,
+ HAND_SRC_HO_FAIL,
+
+ HAND_SRC_TIMER_EXPIRY,
+
+ HAND_PERFORM_HO_ACK,
+ HAND_PERFORM_HO_NACK,
+ HAND_COMPLT_HO,
+ HAND_RLS_CALL,
+ HAND_POSTHO_MOB_EVENT,
+ HAND_POSTHO_HOA_EVENT, //ext-HO <xxu:07-03-01>
+
+ //Status Msg <bn> 180->200
+ HAND_TRG_EVENT_BASE = 200,
+
+ HAND_TRG_HO_REQ_ACK,
+ HAND_TRG_HO_REQ_NACK,
+ HAND_TRG_HO_COMPLT,
+
+ HAND_TRG_TIMER_EXPIRY,
+
+ HAND_PERFORM_HO_REQ,
+ HAND_ABORT_HO,
+
+ // ext-HO <chenj:05-29-01>
+ HAND_HO_ACCESS,
+ HAND_END_HO, // Make sure HAND_END_HO is the LAST event! (affects MAX_HO_SRC_EVENTS)
+
+ EXT_VC_FAIL,
+
+ SMS_EVENT_BASE = 300,
+ SMS_EVENT_MD_ERROR_IND , //301
+ SMS_EVENT_CP_DATA , //302
+ SMS_EVENT_CP_ACK , //303
+ SMS_EVENT_CP_ERROR , //304
+ SMS_EVENT_MNSMS_EST_REQ , //305
+ SMS_EVENT_MNSMS_DATA_REQ , //306
+ SMS_EVENT_MNSMS_REL_REQ , //307
+ SMS_EVENT_MNSMS_ABORT_REQ , //308
+ SMS_EVENT_TIMEOUT , //309
+ SMS_EVENT_PROTOCOL_ERROR , //310
+
+ SMS_EVENT_DEFAULT , //311
+ SMS_EVENT_MAX, //312
+
+ // ext-HO <chenj:05-29-01>
+ CC_INTERNAL_EHO_CALL_EVENT_BASE = 400,
+ OHC_EHO_LOCAL_TERM_ADDRESS,
+ OHC_EHO_REMOTE_CALL_PROGRESS,
+ OHC_EHO_REMOTE_ANSWER,
+ HC_EHO_REMOTE_CHANN_SELECT,
+
+ //ext-HO <xxu:06-08-01>
+ HC_EHO_REMOTE_CONNECTION_CONTROL,
+ HC_EHO_LOCAL_CALL_PROGRESS,
+ HC_EHO_LOCAL_DISCONNECT_REQ,
+ HC_EHO_REMOTE_DISCONNECT_REQ,
+ HC_EHO_LOCAL_PROTOCOL_TIMEOUT,
+
+ THC_EHO_REMOTE_TERM_ADDRESS,
+ THC_EHO_LOCAL_ANSWER,
+ CC_EHO_LAST_EVENT,
+ //ext-HO <xxu>
+
+} JCCEvent_t;
+
+#endif // JCCEvent_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/JCCHoMsg.h b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCHoMsg.h
new file mode 100644
index 0000000..9a8c480
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCHoMsg.h
@@ -0,0 +1,269 @@
+#ifndef JCCHoMsg_H
+#define JCCHoMsg_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCCHoMsg.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 05-10-99
+// Description : handover message and ie interface among Application (Layer 3)
+// modules.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// included MD and IRT headers for messages from MS
+#include "JCCComIE.h"
+
+// included MD and IRT headers for messages from MS
+#include "lapdm/lapdm_l3intf.h"
+
+// include H323 api file
+#include "voip/voipapi.h"
+
+// include ril3 cc types
+#include "ril3/ril3_cc_msg.h"
+
+#include "voip/exchangeho.h"
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+//<taiyu:05-18-01> Global Cell ID as defined in GSM 08.08 3.2.2.17
+
+// *******************************************************************
+// Constant Definitions
+// *******************************************************************
+
+const int MAX_CANDIDATE_CELLS = 6;
+
+// Typedefs
+//
+
+// Handover Request Cause
+typedef enum {
+ JC_FAILURE_BASE = 0,
+ JC_FAILURE_RADIO_RESOURCE_UNAVAILABLE = JC_FAILURE_BASE,
+ JC_FAILURE_CIPHERING_ALG_UNSUPPORTED,
+
+ JC_FAILURE_REVERT_TO_OLD,
+ JC_FAILURE_THO_TIMEOUT,
+ JC_FAILURE_T103_TIMEOUT,
+
+ JC_FAILURE_T204_TIMEOUT,
+
+ JC_FAILURE_TSHO_TIMEOUT,
+ JC_FAILURE_T203_TIMEOUT,
+
+ JC_FAILURE_T104_TIMEOUT,
+
+ //HO<xxu:01-27-00>ho fail causes
+
+ JC_FAILURE_ANCH_HO_DISALOWED,
+ JC_FAILURE_ANCH_VB_LINK_PROBLEM,
+ JC_FAILURE_ANCH_V3_FAILED,
+ JC_FAILURE_CSU_SIMPLEX_CONNETION,
+ JC_FAILURE_CALL_ALREADY_DROPPED,
+ JC_FAILURE_NTGT_CALL_RLS,
+ JC_FAILURE_OTGT_CALL_RLS,
+
+ //ext-HO <xxu:06-26-01>
+ JC_FAILURE_INPROPER_HANDOVER_STATE,
+ JC_FAILURE_ANCH_HO_RTP_HANDLE_NULL,
+ JC_FAILURE_ANCH_H3_RTP_HANDLE_NULL,
+ JC_FAILURE_A_INTERFACE_MESSAGE_ENCODING_FAILED,
+ JC_FAILURE_A_INTERFACE_MESSAGE_DECODING_FAILED,
+ JC_FAILURE_VBLINK_HANDBACK_FAILED,
+ JC_FAILURE_VBLINK_LOCATION_REQUEST_FAILED,
+ JC_FAILURE_A_INTERFACE_MESSAGE_TYPE_INCOMPATIBLE,
+ JC_FAILURE_A_HANDOVER_ACKNOWLEDGE_WITHOUT_L3_DATA,
+ JC_FAILURE_TARGETn_PERFORM_HANDOVER_REQ_NACK,
+ JC_FAILURE_T211_TIMEOUT,
+ JC_FAILURE_TARGETo_HANDOVER_FAILURE,
+ JC_FAILURE_IRT_TABLE_SET_FAILED,
+ JC_FAILURE_IRT_TABLE_GET_FAILED,
+ JC_FAILURE_CSU_UNI_CONNECT_FAILED,
+ JC_FAILURE_A_HANDOVER_FAILURE,
+ JC_FAILURE_HANDBACK_NOT_ALLOWED,
+ JC_FAILURE_REMOTE_END_HANDOVER,
+
+ //RETRY<xxu:05-01-00> BEGIN
+ JC_FAILURE_TVB_TIMEOUT
+ //RETRY<xxu:05-01-00> END
+
+ // Others added in the future as needed
+
+} JcFailureCause_t;
+
+//CIPH<xxu:02-10-00> Begin
+
+//RM <--> MM Ciphering Message
+#define CIPHER_KC_LEN 8
+typedef struct{
+ T_CNI_RIL3RRM_MSG_CIPHER_MODE_COMMAND cmd;
+ unsigned char Kc[CIPHER_KC_LEN];
+} IntraL3CipherModeCommand_t;
+
+typedef struct{
+ T_CNI_RIL3RRM_MSG_CIPHER_MODE_COMPLETE cmp;
+} IntraL3CipherModeComplete_t;
+
+//CIPH<xxu:02-10-00> End
+
+
+// Handover Request
+typedef struct {
+ L3RMChannelType_t channelType;
+
+ // Encryption Information to be added later
+
+ // Mobile Information to be added when required by RRM
+ IntraL3CipherModeCommand_t cipherCmd; //CIPH<xxu:02-10-00>
+
+ union
+ {
+ // Identifies the Handover Request Transaction from MM to RM
+ short mmId;
+ // Identifies the Handover Request Transaction from CC to MM
+ MSG_Q_ID qid;
+ };
+
+} IntraL3HandoverRequest_t;
+
+// Handover Request Ack
+typedef struct {
+ T_CNI_LAPDM_L3MessageUnit handCmd; // Complete Layer 3 RR Handover Command Message
+
+ // Echo back the index value that was received with the request
+ union
+ {
+ // Identifies the Handover Request Transaction from MM to RM
+ short mmId;
+ // Identifies the Handover Request Transaction from CC to MM
+ MSG_Q_ID qid;
+ };
+
+} IntraL3HandoverRequestAck_t;
+
+// Handover Request Nack
+typedef struct {
+ JcFailureCause_t cause;
+
+ // Echo back the index value that was received with the request
+ union
+ {
+ // Identifies the Handover Request Transaction from MM to RM
+ short mmId;
+ // Identifies the Handover Request Transaction from CC to MM
+ MSG_Q_ID qid;
+ };
+
+} IntraL3HandoverRequestNack_t;
+
+// Handover Required
+// <taiyu:05-18-01> Global Cell Id
+typedef struct {
+ GlobalCellId_t candGlobalCellId;
+ unsigned int candIsExternal;
+ unsigned int candIsTried;
+} candGlobalCellId_t;
+
+typedef struct {
+ unsigned char hoCause;
+ short numCandidates;
+
+ // The following shall be in descending priority order
+ // index 0 has the highest priority
+ candGlobalCellId_t candGlobalCellId[MAX_CANDIDATE_CELLS];
+
+} IntraL3HandoverRequired_t;
+
+// Handover Command
+typedef struct {
+ T_CNI_LAPDM_L3MessageUnit handCmd; // Complete Layer 3 RR Handover Command Message
+} IntraL3HandoverCommand_t;
+
+// Handover Complete
+typedef struct {
+
+} IntraL3HandoverComplete_t;
+
+// Handover Failure - used on the source side from RM to CC
+// ext-HO <xxu:06-25-01>
+typedef struct {
+ JcFailureCause_t cause;
+ int rrCause;
+} IntraL3HandoverFailure_t;
+
+// Perform Handover
+typedef struct {
+ UINT16 sourceInRtpPort;
+ L3RMChannelType_t channelType;
+ IntraL3CipherModeCommand_t cipherCmd; //CIPH<xxu:02-10-00>
+ GlobalCellId_t globalCellId;
+} InterVcPerformHandover_t;
+
+// Perform Handover Ack
+typedef struct {
+ UINT16 targetInRtpPort;
+ T_CNI_LAPDM_L3MessageUnit handCmd; // Complete Layer 3 RR Handover Command Message
+} InterVcPerformHandoverAck_t;
+
+// Perform Handover Nack
+typedef struct {
+ JcFailureCause_t cause;
+} InterVcPerformHandoverNack_t;
+
+// Abort Handover
+typedef struct {
+ JcFailureCause_t cause;
+} InterVcAbortHandover_t;
+
+// Complete Handover
+typedef struct {
+
+} InterVcCompleteHandover_t;
+
+// Anchor Remote Release
+typedef struct {
+ JcFailureCause_t cause;
+} InterVcReleaseCall_t;
+
+
+// Perform Handback
+typedef struct {
+ L3RMChannelType_t channelType;
+ unsigned char hoCause; //ext-HO <xxu:06-28-01>
+ //GlobalCellId_t globalCellId; //<taiyu:05-18-01> Global Cell Id
+ candGlobalCellId_t globalCellId;
+
+} InterVcPerformHandback_t;
+
+// Perform Handback Ack
+typedef struct {
+ T_CNI_LAPDM_L3MessageUnit handCmd; // Complete Layer 3 RR Handover Command Message
+} InterVcPerformHandbackAck_t;
+
+// Perform Handback Nack
+typedef InterVcPerformHandoverNack_t InterVcPerformHandbackNack_t;
+
+// Abort Handback
+typedef InterVcAbortHandover_t InterVcAbortHandback_t;
+
+// Complete Handback
+typedef struct {
+
+} InterVcCompleteHandback_t;
+
+#endif // JCCHoMsg_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/JCCL3Msg.h b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCL3Msg.h
new file mode 100644
index 0000000..3d7f9ff
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCL3Msg.h
@@ -0,0 +1,49 @@
+#ifndef JCCL3Msg_H
+#define JCCL3Msg_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCCL3Msg.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : message and ie interface among Application (Layer 3)
+// modules.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// include Handover Message definitions
+#include "jccComMsg.h"
+#include "jcvctovc.h"
+//#include "jccehomsg.h"
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+// *******************************************************************
+// Constant Definitions
+// *******************************************************************
+
+union CCMMInputMsg_t
+{
+ InterHoaVcMsg_t hoaCcMsg;
+ IntraL3Msg_t intraL3Msg;
+ T_CNI_RIL3MD_CCMM_MSG mdMsg ;
+ VcCcMsg_t vcCcMsg ;
+ SmsVblinkMsg_t smsVbMsg ;
+} ;
+
+#endif // JCCL3Msg_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/JCCLog.h b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCLog.h
new file mode 100644
index 0000000..acb91e8
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCLog.h
@@ -0,0 +1,78 @@
+#ifndef JCCLog_H
+#define JCCLog_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCCLog.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : message and ie interface among Application (Layer 3)
+// modules.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+#include "stdio.h"
+
+//
+// The following log macro is defined in such a way to
+// allow printf-type capability when the _JCC_DEBUG flag is set
+// and no run-time panelty when _JCC_DEBUG flag is clear.
+//
+// Without the ::_JCCLog line, the compiler will
+// complain about the parameter (...). With this line
+// and _JCC_DEBUG set to false, the compiler will
+// optimize the code (1?(void)0: ::_JCCLog) out completely
+// without any run time penalty.
+//
+
+typedef int (* JCCPrintStFn) (const char *);
+
+inline int JCCPrintf(const char *str) { return (printf(str)); }
+
+inline int _JCCLog(const char *) { return (0); }
+inline int _JCCLog1(const char *, int ) { return (0); }
+inline int _JCCLog2(const char *, int, int) { return (0); }
+inline int _JCCLog3(const char *, int , int , int ) { return (0); }
+
+int __JCCLog(const char *logText);
+int __JCCLog1(const char *logText, int arg1);
+int __JCCLog2(const char *logText, int arg1, int arg2);
+int __JCCLog3(const char *logText, int arg1, int arg2, int arg3);
+
+#ifdef _JCC_DEBUG
+#define JCCLog __JCCLog
+#else
+#define JCCLog 1 ? (void)0: ::_JCCLog
+#endif
+
+#ifdef _JCC_DEBUG
+#define JCCLog1 __JCCLog1
+#else
+#define JCCLog1 1 ? (void)0: ::_JCCLog1
+#endif
+
+#ifdef _JCC_DEBUG
+#define JCCLog2 __JCCLog2
+#else
+#define JCCLog2 1 ? (void)0: ::_JCCLog2
+#endif
+
+#ifdef _JCC_DEBUG
+#define JCCLog3 __JCCLog3
+#else
+#define JCCLog3 1 ? (void)0: ::_JCCLog3
+#endif
+
+#endif // JCCLog_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/JCCState.h b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCState.h
new file mode 100644
index 0000000..ef7d049
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCState.h
@@ -0,0 +1,192 @@
+#ifndef JCCState_H
+#define JCCState_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCCState.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 10-19-98
+// Description : interface specification for - JCCState
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+//BCT <xxu:09-22-00>
+typedef enum
+{
+ ANN_PLAY_BASE = 0,
+ ANN_PLAY_OFF,
+ ANN_PLAY_ON,
+ ANN_PLAY_WAITING
+
+} AnnStates_t;
+
+// CH<xxu:11-10-99> aux state definitions for Call Hold
+typedef enum
+{
+ CH_ST_BASE = 0,
+
+ CH_ST_IDLE,
+ CH_ST_HREQ,
+ CH_ST_HELD,
+ CH_ST_RREQ
+
+} ChStates_t;
+
+// State definitions for Channel
+typedef enum
+{
+ RES_ST_BASE = 0,
+
+ RES_ST_IDLE,
+ RES_ST_ASS_REQ,
+ RES_ST_ASSIGNED,
+ RES_ST_REL_REQ
+
+} ResStates_t;
+
+// HO<xxu:01-26-00> handover types definition
+typedef enum
+{
+ //0 means invalid state !
+
+ HO_TY_BASE=1,
+ HO_TY_HANDOVER = HO_TY_BASE,
+ HO_TY_HANDBACK,
+ HO_TY_HANDMSC3,
+
+ // ext-HO <chenj:07-01-2001>
+ // Handover Types for external handover
+ HO_TY_EXT_HANDOVER,
+ HO_TY_EXT_HANDBACK,
+ HO_TY_EXT_HANDMSC3,
+ HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR,
+ HO_TY_MNET_NONANCHOR_HANDBACK_TO_MSC3
+
+} HandoverTypes_t;
+
+// State definitions for Channel
+typedef enum
+{
+ HAND_ST_BASE = 0,
+
+ HAND_ST_IDLE = HAND_ST_BASE,
+
+ HAND_ST_ANCH_VC_IP_ADDRESS_REQ,
+ HAND_ST_ANCH_SND_HO_REQ,
+ HAND_ST_ANCH_RCV_HO_REQ_ACK,
+ HAND_ST_ANCH_HO_COMPLT,
+
+ HAND_ST_ANCH_RCV_HB_REQ,
+ HAND_ST_ANCH_RCV_HB_REQ_ACK, //ext-HO <xxu:06-30-01>
+ HAND_ST_ANCH_SND_HB_REQ, //ext-HO <xxu:06-30-01>
+ HAND_ST_ANCH_SND_HB_REQ_ACK,
+
+ //HO<xxu:01-27-00> states for H3
+ HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ, //After send VC IP Address Req to VB
+ HAND_ST_ANCH_SND_H3_REQ, //Recv VC IP Address Rsp, then send Perform Handover to MSC-B'
+ HAND_ST_ANCH_RCV_H3_REQ_ACK, //Recv PERFORM_HANDOVER_ACK from MSC-B' thus sending a PERFORM
+ //_HANDBACK_ACK to MSC-B
+ HAND_ST_TRG_RCV_HO_REQ,
+ HAND_ST_TRG_SND_HO_REQ_ACK,
+ HAND_ST_TRG_HO_COMPLT,
+
+ HAND_ST_TRG_SND_HB_REQ,
+ HAND_ST_TRG_RCV_HB_REQ_ACK,
+
+ // ext-HO <chenj: 05-29-01>
+ HAND_ST_ANCH_PERF_EHO_REQ,
+ HAND_ST_ANCH_RCV_EHO_REQ_ACK,
+ HAND_ST_ANCH_RCV_EHO_REQ_NACK,
+ HAND_ST_ANCH_RCV_EHO_HB_REQ,
+ HAND_ST_ANCH_SND_EHB_REQ_ACK,
+ HAND_ST_ANCH_EHO_H3_VC_IP_ADDRESS_REQ,
+ HAND_ST_ANCH_EHO_SND_H3_REQ,
+ HAND_ST_ANCH_EHO_RCV_H3_REQ_ACK,
+ HAND_ST_ANCH_PERF_EHO_H3_REQ,
+ HAND_ST_ANCH_RCV_EHO_H3_REQ_ACK,
+ HAND_ST_ANCH_RCV_EHO_H3_REQ_NACK,
+ HAND_ST_ANCH_EHO_COMPLT, // Make sure HAND_ST_ANCH_EHO_COMPLT is the LAST state! (affects MAX_HO_SRC_STATES)
+
+} HandoverStates_t;
+
+// State definitions for CC Half Call State Machine
+typedef enum
+{
+ HC_ST_BASE = 0,
+
+ HC_ST_FREE,
+ HC_ST_NULL,
+ HC_ST_ACTIVE,
+ HC_ST_RELEASE_REQ,
+ HC_ST_DISCONNECT_IND,
+
+ //
+ // State definitions for CC Orig Half Call State Machine
+ // OrigHalfCallStates
+ OHC_ST_BASE = HC_ST_DISCONNECT_IND,
+
+ OHC_ST_AUTH_CALL_SETUP,
+ OHC_ST_OFFERING_CALL,
+ OHC_ST_CALL_PROCEEDING,
+ OHC_ST_ANSWER_PENDING,
+
+ // Mobile only
+ OHC_ST_CONNECT_INDICATION,
+
+ // State definitions for CC Term Half Call State Machine
+ // TermHalfCallStates
+ THC_ST_BASE = OHC_ST_CONNECT_INDICATION,
+
+ THC_ST_AUTH_TERMINATION ,
+ THC_ST_PRESENTING_CALL,
+ THC_ST_ALERTING,
+
+ // Mobile only
+ THC_ST_CALL_CONFIRMED,
+ THC_ST_MM_CONN_REQ,
+
+ // ext-HO <chenj:05-15-2001>
+ // Call states for external handover
+ EHO_ST_FREE,
+ EHO_ST_BASE,
+ EHO_ST_NULL,
+ EHO_ST_OFFERING_CALL,
+ EHO_ST_CONFIRMED,
+ EHO_ST_ACTIVE,
+
+} HalfCallStates_t;
+
+
+typedef enum
+{
+ SMS_STATE_IDLE = 0,
+ SMS_STATE_MT_CONNECT_MM = 1,
+ SMS_STATE_CONNECTED = 2,
+ SMS_STATE_WAIT_CP_ACK = 3,
+ SMS_STATE_DISCONNECT = 4,
+
+ SMS_STATE_MAX ,
+ SMS_STATE_NONE // This is not a valid state. Used as "same state" indicator
+
+} SmsState_t;
+
+
+#endif // JCCState_H
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/JCCTimer.h b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCTimer.h
new file mode 100644
index 0000000..614aeae
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCTimer.h
@@ -0,0 +1,83 @@
+#ifndef JCCTimer_H
+#define JCCTimer_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCCTimer.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 10-19-98
+// Description : interface specification for - JCCTimer
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "vxWorks.h"
+#include "wdLib.h"
+
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+class JCCTimer
+{
+
+public:
+
+ // Destructor
+ ~JCCTimer() ;
+
+ // Constructors
+ JCCTimer(FUNCPTR fPtr,
+ int timerData);
+
+ JCCTimer(FUNCPTR fPtr);
+
+ // Operators
+
+ // primary behaviour methods
+ void cancelTimer();
+ void setTimer(int howLong);
+ void setTimer(int howLong, int timerData);
+
+ // maintenance methods
+
+ // get and set for private data members
+
+ // boolean to indicate if timer is active
+ bool timerSet_;
+protected:
+
+private:
+
+ // hide the assignment, and copy ctor and other defaults as needed.
+ JCCTimer();
+
+ JCCTimer (const JCCTimer& rhs) ;
+
+ JCCTimer& operator= (const JCCTimer& rhs) ;
+
+ int operator==(const JCCTimer& rhs) const ;
+
+private:
+
+ // data members
+ FUNCPTR funcPtr_;
+ int timerData_; // data for timer call-back
+ WDOG_ID timerId_; // VxWorks Watchdog Timer Id
+};
+
+
+#endif // JCCTimer_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/JCCUtil.h b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCUtil.h
new file mode 100644
index 0000000..43dae1c
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCUtil.h
@@ -0,0 +1,56 @@
+#ifndef JCCUtil_H
+#define JCCUtil_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCCUtil.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// included MD and IRT headers for messages from MS
+#include "ril3/ril3md.h"
+#include "ril3/ril3msgheader.h"
+#include "ril3/ie_mobile_id.h"
+#include "ril3/ie_called_bcd.h"
+#include "ril3/ie_location_area_id.h"
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+// *******************************************************************
+// Constant Definitions
+// *******************************************************************
+
+//typedefs
+
+// Utility functions
+
+int
+operator==(const T_CNI_L3_ID& lhs, const T_CNI_L3_ID& rhs);
+
+int
+operator==(const T_CNI_RIL3_IE_MOBILE_ID& lhs,
+ const T_CNI_RIL3_IE_MOBILE_ID& rhs);
+
+void printMobileId(const T_CNI_RIL3_IE_MOBILE_ID&);
+
+T_CNI_RIL3_PROTOCOL_DISCRIMINATOR extractPd (const T_CNI_LAPDM_L3MessageUnit *);
+
+#endif // JCCUtil_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/JCCVCmsg.h b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCVCmsg.h
new file mode 100644
index 0000000..79a7cd9
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCVCmsg.h
@@ -0,0 +1,34 @@
+#ifndef JCCVCMSG_H
+#define JCCVCMSG_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCCVcMsg.h
+// Author(s) : Igal Gutkin
+// Create Date : 12-08-99
+// Description : message definition for the VipeCell Update sub-system
+//
+// *******************************************************************
+
+#include "JCCComIE.h"
+#include "voip\vblink.h"
+
+// ViperCell update Info
+typedef struct
+{
+ JcVipercellId_t btsID ;
+ VBLINK_VC_STATUS_INFO status;
+
+} IntraL3InfoVC_t;
+
+#endif // JCCVCMSG_H
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/JCCbcCb.h b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCbcCb.h
new file mode 100644
index 0000000..06a4086
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/JCCbcCb.h
@@ -0,0 +1,95 @@
+#ifndef JCCbcCb_H
+#define JCCbcCb_H
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+#include "MnetModuleId.h"
+#include "JCCComIE.h"
+#include "JcVcToVc.h"
+
+#define INTER_CBC_CB_MAX_DAT_LEN 1320
+
+//PR 1323, SMSCBC schedule message, 6/29
+typedef enum {
+
+ INTER_SBSCBC_CB_NULL_MSG = 0,
+
+ // CB <-> CBC Messages --------------------------------------------
+ INTER_SMSCBC_CB_START = INTER_SBSCBC_CB_NULL_MSG,
+ INTER_SMSCBC_CB_START_ACK,
+ INTER_SMSCBC_CB_STOP,
+ INTER_SMSCBC_CB_STOP_ACK,
+ INTER_SMSCBC_VC_UP,
+
+} InterCbcCbMsgType_t;
+
+typedef enum {
+ INTER_SMSCBC_MSG_CATEGORY_HIGH_PRIORITY = 0,
+ INTER_SMSCBC_MSG_CATEGORY_BACKGROUND,
+ INTER_SMSCBC_MSG_CATEGORY_NORMAL
+} InterCbcCbMsgCategory_t;
+
+typedef struct {
+ unsigned char module_id;
+ unsigned char message_type; // InterCbcCbMsgType_t
+ unsigned short repetition_period; // 1-1024 each unit = 8*51 multiframes = 1.883s
+ unsigned short number_of_broadcasts; // 0-65535
+ unsigned char message_category; // InterCbcCbMsgCategory_t
+ unsigned char pad; // not used
+ unsigned short message_id; // 0 to 65535
+ unsigned short size; // size of actual message
+ unsigned char data[INTER_CBC_CB_MAX_DAT_LEN];
+} InterCbcCbData_t;
+//PR 1323 end
+
+typedef struct {
+ // Header
+ JcVipercellId_t origVcId; // origination ViperCell Id
+ UINT32 origVcAddress; // origination ViperCell IP address
+ JcModuleId_t origModuleId; // origination Module Id
+ JcSubId_t origSubId; // optional origination Sub Id
+ short pad1; // not used for padding only
+
+ JcVipercellId_t destVcId; // destination ViperCell Id
+ UINT32 destVcAddress; // destination ViperCell IP address
+ JcModuleId_t destModuleId; // destination Module Id
+ JcSubId_t destSubId; // optional destination Sub Id
+ short pad2; // not used for padding only
+
+ int Magic; // This should always be
+ InterCbcCbMsgType_t msgType; // Message Type
+ InterCbcCbData_t msgData; // Actual Message
+
+} InterRxCbcCbMsg_t;
+
+typedef struct {
+ // Header
+ JcVipercellId_t origVcId; // origination ViperCell Id
+ UINT32 origVcAddress; // origination ViperCell IP address
+ JcModuleId_t origModuleId; // origination Module Id
+ JcSubId_t origSubId; // optional origination Sub Id
+ short pad1; // not used for padding only
+
+ JcVipercellId_t destVcId; // destination ViperCell Id
+ UINT32 destVcAddress; // destination ViperCell IP address
+ JcModuleId_t destModuleId; // destination Module Id
+ JcSubId_t destSubId; // optional destination Sub Id
+ short pad2; // not used for padding only
+
+ int Magic; // for Msg integrity, set to VIPERCELL_MAGIC_VALUE
+ InterCbcCbMsgType_t msgType;
+ unsigned short message_id; // 0 to
+ short pad3; // not used for padding only
+} InterTxCbcCbMsg_t;
+
+bool JcMsgRcvBySmscbc(InterRxCbcCbMsg_t *msg);
+bool JcMsgSendToSmscbc(InterTxCbcCbMsg_t *msg);
+
+#endif // JCCbcCb_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/JcVcToVc.h b/data/mnet/GP10/Host/Common_To_Host/jcc/JcVcToVc.h
new file mode 100644
index 0000000..c52af7b
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/JcVcToVc.h
@@ -0,0 +1,136 @@
+#ifndef JcVcToVc_H
+#define JcVcToVc_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCVcToVc.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 05-10-99
+// Description : ViperCell to ViperCell Message Structures
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+#include "MnetModuleId.h"
+
+// include Handover Message definitions
+#include "JCCHoMsg.h"
+
+#include "JCCComMsg.h"
+
+#include "cc/CCTypes.h"
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+// *******************************************************************
+// Constant Definitions
+// *******************************************************************
+
+// Typedefs
+//
+
+typedef MNET_MODULE_ID JcModuleId_t;
+typedef short JcSubId_t;
+
+// Message Type for Inter ViperCell Messages
+typedef enum {
+
+ INTER_VC_NULL_MSG = 0,
+
+ // CC <-> CC Handover Messages -----------------------------------------
+
+ INTER_VC_CC_BASE = INTER_VC_NULL_MSG,
+ INTER_VC_CC_PERFORM_HANDOVER,
+ INTER_VC_CC_PERFORM_HANDOVER_ACK,
+ INTER_VC_CC_PERFORM_HANDOVER_NACK,
+ INTER_VC_CC_ABORT_HANDOVER,
+ INTER_VC_CC_COMPLETE_HANDOVER,
+
+ INTER_VC_CC_RLS_CALL,
+ INTER_VC_CC_POST_HANDOVER_DATA_EVENT,
+ INTER_VC_CC_POST_HANDOVER_MOB_EVENT,
+
+ INTER_VC_CC_PERFORM_HANDBACK,
+ INTER_VC_CC_PERFORM_HANDBACK_ACK,
+ INTER_VC_CC_PERFORM_HANDBACK_NACK,
+ INTER_VC_CC_ABORT_HANDBACK,
+ INTER_VC_CC_COMPLETE_HANDBACK,
+
+
+} InterVcMsgType_t;
+
+union InterVcPostHoMobEventData_t
+{
+ T_CNI_RIL3MD_CCMM_MSG msInMsg;
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+ IntraL3Msg_t intraL3Msg;
+};
+
+union InterVcMsgData_t
+{
+ InterVcPerformHandover_t perfHandoverReq;
+ InterVcPerformHandoverAck_t perfHandoverAck;
+ InterVcPerformHandoverNack_t perfHandoverNack;
+ InterVcAbortHandover_t abortHandover;
+ InterVcCompleteHandover_t compltHandover;
+ InterVcReleaseCall_t rlsCall;
+ InterVcPostHoMobEventData_t postHoMobEventData;
+
+ InterVcPerformHandback_t perfHandbackReq;
+ InterVcPerformHandbackAck_t perfHandbackAck;
+ InterVcPerformHandbackNack_t perfHandbackNack;
+ InterVcAbortHandback_t abortHandback;
+ InterVcCompleteHandback_t compltHandback;
+} ;
+
+#define VIPERCELL_MAGIC_VALUE 0x1234
+
+// Message format between subsystems at two different ViperCells */
+
+typedef struct {
+ // Header
+
+ JcVipercellId_t origVcId; // origination ViperCell Id
+ UINT32 origVcAddress; // origination ViperCell IP address
+ JcModuleId_t origModuleId; // origination Module Id
+ JcSubId_t origSubId; // optional origination Sub Id
+
+ JcVipercellId_t destVcId; // destination ViperCell Id
+ UINT32 destVcAddress; // destination ViperCell IP address
+ JcModuleId_t destModuleId; // destination Module Id
+ JcSubId_t destSubId; // optional destination Sub Id
+
+ InterVcMsgType_t msgType;
+ InterVcMsgData_t msgData;
+
+ int Magic; // This should always be set to
+ // VIPERCELL_MAGIC_VALUE for Msg integrity validation
+} InterVcMsg_t;
+
+typedef struct
+{
+ T_CNI_MODULE_ID module_id; // origin of a message
+
+ InterVcMsg_t vcToVcMsg;
+} VcCcMsg_t;
+
+// The API call to send an inter-Vipercell message from any module
+bool JcMsgSendToVipercell(InterVcMsg_t *msg);
+
+// The API call for the CC Module to receive an inter-Vipercell message
+bool JcMsgRcvByCC(InterVcMsg_t *msg);
+
+#endif // JcVcToVc_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/LUDB.h b/data/mnet/GP10/Host/Common_To_Host/jcc/LUDB.h
new file mode 100644
index 0000000..ab776c9
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/LUDB.h
@@ -0,0 +1,176 @@
+#ifndef LUDB_H
+#define LUDB_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : LUDB.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : Local User Database.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+#include "ril3/ril3irt.h"
+#include "ril3/ie_mobile_id.h"
+#include "ril3/ie_classmark_1.h"
+#include "ril3/ie_classmark_2.h"
+
+#include "subsc/SubscInfoType.h"
+
+#include "semLib.h"
+#include "VOIP/voipapi.h"
+#include "JCCTimer.h"
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+// *******************************************************************
+// Constant Definitions
+// *******************************************************************
+#define LUDB_MAX_EMERG_ENTRY 20
+#define LUDB_MAX_NUM_ENTRY (300 + LUDB_MAX_EMERG_ENTRY)
+
+#define LUDB_IMSI_HASH_NUM_BUCKET 97
+
+const short NULL_CLASSMARK = 0;
+
+union ClassmarkData_t{
+ T_CNI_RIL3_IE_MS_CLASSMARK_1 classmark1;
+ T_CNI_RIL3_IE_MS_CLASSMARK_2 classmark2;
+} ;
+
+
+
+class LUDBEntry {
+ public:
+ enum LUDBState
+ {
+ IDLE = 1, //IDLE state
+ REGREQ , // Wait for response of registration only
+ REGTHENSEC , // Wait for response of registration then request security
+ SECREQ , // Wait for response of security request only
+ SECINREG , // Wait for response of security request then confirm registration
+ ACTIVE , // Mobile is active. RCF from H.323
+ UNREGREQ , // wait for response of H323MobileUnresgier. (treat as Inactive.)
+ INACTIVE , // Inactive, unregister confirmed from H.323
+ UNREGRJT , // Inactive, unregister rejected from H.323
+ EMERGENCY ,
+ MAXLUDBSTATE , // for error check.
+ };
+
+ LUDBEntry();
+ void init();
+ bool isFree() { return free;};
+ void isFree(bool free);
+ bool subscExist() { return subsc_exist;};
+ bool secExist() { return sec_exist;};
+ void setSubscExist(bool flag);
+ void setSecExist(bool flag);
+ char* getStateString();
+ void startVBReqTimer(int sec, short ludb_Id);
+ void stopVBReqTimer();
+ void startPurgeTimer(int sec, short ludb_Id);
+ void stopPurgeTimer();
+ T_AUTH_TRIPLET* curTripletPtr();
+
+ T_CNI_RIL3_IE_MOBILE_ID mobileId;
+ short classmarkType;
+ ClassmarkData_t classmarkData;
+ LUDBState state;
+ VOIP_MOBILE_HANDLE mobileHandle;
+ short mm_id;
+ JCCTimer *VBReqTimer;
+ JCCTimer *PurgeTimer;
+ T_SUBSC_INFO subsc_info;
+ T_AUTH_TRIPLET sec_info;
+ char cur_cksn;
+ short auth_reuse_count;
+ short cur_algo;
+
+ private:
+ bool free;
+ bool subsc_exist;
+ bool sec_exist;
+ SEM_ID ludbSemId;
+
+};
+
+class LUDB
+{
+ public:
+ LUDB();
+ virtual ~LUDB() {};
+ void init();
+ void init(const short index); // klim 3/29/99
+ void print();
+ short getEntry (T_CNI_RIL3_IE_MOBILE_ID mobileId);
+ short registerUser (T_CNI_RIL3_IE_MOBILE_ID mobileId );
+ void update (short index, LUDBEntry::LUDBState state);
+ void update (short index, VOIP_MOBILE_HANDLE mobileHandle);
+ short update (short index, T_SUBSC_INFO info);
+ short update (short index, T_AUTH_TRIPLET info);
+ void printSRS (short index);
+ void setMMId (const short index, short mmId);
+ short getMMId (const short index);
+ LUDBEntry::LUDBState getState( const short index);
+ bool isFree (const short i);
+ bool getSubscExist (short i);
+ void setSubscExist (short i, bool flag);
+ bool getSecExist (short i);
+ void setSecExist (short i, bool flag);
+ short checkAuthCount (short i);
+ T_AUTH_TRIPLET* curTripletPtr(short i);
+ short curAlgo (short i);
+ void setAlgo (short i, short algo);
+ char curCKSN(short i);
+ char incCKSN(short i);
+ void entryDealloc (short i);
+ void entryDealloc (const T_CNI_RIL3_IE_MOBILE_ID& );
+ bool startVBReqTimer(short ludb_Id);
+ bool stopVBReqTimer(short ludb_Id);
+ bool startPurgeTimer(short ludb_Id);
+ bool stopPurgeTimer(short ludb_Id);
+
+ bool authTerm( const short index,
+ const T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER& cpn);
+
+ VOIP_MOBILE_HANDLE getMobileHandle (const short index);
+ bool authOrig( const short index,
+ const T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER& cpn);
+ // stage 2 changes
+ T_CNI_RIL3_IE_MOBILE_ID getMobileId (const short index);
+ bool inRange(short index);
+ T_SUBSC_INFO* getSubscInfoPtr(const short index);
+ T_SUBSC_IE_MOBILE_ID_IMSI* getMobileIdPtr(const short index);
+ T_SUBSC_IE_ISDN* getMSISDNPtr(const short index);
+ T_SUBSC_IE_PROVISION_BS* getProvBSPtr(const short index);
+ T_SUBSC_IE_PROVISION_TS* getProvTSPtr(const short index);
+ T_SUBSC_IE_PROVISION_SS* getProvSSPtr(const short index);
+ T_SUBSC_IE_SUBSC_STATUS* getSubscStatusPtr(const short index);
+ T_SUBSC_IE_ODB_DATA* getODBDataPtr(const short index);
+ T_SUBSC_IE_SS_INFO_LIST* getSSInfoListPtr(const short index);
+ T_SUBSC_IE_USER_INFO* getUserInfoPtr(const short index);
+ private:
+ SEM_ID semId;
+ short entryAlloc();
+ LUDBEntry entries[LUDB_MAX_NUM_ENTRY];
+
+};
+
+#endif // LUDB_H
+
+
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/LUDBApi.h b/data/mnet/GP10/Host/Common_To_Host/jcc/LUDBApi.h
new file mode 100644
index 0000000..ab7eaa5
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/LUDBApi.h
@@ -0,0 +1,181 @@
+#ifndef LUDBapi_H
+#define LUDBapi_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : LUDBapi.h
+// Author(s) : Kevin Lim
+// Create Date : 08-10-99
+// Description : Local User Database
+//
+// *******************************************************************
+
+#include "ril3/ril3_common.h"
+#include "voip/vblink.h"
+#include "jcc/LUDBConfig.h"
+#include "jcc/JCCComMsg.h"
+
+typedef enum {
+ LUDB_MM_REG_REQ = 0x40,
+ LUDB_MM_UNREG_REQ,
+ LUDB_MM_SEC_REQ,
+ LUDB_MM_EMERG_REQ,
+ LUDB_MM_REM_EMERG_REQ,
+ LUDB_MM_CIPHER_SET,
+
+ LUDB_MM_REL_REQ,
+ LUDB_MM_REG_CNF,
+ LUDB_MM_REG_REJ,
+ LUDB_MM_UNREG_CNF,
+ LUDB_MM_UNREG_REJ,
+ LUDB_MM_SEC_RSP,
+ LUDB_MM_EMERG_RSP,
+ LUDB_MM_REM_EMERG_CNF,
+
+ VOIP_LUDB_REG_CNF = 0x60,
+ VOIP_LUDB_REG_REJ,
+ VOIP_LUDB_UNREG_CNF,
+ VOIP_LUDB_UNREG_REJ,
+ VOIP_LUDB_SPI_IND,
+ VOIP_LUDB_SEC_RSP,
+
+
+ VOIP_LUDB_UNREG_REQ,
+
+ LUDB_VBREQ_TIMEOUT = 0x70,
+ LUDB_PURGE_TIMEOUT,
+
+} LudbMsgType;
+
+typedef struct {
+ /* common members */
+ unsigned char module_id;
+ LudbMsgType msg_type;
+ T_CNI_RIL3_IE_MOBILE_ID mobile_id;
+ T_CNI_RIL3_REJECT_CAUSE_VALUE cause;
+
+ /* mm */
+ short mm_id;
+ short ludb_id;
+ short algo;
+ short forceAuth;
+
+ /* voip */
+ short vb_msg_size;
+ char vb_msg[VB_MAX_MSG_LENGTH];
+} LudbMsgStruct;
+
+void ludbSetPurgeTimer(int sec);
+void ludbSetAuthRequired(int flag);
+void ludbSetAuthFreq(int freq);
+int ludbVBReqTimeout(int ludb_id); // timeout handler
+bool ludbStartVBReqTimer(short ludb_id);
+bool ludbStopVBReqTimer(short ludb_id);
+int ludbPurgeTimeout(int ludb_id); // timeout handler
+bool ludbStartPurgeTimer(short ludb_id);
+bool ludbStopPurgeTimer(short ludb_id);
+char *getLudbMsgTypeString(LudbMsgType msg_type);
+bool LudbVBLinkMessageHandler(short ludb_id,
+ VBLINK_MOBILE_REG_EVENT event,
+ VOIP_MOBILE_HANDLE mobile);
+
+void ludbSetCipherAlgo(short index, short algo);
+
+
+bool ludbGetSubscInfoExists(short index);
+void ludbSetSubscInfoExists(short index, bool flag);
+bool ludbGetSecInfoExists(short index);
+void ludbSetSecInfoExists(short index, bool flag);
+short ludbCheckAuthCount(short index);
+T_AUTH_TRIPLET *ludbCurTriplet(short index);
+char ludbCKSN(short index);
+char ludbIncCKSN(short index);
+void ludbDataPrint();
+void ludbDataInit();
+void ludbSetMMId(const short index, short mmId);
+short ludbGetMMId(const short index);
+void ludbEntryInit(const short index);
+
+T_CNI_RIL3_IE_MOBILE_ID ludbGetMobileId(short index);
+short ludbGetEntryByMobileId(T_CNI_RIL3_IE_MOBILE_ID id);
+
+T_SUBSC_INFO* ludbGetSubscInfoPtr(const short index);
+T_SUBSC_IE_MOBILE_ID_IMSI* ludbGetMobileIdPtr(const short index);
+T_SUBSC_IE_ISDN* ludbGetMSISDNPtr(const short index);
+T_SUBSC_IE_PROVISION_BS* ludbGetProvBSPtr(const short index);
+T_SUBSC_IE_PROVISION_TS* ludbGetProvTSPtr(const short index);
+T_SUBSC_IE_PROVISION_SS* ludbGetProvSSPtr(const short index);
+T_SUBSC_IE_SUBSC_STATUS* ludbGetSubscStatusPtr(const short index);
+T_SUBSC_IE_ODB_DATA* ludbGetODBDataPtr(const short index);
+T_SUBSC_IE_SS_INFO_LIST* ludbGetSSInfoListPtr(const short index);
+T_SUBSC_IE_USER_INFO* ludbGetUserInfoPtr(const short index);
+
+bool ludbIsProvSMS_MO(const short index);
+bool ludbIsProvSMS_MT(const short index);
+
+bool ludbIsProvCLIP(const short index);
+bool ludbIsProvCLIR(const short index);
+/* shmin */
+int ludbGetCLIROption(const short index, T_SS_SUBSC_CLIR_OPTION *option, bool *isProvCLIR);
+
+bool ludbIsProvCOLP(const short index);
+bool ludbIsProvCOLR(const short index);
+bool ludbIsProvCFU(const short index);
+bool ludbIsProvCFB(const short index);
+bool ludbIsProvCFNRY(const short index);
+bool ludbIsProvCFNRC(const short index);
+bool ludbIsProvECT(const short index);
+bool ludbIsProvCW(const short index);
+bool ludbIsProvHOLD(const short index);
+bool ludbIsProvMPTY(const short index);
+bool ludbIsProvBAOC(const short index);
+bool ludbIsProvBOIC(const short index);
+bool ludbIsProvBOICE(const short index);
+bool ludbIsProvBAIC(const short index);
+
+bool ludbIsActiveCFU(const short index);
+bool ludbIsActiveCFB(const short index);
+bool ludbIsActiveCFNRY(const short index);
+int ludbGetTimerCFNRY(const short index);
+bool ludbIsActiveCFNRC(const short index);
+bool ludbIsActiveCW(const short index);
+
+void ludbPrintSubscInfo(const short index);
+void ludbPrintImsi(const short index);
+void ludbPrintIsdn(const short index);
+void ludbPrintProvBS(const short index);
+void ludbPrintProvTS(const short index);
+void ludbPrintProvSS(const short index);
+void ludbPrintSubscStatus(const short index);
+void ludbPrintODBData(const short index);
+void ludbPrintSSInfoList(const short index);
+void ludbPrintUserInfo(const short index);
+void ludbPrintSRS(const short index);
+
+/* return 0 for no error, others are error */
+short ludbSetDecodeSubscInfo(const short index, unsigned char *msg, short size);
+
+/* Voip Support */
+bool ludbGetMobileNumber(const short ludbId, char *num);
+bool ludbGetMobileName(const short ludbId, char *name);
+bool ludbIsMobileRegistered(char *num, short *ludbId);
+VOIP_MOBILE_HANDLE ludbGetVoipMobileHandle(const short ludbId);
+bool ludbProfileUpdate(T_CNI_RIL3_IE_MOBILE_ID mobile_id, short len, char *buf);
+bool ludbSRSUpdate(T_CNI_RIL3_IE_MOBILE_ID mobile_id, short num, T_AUTH_TRIPLET *triplet);
+
+/* CC Support */
+short ludbGetCipherAlgo(short ludb_id, IntraL3CipherModeCommand_t *cmd);
+
+#endif // LUDBapi_H
+
+
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/LUDBConfig.h b/data/mnet/GP10/Host/Common_To_Host/jcc/LUDBConfig.h
new file mode 100644
index 0000000..db2054e
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/LUDBConfig.h
@@ -0,0 +1,33 @@
+#ifndef LUDBConfig_H
+#define LUDBConfig_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : LUDBConfig.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : Local User Database Configuration
+//
+// *******************************************************************
+
+
+
+#define LUDB_MAX_INCOMING_MSG 16
+#define LUDB_MAX_MSG_LENGTH 1024
+#define VB_MAX_MSG_LENGTH 800
+#define VB_REQ_TIMER_SEC 15
+
+
+#endif // LUDBConfig_H
+
+
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/LUDBInstance.h b/data/mnet/GP10/Host/Common_To_Host/jcc/LUDBInstance.h
new file mode 100644
index 0000000..d03b3d7
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/LUDBInstance.h
@@ -0,0 +1,43 @@
+#ifndef LUDBInstance_H
+#define LUDBInstance_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : LUDBInstance.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : Local User Database.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+// *******************************************************************
+// Constant Definitions
+// *******************************************************************
+
+#include "JCC/ludb.h"
+#include "JCC/ludbapi.h"
+
+extern LUDB gLUDB;
+
+
+#endif // LUDBInstance_H
+
+
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/LUDBMmMsgProc.h b/data/mnet/GP10/Host/Common_To_Host/jcc/LUDBMmMsgProc.h
new file mode 100644
index 0000000..5d60b11
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/LUDBMmMsgProc.h
@@ -0,0 +1,45 @@
+#ifndef LUDBMmMsgProc_H
+#define LUDBMmMsgProc_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : LUDBMmMsgProc.h
+// Author(s) : Kevin Lim
+// Create Date : 07-31-99
+// Description : Local User Database
+//
+// *******************************************************************
+
+#include "JCC/LudbApi.h"
+
+bool sendLudbRspToMM(LudbMsgStruct *rsp);
+bool sendMobileRelReqToMM(short mmId);
+bool sendMobileRegCnfToMM(short mmId, short ludbId, short forceAuth);
+bool sendRemEmergRspToMM(short mmId);
+bool sendMobileSecRspToMM(short mmId, short ludbId);
+bool sendMobileRegRejToMM(short mmId, T_CNI_RIL3_REJECT_CAUSE_VALUE cause);
+bool sendMobileUnRegCnfToMM(short mmId);
+bool sendMobileUnRegRejToMM(short mmId);
+void LUDB_MM_EmergReqProc(T_CNI_RIL3_IE_MOBILE_ID& mobile_id, short mmId);
+void LUDB_MM_RemEmergReqProc(short mmId, short ludb_id);
+void LUDB_MM_RegReqProc(T_CNI_RIL3_IE_MOBILE_ID& mobile_id, short mmId);
+void LUDB_MM_UnRegReqProc(T_CNI_RIL3_IE_MOBILE_ID& mobile_id, short mmId);
+void LUDB_MM_SecReqProc(short mm_id, short ludb_id);
+void LUDB_MM_CipherSetProc(short mm_id, short ludb_id, short algo);
+void LUDB_MM_MsgProc(LudbMsgStruct *inMsg);
+
+
+
+#endif // LUDBMmMsgProc_H
+
+
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/readme.txt b/data/mnet/GP10/Host/Common_To_Host/jcc/readme.txt
new file mode 100644
index 0000000..562eb10
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/readme.txt
@@ -0,0 +1,21 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+
+Note: The file sys_const.h is actually a soft link to
+ jcc\include\sys_const.h
+
+If you need to make another soft link, here is the syntax:
+
+From a DOS window in this directory:
+cleartool ln -s <"Path to Top of view"\"directory"\filename filename
+
+Example:
+
+cleartool ln -s ..\..\..\..\GP10\Host\Oam\include\oam_api.h oam_api.h
+
+Note: The path is case sensitive !! \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Common_To_Host/jcc/viperchannel.h b/data/mnet/GP10/Host/Common_To_Host/jcc/viperchannel.h
new file mode 100644
index 0000000..4ca7b0d
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/jcc/viperchannel.h
@@ -0,0 +1,73 @@
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+/*
+ ****************************************************************************************
+ * *
+ * File : ViperChannel.h *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |06/8/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+#ifndef VIPERCHANNEL_HDR_INC
+#define VIPERCHANNEL_HDR_INC
+
+
+#include "assert.h"
+#include "vxworks.h"
+#include "msgqlib.h"
+#include "sockLib.h"
+#include "inetLib.h"
+#include "stdioLib.h"
+#include "strLib.h"
+#include "hostLib.h"
+#include "ioLib.h"
+#include "tasklib.h"
+#include "time.h"
+#include "string.h"
+
+#define MAX_SIGNAL_PACKETS_IN_Q 300
+#define VIPERCHANNEL_MAGIC_VALUE 1234
+#define MAX_VIPERCHANNEL_PACKET_SIZE 1024
+#define VIPERCHANNEL_WORK_PRIORITY 50 /* priority of logging server's work task */
+#define VIPERCHANNEL_STACK_SIZE 100000 /* stack size of server's work task */
+#define VIPERCHANNEL_PORT_NUMBER 7221
+
+
+typedef struct {
+ int Magic;
+ int DataSize;
+} ViperChannelPacketHeader_t;
+
+
+typedef struct {
+ struct sockaddr_in LocalAddress;
+ int SignalSocket;
+ BOOL Initialized;
+} ViperChannelConfiguration_t;
+
+
+/*
+ * Function prototypes
+ */
+void InitializeViperChannel(BOOL SpawnTask);
+
+VOID ViperChannel(void);
+
+BOOL ViperChannelSendMessage(unsigned char *Packet, int DataSize, UINT32 RemoteAddress);
+
+void RecvViperChannelMessage(unsigned char *Packet,int DataSize, UINT32 RemoteAddress);
+
+
+#endif
diff --git a/data/mnet/GP10/Host/Common_To_Host/l1proxy/l1proxy.h b/data/mnet/GP10/Host/Common_To_Host/l1proxy/l1proxy.h
new file mode 100644
index 0000000..b177788
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/l1proxy/l1proxy.h
@@ -0,0 +1,64 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/* *******************************************************************/
+
+/* Version : 1.0 */
+/* Status : Under development */
+/* File : l1proxy.h */
+/* Author(s) : Tim Olson */
+/* Create Date : 9/9/99 */
+/* Description : */
+
+/* *******************************************************************/
+
+#ifndef l1proxy_H
+#define l1proxy_H
+
+#include "msgQLib.h"
+#include <semLib.h>
+
+extern SEM_ID dspLoadSem;
+
+void initInt(void);
+void go(unsigned int port);
+void initDsp(unsigned int port);
+
+typedef enum {
+ L1PROXY_LOG_ERROR,
+ L1PROXY_LOG_WARNING,
+ L1PROXY_LOG_TRACE
+}l1ProxyLogType;
+
+
+#define DSP_TIMEOUT 500 /* DSP ready time out for 2 ms. */
+
+#ifndef STAND_ALONE
+int ulMobileMessagePreProc(unsigned char *msg);
+#endif
+
+#define NUM_DSPS 2 /* Number of DSPs */
+
+#define DSPMSGLENMAX 64 /* max len downstream messages */
+#define DSPBUFFERMAX 0x204 /* max HPI buffer size */
+#define DSPUPBUFFER 0x80000000 /* HPI upstream buffer */
+#define DSPDNBUFFER 0x80000204 /* HPI downstream buffer */
+#define DSPMSGMAX (0x204-4)/0x40 /* max downstream messages in one group */
+
+#define DSPLENOFFSET 0 /* offset of len in message */
+#define DSPHEADERLEN 4 /* length of message header */
+
+#define TASKUPPRIORITY 10 /* upstream task priority */
+#define TASKDNPRIORITY 10 /* downstream task priority */
+#define TASKUPSTK (32 * 1024) /* upstream task stack allocation */
+#define TASKDNSTK (32 * 1024) /* downstream task stack allocation */
+#define UPNAME "L1TaskUp" /* upstream task name */
+#define DNNAME "L1TaskDn" /* downstream task name */
+
+#define DN_Q_SIZE 64 /* downstream message queue size */
+
+#endif /* L1PROXY_H */
diff --git a/data/mnet/GP10/Host/Common_To_Host/l1proxy/l1proxyhpi.h b/data/mnet/GP10/Host/Common_To_Host/l1proxy/l1proxyhpi.h
new file mode 100644
index 0000000..c45a367
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/l1proxy/l1proxyhpi.h
@@ -0,0 +1,48 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/****************************************************************************
+* File: l1proxyhpi.h
+*
+* Description:
+* Definitions & Prototypes for the hpi communications
+*
+*****************************************************************************/
+
+#ifndef L1PROXYHPI_H
+#define L1PROXYHPI_H
+
+/*
+ * HPI Hardware register definitions
+ */
+#define PORT0_BASE_ADDR 0xe0000000
+#define PORT1_BASE_ADDR 0xe0010000
+#define AUX_PORT (*(volatile unsigned long *) 0xe1000000)
+#define PORT_BASE(port) (port == 0 ? PORT0_BASE_ADDR : PORT1_BASE_ADDR)
+#define HPIC(port) (*(volatile unsigned int *)(PORT_BASE(port)+0x00))
+#define HPIA(port) (*(volatile unsigned int *)(PORT_BASE(port)+0x08))
+#define HPID(port) ( (volatile void *)(PORT_BASE(port)+0x0c))
+#define HPIS(port) ( (volatile void *)(PORT_BASE(port)+0x04))
+
+
+/*
+ * hpi2dspD is a layer 1 utility routine, transferring a 32-bit word
+ * from the vxWorks host to the DSP.
+ */
+
+void hpi2dspD(unsigned int port, unsigned int addr, unsigned int data);
+
+
+/*
+ * dsp2hpiD is a layer 1 utility routine, transferring a 32-bit word
+ * from the DSP to the vxWorks host.
+ */
+
+unsigned int dsp2hpiD(unsigned int port, unsigned int addr);
+
+
+#endif /* L1PROXYHPI_H */
diff --git a/data/mnet/GP10/Host/Common_To_Host/mm/MMConfig.h b/data/mnet/GP10/Host/Common_To_Host/mm/MMConfig.h
new file mode 100644
index 0000000..aa6ea3f
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/mm/MMConfig.h
@@ -0,0 +1,77 @@
+#ifndef MMConfig_H
+#define MMConfig_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMConfig.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : message and ie interface among Application (Layer 3)
+// modules.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+// *******************************************************************
+// Constant Definitions
+// *******************************************************************
+
+// Maximum number of MM entry
+#define MM_MAXNUM_ENTRY 100 // 20 08/27/01 shmin : load problem
+
+// defines the size of VxWorks Message queue
+// The value of this parameter is system dependent
+//
+const int MM_MAX_L3_MSGS = 32;
+
+// defines the priority of the VxWorks message queue
+//
+const int MM_L3_MSG_Q_PRIORITY = 10;
+
+// Timers
+//
+// The timer value is based on VxWorks "tick" which is BSP (Board Support
+// Package) dependent. A translation between real-world time unit (seconds
+// or millisecond) and VxWorks ticks muct be done first to set the proper
+// timer values.
+//
+
+// Default value if it fails to get values from OAM MIB data
+const int MM_DEFAULT_MAX_MM_CONNECTION = 99; // 19 08/28/01 shmin : load problem
+const int MM_DEFAULT_PAGING_T3113 = 600;
+const Boolean_t MM_DEFAULT_AUTHENTICATION_REQUIRED = bfalse;
+const Boolean_t MM_DEFAULT_CIPHERING_REQUIRED = bfalse;
+const Boolean_t MM_DEFAULT_IMEI_CHECK_REQUIRED = bfalse;
+
+const char MM_DEFAULT_BTS_MCC[3] = {0, 0, 1};
+const char MM_DEFAULT_BTS_MNC[2] = {0, 1};
+const short MM_DEFAULT_BTS_LAC = 2;
+
+void mmCfgSetMaxMMConnections(INT_32_T val);
+void mmCfgSetPagingT3113(INT_32_T val);
+void mmCfgSetAuthenticationRequired(INT_32_T val);
+void mmCfgSetCipheringRequired(INT_32_T val);
+void mmCfgSetIMEICheckRequired(INT_32_T val);
+void mmCfgSetIMSIRequired(INT_32_T val);
+void mmConvertMCC(INT_32_T oam_mcc);
+void mmConvertMNC(INT_32_T oam_mnc);
+void mmConvertLAC(INT_32_T oam_lac);
+void mmCfgRead();
+
+#endif // MMConfig_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/mm/MMInt.h b/data/mnet/GP10/Host/Common_To_Host/mm/MMInt.h
new file mode 100644
index 0000000..8f9a26b
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/mm/MMInt.h
@@ -0,0 +1,56 @@
+#ifndef MMInt_H
+#define MMInt_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMInt.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : message and ie interface among Application (Layer 3)
+// modules.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// included L3 Message header for messages from other Layer 3 modules (CC, RR)
+#include "JCC/JCCL3Msg.h"
+
+// included MD and IRT headers for messages from MS
+#include "ril3/ril3md.h"
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+// defines the message queue ID for MM interface
+//
+#include "vxWorks.h"
+#include "msgQLib.h"
+extern MSG_Q_ID mmMsgQId;
+
+// *******************************************************************
+// Constant Definitions
+// *******************************************************************
+
+// defines the size of buffer for holding each message
+//
+#define MM_MAX_MSG_LENGTH 1024
+//const int MM_MAX_MSG_LENGTH = sizeof(T_CNI_RIL3MD_CCMM_MSG);
+
+//typedefs
+
+#endif // MMInt_H
+
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/rm/debug.h b/data/mnet/GP10/Host/Common_To_Host/rm/debug.h
new file mode 100644
index 0000000..c7535ab
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/rm/debug.h
@@ -0,0 +1,38 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __DEBUG_H__
+#define __DEBUG_H__
+
+#include "stdio.h"
+
+// Constants used in debug.cpp
+#define ROW_LEN 10
+#define MAREA__ 0
+#define RXMSG__ 1
+#define TXMSG__ 2
+
+#define PDEBUG__(X) rm_Dbg.Trace X
+#define EDEBUG__(X) rm_Dbg.Error X
+#define IDEBUG__(X) rm_Dbg.Warning X
+#define DDEBUG__(X) rm_Dbg.Warning X
+#define UDEBUG__(X) rm_Dbg.Warning X
+#define RMDBG_ENTER(X) rm_Dbg.Func X
+#define BYDUMP__(X) rm_Dbg.HexDump X
+
+// DUMP->db_BDump to dump out data in hex form
+
+#define RDEBUG__(X) rm_Dbg.Trace X
+#define TDEBUG__(X)
+#define BDUMP__(X)
+#define EDUMP__(X)
+#define UDUMP__(X)
+#define TDUMP__(X)
+void db_BDump ( unsigned char, unsigned char *, unsigned short );
+
+#endif //__DEBUG_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/rm/rm_ccintf.h b/data/mnet/GP10/Host/Common_To_Host/rm/rm_ccintf.h
new file mode 100644
index 0000000..deb5647
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/rm/rm_ccintf.h
@@ -0,0 +1,18 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_CCINTF_H__
+#define __RM_CCINTF_H__
+
+#include "lapdm\lapdm_l3intf.h"
+#include "ril3\ril3irt.h"
+
+T_CNI_LAPDM_OID rm_GetOid (T_CNI_IRT_ID entryId, T_CNI_LAPDM_SAPI sapi);
+T_CNI_IRT_ID rm_GetSacchEntryId (T_CNI_IRT_ID entryId);
+
+#endif //__RM_CCINTF_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/rm/rm_const.h b/data/mnet/GP10/Host/Common_To_Host/rm/rm_const.h
new file mode 100644
index 0000000..76bd71e
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/rm/rm_const.h
@@ -0,0 +1,331 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*******************************************************************
+*/
+
+#ifndef __RM_CONST_H__
+#define __RM_CONST_H__
+
+// Options for RM Task
+
+#define RM_TASK_PRIORITY 70
+#define RM_STACK_SIZE 20000
+#define RM_TASK_OPTION 0
+
+//General purpose constants
+
+#define RM_TRUE 1
+#define RM_FALSE 0
+#define RM_U8_0X01 0x01
+#define RM_U8_0X08 0x08
+#define RM_U8_0X07 0x07
+#define RM_U8_0X0F 0x0F
+#define RM_U8_0X80 0x80
+#define RM_U8_0X88 0x88
+#define RM_U8_0X90 0x90
+#define RM_U8_0X04 0x04
+
+// Constants for internal use
+
+#define RM_T3101 0
+#define RM_T3111 1
+#define RM_T3109 2
+#define RM_T3L01 3
+#define RM_T3105 4
+#define RM_TWDOG 5
+#define RM_T3L02 6
+
+// Constants for misc purposes
+
+#define RM_LINKED 0
+#define RM_RSLIND 1
+#define RM_MDLERR 1
+#define RM_LOCKED 10
+#define RM_SAPI0 0
+#define RM_SAPI3 3
+#define RM_SACCHBAD_POS 0
+#define RM_RSLCOUNT_BOUND 10
+#define RM_SI 0
+#define RM_PHYCHAN_QUALITY_PREALPHA 0xff
+
+//AGCH groups as per BCCH-SDCCH comb or not
+
+#define RM_L1MAX_AGCH_GROUPS_COMB 2
+#define RM_L1MAX_AGCH_GROUPS_UNCOMB 8
+
+// Establishe causes specified by GSM 04.08 Channel Request message
+
+#define RM_CHANREQ_COS_LUP 0x00
+#define RM_CHANREQ_COS_MOC 0xE0
+#define RM_CHANREQ_COS_MTC 0x80
+#define RM_CHANREQ_COS_EMC 0xA0
+#define RM_CALLTYPE_LUP 0x00
+#define RM_CALLTYPE_MOC 0xE0
+#define RM_CALLTYPE_MTC 0x80
+
+// Max # of physical channel resources
+
+#define RM_L1MAX_BCCCHS 4
+#define RM_L1MAX_SDCCH4S 4
+#define RM_L1MAX_TCHFS 15
+#define RM_MAX_SMCTXTS 0x30
+
+// Index to rm_PhyChanBcchCcch[]
+
+#define RM_BCCH_IDX 0
+#define RM_RACH_IDX 1
+#define RM_PCH_IDX 2
+#define RM_AGCH_IDX 3
+
+// Physical channel status
+
+#define RM_PHYCHAN_UNUSABLE 0
+#define RM_PHYCHAN_USABLE 1
+#define RM_PHYCHAN_CBCH_USABLE 2
+#define RM_PHYCHAN_FREE 0
+#define RM_PHYCHAN_ASSIGNED 1
+#define RM_PHYCHAN_RELEASING 2
+
+// SM Ctxt types
+
+#define RM_MAIN_SM 1
+#define RM_ACCH_SM 2
+
+// States of DSP initialization
+
+#define RM_TRXMGMT_SNULL 0
+#define RM_TRXMGMT_S0_BOOTSTRAP_IND 1
+#define RM_TRXMGMT_S1_TRXCONFIG_ACK 2
+#define RM_TRXMGMT_S2_SLOTACTIV_ACK 3
+#define RM_TRXMGMT_S3_TRXCONFIG_END 4
+
+// RM State Machine states
+
+#define RM_S0NULL 0
+#define RM_S1RM_RUNNING 1
+#define RM_S2ACTIVATING_SIGTRAFFIC_CHAN 2
+#define RM_S3SIGCHAN_ACTIVATED 3
+#define RM_S4TRAFFICCHAN_ACTIVATED 4
+#define RM_S5SIGMODE_ESTABLISHED 5
+#define RM_S6ACTIVATING_TRAFFICMODE 6
+#define RM_S7RELEASING_SIGTRAFFICCHAN 7
+#define RM_S8TRAFFICMODE_ACTIVATED 8
+#define RM_S9DEACTIVATING_SIGTRAFFICCHAN 9
+#define RM_S10TRAFFICMODE_ESTABLISHED 10
+#define RM_S11TRAFFICCHAN_SUSPENDING 11
+
+// Definitions referring to Frontier L1 Interface Spec
+
+#define RM_SAVCHANREQ_LEN 8
+#define RM_L1MIN_MSG_LEN 4
+
+// L1 message group
+#define RM_L1MG_TRXMGMT 0x10
+#define RM_L1MG_COMCHAN 0x0C
+#define RM_L1MG_DEDMGMT 0x08
+#define RM_L1MG_LNKMGMT 0x02
+#define RM_L1MG_OAM 0x80
+
+// L1 message types
+#define RM_L1MT_CBCHRTS_MSB 0x03
+#define RM_L1MT_CBCHRTS_LSB 0x00
+#define RM_L1MT_PING_MSB 0x13
+#define RM_L1MT_PING_LSB 0x00
+#define RM_L1MT_PINGACK_MSB 0x13
+#define RM_L1MT_PINGACK_LSB 0x01
+#define RM_L1MT_ARFCN_MSB 0x29
+#define RM_L1MT_ARFCN_LSB 0x00
+
+#define RM_L1MT_NULL 0xFFFF
+#define RM_L1MT_NULL_MSB 0XFF
+#define RM_L1MT_NULL_LSB 0xFF
+#define RM_L1MT_BCCHINFO 0x0011
+#define RM_L1MT_BCCHINFO_MSB 0x00
+#define RM_L1MT_BCCHINFO_LSB 0x11
+#define RM_L1MT_SYNCH 0x001D
+#define RM_L1MT_SYNCH_MSB 0x00
+#define RM_L1MT_SYNCH_LSB 0x1D
+#define RM_L1MT_SYNCHACK 0x001E
+#define RM_L1MT_SYNCHACK_MSB 0x00
+#define RM_L1MT_SYNCHACK_LSB 0x1E
+
+#define RM_L1MT_TRXCONFIG 0x1500
+#define RM_L1MT_TRXCONFIG_MSB 0x15
+#define RM_L1MT_TRXCONFIG_LSB 0x00
+#define RM_L1MT_TRXCONFIGACK 0x1600
+#define RM_L1MT_TRXCONFIGACK_MSB 0x16
+#define RM_L1MT_TRXCONFIGACK_LSB 0x00
+#define RM_L1MT_SACCHFILL 0x001A
+#define RM_L1MT_SACCHFILL_MSB 0x00
+#define RM_L1MT_SACCHFILL_LSB 0x1A
+#define RM_L1MT_RFRESIND 0x0019
+#define RM_L1MT_RFRESIND_MSB 0x00
+#define RM_L1MT_RFRESIND_LSB 0x19
+#define RM_L1MT_OVERLOAD 0x001B
+#define RM_L1MT_OVERLOAD_MSB 0x00
+#define RM_L1MT_OVERLOAD_LSB 0x1B
+#define RM_L1MT_SLOTACTIV 0x1700
+#define RM_L1MT_SLOTACTIV_MSB 0x17
+#define RM_L1MT_SLOTACTIV_LSB 0x00
+#define RM_L1MT_SLOTACTIVACK 0x1800
+#define RM_L1MT_SLOTACTIVACK_MSB 0x18
+#define RM_L1MT_SLOTACTIVACK_LSB 0x00
+#define RM_L1MT_SLOTACTIVNACK 0x1900
+#define RM_L1MT_SLOTACTIVNACK_MSB 0x19
+#define RM_L1MT_SLOTACTIVNACK_LSB 0x00
+#define RM_L1MT_SETUGAIN 0x1000
+#define RM_L1MT_SETUGAIN_MSB 0x10
+#define RM_L1MT_SETUGAIN_LSB 0x00
+#define RM_L1MT_SETDGAIN 0x1100
+#define RM_L1MT_SETDGAIN_MSB 0x11
+#define RM_L1MT_SETDGAIN_LSB 0x00
+#define RM_L1MT_TUNESYNTH 0x1200
+#define RM_L1MT_TUNESYNTH_MSB 0x12
+#define RM_L1MT_TUNESYNTH_LSB 0x00
+#define RM_L1MT_CONFIGFPGADELAY 0x14
+#define RM_L1MT_CONFIGFPGADELAY_MSB 0x14
+#define RM_L1MT_CONFIGFPGADELAY_LSB 0x00
+#define RM_L1MT_BOOTSTRAPCNF 0x2000
+#define RM_L1MT_BOOTSTRAPCNF_MSB 0x20
+#define RM_L1MT_BOOTSTRAPCNF_LSB 0x00
+#define RM_L1MT_CHANACTIV 0x0021
+#define RM_L1MT_CHANACTIV_MSB 0x00
+#define RM_L1MT_CHANACTIV_LSB 0x21
+#define RM_L1MT_CHANACTIVACK 0x0022
+#define RM_L1MT_CHANACTIVACK_MSB 0x00
+#define RM_L1MT_CHANACTIVACK_LSB 0x22
+#define RM_L1MT_CHANACTIVNACK 0x0023
+#define RM_L1MT_CHANACTIVNACK_MSB 0x00
+#define RM_L1MT_CHANACTIVNACK_LSB 0x23
+#define RM_L1MT_RFCHANREL 0x002E
+#define RM_L1MT_RFCHANREL_MSB 0x00
+#define RM_L1MT_RFCHANREL_LSB 0x2E
+#define RM_L1MT_RFCHANRELACK 0x0033
+#define RM_L1MT_RFCHANRELACK_MSB 0x00
+#define RM_L1MT_RFCHANRELACK_LSB 0x33
+#define RM_L1MT_RSL_MSB 0x00
+#define RM_L1MT_RSL_LSB 0x35
+#define RM_L1MT_MEASRES 0x0028
+#define RM_L1MT_MEASRES_MSB 0x00
+#define RM_L1MT_MEASRES_LSB 0x28
+#define RM_L1MT_MODEMODIFY 0x0029
+#define RM_L1MT_MODEMODIFY_MSB 0x00
+#define RM_L1MT_MODEMODIFY_LSB 0x29
+#define RM_L1MT_ENCRYPTION 0x0026
+#define RM_L1MT_ENCRYPTION_MSB 0x00
+#define RM_L1MT_ENCRYPTION_LSB 0x26
+#define RM_L1MT_MODEMODIFYACK 0x002A
+#define RM_L1MT_MODEMODIFYACK_MSB 0x00
+#define RM_L1MT_MODEMODIFYACK_LSB 0x2A
+#define RM_L1MT_MODEMODIFYNACK 0x002B
+#define RM_L1MT_MODEMODIFYNACK_MSB 0x00
+#define RM_L1MT_MODEMODIFYNACK_LSB 0x2B
+#define RM_L1MT_DEACTIVSACCH 0x0025
+#define RM_L1MT_DEACTIVSACCH_MSB 0x00
+#define RM_L1MT_DEACTIVSACCH_LSB 0x25
+#define RM_L1MT_PHDATAREQ_MSB 0x00
+#define RM_L1MT_PHDATAREQ_LSB 0x01
+#define RM_L1MT_ASYNCHO_REQUIRED_MSB 0x00
+#define RM_L1MT_ASYNCHO_REQUIRED_LSB 0x36
+#define RM_L1MT_AYSNCHO_REQ_MSB 0x00
+#define RM_L1MT_AYSNCHO_REQ_LSB 0x37
+
+// Channel Number IE
+#define RM_L1TCHF_CHANNUMBER_TYPE 0x08
+#define RM_L1SDCCH4_CHANNUMBER_TYPE 0x20
+#define RM_L1RACH_CHANNUMBER_MSB 0x88
+#define RM_L1RACH_CHANNUMBER_LSB 0x00
+#define RM_L1PCH_CHANNUMBER_MSB 0x90
+#define RM_L1PCH_CHANNUMBER_LSB 0x00
+#define RM_L1AGCH_CHANNUMBER_MSB 0x90
+#define RM_L1AGCH_CHANNUMBER_LSB 0x00
+#define RM_L1BCCH_CHANNUMBER_MSB 0x80
+#define RM_L1BCCH_CHANNUMBER_LSB 0x00
+#define RM_L1CBCH_CHANNUMBER_MSB 0xa0
+#define RM_L1CBCH_CHANNUMBER_LSB 0x00
+
+// Channel Mode IE
+#define RM_L1ACTTYPE_IMMASS 0x00
+#define RM_L1ACTTYPE_ASYNC_HO 0x02
+#define RM_L1ACTTYPE_CBCH 0x06
+
+// DTX & Date Rate
+#define RM_L1DTXCTRL_D0U0 0x00
+#define RM_L1DATATTR_SPEECH 0x01
+#define RM_L1DATATTR_DATA 0x02
+#define RM_L1DATATTR_SIGNALING 0x03
+#define RM_L1RATTYPE_SDCCH 0x01
+#define RM_L1RATTYPE_TCHF 0x08
+#define RM_L1CODALGO_NORES 0x00
+#define RM_L1CODALGO_GSMV1 0x01
+#define RM_L1CODALGO_GSMV2 0x21
+#define RM_L1CODALGO_GSMV3 0x41
+
+// Encryption
+#define RM_L1CIPHTYPE_NCIPH 0x01
+#define RM_L1CIPHKEY_LEN 9
+
+// Power control and TA
+#define RM_L1BSPOWER_PREALPHA 0
+#define RM_L1MSPOWER_PREALPHA 0
+
+// Trx number IE
+#define RM_L1MAX_TRXS 2
+#define RM_L1TRX_NULL 255
+#define RM_L1TRX_0 0
+#define RM_L1TRX_1 1
+#define RM_PREALPHA_TRX 0
+
+// System information IE
+#define RM_L1MAX_SYSINFOS 8
+#define RM_L1MAX_SYSINFO_LEN 24
+#define RM_L1SYSINFO_TYPE_8 0x00
+#define RM_L1SYSINFO_TYPE_1 0x01
+#define RM_L1SYSINFO_TYPE_2 0x02
+#define RM_L1SYSINFO_TYPE_3 0x03
+#define RM_L1SYSINFO_TYPE_4 0x04
+#define RM_L1SYSINFO_TYPE_5 0x05
+#define RM_L1SYSINFO_TYPE_6 0x06
+#define RM_L1SYSINFO_TYPE_7 0x07
+
+// Synthesizer setting
+#define RM_L1UL_SYNTH_A 0
+#define RM_L1UL_SYNTH_B 1
+#define RM_L1DL_SYNTH_A 2
+#define RM_L1DL_SYNTH_B 3
+
+// Link Identifer IE
+#define RM_L1LINK_MAIN 0x00
+#define RM_L1LINK_ACCH 0x40
+#define RM_L1LINK_VOID 0x20
+
+// Air Interface standard IE
+#define RM_L1PCS1900 0x02
+
+// Channel Sync
+#define RM_L1SYNCH_CHANINFO_LEN 4
+
+
+// Definition added for OAM message group
+#define TOTAL_AVAILABLE_CELL 3
+#define TOTAL_AVAILABLE_TRX 1
+
+#define OAM_MANAGE_MSG 0x0C<<1
+#define OAM_DPC_CONFIG 0x5000
+#define OAM_DPC_CONFIG_ACK 0x5001
+#define OAM_HO_SCELL_CONFIG 0x5002
+#define OAM_HO_SCELL_CONFIG_ACK 0x5003
+#define OAM_HO_NCELL_CONFIG 0x5004
+#define OAM_HO_NCELL_CONFIG_ACK 0x5005
+#define OAM_BTS_PACKAGE 0x5008
+#define OAM_BTS_PACKAGE_MSB 0x50
+#define OAM_BTS_PACKAGE_LSB 0x08
+
+// SMS-CB table size
+#define SmsCbc_TableRow_MAX 100
+
+#endif // __RM_CONST_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/rm/rm_data.h b/data/mnet/GP10/Host/Common_To_Host/rm/rm_data.h
new file mode 100644
index 0000000..89841e6
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/rm/rm_data.h
@@ -0,0 +1,100 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_DATA_H__
+#define __RM_DATA_H__
+
+#include "rm_head.h"
+extern char __DEBUGVAR__;
+extern char __RDEBUG__;
+extern char __EDEBUG__;
+extern char __DDEBUG__;
+extern char __UDEBUG__;
+extern char __PDEBUG__;
+extern char __TDEBUG__;
+extern char __BDUMP__ ;
+extern char __EDUMP__ ;
+extern char __TDUMP__ ;
+extern char __UDUMP__ ;
+
+extern DbgOutput rm_Dbg;
+
+extern rm_UmSI2_t rm_UmSI2;
+extern rm_UmSI3_t rm_UmSI3;
+extern rm_UmSI4_t rm_UmSI4;
+extern rm_UmSI5_t rm_UmSI5;
+extern rm_UmSI6_t rm_UmSI6;
+
+extern T_CNI_IRT_ID rm_RachEntryId;
+
+extern MSG_Q_ID mmMsgQId;
+extern MSG_Q_ID rm_MsgQId;
+extern T_CNI_L3_ID rm_id;
+extern T_CNI_L3_ID mm_id;
+extern T_CNI_L3_ID cc_id;
+extern rm_UmMsg_t rm_UmMsg;
+extern rm_SmCtxt_t *rm_pSmCtxt;
+extern rm_SmAction_t *rm_SmAction[];
+extern u8 rm_ItcRxOrigin;
+extern rm_IrtEntryId_t rm_ItcRxEntryId;
+extern u8 rm_BootstrapCnf;
+extern u16 rm_ItcRxPrim;
+extern u8 rm_AgchGroup[];
+extern rm_SmscbcMsg_t rm_SmscbcMsg;
+extern rm_ItcRxMsg_t rm_ItcRxMsg;
+
+extern rm_ItcRxMdMsg_t *rm_pItcRxMdMsg;
+extern rm_ItcRxL1Msg_t *rm_pItcRxL1Msg;
+extern rm_ItcRxMmMsg_t *rm_pItcRxMmMsg;
+extern rm_ItcRxBgMsg_t *rm_pItcRxBgMsg;
+extern rm_ItcRxCcMsg_t *rm_pItcRxCcMsg;
+extern rm_ItcRxRmMsg_t *rm_pItcRxRmMsg;
+extern rm_ItcRxOamMsg_t *rm_pItcRxOamMsg;
+extern rm_ItcRxVbMsg_t *rm_pItcRxVbMsg;
+
+extern rm_PhyChanBCcch_t rm_PhyChanBCcch;
+extern rm_PhyChanTchf_t rm_PhyChanTchf;
+extern rm_PhyChanSdcch4_t rm_PhyChanSdcch4;
+
+extern rm_SmCtxts_t rm_SmCtxt;
+
+extern rm_IrtEntryId_t rm_TchfEntryId[];
+extern rm_IrtEntryId_t rm_Sdcch4EntryId[];
+
+extern T_CNI_L3_ID rm_id;
+extern T_CNI_L3_ID mm_id;
+extern T_CNI_L3_ID cc_id;
+
+//SMSCBAdded
+extern rm_PhyChanDesc_t *rm_pCbchChan;
+extern u8 rm_ChanCbchActive;
+
+//AMADDED
+extern const Alarm_errorCode_t rm_DspNotTickingAnyMore[OAMrm_MAX_TRXS];
+extern const Alarm_errorCode_t rm_DspNotResponding[OAMrm_MAX_TRXS];
+extern const Alarm_errorCode_t rm_TrxRadioOff[OAMrm_MAX_TRXS];
+extern const Alarm_errorCode_t rm_TrxAdminLockedAlarmCode[OAMrm_MAX_TRXS];
+extern const Alarm_errorCode_t rm_TrxAdminUnlockedAlarmCode[OAMrm_MAX_TRXS];
+extern const Alarm_errorCode_t rm_TrxAdminShuttingDownAlarmCode[OAMrm_MAX_TRXS];
+extern const Alarm_errorCode_t rm_TrxSlotAdminLockedAlarmCode[OAMrm_MAX_TRXS][OAMrm_SLOTS_PER_TRX];
+extern const Alarm_errorCode_t rm_TrxSlotAdminUnlockedAlarmCode[OAMrm_MAX_TRXS][OAMrm_SLOTS_PER_TRX];
+extern const Alarm_errorCode_t rm_TrxSlotAdminShuttingDownAlarmCode[OAMrm_MAX_TRXS][OAMrm_SLOTS_PER_TRX];
+
+extern int rm_ItcRxPrimType;
+extern int rm_ItcRxMsgType;
+
+extern msg_TableHdr_t rm_CbMsgTable;
+
+//GP2
+extern int rm_DbgDump;
+extern rm_ItcRxGrrMsg_t* rm_pItcRxGrrMsg;
+extern int rm_CbchOpState;
+
+extern unsigned char rm_DspCiphCap;
+
+#endif //__RM_DATA_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/rm/rm_extdef.h b/data/mnet/GP10/Host/Common_To_Host/rm/rm_extdef.h
new file mode 100644
index 0000000..9c0f9a6
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/rm/rm_extdef.h
@@ -0,0 +1,94 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_EXTDEF_H__
+#define __RM_EXTDEF_H__
+
+//
+// Imported function names
+//
+#define rm_SendDlRelReq CNI_LAPDM_Dl_Release_Request
+#define rm_SendMdlRelReq CNI_LAPDM_Mdl_Release_Request
+#define rm_SendDlRelReq CNI_LAPDM_Dl_Release_Request
+#define rm_SendDlDataReq CNI_LAPDM_Dl_Data_Request
+
+//
+// Imported symbolic constants
+//
+#define RM_CELL_NOT_BARRED CNI_RIL3_CELL_NOT_BARRED //0
+#define RM_CELL_BARRED CNI_RIL3_CELL_BARRED_ACCESS //1
+#define RM_REST_NOT_ALLOWED CNI_RIL3_REESTABLISHMENT_NOT_ALLOWED //1
+#define RM_REST_ALLOWD CNI_RIL3_REESTABLISHMENT_ALLOWED //0
+#define RM_EC_NOT_ALLOWED CNI_RIL3_EMERGENCY_CALL_HIGHCLASS_MS_ONLY //1
+#define RM_EC_ALLOWED CNI_RIL3_EMERGENCY_CALL_ALLOWED_TO_ALL_MS //0
+
+#define RM_EXTIND_0 CNI_RIL3_EXT_IND_BA_COMPLETE
+#define RM_EXTIND_1 CNI_RIL3_EXT_IND_BA_PARTIAL
+#define RM_P_NOT_PRESENT CNI_RIL3_FREQ_PARAM_FIELD_NOT_PRESENT
+#define RM_P_PRESENT CNI_RIL3_FREQ_PARAM_FIELD_PRESENT
+#define RM_BA_WHOLE CNI_RIL3_EXT_IND_BA_COMPLETE
+#define RM_FRMT_VARBITMAP CNI_RIL3_FREQ_LIST_FORMAT_VARIABLE_BIT_MAP
+
+//
+// ED-relaged definitions for RM-ED interface
+//
+#define RM_RAED_SUCCESS CNI_RIL3_RESULT_SUCCESS // enum @ ril3_result.h
+#define RM_RRED_SUCCESS CNI_RIL3_RESULT_SUCCESS // enum @ ril3_result.h
+#define RM_UMED_SUCCESS CNI_RIL3_RESULT_SUCCESS // enum @ ril3_result.h
+
+#define RM_PHYCHAN_TCHF_S CNI_RIL3_TCH_ACCH_FULL // @ ie_rrm_common.h
+#define RM_PHYCHAN_SDCCH4 CNI_RIL3_SDCCH_ACCH_4orCBCH
+#define RM_NORMAL_EVENT CNI_RIL3_RR_NORMAL_EVENT
+#define RM_CHANMODESP_VER1 CNI_RIL3_CHANNELMODE_SPEECH_VER1
+#define RM_CTFACCH_F CT_FACCH_F
+#define RM_CTSDCCH CT_SDCCH
+#define RM_CTSACCH CT_SACCH
+#define RM_CTPCH CT_PCH
+#define RM_CTAGCH CT_AGCH
+#define RM_CTRACH CT_RACH
+#define RM_CTBCCH CT_BCCH
+
+#define RM_PD CNI_RIL3_PD_RRM // enum @ ril3msgheader.h
+#define MM_PD CNI_RIL3_PD_MM // enum @ ril3msgheader.h
+
+#define RM_SI2 CNI_RIL3RRM_MSGID_SYSTEM_INFORMATION_2
+#define RM_SI3 CNI_RIL3RRM_MSGID_SYSTEM_INFORMATION_3
+#define RM_SI4 CNI_RIL3RRM_MSGID_SYSTEM_INFORMATION_4
+#define RM_SI5 CNI_RIL3RRM_MSGID_SYSTEM_INFORMATION_5
+#define RM_SI6 CNI_RIL3RRM_MSGID_SYSTEM_INFORMATION_6
+#define RM_PAGING_REQUEST_TYPE_1 CNI_RIL3RRM_MSGID_PAGING_REQUEST_TYPE_1
+#define RM_IMMEDIATE_ASSIGNMENT CNI_RIL3RRM_MSGID_IMMEDIATE_ASSIGNMENT
+#define RM_PAGING_RESPONSE CNI_RIL3RRM_MSGID_PAGING_RESPONSE
+#define RM_CHANNEL_RELEASE CNI_RIL3RRM_MSGID_CHANNEL_RELEASE
+#define RM_CHANNEL_MODE_MODIFY CNI_RIL3RRM_MSGID_CHANNEL_MODE_MODIFY
+#define RM_CHANNEL_MODE_MODIFY_ACK CNI_RIL3RRM_MSGID_CHANNEL_MODE_MODIFY_ACKNOWLEDGE
+
+#define RM_NORMAL_PAGING CNI_RIL3_NORMAL_PAGING
+#define RM_CHANNEEDED_TCHF CNI_RIL3_CHANNEL_NEEDED_TCHF
+#define RM_IMSI CNI_RIL3_IDENTITY_TYPE_IMSI
+#define RM_IMEI CNI_RIL3_IMEI
+#define RM_IMEISV CNI_RIL3_IMEISV
+#define RM_TMSI CNI_RIL3_TMSI
+#define RM_NOMOBILEID CNI_RIL3_NO_MOBILE_ID
+
+//
+// Message-related definitions for RM-MM interface
+//
+#define MM_PAGE_REQ INTRA_L3_RR_PAGE_REQ
+#define MM_PAGE_RSP INTRA_L3_RR_PAGE_RSP
+
+#define MM_CHAN_ASSIGN_CMD INTRA_L3_RR_CHANN_ASSIGN_CMD
+#define MM_CHAN_ASSIGN_COM INTRA_L3_RR_CHANN_ASSIGN_COM
+
+#define MM_BEARER_SPEECH BEARER_SPEECH
+#define MM_BEARER_DATA BEARER_DATA
+#define MM_BEARER_SIGNALING BEARER_SIGNALING
+#define RM_NORREL RM_NORMAL
+#define RM_LOCREL RM_LOCAL_RELEASE
+
+#endif // __RM_EXTDEF_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/rm/rm_head.h b/data/mnet/GP10/Host/Common_To_Host/rm/rm_head.h
new file mode 100644
index 0000000..fc92741
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/rm/rm_head.h
@@ -0,0 +1,60 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __RM_HEAD_H__
+#define __RM_HEAD_H__
+
+#include "vxWorks.h"
+#include "stdio.h"
+#include "string.h"
+#include "msgQlib.h"
+#include "wdLib.h"
+#include "taskLib.h"
+#include "rm_extdef.h"
+#include "MnetModuleId.h"
+#include "logging\vclogging.h"
+#include "lapdm\lapdm_common.h"
+#include "lapdm\lapdm_config.h"
+#include "lapdm\lapdm_l3intf.h"
+#include "ril3\ril3irt.h"
+#include "ril3\ril3md.h"
+#include "ril3\ril3msgtype.h"
+#include "ril3\ril3_common.h"
+#include "ril3\ie_ia_rest_octets.h"
+#include "ril3\ie_neighbour_cells_description.h"
+#include "ril3\ie_rach_control_param.h"
+#include "ril3\ie_control_channel_description.h"
+#include "ril3\ie_cell_options.h"
+#include "ril3\ie_cell_selection.h"
+#include "ril3\ie_bearer_capability.h"
+#include "ril3\com_freqlistbitmap.h"
+#include "jcc\JCCHOMsg.h"
+#include "jcc\JCCL3Msg.h"
+#include "jcc\JCCbcCb.h"
+#include "csunew\csu_head.h"
+#include "defs.h"
+#include "oam_api.h"
+#include "pm\pm_class.h"
+#include "grr\grr_intf.h" //G2
+#include "bssgp\bssgp_api.h" //G2
+#include "sys_init.h"
+#include "rm_import.h"
+#include "rm_prim.h"
+#include "rml1_intf.h"
+#include "rm_const.h"
+#include "rm_types.h"
+#include "rm_marco.h"
+#include "rm_struct.h"
+#include "rm_itcmsg.h"
+#include "rm_proto.h"
+#include "rm_oamif.h"
+#include "rm_data.h"
+#include "debug.h"
+
+#endif // __RM_HEAD_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/rm/rm_import.h b/data/mnet/GP10/Host/Common_To_Host/rm/rm_import.h
new file mode 100644
index 0000000..5fcd1bc
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/rm/rm_import.h
@@ -0,0 +1,58 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __RM_IMPORT_H__
+#define __RM_IMPORT_H__
+
+#include "ril3\ril3_result.h"
+#include "ril3\ril3irt.h"
+#include "lapdm\lapdm_l3intf.h"
+#include "ril3\ril3msgheader.h"
+#include "ril3\ie_rrm_common.h"
+#include "ril3\ie_identity_type.h"
+#include "ril3\ie_page_mode.h"
+#include "ril3\ie_mobile_id.h"
+#include "ril3\msg_channel_request.h"
+#include "ril3\ril3_rrm_msg.h"
+#include "jcc\JCCL3Msg.h"
+
+//
+// Imported data types
+//
+typedef T_CNI_LAPDM_SAPI rm_LapdmSapi_t;
+typedef T_CNI_LAPDM_GsmChannelType rm_LapdmGsmChanType_t;
+typedef T_CNI_LAPDM_ReleaseMode rm_LapdmRelMode_t;
+typedef T_CNI_RIL3_CHANNEL_TYPE rm_UmEdChanType_t; // @ie_rrm_common.h
+typedef T_CNI_RIL3RRM_MSG rm_UmMsg_t; // union of ril3 msgs@ril3_rrm_msg.h
+typedef T_CNI_IRT_ID rm_IrtEntryId_t; // unsigned short def @ ril3irt.h
+typedef T_CNI_LAPDM_OID rm_LapdmOId_t; // unsigned long: def @ladpm_l3intf.h
+typedef T_CNI_RIL3_RESULT rm_EdRet_t; // enum @ ril3_result.h
+typedef T_CNI_RIL3RRM_MSG_CHANNEL_REQUEST rm_ChanReq_t; // add prefix Um later
+typedef T_CNI_RIL3RRM_MSG_SYSTEM_INFO_TYPE2 rm_UmSI2_t;
+typedef T_CNI_RIL3RRM_MSG_SYSTEM_INFO_TYPE3 rm_UmSI3_t;
+typedef T_CNI_RIL3RRM_MSG_SYSTEM_INFO_TYPE4 rm_UmSI4_t;
+typedef T_CNI_RIL3RRM_MSG_SYSTEM_INFO_TYPE5 rm_UmSI5_t;
+typedef T_CNI_RIL3RRM_MSG_SYSTEM_INFO_TYPE6 rm_UmSI6_t;
+typedef T_CNI_RIL3RRM_MSG_CHANNEL_MODE_MODIFY rm_UmChanModeModify_t;
+typedef T_CNI_RIL3RRM_MSG_CHANNEL_MODE_MODIFY_ACK rm_UmChanModeModifyAck_t;
+typedef T_CNI_RIL3RRM_MSG_PAGING_REQUEST_TYPE1 rm_UmPageType1_t;
+typedef T_CNI_RIL3RRM_MSG_IMMEDIATE_ASSIGNMENT rm_UmImmAssign_t;
+typedef T_CNI_RIL3RRM_MSG_PAGING_RESPONSE rm_UmPagingRsp_t;
+typedef T_CNI_RIL3RRM_MSG_CHANNEL_RELEASE rm_UmChanRel_t;
+
+typedef IntraL3PageRequest_t rm_MmPaging_t;
+typedef IntraL3PageResponse_t rm_MmPagingRsp_t;
+typedef IntraL3Msg_t rm_ItcTxL3Msg_t;
+typedef IntraL3ChannAssignCmd_t rm_MmChannAssign_t;
+
+typedef T_CNI_LAPDM_L3MessageUnit rm_L3Data_t; // @lapdm_l3intf.h
+typedef T_CNI_RIL3_IE_MOBILE_ID rm_IeMobileId_t; // @ie_mobile_id.h
+typedef T_CNI_RIL3_IE_MOBILE_ID rm_IeImsi_t; // @ie_mobile_id.h
+
+#endif // __RM_IMPORT_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/rm/rm_itcmsg.h b/data/mnet/GP10/Host/Common_To_Host/rm/rm_itcmsg.h
new file mode 100644
index 0000000..ef0368b
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/rm/rm_itcmsg.h
@@ -0,0 +1,77 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __RM_ITCMSG_H__
+#define __RM_ITCMSG_H__
+
+#include "ril3\ril3md.h"
+#include "jcc\JCCL3Msg.h"
+#include "oam_api.h"
+#include "jcc\JCCbcCb.h"
+#include "grr\grr_type.h"
+#include "rm_types.h"
+
+
+//
+// ITC message definition for RM inbound messages
+//
+
+#define RM_MAX_QMSG_LEN 200
+#define RM_MAX_RXQMSG_LEN RM_MAX_QMSG_LEN
+#define RM_MAX_TXQMSG_LEN RM_MAX_QMSG_LEN
+
+typedef T_CNI_RIL3MD_RRM_MSG rm_ItcRxMdMsg_t; // struct @ ril3md.h
+typedef IntraL3Msg_t rm_ItcRxMmMsg_t; // struct @ JCCL3Msg.h
+typedef IntraL3Msg_t rm_ItcRxBgMsg_t; // struct @ JCCL3Msg.h
+typedef IntraL3Msg_t rm_ItcRxCcMsg_t; // struct @ JCCL3Msg.h
+typedef TrapMsg rm_ItcRxOamMsg_t;
+
+typedef struct {
+ u8 module_id;
+ u8 entry_id;
+ u8 primitive_type;
+ u8 timerId;
+
+ struct {
+ u16 msgLength;
+ u8 buffer[RM_MAX_RXQMSG_LEN];
+ } l3_data;
+
+ } rm_ItcRxL1Msg_t, rm_ItcRxRmMsg_t;
+
+typedef InterCbcCbData_t rm_ItcRxVbMsg_t;
+
+//GP2
+typedef grr_ItcMsg_t rm_ItcRxGrrMsg_t;
+
+typedef union {
+ u8 module_id;
+ rm_ItcRxMdMsg_t itcRxMdMsg;
+ rm_ItcRxL1Msg_t itcRxL1Msg;
+ rm_ItcRxMmMsg_t itcRxMmMsg;
+ rm_ItcRxBgMsg_t itcRxBgMsg;
+ rm_ItcRxCcMsg_t itcRxCcMsg;
+ rm_ItcRxRmMsg_t itcRxRmMsg;
+ rm_ItcRxOamMsg_t itcRxOamMsg;
+ rm_ItcRxVbMsg_t itcRxVbMsg;
+ rm_ItcRxGrrMsg_t itcRxGrrMsg; //GP2
+
+ } rm_ItcRxMsg_t;
+
+
+//
+// ITC message format def for RM outbound messages
+//
+typedef struct {
+ u16 msgLength;
+ u8 buffer[RM_MAX_TXQMSG_LEN];
+
+ } rm_ItcTxMsg_t;
+
+#endif // __RM_ITCMSG_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/rm/rm_marco.h b/data/mnet/GP10/Host/Common_To_Host/rm/rm_marco.h
new file mode 100644
index 0000000..22cd30b
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/rm/rm_marco.h
@@ -0,0 +1,34 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_MARCO_H__
+#define __RM_MARCO_H__
+
+#define RM_ISTCHF(X) (((X)&0xF8)==0x08)
+#define RM_ISSDCCH4(X) (((X)&0xE0)==0x20)
+
+#define RM_TCHF_ENTRYID(X,Y) ( (((X)<<3)&0x08) | ((Y)&0x07) )
+#define RM_SDCCH4_ENTRYID(X,Y) ((( (((X)<<5)&0x20) | ((Y)&0x07) ) << 2) | (((Y)>>3)&0x03) )
+
+#define RM_MEMSET( X,Y ) memset(X, (int) 0, (size_t) Y )
+#define RM_MEMCPY( X,Y,Z ) memcpy(X, Y, Z)
+
+#define RM_BOOTSTRAPCNF(X) (1<<(X))
+
+#define RM_TCHF_ENTRYIDX(X,Y) ((((X)<<3)&0x08)|((Y)&0x07))
+#define RM_SDCCH4_ENTRYIDX(X,Y) (((((X)<<5)&0x20)|((Y)&0x07))<<2)|(((Y)>>3)&0x03)
+
+#define RM_L1MSGCMP(X,Y,Z) \
+ ((X==rm_pItcRxL1Msg->l3_data.buffer[0])&& \
+ (Y==rm_pItcRxL1Msg->l3_data.buffer[1])&& \
+ (Z==rm_pItcRxL1Msg->l3_data.buffer[2]) )
+
+#define RM_DSPA52(X) (X & 2)
+#define RM_DSPA51(X) (X & 1)
+
+#endif //__RM_MARCO_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/rm/rm_oamif.h b/data/mnet/GP10/Host/Common_To_Host/rm/rm_oamif.h
new file mode 100644
index 0000000..ef8d165
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/rm/rm_oamif.h
@@ -0,0 +1,722 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __RM_OAMIF_H__
+#define __RM_OAMIF_H__
+
+#include "rm_types.h"
+#include "rm_const.h"
+#include "rm_struct.h"
+#include "ril3\ril3_common.h"
+#include "mibtags.h"
+#include "vipermib.h"
+#include "oam_api.h"
+#include "AlarmCode.h"
+#include "jcc\JCCbcCb.h"
+
+#include "grr\grr_data.h"
+
+//
+// Slot combination: Mapped to definition given in OAM vipermib.h
+//
+#define OAMrm_SLOT_COMB_1 tCHFull //0x01 Type I
+#define OAMrm_SLOT_COMB_5 bCCHCombined //0x05 Type V
+#define OAMrm_SLOT_BEACON OAMrm_SLOT_COMB_5 //0x05 Beacon
+#define OAMrm_SLOT_UNUSED 0xFF //0xFF Unused
+
+#define OAMrm_SLOT_COMB_11 pBCCH //0x0B type xi
+#define OAMrm_SLOT_COMB_12 pCCCH //0x0C type xii
+#define OAMrm_SLOT_COMB_13 pDCHData //0x0D type xiii
+
+//
+// NIC setting values: RM internal use only right now. Only VOIP is used in fact
+//
+#define OAMrm_NIC_VOIP 0x00
+#define OAMrm_NIC_SRGSMT1 0x01
+#define OAMrm_NIC_FRGSMT1 0x02
+#define OAMrm_NIC_SRGSME1 0x05
+#define OAMrm_NIC_FRGSME1 0x06
+
+#define OAMrm_HO_ADJCELL_NO_MAX 16
+#define OAMrm_RESEL_ADJCELL_NO_MAX 16
+#define OAMrm_NCC_PERMITTED_MAX 8
+#define OAMrm_HO_ADJCELL_ID_NULL 0
+#define OAMrm_RESEL_ADJCELL_ID_NULL 0
+
+
+#define OAMrm_TRX0_SYNTH_A 0x0000 //b12:power switch:0-off 1-on
+ //b13:freqhop enable:0-off 1-on
+ //b14:trx select:0-trx0 1-trx1
+ //b15:synth select:0-A 1-B
+#define OAMrm_TRX1_SYNTH_A 0x4000 //b12:power switch:0-off 1-on
+ //b13:freqhop enable:0-off 1-on
+ //b14:trx select:0-trx0 1-trx1
+ //b15:synth select:0-A 1-B
+#define OAMrm_TRX1_SYNTH_B 0xC000 //b12:power switch:0-off 1-on
+ //b13:freqhop enable:0-off 1-on
+ //b14:trx select:0-trx0 1-trx1
+ //b15:synth select:0-A 1-B
+
+#define OAMrm_GSMCODEC oam_gsmCodec;
+extern u8 oam_gsmCodec;
+extern u16 oam_TrxTuneSynthSetting[2][2];
+
+//AlarmAdded
+extern int rm_LiveSglCfg;
+#define OAMrm_MAX_TRXS 2
+#define OAMrm_TWDOG 0x1D4C //2 min
+typedef struct {
+ u8 tdma1;
+ u8 tdma2;
+ u8 tdma3;
+ u8 tdma4;
+ u8 done;
+ u8 slot;
+ u8 state;
+ u8 alive;
+ rm_Timer_t TWDOG;
+
+ } rm_TrxMgmt_t;
+
+typedef struct {
+ u8 totPage;
+ u8 curPage;
+ u8 morPage;
+ u8 data[INTER_CBC_CB_MAX_DAT_LEN];
+
+ } rm_SmscbcMsg_t;
+
+extern rm_TrxMgmt_t rm_TrxMgmt[OAMrm_MAX_TRXS];
+extern int rm_OpState;
+extern int rm_NoOfUsableTchf;
+extern int rm_nbrOfAvailableSDCCHs;
+extern int rm_maxNbrOfBusySDCCHs;
+extern int rm_maxNbrOfBusyTCHs;
+
+//AMADDED
+extern T_CNI_RIL3_CELL_BARRED_ACCESS rm_CellBarred;
+extern AdministrativeState rm_AmState00;
+extern int rm_VcIsBarred;
+
+//PMADDED
+extern int rm_NoOfBusySdcch4;
+extern int rm_NoOfBusyTchf;
+extern int rm_NoOfIdleTchf;
+
+typedef struct {
+ int allocated;
+ int startTime;
+
+ } rm_AllChanAvailable_t;
+
+extern rm_AllChanAvailable_t rm_AllAvailableTchf;
+extern rm_AllChanAvailable_t rm_AllAvailableSdcch4;
+
+typedef struct {
+ BtsBasicPackage btsBasicPackage;
+ BtsOptionsPackage btsOptionsPackage;
+ TransceiverPackage transceiverPackage[2];
+ RadioCarrierPackage radioCarrierPackage[2];
+ T31xx t31xx;
+ AdjacentCellPackage adjacentCellPackage;
+ AdjacentCellPackage adjacentCellPackage_t;
+ HandoverControlPackage handoverControlPackage;
+ PowerControlPackage powerControlPackage;
+ ResourceConfigData grrConfigData;
+ int rm_IQSwap;
+
+ } rm_OamData_t;
+
+//GP2
+//extern rm_OamData_t grr_OamData;
+
+//
+// BtsBasicPackage
+//
+
+//1. info
+// <NA>
+
+//2. bts_ncc
+#define OAMrm_NCC \
+ ((unsigned char)(grr_OamData.btsBasicPackage.bts_ncc))
+ //5:oam_Ncc, bts_ncc may be combined with
+//3. bts_cid
+#define OAMrm_BCC \
+ ((unsigned char)(grr_OamData.btsBasicPackage.bts_cid))
+ //5:oam_Bcc
+
+//3a. comb of 2&3:(bts_ncc<<3)|(bts_cid)
+#define OAMrm_BTS_BSIC \
+ ((unsigned char)(grr_OamData.btsBasicPackage.bts_ncc<<3)| \
+ (unsigned char)(grr_OamData.btsBasicPackage.bts_cid))
+ //0x2d: oam_BTSBsic
+//4. btsID
+#define OAMrm_CELLID \
+ ((unsigned int)(grr_OamData.btsBasicPackage.btsID))
+ //0x0001: hi-byte network ID, lo-byte cell ID
+
+//5. cellAllocationTable[0]
+#define OAMrm_BCCH_ARFCN \
+ (((CellAllocationEntry*) \
+ (grr_OamData.btsBasicPackage.cellAllocationTable))[0].cellAllocation)
+ //661:1st element of cellAllocation table is BCCH ARFCN, oam_BcchArfcn
+//6. gsmdcsIndicator
+#define OAMrm_GSMDCS_INDICATOR \
+ grr_OamData.btsBasicPackage.gsmdcsIndicator
+
+//7. bts_mcc
+#define OAMrm_MCC(X) \
+ ((unsigned char*)&(grr_OamData.btsBasicPackage.bts_mcc))[X]
+ //001: bts_mcc is an integer which will be converted to char string, oam_Mcc
+//8. bts_mnc
+#define OAMrm_MNC(X) \
+ ((unsigned char*)&(grr_OamData.btsBasicPackage.bts_mnc))[X]
+ //01: bts_mnc is an integer which will be converted to char string, oam_Mnc
+//9. bts_lac
+#define OAMrm_LAC \
+ ((short)(grr_OamData.btsBasicPackage.bts_lac))
+ //1:oam_Lac[X]
+//10. cellReselectHysteresis
+#define OAMrm_CELL_RESEL_HYSTERESIS \
+ ((unsigned char)(grr_OamData.btsBasicPackage.cellReselectHysteresis))
+ //2:4 dBm
+//11. ny1
+#define OAMrm_NY1 \
+ ((unsigned char)(grr_OamData.btsBasicPackage.ny1))
+ //3
+//12. plmnPermittedTable
+#define OAMrm_NCC_PERMITTED(X) \
+ (((PlmnPermittedEntry*)(grr_OamData.btsBasicPackage.plmnPermittedTable))[X]. \
+ plmnPermitted)
+ //1 for X=5, 0 for other X values, X:0-7
+//13. radioLinkTimeout
+#define OAMrm_RADIO_LINK_TIMEOUT \
+ ((unsigned char)(grr_OamData.btsBasicPackage.radioLinkTimeout))
+ //3: ie 16
+//14. relatedTranscoder
+// <NA>
+
+//15. rxLevAccessMin
+#define OAMrm_MS_RELEV_ACCESS_MIN \
+ ((unsigned char)(grr_OamData.btsBasicPackage.rxLevAccessMin))
+ //6:104dBm
+ //16. bts_administrativeState
+#define OAMrm_BTS_AMSTATE \
+ grr_OamData.btsBasicPackage.bts_administrativeState
+ //Controled by administrator
+//17. bts_alarmStatus
+// <NA>
+
+//18. bts_operationalState
+#define OAMrm_BTS_OPSTATE \
+ grr_OamData.btsBasicPackage.bts_operationalState
+ //not decided by RM
+//19. maxNumberRetransmissions
+#define OAMrm_RA_RETRY_MAX \
+ ((unsigned char)(grr_OamData.btsBasicPackage.maxNumberRetransmissions))
+ //3:retry 7 times
+//20. mSTxPwrMaxCCH
+#define OAMrm_MS_TX_PWR_MAX_CCH \
+ ((unsigned char)(grr_OamData.btsBasicPackage.mSTxPwrMaxCCH))
+ //0:30dBm, previous value is 11 i.e. 8dBm, oam_MsTxPwrMax
+
+//20a. PR1101
+#define OAMrm_MS_TX_PWR_MAX_CCHa \
+ grr_OamData.btsBasicPackage.mSTxPwrMaxCCH
+ //0:30dBm, previous value is 11 i.e. 8dBm, oam_MsTxPwrMax
+
+//21. numberOfSlotsSpreadTrans
+#define OAMrm_RA_TX_INTEGER \
+ ((unsigned char)(grr_OamData.btsBasicPackage.numberOfSlotsSpreadTrans))
+ //7:spread 10 time slots
+//22. noOfBlocksForAccessGrant
+#define OAMrm_BS_AG_BLK_RES \
+ ((unsigned char)(grr_OamData.btsBasicPackage.noOfBlocksForAccessGrant))
+ //0:oam_bsAgBlkRes
+
+//23. noOfMultiframesBetweenPaging
+#define OAMrm_BS_PA_MFRMS \
+ ((unsigned char)(grr_OamData.btsBasicPackage.noOfMultiframesBetweenPaging))
+ //1:oam_bsPaMfrms
+
+//
+// BtsOptionsPackage
+//
+
+//1. info
+// <NA>
+
+//2. allowIMSIAttachDetach
+#define OAMrm_ATT_STATE \
+ ((T_CNI_RIL3_ATT)(grr_OamData.btsOptionsPackage.allowIMSIAttachDetach))
+ //1:ie CNI_RIL3_ATT_IMSI_ATACH_DETACH_ALLOWED,oam_att
+//3. callReestablishmentAllowed
+#define OAMrm_RA_REST_ALLOWED_STATE \
+ ((T_CNI_RIL3_REESTABLISHMENT_ALLOWED) \
+ (grr_OamData.btsOptionsPackage.callReestablishmentAllowed))
+ //1:not allowed
+//4. cellBarred
+#define OAMrm_RA_CELL_BARRED_STATE \
+ ((T_CNI_RIL3_CELL_BARRED_ACCESS)(grr_OamData.btsOptionsPackage.cellBarred))
+ //0:not barred
+#define OAMrm_RA_CELL_BARRED_STATEa \
+ grr_OamData.btsOptionsPackage.cellBarred
+ //0:not barred
+//5. dtxDownlink
+#define OAMrm_MS_DNLINK_DTX_STATE \
+ ((int)(grr_OamData.btsOptionsPackage.dtxDownlink))
+ //2:downlink DTX control ON/OFF
+
+//5a. dtxUpLink
+#define OAMrm_MS_UPLINK_DTX_STATE \
+ ((T_CNI_RIL3_DTX_SACCH)(grr_OamData.btsOptionsPackage.dtxUplink))
+ //2:uplink DTX not allowed for MS
+
+#define OAMrm_MS_UPLINK_DTX_STATEa \
+ ((T_CNI_RIL3_DTX_BCCH)(grr_OamData.btsOptionsPackage.dtxUplink))
+ //2:uplink DTX not allowed for MS
+
+//6. emergencyCallRestricted
+#define OAMrm_RA_EC_ALLOWED_STATE \
+ ((T_CNI_RIL3_EMERGENCY_CALL_ALLOWED) \
+ (grr_OamData.btsOptionsPackage.emergencyCallRestricted))
+ //1:only allowed to special class mobiles
+
+//7. notAllowedAccessClassTable
+#define OAMrm_RA_AC_ALLOWED_STATE(X) \
+ ((unsigned char)(((NotAllowedAccessClassEntry*) \
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[X].notAllowedAccessClass))
+ //1:barred
+
+//8. timerPeriodicUpdateMS
+#define OAMrm_T3212 \
+ ((unsigned char)(grr_OamData.btsOptionsPackage.timerPeriodicUpdateMS))
+ //0:no periodic LUP needed, oam_T3212
+//9. maxQueueLength
+// <NA>
+
+//10. msPriorityUsedInQueueing
+// <NA>
+
+//11. timeLimitCall
+// <NA>
+
+//12. timeLimitHandover
+// <NA>
+
+//
+// AdjacentCellPackage
+//
+
+//1. adjCell_handoverTable
+//1.1 adjCell_handoverTable:adjCell_handoverIndex
+// <NA>
+//1.2 adjCell_handoverTable:adjCell_handoverCellID
+
+#define OAMrm_NCELL_NETWORKID(X) \
+ ((short)((((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_handoverCellID))>>16)
+ //2 for X=0, 3 for X=1, 0xFFFFFFFF for other X values, X:0-31
+#define OAMrm_NCELL_CELLID(X) \
+ ((short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_handoverCellID))
+ //2 for X=0, 3 for X=1, 0xFFFFFFFF for other X values, X:0-31
+#define OAMrm_HO_ADJCELL_ID(X) \
+ ((unsigned int)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[X].adjCell_handoverCellID))
+#define OAMrm_HO_ADJCELL_ID_t(X) \
+ ((unsigned int)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_handoverCellID))
+ //2 for X=0, 3 for X=1, 0xFFFFFFFF for other X values, X:0-31
+
+//1.3 adjCell_handoverTable:adjCell_mcc
+#define OAMrm_NCELL_MCC(X) \
+ ((unsigned int)((((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_mcc)))
+
+//1.4 adjCell_handoverTable:adjCell_mnc
+#define OAMrm_NCELL_MNC(X) \
+ ((unsigned int)((((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_mnc)))
+
+//1.5 adjCell_handoverTable:adjCell_lac
+#define OAMrm_NCELL_LAC(X) \
+ ((unsigned short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_lac))
+
+//1.6 adjCell_handoverTable:adjCell_ci
+#define OAMrm_NCELL_CI(X) \
+ ((unsigned short)((((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_ci)))
+
+//1.7 adjCell_handoverTable:adjCell_bCCHFrequency
+#define OAMrm_HO_ADJCELL_BCCH_ARFCN(X) \
+ ((short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[X].adjCell_bCCHFrequency))
+ //561 for X=0,761 for X=1, 0 for other X values, X:0-31
+
+#define OAMrm_HO_ADJCELL_BCCH_ARFCN_t(X) \
+ ((short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_bCCHFrequency))
+ //561 for X=0,761 for X=1, 0 for other X values, X:0-31
+
+#define OAMrm_NARFCN(X) \
+ ((signed short)(((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[X].adjCell_bCCHFrequency))
+ //561: neighboring cell frequency for monitoring for handover purpose
+
+//1.8 adjCell_handoverTable:adjCell_ncc
+// <TBD>
+//1.9 adjCell_handoverTable:adjCell_cid
+// <TBD>
+//1.10 adjCell_handoverTable:adjCell_synchronized
+// <TBD>
+//1.11 adjCell_handoverTable:adjCell_hoPriorityLevel
+// <TBD>
+//1.12 adjCell_handoverTable:adjCell_hoMargin
+// <TBD>
+//1.13 adjCell_handoverTable:adjCell_msTxPwrMaxCell
+// <TBD>
+//1.14 adjCell_handoverTable:adjCell_rxLevMinCell
+// <TBD>
+//1.15 adjCell_handoverTable:adjCell_isExternal
+#define OAMrm_NCELL_ISEXTERNAL(X) \
+ ((unsigned int)((((AdjCell_HandoverEntry*) \
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[X].adjCell_isExternal)))
+
+//2. adjCell_reselectionTable
+//2.1 adjCell_reselectionTable:adjCell_reselectionIndex
+// <TBD>
+
+//2.2 adjCell_reselectionTable:adjCell_reselectionCellID
+#define OAMrm_RESEL_ADJCELL_ID(X) \
+ ((unsigned int)(((AdjCell_ReselectionEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_reselectionTable))[X].adjCell_reselectionCellID))
+ //2 for X=0, 3 for X=1, 0xFFFFFFFF for other X values
+//2.3 adjCell_reselectionTable:adjCell_reselectionBCCHFrequency
+#define OAMrm_RESEL_ADJCELL_BCCH_ARFCN(X) \
+ ((short)(((AdjCell_ReselectionEntry*) \
+ (grr_OamData.adjacentCellPackage.adjCell_reselectionTable))[X].adjCell_reselectionBCCHFrequency))
+ //561 for X=0,761 for X=1, 0 for other X values
+
+//
+// BtsTimerPackage:T31xx
+//
+
+//1. info
+// <TBD>
+
+//2. t3101
+#define OAMrm_T3101 \
+ ((int)(grr_OamData.t31xx.t3101))
+ //0x2FF:oam_T3101
+//3. t3103
+// <TBD>
+
+//4. t3105
+#define OAMrm_T3105 \
+ ((int)(grr_OamData.t31xx.t3105))
+ //2:16.6 by 2 ms
+//5. t3107
+// <TBD>
+//6. t3109
+#define OAMrm_T3109 \
+ ((int)(grr_OamData.t31xx.t3109))
+ //0x1FF:oam_T3109
+//7. t3111
+#define OAMrm_T3111 \
+ ((int)(grr_OamData.t31xx.t3111))
+ //0x2FF:oam_T3111
+//8. t3113
+// <TBD>
+
+//
+// TransceiverPackage
+//
+
+//1. info
+// <TBD>
+//2. basebandTransceiverID
+// <TBD>
+
+//3. relatedRadioCarrier
+#define OAMrm_TRX_RC(X) \
+ ((unsigned char)(grr_OamData.transceiverPackage[X].relatedRadioCarrier))
+
+//4. basebandAdministrativeState
+#define OAMrm_TRX_AMSTATE(X) \
+ grr_OamData.transceiverPackage[X].basebandAdministrativeState
+//5. basebandAlarmStatus
+// <TBD>
+
+//6. basebandOperationalState
+#define OAMrm_TRX_OPSTATE(X) \
+ grr_OamData.transceiverPackage[X].basebandOperationalState
+
+//7. channelTable
+//7.1 channelTable:channelIndex
+// <TBD>
+//7.2 channelTable:channelID
+// <TBD>
+
+//7.3 channelTable:channelCombination
+#define OAMrm_TRX_SLOT_COMB(X,Y) \
+ ((unsigned char)(((ChannelEntry*) \
+ (grr_OamData.transceiverPackage[X].channelTable))[Y].channelCombination))
+ //5 for (X,Y)=(0,0), 1 for other (X,Y) pairs, X:0-1,Y:0-7
+//7.4 channelTable:channelFrequencyUsage
+// <TBD>
+//7.5 channelTable:channelTsc
+// <TBD>
+//7.6 channelTable:channelAdministrativeState
+#define OAMrm_CHN_AMSTATE(X,Y) \
+ ((AdministrativeState)(((ChannelEntry*) \
+ (grr_OamData.transceiverPackage[X].channelTable))[Y \
+ ].channelAdministrativeState))
+#define OAMrm_CHN_AMSTATEa(X,Y) \
+ ((ChannelEntry*) \
+ (grr_OamData.transceiverPackage[X].channelTable))[Y \
+ ].channelAdministrativeState
+ //Check needed
+//7.7 channelTable:channelOperationalState
+#define OAMrm_CHN_OPSTATE(X,Y) \
+ ((EnableDisable)(((ChannelEntry*) \
+ (grr_OamData.transceiverPackage[X].channelTable))[Y \
+ ].channelOperationalState))
+#define OAMrm_CHN_OPSTATEa(X,Y) \
+ ((ChannelEntry*) \
+ (grr_OamData.transceiverPackage[X].channelTable))[Y \
+ ].channelOperationalState
+ //CheckNeeded
+
+//
+// radioCarrierPackage
+//
+
+//1. info
+// <TBD>
+//2. carrierFrequencyList
+//2.1 carrierFrequencyList:carrierFrequencyIndex
+// <TBD>
+//2.2 carrierFrequencyList:carrierFrequency
+#define OAMrm_ARFCN(X) \
+ ((unsigned short)(((CarrierFrequencyEntry*)(grr_OamData.radioCarrierPackage[ \
+ grr_OamData.transceiverPackage[X].relatedRadioCarrier \
+ ].carrierFrequencyList))[0].carrierFrequency))
+ //661 for X=0; 561 for X=1, X:0-1
+
+//3. powerClass
+// <TBD>
+//4. radioCarrierID
+// <TBD>
+//5. txPwrMaxReduction
+// <TBD>
+//6. carrier_administrativeState
+#define OAMrm_RC_AMSTATE(X) \
+ grr_OamData.radioCarrierPackage[X].carrier_administrativeState
+//7. carrier_alarmStatus
+// <TBD>
+
+//8. carrier_operationalState
+#define OAMrm_RC_OPSTATE(X) \
+ grr_OamData.radioCarrierPackage[X].carrier_operationalState
+
+//
+// Bts System Feature Control
+//
+#define OAMrm_CBCH_OPSTATE rm_CbchOpState
+ //grr_OamData.grrConfigData.rm_nim[0][1]
+#define OAMrm_CB_FEATURE_SETTING grr_OamData.grrConfigData.rm_nim[0][1]
+#define OAMrm_BCCH_CARRIER_phTRX grr_OamData.grrConfigData.rm_nim[0][0]
+#define OAMrm_HOPPING_CTRL ((unsigned char)(grr_OamData.grrConfigData.rm_nim[0][2]))
+#define OAMrm_HOPPING_CTRLa grr_OamData.grrConfigData.rm_nim[0][2]
+#define OAMrm_I_Q_SWAP grr_OamData.grrIQSwap
+
+//C2 parameter components
+#define OAMrm_CELL_RESELECT_OFFSET ((unsigned char)(grr_OamData.grrConfigData.rm_nim[0][3]))
+#define OAMrm_CELL_RESELECT_OFFSETa grr_OamData.grrConfigData.rm_nim[0][3]
+#define OAMrm_TEMP_OFFEST ((unsigned char)(grr_OamData.grrConfigData.rm_nim[0][4]))
+#define OAMrm_TEMP_OFFESTa grr_OamData.grrConfigData.rm_nim[0][4]
+#define OAMrm_PENALTY_TIME ((unsigned char)(grr_OamData.grrConfigData.rm_nim[0][5]))
+#define OAMrm_PENALTY_TIMEa grr_OamData.grrConfigData.rm_nim[0][5]
+#define OAMrm_CELL_BAR_QUALIFY grr_OamData.grrConfigData.rm_nim[0][6]
+#define OAMrm_OVERLOAD_CELLBAR grr_OamData.grrConfigData.rm_nim[1][1]
+
+extern u16 oam_phTrxSelectBit[2]; //b14
+extern u16 oam_phTrxSynthSelectBit[2]; //b15
+extern u16 oam_phTrxHoppingSelectBit[2]; //b13
+extern u16 oam_phTrxPwrSelectBit[2]; //b12
+
+#define OAMrm_phTRX_SELECT(X) oam_phTrxSelectBit[X]
+#define OAMrm_phTRX_SYNTH_SELECT(X) oam_phTrxSynthSelectBit[X]
+#define OAMrm_phTRX_HOPPING(X) oam_phTrxHoppingSelectBit[X]
+#define OAMrm_phTRX_PWR_SELECT(X) oam_phTrxPwrSelectBit[X]
+
+#define OAMrm_CCCH_CONF ((T_CNI_RIL3_CCCH_CONF)1)
+#define OAMrm_BS_CC_CHANS 1
+#define OAMrm_BSCCCHSDCCH_COMB 1
+#define OAMrm_CCCH_SDCCH_COMB 1
+#define OAMrm_T3L01 555
+#define OAMrm_T3L02 4
+#define OAMrm_SYSINFO_ONOFF_MAP 0
+
+
+#define OAMrm_AIRINTERFACE \
+ ((unsigned char)(grr_OamData.btsBasicPackage.gsmdcsIndicator))
+
+extern u8 oam_CellReselectOffset;
+extern u8 oam_TemporaryOffset;
+extern u8 oam_PenaltyTime;
+
+#define OAMrm_BTS_TSC ((unsigned char)(grr_OamData.btsBasicPackage.bts_cid))
+#define OAMrm_SLOTS_PER_TRX 8
+#define OAMrm_MAX_TRXS 2
+#define OAMrm_MAX_TCHFS (OAMrm_MAX_TRXS*8)
+#define OAMrm_MAX_SDCCH4S 4
+#define OAMrm_TRX_ONOFF_MAP 3
+#define OAMrm_NETWORKIFCONFIG 0
+#define OAMrm_BCCH_TRX 0
+#define OAMrm_PREALPHA_TRX 0
+#define OAMrm_NIM(X,Y) 0
+#define OAMrm_SYNCH_CHANINFO 0
+
+//
+// RM Configuration Package
+//
+#define OAMrm_TRX_SYNTH_SETTINGMSB(X,Y) \
+ ((unsigned char)(oam_TrxTuneSynthSetting[X][Y]>>8))
+#define OAMrm_TRX_SYNTH_SETTINGLSB(X,Y) \
+ ((unsigned char)(oam_TrxTuneSynthSetting[X][Y]))
+#define OAMrm_TRX_ULFPGADELAY_MSB(X) \
+ ((unsigned char)(grr_OamData.grrConfigData.rm_trxFpgaDelay[X][0]>>8))
+ //rm_trxFpgaDelay[2][2] all elements<-0x00
+#define OAMrm_TRX_ULFPGADELAY_LSB(X) \
+ ((unsigned char)(grr_OamData.grrConfigData.rm_trxFpgaDelay[X][0]))
+ //defined above
+#define OAMrm_TRX_DLFPGADELAY_MSB(X) \
+ ((unsigned char)(grr_OamData.grrConfigData.rm_trxFpgaDelay[X][1]>>8))
+ //defined above
+#define OAMrm_TRX_DLFPGADELAY_LSB(X) \
+ ((unsigned char)(grr_OamData.grrConfigData.rm_trxFpgaDelay[X][1]))
+ //defined above
+#define OAMrm_UPLINK_SGAINCTRL_SETTING(X) \
+ ((unsigned short)(grr_OamData.grrConfigData.rm_SGainCtrlSetting[X][0]))
+ //rm_SGainCtrlSetting[X][0]<-0x180
+#define OAMrm_DOWNLINK_SGAINCTRL_SETTING(X) \
+ ((unsigned char)(grr_OamData.grrConfigData.rm_SGainCtrlSetting[X][1]))
+ //rm_SGainCtrlSetting[X][1]<-0x80
+
+//
+// OAM-related function prototypes
+//
+void rm_RetrvConfigFromOam (void); //Retrieve all RM-related data stored in OAM
+void rm_OamGetRmConfigData (void); //Retrieve all RM-specific conf data from OAM
+void rm_OamGetGsmData (void); //Retrieve all GSM standard conf data from RR
+STATUS rm_OamGetBtsBasicPackage (void); //Retrieval of standard GSM: BtsBasicPackage
+STATUS rm_OamGetBtsOptionPackage (void); //Retrieval of standard GSM: BtsOptionPackage
+STATUS rm_OamGetBtsFirstTrxPackage (void); //Retrieval of standard GSM: BtsFirstTrxPackage
+STATUS rm_OamGetBtsSecondTrxPackage (void); //Retrieval of standard GSM: BtsSecondTrxPackage
+STATUS rm_OamGetBtsFirstRadioCarrierPackage (void); //Retrieval of standard GSM: BtsFirstRadioCarrierPackage
+STATUS rm_OamGetBtsSecondRadioCarrierPackage(void); //Retrieval of standard GSM: BtsSecondRadioCarrierPackage
+STATUS rm_OamGetT31xxTimerStructure (void); //Retrieval of standard GSM: T31xxTimer
+STATUS rm_adjacentCellPackage (void); //Retrieval of standard GSM: adjacentCellPackage
+STATUS rm_handoverControlPackage (void); //Retrieval of standard GSM: handoverControlPackage
+STATUS rm_powerControlPackage (void); //Retrieval of standard GSM: powerControlPackage
+
+// OAM test functions
+void rm_TestPrintOamRmConfigData (void); //Print all RM-related data stored in OAM MIB
+void rm_TestPrintOamRmStdGsmData (void); //Print all RM-related standard GSM mib data
+void intg_SetOverloadCellbarOption (int);
+void rm_printOamGsmData (void); //Print all GSM standard conf data from RR
+void rm_print_btsBasicPackage (BtsBasicPackage*); //Print standard GSM: BtsBasicPackage
+void rm_print_btsOptionsPackage (BtsOptionsPackage*); //Print standard GSM: BtsOptionsPackagevoid
+void rm_print_firstTransceiverPackage (FirstTransceiverPackage*); //Print standard GSM: FirstTransceiverPackage
+void rm_print_secondTransceiverPackage (SecondTransceiverPackage*); //Print standard GSM: SecondTransceiverPackage
+void rm_print_firstRadioCarrierPackage (FirstRadioCarrierPackage*); //Print standard GSM: FirstRadioCarrierPackage
+void rm_print_secondRadioCarrierPackage (SecondRadioCarrierPackage*); //Print standard GSM: SecondRadioCarrierPackage
+void rm_print_t31xx (T31xx*); //Print standard GSM: T31xx
+void rm_print_adjacentCellPackage (AdjacentCellPackage*); //Print standard GSM: AdjacentCellPackage
+void rm_print_handoverControlPackage (HandoverControlPackage*); //Print standard GSM: HandoverControlPackage
+void rm_print_powerControlPackage (PowerControlPackage*); //Print standard GSM: PowerControlPackage
+
+// Oam Message to DSP
+u8 rm_OamGetTotalAvailableHoNCells (void);
+void rm_OamSendHoNCellToDsp (u8 trxNo, u8 nCellIdx,u8 TotalAvailableNCells);
+void rm_OamSendHoSCellToDsp (s8 trxNo);
+void rm_OamSendPcToDsp (s8 trxNo);
+void rm_OamSendHoAllNCellToDsp ();
+void rm_OamSendPwrRedStepToDsp (u8 trxNo);
+void rm_SendBtsPackageToTrx (u8 trx);
+
+// Register OAM trap variables
+void rm_OamRegTrapVars (void);
+void rm_OamGetTrapVars (void);
+void rm_OamProcTrapBtsBasicPackage (void);
+void rm_OamProcTrapBtsOptionsPackage (void);
+void rm_OamProcTrapTransceiverPackage (u8);
+void rm_OamProcTrapRadioCarrierPackage (u8, MibTag);
+void rm_OamProcTrapT31xx (void);
+void rm_OamProcAdjacentCellPackage (void);
+void rm_OamProcHandoverControlPackage (void);
+void rm_OamProcPowerControlPackage (void);
+void rm_OamProcResourceConfigData (void);
+
+// Alarm
+void rm_InitTrxWDog (u8 trx);
+void rm_SetRmOpState (Alarm_errorCode_t code);
+void rm_InitRcPkg (u8 rc);
+void rm_InitTrxPkg (u8 trx);
+void rm_SetOneTrxChnOpState (u8 trx,u8 slot,EnableDisable state);
+void rm_SetAllTrxChnOpState (u8 trx,EnableDisable state);
+void rm_SetTrxOpState (u8 trx, EnableDisable state);
+void rm_SetRcOpState (u8 rc, EnableDisable state);
+void rm_ProcTrxMgmtMsg (u8 trx);
+u8 rm_EnDisableRmTchf (u8 trx, u8 slot, u8 ackVal);
+u8 rm_ProcSlotActRsp (u8 trx,u8 slot,u8 ackVal);
+void rm_ActTimeSlot (u8 trx,u8 slot);
+void rm_PassOpParamsToTrx (u8 trx);
+void rm_SetAllRmTrxChnOpState (u8 trx, u8 state);
+void rm_SendPingToTrx (u8 trx);
+void rm_ProcTrxWDogExp (u8 trx);
+
+//AM
+void rm_ProcBtsOpStateChange (void);
+void rm_ProcBtsAdminStateChange (void);
+void rm_ProcBtsAdminStateLocked (void);
+void rm_ProcTrxAdminStateLocked (u8 trx);
+void rm_ProcTrxSlotAdminStateLocked (u8 trx, u8 slot);
+void rm_LockedAllTrxSlotChans (u8 trx, u8 slot);
+void rm_LockedOneChan (rm_PhyChanDesc_t *pChan);
+void rm_ProcBtsAdminStateUnlocked (void);
+void rm_ProcTrxAdminStateUnlocked (u8 trx);
+void rm_ProcTrxSlotAdminStateUnlocked (u8 trx, u8 slot);
+void rm_UnlockedAllTrxSlotChans (u8 trx, u8 slot);
+void rm_ProcBtsAdminStateShuttingDown (void);
+void rm_ProcTrxAdminStateShuttingDown (u8 trx, u8 *inUse);
+void rm_ProcTrxSlotAdminStateShuttingDown (u8 trx, u8 slot, u8 *inUse);
+void rm_ShuttingDownAllTrxSlotChans (u8 trx, u8 slot, u8 *inUse);
+void rm_SetBtsAdminState (AdministrativeState state);
+void rm_SetTrxAdminState (u8 trx, AdministrativeState state);
+void rm_SetTrxSlotAdminState (u8 trx, u8 slot, AdministrativeState state);
+void rm_SetTrxSlotOpState (u8 trx, u8 slot, EnableDisable state);
+void rm_LockParentTrxSlotIfNeeded (int trx, int slot);
+void rm_LockParentTrxIfNeeded (int trx);
+void rm_LockParentBtsIfNeeded (void);
+void rm_SetBtsAdminStateIfNeeded (AdministrativeState state);
+void rm_SetTrxAdminStateIfNeeded (int trx, AdministrativeState state);
+void rm_SetTrxSlotAdminStateIfNeeded (int trx, int slot, AdministrativeState state);
+void rm_TurnOnRadioIfNeeded (void);
+void intg_TuneC1C2 (u8 reselOffset, u8 tempOffset, u8 penaltyTime);
+void rm_SendArfcnToTrx (u8 trx, int swap);
+void rm_TestPrintAmStateData (void);
+void intg_SendSlotActivateToTrx (u8 trx, u8 slot, u8 comb);
+void rm_MakeSureDspIsTicking (void);
+
+#endif //__RM_OAMIF_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/rm/rm_prim.h b/data/mnet/GP10/Host/Common_To_Host/rm/rm_prim.h
new file mode 100644
index 0000000..2983909
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/rm/rm_prim.h
@@ -0,0 +1,43 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_PRIM_H__
+#define __RM_PRIM_H__
+
+#include "MnetModuleId.h"
+#include "lapdm\lapdm_l3intf.h"
+#include "jcc\JCCL3Msg.h"
+
+// Primitive Defs related to RR module
+
+#define RR_DATA INTRA_L3_DATA
+#define RR_EST_REQ INTRA_L3_RR_EST_REQ
+#define RR_EST_CNF INTRA_L3_RR_EST_CNF
+#define RR_REL_REQ INTRA_L3_RR_REL_REQ
+#define RR_REL_CNF INTRA_L3_RR_REL_CNF
+#define RR_REL_IND INTRA_L3_RR_REL_IND
+
+#define MDL_ERR_RPT L23PT_MDL_ERROR
+#define DL_EST_IND L23PT_DL_EST_IND
+#define DL_REL_IND L23PT_DL_REL_IND
+#define DL_DATA_IND L23PT_DL_DATA_IND
+
+#define MPH_INFO_IND 1
+#define OAM_DATA_IND 2
+#define RM_TIMER_IND 3
+
+//HOADDED
+#define DLm_OTHRA_IND 4 //RA carrying Handover Access
+
+#define RRm_EST_REQ ( MODULE_MM<<8 | RR_EST_REQ )
+#define RRg_EST_REQ ( MODULE_BSSGP<<8 | RR_EST_REQ )
+#define DLm_RA_IND ( 0x0100 | L23PT_DL_RANDOM_ACCESS_IND )
+#define MPHm_INFO_IND ( MODULE_L1<<8 | MPH_INFO_IND )
+#define OAMm_DATA_IND ( MODULE_OAM<<8 | OAM_DATA_IND )
+
+#endif //__RM_PRIM_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/rm/rm_proto.h b/data/mnet/GP10/Host/Common_To_Host/rm/rm_proto.h
new file mode 100644
index 0000000..c8f7a0f
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/rm/rm_proto.h
@@ -0,0 +1,196 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_PROTO_H__
+#define __RM_PROTO_H__
+
+
+#include "vxWorks.h"
+#include "msgQlib.h"
+#include "rm_extdef.h"
+#include "rm_import.h"
+#include "rm_types.h"
+#include "rm_itcmsg.h"
+#include "ril3\ril3_mm_msg.h"
+#include "ril3\ril3irt.h"
+#include "ril3\ie_rach_control_param.h"
+#include "ril3\ie_cause.h"
+#include "ril3\ie_rr_cause.h"
+#include "ril3\ril3_result.h"
+#include "ril3\msg_channel_request.h"
+
+// Initialization and DSP interaction
+
+void rm_RadioMonitor ( );
+void rm_InitAll ( void );
+void rm_Despatch ( void );
+void rm_WaitForL1Bootstrap ( void );
+void rm_RetrvConfigFromOam ( void );
+void rm_InitRm ( void );
+void rm_InitLAPDm ( void );
+void rm_InitIRT ( void );
+void rm_InitL1 ( void );
+u8 rm_ConfigTrxSlots ( u8 );
+void rm_SendSynchInfoToBcchTrx ( u8 );
+void rm_WaitForL1Rsp ( u8, u8, u8 ,u8 );
+void rm_SendTrxConfigToTrx ( u8 );
+void rm_SendSlotActivateToTrx ( u8, u8 );
+void rm_WaitForSlotActivateRsp ( u8, u8 );
+void rm_SendSetUGainToTrx ( u8 );
+void rm_SendSetDGainToTrx ( u8 );
+void rm_SendConfigFpgaDelayToTrx ( u8 );
+
+// System Informations Update
+
+void rm_SendAllSystemInfosToBcchTrx ( u8 );
+void rm_SendSystemInfo2ToBcchTrx ( u8,u8,T_CNI_RIL3_CELL_BARRED_ACCESS );
+void rm_SendSystemInfo3ToBcchTrx ( u8,u8,T_CNI_RIL3_CELL_BARRED_ACCESS );
+void rm_SendSystemInfo4ToBcchTrx ( u8,u8,T_CNI_RIL3_CELL_BARRED_ACCESS );
+void rm_SendSacchFillingSI5 ( u8 trx, u8 SI );
+void rm_SendSacchFillingSI6 ( u8 trx, u8 SI );
+void rm_PopulateSI2 ( T_CNI_RIL3_CELL_BARRED_ACCESS );
+void rm_PopulateSI3 ( T_CNI_RIL3_CELL_BARRED_ACCESS );
+void rm_PopulateSI4 ( T_CNI_RIL3_CELL_BARRED_ACCESS );
+void rm_PopulateSI5 ( void );
+void rm_PopulateSI6 ( void );
+
+// Dedicated channel handling and utilies
+
+void rm_Despatch ( void );
+void rm_RrEstReq ( void );
+void rm_DlRaInd ( void );
+void rm_SendPagingRequestType1 ( void );
+void rm_ChanReq ( rm_ChanReq_t * );
+u8 rm_SolvePagingGroup ( rm_IeMobileId_t * );
+u16 rm_GetImsiMod1000 ( rm_IeImsi_t * );
+void rm_SendChanActivation ( rm_PhyChanDesc_t *, rm_PhyChanActDesc_t * );
+void rm_SendImmAssign ( rm_PhyChanDesc_t * );
+void rm_SendImmAssignRej (int cause);
+int rm_TimerExpired ( int param );
+void rm_StartTimer ( rm_IrtEntryId_t, u8 );
+void rm_StopTimer ( rm_IrtEntryId_t, u8 );
+void rm_SendPagingRsp ( void );
+void rm_SendRfChanRelease ( rm_PhyChanDesc_t * );
+void rm_SendDeactivateSacch ( rm_PhyChanDesc_t * );
+void rm_SendChanRelease (rm_IrtEntryId_t entryId);
+void rm_SendRrRelCnf ( void );
+void rm_SendChanModeModify ( rm_SmCtxt_t * );
+void rm_SendCiphModeCmd ( rm_SmCtxt_t *pSmCtxt );
+void rm_SendEncryptCmdToTrx ( rm_SmCtxt_t *pSmCtxt );
+void rm_ProcMsCiphModeCmplt ( void );
+void rm_SendChanAssignComplete ( void );
+u8 rm_ProcMeasRes ( void );
+void rm_SendDlRelReq ( u8 );
+void rm_SendRrRelInd ( u8, rm_IrtEntryId_t );
+void rm_SendModeModify ( rm_PhyChanDesc_t *, rm_PhyChanActDesc_t *);
+rm_IrtEntryId_t rm_GetIrtEntryId ( rm_ItcRxL1Msg_t * );
+rm_SmCtxt_t *rm_AllocSmCtxt ( u8 );
+rm_SmCtxt_t *rm_PreAllocSmCtxt ( u8 );
+void rm_ProcClassMarkIE (void);
+void rm_MdlErrRptCauseRel (void);
+void rm_RslRelease (void);
+T_CNI_RIL3_RESULT rm_MsgAnalyze (void);
+void rm_SendRrStatus (T_CNI_RIL3_RR_CAUSE_VALUE cause);
+void rm_ProcRrRelease (T_CNI_RIL3_CAUSE_VALUE cause);
+int rm_msgQReceive ( MSG_Q_ID, s8 *, UINT, int );
+
+// Interface with CC and MM
+
+void api_SendMsgFromRmToCc (MSG_Q_ID,u16,u8*);
+void api_SendMsgFromRmToMm (u16,u8*);
+
+// RM module entrance
+
+void rm_Task ( void );
+void rm_Main ( void );
+
+// RM State Machine Actions
+
+void rm_S0Null ( void );
+void rm_S1RmRunning ( void );
+void rm_S2ActivatingSigTrafficChan ( void );
+void rm_S3SigChanActivated ( void );
+void rm_S4TrafficChanActivated ( void );
+void rm_S5SigModeEstablished ( void );
+void rm_S6ActivatingTrafficMode ( void );
+void rm_S7ReleasingSigTrafficChan ( void );
+void rm_S8TrafficModeActivated ( void );
+void rm_S9DeactivatingSigTrafficChan ( void );
+void rm_S10TrafficModeEstablished ( void );
+void rm_S11TrafficChanSuspending ( void );
+
+// Test Functions
+
+void rm_InitRmTestPrint (u8 tchfIdx,u8 sdcch4Idx);
+void rm_InitLAPDmTestPrint (u8 tchfIdx, u8 sdcch4Idx);
+void rm_InitIrtTestPrint (u8 tchfIdx, u8 sdcch4Idx);
+void rm_PrintTchEntryId (u8 noOfTchfs,u8 noOfSdcch4s);
+void rm_UmMmMsgTestPrint ( T_CNI_RIL3MM_MSG *pMsg );
+void rm_EntryIdTestPrint (u8 tchfIdx, u8 sdcch4Idx);
+void intg_SendChanActivation (u8 trx, u8 chan);
+void intg_SendChanDeActivation (u8 trx, u8 chan);
+void intg_ShowRmChans (void);
+void intg_ClearRmChans (void);
+void intg_SetDlSG (u8 trx, u16 gain);
+void intg_SetUlSG (u8 trx, u16 gain);
+void intg_SetArfcn (s16,s16);
+void intg_SetGsmCodec (u8);
+void intg_CellCfg (s16, u8, u8, u8*);
+void intg_SetNextAssignment (u8 trx, u8 slot);
+void intg_SendPhConnIndToLapdm (void);
+void intg_SendAsyncHoRequestToDsp (u8 trx, u8 chan);
+
+// Addition for Handover
+
+void rm_SendAsyncHoRequired (void);
+void rm_S11TrafficChanSuspending (void);
+void rm_HoReq (void);
+void rm_SendHoFailure (int cause, int rrCause);
+void rm_SendHoReqNAck (u8 ref);
+u8 rm_SendHoReqAck (void);
+void rm_SendHoComplete (void);
+void rm_SendHandoverCommand (void);
+u8 rm_BeaerCapVerToChanMode (T_CNI_RIL3_SPEECH_VERSION ver);
+
+// Addition for SMS-CB
+
+void rm_ProcSmscbcMsg (void);
+void rm_BroadcastNewCbMsg (u8 page);
+void rm_BroadcastNilCbMsg (void);
+void rm_PassDownBlock (u8 blockSeq, u8 blockType, u8 page, u8 nullFlag);
+void rm_ActivateCbchChan (void);
+void rm_SendTuneSynthToTrx (u8 trx,u8 pwr);
+void rm_TuneSynth (u8 phTrx, u8 synth, u8 hopping, u8 state, u16 arfcn);
+void intg_SendCbCmd (u8 cmdCode, u16 msgCode, u16 updateNo);
+
+// AM
+void rm_SendRrRelInd (rm_IrtEntryId_t entryId);
+
+// ChnAssign
+
+void rm_ProcChanAssignCmd (void);
+void rm_ProcL1ModeAckNAck (void);
+void rm_ProcMsModeModifyAckNack (void);
+void rm_ProcT3L01Expiry (void);
+
+// Addition for GPRS
+
+void rm_WaitForGrrReadyToGo (void);
+void rm_WaitForCbchChanActAck (void);
+void rm_InitCb (void);
+void rm_ProcGrrMsgs (void);
+bool rm_ValidateGrrMsgs (void);
+void rm_ProcCbSettingChange (void);
+void rm_ProcTrxSlotCombChange (void);
+void rm_ProcTrxSlotLockReq (void);
+void rm_ProcTrxSlotShutdownReq (void);
+void rm_PostTchfRelHandler (rm_PhyChanDesc_t *pPhyChan);
+void rm_PostSdcch4RelHandler (rm_PhyChanDesc_t *pPhyChan);
+bool rm_IsGprsChanReq (T_CNI_RIL3_ESTABLISH_CAUSE cause);
+
+#endif //__RM_PROTO_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/rm/rm_struct.h b/data/mnet/GP10/Host/Common_To_Host/rm/rm_struct.h
new file mode 100644
index 0000000..3f1b9ac
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/rm/rm_struct.h
@@ -0,0 +1,129 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_STRUCT_H__
+#define __RM_STRUCT_H__
+
+#include "rm_head.h"
+
+typedef void rm_SmAction_t ( void );
+
+typedef struct {
+ u8 state; //TRUE: running, FALSE: stopped
+ int time;
+ WDOG_ID id; //MSB-byte: entry id, LSB-byte: timer id
+} rm_Timer_t;
+
+typedef struct {
+ u8 actType;
+ u8 dtxCtrl;
+ u8 datAttr;
+ u8 ratType;
+ u8 codAlgo;
+ u8 ciphSet;
+ u8 ciphKey[RM_L1CIPHKEY_LEN];
+ u8 hoRef;
+ u8 bsPower;
+ u8 msPower;
+ u8 taValue;
+ u8 UIC;
+} rm_PhyChanActDesc_t;
+
+typedef struct rm_PhyChanDescT
+{
+//AMADDED
+ int amState; //Reflection of corresponding TS amState
+ int opState; //Reflection of corresponding TS opState
+ int trxNo; //Trx where this channel is residing
+ int slotNo; //Slot where this channel is residing
+ int chanIdx; //Index in the chan table of this chann
+
+//PMADDED:
+ int startTime;
+ u8 estCause;
+ u8 chanBusy;
+
+//HOADDED
+ rm_Timer_t T3105;
+ u8 ny1; //Init to 0 each time allocated for HO
+ u8 hoTa; //Got from RA on DCCH, measured at DSP
+ u16 hoRef; //Remember handover ref # MM sent over
+ u8 codAlgo; //Remember speech algorithm version
+ u8 usable;
+ u8 state;
+ rm_UmEdChanType_t chanType;
+ u8 subChanNumber;
+ u8 trxNumber;
+ u16 chanNumber;
+ u8 chanNumberMSB;
+ u8 chanNumberLSB;
+ u8 TSC;
+ u8 quality;
+ u8 rslCount;
+ rm_Timer_t T3101;
+ rm_Timer_t T3111;
+ rm_Timer_t T3109;
+ rm_Timer_t T3L01;
+ rm_Timer_t T3L02;
+ rm_IrtEntryId_t mEntryId;
+ rm_IrtEntryId_t aEntryId;
+ rm_LapdmOId_t mOId;
+ rm_LapdmOId_t aOId;
+ u8 savChanReq[RM_SAVCHANREQ_LEN];
+ struct rm_SmCtxtT *pMSmCtxt;
+ struct rm_SmCtxtT *pASmCtxt;
+} rm_PhyChanDesc_t,
+ rm_PhyChanBCcch_t[RM_L1MAX_BCCCHS],
+ rm_PhyChanTchf_t[RM_L1MAX_TCHFS],
+ rm_PhyChanSdcch4_t[RM_L1MAX_SDCCH4S];
+
+typedef struct rm_SmCtxtT
+{
+ T_CNI_RIL3_CAUSE_VALUE relCause;
+ int waitHoComplt;
+ //ChnAssign
+ u8 spchVer;
+ u8 state;
+ u8 isForHo;
+ u8 codAlgo;
+ //ChnAssign
+ u8 callIdx;
+ rm_IrtEntryId_t entryId;
+ struct rm_PhyChanDescT *pPhyChan;
+ u8 smType; //Main SM or Acch SM
+ rm_LapdmOId_t mOId;
+ rm_LapdmOId_t aOId;
+ rm_IrtEntryId_t mEntryId;
+ rm_IrtEntryId_t aEntryId;
+ u8 callType;
+ rm_LapdmSapi_t sapi;
+ rm_LapdmGsmChanType_t chanType;
+ rm_LapdmRelMode_t relMode;
+} rm_SmCtxt_t,
+ rm_SmCtxts_t[RM_MAX_SMCTXTS];
+
+#define RM_SMCTXT_NULL (rm_SmCtxt_t *) 0
+
+//SMSCBC
+typedef struct msg_Table{
+ int state; //1: activing, -1: inactiving, 0:empty row
+ u8 msg[INTER_CBC_CB_MAX_DAT_LEN];
+ u8 msgId; //message id
+ u8 curPageInCurMsg;
+ u8 totPage;
+ u16 size;
+}rm_SmsCbc_msg_t;
+
+typedef struct msg_TableHdr
+{
+ rm_SmsCbc_msg_t table[SmsCbc_TableRow_MAX];
+ u8 curMsg;
+
+} msg_TableHdr_t;
+
+#endif //__RM_STRUCT_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/rm/rm_types.h b/data/mnet/GP10/Host/Common_To_Host/rm/rm_types.h
new file mode 100644
index 0000000..3ddcbf6
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/rm/rm_types.h
@@ -0,0 +1,20 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_TYPES_H__
+#define __RM_TYPES_H__
+
+typedef unsigned char u8;
+typedef char s8;
+typedef unsigned short u16;
+typedef short s16;
+typedef unsigned int u32;
+typedef int s32;
+typedef double u64;
+
+#endif //__RM_TYPES_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/rm/rml1_intf.h b/data/mnet/GP10/Host/Common_To_Host/rm/rml1_intf.h
new file mode 100644
index 0000000..875715f
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/rm/rml1_intf.h
@@ -0,0 +1,45 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RML1_INTF_H__
+#define __RML1_INTF_H__
+
+#include "vxWorks.h"
+#include "msgQlib.h"
+#include "string.h"
+#include "MnetModuleId.h"
+#include "logging\vclogging.h"
+#include "debug.h"
+
+#define MPH_INFO_REQ 0
+#define MPH_INFO_IND 1
+#define RML1_MAXMSG_LEN 100
+#define L1RM_MAXMSG_LEN 100
+
+extern DbgOutput rm_Dbg;
+extern MSG_Q_ID rm_MsgQId;
+
+typedef struct {
+ unsigned char module_id;
+ unsigned char entry_id;
+ unsigned char primitive_type;
+ unsigned char filler;
+ struct {
+ unsigned short msgLength;
+ unsigned char buffer[RML1_MAXMSG_LEN];
+
+ }l3_data;
+
+ }rml1_Msg_t;
+
+void api_SendMsgFromRmToL1 (unsigned short length, unsigned char *msg);
+void api_SendMsgFromL1ToRm (unsigned short, unsigned char*);
+
+#endif // __RML1_INTF_H__
+
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/rm/sys_init.h b/data/mnet/GP10/Host/Common_To_Host/rm/sys_init.h
new file mode 100644
index 0000000..4134a2a
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/rm/sys_init.h
@@ -0,0 +1,30 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __SYS_INIT_H__
+#define __SYS_INIT_H__
+
+#include "vxWorks.h"
+#include "msgQLib.h"
+#include "ril3\ril3irt.h"
+#include "ril3\ril3md.h"
+
+// Declarations for RM module
+#define RM_MAX_RXMSGS 100 // Max # of messages
+#define RM_MAX_RXQMSG_LENGTH sizeof(T_CNI_RIL3MD_RRM_MSG) // Max length from LAPDm
+#define RM_MAX_TXQMSG_LENGTH sizeof(T_CNI_RIL3MD_RRM_MSG) // Max length from LAPDm
+
+#define RM_L3_SUBID 0
+
+// Prototypes used to intialize the whole system
+void sys_Init (void);
+void sys_CreateMsgQs (void);
+void sys_StartTasks (void);
+
+#endif // __SYS_INIT_H__
diff --git a/data/mnet/GP10/Host/Common_To_Host/voip/exchange.h b/data/mnet/GP10/Host/Common_To_Host/voip/exchange.h
new file mode 100644
index 0000000..f2c67c4
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/voip/exchange.h
@@ -0,0 +1,296 @@
+/* exchange.h
+ *
+ * (c) Copyright Cisco Systems 2000 - 2001
+ * All Rights Reserved
+
+ * VBLink messages - interface between GMC and GP
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Exchangeho.h is the external handover extension of exchange.h
+#include "exchangeho.h"
+
+//#include "ril3/ril3md.h"
+typedef unsigned char T_CNI_MODULE_ID;
+
+#define H323_MANUFACTURER_CODE_JETCELL 18 /* Cisco's man. code */
+#define H323_COUNTRY_CODE_USA 181
+
+#define NON_STD_MSG_MAX_LEN 1458
+#define NON_STD_RAS_PROTOCOL 2 /* to be changed when GMC and GP are no longer compatible */
+
+typedef ULONG NSRASHANDLE;
+
+typedef enum
+{
+ NonStdRasMessageTypeRRQ,
+ NonStdRasMessageTypeRCF,
+ NonStdRasMessageTypeRRJ,
+ NonStdRasMessageTypeURQ,
+ NonStdRasMessageTypeUCF,
+
+ NonStdRasMessageTypeCellLRQ,
+ NonStdRasMessageTypeCellLCF,
+ NonStdRasMessageTypeCellLRJ,
+
+ NonStdRasMessageTypeMobileNotUsed, /* message is not currently in use */
+ NonStdRasMessageTypeMobileProfile,
+
+ NonStdRasMessageTypeCellSynchronize,
+ NonStdRasMessageTypeCellInfo,
+
+ NonStdRasMessageTypeMsToNetCISS,
+ NonStdRasMessageTypeNetToMsCISS,
+
+ NonStdRasMessageTypeSRQ, /* security info request */
+ NonStdRasMessageTypeSRS, /* security info response */
+
+ NonStdRasMessageTypeMsToNetSMSPP, /* Sms PP message from MS to SM-SC */
+ NonStdRasMessageTypeNetToMsSMSPP, /* Sms PP message from SM-SC to MS */
+
+ NonStdRasMessageTypeTransferRequest,
+ NonStdRasMessageTypeTransferConfirm,
+ NonStdRasMessageTypeTransferReject,
+
+ NonStdRasMessageTypeKeepAlive,
+
+ // ext-HO <chenj:05-15-01>
+ NonStdRasMessageTypePerformHandoverRQ,
+ NonStdRasMessageTypePerformHandoverAck,
+ NonStdRasMessageTypeEndHandover,
+ NonStdRasMessageTypePostHandoverMobEvent,
+ NonStdRasMessageTypeHandoverAccessMsg,
+ NonStdRasMessageTypeHandoverSuccessMsg,
+ NonStdRasMessageTypePerformHandBackRQ,
+ NonStdRasMessageTypePerformHandBackAck,
+ NonStdRasMessageTypeReleaseHOA,
+
+ // MGPLA <chenj:08-06-01>
+ NonStdRasMessageTypePageRequest,
+ NonStdRasMessageTypePageResponse
+}NonStdRasMessageType;
+
+typedef struct
+{
+ char* pszMobileID;
+
+}NonStdRasMessageRRQ_t;
+
+void jcNonStdRasMessageRRQPack( NonStdRasMessageRRQ_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageRRQUnpack( NonStdRasMessageRRQ_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ char* pszMobileID;
+ char* pszNumber;
+
+}NonStdRasMessageRCF_t;
+
+void jcNonStdRasMessageRCFPack( NonStdRasMessageRCF_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageRCFUnpack( NonStdRasMessageRCF_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ char* pszMobileID;
+
+}NonStdRasMessageRRJ_t;
+
+void jcNonStdRasMessageRRJPack( NonStdRasMessageRRJ_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageRRJUnpack( NonStdRasMessageRRJ_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ char* pszMobileID;
+
+}NonStdRasMessageURQ_t; /* can be sent both ways */
+
+void jcNonStdRasMessageURQPack( NonStdRasMessageURQ_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageURQUnpack( NonStdRasMessageURQ_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ char* pszMobileID;
+
+}NonStdRasMessageUCF_t; /* can be sent both ways */
+
+void jcNonStdRasMessageUCFPack( NonStdRasMessageUCF_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageUCFUnpack( NonStdRasMessageUCF_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ char* pszCellID;
+ NSRASHANDLE hCell;
+
+}NonStdRasMessageCellLRQ_t;
+
+void jcNonStdRasMessageCellLRQPack( NonStdRasMessageCellLRQ_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageCellLRQUnpack( NonStdRasMessageCellLRQ_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ char* pszCellID;
+ char* pszIpAddress;
+ NSRASHANDLE hCell;
+
+}NonStdRasMessageCellLCF_t;
+
+void jcNonStdRasMessageCellLCFPack( NonStdRasMessageCellLCF_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageCellLCFUnpack( NonStdRasMessageCellLCF_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ char* pszCellID;
+ NSRASHANDLE hCell;
+
+}NonStdRasMessageCellLRJ_t;
+
+void jcNonStdRasMessageCellLRJPack( NonStdRasMessageCellLRJ_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageCellLRJUnpack( NonStdRasMessageCellLRJ_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ char* pszMobileID;
+ USHORT nProfileSize;
+ PVOID pProfileData;
+
+}NonStdRasMessageMobileProfile_t;
+
+void jcNonStdRasMessageMobileProfilePack( NonStdRasMessageMobileProfile_t*,
+ UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageMobileProfileUnpack( NonStdRasMessageMobileProfile_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ char* pszCellID;
+ char* pszCellName;
+ USHORT sgsnRAC; // shmin 09/17
+ char* pszSgsnIP;
+
+}NonStdRasMessageCellInfo_t;
+
+void jcNonStdRasMessageCellInfoPack( NonStdRasMessageCellInfo_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageCellInfoUnpack( NonStdRasMessageCellInfo_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ char* pszMobileID;
+ USHORT nMsgSize;
+ PVOID pMsgData;
+
+}NonStdRasMessageCISS_t;
+
+void jcNonStdRasMessageMobileCISSPack( NonStdRasMessageCISS_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageMobileCISSUnpack( NonStdRasMessageCISS_t*, UCHAR** ppszBuffer );
+
+typedef enum
+{
+ jcCellUnknown,
+ jcCellDown,
+ jcCellUp,
+
+}NonStdRasCellMode_t;
+
+typedef struct
+{
+ char* pszCellID;
+ USHORT nMode; /* see NonStdRasCellMode_t type */
+
+}NonStdRasMessageCellSynchronize_t;
+
+void jcNonStdRasMessageCellSynchronizePack( NonStdRasMessageCellSynchronize_t*,
+ UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageCellSynchronizeUnpack( NonStdRasMessageCellSynchronize_t*,
+ UCHAR** ppszBuffer );
+
+typedef struct
+{
+ char* pszMobileID;
+
+}NonStdRasMessageSRQ_t;
+
+void jcNonStdRasMessageSRQPack( NonStdRasMessageSRQ_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageSRQUnpack( NonStdRasMessageSRQ_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ char* pszMobileID;
+ USHORT nAuthSets; /* valid range: 1...SEC_MAX_TRIPLET (5), 0 indicates error */
+ T_AUTH_TRIPLET* pAuthSets; /* pointer to array of T_AUTH_TRIPLET, NULL if nAuthSets == 0 */
+
+}NonStdRasMessageSRS_t;
+
+void jcNonStdRasMessageSRSPack( NonStdRasMessageSRS_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageSRSUnpack( NonStdRasMessageSRS_t*, UCHAR** ppszBuffer );
+
+typedef NonStdRasMessageCISS_t NonStdRasMessageSMSPP_t;
+void jcNonStdRasMessageMobileSmsppPack( NonStdRasMessageSMSPP_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageMobileSmsppUnpack( NonStdRasMessageSMSPP_t*, UCHAR** ppszBuffer );
+
+/* local input messages */
+typedef enum
+{
+ GmcCpAppInputMsgTypeTaskShutdown,
+
+}GmcCpAppInputMsgType;
+
+typedef struct
+{
+ GmcCpAppInputMsgType Type;
+ /*
+ union
+ {
+
+ };
+ */
+
+}GmcCpAppInputMsg_t;
+
+BOOL MsgSendToGmcCpApp( GmcCpAppInputMsg_t* pMsg );
+
+// MGPLA <chenj:08-06-01>
+typedef struct
+{
+ UINT req_id;
+ T_CNI_RIL3_IE_MOBILE_ID imsi;
+ USHORT channel_needed;
+ UINT paging_timeout;
+} NonStdRasMessagePageRequest_t;
+
+void jcNonStdRasMessagePageRequestPack( NonStdRasMessagePageRequest_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessagePageRequestUnpack( NonStdRasMessagePageRequest_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ UINT req_id;
+ bool need_profile;
+} NonStdRasMessagePageResponse_t;
+
+void jcNonStdRasMessagePageResponsePack( NonStdRasMessagePageResponse_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessagePageResponseUnpack( NonStdRasMessagePageResponse_t*, UCHAR** ppszBuffer );
+
+
+// Message Type for Intra L3 Messages
+typedef enum {
+ VBLINK_RR_PAGE_REQ
+} VblinkMsgType_t;
+
+union VblinkMsgData_t
+{
+ NonStdRasMessagePageRequest_t pageReq;
+};
+
+// Message format between VBLINK and other subsystems
+typedef struct {
+ T_CNI_MODULE_ID module_id; // origin of a message
+
+ VblinkMsgType_t message_type;
+ VblinkMsgData_t message_data;
+
+} VblinkMsg_t;
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/data/mnet/GP10/Host/Common_To_Host/voip/exchangeho.h b/data/mnet/GP10/Host/Common_To_Host/voip/exchangeho.h
new file mode 100644
index 0000000..1d1f00a
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/voip/exchangeho.h
@@ -0,0 +1,241 @@
+#ifndef EXCHANGEHO_H
+#define EXCHANGEHO_H
+/* exchangeho.h
+ *
+ * (c) Copyright Cisco Systems 2000 - 2001
+ * All Rights Reserved
+
+ * VBLink messages - handoff interface between GMC and GP
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// *******************************************************************
+// Includes
+// *******************************************************************
+#include "ril3/ie_called_bcd.h"
+#include "ril3/ril3_l2intf.h"
+
+
+// *******************************************************************
+// Constant Definitions
+// *******************************************************************
+const int NUM_MCC_DIGITS = 3;
+const int NUM_MNC_DIGITS = 3;
+const int MAX_A_INTERFACE_LEN = 251; // From Tai Yu's A_Handover_Common.h's definition of AIF_MSG_LENGTH
+const int MAX_LAYER3_PDU_LEN = CNI_LAPDM_MAX_L3MSG_LENGTH;
+
+// *******************************************************************
+// Type Definitions
+// *******************************************************************
+
+//<mukund:06/19/01> Handover Cause values
+typedef enum
+{
+ MC_HO_SUCCESS,
+ MC_HO_SYSTEM_FAILURE,
+ MC_HO_DATA_MISSING,
+ MC_HO_UNEXPECTED_DATA_VALUE,
+ MC_HO_HANDOVER_NUMBER_UNAVAIL,
+ MC_HO_UNKNOWN_MSC,
+ MC_HO_SUBHO_FAILURE,
+ MC_HO_T204_TIMEOUT,
+ MC_HO_T202_TIMEOUT,
+ MC_HO_RLS_FAILURE,
+ MC_HO_ITP_LINK_DOWN,
+ MC_HO_MAX_CAUSE_VALUES
+} HandoverCause_t;
+
+// [mukund:07-10-01]
+#ifdef __cplusplus
+inline char *GetHandCauseString(HandoverCause_t cause)
+#else
+static char *GetHandCauseString(HandoverCause_t cause)
+#endif
+{
+ char *HandCauseString[] =
+ {
+ "Success",
+ "System failure",
+ "Data Missing",
+ "Unexpected data value",
+ "Handover number unavailable",
+ "Unknown MSC",
+ "Subsequent Handover Failure",
+ "T204 timeout",
+ "T202 timeout",
+ "Release failure",
+ "ITP link down"
+ };
+
+ if (cause < MC_HO_MAX_CAUSE_VALUES)
+ {
+ return (HandCauseString[cause]);
+ }
+ else
+ {
+ return("UNKNOWN_CAUSE");
+ }
+}
+
+
+//<taiyu:05-18-01> Global Cell ID as defined in GSM 08.08 3.2.2.17
+typedef struct {
+ char ci_disc; // Cell Id Discriminator
+ // 0000 The whole Cell Global Id is used
+ // 0001 LAC, and CI, is used
+ // 0010 Cell Identity, CI, is used
+ // 0011 No cell is associated with the transaction.
+ char mcc[NUM_MCC_DIGITS]; // 3 digits of Mobile Country Code
+ char mnc[NUM_MNC_DIGITS]; // 3 digits of Mobile Network Code
+ unsigned short lac; // Local Area Code
+ unsigned short ci; // Cell ID
+} GlobalCellId_t ;
+
+void jcNonStdRasMessageGlobalCellIdPack( GlobalCellId_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageGlobalCellIdUnpack( GlobalCellId_t*, UCHAR** ppszBuffer );
+
+// Message Header
+typedef struct {
+ short origSubId; // originating hoAgID or sessionID
+ short destSubId; // destination hoAgID or sessionID
+} InterHoaVcHeader_t;
+
+void jcNonStdRasMessageHoaVcHeaderPack( InterHoaVcHeader_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageHoaVcHeaderUnpack( InterHoaVcHeader_t*, UCHAR** ppszBuffer );
+
+// A Interface Message
+typedef struct {
+ USHORT msglength;
+ unsigned char A_INTERFACE_DATA[MAX_A_INTERFACE_LEN];
+} A_INTERFACE_MSG_STRUCT_t;
+
+void jcNonStdRasMessageAInterfaceMsgPack( A_INTERFACE_MSG_STRUCT_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageAInterfaceMsgUnpack( A_INTERFACE_MSG_STRUCT_t*, UCHAR** ppszBuffer );
+
+// For E.164 packing (structure defined in common RIL3 module)
+void jcNonStdRasMessageE164NumberPack( T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER* pMsg,
+ UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageE164NumberUnpack( T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER* pMsg,
+ UCHAR** ppszBuffer );
+
+// Perform Handover Request Message
+typedef struct
+{
+ InterHoaVcHeader_t header;
+ GlobalCellId_t globalCellID;
+ USHORT hoCause;
+ bool hoNumberReqd;
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER handoverNumber;
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER mscNumber;
+ A_INTERFACE_MSG_STRUCT_t A_HANDOVER_REQUEST;
+} NonStdRasMessagePerformHandoverRQ_t;
+
+void jcNonStdRasMessagePerformHandoverRQPack( NonStdRasMessagePerformHandoverRQ_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessagePerformHandoverRQUnpack( NonStdRasMessagePerformHandoverRQ_t*, UCHAR** ppszBuffer );
+
+// End Handover Message
+typedef struct
+{
+ InterHoaVcHeader_t header;
+ USHORT reason;
+} NonStdRasMessageEndHandover_t;
+
+void jcNonStdRasMessageEndHandoverPack( NonStdRasMessageEndHandover_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageEndHandoverUnpack( NonStdRasMessageEndHandover_t*, UCHAR** ppszBuffer );
+
+// Layer 3 PDU Message
+typedef struct {
+ USHORT msglength;
+ char LAYER3DATA[MAX_LAYER3_PDU_LEN];
+} LAYER3PDU_STRUCT_t;
+
+void jcNonStdRasMessageLayer3MsgPack( LAYER3PDU_STRUCT_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageLayer3MsgUnpack( LAYER3PDU_STRUCT_t*, UCHAR** ppszBuffer );
+
+// Post Handover Mob Event Message
+typedef struct
+{
+ InterHoaVcHeader_t header;
+ LAYER3PDU_STRUCT_t LAYER3PDU;
+} NonStdRasMessagePostHandoverMobEvent_t;
+
+void jcNonStdRasMessagePostHandoverMobEventPack( NonStdRasMessagePostHandoverMobEvent_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessagePostHandoverMobEventUnpack( NonStdRasMessagePostHandoverMobEvent_t*, UCHAR** ppszBuffer );
+
+// Perform Handover Ack Message
+typedef struct
+{
+ InterHoaVcHeader_t header;
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER handoverNumber;
+ A_INTERFACE_MSG_STRUCT_t A_INTERFACE_MSG;
+ USHORT reason;
+} NonStdRasMessagePerformHandoverAck_t;
+
+void jcNonStdRasMessagePerformHandoverAckPack( NonStdRasMessagePerformHandoverAck_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessagePerformHandoverAckUnpack( NonStdRasMessagePerformHandoverAck_t*, UCHAR** ppszBuffer );
+
+// Perform Handover Access Message
+typedef struct
+{
+ InterHoaVcHeader_t header;
+ A_INTERFACE_MSG_STRUCT_t A_INTERFACE_MSG;
+} NonStdRasMessageHandoverAccess_t;
+
+void jcNonStdRasMessageHandoverAccessPack( NonStdRasMessageHandoverAccess_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageHandoverAccessUnpack( NonStdRasMessageHandoverAccess_t*, UCHAR** ppszBuffer );
+
+// Perform Handover Success Message
+typedef struct
+{
+ InterHoaVcHeader_t header;
+ A_INTERFACE_MSG_STRUCT_t A_INTERFACE_MSG;
+} NonStdRasMessageHandoverSuccess_t;
+
+void jcNonStdRasMessageHandoverSuccessPack( NonStdRasMessageHandoverSuccess_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageHandoverSuccessUnpack( NonStdRasMessageHandoverSuccess_t*, UCHAR** ppszBuffer );
+
+// Perform Handback Request Message
+typedef struct
+{
+ InterHoaVcHeader_t header;
+ USHORT hoCause;
+ GlobalCellId_t globalCellID;
+ bool externalCell;
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER mscNumber;
+ A_INTERFACE_MSG_STRUCT_t A_HANDOVER_REQUEST;
+} NonStdRasMessagePerformHandbackRQ_t;
+
+void jcNonStdRasMessagePerformHandbackRQPack( NonStdRasMessagePerformHandbackRQ_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessagePerformHandbackRQUnpack( NonStdRasMessagePerformHandbackRQ_t*, UCHAR** ppszBuffer );
+
+// Perform Handback Ack Message
+typedef struct
+{
+ InterHoaVcHeader_t header;
+ A_INTERFACE_MSG_STRUCT_t A_INTERFACE_MSG;
+ USHORT reason;
+} NonStdRasMessagePerformHandbackAck_t;
+
+void jcNonStdRasMessagePerformHandbackAckPack( NonStdRasMessagePerformHandbackAck_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessagePerformHandbackAckUnpack( NonStdRasMessagePerformHandbackAck_t*, UCHAR** ppszBuffer );
+
+
+// Release HOA Message
+typedef struct
+{
+ InterHoaVcHeader_t header;
+} NonStdRasMessageReleaseHOA_t;
+
+void jcNonStdRasMessageReleaseHOAPack( NonStdRasMessageReleaseHOA_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageReleaseHOAUnpack( NonStdRasMessageReleaseHOA_t*, UCHAR** ppszBuffer );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // EXCHANGEHO_H
+
diff --git a/data/mnet/GP10/Host/Common_To_Host/voip/jetrtp.h b/data/mnet/GP10/Host/Common_To_Host/voip/jetrtp.h
new file mode 100644
index 0000000..d055d08
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/voip/jetrtp.h
@@ -0,0 +1,368 @@
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : JetRtp.h *
+ * *
+ * Description : The JetCell RTP Library Header file *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |04/21/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+
+
+#ifndef JCRTP_HDR_INC
+#define JCRTP_HDR_INC
+
+
+
+#include <socklib.h>
+#include <hostlib.h>
+#include <stdlib.h>
+#include <semlib.h>
+
+#ifdef WIN32
+#include <windows.h>
+#endif
+
+
+typedef unsigned char BYTE;
+typedef void * HJCRTPSESSION;
+typedef void * HJCRTCPSESSION;
+#define UINT32 unsigned int
+
+
+#define RTP_PROTOCOL_VERSION 2
+#define STD_RTP_HEADER_SIZE 12
+#define RTPTHREAD_WORK_PRIORITY 10
+#define RTPTHREAD_STACK_SIZE 10240
+#define JCRTP_MAGIC 1234
+#define MAX_RTP_SESSIONS 50
+#define MAX_RTP_PAYLOAD_SIZE 50
+#define MAX_RTP_PACKET_BUFFERS 50
+#define RTP_PACKET_BUFFER_MAGIC 0x5432
+#define MAX_RTP_THREAD_NAME_LENGTH 128
+
+
+
+
+#ifdef WIN32
+#define RTP_BUFFERS_LOCK CRITICAL_SECTION
+#define INIT_RTP_PACKET_BUFFER_LIST() InitializeCriticalSection(&rtpBuffersLock)
+#define DELETE_RTP_PACKET_BUFFER_LIST() DeleteCriticalSection(&rtpBuffersLock)
+#define LOCK_RTP_PACKET_BUFFER_LIST() EnterCriticalSection(&rtpBuffersLock)
+#define UNLOCK_RTP_PACKET_BUFFER_LIST() LeaveCriticalSection(&rtpBuffersLock)
+
+#elif defined(__VXWORKS__)
+#define RTP_BUFFERS_LOCK SEM_ID
+#define INIT_RTP_PACKET_BUFFER_LIST() rtpBuffersLock=semBCreate(SEM_Q_PRIORITY,SEM_FULL)
+#define DELETE_RTP_PACKET_BUFFER_LIST() semDelete(rtpBuffersLock)
+#define LOCK_RTP_PACKET_BUFFER_LIST() semTake(rtpBuffersLock,WAIT_FOREVER)
+#define UNLOCK_RTP_PACKET_BUFFER_LIST() semGive(rtpBuffersLock)
+#endif
+
+#define RTP_DISP_NAME_OFFSET 1
+#define RTP_DISP_NAME_WIDTH 14
+#define RTP_DISP_HANDLE_OFFSET RTP_DISP_NAME_OFFSET+RTP_DISP_NAME_WIDTH
+#define RTP_DISP_HANDLE_WIDTH 14
+#define RTP_DISP_SENT_OFFSET RTP_DISP_HANDLE_OFFSET+RTP_DISP_HANDLE_WIDTH
+#define RTP_DISP_SENT_WIDTH 15
+#define RTP_DISP_RECV_OFFSET RTP_DISP_SENT_OFFSET+RTP_DISP_SENT_WIDTH
+#define RTP_DISP_RECV_WIDTH 14
+#define RTP_DISP_SERR_OFFSET RTP_DISP_RECV_OFFSET+RTP_DISP_RECV_WIDTH
+#define RTP_DISP_SERR_WIDTH 12
+#define RTP_DISP_RERR_OFFSET RTP_DISP_SERR_OFFSET+RTP_DISP_SERR_WIDTH
+#define RTP_DISP_RERR_WIDTH 12
+#define RTP_DISP_TOTAL_WIDTH RTP_DISP_RERR_OFFSET+RTP_DISP_RERR_WIDTH+1
+
+
+
+
+typedef struct _rtpPacketBuffer {
+ int magic;
+ unsigned char packetData[MAX_RTP_PAYLOAD_SIZE];
+ struct _rtpPacketBuffer *previous;
+ struct _rtpPacketBuffer *next;
+} rtpPacketBuffer_t;
+
+
+
+typedef struct {
+ UINT32 RtpProtocolVersion:2;
+ UINT32 Padding:1;
+ UINT32 HeaderExtensionFlag:1;
+ UINT32 CsrcCount:4;
+ UINT32 Marker:1;
+ UINT32 PayloadType:7;
+ UINT32 SequenceNumber:16;
+ UINT32 TimeStamp;
+ UINT32 Ssrc;
+ UINT32 Csrc[1];
+} RTP_HEADER, *PRTP_HEADER;
+
+
+typedef struct {
+ unsigned short Profile;
+ unsigned short Length;
+} RTP_EXTENDED_HEADER, *PRTP_EXTENDED_HEADER;
+
+typedef struct {
+ UINT32 FirstWord;
+ UINT32 SecondWord;
+ UINT32 LastWord;
+} RTP_NETWORK_ORDER_HEADER, *PRTP_NETWORK_ORDER_HEADER;
+
+
+typedef enum {
+ RTP_READ_STATUS_OK,
+ RTP_READ_STATUS_NOT_CONNECTED,
+ RTP_READ_STATUS_READ_FAILED
+} RTP_READ_STATUS;
+
+typedef RTP_READ_STATUS (*LPJCRTPEVENTHANDLER)
+ (
+ HJCRTPSESSION hRTP,
+ void * context
+ );
+
+
+
+
+typedef struct {
+ UINT32 timestamp;
+ BOOL marker;
+ BYTE payload;
+
+ UINT32 sSrc;
+ UINT16 sequenceNumber;
+ int sByte;
+ int len;
+} rtpParam;
+
+
+
+#define SWAP_LONG_TO_HOST_ORDER(Word) Word = ntohl(Word)
+#define SWAP_LONG_TO_NETWORK_ORDER(Word) Word = htonl(Word)
+
+
+typedef void (*fastReadCallBack)(void *, unsigned char *, int, struct rtpParam, void *);
+
+typedef struct _JCRTP_SESSION
+{
+ int isAllocated;
+ int socket;
+ int sendSocket;
+ UINT32 sSrc;
+ UINT32 sSrcMask;
+ UINT32 sSrcPattern;
+ LPJCRTPEVENTHANDLER eventHandler;
+ void * context;
+ UINT16 sequenceNumber;
+ UINT32 ip;
+ UINT16 port;
+ UINT16 localPort;
+ UINT32 remoteIp;
+ BOOL useSequenceNumber;
+ HJCRTCPSESSION hRTCP;
+ int Magic;
+ int RtpThreadId;
+ BYTE RtpPayloadType;
+ char RtpThreadName[MAX_RTP_THREAD_NAME_LENGTH];
+ BOOL useFastReadHandler;
+ fastReadCallBack fastReadHandler;
+ unsigned long bytesSent;
+ unsigned long bytesReceived;
+ unsigned long sendErrors;
+ unsigned long recvErrors;
+ UINT32 previousTimestamp;
+ UINT32 maxInterPacketDelay;
+ UINT32 currentTimestamp;
+ UINT32 currentInterval;
+#ifdef VIPER_IP
+ BOOL IsLocalLoop;
+ struct _JCRTP_SESSION *localSession;
+ unsigned char rtpPacketBuffer[512];
+ unsigned short rtpPacketDataOffset;
+ SEM_ID semRtpRecv;
+ unsigned char rtpRecvPacketBuffer[512];
+#endif
+} jcRtpSession,*pjcRtpSession;
+
+
+typedef struct {
+ jcRtpSession *rtpSession;
+ BOOL used;
+} RTP_SESSION_INFO;
+
+/*
+ * Function prototypes
+ */
+INT32 jcRtpInit(void);
+
+void jcRtpEnd(void);
+
+int jcRtpGetAllocationSize(void);
+
+HJCRTPSESSION jcRtpOpenFrom(
+ UINT16 port,
+ UINT32 ssrcPattern,
+ UINT32 ssrcMask,
+ void* buffer,
+ int bufferSize);
+
+HJCRTPSESSION jcRtpOpen(
+ UINT16 port,
+ UINT32 ssrcPattern,
+ UINT32 ssrcMask);
+
+HJCRTPSESSION jcRtpOpenEx(
+ UINT16 port,
+ UINT32 ssrcPattern,
+ UINT32 ssrcMask,
+ char * cname);
+
+UINT32 jcRtpClose(
+ HJCRTPSESSION hRTP);
+
+UINT32 jcRtpGetSSRC(
+ HJCRTPSESSION hRTP);
+
+void jcRtpSetEventHandler(
+ HJCRTPSESSION hRTP,
+ LPJCRTPEVENTHANDLER eventHandler,
+ void * context,
+ char * taskName);
+
+void jcRtpSetFastReadHandler(HJCRTPSESSION hRTP,
+ fastReadCallBack readHandlerFunction);
+
+void jcRtpSetRemoteAddress(
+ HJCRTPSESSION hRTP,
+ UINT32 ip,
+ UINT16 port);
+
+INT32 jcRtpWrite(
+ HJCRTPSESSION hRTP,
+ void * buf,
+ INT32 len,
+ rtpParam * p);
+
+INT32
+jcRtpFastWrite(HJCRTPSESSION hRTP,
+ void *buf,
+ INT32 len,
+ rtpParam *p,
+ BOOL fastWrite,
+ VOIDFUNCPTR callbackFunction);
+
+INT32 jcRtpRead(
+ HJCRTPSESSION hRTP,
+ void * buf,
+ INT32 len,
+ rtpParam * p);
+
+INT32 jcRtpReadEx(
+ HJCRTPSESSION hRTP,
+ void * buf,
+ INT32 len,
+ UINT32 timestamp,
+ rtpParam * p);
+
+INT32
+jcRtpReadPacket(
+ HJCRTPSESSION hRTP,
+ char *buf,
+ INT32 len,
+ rtpParam* p,
+ BOOL readPacket,
+ struct sockaddr_in *fromAddress);
+
+void
+jcRtpProcessFastReadPacket(
+ HJCRTPSESSION hRTP,
+ char *buf,
+ INT32 len,
+ rtpParam* p,
+ struct sockaddr_in *fromAddress);
+
+UINT16 jcRtpGetPort(
+ HJCRTPSESSION hRTP);
+
+HJCRTCPSESSION jcRtpGetRTCPSession(
+ HJCRTPSESSION hRTP);
+
+INT32 jcRtpSetRTCPSession(
+ HJCRTPSESSION hRTP,
+ HJCRTCPSESSION hRTCP);
+
+INT32 jcRtpGetHeaderLength(void);
+
+UINT32 jcRtpRegenSSRC(
+ HJCRTPSESSION hRTP);
+
+INT32 jcRtpUseSequenceNumber(
+ HJCRTPSESSION hRTP);
+
+void jcRtpThread(int Context);
+
+void jcRtcpRTPPacketSent(HJCRTCPSESSION What, int Len, UINT32 timestamp);
+
+void jcRtcpRTPPacketRecv(HJCRTCPSESSION What, UINT32 sSrc, UINT32 timestamp, UINT32 timestamp2, UINT16 sequenceNumber);
+
+INT32 jcRtcpInit(void);
+
+INT32 jcRtcpEnd(void);
+
+void jcRtcpSetRemoteAddress(
+ HJCRTCPSESSION hRTCP, /* RTCP Session Opaque Handle */
+ UINT32 ip, /* target ip address */
+ UINT16 port);
+
+inline void SWAP_TO_NETWORK_ORDER(PRTP_NETWORK_ORDER_HEADER pHdr)
+{
+ SWAP_LONG_TO_NETWORK_ORDER(pHdr->FirstWord);
+ SWAP_LONG_TO_NETWORK_ORDER(pHdr->SecondWord);
+ SWAP_LONG_TO_NETWORK_ORDER(pHdr->LastWord);
+};
+
+inline void SWAP_TO_HOST_ORDER(PRTP_NETWORK_ORDER_HEADER pHdr)
+{
+ SWAP_LONG_TO_HOST_ORDER(pHdr->FirstWord);
+ SWAP_LONG_TO_HOST_ORDER(pHdr->SecondWord);
+ SWAP_LONG_TO_HOST_ORDER(pHdr->LastWord);
+};
+void RtpPrintHandleInfo(HJCRTPSESSION RtpHandle);
+void RtpDebugPort(UINT16 port);
+void RtpDebugHandle(HJCRTPSESSION hRTP);
+
+void InitializeRtpPacketBuffers(void);
+void ShutdownRtpPacketBuffers(void);
+void InsertPacketBufferIntoFreePool(unsigned char *Buffer);
+unsigned char *GetPacketBufferFromFreePool(void);
+int VoipCallGetRtpPayloadType(HJCRTPSESSION RtpHandle);
+void jcRtpSetPayloadType(HJCRTPSESSION RtpHandle,BYTE Payload);
+void AddNewRtpSession(jcRtpSession *rtpSession);
+void RemoveRtpSession(jcRtpSession *rtpSession);
+void RtpDisplaySessions(void);
+void RtpDisplayHeader(void);
+void RtpDisplayLine(void);
+void RtpResetSessionCounters(HJCRTPSESSION RtpHandle);
+void RtpResetAllCounters(void);
+char *RtpGetRemoteTsapString(HJCRTPSESSION hRTP);
+char *RtpGetLocalTsapString(HJCRTPSESSION hRTP);
+unsigned long RtpGetSessionBytesSent(HJCRTPSESSION hRTP);
+unsigned long RtpGetSessionBytesRecvd(HJCRTPSESSION hRTP);
+void InitializeJetRtp(void);
+
+
+#endif /* __RTP_H */
diff --git a/data/mnet/GP10/Host/Common_To_Host/voip/mncalxfr.h b/data/mnet/GP10/Host/Common_To_Host/voip/mncalxfr.h
new file mode 100644
index 0000000..9cca487
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/voip/mncalxfr.h
@@ -0,0 +1,122 @@
+#ifndef MnCalXfr_H
+#define MnCalXfr_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MnCalXfr.h
+// Author(s) : Bhava Nelakanti
+// Create Date :
+// Description : interface specification for call transfer
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// *******************************************************************
+// Constant Definitions
+// *******************************************************************
+#define MNET_H323_MAX_ALIAS_NUMBER_LENGTH (128 + 1)
+
+typedef unsigned short MnetRasRequestSeqNum_t;
+typedef unsigned char MnetRasRejectCause_t;
+typedef char* MnetAliasString_t;
+
+typedef enum {
+
+ MNET_H323_PUBLIC_PARTY_NUMBER,
+ MNET_H323_PRIVATE_PARTY_NUMBER
+} MnetH323PartyNumber_t;
+
+typedef enum {
+
+ MNET_H323_PUBLIC_UNKNOWN,
+ MNET_H323_PUBLIC_INTERNATIONAL,
+ MNET_H323_PUBLIC_NATIONAL,
+ MNET_H323_PUBLIC_NETWORK_SPECIFIC,
+ MNET_H323_PUBLIC_SUBSCRIBER,
+ MNET_H323_PUBLIC_ABBREVIATED,
+
+} MnetH323PublicTypeOfNumber_t;
+
+typedef enum {
+
+ MNET_H323_PRIVATE_UNKNOWN,
+ MNET_H323_PRIVATE_LEVEL2_REGIONAL,
+ MNET_H323_PRIVATE_LEVEL1_REGIONAL,
+ MNET_H323_PRIVATE_PISN_SPECIFIC,
+ MNET_H323_PRIVATE_LOCAL,
+ MNET_H323_PRIVATE_ABBREVIATED,
+
+} MnetH323PrivateTypeOfNumber_t;
+
+typedef struct {
+ MnetAliasString_t numberDigits;
+
+ MnetH323PartyNumber_t partyNumber;
+
+ union
+ {
+ MnetH323PublicTypeOfNumber_t publicType;
+ MnetH323PrivateTypeOfNumber_t privateType;
+ };
+} MnetH323AliasAddress_t;
+
+typedef struct {
+ MnetRasRequestSeqNum_t requestSeqNum;
+
+ MnetH323AliasAddress_t destinationAliasAddress;
+
+ MnetH323AliasAddress_t sourceAliasAddress;
+
+} MnetRasTransferRequest_t;
+
+typedef struct {
+ MnetRasRequestSeqNum_t requestSeqNum;
+
+ MnetH323AliasAddress_t destinationAliasAddress;
+
+} MnetRasTransferConfirm_t;
+
+typedef struct {
+ MnetRasRequestSeqNum_t requestSeqNum;
+
+ MnetRasRejectCause_t rejectCause; // uses Q.931 Cause values
+
+} MnetRasTransferReject_t;
+
+/* messages packing/unpacking */
+void jcNonStdRasMessageTransferRequestPack( MnetRasTransferRequest_t* pMsg, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageTransferRequestUnpack( MnetRasTransferRequest_t* pMsg, UCHAR** ppszBuffer );
+
+void jcNonStdRasMessageTransferConfirmPack( MnetRasTransferConfirm_t* pMsg, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageTransferConfirmUnpack( MnetRasTransferConfirm_t* pMsg, UCHAR** ppszBuffer );
+
+void jcNonStdRasMessageTransferRejectPack( MnetRasTransferReject_t* pMsg, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageTransferRejecttUnpack( MnetRasTransferReject_t* pMsg, UCHAR** ppszBuffer );
+
+void jcNonStdRasMessageH323AliasAddressPack( MnetH323AliasAddress_t* pMsg, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageH323AliasAddressUnpack( MnetH323AliasAddress_t* pMsg, UCHAR** ppszBuffer );
+
+/* handlers for transfer request */
+INT32 mnetRasHandleTransferRequest( UINT32 ip, MnetRasTransferRequest_t* pMsg);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MnCalXfr_H
diff --git a/data/mnet/GP10/Host/Common_To_Host/voip/vblink.h b/data/mnet/GP10/Host/Common_To_Host/voip/vblink.h
new file mode 100644
index 0000000..1d8399d
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/voip/vblink.h
@@ -0,0 +1,220 @@
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : vblink.h *
+ * *
+ * Description : Data Structures for proprietary msging between VC & VB *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+#ifndef VBLINK_HDR_INCLUDE
+#define VBLINK_HDR_INCLUDE
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <vxworks.h>
+#include <socklib.h>
+#include <wdlib.h>
+#include <sysLib.h>
+#include <string.h>
+#include <socklib.h>
+
+#include "subsc/SubscInfoType.h"
+#include "voipapi.h"
+#include "exchange.h"
+#include "mncalxfr.h"
+
+// ext-HO <chenj:05-15-01>
+#include "Jcc/JCCEHoMsg.h"
+#include "exchangeho.h"
+
+#define VBLINK_NULL_HANDLE VOIP_NULL_MOBILE_HANDLE
+#define VBLINK_MAX_REGISTERED_MOBILES MAX_REGISTERED_MOBILES
+#define VBLINK_PORT 2121
+#define VBLINK_MAX_MESSAGE_SIZE 1460
+#define VBLINK_MAX_IP_ADDR_STR_LEN 32
+#define VBLINK_CONNECT_TIMEOUT_SECS 30
+
+
+
+typedef struct {
+ LUDB_ID LudbId;
+ unsigned short Index;
+ NSRASHANDLE VBHandle;
+} MOBILE_INFO, *PMOBILE_INFO;
+
+
+
+typedef struct {
+ int VBSocket;
+ BOOL ConnectedToViperBase;
+ struct sockaddr_in ViperBaseAddress;
+ char szViperBaseAddress[VBLINK_MAX_IP_ADDR_STR_LEN];
+ fd_set ReadSet;
+ BOOL RetryConnects;
+ unsigned long KeepAliveInterval;
+ unsigned long LastKeepAliveTimestamp;
+ unsigned long KeepAliveTxCount;
+ unsigned long MaxKeepAliveTxCount;
+} VBLINK_CONFIG;
+
+
+/*
+ * The Mobile registration section
+ */
+typedef enum {
+ VBLINK_MOBILE_REG_EVENT_BASE=0,
+ VBLINK_MOBILE_REG_EVENT_RECV_RCF,
+ VBLINK_MOBILE_REG_EVENT_RECV_RRJ,
+ VBLINK_MOBILE_REG_EVENT_RECV_UCF,
+ VBLINK_MOBILE_REG_EVENT_RECV_URJ,
+ VBLINK_MOBILE_REG_EVENT_RECV_URQ,
+ MAX_VBLINK_MOBILE_REG_EVENTS
+} VBLINK_MOBILE_REG_EVENT;
+
+
+typedef enum {
+ VBLINK_OAM_TRAP_NULL,
+ VBLINK_VIPERBASE_LINK_LOST,
+ VBLINK_VIPERBASE_LINK_RESTORED,
+ VBLINK_VIPERBASE_LINK_NOT_UP,
+ VBLINK_MAX_OAM_TRAPS
+}VBLINK_OAM_TRAP;
+
+
+/*
+ * Voip API message structures
+ */
+
+typedef struct {
+
+ char ViperCellId[MAX_VC_ID_STRING_LENGTH];
+
+ TXN_ID TxnId;
+
+} VBLINK_API_CELL_LOCATION_REQUEST_MSG;
+
+
+typedef struct {
+ char ViperCellId[MAX_VC_ID_STRING_LENGTH];
+ char ViperCellIpAddress[MAX_VC_IP_ADDRESS_STRING_LENGTH];
+} VBLINK_API_VC_IP_ADDRESS_RESPONSE_MSG;
+
+
+typedef struct {
+ unsigned char rejectCause;
+ unsigned short reqSeqNumber;
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER cpn;
+} VBLINK_API_VC_BCT_NUMBER_RESPONSE_MSG;
+
+/*
+ * ViperCell update status
+ */
+typedef enum
+{
+ VC_STATUS_UNKNOWN = 1,
+ VC_STATUS_DOWN,
+ VC_STATUS_UP,
+ MAX_VC_STATUS_EVENTS
+} VBLINK_VC_STATUS_INFO;
+
+
+/*
+ * Function prototypes
+ */
+BOOL VBLinkStatus(void);
+BOOL VBLinkGetInterval(struct timeval *WaitTime);
+BOOL VBLinkSendKeepAlive(void);
+BOOL InitializeVBLink(void);
+BOOL VBLinkPrepareSocket(void);
+void VBLink(void);
+BOOL ProcessViperBaseMessage(unsigned char *buffer,int nDataSize);
+
+
+
+
+/*
+ * API Function Prototypes defined by VBLink
+ */
+
+BOOL VBLinkRegisterMobile(MOBILE_ID MobileId); /* LUDB -> GMC */
+BOOL VBLinkUnregisterMobile(MOBILE_ID MobileId);
+BOOL VBLinkSecurityRequest(MOBILE_ID MobileId);
+
+bool VBLinkMsToNetCiss(LUDB_ID ludbIdx, unsigned char *cissMsg, int msgLen); /* CC -> GMC */
+bool VBLinkMsToNetSmspp(LUDB_ID ludbIdx, unsigned char *smsppMsg, unsigned int msgLen);
+
+BOOL VBLinkLocationRequest(VBLINK_API_CELL_LOCATION_REQUEST_MSG Msg); /* GP -> GMC */
+
+
+
+/*
+ * API Function Prototypes defined by other modules; but called by VBLink
+ */
+
+bool LudbVBLinkMessageHandler(VBLINK_MOBILE_REG_EVENT RegEvent, MOBILE_ID MobileId); /* LUDB <- GMC */
+
+bool CcVBLinkMessageHandler(char *CellId,char *IpAddress,TXN_ID TxnId); /* CC <- GMC */
+bool CcVBLinkTransferResponse(unsigned short reqSeqNum,unsigned char rejectCause,
+ VOIP_CALL_DESTINATION_ADDRESS CalledParty);
+
+BOOL CcVBLinkCellStatusUpdate(char *pszCellId,VBLINK_VC_STATUS_INFO info); /* GP <- GMC */
+
+
+
+
+void VBLinkSendCellId(void);
+void VBLinkGetVoipNumberType(
+ T_CNI_RIL3_TYPE_OF_NUMBER numType,
+ MnetH323AliasAddress_t *address
+ );
+void VBLinkGetGsmNumberType(
+ T_CNI_RIL3_TYPE_OF_NUMBER *numType,
+ MnetH323AliasAddress_t address
+ );
+
+BOOL VBLinkReconnectLoop(void);
+BOOL VBLinkConnect(void);
+void VBLinkSetOAMTrap(VBLINK_OAM_TRAP Message);
+void VBLinkTimerHandler(int arg);
+void SendVBLinkRegEvent(VBLINK_MOBILE_REG_EVENT RegEvent, MOBILE_ID MobileId);
+void SendIpAddressResponse(char *CellId,char *IpAddress,TXN_ID TxnId);
+bool ccCissProcessViperBaseMsg(LUDB_ID LudbId, char * pMsgData, int nMsgSize);
+bool smsReceiveSmrMsg(LUDB_ID LudbId, unsigned char * pMsgData, unsigned int nMsgSize);
+
+int VBLinkShowKeepAliveInterval(void);
+int VBLinkShowMaxKeepAliveCount(void);
+int VBLinkSetKeepAliveInterval(int interval);
+int VBLinkSetMaxKeepAliveCount(int count);
+
+
+// ext-HO <chenj:05-15-01>
+void copyGenericToGP10Header( InterHoaVcHeader_t* genheader, InterHoaVcMsg_t* gp10header );
+bool ExtHOGenericMessageHandler(InterHoaVcMsg_t* Msg);
+BOOL VBLinkPerformHandoverRequest(NonStdRasMessagePerformHandoverRQ_t* Msg);
+BOOL VBLinkEndHandover(NonStdRasMessageEndHandover_t* Msg);
+BOOL VBLinkPostHandoverMobEvent(NonStdRasMessagePostHandoverMobEvent_t* Msg);
+BOOL VBLinkPerformHandoverAck(NonStdRasMessagePerformHandoverAck_t* Msg);
+BOOL VBLinkHandoverAccess(NonStdRasMessageHandoverAccess_t* Msg);
+BOOL VBLinkHandoverSuccess(NonStdRasMessageHandoverSuccess_t* Msg);
+BOOL VBLinkPerformHandback(NonStdRasMessagePerformHandbackRQ_t* Msg);
+BOOL VBLinkPerformHandbackAck(NonStdRasMessagePerformHandbackAck_t* Msg);
+BOOL VBLinkReleaseHOA(NonStdRasMessageReleaseHOA_t* Msg);
+
+// MGPLA <chenj:08-06-01>
+BOOL VBLinkPageRequest(NonStdRasMessagePageRequest_t* Msg);
+BOOL VBLinkPageResponse(NonStdRasMessagePageResponse_t* Msg);
+
+#endif /* #ifndef VBAPI_HDR_INCLUDE */
diff --git a/data/mnet/GP10/Host/Common_To_Host/voip/voipapi.h b/data/mnet/GP10/Host/Common_To_Host/voip/voipapi.h
new file mode 100644
index 0000000..0f56177
--- /dev/null
+++ b/data/mnet/GP10/Host/Common_To_Host/voip/voipapi.h
@@ -0,0 +1,349 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : VoipApi.h *
+ * *
+ * Description : The API interface for the Voice Over IP Task *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |05/11/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+
+#ifndef VOIPAPI_HDR_INC
+#define VOIPAPI_HDR_INC
+
+#include "ril3/ie_mobile_id.h"
+#include "ril3/ril3irt.h"
+#include "ril3/ie_called_bcd.h"
+#include "ril3/ie_calling_bcd.h"
+#include "ril3/ie_cc_common.h"
+#include "ril3/ie_bearer_capability.h"
+#include "ril3/ie_progress_indicator.h"
+#include "cc/ccconfig.h"
+#include "jetrtp.h"
+
+
+
+#ifndef PVOID
+#define PVOID void *
+#endif
+
+#define MAX_MOBILE_ID_LENGTH (CNI_RIL3_MAX_ID_DIGITS + 1)
+#define MAX_MOBILE_NUM_LENGTH (CNI_RIL3_MAX_BCD_DIGITS + 1)
+#define MAX_REGISTERED_MOBILES 100 /* temporary, has to be 75 */
+#define MAX_VOIP_API_MSGS_IN_ARRAY 20
+#define MAX_PHONE_NUMBER_LENGTH (CNI_RIL3_MAX_BCD_DIGITS + 1)
+#define MAX_ACTIVE_CALLS 30
+#define VOIP_API_MAGIC_VALUE 1234
+#define MAX_VC_ID_STRING_LENGTH 64
+#define MAX_VC_IP_ADDRESS_STRING_LENGTH 64
+#define VOIP_NULL_CALL_HANDLE -1
+#define VOIP_NULL_MOBILE_HANDLE -1
+
+
+
+
+typedef T_CNI_RIL3_IE_MOBILE_ID MOBILE_ID;
+typedef short LUDB_ID;
+typedef T_CNI_IRT_ID TXN_ID;
+typedef int VOIP_MOBILE_HANDLE;
+typedef short VOIP_CALL_HANDLE;
+typedef T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER VOIP_CALL_DESTINATION_ADDRESS;
+typedef T_CNI_RIL3_IE_CALLING_PARTY_BCD_NUMBER VOIP_CALL_CALLING_PARTY_NUMBER;
+
+typedef void ( *pfnCallBackFunction )( PVOID );
+
+
+#define VOIP_API_NULL_TXN_ID CC_MAX_CC_CALLS_DEF_VAL
+
+#define MAX_PIPES_IN_ARRAY 5
+#define MAX_PIPE_MSG_SIZE 1024
+
+/* RAD input pipe */
+typedef struct
+{
+ int hPipe;
+ pfnCallBackFunction pfnUserCallBackFunction;
+ int nMsgSize;
+ unsigned char pMsg[MAX_PIPE_MSG_SIZE];
+ int Magic;
+ BOOL Used;
+}RADPIPE, *PRADPIPE;
+
+PRADPIPE GetPipeFromPool(void);
+void ReturnPipeIntoPool(PRADPIPE pRadPipe);
+
+
+
+
+
+
+/*
+ * Voip-Mobile call events
+ */
+typedef enum {
+ VOIP_MOBILE_CALL_EVENT_BASE=0,
+ VOIP_MOBILE_CALL_EVENT_PROCEEDING,
+ VOIP_MOBILE_CALL_EVENT_RINGBACK,
+ VOIP_MOBILE_CALL_EVENT_ALERTING,
+ VOIP_MOBILE_CALL_EVENT_CONNECTED,
+ VOIP_MOBILE_CALL_EVENT_VOICE_CONNECTED,
+ VOIP_MOBILE_CALL_EVENT_DISCONNECTED,
+ VOIP_MOBILE_CALL_EVENT_TRANSFER_STATUS,
+ VOIP_MOBILE_CALL_EVENT_PROGRESS,
+ MAX_VOIP_MOBILE_CALL_EVENTS
+} VOIP_MOBILE_CALL_EVENT;
+
+
+
+/*
+ * Voip API message types
+ */
+typedef enum {
+ VOIP_API_CALL_OFFERING,
+ VOIP_API_CALL_ALERTING,
+ VOIP_API_CALL_SETUP,
+ VOIP_API_CALL_RELEASE,
+ VOIP_API_CALL_ANSWER,
+ VOIP_API_CALL_EVENT,
+ VOIP_API_CALL_DTMF,
+ VOIP_API_SHUTDOWN_VOIP_TASK,
+ VOIP_API_CALL_PROCEEDING,
+ VOIP_API_CODEC_SELECTED,
+ VOIP_API_CALL_TRANSFER,
+ VOIP_API_CALL_FORWARD,
+ VOIP_API_CALL_UPDATE_HANDLES,
+ MAX_VOIP_API_MESSAGES
+} VOIP_API_MESSAGE_TYPE;
+
+
+
+typedef struct {
+
+ T_CNI_RIL3_FIELD_SPEECH_VERSION_INDICATOR speechVersionInd[3];
+
+} VOIP_CALL_BEARER_CAP;
+
+//CLIR <xxu:07-26-01>
+typedef struct {
+ bool ie_present;
+ T_CNI_RIL3_PRESENTATION_INDICATOR clirSetting;
+
+} VOIP_CALL_CLIR_SETTING;
+
+typedef struct {
+
+ VOIP_CALL_CALLING_PARTY_NUMBER CallingPartyNumber;
+
+ VOIP_CALL_DESTINATION_ADDRESS CalledPartyNumber;
+
+ VOIP_CALL_BEARER_CAP bearerCap;
+
+ bool IsEmergencyCall;
+
+ VOIP_CALL_CLIR_SETTING clir; //CLIR <xxu:07-26-01>
+
+}VOIP_API_CALL_SETUP_MSG;
+
+typedef struct {
+
+ VOIP_CALL_CALLING_PARTY_NUMBER CallingPartyNumber;
+
+ VOIP_CALL_DESTINATION_ADDRESS CalledPartyNumber;
+
+} VOIP_API_CALL_OFFERING_MSG;
+
+typedef struct {
+
+ VOIP_CALL_BEARER_CAP bearerCap;
+
+}VOIP_API_CALL_PROCEEDING_MSG;
+
+typedef struct {
+
+ T_CNI_RIL3_SPEECH_VERSION Codec;
+
+} VOIP_API_CODEC_SELECTED_MSG;
+
+typedef struct {
+
+ /*
+ * FIXME : Additional info to be included if required;
+ * otherwise right now this is an empty structure
+ * since all required info is already present in msg header
+ */
+}VOIP_API_CALL_ANSWER_MSG;
+
+/*
+ */
+typedef struct {
+
+}VOIP_API_CALL_ALERTING_MSG;
+
+
+typedef struct {
+
+ unsigned char cause;
+
+}VOIP_API_CALL_RELEASE_MSG;
+
+typedef enum {
+
+ DTMF_DIGIT_0,
+ DTMF_DIGIT_1,
+ DTMF_DIGIT_2,
+ DTMF_DIGIT_3,
+ DTMF_DIGIT_4,
+ DTMF_DIGIT_5,
+ DTMF_DIGIT_6,
+ DTMF_DIGIT_7,
+ DTMF_DIGIT_8,
+ DTMF_DIGIT_9,
+ DTMF_DIGIT_STAR,
+ DTMF_DIGIT_HASH,
+ MAX_DTMF_DIGITS
+
+} VOIP_DTMF_DIGIT;
+
+typedef struct {
+
+ VOIP_DTMF_DIGIT Digit; /*
+ * ASCII CODE for the digit to be played;
+ * to be enumerated later on in this file
+ */
+ unsigned long Duration; /* described in milliseconds */
+
+} VOIP_API_CALL_DTMF_MSG;
+
+
+typedef struct {
+
+ VOIP_MOBILE_CALL_EVENT CallEvent;
+
+ unsigned char ReasonCode;
+
+ union {
+
+ T_CNI_RIL3_IE_PROGRESS_INDICATOR AlertingProgressIE;
+
+ } EventInfo;
+
+
+} VOIP_API_CALL_EVENT_MSG;
+
+
+typedef struct {
+
+ VOIP_CALL_CALLING_PARTY_NUMBER CallingPartyNumber;
+
+ VOIP_CALL_DESTINATION_ADDRESS CalledPartyNumber;
+
+} VOIP_CALL_TRANSFER_MSG;
+
+
+typedef struct {
+
+ VOIP_CALL_DESTINATION_ADDRESS ForwardedToNumber;
+
+} VOIP_CALL_FORWARD_MSG;
+
+typedef struct {
+
+ VOIP_CALL_HANDLE NewHandle;
+
+ BOOL ReconnectOnTransferFailure;
+
+} VOIP_CALL_UPDATE_HANDLES_MSG;
+
+
+/*
+ * The main VOIP API Message structure definition
+ */
+typedef struct {
+
+ VOIP_MOBILE_HANDLE VoipMobileHandle;
+ VOIP_CALL_HANDLE VoipCallHandle;
+ LUDB_ID LudbId;
+ TXN_ID TxnId;
+ unsigned short H323CRV;
+
+ VOIP_API_MESSAGE_TYPE MessageType;
+
+ int Magic; /* Always set to VOIP_API_MAGIC value for msg integrity validation*/
+
+ union {
+ VOIP_API_CALL_SETUP_MSG CallSetup;
+ VOIP_API_CALL_ALERTING_MSG CallAlerting;
+ VOIP_API_CALL_ANSWER_MSG CallAnswer;
+ VOIP_API_CALL_EVENT_MSG CallEvent;
+ VOIP_API_CALL_OFFERING_MSG CallOffering;
+ VOIP_API_CALL_RELEASE_MSG CallRelease;
+ VOIP_API_CALL_DTMF_MSG CallDtmf;
+ VOIP_API_CALL_PROCEEDING_MSG CallProceeding;
+ VOIP_API_CODEC_SELECTED_MSG CodecSelected;
+ VOIP_CALL_TRANSFER_MSG CallTransfer;
+ VOIP_CALL_FORWARD_MSG CallForward;
+ VOIP_CALL_UPDATE_HANDLES_MSG CallUpdateHandles;
+ };
+
+} VOIP_API_MESSAGE, *PVOIP_API_MESSAGE;
+
+
+
+
+
+/**************** Function prototypes ****************************/
+
+
+
+/*
+ * To be implemented by CC
+ * The message types that would be handled by CC would include:-
+ * VOIP_API_CALL_OFFERING
+ * VOIP_API_CALL_EVENT
+ *
+ *
+ */
+bool CcVoipMessageHandler(VOIP_API_MESSAGE *VoipMessage);
+HJCRTPSESSION VoipCallGetRTPHandle(VOIP_CALL_HANDLE VoipCallHandle); /* macro to get RTP handle */
+BOOL VoipSendMessageToCc(PVOIP_API_MESSAGE pMsg);
+
+
+/*
+ * To be implmeneted by the VOIP task
+ * VOIP_API_CALL_SETUP
+ * VOIP_API_CALL_ANSWER
+ * VOIP_API_CALL_SEND_DTMF
+ */
+bool VoipApiMessageHandler(VOIP_API_MESSAGE *VoipMessage);
+
+/*
+ * To be implemented by CSU
+ * void RTPEventHandler( HJCRTPSESSION RtpHandle, VOIP_CALL_HANDLE VoipCallHandle, TXN_ID TxnId);
+ * void RTPFastReadHandler(HJCRTPSESSION RtpHandle,unsigned char *newPacket,
+ * int packetLength,rtpParam RtpParam,T_CNI_IRT_ID MobileHandle);
+ */
+
+
+
+char *GetVoipApiMessageName(VOIP_API_MESSAGE_TYPE MessageType);
+char *GetVoipApiCallEventName(VOIP_MOBILE_CALL_EVENT CallEvent);
+
+
+
+#endif /* VOIPAPI_HDR_INC */
+
+
+
diff --git a/data/mnet/GP10/Host/CsuNew/Makefile b/data/mnet/GP10/Host/CsuNew/Makefile
new file mode 100644
index 0000000..b68c5bb
--- /dev/null
+++ b/data/mnet/GP10/Host/CsuNew/Makefile
@@ -0,0 +1,16 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ copy bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/CsuNew/include/cc_user.dat b/data/mnet/GP10/Host/CsuNew/include/cc_user.dat
new file mode 100644
index 0000000..50a92eb
--- /dev/null
+++ b/data/mnet/GP10/Host/CsuNew/include/cc_user.dat
Binary files differ
diff --git a/data/mnet/GP10/Host/CsuNew/src/Makefile b/data/mnet/GP10/Host/CsuNew/src/Makefile
new file mode 100644
index 0000000..8c9f9e7
--- /dev/null
+++ b/data/mnet/GP10/Host/CsuNew/src/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = CsuNew
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\csu.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/CsuNew/src/csu_conn.cpp b/data/mnet/GP10/Host/CsuNew/src/csu_conn.cpp
new file mode 100644
index 0000000..578c77d
--- /dev/null
+++ b/data/mnet/GP10/Host/CsuNew/src/csu_conn.cpp
@@ -0,0 +1,782 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+
+#ifndef __CSU_CONN_CPP__
+#define __CSU_CONN_CPP__
+
+#include "CsuNew\csu_head.h"
+
+
+// Establish a simplex connection from src port to snk port
+T_CSU_RESULT_CON csu_SimplexConnect(T_CSU_PORT_ID *src, T_CSU_PORT_ID *snk)
+{
+ Uint8 i, s_type, d_type;
+ Uint16 s_pidx,d_pidx;
+ T_CSU_RESULT ret_src, ret_snk;
+
+ DBG_FUNC("csu_SimplexConnect", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CSU UNI-CONNECT REQ Info: src port(%d,%x)-->snk port(%d,%x)\n",
+ src->portType, src->portId.rtpHandler,
+ snk->portType, snk->portId.rtpHandler);
+
+ csu_TakeSemaphore();
+
+ // Get index of src port and snk port in their respective table
+ if ( CSU_RESULT_SUCCESS !=
+ csu_FindSrcPortPIdx(src, &s_type, &s_pidx) )
+ {
+ DBG_ERROR("CSU UNI-CONNECT REQ Error csu_FindSrcPortPIdx(): src(%d,%x)-->snk(%d,%x)\n",
+ src->portType, src->portId.rtpHandler,
+ snk->portType, snk->portId.rtpHandler);
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SRC_PORT_NOT_READY;
+ }
+
+ if ( CSU_RESULT_SUCCESS !=
+ csu_FindSnkPortPIdx(snk, &d_type, &d_pidx) )
+ {
+ DBG_ERROR("CSU UNI-CONNECT REQ Error csu_FindSnkPortPIdx(): src(%d,%x)-->snk(%d,%x)\n",
+ src->portType, src->portId.rtpHandler,
+ snk->portType, snk->portId.rtpHandler);
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SNK_PORT_NOT_READY;
+ }
+
+ // Check if both src and snk port are connection capable now
+ if ( CSU_RESULT_SUCCESS != (ret_src=csu_CheckSrcCapable(s_type, s_pidx, d_type, d_pidx)) )
+ {
+ if (ret_src != CSU_RESULT_SRC_PORT_CONNECTED_AS_EXPECTED)
+ {
+ DBG_ERROR("CSU UNI-CONNECT REQ Error(%d) csu_CheckSrcCapable(): src(%d,%x)-->snk(%d,%x)\n",
+ ret_src,
+ src->portType, src->portId.rtpHandler,
+ snk->portType, snk->portId.rtpHandler);
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SRC_PORT_NOT_READY;
+ }
+ }
+
+ if ( CSU_RESULT_SUCCESS != (ret_snk=csu_CheckSnkCapable(d_type, d_pidx, s_type, s_pidx)) )
+ {
+ if (ret_snk != CSU_RESULT_SNK_PORT_CONNECTED_AS_EXPECTED)
+ {
+ DBG_ERROR("CSU UNI-CONNECT REQ Error(%d) csu_CheckSnkCapable(): src(%d,%x)-->snk(%d,%x)\n",
+ ret_snk,
+ src->portType, src->portId.rtpHandler,
+ snk->portType, snk->portId.rtpHandler);
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SNK_PORT_NOT_READY;
+ }
+ }
+
+ if ( (ret_src == CSU_RESULT_SRC_PORT_CONNECTED_AS_EXPECTED) &&
+ (ret_snk == CSU_RESULT_SNK_PORT_CONNECTED_AS_EXPECTED) )
+ {
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SUCCESS;
+ }
+
+
+ //Connect both src port and snk port of the connection
+ if ( CSU_RESULT_SUCCESS != csu_ConnSrcPort(s_type,s_pidx,d_type,d_pidx,snk) )
+ {
+ DBG_ERROR("CSU UNI-CONNECT REQ Error csu_ConnSrcPort(): src(%d,%x)-->snk(%d,%x)\n",
+ src->portType, src->portId.rtpHandler,
+ snk->portType, snk->portId.rtpHandler);
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SRC_PORT_NOT_READY;
+ }
+
+ if ( CSU_RESULT_SUCCESS != csu_ConnSnkPort(d_type,d_pidx,s_type,s_pidx,snk) )
+ {
+ DBG_ERROR("CSU UNI-CONNECT REQ Error csu_ConnSnkPort(): src(%d,%x)-->snk(%d,%x)\n",
+ src->portType, src->portId.rtpHandler,
+ snk->portType, snk->portId.rtpHandler);
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SNK_PORT_NOT_READY;
+ }
+
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SUCCESS;
+}
+
+// Establish a duplex connection between src port and snk port
+T_CSU_RESULT_CON csu_DuplexConnect(T_CSU_PORT_ID *src, T_CSU_PORT_ID *snk)
+{
+ T_CSU_RESULT_CON ret;
+
+ DBG_FUNC("csu_DuplexConnect", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CSU BI-CONNECT REQ Info: src port(%d,%x)<-->snk port(%d,%x)\n",
+ src->portType, src->portId.rtpHandler,
+ snk->portType, snk->portId.rtpHandler);
+
+ //Connect src->snk
+ if ( CSU_RESULT_CON_SUCCESS != (ret=csu_SimplexConnect(src,snk)) )
+ {
+ DBG_ERROR("CSU BI-CONNECT Error '%d' csu_SimplexConnect(): src(%d,%x)-->snk(%d,%x)\n",
+ ret,
+ src->portType, src->portId.rtpHandler,
+ snk->portType, snk->portId.rtpHandler);
+ csu_SimplexBreak(src,snk);
+ DBG_LEAVE()
+ return ret;
+ }
+
+ //Connect snk->src
+ if ( CSU_RESULT_CON_SUCCESS != (ret=csu_SimplexConnect(snk,src)) )
+ {
+ DBG_ERROR("CSU BI-CONNECT Error '%d' csu_SimplexConnect():snk(%d,%x)-->src(%d,%x)\n",
+ ret,
+ snk->portType, snk->portId.rtpHandler,
+ src->portType, src->portId.rtpHandler);
+ csu_SimplexBreak(src,snk);
+ csu_SimplexBreak(snk,src);
+ DBG_LEAVE()
+ return ret;
+ }
+
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SUCCESS;
+}
+
+// Break a simplex connection from src port to snk port
+T_CSU_RESULT_CON csu_SimplexBreak(T_CSU_PORT_ID *src, T_CSU_PORT_ID *snk)
+{
+ Uint8 s_type, d_type;
+ Uint16 s_pidx, d_pidx;
+
+ DBG_FUNC("csu_SimplexBreak", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CSU UNI-BREAK REQ Info: src port(%d,%x)-->snk port(%d,%x)\n",
+ src->portType, src->portId.rtpHandler,
+ snk->portType, snk->portId.rtpHandler);
+
+ csu_TakeSemaphore();
+
+ // Get index of src port and snk port in their respective table
+ if ( CSU_RESULT_SUCCESS !=
+ csu_FindSrcPortPIdx(src, &s_type, &s_pidx) )
+ {
+ DBG_ERROR("CSU UNI-BREAK REQ Error csu_FindSrcPortPIdx(): src(%d,%x)-->snk(%d,%x)\n",
+ src->portType, src->portId.rtpHandler,
+ snk->portType, snk->portId.rtpHandler);
+
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SRC_PORT_NOT_ENGAGED;
+ }
+
+ if ( CSU_RESULT_SUCCESS !=
+ csu_FindSnkPortPIdx(snk, &d_type, &d_pidx) )
+ {
+ DBG_ERROR("CSU UNI-BREAK REQ Error csu_FindSnkPortPIdx(): src(%d,%x)-->snk(%d,%x)\n",
+ src->portType, src->portId.rtpHandler,
+ snk->portType, snk->portId.rtpHandler);
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SNK_PORT_NOT_ENGAGED;
+ }
+
+ // Check if both src and snk port are engaged
+ if ( CSU_RESULT_SUCCESS !=
+ csu_CheckSrcConn(s_type, s_pidx, d_type, d_pidx) )
+ {
+ DBG_TRACE("CSU UNI-BREAK REQ Error csu_CheckSrcConn(): src(%d,%x)-->snk(%d,%x)\n",
+ src->portType, src->portId.rtpHandler,
+ snk->portType, snk->portId.rtpHandler);
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SRC_PORT_NOT_ENGAGED;
+ }
+
+ if ( CSU_RESULT_SUCCESS !=
+ csu_CheckSnkConn(d_type, d_pidx, s_type, s_pidx) )
+ {
+ DBG_ERROR("CSU UNI-BREAK REQ Error csu_CheckSnkConn(): src(%d,%x)-->snk(%d,%x)\n",
+ src->portType, src->portId.rtpHandler,
+ snk->portType, snk->portId.rtpHandler);
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SNK_PORT_NOT_ENGAGED;
+ }
+
+ if ( CSU_RESULT_SUCCESS !=
+ csu_BreakSrcConn(s_type, s_pidx, d_type, d_pidx) )
+ {
+ DBG_ERROR("CSU UNI-BREAK REQ Error csu_BreakSrcConn(): src(%d,%x)-->snk(%d,%x)\n",
+ src->portType, src->portId.rtpHandler,
+ snk->portType, snk->portId.rtpHandler);
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SRC_PORT_NOT_ENGAGED;
+ }
+
+ if ( CSU_RESULT_SUCCESS !=
+ csu_BreakSnkConn(d_type, d_pidx, s_type, s_pidx) )
+ {
+ DBG_ERROR("CSU UNI-BREAK REQ Error csu_BreakSnkConn(): src(%d,%x)-->snk(%d,%x)\n",
+ src->portType, src->portId.rtpHandler,
+ snk->portType, snk->portId.rtpHandler);
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SNK_PORT_NOT_ENGAGED;
+ }
+
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SUCCESS;
+}
+
+// Break a duplex connection between src port and snk port
+T_CSU_RESULT_CON csu_DuplexBreak(T_CSU_PORT_ID *src, T_CSU_PORT_ID *snk)
+{
+ T_CSU_RESULT_CON ret;
+
+ DBG_FUNC("csu_DuplexBreak", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CSU BI-BREAK REQ Info: src port(%d,%x)<-->snk port(%d,%x)\n",
+ src->portType, src->portId.rtpHandler,
+ snk->portType, snk->portId.rtpHandler);
+
+
+ // Break src->snk connection
+ if ( CSU_RESULT_CON_SUCCESS != (ret=csu_SimplexBreak(src,snk)) )
+ {
+ DBG_ERROR("CSU BI-BREAK Error '%d' csu_SimplexBreak(): src(%d,%x)-->snk(%d,%x)\n",
+ ret,
+ src->portType, src->portId.rtpHandler,
+ snk->portType, snk->portId.rtpHandler);
+ DBG_LEAVE()
+ return ret;
+ }
+
+ //Break snk->src connection
+ if ( CSU_RESULT_CON_SUCCESS != (ret=csu_SimplexBreak(snk,src)) )
+ {
+ DBG_TRACE("CSU BI-BREAK Error '%d' csu_SimplexBreak(): snk(%d,%x)-->src(%d,%x)\n",
+ ret,
+ snk->portType, snk->portId.rtpHandler,
+ src->portType, src->portId.rtpHandler);
+ DBG_LEAVE()
+ return ret;
+ }
+
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SUCCESS;
+}
+
+//Break all connection originating from source port
+T_CSU_RESULT_CON csu_OrigBreakAll(T_CSU_PORT_ID *source)
+{
+ Uint8 d_there,trx,slot;
+ Uint8 s_type, d_type;
+ Uint16 s_pidx, d_pidx;
+ T_CSU_SRC_PORT *src;
+
+
+ DBG_FUNC("csu_OrigBreakAll", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CSU ORIG-BREAK REQ Info: src port(%d,%x)\n",
+ source->portType, source->portId.rtpHandler);
+
+ csu_TakeSemaphore();
+
+ // Get index of src port in its connection table
+ if ( CSU_RESULT_SUCCESS !=
+ csu_FindSrcPortPIdx(source, &s_type, &s_pidx) )
+ {
+ DBG_ERROR("CSU ORIG-BREAK Error csu_FindSrcPortPIdx(): src port (%d,%08x)\n",
+ source->portType, source->portId.rtpHandler);
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SRC_PORT_NOT_ENGAGED;
+ }
+
+ // Find the port's corresponding item in src table
+ switch(s_type)
+ {
+ case CSU_GSM_PORT:
+ trx = (Uint8)(s_pidx>>8);
+ slot = (Uint8)(s_pidx);
+ src = &csu_GsmSrcPort[trx][slot];
+ break;
+ case CSU_RTP_PORT:
+ src = &csu_RtpSrcPort[s_pidx];
+ break;
+ case CSU_ANN_PORT:
+ src = &csu_AnnSrcPort[s_pidx];
+ break;
+ default:
+ DBG_ERROR("CSU ORIG-BREAK Error: invalid source port type: %d\n", s_type);
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_FAILED;
+ }
+
+ DBG_TRACE("CSU ORIG-BREAK Info: src port (%d,%x): s_type=%d, s_pidx=%x\n", source->portType,
+ source->portId.rtpHandler, s_type, s_pidx);
+
+ // Check if src port engaged in any connection or not
+ if ( src->state != CSU_RESSTATE_USED || src->count==0)
+ {
+ DBG_TRACE("CSU ORIG-BREAK INFO src port (%d,%x) not engaged in any connection\n",
+ s_type, src->gsmHandler);
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SUCCESS;
+ }
+
+ // Break all connections originating from the src port
+ for (int i=0;i<CSU_PEER_PORT_MAX;i++)
+ {
+ if ( src->peer[i].type != CSU_NIL_PORT &&
+ src->peer[i].pidx != CSU_PEER_PORT_NULL )
+ {
+//DBG_TRACE("src port:state=%d, count=%d, d_type=%d, d_pidx=%x\n",
+//src->state, src->count, src->peer[i].type, src->peer[i].pidx);
+
+ // Check existence of src->this snk
+ d_there = 1;
+ if ( CSU_RESULT_SUCCESS !=
+ csu_CheckSnkConn(src->peer[i].type, src->peer[i].pidx, s_type, s_pidx) )
+ {
+ DBG_ERROR("CSU ORIG-BREAK Error CheckSnkConn():i=%d, src(%d,%x)-->snk(%d,idx:%x)\n",
+ i,
+ s_type, src->rtpHandler,
+ src->peer[i].type, src->peer[i].pidx);
+ d_there = 0;
+
+ }
+
+ // Break src's engagement no matter whether snk of src->connection is there
+ Uint8 t_type; //for temporarily keeping a value
+ Uint16 t_pidx; //for temporarily keeping a value
+ t_type = src->peer[i].type;
+ t_pidx = src->peer[i].pidx;
+
+ if ( CSU_RESULT_SUCCESS !=
+ csu_BreakSrcConn(s_type, s_pidx, src->peer[i].type,
+ src->peer[i].pidx) )
+ {
+ DBG_ERROR("CSU ORIG-BREAK Error csu_BreakSrcConn(): i=%d, src(%d,%08x)-->snk(%d,idx:%x)\n",
+ source->portType, source->portId.rtpHandler,
+ src->peer[i].type,src->peer[i].pidx);
+ }
+
+ // Break snk's engagement if snk now engaged in the src->this connection
+ if (d_there)
+ {
+ if ( CSU_RESULT_SUCCESS !=
+ csu_BreakSnkConn(t_type, t_pidx, s_type, s_pidx) )
+ {
+ DBG_ERROR("CSU ORIG-BREAK Error csu_BreakSnkConn():src(%d,%x)-->snk(%d,idx:%x) snk break failed\n",
+ s_type, src->rtpHandler, t_type,t_pidx);
+ }
+ }
+ }
+ }
+
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SUCCESS;
+}
+
+//Break all connections terminated at given sink port
+T_CSU_RESULT_CON csu_TermBreakAll(T_CSU_PORT_ID *sink)
+{
+ Uint8 s_there,trx,slot;
+ Uint8 s_type, d_type;
+ Uint16 s_pidx, d_pidx;
+ T_CSU_SNK_PORT *snk;
+
+ DBG_FUNC("csu_TermBreakAll", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CSU TERM-BREAK REQ Info: snk port(%d,%x)\n",
+ sink->portType, sink->portId.rtpHandler);
+
+ csu_TakeSemaphore();
+
+ // Get index of sink port in its connection table
+ if ( CSU_RESULT_SUCCESS !=
+ csu_FindSnkPortPIdx(sink, &d_type, &d_pidx) )
+ {
+ DBG_ERROR("CSU TERM-BREAK REQ Error csu_FindSrcPortPIdx(): snk(%d,%x)\n",
+ sink->portType, sink->portId.rtpHandler);
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SNK_PORT_NOT_ENGAGED;
+ }
+
+ // Find the port's corresponding item in snk table
+ switch(d_type)
+ {
+ case CSU_GSM_PORT:
+ trx = (Uint8)(d_pidx>>8);
+ slot = (Uint8)(d_pidx);
+ snk = &csu_GsmSnkPort[trx][slot];
+ break;
+ case CSU_RTP_PORT:
+ snk = &csu_RtpSnkPort[d_pidx];
+ break;
+ // case CSU_ANN_PORT:
+
+ default:
+ DBG_ERROR("CSU TERM-BREAK REQ Error: invalid sink port type: %d\n", d_type);
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_FAILED;
+ }
+
+ // Check if snk port engaged in any connection or not
+ if ( snk->state != CSU_RESSTATE_USED || snk->count==0 )
+ {
+ DBG_TRACE("CSU TERM-BREAK REQ INFO: snk(%d, %x) not engaged in any call\n",
+ d_type, snk->rtpHandler);
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SUCCESS;
+ }
+
+ // Break all connections terminated at the sink port
+ for (int i=0;i<CSU_PEER_PORT_MAX;i++)
+ {
+ if ( snk->peer[i].type != CSU_NIL_PORT &&
+ snk->peer[i].pidx != CSU_PEER_PORT_NULL )
+ {
+ // Check src's engagement of this src->snk connection
+ s_there = 1;
+ if ( CSU_RESULT_SUCCESS !=
+ csu_CheckSrcConn(snk->peer[i].type,snk->peer[i].pidx,d_type,d_pidx) )
+ {
+ DBG_ERROR("CSU TERM-BREAK REQ Error csu_CheckSrcConn(): i=%d, src(%d,idx:%x)-->snk(%d,%x)\n",
+ i,
+ snk->peer[i].type, snk->peer[i].pidx,
+ d_type, snk->rtpHandler);
+ s_there = 0;
+
+ }
+
+ // Break snk's engagement no matter whether this src is engaged or not
+ Uint8 t_type;
+ Uint16 t_pidx;
+ t_type = snk->peer[i].type;
+ t_pidx = snk->peer[i].pidx;
+
+ if ( CSU_RESULT_SUCCESS !=
+ csu_BreakSnkConn(d_type,d_pidx,snk->peer[i].type,snk->peer[i].pidx) )
+ {
+ DBG_ERROR("CSU TERM-BREAK REQ Error csu_BreakSnkConn(): i=%d, src(%d,idx:%x)-->snk(%d,%x)\n",
+ i,
+ snk->peer[i].type, snk->peer[i].pidx,
+ d_type, snk->rtpHandler);
+ }
+
+ // Break src's engagement if this src really engaged in this connection
+ if (s_there)
+ {
+ if ( CSU_RESULT_SUCCESS !=
+ csu_BreakSrcConn(t_type, t_pidx, d_type, d_pidx) )
+ {
+ DBG_ERROR("CSU TERM-BREAK REQ Error csu_BreakSrcConn(): src(%d,idx:%x)-->snk(%d,%x)\n",
+ snk->peer[i].type, snk->peer[i].pidx,
+ s_type, snk->rtpHandler);
+
+ }
+ }
+ }
+ }
+
+ csu_GiveSemaphore();
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SUCCESS;
+}
+
+//Break all connections terminated at given sink port
+T_CSU_RESULT_CON csu_OrigTermBreakAll(T_CSU_PORT_ID *port)
+{
+ T_CSU_RESULT_CON ret;
+
+ DBG_FUNC("csu_OrigTermBreakAll", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CSU ORIG-TERM-BREAK REQ Info: port(%d,%x)\n",
+ port->portType, port->portId.rtpHandler);
+
+
+ if ( CSU_RESULT_CON_SUCCESS !=
+ (ret = csu_OrigBreakAll(port)) )
+ {
+ DBG_ERROR("CSU ORIG-TERM-BREAK REQ Error OrigBreakAll(): orig(%d, %x)\n",
+ port->portType, port->portId.rtpHandler);
+ DBG_LEAVE()
+ return ret;
+ }
+
+ if ( CSU_RESULT_CON_SUCCESS !=
+ (ret = csu_TermBreakAll(port)) )
+ {
+ DBG_ERROR("CSU ORIG-TERM-BREAK REQ Error TermBreakAll(): term(%d, %x)\n",
+ port->portType, port->portId.rtpHandler);
+ DBG_LEAVE()
+ return ret;
+ }
+
+ DBG_LEAVE()
+ return CSU_RESULT_CON_SUCCESS;
+}
+
+//Interogate the connection status originating from the source port
+T_CSU_RESULT_CON csu_SrcStatus(T_CSU_PORT_ID *source, T_CSU_PORT_LIST *sink)
+{
+ Uint8 d_there,trx,slot,s_type;
+ Uint16 s_pidx;
+ T_CSU_SRC_PORT *src;
+
+ DBG_FUNC("csu_SrcStatus", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("SRC-STATUS REQ: src port(%d,%x)\n",
+ source->portType, source->portId.rtpHandler);
+
+ csu_TakeSemaphore();
+
+ // Get index of source port in its connection table
+ if ( CSU_RESULT_SUCCESS !=
+ csu_FindSrcPortPIdx(source, &s_type, &s_pidx) )
+ {
+ csu_GiveSemaphore();
+ return CSU_RESULT_CON_FAILED;
+ }
+
+ // Find the port's corresponding item in snk table
+ switch(s_type)
+ {
+ case CSU_GSM_PORT:
+ trx = (Uint8)(s_pidx>>8);
+ slot = (Uint8)(s_pidx);
+ src = &csu_GsmSrcPort[trx][slot];
+ break;
+ case CSU_RTP_PORT:
+ src = &csu_RtpSrcPort[s_pidx];
+ break;
+ case CSU_ANN_PORT:
+ src = &csu_AnnSrcPort[s_pidx];
+ break;
+ default:
+ DBG_TRACE("ERROR: invalid source port type: %d\n", s_type);
+ csu_GiveSemaphore();
+ return CSU_RESULT_CON_FAILED;
+ }
+
+ // Check if src port engaged in any connection or not
+ if ( src->state != CSU_RESSTATE_USED || src->count==0 )
+ {
+ DBG_TRACE("source port (%d, %x) not engaged in any call\n",
+ s_type, src->rtpHandler);
+
+ sink->count = 0;
+
+ csu_GiveSemaphore();
+ return CSU_RESULT_CON_SUCCESS;
+ }
+
+ // Return all the sinks involved in calls originated from the source
+ for (int i=0;i<CSU_PEER_PORT_MAX;i++)
+ {
+ if ( src->peer[i].type != CSU_NIL_PORT &&
+ src->peer[i].pidx != CSU_PEER_PORT_NULL )
+ {
+ // Check src's engagement of this src->snk connection
+ d_there = 1;
+ if ( CSU_RESULT_SUCCESS !=
+ csu_CheckSnkConn(src->peer[i].type,src->peer[i].pidx,s_type,s_pidx) )
+ {
+ DBG_TRACE("src (%d,%x)-->snk(%d,idx:%x) snk not engaged\n",
+ s_type, src->rtpHandler,
+ src->peer[i].type, src->peer[i].pidx);
+
+ d_there = 0;
+
+ // This sink does not make any sense, clear it now
+ src->peer[i].type = CSU_NIL_PORT;
+ src->peer[i].pidx = CSU_PEER_PORT_NULL;
+ if (--src->count == 0)
+ {
+ sink->count = 0;
+ csu_GiveSemaphore();
+ return CSU_RESULT_CON_SUCCESS;
+ }
+ }
+
+ // This src is currently engaged, add it into the sink list
+ if (d_there)
+ {
+ if (CSU_RESULT_SUCCESS !=
+ csu_AddToSnkPortList(sink,src->peer[i].type,src->peer[i].pidx) )
+ {
+ DBG_TRACE("sink port list constraint:count=%,size=%d\n",
+ sink->count, CSU_CONN_MAX);
+ csu_GiveSemaphore();
+ return CSU_RESULT_CON_FAILED;
+ }
+ }
+
+ }
+ }
+
+ csu_GiveSemaphore();
+ return CSU_RESULT_CON_SUCCESS;
+}
+
+//Interogate the connection status terminating at the sink port
+T_CSU_RESULT_CON csu_SnkStatus(T_CSU_PORT_ID *sink, T_CSU_PORT_LIST *source)
+{
+ Uint8 s_there,trx,slot,d_type;
+ Uint16 d_pidx;
+ T_CSU_SNK_PORT *snk;
+
+ DBG_FUNC("csu_SnkStatus", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("TERM-STATUS REQ: snk port(%d,%x)\n",
+ sink->portType, sink->portId.rtpHandler);
+
+ csu_TakeSemaphore();
+
+ // Get index of sink port in its connection table
+ if ( CSU_RESULT_SUCCESS !=
+ csu_FindSnkPortPIdx(sink, &d_type, &d_pidx) )
+ {
+ csu_GiveSemaphore();
+ return CSU_RESULT_CON_FAILED;
+ }
+
+ // Find the port's corresponding item in snk table
+ switch(d_type)
+ {
+ case CSU_GSM_PORT:
+ trx = (Uint8)(d_pidx>>8);
+ slot = (Uint8)(d_pidx);
+ snk = &csu_GsmSnkPort[trx][slot];
+ break;
+ case CSU_RTP_PORT:
+ snk = &csu_RtpSnkPort[d_pidx];
+ break;
+ //case CSU_ANN_PORT:
+
+ default:
+ DBG_TRACE("ERROR: invalid sink port type: %d\n", d_type);
+ csu_GiveSemaphore();
+ return CSU_RESULT_CON_FAILED;
+ }
+
+ // Check if snk port engaged in any connection or not
+ if ( snk->state != CSU_RESSTATE_USED || snk->count==0 )
+ {
+ DBG_TRACE("sink port (%d, %x) not engaged in any call\n",
+ d_type, snk->rtpHandler);
+
+ source->count = 0;
+ csu_GiveSemaphore();
+ return CSU_RESULT_CON_SUCCESS;
+ }
+
+ // Return all the sources involved in calls terminated at the sink
+ for (int i=0;i<CSU_PEER_PORT_MAX;i++)
+ {
+ if ( snk->peer[i].type != CSU_NIL_PORT &&
+ snk->peer[i].pidx != CSU_PEER_PORT_NULL )
+ {
+ // Check src's engagement of this src->snk connection
+ s_there = 1;
+ if ( CSU_RESULT_SUCCESS !=
+ csu_CheckSrcConn(snk->peer[i].type,snk->peer[i].pidx,d_type,d_pidx) )
+ {
+ DBG_TRACE("src (%d,idx:%x)-->snk(%d,%x) src not engaged\n",
+ snk->peer[i].type, snk->peer[i].pidx,
+ d_type, snk->rtpHandler);
+ s_there = 0;
+
+ // This source does not make any sense, clear it now
+ snk->peer[i].type = CSU_NIL_PORT;
+ snk->peer[i].pidx = CSU_PEER_PORT_NULL;
+ if (--snk->count == 0)
+ {
+ source->count = 0;
+ csu_GiveSemaphore();
+ return CSU_RESULT_CON_SUCCESS;
+ }
+ }
+
+ // This src is currently engaged, add it into the source list
+ if (s_there)
+ {
+ if (CSU_RESULT_SUCCESS !=
+ csu_AddToSrcPortList(source,snk->peer[i].type,snk->peer[i].pidx) )
+ {
+ DBG_TRACE("source port list constraint:count=%,size=%d\n",
+ source->count, CSU_CONN_MAX);
+ csu_GiveSemaphore();
+ return CSU_RESULT_CON_FAILED;
+ }
+ }
+
+ }
+ }
+
+ csu_GiveSemaphore();
+ return CSU_RESULT_CON_SUCCESS;
+}
+
+//Interogate the whole connection status port is involved in
+T_CSU_RESULT_CON csu_SrcSnkStatus(
+ T_CSU_PORT_ID *port, T_CSU_PORT_LIST *source, T_CSU_PORT_LIST *sink)
+{
+ T_CSU_RESULT_CON ret;
+
+ DBG_FUNC("csu_SrcSnkStatus", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("ORIG-TERM STATUS REQ: port(%d,%x)\n",
+ port->portType, port->portId.rtpHandler);
+
+ if ( CSU_RESULT_CON_SUCCESS != (ret=csu_SrcStatus(port, source)) )
+ {
+ DBG_TRACE("FAILED in checking source-side connection status of port(%d,%x)\n",
+ port->portType, port->portId.rtpHandler);
+ return ret;
+ }
+
+ if ( CSU_RESULT_CON_SUCCESS != (ret=csu_SnkStatus(port, sink)) )
+ {
+ DBG_TRACE("FAILED in checking sink-side connection status of port(%d,%x)\n",
+ port->portType, port->portId.rtpHandler);
+ return ret;
+ }
+
+ return CSU_RESULT_CON_SUCCESS;
+}
+
+#endif /*__CSU_CONN_CPP__*/
diff --git a/data/mnet/GP10/Host/CsuNew/src/csu_cutil.cpp b/data/mnet/GP10/Host/CsuNew/src/csu_cutil.cpp
new file mode 100644
index 0000000..d3cca64
--- /dev/null
+++ b/data/mnet/GP10/Host/CsuNew/src/csu_cutil.cpp
@@ -0,0 +1,782 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+
+#ifndef __CSU_CUTIL_CPP__
+#define __CSU_CUTIL_CPP__
+
+#include "CsuNew\csu_head.h"
+
+//Add a source port to a source port list
+T_CSU_RESULT csu_AddToSrcPortList(T_CSU_PORT_LIST *list,Uint8 type, Uint16 pidx)
+{
+ DBG_FUNC("csu_AddToSrcPortList", CSU_LAYER);
+ DBG_ENTER();
+
+ if (list->count == (CSU_CONN_MAX-1) )
+ {
+ DBG_ERROR("CSU Error csu_AddToSrcPortList(): src port list constraint:count=%,size=%d\n",
+ list->count, CSU_CONN_MAX);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+
+ switch(type)
+ {
+ case CSU_GSM_PORT:
+ T_CNI_IRT_ID entryId;
+ if (!rm_TrxSlotToEntryId(pidx,&entryId))
+ {
+ DBG_ERROR("CSU Error csu_AddToSrcPortList(): no entryId matched to port(%d,%x)\n",
+ type, pidx);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+ list->port[list->count].portType = CSU_GSM_PORT;
+ list->port[list->count].portId.gsmHandler = entryId;
+ break;
+ case CSU_RTP_PORT:
+ list->port[list->count].portType = CSU_RTP_PORT;
+ list->port[list->count].portId.rtpHandler = csu_RtpSrcPort[pidx].rtpHandler;
+ break;
+ case CSU_ANN_PORT:
+ list->port[list->count].portType = CSU_ANN_PORT;
+ list->port[list->count].portId.annHandler = csu_AnnSrcPort[pidx].annHandler;
+ break;
+ default:
+ DBG_ERROR("CSU Error csu_AddToSrcPortList():invalid source type '%d'\n", type);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+
+ list->count++;
+
+ DBG_LEAVE();
+ return CSU_RESULT_SUCCESS;
+}
+
+//Add a sink port to a sink port list
+T_CSU_RESULT csu_AddToSnkPortList(T_CSU_PORT_LIST *list,Uint8 type,Uint16 pidx)
+{
+
+ DBG_FUNC("csu_AddToSnkPortList", CSU_LAYER);
+ DBG_ENTER();
+
+ if (list->count == (CSU_CONN_MAX-1) )
+ {
+ DBG_ERROR("CSU Error csu_AddToSnkPortList(): sink port list constraint:count=%,size=%d\n",
+ list->count, CSU_CONN_MAX);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+
+ switch(type)
+ {
+ case CSU_GSM_PORT:
+ T_CNI_IRT_ID entryId;
+ if (!rm_TrxSlotToEntryId(pidx,&entryId))
+ {
+ DBG_ERROR("CSU Error csu_AddToSnkPortList(): no entryId matched to port(%d,%x)\n",
+ type, pidx);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+ list->port[list->count].portType = CSU_GSM_PORT;
+ list->port[list->count].portId.gsmHandler = entryId;
+ break;
+ case CSU_RTP_PORT:
+ list->port[list->count].portType = CSU_RTP_PORT;
+ list->port[list->count].portId.rtpHandler = csu_RtpSnkPort[pidx].rtpHandler;
+ break;
+ //case CSU_ANN_PORT:
+
+ default:
+ DBG_ERROR("CSU Error csu_AddToSnkPortList(): invalid sink type '%d'\n", type);
+ return CSU_RESULT_FAILED;
+ }
+
+ list->count++;
+
+ DBG_LEAVE();
+ return CSU_RESULT_SUCCESS;
+}
+
+//Find src port's type and pidx appearing in its peer snk port's peer[]
+T_CSU_RESULT csu_FindSrcPortPIdx(T_CSU_PORT_ID *src, Uint8 *type, Uint16 *pidx)
+{
+ Uint8 i,j;
+ Uint16 gsmHandler;
+
+ DBG_FUNC("csu_FindSrcPortPIdx", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CSU Info csu_FindSrcPortPIdx(): src (%d,%x)\n", src->portType,
+ src->portId.rtpHandler);
+ switch(src->portType)
+ {
+ case CSU_GSM_PORT:
+ //Converting entryId to gsmHandler
+ if (!rm_EntryIdToTrxSlot(src->portId.gsmHandler, &gsmHandler))
+ {
+ DBG_ERROR("CSU Error csu_FindSrcPortPIdx(): failed in converting entryId %d to gsmHandler=%x\n",
+ src->portId.gsmHandler, gsmHandler);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+
+ //DBG_TRACE("entryId=%d, trx/slot=%x\n",src->portId.gsmHandler, gsmHandler);
+
+ for (i=0;i<CSU_GSM_SRC_TRX_MAX ;i++)
+ for (j=0;j<CSU_GSM_SRC_SLOT_MAX;j++)
+ {
+ if (csu_GsmSrcPort[i][j].state != CSU_RESSTATE_NULL &&
+ csu_GsmSrcPort[i][j].gsmHandler == gsmHandler)
+
+ {
+ *type = CSU_GSM_PORT;
+ *pidx = (Uint16)(i<<8|j);
+ DBG_LEAVE();
+ return CSU_RESULT_SUCCESS;
+ }
+ }
+ break;
+
+ case CSU_RTP_PORT:
+ for (i=0;i<=CSU_RTP_SRC_PORT_MAX;i++)
+ {
+ if (csu_RtpSrcPort[i].state != CSU_RESSTATE_NULL &&
+ csu_RtpSrcPort[i].rtpHandler == src->portId.rtpHandler)
+ {
+ *type = CSU_RTP_PORT;
+ *pidx=i;
+ return CSU_RESULT_SUCCESS;
+ }
+ }
+ break;
+
+ case CSU_ANN_PORT:
+ for (i=0;i<=CSU_ANN_SRC_PORT_MAX;i++)
+ {
+ if (csu_AnnSrcPort[i].state != CSU_RESSTATE_NULL &&
+ csu_AnnSrcPort[i].annHandler == src->portId.annHandler)
+
+ {
+ *type = CSU_ANN_PORT;
+ *pidx=i;
+ return CSU_RESULT_SUCCESS;
+ }
+ }
+ break;
+
+ default:
+ DBG_ERROR("CSU Error csu_FindSrcPortPIdx(): invalid src port type:%d\n",
+ src->portType, src->portId.rtpHandler);
+ return CSU_RESULT_FAILED;
+ }
+
+ return CSU_RESULT_FAILED;
+}
+
+//Find snk port's type and pidx appearing in its peer snk port's peer[]
+T_CSU_RESULT csu_FindSnkPortPIdx(T_CSU_PORT_ID *snk, Uint8 *type, Uint16 *pidx)
+{
+ Uint8 i,j;
+ Uint16 gsmHandler;
+
+ DBG_FUNC("csu_FindSnkPortPIdx", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CSU Info csu_FindSnkPortPIdx(): snk (%d,%x)\n", snk->portType,
+ snk->portId.rtpHandler);
+
+ switch(snk->portType)
+ {
+ case CSU_GSM_PORT:
+ //Converting entryId to gsmHandler
+ if (!rm_EntryIdToTrxSlot(snk->portId.gsmHandler, &gsmHandler))
+ {
+ DBG_ERROR("CSU Error csu_FindSnkPortPIdx(): failed in converting entryId %d to gsmHandler=%x\n",
+ snk->portId.gsmHandler, gsmHandler);
+ return CSU_RESULT_FAILED;
+ }
+
+ for (i=0;i<CSU_GSM_SNK_TRX_MAX ;i++)
+ for (j=0;j<CSU_GSM_SNK_SLOT_MAX;j++)
+ {
+ if (csu_GsmSnkPort[i][j].state != CSU_RESSTATE_NULL &&
+ csu_GsmSnkPort[i][j].gsmHandler == gsmHandler)
+
+ {
+ *type = CSU_GSM_PORT;
+ *pidx = (Uint16)(i<<8|j);
+ return CSU_RESULT_SUCCESS;
+ }
+ }
+ break;
+
+ case CSU_RTP_PORT:
+ for (i=0;i<=CSU_RTP_SNK_PORT_MAX;i++)
+ {
+ if (csu_RtpSnkPort[i].state != CSU_RESSTATE_NULL &&
+ csu_RtpSnkPort[i].rtpHandler == snk->portId.rtpHandler)
+ {
+ *type = CSU_RTP_PORT;
+ *pidx=i;
+ DBG_LEAVE();
+ return CSU_RESULT_SUCCESS;
+ }
+ }
+ break;
+
+ //case CSU_ANN_PORT:
+
+ default:
+ DBG_ERROR("CSU Error csu_FindSnkPortPIdx():invalid snk port type:%d\n",
+ snk->portType, snk->portId.rtpHandler);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+}
+
+//Check if src port is connection capable
+T_CSU_RESULT csu_CheckSrcCapable(
+ Uint8 s_type, Uint16 s_pidx, Uint8 d_type, Uint16 d_pidx)
+{
+ Uint8 i,trx,slot;
+ T_CSU_SRC_PORT *src;
+
+ DBG_FUNC("csu_CheckSrcCapable", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CSU Info csu_CheckSrcCapable(): srcIdx(%d, %x)-->snkIdx(%d,%x)\n",
+ s_type, s_pidx, d_type, d_pidx);
+
+ switch(s_type)
+ {
+ case CSU_GSM_PORT:
+ trx = (Uint8)(s_pidx>>8);
+ slot = (Uint8)(s_pidx);
+ src = &csu_GsmSrcPort[trx][slot];
+ break;
+ case CSU_RTP_PORT:
+ src = &csu_RtpSrcPort[s_pidx];
+ break;
+ case CSU_ANN_PORT:
+ src = &csu_AnnSrcPort[s_pidx];
+ break;
+ default:
+ DBG_ERROR("CSU Error csu_CheckSrcCapable(): invalid src port type: %d\n", s_type);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+
+ //Check if src port has gone beyond its connection capacity
+ if (src->state == CSU_RESSTATE_USED && src->count >= src->limit)
+ {
+ DBG_ERROR("CSU Error csu_CheckSrcCapable(): Src conn overflow: srcIdx(%d,%x),count=%d,limit=%d\n",
+ s_type, src->rtpHandler, src->count, src->limit);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+
+ //Check if src port is already engaged as expected
+ if (src->state == CSU_RESSTATE_USED )
+ {
+ for (i=0;i<CSU_PEER_PORT_MAX;i++)
+ {
+ if (src->peer[i].type == d_type &&
+ src->peer[i].pidx == d_pidx )
+ {
+ DBG_TRACE("CSU INFO csu_CheckSrcCapable(): SrcIdx(%d,%x) already engaged as expected\n",
+ s_type, src->rtpHandler);
+ DBG_LEAVE();
+ return CSU_RESULT_SRC_PORT_CONNECTED_AS_EXPECTED;
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return CSU_RESULT_SUCCESS;
+}
+
+//Check if snk port is connection capable
+T_CSU_RESULT csu_CheckSnkCapable(
+ Uint8 d_type, Uint16 d_pidx, Uint8 s_type, Uint16 s_pidx)
+{
+ Uint8 i,trx,slot;
+ T_CSU_SNK_PORT *snk;
+
+ DBG_FUNC("csu_CheckSnkCapable", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CSU Info csu_CheckSnkCapable(): srcIdx(%d, %x)-->snkIdx(%d,%x)\n",
+ s_type, s_pidx, d_type, d_pidx);
+
+ switch(d_type)
+ {
+ case CSU_GSM_PORT:
+ trx = (Uint8)(d_pidx>>8);
+ slot = (Uint8)(d_pidx);
+ snk = &csu_GsmSnkPort[trx][slot];
+ break;
+ case CSU_RTP_PORT:
+ snk = &csu_RtpSnkPort[d_pidx];
+ break;
+ //case CSU_ANN_PORT:
+
+ default:
+ DBG_ERROR("CSU Error csu_CheckSnkCapable(): invalid sink port type: %d\n", d_type);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+
+ //Check if snk port has gone beyond its connection capacity
+ if (snk->state == CSU_RESSTATE_USED && snk->count > snk->limit)
+ {
+ DBG_ERROR("CSU Error csu_CheckSnkCapable(): Snk conn overflow: snkIdx(%d,%x),count=%d,limit=%d\n",
+ d_type, snk->rtpHandler, snk->count, snk->limit);
+ return CSU_RESULT_FAILED;
+ }
+
+ //Check if snk port is already engaged as expected
+ if (snk->state == CSU_RESSTATE_USED )
+ {
+ for (i=0;i<CSU_PEER_PORT_MAX;i++)
+ {
+ if (snk->peer[i].type == s_type &&
+ snk->peer[i].pidx == s_pidx )
+ {
+ DBG_TRACE("CSU INFO csu_CheckSnkCapable(): SnkIdx(%d,%x) already engaged as expected\n",
+ d_type, snk->rtpHandler);
+ DBG_LEAVE();
+ return CSU_RESULT_SNK_PORT_CONNECTED_AS_EXPECTED;
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return CSU_RESULT_SUCCESS;
+}
+
+//Finish src port of a connection
+T_CSU_RESULT csu_ConnSrcPort(Uint8 s_type, Uint16 s_pidx, Uint8 d_type, Uint16 d_pidx,T_CSU_PORT_ID *port_id)
+{
+ Uint8 i;
+ T_CSU_SRC_PORT *src;
+ T_CSU_RESULT ret;
+
+ DBG_FUNC("csu_ConnSrcPort", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CSU Info csu_ConnSrcPort(): srcIdx(%d, %x)-->snkIdx(%d,%x)\n",
+ s_type, s_pidx, d_type, d_pidx);
+
+ switch(s_type)
+ {
+ case CSU_GSM_PORT:
+ src = &csu_GsmSrcPort[((Uint8)(s_pidx>>8))][((Uint8)(s_pidx))];
+ break;
+ case CSU_RTP_PORT:
+ src = &csu_RtpSrcPort[s_pidx];
+ break;
+ case CSU_ANN_PORT:
+ src = &csu_AnnSrcPort[s_pidx];
+ break;
+ default:
+ DBG_ERROR("CSU Error csu_ConnSrcPort(): invalid source port type '%d'\n", s_type);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+
+ //Update src port as connected
+ for (i=0;i<CSU_PEER_PORT_MAX;i++)
+ {
+ if (src->peer[i].type==CSU_NIL_PORT)
+ {
+ src->state = CSU_RESSTATE_USED;
+ src->count++;
+ src->test = CSU_TEST_FUNC_NULL;
+ src->peer[i].type = d_type;
+ src->peer[i].pidx = d_pidx;
+ src->peer[i].ppos = 0;
+ src->peer[i].speech_version = port_id->speechVersion;
+
+//DECIDEPT:
+ if (d_type==CSU_RTP_PORT)
+ src->peer[i].ldty=(Uint8)VoipCallGetRtpPayloadType(csu_RtpSnkPort[d_pidx].rtpHandler);
+//TESTADDED
+ src->seqn = 0;
+ src->seqc = 0;
+ break;
+ }
+ }
+
+ //The following for double check, should not happen in the design
+ if (i>=CSU_PEER_PORT_MAX)
+ {
+ DBG_ERROR("CSU Error csu_ConnSrcPort(): Src(%d,%x) peer[] constraint, count=%d,limit=%d,MAX=%d\n",
+ s_type, s_pidx, src->count, src->limit, CSU_PEER_PORT_MAX);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+
+ DBG_LEAVE();
+ return CSU_RESULT_SUCCESS;
+}
+
+//Finish snk port of a connection
+T_CSU_RESULT csu_ConnSnkPort(Uint8 d_type, Uint16 d_pidx, Uint8 s_type, Uint16 s_pidx, T_CSU_PORT_ID *port_id)
+{
+ Uint8 i;
+ T_CSU_SNK_PORT *snk;
+ T_CSU_RESULT ret;
+
+ DBG_FUNC("csu_ConnSnkPort", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CSU Info csu_ConnSnkPort(): srcIdx(%d, %x)-->snkIdx(%d,%x)\n",
+ s_type, s_pidx, d_type, d_pidx);
+
+ switch(d_type)
+ {
+ case CSU_GSM_PORT:
+ snk = &csu_GsmSnkPort[((Uint8)(d_pidx>>8))][((Uint8)(d_pidx))];
+ break;
+ case CSU_RTP_PORT:
+ snk = &csu_RtpSnkPort[d_pidx];
+ break;
+ //case CSU_ANN_PORT:
+
+ default:
+ DBG_ERROR("CSU Error csu_ConnSnkPort(): invalid snk port type '%d'\n", d_type);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+
+ //Update snk port as connected
+ for (i=0;i<CSU_PEER_PORT_MAX;i++)
+ {
+ if (snk->peer[i].type==CSU_NIL_PORT)
+ {
+ snk->peer[i].type = s_type;
+ snk->peer[i].pidx = s_pidx;
+ snk->speech_version = port_id->speechVersion;
+ snk->state = CSU_RESSTATE_USED;
+ snk->count++;
+ snk->test = CSU_TEST_FUNC_NULL;
+
+//TESTADDED
+ snk->seqn = 0;
+ snk->seqc = 0;
+
+ break;
+ }
+ }
+
+ //The following for double check, should not happen in the design
+ if (i>=CSU_PEER_PORT_MAX)
+ {
+ DBG_ERROR("CSU Error csu_ConnSnkPort(): SnkIdx(%d,%x) peer[] constraint, count=%d,limit=%d,MAX=%d\n",
+ d_type, d_pidx, snk->count, snk->limit, CSU_PEER_PORT_MAX);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+
+ DBG_LEAVE();
+ return CSU_RESULT_SUCCESS;
+}
+
+//Check if src knows src->snk connection
+T_CSU_RESULT csu_CheckSrcConn(
+ Uint8 s_type, Uint16 s_pidx, Uint8 d_type, Uint16 d_pidx)
+{
+ Uint8 i, trx, slot;
+ T_CSU_SRC_PORT *src;
+ T_CSU_RESULT ret;
+
+ DBG_FUNC("csu_CheckSrcConn", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CSU Info csu_CheckSrcConn(): srcIdx(%d, %x)-->snkIdx(%d,%x)\n",
+ s_type, s_pidx, d_type, d_pidx);
+
+ //Calling function responsible for validity of passed parameters
+ switch(s_type)
+ {
+ case CSU_GSM_PORT:
+ trx = (Uint8)(s_pidx>>8);
+ slot = (Uint8)(s_pidx);
+ src = &csu_GsmSrcPort[trx][slot];
+ break;
+ case CSU_RTP_PORT:
+ src = &csu_RtpSrcPort[s_pidx];
+ break;
+ case CSU_ANN_PORT:
+ src = &csu_AnnSrcPort[s_pidx];
+ break;
+ default:
+ DBG_ERROR("CSU Error csu_CheckSrcConn(): invalid src port type '%d'\n", s_type);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+
+ //Check if src port engaged or not
+ if (src->state != CSU_RESSTATE_USED &&
+ src->count == 0)
+ {
+ DBG_ERROR("CSU Error csu_CheckSrcConn(): src port (%d,%x) not engaged\n",
+ s_type, src->rtpHandler);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+
+ //Make sure src port enaged with snk port
+ for (i=0;i<CSU_PEER_PORT_MAX;i++)
+ {
+ if (src->peer[i].type == d_type &&
+ src->peer[i].pidx == d_pidx )
+ {
+ DBG_LEAVE();
+ return CSU_RESULT_SUCCESS;
+ }
+ }
+
+ DBG_ERROR("CSU Error csu_CheckSrcConn(): src port (%d, %x) not engaged with snkIdx(%d,%x)\n",
+ s_type, src->rtpHandler, d_type, d_pidx);
+
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+}
+
+//Check if snk knows src->snk connection
+T_CSU_RESULT csu_CheckSnkConn(
+ Uint8 d_type, Uint16 d_pidx, Uint8 s_type, Uint16 s_pidx)
+{
+ Uint8 i, trx, slot;
+ T_CSU_SNK_PORT *snk;
+ T_CSU_RESULT ret;
+
+ DBG_FUNC("csu_CheckSnkConn", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CSU Info csu_CheckSnkConn(): srcIdx(%d, %x)-->snkIdx(%d,%x)\n",
+ s_type, s_pidx, d_type, d_pidx);
+
+ //Calling function responsible for validity of passed parameters
+ switch(d_type)
+ {
+ case CSU_GSM_PORT:
+ trx = (Uint8)(d_pidx>>8);
+ slot = (Uint8)(d_pidx);
+ snk = &csu_GsmSnkPort[trx][slot];
+ break;
+ case CSU_RTP_PORT:
+ snk = &csu_RtpSnkPort[d_pidx];
+ break;
+ //case CSU_ANN_PORT:
+
+ default:
+ DBG_ERROR("CSU Error csu_CheckSnkConn(): invalid snk port type: %d\n", d_type);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+
+ //Check if snk port engaged or not
+ if (snk->state != CSU_RESSTATE_USED ||
+ snk->count == 0)
+ {
+ DBG_ERROR("CSU Error csu_CheckSnkConn():snk port (%d,%x) not engaged \n",
+ d_type, snk->rtpHandler);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+
+ //Make sure snk port enaged with src port
+ for (i=0;i<CSU_PEER_PORT_MAX;i++)
+ {
+ if (snk->peer[i].type == s_type &&
+ snk->peer[i].pidx == s_pidx )
+ {
+ DBG_LEAVE();
+ return CSU_RESULT_SUCCESS;
+ }
+ }
+
+ DBG_ERROR("CSU Error csu_CheckSnkConn(): srcIdx(%d, %x) not engaged with snk (%d,%x)\n",
+ s_type, s_pidx, d_type, snk->rtpHandler);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+}
+
+//Break source port's engagement in the connection
+T_CSU_RESULT csu_BreakSrcConn(Uint8 s_type, Uint16 s_pidx, Uint8 d_type, Uint16 d_pidx)
+{
+ T_CSU_SRC_PORT *src;
+
+ DBG_FUNC("csu_BreakSrcConn", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CSU Info csu_BreakSrcConn(): srcIdx(%d, %x)-->snkIdx(%d,%x)\n",
+ s_type, s_pidx, d_type, d_pidx);
+
+ //Find the source port
+ switch(s_type)
+ {
+ case CSU_GSM_PORT:
+ Uint8 trx, slot;
+ trx = (Uint8)(s_pidx>>8);
+ slot = (Uint8)(s_pidx);
+ src = &csu_GsmSrcPort[trx][slot];
+ break;
+ case CSU_RTP_PORT:
+ src = &csu_RtpSrcPort[s_pidx];
+ break;
+ case CSU_ANN_PORT:
+ src = &csu_AnnSrcPort[s_pidx];
+ break;
+ default:
+ DBG_ERROR("CSU Error csu_BreakSrcConn(): invalid src type in srcIdx(%d, %x)\n",
+ s_type, s_pidx);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+
+ //Clear the source port's engagement
+ for (int i=0;i<CSU_PEER_PORT_MAX;i++)
+ {
+ if (src->peer[i].type==d_type &&
+ src->peer[i].pidx==d_pidx )
+ {
+ src->peer[i].type = CSU_NIL_PORT;
+ src->peer[i].pidx = CSU_PEER_PORT_NULL;
+ src->peer[i].ppos = 0;
+ if (src->count==0)
+ {
+ DBG_TRACE("CSU INFO csu_BreakSrcConn(): src(%d, %x) engagment count = 0\n",
+ s_type, src->rtpHandler);
+
+ //Check if any pending state transition
+ if ( src->resvd!=CSU_RESSTATE_IGNORE )
+ {
+ src->state = src->resvd;
+ src->resvd = CSU_RESSTATE_IGNORE;
+ } else
+ src->state = CSU_RESSTATE_FREE;
+
+ break;
+ }
+
+ if ( (--src->count) == 0 )
+ {
+ //Check if any pending state transition
+ if ( src->resvd!=CSU_RESSTATE_IGNORE )
+ {
+ src->state = src->resvd;
+ src->resvd = CSU_RESSTATE_IGNORE;
+ } else
+ src->state = CSU_RESSTATE_FREE;
+ break;
+ }
+
+ }
+ }
+
+ //Check if found the sink port of the src->snk connection
+ if (i>=CSU_PEER_PORT_MAX)
+ {
+ DBG_TRACE("CSU INFO csu_BreakSrcConn(): no engagment of src(%d,%x)->snkIdx(%d,%x)\n",
+ s_type, src->rtpHandler, d_type, d_pidx);
+ }
+
+ DBG_LEAVE();
+ return CSU_RESULT_SUCCESS;
+}
+
+//Break the snk port's engagement in the connection
+T_CSU_RESULT csu_BreakSnkConn(Uint8 d_type, Uint16 d_pidx, Uint8 s_type, Uint16 s_pidx)
+{
+ T_CSU_SNK_PORT *snk;
+
+ DBG_FUNC("csu_BreakSnkConn", CSU_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CSU Info csu_BreakSnkConn(): srcIdx(%d, %x)-->snkIdx(%d,%x)\n",
+ s_type, s_pidx, d_type, d_pidx);
+
+ //Find the sink port
+ switch(d_type)
+ {
+ case CSU_GSM_PORT:
+ Uint8 trx, slot;
+ trx = (Uint8)(d_pidx>>8);
+ slot = (Uint8)(d_pidx);
+ snk = &csu_GsmSnkPort[trx][slot];
+ break;
+ case CSU_RTP_PORT:
+ snk = &csu_RtpSnkPort[d_pidx];
+ break;
+ //case CSU_ANN_PORT:
+
+ default:
+ DBG_ERROR("CSU Error csu_BreakSnkConn(): invalid snk port type in snk(%d,%x)\n",
+ d_type, snk->rtpHandler);
+ DBG_LEAVE();
+ return CSU_RESULT_FAILED;
+ }
+
+ //Clear the source port's engagement
+ for (int i=0;i<=CSU_PEER_PORT_MAX;i++)
+ {
+ if (snk->peer[i].type==s_type &&
+ snk->peer[i].pidx==s_pidx )
+ {
+ snk->peer[i].type = CSU_NIL_PORT;
+ snk->peer[i].pidx = CSU_PEER_PORT_NULL;
+ if (snk->count==0)
+ {
+ DBG_TRACE("CSU INFO csu_BreakSnkConn(): snk(%d, %x) engagment count = 0\n",
+ d_type, snk->rtpHandler);
+ //Check if any pending state transition
+ if ( snk->resvd!=CSU_RESSTATE_IGNORE )
+ {
+ snk->state = snk->resvd;
+ snk->resvd = CSU_RESSTATE_IGNORE;
+ } else
+ snk->state = CSU_RESSTATE_FREE;
+ break;
+ }
+
+ if ( (--snk->count) == 0 )
+ {
+ //Check if any pending state transition
+ if ( snk->resvd!=CSU_RESSTATE_IGNORE )
+ {
+ snk->state = snk->resvd;
+ snk->resvd = CSU_RESSTATE_IGNORE;
+ } else
+ snk->state = CSU_RESSTATE_FREE;
+ break;
+ }
+ }
+ }
+
+ //Check if found the sink port of the snk->snk connection
+ if (i>=CSU_PEER_PORT_MAX)
+ {
+ DBG_TRACE("CSU TRACE csu_BreakSrcConn(): no engagment of snk (%d,%x)<-- srcIdx(%d,%x)\n",
+ d_type, snk->rtpHandler, s_type, s_pidx);
+ }
+
+ DBG_LEAVE();
+ return CSU_RESULT_SUCCESS;
+}
+
+#endif /*__CSU_CUTIL_CPP__*/
diff --git a/data/mnet/GP10/Host/CsuNew/src/csu_glob.cpp b/data/mnet/GP10/Host/CsuNew/src/csu_glob.cpp
new file mode 100644
index 0000000..dfc59ea
--- /dev/null
+++ b/data/mnet/GP10/Host/CsuNew/src/csu_glob.cpp
@@ -0,0 +1,33 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+
+#ifndef __CSU_GLOB_CPP__
+#define __CSU_GLOB_CPP__
+
+#include "CsuNew\csu_head.h"
+
+//Declaration of trunk source ports
+T_CSU_SRC_PORT csu_GsmSrcPort[CSU_GSM_SRC_TRX_MAX][CSU_GSM_SRC_SLOT_MAX];
+T_CSU_SRC_PORT csu_RtpSrcPort[CSU_RTP_SRC_PORT_MAX];
+T_CSU_SRC_PORT csu_AnnSrcPort[CSU_ANN_SRC_PORT_MAX];
+
+//Declaration of trunk sink ports
+T_CSU_SNK_PORT csu_GsmSnkPort[CSU_GSM_SNK_TRX_MAX][CSU_GSM_SNK_SLOT_MAX];
+T_CSU_SNK_PORT csu_RtpSnkPort[CSU_RTP_SNK_PORT_MAX];
+//Declaration of a M-semaphore
+SEM_ID csu_SemaId;
+
+// Data definition for announcement
+Uint8 csu_annbuf_FR[CSU_ANN_SRC_PORT_MAX][CSU_PLAY_BUF_LEN];
+Uint8 csu_annbuf_EFR[CSU_ANN_SRC_PORT_MAX][CSU_PLAY_BUF_LEN];
+
+// Use global time stamp to provide precise time stamp for all RTP packets
+Uint32 csu_TimeStamp = 0;
+
+#endif /*__CSU_GLOB_CPP__*/
diff --git a/data/mnet/GP10/Host/CsuNew/src/csu_pass.cpp b/data/mnet/GP10/Host/CsuNew/src/csu_pass.cpp
new file mode 100644
index 0000000..27a7eb3
--- /dev/null
+++ b/data/mnet/GP10/Host/CsuNew/src/csu_pass.cpp
@@ -0,0 +1,716 @@
+ /*
+ *******************************************************************
+ **
+ ** (c) Copyright Cisco 2000
+ ** All Rights Reserved
+ **
+ ******************************************************************
+ */
+ #ifndef __CSU_PASS_CPP__
+ #define __CSU_PASS_CPP__
+
+ #include "CsuNew\csu_head.h"
+ //#include "assert.h"
+
+ // Create a global DbgOutput for posting logs to ViperLog. A global is used
+ // so that an object does not need to be created each time a function is
+ // called in the RTP data path.
+ DbgOutput csu_passDbg;
+
+ //play announcement
+ int ann(void)
+ {
+ //T_CSU_PORT_LIST src;
+ DBG_FUNC("ann()", CSU_LAYER);
+ //DBG_ENTER();
+
+ for (int j=0;j<CSU_ANN_SRC_PORT_MAX;j++)
+ {
+ if (csu_AnnSrcPort[j].state==CSU_RESSTATE_USED)
+ {
+
+ // Pass announcement to all the sinks associated with ANN src
+ int i;
+ for (i=0;i<CSU_PEER_PORT_MAX;i++)
+ {
+ if (csu_AnnSrcPort[j].peer[i].type == CSU_RTP_PORT ||
+ csu_AnnSrcPort[j].peer[i].type == CSU_GSM_PORT )
+ {
+ if( csu_AnnSrcPort[j].peer[i].speech_version == 0)//codec FR is 0;
+ {
+ csu_PassVoice(&csu_AnnSrcPort[j].peer[i],
+ (unsigned char *)&csu_annbuf_FR[csu_AnnSrcPort[j].annHandler][csu_AnnSrcPort[j].peer[i].ppos],0,0xd0);
+ }
+ if( csu_AnnSrcPort[j].peer[i].speech_version == 2)//codec EFR is 2;
+ {
+ csu_PassVoice(&csu_AnnSrcPort[j].peer[i],
+ (unsigned char *)&csu_annbuf_EFR[csu_AnnSrcPort[j].annHandler][csu_AnnSrcPort[j].peer[i].ppos],0,0xc0);
+ }
+ csu_AnnSrcPort[j].peer[i].ppos += ANN_PERIOD;
+ if (csu_AnnSrcPort[j].peer[i].ppos >8250)
+ csu_AnnSrcPort[j].peer[i].ppos=0;
+ }
+ }
+ }
+ }
+ DBG_LEAVE();
+ return TRUE;
+ }
+
+ Int32 procUlTchFrame(Uint8 *buf)
+ {
+ Uint8 i,trx,slot,count,c_count,test,cd; //cd added for PR1352
+ T_CSU_SRC_PEER *peer;
+ T_CSU_PORT_ID src;
+ T_CSU_RESULT ret;
+
+ //csu_passDbg.Enter();
+
+ //csu_TakeSemaphore();
+
+ trx = buf[CSU_GSM_SPEECH_MSG_TRX_POS]&0x01;
+ slot = buf[CSU_GSM_SPEECH_MSG_SLOT_POS]&0x7;
+
+ //Get ANN signal from L1
+ if ( trx==0 && slot==0 )
+ {
+ csu_passDbg.Trace("trx=0 and slot=0 in received speech frame\n");
+
+ //Update global timestamp for RTP frames
+ csu_TimeStamp += CSU_RTP_SPEECH_DAT_RAT;
+
+ //Play announcement
+ ann();
+ return (CSU_RESULT_SUCCESS);
+ }
+
+ src.portType = CSU_GSM_PORT;
+ src.portId.gsmHandler = (trx<<8)|slot; //entryId vs. trx/slot
+
+ //Check if it's leftover from last codec setting
+ if ( !rm_CodecMatch(src.portId.gsmHandler, buf[CSU_GSM_SPEECH_DAT_POS]) )
+ return CSU_RESULT_FAILED;
+
+ //PR1352 BEGIN
+ else
+ {
+ cd = buf[CSU_GSM_SPEECH_DAT_POS] & 0xF0;
+ if ((cd != 0xd0) && (cd != 0xc0))
+ {
+ csu_passDbg.Trace("CSU-procUlTchFrame: invalide codec val(%x,%x)\n",
+ cd, buf[CSU_GSM_SPEECH_DAT_POS]);
+ return CSU_RESULT_FAILED;
+ }
+ }
+ //PR1352 END
+
+ // Retrieve sinks connected with this gsm source port
+ test = CSU_TEST_FUNC_NULL;
+ if (CSU_RESULT_SUCCESS != (ret=csu_TblGetSnk(&src, &test, &count, &peer)))
+ {
+ if (++csu_GsmSrcPort[trx][slot].nopr>=CSU_TRAFFIC_FLOW_6_SEC_COUNT)
+ {
+ csu_passDbg.Trace("FAILED in getting sink for gsm src (%x,%d,%d)\n",
+ src.portId.gsmHandler, ret,
+ csu_GsmSrcPort[trx][slot].nopr);
+ csu_GsmSrcPort[trx][slot].nopr=0;
+ }
+ //csu_GiveSemaphore();
+ return CSU_RESULT_FAILED;
+ }
+
+ // Record or play speech file according to relevant setting
+ if (test != CSU_TEST_FUNC_NULL)
+ {
+ switch(test)
+ {
+ case CSU_TEST_RECORD_SRC_SPEECH_TO_FILE:
+ csu_RecdSpeechToBuffer(&buf[CSU_GSM_SPEECH_DAT_POS]);
+ break;
+ case CSU_TEST_LOOPBACK_SPEECH_TO_SRC_SELF:
+ csu_LoopbackSpeechToSrcSelf(&src,&buf[CSU_GSM_SPEECH_DAT_POS]);
+ break;
+ default:
+ csu_passDbg.Trace("Invalid test function selection:%d\n",test);
+ break;
+ }
+ // csu_GiveSemaphore();
+ return CSU_RESULT_SUCCESS;
+ }
+
+ // Pass voice data to all the sinks associated with src
+ c_count=0;
+ for (i=0;i<CSU_PEER_PORT_MAX;i++)
+ {
+ if (peer[i].type != CSU_NIL_PORT)
+ {
+ //PR1352: cd added
+ csu_PassVoice(&peer[i], &buf[CSU_GSM_SPEECH_DAT_POS],0, cd);
+ c_count++;
+ }
+ }
+
+ if (c_count!=count)
+ {
+ csu_passDbg.Trace("CSU internal constraint:count=%d, c_count=%d\n",count,c_count);
+ // csu_GiveSemaphore();
+ return CSU_RESULT_FAILED;
+ }
+
+ // csu_GiveSemaphore();
+ return CSU_RESULT_SUCCESS;
+ }
+
+ int csu_TestSkipSendDsp=0;
+ int csu_TestRetAfterJcRtpRead=0;
+ int csu_TestSkipPassVoice=0;
+
+ //void H323RTPEventHandler(HRTPSESSION rtpHandler, H323CALL hCall, T_CNI_IRT_ID gsmHandler)
+ void RTPFastReadHandler(HJCRTPSESSION rtpHandler, unsigned char *buf,
+ int leng, rtpParam param,VOIP_CALL_HANDLE CallHandle,T_CNI_IRT_ID MobileHandle)
+ {
+ Uint8 i, count, c_count, test;
+ // Int8 buf[CSU_RTP_SPEECH_MSG_LEN];
+ T_CSU_SRC_PEER *peer;
+ T_CSU_PORT_ID src;
+ T_CSU_RESULT ret;
+
+ //csu_passDbg.Enter();
+
+ // msecs record arrival time of incoming RTP payload frames. Ideally
+ // payload frames from each traffic are supposed to come every 20 ms.
+
+ // csu_TakeSemaphore();
+
+ #if 0
+ Uint32 msecs;
+ msecs = 1000*tickGet()/sysClkRateGet(); //NOTE: needed for local time fed here
+ if( ERROR == (leng=jcRtpReadEx(rtpHandler,buf,CSU_RTP_SPEECH_MSG_LEN,8*msecs, &param)) )
+ {
+ csu_passDbg.Error("FAILED in rtpReadEx/jcRtpReadEx: rtpHandler=%d, leng=%d\n",
+ rtpHandler,leng);
+ // csu_GiveSemaphore();
+ return;
+ }
+ #endif
+
+ // Retrieve sinks connected with this rtp source port
+ src.portType = CSU_RTP_PORT;
+ src.portId.rtpHandler = rtpHandler;
+ ret = csu_TblGetSnk(&src, &test, &count, &peer);
+ if (ret!= CSU_RESULT_SUCCESS)
+ {
+ //csu_passDbg.Error("FAILED in getting sinks for rtpHandler '%x': err=%d,leng=%d\n",
+ // src.portId.rtpHandler, ret, leng);
+ //csu_GiveSemaphore();
+ return;
+ }
+
+ #if 0
+ //printf("INFO-CSU-TRACE: port=%x, seqn=%d\n", rtpHandler, param.sequenceNumber);
+
+ // Showing occurrence of reiceiving data from a given src RTP port
+ //TESTADDED
+ for (i=0;i<CSU_RTP_SRC_PORT_MAX;i++)
+ {
+ if (csu_RtpSrcPort[i].state==CSU_RESSTATE_USED &&
+ csu_RtpSrcPort[i].rtpHandler==(HRTPSESSION)rtpHandler )
+ {
+ // if (csu_RtpSrcPort[i].prnt==CSU_TEST_PRINT_SRC_HANDLER_USED)
+ // {
+ // printf("RTPEventHandler:Got data from RTP port:0x%08x,%08d\n",
+ // rtpHandler,csu_RtpSrcPort[i].wcnt);
+ // csu_RtpSrcPort[i].wcnt++;
+ // }
+
+
+ // //TESTADDED for checking if any combined rtp frames
+ // if (param.len>45)
+ // printf("CSU-INFO-LEN: port=0x08x,seqn=%d,leng=%d\n",
+ // rtpHandler,param.sequenceNumber,param.len);
+
+ //TESTADDED for checking if packets come in sequence
+ if ((csu_RtpSrcPort[i].seqn+1) != param.sequenceNumber)
+ {
+ csu_RtpSrcPort[i].seqc++;
+ FILE *fp;
+ fp=fdopen(1,"wr");
+ fflush(fp);
+ // printf("CSU-INFO-OOS: port=0x%08x, pseq=0x%X, cseq=0x%X, toos=%d\n",
+ // rtpHandler,
+ // csu_RtpSrcPort[i].seqn,
+ // param.sequenceNumber,
+ // csu_RtpSrcPort[i].seqc);
+ //csu_RtpSrcPort[i].seqn = param.sequenceNumber;
+ }
+ csu_RtpSrcPort[i].seqn = param.sequenceNumber;
+
+ break;
+ }
+ }
+
+ if (i>=CSU_RTP_SRC_PORT_MAX)
+ {
+ printf(" RTP port:0x%08x not engaged in any call\n", rtpHandler);
+ // csu_GiveSemaphore();
+ return;
+ }
+
+ // Record or play speech file according to relevant setting
+ if (test != CSU_TEST_FUNC_NULL)
+ {
+ switch(test)
+ {
+ case CSU_TEST_RECORD_SRC_SPEECH_TO_FILE:
+ csu_RecdSpeechToBuffer((Uint8*)&buf[CSU_RTP_SPEECH_DAT_POS]);
+ break;
+ case CSU_TEST_LOOPBACK_SPEECH_TO_SRC_SELF:
+ csu_LoopbackSpeechToSrcSelf(&src,
+ (Uint8*)&buf[CSU_RTP_SPEECH_DAT_POS]);
+ break;
+ default:
+ csu_passDbg.Error("Invalid test function selection:%d\n",test);
+ break;
+ }
+ // csu_GiveSemaphore();
+ return;
+ }
+ #endif
+
+ Uint8 cd;
+ if (param.payload == CSU_RTP_SPEECH_DAT_PAYLOADefr)
+ cd = 0xc0;
+ else //if (param.payload == CSU_RTP_SPEECH_DAT_PAYLOAD)
+ cd = 0xd0;
+
+ // Pass voice data to all the sinks associated with src
+ c_count=0;
+ for (i=0;i<CSU_PEER_PORT_MAX;i++)
+ {
+ if (peer[i].type != CSU_NIL_PORT)
+ {
+ //printf("INFO-CSU-TRACE: port=%x, seqn=%d\n", rtpHandler, param.sequenceNumber);
+
+ csu_PassVoice(&peer[i], (Uint8*)&buf[CSU_RTP_SPEECH_DAT_POS],
+ param.sequenceNumber,cd); //PR1352: 0 added
+ c_count++;
+ }
+ }
+
+ if (c_count!=count||c_count==0)
+ csu_passDbg.Error("CSU internal constraint:count=%d, c_count=%d\n",count,c_count);
+
+ // csu_GiveSemaphore();
+ }
+
+ RTP_READ_STATUS RTPEventHandler( HJCRTPSESSION rtpHandler, VOIP_CALL_HANDLE VoipCallHandle, TXN_ID entryId)
+
+ {
+ Uint8 i, count, c_count, test, cd;
+ Int8 buf[CSU_RTP_SPEECH_MSG_LEN];
+ Uint32 msecs;
+ rtpParam param;
+ T_CSU_SRC_PEER *peer;
+ T_CSU_PORT_ID src;
+ T_CSU_RESULT ret;
+ int leng;
+
+ //csu_passDbg.Enter();
+
+ // msecs record arrival time of incoming RTP payload frames. Ideally
+ // payload frames from each traffic are supposed to come every 20 ms.
+
+ // csu_TakeSemaphore();
+
+ msecs = 1000*tickGet()/sysClkRateGet(); //NOTE: needed for local time fed here
+ if( ERROR == (leng=jcRtpReadEx(rtpHandler,buf,CSU_RTP_SPEECH_MSG_LEN,8*msecs, &param)) )
+ {
+ csu_passDbg.Error("FAILED in rtpReadEx/jcRtpReadEx: rtpHandler=%d, leng=%d\n",
+ rtpHandler,leng);
+ // csu_GiveSemaphore();
+ return RTP_READ_STATUS_READ_FAILED;
+ }
+
+ if (param.payload == CSU_RTP_SPEECH_DAT_PAYLOADefr)
+ cd = 0xc0;
+ else //if (param.payload == CSU_RTP_SPEECH_DAT_PAYLOAD)
+ cd = 0xd0;
+
+ if (csu_TestRetAfterJcRtpRead)
+ return RTP_READ_STATUS_OK;
+
+ // Retrieve sinks connected with this rtp source port
+ src.portType = CSU_RTP_PORT;
+ src.portId.rtpHandler = rtpHandler;
+ ret = csu_TblGetSnk(&src, &test, &count, &peer);
+ if (ret!= CSU_RESULT_SUCCESS)
+ {
+ //assert(0);
+ //csu_passDbg.Error("FAILED in getting sinks for rtpHandler '%x': err=%d,leng=%d\n",
+ // src.portId.rtpHandler, ret, leng);
+ //csu_GiveSemaphore();
+ return RTP_READ_STATUS_NOT_CONNECTED;
+ }
+
+ #if 0
+ //printf("INFO-CSU-TRACE: port=%x, seqn=%d\n", rtpHandler, param.sequenceNumber);
+
+ // Showing occurrence of reiceiving data from a given src RTP port
+ //TESTADDED
+ for (i=0;i<CSU_RTP_SRC_PORT_MAX;i++)
+ {
+ if (csu_RtpSrcPort[i].state==CSU_RESSTATE_USED &&
+ csu_RtpSrcPort[i].rtpHandler==(HRTPSESSION)rtpHandler )
+ {
+ // if (csu_RtpSrcPort[i].prnt==CSU_TEST_PRINT_SRC_HANDLER_USED)
+ // {
+ // printf("RTPEventHandler:Got data from RTP port:0x%08x,%08d\n",
+ // rtpHandler,csu_RtpSrcPort[i].wcnt);
+ // csu_RtpSrcPort[i].wcnt++;
+ // }
+
+
+ // //TESTADDED for checking if any combined rtp frames
+ // if (param.len>45)
+ // printf("CSU-INFO-LEN: port=0x08x,seqn=%d,leng=%d\n",
+ // rtpHandler,param.sequenceNumber,param.len);
+
+ //TESTADDED for checking if packets come in sequence
+ if ((csu_RtpSrcPort[i].seqn+1) != param.sequenceNumber)
+ {
+ csu_RtpSrcPort[i].seqc++;
+ FILE *fp;
+ fp=fdopen(1,"wr");
+ fflush(fp);
+ // printf("CSU-INFO-OOS: port=0x%08x, pseq=0x%X, cseq=0x%X, toos=%d\n",
+ // rtpHandler,
+ // csu_RtpSrcPort[i].seqn,
+ // param.sequenceNumber,
+ // csu_RtpSrcPort[i].seqc);
+ //csu_RtpSrcPort[i].seqn = param.sequenceNumber;
+ }
+ csu_RtpSrcPort[i].seqn = param.sequenceNumber;
+
+ break;
+ }
+ }
+
+ if (i>=CSU_RTP_SRC_PORT_MAX)
+ {
+ // printf(" RTP port:0x%08x not engaged in any call\n", rtpHandler);
+ // csu_GiveSemaphore();
+ return;
+ }
+
+ // Record or play speech file according to relevant setting
+ if (test != CSU_TEST_FUNC_NULL)
+ {
+ switch(test)
+ {
+ case CSU_TEST_RECORD_SRC_SPEECH_TO_FILE:
+ csu_RecdSpeechToBuffer((Uint8*)&buf[CSU_RTP_SPEECH_DAT_POS]);
+ break;
+ case CSU_TEST_LOOPBACK_SPEECH_TO_SRC_SELF:
+ csu_LoopbackSpeechToSrcSelf(&src,
+ (Uint8*)&buf[CSU_RTP_SPEECH_DAT_POS]);
+ break;
+ default:
+ csu_passDbg.Error("Invalid test function selection:%d\n",test);
+ break;
+ }
+ // csu_GiveSemaphore();
+ return;
+ }
+ #endif
+
+ // Pass voice data to all the sinks associated with src
+ c_count=0;
+ for (i=0;i<CSU_PEER_PORT_MAX;i++)
+ {
+ if (peer[i].type != CSU_NIL_PORT)
+ {
+ //printf("INFO-CSU-TRACE: port=%x, seqn=%d\n", rtpHandler, param.sequenceNumber);
+ if (!csu_TestSkipPassVoice)
+ csu_PassVoice(&peer[i], (Uint8*)&buf[CSU_RTP_SPEECH_DAT_POS],
+ param.sequenceNumber, cd); //PR1352: cd added
+ c_count++;
+ }
+ }
+
+ if (c_count!=count||c_count==0)
+ csu_passDbg.Error("CSU internal constraint:count=%d, c_count=%d\n",count,c_count);
+
+ // csu_GiveSemaphore();
+
+ return RTP_READ_STATUS_OK;
+ }
+
+
+ //PR1352: cd added
+ T_CSU_RESULT csu_PassVoice(T_CSU_SRC_PEER *peer, Uint8 *buf, Uint16 seqNumber,Uint8 cd)
+ {
+ Int32 len;
+ Uint8 msg[CSU_MAX_SPEECH_MSG_LEN];
+ T_CSU_SNK_PORT *snk;
+ // Uint8 *pBuf;
+
+ //csu_passDbg.Enter();
+
+ switch(peer->type)
+ {
+ case CSU_GSM_PORT:
+ //Pass voice over to a GSM sink port
+ Uint8 trx, slot;
+ trx = (Uint8)(peer->pidx>>8);
+ slot = (Uint8)(peer->pidx);
+ len = 4;
+ msg[len++] = CSU_GSM_SPEECH_MSG_MD;
+ msg[len++] = CSU_GSM_SPEECH_DLMSG_MSB;
+ msg[len++] = CSU_GSM_SPEECH_DLMSG_LSB;
+ msg[len++] = trx; //Trx Num
+ msg[len++] = CSU_GSM_BM_ACCH_CBITS|slot; //Chan MSB
+ msg[len++] = 0; //Chan LSB
+ msg[len++] = (Uint8)seqNumber; //Reserved
+ msg[len++] = (Uint8)(seqNumber>>8); //Reserved
+
+ snk = &csu_GsmSnkPort[trx][slot];
+
+ //Check if play recorded speech to peer or real talk in buf
+ if (snk->test == CSU_TEST_PLAY_SPEECH_FROM_FILE_TO_SNK)
+ {
+ memcpy(&msg[len],&csu_playbuf[snk->ppos],CSU_GSM_SPEECH_DAT_LEN);
+ snk->ppos += CSU_REC_SPEECH_DAT_LEN;
+ if (snk->ppos>=26400) snk->ppos = 0;
+ } else
+ memcpy(&msg[len],buf,CSU_GSM_SPEECH_DAT_LEN);
+
+ len += CSU_GSM_SPEECH_DAT_LEN;
+
+ //Go back to fill the length in 1st 4 bytes in little-endian format
+ msg[0] = (Uint8)len;
+ msg[1] = (Uint8)(len>>8);
+ msg[2] = (Uint8)(len>>16);
+ msg[3] = (Uint8)(len>>24);
+
+ //Send to L1Proxy by calling L1Proxy callback function
+ sendDsp(msg,(len+4));
+ //TESTADDED
+ if (snk->prnt == CSU_TEST_PRINT_SNK_HANDLER_USED)
+ {
+ printf("csu_PassVoice:Write to GSM port:0x%02x,%08d\n",snk->gsmHandler,snk->wcnt);
+ snk->wcnt++;
+ }
+
+ break;
+
+ case CSU_RTP_PORT:
+ //Pass voice over to a RTP sink port
+ rtpParam param;
+ Uint8 pBuf[100];
+
+ if (peer->pidx > CSU_RTP_SNK_PORT_MAX)
+ {
+ csu_passDbg.Error("Invalid peer->pidx\n", peer->pidx);
+ return CSU_RESULT_FAILED;
+ }
+
+ snk = &csu_RtpSnkPort[peer->pidx];
+ csu_TblGetRtpParam(peer,&param,cd); //PR1352: cd added
+
+ //pBuf = GetPacketBufferFromFreePool();
+
+ //Check if play recorded speech to peer or real talk in buf
+ if (snk->test == CSU_TEST_PLAY_SPEECH_FROM_FILE_TO_SNK)
+ {
+ //Play recorded speech to the snk
+ memcpy(&pBuf[CSU_RTP_SPEECH_DAT_POS],&csu_playbuf[snk->ppos],
+ CSU_RTP_SPEECH_DAT_LEN);
+ snk->ppos += CSU_REC_SPEECH_DAT_LEN;
+ if (snk->ppos>=26400) snk->ppos = 0;
+ } else
+ {
+ //Play real talk to the snk
+ memcpy(&pBuf[CSU_RTP_SPEECH_DAT_POS],buf,CSU_RTP_SPEECH_DAT_LEN);
+ }
+
+ //PR1352: BEGIN
+ if (0xd0==cd) len = CSU_RTP_SPEECH_MSG_LEN;
+ else len = CSU_RTP_SPEECH_MSG_LENefr;
+ if (rtpWrite(snk->rtpHandler, pBuf, len, &param)<0)
+ //PR1352: END
+ {
+ csu_passDbg.Error("FAILED in calling rtpWrite/jcRtpWrite: rtpHandler=%x\n",
+ csu_RtpSnkPort[peer->pidx].rtpHandler);
+ return CSU_RESULT_FAILED;
+ }
+
+ //TESTADDED
+ if (snk->prnt == CSU_TEST_PRINT_SNK_HANDLER_USED)
+ {
+ printf("csu_PassVoice:Write to RTP port:0x%08x,%08d\n",snk->rtpHandler,snk->wcnt);
+ snk->wcnt++;
+ }
+
+ break;
+
+ default:
+ csu_passDbg.Error("Invalid sink port: type=%d\n",peer->type);
+ return CSU_RESULT_FAILED;
+ }
+
+ return CSU_RESULT_SUCCESS;
+ }
+
+ //Get parameters for rtpWrite from src RTP table
+
+ T_CSU_RESULT csu_TblGetRtpParam(T_CSU_SRC_PEER *peer, rtpParam *param, Uint8 cd)
+ {
+ //Mark start of MS->RTP speech
+ if ( peer->start )
+ {
+ param->marker = 1;
+ peer->start = 0;
+ }
+ else
+ param->marker = 0;
+
+ //DECIDEPT:
+ // param->payload = CSU_RTP_SPEECH_DAT_PAYLOAD;
+ if (0xd0==cd) param->payload = CSU_RTP_SPEECH_DAT_PAYLOAD;
+ else param->payload = CSU_RTP_SPEECH_DAT_PAYLOADefr;
+ // param->payload = peer->ldty;
+
+ param->sByte = CSU_RTP_SPEECH_DAT_PTSBYTE;
+
+ //Use global timestamp instead to match GW DSP dynamic jitter buffer design
+ //param->timestamp = peer->tick;
+ //peer->tick += CSU_RTP_SPEECH_DAT_RAT;
+
+ param->timestamp = csu_TimeStamp;
+
+ return CSU_RESULT_SUCCESS;
+ }
+
+
+ T_CSU_RESULT csu_TblGetSnk(T_CSU_PORT_ID *src, Uint8 *test,
+ Uint8 *count, T_CSU_SRC_PEER **peer)
+ {
+ Uint8 i,trx,slot;
+
+ //csu_passDbg.Error();
+
+ switch (src->portType)
+ {
+ case CSU_GSM_PORT:
+ trx = (Uint8)(src->portId.gsmHandler>>8);
+ slot = (Uint8)(src->portId.gsmHandler);
+
+ if (csu_GsmSrcPort[trx][slot].state != CSU_RESSTATE_USED ||
+ csu_GsmSrcPort[trx][slot].count == 0)
+ {
+ //csu_passDbg.Error("GSM src port (%d, %x) not engaged: state=%d, count=%d\n",
+ // src->portType, src->portId.gsmHandler,
+ // csu_GsmSrcPort[trx][slot].state,
+ // csu_GsmSrcPort[trx][slot].count);
+ return CSU_RESULT_NOT_RESSTATE_USED;
+ }
+ *test = csu_GsmSrcPort[trx][slot].test;
+ *count = csu_GsmSrcPort[trx][slot].count;
+ *peer = csu_GsmSrcPort[trx][slot].peer;
+ break;
+
+ case CSU_RTP_PORT:
+ for (i=0;i<CSU_RTP_SRC_PORT_MAX;i++)
+ {
+ if (csu_RtpSrcPort[i].state != CSU_RESSTATE_NULL &&
+ csu_RtpSrcPort[i].rtpHandler == src->portId.rtpHandler)
+ {
+ if (csu_RtpSrcPort[i].state == CSU_RESSTATE_USED &&
+ csu_RtpSrcPort[i].count != 0)
+ {
+ *test = csu_RtpSrcPort[i].test;
+ *count = csu_RtpSrcPort[i].count;
+ *peer = csu_RtpSrcPort[i].peer;
+ break;
+ } else
+ {
+ if (++csu_RtpSrcPort[i].nopr>=CSU_TRAFFIC_FLOW_6_SEC_COUNT)
+ {
+ csu_passDbg.Trace("FAILED in getting sink for rtp src (%x,%d,%d)\n",
+ csu_RtpSrcPort[i].rtpHandler,
+ CSU_RESULT_NOT_RESSTATE_USED,
+ csu_RtpSrcPort[i].nopr);
+ csu_RtpSrcPort[i].nopr=0;
+ //csu_GiveSemaphore();
+ }
+ return CSU_RESULT_NOT_RESSTATE_USED;
+ }
+ }
+ }
+ if (i>=CSU_RTP_SRC_PORT_MAX)
+ {
+ if (++csu_RtpSrcPort[i].nopr>=CSU_TRAFFIC_FLOW_6_SEC_COUNT)
+ {
+ csu_passDbg.Trace("FAILED in getting sink for rtp src (%x,%d,%d)\n",
+ csu_RtpSrcPort[i].rtpHandler,
+ CSU_RESULT_NOT_RESSTATE_USED,
+ csu_RtpSrcPort[i].nopr);
+ csu_RtpSrcPort[i].nopr=0;
+ }
+ return CSU_RESULT_RTP_HANDLER_NOT_FOUND;
+ }
+ break;
+
+ case CSU_ANN_PORT:
+ for (i=0;i<CSU_ANN_SRC_PORT_MAX;i++)
+ {
+ if (csu_AnnSrcPort[i].state != CSU_RESSTATE_NULL &&
+ csu_AnnSrcPort[i].annHandler == src->portId.annHandler)
+ {
+ if (csu_AnnSrcPort[i].state == CSU_RESSTATE_USED &&
+ csu_AnnSrcPort[i].count != 0)
+ {
+ *test = csu_AnnSrcPort[i].test;
+ *count = csu_AnnSrcPort[i].count;
+ *peer = csu_AnnSrcPort[i].peer;
+ break;
+ } else
+ {
+ if (++csu_AnnSrcPort[i].nopr>=CSU_TRAFFIC_FLOW_6_SEC_COUNT)
+ {
+ csu_passDbg.Trace("FAILED in getting sink for Ann src (%x,%d,%d)\n",
+ csu_AnnSrcPort[i].annHandler,
+ CSU_RESULT_NOT_RESSTATE_USED,
+ csu_AnnSrcPort[i].nopr);
+ csu_AnnSrcPort[i].nopr=0;
+ //csu_GiveSemaphore();
+ }
+ return CSU_RESULT_NOT_RESSTATE_USED;
+ }
+ }
+ }
+ if (i>=CSU_ANN_SRC_PORT_MAX)
+ {
+ if (++csu_AnnSrcPort[i].nopr>=CSU_TRAFFIC_FLOW_6_SEC_COUNT)
+ {
+ csu_passDbg.Trace("FAILED in getting sink for Ann src (%x,%d,%d)\n",
+ csu_AnnSrcPort[i].annHandler,
+ CSU_RESULT_NOT_RESSTATE_USED,
+ csu_AnnSrcPort[i].nopr);
+ csu_AnnSrcPort[i].nopr=0;
+ }
+ return CSU_RESULT_NOT_RESSTATE_USED;
+ }
+ break;
+
+ default:
+ //csu_passDbg.Error("Src port type unsupported: type=%d, id=%x\n",
+ // src->portType, src->portId.rtpHandler);
+ return CSU_RESULT_INVALID_PORT_TYPE;
+ }
+
+ return CSU_RESULT_SUCCESS;
+ }
+
+ #endif /*__CSU_PASS_CPP__*/
+
diff --git a/data/mnet/GP10/Host/CsuNew/src/csu_reg.cpp b/data/mnet/GP10/Host/CsuNew/src/csu_reg.cpp
new file mode 100644
index 0000000..7e6af17
--- /dev/null
+++ b/data/mnet/GP10/Host/CsuNew/src/csu_reg.cpp
@@ -0,0 +1,450 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+
+#ifndef __CSU_REG_CPP__
+#define __CSU_REG_CPP__
+
+#include "CsuNew\csu_head.h"
+
+//Register port as src port
+T_CSU_RESULT_REG csu_RegSrcPort(T_CSU_PORT_ID *port)
+{
+ Uint8 i,j,trx,slot;
+ Uint16 gsmHandler;
+ T_CSU_SRC_PORT *src;
+
+ DBG_FUNC("csu_RegSrcPort", CSU_LAYER);
+ DBG_ENTER();
+
+ switch(port->portType)
+ {
+ case CSU_GSM_PORT:
+ //Registering a GSM port
+ if (!rm_EntryIdToTrxSlot(port->portId.gsmHandler,&gsmHandler))
+ {
+ DBG_TRACE("FAILED in converting src entryId: entryId=%d,handler=%x\n",
+ port->portId.gsmHandler, gsmHandler);
+ return CSU_RESULT_REG_PORT_NOT_REGISTERED;
+ }
+
+ trx = (Uint8)(gsmHandler>>8); slot = (Uint8)(gsmHandler);
+ src = &csu_GsmSrcPort[trx][slot];
+ src->gsmHandler = gsmHandler;
+
+ //Do registration if proper
+ if ( CSU_RESULT_SUCCESS != csu_DoSrcPortReg(src) )
+ {
+ DBG_TRACE("FAILED in register GSM src port:entryId=%d, handler=%x\n",
+ port->portId.gsmHandler, gsmHandler);
+ return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+ break;
+
+ case CSU_RTP_PORT:
+ // Check if it is already registered
+ for (i=0;i<CSU_RTP_SRC_PORT_MAX;i++)
+ {
+ if (csu_RtpSrcPort[i].state != CSU_RESSTATE_NULL &&
+ csu_RtpSrcPort[i].rtpHandler==port->portId.rtpHandler)
+ {
+ DBG_TRACE("src RTP port already registered:handler=%x, state:%d\n",
+ port->portId.rtpHandler,csu_RtpSrcPort[i].state );
+
+ return CSU_RESULT_REG_PORT_ALREADY_REGISTERED;
+ }
+ }
+
+ // Not registered yet, do it now.
+ for (i=0;i<CSU_RTP_SRC_PORT_MAX;i++)
+ {
+ if (csu_RtpSrcPort[i].state == CSU_RESSTATE_NULL)
+ {
+ src = &csu_RtpSrcPort[i];
+ src->rtpHandler = port->portId.rtpHandler;
+
+ //Do registration here
+ if ( CSU_RESULT_SUCCESS != csu_DoSrcPortReg(src) )
+ {
+ DBG_TRACE("FAILED in register RTP src port:handler=%x\n",
+ port->portId.rtpHandler);
+ return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+ break;
+ }
+ }
+
+ //No more room left in src table to register the src port
+ if (i>=CSU_RTP_SRC_PORT_MAX)
+ {
+ DBG_TRACE("RTP src port table constraint:size=%d\n",CSU_RTP_SRC_PORT_MAX);
+ return CSU_RESULT_REG_PORT_REGISTER_OVERFLOW;
+ }
+ break;
+
+ case CSU_ANN_PORT:
+ for (i=0;i<CSU_ANN_SRC_PORT_MAX;i++)
+ {
+ if (csu_AnnSrcPort[i].state == CSU_RESSTATE_NULL)
+ {
+ src = &csu_AnnSrcPort[i];
+ src->annHandler = port->portId.annHandler;
+
+ //Do registration here
+ if ( CSU_RESULT_SUCCESS != csu_DoSrcPortReg(src) )
+ {
+ DBG_TRACE("FAILED in register ANN src port:handler=%x\n",
+ port->portId.annHandler);
+ return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+ break;
+ }
+ }
+
+ //No more room left in src table to register the src port
+ if (i>=CSU_ANN_SRC_PORT_MAX)
+ {
+ DBG_TRACE("ANN src port table constraint:size=%d\n",CSU_ANN_SRC_PORT_MAX);
+ return CSU_RESULT_REG_PORT_REGISTER_OVERFLOW;
+ }
+ break;
+
+ default:
+ DBG_TRACE("Registering an invalid src portType:%d\n", port->portType);
+ return CSU_RESULT_REG_PORT_TYPE_UNSUPPORTED;
+ }
+
+ return CSU_RESULT_REG_SUCCESS;
+}
+
+//Register port as snk port
+T_CSU_RESULT_REG csu_RegSnkPort(T_CSU_PORT_ID *port)
+{
+ Uint8 i,j,trx,slot;
+ Uint16 gsmHandler;
+ T_CSU_SNK_PORT *snk;
+
+ DBG_FUNC("csu_RegSnkPort", CSU_LAYER);
+ DBG_ENTER();
+
+ switch(port->portType)
+ {
+ case CSU_GSM_PORT:
+ //Registering a GSM port
+ if (!rm_EntryIdToTrxSlot(port->portId.gsmHandler,&gsmHandler))
+ {
+ DBG_TRACE("FAILED in converting snk entryId: entryId=%d,handler=%x\n",
+ port->portId.gsmHandler, gsmHandler);
+ return CSU_RESULT_REG_PORT_NOT_REGISTERED;
+ }
+
+ trx = (Uint8)(gsmHandler>>8); slot = (Uint8)(gsmHandler);
+ snk = &csu_GsmSnkPort[trx][slot];
+ snk->gsmHandler = gsmHandler;
+
+ //Do registration if proper
+ if ( CSU_RESULT_SUCCESS != csu_DoSnkPortReg(snk) )
+ {
+ DBG_TRACE("FAILED in register GSM snk port:entryId=%d, handler=%x\n",
+ port->portId.gsmHandler, gsmHandler);
+ return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+ break;
+
+ case CSU_RTP_PORT:
+ // Check if it is already registered
+ for (i=0;i<CSU_RTP_SNK_PORT_MAX;i++)
+ {
+ if (csu_RtpSnkPort[i].state != CSU_RESSTATE_NULL &&
+ csu_RtpSnkPort[i].rtpHandler==port->portId.rtpHandler)
+ {
+ DBG_TRACE("snk RTP port already registered:handler=%x, state:%d\n",
+ port->portId.rtpHandler,csu_RtpSnkPort[i].state );
+
+ return CSU_RESULT_REG_PORT_ALREADY_REGISTERED;
+ }
+ }
+
+ // Not registered yet, do it now.
+ for (i=0;i<CSU_RTP_SNK_PORT_MAX;i++)
+ {
+ if (csu_RtpSnkPort[i].state == CSU_RESSTATE_NULL)
+ {
+ snk = &csu_RtpSnkPort[i];
+ snk->rtpHandler = port->portId.rtpHandler;
+
+ //Do registration here
+ if ( CSU_RESULT_SUCCESS != csu_DoSnkPortReg(snk) )
+ {
+ DBG_TRACE("FAILED in register RTP snk port:handler=%x\n",
+ port->portId.rtpHandler);
+ return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+ break;
+ }
+ }
+
+ //No more room left in snk table to register the snk port
+ if (i>=CSU_RTP_SNK_PORT_MAX)
+ {
+ DBG_TRACE("RTP snk port table constraint:size=%d\n",CSU_RTP_SNK_PORT_MAX);
+ return CSU_RESULT_REG_PORT_REGISTER_OVERFLOW;
+ }
+ break;
+
+ //case CSU_ANN_PORT:
+
+ default:
+ DBG_TRACE("Registering an invalid snk portType:%d\n", port->portType);
+ return CSU_RESULT_REG_PORT_TYPE_UNSUPPORTED;
+ }
+
+ return CSU_RESULT_REG_SUCCESS;
+}
+
+#include "CsuNew\csu_head.h"
+
+//Register port as both src and snk port
+T_CSU_RESULT_REG csu_RegSrcSnkPort(T_CSU_PORT_ID *port)
+{
+ T_CSU_RESULT_REG ret;
+
+ DBG_FUNC("csu_RegSrcSnkPort", CSU_LAYER);
+ DBG_ENTER();
+
+ csu_TakeSemaphore();
+
+ //Register port as src port
+ if ( CSU_RESULT_REG_SUCCESS !=
+ (ret=csu_RegSrcPort(port)) )
+ {
+ DBG_TRACE("FAILED in register port as src port:typ=%d,handler=%x\n",
+ port->portType, port->portId.rtpHandler);
+ csu_GiveSemaphore();
+ return ret;
+ }
+
+ //Register port as snk port
+ if ( CSU_RESULT_REG_SUCCESS !=
+ (ret=csu_RegSnkPort(port)) )
+ {
+ DBG_TRACE("FAILED in register port as snk port:typ=%d,handler=%x\n",
+ port->portType, port->portId.rtpHandler);
+ csu_GiveSemaphore();
+
+ return ret;
+ }
+
+ csu_GiveSemaphore();
+
+ return CSU_RESULT_REG_SUCCESS;
+}
+
+//Unregister port as src port
+T_CSU_RESULT_REG csu_UnregSrcPort(T_CSU_PORT_ID *port)
+{
+ Uint8 i,j,trx,slot;
+ Uint16 gsmHandler;
+ T_CSU_SRC_PORT *src;
+
+ DBG_FUNC("csu_UnregSrcPort", CSU_LAYER);
+ DBG_ENTER();
+
+ switch(port->portType)
+ {
+ case CSU_GSM_PORT:
+ //Unregistering a GSM port
+ if (!rm_EntryIdToTrxSlot(port->portId.gsmHandler,&gsmHandler))
+ {
+ DBG_TRACE("FAILED in converting src entryId: entryId=%d,handler=%x\n",
+ port->portId.gsmHandler, gsmHandler);
+ return CSU_RESULT_REG_PORT_NOT_REGISTERED;
+ }
+
+ // Check if it's already registered
+ trx = (Uint8)(gsmHandler>>8); slot = (Uint8)(gsmHandler);
+
+ src = &csu_GsmSrcPort[trx][slot];
+ if ( CSU_RESULT_SUCCESS != csu_DoSrcPortUnreg(src) )
+ {
+ DBG_TRACE("FAILED in unreg GSM src port:entryId=%d,handler=%x\n",
+ port->portId.gsmHandler,gsmHandler);
+ return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+
+ break;
+
+ case CSU_RTP_PORT:
+ // Check if it is already registered
+ for (i=0;i<CSU_RTP_SRC_PORT_MAX;i++)
+ {
+ if (csu_RtpSrcPort[i].state != CSU_RESSTATE_NULL &&
+ csu_RtpSrcPort[i].rtpHandler==port->portId.rtpHandler)
+ {
+ src = &csu_RtpSrcPort[i];
+ break;
+ }
+ }
+
+ if (i>=CSU_RTP_SRC_PORT_MAX)
+ {
+ DBG_TRACE("RTP src port '%x' actually not registered\n",
+ port->portId.rtpHandler);
+ return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+
+ if ( CSU_RESULT_SUCCESS != csu_DoSrcPortUnreg(src) )
+ {
+ DBG_TRACE("FAILED in unreg RTP src port '%x'\n",
+ port->portId.rtpHandler);
+ return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+
+ break;
+
+ case CSU_ANN_PORT:
+ // Check if it is already registered
+ for (i=0;i<CSU_ANN_SRC_PORT_MAX;i++)
+ {
+ if (csu_AnnSrcPort[i].state != CSU_RESSTATE_NULL &&
+ csu_AnnSrcPort[i].annHandler==port->portId.annHandler)
+ {
+ src = &csu_AnnSrcPort[i];
+ break;
+ }
+ }
+
+ if (i>=CSU_ANN_SRC_PORT_MAX)
+ {
+ DBG_TRACE("ANN src port '%x' actually not registered\n",
+ port->portId.annHandler);
+ return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+
+ if ( CSU_RESULT_SUCCESS != csu_DoSrcPortUnreg(src) )
+ {
+ DBG_TRACE("FAILED in unreg ANN src port '%x'\n",
+ port->portId.annHandler);
+ return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+
+ break;
+
+ default:
+ DBG_TRACE("Unregistering an invalid src portType:%d\n",
+ port->portType);
+ return CSU_RESULT_REG_PORT_TYPE_UNSUPPORTED;
+ }
+
+ return CSU_RESULT_REG_SUCCESS;
+}
+
+
+//Unregister port as snk port
+T_CSU_RESULT_REG csu_UnregSnkPort(T_CSU_PORT_ID *port)
+{
+ Uint8 i,j,trx,slot;
+ Uint16 gsmHandler;
+ T_CSU_SNK_PORT *snk;
+
+ DBG_FUNC("csu_UnregSnkPort", CSU_LAYER);
+ DBG_ENTER();
+
+ switch(port->portType)
+ {
+ case CSU_GSM_PORT:
+ //Unregistering a GSM port
+ if (!rm_EntryIdToTrxSlot(port->portId.gsmHandler,&gsmHandler))
+ {
+ DBG_TRACE("FAILED in converting snk entryId: entryId=%d,handler=%x\n",
+ port->portId.gsmHandler, gsmHandler);
+ return CSU_RESULT_REG_PORT_NOT_REGISTERED;
+ }
+
+ // Check if it's already registered
+ trx = (Uint8)(gsmHandler>>8); slot = (Uint8)(gsmHandler);
+
+ snk = &csu_GsmSnkPort[trx][slot];
+ if ( CSU_RESULT_SUCCESS != csu_DoSnkPortUnreg(snk) )
+ {
+ DBG_TRACE("FAILED in unreg GSM snk port:entryId=%d,handler=%x\n",
+ port->portId.gsmHandler,gsmHandler);
+ return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+
+ break;
+
+ case CSU_RTP_PORT:
+ // Check if it is already registered
+ for (i=0;i<CSU_RTP_SNK_PORT_MAX;i++)
+ {
+ if (csu_RtpSnkPort[i].state != CSU_RESSTATE_NULL &&
+ csu_RtpSnkPort[i].rtpHandler==port->portId.rtpHandler)
+ {
+ snk = &csu_RtpSnkPort[i];
+ break;
+ }
+ }
+
+ if (i>=CSU_RTP_SNK_PORT_MAX)
+ {
+ DBG_TRACE("RTP snk port '%x' actually not registered\n",
+ port->portId.rtpHandler);
+ return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+
+ if ( CSU_RESULT_SUCCESS != csu_DoSnkPortUnreg(snk) )
+ {
+ DBG_TRACE("FAILED in unreg RTP snk port '%x'\n",
+ port->portId.rtpHandler);
+ return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+
+ break;
+
+ //case CSU_ANN_PORT:
+
+ default:
+ DBG_TRACE("Unregistering an invalid snk portType:%d\n",
+ port->portType);
+ return CSU_RESULT_REG_PORT_TYPE_UNSUPPORTED;
+ }
+
+ return CSU_RESULT_REG_SUCCESS;
+}
+
+//Unregister port as both src and snk port
+T_CSU_RESULT_REG csu_UnregSrcSnkPort(T_CSU_PORT_ID *port)
+{
+ T_CSU_RESULT_REG ret;
+
+ DBG_FUNC("csu_UnregSrcSnkPort", CSU_LAYER);
+ DBG_ENTER();
+
+ //Unregister port as source port
+ if ( CSU_RESULT_REG_SUCCESS !=
+ (ret=csu_UnregSrcPort(port)) )
+ {
+ DBG_TRACE("FAILED in unreg port (%d,%x) as src port\n",
+ port->portType, port->portId.rtpHandler);
+ return ret;
+ }
+
+ //Unregister port as sink port
+ if ( CSU_RESULT_REG_SUCCESS !=
+ (ret=csu_UnregSnkPort(port)) )
+ {
+ DBG_TRACE("FAILED in unreg port (%d,%x) as snk port\n",
+ port->portType, port->portId.rtpHandler);
+ return ret;
+ }
+
+ return CSU_RESULT_REG_SUCCESS;
+}
+
+#endif /*__CSU_REG_CPP__*/
diff --git a/data/mnet/GP10/Host/CsuNew/src/csu_rutil.cpp b/data/mnet/GP10/Host/CsuNew/src/csu_rutil.cpp
new file mode 100644
index 0000000..3a656c7
--- /dev/null
+++ b/data/mnet/GP10/Host/CsuNew/src/csu_rutil.cpp
@@ -0,0 +1,166 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+
+#ifndef __CSU_RUTIL_CPP__
+#define __CSU_RUTIL_CPP__
+
+#include "CsuNew\csu_head.h"
+
+//Update src port in src port table as registered
+T_CSU_RESULT csu_DoSrcPortReg(T_CSU_SRC_PORT *src)
+{
+ Uint8 i;
+
+ DBG_FUNC("csu_DoSrcPortReg", CSU_LAYER);
+ DBG_ENTER();
+
+ if (src->state != CSU_RESSTATE_NULL)
+ {
+ DBG_TRACE("src port already registered (%d,%x)\n",
+ src->type, src->rtpHandler);
+ return CSU_RESULT_SUCCESS;
+ } else
+ {
+ // Not registered yet, do it now
+ src->state = CSU_RESSTATE_FREE;
+ src->resvd = CSU_RESSTATE_IGNORE;
+ src->count = 0;
+ src->test = CSU_TEST_FUNC_NULL;
+
+ for (i=0;i<CSU_PEER_PORT_MAX;i++)
+ {
+ src->peer[i].type = CSU_NIL_PORT;
+ src->peer[i].pidx = CSU_PEER_PORT_NULL;
+ src->peer[i].ppos = 0;
+ }
+
+ DBG_TRACE("Registering src port (%d,%x) successful\n",
+ src->type, src->rtpHandler);
+
+ return CSU_RESULT_SUCCESS;
+ }
+}
+
+//Update snk port in snk port table as registered
+T_CSU_RESULT csu_DoSnkPortReg(T_CSU_SNK_PORT *snk)
+{
+ Uint8 i;
+
+ DBG_FUNC("csu_DoSnkPortReg", CSU_LAYER);
+ DBG_ENTER();
+
+ if (snk->state != CSU_RESSTATE_NULL)
+ {
+ DBG_TRACE("snk port already registered (%d,%x)\n",
+ snk->type, snk->rtpHandler);
+ return CSU_RESULT_SUCCESS;
+ } else
+ {
+ // Not registered yet, do it now
+ snk->state = CSU_RESSTATE_FREE;
+ snk->resvd = CSU_RESSTATE_IGNORE;
+ snk->count = 0;
+ snk->test = CSU_TEST_FUNC_NULL;
+
+ for (i=0;i<CSU_PEER_PORT_MAX;i++)
+ {
+ snk->peer[i].type = CSU_NIL_PORT;
+ snk->peer[i].pidx = CSU_PEER_PORT_NULL;
+ }
+
+ DBG_TRACE("Registering snk port (%d,%x) successful\n",
+ snk->type, snk->rtpHandler);
+
+ return CSU_RESULT_SUCCESS;
+ }
+}
+
+
+T_CSU_RESULT csu_DoSrcPortUnreg(T_CSU_SRC_PORT *src)
+{
+ DBG_FUNC("csu_DoSrcPortPort", CSU_LAYER);
+ DBG_ENTER();
+
+ if (src->state == CSU_RESSTATE_NULL)
+ {
+ DBG_TRACE("src port (%d,%x) actually not registered\n",
+ src->type, src->rtpHandler);
+ return CSU_RESULT_SUCCESS;
+ }
+ else if (src->state == CSU_RESSTATE_USED)
+ {
+ // Currently engaged in calls, record and unreg later
+ src->resvd = CSU_RESSTATE_NULL;
+ DBG_TRACE("Unregister src port (%d,%x) pending on call\n",
+ src->type, src->rtpHandler);
+ return CSU_RESULT_SUCCESS;
+ } else
+ {
+ // Port free,unregister it now
+ src->state = CSU_RESSTATE_NULL;
+ src->resvd = CSU_RESSTATE_IGNORE;
+ src->count = 0;
+ src->test = CSU_TEST_FUNC_NULL;
+
+ for (int i=0;i<CSU_PEER_PORT_MAX;i++)
+ {
+ src->peer[i].type = CSU_NIL_PORT;
+ src->peer[i].pidx = CSU_PEER_PORT_NULL;
+ src->peer[i].ppos = 0;
+ }
+
+ DBG_TRACE("Unregister src port:type=%d,handler=%x successful\n",
+ src->type,src->rtpHandler);
+
+ return CSU_RESULT_SUCCESS;
+ }
+}
+
+
+T_CSU_RESULT csu_DoSnkPortUnreg(T_CSU_SNK_PORT *snk)
+{
+ DBG_FUNC("csu_DoSnkPortPort", CSU_LAYER);
+ DBG_ENTER();
+
+ if (snk->state == CSU_RESSTATE_NULL)
+ {
+ DBG_TRACE("snk port (%d,%x) actually not registered\n",
+ snk->type, snk->rtpHandler);
+ return CSU_RESULT_SUCCESS;
+ }
+ else if (snk->state == CSU_RESSTATE_USED)
+ {
+ // Currently engaged in calls, record and unreg later
+ snk->resvd = CSU_RESSTATE_NULL;
+ DBG_TRACE("Unregister snk port (%d,%x) pending on call\n",
+ snk->type, snk->rtpHandler);
+ return CSU_RESULT_SUCCESS;
+ } else
+ {
+ // Port free,unregister it now
+ snk->state = CSU_RESSTATE_NULL;
+ snk->resvd = CSU_RESSTATE_IGNORE;
+ snk->count = 0;
+ snk->test = CSU_TEST_FUNC_NULL;
+
+
+ for (int i=0;i<CSU_PEER_PORT_MAX;i++)
+ {
+ snk->peer[i].type = CSU_NIL_PORT;
+ snk->peer[i].pidx = CSU_PEER_PORT_NULL;
+ }
+
+ DBG_TRACE("Unregister snk port:type=%d,handler=%x successful\n",
+ snk->type,snk->rtpHandler);
+
+ return CSU_RESULT_SUCCESS;
+ }
+}
+
+#endif /*__CSU_RUTIL_CPP__*/
diff --git a/data/mnet/GP10/Host/CsuNew/src/csu_sema.cpp b/data/mnet/GP10/Host/CsuNew/src/csu_sema.cpp
new file mode 100644
index 0000000..2427d29
--- /dev/null
+++ b/data/mnet/GP10/Host/CsuNew/src/csu_sema.cpp
@@ -0,0 +1,37 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __CSU_SEMA_CPP__
+#define __CSU_SEMA_CPP__
+
+#include "CsuNew\csu_head.h"
+
+void csu_CreateSemaphore(void)
+{
+ DBG_FUNC("csu_CreateSemaphore", CSU_LAYER);
+ // DBG_ENTER();
+
+ csu_SemaId = semMCreate(SEM_Q_PRIORITY|SEM_INVERSION_SAFE);
+ if (csu_SemaId == NULL)
+ DBG_ERROR("ERROR@csu_CreateSemaphore: semMCreate failed\n");
+}
+
+void csu_TakeSemaphore(void)
+{
+ semTake(csu_SemaId,WAIT_FOREVER);
+}
+
+void csu_GiveSemaphore(void)
+{
+ semGive(csu_SemaId);
+}
+
+#endif //__CSU_SEMA_CPP__
+
+
+
diff --git a/data/mnet/GP10/Host/CsuNew/src/csu_table.cpp b/data/mnet/GP10/Host/CsuNew/src/csu_table.cpp
new file mode 100644
index 0000000..b3ac42e
--- /dev/null
+++ b/data/mnet/GP10/Host/CsuNew/src/csu_table.cpp
@@ -0,0 +1,189 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+
+#ifndef __CSU_TABLE_CPP__
+#define __CSU_TABLE_CPP__
+
+#include "CsuNew\csu_head.h"
+
+extern DbgOutput csu_passDbg;
+extern DbgOutput csu_testDbg;
+
+//Initialize GSM src port table
+void csu_TblInitGsmSrcPort(void)
+{
+ Uint8 i,j,k;
+
+ DBG_FUNC("csu_TblInitGsmSrcPort", CSU_LAYER);
+ DBG_ENTER();
+
+ //Initialize GSM src trunk resource
+ for (i=0;i<CSU_GSM_SRC_TRX_MAX;i++)
+ for (j=0;j<CSU_GSM_SRC_SLOT_MAX;j++)
+ {
+ csu_GsmSrcPort[i][j].state = CSU_RESSTATE_NULL;
+ csu_GsmSrcPort[i][j].resvd = CSU_RESSTATE_IGNORE;
+ csu_GsmSrcPort[i][j].count = 0;
+ csu_GsmSrcPort[i][j].nopr = 0;
+ csu_GsmSrcPort[i][j].test = CSU_TEST_FUNC_NULL;
+
+ csu_GsmSrcPort[i][j].type = CSU_GSM_PORT;
+ csu_GsmSrcPort[i][j].limit = CSU_SRC_CONN_MAX;
+ csu_GsmSrcPort[i][j].gsmHandler = (Uint16)((i<<8)|j);
+ for (k=0;k<CSU_PEER_PORT_MAX;k++)
+ {
+ csu_GsmSrcPort[i][j].peer[k].type = CSU_NIL_PORT;
+ csu_GsmSrcPort[i][j].peer[k].pidx = CSU_PEER_PORT_NULL;
+ }
+ }
+}
+
+//Initialize ANN src port table
+void csu_TblInitAnnSrcPort(void)
+{
+ Uint8 i,k;
+
+ DBG_FUNC("csu_TblInitAnnSrcPort", CSU_LAYER);
+ DBG_ENTER();
+
+ //Initialize ANN src trunk resource
+ for (i=0;i<CSU_ANN_SRC_PORT_MAX;i++)
+ {
+ csu_AnnSrcPort[i].state = CSU_RESSTATE_NULL;
+ csu_AnnSrcPort[i].resvd = CSU_RESSTATE_IGNORE;
+ csu_AnnSrcPort[i].count = 0;
+ csu_AnnSrcPort[i].nopr = 0;
+ csu_AnnSrcPort[i].test = CSU_TEST_FUNC_NULL;
+
+ csu_AnnSrcPort[i].type = CSU_ANN_PORT;
+ csu_AnnSrcPort[i].limit = CSU_SRC_CONN_MAX;
+ csu_AnnSrcPort[i].annHandler = (T_CSU_ANN_ID)0;
+ for (k=0;k<CSU_PEER_PORT_MAX;k++)
+ {
+ csu_AnnSrcPort[i].peer[k].type = CSU_NIL_PORT;
+ csu_AnnSrcPort[i].peer[k].pidx = CSU_PEER_PORT_NULL;
+ csu_AnnSrcPort[i].peer[k].ppos = 0;
+
+ }
+ }
+}
+
+//Initialize RTP src port table
+void csu_TblInitRtpSrcPort(void)
+{
+ Uint8 i,j;
+
+ DBG_FUNC("csu_TblInitRtpSrcPort", CSU_LAYER);
+ DBG_ENTER();
+
+ //Initialize RTP src trunk resource
+ for (i=0;i<CSU_RTP_SRC_PORT_MAX;i++)
+ {
+ csu_RtpSrcPort[i].state = CSU_RESSTATE_NULL;
+ csu_RtpSrcPort[i].resvd = CSU_RESSTATE_IGNORE;
+ csu_RtpSrcPort[i].count = 0;
+ csu_RtpSrcPort[i].nopr = 0;
+ csu_RtpSrcPort[i].test = CSU_TEST_FUNC_NULL;
+
+ csu_RtpSrcPort[i].type = CSU_RTP_PORT;
+ csu_RtpSrcPort[i].limit = CSU_SRC_CONN_MAX;
+ csu_RtpSrcPort[i].rtpHandler = (HRTPSESSION)0;
+ for (j=0;j<CSU_PEER_PORT_MAX;j++)
+ {
+ csu_RtpSrcPort[i].peer[j].type = CSU_NIL_PORT;
+ csu_RtpSrcPort[i].peer[j].pidx = CSU_PEER_PORT_NULL;
+ }
+ }
+}
+
+//Initialize GSM snk port table
+void csu_TblInitGsmSnkPort(void)
+{
+ Uint8 i,j,k;
+
+ DBG_FUNC("csu_TblInitGsmSnkPort", CSU_LAYER);
+ DBG_ENTER();
+
+ //Initialize GSM snk trunk resource
+ for (i=0;i<CSU_GSM_SNK_TRX_MAX;i++)
+ for (j=0;j<CSU_GSM_SNK_SLOT_MAX;j++)
+ {
+ csu_GsmSnkPort[i][j].state = CSU_RESSTATE_NULL;
+ csu_GsmSnkPort[i][j].resvd = CSU_RESSTATE_IGNORE;
+ csu_GsmSnkPort[i][j].count = 0;
+ csu_GsmSnkPort[i][j].nopr = 0;
+
+ csu_GsmSrcPort[i][j].test = CSU_TEST_FUNC_NULL;
+
+ csu_GsmSnkPort[i][j].type = CSU_GSM_PORT;
+ csu_GsmSnkPort[i][j].limit = 1; //TBD CSU_SNK_CONN_MAX;
+ csu_GsmSnkPort[i][j].gsmHandler = (Uint16)((i<<8)|j);
+ for (k=0;k<CSU_PEER_PORT_MAX;k++)
+ {
+ csu_GsmSnkPort[i][j].peer[k].type = CSU_NIL_PORT;
+ csu_GsmSnkPort[i][j].peer[k].pidx = CSU_PEER_PORT_NULL;
+ }
+ }
+}
+
+//Initialize RTP snk port table
+void csu_TblInitRtpSnkPort(void)
+{
+ Uint8 i,j;
+
+ DBG_FUNC("csu_TblInitRtpSnkPort", CSU_LAYER);
+ DBG_ENTER();
+
+ //Initialize RTP snk trunk resource
+ for (i=0;i<CSU_RTP_SNK_PORT_MAX;i++)
+ {
+ csu_RtpSnkPort[i].state = CSU_RESSTATE_NULL;
+ csu_RtpSnkPort[i].resvd = CSU_RESSTATE_IGNORE;
+ csu_RtpSnkPort[i].count = 0;
+ csu_RtpSnkPort[i].nopr = 0;
+ csu_RtpSnkPort[i].test = CSU_TEST_FUNC_NULL;
+
+ csu_RtpSnkPort[i].type = CSU_RTP_PORT;
+ csu_RtpSnkPort[i].limit = 1; //TBD CSU_SNK_CONN_MAX;
+ csu_RtpSnkPort[i].rtpHandler = (HRTPSESSION)0;
+ for (j=0;j<CSU_PEER_PORT_MAX;j++)
+ {
+ csu_RtpSnkPort[i].peer[j].type = CSU_NIL_PORT;
+ csu_RtpSnkPort[i].peer[j].pidx = CSU_PEER_PORT_NULL;
+ }
+ }
+}
+
+
+//Initialize the whole connection resources
+void csu_TblInitAll(void)
+{
+ DBG_FUNC("csu_TblInitAll", CSU_LAYER);
+ DBG_ENTER();
+
+ csu_TakeSemaphore();
+
+ csu_TblInitRtpSrcPort();
+ csu_TblInitRtpSnkPort();
+ csu_TblInitGsmSrcPort();
+ csu_TblInitGsmSnkPort();
+ csu_TblInitAnnSrcPort();
+
+
+ csu_GiveSemaphore();
+
+ //Init Ann resources here later
+
+ // Initialize the global DbgOutput object used for ViperLog traces
+ // in the csu_pass.cpp file.
+ csu_passDbg.Func("csu_pass.cpp",CSU_LAYER_SPEECH);
+ csu_testDbg.Func("csu_test.cpp",CSU_LAYER_DEBUG);
+}
+
+#endif /*__CSU_TABLE_CPP__*/
diff --git a/data/mnet/GP10/Host/CsuNew/src/csu_test.cpp b/data/mnet/GP10/Host/CsuNew/src/csu_test.cpp
new file mode 100644
index 0000000..766b4a8
--- /dev/null
+++ b/data/mnet/GP10/Host/CsuNew/src/csu_test.cpp
@@ -0,0 +1,4393 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+
+#ifndef __CSU_TEST_CPP__
+#define __CSU_TEST_CPP__
+
+#include "CsuNew\csu_head.h"
+#include "rm\debug.h"
+
+/************* PLEASE DO NOT MODIFY !!! ************************************************/
+unsigned char FR_AnnFile[] = {
+0xd2, 0x6e, 0xe7, 0x25, 0xea, 0xb6, 0xc6, 0x50, 0xac, 0x90, 0xa9, 0x65,
+0xd8, 0xa4, 0xa7, 0x24, 0xa8, 0x3b, 0xe0, 0xb5, 0x65, 0x18, 0xe2, 0xc7,
+0xaa, 0xb1, 0xd9, 0xa6, 0x53, 0x2f, 0x14, 0x4d, 0x4b, 0xd2, 0x6f, 0xdd,
+0x65, 0x5b, 0x59, 0x26, 0xe3, 0x04, 0xbd, 0x42, 0xe6, 0xda, 0xc5, 0xf5,
+0x0d, 0x95, 0xa7, 0x72, 0x86, 0xc7, 0x15, 0xa5, 0x66, 0x4b, 0x18, 0x8d,
+0x08, 0x67, 0x63, 0x15, 0xe6, 0x8d, 0xd2, 0x6b, 0xe5, 0xe5, 0xe3, 0xa1,
+0x8a, 0x6b, 0x04, 0x7a, 0x23, 0x5d, 0x5d, 0x25, 0xa1, 0xd4, 0x4a, 0xd5,
+0x4a, 0xa4, 0xe6, 0x34, 0x6d, 0xc8, 0xbb, 0xe1, 0xe4, 0x86, 0x87, 0x7d,
+0x25, 0xed, 0x48, 0xd2, 0x6e, 0xee, 0x66, 0x2a, 0x91, 0x27, 0xf9, 0x42,
+0x5e, 0x48, 0xb3, 0x75, 0x46, 0xc8, 0x5f, 0x16, 0xaa, 0xe4, 0xba, 0xa7,
+0x45, 0xca, 0xb6, 0x50, 0xa6, 0xe2, 0xe5, 0x20, 0xef, 0x81, 0x1b, 0xe3,
+0xd2, 0x6d, 0xdf, 0xae, 0x6b, 0x71, 0x87, 0x89, 0x6c, 0x49, 0x69, 0x4b,
+0x66, 0xe7, 0xcb, 0x60, 0x8f, 0x3c, 0x32, 0x8b, 0x27, 0xb5, 0xe5, 0x0d,
+0xe7, 0x03, 0x74, 0xa7, 0xb9, 0x99, 0x76, 0x70, 0x2d, 0xd2, 0x6f, 0xdf,
+0x69, 0x23, 0xe6, 0xc6, 0xf0, 0x25, 0xcc, 0x0b, 0xbb, 0xad, 0x46, 0x03,
+0x6c, 0x84, 0xbd, 0x31, 0xd7, 0x66, 0xbb, 0x82, 0xcb, 0x28, 0x7a, 0x69,
+0x45, 0x8f, 0x1c, 0x0b, 0xdc, 0x50, 0xd2, 0x6d, 0xed, 0x69, 0x9b, 0x72,
+0x86, 0x77, 0x4b, 0x7d, 0xd4, 0xa6, 0xb6, 0xa6, 0x68, 0x95, 0xb5, 0x07,
+0xec, 0xdc, 0x88, 0x33, 0x35, 0x68, 0xeb, 0xa0, 0x65, 0x88, 0x95, 0xad,
+0x0d, 0x69, 0x0b, 0xd2, 0x6d, 0xe5, 0xa9, 0x2b, 0x68, 0xe5, 0xe4, 0x2b,
+0xa6, 0x2c, 0x99, 0xac, 0xa6, 0xe5, 0xc2, 0x76, 0xd0, 0xa7, 0xc2, 0x85,
+0x78, 0x14, 0xfc, 0x95, 0x7e, 0x87, 0x25, 0x11, 0xb7, 0x64, 0x6b, 0xa0,
+0xd2, 0x6d, 0xe6, 0x2e, 0x24, 0x67, 0xe6, 0x39, 0x29, 0x66, 0xa8, 0x98,
+0x51, 0x27, 0xb6, 0x57, 0x94, 0x2f, 0x93, 0xa1, 0x24, 0x61, 0xc5, 0xb9,
+0x72, 0xed, 0xc4, 0x87, 0xd8, 0x54, 0xd9, 0x83, 0x3d, 0xd2, 0x72, 0xee,
+0xb2, 0x23, 0xad, 0x48, 0xa1, 0x26, 0xa0, 0xbb, 0xea, 0x51, 0x6a, 0xbb,
+0xa8, 0x4f, 0x68, 0x12, 0xd9, 0xa8, 0xaf, 0x8c, 0x33, 0x54, 0x8e, 0xb1,
+0x08, 0x7b, 0x02, 0x7d, 0xf2, 0xd5, 0xd2, 0x72, 0xed, 0xea, 0x23, 0x92,
+0x88, 0x38, 0x24, 0x95, 0xa6, 0xe5, 0xdc, 0xe5, 0x18, 0xfc, 0x85, 0x2f,
+0x91, 0xdd, 0x69, 0x3b, 0x30, 0x8b, 0x48, 0x62, 0x6b, 0x27, 0x5f, 0x4c,
+0x32, 0xb8, 0xcc, 0xd2, 0x6e, 0xd5, 0x6d, 0x5c, 0x94, 0xa8, 0x61, 0x0c,
+0xb1, 0x45, 0x23, 0x96, 0x82, 0x5c, 0x87, 0x78, 0x85, 0xfa, 0xda, 0x86,
+0x25, 0x25, 0x69, 0x5b, 0x20, 0x87, 0xe8, 0x3b, 0x98, 0x8b, 0xc8, 0x69,
+0xd2, 0x6c, 0xe5, 0xa9, 0xa3, 0x5d, 0x28, 0xe8, 0x85, 0x7d, 0x08, 0xe6,
+0x5b, 0x07, 0xa1, 0xe4, 0xa5, 0xfb, 0x12, 0xe6, 0xc5, 0x70, 0xdc, 0xd0,
+0x99, 0xba, 0xe4, 0xa6, 0x07, 0x3e, 0x45, 0x6f, 0x81, 0xd2, 0x6c, 0xde,
+0xad, 0xeb, 0x67, 0xe8, 0x47, 0x20, 0xae, 0x48, 0x70, 0x69, 0x48, 0x96,
+0xe5, 0x4d, 0xdc, 0xd0, 0xa2, 0x86, 0xd3, 0xe9, 0x6e, 0x76, 0xd3, 0xe6,
+0xc6, 0x72, 0x9d, 0xd0, 0x19, 0xfa, 0xd2, 0x72, 0xee, 0x6e, 0x23, 0xac,
+0xc7, 0x97, 0x73, 0x69, 0x3b, 0xe1, 0x93, 0xc8, 0x49, 0x72, 0x4d, 0x6e,
+0x21, 0x69, 0x29, 0x3f, 0x92, 0x33, 0x56, 0xc4, 0x8d, 0x27, 0x67, 0xc2,
+0x77, 0x50, 0x95, 0xd2, 0x71, 0xe6, 0x26, 0x23, 0x96, 0x86, 0x36, 0x26,
+0xad, 0x27, 0xab, 0xba, 0xe5, 0x9b, 0x6c, 0x82, 0x4f, 0x10, 0xdc, 0xe8,
+0x2d, 0x68, 0xab, 0xd8, 0x5a, 0x66, 0xa6, 0xdf, 0x8c, 0x13, 0xd6, 0xc5,
+0xd2, 0x6e, 0xde, 0x21, 0x63, 0x92, 0x87, 0x73, 0x92, 0x8d, 0x64, 0xdb,
+0xdc, 0xa3, 0xf2, 0x8e, 0x98, 0x17, 0xb3, 0xdb, 0x26, 0x99, 0x5d, 0x42,
+0x37, 0xc1, 0xd7, 0x88, 0x47, 0xa1, 0x39, 0xf2, 0x9e, 0xd2, 0x6d, 0xdd,
+0xe9, 0x2a, 0x60, 0x88, 0x79, 0x44, 0x52, 0xb3, 0x8e, 0x8b, 0x05, 0x7d,
+0xd8, 0x3b, 0xe2, 0x16, 0xe4, 0xc6, 0x51, 0x56, 0xb0, 0x29, 0xea, 0xe6,
+0x85, 0x95, 0x3f, 0x44, 0xed, 0x80, 0xd2, 0x6c, 0xe6, 0x6d, 0xeb, 0x73,
+0x08, 0xed, 0x49, 0x3e, 0xd0, 0x9f, 0x68, 0xe7, 0x28, 0x75, 0x31, 0x3e,
+0xc2, 0xa4, 0xa8, 0x55, 0xd2, 0x95, 0xe2, 0xa6, 0x66, 0x86, 0xc8, 0x13,
+0xf5, 0xa3, 0x3c, 0xd2, 0x71, 0xe6, 0xee, 0x2b, 0xac, 0xa8, 0x24, 0xf5,
+0x88, 0x39, 0xea, 0xb3, 0xa8, 0x41, 0x3d, 0x2c, 0xcf, 0x82, 0x6b, 0x28,
+0xdb, 0xcb, 0x53, 0x39, 0x0c, 0x92, 0xa7, 0x71, 0x83, 0xd9, 0xd0, 0x76,
+0xd2, 0x71, 0xed, 0xe5, 0xa3, 0xb6, 0xa5, 0xe6, 0x16, 0x94, 0x87, 0x6c,
+0x90, 0xc4, 0x93, 0x2f, 0x41, 0x2d, 0xd9, 0xd9, 0x46, 0x37, 0x71, 0x89,
+0xdc, 0x30, 0x51, 0x0a, 0x6b, 0x43, 0x7a, 0xb2, 0xde, 0xd2, 0x6f, 0xed,
+0x61, 0x9a, 0x6c, 0x86, 0x71, 0x0c, 0x75, 0x33, 0x95, 0xb8, 0x23, 0xd4,
+0xd5, 0xd4, 0x05, 0xfc, 0xb9, 0x26, 0x89, 0x2d, 0x69, 0x4b, 0x61, 0xd9,
+0xa6, 0x49, 0xba, 0x2a, 0xe4, 0x1c, 0xd2, 0x71, 0xdd, 0x25, 0xaa, 0x68,
+0xc5, 0xfa, 0x43, 0x5b, 0x08, 0x9c, 0x92, 0xa4, 0xe1, 0xc4, 0xb1, 0xe0,
+0xa6, 0xe4, 0xc4, 0xb3, 0x1f, 0x8c, 0xb7, 0xf3, 0xe4, 0xa5, 0x25, 0x3e,
+0x44, 0xcf, 0xd0, 0xd2, 0x6d, 0xe6, 0xe6, 0x63, 0x6d, 0x87, 0x99, 0x1b,
+0x19, 0xc8, 0xd7, 0x67, 0x27, 0xcb, 0x26, 0x51, 0xc9, 0x82, 0x98, 0xa6,
+0xd3, 0xd3, 0x75, 0xf2, 0x9d, 0xde, 0xc5, 0xe4, 0x5e, 0xb0, 0x87, 0xf3,
+0xd2, 0x35, 0xe5, 0xf2, 0x2a, 0xda, 0x86, 0x94, 0xe5, 0x80, 0xe8, 0xd8,
+0xa9, 0x87, 0xac, 0xa3, 0x37, 0x28, 0x97, 0x63, 0x4a, 0xa4, 0xd7, 0x8d,
+0x29, 0xa3, 0x66, 0xe8, 0x3d, 0x91, 0x73, 0xb4, 0xa4, 0xd2, 0x73, 0xed,
+0xe2, 0x22, 0xa8, 0xc3, 0xf0, 0x1f, 0x88, 0xab, 0x9c, 0xee, 0x83, 0xa4,
+0xec, 0xb0, 0xb3, 0xfa, 0x8f, 0xe4, 0xab, 0xb8, 0x83, 0x7a, 0x99, 0x6b,
+0x26, 0x7b, 0x43, 0x37, 0x38, 0x94, 0xd2, 0x6e, 0xed, 0x61, 0x62, 0xb6,
+0xa6, 0xe1, 0x45, 0xb0, 0xd3, 0x5c, 0xde, 0xa3, 0xc5, 0x56, 0x50, 0xb7,
+0xe2, 0xd8, 0xa4, 0x25, 0x1f, 0x69, 0xad, 0x98, 0x6d, 0x87, 0xcb, 0x23,
+0x1d, 0xd8, 0xcf, 0xd2, 0x6f, 0xec, 0xe5, 0xaa, 0x8b, 0xa6, 0xcb, 0x0d,
+0x2e, 0xc7, 0x03, 0x8a, 0x83, 0xf7, 0x4a, 0x5a, 0x60, 0x57, 0xc0, 0xc4,
+0x43, 0x55, 0xb1, 0x25, 0xf2, 0xe4, 0xa4, 0x95, 0x36, 0x61, 0xcd, 0xd0,
+0xd2, 0x73, 0xe5, 0x6e, 0x2a, 0x6d, 0xe5, 0x57, 0x20, 0xc6, 0x68, 0x59,
+0x69, 0x28, 0x3d, 0xd2, 0x13, 0xe6, 0x8b, 0x6a, 0xa7, 0xf7, 0x03, 0xb6,
+0xc2, 0xdd, 0xb8, 0x83, 0xd6, 0x1d, 0xd5, 0xa5, 0x75, 0xd2, 0x71, 0xe6,
+0x71, 0xab, 0xda, 0xa3, 0xc4, 0x8f, 0xc4, 0x99, 0xf1, 0xb7, 0x85, 0x34,
+0xde, 0x18, 0xcc, 0xcc, 0x8f, 0xe6, 0x3c, 0x3b, 0x53, 0x9c, 0x59, 0x6c,
+0xa6, 0x75, 0x84, 0xb6, 0xd0, 0xdc, 0xd2, 0x70, 0xe6, 0xe5, 0xea, 0x72,
+0xe4, 0xc3, 0x26, 0x8c, 0x29, 0xa3, 0xda, 0xa4, 0x85, 0x1d, 0xa4, 0xb9,
+0xe1, 0xb5, 0x84, 0xb7, 0x24, 0x18, 0xeb, 0x0f, 0x53, 0x06, 0xdf, 0x02,
+0x77, 0xd0, 0x9c, 0xd2, 0x70, 0xdd, 0xa4, 0xea, 0x6c, 0xa5, 0x71, 0xc4,
+0x72, 0x55, 0x4d, 0x94, 0xc3, 0xf2, 0xa4, 0x91, 0x19, 0xe5, 0xb6, 0xc4,
+0x39, 0x2d, 0x65, 0x4f, 0x50, 0xb7, 0x67, 0x3d, 0x18, 0xb2, 0x50, 0x2b,
+0xd2, 0x6f, 0xe5, 0x69, 0x6b, 0x68, 0xe6, 0xd8, 0x2a, 0x72, 0x26, 0xa9,
+0xbd, 0x05, 0x70, 0xdc, 0x94, 0xc5, 0x55, 0x94, 0xc5, 0x72, 0x9d, 0xd5,
+0x17, 0xb4, 0x6f, 0x44, 0xa5, 0xae, 0x26, 0x3f, 0x12, 0xd2, 0x6e, 0xe5,
+0xf1, 0xe3, 0x69, 0x06, 0x25, 0x24, 0x15, 0x49, 0x14, 0x8d, 0xe7, 0x38,
+0xbb, 0x2e, 0x3c, 0xc9, 0x99, 0x06, 0xf4, 0xeb, 0x75, 0xd6, 0xd5, 0xdf,
+0x24, 0x57, 0x06, 0xd5, 0x15, 0xac, 0xd2, 0x6d, 0xd6, 0xf1, 0xea, 0xdc,
+0xe4, 0x48, 0xe4, 0x63, 0x4a, 0xd0, 0xcf, 0x65, 0xb9, 0x30, 0xaa, 0xdc,
+0x22, 0x89, 0x66, 0x9e, 0x64, 0x3a, 0xac, 0x64, 0x52, 0xc4, 0x45, 0xcc,
+0xb1, 0xd0, 0xec, 0xd2, 0x6d, 0xd6, 0xa9, 0xe2, 0xb8, 0xc6, 0xf6, 0x9c,
+0x95, 0x29, 0x2c, 0x6e, 0xa4, 0x17, 0x66, 0x22, 0x5b, 0xcb, 0xc0, 0xe5,
+0xde, 0xd0, 0x93, 0x42, 0x3c, 0x5a, 0xa6, 0x56, 0x87, 0x79, 0x37, 0x54,
+0xd2, 0x2d, 0xe5, 0xa1, 0x23, 0x7e, 0xa5, 0xd3, 0xcc, 0x8d, 0xe3, 0x5b,
+0x86, 0xa4, 0x52, 0x95, 0xb1, 0x25, 0xe5, 0xe2, 0xc3, 0xf3, 0xac, 0x46,
+0x5c, 0xd3, 0xb5, 0x83, 0xc9, 0x8b, 0x7e, 0x58, 0x5f, 0xd2, 0xaa, 0xe5,
+0x35, 0xa3, 0x99, 0x88, 0x46, 0x86, 0x92, 0x35, 0x1c, 0x50, 0x23, 0xe3,
+0x44, 0x95, 0x61, 0x1d, 0xc0, 0x43, 0x65, 0x1e, 0xd0, 0x17, 0xfc, 0xe4,
+0xa4, 0xa4, 0xf6, 0x84, 0x3f, 0xe9, 0xd2, 0x6f, 0xe5, 0xed, 0xea, 0x6f,
+0x64, 0x2c, 0xda, 0x83, 0xe6, 0x74, 0x6b, 0x03, 0x03, 0x45, 0x8e, 0x55,
+0x5c, 0x6b, 0x06, 0x60, 0x7a, 0x92, 0x62, 0xd5, 0x96, 0xc3, 0x60, 0x5f,
+0xd4, 0x19, 0xe6, 0xd2, 0x70, 0xde, 0x36, 0x32, 0x95, 0x23, 0xd1, 0x1d,
+0x61, 0xc9, 0xd0, 0x93, 0x26, 0xc7, 0x63, 0x35, 0xca, 0x83, 0x73, 0x28,
+0xb9, 0x45, 0x73, 0x45, 0x1c, 0x68, 0xc4, 0x6b, 0x42, 0xd3, 0xc0, 0xd5,
+0xd2, 0x71, 0xe6, 0x65, 0xe3, 0xb8, 0x04, 0xdc, 0x24, 0xb5, 0x85, 0x35,
+0x8f, 0x62, 0x32, 0xbd, 0x64, 0x2e, 0xf0, 0x93, 0xa6, 0x37, 0xd3, 0x72,
+0x58, 0x6b, 0x8b, 0x24, 0x4f, 0x8c, 0x13, 0x66, 0x82, 0xd2, 0x6d, 0xe5,
+0x25, 0xa2, 0x68, 0xa4, 0x73, 0x4b, 0x92, 0xc6, 0x94, 0xda, 0xa1, 0xf9,
+0x44, 0x9c, 0x95, 0xed, 0xb6, 0xc2, 0xc7, 0x6e, 0x23, 0xc9, 0x48, 0x67,
+0xe3, 0xab, 0x88, 0x92, 0x76, 0x53, 0xd2, 0x6c, 0xe5, 0x2d, 0xaa, 0xcb,
+0x05, 0xd8, 0xc4, 0x8e, 0x35, 0x4d, 0x78, 0xa3, 0x21, 0xe3, 0x6d, 0xf6,
+0x94, 0xa3, 0x43, 0x65, 0xe3, 0xb4, 0x39, 0xb2, 0x87, 0x43, 0x17, 0xec,
+0x62, 0x69, 0x82, 0xd2, 0x6e, 0xed, 0xed, 0xe3, 0x6f, 0xe4, 0xf8, 0x42,
+0xea, 0x38, 0xba, 0x75, 0x25, 0x4a, 0xc6, 0x8e, 0x37, 0x92, 0x80, 0x84,
+0x72, 0x71, 0x76, 0xf2, 0x55, 0xde, 0x84, 0xfa, 0x8b, 0xd9, 0xa1, 0x7c,
+0xd2, 0x6f, 0xee, 0x36, 0x1b, 0xdd, 0x64, 0x44, 0xe3, 0x83, 0x39, 0xe0,
+0xb7, 0x84, 0xa9, 0x9c, 0x19, 0x58, 0x8d, 0x52, 0xaa, 0x4b, 0x45, 0x6f,
+0x46, 0xdc, 0x68, 0xc3, 0xf5, 0x82, 0xd7, 0x30, 0xe6, 0xd2, 0x6e, 0xe6,
+0x71, 0x63, 0x96, 0x04, 0xda, 0x1b, 0xd9, 0x15, 0x74, 0xd6, 0xa4, 0x16,
+0xdd, 0x8c, 0x4b, 0xd9, 0xb3, 0xa3, 0xc1, 0x8c, 0x3d, 0xaa, 0xed, 0x6a,
+0xa2, 0xeb, 0x07, 0x32, 0x4e, 0xc3, 0xd2, 0x6c, 0xe6, 0x25, 0x23, 0x94,
+0xc2, 0xd3, 0xc2, 0x72, 0xe0, 0x9c, 0xda, 0x43, 0x72, 0x56, 0xb4, 0x97,
+0xea, 0xcd, 0xc3, 0x83, 0xb5, 0x84, 0xf9, 0xd1, 0x65, 0xc4, 0xb9, 0xd2,
+0x6b, 0x58, 0x24, 0xd2, 0x6d, 0xe5, 0x2d, 0x63, 0xa1, 0x88, 0xb8, 0xc4,
+0x76, 0x34, 0xdd, 0x5c, 0xa2, 0xb1, 0xdc, 0x8d, 0xe4, 0x9c, 0x7e, 0xc3,
+0x54, 0xdd, 0xd0, 0xa7, 0xf4, 0xe4, 0x23, 0x85, 0x75, 0x48, 0x5f, 0x91,
+0xd2, 0x6d, 0xd6, 0x6e, 0x24, 0xe7, 0xc6, 0x49, 0x58, 0x73, 0x48, 0x24,
+0x85, 0x25, 0x4b, 0x06, 0x4f, 0x45, 0x4c, 0x6a, 0xa3, 0xc9, 0xc1, 0x7b,
+0x62, 0x56, 0xe6, 0x03, 0xea, 0x54, 0xdd, 0x85, 0x3d, 0xd2, 0x6e, 0xee,
+0x36, 0x64, 0x88, 0x83, 0x86, 0xa4, 0x8c, 0x29, 0xb3, 0xd7, 0xc3, 0xc5,
+0xa0, 0x5e, 0x3a, 0xa1, 0xda, 0xa4, 0xcb, 0x86, 0x4f, 0x47, 0x85, 0x6a,
+0x85, 0x4b, 0x21, 0x75, 0xf4, 0x5d, 0xd2, 0x71, 0xe5, 0xf1, 0xa3, 0xda,
+0xe3, 0xe2, 0x25, 0xb0, 0xa9, 0xa5, 0xe0, 0xc3, 0xb1, 0xae, 0x44, 0x5f,
+0x58, 0xdb, 0x67, 0x49, 0x60, 0xae, 0xd6, 0x6c, 0x69, 0x24, 0xad, 0x8d,
+0x0b, 0xc9, 0x0b, 0xd2, 0x6d, 0xf5, 0x69, 0x23, 0x68, 0xa3, 0xf5, 0x43,
+0x36, 0x54, 0xcd, 0xda, 0xa2, 0x68, 0x93, 0x99, 0x85, 0xac, 0x93, 0x03,
+0x19, 0x35, 0x85, 0x6b, 0xe0, 0x93, 0xc3, 0x7b, 0x80, 0x9e, 0xa2, 0x7c,
+0xd2, 0xea, 0xb6, 0x25, 0xdc, 0x91, 0xe6, 0x58, 0x3a, 0x95, 0xa6, 0x6b,
+0x6c, 0xa4, 0x50, 0xc5, 0xb5, 0x23, 0x24, 0x90, 0xa4, 0xe3, 0x13, 0xba,
+0x22, 0xf7, 0xdf, 0x4d, 0xb6, 0xe4, 0x8d, 0xb9, 0x85, 0xd2, 0xae, 0xd6,
+0x1d, 0x9b, 0x54, 0x2a, 0x46, 0x0f, 0xac, 0xb7, 0x24, 0x7e, 0x03, 0xb4,
+0xbd, 0x54, 0x4b, 0x63, 0xb8, 0x45, 0x44, 0xec, 0xad, 0x1d, 0xb9, 0xe2,
+0xaa, 0xb7, 0x34, 0x49, 0xf8, 0xd9, 0xd2, 0xad, 0xe5, 0xe1, 0xa2, 0x6b,
+0x0a, 0xbb, 0xd3, 0x2f, 0xb7, 0x4a, 0x91, 0xce, 0x48, 0xdc, 0x91, 0xb6,
+0xf9, 0x54, 0xae, 0x8e, 0xda, 0x92, 0x35, 0x1b, 0x8e, 0xab, 0xe6, 0x84,
+0xd6, 0x13, 0x7a, 0xd2, 0x72, 0xf6, 0x2e, 0x23, 0xe0, 0xeb, 0xb9, 0x23,
+0x4f, 0x4a, 0xc2, 0x8c, 0xaa, 0x5d, 0x43, 0x17, 0xb4, 0xd6, 0xad, 0x2b,
+0xc8, 0xc3, 0xb6, 0x44, 0xa6, 0x8c, 0xe5, 0x83, 0x26, 0xc1, 0x27, 0xea,
+0xd2, 0x72, 0xed, 0xb2, 0x23, 0x72, 0xe4, 0xa7, 0xa5, 0xa2, 0x2d, 0x10,
+0xb9, 0x68, 0x35, 0x3a, 0x87, 0x48, 0x9a, 0xdd, 0xa5, 0xcb, 0xcd, 0x32,
+0xc3, 0x57, 0x8b, 0x0a, 0xe8, 0xd9, 0x96, 0x56, 0x67, 0xd2, 0xad, 0xe4,
+0xe9, 0xa2, 0xd1, 0x89, 0x94, 0xc4, 0x92, 0x15, 0x5a, 0x8a, 0xcc, 0x5b,
+0x12, 0x8e, 0xd4, 0x5f, 0x76, 0xa9, 0xd1, 0x63, 0x72, 0x35, 0x2e, 0x92,
+0xc8, 0x15, 0x36, 0x45, 0xdb, 0x68, 0xd2, 0x72, 0xd5, 0xaa, 0x24, 0xd6,
+0xc8, 0x9b, 0x93, 0x8d, 0xde, 0x91, 0x6a, 0xe5, 0xcc, 0xa2, 0x77, 0x96,
+0x71, 0xb8, 0xa5, 0xf4, 0x9c, 0x96, 0x33, 0x74, 0xba, 0xc3, 0x12, 0xee,
+0x8d, 0xa9, 0xeb, 0xd2, 0x6e, 0xdf, 0x35, 0xeb, 0xdd, 0x65, 0x36, 0xe5,
+0x85, 0xae, 0xd0, 0xd7, 0x44, 0x49, 0xe2, 0x11, 0x68, 0x1e, 0x7d, 0x28,
+0x4d, 0x44, 0x73, 0x45, 0x0d, 0xdd, 0x45, 0x53, 0xd3, 0x8e, 0x64, 0xa4,
+0xd2, 0x35, 0xed, 0xe1, 0x62, 0x68, 0xa3, 0xe6, 0x15, 0xd5, 0x27, 0xaa,
+0x84, 0xa3, 0xa7, 0x64, 0x69, 0xc9, 0x88, 0xcb, 0xc6, 0x4b, 0x19, 0x9a,
+0x06, 0xbd, 0x61, 0x66, 0xa4, 0xbc, 0xad, 0x1d, 0x29, 0xd2, 0x70, 0xf5,
+0x25, 0x23, 0x69, 0x23, 0xf5, 0x06, 0xb8, 0x33, 0xb4, 0xe4, 0xe3, 0x57,
+0x0b, 0xbd, 0x13, 0xbe, 0xee, 0xa4, 0xa5, 0x9e, 0xa8, 0xc9, 0xe8, 0xb1,
+0xa6, 0xc9, 0xab, 0x12, 0x7a, 0x9a, 0xd2, 0x74, 0xf5, 0x64, 0xe3, 0x67,
+0x87, 0x9f, 0x13, 0x32, 0xe8, 0x42, 0x6a, 0xa6, 0x73, 0x07, 0xb6, 0x25,
+0x64, 0x98, 0xe5, 0x27, 0xa3, 0x6e, 0xc9, 0x1f, 0xf0, 0xaa, 0x89, 0x63,
+0x71, 0xc7, 0x23, 0xd2, 0xea, 0xd5, 0x5d, 0x22, 0x52, 0x40, 0xe5, 0xa4,
+0x8a, 0x4b, 0x24, 0xcc, 0x40, 0xc8, 0xe3, 0x8b, 0xa5, 0x2d, 0xe8, 0x40,
+0x17, 0xb3, 0x4b, 0xd8, 0xe3, 0xe0, 0xa0, 0x3b, 0x64, 0x92, 0x37, 0x24,
+0xd9, 0x29, 0x52, 0x9e, 0x22, 0xc2, 0xe0, 0x48, 0xe4, 0x91, 0xec, 0xe2,
+0xa1, 0x20, 0x4a, 0x9c, 0x76, 0xc7, 0x1d, 0xac, 0x80, 0x53, 0x2d, 0xb1,
+0xca, 0xeb, 0xc0, 0xc0, 0x49, 0x6b, 0x92, 0xb8, 0xeb, 0xd9, 0xec, 0x6a,
+0x99, 0x1a, 0x80, 0xe0, 0x3b, 0x23, 0xb2, 0x49, 0x1b, 0xb7, 0x40, 0x49,
+0x23, 0x95, 0xac, 0xa4, 0xaf, 0x80, 0x37, 0x1b, 0xad, 0xb7, 0x93, 0x70,
+0x80, 0x48, 0xed, 0x92, 0x39, 0x93, 0xd2, 0x72, 0xcd, 0x19, 0xa3, 0x8d,
+0xd4, 0xca, 0xc3, 0xb5, 0xa6, 0xe4, 0x62, 0x46, 0x56, 0x14, 0xde, 0x36,
+0xb1, 0xa8, 0x67, 0x50, 0xef, 0x51, 0xba, 0xc9, 0xec, 0x48, 0x5b, 0xdb,
+0x6e, 0xd8, 0xe2, 0xd2, 0x74, 0xc4, 0xd5, 0xa4, 0x92, 0xc9, 0x78, 0x5c,
+0x8a, 0x58, 0x9c, 0xa8, 0xe3, 0x31, 0x1a, 0xe4, 0xd4, 0x65, 0xa2, 0x84,
+0x0d, 0xdf, 0x09, 0x2a, 0x5d, 0x86, 0xa4, 0xf6, 0x22, 0xba, 0x1f, 0x0c,
+0xd2, 0xaf, 0xd5, 0x61, 0x9b, 0x54, 0xc7, 0x76, 0x5d, 0x8e, 0x34, 0x99,
+0xae, 0x85, 0x4f, 0x9a, 0x37, 0xa9, 0x54, 0xd4, 0xa6, 0x8d, 0x23, 0x6d,
+0x47, 0x33, 0xb0, 0xa5, 0x09, 0x24, 0xb1, 0x38, 0xbb, 0xd2, 0xae, 0xcd,
+0x61, 0x5b, 0xc8, 0xa4, 0xe8, 0x1a, 0x63, 0x5a, 0xd3, 0x70, 0xe4, 0xb2,
+0x9e, 0xf0, 0xc6, 0x77, 0xa8, 0xe5, 0x4c, 0x56, 0x6b, 0x50, 0xa3, 0xa0,
+0x85, 0xdc, 0xcc, 0xe9, 0x37, 0xab, 0xd2, 0xaf, 0xd5, 0x1d, 0x23, 0x85,
+0x26, 0x06, 0xfa, 0x90, 0xbd, 0xd9, 0xc4, 0xa3, 0xba, 0xd8, 0x73, 0x73,
+0x1a, 0x92, 0xc8, 0xf8, 0x54, 0x8d, 0xc6, 0xac, 0x70, 0xc5, 0xba, 0x8a,
+0x96, 0x18, 0xaf, 0xd2, 0xb0, 0xd4, 0xd9, 0x64, 0xbe, 0x83, 0x70, 0x93,
+0x45, 0x3d, 0xbf, 0x92, 0xc5, 0x85, 0xea, 0x4a, 0x34, 0xeb, 0x8c, 0x87,
+0xaf, 0x0d, 0x8d, 0xc6, 0xd3, 0x84, 0xa4, 0x47, 0xcc, 0xae, 0x40, 0xcc,
+0xd2, 0x74, 0xd5, 0x1d, 0x64, 0xba, 0xc4, 0x78, 0x82, 0xde, 0x25, 0x28,
+0x72, 0xe3, 0x59, 0x9c, 0x94, 0x0d, 0x79, 0xb8, 0xc4, 0x7a, 0x59, 0x6d,
+0xea, 0x9c, 0x54, 0xa3, 0x38, 0x9d, 0x0e, 0x59, 0x99, 0xd2, 0xb0, 0xdd,
+0x1d, 0xdc, 0xc6, 0xc6, 0x17, 0xdb, 0x6d, 0xb8, 0xec, 0x6c, 0xc3, 0xab,
+0xe0, 0x66, 0x44, 0x4d, 0x51, 0x25, 0x39, 0xd5, 0x56, 0x35, 0x35, 0x8e,
+0xc4, 0x27, 0xba, 0xa5, 0x55, 0x3d, 0xd4, 0xe9, 0xbc, 0x5d, 0x63, 0x9e,
+0xa1, 0xe5, 0x43, 0xad, 0x4b, 0x12, 0xc2, 0x40, 0x4b, 0x12, 0x72, 0x94,
+0xd6, 0xde, 0x40, 0xa6, 0xac, 0x71, 0x94, 0xda, 0xdc, 0x60, 0x37, 0x23,
+0x6e, 0x36, 0xe1, 0xd9, 0xad, 0x83, 0x5d, 0x59, 0xc8, 0x80, 0x54, 0xdb,
+0x52, 0x36, 0x9c, 0x7e, 0x80, 0x22, 0xe3, 0x6a, 0x53, 0x1b, 0xca, 0xe0,
+0x36, 0xdc, 0x71, 0x45, 0x5c, 0xbc, 0x80, 0x38, 0x64, 0x85, 0xd6, 0xdb,
+0xd9, 0xab, 0x6b, 0x99, 0xe3, 0x76, 0x60, 0x34, 0xd4, 0x69, 0xb7, 0x12,
+0xba, 0x20, 0x37, 0x12, 0x8a, 0x34, 0xd4, 0x60, 0xa0, 0x36, 0xe6, 0x89,
+0xbc, 0x94, 0x50, 0xa0, 0x38, 0x93, 0x86, 0x34, 0xab, 0xd9, 0xad, 0x7b,
+0x9d, 0x9b, 0x74, 0xc0, 0x35, 0x22, 0xaa, 0x39, 0x4a, 0xda, 0xa0, 0x2c,
+0xcc, 0x8d, 0xc8, 0x63, 0x98, 0xe0, 0x43, 0x23, 0x4a, 0x38, 0x9a, 0xd0,
+0xe0, 0x48, 0x9b, 0xad, 0x35, 0x1a, 0xd9, 0xee, 0x83, 0xd9, 0xe3, 0x84,
+0x80, 0x49, 0x23, 0x71, 0xa4, 0xe4, 0xe8, 0x80, 0x27, 0x1c, 0x6a, 0x36,
+0x9a, 0xd6, 0xc0, 0x44, 0xa4, 0x55, 0x25, 0xa3, 0x68, 0x80, 0x3b, 0x12,
+0x55, 0x26, 0xe3, 0xd9, 0xed, 0x8b, 0xa2, 0x1d, 0x7b, 0x60, 0xab, 0x73,
+0x31, 0xca, 0x63, 0x82, 0xe0, 0x25, 0xee, 0x75, 0xc3, 0x95, 0x86, 0xc0,
+0xa7, 0x64, 0x92, 0xa7, 0x29, 0x81, 0x60, 0xd9, 0x53, 0x99, 0xb8, 0xdd,
+0xd9, 0xee, 0x8b, 0x9d, 0xe4, 0x5c, 0xa0, 0xa7, 0x93, 0x55, 0xc6, 0xd4,
+0xe1, 0x40, 0x24, 0x8e, 0xdd, 0x8d, 0x01, 0xda, 0x80, 0xda, 0xd2, 0x94,
+0xc3, 0xed, 0x5a, 0xc0, 0x97, 0x62, 0x92, 0xa5, 0x23, 0xd9, 0xee, 0x84,
+0x22, 0x2c, 0xa2, 0xc0, 0xc8, 0x6b, 0xa9, 0xca, 0xa3, 0xd0, 0xe0, 0xc9,
+0x22, 0x85, 0xea, 0xd5, 0x62, 0xe0, 0xca, 0x5a, 0x91, 0x49, 0x63, 0x7e,
+0xa0, 0xc2, 0xf3, 0x4e, 0x46, 0xfc, 0xd9, 0xaf, 0x83, 0xde, 0x1d, 0x74,
+0x80, 0xa4, 0xb3, 0x6a, 0x37, 0x23, 0xc6, 0xc0, 0xd6, 0xcc, 0x91, 0x49,
+0x5b, 0xb2, 0xc0, 0x1f, 0x22, 0x73, 0x85, 0x9e, 0x94, 0x80, 0x3a, 0xa4,
+0xae, 0xb7, 0x84, 0xd9, 0xad, 0xa3, 0x9d, 0xdc, 0xa2, 0xe0, 0xc9, 0x2a,
+0x66, 0x45, 0x63, 0x50, 0xa0, 0x2b, 0xdc, 0x59, 0xa5, 0x2b, 0x8a, 0xe0,
+0xc7, 0x64, 0x4e, 0x62, 0xa5, 0x52, 0xc0, 0x36, 0xfb, 0xae, 0x60, 0xa7,
+0xd9, 0xed, 0x83, 0x5e, 0x1c, 0x80, 0xc0, 0x39, 0x74, 0x42, 0xc8, 0x67,
+0xea, 0xc0, 0x36, 0x79, 0xed, 0x66, 0xc7, 0x89, 0x00, 0xb9, 0x5b, 0x35,
+0x68, 0x94, 0xdb, 0x00, 0xc8, 0xcd, 0xad, 0xb7, 0x60, 0xd9, 0xad, 0x7b,
+0xa1, 0xe5, 0x74, 0x80, 0xc5, 0x54, 0xb0, 0xda, 0x94, 0xd4, 0xa0, 0xd8,
+0x9d, 0x91, 0xad, 0x61, 0xe4, 0x80, 0xc9, 0x93, 0x56, 0x27, 0x2c, 0x5e,
+0xe0, 0x5b, 0x41, 0xda, 0x75, 0x1b, 0xd9, 0xac, 0x9b, 0x22, 0x64, 0xc0,
+0xc0, 0x37, 0x5f, 0x12, 0x41, 0x9b, 0x54, 0xa0, 0x6b, 0x50, 0xbc, 0x1a,
+0xa9, 0xcc, 0xc0, 0xc6, 0xec, 0x2a, 0xe6, 0x8c, 0x5e, 0xa0, 0xd9, 0x6b,
+0x66, 0x39, 0x5d, 0xd9, 0xed, 0x73, 0x62, 0x64, 0x62, 0xa0, 0xb7, 0x95,
+0x52, 0xd8, 0x65, 0xe6, 0xe0, 0x43, 0x25, 0x32, 0x3a, 0x7e, 0xa2, 0x80,
+0x98, 0xe5, 0x4d, 0xe8, 0x95, 0x7b, 0x20, 0xc6, 0x6e, 0x8c, 0xae, 0xa2,
+0xd9, 0xad, 0x8b, 0x5d, 0xa5, 0x76, 0xe0, 0xd9, 0x0c, 0x8d, 0xb9, 0x1a,
+0xa2, 0x80, 0x9d, 0x2c, 0x31, 0xc7, 0x22, 0xcc, 0x80, 0x53, 0xd3, 0xb4,
+0xcb, 0xa9, 0xbc, 0xa0, 0xcc, 0x9c, 0x91, 0x27, 0x64, 0xda, 0x2e, 0x8b,
+0xde, 0x24, 0x57, 0x40, 0x98, 0xea, 0x92, 0xc4, 0xab, 0x8c, 0xa0, 0x37,
+0x62, 0x67, 0xd7, 0xc2, 0x8d, 0x60, 0x67, 0x6b, 0x47, 0xad, 0x5b, 0x77,
+0x40, 0xd0, 0xd3, 0xcd, 0xdb, 0x4d, 0xd9, 0xec, 0x73, 0xa2, 0x23, 0x62,
+0xa0, 0x87, 0x6c, 0x32, 0x64, 0x9c, 0x96, 0x80, 0xf6, 0x65, 0x51, 0x4c,
+0xe3, 0xe4, 0xc0, 0xa9, 0x19, 0xad, 0xc7, 0x23, 0xb2, 0x80, 0x4e, 0xcd,
+0x7a, 0x44, 0xdc, 0xda, 0x2d, 0x83, 0x61, 0xa5, 0xf0, 0xe0, 0xc8, 0xd5,
+0x4a, 0x38, 0x6b, 0xe8, 0x80, 0xc8, 0x6c, 0xcd, 0x29, 0x29, 0x62, 0xc0,
+0xca, 0xa9, 0x91, 0xd5, 0x5b, 0xe4, 0xa0, 0x0a, 0xf3, 0x7d, 0xb4, 0xb5,
+0xd9, 0xaf, 0x9b, 0xde, 0x1c, 0x84, 0xa0, 0xb5, 0x5c, 0x86, 0xc4, 0xe6,
+0x90, 0xc0, 0xb6, 0x64, 0x6a, 0x38, 0xde, 0xb0, 0xa0, 0x1b, 0x6d, 0x54,
+0x53, 0x2b, 0xd2, 0xc0, 0xd7, 0x24, 0x91, 0x4c, 0xd2, 0xd9, 0xb0, 0x7b,
+0x99, 0xe5, 0xa6, 0xc0, 0xbc, 0xd3, 0xb1, 0x29, 0x9b, 0x75, 0x40, 0x97,
+0x24, 0x4a, 0x4a, 0xdd, 0x66, 0x80, 0x26, 0xb2, 0xd2, 0x9d, 0x25, 0xd4,
+0xa0, 0x18, 0x65, 0x9a, 0x65, 0x32, 0xd9, 0xed, 0x83, 0x65, 0xe5, 0xec,
+0xc0, 0xb7, 0x23, 0x93, 0x24, 0xf3, 0x5c, 0x80, 0x64, 0xf3, 0x95, 0x97,
+0x1f, 0xb8, 0xa0, 0x1e, 0xea, 0x9a, 0x4a, 0x62, 0xee, 0xc0, 0xba, 0xa9,
+0x90, 0xc5, 0x1d, 0xd9, 0xac, 0x84, 0x22, 0x63, 0x66, 0xa0, 0xbc, 0xaa,
+0xad, 0x37, 0x64, 0x9c, 0xa0, 0x28, 0xa5, 0x6f, 0xa5, 0x27, 0xbc, 0x80,
+0xb9, 0x12, 0x74, 0xc9, 0x6b, 0xec, 0xa0, 0xb6, 0xac, 0x8c, 0xce, 0xca,
+0xd9, 0xad, 0x8b, 0x62, 0x2c, 0x52, 0xa0, 0xde, 0x8c, 0xcd, 0x46, 0xdc,
+0xa8, 0x80, 0xcc, 0x5b, 0x91, 0x59, 0x13, 0xf0, 0xe0, 0xca, 0xaa, 0xaa,
+0xd9, 0x4d, 0x9e, 0x80, 0x25, 0x93, 0xb7, 0x28, 0x73, 0xda, 0x2d, 0x93,
+0xa1, 0xdc, 0xbc, 0xa0, 0xc7, 0x5a, 0x72, 0x55, 0x16, 0xd2, 0xa0, 0xc4,
+0x5c, 0xb2, 0x37, 0x5a, 0x58, 0xa0, 0xc7, 0x9b, 0xb1, 0xc7, 0x23, 0x6e,
+0xe0, 0x0d, 0xad, 0x50, 0x6b, 0x1a, 0xda, 0x2e, 0x8b, 0xdd, 0xe4, 0x98,
+0xa0, 0xa7, 0x6b, 0x52, 0x63, 0x1c, 0x66, 0x80, 0xbb, 0x24, 0x95, 0x47,
+0x0c, 0xdd, 0x00, 0xd4, 0xed, 0x6e, 0xd8, 0x65, 0x74, 0x80, 0xb6, 0xe4,
+0x6c, 0xcd, 0x1b, 0xd9, 0xae, 0x84, 0x56, 0x64, 0x94, 0xa0, 0x3c, 0xc4,
+0x5d, 0x1c, 0xe0, 0xe2, 0x80, 0x59, 0x32, 0xa8, 0x43, 0xaf, 0x54, 0xe0,
+0x19, 0x55, 0x59, 0xc9, 0x96, 0xb2, 0xa0, 0x98, 0xe3, 0xad, 0xcb, 0x1b,
+0xd9, 0xab, 0x7b, 0x9a, 0x65, 0xd7, 0x20, 0x76, 0x8b, 0xcc, 0xa5, 0x66,
+0xd9, 0x60, 0x0b, 0x72, 0x4e, 0x31, 0x38, 0xb0, 0xc0, 0x57, 0x2d, 0x73,
+0xb8, 0x56, 0x72, 0xa0, 0xcb, 0x23, 0x95, 0x58, 0x6a, 0xd9, 0xa9, 0x5b,
+0xe2, 0xac, 0x54, 0xc0, 0xb1, 0x64, 0x6d, 0xc8, 0xe1, 0x92, 0xc0, 0xd6,
+0x9d, 0x86, 0x3b, 0x19, 0xe8, 0xc0, 0xea, 0xd3, 0x9a, 0x18, 0xec, 0x54,
+0xa0, 0xb5, 0x2b, 0x8e, 0x3c, 0xa4, 0xd9, 0xed, 0x9b, 0x9e, 0x64, 0xa6,
+0xe0, 0x28, 0xcd, 0x15, 0x69, 0xee, 0xde, 0xc0, 0xa0, 0xe4, 0x6e, 0xe6,
+0xd1, 0x8e, 0x40, 0x4f, 0x4b, 0xae, 0xba, 0x75, 0xa0, 0xa0, 0xc6, 0xa5,
+0x6e, 0xb8, 0xb4, 0xd9, 0xb1, 0x9b, 0xdd, 0xa3, 0xda, 0xe0, 0xb8, 0xe5,
+0x6c, 0xe9, 0x53, 0x50, 0xa0, 0x58, 0xd4, 0xea, 0xb1, 0xf9, 0xb6, 0xa0,
+0xb5, 0xdd, 0x88, 0xba, 0xdc, 0x62, 0xc0, 0xc8, 0xd6, 0x51, 0xab, 0x12,
+0xda, 0x2f, 0x84, 0x61, 0xa4, 0x98, 0xc0, 0xb7, 0x6b, 0x8e, 0xb6, 0x63,
+0xc4, 0xe0, 0xb8, 0xe5, 0x8c, 0xba, 0x9a, 0x9a, 0xa0, 0x7b, 0x99, 0xb2,
+0x17, 0x24, 0x70, 0xa0, 0xd7, 0x22, 0x6e, 0xc8, 0x9e, 0xda, 0x2f, 0x7c,
+0x5d, 0xec, 0xb1, 0x00, 0xa6, 0xb4, 0x45, 0xe6, 0xe4, 0x74, 0xa0, 0x41,
+0x23, 0x8f, 0x4c, 0x22, 0xb8, 0x40, 0x29, 0x8f, 0xac, 0xeb, 0x2a, 0xda,
+0xc0, 0xb4, 0xe4, 0x6e, 0x68, 0xe2, 0xd9, 0xac, 0x84, 0x22, 0x64, 0xd3,
+0x40, 0xb5, 0x2b, 0x6e, 0xb5, 0x9c, 0xaf, 0x00, 0x08, 0x7c, 0xf1, 0xc2,
+0x0c, 0x70, 0xe0, 0xc9, 0xa9, 0x9b, 0x32, 0xa5, 0xca, 0xc0, 0xa7, 0x63,
+0x6e, 0x3c, 0xe2, 0xd9, 0xad, 0x93, 0xde, 0x63, 0xcc, 0x80, 0x5c, 0xd8,
+0x9e, 0x18, 0xaa, 0xca, 0xc0, 0xad, 0x19, 0xb2, 0x29, 0x32, 0xd0, 0xc0,
+0xad, 0x1b, 0x52, 0x2a, 0xe3, 0xa4, 0xa0, 0x2a, 0x65, 0x35, 0xd9, 0x03,
+0xd9, 0xad, 0x84, 0x9d, 0xeb, 0xec, 0xc0, 0x3e, 0x5e, 0x70, 0xc5, 0xc1,
+0x5e, 0xa0, 0x47, 0x14, 0x79, 0x45, 0x1d, 0x9a, 0xa0, 0x1b, 0x94, 0xd1,
+0xaa, 0x2a, 0xcc, 0x80, 0xd7, 0x5e, 0xb1, 0x39, 0x5a, 0xd9, 0xed, 0x83,
+0xa1, 0xe4, 0x52, 0xe0, 0x56, 0x6a, 0x8d, 0xac, 0xb0, 0x88, 0xc0, 0x58,
+0x63, 0xd8, 0x49, 0x91, 0xf0, 0xc0, 0xba, 0xe9, 0x9a, 0x53, 0x1c, 0x76,
+0x80, 0xb7, 0x2c, 0x6a, 0xdc, 0x54, 0xd9, 0xec, 0x7c, 0x1e, 0x24, 0x58,
+0xa0, 0x64, 0xe3, 0xc8, 0x58, 0x8b, 0x73, 0x20, 0x2e, 0x98, 0xee, 0x3e,
+0xb1, 0x50, 0x80, 0x2c, 0xba, 0xb5, 0x46, 0x9d, 0x94, 0xe0, 0xd9, 0x1c,
+0x69, 0x69, 0x9d, 0xd9, 0xaa, 0x73, 0xa5, 0xe5, 0xea, 0xc0, 0xa6, 0xea,
+0x8d, 0xe8, 0xad, 0x6a, 0xc0, 0xc4, 0xdc, 0x6d, 0xe7, 0x13, 0xa6, 0xa0,
+0x2c, 0xcc, 0xce, 0xba, 0x25, 0x54, 0xe0, 0xc7, 0x15, 0x6e, 0xbb, 0x1e,
+0xd9, 0xef, 0x73, 0x9e, 0x2c, 0xc8, 0xa0, 0xc6, 0x5c, 0x8d, 0xd5, 0x54,
+0xc8, 0xe0, 0x06, 0x9e, 0x8d, 0x7c, 0x6c, 0xa0, 0xa0, 0xc8, 0xa4, 0xca,
+0x4a, 0xd2, 0x6c, 0xe0, 0xda, 0x5c, 0xb1, 0xba, 0x22, 0xd9, 0xed, 0x7c,
+0x25, 0xdc, 0x8f, 0x60, 0xca, 0xa1, 0x5e, 0x37, 0x1a, 0x88, 0xc0, 0xb9,
+0x2b, 0x72, 0xa4, 0xec, 0xa4, 0xe0, 0x6b, 0x53, 0xb1, 0xb4, 0xaa, 0x74,
+0xa0, 0x67, 0x26, 0x8e, 0x17, 0xd5, 0xd9, 0xaf, 0x8b, 0x9d, 0xdd, 0xee,
+0xc0, 0xac, 0xd3, 0x76, 0xb4, 0xa4, 0x63, 0x40, 0x28, 0xaa, 0x69, 0x6c,
+0x61, 0xf1, 0x20, 0xdb, 0x12, 0xd1, 0xb8, 0xe1, 0x54, 0x80, 0xcb, 0x0c,
+0x91, 0xc9, 0x61, 0xd9, 0xad, 0x84, 0x21, 0x9d, 0xc6, 0x80, 0xd9, 0x0b,
+0xaa, 0x36, 0xe3, 0xbb, 0xc0, 0xb6, 0xe6, 0x4a, 0x58, 0x9a, 0x5e, 0xc0,
+0x77, 0xc3, 0xda, 0x41, 0x5e, 0x94, 0xa0, 0x21, 0x36, 0x6b, 0xa8, 0x99,
+0xd9, 0xaa, 0x74, 0x1a, 0x64, 0xda, 0xc0, 0xc4, 0xe2, 0xb1, 0xb9, 0x21,
+0xd2, 0xa0, 0xd7, 0x12, 0xd2, 0x25, 0x1b, 0x62, 0xc0, 0x3b, 0x6c, 0x78,
+0xf3, 0x6c, 0xc4, 0xc0, 0x59, 0x4b, 0xb4, 0xb5, 0xb1, 0xd9, 0xac, 0x84,
+0x1e, 0x65, 0xe0, 0x80, 0x43, 0xad, 0x2e, 0xd2, 0xd4, 0x8c, 0xc0, 0xc7,
+0x24, 0x8d, 0xd3, 0x24, 0xca, 0xc0, 0xb8, 0xe3, 0xd5, 0xb7, 0x14, 0xab,
+0x00, 0xb9, 0x71, 0x92, 0xa9, 0x15, 0xd9, 0xf0, 0x83, 0xe1, 0xdc, 0x97,
+0x60, 0xd6, 0xa3, 0xb1, 0xc3, 0x24, 0x7e, 0xa0, 0x94, 0xf3, 0x71, 0xd8,
+0xd5, 0xcc, 0xc0, 0x3d, 0xa3, 0x2b, 0x34, 0x7b, 0xa0, 0xa0, 0x53, 0x1f,
+0xad, 0x6b, 0x18, 0xd9, 0xed, 0x8b, 0xe2, 0x9b, 0xe2, 0xa0, 0x6b, 0x8a,
+0x4a, 0x44, 0xac, 0xe6, 0xe0, 0xc4, 0xde, 0x6d, 0x97, 0x6a, 0x64, 0x80,
+0x69, 0x05, 0xed, 0x2a, 0xaf, 0xb2, 0xc0, 0xc3, 0x6b, 0x6e, 0xb8, 0xdb,
+0xd9, 0xed, 0x8b, 0x9d, 0xe4, 0x94, 0x80, 0xdb, 0x13, 0x4f, 0x3a, 0xab,
+0xb8, 0x80, 0xc6, 0x6c, 0x88, 0xd8, 0xdc, 0x58, 0xa0, 0xc9, 0x64, 0x49,
+0xdc, 0x5b, 0x5c, 0xa0, 0xea, 0x95, 0xaa, 0x3a, 0xa4, 0xd9, 0xf2, 0x8b,
+0x65, 0xe4, 0x6c, 0x00, 0x65, 0x63, 0x71, 0xc9, 0xc9, 0xbc, 0x80, 0xba,
+0xdb, 0x8d, 0xa9, 0x21, 0x56, 0xa0, 0xb9, 0x93, 0x92, 0x3b, 0x1b, 0x72,
+0xa0, 0xc7, 0x5e, 0x6e, 0x46, 0x9a, 0xda, 0x2f, 0x7b, 0xe2, 0x24, 0xbc,
+0xa0, 0xbb, 0x2a, 0x56, 0xb4, 0x9c, 0xe5, 0x20, 0xc5, 0x65, 0x85, 0xa9,
+0x62, 0x62, 0xc0, 0xcc, 0xdc, 0x8e, 0x39, 0x1b, 0xc8, 0xe0, 0xb9, 0x1c,
+0xd1, 0x3b, 0x1c, 0xd9, 0xaf, 0x8c, 0x1d, 0xdc, 0x59, 0x20, 0xb7, 0x61,
+0x92, 0x28, 0x65, 0xad, 0x40, 0xb1, 0x25, 0x6e, 0x47, 0x1c, 0x84, 0xa0,
+0x26, 0x35, 0x89, 0xbf, 0x96, 0xde, 0xa0, 0x76, 0x61, 0xba, 0xc5, 0xab,
+0xd9, 0xac, 0x7b, 0x62, 0x25, 0x76, 0xa0, 0xb6, 0x9b, 0x92, 0x29, 0x9c,
+0xe4, 0xe0, 0x0f, 0x42, 0xd9, 0x8b, 0xa0, 0x64, 0xe0, 0x4b, 0x0c, 0x93,
+0xa7, 0x16, 0xc5, 0x60, 0x57, 0x06, 0xcf, 0x3d, 0x0d, 0xd9, 0xed, 0x83,
+0xd5, 0xe5, 0xca, 0xa0, 0xa7, 0x1c, 0x6d, 0xb9, 0x9a, 0xba, 0xa0, 0x4c,
+0x4b, 0xc7, 0x3a, 0x39, 0xc0, 0xe0, 0x43, 0x5c, 0x2d, 0x6e, 0x5b, 0xb8,
+0xc0, 0xb9, 0x54, 0x72, 0x99, 0x1c, 0xda, 0x2e, 0x84, 0x1e, 0x65, 0xe8,
+0xc0, 0x4a, 0x9d, 0xe9, 0xe8, 0x5c, 0x84, 0xa0, 0x57, 0x43, 0x8d, 0xa9,
+0x31, 0xc4, 0x80, 0xe9, 0x1b, 0x95, 0x57, 0x69, 0x50, 0xc0, 0x25, 0x77,
+0x0e, 0xa6, 0x6f, 0xd9, 0xac, 0x84, 0x22, 0x24, 0x76, 0xa0, 0x36, 0xdc,
+0x8d, 0x51, 0x23, 0xc2, 0xc0, 0xd6, 0xc6, 0xcd, 0x29, 0xda, 0x54, 0xe0,
+0xd9, 0x4c, 0x6e, 0x37, 0x64, 0x74, 0x80, 0x0a, 0xab, 0x8d, 0xbd, 0x95,
+0xd9, 0x6d, 0x94, 0x19, 0xa5, 0xda, 0x60, 0x48, 0xa2, 0x7d, 0x53, 0x39,
+0xea, 0x80, 0xb7, 0x24, 0x71, 0xc6, 0xde, 0x7e, 0xa0, 0x17, 0xb4, 0x2e,
+0x72, 0x67, 0x5c, 0x80, 0xd4, 0xee, 0x4d, 0x38, 0xab, 0xd9, 0xad, 0x73,
+0xa2, 0x6c, 0x7e, 0xe0, 0x3b, 0x9d, 0x66, 0x9d, 0x28, 0xb4, 0x80, 0xa9,
+0x23, 0x75, 0x44, 0xb3, 0x52, 0xc0, 0xac, 0xd4, 0x92, 0xa7, 0xa4, 0xd8,
+0xa0, 0x29, 0x22, 0x9a, 0x45, 0x24, 0xd9, 0xac, 0x7c, 0x52, 0x2d, 0xa4,
+0xe0, 0xa9, 0x64, 0x12, 0x3a, 0x9d, 0x7a, 0xa0, 0x09, 0x0e, 0xac, 0x65,
+0x84, 0x90, 0xa0, 0x79, 0x52, 0xae, 0x9a, 0xb2, 0xee, 0xe0, 0xc9, 0x24,
+0x71, 0xe6, 0xd3, 0xda, 0x30, 0x7b, 0x5e, 0x6c, 0xf0, 0xc0, 0x4a, 0x5a,
+0xdc, 0xec, 0xe2, 0x73, 0x00, 0x3a, 0x79, 0x57, 0xc4, 0xcd, 0xb4, 0xc0,
+0x3e, 0xae, 0x8d, 0xaa, 0xa3, 0xda, 0xa0, 0x5a, 0x59, 0x6e, 0xe3, 0x9d,
+0xd9, 0xee, 0x83, 0x5d, 0x9c, 0xdb, 0x60, 0xb8, 0xa3, 0x8a, 0xd8, 0xd6,
+0x7b, 0x40, 0xb6, 0x5c, 0x72, 0x3b, 0x2b, 0x5a, 0xc0, 0x58, 0x58, 0xef,
+0x56, 0xf3, 0xdc, 0xe0, 0x13, 0x63, 0x43, 0x4e, 0xda, 0xd9, 0xed, 0x7b,
+0x56, 0x64, 0xbe, 0xe0, 0xd6, 0xc4, 0x8e, 0x3d, 0x13, 0x66, 0x80, 0x1b,
+0x8c, 0x1e, 0x37, 0xba, 0x6c, 0x80, 0xb5, 0x54, 0x95, 0xc8, 0x96, 0x97,
+0x40, 0x46, 0xe7, 0x54, 0xcc, 0xab, 0xd9, 0xab, 0x7b, 0x56, 0x6e, 0x72,
+0xc0, 0x6c, 0x8b, 0xcd, 0x29, 0x19, 0xc0, 0xa0, 0x57, 0xc3, 0x8b, 0x53,
+0xa4, 0xe2, 0x80, 0x2a, 0xd5, 0x2e, 0xf5, 0x1a, 0x5a, 0xc0, 0xc7, 0x63,
+0x6b, 0x47, 0x54, 0xd9, 0xec, 0x9c, 0x21, 0xdc, 0xde, 0xa0, 0x0a, 0xed,
+0x75, 0x48, 0x8d, 0xc9, 0x00, 0xc8, 0xdb, 0x6e, 0x48, 0xcd, 0xdc, 0xa0,
+0xe7, 0x13, 0x89, 0xc9, 0x64, 0x76, 0xa0, 0xc6, 0x65, 0x6e, 0x5a, 0xa4,
+0xd9, 0xad, 0x6a, 0xa6, 0xed, 0xb6, 0xe0, 0x93, 0x2c, 0x6d, 0xc9, 0x1e,
+0x58, 0xc0, 0x63, 0x1b, 0xc6, 0xdd, 0x05, 0x77, 0x40, 0xcc, 0x2c, 0x6a,
+0x48, 0xdb, 0xe4, 0x80, 0xd7, 0x64, 0x31, 0x48, 0xdb, 0xd9, 0xac, 0x73,
+0xda, 0x6c, 0xcc, 0x80, 0xb4, 0xeb, 0x6f, 0x38, 0xe4, 0x56, 0xc0, 0xc8,
+0xec, 0x66, 0xc6, 0x94, 0xa2, 0xc0, 0xd8, 0x9e, 0x8d, 0xbb, 0x14, 0xd9,
+0x00, 0xac, 0xe3, 0xae, 0x37, 0x1d, 0xd9, 0xae, 0x8b, 0x61, 0xdc, 0xc2,
+0xa0, 0x21, 0x70, 0x91, 0x46, 0xaa, 0x5b, 0x20, 0xbb, 0x1b, 0x90, 0xc9,
+0x22, 0xd4, 0x80, 0xd9, 0x1b, 0x6e, 0x1a, 0xed, 0x96, 0xa0, 0xbb, 0x25,
+0x6e, 0xd4, 0x6c, 0xd9, 0xed, 0x73, 0xa1, 0xe2, 0x74, 0xc0, 0xa7, 0x24,
+0x31, 0xa9, 0x23, 0x76, 0x80, 0xc7, 0x64, 0x71, 0xb6, 0xf3, 0xce, 0xc0,
+0x57, 0x24, 0x4b, 0x3b, 0x59, 0x9e, 0xc0, 0xab, 0x13, 0xb9, 0xa9, 0x1b,
+0xda, 0x33, 0x84, 0x1d, 0x64, 0xe3, 0x00, 0x17, 0xea, 0x9a, 0xc0, 0x1d,
+0x64, 0xa0, 0xb5, 0x25, 0x90, 0xd7, 0x14, 0xd2, 0xc0, 0x3a, 0xf3, 0xb2,
+0x23, 0xad, 0xae, 0x80, 0xb6, 0xab, 0x99, 0xc5, 0x63, 0xd9, 0xae, 0x8b,
+0xdd, 0xe4, 0x6c, 0xa0, 0xd7, 0x1a, 0x92, 0xa2, 0xed, 0x5c, 0xc0, 0xc5,
+0xd4, 0x2b, 0x46, 0xe3, 0x90, 0xc0, 0x1a, 0x6e, 0x74, 0xf8, 0x6a, 0x57,
+0x60, 0x45, 0x9e, 0x49, 0x2f, 0x51, 0xd9, 0xad, 0x83, 0xe1, 0xe3, 0xe0,
+0xa0, 0x17, 0x55, 0x7a, 0x49, 0xd9, 0xa2, 0x80, 0x9a, 0xd9, 0x91, 0xaa,
+0xeb, 0x7a, 0xc0, 0x37, 0x5b, 0xa5, 0xf9, 0x22, 0x94, 0xe0, 0xb7, 0x34,
+0x4d, 0x29, 0x22, 0xd9, 0xac, 0x63, 0x62, 0x1c, 0x5a, 0xa0, 0xd8, 0xdc,
+0x75, 0xb3, 0x23, 0xca, 0xe0, 0xdc, 0x53, 0xb3, 0x28, 0x62, 0x72, 0xa0,
+0xe9, 0xa3, 0x31, 0x48, 0xe5, 0xe4, 0xc0, 0xb7, 0x2b, 0xad, 0xd7, 0xa2,
+0xd9, 0xab, 0x6b, 0xdd, 0x64, 0xd6, 0x80, 0x1a, 0xce, 0x55, 0x3b, 0x38,
+0xa0, 0x80, 0xc5, 0x99, 0x6a, 0x5b, 0x1b, 0xb6, 0xa0, 0xb7, 0x4d, 0x8d,
+0xb8, 0xdf, 0xd2, 0xa1, 0x25, 0x26, 0x81, 0xb7, 0x35, 0xd9, 0x69, 0x72,
+0xe2, 0x23, 0x56, 0x40, 0x85, 0x2b, 0x92, 0x1b, 0x1c, 0x88, 0xa0, 0xa9,
+0x1b, 0x72, 0x52, 0xa5, 0xd2, 0x80, 0xee, 0x8e, 0x39, 0x3b, 0x1c, 0x88,
+0xa0, 0xc9, 0x64, 0x6e, 0x39, 0x34, 0xd9, 0xed, 0x73, 0x1e, 0x24, 0xd6,
+0x80, 0xa8, 0xf2, 0x51, 0xc6, 0x65, 0x60, 0x80, 0x66, 0xcd, 0xa2, 0xcb,
+0x25, 0xd6, 0xa0, 0xa8, 0xb4, 0x62, 0x47, 0x5d, 0x68, 0xa0, 0xb6, 0xec,
+0x6e, 0x09, 0x2d, 0xd9, 0xaa, 0x7b, 0x5e, 0x9c, 0xb4, 0xa0, 0xa9, 0x22,
+0x75, 0xc6, 0xe7, 0x72, 0xc0, 0xb9, 0x11, 0x73, 0xaa, 0x9c, 0x56, 0xe0,
+0xad, 0x15, 0x76, 0x44, 0xe5, 0xa8, 0xa0, 0x34, 0xed, 0xf0, 0xd8, 0xb0,
+0xd9, 0x6c, 0x73, 0x22, 0x6d, 0x91, 0x20, 0xcc, 0xa2, 0x8d, 0x3b, 0x1a,
+0xe6, 0xa0, 0xbc, 0xda, 0xae, 0xbb, 0x1b, 0x5e, 0xa0, 0xc9, 0x63, 0x70,
+0xd7, 0x23, 0xd4, 0xc0, 0xa9, 0x65, 0x6e, 0x46, 0xa9, 0xd9, 0xac, 0x84,
+0xa1, 0xa4, 0x97, 0x20, 0xd3, 0x55, 0x92, 0x34, 0x9c, 0x8a, 0xe0, 0xca,
+0x4d, 0xd0, 0xb9, 0x59, 0x84, 0xc0, 0xdc, 0xdb, 0xb5, 0x3a, 0x9e, 0xb0,
+0xc0, 0x32, 0xe2, 0xab, 0xaf, 0x54, 0xda, 0x2c, 0x8c, 0x5d, 0xe5, 0x87,
+0x20, 0xc9, 0x2c, 0x29, 0x4b, 0x29, 0x72, 0xc0, 0x3a, 0xde, 0x26, 0x3d,
+0xd5, 0x98, 0xa0, 0xb7, 0x64, 0x6e, 0x3a, 0x75, 0xdc, 0x80, 0xc9, 0x13,
+0xca, 0x49, 0x1b, 0xd9, 0xec, 0x74, 0x26, 0x1c, 0x6c, 0xc0, 0xb4, 0x6c,
+0x6a, 0xe9, 0x13, 0xba, 0xa0, 0xb4, 0x64, 0x76, 0x57, 0x4a, 0x8a, 0xc0,
+0xc6, 0xe4, 0xc6, 0x2b, 0x9c, 0xe2, 0xa0, 0x19, 0x04, 0x59, 0x18, 0xf6,
+0xd9, 0xaf, 0x8b, 0xdd, 0xa4, 0x75, 0x00, 0x9a, 0xe4, 0x72, 0xb6, 0xe4,
+0x79, 0x40, 0xc6, 0xdc, 0xad, 0x48, 0xe9, 0xb6, 0x80, 0x79, 0x63, 0x91,
+0xc6, 0x3e, 0x5c, 0xc0, 0xb3, 0x1c, 0x6a, 0x4b, 0x1c, 0xda, 0x30, 0x7c,
+0x22, 0x64, 0xd4, 0xa0, 0x14, 0xf8, 0x71, 0x46, 0xc1, 0xd0, 0xe0, 0xe8,
+0x9c, 0x8e, 0x49, 0x1d, 0xd8, 0x80, 0x29, 0x1b, 0x55, 0xcf, 0x4c, 0xd8,
+0x20, 0x38, 0xa9, 0x73, 0x7a, 0x79, 0xd9, 0xae, 0x8b, 0xdd, 0xdd, 0x83,
+0x60, 0xa9, 0x14, 0x73, 0x38, 0xac, 0xad, 0x40, 0xb6, 0x6d, 0xb1, 0x38,
+0xe3, 0x5c, 0xe0, 0xc8, 0xe4, 0x92, 0xc6, 0xb3, 0x95, 0x20, 0x34, 0xdc,
+0x6e, 0xb1, 0x74, 0xd9, 0xf0, 0x74, 0x22, 0x24, 0x6a, 0xa0, 0xd3, 0x53,
+0x6f, 0x36, 0x9d, 0x5a, 0xe0, 0x22, 0xf6, 0x91, 0x48, 0xd8, 0xc6, 0xc0,
+0x6f, 0x1b, 0x33, 0x17, 0x35, 0xd4, 0xa0, 0xb7, 0x6b, 0x6b, 0xa8, 0xec,
+0xd9, 0xac, 0x73, 0xa2, 0x25, 0xe8, 0x80, 0x43, 0x62, 0x55, 0x64, 0xd3,
+0x92, 0xe0, 0xc5, 0x1c, 0xa9, 0xb7, 0x9b, 0xe2, 0xc0, 0xa9, 0x93, 0x72,
+0x39, 0x61, 0xa4, 0xe0, 0x67, 0x17, 0x78, 0xb6, 0xdd, 0xd9, 0xf1, 0x9b,
+0x61, 0xe2, 0x9a, 0xe0, 0xb9, 0x14, 0x91, 0xd5, 0x9b, 0xe2, 0x80, 0xb8,
+0x63, 0x8e, 0x48, 0x9c, 0x6a, 0x80, 0xd8, 0xda, 0x6e, 0x66, 0xe5, 0xc2,
+0xa0, 0xb3, 0x23, 0x6e, 0xc9, 0x53, 0xd9, 0xad, 0x83, 0xda, 0x2c, 0x96,
+0xa0, 0xbc, 0xe1, 0x9a, 0x25, 0x24, 0x60, 0x80, 0x27, 0x96, 0x5a, 0x35,
+0x1a, 0x9a, 0xe0, 0x59, 0x24, 0x90, 0x63, 0xb2, 0xd8, 0xc0, 0xc3, 0x64,
+0x72, 0x37, 0x1d, 0xd9, 0x6d, 0x83, 0xe1, 0xe4, 0x64, 0xe0, 0xca, 0xe1,
+0x92, 0x45, 0x63, 0xe0, 0xa0, 0x52, 0x74, 0xb1, 0x66, 0x91, 0x54, 0x80,
+0x2f, 0x89, 0xb3, 0x2f, 0x62, 0x68, 0x80, 0xa9, 0x1b, 0x7a, 0xb3, 0x71,
+0xd9, 0xf1, 0x8b, 0xa1, 0xa5, 0xc2, 0xc0, 0x1f, 0x12, 0xce, 0x09, 0x31,
+0x94, 0x00, 0x2c, 0xa3, 0x9d, 0x57, 0x3c, 0xe4, 0x80, 0x12, 0xe4, 0x36,
+0x57, 0x4b, 0xe0, 0xc0, 0x57, 0x6a, 0x36, 0x39, 0x1c, 0xd9, 0xad, 0x6b,
+0xde, 0x5d, 0xe0, 0xe0, 0xb7, 0x22, 0xd2, 0xa7, 0x2b, 0x52, 0x80, 0xc5,
+0x5c, 0x6e, 0x55, 0x54, 0x65, 0x40, 0xa9, 0x2b, 0x35, 0xb4, 0xec, 0x68,
+0xc0, 0xa5, 0xab, 0x55, 0x55, 0x2c, 0xd9, 0xac, 0x83, 0xe1, 0xe5, 0xf0,
+0xa0, 0x59, 0x15, 0x2e, 0x76, 0x6e, 0x67, 0x20, 0xd6, 0x1c, 0x6e, 0x4a,
+0xca, 0x66, 0x80, 0xcc, 0xdb, 0x76, 0x55, 0x5c, 0xda, 0xe0, 0x42, 0xb5,
+0x85, 0xe9, 0x0e, 0xda, 0x2d, 0x73, 0x61, 0xec, 0xbe, 0xa0, 0xc6, 0xa6,
+0x90, 0x39, 0x1c, 0x52, 0x80, 0xaa, 0xab, 0x79, 0x3c, 0xa9, 0xaa, 0xc0,
+0x4a, 0x24, 0xd1, 0x39, 0x7e, 0xce, 0xc0, 0x89, 0x24, 0x52, 0xc6, 0xe3,
+0xd6, 0xe2, 0x6d, 0xaa, 0xec, 0x9a, 0xc0, 0xb7, 0x26, 0x51, 0x57, 0x1b,
+0xae, 0xa0, 0x75, 0x2c, 0x67, 0x38, 0xcd, 0xc9, 0xe1, 0x49, 0x1e, 0xb9,
+0x29, 0x7a, 0x57, 0xeb, 0x37, 0xcb, 0x92, 0xb6, 0xe3, 0xd3, 0xa1, 0xbc,
+0xfd, 0xaf, 0x8d, 0xd3, 0x3b, 0x99, 0x33, 0xf8, 0x1d, 0x61, 0x50, 0xf4,
+0x55, 0x3d, 0x70, 0x85, 0xa7, 0x6e, 0x35, 0x07, 0xd4, 0x80, 0xef, 0xac,
+0xf2, 0xd6, 0xd5, 0x71, 0xb7, 0x2f, 0xd3, 0x62, 0xcc, 0xbd, 0x6e, 0x7f,
+0x14, 0x0a, 0x64, 0x69, 0x6a, 0xca, 0x86, 0xb2, 0x6c, 0x89, 0xba, 0x41,
+0x97, 0x7d, 0x53, 0x62, 0x97, 0xb0, 0xb9, 0xab, 0x7d, 0x11, 0x96, 0xba,
+0xa5, 0xbc, 0xda, 0xd3, 0x64, 0xbc, 0xb6, 0x37, 0xdd, 0x32, 0x5c, 0x92,
+0x7a, 0x42, 0xd7, 0xe6, 0x91, 0x88, 0xdd, 0x49, 0xfc, 0x81, 0xc3, 0xb1,
+0x6a, 0xd0, 0xba, 0xd1, 0x9a, 0x8b, 0x12, 0x8b, 0x21, 0x8b, 0xc6, 0x9c,
+0xd3, 0x64, 0xc4, 0x79, 0xf6, 0xb3, 0x6f, 0x76, 0x56, 0x79, 0x50, 0xde,
+0xad, 0xcf, 0xcf, 0x5b, 0x38, 0xf1, 0xc6, 0x98, 0x0e, 0x8a, 0xe5, 0x06,
+0xfe, 0x81, 0xc2, 0xd1, 0x7a, 0xc2, 0xbb, 0x21, 0x5f, 0xd3, 0xa2, 0xbc,
+0xb5, 0xef, 0xe5, 0xee, 0xd5, 0x1a, 0xc3, 0x2f, 0x69, 0x54, 0xd0, 0xb3,
+0xa7, 0x11, 0x67, 0x0c, 0xad, 0xee, 0x28, 0x5d, 0xb5, 0xa7, 0x30, 0xe2,
+0x50, 0xc5, 0x39, 0x2e, 0xf8, 0x0b, 0xd3, 0x64, 0xbc, 0xaa, 0xef, 0xc2,
+0xd0, 0x7a, 0x82, 0xdb, 0x10, 0xb5, 0xe5, 0x4d, 0xc1, 0x66, 0x2f, 0x33,
+0x85, 0x54, 0xcf, 0x27, 0x9e, 0x19, 0x75, 0x06, 0xad, 0x2e, 0x0c, 0x6a,
+0x92, 0x44, 0xf8, 0xd3, 0x64, 0xc4, 0xee, 0xa7, 0xbc, 0xaf, 0xb5, 0x7a,
+0x2a, 0x78, 0x82, 0xc4, 0xaf, 0xfb, 0x0a, 0x7b, 0xd0, 0x9e, 0xef, 0xf0,
+0x41, 0x57, 0x31, 0x39, 0x32, 0x5d, 0xf2, 0x14, 0xbc, 0x85, 0xcb, 0x51,
+0xd2, 0xe8, 0xc3, 0xee, 0xf6, 0xa1, 0x2f, 0x0f, 0x71, 0x4e, 0xda, 0xe9,
+0xde, 0x0f, 0x25, 0x7d, 0x21, 0xee, 0xc1, 0x67, 0x2f, 0x7a, 0x8a, 0xba,
+0x34, 0xed, 0x8b, 0xd1, 0x37, 0x9c, 0x55, 0x75, 0x0c, 0xd3, 0x27, 0xcb,
+0xab, 0x77, 0x55, 0x50, 0x1b, 0xd3, 0x19, 0x75, 0x07, 0x8b, 0x4f, 0x3b,
+0x7a, 0x43, 0x6a, 0xe0, 0xe8, 0x6e, 0x4d, 0x98, 0x53, 0xe4, 0x0c, 0xe4,
+0x6e, 0x7a, 0x43, 0xd6, 0xa0, 0xf6, 0xd2, 0xac, 0xbb, 0xb6, 0xbf, 0xc0,
+0xcf, 0x52, 0x1d, 0x58, 0x45, 0x5c, 0x8b, 0x4e, 0x77, 0x15, 0x5e, 0x22,
+0xe6, 0x9c, 0xcd, 0x5b, 0x0d, 0xca, 0x29, 0xe9, 0x60, 0xad, 0xa9, 0x73,
+0x0a, 0xfc, 0x42, 0xd2, 0xab, 0xbc, 0x36, 0x3f, 0x65, 0x2c, 0x6c, 0xc8,
+0x7b, 0x40, 0x25, 0xab, 0x4e, 0xb2, 0xed, 0x54, 0x76, 0xd5, 0xa7, 0x4d,
+0x43, 0x9f, 0x19, 0xe5, 0x54, 0xe9, 0x4a, 0x7b, 0x83, 0xcb, 0x27, 0xb1,
+0xd2, 0x6e, 0xcd, 0xa9, 0xec, 0xe8, 0xad, 0x29, 0x2b, 0x0d, 0xf6, 0x8b,
+0x89, 0x48, 0xe0, 0x87, 0xc8, 0xc5, 0x6d, 0xc7, 0x2c, 0x48, 0x9b, 0xf8,
+0xa7, 0xa7, 0xef, 0x4e, 0xd5, 0x57, 0x1c, 0xd7, 0x56, 0xd2, 0x6e, 0xdd,
+0x6d, 0x92, 0x68, 0xa9, 0x46, 0xd2, 0xe5, 0xac, 0xe9, 0xbe, 0x65, 0x29,
+0xd2, 0x53, 0x60, 0x0d, 0xdc, 0x6b, 0x58, 0x8c, 0xb9, 0x93, 0x77, 0x67,
+0xad, 0xc6, 0x6c, 0x91, 0x37, 0x4f, 0xd2, 0x6d, 0xdc, 0xee, 0x6c, 0x89,
+0xce, 0x51, 0x97, 0x1c, 0x53, 0xa5, 0x5e, 0x09, 0xf0, 0x53, 0xf4, 0x93,
+0x73, 0x80, 0x4a, 0x19, 0xea, 0x0a, 0xf8, 0x43, 0x87, 0x69, 0xd6, 0x95,
+0xd5, 0x87, 0x6e, 0xd2, 0x72, 0xe6, 0x31, 0xdb, 0x67, 0x0a, 0x98, 0x5b,
+0xba, 0x84, 0x37, 0xd9, 0xa8, 0x8f, 0x35, 0x43, 0x2d, 0x54, 0x68, 0xaa,
+0x0b, 0xb3, 0x46, 0x5b, 0x12, 0xba, 0x66, 0xfb, 0x01, 0x7f, 0x42, 0x57,
+0xd2, 0x72, 0xde, 0xb2, 0x23, 0xba, 0xc9, 0xc8, 0x9b, 0x76, 0xc0, 0xd7,
+0xbb, 0x8a, 0xba, 0x9b, 0xf2, 0x18, 0xbd, 0x69, 0x6b, 0x22, 0xfe, 0x4c,
+0xbf, 0x53, 0xd9, 0x28, 0x89, 0xe9, 0xa3, 0x6a, 0x62, 0xd2, 0x73, 0xde,
+0x25, 0x22, 0xd8, 0xc4, 0xce, 0xa0, 0x8e, 0x58, 0xa1, 0xb4, 0xe7, 0x4d,
+0x0b, 0x5e, 0xb2, 0x67, 0xd9, 0x09, 0xe8, 0xca, 0x9a, 0x24, 0xf7, 0x8d,
+0x49, 0x94, 0xfd, 0x4d, 0x5b, 0x8e, 0xd2, 0x72, 0xdd, 0x29, 0x5b, 0x64,
+0x88, 0x07, 0xb2, 0x61, 0xdc, 0x98, 0xdc, 0xa4, 0x66, 0x2a, 0xce, 0x26,
+0x9b, 0xda, 0xa8, 0x3b, 0x19, 0x73, 0x50, 0x97, 0xe5, 0xa9, 0xa1, 0x26,
+0xe8, 0x47, 0xe4, 0xd2, 0x72, 0xdc, 0xea, 0x23, 0x6d, 0x2a, 0x0d, 0x34,
+0x4a, 0x57, 0x15, 0xb0, 0xc5, 0x19, 0xeb, 0x2d, 0x6b, 0x51, 0xdc, 0xa6,
+0x48, 0xf3, 0x4e, 0xe9, 0x03, 0xde, 0xa9, 0x48, 0xd9, 0x96, 0x52, 0x67,
+0xd2, 0x74, 0xde, 0x2d, 0xeb, 0x51, 0xec, 0xa4, 0xef, 0x88, 0xa9, 0xe3,
+0x6f, 0xc9, 0x82, 0xbf, 0x2c, 0xcd, 0x85, 0x69, 0x49, 0x87, 0xe4, 0x49,
+0x5c, 0xda, 0x8e, 0xc8, 0xcb, 0x5a, 0x6e, 0x72, 0xda, 0xd2, 0x70, 0xf5,
+0x75, 0xeb, 0xdc, 0xa5, 0xa6, 0xd3, 0x4a, 0xe0, 0x94, 0xdf, 0x47, 0xc6,
+0xec, 0x74, 0x45, 0xe4, 0x6d, 0x48, 0x08, 0xfd, 0x51, 0xbb, 0x8f, 0x75,
+0x90, 0x51, 0x63, 0x6e, 0x48, 0x9b, 0xd2, 0x70, 0xde, 0x6d, 0xd4, 0x90,
+0x05, 0x2d, 0xf1, 0x06, 0xfc, 0x83, 0xb6, 0x48, 0x5a, 0x8c, 0x9a, 0x32,
+0xdf, 0xd7, 0x47, 0xc5, 0x53, 0xd8, 0x61, 0x9e, 0x6b, 0x08, 0x0c, 0x6d,
+0x8a, 0x8b, 0x5d, 0xd2, 0x6d, 0xdd, 0xe9, 0x5b, 0x50, 0x86, 0x99, 0x30,
+0xe6, 0xb8, 0xe1, 0xdc, 0xa6, 0xab, 0x2b, 0x2e, 0xe8, 0x86, 0xda, 0xc8,
+0x58, 0x8d, 0x99, 0x23, 0x6f, 0x6b, 0xc8, 0x47, 0x25, 0x70, 0xf7, 0x46,
+0xd2, 0x6d, 0xd5, 0xa9, 0xa3, 0x89, 0x27, 0x9e, 0x39, 0x76, 0x13, 0x1f,
+0xc2, 0x85, 0xf6, 0x9b, 0xc2, 0x2a, 0xe8, 0xc2, 0xe5, 0xcb, 0x59, 0x73,
+0xb4, 0x5e, 0xc3, 0x47, 0xd8, 0x5a, 0x9e, 0x21, 0x37, 0xd2, 0x72, 0xe6,
+0x2d, 0xa2, 0x93, 0xc7, 0x12, 0xb4, 0x90, 0x63, 0xde, 0x95, 0x29, 0x0a,
+0x75, 0x85, 0x9b, 0x92, 0x68, 0xc8, 0x89, 0xdc, 0x46, 0x69, 0x12, 0xda,
+0x85, 0x5d, 0x24, 0x0e, 0x69, 0x03, 0xd2, 0x71, 0xde, 0xb6, 0x94, 0xdc,
+0xa5, 0xcc, 0xd0, 0x7b, 0x60, 0x15, 0xe1, 0x6a, 0x42, 0xe5, 0xb4, 0x45,
+0xad, 0x91, 0x29, 0x8c, 0xa6, 0x86, 0x99, 0x65, 0x8a, 0xc9, 0x07, 0x6e,
+0x45, 0x5d, 0x51, 0xd2, 0x70, 0xe6, 0x2d, 0x9b, 0xb6, 0xe7, 0xd9, 0x60,
+0x76, 0x46, 0x24, 0xda, 0xc8, 0xc8, 0xd4, 0x76, 0x33, 0x1f, 0xd9, 0x69,
+0xb6, 0xdc, 0xcd, 0x45, 0xd4, 0xd9, 0xc9, 0xb8, 0xe6, 0x3d, 0x4a, 0xd7,
+0xd2, 0x6c, 0xed, 0xa5, 0xa2, 0xb7, 0x06, 0x9b, 0x18, 0xed, 0xc4, 0x3b,
+0xda, 0xa4, 0x36, 0xfa, 0x4d, 0xf8, 0x0b, 0xe4, 0xc8, 0x56, 0x14, 0xd9,
+0x13, 0x7c, 0x51, 0xc9, 0x91, 0x3d, 0x80, 0x6f, 0x19, 0xd2, 0x6d, 0xed,
+0xa1, 0xaa, 0x8c, 0xc7, 0xac, 0xec, 0x19, 0x48, 0xcf, 0xa2, 0x85, 0x1d,
+0x68, 0xc6, 0xd6, 0xa9, 0xc4, 0xc6, 0xc9, 0x59, 0x52, 0xf4, 0x5c, 0xe4,
+0xa8, 0x5c, 0x9a, 0x9e, 0x40, 0xae, 0xd2, 0x6c, 0xdf, 0x2d, 0xe2, 0x65,
+0x49, 0xc0, 0xe4, 0xac, 0x75, 0x24, 0x83, 0x29, 0x8e, 0x9d, 0x67, 0x99,
+0x54, 0xa2, 0xe8, 0x39, 0x17, 0x4d, 0xb9, 0xc2, 0xe4, 0xa7, 0x29, 0x71,
+0x43, 0x78, 0x0b, 0xd2, 0x6d, 0xe7, 0x72, 0x64, 0xee, 0xa7, 0xf8, 0x02,
+0xfd, 0xa0, 0xb5, 0x8b, 0x46, 0xb4, 0x2b, 0x99, 0x52, 0x7f, 0xc7, 0x49,
+0x8a, 0xaf, 0x51, 0x2f, 0x8e, 0x98, 0x88, 0x22, 0xf4, 0xc8, 0x3f, 0x70,
+0xd2, 0x6f, 0xe6, 0xa5, 0xa3, 0x6a, 0x85, 0x09, 0xf1, 0x45, 0xec, 0x91,
+0x69, 0x64, 0xd7, 0x81, 0x7e, 0xa0, 0xa7, 0xd8, 0xc7, 0x20, 0xa6, 0xb0,
+0x55, 0x7c, 0xb9, 0x48, 0x1b, 0x36, 0x11, 0xdb, 0x47, 0xd2, 0x6c, 0xd5,
+0xa9, 0xda, 0x50, 0x87, 0x88, 0xf0, 0xa9, 0xca, 0x71, 0x98, 0xa4, 0x8c,
+0x72, 0x6b, 0x54, 0x46, 0xac, 0x86, 0x7a, 0xca, 0x9e, 0xa0, 0xaf, 0x65,
+0xca, 0x33, 0x25, 0xac, 0x67, 0x2b, 0xd2, 0x6d, 0xed, 0x26, 0x23, 0xcd,
+0xe9, 0x65, 0x64, 0x19, 0x4c, 0xd5, 0xb0, 0xc6, 0xb7, 0x26, 0x64, 0xdd,
+0xca, 0xe8, 0xa4, 0xa9, 0x69, 0x51, 0xf8, 0x0b, 0xe2, 0xe6, 0x68, 0x8c,
+0xd5, 0xa1, 0x77, 0xd2, 0x6e, 0xee, 0xad, 0xab, 0xd9, 0xa8, 0x20, 0x35,
+0xb0, 0x39, 0x3a, 0x75, 0x48, 0x8b, 0x25, 0x16, 0x49, 0x45, 0x96, 0xa5,
+0x11, 0xf1, 0xe0, 0x7b, 0x20, 0xb6, 0xe7, 0x3b, 0xa0, 0x37, 0x74, 0x1a,
+0xd2, 0x72, 0xee, 0xae, 0x24, 0x6f, 0x66, 0x68, 0x0b, 0xba, 0x20, 0xd6,
+0xb7, 0x88, 0xda, 0x19, 0xba, 0x88, 0x9e, 0x6b, 0x48, 0x06, 0x6f, 0x78,
+0x2b, 0xde, 0x94, 0xa8, 0x87, 0xf2, 0x41, 0xfc, 0x9a, 0xd2, 0x70, 0xdd,
+0xee, 0x1b, 0x90, 0xa5, 0x3d, 0x70, 0x4a, 0xdc, 0x92, 0xb6, 0xa4, 0xc8,
+0xd2, 0xb7, 0xc0, 0x9c, 0xe3, 0x4b, 0x22, 0xed, 0xac, 0x59, 0x6a, 0x97,
+0xaa, 0x0e, 0xf4, 0x47, 0x4b, 0x4b, 0xd2, 0x6c, 0xe6, 0x25, 0x5b, 0x68,
+0x85, 0x87, 0x2b, 0xc2, 0x19, 0x69, 0xde, 0x65, 0xc9, 0x91, 0x57, 0x52,
+0x1d, 0xda, 0x85, 0x7a, 0xc8, 0xfa, 0xb0, 0x3f, 0x87, 0x89, 0xd6, 0x64,
+0xb5, 0x88, 0xf2, 0xd2, 0x6e, 0xe5, 0x65, 0xab, 0x69, 0x28, 0xae, 0x6a,
+0x71, 0xa7, 0x5e, 0x7e, 0xa5, 0x47, 0xc8, 0xcd, 0xd7, 0x5a, 0xc2, 0xe6,
+0x3b, 0x62, 0x6b, 0xd4, 0x5d, 0xec, 0xc8, 0xca, 0x54, 0xb6, 0x31, 0xa5,
+0xd2, 0x72, 0xf5, 0xaa, 0x23, 0x51, 0xea, 0x21, 0x65, 0x88, 0x49, 0x2b,
+0x6a, 0xc9, 0x04, 0x77, 0x50, 0x3d, 0xdc, 0x68, 0xa9, 0x07, 0x74, 0x81,
+0xcd, 0x21, 0x94, 0xa5, 0x4f, 0x39, 0x4b, 0x5a, 0x4a, 0xd2, 0x73, 0xe6,
+0x2e, 0xa4, 0xdd, 0x46, 0xd9, 0x0a, 0x52, 0xf0, 0x8e, 0x71, 0x89, 0x6a,
+0x0a, 0xbe, 0x84, 0xf7, 0x6d, 0x2b, 0x0a, 0x6e, 0x8a, 0x2b, 0x5b, 0x8c,
+0xa9, 0x05, 0x7c, 0x81, 0xcd, 0x99, 0xd2, 0x6d, 0xe7, 0x2d, 0x1c, 0xb6,
+0x86, 0x5d, 0x24, 0x0e, 0x4b, 0x0c, 0xd6, 0xc5, 0x4e, 0x9b, 0x6e, 0xd3,
+0x84, 0xe2, 0xc9, 0xa4, 0xee, 0x8c, 0x49, 0x6c, 0x53, 0x0a, 0x88, 0xec,
+0x66, 0xbb, 0x19, 0xd2, 0x6e, 0xe5, 0xe9, 0xda, 0x8e, 0x86, 0x93, 0x23,
+0xe5, 0xa9, 0x30, 0xa2, 0xe5, 0xdd, 0x81, 0x77, 0x50, 0x25, 0xad, 0x27,
+0xfc, 0xd0, 0xb7, 0xb2, 0xa7, 0x6d, 0x68, 0xa3, 0x5e, 0x8c, 0x75, 0x1c,
+0xd2, 0x6b, 0xe5, 0xe2, 0x22, 0xa7, 0x28, 0x88, 0xbc, 0x4a, 0x8b, 0x14,
+0xc3, 0x66, 0x58, 0x47, 0x59, 0xb5, 0x0e, 0xc0, 0xa4, 0x09, 0xb0, 0x47,
+0xf6, 0x43, 0x87, 0x27, 0x48, 0x5a, 0xf3, 0x22, 0xb5, 0xd2, 0x6d, 0xe6,
+0x6e, 0x1b, 0x65, 0x48, 0xc1, 0x2c, 0xc8, 0x74, 0xf4, 0x83, 0x8b, 0x18,
+0x66, 0xa6, 0x1b, 0x99, 0x9a, 0xe7, 0x38, 0xde, 0x70, 0x67, 0x8c, 0xe8,
+0x25, 0xab, 0x38, 0x4a, 0xfc, 0x03, 0xd2, 0x71, 0xef, 0x6d, 0xe3, 0x8a,
+0xc8, 0x68, 0x8a, 0x9a, 0xb0, 0x9d, 0xd9, 0x29, 0xd6, 0x1b, 0xbc, 0xa2,
+0xfe, 0x67, 0x09, 0x16, 0x56, 0xf1, 0x97, 0x7b, 0x8c, 0x88, 0x11, 0x3d,
+0xa1, 0xbd, 0xa1, 0xd2, 0x71, 0xe6, 0xdd, 0xea, 0x94, 0xa6, 0x3e, 0xe9,
+0x4f, 0x48, 0x94, 0xb8, 0xc4, 0xa8, 0xd3, 0xb3, 0x20, 0x9f, 0xb7, 0x84,
+0x7a, 0x32, 0x7c, 0x8b, 0x0f, 0x67, 0x27, 0x28, 0x17, 0xae, 0x09, 0xb5,
+0xd2, 0x6d, 0xdd, 0xe1, 0xaa, 0xad, 0x47, 0x83, 0xaf, 0x61, 0x4b, 0xda,
+0xde, 0xe3, 0xf6, 0xd4, 0x3e, 0xc4, 0x56, 0xb8, 0xe7, 0xc8, 0x55, 0xb9,
+0x87, 0xae, 0xe5, 0xca, 0x00, 0xef, 0x68, 0xdd, 0x62, 0xd2, 0x6b, 0xe5,
+0xe1, 0xeb, 0x89, 0x08, 0x9c, 0x95, 0x67, 0xa2, 0xe4, 0x8b, 0x68, 0xb0,
+0xed, 0x88, 0x4b, 0x5b, 0xa2, 0xc6, 0x17, 0xf2, 0x2e, 0x76, 0x55, 0xa2,
+0xa7, 0x78, 0xca, 0xba, 0xb1, 0x36, 0xd2, 0x6d, 0xe7, 0x25, 0xeb, 0xe6,
+0xa7, 0xb2, 0x2d, 0x90, 0x27, 0x2d, 0x93, 0x09, 0x9d, 0x14, 0x67, 0x94,
+0xe3, 0xe0, 0x87, 0x26, 0xaa, 0xe9, 0x19, 0x7a, 0xe2, 0xa6, 0x29, 0xf9,
+0x47, 0xea, 0x0b, 0xd2, 0x71, 0xef, 0x65, 0xf3, 0x8b, 0x46, 0xe8, 0x99,
+0x7a, 0xe0, 0x0d, 0xb5, 0x89, 0xd8, 0x9a, 0xb6, 0x96, 0x9f, 0x6b, 0x67,
+0xb0, 0x76, 0x74, 0x2b, 0x37, 0xb7, 0x47, 0x09, 0xdb, 0x83, 0x64, 0xf9,
+0xd2, 0x6f, 0xe6, 0x65, 0xe3, 0xda, 0xe3, 0x7d, 0x18, 0x52, 0xd8, 0x0e,
+0xb6, 0xa6, 0x4a, 0x91, 0xae, 0xc1, 0x14, 0xdb, 0xe9, 0x33, 0xd2, 0x8c,
+0x68, 0xe2, 0x7d, 0x09, 0x86, 0xaf, 0xa2, 0x1b, 0xb2, 0xd2, 0x70, 0xdd,
+0xdd, 0xa2, 0x6a, 0x86, 0x06, 0x73, 0xc5, 0xa9, 0xa0, 0x6a, 0x84, 0x3a,
+0xf9, 0x2a, 0x7c, 0x49, 0xda, 0xe5, 0xda, 0x46, 0x9e, 0x83, 0x37, 0x67,
+0x68, 0x41, 0x1e, 0xcd, 0x45, 0x6d, 0xd2, 0x6d, 0xe5, 0xa5, 0xe3, 0x8f,
+0x09, 0x0a, 0x64, 0x67, 0x28, 0xe3, 0x9e, 0xe5, 0x59, 0x46, 0x35, 0x49,
+0x0d, 0xe6, 0xc4, 0xcd, 0x98, 0x2f, 0xf2, 0x1d, 0xda, 0xa6, 0x6c, 0xc2,
+0xb7, 0x41, 0x2e, 0xd2, 0x71, 0xf5, 0xe5, 0x6a, 0x70, 0x88, 0x28, 0x24,
+0xd1, 0x88, 0xe7, 0xd9, 0x67, 0xc4, 0xfc, 0x18, 0x4b, 0x1f, 0xb9, 0x28,
+0x09, 0x24, 0x8a, 0x56, 0xe3, 0x96, 0xa4, 0xce, 0xeb, 0x2f, 0xda, 0x43,
+0xd2, 0x70, 0xe6, 0x72, 0x9b, 0xe2, 0xe8, 0x56, 0x92, 0xb6, 0x22, 0xe7,
+0xb7, 0x89, 0x4a, 0x62, 0x76, 0x0c, 0xa4, 0x8d, 0xa7, 0x9e, 0x57, 0xaf,
+0x83, 0x67, 0x96, 0xc8, 0x1b, 0xea, 0x46, 0x69, 0x19, 0xd2, 0x72, 0xfd,
+0xa9, 0xa3, 0x72, 0xc4, 0xdc, 0xe0, 0x13, 0xe6, 0x0c, 0xe2, 0xa7, 0x6a,
+0x91, 0x7f, 0xc0, 0x66, 0x6f, 0x08, 0x5a, 0x55, 0xda, 0x08, 0x7d, 0x8d,
+0xe8, 0x50, 0xa6, 0x90, 0xb9, 0x6e, 0xd2, 0x6e, 0xed, 0x29, 0xdb, 0xda,
+0x87, 0x89, 0x32, 0x89, 0xca, 0xa3, 0xb6, 0x05, 0x39, 0x72, 0x2a, 0xea,
+0x83, 0xd8, 0xc5, 0x2c, 0xcc, 0x77, 0x21, 0x67, 0x91, 0x86, 0xa8, 0x34,
+0xad, 0x8e, 0xe4, 0xd2, 0x6e, 0xed, 0x25, 0xe2, 0xaf, 0x43, 0xc4, 0xb5,
+0x14, 0x9b, 0x9e, 0xba, 0x84, 0x8c, 0xe0, 0xae, 0x38, 0x6b, 0xda, 0xa4,
+0xa9, 0x2c, 0x0f, 0x58, 0x44, 0xb7, 0x24, 0xed, 0x01, 0xbb, 0xa0, 0xa6,
+0xd2, 0x6e, 0xd6, 0x31, 0xdb, 0x5f, 0x09, 0xc8, 0x14, 0xd5, 0x8a, 0xad,
+0x97, 0xa8, 0xaf, 0x1b, 0x2b, 0xc9, 0x14, 0x8a, 0x83, 0x92, 0x7b, 0xe2,
+0x1d, 0xb0, 0xe2, 0x24, 0x9b, 0x79, 0x27, 0x7a, 0x03, 0xd2, 0x70, 0xe7,
+0x6e, 0x5b, 0x8b, 0x46, 0xf6, 0xc3, 0x96, 0x42, 0xd4, 0x95, 0x87, 0x56,
+0x24, 0xb6, 0x0c, 0x7c, 0x67, 0x28, 0xb8, 0x5d, 0xae, 0x09, 0x34, 0x68,
+0xe6, 0x89, 0xed, 0x0d, 0x6b, 0x4a, 0xd2, 0x34, 0xe5, 0xad, 0x2a, 0xba,
+0xa4, 0x3e, 0xea, 0x2b, 0x56, 0x86, 0xd8, 0xc7, 0xb8, 0x5e, 0x91, 0x97,
+0xe3, 0xf1, 0x66, 0xb1, 0x74, 0x65, 0xf8, 0x62, 0x65, 0x48, 0x3f, 0x1a,
+0x36, 0xc6, 0xd7, 0xd2, 0x6d, 0xcd, 0xad, 0x1b, 0x86, 0xa4, 0x4c, 0x12,
+0xe5, 0xc7, 0x19, 0xa2, 0xc2, 0xa5, 0x2a, 0xa2, 0xc6, 0x58, 0xe6, 0xa3,
+0x1e, 0xd9, 0x77, 0xa0, 0x27, 0xcf, 0xc6, 0xb3, 0x64, 0x8c, 0x75, 0x6c,
+0xd2, 0x6b, 0xd5, 0xed, 0xa2, 0xcd, 0xa6, 0xc8, 0xfc, 0x47, 0xa9, 0x1d,
+0x7c, 0x84, 0x78, 0x89, 0xd2, 0x14, 0xbb, 0xc4, 0xc3, 0x99, 0x98, 0x53,
+0xc2, 0x67, 0xe6, 0xa4, 0xe4, 0x15, 0xb6, 0x83, 0x3d, 0xd2, 0x6b, 0xdf,
+0x29, 0xea, 0x67, 0xc5, 0x26, 0x9e, 0x70, 0xf4, 0xde, 0x67, 0x05, 0x0b,
+0x23, 0x8b, 0xa8, 0xab, 0xa4, 0x86, 0x59, 0x12, 0xf1, 0xa6, 0xba, 0xa4,
+0xc3, 0xa9, 0xb8, 0x2e, 0xf6, 0x05, 0xd2, 0x6d, 0xf7, 0x69, 0xf2, 0xc6,
+0xc4, 0xd6, 0x8b, 0x9a, 0x21, 0x1e, 0x93, 0x06, 0xb4, 0x6b, 0xad, 0x9e,
+0xa4, 0x68, 0xa4, 0xd8, 0x7c, 0xae, 0x05, 0xe6, 0xdf, 0x02, 0xb3, 0x3a,
+0xc9, 0x8e, 0xfb, 0xd2, 0x6e, 0xee, 0x66, 0x1a, 0x6e, 0xc4, 0x4a, 0x70,
+0x4f, 0x66, 0x4c, 0x8f, 0x65, 0x58, 0x94, 0x9c, 0xa7, 0x1f, 0x93, 0xc8,
+0x33, 0x65, 0x6c, 0x77, 0x22, 0x66, 0xa5, 0x06, 0xb7, 0x83, 0x99, 0xab,
+0xd2, 0x6d, 0xe5, 0xa5, 0x22, 0x53, 0x05, 0x0f, 0x21, 0x8e, 0x2a, 0x69,
+0xda, 0x03, 0x8b, 0x33, 0x2a, 0xec, 0x49, 0x8b, 0x03, 0x75, 0x58, 0xda,
+0xb4, 0xad, 0x63, 0xe8, 0x44, 0xed, 0xac, 0x55, 0xe4, 0xd2, 0x6b, 0xd5,
+0xe9, 0xe2, 0xcd, 0x84, 0x8a, 0x73, 0x6a, 0xb7, 0x1b, 0x5e, 0x83, 0x64,
+0xca, 0xf5, 0x27, 0x79, 0xc2, 0xc3, 0xbb, 0x19, 0xaf, 0xb6, 0xab, 0xe6,
+0xc3, 0xc4, 0x5e, 0xb5, 0x15, 0xdf, 0xd2, 0x6c, 0xe6, 0x36, 0x1a, 0x8b,
+0x83, 0xc4, 0x33, 0xc9, 0x8c, 0xad, 0x85, 0x25, 0x0a, 0xf4, 0x63, 0x19,
+0x55, 0x66, 0xa5, 0x0c, 0xab, 0xe5, 0xb9, 0xa8, 0xc6, 0xc4, 0xbb, 0xa8,
+0x33, 0xd4, 0x16, 0xd2, 0x6b, 0xe6, 0xf6, 0x9b, 0xc4, 0xa4, 0xca, 0x19,
+0xd6, 0xa1, 0x26, 0xa7, 0x06, 0x54, 0x6b, 0xb1, 0x8c, 0xf3, 0xef, 0x27,
+0x3e, 0x9b, 0x8f, 0x87, 0x2c, 0x66, 0xc4, 0x07, 0x2b, 0xa1, 0xcc, 0xfa,
+0xd2, 0x6d, 0xe6, 0xe6, 0x5a, 0xc4, 0xe3, 0x19, 0x69, 0x2b, 0xe6, 0x15,
+0xce, 0xc4, 0xd4, 0xd3, 0x96, 0xc1, 0x26, 0xd7, 0x24, 0xb0, 0x7c, 0xc8,
+0xcb, 0x2b, 0x5a, 0xa5, 0x88, 0x7d, 0x62, 0xa8, 0xac, 0xd2, 0x6d, 0xe5,
+0x65, 0xe2, 0xba, 0x85, 0x8f, 0x19, 0xed, 0x38, 0xf1, 0xe2, 0xc3, 0xad,
+0x20, 0x53, 0xd4, 0x14, 0xac, 0xc4, 0x9e, 0x8c, 0x99, 0xc1, 0xad, 0xcd,
+0x44, 0x60, 0x6d, 0xd0, 0x45, 0xfb, 0xd2, 0xab, 0xdd, 0xad, 0xea, 0x75,
+0x05, 0x1a, 0xf9, 0x45, 0xc9, 0xa1, 0xba, 0xa4, 0x17, 0xf1, 0x46, 0x48,
+0xe9, 0xba, 0xc3, 0x2a, 0xab, 0x33, 0x78, 0x4b, 0xbf, 0x24, 0xe8, 0x99,
+0x97, 0x52, 0x26, 0xd2, 0x6e, 0xee, 0x31, 0xe2, 0x6d, 0xc7, 0x74, 0x24,
+0x90, 0xd4, 0xe9, 0x90, 0xa6, 0x1a, 0xa4, 0x67, 0xa8, 0xdd, 0x76, 0xa6,
+0x8f, 0x62, 0xa2, 0x4b, 0x21, 0x96, 0xa4, 0xcf, 0x71, 0x2b, 0x78, 0x05,
+0xd2, 0x6e, 0xdf, 0x72, 0x23, 0xe4, 0xa4, 0x6b, 0x00, 0x97, 0x32, 0x2b,
+0x93, 0x64, 0xa8, 0xe4, 0x50, 0x71, 0xd6, 0x69, 0x87, 0xae, 0xa3, 0x93,
+0x25, 0x2d, 0x6b, 0x03, 0x94, 0x3d, 0x89, 0x9b, 0x73, 0xd2, 0x6e, 0xe6,
+0x6d, 0x9b, 0x94, 0xc3, 0x2f, 0x30, 0x0f, 0xe6, 0x14, 0xd7, 0x44, 0xcc,
+0x24, 0x73, 0xa5, 0x54, 0xaf, 0x04, 0x28, 0x93, 0xeb, 0x0a, 0x27, 0x67,
+0x45, 0xa8, 0x9f, 0x6d, 0x29, 0x6d, 0xd2, 0xa7, 0xce, 0xad, 0xa2, 0x8b,
+0x07, 0x09, 0x5b, 0xcd, 0x27, 0x6a, 0x5e, 0xa4, 0x19, 0xb8, 0x2a, 0xfa,
+0x04, 0xd9, 0x23, 0x9d, 0x48, 0xf3, 0x86, 0x27, 0x93, 0x48, 0x93, 0x6c,
+0x6c, 0xf9, 0x5a, 0xd2, 0xa9, 0xdd, 0xb1, 0x6b, 0x86, 0xa5, 0x4c, 0x7c,
+0x47, 0x97, 0xd9, 0xbd, 0x63, 0xb7, 0x0f, 0xac, 0x49, 0xa5, 0xc4, 0xc3,
+0x9b, 0x59, 0x6f, 0x74, 0x14, 0x8c, 0xe5, 0xe8, 0xcc, 0x9a, 0x31, 0x26,
+0xd2, 0x6e, 0xe6, 0x2e, 0x2a, 0xb7, 0xa6, 0x42, 0x35, 0x8d, 0x26, 0xa3,
+0x66, 0xa4, 0x3a, 0x55, 0xc7, 0x87, 0xa5, 0xba, 0xa4, 0xa7, 0x91, 0xe9,
+0x59, 0x22, 0x6a, 0xc3, 0x2b, 0xaa, 0x67, 0xf4, 0x5a, 0xd2, 0x6b, 0xe7,
+0x72, 0x6b, 0x88, 0xe4, 0xd8, 0x8b, 0x96, 0x21, 0xac, 0xab, 0x84, 0x68,
+0x1d, 0xa5, 0x8e, 0xdb, 0x8b, 0xc7, 0xbe, 0xcc, 0xb6, 0x23, 0x66, 0x88,
+0xc3, 0x94, 0xdf, 0xe1, 0x2f, 0x61, 0xd2, 0xaa, 0xd7, 0x2e, 0x2a, 0xe6,
+0xc3, 0x3c, 0xf1, 0x2e, 0xe8, 0x43, 0xcc, 0xc5, 0x6a, 0xd1, 0xb3, 0xc2,
+0x95, 0xb7, 0xc5, 0xc0, 0x73, 0xd4, 0x67, 0x34, 0x67, 0x25, 0x98, 0x57,
+0xcb, 0x07, 0xba, 0xd2, 0x6c, 0xdd, 0xe9, 0x5b, 0x98, 0xa3, 0x99, 0x70,
+0x8a, 0x5a, 0x63, 0xd8, 0xc2, 0x95, 0x31, 0x4d, 0xec, 0x1c, 0xda, 0xc4,
+0x2b, 0x06, 0x8e, 0x25, 0xad, 0x8d, 0xe4, 0x35, 0xa6, 0x31, 0x75, 0xc5,
+0xd2, 0xab, 0xd6, 0x29, 0xab, 0x7d, 0x08, 0x88, 0xec, 0x66, 0x2d, 0x1a,
+0x72, 0xa4, 0x31, 0xe3, 0xc1, 0xce, 0xe0, 0xe6, 0xc3, 0x4d, 0x5a, 0x2e,
+0xf6, 0x91, 0x93, 0x64, 0x6a, 0xcb, 0x97, 0xa0, 0xb6, 0xd2, 0x6c, 0xde,
+0xee, 0x2a, 0x91, 0xc6, 0xc6, 0x2b, 0x8c, 0xd7, 0x13, 0x5d, 0x25, 0x0a,
+0x67, 0xa7, 0x8d, 0x25, 0x76, 0xa5, 0x45, 0x1b, 0xec, 0x9b, 0xb0, 0xe4,
+0xa4, 0x2d, 0xb1, 0x07, 0xf8, 0x0b, 0xd2, 0x6d, 0xe7, 0x6e, 0x6b, 0x68,
+0xc4, 0xf6, 0x52, 0xd2, 0xa4, 0xe5, 0xd7, 0x46, 0xa2, 0xec, 0x8c, 0x78,
+0xdb, 0xe8, 0xa7, 0x08, 0xe5, 0x87, 0x99, 0x64, 0x9b, 0x04, 0xc3, 0x34,
+0xae, 0x0d, 0x70, 0xd2, 0x6f, 0xee, 0xa5, 0xe2, 0x88, 0x84, 0x99, 0xe4,
+0x06, 0xe8, 0xd1, 0x92, 0xc3, 0xc8, 0x4a, 0xb7, 0x21, 0x27, 0xd7, 0x25,
+0x46, 0x6a, 0xed, 0x56, 0xbc, 0x69, 0x24, 0x2a, 0x26, 0x8b, 0x25, 0xad,
+0xd2, 0x6d, 0xed, 0x65, 0xda, 0xbb, 0x25, 0x2b, 0x18, 0xce, 0x46, 0xa2,
+0x94, 0xa2, 0x38, 0xba, 0x0e, 0xd8, 0x05, 0xd8, 0xc4, 0x4c, 0x84, 0x96,
+0xa1, 0xae, 0xd7, 0x44, 0x94, 0x6e, 0x8c, 0x67, 0xe9, 0xd2, 0xaa, 0xd6,
+0x69, 0xaa, 0x8d, 0x25, 0x24, 0x6c, 0x6d, 0x9d, 0xdd, 0xba, 0xc2, 0xb9,
+0xdc, 0x67, 0xa9, 0xd9, 0xe4, 0xe2, 0x7d, 0x49, 0x57, 0xd4, 0x1d, 0xbe,
+0xa4, 0x5a, 0xd9, 0x97, 0x40, 0x26, 0xd2, 0x6c, 0xee, 0xb2, 0x1b, 0x6d,
+0xe7, 0x52, 0xdd, 0x8c, 0x65, 0x52, 0x66, 0xa9, 0x3a, 0xe3, 0x6b, 0xa7,
+0x23, 0xbe, 0x86, 0x76, 0xe2, 0xb2, 0x29, 0x32, 0xc2, 0xc4, 0xab, 0xe8,
+0x2b, 0xf8, 0x14, 0xd2, 0x6f, 0xee, 0x72, 0x2b, 0xe4, 0xc5, 0xfa, 0x19,
+0x9a, 0xa2, 0x9e, 0x73, 0x28, 0x46, 0x2b, 0xcd, 0x46, 0xf5, 0xdb, 0x05,
+0x88, 0xe4, 0xa3, 0x25, 0x2b, 0xba, 0x84, 0xd1, 0x3c, 0x69, 0x4f, 0x31,
+0xd2, 0x6c, 0xe6, 0x69, 0xe2, 0xb8, 0xc3, 0x5d, 0x30, 0x2b, 0xe8, 0x0d,
+0x69, 0x63, 0x56, 0xc4, 0x75, 0xc3, 0xdd, 0xa9, 0x46, 0x24, 0x64, 0xd0,
+0x57, 0x25, 0xed, 0xa4, 0x06, 0x7e, 0xaa, 0x8d, 0xde, 0xd2, 0x6b, 0xde,
+0x29, 0x9b, 0xa2, 0xc3, 0x56, 0xd5, 0xa3, 0x19, 0xa0, 0xa0, 0xa3, 0xa8,
+0xf2, 0x4a, 0x68, 0x1a, 0x8d, 0x03, 0xfa, 0x18, 0xf6, 0x92, 0xff, 0x85,
+0xc8, 0x24, 0xac, 0xc8, 0x59, 0x6b, 0xd2, 0x6c, 0xd5, 0xad, 0xdb, 0x8b,
+0x06, 0x8e, 0xe2, 0x4b, 0xa8, 0xe4, 0xa9, 0x05, 0xf7, 0x24, 0x71, 0xce,
+0x6a, 0xc6, 0xa3, 0x39, 0x30, 0x76, 0x76, 0x1f, 0xec, 0x85, 0xd8, 0xcb,
+0xd6, 0xa4, 0xbd, 0xd2, 0x6d, 0xde, 0xae, 0x22, 0x53, 0x26, 0x14, 0x3d,
+0xa8, 0x4f, 0x22, 0x72, 0xc3, 0x4c, 0xa4, 0x1f, 0x88, 0xdd, 0x81, 0x26,
+0x17, 0x62, 0xe1, 0xbb, 0xa0, 0xe6, 0x84, 0x29, 0xea, 0x0e, 0x7a, 0x43,
+0xd2, 0x6e, 0xe7, 0x3a, 0x1b, 0x69, 0x43, 0xe6, 0x50, 0x77, 0x40, 0x87,
+0x6f, 0xa5, 0x48, 0x2a, 0xb9, 0xbe, 0xdd, 0x52, 0xa5, 0x05, 0x2e, 0xa6,
+0x0d, 0xaa, 0x99, 0x24, 0x8b, 0x78, 0x85, 0xee, 0xd8, 0xd2, 0x6d, 0xde,
+0x6e, 0x1b, 0x68, 0xa3, 0x8f, 0x72, 0x22, 0xf8, 0xc2, 0x94, 0xe3, 0xe4,
+0x55, 0x9d, 0x07, 0xad, 0xd7, 0x45, 0x15, 0x9a, 0xa8, 0xf6, 0x72, 0x68,
+0x86, 0x09, 0x1d, 0xaa, 0xa8, 0xe3, 0xd2, 0x73, 0xdd, 0x99, 0x5c, 0xa7,
+0x4b, 0xa6, 0x44, 0xd1, 0xb7, 0x1b, 0x58, 0xc9, 0xb9, 0xdc, 0xb8, 0x2b,
+0xaa, 0x6c, 0xc8, 0xcc, 0x34, 0x86, 0x59, 0x12, 0x9e, 0xc8, 0x5a, 0x7a,
+0xd1, 0x08, 0xeb, 0xd2, 0xaf, 0xdc, 0xd9, 0xd3, 0xd4, 0xeb, 0x78, 0xe3,
+0x4e, 0x39, 0x12, 0x94, 0xc6, 0x5e, 0x95, 0x2d, 0x6a, 0xe0, 0xaa, 0xc7,
+0x0b, 0x50, 0xb7, 0xd0, 0xdd, 0x54, 0xe5, 0xeb, 0x00, 0x47, 0x78, 0xd6,
+0xd2, 0xb1, 0xdc, 0xa1, 0xa3, 0xb6, 0xca, 0x09, 0xcb, 0x95, 0xb9, 0xab,
+0x86, 0xa9, 0x02, 0xfd, 0xa9, 0x5b, 0xd9, 0xa3, 0x48, 0x08, 0xf2, 0x4e,
+0xf0, 0x13, 0xd4, 0x87, 0xf7, 0x5b, 0x76, 0xca, 0x8c, 0xd2, 0xae, 0xd5,
+0xa5, 0xe3, 0x8c, 0xa9, 0x3b, 0xa4, 0x21, 0xd9, 0x20, 0xc6, 0xa6, 0xd6,
+0x7c, 0x6a, 0x46, 0xa4, 0x94, 0xe6, 0x78, 0x7a, 0x36, 0x38, 0x57, 0xdc,
+0x87, 0x27, 0x21, 0xf9, 0x36, 0x7c, 0xd2, 0xec, 0xd4, 0xe1, 0x9b, 0xc5,
+0x4a, 0x76, 0x14, 0x8e, 0xb5, 0x2d, 0x82, 0x48, 0x42, 0x9d, 0xc5, 0xd9,
+0x10, 0xae, 0x8a, 0x50, 0x32, 0xed, 0x58, 0xdb, 0x78, 0x26, 0xea, 0xb5,
+0x78, 0x07, 0x7e, 0xd2, 0xab, 0xd5, 0x99, 0x65, 0xa0, 0xa9, 0x50, 0xae,
+0x71, 0xa7, 0x2d, 0x52, 0xc7, 0x88, 0xee, 0x4e, 0x46, 0xd6, 0x9a, 0x88,
+0x2b, 0x83, 0xd2, 0x35, 0x04, 0x88, 0xc6, 0x5d, 0x03, 0x91, 0x97, 0xa4,
+0xd2, 0xb1, 0xd5, 0x65, 0x2b, 0xaa, 0x87, 0x8f, 0x9a, 0x64, 0xec, 0xcc,
+0x52, 0xa4, 0xeb, 0xd3, 0x6e, 0x44, 0xb7, 0xaa, 0xc6, 0x82, 0xe7, 0x6e,
+0xc8, 0xf3, 0xad, 0x26, 0x37, 0x2c, 0xc0, 0x47, 0x79, 0xd2, 0xec, 0xd4,
+0x9d, 0x63, 0xb9, 0x28, 0xd2, 0x7c, 0x8e, 0xb9, 0x13, 0x6e, 0xc5, 0xcf,
+0x1b, 0x95, 0x10, 0x27, 0xb8, 0x86, 0xa7, 0xec, 0x2a, 0xd7, 0x15, 0x9e,
+0xa5, 0xc7, 0x5b, 0x3b, 0xd1, 0x2d, 0xd2, 0xb0, 0xdd, 0x25, 0xa3, 0xec,
+0x88, 0xaf, 0xc3, 0x76, 0xc4, 0xe3, 0x88, 0x46, 0x44, 0xf4, 0xa9, 0x11,
+0x74, 0xa6, 0xe6, 0x32, 0xb4, 0x51, 0xda, 0x36, 0x73, 0x47, 0x48, 0xdd,
+0x6e, 0xa9, 0x98, 0xd2, 0xac, 0xd5, 0x21, 0xa2, 0x6b, 0x08, 0xd1, 0x2b,
+0x8d, 0xc9, 0x23, 0x72, 0xc5, 0x49, 0x2c, 0x0b, 0xbd, 0x41, 0xa0, 0xa7,
+0x52, 0x1c, 0x76, 0x37, 0x6a, 0x6e, 0xa5, 0x03, 0x2f, 0xa5, 0x7c, 0xa0,
+0xd2, 0xb0, 0xd4, 0xdd, 0xdc, 0x9f, 0x88, 0xe2, 0xfc, 0x8d, 0xb8, 0xe4,
+0x50, 0xc6, 0xb7, 0x7e, 0x44, 0xca, 0xe3, 0xc8, 0x42, 0x01, 0xde, 0x92,
+0x96, 0x50, 0xea, 0xc4, 0xfe, 0xca, 0x7a, 0x46, 0xd6, 0xd2, 0x72, 0xcc,
+0x59, 0xe4, 0xeb, 0x06, 0x8f, 0xca, 0x9e, 0xa6, 0xd4, 0x6a, 0xe3, 0xcb,
+0x1a, 0x12, 0x47, 0x28, 0xea, 0xe5, 0xf6, 0xd9, 0x97, 0x48, 0x2d, 0xf0,
+0x44, 0x44, 0xef, 0x4a, 0x36, 0xd4, 0xd2, 0xae, 0xd5, 0x59, 0x1c, 0x9a,
+0xa3, 0x8f, 0xca, 0xd5, 0x25, 0x1a, 0xc8, 0xe2, 0xab, 0xa2, 0xac, 0xcd,
+0x18, 0xa4, 0xc5, 0x21, 0xe4, 0x6d, 0xc7, 0x54, 0x72, 0xa2, 0x5d, 0x21,
+0x8b, 0x7e, 0x72, 0xd2, 0xad, 0xd4, 0xdd, 0x25, 0xbd, 0x03, 0x1c, 0x8f,
+0x16, 0xeb, 0x01, 0x96, 0xc1, 0xae, 0x06, 0xd8, 0xa9, 0x20, 0xa1, 0x67,
+0x78, 0x9c, 0x8a, 0x39, 0x63, 0xf0, 0xc2, 0x1c, 0x9b, 0xcf, 0x8a, 0xc4,
+0xd2, 0xac, 0xd5, 0xe1, 0x9a, 0xca, 0x22, 0x68, 0xb1, 0x5b, 0x30, 0xe7,
+0xec, 0xe3, 0xb6, 0x2e, 0xb2, 0x56, 0xc0, 0x72, 0xe3, 0x97, 0xe3, 0x95,
+0x49, 0x81, 0x8e, 0xa4, 0x2b, 0x48, 0xb5, 0x44, 0xfc, 0xd2, 0xac, 0xdd,
+0x65, 0x5b, 0x76, 0x82, 0x01, 0x2e, 0xe0, 0x1e, 0xd5, 0x70, 0x83, 0xae,
+0xec, 0x6c, 0x1d, 0xeb, 0xe2, 0xe3, 0x81, 0x9d, 0x72, 0x23, 0xa5, 0xa1,
+0x64, 0x58, 0x2c, 0x2a, 0xc9, 0x93, 0xd2, 0xaf, 0xd5, 0x21, 0x5a, 0xea,
+0xa3, 0xe2, 0x3d, 0x61, 0xbc, 0xdd, 0x88, 0xc2, 0x58, 0xc3, 0x9f, 0xf0,
+0x82, 0xba, 0xa2, 0xeb, 0x90, 0x46, 0x3f, 0x04, 0x6e, 0xa3, 0x67, 0x20,
+0x96, 0xb4, 0xeb, 0xd2, 0x74, 0xdd, 0x19, 0x63, 0x9c, 0x83, 0x8f, 0x9c,
+0x2e, 0xd2, 0xf5, 0x52, 0xa3, 0x49, 0x03, 0xb3, 0x48, 0xdd, 0x6e, 0xa2,
+0x34, 0xc4, 0xed, 0xa9, 0x53, 0xd8, 0xe2, 0xad, 0x24, 0xb4, 0x18, 0xe6,
+0xd7, 0x1f, 0x8c, 0xed, 0x5b, 0xc8, 0x81, 0x1d, 0x5b, 0x6a, 0x59, 0x5a,
+0xd8, 0x00, 0xc4, 0xa5, 0x71, 0xd5, 0x63, 0xdc, 0x20, 0x48, 0xdd, 0xad,
+0xd6, 0xd4, 0xdc, 0x80, 0x69, 0x23, 0x95, 0xb8, 0xac, 0xd9, 0xee, 0x83,
+0x1e, 0x1d, 0x74, 0xe0, 0x3a, 0xe3, 0x95, 0x3b, 0x64, 0xae, 0xc0, 0x2d,
+0x23, 0x95, 0xb5, 0x2c, 0xe2, 0xc0, 0x57, 0x6b, 0x4f, 0x52, 0xde, 0xc4,
+0xa0, 0x49, 0x0d, 0x6d, 0xab, 0x24, 0xd9, 0xef, 0x7b, 0x5e, 0x64, 0x76,
+0xc0, 0x5a, 0xe2, 0xa9, 0xc9, 0x66, 0xca, 0x80, 0x29, 0x6b, 0x6e, 0xc5,
+0x6c, 0x76, 0xc0, 0x3b, 0x22, 0xb2, 0x4c, 0xab, 0xad, 0x00, 0x56, 0xd5,
+0xae, 0x57, 0x63, 0xd9, 0xec, 0x8b, 0xda, 0x1c, 0x6a, 0xa0, 0x64, 0xda,
+0xb1, 0xc9, 0x53, 0x8a, 0xa0, 0x38, 0xe2, 0xb2, 0x47, 0x64, 0xe4, 0xc0,
+0x4b, 0x53, 0x91, 0xa8, 0xf6, 0x93, 0xa0, 0x46, 0xf3, 0x46, 0x68, 0xca,
+0xd9, 0x69, 0x6b, 0xe2, 0xac, 0x72, 0xc0, 0x62, 0x6d, 0xc9, 0xe7, 0x15,
+0x90, 0xa0, 0x38, 0x96, 0xb1, 0xcb, 0x1c, 0xa6, 0x40, 0x3d, 0x24, 0x71,
+0x54, 0xe5, 0xe0, 0xc0, 0x54, 0xec, 0x51, 0xea, 0xa8, 0xd9, 0xec, 0x83,
+0x1e, 0x24, 0xda, 0x80, 0x57, 0x19, 0xb2, 0x57, 0x24, 0x62, 0x80, 0x37,
+0x24, 0x51, 0x5c, 0xdd, 0xe0, 0x80, 0x39, 0x4b, 0x90, 0xb9, 0x2b, 0x7e,
+0xc0, 0x48, 0x93, 0x72, 0x89, 0x6c, 0xd9, 0xf2, 0xab, 0x9e, 0x1b, 0xbc,
+0x80, 0x16, 0xdd, 0x91, 0x35, 0xe5, 0x54, 0xe0, 0x5b, 0x15, 0xad, 0xd8,
+0xd3, 0x86, 0x80, 0x49, 0xa2, 0x7b, 0x17, 0x2d, 0x91, 0x20, 0x28, 0xdb,
+0x91, 0xb7, 0x2a, 0xd9, 0xed, 0x8b, 0xde, 0x24, 0xa0, 0xa0, 0x35, 0x6b,
+0x93, 0x23, 0x69, 0xdc, 0x80, 0x24, 0xea, 0xab, 0x46, 0xdf, 0xa6, 0xc0,
+0x45, 0x1d, 0x8e, 0x3a, 0xea, 0x87, 0x40, 0x29, 0x65, 0x2b, 0x29, 0x15,
+0xd9, 0xb1, 0x7b, 0x62, 0x1c, 0x5a, 0xa0, 0x48, 0xeb, 0x88, 0xd9, 0x91,
+0x7a, 0x80, 0x3c, 0xb4, 0x95, 0x49, 0x5a, 0x64, 0xa0, 0x53, 0x9c, 0x85,
+0xdc, 0xdb, 0xde, 0x80, 0x38, 0x9c, 0xae, 0x27, 0x34, 0xd9, 0xed, 0x9c,
+0x21, 0xe4, 0xa4, 0xc0, 0x29, 0x18, 0xb2, 0x37, 0x22, 0x80, 0xe0, 0x6c,
+0x93, 0x92, 0x4b, 0x25, 0xd2, 0xa0, 0x3b, 0x31, 0x75, 0xc7, 0x65, 0xbe,
+0xe0, 0x33, 0x1e, 0x6e, 0x4a, 0xe5, 0xd9, 0xab, 0x83, 0xde, 0x2c, 0x8a,
+0xc0, 0xa8, 0xe4, 0x6d, 0xcb, 0x1b, 0xeb, 0x00, 0x55, 0x0e, 0x95, 0xa5,
+0x5c, 0x8d, 0x40, 0x1d, 0x24, 0x6e, 0x37, 0x5b, 0xc2, 0xc0, 0x37, 0x2c,
+0x5e, 0xa8, 0xa5, 0xd9, 0xee, 0x8b, 0xda, 0x6c, 0xe2, 0xc0, 0x12, 0xe5,
+0xa5, 0xcb, 0x5b, 0xb8, 0xc0, 0x36, 0xab, 0xad, 0x4a, 0xdb, 0xe6, 0xa0,
+0x47, 0x23, 0x6b, 0x56, 0x2c, 0xee, 0xa0, 0x54, 0xed, 0x6e, 0x50, 0xea,
+0xda, 0x30, 0x84, 0x1e, 0x23, 0x82, 0x40, 0x39, 0xd4, 0xb1, 0xb7, 0x16,
+0x63, 0x20, 0x28, 0xa5, 0x69, 0x4e, 0x9b, 0x60, 0xa0, 0x58, 0xb5, 0x73,
+0x42, 0x69, 0x84, 0xa0, 0xb8, 0xe3, 0x4f, 0x5a, 0xd4, 0xd9, 0xb1, 0x8c,
+0x1d, 0xa5, 0x6a, 0xc0, 0x78, 0xa2, 0xbd, 0xb3, 0xa4, 0x96, 0x80, 0x26,
+0xeb, 0x86, 0xa6, 0xe4, 0xda, 0x60, 0x27, 0x94, 0xa9, 0xc4, 0xa5, 0xe2,
+0xc0, 0x48, 0xa6, 0x66, 0x4c, 0x6a, 0xda, 0x2c, 0x94, 0x5a, 0x1c, 0xea,
+0xe0, 0x5a, 0xa1, 0xb2, 0xc3, 0x9d, 0xe0, 0xa0, 0x26, 0x7a, 0x72, 0xb7,
+0x23, 0xd0, 0xa0, 0x4a, 0xea, 0x47, 0x5a, 0xe5, 0xb4, 0xe0, 0x34, 0xdd,
+0x92, 0x27, 0x71, 0xd9, 0xed, 0x83, 0xa1, 0xa5, 0x54, 0xa0, 0x35, 0xad,
+0x8a, 0xc7, 0x23, 0x80, 0xc0, 0x29, 0x23, 0x97, 0x99, 0x30, 0xda, 0xa0,
+0xc7, 0x23, 0x6d, 0xc6, 0xde, 0xaf, 0x20, 0x23, 0x65, 0x86, 0x44, 0xa4,
+0xd9, 0xae, 0x9c, 0x1d, 0xdc, 0x8a, 0x80, 0x54, 0xdc, 0x4e, 0xc8, 0xa1,
+0xae, 0xc0, 0x56, 0xd4, 0xcd, 0x48, 0x75, 0xea, 0x80, 0x48, 0x2c, 0x91,
+0xf4, 0xdc, 0x54, 0xe0, 0x48, 0xdc, 0x50, 0xe8, 0xd3, 0xd9, 0xf0, 0x9c,
+0x61, 0xe4, 0xea, 0xe0, 0x68, 0xeb, 0xad, 0xa8, 0xea, 0x5f, 0x20, 0x58,
+0x9a, 0x53, 0x6a, 0x5e, 0x50, 0x80, 0x38, 0xe5, 0x71, 0x69, 0x44, 0x7c,
+0xe0, 0xa7, 0x1c, 0x92, 0x39, 0x33, 0xd9, 0xed, 0x7c, 0x5a, 0x2b, 0xb7,
+0x60, 0xb7, 0x19, 0x6e, 0xc6, 0xe3, 0x92, 0xa0, 0x44, 0xdc, 0x87, 0x1b,
+0x0b, 0xac, 0xa0, 0x4a, 0xd4, 0xdd, 0xb6, 0xe3, 0x8a, 0xc0, 0x53, 0x25,
+0x92, 0x58, 0x2c, 0xd9, 0xed, 0x9c, 0x9d, 0xe3, 0xcc, 0xc0, 0x42, 0xaa,
+0xee, 0x3d, 0x5c, 0x60, 0xa0, 0x39, 0x14, 0x6b, 0xc6, 0x5b, 0xda, 0xa0,
+0x66, 0x5d, 0x8b, 0x5d, 0x59, 0x97, 0x20, 0x56, 0x9c, 0xd5, 0x29, 0x71,
+0xd9, 0xb0, 0x8b, 0x9d, 0xa4, 0x9e, 0xa0, 0x2b, 0x18, 0x73, 0x1d, 0x2a,
+0x58, 0xc0, 0x49, 0x4d, 0xc8, 0xc3, 0x76, 0x76, 0xa0, 0x34, 0xda, 0x46,
+0x7b, 0x1b, 0xe6, 0xc0, 0x66, 0xeb, 0xcd, 0x2b, 0xa2, 0xd9, 0xee, 0x8b,
+0xdd, 0x6d, 0x7c, 0x80, 0x46, 0xa3, 0x52, 0x47, 0x74, 0xb0, 0xc0, 0x28,
+0x6c, 0x65, 0xe8, 0x9e, 0xf0, 0xa0, 0x46, 0x96, 0x72, 0x56, 0x65, 0xb4,
+0x80, 0x29, 0x23, 0x72, 0x39, 0xd3, 0xda, 0x30, 0x94, 0x21, 0xa4, 0xd2,
+0xc0, 0x1a, 0xaa, 0xb2, 0xb3, 0x2f, 0x59, 0x40, 0xc5, 0x1c, 0x8e, 0xd6,
+0x5b, 0x52, 0xa0, 0x69, 0x6d, 0xc9, 0xe5, 0xaa, 0x8c, 0xa0, 0x66, 0xe9,
+0x36, 0x3b, 0x54, 0xd9, 0xf0, 0x93, 0xe1, 0xe3, 0xaa, 0xa0, 0x5a, 0x9a,
+0x50, 0x37, 0x8b, 0x54, 0xe0, 0xd6, 0xcc, 0xad, 0x5b, 0x12, 0x68, 0x80,
+0x5f, 0x55, 0x58, 0xf8, 0xdc, 0x60, 0xa0, 0x76, 0x8e, 0xad, 0xc7, 0x5e,
+0xd9, 0xec, 0x9c, 0xa1, 0xdc, 0xa8, 0x80, 0x55, 0x64, 0x36, 0x33, 0xf2,
+0xaa, 0xa0, 0x3b, 0x19, 0x95, 0x4c, 0xea, 0x9e, 0xc0, 0xb8, 0xec, 0x86,
+0xcb, 0x1a, 0xd2, 0x80, 0x2d, 0x61, 0x9d, 0x46, 0xac, 0xd9, 0xac, 0x9d,
+0x25, 0x94, 0xd8, 0xc0, 0x3e, 0xa3, 0x90, 0xc7, 0x11, 0xd2, 0xa0, 0x59,
+0x52, 0xb0, 0xe7, 0x54, 0xae, 0x80, 0x66, 0xdc, 0x4a, 0x4c, 0xa2, 0xb4,
+0xc0, 0xd8, 0xdc, 0x8e, 0x47, 0x1e, 0xd9, 0xee, 0x83, 0xa1, 0xa4, 0xd0,
+0xa0, 0xb4, 0x9d, 0x8d, 0x4d, 0x14, 0x6e, 0xe0, 0x54, 0x73, 0x72, 0x3c,
+0x65, 0xa6, 0x80, 0x56, 0xe4, 0x91, 0xe5, 0x54, 0xe8, 0x20, 0x47, 0x23,
+0x6e, 0xbb, 0x94, 0xd9, 0xef, 0x8b, 0x99, 0xe4, 0xe2, 0xc0, 0x35, 0x1a,
+0xb2, 0x35, 0x4c, 0xe6, 0xa0, 0x25, 0x56, 0x71, 0xe6, 0xce, 0x58, 0x80,
+0xe6, 0xdc, 0xad, 0x39, 0x1c, 0x9a, 0x80, 0x37, 0x62, 0x8f, 0x25, 0xa2,
+0xd9, 0xf0, 0x94, 0x22, 0x5c, 0xbe, 0x20, 0x38, 0xe4, 0x71, 0xc5, 0x0c,
+0xda, 0xc0, 0x6f, 0x54, 0xed, 0x2b, 0x52, 0x60, 0xe0, 0xe6, 0xdc, 0x85,
+0xb8, 0xe4, 0x60, 0x00, 0x5b, 0x5c, 0x36, 0xb4, 0xae, 0xda, 0x2e, 0x83,
+0xa1, 0xa5, 0xac, 0x80, 0x17, 0xbc, 0x66, 0x44, 0x64, 0xee, 0xa0, 0x65,
+0x71, 0x6d, 0xb9, 0x90, 0xb0, 0xe0, 0x2d, 0x2a, 0x55, 0xc7, 0x2a, 0xd2,
+0xa0, 0x3b, 0x61, 0xd6, 0x99, 0x1b, 0xd9, 0xab, 0x73, 0x9a, 0xac, 0xe8,
+0xc0, 0x37, 0x5a, 0x73, 0x3a, 0xec, 0xac, 0xe0, 0x45, 0x8d, 0x6a, 0xd8,
+0x2a, 0xd2, 0xa0, 0x57, 0x06, 0xce, 0x37, 0x4b, 0x8c, 0x80, 0x3d, 0x53,
+0xab, 0x9a, 0x9d, 0xda, 0x32, 0x94, 0x99, 0xe4, 0xce, 0x80, 0x2c, 0x56,
+0x50, 0xc9, 0x5c, 0xa2, 0xc0, 0x46, 0xdc, 0xb1, 0xc3, 0x64, 0x96, 0x80,
+0xb5, 0x73, 0x6e, 0x45, 0x24, 0x50, 0xa0, 0x3a, 0xeb, 0x4e, 0xbc, 0xdb,
+0xd9, 0xf2, 0x8b, 0x9e, 0x25, 0xd0, 0xc0, 0x43, 0xa2, 0x75, 0xc9, 0x59,
+0xea, 0xa0, 0xc8, 0xdb, 0x76, 0x35, 0x9c, 0x7a, 0xc0, 0x54, 0xe3, 0xa8,
+0xa7, 0x75, 0x66, 0x80, 0x48, 0xe0, 0xd6, 0x6a, 0xe3, 0xd9, 0xed, 0x84,
+0x1e, 0x5c, 0xe6, 0xc0, 0xb7, 0x64, 0x6a, 0x48, 0x8d, 0x5c, 0x80, 0x6a,
+0x64, 0x69, 0xcb, 0x2b, 0xa0, 0xc0, 0x09, 0x24, 0x99, 0x39, 0x92, 0xbc,
+0xc0, 0x43, 0xa5, 0x72, 0x23, 0xd2, 0xd9, 0xec, 0x8b, 0x5d, 0xed, 0x5c,
+0xa0, 0xb9, 0x22, 0x9a, 0x44, 0xea, 0xaa, 0x80, 0x2b, 0x64, 0x56, 0xc5,
+0x14, 0x9a, 0x80, 0x2a, 0x6b, 0x75, 0x49, 0x25, 0xa9, 0x40, 0x4a, 0xa1,
+0xd0, 0x88, 0xf6, 0xd9, 0xed, 0x8c, 0x19, 0x9b, 0xda, 0xa0, 0x29, 0x59,
+0x6a, 0x48, 0x94, 0x84, 0xc0, 0x78, 0x57, 0xad, 0x1d, 0x5a, 0x5a, 0xe0,
+0xba, 0xe3, 0x6d, 0xc6, 0xa6, 0xbc, 0xe0, 0x56, 0xed, 0x75, 0x29, 0x9d,
+0xd9, 0xec, 0x73, 0xa2, 0x5d, 0x70, 0xc0, 0xc6, 0xe3, 0x74, 0xc9, 0x53,
+0x62, 0xe0, 0x55, 0x16, 0x8d, 0xc6, 0x6b, 0x9a, 0xc0, 0x37, 0x9e, 0x4b,
+0xb4, 0xce, 0xd6, 0xe0, 0xc7, 0x16, 0x6d, 0x4b, 0x12, 0xd9, 0x6d, 0x7b,
+0x21, 0xe4, 0x78, 0xa0, 0xcc, 0xe3, 0x91, 0x39, 0x23, 0x84, 0xa0, 0x58,
+0xe5, 0x6a, 0xb4, 0xde, 0xa4, 0xc0, 0x68, 0xe9, 0xa6, 0x35, 0x2c, 0x8f,
+0x60, 0x0b, 0x2a, 0xb2, 0x4a, 0x64, 0xd9, 0xed, 0x83, 0xa2, 0x23, 0xe7,
+0x60, 0xc8, 0xdc, 0xc9, 0xbc, 0xdb, 0x6c, 0xa0, 0x59, 0x5e, 0x84, 0xd8,
+0x8d, 0x9c, 0xa0, 0x78, 0x65, 0xaa, 0x38, 0xe1, 0xf0, 0xc0, 0xd9, 0x12,
+0x92, 0xa8, 0xeb, 0xd9, 0xee, 0x9c, 0x66, 0x1b, 0x71, 0x60, 0xa8, 0xda,
+0x94, 0xc7, 0x24, 0xc3, 0x00, 0x97, 0x69, 0x6e, 0xab, 0x2b, 0x72, 0xe0,
+0xe8, 0xdc, 0xad, 0x3b, 0x22, 0xbe, 0xe0, 0xb9, 0x64, 0x74, 0xa9, 0x65,
+0xd9, 0xeb, 0x6b, 0x5e, 0x64, 0xf0, 0x80, 0x39, 0x23, 0x36, 0xf2, 0xd6,
+0xb8, 0xc0, 0x96, 0xef, 0x10, 0xf5, 0x1e, 0xe2, 0xc0, 0x31, 0x32, 0xc3,
+0x28, 0x9e, 0x74, 0xa0, 0xba, 0x8b, 0x96, 0x29, 0x6a, 0xd9, 0xed, 0x73,
+0x5a, 0x64, 0x54, 0xe0, 0x76, 0x96, 0x55, 0x55, 0x92, 0xc8, 0x60, 0x4e,
+0x93, 0x56, 0xd9, 0x2a, 0xec, 0xc0, 0x46, 0xfb, 0xc5, 0x45, 0xe1, 0x52,
+0xa0, 0x67, 0xd2, 0x66, 0xc2, 0xe6, 0xd9, 0x6d, 0x73, 0xa1, 0xec, 0x9c,
+0xa0, 0x3c, 0x33, 0x71, 0x48, 0x9b, 0xd4, 0xa0, 0x5a, 0xa8, 0xec, 0xb7,
+0xa1, 0xab, 0x00, 0x1c, 0xfa, 0xb5, 0xbf, 0x6a, 0x56, 0xc0, 0xb9, 0x5a,
+0x92, 0x19, 0x5b, 0xd9, 0x6d, 0x7b, 0x61, 0xdb, 0xb2, 0xe0, 0xca, 0x5b,
+0xad, 0xa9, 0x14, 0xac, 0xe0, 0x56, 0xd6, 0x8e, 0x1e, 0xd2, 0x96, 0xc0,
+0x4f, 0xa8, 0x5a, 0x35, 0x3e, 0x53, 0x40, 0x16, 0x2f, 0x2a, 0x67, 0x4e,
+0xd9, 0xad, 0x7b, 0x9d, 0xe5, 0xb0, 0x80, 0x2a, 0x84, 0x82, 0xbc, 0xcf,
+0x88, 0xc0, 0xc9, 0x14, 0x6c, 0xdb, 0x1b, 0xa4, 0x80, 0x1b, 0x64, 0xa9,
+0x3d, 0x65, 0xe8, 0xe0, 0xc6, 0xe3, 0xb1, 0xb9, 0x33, 0xd9, 0xef, 0x93,
+0xa1, 0x9c, 0xda, 0xc0, 0x05, 0xe0, 0x2d, 0xed, 0x4e, 0x82, 0xc0, 0x1b,
+0x8c, 0x36, 0xe8, 0x65, 0x5f, 0x40, 0xb6, 0xeb, 0x91, 0x47, 0x0d, 0x7a,
+0xe0, 0xda, 0xa3, 0xb1, 0xa9, 0x92, 0xd9, 0xac, 0x83, 0xa1, 0xe2, 0x54,
+0xc0, 0xb7, 0x9a, 0x52, 0x44, 0xa5, 0xd2, 0xc0, 0xb7, 0x24, 0x2e, 0x44,
+0xeb, 0x96, 0xc0, 0x2a, 0xb0, 0x92, 0x3b, 0xa2, 0xa4, 0xe0, 0xac, 0xeb,
+0x51, 0xc5, 0x24, 0xd9, 0xed, 0x94, 0x5a, 0x64, 0x76, 0x80, 0x27, 0x72,
+0x57, 0x43, 0xaa, 0xc6, 0xc0, 0xa7, 0x1d, 0x51, 0x47, 0x63, 0x99, 0x20,
+0xe8, 0xdb, 0x8d, 0x99, 0x9c, 0x5c, 0xc0, 0x47, 0x14, 0x33, 0x55, 0x9d,
+0xd9, 0xed, 0x6b, 0x5e, 0x24, 0xcc, 0xa0, 0x15, 0x0e, 0x75, 0x2b, 0x54,
+0xb4, 0xc0, 0xc8, 0x64, 0x92, 0x38, 0xe2, 0xd0, 0xe0, 0x29, 0xe0, 0x92,
+0x37, 0x71, 0xce, 0xe0, 0x49, 0x31, 0x4b, 0x48, 0x97, 0xd9, 0xaf, 0x73,
+0xe2, 0x1b, 0x5e, 0xc0, 0x36, 0x95, 0xad, 0x88, 0xb6, 0xea, 0xc0, 0x99,
+0x23, 0xb1, 0x99, 0x1b, 0xb3, 0x40, 0xcb, 0x5e, 0x4e, 0x39, 0x1d, 0x7c,
+0xa0, 0xc6, 0xdc, 0x92, 0x18, 0xea, 0xda, 0x2e, 0x83, 0x62, 0x5c, 0x90,
+0x80, 0x2b, 0x55, 0x36, 0x13, 0x35, 0xa2, 0x80, 0x19, 0x63, 0xa9, 0xcb,
+0x23, 0x96, 0xe0, 0x6b, 0x4b, 0xcd, 0xb9, 0x9e, 0xce, 0x80, 0x35, 0x5a,
+0xda, 0x31, 0x24, 0xd9, 0xf1, 0x83, 0x5e, 0x64, 0xac, 0x80, 0xb6, 0xed,
+0x89, 0xc7, 0x53, 0x5c, 0xc0, 0x65, 0xd1, 0xd5, 0x89, 0x61, 0xe1, 0x60,
+0x4a, 0xa4, 0x97, 0x27, 0x31, 0xeb, 0x40, 0xd4, 0xec, 0x72, 0xc8, 0xcc,
+0xd9, 0xed, 0x8b, 0x62, 0x24, 0x50, 0xa0, 0x58, 0x56, 0x85, 0x6b, 0x4b,
+0xb0, 0xa0, 0xb8, 0xda, 0x99, 0xc2, 0xe6, 0x6d, 0x40, 0xd7, 0x16, 0x8a,
+0x49, 0x1b, 0x9a, 0xa0, 0xc6, 0xeb, 0x6a, 0xb8, 0xae, 0xd9, 0xac, 0x83,
+0xdd, 0xdd, 0xe4, 0xe0, 0x56, 0xcd, 0x2d, 0x2a, 0xdd, 0x70, 0x81, 0x38,
+0xdc, 0x89, 0x59, 0x45, 0x50, 0xa0, 0xe5, 0x1d, 0x6a, 0x4b, 0x1a, 0x68,
+0x60, 0xc9, 0x1c, 0x73, 0x37, 0x5a, 0xd9, 0xf0, 0xa3, 0xe1, 0xdc, 0xce,
+0xc0, 0xb9, 0x0c, 0x95, 0xc5, 0x32, 0xef, 0x20, 0x96, 0xea, 0xb0, 0xca,
+0x5d, 0x6c, 0xa0, 0x4b, 0xa2, 0x66, 0xd6, 0xec, 0x76, 0xa0, 0xbc, 0xe2,
+0x51, 0xb7, 0x1b, 0xd9, 0xae, 0x93, 0xde, 0x63, 0x64, 0xa0, 0x3f, 0xe8,
+0x91, 0x21, 0x97, 0x92, 0xc0, 0xb6, 0xda, 0xd1, 0xc7, 0x54, 0xaa, 0xa0,
+0xc9, 0xdb, 0x51, 0xa9, 0x25, 0xb8, 0x80, 0xb2, 0xf4, 0x6e, 0xb9, 0x15,
+0xd9, 0xf0, 0x7b, 0x9a, 0x1c, 0x8c, 0xa0, 0x1b, 0x54, 0x27, 0xb6, 0x7f,
+0x96, 0xa0, 0xb4, 0x64, 0xa5, 0x69, 0x12, 0x74, 0xa0, 0xe6, 0xa2, 0xcd,
+0xd8, 0xdb, 0xdc, 0xc0, 0x49, 0xe3, 0x8c, 0x1b, 0x09, 0xd9, 0xeb, 0x6b,
+0xde, 0x2c, 0xc2, 0xa0, 0xdb, 0x1b, 0xad, 0x8a, 0xdc, 0x50, 0xa0, 0x98,
+0xe4, 0x71, 0xba, 0xdc, 0x78, 0xa0, 0x59, 0x62, 0x96, 0xb9, 0xcd, 0xda,
+0xa0, 0x2a, 0xab, 0xf9, 0x23, 0xbb, 0xd9, 0xac, 0x73, 0xdd, 0xe4, 0xa4,
+0xe0, 0x49, 0x06, 0x6e, 0x19, 0x1d, 0x79, 0x20, 0xab, 0x14, 0x8a, 0x4c,
+0xd2, 0xea, 0xa0, 0xea, 0x9a, 0xae, 0x29, 0x2c, 0x84, 0xa0, 0xb8, 0x6b,
+0x52, 0x49, 0x1b, 0xd9, 0xf1, 0x84, 0x1d, 0x9d, 0xd4, 0xe0, 0xca, 0x9a,
+0x9a, 0x38, 0xdd, 0xba, 0x80, 0x36, 0x5c, 0x59, 0x59, 0x63, 0xe4, 0x80,
+0xb8, 0xeb, 0x91, 0xc8, 0xbd, 0x52, 0xa0, 0xa5, 0x5c, 0x52, 0x45, 0x64,
+0xda, 0x2e, 0x73, 0x22, 0x64, 0x66, 0xe0, 0x24, 0xdc, 0x5a, 0x57, 0x0e,
+0xc8, 0xe0, 0xc8, 0xe3, 0x92, 0x2c, 0x95, 0x50, 0xa0, 0xba, 0x8d, 0x91,
+0xbb, 0x2b, 0x5c, 0xe0, 0x5d, 0x92, 0x31, 0x53, 0x5e, 0xda, 0x2e, 0x83,
+0xd6, 0x24, 0xd7, 0x01, 0x45, 0x1d, 0x85, 0xc8, 0xdc, 0x76, 0x80, 0x6a,
+0xea, 0xae, 0x15, 0x21, 0x92, 0xa0, 0xe6, 0xdd, 0x8d, 0x3b, 0x2c, 0xe8,
+0x20, 0xc8, 0xe2, 0xae, 0x38, 0xb4, 0xd9, 0xef, 0x8b, 0x9a, 0x23, 0x50,
+0xc0, 0x27, 0xcb, 0x11, 0xe7, 0xe8, 0x64, 0xe0, 0x4a, 0x8c, 0xa9, 0x07,
+0xe6, 0xb1, 0x20, 0xb4, 0x9c, 0xea, 0x0b, 0x23, 0x5a, 0xc0, 0xbb, 0x13,
+0x6e, 0xbf, 0x6c, 0xd9, 0xec, 0x73, 0xe2, 0x24, 0x9a, 0xe0, 0xc4, 0xa2,
+0x73, 0x1a, 0xab, 0x58, 0xe0, 0xc7, 0x2a, 0x76, 0xb4, 0xae, 0xba, 0xa0,
+0xa4, 0xec, 0x0f, 0x42, 0xe6, 0x7c, 0xa0, 0xc2, 0xab, 0x8d, 0xd5, 0x1d,
+0xd9, 0xac, 0x7b, 0xe2, 0x24, 0xb0, 0x80, 0xa9, 0x1b, 0x95, 0xd3, 0x25,
+0xd6, 0x80, 0xbe, 0xe4, 0x54, 0xc8, 0xec, 0xcf, 0x40, 0xb5, 0x35, 0xa9,
+0x57, 0x12, 0x5e, 0xa0, 0xc7, 0x22, 0x93, 0xa3, 0x74, 0xd9, 0xed, 0x7c,
+0x61, 0xec, 0xe8, 0xe0, 0xc6, 0xe1, 0x92, 0xaa, 0xd9, 0xa2, 0xc0, 0xb8,
+0xd1, 0xd6, 0x4a, 0xd4, 0xc6, 0xa0, 0xa8, 0xa2, 0x75, 0xda, 0xa6, 0x84,
+0x80, 0xa4, 0xae, 0x72, 0xc8, 0xa2, 0xd9, 0xec, 0xab, 0xa1, 0x9d, 0x5e,
+0xe0, 0xc5, 0x54, 0x6d, 0x3c, 0xe4, 0xae, 0xc0, 0xb7, 0x54, 0x8d, 0xbf,
+0x12, 0x8c, 0xe0, 0x1c, 0xfe, 0x92, 0xd8, 0x8a, 0x92, 0xe0, 0xc9, 0x1d,
+0x6f, 0x48, 0xda, 0xd9, 0xad, 0x93, 0x5e, 0x5d, 0xda, 0xa0, 0x56, 0xa1,
+0xca, 0x69, 0x4e, 0xa5, 0x60, 0xc8, 0xd4, 0x6c, 0xd8, 0xda, 0x58, 0x80,
+0xed, 0x12, 0xd2, 0x97, 0x94, 0x5a, 0xc0, 0x4e, 0x5d, 0x3d, 0xc6, 0x8d,
+0xd9, 0xed, 0x7b, 0x66, 0x64, 0xb6, 0x80, 0x5d, 0x52, 0xb5, 0x37, 0xe8,
+0xe2, 0xa0, 0xc9, 0x4b, 0x72, 0xac, 0xb3, 0x58, 0xa0, 0x45, 0xab, 0x2a,
+0xb9, 0x35, 0x8e, 0xa0, 0xd1, 0x14, 0x72, 0x74, 0x75, 0xd9, 0xee, 0x7b,
+0x1e, 0xa4, 0xb8, 0xc0, 0xa3, 0x2c, 0x2f, 0x29, 0x1c, 0x76, 0x80, 0xa7,
+0x24, 0x32, 0x66, 0x65, 0xd4, 0xc0, 0xa8, 0xe3, 0x4b, 0x58, 0x9c, 0x60,
+0xa0, 0xba, 0x5c, 0x9a, 0x2c, 0xeb, 0xd9, 0xad, 0x73, 0x62, 0x24, 0x60,
+0xc0, 0x98, 0xea, 0x8e, 0xa5, 0x15, 0x58, 0x80, 0x2a, 0x6a, 0xd9, 0xf4,
+0x5c, 0xc6, 0xc0, 0x62, 0xae, 0xa9, 0xc9, 0x94, 0xc6, 0x80, 0xbb, 0x2b,
+0x3a, 0xb5, 0x34, 0xd9, 0xeb, 0x7b, 0xda, 0x24, 0x5a, 0xa0, 0x25, 0xcc,
+0x46, 0xfc, 0x89, 0x92, 0xe0, 0xa8, 0x56, 0xb1, 0xd9, 0x21, 0x96, 0xc0,
+0xbb, 0x1a, 0x8f, 0x2b, 0x25, 0x9e, 0xc0, 0xa7, 0x61, 0x72, 0xb8, 0xab,
+0xda, 0x33, 0x73, 0xe1, 0xe3, 0xac, 0xe0, 0xc6, 0xdb, 0x67, 0x3a, 0xde,
+0xab, 0x20, 0x98, 0xd4, 0xcd, 0xc9, 0x23, 0x6e, 0xc0, 0xba, 0xd4, 0x99,
+0x35, 0x25, 0xb6, 0xc0, 0x96, 0xf3, 0x32, 0xdc, 0xdc, 0xd9, 0xef, 0x9b,
+0xdd, 0xe4, 0x6c, 0xc0, 0x15, 0x9e, 0x75, 0x64, 0x7b, 0xba, 0xc0, 0x97,
+0x6a, 0x89, 0xdb, 0x1a, 0x90, 0xa0, 0x46, 0x61, 0xef, 0x4b, 0x62, 0xea,
+0xa0, 0xc8, 0x9a, 0xd5, 0xc7, 0x5c, 0xd9, 0xad, 0x73, 0xda, 0x64, 0x73,
+0x00, 0xb6, 0x9c, 0x8e, 0xc9, 0x34, 0x8c, 0x80, 0xa4, 0x9e, 0x4e, 0x36,
+0xeb, 0x6c, 0xe0, 0x41, 0x6a, 0x99, 0x4e, 0xe6, 0xde, 0xc0, 0x3c, 0x96,
+0x15, 0x54, 0x3f, 0xd9, 0x6b, 0x63, 0xa6, 0x24, 0xa6, 0xc0, 0xb6, 0xd5,
+0x6a, 0x4a, 0x5b, 0xa6, 0xc0, 0xd2, 0xd4, 0x91, 0x58, 0xde, 0xc4, 0x80,
+0xba, 0xaa, 0x91, 0xac, 0xeb, 0xd8, 0xa0, 0x5a, 0xb1, 0xb9, 0x37, 0xef,
+0xd9, 0xee, 0x9c, 0x1e, 0x24, 0x8c, 0xe0, 0xb9, 0x1b, 0xae, 0x36, 0x6e,
+0xd8, 0xa0, 0xba, 0xdc, 0xad, 0x3c, 0xd2, 0x7e, 0xc0, 0xc9, 0x24, 0xa6,
+0x48, 0xcc, 0x50, 0xa0, 0x6c, 0x43, 0xb1, 0xac, 0xe4, 0xd9, 0xf1, 0x83,
+0x5e, 0x23, 0xd8, 0xa0, 0x38, 0xdb, 0xe7, 0x49, 0x54, 0xd0, 0x80, 0xa8,
+0xeb, 0x55, 0xd6, 0xe2, 0x55, 0x20, 0xd2, 0xdc, 0xd1, 0xca, 0xda, 0x96,
+0xc0, 0xda, 0x13, 0x99, 0xc9, 0x2b, 0xd9, 0xef, 0x7c, 0x1d, 0xdd, 0x58,
+0xa0, 0xb7, 0x54, 0x36, 0x56, 0x9a, 0xb0, 0x80, 0xc3, 0x25, 0x96, 0x48,
+0x9c, 0xcc, 0x80, 0x15, 0x21, 0xd2, 0xee, 0x05, 0x5c, 0xe0, 0xc9, 0x14,
+0xad, 0xcd, 0x1c, 0xd9, 0xed, 0x74, 0x1e, 0x63, 0xed, 0x20, 0x98, 0xea,
+0x57, 0x37, 0x5c, 0xd8, 0x80, 0x98, 0xdc, 0x8e, 0x49, 0x12, 0x94, 0xa0,
+0xc5, 0x5c, 0x52, 0x69, 0x15, 0xe2, 0xc0, 0xb3, 0x1c, 0xa9, 0xcb, 0x22,
+0xda, 0x2c, 0x74, 0x61, 0xe3, 0x76, 0x80, 0x56, 0xd1, 0x46, 0xf3, 0x85,
+0xc6, 0xe0, 0xd8, 0x13, 0xd5, 0x38, 0xd3, 0x74, 0xa0, 0xe9, 0x23, 0xd0,
+0xd5, 0x22, 0x70, 0xe0, 0x5b, 0x5d, 0x84, 0xcc, 0xd3, 0xda, 0x30, 0x73,
+0xa5, 0xe4, 0xf0, 0x80, 0xe8, 0xdb, 0x4a, 0x49, 0x5d, 0x9c, 0xe0, 0xb7,
+0x54, 0x53, 0x28, 0xe3, 0x50, 0x80, 0xb8, 0xa3, 0xb2, 0x58, 0x0d, 0x50,
+0xa0, 0xe6, 0xa5, 0x8e, 0x19, 0x1b, 0xda, 0x2e, 0x83, 0xde, 0x64, 0xc0,
+0xa0, 0x73, 0x52, 0xdc, 0xd2, 0xea, 0xcc, 0xc0, 0x3a, 0x35, 0xa7, 0xa6,
+0xa4, 0xb4, 0x80, 0x60, 0xcd, 0x85, 0xeb, 0x8a, 0x8c, 0xc0, 0xd4, 0xdc,
+0xd1, 0xca, 0x9a, 0xd9, 0xad, 0x9b, 0xde, 0x63, 0x57, 0x40, 0xdc, 0xdc,
+0x91, 0xa3, 0x2b, 0x80, 0x20, 0x9b, 0x1b, 0x95, 0x47, 0x5c, 0xcf, 0x60,
+0xb8, 0x9b, 0x8e, 0xb8, 0xee, 0xbb, 0x20, 0xb6, 0xda, 0xd7, 0x26, 0xb3,
+0xd9, 0xec, 0x8c, 0x1d, 0x5c, 0x76, 0xc0, 0xa6, 0xe4, 0x8d, 0x29, 0xeb,
+0xae, 0xc0, 0xa8, 0xda, 0xb9, 0x37, 0x23, 0x64, 0xa0, 0xc7, 0x25, 0x86,
+0x66, 0xe2, 0x60, 0xa0, 0x3d, 0x15, 0x55, 0xd4, 0xef, 0xd9, 0xeb, 0x83,
+0xda, 0x24, 0xb0, 0xc0, 0xa4, 0xf3, 0x4e, 0x48, 0xa3, 0x56, 0xc0, 0x38,
+0x73, 0xd3, 0x34, 0xd5, 0xd6, 0xc0, 0x55, 0xa5, 0x4d, 0xa8, 0xe4, 0xda,
+0xe0, 0xb8, 0xe5, 0x66, 0x48, 0xd4, 0xda, 0x2d, 0x7b, 0xe1, 0xa4, 0x50,
+0xa0, 0xc7, 0x1b, 0xa6, 0x55, 0x5c, 0xa5, 0x40, 0xd6, 0x5d, 0xcd, 0x47,
+0x94, 0xf0, 0xe0, 0x54, 0x53, 0xb3, 0x4c, 0xe3, 0xa2, 0xa0, 0xd4, 0xda,
+0xab, 0x3b, 0x54, 0xd9, 0xef, 0x84, 0x5d, 0xe4, 0x58, 0xe0, 0xaa, 0xdb,
+0xb9, 0x3b, 0x59, 0x72, 0xc0, 0x1c, 0x93, 0x12, 0x75, 0xe5, 0xec, 0xa0,
+0xa9, 0x23, 0x6d, 0xc3, 0x57, 0x69, 0x20, 0x54, 0xdb, 0x52, 0xd8, 0x2d,
+0xd9, 0x6a, 0x6b, 0xe5, 0xe5, 0xec, 0xc0, 0xd7, 0xa3, 0x49, 0xb9, 0x1c,
+0x68, 0xc0, 0xba, 0xdb, 0x8d, 0xc8, 0xb4, 0xde, 0x80, 0xb5, 0x96, 0x89,
+0x4b, 0x14, 0x74, 0xe0, 0xc6, 0xeb, 0x85, 0xc8, 0xd6, 0xd9, 0xf0, 0x83,
+0xe1, 0xe4, 0x5b, 0x80, 0xb7, 0x22, 0x91, 0x47, 0x94, 0x74, 0xe0, 0xb8,
+0x99, 0xb9, 0x95, 0x6a, 0x8a, 0xa0, 0xc5, 0x65, 0x2a, 0xd6, 0xdc, 0xcc,
+0xe0, 0x73, 0x2b, 0x6a, 0xd7, 0x73, 0xda, 0x2f, 0x83, 0xe2, 0x5c, 0xbc,
+0xa0, 0xe7, 0x1d, 0x2b, 0x34, 0x9c, 0x75, 0x40, 0xc7, 0x93, 0xad, 0xb7,
+0x5b, 0xef, 0x00, 0x39, 0x43, 0xfa, 0x99, 0x10, 0xa2, 0xa0, 0x3b, 0x44,
+0xb7, 0x28, 0x71, 0xd9, 0xaf, 0x7c, 0x25, 0xe4, 0x94, 0xa0, 0x1e, 0x24,
+0xa9, 0xd6, 0xcf, 0x76, 0xc0, 0xd7, 0x1d, 0x71, 0x99, 0x22, 0x58, 0xe0,
+0xdc, 0x9c, 0xf0, 0xaf, 0x62, 0x5c, 0x80, 0xb7, 0x93, 0x55, 0xb6, 0xed,
+0xd9, 0xed, 0x7b, 0x5e, 0x64, 0xae, 0xc0, 0xaa, 0xe3, 0x2e, 0x58, 0xd2,
+0xe4, 0x80, 0xc7, 0x55, 0x11, 0xc8, 0xe5, 0x88, 0xc0, 0xa3, 0x2c, 0x6d,
+0x68, 0xe4, 0xd2, 0xc0, 0xbc, 0x9a, 0xcd, 0xb5, 0xac, 0xd9, 0xb0, 0x7b,
+0x62, 0x64, 0xda, 0xe0, 0xc3, 0x1b, 0xaa, 0xa9, 0x62, 0xa2, 0xe0, 0xbd,
+0x13, 0x96, 0x28, 0xe2, 0x90, 0x80, 0x35, 0x72, 0x89, 0xea, 0x92, 0xd4,
+0xc0, 0x3a, 0x77, 0xd2, 0x68, 0x91, 0xd9, 0xad, 0x73, 0xde, 0x65, 0x76,
+0xc0, 0x57, 0x83, 0xaf, 0x39, 0x30, 0xca, 0xa0, 0x26, 0x69, 0x6e, 0x74,
+0xdc, 0xc8, 0x80, 0xd8, 0xec, 0x8a, 0xb6, 0xb3, 0xba, 0xa0, 0xa5, 0x34,
+0x6f, 0x44, 0xe5, 0xd9, 0xed, 0x8b, 0xde, 0x1c, 0x88, 0xc0, 0x41, 0x0f,
+0x4c, 0xdf, 0x1a, 0xb4, 0xc0, 0x55, 0x99, 0x8d, 0xc2, 0xef, 0x8e, 0xc0,
+0x66, 0x2c, 0x74, 0x78, 0xad, 0xe9, 0x20, 0xb9, 0x1c, 0x8a, 0x48, 0x25,
+0xd9, 0xac, 0x6b, 0xa6, 0x61, 0x70, 0xe0, 0xa4, 0xec, 0x45, 0xd9, 0x5b,
+0x8c, 0xc0, 0xea, 0xda, 0x89, 0xc9, 0x53, 0xdc, 0xc0, 0x5b, 0x8d, 0x69,
+0xd5, 0x75, 0xc5, 0x00, 0xc3, 0x1d, 0x89, 0xba, 0xa5, 0xd9, 0xac, 0x84,
+0x19, 0xe3, 0xe2, 0xe0, 0xdb, 0x5a, 0x76, 0x44, 0xde, 0xa6, 0xe0, 0xb4,
+0xf4, 0x51, 0xd5, 0x5d, 0x50, 0x80, 0x19, 0x69, 0xb2, 0x20, 0xbd, 0xd4,
+0xa0, 0xc3, 0x5d, 0x90, 0xd8, 0xd3, 0xd9, 0xef, 0x7c, 0x5d, 0xe4, 0x52,
+0xc0, 0xe6, 0xe5, 0x67, 0x2c, 0x94, 0x9a, 0xe0, 0x78, 0x9b, 0x94, 0x57,
+0xa5, 0x84, 0xa0, 0xb6, 0xae, 0x51, 0x4c, 0x9c, 0xd8, 0xa0, 0x39, 0x67,
+0x64, 0xf8, 0xeb, 0xd9, 0xec, 0xa4, 0x99, 0x9c, 0xa4, 0xa0, 0x53, 0x43,
+0xb9, 0xb5, 0xd8, 0xe2, 0xc0, 0xca, 0xda, 0xce, 0xb5, 0x13, 0x72, 0xc0,
+0x73, 0x5c, 0x8a, 0xe5, 0x62, 0xa8, 0xc0, 0x1b, 0x19, 0xf2, 0x28, 0xf2,
+0xd9, 0xed, 0x83, 0xe2, 0x5c, 0x9e, 0x80, 0xd8, 0xdb, 0x71, 0xc6, 0xf2,
+0xc2, 0xa0, 0x18, 0xe4, 0xe1, 0xce, 0x89, 0x65, 0x40, 0xe8, 0x9b, 0xaa,
+0x49, 0x52, 0x86, 0x80, 0x15, 0x74, 0x5d, 0x91, 0xb1, 0xd9, 0xaf, 0x8b,
+0xd9, 0xa4, 0xa6, 0xa0, 0x1c, 0xd8, 0xf6, 0x05, 0xba, 0x5d, 0x20, 0xb9,
+0x5a, 0xa6, 0xca, 0x9b, 0xc4, 0xa0, 0xd8, 0xea, 0xd1, 0x45, 0x26, 0xaa,
+0xa0, 0xc4, 0xa6, 0x71, 0x57, 0x1c, 0xd9, 0xee, 0x8b, 0xe5, 0x9b, 0xe2,
+0xa0, 0xd7, 0x63, 0xad, 0x39, 0x6a, 0x76, 0xa0, 0x9b, 0x61, 0x8e, 0x46,
+0xdc, 0xe2, 0x80, 0x1c, 0x6a, 0xf0, 0xda, 0xe0, 0xd4, 0xc0, 0xcb, 0x54,
+0x91, 0xb7, 0x9c, 0xd9, 0xea, 0x93, 0x9d, 0xa4, 0x58, 0xc0, 0xc5, 0x5a,
+0x72, 0x37, 0x23, 0x8c, 0x80, 0x47, 0x96, 0x56, 0x46, 0x4d, 0xb0, 0xa0,
+0x26, 0x6f, 0x94, 0x59, 0x69, 0x76, 0xa0, 0x5c, 0xec, 0x6e, 0x4c, 0x17,
+0xd9, 0xed, 0x9b, 0xdd, 0xdc, 0x96, 0xc0, 0x06, 0x5c, 0x8e, 0xe1, 0x4c,
+0xc7, 0x40, 0x4a, 0x9c, 0xa2, 0x85, 0x77, 0xb8, 0xa0, 0xa8, 0xe3, 0x8a,
+0xdb, 0x12, 0x78, 0xc0, 0xd8, 0x9c, 0x8d, 0xd5, 0x2a, 0xd9, 0xef, 0x8c,
+0x1a, 0x25, 0x68, 0xe0, 0x9b, 0x29, 0x71, 0xcb, 0x0b, 0x9e, 0xa0, 0xca,
+0x53, 0x95, 0xc8, 0xd4, 0x84, 0xa0, 0x6a, 0x94, 0x98, 0xf9, 0x8d, 0xde,
+0xc0, 0x1e, 0xb3, 0x53, 0x66, 0xe4, 0xda, 0x31, 0x9c, 0xe5, 0xdb, 0x94,
+0x80, 0xb6, 0xe2, 0x72, 0x53, 0x23, 0xb6, 0xc0, 0xc9, 0x21, 0x99, 0x37,
+0x1c, 0x96, 0x80, 0x2f, 0xf4, 0x6c, 0xb8, 0xe3, 0xe4, 0xa0, 0xaa, 0xda,
+0x72, 0xa5, 0x2e, 0xd9, 0x2c, 0x8b, 0xdd, 0xe3, 0xd6, 0xc1, 0x09, 0xa3,
+0x4e, 0xc6, 0xdb, 0x8c, 0xc0, 0x33, 0xcd, 0x8e, 0x3e, 0xd0, 0xcc, 0xa0,
+0xc8, 0xa5, 0x8d, 0x46, 0xd6, 0xe8, 0xc0, 0xc6, 0xdd, 0x52, 0x65, 0x23,
+0xda, 0x2d, 0x8c, 0x99, 0xa5, 0x88, 0xc0, 0x60, 0x15, 0xee, 0x2c, 0x70,
+0xe8, 0xc0, 0xb8, 0x9b, 0xd1, 0x4b, 0x0b, 0x6a, 0xc0, 0xea, 0x5c, 0xad,
+0xc7, 0x1c, 0xa8, 0xa0, 0x39, 0x68, 0xe7, 0xf6, 0x54, 0xd9, 0xf0, 0x84,
+0x22, 0x1c, 0xae, 0x80, 0x08, 0x75, 0x4f, 0xbb, 0x29, 0x8c, 0xa0, 0xb4,
+0xaa, 0x95, 0xc8, 0xe6, 0xa0, 0xe0, 0xc5, 0x63, 0x6e, 0xe6, 0xa4, 0x70,
+0xe0, 0xb4, 0xe4, 0x8e, 0x3d, 0x2a, 0xd9, 0xef, 0x8a, 0xde, 0x64, 0xac,
+0xe0, 0x48, 0x1c, 0xc8, 0xa9, 0x5f, 0x8e, 0x80, 0x97, 0x2a, 0x71, 0xc8,
+0xdc, 0xea, 0xc0, 0x53, 0xe6, 0x4d, 0x38, 0xd3, 0xd2, 0xa0, 0x49, 0x3a,
+0xb5, 0xa4, 0xf3, 0xd9, 0xf1, 0xac, 0x1e, 0x1c, 0xee, 0xa0, 0x35, 0x2b,
+0x2c, 0xd5, 0x9f, 0xa4, 0xa0, 0xa7, 0x23, 0x74, 0xbb, 0x53, 0x6e, 0xc0,
+0xd4, 0xdc, 0x6f, 0x56, 0xdb, 0xec, 0xe0, 0xc6, 0xab, 0xd1, 0xa9, 0x6c,
+0xd9, 0xee, 0x94, 0xdd, 0xe4, 0xc4, 0x80, 0x99, 0x1a, 0xaa, 0x5a, 0x9d,
+0xeb, 0x60, 0xb9, 0x09, 0x6e, 0x5b, 0x6a, 0xce, 0x80, 0x4c, 0x55, 0x38,
+0xc5, 0xf2, 0x6a, 0xe0, 0x44, 0x53, 0xd1, 0xe1, 0x75, 0xd9, 0xad, 0xa3,
+0xda, 0x5c, 0xee, 0xa0, 0xc5, 0x64, 0x66, 0x44, 0xa5, 0xee, 0xa0, 0xb7,
+0x6c, 0x66, 0xba, 0xdb, 0x86, 0xa0, 0x66, 0xcb, 0x47, 0x47, 0xf4, 0xec,
+0xc0, 0xa9, 0x5b, 0x52, 0x48, 0xce, 0xda, 0x2f, 0x6b, 0x26, 0x5d, 0x7a,
+0x80, 0x55, 0x43, 0xb0, 0x1b, 0x64, 0xca, 0xa0, 0x3d, 0xc2, 0x8e, 0x3a,
+0xd2, 0x8a, 0xe0, 0xd6, 0xdd, 0x51, 0x55, 0xa3, 0x5a, 0x80, 0x38, 0xeb,
+0x72, 0xe1, 0xe4, 0xd9, 0xad, 0x83, 0xe2, 0x24, 0xe1, 0x20, 0xb9, 0x14,
+0x8d, 0x53, 0x1c, 0xbc, 0xa0, 0xc7, 0x5c, 0x71, 0x96, 0x95, 0xc5, 0x00,
+0xc6, 0xde, 0x74, 0x4c, 0x93, 0x58, 0xa0, 0xc6, 0xe4, 0x66, 0xda, 0xa4,
+0xd9, 0xed, 0x6b, 0x5a, 0x6d, 0xa2, 0xc0, 0x99, 0x1c, 0x92, 0x17, 0x22,
+0xb0, 0xe0, 0xd7, 0x5c, 0x6e, 0xc4, 0x6a, 0xb2, 0xa0, 0xc5, 0x34, 0x8b,
+0x46, 0xab, 0x8e, 0xa0, 0xc8, 0x9e, 0x69, 0xca, 0xea, 0xda, 0x30, 0x6b,
+0xa6, 0x1c, 0x76, 0xc0, 0xd8, 0xcd, 0x72, 0x2d, 0x14, 0x6a, 0xa0, 0x19,
+0x89, 0x97, 0x33, 0xd3, 0x78, 0x80, 0xe7, 0x5b, 0x8e, 0x58, 0xa3, 0xb6,
+0x80, 0xb9, 0x94, 0x79, 0xb5, 0x24, 0xda, 0x2e, 0x9c, 0x5e, 0x1b, 0xa6,
+0xa0, 0xc6, 0x96, 0x91, 0x3b, 0x52, 0x54, 0xc0, 0xd7, 0x1c, 0xad, 0xa9,
+0x22, 0x86, 0xa1, 0x47, 0x93, 0x95, 0xc6, 0xe3, 0x62, 0xa0, 0x49, 0x63,
+0x61, 0x99, 0xa6, 0xd9, 0xac, 0x94, 0x19, 0xa5, 0xbe, 0xa0, 0xb7, 0x29,
+0x75, 0xc7, 0x1c, 0x66, 0x80, 0xa7, 0x1d, 0x71, 0xac, 0xdb, 0xce, 0xa0,
+0xeb, 0x0b, 0x92, 0x17, 0x6c, 0x58, 0x80, 0x15, 0x54, 0x79, 0xb9, 0x53,
+0xd9, 0xed, 0x7b, 0x5e, 0x64, 0x9e, 0xc0, 0x64, 0x97, 0x69, 0x4a, 0x85,
+0xf0, 0xe0, 0xe5, 0x65, 0x71, 0xd5, 0x4a, 0x94, 0x80, 0xbd, 0x69, 0x79,
+0xd6, 0xe3, 0xa4, 0xc0, 0xc8, 0xb2, 0x8d, 0xc9, 0x1c, 0xd9, 0xee, 0x6c,
+0x25, 0xe4, 0xbe, 0xc0, 0x35, 0x57, 0xbc, 0xa8, 0x9a, 0xef, 0x00, 0x1a,
+0x14, 0xb9, 0x27, 0xe2, 0x52, 0xe0, 0x24, 0xe4, 0x76, 0xba, 0xa1, 0xbe,
+0x80, 0xcb, 0x2a, 0xb1, 0x97, 0x63, 0xd9, 0xee, 0x7c, 0x26, 0x23, 0x6a,
+0xa0, 0x8b, 0x22, 0xa9, 0xab, 0x63, 0x70, 0xc0, 0xc8, 0x64, 0xad, 0x4b,
+0x5c, 0xb2, 0xa0, 0x57, 0x90, 0xb3, 0xa8, 0xbe, 0xc4, 0xe0, 0x23, 0x93,
+0x5a, 0x47, 0xad, 0xd9, 0xb0, 0x7b, 0x5a, 0x24, 0x89, 0x00, 0xb6, 0xe4,
+0x69, 0xe7, 0x11, 0x5a, 0xe0, 0xc6, 0xe3, 0x71, 0xd6, 0xb2, 0x74, 0xa0,
+0x56, 0x27, 0xce, 0xa7, 0x6a, 0x5a, 0x80, 0xb7, 0x25, 0x72, 0x43, 0x1c,
+0xd9, 0xed, 0x7b, 0x9e, 0x64, 0xd2, 0xa0, 0x8b, 0x25, 0x72, 0x46, 0x64,
+0xa1, 0x40, 0x60, 0xe2, 0xa9, 0xcb, 0x17, 0xa2, 0xe0, 0xc7, 0x2b, 0x4e,
+0x2c, 0xe3, 0xbe, 0x80, 0x65, 0x33, 0xaa, 0x45, 0xda, 0xd9, 0xf0, 0x7b,
+0x21, 0xe4, 0xae, 0xe0, 0x7a, 0x5a, 0x84, 0xd9, 0xda, 0xc8, 0xa0, 0x54,
+0xf1, 0x8f, 0xe1, 0x92, 0x52, 0xc0, 0x4b, 0xc4, 0x79, 0x95, 0x66, 0xb6,
+0xc0, 0xab, 0x1b, 0xb5, 0xb5, 0x9c, 0xd9, 0xef, 0x8c, 0x65, 0xe4, 0x87,
+0x20, 0x99, 0x24, 0x51, 0xc6, 0xdb, 0x52, 0xc0, 0x5d, 0x99, 0xa8, 0xea,
+0x14, 0xec, 0xe0, 0xb8, 0xf2, 0xb6, 0x36, 0xe2, 0x98, 0xe0, 0xda, 0x5c,
+0xb2, 0x4b, 0x1b, 0xda, 0x2e, 0x83, 0xa1, 0xe4, 0x9a, 0xc0, 0x26, 0x45,
+0x71, 0xad, 0x32, 0xb6, 0xc0, 0xba, 0xda, 0xb2, 0x99, 0x23, 0x64, 0xc0,
+0xc6, 0xa5, 0x66, 0x4b, 0x14, 0x56, 0xc0, 0xd7, 0x23, 0x71, 0xe4, 0xe5,
+0xda, 0x2d, 0x7b, 0x66, 0x25, 0x84, 0x80, 0x18, 0xa1, 0xa0, 0xf6, 0x5d,
+0x72, 0x20, 0x66, 0x97, 0x72, 0x77, 0x4d, 0xc8, 0xe0, 0xb7, 0x15, 0x36,
+0xda, 0xed, 0x54, 0xe0, 0xb4, 0x6c, 0x6f, 0x53, 0x1c, 0xda, 0x2e, 0x7c,
+0x19, 0x65, 0x8a, 0x80, 0xd4, 0xa5, 0xa6, 0x4a, 0xda, 0x6c, 0xe0, 0x28,
+0xa3, 0xb7, 0x19, 0x92, 0xe4, 0xa0, 0x45, 0x25, 0xe5, 0x49, 0x4b, 0xd2,
+0x80, 0x65, 0xcb, 0xba, 0xa3, 0xed, 0xd9, 0xef, 0x83, 0xa5, 0x25, 0x62,
+0xc0, 0xa9, 0x25, 0x74, 0xa9, 0x1b, 0x58, 0xc0, 0x44, 0xde, 0x8c, 0xc9,
+0x63, 0x6a, 0x80, 0xd5, 0x19, 0xb2, 0x29, 0x6c, 0xc4, 0x80, 0x1b, 0xb2,
+0x72, 0xc9, 0xea, 0xda, 0x2d, 0x9b, 0x9e, 0x24, 0xc4, 0x80, 0x55, 0x52,
+0x91, 0xd3, 0x66, 0xe2, 0xc0, 0x4c, 0xc5, 0x4e, 0x27, 0x55, 0xe6, 0xe0,
+0xb7, 0x5d, 0x33, 0x36, 0xb4, 0x56, 0xa1, 0x42, 0xdc, 0x8a, 0x48, 0xdc,
+0xd9, 0xed, 0x7b, 0x9e, 0x64, 0x96, 0xc0, 0xc6, 0x9c, 0x75, 0xb9, 0x95,
+0x9c, 0xa0, 0x05, 0xb4, 0x73, 0x2a, 0xd5, 0x9c, 0xe0, 0x64, 0x3d, 0x85,
+0xea, 0x9d, 0xec, 0x80, 0x2e, 0xf2, 0x99, 0xd3, 0x9b, 0xd9, 0xed, 0x7c,
+0x5e, 0x24, 0xbf, 0x60, 0x3a, 0x65, 0xe1, 0xc9, 0x47, 0x70, 0xc0, 0x3a,
+0xc7, 0x32, 0xba, 0x4e, 0xa8, 0xe0, 0xb9, 0x2d, 0x32, 0x36, 0xe6, 0xe0,
+0x20, 0x25, 0x2a, 0x98, 0x97, 0xf5, 0xd9, 0xed, 0x73, 0x62, 0x1d, 0x9a,
+0x80, 0xa9, 0x1a, 0xb1, 0xc5, 0x5c, 0xec, 0x80, 0x62, 0xe4, 0x15, 0x5d,
+0x5c, 0xdf, 0x40, 0x39, 0xd5, 0x5d, 0xc1, 0xda, 0x54, 0xa0, 0xa6, 0xbb,
+0x6a, 0x46, 0xe4, 0xd9, 0xeb, 0x7c, 0x22, 0x1c, 0x6e, 0x20, 0x97, 0x1a,
+0xb1, 0x56, 0xe2, 0xda, 0x80, 0xc9, 0x5d, 0x5a, 0x38, 0xdd, 0xe0, 0xa0,
+0x24, 0xf4, 0x4d, 0x69, 0x15, 0x6c, 0x80, 0xe6, 0xdc, 0x72, 0x49, 0x1d,
+0xd9, 0xed, 0x83, 0xde, 0x24, 0xa8, 0x80, 0x66, 0xa2, 0x76, 0x33, 0x54,
+0xe6, 0xa0, 0xc9, 0x23, 0xad, 0x99, 0x16, 0x5c, 0xe0, 0xb7, 0x65, 0x2d,
+0xd7, 0x16, 0x52, 0xc0, 0xd4, 0xde, 0x69, 0xc8, 0xed, 0xd9, 0xef, 0x9c,
+0x5d, 0xdc, 0x68, 0xa0, 0xc5, 0x23, 0x8a, 0x43, 0x65, 0xce, 0xc0, 0xc6,
+0xa5, 0x86, 0x56, 0xcd, 0xd8, 0xc0, 0x56, 0xb6, 0x61, 0xa9, 0x1c, 0x9a,
+0xa0, 0xc7, 0x2b, 0x53, 0x56, 0xbc, 0xd9, 0xee, 0x73, 0xa9, 0xe5, 0x5c,
+0xe0, 0x01, 0x26, 0x81, 0x3a, 0xc5, 0x6e, 0xa0, 0xdc, 0xd1, 0x92, 0x47,
+0x1c, 0xde, 0x80, 0x2a, 0x62, 0xd4, 0xdc, 0xb9, 0xce, 0xa0, 0xe6, 0xdc,
+0x8d, 0x57, 0x5d, 0xd9, 0xac, 0x8b, 0xde, 0x23, 0x9a, 0xc0, 0xb3, 0x24,
+0x6e, 0x54, 0xd5, 0x92, 0xc0, 0xc6, 0xde, 0x6d, 0x2a, 0xe3, 0xb2, 0xc0,
+0xcc, 0xac, 0x71, 0xc5, 0x24, 0xd1, 0x40, 0xa5, 0x63, 0x72, 0x4a, 0xe3,
+0xd9, 0xb2, 0x9b, 0xe1, 0xe4, 0x7b, 0x00, 0x2a, 0x71, 0xec, 0x57, 0x5c,
+0xd0, 0xa0, 0xb9, 0x23, 0x6e, 0x3c, 0xdc, 0x9a, 0xa0, 0xb7, 0x1b, 0x90,
+0xd9, 0x24, 0xde, 0xa0, 0x49, 0x58, 0x6e, 0x4a, 0x7c, 0xd9, 0xad, 0x7b,
+0x1e, 0x6d, 0xa0, 0xa0, 0xc6, 0xe3, 0x71, 0x49, 0x4c, 0xc6, 0xc0, 0x39,
+0x15, 0x86, 0x53, 0x34, 0xa0, 0xc0, 0xb6, 0xb5, 0xa9, 0xd6, 0xe2, 0x60,
+0xc0, 0xe8, 0xe4, 0x8d, 0xb5, 0x62, 0xda, 0x2d, 0x8c, 0xa5, 0x9c, 0x98,
+0xc0, 0x5b, 0x1b, 0x90, 0xd9, 0x43, 0x81, 0x40, 0x47, 0x85, 0x59, 0x4a,
+0x5c, 0x6a, 0xe0, 0x45, 0xec, 0x92, 0x42, 0xb6, 0xd2, 0xc0, 0xa7, 0x2f,
+0x4d, 0xd6, 0xe4, 0xd9, 0xac, 0x74, 0x1e, 0x6b, 0x74, 0xc0, 0xc6, 0x95,
+0xa9, 0xc9, 0x11, 0xc2, 0xa0, 0xe8, 0xdb, 0x91, 0xc5, 0x5b, 0xa4, 0xc0,
+0x35, 0xdc, 0x7e, 0x27, 0xa3, 0xb0, 0xc0, 0xce, 0xda, 0x79, 0xb5, 0x5c,
+0xd9, 0xec, 0x9b, 0xa1, 0xe4, 0x90, 0xc0, 0x27, 0x45, 0x36, 0xe4, 0x9e,
+0xce, 0x80, 0x22, 0x65, 0x4c, 0xd5, 0xac, 0xea, 0xa0, 0x39, 0x62, 0x2b,
+0x59, 0xa8, 0x62, 0xe0, 0x7a, 0x45, 0xd1, 0xd4, 0x9a, 0xd9, 0xac, 0x7b,
+0x9e, 0x24, 0xaa, 0xc0, 0x39, 0x63, 0xaa, 0x03, 0x56, 0xc6, 0xc0, 0xb7,
+0x23, 0x31, 0xd6, 0xa6, 0xc7, 0x60, 0xb6, 0xf4, 0x4d, 0xd8, 0xe3, 0x68,
+0xa0, 0xe7, 0x23, 0xb1, 0x49, 0x55, 0xd9, 0xef, 0x84, 0x25, 0xe4, 0x5c,
+0xa0, 0x1a, 0xe6, 0x48, 0x4a, 0xdb, 0x63, 0x20, 0x58, 0xe9, 0x29, 0xe5,
+0xe2, 0x82, 0xc0, 0xb6, 0xf4, 0x49, 0xd9, 0x22, 0x5b, 0x40, 0x7e, 0x2d,
+0x18, 0xf6, 0xd5, 0xd9, 0xac, 0x93, 0xa1, 0xe3, 0x5e, 0xe0, 0x28, 0x86,
+0x55, 0xfa, 0x9b, 0xbc, 0x80, 0x99, 0x5b, 0x51, 0xc8, 0xdc, 0xd4, 0xa0,
+0x68, 0x57, 0xd9, 0x08, 0xe8, 0x58, 0xe0, 0xbb, 0xdc, 0x72, 0x27, 0x15,
+0xd9, 0xef, 0x7b, 0xde, 0x63, 0xbc, 0xe0, 0x2d, 0x24, 0xc6, 0x08, 0x52,
+0x96, 0xa0, 0x4b, 0x47, 0xb0, 0xe8, 0xd2, 0xb2, 0xc0, 0xb9, 0x32, 0x6e,
+0x42, 0xe5, 0x98, 0xa0, 0x3b, 0x33, 0xad, 0x43, 0x95, 0xd9, 0xf3, 0x84,
+0x21, 0x94, 0xbc, 0xc0, 0x43, 0xbb, 0x4a, 0x58, 0x21, 0x7c, 0xa0, 0x69,
+0x1e, 0x6d, 0xdc, 0x92, 0x6d, 0x20, 0x6a, 0xb4, 0xd0, 0xbb, 0x4c, 0x8a,
+0xa0, 0xb5, 0x1c, 0x6e, 0x4c, 0xd5, 0xd9, 0xac, 0x94, 0x1d, 0xdc, 0x86,
+0xa0, 0x2a, 0x17, 0x34, 0xca, 0x84, 0x7c, 0xc0, 0xd7, 0x63, 0x76, 0x3a,
+0xd1, 0xac, 0xc0, 0xcc, 0xa4, 0xd1, 0xb3, 0x6b, 0x54, 0xc0, 0x4a, 0x4d,
+0xa1, 0xbb, 0x52, 0xda, 0x2f, 0x6b, 0xa2, 0x64, 0x80, 0xc0, 0x0b, 0x19,
+0xd4, 0xa1, 0x7e, 0x54, 0x80, 0x03, 0xaa, 0xf1, 0x44, 0xcd, 0x94, 0xc0,
+0xc7, 0x1e, 0x91, 0xd6, 0xdd, 0xe0, 0xc0, 0x68, 0xdc, 0xba, 0x2a, 0x97,
+0xda, 0x31, 0x7c, 0x21, 0xa4, 0x61, 0x40, 0xb8, 0xa4, 0x2d, 0xd8, 0xd3,
+0x72, 0xa0, 0x5a, 0xd4, 0xd0, 0xce, 0xf1, 0x90, 0xc0, 0x7d, 0x54, 0xb0,
+0xbb, 0x94, 0xd9, 0x40, 0xc8, 0xdb, 0x79, 0xd7, 0x6d, 0xd9, 0xaf, 0xa4,
+0x1d, 0x9c, 0xa5, 0x40, 0x98, 0x62, 0x6e, 0x48, 0xdc, 0x9a, 0xe0, 0xd6,
+0xd1, 0x75, 0xd7, 0x1c, 0x5f, 0x40, 0x22, 0xe5, 0xd6, 0x9f, 0x55, 0x72,
+0x80, 0xb7, 0x5a, 0x86, 0xc4, 0xeb, 0xda, 0x30, 0x93, 0xe1, 0x5d, 0xea,
+0xe0, 0xc8, 0xed, 0x8c, 0xab, 0x1a, 0x7e, 0xa0, 0x4c, 0xbb, 0xb3, 0x0a,
+0x23, 0xc3, 0x20, 0x29, 0xa6, 0x45, 0xb8, 0x84, 0xf0, 0xc0, 0xc9, 0x2c,
+0x82, 0x46, 0x9d, 0xda, 0x2f, 0x7c, 0x9e, 0x1b, 0xcc, 0xa0, 0x4c, 0xe3,
+0x76, 0x24, 0xf1, 0x76, 0xa0, 0xab, 0x1b, 0x72, 0xb8, 0xf3, 0xb1, 0x20,
+0xc9, 0x1b, 0x6e, 0x33, 0xa4, 0xb8, 0xe0, 0xd8, 0xdb, 0xd1, 0xb7, 0x2a,
+0xd9, 0xaf, 0x8b, 0x9d, 0xa4, 0x84, 0xc0, 0xad, 0x13, 0x71, 0xd8, 0xa4,
+0xe5, 0x40, 0xc4, 0xae, 0x51, 0xb6, 0x9b, 0x56, 0xc0, 0xd8, 0xdb, 0x8e,
+0xa6, 0xf4, 0x67, 0x20, 0x34, 0xed, 0x71, 0x2c, 0x9e, 0xda, 0x2f, 0x8b,
+0xa2, 0x1c, 0xf0, 0xa0, 0x59, 0x5a, 0x71, 0x43, 0x0f, 0xa1, 0x20, 0xd9,
+0x1c, 0x88, 0xc9, 0x5a, 0x66, 0x60, 0x61, 0xac, 0xc1, 0x2c, 0xa9, 0xc0,
+0xc0, 0x6e, 0xdb, 0x91, 0x52, 0xe4, 0xd9, 0xef, 0x93, 0x66, 0x24, 0xb0,
+0xc0, 0xb9, 0x93, 0xb2, 0x36, 0x95, 0x7c, 0x80, 0x5d, 0x9b, 0xea, 0x19,
+0x16, 0x84, 0xa0, 0xd8, 0x53, 0x8d, 0xc9, 0x24, 0xec, 0xc0, 0x05, 0x2a,
+0x15, 0x4d, 0x25, 0xda, 0x2c, 0x83, 0xda, 0x24, 0xb4, 0xa0, 0x42, 0xbc,
+0x1a, 0xca, 0x9a, 0x76, 0xc0, 0xd2, 0xab, 0xa9, 0xca, 0xdb, 0xe0, 0xa0,
+0xd7, 0x23, 0x8e, 0x65, 0x1d, 0x9c, 0x80, 0x26, 0x7e, 0x4a, 0x76, 0x96,
+0xd9, 0xac, 0x9c, 0x21, 0xe4, 0x88, 0xa0, 0x5c, 0x5d, 0x6a, 0x49, 0x50,
+0xae, 0xa0, 0x7b, 0x61, 0xcd, 0x35, 0x1d, 0x70, 0xe0, 0x5a, 0x7b, 0x8c,
+0xb9, 0x11, 0xa8, 0xa0, 0xbb, 0x9c, 0x71, 0xbb, 0x23, 0xda, 0x30, 0x8c,
+0x66, 0x64, 0x52, 0xc0, 0xc8, 0x5a, 0x8e, 0x58, 0xe3, 0xc0, 0xa0, 0x62,
+0xe2, 0x62, 0xfa, 0x4c, 0xba, 0xc0, 0x65, 0xa2, 0xdd, 0x0c, 0xea, 0xbc,
+0xa0, 0xc6, 0xab, 0x91, 0xbc, 0xa5, 0xd9, 0xac, 0x94, 0x25, 0xdc, 0xd8,
+0xc0, 0xc4, 0xdd, 0x8c, 0xc5, 0x64, 0xda, 0x80, 0xb5, 0x24, 0x79, 0x25,
+0x63, 0x60, 0xc0, 0xc5, 0xa3, 0x71, 0xc7, 0x63, 0xcd, 0x40, 0xd6, 0xec,
+0x85, 0xc8, 0xe4, 0xd9, 0xef, 0x8c, 0x21, 0xe4, 0x76, 0xa0, 0xb8, 0xeb,
+0x76, 0x41, 0x1c, 0xac, 0xa0, 0xb9, 0x1c, 0x56, 0x45, 0x24, 0x76, 0xa0,
+0x21, 0xef, 0x63, 0x3a, 0xc5, 0x54, 0xe0, 0x15, 0xa5, 0x73, 0x18, 0xd9,
+0xda, 0x2f, 0x7c, 0x5a, 0x63, 0xca, 0x80, 0x39, 0x5a, 0x77, 0x14, 0xb8,
+0xcc, 0xc0, 0x4e, 0xa2, 0x56, 0xeb, 0x0e, 0x78, 0xc0, 0xc3, 0x25, 0x4e,
+0x5a, 0xeb, 0x8e, 0xa0, 0x65, 0x20, 0x8f, 0x39, 0xa5, 0xd9, 0xf1, 0x94,
+0x1d, 0xe4, 0xa6, 0xa0, 0x97, 0x1b, 0xc9, 0xd9, 0x93, 0x58, 0x80, 0xab,
+0x1b, 0x91, 0xc3, 0x24, 0x98, 0xc0, 0x76, 0x9a, 0xa5, 0xc4, 0xe7, 0xb8,
+0x40, 0x28, 0x95, 0x8f, 0x26, 0xea, 0xd9, 0xf0, 0x8b, 0xa2, 0x24, 0xd8,
+0xe0, 0xb9, 0x52, 0x95, 0xb7, 0xa3, 0xe6, 0x80, 0x1d, 0x14, 0x39, 0x43,
+0x65, 0x51, 0x60, 0xd6, 0xeb, 0x71, 0xc5, 0xad, 0xf1, 0x40, 0xc5, 0x21,
+0x8e, 0x39, 0x1c, 0xd9, 0xaf, 0xa4, 0x25, 0xe4, 0x72, 0x80, 0xab, 0x5a,
+0x51, 0xb7, 0x9c, 0xb0, 0x80, 0x3c, 0x8c, 0x30, 0xcd, 0xb2, 0xe8, 0xc0,
+0xdb, 0x12, 0xcd, 0xb4, 0xf4, 0x76, 0xc0, 0x74, 0xd9, 0x5d, 0xe4, 0xdd,
+0xd9, 0xeb, 0x8b, 0xe2, 0x2d, 0xe4, 0x80, 0x69, 0x94, 0x70, 0x9a, 0xd5,
+0xec, 0xe0, 0x17, 0xe0, 0x92, 0xa5, 0xd6, 0xb4, 0xe0, 0xa9, 0x1b, 0x73,
+0x37, 0x23, 0x6e, 0xc0, 0xbb, 0x21, 0xba, 0x26, 0xe3, 0xd9, 0xae, 0x83,
+0x22, 0x24, 0x54, 0xa0, 0xa6, 0xec, 0x90, 0xd7, 0x22, 0xc4, 0xa0, 0x19,
+0x43, 0xdf, 0x26, 0x5a, 0xe5, 0x40, 0xc7, 0x2c, 0x4d, 0x78, 0xdc, 0xac,
+0xa0, 0x73, 0x4b, 0xd5, 0x2e, 0xe1, 0xd9, 0xf1, 0xac, 0x1e, 0x14, 0xb8,
+0xa0, 0x68, 0x92, 0x54, 0xca, 0xb5, 0xcc, 0xc0, 0xb6, 0xde, 0x92, 0x39,
+0x23, 0x6c, 0xc0, 0x70, 0x5e, 0x88, 0xbf, 0x93, 0x74, 0xa0, 0xc9, 0x19,
+0x95, 0x57, 0x1c, 0xd9, 0xf0, 0x94, 0xdd, 0x9b, 0xb4, 0x80, 0xc8, 0xdc,
+0x55, 0x49, 0xa4, 0x8e, 0xc0, 0xa6, 0xf4, 0x8e, 0xb6, 0xe2, 0xd6, 0x80,
+0x2e, 0x94, 0xda, 0x2a, 0xec, 0x8e, 0xa0, 0x95, 0x25, 0x4f, 0x58, 0xa3,
+0xd9, 0xed, 0x83, 0xde, 0x1c, 0x5e, 0xa0, 0xc5, 0x1c, 0xb1, 0x45, 0x19,
+0xb1, 0x20, 0xbc, 0xdb, 0xb2, 0x28, 0xe3, 0x62, 0xa0, 0xa9, 0x5c, 0x92,
+0x36, 0xdd, 0xb2, 0xa0, 0xa9, 0x9d, 0x96, 0x54, 0xdc, 0xd9, 0xee, 0x63,
+0x61, 0xe4, 0xe0, 0xa0, 0xa4, 0xe4, 0x55, 0x78, 0xe2, 0xb8, 0xe0, 0xd8,
+0x93, 0xad, 0x9a, 0xe3, 0x98, 0xc0, 0x33, 0xaa, 0x43, 0x54, 0xed, 0xd6,
+0xc0, 0x14, 0x6d, 0x8e, 0x7a, 0x6a, 0xd9, 0xee, 0x83, 0xe1, 0xdb, 0xb5,
+0x40, 0xba, 0xa3, 0xaf, 0x18, 0xeb, 0x92, 0xc0, 0x98, 0xdb, 0xad, 0xb7,
+0x54, 0x98, 0xa0, 0x1b, 0x1c, 0xab, 0xa7, 0x5b, 0xbe, 0x80, 0xb9, 0x92,
+0x96, 0xc6, 0xed, 0xd9, 0xec, 0x7b, 0xa6, 0x24, 0x50, 0xa0, 0x97, 0x63,
+0x91, 0xc8, 0xd4, 0xba, 0xe0, 0x4a, 0x91, 0xb6, 0x2b, 0x20, 0xd6, 0xc0,
+0xa9, 0x5c, 0x71, 0xe6, 0xe1, 0x64, 0xa0, 0x4b, 0x4f, 0x9d, 0x2a, 0xb2,
+0xd9, 0xef, 0x7b, 0xe6, 0x1c, 0x6a, 0xc0, 0xb8, 0xe3, 0x71, 0xb6, 0xf3,
+0xa9, 0x00, 0xb7, 0x95, 0x4a, 0x38, 0xeb, 0x8a, 0xc0, 0x48, 0x5e, 0xd1,
+0x19, 0xa9, 0xb8, 0xa0, 0xb9, 0x23, 0x52, 0x38, 0xf2, 0xd9, 0xaf, 0x73,
+0xe6, 0x24, 0xd8, 0xa0, 0xa7, 0x6a, 0x96, 0xb4, 0xf4, 0x64, 0xa0, 0x07,
+0x2d, 0x37, 0xb6, 0x64, 0x82, 0xc0, 0x56, 0x9d, 0xe7, 0x2c, 0xe6, 0xaa,
+0x80, 0x17, 0x39, 0xa6, 0x7a, 0xc4, 0xd9, 0xee, 0xa4, 0x66, 0x1c, 0x62,
+0x80, 0x2a, 0xe2, 0x55, 0x35, 0x54, 0xb8, 0xc0, 0x03, 0xad, 0x53, 0x26,
+0xa9, 0x7c, 0xa0, 0xd8, 0xe4, 0x8d, 0x29, 0x9c, 0x9e, 0xa0, 0xd7, 0x69,
+0x4e, 0xc3, 0x5c, 0xdb, 0xee, 0x94, 0x12, 0x54, 0x6d, 0x00, 0xb7, 0x5b,
+0x52, 0x37, 0x17, 0xc4, 0x80, 0xb7, 0x4c, 0x8d, 0xd8, 0xb4, 0x81, 0x21,
+0x45, 0x64, 0x66, 0x4c, 0x9c, 0x5e, 0xe0, 0xda, 0x4c, 0xcd, 0x49, 0x1e,
+0xdc, 0x70, 0x9c, 0x8e, 0x1c, 0xac, 0xc1, 0x29, 0x61, 0x75, 0x9b, 0x1c,
+0xee, 0xc0, 0xa7, 0x9a, 0xad, 0x8c, 0xe4, 0x96, 0xc0, 0xd5, 0x54, 0x75,
+0xe5, 0x34, 0xda, 0xa0, 0xa7, 0xd5, 0x56, 0xc4, 0x73, 0xda, 0xed, 0xb3,
+0x9e, 0x94, 0x62, 0x81, 0x28, 0xa2, 0xae, 0x43, 0x2c, 0xb8, 0xc0, 0xc9,
+0x53, 0xb1, 0xa2, 0x9d, 0xe8, 0x40, 0xc9, 0x26, 0x71, 0xa7, 0x8b, 0xda,
+0xc0, 0xe6, 0xd4, 0xb1, 0x45, 0x1d, 0xd9, 0xae, 0x9b, 0x9d, 0xe4, 0x62,
+0x80, 0xb5, 0x6e, 0x61, 0xaa, 0xe3, 0x6a, 0xa0, 0xc7, 0x32, 0x6a, 0x36,
+0xde, 0xaa, 0x80, 0x2a, 0xab, 0x8d, 0xe9, 0x12, 0x7c, 0xc0, 0xc7, 0x2c,
+0x36, 0x38, 0xeb, 0xd9, 0xed, 0x74, 0x1e, 0x64, 0xb6, 0xa0, 0x1b, 0x53,
+0x06, 0xe8, 0x0c, 0x58, 0xe0, 0xc8, 0xeb, 0x7a, 0x44, 0x6b, 0x76, 0xc0,
+0x56, 0xd5, 0xa3, 0xd4, 0x6c, 0x92, 0xc0, 0xb5, 0x5d, 0x6a, 0x48, 0xe9,
+0xd9, 0xaf, 0x73, 0xa1, 0xec, 0xc6, 0xc0, 0xb5, 0x2a, 0x8e, 0xc3, 0x24,
+0x5c, 0xe0, 0x34, 0xb5, 0x6a, 0x4a, 0x64, 0xea, 0xc0, 0xba, 0x95, 0xce,
+0x47, 0x1c, 0x83, 0x20, 0xc7, 0x64, 0x6a, 0xf8, 0xca, 0xd2, 0xac, 0xcb,
+0xea, 0xf4, 0x5d, 0xe3, 0x56, 0x4a, 0x84, 0x17, 0xa1, 0x67, 0xc7, 0x28,
+0xdc, 0x89, 0xef, 0x52, 0x65, 0xd0, 0x3f, 0x49, 0x77, 0x34, 0x9c, 0x69,
+0xf0, 0xd5, 0x15, 0x1a, 0x63, 0x0f, 0xd3, 0x25, 0xcc, 0x72, 0x76, 0x8b,
+0xae, 0x38, 0x5a, 0xef, 0x2c, 0x2a, 0x5b, 0x32, 0x5b, 0x5a, 0xaf, 0x94,
+0xb6, 0x5d, 0x33, 0xb1, 0x7d, 0x21, 0x7b, 0x42, 0x86, 0xd3, 0x4c, 0x1c,
+0xd2, 0x27, 0x1c, 0xd4, 0x1f, 0xc4, 0xba, 0x66, 0xb0, 0xf0, 0xa2, 0xec,
+0x76, 0x45, 0x1f, 0xb5, 0x31, 0x9a, 0xeb, 0xae, 0x08, 0xe9, 0x89, 0xb2,
+0x98, 0xea, 0xc3, 0x8c, 0xfb, 0x56, 0xb2, 0x37, 0x73, 0x66, 0xce, 0xd8,
+0xd3, 0xe1, 0xbc, 0x7d, 0xef, 0xc3, 0x31, 0xdc, 0xf0, 0xc6, 0x9c, 0xe2,
+0xe4, 0xef, 0xc8, 0x61, 0xf6, 0x13, 0xa7, 0x8b, 0x4f, 0x71, 0x1e, 0x69,
+0xd5, 0x22, 0xcf, 0xf1, 0x39, 0x12, 0xb4, 0xbb, 0x39, 0xd3, 0xa1, 0xc4,
+0xbd, 0xae, 0x74, 0xb0, 0x95, 0xbc, 0x25, 0x7d, 0x40, 0xc3, 0xb3, 0x5a,
+0xe0, 0xf1, 0xb7, 0x1c, 0x5c, 0xef, 0x62, 0x95, 0xf9, 0x25, 0x9f, 0x8b,
+0xf0, 0xf3, 0xd3, 0x91, 0xc3, 0xcf, 0xd3, 0x64, 0xc4, 0xb2, 0x2f, 0xd8,
+0xd1, 0x9e, 0x69, 0xb6, 0x27, 0x72, 0x7c, 0x4f, 0x87, 0xbb, 0x02, 0x7e,
+0xc8, 0xe4, 0x90, 0xeb, 0xe8, 0x87, 0x3c, 0xdb, 0x8b, 0xef, 0x6b, 0x88,
+0x5f, 0x60, 0xc6, 0xd3, 0x64, 0xc4, 0x72, 0x76, 0xcf, 0xb0, 0xe6, 0x19,
+0xd6, 0x06, 0x7a, 0x68, 0xd0, 0x9e, 0x69, 0xce, 0x39, 0xb2, 0xbc, 0x50,
+0x17, 0xbb, 0x06, 0x7c, 0xc0, 0xe5, 0x30, 0xfb, 0x98, 0xcb, 0x38, 0xe3,
+0xd3, 0xa2, 0xbc, 0xaa, 0xef, 0x8b, 0xb1, 0x1f, 0x30, 0x6b, 0x4c, 0x21,
+0x8b, 0xcf, 0xf5, 0x99, 0x52, 0xe6, 0x2a, 0x82, 0xce, 0xac, 0x69, 0xd1,
+0x19, 0xeb, 0xa0, 0x30, 0x03, 0xbd, 0x01, 0xff, 0x00, 0xd3, 0x64, 0xbc,
+0x2a, 0xef, 0xe4, 0x90, 0xcd, 0x61, 0x52, 0xba, 0x32, 0x53, 0x50, 0x14,
+0x6d, 0xc8, 0xa7, 0xdd, 0xad, 0xaf, 0x7a, 0x60, 0xd6, 0x9a, 0xab, 0x7a,
+0xb0, 0x3b, 0x22, 0x9c, 0x39, 0x3b, 0xd3, 0x28, 0xc3, 0xe7, 0x77, 0xc4,
+0x2e, 0x85, 0x7c, 0x01, 0xed, 0x08, 0xe4, 0xef, 0x4d, 0x50, 0x73, 0xe2,
+0xcb, 0xaf, 0xb0, 0xaf, 0x28, 0x4f, 0xd8, 0x1c, 0xac, 0xaf, 0xd6, 0x32,
+0xf1, 0xa7, 0x2c, 0xd2, 0xe9, 0xcc, 0x2a, 0xee, 0xda, 0xac, 0x17, 0xa4,
+0x38, 0x3b, 0xa3, 0xe0, 0x4c, 0x09, 0xfb, 0x02, 0x7e, 0x81, 0xdd, 0x6e,
+0x69, 0x51, 0x76, 0x61, 0xc7, 0x67, 0x91, 0x1c, 0xe8, 0x87, 0x3c, 0x22,
+0xd2, 0xac, 0xcc, 0x72, 0x34, 0x68, 0xad, 0x98, 0x32, 0xe6, 0x27, 0x23,
+0x6e, 0xaa, 0xb7, 0x2c, 0xca, 0x1c, 0xf9, 0xe6, 0x6b, 0x2b, 0xea, 0x0b,
+0x7a, 0x81, 0xdc, 0xcc, 0xdb, 0x90, 0x57, 0xf4, 0x1c, 0xd2, 0xeb, 0xbc,
+0x72, 0x3e, 0x71, 0xef, 0x52, 0xd6, 0x5c, 0x45, 0x96, 0x69, 0x30, 0xb8,
+0x1c, 0xf1, 0xa5, 0xa4, 0x66, 0xcc, 0x11, 0xfd, 0x80, 0xbf, 0xa9, 0xdc,
+0x2a, 0x99, 0xb4, 0x25, 0x6d, 0x50, 0xd2, 0x6e, 0xde, 0x75, 0xed, 0xe2,
+0xac, 0x47, 0x23, 0x4b, 0xec, 0x13, 0xdb, 0x6c, 0xc5, 0xa2, 0x74, 0x75,
+0x87, 0x7f, 0x4d, 0x38, 0x15, 0xee, 0x29, 0x2d, 0xbc, 0xa8, 0xa2, 0xaf,
+0xf0, 0x0d, 0xf3, 0xd2, 0x71, 0xe5, 0xb2, 0x2d, 0x69, 0x09, 0x93, 0x3d,
+0x41, 0x5b, 0x20, 0x6d, 0x29, 0x4b, 0x1a, 0x6f, 0x58, 0x23, 0xd7, 0xec,
+0xc5, 0x22, 0x74, 0xf3, 0x4e, 0xb5, 0xca, 0x1e, 0xa0, 0xf3, 0x24, 0x53,
+0xd2, 0x71, 0xe5, 0xa9, 0x5b, 0x72, 0x68, 0x05, 0x6c, 0x45, 0x5b, 0x19,
+0xdc, 0x68, 0x2b, 0x22, 0x2e, 0xd8, 0xc5, 0xd8, 0xa9, 0x3a, 0xe0, 0xaf,
+0xc6, 0x2b, 0x69, 0xa9, 0x4c, 0x1a, 0x9a, 0x36, 0xa6, 0xd2, 0x71, 0xed,
+0x69, 0x1b, 0x8b, 0x47, 0xc0, 0x67, 0x89, 0x9e, 0xec, 0xb6, 0xc5, 0x0f,
+0xa8, 0xcb, 0x34, 0xf2, 0xdc, 0xe6, 0x49, 0x25, 0x32, 0x4d, 0x06, 0xdf,
+0x48, 0x2c, 0xe0, 0xb3, 0xbe, 0x1b, 0xd2, 0x72, 0xed, 0xad, 0xaa, 0x71,
+0x2b, 0xc8, 0x2b, 0x95, 0x98, 0xed, 0x6c, 0x89, 0xd0, 0xce, 0xed, 0x25,
+0x73, 0x68, 0x87, 0xb1, 0x6d, 0x89, 0x37, 0xb2, 0xda, 0xa5, 0xc9, 0x66,
+0x49, 0xc9, 0x58, 0xd2, 0x36, 0xee, 0x2a, 0x23, 0xe0, 0xc9, 0x4a, 0x99,
+0xd6, 0x24, 0xbc, 0x63, 0xcb, 0x15, 0x3b, 0x85, 0xbe, 0xca, 0x64, 0xcb,
+0x3f, 0x62, 0x4f, 0xb4, 0x9d, 0x66, 0xc7, 0xd2, 0x1e, 0xec, 0x1d, 0xe9,
+0xd2, 0x73, 0xed, 0x6d, 0xa3, 0xa4, 0x86, 0xa3, 0x35, 0x45, 0xcd, 0x68,
+0xf0, 0xa9, 0xc9, 0x21, 0x8e, 0xea, 0x21, 0xd7, 0xa9, 0x46, 0x23, 0xb2,
+0x26, 0xa6, 0x8b, 0x09, 0x56, 0x53, 0xee, 0x87, 0x6d, 0xd2, 0x6f, 0xf5,
+0xa5, 0x62, 0x8c, 0xc3, 0xa3, 0x1e, 0xa5, 0x09, 0xb9, 0xb6, 0xa4, 0x54,
+0xad, 0x26, 0xbf, 0x10, 0xde, 0xe9, 0x49, 0x0b, 0x76, 0x40, 0xdf, 0xd5,
+0xa8, 0xdc, 0x29, 0xd5, 0xa8, 0xad, 0xd2, 0x71, 0xec, 0xe9, 0x9a, 0x6b,
+0x04, 0x85, 0x5c, 0xa3, 0x09, 0x2b, 0xd8, 0xc5, 0x9e, 0xe1, 0x8f, 0x1a,
+0xb1, 0xb8, 0xc5, 0x37, 0x2d, 0x4a, 0x5f, 0x00, 0xc3, 0xa8, 0x5e, 0x89,
+0x9b, 0x62, 0x35, 0xd2, 0x72, 0xed, 0x71, 0xab, 0x6a, 0x88, 0x7c, 0x12,
+0x7f, 0x86, 0x67, 0x8b, 0x29, 0xd4, 0x4d, 0xed, 0x85, 0x3c, 0xb4, 0xe8,
+0x89, 0xab, 0x86, 0x59, 0x5a, 0xb8, 0xc4, 0xbb, 0x72, 0x32, 0xcf, 0x43,
+0xd2, 0x35, 0xf6, 0x2e, 0x1b, 0xdc, 0xaa, 0xc9, 0x21, 0xb2, 0x44, 0xbc,
+0x61, 0xe9, 0x03, 0x3c, 0x4c, 0x7d, 0x03, 0x66, 0xaa, 0xbd, 0xda, 0x4f,
+0xd4, 0x5d, 0x66, 0xa7, 0xf0, 0x8e, 0xf0, 0x89, 0xf9, 0xd2, 0x73, 0xed,
+0xad, 0xe2, 0xea, 0xa5, 0x17, 0xf3, 0x0a, 0xda, 0xe0, 0xd4, 0xc8, 0xde,
+0xd1, 0x97, 0xc2, 0x1b, 0xb7, 0xab, 0x64, 0x2c, 0x96, 0x26, 0xad, 0x6b,
+0x46, 0x96, 0x77, 0xa8, 0x8f, 0x1b, 0xd2, 0x71, 0xe5, 0xa5, 0x59, 0xd4,
+0xe6, 0x8d, 0x6a, 0x8a, 0xa7, 0x93, 0x92, 0xa5, 0xd6, 0xa5, 0x71, 0x3d,
+0x18, 0xe2, 0xc7, 0xcc, 0x89, 0xd7, 0x20, 0x2b, 0x69, 0x88, 0x7a, 0x5a,
+0x9e, 0x98, 0xb4, 0xd2, 0x6f, 0xed, 0x25, 0xa2, 0x6a, 0xa9, 0x8a, 0xad,
+0x6a, 0x38, 0xdb, 0xba, 0xc5, 0xbe, 0xd8, 0xee, 0xa8, 0xac, 0xc2, 0xe5,
+0x4d, 0x51, 0x6b, 0xe2, 0x80, 0x89, 0xa8, 0x6b, 0x98, 0x8f, 0x68, 0x23,
+0xd2, 0x71, 0xed, 0x71, 0xab, 0x6f, 0xa9, 0xd6, 0x2d, 0x91, 0x9a, 0x6c,
+0x52, 0xc9, 0x22, 0xe7, 0xa5, 0xad, 0xe1, 0x8c, 0xc6, 0x81, 0x6d, 0xc4,
+0xaf, 0x6a, 0xde, 0xc4, 0x9b, 0xeb, 0x2b, 0x6c, 0xc8, 0xd2, 0x71, 0xe7,
+0x6e, 0x23, 0xe3, 0x08, 0xdb, 0x51, 0x12, 0x68, 0x04, 0x6b, 0x4a, 0x6a,
+0x1a, 0xbd, 0xb6, 0xad, 0x68, 0xc8, 0xa6, 0x27, 0xcd, 0x89, 0x7a, 0x8c,
+0x88, 0xd0, 0xdf, 0x90, 0xb7, 0xb3, 0xd2, 0x6f, 0xde, 0xe9, 0xeb, 0xdc,
+0xc6, 0x3b, 0x63, 0x0b, 0x4a, 0xc8, 0xda, 0xa8, 0xc9, 0x60, 0x8f, 0x56,
+0x2b, 0x6f, 0x07, 0x6a, 0x56, 0x7d, 0x8b, 0x64, 0xaf, 0x28, 0x2e, 0xc5,
+0xb3, 0x20, 0xec, 0xd2, 0x72, 0xd5, 0xe9, 0x1a, 0xda, 0x86, 0xf4, 0xa4,
+0x55, 0x38, 0xe4, 0xe4, 0xc4, 0xbd, 0xa0, 0x67, 0xcc, 0x01, 0xc1, 0xa9,
+0x6f, 0x19, 0x77, 0xc2, 0x27, 0x51, 0xac, 0x46, 0x1d, 0xb9, 0x07, 0x74,
+0xd2, 0x71, 0xe5, 0x69, 0x22, 0x6c, 0xa8, 0x24, 0xee, 0x86, 0x1e, 0xe1,
+0x5c, 0xc8, 0x09, 0x71, 0x82, 0x5b, 0x1a, 0xda, 0x66, 0x2b, 0x6a, 0x4a,
+0xe8, 0xc2, 0xc1, 0x08, 0xd9, 0x51, 0x52, 0xe6, 0x86, 0xd2, 0x72, 0xed,
+0xad, 0xe3, 0x6b, 0xc9, 0x76, 0x5c, 0x7a, 0x46, 0xac, 0x69, 0x49, 0xb6,
+0x1d, 0xd1, 0x97, 0x72, 0x93, 0x06, 0x71, 0x7b, 0x51, 0x66, 0xfc, 0xdc,
+0xc4, 0x2b, 0xa3, 0x2a, 0xcf, 0x43, 0xd2, 0x74, 0xee, 0x6e, 0x1c, 0xdc,
+0xc9, 0xcb, 0x28, 0x6f, 0x68, 0x0b, 0x6f, 0xca, 0xea, 0x51, 0xd6, 0x06,
+0xbd, 0x6b, 0x49, 0x96, 0x27, 0xa9, 0xa9, 0x62, 0x6a, 0xc9, 0x09, 0x74,
+0x66, 0x4b, 0x5a, 0xd2, 0x74, 0xe5, 0xf1, 0xa3, 0x94, 0xe4, 0xf8, 0x94,
+0x6d, 0xbb, 0xc9, 0xe2, 0xca, 0x4a, 0xd9, 0x76, 0xd6, 0x1d, 0x69, 0xaa,
+0x5e, 0xd2, 0x9b, 0x34, 0x2d, 0x67, 0x09, 0xe8, 0x44, 0xd9, 0xa1, 0x2e
+};
+
+/********************************************************************************************/
+
+unsigned char EFR_AnnFile[] = {
+0xc2, 0xe1, 0x35, 0x32, 0x4b, 0x4d, 0x2e, 0xf4, 0x6f, 0xed, 0x7e, 0x9d,
+0x01, 0x35, 0x59, 0x80, 0xcd, 0xb9, 0x81, 0xc2, 0x36, 0xc7, 0x6c, 0x5a,
+0x40, 0x0e, 0x75, 0xcc, 0x22, 0xa9, 0x8d, 0xe1, 0x60, 0xc2, 0xc0, 0xf0,
+0xe3, 0x95, 0x40, 0x1c, 0x75, 0xef, 0x49, 0x56, 0xe2, 0x01, 0xb5, 0x59,
+0x50, 0x19, 0x1b, 0x97, 0x07, 0xd9, 0x68, 0xeb, 0xc3, 0xb1, 0xef, 0x8a,
+0x7b, 0x0f, 0xe9, 0x2f, 0x73, 0xf0, 0xc2, 0xe0, 0xf0, 0x52, 0x9c, 0x00,
+0x16, 0xab, 0x5d, 0xe2, 0x50, 0xa4, 0x07, 0x4e, 0xbe, 0x30, 0x1b, 0xc9,
+0x19, 0x4a, 0xe4, 0xc6, 0x42, 0xe7, 0xd2, 0x52, 0x1a, 0xfc, 0x3b, 0x43,
+0x8c, 0x8f, 0xa0, 0xc2, 0xc0, 0xe6, 0x23, 0xa4, 0x00, 0x1e, 0x35, 0xb4,
+0x01, 0x83, 0xe0, 0x06, 0xab, 0xf6, 0xe5, 0x51, 0x6a, 0x00, 0x2a, 0x77,
+0x99, 0xa1, 0xd7, 0x57, 0xc0, 0xba, 0x37, 0xb0, 0x3d, 0x2e, 0x14, 0x70,
+0xc2, 0xe1, 0x39, 0x71, 0xe8, 0x0c, 0xa3, 0x0b, 0xa1, 0xa2, 0x8e, 0xde,
+0xdf, 0xc2, 0x6d, 0xed, 0x50, 0x19, 0x80, 0x30, 0x21, 0x74, 0x9a, 0x9c,
+0xc4, 0x1a, 0xec, 0x19, 0x60, 0xcf, 0xb3, 0x66, 0xf0, 0xc2, 0xc0, 0xfb,
+0xe3, 0x05, 0x4c, 0x44, 0xf5, 0xe5, 0x04, 0x84, 0xa3, 0x11, 0x7f, 0xdd,
+0x1d, 0xa2, 0x37, 0x00, 0x3c, 0x5a, 0x58, 0x00, 0x68, 0xc4, 0x1c, 0xe5,
+0x7f, 0xff, 0xff, 0x54, 0x4b, 0xe0, 0xc2, 0xe0, 0xeb, 0xa3, 0x74, 0x00,
+0x17, 0x2f, 0xe9, 0x23, 0x9f, 0x62, 0x02, 0x5c, 0x00, 0xa5, 0xcd, 0x39,
+0x14, 0xc5, 0x58, 0x2b, 0x6a, 0xf1, 0xbb, 0x7f, 0xaa, 0xd6, 0x2b, 0xca,
+0xef, 0x6b, 0xd0, 0xc2, 0xc0, 0xee, 0x33, 0x28, 0x00, 0x1e, 0x8f, 0x67,
+0x96, 0x6d, 0xec, 0x06, 0xd1, 0x74, 0x30, 0x67, 0x69, 0x99, 0x4b, 0x43,
+0x1c, 0x65, 0x6e, 0x31, 0x21, 0x65, 0xad, 0xe0, 0xf0, 0x70, 0x1c, 0x90,
+0xc2, 0xe0, 0xe6, 0x24, 0xe4, 0x00, 0x11, 0x00, 0x16, 0x0b, 0x6a, 0x5e,
+0x07, 0xea, 0xae, 0xf8, 0x53, 0xaa, 0x80, 0xec, 0x12, 0xe0, 0xe5, 0x34,
+0xcc, 0x13, 0x77, 0xf1, 0x85, 0x92, 0xaf, 0x9e, 0x10, 0xc2, 0xc1, 0x39,
+0x73, 0x6b, 0x4d, 0xe1, 0x00, 0xbb, 0xea, 0xb6, 0xe4, 0x97, 0xe2, 0x4b,
+0x09, 0x5d, 0xf8, 0x00, 0x2e, 0xdd, 0xa3, 0x26, 0xfd, 0xb0, 0x07, 0x4e,
+0xc6, 0x35, 0x88, 0x91, 0xce, 0x40, 0xc2, 0xe0, 0xfb, 0x21, 0xe4, 0x0c,
+0xa8, 0x8f, 0x82, 0x8d, 0x35, 0xab, 0x19, 0x47, 0xa5, 0x87, 0x17, 0x36,
+0x80, 0x3e, 0xb2, 0x28, 0x17, 0xa3, 0x38, 0x1e, 0x5e, 0xa2, 0xca, 0x76,
+0x52, 0x59, 0x80, 0xc2, 0xc0, 0xeb, 0x29, 0xd4, 0x00, 0x19, 0x31, 0xcc,
+0x68, 0x9d, 0x66, 0x01, 0xbb, 0xf8, 0xef, 0x41, 0x59, 0x13, 0x8a, 0x46,
+0x9c, 0x3d, 0x25, 0xbb, 0xcf, 0x88, 0x0b, 0xd5, 0xb4, 0xce, 0x7e, 0x00,
+0xc2, 0xe0, 0xec, 0xe4, 0x45, 0x40, 0x1e, 0xaf, 0x9e, 0xcf, 0x8f, 0xa4,
+0x07, 0xbc, 0x8e, 0x69, 0x56, 0x6a, 0x19, 0x8d, 0xab, 0x88, 0x7e, 0x03,
+0xc2, 0xf1, 0x85, 0x7a, 0x0f, 0x5d, 0x6f, 0x23, 0xf0, 0xc2, 0xc0, 0xea,
+0x42, 0xc5, 0x40, 0x1f, 0x10, 0x35, 0x68, 0xe6, 0x20, 0x07, 0xb3, 0x86,
+0x43, 0xcf, 0x78, 0x80, 0x1d, 0x27, 0x3b, 0x7f, 0x27, 0xc8, 0x01, 0x77,
+0xfd, 0xd7, 0xc1, 0x30, 0x7f, 0xb0, 0xc2, 0xe1, 0x38, 0xd3, 0xfb, 0x4c,
+0xe2, 0xcb, 0xfb, 0xe3, 0x50, 0xdc, 0xb7, 0xd6, 0xa5, 0x8f, 0xd1, 0x78,
+0x00, 0x3d, 0x9d, 0x07, 0x0c, 0xdf, 0x44, 0x06, 0x9a, 0xd1, 0xa6, 0x16,
+0x71, 0x65, 0x10, 0xc2, 0xc0, 0xfb, 0xe2, 0x6c, 0x0c, 0x65, 0x0f, 0x24,
+0x29, 0x0f, 0x1c, 0x28, 0xaf, 0xd0, 0x18, 0xb8, 0x27, 0x80, 0x3c, 0x5f,
+0xde, 0xc4, 0xf4, 0x38, 0x0b, 0xa7, 0x5c, 0x4f, 0xe7, 0x93, 0x0d, 0xa0,
+0xc2, 0xe0, 0xeb, 0x24, 0x76, 0x40, 0x1a, 0x14, 0x7b, 0x3f, 0xdd, 0x62,
+0x11, 0xd3, 0xd8, 0x88, 0x59, 0x38, 0x0a, 0x86, 0x16, 0xc3, 0x7d, 0xed,
+0xb4, 0x0f, 0x8b, 0x01, 0x90, 0x0b, 0x93, 0x7e, 0x60, 0xc2, 0xc0, 0xfa,
+0xe3, 0x0c, 0x00, 0x1f, 0x2e, 0x1a, 0x6a, 0x1f, 0x62, 0x07, 0xa4, 0x8e,
+0x22, 0xca, 0x49, 0x98, 0xca, 0x5c, 0x3b, 0x5a, 0xc5, 0xc5, 0xc1, 0x55,
+0xa0, 0x30, 0xf3, 0x49, 0x26, 0xa0, 0xc2, 0xe0, 0xe4, 0xc2, 0xfc, 0x40,
+0x14, 0xf0, 0xd7, 0xab, 0xb0, 0x20, 0x07, 0xb2, 0xbe, 0xe6, 0xdb, 0x7a,
+0x80, 0x2a, 0x7c, 0x46, 0x52, 0x52, 0x48, 0x02, 0x77, 0xfd, 0x16, 0x41,
+0x10, 0x41, 0xa0, 0xc2, 0xc0, 0xe6, 0x24, 0x98, 0x0e, 0x00, 0x76, 0xa6,
+0x03, 0xe3, 0x9a, 0xb7, 0xdd, 0x68, 0xb7, 0x23, 0x27, 0x00, 0x21, 0x94,
+0xb0, 0xd0, 0xf5, 0xc4, 0x06, 0x7a, 0x5d, 0xce, 0xc4, 0xb1, 0x0f, 0x90,
+0xc2, 0xe1, 0x39, 0x73, 0x03, 0x0d, 0x2e, 0xf7, 0xc2, 0xd5, 0x64, 0x22,
+0xe1, 0x78, 0xac, 0x8a, 0x27, 0x68, 0x80, 0x3d, 0x6a, 0x04, 0x18, 0xbb,
+0xc0, 0x3a, 0xba, 0xc7, 0x69, 0xdf, 0x8f, 0x2a, 0xe0, 0xc2, 0xc0, 0xef,
+0xb3, 0xda, 0x00, 0x0e, 0x8b, 0x91, 0xc1, 0x3a, 0xe6, 0x02, 0xc3, 0xd0,
+0x10, 0xe0, 0x98, 0x16, 0x4b, 0xe0, 0x28, 0xd2, 0x12, 0x3a, 0x6f, 0x6d,
+0xb4, 0x18, 0xd3, 0xef, 0xc0, 0xb0, 0xc2, 0xd8, 0x04, 0xc2, 0x8b, 0x40,
+0x16, 0xce, 0xfa, 0x61, 0xb6, 0x24, 0x07, 0x47, 0x64, 0x34, 0xc6, 0xe8,
+0x99, 0x61, 0x9e, 0x86, 0x23, 0x0f, 0x3a, 0x24, 0xbf, 0x4e, 0x82, 0x49,
+0xec, 0x95, 0xf0, 0xc2, 0xe1, 0xb9, 0x71, 0xe7, 0x00, 0x05, 0x2c, 0xd4,
+0x15, 0x4a, 0x62, 0x07, 0xcb, 0x4e, 0x98, 0x70, 0x29, 0x00, 0x2c, 0xab,
+0x37, 0x7e, 0x05, 0xc8, 0x04, 0x17, 0xc3, 0x81, 0xc4, 0x6f, 0x26, 0x90,
+0xc2, 0xd8, 0x06, 0x23, 0x7b, 0x4b, 0x83, 0x0a, 0x1a, 0x68, 0x50, 0xdf,
+0x17, 0xc2, 0x4d, 0x5d, 0x54, 0x98, 0x00, 0x3f, 0x9b, 0x1c, 0xc6, 0x43,
+0xb8, 0x06, 0x4a, 0x8d, 0x3b, 0xa1, 0x32, 0xc3, 0x30, 0xc2, 0xe1, 0xb4,
+0xd2, 0x6c, 0x4c, 0x8b, 0x06, 0x1b, 0x0f, 0xd2, 0x6b, 0x40, 0xc7, 0x80,
+0x4f, 0xb4, 0xe3, 0x80, 0x3c, 0xea, 0xb6, 0x41, 0x20, 0xd0, 0x1f, 0x65,
+0xd3, 0xb9, 0xc3, 0x71, 0x9a, 0xb0, 0xc2, 0xd8, 0x19, 0x73, 0x7b, 0x40,
+0x19, 0x1c, 0x2c, 0x66, 0x35, 0xe0, 0x04, 0xc3, 0x85, 0x75, 0x18, 0x29,
+0x17, 0xca, 0x23, 0x90, 0x3f, 0x0d, 0xa5, 0x9f, 0xdf, 0xfb, 0xa9, 0x21,
+0x10, 0x36, 0x20, 0xc2, 0xe1, 0xab, 0xa1, 0xf4, 0xc0, 0x1f, 0x2a, 0x1a,
+0x6a, 0x7b, 0x6a, 0x04, 0xb5, 0x0e, 0xe9, 0x95, 0x38, 0x9a, 0x0a, 0x5f,
+0x86, 0x02, 0x0f, 0x2f, 0xc8, 0x85, 0xba, 0x0e, 0x1b, 0x73, 0x45, 0x70,
+0xc2, 0xc0, 0xf1, 0x54, 0x2b, 0x40, 0x3d, 0x46, 0x10, 0xc3, 0xe0, 0xde,
+0x0e, 0x36, 0x9e, 0xc5, 0x1e, 0x86, 0x80, 0x1a, 0x53, 0x37, 0xbf, 0x25,
+0xd4, 0x02, 0x80, 0xaf, 0x27, 0xc1, 0x10, 0xbf, 0xa0, 0xc2, 0xe1, 0x2e,
+0xb7, 0xdc, 0x40, 0x15, 0xca, 0x08, 0xbc, 0x94, 0x5e, 0x07, 0xd6, 0x0b,
+0xcb, 0xfa, 0x87, 0x81, 0x11, 0x87, 0x9c, 0xf0, 0x96, 0xc0, 0x05, 0x2a,
+0x5c, 0x31, 0x95, 0x50, 0x86, 0x20, 0xc2, 0xc1, 0x34, 0xd3, 0x7b, 0x4c,
+0x88, 0xcf, 0x41, 0x03, 0x00, 0x29, 0x28, 0x2a, 0xd9, 0xe0, 0xa1, 0x86,
+0x00, 0x3d, 0xa2, 0xda, 0x55, 0xe0, 0x3c, 0x0d, 0xdb, 0x5d, 0x36, 0x3d,
+0x0e, 0x99, 0x60, 0xc2, 0xe0, 0xeb, 0xc4, 0x44, 0x40, 0x1a, 0xea, 0xdc,
+0x35, 0x5a, 0xec, 0x01, 0xc2, 0x80, 0x45, 0x5c, 0x09, 0x19, 0x86, 0x25,
+0x40, 0x17, 0x6d, 0xb6, 0x2f, 0xaf, 0xbc, 0x46, 0x46, 0xee, 0x1f, 0x90,
+0xc2, 0xc1, 0xc4, 0xe2, 0xe4, 0x00, 0x14, 0xd0, 0xaf, 0xec, 0x4a, 0x9e,
+0x07, 0x24, 0x88, 0xf1, 0x57, 0xca, 0x19, 0x16, 0xde, 0x85, 0x7e, 0x84,
+0xc0, 0x81, 0x95, 0x50, 0x06, 0xf3, 0x6a, 0xa7, 0xb0, 0xc2, 0xe0, 0xee,
+0xb4, 0x7b, 0x40, 0x1e, 0xd4, 0xcc, 0xc1, 0x37, 0x96, 0x07, 0xa3, 0x73,
+0xe1, 0xda, 0x8b, 0x80, 0x3b, 0x54, 0x4b, 0x02, 0x62, 0xc8, 0x04, 0x28,
+0x00, 0x80, 0x85, 0x10, 0x8a, 0x20, 0xc2, 0xc1, 0x2b, 0x23, 0x03, 0x09,
+0xc4, 0xdd, 0x4e, 0x60, 0x04, 0x9b, 0x97, 0x9d, 0x35, 0x80, 0xb1, 0x97,
+0x80, 0x67, 0x55, 0x5f, 0xf0, 0xd5, 0x40, 0x0a, 0x45, 0x5d, 0x30, 0xa5,
+0x90, 0xc4, 0x20, 0xc2, 0xe0, 0xf9, 0x73, 0x0b, 0x4c, 0xaa, 0x76, 0x10,
+0x43, 0x7f, 0x65, 0x02, 0x0a, 0xaf, 0xe9, 0x2d, 0xb6, 0x00, 0x1a, 0x87,
+0x6a, 0x56, 0xd5, 0xb8, 0x1e, 0x6f, 0x77, 0x10, 0x27, 0xcf, 0xc6, 0x20,
+0xc2, 0xc0, 0xfa, 0x73, 0x02, 0xc0, 0x16, 0x8f, 0x91, 0xd0, 0x91, 0x6a,
+0x01, 0xda, 0x38, 0x8a, 0x7d, 0xa7, 0x19, 0x01, 0x63, 0xb3, 0x81, 0x00,
+0x31, 0x6f, 0x6f, 0xd1, 0xd0, 0x4f, 0xd0, 0x90, 0xe0, 0xc2, 0xe0, 0xe5,
+0x03, 0xdb, 0x40, 0x28, 0xcc, 0xf8, 0x40, 0x61, 0x20, 0x05, 0xca, 0xae,
+0x66, 0x6a, 0xe8, 0x19, 0xca, 0x6c, 0x06, 0xc6, 0x7c, 0xbe, 0xe1, 0x85,
+0xe6, 0xfe, 0x07, 0xb0, 0x8f, 0x30, 0xc2, 0xc0, 0xf9, 0x72, 0xc5, 0x40,
+0x19, 0x51, 0xed, 0x2d, 0xfe, 0x20, 0x07, 0x95, 0x2d, 0xf6, 0xfe, 0xb8,
+0x80, 0x21, 0xdb, 0x3b, 0x4a, 0x2e, 0xc0, 0x02, 0x6b, 0xb1, 0x1f, 0x83,
+0x8d, 0xef, 0x20, 0xc2, 0xe1, 0x2c, 0xb2, 0x4b, 0x40, 0x07, 0x8b, 0x52,
+0xd6, 0x8f, 0x26, 0x07, 0xfe, 0xc5, 0x39, 0xdc, 0x17, 0x80, 0x1d, 0xa3,
+0x1f, 0xeb, 0x7f, 0xc4, 0x37, 0x75, 0x1d, 0x9c, 0x4a, 0xb3, 0x7e, 0xd0,
+0xc2, 0xc0, 0xfc, 0xa2, 0x97, 0x0c, 0xa7, 0x76, 0xe2, 0x5f, 0x2f, 0x58,
+0xa9, 0x0c, 0x01, 0xf5, 0x67, 0xb6, 0x80, 0x32, 0x28, 0x2a, 0xd5, 0xd4,
+0x40, 0x08, 0x5f, 0xe7, 0x53, 0xaf, 0xad, 0xd5, 0x70, 0xc2, 0xe0, 0xec,
+0xb2, 0x85, 0x40, 0x17, 0x16, 0xba, 0xc7, 0x75, 0xa6, 0x03, 0x35, 0x9d,
+0x0d, 0xde, 0x28, 0x08, 0xc7, 0xca, 0x86, 0x4a, 0x50, 0xac, 0x2f, 0x46,
+0x41, 0xe0, 0x97, 0x8e, 0x22, 0x20, 0xc2, 0xc0, 0xf0, 0xb4, 0x05, 0x40,
+0x1e, 0xd4, 0xa6, 0x45, 0x7e, 0x62, 0x04, 0xbd, 0x2f, 0x69, 0x54, 0xd9,
+0x19, 0x4c, 0x2d, 0xe8, 0x76, 0xc5, 0x39, 0xd2, 0xf2, 0x53, 0x0f, 0x50,
+0x0c, 0xc5, 0x80, 0xc2, 0xe1, 0x3a, 0x71, 0xe4, 0x40, 0x1f, 0x0c, 0x15,
+0x6b, 0x65, 0x5e, 0x07, 0xb7, 0xbe, 0x1a, 0x1a, 0x49, 0x80, 0x32, 0x52,
+0x86, 0x43, 0x87, 0xcc, 0x61, 0xf7, 0x7a, 0x28, 0xb3, 0x4f, 0x16, 0x20,
+0xc2, 0xc0, 0xe9, 0x6a, 0x2b, 0x44, 0x85, 0xea, 0xbb, 0xd0, 0xfe, 0x1c,
+0x07, 0xb7, 0x3b, 0x14, 0x94, 0x35, 0x80, 0xb3, 0x11, 0xdf, 0xf2, 0xdf,
+0xd4, 0x04, 0x80, 0xa3, 0xf2, 0x08, 0xce, 0x47, 0x40, 0xc2, 0xe1, 0x39,
+0x71, 0xe5, 0x4d, 0x27, 0xee, 0xe2, 0x41, 0x6c, 0x1d, 0x28, 0x32, 0xd6,
+0x80, 0x39, 0x88, 0x80, 0x3c, 0xe0, 0x52, 0x5a, 0x2d, 0xb0, 0x0f, 0x9f,
+0x7d, 0x60, 0x66, 0xaf, 0xae, 0x90, 0xc2, 0xc0, 0xfa, 0xe9, 0xd5, 0x40,
+0x15, 0x12, 0x27, 0xa5, 0x55, 0xa6, 0x02, 0x35, 0xd9, 0x8e, 0xd7, 0x98,
+0x13, 0x86, 0xd5, 0x7b, 0x58, 0x4c, 0x2f, 0x4f, 0xfd, 0x40, 0xb7, 0x39,
+0x0d, 0xe5, 0x60, 0xc2, 0xe0, 0xf0, 0x25, 0x34, 0x40, 0x1e, 0xb2, 0xf9,
+0xf6, 0xfa, 0x24, 0x05, 0xa4, 0xd0, 0xf5, 0xb1, 0x7b, 0x1a, 0x8b, 0xc1,
+0xf9, 0xbf, 0x06, 0xb7, 0x40, 0x84, 0x6e, 0xef, 0x76, 0x0e, 0x77, 0x80,
+0xc2, 0xc0, 0xf3, 0x9f, 0x9c, 0x00, 0x0e, 0xb3, 0x4d, 0x9e, 0x89, 0x9a,
+0x07, 0xea, 0xf3, 0x9e, 0x76, 0xd9, 0x00, 0x19, 0xe4, 0x6a, 0xcd, 0x2f,
+0xc4, 0x02, 0x67, 0xb1, 0x19, 0x24, 0xec, 0xfe, 0x10, 0xc2, 0xe0, 0xeb,
+0xc4, 0x46, 0x09, 0x03, 0x0e, 0xbd, 0xfd, 0xa0, 0xe1, 0xdf, 0xee, 0xda,
+0x09, 0x7f, 0xe7, 0x00, 0x3f, 0x75, 0x75, 0x06, 0xe7, 0x38, 0x07, 0x79,
+0x17, 0xf5, 0x6d, 0x75, 0x8c, 0xf0, 0xc2, 0xc1, 0x29, 0x63, 0x7c, 0x0c,
+0xc6, 0xce, 0x74, 0x2d, 0xfd, 0x9c, 0x12, 0x14, 0x2f, 0x52, 0xe8, 0x07,
+0x00, 0x3e, 0xeb, 0x04, 0xb1, 0xeb, 0x2c, 0x0d, 0x56, 0x7c, 0x43, 0x25,
+0xb1, 0x19, 0x30, 0xc2, 0xe0, 0xf0, 0x83, 0x73, 0x40, 0x3a, 0x89, 0x9d,
+0x24, 0x92, 0x34, 0x01, 0xdf, 0x30, 0x8e, 0x1c, 0xa5, 0x9b, 0x00, 0xbd,
+0xec, 0x05, 0x59, 0xb5, 0xbf, 0xcd, 0x17, 0x6d, 0xe5, 0x50, 0x92, 0xa0,
+0xc2, 0xc0, 0xe3, 0x43, 0xab, 0x40, 0x3f, 0x09, 0x8e, 0x6b, 0x80, 0xa4,
+0x02, 0x41, 0x76, 0x7a, 0x25, 0xeb, 0x18, 0x0d, 0x95, 0xeb, 0xa1, 0xe6,
+0xae, 0x81, 0x88, 0x0e, 0xf2, 0x68, 0x0c, 0x9f, 0xc0, 0xc2, 0xe0, 0xfa,
+0x74, 0x44, 0x80, 0x09, 0x01, 0xad, 0x60, 0x64, 0x20, 0x07, 0xdb, 0x3e,
+0x1a, 0x58, 0x39, 0x80, 0x5d, 0x28, 0xa3, 0x51, 0x59, 0xc8, 0x73, 0x6e,
+0x77, 0x16, 0xd5, 0x4f, 0x53, 0xa0, 0xc2, 0xc1, 0x31, 0x5f, 0x8b, 0x4d,
+0x01, 0x0a, 0x9c, 0x62, 0x31, 0x9a, 0xc7, 0x8e, 0xa3, 0x68, 0x29, 0x28,
+0x00, 0x2d, 0xfd, 0xd3, 0x17, 0x9d, 0xcc, 0x05, 0x42, 0xde, 0xb0, 0x4b,
+0xf2, 0x16, 0xf0, 0xc2, 0xe1, 0x39, 0x72, 0x44, 0x8c, 0x49, 0x7e, 0xe2,
+0x3e, 0x1b, 0x60, 0x91, 0x7b, 0x3d, 0x02, 0x6b, 0x37, 0x00, 0x22, 0xab,
+0x5a, 0xc8, 0xb0, 0x30, 0x0f, 0x69, 0x1d, 0x35, 0xb8, 0xb1, 0x68, 0x50,
+0xc2, 0xc0, 0xeb, 0xc9, 0xdb, 0x40, 0x14, 0x83, 0x47, 0x05, 0x6c, 0xe4,
+0x01, 0x82, 0xd3, 0x8c, 0x77, 0x29, 0x13, 0x86, 0x15, 0xe8, 0xdc, 0x45,
+0x2f, 0x6f, 0x6d, 0x4b, 0xd0, 0x42, 0x30, 0x24, 0x90, 0xc4, 0x17, 0x8c,
+0x64, 0x12, 0xfe, 0x24, 0x63, 0xf3, 0x2c, 0x04, 0x73, 0xb8, 0xe3, 0x31,
+0x0a, 0x9c, 0x71, 0x0f, 0x0a, 0x22, 0xb6, 0x4f, 0xa8, 0x1f, 0x02, 0x95,
+0x13, 0x94, 0x79, 0x08, 0x78, 0xe0, 0xc7, 0x31, 0x42, 0xfa, 0x2b, 0x4b,
+0x62, 0x6d, 0x3d, 0x95, 0xfb, 0x99, 0x20, 0x88, 0x41, 0x37, 0xaf, 0xf4,
+0x9b, 0x98, 0x3a, 0xc6, 0x4e, 0x31, 0x1c, 0xe1, 0x6f, 0x1b, 0x9e, 0x18,
+0x8b, 0xe9, 0x40, 0xc4, 0x07, 0x13, 0x48, 0xd4, 0x49, 0x44, 0x9a, 0x22,
+0x6c, 0x0e, 0x0f, 0xa0, 0xb0, 0x19, 0x20, 0x3b, 0x74, 0xf9, 0x0c, 0xfe,
+0x3b, 0x96, 0xd8, 0x28, 0xe4, 0x28, 0x7d, 0x0d, 0xd2, 0x88, 0x40, 0x80,
+0xc2, 0x60, 0x28, 0xa2, 0x32, 0x4a, 0xc1, 0xe5, 0xdf, 0xf4, 0xf6, 0xfe,
+0x71, 0x8f, 0xf6, 0x70, 0xec, 0xd6, 0xf7, 0x34, 0x00, 0x2a, 0x2b, 0x83,
+0x3a, 0x87, 0xb0, 0xb6, 0x47, 0x11, 0x71, 0xf1, 0x30, 0xc3, 0x64, 0x4c,
+0xf3, 0xe4, 0xb2, 0xa5, 0xf5, 0x5c, 0xec, 0xb0, 0xa6, 0xa2, 0x2a, 0xe8,
+0x31, 0x1a, 0xd7, 0x7b, 0x84, 0x63, 0x7c, 0x47, 0xc1, 0xb9, 0xa3, 0x66,
+0x3e, 0x44, 0x0f, 0xf2, 0xd2, 0x70, 0xc2, 0x60, 0x67, 0xa2, 0x3b, 0xfb,
+0xeb, 0xf3, 0xad, 0x8c, 0x27, 0xe9, 0x8d, 0xa7, 0x40, 0x2d, 0x0c, 0x97,
+0xcb, 0x54, 0x3e, 0xee, 0x28, 0xc0, 0x49, 0x13, 0xa0, 0xf2, 0x5f, 0xe3,
+0x30, 0xe1, 0xb0, 0xc2, 0xe4, 0x66, 0xa3, 0x74, 0x39, 0x05, 0xc8, 0x8a,
+0xdb, 0x1b, 0x9c, 0xeb, 0xb9, 0x47, 0x45, 0xdd, 0x68, 0xfc, 0x39, 0xb0,
+0x5c, 0x4c, 0xa1, 0xc7, 0xc2, 0x06, 0xa6, 0x8e, 0x5a, 0xb0, 0x2b, 0xd0,
+0xc6, 0xb1, 0x53, 0x49, 0xd4, 0xa5, 0xfa, 0x3d, 0xba, 0x71, 0x94, 0x94,
+0x18, 0x8b, 0xb2, 0xeb, 0xa0, 0x24, 0x76, 0x0b, 0xbe, 0x0d, 0xde, 0xfe,
+0xb3, 0x02, 0x86, 0xd5, 0xc8, 0xdb, 0xa8, 0x2e, 0xf0, 0xc6, 0xa7, 0x25,
+0x54, 0x57, 0xbf, 0x2c, 0xe8, 0x09, 0x95, 0x94, 0xdb, 0x51, 0x60, 0x6c,
+0xca, 0x98, 0x04, 0xab, 0x48, 0x57, 0x20, 0xfa, 0xb3, 0x20, 0xb4, 0xb1,
+0x46, 0xe3, 0xf8, 0xed, 0x29, 0xd0, 0xc6, 0x90, 0x31, 0x4a, 0x2c, 0xc8,
+0xa2, 0xef, 0x48, 0xcc, 0x32, 0xd8, 0xd8, 0xf2, 0x3c, 0xd3, 0xcd, 0x44,
+0x37, 0x8a, 0xf1, 0x47, 0x6d, 0x31, 0xaf, 0x86, 0x8a, 0x38, 0xdb, 0x4e,
+0x4b, 0x3b, 0xc0, 0xc3, 0x6f, 0x63, 0xf3, 0x65, 0x3a, 0x0e, 0x04, 0x8a,
+0xf8, 0xe5, 0x17, 0x08, 0xc1, 0x32, 0x13, 0xca, 0xd4, 0x8b, 0x0d, 0xed,
+0x2e, 0xea, 0x4c, 0x2b, 0x32, 0x42, 0xa9, 0x47, 0x5a, 0x4a, 0xe5, 0xc0,
+0xc6, 0xb0, 0xb2, 0xa9, 0x4c, 0x3e, 0xc3, 0x7c, 0x65, 0x3d, 0x8b, 0x56,
+0xfa, 0x70, 0xfa, 0xcb, 0x78, 0x05, 0x81, 0x0a, 0x1c, 0x58, 0xab, 0xe4,
+0xa4, 0x20, 0xdf, 0xea, 0x76, 0x4d, 0x4b, 0x3f, 0xe0, 0xc3, 0xa7, 0xa3,
+0x73, 0xa4, 0x9c, 0xd4, 0x60, 0xc9, 0xd4, 0x90, 0xd9, 0x91, 0x36, 0xfb,
+0xbd, 0x99, 0x84, 0xfd, 0x06, 0xd1, 0xd5, 0x15, 0x5e, 0xaa, 0x62, 0x68,
+0x6a, 0xa6, 0x92, 0xcb, 0x97, 0x00, 0xc4, 0x70, 0x33, 0x6a, 0x2d, 0x04,
+0x20, 0xad, 0xc1, 0xb8, 0x55, 0x95, 0xd0, 0xfa, 0x15, 0x36, 0x9f, 0x04,
+0xca, 0x49, 0xd9, 0x39, 0x8c, 0xcc, 0xb2, 0x07, 0x6b, 0xb7, 0x63, 0x93,
+0x4c, 0x27, 0x20, 0xc7, 0x27, 0xa3, 0xf4, 0x64, 0x7d, 0xaa, 0xd6, 0xca,
+0x13, 0x1b, 0xd4, 0xe1, 0x3e, 0xdb, 0x11, 0x7e, 0x34, 0x36, 0x53, 0x3c,
+0x9c, 0x99, 0x78, 0x2f, 0x92, 0x75, 0xae, 0x00, 0x23, 0x69, 0x78, 0x30,
+0xc4, 0x90, 0xb1, 0x0f, 0x92, 0x46, 0x28, 0x05, 0xd9, 0x5d, 0xbd, 0x5b,
+0xb9, 0x71, 0x66, 0x8f, 0x94, 0x85, 0x25, 0x90, 0x3c, 0x5f, 0x95, 0x8a,
+0x2a, 0x81, 0xa4, 0x0f, 0x1c, 0x18, 0x48, 0x90, 0x40, 0xc6, 0xa7, 0x93,
+0x64, 0x28, 0x24, 0xe4, 0x03, 0x2e, 0xee, 0x84, 0xd8, 0x76, 0x54, 0x20,
+0x80, 0x25, 0xb5, 0x0f, 0x09, 0xed, 0x0a, 0x4a, 0x12, 0x2a, 0x71, 0x05,
+0x44, 0x2b, 0xde, 0x6c, 0xe1, 0xd0, 0xc6, 0xb2, 0x23, 0x79, 0xd2, 0x66,
+0x63, 0xd6, 0x4d, 0x9c, 0x44, 0x16, 0xe1, 0x46, 0xa8, 0x25, 0x67, 0x03,
+0xf6, 0x07, 0x9f, 0x34, 0xbc, 0x4e, 0x31, 0xe2, 0xf7, 0x26, 0x1d, 0x79,
+0x49, 0x24, 0xe0, 0xc6, 0xa8, 0x73, 0x82, 0xf6, 0xd3, 0x35, 0x27, 0xf7,
+0xd3, 0xad, 0x52, 0x58, 0xa2, 0x08, 0xd9, 0x49, 0x25, 0x8e, 0x42, 0x5c,
+0xd0, 0x6f, 0x40, 0x26, 0xc3, 0xc7, 0xb0, 0xac, 0x63, 0x6c, 0x30, 0xb0,
+0xc5, 0x12, 0x70, 0xc9, 0x94, 0x21, 0xe4, 0x56, 0xd4, 0x54, 0xc9, 0x13,
+0x99, 0x68, 0x3b, 0x6f, 0xd1, 0x95, 0xb5, 0x0e, 0xcb, 0x92, 0x31, 0xab,
+0xae, 0x53, 0x0f, 0xb7, 0xdd, 0x50, 0x49, 0xda, 0x80, 0xc7, 0x87, 0xf3,
+0x43, 0xc8, 0x83, 0xe2, 0x06, 0xe0, 0x0c, 0xc6, 0xd9, 0x59, 0xc1, 0x8e,
+0x2d, 0xc4, 0xf5, 0x8d, 0x8b, 0x85, 0xe4, 0x98, 0x9a, 0xad, 0xf0, 0xf0,
+0x4c, 0x90, 0xdf, 0x8b, 0xe2, 0xe0, 0xc3, 0x50, 0xc3, 0x38, 0xf2, 0x84,
+0x04, 0x11, 0x26, 0x58, 0x49, 0x51, 0x88, 0x80, 0xe5, 0x56, 0x4b, 0x35,
+0xa4, 0x89, 0xe5, 0x6c, 0x2d, 0x86, 0xb2, 0x02, 0x28, 0xce, 0xa6, 0xc8,
+0x29, 0x77, 0xd0, 0xc7, 0x8f, 0x44, 0x13, 0xc8, 0xe7, 0xc9, 0x33, 0x82,
+0x71, 0xb2, 0x92, 0xca, 0x03, 0x8d, 0x06, 0x03, 0xc5, 0x7a, 0xcd, 0x9c,
+0x9a, 0xfd, 0x83, 0xb1, 0x93, 0x4a, 0x35, 0xcd, 0x8f, 0x4a, 0xb2, 0x60,
+0xc4, 0x30, 0x32, 0xa4, 0x52, 0x93, 0x83, 0xbc, 0x15, 0x3f, 0x30, 0x95,
+0xda, 0x09, 0xc3, 0xbb, 0xd7, 0x25, 0x22, 0xc9, 0x64, 0xef, 0x98, 0x45,
+0xaa, 0x92, 0x36, 0x78, 0x99, 0x51, 0xaa, 0x26, 0xb0, 0xc7, 0xb0, 0x4f,
+0xe3, 0xcb, 0x73, 0x89, 0x6e, 0x4a, 0xb9, 0xc1, 0x97, 0x12, 0x55, 0xe4,
+0x63, 0xb9, 0x05, 0xaf, 0x4e, 0xd2, 0x8c, 0x11, 0x1a, 0x26, 0x13, 0x06,
+0xca, 0xf8, 0x7f, 0x8a, 0x10, 0xe0, 0xc4, 0x0f, 0xc7, 0x3a, 0x34, 0x89,
+0xee, 0x2a, 0x18, 0x99, 0x5b, 0x18, 0x39, 0x0b, 0xba, 0x1c, 0xc8, 0x55,
+0xf3, 0xc9, 0xda, 0xe7, 0x02, 0x10, 0x20, 0xf3, 0x0a, 0xd5, 0xf7, 0x33,
+0x4d, 0x41, 0x20, 0xc7, 0x88, 0x90, 0xc3, 0x64, 0x05, 0xe1, 0x05, 0x58,
+0x8e, 0x10, 0x94, 0xf9, 0xde, 0x6d, 0x35, 0x22, 0xf3, 0x8e, 0x91, 0xf2,
+0x91, 0x33, 0x98, 0xb0, 0x31, 0xf0, 0x0f, 0xf7, 0xf3, 0x0a, 0xd3, 0xa0,
+0xc6, 0xf0, 0xb5, 0x69, 0xe5, 0x5a, 0xa7, 0xbe, 0xc5, 0x04, 0x43, 0x99,
+0xa0, 0xec, 0x78, 0xba, 0x5e, 0x84, 0xa5, 0x96, 0x26, 0x97, 0x28, 0x7f,
+0x2a, 0x52, 0x6f, 0x98, 0x48, 0xb9, 0xac, 0xac, 0x70, 0xc7, 0x87, 0xf0,
+0xc3, 0x55, 0xb1, 0xc6, 0xcb, 0x4f, 0x01, 0xb9, 0x57, 0x89, 0x8c, 0x32,
+0xe4, 0x0f, 0xa5, 0x1d, 0x86, 0x2a, 0xe2, 0x1b, 0xdf, 0x2e, 0xf2, 0x29,
+0x54, 0xde, 0xcb, 0x69, 0xb5, 0xf0, 0xc3, 0x4f, 0x82, 0xd3, 0x82, 0xd7,
+0x0a, 0xea, 0x48, 0xc7, 0x8e, 0x58, 0x68, 0xc2, 0x1c, 0xbf, 0xf3, 0xa5,
+0x27, 0xce, 0x9b, 0x98, 0xba, 0x46, 0xa8, 0xd3, 0x55, 0x0c, 0xb4, 0x98,
+0x28, 0xa6, 0x50, 0xc7, 0x91, 0x03, 0xf3, 0x83, 0x08, 0x20, 0xd9, 0xe9,
+0x0d, 0x92, 0x18, 0xe0, 0x80, 0x19, 0x3d, 0x66, 0xe6, 0x4e, 0x8a, 0x11,
+0x52, 0x4f, 0x75, 0x29, 0x03, 0x17, 0x55, 0x8a, 0x3b, 0x6b, 0xbd, 0x70,
+0xc4, 0x6f, 0xd2, 0xa9, 0x97, 0x60, 0x43, 0x08, 0xe8, 0x0b, 0xe7, 0x10,
+0x81, 0xdc, 0x2f, 0xde, 0x38, 0xa5, 0x7d, 0x0b, 0xa9, 0x82, 0x69, 0xcb,
+0xaa, 0x01, 0x06, 0x8a, 0xbf, 0xf6, 0xa8, 0xb3, 0x90, 0xc7, 0x90, 0xb2,
+0xa3, 0x6c, 0xff, 0x04, 0xfd, 0x34, 0x62, 0xdf, 0x5e, 0x22, 0x70, 0x9d,
+0x90, 0xf4, 0x34, 0x09, 0x44, 0x2f, 0x23, 0x96, 0xb9, 0x2a, 0xd1, 0xbc,
+0x93, 0xeb, 0xb8, 0x49, 0x49, 0x40, 0xc4, 0x67, 0x64, 0x93, 0x71, 0x91,
+0x89, 0x1c, 0x19, 0x52, 0x20, 0x18, 0x71, 0x20, 0x47, 0x85, 0x92, 0x95,
+0xde, 0x44, 0x1c, 0x7a, 0x6b, 0xb2, 0x26, 0xa1, 0x6b, 0xf7, 0x65, 0xc3,
+0xaa, 0xf8, 0xb0, 0xc6, 0x91, 0x73, 0x63, 0xcb, 0x6d, 0x24, 0x48, 0x76,
+0x75, 0x9b, 0x9b, 0x01, 0x20, 0xf4, 0x81, 0xfb, 0xc4, 0xa0, 0x91, 0xc3,
+0xc5, 0xc7, 0x28, 0xa6, 0x11, 0x75, 0xa8, 0xf4, 0xde, 0x4a, 0x9a, 0xc0,
+0xc3, 0xb0, 0x54, 0x08, 0xf2, 0xe6, 0x85, 0xa0, 0x4b, 0x47, 0xe1, 0x14,
+0x19, 0x46, 0xc2, 0x02, 0x64, 0x14, 0xf7, 0xd3, 0xb7, 0x56, 0x98, 0x3c,
+0x38, 0xf1, 0xb7, 0xd6, 0x42, 0xd8, 0x08, 0x6d, 0xc0, 0xc6, 0xaf, 0x52,
+0x23, 0x08, 0x18, 0xc5, 0x98, 0x5a, 0x4a, 0xee, 0x16, 0x99, 0x6f, 0xd8,
+0xf1, 0x59, 0x95, 0x1a, 0xcb, 0x3d, 0x18, 0xcc, 0x2e, 0xa6, 0x64, 0xda,
+0xcb, 0x17, 0x31, 0xaa, 0xef, 0x30, 0xc7, 0x31, 0x04, 0x3a, 0x54, 0x07,
+0x64, 0x81, 0x44, 0x01, 0x93, 0x15, 0x50, 0x04, 0x34, 0x2c, 0xc7, 0x26,
+0xfb, 0xd2, 0x62, 0x77, 0xb7, 0x09, 0x22, 0xa3, 0x06, 0xda, 0xf4, 0x8b,
+0xc8, 0x10, 0x60, 0xc4, 0x6f, 0x63, 0x98, 0xc2, 0xff, 0x43, 0xb9, 0xf0,
+0x4b, 0xa1, 0xd7, 0x13, 0x1a, 0x44, 0x9b, 0x36, 0x46, 0x0f, 0x99, 0xb9,
+0x38, 0x1f, 0x22, 0xad, 0xd2, 0xac, 0x36, 0xb0, 0x89, 0x0a, 0x3a, 0x60,
+0xc7, 0x29, 0x67, 0x5f, 0x95, 0x68, 0x89, 0x30, 0x32, 0x8b, 0xe7, 0x96,
+0xa3, 0x9a, 0x0b, 0x07, 0x5d, 0x14, 0x12, 0x07, 0xd7, 0x5b, 0xc7, 0x75,
+0xaa, 0x81, 0x58, 0x99, 0x62, 0xc0, 0x2a, 0x5f, 0x90, 0xc6, 0x53, 0x23,
+0x58, 0xb3, 0x7e, 0x87, 0x43, 0x10, 0x9c, 0x5b, 0x58, 0xfb, 0x1b, 0xa0,
+0x4e, 0x4d, 0x05, 0x7b, 0xc7, 0x6d, 0x7e, 0xc7, 0xcb, 0xaa, 0x08, 0x02,
+0x2d, 0xd6, 0xd8, 0x2a, 0x13, 0xd0, 0xcf, 0x9a, 0x53, 0xe3, 0xca, 0x32,
+0x65, 0x0b, 0x6c, 0xfa, 0x10, 0x55, 0x11, 0x43, 0x0a, 0x39, 0x43, 0xe6,
+0x26, 0x8d, 0x49, 0xbd, 0x53, 0x30, 0x2a, 0x82, 0xe0, 0x52, 0x82, 0x23,
+0x89, 0x99, 0x20, 0xc4, 0x66, 0xe2, 0xf3, 0x73, 0x89, 0x42, 0x4e, 0x25,
+0x7c, 0xf2, 0x95, 0x79, 0x00, 0xad, 0xbb, 0x8d, 0x65, 0xfd, 0x8d, 0x56,
+0x32, 0xfb, 0xe8, 0x2a, 0xe2, 0x52, 0x58, 0x50, 0xcb, 0x49, 0x38, 0xe0,
+0xc4, 0x1a, 0x51, 0x09, 0xdb, 0xaa, 0xe4, 0x16, 0xf2, 0x29, 0xa1, 0x59,
+0x72, 0x3d, 0xa0, 0x13, 0xab, 0x64, 0x76, 0x89, 0xd2, 0x4e, 0x75, 0x5f,
+0xb1, 0xc4, 0x03, 0xaf, 0x38, 0x46, 0xca, 0x16, 0x80, 0xc7, 0x8f, 0x02,
+0xda, 0x32, 0xfd, 0xa2, 0x8a, 0x79, 0x9c, 0x84, 0x10, 0xfa, 0x4f, 0xa6,
+0x23, 0x6d, 0x15, 0x93, 0x52, 0x99, 0xd7, 0x02, 0x29, 0xad, 0x11, 0xdf,
+0x2a, 0xa6, 0x5d, 0x09, 0x4b, 0xe0, 0xc3, 0xa9, 0x10, 0xc4, 0x57, 0xbb,
+0xc4, 0x7a, 0x7f, 0xf8, 0xea, 0x15, 0x0a, 0x05, 0xd1, 0x17, 0xf7, 0xe5,
+0x10, 0xc0, 0x52, 0x29, 0xb8, 0x41, 0xb3, 0x33, 0x24, 0x3b, 0x51, 0x4a,
+0x4a, 0xa2, 0xc0, 0xc7, 0xb0, 0x14, 0x23, 0xc4, 0xb9, 0x25, 0x4f, 0x53,
+0x24, 0xc5, 0x93, 0x79, 0x68, 0x3b, 0x66, 0x61, 0x35, 0xbf, 0x8d, 0x83,
+0xe2, 0xa5, 0x37, 0xad, 0x03, 0x22, 0xef, 0xf7, 0xba, 0xaa, 0x5f, 0x50,
+0xc3, 0x68, 0x72, 0xa9, 0x45, 0x4d, 0xab, 0xbd, 0xec, 0x6b, 0x3e, 0x17,
+0x89, 0x14, 0xf7, 0x9f, 0x3c, 0xa5, 0x61, 0x4b, 0x4f, 0x89, 0x00, 0x9a,
+0x33, 0x22, 0x99, 0x42, 0x4f, 0xde, 0x2a, 0x81, 0xd0, 0xc6, 0x53, 0x23,
+0x9a, 0x32, 0x47, 0x82, 0x46, 0xec, 0x9e, 0x66, 0x53, 0x39, 0xbd, 0x5b,
+0x2c, 0x7b, 0xd4, 0xd3, 0xc4, 0xfd, 0x2e, 0x60, 0x7d, 0x2f, 0x42, 0x86,
+0x9a, 0xfe, 0x05, 0x8c, 0xcd, 0x20, 0xcf, 0x90, 0x4f, 0x63, 0xa8, 0x02,
+0x43, 0x2c, 0x96, 0x5e, 0xe9, 0x14, 0x19, 0x35, 0x63, 0xc9, 0xc7, 0x74,
+0x8e, 0x43, 0xb8, 0x35, 0x00, 0x0d, 0x2a, 0x42, 0x0a, 0x13, 0xa1, 0x3a,
+0x2c, 0x44, 0x50, 0xc6, 0x0f, 0xd2, 0xe3, 0xa4, 0xbe, 0x04, 0x21, 0x54,
+0xc9, 0xcf, 0xd2, 0x72, 0x53, 0x59, 0x05, 0x89, 0xd5, 0x1d, 0x08, 0x33,
+0x10, 0x1f, 0x25, 0xac, 0xd1, 0x1e, 0x67, 0xee, 0x65, 0x6a, 0xff, 0xb0,
+0xc3, 0x50, 0x22, 0x33, 0xa7, 0x2a, 0x87, 0x15, 0x87, 0xd2, 0x15, 0x97,
+0x1a, 0xb8, 0xc5, 0x00, 0x76, 0x44, 0x08, 0x48, 0x89, 0x72, 0xac, 0xc1,
+0xac, 0xf2, 0xaf, 0xbc, 0xa8, 0x78, 0x6a, 0x22, 0xd0, 0xc6, 0xa7, 0xe4,
+0xd9, 0xd4, 0x0d, 0x0e, 0x02, 0xb5, 0x27, 0xf8, 0xd7, 0x99, 0x23, 0xd5,
+0x59, 0x4d, 0xc4, 0x8b, 0x87, 0x23, 0x0e, 0xc7, 0x75, 0x28, 0x81, 0x21,
+0x47, 0xcb, 0xb9, 0xeb, 0x9d, 0x70, 0xc3, 0x90, 0x33, 0x08, 0x54, 0x87,
+0xc7, 0x13, 0x90, 0x59, 0x14, 0x97, 0x21, 0x08, 0xd7, 0x57, 0x66, 0x04,
+0x27, 0x91, 0x01, 0xb7, 0x61, 0xe5, 0x29, 0xb2, 0x9e, 0x31, 0xf0, 0xd0,
+0xad, 0x1c, 0x90, 0xc6, 0xa9, 0x64, 0x9f, 0x8b, 0xc7, 0xc0, 0xc7, 0xfa,
+0xed, 0x0b, 0x92, 0xa1, 0xa9, 0xe7, 0xd7, 0xd5, 0x04, 0xa6, 0x59, 0x59,
+0x47, 0xe0, 0x24, 0x28, 0xf4, 0x63, 0x82, 0x5c, 0x88, 0xec, 0x0c, 0x50,
+0xc4, 0x07, 0x62, 0xd8, 0xe4, 0x69, 0x85, 0xf1, 0x26, 0xf9, 0x50, 0x17,
+0x29, 0x84, 0x06, 0xce, 0x9f, 0x25, 0xfa, 0xd1, 0x9b, 0xcd, 0x97, 0x01,
+0xa9, 0x51, 0x82, 0x34, 0x89, 0xe1, 0x69, 0x12, 0xb0, 0xc6, 0x4f, 0x73,
+0x09, 0x75, 0x52, 0xab, 0x04, 0x9f, 0xe4, 0xec, 0xd3, 0x1b, 0x97, 0x1d,
+0xe1, 0x6a, 0xd6, 0x8e, 0x48, 0xd0, 0x0e, 0x23, 0xd2, 0xa3, 0x93, 0x9c,
+0xc6, 0x2f, 0x71, 0xcb, 0xd3, 0xa0, 0xc4, 0x10, 0xe3, 0xf2, 0xf5, 0x63,
+0xaa, 0x68, 0xec, 0xfb, 0x31, 0x95, 0xa1, 0xc8, 0xf5, 0x13, 0x94, 0xb5,
+0xf8, 0x97, 0x61, 0x0d, 0x95, 0x1d, 0x22, 0x22, 0x58, 0x9b, 0x21, 0x7a,
+0xeb, 0xd4, 0xd0, 0xc6, 0xaf, 0x93, 0x89, 0xe2, 0xf3, 0x68, 0xd7, 0xda,
+0xb5, 0xc1, 0xd6, 0xa0, 0xed, 0xa8, 0x31, 0xd2, 0x34, 0xf4, 0xc8, 0x3d,
+0xc6, 0x3f, 0x61, 0x35, 0xd2, 0x29, 0x4e, 0x26, 0x0b, 0x08, 0x79, 0x60,
+0xc6, 0x92, 0x23, 0xb3, 0x65, 0x60, 0x83, 0xca, 0xe1, 0x63, 0x34, 0x12,
+0xe1, 0x70, 0xeb, 0x24, 0x4e, 0xf5, 0x28, 0x8e, 0x80, 0x00, 0xe4, 0xd5,
+0x2f, 0xb2, 0x2f, 0x16, 0x52, 0x54, 0x29, 0xc5, 0x90, 0xc3, 0xe8, 0xd3,
+0x29, 0xf5, 0x8d, 0x44, 0xed, 0xc4, 0xcc, 0xc2, 0x55, 0x00, 0xea, 0x43,
+0xa0, 0x28, 0x35, 0x7c, 0x49, 0xfa, 0xf2, 0xf5, 0xe4, 0xad, 0xb4, 0x43,
+0x45, 0x70, 0xfb, 0x29, 0x5e, 0xf0, 0xc7, 0x90, 0x42, 0xd3, 0xc4, 0x4f,
+0xe6, 0x50, 0xb7, 0xb6, 0xac, 0x54, 0xf9, 0x36, 0x20, 0xf9, 0xad, 0x34,
+0xa7, 0x50, 0x06, 0x33, 0x1b, 0x54, 0xba, 0x42, 0x01, 0x86, 0xe0, 0xc9,
+0xe7, 0x76, 0xf0, 0xc4, 0x70, 0x50, 0x03, 0xe3, 0xff, 0x27, 0xe0, 0x52,
+0xc6, 0x7a, 0x55, 0x71, 0x07, 0x79, 0x29, 0xa7, 0x96, 0x76, 0x8a, 0x35,
+0xc8, 0xe7, 0xdc, 0x26, 0x02, 0x5e, 0xb4, 0xcb, 0x05, 0x4b, 0xd5, 0x20,
+0xc7, 0x30, 0x53, 0x89, 0x34, 0x06, 0x88, 0xaf, 0xc9, 0xcc, 0x80, 0x15,
+0x01, 0xa8, 0x11, 0x20, 0xae, 0x85, 0x3c, 0x48, 0xe1, 0x51, 0x3e, 0x75,
+0xa7, 0x32, 0x44, 0x29, 0xb0, 0xed, 0x4c, 0xae, 0xe0, 0xc6, 0xaf, 0x64,
+0x73, 0x24, 0x3f, 0x06, 0xd8, 0x9a, 0xa1, 0xf4, 0x17, 0x80, 0xea, 0x25,
+0xba, 0xf2, 0x94, 0xbd, 0x10, 0x06, 0x56, 0xe5, 0xec, 0x2b, 0x53, 0xb5,
+0x88, 0xf8, 0xe9, 0x4b, 0xdc, 0xe0, 0xc4, 0x11, 0x73, 0x09, 0x05, 0xbf,
+0x87, 0x7f, 0x89, 0xe5, 0xdb, 0x15, 0x68, 0x93, 0x47, 0x9e, 0x95, 0x14,
+0x35, 0x98, 0x15, 0xff, 0x2e, 0xc5, 0x30, 0xe1, 0xc5, 0x46, 0x02, 0xf5,
+0xa8, 0x65, 0xb0, 0xc7, 0xc7, 0xf2, 0x0f, 0x94, 0x3e, 0x26, 0x1b, 0x77,
+0x2e, 0x62, 0xd9, 0x99, 0xfb, 0x38, 0xcc, 0x80, 0x25, 0x7b, 0x0c, 0xc2,
+0x91, 0xac, 0xc3, 0xaf, 0x21, 0xab, 0x8b, 0x53, 0x3e, 0x89, 0x23, 0x40,
+0xcf, 0x8f, 0xc2, 0xd9, 0x47, 0xba, 0x42, 0x9c, 0x15, 0x65, 0xb8, 0x15,
+0x35, 0x39, 0xbd, 0xdd, 0xa0, 0x66, 0x91, 0xcd, 0xc1, 0x07, 0x6b, 0x31,
+0xa9, 0xf1, 0x8b, 0xe4, 0x50, 0x99, 0x6a, 0x3a, 0x70, 0xc7, 0x10, 0x50,
+0x03, 0x23, 0x1c, 0x87, 0xd7, 0xe6, 0x82, 0x93, 0x95, 0xaa, 0x6f, 0xd5,
+0xab, 0x45, 0xf5, 0xfa, 0x08, 0x24, 0x09, 0x3e, 0x8f, 0xa6, 0x31, 0x20,
+0x84, 0x63, 0xb1, 0xab, 0xe7, 0x30, 0xc3, 0x90, 0x42, 0x3a, 0x3b, 0x3e,
+0x68, 0xa5, 0xc0, 0xfc, 0x9f, 0x56, 0xe1, 0x52, 0x5b, 0x54, 0x21, 0x53,
+0xf7, 0x8d, 0xe5, 0xfa, 0x88, 0xe6, 0x37, 0x21, 0x43, 0x91, 0x4b, 0x60,
+0x4a, 0x6d, 0x80, 0xc7, 0x8f, 0x70, 0x09, 0xd4, 0x95, 0x44, 0x09, 0x99,
+0xc8, 0x3c, 0x50, 0xf9, 0x27, 0x00, 0xa9, 0x3d, 0x85, 0x9f, 0x18, 0xc3,
+0x31, 0x86, 0xa5, 0xa7, 0x62, 0x0f, 0xf1, 0x24, 0xe7, 0xcb, 0x8e, 0xa0,
+0xc4, 0x30, 0xf5, 0x63, 0xaa, 0x12, 0x63, 0x11, 0xa6, 0xc7, 0x5f, 0x55,
+0x29, 0x76, 0x15, 0xf7, 0x7a, 0xc5, 0x11, 0x10, 0xcb, 0xb4, 0xf0, 0x01,
+0xad, 0xb3, 0x1f, 0xf3, 0x85, 0xd6, 0x2a, 0x82, 0x90, 0xc3, 0xef, 0x84,
+0x93, 0x52, 0xc8, 0xe5, 0x25, 0xbf, 0x33, 0x6f, 0x57, 0x90, 0xb0, 0xb1,
+0x04, 0x40, 0x95, 0x2d, 0xd1, 0x3d, 0x47, 0x03, 0xc2, 0xa5, 0xd2, 0x67,
+0xe4, 0x41, 0x08, 0xe9, 0xd2, 0x50, 0xc7, 0x90, 0x13, 0x09, 0xe5, 0x68,
+0x06, 0x50, 0x60, 0x07, 0xfd, 0x55, 0x09, 0xb6, 0xa5, 0xbd, 0xd2, 0xa5,
+0x59, 0xcc, 0xd6, 0xb5, 0x4c, 0xa8, 0x32, 0x22, 0x2a, 0x66, 0x4d, 0x79,
+0x08, 0xa8, 0xe0, 0xc4, 0x09, 0x53, 0x43, 0xa2, 0xee, 0x87, 0x0c, 0xae,
+0x2a, 0x42, 0x1b, 0x92, 0x55, 0x12, 0xce, 0x64, 0xe4, 0x5d, 0x8c, 0x1d,
+0x29, 0x98, 0x36, 0x25, 0xf2, 0xe4, 0x1d, 0x57, 0x98, 0xcb, 0xad, 0x40,
+0xc7, 0x07, 0x62, 0xd8, 0xab, 0x5a, 0x8e, 0x11, 0xc8, 0x85, 0xca, 0xd0,
+0x49, 0x11, 0x0b, 0x3f, 0x1c, 0xd5, 0xf8, 0x91, 0xee, 0x16, 0x0d, 0xf2,
+0x2a, 0x13, 0x7a, 0x64, 0x7d, 0xba, 0x4a, 0xf8, 0x40, 0xc4, 0x70, 0xef,
+0xe3, 0xc3, 0x51, 0x91, 0x3b, 0xb4, 0xdc, 0x0d, 0x15, 0x21, 0x69, 0xb7,
+0x5a, 0x40, 0x15, 0xf3, 0xcb, 0xdd, 0x38, 0x24, 0x73, 0x2a, 0x22, 0x1b,
+0xeb, 0xfe, 0x6c, 0xab, 0x49, 0xd0, 0xc3, 0x87, 0x62, 0xd4, 0x0c, 0x13,
+0x22, 0xde, 0x27, 0x86, 0x91, 0x90, 0xf1, 0x9a, 0xfe, 0xe9, 0x8c, 0xf5,
+0x5a, 0xe2, 0xf8, 0x85, 0xc7, 0xc2, 0x31, 0xc4, 0x44, 0x52, 0x52, 0x96,
+0xe8, 0xd1, 0x10, 0xc6, 0xb0, 0x52, 0xaa, 0x24, 0x7e, 0xa5, 0xf1, 0xe6,
+0xe0, 0xcb, 0x58, 0xe2, 0x0d, 0x11, 0x9b, 0x77, 0x75, 0x62, 0x1f, 0x95,
+0x7b, 0x13, 0xf9, 0xa9, 0xf2, 0x1d, 0x55, 0x60, 0x46, 0x2a, 0x5a, 0x90,
+0xc6, 0x2f, 0xcf, 0xa2, 0xc7, 0x31, 0xc4, 0x9a, 0xa2, 0xc6, 0x25, 0x17,
+0x90, 0xb4, 0x25, 0xa5, 0x8e, 0x94, 0xf8, 0xd0, 0x4f, 0xfe, 0x3d, 0x63,
+0x31, 0x72, 0x59, 0xbe, 0x57, 0xaa, 0xc9, 0xf9, 0x40, 0xc3, 0x90, 0x52,
+0x2a, 0x84, 0xb9, 0x47, 0xb5, 0x90, 0x17, 0x97, 0xd5, 0x71, 0x73, 0x1b,
+0x7a, 0xa8, 0x16, 0x0b, 0x9b, 0xf3, 0x17, 0x8d, 0x07, 0xa6, 0x42, 0x9f,
+0x15, 0xe6, 0x53, 0x0d, 0x77, 0xa0, 0xc7, 0x2f, 0x73, 0x43, 0x2b, 0xe6,
+0x88, 0xc5, 0xbc, 0x4f, 0xf9, 0x10, 0xf9, 0x0f, 0x9e, 0x1a, 0x67, 0x26,
+0x78, 0x0b, 0x3f, 0x64, 0x56, 0x2b, 0x2a, 0xb1, 0x11, 0x96, 0xa4, 0xff,
+0x8a, 0x08, 0xe0, 0xc6, 0xef, 0x84, 0x58, 0xbc, 0xfc, 0xc3, 0x55, 0x5c,
+0xe6, 0x2e, 0xd4, 0xd3, 0xb3, 0xa8, 0x9c, 0x6c, 0xc4, 0x1f, 0xd3, 0xb1,
+0xc7, 0x99, 0x8e, 0x2a, 0xd2, 0x09, 0x9e, 0x1d, 0xe5, 0x0b, 0xb4, 0xa0,
+0xc7, 0x28, 0x73, 0x8f, 0x96, 0x56, 0x47, 0xbc, 0x3e, 0x23, 0x65, 0x96,
+0x79, 0x01, 0xe7, 0x9a, 0x2c, 0x45, 0x53, 0x8a, 0xc3, 0x45, 0x8a, 0x40,
+0x28, 0xd3, 0xdc, 0xc9, 0x26, 0xb7, 0xe9, 0x21, 0x30, 0xc4, 0x72, 0x63,
+0xb4, 0x54, 0x3a, 0x23, 0x96, 0xc3, 0xbf, 0x24, 0x18, 0xf9, 0xf4, 0x88,
+0x69, 0xb5, 0xc5, 0x5b, 0xcd, 0xb6, 0x02, 0xd1, 0xe8, 0x2e, 0x42, 0xfb,
+0xa9, 0x1b, 0x9f, 0xea, 0x99, 0x70, 0xc7, 0x28, 0x73, 0x89, 0x75, 0x6a,
+0x62, 0x4e, 0xfa, 0xd2, 0x8d, 0xd1, 0x1a, 0xb3, 0xc0, 0xc0, 0x59, 0x55,
+0xf5, 0xd7, 0x42, 0x03, 0x83, 0xb8, 0x2a, 0x35, 0xbb, 0xe6, 0x5f, 0x6b,
+0x8a, 0x59, 0xe0, 0xc5, 0x71, 0x04, 0x13, 0x04, 0x55, 0xe5, 0xd1, 0xc4,
+0xc2, 0x27, 0x53, 0x89, 0xe9, 0xf7, 0x0e, 0xd3, 0xc4, 0xa0, 0x60, 0x15,
+0x4d, 0x1c, 0x5f, 0x36, 0x02, 0x0e, 0xe2, 0x9e, 0x11, 0x49, 0xa5, 0x20,
+0xc6, 0x88, 0x53, 0x09, 0x3b, 0xe8, 0x46, 0x2f, 0x5c, 0x81, 0xe6, 0x55,
+0x92, 0x23, 0xdd, 0x86, 0x28, 0xd5, 0x3c, 0x0b, 0x8a, 0xd4, 0x00, 0x22,
+0x1d, 0x62, 0x73, 0x97, 0xb9, 0x7b, 0x4f, 0xc8, 0xe0, 0xc4, 0x70, 0xf0,
+0xcf, 0x83, 0x16, 0xe4, 0xa8, 0x0b, 0x3b, 0xf4, 0x10, 0xa4, 0xc5, 0x33,
+0x91, 0xa8, 0x54, 0xb5, 0x4e, 0x54, 0xc2, 0xdf, 0x4d, 0x2e, 0x21, 0x08,
+0xef, 0x28, 0x1a, 0x0c, 0x74, 0x40, 0xc4, 0x6f, 0x13, 0x48, 0xca, 0x3a,
+0x05, 0x60, 0x02, 0xba, 0x9d, 0x56, 0x71, 0x59, 0x0d, 0x96, 0x19, 0x73,
+0x94, 0x0a, 0xad, 0x53, 0x04, 0x37, 0x28, 0x82, 0x7a, 0x35, 0x7a, 0x20,
+0x8b, 0x4d, 0x00, 0xc7, 0x29, 0x1a, 0xd3, 0xc3, 0x46, 0xa8, 0xd0, 0xba,
+0x00, 0xfe, 0x58, 0xf9, 0x8d, 0x50, 0x70, 0xac, 0x94, 0xb6, 0x44, 0x41,
+0x6a, 0x3c, 0x66, 0xa2, 0xd2, 0x4f, 0xd4, 0xea, 0xcb, 0x4b, 0xef, 0xe0,
+0xc7, 0x12, 0xe7, 0xd8, 0xfc, 0x28, 0x0a, 0xe9, 0xcc, 0x25, 0x02, 0x19,
+0xa1, 0x80, 0x67, 0x3e, 0xda, 0x85, 0x1d, 0xcd, 0x29, 0x8d, 0x18, 0x59,
+0xa2, 0x23, 0xf5, 0x0d, 0xa0, 0xa8, 0xea, 0xa2, 0x50, 0xc7, 0x89, 0x64,
+0x93, 0x63, 0xba, 0xc7, 0xff, 0xe7, 0xea, 0x9c, 0xd9, 0x9a, 0x29, 0x89,
+0xcc, 0x98, 0x35, 0x0c, 0x0c, 0xbe, 0x7b, 0x42, 0x0a, 0x2a, 0x41, 0xcc,
+0xef, 0x35, 0x7a, 0xa8, 0x40, 0xd0, 0xc7, 0x10, 0x03, 0xf8, 0xf5, 0x7a,
+0x65, 0x19, 0xf2, 0xda, 0xe8, 0x52, 0x79, 0x27, 0xf0, 0x07, 0xa7, 0xa6,
+0x7c, 0x52, 0xdc, 0x87, 0x80, 0x79, 0x2d, 0x92, 0x93, 0x0f, 0x6a, 0x65,
+0x48, 0x89, 0xa0, 0xc7, 0x50, 0x43, 0x53, 0x53, 0x67, 0xe5, 0x6f, 0xf2,
+0xa7, 0x28, 0x53, 0x38, 0xfb, 0xbf, 0xee, 0x40, 0x05, 0x1b, 0x19, 0x78,
+0xc3, 0x73, 0xc5, 0x2c, 0xb2, 0x9e, 0x8e, 0x90, 0xba, 0xea, 0x14, 0x50,
+0xc7, 0x90, 0x63, 0xf9, 0xeb, 0x41, 0x01, 0xcc, 0x0d, 0x95, 0xba, 0x56,
+0x51, 0x71, 0xfa, 0x4a, 0xba, 0x34, 0x09, 0x81, 0x2b, 0x11, 0xce, 0x18,
+0xae, 0x74, 0xae, 0x1a, 0x7c, 0x23, 0xcb, 0x62, 0x20, 0xc3, 0xf0, 0x42,
+0xd4, 0x04, 0x95, 0xaf, 0x81, 0xf0, 0xc7, 0xd7, 0xd2, 0xa9, 0x6a, 0xd4,
+0x38, 0x61, 0xb6, 0x74, 0xc6, 0x54, 0x82, 0xf1, 0x3d, 0x23, 0x14, 0x5f,
+0xc0, 0x56, 0x46, 0x4c, 0xdd, 0x80, 0xc7, 0x8f, 0xc4, 0x73, 0x85, 0x63,
+0xe2, 0x36, 0x14, 0xc0, 0x92, 0x92, 0x61, 0x4a, 0x67, 0xfe, 0x61, 0xe5,
+0x1e, 0x05, 0xb0, 0x98, 0x79, 0x13, 0x2e, 0xb2, 0x4f, 0xcd, 0xfd, 0x0e,
+0x4b, 0xb0, 0x40, 0xc4, 0x8f, 0xd1, 0x43, 0x5c, 0xc0, 0x85, 0x3c, 0x24,
+0x89, 0x02, 0xd2, 0x70, 0xa0, 0xf5, 0xdb, 0x66, 0xf5, 0x66, 0x8d, 0x99,
+0xcc, 0x62, 0xb9, 0x2c, 0xe4, 0x82, 0x48, 0xab, 0x88, 0x0d, 0xc9, 0x40,
+0xc7, 0x27, 0xa4, 0x38, 0xf6, 0x59, 0xe5, 0x52, 0x2a, 0x18, 0x72, 0x92,
+0x19, 0x84, 0x8a, 0x32, 0xc0, 0xa4, 0xaa, 0x0d, 0xe1, 0x6e, 0xcb, 0xa4,
+0x2d, 0x61, 0x74, 0xfb, 0x76, 0x06, 0x4b, 0xbd, 0x00, 0xc6, 0xb0, 0xd0,
+0xc3, 0x0c, 0x3a, 0x2e, 0x73, 0x50, 0x6e, 0x45, 0x52, 0xd0, 0xd3, 0x59,
+0x89, 0xde, 0x34, 0xa8, 0x80, 0xe2, 0xb4, 0x4b, 0x15, 0x32, 0xd8, 0xce,
+0xe3, 0x06, 0x9a, 0x49, 0x75, 0x40, 0xc7, 0x2f, 0x73, 0x69, 0xf3, 0x5f,
+0x05, 0x50, 0xca, 0x7e, 0x1c, 0x93, 0xc0, 0xa8, 0x0d, 0x86, 0x77, 0xc6,
+0x76, 0xc4, 0x0b, 0xd5, 0x67, 0x65, 0xa6, 0x76, 0x1b, 0x6b, 0x91, 0xa5,
+0x09, 0x9e, 0x20, 0xc2, 0x20, 0x28, 0x86, 0xea, 0xcd, 0x81, 0xea, 0xf3,
+0x97, 0x5e, 0x1a, 0x45, 0x6b, 0x85, 0xcc, 0xec, 0xd5, 0x8a, 0x90, 0x1c,
+0xe1, 0x40, 0x11, 0x64, 0x00, 0x53, 0x84, 0x7d, 0x3a, 0xb9, 0xc0, 0x50,
+0xcf, 0x89, 0x2d, 0xa3, 0xc7, 0xc0, 0x1f, 0x08, 0xb7, 0xdd, 0xa0, 0x24,
+0x02, 0x84, 0x47, 0x1b, 0xd5, 0x99, 0x19, 0x78, 0x9a, 0xc4, 0x11, 0x43,
+0xe4, 0x32, 0x70, 0xce, 0x51, 0x4f, 0x13, 0xd2, 0xe0, 0xc2, 0x62, 0x49,
+0xc1, 0xb7, 0x80, 0x1f, 0xde, 0x82, 0x0b, 0x2f, 0xea, 0x02, 0x1c, 0x4d,
+0x76, 0x68, 0x9b, 0x99, 0x6b, 0x60, 0x6c, 0xc0, 0x44, 0xce, 0x4a, 0x26,
+0xba, 0x02, 0x1b, 0xb7, 0xc7, 0x70, 0xcf, 0x8b, 0x9b, 0x82, 0xc7, 0xce,
+0x40, 0xaa, 0x5c, 0x73, 0x5e, 0x23, 0x0f, 0xaa, 0x8d, 0x88, 0x83, 0xf8,
+0x80, 0x1c, 0xad, 0x6b, 0x45, 0xf8, 0xf4, 0x0a, 0xf1, 0xc0, 0x39, 0xcf,
+0x4f, 0xda, 0xe0, 0xc2, 0x61, 0x84, 0x22, 0x47, 0x8c, 0x87, 0x0f, 0xf2,
+0x23, 0x6b, 0x70, 0x02, 0x3d, 0x99, 0x46, 0x2e, 0xe8, 0x00, 0x3c, 0x94,
+0x5e, 0x80, 0x99, 0x48, 0x07, 0x2b, 0x6a, 0xb5, 0xfe, 0x3d, 0x80, 0xd0,
+0xcf, 0x83, 0x02, 0x62, 0x87, 0xcc, 0xca, 0x31, 0x96, 0x69, 0xe4, 0xe5,
+0x21, 0xbc, 0xe7, 0xb0, 0xcc, 0x98, 0x92, 0x02, 0x4b, 0xbd, 0x40, 0x77,
+0x43, 0xcf, 0x5f, 0x91, 0xfd, 0x70, 0x77, 0xcc, 0x90, 0xc2, 0x63, 0x22,
+0xe1, 0xf8, 0x00, 0x18, 0xde, 0x93, 0xd2, 0xb8, 0x70, 0x05, 0x49, 0x24,
+0x9c, 0x1f, 0xb9, 0x1a, 0x11, 0xab, 0x35, 0xfe, 0x64, 0xc8, 0x01, 0x7c,
+0x5f, 0xe0, 0xf5, 0x6e, 0xee, 0xb0, 0xcf, 0x81, 0x24, 0xc2, 0x8b, 0x40,
+0x3e, 0x85, 0xeb, 0x42, 0x5f, 0x28, 0x06, 0x42, 0x2a, 0xed, 0xb1, 0xbb,
+0x9a, 0x28, 0xfd, 0xeb, 0x8e, 0x60, 0xd6, 0x44, 0xd7, 0x57, 0x3c, 0x65,
+0x0e, 0xea, 0xa0, 0xc2, 0x61, 0xbb, 0x62, 0x6a, 0x0e, 0x42, 0x04, 0xbc,
+0x77, 0x9f, 0x5e, 0xef, 0xf7, 0xc3, 0xd7, 0x6f, 0xd9, 0x00, 0xbf, 0xdd,
+0x87, 0xba, 0xf7, 0x60, 0x0c, 0x65, 0xa0, 0xf2, 0xf7, 0x37, 0xed, 0xb0,
+0xc2, 0xe0, 0xf4, 0x52, 0x9b, 0x4c, 0xe4, 0xfc, 0xc7, 0x62, 0x72, 0x57,
+0xe0, 0xe1, 0x2f, 0xf1, 0x02, 0xa6, 0x80, 0x3d, 0xbd, 0x21, 0x37, 0xe9,
+0x50, 0x1f, 0x84, 0xc7, 0xeb, 0x4f, 0x53, 0x99, 0xe0, 0xc2, 0xc0, 0xfb,
+0x27, 0xd7, 0x0c, 0x6e, 0x5e, 0x8f, 0x78, 0x48, 0x20, 0xd9, 0xbe, 0xb2,
+0xa4, 0xf9, 0x68, 0x93, 0x23, 0x05, 0x6e, 0x97, 0x65, 0xb7, 0x9f, 0xd5,
+0xf7, 0x77, 0x6a, 0x6f, 0x1f, 0xd0, 0xc2, 0xf8, 0x0d, 0xb3, 0x0c, 0x00,
+0x1f, 0x0a, 0xa1, 0x56, 0xb9, 0x30, 0x07, 0xcf, 0x94, 0x48, 0x11, 0x18,
+0x18, 0xd5, 0xc6, 0x61, 0xa0, 0x86, 0xb1, 0x63, 0x15, 0x38, 0xb5, 0xb3,
+0xd0, 0x46, 0x20, 0xc2, 0xc0, 0xf3, 0x94, 0x77, 0x00, 0x1e, 0x7e, 0xc9,
+0x63, 0x44, 0xa8, 0x07, 0xb4, 0xad, 0xff, 0xa7, 0x09, 0x19, 0x2e, 0x7f,
+0x45, 0x80, 0xbe, 0xc1, 0xf4, 0x73, 0x8b, 0x5a, 0xf8, 0x2f, 0x0f, 0xd0,
+0xc2, 0xe0, 0xf9, 0x79, 0xcb, 0x7e, 0xa2, 0x4a, 0xf7, 0xee, 0xef, 0x5a,
+0xba, 0x7f, 0x03, 0x23, 0xa0, 0x1a, 0x80, 0x2f, 0x23, 0x9e, 0xb3, 0x3c,
+0xc8, 0x14, 0xcb, 0x47, 0xfd, 0xca, 0x32, 0x5e, 0xd0, 0xc2, 0xc0, 0xfb,
+0xc7, 0xd7, 0x0c, 0x06, 0xf8, 0xc8, 0xa9, 0x8f, 0xd2, 0x8d, 0x0b, 0xf0,
+0xf0, 0x8a, 0xb7, 0x80, 0x37, 0x7d, 0x91, 0xed, 0x72, 0xd0, 0x08, 0xc5,
+0x5a, 0x04, 0xe5, 0x2f, 0xfa, 0xb0, 0xc2, 0xe2, 0x2c, 0x18, 0xea, 0xc0,
+0x1f, 0x84, 0x8d, 0x80, 0xc5, 0xe8, 0x01, 0x3c, 0x6a, 0xb4, 0xb6, 0xdd,
+0x78, 0xf6, 0x17, 0x22, 0x7b, 0x0b, 0xa6, 0x19, 0x4a, 0x47, 0xde, 0x2e,
+0xf0, 0xf3, 0x50, 0xc2, 0xc0, 0x34, 0x53, 0x53, 0x0c, 0xae, 0xc3, 0xfd,
+0x77, 0xec, 0xa5, 0x09, 0x68, 0x43, 0x74, 0x6e, 0x6a, 0x93, 0x80, 0x46,
+0x72, 0x33, 0x98, 0xa3, 0xcf, 0xc8, 0x73, 0x40, 0x49, 0x8e, 0x12, 0xe0,
+0xc2, 0xf7, 0x8f, 0x23, 0x07, 0x00, 0x3f, 0x9e, 0x8f, 0x4f, 0xff, 0xec,
+0x07, 0xd3, 0x68, 0x54, 0xab, 0xfa, 0x19, 0x97, 0x7f, 0x55, 0x7f, 0x4a,
+0xca, 0x31, 0x0f, 0xc8, 0x77, 0xaa, 0x2a, 0xf3, 0x50, 0xc2, 0xc0, 0x74,
+0xf3, 0x5c, 0x00, 0x06, 0x04, 0xbd, 0x0a, 0x97, 0x9e, 0x07, 0xef, 0xaa,
+0x51, 0x6e, 0x4a, 0x00, 0x27, 0x87, 0xe7, 0x16, 0xad, 0xc4, 0x03, 0x3f,
+0x44, 0xe8, 0x88, 0x8c, 0x0e, 0x40, 0xc2, 0xf7, 0x9c, 0xe4, 0x46, 0x0b,
+0xa5, 0x9a, 0xac, 0x07, 0x91, 0xe6, 0xd7, 0xb9, 0x14, 0x77, 0x4f, 0xe8,
+0x00, 0x37, 0x3d, 0x92, 0x83, 0xc5, 0x44, 0x0a, 0x56, 0x6e, 0xed, 0xb6,
+0x33, 0x94, 0x10, 0xc2, 0xc0, 0xf5, 0x33, 0xab, 0x4c, 0x28, 0x9f, 0x6f,
+0xc1, 0x83, 0xe4, 0xe1, 0x76, 0x7b, 0xa9, 0xd8, 0x28, 0x00, 0x3c, 0x16,
+0x4c, 0xdb, 0x90, 0xc0, 0x0f, 0xfc, 0xd7, 0xfb, 0x62, 0x10, 0x33, 0x80,
+0xc2, 0xe0, 0xfa, 0x73, 0xd4, 0x00, 0x19, 0x88, 0x4e, 0xfa, 0x9e, 0xde,
+0x09, 0x44, 0xea, 0x87, 0xe9, 0x5b, 0x1b, 0x83, 0x34, 0xe2, 0x56, 0x6d,
+0xb9, 0xff, 0x02, 0x99, 0x5b, 0x4f, 0xcd, 0x4f, 0xe0, 0xc2, 0xd8, 0x0b,
+0xa3, 0x05, 0x40, 0x1f, 0x0c, 0xc9, 0x5c, 0x49, 0x26, 0x07, 0xea, 0xfc,
+0x89, 0x84, 0xfa, 0x18, 0xda, 0xbb, 0x60, 0x9c, 0x84, 0xb9, 0xe3, 0x1d,
+0x95, 0x82, 0x48, 0x52, 0xe7, 0xc0, 0xc2, 0xe0, 0xf4, 0xd4, 0x2b, 0x40,
+0x07, 0x64, 0x5c, 0xb2, 0x96, 0x1a, 0x07, 0x8f, 0xb7, 0x58, 0x70, 0xda,
+0x00, 0x2f, 0xdd, 0xbb, 0xa0, 0x4b, 0x40, 0x03, 0x3f, 0x94, 0xe8, 0xad,
+0x8c, 0xc0, 0x60, 0xc2, 0xc0, 0xe6, 0x24, 0x76, 0x0b, 0xc3, 0xc6, 0xd2,
+0xe7, 0x0d, 0xea, 0xa5, 0x67, 0x3c, 0x2d, 0x43, 0xd8, 0x80, 0x2f, 0xfe,
+0x92, 0xf6, 0xb7, 0x34, 0x07, 0x12, 0xd5, 0xe5, 0x23, 0xd0, 0xcc, 0x20,
+0xc2, 0xe1, 0x35, 0x33, 0xac, 0x0c, 0xa9, 0x13, 0xc8, 0x17, 0xa7, 0x62,
+0xb1, 0xf6, 0xc2, 0xcb, 0xd6, 0x8a, 0x00, 0x3c, 0x09, 0xe3, 0x93, 0xd0,
+0xc0, 0x0a, 0xe5, 0x6e, 0x0d, 0xb5, 0x0d, 0x92, 0x20, 0xc2, 0xc0, 0xeb,
+0x23, 0x72, 0xc0, 0x1d, 0xea, 0x16, 0xaa, 0xaa, 0x20, 0x02, 0x87, 0xfb,
+0xd7, 0x70, 0xda, 0x16, 0x0b, 0x06, 0x0a, 0x8e, 0x25, 0x4b, 0x1f, 0xf7,
+0x7f, 0xed, 0x8c, 0x71, 0xec, 0x50, 0xc2, 0xc0, 0xec, 0x83, 0xac, 0x00,
+0x1e, 0x5a, 0xc8, 0x43, 0xad, 0xda, 0x05, 0xf3, 0x32, 0x38, 0x0f, 0x6a,
+0x99, 0x45, 0xe4, 0x9e, 0x87, 0x40, 0x40, 0x01, 0xed, 0x39, 0x09, 0x83,
+0xf1, 0x10, 0x30, 0xc2, 0xe0, 0xf4, 0x52, 0x47, 0x00, 0x1e, 0xc8, 0xbd,
+0xbe, 0x97, 0x16, 0x0f, 0x94, 0xb3, 0xda, 0xf1, 0x3c, 0x00, 0x2a, 0x09,
+0xd4, 0x60, 0x6a, 0xb0, 0x24, 0x8f, 0x46, 0x5e, 0x0f, 0xd4, 0x4b, 0x60,
+0xc2, 0xc0, 0xf9, 0x73, 0x7b, 0x4b, 0x44, 0x4f, 0xeb, 0x22, 0xb6, 0xe0,
+0xa7, 0x86, 0x2f, 0x2b, 0x41, 0x18, 0x00, 0xeb, 0x70, 0x91, 0xcf, 0x9d,
+0x40, 0x08, 0xc5, 0xb9, 0x3b, 0x4f, 0xd1, 0x75, 0xe0, 0xc2, 0xe1, 0x35,
+0x37, 0xd4, 0x0d, 0x6a, 0xd3, 0xef, 0x5f, 0xff, 0xe8, 0xc0, 0xf0, 0xc1,
+0xbc, 0xc7, 0x37, 0x80, 0x39, 0xa2, 0x4d, 0xec, 0x91, 0x44, 0x0f, 0x2f,
+0x6e, 0xa1, 0x96, 0x14, 0x60, 0x00, 0xc2, 0xc0, 0xeb, 0xa9, 0x4b, 0x40,
+0x16, 0x26, 0xcb, 0xd0, 0xb6, 0xe2, 0x01, 0x9c, 0xfc, 0x3f, 0xe7, 0x17,
+0x0a, 0x83, 0xa1, 0x94, 0x25, 0xc7, 0xcc, 0x02, 0xe8, 0x5e, 0x45, 0xcf,
+0xae, 0x56, 0xf0, 0xc2, 0xe0, 0xe3, 0xe2, 0xc6, 0x80, 0x1e, 0xde, 0xcf,
+0x13, 0x9e, 0xa2, 0x06, 0x64, 0x43, 0x21, 0xee, 0xe8, 0x9a, 0x13, 0xff,
+0xb5, 0x77, 0xda, 0xc1, 0xe1, 0x7d, 0x36, 0xb8, 0xf3, 0xcf, 0x92, 0xa0,
+0xc2, 0xc0, 0xeb, 0x23, 0xd4, 0x00, 0x5e, 0xde, 0x61, 0x4d, 0x19, 0xa0,
+0x07, 0xe4, 0x7b, 0x39, 0xbe, 0x29, 0x80, 0x1f, 0x71, 0x14, 0x2f, 0xa9,
+0xd0, 0x04, 0x73, 0xf4, 0x9a, 0x4c, 0x90, 0x3b, 0xc0, 0xc2, 0xe1, 0x34,
+0xd3, 0xdb, 0x0c, 0x25, 0xb9, 0x2c, 0xac, 0x98, 0xe0, 0x9f, 0x74, 0x11,
+0x29, 0x82, 0xe7, 0x00, 0x3d, 0x33, 0xe9, 0xed, 0xbf, 0xd4, 0x07, 0x18,
+0xf5, 0x74, 0x76, 0x76, 0xbe, 0x90, 0xc2, 0xc0, 0xf4, 0xd3, 0x14, 0x0c,
+0xa8, 0x61, 0x65, 0x21, 0xfe, 0xa2, 0xe1, 0x0e, 0xe1, 0x57, 0xdf, 0x26,
+0x00, 0x3c, 0x08, 0xce, 0x42, 0x63, 0x3c, 0x0f, 0x78, 0x6a, 0x07, 0xed,
+0xf3, 0x09, 0xf0, 0xc2, 0xe0, 0xeb, 0xa4, 0x55, 0x80, 0x1e, 0x57, 0x4b,
+0x42, 0xfa, 0x26, 0x03, 0x7e, 0x95, 0xa4, 0x67, 0xd8, 0x17, 0xc0, 0x75,
+0x9e, 0x5b, 0x2f, 0x36, 0xef, 0x52, 0x7e, 0x28, 0x4b, 0x8d, 0xfc, 0xe0,
+0xc2, 0xd8, 0x0e, 0x3f, 0x8c, 0xc0, 0x1f, 0x53, 0xe7, 0x4d, 0xce, 0x2a,
+0x07, 0xea, 0xb2, 0xe0, 0xac, 0x89, 0x19, 0x19, 0xfe, 0x46, 0xab, 0x0a,
+0xbd, 0xe3, 0xc2, 0x96, 0x52, 0x14, 0x92, 0xb3, 0x00, 0xc2, 0xe0, 0xf4,
+0xd4, 0xbb, 0x40, 0x1e, 0xab, 0x32, 0x9c, 0x0d, 0xda, 0x07, 0xc3, 0x7d,
+0x06, 0x4f, 0xfb, 0x00, 0x20, 0xb3, 0xd6, 0xe5, 0xdb, 0x44, 0x04, 0xe0,
+0x24, 0xfb, 0x36, 0x2d, 0xd1, 0x10, 0xc2, 0xc0, 0xf9, 0x77, 0xd7, 0x0b,
+0x05, 0xd8, 0xd2, 0x15, 0x81, 0x26, 0xc7, 0xe6, 0x12, 0xab, 0x40, 0x77,
+0x80, 0x3d, 0xba, 0x90, 0x04, 0xab, 0xbc, 0x08, 0xfd, 0xb5, 0x4a, 0xad,
+0xf3, 0x4b, 0x70, 0xc2, 0xe1, 0x34, 0xd2, 0x4b, 0x4d, 0x0a, 0x76, 0x56,
+0x2b, 0x95, 0xe6, 0xc9, 0x16, 0xc3, 0xcf, 0x7d, 0xb8, 0x00, 0x3e, 0x4d,
+0x77, 0x9f, 0x25, 0xc4, 0x19, 0x6c, 0xf4, 0xa9, 0xa6, 0x0d, 0xfe, 0x00,
+0xc2, 0xc0, 0xee, 0x53, 0x74, 0x80, 0x15, 0xe5, 0x6a, 0xf2, 0x88, 0x60,
+0x01, 0xf5, 0x92, 0x0b, 0x64, 0x9c, 0x13, 0x8b, 0x06, 0x59, 0xcb, 0x2a,
+0x43, 0x9f, 0x80, 0x3d, 0x52, 0x9d, 0x4e, 0xf9, 0x60, 0xc2, 0xf8, 0x03,
+0xe3, 0x6b, 0x40, 0x1f, 0xcd, 0x02, 0x9b, 0x19, 0xe4, 0x07, 0x8c, 0xe6,
+0x74, 0x3c, 0x8a, 0x99, 0x5d, 0xf7, 0xd9, 0x30, 0x4c, 0x45, 0xf2, 0x71,
+0x9c, 0x34, 0xfe, 0xec, 0x84, 0xd0, 0xc2, 0xc0, 0xe6, 0x23, 0xd4, 0x00,
+0x0a, 0xaa, 0xb2, 0x73, 0x13, 0x60, 0x07, 0x8f, 0xfd, 0xb8, 0xf1, 0x79,
+0x00, 0x2b, 0xca, 0x97, 0xc8, 0x1a, 0xc8, 0x05, 0x3b, 0x4c, 0x47, 0xcf,
+0xb2, 0x63, 0xf0, 0xc2, 0xe1, 0x34, 0xd3, 0x9b, 0x4b, 0x42, 0x3a, 0x77,
+0x09, 0x96, 0xe0, 0xff, 0x81, 0x3c, 0x29, 0xbc, 0x69, 0x00, 0x3b, 0x55,
+0x6a, 0x65, 0x36, 0xb4, 0x07, 0xd5, 0x5a, 0x3c, 0x1d, 0xb3, 0x1e, 0x70,
+0xc2, 0xc0, 0xfb, 0xe1, 0xe5, 0x4c, 0xe6, 0x76, 0x8f, 0xed, 0x92, 0x68,
+0x01, 0x61, 0xb3, 0xb9, 0xc4, 0xa6, 0x80, 0x3b, 0xd6, 0x2b, 0x92, 0xcf,
+0x24, 0x0c, 0xf6, 0x4b, 0x37, 0x5a, 0x38, 0x85, 0xd0, 0xc2, 0xe0, 0xf3,
+0x99, 0x45, 0x40, 0x10, 0x92, 0x5c, 0xf2, 0x60, 0xa6, 0x01, 0x56, 0xfa,
+0x74, 0x88, 0x97, 0x18, 0x05, 0xcd, 0xa6, 0xa6, 0x02, 0xbd, 0x2f, 0xfc,
+0x7f, 0x54, 0x85, 0xf1, 0xc2, 0x30, 0xc2, 0xc0, 0xec, 0x83, 0x7c, 0xc0,
+0x1e, 0xba, 0xc8, 0xe3, 0xaa, 0x62, 0x07, 0x92, 0xb5, 0x5b, 0x07, 0x09,
+0x99, 0x4f, 0x35, 0xf5, 0x3f, 0xfe, 0xc9, 0x82, 0x2d, 0xc4, 0xb4, 0xf5,
+0x71, 0x3e, 0xb0, 0xc2, 0xe0, 0xef, 0x53, 0x75, 0x40, 0x9f, 0x9c, 0x92,
+0x2b, 0x95, 0x5e, 0x07, 0x81, 0xfb, 0xc9, 0x7d, 0xa9, 0x00, 0x23, 0x55,
+0x46, 0xa9, 0xbc, 0x4c, 0x24, 0xaf, 0x92, 0x19, 0x03, 0x10, 0xbc, 0x20,
+0xc2, 0xc1, 0x35, 0x32, 0x9b, 0x44, 0x63, 0x62, 0x6c, 0xb0, 0x1e, 0xde,
+0x07, 0x84, 0x5c, 0xc8, 0x7b, 0x66, 0x80, 0x37, 0x7d, 0x92, 0x4b, 0xad,
+0x58, 0x08, 0x4f, 0x6e, 0x00, 0xae, 0xf2, 0x3c, 0x50, 0xc2, 0xe0, 0xf9,
+0x73, 0x7c, 0x4c, 0xc9, 0x1a, 0x48, 0xbe, 0x17, 0x9f, 0x01, 0x3e, 0x7b,
+0x3f, 0xbf, 0xf7, 0x80, 0x26, 0x55, 0x7b, 0x60, 0xb5, 0xbc, 0x3c, 0x3d,
+0xb4, 0x74, 0xfb, 0x35, 0xce, 0xf0, 0xc2, 0xc0, 0xf1, 0x33, 0x7c, 0x00,
+0x14, 0x44, 0xd7, 0xca, 0x34, 0x62, 0x01, 0x7e, 0x92, 0x2d, 0xa7, 0xa8,
+0x00, 0x00, 0x73, 0xde, 0xc5, 0xc0, 0x34, 0x0f, 0x03, 0x97, 0x35, 0x78,
+0x6e, 0x90, 0xd0, 0xc2, 0xe0, 0xeb, 0x43, 0xa4, 0x00, 0x3f, 0x18, 0x89,
+0x57, 0x56, 0xec, 0x06, 0xe9, 0x35, 0x52, 0x74, 0x68, 0x99, 0xd0, 0xeb,
+0x5e, 0xb7, 0x47, 0x49, 0x10, 0x1c, 0x86, 0x51, 0x47, 0x2c, 0x14, 0xb0,
+0xc2, 0xc0, 0xf2, 0x92, 0xc8, 0x00, 0x3e, 0x4a, 0xb4, 0xfc, 0x1e, 0x5a,
+0x07, 0xf6, 0xb5, 0x05, 0xf7, 0x7b, 0x80, 0x23, 0x61, 0x77, 0xa3, 0xa7,
+0x48, 0x03, 0x03, 0x9a, 0x27, 0x22, 0xec, 0x5d, 0x10, 0xc2, 0xe1, 0x39,
+0x74, 0x7c, 0x0b, 0xe8, 0x2d, 0x87, 0x2d, 0x20, 0xe0, 0xf7, 0xe1, 0x12,
+0x28, 0x3c, 0x68, 0x80, 0x3f, 0xf6, 0x55, 0xe9, 0x5b, 0xd0, 0x0a, 0x82,
+0x5a, 0xb6, 0x2f, 0x2e, 0x33, 0x70, 0xc2, 0xc0, 0xf5, 0x33, 0x56, 0x0c,
+0xad, 0x9f, 0x21, 0xee, 0x2e, 0xa4, 0xf0, 0x8e, 0x1c, 0x28, 0xb8, 0xb7,
+0x00, 0x3c, 0x0a, 0x76, 0x6f, 0xef, 0x34, 0x0d, 0xf5, 0xd7, 0x73, 0x66,
+0x95, 0xfd, 0x80, 0xc2, 0xe0, 0xf2, 0x43, 0x0b, 0x40, 0x1b, 0x18, 0xdc,
+0xe0, 0xde, 0x9c, 0x12, 0x6f, 0xda, 0x73, 0xac, 0x9a, 0x80, 0x47, 0x09,
+0xce, 0x4e, 0x01, 0xac, 0x7f, 0x0e, 0xf5, 0x94, 0xd1, 0x50, 0xe2, 0xa0,
+0xc2, 0xc0, 0xf4, 0x3f, 0x84, 0x00, 0x1f, 0xc8, 0xdc, 0x19, 0x6f, 0xea,
+0x04, 0x94, 0x37, 0x5a, 0x57, 0x38, 0x98, 0x8f, 0x4b, 0x52, 0x59, 0x20,
+0x39, 0x12, 0xd6, 0x59, 0x4a, 0x17, 0xef, 0x79, 0x30, 0xc2, 0xe0, 0xfc,
+0xe3, 0x0b, 0x40, 0x1f, 0x29, 0x90, 0x62, 0x49, 0x26, 0x07, 0x8f, 0x6a,
+0x42, 0x76, 0xb9, 0x00, 0x9f, 0xca, 0x06, 0xce, 0x37, 0x4c, 0x23, 0xe2,
+0xa7, 0x29, 0x3a, 0x52, 0xec, 0x40, 0xc2, 0xc0, 0xe9, 0x63, 0x17, 0x09,
+0x04, 0x33, 0x09, 0x2e, 0xc0, 0x19, 0xa7, 0x93, 0xe2, 0x1f, 0x88, 0x86,
+0x00, 0x5c, 0x1f, 0x7f, 0x5f, 0xf6, 0xd4, 0x05, 0x22, 0x08, 0x65, 0x44,
+0x6a, 0xbe, 0x90, 0xc2, 0xe1, 0x39, 0x77, 0xdc, 0x4c, 0xd6, 0x76, 0x92,
+0x2d, 0x92, 0x6c, 0xf8, 0x8b, 0xc3, 0x3f, 0xbc, 0x77, 0x00, 0x1c, 0xa3,
+0xa7, 0x78, 0x99, 0xb0, 0x0e, 0xe3, 0x6e, 0x73, 0x9f, 0x53, 0x63, 0x60,
+0xc2, 0xc0, 0xef, 0xdf, 0x9b, 0x4c, 0xfd, 0xaa, 0xdc, 0xe8, 0x5a, 0xe8,
+0xe9, 0xd1, 0x7a, 0x33, 0x2b, 0x36, 0x13, 0x84, 0x60, 0xe1, 0xcd, 0xdc,
+0xbb, 0x9f, 0x05, 0x79, 0xea, 0x4e, 0x6e, 0x77, 0xd0, 0xc2, 0xe0, 0xef,
+0x14, 0x45, 0x40, 0x1a, 0x54, 0x13, 0x63, 0x42, 0x68, 0x05, 0x07, 0xc8,
+0xa9, 0x5e, 0xb8, 0x9a, 0x13, 0x3d, 0xa4, 0x9a, 0x49, 0xbd, 0xd1, 0x1c,
+0xd5, 0x9e, 0xf0, 0xae, 0xe3, 0x90, 0xc2, 0xc0, 0xf4, 0xd4, 0x4b, 0x40,
+0x3e, 0x6e, 0x92, 0x14, 0xd2, 0xdc, 0x07, 0xc6, 0x6a, 0x06, 0x7d, 0xf8,
+0x00, 0x23, 0xb9, 0xa3, 0x82, 0xcc, 0x50, 0x01, 0xdb, 0x34, 0xe6, 0xc1,
+0x2f, 0xc5, 0xb0, 0xc2, 0xe1, 0x39, 0x73, 0xac, 0xc9, 0x0c, 0x3b, 0x0e,
+0x97, 0x11, 0xdb, 0xe7, 0x97, 0x67, 0x2d, 0x0b, 0x98, 0x00, 0xaf, 0xf9,
+0xbd, 0xff, 0xd0, 0xb8, 0x06, 0x18, 0x6e, 0x58, 0x73, 0xd3, 0xf2, 0xa0,
+0xc2, 0xc0, 0xf4, 0xd7, 0xdb, 0x4c, 0x6b, 0xb2, 0x91, 0xcc, 0x3a, 0x22,
+0x19, 0x31, 0xc4, 0xef, 0x7e, 0x86, 0x00, 0x3c, 0x0f, 0xb4, 0xd1, 0x92,
+0xc4, 0x0a, 0xe9, 0x64, 0x25, 0xa3, 0x70, 0x92, 0x30, 0xc2, 0xe1, 0x3a,
+0xe3, 0x9b, 0x40, 0x1b, 0xfd, 0x8c, 0xa3, 0x6a, 0xe6, 0x02, 0x1f, 0xcd,
+0xfa, 0x49, 0xc8, 0x99, 0xc4, 0x20, 0xe1, 0xc5, 0xcf, 0x38, 0xdf, 0xc2,
+0x78, 0x50, 0xb8, 0x31, 0x94, 0x50, 0xc2, 0xc0, 0xe3, 0xe2, 0x97, 0x00,
+0x0e, 0x80, 0xdf, 0x22, 0xa8, 0xda, 0x07, 0x07, 0x67, 0xa9, 0xfb, 0x97,
+0x98, 0x92, 0xbd, 0xa4, 0x5a, 0x24, 0xcd, 0x82, 0xec, 0x63, 0x4b, 0x01,
+0x6e, 0xef, 0x30, 0xc2, 0xe0, 0xf9, 0x73, 0x9b, 0x40, 0x1e, 0x60, 0xa8,
+0xa9, 0x9d, 0x56, 0x07, 0xf6, 0x23, 0x3c, 0xb6, 0x59, 0x00, 0x1c, 0x63,
+0xef, 0xa1, 0xbf, 0x40, 0x25, 0x0f, 0xb4, 0x37, 0xd8, 0xb3, 0x5d, 0xd0,
+0xc2, 0xc1, 0x39, 0x77, 0xd5, 0x4b, 0xe2, 0x10, 0xca, 0x0c, 0xe1, 0xda,
+0xff, 0xce, 0x2c, 0xd8, 0x43, 0x68, 0x80, 0x52, 0xf9, 0x94, 0xb8, 0x4a,
+0x3c, 0x07, 0xbe, 0x63, 0x7e, 0xb5, 0x75, 0x21, 0x30, 0xc2, 0xe1, 0x34,
+0xd3, 0x5a, 0x0c, 0x26, 0x87, 0x48, 0x41, 0x42, 0x5d, 0x08, 0xf3, 0xb3,
+0x48, 0xa0, 0x06, 0x00, 0x2b, 0xa2, 0x78, 0xd4, 0xc6, 0xbc, 0x3f, 0x76,
+0x44, 0x7d, 0x1d, 0xae, 0x06, 0x70, 0xc2, 0xc0, 0xf1, 0x33, 0x0c, 0x00,
+0x14, 0xf1, 0x2a, 0xed, 0x86, 0xa2, 0x01, 0xe7, 0xec, 0xfb, 0xb0, 0x98,
+0x00, 0x04, 0x21, 0x99, 0xcc, 0x02, 0x38, 0x0a, 0xf2, 0x58, 0x0a, 0x11,
+0x70, 0xe1, 0x30, 0xc2, 0xe0, 0xed, 0x73, 0xd5, 0x40, 0x75, 0xf4, 0x09,
+0x31, 0xd4, 0x5e, 0x04, 0x8c, 0xff, 0xcc, 0xba, 0xe9, 0x9a, 0x0c, 0xf7,
+0xe2, 0x5a, 0xc4, 0x40, 0x00, 0x7c, 0x69, 0xdc, 0x85, 0x0c, 0xa4, 0x20,
+0xc2, 0xc0, 0xe5, 0x44, 0x5b, 0x40, 0x1f, 0x00, 0x04, 0x85, 0x3e, 0xa2,
+0x07, 0xd1, 0x25, 0xa5, 0x41, 0x68, 0x00, 0x2b, 0xc7, 0x55, 0x44, 0xf4,
+0xc8, 0x04, 0x99, 0x89, 0x11, 0xd1, 0x2c, 0x0e, 0xb0, 0xc2, 0xe0, 0xf4,
+0x57, 0xd7, 0x0c, 0x62, 0x6d, 0x0a, 0xff, 0x50, 0x59, 0x37, 0xca, 0xcc,
+0xfc, 0xbb, 0x38, 0x00, 0xd7, 0x52, 0x4a, 0x86, 0xf5, 0x48, 0x09, 0xf1,
+0xff, 0x75, 0x75, 0xee, 0x4c, 0xb0, 0xc2, 0xc1, 0x39, 0x73, 0x0b, 0x4b,
+0xe8, 0x6d, 0x33, 0x6d, 0xf2, 0x66, 0x90, 0x68, 0xb3, 0xd0, 0xc4, 0x06,
+0x00, 0x3c, 0x9f, 0x21, 0x2e, 0x3b, 0x2c, 0x1b, 0x83, 0x5b, 0x47, 0x10,
+0x2e, 0x29, 0x10, 0xc2, 0xe0, 0xf1, 0x34, 0x54, 0x00, 0x16, 0xe9, 0xe5,
+0x2e, 0x6a, 0xaa, 0x02, 0xef, 0xc4, 0xa3, 0x13, 0xf8, 0x80, 0x09, 0xda,
+0x24, 0x28, 0x03, 0xb4, 0x0f, 0x22, 0x92, 0x92, 0x5d, 0xaa, 0xe3, 0xf0,
+0xc2, 0xc0, 0xeb, 0x42, 0xb7, 0x40, 0x14, 0x9e, 0x0b, 0x36, 0x34, 0xe2,
+0x03, 0xe1, 0x7b, 0xaf, 0x98, 0xbb, 0x19, 0x09, 0x0c, 0xec, 0x2a, 0x0d,
+0x38, 0x72, 0xb8, 0xc6, 0x95, 0x52, 0xaa, 0xe4, 0x90, 0xc2, 0xe0, 0xf3,
+0x94, 0x3b, 0x40, 0x13, 0x04, 0x68, 0xba, 0xd2, 0xda, 0x07, 0xe2, 0x7a,
+0x55, 0xbb, 0x4a, 0x80, 0x1c, 0x21, 0x21, 0x4b, 0x86, 0x48, 0x51, 0x19,
+0x99, 0xe6, 0xfb, 0x2c, 0x35, 0xf0, 0xc2, 0xc0, 0xf9, 0x72, 0x4b, 0x49,
+0x02, 0xe3, 0x2d, 0xd9, 0xb0, 0x9f, 0x93, 0x60, 0x4c, 0xaa, 0x53, 0x77,
+0x80, 0x1e, 0xbc, 0x2a, 0x8f, 0x23, 0x24, 0x07, 0xfe, 0x60, 0x5e, 0xb5,
+0xd4, 0x79, 0x20, 0xc2, 0xe1, 0x34, 0xd3, 0xdb, 0x0c, 0xcb, 0x4d, 0xe4,
+0x34, 0xc3, 0x1e, 0x20, 0xd1, 0xe4, 0x98, 0x1a, 0xd7, 0x00, 0x7f, 0xb1,
+0x6b, 0x82, 0xa9, 0x34, 0x1b, 0x4d, 0xf5, 0xe6, 0xe9, 0x2d, 0xc9, 0xf0,
+0xc2, 0xc0, 0xfd, 0x61, 0xf5, 0x40, 0x0f, 0xe4, 0xde, 0xa1, 0xaa, 0xec,
+0x05, 0xd8, 0x54, 0x7e, 0xcc, 0x99, 0x00, 0x00, 0xe8, 0x4a, 0x5d, 0xc0,
+0xb0, 0x0f, 0xf2, 0x73, 0x81, 0x0d, 0x0f, 0xf2, 0x60, 0xc2, 0xe0, 0xef,
+0xf3, 0x2b, 0x40, 0x79, 0x08, 0x1e, 0xf5, 0xd8, 0x9e, 0x06, 0x7f, 0x7c,
+0xaf, 0x38, 0xd9, 0x99, 0x94, 0x3e, 0x62, 0xf4, 0x34, 0xb6, 0x11, 0xa2,
+0xc6, 0x73, 0xd8, 0x2d, 0xcf, 0xd0, 0xc2, 0xc0, 0xea, 0x61, 0xbc, 0x40,
+0x1b, 0x04, 0xaa, 0x81, 0x10, 0xdc, 0x07, 0xf4, 0x32, 0xa5, 0xf5, 0xf9,
+0x00, 0x2d, 0x20, 0x7a, 0x6b, 0xdb, 0x44, 0x04, 0xd0, 0x8d, 0x58, 0xcc,
+0xef, 0xf0, 0xd0, 0xc2, 0xe1, 0x39, 0x72, 0xc7, 0x8b, 0xe6, 0xee, 0xd3,
+0x82, 0x0e, 0x19, 0x87, 0xe1, 0x4f, 0x12, 0xa9, 0x98, 0x00, 0x3c, 0x63,
+0x56, 0xd6, 0x75, 0xc4, 0x0c, 0xf2, 0x75, 0x5e, 0x92, 0x75, 0xcf, 0x10,
+0xc2, 0xc0, 0xfc, 0xe3, 0x0c, 0xcc, 0x66, 0x9b, 0x28, 0x85, 0xc7, 0x98,
+0x0a, 0xd6, 0xb1, 0xf0, 0xe2, 0x07, 0x00, 0x3c, 0x81, 0xf8, 0xdc, 0x24,
+0x40, 0x0f, 0x2f, 0x60, 0xb1, 0x07, 0xd2, 0x2c, 0x20, 0xc2, 0xe1, 0x3a,
+0xe3, 0x07, 0x00, 0x15, 0x03, 0x3e, 0xdc, 0x9b, 0x64, 0x04, 0x3f, 0xc3,
+0xed, 0x00, 0xc7, 0x80, 0x00, 0x76, 0x19, 0xc1, 0x05, 0x2c, 0x0f, 0x57,
+0x23, 0x92, 0x08, 0xce, 0x95, 0x40, 0xc2, 0xc0, 0xeb, 0x42, 0x94, 0x00,
+0x1f, 0x1a, 0xdc, 0x9b, 0x6d, 0x26, 0x05, 0x51, 0x7a, 0x75, 0xda, 0xe9,
+0x19, 0x0b, 0x53, 0x0a, 0x80, 0xf3, 0x3c, 0x92, 0xda, 0x28, 0x3a, 0xb1,
+0x8c, 0x89, 0x20, 0xc2, 0xe1, 0x3a, 0xe2, 0x96, 0x80, 0x1f, 0xea, 0xfe,
+0xa8, 0xdf, 0xe4, 0x07, 0xae, 0xea, 0xde, 0x4f, 0xda, 0x80, 0x68, 0x8b,
+0xd6, 0xc4, 0x6e, 0x44, 0x04, 0xe0, 0x88, 0x01, 0xb9, 0x30, 0xcc, 0x70,
+0xc2, 0xc0, 0xfd, 0xc7, 0xd5, 0x49, 0xc0, 0x32, 0x71, 0x3e, 0x66, 0xd7,
+0xa7, 0x83, 0x97, 0x28, 0x9f, 0x98, 0x80, 0x34, 0x6e, 0xa1, 0x1d, 0x19,
+0xc0, 0x07, 0xc2, 0x69, 0x1f, 0x5a, 0xb1, 0xf3, 0xd0, 0xc2, 0xe1, 0x3b,
+0x29, 0xbb, 0x4c, 0xc9, 0x88, 0x53, 0xed, 0x16, 0x64, 0x39, 0x66, 0x9c,
+0x31, 0x18, 0xf5, 0x80, 0x36, 0x44, 0xd7, 0xa0, 0x21, 0xb4, 0x1e, 0xb3,
+0x6c, 0x46, 0xc0, 0x95, 0xcb, 0x80, 0xc2, 0xc0, 0xeb, 0x22, 0x94, 0xcc,
+0x94, 0x84, 0x57, 0xc8, 0x65, 0xa3, 0x21, 0xf6, 0xc1, 0x25, 0x12, 0x48,
+0x00, 0x01, 0xf5, 0xa0, 0x15, 0x00, 0x28, 0x0f, 0x9f, 0x28, 0x30, 0x8e,
+0xad, 0x10, 0x50, 0xc2, 0xe1, 0x2c, 0x72, 0x8a, 0x00, 0x1f, 0xcd, 0xf2,
+0x2a, 0xe5, 0xe6, 0x07, 0x70, 0xb4, 0xaf, 0x47, 0xba, 0x1a, 0x0f, 0x0e,
+0x62, 0xc4, 0xec, 0x38, 0x01, 0xb3, 0x38, 0x9b, 0x9b, 0x0e, 0xcd, 0x60,
+0xc2, 0xc0, 0xea, 0x42, 0xa3, 0x00, 0x1e, 0x04, 0x09, 0x94, 0xa0, 0xde,
+0x07, 0x8c, 0x7e, 0xcb, 0xfe, 0x16, 0x80, 0x1a, 0x85, 0x25, 0xa2, 0xa7,
+0xd4, 0x02, 0x3f, 0x89, 0xef, 0x0b, 0xad, 0x4f, 0x70, 0xc2, 0xe1, 0x3b,
+0x27, 0xda, 0xc9, 0xc5, 0xb8, 0x8b, 0x47, 0x03, 0x67, 0xe7, 0x82, 0xb9,
+0x9e, 0x98, 0xc6, 0x80, 0x2b, 0x85, 0xa8, 0x3d, 0x3b, 0xb4, 0x08, 0x12,
+0xd5, 0xe8, 0x3a, 0xd6, 0xba, 0x40, 0xc2, 0xc1, 0x39, 0x73, 0x14, 0x0c,
+0x69, 0xa9, 0x84, 0x8e, 0x73, 0xa0, 0x29, 0x64, 0x0c, 0xe8, 0x4e, 0xe6,
+0x80, 0x3c, 0x0c, 0xf9, 0x39, 0x2f, 0x34, 0x0c, 0x1d, 0xf7, 0xb4, 0xfb,
+0x30, 0xbc, 0xf0, 0xc2, 0xe0, 0xeb, 0xc2, 0x96, 0x80, 0x17, 0xe5, 0xd6,
+0xbd, 0x15, 0x6c, 0x06, 0x06, 0xfe, 0x57, 0x8f, 0x68, 0x98, 0x84, 0x77,
+0x22, 0x7e, 0x60, 0x26, 0xaf, 0x82, 0x53, 0x91, 0x49, 0xd1, 0x28, 0xe0,
+0xc2, 0xc0, 0xeb, 0xa2, 0x85, 0x40, 0x1b, 0x1f, 0xee, 0x9b, 0x62, 0xe2,
+0x04, 0xae, 0xfb, 0xfc, 0x30, 0xda, 0x19, 0x56, 0x83, 0xe7, 0xac, 0x6c,
+0xb8, 0x23, 0xcd, 0x36, 0xd8, 0x4c, 0x0a, 0xee, 0xc0, 0xc3, 0x77, 0xf5,
+0x14, 0x74, 0x3e, 0x5e, 0x16, 0x85, 0x6f, 0x69, 0x6c, 0x2f, 0xd2, 0xb0,
+0x09, 0x29, 0xaa, 0xba, 0x0a, 0x3e, 0x6e, 0x63, 0xf0, 0x45, 0xe3, 0x19,
+0x51, 0x07, 0xe3, 0x71, 0x99, 0xb0, 0xc2, 0x97, 0xaf, 0xd5, 0x37, 0x8f,
+0xe3, 0x17, 0xf9, 0x32, 0x24, 0x5b, 0x43, 0x99, 0x12, 0x78, 0xf0, 0x59,
+0xe6, 0x3c, 0x42, 0x5e, 0xf4, 0xaf, 0x4a, 0xcb, 0xa0, 0xd7, 0xdf, 0xca,
+0x34, 0x4d, 0xd0, 0xc2, 0xd7, 0xa7, 0x42, 0xc4, 0x26, 0x7f, 0xab, 0xf4,
+0x80, 0x67, 0xde, 0xb0, 0xa9, 0x52, 0xca, 0xbd, 0x78, 0x47, 0x1c, 0x02,
+0x18, 0x6c, 0x62, 0xcf, 0xc3, 0x70, 0x5b, 0x9b, 0x1a, 0xee, 0x6b, 0x50,
+0xc2, 0x97, 0x85, 0xa2, 0x44, 0x37, 0x48, 0x81, 0x61, 0xa1, 0x4c, 0xe7,
+0x29, 0x7e, 0xcc, 0x9f, 0x7a, 0x88, 0x45, 0xff, 0x62, 0x8f, 0xc8, 0x99,
+0xc7, 0xc1, 0x37, 0xd6, 0x71, 0x0a, 0x93, 0xa2, 0x40, 0xc2, 0xe0, 0xf3,
+0xb3, 0x57, 0x08, 0x6c, 0x55, 0x89, 0xa3, 0xbe, 0xa3, 0xb1, 0x62, 0x00,
+0x6b, 0x79, 0xd8, 0x50, 0x16, 0x3b, 0x77, 0xa0, 0x3e, 0x34, 0x8f, 0x2d,
+0xae, 0x8f, 0x19, 0x75, 0xcd, 0x70, 0xc2, 0xe4, 0x67, 0x01, 0x8b, 0x75,
+0x68, 0x4f, 0x02, 0x2c, 0x0a, 0xe3, 0x6d, 0xb2, 0xda, 0xd4, 0x21, 0x98,
+0x5a, 0xfe, 0xab, 0xae, 0x79, 0xe4, 0x4b, 0x1f, 0x8c, 0x11, 0x5b, 0x53,
+0x8f, 0xfd, 0xa0, 0xc2, 0x60, 0xe6, 0xc3, 0x95, 0xb5, 0x20, 0x51, 0xa0,
+0xc0, 0x00, 0xa5, 0x1a, 0x96, 0x1b, 0xd0, 0x37, 0x08, 0x7d, 0x2c, 0x25,
+0xf9, 0xc5, 0xb6, 0x49, 0xe1, 0xe5, 0xf4, 0x42, 0xed, 0x0e, 0x1d, 0xe0,
+0xc2, 0xf7, 0x85, 0xe1, 0x9c, 0x19, 0xcb, 0xbf, 0x6d, 0xfd, 0x21, 0x67,
+0x99, 0xb1, 0xbe, 0x3f, 0x7f, 0x68, 0x75, 0x67, 0xe6, 0x2f, 0x3e, 0x7f,
+0x3b, 0xc7, 0x2f, 0xf5, 0xda, 0x16, 0x71, 0x2d, 0x10, 0xc2, 0x97, 0xa7,
+0x24, 0x36, 0xb0, 0x3e, 0x72, 0xc8, 0x51, 0x98, 0x28, 0xfe, 0xc4, 0xac,
+0x6b, 0x43, 0xc6, 0x93, 0xcf, 0x1e, 0xdd, 0x81, 0x02, 0xc9, 0x53, 0x5f,
+0xbb, 0xb3, 0x3a, 0x0c, 0x93, 0x40, 0xc2, 0xd7, 0x85, 0xc2, 0xe5, 0x7d,
+0xea, 0x05, 0x02, 0xd5, 0x70, 0x28, 0x51, 0xee, 0x1e, 0xc6, 0xa2, 0xd7,
+0x08, 0x48, 0x79, 0x81, 0x28, 0x3f, 0x43, 0xce, 0xb5, 0x3f, 0x51, 0x0d,
+0xb3, 0xec, 0x70, 0xc2, 0x80, 0xe7, 0xe4, 0x93, 0x53, 0x92, 0x2b, 0xf6,
+0xa9, 0x5e, 0x59, 0x71, 0x3c, 0x27, 0xe4, 0x8a, 0x37, 0xb7, 0xca, 0x31,
+0x7c, 0x03, 0x95, 0xc6, 0x0f, 0x4b, 0x87, 0xc2, 0x6a, 0xf0, 0x57, 0xd0,
+0xc2, 0xf7, 0x8b, 0x03, 0x4b, 0x4d, 0x28, 0x10, 0x37, 0x47, 0x21, 0xa1,
+0x80, 0x92, 0xfe, 0x11, 0x17, 0x16, 0x8e, 0xa6, 0xd9, 0x91, 0x63, 0x24,
+0xba, 0xf5, 0xbc, 0xaa, 0x5c, 0xa4, 0x4f, 0x5e, 0x00, 0xc2, 0xe0, 0xe8,
+0x62, 0x35, 0x40, 0x01, 0x47, 0x55, 0xbe, 0x13, 0xa8, 0x00, 0xa5, 0x7e,
+0x25, 0x1a, 0x46, 0x10, 0xa6, 0x17, 0xa0, 0x38, 0x5e, 0x47, 0x4f, 0x81,
+0xed, 0x40, 0x88, 0x30, 0x24, 0x50, 0xc2, 0xf7, 0xe9, 0xc2, 0xc4, 0x9f,
+0x08, 0x3c, 0x3d, 0xa0, 0xb8, 0xe1, 0x31, 0x07, 0xba, 0x48, 0xf7, 0x37,
+0x80, 0x13, 0xbb, 0x07, 0x89, 0x49, 0xb8, 0x0b, 0xbb, 0x51, 0xef, 0x1f,
+0x4e, 0x73, 0x60, 0xc2, 0xe0, 0xf2, 0xb4, 0x44, 0x3d, 0x04, 0xc1, 0xd9,
+0x4a, 0x0a, 0x62, 0xb1, 0x0f, 0x22, 0x7d, 0xcd, 0xd6, 0x80, 0x36, 0x33,
+0x7a, 0x26, 0x46, 0x45, 0xa3, 0x1d, 0x3d, 0xed, 0xb3, 0x6b, 0xc4, 0x30,
+0xc2, 0x63, 0x6b, 0x03, 0x62, 0xc5, 0x85, 0xa5, 0x02, 0x00, 0x56, 0x1b,
+0x10, 0xa7, 0x37, 0x10, 0x49, 0xb2, 0x90, 0xc7, 0x97, 0xc5, 0xee, 0xc8,
+0xa3, 0x80, 0x7f, 0x27, 0xa4, 0x69, 0xaa, 0xe2, 0xf0, 0xc7, 0xb1, 0x87,
+0x59, 0xda, 0x21, 0xc5, 0x18, 0x62, 0x18, 0x0b, 0x97, 0xe1, 0x10, 0x50,
+0x3e, 0x46, 0xb4, 0x8a, 0xc0, 0x1e, 0xa8, 0xdb, 0xd7, 0x22, 0xa3, 0x50,
+0xba, 0x63, 0xf3, 0xa8, 0xf5, 0xb0, 0xc7, 0x27, 0x6d, 0x13, 0xa4, 0x86,
+0xa2, 0xcf, 0x33, 0x17, 0x37, 0xd7, 0x49, 0xd0, 0xa6, 0x94, 0x5a, 0x14,
+0x8e, 0x10, 0x0b, 0x25, 0x25, 0xf7, 0xaa, 0xe2, 0x5a, 0x12, 0x6e, 0x90,
+0x68, 0x5f, 0x10, 0xc6, 0xf0, 0xe6, 0xb3, 0x08, 0x3c, 0xe9, 0x80, 0x73,
+0x5a, 0x45, 0xd4, 0xa1, 0x62, 0x06, 0xa7, 0xa9, 0x64, 0xbe, 0xdd, 0x22,
+0xfc, 0x6d, 0x54, 0xa0, 0xd1, 0xdf, 0x38, 0xc3, 0x11, 0x6a, 0x37, 0x30,
+0xc5, 0x66, 0x63, 0xb9, 0x74, 0x2d, 0xe4, 0x46, 0x39, 0x37, 0x67, 0xd3,
+0x90, 0xac, 0x05, 0xe0, 0x9c, 0x84, 0xdf, 0x4f, 0x77, 0x22, 0xa6, 0x5f,
+0xa6, 0xa5, 0x23, 0xda, 0x6c, 0xc0, 0xe9, 0x86, 0x90, 0xc7, 0xb1, 0x53,
+0x23, 0x55, 0xba, 0xcd, 0xed, 0x00, 0xca, 0xbd, 0x55, 0x91, 0x59, 0xe3,
+0x42, 0x7e, 0x55, 0x16, 0x8b, 0x98, 0x19, 0x43, 0xcc, 0x2e, 0x74, 0x46,
+0x25, 0xe5, 0x66, 0xe8, 0x54, 0x90, 0xc3, 0x87, 0x23, 0x38, 0xfc, 0x36,
+0x62, 0xa8, 0x75, 0x10, 0x27, 0xd6, 0xb1, 0x01, 0xfc, 0xdf, 0x51, 0x64,
+0xc0, 0x9c, 0xe3, 0x45, 0x91, 0xfc, 0x2b, 0x42, 0xc2, 0x03, 0xce, 0xc8,
+0x29, 0x1d, 0xd0, 0xc6, 0xb1, 0x51, 0x09, 0x44, 0xb8, 0xc3, 0x1a, 0x00,
+0x78, 0x2d, 0x54, 0xb2, 0x3d, 0x21, 0xbe, 0x00, 0x45, 0xb0, 0xc2, 0x02,
+0x07, 0x4c, 0x60, 0x24, 0x06, 0xbb, 0x38, 0x05, 0xfb, 0x49, 0x28, 0xe0,
+0xc4, 0x0e, 0xc3, 0x53, 0xc5, 0x7d, 0xe6, 0x15, 0x67, 0xf7, 0xbd, 0x98,
+0x64, 0xb0, 0x93, 0x13, 0x98, 0x34, 0xcb, 0x8b, 0x12, 0xdd, 0x5a, 0x8c,
+0x28, 0xd2, 0x06, 0xde, 0xdc, 0x94, 0x8a, 0x64, 0x00, 0xc7, 0x10, 0x53,
+0x83, 0xa5, 0x62, 0xc1, 0xa0, 0x7d, 0xbe, 0x55, 0x53, 0x0a, 0xb0, 0x0e,
+0x63, 0x6f, 0x85, 0x16, 0x00, 0x62, 0x63, 0xe7, 0xb9, 0x27, 0x43, 0x52,
+0xcf, 0xe6, 0xcd, 0x2b, 0x99, 0xf0, 0xc7, 0x30, 0x22, 0x39, 0x34, 0x5f,
+0x23, 0x14, 0x07, 0xd4, 0x15, 0x15, 0x39, 0x6c, 0x1d, 0x14, 0x1c, 0xf4,
+0x8e, 0x48, 0x9a, 0x39, 0xa1, 0x70, 0xa6, 0xe2, 0x51, 0x2d, 0xcf, 0xdb,
+0xcb, 0xdb, 0xe0, 0xc6, 0xa9, 0x06, 0xb3, 0xc4, 0x1a, 0xc7, 0xe1, 0x48,
+0xf8, 0xb2, 0x15, 0x61, 0xeb, 0xf3, 0x3a, 0x33, 0x94, 0x7e, 0x89, 0x7e,
+0xc9, 0x63, 0x03, 0x29, 0xd2, 0x30, 0x45, 0x73, 0xb2, 0xc9, 0xd1, 0x00,
+0xc6, 0xb2, 0xc2, 0xd8, 0xa5, 0x9b, 0x64, 0x5a, 0x89, 0xc3, 0x82, 0xd6,
+0x8a, 0x12, 0x1d, 0x7f, 0xc2, 0xc4, 0x78, 0x54, 0x5e, 0xcc, 0x60, 0xf6,
+0x2e, 0x25, 0x27, 0xc2, 0x5f, 0xf3, 0x69, 0x8d, 0xb0, 0xc4, 0x69, 0x13,
+0x6f, 0x8c, 0xfb, 0xe6, 0x43, 0x33, 0xb8, 0x07, 0x99, 0xa1, 0xf0, 0x69,
+0xfb, 0xb5, 0x04, 0xd7, 0x44, 0x1d, 0x64, 0x4b, 0xf4, 0x2d, 0xb4, 0x31,
+0x86, 0x21, 0x7a, 0xaa, 0x3c, 0xd0, 0xc4, 0x10, 0x23, 0x58, 0xb7, 0xd4,
+0x44, 0x10, 0xe2, 0x57, 0x1f, 0x50, 0xa1, 0x14, 0xb7, 0x58, 0x42, 0x74,
+0x90, 0xcd, 0x46, 0xc2, 0x52, 0xf9, 0xb1, 0x43, 0xf0, 0x63, 0x37, 0x86,
+0x2a, 0x4b, 0x10, 0xc7, 0x08, 0x32, 0x0f, 0x94, 0x0d, 0x01, 0xb0, 0x40,
+0x43, 0xce, 0x54, 0xe9, 0x35, 0x7d, 0x82, 0x08, 0xd5, 0x0b, 0x49, 0x92,
+0x74, 0xd0, 0xac, 0x32, 0xd1, 0x93, 0x3f, 0x34, 0x96, 0x49, 0xcc, 0x00,
+0xc3, 0xaf, 0xd3, 0xa3, 0xdb, 0x47, 0x46, 0x54, 0x8e, 0x5b, 0x62, 0x54,
+0x78, 0xdd, 0x70, 0x3c, 0xe1, 0x55, 0xfe, 0xd8, 0x1a, 0xfd, 0x90, 0xfd,
+0x2d, 0x11, 0x92, 0x17, 0x9c, 0xe2, 0xaa, 0x4c, 0x90, 0xc6, 0xa7, 0xa3,
+0xfa, 0x14, 0xfc, 0xe4, 0x53, 0xc0, 0x75, 0x98, 0x57, 0xc3, 0xca, 0xfe,
+0x7c, 0xf4, 0x04, 0x14, 0x0e, 0xa9, 0x59, 0xe1, 0x18, 0xac, 0xe3, 0x70,
+0x2a, 0x85, 0x4f, 0x2c, 0x12, 0xf0, 0xc4, 0x10, 0xa3, 0xb3, 0x5c, 0x1e,
+0x27, 0xd2, 0x93, 0x24, 0x54, 0x92, 0x59, 0x0f, 0x24, 0x3b, 0x00, 0x95,
+0xfc, 0xc9, 0x2f, 0x49, 0x09, 0x1b, 0xae, 0xd2, 0x30, 0x40, 0x1d, 0x75,
+0x89, 0xf2, 0xa0, 0xc7, 0xaf, 0x47, 0x39, 0x73, 0x7b, 0x48, 0x15, 0xa7,
+0x9c, 0xa1, 0x12, 0xba, 0xc4, 0x4f, 0x50, 0x57, 0xf6, 0x93, 0x47, 0x88,
+0x96, 0x38, 0xa0, 0x2a, 0x03, 0x8c, 0xbf, 0x65, 0xe4, 0x4a, 0xe8, 0x80,
+0xc4, 0x70, 0xc3, 0x78, 0xfb, 0x7c, 0x07, 0xaa, 0x25, 0xee, 0xdb, 0x57,
+0x01, 0x15, 0x1a, 0x04, 0x9a, 0xb4, 0xb8, 0x4b, 0xe4, 0xdd, 0x7d, 0xb2,
+0x2e, 0xe1, 0x84, 0xdd, 0xdd, 0xe7, 0x0b, 0xf8, 0xa0, 0xc6, 0xef, 0x83,
+0x33, 0x26, 0xbf, 0xa5, 0x1c, 0x08, 0x3f, 0xb4, 0xd0, 0x31, 0x7e, 0xfc,
+0xfe, 0xd4, 0x15, 0xf4, 0x0b, 0x94, 0x16, 0x2f, 0x9a, 0xb1, 0xcc, 0x98,
+0x06, 0xb1, 0x31, 0x0b, 0x72, 0x20, 0xc4, 0x1a, 0x44, 0x38, 0xb4, 0x0a,
+0xa0, 0x98, 0xe9, 0x08, 0x9b, 0x12, 0xbe, 0x8b, 0xa3, 0x9f, 0xdc, 0x65,
+0x62, 0x4a, 0x00, 0x65, 0x8d, 0x8d, 0x2e, 0xe4, 0xa2, 0xf9, 0x50, 0x66,
+0x0a, 0x34, 0x80, 0xc6, 0x90, 0x71, 0x03, 0x54, 0xbe, 0x45, 0xcb, 0xa3,
+0x2d, 0x77, 0xd5, 0xb0, 0xa1, 0x07, 0xfb, 0x9a, 0xe4, 0xa7, 0x0b, 0xbe,
+0xd2, 0x0b, 0x5c, 0x36, 0x05, 0x4e, 0x24, 0x67, 0x50, 0x89, 0xb5, 0x80,
+0xc4, 0x07, 0xf3, 0xc8, 0xe4, 0x1e, 0xc3, 0xfc, 0x8e, 0xb8, 0xf0, 0xd3,
+0x25, 0x6b, 0x9a, 0x47, 0x41, 0x25, 0x75, 0xc5, 0x3d, 0x0f, 0xdb, 0x57,
+0x2e, 0x58, 0x9d, 0x13, 0x6a, 0x00, 0x29, 0x35, 0x10, 0xc6, 0xf0, 0x44,
+0x39, 0xda, 0x3e, 0x05, 0x82, 0xfa, 0x02, 0x98, 0xd1, 0x8e, 0xd8, 0xa8,
+0x37, 0x0f, 0xb7, 0x47, 0x4e, 0x31, 0x22, 0x96, 0xe7, 0x2c, 0xa2, 0xbf,
+0x59, 0xbc, 0x23, 0x09, 0xcc, 0x20, 0xc4, 0x67, 0x75, 0x68, 0xf2, 0x54,
+0xc5, 0x77, 0x45, 0x1c, 0xd9, 0x59, 0x41, 0x8d, 0x2b, 0x29, 0x13, 0xb4,
+0xf7, 0x95, 0x51, 0x58, 0xd1, 0x54, 0x2d, 0xe1, 0xb3, 0xd8, 0x27, 0x3f,
+0xeb, 0xd5, 0x70, 0xc4, 0x70, 0xe4, 0x73, 0x65, 0xb1, 0xc7, 0xed, 0x34,
+0x4e, 0x3b, 0x96, 0xf1, 0x80, 0x55, 0xb7, 0xf4, 0x74, 0x43, 0x08, 0x7a,
+0x83, 0x1c, 0xf4, 0xae, 0x63, 0x0d, 0xbb, 0x12, 0x86, 0x8c, 0x6f, 0x00,
+0xc7, 0x6e, 0xd3, 0x29, 0xec, 0x7e, 0xa9, 0x50, 0xb4, 0x5b, 0x67, 0xd2,
+0xf9, 0x4d, 0x02, 0x8e, 0x92, 0x75, 0x97, 0x46, 0x3b, 0xcd, 0x30, 0xb0,
+0x2d, 0xf3, 0xeb, 0xf5, 0x90, 0x6e, 0x2b, 0x48, 0xd0, 0xc7, 0x27, 0xe2,
+0x13, 0x05, 0x08, 0x63, 0xa6, 0xef, 0x06, 0xa2, 0xdb, 0x28, 0xef, 0x75,
+0xfc, 0x0c, 0xe4, 0x90, 0x94, 0x87, 0x1a, 0xaf, 0x18, 0x25, 0xd3, 0xe5,
+0x5b, 0xf4, 0xbe, 0x0b, 0xb0, 0x40, 0xc6, 0xb1, 0xd2, 0x03, 0xac, 0x4e,
+0x85, 0xbd, 0xe5, 0x48, 0x0d, 0x15, 0x1c, 0x37, 0x36, 0xe2, 0xfc, 0x16,
+0x7c, 0x5e, 0x70, 0x06, 0xd5, 0x99, 0x27, 0x33, 0xcf, 0x37, 0xa1, 0x2c,
+0x4c, 0x50, 0x40, 0xc7, 0x27, 0xe2, 0xd9, 0x47, 0x7c, 0x07, 0xb9, 0x71,
+0x4c, 0x14, 0x51, 0x6b, 0xa9, 0xa8, 0xe4, 0xc9, 0x96, 0x0e, 0x89, 0x14,
+0x41, 0x80, 0x16, 0x2a, 0x41, 0xf2, 0x05, 0x10, 0xd9, 0x8b, 0xc4, 0xe0,
+0xc4, 0x90, 0x53, 0x4a, 0x34, 0x3b, 0x65, 0x74, 0x30, 0xb2, 0xc2, 0xd4,
+0x79, 0xc4, 0x47, 0x92, 0xac, 0x66, 0x7f, 0x0b, 0xf6, 0x85, 0xef, 0xe4,
+0xad, 0x83, 0xd1, 0x4d, 0x4c, 0x2a, 0xc9, 0x3e, 0x40, 0xc7, 0x88, 0x24,
+0x33, 0x32, 0xfe, 0x27, 0xfa, 0x58, 0x65, 0xd6, 0x98, 0x38, 0xe3, 0xf9,
+0x92, 0x5c, 0x64, 0xf9, 0x85, 0xca, 0x31, 0xd0, 0x69, 0xa8, 0xd4, 0xb5,
+0x5d, 0xc8, 0x26, 0xeb, 0x0a, 0x10, 0xc3, 0xaf, 0xc2, 0xd9, 0x0c, 0x19,
+0xe4, 0x57, 0x7c, 0xfd, 0x06, 0x58, 0xe1, 0x77, 0x8a, 0xa9, 0xb0, 0xb3,
+0x91, 0x12, 0xad, 0x9f, 0xc6, 0x6c, 0x31, 0xd1, 0xc5, 0x45, 0xbd, 0xef,
+0x0b, 0xcc, 0xe0, 0xc6, 0xd0, 0x24, 0x33, 0x63, 0xf4, 0x83, 0x11, 0xe3,
+0x29, 0x88, 0x97, 0x29, 0x60, 0xfd, 0x18, 0xf5, 0x64, 0xae, 0x60, 0x5c,
+0x11, 0x42, 0xcf, 0x2d, 0x42, 0xdd, 0x75, 0xe2, 0x4a, 0x0c, 0x05, 0xc0,
+0xc7, 0x28, 0xf3, 0x48, 0xfc, 0xe4, 0xe9, 0xbd, 0xe8, 0xcb, 0xe2, 0x96,
+0xd1, 0x44, 0x43, 0x6d, 0x72, 0x13, 0xdd, 0xd5, 0x25, 0x4d, 0x19, 0xda,
+0xbc, 0xb4, 0xda, 0x2e, 0xc0, 0x5c, 0x6a, 0x72, 0xd0, 0xc4, 0x6f, 0xf0,
+0xc3, 0x86, 0xba, 0x26, 0x40, 0xe5, 0x58, 0xba, 0x16, 0x59, 0xde, 0xbe,
+0x34, 0x12, 0xd6, 0x27, 0x4e, 0x76, 0x84, 0xc1, 0x22, 0xb2, 0xe1, 0x8a,
+0x13, 0x13, 0x79, 0x8a, 0xdb, 0xe0, 0xc6, 0x8f, 0x93, 0x48, 0xf2, 0x69,
+0xe5, 0xa2, 0x79, 0x8d, 0x74, 0x16, 0xa0, 0x93, 0x03, 0x4e, 0x04, 0xa5,
+0xfd, 0x52, 0x93, 0x03, 0x70, 0x3c, 0xae, 0xd1, 0x3f, 0xbe, 0xa8, 0xf9,
+0xe9, 0x8e, 0xf0, 0xc6, 0xa9, 0x11, 0x03, 0xa5, 0x43, 0xcf, 0x58, 0x43,
+0x2e, 0x34, 0x1b, 0xc8, 0x36, 0x6e, 0xa3, 0xed, 0x95, 0x1e, 0x93, 0xc4,
+0x31, 0x17, 0x35, 0x2d, 0xf2, 0x03, 0x40, 0x77, 0x85, 0x29, 0xdd, 0x30,
+0xc3, 0x8f, 0xb0, 0x03, 0xa2, 0xfc, 0xc3, 0xe5, 0x5d, 0x44, 0x06, 0x57,
+0x8a, 0x10, 0x27, 0xe7, 0xb8, 0x26, 0x28, 0xd1, 0x05, 0xf9, 0xb8, 0x77,
+0xad, 0x92, 0x52, 0xf2, 0x76, 0x03, 0xaa, 0x2f, 0x30, 0xc6, 0x89, 0x15,
+0x09, 0xe5, 0x7c, 0x68, 0x6d, 0x28, 0xe6, 0x46, 0xd7, 0x01, 0x4c, 0x79,
+0x6b, 0x64, 0xa4, 0x8e, 0x85, 0x87, 0xbd, 0xbc, 0x60, 0x29, 0xfd, 0x80,
+0x6d, 0x24, 0x16, 0xcb, 0xa8, 0x00, 0xc4, 0x0f, 0xc3, 0x7f, 0x88, 0x1e,
+0xc5, 0x77, 0x88, 0x4f, 0xa2, 0x19, 0x19, 0x09, 0xed, 0x8a, 0x1c, 0xe4,
+0x0d, 0xc4, 0xb3, 0xcd, 0x5a, 0x3c, 0xb2, 0x0c, 0x55, 0x9f, 0x3f, 0x22,
+0x4b, 0xaf, 0x00, 0xc7, 0x30, 0xa7, 0x39, 0x34, 0xa7, 0xe2, 0xa4, 0xfd,
+0xef, 0x60, 0x54, 0xf1, 0x49, 0xd0, 0x52, 0x93, 0x65, 0x2a, 0x48, 0x73,
+0x4f, 0x61, 0xf3, 0x31, 0xf3, 0xf2, 0x74, 0x36, 0x68, 0xea, 0x19, 0xd0,
+0xc5, 0x4f, 0x84, 0x9a, 0x35, 0x5e, 0x26, 0x2e, 0xb2, 0xd8, 0x0f, 0xd8,
+0xd1, 0xbf, 0x6c, 0x94, 0x01, 0xf5, 0x7f, 0x0b, 0x5f, 0xea, 0x8e, 0x76,
+0x2a, 0x33, 0xee, 0xd4, 0x49, 0x67, 0x0a, 0xec, 0xa0, 0xc6, 0xef, 0x42,
+0xda, 0x34, 0x33, 0x49, 0x56, 0xb0, 0xc1, 0x69, 0x56, 0xe0, 0xf8, 0x5a,
+0x2e, 0xa7, 0x46, 0xfa, 0x11, 0xb6, 0x5d, 0x03, 0x58, 0x24, 0xf3, 0xf2,
+0xff, 0x73, 0x7e, 0xcd, 0x11, 0xc0, 0xc6, 0x50, 0x51, 0x63, 0x65, 0x4a,
+0x25, 0x4f, 0xa1, 0x8d, 0xc5, 0xd4, 0xc9, 0x12, 0x61, 0xfb, 0x1f, 0x15,
+0x42, 0xce, 0x6d, 0x01, 0xb9, 0xee, 0x31, 0x82, 0x2e, 0xc5, 0x77, 0x13,
+0x4a, 0x7d, 0x20, 0xc3, 0xb3, 0x06, 0xb3, 0xa2, 0xc6, 0x29, 0xe8, 0xbd,
+0xa4, 0x14, 0xd4, 0x48, 0x80, 0x23, 0x5a, 0x00, 0xa6, 0x29, 0x09, 0xfa,
+0xb6, 0x28, 0xa6, 0xaf, 0x53, 0x63, 0x39, 0xee, 0xd0, 0x8b, 0xaf, 0x80,
+0xc7, 0xb1, 0x02, 0xb3, 0x57, 0x2b, 0xe4, 0x54, 0x3d, 0xe3, 0x0f, 0x14,
+0x89, 0x6a, 0x5b, 0xe6, 0x7c, 0xe5, 0xaf, 0x05, 0xef, 0x04, 0x47, 0x2f,
+0xb3, 0x55, 0x7a, 0x93, 0x13, 0x20, 0x6a, 0x9f, 0x10, 0xc3, 0x8f, 0x54,
+0x09, 0x04, 0x08, 0x65, 0xe6, 0xf2, 0x71, 0x66, 0x10, 0x72, 0xa2, 0xcb,
+0xa3, 0x73, 0x76, 0x93, 0x54, 0x6a, 0xff, 0xae, 0xea, 0x32, 0xa4, 0x19,
+0x84, 0x16, 0x2d, 0x48, 0x69, 0x60, 0xc4, 0x68, 0x70, 0x6f, 0x84, 0xd2,
+0x84, 0x13, 0x5e, 0x0f, 0x85, 0x9b, 0x72, 0x19, 0x15, 0xee, 0x23, 0xe5,
+0x8f, 0xc5, 0xbd, 0xc8, 0xee, 0x8c, 0xaa, 0x85, 0x52, 0xc8, 0x63, 0xab,
+0x6b, 0xa7, 0x70, 0xc7, 0x2f, 0xc3, 0x59, 0x64, 0x29, 0x09, 0x12, 0x69,
+0xe5, 0x93, 0x96, 0x80, 0xef, 0x63, 0xaa, 0x98, 0xb5, 0xfe, 0x5c, 0xa9,
+0x2e, 0xc9, 0x18, 0x2e, 0x62, 0xf1, 0x79, 0xed, 0xf2, 0xeb, 0xf0, 0x90,
+0xc4, 0x29, 0x74, 0x03, 0xa4, 0xc6, 0x63, 0x32, 0x52, 0x83, 0x69, 0x5b,
+0x29, 0x07, 0x45, 0xf4, 0xf8, 0x05, 0x22, 0x53, 0x31, 0xdd, 0xd0, 0x55,
+0x25, 0xc5, 0x42, 0x85, 0x6b, 0xba, 0x4c, 0x05, 0x40, 0xc7, 0x8e, 0xc3,
+0xba, 0x3a, 0x15, 0x04, 0xa1, 0x52, 0x2f, 0x89, 0x16, 0x89, 0x67, 0xce,
+0xc6, 0x58, 0x34, 0xfe, 0x8a, 0x42, 0x7b, 0xdb, 0xe0, 0x34, 0x22, 0xd3,
+0x64, 0xcd, 0x66, 0x0a, 0x78, 0x80, 0xc6, 0x11, 0x55, 0x03, 0x92, 0x69,
+0x04, 0x6d, 0xeb, 0xc2, 0x92, 0xd6, 0x69, 0x7d, 0x2d, 0x4b, 0x2b, 0x85,
+0x88, 0x47, 0x02, 0xc9, 0x1a, 0x51, 0xae, 0x81, 0xef, 0x40, 0x0d, 0xb5,
+0xac, 0xa2, 0x30, 0xc7, 0x2f, 0x90, 0xc3, 0x58, 0x08, 0xe3, 0x55, 0x9c,
+0x10, 0x80, 0x9b, 0xa1, 0x1b, 0x18, 0x8f, 0x4b, 0xc4, 0xf8, 0x93, 0xa9,
+0x95, 0x2f, 0xa4, 0xa2, 0x51, 0x89, 0xc2, 0x99, 0xc7, 0xcb, 0xbe, 0xa0,
+0xc6, 0xf1, 0x95, 0x09, 0xe4, 0x17, 0xa4, 0xc7, 0xc2, 0xd1, 0x4b, 0x5a,
+0xf1, 0xef, 0xe1, 0x22, 0x8c, 0x95, 0xa3, 0x4c, 0x5e, 0xa8, 0x96, 0x07,
+0xa5, 0xc2, 0xe5, 0xe0, 0xf7, 0x85, 0x4b, 0xc7, 0x20, 0xc6, 0xe7, 0x11,
+0x63, 0x05, 0xbf, 0x26, 0xcc, 0xb1, 0xe7, 0x48, 0xd7, 0x91, 0x1b, 0x66,
+0xd0, 0xf7, 0xf5, 0x29, 0x13, 0xf8, 0xd3, 0x0a, 0xc7, 0xb9, 0x82, 0xc7,
+0x15, 0xce, 0x7b, 0x4a, 0xe7, 0xe0, 0xc7, 0xba, 0x47, 0xda, 0x52, 0x63,
+0xe5, 0x2f, 0xae, 0x0b, 0x1f, 0xd3, 0x01, 0x2e, 0xc4, 0x82, 0x9c, 0x15,
+0x2d, 0x49, 0x12, 0x7b, 0x1b, 0xe3, 0x2c, 0xf3, 0x60, 0x54, 0xac, 0xe9,
+0x4a, 0x78, 0xe0, 0xc3, 0xee, 0xa3, 0xf3, 0x76, 0x9a, 0x8b, 0x4e, 0xc8,
+0x16, 0x05, 0x52, 0xe1, 0x3e, 0x55, 0x2c, 0xce, 0x34, 0xfe, 0x0d, 0x65,
+0x99, 0x1f, 0x20, 0xb5, 0x21, 0x4c, 0x93, 0x05, 0xd9, 0x6b, 0x7a, 0xf0,
+0xc7, 0x90, 0xf3, 0x2a, 0x52, 0x53, 0xaa, 0xc7, 0x30, 0x7a, 0x49, 0x9a,
+0x80, 0x99, 0xf0, 0x99, 0x07, 0xf3, 0xf7, 0x51, 0x4a, 0x5e, 0x3b, 0x55,
+0x33, 0x03, 0x5c, 0x8f, 0x6f, 0x61, 0x0c, 0xf5, 0xa0, 0xc4, 0x87, 0x12,
+0xc3, 0xe7, 0x13, 0xc7, 0xdf, 0x1b, 0xa3, 0x2c, 0x17, 0xb9, 0x05, 0xe9,
+0xad, 0xe6, 0xc5, 0x07, 0xd1, 0xed, 0x73, 0xe9, 0xfe, 0x2f, 0x22, 0xdb,
+0x04, 0x20, 0x29, 0xab, 0xbc, 0x70, 0xc7, 0x30, 0xf1, 0x4a, 0x64, 0xbb,
+0x49, 0xaf, 0x0c, 0x80, 0x13, 0x55, 0x09, 0x7f, 0xc7, 0xfe, 0xb8, 0x65,
+0x43, 0x94, 0xdf, 0xf7, 0x81, 0x1d, 0x23, 0x75, 0xfc, 0xfe, 0x48, 0xb1,
+0x2e, 0x14, 0x30, 0xc6, 0xaf, 0x91, 0x43, 0x92, 0xd8, 0x88, 0x44, 0xa6,
+0x1b, 0x91, 0x96, 0x72, 0x1c, 0x6b, 0x03, 0xac, 0x64, 0xe6, 0x4b, 0xc6,
+0x6e, 0x1a, 0xc7, 0xb1, 0xe2, 0x10, 0xfc, 0xa0, 0xcd, 0x6b, 0x26, 0xf0,
+0xc4, 0x10, 0x53, 0x49, 0x34, 0x7d, 0x69, 0x07, 0xea, 0x84, 0x39, 0xd4,
+0x51, 0xbb, 0xdb, 0x22, 0x60, 0xd5, 0x8f, 0x8b, 0x5c, 0xa9, 0x62, 0x0c,
+0xac, 0xd1, 0x17, 0xd9, 0x7c, 0xa5, 0x4b, 0xc6, 0x20, 0xc5, 0x6f, 0xd1,
+0x03, 0xa4, 0x87, 0x23, 0xe8, 0x75, 0x8d, 0x81, 0xd9, 0x00, 0xe4, 0x38,
+0xe8, 0xae, 0x94, 0xf8, 0x88, 0xfe, 0x1f, 0x83, 0xe0, 0x30, 0xd2, 0x09,
+0x6d, 0x2f, 0xcd, 0x6b, 0xd9, 0xf0, 0xc7, 0x30, 0x53, 0x64, 0x0b, 0xef,
+0x46, 0xc1, 0x10, 0xd2, 0xda, 0x14, 0x71, 0x74, 0x0a, 0x33, 0xf9, 0x86,
+0x6c, 0x0a, 0x2c, 0x8a, 0xf9, 0xd7, 0xa6, 0xf2, 0xae, 0x24, 0x8d, 0x26,
+0xe8, 0xb6, 0x10, 0xc4, 0x89, 0x02, 0xf3, 0xc2, 0xfc, 0xa3, 0x1b, 0xa5,
+0xed, 0x8d, 0x1c, 0xd1, 0x18, 0x57, 0x90, 0x83, 0x44, 0x24, 0xeb, 0x8b,
+0xf4, 0x8b, 0x1c, 0x2c, 0xe3, 0x9a, 0x43, 0x4d, 0x4a, 0xab, 0x34, 0xd0,
+0xc7, 0x33, 0x27, 0x3a, 0x37, 0x07, 0xc5, 0xd2, 0x93, 0xb2, 0x6c, 0x15,
+0x42, 0x56, 0xe3, 0x9e, 0x26, 0xe5, 0xff, 0x45, 0x12, 0xd5, 0x1e, 0x4b,
+0xaf, 0x77, 0x50, 0x8b, 0xff, 0xd5, 0xca, 0xa3, 0xa0, 0xc6, 0xe9, 0x43,
+0xb3, 0x62, 0xc8, 0x0a, 0x9a, 0x46, 0xfa, 0x72, 0x94, 0xf0, 0xce, 0x84,
+0x3a, 0x2b, 0xa6, 0xa0, 0x07, 0x81, 0x73, 0x99, 0x4a, 0xa9, 0x23, 0xc1,
+0x7b, 0xad, 0xd5, 0xaa, 0xb2, 0xb0, 0xc4, 0x0f, 0x43, 0x5a, 0x35, 0x7c,
+0x86, 0x42, 0xbb, 0x99, 0xa1, 0x99, 0xb9, 0x26, 0x79, 0x49, 0x62, 0x74,
+0xc7, 0x99, 0xcf, 0xb0, 0x2f, 0xc8, 0x2b, 0x21, 0x12, 0x1d, 0x0a, 0x30,
+0x4b, 0x71, 0x00, 0xc7, 0xb0, 0x44, 0x18, 0xc2, 0xfb, 0xa9, 0x86, 0xcd,
+0x75, 0x4e, 0x12, 0xd0, 0xe0, 0x85, 0x6d, 0xfa, 0xa6, 0x5c, 0x47, 0x22,
+0xa2, 0x5a, 0x71, 0xaf, 0x33, 0x32, 0xd8, 0xd9, 0x9e, 0xab, 0xaa, 0x50,
+0xc6, 0xe7, 0x62, 0x39, 0xea, 0x33, 0xe8, 0x48, 0x1e, 0x9b, 0xec, 0x14,
+0x21, 0x54, 0x1c, 0x48, 0x95, 0xa5, 0x27, 0x8d, 0x29, 0xf3, 0x30, 0x44,
+0xa9, 0xe3, 0x25, 0x92, 0x50, 0x77, 0x4a, 0x86, 0xa0, 0xc7, 0x30, 0xf1,
+0x03, 0x72, 0x52, 0x8e, 0xba, 0xb5, 0x24, 0x48, 0x98, 0xf9, 0x08, 0x44,
+0x83, 0xaf, 0x96, 0x13, 0xc8, 0xcf, 0xd6, 0x3f, 0xdc, 0xa5, 0xf2, 0xf0,
+0xbc, 0x7e, 0x7d, 0xcd, 0xf7, 0xe0, 0xc4, 0x67, 0xe3, 0x33, 0x85, 0x45,
+0xe2, 0x5d, 0xba, 0xbd, 0x83, 0xd3, 0x83, 0x23, 0xec, 0x7e, 0x45, 0x35,
+0x7f, 0xcc, 0x95, 0x4a, 0xea, 0x64, 0x2e, 0x53, 0xeb, 0x6f, 0xfb, 0xba,
+0xca, 0x6d, 0x40, 0xc6, 0x30, 0x31, 0x03, 0xc5, 0x7b, 0xe3, 0xfe, 0x05,
+0x2c, 0xcf, 0x57, 0x62, 0x16, 0x0f, 0x7f, 0xc8, 0x94, 0xf9, 0x4d, 0x05,
+0xe0, 0x52, 0x73, 0x2e, 0x32, 0x09, 0x05, 0x0a, 0x3a, 0xab, 0xc9, 0x50,
+0xc3, 0x87, 0x66, 0xb3, 0xf4, 0x3c, 0x67, 0xa4, 0xc7, 0x38, 0x3b, 0x55,
+0x18, 0xdf, 0xbe, 0xc9, 0xd2, 0x54, 0xbe, 0xd0, 0x4d, 0xaf, 0xbf, 0x15,
+0x2c, 0xd1, 0x74, 0x7a, 0x15, 0x60, 0x0d, 0x74, 0x80, 0xc6, 0x91, 0x42,
+0xb3, 0xa5, 0x8b, 0xe3, 0x29, 0xde, 0x3d, 0x29, 0x54, 0x81, 0x4e, 0x2d,
+0x48, 0x3c, 0x15, 0x13, 0xc9, 0xce, 0xe9, 0x8d, 0x06, 0xaf, 0x04, 0xe4,
+0x1e, 0x5a, 0x58, 0x6b, 0x77, 0xd0, 0xc5, 0x67, 0x31, 0x0a, 0x22, 0xc6,
+0xa3, 0x77, 0xde, 0x92, 0xf6, 0x58, 0xfa, 0x10, 0xff, 0xb1, 0x5b, 0x25,
+0x30, 0xc7, 0xe1, 0xc5, 0x4f, 0x8b, 0x1c, 0xd5, 0x6d, 0xa3, 0xd5, 0x8e,
+0x8d, 0x30, 0x40, 0xc7, 0x30, 0xc3, 0xb9, 0x48, 0xdc, 0x4d, 0x0a, 0xc0,
+0xc5, 0x4e, 0x5b, 0x11, 0xd6, 0xf7, 0x9b, 0xe6, 0xe4, 0x92, 0x0b, 0x4f,
+0xc2, 0x52, 0x1f, 0x2e, 0x44, 0x7f, 0x51, 0xbb, 0x32, 0x27, 0x85, 0x10,
+0xc6, 0xe7, 0xf3, 0x23, 0xa0, 0x91, 0xb4, 0xd5, 0x9a, 0xa0, 0xdc, 0xdd,
+0x11, 0x01, 0xa4, 0xc8, 0x6e, 0x65, 0x7b, 0xc9, 0x2f, 0xa1, 0xb9, 0x12,
+0x29, 0xa1, 0x26, 0x99, 0xbd, 0x16, 0xeb, 0x30, 0x10, 0xc4, 0x6f, 0x83,
+0x54, 0x5a, 0x3e, 0x25, 0xa0, 0x19, 0xc3, 0xad, 0x53, 0x11, 0x1e, 0x15,
+0xe4, 0x1b, 0x95, 0x8a, 0x85, 0x86, 0xde, 0x10, 0x23, 0x31, 0x92, 0x3a,
+0xb7, 0x95, 0x5e, 0xc9, 0xc8, 0xc0, 0xc4, 0x67, 0xf1, 0x0a, 0x12, 0xd9,
+0x32, 0x6b, 0xbd, 0x1f, 0x00, 0xd8, 0x40, 0xb9, 0x2e, 0x7a, 0x2f, 0x44,
+0xf7, 0x89, 0x07, 0xbd, 0x17, 0x23, 0x2b, 0x02, 0x60, 0x5d, 0x41, 0xb4,
+0x4d, 0x18, 0x00, 0xc7, 0x2f, 0x53, 0x64, 0x52, 0x7e, 0x87, 0x2f, 0x15,
+0x81, 0x56, 0x54, 0x71, 0x13, 0x60, 0x3f, 0x05, 0x54, 0xfa, 0x85, 0x13,
+0x7d, 0x9e, 0x67, 0x2f, 0x33, 0x45, 0xdd, 0x3e, 0x82, 0x0a, 0x6d, 0x00,
+0xc4, 0x08, 0x71, 0x0f, 0xc9, 0x56, 0x07, 0xeb, 0xe8, 0xcc, 0x6a, 0x1a,
+0xd8, 0xce, 0x7a, 0x07, 0x64, 0x35, 0x8f, 0x10, 0xda, 0x7c, 0x23, 0xed,
+0x2b, 0x02, 0xd9, 0x44, 0xca, 0x2b, 0xc9, 0x5d, 0x60, 0xc6, 0xf0, 0xa4,
+0x33, 0xf2, 0xe9, 0xe5, 0xde, 0xd1, 0x8e, 0xd7, 0x98, 0x62, 0x1c, 0x27,
+0x20, 0x9e, 0x95, 0xff, 0x91, 0x62, 0xcd, 0xd3, 0x45, 0x25, 0x02, 0x65,
+0x7a, 0x06, 0xc8, 0x2b, 0xd5, 0xd0, 0xc6, 0xa7, 0x73, 0x43, 0x54, 0x3c,
+0xc4, 0xaf, 0xcb, 0x0c, 0xf0, 0xd9, 0x02, 0x58, 0x7b, 0x65, 0x99, 0x24,
+0x72, 0xc8, 0x8a, 0x37, 0xa8, 0xf0, 0x2d, 0x42, 0xfc, 0x48, 0x41, 0xb6,
+0x49, 0x28, 0x00, 0xc3, 0x90, 0xb1, 0x0b, 0x84, 0xe3, 0x42, 0x8d, 0x5f,
+0xf8, 0x9c, 0xd9, 0x04, 0x3d, 0x70, 0x2b, 0x15, 0xa5, 0x8d, 0x0b, 0xbe,
+0xb8, 0x18, 0x92, 0x2b, 0x03, 0xc5, 0x90, 0x04, 0xc2, 0xa9, 0xa0, 0x90,
+0xc7, 0x8e, 0xd3, 0xe2, 0x9c, 0xca, 0x82, 0x39, 0x41, 0x64, 0xbf, 0x18,
+0x81, 0xf8, 0x95, 0x36, 0x7d, 0xb5, 0x11, 0x09, 0xfc, 0xed, 0x2e, 0x95,
+0xaf, 0x51, 0x1d, 0xce, 0x00, 0x24, 0x28, 0xe6, 0x10, 0xc6, 0x90, 0x02,
+0x1a, 0x55, 0x9f, 0x02, 0x78, 0x9d, 0xa7, 0xe0, 0x95, 0x9a, 0x82, 0x00,
+0x7b, 0x75, 0x46, 0x0a, 0xcf, 0x04, 0x6a, 0x11, 0x5d, 0x23, 0x22, 0xae,
+0x07, 0x9f, 0x2d, 0x8a, 0x15, 0x60, 0xc7, 0x27, 0xe4, 0x13, 0x05, 0x4e,
+0x02, 0x1c, 0x9e, 0xee, 0x36, 0x17, 0x9a, 0x97, 0x20, 0x2c, 0xe6, 0x05,
+0x12, 0x4d, 0x96, 0x7a, 0xa4, 0xc3, 0x26, 0xb4, 0x6f, 0xa1, 0x39, 0x2a,
+0xac, 0x00, 0x50, 0xc4, 0x0f, 0xd0, 0xc8, 0xfc, 0x35, 0xa7, 0x10, 0xce,
+0x6d, 0x26, 0x52, 0x32, 0xbf, 0x50, 0x7c, 0x01, 0xa5, 0x51, 0x8f, 0x29,
+0x5f, 0x42, 0x46, 0x26, 0x12, 0xa0, 0x0a, 0xab, 0x46, 0x6b, 0x85, 0x90,
+0xc6, 0x0f, 0xc4, 0x32, 0x94, 0xd0, 0x82, 0x4f, 0xd4, 0x69, 0x31, 0x92,
+0xee, 0x4a, 0x14, 0x82, 0xdc, 0x05, 0xfd, 0x0f, 0xf1, 0x4b, 0x45, 0x6c,
+0x26, 0x02, 0xe3, 0x20, 0x40, 0x79, 0x0c, 0x1c, 0xe0, 0xc4, 0x10, 0x43,
+0x3a, 0x2c, 0x2c, 0xb3, 0x11, 0xde, 0x1d, 0xb4, 0xd2, 0xb1, 0x1f, 0xe5,
+0x76, 0xd6, 0x96, 0x30, 0xcb, 0xe8, 0x43, 0xf0, 0x72, 0x23, 0x73, 0x20,
+0xfc, 0xab, 0xca, 0xca, 0xc9, 0xc0, 0xc6, 0x10, 0x04, 0x33, 0x94, 0xcd,
+0x27, 0xd3, 0x49, 0x21, 0xb4, 0x17, 0xb9, 0x06, 0x9b, 0xe7, 0x68, 0x85,
+0x1d, 0xd0, 0x53, 0xab, 0x47, 0x00, 0x32, 0x01, 0x12, 0xc5, 0xfe, 0x2c,
+0xca, 0x91, 0x40, 0xc4, 0x0f, 0xd3, 0x03, 0xc4, 0x34, 0x27, 0x0b, 0x55,
+0xbc, 0x35, 0xd5, 0x9a, 0xaf, 0x13, 0xea, 0x34, 0x65, 0x7e, 0x10, 0x4b,
+0xd6, 0xdb, 0x99, 0xa9, 0xc3, 0x76, 0x19, 0x85, 0xf2, 0xac, 0x32, 0x90,
+0xc5, 0x67, 0x34, 0x23, 0x64, 0x06, 0xc4, 0xd3, 0x5b, 0x07, 0xb5, 0x93,
+0x28, 0xe4, 0x60, 0x0e, 0x59, 0xb5, 0xc3, 0xd5, 0xb0, 0x59, 0xee, 0xf5,
+0x2e, 0xc2, 0x8f, 0x91, 0x5c, 0xc4, 0x89, 0xec, 0x80, 0xc4, 0x70, 0xe3,
+0x79, 0x76, 0x8c, 0xc3, 0x60, 0x48, 0x77, 0xd5, 0xd4, 0x39, 0x27, 0xbd,
+0x3d, 0x23, 0x35, 0x1c, 0x8b, 0xad, 0xda, 0xa8, 0xd7, 0xa9, 0xf2, 0x44,
+0xcc, 0xcb, 0xd8, 0xeb, 0x67, 0xd0, 0xc7, 0x8f, 0x90, 0x44, 0x03, 0x5c,
+0x2a, 0x56, 0x91, 0x8f, 0xea, 0xd1, 0xb1, 0x0f, 0xf5, 0x05, 0x0a, 0x45,
+0x91, 0x87, 0xc1, 0x7e, 0x4e, 0x6e, 0x2d, 0x43, 0x19, 0x30, 0x3d, 0xc9,
+0xcc, 0x2c, 0xe0, 0xc3, 0xe7, 0xe7, 0xd3, 0x55, 0x7f, 0x68, 0x78, 0x43,
+0x99, 0x92, 0xd6, 0xe0, 0xbf, 0xe1, 0x8c, 0x7d, 0xd3, 0xfd, 0xc7, 0x58,
+0x8b, 0x78, 0xb4, 0xb3, 0x83, 0x8d, 0x12, 0xc3, 0xbd, 0xca, 0xef, 0x60,
+0xc4, 0x10, 0x30, 0x69, 0x36, 0x3b, 0x02, 0x11, 0x5b, 0xd5, 0x3e, 0x59,
+0xba, 0x65, 0xe0, 0x52, 0x02, 0x14, 0x12, 0x85, 0x47, 0x99, 0x5f, 0xeb,
+0xb7, 0x41, 0x1b, 0x0b, 0x4e, 0x8d, 0x89, 0x7b, 0x60, 0xc6, 0xe7, 0xe2,
+0xdf, 0x93, 0xff, 0xcf, 0xc2, 0xe9, 0x0b, 0x22, 0xd4, 0xe3, 0x48, 0x20,
+0x35, 0x8a, 0x76, 0xfb, 0x8d, 0xa5, 0xc9, 0x68, 0x59, 0xa8, 0xf2, 0x70,
+0x20, 0x83, 0x31, 0x28, 0x63, 0x30, 0xc4, 0xb0, 0x24, 0x33, 0x94, 0x11,
+0xd4, 0x09, 0x8d, 0x0d, 0xb4, 0x18, 0x69, 0x5f, 0xca, 0x8c, 0xa6, 0x24,
+0xf6, 0x89, 0x81, 0x7e, 0xc7, 0xe3, 0x2f, 0x44, 0x67, 0xa6, 0x12, 0x68,
+0x2a, 0x19, 0xd0, 0xc5, 0x0f, 0xc2, 0xd3, 0x85, 0x95, 0x26, 0xb0, 0x86,
+0x63, 0x12, 0x52, 0x48, 0xb7, 0xb1, 0xea, 0x5c, 0x25, 0x23, 0x4e, 0x60,
+0x6e, 0x99, 0xa7, 0x31, 0x62, 0x98, 0xf6, 0x5e, 0xf1, 0xc9, 0x3d, 0xa0,
+0xcf, 0x90, 0x52, 0x09, 0x35, 0x7c, 0x22, 0xcb, 0x84, 0x86, 0xaa, 0xd9,
+0x11, 0x53, 0xdc, 0x14, 0x86, 0x15, 0x56, 0x84, 0x57, 0xf8, 0xa9, 0x67,
+0x26, 0xd2, 0x19, 0x22, 0xd8, 0xe0, 0x4c, 0x7c, 0x80, 0xc6, 0xcf, 0x93,
+0x42, 0xc3, 0xbb, 0x84, 0x1b, 0x4f, 0xe4, 0x57, 0x91, 0xb9, 0x02, 0x37,
+0x7a, 0x42, 0x26, 0x10, 0x07, 0x45, 0x9a, 0xf5, 0xa4, 0x2a, 0x84, 0x18,
+0x4f, 0x1b, 0xcf, 0xe9, 0x1d, 0xf0, 0xcf, 0x89, 0x03, 0x59, 0xeb, 0x68,
+0x46, 0x92, 0xe0, 0xa7, 0x98, 0x56, 0xf1, 0xc7, 0x42, 0x08, 0xf3, 0x56,
+0x12, 0x48, 0x3b, 0xb7, 0x32, 0x47, 0x2b, 0x82, 0x43, 0xb7, 0x46, 0x57,
+0xaa, 0x45, 0xb0, 0xc6, 0x13, 0x24, 0x12, 0xf4, 0x74, 0xe5, 0x2f, 0x1a,
+0x21, 0x1e, 0xd2, 0xaa, 0x66, 0x64, 0x82, 0x26, 0x64, 0x98, 0x49, 0xf7,
+0x07, 0x88, 0x2c, 0x36, 0x31, 0x2d, 0xf4, 0xbd, 0x8f, 0x08, 0x2c, 0x60,
+0xc6, 0x90, 0x52, 0xa9, 0x9b, 0xfb, 0x02, 0x51, 0x72, 0x54, 0x80, 0xd9,
+0x25, 0xff, 0xbb, 0x76, 0x57, 0x95, 0x08, 0xc0, 0xe1, 0xc3, 0xe3, 0xa9,
+0xa2, 0x15, 0xc2, 0x6c, 0xac, 0x1f, 0x2c, 0xda, 0x70, 0xc7, 0x30, 0x04,
+0x12, 0xc4, 0x49, 0x29, 0x09, 0xe3, 0x14, 0x5f, 0x56, 0x18, 0x87, 0x1c,
+0xe4, 0x67, 0xf4, 0xc6, 0x49, 0x80, 0xd2, 0x99, 0xc4, 0xa6, 0xa6, 0x98,
+0x63, 0xf5, 0xdc, 0x0a, 0xf6, 0xc0, 0xc6, 0x90, 0x27, 0xd9, 0x72, 0x46,
+0x82, 0x40, 0xb2, 0x8e, 0x0e, 0x97, 0x70, 0x95, 0xef, 0x13, 0x40, 0x95,
+0xe2, 0x48, 0x3c, 0x84, 0x68, 0x4c, 0x24, 0xd6, 0x43, 0x76, 0x0d, 0x65,
+0x2b, 0xe4, 0xb0, 0xc6, 0x47, 0xe4, 0x13, 0x6a, 0x12, 0x84, 0x11, 0x7a,
+0x22, 0x4e, 0x93, 0x0a, 0xb4, 0x7e, 0x6a, 0x85, 0x94, 0x7b, 0xcb, 0x9b,
+0x4d, 0x0b, 0x7e, 0xad, 0xc3, 0x85, 0x43, 0x37, 0x31, 0x4a, 0xff, 0x20,
+0xc7, 0x30, 0x33, 0xa9, 0xd4, 0x1e, 0xa9, 0x9a, 0x1e, 0x55, 0xd7, 0x54,
+0x12, 0x4a, 0x93, 0x83, 0xa3, 0xd6, 0x7b, 0xcd, 0xc7, 0x1c, 0x97, 0x6d,
+0xa1, 0x43, 0x25, 0x3e, 0x0c, 0x7f, 0x4b, 0xde, 0xe0, 0xc6, 0x09, 0x11,
+0x03, 0xe6, 0xbc, 0xc5, 0x89, 0x35, 0x7a, 0xf9, 0x14, 0x8a, 0x79, 0x4c,
+0x19, 0x00, 0xe5, 0x15, 0x46, 0xcf, 0x14, 0xaa, 0x61, 0xa5, 0x91, 0x70,
+0xf7, 0xca, 0xca, 0xec, 0xab, 0xd0, 0xcf, 0x90, 0x02, 0xda, 0x32, 0x8c,
+0x44, 0x84, 0x54, 0x42, 0xee, 0x14, 0x00, 0xd2, 0xfb, 0x8f, 0x9a, 0xa5,
+0xfb, 0x4b, 0xb6, 0xcc, 0x60, 0xe5, 0x24, 0x34, 0x07, 0xc2, 0x2d, 0x98,
+0x09, 0x8c, 0x40, 0xc7, 0x10, 0x51, 0x03, 0x05, 0x88, 0x43, 0x53, 0x4c,
+0x25, 0xc5, 0x59, 0x79, 0x99, 0xf1, 0x2e, 0xe4, 0xa3, 0xf9, 0xce, 0xeb,
+0x02, 0x7c, 0xe1, 0xad, 0xf2, 0x29, 0xff, 0x55, 0x68, 0xc9, 0xaa, 0xc0,
+0xc6, 0xf1, 0x73, 0x69, 0xe4, 0x1f, 0xea, 0xca, 0xf6, 0x90, 0x1a, 0xd4,
+0x8a, 0xe8, 0x64, 0x18, 0x27, 0xd6, 0xfa, 0xcf, 0xf3, 0x0d, 0x35, 0x2b,
+0x26, 0x75, 0x33, 0x3f, 0x83, 0x08, 0xaa, 0xd9, 0x50, 0xc6, 0x87, 0xef,
+0xa3, 0x96, 0x9b, 0x04, 0x02, 0x4e, 0x77, 0xd2, 0x4e, 0x70, 0x48, 0xe5,
+0x95, 0x9a, 0x05, 0x8e, 0xcf, 0xbc, 0xb2, 0xdb, 0xde, 0xb0, 0x51, 0x40,
+0x36, 0x2e, 0x9a, 0x6b, 0x37, 0x50, 0xc7, 0x30, 0x32, 0xca, 0x23, 0x3d,
+0x82, 0x72, 0x70, 0x29, 0xae, 0x94, 0xa2, 0x20, 0x10, 0x46, 0x66, 0x95,
+0xc1, 0x8d, 0x4c, 0xb2, 0x88, 0x7c, 0xa8, 0x31, 0x4c, 0x7a, 0xa4, 0xde,
+0xaa, 0xee, 0xd0, 0xc6, 0x48, 0x6f, 0xc8, 0xcb, 0xd2, 0xc6, 0xe9, 0xa2,
+0xde, 0x90, 0x14, 0x9b, 0xd5, 0x92, 0x0e, 0x64, 0x05, 0x5e, 0x49, 0x68,
+0x9d, 0xb1, 0x30, 0xae, 0x12, 0x46, 0xa5, 0x8d, 0x63, 0xca, 0x1a, 0xa0,
+0xc7, 0x27, 0x62, 0xd3, 0xa2, 0xe0, 0x63, 0x3c, 0xcd, 0xe3, 0x70, 0x93,
+0xa2, 0x33, 0xe3, 0x07, 0xb9, 0x35, 0x09, 0xcb, 0xe1, 0x8c, 0xb2, 0x23,
+0xae, 0x80, 0x98, 0x61, 0x64, 0xd2, 0x8a, 0x4a, 0x80, 0xc5, 0x50, 0x52,
+0x09, 0x45, 0x4d, 0xc2, 0x10, 0x2f, 0xab, 0x5a, 0x95, 0x29, 0xae, 0x1d,
+0x4a, 0x60, 0x64, 0x8f, 0x42, 0x94, 0x32, 0xe6, 0xc7, 0x2e, 0xd1, 0xbe,
+0x00, 0x1a, 0x4b, 0xea, 0x05, 0xf0, 0xc7, 0x30, 0xd1, 0x03, 0x95, 0x65,
+0xc7, 0x9a, 0xe2, 0xfa, 0x0e, 0x15, 0x72, 0x6c, 0xff, 0x1b, 0x75, 0xc5,
+0xc9, 0x11, 0x89, 0x2b, 0x4f, 0xc3, 0xa4, 0xd3, 0xdc, 0x33, 0x55, 0xee,
+0x2a, 0xb2, 0xd0, 0xc4, 0x67, 0xa2, 0xdf, 0x94, 0x0a, 0xe8, 0x1f, 0x6f,
+0xea, 0xa2, 0x17, 0x08, 0xe9, 0xb5, 0x6f, 0xee, 0xa4, 0x9a, 0x28, 0x75,
+0x46, 0xc1, 0x87, 0x33, 0x32, 0xdb, 0xb3, 0x17, 0xc4, 0xe9, 0x95, 0x90,
+0xc6, 0xf0, 0x31, 0x04, 0x03, 0x4c, 0xe1, 0xbd, 0x43, 0xdf, 0xba, 0x54,
+0xda, 0x02, 0x64, 0x99, 0x7c, 0x25, 0x18, 0x95, 0x8a, 0xcb, 0xdc, 0x20,
+0x28, 0xc2, 0x2f, 0x37, 0x0f, 0x0a, 0xa9, 0x29, 0x50, 0xc7, 0x27, 0xa7,
+0xd9, 0xea, 0x0f, 0x73, 0x1f, 0xb9, 0x6e, 0x05, 0x17, 0xc8, 0xbd, 0x4b,
+0x3c, 0x32, 0x84, 0x93, 0x20, 0xf5, 0x26, 0xfa, 0xf1, 0x2e, 0x71, 0x5d,
+0xca, 0xde, 0x36, 0x69, 0xa9, 0x10, 0xc8, 0xb0, 0xb0, 0x63, 0x0c, 0x7d,
+0x30, 0xbc, 0xb2, 0xe4, 0xa1, 0x95, 0x01, 0x67, 0xb8, 0x80, 0x23, 0x75,
+0x5a, 0xd6, 0x83, 0x00, 0x6f, 0xea, 0x2b, 0x56, 0x99, 0x00, 0x7c, 0xbc,
+0x4a, 0x78, 0x40, 0xc7, 0x8f, 0xc1, 0xb9, 0x95, 0xb4, 0xc3, 0xee, 0x5f,
+0xe8, 0x57, 0x94, 0x89, 0x3c, 0x0c, 0xb1, 0x61, 0xd5, 0x81, 0xc2, 0x44,
+0xff, 0xdc, 0xea, 0xac, 0x93, 0x7f, 0xb4, 0x40, 0x65, 0xa7, 0xea, 0xb0,
+0xc4, 0x70, 0x44, 0xb3, 0xac, 0xde, 0x69, 0xe2, 0x45, 0x2b, 0x12, 0xdb,
+0x79, 0x98, 0x9c, 0x31, 0x4b, 0x85, 0x64, 0x86, 0x4d, 0xe7, 0x95, 0xe8,
+0x9d, 0xb1, 0x84, 0x4d, 0xdf, 0x77, 0x2b, 0x9b, 0xb0, 0xc7, 0x8f, 0x66,
+0xb3, 0xf8, 0x48, 0x90, 0xdd, 0xac, 0x02, 0x43, 0xd6, 0x71, 0x36, 0x2b,
+0xd4, 0x66, 0x15, 0xf5, 0x12, 0x2f, 0xc5, 0x22, 0x7e, 0xad, 0x52, 0x64,
+0x90, 0x78, 0xa4, 0x2a, 0x4e, 0x10, 0xc5, 0x8f, 0x91, 0x0a, 0x22, 0x6c,
+0x2a, 0xe8, 0x47, 0xf1, 0xb1, 0x16, 0xc8, 0x89, 0x3d, 0xb0, 0x3d, 0x14,
+0x7d, 0x0b, 0xed, 0xd3, 0x99, 0x69, 0xa9, 0x02, 0xe3, 0x0b, 0xdf, 0x62,
+0x0b, 0x7b, 0x80, 0xc7, 0x29, 0x04, 0x32, 0xf5, 0x8a, 0xc9, 0x21, 0x4b,
+0x79, 0x33, 0x96, 0xe9, 0x78, 0xe2, 0xd6, 0x97, 0x86, 0x4f, 0xcb, 0x30,
+0x44, 0x9d, 0xff, 0x9c, 0xf2, 0x2c, 0x5e, 0x1d, 0x79, 0xcc, 0xbe, 0xe0,
+0xc4, 0x2f, 0x43, 0xfb, 0xdc, 0x1b, 0x89, 0x3d, 0xa3, 0x82, 0xd6, 0x94,
+0xe9, 0x7e, 0x6d, 0x76, 0x7e, 0xa5, 0x27, 0x13, 0x28, 0xf8, 0x83, 0x43,
+0x29, 0x92, 0xce, 0x3a, 0x94, 0xf0, 0x6b, 0x90, 0x90, 0xc6, 0xa8, 0xe6,
+0xb3, 0x63, 0xad, 0x88, 0x05, 0x53, 0x94, 0x0c, 0x95, 0x50, 0xf1, 0x39,
+0x70, 0x9b, 0x85, 0x1b, 0x0a, 0xf8, 0x78, 0x08, 0x07, 0x2e, 0x12, 0x7f,
+0xf8, 0x83, 0x55, 0x88, 0xa5, 0xa0, 0xc3, 0x90, 0x51, 0x69, 0xeb, 0x92,
+0x85, 0x40, 0x47, 0x60, 0xb0, 0x16, 0x80, 0xc5, 0xa1, 0x89, 0xe1, 0x25,
+0x77, 0x08, 0xe4, 0xb9, 0x53, 0x69, 0x30, 0xe5, 0x14, 0xcd, 0xfa, 0xf0,
+0x68, 0x19, 0x90, 0xc5, 0x6f, 0xb2, 0x03, 0x22, 0xed, 0xc4, 0x7f, 0xe7,
+0x90, 0xa4, 0x97, 0x0a, 0x4b, 0xb2, 0xb7, 0xb4, 0xd6, 0x17, 0x08, 0xca,
+0x9f, 0xcd, 0xa0, 0x26, 0x06, 0xbd, 0x3f, 0x71, 0x37, 0xeb, 0xf8, 0x30,
+0xc7, 0x90, 0xf4, 0x29, 0x96, 0xbe, 0xa7, 0x0b, 0xf6, 0x1f, 0xe9, 0x14,
+0xd8, 0xf7, 0x20, 0xc0, 0x7f, 0xa4, 0x95, 0x4f, 0x45, 0xef, 0x1d, 0xc9,
+0x2e, 0xf2, 0x22, 0xa3, 0xea, 0x1b, 0x49, 0xb1, 0x60, 0xc3, 0xa7, 0x02,
+0xd3, 0xa4, 0x07, 0x82, 0x4f, 0xfc, 0x5b, 0xe4, 0x95, 0x88, 0xe5, 0x8b,
+0x70, 0x21, 0xd5, 0xfc, 0x49, 0x76, 0xf0, 0x8b, 0x45, 0xa7, 0x16, 0xa2,
+0x65, 0xcc, 0x42, 0xc7, 0xf6, 0x80, 0xc4, 0x69, 0x11, 0x0a, 0x34, 0x9a,
+0xf0, 0x57, 0x76, 0x7e, 0xfe, 0x98, 0xf2, 0x7d, 0x9f, 0x68, 0xe9, 0x36,
+0x21, 0xd1, 0x1a, 0x05, 0xab, 0x30, 0x26, 0x42, 0x42, 0xfa, 0x62, 0x3f,
+0x2b, 0x79, 0x70, 0xc7, 0x8e, 0xb3, 0x09, 0x47, 0x06, 0x43, 0x64, 0x42,
+0x1b, 0x15, 0x14, 0xa8, 0xf1, 0x6c, 0x8c, 0x08, 0x05, 0x26, 0xcb, 0x62,
+0x9a, 0xcb, 0x3f, 0xa9, 0x22, 0xb9, 0x39, 0xf5, 0x70, 0xa9, 0x3e, 0x90,
+0xc3, 0xb0, 0xe4, 0x99, 0xd4, 0xb8, 0xa4, 0xbb, 0x40, 0x63, 0xcf, 0xd4,
+0xf8, 0xb9, 0x8f, 0xe6, 0xdd, 0xb5, 0xf7, 0x08, 0x8f, 0x87, 0xf5, 0x5e,
+0x2f, 0x75, 0x07, 0xbb, 0xd4, 0x3d, 0x6a, 0xd4, 0x70, 0xc6, 0xe7, 0xb5,
+0x08, 0xbb, 0x46, 0x27, 0xf8, 0x88, 0xcb, 0xa7, 0x14, 0xd1, 0x6f, 0x74,
+0x18, 0xbf, 0x95, 0xb0, 0x8b, 0xb3, 0x81, 0x85, 0x48, 0x23, 0x54, 0x65,
+0x49, 0x03, 0xb7, 0x6d, 0xd1, 0x30, 0xc4, 0x6f, 0xd0, 0xc3, 0x83, 0xdf,
+0x06, 0xe1, 0x5c, 0x05, 0x74, 0x97, 0x11, 0xe8, 0x5c, 0xac, 0xc6, 0xb4,
+0x7c, 0x04, 0xc7, 0x7b, 0xb8, 0x16, 0x2e, 0xd2, 0xbb, 0x03, 0xee, 0x6d,
+0x4b, 0xe5, 0xe0, 0xc4, 0x10, 0x42, 0x39, 0x94, 0x09, 0x84, 0xc3, 0x73,
+0x37, 0xf6, 0xd5, 0x61, 0x69, 0x23, 0x7c, 0xbf, 0x85, 0x7a, 0x04, 0xdc,
+0x13, 0xe6, 0x95, 0x25, 0xe2, 0x38, 0xb3, 0xf2, 0x86, 0x4a, 0x85, 0x00,
+0xc4, 0x70, 0x2f, 0x63, 0x65, 0x62, 0x82, 0x4a, 0x77, 0xd1, 0x84, 0x55,
+0xc3, 0x79, 0xaf, 0x5c, 0xf1, 0x16, 0x35, 0x0b, 0x73, 0xc6, 0x58, 0x77,
+0xaa, 0x03, 0x72, 0x2d, 0x3b, 0x05, 0xc7, 0x6f, 0x20, 0xc6, 0xa7, 0xe2,
+0xd9, 0x94, 0x0a, 0xc3, 0x7e, 0xa9, 0xbb, 0x1b, 0xd9, 0x01, 0x02, 0x24,
+0xbb, 0x7d, 0xf4, 0x9e, 0x15, 0x6a, 0x21, 0xb8, 0xd9, 0x2c, 0xa0, 0x1a,
+0xb4, 0x7e, 0x67, 0x8a, 0xe1, 0xa0, 0xc4, 0x0f, 0x52, 0xaf, 0x96, 0x96,
+0x8b, 0x90, 0x52, 0x4f, 0x64, 0x52, 0xb2, 0x46, 0xea, 0x6c, 0xc4, 0x05,
+0x56, 0xd1, 0xa8, 0xd7, 0xed, 0x59, 0x2a, 0x03, 0x61, 0xbb, 0xc3, 0xa7,
+0x4b, 0x31, 0x20, 0xc6, 0xa9, 0x11, 0x48, 0xc2, 0x45, 0x86, 0x56, 0x2c,
+0xb8, 0x31, 0x17, 0xa1, 0xff, 0x60, 0xce, 0x80, 0x04, 0xf4, 0x8a, 0xb8,
+0x60, 0x45, 0xfe, 0xaa, 0x64, 0x00, 0x5b, 0x5b, 0x38, 0x49, 0x1f, 0x40,
+0xc4, 0x30, 0x30, 0xc9, 0xd7, 0x91, 0xc7, 0x2e, 0x9a, 0xe8, 0x12, 0x58,
+0xd2, 0xeb, 0xcc, 0x22, 0x5d, 0x84, 0xdf, 0x5c, 0x26, 0xb5, 0x60, 0xf2,
+0xb3, 0x42, 0xae, 0x51, 0x88, 0xcb, 0xc9, 0x8a, 0xe0, 0xc7, 0x8e, 0xc4,
+0x53, 0x84, 0x1f, 0x05, 0x95, 0xec, 0xcc, 0x4a, 0x51, 0x71, 0x93, 0x2f,
+0x28, 0x7a, 0xa5, 0x11, 0x4c, 0x32, 0xe0, 0xae, 0x06, 0xae, 0x01, 0x47,
+0xcd, 0x92, 0xeb, 0xea, 0xa7, 0xf0, 0xc6, 0xcf, 0xc7, 0xd9, 0xd2, 0xfc,
+0x85, 0xe5, 0xab, 0xa1, 0x5f, 0x97, 0x69, 0x0e, 0x5b, 0xed, 0x21, 0x34,
+0xae, 0x05, 0x1b, 0x9e, 0x72, 0x29, 0x31, 0x13, 0x14, 0x1c, 0x9c, 0x3d,
+0x49, 0x48, 0x60, 0xcf, 0x90, 0x4f, 0x69, 0x3b, 0x6f, 0x63, 0x07, 0xfd,
+0x0d, 0x27, 0x54, 0x71, 0x9b, 0x70, 0x6d, 0xa2, 0xa5, 0x91, 0x0e, 0x29,
+0x44, 0x1e, 0xf6, 0xa0, 0x32, 0x27, 0xbc, 0x6e, 0x88, 0xad, 0xaf, 0x50,
+0xc5, 0x6f, 0x42, 0x73, 0xa3, 0x48, 0x42, 0x3f, 0x77, 0x96, 0x18, 0x93,
+0xb0, 0x71, 0xb5, 0x61, 0xa7, 0x75, 0x4b, 0xc5, 0xaf, 0x00, 0xeb, 0xd9,
+0x28, 0xf6, 0x18, 0x83, 0x10, 0xc6, 0x49, 0x70, 0x80, 0xc6, 0xe9, 0x05,
+0xb8, 0xea, 0x0f, 0x82, 0x98, 0x48, 0x2f, 0x31, 0x16, 0x81, 0xbe, 0xdc,
+0x65, 0x42, 0xd4, 0xf5, 0x10, 0x07, 0xf4, 0x7b, 0x30, 0x30, 0xb5, 0x2c,
+0xac, 0xea, 0xbb, 0x69, 0xf9, 0x70, 0xc5, 0x6e, 0xba, 0xdf, 0x94, 0x49,
+0xe4, 0x1a, 0xe0, 0x3f, 0xe4, 0x92, 0x75, 0x63, 0xfb, 0xe5, 0xc6, 0xa5,
+0xe8, 0x14, 0x7f, 0xa4, 0x31, 0x9d, 0x27, 0x71, 0x59, 0xfc, 0xad, 0x0a,
+0x69, 0x94, 0x50, 0xc6, 0xb0, 0x33, 0xe4, 0x54, 0x22, 0x2f, 0xc2, 0x08,
+0x96, 0xbf, 0xd9, 0xa8, 0x99, 0x7e, 0x28, 0x05, 0xf5, 0x77, 0x4c, 0x41,
+0x77, 0x12, 0xc3, 0x28, 0xd1, 0x69, 0x08, 0x72, 0xdd, 0x87, 0xc1, 0xe0,
+0xc7, 0x27, 0x63, 0x5a, 0x15, 0x47, 0xc5, 0x32, 0xfc, 0xdb, 0xb4, 0x16,
+0xfe, 0x80, 0x7d, 0xbb, 0xa2, 0x86, 0x1a, 0x8a, 0x49, 0x08, 0xa9, 0x49,
+0xa5, 0x30, 0x90, 0x80, 0x2f, 0x25, 0x2a, 0xb3, 0x30, 0xc6, 0xf0, 0x03,
+0xb4, 0x25, 0x48, 0xe3, 0x33, 0xac, 0x5d, 0xb0, 0x15, 0x38, 0xc0, 0x7f,
+0x26, 0xf6, 0xb5, 0x7b, 0x0b, 0xb4, 0x91, 0xe8, 0xd4, 0xad, 0xb4, 0xf7,
+0x13, 0x1a, 0x65, 0xac, 0xe7, 0xb0, 0xc6, 0x88, 0xa3, 0x39, 0xd4, 0x14,
+0x67, 0xd3, 0x92, 0x81, 0xbf, 0x4e, 0xc1, 0x13, 0x34, 0x7e, 0x92, 0x06,
+0x7c, 0x8a, 0x55, 0xd3, 0x3b, 0x31, 0x2b, 0xb2, 0xf9, 0x85, 0xca, 0xa2,
+0xeb, 0x39, 0x10, 0xc4, 0x6f, 0xc4, 0x33, 0x85, 0xf4, 0x62, 0x5a, 0xac,
+0x8e, 0x1a, 0x15, 0x99, 0x15, 0xba, 0x18, 0x0c, 0x84, 0xf9, 0xcc, 0xfd,
+0xa2, 0x8b, 0x85, 0xad, 0xb1, 0x1b, 0x92, 0xa8, 0xb5, 0x68, 0xb6, 0x30,
+0xc4, 0x11, 0x12, 0xc9, 0x3c, 0xdd, 0x44, 0x15, 0x0f, 0x44, 0xe4, 0x17,
+0xd9, 0xc2, 0xf7, 0x81, 0xfe, 0xe4, 0x97, 0x15, 0x66, 0x45, 0xd6, 0x54,
+0x2a, 0xe2, 0x21, 0x2e, 0x93, 0x1a, 0xad, 0x85, 0x50, 0xc6, 0xa7, 0x73,
+0xef, 0x98, 0x4a, 0xa8, 0x04, 0xf5, 0x9b, 0x00, 0x94, 0xe1, 0x6d, 0xab,
+0x3b, 0xb8, 0x34, 0xdb, 0x87, 0x05, 0xb5, 0xd3, 0x70, 0xa7, 0x62, 0xe7,
+0x80, 0xc7, 0xa3, 0x29, 0x5b, 0x30, 0xc3, 0x90, 0xfb, 0x98, 0xe5, 0x62,
+0xc7, 0x19, 0xb9, 0x18, 0x64, 0xd9, 0x2a, 0x36, 0xb4, 0xdc, 0xd5, 0xd5,
+0x13, 0xc6, 0x29, 0x59, 0xb3, 0x22, 0xa2, 0xb1, 0xcf, 0x23, 0xea, 0x01,
+0xed, 0xdb, 0x30, 0xc7, 0x27, 0x14, 0x6a, 0x3b, 0xd5, 0x66, 0x56, 0x27,
+0x5c, 0xfe, 0x52, 0x99, 0x86, 0x57, 0xec, 0x72, 0x85, 0xaa, 0x10, 0x3d,
+0x6d, 0xee, 0x70, 0x22, 0x41, 0xc1, 0x9e, 0x07, 0x10, 0xab, 0xa9, 0x10,
+0xc4, 0x70, 0xe2, 0xf3, 0xa2, 0xff, 0xe4, 0xe2, 0x10, 0x5b, 0xf7, 0x92,
+0xa1, 0x8b, 0xe2, 0x00, 0x41, 0x45, 0xa7, 0x8d, 0xe3, 0xd2, 0xca, 0x65,
+0x2a, 0x13, 0xf4, 0x7d, 0xc0, 0x46, 0x49, 0x2c, 0x80, 0xc7, 0x8f, 0xa5,
+0xf3, 0x77, 0x02, 0xa3, 0xbd, 0x42, 0xdc, 0x86, 0x52, 0x98, 0xa1, 0x0a,
+0x50, 0xa6, 0x76, 0xad, 0xc5, 0xb4, 0x0f, 0xfe, 0xe0, 0xa2, 0x74, 0xc4,
+0x7b, 0xcc, 0x1a, 0x6b, 0x6a, 0x50, 0xc3, 0x88, 0x12, 0x2a, 0x12, 0x77,
+0x29, 0x2d, 0x03, 0xef, 0xa4, 0x94, 0xda, 0x5e, 0x02, 0x5c, 0xd8, 0xf5,
+0x15, 0x45, 0x3e, 0x29, 0xaa, 0x96, 0x23, 0x73, 0x22, 0xe5, 0xb6, 0xd1,
+0x2b, 0xe5, 0xb0, 0xc6, 0xae, 0xd3, 0x69, 0x37, 0x86, 0x23, 0xb3, 0x9e,
+0x4e, 0x61, 0xd7, 0x11, 0x01, 0x01, 0x75, 0x8b, 0x24, 0xf7, 0xcd, 0x6e,
+0x0a, 0x10, 0x7c, 0xae, 0x02, 0xf8, 0x94, 0x11, 0xb1, 0x88, 0x0e, 0x20,
+0xc6, 0xf0, 0xa3, 0xf3, 0xc4, 0x93, 0x31, 0x5c, 0x47, 0xbc, 0x04, 0x57,
+0x20, 0xdf, 0x7a, 0xfa, 0xfb, 0xd5, 0x8f, 0x87, 0x15, 0x94, 0xb1, 0x09,
+0xa9, 0xe4, 0xe5, 0x5c, 0x97, 0xf2, 0xa9, 0xd3, 0x90, 0xc4, 0x70, 0x46,
+0xb8, 0xb5, 0x53, 0x26, 0x2f, 0x4e, 0xb0, 0x4a, 0xd9, 0x91, 0xf8, 0xa9,
+0x71, 0x71, 0x94, 0x58, 0x8f, 0x85, 0x94, 0xb6, 0x88, 0xb1, 0x32, 0xb0,
+0x48, 0xe1, 0x20, 0x2c, 0xc2, 0x10, 0xc3, 0x87, 0x63, 0xb3, 0x54, 0x3f,
+0xab, 0xf7, 0x0a, 0xca, 0xa5, 0x10, 0xc9, 0x3c, 0x89, 0x33, 0x58, 0xa6,
+0x16, 0x9d, 0x99, 0x46, 0x04, 0x15, 0x27, 0xb1, 0x76, 0x9c, 0x37, 0x2e,
+0x0a, 0x85, 0x40, 0xc6, 0xb0, 0x13, 0x69, 0xe7, 0x3e, 0x48, 0xa3, 0x84,
+0x48, 0x71, 0xd8, 0x50, 0x8c, 0xa9, 0x0f, 0xb1, 0xe3, 0xf4, 0x13, 0xe0,
+0x54, 0x9d, 0xb0, 0xb3, 0x92, 0xf0, 0x26, 0x04, 0xc8, 0xaa, 0xba, 0xd0,
+0xc4, 0x87, 0x30, 0xc3, 0x54, 0xbd, 0x84, 0xfb, 0x51, 0x11, 0x53, 0x11,
+0x10, 0x9e, 0x89, 0x60, 0xd1, 0xe4, 0xa5, 0x4d, 0xc4, 0x63, 0xb0, 0xd0,
+0xad, 0xe4, 0x9f, 0x16, 0xae, 0x54, 0x0b, 0x83, 0x80, 0xc6, 0xf1, 0x93,
+0x23, 0x8a, 0x0e, 0x05, 0x38, 0x06, 0xa8, 0x4e, 0xd2, 0x61, 0x1d, 0x2e,
+0x90, 0xe3, 0x75, 0x95, 0x88, 0xfc, 0x3a, 0x36, 0x9e, 0xab, 0x02, 0xd3,
+0xef, 0xe0, 0x97, 0x69, 0x46, 0x30, 0xc6, 0xe7, 0x12, 0x03, 0x83, 0xc9,
+0xe2, 0x4a, 0x10, 0xa4, 0x95, 0x15, 0xb9, 0xc7, 0x10, 0xe6, 0x51, 0xb5,
+0x23, 0x97, 0xe7, 0x2c, 0x84, 0xd8, 0xab, 0x02, 0xc2, 0x49, 0xee, 0x58,
+0xea, 0xc3, 0xd0, 0xc6, 0xb0, 0xb1, 0x03, 0x85, 0x4a, 0xeb, 0xa2, 0x19,
+0xf9, 0x30, 0xd4, 0xf0, 0xe9, 0x9e, 0xdf, 0x21, 0x05, 0x76, 0x05, 0x4f,
+0xf3, 0x21, 0xbe, 0x26, 0x14, 0x7f, 0x3c, 0xd4, 0x93, 0x49, 0x1c, 0x20,
+0xc3, 0xaf, 0x82, 0xd3, 0x64, 0x94, 0x47, 0x62, 0x2d, 0x95, 0xe9, 0x1a,
+0x29, 0x10, 0xa0, 0xe0, 0xc4, 0x24, 0xda, 0xc5, 0x50, 0xcb, 0x48, 0xc6,
+0x2b, 0x74, 0x27, 0xac, 0xbf, 0x22, 0x0a, 0x25, 0x00, 0xc3, 0x50, 0x10,
+0xc8, 0xb5, 0x7c, 0xc5, 0x58, 0xad, 0xc7, 0x33, 0x54, 0x11, 0x63, 0x39,
+0x86, 0x0c, 0x25, 0x15, 0x85, 0x87, 0xb4, 0x48, 0xbf, 0xb2, 0x62, 0x1d,
+0x0b, 0x64, 0x70, 0x27, 0x2e, 0x90, 0xc7, 0xb0, 0x47, 0xd3, 0x23, 0x5c,
+0xc2, 0xc7, 0xcf, 0xfc, 0x99, 0x99, 0x11, 0xf6, 0x89, 0xff, 0x4a, 0xa4,
+0x96, 0x52, 0xc7, 0x7c, 0x8f, 0xea, 0x2a, 0x41, 0x25, 0xa6, 0x3e, 0xa4,
+0x0a, 0xb9, 0x00, 0xc3, 0x87, 0x71, 0x64, 0x0b, 0x4b, 0xe4, 0x8a, 0xfe,
+0x5f, 0xba, 0xd9, 0x09, 0x29, 0xc3, 0xcc, 0xf4, 0xa4, 0x92, 0x4b, 0x9e,
+0x3c, 0xc1, 0x96, 0xa0, 0xe3, 0x65, 0x74, 0x8e, 0x5b, 0xeb, 0x97, 0xf0,
+0xc5, 0x71, 0x63, 0x53, 0xc3, 0xbe, 0x64, 0x64, 0xa8, 0x23, 0x30, 0x17,
+0xa1, 0xa3, 0x6b, 0x5a, 0x28, 0x05, 0xb8, 0x06, 0x16, 0x3c, 0x8b, 0xc8,
+0xa6, 0xf4, 0x78, 0x5f, 0x46, 0xe9, 0x6b, 0x33, 0xf0, 0xc7, 0x90, 0x54,
+0x08, 0xe5, 0x4a, 0x63, 0x19, 0x16, 0x87, 0x00, 0x54, 0x71, 0x75, 0x4a,
+0x0b, 0x79, 0xb5, 0x15, 0x06, 0xc8, 0xe8, 0x23, 0x3d, 0x29, 0x31, 0xbc,
+0xb4, 0x66, 0x1a, 0x4b, 0xdd, 0x40, 0xc4, 0x90, 0x91, 0x0a, 0x23, 0x50,
+0xa5, 0xf8, 0x6c, 0x05, 0xd3, 0x54, 0xf9, 0x21, 0x5c, 0x91, 0xba, 0xb4,
+0x51, 0x4d, 0xa5, 0x32, 0x78, 0xb0, 0x2e, 0x74, 0xc4, 0x39, 0x11, 0xc5,
+0xeb, 0xe8, 0xb0, 0xc7, 0x87, 0xe2, 0xd8, 0x5c, 0x47, 0x8b, 0x95, 0x59,
+0x28, 0x7e, 0x92, 0x28, 0x1f, 0x1b, 0x36, 0x39, 0xd6, 0x42, 0x88, 0x20,
+0x52, 0x1f, 0x94, 0x9d, 0x53, 0x12, 0x76, 0x56, 0x1d, 0x2a, 0xf7, 0x70,
+0xc3, 0x70, 0x44, 0x3a, 0x25, 0x0a, 0x07, 0x5d, 0x8c, 0xe2, 0x9e, 0x18,
+0x39, 0x74, 0x06, 0xd7, 0x65, 0xd4, 0x8f, 0xc6, 0x06, 0xb1, 0x77, 0x0c,
+0x2b, 0x12, 0x5f, 0x08, 0x06, 0x2e, 0x69, 0xd5, 0x50, 0xc6, 0xb0, 0x32,
+0xa3, 0x9b, 0x66, 0x09, 0x9b, 0x49, 0x38, 0x92, 0x14, 0x21, 0xe0, 0x98,
+0x18, 0xcc, 0x56, 0x76, 0x90, 0x66, 0xfc, 0xd0, 0x51, 0x27, 0x44, 0x80,
+0x2c, 0xf0, 0x49, 0xcb, 0x40, 0xe0, 0xc4, 0x69, 0x13, 0x4a, 0x14, 0xe3,
+0xc5, 0x17, 0x6c, 0xdc, 0xd2, 0x11, 0x91, 0x63, 0xe2, 0xe9, 0x04, 0x15,
+0x41, 0x0a, 0x53, 0x11, 0x70, 0x56, 0x37, 0x65, 0xf4, 0x25, 0x43, 0xec,
+0xc8, 0x45, 0xc0, 0xcf, 0x20, 0x20, 0xa1, 0x8b, 0x40, 0xaa, 0xab, 0xe1,
+0xe5, 0xd8, 0xdd, 0xe3, 0xba, 0x5b, 0x3d, 0xf3, 0xa6, 0x8a, 0x81, 0xdf,
+0x14, 0xac, 0x6f, 0xf8, 0x00, 0xc4, 0x38, 0x7e, 0x27, 0x58, 0xaf, 0x20,
+0xc4, 0x0b, 0x8c, 0xe3, 0x27, 0x0d, 0x2d, 0x0d, 0x08, 0x16, 0xe3, 0xdf,
+0x1a, 0x5e, 0xc8, 0xb9, 0x7e, 0xb9, 0x96, 0x8b, 0x72, 0x19, 0x9c, 0xc7,
+0x51, 0xef, 0x57, 0x22, 0xc9, 0xcf, 0x54, 0xe4, 0xe0, 0xc2, 0xcb, 0x47,
+0x01, 0x97, 0xc0, 0x1f, 0x1a, 0x8a, 0xb1, 0x14, 0xf4, 0x06, 0xcb, 0x0b,
+0x89, 0x84, 0xba, 0x19, 0x27, 0xb2, 0x53, 0x01, 0xb7, 0xca, 0xd2, 0x3d,
+0x89, 0x74, 0x4c, 0x75, 0xde, 0xd0, 0xc3, 0x6b, 0x83, 0xa3, 0x06, 0x41,
+0x78, 0xa2, 0x1d, 0x2b, 0xc7, 0xa2, 0x27, 0xe7, 0xa3, 0x2d, 0x50, 0xec,
+0x19, 0xa7, 0x06, 0x25, 0xad, 0x36, 0xe2, 0x3c, 0xb3, 0x04, 0xd3, 0xee,
+0xb2, 0xbf, 0xd0, 0xc2, 0xc1, 0xf2, 0xb2, 0x86, 0xca, 0x03, 0x23, 0x05,
+0x97, 0x91, 0x9d, 0x97, 0xd9, 0x4d, 0x98, 0xf2, 0x4b, 0x80, 0x3f, 0x37,
+0xda, 0x9d, 0xd7, 0x5c, 0x05, 0xe0, 0x68, 0x08, 0xc1, 0x18, 0x34, 0xa0,
+0xc2, 0xe2, 0xb2, 0x12, 0x97, 0x8c, 0x95, 0x66, 0xf4, 0x4d, 0x99, 0x26,
+0x69, 0x99, 0x16, 0x58, 0xc3, 0xa7, 0x00, 0x2d, 0x6c, 0x8d, 0x5e, 0x0c,
+0x48, 0x1f, 0xed, 0xd5, 0x4e, 0xbb, 0xb5, 0xa5, 0x70, 0xc2, 0xc3, 0x32,
+0xd2, 0x7a, 0xc0, 0x0b, 0xde, 0x56, 0xa3, 0x45, 0xf8, 0x02, 0x71, 0x4c,
+0x6a, 0xa6, 0x28, 0x13, 0xce, 0x0a, 0x3e, 0x41, 0xb9, 0xb6, 0xef, 0x79,
+0xc4, 0xe1, 0x07, 0x72, 0x1a, 0x30, 0xc2, 0xe0, 0xe4, 0xe2, 0x9b, 0x40,
+0x1b, 0x08, 0x93, 0x95, 0xde, 0x70, 0x02, 0x87, 0xfb, 0xc3, 0x29, 0xac,
+0x19, 0x90, 0x70, 0xe2, 0x6a, 0xce, 0xbc, 0xa1, 0x8d, 0xc6, 0x92, 0xa8,
+0x09, 0xa7, 0x40, 0xc2, 0xc1, 0xc3, 0x22, 0x8a, 0x00, 0x1e, 0xff, 0x24,
+0x8d, 0x4e, 0x64, 0x07, 0xf4, 0x7f, 0x8e, 0x57, 0x4b, 0x00, 0x14, 0x34,
+0x92, 0xbf, 0xcf, 0x64, 0x04, 0x08, 0x34, 0xc5, 0x88, 0x4d, 0x34, 0x40,
+0xc2, 0xe0, 0xe6, 0x24, 0x3c, 0x4a, 0xe5, 0x5c, 0x47, 0x08, 0xe6, 0x65,
+0x2f, 0xb9, 0x64, 0x79, 0x22, 0xd9, 0x80, 0x3f, 0x77, 0xd5, 0x23, 0xab,
+0x40, 0x06, 0x0e, 0x8f, 0x5c, 0x6d, 0x94, 0xd8, 0xe0, 0xc2, 0xc0, 0xf5,
+0x33, 0x07, 0x0c, 0x6b, 0xfa, 0x72, 0x94, 0x6e, 0xde, 0x99, 0x5e, 0x8a,
+0xc0, 0xe4, 0x18, 0x80, 0x3e, 0x6f, 0x9c, 0xc0, 0x01, 0xc8, 0x0f, 0x0f,
+0x19, 0xb7, 0x6d, 0x4e, 0x43, 0xe0, 0xc2, 0xe0, 0xee, 0x53, 0x05, 0x4c,
+0x8e, 0x80, 0x33, 0x79, 0x24, 0x6d, 0x15, 0x5d, 0x86, 0xc5, 0xcf, 0x78,
+0x18, 0xc5, 0xf2, 0x45, 0x91, 0xac, 0xb5, 0x3f, 0x4c, 0xc0, 0x52, 0x17,
+0x13, 0x5f, 0x20, 0xc2, 0xd8, 0x0e, 0xb2, 0x2a, 0x00, 0x1f, 0xcb, 0xfe,
+0x97, 0x5c, 0x22, 0x06, 0x03, 0xff, 0xd9, 0xfd, 0x4a, 0x98, 0xde, 0xb9,
+0x74, 0x86, 0x37, 0x35, 0xd3, 0x47, 0xe8, 0xff, 0x74, 0xcd, 0x0d, 0x80,
+0xc2, 0xe0, 0xfb, 0x27, 0xd5, 0x40, 0x14, 0xe4, 0x73, 0xdc, 0xd1, 0xe6,
+0x07, 0x96, 0xfc, 0x5d, 0x71, 0x3a, 0x80, 0x25, 0xf7, 0x14, 0x1b, 0xf2,
+0xa8, 0x06, 0x59, 0x3f, 0x4c, 0x37, 0x71, 0x7a, 0x30, 0xc2, 0xc0, 0xfb,
+0xc7, 0xda, 0xcb, 0xe5, 0x4f, 0xd8, 0xc0, 0x9c, 0x1e, 0xaf, 0x81, 0x3c,
+0x2f, 0xf2, 0xe8, 0x80, 0x37, 0x3d, 0x75, 0x99, 0x3d, 0xc4, 0x04, 0x10,
+0x96, 0x5e, 0xa3, 0x4e, 0xbf, 0x20, 0xc2, 0xe0, 0xfb, 0x27, 0xdc, 0x4c,
+0xd9, 0xd4, 0x05, 0xb0, 0x41, 0xa6, 0xd9, 0x5f, 0x1e, 0x7b, 0x7c, 0xe8,
+0x00, 0x3e, 0xca, 0x79, 0x44, 0x8c, 0x34, 0x0f, 0x0f, 0x8c, 0x4e, 0x7f,
+0x13, 0x85, 0xe0, 0xc2, 0xc0, 0xee, 0xb2, 0x98, 0x00, 0x0d, 0x4f, 0xe4,
+0xc1, 0x2a, 0xaa, 0x30, 0xb0, 0x54, 0xa7, 0xeb, 0xca, 0x80, 0x03, 0xa8,
+0x67, 0x01, 0xd5, 0x30, 0x0f, 0x23, 0xf4, 0x5c, 0xc1, 0xab, 0x94, 0xb0,
+0xc2, 0xe0, 0xec, 0x82, 0xfc, 0xc0, 0x1e, 0x5c, 0x7f, 0x66, 0xac, 0xee,
+0x02, 0xef, 0xe0, 0xac, 0x1e, 0xd9, 0x19, 0x91, 0x3e, 0xb0, 0xb0, 0xf2,
+0x3c, 0x15, 0x6b, 0x37, 0xd8, 0xc5, 0x4c, 0xc8, 0xa0, 0xc2, 0xd8, 0x06,
+0x21, 0xea, 0x00, 0x1f, 0x9a, 0x72, 0xa8, 0x17, 0x64, 0x07, 0xd7, 0x8b,
+0x24, 0x5d, 0x0a, 0x98, 0xdd, 0x33, 0xe2, 0xf8, 0x40, 0x4a, 0x06, 0x5e,
+0xd6, 0xee, 0x3e, 0xef, 0x21, 0x50, 0xc2, 0xe1, 0xa6, 0x29, 0xc4, 0x8a,
+0x87, 0x63, 0x2d, 0x00, 0xf0, 0x9d, 0x97, 0x97, 0x61, 0xff, 0x0c, 0xc7,
+0x80, 0x3f, 0x35, 0x7d, 0x05, 0xd8, 0x54, 0x05, 0x0a, 0x21, 0xaf, 0x52,
+0x54, 0x91, 0x80, 0xc2, 0xd8, 0x1b, 0x24, 0x4b, 0x4c, 0x69, 0x5d, 0x33,
+0xe4, 0xfa, 0xda, 0x65, 0xf8, 0x9c, 0xb0, 0x22, 0xe9, 0x80, 0x2b, 0x8a,
+0x31, 0x05, 0x28, 0x3c, 0x0f, 0xfd, 0xe6, 0x9a, 0x48, 0x6f, 0x99, 0xd0,
+0xc2, 0xe1, 0xb9, 0x73, 0x04, 0x8c, 0xae, 0x19, 0x02, 0xb0, 0x72, 0x69,
+0x22, 0x2e, 0xfc, 0x6f, 0x03, 0xd9, 0x00, 0x04, 0x23, 0x6d, 0x85, 0x32,
+0x3c, 0x0f, 0x0c, 0x42, 0x82, 0x8d, 0x51, 0xd9, 0x60, 0xc2, 0xd8, 0x0b,
+0xe3, 0xdb, 0x40, 0x1f, 0xc3, 0x07, 0xec, 0x93, 0xa2, 0x03, 0xd7, 0x92,
+0x28, 0x25, 0xca, 0x19, 0x50, 0x54, 0x22, 0x26, 0x1e, 0xc0, 0xd3, 0xb1,
+0x38, 0x60, 0x4d, 0x11, 0x86, 0xe0, 0xc2, 0xe0, 0xe6, 0x24, 0x44, 0xc0,
+0x1b, 0x32, 0x66, 0xb2, 0x24, 0x18, 0x07, 0xa7, 0x37, 0xe9, 0x23, 0xf9,
+0x80, 0x14, 0x1f, 0xc9, 0xba, 0xe9, 0x5c, 0x03, 0xd5, 0xfb, 0x31, 0xad,
+0x0f, 0xe8, 0x60, 0xc2, 0xc0, 0xf9, 0x73, 0x1b, 0x4a, 0xa7, 0x34, 0x2c,
+0x40, 0xb2, 0x1b, 0x3f, 0xce, 0x3f, 0x11, 0x06, 0xd9, 0x80, 0x70, 0x3b,
+0x7e, 0xed, 0x77, 0xd4, 0x01, 0x0a, 0xd1, 0x61, 0x55, 0xaf, 0xfe, 0xb0,
+0xc2, 0x61, 0x34, 0xd4, 0x75, 0x4d, 0x7b, 0xd4, 0x12, 0x46, 0xce, 0x23,
+0x71, 0xb4, 0x60, 0x9b, 0x4f, 0x97, 0x00, 0xff, 0x56, 0x7d, 0x46, 0xeb,
+0xd4, 0x2a, 0x2f, 0x76, 0xba, 0xaa, 0xf3, 0xcb, 0x50, 0xc2, 0xe0, 0xf9,
+0x72, 0x84, 0x0d, 0x11, 0xb5, 0x3e, 0x20, 0x99, 0x61, 0x0a, 0x8e, 0xe7,
+0xa4, 0x02, 0x08, 0x8a, 0x87, 0x46, 0x5a, 0x0a, 0x01, 0xc4, 0x0f, 0x0c,
+0x84, 0x58, 0x8e, 0x92, 0x22, 0x40, 0xc2, 0xc1, 0x2d, 0x32, 0x24, 0x80,
+0x1f, 0xdd, 0xfe, 0xcf, 0x6a, 0xde, 0x01, 0x85, 0x0f, 0xb7, 0x89, 0x2b,
+0x17, 0xca, 0xbb, 0xf5, 0x03, 0x14, 0xad, 0x9d, 0xb0, 0x83, 0xbc, 0x66,
+0xb6, 0x16, 0x90, 0xc2, 0xe0, 0xee, 0xb2, 0xdc, 0x40, 0x1e, 0x1c, 0x06,
+0x7b, 0x83, 0x5a, 0x07, 0x87, 0x6f, 0xfd, 0xbb, 0xd9, 0x99, 0x52, 0xbb,
+0x7d, 0x43, 0xe4, 0xd2, 0x22, 0xf0, 0xd9, 0x46, 0xcf, 0x2d, 0xdf, 0xf0,
+0xc2, 0xc0, 0xfb, 0xc4, 0x7a, 0x00, 0x12, 0xb2, 0x22, 0x0a, 0xed, 0xde,
+0x05, 0x1c, 0xfa, 0x57, 0x94, 0xc8, 0x00, 0x2c, 0x3e, 0x3d, 0x6a, 0xb9,
+0xd4, 0x02, 0x01, 0x89, 0x63, 0x8e, 0xae, 0xab, 0x50, 0xc2, 0xe1, 0x3c,
+0xe3, 0x5c, 0x0d, 0x25, 0x1d, 0xfa, 0x48, 0x08, 0x22, 0xae, 0x3f, 0x58,
+0xfb, 0x37, 0x67, 0x80, 0x3f, 0x8a, 0x79, 0x5e, 0xff, 0xbc, 0x3f, 0x9d,
+0xff, 0x0c, 0xbe, 0xb5, 0x2e, 0x50, 0xc2, 0xc0, 0xf9, 0x73, 0x72, 0x4c,
+0x46, 0x12, 0x25, 0x5d, 0x45, 0x6c, 0xe1, 0x0f, 0x6e, 0xcd, 0xa3, 0xf5,
+0x80, 0x08, 0x37, 0x60, 0x31, 0xd3, 0x34, 0x0d, 0x08, 0x39, 0x15, 0xfc,
+0x94, 0xd0, 0xc0, 0xc2, 0xe0, 0xec, 0xf2, 0x87, 0x00, 0x1e, 0xbf, 0xac,
+0xa9, 0x5a, 0x2c, 0x0a, 0xbe, 0xc7, 0xab, 0x3d, 0x28, 0x19, 0x93, 0xc1,
+0xa4, 0x23, 0x5a, 0x30, 0x7b, 0xb1, 0xca, 0x6e, 0x75, 0x31, 0x11, 0xb0,
+0xc2, 0xc0, 0xf1, 0x54, 0x2c, 0xc0, 0x1e, 0xb8, 0x50, 0xdc, 0x03, 0xa2,
+0x07, 0xf0, 0xcb, 0x44, 0x3b, 0x7b, 0x99, 0x4e, 0x82, 0x35, 0x40, 0x1b,
+0x46, 0x23, 0x1e, 0xef, 0x2b, 0xae, 0x4d, 0x41, 0x40, 0xc2, 0xe1, 0x3c,
+0xe3, 0x0b, 0x0a, 0x6b, 0x76, 0x70, 0xd9, 0xb9, 0xa3, 0x97, 0xd9, 0x37,
+0x18, 0xf6, 0x18, 0x80, 0x38, 0x3a, 0x3d, 0x01, 0xb8, 0xd4, 0x05, 0x7a,
+0x22, 0xac, 0x92, 0x54, 0x5a, 0x00, 0xc2, 0xc0, 0xf4, 0xd3, 0x1c, 0x4b,
+0xf1, 0x4f, 0xff, 0xad, 0x86, 0xe2, 0xf2, 0x27, 0x34, 0x45, 0x3b, 0x96,
+0x00, 0x1a, 0x65, 0x64, 0xc0, 0x9b, 0xc4, 0x0c, 0x5e, 0xd6, 0xcb, 0x6d,
+0xf5, 0xc3, 0xf0, 0xc2, 0xe1, 0x3c, 0xe3, 0x75, 0x4c, 0x09, 0x41, 0xe4,
+0xa2, 0x10, 0xa5, 0x7c, 0x18, 0x47, 0xcb, 0x6f, 0x99, 0x00, 0x00, 0x28,
+0x5e, 0xe5, 0xd6, 0x28, 0x0f, 0x90, 0xb8, 0x01, 0xc0, 0x70, 0xd4, 0x90,
+0xc2, 0xc0, 0xef, 0xb3, 0x2c, 0x00, 0x1e, 0xa2, 0x4c, 0xd0, 0x94, 0x2e,
+0x05, 0x38, 0xcc, 0xaa, 0x36, 0xe9, 0x19, 0x0b, 0x8a, 0xa3, 0x4f, 0xe5,
+0x3c, 0xe8, 0xeb, 0x32, 0x60, 0x46, 0x4f, 0xbc, 0x80, 0xc2, 0xe0, 0xef,
+0x13, 0xd4, 0x80, 0x1e, 0xf7, 0x92, 0x9f, 0x3a, 0x24, 0x07, 0xae, 0xc7,
+0xbe, 0x27, 0xd8, 0x1b, 0x12, 0x68, 0x4a, 0x41, 0x09, 0x65, 0xf2, 0xf0,
+0xc8, 0x42, 0xfb, 0xed, 0xd1, 0xf0, 0xc2, 0xc1, 0x3d, 0xc2, 0x45, 0x45,
+0x44, 0xf5, 0xb8, 0xd4, 0xec, 0x18, 0x07, 0x97, 0x67, 0xa1, 0x52, 0x5a,
+0x80, 0x2d, 0x7b, 0x4e, 0x19, 0xd5, 0xd0, 0x04, 0xc3, 0xb2, 0xb4, 0x96,
+0x55, 0x76, 0x00, 0xc2, 0xe0, 0xf8, 0xd9, 0xcc, 0x4c, 0x8b, 0xf3, 0x71,
+0x34, 0x1b, 0xd4, 0x34, 0x7d, 0x1b, 0x55, 0xa7, 0x47, 0x00, 0x3c, 0xf3,
+0x7d, 0x7a, 0xf0, 0xd0, 0x2b, 0xee, 0x2f, 0x41, 0x4f, 0xf0, 0x2a, 0xf0
+};
+
+
+DbgOutput csu_testDbg;
+//#define CSU_TRACE(X) csu_testDbg.Trace X
+#define CSU_TRACE(X) printf X
+//#define CSU_ERROR(X) csu_testDbg.Error X
+#define CSU_ERROR(X) printf X
+//#define CSU_WARNING(X) csu_testDbg.Warning X
+#define CSU_WARNING(X) printf X
+
+
+Uint8 csu_recdbuf[CSU_RECD_BUF_LEN]; //buffer for recording-speech-to-file purpose
+Uint8 csu_playbuf[CSU_PLAY_BUF_LEN]; //buffer for playing-speech-from-file purpose
+Uint32 csu_recdidx;
+
+#undef __RTP_HANDLER_DUMMY__
+//T_CSU_RESULT_REG csu_RegAllRtpSrcPort(void);
+//T_CSU_RESULT_REG csu_RegAllRtpSnkPort(void);
+
+void csu_Init(void)
+{
+ Uint8 i,j;
+ T_CSU_PORT_ID *src;
+ T_CSU_PORT_ID *snk;
+
+ DBG_FUNC("csu_Init", CSU_LAYER);
+
+ //csu_TblInitAll();
+ InitializeRtpPacketBuffers();
+ csu_CreateSemaphore();
+
+ //Register ANN source ports
+ if ( CSU_RESULT_REG_SUCCESS !=
+ csu_RegAllAnnSrcPort() )
+ DBG_ERROR("csu_Init: Ann src port regsiter failed\n");
+
+ //Register GSM source ports
+ if ( CSU_RESULT_REG_SUCCESS !=
+ csu_RegAllGsmSrcPort() )
+ DBG_ERROR("csu_Init: Gsm src port regsiter failed\n");
+
+ //Register GSM sink ports
+ if ( CSU_RESULT_REG_SUCCESS !=
+ csu_RegAllGsmSnkPort() )
+ DBG_ERROR("csu_Init: Gsm snk port regsiter failed\n");
+
+ #ifdef __RTP_HANDLER_DUMMY__
+ //Register RTP src ports: TEST ONLY
+ if ( CSU_RESULT_REG_SUCCESS !=
+ csu_RegAllRtpSrcPort() )
+ DBG_ERROR__("csu_Init: RTP src port regsiter failed\n");
+
+ //Register GSM sink ports: TEST ONLY
+ if ( CSU_RESULT_REG_SUCCESS !=
+ csu_RegAllRtpSnkPort() )
+ DBG_ERROR__("csu_Init: RTP snk port regsiter failed\n");
+#endif
+
+}
+
+//Register all ANN src port
+T_CSU_RESULT_REG csu_RegAllAnnSrcPort()
+{
+ T_CSU_PORT_ID src;
+ int i,j,k;
+ DBG_FUNC("csu_RegAllAnnSrcPort", CSU_LAYER);
+
+ for (i=0;i<CSU_ANN_SRC_PORT_MAX;i++)
+ {
+ src.portType = CSU_ANN_PORT;
+ src.portId.annHandler = (Uint16)i;
+ if ( CSU_RESULT_REG_SUCCESS != csu_RegSrcPort(&src) )
+ {
+ DBG_ERROR("csu_RegAllAnnSrcPort: annHandler=%x register failed\n",i );
+ return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+
+ /*for (j=0;j<2;j++)
+ {
+ int fd,ret;
+ char *buf, load_path[100];
+
+ strcpy(load_path, getenv("VIPERCALL_BASE"));
+ strcat(load_path, EMBEDDED_FILE[j]);
+
+ fd = open (load_path,O_RDONLY, 0644);
+ if ( fd==ERROR )
+ DBG_ERROR("csu_RegAllAnnSrcPort: open file '%s' failed\n", load_path);
+
+ //Read up to 800 frames from speech file
+ if (j==0)
+ {
+ buf = (char*)csu_annbuf_FR[i];
+ DBG_TRACE("csu_RegAllAnnSrcPort: Read FR announcement for annID (%d)\n", i);
+ }else
+ {
+ buf= (char*)csu_annbuf_EFR[i];
+ DBG_TRACE("csu_RegAllAnnSrcPort: Read EFR announcement for annID (%d)\n", i);
+ }
+
+ for (k=0;k<800;k++)
+ {
+ ret = read(fd,buf,33);
+ if (ret==ERROR)
+ {
+ DBG_ERROR("csu_RegAllAnnSrcPort: Read File failed for file '%s'\n", load_path);
+ return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+ buf += 33;
+ }
+ close(fd);
+ }*/
+
+ DBG_TRACE("csu_RegAllAnnSrcPort: Read-announce-from-file DONE !\n");
+
+ //printf("******EFR******\n");
+ //db_BDump(0,csu_annbuf_EFR[i],8250);
+ //k=0;
+ for(j=0;j<16500;j++)
+ {
+ csu_annbuf_FR[i][j]=FR_AnnFile[j];
+ csu_annbuf_EFR[i][j]=EFR_AnnFile[j];
+ //k++;
+ //if(i==0){printf("0x%02x, ",csu_annbuf_FR[i][j]);}
+ //if(i==0){printf("0x%02x, ",csu_annbuf_EFR[i][j]);}
+ //if(k==12){printf("\n");k=0;}
+ }
+
+ }
+
+ //DBG_TRACE("csu_RegAllAnnSrcPort: annHandler=%x register successful\n", i);
+ return CSU_RESULT_REG_SUCCESS;
+
+}
+
+#ifdef __RTP_HANDLER_DUMMY__
+//Register all RTP src ports: TEST ONLY
+T_CSU_RESULT_REG csu_RegAllRtpSrcPort(void)
+{
+ T_CSU_PORT_ID src;
+
+ DBG_FUNC("csu_RegAllRtpSrcPort", CSU_LAYER);
+
+ for (int i=0;i<CSU_RTP_SRC_PORT_MAX;i++)
+ {
+ src.portType=CSU_RTP_PORT;
+ src.portId.rtpHandler = (HRTPSESSION)(100+i);
+ if ( CSU_RESULT_REG_SUCCESS != csu_RegSrcPort(&src) )
+ {
+ DBG_ERROR("csu_RegAllRtpSrcPort: rtpHandler=%x register failed\n",
+ (100+i) );
+ return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+
+ CSU_TRACE("csu_RegAllRtpSrcPort: rtpHandler=%x register successful\n",
+ (100+i) );
+ }
+
+ return CSU_RESULT_REG_SUCCESS;
+}
+
+//Register all RTP sink ports: TEST ONLY
+T_CSU_RESULT_REG csu_RegAllRtpSnkPort(void)
+{
+ T_CSU_PORT_ID snk;
+
+ DBG_FUNC("csu_RegAllRtpSnkPort", CSU_LAYER);
+
+ for (int i=0;i<CSU_RTP_SNK_PORT_MAX;i++)
+ {
+ snk.portType=CSU_RTP_PORT;
+ snk.portId.rtpHandler = (HRTPSESSION)(100+i);
+ if ( CSU_RESULT_REG_SUCCESS != csu_RegSnkPort(&snk) )
+ {
+ DBG_ERROR("csu_RegAllRtpSnkPort: rtpHandler=%x register failed\n",
+ (100+i) );
+ return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+
+ DBG_TRACE("csu_RegAllRtpSnkPort: rtpHandler=%x register successful\n",
+ (100+i) );
+ }
+
+ return CSU_RESULT_REG_SUCCESS;
+}
+
+#endif
+
+
+Int32 setRtpTchConnection( Uint8 trx, Uint8 slot, HRTPSESSION rtpHandler )
+{
+ Uint16 gsmHandler;
+ T_CNI_IRT_ID entryId;
+ T_CSU_PORT_ID src, snk;
+ T_CSU_RESULT_CON ret;
+
+ DBG_FUNC("setRtpTchConnection", CSU_LAYER);
+
+ DBG_TRACE("setRtpTchConnection:gsmHandler'%d'<->rtpHandler'%x'\n",
+ (Uint16)((trx<<8)|slot),rtpHandler);
+
+ gsmHandler = (Uint16)((trx<<8)|slot);
+
+ if (!rm_TrxSlotToEntryId(gsmHandler, &entryId))
+ {
+ DBG_ERROR("setRtpTchConnection:FAILED in converting gsmHandler'%x'->entryId'%d'\n",
+ gsmHandler, entryId);
+ return (-1);
+ }
+
+ DBG_TRACE("setRtpTchConnection:(gsmHandler'%d',entryId=%d)<->rtpHandler'%x'\n",
+ gsmHandler,entryId, rtpHandler);
+
+ src.portType = CSU_GSM_PORT;
+ src.portId.gsmHandler = entryId;
+
+ snk.portType = CSU_RTP_PORT;
+ snk.portId.rtpHandler = rtpHandler;
+
+ if ( CSU_RESULT_CON_SUCCESS != (ret=csu_SimplexConnect(&src, &snk)) )
+ {
+ DBG_ERROR("setRtpTchConnection: FAILED in connecting gsm(%d)->rtp(%x),err=%d\n",
+ gsmHandler, rtpHandler, ret);
+ return (-1);
+ }
+
+ if ( CSU_RESULT_CON_SUCCESS != (ret=csu_SimplexConnect(&snk, &src)) )
+ {
+ DBG_ERROR("setRtpTchConnection: FAILED in gsm(%d)<-rtp(%x),err=%d\n",
+ gsmHandler, rtpHandler, ret);
+ return (-1);
+ }
+ return (1);
+}
+
+Int32 clrConnectionByTrxSlot( Uint8 trx, Uint8 slot )
+{
+ T_CSU_PORT_ID port;
+ T_CNI_IRT_ID entryId;
+ Uint16 gsmHandler;
+
+ DBG_FUNC("clrConnectionByTrxSlot", CSU_LAYER);
+
+ gsmHandler = (Uint16)((trx<<8)|slot);
+ if (!rm_TrxSlotToEntryId(gsmHandler, &entryId))
+ {
+ DBG_ERROR("setRtpTchConnection:FAILED in converting gsmHandler'%x'->entryId'%d'\n",
+ gsmHandler, entryId);
+ return (-1);
+ }
+
+ DBG_TRACE("clrConnectionByTrxSlot:(gsmHandler'%d',entryId=%d)'\n",
+ gsmHandler,entryId );
+
+ port.portType = CSU_GSM_PORT;
+ port.portId.gsmHandler = entryId;
+
+ if (CSU_RESULT_CON_SUCCESS != csu_OrigTermBreakAll(&port) )
+ return (-1);
+ else
+ return (1);
+}
+
+//Show GSM-orig connections
+void csu_ShowGsmSrcTable(void)
+{
+ char *state[] = { "null", "free", "used", "ignr" };
+ Uint8 i,j,k,l;
+
+ CSU_TRACE(("GSM -> OTHERS CONNECTION\n"));
+
+ l=0;
+ for (i=0; i<CSU_GSM_SRC_TRX_MAX ; i++)
+ for (j=0; j<CSU_GSM_SRC_SLOT_MAX; j++)
+ {
+ CSU_TRACE(("GSM:%02x state:%04s test:%d calls:%02x ",
+ (Uint8)((i<<4)|j),
+ state[csu_GsmSrcPort[i][j].state],
+ csu_GsmSrcPort[i][j].test,
+ csu_GsmSrcPort[i][j].count));
+ if (csu_GsmSrcPort[i][j].state == CSU_RESSTATE_USED)
+ {
+ for (k=0;k<CSU_PEER_PORT_MAX;k++)
+ {
+ switch(csu_GsmSrcPort[i][j].peer[k].type)
+ {
+ case CSU_GSM_PORT:
+ Uint8 trx,slot;
+ trx = (Uint8)(csu_GsmSrcPort[i][j].peer[k].pidx>>8);
+ slot = (Uint8)(csu_GsmSrcPort[i][j].peer[k].pidx);
+ CSU_TRACE(("GSM:%02x ", ((Uint8)(trx<<4|slot)) ));
+ break;
+
+ case CSU_RTP_PORT:
+ CSU_TRACE(("RTP:%08x ",
+ csu_RtpSnkPort[csu_GsmSrcPort[i][j].peer[k].pidx].rtpHandler));
+ break;
+
+ // case CSU_ANN_PORT:
+
+ default:
+// CSU_TRACE(("---:%02x ",
+// csu_GsmSrcPort[i][j].peer[k].type));
+ break;
+ }
+ }
+ }
+
+ CSU_TRACE(("\n"));
+ }
+}
+
+//Show RTP-orig connections
+void csu_ShowRtpSrcTable(void)
+{
+ char *state[] = { "null", "free", "used", "ignr" };
+ Uint8 i,k,l;
+
+ CSU_TRACE(("RTP -> OTHERS CONNECTION\n"));
+
+ l=0;
+ for (i=0; i<CSU_RTP_SRC_PORT_MAX ; i++)
+ {
+ CSU_TRACE(("RTP:%08x state:%04s test:%d calls:%02x ",
+ csu_RtpSrcPort[i].rtpHandler,
+ state[csu_RtpSrcPort[i].state],
+ csu_RtpSrcPort[i].test,
+ csu_RtpSrcPort[i].count));
+
+ if (csu_RtpSrcPort[i].state == CSU_RESSTATE_USED)
+ {
+ for (k=0;k<CSU_PEER_PORT_MAX;k++)
+ {
+ switch(csu_RtpSrcPort[i].peer[k].type)
+ {
+ case CSU_GSM_PORT:
+ CSU_TRACE(("GSM:%02x ",
+ csu_RtpSrcPort[i].peer[k].pidx));
+ break;
+
+ case CSU_RTP_PORT:
+ CSU_TRACE(("RTP:%08x ",
+ csu_RtpSnkPort[csu_RtpSrcPort[i].peer[k].pidx].rtpHandler));
+ break;
+
+ //case CSU_ANN_PORT:
+
+ default:
+// CSU_TRACE(("---:%02x ",
+// csu_RtpSrcPort[i].peer[k].type));
+ break;
+ }
+ }
+ }
+
+ CSU_TRACE(("\n"));
+ }
+}
+
+//Show Ann-orig connections
+void csu_ShowAnnSrcTable(void)
+{
+ char *state[] = { "null", "free", "used", "ignr" };
+ Uint8 i,k,l;
+
+ CSU_TRACE(("ANN -> OTHERS CONNECTION\n"));
+
+ l=0;
+ for (i=0; i<CSU_ANN_SRC_PORT_MAX ; i++)
+ {
+ CSU_TRACE(("ANN:%08x state:%04s test:%d calls:%02x ",
+ csu_AnnSrcPort[i].annHandler,
+ state[csu_AnnSrcPort[i].state],
+ csu_AnnSrcPort[i].test,
+ csu_AnnSrcPort[i].count));
+
+ if (csu_AnnSrcPort[i].state == CSU_RESSTATE_USED)
+ {
+ for (k=0;k<CSU_PEER_PORT_MAX;k++)
+ {
+ switch(csu_AnnSrcPort[i].peer[k].type)
+ {
+ case CSU_GSM_PORT:
+ CSU_TRACE(("GSM:%02x ",
+ csu_AnnSrcPort[i].peer[k].pidx));
+ break;
+
+ case CSU_RTP_PORT:
+ CSU_TRACE(("RTP:%08x ",
+ csu_AnnSrcPort[i].peer[k].pidx));
+ break;
+
+ default:
+// CSU_TRACE(("---:%02x ",
+// csu_AnnSrcPort[i].peer[k].type));
+ break;
+ }
+ }
+ }
+
+ CSU_TRACE(("\n"));
+ }
+}
+
+//Show all-orig connections
+void csu_ShowAllSrcTable(void)
+{
+ csu_ShowGsmSrcTable();
+ csu_ShowRtpSrcTable();
+ csu_ShowAnnSrcTable();
+}
+
+//Clear all orig/term connections
+void csu_ClearAllTable(void)
+{
+ Uint8 i,j;
+
+ csu_TblInitGsmSrcPort();
+ csu_TblInitGsmSnkPort();
+ //Register GSM source ports
+ if ( CSU_RESULT_REG_SUCCESS !=
+ csu_RegAllGsmSrcPort() )
+ CSU_TRACE(("csu_Init: Gsm src port regsiter failed\n"));
+
+ //Register GSM sink ports
+ if ( CSU_RESULT_REG_SUCCESS !=
+ csu_RegAllGsmSnkPort() )
+ CSU_TRACE(("csu_Init: Gsm snk port regsiter failed\n"));
+
+ //Initialize RTP src trunk resource
+ for (i=0;i<CSU_RTP_SRC_PORT_MAX;i++)
+ {
+ if ( csu_RtpSrcPort[i].state != CSU_RESSTATE_NULL)
+ {
+ csu_RtpSrcPort[i].state = CSU_RESSTATE_FREE;
+ csu_RtpSrcPort[i].resvd = CSU_RESSTATE_IGNORE;
+ csu_RtpSrcPort[i].count = 0;
+ csu_RtpSrcPort[i].test = CSU_TEST_FUNC_NULL;
+ for (j=0;j<CSU_PEER_PORT_MAX;j++)
+ {
+ csu_RtpSrcPort[i].peer[j].type = CSU_NIL_PORT;
+ csu_RtpSrcPort[i].peer[j].pidx = CSU_PEER_PORT_NULL;
+ }
+ }
+ }
+
+ //Initialize RTP snk trunk resource
+ for (i=0;i<CSU_RTP_SNK_PORT_MAX;i++)
+ {
+ if ( csu_RtpSnkPort[i].state != CSU_RESSTATE_NULL)
+ {
+ csu_RtpSnkPort[i].state = CSU_RESSTATE_FREE;
+ csu_RtpSnkPort[i].resvd = CSU_RESSTATE_IGNORE;
+ csu_RtpSnkPort[i].count = 0;
+ csu_RtpSnkPort[i].test = CSU_TEST_FUNC_NULL;
+ for (j=0;j<CSU_PEER_PORT_MAX;j++)
+ {
+ csu_RtpSnkPort[i].peer[j].type = CSU_NIL_PORT;
+ csu_RtpSnkPort[i].peer[j].pidx = CSU_PEER_PORT_NULL;
+ }
+ }
+ }
+}
+
+
+//Manually connect from src port to snk port uni-directionally
+void csu_ManUniConnect(Uint8 s_type, Uint32 s_handler, Uint8 d_type, Uint32 d_handler)
+{
+ T_CSU_RESULT_CON ret;
+ T_CSU_PORT_ID src, snk;
+ Uint16 gsmHandler;
+ T_CNI_IRT_ID entryId;
+
+ //Build src
+ src.portType = (T_CSU_PORT_TYPE)s_type;
+ switch(s_type)
+ {
+ case CSU_GSM_PORT:
+ gsmHandler = (Uint16)s_handler;
+ if (!rm_TrxSlotToEntryId(gsmHandler, &entryId))
+ {
+ CSU_TRACE(("csu_ManUniConnect:FAILED in convert src gsmHandler'%x'->entryId'%d'\n",
+ gsmHandler, entryId));
+ return;
+ }
+ src.portId.gsmHandler = entryId;
+
+//printf("csu_ManUniConnect:trx/slot:%x, entryId=%d\n",gsmHandler,entryId);
+
+ break;
+ case CSU_RTP_PORT:
+ src.portId.rtpHandler = (HRTPSESSION)s_handler;
+ break;
+ case CSU_ANN_PORT:
+ src.portId.annHandler = (T_CSU_ANN_ID)s_handler;
+ break;
+
+ default:
+ CSU_TRACE(("csu_ManUniConnect:INVALID src port type:%d\n", s_type));
+ return;
+ }
+
+ //Build snk
+ snk.portType=(T_CSU_PORT_TYPE)d_type;
+ switch(d_type)
+ {
+ case CSU_GSM_PORT:
+ gsmHandler = (Uint16)d_handler;
+ if (!rm_TrxSlotToEntryId(gsmHandler, &entryId))
+ {
+ CSU_TRACE(("csu_ManUniConnect:FAILED in convert snk gsmHandler'%x'->entryId'%d'\n",
+ gsmHandler, entryId));
+ return;
+ }
+ snk.portId.gsmHandler = entryId;
+ break;
+ case CSU_RTP_PORT:
+ snk.portId.rtpHandler = (HRTPSESSION)d_handler;
+ break;
+ //case CSU_ANN_PORT:
+
+ default:
+ CSU_TRACE(("csu_ManUniConnect:INVALID snk port type:%d\n", d_type));
+ return;
+ }
+
+ //Do src->snk connection now
+ if ( CSU_RESULT_CON_SUCCESS !=
+ (ret=csu_SimplexConnect(&src,&snk)) )
+ CSU_TRACE(("FAILED in csu_ManUniConnect:error=%d\n", ret));
+}
+
+//Manually connect between src port and snk port bi-directionally
+void csu_ManBiConnect(Uint8 s_type, Uint32 s_handler, Uint8 d_type, Uint32 d_handler)
+{
+ csu_ManUniConnect(s_type,s_handler,d_type,d_handler);
+ csu_ManUniConnect(d_type,d_handler,s_type,s_handler);
+}
+
+//Manually break connection from src port to snk port uni-directionally
+void csu_ManUniBreak(Uint8 s_type, Uint32 s_handler, Uint8 d_type, Uint32 d_handler)
+{
+ T_CSU_RESULT_CON ret;
+ T_CSU_PORT_ID src, snk;
+ Uint16 gsmHandler;
+ T_CNI_IRT_ID entryId;
+
+ //Build src
+ src.portType = (T_CSU_PORT_TYPE)s_type;
+ switch(s_type)
+ {
+ case CSU_GSM_PORT:
+ gsmHandler = (Uint16)s_handler;
+ if (!rm_TrxSlotToEntryId(gsmHandler, &entryId))
+ {
+ CSU_TRACE(("csu_ManUniBreak:FAILED in convert src gsmHandler'%x'->entryId'%d'\n",
+ gsmHandler, entryId));
+ return;
+ }
+ src.portId.gsmHandler = entryId;
+ break;
+ case CSU_RTP_PORT:
+ src.portId.rtpHandler = (HRTPSESSION)s_handler;
+ break;
+ case CSU_ANN_PORT:
+ src.portId.annHandler = (T_CSU_ANN_ID)s_handler;
+ break;
+ default:
+ CSU_TRACE(("csu_ManUniConnect:INVALID src port type:%d\n", s_type));
+ return;
+ }
+
+ //Build snk
+ snk.portType=(T_CSU_PORT_TYPE)d_type;
+ switch(d_type)
+ {
+ case CSU_GSM_PORT:
+ gsmHandler = (Uint16)d_handler;
+ if (!rm_TrxSlotToEntryId(gsmHandler, &entryId))
+ {
+ CSU_TRACE(("csu_ManUniBreak:FAILED in convert snk gsmHandler'%x'->entryId'%d'\n",
+ gsmHandler, entryId));
+ return;
+ }
+ snk.portId.gsmHandler = entryId;
+ break;
+ case CSU_RTP_PORT:
+ snk.portId.rtpHandler = (HRTPSESSION)d_handler;
+ break;
+
+ default:
+ CSU_TRACE(("csu_ManUniConnect:INVALID snk port type:%d\n", d_type));
+ return;
+ }
+
+ //Do src->snk break now
+ if ( CSU_RESULT_CON_SUCCESS !=
+ (ret=csu_SimplexBreak(&src,&snk)) )
+ CSU_TRACE(("FAILED in csu_ManUniBreak:error=%d\n", ret));
+}
+
+//Manually break connection between src port and snk port bi-directionally
+void csu_ManBiBreak(Uint8 s_type, Uint32 s_handler, Uint8 d_type, Uint32 d_handler)
+{
+ csu_ManUniBreak(s_type,s_handler,d_type,d_handler);
+ csu_ManUniBreak(d_type,d_handler,s_type,s_handler);
+}
+
+//Manually break all given port-orig connections
+void csu_ManOrigBreakAll(Uint8 s_type, Uint32 s_handler)
+{
+ T_CSU_PORT_ID port;
+ T_CNI_IRT_ID entryId;
+ Uint16 gsmHandler;
+
+ switch(s_type)
+ {
+ case CSU_GSM_PORT:
+ gsmHandler = (Uint16)(s_handler);
+ if (!rm_TrxSlotToEntryId(gsmHandler,&entryId))
+ {
+ CSU_TRACE(("csu_ManOrigBreakAll:FAILED in convert src gsmHandler'%x'->entryId'%d'\n",
+ gsmHandler, entryId));
+ return;
+ }
+ CSU_TRACE(("csu_ManOrigBreakAll: src port info: gsmHandler'%d',entryId=%d'\n",
+ gsmHandler,entryId ));
+
+ port.portType = CSU_GSM_PORT;
+ port.portId.gsmHandler = entryId;
+
+ break;
+
+ case CSU_RTP_PORT:
+ port.portType = CSU_RTP_PORT;
+ port.portId.rtpHandler = (HRTPSESSION)s_handler;
+ break;
+
+ case CSU_ANN_PORT:
+ port.portType = CSU_ANN_PORT;
+ port.portId.annHandler = (T_CSU_ANN_ID)s_handler;
+ break;
+
+ default:
+ CSU_TRACE(("csu_ManOrigBreakAll: Invalid src port type '%d'\n", s_type));
+ return;
+ }
+
+ if (CSU_RESULT_CON_SUCCESS != csu_OrigBreakAll(&port) )
+ CSU_TRACE(("csu_ManOrigBreakAll: FAILED in csu_OrigBreakAll\n"));
+}
+
+//Manually break all given port-term connections
+void csu_ManTermBreakAll(Uint8 d_type, Uint32 d_handler)
+{
+ T_CSU_PORT_ID port;
+ T_CNI_IRT_ID entryId;
+ Uint16 gsmHandler;
+
+ switch(d_type)
+ {
+ case CSU_GSM_PORT:
+ gsmHandler = (Uint16)(d_handler);
+ if (!rm_TrxSlotToEntryId(gsmHandler,&entryId))
+ {
+ CSU_TRACE(("csu_ManTermBreakAll:FAILED in converting gsmHandler'%x'->entryId'%d'\n",
+ gsmHandler, entryId));
+ return;
+ }
+ CSU_TRACE(("csu_ManTermBreakAll: snk port info: gsmHandler'%d',entryId=%d'\n",
+ gsmHandler,entryId ));
+
+ port.portType = CSU_GSM_PORT;
+ port.portId.gsmHandler = entryId;
+
+ break;
+
+ case CSU_RTP_PORT:
+ port.portType = CSU_RTP_PORT;
+ port.portId.rtpHandler = (HRTPSESSION)d_handler;
+ break;
+
+ default:
+ CSU_TRACE(("csu_ManTermBreakAll: Invalid snk port type '%d'\n", d_type));
+ return;
+ }
+
+ if (CSU_RESULT_CON_SUCCESS != csu_TermBreakAll(&port) )
+ CSU_TRACE(("csu_ManTermBreakAll: FAILED in csu_OrigBreakAll\n"));
+}
+
+//Manually break all given port's both orig and term connections
+void csu_ManOrigTermBreakAll(Uint8 type, Uint32 handler)
+{
+ csu_ManOrigBreakAll(type, handler);
+ csu_ManTermBreakAll(type, handler);
+}
+
+
+//Write speech data stored in buffer to a file called speech.log
+void csu_WriteSpeechToFile(void)
+{
+ int fd,ret;
+ ULONG idx;
+
+ fd = open ("/ata/vipercall/scripts/speech.gsm", O_CREAT|O_RDWR, 0644);
+ if ( fd==ERROR )
+ {
+ CSU_TRACE(("csu_WriteMsSpeechToFile: 'create call' file failed\n"));
+ return;
+ }
+
+ //Write up to 800 speech frames in internal buffer to file "speech.log"
+ idx = 0;
+ for (int i=0;i<800;i++)
+ {
+ ret = write(fd, (char*)&csu_recdbuf[idx], 33);
+ if ( ret==ERROR )
+ {
+ CSU_TRACE(("csu_WriteSpeechToFile: 'write call' failed\n"));
+ return;
+ }
+ idx += 33;
+ }
+ close(fd);
+
+ CSU_TRACE(("Write-speech-to-file DONE !"));
+
+}
+
+//Read speech data to buffer from a file called speech.log
+void csu_ReadSpeechFromFile()
+{
+ int fd,ret;
+ char *buf;
+
+ fd = open ("/ata/vipercall/scripts/speech.gsm", O_RDONLY, 0644);
+ if ( fd==ERROR )
+ CSU_TRACE(("csu_ReadSpeechFromFile: 'open call' failed\n"));
+
+ //Read up to 800 speech frames from file 'speech.log' to internal buffer
+ buf = (char*)csu_playbuf;
+ for (int i=0;i<800;i++)
+ {
+ ret = read(fd,buf,33);
+
+ if (ret==ERROR)
+ {
+ CSU_TRACE(("csu_ReadSpeechFromFile: 'read call' failed\n"));
+ return;
+ }
+ buf += 33;
+ }
+
+ close(fd);
+
+ CSU_TRACE(("Read-speech-from-file DONE !\n"));
+}
+
+//Strat record speech from given source port
+void csu_StartRecordSpeech(Uint8 type, Uint32 handler)
+{
+ Uint8 i;
+
+ csu_recdidx = 0;
+
+ switch(type)
+ {
+ case CSU_GSM_PORT:
+ Uint8 trx, slot;
+ trx = (Uint8)(handler>>8);
+ slot = (Uint8)(handler);
+ csu_GsmSrcPort[trx][slot].test = CSU_TEST_RECORD_SRC_SPEECH_TO_FILE;
+ break;
+
+ case CSU_RTP_PORT:
+ for (i=0;i<CSU_RTP_SRC_PORT_MAX;i++)
+ {
+ if (csu_RtpSrcPort[i].state==CSU_RESSTATE_USED &&
+ csu_RtpSrcPort[i].rtpHandler==(HRTPSESSION)handler )
+ {
+ csu_RtpSrcPort[i].test = CSU_TEST_RECORD_SRC_SPEECH_TO_FILE;
+ return;
+ }
+ }
+
+ CSU_TRACE(("Src port (%d,%x) not engaged in any call\n",
+ type, handler));
+ break;
+
+ //case CSU_ANN_PORT:
+
+ default:
+ CSU_TRACE(("FAILED in csu_StartRecordSpeech: invalid type=%d\n",
+ type));
+ return;
+ }
+}
+
+//Stop record speech from given source port and write recorded speech to file
+void csu_StopRecordSpeech(Uint8 type, Uint32 handler)
+{
+ Uint8 i;
+
+ switch(type)
+ {
+ case CSU_GSM_PORT:
+ Uint8 trx, slot;
+ slot = (Uint8)(handler);
+ trx = (Uint8)(handler>>8);
+ csu_GsmSrcPort[trx][slot].test = CSU_TEST_FUNC_NULL;
+ break;
+
+ case CSU_RTP_PORT:
+ for (i=0;i<CSU_RTP_SRC_PORT_MAX;i++)
+ {
+ if (csu_RtpSrcPort[i].state==CSU_RESSTATE_USED &&
+ csu_RtpSrcPort[i].rtpHandler==(HRTPSESSION)handler )
+ {
+ csu_RtpSrcPort[i].test = CSU_TEST_FUNC_NULL;
+ break;
+ }
+ }
+
+ if (i>=CSU_RTP_SRC_PORT_MAX)
+ {
+ CSU_TRACE(("Src port (%d,%x) not engaged in any call\n",
+ type, handler));
+ return;
+ }
+ break;
+
+ //case CSU_ANN_PORT:
+ default:
+ CSU_TRACE(("FAILED in csu_StopRecordSpeech: invalid type=%d\n",
+ type));
+ return;
+ }
+
+ //Write recorded speech to file
+ csu_WriteSpeechToFile();
+}
+
+//Start play speech from file to given snk port
+void csu_StartPlaySpeech(Uint8 type, Uint32 handler)
+{
+ Uint8 i;
+
+ //Read speech from file to an internal buffer
+ csu_ReadSpeechFromFile();
+ //intg_ReadSpeechFileToBuffer();
+
+ //Set relevant flag to mark the given port as playing speech mode
+ switch(type)
+ {
+ case CSU_GSM_PORT:
+ Uint8 trx, slot;
+ trx = (Uint8)(handler>>8);
+ slot = (Uint8)(handler);
+ csu_GsmSnkPort[trx][slot].test = CSU_TEST_PLAY_SPEECH_FROM_FILE_TO_SNK;
+ csu_GsmSnkPort[trx][slot].ppos = 0;
+ break;
+
+ case CSU_RTP_PORT:
+ for (i=0;i<CSU_RTP_SRC_PORT_MAX;i++)
+ {
+ if (csu_RtpSnkPort[i].state==CSU_RESSTATE_USED &&
+ csu_RtpSnkPort[i].rtpHandler==(HRTPSESSION)handler )
+ {
+ csu_RtpSnkPort[i].test = CSU_TEST_PLAY_SPEECH_FROM_FILE_TO_SNK;
+ csu_RtpSnkPort[i].ppos = 0;
+ return;
+ }
+ }
+
+ CSU_TRACE((" Snk port (%d,%x) not engaged in any call\n",
+ type, handler));
+ break;
+
+ //case CSU_ANN_PORT:
+
+ default:
+ CSU_TRACE(("FAILED in csu_StartPlaySpeech: invalid type=%d\n",
+ type));
+ return;
+ }
+}
+
+//Stop play speech from file to given snk port
+void csu_StopPlaySpeech(Uint8 type, Uint32 handler)
+{
+ Uint8 i;
+
+ switch(type)
+ {
+ case CSU_GSM_PORT:
+ Uint8 trx, slot;
+ trx = (Uint8)(handler>>8);
+ slot = (Uint8)(handler);
+ csu_GsmSnkPort[trx][slot].test = CSU_TEST_FUNC_NULL;
+ break;
+
+ case CSU_RTP_PORT:
+ for (i=0;i<CSU_RTP_SNK_PORT_MAX;i++)
+ {
+ if (csu_RtpSnkPort[i].state==CSU_RESSTATE_USED &&
+ csu_RtpSnkPort[i].rtpHandler==(HRTPSESSION)handler )
+ {
+ csu_RtpSnkPort[i].test = CSU_TEST_FUNC_NULL;
+ break;
+ }
+ }
+
+ if (i>=CSU_RTP_SNK_PORT_MAX)
+ {
+ CSU_TRACE(("Snk port (%d,%x) not engaged in any call\n",
+ type, handler));
+ return;
+ }
+ break;
+
+ //case CSU_ANN_PORT:
+
+ default:
+ CSU_TRACE(("FAILED in csu_StopPlaySpeech: invalid type=%d\n",
+ type));
+ return;
+ }
+}
+
+//Start loopback speech to src port itself
+void csu_StartLoopback(Uint8 type, Uint32 handler)
+{
+ Uint8 i;
+
+ //Establish a simplex connection from one to oneself
+ csu_ManUniConnect(type, handler, type, handler);
+
+ //Set relevant flag to mark the given src port as loopback
+ switch(type)
+ {
+ case CSU_GSM_PORT:
+ Uint8 trx, slot;
+ trx = (Uint8)(handler>>8);
+ slot = (Uint8)(handler);
+ csu_GsmSrcPort[trx][slot].test = CSU_TEST_LOOPBACK_SPEECH_TO_SRC_SELF;
+ break;
+
+ case CSU_RTP_PORT:
+ for (i=0;i<CSU_RTP_SRC_PORT_MAX;i++)
+ {
+ if (csu_RtpSrcPort[i].state==CSU_RESSTATE_USED &&
+ csu_RtpSrcPort[i].rtpHandler==(HRTPSESSION)handler )
+ {
+ csu_RtpSrcPort[i].test = CSU_TEST_LOOPBACK_SPEECH_TO_SRC_SELF;
+ return;
+ }
+ }
+
+ CSU_TRACE(("Src port (%d,%x) not engaged in any call\n",
+ type, handler));
+ break;
+
+ //case CSU_ANN_PORT:
+ default:
+ CSU_TRACE(("FAILED in csu_StartLoopback: invalid type=%d\n",
+ type));
+ return;
+ }
+}
+
+//Stop loopback speech to the given src port as loopback mode
+void csu_StopLoopback(Uint8 type, Uint32 handler)
+{
+ Uint8 i;
+
+ //Break a simplex connection from one to oneself
+ csu_ManUniBreak(type, handler, type, handler);
+
+ switch(type)
+ {
+ case CSU_GSM_PORT:
+ Uint8 trx, slot;
+ trx = (Uint8)(handler>>8);
+ slot = (Uint8)(handler);
+ csu_GsmSrcPort[trx][slot].test = CSU_TEST_FUNC_NULL;
+ break;
+
+ case CSU_RTP_PORT:
+ for (i=0;i<CSU_RTP_SRC_PORT_MAX;i++)
+ {
+ if (csu_RtpSrcPort[i].state==CSU_RESSTATE_USED &&
+ csu_RtpSrcPort[i].rtpHandler==(HRTPSESSION)handler )
+ {
+ csu_RtpSrcPort[i].test = CSU_TEST_FUNC_NULL;
+ break;
+ }
+ }
+
+ if (i>=CSU_RTP_SRC_PORT_MAX)
+ {
+ CSU_TRACE(("port (%d,%x) not engaged in any call\n",
+ type, handler));
+ return;
+ }
+ break;
+
+ //case CSU_ANN_PORT:
+ default:
+ CSU_TRACE(("FAILED in csu_StopLoopbackSpeech: invalid type=%d\n",
+ type));
+ return;
+ }
+}
+
+
+//Cancel all test function related to the given port
+void csu_CancelAll(Uint8 type, Uint32 handler)
+{
+ csu_StopLoopback(type, handler);
+ csu_StopPlaySpeech(type, handler);
+ csu_StopRecordSpeech(type, handler);
+}
+
+//Write each individually received speech frame to buffer cyclicly. Thus
+//susequently arrived speech frame may overwrite previously arrived ones.
+//ATTN:When recording only one call is allowed
+void csu_RecdSpeechToBuffer(Uint8 *buf)
+{
+ memcpy(&csu_recdbuf[csu_recdidx],buf,33);
+ csu_recdidx += 33;
+ if (csu_recdidx>=26400) csu_recdidx=0;
+}
+
+//Loopback received voice from src to src port itself
+void csu_LoopbackSpeechToSrcSelf(T_CSU_PORT_ID *src, Uint8 *buf)
+{
+ Uint8 i;
+ Int32 len;
+ Uint8 msg[CSU_MAX_SPEECH_MSG_LEN];
+
+
+ DBG_FUNC("csu_LoopbackSpeechToSrcSelf", CSU_LAYER);
+ //DBG_ENTER();
+
+ switch(src->portType)
+ {
+ case CSU_GSM_PORT:
+ Uint8 trx, slot;
+ trx = (Uint8)(src->portId.gsmHandler>>8);
+ slot = (Uint8)(src->portId.gsmHandler);
+ len = 4;
+ msg[len++] = CSU_GSM_SPEECH_MSG_MD;
+ msg[len++] = CSU_GSM_SPEECH_DLMSG_MSB;
+ msg[len++] = CSU_GSM_SPEECH_DLMSG_LSB;
+ msg[len++] = trx; //Trx Num
+ msg[len++] = CSU_GSM_BM_ACCH_CBITS|slot; //Chan MSB
+ msg[len++] = 0; //Chan LSB
+ msg[len++] = 0; //Reserved
+ msg[len++] = 0; //Reserved
+
+ memcpy(&msg[len],buf,CSU_GSM_SPEECH_DAT_LEN);
+
+ len += CSU_GSM_SPEECH_DAT_LEN;
+
+ //Convert the length to little-endian format
+ msg[0] = (Uint8)len;
+ msg[1] = (Uint8)(len>>8);
+ msg[2] = (Uint8)(len>>16);
+ msg[3] = (Uint8)(len>>24);
+
+ //Send to L1Proxy by calling L1Proxy callback function
+ sendDsp(msg,(len+4));
+ break;
+
+ case CSU_RTP_PORT:
+ for (i=0;i<CSU_RTP_SRC_PORT_MAX;i++)
+ {
+ if (csu_RtpSrcPort[i].state == CSU_RESSTATE_USED &&
+ csu_RtpSrcPort[i].rtpHandler == src->portId.rtpHandler)
+ {
+ rtpParam param;
+ param.sByte = CSU_RTP_SPEECH_DAT_POS;
+ param.timestamp = csu_RtpSrcPort[i].lpts;
+ csu_RtpSrcPort[i].lpts += CSU_RTP_SPEECH_DAT_RAT;
+ memcpy(&msg[CSU_RTP_SPEECH_DAT_POS],buf,CSU_RTP_SPEECH_DAT_LEN);
+
+ if (rtpWrite(src->portId.rtpHandler, msg, CSU_RTP_SPEECH_MSG_LEN, &param)<0)
+ DBG_TRACE("FAILED in calling rtpWrite/jcRtpWrite: rtpHandler=%x\n",
+ src->portId.rtpHandler);
+ break;
+ }
+
+ }
+ if (i>=CSU_RTP_SRC_PORT_MAX)
+ DBG_TRACE("RTP src port '%x' not engaged in any call\n", src->portId.rtpHandler);
+ break;
+
+ //case CSU_ANN_PORT:
+ default:
+ CSU_TRACE(("csu_LoopbackSpeechToSrcSelf:INVALID src port type:%d\n",
+ src->portType));
+ return;
+ }
+
+}
+
+T_CSU_RESULT_REG csu_RegAllGsmSrcPort(void)
+{
+ Uint8 i,j,trxNo;
+ T_CSU_PORT_ID src;
+ Uint16 gsmHandler;
+ T_CNI_IRT_ID entryId;
+
+// if (rm_TrxIsNotBlocked(1)) trxNo=2;
+// else trxNo=1;
+// for (i=0;i<CSU_GSM_SRC_TRX_MAX;i++)
+ /*
+ * initialize all available TRXs. If Blocked, only Turn-Off RF TX Power
+ */
+ trxNo = CSU_GSM_SRC_TRX_MAX;
+ for (i=0;i<trxNo;i++)
+ for (j=0;j<CSU_GSM_SRC_SLOT_MAX;j++)
+ {
+ gsmHandler = (Uint16)((i<<8)|j);
+ if (gsmHandler!=0x00) //skip if trx/slot==0/0
+ {
+ if (!rm_TrxSlotToEntryId(gsmHandler, &entryId))
+ {
+ CSU_TRACE(("csu_RegAllGsmSrcPort:FAILED in converting gsmHandler'%02x'->entryId'%d'\n",
+ gsmHandler, entryId));
+ return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+ src.portType = CSU_GSM_PORT;
+ src.portId.gsmHandler = entryId;
+
+ if ( CSU_RESULT_REG_SUCCESS != csu_RegSrcPort(&src) )
+ {
+ CSU_TRACE(("csu_RegAllGsmSrcPort (gsmHandler=%x, entryId=%d) register failed\n",
+ gsmHandler, entryId));
+ //return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+
+// CSU_TRACE(("csu_RegAllGsmSrcPort (gsmHandler=%x, entryId=%d) register successful\n",
+// gsmHandler, entryId));
+ }
+ }
+
+ return CSU_RESULT_REG_SUCCESS;
+
+}
+
+T_CSU_RESULT_REG csu_RegAllGsmSnkPort(void)
+{
+ Uint8 i,j,trxNo;
+ T_CSU_PORT_ID snk;
+ Uint16 gsmHandler;
+ T_CNI_IRT_ID entryId;
+
+ //if (rm_TrxIsNotBlocked(1)) trxNo=2;
+ //else trxNo=1;
+
+ for (i=0;i<CSU_GSM_SNK_TRX_MAX;i++)
+ //for (i=0;i<trxNo;i++)
+ for (j=0;j<CSU_GSM_SNK_SLOT_MAX;j++)
+ {
+ gsmHandler = (Uint16)((i<<8)|j);
+ if (gsmHandler!=0x00) //skip if trx/slot=0/0
+ {
+ if (!rm_TrxSlotToEntryId(gsmHandler, &entryId))
+ {
+ CSU_TRACE(("csu_RegAllGsmSnkPort:FAILED in converting gsmHandler'%02x'->entryId'%d'\n",
+ gsmHandler, entryId));
+ return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+ snk.portType = CSU_GSM_PORT;
+ snk.portId.gsmHandler = entryId;
+
+ if ( CSU_RESULT_REG_SUCCESS != csu_RegSnkPort(&snk) )
+ {
+ CSU_TRACE(("csu_RegAllGsmSnkPort (gsmHandler=%x, entryId=%d) register failed\n",
+ gsmHandler, entryId));
+ //return CSU_RESULT_REG_PORT_REGISTER_FAILED;
+ }
+
+ // CSU_TRACE(("csu_RegAllGsmSnkPort (gsmHandler=%x, entryId=%d) register successful\n",
+ // gsmHandler, entryId));
+ }
+ }
+
+ return CSU_RESULT_REG_SUCCESS;
+
+}
+
+//Show GSM-term connections
+void csu_ShowGsmSnkTable(void)
+{
+ char *state[] = { "null", "free", "used", "ignr" };
+ Uint8 i,j,k,l;
+
+ CSU_TRACE(("GSM <- OTHERS CONNECTION\n"));
+
+// l=0;
+ for (i=0; i<CSU_GSM_SNK_TRX_MAX ; i++)
+ for (j=0; j<CSU_GSM_SNK_SLOT_MAX; j++)
+ {
+ CSU_TRACE(("GSM:%02x state:%04s test:%d calls:%02x ",
+ (Uint8)((i<<4)|j),
+ state[csu_GsmSnkPort[i][j].state],
+ csu_GsmSnkPort[i][j].test,
+ csu_GsmSnkPort[i][j].count));
+ if (csu_GsmSnkPort[i][j].state == CSU_RESSTATE_USED)
+ {
+ for (k=0;k<CSU_PEER_PORT_MAX;k++)
+ {
+ switch(csu_GsmSnkPort[i][j].peer[k].type)
+ {
+ case CSU_GSM_PORT:
+ Uint8 trx,slot;
+ trx = (Uint8)(csu_GsmSnkPort[i][j].peer[k].pidx>>8);
+ slot = (Uint8)(csu_GsmSnkPort[i][j].peer[k].pidx);
+ CSU_TRACE(("GSM:%02x ", ((Uint8)(trx<<4|slot)) ));
+
+ break;
+
+ case CSU_RTP_PORT:
+ CSU_TRACE(("RTP:%08x ",
+ csu_RtpSnkPort[csu_GsmSnkPort[i][j].peer[k].pidx].rtpHandler));
+ break;
+
+ case CSU_ANN_PORT:
+ CSU_TRACE(("ANN:%08x ",
+ csu_AnnSrcPort[csu_GsmSnkPort[i][j].peer[k].pidx].annHandler));
+ break;
+
+ default:
+// CSU_TRACE(("---:%02x ",
+// csu_GsmSnkPort[i][j].peer[k].type));
+ break;
+ }
+ }
+ }
+
+ CSU_TRACE(("\n"));
+ }
+}
+
+//Show RTP-term connections
+void csu_ShowRtpSnkTable(void)
+{
+ char *state[] = { "null", "free", "used", "ignr" };
+ Uint8 i,k,l;
+
+ CSU_TRACE(("RTP <- OTHERS CONNECTION \n"));
+
+ l=0;
+ for (i=0; i<CSU_RTP_SNK_PORT_MAX ; i++)
+ {
+ CSU_TRACE(("RTP:%08x state:%04s test:%d calls:%02x ",
+ csu_RtpSnkPort[i].rtpHandler,
+ state[csu_RtpSnkPort[i].state],
+ csu_RtpSnkPort[i].test,
+ csu_RtpSnkPort[i].count));
+
+ if (csu_RtpSnkPort[i].state == CSU_RESSTATE_USED)
+ {
+ for (k=0;k<CSU_PEER_PORT_MAX;k++)
+ {
+ switch(csu_RtpSnkPort[i].peer[k].type)
+ {
+ case CSU_GSM_PORT:
+ CSU_TRACE(("GSM:%02x ",
+ csu_RtpSnkPort[i].peer[k].pidx));
+ break;
+
+ case CSU_RTP_PORT:
+ CSU_TRACE(("RTP:%08x ",
+ csu_RtpSnkPort[csu_RtpSnkPort[i].peer[k].pidx].rtpHandler));
+ break;
+
+ //case CSU_ANN_PORT:
+ default:
+// CSU_TRACE(("---:%02x ",
+// csu_RtpSnkPort[i].peer[k].type));
+ break;
+ }
+ }
+ }
+
+ CSU_TRACE(("\n"));
+ }
+}
+
+//Show all-orig connections
+void csu_ShowAllSnkTable(void)
+{
+ csu_ShowGsmSnkTable();
+ csu_ShowRtpSnkTable();
+}
+
+void csu_ShowAllTable(void)
+{
+ csu_ShowAllSrcTable();
+ csu_ShowAllSnkTable();
+}
+
+//Manually register given port as src port
+void csu_ManRegSrcPort(Uint8 type, Uint32 handler)
+{
+ T_CSU_PORT_ID src;
+
+ switch(type)
+ {
+ case CSU_RTP_PORT:
+ src.portType=CSU_RTP_PORT;
+ src.portId.rtpHandler = (HRTPSESSION)handler;
+ if ( CSU_RESULT_REG_SUCCESS != csu_RegSrcPort(&src) )
+ CSU_TRACE(("csu_ManRegSrcPort: rtpHandler=%x register failed\n",
+ handler));
+ else
+ CSU_TRACE(("csu_ManRegSrcPort: rtpHandler=%x register successful\n",
+ handler));
+ break;
+ case CSU_GSM_PORT:
+ case CSU_ANN_PORT:
+ src.portType=CSU_ANN_PORT;
+ src.portId.annHandler = (T_CSU_ANN_ID)handler;
+ if ( CSU_RESULT_REG_SUCCESS != csu_RegSrcPort(&src) )
+ CSU_TRACE(("csu_ManRegSrcPort: annHandler=%x register failed\n",
+ handler));
+ else
+ CSU_TRACE(("csu_ManRegSrcPort: annHandler=%x register successful\n",
+ handler));
+ break;
+
+ default:
+ CSU_TRACE(("csu_ManRegSrcPort: rtpHandler=%x register successful\n",
+ handler));
+ break;
+ }
+}
+
+//Manually register given port as snk port
+void csu_ManRegSnkPort(Uint8 type, Uint32 handler)
+{
+ T_CSU_PORT_ID snk;
+
+ switch(type)
+ {
+ case CSU_RTP_PORT:
+ snk.portType=CSU_RTP_PORT;
+ snk.portId.rtpHandler = (HRTPSESSION)handler;
+ if ( CSU_RESULT_REG_SUCCESS != csu_RegSnkPort(&snk) )
+ CSU_TRACE(("csu_ManRegSnkPort: rtpHandler=%x register failed\n",
+ handler));
+ else
+ CSU_TRACE(("csu_ManRegSnkPort: rtpHandler=%x register successful\n",
+ handler));
+ break;
+ case CSU_GSM_PORT:
+ //case CSU_ANN_PORT:
+ default:
+ CSU_TRACE(("csu_ManRegSnkPort: rtpHandler=%x register successful\n",
+ handler));
+ break;
+ }
+}
+
+//Manually register given port as both src and snk port
+void csu_ManRegSrcSnkPort(Uint8 type, Uint32 handler)
+{
+ csu_ManRegSrcPort(type, handler);
+ csu_ManRegSnkPort(type, handler);
+}
+
+//Show occurrence of writing to a given sink port
+void csu_ShowWriteToSnk(Uint8 type, Uint32 handler)
+{
+ Uint8 i;
+
+ switch(type)
+ {
+ case CSU_GSM_PORT:
+ Uint8 trx, slot;
+ trx = (Uint8)(handler>>8);
+ slot = (Uint8)(handler);
+ csu_GsmSnkPort[trx][slot].prnt = CSU_TEST_PRINT_SNK_HANDLER_USED;
+ csu_GsmSnkPort[trx][slot].wcnt = 0;
+ break;
+
+ case CSU_RTP_PORT:
+ for (i=0;i<CSU_RTP_SNK_PORT_MAX;i++)
+ {
+ if (csu_RtpSnkPort[i].state==CSU_RESSTATE_USED &&
+ csu_RtpSnkPort[i].rtpHandler==(HRTPSESSION)handler )
+ {
+ csu_RtpSnkPort[i].prnt = CSU_TEST_PRINT_SNK_HANDLER_USED;
+ csu_RtpSnkPort[i].wcnt = 0;
+ break;
+ }
+ }
+
+ if (i>=CSU_RTP_SNK_PORT_MAX)
+ {
+ CSU_TRACE(("port (%d,%x) not engaged in any call\n",
+ type, handler));
+ return;
+ }
+ break;
+
+ //case CSU_ANN_PORT:
+
+ default:
+ CSU_TRACE(("FAILED in ShowWriteToSnk: invalid type=%d\n",
+ type));
+ return;
+ }
+}
+
+//Clear showing occurrence of writing to a given sink port
+void csu_ClrShowWriteToSnk(Uint8 type, Uint32 handler)
+{
+ Uint8 i;
+
+ switch(type)
+ {
+ case CSU_GSM_PORT:
+ Uint8 trx, slot;
+ trx = (Uint8)(handler>>8);
+ slot = (Uint8)(handler);
+ csu_GsmSnkPort[trx][slot].prnt = CSU_TEST_FUNC_NULL;
+ break;
+
+ case CSU_RTP_PORT:
+ for (i=0;i<CSU_RTP_SNK_PORT_MAX;i++)
+ {
+ if (csu_RtpSnkPort[i].state==CSU_RESSTATE_USED &&
+ csu_RtpSnkPort[i].rtpHandler==(HRTPSESSION)handler )
+ {
+ csu_RtpSnkPort[i].prnt = CSU_TEST_FUNC_NULL;
+ break;
+ }
+ }
+
+ if (i>=CSU_RTP_SNK_PORT_MAX)
+ {
+ CSU_TRACE(("port (%d,%x) not engaged in any call\n",
+ type, handler));
+ return;
+ }
+ break;
+
+ // case CSU_ANN_PORT:
+
+ default:
+ CSU_TRACE(("FAILED in csu_ClrShowWriteToSnk: invalid type=%d\n",
+ type));
+ return;
+ }
+}
+
+
+//Show occurrence of receiving to a given source port
+void csu_ShowReceiveFromSrc(Uint8 type, Uint32 handler)
+{
+ Uint8 i;
+
+ switch(type)
+ {
+ case CSU_GSM_PORT:
+ Uint8 trx, slot;
+ trx = (Uint8)(handler>>8);
+ slot = (Uint8)(handler);
+ csu_GsmSrcPort[trx][slot].prnt = CSU_TEST_PRINT_SRC_HANDLER_USED;
+ csu_GsmSrcPort[trx][slot].wcnt = 0;
+ break;
+
+ case CSU_RTP_PORT:
+ for (i=0;i<CSU_RTP_SRC_PORT_MAX;i++)
+ {
+ if (csu_RtpSrcPort[i].state==CSU_RESSTATE_USED &&
+ csu_RtpSrcPort[i].rtpHandler==(HRTPSESSION)handler )
+ {
+ csu_RtpSrcPort[i].prnt = CSU_TEST_PRINT_SRC_HANDLER_USED;
+ csu_RtpSrcPort[i].wcnt = 0;
+ break;
+ }
+ }
+
+ if (i>=CSU_RTP_SRC_PORT_MAX)
+ {
+ CSU_TRACE(("RTP port (%d,%x) not engaged in any call\n",
+ type, handler));
+ return;
+ }
+ break;
+
+ case CSU_ANN_PORT:
+ for (i=0;i<CSU_ANN_SRC_PORT_MAX;i++)
+ {
+ if (csu_AnnSrcPort[i].state==CSU_RESSTATE_USED &&
+ csu_AnnSrcPort[i].annHandler==(T_CSU_ANN_ID)handler )
+ {
+ csu_AnnSrcPort[i].prnt = CSU_TEST_PRINT_SRC_HANDLER_USED;
+ csu_AnnSrcPort[i].wcnt = 0;
+ break;
+ }
+ }
+
+ if (i>=CSU_ANN_SRC_PORT_MAX)
+ {
+ CSU_TRACE(("ANN port (%d,%x) not engaged in any call\n",
+ type, handler));
+ return;
+ }
+ break;
+
+ default:
+ CSU_TRACE(("FAILED in ShowReceiveFromSrc: invalid type=%d\n",
+ type));
+ return;
+ }
+}
+
+//Clear showing occurrence of receiving to a given source port
+void csu_ClrShowReceiveFromSrc(Uint8 type, Uint32 handler)
+{
+ Uint8 i;
+
+ switch(type)
+ {
+ case CSU_GSM_PORT:
+ Uint8 trx, slot;
+ trx = (Uint8)(handler>>8);
+ slot = (Uint8)(handler);
+ csu_GsmSrcPort[trx][slot].prnt = CSU_TEST_FUNC_NULL;
+ break;
+
+ case CSU_RTP_PORT:
+ for (i=0;i<CSU_RTP_SRC_PORT_MAX;i++)
+ {
+ if (csu_RtpSrcPort[i].state==CSU_RESSTATE_USED &&
+ csu_RtpSrcPort[i].rtpHandler==(HRTPSESSION)handler )
+ {
+ csu_RtpSrcPort[i].prnt = CSU_TEST_FUNC_NULL;
+ break;
+ }
+ }
+
+ if (i>=CSU_RTP_SRC_PORT_MAX)
+ {
+ CSU_TRACE(("port (%d,%x) not engaged in any call\n",
+ type, handler));
+ return;
+ }
+ break;
+
+ case CSU_ANN_PORT:
+ for (i=0;i<CSU_ANN_SRC_PORT_MAX;i++)
+ {
+ if (csu_AnnSrcPort[i].state==CSU_RESSTATE_USED &&
+ csu_AnnSrcPort[i].annHandler==(T_CSU_ANN_ID)handler )
+ {
+ csu_AnnSrcPort[i].prnt = CSU_TEST_FUNC_NULL;
+
+ break;
+ }
+ }
+
+ if (i>=CSU_ANN_SRC_PORT_MAX)
+ {
+ CSU_TRACE(("ANN port (%d,%x) not engaged in any call\n",
+ type, handler));
+ return;
+ }
+ break;
+
+ default:
+ CSU_TRACE(("FAILED in csu_ClrShowReceiveFromSrc: invalid type=%d\n",
+ type));
+ return;
+ }
+}
+
+
+
+void csu_TestTimeStamp(Uint8 flag)
+{
+ Uint32 ts1, ts2, ts3,ts21,ts31,ts32;
+ ts1 = 0xffffffa0;
+
+ ts2 = ts1 + 160;
+
+ ts3 = ts2 - ts1;
+
+ printf("TimeStampTesting: ts1(%x, %d), ts2(%x,%d), ts3(%x,%d)\n",
+ ts1, ts1, ts2, ts2, ts3, ts3);
+
+
+ ts1 = 0xffffffa0;
+
+ //if ( (ts1 + 160) > 0xffffffff )
+ {
+ ts2 = (ts1 + 160) - 0xffffffff;
+ ts21 = (Uint32) ((ts1 + 160) - 0xffffffff);
+
+ ts3 = 0xffffffff - ts1;
+
+ ts31 = (ts3 + ts2);
+ ts32 = (ts3 + ts21);
+
+ printf("ts1(%x),ts2(%x) ts21(%x) ts3(%x) ts31(%x) ts32(%x)\n",
+ ts1, ts2, ts21, ts3, ts31, ts32);
+
+ }
+
+}
+
+#endif /*__CSU_TEST_CPP__*/
+
diff --git a/data/mnet/GP10/Host/CsuNew/test/csutest073 b/data/mnet/GP10/Host/CsuNew/test/csutest073
new file mode 100644
index 0000000..7e049e9
--- /dev/null
+++ b/data/mnet/GP10/Host/CsuNew/test/csutest073
@@ -0,0 +1,84 @@
+# last modified: 5/11/99 by Kevin Lim
+
+taskPrioritySet(taskNameToId("tNetTask"), 10)
+routeAdd "10.1.2.0", "10.1.1.7"
+
+ld < K:/Alpha-load/Bin/logging.out
+
+ld < K:/Alpha-load/Bin/oam_init.out
+ld < K:/Alpha-load/Bin/oam_api.out
+
+ld < K:/Alpha-load/Bin/l1proxy_init.out
+ld < K:/Alpha-load/Bin/lapdm_init.out
+ld < K:/Alpha-load/Bin/mmm_init.out
+ld < K:/Alpha-load/Bin/ccm_init.out
+ld < K:/Alpha-load/CSU-Test-Bin/rm_init.out
+ld < K:/Alpha-load/Bin/lapdm_api.out
+ld < K:/Alpha-load/Bin/jcc_api.out
+ld < K:/Alpha-load/Bin/ccm_api.out
+ld < K:/Alpha-load/CSU-Test-Bin/rm_api.out
+ld < K:/Alpha-load/Bin/jetrtp.out
+
+ld < K:/Alpha-load/CSU-Test-Bin/csu.out
+ld < K:/Alpha-load/Bin/l1proxy.out
+ld < K:/Alpha-load/Bin/ril3.out
+ld < K:/Alpha-load/Bin/lapdm.out
+ld < K:/Alpha-load/Bin/jcc.out
+ld < K:/Alpha-load/Bin/mmm_api.out
+ld < K:/Alpha-load/CSU-Test-Bin/h323.out
+ld < K:/Alpha-load/Bin/h323_api.out
+ld < K:/Alpha-load/Bin/mmm.out
+ld < K:/Alpha-load/Bin/ccm.out
+ld < K:/Alpha-load/Bin/cc_test.out
+ld < K:/Alpha-load/CSU-Test-Bin/rm.out
+
+ld < K:/Alpha-load/Bin/ldCoff.o
+
+# load dsp coff file
+#pBlkDev = ramDevCreate(0, 512, 2000, 2000, 0)
+#dosFsMkfs("/RAM1", pBlkDev)
+#copy "K:/Alpha-load/Bin/Dsp.out","/RAM1/Dsp.out"
+
+# load module root_task module
+
+ld < K:/Alpha-load/Bin/root_task.out
+
+csu_TblInitAll()
+
+snmp_initializeMib()
+initOamApi()
+
+# intg_CellCfg(s16 arfcn, u8 bsic, u8 accessClass, u8 mnc1, u8 mnc2)
+intg_CellCfg(661, 0x2d, 2, 0, 1)
+
+# Bring Up RootTask
+rootTaskInit
+
+# Turn off control-info, console print
+SetLogTaskServer("10.1.1.27")
+SetModuleLogOptions(100, 0xFE)
+SetLogServerPort(50724)
+
+# load DSP
+initDsp(0)
+initDsp(1)
+initInt()
+#taskSpawn(0,50,0,1024*1024,ldCoff,"/RAM1/dsp.out")
+ldCoff("K:/Alpha-load/Bin/Dsp.out")
+taskDelay(400)
+defaultPort = 1
+go 1
+
+#memShow
+
+
+<setLogFile
+
+taskDelay(100)
+intg_SendChanActivation(1)
+intg_SendChanDeActivation(1)
+intg_CancelAll
+#<confcsu
+intg_SetUlSG(0,0x290)
+intg_SetDlSG(0,0xc0)
+
diff --git a/data/mnet/GP10/Host/CsuNew/test/csutest076 b/data/mnet/GP10/Host/CsuNew/test/csutest076
new file mode 100644
index 0000000..bdf79d8
--- /dev/null
+++ b/data/mnet/GP10/Host/CsuNew/test/csutest076
@@ -0,0 +1,91 @@
+#--------------------------------------------------
+# Startup script for lab ViperCell
+#--------------------------------------------------
+# Changes from alpha07:
+# ARFCN 561
+# Access Class 3
+# SetLogServerPort(23000)
+#--------------------------------------------------
+
+
+taskPrioritySet(taskNameToId("tNetTask"), 10)
+routeAdd "10.1.2.0", "10.1.1.7"
+
+ld < K:/Alpha-load/Bin/logging.out
+
+ld < K:/Alpha-load/Bin/oam_init.out
+ld < K:/Alpha-load/Bin/oam_api.out
+
+ld < K:/Alpha-load/Bin/l1proxy_init.out
+ld < K:/Alpha-load/Bin/lapdm_init.out
+ld < K:/Alpha-load/Bin/mmm_init.out
+ld < K:/Alpha-load/Bin/ccm_init.out
+ld < K:/Alpha-load/CSU-Test-Bin/rm_init.out
+ld < K:/Alpha-load/Bin/lapdm_api.out
+ld < K:/Alpha-load/Bin/jcc_api.out
+ld < K:/Alpha-load/Bin/ccm_api.out
+ld < K:/Alpha-load/CSU-Test-Bin/rm_api.out
+ld < K:/Alpha-load/Bin/jetrtp.out
+
+ld < K:/Alpha-load/CSU-Test-Bin/csu.out
+ld < K:/Alpha-load/Bin/l1proxy.out
+ld < K:/Alpha-load/Bin/ril3.out
+ld < K:/Alpha-load/Bin/lapdm.out
+ld < K:/Alpha-load/Bin/jcc.out
+ld < K:/Alpha-load/Bin/mmm_api.out
+ld < K:/Alpha-load/CSU-Test-Bin/h323.out
+ld < K:/Alpha-load/Bin/h323_api.out
+ld < K:/Alpha-load/Bin/mmm.out
+ld < K:/Alpha-load/Bin/ccm.out
+ld < K:/Alpha-load/Bin/cc_test.out
+ld < K:/Alpha-load/CSU-Test-Bin/rm.out
+
+ld < K:/Alpha-load/Bin/ldCoff.o
+
+# load dsp coff file
+#pBlkDev = ramDevCreate(0, 512, 2000, 2000, 0)
+#dosFsMkfs("/RAM1", pBlkDev)
+#copy "K:/Alpha-load/Bin/Dsp.out","/RAM1/Dsp.out"
+
+# load module root_task module
+
+ld < K:/Alpha-load/Bin/root_task.out
+
+csu_TblInitAll()
+
+snmp_initializeMib()
+initOamApi()
+
+# intg_CellCfg(s16 arfcn, u8 bsic, u8 accessClass, u8 mnc1, u8 mnc2)
+intg_CellCfg(561, 0x2d, 3, 0, 6)
+
+# Bring Up RootTask
+rootTaskInit
+
+# Turn off control-info, console print
+SetModuleLogOptions(100, 0xFE)
+SetLogServerPort(50724)
+
+# load DSP
+initDsp(0)
+initDsp(1)
+initInt()
+#taskSpawn(0,50,0,1024*1024,ldCoff,"/RAM1/dsp.out")
+ldCoff("K:/Alpha-load/Bin/Dsp.out")
+taskDelay(400)
+defaultPort = 1
+go 1
+
+#memShow
+
+
+<setLogFile
+
+taskDelay(100)
+intg_SendChanActivation(1)
+intg_SendChanDeActivation(1)
+intg_CancelAll
+#<confcsu
+intg_SetUlSG(0,0x290)
+intg_SetDlSG(0,0xc0)
+
diff --git a/data/mnet/GP10/Host/Fpga/cdcimfpga.rbf b/data/mnet/GP10/Host/Fpga/cdcimfpga.rbf
new file mode 100644
index 0000000..65eb226
--- /dev/null
+++ b/data/mnet/GP10/Host/Fpga/cdcimfpga.rbf
Binary files differ
diff --git a/data/mnet/GP10/Host/Fpga/fpga.rbf b/data/mnet/GP10/Host/Fpga/fpga.rbf
new file mode 100644
index 0000000..94ba044
--- /dev/null
+++ b/data/mnet/GP10/Host/Fpga/fpga.rbf
Binary files differ
diff --git a/data/mnet/GP10/Host/Http/Makefile b/data/mnet/GP10/Host/Http/Makefile
new file mode 100644
index 0000000..f6e3480
--- /dev/null
+++ b/data/mnet/GP10/Host/Http/Makefile
@@ -0,0 +1,16 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ copy bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Http/ViperCellMibBrowser.wch b/data/mnet/GP10/Host/Http/ViperCellMibBrowser.wch
new file mode 100644
index 0000000..7b065f1
--- /dev/null
+++ b/data/mnet/GP10/Host/Http/ViperCellMibBrowser.wch
@@ -0,0 +1,4 @@
+miboid.h
+ocsnmp.h
+mibway.h
+http.h
diff --git a/data/mnet/GP10/Host/Http/ViperCellMibBrowser.wcp b/data/mnet/GP10/Host/Http/ViperCellMibBrowser.wcp
new file mode 100644
index 0000000..8251a1e
--- /dev/null
+++ b/data/mnet/GP10/Host/Http/ViperCellMibBrowser.wcp
Binary files differ
diff --git a/data/mnet/GP10/Host/Http/ViperCellMibBrowser.wcs b/data/mnet/GP10/Host/Http/ViperCellMibBrowser.wcs
new file mode 100644
index 0000000..c21139b
--- /dev/null
+++ b/data/mnet/GP10/Host/Http/ViperCellMibBrowser.wcs
@@ -0,0 +1,19 @@
+2
+QsArgStruct
+QsArgStruct
+QSPROJ_AddrOfQsArgument
+
+QSPROJ_AddrOfNextQsArgument
+kCacheReadWrite
+0
+
+
+QsListStruct
+QsListStruct
+QSPROJ_AddrOfQsRange
+
+QSPROJ_AddrOfNextQsRange
+kCacheReadWrite
+1
+
+
diff --git a/data/mnet/GP10/Host/Http/ViperCellMibBrowser.wct b/data/mnet/GP10/Host/Http/ViperCellMibBrowser.wct
new file mode 100644
index 0000000..c851d74
--- /dev/null
+++ b/data/mnet/GP10/Host/Http/ViperCellMibBrowser.wct
@@ -0,0 +1,5321 @@
+3
+createTable
+integer
+
+kReadAccess
+0
+
+
+OCSNMP_CreateTable
+
+
+
+
+
+Y
+endRow
+integer
+
+kReadAccess
+0
+
+
+OCSNMP_EndRow
+
+
+
+
+
+Y
+REPEAT
+macro
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+btsID
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+radioLinkTimeout
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rxLevAccessMin
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+bts_ncc
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+bts_cid
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+bts_mcc
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+bts_mnc
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+bts_lac
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+bts_ci
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+endTable
+integer
+
+kReadAccess
+0
+
+
+
+
+
+
+
+
+Y
+adjCell_handoverIndex
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+adjCell_handoverCellID
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+adjCell_mcc
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+adjCell_mnc
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+adjCell_lac
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+adjCell_ci
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+adjCell_bCCHFrequency
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+adjCell_ncc
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+adjCell_cid
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+adjCell_synchronized
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+adjCell_hoPriorityLevel
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+adjCell_hoMargin
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+adjCell_msTxPwrMaxCell
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+adjCell_rxLevMinCell
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+adjCell_reselectionIndex
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+adjCell_reselectionBCCHFrequency
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+allowIMSIAttachDetach
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+callReestablishmentAllowed
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+cellBarred
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+dtxDownlink
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+dtxUplink
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+emergencyCallRestricted
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+msPriorityUsedInQueueing
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+adjCell_reselectionCellID
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+channelOperationalState_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+notAllowedAccessClass
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+timerPeriodicUpdateMS
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+maxQueueLength
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+timeLimitCall
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+timeLimitHandover
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+sdcchSAPI0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+facchTCHF
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+facchTCHH
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+sacchTCHSAPI0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+sacchSDCCH
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+sdcchSAPI3
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+sdcchTCHSAPI3
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+t3101
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+t3103
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+t3105
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+t3107
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+t3109
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+t3111
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+t3113
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+basebandTransceiverID_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+relatedRadioCarrier_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+basebandAdministrativeState_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+basebandAlarmStatus_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+basebandOperationalState_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+handoverControlID
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoMarginDef
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+msTxPwrMaxCellDef
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rxLevMinCellDef
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoAveragingLevParamHreqave
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoAveragingLevParamHreqt
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoThresholdInterfaceParamRxLevelUL
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoThresholdInterfaceParamRxLevelDL
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoThresholdInterfaceParamPx
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoAveragingQualParamHreqave
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoAveragingQualParamHreqt
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoThresholdDistParamTimeadv
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoThresholdDistParamN8
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+interferenceAveragingParamAveragingPeriod
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoThresholdLevParamRxLevelUL
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoThresholdLevParamNx
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoThresholdLevParamPx
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoAveragingDistParamHreqave
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoAveragingDistParamHreqt
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoThresholdQualParamRxQualUL
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoThresholdQualParamRxQualDL
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoThresholdQualParamNx
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoThresholdQualParamPx
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+mSTxPwrMaxCCH
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+noOfBlocksForAccessGrant
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+noOfMultiframesBetweenPaging
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+numberOfSlotsSpreadTrans
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+cellAllocationIndex
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+cellAllocation
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+cellReselectHysteresis
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+gsmdcsIndicator
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+ny1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+plmnPermitted
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+getInstance
+integer
+
+kReadAccess
+0
+
+
+OCSNMP_GetInstance
+
+
+
+
+
+Y
+h323_GKPort
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+h323_GKIPAddress
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+h323_Q931ResponseTimeOut
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+h323_Q931ConnectTimeOut
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+h323_Q931CallSignalingPort
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+h323_t35CountryCode
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+viperCellName
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+viperCellIPAddress
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+viperCellSerialNumber
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+viperCellAssetNumber
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+viperCellSoftwareBuild
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+viperCellCustomerName
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+viperCellCustomerAddress
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+viperCellCustomerPhone
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+viperCellCustomerEmail
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+viperCellCustomerInfo
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+enableOptHandoverProcessing
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcUpperThresholdLevParamRxLevelUL
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcUpperThresholdLevParamRxLevelDL
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcUpperThresholdLevParamPx
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcUpperThresholdLevParamNx
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcAveragingLevHreqave
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcAveragingLevHreqt
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcAveragingQualHreqave
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcAveragingQualHreqt
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcLowerThresholdLevParamRxLevelUL
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcLowerThresholdLevParamRxLevelDL
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcLowerThresholdLevParamPx
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcLowerThresholdLevParamNx
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcLowerThresholdQualParamRxQualUL
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcLowerThresholdQualParamRxQualDL
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcLowerThresholdQualParamPx
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcLowerThresholdQualParamNx
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcUpperThresholdQualParamRxQualUL
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcUpperThresholdQualParamRxQualDL
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcUpperThresholdQualParamPx
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcUpperThresholdQualParamNx
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+viperCellLocation
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+maxNumberRetransmissions
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+cc_mm_conn_est_T999
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+cc_alerting_T301
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+cc_setup_T303
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+cc_call_confirmed_T310
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+cc_connect_T313
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+cc_disconnect_T305
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+cc_release_T308
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+cc_safety_timer
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+cc_max_calls
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoThresholdLevParamRxLevelDL
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+mm_max_mm_connections
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+mm_paging_t3113
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+mm_authenticationRequired
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+mm_cipheringRequired
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+mm_IMEICheckRequired
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+oam_operationStatus
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+oam_mibFileName
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+oam_operation
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+powerControlInterval
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+powerIncrStepSize
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+powerRedStepSize
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_t3L01
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_bsCcChans
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_bsCcchSdcchComb
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_sysInfoOnOffMap
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_airInterface
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_viperCellTsc
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_maxSlotPerTrx
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_maxTrxs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_maxTchfs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_maxSdcch4s
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_trxOnOffMap
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_networkIfConfig
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_bcchTrx
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_preAlphaTrx
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_ccchBcchComb
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_ccchConf
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_synchChanInfo
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_SGainCtrlSetting_0_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_SGainCtrlSetting_1_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_SGainCtrlSetting_0_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_SGainCtrlSetting_1_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_nim_0_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_nim_1_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_nim_0_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_nim_1_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_nim_0_2
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_nim_1_2
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_nim_0_3
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_nim_1_3
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_nim_0_4
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_nim_1_4
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_nim_0_5
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_nim_1_5
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_nim_0_6
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_nim_1_6
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_nim_0_7
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_nim_1_7
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_trxSynthSetting_0_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_trxSynthSetting_1_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_trxSynthSetting_0_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_trxSynthSetting_1_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_trxFpgaDelay_0_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_trxFpgaDelay_1_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_trxFpgaDelay_0_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+rm_trxFpgaDelay_1_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+bts_administrativeState
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+bts_alarmStatus
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+bts_operationalState
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+h323_rasRequestTimeout
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+h323_viperbaseHeartbeatTimeout
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoAveragingAdjCellParamHreqave
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoAveragingAdjCellParamHreqt
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoAveragingAdjCellParamWeighting
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoAveragingLevParamWeighting
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoAveragingQualParamWeighting
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+interferenceAveragingParamThresholdBoundary0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+interferenceAveragingParamThresholdBoundary1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+interferenceAveragingParamThresholdBoundary2
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+interferenceAveragingParamThresholdBoundary3
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+interferenceAveragingParamThresholdBoundary4
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+interferenceAveragingParamThresholdBoundary5
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoThresholdDistParamP8
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+hoThresholdInterfaceParamNx
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcAveragingLevWeighting
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+pcAveragingQualWeighting
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+powerClass_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+carrier_administrativeState_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+carrier_alarmStatus_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+carrier_operationalState_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+radioCarrierID_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+txPwrMaxReduction_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+carrierFrequencyIndex_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+carrierFrequency_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+powerClass_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+carrier_administrativeState_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+carrier_alarmStatus_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+carrier_operationalState_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+radioCarrierID_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+txPwrMaxReduction_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+carrierFrequencyIndex_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+carrierFrequency_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+channelID_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+channelCombination_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+channelFrequencyUsage_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+channelTsc_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+channelAdministrativeState_0
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+channelID_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+channelCombination_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+channelFrequencyUsage_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+channelTsc_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+channelAdministrativeState_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+channelOperationalState_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+basebandAdministrativeState_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+basebandAlarmStatus_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+basebandOperationalState_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+basebandTransceiverID_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+relatedRadioCarrier_1
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+oam_testString
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+monitorReceiverPLL_LockDetectStatus
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+trxSerialNumber
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+trxSoftwareVersion
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+trxLoopBackMode
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+apaEnable
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+apaScanFrequencyLowBound
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+N
+apaScanFrequencyHighBound
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+N
+apaMaxPowerSetting
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+N
+apaMinRSSIThresholdForNeighborId
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+N
+apaScanRate
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+N
+apaHysteresisForBCCHPower
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+N
+cdcBoardSerialNumber
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+cdcBoardMACAddress
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+powerSupplyType
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+N
+powerSupplyStatus
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+N
+powerCardType
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+N
+powerCardStatus
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+N
+powerOn
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+N
+gpsCardType
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+gpsCardSoftwareVersion
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+gpsCardStatus
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+gpsPosition
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+gpsTime
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+utcTime
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+clockStatusFrequencyError
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+clockStatusDACVoltage
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+gpsAntennaStatus
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+gpsSatelliteStatus
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+apaClockSourceFrequencyIndex
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+N
+apaClockSourceFrequencyArfcn
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+N
+helpTopic
+custom
+
+kReadAccess
+0
+
+
+getHelpTopic
+
+
+
+
+string
+Y
+helpDetail
+custom
+
+kReadAccess
+0
+
+
+getHelpDetail
+
+
+
+
+string4
+Y
+hoppingSequenceNumber
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+mobileAllocationTable
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+mobileAllocationIndex
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+mobileAllocation
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+apaInvalidFrequencyIndex
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+apaInvalidFrequencyArfcn
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+meanPCHAGCHQueueLength
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+attTransOfPagingMessagesThePCH
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+unsuccTransOfPagingMessagesThePCH
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+attImmediateAssingProcs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+succImmediateAssingProcs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+nbrOfPagesDiscardedFromPCHQueue
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+meanDurationOfSuccPagingProcs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+nbrOfAvailableTCHs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+meanNbrOfBusyTCHs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+maxNbrOfBusyTCHs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+meanNbrOfIdleTCHsPerInterferenceBand
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+attTCHSeizures
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+succTCHSeizures
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+attTCHSeizuresMeetingTCHBlockedState
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+allAvailableTCHAllocatedTime
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+meanTCHBusyTime
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+meanTCHQueueLength
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+nbrOfLostRadioLinksTCH
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+nbrOfAvailableSDCCHs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+meanNbrOfBusySDCCHs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+maxNbrOfBusySDCCHs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+attSDCCHSeizuresMeetingSDCCHBlockedState
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+allAvailableSDCCHAllocatedTime
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+meanSDCCHQueueLength
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+nbrOfLostRadioLinksSDCCH
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+relativeTimeDLPowerControlAtMax
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+relativeTimeULPowerControlAtMax
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+succInternalHDOsIntraCell
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+unsuccInternalHDOsIntraCell
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+arfcnRssiControlMode
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+clockRecoveryControlMode
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+arfcnRssiClockControlIndex
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+arfcnRssiClockControlArfcn
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+arfcnRssiClockRecoveryMode
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+attImmediateAssingProcsCause
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+attImmediateAssingProcsValue
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+nbrOfClassMarkUpdates
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+attMobileOriginatingCalls
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+succMobileOriginatingCalls
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+ansMobileOriginatingCalls
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+attMobileTerminatingCalls
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+succMobileTerminatingCalls
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+ansMobileTerminatingCalls
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+attMobileEmergencyCalls
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+succMobileEmergencyCalls
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+ansMobileEmergencyCalls
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+attCipheringModeControlProcs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+succCipheringModeControlProcs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+attInterrogationOfHLRsForRouting
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+succInterrogationOfHLRsMSRNObtained
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+succInterrogationOfHLRsCallForwarding
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+attOpForMobileOriginatingPointToPointSMs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+succOpForMobileOriginatingPointToPointSMs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+attOpForMobileTerminatingPointToPointSMs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+succOpForMobileTerminatingPointToPointSMs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+meanTimeToCallSetupService
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+meanTimeToLocationUpdateService
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+transSubIdentifiedWithIMSI
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+imsiDetachProcs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+imsiAttachProcs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+attIncomingInterMSCHDOs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+succIncomingInterMSCHDOs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+attOutgoingInterMSCHDOs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+succOutgoingInterMSCHDOs
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+unsuccExternHDOsWithReconnectionPerMSC
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+unsuccExternHDOsWithLossOfConnectionPerMSC
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+cdcBoardTempCelsius
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+cdcBoardTempFahrenheit
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+clockCardStatus
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+clockCardType
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+clockCardSoftwareVersion
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+clockCardCrystalUpTime
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+clockCardDAC
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+intermediateFrequency_LockDetectStatus
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+transceiver_2B_PLL_LockDetectStatus
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+transceiver_1_PLL_LockDetectStatus
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+referenceFrequencyPLL_LockDetectStatus
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+externalHDOsPerCauseCode
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+externalHDOsPerCauseValue
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+gpsCardStatusSelect
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+succImmediateAssingProcsCause
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+succImmediateAssingProcsValue
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+AlarmList
+custom
+
+kReadAccess
+0
+
+
+getAlarmList
+
+
+
+
+string5
+Y
+AlarmDetail
+custom
+
+kReadAccess
+0
+
+
+getAlarmDetail
+
+
+
+
+string7
+Y
+transceiver_2A_PLL_LockDetectStatus
+SNMP
+
+kReadWriteAccess
+0
+0
+
+
+
+
+
+
+
+Y
+viperCellTime
+custom
+
+kReadAccess
+0
+
+
+viperCellTime
+
+
+
+
+string8
+Y
+cdcPwrSupplyStatus
+custom
+
+kReadAccess
+0
+
+
+getCdcPowerSupplyStatus
+
+
+
+
+string9
+Y
+cdcTemperature
+custom
+
+kReadAccess
+0
+
+
+getCdcTemp
+
+
+
+
+string10
+Y
diff --git a/data/mnet/GP10/Host/Http/ViperCellMibBrowser.wcv b/data/mnet/GP10/Host/Http/ViperCellMibBrowser.wcv
new file mode 100644
index 0000000..885b579
--- /dev/null
+++ b/data/mnet/GP10/Host/Http/ViperCellMibBrowser.wcv
@@ -0,0 +1,38 @@
+1
+12
+void
+
+
+string1
+QSPROJ_GetQsEvent
+
+string2
+QSPROJ_GetMchResponse
+
+string3
+getHelpTopic
+QSPROJ_SetQsGet_Set
+ipaddress
+
+
+string
+getHelpTopic
+
+string4
+getHelpDetail
+
+string5
+getAlarmList
+
+string7
+getAlarmDetail
+
+string8
+viperCellTime
+
+string9
+getCdcPowerSupplyStatus
+
+string10
+getCdcTemp
+
diff --git a/data/mnet/GP10/Host/Http/include/http.h b/data/mnet/GP10/Host/Http/include/http.h
new file mode 100644
index 0000000..a029b36
--- /dev/null
+++ b/data/mnet/GP10/Host/Http/include/http.h
@@ -0,0 +1,90 @@
+#ifndef __HTTP_H__
+#define __HTTP_H__
+
+#define kMaxStringLength 64
+#define kQSEventString "Event Number "
+#define kQSMchResponseString "You will see the response of your command in this window\n"
+#define kQSEventStringLen (STRLEN(kQSEventString))
+
+typedef struct environment Environment;
+
+extern void
+http_registerPostHandler(sbyte *pDocName,
+ RLSTATUS (*pHandler)(struct environment *pEnv,
+ sbyte *pPostData,
+ unsigned int totalBytesRead));
+extern void http_feedbackInit();
+extern void http_oamOperationInit();
+
+void http_msgPrint(char *format, ...);
+#ifdef _DEBUG
+#define http_dbgMsg(XX) fflush(stdout); printf("[HTTPD] "); http_msgPrint XX
+#else
+#define http_dbgMsg(XX)
+#endif
+
+extern char Http_serverRoot[];
+
+/*-------------------------------------------------------------------*/
+/*----------------------------------------------------------------------------------------------------
+
+typedef void (StrGetFuncPtr) (struct environment *, void *, void *, sbyte *);
+
+extern StrGetFuncPtr http_vbGetViperCells;
+extern StrGetFuncPtr http_vbGetIpAddress;
+extern StrGetFuncPtr getHelpTopic;
+extern StrGetFuncPtr getHelpDetail;
+
+extern StrGetFuncPtr getAlarmList;
+extern StrGetFuncPtr getAlarmDetail;
+extern StrGetFuncPtr viperCellTime;
+
+---------------------------------------------------------------------------------------------------*/
+
+extern void http_vbGetViperCells(struct environment *, void *, void *, sbyte *);
+extern void http_vbGetIpAddress(struct environment *, void *, void *, sbyte *);
+extern void getHelpTopic(struct environment *, void *, void *, sbyte *);
+extern void getHelpDetail(struct environment *, void *, void *, sbyte *);
+extern void getAlarmList(struct environment *, void *, void *, sbyte *);
+extern void getAlarmDetail(struct environment *, void *, void *, sbyte *);
+extern void viperCellTime(struct environment *, void *, void *, sbyte *);
+extern void getCdcPowerSupplyStatus(struct environment *, void *, void *, sbyte *);
+extern void getCdcTemp(struct environment *, void *, void *, sbyte *);
+extern void getIpAddress(struct environment *, void *, void *, sbyte *);
+extern RLSTATUS setIpAddress(struct environment *envVar, void *pDest, void *pString);
+
+/* User Mgmt */
+extern sbyte4
+UserMgmtCmdSet(struct environment *envVar, void *pInputBuffer, void *pSource, sbyte *pArgs);
+/* Smscb Command Get*/
+extern void
+UserMgmtCmdGet(struct environment *envVar, void *pHtmlOutputBuf, void *pSource, sbyte *pArgs);
+
+/* SSL password */
+extern void
+http_vbGetSslPassword(struct environment *envVar, void *pHtmlOutputBuf, void *pSource, sbyte *pArgs);
+extern sbyte4
+http_vbSetSslPassword(struct environment *envVar, void *pInputBuffer, void *pSource, sbyte *pArgs);
+
+/* SSL capability */
+extern void
+http_vbGetSslCapability(struct environment *envVar, void *pHtmlOutputBuf, void *pSource, sbyte *pArgs);
+
+/* CLI status and session termination */
+extern void
+http_vbGetCliStatus(struct environment *envVar, void *pHtmlOutputBuf, void *pSource, sbyte *pArgs);
+extern void
+http_vbTerminateCliSession(struct environment *envVar, void *pHtmlOutputBuf, void *pSource, sbyte *pArgs);
+
+/* The followings routines are defined in cdcUtil/src/CPU_Mon.c */
+extern float DS1780_get1_8_V();
+extern float DS1780_get3_3_V();
+extern float DS1780_get5_0_V();
+extern int DS1780_getCdcTemp();
+
+/* yichoi for reload top_frame to display changed user */
+extern void
+reload_topframeGet(struct environment *envVar, void *pHtmlOutputBuf, void *pSource, sbyte *pArgs);
+
+#endif
+
diff --git a/data/mnet/GP10/Host/Http/include/options_x.h b/data/mnet/GP10/Host/Http/include/options_x.h
new file mode 100644
index 0000000..670d068
--- /dev/null
+++ b/data/mnet/GP10/Host/Http/include/options_x.h
@@ -0,0 +1,36 @@
+#ifndef OPTIONS_X_H
+#define OPTIONS_X_H
+
+extern void Ignite_Groups();
+
+#define __OCP_ENABLED__
+
+#undef __ENABLE_LAN_IP_FILTER__
+
+#undef RLI_CUSTOM_DYNAMIC_IP_FILTER_ENABLED
+#undef RLI_CUSTOM_DYNAMIC_IP_CHECK
+
+#undef __OCP_UDP_ENABLED__
+#undef __OCP_TCP_ENABLED__
+#define __COMMON_LISTENER__
+
+#define kOCP_MESSAGE_BUFSIZE 512
+
+#define kOcpConnIdleLimit 86400
+
+/* Future Extensions */
+
+
+
+
+
+
+
+
+
+
+
+
+#endif /* __OPTIONS_HEADER__ */
+
+
diff --git a/data/mnet/GP10/Host/Http/src/Makefile b/data/mnet/GP10/Host/Http/src/Makefile
new file mode 100644
index 0000000..85a1294
--- /dev/null
+++ b/data/mnet/GP10/Host/Http/src/Makefile
@@ -0,0 +1,216 @@
+#
+#
+# VxWorks Makefile for WebControl, JavaControl, and
+# WebControl/JavaControl. This Makefile relies on pattern
+# matching to match source and object files. For a more
+# explict Makefile that specifies all source and target file
+# matching, please see the pSOS Makefile.
+#
+# NOTE:The default target is a combined
+# WebControl/JavaControl archive file called open.a.
+# Link this archive into the device source code to enable all
+# of the RLI APIs. If using just JavaControl or WebControl
+# APIs, specify 'make java' or 'make http' to create just
+# JavaControl or WebControl archives called java.a or http.a.
+#
+
+#
+# VxWorks specific variables:
+# NOTE: These may differ depending on your system. Change
+# the settings below as necessary.
+#
+.KEEP_STATE:
+
+ADDED_CFLAGS = -g -DROOT_TRACE -DFM_TRACE -DDbgM15_TRACE -DRW_MULTI_THREAD -D_REENTRANT -D__PROTOTYPE_5_0 -D__ENABLE_MEMMGR_DEBUG__ $(EXTRA)
+
+#
+# Rapid Logic source directories:
+# NOTE: If you are using a flat directory just change all
+# directories below to that directory name.
+#
+#
+# Default include directories:
+# NOTE: options.h must be generated by the tool and included in the
+# project. We assume options.h is located in ./include. If options.h
+# is located elsewhere, include its location in the include path.
+#
+
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+MY_OUTPUT = $(OBJDIR)\http.out
+OBJ_DIR = ../bin
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+RLIDIR = $(TOP_OF_VOB)/../THIRD_PARTY/rapidlogic
+RLIMCC = $(TOP_OF_VOB)/../THIRD_PARTY/OamTools/RLI/wcit/tools/snmp/mibcomp/rlimibcomp
+
+COMMON = $(RLIDIR)/common
+OCB = $(RLIDIR)/ocb
+OCP = $(RLIDIR)/ocp
+RLI_OS = $(RLIDIR)/rli_os
+
+WCONTROL = $(RLIDIR)/wcontrol
+
+CUSTOM = .
+
+#
+# default object directory:
+#
+
+OBJ = ../bin
+INC_DIR = ../include
+MOVE = move
+
+
+
+#
+# Default compilation rules:
+# NOTE: You may need to change or delete these rules based on your system
+# setup. For example, if you do not wish debug info included, remove the
+# -g option in CC_FLAGS
+#
+
+CC_INCLUDE += -I$(RLIDIR)/include -I$(OCP)/include -I../include -I$(WIND_BASE)/target/vxworks/h -I$(WCONTROL)/include -I$(WIND_BASE)\target\h\snmp
+CC_FLAGS = -g -O2 -fvolatile -Wall
+CC_COMPILER += -ansi -pedantic -nostdinc
+MAKEFLAGS =
+### if -pipe not is supported on this host
+#CC_COMPILER += -ansi -pedantic -pipe -nostdinc
+
+### insert any necessary linking flags, libraries, etc.
+#LDFLAGS = -rv
+
+WIND_SNMP = $(WIND_BASE)/target/src/snmpv1
+MIBSRC = $(WIND_SNMP)/agent/snmpMib2.mib ../../snmp/ASN1/vipercell.mib
+MDIRS = -l $(WIND_SNMP)/mibs -l ../ASN1
+MCCMIBS = rfc1213.mib
+MCC = mibcomp
+
+
+MIBOID = $(INC_DIR)/miboid.h
+
+$(MIBOID): $(MIBSRC)
+ $(MCC) $(MDIRS) -numbers -o $(OBJDIR)/mib.num rfc1155.smi $(MCCMIBS) $(MIBSRC)
+ sed -e "s/-/_/g" < $(OBJDIR)/mib.num > $(OBJDIR)/mib.num1
+ $(RLIMCC) -a $(OBJDIR)/mib.num1
+ $(RM) $(subst /,$(DIRCHAR), $@ $(OBJDIR)/mib.num $(OBJDIR)/mib.num1)
+ $(MOVE) $(subst /,$(DIRCHAR), miboid.h $@)
+
+
+#
+# pattern matching rules:
+#
+
+$(OBJ)/%.o: $(OCB)/%.c
+ $(CXX) -c $(CFLAGS) -o $@ $<
+
+$(OBJ)/%.o: $(WCONTROL)/%.c
+ $(CXX) -c $(CFLAGS) -o $@ $<
+
+$(OBJ)/%.o: $(COMMON)/%.c
+ $(CXX) -c $(CFLAGS) -o $@ $<
+
+$(OBJ)/%.o: $(RLI_OS)/%.c
+ $(CXX) -c $(CFLAGS) -o $@ $<
+
+$(OBJ)/%.o: $(QS)/%.c
+ $(CXX) -c $(CFLAGS) -o $@ $<
+
+$(OBJ)/%.o: $(OCP)/%.c
+ $(CXX) -c $(CFLAGS) -o $@ $<
+
+$(OBJ)/%.o: $(CUSTOM)/%.c
+ $(CXX) -c $(CFLAGS) -o $@ $<
+
+#
+# object list:
+# NOTE: Ignition.c also must be generated by the tool and included
+# as an object. We have assumed that it will be located in the
+# ./common directory. Make changes below if ignition.c
+# is located elsewhere
+#
+
+# The ./common directory contains source files for standard lib
+# functions and other common functionality.
+COMMON_OBJ = access.o auth.o base64.o binsrch.o compare.o \
+ convert.o hash.o linklist.o md5.o msghdlr.o \
+ rlstdlib.o sizeof.o tcpd.o tree.o creatint.o
+
+# The ./ocb directory contains source files for the OpenControl
+# Backplane and SNMP MibWay code.
+# NOTE: Add the source file names on your MibWay disk to the objects
+# below. For example, if using MibWay for the Epilogue Envoy SNMP
+# stack you would add oc_envoy.o and ocev_cnv.o below.
+OCB_OBJ = cache.o database.o environ.o mibsrch.o ocb_init.o \
+ ocsnmp.o oc_envoy.o ocev_cnv.o
+
+# The ./ocp directory contains source files for JavaControl functions
+OCP_OBJ = ocp.o ocpconn.o ocpd.o ocpdb.o ocpevt.o ocpgroup.o \
+ ocpmm.o ocpopt.o ocpstart.o ocptcp.o ocputil.o
+
+# The ./rli_os directory contains source files for OS specific
+# functionality and porting
+
+
+
+RLI_OS_OBJ = ansifs.o chorus.o crc32.o decomp.o filemgr.o \
+ memmgr.o nucleus.o posix.o prop_os.o \
+ psos.o skchorus.o skt_prop.o skt_psos.o sktposix.o \
+ sock_nu.o sock_vrt.o sock_vxw.o sock_w32.o vrtx.o \
+ vxworks.o win32.o inflate.o
+
+
+# The ./wcontrol directory contains source files for WebControl
+# functions
+WCONTROL_OBJ = chunk.o enum.o http10.o http11.o httpd.o macro.o \
+ persist.o post.o registry.o request.o response.o \
+ smtp.o txengine.o upload.o wc_start.o wctools.o
+
+# The ./custom directory contains source files which are modified
+# at our environment
+
+CUSTOM_OBJ = ignition.o http_main.o http_event.o\
+ http_security.o http_post.o http_feedback.o http_oamOperation.o
+
+
+#
+# dependency variables:
+#
+
+RLI_OBJS = $(COMMON_OBJ) $(OCB_OBJ) $(RLI_OS_OBJ)
+JCONTROL_DEP = $(OCP_OBJ:%=$(OBJ)/%)
+WCONTROL_DEP = $(WCONTROL_OBJ:%=$(OBJ)/%)
+RLI_DEP = $(RLI_OBJS:%=$(OBJ)/%)
+CUSTOM_DEP = $(CUSTOM_OBJ:%=$(OBJ)/%)
+
+RM = vxrm
+#
+# targets:
+# NOTE: By default all the provided targets create an archive of
+# objects. To create a library or executable, change the target
+# commands LD/LDFLAGS.
+#
+
+MY_OUTPUT = $(OBJDIR)\http.out
+MODULE_OBJS = $(MIBOID) $(RLI_DEP) $(JCONTROL_DEP) $(WCONTROL_DEP) $(CUSTOM_DEP)
+
+all: $(MY_OUTPUT)
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ $(LD) $(LDFLAGS) -r -o $@ $(RLI_DEP) $(JCONTROL_DEP) $(WCONTROL_DEP) $(CUSTOM_DEP)
+ @echo WebControl and JavaControl archive $@ created
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT) \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Http/src/ignition_x.c b/data/mnet/GP10/Host/Http/src/ignition_x.c
new file mode 100644
index 0000000..623cead
--- /dev/null
+++ b/data/mnet/GP10/Host/Http/src/ignition_x.c
@@ -0,0 +1,18 @@
+#include "options_x.h"
+#include "options.h"
+#include "rlstddef.h"
+#include "linklist.h"
+#include "ocpgroup.h"
+
+void Ignite_Groups()
+{
+ OCPGRP_CreateGroup("QSOneGroup");
+ OCPGRP_AddGroupMember("QSOneGroup", "QSErrorData");
+
+ OCPGRP_CreateGroup("QSTwoGroup");
+ OCPGRP_AddGroupMember("QSTwoGroup", "QSEvent");
+ OCPGRP_AddGroupMember("QSTwoGroup", "QSPoll");
+
+}
+
+
diff --git a/data/mnet/GP10/Host/Makefile b/data/mnet/GP10/Host/Makefile
new file mode 100644
index 0000000..8c14e20
--- /dev/null
+++ b/data/mnet/GP10/Host/Makefile
@@ -0,0 +1,13 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS = snmp subsc cc cdc_bsp cdr csunew voip jcc l1proxy lapdm logging mm ril3 rm root socket sslc mch pm alarm http cli cdcUtils TimeSync TcpServer grr rlc_mac bssgp gslink
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..
+
+include $(TOP_OF_VOB)\l3defs.mk
diff --git a/data/mnet/GP10/Host/Mch/Makefile b/data/mnet/GP10/Host/Mch/Makefile
new file mode 100644
index 0000000..8fae62d
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/Makefile
@@ -0,0 +1,16 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src src_api src_init post applet
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ $(CP) bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Mch/applet/DialogLayout.java b/data/mnet/GP10/Host/Mch/applet/DialogLayout.java
new file mode 100644
index 0000000..6781a08
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/applet/DialogLayout.java
@@ -0,0 +1,179 @@
+////////////////////////////////////////////////////////////////////////////
+//
+// FILE NAME: DialogLayout.java
+//
+// DESCRIPTION: This file contains DialogLayout Class
+//
+// COMPONENTS:
+//
+//
+// NOTES:
+//
+// (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+//
+// REVISION HISTORY
+//__________________________________________________________________
+//----------+--------+----------------------------------------------
+// Name | Date | Reason
+//----------+--------+----------------------------------------------
+// Bhawani |2/08/00 | Initial Draft
+//----------+--------+----------------------------------------------
+//////////////////////////////////////////////////////////////////////////
+//
+import java.util.Hashtable;
+import java.awt.LayoutManager;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.Rectangle;
+import java.awt.FontMetrics;
+import java.awt.Insets;
+import java.awt.Label;
+
+//
+// class DialogLayout
+//
+// DialogLayout is a simple layout manager which works with what the Win32
+// API calls "dialog logical units" (DLUs). DLUs are resolution independent
+// coordinates which work well for laying out controls on a dialog box. The
+// mapping from DLUs to pixels is based on the font in use in the dialog box.
+// An x-coordinate DLU is described as 1/4 (.25) of the of the average character
+// width of the font used in the dialog. A y-coordinate DLU is described as
+// 1/8 (.125) of the character height used in the dialog. One tricky issue to
+// note: The average character width is not the average of all characters --
+// rather it is the average of all alpha characters both uppercase and
+// lowercase. That is, it is the extent of the string "a...zA...Z" divided
+// by 52.
+//
+// This class allows you to associate a Rectangle (x, y, width, height) with a
+// Component in a Container. If called upon to layout the container, this
+// layout manager will layout based on the translation of dialog units to
+// pixels.
+//
+
+public class DialogLayout
+ implements LayoutManager
+{
+ protected Hashtable m_map = new Hashtable();
+ protected int m_width;
+ protected int m_height;
+
+ // DialogLayout methods
+
+ public DialogLayout(Container parent, int width, int height)
+ {
+ Construct(parent, width, height);
+ }
+
+ public DialogLayout(Container parent, Dimension d)
+ {
+ Construct(parent, d.width, d.height);
+ }
+
+ public void setShape(Component comp, int x, int y, int width, int height)
+ {
+ m_map.put(comp, new Rectangle(x, y, width, height));
+ }
+
+ public void setShape(Component comp, Rectangle rect)
+ {
+ m_map.put(comp, new Rectangle(rect.x, rect.y, rect.width, rect.height));
+ }
+
+ public Rectangle getShape(Component comp)
+ {
+ Rectangle rect = (Rectangle)m_map.get(comp);
+ return new Rectangle(rect.x, rect.y, rect.width, rect.height);
+ }
+
+ public Dimension getDialogSize()
+ {
+ return new Dimension(m_width, m_height);
+ }
+
+ // LayoutManager Methods
+
+ public void addLayoutComponent(String name, Component comp) { }
+ public void removeLayoutComponent(Component comp) { }
+
+ public Dimension preferredLayoutSize(Container parent)
+ {
+ return new Dimension(m_width, m_height);
+ }
+
+ public Dimension minimumLayoutSize(Container parent)
+ {
+ return new Dimension(m_width, m_height);
+ }
+
+ public void layoutContainer(Container parent)
+ {
+ int count = parent.getComponentCount();
+ Rectangle rect = new Rectangle();
+ int charHeight = getCharHeight(parent);
+ int charWidth = getCharWidth(parent);
+ Insets insets = parent.getInsets();
+ FontMetrics m = parent.getFontMetrics(parent.getFont());
+
+ for (int i = 0; i < count; i++)
+ {
+ Component c = parent.getComponent(i);
+ Rectangle r = (Rectangle)m_map.get(c);
+ if (r != null)
+ {
+ rect.x = r.x;
+ rect.y = r.y;
+ rect.height = r.height;
+ rect.width = r.width;
+ mapRectangle(rect, charWidth, charHeight);
+ //if (c instanceof Label)
+ //{
+ // Adjusts for space at left of Java labels.
+ // rect.x -= 12;
+ // rect.width += 12;
+ // }
+
+ rect.x += insets.left;
+ rect.y += insets.top;
+ c.setBounds(rect.x, rect.y, rect.width, rect.height);
+ }
+ }
+ }
+
+ // Implementation Helpers
+
+ protected void Construct(Container parent, int width, int height)
+ {
+ Rectangle rect = new Rectangle(0, 0, width, height);
+ mapRectangle(rect, getCharWidth(parent), getCharHeight(parent));
+ m_width = rect.width;
+ m_height = rect.height;
+ }
+
+ protected int getCharWidth(Container parent)
+ {
+ FontMetrics m = parent.getFontMetrics(parent.getFont());
+ String s = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ int width = m.stringWidth(s) / s.length();
+
+ if (width <= 0)
+ width = 1;
+ return width;
+ }
+
+ protected int getCharHeight(Container parent)
+ {
+ FontMetrics m = parent.getFontMetrics(parent.getFont());
+ int height = m.getHeight();
+ return height;
+ }
+
+ protected void mapRectangle(Rectangle rect, int charWidth, int charHeight)
+ {
+ rect.x = (rect.x * charWidth) / 4;
+ rect.y = (rect.y * charHeight) / 8;
+ rect.width = (rect.width * charWidth) / 4;
+ rect.height = (rect.height * charHeight) / 8;
+ }
+}
+
diff --git a/data/mnet/GP10/Host/Mch/applet/Makefile b/data/mnet/GP10/Host/Mch/applet/Makefile
new file mode 100644
index 0000000..6445c3e
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/applet/Makefile
@@ -0,0 +1,71 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+####################################################################
+#
+# FILE NAME: Makefile
+#
+# DESCRIPTION: This makefile creates the vipercell related class
+# files
+# COMPONENTS:
+#
+#
+# NOTES:
+#
+# REVISION HISTORY
+#__________________________________________________________________
+#----------+--------+----------------------------------------------
+# Name | Date | Reason
+#----------+--------+----------------------------------------------
+# Bhawani |08/21/00| Initial Draft
+#----------+--------+----------------------------------------------
+####################################################################
+#/
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+OBJ_DIR = ../bin
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+SOURCE_LIST = $(wildcard *.java)
+
+OAMROOT = $(TOP_OF_VOB)\..\THIRD_PARTY\OAMTOOLS
+RLIROOT = $(OAMROOT)\RLI
+JDKROOT = $(OAMROOT)\jdk1.1.5
+MCHJAR = ..\..\ViperWatch\Java\mch.jar
+JAR = $(JDKROOT)\bin\jar
+
+CABARC = $(RLIROOT)\jcit\tools\cabarc\Cabarc.exe
+JAVAC = $(JDKROOT)\bin\javac.exe
+
+#CLASSPATH = -classpath $(JDKROOT)lib -classpath $(RLIROOT)\jcit
+
+CLASSPATH = .;$(JDKROOT)\lib;$(JDKROOT)\lib\classes.zip;$(RLIROOT)\jcit;$(RLIROOT)\jcit\rlclass.zip;\$(RLIROOT)\jcit\symbeans.jar;$(RLIROOT)\jcit\Jars\Gauges.jar;$(RLIROOT)\jcit\Jars\RLBeans.jar
+
+all: $(MCHJAR)
+
+MCH_SRC= mchControl.java DialogLayout.java ResponseTextArea.java MchCommThread.java
+MCH_CLASS = $(MCH_SRC:.java=.class)
+
+
+$(MCHJAR): $(MCH_CLASS)
+ $(JAR) cvf $@ $(MCH_CLASS)
+
+$(MCH_CLASSES):%
+
+%.class : %.java
+ @ $(RM) $(subst \,$(DIRCHAR),$@)
+ $(JAVAC) -classpath $(CLASSPATH) $<
+
+clean:
+ $(RM) $(subst \,$(DIRCHAR), $(MCH_CLASS))
+
+cleanall:
+ $(MAKE) clean
+ $(RM) $(subst \,$(DIRCHAR), $(MCHCAB))
diff --git a/data/mnet/GP10/Host/Mch/applet/MchCommThread.java b/data/mnet/GP10/Host/Mch/applet/MchCommThread.java
new file mode 100644
index 0000000..674cd96
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/applet/MchCommThread.java
@@ -0,0 +1,111 @@
+////////////////////////////////////////////////////////////////////////////
+//
+// FILE NAME: MchCommThread.java
+//
+// DESCRIPTION: This file contains a class that allow the applet to
+// communicate with the Tcp Server at the ViperCell
+// COMPONENTS:
+//
+//
+// NOTES:
+//
+// (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+//
+// REVISION HISTORY
+//__________________________________________________________________
+//----------+--------+----------------------------------------------
+// Name | Date | Reason
+//----------+--------+----------------------------------------------
+// Bhawani |2/08/00 | Initial Draft
+//----------+--------+----------------------------------------------
+//////////////////////////////////////////////////////////////////////////
+//
+
+import java.net.*;
+import java.io.*;
+import java.awt.TextArea;
+
+
+class MchCommThread extends Thread {
+ private Socket socket;
+ private BufferedReader in;
+ private PrintWriter out;
+ private ResponseTextArea p_txtArea;
+ private boolean running;
+
+ public MchCommThread(String addr, short port) {
+ System.out.println("Initializing TCP/Ip socket environment");
+ try {
+ socket = new Socket(addr, port);
+ } catch(IOException e) {
+ // If the creation of the socket fails,
+ // nothing needs to be cleaned up.
+ System.out.println("Could not connect to the Server" + addr + "at port " + port + ": " + socket);
+ }
+ try {
+ in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
+ // Enable auto-flush:
+ out = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));
+ // register client's message group
+ out.print("MchApplication");
+ out.flush();
+ } catch(IOException e) {
+ // The socket should be closed on any
+ // failures other than the socket
+ // constructor:
+ System.out.println("IO error in MchCommThread: ");
+ try {
+ socket.close();
+ } catch(IOException e2) {}
+ }
+ // Otherwise the socket will be closed by
+ // the run() method of the thread.
+ }
+
+ public void send(String str)
+ {
+ out.print(str);
+ out.flush();
+ }
+
+ public void startReadThread(ResponseTextArea txtArea)
+ {
+
+ p_txtArea = txtArea;
+ start();
+ }
+ public void run() {
+ try {
+ running = true;
+ while (running) {
+ if(in.ready())
+ {
+ String str = in.readLine();
+ p_txtArea.addItem(str + "\n");
+ } else {
+ try {
+ this.sleep(100);
+ } catch (InterruptedException ie) {
+ System.out.println(" Interrupted Excution = " + ie);
+ }
+ }
+ }
+ } catch(IOException e3) {
+ System.out.println(" IO expection at read thread" + e3 );
+ } finally {
+ // Always close it:
+ try {
+ System.out.println("Socket is closing");
+ socket.close();
+ } catch(IOException e) {}
+ // Ending this thread
+ }
+ }
+
+ public void finishReadThread()
+ {
+ System.out.println("The read thread is being shutdown");
+ running = false;
+ }
+}
+
diff --git a/data/mnet/GP10/Host/Mch/applet/ResponseTextArea.java b/data/mnet/GP10/Host/Mch/applet/ResponseTextArea.java
new file mode 100644
index 0000000..6ca3480
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/applet/ResponseTextArea.java
@@ -0,0 +1,40 @@
+////////////////////////////////////////////////////////////////////////////
+//
+// FILE NAME: ResponseTextArea.java
+//
+// DESCRIPTION: This file contains routine for the response area class
+//
+// COMPONENTS:
+//
+//
+// NOTES:
+//
+// (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+//
+// REVISION HISTORY
+//__________________________________________________________________
+//----------+--------+----------------------------------------------
+// Name | Date | Reason
+//----------+--------+----------------------------------------------
+// Bhawani |2/08/00 | Initial Draft
+//----------+--------+----------------------------------------------
+//////////////////////////////////////////////////////////////////////////
+//
+
+import java.awt.TextArea;
+import java.awt.Font;
+
+public class ResponseTextArea extends TextArea
+{
+ public ResponseTextArea()
+ {
+ super("", 0, 0, SCROLLBARS_BOTH);
+ super.setEditable(false);
+ super.setFont(new Font("Courier", Font.PLAIN, 12));
+ }
+
+ public void addItem(String s)
+ {
+ append(s);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Mch/applet/mch.htm b/data/mnet/GP10/Host/Mch/applet/mch.htm
new file mode 100644
index 0000000..6f35a50
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/applet/mch.htm
@@ -0,0 +1,16 @@
+<HTML>
+<HEAD>
+<H3>Maintenance Command Handler</H3>
+</HEAD>
+<BODY>
+<APPLET archive="./mch.jar,./jcsrarcf.jar,./jcusarcf.jar"
+ code=mchControl.class height=480 width=640 id=Applet1 VIEWASTEXT>
+ <PARAM NAME="maxpacketlength" VALUE="4096">
+ <PARAM NAME="port" VALUE="80">
+ <PARAM NAME="deviceip" VALUE="$%viperCellIPAddress#$">
+ <PARAM NAME="useudp" VALUE="no">
+ <param name=cabbase value="mch.cab,jcsrarcf.cab,jcusarcf.cab">
+</APPLET>
+
+</BODY>
+</HTML>
diff --git a/data/mnet/GP10/Host/Mch/applet/mch.vjp b/data/mnet/GP10/Host/Mch/applet/mch.vjp
new file mode 100644
index 0000000..8234265
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/applet/mch.vjp
Binary files differ
diff --git a/data/mnet/GP10/Host/Mch/applet/mchControl.java b/data/mnet/GP10/Host/Mch/applet/mchControl.java
new file mode 100644
index 0000000..5a30f8e
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/applet/mchControl.java
@@ -0,0 +1,177 @@
+////////////////////////////////////////////////////////////////////////////
+//
+// FILE NAME: mchControl.java
+//
+// DESCRIPTION: This file contains mchControl applet class
+//
+// COMPONENTS:
+//
+//
+// NOTES:
+//
+// (C) Copyright 1999 JetCell Inc., CA, USA http://www.jetcell.com/
+//
+// REVISION HISTORY
+//__________________________________________________________________
+//----------+--------+----------------------------------------------
+// Name | Date | Reason
+//----------+--------+----------------------------------------------
+// Bhawani |2/08/00 | Initial Draft
+//----------+--------+----------------------------------------------
+//////////////////////////////////////////////////////////////////////////
+//
+import java.awt.*;
+import java.awt.event.*;
+import java.net.*;
+import java.applet.*;
+import DialogLayout;
+import ResponseTextArea;
+import MchCommThread;
+
+public class mchControl extends Applet implements ActionListener
+{
+ Container m_Parent = null;
+ boolean m_fInitialized = false;
+ DialogLayout m_Layout;
+
+ // Control definitions
+ //--------------------------------------------------------------------------
+ Button sendButton;
+ TextField cmdTextField;
+ Label Lbl1;
+ Label Lbl2;
+ ResponseTextArea rspTextArea;
+ Button Clear;
+ MchCommThread commObj;
+
+ public final static short TCP_SERVER_PORT = 10977;
+
+ // Constructor
+ //--------------------------------------------------------------------------
+ public void init()
+ {
+ Class[] param = { java.lang.String.class };
+ m_Parent = this;
+
+ System.out.println("init method has been called");
+ CreateControls();
+ commObj = new MchCommThread(getCodeBase().getHost(), TCP_SERVER_PORT);
+ commObj.startReadThread(rspTextArea);
+
+ }
+
+ public void destroy()
+ {
+ commObj.finishReadThread();
+ System.out.println("Destroy method has been called");
+ }
+
+ public void start()
+ {
+ System.out.println("The applet has started");
+ }
+
+ public void stop()
+ {
+ System.out.println("The applet has stopped");
+ }
+
+
+ // Initialization.
+ //--------------------------------------------------------------------------
+ public boolean CreateControls()
+ {
+ // CreateControls should be called only once
+ //----------------------------------------------------------------------
+ if (m_fInitialized || m_Parent == null)
+ return false;
+
+ // m_Parent must be extended from the Container class
+ //----------------------------------------------------------------------
+ if (!(m_Parent instanceof Container))
+ return false;
+
+ // Since a given font may not be supported across all platforms, it
+ // is safe to modify only the size of the font, not the typeface.
+ //----------------------------------------------------------------------
+ Font OldFnt = m_Parent.getFont();
+ if (OldFnt != null)
+ {
+ Font NewFnt = new Font(OldFnt.getName(), OldFnt.getStyle(), 8);
+
+ m_Parent.setFont(NewFnt);
+ }
+
+ // All position and sizes are in dialog logical units, so we use a
+ // DialogLayout as our layout manager.
+ //----------------------------------------------------------------------
+ m_Layout = new DialogLayout(m_Parent, 400, 295);
+ m_Parent.setLayout(m_Layout);
+ m_Parent.addNotify();
+
+ Dimension size = m_Layout.getDialogSize();
+ Insets insets = m_Parent.getInsets();
+
+ m_Parent.setSize(insets.left + size.width + insets.right,
+ insets.top + size.height + insets.bottom);
+
+ // Control creation
+ //----------------------------------------------------------------------
+ Lbl1 = new Label ("Command:", Label.LEFT);
+ m_Parent.add(Lbl1);
+ m_Layout.setShape(Lbl1, 10, 10, 56, 16);
+
+ cmdTextField = new TextField ("Type your command and press send");
+ m_Parent.add(cmdTextField);
+ m_Layout.setShape(cmdTextField, 15, 26, 340, 16);
+ cmdTextField.setFont(new Font("Courier", Font.BOLD, 12));
+ cmdTextField.addActionListener(this);
+
+ sendButton = new Button ("Send");
+ m_Parent.add(sendButton);
+ m_Layout.setShape(sendButton, 15+340+10, 26, 40, 16);
+ sendButton.addActionListener(this);
+
+
+ Lbl2 = new Label ("Response:", Label.LEFT);
+ m_Parent.add(Lbl2);
+ m_Layout.setShape(Lbl2, 15, 50, 56, 16);
+
+ rspTextArea = new ResponseTextArea();
+ m_Parent.add(rspTextArea);
+ m_Layout.setShape(rspTextArea, 15, 66, 400, 200);
+
+ Clear = new Button("Clear");
+ m_Parent.add(Clear);
+ m_Layout.setShape(Clear, 370, 275, 40, 16);
+ Clear.addActionListener(this);
+
+
+ m_fInitialized = true;
+ return true;
+ }
+
+ // Handling the WFC events
+ //----------------------------------------------------------------------
+ public void actionPerformed(ActionEvent evt) {
+
+
+ if (evt.getSource().equals(sendButton))
+ {
+ String buttonName = ((Button)evt.getSource()).getLabel();
+ //System.out.println("You clicked button " + buttonName);
+ commObj.send(cmdTextField.getText());
+ } else if (evt.getSource().equals(Clear)) {
+ String buttonName = ((Button)evt.getSource()).getLabel();
+ // System.out.println("You clicked button " + buttonName);
+ rspTextArea.setText("");
+
+ } else {
+ // System.out.println("You pressed Enter key");
+ commObj.send(cmdTextField.getText());
+ }
+
+
+ }
+
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Mch/doc/Diagnostics_and_Test_Design_Spec.doc b/data/mnet/GP10/Host/Mch/doc/Diagnostics_and_Test_Design_Spec.doc
new file mode 100644
index 0000000..2c369a4
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/doc/Diagnostics_and_Test_Design_Spec.doc
Binary files differ
diff --git a/data/mnet/GP10/Host/Mch/doc/Maintenance_Command_Handler_Design_Spec.doc b/data/mnet/GP10/Host/Mch/doc/Maintenance_Command_Handler_Design_Spec.doc
new file mode 100644
index 0000000..dfdb710
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/doc/Maintenance_Command_Handler_Design_Spec.doc
Binary files differ
diff --git a/data/mnet/GP10/Host/Mch/include/CdcDiags.h b/data/mnet/GP10/Host/Mch/include/CdcDiags.h
new file mode 100644
index 0000000..b6a7391
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/include/CdcDiags.h
@@ -0,0 +1,612 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CdcDiags.h
+// Author(s) : Tim Olson
+// Create Date : 6/29/99
+// Description :
+//
+// *******************************************************************
+#ifndef _CDCDIAGS_H_
+#define _CDCDIAGS_H_ /* include once only */
+
+
+#include "Diagnostic.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "cdc_bsp/i2c.h"
+
+#ifdef __cplusplus
+}
+#endif
+
+class HPIMemoryTest : public Diagnostic {
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: HPIMemoryTest constructor
+ **
+ ** PURPOSE: Initialize data members for HPIMemoryTest object.
+ **
+ ** INPUT PARAMETERS: testName - ASCII name for test
+ ** testNum - test number
+ ** reqSrc - source of the diagnostic request
+ ** parms - pointer to parameter list in ASCII
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ HPIMemoryTest(char *testName, int testNum, ReqSourceType reqSrc, char *parms);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: HPIMemoryTest destructor
+ **
+ ** PURPOSE: Delete data members for HPIMemoryTest object.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ ~HPIMemoryTest();
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: HPIMemoryTest::InitiateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int InitiateDiagnostic(void);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: HPIMemoryTest::TerminateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int TerminateDiagnostic(void);
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: HPIMemoryTest::GetDiagnosticHelp
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): help string
+ **
+ **----------------------------------------------------------------------------*/
+ char *GetDiagnosticHelp(void);
+
+private:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: HPIMemoryTest constructor
+ **
+ ** PURPOSE: This is the default constructor for HPIMemoryTest. It is
+ ** defined in the private section and cannot be used to create an instance of
+ ** HPIMemoryTest.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ HPIMemoryTest() : Diagnostic(0,0,(ReqSourceType)0,0) {}
+
+};
+
+
+
+class I2CLoopbackTest : public Diagnostic {
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: I2CLoopbackTest constructor
+ **
+ ** PURPOSE: Initialize data members for I2CLoopbackTest object.
+ **
+ ** INPUT PARAMETERS: testName - ASCII name for test
+ ** testNum - test number
+ ** reqSrc - source of the diagnostic request
+ ** parms - pointer to parameter list in ASCII
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ I2CLoopbackTest(char *testName, int testNum, ReqSourceType reqSrc, char *parms);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: I2CLoopbackTest destructor
+ **
+ ** PURPOSE: Delete data members for I2CLoopbackTest object.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ ~I2CLoopbackTest();
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: I2CLoopbackTest::InitiateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int InitiateDiagnostic(void);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: I2CLoopbackTest::TerminateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int TerminateDiagnostic(void);
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: I2CLoopbackTest::GetDiagnosticHelp
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): help string
+ **
+ **----------------------------------------------------------------------------*/
+ char *GetDiagnosticHelp(void);
+
+private:
+
+ int numBytes, verbose, numErrs, haltOnErr;
+ unsigned int duration;
+ unsigned long totalSent;
+ char testName[256];
+ unsigned char writeBuf[I2C_TX_LEN];
+ unsigned char readBuf[I2C_RX_LEN];
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: I2CLoopbackTest constructor
+ **
+ ** PURPOSE: This is the default constructor for I2CLoopbackTest. It is
+ ** defined in the private section and cannot be used to create an instance of
+ ** I2CLoopbackTest.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ I2CLoopbackTest() : Diagnostic(0,0,(ReqSourceType)0,0) {}
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: I2CLoopbackTest::ProcessMessage
+ **
+ ** PURPOSE: Process messages not handled by Diagnostic base class. The
+ ** only expected message is I2C_LOOPBACK_CONTINUE. When this message
+ ** is received another buffer of data is sent to the I2C.
+ **
+ ** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+ **
+ ** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+ ** STOP_TEST - if the controlling message loop should end
+ **
+ **----------------------------------------------------------------------------*/
+ int ProcessMessage(DiagnosticMsgType diagMsg);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: I2CLoopbackTest::SendI2CData
+ **
+ ** PURPOSE: Send some data to the I2C for loopback.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+ ** STOP_TEST - if the controlling message loop should end
+ **
+ **----------------------------------------------------------------------------*/
+ int SendI2CData(void);
+
+};
+
+
+class DSPMemTest : public Diagnostic {
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPMemTest constructor
+ **
+ ** PURPOSE: Initialize data members for DSPMemTest object.
+ **
+ ** INPUT PARAMETERS: testName - ASCII name for test
+ ** testNum - test number
+ ** reqSrc - source of the diagnostic request
+ ** parms - pointer to parameter list in ASCII
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ DSPMemTest(char *testName, int testNum, ReqSourceType reqSrc, char *parms);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPMemTest destructor
+ **
+ ** PURPOSE: Delete data members for DSPMemTest object.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ ~DSPMemTest();
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPMemTest::InitiateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int InitiateDiagnostic(void);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPMemTest::TerminateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int TerminateDiagnostic(void);
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPMemTest::GetDiagnosticHelp
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): help string
+ **
+ **----------------------------------------------------------------------------*/
+ char *GetDiagnosticHelp(void);
+
+private:
+
+ int testLoc, testType, testTypeTmp, numErrs, verbose;
+ unsigned int duration, dsp, testPattern, zerosPattern, onesPattern, seed;
+ char testName[256];
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPMemTest::TestDspMemBlock
+ **
+ ** PURPOSE: Test the RAM at the given address with testPattern.
+ **
+ ** INPUT PARAMETERS: startAddr - starting location to test
+ ** endAddr - ending location to test
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void TestDspMemBlock(unsigned int startAddr, unsigned int endAddr);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPMemTest::TestDspMemBlockIncAddr
+ **
+ ** PURPOSE: Test the RAM at the given address with testPattern.
+ **
+ ** INPUT PARAMETERS: startAddr - starting location to test
+ ** endAddr - ending location to test
+ ** doInverse - test the inverse of incrementing address.
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void TestDspMemBlockIncAddr(unsigned int startAddr, unsigned int endAddr,
+ int doInverse);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPMemTest::TestDspMemBlockRandom
+ **
+ ** PURPOSE: Test the RAM at the given address range with random data.
+ **
+ ** INPUT PARAMETERS: startAddr - starting location to test
+ ** endAddr - ending location to test
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void TestDspMemBlockRandom(unsigned int startAddr, unsigned int endAddr);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPMemTest constructor
+ **
+ ** PURPOSE: This is the default constructor for DSPMemTest. It is
+ ** defined in the private section and cannot be used to create an instance of
+ ** DSPMemTest.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ DSPMemTest() : Diagnostic(0,0,(ReqSourceType)0,0) {}
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPMemTest::ProcessMessage
+ **
+ ** PURPOSE: Process messages not handled by Diagnostic base class. The
+ ** only expected message is DSPMemTest.
+ **
+ ** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+ **
+ ** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+ ** STOP_TEST - if the controlling message loop should end
+ **
+ **----------------------------------------------------------------------------*/
+ int ProcessMessage(DiagnosticMsgType diagMsg);
+
+};
+
+/*******************************************************************************
+*/
+class CFTest : public Diagnostic
+{
+
+public:
+
+ // constructor
+ CFTest
+ (
+ char *testName, // IN: name for test
+ int testNum, // IN: test number
+ ReqSourceType reqSrc, // IN: source of the diagnostic request
+ char *parms // IN: pointer to parameter list
+ );
+
+ // destructor
+ ~CFTest();
+
+ int InitiateDiagnostic(void); // RETURN: status
+
+ int TerminateDiagnostic(void); // RETURN: status
+
+ char *GetDiagnosticHelp(void); // RETURN: help string
+
+
+private:
+
+ // default constructor
+ /* defined in the private section and cannot be used to create an instance of
+ CFTest */
+ CFTest() : Diagnostic(0,0,(ReqSourceType)0,0) {}
+
+}; // class CFTest
+
+
+class FPGATest : public Diagnostic {
+public:
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: FPGATest constructor
+**
+** PURPOSE: Initialize data members for FPGATest object.
+**
+** INPUT PARAMETERS: testName - ASCII name for test
+** testNum - test number
+** reqSrc - source of the diagnostic request
+** parms - pointer to parameter list in ASCII
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+FPGATest(char *testName, int testNum, ReqSourceType reqSrc, char *parms);
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: FPGATest destructor
+**
+** PURPOSE: Delete data members for FPGATest object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+~FPGATest();
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: FPGATest::InitiateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int InitiateDiagnostic(void);
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: FPGATest::TerminateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int TerminateDiagnostic(void);
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: FPGATest::GetDiagnosticHelp
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): help string
+**
+**----------------------------------------------------------------------------*/
+char *GetDiagnosticHelp(void);
+
+private:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: FPGATest constructor
+ **
+ ** PURPOSE: This is the default constructor for FPGATest. It is
+ ** defined in the private section and cannot be used to create an instance of
+ ** FPGATest.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ FPGATest() : Diagnostic(0,0,(ReqSourceType)0,0) {}
+
+};
+
+class I2CTest : public Diagnostic {
+public:
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: I2CTest constructor
+**
+** PURPOSE: Initialize data members for FPGI2CTestATest object.
+**
+** INPUT PARAMETERS: testName - ASCII name for test
+** testNum - test number
+** reqSrc - source of the diagnostic request
+** parms - pointer to parameter list in ASCII
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+I2CTest(char *testName, int testNum, ReqSourceType reqSrc, char *parms);
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: I2CTest destructor
+**
+** PURPOSE: Delete data members for I2CTest object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+~I2CTest();
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: I2CTest::InitiateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int InitiateDiagnostic(void);
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: I2CTest::TerminateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int TerminateDiagnostic(void);
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: I2CTest::GetDiagnosticHelp
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): help string
+**
+**----------------------------------------------------------------------------*/
+char *GetDiagnosticHelp(void);
+
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Mch/include/Diagnostic.h b/data/mnet/GP10/Host/Mch/include/Diagnostic.h
new file mode 100644
index 0000000..56101be
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/include/Diagnostic.h
@@ -0,0 +1,348 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : Diagnostic.h
+// Author(s) : Tim Olson
+// Create Date : 6/29/99
+// Description :
+//
+// *******************************************************************
+#ifndef Diagnostic_H
+#define Diagnostic_H
+
+#include <lstLib.h>
+#include <timers.h>
+#include <msgQLib.h>
+#include "MCH/MCHIntf.h"
+
+#define CONTINUE_TEST 0
+#define STOP_TEST 1
+
+#define DIAG_GROUP_NUM_BITS 8
+#define DIAG_DIAGS_PER_GROUP (1<<DIAG_GROUP_NUM_BITS)
+#define DIAG_TEST_NUM_MASK (DIAG_DIAGS_PER_GROUP - 1)
+
+enum DIAG_TEST_BUMBERS {
+ DIAG_CDC_DIAGNOSTICS = 0x000,
+ DIAG_HPI_MEMORY_TEST,
+ DIAG_I2C_LOOPBACK_TEST,
+ DIAG_DSP_MEM_TEST,
+ DIAG_CF_TEST,
+ DIAG_FPGA_TEST,
+ DIAG_I2C_TEST,
+
+ DIAG_DSP_DIAGNOSTICS = 0x100,
+ DIAG_DSP_LOOPBACK,
+ DIAG_DSP_MS_REPORT,
+ DIAG_DSP_HO_REPORT,
+ DIAG_DSP_DL_REPORT,
+ DIAG_DSP_HPI_ECHO_TEST,
+ DIAG_DSP_BBLOOPBACK,
+ DIAG_DSP_EXTMEM,
+ DIAG_DSP_IF_REPORT,
+ DIAG_DSP_GPRS_MS_REPORT,
+
+ DIAG_RF_DIAGNOSTICS = 0x200,
+
+ DIAG_CLK_DIAGNOSTICS = 0x300,
+
+ DIAG_GPS_DIAGNOSTICS = 0x400,
+
+ DIAG_SYSTEM_DIAGNOSTICS = 0x500,
+ DIAG_SYSTEM_NETWORK_TEST_SERVER,
+ DIAG_SYSTEM_NETWORK_TEST_TRANSMIT,
+
+ DIAG_LAST_DIAG_GROUP = 0x600
+};
+
+extern char **DiagNames[DIAG_LAST_DIAG_GROUP>>DIAG_GROUP_NUM_BITS];
+extern char *CDCDiagNames[DIAG_DIAGS_PER_GROUP];
+extern char *DSPDiagNames[DIAG_DIAGS_PER_GROUP];
+extern char *RFDiagNames[DIAG_DIAGS_PER_GROUP];
+extern char *CLKDiagNames[DIAG_DIAGS_PER_GROUP];
+extern char *GPSDiagNames[DIAG_DIAGS_PER_GROUP];
+extern char *SystemDiagNames[DIAG_DIAGS_PER_GROUP];
+
+#define DIAG_TEST_MAX_MSGS 100
+#define DIAGNOSTIC_TEST_TASK_PRI 200
+#define DIAGNOSTIC_TEST_STACK_SIZE 10000
+
+
+// *******************************************************************
+// Diagnostic
+// *******************************************************************
+
+
+class Diagnostic : public NODE
+{
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: Diagnostic constructor
+ **
+ ** PURPOSE: Initialize paramters for diagnostic base class.
+ **
+ ** INPUT PARAMETERS: testName - ASCII name for test
+ ** testNum - test number
+ ** reqSrc - source of the diagnostic request
+ ** parms - pointer to parameter list in ASCII
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ Diagnostic(char *testName, int testNum, ReqSourceType reqSrc, char *parms);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: Diagnostic destructor
+ **
+ ** PURPOSE: Delete any data members allocated from free store.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ virtual ~Diagnostic();
+
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: Diagnostic::RunDiagnostic
+ **
+ ** PURPOSE: RunDiagnostic initializes the necessary resources to run the
+ ** specified diagnostic. A queue and a task are created to
+ ** be able to run the diagnostic and respond to messages.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): an indication of whether the test was initiated
+ **
+ **----------------------------------------------------------------------------*/
+ int Diagnostic::RunDiagnostic(void);
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: Diagnostic::GetDiagnosticHelp
+ **
+ ** PURPOSE: GetDiagnosticHelp must be overloaded by the derived diagnostic
+ ** class. The diagnostic should display useful help information.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S):
+ **
+ **----------------------------------------------------------------------------*/
+ virtual char *GetDiagnosticHelp(void) = 0;
+
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: Diagnostic::TimerExpired
+ **
+ ** PURPOSE: Duration timer has expired so send a message to the diagnostic to
+ ** terminate the diagnostic.
+ **
+ ** INPUT PARAMETERS: timerId - Id of the duration timer for this diagnostic
+ ** diagPtr - pointer to instance of diagnostic (this pointer)
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ static void TimerExpired(timer_t timerId, int diagPtr);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: Diagnostic::DiagnosticMsgLoop
+ **
+ ** PURPOSE: Execute the diagnostic. After initiating the execution of the
+ ** diagnostic, loop forever and wait for messages. Valid messages are
+ ** DIAG_TEST_STOP_TEST, DIAG_TEST_SEND_TEST_REPORT and
+ ** DIAG_TEST_INTERNAL_STOP_TEST.
+ **
+ ** The flow is like this:
+ ** call InitiateDiagnostic (overloaded by derived class)
+ ** Loop for messages
+ ** process common messages
+ ** call ProcessMessage (overloaded by derived class)
+ ** call TerminateDiagnostic (overloaded by derived class)
+ ** send DELETE_DIAGNOSTIC message
+ ** delete message queue
+ ** end task
+ **
+ ** InitiateDiagnostic - should be overloaded by diagnostic to start diagnostic
+ ** ProcessMessage - should be overloaded only if derived diagnostic test needs
+ ** to process messages specific to itself.
+ ** TerminateDiagnostic - should be overloaded to handle test cleanup and test
+ ** report generation if appropriate.
+ **
+ ** INPUT PARAMETERS: argThis - pointer to the instance of diagnostic
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ static void DiagnosticMsgLoop(int argThis);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: Diagnostic::isAMatch
+ **
+ ** PURPOSE: Test if the diagnostic matches the specified object_instance
+ ** and test number.
+ **
+ ** INPUT PARAMETERS: testNum - test number
+ **
+ ** RETURN VALUE(S): 0 - if NOT a match
+ ** 1 - if a match
+ **
+ **----------------------------------------------------------------------------*/
+ char isAMatch(int testNum);
+
+
+
+ MSG_Q_ID diagQId;
+
+protected:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: Diagnostic::SetTimer
+ **
+ ** PURPOSE: Connect a function to the duration timer and set the seconds value
+ ** to the specified number of seconds.
+ **
+ ** INPUT PARAMETERS: seconds - number of seconds to set the duration timer
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void SetTimer(UINT seconds);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DiagnosticManager::SendResponse
+ **
+ ** PURPOSE: Send the string back to the desired source.
+ **
+ ** INPUT PARAMETERS: resp - string to send
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void SendResponse(const char *resp);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DiagnosticManager::SendResultData
+ **
+ ** PURPOSE: Send result data back to the original test requester. This
+ ** can be intermediate data or a final result.
+ **
+ ** INPUT PARAMETERS: format - format string as if a printf
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void SendResultData(char *format, ...);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DiagnosticManager::InternalStopTest
+ **
+ ** PURPOSE: Diagnostics which determine their own completion must call this
+ ** function to terminate the test.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void InternalStopTest(void);
+
+
+
+ timer_t durationTimer;
+ int isTimerCreated;
+ char instanceNum;
+ char *diagName;
+ int testNumber;
+ ReqSourceType reqSrc;
+ char parameters[MCH_MAX_COMMAND_LINE_LEN];
+
+private:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: Diagnostic::SendDeleteMsg
+ **
+ ** PURPOSE: Send a DIAG_DELETE_DIAGNOSTIC message to the MCHTask.
+ ** This message causes the MCHTask to remove the diagnostic from
+ ** the list of active diagnostics and to delete this instance of the
+ ** diagnostic.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void SendDeleteMsg(void);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: Diagnostic::InitiateDiagnostic
+ **
+ ** PURPOSE: InitiateDiagnostic must be overloaded by the derived diagnostic
+ ** class. This is where the test is initiated.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): OK if able to initiate diagnostic or ERROR if failed
+ **
+ **----------------------------------------------------------------------------*/
+ virtual int InitiateDiagnostic(void) = 0;
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: Diagnostic::TerminateDiagnostic
+ **
+ ** PURPOSE: TerminateDiagnostic must be overloaded by the derived diagnostic
+ ** class. This is where cleanup of the diagnostic should take place. Also
+ ** test reporting should occur here.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): OK if able to terminate diagnostic or ERROR if failed
+ **
+ **----------------------------------------------------------------------------*/
+ virtual int TerminateDiagnostic(void) = 0;
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: Diagnostic::ProcessMessage
+ **
+ ** PURPOSE: ProcessMessage should be overloaded by a derived diagnostic to
+ ** process any messages specific to that diagostic.
+ **
+ ** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+ **
+ ** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+ ** STOP_TEST - if the controlling message loop should end
+ **
+ **----------------------------------------------------------------------------*/
+ virtual int ProcessMessage(DiagnosticMsgType diagMsg);
+
+
+};
+#endif Diagnostic_H
diff --git a/data/mnet/GP10/Host/Mch/include/DspDiags.h b/data/mnet/GP10/Host/Mch/include/DspDiags.h
new file mode 100644
index 0000000..01a4281
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/include/DspDiags.h
@@ -0,0 +1,929 @@
+#ifndef DspDiags_H
+#define DspDiags_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : DspDiags.h
+// Author(s) : Tim Olson
+// Create Date : 6/29/99
+// Description :
+//
+// *******************************************************************
+
+#include "Diagnostic.h"
+
+class DSPLoopbackTest : public Diagnostic {
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPLoopbackTest constructor
+ **
+ ** PURPOSE: Initialize data members for DSPLoopbackTest object.
+ **
+ ** INPUT PARAMETERS: testName - ASCII name for test
+ ** testNum - test number
+ ** reqSrc - source of the diagnostic request
+ ** parms - pointer to parameter list in ASCII
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ DSPLoopbackTest(char *testName, int testNum, ReqSourceType reqSrc, char *parms);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPLoopbackTest destructor
+ **
+ ** PURPOSE: Delete data members for DSPLoopbackTest object.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ ~DSPLoopbackTest();
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPLoopbackTest::InitiateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int InitiateDiagnostic(void);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPLoopbackTest::TerminateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int TerminateDiagnostic(void);
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPLoopbackTest::GetDiagnosticHelp
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): help string
+ **
+ **----------------------------------------------------------------------------*/
+ char *GetDiagnosticHelp(void);
+
+private:
+
+ unsigned int duration;
+ unsigned int trx;
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPLoopbackTest constructor
+ **
+ ** PURPOSE: This is the default constructor for DSPLoopbackTest. It is
+ ** defined in the private section and cannot be used to create an instance of
+ ** DSPLoopbackTest.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ DSPLoopbackTest() : Diagnostic(0,0,(ReqSourceType)0,0) {}
+
+};
+
+
+class DSPMSReport : public Diagnostic {
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPMSReport constructor
+ **
+ ** PURPOSE: Initialize data members for DSPMSReport object.
+ **
+ ** INPUT PARAMETERS: testName - ASCII name for test
+ ** testNum - test number
+ ** reqSrc - source of the diagnostic request
+ ** parms - pointer to parameter list in ASCII
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ DSPMSReport(char *testName, int testNum, ReqSourceType reqSrc, char *parms);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPMSReport destructor
+ **
+ ** PURPOSE: Delete data members for DSPMSReport object.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ ~DSPMSReport();
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPMSReport::InitiateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int InitiateDiagnostic(void);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPMSReport::TerminateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int TerminateDiagnostic(void);
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPMSReport::GetDiagnosticHelp
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): help string
+ **
+ **----------------------------------------------------------------------------*/
+ char *GetDiagnosticHelp(void);
+
+private:
+
+ unsigned int duration;
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPMSReport constructor
+ **
+ ** PURPOSE: This is the default constructor for DSPMSReport. It is
+ ** defined in the private section and cannot be used to create an instance of
+ ** DSPMSReport.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ DSPMSReport() : Diagnostic(0,0,(ReqSourceType)0,0) {}
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPMSReport::ProcessMessage
+ **
+ ** PURPOSE: Process messages not handled by Diagnostic base class. The
+ ** only expected message is DIAG_MS_REPORT.
+ **
+ ** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+ **
+ ** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+ ** STOP_TEST - if the controlling message loop should end
+ **
+ **----------------------------------------------------------------------------*/
+ int ProcessMessage(DiagnosticMsgType diagMsg);
+
+};
+
+
+
+class DSPGPRSMSReport : public Diagnostic {
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPGPRSMSReport constructor
+ **
+ ** PURPOSE: Initialize data members for DSPGPRSMSReport object.
+ **
+ ** INPUT PARAMETERS: testName - ASCII name for test
+ ** testNum - test number
+ ** reqSrc - source of the diagnostic request
+ ** parms - pointer to parameter list in ASCII
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ DSPGPRSMSReport(char *testName, int testNum, ReqSourceType reqSrc, char *parms);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPGPRSMSReport destructor
+ **
+ ** PURPOSE: Delete data members for DSPGPRSMSReport object.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ ~DSPGPRSMSReport();
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPGPRSMSReport::InitiateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int InitiateDiagnostic(void);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPGPRSMSReport::TerminateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int TerminateDiagnostic(void);
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPGPRSMSReport::GetDiagnosticHelp
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): help string
+ **
+ **----------------------------------------------------------------------------*/
+ char *GetDiagnosticHelp(void);
+
+private:
+
+ unsigned int duration;
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPGPRSMSReport constructor
+ **
+ ** PURPOSE: This is the default constructor for DSPGPRSMSReport. It is
+ ** defined in the private section and cannot be used to create an instance of
+ ** DSPGPRSMSReport.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ DSPGPRSMSReport() : Diagnostic(0,0,(ReqSourceType)0,0) {}
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPGPRSMSReport::ProcessMessage
+ **
+ ** PURPOSE: Process messages not handled by Diagnostic base class. The
+ ** only expected message is DIAG_GPRS_MS_REPORT.
+ **
+ ** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+ **
+ ** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+ ** STOP_TEST - if the controlling message loop should end
+ **
+ **----------------------------------------------------------------------------*/
+ int ProcessMessage(DiagnosticMsgType diagMsg);
+
+};
+
+
+
+
+class DSPHOReport : public Diagnostic {
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPHOReport constructor
+ **
+ ** PURPOSE: Initialize data members for DSPHOReport object.
+ **
+ ** INPUT PARAMETERS: testName - ASCII name for test
+ ** testNum - test number
+ ** reqSrc - source of the diagnostic request
+ ** parms - pointer to parameter list in ASCII
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ DSPHOReport(char *testName, int testNum, ReqSourceType reqSrc, char *parms);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPHOReport destructor
+ **
+ ** PURPOSE: Delete data members for DSPHOReport object.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ ~DSPHOReport();
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPHOReport::InitiateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int InitiateDiagnostic(void);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPHOReport::TerminateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int TerminateDiagnostic(void);
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPHOReport::GetDiagnosticHelp
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): help string
+ **
+ **----------------------------------------------------------------------------*/
+ char *GetDiagnosticHelp(void);
+
+private:
+
+ unsigned int duration;
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPHOReport constructor
+ **
+ ** PURPOSE: This is the default constructor for DSPHOReport. It is
+ ** defined in the private section and cannot be used to create an instance of
+ ** DSPHOReport.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ DSPHOReport() : Diagnostic(0,0,(ReqSourceType)0,0) {}
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPHOReport::ProcessMessage
+ **
+ ** PURPOSE: Process messages not handled by Diagnostic base class. The
+ ** only expected messages are DIAG_HO_PN_REPORT and DIAG_HO_CAND_REPORT.
+ **
+ ** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+ **
+ ** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+ ** STOP_TEST - if the controlling message loop should end
+ **
+ **----------------------------------------------------------------------------*/
+ int ProcessMessage(DiagnosticMsgType diagMsg);
+
+};
+
+
+class DSPDLReport : public Diagnostic {
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPDLReport constructor
+ **
+ ** PURPOSE: Initialize data members for DSPDLReport object.
+ **
+ ** INPUT PARAMETERS: testName - ASCII name for test
+ ** testNum - test number
+ ** reqSrc - source of the diagnostic request
+ ** parms - pointer to parameter list in ASCII
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ DSPDLReport(char *testName, int testNum, ReqSourceType reqSrc, char *parms);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPDLReport destructor
+ **
+ ** PURPOSE: Delete data members for DSPDLReport object.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ ~DSPDLReport();
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPDLReport::InitiateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int InitiateDiagnostic(void);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPDLReport::TerminateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int TerminateDiagnostic(void);
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPDLReport::GetDiagnosticHelp
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): help string
+ **
+ **----------------------------------------------------------------------------*/
+ char *GetDiagnosticHelp(void);
+
+private:
+
+ unsigned int duration;
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPDLReport constructor
+ **
+ ** PURPOSE: This is the default constructor for DSPDLReport. It is
+ ** defined in the private section and cannot be used to create an instance of
+ ** DSPDLReport.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ DSPDLReport() : Diagnostic(0,0,(ReqSourceType)0,0) {}
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPDLReport::ProcessMessage
+ **
+ ** PURPOSE: Process messages not handled by Diagnostic base class. The
+ ** only expected message is DIAG_DL_REPORT.
+ **
+ ** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+ **
+ ** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+ ** STOP_TEST - if the controlling message loop should end
+ **
+ **----------------------------------------------------------------------------*/
+ int ProcessMessage(DiagnosticMsgType diagMsg);
+
+};
+
+
+
+// This is the maximum number of outstanding message bursts. This value
+// is used to determine when messages have expired and will never be
+// responded too.
+#define MAX_MSG_BURSTS 20
+#define HPI_MSG_SIZE 64
+
+class HPIEchoTest : public Diagnostic {
+public:
+
+ enum {UNALLOCATED, RESPONSE_PENDING};
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: HPIEchoTest constructor
+ **
+ ** PURPOSE: Initialize data members for HPIEchoTest object.
+ **
+ ** INPUT PARAMETERS: testName - ASCII name for test
+ ** testNum - test number
+ ** reqSrc - source of the diagnostic request
+ ** parms - pointer to parameter list in ASCII
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ HPIEchoTest(char *testName, int testNum, ReqSourceType reqSrc, char *parms);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: HPIEchoTest destructor
+ **
+ ** PURPOSE: Delete data members for HPIEchoTest object.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ ~HPIEchoTest();
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: HPIEchoTest::InitiateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int InitiateDiagnostic(void);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: HPIEchoTest::TerminateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int TerminateDiagnostic(void);
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: HPIEchoTest::GetDiagnosticHelp
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): help string
+ **
+ **----------------------------------------------------------------------------*/
+ char *GetDiagnosticHelp(void);
+
+private:
+
+ unsigned int duration;
+ unsigned int totalErrs[2], totalNoRsp[2], totalMsgs[2], totalUnkownDspErrs;
+ int testDsp0, testDsp1, numMsgs, delay, verbose, lockTask;
+
+ typedef struct {
+ int msgState;
+ unsigned char msg[HPI_MSG_SIZE];
+ } EchoMsgStruct;
+
+ EchoMsgStruct *dspMsgs[2][MAX_MSG_BURSTS];
+ int curMsgBurst[2];
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: HPIEchoTest constructor
+ **
+ ** PURPOSE: This is the default constructor for HPIEchoTest. It is
+ ** defined in the private section and cannot be used to create an instance of
+ ** DSPDLReport.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ HPIEchoTest() : Diagnostic(0,0,(ReqSourceType)0,0) {}
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: HPIEchoTest::ProcessMessage
+ **
+ ** PURPOSE: Process messages not handled by Diagnostic base class. The
+ ** only expected messages are HPI_ECHO_TEST_CONTINUE and
+ ** DIAG_DSP_ECHO_MSG.
+ **
+ ** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+ **
+ ** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+ ** STOP_TEST - if the controlling message loop should end
+ **
+ **----------------------------------------------------------------------------*/
+ int ProcessMessage(DiagnosticMsgType diagMsg);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: HPIEchoTest::BuildEchoMsg
+ **
+ ** PURPOSE: Build up a burst of echo messages for a specified dsp. Each
+ ** message contains a response message in the payload. The burst of
+ ** messages will be saved for verification when the response is returned.
+ ** The burst of messages is kept in a circular buffer. If the messages
+ ** in the next buffer have not received a response then an error is
+ ** flagged.
+ **
+ ** INPUT PARAMETERS: dspNum - dsp to test (0,1)
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void BuildEchoMsg(int dspNum);
+
+};
+
+
+class DSPIFReport : public Diagnostic {
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPIFReport constructor
+ **
+ ** PURPOSE: Initialize data members for DSPIFReport object.
+ **
+ ** INPUT PARAMETERS: testName - ASCII name for test
+ ** testNum - test number
+ ** reqSrc - source of the diagnostic request
+ ** parms - pointer to parameter list in ASCII
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ DSPIFReport(char *testName, int testNum, ReqSourceType reqSrc, char *parms);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPIFReport destructor
+ **
+ ** PURPOSE: Delete data members for DSPIFReport object.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ ~DSPIFReport();
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPIFReport::InitiateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int InitiateDiagnostic(void);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPIFReport::TerminateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int TerminateDiagnostic(void);
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPIFReport::GetDiagnosticHelp
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): help string
+ **
+ **----------------------------------------------------------------------------*/
+ char *GetDiagnosticHelp(void);
+
+private:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPIFReport constructor
+ **
+ ** PURPOSE: This is the default constructor for DSPIFReport. It is
+ ** defined in the private section and cannot be used to create an instance of
+ ** DSPIFReport.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ DSPIFReport() : Diagnostic(0,0,(ReqSourceType)0,0) {}
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DSPIFReport::ProcessMessage
+ **
+ ** PURPOSE: Process messages not handled by Diagnostic base class. The
+ ** only expected message is DIAG_DL_REPORT.
+ **
+ ** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+ **
+ ** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+ ** STOP_TEST - if the controlling message loop should end
+ **
+ **----------------------------------------------------------------------------*/
+ int ProcessMessage(DiagnosticMsgType diagMsg);
+
+};
+
+
+/*******************************************************************************
+*/
+class DSPBBLoopbackTest : public Diagnostic
+{
+
+public:
+
+ // constructor
+ DSPBBLoopbackTest
+ (
+ char *testName, // IN: name for test
+ int testNum, // IN: test number
+ ReqSourceType reqSrc, // IN: source of the diagnostic request
+ char *parms // IN: pointer to parameter list
+ );
+
+ // destructor
+ ~DSPBBLoopbackTest();
+
+ int InitiateDiagnostic(void); // RETURN: status
+
+ int TerminateDiagnostic(void); // RETURN: status
+
+ char *GetDiagnosticHelp(void); // RETURN: help string
+
+
+private:
+
+ int src;
+ int dst;
+ int index;
+ int shift;
+ int verbose;
+ int DSPBBLBTest_Cmd_Status;
+ int dspbblbtest_verbose;
+
+ // default constructor
+ /* defined in the private section and cannot be used to create an instance of
+ DSPBBLoopbackTest */
+ DSPBBLoopbackTest() : Diagnostic(0,0,(ReqSourceType)0,0) {}
+
+ int ProcessMessage // RETUEN: CONTINUE_TEST/STOP_TEST
+ (
+ DiagnosticMsgType diagMsg //IN: Message
+ );
+
+ void dspBBLoopbackTest(int srcDsp, int dstDsp, int freqIndex, int gainShift, int verbose);
+ void dspBBLoopbackTest2(int verbose);
+ void dspToneMeasureRsp(unsigned char data[], int verbose);
+
+}; // class DSPBBLoopbackTest
+
+
+/*******************************************************************************
+*/
+class DSPExtMemTest : public Diagnostic
+{
+
+public:
+
+ // constructor
+ DSPExtMemTest
+ (
+ char *testName, // IN: name for test
+ int testNum, // IN: test number
+ ReqSourceType reqSrc, // IN: source of the diagnostic request
+ char *parms // IN: pointer to parameter list
+ );
+
+ // destructor
+ ~DSPExtMemTest();
+
+ int InitiateDiagnostic(void); // RETURN: status
+
+ int TerminateDiagnostic(void); // RETURN: status
+
+ char *GetDiagnosticHelp(void); // RETURN: help string
+
+
+private:
+
+ const int MaxTestType = 5;
+ int dspextmemtest_verbose;
+ int dspNum;
+ int testTypeReq; /* test type requested */
+ int testType; /* test type performed */
+ int verbose;
+ char fileName[100];
+ int dspResponds; /* TRUE if DSP Responds */
+ unsigned int numErrors;
+
+ // default constructor
+ /* defined in the private section and cannot be used to create an instance of
+ DSPExtMemTest */
+ DSPExtMemTest() : Diagnostic(0,0,(ReqSourceType)0,0) {}
+
+ int ProcessMessage // RETUEN: CONTINUE_TEST/STOP_TEST
+ (
+ DiagnosticMsgType diagMsg //IN: Message
+ );
+
+ void dspExtMemTest(int dspNum, int testType, int verbose);
+
+ void dspExtMemTestRsp(unsigned char data[]);
+
+ void dspExtMemErrorRsp(unsigned char data[]);
+
+}; // class DSPExtMemTest
+
+
+#endif
diff --git a/data/mnet/GP10/Host/Mch/include/MCHCommand.h b/data/mnet/GP10/Host/Mch/include/MCHCommand.h
new file mode 100644
index 0000000..0e8c1ff
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/include/MCHCommand.h
@@ -0,0 +1,534 @@
+#ifndef MCHCommand_H
+#define MCHCommand_H
+
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MCHCommand.h
+// Author(s) : Tim Olson
+// Create Date : 6/29/99
+// Description :
+//
+// *******************************************************************
+
+#include <vxworks.h>
+#include <string.h>
+
+#include "MCH/MCHIntf.h"
+
+// *******************************************************************
+// MCHCommand
+// *******************************************************************
+
+class MCHCommand
+{
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHCommand::MCHCommand
+ **
+ ** PURPOSE: MCHCommand constructor.
+ **
+ ** INPUT PARAMETERS: ln - long name for command
+ ** sn - short name for command
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ MCHCommand(char *ln, char *sn);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHCommand::~MCHCommand
+ **
+ ** PURPOSE: MCHCommand destructor.
+ **
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ virtual ~MCHCommand();
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHCommand::ExecuteCommand
+ **
+ ** PURPOSE: Each derived class must implement this function. ExecuteCommand
+ ** is the function that performs the given command.
+ **
+ ** INPUT PARAMETERS: parms
+ **
+ ** RETURN VALUE(S): status - indicates if command was executed.
+ **
+ **----------------------------------------------------------------------------*/
+ virtual int ExecuteCommand(char *parms) = 0;
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHCommand::ShowHelp
+ **
+ ** PURPOSE: Each derived class must implement this function. ShowHelp
+ ** returns a help description for the command.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): help description in ASCII.
+ **
+ **----------------------------------------------------------------------------*/
+ virtual char *ShowHelp(void) = 0;
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHCommand::isCommand
+ **
+ ** PURPOSE: Test to see if specified command name is this command object.
+ **
+ ** INPUT PARAMETERS: commName - command name in ASCII
+ **
+ ** RETURN VALUE(S): TRUE - if it is the command
+ ** FALSE - if it is not the command
+ **
+ **----------------------------------------------------------------------------*/
+ BOOL isCommand(char *commName)
+ {
+ return ((!strcmp(longName, commName) || !strcmp(shortName, commName)));
+ }
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHCommand::ClearCommandResponse
+ **
+ ** PURPOSE: ClearCommandResponse frees memory allocated for the command
+ ** response.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void ClearCommandResponse(void);
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHCommand::CommandResponseAppend
+ **
+ ** PURPOSE: GetCommandResponse returns a pointer to the command response.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): constant pointer to the response
+ **
+ **----------------------------------------------------------------------------*/
+ const char *GetCommandResponse(void) { return commResponse; }
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHCommand::CommandResponseAppend
+ **
+ ** PURPOSE: CommandResponseAppend appends the given string to the current
+ ** response string.
+ **
+ ** INPUT PARAMETERS: printf style input
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void CommandResponseAppend(char *format, ...);
+
+
+ // Public data members.
+ ReqSourceType reqSrc;
+
+protected:
+
+ char *longName;
+ char *shortName;
+
+private:
+
+ char *commResponse;
+
+ // Don't allow a the default constructor action.
+ MCHCommand(){}
+};
+
+
+
+// *******************************************************************
+// MCHHelp
+// *******************************************************************
+
+class MCHHelp : public MCHCommand
+{
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHHelp::MCHHelp
+ **
+ ** PURPOSE: MCHHelp constructor.
+ **
+ ** INPUT PARAMETERS: ln - long name for command
+ ** sn - short name for command
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ MCHHelp(char *ln, char *sn);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHHelp::ExecuteCommand
+ **
+ ** PURPOSE: Execute the maintenance command handler help function.
+ **
+ ** INPUT PARAMETERS: parms - parameter for command in ASCII
+ **
+ ** RETURN VALUE(S): status indicating success or failure
+ **
+ **----------------------------------------------------------------------------*/
+ virtual int ExecuteCommand(char *parms);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHHelp::ShowHelp
+ **
+ ** PURPOSE: Display help information for the help command.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): return help information in ASCII
+ **
+ **----------------------------------------------------------------------------*/
+ virtual char *ShowHelp(void);
+
+private:
+
+ // No default constructor allowed.
+ MCHHelp() : MCHCommand(0,0){}
+};
+
+
+// *******************************************************************
+// MCHDiagCommand
+// *******************************************************************
+
+class MCHDiagCommand : public MCHCommand
+{
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHDiagCommand::MCHDiagCommand
+ **
+ ** PURPOSE: MCHDiagCommand constructor.
+ **
+ ** INPUT PARAMETERS: ln - long name for command
+ ** sn - short name for command
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ MCHDiagCommand(char *ln, char *sn) : MCHCommand(ln, sn){};
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHDiagCommand::ExecuteCommand
+ **
+ ** PURPOSE: Each derived class must implement this function. ExecuteCommand
+ ** is the function that performs the given command.
+ **
+ ** INPUT PARAMETERS: parms
+ **
+ ** RETURN VALUE(S): status - indicates if command was executed.
+ **
+ **----------------------------------------------------------------------------*/
+ virtual int ExecuteCommand(char *parms) = 0;
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHCommand::ShowHelp
+ **
+ ** PURPOSE: Each derived class must implement this function. ShowHelp
+ ** returns a help description for the command.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): help description in ASCII.
+ **
+ **----------------------------------------------------------------------------*/
+ virtual char *ShowHelp(void) = 0;
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHDiagCommand::GetDiagTestNum
+ **
+ ** PURPOSE: This function converts the first parameter found in the parameter
+ ** list from ASCII to an integer which represents the test number.
+ **
+ ** INPUT PARAMETERS: parms - parameter list
+ **
+ ** RETURN VALUE(S): test number or -1 if an error
+ **
+ **----------------------------------------------------------------------------*/
+ int GetDiagTestNum(char *parms);
+
+
+private:
+
+ // No default constructor allowed.
+ MCHDiagCommand() : MCHCommand(0,0){}
+
+
+};
+
+
+// *******************************************************************
+// MCHStartDiag
+// *******************************************************************
+
+class MCHStartDiag : public MCHDiagCommand
+{
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHStartDiag::MCHStartDiag
+ **
+ ** PURPOSE: MCHStartDiag constructor.
+ **
+ ** INPUT PARAMETERS: ln - long name for command
+ ** sn - short name for command
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ MCHStartDiag(char *ln, char *sn);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHStartDiag::ExecuteCommand
+ **
+ ** PURPOSE: Execute the maintenance command handler start diagnostic function.
+ **
+ ** INPUT PARAMETERS: parms - parameter for command in ASCII
+ **
+ ** RETURN VALUE(S): status indicating success or failure
+ **
+ **----------------------------------------------------------------------------*/
+ virtual int ExecuteCommand(char *parms);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHStartDiag::ShowHelp
+ **
+ ** PURPOSE: Display help information for the StartDiag command.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): return help information in ASCII
+ **
+ **----------------------------------------------------------------------------*/
+ virtual char *ShowHelp(void);
+
+private:
+
+ // No default constructor allowed.
+ MCHStartDiag() : MCHDiagCommand(0,0){}
+
+};
+
+
+// *******************************************************************
+// MCHStopDiag
+// *******************************************************************
+
+class MCHStopDiag : public MCHDiagCommand
+{
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHStopDiag::MCHStopDiag
+ **
+ ** PURPOSE: MCHStopDiag constructor.
+ **
+ ** INPUT PARAMETERS: ln - long name for command
+ ** sn - short name for command
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ MCHStopDiag(char *ln, char *sn);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHStopDiag::ExecuteCommand
+ **
+ ** PURPOSE: Execute the maintenance command handler stop diagnostic function.
+ **
+ ** INPUT PARAMETERS: parms - parameter for command in ASCII
+ **
+ ** RETURN VALUE(S): status indicating success or failure
+ **
+ **----------------------------------------------------------------------------*/
+ virtual int ExecuteCommand(char *parms);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHStopDiag::ShowHelp
+ **
+ ** PURPOSE: Display help information for the StopDiag command.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): return help information in ASCII
+ **
+ **----------------------------------------------------------------------------*/
+ virtual char *ShowHelp(void);
+
+private:
+
+ // No default constructor allowed.
+ MCHStopDiag() : MCHDiagCommand(0,0){}
+
+
+};
+
+
+// *******************************************************************
+// MCHGetDiagResult
+// *******************************************************************
+
+class MCHGetDiagResult : public MCHDiagCommand
+{
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHGetDiagResult::MCHGetDiagResult
+ **
+ ** PURPOSE: MCHGetDiagResult constructor.
+ **
+ ** INPUT PARAMETERS: ln - long name for command
+ ** sn - short name for command
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ MCHGetDiagResult(char *ln, char *sn);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHGetDiagResult::ExecuteCommand
+ **
+ ** PURPOSE: Execute the maintenance command handler get diagnostic result
+ ** function.
+ **
+ ** INPUT PARAMETERS: parms - parameter for command in ASCII
+ **
+ ** RETURN VALUE(S): status indicating success or failure
+ **
+ **----------------------------------------------------------------------------*/
+ virtual int ExecuteCommand(char *parms);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHGetDiagResult::ShowHelp
+ **
+ ** PURPOSE: Display help information for the GetDiagResult command.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): return help information in ASCII
+ **
+ **----------------------------------------------------------------------------*/
+ virtual char *ShowHelp(void);
+
+private:
+
+ // No default constructor allowed.
+ MCHGetDiagResult() : MCHDiagCommand(0,0){}
+
+
+};
+
+
+// *******************************************************************
+// MCHGetDiagHelp
+// *******************************************************************
+
+class MCHGetDiagHelp : public MCHDiagCommand
+{
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHGetDiagHelp::MCHGetDiagHelp
+ **
+ ** PURPOSE: MCHGetDiagHelp constructor.
+ **
+ ** INPUT PARAMETERS: ln - long name for command
+ ** sn - short name for command
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ MCHGetDiagHelp(char *ln, char *sn);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHGetDiagHelp::ExecuteCommand
+ **
+ ** PURPOSE: Execute the maintenance command handler get diagnostic help
+ ** function.
+ **
+ ** INPUT PARAMETERS: parms - parameter for command in ASCII
+ **
+ ** RETURN VALUE(S): status indicating success or failure
+ **
+ **----------------------------------------------------------------------------*/
+ virtual int ExecuteCommand(char *parms);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHGetDiagHelp::ShowHelp
+ **
+ ** PURPOSE: Display help information for the GetDiagHelp command.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): return help information in ASCII
+ **
+ **----------------------------------------------------------------------------*/
+ virtual char *ShowHelp(void);
+
+private:
+
+ // No default constructor allowed.
+ MCHGetDiagHelp() : MCHDiagCommand(0,0){}
+
+
+};
+
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Mch/include/MCHConfig.h b/data/mnet/GP10/Host/Mch/include/MCHConfig.h
new file mode 100644
index 0000000..b775008
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/include/MCHConfig.h
@@ -0,0 +1,34 @@
+#ifndef MCHconfig_H
+#define MCHconfig_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MCHconfig.h
+// Author(s) : Tim Olson
+// Create Date : 6/29/99
+// Description :
+//
+// *******************************************************************
+
+#include "MCH/MCHIntf.h"
+
+// Maximum message size passed to the Maintenance Command Handler
+const int MCH_MAX_MSG_LENGTH = sizeof(MCHMessageType);
+
+// Maximum number of messages to the Maintenance Command Handler.
+const int MCH_MAX_MSGS = 32;
+
+#define MCH_TASK_NAME "MCHTask"
+
+
+
+#endif MCHconfig_H \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Mch/include/MCHInit.h b/data/mnet/GP10/Host/Mch/include/MCHInit.h
new file mode 100644
index 0000000..ebcdee0
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/include/MCHInit.h
@@ -0,0 +1,29 @@
+#ifndef MCHInit_H
+#define MCHInit_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MCHInit.h
+// Author(s) : Tim Olson
+// Create Date : 6/29/99
+// Description :
+//
+// *******************************************************************
+
+#include <vxWorks.h>
+#include <msgQLib.h>
+
+// Maintenance Commmand Handler message queue.
+extern MSG_Q_ID MCHMsgQId;
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Mch/include/MCHTask.h b/data/mnet/GP10/Host/Mch/include/MCHTask.h
new file mode 100644
index 0000000..36039e4
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/include/MCHTask.h
@@ -0,0 +1,159 @@
+#ifndef MCHTask_H
+#define MCHTask_H
+
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MCHTask.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/29/99
+// Description :
+//
+// *******************************************************************
+
+#include <vxworks.h>
+#include <lstLib.h>
+#include <msgQLib.h>
+#include <stdarg.h>
+#include "Os/JCTask.h"
+#include "Diagnostic.h"
+
+
+// Forward declarations.
+class MCHCommand;
+
+// These are the available functions to be sent to the maintenance
+// command handler.
+typedef enum {
+ MCH_START_DIAG,
+ MCH_STOP_DIAG,
+ MCH_GET_RESULT,
+ MCH_GET_DIAG_HELP,
+ MCH_HELP,
+ MCH_MAX_COMMANDS
+} MCHCommandType;
+
+
+
+// *******************************************************************
+// MCHCommand
+// *******************************************************************
+
+class MCHTask
+{
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHTask::MCHLoop
+ **
+ ** PURPOSE: MCHLoop is the main message processing loop for the maintenance
+ ** command handler.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ static int MCHLoop(void);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: MCHTask::InitMCH
+ **
+ ** PURPOSE: InitMCH function provides the basic initialization for the
+ ** maintenance command handler in the BTS. A single instance of MCHTask
+ ** is created. The single instance is referenced by static member pointer
+ ** theMCHTask.
+ **
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ static int InitMCH(void);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DiagnosticManager::FindDiagnostic
+ **
+ ** PURPOSE: Search the list of currently active diagnostics given
+ ** test number.
+ **
+ ** INPUT PARAMETERS: testNum - diagnostic test number
+ **
+ ** RETURN VALUE(S): Diagnostic * - pointer to the new diagnostic if found
+ ** 0 if no diagnostic was found
+ **
+ **----------------------------------------------------------------------------*/
+ Diagnostic *FindDiagnostic(int testNum);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: DiagnosticManager::SendResponse
+ **
+ ** PURPOSE: Send the string back to the desired source.
+ **
+ ** INPUT PARAMETERS: resp - string to send
+ ** reqSrc - who to respond to
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void SendResponse(const char *resp, ReqSourceType reqSrc);
+
+
+
+ static MCHTask *theMCHTask;
+ MCHCommand *mchCommands[MCH_MAX_COMMANDS];
+ LIST activeDiags;
+ Diagnostic *(*AllDiagnostics[DIAG_LAST_DIAG_GROUP >> DIAG_GROUP_NUM_BITS])(int testNum, ReqSourceType reqSrc, char *parms);
+
+private:
+ static BOOL isOneCreated;
+
+ JCTask MCHTaskObj;
+
+ // The only way to create the MCHTask is to call InitMCH.
+ MCHTask();
+
+};
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: Create diagnostic functions.
+**
+** PURPOSE: Each of the following functions are included in the table of functions
+** to create diagnostics. Each function compares the requested diagnostic test
+** number with the known test numbers and creates an instance of the diagnostic
+** if the test is valid.
+**
+** INPUT PARAMETERS: testNum - test number.
+** reqSrc - source of the diagnostic request
+** parms - pointer to parameter list in ASCII.
+**
+** RETURN VALUE(S): Diagnostic * - pointer to the new diagnostic if valid
+** 0 if no diagnostic was created
+**
+**----------------------------------------------------------------------------*/
+Diagnostic *cdcDiags(int testNum, ReqSourceType reqSrc, char *parms);
+Diagnostic *dspDiags(int testNum, ReqSourceType reqSrc, char *parms);
+Diagnostic *rfDiags(int testNum, ReqSourceType reqSrc, char *parms);
+Diagnostic *clkDiags(int testNum, ReqSourceType reqSrc, char *parms);
+Diagnostic *gpsDiags(int testNum, ReqSourceType reqSrc, char *parms);
+Diagnostic *systemDiags(int testNum, ReqSourceType reqSrc, char *parms);
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Mch/include/SysDiags.h b/data/mnet/GP10/Host/Mch/include/SysDiags.h
new file mode 100644
index 0000000..c839341
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/include/SysDiags.h
@@ -0,0 +1,662 @@
+#ifndef SysDiags_H
+#define SysDiags_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SysDiags.h
+// Author(s) : Tim Olson
+// Create Date : 12/8/99
+// Description :
+//
+// *******************************************************************
+
+#include "Diagnostic.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <taskLib.h>
+#include <sockLib.h>
+#include <inetLib.h>
+#include <ioLib.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+
+#define DEFPORT 3456
+#define DEFSTART 1024
+#define DEFEND 4096
+#define DEFINC 1024
+#define DEFDURATION 60
+#define TRIALS 15
+#define REPEAT 1000
+#define NSAMP 8000
+#define PERT 3
+#define LATENCYREPS 100
+#define LONGTIME 1e99
+#define CHARSIZE 8
+#define RUNTM 0.25
+
+#define ABS(x) (((x) < 0)?(-(x)):(x))
+#define MIN(x,y) (((x) < (y))?(x):(y))
+#define MAX(x,y) (((x) > (y))?(x):(y))
+
+
+typedef struct protocolstruct ProtocolStruct;
+struct protocolstruct
+{
+ struct sockaddr_in sin1, /* socket structure #1 */
+ sin2; /* socket structure #2 */
+ int nodelay; /* Flag for TCP nodelay */
+ struct hostent *addr; /* Address of host */
+ int sndbufsz,
+ rcvbufsz;
+};
+
+typedef struct argstruct ArgStruct;
+struct argstruct
+{
+ /* This is the common information that is needed for all tests */
+ char *host; /* Name of receiving host */
+ int servicefd, /* File descriptor of the network socket */
+ commfd; /* Communication file descriptor */
+ short port; /* Port used for connection */
+ char *buff; /* Transmitted buffer */
+ char *buff1; /* Transmitted buffer */
+ int bufflen, /* Length of transmitted buffer */
+ tr, /* Transmit flag */
+ nbuff; /* Number of buffers to transmit */
+
+ /* Now we work with a union of information for protocol dependent stuff */
+ ProtocolStruct prot; /* Structure holding necessary info for TCP */
+};
+
+
+class NetworkTestServer : public Diagnostic {
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer constructor
+ **
+ ** PURPOSE: Initialize data members for NetworkTestServer object.
+ **
+ ** INPUT PARAMETERS: testName - ASCII name for test
+ ** testNum - test number
+ ** reqSrc - source of the diagnostic request
+ ** parms - pointer to parameter list in ASCII
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ NetworkTestServer(char *testName, int testNum, ReqSourceType reqSrc, char *parms);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer destructor
+ **
+ ** PURPOSE: Delete data members for NetworkTestServer object.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ ~NetworkTestServer();
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer::InitiateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int InitiateDiagnostic(void);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer::ProcessMessage
+ **
+ ** PURPOSE: Process messages not handled by Diagnostic base class.
+ **
+ ** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+ **
+ ** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+ ** STOP_TEST - if the controlling message loop should end
+ **
+ **----------------------------------------------------------------------------*/
+ int ProcessMessage(DiagnosticMsgType diagMsg);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer::TerminateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int TerminateDiagnostic(void);
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer::NetTestServer
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ static int NetTestServer(int thisPtr);
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer::GetDiagnosticHelp
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): help string
+ **
+ **----------------------------------------------------------------------------*/
+ char *GetDiagnosticHelp(void);
+
+private:
+
+ int port, streamopt, start, end, inc, verbose, bufsize, duration, verify;
+ int taskId;
+ ArgStruct args;
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer constructor
+ **
+ ** PURPOSE: This is the default constructor for NetworkTestServer. It is
+ ** defined in the private section and cannot be used to create an instance of
+ ** NetworkTestServer.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ NetworkTestServer() : Diagnostic(0,0,(ReqSourceType)0,0) {}
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer::When
+ **
+ ** PURPOSE: Return the current time in seconds, using a double precision
+ ** number.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): current time in seconds
+ **
+ **----------------------------------------------------------------------------*/
+ double When();
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer::SetupServer
+ **
+ ** PURPOSE: Setup the socket to act as the server for the test.
+ **
+ ** INPUT PARAMETERS: p - pointer to test arguments
+ **
+ ** RETURN VALUE(S): status - OK if successful
+ ** ERROR if setup failed
+ **----------------------------------------------------------------------------*/
+ int SetupServer(ArgStruct *p);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer::SyncServer
+ **
+ ** PURPOSE: Synchronize with the other end of the connection.
+ **
+ ** INPUT PARAMETERS: p - pointer to test arguments
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void SyncServer(ArgStruct *p);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer::SendDataServer
+ **
+ ** PURPOSE: Send date to the other end of the connection.
+ **
+ ** INPUT PARAMETERS: p - pointer to test arguments
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void SendDataServer(ArgStruct *p);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer::RecvDataServer
+ **
+ ** PURPOSE: Receive data from the other end of the connection.
+ **
+ ** INPUT PARAMETERS: p - pointer to test arguments
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void RecvDataServer(ArgStruct *p);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer::RecvRepeatServer
+ **
+ ** PURPOSE: Receive the number of repetitions from the other end of the
+ ** connection.
+ **
+ ** INPUT PARAMETERS: p - pointer to test arguments
+ ** rpt - number of repetitions
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void RecvRepeatServer(ArgStruct *p, int *rpt);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer::EstablishServer
+ **
+ ** PURPOSE: Accept a connection from a client.
+ **
+ ** INPUT PARAMETERS: p - pointer to test arguments
+ **
+ ** RETURN VALUE(S): status - OK if establish successful
+ ** ERROR if establish failed
+ **----------------------------------------------------------------------------*/
+ int EstablishServer(ArgStruct *p);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer::CleanUpServer
+ **
+ ** PURPOSE: Cleanup sockets used for this test.
+ **
+ ** INPUT PARAMETERS: p - pointer to test arguments
+ **
+ ** RETURN VALUE(S): status - OK if cleanup successful
+ ** ERROR if cleanup failed
+ **----------------------------------------------------------------------------*/
+ int CleanUpServer(ArgStruct *p);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer::SendStopMsg
+ **
+ ** PURPOSE: Send a message to parent task to stop network test.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **----------------------------------------------------------------------------*/
+ void SendStopMsg(void);
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer::ReadFully
+ **
+ ** PURPOSE: Read data from specified socket.
+ **
+ ** INPUT PARAMETERS: fd - file descriptor for socket
+ ** obuf - pointer to buffer to be filled
+ ** len - number of bytes to receive
+ **
+ ** RETURN VALUE(S): for success - number of bytes read
+ ** for failure - ERROR
+ **----------------------------------------------------------------------------*/
+ int ReadFully(int fd, char *obuf, int len);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer::InvertData
+ **
+ ** PURPOSE: xor all the data in the received buffer..
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **----------------------------------------------------------------------------*/
+ void InvertData();
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+class NetworkTestTransmit : public Diagnostic {
+public:
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestTransmit constructor
+ **
+ ** PURPOSE: Initialize data members for NetworkTestTransmit object.
+ **
+ ** INPUT PARAMETERS: testName - ASCII name for test
+ ** testNum - test number
+ ** reqSrc - source of the diagnostic request
+ ** parms - pointer to parameter list in ASCII
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ NetworkTestTransmit(char *testName, int testNum, ReqSourceType reqSrc, char *parms);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestTransmit destructor
+ **
+ ** PURPOSE: Delete data members for NetworkTestTransmit object.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ ~NetworkTestTransmit();
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestTransmit::InitiateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int InitiateDiagnostic(void);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestTransmit::ProcessMessage
+ **
+ ** PURPOSE: Process messages not handled by Diagnostic base class.
+ **
+ ** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+ **
+ ** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+ ** STOP_TEST - if the controlling message loop should end
+ **
+ **----------------------------------------------------------------------------*/
+ int ProcessMessage(DiagnosticMsgType diagMsg);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestServer::TerminateDiagnostic
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ int TerminateDiagnostic(void);
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestTransmit::NetTestTransmit
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): status -
+ **
+ **----------------------------------------------------------------------------*/
+ static int NetTestTransmit(int thisPtr);
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestTransmit::GetDiagnosticHelp
+ **
+ ** PURPOSE:
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): help string
+ **
+ **----------------------------------------------------------------------------*/
+ char *GetDiagnosticHelp(void);
+
+private:
+
+ int port, streamopt, start, end, inc, verbose, bufsize, duration, verify;
+ char hostAddr[64];
+ int taskId;
+ long totalPkts, totalErrors;
+ ArgStruct args;
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestTransmit constructor
+ **
+ ** PURPOSE: This is the default constructor for NetworkTestTransmit. It is
+ ** defined in the private section and cannot be used to create an instance of
+ ** NetworkTestServer.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ NetworkTestTransmit() : Diagnostic(0,0,(ReqSourceType)0,0) {}
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestTransmit::When
+ **
+ ** PURPOSE: Return the current time in seconds, using a double precision
+ ** number.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): current time in seconds
+ **
+ **----------------------------------------------------------------------------*/
+ double When();
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestTransmit::SetupTransmit
+ **
+ ** PURPOSE: Setup the socket to act as the server for the test.
+ **
+ ** INPUT PARAMETERS: p - pointer to test arguments
+ **
+ ** RETURN VALUE(S): status - OK if successful
+ ** ERROR if setup failed
+ **----------------------------------------------------------------------------*/
+ int SetupTransmit(ArgStruct *p);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestTransmit::SyncTransmit
+ **
+ ** PURPOSE: Synchronize with the other end of the connection.
+ **
+ ** INPUT PARAMETERS: p - pointer to test arguments
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void SyncTransmit(ArgStruct *p);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestTransmit::SendDataTransmit
+ **
+ ** PURPOSE: Send date to the other end of the connection.
+ **
+ ** INPUT PARAMETERS: p - pointer to test arguments
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void SendDataTransmit(ArgStruct *p);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestTransmit::RecvDataTransmit
+ **
+ ** PURPOSE: Receive data from the other end of the connection.
+ **
+ ** INPUT PARAMETERS: p - pointer to test arguments
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void RecvDataTransmit(ArgStruct *p);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestTransmit::SendRepeatTransmit
+ **
+ ** PURPOSE: Send the repeat count to the other end of the connection.
+ **
+ ** INPUT PARAMETERS: p - pointer to test arguments
+ ** rpt - repeat count
+ **
+ ** RETURN VALUE(S): none
+ **
+ **----------------------------------------------------------------------------*/
+ void SendRepeatTransmit(ArgStruct *p, int rpt);
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestTransmit::EstablishTransmit
+ **
+ ** PURPOSE: Accept a connection from a client.
+ **
+ ** INPUT PARAMETERS: p - pointer to test arguments
+ **
+ ** RETURN VALUE(S): status - OK if establish successful
+ ** ERROR if establish failed
+ **----------------------------------------------------------------------------*/
+ int EstablishTransmit(ArgStruct *p);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestTransmit::CleanUpTransmit
+ **
+ ** PURPOSE: Cleanup sockets used for this test.
+ **
+ ** INPUT PARAMETERS: p - pointer to test arguments
+ **
+ ** RETURN VALUE(S): status - OK if cleanup successful
+ ** ERROR if cleanup failed
+ **----------------------------------------------------------------------------*/
+ int CleanUpTransmit(ArgStruct *p);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestTransmit::SendStopMsg
+ **
+ ** PURPOSE: Send a message to parent task to stop network test.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): none
+ **----------------------------------------------------------------------------*/
+ void SendStopMsg(void);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestTransmit::ReadFully
+ **
+ ** PURPOSE: Read data from specified socket.
+ **
+ ** INPUT PARAMETERS: fd - file descriptor for socket
+ ** obuf - pointer to buffer to be filled
+ ** len - number of bytes to receive
+ **
+ ** RETURN VALUE(S): for success - number of bytes read
+ ** for failure - ERROR
+ **----------------------------------------------------------------------------*/
+ int ReadFully(int fd, char *obuf, int len);
+
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestTransmit::FillTestPattern
+ **
+ ** PURPOSE: Fill up a buffer with the given test pattern.
+ **
+ ** INPUT PARAMETERS: buf - pointer to buffer to be filled
+ ** bufLen - number of bytes to fill
+ ** patternIndx - selected pattern
+ **
+ ** RETURN VALUE(S): none
+ **----------------------------------------------------------------------------*/
+ void FillTestPattern (char *buf, int bufLen, int patternIndx);
+
+ /*----------------------------------------------------------------------------**
+ **
+ ** METHOD NAME: NetworkTestTransmit::VerifyData
+ **
+ ** PURPOSE: Verify that the transmitted data matches the received data.
+ **
+ ** INPUT PARAMETERS: none
+ **
+ ** RETURN VALUE(S): 0 - no errors
+ ** 1 - errors detected
+ **----------------------------------------------------------------------------*/
+ int VerifyData ();
+
+};
+
+
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Mch/post/860MemTest.cpp b/data/mnet/GP10/Host/Mch/post/860MemTest.cpp
new file mode 100644
index 0000000..26798ba
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/post/860MemTest.cpp
@@ -0,0 +1,50 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+#include <stdio.h>
+#include <sysLib.h>
+#include "mch/post.h"
+
+
+
+void MPC860MemTest(void)
+{
+ // First validate the MPC860 SDRAM by writing a walking one pattern and a
+ // walking zero pattern. Each memory location is saved prior to testing a
+ // location and restored after testing.
+ unsigned int save, read, write;
+ unsigned int errs = 0;
+
+ // Loop through all MPC860 SDRAM.
+ for (unsigned int *addr = 0; addr < (unsigned int *)sysMemTop(); addr++)
+ {
+ // Do not test the memory used to execute this code.
+ if (((char *)*addr < pText) && ((char *)*addr > (pText+POT_MEM_SIZE)) && ((char **)*addr != &pText) &&
+ ((char **)*addr != &pData) && ((char **)*addr != &pBSS))
+ {
+ save = *addr;
+ write = 0x80000000;
+ for(; write; write>>=1)
+ {
+ *addr = write;
+ read = *addr;
+ if (read != write)
+ errs++;
+
+ *addr = ~write;
+ read = *addr;
+ if (read != ~write)
+ errs++;
+ }
+ *addr = save;
+ }
+ }
+
+ // Update the power on test status that will be checked later by root.
+ if (errs) PowerOnTestStatus |= MPC860_SDRAM_TEST;
+
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Mch/post/Makefile b/data/mnet/GP10/Host/Mch/post/Makefile
new file mode 100644
index 0000000..4576a87
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/post/Makefile
@@ -0,0 +1,61 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = Mch
+THIS_DIRECTORY = post
+MY_OUTPUT = $(OBJDIR)\post.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+POST_C_SRCS =
+POST_C++SRCS = pontest.cpp
+POST_A_SRCS =
+POST_LIST = $(POST_C_SRCS:.c=.o) \
+ $(POST_C++SRCS:.cpp=.o) \
+ $(POST_A_SRCS:.s=.o)
+
+POST_OBJS = $(foreach file, $(POST_LIST), $(OBJDIR)/$(file))
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(POST_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(POST_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(POST_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Mch/post/pontest.cpp b/data/mnet/GP10/Host/Mch/post/pontest.cpp
new file mode 100644
index 0000000..5a613a2
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/post/pontest.cpp
@@ -0,0 +1,474 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : pontest.cpp
+// Author(s) : Tim Olson
+// Create Date : 7/26/99
+// Description :
+//
+// *******************************************************************
+#include <stdio.h>
+#include <loadLib.h>
+#include <unldLib.h>
+#include "mch/post.h"
+#include <string.h>
+#include <vxLib.h>
+#include "drv/sio/ppc860Sio.h"
+#include "taskLib.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include "cdcUtils/CPU_Mon_IF.h"
+#include "l1proxy/l1proxyhpi.h"
+#include "cdc_bsp/nvRam.h"
+#ifdef __cplusplus
+}
+#endif
+
+
+
+#define NUM_DSPS 2
+#define DSP_INT_DATA_RAM_START 0x80000000
+#define DSP_INT_DATA_RAM_END 0x80010000
+#define DSP_INT_PROG_RAM_START 0x01400000
+#define DSP_INT_PROG_RAM_END 0x01410000
+#define DSP_EXT_RAM_START 0x00000000
+#define DSP_EXT_RAM_END 0x00100000
+
+#define ponStarting 0
+#define ponPASSED 1
+#define ponIntDataRam 2
+#define ponIntProgRam 3
+#define ponExtRam 4
+#define ponFAILED 5
+
+unsigned int DspInternalDataMem[] = {
+ DSP_0_INTERNAL_DATA_RAM_TEST,
+ DSP_1_INTERNAL_DATA_RAM_TEST};
+unsigned int DspInternalProgMem[] = {
+ DSP_0_INTERNAL_PROG_RAM_TEST,
+ DSP_1_INTERNAL_PROG_RAM_TEST};
+unsigned int DspExternalMem[] = {
+ DSP_0_EXTERNAL_RAM_TEST,
+ DSP_1_EXTERNAL_RAM_TEST};
+
+MODULE_ID potModule;
+
+int ponAccessTest(char *adrs);
+void ponTestNotify(int Type, int DSPNum);
+void ponFPGATest(void);
+void ponI2CTest(void);
+
+// The following functions may be called to test whether a given power on
+// test passed or failed.
+bool postAllTestsOkay()
+{
+ return ((bool)(!((postGetTestResult(ALL_POWER_ON_TESTS) & ALL_POWER_ON_TESTS) == ALL_POWER_ON_TESTS)));
+}
+
+bool postMpcSramOkay()
+{
+ return ((bool)((postGetTestResult(MPC860_SDRAM_TEST)) ? 0 : 1));
+}
+
+bool postDsp0IntDataRamOkay()
+{
+ return ((bool)((postGetTestResult(DSP_0_INTERNAL_DATA_RAM_TEST)) ? 0 : 1));
+}
+
+bool postDsp0IntProgRamOkay()
+{
+ return ((bool)((postGetTestResult(DSP_0_INTERNAL_PROG_RAM_TEST)) ? 0 : 1));
+}
+
+bool postDsp0ExtRamOkay()
+{
+ return ((bool)((postGetTestResult(DSP_0_EXTERNAL_RAM_TEST)) ? 0 : 1));
+}
+
+bool postDsp1IntDataRamOkay()
+{
+ return ((bool)((postGetTestResult(DSP_1_INTERNAL_DATA_RAM_TEST)) ? 0 : 1));
+}
+
+bool postDsp1IntProgRamOkay()
+{
+ return ((bool)((postGetTestResult(DSP_1_INTERNAL_PROG_RAM_TEST)) ? 0 : 1));
+}
+
+bool postDsp1ExtRamOkay()
+{
+ return ((bool)((postGetTestResult(DSP_1_EXTERNAL_RAM_TEST)) ? 0 : 1));
+}
+
+bool postFPGA0Okay()
+{
+ return ((bool)((postGetTestResult(FPGA_0_TEST)) ? 0 : 1));
+}
+
+bool postFPGA1Okay()
+{
+ return ((bool)((postGetTestResult(FPGA_1_TEST)) ? 0 : 1));
+}
+
+bool postI2COkay()
+{
+ return ((bool)((postGetTestResult(I2C_TEST)) ? 0 : 1));
+}
+
+int testDspMemBlock(int port, unsigned int startAddr, unsigned int endAddr)
+{
+ unsigned int read, write;
+ int errs = 0;
+ for (unsigned int dspAddr = startAddr; dspAddr < endAddr; dspAddr+=sizeof(unsigned int))
+ {
+ write = 0x80000000;
+ for(; write; write>>=1)
+ {
+ // Write walking ones test pattern.
+ HPIA(port) = dspAddr;
+ *(unsigned int *)HPID(port) = write;
+
+ // Read back from memory location.
+ HPIA(port) = dspAddr;
+ read = *(unsigned int *)HPID(port);
+
+ if (read != write)
+ errs++;
+
+ // Write walking zeros test pattern.
+ HPIA(port) = dspAddr;
+ *(unsigned int *)HPID(port) = ~write;
+
+ // Read back from memory location.
+ HPIA(port) = dspAddr;
+ read = *(unsigned int *)HPID(port);
+
+ if (read != ~write)
+ errs++;
+ }
+ }
+
+ // Now do an address test.
+ for (dspAddr = startAddr; dspAddr < endAddr; dspAddr+=sizeof(unsigned int))
+ {
+ HPIA(port) = dspAddr;
+ *(unsigned int *)HPID(port) = dspAddr;
+ }
+
+ for (dspAddr = startAddr; dspAddr < endAddr; dspAddr+=sizeof(unsigned int))
+ {
+ HPIA(port) = dspAddr;
+ read = *(unsigned int *)HPID(port);
+ if (read != dspAddr)
+ errs++;
+ }
+
+ // Now do the complement address test.
+ for (dspAddr = startAddr; dspAddr < endAddr; dspAddr+=sizeof(unsigned int))
+ {
+ HPIA(port) = dspAddr;
+ *(unsigned int *)HPID(port) = ~dspAddr;
+ }
+
+ for (dspAddr = startAddr; dspAddr < endAddr; dspAddr+=sizeof(unsigned int))
+ {
+ HPIA(port) = dspAddr;
+ read = *(unsigned int *)HPID(port);
+ if (read != ~dspAddr)
+ errs++;
+ }
+
+
+ return errs;
+}
+
+
+void TestDspMem(void)
+{
+ int AccessResult;
+
+ // Next, test the DSP memory for all dsp's.
+ for (int port = 0; port < NUM_DSPS; port++)
+ {
+ ponTestNotify(ponStarting, port);
+
+ if (AccessResult = ponAccessTest((char *)HPIC(port)) == OK )
+ {
+ if (AccessResult = ponAccessTest((char *)HPIA(port)) == OK )
+ {
+ AccessResult = ponAccessTest((char *)HPID(port));
+ }
+ }
+
+ if ( AccessResult == OK )
+ {
+ printf("HPI Access Passed for DSP #%d\n", port);
+
+ // Initialize EMIF registers to allow access to extenal RAM.
+ HPIC(port) = 0x00000000;
+ HPIA(port) = 0x1800000;
+ *(unsigned int *)HPID(port) = 0x00003060;
+ HPIA(port) = 0x1800008;
+ *(unsigned int *)HPID(port) = 0x00000040;
+ HPIA(port) = 0x1800004;
+ *(unsigned int *)HPID(port) = 0x20E30322;
+ HPIA(port) = 0x1800010;
+ *(unsigned int *)HPID(port) = 0x00000040;
+ HPIA(port) = 0x1800014;
+ *(unsigned int *)HPID(port) = 0x00000040;
+ HPIA(port) = 0x1800018;
+ *(unsigned int *)HPID(port) = 0x07116000;
+ HPIA(port) = 0x180001c;
+ *(unsigned int *)HPID(port) = 0x00000410;
+
+ // Test internal data RAM. If errors occur then set a bit in the
+ // power on test status register.
+
+ ponTestNotify(ponIntDataRam, port);
+ if (testDspMemBlock(port, DSP_INT_DATA_RAM_START, DSP_INT_DATA_RAM_END))
+ {
+ postSetTestResult(DspInternalDataMem[port], POST_FAIL);
+ ponTestNotify(ponFAILED, port);
+ }
+ else
+ {
+ postSetTestResult(DspInternalDataMem[port], POST_PASS);
+ ponTestNotify(ponPASSED, port);
+ }
+
+ // Test internal program RAM. If errors occur then set a bit in the
+ // power on test status register.
+
+ ponTestNotify(ponIntProgRam, port);
+ if (testDspMemBlock(port, DSP_INT_PROG_RAM_START, DSP_INT_PROG_RAM_END))
+ {
+ postSetTestResult(DspInternalProgMem[port], POST_FAIL);
+ ponTestNotify(ponFAILED, port);
+ }
+ else
+ {
+ postSetTestResult(DspInternalProgMem[port], POST_PASS);
+ ponTestNotify(ponPASSED, port);
+ }
+
+ // Test extenal RAM. If errors occur then set a bit in the
+ // power on test status register.
+
+ ponTestNotify(ponExtRam, port);
+ if (testDspMemBlock(port, DSP_EXT_RAM_START, DSP_EXT_RAM_END))
+ {
+ postSetTestResult(DspExternalMem[port], POST_FAIL);
+ ponTestNotify(ponFAILED, port);
+ }
+ else
+ {
+ postSetTestResult(DspExternalMem[port], POST_PASS);
+ ponTestNotify(ponPASSED, port);
+ }
+ }
+ else /* Access Test Failed, Write to serial port & set memory storage */
+ {
+ printf("HPI Access Failed for DSP #%d\n", port);
+ postSetTestResult(DspInternalDataMem[port], POST_FAIL);
+ postSetTestResult(DspInternalProgMem[port], POST_FAIL);
+ postSetTestResult(DspExternalMem[port], POST_FAIL);
+ }
+ }
+}
+
+
+
+void ExecutePost(void)
+{
+ TestDspMem();
+
+ /* Run the FPGA Test */
+ ponFPGATest();
+
+
+ /* Run the I2C Test */
+ ponI2CTest();
+}
+
+/*******************************************************************************
+*
+* ponAccessTest
+*
+* It will probe the address for a bus error.
+*
+* NOMANUAL
+*********************************************************************************/
+
+int ponAccessTest(char *adrs)
+{
+ char testW = 1;
+ char testR;
+ int AccessResult = OK;
+
+ if (vxMemProbe (adrs, VX_WRITE, 1, &testW) == OK)
+ {
+ if (vxMemProbe (adrs, VX_READ, 1, &testR) != OK)
+ AccessResult = ERROR;
+ else
+ {
+ if ( testW != testR )
+ AccessResult = ERROR;
+ }
+ }
+ else
+ AccessResult = ERROR;
+
+ return AccessResult;
+}
+
+/*******************************************************************************
+*
+* ponTestNotify
+*
+* It will send an ASCII message out Standard I/O. All messages are
+* intended for DSP memory testing information.
+*
+* NOMANUAL
+*********************************************************************************/
+
+void ponTestNotify(int Type, int DSPNum)
+{
+ switch( Type )
+ {
+ case ponStarting:
+ printf("\nStarting Power On Memory Test - DSP #%d\n", DSPNum);
+ break;
+
+ case ponPASSED:
+ printf(" - Passed\n");
+ break;
+
+ case ponFAILED:
+ printf(" - Failed\n");
+ break;
+
+ case ponIntDataRam:
+ printf("\nTesting Internal Data RAM");
+ break;
+
+ case ponIntProgRam:
+ printf("\nTesting Internal Program RAM");
+ break;
+
+ case ponExtRam:
+ printf("\nTesting External Data RAM");
+ break;
+
+ default:
+ printf("\nponTestNotify Selection Error");
+ break;
+ }
+}
+
+/*******************************************************************************
+*
+* ponFPGATest
+*
+* Writes and reads to FPGA locations for production testing.
+*
+* NOMANUAL
+*********************************************************************************/
+
+void ponFPGATest(void)
+{
+ unsigned int value;
+ unsigned int mask = 0x0000FFFF;
+ unsigned int addr = 0x1030000;
+ unsigned int testValue = 0x00000080;
+ unsigned int fpga_num;
+ unsigned int index;
+ int result = OK;
+
+ for ( fpga_num=0; fpga_num<2; fpga_num++)
+ {
+ printf("Starting FPGA #%d Test...\n", fpga_num);
+ for ( index=0; index<0x10000; index++ )
+ {
+ /* Write each location with an incrementing value up
+ to 16 bit unsigned limit. Make sure each register
+ is offset from each other to test internals. */
+
+ hpi2dspD(fpga_num,0x1000000,((index) % 0x10000));
+ hpi2dspD(fpga_num,0x1030000,((index+1) % 0x100));
+
+ // Test location 0x1000000
+ // Read back corresponding values, only take lower 16 bits back
+ value=dsp2hpiD(fpga_num,0x1000000) & 0x0000ffff;
+ if (value!=((index) % 0x10000))
+ {
+ printf("FPGA #%d Test - FAILED at Location 0x1000000\n", fpga_num);
+ result = ERROR;
+ break;
+ }
+
+ // Test location 0x1030000
+ // Read back corresponding values
+ value=dsp2hpiD(fpga_num,0x1030000) & 0x000000ff;
+ if (value!=((index+1) % 0x100))
+ {
+ printf("FPGA #%d Test - FAILED at Location 0x1030000\n", fpga_num);
+ result = ERROR;
+ break;
+ }
+ }
+
+ if ( result == OK )
+ {
+ if ( fpga_num == 0 )
+ postSetTestResult(FPGA_0_TEST, POST_PASS);
+ else if ( fpga_num == 1 )
+ postSetTestResult(FPGA_1_TEST, POST_PASS);
+
+ printf("FPGA #%d Test - PASSED\n", fpga_num);
+ }
+ else if ( result == ERROR )
+ {
+ if ( fpga_num == 0 )
+ postSetTestResult(FPGA_0_TEST, POST_FAIL);
+ else if ( fpga_num == 1 )
+ postSetTestResult(FPGA_0_TEST, POST_FAIL);
+ }
+
+ }
+}
+
+/*****************************************************************************
+ *
+ * Module Name: ponI2CTest
+ *
+ * Purpose: Initializes the DS1780 and sets it to its operating mode.
+ *
+ *****************************************************************************/
+
+void ponI2CTest(void)
+{
+ STATUS result;
+
+ printf("Starting I2C Test...");
+
+ if (( result = DS1780_Init() ) == OK )
+ {
+ postSetTestResult(I2C_TEST, POST_PASS);
+ printf("PASSED\n");
+ }
+ else
+ {
+ postSetTestResult(I2C_TEST, POST_FAIL);
+ printf("FAILED\n");
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Mch/src/CdcDiags.cpp b/data/mnet/GP10/Host/Mch/src/CdcDiags.cpp
new file mode 100644
index 0000000..150d65a
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/src/CdcDiags.cpp
@@ -0,0 +1,1535 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CdcDiags.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/29/99
+// Description :
+//
+// *******************************************************************
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <taskLib.h>
+#include <ioLib.h>
+#include <stdLib.h>
+#include "CdcDiags.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include "l1proxy/l1proxyhpi.h"
+#include "cdcUtils/CPU_Mon_IF.h"
+#include "cdc_bsp/nvRam.h"
+#include "cdcUtils/auxPort.h"
+#ifdef __cplusplus
+}
+#endif
+
+
+// *******************************************************************
+// HPIMemoryTest
+// *******************************************************************
+
+
+#define DSPBUFFERMAX 0x204 /* max HPI buffer size */
+#define DSPUPBUFFER 0x80000000 /* HPI upstream buffer */
+#define DSPDNBUFFER 0x80000204 /* HPI downstream buffer */
+
+#define WALKING_ZEROS 0x01
+#define WALKING_ONES 0x02
+#define INC_MEM_LOC 0x04
+#define INVERSE_INC_MEM_LOC 0x08
+#define RANDOM_DATA 0x10
+#define ALL_MEM_TESTS (WALKING_ZEROS | WALKING_ONES | INC_MEM_LOC | \
+ INVERSE_INC_MEM_LOC | RANDOM_DATA)
+
+#define NUM_DSPS 2 /* Number of DSPs */
+static const unsigned int hpiBase[NUM_DSPS] = {PORT0_BASE_ADDR, PORT1_BASE_ADDR};
+#define HPIC_OFFSET 0x0
+#define HPIA_OFFSET 0x8
+#define HPID_OFFSET 0xC
+#define HPIS_OFFSET 0x4
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: HPIMemoryTest constructor
+**
+** PURPOSE: Initialize data members for HPIMemoryTest object.
+**
+** INPUT PARAMETERS: testName - ASCII name for test
+** testNum - test number
+** reqSrc - source of the diagnostic request
+** parms - pointer to parameter list in ASCII
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+HPIMemoryTest::HPIMemoryTest(char *testName, int testNum, ReqSourceType reqSrc,
+ char *parms) : Diagnostic(testName, testNum, reqSrc, parms)
+{
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: HPIMemoryTest destructor
+**
+** PURPOSE: Delete data members for HPIMemoryTest object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+HPIMemoryTest::~HPIMemoryTest()
+{
+}
+
+void HpiWrite
+(
+unsigned int port,
+void *buffer,
+unsigned int addr,
+int nBytes
+)
+{
+unsigned int *bufferWord = (unsigned int *) buffer;
+int n;
+volatile unsigned int* hpisAddr = (unsigned int*)(hpiBase[port] + HPIS_OFFSET);
+
+*(volatile unsigned int*)(hpiBase[port] + HPIA_OFFSET) = addr;
+for (n = 0; n < nBytes; n += 4)
+ {
+ *hpisAddr = *bufferWord++;
+ }
+}
+
+void HpiRead
+(
+unsigned int port,
+unsigned int addr,
+void *buffer,
+int nBytes
+)
+{
+unsigned int *bufferWord = (unsigned int *) buffer;
+int n;
+volatile unsigned int* hpisAddr = (unsigned int *)(hpiBase[port] + HPIS_OFFSET);
+
+*(volatile unsigned int*)(hpiBase[port] + HPIA_OFFSET) = addr;
+for (n = 0; n < nBytes; n += 4)
+ {
+ *bufferWord++ = *hpisAddr;
+ }
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: HPIMemoryTest::InitiateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int HPIMemoryTest::InitiateDiagnostic(void)
+{
+ int testType, verbose;
+ char testName[256];
+ int numErrs = 0;
+ unsigned int dsp;
+
+ // Extract paramters from command line.
+ //
+ // Command Line : test number, dsp, test type, verbose
+ sscanf(parameters, "%s %u %d %d", &testName, &dsp, &testType, &verbose);
+
+ // Verify that the paramaters are reasonable
+ if (dsp > 1)
+ {
+ SendResultData("Invalid DSP number %u\n", dsp);
+ return ERROR;
+ }
+
+ if (testType < WALKING_ZEROS || testType > ALL_MEM_TESTS)
+ {
+ SendResultData("Invalid testType %d\n", testType);
+ return ERROR;
+ }
+
+ SendResultData ("%s dsp(%d) testType(%d) verbose(%d)\n",
+ testName, dsp, testType, verbose);
+
+ char writeBuf[DSPBUFFERMAX];
+ char readBuf[DSPBUFFERMAX];
+ unsigned int zeroPattern = 0x80000000;
+ unsigned int onePattern = 0x80000000;
+
+ while (testType)
+ {
+ // Build the test pattern for walking zeros.
+ if (testType & WALKING_ZEROS)
+ {
+ unsigned int *writePtr = (unsigned int *)writeBuf;
+ for (int i = 0; i < DSPBUFFERMAX/(sizeof(unsigned int)); i++)
+ {
+ *writePtr = ~zeroPattern;
+ writePtr++;
+ }
+
+ zeroPattern >>= 1;
+ if (!zeroPattern)
+ {
+ testType &= ~WALKING_ZEROS;
+ }
+ }
+ // Build the test pattern for walking ones.
+ else if (testType & WALKING_ONES)
+ {
+ unsigned int *writePtr = (unsigned int *)writeBuf;
+ for (int i = 0; i < DSPBUFFERMAX/(sizeof(unsigned int)); i++)
+ {
+ *writePtr = onePattern;
+ writePtr++;
+ }
+
+ onePattern >>= 1;
+ if (!onePattern)
+ {
+ testType &= ~WALKING_ONES;
+ }
+ }
+ // Build the test pattern for incrementing memory location.
+ else if (testType & INC_MEM_LOC)
+ {
+ unsigned int *writePtr = (unsigned int *)writeBuf;
+
+ for (unsigned int i = 0; i < DSPBUFFERMAX/(sizeof(unsigned int)); i++)
+ {
+ *writePtr = i;
+ writePtr++;
+ }
+ testType &= ~INC_MEM_LOC;
+ }
+
+ // Test uplink buffer then downlink buffer.
+ HpiWrite(dsp, writeBuf, DSPUPBUFFER, DSPBUFFERMAX);
+ HpiRead(dsp, DSPUPBUFFER, readBuf, DSPBUFFERMAX);
+
+ for (int i = 0; i < DSPBUFFERMAX; i++)
+ {
+ if (writeBuf[i] != readBuf[i])
+ {
+ numErrs++;
+ if (verbose)
+ {
+ SendResultData ("0x%x wrote 0x%x read 0x%x\n", DSPUPBUFFER+i,
+ writeBuf[i], readBuf[i]);
+ }
+ }
+ }
+
+ HpiWrite(dsp, writeBuf, DSPDNBUFFER, DSPBUFFERMAX);
+ HpiRead(dsp, DSPDNBUFFER, readBuf, DSPBUFFERMAX);
+
+ for (i = 0; i < DSPBUFFERMAX; i++)
+ {
+ if (writeBuf[i] != readBuf[i])
+ {
+ numErrs++;
+ if (verbose)
+ {
+ SendResultData ("0x%x wrote 0x%x read 0x%x\n", DSPDNBUFFER+i,
+ writeBuf[i], readBuf[i]);
+ }
+ }
+ }
+ }
+
+ if (numErrs)
+ {
+ SendResultData("HPIMemAccess failed with %d errors.\n", numErrs);
+ }
+ else
+ {
+ SendResultData("HPIMemAccess passed with zero errors!\n");
+ }
+
+ InternalStopTest();
+ return OK;
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: HPIMemoryTest::TerminateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int HPIMemoryTest::TerminateDiagnostic(void)
+{
+ return OK;
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: HPIMemoryTest::GetDiagnosticHelp
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): help string
+**
+**----------------------------------------------------------------------------*/
+char *HPIMemoryTest::GetDiagnosticHelp(void)
+{
+ return (
+ "HPIMemoryAccess\n\n"
+ "The transmit and receive memory defined for HPI transfers will be tested\n"
+ "utilizing a parameter selected memory test.\n\n"
+ "WARNING!!! DO NOT RUN WHILE DSP'S ARE RUNNING!!!!\n\n"
+ "Parameters - DSPNum TestType Verbose\n"
+ "\tDSPNum - Dsp to test (0, 1)\n"
+ "\tTestType - Memory test algorithm\n"
+ "\t\t1 = walking 0's\n"
+ "\t\t2 = walking 1's\n"
+ "\t\t4 = incrementing memory location\n"
+ "\t\t7 = all tests\n"
+ "\tVerbose - If non-zero show individual error occurences.\n\n"
+ "Returns - Number of failed memory locations\n"
+ );
+}
+
+
+
+// *******************************************************************
+// I2CLoopbackTest
+// *******************************************************************
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: I2CLoopbackTest constructor
+**
+** PURPOSE: Initialize data members for I2CLoopbackTest object.
+**
+** INPUT PARAMETERS: testName - ASCII name for test
+** testNum - test number
+** reqSrc - source of the diagnostic request
+** parms - pointer to parameter list in ASCII
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+I2CLoopbackTest::I2CLoopbackTest(char *testName, int testNum, ReqSourceType reqSrc,
+ char *parms) : Diagnostic(testName, testNum, reqSrc, parms)
+{
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: I2CLoopbackTest destructor
+**
+** PURPOSE: Delete data members for I2CLoopbackTest object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+I2CLoopbackTest::~I2CLoopbackTest()
+{
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: I2CLoopbackTest::InitiateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int I2CLoopbackTest::InitiateDiagnostic(void)
+{
+
+ // Extract parameters from command line.
+ //
+ // Command Line : test number, numBytes, duration, verbose
+ numBytes = duration = verbose = haltOnErr = 0;
+ sscanf(parameters, "%s %d %u %d %d", &testName, &numBytes, &duration, &verbose,
+ &haltOnErr);
+
+ // Validate parameters.
+ if ((numBytes == 0) && (duration == 0))
+ {
+ SendResultData("I2CLoopbackTest: numBytes or duration must be nonzero!\n");
+ return ERROR;
+ }
+
+ SendResultData ("%s numBytes(%d) duration(%d) verbose(%d) haltOnErr(%d)\n",
+ testName, numBytes, duration, verbose, haltOnErr);
+
+ // Initialize a counter for the total bytes sent and total errors.
+ totalSent = 0;
+ numErrs = 0;
+
+ // If duration is non-zero then start the diag timer. numBytes is ignored
+ // if duration is non-zero.
+ if (duration)
+ {
+ SetTimer(duration);
+ }
+
+ // Send a message to start sending data.
+ DiagnosticMsgType diagMsg;
+
+ // Initialize the diagnostic message.
+ diagMsg.func = I2C_LOOPBACK_CONTINUE;
+
+ msgQSend(diagQId,
+ (char *)&diagMsg,
+ sizeof(DiagnosticMsgType),
+ WAIT_FOREVER,
+ MSG_PRI_NORMAL);
+
+
+ return OK;
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: I2CLoopbackTest::TerminateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int I2CLoopbackTest::TerminateDiagnostic(void)
+{
+ SendResultData("I2CLoopback: Sent Bytes(%d) Error Bytes(%d).\n",
+ totalSent, numErrs);
+ return OK;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: I2CLoopbackTest::ProcessMessage
+**
+** PURPOSE: Process messages not handled by Diagnostic base class. The
+** only expected message is I2C_LOOPBACK_CONTINUE. When this message
+** is received another buffer of data is sent to the I2C.
+**
+** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+**
+** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+** STOP_TEST - if the controlling message loop should end
+**
+**----------------------------------------------------------------------------*/
+int I2CLoopbackTest::ProcessMessage(DiagnosticMsgType diagMsg)
+{
+ int testDone = CONTINUE_TEST;
+ switch ( diagMsg.func )
+ {
+ case I2C_LOOPBACK_CONTINUE:
+ {
+ testDone = SendI2CData();
+ break;
+ }
+ }
+
+ return testDone;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: I2CLoopbackTest::SendI2CData
+**
+** PURPOSE: Send some data to the I2C for loopback.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+** STOP_TEST - if the controlling message loop should end
+**
+**----------------------------------------------------------------------------*/
+int I2CLoopbackTest::SendI2CData(void)
+{
+ int numSent = 0;
+ int retVal = CONTINUE_TEST;
+
+ // Enable I2C facility and enable receive buffer.
+ I2Coperation(ON);
+ RxBD(ON);
+
+ // If this is a timed run then just send a full buffer of data.
+ if (duration)
+ {
+ numBytes = I2C_TX_LEN-1;
+ }
+
+ while (numBytes && (numSent < I2C_TX_LEN-1))
+ {
+ writeBuf[numSent] = (unsigned char)rand();
+ numBytes--;
+ numSent++;
+ }
+
+ // Write out test data.
+ int status;
+ if ((status = I2Cwrite2(writeBuf, MPC860_I2C_ADDR>>1, numSent)) == ERROR)
+ {
+ SendResultData("I2Cwrite2 failed %d\n", status);
+ return CONTINUE_TEST;
+ }
+ taskDelay(1);
+ readRxBD(readBuf, numSent+1);
+
+ for (int i = 0; i < numSent; i++)
+ {
+ if (readBuf[i+1] != writeBuf[i])
+ {
+ if (verbose)
+ {
+ SendResultData("I2CLoopback:ERROR Offset(%d) sent(%x) received(%x)\n",
+ i, writeBuf[i], readBuf[i+1]);
+ }
+ numErrs++;
+ if (haltOnErr)
+ {
+ retVal = STOP_TEST;
+ }
+ }
+ }
+
+ // Keep track of how many bytes were sent.
+ totalSent += numSent;
+
+ I2Coperation(OFF);
+
+ // If this test is not running for some duration then check to see
+ // if all the bytes have been sent.
+ if (!duration)
+ {
+ if (numBytes <= 0)
+ {
+ retVal = STOP_TEST;
+ }
+ }
+
+ if (retVal == CONTINUE_TEST)
+ {
+ // Send a message to start sending data.
+ DiagnosticMsgType diagMsg;
+
+ // Initialize the diagnostic message.
+ diagMsg.func = I2C_LOOPBACK_CONTINUE;
+
+ msgQSend(diagQId,
+ (char *)&diagMsg,
+ sizeof(DiagnosticMsgType),
+ WAIT_FOREVER,
+ MSG_PRI_NORMAL);
+ }
+ else
+ {
+ // If we are stopping the test for any reason and it is a timed test
+ // then cancel the timer.
+ if (duration)
+ {
+ SetTimer(0);
+ }
+ }
+
+ return retVal;
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: I2CLoopbackTest::GetDiagnosticHelp
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): help string
+**
+**----------------------------------------------------------------------------*/
+char *I2CLoopbackTest::GetDiagnosticHelp(void)
+{
+ return (
+ "I2CLoopback Test\n\n"
+ "The MP860 is allowed to send data addressed to itself. This creates\n"
+ "a loopback scenario. For this test the MP860 will send random data from\n"
+ "its transmit buffers to its receive buffers. The received data will be\n"
+ "verified and errors will be flagged.\n\n"
+ "Parameters - NumBytes Duration Verbose HaltOnErr\n"
+ "\tNumBytes - Number of bytes to send in loopback\n"
+ "\tDuration - Optional test duration in seconds. If zero the NumBytes\n"
+ "\t\tparameter is used. If non-zero the test will run for the\n"
+ "\t\tspecified number of seconds and the NumBytes parameter is ignored.\n"
+ "\tVerbose - If non-zero show individual error occurences.\n"
+ "\tHaltOnErr - If non-zero the test will stop when an error occurs.\n\n"
+ "Returns - Number of bytes transmitted, number of erroneous bytes received\n"
+ );
+}
+
+
+// *******************************************************************
+// DSPMemTest
+// *******************************************************************
+#define DSP_INT_DATA_RAM_START 0x80000000
+#define DSP_INT_DATA_RAM_END 0x80010000
+#define DSP_INT_PROG_RAM_START 0x01400000
+#define DSP_INT_PROG_RAM_END 0x01410000
+#define DSP_EXT_RAM_START 0x00000000
+#define DSP_EXT_RAM_END 0x00100000
+
+#define TEST_INTERNAL_PROGRAM_MEM 0x1
+#define TEST_INTERNAL_DATA_MEM 0x2
+#define TEST_EXTERNAL_MEM 0x4
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPMemTest constructor
+**
+** PURPOSE: Initialize data members for DSPMemTest object.
+**
+** INPUT PARAMETERS: testName - ASCII name for test
+** testNum - test number
+** reqSrc - source of the diagnostic request
+** parms - pointer to parameter list in ASCII
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+DSPMemTest::DSPMemTest(char *testName, int testNum, ReqSourceType reqSrc,
+ char *parms) : Diagnostic(testName, testNum, reqSrc, parms)
+{
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPMemTest destructor
+**
+** PURPOSE: Delete data members for DSPMemTest object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+DSPMemTest::~DSPMemTest()
+{
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPMemTest::InitiateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int DSPMemTest::InitiateDiagnostic(void)
+{
+ duration = verbose = 0;
+ // Extract paramters from command line.
+ //
+ // Command Line : test number, dsp, test type, duration, verbose
+ sscanf(parameters, "%s %u %x %x %u %d", &testName, &dsp, &testLoc, &testType, &duration, &verbose);
+
+ // Verify that the paramaters are reasonable
+ if (dsp > 1)
+ {
+ SendResultData("Invalid DSP number %u\n", dsp);
+ return ERROR;
+ }
+
+ if (testType < WALKING_ZEROS || testType > ALL_MEM_TESTS)
+ {
+ SendResultData("Invalid testType %d\n", testType);
+ return ERROR;
+ }
+
+ SendResultData ("%s dsp(%d) testLocation (%#x) testType(%#x) duration(%d) verbose(%d)\n",
+ testName, dsp, testLoc, testType, duration, verbose);
+
+ // Initialize the random number seed to 1. Each pass will increment the
+ // seed by one.
+ seed = 1;
+
+ // Initialize a counter for the total errors.
+ numErrs = 0;
+
+ // Save a temp copy of the test type.
+ testTypeTmp = testType;
+
+ // Setup the starting test pattern
+ onesPattern = 0x80000000;
+ zerosPattern = 0x7fffffff;
+ if (testType & WALKING_ZEROS)
+ {
+ testPattern = zerosPattern;
+ }
+ else if (testType & WALKING_ONES)
+ {
+ testPattern = onesPattern;
+ }
+
+ // Reset DSPs
+ auxPortOutSet(~(DSPA_RST_NOT|DSPB_RST_NOT), DSPA_RST_NOT|DSPB_RST_NOT);
+ taskDelay((int)(0.350 * sysClkRateGet()));
+ auxPortOutSet((DSPA_RST_NOT|DSPB_RST_NOT), DSPA_RST_NOT|DSPB_RST_NOT);
+
+ // In case the dsp EMIF registers have not been configured set them up
+ // to allow access to external memory.
+ HPIC(dsp) = 0x00000000;
+ HPIA(dsp) = 0x1800000;
+ *(unsigned int *)HPID(dsp) = 0x00003060;
+ HPIA(dsp) = 0x1800008;
+ *(unsigned int *)HPID(dsp) = 0x00000040;
+ HPIA(dsp) = 0x1800004;
+ *(unsigned int *)HPID(dsp) = 0x20E30322;
+ HPIA(dsp) = 0x1800010;
+ *(unsigned int *)HPID(dsp) = 0x00000040;
+ HPIA(dsp) = 0x1800014;
+ *(unsigned int *)HPID(dsp) = 0x00000040;
+ HPIA(dsp) = 0x1800018;
+ *(unsigned int *)HPID(dsp) = 0x07116000;
+ HPIA(dsp) = 0x180001c;
+ *(unsigned int *)HPID(dsp) = 0x00000410;
+
+
+ // If duration is non-zero then start the diag timer.
+ if (duration)
+ {
+ SetTimer(duration);
+ }
+
+ // Send a message to start sending data.
+ DiagnosticMsgType diagMsg;
+
+ // Initialize the diagnostic message.
+ diagMsg.func = DSP_MEM_TEST_CONTINUE;
+
+ msgQSend(diagQId,
+ (char *)&diagMsg,
+ sizeof(DiagnosticMsgType),
+ WAIT_FOREVER,
+ MSG_PRI_NORMAL);
+
+ return OK;
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPMemTest::TerminateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int DSPMemTest::TerminateDiagnostic(void)
+{
+ // If we are stopping the test for any reason and it is a timed test
+ // then cancel the timer.
+ if (duration)
+ {
+ SetTimer(0);
+ }
+
+ SendResultData("DSPMemTest: Num Errors(%d).\n", numErrs);
+
+ return OK;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPMemTest::ProcessMessage
+**
+** PURPOSE: Process messages not handled by Diagnostic base class. The
+** only expected message is DSP_MEM_TEST_CONTINUE.
+**
+** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+**
+** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+** STOP_TEST - if the controlling message loop should end
+**
+**----------------------------------------------------------------------------*/
+int DSPMemTest::ProcessMessage(DiagnosticMsgType diagMsg)
+{
+ switch ( diagMsg.func )
+ {
+ case DSP_MEM_TEST_CONTINUE:
+ {
+ if ((testTypeTmp & WALKING_ZEROS) || (testTypeTmp & WALKING_ONES))
+ {
+ // Test internal data RAM. If errors occur then set a bit in the
+ // power on test status register.
+ if (testLoc & TEST_INTERNAL_DATA_MEM)
+ TestDspMemBlock(DSP_INT_DATA_RAM_START, DSP_INT_DATA_RAM_END);
+
+ // Test internal program RAM. If errors occur then set a bit in the
+ // power on test status register.
+ if (testLoc & TEST_INTERNAL_PROGRAM_MEM)
+ TestDspMemBlock(DSP_INT_PROG_RAM_START, DSP_INT_PROG_RAM_END);
+
+ // Test extenal RAM. If errors occur then set a bit in the
+ // power on test status register.
+ if (testLoc & TEST_EXTERNAL_MEM)
+ TestDspMemBlock(DSP_EXT_RAM_START, DSP_EXT_RAM_END);
+
+ if (testTypeTmp & WALKING_ZEROS)
+ {
+ zerosPattern = ~((~zerosPattern) >> 1);
+ testPattern = zerosPattern;
+ if (!(~zerosPattern))
+ {
+ testTypeTmp &= ~WALKING_ZEROS;
+ zerosPattern = 0x7fffffff;
+ }
+ }
+ // Build the test pattern for walking ones.
+ else if (testTypeTmp & WALKING_ONES)
+ {
+ onesPattern >>= 1;
+ testPattern = onesPattern;
+ if (!onesPattern)
+ {
+ testTypeTmp &= ~WALKING_ONES;
+ onesPattern = 0x80000000;
+ }
+ }
+ }
+ else if (testTypeTmp & INC_MEM_LOC)
+ {
+ // Test internal data RAM. If errors occur then set a bit in the
+ // power on test status register.
+ if (testLoc & TEST_INTERNAL_DATA_MEM)
+ TestDspMemBlockIncAddr(DSP_INT_DATA_RAM_START, DSP_INT_DATA_RAM_END, FALSE);
+
+ // Test internal program RAM. If errors occur then set a bit in the
+ // power on test status register.
+ if (testLoc & TEST_INTERNAL_PROGRAM_MEM)
+ TestDspMemBlockIncAddr(DSP_INT_PROG_RAM_START, DSP_INT_PROG_RAM_END, FALSE);
+
+ // Test extenal RAM. If errors occur then set a bit in the
+ // power on test status register.
+ if (testLoc & TEST_EXTERNAL_MEM)
+ TestDspMemBlockIncAddr(DSP_EXT_RAM_START, DSP_EXT_RAM_END, FALSE);
+
+ testTypeTmp &= ~INC_MEM_LOC;
+ }
+ else if (testTypeTmp & INVERSE_INC_MEM_LOC)
+ {
+ // Test internal data RAM. If errors occur then set a bit in the
+ // power on test status register.
+ if (testLoc & TEST_INTERNAL_DATA_MEM)
+ TestDspMemBlockIncAddr(DSP_INT_DATA_RAM_START, DSP_INT_DATA_RAM_END, TRUE);
+
+ // Test internal program RAM. If errors occur then set a bit in the
+ // power on test status register.
+ if (testLoc & TEST_INTERNAL_PROGRAM_MEM)
+ TestDspMemBlockIncAddr(DSP_INT_PROG_RAM_START, DSP_INT_PROG_RAM_END, TRUE);
+
+ // Test extenal RAM. If errors occur then set a bit in the
+ // power on test status register.
+ if (testLoc & TEST_EXTERNAL_MEM)
+ TestDspMemBlockIncAddr(DSP_EXT_RAM_START, DSP_EXT_RAM_END, TRUE);
+
+ testTypeTmp &= ~INVERSE_INC_MEM_LOC;
+ }
+ else if (testTypeTmp & RANDOM_DATA)
+ {
+ // Test internal data RAM. If errors occur then set a bit in the
+ // power on test status register.
+ if (testLoc & TEST_INTERNAL_DATA_MEM)
+ TestDspMemBlockRandom(DSP_INT_DATA_RAM_START, DSP_INT_DATA_RAM_END);
+
+ // Test internal program RAM. If errors occur then set a bit in the
+ // power on test status register.
+ if (testLoc & TEST_INTERNAL_PROGRAM_MEM)
+ TestDspMemBlockRandom(DSP_INT_PROG_RAM_START, DSP_INT_PROG_RAM_END);
+
+ // Test extenal RAM. If errors occur then set a bit in the
+ // power on test status register.
+ if (testLoc & TEST_EXTERNAL_MEM)
+ TestDspMemBlockRandom(DSP_EXT_RAM_START, DSP_EXT_RAM_END);
+
+ testTypeTmp &= ~RANDOM_DATA;
+ }
+ break;
+ }
+ }
+
+ if (!testTypeTmp)
+ {
+ if (duration)
+ {
+ testTypeTmp = testType;
+ }
+ else
+ {
+ return STOP_TEST;
+ }
+ }
+
+ // Send a message to start sending data.
+ DiagnosticMsgType contMsg;
+
+ // Initialize the diagnostic message.
+ contMsg.func = DSP_MEM_TEST_CONTINUE;
+
+ msgQSend(diagQId,
+ (char *)&contMsg,
+ sizeof(DiagnosticMsgType),
+ WAIT_FOREVER,
+ MSG_PRI_NORMAL);
+
+ return CONTINUE_TEST;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPMemTest::TestDspMemBlock
+**
+** PURPOSE: Test the RAM at the given address with testPattern.
+**
+** INPUT PARAMETERS: startAddr - starting location to test
+** endAddr - ending location to test
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void DSPMemTest::TestDspMemBlock(unsigned int startAddr, unsigned int endAddr)
+{
+ unsigned int read;
+ for (unsigned int dspAddr = startAddr; dspAddr < endAddr; dspAddr+=sizeof(unsigned int))
+ {
+ // Write test pattern.
+ HPIA(dsp) = dspAddr;
+ *(unsigned int *)HPID(dsp) = testPattern;
+
+ // Read back from memory location.
+ HPIA(dsp) = dspAddr;
+ read = *(unsigned int *)HPID(dsp);
+
+ if (read != testPattern)
+ {
+ numErrs++;
+ if (verbose)
+ {
+ SendResultData("DSPMemTest: Error address(%x) wrote(%x) read(%x)\n",
+ dspAddr, testPattern, read);
+ }
+ }
+ }
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPMemTest::TestDspMemBlockIncAddr
+**
+** PURPOSE: Test the RAM at the given address with testPattern.
+**
+** INPUT PARAMETERS: startAddr - starting location to test
+** endAddr - ending location to test
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void DSPMemTest::TestDspMemBlockIncAddr(unsigned int startAddr, unsigned int endAddr,
+ int doInverse)
+{
+ unsigned int read;
+ HPIA(dsp) = startAddr;
+ for (unsigned int dspAddr = startAddr; dspAddr < endAddr; dspAddr+=sizeof(unsigned int))
+ {
+ // Write test pattern.
+ if (doInverse)
+ {
+ *(unsigned int *)HPIS(dsp) = ~dspAddr;
+ }
+ else
+ {
+ *(unsigned int *)HPIS(dsp) = dspAddr;
+ }
+ }
+
+ for (dspAddr = startAddr; dspAddr < endAddr; dspAddr+=sizeof(unsigned int))
+ {
+ unsigned int expectedResult = dspAddr;
+
+ // Read back from memory location.
+ HPIA(dsp) = dspAddr;
+ read = *(unsigned int *)HPID(dsp);
+
+ if (doInverse)
+ {
+ expectedResult = ~expectedResult;
+ }
+
+ if (read != expectedResult)
+ {
+ numErrs++;
+ if (verbose)
+ {
+ SendResultData("DSPMemTest: Error address(%x) wrote(%x) read(%x)\n",
+ dspAddr, expectedResult, read);
+ }
+ }
+ }
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPMemTest::TestDspMemBlockRandom
+**
+** PURPOSE: Test the RAM at the given address range with random data.
+**
+** INPUT PARAMETERS: startAddr - starting location to test
+** endAddr - ending location to test
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void DSPMemTest::TestDspMemBlockRandom(unsigned int startAddr, unsigned int endAddr)
+{
+ unsigned int read, write;
+ HPIA(dsp) = startAddr;
+ srand(seed);
+ for (unsigned int dspAddr = startAddr; dspAddr < endAddr; dspAddr+=sizeof(unsigned int))
+ {
+ // Generate a 32-bit random number. rand() only returns 16 bits.
+ write = (rand() << 16);
+ write |= rand();
+ // Write test pattern.
+ *(unsigned int *)HPIS(dsp) = write;
+ }
+
+
+ srand(seed);
+ seed++;
+ for (dspAddr = startAddr; dspAddr < endAddr; dspAddr+=sizeof(unsigned int))
+ {
+ unsigned int expectedResult;
+
+ // Regenerate the random number sequence to determine the expected result.
+ expectedResult = (rand() << 16);
+ expectedResult |= rand();
+
+ // Read back from memory location.
+ HPIA(dsp) = dspAddr;
+ read = *(unsigned int *)HPID(dsp);
+
+ if (read != expectedResult)
+ {
+ numErrs++;
+ if (verbose)
+ {
+ SendResultData("DSPMemTest: Error address(%x) wrote(%x) read(%x)\n",
+ dspAddr, expectedResult, read);
+ }
+ }
+ }
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPMemTest::GetDiagnosticHelp
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): help string
+**
+**----------------------------------------------------------------------------*/
+char *DSPMemTest::GetDiagnosticHelp(void)
+{
+ return (
+ "DSPMemTest\n\n"
+ "Internal program and data RAM and external RAM will be tested \n"
+ "utilizing a parameter selected memory test.\n\n"
+ "WARNING!!! DO NOT RUN WHILE DSP'S ARE RUNNING!!!!\n\n"
+ "Parameters - DSPNum TestLocation TestType Duration Verbose\n"
+ "\tDSPNum - Dsp to test (0, 1)\n"
+ "\tTestLocation - Which part of DSP memory to test\n"
+ "\t\t0x01 = Internal PROGRAM memory\n"
+ "\t\t0x02 = Internal DATA memory\n"
+ "\t\t0x04 = External memory\n"
+ "\t\t0x07 = all locations\n"
+ "\tTestType - Memory test algorithm\n"
+ "\t\t0x01 = walking 0's\n"
+ "\t\t0x02 = walking 1's\n"
+ "\t\t0x04 = incrementing address\n"
+ "\t\t0x08 = inverse incrementing address\n"
+ "\t\t0x10 = random data test\n"
+ "\t\t0x1f = all tests\n"
+ "\tDuration - If non-zero the test will execute for the specified number\n"
+ "\t\tof seconds. If zero the specified test(s) will execute once.\n"
+ "\tVerbose - If non-zero show individual error occurences.\n\n"
+ "Returns - Number of failed memory locations\n"
+ );
+}
+
+
+// *******************************************************************
+// CFTest
+// *******************************************************************
+
+//------------------------------------------------------------------------------
+CFTest::CFTest(char *testName, int testNum,
+ ReqSourceType reqSrc, char *parms)
+ : Diagnostic(testName, testNum, reqSrc, parms)
+{
+}
+
+//------------------------------------------------------------------------------
+CFTest::~CFTest()
+{
+}
+
+//------------------------------------------------------------------------------
+int CFTest::InitiateDiagnostic(void)
+{
+ int numRepeat; /* number of times to repeat the test */
+ char testName[100];
+
+ sscanf(parameters, "%s %d", &testName, &numRepeat);
+ if (numRepeat < 0)
+ {
+ SendResultData("Invalid repeat count for the test (numRepeat)\n");
+ return ERROR;
+ }
+ SendResultData("%s numRepeat(%d)\n", testName, numRepeat);
+
+#define FILE_NAME "/ata/cfTestFile"
+
+/*******************************************************************************
+cfTest : CompactFlash Test
+
+Test the compact flash interface ann the media by writing a file with random
+characters and reading back to verify the write.
+Performs the test given number of times.
+*/
+
+ const int FileSize = 1024 * 1024;
+ const int BuffSize = 1024;
+ STATUS retStat = OK;
+ int fd;
+ char buff[BuffSize];
+ int i,j,n;
+ char* errorStr = "";
+
+ for (n = 0; (n < numRepeat) && (retStat != ERROR); n++)
+ {
+ fd = creat(FILE_NAME, O_RDWR);
+ if (fd != ERROR)
+ {
+ srand(1); /* set the seed */
+ /* write */
+ for (i = 0; i < (FileSize/BuffSize) && (retStat != ERROR); i++)
+ {
+ for (j = 0; j < BuffSize; j++)
+ {
+ buff[j] = rand();
+ }
+ if (write(fd, buff, BuffSize) == ERROR)
+ {
+ retStat = ERROR;
+ errorStr = "Error Writing";
+ break;
+ }
+ }
+ ioctl(fd, FIOSYNC, 0); /* flush the output, invalidate cache */
+
+ lseek(fd, 0, SEEK_SET); /* read from the start of the file */
+ srand(1); /* set the seed to generate same sequence of random numbers */
+ /* read */
+ for (i = 0; (i < (FileSize/BuffSize)) && (retStat != ERROR); i++)
+ {
+ if (read(fd, buff, BuffSize) == ERROR)
+ {
+ retStat = ERROR;
+ errorStr = "Error Reading";
+ break;
+ }
+ for (j = 0; j < BuffSize; j++)
+ {
+ if (buff[j] != (char)rand())
+ {
+ retStat = ERROR;
+ errorStr = "Incorrect Data Read";
+ break;
+ }
+ }
+ }
+ close(fd);
+ remove(FILE_NAME);
+ }
+ else
+ {
+ retStat = ERROR;
+ errorStr = "Cannot Create File";
+ break;
+ }
+ }
+ SendResultData("CompactFlash Test: %s %s\n", (retStat == ERROR) ? "FAIL;" : "PASS", errorStr);
+
+ InternalStopTest();
+ return retStat;
+
+}
+
+//------------------------------------------------------------------------------
+int CFTest::TerminateDiagnostic(void)
+{
+ return OK;
+}
+
+//------------------------------------------------------------------------------
+char* CFTest::GetDiagnosticHelp(void)
+{
+ return
+ ("
+ CFTest - CompactFlash Test
+
+ Tests the CompactFlash interface and the media by writing a file with
+ random characters and reading back the data.
+
+ Parameters:
+ numRepeat - number of times to repeat the test.
+ ");
+}
+
+
+// *******************************************************************
+// FPGA Test
+// *******************************************************************
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: FPGATest constructor
+**
+** PURPOSE: Initialize data members for FPGATest object.
+**
+** INPUT PARAMETERS: testName - ASCII name for test
+** testNum - test number
+** reqSrc - source of the diagnostic request
+** parms - pointer to parameter list in ASCII
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+FPGATest::FPGATest(char *testName, int testNum, ReqSourceType reqSrc,
+ char *parms) : Diagnostic(testName, testNum, reqSrc, parms)
+{
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: FPGATest destructor
+**
+** PURPOSE: Delete data members for FPGATest object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+FPGATest::~FPGATest()
+{
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: FPGATest::InitiateDiagnostic
+**
+** PURPOSE: This test will test out four FPGA registers with an incrementing
+** value test. Essentially we want to write from 0 to 0xffff to the
+** FPGA registers.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int FPGATest::InitiateDiagnostic(void)
+{
+ unsigned int value;
+ unsigned int mask = 0x0000FFFF;
+ unsigned int addr = 0x1030000;
+ unsigned int testValue = 0x00000080;
+ unsigned int fpga_num;
+ unsigned int index;
+ int verbose = 0;
+ char testName[256];
+
+ sscanf(parameters, "%s %d", &testName, &verbose);
+
+ if ( verbose != 0 & verbose != 1 )
+ {
+ SendResultData("invalid value for verbose: %d\n", verbose);
+ return ERROR;
+ }
+
+ for ( fpga_num=0; fpga_num<2; fpga_num++)
+ {
+ SendResultData("Starting FPGA #%d Test...\n", fpga_num);
+ for ( index=0; index<0x10000; index++ )
+ {
+ /* Write each location with an incrementing value up
+ to 16 bit unsigned limit. Make sure each register
+ is offset from each other to test internals. */
+
+ hpi2dspD(fpga_num,0x1000000,((index) % 0x10000));
+ hpi2dspD(fpga_num,0x1040000,((index+1) % 0x10000));
+ hpi2dspD(fpga_num,0x1050000,((index+2) % 0x10000));
+ hpi2dspD(fpga_num,0x1060000,((index+3) % 0x10000));
+
+ if ( verbose & ((index == 0x1 ) || (index == 0x3000) || (index == 0x9000)))
+ SendResultData("Finished writing memory - index=%d.\n", index);
+
+ // Test location 0x1000000
+ // Read back corresponding values, only take lower 16 bits back
+ value=dsp2hpiD(fpga_num,0x1000000) & 0x0000ffff;
+ if (value!=((index) % 0x10000))
+ {
+ SendResultData("FPGA #%d Test - FAILED at Location 0x1000000\n", fpga_num);
+ return ERROR;
+ }
+ else if ( verbose & ((index == 0x1 ) || (index == 0x3000) || (index == 0x9000)))
+ SendResultData("Finished reading memory at addr 0x1000000 - value = %d.\n", value);
+
+ // Test location 0x1040000
+ // Read back corresponding values
+ value=dsp2hpiD(fpga_num,0x1040000) & 0x0000ffff;
+ if (value!=((index+1) % 0x10000))
+ {
+ SendResultData("FPGA #%d Test - FAILED at Location 0x1040000\n", fpga_num);
+ return ERROR;
+ }
+ else if ( verbose & ((index == 0x1 ) || (index == 0x3000) || (index == 0x9000)))
+ SendResultData("Finished reading memory at addr 0x1040000 - value = %d.\n", value);
+
+ // Test location 0x1050000
+ // Read back corresponding values
+ value=dsp2hpiD(fpga_num,0x1050000) & 0x0000ffff;
+ if (value!=((index+2) % 0x10000))
+ {
+ SendResultData("FPGA #%d Test - FAILED at Location 0x1050000\n", fpga_num);
+ return ERROR;
+ }
+ else if ( verbose & ((index == 0x1 ) || (index == 0x3000) || (index == 0x9000)))
+ SendResultData("Finished reading memory at addr 0x1050000 - value = %d.\n", value);
+
+ // Test location 0x1060000
+ // Read back corresponding values
+ value=dsp2hpiD(fpga_num,0x1060000) & 0x0000ffff;
+ if (value!=((index+3) % 0x10000))
+ {
+ SendResultData("FPGA #%d Test - FAILED at Location 0x1060000\n", fpga_num);
+ return ERROR;
+ }
+ else if ( verbose & ((index == 0x1 ) || (index == 0x3000) || (index == 0x9000)))
+ SendResultData("Finished reading memory at addr 0x1060000 - value = %d.\n\n", value);
+ }
+ SendResultData("FPGA #%d Test - PASSED\n", fpga_num);
+ }
+ InternalStopTest();
+
+ return(OK);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: FPGATest::TerminateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int FPGATest::TerminateDiagnostic(void)
+{
+ return OK;
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: FPGATest::GetDiagnosticHelp
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): help string
+**
+**----------------------------------------------------------------------------*/
+char *FPGATest::GetDiagnosticHelp(void)
+{
+ return (
+ "**************************************\n"
+ "* CAUTION: This is an INTRUSIVE Test *\n"
+ "**************************************\n\n"
+ "It can only be used after running the dspTest script at boot up.\n\n"
+ "FPGA Test - Checks FPGA 0 then FPGA 1.\n"
+ " It executes writes and reads to the FPGA.\n\n"
+ "Parameters: \n\n"
+ " Verbose: 1 = Status Messages Sent, 0 = No Status Mesgs\n\n"
+
+ "Returns - Test Results: Pass or Fail for each FPGA.\n"
+ );
+}
+
+
+
+// *******************************************************************
+// I2C Test
+// *******************************************************************
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: I2CTest constructor
+**
+** PURPOSE: Initialize data members for I2C Test object.
+**
+** INPUT PARAMETERS: testName - ASCII name for test
+** testNum - test number
+** reqSrc - source of the diagnostic request
+** parms - pointer to parameter list in ASCII
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+I2CTest::I2CTest(char *testName, int testNum, ReqSourceType reqSrc,
+ char *parms) : Diagnostic(testName, testNum, reqSrc, parms)
+{
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: I2CTest destructor
+**
+** PURPOSE: Delete data members for I2CTest object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+I2CTest::~I2CTest()
+{
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: I2CTest::InitiateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int I2CTest::InitiateDiagnostic(void)
+{
+ STATUS result;
+
+ SendResultData("Starting I2C Test...");
+
+ if (( result = DS1780_Init() ) == OK )
+ SendResultData("PASSED\n");
+ else
+ SendResultData("FAILED\n");
+
+ InternalStopTest();
+
+ return(OK);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: I2CTest::TerminateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int I2CTest::TerminateDiagnostic(void)
+{
+ return OK;
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: I2CTest::GetDiagnosticHelp
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): help string
+**
+**----------------------------------------------------------------------------*/
+char *I2CTest::GetDiagnosticHelp(void)
+{
+ return (
+ "I2C Test\n\n"
+ "Initializes the DS1780 and sets it to its operating mode.\n"
+ "Returns - Status on the Standard Output\n");
+}
diff --git a/data/mnet/GP10/Host/Mch/src/Diagnostic.cpp b/data/mnet/GP10/Host/Mch/src/Diagnostic.cpp
new file mode 100644
index 0000000..926f7dc
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/src/Diagnostic.cpp
@@ -0,0 +1,575 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : Diagnostic.h
+// Author(s) : Tim Olson
+// Create Date : 6/29/99
+// Description :
+//
+// *******************************************************************
+
+#include <taskLib.h>
+#include <stdio.h>
+#include <string.h>
+#include "Diagnostic.h"
+#include "MCHInit.h"
+#include "logging/vclogging.h"
+#include "logging/vcmodules.h"
+#include "oam_api.h"
+#include "TcpServer/TcpSrvApi.h"
+
+// *******************************************************************
+// Diagnostic
+// *******************************************************************
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: Diagnostic constructor
+**
+** PURPOSE: Initialize paramters for diagnostic base class.
+**
+** INPUT PARAMETERS: testName - ASCII name for test
+** testNum - test number
+** reqSrc - source of the diagnostic request
+** parms - pointer to parameter list in ASCII
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+Diagnostic::Diagnostic(char *testName, int testNum, ReqSourceType reqSrc,
+ char *parms) : diagQId(0), instanceNum(0), reqSrc(reqSrc), testNumber(testNum),
+ isTimerCreated(FALSE)
+{
+ if (parms)
+ {
+ strncpy (parameters, parms, MCH_MAX_COMMAND_LINE_LEN);
+ }
+
+ if (testName)
+ {
+ diagName = new char[strlen(testName) + 1];
+ strcpy (diagName, testName);
+ }
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: Diagnostic destructor
+**
+** PURPOSE: Delete any data members allocated from free store.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+Diagnostic::~Diagnostic()
+{
+ delete [] diagName;
+
+ // Delete timer.
+ if (isTimerCreated)
+ {
+ timer_delete(durationTimer);
+ }
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: Diagnostic::SendDeleteMsg
+**
+** PURPOSE: Send a DIAG_DELETE_DIAGNOSTIC message to the MCHTask.
+** This message causes the MCHTask to remove the diagnostic from
+** the list of active diagnostics and to delete this instance of the
+** diagnostic.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void Diagnostic::SendDeleteMsg(void)
+{
+ DBG_FUNC("Diagnostic::SendDeleteMsg",DIAG_TEST);
+ DBG_ENTER();
+
+ int status;
+ MCHMessageType delDiagMsg;
+
+ // Initialize the delete diagnostic message.
+ delDiagMsg.func = MCH_DELETE_DIAGNOSTIC;
+ delDiagMsg.delDiagMsg.diag = this;
+
+ // Send delete diagnostic message to the diagnostic manager.
+ status = msgQSend(MCHMsgQId,
+ (char *)&delDiagMsg,
+ sizeof(MCHMessageType),
+ WAIT_FOREVER,
+ MSG_PRI_NORMAL);
+
+ if (status != OK)
+ {
+ DBG_WARNING("unable to send message %x\n", errno);
+ }
+ DBG_LEAVE();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DiagnosticManager::InternalStopTest
+**
+** PURPOSE: Diagnostics which determine their own completion must call this
+** function to terminate the test.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void Diagnostic::InternalStopTest(void)
+{
+ DBG_FUNC("Diagnostic::InternalStopTest",DIAG_TEST);
+ DBG_ENTER();
+
+ int status;
+ DiagnosticMsgType diagMsg;
+
+ // Initialize the delete diagnostic message.
+ diagMsg.func = DIAG_TEST_INTERNAL_STOP_TEST;
+
+ // Send internal stop diagnostic message to self.
+ status = msgQSend(diagQId,
+ (char *)&diagMsg,
+ sizeof(DiagnosticMsgType),
+ WAIT_FOREVER,
+ MSG_PRI_NORMAL);
+
+ if (status != OK)
+ {
+ DBG_WARNING("unable to send message %x\n", errno);
+ }
+
+ DBG_LEAVE();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DiagnosticManager::SendResultData
+**
+** PURPOSE: Send result data back to the original test requester. This
+** can be intermediate data or a final result.
+**
+** INPUT PARAMETERS: format - format string as if a printf
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void Diagnostic::SendResultData(char *format, ...)
+{
+ DBG_FUNC("Diagnostic::SendResultData",DIAG_TEST);
+ DBG_ENTER();
+
+ va_list ap;
+ va_start(ap, format);
+
+ switch (reqSrc)
+ {
+ case NETWORK_REQ:
+ {
+ // Break down the result data into null terminated strings that are
+ // of the size expected by OAM.
+ char buf[2048];
+
+ // Put result string into a buffer.
+ vsprintf(buf, format, ap);
+
+ // Send back to the network using the TCP server.
+ if (TcpSrvSendResponse(buf, strlen(buf), kMchGpName) != TRUE)
+ {
+ DBG_WARNING("Diagnostic: Unable to send response to TCP server\n");
+ }
+ }
+ break;
+ case TERMINAL_REQ:
+ {
+ vprintf(format, ap);
+ }
+ break;
+ }
+
+ va_end(ap);
+
+ DBG_LEAVE();
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: Diagnostic::TimerExpired
+**
+** PURPOSE: Duration timer has expired so send a message to the diagnostic to
+** terminate the diagnostic.
+**
+** INPUT PARAMETERS: timerId - Id of the duration timer for this diagnostic
+** diagPtr - pointer to instance of diagnostic (this pointer)
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void Diagnostic::TimerExpired(timer_t timerId, int diagPtr)
+{
+ DBG_FUNC("Diagnostic::TimerExpired",DIAG_TEST);
+ DBG_ENTER();
+
+ // Cast the integer paramter to be a pointer to the instance of diagnostic.
+ Diagnostic * myThis = (Diagnostic *)diagPtr;
+
+ int rtnStatus;
+ DiagnosticMsgType diagMsg;
+ diagMsg.func = DIAG_TEST_INTERNAL_STOP_TEST;
+
+ // Send a message to the diagnostic to end the current test.
+ rtnStatus = msgQSend(myThis->diagQId,
+ (char *)&diagMsg,
+ sizeof(DiagnosticMsgType),
+ WAIT_FOREVER,
+ MSG_PRI_NORMAL);
+ if (rtnStatus != OK)
+ {
+ DBG_WARNING("unable to send message %d", rtnStatus);
+ }
+ DBG_LEAVE();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: Diagnostic::SetTimer
+**
+** PURPOSE: Connect a function to the duration timer and set the seconds value
+** to the specified number of seconds.
+**
+** INPUT PARAMETERS: seconds - number of seconds to set the duration timer
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void Diagnostic::SetTimer(UINT seconds)
+{
+ DBG_FUNC("Diagnostic::SetTimer",DIAG_TEST);
+ DBG_ENTER();
+
+ if (!isTimerCreated)
+ {
+ // Create a timer for use by the diagnostic.
+ if (timer_create(CLOCK_REALTIME, NULL, &durationTimer) == -1)
+ {
+ DBG_WARNING("Unable to create duration timer %d", errno);
+ }
+ else
+ {
+ isTimerCreated = TRUE;
+ }
+ }
+
+ if (timer_connect(durationTimer, (VOIDFUNCPTR)Diagnostic::TimerExpired, (int)this) == -1)
+ {
+ DBG_WARNING("error connecting to duration timer");
+ }
+
+ itimerspec timeout;
+ timeout.it_interval.tv_nsec = 0;
+ timeout.it_interval.tv_sec = 0;
+ timeout.it_value.tv_nsec = 0;
+ timeout.it_value.tv_sec = seconds;
+
+ if (timer_settime(durationTimer, CLOCK_REALTIME, &timeout, NULL) == -1)
+ {
+ DBG_WARNING("error setting to duration timer");
+ }
+ DBG_LEAVE();
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: Diagnostic::RunDiagnostic
+**
+** PURPOSE: RunDiagnostic initializes the necessary resources to run the
+** specified diagnostic. A queue and a task are created to
+** be able to run the diagnostic and respond to messages.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): an indication of whether the test was initiated
+**
+**----------------------------------------------------------------------------*/
+int Diagnostic::RunDiagnostic(void)
+{
+ DBG_FUNC("Diagnostic::RunDiagnostic",DIAG_TEST);
+ DBG_ENTER();
+
+ int rtnStatus;
+
+ // Create a message queue for this diagnostic.
+ diagQId = msgQCreate(
+ DIAG_TEST_MAX_MSGS,
+ sizeof(DiagnosticMsgType),
+ MSG_Q_PRIORITY);
+
+ if ( !diagQId )
+ {
+ DBG_WARNING("Unable to create Queue %d", errno);
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ // Spawn a task to run this diagnostic. The function called is a static function
+ // of diagnostic. Since the object needs an instance to access data
+ // members and non-static functions, the this pointer is passed as an argument.
+ rtnStatus = taskSpawn(diagName, DIAGNOSTIC_TEST_TASK_PRI, 0,
+ DIAGNOSTIC_TEST_STACK_SIZE,
+ (FUNCPTR) Diagnostic::DiagnosticMsgLoop,
+ (int)this, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
+
+ if ( rtnStatus == ERROR )
+ {
+ DBG_WARNING("Unable to create Task %d", rtnStatus);
+ msgQDelete(diagQId);
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: Diagnostic::DiagnosticMsgLoop
+**
+** PURPOSE: Execute the diagnostic. After initiating the execution of the
+** diagnostic, loop forever and wait for messages. Valid messages are
+** DIAG_TEST_STOP_TEST, DIAG_TEST_SEND_TEST_REPORT and
+** DIAG_TEST_INTERNAL_STOP_TEST.
+**
+** The flow is like this:
+** call InitiateDiagnostic (overloaded by derived class)
+** Loop for messages
+** process common messages
+** call ProcessMessage (overloaded by derived class)
+** call TerminateDiagnostic (overloaded by derived class)
+** send DELETE_DIAGNOSTIC message
+** delete message queue
+** end task
+**
+** InitiateDiagnostic - should be overloaded by diagnostic to start diagnostic
+** ProcessMessage - should be overloaded only if derived diagnostic test needs
+** to process messages specific to itself.
+** TerminateDiagnostic - should be overloaded to handle test cleanup and test
+** report generation if appropriate.
+**
+** INPUT PARAMETERS: argThis - pointer to the instance of diagnostic
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void Diagnostic::DiagnosticMsgLoop(int argThis)
+{
+ DBG_FUNC("Diagnostic::DiagnosticMsgLoop",DIAG_TEST);
+ DBG_ENTER();
+
+ // Cast the integer parameter to be a pointer to the instance of diagnostic.
+ Diagnostic * myThis = (Diagnostic *)argThis;
+
+
+ // Begin execution of the diagnostic. If something goes wrong then send a
+ // NACK back to the requester and delete this instance of diagnostic.
+ if (myThis->InitiateDiagnostic() != OK)
+ {
+ DBG_WARNING("Unable to enable diagnostic");
+ DBG_LEAVE();
+ // Let the MCH task know to delete this instance of diag.
+ myThis->SendDeleteMsg();
+ msgQDelete(myThis->diagQId);
+ DBG_LEAVE();
+ return;
+ }
+
+
+ // Loop here for messages: DIAG_STOP_TEST.
+ int rtnStatus;
+
+ DiagnosticMsgType diagMsg;
+
+
+ int done = FALSE;
+ while (!done)
+ {
+ rtnStatus = msgQReceive(
+ myThis->diagQId,
+ (char *)&diagMsg,
+ sizeof(DiagnosticMsgType),
+ WAIT_FOREVER );
+
+ if ( rtnStatus == ERROR )
+ {
+ DBG_WARNING("error from sw_msgq_receive %d\n", errno);
+ break;
+ }
+
+ // Based on the receive function perform desired action.
+ switch ( diagMsg.func )
+ {
+ case DIAG_TEST_STOP_TEST:
+ {
+ done = TRUE;
+ break;
+ }
+
+ case DIAG_TEST_INTERNAL_STOP_TEST:
+ {
+ done = TRUE;
+ break;
+ }
+
+ default:
+ {
+ done = myThis->ProcessMessage(diagMsg);
+ }
+ } /*** switch ( RcvFunc ) ***/
+ } /*** task loop ***/
+
+
+ // Terminate diagnostic
+ if (myThis->TerminateDiagnostic() != OK)
+ {
+ DBG_WARNING("Unable to disable diagnostic");
+ }
+
+ // Let the MCH task know to delete this instance of diag.
+ myThis->SendDeleteMsg();
+
+ // Delete the message queue.
+ msgQDelete(myThis->diagQId);
+ DBG_LEAVE();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: Diagnostic::ProcessMessage
+**
+** PURPOSE: ProcessMessage should be overloaded by a derived diagnostic to
+** process any messages specific to that diagostic.
+**
+** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+**
+** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+** STOP_TEST - if the controlling message loop should end
+**
+**----------------------------------------------------------------------------*/
+int Diagnostic::ProcessMessage(DiagnosticMsgType diagMsg)
+{
+ DBG_FUNC("Diagnostic::ProcessMessage",DIAG_TEST);
+ DBG_ENTER();
+
+
+ DBG_LEAVE();
+ return CONTINUE_TEST;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: Diagnostic::isAMatch
+**
+** PURPOSE: Test if the diagnostic matches the specified test number.
+**
+** INPUT PARAMETERS: testNum - test number
+**
+** RETURN VALUE(S): 0 - if NOT a match
+** 1 - if a match
+**
+**----------------------------------------------------------------------------*/
+char Diagnostic::isAMatch(int testNum)
+{
+ return (testNum==testNumber);
+}
+
+
+
+char **DiagNames[DIAG_LAST_DIAG_GROUP>>DIAG_GROUP_NUM_BITS] =
+{
+ CDCDiagNames,
+ DSPDiagNames,
+ RFDiagNames,
+ CLKDiagNames,
+ GPSDiagNames,
+ SystemDiagNames
+};
+
+char *CDCDiagNames[DIAG_DIAGS_PER_GROUP] =
+{
+ "CDC Diagnostics",
+ "HPIMemoryAccess",
+ "I2CLoopback",
+ "DSPMemTest",
+ "CFTest",
+ "FPGATest",
+ "I2CTest"
+};
+
+char *DSPDiagNames[DIAG_DIAGS_PER_GROUP] =
+{
+ "DSP Diagnostics",
+ "DSPLoopback",
+ "MSReport",
+ "HOReport",
+ "DLReport",
+ "HPIEchoTest",
+ "DSPBBLBTest",
+ "DSPExtMemTest",
+ "IFReport",
+ "GPRSMsReport"
+};
+
+char *RFDiagNames[DIAG_DIAGS_PER_GROUP] =
+{
+ "RF Diagnostics",
+};
+
+char *CLKDiagNames[DIAG_DIAGS_PER_GROUP] =
+{
+ "CLK Diagnostics",
+};
+
+char *GPSDiagNames[DIAG_DIAGS_PER_GROUP] =
+{
+ "GPS Diagnostics",
+};
+
+
+char *SystemDiagNames[DIAG_DIAGS_PER_GROUP] =
+{
+ "System Diagnostics",
+ "NetworkTestServer",
+ "NetworkTestTransmit"
+};
diff --git a/data/mnet/GP10/Host/Mch/src/DspDiags.cpp b/data/mnet/GP10/Host/Mch/src/DspDiags.cpp
new file mode 100644
index 0000000..409c9d1
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/src/DspDiags.cpp
@@ -0,0 +1,2552 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : DspDiags.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/29/99
+// Description :
+//
+// *******************************************************************
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <taskLib.h>
+#include <string.h>
+#include "DspDiags.h"
+#include "dsp/dsptypes.h"
+#include "dsp/dsphmsg.h"
+#include "rm/rml1_intf.h"
+#include "logging/vclogging.h"
+#include "logging/vcmodules.h"
+#include "cdcUtils/cdcUtils.h"
+
+// *******************************************************************
+// DSPLoopbackTest
+// *******************************************************************
+
+#define DSP_NO_LOOPBACK 0
+#define DSP_LOCAL_LOOPBACK 1
+#define DSP_BASBAND_LOOPBACK 2
+#define DSP_IQ_LOOPBACK 3
+#define DSP_TCH_LOOPBACK 4
+#define DSP_TCH_TO_HOST_LOOPBACK 5
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPLoopbackTest constructor
+**
+** PURPOSE: Initialize data members for DSPLoopbackTest object.
+**
+** INPUT PARAMETERS: testName - ASCII name for test
+** testNum - test number
+** reqSrc - source of the diagnostic request
+** parms - pointer to parameter list in ASCII
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+DSPLoopbackTest::DSPLoopbackTest(char *testName, int testNum, ReqSourceType reqSrc,
+ char *parms) : Diagnostic(testName, testNum, reqSrc, parms)
+{
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPLoopbackTest destructor
+**
+** PURPOSE: Delete data members for DSPLoopbackTest object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+DSPLoopbackTest::~DSPLoopbackTest()
+{
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPLoopbackTest::InitiateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int DSPLoopbackTest::InitiateDiagnostic(void)
+{
+ DBG_FUNC("DSPLoopbackTest::InitiateDiagnostic", DSP_DIAGS);
+ DBG_ENTER();
+ int loopType;
+ char testName[256];
+ duration = 0;
+ sscanf(parameters, "%s %u %d %u", &testName, &trx, &loopType, &duration);
+
+ // Verify parameters
+ if (trx > 1)
+ {
+ SendResultData("Invalid TRX number %u\n", trx);
+ DBG_TRACE("Invalid TRX number %u\n", trx);
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ if ((loopType < DSP_LOCAL_LOOPBACK) || (loopType > DSP_TCH_TO_HOST_LOOPBACK))
+ {
+ SendResultData("Invalid testType number %d\n", loopType);
+ DBG_TRACE("Invalid testType number %d\n", loopType);
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ SendResultData ("%s TRX(%d) loopbackType(%d) duration(%d)\n",
+ testName, trx, loopType, duration);
+
+ DBG_TRACE ("%s TRX(%d) loopbackType(%d) duration(%d)\n",
+ testName, trx, loopType, duration);
+
+ // If this is a timed test then start the timer.
+ if (duration)
+ {
+ SetTimer(duration);
+ }
+
+ // Start loopback
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_SET_LOOPBACK_MODE_REQ>>8;
+ buffer[length++] = MPH_DSP_SET_LOOPBACK_MODE_REQ;
+ buffer[length++] = trx;
+ buffer[length++] = loopType;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ DBG_LEAVE();
+ return OK;
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPLoopbackTest::TerminateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int DSPLoopbackTest::TerminateDiagnostic(void)
+{
+ DBG_FUNC("DSPLoopbackTest::TerminateDiagnostic", DSP_DIAGS);
+ DBG_ENTER();
+ // If we are stopping the test for any reason and it is a timed test
+ // then cancel the timer.
+ if (duration)
+ {
+ SetTimer(0);
+ }
+
+ // Stop loopback
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_SET_LOOPBACK_MODE_REQ>>8;
+ buffer[length++] = MPH_DSP_SET_LOOPBACK_MODE_REQ;
+ buffer[length++] = trx;
+ buffer[length++] = 0;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ SendResultData("DSPLoopback Test Complete!");
+ DBG_TRACE("DSPLoopback Test Complete!");
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPLoopbackTest::GetDiagnosticHelp
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): help string
+**
+**----------------------------------------------------------------------------*/
+char *DSPLoopbackTest::GetDiagnosticHelp(void)
+{
+ DBG_FUNC("DSPLoopbackTest::GetDiagnosticHelp", DSP_DIAGS);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return (
+ "DSPLoopback\n\n"
+ "Enables various data loopbacks with the dsp application\n\n"
+ "Parameters - TRX LoopbackType Duration\n"
+ "\tTRX - TRX to perform a loopback on (0, 1)\n"
+ "\tLoopbackType - The desired loopback mode\n"
+ "\t\t1 : Local Loopback.\n"
+ "\t\t2 : Baseband Loopback.\n"
+ "\t\t3 : IQ Loopback.\n"
+ "\t\t4 : TCH Loopback.\n"
+ "\t\t5 : TCH to Host Loopback.\n"
+ "\tDuration - If non-zero loopback operates for given number of seconds.\n\n"
+ "Returns - Nothing\n"
+ );
+}
+
+
+
+
+
+// *******************************************************************
+// DSPMSReport
+// *******************************************************************
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPMSReport constructor
+**
+** PURPOSE: Initialize data members for DSPMSReport object.
+**
+** INPUT PARAMETERS: testName - ASCII name for test
+** testNum - test number
+** reqSrc - source of the diagnostic request
+** parms - pointer to parameter list in ASCII
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+DSPMSReport::DSPMSReport(char *testName, int testNum, ReqSourceType reqSrc,
+ char *parms) : Diagnostic(testName, testNum, reqSrc, parms)
+{
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPMSReport destructor
+**
+** PURPOSE: Delete data members for DSPMSReport object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+DSPMSReport::~DSPMSReport()
+{
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPMSReport::InitiateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int DSPMSReport::InitiateDiagnostic(void)
+{
+ DBG_FUNC("DSPMSReport::InitiateDiagnostic", DSP_DIAGS);
+ DBG_ENTER();
+
+ unsigned int trx0TsMask, trx1TsMask;
+ char testName[256];
+ duration = 0;
+ sscanf(parameters, "%s %x %x %u", &testName, &trx0TsMask, &trx1TsMask, &duration);
+
+ // Verify parameters
+ if (trx0TsMask > 0xff)
+ {
+ SendResultData("Invalid TS Mask for TRX 0 %d\n", trx0TsMask);
+ DBG_TRACE("Invalid TS Mask for TRX 0 %d\n", trx0TsMask);
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ if (trx1TsMask > 0xff)
+ {
+ SendResultData("Invalid TS Mask for TRX 1 %d\n", trx1TsMask);
+ DBG_TRACE("Invalid TS Mask for TRX 1 %d\n", trx1TsMask);
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ SendResultData ("%s TRX0TsMask(%x) TRX1TsMask(%x) duration(%d)\n",
+ testName, trx0TsMask, trx1TsMask, duration);
+ DBG_TRACE ("%s TRX0TsMask(%x) TRX1TsMask(%x) duration(%d)\n",
+ testName, trx0TsMask, trx1TsMask, duration);
+
+
+ // If this is a timed test then start the timer.
+ if (duration)
+ {
+ SetTimer(duration);
+ }
+
+ // Start MS reporting
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 0;
+ buffer[length++] = MS_REPORT;
+ buffer[length++] = trx0TsMask;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 1;
+ buffer[length++] = MS_REPORT;
+ buffer[length++] = trx1TsMask;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ DBG_LEAVE();
+ return OK;
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPMSReport::TerminateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int DSPMSReport::TerminateDiagnostic(void)
+{
+ DBG_FUNC("DSPMSReport::TerminateDiagnostic", DSP_DIAGS);
+ DBG_ENTER();
+
+ // If we are stopping the test for any reason and it is a timed test
+ // then cancel the timer.
+ if (duration)
+ {
+ SetTimer(0);
+ }
+
+ // Stop loopback
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 0;
+ buffer[length++] = MS_REPORT;
+ buffer[length++] = 0;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 1;
+ buffer[length++] = MS_REPORT;
+ buffer[length++] = 0;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ SendResultData("MSReport Test Complete!");
+ DBG_TRACE("MSReport Test Complete!");
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPMSReport::ProcessMessage
+**
+** PURPOSE: Process messages not handled by Diagnostic base class. The
+** only expected message is DIAG_MS_REPORT.
+**
+** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+**
+** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+** STOP_TEST - if the controlling message loop should end
+**
+**----------------------------------------------------------------------------*/
+int DSPMSReport::ProcessMessage(DiagnosticMsgType diagMsg)
+{
+ DBG_FUNC("DSPMSReport::GetDiagnosticHelp", DSP_DIAGS);
+ DBG_ENTER();
+
+ switch ( diagMsg.func )
+ {
+ case DIAG_MS_REPORT:
+ {
+ float ber, fer;
+ unsigned long cumErrs, cumBits, cumFrameErrs, cumFrames;
+ short power, count, ta, cmdPwr;
+ short minToa, maxToa, cumToa, avgToa;
+ char msgString[256];
+
+ unsigned char TRX = diagMsg.msgBody[7];
+ unsigned char timeSlot = diagMsg.msgBody[8] & 7;
+ unsigned char subCh = (diagMsg.msgBody[8] >> 3) & 3;
+
+ cumErrs = (unsigned long)(diagMsg.msgBody[10])<<24 |
+ (unsigned long)(diagMsg.msgBody[11])<<16 |
+ (unsigned long)(diagMsg.msgBody[12])<< 8 |
+ (unsigned long)(diagMsg.msgBody[13]);
+ cumBits = (unsigned long)(diagMsg.msgBody[14])<<24 |
+ (unsigned long)(diagMsg.msgBody[15])<<16 |
+ (unsigned long)(diagMsg.msgBody[16])<< 8 |
+ (unsigned long)(diagMsg.msgBody[17]);
+ cumFrameErrs= (unsigned long)(diagMsg.msgBody[26])<< 8 |
+ (unsigned long)(diagMsg.msgBody[27]);
+ cumFrames = (unsigned long)(diagMsg.msgBody[28])<< 8 |
+ (unsigned long)(diagMsg.msgBody[29]);
+ count = (short) (diagMsg.msgBody[18]);
+ power = (short) ( (unsigned short)(diagMsg.msgBody[19])<<8 |
+ (unsigned short)(diagMsg.msgBody[20]) );
+ minToa = (short) ((unsigned short)(diagMsg.msgBody[21])<<8) >> 8;
+ maxToa = (short) ((unsigned short)(diagMsg.msgBody[22])<<8) >> 8;
+ cumToa = (short) ((unsigned short)(diagMsg.msgBody[23])<<8) >> 8;
+ ta = (short) (diagMsg.msgBody[24]);
+ cmdPwr = (short) (diagMsg.msgBody[25]);
+ ber = (cumBits>0) ? (100.0 * float(cumErrs) / float(cumBits)) : 0.0;
+ fer = (cumFrames>0) ? (100.0*float(cumFrameErrs)/float(cumFrames)) : 0.0;
+
+ if ( count > 0 )
+ { /*----------- round TOA -------------------*/
+ avgToa = (cumToa<0) ? (cumToa-(count>>1))/count
+ : (cumToa+(count>>1))/count;
+ }
+ else
+ {
+ avgToa = 99;
+ }
+ sprintf(msgString, "Trx%1d Ts%1d Sub%1d BER%6.3f%% FER%6.3f%% ",
+ TRX, timeSlot, subCh, ber, fer);
+ sprintf(msgString+36, "(%6ld,%3ld) RXLEV%3d CmdPwr %02d TA%2d TOA %d,%d,%d",
+ cumBits, cumFrames, power, cmdPwr, ta, minToa, avgToa, maxToa);
+
+ SendResultData("\n%s\n", msgString);
+
+ DBG_TRACE("%s", msgString);
+
+ break;
+ }
+ }
+
+ DBG_LEAVE();
+ return CONTINUE_TEST;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPMSReport::GetDiagnosticHelp
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): help string
+**
+**----------------------------------------------------------------------------*/
+char *DSPMSReport::GetDiagnosticHelp(void)
+{
+ DBG_FUNC("DSPMSReport::GetDiagnosticHelp", DSP_DIAGS);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return (
+ "DSPMSReport\n\n"
+ "Continuously reports BER, received power level and other parameters of\n"
+ "selected active time slots on TRX0 and TRX1.\n\n"
+ "Parameters - TRX0TsMask TRX1TsMask Duration\n"
+ "\tTRX0TsMask - Timslot selection for TRX0 (hex) (bit 0 = TS0, bit 1 = TS1 etc.)\n"
+ "\tTRX1TsMask - Timslot selection for TRX1 (hex) (bit 0 = TS0, bit 1 = TS1 etc.)\n"
+ "\tDuration - If non-zero MS reporting is enabled for given number of seconds.\n\n"
+ "Returns - Nothing\n"
+ );
+}
+
+
+
+
+// *******************************************************************
+// DSPGPRSMSReport
+// *******************************************************************
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPGPRSMSReport constructor
+**
+** PURPOSE: Initialize data members for DSPGPRSMSReport object.
+**
+** INPUT PARAMETERS: testName - ASCII name for test
+** testNum - test number
+** reqSrc - source of the diagnostic request
+** parms - pointer to parameter list in ASCII
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+DSPGPRSMSReport::DSPGPRSMSReport(char *testName, int testNum, ReqSourceType reqSrc,
+ char *parms) : Diagnostic(testName, testNum, reqSrc, parms)
+{
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPGPRSMSReport destructor
+**
+** PURPOSE: Delete data members for DSPGPRSMSReport object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+DSPGPRSMSReport::~DSPGPRSMSReport()
+{
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPGPRSMSReport::InitiateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int DSPGPRSMSReport::InitiateDiagnostic(void)
+{
+ DBG_FUNC("DSPGPRSMSReport::InitiateDiagnostic", DSP_DIAGS);
+ DBG_ENTER();
+
+ unsigned long tfiMask0, tfiMask1;
+ char testName[256];
+ duration = 0;
+ sscanf(parameters, "%s %x %x %u", &testName, &tfiMask0, &tfiMask1, &duration);
+
+ SendResultData ("%s tfiMask0(%x) tfiMask1(%x) duration(%d)\n",
+ testName, tfiMask0, tfiMask1, duration);
+ DBG_TRACE ("%s TfiMask(%x) tfiMask1(%x) duration(%d)\n",
+ testName, tfiMask0, tfiMask1, duration);
+
+
+ // If this is a timed test then start the timer.
+ if (duration)
+ {
+ SetTimer(duration);
+ }
+
+ // Start GPRS MS reporting
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 0;
+ buffer[length++] = GPRS_MS_REPORT;
+ buffer[length++] = (tfiMask0>>24) & 0xff;
+ buffer[length++] = (tfiMask0>>16) & 0xff;
+ buffer[length++] = (tfiMask0>> 8) & 0xff;
+ buffer[length++] = (tfiMask0 ) & 0xff;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 1;
+ buffer[length++] = GPRS_MS_REPORT;
+ buffer[length++] = (tfiMask1>>24) & 0xff;
+ buffer[length++] = (tfiMask1>>16) & 0xff;
+ buffer[length++] = (tfiMask1>> 8) & 0xff;
+ buffer[length++] = (tfiMask1 ) & 0xff;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ DBG_LEAVE();
+ return OK;
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPGPRSMSReport::TerminateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int DSPGPRSMSReport::TerminateDiagnostic(void)
+{
+ DBG_FUNC("DSPGPRSMSReport::TerminateDiagnostic", DSP_DIAGS);
+ DBG_ENTER();
+
+ // If we are stopping the test for any reason and it is a timed test
+ // then cancel the timer.
+ if (duration)
+ {
+ SetTimer(0);
+ }
+
+ // Stop reporting
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 0;
+ buffer[length++] = GPRS_MS_REPORT;
+ buffer[length++] = 0;
+ buffer[length++] = 0;
+ buffer[length++] = 0;
+ buffer[length++] = 0;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 1;
+ buffer[length++] = GPRS_MS_REPORT;
+ buffer[length++] = 0;
+ buffer[length++] = 0;
+ buffer[length++] = 0;
+ buffer[length++] = 0;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ SendResultData("GPRS MSReport Test Complete!");
+ DBG_TRACE("GPRS MSReport Test Complete!");
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPGPRSMSReport::ProcessMessage
+**
+** PURPOSE: Process messages not handled by Diagnostic base class. The
+** only expected message is DIAG_GPRS_MS_REPORT.
+**
+** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+**
+** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+** STOP_TEST - if the controlling message loop should end
+**
+**----------------------------------------------------------------------------*/
+int DSPGPRSMSReport::ProcessMessage(DiagnosticMsgType diagMsg)
+{
+ DBG_FUNC("DSPGPRSMSReport::GetDiagnosticHelp", DSP_DIAGS);
+ DBG_ENTER();
+
+ switch ( diagMsg.func )
+ {
+ case DIAG_GPRS_MS_REPORT:
+ {
+ //float ber, fer;
+ unsigned long cumErrs, cumBits, cumFrameErrs, cumFrames;
+ short power, count, ta, cmdPwr;
+ short ulcodec, dlcodec;
+ short minToa, maxToa, cumToa, avgToa;
+ float ber, bler;
+ unsigned short berAv, blerAv;
+ char msgString[256];
+
+ unsigned char TRX = diagMsg.msgBody[7];
+ unsigned char timeSlot = diagMsg.msgBody[8] & 7;
+ unsigned char subCh = (diagMsg.msgBody[8] >> 3) & 3;
+
+ unsigned char tfi = diagMsg.msgBody[18];
+
+ cumErrs = (unsigned long)(diagMsg.msgBody[10])<<24 |
+ (unsigned long)(diagMsg.msgBody[11])<<16 |
+ (unsigned long)(diagMsg.msgBody[12])<< 8 |
+ (unsigned long)(diagMsg.msgBody[13]);
+ cumBits = (unsigned long)(diagMsg.msgBody[14])<<24 |
+ (unsigned long)(diagMsg.msgBody[15])<<16 |
+ (unsigned long)(diagMsg.msgBody[16])<< 8 |
+ (unsigned long)(diagMsg.msgBody[17]);
+ cumFrameErrs= (unsigned long)(diagMsg.msgBody[26])<< 8 |
+ (unsigned long)(diagMsg.msgBody[27]);
+ cumFrames = (unsigned long)(diagMsg.msgBody[28])<< 8 |
+ (unsigned long)(diagMsg.msgBody[29]);
+
+ //berAv = (float) ((unsigned short)(diagMsg.msgBody[33] << 8) |
+ // (unsigned short)(diagMsg.msgBody[34]));
+ //blerAv = (float) ((unsigned short)(diagMsg.msgBody[35] << 8) |
+ // (unsigned short)(diagMsg.msgBody[36]));
+
+ count = (short) (diagMsg.msgBody[30]);
+ ulcodec = (short) (diagMsg.msgBody[31]);
+ dlcodec = (short) (diagMsg.msgBody[32]);
+
+ power = (short) ( (unsigned short)(diagMsg.msgBody[19])<<8 |
+ (unsigned short)(diagMsg.msgBody[20]) );
+ minToa = (short) ((unsigned short)(diagMsg.msgBody[21])<<8) >> 8;
+ maxToa = (short) ((unsigned short)(diagMsg.msgBody[22])<<8) >> 8;
+ cumToa = (short) ((unsigned short)(diagMsg.msgBody[23])<<8) >> 8;
+ ta = (short) (diagMsg.msgBody[24]);
+ //cmdPwr = (short) (diagMsg.msgBody[25]);
+
+ ber = (cumBits>0) ? (100.0 * float(cumErrs) / float(cumBits)) : 0.0;
+ bler = (cumFrames>0) ? (100.0 * float(cumFrameErrs) / float(cumFrames)) : 0.0;
+
+ if ( count > 0 )
+ { /*----------- round TOA -------------------*/
+ avgToa = (cumToa<0) ? (cumToa-(count>>1))/count
+ : (cumToa+(count>>1))/count;
+ }
+ else
+ {
+ avgToa = 99;
+ }
+
+ sprintf(msgString, "Trx%1d Tfi%02d BER%6.3f%% BLR%6.3f%% ",
+ TRX, tfi, ber, bler);
+ sprintf(msgString+33, "(%6ld,%3ld) RXLEV%3d TA%2d TOA%2d UR%d",
+ cumBits, cumFrames, power, ta, avgToa, ulcodec);
+
+ SendResultData("\n%s\n", msgString);
+
+ //sprintf(msgString, "Continued... AveBER%6.3f%% AveBLER%6.3f%% ",
+ // berAv, blerAv);
+
+ //SendResultData("\n%s\n", msgString);
+
+
+ DBG_TRACE("%s", msgString);
+
+ break;
+ }
+ }
+
+ DBG_LEAVE();
+ return CONTINUE_TEST;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPGPRSMSReport::GetDiagnosticHelp
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): help string
+**
+**----------------------------------------------------------------------------*/
+char *DSPGPRSMSReport::GetDiagnosticHelp(void)
+{
+ DBG_FUNC("DSPGPRSMSReport::GetDiagnosticHelp", DSP_DIAGS);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return (
+ "DSPGPRSMSReport\n\n"
+ "Continuously reports BER, BLER, received power level and other\n"
+ "parameters of selected active Temporary Block Flows on TRX0 and TRX1.\n\n"
+ "Parameters - TRX0TsMask TRX1TsMask Duration\n"
+ "\tTRX0TfiMask - TFI selection for TRX0 (hex) (bit 0 = TFI0, bit 1 = TFI1 etc.)\n"
+ "\tTRX1TfiMask - TFI selection for TRX1 (hex) (bit 0 = TFI0, bit 1 = TFI1 etc.)\n"
+ "\tDuration - If non-zero MS reporting is enabled for given number of seconds.\n\n"
+ "Returns - Nothing\n"
+ );
+}
+
+
+
+
+
+// *******************************************************************
+// DSPHOReport
+// *******************************************************************
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPHOReport constructor
+**
+** PURPOSE: Initialize data members for DSPHOReport object.
+**
+** INPUT PARAMETERS: testName - ASCII name for test
+** testNum - test number
+** reqSrc - source of the diagnostic request
+** parms - pointer to parameter list in ASCII
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+DSPHOReport::DSPHOReport(char *testName, int testNum, ReqSourceType reqSrc,
+ char *parms) : Diagnostic(testName, testNum, reqSrc, parms)
+{
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPHOReport destructor
+**
+** PURPOSE: Delete data members for DSPHOReport object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+DSPHOReport::~DSPHOReport()
+{
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPHOReport::InitiateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int DSPHOReport::InitiateDiagnostic(void)
+{
+ DBG_FUNC("DSPHOReport::InitiateDiagnostic", DSP_DIAGS);
+ DBG_ENTER();
+
+ unsigned int trx0TsMask, trx1TsMask;
+ char testName[256];
+ duration = 0;
+ sscanf(parameters, "%s %x %x %u", &testName, &trx0TsMask, &trx1TsMask, &duration);
+
+ // Verify parameters
+ if (trx0TsMask > 0xff)
+ {
+ SendResultData("Invalid TS Mask for TRX 0 %d\n", trx0TsMask);
+ DBG_TRACE("Invalid TS Mask for TRX 0 %d\n", trx0TsMask);
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ if (trx1TsMask > 0xff)
+ {
+ SendResultData("Invalid TS Mask for TRX 1 %d\n", trx1TsMask);
+ DBG_TRACE("Invalid TS Mask for TRX 1 %d\n", trx1TsMask);
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ SendResultData ("%s TRX0TsMask(%x) TRX1TsMask(%x) duration(%d)\n",
+ testName, trx0TsMask, trx1TsMask, duration);
+ DBG_TRACE ("%s TRX0TsMask(%x) TRX1TsMask(%x) duration(%d)\n",
+ testName, trx0TsMask, trx1TsMask, duration);
+
+
+ // If this is a timed test then start the timer.
+ if (duration)
+ {
+ SetTimer(duration);
+ }
+
+ // Start MS reporting
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 0;
+ buffer[length++] = HO_REPORT;
+ buffer[length++] = trx0TsMask;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 1;
+ buffer[length++] = HO_REPORT;
+ buffer[length++] = trx1TsMask;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ DBG_LEAVE();
+ return OK;
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPHOReport::TerminateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int DSPHOReport::TerminateDiagnostic(void)
+{
+ DBG_FUNC("DSPHOReport::TerminateDiagnostic", DSP_DIAGS);
+ DBG_ENTER();
+
+ // If we are stopping the test for any reason and it is a timed test
+ // then cancel the timer.
+ if (duration)
+ {
+ SetTimer(0);
+ }
+
+ // Stop loopback
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 0;
+ buffer[length++] = HO_REPORT;
+ buffer[length++] = 0;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 1;
+ buffer[length++] = HO_REPORT;
+ buffer[length++] = 0;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ SendResultData("HOReport Test Complete!");
+ DBG_TRACE("HOReport Test Complete!");
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPHOReport::ProcessMessage
+**
+** PURPOSE: Process messages not handled by Diagnostic base class. The
+** only expected messages are DIAG_HO_PN_REPORT and DIAG_HO_CAND_REPORT.
+**
+** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+**
+** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+** STOP_TEST - if the controlling message loop should end
+**
+**----------------------------------------------------------------------------*/
+int DSPHOReport::ProcessMessage(DiagnosticMsgType diagMsg)
+{
+ DBG_FUNC("DSPHOReport::GetDiagnosticHelp", DSP_DIAGS);
+ DBG_ENTER();
+
+ switch ( diagMsg.func )
+ {
+ case DIAG_HO_PN_REPORT:
+ {
+ short ul_rxlev, dl_rxlev, ul_rxqual, dl_rxqual;
+ unsigned char TRX = diagMsg.msgBody[7];
+ unsigned char timeSlot = diagMsg.msgBody[8] & 7;
+
+ ul_rxlev = (short) ((unsigned short)(diagMsg.msgBody[12])<<8) >> 8;
+ ul_rxqual = (short) ((unsigned short)(diagMsg.msgBody[18])<<8) >> 8;
+ dl_rxlev = (short) ((unsigned short)(diagMsg.msgBody[15])<<8) >> 8;
+ dl_rxqual = (short) ((unsigned short)(diagMsg.msgBody[21])<<8) >> 8;
+
+ SendResultData("\nTrx%1d Ts%1d Pnow,Pthresh,Avg ULLev:%d,%d,%d ULQual:%d,%d,%d DLLev:%d,%d,%d DLQual:%d,%d,%d ULInt:%d,%d DLInt:%d,%d\n",
+ TRX, timeSlot, diagMsg.msgBody[10],diagMsg.msgBody[11],ul_rxlev,
+ diagMsg.msgBody[16],diagMsg.msgBody[17],ul_rxqual,diagMsg.msgBody[13],
+ diagMsg.msgBody[14],dl_rxlev,diagMsg.msgBody[19],diagMsg.msgBody[20],dl_rxqual,
+ diagMsg.msgBody[22],diagMsg.msgBody[23],
+ diagMsg.msgBody[24],diagMsg.msgBody[25] );
+
+ DBG_TRACE("Trx%1d Ts%1d Pnow,Pthresh,Avg ULLev:%d,%d,%d ULQual:%d,%d,%d DLLev:%d,%d,%d DLQual:%d,%d,%d ULInt:%d,%d DLInt:%d,%d",
+ TRX, timeSlot, diagMsg.msgBody[10],diagMsg.msgBody[11],ul_rxlev,
+ diagMsg.msgBody[16],diagMsg.msgBody[17],ul_rxqual,diagMsg.msgBody[13],
+ diagMsg.msgBody[14],dl_rxlev,diagMsg.msgBody[19],diagMsg.msgBody[20],dl_rxqual,
+ diagMsg.msgBody[22],diagMsg.msgBody[23],
+ diagMsg.msgBody[24],diagMsg.msgBody[25] );
+ break;
+ }
+ case DIAG_HO_CAND_REPORT:
+ {
+ unsigned char i;
+ unsigned char TRX = diagMsg.msgBody[7];
+ unsigned char timeSlot = diagMsg.msgBody[8] & 7;
+ unsigned char zeroFillStart = 11 + (diagMsg.msgBody[10] * 2);
+ unsigned char zeroFillEnd = 11 + (6 * 2);
+
+ /* zero fill for nicer format */
+ for (i = zeroFillStart; i < zeroFillEnd; i++) {
+ diagMsg.msgBody[i] = 0;
+ }
+
+ SendResultData("\nTrx%1d Ts%1d NoCandidate(%o) Idx1(%o) bsic1(%o) Idx2(%o) bsic2(%o) Idx3(%o) bsic3(%o)\n"
+ " Idx4(%o) bsic4(%o) Idx5(%o) bsic5(%o) Idx6(%o) bsic6(%o) \n",
+ TRX, timeSlot, diagMsg.msgBody[10],
+ diagMsg.msgBody[11],diagMsg.msgBody[12],diagMsg.msgBody[13],diagMsg.msgBody[14],diagMsg.msgBody[15],diagMsg.msgBody[16],
+ diagMsg.msgBody[17],diagMsg.msgBody[18],diagMsg.msgBody[19],diagMsg.msgBody[20],diagMsg.msgBody[21],diagMsg.msgBody[22]);
+
+ DBG_TRACE("Trx%1d Ts%1d NoCandidate(%o) Idx1(%o) bsic1(%o) Idx2(%o) bsic2(%o) Idx3(%o) bsic3(%o)\n",
+ TRX, timeSlot, diagMsg.msgBody[10],
+ diagMsg.msgBody[11],diagMsg.msgBody[12],diagMsg.msgBody[13],diagMsg.msgBody[14],diagMsg.msgBody[15],diagMsg.msgBody[16]);
+ if ( diagMsg.msgBody[17] > 0 )
+ {
+ DBG_TRACE("Trx%1d Ts%1d MoreCandidates: Idx4(%o) bsic4(%o) Idx5(%o) bsic5(%o) Idx6(%o) bsic6(%o) ",
+ TRX, timeSlot,
+ diagMsg.msgBody[17],diagMsg.msgBody[18],diagMsg.msgBody[19],diagMsg.msgBody[20],diagMsg.msgBody[21],diagMsg.msgBody[22]);
+ }
+ break;
+ }
+ }
+
+ DBG_LEAVE();
+ return CONTINUE_TEST;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPHOReport::GetDiagnosticHelp
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): help string
+**
+**----------------------------------------------------------------------------*/
+char *DSPHOReport::GetDiagnosticHelp(void)
+{
+ DBG_FUNC("DSPHOReport::GetDiagnosticHelp", DSP_DIAGS);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return (
+ "DSPHOReport\n\n"
+ "Continuously reports results of tests in the DSP to determine whether handover\n"
+ "is required, and BSIC and DL power of candidate neighbor cells for handover of\n"
+ "selected active time slots on TRX0 and TRX1.\n\n"
+ "Parameters - TRX0TsMask TRX1TsMask Duration\n"
+ "\tTRX0TsMask - Timslot selection for TRX0 (hex) (bit 0 = TS0, bit 1 = TS1 etc.)\n"
+ "\tTRX1TsMask - Timslot selection for TRX1 (hex) (bit 0 = TS0, bit 1 = TS1 etc.)\n"
+ "\tDuration - If non-zero MS reporting is enabled for given number of seconds.\n\n"
+ "Returns - Nothing\n"
+ );
+}
+
+
+
+
+// *******************************************************************
+// DSPDLReport
+// *******************************************************************
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPDLReport constructor
+**
+** PURPOSE: Initialize data members for DSPDLReport object.
+**
+** INPUT PARAMETERS: testName - ASCII name for test
+** testNum - test number
+** reqSrc - source of the diagnostic request
+** parms - pointer to parameter list in ASCII
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+DSPDLReport::DSPDLReport(char *testName, int testNum, ReqSourceType reqSrc,
+ char *parms) : Diagnostic(testName, testNum, reqSrc, parms)
+{
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPDLReport destructor
+**
+** PURPOSE: Delete data members for DSPDLReport object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+DSPDLReport::~DSPDLReport()
+{
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPDLReport::InitiateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int DSPDLReport::InitiateDiagnostic(void)
+{
+ DBG_FUNC("DSPDLReport::InitiateDiagnostic", DSP_DIAGS);
+ DBG_ENTER();
+
+ unsigned int trx0TsMask, trx1TsMask;
+ char testName[256];
+ duration = 0;
+ sscanf(parameters, "%s %x %x %u", &testName, &trx0TsMask, &trx1TsMask, &duration);
+
+ // Verify parameters
+ if (trx0TsMask > 0xff)
+ {
+ SendResultData("Invalid TS Mask for TRX 0 %d\n", trx0TsMask);
+ DBG_TRACE("Invalid TS Mask for TRX 0 %d\n", trx0TsMask);
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ if (trx1TsMask > 0xff)
+ {
+ SendResultData("Invalid TS Mask for TRX 1 %d\n", trx1TsMask);
+ DBG_TRACE("Invalid TS Mask for TRX 1 %d\n", trx1TsMask);
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ SendResultData ("%s TRX0TsMask(%x) TRX1TsMask(%x) duration(%d)\n",
+ testName, trx0TsMask, trx1TsMask, duration);
+ DBG_TRACE ("%s TRX0TsMask(%x) TRX1TsMask(%x) duration(%d)\n",
+ testName, trx0TsMask, trx1TsMask, duration);
+
+
+ // If this is a timed test then start the timer.
+ if (duration)
+ {
+ SetTimer(duration);
+ }
+
+ // Start MS reporting
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 0;
+ buffer[length++] = DL_MEAS_REPORT;
+ buffer[length++] = trx0TsMask;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 1;
+ buffer[length++] = DL_MEAS_REPORT;
+ buffer[length++] = trx1TsMask;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ DBG_LEAVE();
+ return OK;
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPDLReport::TerminateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int DSPDLReport::TerminateDiagnostic(void)
+{
+ DBG_FUNC("DSPDLReport::TerminateDiagnostic", DSP_DIAGS);
+ DBG_ENTER();
+
+ // If we are stopping the test for any reason and it is a timed test
+ // then cancel the timer.
+ if (duration)
+ {
+ SetTimer(0);
+ }
+
+ // Stop loopback
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 0;
+ buffer[length++] = DL_MEAS_REPORT;
+ buffer[length++] = 0;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 1;
+ buffer[length++] = DL_MEAS_REPORT;
+ buffer[length++] = 0;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ SendResultData("DLReport Test Complete!");
+ DBG_TRACE("DLReport Test Complete!");
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPDLReport::ProcessMessage
+**
+** PURPOSE: Process messages not handled by Diagnostic base class. The
+** only expected message is DIAG_DL_REPORT.
+**
+** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+**
+** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+** STOP_TEST - if the controlling message loop should end
+**
+**----------------------------------------------------------------------------*/
+int DSPDLReport::ProcessMessage(DiagnosticMsgType diagMsg)
+{
+ DBG_FUNC("DSPDLReport::GetDiagnosticHelp", DSP_DIAGS);
+ DBG_ENTER();
+
+ static unsigned char msgCount = 0;
+ msgCount++;
+
+ switch ( diagMsg.func )
+ {
+ case DIAG_DL_REPORT:
+ {
+ /*
+ * Supress printouts from every 0.5 secs to every 3 secs (i.e. msgCount > 2 for 1 sec)
+ */
+ if (msgCount > 6) {
+ unsigned char i=0;
+ unsigned char TRX = diagMsg.msgBody[7];
+ unsigned char timeSlot = diagMsg.msgBody[8] & 7;
+
+ /*
+ * Clean up report by zeroing non-valid fields
+ */
+ if (diagMsg.msgBody[14] == 0)
+ i=15;
+
+ else if (diagMsg.msgBody[14] == 1)
+ i=20;
+
+ else if (diagMsg.msgBody[14] == 2)
+ i=25;
+
+ else if (diagMsg.msgBody[14] == 3)
+ i=30;
+
+ else if (diagMsg.msgBody[14] == 4)
+ i=35;
+
+ else if (diagMsg.msgBody[14] == 5)
+ i=40;
+
+ else
+ i=45;
+
+
+ while (i < 45) {
+ diagMsg.msgBody[i] = 0;
+ i++;
+ }
+
+
+ /*
+ * Serving Cell information
+ */
+ SendResultData("\nTrx%1d Ts%1d: DL RxLevFull(%d) Sub(%d)"
+ " RxQualFull(%d) Sub(%d) NO-NCELL(%d)\n",
+ TRX, timeSlot, diagMsg.msgBody[10], diagMsg.msgBody[11],
+ diagMsg.msgBody[12], diagMsg.msgBody[13], diagMsg.msgBody[14]);
+
+ /*
+ * Neighbor information
+ */
+ SendResultData("\nTrx%1d Ts%1d:\n"
+ "BcchFrqNCell-1(%d) BsicNCell-1(%o) IndxNCell-1(%d) RxLevNCell-1(%d)\n"
+ "BcchFrqNCell-2(%d) BsicNCell-2(%o) IndxNCell-2(%d) RxLevNCell-2(%d)\n"
+ "BcchFrqNCell-3(%d) BsicNCell-3(%o) IndxNCell-3(%d) RxLevNCell-3(%d)\n"
+ "BcchFrqNCell-4(%d) BsicNCell-4(%o) IndxNCell-4(%d) RxLevNCell-4(%d)\n"
+ "BcchFrqNCell-5(%d) BsicNCell-5(%o) IndxNCell-5(%d) RxLevNCell-5(%d)\n"
+ "BcchFrqNCell-6(%d) BsicNCell-6(%o) IndxNCell-6(%d) RxLevNCell-6(%d)\n",
+ TRX, timeSlot, (diagMsg.msgBody[15]<<8)+diagMsg.msgBody[16],
+ diagMsg.msgBody[17], diagMsg.msgBody[18], diagMsg.msgBody[19],
+ (diagMsg.msgBody[20]<<8)+diagMsg.msgBody[21],
+ diagMsg.msgBody[22], diagMsg.msgBody[23], diagMsg.msgBody[24],
+ (diagMsg.msgBody[25]<<8)+diagMsg.msgBody[26],
+ diagMsg.msgBody[27], diagMsg.msgBody[28], diagMsg.msgBody[29],
+ (diagMsg.msgBody[30]<<8)+diagMsg.msgBody[31],
+ diagMsg.msgBody[32], diagMsg.msgBody[33], diagMsg.msgBody[34],
+ (diagMsg.msgBody[35]<<8)+diagMsg.msgBody[36],
+ diagMsg.msgBody[37], diagMsg.msgBody[38], diagMsg.msgBody[39],
+ (diagMsg.msgBody[40]<<8)+diagMsg.msgBody[41],
+ diagMsg.msgBody[42], diagMsg.msgBody[43], diagMsg.msgBody[44]);
+
+
+ //---------------------------------- DEBUG TRACES
+ /*
+ * Serving Cell information
+ */
+ DBG_TRACE("Trx%1d Ts%1d: DL RxLevFull(%d) Sub(%d) RxQualFull(%d) Sub(%d) NO-NCELL(%d)",
+ TRX, timeSlot, diagMsg.msgBody[10], diagMsg.msgBody[11],
+ diagMsg.msgBody[12], diagMsg.msgBody[13], diagMsg.msgBody[14]);
+
+ /*
+ * Neighbor information
+ */
+ DBG_TRACE("\nTrx%1d Ts%1d:\n"
+ "BcchFrqNCell-1(%d) BsicNCell-1(%o) IndxNCell-1(%d) RxLevNCell-1(%d)\n"
+ "BcchFrqNCell-2(%d) BsicNCell-2(%o) IndxNCell-2(%d) RxLevNCell-2(%d)\n"
+ "BcchFrqNCell-3(%d) BsicNCell-3(%o) IndxNCell-3(%d) RxLevNCell-3(%d)\n"
+ "BcchFrqNCell-4(%d) BsicNCell-4(%o) IndxNCell-4(%d) RxLevNCell-4(%d)\n"
+ "BcchFrqNCell-5(%d) BsicNCell-5(%o) IndxNCell-5(%d) RxLevNCell-5(%d)\n"
+ "BcchFrqNCell-6(%d) BsicNCell-6(%o) IndxNCell-6(%d) RxLevNCell-6(%d)\n",
+ TRX, timeSlot, (diagMsg.msgBody[15]<<8)+diagMsg.msgBody[16],
+ diagMsg.msgBody[17], diagMsg.msgBody[18], diagMsg.msgBody[19],
+ (diagMsg.msgBody[20]<<8)+diagMsg.msgBody[21],
+ diagMsg.msgBody[22], diagMsg.msgBody[23], diagMsg.msgBody[24],
+ (diagMsg.msgBody[25]<<8)+diagMsg.msgBody[26],
+ diagMsg.msgBody[27], diagMsg.msgBody[28], diagMsg.msgBody[29],
+ (diagMsg.msgBody[30]<<8)+diagMsg.msgBody[31],
+ diagMsg.msgBody[32], diagMsg.msgBody[33], diagMsg.msgBody[34],
+ (diagMsg.msgBody[35]<<8)+diagMsg.msgBody[36],
+ diagMsg.msgBody[37], diagMsg.msgBody[38], diagMsg.msgBody[39],
+ (diagMsg.msgBody[40]<<8)+diagMsg.msgBody[41],
+ diagMsg.msgBody[42], diagMsg.msgBody[43], diagMsg.msgBody[44]);
+
+ /*
+ * Reset counter
+ */
+ msgCount = 0;
+ }
+
+ break;
+ }
+ }
+
+
+ DBG_LEAVE();
+ return CONTINUE_TEST;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPDLReport::GetDiagnosticHelp
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): help string
+**
+**----------------------------------------------------------------------------*/
+char *DSPDLReport::GetDiagnosticHelp(void)
+{
+ DBG_FUNC("DSPDLReport::GetDiagnosticHelp", DSP_DIAGS);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return (
+ "DSPDLReport\n\n"
+ "Continuously reports the downlink power level and quality as measured by the MS of\n"
+ "selected active time slots on TRX0 and TRX1.\n\n"
+ "Parameters - TRX0TsMask TRX1TsMask Duration\n"
+ "\tTRX0TsMask - Timslot selection for TRX0 (hex) (bit 0 = TS0, bit 1 = TS1 etc.)\n"
+ "\tTRX1TsMask - Timslot selection for TRX1 (hex) (bit 0 = TS0, bit 1 = TS1 etc.)\n"
+ "\tDuration - If non-zero MS reporting is enabled for given number of seconds.\n\n"
+ "Returns - Nothing\n"
+ );
+}
+
+
+
+
+
+// *******************************************************************
+// HPIEchoTest
+// *******************************************************************
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: HPIEchoTest constructor
+**
+** PURPOSE: Initialize data members for HPIEchoTest object.
+**
+** INPUT PARAMETERS: testName - ASCII name for test
+** testNum - test number
+** reqSrc - source of the diagnostic request
+** parms - pointer to parameter list in ASCII
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+HPIEchoTest::HPIEchoTest(char *testName, int testNum, ReqSourceType reqSrc,
+ char *parms) : Diagnostic(testName, testNum, reqSrc, parms)
+{
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: HPIEchoTest destructor
+**
+** PURPOSE: Delete data members for HPIEchoTest object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+HPIEchoTest::~HPIEchoTest()
+{
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: HPIEchoTest::InitiateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int HPIEchoTest::InitiateDiagnostic(void)
+{
+ DBG_FUNC("HPIEchoTest::InitiateDiagnostic", DSP_DIAGS);
+ DBG_ENTER();
+
+ char testName[256];
+ duration = verbose = lockTask = 0;
+ sscanf(parameters, "%s %d %d %d %d %u %d %d", &testName, &testDsp0, &testDsp1,
+ &numMsgs, &delay, &duration, &lockTask, &verbose);
+
+ // Verify parameters
+ if (numMsgs > 10)
+ {
+ SendResultData("Invalid number of messages in burst %d\n", numMsgs);
+ DBG_TRACE("Invalid number of messages in burst %d\n", numMsgs);
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ SendResultData ("%s testDsp0(%d) testDsp1(%d) numMsgs(%d) delay(%d) duration(%d) lockTask(%d) verbose(%d)\n",
+ testName, testDsp0, testDsp1, numMsgs, delay, duration, lockTask, verbose);
+ DBG_TRACE ("%s testDsp0(%d) testDsp1(%d) numMsgs(%d) delay(%d) duration(%d) lockTask(%d) verbose(%d)\n",
+ testName, testDsp0, testDsp1, numMsgs, delay, duration, lockTask, verbose);
+
+ // Allocate some memory to hold messages while they are pending dsp
+ // responses.
+ for (int i = 0; i < MAX_MSG_BURSTS; i++)
+ {
+ if (testDsp0)
+ {
+ dspMsgs[0][i] = new EchoMsgStruct[numMsgs];
+ for (int j = 0; j < numMsgs; j++)
+ dspMsgs[0][i][j].msgState = UNALLOCATED;
+ }
+
+ if (testDsp1)
+ {
+ dspMsgs[1][i] = new EchoMsgStruct[numMsgs];
+ for (int j = 0; j < numMsgs; j++)
+ dspMsgs[1][i][j].msgState = UNALLOCATED;
+ }
+ }
+
+ // Set the current burst block to the first block.
+ curMsgBurst[0] = curMsgBurst[1] = 0;
+
+ totalErrs[0] = totalNoRsp[0] = totalMsgs[0] = 0;
+ totalErrs[1] = totalNoRsp[1] = totalMsgs[1] = 0;
+ totalUnkownDspErrs = 0;
+
+ // If this is a timed test then start the timer.
+ if (duration)
+ {
+ SetTimer(duration);
+ }
+
+ // Send a message to start sending data.
+ DiagnosticMsgType diagMsg;
+
+ // Initialize the diagnostic message.
+ diagMsg.func = HPI_ECHO_TEST_CONTINUE;
+
+ msgQSend(diagQId,
+ (char *)&diagMsg,
+ sizeof(DiagnosticMsgType),
+ WAIT_FOREVER,
+ MSG_PRI_NORMAL);
+
+ DBG_LEAVE();
+ return OK;
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: HPIEchoTest::TerminateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int HPIEchoTest::TerminateDiagnostic(void)
+{
+ DBG_FUNC("HPIEchoTest::TerminateDiagnostic", DSP_DIAGS);
+ DBG_ENTER();
+
+ // If we are stopping the test for any reason and it is a timed test
+ // then cancel the timer.
+ if (duration)
+ {
+ SetTimer(0);
+ }
+
+ SendResultData("HPIEchoTest Complete!\n");
+ DBG_TRACE("HPIEchoTest Complete!\n");
+ if (testDsp0)
+ {
+ SendResultData("HPIEchoTest: DSP 0 total msgs (%d) error msgs(%d) no response msgs(%d)\n",
+ totalMsgs[0], totalErrs[0], totalNoRsp[0]);
+ DBG_TRACE("HPIEchoTest: DSP 0 total msgs (%d) error msgs(%d) no response msgs(%d)\n",
+ totalMsgs[0], totalErrs[0], totalNoRsp[0]);
+ }
+
+ if (testDsp1)
+ {
+ SendResultData("HPIEchoTest: DSP 1 total msgs (%d) error msgs(%d) no response msgs(%d)\n",
+ totalMsgs[1], totalErrs[1], totalNoRsp[1]);
+ DBG_TRACE("HPIEchoTest: DSP 0 total msgs (%d) error msgs(%d) no response msgs(%d)\n",
+ totalMsgs[1], totalErrs[1], totalNoRsp[1]);
+ }
+
+ SendResultData("HPIEchoTest: Errors where DSP could not be determied(%d)\n",
+ totalUnkownDspErrs);
+ DBG_TRACE("HPIEchoTest: Errors where DSP could not be determied(%d)\n",
+ totalUnkownDspErrs);
+
+ // Free the memory used for saving messages.
+ for (int i = 0; i < MAX_MSG_BURSTS; i++)
+ {
+ if (testDsp0)
+ {
+ delete [] dspMsgs[0][i];
+ }
+
+ if (testDsp1)
+ {
+ delete [] dspMsgs[1][i];
+ }
+ }
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: HPIEchoTest::BuildEchoMsg
+**
+** PURPOSE: Build up a burst of echo messages for a specified dsp. Each
+** message contains a response message in the payload. The burst of
+** messages will be saved for verification when the response is returned.
+** The burst of messages is kept in a circular buffer. If the messages
+** in the next buffer have not received a response then an error is
+** flagged.
+**
+** INPUT PARAMETERS: dspNum - dsp to test (0,1)
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void HPIEchoTest::BuildEchoMsg(int dspNum)
+{
+ DBG_FUNC("HPIEchoTest::BuildEchoMsg", DSP_DIAGS);
+ DBG_ENTER();
+
+ // Move to the next burst of messages.
+ curMsgBurst[dspNum] = (curMsgBurst[dspNum] + 1) % MAX_MSG_BURSTS;
+
+ for (int i = 0; i < numMsgs; i++)
+ {
+ // First make sure that this message has received a response.
+ // If there is no response then this is considered to be the
+ // timeout so flag an error.
+ if (dspMsgs[dspNum][curMsgBurst[dspNum]][i].msgState != UNALLOCATED)
+ {
+ totalNoRsp[dspNum]++;
+ if (verbose)
+ {
+ SendResultData("HPIEchoTest: ERROR: No response received!\n");
+ DBG_TRACE("HPIEchoTest: ERROR: No response received!\n");
+ }
+ dspMsgs[dspNum][curMsgBurst[dspNum]][i].msgState = UNALLOCATED;
+ }
+
+ int curByte = 0;
+
+ // The echo message is constructed as follows:
+ //
+ // 0 4 8 c
+ // +-------------------------------------------------------+
+ // | Msg Discrm. | Msg Type(H) | Msg Type(L) | dspNum | 0x0
+ // +-------------------------------------------------------+
+ // | Length of response message | 0x4
+ // +-------------------------------------------------------+
+ // | Msg Discrm. | Msg Type(H) | Msg Type(L) | dspNum | 0x8
+ // | (response) | (response) | (response) | (response) |
+ // +-------------------------------------------------------+
+ // | Burst of messages index | 0xc
+ // +-------------------------------------------------------+
+ // | Message in burst index | 0x10
+ // +-------------------------------------------------------+
+ // | Rand number | 0x14
+ // +-------------------------------------------------------+
+ // | . | .
+ // | . | .
+ // | . | .
+ // +-------------------------------------------------------+
+ // | Rand number | 0x38
+ // +-------------------------------------------------------+
+
+ // Build Echo message header.
+ dspMsgs[dspNum][curMsgBurst[dspNum]][i].msg[curByte++] =
+ DIAGNOSTIC_MSG;
+ dspMsgs[dspNum][curMsgBurst[dspNum]][i].msg[curByte++] =
+ MPH_DSP_DIAG_ECHO_MSG_REQ>>8;
+ dspMsgs[dspNum][curMsgBurst[dspNum]][i].msg[curByte++] =
+ MPH_DSP_DIAG_ECHO_MSG_REQ;
+ dspMsgs[dspNum][curMsgBurst[dspNum]][i].msg[curByte++] =
+ (unsigned char)dspNum;
+
+ // Now build the payload. The first two words of the payload
+ // are the header for the response.
+ int len = MAX_PARAMS;
+ dspMsgs[dspNum][curMsgBurst[dspNum]][i].msg[curByte++] =
+ (unsigned char) len;
+ dspMsgs[dspNum][curMsgBurst[dspNum]][i].msg[curByte++] =
+ (unsigned char) (len>>8);
+ dspMsgs[dspNum][curMsgBurst[dspNum]][i].msg[curByte++] =
+ (unsigned char) (len>>16);
+ dspMsgs[dspNum][curMsgBurst[dspNum]][i].msg[curByte++] =
+ (unsigned char) (len>>24);
+ dspMsgs[dspNum][curMsgBurst[dspNum]][i].msg[curByte++] =
+ DIAGNOSTIC_MSG;
+ dspMsgs[dspNum][curMsgBurst[dspNum]][i].msg[curByte++] =
+ MPH_DSP_DIAG_ECHO_MSG_RSP>>8;
+ dspMsgs[dspNum][curMsgBurst[dspNum]][i].msg[curByte++] =
+ MPH_DSP_DIAG_ECHO_MSG_RSP;
+ dspMsgs[dspNum][curMsgBurst[dspNum]][i].msg[curByte++] = dspNum;
+
+ // Next put the message burst index and the message index in the
+ // payload. This will be used to verify the response.
+ int *pInt;
+ pInt = (int *)&dspMsgs[dspNum][curMsgBurst[dspNum]][i].msg[curByte];
+ *pInt = curMsgBurst[dspNum];
+ curByte += sizeof(int);
+
+ pInt = (int *)&dspMsgs[dspNum][curMsgBurst[dspNum]][i].msg[curByte];
+ *pInt = i;
+ curByte += sizeof(int);
+
+ // Finally fill the rest of the message with random data.
+ for (int j = 0; j < MAX_PARAMS-16; j+=4)
+ {
+ int randNum = rand();
+ dspMsgs[dspNum][curMsgBurst[dspNum]][i].msg[curByte++] =
+ (unsigned char) randNum;
+ dspMsgs[dspNum][curMsgBurst[dspNum]][i].msg[curByte++] =
+ (unsigned char) (randNum>>8);
+ dspMsgs[dspNum][curMsgBurst[dspNum]][i].msg[curByte++] =
+ (unsigned char) (randNum>>16);
+ dspMsgs[dspNum][curMsgBurst[dspNum]][i].msg[curByte++] =
+ (unsigned char) (randNum>>24);
+ }
+
+ dspMsgs[dspNum][curMsgBurst[dspNum]][i].msgState = RESPONSE_PENDING;
+
+ totalMsgs[dspNum]++;
+ api_SendMsgFromRmToL1(curByte, dspMsgs[dspNum][curMsgBurst[dspNum]][i].msg);
+
+ }
+
+ DBG_LEAVE();
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: HPIEchoTest::ProcessMessage
+**
+** PURPOSE: Process messages not handled by Diagnostic base class. The
+** only expected messages are HPI_ECHO_TEST_CONTINUE and
+** DIAG_DSP_ECHO_MSG.
+**
+** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+**
+** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+** STOP_TEST - if the controlling message loop should end
+**
+**----------------------------------------------------------------------------*/
+int HPIEchoTest::ProcessMessage(DiagnosticMsgType diagMsg)
+{
+ DBG_FUNC("HPIEchoTest::GetDiagnosticHelp", DSP_DIAGS);
+ DBG_ENTER();
+
+ switch ( diagMsg.func )
+ {
+ case HPI_ECHO_TEST_CONTINUE:
+ {
+ // Build and send a burst of echo messages.
+ if (testDsp0)
+ {
+ if (lockTask)
+ {
+ taskLock();
+ }
+
+ BuildEchoMsg(0);
+
+ if (lockTask)
+ {
+ taskUnlock();
+ }
+ }
+
+ if (testDsp1)
+ {
+ if (lockTask)
+ {
+ taskLock();
+ }
+
+ BuildEchoMsg(1);
+
+ if (lockTask)
+ {
+ taskUnlock();
+ }
+ }
+
+ // Delay here before sending any more messages.
+ taskDelay(delay);
+
+ // Send a message to start sending data.
+ DiagnosticMsgType contMsg;
+
+ // Initialize the diagnostic message.
+ contMsg.func = HPI_ECHO_TEST_CONTINUE;
+
+ msgQSend(diagQId,
+ (char *)&contMsg,
+ sizeof(DiagnosticMsgType),
+ NO_WAIT,
+ MSG_PRI_NORMAL);
+
+ break;
+ }
+ case DIAG_DSP_ECHO_MSG:
+ {
+ int len, burstIndx, msgIndx, dsp;
+ unsigned char *pLen = (unsigned char *)&len;
+
+ // Grab the length, dsp number, msg burst index and msg index.
+ pLen[0] = diagMsg.msgBody[3];
+ pLen[1] = diagMsg.msgBody[2];
+ pLen[2] = diagMsg.msgBody[1];
+ pLen[3] = diagMsg.msgBody[0];
+
+ dsp = (int)diagMsg.msgBody[7];
+
+ burstIndx = *((int *)(diagMsg.msgBody + 8));
+ msgIndx = *((int *)(diagMsg.msgBody + 0xc));
+
+ // First make sure the length makes sense.
+ if (len != MAX_PARAMS)
+ {
+ if (verbose)
+ {
+ SendResultData("HPIEchoTest: ERROR: Invalid length in msg!\n");
+ SendResultData("Sent DSP %d len(%d) received len(%d)\n",
+ dsp, MAX_PARAMS, len);
+ }
+ totalUnkownDspErrs++;
+ }
+ else
+ {
+ // Verify dsp number, burst index and message index.
+ if ((burstIndx >= 0) && (burstIndx < MAX_MSG_BURSTS) &&
+ (msgIndx >= 0) && (msgIndx < numMsgs) &&
+ (dsp >= 0) && (dsp < 2))
+ {
+ // Verify all the data received. Must skip the first for bytes
+ // in the saved message since the saved message has the original
+ // message header in it too.
+ for (int i = 0; i < MAX_PARAMS-8; i++)
+ {
+ if (diagMsg.msgBody[i] !=
+ dspMsgs[dsp][burstIndx][msgIndx].msg[i+4])
+ {
+ if (verbose)
+ {
+ SendResultData("HPIEchoTest: ERROR: Invalid data in msg!\n");
+ SendResultData("Sent DSP %d the following message:\n", dsp);
+ for (int j = 0; j < HPI_MSG_SIZE-8; j+=4)
+ {
+ if ((j % 20) || (j == 0))
+ {
+ SendResultData("%010#x ",
+ *((unsigned int *)(dspMsgs[dsp][burstIndx][msgIndx].msg + j + 4)));
+ }
+ else
+ {
+ SendResultData("%010#x\n",
+ *((unsigned int *)(dspMsgs[dsp][burstIndx][msgIndx].msg + j + 4)));
+ }
+ }
+
+ SendResultData("\nReceived from DSP %d the following message:\n", dsp);
+ for (j = 0; j < HPI_MSG_SIZE-8; j+=4)
+ {
+ if ((j % 20) || (j == 0))
+ {
+ SendResultData("%010#x ", *((unsigned int *)(diagMsg.msgBody + j)));
+ }
+ else
+ {
+ SendResultData("%010#x\n", *((unsigned int *)(diagMsg.msgBody + j)));
+ }
+ }
+ }
+ totalErrs[dsp]++;
+ break;
+ }
+ }
+
+ // If the indexes were in range then clear this message.
+ dspMsgs[dsp][burstIndx][msgIndx].msgState = UNALLOCATED;
+ }
+ else
+ {
+ if (verbose)
+ {
+ SendResultData("HPIEchoTest: ERROR: Invalid params in msg!\n");
+ SendResultData("Received dsp(%d) burstIndx(%d) msgIndx(%d)\n",
+ dsp, burstIndx, msgIndx);
+ }
+ totalUnkownDspErrs++;
+ }
+ }
+
+ break;
+ }
+ }
+
+ DBG_LEAVE();
+ return CONTINUE_TEST;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: HPIEchoTest::GetDiagnosticHelp
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): help string
+**
+**----------------------------------------------------------------------------*/
+char *HPIEchoTest::GetDiagnosticHelp(void)
+{
+ DBG_FUNC("HPIEchoTest::GetDiagnosticHelp", DSP_DIAGS);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return (
+ "HPIEchoTest\n\n"
+ "This is an interactive test of the host port interface. Echo messages\n"
+ "will be sent in bursts to either or both dsp 0 and 1. Up to 10\n"
+ "messages per burst may be sent with a specified delay between each\n"
+ "burst.\n\n"
+ "Parameters - testDsp0 testDsp1 numMsgs delay duration taskLock verbose\n"
+ "\ttestDsp0 - if non-zero DSP 0 will be tested\n"
+ "\ttestDsp1 - if non-zero DSP 1 will be tested\n"
+ "\tnumMsgs - number of msgs to send in a single burst (max 10)\n"
+ "\tdelay - number of ticks to wait between sending bursts of msgs\n"
+ "\tduration - If non-zero test will run for specified time otherwise\n"
+ "\t test runs until stopped (time in seconds)\n"
+ "\ttaskLock - If non-zero task switching will be locked when messages are\n"
+ "\t sent to insure multiple messages sent to the dsps.\n"
+ "\tverbose - If non-zero error messages will be displayed as they occur\n\n"
+ "Returns - total msgs sent, total number of msgs with errors, total no response msgs\n"
+ );
+}
+
+
+// *******************************************************************
+// DSPBBLoopbackTest
+// *******************************************************************
+
+//------------------------------------------------------------------------------
+DSPBBLoopbackTest::DSPBBLoopbackTest(char *testName, int testNum,
+ ReqSourceType reqSrc, char *parms)
+ : Diagnostic(testName, testNum, reqSrc, parms)
+{
+}
+
+//------------------------------------------------------------------------------
+DSPBBLoopbackTest::~DSPBBLoopbackTest()
+{
+}
+
+//------------------------------------------------------------------------------
+int DSPBBLoopbackTest::InitiateDiagnostic(void)
+{
+ char testName[100];
+
+ verbose = -1;
+ dspbblbtest_verbose = FALSE;
+ DSPBBLBTest_Cmd_Status = OK;
+
+ sscanf(parameters, "%s %d %d %d %d %d", &testName, &src, &dst, &index, &shift, &verbose);
+
+ if ((src < 0) || (src > 1))
+ {
+ SendResultData("Invalid dsp number for tone generation [%d]\n", src);
+ return ERROR;
+ }
+
+ if ((dst < 0) || (dst > 1))
+ {
+ SendResultData("Invalid dsp number for measurement [%d]\n", dst);
+ return ERROR;
+ }
+
+ if ((index < 0) || (index > 7))
+ {
+ SendResultData("Invalid frequency index [%d]\n", index);
+ return ERROR;
+ }
+
+ if ((shift < 0) || (shift > 7))
+ {
+ SendResultData("Invalid gain shift [%d]\n", shift);
+ return ERROR;
+ }
+
+ if ( (verbose > TRUE) || (verbose < FALSE) )
+ {
+ SendResultData("verbose value is out of range [%d]\n", verbose);
+ return ERROR;
+ }
+ else
+ dspbblbtest_verbose = verbose;
+
+ if ( dspbblbtest_verbose == TRUE )
+ SendResultData("%s src(%d) dst(%d) index(%d) shift(%d) verbose(%d)\n",
+ testName, src, dst, index, shift, verbose);
+
+ DSPBBLBTest_Cmd_Status = DSP_BASBAND_LOOPBACK;
+ dspBBLoopbackTest(src, dst, index, shift, verbose);
+ SetTimer(8);
+
+ return OK;
+}
+
+//------------------------------------------------------------------------------
+int DSPBBLoopbackTest::TerminateDiagnostic(void)
+{
+ DBG_FUNC("DSP Baseband Loopback Test::TerminateDiagnostic", DSP_DIAGS);
+ DBG_ENTER();
+
+ extern int dspTestInProgress;
+
+ if (dspTestInProgress == TRUE || DSPBBLBTest_Cmd_Status == DSP_BASBAND_LOOPBACK )
+ {
+ SendResultData("DSP Baseband Loopback Test: FAILED - DSP Response problem.\n");
+ dspTestInProgress = FALSE;
+ DSPBBLBTest_Cmd_Status = ERROR;
+ }
+ else if (dspTestInProgress == FALSE || DSPBBLBTest_Cmd_Status != DSP_BASBAND_LOOPBACK )
+ SendResultData("DSP Baseband Loopback Test: COMPLETE\n");
+
+ return OK;
+}
+
+//------------------------------------------------------------------------------
+int DSPBBLoopbackTest::ProcessMessage // RETURN: CONTINUE_TEST/STOP_TEST
+(
+ DiagnosticMsgType diagMsg //IN: Message
+)
+{
+ DBG_FUNC("DSP Baseband Loopback Test::ProcessMessage", DSP_DIAGS);
+ DBG_ENTER();
+ DBG_LEAVE();
+
+ if (diagMsg.func == DSP_TONE_MEASURE_RSP)
+ {
+ if ( dspbblbtest_verbose == TRUE )
+ SendResultData("dsp_Tone_Measure_Rsp Received\n");
+
+ dspToneMeasureRsp((unsigned char*)&diagMsg.msgBody[8], dspbblbtest_verbose);
+ return STOP_TEST;
+ }
+ else if (diagMsg.func == DSP_TONE_GENERATE_RSP)
+ {
+ if ( dspbblbtest_verbose == TRUE )
+ SendResultData("dsp_Tone_Generate_Rsp Received\n");
+
+ dspBBLoopbackTest2(dspbblbtest_verbose);
+ DSPBBLBTest_Cmd_Status = OK;
+ }
+
+ return CONTINUE_TEST;
+}
+
+//------------------------------------------------------------------------------
+char* DSPBBLoopbackTest::GetDiagnosticHelp(void)
+{
+ DBG_FUNC("DSP Baseband Loopback Test::GetDiagnosticHelp", DSP_DIAGS);
+ DBG_ENTER();
+ DBG_LEAVE();
+
+ return
+ (
+ "DSPBBLoopbackTest - DSP Baseband Loopback Test\n\n"
+ "----------------------------------------------------------------------\n"
+ " FOR CISCO SYSTEMS USE ONLY\n"
+ "----------------------------------------------------------------------\n\n"
+ "CAUTION: This test is INTRUSIVE. It does not allow normal ViperCell operation.\n"
+ "This can not be run from normal operating configuration. This test\n"
+ "requires baseband test fixture board. The Vipercell must be booted\n"
+ "with the DSPTest startup script. However, it can be run before\n"
+ "or after the DSPExtMemTest.\n"
+ "----------------------------------------------------------------------\n\n"
+ "This test requires baseband test fixture board.\n"
+ "The test makes a DSP generate tone at one out of eight possible\n"
+ "frequencies and makes same or different DSP mesure the signal strength\n"
+ "at eight possible frequencies.\n"
+ "The result of the test is eight values mesured by the DSP.\n\n"
+ "Parameters:\n\n"
+ "src - [0:1] dsp generating tone\n"
+ "dst - [0:1] dsp measuring signal strength\n"
+ "index - [0:7] frequency index\n"
+ "shift - [0:7] gain shift, 0 = no right bit shifts\n\n"
+ "verbose - [0] = Only final result is displayed.\n"
+ " [1] = All error messages are displayed. In addition if all\n"
+ " tests are requested, results of individul tests are displayed.\n\n"
+ "----------------------------------------------------------------------\n"
+ " FOR CISCO SYSTEMS USE ONLY\n"
+ "----------------------------------------------------------------------\n"
+ );
+}
+
+
+// *******************************************************************
+// DSPExtMemTest
+// *******************************************************************
+
+//------------------------------------------------------------------------------
+DSPExtMemTest::DSPExtMemTest(char *testName, int testNum,
+ ReqSourceType reqSrc, char *parms)
+ : Diagnostic(testName, testNum, reqSrc, parms)
+{
+}
+
+//------------------------------------------------------------------------------
+DSPExtMemTest::~DSPExtMemTest()
+{
+}
+
+//------------------------------------------------------------------------------
+int DSPExtMemTest::InitiateDiagnostic(void)
+{
+ char testName[100];
+
+ numErrors = 0;
+ dspResponds = FALSE;
+ verbose = -1;
+ dspextmemtest_verbose = FALSE;
+
+ sscanf(parameters, "%s %d %d %d", &testName, &dspNum, &testTypeReq, &verbose);
+ if ((dspNum < 0) || (dspNum > 1))
+ {
+ SendResultData("Invalid DSP Number [%d]\n", dspNum);
+ return ERROR;
+ }
+
+ if ((testTypeReq < 0) || (testTypeReq > MaxTestType))
+ {
+ SendResultData("Invalid Test Type Requested [%d]\n", testTypeReq);
+ return ERROR;
+ }
+
+ if ( (verbose > TRUE) || (verbose < FALSE) )
+ {
+ SendResultData("verbose value is out of range [%d]\n", verbose);
+ return ERROR;
+ }
+ else
+ dspextmemtest_verbose = verbose;
+
+ if ( dspextmemtest_verbose == TRUE )
+ SendResultData("%s dspNum(%d) testTypeReq(%d) verbose(%d) \n",
+ testName, dspNum, testTypeReq, verbose);
+
+ verbose = verbose ? TRUE : FALSE;
+ testType = testTypeReq ? testTypeReq : 1; /* if requested test is 0, start with the first */
+
+ dspExtMemTest(dspNum, testType - 1, dspextmemtest_verbose);
+ SetTimer(10);
+
+ return OK;
+}
+
+//------------------------------------------------------------------------------
+int DSPExtMemTest::TerminateDiagnostic(void)
+{
+ extern int dspTestInProgress;
+
+ if (dspResponds == FALSE)
+ {
+ SendResultData("DSP External Memory Test: FAIL; DSP does not respond\n");
+ }
+ dspTestInProgress = FALSE;
+
+ return OK;
+}
+
+//------------------------------------------------------------------------------
+int DSPExtMemTest::ProcessMessage // RETUEN: CONTINUE_TEST/STOP_TEST
+(
+ DiagnosticMsgType diagMsg //IN: Message
+)
+{
+ if (diagMsg.func == DSP_EXTMEM_TEST_RSP)
+ {
+ dspResponds = TRUE;
+ dspExtMemTestRsp((unsigned char*)&diagMsg.msgBody[8]);
+
+ if ((testTypeReq != 0) || (verbose == TRUE))
+ { /* print the result */
+ if (numErrors == 0)
+ SendResultData("DSP %d External Memory Test: PASS\n", dspNum);
+ else
+ SendResultData("DSP %d External Memory Test: FAIL; %d Errors\n", dspNum, numErrors);
+ }
+
+ if (testTypeReq != 0)
+ return STOP_TEST;
+ else
+ {
+ if (testType == MaxTestType)
+ { /* all tests are over */
+ if (verbose != TRUE)
+ { /* print result summary */
+ if (numErrors == 0)
+ SendResultData("DSP %d External Memory Test: PASS\n", dspNum);
+ else
+ SendResultData("DSP %d External Memory Test: FAIL; %d Errors\n", dspNum, numErrors);
+ }
+ return STOP_TEST;
+ }
+ else /* goto the next test */
+ dspExtMemTest(dspNum, ++testType - 1, dspextmemtest_verbose);
+ }
+ }
+ else if (diagMsg.func == DSP_EXTMEM_ERROR_RSP)
+ {
+ dspResponds = TRUE;
+ if (verbose == TRUE)
+ dspExtMemErrorRsp((unsigned char*)&diagMsg.msgBody[8]);
+ }
+
+ return CONTINUE_TEST;
+}
+
+//------------------------------------------------------------------------------
+char* DSPExtMemTest::GetDiagnosticHelp(void)
+{
+ DBG_FUNC("DSP External Memory Test::GetDiagnosticHelp", DSP_DIAGS);
+ DBG_ENTER();
+ DBG_LEAVE();
+
+ return
+ (
+ "DSPExtMemTest - DSP External Memory Test\n\n"
+ "----------------------------------------------------------------------\n"
+ " FOR CISCO SYSTEMS USE ONLY\n"
+ "----------------------------------------------------------------------\n\n"
+ "----------------------------------------------------------------------\n"
+ "CAUTION: This test is INTRUSIVE. It does not allow normal ViperCell operation.\n\n"
+ "This can not be run from normal operating configuration. The Vipercell\n"
+ "must be booted with the DSPTest startup script. However,\n"
+ "it can be run before or after the DSPBBLoopbackTest.\n"
+ "----------------------------------------------------------------------\n\n"
+ "This test requires baseband test fixture board.\n\n"
+ "Parameters:\n\n"
+ "dspNum - [0:1] dsp to test\n\n"
+ "testTypeReq - Test Type Requested [0-5]\n"
+ " 0 - All\n"
+ " 1 - Walk Zeros\n"
+ " 2 - Walk Ones\n"
+ " 3 - Increament\n"
+ " 4 - Increament and complement\n"
+ " 5 - Random Pattern\n\n"
+ "verbose - [0] = Only final result is displayed.\n"
+ " [1] = All error messages are displayed. In addition if all\n"
+ " tests are requested, results of individul tests are displayed.\n\n"
+ "----------------------------------------------------------------------\n"
+ " FOR CISCO SYSTEMS USE ONLY\n"
+ "----------------------------------------------------------------------\n"
+ );
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPIFReport constructor
+**
+** PURPOSE: Initialize data members for DSPIFReport object.
+**
+** INPUT PARAMETERS: testName - ASCII name for test
+** testNum - test number
+** reqSrc - source of the diagnostic request
+** parms - pointer to parameter list in ASCII
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+DSPIFReport::DSPIFReport(char *testName, int testNum, ReqSourceType reqSrc,
+ char *parms) : Diagnostic(testName, testNum, reqSrc, parms)
+{
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPIFReport destructor
+**
+** PURPOSE: Delete data members for DSPIFReport object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+DSPIFReport::~DSPIFReport()
+{
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPIFReport::InitiateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status - OK if able to Initiate or ERROR if not
+**
+**----------------------------------------------------------------------------*/
+int DSPIFReport::InitiateDiagnostic(void)
+{
+ DBG_FUNC("DSPIFReport::InitiateDiagnostic", DSP_DIAGS);
+ DBG_ENTER();
+
+ unsigned int trx0TsMask, trx1TsMask;
+ char testName[256];
+ sscanf(parameters, "%s %x %x %u", &testName, &trx0TsMask, &trx1TsMask);
+
+ // Verify parameters
+ if (trx0TsMask > 0xff)
+ {
+ SendResultData("Invalid TS Mask for TRX 0 %d\n", trx0TsMask);
+ DBG_TRACE("Invalid TS Mask for TRX 0 %d\n", trx0TsMask);
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ if (trx1TsMask > 0xff)
+ {
+ SendResultData("Invalid TS Mask for TRX 1 %d\n", trx1TsMask);
+ DBG_TRACE("Invalid TS Mask for TRX 1 %d\n", trx1TsMask);
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ // Start MS reporting
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 0;
+ buffer[length++] = IF_REPORT;
+ buffer[length++] = trx0TsMask;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 1;
+ buffer[length++] = IF_REPORT;
+ buffer[length++] = trx1TsMask;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ SendResultData("Start DSPIFReport\n");
+ DBG_TRACE("Start DSPIFReport\n");
+
+ DBG_LEAVE();
+ return OK;
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPIFReport::TerminateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status - OK if able to Terminate or ERROR if not
+**
+**----------------------------------------------------------------------------*/
+int DSPIFReport::TerminateDiagnostic(void)
+{
+ DBG_FUNC("DSPIFReport::TerminateDiagnostic", DSP_DIAGS);
+ DBG_ENTER();
+
+ // Stop loopback
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 0;
+ buffer[length++] = IF_REPORT;
+ buffer[length++] = 0;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = 1;
+ buffer[length++] = IF_REPORT;
+ buffer[length++] = 0;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ SendResultData("DSPIFReport Complete!\n");
+ DBG_TRACE("DSPIFReport Complete!\n");
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPIFReport::ProcessMessage
+**
+** PURPOSE: Process messages not handled by Diagnostic base class. The
+** only expected messages are HPI_ECHO_TEST_CONTINUE and
+** DIAG_DSP_ECHO_MSG.
+**
+** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+**
+** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+** STOP_TEST - if the controlling message loop should end
+**
+**----------------------------------------------------------------------------*/
+int DSPIFReport::ProcessMessage(DiagnosticMsgType diagMsg)
+{
+ unsigned char *trx_num;
+ unsigned char ts[8];
+ unsigned char *msgPtr = (unsigned char *)&diagMsg.msgBody[0];
+ int index;
+
+ DBG_FUNC("DSPIFReport::GetDiagnosticHelp", DSP_DIAGS);
+ DBG_ENTER();
+
+ switch ( diagMsg.func )
+ {
+ case DIAG_IF_REPORT:
+
+ /*for( index=0; index<diagMsg.msgLen; index++ ) Used to debug incoming message
+ SendResultData("%x ",*(msgPtr+index));*/
+
+ /* Get the data out of the Message */
+ trx_num = (msgPtr + 7);
+
+ for ( index=0; index<8; index++ )
+ ts[index] = *( msgPtr + 10 + index );
+
+ SendResultData("trx(%x): ts0 (%.2d) ts1 (%.2d) ts2 (%.2d) ts3 (%.2d) ts4 (%.2d) ts5 (%.2d) ts6 (%.2d) ts7 (%.2d)\n",
+ *trx_num, ts[0], ts[1], ts[2], ts[3], ts[4], ts[5], ts[6], ts[7] );
+
+ DBG_TRACE("trx(%x): ts0 (%.2d) ts1 (%.2d) ts2 (%.2d) ts3 (%.2d) ts4 (%.2d) ts5 (%.2d) ts6 (%.2d) ts7 (%.2d)\n",
+ *trx_num, ts[0], ts[1], ts[2], ts[3], ts[4], ts[5], ts[6], ts[7] );
+
+ if ( *trx_num == 1 )
+ {
+ SendResultData("\n");
+ DBG_TRACE("\n");
+ }
+
+ break;
+
+ default:
+ break;
+
+ }
+
+ DBG_LEAVE();
+ return CONTINUE_TEST;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DSPIFReport::GetDiagnosticHelp
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): help string
+**
+**----------------------------------------------------------------------------*/
+char *DSPIFReport::GetDiagnosticHelp(void)
+{
+ DBG_FUNC("DSPIFReport::GetDiagnosticHelp", DSP_DIAGS);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return (
+ "IFReport: Provides interference reports from DSP's \n\n"
+ "Parameters: trx0TsMask, trx1TsMask\n\n"
+ " trx0TsMask: Time slot Mask for DSP 0 [ 0 : 0xFF ]\n"
+ " trx1TsMask: Time slot Mask for DSP 1 [ 0 : 0xFF ]\n\n"
+ "Returns - IF Report which provides TRX # and Time Slot Data.\n"
+ );
+}
diff --git a/data/mnet/GP10/Host/Mch/src/MCHCommand.cpp b/data/mnet/GP10/Host/Mch/src/MCHCommand.cpp
new file mode 100644
index 0000000..8d919db
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/src/MCHCommand.cpp
@@ -0,0 +1,700 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MCHCommand.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/29/99
+// Description :
+//
+// *******************************************************************
+
+#include <string.h>
+#include <ctype.h>
+#include <stdio.h>
+#include "MCHCommand.h"
+#include "MCHTask.h"
+#include "logging\vcmodules.h"
+#include "logging\vclogging.h"
+
+
+// *******************************************************************
+// MCHCommand
+// *******************************************************************
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHCommand::MCHCommand
+**
+** PURPOSE: MCHCommand constructor.
+**
+** INPUT PARAMETERS: ln - long name for command
+** sn - short name for command
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+MCHCommand::MCHCommand(char *ln, char *sn)
+{
+ longName = shortName = commResponse = 0;
+
+ // Make sure the name is not not null and save it.
+ if (ln)
+ {
+ longName = new char(strlen(ln) + 1);
+ strcpy (longName, ln);
+ }
+
+ // Make sure the name is not not null and save it.
+ if (sn)
+ {
+ shortName = new char(strlen(sn) + 1);
+ strcpy (shortName, sn);
+ }
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHCommand::~MCHCommand
+**
+** PURPOSE: MCHCommand destructor.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+MCHCommand::~MCHCommand()
+{
+ // Free up memory.
+ if (longName) delete [] longName;
+ if (shortName) delete [] shortName;
+ if (commResponse) delete [] commResponse;
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHCommand::ClearCommandResponse
+**
+** PURPOSE: ClearCommandResponse frees memory allocated for the command
+** response.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void MCHCommand::ClearCommandResponse(void)
+{
+ DBG_FUNC("MCHCommand::ClearCommandResponse",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ if (commResponse) delete [] commResponse;
+ commResponse = 0;
+
+ DBG_LEAVE();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHCommand::CommandResponseAppend
+**
+** PURPOSE: CommandResponseAppend appends the given string to the current
+** response string.
+**
+** INPUT PARAMETERS: printf style input
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void MCHCommand::CommandResponseAppend(char *format, ...)
+{
+ DBG_FUNC("MCHCommand::CommandResponseAppend",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ char buff[4096];
+ buff[0] = 0;
+ va_list ap;
+ va_start(ap, format);
+ vsprintf(buff, format, ap);
+ va_end(ap);
+
+ char *temp = new char[strlen(commResponse) + strlen(buff) + 1];
+ temp[0] = 0;
+ if (commResponse)
+ strcpy(temp, commResponse);
+ strcat(temp, buff);
+ delete [] commResponse;
+ commResponse = temp;
+
+ DBG_LEAVE();
+}
+
+
+
+// *******************************************************************
+// MCHHelp
+// *******************************************************************
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHHelp::MCHHelp
+**
+** PURPOSE: MCHHelp constructor.
+**
+** INPUT PARAMETERS: ln - long name for command
+** sn - short name for command
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+MCHHelp::MCHHelp(char *ln, char *sn) : MCHCommand(ln, sn)
+{}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHHelp::ExecuteCommand
+**
+** PURPOSE: Execute the maintenance command handler help function.
+**
+** INPUT PARAMETERS: parms - parameter for command in ASCII
+**
+** RETURN VALUE(S): status indicating success or failure
+**
+**----------------------------------------------------------------------------*/
+int MCHHelp::ExecuteCommand(char *parms)
+{
+ DBG_FUNC("MCHHelp::ExecuteCommand",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ DBG_TRACE("MCH : %s %s\n", longName, parms);
+
+ CommandResponseAppend("The following maintenance commands are available:\n");
+
+ if (reqSrc == TERMINAL_REQ)
+ {
+ CommandResponseAppend("MaintCmd\n");
+ }
+
+ for (int type = 0; type < MCH_MAX_COMMANDS; type++)
+ {
+ CommandResponseAppend(MCHTask::theMCHTask->mchCommands[type]->ShowHelp());
+ }
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHHelp::ShowHelp
+**
+** PURPOSE: Display help information for the help command.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): return help information in ASCII
+**
+**----------------------------------------------------------------------------*/
+char *MCHHelp::ShowHelp(void)
+{
+ DBG_FUNC("MCHHelp::ShowHelp",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ return("\t\"MCHHelp\" or \"help\"\n"
+ "\t\tDisplay this help message\n");
+
+ DBG_LEAVE();
+}
+
+
+
+// *******************************************************************
+// MCHDiagCommand
+// *******************************************************************
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHDiagCommand::GetDiagTestNum
+**
+** PURPOSE: This function converts the first parameter found in the parameter
+** list from ASCII to an integer which represents the test number.
+**
+** INPUT PARAMETERS: parms - parameter list
+**
+** RETURN VALUE(S): test number or -1 if an error
+**
+**----------------------------------------------------------------------------*/
+int MCHDiagCommand::GetDiagTestNum(char *parms)
+{
+ DBG_FUNC("MCHDiagCommand::GetDiagTestNum",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ int testNum = -1;
+ char testNumString[MCH_MAX_COMMAND_LINE_LEN];
+ char diagNameString[MCH_MAX_COMMAND_LINE_LEN];
+
+ sscanf(parms, "%s", &testNumString);
+
+ if (testNumString)
+ {
+ // Convert all letters in the name to upper case
+ for (int i = 0; i <= strlen(testNumString); i++)
+ {
+ testNumString[i] = toupper(testNumString[i]);
+ }
+
+ for (int diagGrp = 0; diagGrp < DIAG_LAST_DIAG_GROUP>>DIAG_GROUP_NUM_BITS; diagGrp++)
+ {
+ for (int diagNum = 1; DiagNames[diagGrp][diagNum]; diagNum++)
+ {
+ // Convert all letters in the name to upper case
+ for (i = 0; i <= strlen(DiagNames[diagGrp][diagNum]); i++)
+ {
+ diagNameString[i] = toupper(DiagNames[diagGrp][diagNum][i]);
+ }
+
+ if (!strcmp(testNumString, diagNameString))
+ {
+ testNum = (diagGrp<<DIAG_GROUP_NUM_BITS) + diagNum;
+ DBG_LEAVE();
+ return testNum;
+ }
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return testNum;
+}
+
+
+
+
+// *******************************************************************
+// MCHStartDiag
+// *******************************************************************
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHStartDiag::MCHStartDiag
+**
+** PURPOSE: MCHStartDiag constructor.
+**
+** INPUT PARAMETERS: ln - long name for command
+** sn - short name for command
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+MCHStartDiag::MCHStartDiag(char *ln, char *sn) : MCHDiagCommand(ln, sn)
+{}
+
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHStartDiag::ExecuteCommand
+**
+** PURPOSE: Execute the maintenance command handler start diagnostic function.
+**
+** INPUT PARAMETERS: parms - parameter for command in ASCII
+**
+** RETURN VALUE(S): status indicating success or failure
+**
+**----------------------------------------------------------------------------*/
+int MCHStartDiag::ExecuteCommand(char *parms)
+{
+ DBG_FUNC("MCHStartDiag::ExecuteCommand",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ DBG_TRACE("MCH : %s %s\n", longName, parms);
+
+ int testNum = GetDiagTestNum(parms);
+
+ if ((testNum >= 0) &&
+ (testNum>>DIAG_GROUP_NUM_BITS < DIAG_LAST_DIAG_GROUP>>DIAG_GROUP_NUM_BITS))
+ {
+ // Search the list of active diagnostics given the test number.
+ Diagnostic *newDiag = MCHTask::theMCHTask->FindDiagnostic(testNum);
+
+ if (newDiag)
+ {
+ CommandResponseAppend("Test currently in progress for testNum 0x%x\n", testNum);
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ // Create a the new diagnostic which corresponds to the requested test. If a value
+ // of zero is returned then the diag was not created.
+ if (MCHTask::theMCHTask->AllDiagnostics[testNum>>DIAG_GROUP_NUM_BITS])
+ {
+ newDiag =
+ MCHTask::theMCHTask->AllDiagnostics[testNum>>DIAG_GROUP_NUM_BITS](testNum, reqSrc, parms);
+ }
+
+ // If the diagnostic was created then call the RunDiagnosic function.
+ // A value of zero indicates the diagnostic was not created. If RunDiagnostic was
+ // successful then add the diagnostic to the list of currently active diagnostics.
+ // If RunDiagnostic was not successful then delete the diagnostic since it was
+ // unable to run properly.
+ if (newDiag)
+ {
+ if (newDiag->RunDiagnostic() == OK)
+ {
+ lstAdd(&MCHTask::theMCHTask->activeDiags, newDiag);
+ CommandResponseAppend("Initiating test 0x%x\n", testNum);
+ }
+ else
+ {
+ delete newDiag;
+ }
+ }
+ else
+ {
+ CommandResponseAppend("StartDiag: Invalid DiagName\n");
+ }
+
+ }
+ else
+ {
+ CommandResponseAppend("DiagName not specified or invalid DiagName\n");
+ }
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHStartDiag::ShowHelp
+**
+** PURPOSE: Display help information for the StartDiag command.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): return help information in ASCII
+**
+**----------------------------------------------------------------------------*/
+char *MCHStartDiag::ShowHelp(void)
+{
+ DBG_FUNC("MCHStartDiag::ShowHelp",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ DBG_LEAVE();
+ return("\t\"StartDiag or sttd DiagName <parm1> ... <parmN>\"\n"
+ "\t\tExecute diagnostic\n");
+}
+
+
+// *******************************************************************
+// MCHStopDiag
+// *******************************************************************
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHStopDiag::MCHStopDiag
+**
+** PURPOSE: MCHStopDiag constructor.
+**
+** INPUT PARAMETERS: ln - long name for command
+** sn - short name for command
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+MCHStopDiag::MCHStopDiag(char *ln, char *sn) : MCHDiagCommand(ln, sn)
+{}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHStopDiag::ExecuteCommand
+**
+** PURPOSE: Execute the maintenance command handler stop diagnostic function.
+**
+** INPUT PARAMETERS: parms - parameter for command in ASCII
+**
+** RETURN VALUE(S): status indicating success or failure
+**
+**----------------------------------------------------------------------------*/
+int MCHStopDiag::ExecuteCommand(char *parms)
+{
+ DBG_FUNC("MCHStopDiag::ExecuteCommand",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ DBG_TRACE("MCH : %s %s\n", longName, parms);
+
+ int testNum = GetDiagTestNum(parms);
+
+ if (testNum >= 0)
+ {
+ // Search the list of active diagnostics given the test number.
+ Diagnostic *diag = MCHTask::theMCHTask->FindDiagnostic(testNum);
+
+ // If an active diagnostic was found then attempt to perform the stop test function,
+ // otherwise send a NACK message back to requester.
+ if (diag)
+ {
+ // If this diagnostic has a message queue then it may be stopped.
+ if (diag->diagQId)
+ {
+ DiagnosticMsgType diagMsg;
+ diagMsg.func = DIAG_TEST_STOP_TEST;
+
+ int status = msgQSend(diag->diagQId,
+ (char *)&diagMsg,
+ sizeof(DiagnosticMsgType),
+ WAIT_FOREVER,
+ MSG_PRI_NORMAL);
+
+
+ if (status != OK)
+ {
+ DBG_ERROR("unable to send message %d\n", status);
+ CommandResponseAppend("Unable to stop test 0x%x\n", testNum);
+ }
+ else
+ {
+ CommandResponseAppend("Stopping test 0x%x\n", testNum);
+ }
+ }
+ // Since there is no message queue the diagnostic cannot be stopped so send back
+ // a NACK message to the requester.
+ else
+ {
+ CommandResponseAppend("Bad message queue. Can't stop test\n");
+ }
+ }
+ // No diagostic active with the test number.
+ else
+ {
+ CommandResponseAppend("No active test for specified DiagName\n");
+ }
+ }
+ else
+ {
+ CommandResponseAppend("DiagName not specified\n");
+ }
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHStopDiag::ShowHelp
+**
+** PURPOSE: Display help information for the StopDiag command.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): return help information in ASCII
+**
+**----------------------------------------------------------------------------*/
+char *MCHStopDiag::ShowHelp(void)
+{
+ DBG_FUNC("MCHStopDiag::ShowHelp",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ DBG_LEAVE();
+ return ("\t\"StopDiag or stpd DiagName\"\n"
+ "\t\tStop diagnostic\n");
+}
+
+
+// *******************************************************************
+// MCHGetDiagResult
+// *******************************************************************
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHGetDiagResult::MCHGetDiagResult
+**
+** PURPOSE: MCHGetDiagResult constructor.
+**
+** INPUT PARAMETERS: ln - long name for command
+** sn - short name for command
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+MCHGetDiagResult::MCHGetDiagResult(char *ln, char *sn) : MCHDiagCommand(ln, sn)
+{}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHGetDiagResult::ExecuteCommand
+**
+** PURPOSE: Execute the maintenance command handler get diagnostic result
+** function.
+**
+** INPUT PARAMETERS: parms - parameter for command in ASCII
+**
+** RETURN VALUE(S): status indicating success or failure
+**
+**----------------------------------------------------------------------------*/
+int MCHGetDiagResult::ExecuteCommand(char *parms)
+{
+ DBG_FUNC("MCHGetDiagResult::ExecuteCommand",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ DBG_TRACE("MCH : %s %s\n", longName, parms);
+
+ CommandResponseAppend("MCHGetDiagResult not implemented yet!\n");
+ DBG_LEAVE();
+ return OK;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHGetDiagResult::ShowHelp
+**
+** PURPOSE: Display help information for the GetDiagResult command.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): return help information in ASCII
+**
+**----------------------------------------------------------------------------*/
+char *MCHGetDiagResult::ShowHelp(void)
+{
+ DBG_FUNC("MCHGetDiagResult::ShowHelp",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ DBG_LEAVE();
+ return ("\t\"GetDiagResult or gdr DiagName <parm1> ... <parmN>\"\n"
+ "\t\tGet results of latest diagnostic run\n");
+}
+
+
+
+// *******************************************************************
+// MCHGetDiagHelp
+// *******************************************************************
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHGetDiagHelp::MCHGetDiagHelp
+**
+** PURPOSE: MCHGetDiagHelp constructor.
+**
+** INPUT PARAMETERS: ln - long name for command
+** sn - short name for command
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+MCHGetDiagHelp::MCHGetDiagHelp(char *ln, char *sn) : MCHDiagCommand(ln, sn)
+{}
+
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHGetDiagHelp::ExecuteCommand
+**
+** PURPOSE: Execute the maintenance command handler get diagnostic help
+** function.
+**
+** INPUT PARAMETERS: parms - parameter for command in ASCII
+**
+** RETURN VALUE(S): status indicating success or failure
+**
+**----------------------------------------------------------------------------*/
+int MCHGetDiagHelp::ExecuteCommand(char *parms)
+{
+ DBG_FUNC("MCHGetDiagHelp::ExecuteCommand",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ DBG_TRACE("MCH : %s %s\n", longName, parms);
+
+ int testNum = GetDiagTestNum(parms);
+
+ if ((testNum >= 0) &&
+ (testNum>>DIAG_GROUP_NUM_BITS < DIAG_LAST_DIAG_GROUP>>DIAG_GROUP_NUM_BITS))
+ {
+ // Create a the new diagnostic which corresponds to the requested test. If a value
+ // of zero is returned then the diag was not created.
+ Diagnostic *newDiag = 0;
+ if (MCHTask::theMCHTask->AllDiagnostics[testNum>>DIAG_GROUP_NUM_BITS])
+ {
+ newDiag =
+ MCHTask::theMCHTask->AllDiagnostics[testNum>>DIAG_GROUP_NUM_BITS](testNum, reqSrc, parms);
+ }
+
+ // Display help information.
+ if (newDiag)
+ {
+ CommandResponseAppend(newDiag->GetDiagnosticHelp());
+ delete newDiag;
+ }
+ else
+ {
+ CommandResponseAppend("StartDiag: Invalid diagName\n");
+ }
+ }
+ else
+ {
+ // Display a list of all available diagnostic.
+ for (int diagGrp = 0; diagGrp < DIAG_LAST_DIAG_GROUP>>DIAG_GROUP_NUM_BITS; diagGrp++)
+ {
+ CommandResponseAppend("%s\n", DiagNames[diagGrp][0]);
+ for (int diagNum = 1; DiagNames[diagGrp][diagNum]; diagNum++)
+ {
+ CommandResponseAppend("\t0x%x - %s\n", (diagGrp<<DIAG_GROUP_NUM_BITS) + diagNum,
+ DiagNames[diagGrp][diagNum]);
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHGetDiagHelp::ShowHelp
+**
+** PURPOSE: Display help information for the GetDiagHelp command.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): return help information in ASCII
+**
+**----------------------------------------------------------------------------*/
+char *MCHGetDiagHelp::ShowHelp(void)
+{
+ DBG_FUNC("MCHGetDiagHelp::ShowHelp",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ DBG_LEAVE();
+ return ("\t\"GetDiagHelp or gdh DiagName\"\n"
+ "\t\tGet diagnostic help (No DiagName for list of all diags)\n");
+}
diff --git a/data/mnet/GP10/Host/Mch/src/MCHTask.cpp b/data/mnet/GP10/Host/Mch/src/MCHTask.cpp
new file mode 100644
index 0000000..8b899ca
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/src/MCHTask.cpp
@@ -0,0 +1,573 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MCHTask.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/29/99
+// Description :
+//
+// *******************************************************************
+#include <ctype.h>
+#include <stdio.h>
+
+#include "MCHTask.h"
+#include "MCH/MCHIntf.h"
+#include "MCHInit.h"
+#include "MCHConfig.h"
+#include "MCHCommand.h"
+#include "CdcDiags.h"
+#include "DspDiags.h"
+#include "SysDiags.h"
+#include "logging/vclogging.h"
+#include "logging/vcmodules.h"
+#include "MnetModuleId.h"
+#include "TcpServer/TcpSrvApi.h"
+#include "GP10OsTune.h"
+
+
+// Flag used to indicate that the one and only maintenance command handler
+// has been created.
+BOOL MCHTask::isOneCreated = FALSE;
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHTask::MCHTask
+**
+** PURPOSE: MCHTask constructor.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+MCHTask::MCHTask() : MCHTaskObj(MCH_TASK_NAME)
+{
+ // Create MCHCommand objects for each of the known maintenance commands.
+ mchCommands[MCH_START_DIAG] = new MCHStartDiag("STARTDIAG", "STTD");
+ mchCommands[MCH_STOP_DIAG] = new MCHStopDiag("STOPDIAG", "STPD");
+ mchCommands[MCH_GET_RESULT] = new MCHGetDiagResult("GETDIAGRESULT", "GDR");
+ mchCommands[MCH_GET_DIAG_HELP] = new MCHGetDiagHelp("GETDIAGHELP", "GDH");
+ mchCommands[MCH_HELP] = new MCHHelp("MCHHELP", "HELP");
+
+ // Initialize the list of active diagnostice (begins empty).
+ lstInit(&activeDiags);
+
+ // Initialize the array of diagnostic creation routines.
+ AllDiagnostics[DIAG_CDC_DIAGNOSTICS >> DIAG_GROUP_NUM_BITS] = cdcDiags;
+ AllDiagnostics[DIAG_DSP_DIAGNOSTICS >> DIAG_GROUP_NUM_BITS] = dspDiags;
+ AllDiagnostics[DIAG_RF_DIAGNOSTICS >> DIAG_GROUP_NUM_BITS] = rfDiags;
+ AllDiagnostics[DIAG_CLK_DIAGNOSTICS >> DIAG_GROUP_NUM_BITS] = clkDiags;
+ AllDiagnostics[DIAG_GPS_DIAGNOSTICS >> DIAG_GROUP_NUM_BITS] = gpsDiags;
+ AllDiagnostics[DIAG_SYSTEM_DIAGNOSTICS >> DIAG_GROUP_NUM_BITS] = systemDiags;
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: SysCommand_MCH
+**
+** PURPOSE: SysCommand_MCH is called anytime the system needs to notify
+** a module about a system event.
+**
+** INPUT PARAMETERS: action - type of system command
+**
+** RETURN VALUE(S): OK
+**
+**----------------------------------------------------------------------------*/
+int SysCommand_MCH(T_SYS_CMD action)
+{
+ DBG_FUNC("MCHTask::InitMCH",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ switch(action){
+ case SYS_SHUTDOWN:
+ DBG_TRACE("[MCH] Received system shutdown notification\n");
+ break;
+ case SYS_START:
+ DBG_TRACE("[MCH] Received system start notification\n");
+ if (MCHTask::InitMCH() != OK)
+ {
+ DBG_ERROR("Unable to initialize MCH properly\n");
+ }
+ break;
+
+ default:
+ DBG_TRACE("[MCH] Unknown system command received\n");
+ }
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHTask::InitMCH
+**
+** PURPOSE: InitMCH function provides the basic initialization for the
+** maintenance command handler in the BTS. A single instance of MCHTask
+** is created. The single instance is referenced by static member pointer
+** theMCHTask.
+**
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+
+int MCHTask::InitMCH(void)
+{
+ DBG_FUNC("MCHTask::InitMCH",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ // Create the Maintenance Command Handler message queue.
+ MCHMsgQId = msgQCreate(MCH_MAX_MSGS, // number of messages
+ MCH_MAX_MSG_LENGTH, // size of each message
+ MSG_Q_PRIORITY // priority of the queue
+ );
+
+
+ // check message queue creation result
+ if(MCHMsgQId == NULL)
+ {
+ // message queue creation failure. No point to continue.
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ // Create the one and only MCHTask object.
+ if (isOneCreated == FALSE)
+ {
+ theMCHTask = new MCHTask();
+ isOneCreated = TRUE;
+ }
+
+ if (theMCHTask->MCHTaskObj.JCTaskSpawn(MCH_TASK_PRIORITY,
+ MCH_TASK_OPTION,
+ MCH_TASK_STACK_SIZE,
+ (FUNCPTR) MCHTask::MCHLoop,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ MODULE_MCH, JC_NON_CRITICAL_TASK ) == ERROR)
+ {
+ DBG_ERROR("MCH: Unable to spawn task\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: CallMCHLoop
+**
+** PURPOSE: This is a wrapper function used to call MCHLoop. This is needed
+** so that a simple extern declaration is sufficient to call MCHLoop. If
+** MCHLoop were call directly the entire MCHTask class would need to be
+** included in the root task scope.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+int CallMCHLoop(void)
+{
+ return MCHTask::MCHLoop();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MCHTask::MCHLoop
+**
+** PURPOSE: MCHLoop is the main message processing loop for the maintenance
+** command handler.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+int MCHTask::MCHLoop( void )
+{
+ DBG_FUNC("MCHTask::MCHLoop",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ ReqSourceType reqSrc;
+ MCHMessageType rcvMsg;
+ MCHCommand *pMCHComm;
+ int rtnStat;
+ char commandName[MCH_MAX_COMMAND_LEN], *commandParms;
+
+ // Register with TCP server.
+ if (TcpSrvRegHand(kMchGpName, MaintCmdTcpServer) != TRUE)
+ {
+ DBG_WARNING("MCH: Unable to register with TCP server\n");
+ }
+
+ // Maintenance Command Handler main loop.
+ theMCHTask->MCHTaskObj.JCTaskEnterLoop();
+ while (TRUE)
+ {
+ if ((rtnStat = msgQReceive(MCHMsgQId,
+ (char *) &rcvMsg,
+ MCH_MAX_MSG_LENGTH,
+ WAIT_FOREVER)) == ERROR)
+ {
+ DBG_WARNING("Failed msgQReceive! error %x\n", rtnStat);
+ }
+
+ switch (rcvMsg.func)
+ {
+ case MCH_NETWORK_REQ :
+ {
+ reqSrc = NETWORK_REQ;
+ sscanf(rcvMsg.commLine, "%s", commandName);
+
+ commandParms = strstr(rcvMsg.commLine, commandName) + strlen(commandName) + 1;
+ // Convert all letters in the request to upper case
+ for (int i = 0; i <= strlen(commandName); i++)
+ {
+ commandName[i] = toupper(commandName[i]);
+ }
+ }
+ break;
+
+ case MCH_TERMINAL_REQ :
+ {
+ reqSrc = TERMINAL_REQ;
+
+ sscanf(rcvMsg.commLine, "%s", commandName);
+
+ commandParms = strstr(rcvMsg.commLine, commandName) + strlen(commandName) + 1;
+ // Convert all letters in the request to upper case
+ for (int i = 0; i <= strlen(commandName); i++)
+ {
+ commandName[i] = toupper(commandName[i]);
+ }
+ }
+ break;
+
+ case MCH_DELETE_DIAGNOSTIC :
+ {
+ // Remove diagnostic from the active list and delete the diag.
+ lstDelete(&theMCHTask->activeDiags, rcvMsg.delDiagMsg.diag);
+ delete rcvMsg.delDiagMsg.diag;
+ continue;
+ }
+ break;
+
+ case MCH_DIAG_SPECIFIC_MSG :
+ {
+ // This message is for an active diagnostic so send it off to
+ // all active diagnostics. The diagnostics that are not expecting
+ // this message will just drop it.
+ NODE *diag = lstFirst(&theMCHTask->activeDiags);
+ while (diag)
+ {
+ if ((rtnStat = msgQSend (((Diagnostic *)diag)->diagQId,
+ (char *)&rcvMsg.diagMsg,
+ sizeof(DiagnosticMsgType),
+ NO_WAIT,
+ MSG_PRI_NORMAL)) == ERROR)
+ {
+ DBG_WARNING ("Error sending message %x\n", rtnStat);
+ }
+ diag = lstNext(diag);
+ }
+ continue;
+ }
+ break;
+
+ default :
+ DBG_WARNING("Invalid message received %d\n", rcvMsg.func);
+ continue;
+ }
+
+ // Loop through the known message types and execute it if found.
+ for (int type = 0; type < MCH_MAX_COMMANDS; type++)
+ {
+ if (theMCHTask->mchCommands[type])
+ {
+ if (theMCHTask->mchCommands[type]->isCommand(commandName))
+ {
+ theMCHTask->mchCommands[type]->reqSrc = reqSrc;
+ theMCHTask->mchCommands[type]->ClearCommandResponse();
+ theMCHTask->mchCommands[type]->ExecuteCommand(commandParms);
+ pMCHComm = theMCHTask->mchCommands[type];
+ break;
+ }
+ }
+ }
+
+ // If a valid command was not entered then display help.
+ if (type == MCH_MAX_COMMANDS)
+ {
+ theMCHTask->mchCommands[MCH_HELP]->ClearCommandResponse();
+ theMCHTask->mchCommands[MCH_HELP]->CommandResponseAppend(
+ "Unknown maintenance command %s\n", rcvMsg.commLine);
+ theMCHTask->mchCommands[MCH_HELP]->ExecuteCommand(commandParms);
+ pMCHComm = theMCHTask->mchCommands[MCH_HELP];
+ }
+
+ theMCHTask->SendResponse(pMCHComm->GetCommandResponse(), reqSrc);
+ }
+ theMCHTask->MCHTaskObj.JCTaskNormExit();
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DiagnosticManager::FindDiagnostic
+**
+** PURPOSE: Search the list of currently active diagnostics given class_id,
+** object_instance, and test number.
+**
+** INPUT PARAMETERS: testNum - test number of diagnostic
+**
+** RETURN VALUE(S): Diagnostic * - pointer to the new diagnostic if found
+** 0 if no diagnostic was found
+**
+**----------------------------------------------------------------------------*/
+Diagnostic *MCHTask::FindDiagnostic(int testNum)
+{
+ DBG_FUNC("MCHTask::FindDiagnostic",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ // Now search the list of active diagnostics for this object class to see if
+ // one exists with the given instance and test information.
+ NODE *diag = lstFirst(&activeDiags);
+ while (diag)
+ {
+ if (((Diagnostic *)diag)->isAMatch(testNum))
+ {
+ break;
+ }
+ diag = lstNext(diag);
+ }
+ DBG_LEAVE();
+ return (Diagnostic *)diag;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DiagnosticManager::SendResponse
+**
+** PURPOSE: Send the string back to the desired source.
+**
+** INPUT PARAMETERS: resp - string to send
+** reqSrc - who to respond to
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void MCHTask::SendResponse(const char *resp, ReqSourceType reqSrc)
+{
+ DBG_FUNC("MCHTask::SendResponse",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ switch (reqSrc)
+ {
+ case NETWORK_REQ:
+ {
+ // Send back to the network using the TCP server.
+ if (TcpSrvSendResponse(resp, strlen(resp), kMchGpName) != TRUE)
+ {
+ DBG_WARNING("MCH: Unable to send response to TCP server\n");
+ }
+ }
+ break;
+ case TERMINAL_REQ:
+ {
+ printf("%s", resp);
+ }
+ break;
+ }
+ DBG_LEAVE();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: Create diagnostic functions.
+**
+** PURPOSE: Each of the following functions are included in the table of functions
+** to create diagnostics. Each function compares the requested diagnostic test
+** number with the known test numbers and creates an instance of the diagnostic
+** if the test is valid.
+**
+** INPUT PARAMETERS: testNum - test number.
+** reqSrc - source of the diagnostic request
+** parms - pointer to parameter list in ASCII.
+**
+** RETURN VALUE(S): Diagnostic * - pointer to the new diagnostic if valid
+** 0 if no diagnostic was created
+**
+**----------------------------------------------------------------------------*/
+Diagnostic *cdcDiags(int testNum, ReqSourceType reqSrc, char *parms)
+{
+ switch (testNum) {
+ case DIAG_HPI_MEMORY_TEST :
+ return new HPIMemoryTest(
+ DiagNames[testNum>>DIAG_GROUP_NUM_BITS][testNum & DIAG_TEST_NUM_MASK],
+ testNum, reqSrc, parms);
+ break;
+ case DIAG_I2C_LOOPBACK_TEST :
+ return new I2CLoopbackTest(
+ DiagNames[testNum>>DIAG_GROUP_NUM_BITS][testNum & DIAG_TEST_NUM_MASK],
+ testNum, reqSrc, parms);
+ break;
+ case DIAG_DSP_MEM_TEST :
+ return new DSPMemTest(
+ DiagNames[testNum>>DIAG_GROUP_NUM_BITS][testNum & DIAG_TEST_NUM_MASK],
+ testNum, reqSrc, parms);
+ break;
+ case DIAG_CF_TEST :
+ return new CFTest(
+ DiagNames[testNum>>DIAG_GROUP_NUM_BITS][testNum & DIAG_TEST_NUM_MASK],
+ testNum, reqSrc, parms);
+ break;
+ case DIAG_FPGA_TEST:
+ return new FPGATest(
+ DiagNames[testNum>>DIAG_GROUP_NUM_BITS][testNum & DIAG_TEST_NUM_MASK],
+ testNum, reqSrc, parms);
+ break;
+ case DIAG_I2C_TEST:
+ return new I2CTest(
+ DiagNames[testNum>>DIAG_GROUP_NUM_BITS][testNum & DIAG_TEST_NUM_MASK],
+ testNum, reqSrc, parms);
+ break;
+ default :
+ {
+ return 0;
+ }
+ }
+}
+
+
+
+Diagnostic *dspDiags(int testNum, ReqSourceType reqSrc, char *parms)
+{
+ switch (testNum) {
+ case DIAG_DSP_LOOPBACK :
+ return new DSPLoopbackTest(
+ DiagNames[testNum>>DIAG_GROUP_NUM_BITS][testNum & DIAG_TEST_NUM_MASK],
+ testNum, reqSrc, parms);
+ break;
+ case DIAG_DSP_MS_REPORT :
+ return new DSPMSReport(
+ DiagNames[testNum>>DIAG_GROUP_NUM_BITS][testNum & DIAG_TEST_NUM_MASK],
+ testNum, reqSrc, parms);
+ break;
+ case DIAG_DSP_GPRS_MS_REPORT :
+ return new DSPGPRSMSReport(
+ DiagNames[testNum>>DIAG_GROUP_NUM_BITS][testNum & DIAG_TEST_NUM_MASK],
+ testNum, reqSrc, parms);
+ break;
+ case DIAG_DSP_HO_REPORT :
+ return new DSPHOReport(
+ DiagNames[testNum>>DIAG_GROUP_NUM_BITS][testNum & DIAG_TEST_NUM_MASK],
+ testNum, reqSrc, parms);
+ break;
+ case DIAG_DSP_DL_REPORT :
+ return new DSPDLReport(
+ DiagNames[testNum>>DIAG_GROUP_NUM_BITS][testNum & DIAG_TEST_NUM_MASK],
+ testNum, reqSrc, parms);
+ break;
+ case DIAG_DSP_HPI_ECHO_TEST :
+ return new HPIEchoTest(
+ DiagNames[testNum>>DIAG_GROUP_NUM_BITS][testNum & DIAG_TEST_NUM_MASK],
+ testNum, reqSrc, parms);
+ break;
+ case DIAG_DSP_BBLOOPBACK :
+ return new DSPBBLoopbackTest(
+ DiagNames[testNum>>DIAG_GROUP_NUM_BITS][testNum & DIAG_TEST_NUM_MASK],
+ testNum, reqSrc, parms);
+ break;
+ case DIAG_DSP_EXTMEM :
+ return new DSPExtMemTest(
+ DiagNames[testNum>>DIAG_GROUP_NUM_BITS][testNum & DIAG_TEST_NUM_MASK],
+ testNum, reqSrc, parms);
+ break;
+ case DIAG_DSP_IF_REPORT :
+ return new DSPIFReport(
+ DiagNames[testNum>>DIAG_GROUP_NUM_BITS][testNum & DIAG_TEST_NUM_MASK],
+ testNum, reqSrc, parms);
+ break;
+ default :
+ {
+ return 0;
+ }
+ }
+}
+
+
+Diagnostic *rfDiags(int testNum, ReqSourceType reqSrc, char *parms)
+{
+ switch (testNum) {
+ default :
+ {
+ return 0;
+ }
+ }
+}
+
+
+Diagnostic *clkDiags(int testNum, ReqSourceType reqSrc, char *parms)
+{
+ switch (testNum) {
+ default :
+ {
+ return 0;
+ }
+ }
+}
+
+
+Diagnostic *gpsDiags(int testNum, ReqSourceType reqSrc, char *parms)
+{
+ switch (testNum) {
+ default :
+ {
+ return 0;
+ }
+ }
+}
+
+
+Diagnostic *systemDiags(int testNum, ReqSourceType reqSrc, char *parms)
+{
+ switch (testNum) {
+ case DIAG_SYSTEM_NETWORK_TEST_SERVER :
+ return new NetworkTestServer(
+ DiagNames[testNum>>DIAG_GROUP_NUM_BITS][testNum & DIAG_TEST_NUM_MASK],
+ testNum, reqSrc, parms);
+ break;
+ case DIAG_SYSTEM_NETWORK_TEST_TRANSMIT :
+ return new NetworkTestTransmit(
+ DiagNames[testNum>>DIAG_GROUP_NUM_BITS][testNum & DIAG_TEST_NUM_MASK],
+ testNum, reqSrc, parms);
+ break;
+ default :
+ {
+ return 0;
+ }
+ }
+}
diff --git a/data/mnet/GP10/Host/Mch/src/Makefile b/data/mnet/GP10/Host/Mch/src/Makefile
new file mode 100644
index 0000000..7d55a69
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/src/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = Mch
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\mch.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Mch/src/SysDiags.cpp b/data/mnet/GP10/Host/Mch/src/SysDiags.cpp
new file mode 100644
index 0000000..184254f
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/src/SysDiags.cpp
@@ -0,0 +1,1404 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SysDiags.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/29/99
+// Description :
+//
+// *******************************************************************
+
+
+
+#include "SysDiags.h"
+
+#define NUM_PATTERN_BYTES 5
+#define MAX_PATTERNS 3
+char TestPatterns[][NUM_PATTERN_BYTES] =
+{
+ {0x00, 0x11, 0x22, 0x33, 0x44},
+ {0x55, 0x66, 0x77, 0x88, 0x99},
+ {0xaa, 0xbb, 0xcc, 0xdd, 0xee}
+};
+
+
+
+// *******************************************************************
+// NetworkTestServer
+// *******************************************************************
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestServer constructor
+**
+** PURPOSE: Initialize data members for NetworkTestServer object.
+**
+** INPUT PARAMETERS: testName - ASCII name for test
+** testNum - test number
+** reqSrc - source of the diagnostic request
+** parms - pointer to parameter list in ASCII
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+NetworkTestServer::NetworkTestServer(char *testName, int testNum, ReqSourceType reqSrc,
+ char *parms) : Diagnostic(testName, testNum, reqSrc, parms)
+{
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestServer destructor
+**
+** PURPOSE: Delete data members for NetworkTestServer object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+NetworkTestServer::~NetworkTestServer()
+{
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestServer::InitiateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int NetworkTestServer::InitiateDiagnostic(void)
+{
+ char testName[256];
+
+ // Setup default parameter values.
+ start=DEFSTART;
+ end=DEFEND;
+ port=DEFPORT;
+ inc=DEFINC;
+ verbose=0;
+ bufsize = 0;
+ duration=DEFDURATION;
+ verify=0;
+
+
+ // Extract paramters from command line.
+ //
+ // Command Line : port, verbose
+ sscanf(parameters, "%s %d %d %d %d %d %d %d %d",
+ &testName, &verbose, &duration, &verify, &start, &end, &inc, &bufsize, &port);
+
+ // Verify that the paramaters are reasonable
+ if (start > end)
+ {
+ SendResultData("Start MUST be LESS than end %d %d\n", start, end);
+ return ERROR;
+ }
+
+ SendResultData ("%s verbose(%d) duration(%d) verify(%d) start(%d) end(%d) inc(%d) bufsize(%d) port(%d)\n",
+ testName, verbose, duration, verify, start, end, inc, bufsize, port);
+
+ // If this is a timed test then start the timer.
+ if (duration)
+ {
+ SetTimer(duration);
+ }
+
+ // Spawn a task to do the sending and receiving of data.
+ // The function called is a static function
+ // of diagnostic. Since the object needs an instance to access data
+ // members and non-static functions, the this pointer is passed as an argument.
+ taskId = taskSpawn("NetTstSrv", DIAGNOSTIC_TEST_TASK_PRI, 0,
+ DIAGNOSTIC_TEST_STACK_SIZE,
+ (FUNCPTR) NetworkTestServer::NetTestServer,
+ (int)this, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
+
+ if ( taskId == ERROR )
+ {
+ SendResultData("NetworkTestServer:Unable to create Task %d", taskId);
+ return ERROR;
+ }
+
+ return OK;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestServer::ProcessMessage
+**
+** PURPOSE: Process messages not handled by Diagnostic base class.
+**
+** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+**
+** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+** STOP_TEST - if the controlling message loop should end
+**
+**----------------------------------------------------------------------------*/
+int NetworkTestServer::ProcessMessage(DiagnosticMsgType diagMsg)
+{
+ switch ( diagMsg.func )
+ {
+ }
+ return CONTINUE_TEST;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestServer::TerminateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int NetworkTestServer::TerminateDiagnostic(void)
+{
+ SendResultData("NetworkTestServer Complete!\n");
+
+ taskDelete(taskId);
+ CleanUpServer(&args);
+
+ if (args.buff)
+ free(args.buff);
+
+ return OK;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestServer::NetTestServer
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int NetworkTestServer::NetTestServer(int thisPtr)
+{
+ // Grab a pointer to the network test object.
+ NetworkTestServer *pNetTest = (NetworkTestServer *)thisPtr;
+
+ int i, j, n, /* Loop indices */
+ nrepeat, /* Number of time to do the transmission */
+ len, /* Number of bytes to be transmitted */
+ pert; /* Perturbation value */
+
+
+ pNetTest->args.prot.sndbufsz = pNetTest->bufsize;
+ pNetTest->args.prot.rcvbufsz = pNetTest->bufsize;
+
+ pNetTest->args.nbuff = TRIALS;
+ pNetTest->args.port = pNetTest->port;
+
+ pNetTest->SetupServer(&pNetTest->args);
+ pNetTest->EstablishServer(&pNetTest->args);
+
+ while (1)
+ {
+ pNetTest->args.bufflen = 1;
+ pNetTest->args.buff = (char *)malloc(pNetTest->args.bufflen);
+ pNetTest->SyncServer(&pNetTest->args);
+ for (i = 0; i < LATENCYREPS; i++)
+ {
+ pNetTest->RecvDataServer(&pNetTest->args);
+ pNetTest->SendDataServer(&pNetTest->args);
+ }
+
+ free(pNetTest->args.buff);
+ pNetTest->args.buff = 0;
+
+ if (pNetTest->inc == 0)
+ {
+ /* Set a starting value for the message size increment. */
+ pNetTest->inc = (pNetTest->start > 1) ? pNetTest->start / 2 : 1;
+ }
+
+ /* Main loop of benchmark */
+ for (n = 0, len = pNetTest->start;
+ n < NSAMP - 3 && len <= pNetTest->end;
+ len = len + pNetTest->inc)
+ {
+ /* This is a perturbation loop to test nearby values */
+ for (pert = (pNetTest->inc > PERT+1)? -PERT: 0;
+ pert <= PERT;
+ n++, pert += (pNetTest->inc > PERT+1)? PERT: PERT+1)
+ {
+
+ /* Calculate howmany times to repeat the experiment. */
+ pNetTest->RecvRepeatServer(&pNetTest->args, &nrepeat);
+
+ /* Allocate the buffer */
+ pNetTest->args.bufflen = ((len + pert) <= 0)? 1: (len + pert);
+ if((pNetTest->args.buff=(char *)malloc(pNetTest->args.bufflen))==(char *)NULL)
+ {
+ pNetTest->SendResultData("Couldn't allocate memory\n");
+ break;
+ }
+ if((pNetTest->args.buff1=(char *)malloc(pNetTest->args.bufflen))==(char *)NULL)
+ {
+ pNetTest->SendResultData("Couldn't allocate memory\n");
+ break;
+ }
+
+ /* Finally, we get to receive */
+ for (i = 0; i < 3; i++)
+ {
+ pNetTest->SyncServer(&pNetTest->args);
+ for (j = 0; j < nrepeat; j++)
+ {
+ pNetTest->RecvDataServer(&pNetTest->args);
+ if (pNetTest->verify)
+ pNetTest->InvertData();
+ pNetTest->SendDataServer(&pNetTest->args);
+ }
+ }
+
+ free(pNetTest->args.buff);
+ pNetTest->args.buff = 0;
+
+ } /* End of perturbation loop */
+ } /* End of main loop */
+ } /* Loop forever */
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestServer::When
+**
+** PURPOSE: Return the current time in seconds, using a double precision
+** number.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): current time in seconds
+**
+**----------------------------------------------------------------------------*/
+double NetworkTestServer::When()
+{
+ struct timespec tp;
+ clock_gettime(CLOCK_REALTIME, &tp);
+ return ((double) tp.tv_sec + (double) tp.tv_nsec * 1e-9);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestServer::SetupServer
+**
+** PURPOSE: Setup the socket to act as the server for the test.
+**
+** INPUT PARAMETERS: p - pointer to test arguments
+**
+** RETURN VALUE(S): status - OK if successful
+** ERROR if setup failed
+**----------------------------------------------------------------------------*/
+int NetworkTestServer::SetupServer(ArgStruct *p)
+{
+
+ int one = 1;
+ int sockfd;
+ struct sockaddr_in *lsin1, *lsin2; /* ptr to sockaddr_in in ArgStruct */
+ struct hostent *addr;
+
+ lsin1 = &(p->prot.sin1);
+ lsin2 = &(p->prot.sin2);
+
+ bzero((char *) lsin1, sizeof(*lsin1));
+ bzero((char *) lsin2, sizeof(*lsin2));
+
+ if ( (sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
+ {
+ SendResultData("server: can't open stream socket");
+ return(ERROR);
+ }
+
+ /* Attempt to set TCP_NODELAY */
+ if(setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (char *)&one, sizeof(one)) < 0)
+ {
+ SendResultData("setsockopt: nodelay\n");
+ return(ERROR);
+ }
+
+ /* If requested, set the send and receive buffer sizes */
+ if(p->prot.sndbufsz > 0)
+ {
+ SendResultData("Send and Receive Buffers set to %d bytes\n", p->prot.sndbufsz);
+ if(setsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, (char *)&(p->prot.sndbufsz),
+ sizeof(p->prot.sndbufsz)) < 0)
+ {
+ SendResultData("setsockopt: sndbuf\n");
+ return(ERROR);
+ }
+ if(setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF, (char *)&(p->prot.rcvbufsz),
+ sizeof(p->prot.rcvbufsz)) < 0)
+ {
+ SendResultData("setsockopt: rcvbuf\n");
+ return(ERROR);
+ }
+ }
+
+ bzero((char *) lsin1, sizeof(*lsin1));
+ lsin1->sin_family = AF_INET;
+ lsin1->sin_addr.s_addr = htonl(INADDR_ANY);
+ lsin1->sin_port = htons(p->port);
+
+ if (bind(sockfd, (struct sockaddr *) lsin1, sizeof(*lsin1)) < 0)
+ {
+ SendResultData("server: can't bind local address! E#:%d", errno);
+ return(ERROR);
+ }
+
+ p->servicefd = sockfd;
+
+ return(OK);
+
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestServer::SyncServer
+**
+** PURPOSE: Synchronize with the other end of the connection.
+**
+** INPUT PARAMETERS: p - pointer to test arguments
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void NetworkTestServer::SyncServer(ArgStruct *p)
+{
+ char s[] = "SyncMe";
+ char response[7];
+
+ if (send(p->commfd, s, strlen(s), 0) < 0 ||
+ ReadFully(p->commfd, response, strlen(s)) < 0)
+ {
+ SendResultData("Server: error writing or reading synchronization string");
+ SendStopMsg();
+ }
+ if (strncmp(s, response, strlen(s)))
+ {
+ SendResultData("Server: Synchronization string incorrect!\n");
+ SendStopMsg();
+ }
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestServer::SendDataServer
+**
+** PURPOSE: Send date to the other end of the connection.
+**
+** INPUT PARAMETERS: p - pointer to test arguments
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void NetworkTestServer::SendDataServer(ArgStruct *p)
+{
+ int bytesWritten, bytesLeft;
+ char *q;
+
+ bytesLeft = p->bufflen;
+ bytesWritten = 0;
+ q = p->buff;
+ while (bytesLeft > 0 &&
+ (bytesWritten = send(p->commfd, q, bytesLeft, 0)) > 0)
+ {
+ bytesLeft -= bytesWritten;
+ q += bytesWritten;
+ }
+ if (bytesWritten == -1)
+ {
+ SendResultData("Server: send: error encountered, errno=%d\n", errno);
+ SendStopMsg();
+ }
+
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestServer::RecvDataServer
+**
+** PURPOSE: Receive data from the other end of the connection.
+**
+** INPUT PARAMETERS: p - pointer to test arguments
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void NetworkTestServer::RecvDataServer(ArgStruct *p)
+{
+ int bytesLeft;
+ int bytesRead;
+ char *q;
+
+ bytesLeft = p->bufflen;
+ bytesRead = 0;
+ q = p->buff;
+ while (bytesLeft > 0 &&
+ (bytesRead = recv(p->commfd, q, bytesLeft, 0)) > 0)
+ {
+ bytesLeft -= bytesRead;
+ q += bytesRead;
+ }
+ if (bytesLeft > 0 && bytesRead == 0)
+ {
+ SendResultData("Server: \"end of file\" encountered on reading from socket\n");
+ }
+ else if (bytesRead == -1)
+ {
+ SendResultData("Server: read: error encountered, errno=%d\n", errno);
+ SendStopMsg();
+ }
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestServer::RecvRepeatServer
+**
+** PURPOSE: Receive the number of repetitions from the other end of the
+** connection.
+**
+** INPUT PARAMETERS: p - pointer to test arguments
+** rpt - number of repetitions
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void NetworkTestServer::RecvRepeatServer(ArgStruct *p, int *rpt)
+{
+ unsigned long lrpt, nrpt;
+ int bytesRead;
+
+ bytesRead = ReadFully(p->commfd, (char *)&nrpt, sizeof(unsigned long));
+ if (bytesRead < 0)
+ {
+ SendResultData("Server: read failed in RecvRepeat: errno=%d\n", errno);
+ SendStopMsg();
+ }
+ else if (bytesRead != sizeof(unsigned long))
+ {
+ SendResultData("Server: partial read in RecvRepeat of %d bytes\n",
+ bytesRead);
+ SendStopMsg();
+ }
+ lrpt = ntohl(nrpt);
+
+ *rpt = lrpt;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestServer::EstablishServer
+**
+** PURPOSE: Accept a connection from a client.
+**
+** INPUT PARAMETERS: p - pointer to test arguments
+**
+** RETURN VALUE(S): status - OK if establish successful
+** ERROR if establish failed
+**----------------------------------------------------------------------------*/
+int NetworkTestServer::EstablishServer(ArgStruct *p)
+{
+ int clen;
+
+ clen = sizeof(p->prot.sin2);
+ /* SERVER */
+ listen(p->servicefd, 5);
+ p->commfd = accept(p->servicefd, (struct sockaddr *)&(p->prot.sin2), &clen);
+
+ if(p->commfd < 0)
+ {
+ SendResultData("Server: Accept Failed! E#:%d\n",errno);
+ SendStopMsg();
+ return(ERROR);
+
+ }
+ return(OK);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestServer::CleanUpServer
+**
+** PURPOSE: Cleanup sockets used for this test.
+**
+** INPUT PARAMETERS: p - pointer to test arguments
+**
+** RETURN VALUE(S): status - OK if cleanup successful
+** ERROR if cleanup failed
+**----------------------------------------------------------------------------*/
+int NetworkTestServer::CleanUpServer(ArgStruct *p)
+{
+ char *quit="QUIT";
+ send(p->commfd,quit, 5, 0);
+ recv(p->commfd,quit,5, 0);
+ close(p->commfd);
+ close(p->servicefd);
+ return(OK);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestServer::GetDiagnosticHelp
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): help string
+**
+**----------------------------------------------------------------------------*/
+char *NetworkTestServer::GetDiagnosticHelp(void)
+{
+ return (
+ "NetworkTestServer\n\n"
+ "Test the integrity and throughput of the network connection. Must use this"
+ "test in conjunction with NetworkTestTransmit or external client.\n\n"
+ "Parameters - verbose duration verify start end inc bufsize port\n"
+ "\tverbose - If non-zero show individual error occurences.\n"
+ "\tduration - Time in seconds to run test (DEFAULT 60)\n"
+ "\tverify - Invert data for verfication by the tranmitter (DEFAULT 0)\n"
+ "\tstart - lower bound start value (DEFAULT 1024)\n"
+ "\tend - upper bound stop value (DEFAULT 4096)\n"
+ "\tinc - specify increment step size (DEFAULT 1024)\n"
+ "\tbufsize - size of receive and send buffers (DEFAULT OS default)\n"
+ "\tport - port number to listen to (DEFAULT 3456)\n"
+ "Returns - Number of error packets\n"
+ );
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestServer::SendStopMsg
+**
+** PURPOSE: Send a message to parent task to stop network test.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**----------------------------------------------------------------------------*/
+void NetworkTestServer::SendStopMsg(void)
+{
+ // Send a message to stop the test.
+ DiagnosticMsgType diagMsg;
+
+ // Initialize the diagnostic message.
+ diagMsg.func = DIAG_TEST_INTERNAL_STOP_TEST;
+
+ msgQSend(diagQId,
+ (char *)&diagMsg,
+ sizeof(DiagnosticMsgType),
+ WAIT_FOREVER,
+ MSG_PRI_NORMAL);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestServer::ReadFully
+**
+** PURPOSE: Read data from specified socket.
+**
+** INPUT PARAMETERS: fd - file descriptor for socket
+** obuf - pointer to buffer to be filled
+** len - number of bytes to receive
+**
+** RETURN VALUE(S): for success - number of bytes read
+** for failure - ERROR
+**----------------------------------------------------------------------------*/
+int NetworkTestServer::ReadFully(int fd, char *obuf, int len)
+{
+ int bytesLeft = len;
+ char *buf = obuf;
+ int bytesRead = 0;
+
+ while (bytesLeft > 0 &&
+ (bytesRead = recv(fd, buf, bytesLeft, 0)) > 0)
+ {
+ bytesLeft -= bytesRead;
+ buf += bytesRead;
+ }
+ if (bytesRead <= 0)
+ return bytesRead;
+ return len;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestServer::InvertData
+**
+** PURPOSE: Invert all the data in the received buffer..
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**----------------------------------------------------------------------------*/
+void NetworkTestServer::InvertData()
+{
+ for (int i = 0; i < args.bufflen; i++)
+ args.buff[i] = ~args.buff[i];
+}
+
+
+
+
+
+// *******************************************************************
+// NetworkTestTransmit
+// *******************************************************************
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestTransmit constructor
+**
+** PURPOSE: Initialize data members for NetworkTestTransmit object.
+**
+** INPUT PARAMETERS: testName - ASCII name for test
+** testNum - test number
+** reqSrc - source of the diagnostic request
+** parms - pointer to parameter list in ASCII
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+NetworkTestTransmit::NetworkTestTransmit(char *testName, int testNum, ReqSourceType reqSrc,
+ char *parms) : Diagnostic(testName, testNum, reqSrc, parms)
+{
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestTransmit destructor
+**
+** PURPOSE: Delete data members for NetworkTestTransmit object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+NetworkTestTransmit::~NetworkTestTransmit()
+{
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestTransmit::InitiateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int NetworkTestTransmit::InitiateDiagnostic(void)
+{
+ char testName[256];
+
+ // Setup default parameter values.
+ start=DEFSTART;
+ end=DEFEND;
+ port=DEFPORT;
+ inc=DEFINC;
+ verbose=0;
+ bufsize = 0;
+ duration=DEFDURATION;
+ verify=0;
+
+
+ // Extract paramters from command line.
+ //
+ // Command Line : port, verbose
+ sscanf(parameters, "%s %s %d %d %d %d %d %d %d %d",
+ &testName, &hostAddr, &verbose, &duration, &verify, &start, &end, &inc, &bufsize, &port);
+
+ // Verify that the paramaters are reasonable
+ if (start > end)
+ {
+ SendResultData("Start MUST be LESS than end %d %d\n", start, end);
+ return ERROR;
+ }
+
+ SendResultData ("%s hostAddr(%s) verbose(%d) duration(%d) verify(%d) start(%d) end(%d) inc(%d) bufsize(%d) port(%d)\n",
+ testName, hostAddr, verbose, duration, verify, start, end, inc, bufsize, port);
+
+ // If this is a timed test then start the timer.
+ if (duration)
+ {
+ SetTimer(duration);
+ }
+
+ // Spawn a task to do the sending and receiving of data.
+ // The function called is a static function
+ // of diagnostic. Since the object needs an instance to access data
+ // members and non-static functions, the this pointer is passed as an argument.
+ taskId = taskSpawn("NetTstTrn", DIAGNOSTIC_TEST_TASK_PRI, 0,
+ DIAGNOSTIC_TEST_STACK_SIZE,
+ (FUNCPTR) NetworkTestTransmit::NetTestTransmit,
+ (int)this, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
+
+ if ( taskId == ERROR )
+ {
+ SendResultData("NetworkTestTransmit:Unable to create Task %d", taskId);
+ return ERROR;
+ }
+
+ return OK;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestTransmit::ProcessMessage
+**
+** PURPOSE: Process messages not handled by Diagnostic base class.
+**
+** INPUT PARAMETERS: diagMsg - message sent to diagnostic
+**
+** RETURN VALUE(S): CONTINUE_TEST - if the controlling message loop should continue
+** STOP_TEST - if the controlling message loop should end
+**
+**----------------------------------------------------------------------------*/
+int NetworkTestTransmit::ProcessMessage(DiagnosticMsgType diagMsg)
+{
+ switch ( diagMsg.func )
+ {
+ }
+ return CONTINUE_TEST;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestTransmit::TerminateDiagnostic
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int NetworkTestTransmit::TerminateDiagnostic(void)
+{
+ SendResultData("NetworkTestTransmit Complete!\n");
+
+ taskDelete(taskId);
+ CleanUpTransmit(&args);
+
+ if (args.buff)
+ free(args.buff);
+
+ if (args.buff1)
+ free(args.buff1);
+
+ SendResultData("Total Packets Transmitted (%d) Total Errors (%d)\n",
+ totalPkts, totalErrors);
+ return OK;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestTransmit::NetTestTransmit
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): status -
+**
+**----------------------------------------------------------------------------*/
+int NetworkTestTransmit::NetTestTransmit(int thisPtr)
+{
+ // Grab a pointer to the network test object.
+ NetworkTestTransmit *pNetTest = (NetworkTestTransmit *)thisPtr;
+
+ int i, j, n, /* Loop indices */
+ nrepeat, /* Number of time to do the transmission */
+ len, /* Number of bytes to be transmitted */
+ pert, /* Perturbation value */
+ currPattern;
+
+ double t, t0, /* Time variables */
+ tlast, /* Time for the last transmission */
+ tzero=0,
+ latency, /* Network message latency */
+ bps,
+ bits;
+
+
+ currPattern = 0;
+
+ pNetTest->args.prot.sndbufsz = pNetTest->bufsize;
+ pNetTest->args.prot.rcvbufsz = pNetTest->bufsize;
+
+ pNetTest->args.nbuff = TRIALS;
+ pNetTest->args.port = pNetTest->port;
+
+ pNetTest->args.host = pNetTest->hostAddr;
+
+ pNetTest->SetupTransmit(&pNetTest->args);
+ pNetTest->EstablishTransmit(&pNetTest->args);
+
+ pNetTest->totalPkts = pNetTest->totalErrors = 0;
+
+ while (1)
+ {
+ pNetTest->args.bufflen = 1;
+ pNetTest->args.buff = (char *)malloc(pNetTest->args.bufflen);
+ pNetTest->args.buff1 = (char *)malloc(pNetTest->args.bufflen);
+ pNetTest->SyncTransmit(&pNetTest->args);
+
+ t0 = pNetTest->When();
+ t0 = pNetTest->When();
+ t0 = pNetTest->When();
+ t0 = pNetTest->When();
+ for (i = 0; i < LATENCYREPS; i++)
+ {
+ pNetTest->SendDataTransmit(&pNetTest->args);
+ pNetTest->RecvDataTransmit(&pNetTest->args);
+ }
+
+ latency = (pNetTest->When() - t0)/(2 * LATENCYREPS);
+ free(pNetTest->args.buff);
+ pNetTest->args.buff = 0;
+ free(pNetTest->args.buff1);
+ pNetTest->args.buff1 = 0;
+
+ if (pNetTest->verbose)
+ {
+ pNetTest->SendResultData("Latency: %lf\n", latency);
+ pNetTest->SendResultData("Now starting main loop\n");
+ }
+ tlast = latency;
+ if (pNetTest->inc == 0)
+ {
+ /* Set a starting value for the message size increment. */
+ pNetTest->inc = (pNetTest->start > 1) ? pNetTest->start / 2 : 1;
+ }
+
+ /* Main loop of benchmark */
+ for (n = 0, len = pNetTest->start;
+ n < NSAMP - 3 && len <= pNetTest->end;
+ len = len + pNetTest->inc)
+ {
+ /* This is a perturbation loop to test nearby values */
+ for (pert = (pNetTest->inc > PERT+1)? -PERT: 0;
+ pert <= PERT;
+ n++, pert += (pNetTest->inc > PERT+1)? PERT: PERT+1)
+ {
+
+ /* Calculate howmany times to repeat the experiment. */
+ nrepeat = (int)MAX((RUNTM / (((double)(((len + pert) <= 0)? 1: (len + pert)) /
+ (double)pNetTest->args.bufflen) * tlast)),
+ TRIALS);
+ pNetTest->SendRepeatTransmit(&pNetTest->args, nrepeat);
+
+ /* Allocate the buffer */
+ pNetTest->args.bufflen = ((len + pert) <= 0)? 1: (len + pert);
+ if((pNetTest->args.buff=(char *)malloc(pNetTest->args.bufflen))==(char *)NULL)
+ {
+ pNetTest->SendResultData("Couldn't allocate memory\n");
+ break;
+ }
+
+ if (pNetTest->verify)
+ pNetTest->FillTestPattern(pNetTest->args.buff, pNetTest->args.bufflen,
+ (currPattern >= MAX_PATTERNS) ? currPattern=0 : currPattern++);
+
+ if((pNetTest->args.buff1=(char *)malloc(pNetTest->args.bufflen))==(char *)NULL)
+ {
+ pNetTest->SendResultData("Couldn't allocate memory\n");
+ break;
+ }
+
+ /* Finally, we get to transmit and time */
+ if (pNetTest->verbose)
+ pNetTest->SendResultData("%3d: %9d bytes %4d times --> ",
+ n,pNetTest->args.bufflen,nrepeat);
+ /*
+ This is the transmitter: send the block TRIALS times, and
+ expect the receiver to return each block.
+ */
+ tlast = LONGTIME;
+ for (i = 0; i < 3; i++)
+ {
+ pNetTest->SyncTransmit(&pNetTest->args);
+ t0 = pNetTest->When();
+ for (j = 0; j < nrepeat; j++)
+ {
+ pNetTest->SendDataTransmit(&pNetTest->args);
+ pNetTest->RecvDataTransmit(&pNetTest->args);
+ pNetTest->totalPkts++;
+ if (pNetTest->verify)
+ {
+ if (pNetTest->VerifyData())
+ pNetTest->totalErrors++;
+ }
+ }
+ t = (pNetTest->When() - t0)/(2 * nrepeat);
+
+ tlast = MIN(tlast, t);
+ }
+
+ bits = pNetTest->args.bufflen * CHARSIZE;
+ bps = bits / (tlast * 1024 * 1024);
+
+ if (pNetTest->verbose)
+ pNetTest->SendResultData(" %6.2lf Mbps in %lf sec\n",
+ bps,tlast);
+
+ free(pNetTest->args.buff);
+ pNetTest->args.buff = 0;
+ free(pNetTest->args.buff1);
+ pNetTest->args.buff1 = 0;
+
+ } /* End of perturbation loop */
+ } /* End of main loop */
+ } /* Loop forever */
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestTransmit::When
+**
+** PURPOSE: Return the current time in seconds, using a double precision
+** number.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): current time in seconds
+**
+**----------------------------------------------------------------------------*/
+double NetworkTestTransmit::When()
+{
+ struct timespec tp;
+ clock_gettime(CLOCK_REALTIME, &tp);
+ return ((double) tp.tv_sec + (double) tp.tv_nsec * 1e-9);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestTransmit::SetupTransmit
+**
+** PURPOSE: Setup the socket to act as the server for the test.
+**
+** INPUT PARAMETERS: p - pointer to test arguments
+**
+** RETURN VALUE(S): status - OK if successful
+** ERROR if setup failed
+**----------------------------------------------------------------------------*/
+int NetworkTestTransmit::SetupTransmit(ArgStruct *p)
+{
+
+ int one = 1;
+ int sockfd;
+ struct sockaddr_in *lsin1, *lsin2; /* ptr to sockaddr_in in ArgStruct */
+ struct hostent *addr;
+ char * host;
+
+ host = p->host;
+
+ lsin1 = &(p->prot.sin1);
+ lsin2 = &(p->prot.sin2);
+
+ bzero((char *) lsin1, sizeof(*lsin1));
+ bzero((char *) lsin2, sizeof(*lsin2));
+
+ if ( (sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
+ {
+ SendResultData("server: can't open stream socket");
+ return(ERROR);
+ }
+
+ /* Attempt to set TCP_NODELAY */
+ if(setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (char *)&one, sizeof(one)) < 0)
+ {
+ SendResultData("setsockopt: nodelay\n");
+ return(ERROR);
+ }
+
+ /* If requested, set the send and receive buffer sizes */
+ if(p->prot.sndbufsz > 0)
+ {
+ SendResultData("Send and Receive Buffers set to %d bytes\n", p->prot.sndbufsz);
+ if(setsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, (char *)&(p->prot.sndbufsz),
+ sizeof(p->prot.sndbufsz)) < 0)
+ {
+ SendResultData("setsockopt: sndbuf\n");
+ return(ERROR);
+ }
+ if(setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF, (char *)&(p->prot.rcvbufsz),
+ sizeof(p->prot.rcvbufsz)) < 0)
+ {
+ SendResultData("setsockopt: rcvbuf\n");
+ return(ERROR);
+ }
+ }
+
+ if (atoi(host) > 0)
+ { /* Numerical IP address */
+ lsin1->sin_family = AF_INET;
+ lsin1->sin_addr.s_addr = inet_addr(host);
+ }
+
+ lsin1->sin_port = htons(p->port);
+
+ p->commfd = sockfd;
+
+ return(OK);
+
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestTransmit::SyncTransmit
+**
+** PURPOSE: Synchronize with the other end of the connection.
+**
+** INPUT PARAMETERS: p - pointer to test arguments
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void NetworkTestTransmit::SyncTransmit(ArgStruct *p)
+{
+ char s[] = "SyncMe";
+ char response[7];
+
+ if (send(p->commfd, s, strlen(s), 0) < 0 ||
+ ReadFully(p->commfd, response, strlen(s)) < 0)
+ {
+ SendResultData("Transmit: error writing or reading synchronization string");
+ SendStopMsg();
+ }
+ if (strncmp(s, response, strlen(s)))
+ {
+ SendResultData("Transmit: Synchronization string incorrect!\n");
+ SendStopMsg();
+ }
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestTransmit::SendDataTransmit
+**
+** PURPOSE: Send date to the other end of the connection.
+**
+** INPUT PARAMETERS: p - pointer to test arguments
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void NetworkTestTransmit::SendDataTransmit(ArgStruct *p)
+{
+ int bytesWritten, bytesLeft;
+ char *q;
+
+ bytesLeft = p->bufflen;
+ bytesWritten = 0;
+ q = p->buff;
+ while (bytesLeft > 0 &&
+ (bytesWritten = send(p->commfd, q, bytesLeft, 0)) > 0)
+ {
+ bytesLeft -= bytesWritten;
+ q += bytesWritten;
+ }
+ if (bytesWritten == -1)
+ {
+ SendResultData("Transmit: send: error encountered, errno=%d\n", errno);
+ SendStopMsg();
+ }
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestTransmit::RecvDataTransmit
+**
+** PURPOSE: Receive data from the other end of the connection.
+**
+** INPUT PARAMETERS: p - pointer to test arguments
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void NetworkTestTransmit::RecvDataTransmit(ArgStruct *p)
+{
+ int bytesLeft;
+ int bytesRead;
+ char *q;
+
+ bytesLeft = p->bufflen;
+ bytesRead = 0;
+ q = p->buff1;
+ while (bytesLeft > 0 &&
+ (bytesRead = recv(p->commfd, q, bytesLeft, 0)) > 0)
+ {
+ bytesLeft -= bytesRead;
+ q += bytesRead;
+ }
+ if (bytesLeft > 0 && bytesRead == 0)
+ {
+ SendResultData("Transmit: \"end of file\" encountered on reading from socket\n");
+ }
+ else if (bytesRead == -1)
+ {
+ SendResultData("Transmit: read: error encountered, errno=%d\n", errno);
+ SendStopMsg();
+ }
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestTransmit::SendRepeatTransmit
+**
+** PURPOSE: Send the repeat count to the other end of the connection.
+**
+** INPUT PARAMETERS: p - pointer to test arguments
+** rpt - repeat count
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void NetworkTestTransmit::SendRepeatTransmit(ArgStruct *p, int rpt)
+{
+ unsigned long lrpt, nrpt;
+
+ lrpt = rpt;
+ /* Send repeat count as a long in network order */
+ nrpt = htonl(lrpt);
+ if (send(p->commfd, (char *) &nrpt, sizeof(unsigned long), 0) < 0)
+ {
+ SendResultData("Transmit: send failed in SendRepeat: errno=%d\n", errno);
+ SendStopMsg();
+ }
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestTransmit::EstablishTransmit
+**
+** PURPOSE: Accept a connection from a client.
+**
+** INPUT PARAMETERS: p - pointer to test arguments
+**
+** RETURN VALUE(S): status - OK if establish successful
+** ERROR if establish failed
+**----------------------------------------------------------------------------*/
+int NetworkTestTransmit::EstablishTransmit(ArgStruct *p)
+{
+ if(connect(p->commfd, (struct sockaddr *) &(p->prot.sin1),
+ sizeof(p->prot.sin1)) < 0)
+ {
+ SendResultData("Transmit: Cannot Connect! errno=%d\n",errno);
+ SendStopMsg();
+ return(ERROR);
+ }
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestTransmit::CleanUpTransmit
+**
+** PURPOSE: Cleanup sockets used for this test.
+**
+** INPUT PARAMETERS: p - pointer to test arguments
+**
+** RETURN VALUE(S): status - OK if cleanup successful
+** ERROR if cleanup failed
+**----------------------------------------------------------------------------*/
+int NetworkTestTransmit::CleanUpTransmit(ArgStruct *p)
+{
+ char *quit="QUIT";
+ send(p->commfd,quit, 5,0);
+ recv(p->commfd,quit,5,0);
+ close(p->commfd);
+ return(OK);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestTransmit::GetDiagnosticHelp
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): help string
+**
+**----------------------------------------------------------------------------*/
+char *NetworkTestTransmit::GetDiagnosticHelp(void)
+{
+ return (
+ "NetworkTestTransmit\n\n"
+ "Test the integrity and throughput of the network connection. Must use this"
+ "test in conjunction with NetworkTestServer or external client.\n\n"
+ "Parameters - host verbose duration verify start end inc bufsize port\n"
+ "\thost - host ip address (e.g. 10.1.2.111)\n"
+ "\tverbose - If non-zero show individual error occurences.\n"
+ "\tduration - Time in seconds to run test (DEFAULT 60)\n"
+ "\tverify - verify any errors in the transmitted data (DEFAULT 0)\n"
+ "\tstart - lower bound start value (DEFAULT 1024)\n"
+ "\tend - upper bound stop value (DEFAULT 4096)\n"
+ "\tinc - specify increment step size (DEFAULT 1024)\n"
+ "\tbufsize - size of receive and send buffers (DEFAULT OS default)\n"
+ "\tport - port number to listen to (DEFAULT 3456)\n"
+ "Returns - Number of error packets\n"
+ );
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestTransmit::SendStopMsg
+**
+** PURPOSE: Send a message to parent task to stop network test.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**----------------------------------------------------------------------------*/
+void NetworkTestTransmit::SendStopMsg(void)
+{
+ // Send a message to stop the test.
+ DiagnosticMsgType diagMsg;
+
+ // Initialize the diagnostic message.
+ diagMsg.func = DIAG_TEST_INTERNAL_STOP_TEST;
+
+ msgQSend(diagQId,
+ (char *)&diagMsg,
+ sizeof(DiagnosticMsgType),
+ WAIT_FOREVER,
+ MSG_PRI_NORMAL);
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestTransmit::ReadFully
+**
+** PURPOSE: Read data from specified socket.
+**
+** INPUT PARAMETERS: fd - file descriptor for socket
+** obuf - pointer to buffer to be filled
+** len - number of bytes to receive
+**
+** RETURN VALUE(S): for success - number of bytes read
+** for failure - ERROR
+**----------------------------------------------------------------------------*/
+int NetworkTestTransmit::ReadFully(int fd, char *obuf, int len)
+{
+ int bytesLeft = len;
+ char *buf = obuf;
+ int bytesRead = 0;
+
+ while (bytesLeft > 0 &&
+ (bytesRead = recv(fd, buf, bytesLeft, 0)) > 0)
+ {
+ bytesLeft -= bytesRead;
+ buf += bytesRead;
+ }
+ if (bytesRead <= 0)
+ return bytesRead;
+ return len;
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestTransmit::FillTestPattern
+**
+** PURPOSE: Fill up a buffer with the given test pattern.
+**
+** INPUT PARAMETERS: buf - pointer to buffer to be filled
+** bufLen - number of bytes to fill
+** patternIndx - selected pattern
+**
+** RETURN VALUE(S): none
+**----------------------------------------------------------------------------*/
+void NetworkTestTransmit::FillTestPattern (char *buf, int bufLen,
+ int patternIndx)
+{
+ char *p = buf;
+
+ int i = 0;
+ while (bufLen)
+ {
+ *p++ = TestPatterns[patternIndx][i++];
+ bufLen--;
+ if (i >= NUM_PATTERN_BYTES)
+ i = 0;
+ }
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: NetworkTestTransmit::VerifyData
+**
+** PURPOSE: Verify that the transmitted data matches the received data.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): 0 - no errors
+** 1 - errors detected
+**----------------------------------------------------------------------------*/
+int NetworkTestTransmit::VerifyData ()
+{
+ for (int i = 0; i < args.bufflen; i++)
+ {
+ if (args.buff[i] != (char)(~args.buff1[i]))
+ {
+ return 1;
+ }
+ }
+ return 0;
+}
diff --git a/data/mnet/GP10/Host/Mch/src/dspTest.cpp b/data/mnet/GP10/Host/Mch/src/dspTest.cpp
new file mode 100644
index 0000000..9d8b73e
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/src/dspTest.cpp
@@ -0,0 +1,280 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+/*******************************************************************************
+DSP Test Messages
+*/
+#include <vxWorks.h>
+#include <stdio.h>
+#include <semLib.h>
+#include <taskLib.h>
+
+#include "dsp/dsptypes.h"
+#include "dsp/dsphmsg.h"
+#include "DspDiags.h"
+
+#define L1P_WRITE_H2L_4BYTES(x,y) *y = x, *(y+1) = (x >> 8), *(y+2) = (x >> 16), *(y+3) = (x >> 24)
+
+#define TIMEOUT 100
+
+#define SIZE_INDEX 0
+#define FUNCTION_INDEX 4
+#define TYPE_HI_BYTE_INDEX 5
+#define TYPE_LO_BYTE_INDEX 6
+#define TRX_INDEX 7
+
+#define MSG_HEADER_SIZE 8
+
+#define GENERATE_TONE_MSG_SIZE (MSG_HEADER_SIZE + 2)
+#define MEASURE_TONE_MSG_SIZE (MSG_HEADER_SIZE + 0)
+#define MEM_TEST_MSG_SIZE (MSG_HEADER_SIZE + 1)
+
+typedef enum
+{
+ LoopbackTest,
+ MemoryTest
+} t_dspTest;
+
+int dspDestinationDSP = 0;
+int dspTestInProgress = FALSE;
+t_dspTest dspTest;
+
+void sendDsp(unsigned char *buffer, int len);
+
+/*******************************************************************************
+dspBBLoopbackTest - DSP baseband Loopback Test
+
+Sends messages to DSPs to generate tones and receive the measurement.
+Before sending the message, loads the DSPs with the given file to excute a
+special test program.
+After starting the test it blocks till it is informed that a responce was
+received from or it times out.
+
+*/
+void DSPBBLoopbackTest::dspBBLoopbackTest
+(
+ int srcDsp, /* DSP that genrates the tone */
+ int dstDsp, /* DSP that measures the tone */
+ int freqIndex, /* Index of the tone to be generated */
+ int gainShift, /* Represents the # of right bit shifts */
+ int verbose /* verbose=1 => debug messages sent, =0 => not msgs sent */
+)
+
+{
+ unsigned char msg[max(GENERATE_TONE_MSG_SIZE,MEASURE_TONE_MSG_SIZE)];
+ int i;
+
+ if (dspTestInProgress == TRUE)
+ return;
+ else
+ dspTestInProgress = TRUE;
+
+ dspTest = LoopbackTest;
+
+ L1P_WRITE_H2L_4BYTES(GENERATE_TONE_MSG_SIZE, &msg[SIZE_INDEX]);
+ msg[FUNCTION_INDEX] = DIAGNOSTIC_MSG;
+ msg[TYPE_HI_BYTE_INDEX] = MPH_DSP_GENERATE_TONE_REQ >> 8;
+ msg[TYPE_LO_BYTE_INDEX] = MPH_DSP_GENERATE_TONE_REQ & 0xFF;
+ msg[TRX_INDEX] = src;
+ msg[MSG_HEADER_SIZE + 0] = (char)freqIndex;
+ msg[MSG_HEADER_SIZE + 1] = (char)gainShift;
+ sendDsp(msg, GENERATE_TONE_MSG_SIZE);
+
+ if ( verbose == TRUE )
+ {
+ for ( i=0; i<GENERATE_TONE_MSG_SIZE; i++ )
+ SendResultData("%x ",msg[i]);
+
+ SendResultData("sendDsp(msg, GENERATE_TONE_MSG_SIZE) - Cmd #1\n");
+ }
+
+ dspDestinationDSP = dst;
+}
+
+/*******************************************************************************
+dspBBLoopbackTest - DSP baseband Loopback Test2
+
+Sends message to DSPs to receive the measurement.
+
+*/
+void DSPBBLoopbackTest::dspBBLoopbackTest2
+(
+ int verbose /* verbose=1 => debug messages sent, =0 => not msgs sent */
+)
+
+{
+ unsigned char msg[max(GENERATE_TONE_MSG_SIZE,MEASURE_TONE_MSG_SIZE)];
+ int i;
+
+ L1P_WRITE_H2L_4BYTES(MEASURE_TONE_MSG_SIZE, &msg[SIZE_INDEX]);
+ msg[FUNCTION_INDEX] = DIAGNOSTIC_MSG;
+ msg[TYPE_HI_BYTE_INDEX] = MPH_DSP_MEASURE_TONE_REQ >> 8;
+ msg[TYPE_LO_BYTE_INDEX] = MPH_DSP_MEASURE_TONE_REQ & 0xFF;
+ msg[TRX_INDEX] = dspDestinationDSP;
+
+ sendDsp(msg, MEASURE_TONE_MSG_SIZE);
+
+ if ( verbose == TRUE )
+ {
+ for ( i=0; i<MEASURE_TONE_MSG_SIZE; i++ )
+ SendResultData("%x ",msg[i]);
+
+ SendResultData("sendDsp(msg, MEASURE_TONE_MSG_SIZE) - Cmd #2\n");
+ }
+}
+
+
+/*******************************************************************************
+dspExtMemTest - DSP External Memory Test
+
+Sends a message to DSP to perform external memory test.
+Before sending the message, loads the DSPs with the given file to excute a
+special test program.
+After starting the test it blocks till it is informed that a responce was
+received from or it times out.
+*/
+void DSPExtMemTest::dspExtMemTest
+(
+ int dspNum, /* IN: dsp number */
+ int testType, /* IN: test type */
+ int verbose /* verbose=1 => debug messages sent, =0 => not msgs sent */
+)
+{
+ unsigned char msg[MEM_TEST_MSG_SIZE];
+ int i;
+
+ if (dspTestInProgress == TRUE)
+ return;
+ else
+ dspTestInProgress = TRUE;
+
+ dspTest = MemoryTest;
+
+ L1P_WRITE_H2L_4BYTES(MEM_TEST_MSG_SIZE, &msg[SIZE_INDEX]);
+ msg[FUNCTION_INDEX] = DIAGNOSTIC_MSG;
+ msg[TYPE_HI_BYTE_INDEX] = MPH_DSP_EXT_MEM_CHECK_REQ >> 8;
+ msg[TYPE_LO_BYTE_INDEX] = MPH_DSP_EXT_MEM_CHECK_REQ & 0xFF;
+ msg[TRX_INDEX] = dspNum;
+ msg[MSG_HEADER_SIZE + 0] = testType;
+
+ sendDsp(msg, MEM_TEST_MSG_SIZE);
+
+ if ( verbose == TRUE )
+ {
+ for ( i=0; i<MEASURE_TONE_MSG_SIZE; i++ )
+ SendResultData("%x ",msg[i]);
+
+ SendResultData("sendDsp(msg, MEM_TEST_MSG_SIZE)\n");
+ }
+}
+
+
+#define L1P_READ_H2L_4BYTES(x) (((int)*x << 24) | \
+ ((int)*(x+1) << 16) | \
+ ((int)*(x+2) << 8) | \
+ ((int)*(x+3)))
+
+
+/*******************************************************************************
+read4h2lBytes - read 4 high to low byes
+
+reads 4bytes that are in high to low order and returns the integer
+*/
+static int read4h2lBytes(char *x)
+{
+ int retVal;
+
+ retVal = (((*x)<<24) | (*(x+1)<<16) | (*(x+2)<<8) | (*(x+3)));
+ return retVal;
+}
+
+
+/*******************************************************************************
+dspToneMeasureRsp - DSP Tone Measurement Response
+
+Receives result of tone Measurement from DSP
+*/
+void DSPBBLoopbackTest::dspToneMeasureRsp
+(
+ unsigned char data[], /* IN: Response */
+ int verbose /* verbose=1 => debug messages sent, =0 => not msgs sent */
+)
+{
+ unsigned char *pData = data;
+ int error;
+ int i;
+ int result[8];
+
+ if (dspTestInProgress != TRUE)
+ return;
+
+ if (dspTest != LoopbackTest)
+ return;
+
+ error = FALSE;
+ for (i = 0; i < 8; i++)
+ {
+ result[i] = L1P_READ_H2L_4BYTES(pData);
+ pData += 4;
+ }
+
+ SendResultData("DSP Baseband Loopback Measurement:");
+ for (i = 0; i < 7; i++)
+ SendResultData(" %d,", result[i]);
+ SendResultData(" %d\n", result[7]);
+
+ dspTestInProgress = FALSE;
+}
+
+
+/*******************************************************************************
+dspExtMemTestRsp - DSP External Memory Test Response
+
+Receives result of external memory test from DSP
+*/
+void DSPExtMemTest::dspExtMemTestRsp
+(
+ unsigned char data[] /* IN: Response */
+)
+{
+ if (dspTestInProgress != TRUE)
+ return;
+
+ if (dspTest != MemoryTest)
+ return;
+
+ numErrors += L1P_READ_H2L_4BYTES(data);
+ dspTestInProgress = FALSE;
+}
+
+/*******************************************************************************
+dspExtMemErrorRsp - DSP External Memory Error Response
+
+Receives result of external memory test error reports from DSP
+*/
+void DSPExtMemTest::dspExtMemErrorRsp
+(
+ unsigned char data[] /* IN: Response */
+)
+{
+ int memAddr;
+ int dataWrote;
+ int dataRead;
+
+ if (dspTestInProgress != TRUE)
+ return;
+
+ if (dspTest != MemoryTest)
+ return;
+
+ memAddr = L1P_READ_H2L_4BYTES(&data[4]);
+ dataWrote = (data[8] << 8) | (data[9]);
+ dataRead = (data[10] << 8) | (data[11]);
+
+ SendResultData("DSP External Memory Test: Error at address %08x, "
+ "wrote %04x, read %04x\n", memAddr, dataWrote, dataRead);
+}
diff --git a/data/mnet/GP10/Host/Mch/src_api/MCHIntf.cpp b/data/mnet/GP10/Host/Mch/src_api/MCHIntf.cpp
new file mode 100644
index 0000000..2931e70
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/src_api/MCHIntf.cpp
@@ -0,0 +1,176 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MCHIntf.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/29/99
+// Description :
+//
+// *******************************************************************
+#include <msgQLib.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "MCHTask.h"
+#include "MCHInit.h"
+#include "logging\vcmodules.h"
+#include "logging\vclogging.h"
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DiagSendMSReportMsg
+**
+** PURPOSE: Send the DSP report to the Maintenance Command Handler.
+**
+** INPUT PARAMETERS: sndMsg - message to send to diagnostics
+** msgLen - length of the message
+** func - function code to send to diagnostics
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void DiagSendMsg(char *sndMsg, int msgLen, int func)
+{
+ DBG_FUNC("DiagSendMSReportMsg",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ int rtnStat;
+
+ // Create the message to send to the maintenance command handler.
+ MCHMessageType msg;
+ bzero ((char *)&msg, sizeof(MCHMessageType));
+
+ if (msgLen > MAX_DIAGNOSTIC_MSG)
+ {
+ msgLen = MAX_DIAGNOSTIC_MSG;
+ }
+
+ // Fill in message.
+ msg.func = MCH_DIAG_SPECIFIC_MSG;
+ msg.diagMsg.func = func;
+ msg.diagMsg.msgLen = msgLen;
+ bcopy(sndMsg, msg.diagMsg.msgBody, msgLen);
+
+ // Send message to maintenance command handler.
+ if ((rtnStat = msgQSend (MCHMsgQId,
+ (char *)&msg,
+ sizeof(MCHMessageType),
+ NO_WAIT,
+ MSG_PRI_NORMAL)) == ERROR)
+ {
+ DBG_WARNING ("Error sending message %x\n", rtnStat);
+ }
+ DBG_LEAVE();
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MaintCmd
+**
+** PURPOSE: MaintCmd should be used from the shell to initiate maintenance
+** functionality. All parameters are passed in as a string. The
+** diagnostics will parse the strings as required.
+**
+** INPUT PARAMETERS: commLine - maintenance command in ASCII
+**
+** RETURN VALUE(S): status - OK for success, ERROR for failure
+**
+**----------------------------------------------------------------------------*/
+
+int MaintCmd(char *commLine)
+{
+ DBG_FUNC("MaintCmd",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ int rtnStat = OK;
+
+ // Create the message to send to the maintenance command handler.
+ MCHMessageType msg;
+ bzero ((char *)&msg, sizeof(MCHMessageType));
+
+ // Let the maintenance command handler know the request was from a
+ // terminal type device.
+ msg.func = MCH_TERMINAL_REQ;
+
+ // If command is not NULL then copy the command into the message.
+ if (commLine)
+ {
+ strncpy (msg.commLine, commLine, MCH_MAX_COMMAND_LEN);
+ }
+
+ // Send message to maintenance command handler.
+ if ((rtnStat = msgQSend (MCHMsgQId,
+ (char *)&msg,
+ sizeof(MCHMessageType),
+ WAIT_FOREVER,
+ MSG_PRI_NORMAL)) == ERROR)
+ {
+ DBG_WARNING ("Error sending message %x\n", rtnStat);
+ }
+
+ DBG_LEAVE();
+ return rtnStat;
+}
+
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: MaintCmdTcpServer
+**
+** PURPOSE: MaintCmd should be used from the shell to initiate maintenance
+** functionality. All parameters are passed in as a string. The
+** diagnostics will parse the strings as required.
+**
+** INPUT PARAMETERS: commLine - maintenance command in ASCII
+** size - size of command line
+** clientId - unique id for sending client
+**
+** RETURN VALUE(S): status - OK for success, ERROR for failure
+**
+**----------------------------------------------------------------------------*/
+
+void MaintCmdTcpServer(char *commLine, short size, unsigned long clientId)
+{
+ DBG_FUNC("MaintCmdTcpServer",MAINT_COMM_HDLR);
+ DBG_ENTER();
+
+ int rtnStat = OK;
+
+ // Create the message to send to the maintenance command handler.
+ MCHMessageType msg;
+ bzero ((char *)&msg, sizeof(MCHMessageType));
+
+ // Let the maintenance command handler know the request was from a
+ // network type device.
+ msg.func = MCH_NETWORK_REQ;
+
+ // If command is not NULL then copy the command into the message.
+ if (commLine)
+ {
+ strncpy (msg.commLine, commLine, min(MCH_MAX_COMMAND_LEN, size));
+ }
+
+ // Send message to maintenance command handler.
+ if ((rtnStat = msgQSend (MCHMsgQId,
+ (char *)&msg,
+ sizeof(MCHMessageType),
+ WAIT_FOREVER,
+ MSG_PRI_NORMAL)) == ERROR)
+ {
+ DBG_WARNING ("Error sending message %x\n", rtnStat);
+ }
+
+ DBG_LEAVE();
+}
diff --git a/data/mnet/GP10/Host/Mch/src_api/Makefile b/data/mnet/GP10/Host/Mch/src_api/Makefile
new file mode 100644
index 0000000..e561718
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/src_api/Makefile
@@ -0,0 +1,53 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = Mch
+THIS_DIRECTORY = src_api
+MY_OUTPUT = $(OBJDIR)\mch_api.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ $(RM) ..\bin\*.out
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Mch/src_init/MCHInit.cpp b/data/mnet/GP10/Host/Mch/src_init/MCHInit.cpp
new file mode 100644
index 0000000..892e331
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/src_init/MCHInit.cpp
@@ -0,0 +1,24 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MCHInit.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/29/99
+// Description :
+//
+// *******************************************************************
+#include <msgQLib.h>
+
+#include "MCHTask.h"
+
+// Global variable for Message Queue
+MSG_Q_ID MCHMsgQId;
+MCHTask *MCHTask::theMCHTask = 0;
diff --git a/data/mnet/GP10/Host/Mch/src_init/Makefile b/data/mnet/GP10/Host/Mch/src_init/Makefile
new file mode 100644
index 0000000..0955ba0
--- /dev/null
+++ b/data/mnet/GP10/Host/Mch/src_init/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = Mch
+THIS_DIRECTORY = src_init
+MY_OUTPUT = $(OBJDIR)\mch_init.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Pm/makefile b/data/mnet/GP10/Host/Pm/makefile
new file mode 100644
index 0000000..22705b3
--- /dev/null
+++ b/data/mnet/GP10/Host/Pm/makefile
@@ -0,0 +1,16 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ $(CP) bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Pm/src/makefile b/data/mnet/GP10/Host/Pm/src/makefile
new file mode 100644
index 0000000..37017ef
--- /dev/null
+++ b/data/mnet/GP10/Host/Pm/src/makefile
@@ -0,0 +1,53 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = pm
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\$(THIS_APP_DIR).out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR = $(THIS_APP_DIR)
+REPLACE_LIST="src"
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY) REPLACE=$(REPLACE_LIST)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif
diff --git a/data/mnet/GP10/Host/Pm/src/pm_class.cpp b/data/mnet/GP10/Host/Pm/src/pm_class.cpp
new file mode 100644
index 0000000..735f384
--- /dev/null
+++ b/data/mnet/GP10/Host/Pm/src/pm_class.cpp
@@ -0,0 +1,730 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+//#include <vxWorks.h>
+//#include <semlib.h>
+#include <time.h>
+#include <wdlib.h>
+//#include <sysLib.h>
+//#include <taskLib.h>
+//#include <fioLib.h>
+
+#ifndef UNIT_TEST_PMCLASS
+#include "vipermib.h"
+#endif
+
+#include "defs.h"
+#include "apm/include/apmdefs.h"
+
+#include "apm/include/msgproc.h"
+
+#include "oam_api.h"
+#include "pm/pm_class.h"
+
+static bool initialized = false;
+/*
+ * Global variables
+ */
+static WDOG_ID g_pm_timer;
+static int g_timer_ticks_required;
+PmSourceToAmsMsg amsMsg;
+static unsigned long reqd_interval_in_secs;
+void pm_timer_handler(int arg);
+/*
+ * Storage allocation for the classes
+ */
+PM_CellMeasurmentPackage PM_CellMeasurement;
+PM_CallControlMeasurmentPackage PM_CCMeasurement;
+
+
+#define PM_SET_MIB_VALUE(x,y) if ((status=oam_setMibIntVar(MODULE_PM,x,y))!=STATUS_OK) { \
+ DBG_ERROR("Error setting PM value into MIB, error %d\n",status); \
+ }
+/***************************/
+
+/*
+ * pm_reset_all_counters
+ */
+
+void
+pm_reset_all_counters()
+{
+ /*
+ * reset all the counters for the current interval
+ * the PM_CellMeasurement package
+ */
+ PM_CellMeasurement.meanPCHAGCHQueueLength.reset();
+ PM_CellMeasurement.attTransOfPagingMessagesThePCH.reset();
+ PM_CellMeasurement.unsuccTransOfPagingMessagesThePCH.reset();
+ PM_CellMeasurement.attImmediateAssingProcs.reset();
+ PM_CellMeasurement.succImmediateAssingProcs.reset();
+ PM_CellMeasurement.attImmediateAssingProcsPerCauseTable.reset();
+ PM_CellMeasurement.succImmediateAssingProcsPerCauseTable.reset();
+ PM_CellMeasurement.nbrOfPagesDiscardedFromPCHQueue.reset();
+ PM_CellMeasurement.meanDurationOfSuccPagingProcs.reset();
+ PM_CellMeasurement.nbrOfAvailableTCHs.reset();
+ PM_CellMeasurement.meanNbrOfBusyTCHs.reset();
+ PM_CellMeasurement.maxNbrOfBusyTCHs.reset();
+ PM_CellMeasurement.meanNbrOfIdleTCHsPerInterferenceBand.reset();
+ PM_CellMeasurement.attTCHSeizures.reset();
+ PM_CellMeasurement.succTCHSeizures.reset();
+ PM_CellMeasurement.attTCHSeizuresMeetingTCHBlockedState.reset();
+ PM_CellMeasurement.allAvailableTCHAllocatedTime.reset();
+ PM_CellMeasurement.meanTCHBusyTime.reset();
+ PM_CellMeasurement.meanTCHQueueLength.reset();
+ PM_CellMeasurement.nbrOfLostRadioLinksTCH.reset();
+ PM_CellMeasurement.nbrOfAvailableSDCCHs.reset();
+ PM_CellMeasurement.meanNbrOfBusySDCCHs.reset();
+ PM_CellMeasurement.maxNbrOfBusySDCCHs.reset();
+ PM_CellMeasurement.attSDCCHSeizuresMeetingSDCCHBlockedState.reset();
+ PM_CellMeasurement.allAvailableSDCCHAllocatedTime.reset();
+ PM_CellMeasurement.meanSDCCHQueueLength.reset();
+ PM_CellMeasurement.nbrOfLostRadioLinksSDCCH.reset();
+ PM_CellMeasurement.relativeTimeDLPowerControlAtMax.reset();
+ PM_CellMeasurement.relativeTimeULPowerControlAtMax.reset();
+ PM_CellMeasurement.succInternalHDOsIntraCell.reset();
+ PM_CellMeasurement.unsuccInternalHDOsIntraCell.reset();
+
+
+ /*
+ * reset all the counters for the current interval
+ * the PM_CCMeasurement package
+ */
+ PM_CCMeasurement.nbrOfClassMarkUpdates.reset();
+ PM_CCMeasurement.attMobileOriginatingCalls.reset();
+ PM_CCMeasurement.succMobileOriginatingCalls.reset();
+ PM_CCMeasurement.ansMobileOriginatingCalls.reset();
+ PM_CCMeasurement.attMobileTerminatingCalls.reset();
+ PM_CCMeasurement.succMobileTerminatingCalls.reset();
+ PM_CCMeasurement.ansMobileTerminatingCalls.reset();
+ PM_CCMeasurement.attMobileEmergencyCalls.reset();
+ PM_CCMeasurement.succMobileEmergencyCalls.reset();
+ PM_CCMeasurement.ansMobileEmergencyCalls.reset();
+ PM_CCMeasurement.attCipheringModeControlProcs.reset();
+ PM_CCMeasurement.succCipheringModeControlProcs.reset();
+ PM_CCMeasurement.attInterrogationOfHLRsForRouting.reset();
+ PM_CCMeasurement.succInterrogationOfHLRsMSRNObtained.reset();
+ PM_CCMeasurement.succInterrogationOfHLRsCallForwarding.reset();
+ PM_CCMeasurement.attOpForMobileOriginatingPointToPointSMs.reset();
+ PM_CCMeasurement.succOpForMobileOriginatingPointToPointSMs.reset();
+ PM_CCMeasurement.attOpForMobileTerminatingPointToPointSMs.reset();
+ PM_CCMeasurement.succOpForMobileTerminatingPointToPointSMs.reset();
+ PM_CCMeasurement.meanTimeToCallSetupService.reset();
+ PM_CCMeasurement.meanTimeToLocationUpdateService.reset();
+ PM_CCMeasurement.transSubIdentifiedWithIMSI.reset();
+ PM_CCMeasurement.imsiDetachProcs.reset();
+ PM_CCMeasurement.imsiAttachProcs.reset();
+ PM_CCMeasurement.attIncomingInterMSCHDOs.reset();
+ PM_CCMeasurement.succIncomingInterMSCHDOs.reset();
+ PM_CCMeasurement.attOutgoingInterMSCHDOs.reset();
+ PM_CCMeasurement.succOutgoingInterMSCHDOs.reset();
+ PM_CCMeasurement.externalHDOsPerCauseTable.reset();
+ PM_CCMeasurement.unsuccExternHDOsWithReconnectionPerMSC.reset();
+ PM_CCMeasurement.unsuccExternHDOsWithLossOfConnectionPerMSC.reset();
+
+}
+
+/*
+ * pm_reset_all_counters
+ */
+
+void
+pm_advance_interval()
+{
+ int oldValue;
+ /*
+ * Advance the intervals for all the variables in
+ * the PM_CellMeasurement package
+ */
+ PM_CellMeasurement.meanPCHAGCHQueueLength.advanceInterval();
+ PM_CellMeasurement.attTransOfPagingMessagesThePCH.advanceInterval();
+ PM_CellMeasurement.unsuccTransOfPagingMessagesThePCH.advanceInterval();
+ PM_CellMeasurement.attImmediateAssingProcs.advanceInterval();
+ PM_CellMeasurement.succImmediateAssingProcs.advanceInterval();
+ PM_CellMeasurement.attImmediateAssingProcsPerCauseTable.advanceInterval();
+ PM_CellMeasurement.succImmediateAssingProcsPerCauseTable.advanceInterval();
+ PM_CellMeasurement.nbrOfPagesDiscardedFromPCHQueue.advanceInterval();
+ PM_CellMeasurement.meanDurationOfSuccPagingProcs.advanceInterval();
+ PM_CellMeasurement.meanDurationOfSuccPagingProcs.reset();
+
+ oldValue = PM_CellMeasurement.nbrOfAvailableTCHs.getValue();
+ PM_CellMeasurement.nbrOfAvailableTCHs.advanceInterval();
+ PM_CellMeasurement.nbrOfAvailableTCHs.setValue(oldValue);
+
+ PM_CellMeasurement.meanNbrOfBusyTCHs.advanceInterval();
+ PM_CellMeasurement.maxNbrOfBusyTCHs.advanceInterval();
+ PM_CellMeasurement.meanNbrOfIdleTCHsPerInterferenceBand.advanceInterval();
+ PM_CellMeasurement.attTCHSeizures.advanceInterval();
+ PM_CellMeasurement.succTCHSeizures.advanceInterval();
+ PM_CellMeasurement.attTCHSeizuresMeetingTCHBlockedState.advanceInterval();
+ PM_CellMeasurement.allAvailableTCHAllocatedTime.advanceInterval();
+
+ PM_CellMeasurement.meanTCHBusyTime.advanceInterval();
+ PM_CellMeasurement.meanTCHBusyTime.reset();
+
+ PM_CellMeasurement.meanTCHQueueLength.advanceInterval();
+ PM_CellMeasurement.nbrOfLostRadioLinksTCH.advanceInterval();
+
+ oldValue = PM_CellMeasurement.nbrOfAvailableSDCCHs.getValue();
+ PM_CellMeasurement.nbrOfAvailableSDCCHs.advanceInterval();
+ PM_CellMeasurement.nbrOfAvailableSDCCHs.setValue(oldValue);
+
+ PM_CellMeasurement.meanNbrOfBusySDCCHs.advanceInterval();
+ PM_CellMeasurement.maxNbrOfBusySDCCHs.advanceInterval();
+ PM_CellMeasurement.attSDCCHSeizuresMeetingSDCCHBlockedState.advanceInterval();
+ PM_CellMeasurement.allAvailableSDCCHAllocatedTime.advanceInterval();
+
+ PM_CellMeasurement.meanSDCCHQueueLength.advanceInterval();
+ PM_CellMeasurement.meanSDCCHQueueLength.reset();
+
+ PM_CellMeasurement.nbrOfLostRadioLinksSDCCH.advanceInterval();
+ PM_CellMeasurement.relativeTimeDLPowerControlAtMax.advanceInterval();
+ PM_CellMeasurement.relativeTimeULPowerControlAtMax.advanceInterval();
+ PM_CellMeasurement.succInternalHDOsIntraCell.advanceInterval();
+ PM_CellMeasurement.unsuccInternalHDOsIntraCell.advanceInterval();
+
+
+ /*
+ * Advance the intervals for all the variables in
+ * the PM_CCMeasurement package
+ */
+ PM_CCMeasurement.nbrOfClassMarkUpdates.advanceInterval();
+ PM_CCMeasurement.attMobileOriginatingCalls.advanceInterval();
+ PM_CCMeasurement.succMobileOriginatingCalls.advanceInterval();
+ PM_CCMeasurement.ansMobileOriginatingCalls.advanceInterval();
+ PM_CCMeasurement.attMobileTerminatingCalls.advanceInterval();
+ PM_CCMeasurement.succMobileTerminatingCalls.advanceInterval();
+ PM_CCMeasurement.ansMobileTerminatingCalls.advanceInterval();
+ PM_CCMeasurement.attMobileEmergencyCalls.advanceInterval();
+ PM_CCMeasurement.succMobileEmergencyCalls.advanceInterval();
+ PM_CCMeasurement.ansMobileEmergencyCalls.advanceInterval();
+ PM_CCMeasurement.attCipheringModeControlProcs.advanceInterval();
+ PM_CCMeasurement.succCipheringModeControlProcs.advanceInterval();
+ PM_CCMeasurement.attInterrogationOfHLRsForRouting.advanceInterval();
+ PM_CCMeasurement.succInterrogationOfHLRsMSRNObtained.advanceInterval();
+ PM_CCMeasurement.succInterrogationOfHLRsCallForwarding.advanceInterval();
+ PM_CCMeasurement.attOpForMobileOriginatingPointToPointSMs.advanceInterval();
+ PM_CCMeasurement.succOpForMobileOriginatingPointToPointSMs.advanceInterval();
+ PM_CCMeasurement.attOpForMobileTerminatingPointToPointSMs.advanceInterval();
+ PM_CCMeasurement.succOpForMobileTerminatingPointToPointSMs.advanceInterval();
+
+ PM_CCMeasurement.meanTimeToCallSetupService.advanceInterval();
+ PM_CCMeasurement.meanTimeToCallSetupService.reset();
+
+ PM_CCMeasurement.meanTimeToLocationUpdateService.advanceInterval();
+ PM_CCMeasurement.meanTimeToLocationUpdateService.reset();
+
+ PM_CCMeasurement.transSubIdentifiedWithIMSI.advanceInterval();
+ PM_CCMeasurement.imsiDetachProcs.advanceInterval();
+ PM_CCMeasurement.imsiAttachProcs.advanceInterval();
+ PM_CCMeasurement.attIncomingInterMSCHDOs.advanceInterval();
+ PM_CCMeasurement.succIncomingInterMSCHDOs.advanceInterval();
+ PM_CCMeasurement.attOutgoingInterMSCHDOs.advanceInterval();
+ PM_CCMeasurement.succOutgoingInterMSCHDOs.advanceInterval();
+ PM_CCMeasurement.externalHDOsPerCauseTable.advanceInterval();
+ PM_CCMeasurement.unsuccExternHDOsWithReconnectionPerMSC.advanceInterval();
+ PM_CCMeasurement.unsuccExternHDOsWithLossOfConnectionPerMSC.advanceInterval();
+}
+
+
+
+/*
+ * pm_update_mib
+ * Function for internal debugging purposes only
+ */
+/******************************/
+void
+pm_update_mib()
+{
+ DBG_FUNC("pm_update_mib",PM_LAYER);
+ DBG_ENTER();
+ STATUS status;
+ int i;
+ struct {
+ int cause_code;
+ int cause_value;
+ }pm_percause_mib_entry;
+ time_t long_time;
+
+
+ PM_SET_MIB_VALUE(MIB_meanPCHAGCHQueueLength,PM_CellMeasurement.meanPCHAGCHQueueLength.getMeanValue());
+ amsMsg.body.pmData.src.gp10PmData.meanPCHAGCHQueueLength =
+ htonl(PM_CellMeasurement.meanPCHAGCHQueueLength.getMeanValue());
+
+ PM_SET_MIB_VALUE(MIB_attTransOfPagingMessagesThePCH,PM_CellMeasurement.attTransOfPagingMessagesThePCH.getValue());
+ amsMsg.body.pmData.src.gp10PmData.attTransOfPagingMessagesThePCH =
+ htonl(PM_CellMeasurement.attTransOfPagingMessagesThePCH.getValue());
+
+ PM_SET_MIB_VALUE(MIB_unsuccTransOfPagingMessagesThePCH,PM_CellMeasurement.unsuccTransOfPagingMessagesThePCH.getValue());
+ amsMsg.body.pmData.src.gp10PmData.unsuccTransOfPagingMessagesThePCH =
+ htonl(PM_CellMeasurement.unsuccTransOfPagingMessagesThePCH.getValue());
+
+ PM_SET_MIB_VALUE(MIB_attImmediateAssingProcs,PM_CellMeasurement.attImmediateAssingProcs.getValue());
+ amsMsg.body.pmData.src.gp10PmData.attImmediateAssingProcs =
+ htonl(PM_CellMeasurement.attImmediateAssingProcs.getValue());
+
+ PM_SET_MIB_VALUE(MIB_succImmediateAssingProcs,PM_CellMeasurement.succImmediateAssingProcs.getValue());
+ amsMsg.body.pmData.src.gp10PmData.succImmediateAssingProcs =
+ htonl(PM_CellMeasurement.succImmediateAssingProcs.getValue());
+
+ PM_SET_MIB_VALUE(MIB_nbrOfPagesDiscardedFromPCHQueue,PM_CellMeasurement.nbrOfPagesDiscardedFromPCHQueue.getValue());
+ amsMsg.body.pmData.src.gp10PmData.nbrOfPagesDiscardedFromPCHQueue =
+ htonl(PM_CellMeasurement.nbrOfPagesDiscardedFromPCHQueue.getValue());
+
+ PM_SET_MIB_VALUE(MIB_meanDurationOfSuccPagingProcs,PM_CellMeasurement.meanDurationOfSuccPagingProcs.getMeanValue());
+ amsMsg.body.pmData.src.gp10PmData.meanDurationOfSuccPagingProcs =
+ htonl(PM_CellMeasurement.meanDurationOfSuccPagingProcs.getMeanValue());
+
+ PM_SET_MIB_VALUE(MIB_nbrOfAvailableTCHs,PM_CellMeasurement.nbrOfAvailableTCHs.getValue());
+ amsMsg.body.pmData.src.gp10PmData.nbrOfAvailableTCHs =
+ htonl(PM_CellMeasurement.nbrOfAvailableTCHs.getValue());
+
+ PM_SET_MIB_VALUE(MIB_meanNbrOfBusyTCHs,PM_CellMeasurement.meanNbrOfBusyTCHs.getMeanValue());
+ amsMsg.body.pmData.src.gp10PmData.meanNbrOfBusyTCHs =
+ htonl(PM_CellMeasurement.meanNbrOfBusyTCHs.getMeanValue());
+
+ PM_SET_MIB_VALUE(MIB_maxNbrOfBusyTCHs,PM_CellMeasurement.maxNbrOfBusyTCHs.getMaxValue());
+ amsMsg.body.pmData.src.gp10PmData.maxNbrOfBusyTCHs =
+ htonl(PM_CellMeasurement.maxNbrOfBusyTCHs.getMaxValue());
+
+ PM_SET_MIB_VALUE(MIB_meanNbrOfIdleTCHsPerInterferenceBand,PM_CellMeasurement.meanNbrOfIdleTCHsPerInterferenceBand.getMeanValue());
+ amsMsg.body.pmData.src.gp10PmData.meanNbrOfIdleTCHsPerInterferenceBand =
+ htonl(PM_CellMeasurement.meanNbrOfIdleTCHsPerInterferenceBand.getMeanValue());
+
+ PM_SET_MIB_VALUE(MIB_attTCHSeizures,PM_CellMeasurement.attTCHSeizures.getValue());
+ amsMsg.body.pmData.src.gp10PmData.attTCHSeizures =
+ htonl(PM_CellMeasurement.attTCHSeizures.getValue());
+
+ PM_SET_MIB_VALUE(MIB_succTCHSeizures,PM_CellMeasurement.succTCHSeizures.getValue());
+ amsMsg.body.pmData.src.gp10PmData.succTCHSeizures =
+ htonl(PM_CellMeasurement.succTCHSeizures.getValue());
+
+ PM_SET_MIB_VALUE(MIB_attTCHSeizuresMeetingTCHBlockedState,PM_CellMeasurement.attTCHSeizuresMeetingTCHBlockedState.getValue());
+ amsMsg.body.pmData.src.gp10PmData.attTCHSeizuresMeetingTCHBlockedState =
+ htonl(PM_CellMeasurement.attTCHSeizuresMeetingTCHBlockedState.getValue());
+
+ PM_SET_MIB_VALUE(MIB_allAvailableTCHAllocatedTime,PM_CellMeasurement.allAvailableTCHAllocatedTime.getValue());
+ amsMsg.body.pmData.src.gp10PmData.allAvailableTCHAllocatedTime =
+ htonl(PM_CellMeasurement.allAvailableTCHAllocatedTime.getValue());
+
+ PM_SET_MIB_VALUE(MIB_meanTCHBusyTime,PM_CellMeasurement.meanTCHBusyTime.getMeanValue());
+ amsMsg.body.pmData.src.gp10PmData.meanTCHBusyTime =
+ htonl(PM_CellMeasurement.meanTCHBusyTime.getMeanValue());
+
+ PM_SET_MIB_VALUE(MIB_meanTCHQueueLength,PM_CellMeasurement.meanTCHQueueLength.getMeanValue());
+ amsMsg.body.pmData.src.gp10PmData.meanTCHQueueLength =
+ htonl(PM_CellMeasurement.meanTCHQueueLength.getMeanValue());
+
+ PM_SET_MIB_VALUE(MIB_nbrOfLostRadioLinksTCH,PM_CellMeasurement.nbrOfLostRadioLinksTCH.getValue());
+ amsMsg.body.pmData.src.gp10PmData.nbrOfLostRadioLinksTCH =
+ htonl(PM_CellMeasurement.nbrOfLostRadioLinksTCH.getValue());
+
+ PM_SET_MIB_VALUE(MIB_nbrOfAvailableSDCCHs,PM_CellMeasurement.nbrOfAvailableSDCCHs.getValue());
+ amsMsg.body.pmData.src.gp10PmData.nbrOfAvailableSDCCHs =
+ htonl(PM_CellMeasurement.nbrOfAvailableSDCCHs.getValue());
+
+ PM_SET_MIB_VALUE(MIB_meanNbrOfBusySDCCHs,PM_CellMeasurement.meanNbrOfBusySDCCHs.getMeanValue());
+ amsMsg.body.pmData.src.gp10PmData.meanNbrOfBusySDCCHs =
+ htonl(PM_CellMeasurement.meanNbrOfBusySDCCHs.getMeanValue());
+
+ PM_SET_MIB_VALUE(MIB_maxNbrOfBusySDCCHs,PM_CellMeasurement.maxNbrOfBusySDCCHs.getMaxValue());
+ amsMsg.body.pmData.src.gp10PmData.maxNbrOfBusySDCCHs =
+ htonl(PM_CellMeasurement.maxNbrOfBusySDCCHs.getMaxValue());
+
+ PM_SET_MIB_VALUE(MIB_attSDCCHSeizuresMeetingSDCCHBlockedState,PM_CellMeasurement.attSDCCHSeizuresMeetingSDCCHBlockedState.getValue());
+ amsMsg.body.pmData.src.gp10PmData.attSDCCHSeizuresMeetingSDCCHBlockedState =
+ htonl(PM_CellMeasurement.attSDCCHSeizuresMeetingSDCCHBlockedState.getValue());
+
+ PM_SET_MIB_VALUE(MIB_allAvailableSDCCHAllocatedTime,PM_CellMeasurement.allAvailableSDCCHAllocatedTime.getValue());
+ amsMsg.body.pmData.src.gp10PmData.allAvailableSDCCHAllocatedTime =
+ htonl(PM_CellMeasurement.allAvailableSDCCHAllocatedTime.getValue());
+
+ PM_SET_MIB_VALUE(MIB_meanSDCCHQueueLength,PM_CellMeasurement.meanSDCCHQueueLength.getMeanValue());
+ amsMsg.body.pmData.src.gp10PmData.meanSDCCHQueueLength =
+ htonl(PM_CellMeasurement.meanSDCCHQueueLength.getMeanValue());
+
+ PM_SET_MIB_VALUE(MIB_nbrOfLostRadioLinksSDCCH,PM_CellMeasurement.nbrOfLostRadioLinksSDCCH.getValue());
+ amsMsg.body.pmData.src.gp10PmData.nbrOfLostRadioLinksSDCCH =
+ htonl(PM_CellMeasurement.nbrOfLostRadioLinksSDCCH.getValue());
+
+ PM_SET_MIB_VALUE(MIB_relativeTimeDLPowerControlAtMax,PM_CellMeasurement.relativeTimeDLPowerControlAtMax.getValue());
+ amsMsg.body.pmData.src.gp10PmData.relativeTimeDLPowerControlAtMax =
+ htonl(PM_CellMeasurement.relativeTimeDLPowerControlAtMax.getValue());
+
+ PM_SET_MIB_VALUE(MIB_relativeTimeULPowerControlAtMax,PM_CellMeasurement.relativeTimeULPowerControlAtMax.getValue());
+ amsMsg.body.pmData.src.gp10PmData.relativeTimeULPowerControlAtMax =
+ htonl(PM_CellMeasurement.relativeTimeULPowerControlAtMax.getValue());
+
+ PM_SET_MIB_VALUE(MIB_succInternalHDOsIntraCell,PM_CellMeasurement.succInternalHDOsIntraCell.getValue());
+ amsMsg.body.pmData.src.gp10PmData.succInternalHDOsIntraCell =
+ htonl(PM_CellMeasurement.succInternalHDOsIntraCell.getValue());
+
+ PM_SET_MIB_VALUE(MIB_unsuccInternalHDOsIntraCell,PM_CellMeasurement.unsuccInternalHDOsIntraCell.getValue());
+ amsMsg.body.pmData.src.gp10PmData.unsuccInternalHDOsIntraCell =
+ htonl(PM_CellMeasurement.unsuccInternalHDOsIntraCell.getValue());
+
+ for(i=0;i<PM_CURRENT_MAX_CAUSES;i++)
+ {
+ pm_percause_mib_entry.cause_code = pm_map_index_to_cause(i);
+ pm_percause_mib_entry.cause_value =
+ PM_CellMeasurement.attImmediateAssingProcsPerCauseTable.getValue(i);
+ amsMsg.body.pmData.src.gp10PmData.attImmediateAssingProcsPerCauseTable[i] =
+ htonl(PM_CellMeasurement.attImmediateAssingProcsPerCauseTable.getValue(i));
+ if ((status=oam_setMibTblEntry(MODULE_PM,
+ MIBT_attImmediateAssingProcsPerCauseEntry, i,
+ (void *)&pm_percause_mib_entry,sizeof(pm_percause_mib_entry)))!=STATUS_OK)
+ {
+ DBG_ERROR("Unable to set MIB table entry for PM per cause counter code %s\n",
+ pm_map_cause_code_to_str(pm_percause_mib_entry.cause_code));
+ }
+ }
+
+ for(i=0;i<PM_CURRENT_MAX_CAUSES;i++) {
+ pm_percause_mib_entry.cause_code = pm_map_index_to_cause(i);
+ pm_percause_mib_entry.cause_value = PM_CellMeasurement.succImmediateAssingProcsPerCauseTable.getValue(i);
+ amsMsg.body.pmData.src.gp10PmData.succImmediateAssingProcsPerCauseTable[i] =
+ htonl(PM_CellMeasurement.succImmediateAssingProcsPerCauseTable.getValue(i));
+ if ((status=oam_setMibTblEntry(MODULE_PM, MIBT_succImmediateAssingProcsPerCauseEntry, i, (void *)&pm_percause_mib_entry,sizeof(pm_percause_mib_entry)))!=STATUS_OK) {
+ DBG_ERROR("Unable to set MIB table entry for PM per cause counter code %s\n",
+ pm_map_cause_code_to_str(pm_percause_mib_entry.cause_code));
+ }
+ }
+
+
+ PM_SET_MIB_VALUE(MIB_nbrOfClassMarkUpdates,PM_CCMeasurement.nbrOfClassMarkUpdates.getValue());
+ amsMsg.body.pmData.src.gp10PmData.nbrOfClassMarkUpdates =
+ htonl(PM_CCMeasurement.nbrOfClassMarkUpdates.getValue());
+
+ PM_SET_MIB_VALUE(MIB_attMobileOriginatingCalls,PM_CCMeasurement.attMobileOriginatingCalls.getValue());
+ amsMsg.body.pmData.src.gp10PmData.attMobileOriginatingCalls =
+ htonl(PM_CCMeasurement.attMobileOriginatingCalls.getValue());
+
+ PM_SET_MIB_VALUE(MIB_succMobileOriginatingCalls,PM_CCMeasurement.succMobileOriginatingCalls.getValue());
+ amsMsg.body.pmData.src.gp10PmData.succMobileOriginatingCalls =
+ htonl(PM_CCMeasurement.succMobileOriginatingCalls.getValue());
+
+ PM_SET_MIB_VALUE(MIB_ansMobileOriginatingCalls,PM_CCMeasurement.ansMobileOriginatingCalls.getValue());
+ amsMsg.body.pmData.src.gp10PmData.ansMobileOriginatingCalls =
+ htonl(PM_CCMeasurement.ansMobileOriginatingCalls.getValue());
+
+ PM_SET_MIB_VALUE(MIB_attMobileTerminatingCalls,PM_CCMeasurement.attMobileTerminatingCalls.getValue());
+ amsMsg.body.pmData.src.gp10PmData.attMobileTerminatingCalls =
+ htonl(PM_CCMeasurement.attMobileTerminatingCalls.getValue());
+
+ PM_SET_MIB_VALUE(MIB_succMobileTerminatingCalls,PM_CCMeasurement.succMobileTerminatingCalls.getValue());
+ amsMsg.body.pmData.src.gp10PmData.succMobileTerminatingCalls =
+ htonl(PM_CCMeasurement.succMobileTerminatingCalls.getValue());
+
+ PM_SET_MIB_VALUE(MIB_ansMobileTerminatingCalls,PM_CCMeasurement.ansMobileTerminatingCalls.getValue());
+ amsMsg.body.pmData.src.gp10PmData.ansMobileTerminatingCalls =
+ htonl(PM_CCMeasurement.ansMobileTerminatingCalls.getValue());
+
+ PM_SET_MIB_VALUE(MIB_attMobileEmergencyCalls,PM_CCMeasurement.attMobileEmergencyCalls.getValue());
+ amsMsg.body.pmData.src.gp10PmData.attMobileEmergencyCalls =
+ htonl(PM_CCMeasurement.attMobileEmergencyCalls.getValue());
+
+ PM_SET_MIB_VALUE(MIB_succMobileEmergencyCalls,PM_CCMeasurement.succMobileEmergencyCalls.getValue());
+ amsMsg.body.pmData.src.gp10PmData.succMobileEmergencyCalls =
+ htonl(PM_CCMeasurement.succMobileEmergencyCalls.getValue());
+
+ PM_SET_MIB_VALUE(MIB_ansMobileEmergencyCalls,PM_CCMeasurement.ansMobileEmergencyCalls.getValue());
+ amsMsg.body.pmData.src.gp10PmData.ansMobileEmergencyCalls =
+ htonl(PM_CCMeasurement.ansMobileEmergencyCalls.getValue());
+
+ PM_SET_MIB_VALUE(MIB_attCipheringModeControlProcs,PM_CCMeasurement.attCipheringModeControlProcs.getValue());
+ amsMsg.body.pmData.src.gp10PmData.attCipheringModeControlProcs =
+ htonl(PM_CCMeasurement.attCipheringModeControlProcs.getValue());
+
+ PM_SET_MIB_VALUE(MIB_succCipheringModeControlProcs,PM_CCMeasurement.succCipheringModeControlProcs.getValue());
+ amsMsg.body.pmData.src.gp10PmData.succCipheringModeControlProcs =
+ htonl(PM_CCMeasurement.succCipheringModeControlProcs.getValue());
+
+ PM_SET_MIB_VALUE(MIB_attInterrogationOfHLRsForRouting,PM_CCMeasurement.attInterrogationOfHLRsForRouting.getValue());
+ amsMsg.body.pmData.src.gp10PmData.attInterrogationOfHLRsForRouting =
+ htonl(PM_CCMeasurement.attInterrogationOfHLRsForRouting.getValue());
+
+ PM_SET_MIB_VALUE(MIB_succInterrogationOfHLRsMSRNObtained,PM_CCMeasurement.succInterrogationOfHLRsMSRNObtained.getValue());
+ amsMsg.body.pmData.src.gp10PmData.succInterrogationOfHLRsMSRNObtained =
+ htonl(PM_CCMeasurement.succInterrogationOfHLRsMSRNObtained.getValue());
+
+ PM_SET_MIB_VALUE(MIB_succInterrogationOfHLRsCallForwarding,PM_CCMeasurement.succInterrogationOfHLRsCallForwarding.getValue());
+ amsMsg.body.pmData.src.gp10PmData.succInterrogationOfHLRsCallForwarding =
+ htonl(PM_CCMeasurement.succInterrogationOfHLRsCallForwarding.getValue());
+
+ PM_SET_MIB_VALUE(MIB_attOpForMobileOriginatingPointToPointSMs,PM_CCMeasurement.attOpForMobileOriginatingPointToPointSMs.getValue());
+ amsMsg.body.pmData.src.gp10PmData.attOpForMobileOriginatingPointToPointSMs =
+ htonl(PM_CCMeasurement.attOpForMobileOriginatingPointToPointSMs.getValue());
+
+ PM_SET_MIB_VALUE(MIB_succOpForMobileOriginatingPointToPointSMs,PM_CCMeasurement.succOpForMobileOriginatingPointToPointSMs.getValue());
+ amsMsg.body.pmData.src.gp10PmData.succOpForMobileOriginatingPointToPointSMs =
+ htonl(PM_CCMeasurement.succOpForMobileOriginatingPointToPointSMs.getValue());
+
+ PM_SET_MIB_VALUE(MIB_attOpForMobileTerminatingPointToPointSMs,PM_CCMeasurement.attOpForMobileTerminatingPointToPointSMs.getValue());
+ amsMsg.body.pmData.src.gp10PmData.attOpForMobileTerminatingPointToPointSMs =
+ htonl(PM_CCMeasurement.attOpForMobileTerminatingPointToPointSMs.getValue());
+
+ PM_SET_MIB_VALUE(MIB_succOpForMobileTerminatingPointToPointSMs,PM_CCMeasurement.succOpForMobileTerminatingPointToPointSMs.getValue());
+ amsMsg.body.pmData.src.gp10PmData.succOpForMobileTerminatingPointToPointSMs =
+ htonl(PM_CCMeasurement.succOpForMobileTerminatingPointToPointSMs.getValue());
+
+ PM_SET_MIB_VALUE(MIB_meanTimeToCallSetupService,PM_CCMeasurement.meanTimeToCallSetupService.getMeanValue());
+ amsMsg.body.pmData.src.gp10PmData.meanTimeToCallSetupService =
+ htonl(PM_CCMeasurement.meanTimeToCallSetupService.getMeanValue());
+
+ PM_SET_MIB_VALUE(MIB_meanTimeToLocationUpdateService,PM_CCMeasurement.meanTimeToLocationUpdateService.getMeanValue());
+ amsMsg.body.pmData.src.gp10PmData.meanTimeToLocationUpdateService =
+ htonl(PM_CCMeasurement.meanTimeToLocationUpdateService.getMeanValue());
+
+ PM_SET_MIB_VALUE(MIB_transSubIdentifiedWithIMSI,PM_CCMeasurement.transSubIdentifiedWithIMSI.getValue());
+ amsMsg.body.pmData.src.gp10PmData.transSubIdentifiedWithIMSI =
+ htonl(PM_CCMeasurement.transSubIdentifiedWithIMSI.getValue());
+
+ PM_SET_MIB_VALUE(MIB_imsiDetachProcs,PM_CCMeasurement.imsiDetachProcs.getValue());
+ amsMsg.body.pmData.src.gp10PmData.imsiDetachProcs =
+ htonl(PM_CCMeasurement.imsiDetachProcs.getValue());
+
+ PM_SET_MIB_VALUE(MIB_imsiAttachProcs,PM_CCMeasurement.imsiAttachProcs.getValue());
+ amsMsg.body.pmData.src.gp10PmData.imsiAttachProcs =
+ htonl(PM_CCMeasurement.imsiAttachProcs.getValue());
+
+ PM_SET_MIB_VALUE(MIB_attIncomingInterMSCHDOs,PM_CCMeasurement.attIncomingInterMSCHDOs.getValue());
+ amsMsg.body.pmData.src.gp10PmData.attIncomingInterMSCHDOs =
+ htonl(PM_CCMeasurement.attIncomingInterMSCHDOs.getValue());
+
+ PM_SET_MIB_VALUE(MIB_succIncomingInterMSCHDOs,PM_CCMeasurement.succIncomingInterMSCHDOs.getValue());
+ amsMsg.body.pmData.src.gp10PmData.succIncomingInterMSCHDOs =
+ htonl(PM_CCMeasurement.succIncomingInterMSCHDOs.getValue());
+
+ PM_SET_MIB_VALUE(MIB_attOutgoingInterMSCHDOs,PM_CCMeasurement.attOutgoingInterMSCHDOs.getValue());
+ amsMsg.body.pmData.src.gp10PmData.attOutgoingInterMSCHDOs =
+ htonl(PM_CCMeasurement.attOutgoingInterMSCHDOs.getValue());
+
+ PM_SET_MIB_VALUE(MIB_succOutgoingInterMSCHDOs,PM_CCMeasurement.succOutgoingInterMSCHDOs.getValue());
+ amsMsg.body.pmData.src.gp10PmData.succOutgoingInterMSCHDOs =
+ htonl(PM_CCMeasurement.succOutgoingInterMSCHDOs.getValue());
+
+ PM_SET_MIB_VALUE(MIB_unsuccExternHDOsWithReconnectionPerMSC,PM_CCMeasurement.unsuccExternHDOsWithReconnectionPerMSC.getValue());
+ amsMsg.body.pmData.src.gp10PmData.unsuccExternHDOsWithReconnectionPerMSC =
+ htonl(PM_CCMeasurement.unsuccExternHDOsWithReconnectionPerMSC.getValue());
+
+ PM_SET_MIB_VALUE(MIB_unsuccExternHDOsWithLossOfConnectionPerMSC,PM_CCMeasurement.unsuccExternHDOsWithLossOfConnectionPerMSC.getValue());
+ amsMsg.body.pmData.src.gp10PmData.unsuccExternHDOsWithLossOfConnectionPerMSC =
+ htonl(PM_CCMeasurement.unsuccExternHDOsWithLossOfConnectionPerMSC.getValue());
+
+
+ // Not needed for now
+ //for(i=0;i<PM_MAX_CAUSES;i++) {
+ //pm_percause_mib_entry.cause_code = i;
+ //pm_percause_mib_entry.cause_value = PM_CCMeasurement.externalHDOsPerCauseTable.getValue(i);
+ //if ((status=oam_setMibTblEntry(MODULE_PM, MIBT_externalHDOsPerCauseEntry, i, (void *)&pm_percause_mib_entry,sizeof(pm_percause_mib_entry)))!=STATUS_OK) {
+ // DBG_ERROR("Unable to set MIB table entry for PM per cause counter\n");
+ //}
+ //}
+
+
+ //Set the timestamp now
+ time(&long_time);
+
+
+ //Deduct 15 minutes or however long we have been collecting
+ long_time -= reqd_interval_in_secs;
+ if ((status=oam_setMibIntVar(MODULE_PM,MIB_meanPCHAGCHQueueLength,long_time))!=STATUS_OK) {
+ DBG_ERROR("Error setting PM timestamp into MIB, error %d\n",status);
+ }
+
+ DBG_LEAVE();
+}
+/****************************/
+
+/*
+ * pm_print_values
+ */
+int
+pm_print_values()
+{
+ int i;
+ printf("****************************************************************************\n");
+ printf("meanPCHAGCHQueueLength : %d\n", PM_CellMeasurement.meanPCHAGCHQueueLength.getMeanValue());
+ printf("attTransOfPagingMessagesThePCH : %d\n",PM_CellMeasurement.attTransOfPagingMessagesThePCH.getValue());
+ printf("unsuccTransOfPagingMessagesThePCH : %d\n",PM_CellMeasurement.unsuccTransOfPagingMessagesThePCH.getValue());
+ printf("attImmediateAssingProcs : %d\n",PM_CellMeasurement.attImmediateAssingProcs.getValue());
+ printf("succImmediateAssingProcs : %d\n",PM_CellMeasurement.succImmediateAssingProcs.getValue());
+ printf("nbrOfPagesDiscardedFromPCHQueue : %d\n",PM_CellMeasurement.nbrOfPagesDiscardedFromPCHQueue.getValue());
+ printf("meanDurationOfSuccPagingProcs : %d\n",PM_CellMeasurement.meanDurationOfSuccPagingProcs.getMeanValue());
+ printf("nbrOfAvailableTCHs : %d\n",PM_CellMeasurement.nbrOfAvailableTCHs.getValue());
+ printf("meanNbrOfBusyTCHs : %d\n",PM_CellMeasurement.meanNbrOfBusyTCHs.getMeanValue());
+ printf("maxNbrOfBusyTCHs : %d\n",PM_CellMeasurement.maxNbrOfBusyTCHs.getMaxValue());
+ printf("meanNbrOfIdleTCHsPerInterferenceBand : %d\n",PM_CellMeasurement.meanNbrOfIdleTCHsPerInterferenceBand.getMeanValue());
+ printf("attTCHSeizures : %d\n",PM_CellMeasurement.attTCHSeizures.getValue());
+ printf("succTCHSeizures : %d\n",PM_CellMeasurement.succTCHSeizures.getValue());
+ printf("attTCHSeizuresMeetingTCHBlockedState : %d\n",PM_CellMeasurement.attTCHSeizuresMeetingTCHBlockedState.getValue());
+ printf("allAvailableTCHAllocatedTime : %d\n",PM_CellMeasurement.allAvailableTCHAllocatedTime.getValue());
+ printf("meanTCHBusyTime : %d\n",PM_CellMeasurement.meanTCHBusyTime.getMeanValue());
+ printf("meanTCHQueueLength : %d\n",PM_CellMeasurement.meanTCHQueueLength.getMeanValue());
+ printf("nbrOfLostRadioLinksTCH : %d\n",PM_CellMeasurement.nbrOfLostRadioLinksTCH.getValue());
+ printf("nbrOfAvailableSDCCHs : %d\n",PM_CellMeasurement.nbrOfAvailableSDCCHs.getValue());
+ printf("meanNbrOfBusySDCCHs : %d\n",PM_CellMeasurement.meanNbrOfBusySDCCHs.getMeanValue());
+ printf("maxNbrOfBusySDCCHs : %d\n",PM_CellMeasurement.maxNbrOfBusySDCCHs.getMaxValue());
+ printf("attSDCCHSeizuresMeetingSDCCHBlockedState : %d\n",PM_CellMeasurement.attSDCCHSeizuresMeetingSDCCHBlockedState.getValue());
+ printf("allAvailableSDCCHAllocatedTime : %d\n",PM_CellMeasurement.allAvailableSDCCHAllocatedTime.getValue());
+ printf("meanSDCCHQueueLength : %d\n",PM_CellMeasurement.meanSDCCHQueueLength.getMeanValue());
+ printf("nbrOfLostRadioLinksSDCCH : %d\n",PM_CellMeasurement.nbrOfLostRadioLinksSDCCH.getValue());
+ printf("relativeTimeDLPowerControlAtMax : %d\n",PM_CellMeasurement.relativeTimeDLPowerControlAtMax.getValue());
+ printf("relativeTimeULPowerControlAtMax : %d\n",PM_CellMeasurement.relativeTimeULPowerControlAtMax.getValue());
+ printf("succInternalHDOsIntraCell : %d\n",PM_CellMeasurement.succInternalHDOsIntraCell.getValue());
+ printf("unsuccInternalHDOsIntraCell : %d\n",PM_CellMeasurement.unsuccInternalHDOsIntraCell.getValue());
+ printf("nbrOfClassMarkUpdates : %d\n",PM_CCMeasurement.nbrOfClassMarkUpdates.getValue());
+ printf("attMobileOriginatingCalls : %d\n",PM_CCMeasurement.attMobileOriginatingCalls.getValue());
+ printf("succMobileOriginatingCalls : %d\n",PM_CCMeasurement.succMobileOriginatingCalls.getValue());
+ printf("ansMobileOriginatingCalls : %d\n",PM_CCMeasurement.ansMobileOriginatingCalls.getValue());
+ printf("attMobileTerminatingCalls : %d\n",PM_CCMeasurement.attMobileTerminatingCalls.getValue());
+ printf("succMobileTerminatingCalls : %d\n",PM_CCMeasurement.succMobileTerminatingCalls.getValue());
+ printf("ansMobileTerminatingCalls : %d\n",PM_CCMeasurement.ansMobileTerminatingCalls.getValue());
+ printf("attMobileEmergencyCalls : %d\n",PM_CCMeasurement.attMobileEmergencyCalls.getValue());
+ printf("succMobileEmergencyCalls : %d\n",PM_CCMeasurement.succMobileEmergencyCalls.getValue());
+ printf("ansMobileEmergencyCalls : %d\n",PM_CCMeasurement.ansMobileEmergencyCalls.getValue());
+ printf("attCipheringModeControlProcs : %d\n",PM_CCMeasurement.attCipheringModeControlProcs.getValue());
+ printf("succCipheringModeControlProcs : %d\n",PM_CCMeasurement.succCipheringModeControlProcs.getValue());
+ printf("attInterrogationOfHLRsForRouting : %d\n",PM_CCMeasurement.attInterrogationOfHLRsForRouting.getValue());
+ printf("succInterrogationOfHLRsMSRNObtained : %d\n",PM_CCMeasurement.succInterrogationOfHLRsMSRNObtained.getValue());
+ printf("succInterrogationOfHLRsCallForwarding : %d\n",PM_CCMeasurement.succInterrogationOfHLRsCallForwarding.getValue());
+ printf("attOpForMobileOriginatingPointToPointSMs : %d\n",PM_CCMeasurement.attOpForMobileOriginatingPointToPointSMs.getValue());
+ printf("succOpForMobileOriginatingPointToPointSMs : %d\n",PM_CCMeasurement.succOpForMobileOriginatingPointToPointSMs.getValue());
+ printf("attOpForMobileTerminatingPointToPointSMs : %d\n",PM_CCMeasurement.attOpForMobileTerminatingPointToPointSMs.getValue());
+ printf("succOpForMobileTerminatingPointToPointSMs : %d\n",PM_CCMeasurement.succOpForMobileTerminatingPointToPointSMs.getValue());
+ printf("meanTimeToCallSetupService : %d\n",PM_CCMeasurement.meanTimeToCallSetupService.getMeanValue());
+ printf("meanTimeToLocationUpdateService : %d\n",PM_CCMeasurement.meanTimeToLocationUpdateService.getMeanValue());
+ printf("transSubIdentifiedWithIMSI : %d\n",PM_CCMeasurement.transSubIdentifiedWithIMSI.getValue());
+ printf("imsiDetachProcs : %d\n",PM_CCMeasurement.imsiDetachProcs.getValue());
+ printf("imsiAttachProcs : %d\n",PM_CCMeasurement.imsiAttachProcs.getValue());
+ printf("attIncomingInterMSCHDOs : %d\n",PM_CCMeasurement.attIncomingInterMSCHDOs.getValue());
+ printf("succIncomingInterMSCHDOs : %d\n",PM_CCMeasurement.succIncomingInterMSCHDOs.getValue());
+ printf("attOutgoingInterMSCHDOs : %d\n",PM_CCMeasurement.attOutgoingInterMSCHDOs.getValue());
+ printf("succOutgoingInterMSCHDOs : %d\n",PM_CCMeasurement.succOutgoingInterMSCHDOs.getValue());
+ printf("unsuccExternHDOsWithReconnectionPerMSC : %d\n",PM_CCMeasurement.unsuccExternHDOsWithReconnectionPerMSC.getValue());
+ printf("unsuccExternHDOsWithLossOfConnectionPerMSC : %d\n",PM_CCMeasurement.unsuccExternHDOsWithLossOfConnectionPerMSC.getValue());
+
+ printf("-------------- AttImmediateAssingProcsPerCause Table Entries ---------------\n");
+ for(i=0;i<PM_CURRENT_MAX_CAUSES;i++) {
+ printf("Cause %s : Counter value %d\n",
+ pm_map_cause_code_to_str(pm_map_index_to_cause(i)),
+ PM_CellMeasurement.attImmediateAssingProcsPerCauseTable.getValue(i));
+ }
+
+
+
+ printf("------------------ SuccImmediateAssingProcsPerCause Table Entries ----------\n");
+ for(i=0;i<PM_CURRENT_MAX_CAUSES;i++) {
+ printf("Cause %s : Counter value %d\n",
+ pm_map_cause_code_to_str(pm_map_index_to_cause(i)),
+ PM_CellMeasurement.succImmediateAssingProcsPerCauseTable.getValue(i));
+ }
+
+
+
+ /*
+ * Not needed for now
+ for(i=0;i<PM_MAX_CAUSES;i++) {
+ printf(" MIBT_externalHDOsPerCauseEntry no %d = %d\n",i,PM_CCMeasurement.externalHDOsPerCauseTable.getValue(i));
+ }
+ */
+
+ printf("****************************************************************************\n");
+
+ return(0);
+}
+
+
+/*
+ * pm_map_cause_to_index
+ */
+int
+pm_map_cause_to_index(CauseCode cause)
+{
+ int index= PM_MAX_CAUSES;
+
+ switch(cause) {
+ case 160: index = 0; break;
+ /* Emergency call */
+ case 192: index = 1; break;
+ /* Call re-establishment; TCH/F was in use */
+ case 128: index = 2; break;
+ /* Answer to paging */
+ case 16: index = 3; break;
+ /* Answer to paging */
+ case 32: index = 4; break;
+ /* Answer to paging */
+ case 224: index = 5; break;
+ /* Originating call and TCH/F is needed */
+ case 0: index = 6; break;
+ /* Location updating */
+ case 12: index = 7; break;
+ /* Other procedures which can be completed with
+ an SDCCH and the network sets NECI bit to 1 */
+ default: return PM_CURRENT_MAX_CAUSES;
+ }
+ return(index);
+}
+
+
+/*
+ * pm_map_index_to_cause
+ */
+CauseCode
+pm_map_index_to_cause(int index)
+{
+ CauseCode cause;
+
+ switch(index) {
+ case 0: cause = 160; break;
+ /* Emergency call */
+ case 1: cause = 192; break;
+ /* Call re-establishment; TCH/F was in use */
+ case 2: cause = 128; break;
+ /* Answer to paging : Full Rate only*/
+ case 3: cause = 16; break;
+ /* Answer to paging : SDCCH only*/
+ case 4: cause = 32; break;
+ /* Answer to paging : Dual rate mobile*/
+ case 5: cause = 224; break;
+ /* Originating call and TCH/F is needed */
+ case 6: cause = 0; break;
+ /* Location updating */
+ case 7: cause = 12; break;
+ /* Other procedures which can be completed with
+ an SDCCH and the network sets NECI bit to 1 */
+ }
+ return(cause);
+}
+
+
+/*
+ * pm_map_cause_code_to_str
+ */
+char *
+pm_map_cause_code_to_str(CauseCode cause)
+{
+ static char cause_str[100];
+
+ switch(cause) {
+ case 160: strncpy(cause_str,"Emergeny call",100); break;
+ /* Emergency call */
+ case 192: strncpy(cause_str,"Call re-establishment; TCH/F was in use",100); break;
+ /* Call re-establishment; TCH/F was in use */
+ case 128: strncpy(cause_str,"Answer to paging : Full Rate only",100); break;
+ /* Answer to paging : Full Rate Only*/
+ case 16: strncpy(cause_str,"Answer to paging : SDCCH only",100); break;
+ /* Answer to paging : SDCCH Only*/
+ case 32: strncpy(cause_str,"Answer to paging : Dual Rate Mobile",100); break;
+ /* Answer to paging */
+ case 224: strncpy(cause_str,"Originating call and TCH/F is needed",100); break;
+ /* Originating call and TCH/F is needed */
+ case 0: strncpy(cause_str,"Location updating",100); break;
+ /* Location updating */
+ case 12: strncpy(cause_str,"Procs completed with SDCCH and NECI bit = 1",100); break;
+ /* Other procedures which can be completed with
+ an SDCCH and the network sets NECI bit to 1 */
+ default : strncpy(cause_str,"Unknown",100);break;
+ }
+ return(cause_str);
+}
diff --git a/data/mnet/GP10/Host/Pm/src/pm_task.cpp b/data/mnet/GP10/Host/Pm/src/pm_task.cpp
new file mode 100644
index 0000000..a750af3
--- /dev/null
+++ b/data/mnet/GP10/Host/Pm/src/pm_task.cpp
@@ -0,0 +1,292 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <vxWorks.h>
+#include <semlib.h>
+#include <time.h>
+#include <wdlib.h>
+#include <sysLib.h>
+#include <taskLib.h>
+#include <fioLib.h>
+
+#ifndef UNIT_TEST_PMCLASS
+#include "vipermib.h"
+#endif
+
+#include "defs.h"
+#include "apm/include/apmdefs.h"
+#include "apm/include/msgproc.h"
+#include "pm/pmdefs.h"
+#include "pm/pm_class.h"
+
+#include "Os/JCTask.h"
+#include "Os/JcModule.h"
+#include "Gp10OsTune.h"
+#include "MnetModuleId.h"
+#include "oam_api.h"
+
+static bool initialized = false;
+static unsigned long reqd_interval_in_secs;
+
+extern void pm_reset_all_counters();
+extern void pm_advance_interval();
+void pm_timer_handler(int arg);
+
+
+/*
+ * Global variables
+ */
+static WDOG_ID g_pm_timer;
+static int g_timer_ticks_required;
+extern PmSourceToAmsMsg amsMsg;
+SEM_ID pmSemId;
+VOID pm_task(void);
+bool pm_sendDataToAms();
+
+JCTask pmTaskObj("PMTask");
+
+
+/*
+ * SysCommand_PM
+ */
+/**************************/
+int SysCommand_PM(T_SYS_CMD action)
+{
+ DBG_FUNC("SysCommand_PM",PM_LAYER);
+ DBG_ENTER();
+ switch(action){
+ case SYS_SHUTDOWN:
+ {
+ printf("PM TASK shutdown notification received\n");
+ DBG_WARNING("PM TASK shutdown notification received\n");
+ }
+ break;
+
+ case SYS_START:
+ {
+ DBG_TRACE("Spawning PM Task now\n");
+
+ if (pmTaskObj.JCTaskSpawn(PM_TASK_PRIORITY, PM_TASK_OPTION, PM_TASK_STACK_SIZE,
+ (FUNCPTR) pm_task, 0,0,0,0, 0, 0, 0, 0, 0, 0,MODULE_PM,JC_CRITICAL_TASK) == ERROR){
+ DBG_ERROR("Unable to spawn PM task!!\n");
+ }
+ else {
+ DBG_TRACE("Spawned PM Task successfully!\n");
+ }
+ }
+ break;
+ }
+ DBG_LEAVE();
+ return 0;
+}
+/***************************/
+/*
+ * pm_timer_handler
+ */
+void
+pm_timer_handler(int arg)
+{
+ DBG_FUNC("pm_timer_handler",PM_LAYER);
+ DBG_ENTER();
+
+ STATUS status;
+
+ if ((status = semGive(pmSemId)) != OK)
+ {
+ DBG_ERROR("Error on semGive in PM_TASK! Status(%d)", status);
+ }
+ DBG_LEAVE();
+}
+
+
+/*
+ * pm_task
+ */
+VOID
+pm_task()
+{
+ DBG_FUNC("pm_task",PM_LAYER);
+ DBG_ENTER();
+
+ struct tm *current_time;
+ time_t long_time;
+ unsigned long current_seconds_passed_in_hour;
+ STATUS status;
+
+ time(&long_time);
+ current_time = localtime(&long_time);
+
+ current_seconds_passed_in_hour = (current_time->tm_min * 60) + current_time->tm_sec;
+
+ DBG_TRACE("Current secs in hour %lu ; current minute %d; current secs %d\n",
+ current_seconds_passed_in_hour,current_time->tm_min,current_time->tm_sec);
+
+ if ( (current_seconds_passed_in_hour >= 0) && (current_seconds_passed_in_hour < PM_SECONDS_IN_15_MIN) ) {
+ reqd_interval_in_secs = (PM_SECONDS_IN_15_MIN - current_seconds_passed_in_hour);
+ }
+ else if ( (current_seconds_passed_in_hour >= PM_SECONDS_IN_15_MIN) && (current_seconds_passed_in_hour < PM_SECONDS_IN_30_MIN) ) {
+ reqd_interval_in_secs = (PM_SECONDS_IN_30_MIN - current_seconds_passed_in_hour);
+ }
+ else if ( (current_seconds_passed_in_hour >= PM_SECONDS_IN_30_MIN) && (current_seconds_passed_in_hour < PM_SECONDS_IN_45_MIN) ) {
+ reqd_interval_in_secs = (PM_SECONDS_IN_45_MIN - current_seconds_passed_in_hour);
+ }
+ else {
+ reqd_interval_in_secs = (PM_SECONDS_IN_HOUR - current_seconds_passed_in_hour);
+ }
+
+ g_pm_timer = wdCreate();
+ g_timer_ticks_required = reqd_interval_in_secs * sysClkRateGet();
+ DBG_TRACE("Timer ticks required %lu\n",g_timer_ticks_required);
+
+ initialized = false;
+
+ pmSemId = semBCreate(SEM_Q_FIFO, SEM_EMPTY);
+ if (pmSemId == NULL)
+ {
+ DBG_ERROR("Error creating semaphore for PM_TASK!");
+ }
+
+ if(wdStart(g_pm_timer, g_timer_ticks_required, (FUNCPTR)pm_timer_handler, 0)){
+ DBG_ERROR("Error creating timer for PM_TASK!");
+ }
+
+ /*
+ * need to reset all counters for the current interval
+ * including reset the current interval to 0
+ */
+ pm_reset_all_counters();
+
+ /*
+ * Since we do not update the MIB, the MIB will still contain the old values
+ * (likley the old value before last reboot)
+ */
+
+ /*
+ * First refresh the MIB values
+ pm_update_mib();
+ */
+
+ pmTaskObj.JCTaskEnterLoop();
+
+ while(1)
+ {
+ if ( (status = semTake(pmSemId, WAIT_FOREVER)) == ERROR)
+ {
+ DBG_ERROR("Error on semTake in PM_TASK! Status(%d)", status);
+ }
+
+ /*
+ * update the mib first
+ */
+ pm_update_mib();
+ pm_sendDataToAms();
+
+ /*
+ * advance to the next interval
+ */
+ pm_advance_interval();
+
+ /*
+ * Now we need to do it every 15 minutes
+ */
+ reqd_interval_in_secs = PM_SECONDS_IN_15_MIN;
+ g_timer_ticks_required = reqd_interval_in_secs * sysClkRateGet();
+
+ DBG_TRACE("Timer ticks required %lu\n",g_timer_ticks_required);
+
+
+ if(wdStart(g_pm_timer, g_timer_ticks_required, (FUNCPTR)pm_timer_handler, 0)){
+ DBG_ERROR("Error creating timer for PM_TASK!");
+ }
+
+ }
+
+ pmTaskObj.JCTaskNormExit();
+
+ DBG_LEAVE();
+ return;
+}
+
+
+/*-----------------------------------------------------------------------*/
+
+
+static struct sockaddr_in addrTo;
+static OS_SPECIFIC_SOCKET_HANDLE sock;
+
+bool
+initSocketAndMsgHdr()
+{
+ DBG_FUNC("initSocketAndMsgHdr", PM_LAYER);
+ DBG_ENTER();
+
+ if (!initialized)
+ {
+ int ip;
+ /* 1. prepare udp socket */
+ sock = SOCKET_UdpCreate();
+
+ if (sock == ERROR)
+ return false;
+
+ if (SOCKET_UdpBind(sock, (ubyte2) kANY_PORT) != true)
+ {
+ SOCKET_Close(sock);
+ return false;
+ }
+
+ /* 2. get IP address from MIB */
+
+ if (oam_getMibIntVar(MIB_h323_GKIPAddress, (long *) &ip) != STATUS_OK)
+ {
+ DBG_ERROR("Unable to get alarm server's IP from the MIB\n");
+ return false;
+ }
+
+ /* 3. prepare the the server's address */
+ memset (&addrTo, 0, sizeof(sockaddr_in));
+
+ addrTo.sin_family = AF_INET;
+ addrTo.sin_addr.s_addr = ip;
+ addrTo.sin_port = htons((ubyte2)PM_SERVER_PORT);
+
+ initialized = true;
+ }
+ DBG_LEAVE();
+ return true;
+}
+
+/*-----------------------------------------------------------------------*/
+
+bool
+pm_sendDataToAms()
+{
+
+ DBG_FUNC("pm_sendDataToAms", PM_LAYER);
+ DBG_ENTER();
+
+ if (!initSocketAndMsgHdr())
+ {
+ DBG_LEAVE();
+ return false;
+ }
+
+ //memset(&amsMsg, 0, sizeof(PmSourceToAmsMsg));
+
+ amsMsg.hdr.alarmSrcType = srcTypViperCell;
+ amsMsg.hdr.alarmMsgType = PM_msgTypData;
+ amsMsg.hdr.alarmMsgLen = sizeof(PmData);
+
+ /* Get local host IP address and timestamp */
+ time_t ltime;
+ time(&ltime);
+ amsMsg.body.pmData.pmSrcIp = GetLocalHostAddress();
+ //amsMsg.body.pmData.pmTimestamp = ltime;
+ amsMsg.body.pmData.pmTimestamp = htonl(ltime); //convert to network byte order
+
+ SOCKET_UdpSendTo(sock, &addrTo, (char *) &amsMsg, PM_msgLen);
+ DBG_LEAVE();
+ return true;
+}
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/Makefile b/data/mnet/GP10/Host/Rlc_mac/Makefile
new file mode 100644
index 0000000..286151b
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/Makefile
@@ -0,0 +1,17 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src src_api src_init
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ copy bin\*.out $(TOP_OF_VOB)\bin\*.out
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/DLDataBlockPool.h b/data/mnet/GP10/Host/Rlc_mac/include/DLDataBlockPool.h
new file mode 100644
index 0000000..5e1f934
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/DLDataBlockPool.h
@@ -0,0 +1,74 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : DLDataBlockPool.h
+// Author(s) : Tim Olson
+// Create Date : 1/5/2001
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __DLDATABLOCKPOOL_H__
+#define __DLDATABLOCKPOOL_H__
+
+#include "bitstream.h"
+#include "MacHeader.h"
+#include "ieChannelCodingCommand.h"
+
+// Max RLC PDU size is 1560. Minus header for CS-1 18 bytes may be sent.
+// For safety add a few extra and 100 should be good.
+#define MAX_RL_BLOCKS_PER_PDU 100
+// *******************************************************************
+// class DLDataBlock
+//
+// Description
+//
+// *******************************************************************
+class DLDataBlock {
+public:
+ DLDataBlock(): next(0), streamOutLen(0), dlHeaderLen(0) {}
+ ~DLDataBlock() {}
+ void DisplayDataBlock();
+
+ friend class DLDataBlockPool;
+
+ unsigned char streamOut[MAX_RLC_DATA_MSG];
+ int streamOutLen;
+ DLMacHeader dlHeader;
+ int dlHeaderLen;
+ IeChannelCodingCommand chanCoding;
+private:
+ DLDataBlock *next;
+ static DbgOutput MsgDisplayObj;
+};
+
+
+// *******************************************************************
+// class DLDataBlockPool
+//
+// Description
+//
+// *******************************************************************
+class DLDataBlockPool {
+public:
+ // Constructor
+ DLDataBlockPool();
+ // Destructor
+ ~DLDataBlockPool();
+
+ DLDataBlock *GetDLDataBlock();
+ void ReturnDLDataBlock(DLDataBlock *pDlDataBlock);
+
+private:
+ DLDataBlock *head, *tail;
+};
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/DLRlcLink.h b/data/mnet/GP10/Host/Rlc_mac/include/DLRlcLink.h
new file mode 100644
index 0000000..a803e89
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/DLRlcLink.h
@@ -0,0 +1,138 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : DLRlcLink.h
+// Author(s) : Tim Olson
+// Create Date : 12/1/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __DLRLCLINK_H__
+#define __DLRLCLINK_H__
+
+#include "Os/JCCTimer.h"
+#include "RlcMacCommon.h"
+#include "DLDataBlockPool.h"
+#include "bssgp/bssgp_api.h"
+#include "ieChannelCodingCommand.h"
+#include "MsgPacketDownlinkAckNack.h"
+#include "MsgPacketControlAcknowledgement.h"
+
+#define XMT_WINDOW_SIZE_K 64
+
+// Forward declaration.
+class DLTbf;
+
+#define T3191_VALUE GetMibValueInt(MIB_t3191)*10 // in 100's of ms
+#define T3193_VALUE GetMibValueInt(MIB_t3193) // in 100's of ms
+#define T3195_VALUE GetMibValueInt(MIB_t3195)*10 // in 100's of ms
+
+// *******************************************************************
+// class DLRlcLink
+//
+// Description
+//
+// *******************************************************************
+class DLRlcLink {
+public:
+
+ typedef enum
+ {
+ ACKNOWLEDGED_RLC_MODE,
+ UNACKNOWLEDGED_RLC_MODE
+ } RLC_MODE;
+
+ typedef enum
+ {
+ NACKED,
+ PENDING_ACK,
+ ACKED,
+ INVALID
+ } ACKNOWLEDGE_STATUS;
+
+ // Constructor
+ DLRlcLink();
+ // Destructor
+ ~DLRlcLink() {}
+
+ JC_STATUS EstablishRLCLink(DLTbf *pDlTbf, RLC_MODE mode);
+ JC_STATUS ReestablishRLCLink(DLTbf *pDlTbf, RLC_MODE mode);
+ void UpdateTSSpecificData();
+ JC_STATUS AbnormalRelease();
+ DLDataBlock *GetDLRlcBlock(unsigned char &ctrlAckTag, char &burstType, int reqTrx, int reqTs);
+ bool SetPollingBit(DLDataBlock *pDlDataBlock, unsigned char &ctrlAckTag, char &burstType, int reqTrx, int reqTs);
+ DLDataBlock *BuildDLRlcBlock();
+ bool SegmentLLCPdu(DLDataBlock *pDlDataBlock, int &bytesCopied);
+ bool ReallocateDLResources();
+ DLDataBlock *RetransmitNackedDLRlcBlock();
+ DLDataBlock *RetransmitPendingAckDLRlcBlock();
+ void ReceiveDLAckNack(MsgPacketDownlinkAckNack *pCtrlMsg);
+ void ReceivePacketControlAck(MsgPacketControlAcknowledgement *pCtrlMsg, unsigned char ta);
+ void ReceivePacketControlNack();
+ JC_STATUS SendPacketPowerControlTimingAdvance(unsigned char ta);
+ JC_STATUS SendPacketPollingRequest();
+ bool GetNextLLCPdu();
+ bool MoreLLCPdusAvailable(BSSGP_DL_UNITDATA_MSG **pDlUnitData);
+ void ProcessT3195Expiry();
+ void ProcessT3191Expiry();
+ void ProcessT3193Expiry();
+ void ProcessActivityTimerExpiry();
+ void ReleaseDataBlocks();
+ void SetCurrentCodingRate(IeChannelCodingCommand::CHANNEL_CODING_COMMAND rate)
+ { chanCoding.SetChannelCodingCommand(rate); }
+ IeChannelCodingCommand::CHANNEL_CODING_COMMAND GetCurrentCodingRate()
+ { return(chanCoding.GetChannelCodingCommand()); }
+ void ShowRlcLinkInfo();
+ bool IsT3193Running() { return (isT3193Running); }
+ void CancelT3193() { pT3193->cancelTimer(); isT3193Running = FALSE; }
+
+ static int T3195TimerExpiry(int tbfPointer);
+ static int T3191TimerExpiry(int tbfPointer);
+ static int T3193TimerExpiry(int tbfPointer);
+ static int ActivityTimerExpiry(int tbfPointer);
+ static DLDataBlockPool sysDlDataBlockPool;
+
+private:
+ RLC_MODE rlcMode; // ACK or non ACK mode
+ int k; // Window size
+ int vS; // Send state variable
+ int vCS; // Control send state variable
+ DLDataBlock *pDlBlocks[RLC_MOD_VAL];
+ int lastPendingAckXmit;
+ bool lastBlockSentOnPollTs;
+ int lastDataBlock;
+ IeChannelCodingCommand chanCoding;
+ int n3105;
+ int numBlocksSincePoll;
+ int dlAssignCnt;
+ bool pollOnActivation;
+
+ // Only valid for acknowledged mode.
+ int vA; // Acknowledged state variable
+ ACKNOWLEDGE_STATUS vB[RLC_MOD_VAL]; // Acknowledged state array
+ DLTbf *pAssociatedTbf;
+
+ // Next PDU for segmentation.
+ char * llcPdu;
+ int llcPduLen;
+ int currPduByte;
+
+ int N3105_MAX;
+ static int dlAssignCntMax;
+ JCCTimer *pT3195;
+ JCCTimer *pT3191;
+ JCCTimer *pT3193;
+ JCCTimer *pActivityTimer;
+ bool isT3193Running;
+};
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/DLSignallingMsgQueue.h b/data/mnet/GP10/Host/Rlc_mac/include/DLSignallingMsgQueue.h
new file mode 100644
index 0000000..7dd016d
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/DLSignallingMsgQueue.h
@@ -0,0 +1,52 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : DLSignallingMsgQueue.h
+// Author(s) : Tim Olson
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __DLSIGNALLINGMSGQUEUE_H__
+#define __DLSIGNALLINGMSGQUEUE_H__
+
+#include "GP10Err.h"
+#include "msgL1.h"
+
+#define MAX_DL_SIGNALLING_QUEUE_ENTRIES 5
+
+// *******************************************************************
+// class DLSignallingMsgQueue
+//
+// Description
+//
+// *******************************************************************
+class DLSignallingMsgQueue {
+public:
+ DLSignallingMsgQueue() : qHead(0), qTail(0), numEntries(0) {}
+ ~DLSignallingMsgQueue() {}
+
+ JC_STATUS QueueDLSignallingMsg
+ (
+ MsgPacchReq *l1Msg
+ );
+
+ MsgPacchReq *DequeueDLSignallingMsg();
+
+
+private:
+ MsgPacchReq pacchMsg[MAX_DL_SIGNALLING_QUEUE_ENTRIES];
+ int qHead, qTail;
+ int numEntries;
+};
+
+
+#endif
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/DLTbf.h b/data/mnet/GP10/Host/Rlc_mac/include/DLTbf.h
new file mode 100644
index 0000000..849df94
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/DLTbf.h
@@ -0,0 +1,107 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : DLTbf.h
+// Author(s) : Tim Olson
+// Create Date : 12/1/2000
+// Description :
+//
+// *******************************************************************
+
+#ifndef __DLTBF_H__
+#define __DLTBF_H__
+
+#include "Tbf.h"
+#include "bssgp/bssgp_api.h"
+#include "DLRlcLink.h"
+
+
+// *******************************************************************
+// class DLTbf
+//
+// Description
+//
+// *******************************************************************
+class DLTbf : public Tbf {
+public:
+
+ const int ControlAckTagArrDepth = 5 * 8; // Max is 5 * num timeslots
+
+ // Constructor
+ DLTbf() : Tbf() {};
+ // Destructor
+ ~DLTbf() {}
+
+ JC_STATUS EstablishDLTbf(BSSGP_DL_UNITDATA_MSG *pUnitDataMsg, bool ctrkAck);
+ JC_STATUS ReestablishDLTbf(BSSGP_DL_UNITDATA_MSG *pUnitDataMsg, bool ctrkAck);
+ void UpdateTSSpecificData();
+ JC_STATUS ReleaseDLTbf(bool deactivateDsp);
+ JC_STATUS InternalReleaseDLTbf();
+ JC_STATUS AbnormalReleaseDLTbf();
+
+ unsigned char GetControlAckTag() { return(ctlAckTag[currAckTag]); }
+ void ClearControlAckTag()
+ {
+ for (int i=0; i<ControlAckTagArrDepth; i++)
+ ctlAckTag[i] = CTL_ACK_TAG_NOT_APPLICABLE;
+ currAckTag=0;
+ }
+ unsigned char SetControlAckTag()
+ {
+ currAckTag = (++currAckTag) % currNumAckTags;
+ ctlAckTag[currAckTag] = (++sysCtlAckCount != CTL_ACK_TAG_NOT_APPLICABLE ? sysCtlAckCount : ++sysCtlAckCount);
+ return (ctlAckTag[currAckTag]);
+ }
+
+ bool CheckControlAckTag(unsigned char tag)
+ {
+ for (int i=0; i<currNumAckTags; i++)
+ if (ctlAckTag[i] == tag) return (TRUE);
+ return (FALSE);
+ }
+
+ void ShowTBFInfo();
+
+ /*
+ * NOTE: In the following accessors, convert class values to ensure Class 1 gets value=1, Class 2
+ * gets 2, etc., as described in GSM 03.60, Section 15. The Scheduler assumes this to index arrays.
+ */
+ int GetDelayClass(void) const
+ {
+ return(qosParams.delay_class-CNI_RIL3_QOS_DELAY_CLASS_1+1);
+ }
+ int GetPrecedenceClass(void) const
+ {
+ return(qosParams.precedence_class-CNI_RIL3_QOS_PRECEDENCE_CLASS_HIGH_PRIORITY+1);
+ }
+ int GetPeakThroughputClass(void) const
+ {
+ return(qosParams.peak_throughput-CNI_RIL3_QOS_PEAK_THROUGHPUT_1_KBPS+1);
+ }
+ int GetMultislotClass(void) const;
+
+ T_RIL3_IE_QOS_PROFILE_ID qosProfile;
+ T_CNI_RIL3_IE_QOS qosParams;
+ T_CNI_RIL3_IE_MS_RADIO_ACCESS_CAPABILITY raCapability;
+ T_CNI_RIL3_IE_DRX_PARAMETER drxParams;
+ T_CNI_RIL3_IE_MOBILE_ID msId;
+ RIL3_IE_PRIORITY priority;
+ DLRlcLink rlcLink;
+ bool controlAck;
+
+private:
+
+ // Control message acknowledgement tags.
+ unsigned char ctlAckTag[ControlAckTagArrDepth];
+ int currAckTag;
+ int currNumAckTags;
+};
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/DynamicAllocationStruct.h b/data/mnet/GP10/Host/Rlc_mac/include/DynamicAllocationStruct.h
new file mode 100644
index 0000000..f5aaef3
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/DynamicAllocationStruct.h
@@ -0,0 +1,135 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : DynamicAllocationStruct.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __DYNAMICALLOCATIONSTRUCT_H__
+#define __DYNAMICALLOCATIONSTRUCT_H__
+
+#include "logging\vclogging.h"
+#include "bitstream.h"
+#include "RlcMacCommon.h"
+#include "ieStartFrameNum.h"
+#include "ieRLCBlocksGranted.h"
+#include "iePO.h"
+#include "iePRMode.h"
+#include "ieTFI.h"
+
+
+// *******************************************************************
+// class DynamicAllocationStruct
+//
+// Description:
+// Dynamic Allocation Struct -- GSM04.60 11.2.29
+//
+// <Dynamic Allocation struct > ::=
+// < Extended Dynamic Allocation : bit (1) >
+// { 0 | 1 < P0 : bit (4) >
+// < PR_MODE : bit (1) > }
+// < USF_GRANULARITY : bit (1) >
+// { 0 | 1 < UPLINK_TFI_ASSIGNMENT : bit (5) > }
+// { 0 | 1 < RLC_DATA_BLOCKS_GRANTED : bit (8) > }
+// { 0 | 1 < TBF Starting Time : < Starting Frame Number Description IE > > }
+// { 0 -- Timeslot Allocation
+// { 0 | 1 < USF_TN0 : bit (3) > }
+// { 0 | 1 < USF_TN1 : bit (3) > }
+// { 0 | 1 < USF_TN2 : bit (3) > }
+// { 0 | 1 < USF_TN3 : bit (3) > }
+// { 0 | 1 < USF_TN4 : bit (3) > }
+// { 0 | 1 < USF_TN5 : bit (3) > }
+// { 0 | 1 < USF_TN6 : bit (3) > }
+// { 0 | 1 < USF_TN7 : bit (3) > }
+// | 1 -- Timeslot Allocation with Power Control Parameters
+// < ALPHA : bit (4) >
+// { 0 | 1 < USF_TN0 : bit (3) >
+// < GAMMA_TN0 : bit (5) > }
+// { 0 | 1 < USF_TN1 : bit (3) >
+// < GAMMA_TN1 : bit (5) > }
+// { 0 | 1 < USF_TN2 : bit (3) >
+// < GAMMA_TN2 : bit (5) > }
+// { 0 | 1 < USF_TN3 : bit (3) >
+// < GAMMA_TN3 : bit (5) > }
+// { 0 | 1 < USF_TN4 : bit (3) >
+// < GAMMA_TN4 : bit (5) > }
+// { 0 | 1 < USF_TN5 : bit (3) >
+// < GAMMA_TN5 : bit (5) > }
+// { 0 | 1 < USF_TN6 : bit (3) >
+// < GAMMA_TN6 : bit (5) > }
+// { 0 | 1 < USF_TN7 : bit (3) >
+// < GAMMA_TN7 : bit (5) > } } ;
+// *******************************************************************
+
+typedef struct
+{
+ bool isValid;
+ unsigned char usf;
+} TimeslotAllocationEntry;
+
+typedef struct
+{
+ bool isValid;
+ unsigned char usf;
+ unsigned char gamma;
+} TimeslotAllocationWithPowerEntry;
+
+class DynamicAllocationStruct {
+public:
+
+ typedef enum
+ {
+ DYNAMIC_ALLOCATION,
+ EXTENDED_DYNAMIC_ALLOCATION,
+ } ALLOCATION_TYPE;
+
+ typedef enum
+ {
+ ONE_RLC_MAC_BLOCK,
+ FOUR_RLC_MAC_BLOCKS
+ } USF_GRANULARITY;
+
+ ALLOCATION_TYPE allocType;
+ IePO po;
+ IePRMode prMode;
+ USF_GRANULARITY usfGranularity;
+ IeRLCBlocksGranted rlcBlocksGranted;
+ IeTFI uplinkTFI;
+ IeStartFrameNum startTime;
+ struct TimeslotAllocationStruct
+ {
+ bool isValid;
+ TimeslotAllocationEntry tsAllocEntry[MAX_TIMESLOTS];
+ } timeslotAllocation;
+ struct TimeslotAllocationWithPowerStruct
+ {
+ bool isValid;
+ unsigned char alpha;
+ TimeslotAllocationWithPowerEntry tsAllocWithPowerEntry[MAX_TIMESLOTS];
+ } timeslotAllocationWithPower;
+ bool isValid;
+
+ // Default constructor
+ DynamicAllocationStruct() : isValid(FALSE), po(), prMode(), uplinkTFI(),
+ startTime(), rlcBlocksGranted(), allocType(EXTENDED_DYNAMIC_ALLOCATION),
+ usfGranularity(ONE_RLC_MAC_BLOCK)
+ {
+ timeslotAllocation.isValid = FALSE;
+ timeslotAllocationWithPower.isValid = FALSE;
+ }
+
+ RlcMacResult EncodeDynamicAllocationStruct(BitStreamOut &dataStream);
+ void DisplayDynamicAllocationStruct(DbgOutput *outObj);
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/FixedAllocationStruct.h b/data/mnet/GP10/Host/Rlc_mac/include/FixedAllocationStruct.h
new file mode 100644
index 0000000..abef5db
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/FixedAllocationStruct.h
@@ -0,0 +1,114 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : FixedAllocationStruct.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __FIXEDALLOCATIONSTRUCT_H__
+#define __FIXEDALLOCATIONSTRUCT_H__
+
+#include "logging\vclogging.h"
+#include "bitstream.h"
+#include "RlcMacCommon.h"
+#include "ieStartFrameNum.h"
+#include "ieRLCBlocksGranted.h"
+#include "iePO.h"
+#include "iePRMode.h"
+#include "ieTFI.h"
+#include "ieAllocationBitMap.h"
+#include "iePowerControlParameters.h"
+#include "ieTimeslotAllocation.h"
+#include "ieBtsPowerCtlMode.h"
+
+
+// *******************************************************************
+// class FixedAllocationStruct
+//
+// Description:
+// Dynamic Allocation Struct -- GSM04.60 11.2.29
+//
+// <Fixed Allocation struct > ::=
+// { 0 | 1 < UPLINK_TFI_ASSIGNMENT : bit (5) > }
+// < FINAL_ALLOCATION : bit (1) >
+// < DOWNLINK_CONTROL_TIMESLOT: bit (3) >
+// { 0 | 1 < P0 : bit (4) >
+// < BTS_PWR_CTRL_MODE : bit (1) >
+// < PR_MODE : bit (1) > }
+// { 0 < TIMESLOT_ALLOCATION : bit (8) >
+// | 1 < Power Control Parameters : < Power Control Parameters IE > > }
+// < HALF_DUPLEX_MODE : bit (1) >
+// < TBF Starting Time : < Starting Frame Number Description IE > >
+// { 0 { 0 -- with length of Allocation Bitmap
+// < BLOCKS_OR_BLOCK_PERIODS : bit (1) >
+// < ALLOCATION_BITMAP_LENGTH : bit (7) >
+// < ALLOCATION_BITMAP : bit (val(ALLOCATION_BITMAP_LENGTH)) >
+// | 1 -- without length of Allocation Bitmap (fills remainder of the message)
+// < ALLOCATION_BITMAP : bit ** > }
+// ! < Message escape : 1 bit (*) = <no string> > } ;
+// *******************************************************************
+
+
+class FixedAllocationStruct {
+public:
+
+ typedef enum
+ {
+ NOT_LAST_ALLOCATION,
+ LAST_ALLOCATION
+ } FINAL_ALLOCATION;
+
+ typedef enum
+ {
+ NOT_HALF_DUPLEX,
+ HALF_DUPLEX
+ } HALF_DUPLEX_MODE;
+
+ typedef enum
+ {
+ BLOCKS,
+ BLOCK_PERIODS
+ } BLOCKS_OR_BLOCK_PERIODS;
+
+ IeTFI uplinkTFI;
+ FINAL_ALLOCATION finalAllocation;
+ unsigned char controlTimeslot;
+ struct PowerControlStruct
+ {
+ bool isValid;
+ IePO po;
+ IeBtsPowerCtlMode btsPowerCtlMode;
+ IePRMode prMode;
+ } powerControl;
+ IeTimeslotAllocation timeslotAllocation;
+ IePowerControlParameters powerControlParameters;
+ HALF_DUPLEX_MODE halfDuplexMode;
+ IeStartFrameNum startTime;
+ BLOCKS_OR_BLOCK_PERIODS allocationBitmapType;
+ IeAllocationBitMap allocationBitMap;
+ bool isValid;
+
+ // Default constructor
+ FixedAllocationStruct() : isValid(FALSE), uplinkTFI(),
+ finalAllocation(NOT_LAST_ALLOCATION), controlTimeslot(0),
+ timeslotAllocation(), powerControlParameters(), halfDuplexMode(HALF_DUPLEX),
+ startTime(), allocationBitmapType(BLOCKS), allocationBitMap()
+ {
+ powerControl.isValid = FALSE;
+ }
+
+ RlcMacResult EncodeFixedAllocationStruct(BitStreamOut &dataStream);
+ void DisplayFixedAllocationStruct(DbgOutput *outObj);
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/IeBase.h b/data/mnet/GP10/Host/Rlc_mac/include/IeBase.h
new file mode 100644
index 0000000..2e351af
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/IeBase.h
@@ -0,0 +1,49 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : IeBase.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEBASE_H__
+#define __IEBASE_H__
+
+#include "RlcMacMsgType.h"
+#include "logging\vclogging.h"
+
+// *******************************************************************
+// class IeBase
+//
+// Description
+//
+// *******************************************************************
+class IeBase {
+public:
+ RlcMacMsgType msgType;
+
+ // Constructor
+ IeBase() : isValid(FALSE) {}
+ // Destructor
+ ~IeBase() {}
+
+ bool IsValid()
+ {
+ return (isValid);
+ }
+
+protected:
+ bool isValid;
+};
+
+
+#endif
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MacHeader.h b/data/mnet/GP10/Host/Rlc_mac/include/MacHeader.h
new file mode 100644
index 0000000..b4d977c
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MacHeader.h
@@ -0,0 +1,570 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MacHeader.h
+// Author(s) : Tim Olson
+// Create Date : 11/22/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MACHEADER_H__
+#define __MACHEADER_H__
+
+#include "bitstream.h"
+#include "RlcMacCommon.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+#define MAX_RLC_LENGTH_OCTETS 10
+#define INVALID_LENGTH_VAL 0xff
+
+// *******************************************************************
+// class MacHeader
+//
+// Description:
+// MAC layer header(s)
+//
+// *******************************************************************
+
+class ULMacHeader {
+public:
+
+ typedef enum
+ {
+ RLC_DATA_BLOCK,
+ RLC_CTRL_BLOCK_NO_OPT_OCTETS,
+ RLC_CTRL_BLOCK_OPT_OCTETS,
+ RESERVED
+ } PAYLOAD_TYPE;
+
+ typedef enum
+ {
+ ONE_CHAN_REQ,
+ TWO_OR_MORE_CHAN_REQ
+ } RETRY_BIT;
+
+ typedef enum
+ {
+ NOT_STALLED,
+ STALLED,
+ } STALL_INDICATOR;
+
+ typedef enum
+ {
+ TLLI_NOT_PRESENT,
+ TLLI_PRESENT
+ } TLLI_INDICATOR;
+
+ typedef enum
+ {
+ EXTENSION_OCTET_FOLLOWS,
+ NO_EXTENSION_OCTET
+ } EXTENSION_BIT;
+
+ typedef enum
+ {
+ NO_MORE_LLC_DATA,
+ MORE_LLC_DATA
+ } MORE_BIT;
+
+ ULMacHeader() {}
+
+ RlcMacResult DecodeULMacHeader(BitStreamIn &dataStream);
+ void DisplayDetails();
+
+ RlcMacResult SetPayloadType(PAYLOAD_TYPE val)
+ {
+ payloadType = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ PAYLOAD_TYPE GetPayloadType()
+ {
+ return (payloadType);
+ }
+
+ RlcMacResult SetRetryBit(RETRY_BIT val)
+ {
+ retryBit = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ RETRY_BIT GetRetryBit()
+ {
+ return (retryBit);
+ }
+
+ RlcMacResult SetStallIndicator(STALL_INDICATOR val)
+ {
+ stallInd = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ STALL_INDICATOR GetStallIndicator()
+ {
+ return (stallInd);
+ }
+
+ RlcMacResult SetCountdownVal(unsigned char val)
+ {
+ countdownVal = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ unsigned char GetCountdownVal()
+ {
+ return (countdownVal);
+ }
+
+ RlcMacResult SetTFI(unsigned char val)
+ {
+ tfi = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ unsigned char GetTFI()
+ {
+ return (tfi);
+ }
+
+ RlcMacResult SetTLLIIndicator(TLLI_INDICATOR val)
+ {
+ tlliInd = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ TLLI_INDICATOR GetTLLIIndicator()
+ {
+ return (tlliInd);
+ }
+
+ RlcMacResult SetBSN(unsigned char val)
+ {
+ bsn = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ unsigned char GetBSN()
+ {
+ return (bsn);
+ }
+
+ RlcMacResult SetExtensionBit(EXTENSION_BIT val)
+ {
+ extensionBit = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ EXTENSION_BIT GetExtensionBit()
+ {
+ return (extensionBit);
+ }
+
+ RlcMacResult SetTLLI(unsigned long val)
+ {
+ tlli = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ unsigned long GetTLLI()
+ {
+ return (tlli);
+ }
+
+ RlcMacResult AddLengthOctet(unsigned char length, MORE_BIT more, EXTENSION_BIT extBit)
+ {
+ if (++currLengthOctet < MAX_RLC_LENGTH_OCTETS)
+ {
+ LengthOctets[currLengthOctet].length = length;
+ LengthOctets[currLengthOctet].moreBit = more;
+ LengthOctets[currLengthOctet].extensionBit = extBit;
+ }
+
+ return (RLC_MAC_SUCCESS);
+ }
+
+ bool GetCurrentLengthOctet(unsigned char *length, MORE_BIT *more, EXTENSION_BIT *extBit)
+ {
+ if (currLengthOctet < MAX_RLC_LENGTH_OCTETS)
+ {
+ *length = LengthOctets[currLengthOctet].length;
+ *more = LengthOctets[currLengthOctet].moreBit;
+ *extBit = LengthOctets[currLengthOctet].extensionBit;
+ return (TRUE);
+ }
+ else
+ {
+ return (FALSE);
+ }
+ }
+
+ bool GetNextLengthOctet(unsigned char *length, MORE_BIT *more, EXTENSION_BIT *extBit)
+ {
+ if (++currLengthOctet < MAX_RLC_LENGTH_OCTETS)
+ {
+ *length = LengthOctets[currLengthOctet].length;
+ *more = LengthOctets[currLengthOctet].moreBit;
+ *extBit = LengthOctets[currLengthOctet].extensionBit;
+ return (TRUE);
+ }
+ else
+ {
+ return (FALSE);
+ }
+ }
+
+ void ResetCurrLengthOctet()
+ {
+ currLengthOctet=0;
+ }
+
+private:
+ PAYLOAD_TYPE payloadType;
+ RETRY_BIT retryBit;
+ STALL_INDICATOR stallInd;
+ unsigned char countdownVal;
+ unsigned char tfi;
+ TLLI_INDICATOR tlliInd;
+ unsigned char bsn;
+ EXTENSION_BIT extensionBit;
+ struct
+ {
+ unsigned char length;
+ MORE_BIT moreBit;
+ EXTENSION_BIT extensionBit;
+ } LengthOctets[MAX_RLC_LENGTH_OCTETS];
+ int currLengthOctet;
+ unsigned long tlli;
+
+ // Logger object for displayig header.
+ static DbgOutput HdrDisplayDetailObj;
+};
+
+
+class DLMacHeader {
+public:
+
+ typedef enum
+ {
+
+ RLC_DATA_BLOCK,
+ RLC_CTRL_BLOCK_NO_OPT_OCTETS,
+ RLC_CTRL_BLOCK_OPT_OCTETS,
+ RESERVED
+ } PAYLOAD_TYPE;
+
+ typedef enum
+ {
+ FN_N_13,
+ FN_N_17_OR_N_18,
+ FN_N_21_OR_N_22,
+ FN_N_26
+ } RRBP;
+
+ typedef enum
+ {
+ RRBP_NOT_VALID,
+ RRBP_VALID
+ } SUPPLEMENTARY_POLLING_BIT;
+
+ typedef enum
+ {
+ NOT_FINAL_SEGMENT,
+ FINAL_SEGMENT
+ } FINAL_SEGMENT_BIT;
+
+ typedef enum
+ {
+ TFI_D_NOT_PRESENT,
+ TFI_D_PRESENT
+ } ADDRESS_CONTROL_BIT;
+
+ typedef enum
+ {
+ MODEA_0_2_OR_MODEB_0_6_DB,
+ MODEA_4_6_OR_MODEB_8_14_DB,
+ MODEA_8_10_OR_MODEB_16_22_DB,
+ MODEA_NOT_USABLE_OR_MODEB_24_30_DB
+ } POWER_REDUCTION;
+
+ typedef enum
+ {
+ UPLINK_TBF,
+ DOWNLINK_TBF
+ } DIRECTION_BIT;
+
+ typedef enum
+ {
+ NOT_LAST_RLC_BLOCK,
+ LAST_RLC_BLOCK
+ } FINAL_BLOCK_INDICATOR;
+
+ typedef enum
+ {
+ EXTENSION_OCTET_FOLLOWS,
+ NO_EXTENSION_OCTET
+ } EXTENSION_BIT;
+
+ typedef enum
+ {
+ NO_MORE_LLC_DATA,
+ MORE_LLC_DATA
+ } MORE_BIT;
+
+ DLMacHeader() : currLengthOctet(0) {}
+
+ RlcMacResult EncodeDLMacHeader(BitStreamOut &dataStream);
+ void DisplayDetails();
+
+ RlcMacResult SetPayloadType(PAYLOAD_TYPE val)
+ {
+ payloadType = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ PAYLOAD_TYPE GetPayloadType()
+ {
+ return (payloadType);
+ }
+
+ RlcMacResult SetRRBP(RRBP val)
+ {
+ rrbp = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ RRBP GetRRBP()
+ {
+ return (rrbp);
+ }
+
+ RlcMacResult SetSPBit(SUPPLEMENTARY_POLLING_BIT val)
+ {
+ spBit = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ SUPPLEMENTARY_POLLING_BIT GetSPBit()
+ {
+ return (spBit);
+ }
+
+ RlcMacResult SetUSF(unsigned char val)
+ {
+ usf = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ unsigned char GetUSF()
+ {
+ return (usf);
+ }
+
+ RlcMacResult SetRBSN(unsigned char val)
+ {
+ rbsn = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ unsigned char GetRBSN()
+ {
+ return (rbsn);
+ }
+
+ RlcMacResult SetRTI(unsigned char val)
+ {
+ rti = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ unsigned char GetRTI()
+ {
+ return (rti);
+ }
+
+ RlcMacResult SetFinalSegment(FINAL_SEGMENT_BIT val)
+ {
+ finalSegBit = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ FINAL_SEGMENT_BIT GetFinalSegment()
+ {
+ return (finalSegBit);
+ }
+
+ RlcMacResult SetAddressControl(ADDRESS_CONTROL_BIT val)
+ {
+ acBit = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ ADDRESS_CONTROL_BIT GetAddressControl()
+ {
+ return (acBit);
+ }
+
+ RlcMacResult SetPowerReduction(POWER_REDUCTION val)
+ {
+ powerReduction = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ POWER_REDUCTION GetPowerReduction()
+ {
+ return (powerReduction);
+ }
+
+ RlcMacResult SetTFI(unsigned char val)
+ {
+ tfi = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ unsigned char GetTFI()
+ {
+ return (tfi);
+ }
+
+ RlcMacResult SetDirectionBit(DIRECTION_BIT val)
+ {
+ directionBit = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ DIRECTION_BIT GetDirectionBit()
+ {
+ return (directionBit);
+ }
+
+ RlcMacResult SetBSN(unsigned char val)
+ {
+ bsn = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ unsigned char GetBSN()
+ {
+ return (bsn);
+ }
+
+ RlcMacResult SetExtensionBit(EXTENSION_BIT val)
+ {
+ extensionBit = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ EXTENSION_BIT GetExtensionBit()
+ {
+ return (extensionBit);
+ }
+
+ RlcMacResult SetFinalBlockIndicator(FINAL_BLOCK_INDICATOR val)
+ {
+ fbiBit = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ FINAL_BLOCK_INDICATOR GetFinalBlockIndicator()
+ {
+ return (fbiBit);
+ }
+
+ bool SetLengthOctet(unsigned char length, MORE_BIT more, EXTENSION_BIT extBit)
+ {
+ if (currLengthOctet < MAX_RLC_LENGTH_OCTETS)
+ {
+ LengthOctets[currLengthOctet].length = length;
+ LengthOctets[currLengthOctet].moreBit = more;
+ LengthOctets[currLengthOctet].extensionBit = extBit;
+ return (TRUE);
+ }
+ else
+ {
+ return (FALSE);
+ }
+ }
+
+ RlcMacResult SetCurrLengthOctetExtension(EXTENSION_BIT extBit)
+ {
+ if (currLengthOctet < MAX_RLC_LENGTH_OCTETS)
+ {
+ LengthOctets[currLengthOctet].extensionBit = extBit;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_ERROR);
+ }
+ }
+
+ bool GetNextLengthOctet(unsigned char *length, MORE_BIT *more, EXTENSION_BIT *extBit)
+ {
+ if (++currLengthOctet < MAX_RLC_LENGTH_OCTETS)
+ {
+ *length = LengthOctets[currLengthOctet].length;
+ *more = LengthOctets[currLengthOctet].moreBit;
+ *extBit = LengthOctets[currLengthOctet].extensionBit;
+ return (TRUE);
+ }
+ else
+ {
+ return (FALSE);
+ }
+ }
+
+ int GetCurrLengthOctetIndex() { return (currLengthOctet); }
+ void IncrementCurrLengthOctetIndex()
+ {
+ if (currLengthOctet < MAX_RLC_LENGTH_OCTETS) currLengthOctet++;
+ }
+ void DecrementCurrLengthOctetIndex()
+ {
+ if (currLengthOctet) currLengthOctet--;
+ }
+
+ void ResetCurrLengthOctet()
+ {
+ currLengthOctet=0;
+ }
+
+ static int GetDataHdrSize()
+ {
+ return(3); // Base header size for a data block
+ }
+
+private:
+ PAYLOAD_TYPE payloadType;
+ RRBP rrbp;
+ SUPPLEMENTARY_POLLING_BIT spBit;
+ unsigned char usf;
+ unsigned char rbsn;
+ unsigned char rti;
+ FINAL_SEGMENT_BIT finalSegBit;
+ ADDRESS_CONTROL_BIT acBit;
+ POWER_REDUCTION powerReduction;
+ unsigned char tfi;
+ FINAL_BLOCK_INDICATOR fbiBit;
+ DIRECTION_BIT directionBit;
+ unsigned char bsn;
+ EXTENSION_BIT extensionBit;
+ struct
+ {
+ unsigned char length;
+ MORE_BIT moreBit;
+ EXTENSION_BIT extensionBit;
+ } LengthOctets[MAX_RLC_LENGTH_OCTETS];
+ int currLengthOctet;
+
+ // Logger object for displayig header.
+ static DbgOutput HdrDisplayDetailObj;
+};
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MeasurementMappingStruct.h b/data/mnet/GP10/Host/Rlc_mac/include/MeasurementMappingStruct.h
new file mode 100644
index 0000000..0897d3a
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MeasurementMappingStruct.h
@@ -0,0 +1,53 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MeasurementMappingStruct.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MEASUREMENTMAPPINGSTRUCT_H__
+#define __MEASUREMENTMAPPINGSTRUCT_H__
+
+#include "logging\vclogging.h"
+#include "bitstream.h"
+#include "ieStartFrameNum.h"
+
+
+// *******************************************************************
+// class MeasurementMappingStruct
+//
+// Description:
+// Measurement Mapping Struct -- GSM04.60 11.2.7
+//
+// < Measurement Mapping struct > ::=
+// < Measurement Starting Time : < Starting Frame Number Description IE > >
+// < MEASUREMENT_INTERVAL : bit (5) >
+// < MEASUREMENT_BITMAP : bit (8) > ;
+// *******************************************************************
+
+class MeasurementMappingStruct {
+public:
+
+ IeStartFrameNum measStartTime;
+ unsigned char measInterval;
+ unsigned char measBitMap;
+ bool isValid;
+
+ // Default constructor
+ MeasurementMappingStruct() : isValid(FALSE), measStartTime() {}
+
+ RlcMacResult EncodeMeasurementMappingStruct(BitStreamOut &dataStream);
+ void DisplayMeasurementMappingStruct(DbgOutput *outObj);
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MsgBase.h b/data/mnet/GP10/Host/Rlc_mac/include/MsgBase.h
new file mode 100644
index 0000000..f42e02a
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MsgBase.h
@@ -0,0 +1,96 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgBase.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MSGBASE_H__
+#define __MSGBASE_H__
+
+#include "RlcMacResult.h"
+#include "RlcMacMsgType.h"
+#include "logging\vclogging.h"
+
+
+// *******************************************************************
+// class MsgBase
+//
+// Description
+//
+// *******************************************************************
+class MsgBase {
+public:
+ RlcMacMsgType msgType;
+
+ // Constructor
+ MsgBase(RlcMacMsgType type) : msgType(type) {}
+ // Destructor
+ ~MsgBase() {};
+
+protected:
+ static DbgOutput MsgDisplayObj;
+ static DbgOutput MsgDisplayDetailObj;
+
+ // Default constuctor
+ MsgBase() {};
+};
+
+
+
+// *******************************************************************
+// class DownlinkMsgBase
+//
+// Description
+//
+// *******************************************************************
+class DownlinkMsgBase : public MsgBase {
+public:
+ DownlinkMsgBase(RlcMacMsgType type) : MsgBase(type) {}
+ ~DownlinkMsgBase() {}
+
+ void DisplayMsgShort(BitStreamOut *dataStream);
+ virtual void DisplayMsgDetail() = 0;
+ virtual RlcMacResult EncodeMsg(BitStreamOut &dataStream) = 0;
+
+protected:
+
+ // Default constructor
+ DownlinkMsgBase() {}
+};
+
+
+
+// *******************************************************************
+// class UplinkMsgBase
+//
+// Description
+//
+// *******************************************************************
+class UplinkMsgBase : public MsgBase {
+public:
+ UplinkMsgBase(RlcMacMsgType type) : MsgBase(type) {}
+ ~UplinkMsgBase() {}
+
+ void DisplayMsgShort(BitStreamIn *dataStream);
+
+protected:
+
+ // Default contructor
+ UplinkMsgBase(){}
+};
+
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketAccessReject.h b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketAccessReject.h
new file mode 100644
index 0000000..b6662a3
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketAccessReject.h
@@ -0,0 +1,134 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketAccessReject.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MSGPACKETACCESSREJECT_H__
+#define __MSGPACKETACCESSREJECT_H__
+
+#include "MsgBase.h"
+#include "bitstream.h"
+#include "iePageMode.h"
+#include "ieTLLI.h"
+#include "iePacketReqRef.h"
+#include "ieGlobalTFI.h"
+
+
+// *******************************************************************
+// class IeWaitIndication
+//
+// Description:
+// Wait Indication IE -- GSM04.60 11.2.1
+// *******************************************************************
+
+class IeWaitIndication : public IeBase {
+public:
+
+ typedef enum
+ {
+ UNITS_OF_SECONDS,
+ UNITS_OF_20_MS
+ } RLC_MAC_WAIT_IND_SIZE;
+
+ IeWaitIndication() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetWaitIndication(unsigned char ind, RLC_MAC_WAIT_IND_SIZE size)
+ {
+ waitInd = ind;
+ waitIndSize = size;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ void GetWaitIndication(unsigned char *wait, RLC_MAC_WAIT_IND_SIZE *size)
+ {
+ *wait = waitInd;
+ *size = waitIndSize;
+ }
+
+ void ClearWaitIndication() { isValid = FALSE; }
+private:
+ unsigned char waitInd;
+ RLC_MAC_WAIT_IND_SIZE waitIndSize;
+};
+
+
+// *******************************************************************
+// PACKET ACCESS REJECT
+//
+// GSM 04.60 11.2.1
+//
+// < Packet Access Reject message content > ::=
+// < PAGE_MODE : bit (2) >
+// < Reject : < Reject struct > >
+// { { 1 < Additional Reject: < Reject struct > > } ** 0
+// < padding bits > } // -- truncation at end of message allowed, bits '0' assumed
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// < Reject struct > ::=
+// { 0 < TLLI : bit (32) >
+// | 1 { 0 < Packet Request Reference : < Packet Request Reference IE > >
+// | 1 < Global TFI : < Global TFI IE > > } }
+// { 0 | 1 < WAIT_INDICATION : bit (8) >
+// < WAIT _INDICATION_SIZE : bit (1) > }
+// ! < Ignore : bit (*) = <no string> > ;
+//
+// *******************************************************************
+
+class RejectStruct {
+public:
+ IeTLLI tlli;
+ IePacketReqRef packetReqRef;
+ IeGlobalTFI globalTFI;
+ IeWaitIndication waitInd;
+ bool isValid;
+
+ // Default constructor
+ RejectStruct() : isValid(FALSE), tlli(), packetReqRef(), globalTFI(), waitInd() {}
+
+ RlcMacResult EncodeRejectStruct(BitStreamOut &dataStream);
+ void DisplayRejectStruct(DbgOutput *outObj);
+};
+
+class MsgPacketAccessReject : public DownlinkMsgBase {
+public:
+
+ // Message type is included in MsgBase.
+
+ // Distributed message contents
+ IePageMode pageMode;
+ RejectStruct reject;
+ RejectStruct additionalReject;
+
+ // Default constructor
+ MsgPacketAccessReject() : DownlinkMsgBase(RlcMacMsgType::PACKET_ACCESS_REJECT),
+ pageMode(), reject(), additionalReject(){}
+
+ // Default destructor
+ ~MsgPacketAccessReject() {}
+
+ // Pack IE into an output stream of bits.
+ RlcMacResult EncodeMsg(BitStreamOut &dataStream);
+
+ // Display IE details.
+ void DisplayMsgDetail();
+};
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketCellChangeFailure.h b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketCellChangeFailure.h
new file mode 100644
index 0000000..bfae4cc
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketCellChangeFailure.h
@@ -0,0 +1,83 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketCellChangeFailure.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MSGPACKETCELLCHANGEFAILURE_H__
+#define __MSGPACKETCELLCHANGEFAILURE_H__
+
+#include "MsgBase.h"
+#include "bitstream.h"
+#include "ieTLLI.h"
+#include "ieARFCN.h"
+#include "ieBSIC.h"
+
+
+// *******************************************************************
+// PACKET CELL CHANGE FAILURE
+//
+// GSM 04.60 11.2.26
+//
+// < Packet Cell Change Failure message content > ::=
+// < TLLI : bit (32) >
+// < ARFCN : bit (10) >
+// < BSIC : bit (6) >
+// < CAUSE : bit (4) >
+// < padding bits > ;
+//
+// *******************************************************************
+
+class MsgPacketCellChangeFailure : public UplinkMsgBase {
+public:
+
+ typedef enum
+ {
+ FREQUENCY_NOT_IMPLEMENTED,
+ NO_RESPONSE_ON_TARGET_CELL,
+ REJECT_ON_TARGET_CELL,
+ ON_GOING_CS_CONNECTION,
+ ANONYMOUS_ACCESS,
+ MS_IN_GMM_STANDBY,
+ FORCED_TO_STANDBY,
+ INVALID_CAUSE
+ } FAILURE_CAUSE;
+
+ // Message type is included in MsgBase.
+
+ // Message contents
+ IeTLLI tlli;
+ IeARFCN arfcn;
+ IeBSIC bsic;
+ FAILURE_CAUSE failCause;
+
+ // Default constructor
+ MsgPacketCellChangeFailure() : UplinkMsgBase(RlcMacMsgType::PACKET_CELL_CHANGE_FAILURE),
+ tlli(), arfcn(), bsic(), failCause(INVALID_CAUSE)
+ {
+ }
+
+ // Default destructor
+ ~MsgPacketCellChangeFailure() {}
+
+ // Decode input stream of bits into message.
+ RlcMacResult DecodeMsg(BitStreamIn &dataStream);
+
+ // Display IE details.
+ void DisplayMsgDetail();
+};
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketCellChangeOrder.h b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketCellChangeOrder.h
new file mode 100644
index 0000000..63eac83
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketCellChangeOrder.h
@@ -0,0 +1,138 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketCellChangeOrder.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MSGPACKETCELLCHANGEORDER_H__
+#define __MSGPACKETCELLCHANGEORDER_H__
+
+#include "MsgBase.h"
+#include "bitstream.h"
+#include "iePageMode.h"
+#include "ieTLLI.h"
+#include "ieGlobalTFI.h"
+#include "NCMeasurementStruct.h"
+#include "ieLSAParameters.h"
+#include "ieARFCN.h"
+#include "ieBSIC.h"
+
+
+
+
+// *******************************************************************
+// PACKET CELL CHANGE ORDER
+//
+// GSM 04.60 11.2.4
+//
+// < Packet Cell Change Order message content > ::=
+// < PAGE_MODE : bit (2) >
+// { { 0 < Global TFI : < Global TFI IE > >
+// | 10 < TLLI : bit (32) > }
+// { 0 -- Message escape
+// { < IMMEDIATE_REL : bit >
+// < ARFCN : bit (10) >
+// < BSIC : bit (6) >
+// < NC Measurement Parameters : < NC Measurement Parameters struct > >
+// { 0 | 1 < LSA Parameters : < LSA Parameters IE >> }
+// < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Message escape : 1 bit (*) = <no string> > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// < NC Measurement Parameters struct > ::=
+// < NETWORK_CONTROL_ORDER : bit (2) >
+// { 0 | 1 < NC_NON_DRX_PERIOD : bit (3) >
+// < NC_REPORTING_PERIOD_I : bit (3) >
+// < NC_REPORTING_PERIOD_T : bit (3) > }
+// { 0 | 1 < NC_FREQUENCY_LIST : NC Frequency list struct > } ;
+//
+// < NC Frequency list struct > ::=
+// { 0 | 1 < NR_OF_REMOVED_FREQ : bit (5) >
+// { < REMOVED_FREQ_INDEX : bit (6) > } * (1 + val(NR_OF_REMOVED_FREQ)) }
+// { 1 < List of added Frequency : < Add Frequency list struct > >} ** 0;
+//
+// < Add Frequency list struct > ::=
+// < START_FREQUENCY : bit (10) >
+// < BSIC : bit (6) >
+// { 0 | 1 < Cell selection params : < Cell Selection struct > > }
+// < NR_OF_FREQUENCIES : bit (5) >
+// < FREQ_DIFF_LENGTH : bit (3) >
+// { < FREQUENCY_DIFF : bit (val(FREQ_DIFF_LENGTH)) >
+// < BSIC : bit (6) >
+// { 0 | 1 < Cell selection params :
+// < Cell Selection struct > > } } * (val(NR_OF_FREQUENCIES));
+//
+// < Cell Selection struct > ::=
+// < CELL_BAR_ACCESS_2 : bit (1) >
+// < EXC_ACC : bit >
+// < SAME_RA_AS_SERVING_CELL : bit (1) >
+// { 0 | 1 < GPRS_RXLEV_ACCESS_MIN : bit (6) >
+// < GPRS_MS_TXPWR_MAX_CCH : bit (5) > }
+// { 0 | 1 < GPRS_TEMPORARY_OFFSET : bit (3) >
+// < GPRS_PENALTY_TIME : bit (5) > }
+// { 0 | 1 < GPRS_RESELECT_OFFSET : bit (5) > }
+// { 0 | 1 < HCS params : < HCS struct > > }
+// { 0 | 1 < SI13_PBCCH_LOCATION : < SI13_PBCCH_LOCATION struct > > } ;
+//
+// < SI13_PBCCH_LOCATION struct > ::=
+// { 0 < SI13_LOCATION : bit (1) >
+// | 1 < PBCCH_LOCATION : bit (2) >
+// < PSI1_REPEAT_PERIOD : bit (4) > } ;
+//
+// < HCS struct > ::=
+// < PRIORITY_CLASS : bit (3) >
+// < HCS_THR : bit (5) > ;
+// *******************************************************************
+
+
+class MsgPacketCellChangeOrder : public DownlinkMsgBase {
+public:
+
+ typedef enum
+ {
+ NOT_REQUIRED,
+ REQUIRED
+ } IMMEDIATE_REL;
+
+ // Message type is included in MsgBase.
+
+ // Distributed message contents
+ IePageMode pageMode;
+ IeGlobalTFI globalTFI;
+ IeTLLI tlli;
+ IMMEDIATE_REL immediateRel;
+ IeARFCN arfcn;
+ IeBSIC bsic;
+ NCMeasParamStruct ncMeasParam;
+ IeLSAParameters lsaParameters;
+
+ // Default constructor
+ MsgPacketCellChangeOrder() : DownlinkMsgBase(RlcMacMsgType::PACKET_CELL_CHANGE_ORDER),
+ pageMode(), globalTFI(), tlli(), immediateRel(NOT_REQUIRED), arfcn(), bsic(),
+ ncMeasParam(), lsaParameters() {}
+
+ // Default destructor
+ ~MsgPacketCellChangeOrder() {}
+
+ // Pack IE into an output stream of bits.
+ RlcMacResult EncodeMsg(BitStreamOut &dataStream);
+
+ // Display IE details.
+ void DisplayMsgDetail();
+};
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketControlAcknowledgement.h b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketControlAcknowledgement.h
new file mode 100644
index 0000000..19a6ccf
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketControlAcknowledgement.h
@@ -0,0 +1,81 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketControlAcknowledgement.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MSGPACKETCONTROLACKNOWLEDGEMENT_H__
+#define __MSGPACKETCONTROLACKNOWLEDGEMENT_H__
+
+#include "MsgBase.h"
+#include "bitstream.h"
+#include "ieTLLI.h"
+
+
+// *******************************************************************
+// PACKET CELL CONTROL ACKNOWLEDGEMENT
+//
+// GSM 04.60 11.2.2
+//
+// < Packet Control Acknowledgement message content > ::= -- RLC/MAC control block format
+// < TLLI : bit (32) >
+// < CTRL_ACK : bit (2) >
+// < padding bits > ;
+//
+// < Packet Control Acknowledgement 11 bit message > ::= -- 11-bit access burst format
+// < MESSAGE_TYPE : bit (9) == 1111 1100 1 >
+// < CTRL_ACK : bit (2) > ;
+//
+// < Packet Control Acknowledgement 8 bit message > ::= -- 8-bit access burst format
+// < MESSAGE_TYPE : bit (6) == 0111 11 >
+// < CTRL_ACK : bit (2) > ;
+//
+// *******************************************************************
+
+class MsgPacketControlAcknowledgement : public UplinkMsgBase {
+public:
+
+ typedef enum
+ {
+ RESERVED,
+ ONE_BLOCK_RBSN_EQ_1,
+ ONE_BLOCK_RBSN_EQ_0,
+ TWO_BLOCKS_RBSN_EQ_0_AND_1
+ } CTRL_ACK;
+
+ // Message type is included in MsgBase.
+
+ // Message contents
+ IeTLLI tlli;
+ CTRL_ACK ctrlAck;
+
+ // Default constructor
+ MsgPacketControlAcknowledgement(RlcMacMsgType type) : UplinkMsgBase(type),
+ tlli(), ctrlAck(RESERVED)
+ {
+ }
+
+ // Default destructor
+ ~MsgPacketControlAcknowledgement() {}
+
+ // Decode input stream of bits into message.
+ RlcMacResult DecodeMsg(BitStreamIn &dataStream);
+
+ // Display IE details.
+ void DisplayMsgDetail();
+};
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketDownlinkAckNack.h b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketDownlinkAckNack.h
new file mode 100644
index 0000000..c02f13b
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketDownlinkAckNack.h
@@ -0,0 +1,96 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketDownlinkAckNack.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MSGPACKETDOWNLINKACKNACK_H__
+#define __MSGPACKETDOWNLINKACKNACK_H__
+
+#include "MsgBase.h"
+#include "bitstream.h"
+#include "ieAckNackDescription.h"
+#include "ieChannelRequestDescription.h"
+#include "ieTFI.h"
+
+
+// *******************************************************************
+// PACKET DOWNLINK ACK NACK
+//
+// GSM 04.60 11.2.6
+//
+// < Packet Downlink Ack/Nack message content > ::=
+// < DOWNLINK_TFI : bit (5) >
+// < Ack/Nack Description : < Ack/Nack Description IE > >
+// { 0 | 1 < Channel Request Description : < Channel Request Description IE > > }
+// < Channel Quality Report : < Channel Quality Report struct > >
+// < padding bits > ;
+//
+// < Channel Quality Report struct > ::=
+// < C_VALUE : bit (6) >
+// < RXQUAL : bit (3) >
+// < SIGN_VAR : bit (6) >
+// { 0 | 1 < I_LEVEL_TN0 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN1 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN2 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN3 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN4 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN5 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN6 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN7 : bit (4) > } ;
+//
+// *******************************************************************
+
+class MsgPacketDownlinkAckNack : public UplinkMsgBase {
+public:
+
+
+ // Message type is included in MsgBase.
+
+ // Message contents
+ IeTFI dlTfi;
+ IeAckNackDescription ackNackDescription;
+ IeChannelRequestDescription chanReqDescription;
+ unsigned char cValue;
+ unsigned char rxqual;
+ unsigned char signVar;
+ struct ILevelStruct
+ {
+ unsigned char iLevel;
+ bool isValid;
+ } ILevel[MAX_TIMESLOTS];
+
+ // Default constructor
+ MsgPacketDownlinkAckNack() : UplinkMsgBase(RlcMacMsgType::PACKET_DOWNLINK_ACK_NACK),
+ ackNackDescription(), chanReqDescription(), cValue(0), rxqual(0), signVar(0)
+ {
+ for (int i=0; i < MAX_TIMESLOTS; i++)
+ {
+ ILevel[i].isValid = FALSE;
+ }
+ }
+
+ // Default destructor
+ ~MsgPacketDownlinkAckNack() {}
+
+ // Decode input stream of bits into message.
+ RlcMacResult DecodeMsg(BitStreamIn &dataStream);
+
+ // Display IE details.
+ void DisplayMsgDetail();
+};
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketDownlinkAssignment.h b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketDownlinkAssignment.h
new file mode 100644
index 0000000..442f353
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketDownlinkAssignment.h
@@ -0,0 +1,133 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketDownlinkAssignment.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MSGPACKETDOWNLINKASSIGNMENT_H__
+#define __MSGPACKETDOWNLINKASSIGNMENT_H__
+
+#include "MsgBase.h"
+#include "bitstream.h"
+#include "iePageMode.h"
+#include "iePersistenceLevel.h"
+#include "ieTLLI.h"
+#include "iePacketReqRef.h"
+#include "ieGlobalTFI.h"
+#include "ieMACMode.h"
+#include "ieRLCMode.h"
+#include "ieTimeslotAllocation.h"
+#include "iePacketTimingAdvance.h"
+#include "iePO.h"
+#include "ieBtsPowerCtlMode.h"
+#include "iePRMode.h"
+#include "ieFrequencyParameters.h"
+#include "ieTFI.h"
+#include "iePowerControlParameters.h"
+#include "ieStartFrameNum.h"
+#include "MeasurementMappingStruct.h"
+
+
+// *******************************************************************
+// PACKET DOWNLINK ASSIGNMENT
+//
+// GSM 04.60 11.2.7
+//
+// < Packet Downlink Assignment message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 | 1 <PERSISTENCE_LEVEL : bit (4) > * 4 }
+// { { 0 < Global TFI : < Global TFI IE > >
+// | 10 < TLLI : bit (32) > }
+// { 0 -- Message escape
+// { < MAC_MODE : bit (2) >
+// < RLC_MODE : bit (1) >
+// < CONTROL_ACK : bit (1) >
+// < TIMESLOT_ALLOCATION : bit (8) >
+// < Packet Timing Advance : < Packet Timing Advance IE > >
+// { 0 | 1 < P0 : bit (4) >
+// < BTS_PWR_CTRL_MODE : bit (1) >
+// < PR_MODE : bit (1) >}
+// { { 0 | 1 < Frequency Parameters : < Frequency Parameters IE > > }
+// { 0 | 1 < DOWNLINK_TFI_ASSIGNMENT : bit (5) > }
+// { 0 | 1 < Power Control Parameters : < Power Control Parameters IE > > }
+// { 0 | 1 < TBF Starting Time : < Starting Frame Number Description IE > > }
+// { 0 | 1 < Measurement Mapping : < Measurement Mapping struct > > }
+// < padding bits > } // -- truncation at end of message allowed, bits '0' assumed
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Message escape : 1 bit (*) = <no string> > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// < Measurement Mapping struct > ::=
+// < Measurement Starting Time : < Starting Frame Number Description IE > >
+// < MEASUREMENT_INTERVAL : bit (5) >
+// < MEASUREMENT_BITMAP : bit (8) > ;
+//
+// *******************************************************************
+
+class MsgPacketDownlinkAssignment : public DownlinkMsgBase {
+public:
+
+ // Message type is included in MsgBase.
+
+ // Distributed message contents
+ IePageMode pageMode;
+ struct PersistenceLevelStruct
+ {
+ IePersistenceLevel persistenceLevel[4];
+ bool isValid;
+ } PersistenceLevelParams;
+ IeGlobalTFI globalTFI;
+ IeTLLI tlli;
+ IeMacMode macMode;
+ IeRlcMode rlcMode;
+ bool controlAck;
+ IeTimeslotAllocation tsAllocation;
+ IePacketTimingAdvance timingAdvance;
+ struct PwrParamsStruct
+ {
+ IePO po;
+ IeBtsPowerCtlMode pCtlMode;
+ IePRMode prMode;
+ bool isValid;
+ } PwrParams;
+ IeFrequencyParameters frequencyParameters;
+ IeTFI dlTFIAssignment;
+ IePowerControlParameters powerControlParameters;
+ IeStartFrameNum tbfStartingTime;
+ MeasurementMappingStruct measMapping;
+
+ // Default constructor
+ MsgPacketDownlinkAssignment() : DownlinkMsgBase(RlcMacMsgType::PACKET_DOWNLINK_ASSIGNMENT),
+ pageMode(), globalTFI(), tlli(), macMode(), rlcMode(),
+ controlAck(FALSE), tsAllocation(), timingAdvance(), frequencyParameters(),
+ dlTFIAssignment(), powerControlParameters(), tbfStartingTime(), measMapping()
+ {
+ PwrParams.isValid = FALSE;
+ PersistenceLevelParams.isValid = FALSE;
+ }
+
+ // Default destructor
+ ~MsgPacketDownlinkAssignment() {}
+
+ // Pack IE into an output stream of bits.
+ RlcMacResult EncodeMsg(BitStreamOut &dataStream);
+
+ // Display IE details.
+ void DisplayMsgDetail();
+};
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketDownlinkDummyControlBlock.h b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketDownlinkDummyControlBlock.h
new file mode 100644
index 0000000..dfe89d9
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketDownlinkDummyControlBlock.h
@@ -0,0 +1,68 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketDownlinkDummyControlBlock.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MSGPACKETDOWNLINKDUMMYCONTROL_BLOCK_H__
+#define __MSGPACKETDOWNLINKDUMMYCONTROL_BLOCK_H__
+
+#include "MsgBase.h"
+#include "bitstream.h"
+#include "iePageMode.h"
+#include "iePersistenceLevel.h"
+
+
+// *******************************************************************
+// PACKET DOWNLINK DUMMY CONTROL BLOCK
+//
+// GSM 04.60 11.2.7
+//
+// < Packet Downlink Dummy Control Block message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 | 1 <PERSISTENCE_LEVEL : bit (4) > * 4 }
+// < padding bits >
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// *******************************************************************
+
+class MsgPacketDownlinkDummyControlBlock : public DownlinkMsgBase {
+public:
+
+ // Message type is included in MsgBase.
+
+ // Distributed message contents
+ IePageMode pageMode;
+ IePersistenceLevel persistenceLevel;
+
+ // Default constructor
+ MsgPacketDownlinkDummyControlBlock() :
+ DownlinkMsgBase(RlcMacMsgType::PACKET_DOWNLINK_DUMMY_CONTROL_BLOCK),
+ pageMode(), persistenceLevel()
+ {
+ }
+
+ // Default destructor
+ ~MsgPacketDownlinkDummyControlBlock() {}
+
+ // Pack IE into an output stream of bits.
+ RlcMacResult EncodeMsg(BitStreamOut &dataStream);
+
+ // Display IE details.
+ void DisplayMsgDetail();
+};
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketMobileTBFStatus.h b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketMobileTBFStatus.h
new file mode 100644
index 0000000..764c46b
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketMobileTBFStatus.h
@@ -0,0 +1,81 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketMobileTBFStatus.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MSGPACKETMOBILETBFSTATUS_H__
+#define __MSGPACKETMOBILETBFSTATUS_H__
+
+#include "MsgBase.h"
+#include "bitstream.h"
+#include "ieGlobalTFI.h"
+
+
+// *******************************************************************
+// PACKET MOBILE TBF STATUS
+//
+// GSM 04.60 11.2.9c
+//
+// < Packet Mobile TBF Status message content > ::=
+// < GLOBAL TFI : < Global TFI IE > >
+// < TBF_CAUSE : bit (3) >
+// { 0 | 1 < STATUS_MESSAGE_TYPE : bit (6) > }
+// < padding bits > ;
+//
+// *******************************************************************
+
+class MsgPacketMobileTBFStatus : public UplinkMsgBase {
+public:
+
+ typedef enum
+ {
+ NORMAL_EVENT,
+ STATUS_UNSPECIFIED,
+ NON_DISTRIBUTION_TYPE,
+ MESSAGE_ESCAPE,
+ INCOMPATIBLE_WITH_CURRENT_STATE
+ } TBF_CAUSE;
+
+ // Message type is included in MsgBase.
+
+ // Message contents
+ IeGlobalTFI globalTfi;
+ TBF_CAUSE tbfCause;
+ struct
+ {
+ bool isValid;
+ RlcMacMsgType msgType;
+ } StatusMsgType;
+
+ // Default constructor
+ MsgPacketMobileTBFStatus() : UplinkMsgBase(RlcMacMsgType::PACKET_MOBILE_TBF_STATUS),
+ globalTfi(), tbfCause(NORMAL_EVENT)
+ {
+ StatusMsgType.isValid = FALSE;
+ }
+
+ // Default destructor
+ ~MsgPacketMobileTBFStatus() {}
+
+ // Decode input stream of bits into message.
+ RlcMacResult DecodeMsg(BitStreamIn &dataStream);
+
+ // Display IE details.
+ void DisplayMsgDetail();
+};
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketPDCHRelease.h b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketPDCHRelease.h
new file mode 100644
index 0000000..8e6679d
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketPDCHRelease.h
@@ -0,0 +1,67 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketPDCHRelease.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MSGPACKETPDCHRELEASE_H__
+#define __MSGPACKETPDCHRELEASE_H__
+
+#include "MsgBase.h"
+#include "bitstream.h"
+#include "iePageMode.h"
+#include "ieTimeslotAllocation.h"
+
+
+// *******************************************************************
+// PACKET PDCH RELEASE
+//
+// GSM 04.60 11.2.11
+//
+// < Packet PDCH Release message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 | 1 < TIMESLOTS_AVAILABLE : bit (8) > }
+// < padding bits >
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// *******************************************************************
+
+class MsgPacketPDCHRelease : public DownlinkMsgBase {
+public:
+
+ // Message type is included in MsgBase.
+
+ // Distributed message contents
+ IePageMode pageMode;
+ IeTimeslotAllocation tsAllocation;
+
+ // Default constructor
+ MsgPacketPDCHRelease() : DownlinkMsgBase(RlcMacMsgType::PACKET_PDCH_RELEASE),
+ pageMode(), tsAllocation()
+ {
+ }
+
+ // Default destructor
+ ~MsgPacketPDCHRelease() {}
+
+ // Pack IE into an output stream of bits.
+ RlcMacResult EncodeMsg(BitStreamOut &dataStream);
+
+ // Display IE details.
+ void DisplayMsgDetail();
+};
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketPagingRequest.h b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketPagingRequest.h
new file mode 100644
index 0000000..39bc2e0
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketPagingRequest.h
@@ -0,0 +1,114 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketPagingRequest.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MSGPACKETPAGINGREQUEST_H__
+#define __MSGPACKETPAGINGREQUEST_H__
+
+#include "MsgBase.h"
+#include "bitstream.h"
+#include "iePageMode.h"
+#include "iePersistenceLevel.h"
+#include "ieNLN.h"
+#include "ieTMSI.h"
+#include "iePTMSI.h"
+#include "ieMobileIdentity.h"
+#include "ieChannelNeeded.h"
+#include "ieeMLPPPriority.h"
+
+#define MAX_NUM_REPEATED_PAGES 4
+
+// *******************************************************************
+// PACKET PAGING REQUEST
+//
+// GSM 04.60 11.2.10
+//
+// < Packet Paging Request message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 | 1 < PERSISTENCE_LEVEL : bit (4) >* 4}
+// { 0 | 1 < NLN : bit (2) > }
+// { { 1 < Repeated Page info : < Repeated Page info struct > > } ** 0
+// < padding bits > } // -- truncation at end of message allowed, bits '0' assumed
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// < Repeated Page info struct > ::=
+// { 0 -- Page request for TBF establishment
+// { 0 < PTMSI : bit (32) >
+// | 1 < Length of Mobile Identity contents : bit (4) >
+// < Mobile Identity : octet (val (Length of Mobile Identity contents)) > }
+// | 1 -- Page request for RR conn. establishment
+// { 0 < TMSI : bit (32) >
+// | 1 < Length of Mobile Identity contents : bit (4) >
+// < Mobile Identity : octet (val (Length of Mobile Identity contents)) > }
+// < CHANNEL_NEEDED : bit (2) >
+// { 0 | 1 < eMLPP_PRIORITY : bit (3) > } }
+// ! < Ignore : bit (*) = <no string> > ;
+//
+// *******************************************************************
+
+class MsgPacketPagingRequest : public DownlinkMsgBase {
+public:
+
+ // Message type is included in MsgBase.
+
+ // Distributed message contents
+ IePageMode pageMode;
+ IePersistenceLevel persistenceLevel;
+ IeNLN nln;
+ struct RepeatedPageInfoStruct
+ {
+ bool isValid;
+ struct TBFPageStruct
+ {
+ bool isValid;
+ IePTMSI ptmsi;
+ IeMobileIdentity mobileId;
+ } TBFPage;
+ struct RRConnPageStruct
+ {
+ bool isValid;
+ IeTMSI tmsi;
+ IeMobileIdentity mobileId;
+ IeChannelNeeded chanNeeded;
+ IeeMLPPPriority emlpPriority;
+ } RRConnPage;
+ } RepeatedPageInfo[MAX_NUM_REPEATED_PAGES];
+
+ // Default constructor
+ MsgPacketPagingRequest() : DownlinkMsgBase(RlcMacMsgType::PACKET_PAGING_REQUEST),
+ pageMode(), persistenceLevel(), nln()
+ {
+ for (int i = 0; i < MAX_NUM_REPEATED_PAGES; i++)
+ {
+ RepeatedPageInfo[i].isValid = FALSE;
+ RepeatedPageInfo[i].TBFPage.isValid = FALSE;
+ RepeatedPageInfo[i].RRConnPage.isValid = FALSE;
+ }
+ }
+
+ // Default destructor
+ ~MsgPacketPagingRequest() {}
+
+ // Pack IE into an output stream of bits.
+ RlcMacResult EncodeMsg(BitStreamOut &dataStream);
+
+ // Display IE details.
+ void DisplayMsgDetail();
+};
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketPollingRequest.h b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketPollingRequest.h
new file mode 100644
index 0000000..29a4099
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketPollingRequest.h
@@ -0,0 +1,83 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketPollingRequest.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MSGPACKETPOLLINGREQUEST_H__
+#define __MSGPACKETPOLLINGREQUEST_H__
+
+#include "MsgBase.h"
+#include "bitstream.h"
+#include "iePageMode.h"
+#include "ieGlobalTFI.h"
+#include "ieTLLI.h"
+#include "ieTQI.h"
+
+
+// *******************************************************************
+// PACKET POLLING REQUEST
+//
+// GSM 04.60 11.2.12
+//
+// < Packet Polling Request message content > ::=
+// < PAGE_MODE : bit (2) >
+// { { 0 < Global TFI : < Global TFI IE > >
+// | 10 < TLLI : bit (32) >
+// | 110 < TQI : bit (16) > }
+// < TYPE_OF_ACK : bit (1) >
+// { < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// *******************************************************************
+
+class MsgPacketPollingRequest : public DownlinkMsgBase {
+public:
+
+ typedef enum
+ {
+ ACK_MSG_FOUR_ACCESS_BURSTS,
+ ACK_MSG_RLCMAC_CONTROL_BLOCK,
+ INVALID_TYPE_OF_ACK=-1
+ } TYPE_OF_ACK;
+ // Message type is included in MsgBase.
+
+ // Distributed message contents
+ IePageMode pageMode;
+ IeGlobalTFI globalTFI;
+ IeTLLI tlli;
+ IeTQI tqi;
+ TYPE_OF_ACK typeOfAck;
+
+ // Default constructor
+ MsgPacketPollingRequest() : DownlinkMsgBase(RlcMacMsgType::PACKET_POLLING_REQUEST),
+ pageMode(), globalTFI(), tlli(), tqi(), typeOfAck(INVALID_TYPE_OF_ACK)
+ {
+ }
+
+ // Default destructor
+ ~MsgPacketPollingRequest() {}
+
+ // Pack IE into an output stream of bits.
+ RlcMacResult EncodeMsg(BitStreamOut &dataStream);
+
+ // Display IE details.
+ void DisplayMsgDetail();
+};
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketPowerCtlTimingAdvance.h b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketPowerCtlTimingAdvance.h
new file mode 100644
index 0000000..706cdfb
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketPowerCtlTimingAdvance.h
@@ -0,0 +1,90 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketPowerCtlTimingAdvance.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MSGPACKETPOWERCTLTIMINGADVANCE_H__
+#define __MSGPACKETPOWERCTLTIMINGADVANCE_H__
+
+#include "MsgBase.h"
+#include "bitstream.h"
+#include "iePageMode.h"
+#include "ieGlobalTFI.h"
+#include "ieTQI.h"
+#include "iePacketReqRef.h"
+#include "ieGlobalPowerControlParms.h"
+#include "iePowerControlParameters.h"
+#include "ieGlobalPacketTimingAdvance.h"
+
+
+// *******************************************************************
+// PACKET POWER CONTROL / TIMING ADVANCE
+//
+// GSM 04.60 11.2.13
+//
+// < Packet Power Control/Timing Advance message content > ::=
+// < PAGE_MODE : bit (2) >
+// { { 0 < Global TFI : < Global TFI IE > >
+// | 110 < TQI : bit (16) >
+// | 111 < Packet Request Reference : < Packet Request Reference IE > > }
+// { 0 -- Message escape
+// { { 0 | 1 < Global Power Control Parameters : < Global Power Control Parameters IE >> }
+// { 0 < Global Packet Timing Advance : < Global Packet Timing Advance IE > >
+// < Power Control Parameters : < Power Control Parameters IE > >
+// | 1 { 0 < Global Packet Timing Advance : < Global Packet Timing Advance IE > >
+// | 1 < Power Control Parameters : < Power Control parameters IE > > } }
+// < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Message escape : 1 bit (*) = <no string> > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// *******************************************************************
+
+class MsgPacketPowerCtlTimingAdvance : public DownlinkMsgBase {
+public:
+
+ // Message type is included in MsgBase.
+
+ // Distributed message contents
+ IePageMode pageMode;
+ IeGlobalTFI globalTFI;
+ IeTQI tqi;
+ IePacketReqRef packetReqRef;
+ IeGlobalPowerControlParms globalPowerControlParams;
+ IeGlobalPacketTimingAdvance globalTA;
+ IePowerControlParameters powerControlParameters;
+
+ // Default constructor
+ MsgPacketPowerCtlTimingAdvance() :
+ DownlinkMsgBase(RlcMacMsgType::PACKET_POWER_CONTROL_TIMING_ADVANCE),
+ pageMode(), globalTFI(), tqi(), globalPowerControlParams(),
+ packetReqRef(), globalTA(), powerControlParameters()
+ {
+ }
+
+ // Default destructor
+ ~MsgPacketPowerCtlTimingAdvance() {}
+
+ // Pack IE into an output stream of bits.
+ RlcMacResult EncodeMsg(BitStreamOut &dataStream);
+
+ // Display IE details.
+ void DisplayMsgDetail();
+};
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketResourceRequest.h b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketResourceRequest.h
new file mode 100644
index 0000000..b2d687f
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketResourceRequest.h
@@ -0,0 +1,109 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketResourceRequest.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MSGPACKETRESOURCEREQUEST_H__
+#define __MSGPACKETRESOURCEREQUEST_H__
+
+#include "MsgBase.h"
+#include "bitstream.h"
+#include "RlcMacCommon.h"
+#include "ieAckNackDescription.h"
+#include "ieChannelRequestDescription.h"
+#include "ieGlobalTFI.h"
+#include "ieTLLI.h"
+#include "ieAccessType.h"
+#include "ieMSRadioAccessCapability.h"
+#include "ieChangeMark.h"
+
+
+// *******************************************************************
+// PACKET RESOURCE REQUEST
+//
+// GSM 04.60 11.2.16
+//
+// < Packet Resource Request message content > ::=
+// { 0 | 1 < ACCESS_TYPE : bit (2) > }
+// { 0 < Global TFI : < Global TFI IE > >
+// | 1 < TLLI : < TLLI IE > > }
+// { 0 | 1 < MS Radio Access Capability : < MS Radio Access Capability IE > > }
+// < Channel Request Description : < Channel Request Description IE > >
+// { 0 | 1 < CHANGE_MARK : bit (2) > }
+// < C_VALUE : bit (6) >
+// { 0 | 1 < SIGN_VAR : bit (6) >}
+// { 0 | 1 < I_LEVEL_TN0 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN1 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN2 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN3 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN4 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN5 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN6 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN7 : bit (4) > }
+// < padding bits > ;
+//
+// *******************************************************************
+
+class MsgPacketResourceRequest : public UplinkMsgBase {
+public:
+
+
+ // Message type is included in MsgBase.
+
+ // Message contents
+ IeAccessType accessType;
+ IeGlobalTFI globalTfi;
+ IeTLLI tlli;
+ IeMSRadioAccessCapability msRadioAccessCapability;
+ IeChannelRequestDescription chanReqDescription;
+ IeChangeMark changeMark;
+ unsigned char cValue;
+ struct SignVarStruct
+ {
+ unsigned char signVar;
+ bool isValid;
+ } SignVar;
+ struct ILevelStruct
+ {
+ unsigned char iLevel;
+ bool isValid;
+ } ILevel[MAX_TIMESLOTS];
+
+ // Default constructor
+ MsgPacketResourceRequest() : UplinkMsgBase(RlcMacMsgType::PACKET_RESOURCE_REQUEST),
+ accessType(), globalTfi(), tlli(), msRadioAccessCapability(), chanReqDescription(),
+ changeMark(), cValue(0)
+ {
+ for (int i=0; i < MAX_TIMESLOTS; i++)
+ {
+ ILevel[i].isValid = FALSE;
+ }
+
+ SignVar.isValid = FALSE;
+ }
+
+ // Default destructor
+ ~MsgPacketResourceRequest() {}
+
+ // Decode input stream of bits into message.
+ RlcMacResult DecodeMsg(BitStreamIn &dataStream);
+
+ // Display IE details.
+ void DisplayMsgDetail();
+};
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketTBFRelease.h b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketTBFRelease.h
new file mode 100644
index 0000000..66f117d
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketTBFRelease.h
@@ -0,0 +1,88 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketTBFRelease.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MSGPACKETTBFRELEASE_H__
+#define __MSGPACKETTBFRELEASE_H__
+
+#include "MsgBase.h"
+#include "bitstream.h"
+#include "iePageMode.h"
+#include "ieGlobalTFI.h"
+
+
+// *******************************************************************
+// PACKET TBF RELEASE
+//
+// GSM 04.60 11.2.26
+//
+// < Packet TBF Release message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 < GLOBAL_TFI : Global TFI IE >
+// { < UPLINK_RELEASE : bit (1) >
+// < DOWNLINK_RELEASE : bit (1) >
+// < TBF_RELEASE_CAUSE : bit (4) = { 0000 | 0010 } >
+// < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// *******************************************************************
+
+class MsgPacketTBFRelease : public DownlinkMsgBase {
+public:
+
+ typedef enum
+ {
+ TBF_NOT_RELEASED,
+ TBF_RELEASED
+ } TBF_RELEASE_INDICATION;
+
+ typedef enum
+ {
+ NORMAL_RELEASE,
+ ABNORMAL_RELEASE
+ } TBF_RELEASE_CAUSE;
+
+ // Message type is included in MsgBase.
+
+ // Distributed message contents
+ IePageMode pageMode;
+ IeGlobalTFI globalTFI;
+ TBF_RELEASE_INDICATION uplinkRel;
+ TBF_RELEASE_INDICATION downlinkRel;
+ TBF_RELEASE_CAUSE relCause;
+
+ // Default constructor
+ MsgPacketTBFRelease() : DownlinkMsgBase(RlcMacMsgType::PACKET_TBF_RELEASE),
+ pageMode(), globalTFI(), uplinkRel(TBF_NOT_RELEASED),
+ downlinkRel(TBF_NOT_RELEASED) , relCause(NORMAL_RELEASE)
+ {
+ }
+
+ // Default destructor
+ ~MsgPacketTBFRelease() {}
+
+ // Pack IE into an output stream of bits.
+ RlcMacResult EncodeMsg(BitStreamOut &dataStream);
+
+ // Display IE details.
+ void DisplayMsgDetail();
+};
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketTimeslotReconfigure.h b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketTimeslotReconfigure.h
new file mode 100644
index 0000000..59eb471
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketTimeslotReconfigure.h
@@ -0,0 +1,159 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketTimeslotReconfigure.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MSGPACKETTIMESLOTRECONFIGURE_H__
+#define __MSGPACKETTIMESLOTRECONFIGURE_H__
+
+#include "MsgBase.h"
+#include "bitstream.h"
+#include "iePageMode.h"
+#include "ieGlobalTFI.h"
+#include "ieGlobalPacketTimingAdvance.h"
+#include "ieRLCMode.h"
+#include "ieTFI.h"
+#include "ieTimeslotAllocation.h"
+#include "ieFrequencyParameters.h"
+#include "ieChannelCodingCommand.h"
+#include "DynamicAllocationStruct.h"
+#include "FixedAllocationStruct.h"
+
+
+// *******************************************************************
+// PACKET TIMESLOT RECONFIGURE
+//
+// GSM 04.60 11.2.31
+//
+// < Packet Timeslot Reconfigure message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 < GLOBAL_TFI : < Global TFI IE > >
+// { 0 -- Message escape
+// { < CHANNEL_CODING_COMMAND : bit (2) >
+// < Global Packet Timing Advance : < Global Packet Timing Advance IE > >
+// < DOWNLINK_RLC_MODE : bit (1) >
+// < CONTROL_ACK : bit (1) >
+// { 0 | 1 < DOWNLINK_TFI_ASSIGNMENT : bit (5) > }
+// { 0 | 1 < UPLINK_TFI_ASSIGNMENT : bit (5) > }
+// < DOWNLINK_TIMESLOT_ALLOCATION : bit (8) >
+// { 0 | 1 < Frequency Parameters : < Frequency Parameters IE > > }
+// { 0 < Dynamic Allocation : < Dynamic Allocation struct > >
+// | 1 < Fixed allocation : < Fixed Allocation struct > >}
+// < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Message escape : 1 bit (*) = <no string> > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// <Dynamic Allocation struct > ::=
+// < Extended Dynamic Allocation : bit (1) >
+// { 0 | 1 < P0 : bit (4) >
+// < PR_MODE : bit (1) > }
+// < USF_GRANULARITY : bit (1) >
+// { 0 | 1 < RLC_DATA_BLOCKS_GRANTED : bit (8) > }
+// { 0 | 1 < TBF Starting Time : < Starting Frame Number Description IE > > }
+// { 0 -- Timeslot Allocation
+// { 0 | 1 < USF_TN0 : bit (3) > }
+// { 0 | 1 < USF_TN1 : bit (3) > }
+// { 0 | 1 < USF_TN2 : bit (3) > }
+// { 0 | 1 < USF_TN3 : bit (3) > }
+// { 0 | 1 < USF_TN4 : bit (3) > }
+// { 0 | 1 < USF_TN5 : bit (3) > }
+// { 0 | 1 < USF_TN6 : bit (3) > }
+// { 0 | 1 < USF_TN7 : bit (3) > }
+// | 1 -- Timeslot Allocation with Power Control Parameters
+// < ALPHA : bit (4) >
+// { 0 | < USF_TN0 : bit (3) >
+// < GAMMA_TN0 : bit (5) > }
+// { 0 | 1 < USF_TN1 : bit (3) >
+// < GAMMA_TN1 : bit (5) > }
+// { 0 | 1 < USF_TN2 : bit (3) >
+// < GAMMA_TN2 : bit (5) > }
+// { 0 | 1 < USF_TN3 : bit (3) >
+// < GAMMA_TN3 : bit (5) > }
+// { 0 | 1 < USF_TN4 : bit (3) >
+// < GAMMA_TN4 : bit (5) > }
+// { 0 | 1 < USF_TN5 : bit (3) >
+// < GAMMA_TN5 : bit (5) > }
+// { 0 | 1 < USF_TN6 : bit (3) >
+// < GAMMA_TN6 : bit (5) > }
+// { 0 | 1 < USF_TN7 : bit (3) >
+// < GAMMA_TN7 : bit (5) > } } ;
+//
+// <Fixed Allocation struct > ::=
+// { 0 < UPLINK_TIMESLOT_ALLOCATION : bit (8) >
+// | 1 < Power Control Parameters : < Power Control Parameters IE > > }
+// < FINAL_ALLOCATION : bit (1) >
+// < DOWNLINK_CONTROL_TIMESLOT: bit (3) >
+// { 0 | 1 < P0 : bit (4) >
+// < BTS_PWR_CTRL_MODE : bit (1) >
+// < PR_MODE : bit (1) > }
+// { 0 | 1 < Measurement Mapping : < Measurement Mapping struct > > }
+// < TBF Starting Time : < Starting Frame Number Description IE > >
+// { 0 { 0 -- with length of Allocation Bitmap
+// < BLOCKS_OR_BLOCK_PERIODS : bit (1) >
+// < ALLOCATION_BITMAP_LENGTH : bit (7) >
+// < ALLOCATION_BITMAP : bit (val(ALLOCATION_BITMAP_LENGTH)) >
+// | 1 -- without length of Allocation Bitmap (fills remainder of the message)
+// < ALLOCATION_BITMAP : bit ** > }
+// ! < Message escape : 1 bit (*) = <no string> > } ;
+//
+// < Measurement Mapping struct > ::=
+// < Measurement Starting Time : < Starting Frame Number Description IE >
+// < MEASUREMENT_INTERVAL : bit (5) >
+// < MEASUREMENT_BITMAP : bit (8) > ;
+//
+// *******************************************************************
+
+class MsgPacketTimeslotReconfigure : public DownlinkMsgBase {
+public:
+
+ // Message type is included in MsgBase.
+
+ // Distributed message contents
+ IePageMode pageMode;
+ IeGlobalTFI globalTFI;
+ IeChannelCodingCommand chanCoding;
+ IeGlobalPacketTimingAdvance globalTimingAdvance;
+ IeRlcMode dlRlcMode;
+ bool controlAck;
+ IeTFI dlTfi;
+ IeTFI ulTfi;
+ IeTimeslotAllocation dlTimeslotAllocation;
+ IeFrequencyParameters frequencyParameters;
+ DynamicAllocationStruct dynamicAllocation;
+ FixedAllocationStruct fixedAllocation;
+
+ // Default constructor
+ MsgPacketTimeslotReconfigure() : DownlinkMsgBase(RlcMacMsgType::PACKET_TIMESLOT_RECONFIGURE),
+ pageMode(), globalTFI(), chanCoding(), globalTimingAdvance(), dlRlcMode(),
+ dlTfi(), ulTfi(), dlTimeslotAllocation(), frequencyParameters(), dynamicAllocation(),
+ fixedAllocation()
+ {
+ }
+
+ // Default destructor
+ ~MsgPacketTimeslotReconfigure() {}
+
+ // Pack IE into an output stream of bits.
+ RlcMacResult EncodeMsg(BitStreamOut &dataStream);
+
+ // Display IE details.
+ void DisplayMsgDetail();
+};
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketUplinkAckNack.h b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketUplinkAckNack.h
new file mode 100644
index 0000000..ea0141a
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketUplinkAckNack.h
@@ -0,0 +1,105 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketUplinkAckNack.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MSGPACKETUPLINKACKNACK_H__
+#define __MSGPACKETUPLINKACKNACK_H__
+
+#include "MsgBase.h"
+#include "bitstream.h"
+#include "iePageMode.h"
+#include "iePacketTimingAdvance.h"
+#include "ieTFI.h"
+#include "ieChannelCodingCommand.h"
+#include "ieAckNackDescription.h"
+#include "FixedAllocationStruct.h"
+#include "ieTLLI.h"
+
+
+// *******************************************************************
+// PACKET UPLINK ACK NACK
+//
+// GSM 04.60 11.2.28
+//
+// < Packet Uplink Ack/Nack message content > ::=
+// < PAGE MODE : bit (2) >
+// { 00 < UPLINK_TFI : bit (5) >
+// { 0 -- Message escape
+// { < CHANNEL_CODING_COMMAND : bit (2) >
+// < Ack/Nack Description : < Ack/Nack Description IE > >
+// { 0 | 1 < CONTENTION_RESOLUTION_TLLI : bit (32) > }
+// { 0 | 1 < Packet Timing Advance : < Packet Timing Advance IE > > }
+// { 0 | 1 < Power Control Parameters : < Power Control Parameters IE > > }
+// { 0 | 1 < Extension Bits : Extension Bits IE > } -- sub-clause 12.26
+// { 0 | 1 < Fixed Allocation Parameters : < Fixed Allocation struct > > }
+// < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Message escape : 1 bit (*) = <no string> > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// < Fixed Allocation struct > ::=
+// < FINAL_ALLOCATION : bit (1) >
+// { 0 -- Repeat Allocation
+// < TS_OVERRIDE : bit (8) >
+// | 1 -- Allocation with Allocation bitmap
+// < TBF Starting Time : < Starting Frame Number Description IE > >
+// { 0 | 1 <TIMESLOT_ALLOCATION : bit (8) > }
+// { 0 { 0 -- with length of Allocation Bitmap
+// < BLOCKS_OR_BLOCK_PERIODS : bit (1) >
+// < ALLOCATION_BITMAP_LENGTH : bit (7) >
+// < ALLOCATION_BITMAP : bit (val(ALLOCATION_BITMAP_LENGTH)) >
+// | 1 -- without length of Allocation Bitmap (fills remainder of the message)
+// < ALLOCATION_BITMAP : bit ** > } }
+// ! < Message escape : 1 bit (*) = <no string> >;
+//
+// *******************************************************************
+
+class MsgPacketUplinkAckNack : public DownlinkMsgBase {
+public:
+
+ // Message type is included in MsgBase.
+
+ // Distributed message contents
+ IePageMode pageMode;
+ IeTFI uplinkTFI;
+ IeChannelCodingCommand chanCoding;
+ IeAckNackDescription ackNackDescription;
+ IeTLLI contentionResTLLI;
+ IePacketTimingAdvance timingAdvance;
+ IePowerControlParameters powerControlParameters;
+ FixedAllocationStruct fixedAllocation;
+
+ // Default constructor
+ MsgPacketUplinkAckNack() : DownlinkMsgBase(RlcMacMsgType::PACKET_UPLINK_ACK_NACK),
+ pageMode(), uplinkTFI(), chanCoding(), contentionResTLLI(), ackNackDescription(),
+ timingAdvance(), powerControlParameters(), fixedAllocation()
+ {
+ }
+
+ // Default destructor
+ ~MsgPacketUplinkAckNack() {}
+
+ // Pack IE into an output stream of bits.
+ RlcMacResult EncodeMsg(BitStreamOut &dataStream);
+
+ // Display IE details.
+ void DisplayMsgDetail();
+};
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketUplinkAssignment.h b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketUplinkAssignment.h
new file mode 100644
index 0000000..9ccf2c1
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketUplinkAssignment.h
@@ -0,0 +1,183 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketUplinkAssignment.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MSGPACKETUPLINKASSIGNMENT_H__
+#define __MSGPACKETUPLINKASSIGNMENT_H__
+
+#include "MsgBase.h"
+#include "bitstream.h"
+#include "iePageMode.h"
+#include "iePersistenceLevel.h"
+#include "ieTLLI.h"
+#include "iePacketReqRef.h"
+#include "ieGlobalTFI.h"
+#include "ieTQI.h"
+#include "iePacketTimingAdvance.h"
+#include "ieFrequencyParameters.h"
+#include "ieChannelCodingCommand.h"
+#include "DynamicAllocationStruct.h"
+#include "SingleBlockAllocationStruct.h"
+#include "FixedAllocationStruct.h"
+
+
+// *******************************************************************
+// PACKET UPLINK ASSIGNMENT
+//
+// GSM 04.60 11.2.29
+//
+// < Packet Uplink Assignment message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 | 1 <PERSISTENCE_LEVEL : bit (4) > * 4 }
+// { { 0 < Global TFI : < Global TFI IE > >
+// | 10 < TLLI : bit (32) >
+// | 110 < TQI : bit (16) >
+// | 111 < Packet Request Reference : < Packet Request Reference IE > > }
+// { 0 -- Message escape
+// { < CHANNEL_CODING_COMMAND : bit (2) >
+// < TLLI_BLOCK_CHANNEL_CODING : bit (1) >
+// < Packet Timing Advance : < Packet Timing Advance IE > >
+// { 0 | 1 < Frequency Parameters : < Frequency Parameters IE > > }
+// { 01 <Dynamic Allocation : < Dynamic Allocation struct > >
+// | 10 <Single Block Allocation : < Single Block Allocation struct > >
+// | 00 < extension >
+// | 11 < Fixed allocation : < Fixed Allocation struct > > }
+// < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Message escape : 1 bit (*) = <no string> > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// <extension> ::= -- Future extension can be done by modifying this structure
+// null ;
+//
+// <Dynamic Allocation struct > ::=
+// < Extended Dynamic Allocation : bit (1) >
+// { 0 | 1 < P0 : bit (4) >
+// < PR_MODE : bit (1) > }
+// < USF_GRANULARITY : bit (1) >
+// { 0 | 1 < UPLINK_TFI_ASSIGNMENT : bit (5) > }
+// { 0 | 1 < RLC_DATA_BLOCKS_GRANTED : bit (8) > }
+// { 0 | 1 < TBF Starting Time : < Starting Frame Number Description IE > > }
+// { 0 -- Timeslot Allocation
+// { 0 | 1 < USF_TN0 : bit (3) > }
+// { 0 | 1 < USF_TN1 : bit (3) > }
+// { 0 | 1 < USF_TN2 : bit (3) > }
+// { 0 | 1 < USF_TN3 : bit (3) > }
+// { 0 | 1 < USF_TN4 : bit (3) > }
+// { 0 | 1 < USF_TN5 : bit (3) > }
+// { 0 | 1 < USF_TN6 : bit (3) > }
+// { 0 | 1 < USF_TN7 : bit (3) > }
+// | 1 -- Timeslot Allocation with Power Control Parameters
+// < ALPHA : bit (4) >
+// { 0 | 1 < USF_TN0 : bit (3) >
+// < GAMMA_TN0 : bit (5) > }
+// { 0 | 1 < USF_TN1 : bit (3) >
+// < GAMMA_TN1 : bit (5) > }
+// { 0 | 1 < USF_TN2 : bit (3) >
+// < GAMMA_TN2 : bit (5) > }
+// { 0 | 1 < USF_TN3 : bit (3) >
+// < GAMMA_TN3 : bit (5) > }
+// { 0 | 1 < USF_TN4 : bit (3) >
+// < GAMMA_TN4 : bit (5) > }
+// { 0 | 1 < USF_TN5 : bit (3) >
+// < GAMMA_TN5 : bit (5) > }
+// { 0 | 1 < USF_TN6 : bit (3) >
+// < GAMMA_TN6 : bit (5) > }
+// { 0 | 1 < USF_TN7 : bit (3) >
+// < GAMMA_TN7 : bit (5) > } } ;
+//
+// <Single Block Allocation struct > ::=
+// < TIMESLOT_NUMBER : bit (3) >
+// { 0 | 1 < ALPHA : bit (4) >
+// < GAMMA_TN : bit (5) >}
+// { 0 | 1 < P0 : bit (4) >
+// < BTS_PWR_CTRL_MODE : bit (1) >
+// < PR_MODE : bit (1) > }
+// < TBF Starting Time : < Starting Frame Number Description IE > > ;
+//
+// <Fixed Allocation struct > ::=
+// { 0 | 1 < UPLINK_TFI_ASSIGNMENT : bit (5) > }
+// < FINAL_ALLOCATION : bit (1) >
+// < DOWNLINK_CONTROL_TIMESLOT: bit (3) >
+// { 0 | 1 < P0 : bit (4) >
+// < BTS_PWR_CTRL_MODE : bit (1) >
+// < PR_MODE : bit (1) > }
+// { 0 < TIMESLOT_ALLOCATION : bit (8) >
+// | 1 < Power Control Parameters : < Power Control Parameters IE > > }
+// < HALF_DUPLEX_MODE : bit (1) >
+// < TBF Starting Time : < Starting Frame Number Description IE > >
+// { 0 { 0 -- with length of Allocation Bitmap
+// < BLOCKS_OR_BLOCK_PERIODS : bit (1) >
+// < ALLOCATION_BITMAP_LENGTH : bit (7) >
+// < ALLOCATION_BITMAP : bit (val(ALLOCATION_BITMAP_LENGTH)) >
+// | 1 -- without length of Allocation Bitmap (fills remainder of the message)
+// < ALLOCATION_BITMAP : bit ** > }
+// ! < Message escape : 1 bit (*) = <no string> > } ;
+//
+// *******************************************************************
+
+class MsgPacketUplinkAssignment : public DownlinkMsgBase {
+public:
+
+ typedef enum
+ {
+ USE_CS1_FOR_DATA_BLK_WITH_TLLI,
+ USE_COMMANDED_CS_FOR_DATA_BLOCK_WITH_TLLI
+ } TLLI_BLOCK_CHANNEL_CODING;
+ // Message type is included in MsgBase.
+
+ // Distributed message contents
+ IePageMode pageMode;
+ struct PersistenceLevelStruct
+ {
+ IePersistenceLevel persistenceLevel[4];
+ bool isValid;
+ } PersistenceLevelParams;
+ IeGlobalTFI globalTFI;
+ IeTLLI tlli;
+ IeTQI tqi;
+ IePacketReqRef packetReqRef;
+ IePacketTimingAdvance timingAdvance;
+ IeChannelCodingCommand chanCoding;
+ TLLI_BLOCK_CHANNEL_CODING tlliBlockCoding;
+ IeFrequencyParameters frequencyParameters;
+ DynamicAllocationStruct dynamicAllocation;
+ SingleBlockAllocationStruct singleBlockAllocation;
+ FixedAllocationStruct fixedAllocation;
+
+ // Default constructor
+ MsgPacketUplinkAssignment() : DownlinkMsgBase(RlcMacMsgType::PACKET_UPLINK_ASSIGNMENT),
+ pageMode(), globalTFI(), tlli(), tqi(), packetReqRef(),
+ timingAdvance(), frequencyParameters(), dynamicAllocation(), singleBlockAllocation(),
+ fixedAllocation()
+ {
+ PersistenceLevelParams.isValid = FALSE;
+ }
+
+ // Default destructor
+ ~MsgPacketUplinkAssignment() {}
+
+ // Pack IE into an output stream of bits.
+ RlcMacResult EncodeMsg(BitStreamOut &dataStream);
+
+ // Display IE details.
+ void DisplayMsgDetail();
+};
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketUplinkDummyControlBlock.h b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketUplinkDummyControlBlock.h
new file mode 100644
index 0000000..36c8bfe
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/MsgPacketUplinkDummyControlBlock.h
@@ -0,0 +1,63 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketUplinkDummyControlBlock.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __MSGPACKETUPLINKDUMMYCONTROLBLOCK_H__
+#define __MSGPACKETUPLINKDUMMYCONTROLBLOCK_H__
+
+#include "MsgBase.h"
+#include "bitstream.h"
+#include "ieTLLI.h"
+
+
+// *******************************************************************
+// PACKET UPLINK DUMMY CONTROL BLOCK
+//
+// GSM 04.60 11.2.8b
+//
+// < Packet Uplink Dummy Control Block message content > ::=
+// < TLLI : bit (32) >
+// < padding bits > ;
+//
+// *******************************************************************
+
+class MsgPacketUplinkDummyControlBlock : public UplinkMsgBase {
+public:
+
+ // Message type is included in MsgBase.
+
+ // Message contents
+ IeTLLI tlli;
+
+ // Default constructor
+ MsgPacketUplinkDummyControlBlock() : UplinkMsgBase(RlcMacMsgType::PACKET_UPLINK_DUMMY_CONTROL_BLOCK),
+ tlli()
+ {
+ }
+
+ // Default destructor
+ ~MsgPacketUplinkDummyControlBlock() {}
+
+ // Decode input stream of bits into message.
+ RlcMacResult DecodeMsg(BitStreamIn &dataStream);
+
+ // Display IE details.
+ void DisplayMsgDetail();
+};
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/NCMeasurementStruct.h b/data/mnet/GP10/Host/Rlc_mac/include/NCMeasurementStruct.h
new file mode 100644
index 0000000..c1e9866
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/NCMeasurementStruct.h
@@ -0,0 +1,94 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : NCMeasurementStruct.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __NCMEASUREMENTSTRUCT_H__
+#define __NCMEASUREMENTSTRUCT_H__
+
+#include "logging\vclogging.h"
+#include "bitstream.h"
+
+
+// *******************************************************************
+// class NCMeasurementStruct
+//
+// Description:
+// NC Measurement Struct -- GSM04.60 11.2.4
+//
+// < NC Measurement Parameters struct > ::=
+// < NETWORK_CONTROL_ORDER : bit (2) >
+// { 0 | 1 < NC_NON_DRX_PERIOD : bit (3) >
+// < NC_REPORTING_PERIOD_I : bit (3) >
+// < NC_REPORTING_PERIOD_T : bit (3) > }
+// { 0 | 1 < NC_FREQUENCY_LIST : NC Frequency list struct > } ;
+// *******************************************************************
+
+class NCMeasParamStruct {
+public:
+
+ typedef enum
+ {
+ NC0,
+ NC1,
+ NC2,
+ Reserved
+ } NETWORK_CONTROL_ORDER;
+
+ typedef enum
+ {
+ NO_NON_DRX_MODE,
+ NON_DRX_PERIOD_0_24_SECONDS,
+ NON_DRX_PERIOD_0_48_SECONDS,
+ NON_DRX_PERIOD_0_72_SECONDS,
+ NON_DRX_PERIOD_0_96_SECONDS,
+ NON_DRX_PERIOD_1_20_SECONDS,
+ NON_DRX_PERIOD_1_44_SECONDS,
+ NON_DRX_PERIOD_1_92_SECONDS
+ } NC_NON_DRX_PERIOD;
+
+ typedef enum
+ {
+ REPORTING_PER_0_48_SECONDS,
+ REPORTING_PER_0_96_SECONDS,
+ REPORTING_PER_1_96_SECONDS,
+ REPORTING_PER_3_84_SECONDS,
+ REPORTING_PER_7_68_SECONDS,
+ REPORTING_PER_15_36_SECONDS,
+ REPORTING_PER_30_72_SECONDS,
+ REPORTING_PER_61_44_SECONDS
+ } NC_REPORTING_PERIOD;
+
+ NETWORK_CONTROL_ORDER netCtlOrder;
+ struct PeriodInfoStruct
+ {
+ NC_NON_DRX_PERIOD nonDrxPeriod;
+ NC_REPORTING_PERIOD reportingPeriodI;
+ NC_REPORTING_PERIOD reportingPeriodT;
+ bool isValid;
+ } periodInfo;
+ bool isValid;
+
+ // Default constructor
+ NCMeasParamStruct() : isValid(FALSE), netCtlOrder(NC0)
+ {
+ bzero((char *)&periodInfo, sizeof(periodInfo));
+ }
+
+ RlcMacResult EncodeNCMeasParamStruct(BitStreamOut &dataStream);
+ void DisplayNCMeasParamStruct(DbgOutput *outObj);
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/RlcMacCommon.h b/data/mnet/GP10/Host/Rlc_mac/include/RlcMacCommon.h
new file mode 100644
index 0000000..7dbc51d
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/RlcMacCommon.h
@@ -0,0 +1,64 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : RlcMacCommon.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __RLCMACCOMMON_H__
+#define __RLCMACCOMMON_H__
+
+#include "oam_api.h"
+#include "JCErr.h"
+
+#define RLC_MAC_MAX_RF_FREQS 64
+#define MAX_TFI 32
+#define MAX_NUM_RADIO_PRIORITY 4
+#define MAX_ALPHA_VALUE 16
+#define MAX_TIMESLOTS 8
+#define MAX_TRX 2
+#define MAX_USF_PER_TS 8
+#define MAX_TAI_PER_TS 16
+#define MAX_DATA_RTS_COUNT 1
+#define MAX_SIGNALLING_RTS_COUNT 2
+#define RLC_MOD_VAL 128
+#define MAX_RTI_VAL 32
+#define MAX_RLC_PDU_SIZE 1560
+#define CTL_ACK_TAG_NOT_APPLICABLE 0xff
+#define RLC_MAC_NORMAL_BURST 0
+#define RLC_MAC_ACCESS_BURST 1
+
+#define MAX_ALLOWED_INACTIVE_TIME 100 // in 100's of ms
+
+
+typedef enum
+{
+ MS_ID_TLLI,
+ MS_ID_GLOBAL_TFI
+} MS_ID_TYPE;
+
+
+// Common DSP and Layer one settings
+#define RELATIVE_START_TIME_VAL 1
+
+typedef enum { DL, UL } LinkDirection;
+
+inline int GetMibValueInt(MibTag tag)
+{
+ long val;
+ oam_getMibIntVar(tag, &val);
+ return ((int)val);
+}
+
+
+#endif
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/RlcMacConfig.h b/data/mnet/GP10/Host/Rlc_mac/include/RlcMacConfig.h
new file mode 100644
index 0000000..4c57508
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/RlcMacConfig.h
@@ -0,0 +1,34 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : RlcMacConfig.h
+// Author(s) : Tim Olson
+// Create Date : 10/31/00
+// Description :
+//
+// *******************************************************************
+
+#ifndef __RLCMACCONFIG_H__
+#define __RLCMACCONFIG_H__
+
+#include "bssgp/bssgp_api.h"
+
+// Maximum message size passed to the RlcMacTask
+const int RLCMAC_MAX_MSG_LENGTH = sizeof(BSSGP_API_MSG);
+
+// Maximum number of messages to the RlcMacTask.
+const int RLCMAC_MAX_MSGS = 100;
+
+#define RLCMAC_TASK_NAME "RlcMacTask"
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/RlcMacMsgType.h b/data/mnet/GP10/Host/Rlc_mac/include/RlcMacMsgType.h
new file mode 100644
index 0000000..cda502c
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/RlcMacMsgType.h
@@ -0,0 +1,143 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : RlcMacMsgType.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __RLCMACMSGTYPE_H__
+#define __RLCMACMSGTYPE_H__
+
+#include "bitstream.h"
+#include "RlcMacResult.h"
+
+// Message types defined for RLC/MAC operation.
+// GSM04.60 11.2.0
+
+#define MAX_RLC_MAC_MSG_NAME_SIZE 128
+
+extern char UplinkMsgNames[][MAX_RLC_MAC_MSG_NAME_SIZE];
+extern char NonDistributedDownlinkMsgNames[][MAX_RLC_MAC_MSG_NAME_SIZE];
+extern char DistributedDownlinkMsgNames[][MAX_RLC_MAC_MSG_NAME_SIZE];
+extern char SysInfoDownlinkMsgNames[][MAX_RLC_MAC_MSG_NAME_SIZE];
+
+// *******************************************************************
+// class MsgBase
+//
+// Description
+//
+// *******************************************************************
+
+class RlcMacMsgType
+{
+public:
+
+ // Downlink RLC/MAC messages 11.2.0.1
+ typedef enum {
+ PACKET_CELL_CHANGE_ORDER = 0x01,
+ PACKET_DOWNLINK_ASSIGNMENT = 0x02,
+ PACKET_MEASUREMENT_ORDER = 0x03,
+ PACKET_POLLING_REQUEST = 0x04,
+ PACKET_POWER_CONTROL_TIMING_ADVANCE = 0x05,
+ PACKET_QUEUEING_NOTIFICATION = 0x06,
+ PACKET_TIMESLOT_RECONFIGURE = 0x07,
+ PACKET_TBF_RELEASE = 0x08,
+ PACKET_UPLINK_ACK_NACK = 0x09,
+ PACKET_UPLINK_ASSIGNMENT = 0x0A,
+ RLC_MAC_MAX_NONDISTRIBUTED_DOWNLINK_MSG
+ } RLC_MAC_NONDISTRIBUTED_DOWNLINK_MSGS;
+
+ typedef enum {
+ PACKET_ACCESS_REJECT = 0x21,
+ PACKET_PAGING_REQUEST = 0x22,
+ PACKET_PDCH_RELEASE = 0x23,
+ PACKET_PRACH_PARAMETERS = 0x24,
+ PACKET_DOWNLINK_DUMMY_CONTROL_BLOCK = 0x25,
+ RLC_MAC_MAX_DISTRIBUTED_DOWNLINK_MSG
+ } RLC_MAC_DISTRIBUTED_DOWNLINK_MSGS;
+
+ typedef enum {
+ PACKET_SYSTEM_INFO_1 = 0x31,
+ PACKET_SYSTEM_INFO_2 = 0x32,
+ PACKET_SYSTEM_INFO_3 = 0x33,
+ PACKET_SYSTEM_INFO_3_BIS = 0x34,
+ PACKET_SYSTEM_INFO_4 = 0x35,
+ PACKET_SYSTEM_INFO_5 = 0x36,
+ PACKET_SYSTEM_INFO_13 = 0x37,
+ RLC_MAC_MAX_SYSINFO_MSG
+ } RLC_MAC_SYSINFO_DOWNLINK_MSGS;
+
+ // Uplink RLC/MAC messages 11.2.0.2
+ typedef enum {
+ PACKET_CELL_CHANGE_FAILURE = 0x00,
+ PACKET_CONTROL_ACK = 0x01,
+ PACKET_DOWNLINK_ACK_NACK = 0x02,
+ PACKET_UPLINK_DUMMY_CONTROL_BLOCK = 0x03,
+ PACKET_MEASUREMENT_REPORT = 0x04,
+ PACKET_RESOURCE_REQUEST = 0x05,
+ PACKET_MOBILE_TBF_STATUS = 0x06,
+ PACKET_PSI_STATUS = 0x07,
+ PACKET_CONTROL_ACK_8_BIT = 0x1f,
+ RLC_MAC_MAX_UPLINK_MSG
+ } RLC_MAC_UPLINK_MSGS;
+
+ // Constructors
+ RlcMacMsgType(RLC_MAC_NONDISTRIBUTED_DOWNLINK_MSGS type) : msgType(type) {}
+ RlcMacMsgType(RLC_MAC_DISTRIBUTED_DOWNLINK_MSGS type) : msgType(type) {}
+ RlcMacMsgType(RLC_MAC_SYSINFO_DOWNLINK_MSGS type) : msgType(type) {}
+ RlcMacMsgType(RLC_MAC_UPLINK_MSGS type) : msgType(type) {}
+ RlcMacMsgType(){}
+
+ // Pack message type into a single ouput stream of bits
+ RlcMacResult EncodeMsgType(BitStreamOut &dataStream);
+
+ // Extract message type from a single input stream of bits
+ RlcMacResult DecodeMsgType(BitStreamIn &dataStream);
+
+ // Return a printable message type string.
+ char *DisplayDownlinkMsgType()
+ {
+ if ((msgType < RLC_MAC_MAX_NONDISTRIBUTED_DOWNLINK_MSG) &&
+ (msgType > 0))
+ {
+ return (NonDistributedDownlinkMsgNames[msgType]);
+ }
+ else if ((msgType < RLC_MAC_MAX_DISTRIBUTED_DOWNLINK_MSG) &&
+ (msgType > 0x20))
+ {
+ return (DistributedDownlinkMsgNames[msgType & 0xDF]);
+ }
+ else if ((msgType < RLC_MAC_MAX_SYSINFO_MSG) && (msgType > 0x30))
+ {
+ return (SysInfoDownlinkMsgNames[msgType & 0xCF]);
+ }
+ else
+ {
+ return ("Unknown RLC/MAC downlink message.");
+ }
+ }
+
+ char *DisplayUplinkMsgType()
+ {
+ if (msgType < RLC_MAC_MAX_UPLINK_MSG)
+ return (UplinkMsgNames[msgType]);
+ else
+ return ("Unknown RLC/MAC uplink message.");
+ }
+
+ unsigned char msgType;
+
+};
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/RlcMacResult.h b/data/mnet/GP10/Host/Rlc_mac/include/RlcMacResult.h
new file mode 100644
index 0000000..fa9700f
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/RlcMacResult.h
@@ -0,0 +1,42 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : RlcMacResult.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __RLCMACRESULT_H__
+#define __RLCMACRESULT_H__
+
+#include "logging\vclogging.h"
+
+#define FALSE 0
+#define TRUE 1
+
+typedef enum {
+ RLC_MAC_SUCCESS,
+ RLC_MAC_ERROR,
+ RLC_MAC_INVALID_NUM_BITS,
+ RLC_MAC_PARAMETER_RANGE_ERROR,
+ RLC_MAC_MISSING_IE,
+ RLC_MAC_INVALID_IE
+} RlcMacResult;
+
+#define RLC_MAC_RESULT_CHECK(result) \
+ if(result != RLC_MAC_SUCCESS) \
+ { \
+ DBG_LEAVE();\
+ return (result);\
+ }
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/RlcMacTask.h b/data/mnet/GP10/Host/Rlc_mac/include/RlcMacTask.h
new file mode 100644
index 0000000..284da07
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/RlcMacTask.h
@@ -0,0 +1,187 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : RlcMacTask.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+#ifndef __RLCMACTASK_H__
+#define __RLCMACTASK_H__
+
+#include <msgQLib.h>
+#include "Os/JCTask.h"
+#include "GP10Err.h"
+#include "Rlc_mac/RlcMacIntf.h"
+#include "ril3/msg_channel_request.h"
+#include "MacHeader.h"
+#include "msgL1.h"
+#include "TbfPool.h"
+#include "TSPool.h"
+#include "ULDataBlockPool.h"
+#include "MsgBase.h"
+#include "MsgPacketResourceRequest.h"
+#include "ScheduleAllocationInfo.h"
+#include "MsgPacketTBFRelease.h"
+#include "MsgPacketDownlinkAckNack.h"
+
+typedef enum
+{
+ RESOURCES_UNAVAILABLE,
+ RESOURCES_ALLOCATED,
+ TBF_ACTIVE
+} DL_ALLOC_RES;
+
+class RlcMacTask {
+public:
+
+ static int InitRlcMac(void);
+ static int RlcMacLoop(void);
+
+ // OAM functions
+ JC_STATUS DecodeOamAdminMsgInd(RlcMacAdminStateChangeType *msgReq);
+ JC_STATUS DecodeOamOpMsgInd(RlcMacOpStateChangeType *msgReq);
+
+ // RM MD message handling
+ JC_STATUS ProcessRmMdMsgInd(T_CNI_RIL3MD_RRM_MSG *msgReq);
+ JC_STATUS ProcessChanReq(T_CNI_RIL3MD_RRM_MSG *msgReq);
+
+ // MAC allocation
+ JC_STATUS ULOnePhaseAllocation(T_CNI_RIL3RRM_MSG_CHANNEL_REQUEST *chanReq, T_CNI_RIL3MD_RRM_MSG *msgReq);
+ JC_STATUS ULCCCHImmediateAssignment(ULTbf *pUlTbf,
+ T_CNI_RIL3RRM_MSG_CHANNEL_REQUEST *chanReq, T_CNI_RIL3MD_RRM_MSG *msgReq);
+
+ JC_STATUS ULSingleBlockAllocation
+ (
+ T_CNI_RIL3RRM_MSG_CHANNEL_REQUEST *chanReq,
+ T_CNI_RIL3MD_RRM_MSG *msgReq
+ );
+ JC_STATUS SendPacketAccessReject(int trx, int ts, IeBase *pIe,
+ MS_ID_TYPE idType);
+ JC_STATUS SendPacketUplinkAssignment(int trx, int ts, ULTbf *pUlTbf, IeBase *pIe,
+ MS_ID_TYPE idType);
+ JC_STATUS SendPacketTBFRelease(DLTbf *pDlTbf, ULTbf *pUlTbf,
+ MsgPacketTBFRelease::TBF_RELEASE_CAUSE cause);
+
+
+ JC_STATUS AllocateULResources
+ (
+ MsgPacketResourceRequest &msg,
+ int trx,
+ int ts
+ );
+ JC_STATUS SendPacketDownlinkAssignment(DLTbf *pDlTbf, ULTbf *pUlTbf, bool controlAck);
+ JC_STATUS SendPacketDownlinkAssignment(DLTbf *pDlTbf, int trx, int ts, bool controlAck);
+ DL_ALLOC_RES AllocateDLResources(BSSGP_DL_UNITDATA_MSG *pUnitDataMsg);
+ JC_STATUS CheckDLMsgQueues();
+ JC_STATUS DLCCCHImmediateAssignment(DLTbf *pDlTbf);
+
+
+ // Layer 1 message handling
+ JC_STATUS DecodeL1MsgInd(RlcMacL1MsgIndType *msgReq);
+ JC_STATUS ProcessPhPdtchInd(MsgPdtchInd *l1PdtchInd);
+ JC_STATUS ProcessPhPacchInd(MsgPacchInd *l1PacchInd);
+ JC_STATUS ProcessPhRTSInd(MsgReadyToSend *pL1RTSInd);
+ bool SendDownlinkDummyControlBlock(int trx, int ts);
+ bool SendDownlinkDataBlock(int trx, int ts);
+ void SendULActivationMsg(ULTbf *pUlTbf);
+ void SendULReconfigurationMsg(ULTbf *pUlTbf);
+ void SendULDeactivationMsg(ULTbf *pUlTbf);
+ void SendDLActivationMsg(DLTbf *pDlTbf);
+ void SendDLReconfigurationMsg(DLTbf *pDlTbf);
+ void SendDLDeactivationMsg(DLTbf *pDlTbf);
+ void SendSingleBlockAssignAlertMsg(int trx, int ts, unsigned int frameNum);
+ void SendDLAssignAlertMsg(int trx, int ts, unsigned int frameNum, char tag);
+ void SendDLAckNackInfoMsg(int trx, DLTbf *pDlTbf, MsgPacketDownlinkAckNack *pMsg);
+
+ JC_STATUS SendPacchMsg
+ (
+ int trx,
+ int ts,
+ DLMacHeader *pDlMsgHdr,
+ DownlinkMsgBase *pDlMsg,
+ unsigned char ctlAckTag,
+ char burstType
+ );
+ JC_STATUS SendPdtchMsg
+ (
+ int trx,
+ int ts,
+ unsigned char ctlAckTag,
+ char burstType,
+ DLDataBlock *pDlDataBlock
+ );
+
+ // RLC/MAC message handling
+ JC_STATUS ProcessULRlcDataBlock
+ (
+ MsgPdtchInd *l1PdtchInd,
+ ULDataBlock *pUlDataBlock
+ );
+ JC_STATUS DecodeULRlcControlBlock
+ (
+ MsgPacchInd *l1PacchInd,
+ ULMacHeader &rlcMacMsgHeader,
+ BitStreamIn &l1MsgBitsIn
+ );
+ JC_STATUS DecodeULRlcControlBlockAccessBurst
+ (
+ MsgPacchAbInd *l1PacchAbInd
+ );
+
+
+ // Uplink resource requests
+ bool ULSingleBlockRequest(int *trx, int *ts);
+ bool ULResourceReallocRequest(ULTbf *pUlTbf);
+ bool ULResourceReallocRequest(ULTbf *pUlTbf, DLTbf *pDlTbf);
+ bool ULResourceRequest(ULTbf *pUlTbf);
+ bool ULResourceRequest(ULTbf *pUlTbf, DLTbf *pDlTbf);
+ bool ULReleaseResourceRequest(ULTbf *pUlTbf);
+
+ // Downlink resource requests
+ bool DLSingleTSResourceRequest(DLTbf *pDlTbf);
+ bool DLResourceReallocRequest(DLTbf *pDlTbf);
+ bool DLResourceReallocRequest(DLTbf *pDlTbf, ULTbf *pUlTbf);
+ bool DLResourceRequest(DLTbf *pDlTbf);
+ bool DLResourceRequest(DLTbf *pDlTbf, ULTbf *pUlTbf);
+ bool DLReleaseResourceRequest(DLTbf *pDlTbf);
+
+ // Scheduling requests
+ bool TSSelectionRequest(int *trx, int *ts, DLTbf *pDlTbf);
+ bool TSSelectionRequest(int *trx, int *ts, ULTbf *pUlTbf);
+ bool PollingTsCheck(int trx, int ts, DLTbf *pDlTbf);
+ bool ScheduleRLCBlock(int trx, int ts, DLTbf **ppDlTbf);
+ bool ScheduleRLCBlock(int trx, int ts, ULTbf **ppUlTbf);
+ bool ScheduleRLCBlock(int trx, int ts, DLTbf **ppDlTbf, ULTbf **ppUlTbf);
+
+ // Schedule Helpers
+ bool AllocateUser (ScheduleAllocationInfo *schedAllocInfo);
+ bool AllocateUserIfBetterQoS (ScheduleAllocationInfo *schedAllocInfo);
+ bool AllocateOneSlot (ScheduleAllocationInfo *schedAllocInfo);
+ bool FindBestSlot (ScheduleAllocationInfo *schedAllocInfo);
+ bool DeallocateUser (Tbf* tbf, LinkDirection dir);
+ bool GetLeastUtilizedSlot(Tbf* tbf, int *trxArg, int *tsArg);
+ bool GetNaturalSlot(Tbf* tbf, int *trxArg, int *tsArg) ;
+ int GetBtsGprsConfig(int trx, bool* tsMap, float* capUL, float* capDL);
+ void UpdateAllowedSlots(ScheduleAllocationInfo *schedAllocInfo);
+
+ TbfPool tbfPool;
+ TSPool tsPool;
+ static RlcMacTask *theRlcMacTask;
+
+private:
+
+ static bool isCreated;
+ JCTask RlcMacTaskObj;
+
+};
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ScheduleAllocationInfo.h b/data/mnet/GP10/Host/Rlc_mac/include/ScheduleAllocationInfo.h
new file mode 100644
index 0000000..a58ff46
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ScheduleAllocationInfo.h
@@ -0,0 +1,204 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : Multislot.h
+// Author(s) : Daryl Kaiser
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __SCHEDULEALLOCATION_H__
+#define __SCHEDULEALLOCATION_H__
+
+#include "RlcMacCommon.h"
+#include "RlcMacResult.h"
+#include "Tbf.h"
+
+
+// *******************************************************************
+// class ScheduleAllocationInfo
+//
+// Description: A transient object created when scheduling a new user
+//
+// *******************************************************************
+class ScheduleAllocationInfo {
+
+public:
+
+ ScheduleAllocationInfo(int mclass, int dclass, int pclass,
+ int ptclass, Tbf* tbfArg, LinkDirection dir,
+ bool* allocatedTsOppositeDirection) :
+ multislotClass(mclass), delayClass(dclass), precedenceClass(pclass),
+ peakThroughputClass(ptclass), tbf(tbfArg), direction(dir),
+ maxDlSlots(0), maxUlSlots(0), nbrOfCandConfigs(0)
+ {
+ if ( allocatedTsOppositeDirection )
+ {
+ if ( dir==DL )
+ {
+ for ( int ts=0; ts<MAX_TIMESLOTS; ts++ )
+ {
+ allocatedTsDL[ts] = FALSE;
+ allocatedTsUL[ts] = allocatedTsOppositeDirection[ts];
+ }
+ }
+ else
+ {
+ for ( int ts=0; ts<MAX_TIMESLOTS; ts++ )
+ {
+ allocatedTsDL[ts] = allocatedTsOppositeDirection[ts];
+ allocatedTsUL[ts] = FALSE;
+ }
+ }
+ }
+ else
+ {
+ for ( int ts=0; ts<MAX_TIMESLOTS; ts++ )
+ {
+ allocatedTsDL[ts] = FALSE;
+ allocatedTsUL[ts] = FALSE;
+ }
+ }
+ }
+
+ ~ScheduleAllocationInfo() {}
+
+ int GetMultislotClass(void) const
+ {
+ return (multislotClass);
+ }
+ int GetDelayClass(void) const
+ {
+ return (delayClass);
+ }
+ int GetPrecedenceClass(void) const
+ {
+ return (precedenceClass);
+ }
+ int GetPeakThroughputClass(void) const
+ {
+ return (peakThroughputClass);
+ }
+ Tbf* GetTbf(void) const
+ {
+ return (tbf);
+ }
+ LinkDirection GetDirection(void) const
+ {
+ return (direction);
+ }
+ void AddSlotAllocation(void)
+ {
+ if ( direction == DL )
+ {
+ allocatedTsDL[slotAlloc.ts] = TRUE;
+ }
+ else
+ {
+ allocatedTsUL[slotAlloc.ts] = TRUE;
+ }
+ }
+ void InitializeNewSlotAllocation(void)
+ {
+ slotAlloc.trx = -1;
+ slotAlloc.ts = -1;
+ slotAlloc.entries = -1;
+ }
+ void SetNewSlotAllocation(int trx, int ts, int entries)
+ {
+ slotAlloc.trx = trx;
+ slotAlloc.ts = ts;
+ slotAlloc.entries = entries;
+ }
+ void GetNewSlotAllocation(int* trx, int* ts, int* entries) const
+ {
+ *trx = slotAlloc.trx;
+ *ts = slotAlloc.ts;
+ *entries = slotAlloc.entries;
+ }
+ int GetNewSlotEntries(void) const
+ {
+ return(slotAlloc.entries);
+ }
+ bool ComputeMultislotOptions(void);
+ int ComputeDesiredNumberOfSlots(void) const;
+ void ConstrainCandMultiConfig(void);
+ bool IsAllowedTs(LinkDirection dir, int ts);
+ bool IncludesNaturalTs(LinkDirection dir, int newTs);
+
+ /*-------------------------------------------------------------------------
+ * Multislot Configuration Generator Tables
+ *-------------------------------------------------------------------------*/
+ enum { PAT_ORDER = 8 };
+ enum { PAT_INDEX = 35 };
+ enum { PAT_SLOTS = 8 };
+ enum { MULTI_CLASS = 12 };
+ enum { MULTI_INDEX = 28 };
+ enum { MULTI_SETS = 28 };
+ enum { MULTI_PARMS = 7 };
+ enum { MAX_MULTI_CONFIG_CANDIDATES = 173 };
+
+ static const int nbrTsPatterns[PAT_ORDER];
+ static const char tsPattern[PAT_ORDER][PAT_INDEX][PAT_SLOTS];
+ static const int nbrMultiConfig[MULTI_CLASS];
+ static const char* multiConfig[MULTI_CLASS][MULTI_INDEX];
+ static const char ms[MULTI_SETS][MULTI_PARMS]; //multislot param sets
+ static const char multiMaxDlSlots[MULTI_CLASS];
+ static const char multiMaxUlSlots[MULTI_CLASS];
+
+ struct MultiSet
+ {
+ const char rangeStartDL;
+ const char rangeEndDL;
+ const char patternOrderDL;
+ const char patternIndexDL;
+ const char slotOffsetUL;
+ const char patternOrderUL;
+ const char patternIndexUL;
+ };
+ /*-------------------------------------------------------------------------
+ * Candidate multislot configurations for new TBF
+ *-------------------------------------------------------------------------*/
+ struct MultislotConfig
+ {
+ bool valid;
+ bool allowedTsDL[MAX_TIMESLOTS];
+ bool allowedTsUL[MAX_TIMESLOTS];
+ };
+ int nbrOfCandConfigs;
+ MultislotConfig candMultiConfig[MAX_MULTI_CONFIG_CANDIDATES];
+
+private:
+
+ int multislotClass;
+ int delayClass;
+ int precedenceClass;
+ int peakThroughputClass;
+ Tbf* tbf;
+ LinkDirection direction;
+ int maxDlSlots;
+ int maxUlSlots;
+ bool allocatedTsDL[MAX_TIMESLOTS];
+ bool allocatedTsUL[MAX_TIMESLOTS];
+ /*-------------------------------------------------------------------------
+ * New slot allocation (temporary for communicating each new slot)
+ *-------------------------------------------------------------------------*/
+ struct SlotAllocation
+ {
+ int trx;
+ int ts;
+ int entries;
+ };
+ SlotAllocation slotAlloc;
+};
+
+
+#endif
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ScheduleInfo.h b/data/mnet/GP10/Host/Rlc_mac/include/ScheduleInfo.h
new file mode 100644
index 0000000..9827000
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ScheduleInfo.h
@@ -0,0 +1,97 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ScheduleInfo.h
+// Author(s) : Daryl Kaiser
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+#ifndef __SCHEDULEINFO_H__
+#define __SCHEDULEINFO_H__
+
+#include "RlcMacCommon.h"
+#include "RlcMacResult.h"
+#include "ScheduleQueue.h"
+
+// *******************************************************************
+// class ScheduleInfo
+//
+// Description
+//
+// *******************************************************************
+class ScheduleInfo {
+
+public:
+
+ ScheduleInfo() : scheduleQueueDL(DL), scheduleQueueUL(UL)
+ {
+ nbrUsersDL = 0;
+ nbrUsersUL = 0;
+ utilizedCapacityDL = 0.0;
+ utilizedCapacityUL = 0.0;
+ };
+
+ ~ScheduleInfo() {}
+
+ enum { MAX_USERS_PER_SLOT = 16 };
+ enum { MAX_USERS_PER_SLOT_UL = 7 };
+
+
+ int GetNbrUsers(LinkDirection dir) const
+ {
+ if ( dir == DL )
+ {
+ return (nbrUsersDL);
+ }
+ else
+ {
+ return (nbrUsersUL);
+ }
+ }
+ float GetUtilizedCapacity(LinkDirection dir) const
+ {
+ if ( dir == DL )
+ {
+ return (utilizedCapacityDL);
+ }
+ else
+ {
+ return (utilizedCapacityUL);
+ }
+ return (utilizedCapacityUL);
+ }
+ ScheduleQueue* GetQueue(LinkDirection dir)
+ {
+ if ( dir == DL )
+ {
+ return (&scheduleQueueDL);
+ }
+ else
+ {
+ return (&scheduleQueueUL);
+ }
+ }
+ bool OkayToAddUser(LinkDirection dir) const;
+ void UpdateUsersAndCapacity(LinkDirection dir);
+ int GetNbrGprsTs(void) const;
+
+private:
+
+ int nbrUsersDL;
+ int nbrUsersUL;
+ float utilizedCapacityDL;
+ float utilizedCapacityUL;
+ ScheduleQueue scheduleQueueDL;
+ ScheduleQueue scheduleQueueUL;
+};
+
+
+#endif
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ScheduleQueue.h b/data/mnet/GP10/Host/Rlc_mac/include/ScheduleQueue.h
new file mode 100644
index 0000000..7b11998
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ScheduleQueue.h
@@ -0,0 +1,82 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ScheduleQueue.h
+// Author(s) : Daryl Kaiser
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+#ifndef __SCHEDULEQUEUE_H__
+#define __SCHEDULEQUEUE_H__
+
+#include "RlcMacCommon.h"
+#include "Tbf.h"
+
+#define NULL_TBF (Tbf*) 0
+
+// *******************************************************************
+// class ScheduleQueue
+//
+// Description
+//
+// *******************************************************************
+class ScheduleQueue {
+
+public:
+
+ ScheduleQueue(LinkDirection);
+ ~ScheduleQueue() {}
+
+ enum { NULL_IMPORTANCE = 9999 };
+ enum { QUEUE_NUM_LEVELS = 4 };
+ enum { QUEUE_MAX_SIZE = 12 };
+
+ const LinkDirection direction;
+ static const int nbrEntries[QUEUE_NUM_LEVELS];
+ static const float capacityPerEntry[QUEUE_NUM_LEVELS];
+
+ int FindAvailableEntries (Tbf *pTbf, int desiredLevel, int precedence, bool tryOtherLevels);
+ int AllocateEntries (Tbf *pTbf, int desiredLevel, int precedence, bool tryOtherLevels);
+ int DeallocateEntries (Tbf *pTbf, int level);
+ void BalanceEntries (int level);
+ bool ScheduleNextBlock (Tbf **ppTbf);
+ void GetUsersAndCapacity(int *nbrUsers, float *utilizedCapacity);
+ void CopyQueue(void);
+ void RestoreQueue(void);
+
+private:
+
+ struct Entry
+ {
+ Tbf *userTbf;
+ int precedence;
+ int entryNumber;
+ int importance;
+ };
+ int currentIndex[QUEUE_NUM_LEVELS];
+ Entry queue[QUEUE_NUM_LEVELS][QUEUE_MAX_SIZE];
+ Entry savedQueue[QUEUE_NUM_LEVELS][QUEUE_MAX_SIZE]; // a temp copy
+
+ void Rank(int level, int *rankIndex, int *rankImportance, Tbf **rankTbf);
+ bool AllocateOneEntry (int level, int index, Tbf *pTbf,
+ int precedence, int entryNumber);
+ void SetEntry (int level, int index, Tbf *pTbf, int precedence,
+ int entryNumber, int importance);
+ Tbf* GetEntryTbf (int level, int index) const;
+ Tbf* GetCurrentEntryTbf (int level) const;
+ int GetAllTbf(int level, Tbf **ppTbf, int *precedence, int *highestEntry);
+ int GetEntryImportance (int level, int index) const;
+ void ResetCurrentIndex (int level);
+ bool IncrementCurrentIndex (int level);
+};
+
+#endif
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/SingleBlockAllocationStruct.h b/data/mnet/GP10/Host/Rlc_mac/include/SingleBlockAllocationStruct.h
new file mode 100644
index 0000000..63454d4
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/SingleBlockAllocationStruct.h
@@ -0,0 +1,76 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : SingleBlockAllocationStruct.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __SINGLEBLOCKALLOCATIONSTRUCT_H__
+#define __SINGLEBLOCKALLOCATIONSTRUCT_H__
+
+#include "logging\vclogging.h"
+#include "bitstream.h"
+#include "ieStartFrameNum.h"
+#include "iePO.h"
+#include "iePRMode.h"
+#include "ieBtsPowerCtlMode.h"
+
+
+// *******************************************************************
+// class SingleBlockAllocationStruct
+//
+// Description:
+// Single Block Allocation Struct -- GSM04.60 11.2.29
+//
+// <Single Block Allocation struct > ::=
+// < TIMESLOT_NUMBER : bit (3) >
+// { 0 | 1 < ALPHA : bit (4) >
+// < GAMMA_TN : bit (5) >}
+// { 0 | 1 < P0 : bit (4) >
+// < BTS_PWR_CTRL_MODE : bit (1) >
+// < PR_MODE : bit (1) > }
+// < TBF Starting Time : < Starting Frame Number Description IE > > ;
+// *******************************************************************
+
+class SingleBlockAllocationStruct {
+public:
+
+ unsigned char timeslot;
+ struct PowerIndicationStruct
+ {
+ bool isValid;
+ unsigned char alpha;
+ unsigned char gamma;
+ } powerIndication;
+ struct PowerControlStruct
+ {
+ bool isValid;
+ IePO po;
+ IeBtsPowerCtlMode btsPowerCtlMode;
+ IePRMode prMode;
+ } powerControl;
+ IeStartFrameNum startTime;
+ bool isValid;
+
+ // Default constructor
+ SingleBlockAllocationStruct() : isValid(FALSE), startTime()
+ {
+ powerIndication.isValid = FALSE;
+ powerControl.isValid = FALSE;
+ }
+
+ RlcMacResult EncodeSingleBlockAllocationStruct(BitStreamOut &dataStream);
+ void DisplaySingleBlockAllocationStruct(DbgOutput *outObj);
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/TAITable.h b/data/mnet/GP10/Host/Rlc_mac/include/TAITable.h
new file mode 100644
index 0000000..99a272e
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/TAITable.h
@@ -0,0 +1,47 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : TAITable.h
+// Author(s) : Tim Olson
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __TAITABLE_H__
+#define __TAITABLE_H__
+
+#include "RlcMacCommon.h"
+#include "Tbf.h"
+
+
+// *******************************************************************
+// class TAITable
+//
+// Description
+//
+// *******************************************************************
+class TAITable {
+public:
+ TAITable();
+ ~TAITable() {}
+
+ unsigned char AllocateTAI(Tbf *pTbf);
+ void ReleaseTAI(unsigned char tai);
+ void ShowTAITable();
+
+private:
+
+ Tbf *pTAIEntry[MAX_TAI_PER_TS];
+
+};
+
+
+#endif
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/TSPool.h b/data/mnet/GP10/Host/Rlc_mac/include/TSPool.h
new file mode 100644
index 0000000..a3653b6
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/TSPool.h
@@ -0,0 +1,213 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : TSPool.h
+// Author(s) : Tim Olson
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __TSPOOL_H__
+#define __TSPOOL_H__
+
+#include "Timeslot.h"
+
+#define INVALID_TFI 0xff
+
+
+// *******************************************************************
+// class TSPool
+//
+// Description
+//
+// *******************************************************************
+class TSPool {
+public:
+ TSPool();
+ ~TSPool() {}
+
+ Timeslot *GetTimeslotObj(int trx, int ts)
+ {
+ if (IsTrxTsValid(trx, ts))
+ return (&sysTS[trx][ts]);
+ else
+ return (0);
+ }
+
+ // Functions related to TAI
+ unsigned char AllocateTAI(int trx, int ts, Tbf *pTbf);
+ void ReleaseTAI(int trx, int ts, unsigned char tai);
+ void ShowTAITable(int trx);
+ void ShowTAITable(int trx, int ts);
+
+ // Functions related to USF
+ unsigned char AllocateUSF(int trx, int ts, ULTbf *pTbf);
+ void ReleaseUSF(int trx, int ts, unsigned char usf);
+ void ShowUSFTable(int trx);
+ void ShowUSFTable(int trx, int ts);
+
+ // Functions related to TFI assignment
+ unsigned char AllocateULTFI(int trx, ULTbf *pUlTbf);
+ void ReleaseULTFI(int trx, unsigned char tfi);
+ void ShowULTFITable(int trx);
+ ULTbf *FindULTbf(int trx, unsigned char tfi);
+ unsigned char AllocateDLTFI(int trx, DLTbf *pDlTbf);
+ void ReleaseDLTFI(int trx, unsigned char tfi);
+ void ShowDLTFITable(int trx);
+ DLTbf *FindDLTbf(int trx, unsigned char tfi);
+
+ // Functions related to DL signalling queues
+ JC_STATUS QueueDLSignallingMsg
+ (
+ int trx,
+ int ts,
+ MsgPacchReq *l1Msg
+ );
+ MsgPacchReq *DequeueDLSignallingMsg
+ (
+ int trx,
+ int ts
+ );
+
+ // Functions related to RTS counts
+ int GetDataRTSCount(int trx, int ts)
+ {
+ if (IsTrxTsValid(trx, ts))
+ return (sysTS[trx][ts].GetDataRTSCount());
+ else
+ return (0);
+ }
+
+ int GetSignallingRTSCount(int trx, int ts)
+ {
+ if (IsTrxTsValid(trx, ts))
+ return (sysTS[trx][ts].GetSignallingRTSCount());
+ else
+ return (0);
+ }
+
+ void IncDataRTSCount(int trx, int ts, int inc)
+ {
+ if (IsTrxTsValid(trx, ts))
+ {
+ sysTS[trx][ts].IncDataRTSCount(inc);
+ }
+ }
+
+ void IncSignallingRTSCount(int trx, int ts, int inc)
+ {
+ if (IsTrxTsValid(trx, ts))
+ {
+ sysTS[trx][ts].IncSignallingRTSCount(inc);
+ }
+ }
+
+ void DecDataRTSCount(int trx, int ts)
+ {
+ if (IsTrxTsValid(trx, ts))
+ {
+ sysTS[trx][ts].DecDataRTSCount();
+ }
+ }
+
+ void DecSignallingRTSCount(int trx, int ts)
+ {
+ if (IsTrxTsValid(trx, ts))
+ {
+ sysTS[trx][ts].DecSignallingRTSCount();
+ }
+ }
+
+ // Channel configuration accessors
+ void SetChannelComb(int trx, int ts, int chanComb)
+ {
+ if (IsTrxTsValid(trx, ts))
+ {
+ sysTS[trx][ts].SetChannelComb(chanComb);
+ }
+ }
+
+ int GetChannelComb(int trx, int ts)
+ {
+ if (IsTrxTsValid(trx, ts))
+ {
+ return (sysTS[trx][ts].GetChannelComb());
+ }
+ return (INVALID_CHANNEL_COMBINATION);
+ }
+
+ void ShowChannelComb(int trx);
+ void ShowChannelComb(int trx, int ts);
+
+ // Functions related to RTI allocation.
+ unsigned char GetNextRTIVal(int trx, int ts)
+ {
+ if (IsTrxTsValid(trx, ts))
+ {
+ return (sysTS[trx][ts].GetNextRTIVal());
+ }
+ return (INVALID_RTI);
+ }
+
+ ScheduleQueue* GetQueue(int trx, int ts, LinkDirection dir)
+ {
+ if (IsTrxTsValid(trx, ts))
+ {
+ return (sysTS[trx][ts].GetQueue(dir));
+ }
+ else
+ {
+ return (0);
+ }
+ }
+
+ ScheduleInfo* GetScheduleInfo(int trx, int ts)
+ {
+ if (IsTrxTsValid(trx, ts))
+ {
+ return (sysTS[trx][ts].GetScheduleInfo());
+ }
+ else
+ {
+ return (0);
+ }
+ }
+
+ // General Timeslot functions
+ void ShowTimeslotInfo(int trx);
+ void ShowTimeslotInfo(int trx, int ts);
+
+private:
+
+ Timeslot sysTS[MAX_TRX][MAX_TIMESLOTS];
+ ULTbf *sysUlTFI[MAX_TRX][MAX_TFI];
+ DLTbf *sysDlTFI[MAX_TRX][MAX_TFI];
+
+ // Private Methods
+ inline bool IsTrxValid(int trx)
+ {
+ return ((0 <= trx) && (trx < MAX_TRX));
+ }
+
+ inline bool IsTrxTsValid(int trx, int ts)
+ {
+ return (((0 <= trx) && (trx < MAX_TRX)) && ((0 <= ts) && (ts < MAX_TIMESLOTS)));
+ }
+
+ inline bool IsTfiValid(unsigned char tfi)
+ {
+ return (tfi < MAX_TFI);
+ }
+
+};
+
+
+#endif
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/Tbf.h b/data/mnet/GP10/Host/Rlc_mac/include/Tbf.h
new file mode 100644
index 0000000..0bd6bab
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/Tbf.h
@@ -0,0 +1,83 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : Tbf.h
+// Author(s) : Tim Olson
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __TBF_H__
+#define __TBF_H__
+
+#include "RlcMacCommon.h"
+#include "ieTFI.h"
+#include "ieTLLI.h"
+
+#define NULL_TRX -1
+#define INVALID_TAI 0xff
+
+// *******************************************************************
+// class Tbf
+//
+// Description
+//
+// *******************************************************************
+class Tbf {
+public:
+ typedef enum
+ {
+ FREE,
+ ALLOCATED,
+ INACTIVE,
+ ACTIVATING,
+ REALLOCATING,
+ RELEASING
+ } TBF_STATE;
+
+ // Constructor
+ Tbf() : tbfState(FREE), trx(NULL_TRX), tai(INVALID_TAI)
+ {
+ // Clear out allocated resources.
+ for (int i=0; i < MAX_TIMESLOTS; i++)
+ {
+ allocatedTs[i] = FALSE;
+ }
+ taiTs = 0xff;
+ tlli.SetTLLI(0xffffffff);
+ tfi.SetTFI(0x1f);
+ };
+
+ // Destructor
+ ~Tbf() {};
+
+ TBF_STATE GetTbfState() { return(tbfState); }
+ void SetTbfState(TBF_STATE state) { tbfState = state; }
+
+ IeTFI tfi;
+ IeTLLI tlli;
+ unsigned char taiTs;
+ unsigned char tai;
+
+ // Allocated resources
+ int trx;
+ bool allocatedTs[MAX_TIMESLOTS];
+ bool naturalTs[MAX_TIMESLOTS];
+
+protected:
+ // Control message acknowledgement tags.
+ static unsigned char sysCtlAckCount;
+private:
+ TBF_STATE tbfState;
+};
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/TbfPool.h b/data/mnet/GP10/Host/Rlc_mac/include/TbfPool.h
new file mode 100644
index 0000000..a549fe8
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/TbfPool.h
@@ -0,0 +1,84 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : TbfPool.h
+// Author(s) : Tim Olson
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __TBFPOOL_H__
+#define __TBFPOOL_H__
+
+#include "RlcMacCommon.h"
+#include "ULTbf.h"
+#include "DLTbf.h"
+#include "ieGlobalTFI.h"
+#include "ieTFI.h"
+
+
+// *******************************************************************
+// class TbfPool
+//
+// Description
+//
+// *******************************************************************
+class TbfPool {
+public:
+ TbfPool() {}
+ ~TbfPool() {}
+
+ // Functions related to administrative and op state changes
+ void AbnormalReleaseBts();
+ void AbnormalReleaseTrx(int trx);
+ void AbnormalReleaseTs(int trx, int ts);
+
+ // Functions related to uplink TBF
+ ULTbf *EstablishULTbf(
+ IeAccessType *accessType,
+ IeTLLI *tlli,
+ IeChannelRequestDescription *chanReqDesc,
+ IeMSRadioAccessCapability *radioAccessCapability
+ );
+ ULTbf *FindULTbf(IeGlobalTFI &globalTfi);
+ ULTbf *FindULTbf(IeTFI &tfi);
+ ULTbf *FindULTbf(unsigned long tlli);
+ ULTbf *FindULTbf(unsigned char controlAckTag);
+
+ // Functions related to downlink TBF
+ DLTbf *EstablishDLTbf(BSSGP_DL_UNITDATA_MSG *pUnitDataMsg, bool ctrlAck);
+ DLTbf *FindDLTbf(IeGlobalTFI &globalTfi);
+ DLTbf *FindDLTbf(IeTFI &tfi);
+ DLTbf *FindDLTbf(unsigned long tlli);
+ DLTbf *FindDLTbf(unsigned char controlAckTag);
+
+ bool AnyActiveTBF(int trx, int ts);
+
+ void ShowULAllocatedTBF();
+ void ShowDLAllocatedTBF();
+ void ShowULFreeTBF();
+ void ShowDLFreeTBF();
+ void ShowULAllTBF();
+ void ShowDLAllTBF();
+
+private:
+
+ ULTbf sysULTbf[MAX_TRX * MAX_TFI];
+ DLTbf sysDLTbf[MAX_TRX * MAX_TFI];
+
+ inline bool IsTrxValid(int trx)
+ {
+ return (0 <= trx < MAX_TRX);
+ }
+};
+
+
+#endif
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/Timeslot.h b/data/mnet/GP10/Host/Rlc_mac/include/Timeslot.h
new file mode 100644
index 0000000..0cfdbdc
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/Timeslot.h
@@ -0,0 +1,178 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : Timeslot.h
+// Author(s) : Tim Olson
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __TIMESLOT_H__
+#define __TIMESLOT_H__
+
+#include "RlcMacCommon.h"
+#include "TAITable.h"
+#include "USFTable.h"
+#include "DLSignallingMsgQueue.h"
+#include "Tbf.h"
+#include "ULTbf.h"
+#include "DLTbf.h"
+#include "ScheduleInfo.h"
+#include "ScheduleQueue.h"
+
+#define INVALID_CHANNEL_COMBINATION 0xffffffff
+#define INVALID_RTI 0xff
+
+// *******************************************************************
+// class Timeslot
+//
+// Description
+//
+// *******************************************************************
+class Timeslot {
+public:
+ // Constructor
+ Timeslot()
+ {
+ dataRTSCount = 0;
+ signallingRTSCount = 0;
+ channelComb = INVALID_CHANNEL_COMBINATION;
+ rti = 0;
+ }
+
+ // Destructor
+ ~Timeslot() {};
+
+ // Functions related to TAI
+ unsigned char AllocateTAI(Tbf *pTbf)
+ {
+ return (sysTAI.AllocateTAI(pTbf));
+ }
+
+ void ReleaseTAI(unsigned char tai)
+ {
+ sysTAI.ReleaseTAI(tai);
+ }
+
+ void ShowTAITable()
+ {
+ sysTAI.ShowTAITable();
+ }
+
+ // Functions related to USF
+ unsigned char AllocateUSF(ULTbf *pTbf)
+ {
+ return (sysUSF.AllocateUSF(pTbf));
+ }
+
+ void ReleaseUSF(unsigned char usf)
+ {
+ sysUSF.ReleaseUSF(usf);
+ }
+
+ void ShowUSFTable()
+ {
+ sysUSF.ShowUSFTable();
+ }
+
+ // Functions related to DL Signalling Queues
+ JC_STATUS QueueDLSignallingMsg(MsgPacchReq *l1Msg)
+ {
+ return(sysDLSigMsgQ.QueueDLSignallingMsg(l1Msg));
+ }
+
+ MsgPacchReq *DequeueDLSignallingMsg()
+ {
+ return(sysDLSigMsgQ.DequeueDLSignallingMsg());
+ }
+
+ // Functions related to RTS counts
+ int GetDataRTSCount()
+ {
+ return (dataRTSCount);
+ }
+
+ int GetSignallingRTSCount()
+ {
+ return (signallingRTSCount);
+ }
+
+ void IncDataRTSCount(int inc)
+ {
+ dataRTSCount += inc;
+ if (dataRTSCount > MAX_DATA_RTS_COUNT)
+ dataRTSCount = MAX_DATA_RTS_COUNT;
+ }
+
+ void IncSignallingRTSCount(int inc)
+ {
+ signallingRTSCount += inc;
+ if (signallingRTSCount > MAX_SIGNALLING_RTS_COUNT)
+ signallingRTSCount = MAX_SIGNALLING_RTS_COUNT;
+ }
+
+ void DecDataRTSCount()
+ {
+ dataRTSCount--;
+ if (dataRTSCount < 0)
+ dataRTSCount = 0;
+ }
+
+ void DecSignallingRTSCount()
+ {
+ signallingRTSCount--;
+ if (signallingRTSCount < 0)
+ signallingRTSCount = 0;
+ }
+
+ // Channel configuration accessors
+ void SetChannelComb(int chanComb)
+ {
+ channelComb = chanComb;
+ }
+
+ int GetChannelComb()
+ {
+ return (channelComb);
+ }
+
+ // Functions related to RTI allocation.
+ unsigned char GetNextRTIVal()
+ {
+ rti = rti++ % MAX_RTI_VAL;
+ return (rti);
+ }
+
+ ScheduleQueue* GetQueue(LinkDirection dir)
+ {
+ return(scheduleInfo.GetQueue(dir));
+ }
+
+ ScheduleInfo* GetScheduleInfo(void)
+ {
+ return (&scheduleInfo);
+ }
+
+ void ShowTimeslotInfo();
+
+private:
+ int channelComb;
+ int dataRTSCount;
+ int signallingRTSCount;
+ TAITable sysTAI;
+ USFTable sysUSF;
+ DLSignallingMsgQueue sysDLSigMsgQ;
+ unsigned char rti;
+ ScheduleInfo scheduleInfo;
+};
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ULDataBlockPool.h b/data/mnet/GP10/Host/Rlc_mac/include/ULDataBlockPool.h
new file mode 100644
index 0000000..50b605e
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ULDataBlockPool.h
@@ -0,0 +1,74 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ULDataBlockPool.h
+// Author(s) : Tim Olson
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __ULDATABLOCKPOOL_H__
+#define __ULDATABLOCKPOOL_H__
+
+#include "bitstream.h"
+#include "MacHeader.h"
+#include "ieChannelCodingCommand.h"
+
+// Max RLC PDU size is 1560. Minus header for CS-1 18 bytes may be sent.
+// For safety add a few extra and 100 should be good.
+#define MAX_RL_BLOCKS_PER_PDU 100
+// *******************************************************************
+// class ULDataBlock
+//
+// Description
+//
+// *******************************************************************
+class ULDataBlock {
+public:
+ ULDataBlock(): next(0) {}
+ ~ULDataBlock() {}
+
+ friend class ULDataBlockPool;
+
+ int GetDataBlockLength() { return (chanCoding.GetRLCDataBlockSize()); }
+ void DisplayDataBlock();
+
+ BitStreamIn streamIn;
+ ULMacHeader ulHeader;
+ IeChannelCodingCommand chanCoding;
+private:
+ ULDataBlock *next;
+ static DbgOutput MsgDisplayObj;
+};
+
+
+// *******************************************************************
+// class ULDataBlockPool
+//
+// Description
+//
+// *******************************************************************
+class ULDataBlockPool {
+public:
+ // Constructor
+ ULDataBlockPool();
+ // Destructor
+ ~ULDataBlockPool();
+
+ ULDataBlock *GetULDataBlock();
+ void ReturnULDataBlock(ULDataBlock *pUlDataBlock);
+
+private:
+ ULDataBlock *head, *tail;
+};
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ULRlcLink.h b/data/mnet/GP10/Host/Rlc_mac/include/ULRlcLink.h
new file mode 100644
index 0000000..09842f3
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ULRlcLink.h
@@ -0,0 +1,114 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ULRlcLink.h
+// Author(s) : Tim Olson
+// Create Date : 12/1/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __ULRLCLINK_H__
+#define __ULRLCLINK_H__
+
+#include "Os/JCCTimer.h"
+#include "RlcMacCommon.h"
+#include "ULDataBlockPool.h"
+#include "ieChannelCodingCommand.h"
+#include "MsgPacketControlAcknowledgement.h"
+
+#define RCV_WINDOW_SIZE_K 64
+#define MAX_RLC_BLOCKS_BETWEEN_ACKS (RCV_WINDOW_SIZE_K/2)
+#define LAST_BLOCK_UNKNOWN -1
+
+#define T3169_VALUE GetMibValueInt(MIB_t3191)*10 // in 100's of ms
+
+// Forward declaration.
+class ULTbf;
+
+// *******************************************************************
+// class ULRlcLink
+//
+// Description
+//
+// *******************************************************************
+class ULRlcLink {
+public:
+
+ typedef enum
+ {
+ ACKNOWLEDGED_RLC_MODE,
+ UNACKNOWLEDGED_RLC_MODE
+ } RLC_MODE;
+
+ typedef enum
+ {
+ RECEIVED,
+ INVALID
+ } RECEIVE_STATUS;
+
+ // Constructor
+ ULRlcLink();
+ // Destructor
+ ~ULRlcLink() {}
+
+ JC_STATUS EstablishRLCLink(ULTbf *pUlTbf, RLC_MODE mode);
+ void UpdateTSSpecificData();
+ JC_STATUS AbnormalRelease();
+ JC_STATUS ReceiveULDataBlock(ULDataBlock *pUlDataBlock);
+ bool UpdateRcvStateVariables(ULDataBlock *pUlDataBlock);
+ void SendULAckNack();
+ void ReassembleULPDU();
+ bool IsPDUAssemblyNeeded(ULDataBlock *pUlDataBlock);
+ void ReleaseDataBlocks(int startBlock, int endBlock);
+ bool ScanDataBlocks(int currDataBlock);
+ void SendBSSGPUnitData(unsigned char *pBuf, int len);
+ void ReceivePacketControlAck(MsgPacketControlAcknowledgement *pCtrlMsg);
+ void ReceivePacketControlNack();
+ void ProcessT3169Expiry();
+ void ProcessActivityTimerExpiry();
+ bool IncrementN3101();
+ void SetCurrentCodingRate(IeChannelCodingCommand::CHANNEL_CODING_COMMAND rate)
+ { chanCoding.SetChannelCodingCommand(rate); }
+ IeChannelCodingCommand::CHANNEL_CODING_COMMAND GetCurrentCodingRate()
+ { return(chanCoding.GetChannelCodingCommand()); }
+
+ void ShowRlcLinkInfo();
+
+ static ULDataBlockPool sysUlDataBlockPool;
+ static int T3169TimerExpiry(int tbfPointer);
+ static int ActivityTimerExpiry(int tbfPointer);
+
+private:
+ RLC_MODE rlcMode; // ACK or non ACK mode
+ int k; // Window size
+ int vQ; // Receive window state
+ RECEIVE_STATUS vN[RLC_MOD_VAL]; // Receive state array
+ int vR; // Receive state variable
+ int n3103;
+ int n3101;
+ int n3101FirstBlkBuffer;
+ IeChannelCodingCommand chanCoding;
+
+ ULDataBlock *pUlBlocks[RLC_MOD_VAL];
+ int firstDataBlock;
+ int lastDataBlock;
+ int numRLCBlocksSinceLastAck;
+ bool endOfTBF;
+ ULTbf *pAssociatedTbf;
+
+ static int N3103_MAX;
+ static int N3101_MAX;
+ JCCTimer *pT3169;
+ JCCTimer *pActivityTimer;
+};
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ULTbf.h b/data/mnet/GP10/Host/Rlc_mac/include/ULTbf.h
new file mode 100644
index 0000000..e96dd2c
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ULTbf.h
@@ -0,0 +1,95 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ULTbf.h
+// Author(s) : Tim Olson
+// Create Date : 12/1/2000
+// Description :
+//
+// *******************************************************************
+
+#ifndef __ULTBF_H__
+#define __ULTBF_H__
+
+#include "Tbf.h"
+#include "ULRlcLink.h"
+#include "ieChannelRequestDescription.h"
+#include "ieMSRadioAccessCapability.h"
+#include "ieAccessType.h"
+
+
+// *******************************************************************
+// class ULTbf
+//
+// Description
+//
+// *******************************************************************
+class ULTbf : public Tbf {
+public:
+
+ // Constructor
+ ULTbf() : Tbf() {};
+ // Destructor
+ ~ULTbf() {};
+
+ JC_STATUS EstablishULTbf(
+ IeAccessType *accessType,
+ IeTLLI *tlli,
+ IeChannelRequestDescription *chanReqDesc,
+ IeMSRadioAccessCapability *radioAccessCapability
+ );
+ JC_STATUS ReallocateTbf(
+ IeAccessType *accessType,
+ IeChannelRequestDescription *chanReqDesc,
+ IeMSRadioAccessCapability *radioAccessCapability
+ );
+ JC_STATUS ReleaseULTbf();
+ JC_STATUS AbnormalReleaseULTbf();
+
+ unsigned char GetControlAckTag() { return(ctlAckTag); }
+ void ClearControlAckTag() { ctlAckTag = CTL_ACK_TAG_NOT_APPLICABLE; }
+ unsigned char SetControlAckTag()
+ {
+ ctlAckTag = (++sysCtlAckCount != CTL_ACK_TAG_NOT_APPLICABLE ? sysCtlAckCount : ++sysCtlAckCount);
+ return (ctlAckTag);
+ }
+
+ void ShowTBFInfo();
+
+ int GetDelayClass(void) const
+ {
+ return(chanReq.radioPriority+1); // input is zero-based; Scheduler uses 1-based values
+ }
+ int GetPrecedenceClass(void) const
+ {
+ return(1); // MS does not send Precedence Class; use constant=1
+ }
+ int GetPeakThroughputClass(void) const
+ {
+ return(chanReq.peakThroughputClass); // input is already one-based (for uplink only)
+ }
+ int GetMultislotClass(void);
+
+ // Allocated resources
+ unsigned char usf[MAX_TIMESLOTS];
+
+ // ULTbf data members
+ IeAccessType accType;
+ IeChannelRequestDescription chanReq;
+ IeMSRadioAccessCapability raCapability;
+ ULRlcLink rlcLink;
+
+private:
+ // Control message acknowledgement tags.
+ unsigned char ctlAckTag;
+
+};
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/USFTable.h b/data/mnet/GP10/Host/Rlc_mac/include/USFTable.h
new file mode 100644
index 0000000..f1d2cb4
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/USFTable.h
@@ -0,0 +1,50 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : USFTable.h
+// Author(s) : Tim Olson
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __USFTABLE_H__
+#define __USFTABLE_H__
+
+#include "ULTbf.h"
+#include "RlcMacCommon.h"
+
+
+#define INVALID_USF 0xff
+
+
+// *******************************************************************
+// class USFTable
+//
+// Description
+//
+// *******************************************************************
+class USFTable {
+public:
+ USFTable();
+ ~USFTable() {}
+
+ unsigned char AllocateUSF(ULTbf *pTbf);
+ void ReleaseUSF(unsigned char usf);
+ void ShowUSFTable();
+
+private:
+
+ Tbf *pUSFEntry[MAX_USF_PER_TS];
+
+};
+
+
+#endif
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/bitstream.h b/data/mnet/GP10/Host/Rlc_mac/include/bitstream.h
new file mode 100644
index 0000000..b29b9f7
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/bitstream.h
@@ -0,0 +1,129 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : bitstream.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __BITSTREAM_H__
+#define __BITSTREAM_H__
+
+#include <string.h>
+#include "RlcMacResult.h"
+#include "msgL1.h"
+
+#define MAX_BITSTREAM MAX_RLC_DATA_MSG
+
+// *******************************************************************
+// class BitStreamOut
+//
+// Description:
+//
+// *******************************************************************
+
+class BitStreamOut {
+public:
+ BitStreamOut()
+ {
+ bitPointer = 0;
+ streamLen = 0;
+ bzero((char *)dataStream, MAX_BITSTREAM);
+ }
+
+ ~BitStreamOut(){}
+
+ RlcMacResult InsertBits8(unsigned char bits, int numBits);
+ RlcMacResult InsertBits16(unsigned short bits, int numBits);
+ RlcMacResult InsertBits32(unsigned long bits, int numBits);
+ RlcMacResult InsertBytesN(unsigned char *bytes, int numBytes);
+
+ void PadToOctetBoundary();
+
+ void PadWithSparePadding(int len);
+
+ unsigned char *GetBitStream() { return (dataStream); }
+ void ClearBitStream()
+ {
+ bzero((char *)dataStream, MAX_BITSTREAM);
+ bitPointer = 0;
+ streamLen = 0;
+ }
+ void ResetBitPointer() { bitPointer = 0; streamLen = 0; }
+ int GetStreamLen() { return (streamLen); }
+
+private:
+ unsigned char dataStream[MAX_BITSTREAM];
+ int bitPointer;
+ int streamLen;
+};
+
+
+// *******************************************************************
+// class BitStreamIn
+//
+// Description:
+//
+// *******************************************************************
+
+class BitStreamIn {
+public:
+ BitStreamIn(unsigned char *data, int dataLen)
+ {
+ bitPointer = 0;
+ streamLen = dataLen;
+ currByte = 0;
+ for (int i = 0; i < dataLen; i++)
+ {
+ dataStream[i] = data[i];
+ }
+ }
+
+ BitStreamIn()
+ {
+ bitPointer = 0;
+ streamLen = 0;
+ currByte = 0;
+ }
+
+ ~BitStreamIn(){}
+
+ void InitBitStreamIn(unsigned char *data, int dataLen)
+ {
+ bitPointer = 0;
+ streamLen = dataLen;
+ currByte = 0;
+ for (int i = 0; i < dataLen; i++)
+ {
+ dataStream[i] = data[i];
+ }
+ }
+
+ RlcMacResult ExtractBits8(unsigned char &bits, int numBits);
+ RlcMacResult ExtractBits16(unsigned short &bits, int numBits);
+ RlcMacResult ExtractBits32(unsigned long &bits, int numBits);
+ RlcMacResult ExtractBytesN(unsigned char *bytes, int numBytes);
+
+ unsigned char *GetBitStream() { return (dataStream); }
+ int GetCurrentPosition() { return (currByte); }
+ void ResetBitPointer() { bitPointer = 0; currByte = 0; }
+ int GetStreamLen() { return (streamLen); }
+
+private:
+ unsigned char dataStream[MAX_BITSTREAM];
+ int bitPointer;
+ int streamLen;
+ int currByte;
+
+};
+
+#endif
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieARFCN.h b/data/mnet/GP10/Host/Rlc_mac/include/ieARFCN.h
new file mode 100644
index 0000000..b754e2d
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieARFCN.h
@@ -0,0 +1,68 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieARFCN.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEARFCN_H__
+#define __IEARFCN_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+
+// *******************************************************************
+// class IeARFCN
+//
+// Description:
+// ARFCN IE -- GSM04.60 11.2.4
+// *******************************************************************
+
+#define MAX_ARFCN 1023
+
+class IeARFCN : public IeBase {
+public:
+
+ IeARFCN() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ RlcMacResult DecodeIe(BitStreamIn &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetARFCN(unsigned short freq)
+ {
+ if (freq <= MAX_ARFCN)
+ {
+ arfcn = freq;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ unsigned short GetARFCN()
+ {
+ return(arfcn);
+ }
+
+ void ClearARFCN() { isValid = FALSE; }
+
+private:
+ unsigned short arfcn;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieARFCNIndexList.h b/data/mnet/GP10/Host/Rlc_mac/include/ieARFCNIndexList.h
new file mode 100644
index 0000000..e225c02
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieARFCNIndexList.h
@@ -0,0 +1,64 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieARFCNIndexList.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEARFCNINDEXLIST_H__
+#define __IEARFCNINDEXLIST_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+#include "RlcMacCommon.h"
+
+// *******************************************************************
+// class IeARFCNIndexList
+//
+// Description:
+// ARFCN Index List IE -- GSM04.60 12.10a
+//
+// < ARFCN index list struct > ::=
+// < ARFCN_INDEX : bit (6) >
+// { 0 | 1 < ARFCN index list struct > } ;
+//
+// *******************************************************************
+
+
+class IeARFCNIndexList : public IeBase {
+public:
+
+ IeARFCNIndexList() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetARFCNIndexList(unsigned char count, unsigned char *list);
+
+ void GetARFCNIndexList(unsigned char *len, unsigned char *list)
+ {
+ *len = numIndex;
+ for (int i = 0; i < numIndex; i++)
+ {
+ list[i] = arfcnIndex[i];
+ }
+ }
+
+ void ClearARFCNIndexList() { isValid = FALSE; }
+
+private:
+ unsigned char numIndex;;
+ unsigned char arfcnIndex[RLC_MAC_MAX_RF_FREQS];
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieAccessType.h b/data/mnet/GP10/Host/Rlc_mac/include/ieAccessType.h
new file mode 100644
index 0000000..9511bfe
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieAccessType.h
@@ -0,0 +1,66 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieAccessType.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEACCESSTYPE_H__
+#define __IEACCESSTYPE_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+// *******************************************************************
+// class IeAccessType
+//
+// Description:
+// ACCESS_TYPE IE -- GSM04.60 11.2.16
+// *******************************************************************
+
+
+class IeAccessType : public IeBase {
+public:
+
+ typedef enum
+ {
+ TWO_PHASE,
+ PAGE_RESPONSE,
+ CELL_UPDATE,
+ MM_PROCEDURE
+ } ACCESS_TYPE;
+
+ IeAccessType() : IeBase() {}
+
+ RlcMacResult DecodeIe(BitStreamIn &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetAccessType(ACCESS_TYPE type)
+ {
+ accessType = type;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ ACCESS_TYPE GetAccessType()
+ {
+ return (accessType);
+ }
+
+ void ClearAccessType() { isValid = FALSE; }
+
+private:
+ ACCESS_TYPE accessType;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieAckNackDescription.h b/data/mnet/GP10/Host/Rlc_mac/include/ieAckNackDescription.h
new file mode 100644
index 0000000..5fae6f9
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieAckNackDescription.h
@@ -0,0 +1,95 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieAckNackDescription.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEACKNACKDESCRIPTION_H__
+#define __IEACKNACKDESCRIPTION_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+#define RRB_SIZE 8
+#define MAX_SSN_SIZE 127
+
+// *******************************************************************
+// class IeAckNackDescription
+//
+// Description:
+// Ack Nack Dscription IE -- GSM04.60 12.3
+//
+// < Ack/Nack Description IE > ::=
+// < FINAL_ACK_INDICATION : bit (1) >
+// < STARTING_SEQUENCE_NUMBER : bit (7) >
+// < RECEIVED_BLOCK_BITMAP : bit (64) > ;
+// *******************************************************************
+
+class IeAckNackDescription : public IeBase {
+public:
+
+ typedef enum
+ {
+ TBF_INCOMPLETE,
+ TBF_COMPLETE
+ } FINAL_ACK_INDICATION;
+
+ IeAckNackDescription() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ RlcMacResult DecodeIe(BitStreamIn &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetAckNackDescription(FINAL_ACK_INDICATION finalAck,
+ unsigned char ssn, unsigned char rrb[RRB_SIZE])
+ {
+ if (ssn <= MAX_SSN_SIZE)
+ {
+ finalAckIndication = finalAck;
+ startingSeqNum = ssn;
+ for (int i = 0; i < RRB_SIZE; i++)
+ {
+ recBlockBitmap[i] = rrb[i];
+ }
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ void GetAckNackDescription(FINAL_ACK_INDICATION *finalAck,
+ unsigned char *ssn, unsigned char *rrb)
+ {
+ *finalAck = finalAckIndication;
+ *ssn = startingSeqNum;
+ for (int i = 0; i < RRB_SIZE; i++)
+ {
+ rrb[i] = recBlockBitmap[i];
+ }
+ }
+
+ FINAL_ACK_INDICATION GetFinalAckInd() { return(finalAckIndication); }
+
+ void ClearAckNackDescription() { isValid = FALSE; }
+
+private:
+ FINAL_ACK_INDICATION finalAckIndication;
+ unsigned char startingSeqNum;
+ unsigned char recBlockBitmap[RRB_SIZE];
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieAllocationBitMap.h b/data/mnet/GP10/Host/Rlc_mac/include/ieAllocationBitMap.h
new file mode 100644
index 0000000..3682028
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieAllocationBitMap.h
@@ -0,0 +1,61 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieAllocationBitMap.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEALLOCATIONBITMAP_H__
+#define __IEALLOCATIONBITMAP_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+#define MAX_ALLOCATION_BITMAP_LEN 128
+
+// *******************************************************************
+// class IeAllocationBitMap
+//
+// Description:
+// Allocation Bit Map IE -- GSM04.60 12.4
+//
+// *******************************************************************
+
+
+class IeAllocationBitMap : public IeBase {
+public:
+
+ IeAllocationBitMap() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetAllocationBitMap(unsigned char len, unsigned char *map);
+
+ void GetAllocationBitMap(unsigned char *len, unsigned char *map)
+ {
+ *len = allocLength;
+ for (int i = 0; i < allocLength; i++)
+ {
+ map[i] = allocBitMap[i];
+ }
+ }
+
+ void ClearAllocationBitMap() { isValid = FALSE; }
+
+private:
+ unsigned char allocLength;
+ unsigned char allocBitMap[MAX_ALLOCATION_BITMAP_LEN>>3];
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieBSIC.h b/data/mnet/GP10/Host/Rlc_mac/include/ieBSIC.h
new file mode 100644
index 0000000..0b00b0d
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieBSIC.h
@@ -0,0 +1,68 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieBSIC.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEBSIC_H__
+#define __IEBSIC_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+
+// *******************************************************************
+// class IeBSIC
+//
+// Description:
+// BSIC IE -- GSM04.60 11.2.4
+// *******************************************************************
+
+#define MAX_BSIC 63
+
+class IeBSIC : public IeBase {
+public:
+
+ IeBSIC() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ RlcMacResult DecodeIe(BitStreamIn &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetBSIC(unsigned char bsicVal)
+ {
+ if (bsicVal <= MAX_BSIC)
+ {
+ bsic = bsicVal;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ unsigned char GetBSIC()
+ {
+ return(bsic);
+ }
+
+ void ClearBSIC() { isValid = FALSE; }
+
+private:
+ unsigned char bsic;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieBtsPowerCtlMode.h b/data/mnet/GP10/Host/Rlc_mac/include/ieBtsPowerCtlMode.h
new file mode 100644
index 0000000..82825d4
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieBtsPowerCtlMode.h
@@ -0,0 +1,64 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieBtsPowerCtlMode.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEBTSPOWERCTLMODE_H__
+#define __IEBTSPOWERCTLMODE_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+// *******************************************************************
+// class IeBtsPowerCtlMode
+//
+// Description:
+// Bts Power Control Mode IE -- GSM04.60 11.2.29
+// *******************************************************************
+
+
+class IeBtsPowerCtlMode : public IeBase {
+public:
+
+ typedef enum
+ {
+ MODE_A,
+ MODE_B
+ } BTS_PWR_CTL_MODE;
+
+ IeBtsPowerCtlMode() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetBtsPowerCtlMode(BTS_PWR_CTL_MODE mode)
+ {
+ pCtlMode = mode;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ BTS_PWR_CTL_MODE GetBtsPowerCtlMode()
+ {
+ return (pCtlMode);
+ }
+
+ void ClearBtsPowerCtlMode() { isValid = FALSE; }
+
+private:
+ BTS_PWR_CTL_MODE pCtlMode;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieChangeMark.h b/data/mnet/GP10/Host/Rlc_mac/include/ieChangeMark.h
new file mode 100644
index 0000000..f9e66cf
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieChangeMark.h
@@ -0,0 +1,68 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieChangeMark.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IECHANGEMARK_H__
+#define __IECHANGEMARK_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+
+// *******************************************************************
+// class IeChangeMark
+//
+// Description:
+// Change Mark IE -- GSM04.60 12.8
+// *******************************************************************
+
+#define MAX_CHANGE_MARK 3
+
+class IeChangeMark : public IeBase {
+public:
+
+ IeChangeMark() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ RlcMacResult DecodeIe(BitStreamIn &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetChangeMark(unsigned char val)
+ {
+ if (val <= MAX_CHANGE_MARK)
+ {
+ changeMark = val;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ unsigned char GetChangeMark()
+ {
+ return(changeMark);
+ }
+
+ void ClearChangeMark() { isValid = FALSE; }
+
+private:
+ unsigned char changeMark;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieChannelCodingCommand.h b/data/mnet/GP10/Host/Rlc_mac/include/ieChannelCodingCommand.h
new file mode 100644
index 0000000..1c21d80
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieChannelCodingCommand.h
@@ -0,0 +1,88 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieChannelCodingCommand.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IECHANNELCODINGCOMMAND_H__
+#define __IECHANNELCODINGCOMMAND_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+// *******************************************************************
+// class IeChannelCodingCommand
+//
+// Description:
+// PR Mode IE -- GSM04.60 11.2.29
+// *******************************************************************
+
+
+class IeChannelCodingCommand : public IeBase {
+public:
+
+ typedef enum
+ {
+ CS_1,
+ CS_2,
+ CS_3,
+ CS_4
+ } CHANNEL_CODING_COMMAND;
+
+ IeChannelCodingCommand() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetChannelCodingCommand(CHANNEL_CODING_COMMAND val)
+ {
+ coding = val;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ CHANNEL_CODING_COMMAND GetChannelCodingCommand()
+ {
+ return (coding);
+ }
+
+ int GetNumFillBytes()
+ {
+ switch(coding)
+ {
+ case CS_1 : return (20); // 160 / 8
+ case CS_2 : return (30); // 240 / 8
+ case CS_3 : return (36); // 288 / 8
+ case CS_4 : return (50); // 400 / 8
+ }
+ }
+
+ int GetRLCDataBlockSize()
+ {
+ switch(coding)
+ {
+ case CS_1 : return (23);
+ case CS_2 : return (33);
+ case CS_3 : return (39);
+ case CS_4 : return (53);
+ }
+ }
+
+ void ClearChannelCodingCommand() { isValid = FALSE; }
+
+private:
+ CHANNEL_CODING_COMMAND coding;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieChannelNeeded.h b/data/mnet/GP10/Host/Rlc_mac/include/ieChannelNeeded.h
new file mode 100644
index 0000000..ad0e6ea
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieChannelNeeded.h
@@ -0,0 +1,66 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieChannelNeeded.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IECHANNELNEEDED_H__
+#define __IECHANNELNEEDED_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+// *******************************************************************
+// class IeChannelNeeded
+//
+// Description:
+// Channel Needed IE -- GSM04.60 11.2.10
+// *******************************************************************
+
+
+class IeChannelNeeded : public IeBase {
+public:
+
+ typedef enum
+ {
+ ANY_CHANNEL,
+ SDCCH,
+ TCH_F_FULL_RATE,
+ TCH_H_or_TCH_F_DUAL_MODE
+ } CHANNEL_NEEDED;
+
+ IeChannelNeeded() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetChannelNeeded(CHANNEL_NEEDED chan)
+ {
+ chanNeeded = chan;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ CHANNEL_NEEDED GetChannelNeeded()
+ {
+ return (chanNeeded);
+ }
+
+ void ClearChannelNeeded() { isValid = FALSE; }
+
+private:
+ CHANNEL_NEEDED chanNeeded;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieChannelRequestDescription.h b/data/mnet/GP10/Host/Rlc_mac/include/ieChannelRequestDescription.h
new file mode 100644
index 0000000..b8cd41b
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieChannelRequestDescription.h
@@ -0,0 +1,66 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieChannelRequestDescription.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IECHANNELREQUESTDESCRIPTION_H__
+#define __IECHANNELREQUESTDESCRIPTION_H__
+
+#include "logging\vclogging.h"
+#include "bitstream.h"
+#include "ieRLCMode.h"
+
+
+// *******************************************************************
+// class IeChannelRequestDescription
+//
+// Description:
+// Channel Request Description IE -- GSM04.60 12.7
+//
+// < Channel Request Description IE > ::=
+// < PEAK_THROUGHPUT_CLASS : bit (4) >
+// < RADIO_PRIORITY : bit (2) >
+// < RLC_MODE : bit (1) >
+// < LLC_PDU_TYPE : bit (1) >
+// < RLC_OCTET_COUNT : bit (16) > ;
+// *******************************************************************
+
+class IeChannelRequestDescription : public IeBase {
+public:
+
+ typedef enum
+ {
+ SACK_OR_ACK,
+ NOT_SACK_OR_ACK
+ } LLC_PDU_TYPE;
+
+ // IE contents
+ unsigned char peakThroughputClass;
+ unsigned char radioPriority;
+ IeRlcMode rlcMode;
+ LLC_PDU_TYPE llcPduType;
+ unsigned short rlcOctetCount;
+
+ IeChannelRequestDescription() : IeBase(), peakThroughputClass(1), radioPriority(1),
+ rlcMode(), llcPduType(SACK_OR_ACK), rlcOctetCount(0) {}
+
+ RlcMacResult DecodeIe(BitStreamIn &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ void SetChannelRequestDescriptionValid() { isValid = TRUE; }
+ void ClearChannelRequestDescription() { isValid = FALSE; }
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieFrequencyParameters.h b/data/mnet/GP10/Host/Rlc_mac/include/ieFrequencyParameters.h
new file mode 100644
index 0000000..f4666ab
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieFrequencyParameters.h
@@ -0,0 +1,105 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieFrequencyParameters.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEFREQUENCYPARAMETERS_H__
+#define __IEFREQUENCYPARAMETERS_H__
+
+#include "logging\vclogging.h"
+#include "bitstream.h"
+#include "ieTSC.h"
+#include "ieARFCN.h"
+#include "ieMAIO.h"
+#include "ieMANumber.h"
+#include "ieChangeMark.h"
+#include "ieGPRSMobileAllocation.h"
+#include "ieMAFreqList.h"
+
+
+// *******************************************************************
+// class IeFrequencyParameters
+//
+// Description:
+// Frequency Parameters IE -- GSM04.60 12.8
+//
+// < Frequency Parameters IE > ::=
+// < TSC : bit (3) >
+// { 00 < ARFCN : bit (10) >
+// | 01 < Indirect encoding : < Indirect encoding struct > >
+// | 10 < Direct encoding 1 : < Direct encoding 1 struct > >
+// | 11 < Direct encoding 2 : < Direct encoding 2 struct > > } ;
+//
+// < Indirect encoding struct > ::=
+// < MAIO : bit (6) >
+// < MA_NUMBER : bit (4) >
+// { 0 | 1 < CHANGE_MARK_1 : bit (2) >
+// { 0 | 1 < CHANGE_MARK_2 : bit (2) > } } ;
+//
+// < Direct encoding 1 struct > ::=
+// < MAIO : bit (6) >
+// < GPRS Mobile Allocation : < GPRS Mobile Allocation IE > > ;
+//
+// < Direct encoding 2 struct > ::=
+// < MAIO : bit (6) >
+// < HSN : bit (6) >
+// < Length of MA Frequency List contents : bit (4) >
+// < MA Frequency List contents : octet (val(Length of MA Frequency List contents) + 3) > ;
+// *******************************************************************
+
+class IeFrequencyParameters : public IeBase {
+public:
+
+ // IE contents
+ IeTSC tsc;
+ IeARFCN arfcn;
+ struct IndirectEncodingStruct
+ {
+ bool isValid;
+ IeMAIO maio;
+ IeMANumber maNumber;
+ IeChangeMark changeMark1;
+ IeChangeMark changeMark2;
+ } IndirectEncoding;
+ struct DirectEncoding1Struct
+ {
+ bool isValid;
+ IeMAIO maio;
+ IeGPRSMobileAllocation gprsMobileAllocation;
+ } DirectEncoding1;
+ struct DirectEncoding2Struct
+ {
+ bool isValid;
+ IeMAIO maio;
+ IeHSN hsn;
+ IeMAFreqList maFreqList;
+ } DirectEncoding2;
+
+
+ IeFrequencyParameters() : IeBase(), tsc()
+ {
+ IndirectEncoding.isValid = FALSE;
+ DirectEncoding1.isValid = FALSE;
+ DirectEncoding2.isValid = FALSE;
+ }
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ void SetFrequencyParameters() { isValid = TRUE; }
+ void ClearFrequencyParameters() { isValid = FALSE; }
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieGPRSMobileAllocation.h b/data/mnet/GP10/Host/Rlc_mac/include/ieGPRSMobileAllocation.h
new file mode 100644
index 0000000..1d14c9b
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieGPRSMobileAllocation.h
@@ -0,0 +1,68 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieGPRSMobileAllocation.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEGPRSMOBILEALLOCATION_H__
+#define __IEGPRSMOBILEALLOCATION_H__
+
+#include "logging\vclogging.h"
+#include "bitstream.h"
+#include "ieHSN.h"
+#include "ieMABitMap.h"
+#include "ieARFCNIndexList.h"
+#include "ieRFLNumberList.h"
+
+
+// *******************************************************************
+// class IeGPRSMobileAllocation
+//
+// Description:
+// GPRS Mobile Allocation IE -- GSM04.60 12.10a
+//
+// < GPRS Mobile Allocation IE > ::=
+// < HSN : bit (6) >
+// { 0 | 1 < RFL number list : < RFL number list struct > > }
+// { 0 < MA_LENGTH : bit (6) >
+// < MA_BITMAP : bit (val(MA_LENGTH) + 1) >
+// | 1 { 0 | 1 < ARFCN index list : < ARFCN index list struct > > } } ;
+//
+// < RFL number list struct > ::=
+// < RFL_NUMBER : bit (4) >
+// { 0 | 1 < RFL number list struct > } ;
+// < ARFCN index list struct > ::=
+// < ARFCN_INDEX : bit (6) >
+// { 0 | 1 < ARFCN index list struct > } ;
+// *******************************************************************
+
+class IeGPRSMobileAllocation : public IeBase {
+public:
+
+ // IE contents
+ IeHSN hsn;
+ IeRFLNumberList rflNumberList;
+ IeMABitMap maBitMap;
+ IeARFCNIndexList arfcnIndexList;
+
+ IeGPRSMobileAllocation() : IeBase(), hsn(), rflNumberList() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ void SetGPRSMobileAllocationValid() { isValid = TRUE; }
+ void ClearGPRSMobileAllocation() { isValid = FALSE; }
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieGlobalPacketTimingAdvance.h b/data/mnet/GP10/Host/Rlc_mac/include/ieGlobalPacketTimingAdvance.h
new file mode 100644
index 0000000..22ab169
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieGlobalPacketTimingAdvance.h
@@ -0,0 +1,136 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieGlobalPacketTimingAdvance.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEGLOBALPACKETTIMINGADVANCE_H__
+#define __IEGLOBALPACKETTIMINGADVANCE_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+#define MAX_TA_VALUE 63
+#define MAX_TA_INDEX 15
+#define MAX_TA_TIMESLOT 7
+
+// *******************************************************************
+// class IeGlobalPacketTimingAdvance
+//
+// Description:
+// Timing Advance IE -- GSM04.60 12.12a
+//
+// < Global Packet Timing Advance IE > ::=
+// { 0 | 1 < TIMING_ADVANCE_VALUE : bit (6) > }
+// { 0 | 1 < UPLINK_TIMING_ADVANCE_INDEX : bit (4) >
+// < UPLINK_TIMING_ADVANCE_TIMESLOT_NUMBER : bit (3) > }
+// { 0 | 1 < DOWNLINK_TIMING_ADVANCE_INDEX : bit (4) >
+// < DOWNLINK_TIMING_ADVANCE_TIMESLOT_NUMBER : bit (3) > }
+//
+// *******************************************************************
+
+class IeGlobalPacketTimingAdvance : public IeBase {
+public:
+
+ IeGlobalPacketTimingAdvance() : IeBase(), isTaValueValid(FALSE), isUplinkTaIndexValid(FALSE),
+ isDownlinkTaIndexValid(FALSE) {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetGlobalPacketTimingAdvance(unsigned char val)
+ {
+ if (val <= MAX_TA_VALUE)
+ {
+ taValue = val;
+ isTaValueValid = TRUE;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ RlcMacResult SetGlobalPacketTimingAdvanceUplink(unsigned char index, unsigned char timeSlot)
+ {
+ if ((index <= MAX_TA_INDEX) && (timeSlot <= MAX_TA_TIMESLOT))
+ {
+ uplinkTaIndex = index;
+ uplinkTsNumber = timeSlot;
+ isUplinkTaIndexValid = TRUE;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ RlcMacResult SetGlobalPacketTimingAdvanceDownlink(unsigned char index, unsigned char timeSlot)
+ {
+ if ((index <= MAX_TA_INDEX) && (timeSlot <= MAX_TA_TIMESLOT))
+ {
+ downlinkTaIndex = index;
+ downlinkTsNumber = timeSlot;
+ isDownlinkTaIndexValid = TRUE;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+
+ unsigned char GetGlobalPacketTimingAdvance()
+ {
+ return (taValue);
+ }
+
+ void GetGlobalPacketTimingAdvanceUplink(unsigned char *index, unsigned char *timeSlot)
+ {
+ *index = uplinkTaIndex;
+ *timeSlot = uplinkTsNumber;
+ }
+
+ void GetGlobalPacketTimingAdvanceDownlink(unsigned char *index, unsigned char *timeSlot)
+ {
+ *index = downlinkTaIndex;
+ *timeSlot = downlinkTsNumber;
+ }
+
+ void ClearGlobalPacketTimingAdvance()
+ {
+ isValid = FALSE;
+ isTaValueValid=FALSE;
+ isUplinkTaIndexValid=FALSE;
+ isDownlinkTaIndexValid=FALSE;
+ }
+
+private:
+ unsigned char taValue;
+ bool isTaValueValid;
+ unsigned char uplinkTaIndex;
+ unsigned char uplinkTsNumber;
+ bool isUplinkTaIndexValid;
+ unsigned char downlinkTaIndex;
+ unsigned char downlinkTsNumber;
+ bool isDownlinkTaIndexValid;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieGlobalPowerControlParms.h b/data/mnet/GP10/Host/Rlc_mac/include/ieGlobalPowerControlParms.h
new file mode 100644
index 0000000..604bb5b
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieGlobalPowerControlParms.h
@@ -0,0 +1,192 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieGlobalPowerControlParms.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEGLOBALPOWERCONTROLPARMS_H__
+#define __IEGLOBALPOWERCONTROLPARMS_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+#include "RlcMacCommon.h"
+
+#define MAX_T_AVG_W 31
+#define MAX_T_AVG_T 31
+#define MAX_PB 15
+#define MAX_N_AVG_I 15
+
+// *******************************************************************
+// class IeGlobalPowerControlParms
+//
+// Description:
+// Global Power Control Parameters IE -- GSM04.60 12.9
+//
+// < Global Power Control Parameters IE > ::=
+// < ALPHA : bit (4) >
+// < T_AVG_W : bit (5) >
+// < T_AVG_T : bit (5) >
+// < Pb : bit (4) >
+// < PC_MEAS_CHAN : bit (1) >
+// < INT_MEAS_CHANNEL_LIST_AVAIL : bit (1) >
+// < N_AVG_I : bit (4) > ;
+// *******************************************************************
+
+class IeGlobalPowerControlParms : public IeBase {
+public:
+
+ typedef enum
+ {
+ DL_MEAS_ON_BCCH,
+ DL_MEAS_ON_PDCH
+ } PC_MEAS_CHAN_TYPE;
+
+ typedef enum
+ {
+ PSI4_MSG_NOT_BROADCAST,
+ PSI4_MSG_BROADCAST
+ } INT_MEAS_CHAN_LIST_AVAIL_TYPE;
+
+ IeGlobalPowerControlParms() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetAlpha(unsigned char val)
+ {
+ if (val <= MAX_ALPHA_VALUE)
+ {
+ alpha = val;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ unsigned char GetAlpha()
+ {
+ return (alpha);
+ }
+
+ RlcMacResult SetTAvgW(unsigned char val)
+ {
+ if (val <= MAX_T_AVG_W)
+ {
+ tAvgW = val;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ unsigned char GetTAvgW()
+ {
+ return (tAvgW);
+ }
+
+ RlcMacResult SetTAvgT(unsigned char val)
+ {
+ if (val <= MAX_T_AVG_T)
+ {
+ tAvgT = val;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ unsigned char GetTAvgT()
+ {
+ return (tAvgT);
+ }
+
+ RlcMacResult SetPb(unsigned char val)
+ {
+ if (val <= MAX_PB)
+ {
+ pb = val;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ unsigned char GetPb()
+ {
+ return (pb);
+ }
+
+ RlcMacResult SetPcMeasChan(PC_MEAS_CHAN_TYPE val)
+ {
+ pcMeasChan = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ PC_MEAS_CHAN_TYPE GetPcMeasChan()
+ {
+ return (pcMeasChan);
+ }
+
+
+ RlcMacResult SetNAvgI(unsigned char val)
+ {
+ if (val <= MAX_N_AVG_I)
+ {
+ nAvgI = val;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ unsigned char GetNAvgI()
+ {
+ return (nAvgI);
+ }
+
+ RlcMacResult SetIntMeasChanAvail(INT_MEAS_CHAN_LIST_AVAIL_TYPE val)
+ {
+ intMeasChanAvail = val;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ INT_MEAS_CHAN_LIST_AVAIL_TYPE GetIntMeasChanAvail()
+ {
+ return (intMeasChanAvail);
+ }
+
+ void SetGlobalPowerControlParms() { isValid = TRUE; }
+ void ClearGlobalPowerControlParms() { isValid = FALSE; }
+
+private:
+ unsigned char alpha;
+ unsigned char tAvgW;
+ unsigned char tAvgT;
+ unsigned char pb;
+ PC_MEAS_CHAN_TYPE pcMeasChan;
+ unsigned char nAvgI;
+ INT_MEAS_CHAN_LIST_AVAIL_TYPE intMeasChanAvail;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieGlobalTFI.h b/data/mnet/GP10/Host/Rlc_mac/include/ieGlobalTFI.h
new file mode 100644
index 0000000..36aa389
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieGlobalTFI.h
@@ -0,0 +1,85 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieGlobalTFI.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEGLOBALTFI_H__
+#define __IEGLOBALTFI_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+#define MAX_TFI 32
+
+// *******************************************************************
+// class IeGlobalTFI
+//
+// Description:
+// Global TFI IE -- GSM04.60 12.10
+//
+// < Global TFI IE > ::=
+// { 0 < UPLINK_TFI : bit (5) >
+// | 1 < DOWNLINK_TFI : bit (5) > } ;
+//
+// *******************************************************************
+
+class IeGlobalTFI : public IeBase {
+public:
+
+ typedef enum
+ {
+ UPLINK_TFI,
+ DOWNLINK_TFI
+ } RLC_MAC_TFI_TYPE;
+
+ IeGlobalTFI() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ RlcMacResult DecodeIe(BitStreamIn &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetGlobalTFI(unsigned char tfiIn, RLC_MAC_TFI_TYPE type)
+ {
+ if (tfiIn <= MAX_TFI)
+ {
+ globalTFI = tfiIn;
+ tfiType = type;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ unsigned int GetGlobalTFI()
+ {
+ return (globalTFI);
+ }
+
+ RLC_MAC_TFI_TYPE GetGlobalTFIType()
+ {
+ return (tfiType);
+ }
+
+ void ClearGlobalTFI() { isValid = FALSE; }
+
+private:
+ RLC_MAC_TFI_TYPE tfiType;
+ unsigned char globalTFI;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieHSN.h b/data/mnet/GP10/Host/Rlc_mac/include/ieHSN.h
new file mode 100644
index 0000000..6bf1317
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieHSN.h
@@ -0,0 +1,67 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieHSN.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEHSN_H__
+#define __IEHSN_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+
+// *******************************************************************
+// class IeHSN
+//
+// Description:
+// HSN IE -- GSM04.60 12.8
+// *******************************************************************
+
+#define MAX_HSN 63
+
+class IeHSN : public IeBase {
+public:
+
+ IeHSN() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetHSN(unsigned char val)
+ {
+ if (val <= MAX_HSN)
+ {
+ hsn = val;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ unsigned char GetHSN()
+ {
+ return(hsn);
+ }
+
+ void ClearHSN() { isValid = FALSE; }
+
+private:
+ unsigned char hsn;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieLSAParameters.h b/data/mnet/GP10/Host/Rlc_mac/include/ieLSAParameters.h
new file mode 100644
index 0000000..f91677d
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieLSAParameters.h
@@ -0,0 +1,76 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieLSAParameters.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IELSAPARAMETERS_H__
+#define __IELSAPARAMETERS_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+#define MAX_FREQ_OR_CELLS 32
+// *******************************************************************
+// class IeLSAParameters
+//
+// Description:
+// LSA Parameters IE -- GSM04.60 12.28
+//
+// < LSA Parameters IE > ::=
+// < NR_OF_FREQ_OR_CELLS : bit (5) >:
+// < LSA ID information : < LSA ID information struct >> } *(val (NR_OF_FREQ_OR_CELLS)) };
+//
+// < LSA ID information struct > ::=
+// { 1 { 0 < LSA_ID : bit (24) >
+// |1 < ShortLSA_ID : bit (10) >} } ** 0 ;
+//
+// *******************************************************************
+
+class IeLSAParameters : public IeBase {
+public:
+
+ IeLSAParameters() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetLSAParameters(unsigned char numIds, unsigned int *ids);
+ RlcMacResult SetLSAParameters(unsigned char numIds, unsigned short *shortIds);
+
+ void GetLSAParameters(unsigned char *numIds, unsigned int *ids)
+ {
+ *numIds = numFreqOrCells;
+ ids = LSAIdInfo.lsaIds;
+ }
+
+ void GetLSAParameters(unsigned char *numIds, unsigned short *shortIds)
+ {
+ *numIds = numFreqOrCells;
+ shortIds = LSAIdInfo.shortLsaIds;
+ }
+
+ void ClearLSAParameters() { isValid = FALSE; }
+
+private:
+ unsigned char numFreqOrCells;
+ enum IdType {SHORT, LONG} type;
+ union LSAIdStruct
+ {
+ unsigned int lsaIds[MAX_FREQ_OR_CELLS];
+ unsigned short shortLsaIds[MAX_FREQ_OR_CELLS];
+ } LSAIdInfo;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieMABitMap.h b/data/mnet/GP10/Host/Rlc_mac/include/ieMABitMap.h
new file mode 100644
index 0000000..d95240c
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieMABitMap.h
@@ -0,0 +1,60 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieMABitMap.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEMABITMAP_H__
+#define __IEMABITMAP_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+#include "RlcMacCommon.h"
+
+// *******************************************************************
+// class IeMABitMap
+//
+// Description:
+// MA Bit Map IE -- GSM04.60 12.10a
+//
+// *******************************************************************
+
+
+class IeMABitMap : public IeBase {
+public:
+
+ IeMABitMap() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetMABitMap(unsigned char len, unsigned char *map);
+
+ void GetMABitMap(unsigned char *len, unsigned char *map)
+ {
+ *len = maLength;
+ for (int i = 0; i < ((maLength+1)>>3); i++)
+ {
+ map[i] = maBitMap[i];
+ }
+ }
+
+ void ClearMABitMap() { isValid = FALSE; }
+
+private:
+ unsigned char maLength;
+ unsigned char maBitMap[RLC_MAC_MAX_RF_FREQS>>3];
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieMACMode.h b/data/mnet/GP10/Host/Rlc_mac/include/ieMACMode.h
new file mode 100644
index 0000000..428f0e7
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieMACMode.h
@@ -0,0 +1,66 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieMACMode.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEMACMODE_H__
+#define __IEMACMODE_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+// *******************************************************************
+// class IeMacMode
+//
+// Description:
+// Mac Mode IE -- GSM04.60 11.2.7
+// *******************************************************************
+
+class IeMacMode : public IeBase {
+public:
+
+ typedef enum
+ {
+ DYNAMIC_ALLOCATION,
+ EXTENDED_DYNAMIC_ALLOCATION,
+ FIXED_ALLOCATION_NO_HALF_DUPLEX,
+ FIXED_ALLOCATION_HALF_DUPLEX
+ } MAC_MODE;
+
+ IeMacMode() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetMacMode(MAC_MODE mode)
+ {
+ macMode = mode;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ MAC_MODE GetMacMode()
+ {
+ return(macMode);
+ }
+
+ void ClearMacMode() { isValid = FALSE; }
+private:
+ MAC_MODE macMode;
+};
+
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieMAFreqList.h b/data/mnet/GP10/Host/Rlc_mac/include/ieMAFreqList.h
new file mode 100644
index 0000000..3d0090a
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieMAFreqList.h
@@ -0,0 +1,97 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieMAFreqList.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEMAFREQLIST_H__
+#define __IEMAFREQLIST_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+#include "RlcMacCommon.h"
+
+
+// *******************************************************************
+// class IeMAFreqList
+//
+// Description:
+// MA Frequency List IE -- GSM04.60 12.8
+// *******************************************************************
+
+#define MAX_MA_FREQ_LIST_LEN 18
+#define MA_LIST_MAX_RF_FREQS RLC_MAC_MAX_RF_FREQS
+
+typedef enum
+{
+ FREQ_LIST_FORMAT_BIT_MAP_0 = 0,
+ FREQ_LIST_FORMAT_1024_RANGE = 1,
+ FREQ_LIST_FORMAT_512_RANGE = 20,
+ FREQ_LIST_FORMAT_256_RANGE = 21,
+ FREQ_LIST_FORMAT_128_RANGE = 22,
+ FREQ_LIST_FORMAT_VARIABLE_BIT_MAP = 23,
+} FREQ_LIST_FORMAT_ID;
+
+class IeMAFreqList : public IeBase {
+public:
+
+ IeMAFreqList() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetMAFreqList(unsigned char numEntries, unsigned short *arfcns);
+
+ void GetMAFreqList(unsigned char *numEntries, unsigned short *arfcns)
+ {
+ *numEntries = numArfcns;
+ for (int i = 0; i < numArfcns; i++)
+ {
+ arfcns[i] = arfcnList[i];
+ }
+ }
+
+ void ClearMAFreqList() { isValid = FALSE; }
+
+private:
+ unsigned char numArfcns;
+ unsigned short arfcnList[MA_LIST_MAX_RF_FREQS];
+
+
+ FREQ_LIST_FORMAT_ID SelectFrequencyListFormat();
+ RlcMacResult EncodeFreqList1024Range(unsigned char &MAListLen, unsigned char *MAList);
+ RlcMacResult EncodeFreqList512Range(unsigned char &MAListLen, unsigned char *MAList);
+ RlcMacResult EncodeFreqList256Range(unsigned char &MAListLen, unsigned char *MAList);
+ RlcMacResult EncodeFreqList128Range(unsigned char &MAListLen, unsigned char *MAList);
+ RlcMacResult EncodeFreqListVariableBitMap(unsigned char &MAListLen, unsigned char *MAList);
+ RlcMacResult EncodeFreqListBitMap0(unsigned char &MAListLen, unsigned char *MAList);
+ int GetGreatestPowerOf2LessorOrEqualTo(int index);
+ void EncodeFreqsSubTree(int index, int range,unsigned short *set,
+ short numberInSet, unsigned short *W);
+ void GetFreqSetFromW(unsigned short origArfcn, int original_range,
+ unsigned short *W, short numberInW, unsigned short *set);
+ void SetWbits(int firstNumBits, int arrayLength, unsigned short *Wbits);
+ unsigned short ReduceMinArfcn(int numFreq, unsigned short *reducedArfcn);
+ void StuffArray(
+ int arrayLength,
+ unsigned short *W,
+ unsigned short *Wbits,
+ int &bufferLength,
+ int startBit, // 1-8; 1:lsb, 8:msb, msbs before startBit have to be preserved
+ // startBit is advanced to the next available bit before return
+ unsigned char *buffer);
+
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieMAIO.h b/data/mnet/GP10/Host/Rlc_mac/include/ieMAIO.h
new file mode 100644
index 0000000..0434ad6
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieMAIO.h
@@ -0,0 +1,67 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieMAIO.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEMAIO_H__
+#define __IEMAIO_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+
+// *******************************************************************
+// class IeMAIO
+//
+// Description:
+// MAIO IE -- GSM04.60 12.8
+// *******************************************************************
+
+#define MAX_MAIO 63
+
+class IeMAIO : public IeBase {
+public:
+
+ IeMAIO() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetMAIO(unsigned char val)
+ {
+ if (val <= MAX_MAIO)
+ {
+ maio = val;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ unsigned char GetMAIO()
+ {
+ return(maio);
+ }
+
+ void ClearMAIO() { isValid = FALSE; }
+
+private:
+ unsigned char maio;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieMANumber.h b/data/mnet/GP10/Host/Rlc_mac/include/ieMANumber.h
new file mode 100644
index 0000000..453cd4b
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieMANumber.h
@@ -0,0 +1,67 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieMANumber.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEMANUMBER_H__
+#define __IEMANUMBER_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+
+// *******************************************************************
+// class IeMANumber
+//
+// Description:
+// MANumber IE -- GSM04.60 12.8
+// *******************************************************************
+
+#define MAX_MA_NUMBER 15
+
+class IeMANumber : public IeBase {
+public:
+
+ IeMANumber() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetMANumber(unsigned char val)
+ {
+ if (val <= MAX_MA_NUMBER)
+ {
+ maNum = val;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ unsigned char GetMANumber()
+ {
+ return(maNum);
+ }
+
+ void ClearMANumber() { isValid = FALSE; }
+
+private:
+ unsigned char maNum;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieMSRadioAccessCapability.h b/data/mnet/GP10/Host/Rlc_mac/include/ieMSRadioAccessCapability.h
new file mode 100644
index 0000000..00a5b3b
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieMSRadioAccessCapability.h
@@ -0,0 +1,169 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieMSRadioAccessCapability.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEMSRADIOACCESSCAPABILITY_H__
+#define __IEMSRADIOACCESSCAPABILITY_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+#include "ril3/ril3_gmm_msg.h"
+
+// *******************************************************************
+// class IeMSRadioAccessCapability
+//
+// Description:
+// Power Control Parameters IE -- GSM04.60 11.2.16, GSM04.08 10.5.5.12a
+//
+// < MS Radio Access Capability IE > ::=
+//
+// <MS RA capability value part struct >::= --recursive structure allows any number of Access technologies
+// < Access Technology Type: bit (4) >
+// < Access capabilities : <Access capabilities struct> >
+// { 0 | 1 <MS RA capability value part struct> } ;
+//
+// < Access capabilities struct > ::=
+// < Length : bit (7) > -- length in bits of Content and spare bits
+// <Access capabilities : <Content>>
+// <spare bits>** ; -- expands to the indicated length
+// -- may be used for future enhancements
+//
+// < Content > ::=
+// < RF Power Capability : bit (3) >
+// { 0 | 1 <A5 bits : <A5 bits> > } -- zero means that the same values apply for parameters as in the immediately preceeding Access capabilities field within this IE
+// -- The presence of the A5 bits is mandatory in the 1st Access capabilities struct within this IE.
+// < ES IND : bit >
+// < PS : bit >
+// < VGCS : bit >
+// < VBS : bit >
+// { 0 | 1 < Multislot capability : Multislot capability struct > } ; -- zero means that the same values apply for multislot parameters as in the immediately preceeding Access capabilities field within this IE.
+// -- The presence of the Multislot capability struct is mandatory in the 1st Access capabilities struct within this IE.
+//
+// < Multislot capability struct > ::=
+// { 0 | 1 < HSCSD multislot class : bit (5) > }
+// { 0 | 1 < GPRS multislot class : bit (5) > < GPRS Extended Dynamic Allocation Capability : bit > }
+// { 0 | 1 < SMS_VALUE : bit (4) > < SM_VALUE : bit (4) > } ;
+//
+// <A5 bits> ::= < A5/1 : bit> <A5/2 : bit> <A5/3 : bit> <A5/4 : bit> <A5/5 : bit> <A5/6 : bit> <A5/7 : bit>; -- bits for circuit mode ciphering algorithms
+//
+// *******************************************************************
+
+// (GSM P, GSM E, GSM R), or GSM 1800, or GSM 1900
+#define MAX_ACCESS_TECHNOLOGIES 3
+
+class IeMSRadioAccessCapability : public IeBase {
+public:
+
+ typedef enum
+ {
+ GSM_P,
+ GSM_E,
+ GSM_R,
+ GSM_1800,
+ GSM_1900
+ } ACCESS_TECHNOLOGY_TYPE;
+
+ typedef enum
+ {
+ A5_X_NOT_AVAILABLE,
+ A5_X_AVAILABLE,
+ } A5_BITS;
+
+ typedef enum
+ {
+ EARLY_CLASSMARK_SENDING_NOT_IMPLEMENTED,
+ EARLY_CLASSMARK_SENDING_IMPLEMENTED
+ } ES_IND;
+
+ typedef enum
+ {
+ PS_NOT_PRESENT,
+ PS_PRESENT
+ } PS;
+
+ typedef enum
+ {
+ NO_VGCS_CAPABILITY,
+ VGCS_CAPABILITY
+ } VGCS;
+
+ typedef enum
+ {
+ NO_VBS_CAPABILITY,
+ VBS_CAPABILITY
+ } VBS;
+
+ typedef enum
+ {
+ EXTENDED_DYNAMIC_ALLOC_NOT_IMPLEMENTED,
+ EXTENDED_DYNAMIC_ALLOC_IMPLEMENTED
+ } GPRS_EXTENDED_DYNAMIC_ALLOC_CAPABILITY;
+
+ // IE contents
+ struct MSRACapabilityValuePartStruct
+ {
+ bool isValid;
+ ACCESS_TECHNOLOGY_TYPE accessTechnologyType;
+ unsigned char length;
+ unsigned char rfPowerCapability;
+ A5_BITS a51Bit;
+ A5_BITS a52Bit;
+ A5_BITS a53Bit;
+ A5_BITS a54Bit;
+ A5_BITS a55Bit;
+ A5_BITS a56Bit;
+ A5_BITS a57Bit;
+ ES_IND esInd;
+ PS ps;
+ VGCS vgcs;
+ VBS vbs;
+ struct
+ {
+ bool isValid;
+ unsigned char hscsdMultislotClass;
+ } HSCSDMultislotClass;
+ struct
+ {
+ bool isValid;
+ unsigned char gprsMultislotClass;
+ GPRS_EXTENDED_DYNAMIC_ALLOC_CAPABILITY gprsExtendedDynamicAllocationCapability;
+ } GPRSCapability;
+ struct
+ {
+ bool isValid;
+ unsigned char smsValue;
+ unsigned char smValue;
+ } SwitchMeasure;
+ } MSRACapabilityValuePart[MAX_ACCESS_TECHNOLOGIES];
+
+ IeMSRadioAccessCapability() : IeBase()
+ {
+ for (int i=0; i < MAX_ACCESS_TECHNOLOGIES; i++)
+ {
+ MSRACapabilityValuePart[i].isValid = FALSE;
+ }
+ }
+
+ RlcMacResult DecodeIe(BitStreamIn &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ void SetMSRadioAccessCapabilityValid() { isValid = TRUE; }
+ void ClearMSRadioAccessCapability() { isValid = FALSE; }
+ IeMSRadioAccessCapability &operator=(const T_CNI_RIL3_IE_MS_RADIO_ACCESS_CAPABILITY &raCap);
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieMobileIdentity.h b/data/mnet/GP10/Host/Rlc_mac/include/ieMobileIdentity.h
new file mode 100644
index 0000000..8be28f7
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieMobileIdentity.h
@@ -0,0 +1,79 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieMobileIdentity.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEMOBILEIDENTITY_H__
+#define __IEMOBILEIDENTITY_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+#define MAX_MOBILE_ID_LEN 16
+// *******************************************************************
+// class IeMobileIdentity
+//
+// Description:
+// Mobile Identity IE -- GSM04.60 11.2.10
+// GSM04.08 10.1.5.4
+// *******************************************************************
+
+
+class IeMobileIdentity : public IeBase {
+public:
+
+ typedef enum
+ {
+ NO_IDENTITY,
+ IMSI,
+ IMEI,
+ IMEISV,
+ TMSI_PTMSI
+ } MOBILE_IDENTITY_TYPE;
+
+ IeMobileIdentity() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetMobileIdentity(MOBILE_IDENTITY_TYPE type, int numDigits, unsigned char *digits);
+ RlcMacResult SetMobileIdentity(MOBILE_IDENTITY_TYPE type, unsigned long tmsi);
+
+ void GetMobileIdentity(MOBILE_IDENTITY_TYPE *type, int *numDigits, unsigned char *digits)
+ {
+ *type = miType;
+ *numDigits = numMiDigits;
+ for (int i = 0; i < numMiDigits; i++)
+ {
+ digits[i] = miDigits[i];
+ }
+ }
+
+ void GetMobileIdentity(MOBILE_IDENTITY_TYPE *type, unsigned long *tmsi)
+ {
+ *type = miType;
+ *tmsi = p_tmsi;
+ }
+
+ void ClearMobileIdentity() { isValid = FALSE; }
+
+private:
+ MOBILE_IDENTITY_TYPE miType;
+ unsigned long p_tmsi;
+ int numMiDigits;
+ unsigned char miDigits[MAX_MOBILE_ID_LEN];
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieNLN.h b/data/mnet/GP10/Host/Rlc_mac/include/ieNLN.h
new file mode 100644
index 0000000..cc724ec
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieNLN.h
@@ -0,0 +1,59 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieNLN.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IENLN_H__
+#define __IENLN_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+// *******************************************************************
+// class IeNLN
+//
+// Description:
+// NLN IE -- GSM04.60 11.2.10
+// GSM04.08 10.5.2.23
+// *******************************************************************
+
+
+class IeNLN : public IeBase {
+public:
+
+ IeNLN() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetNLN(unsigned char val)
+ {
+ nln = val;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ unsigned char GetNLN()
+ {
+ return (nln);
+ }
+
+ void ClearNLN() { isValid = FALSE; }
+
+private:
+ unsigned char nln;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/iePO.h b/data/mnet/GP10/Host/Rlc_mac/include/iePO.h
new file mode 100644
index 0000000..92b5bdd
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/iePO.h
@@ -0,0 +1,58 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : iePO.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEPO_H__
+#define __IEPO_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+// *******************************************************************
+// class IePO
+//
+// Description:
+// PO IE -- GSM04.60 11.2.29
+// *******************************************************************
+
+
+class IePO : public IeBase {
+public:
+
+ IePO() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetPO(unsigned char val)
+ {
+ po = val;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ unsigned char GetPO()
+ {
+ return (po);
+ }
+
+ void ClearPO() { isValid = FALSE; }
+
+private:
+ unsigned char po;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/iePRMode.h b/data/mnet/GP10/Host/Rlc_mac/include/iePRMode.h
new file mode 100644
index 0000000..6e0e518
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/iePRMode.h
@@ -0,0 +1,64 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : iePRMode.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEPRMODE_H__
+#define __IEPRMODE_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+// *******************************************************************
+// class IePRMode
+//
+// Description:
+// PR Mode IE -- GSM04.60 11.2.29
+// *******************************************************************
+
+
+class IePRMode : public IeBase {
+public:
+
+ typedef enum
+ {
+ PR_MODE_A_ONE_MS,
+ PR_MODE_B_ALL_MS
+ } PR_MODE;
+
+ IePRMode() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetPRMode(PR_MODE mode)
+ {
+ prMode = mode;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ PR_MODE GetPRMode()
+ {
+ return (prMode);
+ }
+
+ void ClearPRMode() { isValid = FALSE; }
+
+private:
+ PR_MODE prMode;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/iePTMSI.h b/data/mnet/GP10/Host/Rlc_mac/include/iePTMSI.h
new file mode 100644
index 0000000..e4cb9c2
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/iePTMSI.h
@@ -0,0 +1,68 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : iePTMSI.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEPTMSI_H__
+#define __IEPTMSI_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+
+#define MAX_PTMSI 4294967295
+
+
+// *******************************************************************
+// class IePTMSI
+//
+// Description:
+// PTMSI IE -- GSM03.03
+// *******************************************************************
+
+class IePTMSI : public IeBase {
+public:
+
+ IePTMSI() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetPTMSI(unsigned int ptmsiIn)
+ {
+ if (ptmsiIn <= MAX_PTMSI)
+ {
+ ptmsi = ptmsiIn;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ unsigned int GetPTMSI()
+ {
+ return (ptmsi);
+ }
+
+ void ClearPTMSI() { isValid = FALSE; }
+
+private:
+ unsigned int ptmsi;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/iePacketReqRef.h b/data/mnet/GP10/Host/Rlc_mac/include/iePacketReqRef.h
new file mode 100644
index 0000000..1303502
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/iePacketReqRef.h
@@ -0,0 +1,74 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : iePacketReqRef.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEPACKETREQREF_H__
+#define __IEPACKETREQREF_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+// *******************************************************************
+// class IePacketReqRef
+//
+// Description:
+// Packet Request Ref IE -- GSM04.60 12.11
+// GSM04.08 10.5.2.38
+//
+// < Packet Request Reference IE > ::=
+// < RANDOM_ACCESS_INFORMATION value : bit (11) >
+// < FRAME_NUMBER : bit (16) > ;
+//
+// *******************************************************************
+
+class IePacketReqRef : public IeBase {
+public:
+
+ IePacketReqRef() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetPacketReqRef(unsigned short randAcc, unsigned char t1,
+ unsigned char t2, unsigned char t3)
+ {
+ randAccInfo = randAcc;
+ T1 = t1;
+ T2 = t2;
+ T3 = t3;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ void GetPacketReqRef(unsigned short *randAcc, unsigned char *t1,
+ unsigned char *t2, unsigned char *t3)
+ {
+ *randAcc = randAccInfo;
+ *t1 = T1;
+ *t2 = T2;
+ *t3 = T3;
+ }
+
+ void ClearPacketReqRef() { isValid = FALSE; }
+
+private:
+ unsigned short randAccInfo;
+ unsigned char T1;
+ unsigned char T2;
+ unsigned char T3;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/iePacketTimingAdvance.h b/data/mnet/GP10/Host/Rlc_mac/include/iePacketTimingAdvance.h
new file mode 100644
index 0000000..fd24fc2
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/iePacketTimingAdvance.h
@@ -0,0 +1,106 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : iePacketTimingAdvance.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEPACKETTIMINGADVANCE_H__
+#define __IEPACKETTIMINGADVANCE_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+#define MAX_TA_VALUE 63
+#define MAX_TA_INDEX 15
+#define MAX_TA_TIMESLOT 7
+
+// *******************************************************************
+// class IePacketTimingAdvance
+//
+// Description:
+// Packet Timing Advance IE -- GSM04.60 12.12
+//
+// < Packet Timing Advance IE > ::=
+// { 0 | 1 < TIMING_ADVANCE_VALUE : bit (6) > }
+// { 0 | 1 < TIMING_ADVANCE_INDEX : bit (4) >
+// < TIMING_ADVANCE_TIMESLOT_NUMBER : bit (3) > } ;
+//
+// *******************************************************************
+
+class IePacketTimingAdvance : public IeBase {
+public:
+
+ IePacketTimingAdvance() : IeBase(), isTaValueValid(FALSE), isTaIndexValid(FALSE) {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetPacketTimingAdvance(unsigned char val)
+ {
+ if (val <= MAX_TA_VALUE)
+ {
+ taValue = val;
+ isTaValueValid = TRUE;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ RlcMacResult SetPacketTimingAdvance(unsigned char index, unsigned char timeSlot)
+ {
+ if ((index <= MAX_TA_INDEX) && (timeSlot <= MAX_TA_TIMESLOT))
+ {
+ taIndex = index;
+ tsNumber = timeSlot;
+ isTaIndexValid = TRUE;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ unsigned char GetPacketTimingAdvance()
+ {
+ return (taValue);
+ }
+
+ void GetPacketTimingAdvance(unsigned char *index, unsigned char *timeSlot)
+ {
+ *index = taIndex;
+ *timeSlot = tsNumber;
+ }
+
+ void ClearPacketTimingAdvance()
+ {
+ isValid = FALSE;
+ isTaValueValid=FALSE;
+ isTaIndexValid=FALSE;
+ }
+
+private:
+ unsigned char taValue;
+ bool isTaValueValid;
+ unsigned char taIndex;
+ unsigned char tsNumber;
+ bool isTaIndexValid;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/iePageMode.h b/data/mnet/GP10/Host/Rlc_mac/include/iePageMode.h
new file mode 100644
index 0000000..5802f8a
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/iePageMode.h
@@ -0,0 +1,66 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : iePageMode.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEPAGEMODE_H__
+#define __IEPAGEMODE_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+// *******************************************************************
+// class IePageMode
+//
+// Description:
+// Page Mode IE -- GSM04.60 12.20
+// *******************************************************************
+
+
+class IePageMode : public IeBase {
+public:
+
+ typedef enum
+ {
+ NORMAL_PAGING = 0,
+ EXTENDED_PAGING = 1,
+ PAGING_REORGANIZATION = 2,
+ PAGING_SAME_AS_BEFORE = 3
+ } RLC_MAC_PAGE_MODE;
+
+ IePageMode() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetPageMode(RLC_MAC_PAGE_MODE mode)
+ {
+ pageMode = mode;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ RLC_MAC_PAGE_MODE GetPageMode()
+ {
+ return (pageMode);
+ }
+
+ void ClearPageMode() { isValid = FALSE; }
+
+private:
+ RLC_MAC_PAGE_MODE pageMode;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/iePersistenceLevel.h b/data/mnet/GP10/Host/Rlc_mac/include/iePersistenceLevel.h
new file mode 100644
index 0000000..a1b3527
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/iePersistenceLevel.h
@@ -0,0 +1,65 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : iePersistenceLevel.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEPERSISTENCELEVEL_H__
+#define __IEPERSISTENCELEVEL_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+#include "RlcMacCommon.h"
+
+// *******************************************************************
+// class IePersistenceLevel
+//
+// Description:
+// Page Mode IE -- GSM04.60 12.14
+// *******************************************************************
+
+
+class IePersistenceLevel : public IeBase {
+public:
+
+ IePersistenceLevel() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetPersistenceLevel(unsigned char levels[MAX_NUM_RADIO_PRIORITY])
+ {
+ for (int i = 0; i < MAX_NUM_RADIO_PRIORITY; i++)
+ {
+ persistenceLevel[i] = levels[i];
+ }
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ void GetPersistenceLevel(unsigned char levels[MAX_NUM_RADIO_PRIORITY])
+ {
+ for (int i = 0; i < MAX_NUM_RADIO_PRIORITY; i++)
+ {
+ levels[i] = persistenceLevel[i];
+ }
+ }
+
+ void ClearPersistenceLevel() { isValid = FALSE; }
+
+private:
+ unsigned char persistenceLevel[MAX_NUM_RADIO_PRIORITY];
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/iePowerControlParameters.h b/data/mnet/GP10/Host/Rlc_mac/include/iePowerControlParameters.h
new file mode 100644
index 0000000..5618cc2
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/iePowerControlParameters.h
@@ -0,0 +1,78 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : iePowerControlParameters.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEPOWERCONTROLPARAMETERS_H__
+#define __IEPOWERCONTROLPARAMETERS_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+#include "RlcMacCommon.h"
+
+// *******************************************************************
+// class IePowerControlParameters
+//
+// Description:
+// Power Control Parameters IE -- GSM04.60 12.13
+//
+// < Power Control Parameters IE > ::=
+// < ALPHA : bit (4) >
+// { 0 | 1 < GAMMA_TN0 : bit (5) > }
+// { 0 | 1 < GAMMA_TN1 : bit (5) > }
+// { 0 | 1 < GAMMA_TN2 : bit (5) > }
+// { 0 | 1 < GAMMA_TN3 : bit (5) > }
+// { 0 | 1 < GAMMA_TN4 : bit (5) > }
+// { 0 | 1 < GAMMA_TN5 : bit (5) > }
+// { 0 | 1 < GAMMA_TN6 : bit (5) > }
+// { 0 | 1 < GAMMA_TN7 : bit (5) > } ;
+//
+// *******************************************************************
+
+#define MAX_NUM_GAMMAS 8
+
+typedef struct
+{
+ bool isValid;
+ unsigned char gamma;
+} GammaStruct;
+
+class IePowerControlParameters : public IeBase {
+public:
+
+ IePowerControlParameters() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetPowerControlParameters(unsigned char alp, GammaStruct *gammas);
+
+ void GetPowerControlParameters(unsigned char *alp, GammaStruct *gammas)
+ {
+ *alp = alpha;
+ for (int i = 0; i < MAX_NUM_GAMMAS; i++)
+ {
+ gammas[i] = gammaTn[i];
+ }
+ }
+
+ void ClearPowerControlParameters() { isValid = FALSE; }
+
+private:
+ unsigned char alpha;
+ GammaStruct gammaTn[MAX_NUM_GAMMAS];
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieRFLNumberList.h b/data/mnet/GP10/Host/Rlc_mac/include/ieRFLNumberList.h
new file mode 100644
index 0000000..34593ac
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieRFLNumberList.h
@@ -0,0 +1,64 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieRFLNumberList.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IERFLNUMBERLIST_H__
+#define __IERFLNUMBERLIST_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+#include "RlcMacCommon.h"
+
+// *******************************************************************
+// class IeRFLNumberList
+//
+// Description:
+// RFL Number List IE -- GSM04.60 12.10a
+//
+// < RFL number list struct > ::=
+// < RFL_NUMBER : bit (4) >
+// { 0 | 1 < RFL number list struct > } ;
+//
+// *******************************************************************
+
+
+class IeRFLNumberList : public IeBase {
+public:
+
+ IeRFLNumberList() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetRFLNumberList(unsigned char count, unsigned char *list);
+
+ void GetRFLNumberList(unsigned char *count, unsigned char *list)
+ {
+ *count = numNums;
+ for (int i = 0; i < numNums; i++)
+ {
+ list[i] = numberList[i];
+ }
+ }
+
+ void ClearRFLNumberList() { isValid = FALSE; }
+
+private:
+ unsigned char numNums;
+ unsigned char numberList[RLC_MAC_MAX_RF_FREQS];
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieRLCBlocksGranted.h b/data/mnet/GP10/Host/Rlc_mac/include/ieRLCBlocksGranted.h
new file mode 100644
index 0000000..8902928
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieRLCBlocksGranted.h
@@ -0,0 +1,59 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieRLCBlocksGranted.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IERLCBLOCKSGRANTED_H__
+#define __IERLCBLOCKSGRANTED_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+// *******************************************************************
+// class IeRLCBlocksGranted
+//
+// Description:
+// RLC Blocks Granted IE -- GSM04.60 11.2.29
+//
+// *******************************************************************
+
+class IeRLCBlocksGranted : public IeBase {
+public:
+
+
+ IeRLCBlocksGranted() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetRLCBlocksGranted(unsigned char val)
+ {
+ rlcBlocksGranted = val;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ unsigned char GetRLCBlocksGranted()
+ {
+ return (rlcBlocksGranted);
+ }
+
+ void ClearRLCBlocksGranted() { isValid = FALSE; }
+
+private:
+ unsigned char rlcBlocksGranted;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieRLCMode.h b/data/mnet/GP10/Host/Rlc_mac/include/ieRLCMode.h
new file mode 100644
index 0000000..3ea4cf8
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieRLCMode.h
@@ -0,0 +1,65 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieRLCMode.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IERLCMODE_H__
+#define __IERLCMODE_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+// *******************************************************************
+// class IeRlcMode
+//
+// Description:
+// RLC Mode IE -- GSM04.60 11.2.7
+// *******************************************************************
+
+
+class IeRlcMode : public IeBase {
+public:
+
+ typedef enum
+ {
+ RLC_ACKNOWLEDGED,
+ RLC_UNACKNOWLEDGED
+ } RLC_MODE;
+
+ IeRlcMode() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ RlcMacResult DecodeIe(BitStreamIn &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetRlcMode(RLC_MODE mode)
+ {
+ rlcMode = mode;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ RLC_MODE GetRlcMode()
+ {
+ return (rlcMode);
+ }
+
+ void ClearRlcMode() { isValid = FALSE; }
+
+private:
+ RLC_MODE rlcMode;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieStartFrameNum.h b/data/mnet/GP10/Host/Rlc_mac/include/ieStartFrameNum.h
new file mode 100644
index 0000000..6516a2f
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieStartFrameNum.h
@@ -0,0 +1,109 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieStartFrameNum.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IESTARTFRAMENUM_H__
+#define __IESTARTFRAMENUM_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+
+// *******************************************************************
+// class IeStartFrameNum
+//
+// Description:
+// Start Frame Number IE -- GSM04.60 12.21
+//
+// *******************************************************************
+
+#define MAX_K_NUM 8192
+#define MAX_T1_VAL 32
+#define MAX_T2_VAL 32
+#define MAX_T3_VAL 64
+
+
+class IeStartFrameNum : public IeBase {
+public:
+
+ typedef enum
+ {
+ ABSOLUTE_FRAME_NUM,
+ RELATIVE_FRAME_NUM
+ } START_FRAME_TYPE;
+
+ IeStartFrameNum() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetStartFrameNum(unsigned short kVal)
+ {
+ if (kVal <= MAX_K_NUM)
+ {
+ k = kVal;
+ isValid = TRUE;
+ startFrameType = RELATIVE_FRAME_NUM;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ RlcMacResult SetStartFrameNum(unsigned char t1, unsigned char t2,
+ unsigned char t3)
+ {
+ if ((t1 <= MAX_T1_VAL) && (t2 <= MAX_T2_VAL) && (t2 <= MAX_T2_VAL))
+ {
+ T1 = t1;
+ T2 = t2;
+ T3 = t3;
+ isValid = TRUE;
+ startFrameType = ABSOLUTE_FRAME_NUM;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ unsigned short GetStartFrameNumRelative()
+ {
+ return (k);
+ }
+
+ void GetStartFrameNumAbsolute (unsigned char *t1, unsigned char *t2,
+ unsigned char *t3)
+ {
+ *t1 = T1;
+ *t2 = T2;
+ *t3 = T3;
+ }
+
+ void ClearStartFrameNum() { isValid = FALSE; }
+
+private:
+ START_FRAME_TYPE startFrameType;
+ unsigned short k;
+ unsigned char T1;
+ unsigned char T2;
+ unsigned char T3;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieTFI.h b/data/mnet/GP10/Host/Rlc_mac/include/ieTFI.h
new file mode 100644
index 0000000..6061211
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieTFI.h
@@ -0,0 +1,69 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieTFI.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IETFI_H__
+#define __IETFI_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+#include "RlcMacCommon.h"
+
+
+// *******************************************************************
+// class IeTFI
+//
+// Description:
+// Global TFI IE -- GSM04.60 12.15
+//
+// *******************************************************************
+
+class IeTFI : public IeBase {
+public:
+
+
+ IeTFI() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ RlcMacResult DecodeIe(BitStreamIn &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetTFI(unsigned char tfiIn)
+ {
+ if (tfiIn <= MAX_TFI)
+ {
+ tfi = tfiIn;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ unsigned char GetTFI()
+ {
+ return (tfi);
+ }
+
+ void ClearTFI() { isValid = FALSE; }
+
+private:
+ unsigned char tfi;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieTLLI.h b/data/mnet/GP10/Host/Rlc_mac/include/ieTLLI.h
new file mode 100644
index 0000000..4d3f6b2
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieTLLI.h
@@ -0,0 +1,69 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieTLLI.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IETLLI_H__
+#define __IETLLI_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+
+#define MAX_TLLI 4294967295
+
+
+// *******************************************************************
+// class IeTLLI
+//
+// Description:
+// TLLI IE -- GSM04.60 12.16
+// *******************************************************************
+
+class IeTLLI : public IeBase {
+public:
+
+ IeTLLI() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ RlcMacResult DecodeIe(BitStreamIn &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetTLLI(unsigned int tlliIn)
+ {
+ if (tlliIn <= MAX_TLLI)
+ {
+ tlli = tlliIn;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ unsigned int GetTLLI()
+ {
+ return (tlli);
+ }
+
+ void ClearTLLI() { isValid = FALSE; }
+
+private:
+ unsigned int tlli;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieTMSI.h b/data/mnet/GP10/Host/Rlc_mac/include/ieTMSI.h
new file mode 100644
index 0000000..c76165e
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieTMSI.h
@@ -0,0 +1,68 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieTMSI.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IETMSI_H__
+#define __IETMSI_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+
+#define MAX_TMSI 4294967295
+
+
+// *******************************************************************
+// class IeTMSI
+//
+// Description:
+// TMSI IE -- GSM03.03
+// *******************************************************************
+
+class IeTMSI : public IeBase {
+public:
+
+ IeTMSI() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetTMSI(unsigned int tmsiIn)
+ {
+ if (tmsiIn <= MAX_TMSI)
+ {
+ tmsi = tmsiIn;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ unsigned int GetTMSI()
+ {
+ return (tmsi);
+ }
+
+ void ClearTMSI() { isValid = FALSE; }
+
+private:
+ unsigned int tmsi;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieTQI.h b/data/mnet/GP10/Host/Rlc_mac/include/ieTQI.h
new file mode 100644
index 0000000..d616791
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieTQI.h
@@ -0,0 +1,60 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieTQI.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IETQI_H__
+#define __IETQI_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+
+// *******************************************************************
+// class IeTQI
+//
+// Description:
+// Global TQI IE -- GSM04.60 12.17
+//
+// *******************************************************************
+
+class IeTQI : public IeBase {
+public:
+
+
+ IeTQI() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetTQI(unsigned short tqiIn)
+ {
+ tqi = tqiIn;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ unsigned short GetTQI()
+ {
+ return (tqi);
+ }
+
+ void ClearTQI() { isValid = FALSE; }
+
+private:
+ unsigned short tqi;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieTSC.h b/data/mnet/GP10/Host/Rlc_mac/include/ieTSC.h
new file mode 100644
index 0000000..c1d29ca
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieTSC.h
@@ -0,0 +1,67 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieTSC.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IETSC_H__
+#define __IETSC_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+
+// *******************************************************************
+// class IeTSC
+//
+// Description:
+// TSC IE -- GSM04.60 12.8
+// *******************************************************************
+
+#define MAX_TSC 7
+
+class IeTSC : public IeBase {
+public:
+
+ IeTSC() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetTSC(unsigned char val)
+ {
+ if (val <= MAX_TSC)
+ {
+ tsc = val;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+ }
+
+ unsigned char GetTSC()
+ {
+ return(tsc);
+ }
+
+ void ClearTSC() { isValid = FALSE; }
+
+private:
+ unsigned char tsc;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieTimeslotAllocation.h b/data/mnet/GP10/Host/Rlc_mac/include/ieTimeslotAllocation.h
new file mode 100644
index 0000000..581a9c6
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieTimeslotAllocation.h
@@ -0,0 +1,58 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieTimeslotAllocation.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IETIMESLOTALLOCATION_H__
+#define __IETIMESLOTALLOCATION_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+// *******************************************************************
+// class IeTimeslotAllocation
+//
+// Description:
+// RLC Mode IE -- GSM04.60 12.18
+// *******************************************************************
+
+
+class IeTimeslotAllocation : public IeBase {
+public:
+
+ IeTimeslotAllocation() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SetTimeslotAllocation(unsigned char alloc)
+ {
+ tsAllocation = alloc;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ unsigned char GetTimeslotAllocation()
+ {
+ return (tsAllocation);
+ }
+
+ void ClearTimeslotAllocation() { isValid = FALSE; }
+
+private:
+ unsigned char tsAllocation;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/ieeMLPPPriority.h b/data/mnet/GP10/Host/Rlc_mac/include/ieeMLPPPriority.h
new file mode 100644
index 0000000..d9e97b4
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/ieeMLPPPriority.h
@@ -0,0 +1,71 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieeMLPPPriority.h
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#ifndef __IEEMLPPPRIORITY_H__
+#define __IEEMLPPPRIORITY_H__
+
+#include "IeBase.h"
+#include "bitstream.h"
+
+// *******************************************************************
+// class IeeMLPPPriority
+//
+// Description:
+// eMLPP Priority IE -- GSM04.60 11.2.10
+// GSM04.08 10.5.2.24
+// *******************************************************************
+
+
+class IeeMLPPPriority : public IeBase {
+public:
+
+ typedef enum
+ {
+ NO_PRIORITY_APPLIED,
+ CALL_PRIORITY_LEVEL_4,
+ CALL_PRIORITY_LEVEL_3,
+ CALL_PRIORITY_LEVEL_2,
+ CALL_PRIORITY_LEVEL_1,
+ CALL_PRIORITY_LEVEL_0,
+ CALL_PRIORITY_LEVEL_A,
+ CALL_PRIORITY_LEVEL_B
+ } EMLPP_PRIORITY;
+
+ IeeMLPPPriority() : IeBase() {}
+
+ RlcMacResult EncodeIe(BitStreamOut &dataStream);
+ void DisplayDetails(DbgOutput *outObj);
+
+ RlcMacResult SeteMLPPPriority(EMLPP_PRIORITY priority)
+ {
+ emlppPriority = priority;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+
+ EMLPP_PRIORITY GeteMLPPPriority()
+ {
+ return (emlppPriority);
+ }
+
+ void CleareMLPPPriority() { isValid = FALSE; }
+
+private:
+ EMLPP_PRIORITY emlppPriority;
+};
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/include/msgL1.h b/data/mnet/GP10/Host/Rlc_mac/include/msgL1.h
new file mode 100644
index 0000000..1585cd2
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/include/msgL1.h
@@ -0,0 +1,505 @@
+/*******************************************************************************
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+*******************************************************************************/
+
+
+/*******************************************************************************
+msgL1
+
+Structure and function interface definitions for encoding and decoding of
+messages between RLC/MAC and layer 1.
+*/
+
+#ifndef __MSGL1_H__
+#define __MSGL1_H__
+
+#include "RlcMacCommon.h"
+
+#define MAX_RLC_CONTROL_MSG 23
+#define MAX_RLC_DATA_MSG 53
+#define DSP_MSG_HDR_SIZE 4
+#define DSP_CHAN_IE_SIZE 2
+#define DSP_CODE_RATE_SIZE 1
+#define DSP_TAG_SIZE 1
+#define DSP_BURST_TYPE_SIZE 1
+
+/*----- Structure definitions for layer 1 messages -----*/
+
+/*----- Sub-structures -----*/
+typedef struct
+{
+ char function;
+ short int type;
+ char trx;
+} MsgHeader;
+
+typedef struct
+{
+ char typeTs;
+ char ccch;
+} Channel;
+
+typedef struct
+{
+ char ts;
+ char tai;
+} Tai;
+
+typedef struct
+{
+ char t1;
+ char t2;
+ char t3;
+} FrameNum;
+
+typedef struct
+{
+ char imm;
+ FrameNum frameNum;
+} Time;
+
+
+/*
+Structures for encoding messages from RLC/MAC to Layer 1
+*/
+
+typedef struct
+{
+ MsgHeader header;
+ Channel channel;
+ char tbf;
+ char burstType;
+ char data[MAX_RLC_CONTROL_MSG];
+} MsgPacchReq;
+
+typedef struct
+{
+ MsgHeader header;
+ Channel channel;
+ char tbf;
+ char burstType;
+ char codeRate;
+ char data[MAX_RLC_DATA_MSG];
+} MsgPdtchReq;
+
+typedef struct
+{
+ MsgHeader header;
+ Channel channel;
+ char data[MAX_RLC_CONTROL_MSG];
+} MsgPtcch;
+
+typedef struct
+{
+ MsgHeader header;
+ int tlli;
+ char tbfMode;
+ char groupTfi;
+ int channel;
+ int tsAllocation;
+ int usfTsMap;
+ Tai tai;
+ Time startTime;
+ /* USF granularity */
+} MsgUlTbfActivation;
+
+typedef struct
+{
+ MsgHeader header;
+ int tlli;
+} MsgUlTbfDeactivation, MsgDlTbfDeactivation;;
+
+typedef struct
+{
+ MsgHeader header;
+ int tlli;
+ char groupTfi;
+ int channel;
+ int tsAllocation;
+ int msPower;
+ int ta;
+ Time startTime;
+} MsgDlTbfActivation;
+
+typedef struct
+{
+ MsgHeader header;
+ int tlli;
+ char groupTfi;
+ int channel;
+ char tbfMode;
+ int tsAllocation;
+ int usfTsMap;
+ Tai tai;
+ Time startTime;
+} MsgUlTbfReconfig;
+
+typedef struct
+{
+ MsgHeader header;
+ int tlli;
+ char groupTfi;
+ int channel;
+ int tsAllocation;
+ int msPower;
+ Time startTime;
+} MsgDlTbfReconfig;
+
+typedef struct
+{
+ MsgHeader header;
+ Channel channel;
+ unsigned int frameNum;
+} MsgSingleBlockAssignAlertAck;
+
+typedef struct
+{
+ MsgHeader header;
+ Channel channel;
+ unsigned int frameNum;
+ char tag;
+} MsgDLAssignAlertAck;
+
+typedef struct
+{
+ MsgHeader header;
+ int tlli;
+ char groupTfi;
+ char cValue;
+ char rxqual;
+ char iLevelMask;
+ char iLevelByTs[MAX_TIMESLOTS];
+} MsgDLAckNackInfo;
+
+
+/*
+Structures for decoding messages from Layer 1 to RLC/MAC
+*/
+
+typedef struct
+{
+ MsgHeader header;
+ Channel channel;
+ char tbf;
+ char data[MAX_RLC_CONTROL_MSG];
+} MsgPacchInd;
+
+typedef struct
+{
+ MsgHeader header;
+ Channel channel;
+ char codeRate;
+ char data[MAX_RLC_DATA_MSG];
+} MsgPdtchInd;
+
+typedef struct
+{
+ MsgHeader header;
+ Channel channel;
+ FrameNum frameNum;
+ short int packetAccessRef;
+ char ta;
+ char power;
+} MsgPrach;
+
+typedef struct
+{
+ MsgHeader header;
+ Channel channel;
+ char groupTfi;
+ /* Global Power Control IE */
+ /* Power Control IE */
+ /* Global Packet Timing Adv. */
+} MsgUlPowerTiming;
+
+typedef struct
+{
+ MsgHeader header;
+ int tlli;
+} MsgUlTbfActivationAck, MsgUlTbfDeactivationAck,
+ MsgDlTbfActivationAck, MsgDlTbfDeactivationAck,
+ MsgUlTbfReconfigAck, MsgDlTbfReconfigAck,
+ MsgCommon;
+
+typedef struct
+{
+ MsgHeader header;
+ Channel channel;
+ char link; /* link identifier */
+ char numBuffs; /* number of buffers ready */
+} MsgReadyToSend;
+
+typedef struct
+{
+ MsgHeader header;
+ Channel channel;
+ char tbf;
+} MsgPacchNack;
+
+typedef struct
+{
+ MsgHeader header;
+ char ts;
+ unsigned int frameNum;
+ short ARFCN;
+} MsgSingleBlockAssignAlert;
+
+typedef struct
+{
+ MsgHeader header;
+ char ts;
+ unsigned int frameNum;
+ short ARFCN;
+ char tag;
+} MsgDLAssignAlert;
+
+typedef struct
+{
+ MsgHeader header;
+ Channel channel;
+ char tag;
+ char data[2];
+ char ta;
+} MsgPacchAbInd;
+
+typedef struct
+{
+ MsgHeader header;
+ char tbfType;
+ char groupTfi;
+ char codeRate;
+} MsgCodeRateReq;
+
+/*----- Functions to encode messages to Layer 1 -----*/
+
+/*******************************************************************************
+*/
+int msgEncodePtcch
+(
+ MsgPtcch* msgIn,
+ char* msg
+);
+
+/*******************************************************************************
+*/
+int msgEncodePacch
+(
+ MsgPacchReq* msgIn,
+ char* msg
+);
+
+/*******************************************************************************
+*/
+int msgEncodePdtch
+(
+ MsgPdtchReq* msgIn,
+ char* msg,
+ int dataBlkSize
+);
+
+/*******************************************************************************
+*/
+int msgEncodeUlTbfActivation
+(
+ MsgUlTbfActivation* msgIn,
+ char* msg
+);
+
+/*******************************************************************************
+*/
+int msgEncodeUlTbfDeactivation
+(
+ MsgUlTbfDeactivation* msgIn,
+ char* msg
+);
+
+/*******************************************************************************
+*/
+int msgEncodeDlTbfActivation
+(
+ MsgDlTbfActivation* msgIn,
+ char* msg
+);
+
+/*******************************************************************************
+*/
+int msgEncodeDlTbfDeactivation
+(
+ MsgDlTbfDeactivation* msgIn,
+ char* msg
+);
+
+/*******************************************************************************
+*/
+int msgEncodeUlTbfReconfig
+(
+ MsgUlTbfReconfig* msgIn,
+ char* msg
+);
+
+/*******************************************************************************
+*/
+int msgEncodeDlTbfReconfig
+(
+ MsgDlTbfReconfig* msgIn,
+ char* msg
+);
+
+/*******************************************************************************
+*/
+int msgEncodeSingleBlockAssignAlertAck
+(
+ MsgSingleBlockAssignAlertAck* msgIn,
+ char* msg
+);
+
+/*******************************************************************************
+*/
+int msgEncodeDLAssignAlertAck
+(
+ MsgDLAssignAlertAck* msgIn,
+ char* msg
+);
+
+/*******************************************************************************
+*/
+int msgEncodeDLAckNackInfo
+(
+ MsgDLAckNackInfo* msgIn,
+ char* msg
+);
+
+
+/*----- Functions to decode messages from Layer 1 -----*/
+
+/*******************************************************************************
+*/
+void msgDecodePrach
+(
+ char* msgIn,
+ MsgPrach* msgOut
+);
+
+/*******************************************************************************
+*/
+void msgDecodePacch
+(
+ char* msgIn,
+ MsgPacchInd* msgOut
+);
+
+/*******************************************************************************
+*/
+void msgDecodePdtch
+(
+ char* msgIn,
+ MsgPdtchInd* msgOut,
+ int msgSize /* size of the messege received from layer 1 */
+);
+
+/*******************************************************************************
+*/
+void msgDecodeUlPowerTiming
+(
+ char* msgIn,
+ MsgUlPowerTiming* msgOut
+);
+
+/*******************************************************************************
+*/
+void msgDecodeUlTbfActivationAck
+(
+ char* msgIn,
+ MsgUlTbfActivationAck* msgOut
+);
+
+/*******************************************************************************
+*/
+void msgDecodeUlTbfDeactivationAck
+(
+ char* msgIn,
+ MsgUlTbfDeactivationAck* msgOut
+);
+
+/*******************************************************************************
+*/
+void msgDecodeDlTbfActivationAck
+(
+ char* msgIn,
+ MsgDlTbfActivationAck* msgOut
+);
+
+/*******************************************************************************
+*/
+void msgDecodeDlTbfDeactivationAck
+(
+ char* msgIn,
+ MsgDlTbfDeactivationAck* msgOut
+);
+
+/*******************************************************************************
+*/
+void msgDecodeUlTbfReconfigAck
+(
+ char* msgIn,
+ MsgUlTbfReconfigAck* msgOut
+);
+
+/*******************************************************************************
+*/
+void msgDecodeDlTbfReconfigAck
+(
+ char* msgIn,
+ MsgDlTbfReconfigAck* msgOut
+);
+
+/*******************************************************************************
+*/
+void msgDecodeReadyToSend
+(
+ char* msgIn,
+ MsgReadyToSend* msgOut
+);
+
+/*******************************************************************************
+*/
+void msgDecodePacchNack
+(
+ char* msgIn,
+ MsgPacchNack* msgOut
+);
+
+/*******************************************************************************
+*/
+void msgDecodeSingleBlockAssignAlert
+(
+ char* msgIn,
+ MsgSingleBlockAssignAlert* msgOut
+);
+
+/*******************************************************************************
+*/
+void msgDecodeDLAssignAlert
+(
+ char* msgIn,
+ MsgDLAssignAlert* msgOut
+);
+
+/*******************************************************************************
+*/
+void msgDecodePacchAbInd
+(
+ char* msgIn,
+ MsgPacchAbInd* msgOut
+);
+
+/*******************************************************************************
+*/
+void msgDecodeCodeRateReq
+(
+ char* msgIn,
+ MsgCodeRateReq* msgOut
+);
+
+#endif
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/DLDataBlockPool.cpp b/data/mnet/GP10/Host/Rlc_mac/src/DLDataBlockPool.cpp
new file mode 100644
index 0000000..77bf8cc
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/DLDataBlockPool.cpp
@@ -0,0 +1,117 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : DLDataBlockPool.cpp
+// Author(s) : Tim Olson
+// Create Date : 1/5/2001
+// Description :
+//
+// *******************************************************************
+
+
+#include "DLDataBlockPool.h"
+
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+DbgOutput DLDataBlock::MsgDisplayObj("RLC/MAC Msg", RLC_MAC_MSG);
+
+
+void DLDataBlock::DisplayDataBlock()
+{
+ MsgDisplayObj.Trace("DOWNLINK RLC DATA BLOCK\n");
+ MsgDisplayObj.HexDump(streamOut, streamOutLen);
+}
+
+DLDataBlockPool::DLDataBlockPool()
+{
+ // Initialize head and tail pointer.
+ head = tail = 0;
+
+ // Allocate enough uplink blocks to handle max downlink TBF's.
+ for (int i=0; i < MAX_TFI * MAX_TRX * MAX_RL_BLOCKS_PER_PDU; i++)
+ {
+ DLDataBlock *pDlDataBlock = new DLDataBlock();
+ // Remove data blocks from the head.
+ if ((head != tail) || ((head == tail) && (head!=0)))
+ {
+ tail->next = pDlDataBlock;
+ pDlDataBlock->next = 0;
+ tail = pDlDataBlock;
+ }
+ else
+ {
+ // Handle special case where list is empty.
+ head = tail = pDlDataBlock;
+ pDlDataBlock->next = 0;
+ }
+ }
+}
+
+
+DLDataBlockPool::~DLDataBlockPool()
+{
+ while (head->next)
+ {
+ DLDataBlock *pDlDataBlock = head;
+ head = pDlDataBlock->next;
+ delete (pDlDataBlock);
+ }
+}
+
+
+DLDataBlock *DLDataBlockPool::GetDLDataBlock()
+{
+ DBG_FUNC("DLDataBlockPool::GetDLDataBlock", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ DLDataBlock *pDlDataBlock;
+
+ // Remove data blocks from the head.
+ if (head != tail)
+ {
+ pDlDataBlock = head;
+ head = pDlDataBlock->next;
+ }
+ else
+ {
+ pDlDataBlock = head;
+ head = tail = 0;
+ }
+
+ DBG_LEAVE();
+ return (pDlDataBlock);
+}
+
+
+void DLDataBlockPool::ReturnDLDataBlock(DLDataBlock *pDlDataBlock)
+{
+ DBG_FUNC("DLDataBlockPool::ReturnDLDataBlock", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ // Remove data blocks from the head.
+ if ((head != tail) || ((head == tail) && (head!=0)))
+ {
+ tail->next = pDlDataBlock;
+ pDlDataBlock->next = 0;
+ tail = pDlDataBlock;
+ }
+ else
+ {
+ // Handle special case where list is empty.
+ head = tail = pDlDataBlock;
+ pDlDataBlock->next = 0;
+ }
+
+ // Reset the length octet pointer.
+ pDlDataBlock->dlHeader.ResetCurrLengthOctet();
+
+ DBG_LEAVE();
+ return;
+}
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/DLRlcLink.cpp b/data/mnet/GP10/Host/Rlc_mac/src/DLRlcLink.cpp
new file mode 100644
index 0000000..2f2473c
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/DLRlcLink.cpp
@@ -0,0 +1,1712 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : DLRlcLink.cpp
+// Author(s) : Tim Olson
+// Create Date : 1/5/2001
+// Description :
+//
+// *******************************************************************
+
+
+#include <ctype.h>
+#include "DLRlcLink.h"
+#include "RlcMacTask.h"
+
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+#include "bssgp\bssgp_unitdata.h"
+#include "MsgPacketPowerCtlTimingAdvance.h"
+#include "MsgPacketPollingRequest.h"
+#include "MsgPacketResourceRequest.h"
+
+void HexDumper(UINT8 *buffer, int length );
+
+// Static uplink data block pool.
+DLDataBlockPool DLRlcLink::sysDlDataBlockPool;
+
+int DLRlcLink::dlAssignCntMax = 3;
+
+int RlcMacNumBlocksBetweenPolls = 8;
+
+DLRlcLink::DLRlcLink() : k(RCV_WINDOW_SIZE_K)
+{
+ rlcMode = ACKNOWLEDGED_RLC_MODE;
+
+ // V(S), V(A) and V(CS) are initially set to 0.
+ vS = 0;
+ vA = 0;
+ vCS = 0;
+
+ // Set V(B) to INVALID.
+ for (int i = 0; i < RLC_MOD_VAL; i++)
+ {
+ vB[i] = INVALID;
+ pDlBlocks[i] = 0;
+ }
+
+ pAssociatedTbf = 0;
+ lastPendingAckXmit = 0;
+ lastDataBlock = LAST_BLOCK_UNKNOWN;
+ dlAssignCnt = 0;
+
+ pT3195 = new JCCTimer((FUNCPTR)DLRlcLink::T3195TimerExpiry, 0);
+ pT3191 = new JCCTimer((FUNCPTR)DLRlcLink::T3191TimerExpiry, 0);
+ pT3193 = new JCCTimer((FUNCPTR)DLRlcLink::T3193TimerExpiry, 0);
+ pActivityTimer = new JCCTimer((FUNCPTR)DLRlcLink::ActivityTimerExpiry, 0);
+ isT3193Running = FALSE;
+
+ // For now we will start with channel coding set to CS-0
+ chanCoding.SetChannelCodingCommand(IeChannelCodingCommand::CS_1);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::EstablishRLCLink
+**
+** PURPOSE: Initialize all the RLC state information for a new downlink TBF.
+**
+** INPUT PARAMETERS: pDlTbf - pointer to tbf object
+** mode - RLC Mode (acked or not acked)
+**
+** RETURN VALUE(S): JC_SUCCESS
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS DLRlcLink::EstablishRLCLink(DLTbf *pDlTbf, RLC_MODE mode)
+{
+ DBG_FUNC("DLRlcLink::EstablishRLCLink", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ // Hang on to the tbf object.
+ pAssociatedTbf = pDlTbf;
+
+ // Clear downlink PDU pointer.
+ llcPdu = 0;
+
+ rlcMode = mode;
+
+ // V(S), V(A) and V(CS) are initially set to 0.
+ vS = 0;
+ vA = 0;
+ vCS = 0;
+
+ // Set V(B) to INVALID.
+ for (int i = 0; i < RLC_MOD_VAL; i++)
+ {
+ vB[i] = INVALID;
+ pDlBlocks[i] = 0;
+ }
+
+ lastPendingAckXmit = 0;
+ lastDataBlock = LAST_BLOCK_UNKNOWN;
+ lastBlockSentOnPollTs = FALSE;
+ dlAssignCnt = 0;
+ pollOnActivation = FALSE;
+
+ // For now we will start with channel coding set to CS-1
+ chanCoding.SetChannelCodingCommand(IeChannelCodingCommand::CS_1);
+
+ pDlTbf->ClearControlAckTag();
+
+ // Clear counters.
+ n3105 = 0;
+ numBlocksSincePoll = RlcMacNumBlocksBetweenPolls;
+
+ // Cancel all timers
+ pT3195->cancelTimer();
+ pT3191->cancelTimer();
+ pT3193->cancelTimer();
+ isT3193Running = FALSE;
+
+ // Start Activity Timer
+ pActivityTimer->setTimerMSec(MAX_ALLOWED_INACTIVE_TIME, (int)pAssociatedTbf);
+
+ DBG_TRACE("RLC/MAC: Downlink RLC link established tbf(%#x)\n", pDlTbf);
+ if (rlcMode == ACKNOWLEDGED_RLC_MODE)
+ DBG_TRACE("\tRLC Mode (ACKNOWLEDGED) V(S) = %d V(A) = %d V(CS) = %d\n",
+ vS, vA, vCS);
+ else
+ DBG_TRACE("\tRLC Mode (UNACKNOWLEDGED) V(S) = %d V(A) = %d V(CS) = %d\n",
+ vS, vA, vCS);
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::ReestablishRLCLink
+**
+** PURPOSE: Initialize all the RLC state information for an existing DL TBf
+** whose T3192 timer is still running.
+**
+** INPUT PARAMETERS: pDlTbf - pointer to tbf object
+** mode - RLC Mode (acked or not acked)
+**
+** RETURN VALUE(S): JC_SUCCESS
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS DLRlcLink::ReestablishRLCLink(DLTbf *pDlTbf, RLC_MODE mode)
+{
+ DBG_FUNC("DLRlcLink::ReestablishRLCLink", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ // Hang on to the tbf object.
+ pAssociatedTbf = pDlTbf;
+
+ // Clear downlink PDU pointer.
+ llcPdu = 0;
+
+ rlcMode = mode;
+
+ // V(S), V(A) and V(CS) are initially set to 0.
+ vS = 0;
+ vA = 0;
+ vCS = 0;
+
+ // Set V(B) to INVALID.
+ for (int i = 0; i < RLC_MOD_VAL; i++)
+ {
+ vB[i] = INVALID;
+ pDlBlocks[i] = 0;
+ }
+
+ lastPendingAckXmit = 0;
+ lastDataBlock = LAST_BLOCK_UNKNOWN;
+ lastBlockSentOnPollTs = FALSE;
+ dlAssignCnt = 0;
+ pollOnActivation = FALSE;
+
+ // For now we will start with channel coding set to CS-1
+ chanCoding.SetChannelCodingCommand(IeChannelCodingCommand::CS_1);
+
+ pDlTbf->ClearControlAckTag();
+
+ // Clear counters.
+ n3105 = 0;
+ numBlocksSincePoll = RlcMacNumBlocksBetweenPolls;
+
+ // Cancel all timers
+ pT3195->cancelTimer();
+ pT3191->cancelTimer();
+
+ // Start Activity Timer
+ pActivityTimer->setTimerMSec(MAX_ALLOWED_INACTIVE_TIME, (int)pAssociatedTbf);
+
+ DBG_TRACE("RLC/MAC: Downlink RLC link reestablished tbf(%#x)\n", pDlTbf);
+ if (rlcMode == ACKNOWLEDGED_RLC_MODE)
+ DBG_TRACE("\tRLC Mode (ACKNOWLEDGED) V(S) = %d V(A) = %d V(CS) = %d\n",
+ vS, vA, vCS);
+ else
+ DBG_TRACE("\tRLC Mode (UNACKNOWLEDGED) V(S) = %d V(A) = %d V(CS) = %d\n",
+ vS, vA, vCS);
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::UpdateTSSpecificData
+**
+** PURPOSE: This function will be called after timeslots are allocated. Any
+** data that requires timeslot information should be set here.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void DLRlcLink::UpdateTSSpecificData()
+{
+ DBG_FUNC("DLRlcLink::UpdateTSSpecificData", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ int numTs = 0;
+
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (pAssociatedTbf->allocatedTs[i]) numTs++;
+ }
+
+ N3105_MAX = numTs * 5;
+
+ DBG_LEAVE();
+ return;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::AbnormalRelease
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): JC_SUCCESS
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS DLRlcLink::AbnormalRelease()
+{
+ DBG_FUNC("DLRlcLink::AbnormalRelease", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ // Inactivate the tbf so that no more scheduling occurs.
+ pAssociatedTbf->SetTbfState(Tbf::INACTIVE);
+
+ // Send a PACKET TBF RELEASE message.
+ status = RlcMacTask::theRlcMacTask->SendPacketTBFRelease(pAssociatedTbf,
+ 0, MsgPacketTBFRelease::ABNORMAL_RELEASE);
+
+ // Use T3195 to allow enough time to send the deactivate message.
+ pT3195->cancelTimer();
+ pT3195->setTimerMSec(T3195_VALUE, (int)pAssociatedTbf);
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::GetDLRlcBlock
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: ctlAckTag - optional tag used for acknowledged control msgs
+** burstType - if this message is acknowledged then burstType
+** indicates whether the response is normal or access bursts
+** reqTrx - trx requested for sending this block
+** reqTs - ts requested for sending this block
+**
+** RETURN VALUE(S): pointer to data block if available
+** 0 - block not available
+**
+**----------------------------------------------------------------------------*/
+DLDataBlock *DLRlcLink::GetDLRlcBlock(unsigned char &ctrlAckTag, char &burstType,
+ int reqTrx, int reqTs)
+{
+ DBG_FUNC("DLRlcLink::GetDLRlcBlock", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ DLDataBlock *pDlDataBlock = 0;
+
+ // If we are in acknowledged mode then check to see if any NACKED blocks
+ // need to be retransmitted.
+ if (rlcMode == ACKNOWLEDGED_RLC_MODE)
+ {
+ if ((pDlDataBlock = RetransmitNackedDLRlcBlock()))
+ {
+ if (SetPollingBit(pDlDataBlock, ctrlAckTag, burstType, reqTrx, reqTs))
+ pDlDataBlock = 0;
+ goto BlockFound;
+ }
+ }
+
+ // Next see if we can can send a new RLC block.
+ if ((pDlDataBlock = BuildDLRlcBlock()))
+ {
+ if (SetPollingBit(pDlDataBlock, ctrlAckTag, burstType, reqTrx, reqTs))
+ pDlDataBlock = 0;
+ goto BlockFound;
+ }
+
+ // Finally see if we can transmit any PENDING ACK blocks.
+ if (rlcMode == ACKNOWLEDGED_RLC_MODE)
+ {
+ if ((pDlDataBlock = RetransmitPendingAckDLRlcBlock()))
+ {
+ if (SetPollingBit(pDlDataBlock, ctrlAckTag, burstType, reqTrx, reqTs))
+ pDlDataBlock = 0;
+ goto BlockFound;
+ }
+ }
+
+BlockFound:
+ if (pDlDataBlock)
+ {
+ DBG_TRACE("RLC/MAC: Sending downlink RLC block - tbf(%#x)\n", pAssociatedTbf);
+ DBG_TRACE("\tBSN = %d V(S) = %d V(A) = %d V(CS) = %d\n",
+ pDlDataBlock->dlHeader.GetBSN(), vS, vA, vCS);
+ }
+ else
+ {
+ DBG_TRACE("RLC/MAC: No downlink RLC blocks available - tbf(%#x) trx(%d) ts(%d)\n",
+ pAssociatedTbf, reqTrx, reqTs);
+ }
+
+ // Start Activity Timer
+ pActivityTimer->setTimerMSec(MAX_ALLOWED_INACTIVE_TIME, (int)pAssociatedTbf);
+
+ DBG_LEAVE();
+ return (pDlDataBlock);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::SetPollingBit
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: pDlDataBlock - current data block
+** ctlAckTag - optional tag used for acknowledged control msgs
+** burstType - if this message is acknowledged then burstType
+** indicates whether the response is normal or access bursts
+** reqTrx - trx requested for sending this block
+** reqTs - ts requested for sending this block
+**
+** RETURN VALUE(S): TRUE - the downlink radio link is lost or no block available
+** FALSE - downlink radio link is ok
+**
+**----------------------------------------------------------------------------*/
+bool DLRlcLink::SetPollingBit(DLDataBlock *pDlDataBlock,
+ unsigned char &ctrlAckTag, char &burstType, int reqTrx, int reqTs)
+{
+ DBG_FUNC("DLRlcLink::SetPollingBit", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ bool downlinkFail = FALSE;
+ ctrlAckTag = CTL_ACK_TAG_NOT_APPLICABLE;
+ burstType = RLC_MAC_NORMAL_BURST;
+
+ // If this is the last block then the RRBP is alreay set to valid. A
+ // control ack tag needs to be saved though. Inactivate the the TBF
+ // so no more blocks are transmitted.
+ if ((lastDataBlock != LAST_BLOCK_UNKNOWN) && (pDlDataBlock == pDlBlocks[lastDataBlock]))
+ {
+ // If the final block was not sent on a valid polling timeslot, then
+ // don't send anything.
+ if (RlcMacTask::theRlcMacTask->PollingTsCheck(reqTrx, reqTs, pAssociatedTbf))
+ {
+ // If we have reached the max 3105 count then internally release the
+ // TBF. When T3195 expires release the resources.
+ if (n3105++ >= N3105_MAX)
+ {
+ pT3195->setTimerMSec(T3195_VALUE, (int)pAssociatedTbf);
+ pAssociatedTbf->InternalReleaseDLTbf();
+ downlinkFail = TRUE;
+ DBG_TRACE("RLC/MAC: N3105 = N3105Max - TBF(%#x)\n", pAssociatedTbf);
+ }
+ else
+ {
+ // Reset polling counter.
+ numBlocksSincePoll = RlcMacNumBlocksBetweenPolls;
+
+ pAssociatedTbf->SetControlAckTag();
+ ctrlAckTag = pAssociatedTbf->GetControlAckTag();
+
+ if (rlcMode == UNACKNOWLEDGED_RLC_MODE)
+ {
+ burstType = RLC_MAC_ACCESS_BURST;
+ }
+
+ // Inactivate the link so that no more data blocks are transmitted.
+ pAssociatedTbf->SetTbfState(Tbf::INACTIVE);
+ lastBlockSentOnPollTs = TRUE;
+ }
+ }
+ // Set downlinkFail to TRUE so no data block is returned.
+ else
+ {
+ downlinkFail = TRUE;
+ }
+ }
+ else
+ {
+ // Default to not valid.
+ pDlDataBlock->dlHeader.SetSPBit(DLMacHeader::RRBP_NOT_VALID);
+
+ // If the count was zero or is now zero see if we can set RRB.
+ if ((numBlocksSincePoll ? --numBlocksSincePoll : numBlocksSincePoll) <= 0)
+ {
+ // If the requested timeslot matches the allowed timeslot then set RRB.
+ if (RlcMacTask::theRlcMacTask->PollingTsCheck(reqTrx, reqTs, pAssociatedTbf))
+ {
+ pDlDataBlock->dlHeader.SetSPBit(DLMacHeader::RRBP_VALID);
+ numBlocksSincePoll = RlcMacNumBlocksBetweenPolls;
+ if (n3105++ >= N3105_MAX)
+ {
+ pT3195->setTimerMSec(T3195_VALUE, (int)pAssociatedTbf);
+ pAssociatedTbf->InternalReleaseDLTbf();
+ downlinkFail = TRUE;
+ DBG_TRACE("RLC/MAC: N3105 = N3105Max - TBF(%#x)\n", pAssociatedTbf);
+ }
+ else
+ {
+ pDlDataBlock->dlHeader.SetSPBit(DLMacHeader::RRBP_VALID);
+ numBlocksSincePoll = RlcMacNumBlocksBetweenPolls;
+ }
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return(downlinkFail);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::BuildDLRlcBlock
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): pointer to data block if available
+** 0 - block not available
+**
+**----------------------------------------------------------------------------*/
+DLDataBlock *DLRlcLink::BuildDLRlcBlock()
+{
+ DBG_FUNC("DLRlcLink::BuildDLRlcBlock", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ DLDataBlock *pDlDataBlock = 0;
+
+ // First determine if another data block is needed. Check to see if we
+ // already sent a block with the FBI set.
+ if (lastDataBlock == LAST_BLOCK_UNKNOWN)
+ {
+ // If more data left in the current PDU or there is another PDU
+ // available and we are not stalled then build a new
+ // RLC data block.
+ if (((vS != ((vA + k) % RLC_MOD_VAL))) || (rlcMode == UNACKNOWLEDGED_RLC_MODE))
+ {
+ // Free data block in unacknowledged mode if needed.
+ if (rlcMode == UNACKNOWLEDGED_RLC_MODE)
+ {
+ if (pDlBlocks[vS])
+ {
+ sysDlDataBlockPool.ReturnDLDataBlock(pDlBlocks[vS]);
+ }
+ }
+ // Grab a new data block.
+ pDlDataBlock = sysDlDataBlockPool.GetDLDataBlock();
+ pDlBlocks[vS] = pDlDataBlock;
+
+ // Set the coding rate for this data block.
+ pDlDataBlock->chanCoding = chanCoding;
+
+ // Assemble RLC/MAC header.
+ pDlDataBlock->dlHeader.SetPayloadType(DLMacHeader::RLC_DATA_BLOCK);
+ pDlDataBlock->dlHeader.SetRRBP(DLMacHeader::FN_N_13);
+ pDlDataBlock->dlHeader.SetSPBit(DLMacHeader::RRBP_NOT_VALID);
+ // USF will be filled in later.
+ pDlDataBlock->dlHeader.SetPowerReduction(DLMacHeader::MODEA_NOT_USABLE_OR_MODEB_24_30_DB);
+ pDlDataBlock->dlHeader.SetTFI(pAssociatedTbf->tfi.GetTFI());
+ // Final Block Indicator set a little later.
+ pDlDataBlock->dlHeader.SetBSN(vS);
+ // Start off assuming there are no extension octets.
+ pDlDataBlock->dlHeader.SetExtensionBit(DLMacHeader::NO_EXTENSION_OCTET);
+ // Start off assuming not the last block.
+ pDlDataBlock->dlHeader.SetFinalBlockIndicator(DLMacHeader::NOT_LAST_RLC_BLOCK);
+ // Initialize the length values for the empty data block.
+ pDlDataBlock->streamOutLen = 0;
+ // Start with the minimum header size.
+ pDlDataBlock->dlHeaderLen = DLMacHeader::GetDataHdrSize();
+
+ int bytesCopied;
+ while (!SegmentLLCPdu(pDlDataBlock, bytesCopied))
+ {
+ // This happens if a PDU plus length indicator fit exactly in one RLC block
+ // and more PDUs are to come.
+ if (bytesCopied == 0)
+ {
+ // If length octet has been added then set it so that no extension octets
+ // will follow.
+ if (pDlDataBlock->dlHeader.GetCurrLengthOctetIndex())
+ {
+ // Must back up by one to get to the last length indicator.
+ pDlDataBlock->dlHeader.DecrementCurrLengthOctetIndex();
+ pDlDataBlock->dlHeader.SetCurrLengthOctetExtension(DLMacHeader::NO_EXTENSION_OCTET);
+ }
+ break;
+ }
+
+ // If another PDU is queued up then grab it.
+ if (GetNextLLCPdu())
+ {
+ // Add a length indicator for the last group of bytes copied. For now
+ // default it so that a length indicator will follow.
+ pDlDataBlock->dlHeader.SetLengthOctet(bytesCopied, DLMacHeader::MORE_LLC_DATA,
+ DLMacHeader::EXTENSION_OCTET_FOLLOWS);
+ pDlDataBlock->dlHeader.IncrementCurrLengthOctetIndex();
+ pDlDataBlock->dlHeaderLen++;
+
+ // Try and reallocate more resources.
+ ReallocateDLResources();
+ }
+ // No more PDU's.
+ else
+ {
+ // Add a length indicator for the last group of bytes copied.
+ pDlDataBlock->dlHeader.SetLengthOctet(bytesCopied, DLMacHeader::NO_MORE_LLC_DATA,
+ DLMacHeader::NO_EXTENSION_OCTET);
+ pDlDataBlock->dlHeaderLen++;
+ pDlDataBlock->dlHeader.SetFinalBlockIndicator(DLMacHeader::LAST_RLC_BLOCK);
+ pDlDataBlock->dlHeader.SetSPBit(DLMacHeader::RRBP_VALID);
+ lastDataBlock = vS;
+ pT3191->setTimerMSec(T3191_VALUE, (int)pAssociatedTbf);
+ break;
+ }
+ }
+
+ // Update the value of V(S) and V(B).
+ vB[vS] = PENDING_ACK;
+ vS = ++vS % RLC_MOD_VAL;
+ }
+ }
+
+ DBG_LEAVE();
+ return (pDlDataBlock);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::SegmentLLCPdu
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: pDlDataBlock - pointer to current data block
+**
+** RETURN VALUE(S): TRUE - if PDU is filled
+** FALSE - if PDU is not completely filled
+**
+**----------------------------------------------------------------------------*/
+bool DLRlcLink::SegmentLLCPdu(DLDataBlock *pDlDataBlock, int &bytesCopied)
+{
+ DBG_FUNC("DLRlcLink::SegmentLLCPdu", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ bool rlcBlockFull = FALSE;
+ BSSGP_DL_UNITDATA_MSG *pDlUnitData;
+
+ // First copy as much of the PDU as possible..
+ bytesCopied = min(pDlDataBlock->chanCoding.GetRLCDataBlockSize() -
+ pDlDataBlock->dlHeaderLen - pDlDataBlock->streamOutLen, llcPduLen - currPduByte);
+ bcopy(llcPdu + currPduByte, (char *)pDlDataBlock->streamOut + pDlDataBlock->streamOutLen,
+ bytesCopied);
+ pDlDataBlock->streamOutLen += bytesCopied;
+ currPduByte += bytesCopied;
+
+ // We were able to fill an entire RLC block
+ if ((pDlDataBlock->streamOutLen + pDlDataBlock->dlHeaderLen ==
+ pDlDataBlock->chanCoding.GetRLCDataBlockSize()) && bytesCopied)
+ {
+ // A special case may exist if an LLC PDU ends on an RLC block
+ // boundary.
+ if (llcPduLen == currPduByte)
+ {
+ // If another LLC PDU is waiting then we have to add a length indicator.
+ if (MoreLLCPdusAvailable(&pDlUnitData))
+ {
+ // Remove a byte from the RLC block. It will be sent in the next
+ // RLC block. Add a length octet of zero.
+ currPduByte--;
+ pDlDataBlock->streamOutLen--;
+ pDlDataBlock->dlHeader.SetFinalBlockIndicator(DLMacHeader::NOT_LAST_RLC_BLOCK);
+ pDlDataBlock->dlHeader.SetExtensionBit(DLMacHeader::EXTENSION_OCTET_FOLLOWS);
+ pDlDataBlock->dlHeader.SetLengthOctet(0,
+ DLMacHeader::MORE_LLC_DATA, DLMacHeader::NO_EXTENSION_OCTET);
+ pDlDataBlock->dlHeaderLen++;
+ }
+ // If no more PDUs are waiting then we can end the TBF.
+ else
+ {
+ pDlDataBlock->dlHeader.SetFinalBlockIndicator(DLMacHeader::LAST_RLC_BLOCK);
+ pDlDataBlock->dlHeader.SetSPBit(DLMacHeader::RRBP_VALID);
+ // If length octet has been added then set it so that no extension octets
+ // will follow.
+ if (pDlDataBlock->dlHeader.GetCurrLengthOctetIndex())
+ {
+ // Must back up by one to get to the last length indicator.
+ pDlDataBlock->dlHeader.DecrementCurrLengthOctetIndex();
+ pDlDataBlock->dlHeader.SetCurrLengthOctetExtension(DLMacHeader::NO_EXTENSION_OCTET);
+ }
+ lastDataBlock = vS;
+ pT3191->setTimerMSec(T3191_VALUE, (int)pAssociatedTbf);
+ }
+ }
+ else
+ {
+ // If length octet has been added then set it so that no extension octets
+ // will follow.
+ if (pDlDataBlock->dlHeader.GetCurrLengthOctetIndex())
+ {
+ // Must back up by one to get to the last length indicator.
+ pDlDataBlock->dlHeader.DecrementCurrLengthOctetIndex();
+ pDlDataBlock->dlHeader.SetCurrLengthOctetExtension(DLMacHeader::NO_EXTENSION_OCTET);
+ }
+ }
+
+ rlcBlockFull = TRUE;
+ }
+ // The block was not filled completely so for sure we will have at least one
+ // length indicator.
+ else
+ {
+ // Make sure the extension bit was set.
+ pDlDataBlock->dlHeader.SetExtensionBit(DLMacHeader::EXTENSION_OCTET_FOLLOWS);
+ }
+
+ DBG_LEAVE();
+ return (rlcBlockFull);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::RetransmitNackedDLRlcBlock
+**
+** PURPOSE: Search V(B) and retransmit the oldest block that in the
+** NACKED state.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): pointer to data block if available
+** 0 - block not available
+**
+**----------------------------------------------------------------------------*/
+DLDataBlock *DLRlcLink::RetransmitNackedDLRlcBlock()
+{
+ DBG_FUNC("DLRlcLink::RetransmitNackedDLRlcBlock", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ // Search V(B) from V(A) to V(S). If any blocks are in the NACKED state
+ // then resend it.
+ int currDataBlock = vA;
+ DLDataBlock *pDlDataBlock = 0;
+
+ while (currDataBlock != vS)
+ {
+ if (vB[currDataBlock] == NACKED)
+ {
+ pDlDataBlock = pDlBlocks[currDataBlock];
+ vB[currDataBlock] = PENDING_ACK;
+ lastPendingAckXmit = vA;
+ // If we are retransmitting the last data block then restart T3191.
+ if (currDataBlock == lastDataBlock)
+ {
+ pT3191->setTimerMSec(T3191_VALUE, (int)pAssociatedTbf);
+ }
+
+ break;
+ }
+ currDataBlock = ++currDataBlock % RLC_MOD_VAL;
+ }
+
+ DBG_LEAVE();
+ return(pDlDataBlock);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::RetransmitPendingAckDLRlcBlock
+**
+** PURPOSE: Search V(B) and retransmit the oldest block that in the
+** PENDING_ACK state.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): pointer to data block if available
+** 0 - block not available
+**
+**----------------------------------------------------------------------------*/
+DLDataBlock *DLRlcLink::RetransmitPendingAckDLRlcBlock()
+{
+ DBG_FUNC("DLRlcLink::RetransmitPendingAckDLRlcBlock", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ // Search V(B) from V(A) to V(S). If any blocks are in the PENDING_ACK state
+ // then resend it.
+ int currDataBlock = lastPendingAckXmit;
+ DLDataBlock *pDlDataBlock = 0;
+
+ // If the last block is known but is has not been sent on a valid polling
+ // timeslot then send it again.
+ if ((lastDataBlock != LAST_BLOCK_UNKNOWN) && !lastBlockSentOnPollTs)
+ {
+ pDlDataBlock = pDlBlocks[lastDataBlock];
+ pT3191->setTimerMSec(T3191_VALUE, (int)pAssociatedTbf);
+ }
+ else
+ {
+ while (currDataBlock != vS)
+ {
+ if (vB[currDataBlock] == PENDING_ACK)
+ {
+ pDlDataBlock = pDlBlocks[currDataBlock];
+ // If we are retransmitting the last data block then restart T3191.
+ if (currDataBlock == lastDataBlock)
+ {
+ pT3191->setTimerMSec(T3191_VALUE, (int)pAssociatedTbf);
+ }
+ lastPendingAckXmit = ++currDataBlock % RLC_MOD_VAL;
+ if (lastPendingAckXmit == vS) lastPendingAckXmit = vA;
+ return(pDlDataBlock);
+ }
+ currDataBlock = ++currDataBlock % RLC_MOD_VAL;
+ }
+
+ // If there are no blocks set to PENDING ACK then retransmit the last.
+ if (lastDataBlock != LAST_BLOCK_UNKNOWN)
+ {
+ pDlDataBlock = pDlBlocks[lastDataBlock];
+ pT3191->setTimerMSec(T3191_VALUE, (int)pAssociatedTbf);
+ }
+ }
+
+ DBG_LEAVE();
+ return(pDlDataBlock);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::GetNextLLCPdu
+**
+** PURPOSE: Check BSSGPs buffers to see if there are more PDUs for this
+** TLLI. If there is on then get it.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): TRUE - if there are more PDUs for this TLLI.
+** FALSE - if no more PDUs for this TLLI.
+**
+**----------------------------------------------------------------------------*/
+bool DLRlcLink::GetNextLLCPdu()
+{
+ DBG_FUNC("DLRlcLink::GetNextLLCPdu", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+ BSSGP_DL_UNITDATA_MSG unitDataMsg;
+ unsigned char *pPdu;
+ bool ret = FALSE;
+
+ pPdu = bssgp_udt_get_buff_by_tlli(pAssociatedTbf->tlli.GetTLLI(), &unitDataMsg);
+
+ if (pPdu)
+ {
+ // If a prior PDU exists return it to the bssgp pool.
+ if (llcPdu)
+ {
+ bssgp_util_return_rx_buff(llcPdu);
+ }
+
+ // Save LLC PDU
+ llcPdu = (char *)unitDataMsg.pdu.data;
+ llcPduLen = unitDataMsg.pdu.data_len;
+ currPduByte = 0;
+ ret = TRUE;
+ DBG_TRACE("DLRlcLink: Processing downlink PDU - TLLI(%#x)\n", pAssociatedTbf->tlli.GetTLLI());
+ HexDumper(unitDataMsg.pdu.data, unitDataMsg.pdu.data_len);
+ }
+
+ DBG_LEAVE();
+ return (ret);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::MoreLLCPdusAvailable
+**
+** PURPOSE: Check BSSGPs buffers to see if there are more PDUs for this
+** TLLI.
+**
+** INPUT PARAMETERS: pDlUnitData - pointer to the new data unit.
+**
+** RETURN VALUE(S): TRUE - if there are more PDUs for this TLLI.
+** FALSE - if no more PDUs for this TLLI.
+**
+**----------------------------------------------------------------------------*/
+bool DLRlcLink::MoreLLCPdusAvailable(BSSGP_DL_UNITDATA_MSG **pDlUnitData)
+{
+ DBG_FUNC("DLRlcLink::MoreLLCPdusAvailable", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return (bssgp_udt_check_buff_by_tlli(pAssociatedTbf->tlli.GetTLLI(), pDlUnitData));
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::ReallocateDLResources
+**
+** PURPOSE: Check to see if it would be worth adding more resources for
+** this TBF. If so then send a new DOWNLINK ASSIGNMENT.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): TRUE - if resources were reallocated.
+** FALSE - otherwise.
+**
+**----------------------------------------------------------------------------*/
+bool DLRlcLink::ReallocateDLResources()
+{
+ DBG_FUNC("DLRlcLink::ReallocateDLResources", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ bool allocated = FALSE;
+ int trx, ts;
+
+ DBG_TRACE("RLC_MAC: Attempting to reallocate resources for DL Tbf (%#x)\n", pAssociatedTbf);
+ // Save the trx and a timeslot from the old allocation needed to send the
+ // potential DOWNLINK ASSIGNMENT.
+ RlcMacTask::theRlcMacTask->TSSelectionRequest(&trx, &ts, pAssociatedTbf);
+
+ ULTbf *pUlTbf = RlcMacTask::theRlcMacTask->tbfPool.FindULTbf(
+ (unsigned long)pAssociatedTbf->tlli.GetTLLI());
+
+ // Check if there is an uplink TBF ongoing.
+ if (pUlTbf)
+ {
+ allocated = RlcMacTask::theRlcMacTask->DLResourceReallocRequest(pAssociatedTbf, pUlTbf);
+ }
+ else
+ {
+ allocated = RlcMacTask::theRlcMacTask->DLResourceReallocRequest(pAssociatedTbf);
+ }
+
+ if (allocated)
+ {
+ // Update any timslot quantity information.
+ pAssociatedTbf->UpdateTSSpecificData();
+
+ // Set the tbf to reallocating so that no more scheduling occurs.
+ pAssociatedTbf->SetTbfState(Tbf::REALLOCATING);
+
+ // Send a DOWNLINK ASSIGNMENT to the mobile.
+ RlcMacTask::theRlcMacTask->SendPacketDownlinkAssignment(pAssociatedTbf, trx, ts, FALSE);
+ }
+
+ DBG_LEAVE();
+ return (allocated);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::ReceiveDLAckNack
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void DLRlcLink::ReceiveDLAckNack(MsgPacketDownlinkAckNack *pCtrlMsg)
+{
+ DBG_FUNC("DLRlcLink::ReceiveDLAckNack", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ DBG_TRACE("RLC/MAC: Received PACKET DOWNLINK ACK/NACK - TBF(%#x)\n",
+ pAssociatedTbf);
+
+ if (pAssociatedTbf->GetTbfState() != Tbf::RELEASING)
+ {
+ pT3191->cancelTimer();
+ n3105 = 0;
+
+ // If there is a channel request then go assign some uplink resources.
+ if (pCtrlMsg->chanReqDescription.IsValid())
+ {
+ // Build a PACKET RESOURCE REQUEST message using the IE's from the
+ // DOWNLINK ACK/NACK message.
+ MsgPacketResourceRequest reqMsg;
+ reqMsg.globalTfi.SetGlobalTFI(pAssociatedTbf->tfi.GetTFI(), IeGlobalTFI::DOWNLINK_TFI);
+ reqMsg.msRadioAccessCapability = pAssociatedTbf->raCapability;
+ reqMsg.chanReqDescription = pCtrlMsg->chanReqDescription;
+
+ int ts, trx;
+ RlcMacTask::theRlcMacTask->TSSelectionRequest(&trx, &ts, pAssociatedTbf);
+
+ RlcMacTask::theRlcMacTask->AllocateULResources(reqMsg, trx, ts);
+ }
+
+ // Send DL ack nack information to the DSP's.
+ RlcMacTask::theRlcMacTask->SendDLAckNackInfoMsg(pAssociatedTbf->trx,
+ pAssociatedTbf, pCtrlMsg);
+
+ if (rlcMode == ACKNOWLEDGED_RLC_MODE)
+ {
+ IeAckNackDescription::FINAL_ACK_INDICATION finalAckInd;
+ unsigned char ssn;
+ unsigned char rrb[RRB_SIZE];
+
+ pCtrlMsg->ackNackDescription.GetAckNackDescription(&finalAckInd, &ssn, rrb);
+
+ // The final ACK indication can acknowledge the entire TBF.
+ if (finalAckInd == IeAckNackDescription::TBF_COMPLETE)
+ {
+ // Update V(B) to show all blocks have been acked.
+ while (vA != vS)
+ {
+ vB[vA] = ACKED;
+ vA = ++vA % RLC_MOD_VAL;
+ }
+
+ // Start T3193 so that TBF can be released.
+ pT3193->setTimerMSec(T3193_VALUE, (int)pAssociatedTbf);
+ isT3193Running = TRUE;
+
+ // If more PDUs are available for this MS then go ahead and allocate
+ // more resources now.
+ BSSGP_DL_UNITDATA_MSG *pDlUnitData;
+ if (MoreLLCPdusAvailable(&pDlUnitData))
+ {
+ RlcMacTask::theRlcMacTask->AllocateDLResources(pDlUnitData);
+ }
+ }
+ else
+ {
+ // Update V(B) according to the SSN and RRB values.
+ int vBIndex = (ssn == 0) ? RLC_MOD_VAL - 1 : ssn - 1;
+ int rrbIndex = RRB_SIZE-1;
+ unsigned char bitPos = 1;
+ int tmpVA = ssn;
+
+ while (1)
+ {
+ if (rrb[rrbIndex] & bitPos)
+ {
+ vB[vBIndex] = ACKED;
+ }
+ else
+ {
+ vB[vBIndex] = NACKED;
+ tmpVA = vBIndex;
+ }
+
+ if (!(bitPos <<= 1))
+ {
+ // Next byte in RRB.
+ bitPos = 1;
+ rrbIndex--;
+ }
+
+ if (vBIndex == vA) break;
+ else if (--vBIndex < 0) vBIndex = RLC_MOD_VAL - 1;
+
+ }
+
+ // Invalidate blocks outside the transmit window and update
+ // V(A) to be the oldest NACKED block.
+ vBIndex = vA;
+ while (vBIndex != tmpVA)
+ {
+ vB[vBIndex] = INVALID;
+ sysDlDataBlockPool.ReturnDLDataBlock(pDlBlocks[vBIndex]);
+ pDlBlocks[vBIndex] = 0;
+ vBIndex = ++vBIndex % RLC_MOD_VAL;
+ }
+ vA = tmpVA;
+
+ // If the last block has been sent and the current state is not
+ // ALLOCATED then we need to start up the TBF again.
+ if ((lastDataBlock != LAST_BLOCK_UNKNOWN) &&
+ (pAssociatedTbf->GetTbfState() != Tbf::ALLOCATED))
+ {
+ // Enable downlink scheduling for this TBF.
+ pAssociatedTbf->SetTbfState(Tbf::ALLOCATED);
+ lastBlockSentOnPollTs = FALSE;
+
+ // Make sure the RTS mechanism is triggered.
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (pAssociatedTbf->allocatedTs[i])
+ {
+ RlcMacTask::theRlcMacTask->SendDownlinkDataBlock(pAssociatedTbf->trx, i);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return;
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::ProcessT3195Expiry
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void DLRlcLink::ProcessT3195Expiry()
+{
+ DBG_FUNC("DLRlcLink::ProcessT3195Expiry", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ DBG_TRACE("RLC/MAC: T3195 Expired - TBF(%#x)\n", pAssociatedTbf);
+ // Canel T3195.
+ pT3195->cancelTimer();
+
+ // Cancel Activity Timer
+ pActivityTimer->cancelTimer();
+
+ // Release DL resources.
+ pAssociatedTbf->ReleaseDLTbf(FALSE);
+ ReleaseDataBlocks();
+
+ RlcMacTask::theRlcMacTask->CheckDLMsgQueues();
+
+ DBG_LEAVE();
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::ProcessT3191Expiry
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void DLRlcLink::ProcessT3191Expiry()
+{
+ DBG_FUNC("DLRlcLink::ProcessT3191Expiry", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ DBG_TRACE("RLC/MAC: T3191 Expired - TBF(%#x)\n", pAssociatedTbf);
+ // Canel T3191.
+ pT3191->cancelTimer();
+
+ // Cancel Activity Timer
+ pActivityTimer->cancelTimer();
+
+ // Release DL resources.
+ pAssociatedTbf->ReleaseDLTbf(TRUE);
+ ReleaseDataBlocks();
+
+ RlcMacTask::theRlcMacTask->CheckDLMsgQueues();
+
+ DBG_LEAVE();
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::ProcessT3193Expiry
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void DLRlcLink::ProcessT3193Expiry()
+{
+ DBG_FUNC("DLRlcLink::ProcessT3193Expiry", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ DBG_TRACE("RLC/MAC: T3193 Expired - TBF(%#x)\n", pAssociatedTbf);
+ // Canel T3193.
+ pT3193->cancelTimer();
+ isT3193Running = FALSE;
+
+ // Cancel Activity Timer
+ pActivityTimer->cancelTimer();
+
+ // Release DL resources.
+ pAssociatedTbf->ReleaseDLTbf(TRUE);
+ ReleaseDataBlocks();
+
+ RlcMacTask::theRlcMacTask->CheckDLMsgQueues();
+
+ DBG_LEAVE();
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::ProcessActivityTimerExpiry
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void DLRlcLink::ProcessActivityTimerExpiry()
+{
+ DBG_FUNC("DLRlcLink::ProcessActivityTimerExpiry", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ DBG_TRACE("RLC/MAC: Activity Timer Expired - TBF(%#x)\n", pAssociatedTbf);
+
+ // Release DL resources.
+ pAssociatedTbf->ReleaseDLTbf(TRUE);
+ ReleaseDataBlocks();
+
+ RlcMacTask::theRlcMacTask->CheckDLMsgQueues();
+
+ DBG_LEAVE();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::ReceivePacketControlAck
+**
+** PURPOSE: The Packet Control Ack can be received in two cases:
+** 1. As an acknowledgement to the initial assignment. For this
+** case the TBF state will be ACTIVATING regardless of RLC mode.
+** 2. Confirmation of the end of the TBF in unacknowledged mode.
+**
+** NOTE: The packet control acknowledgement may be sent as access bursts.
+** For this case the DSP will measure the timing advance.
+**
+** INPUT PARAMETERS: pCtrlMsg - the packet control ack message
+** ta - timing advance measured by the DSP's.
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void DLRlcLink::ReceivePacketControlAck(MsgPacketControlAcknowledgement *pCtrlMsg,
+ unsigned char ta)
+{
+ DBG_FUNC("DLRlcLink::ReceivePacketControlAck", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ DBG_TRACE("RLC/MAC: Received PACKET CONTROL ACK - TBF(%#x)\n",
+ pAssociatedTbf);
+
+ // If the current tbf state is ACTIVATING then we must be confirming the
+ // downlink assigment.
+ if (pAssociatedTbf->GetTbfState() == Tbf::ACTIVATING)
+ {
+ // Enable downlink scheduling for this TBF.
+ pAssociatedTbf->SetTbfState(Tbf::ALLOCATED);
+
+ // If a valid timing advance exists send it to the MS.
+ if (ta != 0xff)
+ {
+ SendPacketPowerControlTimingAdvance(ta);
+ }
+
+ // Make sure the RTS mechanism is triggered.
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (pAssociatedTbf->allocatedTs[i])
+ {
+ RlcMacTask::theRlcMacTask->SendDownlinkDataBlock(pAssociatedTbf->trx, i);
+ }
+ }
+ }
+ else if (pAssociatedTbf->GetTbfState() == Tbf::REALLOCATING)
+ {
+ // Enable downlink scheduling for this TBF.
+ pAssociatedTbf->SetTbfState(Tbf::ALLOCATED);
+
+ // Update the DSP's for the new allocation.
+ RlcMacTask::theRlcMacTask->SendDLReconfigurationMsg(pAssociatedTbf);
+
+ // Make sure the RTS mechanism is triggered.
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (pAssociatedTbf->allocatedTs[i])
+ {
+ RlcMacTask::theRlcMacTask->SendDownlinkDataBlock(pAssociatedTbf->trx, i);
+ }
+ }
+ }
+ // This must be the conclusion of an unacknowledged transfer.
+ else if (rlcMode == UNACKNOWLEDGED_RLC_MODE)
+ {
+ // Inactivate the link so that no more data blocks are transmitted.
+ pAssociatedTbf->SetTbfState(Tbf::INACTIVE);
+
+ // If more PDUs are available for this MS then go ahead and allocate
+ // more resources now.
+ BSSGP_DL_UNITDATA_MSG *pDlUnitData;
+ if (MoreLLCPdusAvailable(&pDlUnitData))
+ {
+ RlcMacTask::theRlcMacTask->AllocateDLResources(pDlUnitData);
+ }
+ else
+ {
+ // Start T3193 so that TBF can be released.
+ pT3193->setTimerMSec(T3193_VALUE, (int)pAssociatedTbf);
+ isT3193Running = TRUE;
+ }
+ }
+ else
+ {
+ DBG_WARNING("DLRlcLink::ReceivePacketControlAck: Received PACKET CONTROL ACK "
+ "while ALLOCATED and in ACKNOWLEDGED mode - TBF(%#x)\n", pAssociatedTbf);
+ }
+
+ DBG_LEAVE();
+ return;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::ReceivePacketControlNack
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void DLRlcLink::ReceivePacketControlNack()
+{
+ DBG_FUNC("DLRlcLink::ReceivePacketControlNack", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ // The mobile did not respond to the polling request in the downlink
+ // assignment message so end this TBF by starting T3195.
+ DBG_TRACE("RLC/MAC: Received PACKET CONTROL NACK - TBF(%#x)\n",
+ pAssociatedTbf);
+
+ // If the current tbf state is ACTIVATING then we were unable to confirm the
+ // downlink assigment. Try and send the downlink activation a few times.
+ if (pAssociatedTbf->GetTbfState() == Tbf::ACTIVATING)
+ {
+ // Try sending a PACKET POLLING REQUEST before giving up. Ericsson phones won't poll from
+ // the IMMEDIATE ASSIGNMENT message and require a specific polling message.
+ if (pollOnActivation == FALSE)
+ {
+ pollOnActivation = TRUE;
+ SendPacketPollingRequest();
+ }
+ else if (++dlAssignCnt < dlAssignCntMax)
+ {
+ // Set polling flag back to false for this assignment reattempt.
+ pollOnActivation = FALSE;
+
+ ULTbf *pUlTbf = RlcMacTask::theRlcMacTask->tbfPool.FindULTbf((unsigned long)pAssociatedTbf->tlli.GetTLLI());
+ // No uplink TBF exists so send an IMMEDIATE ASSIGNMENT on the CCCH
+ if (!pUlTbf)
+ {
+ // If more than one timeslot was allocated we need to free the
+ // resources and reallocate just one timeslot since only a single
+ // timeslot can be assigned in the IMMEDIATE ASSIGNMENT.
+ int numTs = 0;
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (pAssociatedTbf->allocatedTs[i])
+ {
+ if (++numTs > 1) break;
+ }
+ }
+
+ // If more than one timeslot was allocated then reallocate.
+ if (numTs > 1)
+ {
+ // Release resources with the scheduler.
+ RlcMacTask::theRlcMacTask->DLReleaseResourceRequest(pAssociatedTbf);
+ // Allocate just one timeslot.
+ if (RlcMacTask::theRlcMacTask->DLSingleTSResourceRequest(pAssociatedTbf))
+ {
+ // Let the DSP know about this change.
+ pAssociatedTbf->UpdateTSSpecificData();
+ RlcMacTask::theRlcMacTask->SendDLReconfigurationMsg(pAssociatedTbf);
+ }
+ else
+ {
+ pT3195->setTimerMSec(T3195_VALUE, (int)pAssociatedTbf);
+ }
+ }
+
+ RlcMacTask::theRlcMacTask->DLCCCHImmediateAssignment(pAssociatedTbf);
+ }
+ else
+ {
+ RlcMacTask::theRlcMacTask->SendPacketDownlinkAssignment(pAssociatedTbf, pUlTbf, FALSE);
+ }
+ }
+ else
+ {
+ pT3195->setTimerMSec(T3195_VALUE, (int)pAssociatedTbf);
+ }
+ }
+ // A reallocation attempt must have failed so just release the TBF.
+ else if (pAssociatedTbf->GetTbfState() == Tbf::REALLOCATING)
+ {
+ pT3195->setTimerMSec(T3195_VALUE, (int)pAssociatedTbf);
+ pAssociatedTbf->InternalReleaseDLTbf();
+ }
+ else
+ {
+ // This must be the end of an unacknowledged mode transfer. Since we did
+ // not get a PACKET CONTROL ACK from the MS just release this TBF.
+ if (rlcMode == UNACKNOWLEDGED_RLC_MODE)
+ {
+ pT3195->setTimerMSec(T3195_VALUE, (int)pAssociatedTbf);
+ pAssociatedTbf->InternalReleaseDLTbf();
+ }
+ // In acknowledged mode we must have not gotten a PACKET DOWNLINK ACK/NACK. Activate
+ // the TBF and try again.
+ else
+ {
+ // Enable downlink scheduling for this TBF.
+ pAssociatedTbf->SetTbfState(Tbf::ALLOCATED);
+ lastBlockSentOnPollTs = FALSE;
+
+ // Make sure the RTS mechanism is triggered.
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (pAssociatedTbf->allocatedTs[i])
+ {
+ RlcMacTask::theRlcMacTask->SendDownlinkDataBlock(pAssociatedTbf->trx, i);
+ }
+ }
+ }
+ }
+
+ DBG_LEAVE();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendPacketPowerControlTimingAdvance
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: ta - timing advance
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS DLRlcLink::SendPacketPowerControlTimingAdvance(unsigned char ta)
+{
+ DBG_FUNC("RlcMacTask::SendPacketPowerControlTimingAdvance", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ DLMacHeader msgHdr;
+ MsgPacketPowerCtlTimingAdvance msg;
+
+ // Assemble RLC/MAC header.
+ msgHdr.SetPayloadType(DLMacHeader::RLC_CTRL_BLOCK_NO_OPT_OCTETS);
+ msgHdr.SetRRBP(DLMacHeader::FN_N_13);
+ msgHdr.SetSPBit(DLMacHeader::RRBP_NOT_VALID);
+ // USF will be filled in later.
+
+ // Assemble Packet Power Control Timing Advance.
+ msg.pageMode.SetPageMode(IePageMode::NORMAL_PAGING);
+
+ msg.globalTFI.SetGlobalTFI(pAssociatedTbf->tfi.GetTFI(), IeGlobalTFI::DOWNLINK_TFI);
+ msg.globalTA.SetGlobalPacketTimingAdvance(ta);
+
+ int ts, trx;
+
+ RlcMacTask::theRlcMacTask->TSSelectionRequest(&trx, &ts, pAssociatedTbf);
+
+ if ((status = RlcMacTask::theRlcMacTask->SendPacchMsg(trx, ts, &msgHdr, &msg,
+ CTL_ACK_TAG_NOT_APPLICABLE, RLC_MAC_NORMAL_BURST)) != JC_OK)
+ {
+ DBG_WARNING("RlcMacTask::SendPacketPowerControlTimingAdvance: failed %#x\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return(status);
+ }
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendPacketPollingRequest
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS DLRlcLink::SendPacketPollingRequest()
+{
+ DBG_FUNC("RlcMacTask::SendPacketPollingRequest", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ DLMacHeader msgHdr;
+ MsgPacketPollingRequest msg;
+
+ // Assemble RLC/MAC header.
+ msgHdr.SetPayloadType(DLMacHeader::RLC_CTRL_BLOCK_NO_OPT_OCTETS);
+ msgHdr.SetRRBP(DLMacHeader::FN_N_13);
+ msgHdr.SetSPBit(DLMacHeader::RRBP_VALID);
+ // USF will be filled in later.
+
+ // Assemble Packet Polling Request.
+ msg.pageMode.SetPageMode(IePageMode::NORMAL_PAGING);
+
+ msg.globalTFI.SetGlobalTFI(pAssociatedTbf->tfi.GetTFI(), IeGlobalTFI::DOWNLINK_TFI);
+ msg.typeOfAck = MsgPacketPollingRequest::ACK_MSG_FOUR_ACCESS_BURSTS;
+
+ int ts, trx;
+
+ RlcMacTask::theRlcMacTask->TSSelectionRequest(&trx, &ts, pAssociatedTbf);
+
+ // Setup a control ack tag so that the PACKET CONTROL ACK message can
+ // be connected to this downlink TBF.
+ pAssociatedTbf->SetControlAckTag();
+
+ if ((status = RlcMacTask::theRlcMacTask->SendPacchMsg(trx, ts, &msgHdr, &msg,
+ pAssociatedTbf->GetControlAckTag(), RLC_MAC_ACCESS_BURST)) != JC_OK)
+ {
+ DBG_WARNING("RlcMacTask::SendPacketPollingRequest: failed %#x\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return(status);
+ }
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::T3195TimerExpiry
+**
+** PURPOSE: Send a T3195 expiry message to the specified downlink TBF.
+**
+** INPUT PARAMETERS: tbfPointer - pointer to the uplink tbf
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+int DLRlcLink::T3195TimerExpiry(int tbfPointer)
+{
+ if (tbfPointer)
+ {
+ RlcMacT3195Expiry(tbfPointer);
+ }
+ return(OK);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::T3191TimerExpiry
+**
+** PURPOSE: Send a T3191 expiry message to the specified downlink TBF.
+**
+** INPUT PARAMETERS: tbfPointer - pointer to the uplink tbf
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+int DLRlcLink::T3191TimerExpiry(int tbfPointer)
+{
+ if (tbfPointer)
+ {
+ RlcMacT3191Expiry(tbfPointer);
+ }
+ return(OK);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::T3193TimerExpiry
+**
+** PURPOSE: Send a T3193 expiry message to the specified downlink TBF.
+**
+** INPUT PARAMETERS: tbfPointer - pointer to the uplink tbf
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+int DLRlcLink::T3193TimerExpiry(int tbfPointer)
+{
+ if (tbfPointer)
+ {
+ RlcMacT3193Expiry(tbfPointer);
+ }
+ return(OK);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::ActivityTimerExpiry
+**
+** PURPOSE: Send an activity timer expiry message to the specified downlink TBF.
+**
+** INPUT PARAMETERS: tbfPointer - pointer to the uplink tbf
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+int DLRlcLink::ActivityTimerExpiry(int tbfPointer)
+{
+ if (tbfPointer)
+ {
+ RlcMacDLActivityTimerExpiry(tbfPointer);
+ }
+ return(OK);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::ReleaseDataBlocks
+**
+** PURPOSE: Give back data blocks to the downlink data block pool.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void DLRlcLink::ReleaseDataBlocks()
+{
+ DBG_FUNC("DLRlcLink::ReleaseDataBlocks", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ // Return all data blocks to the pool.
+ for (int i = 0; i < RLC_MOD_VAL; i++)
+ {
+ if (pDlBlocks[i] && (i < RLC_MOD_VAL))
+ {
+ sysDlDataBlockPool.ReturnDLDataBlock(pDlBlocks[i]);
+ pDlBlocks[i] = 0;
+ }
+ }
+
+ if (llcPdu)
+ {
+ bssgp_util_return_rx_buff(llcPdu);
+ }
+
+ DBG_LEAVE();
+ return;
+}
+
+
+void DLRlcLink::ShowRlcLinkInfo()
+{
+ printf("Downlink RLC link information:\n");
+ if (rlcMode == ACKNOWLEDGED_RLC_MODE)
+ printf("\tRLC Mode (ACKNOWLEDGED)");
+ else
+ printf("\tRLC Mode (UNACKNOWLEDGED)");
+ printf(" k = %d V(S) = %d V(A) = %d V(CS) = %d\n", k, vS, vA, vCS);
+ printf("\tV(B) : N=NACKED, A=ACKED, P=PENDING_ACK, I=INVALID\n");
+ printf("\t");
+ for (int i = 0; i < RLC_MOD_VAL; i++)
+ {
+ if (vB[i] == NACKED)
+ printf("N");
+ else if (vB[i] == PENDING_ACK)
+ printf("P");
+ else if (vB[i] == ACKED)
+ printf("A");
+ else
+ printf("I");
+ if (((i % 32) == 0) && (i != 0)) printf("\n\t");
+ }
+ printf("\n");
+
+ printf("\tAssociated TBF (%#x)\n", pAssociatedTbf);
+ switch (chanCoding.GetChannelCodingCommand())
+ {
+ case IeChannelCodingCommand::CS_1 : printf("\tCurrent Channel Coding: CS_1\n"); break;
+ case IeChannelCodingCommand::CS_2 : printf("\tCurrent Channel Coding: CS_2\n"); break;
+ case IeChannelCodingCommand::CS_3 : printf("\tCurrent Channel Coding: CS_3\n"); break;
+ case IeChannelCodingCommand::CS_4 : printf("\tCurrent Channel Coding: CS_4\n"); break;
+ }
+ printf("\tN3105 = %d dlAssignCnt = %d\n", n3105, dlAssignCnt);
+}
+
+
+
+void HexDumper(UINT8 *buffer, int length )
+{
+ int size;
+ int i;
+ int dwPos = 0;
+ static char line[255];
+ int pos;
+
+ DBG_FUNC("HexDumper", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ while (length > 0)
+ {
+ //
+ // Take min of 16 or length
+ //
+ size = min(16, length );
+ //
+ // Build text line
+ //
+ pos = sprintf(line, " %04X ", dwPos );
+ for (i = 0; i < size; i++)
+ {
+ pos += sprintf(line+pos, "%02X ", buffer[i] );
+ }
+ //
+ // Add spaces for short lines
+ //
+ while (i < 16)
+ {
+ pos += sprintf(line+pos, " " );
+ i++;
+ }
+ //
+ // Add ASCII chars
+ //
+ for (i = 0; i < size; i++)
+ {
+ if (isprint(buffer[i]))
+ {
+ pos += sprintf(line+pos, "%c", buffer[i] );
+ } else {
+ pos += sprintf(line+pos, "." );
+ }
+ }
+
+ DBG_TRACE((line));
+
+ //
+ // Advance positions
+ //
+
+ length -= size;
+ dwPos += size;
+ buffer += size;
+ }
+ DBG_LEAVE();
+}
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/DLSignallingMsgQueue.cpp b/data/mnet/GP10/Host/Rlc_mac/src/DLSignallingMsgQueue.cpp
new file mode 100644
index 0000000..f740d2a
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/DLSignallingMsgQueue.cpp
@@ -0,0 +1,69 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : DLSignallingMsgQueue.cpp
+// Author(s) : Tim Olson
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#include "DLSignallingMsgQueue.h"
+
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+JC_STATUS DLSignallingMsgQueue::QueueDLSignallingMsg
+(
+ MsgPacchReq *l1Msg
+)
+{
+ DBG_FUNC("DLSignallingMsgQueue::QueueDLSignallingMsg", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ if (numEntries < MAX_DL_SIGNALLING_QUEUE_ENTRIES)
+ {
+ qTail = ((qHead+1) % MAX_DL_SIGNALLING_QUEUE_ENTRIES);
+ bcopy((char *)&pacchMsg[qTail], (char *)l1Msg, sizeof(MsgPacchReq));
+ numEntries++;
+ }
+ else
+ {
+ status == JC_ERROR;
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+MsgPacchReq *DLSignallingMsgQueue::DequeueDLSignallingMsg()
+{
+ DBG_FUNC("DLSignallingMsgQueue::DequeueDLSignallingMsg", RLC_MAC);
+ DBG_ENTER();
+
+ MsgPacchReq *pL1Msg;
+
+ if (qHead == qTail)
+ {
+ pL1Msg = 0;
+ }
+ else
+ {
+ pL1Msg = &pacchMsg[qTail];
+ qHead = (++qHead % MAX_DL_SIGNALLING_QUEUE_ENTRIES);
+ numEntries--;
+ }
+
+ DBG_LEAVE();
+ return (pL1Msg);
+}
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/DLTbf.cpp b/data/mnet/GP10/Host/Rlc_mac/src/DLTbf.cpp
new file mode 100644
index 0000000..1eedf25
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/DLTbf.cpp
@@ -0,0 +1,222 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : DLTbf.cpp
+// Author(s) : Tim Olson
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "RlcMacTask.h"
+#include "DLTbf.h"
+
+#include "grr\grr_intf.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+JC_STATUS DLTbf::EstablishDLTbf(BSSGP_DL_UNITDATA_MSG *pUnitDataMsg, bool ctrlAck)
+{
+ DBG_FUNC("DLTbf::EstablishDLTbf", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ // Initialize tbf request info.
+ qosProfile = pUnitDataMsg->qos_profile;
+ qosParams = pUnitDataMsg->qos_params;
+ raCapability = pUnitDataMsg->radio_access_cap;
+ drxParams = pUnitDataMsg->drx_params;
+ msId = pUnitDataMsg->imsi;
+ priority = pUnitDataMsg->priority;
+ tlli.SetTLLI(pUnitDataMsg->tlli.tlli);
+ controlAck = ctrlAck;
+
+ // Clear out allocated resources. Open up allowed resources.
+ for (int i=0; i < MAX_TIMESLOTS; i++)
+ {
+ allocatedTs[i] = FALSE;
+ }
+ trx = NULL_TRX;
+
+ // Initialize the RLC link
+ if ((status = rlcLink.EstablishRLCLink(this,
+ (DLRlcLink::RLC_MODE)pUnitDataMsg->qos_profile.a_bit)) == JC_OK)
+ {
+ SetTbfState(ACTIVATING);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+JC_STATUS DLTbf::ReestablishDLTbf(BSSGP_DL_UNITDATA_MSG *pUnitDataMsg, bool ctrlAck)
+{
+ DBG_FUNC("DLTbf::ReestablishDLTbf", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ // Initialize tbf request info.
+ qosProfile = pUnitDataMsg->qos_profile;
+ qosParams = pUnitDataMsg->qos_params;
+ raCapability = pUnitDataMsg->radio_access_cap;
+ drxParams = pUnitDataMsg->drx_params;
+ msId = pUnitDataMsg->imsi;
+ priority = pUnitDataMsg->priority;
+ tlli.SetTLLI(pUnitDataMsg->tlli.tlli);
+ controlAck = ctrlAck;
+
+ // Initialize the RLC link
+ if ((status = rlcLink.ReestablishRLCLink(this,
+ (DLRlcLink::RLC_MODE)pUnitDataMsg->qos_profile.a_bit)) == JC_OK)
+ {
+ SetTbfState(ACTIVATING);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLTbf::UpdateTSSpecificData
+**
+** PURPOSE: This function will be called after timeslots are allocated. Any
+** data that requires timeslot information should be set here.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void DLTbf::UpdateTSSpecificData()
+{
+ DBG_FUNC("DLTbf::UpdateTSSpecificData", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ int numTs = 0;
+
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (allocatedTs[i]) numTs++;
+ }
+
+ currNumAckTags = numTs * 5;
+
+ rlcLink.UpdateTSSpecificData();
+
+ DBG_LEAVE();
+ return;
+}
+
+
+JC_STATUS DLTbf::ReleaseDLTbf(bool deactivateDsp)
+{
+ DBG_FUNC("DLTbf::ReleaseDLTbf", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ // Release resources with the scheduler.
+ RlcMacTask::theRlcMacTask->DLReleaseResourceRequest(this);
+ // Release resources with the dsps if required.
+ if (deactivateDsp)
+ RlcMacTask::theRlcMacTask->SendDLDeactivationMsg(this);
+ SetTbfState(FREE);
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+JC_STATUS DLTbf::InternalReleaseDLTbf()
+{
+ DBG_FUNC("DLTbf::ReleaseDLTbf", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ // Release resources with the dsps if required.
+ RlcMacTask::theRlcMacTask->SendDLDeactivationMsg(this);
+ SetTbfState(RELEASING);
+ // Scramble the TLLI.
+ tlli.SetTLLI(0xffffffff);
+ // Scramble the controlAck tag.
+ ClearControlAckTag();
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+JC_STATUS DLTbf::AbnormalReleaseDLTbf()
+{
+ DBG_FUNC("DLTbf::AbnormalReleaseDLTbf", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ status = rlcLink.AbnormalRelease();
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+void DLTbf::ShowTBFInfo()
+{
+ printf("Downlink TBF %#x - State(%d)\n", this, GetTbfState());
+ printf("\tTLLI = %#x TFI = %d\n", tlli.GetTLLI(), tfi.GetTFI());
+ printf("\tAllocated Timeslots on TRX(%d):", trx);
+ for (int i=0; i < MAX_TIMESLOTS; i++)
+ {
+ if (allocatedTs[i] == TRUE)
+ {
+ printf(" TS(%d)", i);
+ }
+ }
+ printf("\n");
+ printf("\tTAI Timeslot (%d) TAI(%d)\n", taiTs, tai);
+ rlcLink.ShowRlcLinkInfo();
+ printf("\n");
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLTbf::GetMultislotClass
+**
+** PURPOSE: Get multislot class sent from GPRS Server and stored in DLTbf
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): mobile's multislot class, 1-18
+**
+**----------------------------------------------------------------------------*/
+int DLTbf::GetMultislotClass(void) const
+{
+ if (raCapability.ie_present)
+ {
+ for ( int i=0; i<raCapability.number_of_ra_capabilities; i++ )
+ {
+ if ( raCapability.ms_ra_capability[i].access_technology_type ==
+ grr_GetRadioAccessTechnology() )
+ if ((raCapability.ms_ra_capability[i].multislot_capability.present) &&
+ (raCapability.ms_ra_capability[i].multislot_capability.gprs_params_present))
+ return (raCapability.ms_ra_capability[i].multislot_capability.gprs_multi_slot_class);
+ }
+ }
+ // If multislot class is not present, return Multislot Class 1
+ return (1);
+}
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/DynamicAllocationStruct.cpp b/data/mnet/GP10/Host/Rlc_mac/src/DynamicAllocationStruct.cpp
new file mode 100644
index 0000000..eeb94e2
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/DynamicAllocationStruct.cpp
@@ -0,0 +1,307 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : DynamicAllocationStruct.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "DynamicAllocationStruct.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char allocTypeNames[][64] =
+{
+ "Dynamic Allocation",
+ "Extended Dynamic Allocation"
+};
+
+char usfGranularityNames[][64] =
+{
+ "One RLC/MAC block",
+ "Four RLC/MAC blocks"
+};
+
+
+// *******************************************************************
+// class DynamicAllocationStruct
+//
+// Description:
+// Dynamic Allocation Struct -- GSM04.60 11.2.29
+//
+// <Dynamic Allocation struct > ::=
+// < Extended Dynamic Allocation : bit (1) >
+// { 0 | 1 < P0 : bit (4) >
+// < PR_MODE : bit (1) > }
+// < USF_GRANULARITY : bit (1) >
+// { 0 | 1 < UPLINK_TFI_ASSIGNMENT : bit (5) > }
+// { 0 | 1 < RLC_DATA_BLOCKS_GRANTED : bit (8) > }
+// { 0 | 1 < TBF Starting Time : < Starting Frame Number Description IE > > }
+// { 0 -- Timeslot Allocation
+// { 0 | 1 < USF_TN0 : bit (3) > }
+// { 0 | 1 < USF_TN1 : bit (3) > }
+// { 0 | 1 < USF_TN2 : bit (3) > }
+// { 0 | 1 < USF_TN3 : bit (3) > }
+// { 0 | 1 < USF_TN4 : bit (3) > }
+// { 0 | 1 < USF_TN5 : bit (3) > }
+// { 0 | 1 < USF_TN6 : bit (3) > }
+// { 0 | 1 < USF_TN7 : bit (3) > }
+// | 1 -- Timeslot Allocation with Power Control Parameters
+// < ALPHA : bit (4) >
+// { 0 | 1 < USF_TN0 : bit (3) >
+// < GAMMA_TN0 : bit (5) > }
+// { 0 | 1 < USF_TN1 : bit (3) >
+// < GAMMA_TN1 : bit (5) > }
+// { 0 | 1 < USF_TN2 : bit (3) >
+// < GAMMA_TN2 : bit (5) > }
+// { 0 | 1 < USF_TN3 : bit (3) >
+// < GAMMA_TN3 : bit (5) > }
+// { 0 | 1 < USF_TN4 : bit (3) >
+// < GAMMA_TN4 : bit (5) > }
+// { 0 | 1 < USF_TN5 : bit (3) >
+// < GAMMA_TN5 : bit (5) > }
+// { 0 | 1 < USF_TN6 : bit (3) >
+// < GAMMA_TN6 : bit (5) > }
+// { 0 | 1 < USF_TN7 : bit (3) >
+// < GAMMA_TN7 : bit (5) > } } ;
+// *******************************************************************
+
+
+RlcMacResult DynamicAllocationStruct::EncodeDynamicAllocationStruct(BitStreamOut &dataStream)
+{
+ DBG_FUNC("DynamicAllocationStruct::EncodeDynamicAllocationStruct", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack Dynamic Allocation Struct bits into the output bit stream.
+ if (isValid)
+ {
+ // Encode Extended Dynamic Allocation bit
+ // < Extended Dynamic Allocation : bit (1) >
+ dataStream.InsertBits8((unsigned char)allocType, 1);
+
+ // Encode PO and PR_MODE if valid
+ // { 0 | 1 < P0 : bit (4) >
+ // < PR_MODE : bit (1) > }
+ if ((po.IsValid()) && (prMode.IsValid()))
+ {
+ dataStream.InsertBits8(1, 1);
+ result = po.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ result = prMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode USF Granularity bit
+ // < USF_GRANULARITY : bit (1) >
+ dataStream.InsertBits8((unsigned char)usfGranularity, 1);
+
+ // Encode Uplink TFI Assignment
+ // { 0 | 1 < UPLINK_TFI_ASSIGNMENT : bit (5) > }
+ if (uplinkTFI.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = uplinkTFI.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode RLC Data Blocks Granted
+ // { 0 | 1 < RLC_DATA_BLOCKS_GRANTED : bit (8) > }
+ if (rlcBlocksGranted.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = rlcBlocksGranted.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode TBF Starting Time
+ // { 0 | 1 < TBF Starting Time : < Starting Frame Number Description IE > > }
+ if (startTime.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = startTime.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode the Timeslot Allocation
+ // { 0 -- Timeslot Allocation
+ // { 0 | 1 < USF_TN0 : bit (3) > }
+ // { 0 | 1 < USF_TN1 : bit (3) > }
+ // { 0 | 1 < USF_TN2 : bit (3) > }
+ // { 0 | 1 < USF_TN3 : bit (3) > }
+ // { 0 | 1 < USF_TN4 : bit (3) > }
+ // { 0 | 1 < USF_TN5 : bit (3) > }
+ // { 0 | 1 < USF_TN6 : bit (3) > }
+ // { 0 | 1 < USF_TN7 : bit (3) > }
+ // | 1 -- Timeslot Allocation with Power Control Parameters
+ // < ALPHA : bit (4) >
+ // { 0 | 1 < USF_TN0 : bit (3) >
+ // < GAMMA_TN0 : bit (5) > }
+ // { 0 | 1 < USF_TN1 : bit (3) >
+ // < GAMMA_TN1 : bit (5) > }
+ // { 0 | 1 < USF_TN2 : bit (3) >
+ // < GAMMA_TN2 : bit (5) > }
+ // { 0 | 1 < USF_TN3 : bit (3) >
+ // < GAMMA_TN3 : bit (5) > }
+ // { 0 | 1 < USF_TN4 : bit (3) >
+ // < GAMMA_TN4 : bit (5) > }
+ // { 0 | 1 < USF_TN5 : bit (3) >
+ // < GAMMA_TN5 : bit (5) > }
+ // { 0 | 1 < USF_TN6 : bit (3) >
+ // < GAMMA_TN6 : bit (5) > }
+ // { 0 | 1 < USF_TN7 : bit (3) >
+ // < GAMMA_TN7 : bit (5) > } } ;
+ if (timeslotAllocation.isValid)
+ {
+ dataStream.InsertBits8(0, 1);
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (timeslotAllocation.tsAllocEntry[i].isValid)
+ {
+ dataStream.InsertBits8(1, 1);
+ dataStream.InsertBits8(timeslotAllocation.tsAllocEntry[i].usf, 3);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+ }
+ }
+ else if (timeslotAllocationWithPower.isValid)
+ {
+ dataStream.InsertBits8(1, 1);
+ dataStream.InsertBits8(timeslotAllocationWithPower.alpha, 4);
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (timeslotAllocationWithPower.tsAllocWithPowerEntry[i].isValid)
+ {
+ dataStream.InsertBits8(1, 1);
+ dataStream.InsertBits8(
+ timeslotAllocationWithPower.tsAllocWithPowerEntry[i].usf, 3);
+ dataStream.InsertBits8(
+ timeslotAllocationWithPower.tsAllocWithPowerEntry[i].gamma, 5);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("DynamicAllocationStruct::EncodeDynamicAllocationStruct Timeslot "
+ "Allocation Struct not valid\n");
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("DynamicAllocationStruct::EncodeDynamicAllocationStruct Dynamic "
+ "Allocation Struct not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void DynamicAllocationStruct::DisplayDynamicAllocationStruct(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tDynamic Allocation Struct\n");
+
+ // Print out Extended Dynamic Allocation bit
+ outObj->Trace("\tExtended Dynamic Allocation bit ---> %s\n",
+ allocTypeNames[allocType]);
+
+ // Print out PO and PR_MODE if valid
+ if ((po.IsValid()) && (prMode.IsValid()))
+ {
+ po.DisplayDetails(outObj);
+ }
+
+ // Print out PR_MODE if valid
+ if ((po.IsValid()) && (prMode.IsValid()))
+ {
+ prMode.DisplayDetails(outObj);
+ }
+
+ // Print out USF Granularity bit
+ outObj->Trace("\tUSF Granularity bit ---> %s\n",
+ usfGranularityNames[usfGranularity]);
+
+ // Print out Uplink TFI Assignment
+ if (uplinkTFI.IsValid())
+ {
+ uplinkTFI.DisplayDetails(outObj);
+ }
+
+ // Print out RLC Data Blocks Granted
+ if (rlcBlocksGranted.IsValid())
+ {
+ rlcBlocksGranted.DisplayDetails(outObj);
+ }
+
+ // Print out TBF Starting Time
+ if (startTime.IsValid())
+ {
+ startTime.DisplayDetails(outObj);
+ }
+
+ // Print out the Timeslot Allocation
+ if (timeslotAllocation.isValid)
+ {
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (timeslotAllocation.tsAllocEntry[i].isValid)
+ {
+ outObj->Trace("\tUSF TS %d ---> %d\n", i,
+ timeslotAllocation.tsAllocEntry[i].usf);
+ }
+ }
+ }
+ else if (timeslotAllocationWithPower.isValid)
+ {
+ outObj->Trace("\tAlpha ---> %f\n",
+ (timeslotAllocationWithPower.alpha > 10) ? 1.0 :
+ (float) (timeslotAllocationWithPower.alpha * 0.1));
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (timeslotAllocationWithPower.tsAllocWithPowerEntry[i].isValid)
+ {
+ outObj->Trace("\tUSF TS %d ---> %d\n", i,
+ timeslotAllocationWithPower.tsAllocWithPowerEntry[i].usf);
+ outObj->Trace("\tGamma TS %d ---> %d dB\n", i,
+ timeslotAllocationWithPower.tsAllocWithPowerEntry[i].gamma<<1) ;
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/FixedAllocationStruct.cpp b/data/mnet/GP10/Host/Rlc_mac/src/FixedAllocationStruct.cpp
new file mode 100644
index 0000000..bea9c0f
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/FixedAllocationStruct.cpp
@@ -0,0 +1,239 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : FixedAllocationStruct.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "FixedAllocationStruct.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char finalAllocNames[][64] =
+{
+ "Not the last allocation",
+ "Last allocation"
+};
+
+char halfDupNames[][64] =
+{
+ "Not half duplex",
+ "Half duplex"
+};
+
+
+// *******************************************************************
+// class FixedAllocationStruct
+//
+// Description:
+// Dynamic Allocation Struct -- GSM04.60 11.2.29
+//
+// <Fixed Allocation struct > ::=
+// { 0 | 1 < UPLINK_TFI_ASSIGNMENT : bit (5) > }
+// < FINAL_ALLOCATION : bit (1) >
+// < DOWNLINK_CONTROL_TIMESLOT: bit (3) >
+// { 0 | 1 < P0 : bit (4) >
+// < BTS_PWR_CTRL_MODE : bit (1) >
+// < PR_MODE : bit (1) > }
+// { 0 < TIMESLOT_ALLOCATION : bit (8) >
+// | 1 < Power Control Parameters : < Power Control Parameters IE > > }
+// < HALF_DUPLEX_MODE : bit (1) >
+// < TBF Starting Time : < Starting Frame Number Description IE > >
+// { 0 { 0 -- with length of Allocation Bitmap
+// < BLOCKS_OR_BLOCK_PERIODS : bit (1) >
+// < ALLOCATION_BITMAP_LENGTH : bit (7) >
+// < ALLOCATION_BITMAP : bit (val(ALLOCATION_BITMAP_LENGTH)) >
+// | 1 -- without length of Allocation Bitmap (fills remainder of the message)
+// < ALLOCATION_BITMAP : bit ** > }
+// ! < Message escape : 1 bit (*) = <no string> > } ;
+// *******************************************************************
+
+
+RlcMacResult FixedAllocationStruct::EncodeFixedAllocationStruct(BitStreamOut &dataStream)
+{
+ DBG_FUNC("FixedAllocationStruct::EncodeFixedAllocationStruct", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack Fixed Allocation Struct bits into the output bit stream.
+ if (isValid)
+ {
+ // Encode Uplink TFI Assignment
+ // { 0 | 1 < UPLINK_TFI_ASSIGNMENT : bit (5) > }
+ if (uplinkTFI.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = uplinkTFI.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode Final Allocation bit
+ // < FINAL_ALLOCATION : bit (1) >
+ dataStream.InsertBits8((unsigned char)finalAllocation, 1);
+
+ // Encode Downlink Control Timeslot
+ // < DOWNLINK_CONTROL_TIMESLOT: bit (3) >
+ dataStream.InsertBits8(controlTimeslot, 3);
+
+ // Encode PO, BTS_PWR_CTRL_MODE and PR_MODE if valid
+ // { 0 | 1 < P0 : bit (4) >
+ // < BTS_PWR_CTRL_MODE : bit (1) >
+ // < PR_MODE : bit (1) > }
+ if (powerControl.isValid)
+ {
+ dataStream.InsertBits8(1, 1);
+ result = powerControl.po.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ result = powerControl.btsPowerCtlMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ result = powerControl.prMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode Timslot Allocation or Power Control Parameters
+ // { 0 | 1 < RLC_DATA_BLOCKS_GRANTED : bit (8) > }
+ if (timeslotAllocation.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = timeslotAllocation.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else if (powerControlParameters.IsValid())
+ {
+ dataStream.InsertBits8(0, 1);
+ result = powerControlParameters.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("FixedAllocationStruct::EncodeFixedAllocationStruct Timeslot "
+ "Allocation or Power Control Params must be valid\n");
+ }
+
+ // Encode Half Duplex Mode bit
+ // < HALF_DUPLEX_MODE : bit (1) >
+ dataStream.InsertBits8((unsigned char)halfDuplexMode, 1);
+
+ // Encode TBF Starting Time
+ // < TBF Starting Time : < Starting Frame Number Description IE > >
+ if (startTime.IsValid())
+ {
+ result = startTime.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("FixedAllocationStruct::EncodeFixedAllocationStruct TBF Start "
+ "Time must be valid\n");
+ }
+
+ // Encode the Timeslot Allocation
+ // NOTE: Only supporting length version!
+ // { 0 { 0 -- with length of Allocation Bitmap
+ // < BLOCKS_OR_BLOCK_PERIODS : bit (1) >
+ // < ALLOCATION_BITMAP_LENGTH : bit (7) >
+ // < ALLOCATION_BITMAP : bit (val(ALLOCATION_BITMAP_LENGTH)) >
+ // | 1 -- without length of Allocation Bitmap (fills remainder of the message)
+ // < ALLOCATION_BITMAP : bit ** > }
+ // ! < Message escape : 1 bit (*) = <no string> > } ;
+ dataStream.InsertBits8(0, 2);
+ dataStream.InsertBits8((unsigned char)allocationBitmapType, 1);
+ if (allocationBitMap.IsValid())
+ {
+ result = allocationBitMap.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("FixedAllocationStruct::EncodeFixedAllocationStruct Allocation "
+ "BitMap not valid\n");
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("FixedAllocationStruct::EncodeFixedAllocationStruct Dynamic "
+ "Allocation Struct not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void FixedAllocationStruct::DisplayFixedAllocationStruct(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tFixed Allocation Struct\n");
+
+ // Print out Uplink TFI Assignment
+ // { 0 | 1 < UPLINK_TFI_ASSIGNMENT : bit (5) > }
+ if (uplinkTFI.IsValid())
+ {
+ uplinkTFI.DisplayDetails(outObj);
+ }
+
+ // Print out Final Allocation bit
+ outObj->Trace("\tFinal Allocation ---> %s\n", finalAllocNames[finalAllocation]);
+
+ // Print out Downlink Control Timeslot
+ outObj->Trace("\tDownlink Control Timeslot ---> %d\n", controlTimeslot);
+
+ // Print out PO, BTS_PWR_CTRL_MODE and PR_MODE if valid
+ if (powerControl.isValid)
+ {
+ powerControl.po.DisplayDetails(outObj);
+ powerControl.btsPowerCtlMode.DisplayDetails(outObj);
+ powerControl.prMode.DisplayDetails(outObj);
+ }
+
+ // Print out Timslot Allocation
+ if (timeslotAllocation.IsValid())
+ {
+ timeslotAllocation.DisplayDetails(outObj);
+ }
+
+ // Print out Power Control Parameters
+ if (powerControlParameters.IsValid())
+ {
+ powerControlParameters.DisplayDetails(outObj);
+ }
+
+ // Print out Half Duplex Mode bit
+ outObj->Trace("\tHalf Duplex Mode ---> %s\n", halfDupNames[halfDuplexMode]);
+
+ // Print out TBF Starting Time
+ if (startTime.IsValid())
+ {
+ startTime.DisplayDetails(outObj);
+ }
+
+ // Print out the Timeslot Allocation
+ if (allocationBitMap.IsValid())
+ {
+ allocationBitMap.DisplayDetails(outObj);
+ }
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MacAllocation.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MacAllocation.cpp
new file mode 100644
index 0000000..193ddd7
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MacAllocation.cpp
@@ -0,0 +1,1385 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MacAllocation.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#include "RlcMacTask.h"
+#include "Rlc_mac/RlcMacIntf.h"
+#include "dsp/dsphmsg.h"
+#include "ril3/ril3_common.h"
+#include "Grr/grr_intf.h"
+#include "bssgp\bssgp_unitdata.h"
+#include "MsgPacketAccessReject.h"
+#include "MsgPacketUplinkAssignment.h"
+#include "MsgPacketDownlinkAssignment.h"
+
+extern void sendDsp(unsigned char *buffer, int len);
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::ULSingleBlockAllocation
+**
+** PURPOSE: Perform uplink single block allocation. An IMMEDIATE ASSIGNMENT
+** message will be constructed and sent over the AGCH found on the BCCH.
+** A single block allocation does not require a TBF to be created and
+** therefore no MAC scheduling will occur. The single block will simply
+** be granted.
+**
+** Because the host has no knowledge of frame numbers the DSP will fill
+** in the starting time IE.
+**
+** INPUT PARAMETERS: chanReq - decoded channel request
+** msgReq - original layer 1 message request
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::ULSingleBlockAllocation(T_CNI_RIL3RRM_MSG_CHANNEL_REQUEST *chanReq,
+ T_CNI_RIL3MD_RRM_MSG *msgReq)
+{
+ DBG_FUNC("RlcMacTask::SingleBlockAllocation", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ DBG_TRACE("RLC/MAC: Attempting to establish a new uplink TBF using Single block allocation access\n");
+
+ int trx, ts;
+ // Build an immediate assignment for a single block assigment.
+ T_CNI_LAPDM_L3MessageUnit l3Msg;
+ T_CNI_RIL3RRM_MSG ril3RrMsg;
+
+ // Call the scheduler to get a timeslot and trx. If resources are available
+ // then send an IMMEDIATE ASSIGNMENT otherwise send an IMMEDIATE ASSIGNMENT REJECT.
+ if (ULSingleBlockRequest(&trx, &ts))
+ {
+ T_CNI_RIL3RRM_MSG_IMMEDIATE_ASSIGNMENT *pImmAsgnMsg = &ril3RrMsg.immediateAssignment;
+ unsigned char tsc;
+ unsigned short arfcn;
+
+ bzero((char *)&ril3RrMsg, sizeof(T_CNI_RIL3RRM_MSG));
+
+ // Populate header
+ pImmAsgnMsg->header.protocol_descriminator = CNI_RIL3_PD_RRM;
+ pImmAsgnMsg->header.si_ti = 0;
+ pImmAsgnMsg->header.message_type = CNI_RIL3RRM_MSGID_IMMEDIATE_ASSIGNMENT;
+
+ // Populate Page Mode
+ pImmAsgnMsg->pageMode.ie_present = TRUE;
+ pImmAsgnMsg->pageMode.pm = CNI_RIL3_NORMAL_PAGING;
+
+ // Populate Dedicated Mode or TBF
+ pImmAsgnMsg->dmtbf.td_bit = 1;
+ pImmAsgnMsg->dmtbf.downlink_bit = 0;
+ pImmAsgnMsg->dmtbf.tma_bit = 0;
+
+ // Populate Packet Channel Description
+ pImmAsgnMsg->packetChannelDescription.ie_present = TRUE;
+ // Call GRR to get tsc and arfcn.
+ tsc = grr_GetTrxSlotTsc(trx, ts);
+ arfcn = grr_GetTrxSlotArfcn(trx, ts);
+
+ pImmAsgnMsg->packetChannelDescription.TN = ts;
+ pImmAsgnMsg->packetChannelDescription.TSC = tsc;
+ pImmAsgnMsg->packetChannelDescription.hopping_indicator = CNI_RIL3_PCD_HOPPING_INDICATOR_NO_HOPPING;
+ pImmAsgnMsg->packetChannelDescription.arfcn = arfcn;
+ pImmAsgnMsg->packetChannelDescription.change_mark_1_selector = FALSE;
+
+ // Populate Request Reference
+ pImmAsgnMsg->reqReference.ie_present = TRUE;
+ pImmAsgnMsg->reqReference.randomAccessInfo = msgReq->l3_data.buffer[0];
+ pImmAsgnMsg->reqReference.T1 = (msgReq->l3_data.buffer[1]>>3) & 0x1f;
+ pImmAsgnMsg->reqReference.T2 = (msgReq->l3_data.buffer[2]) & 0x1f;
+ pImmAsgnMsg->reqReference.T3 = ((msgReq->l3_data.buffer[1]<<3) & 0x38) |
+ ((msgReq->l3_data.buffer[2]>>5) & 0x07);
+
+ // Populate Timing Advance
+ pImmAsgnMsg->timingAdvance.ie_present = TRUE;
+ pImmAsgnMsg->timingAdvance.value = msgReq->l3_data.buffer[3];
+
+ // Populate Mobile Allocation
+ // NOTE: Frequency hopping not used so set length to zero
+ pImmAsgnMsg->mobileAllocation.ie_present = TRUE;
+ pImmAsgnMsg->mobileAllocation.numRFfreq = 0;
+
+ // Populate Starting Time
+ // NOTE: Starting time for packet data is set in the IA Rest Octets
+ pImmAsgnMsg->startingTime.ie_present = FALSE;
+
+ // Populate IA Rest Octets
+ pImmAsgnMsg->iaRestOctets.ie_present = TRUE;
+ pImmAsgnMsg->iaRestOctets.p = CNI_RIL3_PACKET_ASSIGNMENT_UPLINK;
+ pImmAsgnMsg->iaRestOctets.pua.is_multi_block_allocation = FALSE;
+ pImmAsgnMsg->iaRestOctets.pua.sba.is_alpha_present = TRUE;
+ pImmAsgnMsg->iaRestOctets.pua.sba.alpha = 0xa; // 1.0
+ pImmAsgnMsg->iaRestOctets.pua.sba.gamma = 0x16; // 44dbm
+ pImmAsgnMsg->iaRestOctets.pua.sba.flag_pbp = FALSE;
+ // NOTE: No valid starting time set here. DSP will fill this in later.
+
+ DBG_TRACE("RLC/MAC: Sending uplink single block allocation trx(%d) ts(%d).\n",
+ trx, ts);
+ }
+ // Send IMMEDIATE ASSIGNMENT REJECT.
+ else
+ {
+ T_CNI_RIL3RRM_MSG_IMMEDIATE_ASSIGNMENT_REJECT *pImmAsgnMsgRej =
+ &ril3RrMsg.immediateAssignmentReject;
+ unsigned char tsc;
+ unsigned short arfcn;
+
+ bzero((char *)&ril3RrMsg, sizeof(T_CNI_RIL3RRM_MSG));
+
+ // Populate header
+ pImmAsgnMsgRej->header.protocol_descriminator = CNI_RIL3_PD_RRM;
+ pImmAsgnMsgRej->header.si_ti = 0;
+ pImmAsgnMsgRej->header.message_type = CNI_RIL3RRM_MSGID_IMMEDIATE_ASSIGNMENT_REJECT;
+
+ // Populate Page Mode
+ pImmAsgnMsgRej->pageMode.ie_present = TRUE;
+ pImmAsgnMsgRej->pageMode.pm = CNI_RIL3_NORMAL_PAGING;
+
+ for (int i=0; i < 4; i++)
+ {
+ // Populate Request Reference
+ pImmAsgnMsgRej->reqReference[i].ie_present = TRUE;
+ pImmAsgnMsgRej->reqReference[i].randomAccessInfo = chanReq->randomReference;
+ pImmAsgnMsgRej->reqReference[i].T1 = (msgReq->l3_data.buffer[1]>>3) & 0x1f;
+ pImmAsgnMsgRej->reqReference[i].T2 = (msgReq->l3_data.buffer[2]) & 0x1f;
+ pImmAsgnMsgRej->reqReference[i].T3 = ((msgReq->l3_data.buffer[1]<<3) & 0x38) |
+ ((msgReq->l3_data.buffer[2]>>5) & 0x07);
+
+ // Populate Wait Indication
+ pImmAsgnMsgRej->waitIndication[i].ie_present = TRUE;
+ pImmAsgnMsgRej->waitIndication[i].T3122 = 5; // T3142
+ }
+
+ DBG_TRACE("RLC/MAC: No resources available sending IMMEDIATE ASSIGN REJECT.\n");
+ }
+
+ //Call RR message encoding functionality
+ T_CNI_RIL3_RESULT ril3Result = CNI_RIL3RRM_Encode( &ril3RrMsg, &l3Msg);
+
+ if (ril3Result == CNI_RIL3_RESULT_SUCCESS)
+ {
+ // Build DSP message and send it
+ unsigned char dspMsg[L1RM_MAXMSG_LEN];
+ int length = 4; // Skip the length field for now
+ dspMsg[length++] = RR_MANAGE_MSG;
+ dspMsg[length++] = PH_DATA_REQ>>8; // msb
+ dspMsg[length++] = PH_DATA_REQ; // lsb
+ dspMsg[length++] = 0; // always TRX 0
+ dspMsg[length++] = 0x90; // AGCH
+ dspMsg[length++] = 28;
+ dspMsg[length++] = 0x20; // void link
+ memcpy(&dspMsg[length], l3Msg.buffer, l3Msg.msgLength);
+ length += l3Msg.msgLength - 4;
+ dspMsg[3] = length>>24;
+ dspMsg[2] = length>>16;
+ dspMsg[1] = length>>8;
+ dspMsg[0] = length;
+
+ PostL3SendMsLog( &l3Msg );
+ sendDsp(dspMsg, length+4);
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessChanReq: RIL3 ImmediateAssignReject encode failed\n");
+ status = JC_INVALID_MSG;
+ }
+
+ DBG_LEAVE();
+ return(status);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::ULOnePhaseAllocation
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: chanReq - decoded channel request
+** msgReq - original layer 1 message request
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::ULOnePhaseAllocation(T_CNI_RIL3RRM_MSG_CHANNEL_REQUEST *chanReq,
+ T_CNI_RIL3MD_RRM_MSG *msgReq)
+ {
+ DBG_FUNC("RlcMacTask::ULOnePhaseAllocation", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+ IeAccessType accessType;
+ IeTLLI tlli;
+ IeChannelRequestDescription chanReqDesc;
+ IeMSRadioAccessCapability radioAccessCapability;
+
+ DBG_TRACE("RLC/MAC: Attempting to establish a new uplink TBF using One-phase access\n");
+
+ ULTbf *pUlTbf;
+
+ // For now just use a dummy tlli.
+ tlli.SetTLLI(0x12345678);
+
+ // Find an unused TBF object.
+ pUlTbf = tbfPool.EstablishULTbf(&accessType, &tlli, &chanReqDesc, &radioAccessCapability);
+
+ // If an uplink TBF is available attempt to allocate the requested resources.
+ if (pUlTbf)
+ {
+ // Request resources from the scheduler. If resources are
+ // available send an IMMEDIATE ASSIGNMENT message..
+ if (ULResourceRequest(pUlTbf))
+ {
+ DBG_TRACE("RLC/MAC: Uplink TBF resources allocated\n");
+ pUlTbf->rlcLink.UpdateTSSpecificData();
+ SendULActivationMsg(pUlTbf);
+ ULCCCHImmediateAssignment(pUlTbf, chanReq, msgReq);
+ // Kick start RTS mechanism.
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (pUlTbf->allocatedTs[i])
+ {
+ RlcMacTask::theRlcMacTask->SendDownlinkDummyControlBlock(pUlTbf->trx, i);
+ }
+ }
+ }
+ // If no resources are available then send an IMMEDIATE ASSIGN REJECT message.
+ else
+ {
+ DBG_TRACE("RLC/MAC: NO uplink resources available...rejecting access!!\n");
+ pUlTbf->ReleaseULTbf();
+ }
+ }
+ // If no uplink TBF is available then send an IMMEDIATE ASSIGN REJECT message.
+ else
+ {
+ DBG_TRACE("RLC/MAC: NO uplink TBF available...rejecting access!!\n");
+ }
+
+ DBG_LEAVE();
+ return(status);
+ }
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::ULCCCHImmediateAssignment
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: pUlTbf - uplink TBF
+** chanReq - decoded channel request
+** msgReq - original layer 1 message request
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::ULCCCHImmediateAssignment(ULTbf *pUlTbf,
+ T_CNI_RIL3RRM_MSG_CHANNEL_REQUEST *chanReq, T_CNI_RIL3MD_RRM_MSG *msgReq)
+{
+ DBG_FUNC("RlcMacTask::ULCCCHImmediateAssignment", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ // Build an immediate assignment for an uplink TBF.
+ T_CNI_LAPDM_L3MessageUnit l3Msg;
+ T_CNI_RIL3RRM_MSG ril3RrMsg;
+ T_CNI_RIL3RRM_MSG_IMMEDIATE_ASSIGNMENT *pImmAsgnMsg = &ril3RrMsg.immediateAssignment;
+
+ bzero((char *)&ril3RrMsg, sizeof(T_CNI_RIL3RRM_MSG));
+
+ // Populate header
+ pImmAsgnMsg->header.protocol_descriminator = CNI_RIL3_PD_RRM;
+ pImmAsgnMsg->header.si_ti = 0;
+ pImmAsgnMsg->header.message_type = CNI_RIL3RRM_MSGID_IMMEDIATE_ASSIGNMENT;
+
+ // Populate Page Mode
+ pImmAsgnMsg->pageMode.ie_present = TRUE;
+ pImmAsgnMsg->pageMode.pm = CNI_RIL3_NORMAL_PAGING;
+
+ // Populate Dedicated Mode or TBF
+ pImmAsgnMsg->dmtbf.td_bit = 1;
+ pImmAsgnMsg->dmtbf.downlink_bit = 1;
+ pImmAsgnMsg->dmtbf.tma_bit = 0;
+
+ // Populate Packet Channel Description
+ pImmAsgnMsg->packetChannelDescription.ie_present = TRUE;
+ unsigned char tsc;
+ unsigned short arfcn;
+ int ts;
+
+ // Find the allocated TS.
+ for (int i=0; i < MAX_TIMESLOTS; i++)
+ {
+ if (pUlTbf->allocatedTs[i] == TRUE)
+ {
+ ts = i;
+ }
+ }
+ // Call GRR to get tsc and arfcn.
+ tsc = grr_GetTrxSlotTsc(pUlTbf->trx, ts);
+ arfcn = grr_GetTrxSlotArfcn(pUlTbf->trx, ts);
+
+ pImmAsgnMsg->packetChannelDescription.TN = ts;
+ pImmAsgnMsg->packetChannelDescription.TSC = tsc;
+ pImmAsgnMsg->packetChannelDescription.hopping_indicator = CNI_RIL3_PCD_HOPPING_INDICATOR_NO_HOPPING;
+ pImmAsgnMsg->packetChannelDescription.arfcn = arfcn;
+ pImmAsgnMsg->packetChannelDescription.change_mark_1_selector = FALSE;
+
+ // Populate Request Reference
+ pImmAsgnMsg->reqReference.ie_present = TRUE;
+ pImmAsgnMsg->reqReference.randomAccessInfo = msgReq->l3_data.buffer[0];
+ pImmAsgnMsg->reqReference.T1 = (msgReq->l3_data.buffer[1]>>3) & 0x1f;
+ pImmAsgnMsg->reqReference.T2 = (msgReq->l3_data.buffer[2]) & 0x1f;
+ pImmAsgnMsg->reqReference.T3 = ((msgReq->l3_data.buffer[1]<<3) & 0x38) |
+ ((msgReq->l3_data.buffer[2]>>5) & 0x07);
+
+ // Populate Timing Advance
+ // This IE will be invalidated by the IA Rest Octets
+ pImmAsgnMsg->timingAdvance.ie_present = TRUE;
+ pImmAsgnMsg->timingAdvance.value = 0;
+
+ // Populate Mobile Allocation
+ // NOTE: Frequency hopping not used so set length to zero
+ pImmAsgnMsg->mobileAllocation.ie_present = TRUE;
+ pImmAsgnMsg->mobileAllocation.numRFfreq = 0;
+
+ // Populate Starting Time
+ // NOTE: Starting time for packet data is set in the IA Rest Octets
+ pImmAsgnMsg->startingTime.ie_present = FALSE;
+
+ // Populate IA Rest Octets
+ pImmAsgnMsg->iaRestOctets.ie_present = TRUE;
+ pImmAsgnMsg->iaRestOctets.p = CNI_RIL3_PACKET_ASSIGNMENT_UPLINK;
+ pImmAsgnMsg->iaRestOctets.pua.is_multi_block_allocation = TRUE;
+ pImmAsgnMsg->iaRestOctets.pua.mba.tfi_assignment = pUlTbf->tfi.GetTFI();
+ pImmAsgnMsg->iaRestOctets.pua.mba.polling = FALSE;
+ pImmAsgnMsg->iaRestOctets.pua.mba.is_fix_allocation = FALSE;
+ pImmAsgnMsg->iaRestOctets.pua.mba.da.usf = pUlTbf->usf[ts];
+ pImmAsgnMsg->iaRestOctets.pua.mba.da.usf_granularity = 0;
+ pImmAsgnMsg->iaRestOctets.pua.mba.da.flag_pp = FALSE;
+ pImmAsgnMsg->iaRestOctets.pua.mba.channel_coding_command = 0;
+ pImmAsgnMsg->iaRestOctets.pua.mba.tlli_block_channel_coding = 0;
+ pImmAsgnMsg->iaRestOctets.pua.mba.is_alpha_present = TRUE;
+ pImmAsgnMsg->iaRestOctets.pua.mba.alpha = 0xa; // 1.0
+ pImmAsgnMsg->iaRestOctets.pua.mba.gamma = 0x16; // 44dbm
+ pImmAsgnMsg->iaRestOctets.pua.mba.is_timing_advance_index_present = TRUE;
+ pImmAsgnMsg->iaRestOctets.pua.mba.timing_advance_index = pUlTbf->tai;
+ pImmAsgnMsg->iaRestOctets.pua.mba.is_tbf_starting_time_present = FALSE;
+ pImmAsgnMsg->iaRestOctets.pua.mba.tbf_starting_time = 0;
+ // NOTE: No valid starting time set here. DSP will fill this in later.
+
+ //Call RR message encoding functionality
+ T_CNI_RIL3_RESULT ril3Result = CNI_RIL3RRM_Encode( &ril3RrMsg, &l3Msg);
+
+ if (ril3Result == CNI_RIL3_RESULT_SUCCESS)
+ {
+ // Build DSP message and send it
+ unsigned char dspMsg[L1RM_MAXMSG_LEN];
+ int length = 4; // Skip the length field for now
+ dspMsg[length++] = RR_MANAGE_MSG;
+ dspMsg[length++] = PH_DATA_REQ>>8; // msb
+ dspMsg[length++] = PH_DATA_REQ; // lsb
+ dspMsg[length++] = 0; // always TRX 0
+ dspMsg[length++] = 0x90; // AGCH
+ dspMsg[length++] = 28;
+ dspMsg[length++] = 0x20; // void link
+ memcpy(&dspMsg[length], l3Msg.buffer, l3Msg.msgLength);
+ length += l3Msg.msgLength - 4;
+ dspMsg[3] = length>>24;
+ dspMsg[2] = length>>16;
+ dspMsg[1] = length>>8;
+ dspMsg[0] = length;
+
+ PostL3SendMsLog( &l3Msg );
+ sendDsp(dspMsg, length+4);
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessChanReq: RIL3 ImmediateAssign encode failed\n");
+ status = JC_INVALID_MSG;
+ }
+
+ DBG_LEAVE();
+ return(status);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::AllocateULResources
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: msg - Packet Resource Request Message
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::AllocateULResources(MsgPacketResourceRequest &msg,
+ int trx, int ts)
+ {
+ DBG_FUNC("RlcMacTask::AllocateULResources", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ // First check to see if an uplink TBF is not already ongoing. This is
+ // determined by the MS sending the uplink TFI as its identity.
+ if (msg.globalTfi.IsValid())
+ {
+ DBG_TRACE("RLC/MAC: Attempting to allocate uplink resources tfi(%#x)\n", msg.globalTfi.GetGlobalTFI());
+ // Uplink TBF already established so try and reallocate resources.
+ if (msg.globalTfi.GetGlobalTFIType() == IeGlobalTFI::UPLINK_TFI)
+ {
+ // Try and reallocate resources.
+ ULTbf *pUlTbf = tbfPool.FindULTbf(msg.globalTfi);
+ if (pUlTbf)
+ {
+ pUlTbf->ReallocateTbf(&msg.accessType, &msg.chanReqDescription, &msg.msRadioAccessCapability);
+ if (ULResourceReallocRequest(pUlTbf))
+ {
+ DBG_TRACE("RLC/MAC: Uplink TBF resources reallocated tfi(%3x)", msg.globalTfi.GetGlobalTFI());
+ pUlTbf->rlcLink.UpdateTSSpecificData();
+ SendULReconfigurationMsg(pUlTbf);
+ SendPacketUplinkAssignment(trx, ts, pUlTbf, &msg.globalTfi, MS_ID_GLOBAL_TFI);
+ }
+ // If no resources are available then send a PACKET ACCESS REJECT message.
+ else
+ {
+ DBG_TRACE("RLC/MAC: NO uplink resources available...rejecting access!! tfi(%#x)\n",
+ msg.globalTfi.GetGlobalTFI());
+ SendPacketAccessReject(trx, ts, &msg.globalTfi, MS_ID_GLOBAL_TFI);
+ }
+ }
+ else
+ {
+ DBG_TRACE("RLC/MAC: Can't find uplink TBF...rejecting access!! tfli(%#x)\n",
+ msg.globalTfi.GetGlobalTFI());
+ SendPacketAccessReject(trx, ts, &msg.globalTfi, MS_ID_GLOBAL_TFI);
+ }
+ }
+ // Downlink TBF already established.
+ else
+ {
+ DBG_TRACE("RLC/MAC: Attempting to establish a new uplink TBF, downlink TBF exists tfi(%#x)\n",
+ msg.globalTfi.GetGlobalTFI());
+ DLTbf *pDlTbf = tbfPool.FindDLTbf(msg.globalTfi);
+ if (pDlTbf)
+ {
+ ULTbf *pUlTbf = tbfPool.EstablishULTbf(&msg.accessType, &pDlTbf->tlli,
+ &msg.chanReqDescription, &msg.msRadioAccessCapability);
+ if (pUlTbf)
+ {
+ // Request resources from the scheduler. If resources are
+ // available send a PACKET UPLINK ASSIGNMENT message.
+ if (ULResourceRequest(pUlTbf, pDlTbf))
+ {
+ DBG_TRACE("RLC/MAC: Uplink TBF resources allocated tfi(%#x)\n",
+ msg.globalTfi.GetGlobalTFI());
+ pUlTbf->rlcLink.UpdateTSSpecificData();
+ SendULActivationMsg(pUlTbf);
+ SendPacketUplinkAssignment(trx, ts, pUlTbf, &msg.globalTfi, MS_ID_GLOBAL_TFI);
+ }
+ // If no resources are available then send a PACKET ACCESS REJECT message.
+ else
+ {
+ DBG_TRACE("RLC/MAC: NO uplink resources available...rejecting access!! tfi(%#x)\n",
+ msg.globalTfi.GetGlobalTFI());
+ SendPacketAccessReject(trx, ts, &msg.globalTfi, MS_ID_GLOBAL_TFI);
+ pUlTbf->ReleaseULTbf();
+ }
+ }
+ else
+ {
+ DBG_TRACE("RLC/MAC: NO uplink TBF available...rejecting access!! tfi(%#x)\n",
+ msg.globalTfi.GetGlobalTFI());
+ SendPacketAccessReject(trx, ts, &msg.globalTfi, MS_ID_GLOBAL_TFI);
+ }
+ }
+ else
+ {
+ DBG_TRACE("RLC/MAC: Can't find downlink TBF...rejecting access!! tfi(%#x)\n",
+ msg.globalTfi.GetGlobalTFI());
+ SendPacketAccessReject(trx, ts, &msg.globalTfi, MS_ID_GLOBAL_TFI);
+ }
+ }
+ }
+ else
+ {
+ DBG_TRACE("RLC/MAC: Attempting to establish a new uplink TBF, no downlink TBF tlli(%#x)\n",
+ msg.tlli.GetTLLI());
+
+ ULTbf *pUlTbf;
+
+ // If we got a request with a TLLI and one exists then it must be a stale TBF.
+ // For this case we will release the TBF immediately.
+ if ((pUlTbf = tbfPool.FindULTbf((unsigned long)msg.tlli.GetTLLI())))
+ {
+ pUlTbf->ReleaseULTbf();
+ }
+
+ // Find an unused TBF object.
+ pUlTbf = tbfPool.EstablishULTbf(&msg.accessType, &msg.tlli,
+ &msg.chanReqDescription, &msg.msRadioAccessCapability);
+
+ // If an uplink TBF is available attempt to allocate the requested resources.
+ if (pUlTbf)
+ {
+ // Request resources from the scheduler. If resources are
+ // available send a PACKET UPLINK ASSIGNMENT message..
+ if (ULResourceRequest(pUlTbf))
+ {
+ DBG_TRACE("RLC/MAC: Uplink TBF resources allocated tlli(%#x)\n", msg.tlli.GetTLLI());
+ pUlTbf->rlcLink.UpdateTSSpecificData();
+ SendULActivationMsg(pUlTbf);
+ SendPacketUplinkAssignment(trx, ts, pUlTbf, &msg.tlli, MS_ID_TLLI);
+ }
+ // If no resources are available then send a PACKET ACCESS REJECT message.
+ else
+ {
+ DBG_TRACE("RLC/MAC: NO uplink resources available...rejecting access!! tlli(%#x)\n",
+ msg.tlli.GetTLLI());
+ SendPacketAccessReject(trx, ts, &msg.tlli, MS_ID_TLLI);
+ pUlTbf->ReleaseULTbf();
+ }
+ }
+ // If no uplink TBF is available then send a PACKET ACCESS REJECT message.
+ else
+ {
+ DBG_TRACE("RLC/MAC: NO uplink TBF available...rejecting access!! tlli(%#x)\n",
+ msg.tlli.GetTLLI());
+ SendPacketAccessReject(trx, ts, &msg.tlli, MS_ID_TLLI);
+ }
+ }
+
+ DBG_LEAVE();
+ return(status);
+ }
+
+
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendPacketAccessReject
+**
+** PURPOSE: Build and transmit a Packet Access Reject message.
+**
+** INPUT PARAMETERS: trx - trx to transmit message
+** ts - timeslot to transmit message
+** pIe - pointer to the IE containing the MS id
+** idType - type of MS id (TLLI, Global TFI)
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::SendPacketAccessReject(int trx, int ts, IeBase *pIe,
+ MS_ID_TYPE idType)
+{
+ DBG_FUNC("RlcMacTask::SendPacketAccessReject", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ DLMacHeader rejMsgHdr;
+ MsgPacketAccessReject rejMsg;
+
+ // Assemble RLC/MAC header.
+ rejMsgHdr.SetPayloadType(DLMacHeader::RLC_CTRL_BLOCK_NO_OPT_OCTETS);
+ // For Packet Access Reject RRBP is ignored by the MS so just set it to anything.
+ rejMsgHdr.SetRRBP(DLMacHeader::FN_N_13);
+ rejMsgHdr.SetSPBit(DLMacHeader::RRBP_NOT_VALID);
+ // USF will be filled in later.
+
+ // Assemble Packet Access Reject.
+ rejMsg.pageMode.SetPageMode(IePageMode::NORMAL_PAGING);
+ switch (idType)
+ {
+ case MS_ID_TLLI:
+ {
+ rejMsg.reject.tlli = *(IeTLLI *)pIe;
+ }
+ break;
+ case MS_ID_GLOBAL_TFI:
+ {
+ rejMsg.reject.globalTFI = *(IeGlobalTFI *)pIe;
+ }
+ break;
+ }
+
+ rejMsg.reject.isValid = TRUE;
+ rejMsg.additionalReject.isValid = FALSE;
+
+ if ((status = SendPacchMsg(trx, ts, &rejMsgHdr, &rejMsg, CTL_ACK_TAG_NOT_APPLICABLE,
+ RLC_MAC_NORMAL_BURST)) != JC_OK)
+ {
+ DBG_WARNING("RlcMacTask::SendPacketAccessReject: failed %#x\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return(status);
+ }
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendPacketUplinkAssignment
+**
+** PURPOSE: Build and transmit a Packet Uplink Assignment message.
+**
+** INPUT PARAMETERS: trx - trx to transmit message
+** ts - timeslot to transmit message
+** pUlTbf - pointer to the uplink tbf
+** pIe - pointer to the IE containing the MS id
+** idType - type of MS id (TLLI, Global TFI)
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::SendPacketUplinkAssignment(int trx, int ts, ULTbf *pUlTbf,
+ IeBase *pIe, MS_ID_TYPE idType)
+ {
+ DBG_FUNC("RlcMacTask::SendPacketUplinkAssignment", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ DLMacHeader asnMsgHdr;
+ MsgPacketUplinkAssignment asnMsg;
+
+ // Assemble RLC/MAC header.
+ asnMsgHdr.SetPayloadType(DLMacHeader::RLC_CTRL_BLOCK_NO_OPT_OCTETS);
+ // RRBP will not be valid so just set it to anything.
+ asnMsgHdr.SetRRBP(DLMacHeader::FN_N_13);
+ asnMsgHdr.SetSPBit(DLMacHeader::RRBP_NOT_VALID);
+ // USF will be filled in later.
+
+ // Assemble Packet Uplink Assignment.
+ asnMsg.pageMode.SetPageMode(IePageMode::NORMAL_PAGING);
+ switch (idType)
+ {
+ case MS_ID_TLLI:
+ {
+ asnMsg.tlli = *(IeTLLI *)pIe;
+ }
+ break;
+ case MS_ID_GLOBAL_TFI:
+ {
+ asnMsg.globalTFI = *(IeGlobalTFI *)pIe;
+ }
+ break;
+ }
+ asnMsg.chanCoding.SetChannelCodingCommand(IeChannelCodingCommand::CS_1);
+ asnMsg.tlliBlockCoding = MsgPacketUplinkAssignment::USE_COMMANDED_CS_FOR_DATA_BLOCK_WITH_TLLI;
+ asnMsg.timingAdvance.SetPacketTimingAdvance(pUlTbf->tai, pUlTbf->taiTs);
+ // Call GRR to get frequency parameters.
+ unsigned char tsc;
+ unsigned short arfcn;
+ tsc = grr_GetTrxSlotTsc(trx, ts);
+ arfcn = grr_GetTrxSlotArfcn(trx, ts);
+
+ asnMsg.frequencyParameters.tsc.SetTSC(tsc);
+ asnMsg.frequencyParameters.arfcn.SetARFCN(arfcn);
+ asnMsg.frequencyParameters.SetFrequencyParameters();
+
+ asnMsg.dynamicAllocation.allocType = DynamicAllocationStruct::DYNAMIC_ALLOCATION;
+ asnMsg.dynamicAllocation.usfGranularity = DynamicAllocationStruct::ONE_RLC_MAC_BLOCK;
+ asnMsg.dynamicAllocation.uplinkTFI = pUlTbf->tfi;
+ //asnMsg.dynamicAllocation.startTime.SetStartFrameNum(RELATIVE_START_TIME_VAL);
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (pUlTbf->allocatedTs[i] == TRUE)
+ {
+ asnMsg.dynamicAllocation.timeslotAllocationWithPower.tsAllocWithPowerEntry[i].usf = pUlTbf->usf[i];
+ asnMsg.dynamicAllocation.timeslotAllocationWithPower.tsAllocWithPowerEntry[i].gamma = 0x16;
+ asnMsg.dynamicAllocation.timeslotAllocationWithPower.tsAllocWithPowerEntry[i].isValid = TRUE;
+ }
+ else
+ {
+ asnMsg.dynamicAllocation.timeslotAllocationWithPower.tsAllocWithPowerEntry[i].isValid = FALSE;
+ }
+ asnMsg.dynamicAllocation.timeslotAllocationWithPower.alpha = 0xa; // 1.0
+ asnMsg.dynamicAllocation.timeslotAllocationWithPower.isValid = TRUE;
+ }
+
+ asnMsg.dynamicAllocation.isValid = TRUE;
+
+ if ((status = SendPacchMsg(trx, ts, &asnMsgHdr, &asnMsg, CTL_ACK_TAG_NOT_APPLICABLE,
+ RLC_MAC_NORMAL_BURST)) != JC_OK)
+ {
+ DBG_WARNING("RlcMacTask::SendPacketUplinkAssignment: failed %#x\n",
+ status);
+ }
+
+ // Now make sure the RTS mechanism is triggered for all allocated timeslots.
+ for (i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (pUlTbf->allocatedTs[i])
+ {
+ if (!(RlcMacTask::theRlcMacTask->SendDownlinkDataBlock(pUlTbf->trx, i)))
+ {
+ RlcMacTask::theRlcMacTask->SendDownlinkDummyControlBlock(pUlTbf->trx, i);
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return(status);
+ }
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendPacketTBFRelease
+**
+** PURPOSE: Build and transmit a Pacet TBF Release message.
+**
+** INPUT PARAMETERS: pDlTbf - pointer to downlink TBF
+** pUlTbf - pointer to uplink TBF
+** cause - tbf release cause (normal or abnormal)
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::SendPacketTBFRelease(DLTbf *pDlTbf, ULTbf *pUlTbf,
+ MsgPacketTBFRelease::TBF_RELEASE_CAUSE cause)
+{
+ DBG_FUNC("RlcMacTask::SendPacketTBFRelease", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ DLMacHeader relMsgHdr;
+ MsgPacketTBFRelease relMsg;
+ int trx, ts;
+
+ // Assemble RLC/MAC header.
+ relMsgHdr.SetPayloadType(DLMacHeader::RLC_CTRL_BLOCK_NO_OPT_OCTETS);
+ // For Packet Access Reject RRBP is ignored by the MS so just set it to anything.
+ relMsgHdr.SetRRBP(DLMacHeader::FN_N_13);
+ relMsgHdr.SetSPBit(DLMacHeader::RRBP_NOT_VALID);
+ // USF will be filled in later.
+
+ // Assemble Packet Access Reject.
+ relMsg.pageMode.SetPageMode(IePageMode::NORMAL_PAGING);
+
+ // If the uplink TBF is valid then send on the PACCH of the uplink.
+ if (pUlTbf)
+ {
+ relMsg.globalTFI.SetGlobalTFI(pUlTbf->tfi.GetTFI(), IeGlobalTFI::UPLINK_TFI);
+ relMsgHdr.SetTFI(pUlTbf->tfi.GetTFI());
+ relMsgHdr.SetDirectionBit(DLMacHeader::UPLINK_TBF);
+ TSSelectionRequest(&trx, &ts, pUlTbf);
+ relMsg.uplinkRel = MsgPacketTBFRelease::TBF_RELEASED;
+ relMsg.downlinkRel = MsgPacketTBFRelease::TBF_NOT_RELEASED;
+ }
+ else
+ {
+ relMsg.globalTFI.SetGlobalTFI(pDlTbf->tfi.GetTFI(), IeGlobalTFI::DOWNLINK_TFI);
+ relMsgHdr.SetTFI(pDlTbf->tfi.GetTFI());
+ relMsgHdr.SetDirectionBit(DLMacHeader::DOWNLINK_TBF);
+ TSSelectionRequest(&trx, &ts, pDlTbf);
+ relMsg.uplinkRel = MsgPacketTBFRelease::TBF_NOT_RELEASED;
+ relMsg.downlinkRel = MsgPacketTBFRelease::TBF_RELEASED;
+ }
+
+ relMsg.relCause = cause;
+
+ if ((status = SendPacchMsg(trx, ts, &relMsgHdr, &relMsg, CTL_ACK_TAG_NOT_APPLICABLE,
+ RLC_MAC_NORMAL_BURST)) != JC_OK)
+ {
+ DBG_WARNING("RlcMacTask::SendPacketTBFRelease: failed %#x\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return(status);
+ }
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::CheckDLMsgQueues
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: pUnitDataMsg - BSSGP unit data message
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::CheckDLMsgQueues()
+{
+ DBG_FUNC("RlcMacTask::CheckDLMsgQueues", RLC_MAC);
+ DBG_ENTER();
+ JC_STATUS status = JC_OK;
+ BSSGP_DL_UNITDATA_MSG *pDlUnitData;
+ bool queueNotEmpty;
+ unsigned long firstTlli;
+
+ for (int qos = BSSGP_NETWORK_QOS_LEVEL_1; qos < BSSGP_MAX_NETWORK_QOS_LEVELS; qos++)
+ {
+ queueNotEmpty = bssgp_udt_check_buff_by_qos((BSSGP_NETWORK_QOS_LEVEL)qos, &pDlUnitData);
+ if (queueNotEmpty)
+ {
+ firstTlli = pDlUnitData->tlli.tlli;
+ }
+ while (queueNotEmpty)
+ {
+ // If we have run out of resources then quit.
+ if (AllocateDLResources(pDlUnitData) == RESOURCES_UNAVAILABLE) break;
+
+ // Check next tlli at current QOS level.
+ queueNotEmpty = bssgp_udt_check_buff_by_qos((BSSGP_NETWORK_QOS_LEVEL)qos, &pDlUnitData);
+
+ // If we circled around to the same tlli then quit.
+ if (firstTlli == pDlUnitData->tlli.tlli) break;
+ }
+ }
+ DBG_LEAVE();
+ return(status);
+ }
+
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::AllocateDLResources
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: pUnitDataMsg - BSSGP unit data message
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+DL_ALLOC_RES RlcMacTask::AllocateDLResources(BSSGP_DL_UNITDATA_MSG *pUnitDataMsg)
+{
+ DBG_FUNC("RlcMacTask::AllocateDLResources", RLC_MAC);
+ DBG_ENTER();
+
+ DL_ALLOC_RES allocRes = RESOURCES_UNAVAILABLE;
+
+ DBG_TRACE("RLC/MAC: Attempting to establish a new downlink TBF - tlli(%#x)\n",
+ pUnitDataMsg->tlli.tlli);
+ // First see if the mobile already has an ongoing TBF.
+ DLTbf *pDlTbf = tbfPool.FindDLTbf((unsigned long)pUnitDataMsg->tlli.tlli);
+ ULTbf *pUlTbf = tbfPool.FindULTbf((unsigned long)pUnitDataMsg->tlli.tlli);
+
+ if (!pDlTbf)
+ {
+ // Try and assign a TBF object for this downlink request. If none are
+ // available then just leave for now. Either we will reattempt later
+ // or the PDU lifetime will expire.
+ pDlTbf = tbfPool.EstablishDLTbf(pUnitDataMsg, FALSE);
+
+ if (pDlTbf)
+ {
+ // No uplink TBF exists so send an IMMEDIATE ASSIGNMENT on the CCCH
+ if (!pUlTbf)
+ {
+
+ // Request only a single PDCH since we must send an IMMEDIATE
+ // ASSIGNMENT. If no resource is available just leave and we
+ // will reattempt later.
+ if ((DLSingleTSResourceRequest(pDlTbf)) && (pDlTbf->rlcLink.GetNextLLCPdu()))
+ {
+ // Let the DSP know about this TBF.
+ pDlTbf->UpdateTSSpecificData();
+ SendDLActivationMsg(pDlTbf);
+ DLCCCHImmediateAssignment(pDlTbf);
+ allocRes = RESOURCES_ALLOCATED;
+ }
+ else
+ {
+ pDlTbf->ReleaseDLTbf(FALSE);
+ }
+ }
+ // If an uplink TBF exists then we can send a DOWNLINK ASSIGNMENT
+ // message on the PACCH. Because we are sending a DOWNLINK ASSIGNEMENT
+ // we can allocate more than one timeslot.
+ else
+ {
+ // Request resources from the scheduler. If resources are
+ // available send a DOWNLINK ASSIGNEMNT on the PACCH. If none are
+ // available then just leave for now. Either we will reattempt later
+ // or the PDU lifetime will expire.
+ if ((DLResourceRequest(pDlTbf, pUlTbf)) && (pDlTbf->rlcLink.GetNextLLCPdu()))
+ {
+ // Let the DSP know about this TBF.
+ pDlTbf->UpdateTSSpecificData();
+ SendDLActivationMsg(pDlTbf);
+ SendPacketDownlinkAssignment(pDlTbf, pUlTbf, FALSE);
+ allocRes = RESOURCES_ALLOCATED;
+ }
+ else
+ {
+ pDlTbf->ReleaseDLTbf(FALSE);
+ }
+ }
+ }
+ }
+ else
+ {
+ // If a downlink TBF is already ongoing and not inactive just leave. If the
+ // TBF is inactive and Timer T3193 is still runnig then a new downlink TBF can
+ // be establish using the old one.
+ if ((pDlTbf->GetTbfState() == Tbf::INACTIVE) && (pDlTbf->rlcLink.IsT3193Running()))
+ {
+ if (pDlTbf->ReestablishDLTbf(pUnitDataMsg, TRUE) == JC_OK)
+ {
+ // Note that the return code from the realloc call does not need to be
+ // checked. Either we get more resources or keep the ones we have. In
+ // either case we need to send a downlink assignment.
+ if (!pUlTbf)
+ {
+ DLResourceReallocRequest(pDlTbf);
+ }
+ else
+ {
+ DLResourceReallocRequest(pDlTbf, pUlTbf);
+ }
+
+ pDlTbf->UpdateTSSpecificData();
+ SendDLReconfigurationMsg(pDlTbf);
+
+ if (pDlTbf->rlcLink.GetNextLLCPdu())
+ {
+ pDlTbf->rlcLink.CancelT3193();
+ SendPacketDownlinkAssignment(pDlTbf, 0, TRUE);
+ allocRes = RESOURCES_ALLOCATED;
+ }
+ else
+ {
+ DBG_WARNING("RLC/MAC: Unable to extract PDU from BSSGP - tlli(%#x)\n",
+ pUnitDataMsg->tlli.tlli);
+ }
+ }
+ }
+ else
+ {
+ allocRes = TBF_ACTIVE;
+ }
+ }
+
+ DBG_LEAVE();
+ return(allocRes);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendPacketDownlinkAssignment
+**
+** PURPOSE: Build and transmit a Packet Downlink Assignment message.
+**
+** INPUT PARAMETERS: pDlTbf - pointer to downlink TBF
+** pUlTbf - pointer to uplink TBF
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::SendPacketDownlinkAssignment(DLTbf *pDlTbf, ULTbf *pUlTbf,
+ bool controlAck)
+ {
+ DBG_FUNC("RlcMacTask::SendPacketDownlinkAssignment", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ DLMacHeader asnMsgHdr;
+ MsgPacketDownlinkAssignment asnMsg;
+ GammaStruct gammas[MAX_NUM_GAMMAS];
+
+ // Assemble RLC/MAC header.
+ asnMsgHdr.SetPayloadType(DLMacHeader::RLC_CTRL_BLOCK_NO_OPT_OCTETS);
+ // RRBP is set.
+ asnMsgHdr.SetRRBP(DLMacHeader::FN_N_13);
+ asnMsgHdr.SetSPBit(DLMacHeader::RRBP_VALID);
+ // USF will be filled in later.
+
+ // Assemble Packet Downlink Assignment.
+ asnMsg.pageMode.SetPageMode(IePageMode::NORMAL_PAGING);
+ // If the uplink TBF is valid then send on the PACCH of the uplink.
+ if (pUlTbf)
+ {
+ asnMsg.globalTFI.SetGlobalTFI(pUlTbf->tfi.GetTFI(), IeGlobalTFI::UPLINK_TFI);
+ asnMsgHdr.SetTFI(pUlTbf->tfi.GetTFI());
+ asnMsgHdr.SetDirectionBit(DLMacHeader::UPLINK_TBF);
+ }
+ else
+ {
+ asnMsg.globalTFI.SetGlobalTFI(pDlTbf->tfi.GetTFI(), IeGlobalTFI::DOWNLINK_TFI);
+ asnMsgHdr.SetTFI(pDlTbf->tfi.GetTFI());
+ asnMsgHdr.SetDirectionBit(DLMacHeader::DOWNLINK_TBF);
+ }
+ asnMsg.macMode.SetMacMode(IeMacMode::DYNAMIC_ALLOCATION);
+ if (pDlTbf->qosProfile.a_bit == RADIO_INT_USES_RLC_MAC_ARQ)
+ {
+ asnMsg.rlcMode.SetRlcMode(IeRlcMode::RLC_ACKNOWLEDGED);
+ }
+ else
+ {
+ asnMsg.rlcMode.SetRlcMode(IeRlcMode::RLC_UNACKNOWLEDGED);
+ }
+ asnMsg.controlAck = controlAck; // Only true if T3192 is running
+
+ unsigned char allocation = 0;
+ unsigned char tsBit = 0x80;
+ unsigned char tsc;
+ unsigned short arfcn;
+
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (pDlTbf->allocatedTs[i] == TRUE)
+ {
+ allocation |= tsBit;
+ // Call GRR to get frequency parameters.
+ tsc = grr_GetTrxSlotTsc(pDlTbf->trx, i);
+ arfcn = grr_GetTrxSlotArfcn(pDlTbf->trx, i);
+
+ // Setup gammas for power control
+ gammas[i].gamma = 0x16;
+ gammas[i].isValid = TRUE;
+ }
+ else
+ {
+ gammas[i].isValid = FALSE;
+ }
+ tsBit >>= 1;
+ }
+ asnMsg.tsAllocation.SetTimeslotAllocation(allocation);
+ asnMsg.timingAdvance.SetPacketTimingAdvance(pDlTbf->tai, pDlTbf->taiTs);
+
+ asnMsg.frequencyParameters.tsc.SetTSC(tsc);
+ asnMsg.frequencyParameters.arfcn.SetARFCN(arfcn);
+ asnMsg.frequencyParameters.SetFrequencyParameters();
+ asnMsg.dlTFIAssignment = pDlTbf->tfi;
+
+ // Power control
+ asnMsg.powerControlParameters.SetPowerControlParameters(0xa, gammas);
+
+ int xmitTs, xmitTrx;
+
+ // If there is an uplink TBF send on the uplink PACCH.
+ if (pUlTbf)
+ {
+ TSSelectionRequest(&xmitTrx, &xmitTs, pUlTbf);
+ }
+ // Otherwise send on the downlink PACCH.
+ else
+ {
+ TSSelectionRequest(&xmitTrx, &xmitTs, pDlTbf);
+ }
+
+ // Setup a control ack tag so that the PACKET CONTROL ACK message can
+ // be connected to this downlink TBF.
+ pDlTbf->SetControlAckTag();
+
+ if ((status = SendPacchMsg(xmitTrx, xmitTs, &asnMsgHdr, &asnMsg, pDlTbf->GetControlAckTag(),
+ RLC_MAC_ACCESS_BURST)) != JC_OK)
+ {
+ DBG_WARNING("RlcMacTask::SendPacketDownlinkAssignment: failed %#x\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return(status);
+ }
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendPacketDownlinkAssignment
+**
+** PURPOSE: Build and transmit a Packet Downlink Assignment message. This
+** version is used for reallocation.
+**
+** INPUT PARAMETERS: pDlTbf - pointer to downlink TBF
+** trx - trx to send assignment
+** ts - timeslot to send assignment
+** controlAck - controlAck indication
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::SendPacketDownlinkAssignment(DLTbf *pDlTbf, int trx, int ts,
+ bool controlAck)
+ {
+ DBG_FUNC("RlcMacTask::SendPacketDownlinkAssignment", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ DLMacHeader asnMsgHdr;
+ MsgPacketDownlinkAssignment asnMsg;
+
+ // Assemble RLC/MAC header.
+ asnMsgHdr.SetPayloadType(DLMacHeader::RLC_CTRL_BLOCK_OPT_OCTETS);
+ // RRBP is set.
+ asnMsgHdr.SetRRBP(DLMacHeader::FN_N_13);
+ asnMsgHdr.SetSPBit(DLMacHeader::RRBP_VALID);
+ asnMsgHdr.SetRBSN(0);
+ asnMsgHdr.SetRTI(0);
+ asnMsgHdr.SetFinalSegment(DLMacHeader::FINAL_SEGMENT);
+ asnMsgHdr.SetAddressControl(DLMacHeader::TFI_D_PRESENT);
+ asnMsgHdr.SetPowerReduction(DLMacHeader::MODEA_NOT_USABLE_OR_MODEB_24_30_DB);
+ // USF will be filled in later.
+
+ // Assemble Packet Downlink Assignment.
+ asnMsg.pageMode.SetPageMode(IePageMode::NORMAL_PAGING);
+
+ asnMsg.globalTFI.SetGlobalTFI(pDlTbf->tfi.GetTFI(), IeGlobalTFI::DOWNLINK_TFI);
+ asnMsgHdr.SetTFI(pDlTbf->tfi.GetTFI());
+ asnMsgHdr.SetDirectionBit(DLMacHeader::DOWNLINK_TBF);
+
+ asnMsg.macMode.SetMacMode(IeMacMode::DYNAMIC_ALLOCATION);
+ if (pDlTbf->qosProfile.a_bit == RADIO_INT_USES_RLC_MAC_ARQ)
+ {
+ asnMsg.rlcMode.SetRlcMode(IeRlcMode::RLC_ACKNOWLEDGED);
+ }
+ else
+ {
+ asnMsg.rlcMode.SetRlcMode(IeRlcMode::RLC_UNACKNOWLEDGED);
+ }
+ asnMsg.controlAck = controlAck; // Only true if T3192 is running
+
+ unsigned char allocation = 0;
+ unsigned char tsBit = 0x80;
+ unsigned char tsc;
+ unsigned short arfcn;
+
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (pDlTbf->allocatedTs[i] == TRUE)
+ {
+ allocation |= tsBit;
+ // Call GRR to get frequency parameters.
+ tsc = grr_GetTrxSlotTsc(pDlTbf->trx, i);
+ arfcn = grr_GetTrxSlotArfcn(pDlTbf->trx, i);
+ }
+ tsBit >>= 1;
+ }
+ asnMsg.tsAllocation.SetTimeslotAllocation(allocation);
+ asnMsg.timingAdvance.SetPacketTimingAdvance(pDlTbf->tai, pDlTbf->taiTs);
+
+ asnMsg.frequencyParameters.tsc.SetTSC(tsc);
+ asnMsg.frequencyParameters.arfcn.SetARFCN(arfcn);
+ asnMsg.frequencyParameters.SetFrequencyParameters();
+ asnMsg.dlTFIAssignment = pDlTbf->tfi;
+
+ // Start frame number needs to be just slightly longer than the RRBP.
+ asnMsg.tbfStartingTime.SetStartFrameNum(2);
+
+ // Power control ??
+
+ // Setup a control ack tag so that the PACKET CONTROL ACK message can
+ // be connected to this downlink TBF.
+ pDlTbf->SetControlAckTag();
+
+ if ((status = SendPacchMsg(trx, ts, &asnMsgHdr, &asnMsg, pDlTbf->GetControlAckTag(),
+ RLC_MAC_ACCESS_BURST)) != JC_OK)
+ {
+ DBG_WARNING("RlcMacTask::SendPacketDownlinkAssignment: failed %#x\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return(status);
+ }
+
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::DLCCCHImmediateAssignment
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: pDlTbf - downlink TBF
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::DLCCCHImmediateAssignment(DLTbf *pDlTbf)
+{
+ DBG_FUNC("RlcMacTask::DLCCCHImmediateAssignment", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ // Build an immediate assignment for a downlink TBF.
+ T_CNI_LAPDM_L3MessageUnit l3Msg;
+ T_CNI_RIL3RRM_MSG ril3RrMsg;
+ T_CNI_RIL3RRM_MSG_IMMEDIATE_ASSIGNMENT *pImmAsgnMsg = &ril3RrMsg.immediateAssignment;
+
+ bzero((char *)&ril3RrMsg, sizeof(T_CNI_RIL3RRM_MSG));
+
+ // Populate header
+ pImmAsgnMsg->header.protocol_descriminator = CNI_RIL3_PD_RRM;
+ pImmAsgnMsg->header.si_ti = 0;
+ pImmAsgnMsg->header.message_type = CNI_RIL3RRM_MSGID_IMMEDIATE_ASSIGNMENT;
+
+ // Populate Page Mode
+ pImmAsgnMsg->pageMode.ie_present = TRUE;
+ pImmAsgnMsg->pageMode.pm = CNI_RIL3_NORMAL_PAGING;
+
+ // Populate Dedicated Mode or TBF
+ pImmAsgnMsg->dmtbf.td_bit = 1;
+ pImmAsgnMsg->dmtbf.downlink_bit = 1;
+ pImmAsgnMsg->dmtbf.tma_bit = 0;
+
+ // Populate Packet Channel Description
+ pImmAsgnMsg->packetChannelDescription.ie_present = TRUE;
+ unsigned char tsc;
+ unsigned short arfcn;
+ int ts;
+
+ // Find the allocated TS.
+ for (int i=0; i < MAX_TIMESLOTS; i++)
+ {
+ if (pDlTbf->allocatedTs[i] == TRUE)
+ {
+ ts = i;
+ break;
+ }
+ }
+ // Call GRR to get tsc and arfcn.
+ tsc = grr_GetTrxSlotTsc(pDlTbf->trx, ts);
+ arfcn = grr_GetTrxSlotArfcn(pDlTbf->trx, ts);
+
+ pImmAsgnMsg->packetChannelDescription.TN = ts;
+ pImmAsgnMsg->packetChannelDescription.TSC = tsc;
+ pImmAsgnMsg->packetChannelDescription.hopping_indicator = CNI_RIL3_PCD_HOPPING_INDICATOR_NO_HOPPING;
+ pImmAsgnMsg->packetChannelDescription.arfcn = arfcn;
+ pImmAsgnMsg->packetChannelDescription.change_mark_1_selector = FALSE;
+
+ // Populate Request Reference
+ // For DL TBF this is not used. However, the frame number needs to be
+ // set such that it could not be confused with a response to a
+ // CHANNEL REQUEST.
+
+ // Setup a control ack tag so that the PACKET CONTROL ACK message can
+ // be connected to this downlink TBF. For immediate assign the tag
+ // is going into the random access field.
+ pDlTbf->SetControlAckTag();
+
+ pImmAsgnMsg->reqReference.ie_present = TRUE;
+ pImmAsgnMsg->reqReference.randomAccessInfo = pDlTbf->GetControlAckTag();
+ pImmAsgnMsg->reqReference.T1 = 0;
+ pImmAsgnMsg->reqReference.T2 = 0;
+ pImmAsgnMsg->reqReference.T3 = 0;
+
+ // Populate Timing Advance
+ // This IE will be invalidated by the IA Rest Octets
+ pImmAsgnMsg->timingAdvance.ie_present = TRUE;
+ pImmAsgnMsg->timingAdvance.value = 0;
+
+ // Populate Mobile Allocation
+ // NOTE: Frequency hopping not used so set length to zero
+ pImmAsgnMsg->mobileAllocation.ie_present = TRUE;
+ pImmAsgnMsg->mobileAllocation.numRFfreq = 0;
+
+ // Populate Starting Time
+ // NOTE: Starting time for packet data is set in the IA Rest Octets
+ pImmAsgnMsg->startingTime.ie_present = FALSE;
+
+ // Populate IA Rest Octets
+ pImmAsgnMsg->iaRestOctets.ie_present = TRUE;
+ pImmAsgnMsg->iaRestOctets.p = CNI_RIL3_PACKET_ASSIGNMENT_DOWNLINK;
+ pImmAsgnMsg->iaRestOctets.pda.tlli = pDlTbf->tlli.GetTLLI();
+ pImmAsgnMsg->iaRestOctets.pda.flag_tr = TRUE;
+ pImmAsgnMsg->iaRestOctets.pda.tfi_assignment = pDlTbf->tfi.GetTFI();
+ if (pDlTbf->qosProfile.a_bit == RADIO_INT_USES_RLC_MAC_ARQ)
+ {
+ pImmAsgnMsg->iaRestOctets.pda.rlc_mode = IeRlcMode::RLC_ACKNOWLEDGED;
+ }
+ else
+ {
+ pImmAsgnMsg->iaRestOctets.pda.rlc_mode = IeRlcMode::RLC_UNACKNOWLEDGED;
+ }
+ pImmAsgnMsg->iaRestOctets.pda.gamma = 0x16; // 44dbm
+ pImmAsgnMsg->iaRestOctets.pda.flag_tr_a = TRUE; // Alpha is present
+ pImmAsgnMsg->iaRestOctets.pda.alpha = 0xa; // 1.0
+ pImmAsgnMsg->iaRestOctets.pda.polling = 1; // enable polling
+ pImmAsgnMsg->iaRestOctets.pda.ta_valid = 0; // TA IE not valid
+ pImmAsgnMsg->iaRestOctets.pda.is_timing_advance_index_present = TRUE;
+ pImmAsgnMsg->iaRestOctets.pda.timing_advance_index = pDlTbf->tai;
+ // Zero out the start time for now, the DSP will fill in the real value.
+ pImmAsgnMsg->iaRestOctets.pda.is_tbf_starting_time_present = TRUE;
+ pImmAsgnMsg->iaRestOctets.pda.tbf_starting_time = 0;
+ pImmAsgnMsg->iaRestOctets.pda.flag_pbp = FALSE;
+
+ //Call RR message encoding functionality
+ T_CNI_RIL3_RESULT ril3Result = CNI_RIL3RRM_Encode( &ril3RrMsg, &l3Msg);
+
+ if (ril3Result == CNI_RIL3_RESULT_SUCCESS)
+ {
+ // Build DSP message and send it
+ unsigned char dspMsg[L1RM_MAXMSG_LEN];
+ int length = 4; // Skip the length field for now
+ dspMsg[length++] = RR_MANAGE_MSG;
+ dspMsg[length++] = PH_DATA_REQ>>8; // msb
+ dspMsg[length++] = PH_DATA_REQ; // lsb
+ dspMsg[length++] = 0; // always TRX 0
+ dspMsg[length++] = 0x90; // AGCH
+ dspMsg[length++] = 28;
+ dspMsg[length++] = 0x20; // void link
+ memcpy(&dspMsg[length], l3Msg.buffer, l3Msg.msgLength);
+ length += l3Msg.msgLength - 4;
+ dspMsg[3] = length>>24;
+ dspMsg[2] = length>>16;
+ dspMsg[1] = length>>8;
+ dspMsg[0] = length;
+
+ PostL3SendMsLog( &l3Msg );
+ sendDsp(dspMsg, length+4);
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessChanReq: RIL3 ImmediateAssign encode failed\n");
+ status = JC_INVALID_MSG;
+ }
+
+ DBG_LEAVE();
+ return(status);
+}
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MacHeader.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MacHeader.cpp
new file mode 100644
index 0000000..fc18a6b
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MacHeader.cpp
@@ -0,0 +1,481 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MacHeader.cpp
+// Author(s) : Tim Olson
+// Create Date : 11/22/2000
+// Description :
+//
+// *******************************************************************
+
+#include "MacHeader.h"
+
+// Static logger object used to display RLC/MAC header contents.
+DbgOutput ULMacHeader::HdrDisplayDetailObj("RLC/MAC Msg Detail", RLC_MAC_MSG_DETAIL);
+DbgOutput DLMacHeader::HdrDisplayDetailObj("RLC/MAC Msg Detail", RLC_MAC_MSG_DETAIL);
+
+
+char payloadTypeName[][64] =
+{
+ "RLC Data Block",
+ "RLC Control Block - No optional octets",
+ "RLC Control Block with optional octets",
+ "Reserved"
+};
+
+char rrbpName[][64] =
+{
+ "TDMA frame number = (N+13) mod 2715648",
+ "TDMA frame number = (N+17 or N+18) mod 2715648",
+ "TDMA frame number = (N+21 or N+22) mod 2715648 ",
+ "TDMA frame number = (N+26) mod 2715648"
+};
+
+char spName[][64] =
+{
+ "RRBP field not valid",
+ "RRBP field valid"
+};
+
+char finalSegName[][64] =
+{
+ "Not final segment",
+ "Final segment"
+};
+
+char addressControlName[][64] =
+{
+ "TFI/D octet is not present",
+ "TFI/D octet is present"
+};
+
+char powerReductionName[][64] =
+{
+ "0-2 dB (modeA) or 0-6 db (modeB) less than BCCH level",
+ "4-6 dB (modeA) or 8-14 db (modeB) less than BCCH level",
+ "8-10 dB (modeA) or 16-22 db (modeB) less than BCCH level",
+ "Not Usable (modeA) or 24-30 db (modeB) less than BCCH level"
+};
+
+char directionBitName[][64] =
+{
+ "Uplink TBF",
+ "Downlink TBF"
+};
+
+char fbiName[][64] =
+{
+ "Not the last RLC block",
+ "Last RLC block"
+};
+
+char extensionName[][64] =
+{
+ "Extension octet follows",
+ "No extension octet"
+};
+
+char moreName[][64] =
+{
+ "No more LLC data",
+ "More LLC data"
+};
+
+char siName[][64] =
+{
+ "MS RLC transmit window is NOT stalled",
+ "MS RLC trnsmit window is stalled"
+};
+
+char retryName[][64] =
+{
+ "MS sent channel request once",
+ "MS sent channel request twice or more"
+};
+
+char tlliIndName[][64] =
+{
+ "TLLI field is not present",
+ "TLLI filed is present"
+};
+
+
+
+// *******************************************************************
+// class DLMacHeader
+//
+// Description:
+// Downlink MAC/RLC header
+// *******************************************************************
+
+RlcMacResult DLMacHeader::EncodeDLMacHeader(BitStreamOut &dataStream)
+{
+ DBG_FUNC("MacMode::EncodeDLMacHeader", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack payload bits into the output bit stream.
+ dataStream.InsertBits8((unsigned char)payloadType, 2);
+
+ // Pack RRBP bits into the output bit stream.
+ dataStream.InsertBits8((unsigned char)rrbp, 2);
+
+ // Pack S/P bit into the output bit stream.
+ dataStream.InsertBits8((unsigned char)spBit, 1);
+
+ // Pack USF bits into the output bit stream.
+ dataStream.InsertBits8(usf, 3);
+
+ switch (payloadType)
+ {
+ case RLC_DATA_BLOCK:
+ {
+ // Pack PR bits into the output bit stream.
+ dataStream.InsertBits8((unsigned char)powerReduction, 2);
+
+ // Pack TFI bits into the output bit stream.
+ dataStream.InsertBits8(tfi, 5);
+
+ // Pack FBI bit into the output bit stream.
+ dataStream.InsertBits8((unsigned char)fbiBit, 1);
+
+ // Pack BSN bits into the output bit stream.
+ dataStream.InsertBits8(bsn, 7);
+
+ // Pack Extension bit into the output bit stream.
+ dataStream.InsertBits8((unsigned char)extensionBit, 1);
+
+ if (extensionBit == EXTENSION_OCTET_FOLLOWS)
+ {
+ int i = 0;
+ do
+ {
+ // Pack length bits into the output bit stream.
+ dataStream.InsertBits8(LengthOctets[i].length, 6);
+
+ // Pack More bit into the output bit stream.
+ dataStream.InsertBits8((unsigned char)LengthOctets[i].moreBit, 1);
+
+ // Pack Extension bit into the output bit stream.
+ dataStream.InsertBits8((unsigned char)LengthOctets[i].extensionBit, 1);
+
+ } while (LengthOctets[i++].extensionBit == EXTENSION_OCTET_FOLLOWS);
+ }
+ }
+ break;
+
+ case RLC_CTRL_BLOCK_OPT_OCTETS:
+ {
+ // Pack RBSN bit into the output bit stream.
+ dataStream.InsertBits8((unsigned char)rbsn, 1);
+
+ // Pack RTI bits into the output bit stream.
+ dataStream.InsertBits8(rti, 5);
+
+ // Pack FS bit into the output bit stream.
+ dataStream.InsertBits8((unsigned char)finalSegBit, 1);
+
+ // Pack AC bit into the output bit stream.
+ dataStream.InsertBits8((unsigned char)acBit, 1);
+
+ if (acBit == TFI_D_PRESENT)
+ {
+ // Pack PR bits into the output bit stream.
+ dataStream.InsertBits8((unsigned char)powerReduction, 2);
+
+ // Pack TFI bits into the output bit stream.
+ dataStream.InsertBits8(tfi, 5);
+
+ // Pack D bit into the output bit stream.
+ dataStream.InsertBits8((unsigned char)directionBit, 1);
+ }
+ }
+ break;
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void DLMacHeader::DisplayDetails()
+{
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ HdrDisplayDetailObj.Trace("MAC Header\n");
+
+ // Display Payload Type
+ HdrDisplayDetailObj.Trace("\tPayload Type ---> %s\n", payloadTypeName[payloadType]);
+
+ // Display RRBP bits .
+ HdrDisplayDetailObj.Trace("\tRRBP ---> %s\n", rrbpName[rrbp]);
+
+ // Display S/P bit.
+ HdrDisplayDetailObj.Trace("\tS/P Bit ---> %s\n", spName[spBit]);
+
+ // Display USF bits.
+ HdrDisplayDetailObj.Trace("\tUSF ---> %d\n", usf);
+
+ switch (payloadType)
+ {
+ case RLC_DATA_BLOCK:
+ {
+ // Display PR bits.
+ HdrDisplayDetailObj.Trace("\tPR ---> %s\n", powerReductionName[powerReduction]);
+
+ // Display TFI bits.
+ HdrDisplayDetailObj.Trace("\tTFI ---> %d\n", tfi);
+
+ // Display FBI bit.
+ HdrDisplayDetailObj.Trace("\tFBI ---> %s\n", fbiName[fbiBit]);
+
+ // Display BSN bits.
+ HdrDisplayDetailObj.Trace("\tBSN ---> %d\n", bsn);
+
+ // Display Extension.
+ HdrDisplayDetailObj.Trace("\tExtension ---> %s\n", extensionName[extensionBit]);
+
+ if (extensionBit == EXTENSION_OCTET_FOLLOWS)
+ {
+ int i = 0;
+ do
+ {
+ // Display length bits.
+ HdrDisplayDetailObj.Trace("\tlength ---> %d\n", LengthOctets[i].length);
+
+ // Display More bit.
+ HdrDisplayDetailObj.Trace("\tMore ---> %s\n", moreName[LengthOctets[i].moreBit]);
+
+ // Display Extension bit.
+ HdrDisplayDetailObj.Trace("\tExtension ---> %s\n",
+ extensionName[LengthOctets[i].extensionBit]);
+
+ } while (LengthOctets[i++].extensionBit == EXTENSION_OCTET_FOLLOWS);
+ }
+ }
+ break;
+
+ case RLC_CTRL_BLOCK_OPT_OCTETS:
+ {
+ // Display RBSN bit.
+ HdrDisplayDetailObj.Trace("\tRBSN ---> %d\n", rbsn);
+
+ // Display RTI bits.
+ HdrDisplayDetailObj.Trace("\tRTI ---> %d\n", rti);
+
+ // Display FS bit.
+ HdrDisplayDetailObj.Trace("\tFS ---> %s\n", finalSegName[finalSegBit]);
+
+ // Display AC bit.
+ HdrDisplayDetailObj.Trace("\tAC ---> %s\n", addressControlName[acBit]);
+
+ if (acBit == TFI_D_PRESENT)
+ {
+ // Display PR bits.
+ HdrDisplayDetailObj.Trace("\tPR ---> %s\n", powerReductionName[powerReduction]);
+
+ // Display TFI bits.
+ HdrDisplayDetailObj.Trace("\tTFI ---> %d\n", tfi);
+
+ // Display D bit.
+ HdrDisplayDetailObj.Trace("\tD ---> %s\n", directionBitName[directionBit]);
+ }
+ }
+ break;
+ }
+ }
+}
+
+
+
+// *******************************************************************
+// class ULMacHeader
+//
+// Description:
+// Uplink MAC/RLC header
+// *******************************************************************
+
+RlcMacResult ULMacHeader::DecodeULMacHeader(BitStreamIn &dataStream)
+{
+ DBG_FUNC("GlobalTFI::DecodeULMacHeader", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+ unsigned char val;
+
+ // Extract Payload bits from the input bit stream.
+ result = dataStream.ExtractBits8(val, 2);
+ RLC_MAC_RESULT_CHECK(result);
+ payloadType = (PAYLOAD_TYPE)val;
+
+ switch (payloadType)
+ {
+ case RLC_CTRL_BLOCK_NO_OPT_OCTETS:
+ {
+ // Extract spare bits from the input bit stream.
+ result = dataStream.ExtractBits8(val, 5);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Extract Retry bit from the input bit stream.
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ retryBit = (RETRY_BIT)val;
+
+ }
+ break;
+ case RLC_DATA_BLOCK:
+ {
+ // Extract countdown value bits from the input bit stream.
+ result = dataStream.ExtractBits8(countdownVal, 4);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Extract Stall Indicator bit from the input bit stream.
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ stallInd = (STALL_INDICATOR)val;
+
+ // Extract Retry bit from the input bit stream.
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ retryBit = (RETRY_BIT)val;
+
+ // Extract spare bits from the input bit stream.
+ result = dataStream.ExtractBits8(val, 2);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Extract TFI bits from the input bit stream.
+ result = dataStream.ExtractBits8(tfi, 5);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Extract TI bit from the input bit stream.
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ tlliInd = (TLLI_INDICATOR)val;
+
+ // Extract BSN bits from the input bit stream.
+ result = dataStream.ExtractBits8(bsn, 7);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Extract Extension bit from the input bit stream.
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ extensionBit = (EXTENSION_BIT)val;
+
+ // Build up the list of extension octets if included.
+ // In either case set the current length octet to be the first.
+ currLengthOctet = 0;
+ if (extensionBit == EXTENSION_OCTET_FOLLOWS)
+ {
+ int i = 0;
+ do
+ {
+ // Extract length bits from the input bit stream.
+ result = dataStream.ExtractBits8(LengthOctets[i].length, 6);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Extract More bit from the input bit stream.
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ LengthOctets[i].moreBit = (MORE_BIT)val;
+
+ // Extract Extension bit from the input bit stream.
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ LengthOctets[i].extensionBit = (EXTENSION_BIT)val;
+
+ } while (LengthOctets[i++].extensionBit == EXTENSION_OCTET_FOLLOWS);
+
+ // Set the length value following the last valid length octet
+ // to an invalid setting.
+ LengthOctets[i].length = INVALID_LENGTH_VAL;
+ }
+
+ if (tlliInd == TLLI_PRESENT)
+ {
+ // Extract TLLI bits from the input bit stream.
+ result = dataStream.ExtractBits32(tlli, 32);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ }
+ break;
+ }
+ DBG_LEAVE();
+ return (result);
+}
+
+
+
+void ULMacHeader::DisplayDetails()
+{
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ HdrDisplayDetailObj.Trace("MAC Header\n");
+
+ // Display Payload Type
+ HdrDisplayDetailObj.Trace("\tPayload Type ---> %s\n", payloadTypeName[payloadType]);
+
+ switch (payloadType)
+ {
+ case RLC_CTRL_BLOCK_OPT_OCTETS:
+ {
+ // Display Retry bit .
+ HdrDisplayDetailObj.Trace("\tR ---> %s\n", retryName[retryBit]);
+ }
+ break;
+
+ case RLC_DATA_BLOCK:
+ {
+ // Display Countdown Value bits.
+ HdrDisplayDetailObj.Trace("\tCountdown Value ---> %d\n", countdownVal);
+
+ // Display Stall Indicator bit.
+ HdrDisplayDetailObj.Trace("\tSI ---> %s\n", siName[stallInd]);
+
+ // Display Retry bit .
+ HdrDisplayDetailObj.Trace("\tR ---> %s\n", retryName[retryBit]);
+
+ // Display TFI bits.
+ HdrDisplayDetailObj.Trace("\tTFI ---> %d\n", tfi);
+
+ // Display TI bit .
+ HdrDisplayDetailObj.Trace("\tTI ---> %s\n", tlliIndName[tlliInd]);
+
+ // Display BSN bits.
+ HdrDisplayDetailObj.Trace("\tBSN ---> %d\n", bsn);
+
+ // Display Extension.
+ HdrDisplayDetailObj.Trace("\tExtension ---> %s\n", extensionName[extensionBit]);
+
+ if (extensionBit == EXTENSION_OCTET_FOLLOWS)
+ {
+ int i = 0;
+ do
+ {
+ // Display length bits.
+ HdrDisplayDetailObj.Trace("\tLength ---> %d\n", LengthOctets[i].length);
+
+ // Display More bit.
+ HdrDisplayDetailObj.Trace("\tMore ---> %s\n", moreName[LengthOctets[i].moreBit]);
+
+ // Display Extension bit.
+ HdrDisplayDetailObj.Trace("\tExtension ---> %s\n", extensionName[LengthOctets[i].extensionBit]);
+
+ } while (LengthOctets[i++].extensionBit == EXTENSION_OCTET_FOLLOWS);
+ }
+
+ if (tlliInd == TLLI_PRESENT)
+ {
+ // Display TLLI bits.
+ HdrDisplayDetailObj.Trace("\ttlli ---> %#x\n", tlli);
+ }
+ }
+ }
+ }
+}
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MacScheduler.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MacScheduler.cpp
new file mode 100644
index 0000000..3dd40ac
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MacScheduler.cpp
@@ -0,0 +1,1197 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MacScheduler.cpp
+// Author(s) : Daryl Kaiser
+// Create Date : 12/22/2000
+// Description :
+//
+// *******************************************************************
+
+#include "RlcMacTask.h"
+#include "Timeslot.h"
+#include "ScheduleInfo.h"
+#include "ScheduleAllocationInfo.h"
+#include "Grr/grr_intf.h"
+#include "vipermib.h"
+
+//******************************************************************************
+// MAC Resource Allocators/Deallocators
+//******************************************************************************
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::DLResourceRequest (2 versions)
+**
+** PURPOSE: Assign downlink resources to a TBF.
+**
+** INPUT PARAMETERS:
+** pDlTbf - ptr to DL TBF structure
+** pUlTbf - ptr to UL TBF structure
+**
+** RETURN VALUE(S): indicates whether user was allocated (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::DLResourceRequest(DLTbf *pDlTbf)
+{
+ DBG_FUNC("RlcMacTask::DLResourceRequest(DL)", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ bool status = FALSE;
+ ScheduleAllocationInfo schedAllocInfo(pDlTbf->GetMultislotClass(),
+ pDlTbf->GetDelayClass(),
+ pDlTbf->GetPrecedenceClass(),
+ pDlTbf->GetPeakThroughputClass(),
+ (Tbf*)pDlTbf,
+ DL,
+ NULL);
+ /*-------------------------------------------------------------------------
+ * Determine multislot options for this user, then allocate time slots
+ *-------------------------------------------------------------------------*/
+ if ( schedAllocInfo.ComputeMultislotOptions() )
+ {
+ status = AllocateUser(&schedAllocInfo);
+ }
+ DBG_LEAVE();
+ return(status);
+}
+
+bool RlcMacTask::DLResourceRequest(DLTbf *pDlTbf, ULTbf *pUlTbf)
+{
+ DBG_FUNC("RlcMacTask::DLResourceRequest(DL&UL)", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ /*-------------------------------------------------------------------------
+ * Copy the TRX and allowed slots from the existing UL TBF to the new DL TBF
+ *-------------------------------------------------------------------------*/
+ pDlTbf->trx = pUlTbf->trx;
+
+ bool status = FALSE;
+ ScheduleAllocationInfo schedAllocInfo(pDlTbf->GetMultislotClass(),
+ pDlTbf->GetDelayClass(),
+ pDlTbf->GetPrecedenceClass(),
+ pDlTbf->GetPeakThroughputClass(),
+ (Tbf*)pDlTbf,
+ DL,
+ pUlTbf->allocatedTs);
+ /*-------------------------------------------------------------------------
+ * Determine multislot options for this user, then allocate time slots
+ *-------------------------------------------------------------------------*/
+ if ( schedAllocInfo.ComputeMultislotOptions() )
+ {
+ status = AllocateUser(&schedAllocInfo);
+ }
+ DBG_LEAVE();
+ return(status);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::DLSingleTSResourceRequest
+**
+** PURPOSE: Assign downlink resources to a TBF, only in one time slot.
+**
+** INPUT PARAMETERS: pDlTbf - ptr to DL TBF structure
+**
+** RETURN VALUE(S): indicates whether user was released (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::DLSingleTSResourceRequest(DLTbf *pDlTbf)
+{
+ DBG_FUNC("RlcMacTask::DLSingleTSResourceRequest", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ bool status = FALSE;
+ ScheduleAllocationInfo schedAllocInfo(1, // Multislot Class 1 = one TS only
+ pDlTbf->GetDelayClass(),
+ pDlTbf->GetPrecedenceClass(),
+ pDlTbf->GetPeakThroughputClass(),
+ (Tbf*)pDlTbf,
+ DL,
+ NULL);
+ /*-------------------------------------------------------------------------
+ * Determine multislot options for this user, then allocate time slots
+ *-------------------------------------------------------------------------*/
+ if ( schedAllocInfo.ComputeMultislotOptions() )
+ {
+ status = AllocateUser(&schedAllocInfo);
+ }
+ DBG_LEAVE();
+ return(status);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::ULResourceRequest (2 versions)
+**
+** PURPOSE: Assign uplink resources to a TBF.
+**
+** INPUT PARAMETERS: pUlTbf - ptr to UL TBF structure
+**
+** RETURN VALUE(S): indicates whether user was allocated (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::ULResourceRequest(ULTbf *pUlTbf)
+{
+ DBG_FUNC("RlcMacTask::ULResourceRequest(UL)", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ bool status = FALSE;
+ ScheduleAllocationInfo schedAllocInfo(pUlTbf->GetMultislotClass(),
+ pUlTbf->GetDelayClass(),
+ pUlTbf->GetPrecedenceClass(),
+ pUlTbf->GetPeakThroughputClass(),
+ (Tbf*)pUlTbf,
+ UL,
+ NULL);
+ /*-------------------------------------------------------------------------
+ * Determine multislot options for this user, then allocate time slots
+ *-------------------------------------------------------------------------*/
+ if ( schedAllocInfo.ComputeMultislotOptions() )
+ {
+ status = AllocateUser(&schedAllocInfo);
+ }
+ DBG_LEAVE();
+ return(status);
+}
+
+bool RlcMacTask::ULResourceRequest(ULTbf *pUlTbf, DLTbf *pDlTbf)
+{
+ DBG_FUNC("RlcMacTask::ULResourceRequest(UL&DL)", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ bool status = FALSE;
+ ScheduleAllocationInfo schedAllocInfo(pUlTbf->GetMultislotClass(),
+ pUlTbf->GetDelayClass(),
+ pUlTbf->GetPrecedenceClass(),
+ pUlTbf->GetPeakThroughputClass(),
+ (Tbf*)pUlTbf,
+ UL,
+ pDlTbf->allocatedTs);
+ /*-------------------------------------------------------------------------
+ * Copy the TRX from the existing TBF to the new TBF.
+ *-------------------------------------------------------------------------*/
+ pUlTbf->trx = pDlTbf->trx;
+
+ /*-------------------------------------------------------------------------
+ * Determine multislot options for this user, then allocate time slots
+ *-------------------------------------------------------------------------*/
+ if ( schedAllocInfo.ComputeMultislotOptions() )
+ {
+ status = AllocateUser(&schedAllocInfo);
+ }
+ DBG_LEAVE();
+ return(status);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::DLResourceReallocRequest (2 versions)
+**
+** PURPOSE: Reallocate downlink resources to a TBF.
+**
+** INPUT PARAMETERS:
+** pDlTbf - ptr to DL TBF structure
+** pUlTbf - ptr to UL TBF structure
+**
+** RETURN VALUE(S): indicates whether user was allocated (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::DLResourceReallocRequest(DLTbf *pDlTbf)
+{
+ DBG_FUNC("RlcMacTask::DLResourceReallocRequest(DL)", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ bool status = FALSE;
+ ScheduleAllocationInfo schedAllocInfo(pDlTbf->GetMultislotClass(),
+ pDlTbf->GetDelayClass(),
+ pDlTbf->GetPrecedenceClass(),
+ pDlTbf->GetPeakThroughputClass(),
+ (Tbf*)pDlTbf,
+ DL,
+ NULL);
+ /*-------------------------------------------------------------------------
+ * Determine multislot options for this user, then allocate time slots
+ *-------------------------------------------------------------------------*/
+ if ( schedAllocInfo.ComputeMultislotOptions() )
+ {
+ status = AllocateUserIfBetterQoS(&schedAllocInfo);
+ }
+ DBG_LEAVE();
+ return(status);
+}
+
+bool RlcMacTask::DLResourceReallocRequest(DLTbf *pDlTbf, ULTbf *pUlTbf)
+{
+ DBG_FUNC("RlcMacTask::DLResourceReallocRequest(DL&UL)", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ /*-------------------------------------------------------------------------
+ * Copy the TRX and allowed slots from the existing UL TBF to the new DL TBF
+ *-------------------------------------------------------------------------*/
+ pDlTbf->trx = pUlTbf->trx;
+
+ bool status = FALSE;
+ ScheduleAllocationInfo schedAllocInfo(pDlTbf->GetMultislotClass(),
+ pDlTbf->GetDelayClass(),
+ pDlTbf->GetPrecedenceClass(),
+ pDlTbf->GetPeakThroughputClass(),
+ (Tbf*)pDlTbf,
+ DL,
+ pUlTbf->allocatedTs);
+ /*-------------------------------------------------------------------------
+ * Determine multislot options for this user, then allocate time slots
+ *-------------------------------------------------------------------------*/
+ if ( schedAllocInfo.ComputeMultislotOptions() )
+ {
+ status = AllocateUserIfBetterQoS(&schedAllocInfo);
+ }
+ DBG_LEAVE();
+ return(status);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::ULResourceReallocRequest (2 versions)
+**
+** PURPOSE: Reallocate uplink resources to a TBF.
+**
+** INPUT PARAMETERS:
+** pDlTbf - ptr to DL TBF structure
+** pUlTbf - ptr to UL TBF structure
+**
+** RETURN VALUE(S): indicates whether user was allocated (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::ULResourceReallocRequest(ULTbf *pUlTbf)
+{
+ DBG_FUNC("RlcMacTask::ULResourceReallocRequest(UL)", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ bool status = FALSE;
+ ScheduleAllocationInfo schedAllocInfo(pUlTbf->GetMultislotClass(),
+ pUlTbf->GetDelayClass(),
+ pUlTbf->GetPrecedenceClass(),
+ pUlTbf->GetPeakThroughputClass(),
+ (Tbf*)pUlTbf,
+ UL,
+ NULL);
+ /*-------------------------------------------------------------------------
+ * Determine multislot options for this user, then allocate time slots
+ *-------------------------------------------------------------------------*/
+ if ( schedAllocInfo.ComputeMultislotOptions() )
+ {
+ status = AllocateUserIfBetterQoS(&schedAllocInfo);
+ }
+ DBG_LEAVE();
+ return(status);
+}
+
+bool RlcMacTask::ULResourceReallocRequest(ULTbf *pUlTbf, DLTbf *pDlTbf)
+{
+ DBG_FUNC("RlcMacTask::ULResourceReallocRequest(UL&DL)", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ /*-------------------------------------------------------------------------
+ * Copy the TRX and allowed slots from the existing DL TBF to the new UL TBF
+ *-------------------------------------------------------------------------*/
+ pUlTbf->trx = pDlTbf->trx;
+
+ bool status = FALSE;
+ ScheduleAllocationInfo schedAllocInfo(pUlTbf->GetMultislotClass(),
+ pUlTbf->GetDelayClass(),
+ pUlTbf->GetPrecedenceClass(),
+ pUlTbf->GetPeakThroughputClass(),
+ (Tbf*)pUlTbf,
+ UL,
+ pDlTbf->allocatedTs);
+ /*-------------------------------------------------------------------------
+ * Determine multislot options for this user, then allocate time slots
+ *-------------------------------------------------------------------------*/
+ if ( schedAllocInfo.ComputeMultislotOptions() )
+ {
+ status = AllocateUserIfBetterQoS(&schedAllocInfo);
+ }
+ DBG_LEAVE();
+ return(status);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::DLReleaseResourceRequest
+**
+** PURPOSE: Release downlink resources of a TBF.
+**
+** INPUT PARAMETERS: pDlTbf - ptr to DL TBF structure
+**
+** RETURN VALUE(S): indicates whether user was released (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::DLReleaseResourceRequest(DLTbf *pDlTbf)
+{
+ DBG_FUNC("RlcMacTask::DLReleaseResourceRequest", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ bool status = DeallocateUser((Tbf*)pDlTbf, DL);
+
+ DBG_LEAVE();
+ return(status);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::ULReleaseResourceRequest
+**
+** PURPOSE: Release uplink resources of a TBF.
+**
+** INPUT PARAMETERS: pUlTbf - ptr to UL TBF structure
+**
+** RETURN VALUE(S): indicates whether user was released (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::ULReleaseResourceRequest(ULTbf *pUlTbf)
+{
+ DBG_FUNC("RlcMacTask::ULReleaseResourceRequest", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ bool status = DeallocateUser((Tbf*)pUlTbf, UL);
+
+ DBG_LEAVE();
+ return(status);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::ULSingleBlockRequest
+**
+** PURPOSE: Choose TRX and TS for uplink single block by finding the slot
+** whose most heavily loaded direction is utilizing the least of
+** its total capacity.
+**
+** INPUT PARAMETERS: pUlTbf - ptr to UL TBF structure
+**
+** RETURN VALUE(S): indicates whether GPRS TRX/TS was found (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::ULSingleBlockRequest(int *bestTrx, int *bestTs)
+{
+ DBG_FUNC("RlcMacTask::ULSingleBlockRequest", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ float bestCapacity = 1.0;
+ bool status = FALSE;
+
+ for ( int trx=0; trx<MAX_TRX; trx++ )
+ {
+ for ( int ts=0; ts<MAX_TIMESLOTS; ts++ )
+ {
+ if ( grr_GetTrxSlotChanComb(trx, ts) == pDCHData &&
+ grr_GetTrxSlotOpState(trx, ts) == opStateEnabled )
+ {
+ ScheduleInfo *scheduleInfo = tsPool.GetScheduleInfo(trx, ts);
+ float capUL = scheduleInfo->GetUtilizedCapacity(UL);
+ float capDL = scheduleInfo->GetUtilizedCapacity(DL);
+ float utilizedCapacity = max(capUL, capDL);
+ if ( utilizedCapacity < bestCapacity )
+ {
+ *bestTrx = trx;
+ *bestTs = ts;
+ bestCapacity = utilizedCapacity;
+ status = TRUE;
+ }
+ }
+ }
+ }
+ DBG_LEAVE();
+ return(status);
+}
+
+
+//******************************************************************************
+// MAC Schedulers
+//******************************************************************************
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::TSSelectionRequest (2 versions)
+**
+** PURPOSE: Choose TRX and TS for control message on existing DL or UL TBF
+**
+** INPUT PARAMETERS:
+** pDlTbf - ptr to DL TBF structure
+** pUlTbf - ptr to UL TBF structure
+**
+** OUTPUT PARAMETERS:
+** trx, ts
+**
+** RETURN VALUE(S): indicates whether GPRS TRX/TS was found (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::TSSelectionRequest(int *trx, int *ts, DLTbf *pDlTbf)
+{
+ DBG_FUNC("RlcMacTask::TSSelectionRequest(DL)", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ bool status = GetNaturalSlot((Tbf*)pDlTbf, trx, ts);
+
+ DBG_LEAVE();
+ return(status);
+}
+
+bool RlcMacTask::TSSelectionRequest(int *trx, int *ts, ULTbf *pUlTbf)
+{
+ DBG_FUNC("RlcMacTask::TSSelectionRequest(UL)", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ bool status = GetNaturalSlot((Tbf*)pUlTbf, trx, ts);
+
+ DBG_LEAVE();
+ return(status);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::PollingTsCheck
+**
+** PURPOSE: Choose TRX and TS for control message on existing DL or UL TBF
+**
+** INPUT PARAMETERS:
+** trx - TRX
+** ts - time slot
+** pDlTbf - ptr to DL TBF structure
+**
+** RETURN VALUE(S): indicates whether GPRS TRX/TS was found (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::PollingTsCheck(int trx, int ts, DLTbf *pDlTbf)
+{
+ DBG_FUNC("RlcMacTask::PollingTsCheck(DL)", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ bool status = (pDlTbf->trx == trx) && pDlTbf->naturalTs[ts];
+
+ DBG_LEAVE();
+ return(status);
+}
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::ScheduleRLCBlock (3 versions)
+**
+** PURPOSE: Schedule the next RLC block(s) on specified TRX and TS. One
+** method for each direction, and one for simultaneous scheduling.
+**
+** INPUT PARAMETERS:
+** trx - transceiver index (0-MAX_TRX)
+** ts - time slot index (0-MAX_TIMESLOTS)
+** pDlTbf - ptr to DL TBF structure
+** pUlTbf - ptr to UL TBF structure
+**
+** RETURN VALUE(S): indicates whether entry was scheduled (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::ScheduleRLCBlock(int trx, int ts, DLTbf **ppDlTbf)
+{
+ DBG_FUNC("RlcMacTask::ScheduleRLCBlock(DL)", RLC_MAC_SCHEDULER);
+ DBG_ENTER();
+
+ DBG_TRACE(" Scheduling downlink TRX %d, TS %d\n", trx, ts);
+
+ ScheduleQueue *scheduleQueue = tsPool.GetQueue(trx, ts, DL);
+ bool status = scheduleQueue->ScheduleNextBlock((Tbf**)ppDlTbf);
+
+ DBG_LEAVE();
+ return(status);
+}
+
+bool RlcMacTask::ScheduleRLCBlock(int trx, int ts, ULTbf **ppUlTbf)
+{
+ DBG_FUNC("RlcMacTask::ScheduleRLCBlock(UL)", RLC_MAC_SCHEDULER);
+ DBG_ENTER();
+
+ DBG_TRACE(" Scheduling uplink TRX %d, TS %d\n", trx, ts);
+
+ ScheduleQueue *scheduleQueue = tsPool.GetQueue(trx, ts, UL);
+ bool status = scheduleQueue->ScheduleNextBlock((Tbf**)ppUlTbf);
+
+ DBG_LEAVE();
+ return(status);
+}
+
+bool RlcMacTask::ScheduleRLCBlock(int trx, int ts, DLTbf **ppDlTbf, ULTbf **ppUlTbf)
+{
+ DBG_FUNC("RlcMacTask::ScheduleRLCBlock(DL&UL)", RLC_MAC_SCHEDULER);
+ DBG_ENTER();
+
+ DBG_TRACE(" Scheduling downlink/uplink TRX %d, TS %d\n", trx, ts);
+
+ ScheduleQueue *scheduleQueueDL = tsPool.GetQueue(trx, ts, DL);
+ ScheduleQueue *scheduleQueueUL = tsPool.GetQueue(trx, ts, UL);
+ bool sentDL = scheduleQueueDL->ScheduleNextBlock((Tbf**)ppDlTbf);
+ bool sentUL = scheduleQueueUL->ScheduleNextBlock((Tbf**)ppUlTbf);
+
+ DBG_LEAVE();
+ return(sentDL & sentUL);
+}
+
+
+
+//******************************************************************************
+// MAC Scheduler Helpers
+//******************************************************************************
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::AllocateUser
+**
+** PURPOSE: Allocate time slots to DL or UL TBF
+**
+** INPUT PARAMETERS: schedAllocInfo - ptr to object for allocating schedule
+**
+** RETURN VALUE(S): indicates whether entry was assigned (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::AllocateUser (ScheduleAllocationInfo *schedAllocInfo)
+{
+ DBG_FUNC("RlcMacTask::AllocateUser", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ bool status = FALSE;
+ int slotCount = 0;
+ int desiredSlots = schedAllocInfo->ComputeDesiredNumberOfSlots();
+
+ /*-------------------------------------------------------------------------
+ * First eliminate any multislot configurations that include slots which
+ * have been disallowed already for this TBF, perhaps due to contraints in
+ * the opposite direction TBF.
+ *-------------------------------------------------------------------------*/
+ schedAllocInfo->ConstrainCandMultiConfig();
+
+ /*-------------------------------------------------------------------------
+ * Assign user to the best available slot up to desired # of slots
+ *-------------------------------------------------------------------------*/
+ while ( slotCount<desiredSlots && AllocateOneSlot(schedAllocInfo) )
+ {
+ status = TRUE;
+ slotCount += 1;
+ }
+ /*-------------------------------------------------------------------------
+ * If bandwidth was allocated...
+ *-------------------------------------------------------------------------*/
+ if ( status )
+ {
+ Tbf* tbf = schedAllocInfo->GetTbf();
+ LinkDirection dir = schedAllocInfo->GetDirection();
+ /*---------------------------------------------------------------------
+ * Assign a TFI to the new user
+ *---------------------------------------------------------------------*/
+ if ( dir == DL )
+ {
+ tsPool.AllocateDLTFI(tbf->trx, (DLTbf*)tbf);
+ }
+ else
+ {
+ tsPool.AllocateULTFI(tbf->trx, (ULTbf*)tbf);
+ }
+ /*---------------------------------------------------------------------
+ * Assign a TAI on the first allocated slot and a USF on each slot
+ *---------------------------------------------------------------------*/
+ bool allocatedTai = FALSE;
+ for ( int ts=0; ts<MAX_TIMESLOTS; ts++ )
+ {
+ if ( tbf->allocatedTs[ts] )
+ {
+ if ( !allocatedTai )
+ {
+ allocatedTai = TRUE;
+ tsPool.AllocateTAI(tbf->trx, ts, tbf);
+ }
+ if ( dir == UL )
+ {
+ tsPool.AllocateUSF(tbf->trx, ts, (ULTbf*)tbf);
+ }
+ }
+ }
+ }
+ DBG_LEAVE();
+ return(status);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::AllocateUserIfBetterQoS
+**
+** PURPOSE: Allocate time slots to an existing DL or UL TBF if the result
+** is better quality of service, defined here as more allocated
+** time slots or more schedule queue entries at the desired level,
+** which translates to higher data throughput.
+**
+** INPUT PARAMETERS: schedAllocInfo - ptr to object for allocating schedule
+**
+** RETURN VALUE(S): indicates whether entry was assigned (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::AllocateUserIfBetterQoS (ScheduleAllocationInfo *schedAllocInfo)
+{
+ DBG_FUNC("RlcMacTask::AllocateUserIfBetterQoS", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ bool status = FALSE;
+ int newSlotCount = 0;
+ int oldSlotCount = 0;
+ int newEntryCount = 0;
+ int oldEntryCount = 0;
+ int nbrEntries = 0;
+ int desiredSlots = schedAllocInfo->ComputeDesiredNumberOfSlots();
+ Tbf* tbf = schedAllocInfo->GetTbf();
+ LinkDirection dir = schedAllocInfo->GetDirection();
+ int desiredLevel = schedAllocInfo->GetDelayClass() - 1;
+ bool originallyAllocatedTs[MAX_TIMESLOTS];
+
+ /*-------------------------------------------------------------------------
+ * First eliminate any multislot configurations that include slots which
+ * have been disallowed already for this TBF, perhaps due to contraints in
+ * the opposite direction TBF.
+ *-------------------------------------------------------------------------*/
+ schedAllocInfo->ConstrainCandMultiConfig();
+
+ /*-------------------------------------------------------------------------
+ * On each TS of the affected user's TRX, copy the current master schedule
+ * queue allocations of all users and deallocate the affected user's queue
+ * entries. Later, if the new allocation does not improve this user's QoS,
+ * we'll restore the allocations of all users to their original state.
+ *-------------------------------------------------------------------------*/
+ for ( int ts=0; ts<MAX_TIMESLOTS; ts++ )
+ {
+ ScheduleQueue *scheduleQueue = tsPool.GetQueue(tbf->trx, ts, dir);
+ scheduleQueue->CopyQueue();
+ /*------------------------------------------------------------------
+ * Save the TBF's originally allocated slots
+ *------------------------------------------------------------------*/
+ originallyAllocatedTs[ts] = tbf->allocatedTs[ts];
+ /*------------------------------------------------------------------
+ * Deallocate affected user's allocated schedule queue entries
+ *------------------------------------------------------------------*/
+ if ( tbf->allocatedTs[ts] )
+ {
+ /*--------------------------------------------------------------------
+ * For each slot allocated to this user, search all queue levels
+ *--------------------------------------------------------------------*/
+ ScheduleQueue *scheduleQueue = tsPool.GetQueue(tbf->trx, ts, dir);
+ for ( int level=0; level<ScheduleQueue::QUEUE_NUM_LEVELS; level++ )
+ {
+ /*----------------------------------------------------------------
+ * Deallocate entries at this queue level, rebalance remaining
+ *----------------------------------------------------------------*/
+ nbrEntries = scheduleQueue->DeallocateEntries(tbf, level);
+ if ( nbrEntries > 0 )
+ {
+ scheduleQueue->BalanceEntries(level);
+ /*-----------------------------------------------------------
+ * Add up affected user's slots and entries at desired level
+ *-----------------------------------------------------------*/
+ if ( level==desiredLevel )
+ {
+ oldSlotCount += 1;
+ oldEntryCount += nbrEntries;
+ }
+ }
+ }
+ /*---------------------------------------------------------------------
+ * Update # of users and utilized capacity in this slot and direction
+ *---------------------------------------------------------------------*/
+ ScheduleInfo *scheduleInfo = tsPool.GetScheduleInfo(tbf->trx, ts);
+ scheduleInfo->UpdateUsersAndCapacity(dir);
+ }
+ /*------------------------------------------------------------------
+ * Clear out the TBF's allocated slots
+ *------------------------------------------------------------------*/
+ tbf->allocatedTs[ts] = FALSE;
+ }
+ /*-------------------------------------------------------------------------
+ * Look for a better QoS assignment and count the number of entries
+ *-------------------------------------------------------------------------*/
+ while ( newSlotCount<desiredSlots && AllocateOneSlot(schedAllocInfo) )
+ {
+ int newTrx, newTs, newEntries;
+ schedAllocInfo->GetNewSlotAllocation(&newTrx, &newTs, &newEntries);
+ newEntryCount += newEntries;
+ newSlotCount += 1;
+ }
+
+ /*-------------------------------------------------------------------------
+ * If more slots or more total queue entries can be allocated...
+ *-------------------------------------------------------------------------*/
+ if ( newSlotCount>oldSlotCount || newEntryCount>oldEntryCount )
+ {
+ status = TRUE;
+ /*---------------------------------------------------------------------
+ * Keep the user's TFI, but release the user's old TAI and USFs
+ *---------------------------------------------------------------------*/
+ tsPool.ReleaseTAI(tbf->trx, tbf->taiTs, tbf->tai);
+ if ( dir == UL )
+ {
+ for ( int ts=0; ts<MAX_TIMESLOTS; ts++ )
+ {
+ tsPool.ReleaseUSF(tbf->trx, ts, ((ULTbf*)tbf)->usf[ts]);
+ }
+ }
+ /*---------------------------------------------------------------------
+ * Assign a new TAI on the 1st allocated slot and a new USF on each slot
+ *---------------------------------------------------------------------*/
+ bool allocatedTai = FALSE;
+ for ( int ts=0; ts<MAX_TIMESLOTS; ts++ )
+ {
+ if ( tbf->allocatedTs[ts] )
+ {
+ if ( !allocatedTai )
+ {
+ allocatedTai = TRUE;
+ tsPool.AllocateTAI(tbf->trx, ts, tbf);
+ }
+ if ( dir == UL )
+ {
+ tsPool.AllocateUSF(tbf->trx, ts, (ULTbf*)tbf);
+ }
+ }
+ }
+ }
+ /*-------------------------------------------------------------------------
+ * If QoS cannot be improved, restore the master schedule queues to their
+ * original states. This leaves all user allocations on this TRX as they
+ * were before attempting AllocateUserIfBetterQoS. Also restore the TBF's
+ * original allocatedTS array.
+ *-------------------------------------------------------------------------*/
+ else
+ {
+ status = FALSE;
+ for ( int ts=0; ts<MAX_TIMESLOTS; ts++ )
+ {
+ ScheduleQueue *scheduleQueue = tsPool.GetQueue(tbf->trx, ts, dir);
+ scheduleQueue->RestoreQueue();
+ tbf->allocatedTs[ts] = originallyAllocatedTs[ts];
+ }
+ }
+ DBG_LEAVE();
+ return(status);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::AllocateOneSlot
+**
+** PURPOSE: Allocate schedule queue entries to user in time slot that
+** gives highest throughput within requested delay class
+**
+** INPUT PARAMETERS: schedAllocInfo - ptr to object for allocating schedule
+**
+** RETURN VALUE(S): indicates whether entry was assigned (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::AllocateOneSlot (ScheduleAllocationInfo *schedAllocInfo)
+{
+ DBG_FUNC("RlcMacTask::AllocateOneSlot", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ int desiredLevel = schedAllocInfo->GetDelayClass() - 1;
+ int precedence = schedAllocInfo->GetPrecedenceClass();
+ LinkDirection dir = schedAllocInfo->GetDirection();
+ Tbf* tbf = schedAllocInfo->GetTbf();
+
+ /*-------------------------------------------------------------------------
+ * Find the best TRX/TS (the TS allowing the most queue entries)
+ *-------------------------------------------------------------------------*/
+ FindBestSlot (schedAllocInfo);
+
+ /*-------------------------------------------------------------------------
+ * Allocate queue entries in the best TRX/TS and record the TRX and TS
+ * in the TBF object. Also in the TBF object, update the allowed UL and DL
+ * slots based on the new allocation. Update the scheduler's user count and
+ * utilized capacity for the slot.
+ *-------------------------------------------------------------------------*/
+ int bestTrx, bestTs, bestEntries;
+ schedAllocInfo->GetNewSlotAllocation(&bestTrx, &bestTs, &bestEntries);
+ if ( bestEntries > 0 )
+ {
+ ScheduleQueue *scheduleQueue = tsPool.GetQueue(bestTrx, bestTs, dir);
+ if ( scheduleQueue->AllocateEntries(tbf, desiredLevel, precedence, FALSE) )
+ {
+ DBG_TRACE(" Allocated %d schedule queue entries\n", bestEntries);
+ tbf->trx = bestTrx;
+ tbf->allocatedTs[bestTs] = TRUE;
+ UpdateAllowedSlots(schedAllocInfo);
+ ScheduleInfo *scheduleInfo = tsPool.GetScheduleInfo(bestTrx, bestTs);
+ scheduleInfo->UpdateUsersAndCapacity(dir);
+ }
+ else
+ {
+ DBG_TRACE(" Error allocating in RlcMacTask::AllocateOneSlot (see code)\n");
+ }
+ }
+ DBG_LEAVE();
+ return(bestEntries>0);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::FindBestSlot
+**
+** PURPOSE: Find time slot that gives highest throughput within requested
+** delay class
+**
+** INPUT PARAMETERS: schedAllocInfo - ptr to object for allocating schedule
+**
+** RETURN VALUE(S): indicates whether any queue entries could be assigned
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::FindBestSlot (ScheduleAllocationInfo *schedAllocInfo)
+{
+ DBG_FUNC("RlcMacTask::FindBestSlot", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ int availableEntries;
+ int desiredLevel = schedAllocInfo->GetDelayClass() - 1;
+ int precedence = schedAllocInfo->GetPrecedenceClass();
+ LinkDirection dir = schedAllocInfo->GetDirection();
+ Tbf* tbf = schedAllocInfo->GetTbf();
+ int trx = tbf->trx;
+
+ if ( dir == DL )
+ {
+ DBG_TRACE(" DL Desired queue level = %d, Precedence = %d\n", desiredLevel, precedence);
+ }
+ else
+ {
+ DBG_TRACE(" UL Desired queue level = %d, Precedence = %d\n", desiredLevel, precedence);
+ }
+
+ /*-------------------------------------------------------------------------
+ * Initialize slotAlloc, a temporary structure for saving best slot info
+ *-------------------------------------------------------------------------*/
+ schedAllocInfo->InitializeNewSlotAllocation();
+
+ /*-------------------------------------------------------------------------
+ * Look for time slot allowing the most queue entries
+ *-------------------------------------------------------------------------*/
+ for ( int localTrx=0; localTrx<MAX_TRX; localTrx++ )
+ {
+ /*-------------------------------------------------------------------------
+ * If no slots have been assigned, trx is null. Consider all TRX. Once first
+ * slot has been assigned, make sure subsequent slots are on the same TRX.
+ *-------------------------------------------------------------------------*/
+ if ( trx==NULL_TRX || trx==localTrx )
+ {
+ for ( int tsCount=0; tsCount<MAX_TIMESLOTS; tsCount++ )
+ {
+ /*-------------------------------------------------------------------------
+ * For DL, check from TS0 to TS7, which prefers lower numbered slots in case
+ * of a tie. For UL, check from TS7 to TS0, which prefers higher slots.
+ *-------------------------------------------------------------------------*/
+ int ts = (dir==DL) ? (tsCount) : (MAX_TIMESLOTS-tsCount-1);
+ ScheduleInfo *scheduleInfo = tsPool.GetScheduleInfo(localTrx, ts);
+
+ // temporary debug trace -- remove soon
+ DBG_TRACE(" Look at trx%d, ts%d: okayToAdd=%d, allowed=%d, natural=%d, users(DL,UL)=%d,%d\n",
+ localTrx, ts, scheduleInfo->OkayToAddUser(dir), schedAllocInfo->IsAllowedTs(dir, ts),
+ schedAllocInfo->IncludesNaturalTs(dir, ts),
+ scheduleInfo->GetNbrUsers(DL), scheduleInfo->GetNbrUsers(UL));
+
+ if ( grr_GetBtsAmState() == unlocked &&
+ grr_GetTrxAmState(localTrx) == unlocked &&
+ grr_GetTrxSlotAmState(localTrx, ts) == unlocked &&
+ grr_GetBtsOpState() == opStateEnabled &&
+ grr_GetTrxOpState(localTrx) == opStateEnabled &&
+ grr_GetTrxSlotOpState(localTrx, ts) == opStateEnabled &&
+ grr_GetTrxSlotChanComb(localTrx, ts)== pDCHData &&
+ scheduleInfo->OkayToAddUser(dir) &&
+ schedAllocInfo->IsAllowedTs(dir, ts) &&
+ schedAllocInfo->IncludesNaturalTs(dir, ts) )
+ {
+ // temporary debug trace -- remove soon
+ DBG_TRACE(" Allowed to use trx=%d, ts=%d. Looking for space in schedule queue...\n", localTrx, ts);
+
+ ScheduleQueue *scheduleQueue = tsPool.GetQueue(localTrx, ts, dir);
+ if ( (availableEntries=scheduleQueue->
+ FindAvailableEntries(tbf, desiredLevel, precedence, FALSE))
+ > schedAllocInfo->GetNewSlotEntries() )
+ {
+ schedAllocInfo->SetNewSlotAllocation(localTrx, ts, availableEntries);
+ }
+ }
+ }
+ }
+ }
+
+ // temporary debug trace -- remove soon
+ int bestTrx, bestTs, bestEntries;
+ schedAllocInfo->GetNewSlotAllocation(&bestTrx, &bestTs, &bestEntries);
+ DBG_TRACE(" bestEntries=%d, bestTrx=%d, bestTs=%d\n", bestEntries, bestTrx, bestTs);
+
+ DBG_LEAVE();
+ return(schedAllocInfo->GetNewSlotEntries()>0);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::DeallocateUser
+**
+** PURPOSE: Release downlink or uplink resources from a TBF.
+**
+** INPUT PARAMETERS: dir - link direction (DL or UL)
+**
+** RETURN VALUE(S): indicates whether user was allocated (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::DeallocateUser (Tbf* tbf, LinkDirection dir)
+{
+ bool status = TRUE;
+
+ /*-------------------------------------------------------------------------
+ * Loop over all TS on which this TBF was allocated (on assigned trx)
+ *-------------------------------------------------------------------------*/
+ for ( int ts=0; ts<MAX_TIMESLOTS; ts++ )
+ {
+ if ( tbf->allocatedTs[ts] )
+ {
+ /*--------------------------------------------------------------------
+ * For each slot allocated to this user, search all queue levels
+ *--------------------------------------------------------------------*/
+ ScheduleQueue *scheduleQueue = tsPool.GetQueue(tbf->trx, ts, dir);
+ for ( int level=0; level<ScheduleQueue::QUEUE_NUM_LEVELS; level++ )
+ {
+ /*----------------------------------------------------------------
+ * Deallocate entries at this queue level, rebalance remaining
+ *----------------------------------------------------------------*/
+ if ( scheduleQueue->DeallocateEntries(tbf, level) )
+ {
+ scheduleQueue->BalanceEntries(level);
+ }
+ }
+ /*---------------------------------------------------------------------
+ * Update # of users and utilized capacity in this slot and direction
+ *---------------------------------------------------------------------*/
+ ScheduleInfo *scheduleInfo = tsPool.GetScheduleInfo(tbf->trx, ts);
+ scheduleInfo->UpdateUsersAndCapacity(dir);
+ /*---------------------------------------------------------------------
+ * If uplink, release the USF on this slot
+ *---------------------------------------------------------------------*/
+ if ( dir == UL )
+ {
+ tsPool.ReleaseUSF(tbf->trx, ts, ((ULTbf*)tbf)->usf[ts]);
+ }
+ }
+ /*-------------------------------------------------------------------------
+ * Clear the TBF's allocated resources
+ *-------------------------------------------------------------------------*/
+ tbf->allocatedTs[ts] = FALSE;
+ }
+ /*-------------------------------------------------------------------------
+ * Release the TAI and TFI
+ *-------------------------------------------------------------------------*/
+ tsPool.ReleaseTAI(tbf->trx, tbf->taiTs, tbf->tai);
+ if ( dir == DL )
+ {
+ tsPool.ReleaseDLTFI(tbf->trx, tbf->tfi.GetTFI());
+ }
+ else
+ {
+ tsPool.ReleaseULTFI(tbf->trx, tbf->tfi.GetTFI());
+ }
+ return(status);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::GetLeastUtilizedSlot
+**
+** PURPOSE: Get least utilized time slot allocated to TBF
+**
+** INPUT PARAMETERS:
+** pTbf - ptr to TBF structure
+** trx - transceiver index (0..MAX_TRX-1)
+** ts - time slot index (0..MAX_TIMESLOTS-1)
+**
+** RETURN VALUE(S): indicates whether slot was found (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::GetLeastUtilizedSlot(Tbf* tbf, int *trxArg, int *tsArg)
+{
+ float bestCapacity = 1.0;
+ bool status = FALSE;
+
+ *trxArg = tbf->trx;
+
+ for ( int ts=0; ts<MAX_TIMESLOTS; ts++ )
+ {
+ if ( tbf->allocatedTs[ts] )
+ {
+ ScheduleInfo *scheduleInfo = tsPool.GetScheduleInfo(tbf->trx, ts);
+ float capUL = scheduleInfo->GetUtilizedCapacity(UL);
+ float capDL = scheduleInfo->GetUtilizedCapacity(DL);
+ float utilizedCapacity = max(capUL, capDL);
+ if ( utilizedCapacity < bestCapacity )
+ {
+ *tsArg = ts;
+ bestCapacity = utilizedCapacity;
+ status = TRUE;
+ }
+ }
+ }
+ return(status);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::GetNaturalSlot
+**
+** PURPOSE: Get natural time slot for polling TBF
+**
+** INPUT PARAMETERS:
+** pTbf - ptr to TBF structure
+** trx - transceiver index (0..MAX_TRX-1)
+** ts - time slot index (0..MAX_TIMESLOTS-1)
+**
+** RETURN VALUE(S): indicates whether slot was found (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::GetNaturalSlot(Tbf* tbf, int *trxArg, int *tsArg)
+{
+ bool status = FALSE;
+
+ *trxArg = tbf->trx;
+
+ for ( int ts=0; ts<MAX_TIMESLOTS && !status; ts++ )
+ {
+ if ( tbf->naturalTs[ts] )
+ {
+ *tsArg = ts;
+ status = TRUE;
+ }
+ }
+ return(status);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::GetBtsGprsConfig
+**
+** PURPOSE: Get BTS GPRS configuration, including time slots that support
+** GPRS and current utilized GPRS capacity on each of the slots.
+**
+** INPUT PARAMETERS: trx - transceiver index (0..MAX_TRX-1)
+**
+** OUTPUT PARAMETERS:
+** tsMap - boolean array indicating GPRS for each slot
+** cap - utilized GPRS capacity on each slot
+**
+** RETURN VALUE(S): number of GPRS time slots on specified TRX
+**
+**----------------------------------------------------------------------------*/
+int RlcMacTask::GetBtsGprsConfig(int trx, bool* tsMap, float* capUL,
+ float* capDL)
+{
+ int nbrGprsTs(0);
+
+ for ( int ts=0; ts<MAX_TIMESLOTS; ts++ )
+ {
+ if ( grr_GetBtsAmState() == unlocked &&
+ grr_GetTrxAmState(trx) == unlocked &&
+ grr_GetTrxSlotAmState(trx, ts) == unlocked &&
+ grr_GetBtsOpState() == opStateEnabled &&
+ grr_GetTrxOpState(trx) == opStateEnabled &&
+ grr_GetTrxSlotOpState(trx, ts) == opStateEnabled &&
+ grr_GetTrxSlotChanComb(trx, ts)== pDCHData )
+ {
+ ScheduleInfo *scheduleInfo = tsPool.GetScheduleInfo(trx, ts);
+ nbrGprsTs += 1;
+ tsMap[ts] = TRUE;
+ capUL[ts] = scheduleInfo->GetUtilizedCapacity(UL);
+ capDL[ts] = scheduleInfo->GetUtilizedCapacity(DL);
+ }
+ else
+ {
+ tsMap[ts] = FALSE;
+ capUL[ts] = 1.0;
+ capDL[ts] = 1.0;
+ }
+ }
+ return(nbrGprsTs);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::GetBestTrx
+**
+** PURPOSE: Find TRX with most available GPRS capacity on one slot
+**
+** INPUT PARAMETERS: trx - transceiver index (0..MAX_TRX-1)
+**
+** OUTPUT PARAMETERS:
+** tsMap - boolean array indicating GPRS for each slot
+** cap - utilized GPRS capacity on each slot
+**
+** RETURN VALUE(S): number of GPRS time slots on specified TRX
+**
+**----------------------------------------------------------
+int RlcMacTask::GetBestTrx(int* bestTrx, bool* tsMap, float* capUL,
+ float* capDL) const
+{
+ float lowestUtilizedCapacity(1.0);
+ bool* tsMap[MAX_TRX][MAX_TIMESLOTS];
+ float capDL[MAX_TIMESLOTS];
+ float capUL[MAX_TIMESLOTS];
+ float* cap = (direction==DL) ? capDL : capUL;
+ for ( int trx=0; trx<MAX_TRX; trx++ )
+ {
+ GetBtsGprsConfig(trx, tsMap[trx], capDL, capUL);
+ for ( ts=0; ts<MAX_TIMESLOTS; ts++ )
+ {
+ if ( cap[ts] < lowestUtilizedCapacity )
+ {
+ lowestUtilizedCapacity = cap[ts];
+ *bestTrx = trx;
+ }
+ } ......................>>> delete this ?
+ }
+}
+--------------------------------------------------------------*/
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::UpdateAllowedSlots
+**
+** PURPOSE: Update the allowed UL and DL time slots based on the information
+** in the schedule allocation object and the TBF's allocated slots.
+** Note that the schedule allocation object reflects the mobile's
+** multislot capability not constrained by the BTS configuration.
+**
+** INPUT PARAMETERS: schedAllocInfo - ptr to object for allocating schedule
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void RlcMacTask::UpdateAllowedSlots(ScheduleAllocationInfo *schedAllocInfo)
+{
+ /*-------------------------------------------------------------------------
+ * Mark newly allocated slot in Schedule Allocation Info structure
+ *-------------------------------------------------------------------------*/
+ schedAllocInfo->AddSlotAllocation();
+
+ /*-------------------------------------------------------------------------
+ * Mark invalid all multislot configurations that do not include the
+ * time slots allocated to the TBF up to this point. Also update list
+ * of potential natural timeslots in TBF structure.
+ *-------------------------------------------------------------------------*/
+ schedAllocInfo->ConstrainCandMultiConfig();
+}
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/Makefile b/data/mnet/GP10/Host/Rlc_mac/src/Makefile
new file mode 100644
index 0000000..5878e40
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = Rlc_mac
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\$(THIS_APP_DIR).out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) .\bin\*.o
+ $(RM) .\bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MeasurementMappingStruct.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MeasurementMappingStruct.cpp
new file mode 100644
index 0000000..7e1e175
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MeasurementMappingStruct.cpp
@@ -0,0 +1,71 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MeasurementMappingStruct.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "MeasurementMappingStruct.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+// *******************************************************************
+// class MeasurementMappingStruct
+//
+// Description:
+// Measurement Mapping Struct -- GSM04.60 11.2.7
+//
+// < Measurement Mapping struct > ::=
+// < Measurement Starting Time : < Starting Frame Number Description IE > >
+// < MEASUREMENT_INTERVAL : bit (5) >
+// < MEASUREMENT_BITMAP : bit (8) > ;
+// *******************************************************************
+
+
+RlcMacResult MeasurementMappingStruct::EncodeMeasurementMappingStruct(BitStreamOut &dataStream)
+{
+ DBG_FUNC("MeasurementMappingStruct::EncodeNCMeasParamStruct", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack NC Measurement bits into the output bit stream.
+ if (isValid)
+ {
+ result = measStartTime.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ dataStream.InsertBits8(measInterval, 5);
+ dataStream.InsertBits8(measBitMap, 8);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("MeasurementMappingStruct::EncodeNCMeasParamStruct Measurement"
+ "Starting Time not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void MeasurementMappingStruct::DisplayMeasurementMappingStruct(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tMeasurement Mapping Struct\n");
+ measStartTime.DisplayDetails(outObj);
+ outObj->Trace("\tMEAUSUREMENT_INTERVAL ---> %d\n", measInterval);
+ outObj->Trace("\tMEAUSUREMENT_BITMAP ---> %d\n", measBitMap);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MsgBase.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MsgBase.cpp
new file mode 100644
index 0000000..f8b94bf
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MsgBase.cpp
@@ -0,0 +1,46 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgBase.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#include "MsgBase.h"
+#include "logging\vcmodules.h"
+
+DbgOutput MsgBase::MsgDisplayObj("RLC/MAC Msg", RLC_MAC_MSG);
+DbgOutput MsgBase::MsgDisplayDetailObj("RLC/MAC Msg Detail", RLC_MAC_MSG_DETAIL);
+
+
+void DownlinkMsgBase::DisplayMsgShort(BitStreamOut *dataStream)
+{
+ MsgDisplayObj.Trace(msgType.DisplayDownlinkMsgType());
+ if (dataStream)
+ {
+ MsgDisplayObj.HexDump(dataStream->GetBitStream(),
+ dataStream->GetStreamLen());
+ }
+}
+
+
+
+
+void UplinkMsgBase::DisplayMsgShort(BitStreamIn *dataStream)
+{
+ MsgDisplayObj.Trace(msgType.DisplayUplinkMsgType());
+ if (dataStream)
+ {
+ MsgDisplayObj.HexDump(dataStream->GetBitStream(),
+ dataStream->GetStreamLen());
+ }
+}
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketAccessReject.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketAccessReject.cpp
new file mode 100644
index 0000000..0957d96
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketAccessReject.cpp
@@ -0,0 +1,231 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketAccessReject.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "MsgPacketAccessReject.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// PACKET ACCESS REJECT
+//
+// GSM 04.60 11.2.1
+//
+// < Packet Access Reject message content > ::=
+// < PAGE_MODE : bit (2) >
+// < Reject : < Reject struct > >
+// { { 1 < Additional Reject: < Reject struct > > } ** 0
+// < padding bits > } // -- truncation at end of message allowed, bits '0' assumed
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// < Reject struct > ::=
+// { 0 < TLLI : bit (32) >
+// | 1 { 0 < Packet Request Reference : < Packet Request Reference IE > >
+// | 1 < Global TFI : < Global TFI IE > > } }
+// { 0 | 1 < WAIT_INDICATION : bit (8) >
+// < WAIT _INDICATION_SIZE : bit (1) > }
+// ! < Ignore : bit (*) = <no string> > ;
+//
+// *******************************************************************
+
+
+RlcMacResult RejectStruct::EncodeRejectStruct(BitStreamOut &dataStream)
+{
+ DBG_FUNC("RejectStruct::EncodeReject", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Encode the reject struct
+ // < Reject : < Reject struct > >
+ // < Reject struct > ::=
+ // { 0 < TLLI : bit (32) >
+ // | 1 { 0 < Packet Request Reference : < Packet Request Reference IE > >
+ // | 1 < Global TFI : < Global TFI IE > > } }
+ if (tlli.IsValid())
+ {
+ result = dataStream.InsertBits8(0, 1);
+ result = tlli.EncodeIe(dataStream);
+ }
+ else if (packetReqRef.IsValid())
+ {
+ result = dataStream.InsertBits8(2, 2);
+ result = packetReqRef.EncodeIe(dataStream);
+ }
+ else if (globalTFI.IsValid())
+ {
+ result = dataStream.InsertBits8(3, 2);
+ result = globalTFI.EncodeIe(dataStream);
+ }
+ else
+ {
+ DBG_ERROR("RejectStruct::EncodeReject no valid tlli, packet req ref or tfi");
+ result = RLC_MAC_MISSING_IE;
+ }
+
+ // { 0 | 1 < WAIT_INDICATION : bit (8) >
+ // < WAIT _INDICATION_SIZE : bit (1) > }
+ if (result == RLC_MAC_SUCCESS)
+ {
+ if (waitInd.IsValid())
+ {
+ result = dataStream.InsertBits8(1, 1);
+ result = waitInd.EncodeIe(dataStream);
+ }
+ else
+ {
+ result = dataStream.InsertBits8(0, 1);
+ }
+ }
+
+ dataStream.PadToOctetBoundary();
+ DBG_LEAVE();
+ return(result);
+}
+
+
+void RejectStruct::DisplayRejectStruct(DbgOutput *outObj)
+{
+ if (tlli.IsValid())
+ {
+ tlli.DisplayDetails(outObj);
+ }
+ else if (packetReqRef.IsValid())
+ {
+ packetReqRef.DisplayDetails(outObj);
+ }
+ else if (globalTFI.IsValid())
+ {
+ globalTFI.DisplayDetails(outObj);
+ }
+
+ if (waitInd.IsValid())
+ {
+ waitInd.DisplayDetails(outObj);
+ }
+}
+
+
+RlcMacResult MsgPacketAccessReject::EncodeMsg(BitStreamOut &dataStream)
+{
+ DBG_FUNC("MsgPacketAccessReject::EncodeMsg", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result;
+
+ // Encode the Message Type.
+ result = msgType.EncodeMsgType(dataStream);
+
+ // Encode the Page Mode ie.
+ // < PAGE_MODE : bit (2) >
+ result = pageMode.EncodeIe(dataStream);
+
+ // Encode reject.
+ result = reject.EncodeRejectStruct(dataStream);
+
+ // If there is a valid additional reject then encode it.
+ if (additionalReject.isValid)
+ {
+ result = dataStream.InsertBits8(1, 1);
+ result = additionalReject.EncodeRejectStruct(dataStream);
+ }
+
+ dataStream.PadToOctetBoundary();
+ DBG_LEAVE();
+}
+
+
+
+void MsgPacketAccessReject::DisplayMsgDetail()
+{
+ DBG_FUNC("MsgPacketAccessReject::DisplayMsgDetail", RLC_MAC);
+ DBG_ENTER();
+
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ // Print out message type.
+ MsgDisplayDetailObj.Trace(msgType.DisplayDownlinkMsgType());
+
+ // Print out the Page Mode.
+ pageMode.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out the reject struct
+ reject.DisplayRejectStruct(&MsgDisplayDetailObj);
+
+ // Print out the additional reject struct is it exists
+ if (additionalReject.isValid)
+ {
+ MsgDisplayDetailObj.Trace("\tAdditional Reject Struct\n");
+ additionalReject.DisplayRejectStruct(&MsgDisplayDetailObj);
+ }
+ }
+
+ DBG_LEAVE();
+}
+
+
+
+
+
+// *******************************************************************
+// class WaitIndication
+//
+// Description:
+// Wait Indication IE -- GSM04.60 11.2.1
+// *******************************************************************
+
+char waitIndSizeNames[][64] =
+{
+ "units of seconds",
+ "units of 20 milliseconds"
+};
+
+
+RlcMacResult IeWaitIndication::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeWaitIndication::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result;
+
+ // Pack Wait Indication bits into the output bit stream.
+ if ((result = dataStream.InsertBits8(waitInd, 8)) ==
+ RLC_MAC_SUCCESS)
+ {
+ if ((result = dataStream.InsertBits8((unsigned char)waitIndSize, 1)) !=
+ RLC_MAC_SUCCESS)
+ {
+ DBG_ERROR("IeWaitIndication::EncodeIe waitIndSize failure %x\n", result);
+ }
+ }
+ else
+ {
+ DBG_ERROR("IeWaitIndication::EncodeIe waitInd failure %x\n", result);
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeWaitIndication::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tWait Indication -------> %#x\n"
+ "\tWait Indication Size --> %s\n",
+ waitInd, waitIndSizeNames[waitIndSize]);
+ }
+}
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketCellChangeFailure.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketCellChangeFailure.cpp
new file mode 100644
index 0000000..ad89e1e
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketCellChangeFailure.cpp
@@ -0,0 +1,111 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketCellChangeFailure.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "MsgPacketCellChangeFailure.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char causeNames[][64] =
+{
+ "Frequency not implemented",
+ "No response on target cell",
+ "Imm. Assign Reject or Packet Access Reject on target cell",
+ "On going CS connection",
+ "Anonymous Access",
+ "MS in GMM Standby state",
+ "Forced to the Standby state",
+ "Reserved"
+};
+
+// *******************************************************************
+// PACKET CELL CHANGE FAILURE
+//
+// GSM 04.60 11.2.26
+//
+// < Packet Cell Change Failure message content > ::=
+// < TLLI : bit (32) >
+// < ARFCN : bit (10) >
+// < BSIC : bit (6) >
+// < CAUSE : bit (4) >
+// < padding bits > ;
+//
+// *******************************************************************
+
+RlcMacResult MsgPacketCellChangeFailure::DecodeMsg(BitStreamIn &dataStream)
+{
+ DBG_FUNC("MsgPacketCellChangeFailure::DecodeMsg", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Message Type gets decoded earlier.
+
+ // Decode the TLLI ie.
+ // < TLLI : bit (32) >
+ result = tlli.DecodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Decode the ARFCN ie.
+ // < ARFCN : bit (10) >
+ result = arfcn.DecodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Decode the BSIC ie.
+ // < BSIC : bit (6) >
+ result = bsic.DecodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Decode the CAUSE ie.
+ // < CAUSE : bit (4) >
+ unsigned char cause;
+ result = dataStream.ExtractBits8(cause, 4);
+ RLC_MAC_RESULT_CHECK(result);
+ if (failCause > INVALID_CAUSE)
+ failCause = INVALID_CAUSE;
+ else
+ failCause = (FAILURE_CAUSE)cause;
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void MsgPacketCellChangeFailure::DisplayMsgDetail()
+{
+ DBG_FUNC("MsgPacketCellChangeFailure::DisplayMsgDetail", RLC_MAC);
+ DBG_ENTER();
+
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ // Print out message type.
+ MsgDisplayDetailObj.Trace(msgType.DisplayUplinkMsgType());
+
+ // Print out the TLLI.
+ tlli.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out the ARFCN
+ arfcn.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out the BSIC
+ bsic.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out the failure cause.
+ MsgDisplayDetailObj.Trace("\tFailure Cause: %s\n", causeNames[failCause]);
+ }
+
+ DBG_LEAVE();
+}
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketCellChangeOrder.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketCellChangeOrder.cpp
new file mode 100644
index 0000000..22b1c75
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketCellChangeOrder.cpp
@@ -0,0 +1,214 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketCellChangeOrder.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "MsgPacketCellChangeOrder.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// PACKET CELL CHANGE ORDER
+//
+// GSM 04.60 11.2.4
+//
+// < Packet Cell Change Order message content > ::=
+// < PAGE_MODE : bit (2) >
+// { { 0 < Global TFI : < Global TFI IE > >
+// | 10 < TLLI : bit (32) > }
+// { 0 -- Message escape
+// { < IMMEDIATE_REL : bit >
+// < ARFCN : bit (10) >
+// < BSIC : bit (6) >
+// < NC Measurement Parameters : < NC Measurement Parameters struct > >
+// { 0 | 1 < LSA Parameters : < LSA Parameters IE >> }
+// < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Message escape : 1 bit (*) = <no string> > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// < NC Measurement Parameters struct > ::=
+// < NETWORK_CONTROL_ORDER : bit (2) >
+// { 0 | 1 < NC_NON_DRX_PERIOD : bit (3) >
+// < NC_REPORTING_PERIOD_I : bit (3) >
+// < NC_REPORTING_PERIOD_T : bit (3) > }
+// { 0 | 1 < NC_FREQUENCY_LIST : NC Frequency list struct > } ;
+//
+// < NC Frequency list struct > ::=
+// { 0 | 1 < NR_OF_REMOVED_FREQ : bit (5) >
+// { < REMOVED_FREQ_INDEX : bit (6) > } * (1 + val(NR_OF_REMOVED_FREQ)) }
+// { 1 < List of added Frequency : < Add Frequency list struct > >} ** 0;
+//
+// < Add Frequency list struct > ::=
+// < START_FREQUENCY : bit (10) >
+// < BSIC : bit (6) >
+// { 0 | 1 < Cell selection params : < Cell Selection struct > > }
+// < NR_OF_FREQUENCIES : bit (5) >
+// < FREQ_DIFF_LENGTH : bit (3) >
+// { < FREQUENCY_DIFF : bit (val(FREQ_DIFF_LENGTH)) >
+// < BSIC : bit (6) >
+// { 0 | 1 < Cell selection params :
+// < Cell Selection struct > > } } * (val(NR_OF_FREQUENCIES));
+//
+// < Cell Selection struct > ::=
+// < CELL_BAR_ACCESS_2 : bit (1)MsgPacketCellChangeOrder >
+// < EXC_ACC : bit >
+// < SAME_RA_AS_SERVING_CELL : bit (1) >
+// { 0 | 1 < GPRS_RXLEV_ACCESS_MIN : bit (6) >
+// < GPRS_MS_TXPWR_MAX_CCH : bit (5) > }
+// { 0 | 1 < GPRS_TEMPORARY_OFFSET : bit (3) >
+// < GPRS_PENALTY_TIME : bit (5) > }
+// { 0 | 1 < GPRS_RESELECT_OFFSET : bit (5) > }
+// { 0 | 1 < HCS params : < HCS struct > > }
+// { 0 | 1 < SI13_PBCCH_LOCATION : < SI13_PBCCH_LOCATION struct > > } ;
+//
+// < SI13_PBCCH_LOCATION struct > ::=
+// { 0 < SI13_LOCATION : bit (1) >
+// | 1 < PBCCH_LOCATION : bit (2) >
+// < PSI1_REPEAT_PERIOD : bit (4) > } ;
+//
+// < HCS struct > ::=
+// < PRIORITY_CLASS : bit (3) >
+// < HCS_THR : bit (5) > ;
+// *******************************************************************
+
+
+
+
+RlcMacResult MsgPacketCellChangeOrder::EncodeMsg(BitStreamOut &dataStream)
+{
+ DBG_FUNC("MsgPacketCellChangeOrder::EncodeMsg", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Encode the Message Type.
+ result = msgType.EncodeMsgType(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode the Page Mode ie.
+ // < PAGE_MODE : bit (2) >
+ result = pageMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode Global TFI or TLLI.
+ // { { 0 < Global TFI : < Global TFI IE > >
+ // | 10 < TLLI : bit (32) > }
+ if (globalTFI.IsValid())
+ {
+ dataStream.InsertBits8(0, 1);
+ result = globalTFI.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else if (tlli.IsValid())
+ {
+ dataStream.InsertBits8(2, 2);
+ result = tlli.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("MsgPacketCellChangeOrder::EncodeMsg Global TFI, "
+ "or TLLI must be valid\n");
+ }
+ // Encode message escape
+ // { 0 -- Message escape
+ dataStream.InsertBits8(0, 1);
+
+ // Encode IMMEDIATE_REL
+ // { < IMMEDIATE_REL : bit >
+ dataStream.InsertBits8(immediateRel, 1);
+
+ // Encode ARFCN.
+ // < ARFCN : bit (10) >
+ result = arfcn.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode BSIC.
+ // < BSIC : bit (6) >
+ result = bsic.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode NC Measurement Parameters struct
+ // < NC Measurement Parameters : < NC Measurement Parameters struct > >
+ result = ncMeasParam.EncodeNCMeasParamStruct(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode LSA Parameters ie
+ // { 0 | 1 < LSA Parameters : < LSA Parameters IE >> }
+ if (lsaParameters.IsValid())
+ {
+ dataStream.InsertBits8(1,1);
+ result = lsaParameters.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0,1);
+ }
+
+ dataStream.PadToOctetBoundary();
+ DBG_LEAVE();
+ return (result);
+}
+
+
+char immediateRelNames[][64] =
+{
+ "Not required",
+ "Required"
+};
+
+
+void MsgPacketCellChangeOrder::DisplayMsgDetail()
+{
+ DBG_FUNC("MsgPacketCellChangeOrder::DisplayMsgDetail", RLC_MAC);
+ DBG_ENTER();
+
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ // Print out message type.
+ MsgDisplayDetailObj.Trace(msgType.DisplayDownlinkMsgType());
+
+ // Print out the Page Mode.
+ pageMode.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out the Global TFI or TLLI.
+ if (globalTFI.IsValid())
+ {
+ globalTFI.DisplayDetails(&MsgDisplayDetailObj);
+ }
+ else if (tlli.IsValid())
+ {
+ tlli.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out the IMMEDIATE_REL
+ MsgDisplayDetailObj.Trace("\tIMMEDIATE REL ---> %s\n", immediateRelNames[immediateRel]);
+
+ // Print out the ARFCN
+ arfcn.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out the BSIC
+ bsic.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out the NC Measurement Parameters struct
+ ncMeasParam.DisplayNCMeasParamStruct(&MsgDisplayDetailObj);
+ }
+
+ DBG_LEAVE();
+}
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketControlAcknowledgement.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketControlAcknowledgement.cpp
new file mode 100644
index 0000000..8bab37c
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketControlAcknowledgement.cpp
@@ -0,0 +1,97 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketControlAcknowledgement.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "MsgPacketControlAcknowledgement.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char controlAckNames[][80] =
+{
+ "Reserved",
+ "one block received with RBSN=1 and no block with the same RTI value and RBSN=0",
+ "one block received with RBSN=0 and no block with the same RTI value and RBSN=1",
+ "two blocks received with same RTI, one RBSN=1 and the other RBSN=0"
+};
+
+// *******************************************************************
+// PACKET CONTROL ACKNOWLEDGEMENT
+//
+// GSM 04.60 11.2.2
+//
+// < Packet Control Acknowledgement message content > ::= -- RLC/MAC control block format
+// < TLLI : bit (32) >
+// < CTRL_ACK : bit (2) >
+// < padding bits > ;
+//
+// < Packet Control Acknowledgement 11 bit message > ::= -- 11-bit access burst format
+// < MESSAGE_TYPE : bit (9) == 1111 1100 1 >
+// < CTRL_ACK : bit (2) > ;
+//
+// < Packet Control Acknowledgement 8 bit message > ::= -- 8-bit access burst format
+// < MESSAGE_TYPE : bit (6) == 0111 11 >
+// < CTRL_ACK : bit (2) > ;
+//
+// *******************************************************************
+
+RlcMacResult MsgPacketControlAcknowledgement::DecodeMsg(BitStreamIn &dataStream)
+{
+ DBG_FUNC("MsgPacketControlAcknowledgement::DecodeMsg", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Message Type gets decoded earlier.
+
+ // Decode the TLLI ie if this is not access burst mode.
+ // < TLLI : bit (32) >
+ if (msgType.msgType == RlcMacMsgType::PACKET_CONTROL_ACK)
+ {
+ result = tlli.DecodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+
+ // Decode the control acknowledgement.
+ // < CTRL_ACK : bit (2) >
+ unsigned char ack;
+ result = dataStream.ExtractBits8(ack, 2);
+ RLC_MAC_RESULT_CHECK(result);
+ ctrlAck = (CTRL_ACK)ack;
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void MsgPacketControlAcknowledgement::DisplayMsgDetail()
+{
+ DBG_FUNC("MsgPacketControlAcknowledgement::DisplayMsgDetail", RLC_MAC);
+ DBG_ENTER();
+
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ // Print out message type.
+ MsgDisplayDetailObj.Trace(msgType.DisplayUplinkMsgType());
+
+ // Print out the TLLI.
+ tlli.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out the control ack.
+ MsgDisplayDetailObj.Trace("\tControl Ack: %s\n", controlAckNames[ctrlAck]);
+ }
+
+ DBG_LEAVE();
+}
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketDownlinkAckNack.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketDownlinkAckNack.cpp
new file mode 100644
index 0000000..7b6eea5
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketDownlinkAckNack.cpp
@@ -0,0 +1,157 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketDownlinkAckNack.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "MsgPacketDownlinkAckNack.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// PACKET DOWNLINK ACK NACK
+//
+// GSM 04.60 11.2.6
+//
+// < Packet Downlink Ack/Nack message content > ::=
+// < DOWNLINK_TFI : bit (5) >
+// < Ack/Nack Description : < Ack/Nack Description IE > >
+// { 0 | 1 < Channel Request Description : < Channel Request Description IE > > }
+// < Channel Quality Report : < Channel Quality Report struct > >
+// < padding bits > ;
+//
+// < Channel Quality Report struct > ::=
+// < C_VALUE : bit (6) >
+// < RXQUAL : bit (3) >
+// < SIGN_VAR : bit (6) >
+// { 0 | 1 < I_LEVEL_TN0 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN1 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN2 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN3 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN4 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN5 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN6 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN7 : bit (4) > } ;
+//
+// *******************************************************************
+
+RlcMacResult MsgPacketDownlinkAckNack::DecodeMsg(BitStreamIn &dataStream)
+{
+ DBG_FUNC("MsgPacketDownlinkAckNack::DecodeMsg", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+ unsigned char val;
+
+ // Message Type decoded earlier.
+
+ // Decode the Downlink TFI ie.
+ // < DOWNLINK_TFI : bit (5) >
+ result = dlTfi.DecodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Decode the Ack Nack Descrition ie.
+ // < Ack/Nack Description : < Ack/Nack Description IE > >
+ result = ackNackDescription.DecodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Decode the channel request description ie.
+ // { 0 | 1 < Channel Request Description : < Channel Request Description IE > > }
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ if (val)
+ {
+ result = chanReqDescription.DecodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+
+ // Decode the C_VALUE.
+ // < C_VALUE : bit (6) >
+ result = dataStream.ExtractBits8(cValue, 6);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Decode the RXQUAL.
+ // < RXQUAL : bit (3) >
+ result = dataStream.ExtractBits8(rxqual, 3);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Decode the SIGN_VAR.
+ // < SIGN_VAR : bit (6) >
+ result = dataStream.ExtractBits8(signVar, 6);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Decode the I_LEVEL for each ts.
+ // { 0 | 1 < I_LEVEL_TNx : bit (4) > }
+ for (int i=0; i < MAX_TIMESLOTS; i++)
+ {
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ if (val)
+ {
+ result = dataStream.ExtractBits8(ILevel[i].iLevel, 4);
+ RLC_MAC_RESULT_CHECK(result);
+ ILevel[i].isValid = TRUE;
+
+ }
+ else
+ {
+ ILevel[i].isValid = FALSE;
+ }
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void MsgPacketDownlinkAckNack::DisplayMsgDetail()
+{
+ DBG_FUNC("MsgPacketDownlinkAckNack::DisplayMsgDetail", RLC_MAC);
+ DBG_ENTER();
+
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ // Print out message type.
+ MsgDisplayDetailObj.Trace(msgType.DisplayUplinkMsgType());
+
+ // Print out the TFI.
+ dlTfi.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out the Ack Nack Descrition
+ ackNackDescription.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out the Channel Request Description
+ chanReqDescription.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out the C_VALUE
+ MsgDisplayDetailObj.Trace("\tC_VALUE ---> %d\n", cValue);
+
+ // Print out the RXQUAL
+ MsgDisplayDetailObj.Trace("\tRXQUAL ---> %d\n", rxqual);
+
+ // Print out the SIGN_VAR
+ MsgDisplayDetailObj.Trace("\tSIGN_VAR ---> %d\n", signVar);
+
+ // Print out the I_LEVEL for each ts.
+ for (int i=0; i < MAX_TIMESLOTS; i++)
+ {
+ if (ILevel[i].isValid)
+ {
+ MsgDisplayDetailObj.Trace("\tI_LEVEL_TN%x ---> %d\n", i, ILevel[i].iLevel);
+ }
+ }
+ }
+
+ DBG_LEAVE();
+}
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketDownlinkAssignment.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketDownlinkAssignment.cpp
new file mode 100644
index 0000000..ef8332f
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketDownlinkAssignment.cpp
@@ -0,0 +1,318 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketDownlinkAssignment.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "MsgPacketDownlinkAssignment.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// PACKET DOWNLINK ASSIGNMENT
+//
+// GSM 04.60 11.2.7
+//
+// < Packet Downlink Assignment message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 | 1 <PERSISTENCE_LEVEL : bit (4) > * 4 }
+// { { 0 < Global TFI : < Global TFI IE > >
+// | 10 < TLLI : bit (32) > }
+// { 0 -- Message escape
+// { < MAC_MODE : bit (2) >
+// < RLC_MODE : bit (1) >
+// < CONTROL_ACK : bit (1) >
+// < TIMESLOT_ALLOCATION : bit (8) >
+// < Packet Timing Advance : < Packet Timing Advance IE > >
+// { 0 | 1 < P0 : bit (4) >
+// < BTS_PWR_CTRL_MODE : bit (1) >
+// < PR_MODE : bit (1) >}
+// { { 0 | 1 < Frequency Parameters : < Frequency Parameters IE > > }
+// { 0 | 1 < DOWNLINK_TFI_ASSIGNMENT : bit (5) > }
+// { 0 | 1 < Power Control Parameters : < Power Control Parameters IE > > }
+// { 0 | 1 < TBF Starting Time : < Starting Frame Number Description IE > > }
+// { 0 | 1 < Measurement Mapping : < Measurement Mapping struct > > }
+// < padding bits > } // -- truncation at end of message allowed, bits '0' assumed
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Message escape : 1 bit (*) = <no string> > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// < Measurement Mapping struct > ::=
+// < Measurement Starting Time : < Starting Frame Number Description IE > >
+// < MEASUREMENT_INTERVAL : bit (5) >
+// < MEASUREMENT_BITMAP : bit (8) > ;
+//
+// *******************************************************************
+
+
+
+RlcMacResult MsgPacketDownlinkAssignment::EncodeMsg(BitStreamOut &dataStream)
+{
+ DBG_FUNC("MsgPacketDownlinkAssignment::EncodeMsg", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Encode the Message Type.
+ result = msgType.EncodeMsgType(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode the Page Mode ie.
+ // < PAGE_MODE : bit (2) >
+ result = pageMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode Persistence Level ie.
+ // { 0 | 1 <PERSISTENCE_LEVEL : bit (4) > * 4 }
+ if (PersistenceLevelParams.isValid)
+ {
+ for (int i = 0; i < 4; i++)
+ {
+ dataStream.InsertBits8(1, 1);
+ result = PersistenceLevelParams.persistenceLevel[i].EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode Global TFI or TLLI.
+ // { { 0 < Global TFI : < Global TFI IE > >
+ // | 10 < TLLI : bit (32) > }
+ if (globalTFI.IsValid())
+ {
+ dataStream.InsertBits8(0, 1);
+ result = globalTFI.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(2, 2);
+ result = tlli.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+
+ // { 0 -- Message escape
+ dataStream.InsertBits8(0, 1);
+
+ // Encode MAC mode ie.
+ // { < MAC_MODE : bit (2) >
+ result = macMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode RLC mode ie.
+ // < RLC_MODE : bit (1) >
+ result = rlcMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode Control ACK bit
+ // < CONTROL_ACK : bit (1) >
+ dataStream.InsertBits8(controlAck, 1);
+
+ // Encode Timeslot Allocation ie.
+ // < TIMESLOT_ALLOCATION : bit (8) >
+ result = tsAllocation.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode Packet Timing Advance ie.
+ // < Packet Timing Advance : < Packet Timing Advance IE > >
+ result = timingAdvance.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode PO, BTS_PWR_CTL_MODE, and PR_MODE bits.
+ // { 0 | 1 < P0 : bit (4) >
+ // < BTS_PWR_CTRL_MODE : bit (1) >
+ // < PR_MODE : bit (1) >}
+ if (PwrParams.isValid)
+ {
+ dataStream.InsertBits8(1, 1);
+ result = PwrParams.po.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ result = PwrParams.pCtlMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ result = PwrParams.prMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode Frequency Parameters ie.
+ // { { 0 | 1 < Frequency Parameters : < Frequency Parameters IE > > }
+ if (frequencyParameters.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = frequencyParameters.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode Downlink TFI Assignment ie.
+ // { 0 | 1 < DOWNLINK_TFI_ASSIGNMENT : bit (5) > }
+ if (dlTFIAssignment.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = dlTFIAssignment.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode Power Control Parameters ie.
+ // { 0 | 1 < Power Control Parameters : < Power Control Parameters IE > > }
+ if (powerControlParameters.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = powerControlParameters.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode TBF Starting Time ie.
+ // { 0 | 1 < TBF Starting Time : < Starting Frame Number Description IE > > }
+ if (tbfStartingTime.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = tbfStartingTime.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode Measurement Mapping struct.
+ // { 0 | 1 < Measurement Mapping : < Measurement Mapping struct > > }
+ if (measMapping.isValid)
+ {
+ dataStream.InsertBits8(1, 1);
+ result = measMapping.EncodeMeasurementMappingStruct(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ dataStream.PadToOctetBoundary();
+ DBG_LEAVE();
+ return (result);
+}
+
+
+
+void MsgPacketDownlinkAssignment::DisplayMsgDetail()
+{
+ DBG_FUNC("MsgPacketDownlinkAssignment::DisplayMsgDetail", RLC_MAC);
+ DBG_ENTER();
+
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ // Print out message type.
+ MsgDisplayDetailObj.Trace(msgType.DisplayDownlinkMsgType());
+
+ // Print out the Page Mode.
+ pageMode.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out Persistence Level ie.
+ if (PersistenceLevelParams.isValid)
+ {
+ for (int i = 0; i < 4; i++)
+ {
+ PersistenceLevelParams.persistenceLevel[i].DisplayDetails(&MsgDisplayDetailObj);
+ }
+ }
+
+ // Print out Global TFI or TLLI.
+ if (globalTFI.IsValid())
+ {
+ globalTFI.DisplayDetails(&MsgDisplayDetailObj);
+ }
+ else
+ {
+ tlli.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out MAC mode ie.
+ macMode.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out RLC mode ie.
+ rlcMode.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out Control ACK bit
+ MsgDisplayDetailObj.Trace("\tCONTROL_ACK ---> %d\n", controlAck);
+
+ // Print out Timeslot Allocation ie.
+ tsAllocation.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out Packet Timing Advance ie.
+ timingAdvance.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out PO, BTS_PWR_CTL_MODE, and PR_MODE bits.
+ if (PwrParams.isValid)
+ {
+ PwrParams.po.DisplayDetails(&MsgDisplayDetailObj);
+ PwrParams.pCtlMode.DisplayDetails(&MsgDisplayDetailObj);
+ PwrParams.prMode.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Frequency Parameters ie.
+ if (frequencyParameters.IsValid())
+ {
+ frequencyParameters.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Downlink TFI Assignment ie.
+ if (dlTFIAssignment.IsValid())
+ {
+ dlTFIAssignment.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Power Control Parameters ie.
+ if (powerControlParameters.IsValid())
+ {
+ powerControlParameters.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out TBF Starting Time ie.
+ if (tbfStartingTime.IsValid())
+ {
+ tbfStartingTime.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Measurement Mapping struct.
+ if (measMapping.isValid)
+ {
+ measMapping.DisplayMeasurementMappingStruct(&MsgDisplayDetailObj);
+ }
+ }
+
+ DBG_LEAVE();
+}
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketDownlinkDummyControlBlock.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketDownlinkDummyControlBlock.cpp
new file mode 100644
index 0000000..749df02
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketDownlinkDummyControlBlock.cpp
@@ -0,0 +1,98 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketDownlinkDummyControlBlock.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "MsgPacketDownlinkDummyControlBlock.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// PACKET DOWNLINK DUMMY CONTROL BLOCK
+//
+// GSM 04.60 11.2.7
+//
+// < Packet Downlink Dummy Control Block message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 | 1 <PERSISTENCE_LEVEL : bit (4) > * 4 }
+// < padding bits >
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// *******************************************************************
+
+
+
+RlcMacResult MsgPacketDownlinkDummyControlBlock::EncodeMsg(BitStreamOut &dataStream)
+{
+ DBG_FUNC("MsgPacketDownlinkDummyControlBlock::EncodeMsg", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Encode the Message Type.
+ result = msgType.EncodeMsgType(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode the Page Mode ie.
+ // < PAGE_MODE : bit (2) >
+ result = pageMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode Persistence Level ie.
+ // { 0 | 1 <PERSISTENCE_LEVEL : bit (4) > * 4 }
+ if (persistenceLevel.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = persistenceLevel.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ dataStream.PadToOctetBoundary();
+ DBG_LEAVE();
+ return (result);
+}
+
+
+
+void MsgPacketDownlinkDummyControlBlock::DisplayMsgDetail()
+{
+ DBG_FUNC("MsgPacketDownlinkDummyControlBlock::DisplayMsgDetail", RLC_MAC);
+ DBG_ENTER();
+
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ // Print out message type.
+ MsgDisplayDetailObj.Trace(msgType.DisplayDownlinkMsgType());
+
+ // Print out the Page Mode.
+ pageMode.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out Persistence Level ie.
+ if (persistenceLevel.IsValid())
+ {
+ persistenceLevel.DisplayDetails(&MsgDisplayDetailObj);
+ }
+ }
+
+ DBG_LEAVE();
+}
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketMobileTBFStatus.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketMobileTBFStatus.cpp
new file mode 100644
index 0000000..ff128f8
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketMobileTBFStatus.cpp
@@ -0,0 +1,114 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketMobileTBFStatus.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "MsgPacketMobileTBFStatus.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char tbfCauseNames[][80] =
+{
+ "Normal event",
+ "Status, unspecified",
+ "Syntactically incorrect message, non-distribution part error",
+ "Syntactically incorrect message, message escape",
+ "Message not compatible with current protocol state"
+};
+
+// *******************************************************************
+// PACKET MOBILE TBF STATUS
+//
+// GSM 04.60 11.2.9c
+//
+// < Packet Mobile TBF Status message content > ::=
+// < GLOBAL TFI : < Global TFI IE > >
+// < TBF_CAUSE : bit (3) >
+// { 0 | 1 < STATUS_MESSAGE_TYPE : bit (6) > }
+// < padding bits > ;
+//
+// *******************************************************************
+
+RlcMacResult MsgPacketMobileTBFStatus::DecodeMsg(BitStreamIn &dataStream)
+{
+ DBG_FUNC("MsgPacketMobileTBFStatus::DecodeMsg", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+ unsigned char val;
+
+ // Message Type gets decoded earlier.
+
+ // Decode the Global TFI ie.
+ // < GLOBAL TFI : < Global TFI IE > >
+ result = globalTfi.DecodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Decode the TBF Cause.
+ // < TBF_CAUSE : bit (3) >
+ result = dataStream.ExtractBits8(val, 3);
+ RLC_MAC_RESULT_CHECK(result);
+ tbfCause = (TBF_CAUSE)val;
+ if (tbfCause > INCOMPATIBLE_WITH_CURRENT_STATE)
+ {
+ tbfCause = STATUS_UNSPECIFIED;
+ }
+
+ // Decode the status message type if present
+ // { 0 | 1 < STATUS_MESSAGE_TYPE : bit (6) > }
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ if (val == 1)
+ {
+ result = StatusMsgType.msgType.DecodeMsgType(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ StatusMsgType.isValid = TRUE;
+ }
+ else
+ {
+ StatusMsgType.isValid = FALSE;
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void MsgPacketMobileTBFStatus::DisplayMsgDetail()
+{
+ DBG_FUNC("MsgPacketMobileTBFStatus::DisplayMsgDetail", RLC_MAC);
+ DBG_ENTER();
+
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ // Print out message type.
+ MsgDisplayDetailObj.Trace(msgType.DisplayUplinkMsgType());
+
+ // Print out the Global TFI.
+ globalTfi.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out the TBF_CAUSE.
+ MsgDisplayDetailObj.Trace("\tTBF_CAUSE: %s\n", tbfCauseNames[tbfCause]);
+
+ // Print out the Status Message Type if valid
+ if (StatusMsgType.isValid)
+ {
+ MsgDisplayDetailObj.Trace("\tSTATUS_MSG_TYPE ---> %s\n",
+ StatusMsgType.msgType.DisplayDownlinkMsgType());
+ }
+ }
+
+ DBG_LEAVE();
+}
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketPDCHRelease.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketPDCHRelease.cpp
new file mode 100644
index 0000000..ec40db6
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketPDCHRelease.cpp
@@ -0,0 +1,99 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketPDCHRelease.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "MsgPacketPDCHRelease.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// PACKET PDCH RELEASE
+//
+// GSM 04.60 11.2.11
+//
+// < Packet PDCH Release message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 | 1 < TIMESLOTS_AVAILABLE : bit (8) > }
+// < padding bits >
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// *******************************************************************
+
+
+
+RlcMacResult MsgPacketPDCHRelease::EncodeMsg(BitStreamOut &dataStream)
+{
+ DBG_FUNC("MsgPacketPDCHRelease::EncodeMsg", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Encode the Message Type.
+ result = msgType.EncodeMsgType(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode the Page Mode ie.
+ // < PAGE_MODE : bit (2) >
+ result = pageMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode TIMESLOTS_AVAILABLE ie.
+ // { 0 | 1 < TIMESLOTS_AVAILABLE : bit (8) > }
+ if (tsAllocation.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = tsAllocation.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ dataStream.PadToOctetBoundary();
+ DBG_LEAVE();
+ return (result);
+}
+
+
+
+void MsgPacketPDCHRelease::DisplayMsgDetail()
+{
+ DBG_FUNC("MsgPacketPDCHRelease::DisplayMsgDetail", RLC_MAC);
+ DBG_ENTER();
+
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ // Print out message type.
+ MsgDisplayDetailObj.Trace(msgType.DisplayDownlinkMsgType());
+
+ // Print out the Page Mode.
+ pageMode.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out Timeslot Allocation ie.
+ if (tsAllocation.IsValid())
+ {
+ tsAllocation.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ }
+
+ DBG_LEAVE();
+}
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketPagingRequest.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketPagingRequest.cpp
new file mode 100644
index 0000000..9c64526
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketPagingRequest.cpp
@@ -0,0 +1,258 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : msgPacketPagingRequest.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "MsgPacketPagingRequest.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// PACKET PAGING REQUEST
+//
+// GSM 04.60 11.2.10
+//
+// < Packet Paging Request message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 | 1 < PERSISTENCE_LEVEL : bit (4) >* 4}
+// { 0 | 1 < NLN : bit (2) > }
+// { { 1 < Repeated Page info : < Repeated Page info struct > > } ** 0
+// < padding bits > } // -- truncation at end of message allowed, bits '0' assumed
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// < Repeated Page info struct > ::=
+// { 0 -- Page request for TBF establishment
+// { 0 < PTMSI : bit (32) >
+// | 1 < Length of Mobile Identity contents : bit (4) >
+// < Mobile Identity : octet (val (Length of Mobile Identity contents)) > }
+// | 1 -- Page request for RR conn. establishment
+// { 0 < TMSI : bit (32) >
+// | 1 < Length of Mobile Identity contents : bit (4) >
+// < Mobile Identity : octet (val (Length of Mobile Identity contents)) > }
+// < CHANNEL_NEEDED : bit (2) >
+// { 0 | 1 < eMLPP_PRIORITY : bit (3) > } }
+// ! < Ignore : bit (*) = <no string> > ;
+//
+// *******************************************************************
+
+
+
+RlcMacResult MsgPacketPagingRequest::EncodeMsg(BitStreamOut &dataStream)
+{
+ DBG_FUNC("MsgPacketPagingRequest::EncodeMsg", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Encode the Message Type.
+ result = msgType.EncodeMsgType(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode the Page Mode ie.
+ // < PAGE_MODE : bit (2) >
+ result = pageMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode Persistence Level ie.
+ // { 0 | 1 <PERSISTENCE_LEVEL : bit (4) > * 4 }
+ if (persistenceLevel.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = persistenceLevel.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode NLN ie.
+ // { 0 | 1 < NLN : bit (2) > }
+ if (nln.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = nln.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode Repeated Paging Struct
+ // { { 1 < Repeated Page info : < Repeated Page info struct > > } ** 0
+ //
+ // < Repeated Page info struct > ::=
+ // { 0 -- Page request for TBF establishment
+ // { 0 < PTMSI : bit (32) >
+ // | 1 < Length of Mobile Identity contents : bit (4) >
+ // < Mobile Identity : octet (val (Length of Mobile Identity contents)) > }
+ // | 1 -- Page request for RR conn. establishment
+ // { 0 < TMSI : bit (32) >
+ // | 1 < Length of Mobile Identity contents : bit (4) >
+ // < Mobile Identity : octet (val (Length of Mobile Identity contents)) > }
+ // < CHANNEL_NEEDED : bit (2) >
+ // { 0 | 1 < eMLPP_PRIORITY : bit (3) > } }
+ // ! < Ignore : bit (*) = <no string> > ;
+ for (int i = 0; i < MAX_NUM_REPEATED_PAGES; i++)
+ {
+ if (RepeatedPageInfo[i].isValid)
+ {
+ dataStream.InsertBits8(1, 1);
+ if (RepeatedPageInfo[i].TBFPage.isValid)
+ {
+ dataStream.InsertBits8(0, 1);
+ if (RepeatedPageInfo[i].TBFPage.ptmsi.IsValid())
+ {
+ dataStream.InsertBits8(0, 1);
+ result = RepeatedPageInfo[i].TBFPage.ptmsi.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else if (RepeatedPageInfo[i].TBFPage.mobileId.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = RepeatedPageInfo[i].TBFPage.mobileId.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ DBG_ERROR("MsgPacketPagingRequest::EncodeMsg Repeated Page info struct"
+ "for TBF must have valid PTMSI or MobileIdentity\n");
+ result = RLC_MAC_INVALID_IE;
+ }
+ }
+ else if (RepeatedPageInfo[i].RRConnPage.isValid)
+ {
+ dataStream.InsertBits8(1, 1);
+ if (RepeatedPageInfo[i].RRConnPage.tmsi.IsValid())
+ {
+ dataStream.InsertBits8(0, 1);
+ result = RepeatedPageInfo[i].RRConnPage.tmsi.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else if (RepeatedPageInfo[i].RRConnPage.mobileId.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = RepeatedPageInfo[i].RRConnPage.mobileId.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ DBG_ERROR("MsgPacketPagingRequest::EncodeMsg Repeated Page info struct"
+ "for TBF must have valid PTMSI or MobileIdentity\n");
+ result = RLC_MAC_INVALID_IE;
+ }
+
+ result = RepeatedPageInfo[i].RRConnPage.chanNeeded.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ if (RepeatedPageInfo[i].RRConnPage.emlpPriority.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = RepeatedPageInfo[i].RRConnPage.emlpPriority.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+ }
+ else
+ {
+ DBG_ERROR("MsgPacketPagingRequest::EncodeMsg Repeated Page info struct"
+ "must have valid TBF or RR Conn info\n");
+ result = RLC_MAC_INVALID_IE;
+ }
+ }
+ }
+
+ dataStream.PadToOctetBoundary();
+ DBG_LEAVE();
+ return (result);
+}
+
+
+
+void MsgPacketPagingRequest::DisplayMsgDetail()
+{
+ DBG_FUNC("MsgPacketPagingRequest::DisplayMsgDetail", RLC_MAC);
+ DBG_ENTER();
+
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ // Print out message type.
+ MsgDisplayDetailObj.Trace(msgType.DisplayDownlinkMsgType());
+
+ // Print out the Page Mode.
+ pageMode.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out Persistence Level ie.
+ if (persistenceLevel.IsValid())
+ {
+ persistenceLevel.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out NLN ie.
+ if (nln.IsValid())
+ {
+ nln.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Repeated Paging Struct
+ for (int i = 0; i < MAX_NUM_REPEATED_PAGES; i++)
+ {
+ if (RepeatedPageInfo[i].isValid)
+ {
+ if (RepeatedPageInfo[i].TBFPage.isValid)
+ {
+ MsgDisplayDetailObj.Trace("\tRepeated Paging Struct %d - TBF Page\n", i);
+ if (RepeatedPageInfo[i].TBFPage.ptmsi.IsValid())
+ {
+ RepeatedPageInfo[i].TBFPage.ptmsi.DisplayDetails(&MsgDisplayDetailObj);
+ }
+ else if (RepeatedPageInfo[i].TBFPage.mobileId.IsValid())
+ {
+ RepeatedPageInfo[i].TBFPage.mobileId.DisplayDetails(&MsgDisplayDetailObj);
+ }
+ }
+ else if (RepeatedPageInfo[i].RRConnPage.isValid)
+ {
+ MsgDisplayDetailObj.Trace("\tRepeated Paging Struct %d - RR Connection\n", i);
+ if (RepeatedPageInfo[i].RRConnPage.tmsi.IsValid())
+ {
+ RepeatedPageInfo[i].RRConnPage.tmsi.DisplayDetails(&MsgDisplayDetailObj);
+ }
+ else if (RepeatedPageInfo[i].RRConnPage.mobileId.IsValid())
+ {
+ RepeatedPageInfo[i].RRConnPage.mobileId.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ RepeatedPageInfo[i].RRConnPage.chanNeeded.DisplayDetails(&MsgDisplayDetailObj);
+
+ if (RepeatedPageInfo[i].RRConnPage.emlpPriority.IsValid())
+ {
+ RepeatedPageInfo[i].RRConnPage.emlpPriority.DisplayDetails(&MsgDisplayDetailObj);
+ }
+ }
+ }
+ }
+ }
+
+ DBG_LEAVE();
+}
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketPollingRequest.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketPollingRequest.cpp
new file mode 100644
index 0000000..6fde5b7
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketPollingRequest.cpp
@@ -0,0 +1,155 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketPollingRequest.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "MsgPacketPollingRequest.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char typeOfAckNames[][64] =
+{
+ "Packet Control Ack sent as four access bursts",
+ "Packet Control Ack sent as RLC/MAC control block"
+};
+
+// *******************************************************************
+// PACKET POLLING REQUEST
+//
+// GSM 04.60 11.2.12
+//
+// < Packet Polling Request message content > ::=
+// < PAGE_MODE : bit (2) >
+// { { 0 < Global TFI : < Global TFI IE > >
+// | 10 < TLLI : bit (32) >
+// | 110 < TQI : bit (16) > }
+// < TYPE_OF_ACK : bit (1) >
+// { < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// *******************************************************************
+
+
+
+RlcMacResult MsgPacketPollingRequest::EncodeMsg(BitStreamOut &dataStream)
+{
+ DBG_FUNC("MsgPacketPollingRequest::EncodeMsg", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Encode the Message Type.
+ result = msgType.EncodeMsgType(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode the Page Mode ie.
+ // < PAGE_MODE : bit (2) >
+ result = pageMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode Global TFI if valid.
+ // { { 0 < Global TFI : < Global TFI IE > >
+ if (globalTFI.IsValid())
+ {
+ dataStream.InsertBits8(0, 1);
+ result = globalTFI.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ // Encode Global TLLI if valid.
+ // | 10 < TLLI : bit (32) >
+ else if (tlli.IsValid())
+ {
+ dataStream.InsertBits8(2, 2);
+ result = tlli.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ // Encode Global TQI if valid.
+ // | 110 < TQI : bit (16) > }
+ else if (tqi.IsValid())
+ {
+ dataStream.InsertBits8(6, 3);
+ result = tqi.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ DBG_ERROR("MsgPacketPollingRequest::EncodeMsg must have valid "
+ "Global TFI, TLLI or TQI\n");
+ result = RLC_MAC_INVALID_IE;
+ }
+
+ if (typeOfAck != INVALID_TYPE_OF_ACK)
+ {
+ dataStream.InsertBits8((unsigned char)typeOfAck, 1);
+ }
+ else
+ {
+ DBG_ERROR("MsgPacketPollingRequest::EncodeMsg must have valid "
+ "TYPE_OF_ACK parameter\n");
+ result = RLC_MAC_INVALID_IE;
+ }
+
+ dataStream.PadToOctetBoundary();
+ DBG_LEAVE();
+ return (result);
+}
+
+
+
+void MsgPacketPollingRequest::DisplayMsgDetail()
+{
+ DBG_FUNC("MsgPacketPollingRequest::DisplayMsgDetail", RLC_MAC);
+ DBG_ENTER();
+
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ // Print out message type.
+ MsgDisplayDetailObj.Trace(msgType.DisplayDownlinkMsgType());
+
+ // Print out the Page Mode.
+ pageMode.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out Global TFI if valid.
+ if (globalTFI.IsValid())
+ {
+ globalTFI.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Global TLLI if valid.
+ else if (tlli.IsValid())
+ {
+ tlli.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Global TQI if valid.
+ else if (tqi.IsValid())
+ {
+ tqi.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ if (typeOfAck != INVALID_TYPE_OF_ACK)
+ {
+ MsgDisplayDetailObj.Trace("\tTYPE_OF_ACK ---> %s\n", typeOfAckNames[typeOfAck]);
+ }
+ }
+
+ DBG_LEAVE();
+}
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketPowerCtlTimingAdvance.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketPowerCtlTimingAdvance.cpp
new file mode 100644
index 0000000..6f06368
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketPowerCtlTimingAdvance.cpp
@@ -0,0 +1,213 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : msgPacketPowerCtlTimingAdvance.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "msgPacketPowerCtlTimingAdvance.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// PACKET POWER CONTROL / TIMING ADVANCE
+//
+// GSM 04.60 11.2.13
+//
+// < Packet Power Control/Timing Advance message content > ::=
+// < PAGE_MODE : bit (2) >
+// { { 0 < Global TFI : < Global TFI IE > >
+// | 110 < TQI : bit (16) >
+// | 111 < Packet Request Reference : < Packet Request Reference IE > > }
+// { 0 -- Message escape
+// { { 0 | 1 < Global Power Control Parameters : < Global Power Control Parameters IE >> }
+// { 0 < Global Packet Timing Advance : < Global Packet Timing Advance IE > >
+// < Power Control Parameters : < Power Control Parameters IE > >
+// | 1 { 0 < Global Packet Timing Advance : < Global Packet Timing Advance IE > >
+// | 1 < Power Control Parameters : < Power Control parameters IE > > } }
+// < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Message escape : 1 bit (*) = <no string> > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// *******************************************************************
+
+
+
+RlcMacResult MsgPacketPowerCtlTimingAdvance::EncodeMsg(BitStreamOut &dataStream)
+{
+ DBG_FUNC("MsgPacketPowerCtlTimingAdvance::EncodeMsg", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Encode the Message Type.
+ result = msgType.EncodeMsgType(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode the Page Mode ie.
+ // < PAGE_MODE : bit (2) >
+ result = pageMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode Global TFI if valid.
+ // { { 0 < Global TFI : < Global TFI IE > >
+ if (globalTFI.IsValid())
+ {
+ dataStream.InsertBits8(0, 1);
+ result = globalTFI.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ // Encode Global TQI if valid.
+ // | 110 < TQI : bit (16) > }
+ else if (tqi.IsValid())
+ {
+ dataStream.InsertBits8(6, 3);
+ result = tqi.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ // Encode Packet Request Reference if valid.
+ // | 111 < Packet Request Reference : < Packet Request Reference IE > > }
+ else if (packetReqRef.IsValid())
+ {
+ dataStream.InsertBits8(7, 3);
+ result = packetReqRef.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ DBG_ERROR("MsgPacketPowerCtlTimingAdvance::EncodeMsg must have valid "
+ "Global TFI, TQI or Packet Request Ref\n");
+ result = RLC_MAC_INVALID_IE;
+ }
+
+ // { 0 -- Message escape
+ dataStream.InsertBits8(0, 1);
+
+ // Encode Global Power Control Parameters ie.
+ // { { 0 | 1 < Global Power Control Parameters : < Global Power Control Parameters IE >> }
+ if (globalPowerControlParams.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = globalPowerControlParams.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode Global Packet Timing Advance and Power Control Parameters.
+ // { 0 < Global Packet Timing Advance : < Global Packet Timing Advance IE > >
+ // < Power Control Parameters : < Power Control Parameters IE > >
+ // | 1 { 0 < Global Packet Timing Advance : < Global Packet Timing Advance IE > >
+ // | 1 < Power Control Parameters : < Power Control parameters IE > > } }
+ if ((globalTA.IsValid()) && (powerControlParameters.IsValid()))
+ {
+ dataStream.InsertBits8(0, 1);
+ result = globalTA.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ result = powerControlParameters.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(1, 1);
+ if (globalTA.IsValid())
+ {
+ dataStream.InsertBits8(0, 1);
+ result = globalTA.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else if (powerControlParameters.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = powerControlParameters.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ DBG_ERROR("MsgPacketPowerCtlTimingAdvance::EncodeMsg must have valid "
+ "Global TA or Power Control Params\n");
+ result = RLC_MAC_INVALID_IE;
+ }
+ }
+
+ dataStream.PadToOctetBoundary();
+ DBG_LEAVE();
+ return (result);
+}
+
+
+
+void MsgPacketPowerCtlTimingAdvance::DisplayMsgDetail()
+{
+ DBG_FUNC("MsgPacketPowerCtlTimingAdvance::DisplayMsgDetail", RLC_MAC);
+ DBG_ENTER();
+
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ // Print out message type.
+ MsgDisplayDetailObj.Trace(msgType.DisplayDownlinkMsgType());
+
+ // Print out the Page Mode.
+ pageMode.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out Global TFI if valid.
+ if (globalTFI.IsValid())
+ {
+ globalTFI.DisplayDetails(&MsgDisplayDetailObj);
+ }
+ // Print out Global TQI if valid.
+ else if (tqi.IsValid())
+ {
+ tqi.DisplayDetails(&MsgDisplayDetailObj);
+ }
+ // Print out Packet Request Reference if valid.
+ else if (packetReqRef.IsValid())
+ {
+ packetReqRef.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Global Power Control Parameters ie.
+ if (globalPowerControlParams.IsValid())
+ {
+ globalPowerControlParams.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Global Packet Timing Advance and Power Control Parameters.
+ if ((globalTA.IsValid()) && (powerControlParameters.IsValid()))
+ {
+ globalTA.DisplayDetails(&MsgDisplayDetailObj);
+ powerControlParameters.DisplayDetails(&MsgDisplayDetailObj);
+ }
+ else
+ {
+ if (globalTA.IsValid())
+ {
+ globalTA.DisplayDetails(&MsgDisplayDetailObj);
+ }
+ else if (powerControlParameters.IsValid())
+ {
+ powerControlParameters.DisplayDetails(&MsgDisplayDetailObj);
+ }
+ }
+ }
+
+ DBG_LEAVE();
+}
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketResourceRequest.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketResourceRequest.cpp
new file mode 100644
index 0000000..aec4996
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketResourceRequest.cpp
@@ -0,0 +1,219 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketResourceRequest.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "MsgPacketResourceRequest.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// PACKET RESOURCE REQUEST
+//
+// GSM 04.60 11.2.16
+//
+// < Packet Resource Request message content > ::=
+// { 0 | 1 < ACCESS_TYPE : bit (2) > }
+// { 0 < Global TFI : < Global TFI IE > >
+// | 1 < TLLI : < TLLI IE > > }
+// { 0 | 1 < MS Radio Access Capability : < MS Radio Access Capability IE > > }
+// < Channel Request Description : < Channel Request Description IE > >
+// { 0 | 1 < CHANGE_MARK : bit (2) > }
+// < C_VALUE : bit (6) >
+// { 0 | 1 < SIGN_VAR : bit (6) >}
+// { 0 | 1 < I_LEVEL_TN0 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN1 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN2 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN3 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN4 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN5 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN6 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN7 : bit (4) > }
+// < padding bits > ;
+//
+// *******************************************************************
+
+RlcMacResult MsgPacketResourceRequest::DecodeMsg(BitStreamIn &dataStream)
+{
+ DBG_FUNC("MsgPacketResourceRequest::DecodeMsg", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+ unsigned char val;
+
+ // Message Type decoded earlier
+
+ // Decode the ACCESS TYPE.
+ // { 0 | 1 < ACCESS_TYPE : bit (2) > }
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ if (val == 1)
+ {
+ result = accessType.DecodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ accessType.ClearAccessType();
+ }
+
+ // Decode the Global TFI or TLLI ie.
+ // { 0 < Global TFI : < Global TFI IE > >
+ // | 1 < TLLI : < TLLI IE > > }
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ if (val == 0)
+ {
+ result = globalTfi.DecodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ tlli.ClearTLLI();
+ }
+ else
+ {
+ result = tlli.DecodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ globalTfi.ClearGlobalTFI();
+ }
+
+ // Decode the MS Radio Access Capability ie if present.
+ // { 0 | 1 < MS Radio Access Capability : < MS Radio Access Capability IE > > }
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ if (val == 1)
+ {
+ result = msRadioAccessCapability.DecodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ msRadioAccessCapability.ClearMSRadioAccessCapability();
+ }
+
+ // Decode the channel request description ie.
+ // < Channel Request Description : < Channel Request Description IE > >
+ result = chanReqDescription.DecodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Decode the Change Mark ie if present.
+ // { 0 | 1 < CHANGE_MARK : bit (2) > }
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ if (val == 1)
+ {
+ result = changeMark.DecodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ changeMark.ClearChangeMark();
+ }
+
+ // Decode the C_VALUE.
+ // < C_VALUE : bit (6) >
+ result = dataStream.ExtractBits8(cValue, 6);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Decode SIGN_VAR
+ // { 0 | 1 < SIGN_VAR : bit (6) >}
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ if (val == 1)
+ {
+ result = dataStream.ExtractBits8(SignVar.signVar, 6);
+ RLC_MAC_RESULT_CHECK(result);
+ SignVar.isValid = TRUE;
+ }
+ else
+ {
+ SignVar.isValid = FALSE;
+ }
+
+ // Decode the I_LEVEL for each ts.
+ // { 0 | 1 < I_LEVEL_TNx : bit (4) > }
+ for (int i=0; i < MAX_TIMESLOTS; i++)
+ {
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ if (val)
+ {
+ result = dataStream.ExtractBits8(ILevel[i].iLevel, 4);
+ RLC_MAC_RESULT_CHECK(result);
+ ILevel[i].isValid = TRUE;
+
+ }
+ else
+ {
+ ILevel[i].isValid = FALSE;
+ }
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void MsgPacketResourceRequest::DisplayMsgDetail()
+{
+ DBG_FUNC("MsgPacketResourceRequest::DisplayMsgDetail", RLC_MAC);
+ DBG_ENTER();
+
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ // Print out message type.
+ MsgDisplayDetailObj.Trace(msgType.DisplayUplinkMsgType());
+
+ // Print out ACCESS TYPE.
+ accessType.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out the Global TFI or TLLI.
+ if (globalTfi.IsValid())
+ {
+ globalTfi.DisplayDetails(&MsgDisplayDetailObj);
+ }
+ else
+ {
+ tlli.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out the MS Radio Access Capability
+ msRadioAccessCapability.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out the Channel Request Description
+ chanReqDescription.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out the Change Mark
+ changeMark.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out the C_VALUE
+ MsgDisplayDetailObj.Trace("\tC_VALUE ---> %d\n", cValue);
+
+ // Print out the SIGN_VAR
+ if (SignVar.isValid)
+ {
+ MsgDisplayDetailObj.Trace("\tSIGN_VAR ---> %d\n", SignVar.signVar);
+ }
+
+ // Print out the I_LEVEL for each ts.
+ for (int i=0; i < MAX_TIMESLOTS; i++)
+ {
+ if (ILevel[i].isValid)
+ {
+ MsgDisplayDetailObj.Trace("\tI_LEVEL_TN%x ---> %d\n", i, ILevel[i].iLevel);
+ }
+ }
+ }
+
+ DBG_LEAVE();
+}
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketTBFRelease.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketTBFRelease.cpp
new file mode 100644
index 0000000..f26fc36
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketTBFRelease.cpp
@@ -0,0 +1,140 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketTBFRelease.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "MsgPacketTBFRelease.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char tbfRelNames[][64] =
+{
+ "TBF not released",
+ "TBF released"
+};
+
+char tbfRelCauseNames[][64] =
+{
+ "Normal release",
+ "Abnormal release"
+};
+
+// *******************************************************************
+// PACKET TBF RELEASE
+//
+// GSM 04.60 11.2.26
+//
+// < Packet TBF Release message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 < GLOBAL_TFI : Global TFI IE >
+// { < UPLINK_RELEASE : bit (1) >
+// < DOWNLINK_RELEASE : bit (1) >
+// < TBF_RELEASE_CAUSE : bit (4) = { 0000 | 0010 } >
+// < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// *******************************************************************
+
+
+
+RlcMacResult MsgPacketTBFRelease::EncodeMsg(BitStreamOut &dataStream)
+{
+ DBG_FUNC("MsgPacketTBFRelease::EncodeMsg", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Encode the Message Type.
+ result = msgType.EncodeMsgType(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode the Page Mode ie.
+ // < PAGE_MODE : bit (2) >
+ result = pageMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode Global TFI ie.
+ // { 0 < GLOBAL_TFI : Global TFI IE >
+ if (globalTFI.IsValid())
+ {
+ dataStream.InsertBits8(0, 1);
+ result = globalTFI.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ DBG_ERROR("MsgPacketTBFRelease::EncodeMsg must have valid Global TFI\n");
+ result = RLC_MAC_INVALID_IE;
+ }
+
+ // Enocde Uplink Release
+ // { < UPLINK_RELEASE : bit (1) >
+ dataStream.InsertBits8((unsigned char)uplinkRel, 1);
+
+ // Enocde Downlink Release
+ // { < DOWNLINK_RELEASE : bit (1) >
+ dataStream.InsertBits8((unsigned char)downlinkRel, 1);
+
+ // Enocde TBF Release Cause
+ // < TBF_RELEASE_CAUSE : bit (4) = { 0000 | 0010 } >
+ dataStream.InsertBits8((unsigned char)relCause, 1);
+
+ dataStream.PadToOctetBoundary();
+ DBG_LEAVE();
+ return (result);
+}
+
+
+
+void MsgPacketTBFRelease::DisplayMsgDetail()
+{
+ DBG_FUNC("MsgPacketTBFRelease::DisplayMsgDetail", RLC_MAC);
+ DBG_ENTER();
+
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ // Print out message type.
+ MsgDisplayDetailObj.Trace(msgType.DisplayDownlinkMsgType());
+
+ // Print out the Page Mode.
+ pageMode.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out Global TFI ie.
+ if (globalTFI.IsValid())
+ {
+ globalTFI.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Uplink Release
+ MsgDisplayDetailObj.Trace("\tUplink Release --> %s\n",
+ tbfRelNames[uplinkRel]);
+
+ // Print out Downlink Release
+ MsgDisplayDetailObj.Trace("\tDownlink Release --> %s\n",
+ tbfRelNames[downlinkRel]);
+
+ // Print out TBF Release Cause
+ MsgDisplayDetailObj.Trace("\tTBF Release Cause --> %s\n",
+ tbfRelCauseNames[relCause]);
+ }
+
+ DBG_LEAVE();
+}
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketTimeslotReconfigure.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketTimeslotReconfigure.cpp
new file mode 100644
index 0000000..d97349f
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketTimeslotReconfigure.cpp
@@ -0,0 +1,302 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketTimeslotReconfigure.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "MsgPacketTimeslotReconfigure.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// PACKET TIMESLOT RECONFIGURE
+//
+// GSM 04.60 11.2.31
+//
+// < Packet Timeslot Reconfigure message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 < GLOBAL_TFI : < Global TFI IE > >
+// { 0 -- Message escape
+// { < CHANNEL_CODING_COMMAND : bit (2) >
+// < Global Packet Timing Advance : < Global Packet Timing Advance IE > >
+// < DOWNLINK_RLC_MODE : bit (1) >
+// < CONTROL_ACK : bit (1) >
+// { 0 | 1 < DOWNLINK_TFI_ASSIGNMENT : bit (5) > }
+// { 0 | 1 < UPLINK_TFI_ASSIGNMENT : bit (5) > }
+// < DOWNLINK_TIMESLOT_ALLOCATION : bit (8) >
+// { 0 | 1 < Frequency Parameters : < Frequency Parameters IE > > }
+// { 0 < Dynamic Allocation : < Dynamic Allocation struct > >
+// | 1 < Fixed allocation : < Fixed Allocation struct > >}
+// < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Message escape : 1 bit (*) = <no string> > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// <Dynamic Allocation struct > ::=
+// < Extended Dynamic Allocation : bit (1) >
+// { 0 | 1 < P0 : bit (4) >
+// < PR_MODE : bit (1) > }
+// < USF_GRANULARITY : bit (1) >
+// { 0 | 1 < RLC_DATA_BLOCKS_GRANTED : bit (8) > }
+// { 0 | 1 < TBF Starting Time : < Starting Frame Number Description IE > > }
+// { 0 -- Timeslot Allocation
+// { 0 | 1 < USF_TN0 : bit (3) > }
+// { 0 | 1 < USF_TN1 : bit (3) > }
+// { 0 | 1 < USF_TN2 : bit (3) > }
+// { 0 | 1 < USF_TN3 : bit (3) > }
+// { 0 | 1 < USF_TN4 : bit (3) > }
+// { 0 | 1 < USF_TN5 : bit (3) > }
+// { 0 | 1 < USF_TN6 : bit (3) > }
+// { 0 | 1 < USF_TN7 : bit (3) > }
+// | 1 -- Timeslot Allocation with Power Control Parameters
+// < ALPHA : bit (4) >
+// { 0 | < USF_TN0 : bit (3) >
+// < GAMMA_TN0 : bit (5) > }
+// { 0 | 1 < USF_TN1 : bit (3) >
+// < GAMMA_TN1 : bit (5) > }
+// { 0 | 1 < USF_TN2 : bit (3) >
+// < GAMMA_TN2 : bit (5) > }
+// { 0 | 1 < USF_TN3 : bit (3) >
+// < GAMMA_TN3 : bit (5) > }
+// { 0 | 1 < USF_TN4 : bit (3) >
+// < GAMMA_TN4 : bit (5) > }
+// { 0 | 1 < USF_TN5 : bit (3) >
+// < GAMMA_TN5 : bit (5) > }
+// { 0 | 1 < USF_TN6 : bit (3) >
+// < GAMMA_TN6 : bit (5) > }
+// { 0 | 1 < USF_TN7 : bit (3) >
+// < GAMMA_TN7 : bit (5) > } } ;
+//
+// <Fixed Allocation struct > ::=
+// { 0 < UPLINK_TIMESLOT_ALLOCATION : bit (8) >
+// | 1 < Power Control Parameters : < Power Control Parameters IE > > }
+// < FINAL_ALLOCATION : bit (1) >
+// < DOWNLINK_CONTROL_TIMESLOT: bit (3) >
+// { 0 | 1 < P0 : bit (4) >
+// < BTS_PWR_CTRL_MODE : bit (1) >
+// < PR_MODE : bit (1) > }
+// { 0 | 1 < Measurement Mapping : < Measurement Mapping struct > > }
+// < TBF Starting Time : < Starting Frame Number Description IE > >
+// { 0 { 0 -- with length of Allocation Bitmap
+// < BLOCKS_OR_BLOCK_PERIODS : bit (1) >
+// < ALLOCATION_BITMAP_LENGTH : bit (7) >
+// < ALLOCATION_BITMAP : bit (val(ALLOCATION_BITMAP_LENGTH)) >
+// | 1 -- without length of Allocation Bitmap (fills remainder of the message)
+// < ALLOCATION_BITMAP : bit ** > }
+// ! < Message escape : 1 bit (*) = <no string> > } ;
+//
+// < Measurement Mapping struct > ::=
+// < Measurement Starting Time : < Starting Frame Number Description IE >
+// < MEASUREMENT_INTERVAL : bit (5) >
+// < MEASUREMENT_BITMAP : bit (8) > ;
+//
+// *******************************************************************
+
+
+
+RlcMacResult MsgPacketTimeslotReconfigure::EncodeMsg(BitStreamOut &dataStream)
+{
+ DBG_FUNC("MsgPacketTimeslotReconfigure::EncodeMsg", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Encode the Message Type.
+ result = msgType.EncodeMsgType(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode the Page Mode ie.
+ // < PAGE_MODE : bit (2) >
+ result = pageMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode Global TFI.
+ // { 0 < GLOBAL_TFI : < Global TFI IE > >
+ dataStream.InsertBits8(0, 1);
+ result = globalTFI.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // { 0 -- Message escape
+ dataStream.InsertBits8(0, 1);
+
+ // Encode Channel Coding Command ie.
+ // { < CHANNEL_CODING_COMMAND : bit (2) >
+ result = chanCoding.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+
+ // Encode Global Packet Timing Advance ie.
+ // < Global Packet Timing Advance : < Global Packet Timing Advance IE > >
+ result = globalTimingAdvance.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode Downlink RLC Mode ie.
+ // < DOWNLINK_RLC_MODE : bit (1) >
+ result = dlRlcMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode Control ACK bit
+ // < CONTROL_ACK : bit (1) >
+ dataStream.InsertBits8(controlAck, 1);
+
+ // Encode Downlink TFI if valid.
+ // { 0 | 1 < DOWNLINK_TFI_ASSIGNMENT : bit (5) > }
+ if (dlTfi.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = dlTfi.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode Uplink TFI if valid.
+ // { 0 | 1 < UPLINK_TFI_ASSIGNMENT : bit (5) > }
+ if (ulTfi.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = ulTfi.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode Downlink Timeslot Allocation ie.
+ // < DOWNLINK_TIMESLOT_ALLOCATION : bit (8) >
+ result = dlTimeslotAllocation.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode Frequency Parameters ie.
+ // { 0 | 1 < Frequency Parameters : < Frequency Parameters IE > > }
+ if (frequencyParameters.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = frequencyParameters.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode Dynamic Allocation, or Fixed Allocation.
+ // { 0 < Dynamic Allocation : < Dynamic Allocation struct > >
+ // | 1 < Fixed allocation : < Fixed Allocation struct > >}
+ if (dynamicAllocation.isValid)
+ {
+ dataStream.InsertBits8(0, 1);
+ result = dynamicAllocation.EncodeDynamicAllocationStruct(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else if (fixedAllocation.isValid)
+ {
+ dataStream.InsertBits8(1, 1);
+ result = fixedAllocation.EncodeFixedAllocationStruct(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("MsgPacketTimeslotReconfigure::EncodeMsgPacketTimeslotReconfigure Dynamic, "
+ "or Fixed Allocation must be valid\n");
+ }
+
+ dataStream.PadToOctetBoundary();
+ DBG_LEAVE();
+ return (result);
+}
+
+
+
+void MsgPacketTimeslotReconfigure::DisplayMsgDetail()
+{
+ DBG_FUNC("MsgPacketTimeslotReconfigure::DisplayMsgDetail", RLC_MAC);
+ DBG_ENTER();
+
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ // Print out message type.
+ MsgDisplayDetailObj.Trace(msgType.DisplayDownlinkMsgType());
+
+ // Print out the Page Mode.
+ pageMode.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out Global TFI
+ if (globalTFI.IsValid())
+ {
+ globalTFI.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Channel Coding Command ie.
+ chanCoding.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out Global Packet Timing Advance ie.
+ globalTimingAdvance.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out Donwlink RLC mode.
+ dlRlcMode.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out Control ACK bit.
+ MsgDisplayDetailObj.Trace("\tCONTROL_ACK ---> %d\n", controlAck);
+
+ // Print out Downlink TFI
+ if (dlTfi.IsValid())
+ {
+ MsgDisplayDetailObj.Trace("\tDownlink TFI\n");
+ dlTfi.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Uplink TFI
+ if (ulTfi.IsValid())
+ {
+ MsgDisplayDetailObj.Trace("\tUplink TFI\n");
+ ulTfi.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Downlink Timeslot Allocation
+ if (dlTimeslotAllocation.IsValid())
+ {
+ dlTimeslotAllocation.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Frequency Parameters ie.
+ if (frequencyParameters.IsValid())
+ {
+ frequencyParameters.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Dynamic Allocation.
+ if (dynamicAllocation.isValid)
+ {
+ dynamicAllocation.DisplayDynamicAllocationStruct(&MsgDisplayDetailObj);
+ }
+
+ // Print out Fixed Allocation.
+ if (fixedAllocation.isValid)
+ {
+ fixedAllocation.DisplayFixedAllocationStruct(&MsgDisplayDetailObj);
+ }
+ }
+
+ DBG_LEAVE();
+}
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketUplinkAckNack.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketUplinkAckNack.cpp
new file mode 100644
index 0000000..c10864d
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketUplinkAckNack.cpp
@@ -0,0 +1,216 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketUplinkAckNack.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "MsgPacketUplinkAckNack.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// PACKET UPLINK ACK NACK
+//
+// GSM 04.60 11.2.28
+//
+// < Packet Uplink Ack/Nack message content > ::=
+// < PAGE MODE : bit (2) >
+// { 00 < UPLINK_TFI : bit (5) >
+// { 0 -- Message escape
+// { < CHANNEL_CODING_COMMAND : bit (2) >
+// < Ack/Nack Description : < Ack/Nack Description IE > >
+// { 0 | 1 < CONTENTION_RESOLUTION_TLLI : bit (32) > }
+// { 0 | 1 < Packet Timing Advance : < Packet Timing Advance IE > > }
+// { 0 | 1 < Power Control Parameters : < Power Control Parameters IE > > }
+// { 0 | 1 < Extension Bits : Extension Bits IE > } -- sub-clause 12.26
+// { 0 | 1 < Fixed Allocation Parameters : < Fixed Allocation struct > > }
+// < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Message escape : 1 bit (*) = <no string> > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// < Fixed Allocation struct > ::=
+// < FINAL_ALLOCATION : bit (1) >
+// { 0 -- Repeat Allocation
+// < TS_OVERRIDE : bit (8) >
+// | 1 -- Allocation with Allocation bitmap
+// < TBF Starting Time : < Starting Frame Number Description IE > >
+// { 0 | 1 <TIMESLOT_ALLOCATION : bit (8) > }
+// { 0 { 0 -- with length of Allocation Bitmap
+// < BLOCKS_OR_BLOCK_PERIODS : bit (1) >
+// < ALLOCATION_BITMAP_LENGTH : bit (7) >
+// < ALLOCATION_BITMAP : bit (val(ALLOCATION_BITMAP_LENGTH)) >
+// | 1 -- without length of Allocation Bitmap (fills remainder of the message)
+// < ALLOCATION_BITMAP : bit ** > } }
+// ! < Message escape : 1 bit (*) = <no string> >;
+//
+// *******************************************************************
+
+
+
+RlcMacResult MsgPacketUplinkAckNack::EncodeMsg(BitStreamOut &dataStream)
+{
+ DBG_FUNC("MsgPacketUplinkAckNack::EncodeMsg", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Encode the Message Type.
+ result = msgType.EncodeMsgType(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode the Page Mode ie.
+ // < PAGE_MODE : bit (2) >
+ result = pageMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode Uplink TFI.
+ // { 00 < UPLINK_TFI : bit (5) >
+ dataStream.InsertBits8(0, 2);
+ result = uplinkTFI.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // { 0 -- Message escape
+ dataStream.InsertBits8(0, 1);
+
+ // Encode Channel Coding Command ie.
+ // { < CHANNEL_CODING_COMMAND : bit (2) >
+ result = chanCoding.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode ACK/NACK Description ie.
+ // < Ack/Nack Description : < Ack/Nack Description IE > >
+ result = ackNackDescription.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode Contention Resolution TLLI ie.
+ // { 0 | 1 < CONTENTION_RESOLUTION_TLLI : bit (32) > }
+ if (contentionResTLLI.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = contentionResTLLI.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode Packet Timing Advance ie.
+ // { 0 | 1 < Packet Timing Advance : < Packet Timing Advance IE > > }
+ if (timingAdvance.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = timingAdvance.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode Power Control Parameters ie.
+ // { 0 | 1 < Power Control Parameters : < Power Control Parameters IE > > }
+ if (powerControlParameters.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = powerControlParameters.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Not supporting extension bits.
+ // { 0 | 1 < Extension Bits : Extension Bits IE > } -- sub-clause 12.26
+ dataStream.InsertBits8(0, 1);
+
+ // Encode Fixed Allocation struct.
+ // { 0 | 1 < Fixed Allocation Parameters : < Fixed Allocation struct > > }
+ if (fixedAllocation.isValid)
+ {
+ dataStream.InsertBits8(1, 1);
+ result = fixedAllocation.EncodeFixedAllocationStruct(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ dataStream.PadToOctetBoundary();
+ DBG_LEAVE();
+ return (result);
+}
+
+
+
+void MsgPacketUplinkAckNack::DisplayMsgDetail()
+{
+ DBG_FUNC("MsgPacketUplinkAckNack::DisplayMsgDetail", RLC_MAC);
+ DBG_ENTER();
+
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ // Print out message type.
+ MsgDisplayDetailObj.Trace(msgType.DisplayDownlinkMsgType());
+
+ // Print out the Page Mode.
+ pageMode.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out Uplink TFI
+ if (uplinkTFI.IsValid())
+ {
+ uplinkTFI.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Channel Coding Command ie.
+ chanCoding.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out ACK/NACK Description ie.
+ ackNackDescription.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out Contention Resolution TLLI ie.
+ if (contentionResTLLI.IsValid())
+ {
+ contentionResTLLI.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Packet Timing Advance ie.
+ if (timingAdvance.IsValid())
+ {
+ timingAdvance.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Power Control Parameters ie.
+ if (powerControlParameters.IsValid())
+ {
+ powerControlParameters.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Fixed Allocation.
+ if (fixedAllocation.isValid)
+ {
+ fixedAllocation.DisplayFixedAllocationStruct(&MsgDisplayDetailObj);
+ }
+ }
+
+ DBG_LEAVE();
+}
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketUplinkAssignment.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketUplinkAssignment.cpp
new file mode 100644
index 0000000..a8ba9c5
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketUplinkAssignment.cpp
@@ -0,0 +1,347 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketUplinkAssignment.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "MsgPacketUplinkAssignment.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char tlliCodeNames[][64] =
+{
+ "CS-1 for RLC block with TLLI",
+ "Command Coding for RLC block with TLLI"
+};
+
+// *******************************************************************
+// PACKET UPLINK ASSIGNMENT
+//
+// GSM 04.60 11.2.29
+//
+// < Packet Uplink Assignment message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 | 1 <PERSISTENCE_LEVEL : bit (4) > * 4 }
+// { { 0 < Global TFI : < Global TFI IE > >
+// | 10 < TLLI : bit (32) >
+// | 110 < TQI : bit (16) >
+// | 111 < Packet Request Reference : < Packet Request Reference IE > > }
+// { 0 -- Message escape
+// { < CHANNEL_CODING_COMMAND : bit (2) >
+// < TLLI_BLOCK_CHANNEL_CODING : bit (1) >
+// < Packet Timing Advance : < Packet Timing Advance IE > >
+// { 0 | 1 < Frequency Parameters : < Frequency Parameters IE > > }
+// { 01 <Dynamic Allocation : < Dynamic Allocation struct > >
+// | 10 <Single Block Allocation : < Single Block Allocation struct > >
+// | 00 < extension >
+// | 11 < Fixed allocation : < Fixed Allocation struct > > }
+// < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Message escape : 1 bit (*) = <no string> > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// <extension> ::= -- Future extension can be done by modifying this structure
+// null ;
+//
+// <Dynamic Allocation struct > ::=
+// < Extended Dynamic Allocation : bit (1) >
+// { 0 | 1 < P0 : bit (4) >
+// < PR_MODE : bit (1) > }
+// < USF_GRANULARITY : bit (1) >
+// { 0 | 1 < UPLINK_TFI_ASSIGNMENT : bit (5) > }
+// { 0 | 1 < RLC_DATA_BLOCKS_GRANTED : bit (8) > }
+// { 0 | 1 < TBF Starting Time : < Starting Frame Number Description IE > > }
+// { 0 -- Timeslot Allocation
+// { 0 | 1 < USF_TN0 : bit (3) > }
+// { 0 | 1 < USF_TN1 : bit (3) > }
+// { 0 | 1 < USF_TN2 : bit (3) > }
+// { 0 | 1 < USF_TN3 : bit (3) > }
+// { 0 | 1 < USF_TN4 : bit (3) > }
+// { 0 | 1 < USF_TN5 : bit (3) > }
+// { 0 | 1 < USF_TN6 : bit (3) > }
+// { 0 | 1 < USF_TN7 : bit (3) > }
+// | 1 -- Timeslot Allocation with Power Control Parameters
+// < ALPHA : bit (4) >
+// { 0 | 1 < USF_TN0 : bit (3) >
+// < GAMMA_TN0 : bit (5) > }
+// { 0 | 1 < USF_TN1 : bit (3) >
+// < GAMMA_TN1 : bit (5) > }
+// { 0 | 1 < USF_TN2 : bit (3) >
+// < GAMMA_TN2 : bit (5) > }
+// { 0 | 1 < USF_TN3 : bit (3) >
+// < GAMMA_TN3 : bit (5) > }
+// { 0 | 1 < USF_TN4 : bit (3) >
+// < GAMMA_TN4 : bit (5) > }
+// { 0 | 1 < USF_TN5 : bit (3) >
+// < GAMMA_TN5 : bit (5) > }
+// { 0 | 1 < USF_TN6 : bit (3) >
+// < GAMMA_TN6 : bit (5) > }
+// { 0 | 1 < USF_TN7 : bit (3) >
+// < GAMMA_TN7 : bit (5) > } } ;
+//
+// <Single Block Allocation struct > ::=
+// < TIMESLOT_NUMBER : bit (3) >
+// { 0 | 1 < ALPHA : bit (4) >
+// < GAMMA_TN : bit (5) >}
+// { 0 | 1 < P0 : bit (4) >
+// < BTS_PWR_CTRL_MODE : bit (1) >
+// < PR_MODE : bit (1) > }
+// < TBF Starting Time : < Starting Frame Number Description IE > > ;
+//
+// <Fixed Allocation struct > ::=
+// { 0 | 1 < UPLINK_TFI_ASSIGNMENT : bit (5) > }
+// < FINAL_ALLOCATION : bit (1) >
+// < DOWNLINK_CONTROL_TIMESLOT: bit (3) >
+// { 0 | 1 < P0 : bit (4) >
+// < BTS_PWR_CTRL_MODE : bit (1) >
+// < PR_MODE : bit (1) > }
+// { 0 < TIMESLOT_ALLOCATION : bit (8) >
+// | 1 < Power Control Parameters : < Power Control Parameters IE > > }
+// < HALF_DUPLEX_MODE : bit (1) >
+// < TBF Starting Time : < Starting Frame Number Description IE > >
+// { 0 { 0 -- with length of Allocation Bitmap
+// < BLOCKS_OR_BLOCK_PERIODS : bit (1) >
+// < ALLOCATION_BITMAP_LENGTH : bit (7) >
+// < ALLOCATION_BITMAP : bit (val(ALLOCATION_BITMAP_LENGTH)) >
+// | 1 -- without length of Allocation Bitmap (fills remainder of the message)
+// < ALLOCATION_BITMAP : bit ** > }
+// ! < Message escape : 1 bit (*) = <no string> > } ;
+//
+// *******************************************************************
+
+
+
+RlcMacResult MsgPacketUplinkAssignment::EncodeMsg(BitStreamOut &dataStream)
+{
+ DBG_FUNC("MsgPacketUplinkAssignment::EncodeMsg", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Encode the Message Type.
+ result = msgType.EncodeMsgType(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode the Page Mode ie.
+ // < PAGE_MODE : bit (2) >
+ result = pageMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode Persistence Level ie.
+ // { 0 | 1 <PERSISTENCE_LEVEL : bit (4) > * 4 }
+ if (PersistenceLevelParams.isValid)
+ {
+ for (int i = 0; i < 4; i++)
+ {
+ dataStream.InsertBits8(1, 1);
+ result = PersistenceLevelParams.persistenceLevel[i].EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode Global TFI, TLLI, TQI, or Packet Request Ref.
+ // { { 0 < Global TFI : < Global TFI IE > >
+ // | 10 < TLLI : bit (32) >
+ // | 110 < TQI : bit (16) >
+ // | 111 < Packet Request Reference : < Packet Request Reference IE > > }
+ if (globalTFI.IsValid())
+ {
+ dataStream.InsertBits8(0, 1);
+ result = globalTFI.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else if (tlli.IsValid())
+ {
+ dataStream.InsertBits8(2, 2);
+ result = tlli.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else if (tqi.IsValid())
+ {
+ dataStream.InsertBits8(6, 3);
+ result = tqi.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else if (packetReqRef.IsValid())
+ {
+ dataStream.InsertBits8(7, 3);
+ result = packetReqRef.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("MsgPacketUplinkAssignment::EncodeMsgPacketUplinkAssignment Global TFI, "
+ "TLLI, TQI or Packet Req Ref must be valid\n");
+ }
+
+ // { 0 -- Message escape
+ dataStream.InsertBits8(0, 1);
+
+ // Encode Channel Coding Command ie.
+ // { < CHANNEL_CODING_COMMAND : bit (2) >
+ result = chanCoding.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode TLLI Block Channel Coding.
+ // < TLLI_BLOCK_CHANNEL_CODING : bit (1) >
+ dataStream.InsertBits8((unsigned char)tlliBlockCoding, 1);
+
+ // Encode Packet Timing Advance ie.
+ // < Packet Timing Advance : < Packet Timing Advance IE > >
+ result = timingAdvance.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // Encode Frequency Parameters ie.
+ // { 0 | 1 < Frequency Parameters : < Frequency Parameters IE > > }
+ if (frequencyParameters.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = frequencyParameters.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode Dynamic Allocation, Single Block Allocation, or Fixed Allocation.
+ // { 01 <Dynamic Allocation : < Dynamic Allocation struct > >
+ // | 10 <Single Block Allocation : < Single Block Allocation struct > >
+ // | 00 < extension >
+ // | 11 < Fixed allocation : < Fixed Allocation struct > > }
+ if (dynamicAllocation.isValid)
+ {
+ dataStream.InsertBits8(1, 2);
+ result = dynamicAllocation.EncodeDynamicAllocationStruct(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else if (singleBlockAllocation.isValid)
+ {
+ dataStream.InsertBits8(1, 2);
+ result = singleBlockAllocation.EncodeSingleBlockAllocationStruct(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else if (fixedAllocation.isValid)
+ {
+ dataStream.InsertBits8(1, 2);
+ result = fixedAllocation.EncodeFixedAllocationStruct(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("MsgPacketUplinkAssignment::EncodeMsgPacketUplinkAssignment Dynamic, "
+ "Single Block, or Fixed Allocation must be valid\n");
+ }
+
+ dataStream.PadToOctetBoundary();
+ DBG_LEAVE();
+ return (result);
+}
+
+
+
+void MsgPacketUplinkAssignment::DisplayMsgDetail()
+{
+ DBG_FUNC("MsgPacketUplinkAssignment::DisplayMsgDetail", RLC_MAC);
+ DBG_ENTER();
+
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ // Print out message type.
+ MsgDisplayDetailObj.Trace(msgType.DisplayDownlinkMsgType());
+
+ // Print out the Page Mode.
+ pageMode.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out Persistence Level ie.
+ if (PersistenceLevelParams.isValid)
+ {
+ for (int i = 0; i < 4; i++)
+ {
+ PersistenceLevelParams.persistenceLevel[i].DisplayDetails(&MsgDisplayDetailObj);
+ }
+ }
+
+ // Print out Global TFI
+ if (globalTFI.IsValid())
+ {
+ globalTFI.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out TLLI
+ if (tlli.IsValid())
+ {
+ tlli.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out TQI
+ if (tqi.IsValid())
+ {
+ tqi.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Request Ref.
+ if (packetReqRef.IsValid())
+ {
+ packetReqRef.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Channel Coding Command ie.
+ chanCoding.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out TLLI Block Channel Coding.
+ MsgDisplayDetailObj.Trace("\tTLLI Block Channel Coding ---> %s\n",
+ tlliCodeNames[tlliBlockCoding]);
+
+ // Print out Packet Timing Advance ie.
+ timingAdvance.DisplayDetails(&MsgDisplayDetailObj);
+
+ // Print out Frequency Parameters ie.
+ if (frequencyParameters.IsValid())
+ {
+ frequencyParameters.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ // Print out Dynamic Allocation.
+ if (dynamicAllocation.isValid)
+ {
+ dynamicAllocation.DisplayDynamicAllocationStruct(&MsgDisplayDetailObj);
+ }
+
+ // Print out Single Block Allocation.
+ if (singleBlockAllocation.isValid)
+ {
+ singleBlockAllocation.DisplaySingleBlockAllocationStruct(&MsgDisplayDetailObj);
+ }
+
+ // Print out Fixed Allocation.
+ if (fixedAllocation.isValid)
+ {
+ fixedAllocation.DisplayFixedAllocationStruct(&MsgDisplayDetailObj);
+ }
+ }
+
+ DBG_LEAVE();
+}
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketUplinkDummyControlBlock.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketUplinkDummyControlBlock.cpp
new file mode 100644
index 0000000..8df9955
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MsgPacketUplinkDummyControlBlock.cpp
@@ -0,0 +1,67 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MsgPacketUplinkDummyControlBlock.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "MsgPacketUplinkDummyControlBlock.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// PACKET UPLINK DUMMY CONTROL BLOCK
+//
+// GSM 04.60 11.2.8b
+//
+// < Packet Uplink Dummy Control Block message content > ::=
+// < TLLI : bit (32) >
+// < padding bits > ;
+//
+// *******************************************************************
+
+RlcMacResult MsgPacketUplinkDummyControlBlock::DecodeMsg(BitStreamIn &dataStream)
+{
+ DBG_FUNC("MsgPacketUplinkDummyControlBlock::DecodeMsg", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Message Type gets decoded earlier.
+
+ // Decode the TLLI ie.
+ // < TLLI : bit (32) >
+ result = tlli.DecodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void MsgPacketUplinkDummyControlBlock::DisplayMsgDetail()
+{
+ DBG_FUNC("MsgPacketUplinkDummyControlBlock::DisplayMsgDetail", RLC_MAC);
+ DBG_ENTER();
+
+ if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
+ {
+ // Print out message type.
+ MsgDisplayDetailObj.Trace(msgType.DisplayUplinkMsgType());
+
+ // Print out the TLLI.
+ tlli.DisplayDetails(&MsgDisplayDetailObj);
+ }
+
+ DBG_LEAVE();
+}
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/MultislotConfigurationGenerator.cpp b/data/mnet/GP10/Host/Rlc_mac/src/MultislotConfigurationGenerator.cpp
new file mode 100644
index 0000000..85f26e8
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/MultislotConfigurationGenerator.cpp
@@ -0,0 +1,180 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : MultislotConfigurationGenerator.cpp
+// Author(s) : Daryl Kaiser
+// Create Date : 1/29/2001
+// Description :
+//
+// *******************************************************************
+
+#include "ScheduleAllocationInfo.h"
+
+/*----------------------------------------------------------------------------**
+** Multislot Pattern Tables
+**----------------------------------------------------------------------------*/
+const int ScheduleAllocationInfo::nbrTsPatterns[PAT_ORDER] = {1,7,21,35,35,21,7,1};
+
+const char ScheduleAllocationInfo::tsPattern[PAT_ORDER][PAT_INDEX][PAT_SLOTS] = {
+
+// -------------------------- Pattern Order 1 -----------------------------------
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+
+// -------------------------- Pattern Order 2 -----------------------------------
+0,1,0,0,0,0,0,0, 0,2,0,0,0,0,0,0, 0,3,0,0,0,0,0,0, 0,4,0,0,0,0,0,0, 0,5,0,0,0,0,0,0,
+0,6,0,0,0,0,0,0, 0,7,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+
+// -------------------------- Pattern Order 3 -----------------------------------
+0,1,2,0,0,0,0,0, 0,1,3,0,0,0,0,0, 0,1,4,0,0,0,0,0, 0,1,5,0,0,0,0,0, 0,1,6,0,0,0,0,0,
+0,1,7,0,0,0,0,0, 0,2,3,0,0,0,0,0, 0,2,4,0,0,0,0,0, 0,2,5,0,0,0,0,0, 0,2,6,0,0,0,0,0,
+0,2,7,0,0,0,0,0, 0,3,4,0,0,0,0,0, 0,3,5,0,0,0,0,0, 0,3,6,0,0,0,0,0, 0,3,7,0,0,0,0,0,
+0,4,5,0,0,0,0,0, 0,4,6,0,0,0,0,0, 0,4,7,0,0,0,0,0, 0,5,6,0,0,0,0,0, 0,5,7,0,0,0,0,0,
+0,6,7,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+
+// -------------------------- Pattern Order 4 -----------------------------------
+0,1,2,3,0,0,0,0, 0,1,2,4,0,0,0,0, 0,1,2,5,0,0,0,0, 0,1,2,6,0,0,0,0, 0,1,2,7,0,0,0,0,
+0,1,3,4,0,0,0,0, 0,1,3,5,0,0,0,0, 0,1,3,6,0,0,0,0, 0,1,3,7,0,0,0,0, 0,1,4,5,0,0,0,0,
+0,1,4,6,0,0,0,0, 0,1,4,7,0,0,0,0, 0,1,5,6,0,0,0,0, 0,1,5,7,0,0,0,0, 0,1,6,7,0,0,0,0,
+0,2,3,4,0,0,0,0, 0,2,3,5,0,0,0,0, 0,2,3,6,0,0,0,0, 0,2,3,7,0,0,0,0, 0,2,4,5,0,0,0,0,
+0,2,4,6,0,0,0,0, 0,2,4,7,0,0,0,0, 0,2,5,6,0,0,0,0, 0,2,5,7,0,0,0,0, 0,2,6,7,0,0,0,0,
+0,3,4,5,0,0,0,0, 0,3,4,6,0,0,0,0, 0,3,4,7,0,0,0,0, 0,3,5,6,0,0,0,0, 0,3,5,7,0,0,0,0,
+0,3,6,7,0,0,0,0, 0,4,5,6,0,0,0,0, 0,4,5,7,0,0,0,0, 0,4,6,7,0,0,0,0, 0,5,6,7,0,0,0,0,
+
+// -------------------------- Pattern Order 5 -----------------------------------
+0,1,2,3,4,0,0,0, 0,1,2,3,5,0,0,0, 0,1,2,3,6,0,0,0, 0,1,2,3,7,0,0,0, 0,1,2,4,5,0,0,0,
+0,1,2,4,6,0,0,0, 0,1,2,4,7,0,0,0, 0,1,2,5,6,0,0,0, 0,1,2,5,7,0,0,0, 0,2,3,6,7,0,0,0,
+0,1,3,4,5,0,0,0, 0,1,3,4,6,0,0,0, 0,1,3,4,7,0,0,0, 0,1,3,5,6,0,0,0, 0,1,3,5,7,0,0,0,
+0,1,3,6,7,0,0,0, 0,1,4,5,6,0,0,0, 0,1,4,5,7,0,0,0, 0,1,4,6,7,0,0,0, 0,1,5,6,7,0,0,0,
+0,2,3,4,5,0,0,0, 0,2,3,4,6,0,0,0, 0,2,3,4,7,0,0,0, 0,2,3,5,6,0,0,0, 0,2,3,5,7,0,0,0,
+0,2,3,6,7,0,0,0, 0,2,4,5,6,0,0,0, 0,2,4,5,7,0,0,0, 0,2,4,6,7,0,0,0, 0,2,5,6,7,0,0,0,
+0,3,4,5,6,0,0,0, 0,3,4,5,7,0,0,0, 0,3,4,6,7,0,0,0, 0,3,5,6,7,0,0,0, 0,4,5,6,7,0,0,0,
+
+// -------------------------- Pattern Order 6 -----------------------------------
+0,1,2,3,4,5,0,0, 0,1,2,3,4,6,0,0, 0,1,2,3,4,7,0,0, 0,1,2,3,5,6,0,0, 0,1,2,3,5,7,0,0,
+0,1,2,3,6,7,0,0, 0,1,2,4,5,6,0,0, 0,1,2,4,5,7,0,0, 0,1,2,4,6,7,0,0, 0,1,2,5,6,7,0,0,
+0,1,3,4,5,6,0,0, 0,1,3,4,5,7,0,0, 0,1,3,4,6,7,0,0, 0,1,3,5,6,7,0,0, 0,1,4,5,6,7,0,0,
+0,2,3,4,5,6,0,0, 0,2,3,4,5,7,0,0, 0,2,3,4,6,7,0,0, 0,2,3,5,6,7,0,0, 0,2,4,5,6,7,0,0,
+0,3,4,5,6,7,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+
+// -------------------------- Pattern Order 7 -----------------------------------
+0,1,2,3,4,5,6,0, 0,1,2,3,4,5,7,0, 0,1,2,3,4,6,7,0, 0,1,2,3,5,6,7,0, 0,1,2,4,5,6,7,0,
+0,1,3,4,5,6,7,0, 0,2,3,4,5,6,7,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+
+// -------------------------- Pattern Order 8 -----------------------------------
+0,1,2,3,4,5,6,7, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0};
+
+/*----------------------------------------------------------------------------**
+** Multislot Configuration Tables
+**----------------------------------------------------------------------------*/
+const int ScheduleAllocationInfo::nbrMultiConfig[MULTI_CLASS] =
+{1,3,4,7,10,11,12,14,23,24,27,28};
+
+const char ScheduleAllocationInfo::multiMaxDlSlots[MULTI_CLASS] =
+{1,2,2,3,2,3,3,4,3,4,4,4};
+
+const char ScheduleAllocationInfo::multiMaxUlSlots[MULTI_CLASS] =
+{1,1,2,1,2,2,3,1,2,2,3,4};
+
+#define M char(-1)
+const char ScheduleAllocationInfo::ms[MULTI_SETS][MULTI_PARMS] = {
+1,7,1,1, M,1,1, 0,7,1,1, 0,1,1, 0,6,1,1, 1,1,1, 0,5,1,1, 2,1,1,
+0,6,2,1, 0,1,1, 0,6,2,1, 1,1,1, 0,5,2,1, 2,1,1, 0,5,2,2, 1,1,1,
+0,5,2,2, 2,1,1, 0,5,3,1, 1,1,1, 0,5,3,1, 2,1,1, 0,4,3,2, 2,1,1,
+0,4,3,7, 2,1,1, 0,4,4,1, 2,1,1, 1,7,1,1, M,2,1, 0,6,1,1, 0,2,1,
+0,5,1,1, 1,2,1, 1,6,1,1, M,2,2, 0,5,1,1, 0,2,2, 0,6,2,1, 0,2,1,
+0,5,2,1, 1,2,1, 0,5,2,1, 0,2,2, 0,5,2,2, 1,2,1, 0,5,3,1, 1,2,1,
+1,6,1,1, M,3,1, 0,5,1,1, 0,3,1, 0,5,2,1, 0,3,1, 1,5,1,1, M,4,1 };
+
+const char* ScheduleAllocationInfo::multiConfig[MULTI_CLASS][MULTI_INDEX] = {
+
+// ---------------------- Multislot Class 1 ------------------------------
+&ms[1][0],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+
+// ---------------------- Multislot Class 2 ------------------------------
+&ms[1][0],&ms[2][0],&ms[5][0],
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+
+// ---------------------- Multislot Class 3 ------------------------------
+&ms[1][0],&ms[2][0],&ms[5][0],&ms[15][0],
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+
+// ---------------------- Multislot Class 4 ------------------------------
+&ms[0][0],&ms[1][0],&ms[2][0],&ms[4][0],&ms[5][0],&ms[7][0],&ms[9][0],
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+
+// ---------------------- Multislot Class 5 ------------------------------
+&ms[0][0], &ms[1][0],&ms[2][0],&ms[4][0],&ms[5][0],&ms[7][0],&ms[14][0],
+&ms[15][0],&ms[17][0],&ms[19][0],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+
+// ---------------------- Multislot Class 6 ------------------------------
+&ms[0][0], &ms[1][0], &ms[2][0], &ms[4][0],&ms[5][0],&ms[7][0],&ms[9][0],
+&ms[14][0],&ms[15][0],&ms[17][0],&ms[19][0],
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+
+// ---------------------- Multislot Class 7 ------------------------------
+&ms[0][0], &ms[1][0], &ms[2][0], &ms[4][0], &ms[5][0],&ms[7][0],&ms[9][0],
+&ms[14][0],&ms[15][0],&ms[17][0],&ms[19][0],&ms[24][0],
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+
+// ---------------------- Multislot Class 8 ------------------------------
+&ms[0][0],&ms[1][0],&ms[2][0],&ms[3][0], &ms[4][0], &ms[5][0], &ms[6][0],
+&ms[7][0],&ms[8][0],&ms[9][0],&ms[10][0],&ms[11][0],&ms[12][0],
+&ms[13][0],0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+
+// ---------------------- Multislot Class 9 ------------------------------
+&ms[0][0], &ms[1][0], &ms[2][0], &ms[3][0], &ms[4][0], &ms[5][0], &ms[6][0],
+&ms[7][0], &ms[8][0], &ms[9][0], &ms[10][0],&ms[11][0],&ms[12][0],
+&ms[14][0],&ms[15][0],&ms[16][0],&ms[17][0],&ms[18][0],&ms[19][0],
+&ms[20][0],&ms[21][0],&ms[22][0],&ms[23][0],0,0,0,0,0,
+
+// ---------------------- Multislot Class 10 ------------------------------
+&ms[0][0], &ms[1][0], &ms[2][0], &ms[3][0], &ms[4][0], &ms[5][0], &ms[6][0],
+&ms[7][0], &ms[8][0], &ms[9][0], &ms[10][0],&ms[11][0],&ms[12][0],
+&ms[13][0],&ms[14][0],&ms[15][0],&ms[16][0],&ms[17][0],&ms[18][0],&ms[19][0],
+&ms[20][0],&ms[21][0],&ms[22][0],&ms[23][0],0,0,0,0,
+
+// ---------------------- Multislot Class 11 ------------------------------
+&ms[0][0], &ms[1][0], &ms[2][0], &ms[3][0], &ms[4][0], &ms[5][0], &ms[6][0],
+&ms[7][0], &ms[8][0], &ms[9][0], &ms[10][0],&ms[11][0],&ms[12][0],
+&ms[13][0],&ms[14][0],&ms[15][0],&ms[16][0],&ms[17][0],&ms[18][0],&ms[19][0],
+&ms[20][0],&ms[21][0],&ms[22][0],&ms[23][0],
+&ms[24][0],&ms[25][0],&ms[26][0],0,
+
+// ---------------------- Multislot Class 12 ------------------------------
+&ms[0][0], &ms[1][0], &ms[2][0], &ms[3][0], &ms[4][0], &ms[5][0], &ms[6][0],
+&ms[7][0], &ms[8][0], &ms[9][0], &ms[10][0],&ms[11][0],&ms[12][0],
+&ms[13][0],&ms[14][0],&ms[15][0],&ms[16][0],&ms[17][0],&ms[18][0],&ms[19][0],
+&ms[20][0],&ms[21][0],&ms[22][0],&ms[23][0],
+&ms[24][0],&ms[25][0],&ms[26][0],&ms[27][0] };
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/NCMeasurementStruct.cpp b/data/mnet/GP10/Host/Rlc_mac/src/NCMeasurementStruct.cpp
new file mode 100644
index 0000000..b9722d9
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/NCMeasurementStruct.cpp
@@ -0,0 +1,102 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : NCMeasurementStruct.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "NCMeasurementStruct.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char netCtlOrderNames[][64] =
+{
+ "NC0",
+ "NC1",
+ "NC2",
+ "Reserved"
+};
+
+char nonDrxPerNames[][64] =
+{
+ "0.24 sec",
+ "0.48 sec",
+ "0.72 sec",
+ "0.96 sec",
+ "1.20 sec",
+ "1.44 sec",
+ "1.92 sec"
+};
+
+char repPerNames[][64] =
+{
+ "0.48 sec",
+ "0.96 sec",
+ "1.92 sec",
+ "3.84 sec",
+ "7.68 sec",
+ "15.36 sec",
+ "30.72 sec",
+ "61.44 sec"
+};
+
+
+RlcMacResult NCMeasParamStruct::EncodeNCMeasParamStruct(BitStreamOut &dataStream)
+{
+ DBG_FUNC("NCMeasParamStruct::EncodeNCMeasParamStruct", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack NC Measurement bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8(netCtlOrder, 2);
+ if (periodInfo.isValid)
+ {
+ dataStream.InsertBits8(1,1);
+ dataStream.InsertBits8(periodInfo.nonDrxPeriod, 3);
+ dataStream.InsertBits8(periodInfo.reportingPeriodI, 3);
+ dataStream.InsertBits8(periodInfo.reportingPeriodT, 3);
+ }
+ else
+ {
+ dataStream.InsertBits8(0,1);
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("NCMeasParamStruct::DisplayNCMeasParamStruct NC Meas Params not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void NCMeasParamStruct::DisplayNCMeasParamStruct(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tNetwork Control Order ---> %s\n", netCtlOrderNames[netCtlOrder]);
+ if (periodInfo.isValid)
+ {
+ outObj->Trace("\tNon DRX Period ----------> %s\n",
+ nonDrxPerNames[periodInfo.nonDrxPeriod]);
+ outObj->Trace("\tReporting Period I ------> %s\n",
+ repPerNames[periodInfo.reportingPeriodI]);
+ outObj->Trace("\tReporting Period T ------> %s\n",
+ repPerNames[periodInfo.reportingPeriodT]);
+ }
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/RlcMacL1Proc.cpp b/data/mnet/GP10/Host/Rlc_mac/src/RlcMacL1Proc.cpp
new file mode 100644
index 0000000..71aabfa
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/RlcMacL1Proc.cpp
@@ -0,0 +1,1360 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : RlcMacRmMdProc.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#include "RlcMacTask.h"
+#include "Rlc_Mac/RlcMacIntf.h"
+#include "MsgPacketDownlinkDummyControlBlock.h"
+#include "Grr/grr_intf.h"
+
+#include "dsp/dsphmsg.h"
+
+
+extern void sendDsp(unsigned char *buffer, int len);
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::DecodeL1MsgInd
+**
+** PURPOSE: The layer 1 message indication is decoded. If decoding is
+** successful the appropriate action is taken.
+**
+** INPUT PARAMETERS: msgReq - layer 1 message request structure
+**
+** RETURN VALUE(S): JC_SUCCESS
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::DecodeL1MsgInd(RlcMacL1MsgIndType *msgReq)
+{
+ DBG_FUNC("RlcMacTask::DecodeL1MsgInd", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ msgDiscriminator l1MsgDisc = (msgDiscriminator)msgReq->l1Msg[0];
+ msgType l1MsgType = (msgType)((msgReq->l1Msg[1] << 8) | (msgReq->l1Msg[2]));
+
+ if (l1MsgDisc != PDCH_MANAGE_MSG)
+ {
+ DBG_WARNING("RlcMacTask::DecodeL1MsgInd: Invalid msg discriminator %d\n",
+ l1MsgDisc);
+ DBG_LEAVE();
+ return (JC_ERROR);
+ }
+
+ // Decode each l1 message separately.
+ switch (l1MsgType)
+ {
+ case PH_READY2SEND_IND:
+ {
+ MsgReadyToSend l1RTSInd;
+ msgDecodeReadyToSend((char *)msgReq->l1Msg, &l1RTSInd);
+ DBG_TRACE("RLC/MAC: Received PH_READY2SEND_IND msg - TRX(%d) TS(%#x) count(%d)\n",
+ l1RTSInd.header.trx, l1RTSInd.channel.typeTs, l1RTSInd.numBuffs);
+ status = ProcessPhRTSInd(&l1RTSInd);
+ }
+ break;
+ case PH_PRACH_IND:
+ {
+ MsgPrach l1PrachInd;
+ msgDecodePrach((char *)msgReq->l1Msg, &l1PrachInd);
+ DBG_TRACE("RLC/MAC: Received PH_PRACH_IND msg - TRX(%d), TS(%#x), ref(%d)\n"
+ "\tt1(%d) t2(%d) t3(%d) ta(%d) power(%d)\n", l1PrachInd.header.trx,
+ l1PrachInd.channel.typeTs, l1PrachInd.packetAccessRef, l1PrachInd.frameNum.t1,
+ l1PrachInd.frameNum.t2, l1PrachInd.frameNum.t3, l1PrachInd.ta, l1PrachInd.power);
+ }
+ break;
+ case PH_PACCH_IND:
+ {
+ MsgPacchInd l1PacchInd;
+ msgDecodePacch((char *)msgReq->l1Msg, &l1PacchInd);
+ DBG_TRACE("RLC/MAC: Received PH_PACCH_IND msg - TRX(%d) TS(%#x) tag(%d)\n",
+ l1PacchInd.header.trx, l1PacchInd.channel.typeTs, l1PacchInd.tbf);
+ status = ProcessPhPacchInd(&l1PacchInd);
+ }
+ break;
+ case PH_PDTCH_IND:
+ {
+ MsgPdtchInd l1PdtchInd;
+ msgDecodePdtch((char *)msgReq->l1Msg, &l1PdtchInd, msgReq->len);
+ DBG_TRACE("RLC/MAC: Received PH_PDTCH_IND msg - TRX(%d) TS(%#x) rate(%d)\n",
+ l1PdtchInd.header.trx, l1PdtchInd.channel.typeTs, l1PdtchInd.codeRate);
+ status = ProcessPhPdtchInd(&l1PdtchInd);
+ }
+ break;
+ case PDCH_TBF_PTC_IND:
+ {
+ MsgUlPowerTiming l1PtcInd;
+ msgDecodeUlPowerTiming((char *)msgReq->l1Msg, &l1PtcInd);
+ DBG_TRACE("RLC/MAC: Received PDCH_TBF_PTC_IND msg - TRX(%#x) TS(%d)\n",
+ l1PtcInd.header.trx, l1PtcInd.channel.typeTs);
+ }
+ break;
+ case PDCH_UL_TBF_ACT_ACK:
+ {
+ MsgUlTbfActivationAck l1UlActAck;
+ msgDecodeUlTbfActivationAck((char *)msgReq->l1Msg, &l1UlActAck);
+ DBG_TRACE("RLC/MAC: Received PDCH_UL_TBF_ACT_ACK msg - TRX(%d) TLLI(%#x)\n",
+ l1UlActAck.header.trx, l1UlActAck.tlli);
+ }
+ break;
+ case PDCH_DL_TBF_ACT_ACK:
+ {
+ MsgDlTbfActivationAck l1DlActAck;
+ msgDecodeDlTbfActivationAck((char *)msgReq->l1Msg, &l1DlActAck);
+ DBG_TRACE("RLC/MAC: Received PDCH_DL_TBF_ACT_ACK msg - TRX(%d) TLLI(%#x)\n",
+ l1DlActAck.header.trx, l1DlActAck.tlli);
+ }
+ break;
+ case PDCH_UL_TBF_DEACT_ACK:
+ {
+ MsgUlTbfDeactivationAck l1UlDeactAck;
+ msgDecodeUlTbfDeactivationAck((char *)msgReq->l1Msg, &l1UlDeactAck);
+ DBG_TRACE("RLC/MAC: Received PDCH_UL_TBF_DEACT_ACK msg - TRX(%d) TLLI(%#x)\n",
+ l1UlDeactAck.header.trx, l1UlDeactAck.tlli);
+ }
+ break;
+ case PDCH_DL_TBF_DEACT_ACK:
+ {
+ MsgDlTbfDeactivationAck l1DlDeactAck;
+ msgDecodeDlTbfDeactivationAck((char *)msgReq->l1Msg, &l1DlDeactAck);
+ DBG_TRACE("RLC/MAC: Received PDCH_DL_TBF_DEACT_ACK msg - TRX(%d) TLLI(%#x)\n",
+ l1DlDeactAck.header.trx, l1DlDeactAck.tlli);
+ }
+ break;
+ case PDCH_UL_TBF_RECONFIG_ACK:
+ {
+ MsgUlTbfReconfigAck l1UlReconfigAck;
+ msgDecodeUlTbfReconfigAck((char *)msgReq->l1Msg, &l1UlReconfigAck);
+ DBG_TRACE("RLC/MAC: Received PDCH_UL_TBF_RECONFIG_ACK msg - TRX(%d) TLLI(%#x)\n",
+ l1UlReconfigAck.header.trx, l1UlReconfigAck.tlli);
+ }
+ break;
+ case PDCH_DL_TBF_RECONFIG_ACK:
+ {
+ MsgDlTbfReconfigAck l1DlReconfigAck;
+ msgDecodeDlTbfReconfigAck((char *)msgReq->l1Msg, &l1DlReconfigAck);
+ DBG_TRACE("RLC/MAC: Received PDCH_DL_TBF_RECONFIG_ACK msg - TRX(%d) TLLI(%#x)\n",
+ l1DlReconfigAck.header.trx, l1DlReconfigAck.tlli);
+ }
+ break;
+ case PH_PACCH_NACK:
+ {
+ MsgPacchNack l1PacchNack;
+ msgDecodePacchNack((char *)msgReq->l1Msg, &l1PacchNack);
+ DBG_TRACE("RLC/MAC: Received PH_PACCH_NACK msg - TRX(%d) TS(%#x) tag(%d)\n",
+ l1PacchNack.header.trx, l1PacchNack.channel.typeTs, l1PacchNack.tbf);
+ ULTbf *pUlTbf;
+ DLTbf *pDlTbf;
+ if ((pUlTbf = tbfPool.FindULTbf((unsigned char)l1PacchNack.tbf)))
+ {
+ pUlTbf->rlcLink.ReceivePacketControlNack();
+ }
+ else if ((pDlTbf = tbfPool.FindDLTbf((unsigned char)l1PacchNack.tbf)))
+ {
+ pDlTbf->rlcLink.ReceivePacketControlNack();
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::DecodeL1MsgInd: Unkown control ack tag %d\n",
+ l1PacchNack.tbf);
+ status = JC_ERROR;
+ }
+ }
+ break;
+ case PDCH_SINGLE_BLOCK_ASSIGN_ALERT:
+ {
+ MsgSingleBlockAssignAlert l1SingleBlockAssignAlert;
+ msgDecodeSingleBlockAssignAlert((char *)msgReq->l1Msg, &l1SingleBlockAssignAlert);
+ DBG_TRACE("RLC/MAC: Received PDCH_SINGLE_BLOCK_ASSIGN_ALERT msg - TRX(%d), TS(%d)\n"
+ "\tframeNum(%d) ARFCN(%d)\n", l1SingleBlockAssignAlert.header.trx,
+ l1SingleBlockAssignAlert.ts, l1SingleBlockAssignAlert.frameNum,
+ l1SingleBlockAssignAlert.ARFCN);
+ for (int i = 0; i < MAX_TRX; i++)
+ {
+ if (grr_GetTrxSlotArfcn(i, l1SingleBlockAssignAlert.ts) ==
+ l1SingleBlockAssignAlert.ARFCN)
+ {
+ break;
+ }
+ }
+
+ if (i < MAX_TRX)
+ {
+ SendSingleBlockAssignAlertMsg(i, l1SingleBlockAssignAlert.ts,
+ l1SingleBlockAssignAlert.frameNum);
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::DecodeL1MsgInd: Can't match arfcn %d for"
+ "single block assign alert\n", l1SingleBlockAssignAlert.ARFCN);
+ status = JC_ERROR;
+ }
+ }
+ break;
+ case PDCH_DL_ASSIGN_ALERT:
+ {
+ MsgDLAssignAlert l1DLAssignAlert;
+ msgDecodeDLAssignAlert((char *)msgReq->l1Msg, &l1DLAssignAlert);
+ DBG_TRACE("RLC/MAC: Received PDCH_DL_ASSIGN_ALERT msg - TRX(%d) TS(%d)\n"
+ "\tframeNum(%d) ARFCN(%d) tag(%d)\n", l1DLAssignAlert.header.trx,
+ l1DLAssignAlert.ts, l1DLAssignAlert.frameNum,
+ l1DLAssignAlert.ARFCN, l1DLAssignAlert.tag);
+ for (int i = 0; i < MAX_TRX; i++)
+ {
+ if (grr_GetTrxSlotArfcn(i, l1DLAssignAlert.ts) ==
+ l1DLAssignAlert.ARFCN)
+ {
+ break;
+ }
+ }
+
+ if (i < MAX_TRX)
+ {
+ SendDLAssignAlertMsg(i, l1DLAssignAlert.ts,
+ l1DLAssignAlert.frameNum, l1DLAssignAlert.tag);
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::DecodeL1MsgInd: Can't match arfcn %d for "
+ "downlink assign alert\n", l1DLAssignAlert.ARFCN);
+ status = JC_ERROR;
+ }
+ }
+ break;
+ case PH_PACCH_AB_IND:
+ {
+ MsgPacchAbInd l1PacchAbInd;
+ msgDecodePacchAbInd((char *)msgReq->l1Msg, &l1PacchAbInd);
+ DBG_TRACE("RLC/MAC: Received PH_PACCH_AB_IND msg - TRX(%d) TS(%#x) tag(%d) ta(%d)\n",
+ l1PacchAbInd.header.trx, l1PacchAbInd.channel.typeTs, l1PacchAbInd.tag,
+ l1PacchAbInd.ta);
+ DecodeULRlcControlBlockAccessBurst(&l1PacchAbInd);
+ }
+ break;
+ case PDCH_CODE_RATE_REQ:
+ {
+ MsgCodeRateReq l1CodeRateReq;
+ msgDecodeCodeRateReq((char *)msgReq->l1Msg, &l1CodeRateReq);
+ if (l1CodeRateReq.tbfType == 1)
+ {
+ DBG_TRACE("RLC/MAC: Received PDCH_CODE_RATE_REQ msg - tbfType(DL) TFI(%d) Rate(%d)\n",
+ l1CodeRateReq.groupTfi, l1CodeRateReq.codeRate);
+ DLTbf *pDlTbf;
+ IeGlobalTFI tfi;
+ tfi.SetGlobalTFI(l1CodeRateReq.groupTfi, IeGlobalTFI::DOWNLINK_TFI);
+ if ((pDlTbf = tbfPool.FindDLTbf(tfi)))
+ {
+ pDlTbf->rlcLink.SetCurrentCodingRate(
+ (IeChannelCodingCommand::CHANNEL_CODING_COMMAND)l1CodeRateReq.codeRate);
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::DecodeL1MsgInd: Can't match tfi %d for "
+ "CODE RATE REQ\n", l1CodeRateReq.groupTfi);
+ status = JC_ERROR;
+ }
+ }
+ else
+ {
+ DBG_TRACE("RLC/MAC: Received PDCH_CODE_RATE_REQ msg - tbfType(UL) TFI(%d) Rate(%d)\n",
+ l1CodeRateReq.groupTfi, l1CodeRateReq.codeRate);
+ ULTbf *pUlTbf;
+ IeGlobalTFI tfi;
+ tfi.SetGlobalTFI(l1CodeRateReq.groupTfi, IeGlobalTFI::UPLINK_TFI);
+ if ((pUlTbf = tbfPool.FindULTbf(tfi)))
+ {
+ pUlTbf->rlcLink.SetCurrentCodingRate(
+ (IeChannelCodingCommand::CHANNEL_CODING_COMMAND)l1CodeRateReq.codeRate);
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::DecodeL1MsgInd: Can't match tfi %d for "
+ "CODE RATE REQ\n", l1CodeRateReq.groupTfi);
+ status = JC_ERROR;
+ }
+ }
+ }
+ break;
+ default:
+ {
+ DBG_WARNING("RlcMacTask::DecodeL1MsgInd: Invalid msg type %#x\n",
+ l1MsgType);
+ return (JC_ERROR);
+ }
+ }
+
+ DBG_LEAVE();
+ return(status);
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::ProcessPhPdtchInd
+**
+** PURPOSE: A bitstream object is created from the PDTCH INDICATION
+** message. The uplink RLC/MAC header will then be decoded and the
+** appropriate action will be taken.
+**
+** INPUT PARAMETERS: pL1PdtchInd - pointer to the PDTCH message
+**
+** RETURN VALUE(S): JC_OK - no decoding errors
+** JC_ERROR - decoding errors
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::ProcessPhPdtchInd(MsgPdtchInd *pL1PdtchInd)
+{
+ DBG_FUNC("RlcMacTask::ProcessPhPdtchInd", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ // Grab an uplink data block from the uplink data block pool.
+ ULDataBlock *pUlDataBlock = ULRlcLink::sysUlDataBlockPool.GetULDataBlock();
+
+ if (pUlDataBlock)
+ {
+ // A bitstream will be created from the PDTCH INDICATION structure
+ pUlDataBlock->streamIn.InitBitStreamIn((unsigned char *)pL1PdtchInd->data, MAX_RLC_DATA_MSG);
+
+ // Insert the coding rate into the uplink data block.
+ pUlDataBlock->chanCoding.SetChannelCodingCommand(
+ (IeChannelCodingCommand::CHANNEL_CODING_COMMAND)pL1PdtchInd->codeRate);
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessPhPdtchInd: Unable to allocate ULDataBlock\n");
+ status = JC_ERROR;
+ DBG_LEAVE();
+ return(status);
+ }
+
+ // Decode the RLC/MAC message header.
+ if (pUlDataBlock->ulHeader.DecodeULMacHeader(pUlDataBlock->streamIn) == RLC_MAC_SUCCESS)
+ {
+ if (pUlDataBlock->ulHeader.GetPayloadType() == ULMacHeader::RLC_DATA_BLOCK)
+ {
+ // Display header details if enabled.
+ pUlDataBlock->ulHeader.DisplayDetails();
+ pUlDataBlock->DisplayDataBlock();
+ ProcessULRlcDataBlock(pL1PdtchInd, pUlDataBlock);
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessPhPdtchInd: Invalid uplink payload type %d\n",
+ pUlDataBlock->ulHeader.GetPayloadType());
+ status = JC_ERROR;
+ ULRlcLink::sysUlDataBlockPool.ReturnULDataBlock(pUlDataBlock);
+ }
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessPhPdtchInd: Unable to decode MAC header\n");
+ status = JC_ERROR;
+ ULRlcLink::sysUlDataBlockPool.ReturnULDataBlock(pUlDataBlock);
+ }
+
+ DBG_LEAVE();
+ return(status);
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::ProcessPhRTSInd
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: pL1RTSInd - pointer to the RTS message
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::ProcessPhRTSInd(MsgReadyToSend *pL1RTSInd)
+{
+ DBG_FUNC("RlcMacTask::ProcessPhRTSInd", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ // Handle a signalling RTS
+ if ((pL1RTSInd->channel.typeTs >> 3) == CHAN_NUM_IE_PACCH)
+ {
+ bool notDone = TRUE;
+
+ // Update the signalling queue RTS count.
+ tsPool.IncSignallingRTSCount(pL1RTSInd->header.trx, pL1RTSInd->channel.typeTs & 0x07, pL1RTSInd->numBuffs);
+
+ // Send any signalling messages that might be queued.
+ while (notDone)
+ {
+ MsgPacchReq *pPacchMsg = tsPool.DequeueDLSignallingMsg(pL1RTSInd->header.trx, pL1RTSInd->channel.typeTs & 0x07);
+
+ // If there is a queued signalling message then send it.
+ if (pPacchMsg &&
+ (tsPool.GetSignallingRTSCount(pL1RTSInd->header.trx, pL1RTSInd->channel.typeTs & 0x07) > 0))
+ {
+ // Ask the scheduler for a USF
+ ULTbf *pUlTbf;
+ while (1)
+ {
+ ScheduleRLCBlock(pL1RTSInd->header.trx, pL1RTSInd->channel.typeTs & 0x07, &pUlTbf);
+ // Uplink TBF available
+ if (pUlTbf)
+ {
+ if (pUlTbf->rlcLink.IncrementN3101())
+ {
+ pPacchMsg->data[0] |= pUlTbf->usf[pL1RTSInd->channel.typeTs & 0x07];
+ break;
+ }
+ }
+ // No uplink TBFs to schedule.
+ else
+ {
+ break;
+ }
+ }
+
+ char msg[HPI_TX_MSG_SIZE];
+ int len = msgEncodePacch(pPacchMsg, msg + 4);
+ msg[3] = (char)(len >> 24);
+ msg[2] = (char)(len >> 16);
+ msg[1] = (char)(len >> 8);
+ msg[0] = (char)len;
+ sendDsp((unsigned char *)msg, len + 4);
+
+ // Update RTS count. If no more RTS available then we are done sending.
+ tsPool.DecSignallingRTSCount(pL1RTSInd->header.trx, pL1RTSInd->channel.typeTs & 0x07);
+ if (tsPool.GetSignallingRTSCount(pL1RTSInd->header.trx, pL1RTSInd->channel.typeTs & 0x07) == 0)
+ {
+ notDone = FALSE;
+ }
+ }
+ else
+ {
+ // Send a dummy block if needed. Only send a single dummy block even
+ // though more RTS's might be available.
+ SendDownlinkDummyControlBlock(pL1RTSInd->header.trx, pL1RTSInd->channel.typeTs & 0x07);
+ notDone = FALSE;
+ }
+ }
+ }
+ // Handle a data RTS
+ else if ((pL1RTSInd->channel.typeTs >> 3) == CHAN_NUM_IE_PDTCH)
+ {
+ // Update the data queue RTS count.
+ tsPool.IncDataRTSCount(pL1RTSInd->header.trx, pL1RTSInd->channel.typeTs & 0x07,
+ pL1RTSInd->numBuffs);
+
+ // Try and send data block(s). If no data blocks sent then try and send
+ // a dummy control block.
+ if (!SendDownlinkDataBlock(pL1RTSInd->header.trx, pL1RTSInd->channel.typeTs & 0x07))
+ {
+ SendDownlinkDummyControlBlock(pL1RTSInd->header.trx, pL1RTSInd->channel.typeTs & 0x07);
+ }
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessPhRTSInd: Invalid channel type %#x\n", pL1RTSInd->channel.typeTs);
+ }
+
+ DBG_LEAVE();
+ return(status);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendDownlinkDataBlock
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: trx - trx to send dummy block
+** ts - timeslot to send dummy block
+**
+** RETURN VALUE(S): TRUE - if data block sent
+** FALSE - if data block not sent
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::SendDownlinkDataBlock(int trx, int ts)
+{
+ DBG_FUNC("RlcMacTask::SendDownlinkDataBlock", RLC_MAC);
+ DBG_ENTER();
+
+ bool blockSent = FALSE;
+ bool notDone = TRUE;
+ DLTbf *pFirstDlTbf = 0;
+
+ // Make sure we have at least one RTS available.
+ if (tsPool.GetDataRTSCount(trx, ts) == 0)
+ {
+ notDone = FALSE;
+ }
+
+ while (notDone)
+ {
+ DLTbf *pDlTbf;
+
+ // If available get the next downlink
+ ScheduleRLCBlock(trx, ts, &pDlTbf);
+
+ // If a downlink TBF is available then grab a data block to send.
+ if (pDlTbf)
+ {
+ // If the same TBF has been seen twice and a packet is not available
+ // then don't loop again.
+ if (pDlTbf == pFirstDlTbf)
+ {
+ notDone = FALSE;
+ }
+ else
+ {
+ // Record the first TBF that the scheduler returns.
+ if (!pFirstDlTbf)
+ {
+ pFirstDlTbf = pDlTbf;
+ }
+
+ DLDataBlock *pDlDataBlock;
+ unsigned char ctrlAckTag;
+ char burstType;
+
+ // Grab a data block from the DL tbf.
+ if ((pDlDataBlock = pDlTbf->rlcLink.GetDLRlcBlock(ctrlAckTag, burstType, trx, ts)))
+ {
+ SendPdtchMsg(trx, ts, ctrlAckTag, burstType, pDlDataBlock);
+
+ // Update RTS count. If no more RTS available then we are done sending.
+ tsPool.DecDataRTSCount(trx, ts);
+ if (tsPool.GetDataRTSCount(trx, ts) == 0)
+ {
+ notDone = FALSE;
+ }
+ blockSent = TRUE;
+ pFirstDlTbf = 0;
+ }
+ }
+ }
+ // No downlink TBF available so just return.
+ else
+ {
+ notDone = FALSE;
+ }
+ }
+ DBG_LEAVE();
+ return(blockSent);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendDownlinkDummyControlBlock
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: trx - trx to send dummy block
+** ts - timeslot to send dummy block
+**
+** RETURN VALUE(S): TRUE - if dummy block sent
+** FALSE - if dummy block not sent
+**
+**----------------------------------------------------------------------------*/
+bool RlcMacTask::SendDownlinkDummyControlBlock(int trx, int ts)
+{
+ DBG_FUNC("RlcMacTask::SendDownlinkDummyControlBlock", RLC_MAC);
+ DBG_ENTER();
+
+ bool blockSent = FALSE;
+
+ // Only send a dummy block if there are no data messages queued and there are no
+ // control message queued.
+ if ((tsPool.GetSignallingRTSCount(trx, ts) >= MAX_SIGNALLING_RTS_COUNT) &&
+ (tsPool.GetDataRTSCount(trx, ts) >= MAX_DATA_RTS_COUNT) && tbfPool.AnyActiveTBF(trx, ts))
+ {
+ MsgPacketDownlinkDummyControlBlock dummyMsg;
+ DLMacHeader dummyMsgHdr;
+
+ // Assemble RLC/MAC header.
+ dummyMsgHdr.SetPayloadType(DLMacHeader::RLC_CTRL_BLOCK_NO_OPT_OCTETS);
+ // RRBP will not be valid so just set it to anything.
+ dummyMsgHdr.SetRRBP(DLMacHeader::FN_N_13);
+ dummyMsgHdr.SetSPBit(DLMacHeader::RRBP_NOT_VALID);
+ // USF is set later.
+
+ // Assemble Packet Downlink Dummy Control Block.
+ dummyMsg.pageMode.SetPageMode(IePageMode::NORMAL_PAGING);
+
+ if (SendPacchMsg(trx, ts, &dummyMsgHdr, &dummyMsg, CTL_ACK_TAG_NOT_APPLICABLE,
+ RLC_MAC_NORMAL_BURST) != JC_OK)
+ {
+ DBG_WARNING("RlcMacTask::SendDownlinkDummyControlBlock: SendPacchMsg failed\n");
+ }
+
+ blockSent = TRUE;
+ }
+
+ DBG_LEAVE();
+ return(blockSent);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::ProcessPhPacchInd
+**
+** PURPOSE: A bitstream object is created from the PACCH INDICATION
+** message. The uplink RLC/MAC header will then be decoded and the
+** appropriate action will be taken.
+**
+** INPUT PARAMETERS: pL1PacchInd - pointer to the PACCH message
+**
+** RETURN VALUE(S): JC_OK - no decoding errors
+** JC_ERROR - decoding errors
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::ProcessPhPacchInd(MsgPacchInd *pL1PacchInd)
+{
+ DBG_FUNC("RlcMacTask::ProcessPhPacchInd", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ // A bitstream will be created from the PACCH INDICATION structure
+ BitStreamIn l1MsgBitsIn((unsigned char *)pL1PacchInd->data, MAX_RLC_CONTROL_MSG);
+
+ ULMacHeader rlcMacMsgHeader;
+
+ // Decode the RLC/MAC message header.
+ if (rlcMacMsgHeader.DecodeULMacHeader(l1MsgBitsIn) == RLC_MAC_SUCCESS)
+ {
+ // Handle an RLC control block. Note that in the uplink
+ // direction the optional octets are not allowed.
+ if (rlcMacMsgHeader.GetPayloadType() == ULMacHeader::RLC_CTRL_BLOCK_NO_OPT_OCTETS)
+ {
+ // Display header details if enabled.
+ rlcMacMsgHeader.DisplayDetails();
+ DecodeULRlcControlBlock(pL1PacchInd, rlcMacMsgHeader, l1MsgBitsIn);
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessPhPacchInd: Invalid uplink payload type %d\n",
+ rlcMacMsgHeader.GetPayloadType());
+ status = JC_ERROR;
+ }
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessPhPacchInd: Unable to decode MAC header\n");
+ status = JC_ERROR;
+ }
+
+ DBG_LEAVE();
+ return(status);
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendULActivationMsg
+**
+** PURPOSE: Build an Uplink TBF Activation message and send it to
+** the dsp.
+**
+** INPUT PARAMETERS: pUlTbf - pointer to the uplink tbf
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void RlcMacTask::SendULActivationMsg(ULTbf *pUlTbf)
+{
+ DBG_FUNC("RlcMacTask::SendULActivationMsg", RLC_MAC);
+ DBG_ENTER();
+
+ MsgUlTbfActivation actMsg;
+
+ actMsg.header.function = PDCH_MANAGE_MSG;
+ actMsg.header.type = PDCH_UL_TBF_ACT_REQ;
+ actMsg.header.trx = pUlTbf->trx;
+ actMsg.tlli = (int)pUlTbf->tlli.GetTLLI();
+ actMsg.tbfMode = 1; // Dynamic
+ actMsg.groupTfi = (char)pUlTbf->tfi.GetTFI();
+ actMsg.channel = pUlTbf->rlcLink.GetCurrentCodingRate();
+ actMsg.tsAllocation = 0;
+ actMsg.usfTsMap = 0;
+ int tsMask = 1;
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (pUlTbf->allocatedTs[i])
+ {
+ actMsg.tsAllocation |= tsMask;
+ }
+ tsMask <<= 1;
+
+ actMsg.usfTsMap |= (((int)pUlTbf->usf[i]) << i*4);
+ }
+
+ actMsg.tai.tai = (char)pUlTbf->tai;
+ actMsg.tai.ts = (char)pUlTbf->taiTs;
+ // actMsg.startTime
+
+ DBG_TRACE("RLC/MAC: Sending PDCH_UL_TBF_ACT_REQ msg - TBF(%#x)\n"
+ "\tTLLI(%#x) TFI(%d) TRX(%d) TSBitmap(%#x)\n", pUlTbf, pUlTbf->tlli.GetTLLI(),
+ pUlTbf->tfi.GetTFI(), pUlTbf->trx, actMsg.tsAllocation);
+
+ // Encode and send layer 1 message.
+ char msg[HPI_TX_MSG_SIZE];
+ int len = msgEncodeUlTbfActivation(&actMsg, msg + 4);
+ msg[3] = (char)(len >> 24);
+ msg[2] = (char)(len >> 16);
+ msg[1] = (char)(len >> 8);
+ msg[0] = (char)len;
+ sendDsp((unsigned char *)msg, len + 4);
+
+ DBG_LEAVE();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendULReconfigurationMsg
+**
+** PURPOSE: Build an Uplink TBF Reconfiguration message and send it to
+** the dsp.
+**
+** INPUT PARAMETERS: pUlTbf - pointer to the uplink tbf
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void RlcMacTask::SendULReconfigurationMsg(ULTbf *pUlTbf)
+{
+ DBG_FUNC("RlcMacTask::SendULReconfigurationMsg", RLC_MAC);
+ DBG_ENTER();
+
+ MsgUlTbfReconfig reconMsg;
+
+ reconMsg.header.function = PDCH_MANAGE_MSG;
+ reconMsg.header.type = PDCH_UL_TBF_RECONFIG_REQ;
+ reconMsg.header.trx = pUlTbf->trx;
+ reconMsg.tlli = (int)pUlTbf->tlli.GetTLLI();
+ reconMsg.tbfMode = 1; // Dynamic
+ reconMsg.groupTfi = (char)pUlTbf->tfi.GetTFI();
+ reconMsg.channel = pUlTbf->rlcLink.GetCurrentCodingRate();
+ reconMsg.tsAllocation = 0;
+ reconMsg.usfTsMap = 0;
+ int tsMask = 1;
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (pUlTbf->allocatedTs[i])
+ {
+ reconMsg.tsAllocation |= tsMask;
+ }
+ tsMask <<= 1;
+
+ reconMsg.usfTsMap |= (((int)pUlTbf->usf[i]) << i*4);
+ }
+
+ reconMsg.tai.tai = (char)pUlTbf->tai;
+ reconMsg.tai.ts = (char)pUlTbf->taiTs;
+ // actMsg.startTime
+
+ DBG_TRACE("RLC/MAC: Sending PDCH_UL_TBF_RECONFIG_REQ msg - TBF(%#x)\n"
+ "\tTLLI(%#x) TFI(%d) TRX(%d) TSBitmap(%#x)\n", pUlTbf, pUlTbf->tlli.GetTLLI(),
+ pUlTbf->tfi.GetTFI(), pUlTbf->trx, reconMsg.tsAllocation);
+
+ // Encode and send layer 1 message.
+ char msg[HPI_TX_MSG_SIZE];
+ int len = msgEncodeUlTbfReconfig(&reconMsg, msg + 4);
+ msg[3] = (char)(len >> 24);
+ msg[2] = (char)(len >> 16);
+ msg[1] = (char)(len >> 8);
+ msg[0] = (char)len;
+ sendDsp((unsigned char *)msg, len + 4);
+
+ DBG_LEAVE();
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendULDeactivationMsg
+**
+** PURPOSE: Build an Uplink TBF Deactivation message and send it to
+** the dsp.
+**
+** INPUT PARAMETERS: pUlTbf - pointer to the uplink tbf
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void RlcMacTask::SendULDeactivationMsg(ULTbf *pUlTbf)
+{
+ DBG_FUNC("RlcMacTask::SendULDeactivationMsg", RLC_MAC);
+ DBG_ENTER();
+
+ MsgUlTbfDeactivation deactMsg;
+
+ DBG_TRACE("RLC/MAC: Sending PDCH_UL_TBF_DEACT_REQ msg - TBF(%#x) TLLI(%#x)\n",
+ pUlTbf, pUlTbf->tlli.GetTLLI());
+
+ deactMsg.header.function = PDCH_MANAGE_MSG;
+ deactMsg.header.type = PDCH_UL_TBF_DEACT_REQ;
+ deactMsg.header.trx = pUlTbf->trx;
+ deactMsg.tlli = (int)pUlTbf->tlli.GetTLLI();
+
+ // Encode and send layer 1 message.
+ char msg[HPI_TX_MSG_SIZE];
+ int len = msgEncodeUlTbfDeactivation(&deactMsg, msg + 4);
+ msg[3] = (char)(len >> 24);
+ msg[2] = (char)(len >> 16);
+ msg[1] = (char)(len >> 8);
+ msg[0] = (char)len;
+ sendDsp((unsigned char *)msg, len + 4);
+
+ DBG_LEAVE();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendDLActivationMsg
+**
+** PURPOSE: Build an Downlink TBF Activation message and send it to
+** the dsp.
+**
+** INPUT PARAMETERS: pDlTbf - pointer to the downlink tbf
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void RlcMacTask::SendDLActivationMsg(DLTbf *pDlTbf)
+{
+ DBG_FUNC("RlcMacTask::SendDLActivationMsg", RLC_MAC);
+ DBG_ENTER();
+
+ MsgDlTbfActivation actMsg;
+
+ actMsg.header.function = PDCH_MANAGE_MSG;
+ actMsg.header.type = PDCH_DL_TBF_ACT_REQ;
+ actMsg.header.trx = pDlTbf->trx;
+ actMsg.tlli = (int)pDlTbf->tlli.GetTLLI();
+ actMsg.groupTfi = (char)pDlTbf->tfi.GetTFI();
+ actMsg.channel = pDlTbf->rlcLink.GetCurrentCodingRate();
+ actMsg.tsAllocation = 0;
+ int tsMask = 1;
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (pDlTbf->allocatedTs[i])
+ {
+ actMsg.tsAllocation |= tsMask;
+ }
+ tsMask <<= 1;
+ }
+
+ actMsg.ta = 0; // Need to fix this - incorrect TA type
+ actMsg.msPower = 0; // What should this be????
+ //actMsg.tai.tai = (char)pDlTbf->tai;
+ //actMsg.tai.ts = (char)pDlTbf->taiTs;
+ // actMsg.startTime
+
+ DBG_TRACE("RLC/MAC: Sending PDCH_DL_TBF_ACT_REQ msg - TBF(%#x)\n"
+ "\tTLLI(%#x) TFI(%d) TRX(%d) TSBitmap(%#x)\n", pDlTbf, pDlTbf->tlli.GetTLLI(),
+ pDlTbf->tfi.GetTFI(), pDlTbf->trx, actMsg.tsAllocation);
+
+ // Encode and send layer 1 message.
+ char msg[HPI_TX_MSG_SIZE];
+ int len = msgEncodeDlTbfActivation(&actMsg, msg + 4);
+ msg[3] = (char)(len >> 24);
+ msg[2] = (char)(len >> 16);
+ msg[1] = (char)(len >> 8);
+ msg[0] = (char)len;
+ sendDsp((unsigned char *)msg, len + 4);
+
+ DBG_LEAVE();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendDLReconfigurationMsg
+**
+** PURPOSE: Build an Downlink TBF Reconfiguration message and send it to
+** the dsp.
+**
+** INPUT PARAMETERS: pDlTbf - pointer to the downlink tbf
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void RlcMacTask::SendDLReconfigurationMsg(DLTbf *pDlTbf)
+{
+ DBG_FUNC("RlcMacTask::SendDLReconfigurationMsg", RLC_MAC);
+ DBG_ENTER();
+
+ MsgDlTbfReconfig reconMsg;
+
+ reconMsg.header.function = PDCH_MANAGE_MSG;
+ reconMsg.header.type = PDCH_DL_TBF_RECONFIG_REQ;
+ reconMsg.header.trx = pDlTbf->trx;
+ reconMsg.tlli = (int)pDlTbf->tlli.GetTLLI();
+ reconMsg.groupTfi = (char)pDlTbf->tfi.GetTFI();
+ reconMsg.channel = pDlTbf->rlcLink.GetCurrentCodingRate();
+ reconMsg.tsAllocation = 0;
+ int tsMask = 1;
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (pDlTbf->allocatedTs[i])
+ {
+ reconMsg.tsAllocation |= tsMask;
+ }
+ tsMask <<= 1;
+ }
+
+ //reconMsg.tai.tai = (char)pDlTbf->tai;
+ //reconMsg.tai.ts = (char)pDlTbf->taiTs;
+ // reconMsg.startTime
+
+ DBG_TRACE("RLC/MAC: Sending PDCH_DL_TBF_RECONFIG_REQ msg - TBF(%#x)\n"
+ "\tTLLI(%#x) TFI(%d) TRX(%d) TSBitmap(%#x)\n", pDlTbf, pDlTbf->tlli.GetTLLI(),
+ pDlTbf->tfi.GetTFI(), pDlTbf->trx, reconMsg.tsAllocation);
+
+ // Encode and send layer 1 message.
+ char msg[HPI_TX_MSG_SIZE];
+ int len = msgEncodeDlTbfReconfig(&reconMsg, msg + 4);
+ msg[3] = (char)(len >> 24);
+ msg[2] = (char)(len >> 16);
+ msg[1] = (char)(len >> 8);
+ msg[0] = (char)len;
+ sendDsp((unsigned char *)msg, len + 4);
+
+ DBG_LEAVE();
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendDLDeactivationMsg
+**
+** PURPOSE: Build an Downlink TBF Deactivation message and send it to
+** the dsp.
+**
+** INPUT PARAMETERS: pDlTbf - pointer to the downlink tbf
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void RlcMacTask::SendDLDeactivationMsg(DLTbf *pDlTbf)
+{
+ DBG_FUNC("RlcMacTask::SendDLDeactivationMsg", RLC_MAC);
+ DBG_ENTER();
+
+ MsgDlTbfDeactivation deactMsg;
+
+ DBG_TRACE("RLC/MAC: Sending PDCH_DL_TBF_DEACT_REQ msg - TBF(%#x) TLLI(%#x)\n",
+ pDlTbf, pDlTbf->tlli.GetTLLI());
+
+ deactMsg.header.function = PDCH_MANAGE_MSG;
+ deactMsg.header.type = PDCH_DL_TBF_DEACT_REQ;
+ deactMsg.header.trx = pDlTbf->trx;
+ deactMsg.tlli = (int)pDlTbf->tlli.GetTLLI();
+
+ // Encode and send layer 1 message.
+ char msg[HPI_TX_MSG_SIZE];
+ int len = msgEncodeDlTbfDeactivation(&deactMsg, msg + 4);
+ msg[3] = (char)(len >> 24);
+ msg[2] = (char)(len >> 16);
+ msg[1] = (char)(len >> 8);
+ msg[0] = (char)len;
+ sendDsp((unsigned char *)msg, len + 4);
+
+ DBG_LEAVE();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendSingleBlockAssignAlertMsg
+**
+** PURPOSE: Build a Single Block Assign Alert message and send it to
+** the dsp.
+**
+** INPUT PARAMETERS: trx - trx for the single block assignment
+** ts - timeslot for the single block assignment
+** framNum - absolute frame number for single block assgn
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void RlcMacTask::SendSingleBlockAssignAlertMsg(int trx, int ts, unsigned int frameNum)
+{
+ DBG_FUNC("RlcMacTask::SendSingleBlockAssignAlertMsg", RLC_MAC);
+ DBG_ENTER();
+
+ MsgSingleBlockAssignAlertAck assAlertMsg;
+
+ DBG_TRACE("RLC/MAC: Sending PDCH_SINGLE_BLOCK_ASSIGN_ALERT_ACK msg - TRX(%d) TS(%d)\n"
+ "\tframeNum(%d)", trx, ts, frameNum);
+
+ assAlertMsg.header.function = PDCH_MANAGE_MSG;
+ assAlertMsg.header.type = PDCH_SINGLE_BLOCK_ASSIGN_ALERT_ACK;
+ assAlertMsg.header.trx = (char)trx;
+ assAlertMsg.channel.typeTs = (char)(ts | (CHAN_NUM_IE_PDTCH << 3));
+ assAlertMsg.channel.ccch = 0;
+ assAlertMsg.frameNum = frameNum;
+
+ // Encode and send layer 1 message.
+ char msg[HPI_TX_MSG_SIZE];
+ int len = msgEncodeSingleBlockAssignAlertAck(&assAlertMsg, msg + 4);
+ msg[3] = (char)(len >> 24);
+ msg[2] = (char)(len >> 16);
+ msg[1] = (char)(len >> 8);
+ msg[0] = (char)len;
+ sendDsp((unsigned char *)msg, len + 4);
+
+ DBG_LEAVE();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendDLAssignAlertMsg
+**
+** PURPOSE: Build a Downlink Assign Alert message and send it to
+** the dsp.
+**
+** INPUT PARAMETERS: trx - trx for the single block assignment
+** ts - timeslot for the single block assignment
+** framNum - absolute frame number for single block assgn
+** tag - tag to identify MS with DL assignment
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void RlcMacTask::SendDLAssignAlertMsg(int trx, int ts, unsigned int frameNum, char tag)
+{
+ DBG_FUNC("RlcMacTask::SendDLAssignAlertMsg", RLC_MAC);
+ DBG_ENTER();
+
+ MsgDLAssignAlertAck assAlertMsg;
+
+ DBG_TRACE("RLC/MAC: Sending PDCH_DL_ASSIGN_ALERT_ACK msg - TRX(%d) TS(%d)"
+ "frameNum(%d) tag(%d)\n", trx, ts, frameNum, tag);
+
+ assAlertMsg.header.function = PDCH_MANAGE_MSG;
+ assAlertMsg.header.type = PDCH_DL_ASSIGN_ALERT_ACK;
+ assAlertMsg.header.trx = (char)trx;
+ assAlertMsg.channel.typeTs = (char)(ts | (CHAN_NUM_IE_PDTCH << 3));
+ assAlertMsg.channel.ccch = 0;
+ assAlertMsg.frameNum = frameNum;
+ assAlertMsg.tag = tag;
+
+ // Encode and send layer 1 message.
+ char msg[HPI_TX_MSG_SIZE];
+ int len = msgEncodeDLAssignAlertAck(&assAlertMsg, msg + 4);
+ msg[3] = (char)(len >> 24);
+ msg[2] = (char)(len >> 16);
+ msg[1] = (char)(len >> 8);
+ msg[0] = (char)len;
+ sendDsp((unsigned char *)msg, len + 4);
+
+ DBG_LEAVE();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendDLAckNackInfoMsg
+**
+** PURPOSE: Build a Downlink ACK/NACK Info message and send it to
+** the dsp.
+**
+** INPUT PARAMETERS: trx - trx for the single block assignment
+** pDlTbf - pointer to the DL TBF
+** pMsg - pointer to DL ACK/NACK message
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void RlcMacTask::SendDLAckNackInfoMsg(int trx, DLTbf *pDlTbf,
+ MsgPacketDownlinkAckNack *pMsg)
+{
+ DBG_FUNC("RlcMacTask::SendDLAckNackInfoMsg", RLC_MAC);
+ DBG_ENTER();
+
+ MsgDLAckNackInfo dlAckNackInfoMsg;
+
+ DBG_TRACE("RLC/MAC: Sending PDCH_DL_ACK_NACK_INFO msg - TRX(%d) TLLI(%#x) TFI(%d)",
+ trx, pDlTbf->tlli.GetTLLI(), pDlTbf->tfi.GetTFI());
+
+ dlAckNackInfoMsg.header.function = PDCH_MANAGE_MSG;
+ dlAckNackInfoMsg.header.type = PDCH_DL_ACK_NACK_INFO;
+ dlAckNackInfoMsg.header.trx = (char)trx;
+ dlAckNackInfoMsg.tlli = (int)pDlTbf->tlli.GetTLLI();
+ dlAckNackInfoMsg.groupTfi = (char)pDlTbf->tfi.GetTFI();
+ dlAckNackInfoMsg.cValue = pMsg->cValue;
+ dlAckNackInfoMsg.rxqual = pMsg->rxqual;
+ dlAckNackInfoMsg.iLevelMask = 0;
+ int bitSelector = 1;
+ for (int i=0; i<MAX_TIMESLOTS; i++)
+ {
+ dlAckNackInfoMsg.iLevelByTs[i] = (char)pMsg->ILevel[i].iLevel;
+ if (pMsg->ILevel[i].isValid)
+ dlAckNackInfoMsg.iLevelMask |= bitSelector;
+ bitSelector <<= 1;
+ }
+
+ // Encode and send layer 1 message.
+ char msg[HPI_TX_MSG_SIZE];
+ int len = msgEncodeDLAckNackInfo(&dlAckNackInfoMsg, msg + 4);
+ msg[3] = (char)(len >> 24);
+ msg[2] = (char)(len >> 16);
+ msg[1] = (char)(len >> 8);
+ msg[0] = (char)len;
+ sendDsp((unsigned char *)msg, len + 4);
+
+ DBG_LEAVE();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendPacchMsg
+**
+** PURPOSE: Encode the RLC/MAC header and signalling message and transmit
+** on the specified TRX and timeslot.
+**
+** INPUT PARAMETERS: trx - trx on which to transmit
+** ts - timeslot on which to transmit
+** pDlMsgHdr - pointer to the downlink msg header
+** pDlMsg - pointer to the downlink signalling message
+** ctlAckTag - optional tag used for acknowledged control msgs
+** burstType - if this message is acknowledged then burstType
+** indicates whether the response is normal or access bursts
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::SendPacchMsg(int trx, int ts, DLMacHeader *pDlMsgHdr,
+ DownlinkMsgBase *pDlMsg, unsigned char ctlAckTag, char burstType)
+ {
+ DBG_FUNC("RlcMacTask::SendPacchMsg", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ DBG_TRACE("RLC/MAC: Sending PH_PACCH_REQ msg - TRX(%d) TS(%d) tag(%d) burst(%d)\n",
+ trx, ts, ctlAckTag, burstType);
+
+ // If signalling RTS available then the message will be sent immediately so
+ // get a USF.
+ pDlMsgHdr->SetUSF(0);
+ if (tsPool.GetSignallingRTSCount(trx, ts) > 0)
+ {
+ // Ask the scheduler for a USF
+ ULTbf *pUlTbf;
+ while (1)
+ {
+ ScheduleRLCBlock(trx, ts, &pUlTbf);
+ // Uplink TBF available
+ if (pUlTbf)
+ {
+ if (pUlTbf->rlcLink.IncrementN3101())
+ {
+ pDlMsgHdr->SetUSF(pUlTbf->usf[ts]);
+ break;
+ }
+ }
+ // No uplink TBFs to schedule.
+ else
+ {
+ break;
+ }
+ }
+ }
+
+ // Pack the message into an output bitstream.
+ BitStreamOut l1MsgOut;
+
+ if ((status = pDlMsgHdr->EncodeDLMacHeader(l1MsgOut)) == JC_OK)
+ {
+ if ((status = pDlMsg->EncodeMsg(l1MsgOut)) == JC_OK)
+ {
+ MsgPacchReq l1Msg;
+ char msg[HPI_TX_MSG_SIZE];
+
+ // Build a PACCH message and send it to l1Proxy
+ l1MsgOut.PadWithSparePadding(MAX_RLC_CONTROL_MSG);
+ l1Msg.header.function = PDCH_MANAGE_MSG;
+ l1Msg.header.type = PH_PACCH_REQ;
+ l1Msg.header.trx = trx;
+ l1Msg.channel.typeTs = ts | (CHAN_NUM_IE_PACCH << 3);
+ l1Msg.channel.ccch = 0;
+ bcopy((char *)l1MsgOut.GetBitStream(), l1Msg.data, MAX_RLC_CONTROL_MSG);
+ l1Msg.tbf = (char)ctlAckTag;
+ l1Msg.burstType = burstType;
+
+ // If signalling RTS is available send now otherwise queue for later.
+ if (tsPool.GetSignallingRTSCount(trx, ts) > 0)
+ {
+ int len = msgEncodePacch(&l1Msg, msg + 4);
+
+ // If enabled display message
+ pDlMsg->DisplayMsgShort(&l1MsgOut);
+ pDlMsgHdr->DisplayDetails();
+ pDlMsg->DisplayMsgDetail();
+ msg[3] = (char)(len >> 24);
+ msg[2] = (char)(len >> 16);
+ msg[1] = (char)(len >> 8);
+ msg[0] = (char)len;
+ sendDsp((unsigned char *)msg, len + 4);
+ tsPool.DecSignallingRTSCount(trx, ts);
+ }
+ else
+ {
+ if ((status = tsPool.QueueDLSignallingMsg(trx, ts, &l1Msg)) != JC_OK)
+ {
+ DBG_WARNING("RlcMacTask::SendPacchMsg: Unable to queue message %#x\n",
+ status);
+ }
+ }
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::SendPacchMsg: RLC/MAC msg encode error %#x\n",
+ status);
+ }
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::SendPacchMsg: RLC/MAC header encode error %#x\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return(status);
+ }
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::SendPdtchMsg
+**
+** PURPOSE: Encode the RLC/MAC header and append the data message and transmit
+** on the specified TRX and timeslot.
+**
+** INPUT PARAMETERS: trx - trx on which to transmit
+** ts - timeslot on which to transmit
+** ctlAckTag - optional tag used for acknowledged control msgs
+** burstType - if this message is acknowledged then burstType
+** indicates whether the response is normal or access bursts
+** pDlDataBlock - pointer to the DL Data Block
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::SendPdtchMsg(int trx, int ts, unsigned char ctlAckTag,
+ char burstType, DLDataBlock *pDlDataBlock)
+ {
+ DBG_FUNC("RlcMacTask::SendPdtchMsg", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ DBG_TRACE("RLC/MAC: Sending PH_PDTCH_REQ msg - TRX(%d) TS(%d) tag(%d) burst(%d)\n",
+ trx, ts, ctlAckTag, burstType);
+
+ // Ask the scheduler for a USF
+ ULTbf *pUlTbf;
+ pDlDataBlock->dlHeader.SetUSF(0);
+ while (1)
+ {
+ ScheduleRLCBlock(trx, ts, &pUlTbf);
+ // Uplink TBF available
+ if (pUlTbf)
+ {
+ if (pUlTbf->rlcLink.IncrementN3101())
+ {
+ pDlDataBlock->dlHeader.SetUSF(pUlTbf->usf[ts]);
+ break;
+ }
+ }
+ // No uplink TBFs to schedule.
+ else
+ {
+ break;
+ }
+ }
+
+ // Pack the message into an output bitstream.
+ BitStreamOut l1MsgOut;
+
+ if ((status = pDlDataBlock->dlHeader.EncodeDLMacHeader(l1MsgOut)) == JC_OK)
+ {
+ MsgPdtchReq l1Msg;
+ char msg[HPI_TX_MSG_SIZE];
+
+ // Build a PDTCH message and send it to l1Proxy
+ l1Msg.header.function = PDCH_MANAGE_MSG;
+ l1Msg.header.type = PH_PDTCH_REQ;
+ l1Msg.header.trx = trx;
+ l1Msg.channel.typeTs = ts | (CHAN_NUM_IE_PDTCH << 3);
+ l1Msg.channel.ccch = 0;
+ l1Msg.tbf = ctlAckTag;
+ l1Msg.burstType = burstType;
+ l1Msg.codeRate = (char)pDlDataBlock->chanCoding.GetChannelCodingCommand();
+
+ // Copy header into message
+ bcopy((char *)l1MsgOut.GetBitStream(), l1Msg.data, l1MsgOut.GetStreamLen());
+ // Copy data into message.
+ bcopy((char *)pDlDataBlock->streamOut, l1Msg.data + l1MsgOut.GetStreamLen(), pDlDataBlock->streamOutLen);
+ // Fill the remaining data with filler.
+ bfill(l1Msg.data + l1MsgOut.GetStreamLen() + pDlDataBlock->streamOutLen,
+ pDlDataBlock->chanCoding.GetRLCDataBlockSize() - (l1MsgOut.GetStreamLen() + pDlDataBlock->streamOutLen), 0x2b);
+
+ int len = msgEncodePdtch(&l1Msg, msg + 4, pDlDataBlock->chanCoding.GetRLCDataBlockSize());
+ // Display header details if enabled.
+ pDlDataBlock->dlHeader.DisplayDetails();
+ pDlDataBlock->DisplayDataBlock();
+ msg[3] = (char)(len >> 24);
+ msg[2] = (char)(len >> 16);
+ msg[1] = (char)(len >> 8);
+ msg[0] = (char)len;
+ sendDsp((unsigned char *)msg, len + 4);
+ tsPool.DecDataRTSCount(trx, ts);
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::SendPdtchMsg: RLC/MAC header encode error %#x\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return(status);
+ }
+
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/RlcMacMsgProc.cpp b/data/mnet/GP10/Host/Rlc_mac/src/RlcMacMsgProc.cpp
new file mode 100644
index 0000000..2ad9dc9
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/RlcMacMsgProc.cpp
@@ -0,0 +1,355 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : RlcMacMsgProc.cpp
+// Author(s) : Tim Olson
+// Create Date : 12/7/2000
+// Description :
+//
+// *******************************************************************
+
+
+#include "RlcMacTask.h"
+#include "Rlc_mac/RlcMacIntf.h"
+
+#include "MsgPacketCellChangeFailure.h"
+#include "MsgPacketControlAcknowledgement.h"
+#include "MsgPacketDownlinkAckNack.h"
+#include "MsgPacketMobileTBFStatus.h"
+#include "MsgPacketResourceRequest.h"
+#include "MsgPacketUplinkAckNack.h"
+#include "MsgPacketUplinkDummyControlBlock.h"
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::ProcessULRlcDataBlock
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: rlcMacMsgHeader - MAC/RLC message header
+** l1MsgBitsIn - message bit passed from layer 1
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::ProcessULRlcDataBlock(MsgPdtchInd *l1PdtchInd,
+ ULDataBlock *pUlDataBlock)
+ {
+ DBG_FUNC("RlcMacTask::ProcessULRlcDataBlock", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ ULTbf *pUlTbf = tsPool.FindULTbf(l1PdtchInd->header.trx, pUlDataBlock->ulHeader.GetTFI());
+
+ if (pUlTbf)
+ {
+ // Deliver uplink data block to the uplink TBF.
+ pUlTbf->rlcLink.ReceiveULDataBlock(pUlDataBlock);
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessULRlcDataBlock: No uplink TBF for given TFI %d\n",
+ pUlDataBlock->ulHeader.GetTFI());
+ status = RLC_MAC_ERROR;
+ ULRlcLink::sysUlDataBlockPool.ReturnULDataBlock(pUlDataBlock);
+ }
+
+ DBG_LEAVE();
+ return(status);
+ }
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::DecodeULRlcControlBlock
+**
+** PURPOSE: This function decodes an uplink RLC control message. After
+** determining that the message is valid the appropriate processing
+** is initiated.
+**
+** INPUT PARAMETERS: rlcMacMsgHeader - MAC/RLC message header
+** l1MsgBitsIn - message bit passed from layer 1
+**
+** RETURN VALUE(S): JC_SUCCESS - if decoding succeeds
+** JC_ERROR - for decode failure
+**
+**----------------------------------------------------------------------------*/
+ JC_STATUS RlcMacTask::DecodeULRlcControlBlock(MsgPacchInd *l1PacchInd,
+ ULMacHeader &rlcMacMsgHeader, BitStreamIn &l1MsgBitsIn)
+ {
+ DBG_FUNC("RlcMacTask::ProcessULRlcControlBlock", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ RlcMacMsgType msgType;
+
+ if (msgType.DecodeMsgType(l1MsgBitsIn) == RLC_MAC_SUCCESS)
+ {
+ switch (msgType.msgType)
+ {
+ case RlcMacMsgType::PACKET_CELL_CHANGE_FAILURE:
+ {
+ MsgPacketCellChangeFailure ctrlMsg;
+ if (ctrlMsg.DecodeMsg(l1MsgBitsIn) == RLC_MAC_SUCCESS)
+ {
+ // If enabled display the short or detailed version of
+ // the message.
+ ctrlMsg.DisplayMsgShort(&l1MsgBitsIn);
+ ctrlMsg.DisplayMsgDetail();
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessULRlcControlBlock: Packet Cell Change Failure decode failed\n");
+ status = JC_ERROR;
+ }
+ }
+ break;
+ case RlcMacMsgType::PACKET_CONTROL_ACK:
+ {
+ MsgPacketControlAcknowledgement ctrlMsg((RlcMacMsgType::RLC_MAC_UPLINK_MSGS)msgType.msgType);
+ if (ctrlMsg.DecodeMsg(l1MsgBitsIn) == RLC_MAC_SUCCESS)
+ {
+ // If enabled display the short or detailed version of
+ // the message.
+ ctrlMsg.DisplayMsgShort(&l1MsgBitsIn);
+ ctrlMsg.DisplayMsgDetail();
+ ULTbf *pUlTbf;
+ DLTbf *pDlTbf;
+ if ((pUlTbf = tbfPool.FindULTbf((unsigned char)l1PacchInd->tbf)))
+ {
+ pUlTbf->rlcLink.ReceivePacketControlAck(&ctrlMsg);
+ }
+ else if ((pDlTbf = tbfPool.FindDLTbf((unsigned char)l1PacchInd->tbf)))
+ {
+ pDlTbf->rlcLink.ReceivePacketControlAck(&ctrlMsg, 0xff);
+ }
+ // In unacknowledged mode the MS terminates the TBF by sending
+ // a packet control ack. For this case no tag was saved.
+ else if ((l1PacchInd->tbf == 0xff) &&
+ ((pDlTbf = tbfPool.FindDLTbf((unsigned long)ctrlMsg.tlli.GetTLLI()))))
+ {
+ pDlTbf->rlcLink.ReceivePacketControlAck(&ctrlMsg, 0xff);
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessULRlcControlBlock: Unkown control ack tag %d\n",
+ l1PacchInd->tbf);
+ status = JC_ERROR;
+ }
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessULRlcControlBlock: Packet Control Ack decode failed\n");
+ status = JC_ERROR;
+ }
+ }
+ break;
+ case RlcMacMsgType::PACKET_DOWNLINK_ACK_NACK:
+ {
+ MsgPacketDownlinkAckNack ctrlMsg;
+ if (ctrlMsg.DecodeMsg(l1MsgBitsIn) == RLC_MAC_SUCCESS)
+ {
+ // If enabled display the short or detailed version of
+ // the message.
+ ctrlMsg.DisplayMsgShort(&l1MsgBitsIn);
+ ctrlMsg.DisplayMsgDetail();
+ DLTbf *pDlTbf;
+ if ((pDlTbf = tbfPool.FindDLTbf(ctrlMsg.dlTfi)))
+ {
+ pDlTbf->rlcLink.ReceiveDLAckNack(&ctrlMsg);
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessULRlcControlBlock: Unkown downlink TFI %d\n",
+ ctrlMsg.dlTfi.GetTFI());
+ status = JC_ERROR;
+ }
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessULRlcControlBlock: Packet Downlink Ack Nack decode failed\n");
+ status = JC_ERROR;
+ }
+ }
+ break;
+ case RlcMacMsgType::PACKET_UPLINK_DUMMY_CONTROL_BLOCK:
+ {
+ MsgPacketUplinkDummyControlBlock ctrlMsg;
+ if (ctrlMsg.DecodeMsg(l1MsgBitsIn) == RLC_MAC_SUCCESS)
+ {
+ // If enabled display the short or detailed version of
+ // the message.
+ ctrlMsg.DisplayMsgShort(&l1MsgBitsIn);
+ ctrlMsg.DisplayMsgDetail();
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessULRlcControlBlock: Packet Uplink Dummy Control decode failed\n");
+ status = JC_ERROR;
+ }
+ }
+ break;
+ case RlcMacMsgType::PACKET_MEASUREMENT_REPORT:
+ {
+ DBG_WARNING("RlcMacTask::ProcessULRlcControlBlock: Packet Measurement Report not implemented\n");
+ status = JC_ERROR;
+ }
+ break;
+ case RlcMacMsgType::PACKET_RESOURCE_REQUEST:
+ {
+ MsgPacketResourceRequest ctrlMsg;
+ if (ctrlMsg.DecodeMsg(l1MsgBitsIn) == RLC_MAC_SUCCESS)
+ {
+ // If enabled display the short or detailed version of
+ // the message.
+ ctrlMsg.DisplayMsgShort(&l1MsgBitsIn);
+ ctrlMsg.DisplayMsgDetail();
+ AllocateULResources(ctrlMsg, l1PacchInd->header.trx,
+ l1PacchInd->channel.typeTs & 0x07);
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessULRlcControlBlock: Packet Resource Request decode failed\n");
+ status = JC_ERROR;
+ }
+ }
+ break;
+ case RlcMacMsgType::PACKET_MOBILE_TBF_STATUS:
+ {
+ MsgPacketMobileTBFStatus ctrlMsg;
+ if (ctrlMsg.DecodeMsg(l1MsgBitsIn) == RLC_MAC_SUCCESS)
+ {
+ // If enabled display the short or detailed version of
+ // the message.
+ ctrlMsg.DisplayMsgShort(&l1MsgBitsIn);
+ ctrlMsg.DisplayMsgDetail();
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessULRlcControlBlock: Packet Mobile TBF Status decode failed\n");
+ status = JC_ERROR;
+ }
+ }
+ break;
+ case RlcMacMsgType::PACKET_PSI_STATUS:
+ {
+ DBG_WARNING("RlcMacTask::ProcessULRlcControlBlock: Packet PSI Status not implemented\n");
+ status = JC_ERROR;
+ }
+ break;
+ default:
+ {
+ DBG_WARNING("RlcMacTask::ProcessULRlcControlBlock: Unknown MsgType %#x\n",
+ msgType.msgType);
+ status = RLC_MAC_ERROR;
+ }
+ break;
+ }
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessULRlcControlBlock: Unable to decode MsgType\n");
+ status = JC_ERROR;
+ }
+
+ DBG_LEAVE();
+ return(status);
+ }
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::DecodeULRlcControlBlockAccessBurst
+**
+** PURPOSE: This function decodes an uplink RLC control message that was
+** sent as access bursts rather than normal bursts. After
+** determining that the message is valid the appropriate processing
+** is initiated.
+**
+** INPUT PARAMETERS: l1PacchAbInd - MAC/RLC message header
+**
+** RETURN VALUE(S): JC_SUCCESS - if decoding succeeds
+** JC_ERROR - for decode failure
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::DecodeULRlcControlBlockAccessBurst(MsgPacchAbInd *l1PacchAbInd)
+{
+ DBG_FUNC("RlcMacTask::DecodeULRlcControlBlockAccessBurst", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ RlcMacMsgType msgType;
+
+ // A bitstream will be created from the PACCH AB INDICATION structure
+ BitStreamIn l1MsgBitsIn((unsigned char *)l1PacchAbInd->data, 2);
+
+ if (msgType.DecodeMsgType(l1MsgBitsIn) == RLC_MAC_SUCCESS)
+ {
+ switch (msgType.msgType)
+ {
+ case 0x1d: // NOTE!!!! SAGEM is sending this for the IMMEDIATE ASSIGNMENT case!!!!
+ case RlcMacMsgType::PACKET_CONTROL_ACK_8_BIT:
+ {
+ MsgPacketControlAcknowledgement ctrlMsg((RlcMacMsgType::RLC_MAC_UPLINK_MSGS)msgType.msgType);
+ if (ctrlMsg.DecodeMsg(l1MsgBitsIn) == RLC_MAC_SUCCESS)
+ {
+ // If enabled display the short or detailed version of
+ // the message.
+ ctrlMsg.DisplayMsgShort(&l1MsgBitsIn);
+ ctrlMsg.DisplayMsgDetail();
+ ULTbf *pUlTbf;
+ DLTbf *pDlTbf;
+ if ((pUlTbf = tbfPool.FindULTbf((unsigned char)l1PacchAbInd->tag)))
+ {
+ pUlTbf->rlcLink.ReceivePacketControlAck(&ctrlMsg);
+ }
+ else if ((pDlTbf = tbfPool.FindDLTbf((unsigned char)l1PacchAbInd->tag)))
+ {
+ pDlTbf->rlcLink.ReceivePacketControlAck(&ctrlMsg, (unsigned char)l1PacchAbInd->ta);
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::DecodeULRlcControlBlockAccessBurst: Unkown control ack tag %d\n",
+ l1PacchAbInd->tag);
+ status = JC_ERROR;
+ }
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::DecodeULRlcControlBlockAccessBurst: Packet Control Ack decode failed\n");
+ status = JC_ERROR;
+ }
+ }
+ break;
+ default:
+ {
+ DBG_WARNING("RlcMacTask::DecodeULRlcControlBlockAccessBurst: Unknown Control MsgType %#x\n",
+ msgType.msgType);
+ status = RLC_MAC_ERROR;
+ }
+ break;
+ }
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::DecodeULRlcControlBlockAccessBurst: Unable to decode MsgType\n");
+ status = JC_ERROR;
+ }
+
+ DBG_LEAVE();
+ return(status);
+ }
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/RlcMacMsgType.cpp b/data/mnet/GP10/Host/Rlc_mac/src/RlcMacMsgType.cpp
new file mode 100644
index 0000000..d03f7ae
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/RlcMacMsgType.cpp
@@ -0,0 +1,133 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : RlcMacMsgType.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "RlcMacMsgType.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char NonDistributedDownlinkMsgNames[][MAX_RLC_MAC_MSG_NAME_SIZE] =
+{
+ {"UNUSED_MSG_TYPE"},
+ {"PACKET_CELL_CHANGE_ORDER"},
+ {"PACKET_DOWNLINK_ASSIGNMENT"},
+ {"PACKET_MEASUREMENT_ORDER"},
+ {"PACKET_POLLING_REQUEST"},
+ {"PACKET_POWER_CONTROL_TIMING_ADVANCE"},
+ {"PACKET_QUEUEING_NOTIFICATION"},
+ {"PACKET_TIMESLOT_RECONFIGURE"},
+ {"PACKET_TBF_RELEASE"},
+ {"PACKET_UPLINK_ACK_NACK"},
+ {"PACKET_UPLINK_ASSIGNMENT"}
+};
+
+
+char DistributedDownlinkMsgNames[][MAX_RLC_MAC_MSG_NAME_SIZE] =
+{
+ {"UNUSED_MSG_TYPE"},
+ {"PACKET_ACCESS_REJECT"},
+ {"PACKET_PAGING_REQUEST"},
+ {"PACKET_PDCH_RELEASE"},
+ {"PACKET_PRACH_PARAMETERS"},
+ {"PACKET_DOWNLINK_DUMMY_CONTROL_BLOCK"}
+};
+
+
+char SysInfoDownlinkMsgNames[][MAX_RLC_MAC_MSG_NAME_SIZE] =
+{
+ {"UNUSED_MSG_TYPE"},
+ {"PACKET_SYSTEM_INFO_1"},
+ {"PACKET_SYSTEM_INFO_2"},
+ {"PACKET_SYSTEM_INFO_3"},
+ {"PACKET_SYSTEM_INFO_3_BIS"},
+ {"PACKET_SYSTEM_INFO_4"},
+ {"PACKET_SYSTEM_INFO_5"},
+ {"PACKET_SYSTEM_INFO_13"}
+};
+
+
+char UplinkMsgNames[][MAX_RLC_MAC_MSG_NAME_SIZE] =
+{
+ {"PACKET_CELL_CHANGE_FAILURE"},
+ {"PACKET_CONTROL_ACK"},
+ {"PACKET_DOWNLINK_ACK_NACK"},
+ {"PACKET_UPLINK_DUMMY_CONTROL_BLOCK"},
+ {"PACKET_MEASUREMENT_REPORT"},
+ {"PACKET_RESOURCE_REQUEST"},
+ {"PACKET_MOBILE_TBF_STATUS"},
+ {"PACKET_PSI_STATUS"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"UNKOWN_MESSAGE"},
+ {"PACKET_DOWNLINK_ACK_NACK_8_BIT"}
+};
+
+
+
+RlcMacResult RlcMacMsgType::EncodeMsgType(BitStreamOut &dataStream)
+{
+ DBG_FUNC("RlcMacMsgType::EncodeMsgType", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result;
+
+ // Pack the Message Type bits into the output bit stream.
+ if ((result = dataStream.InsertBits8((unsigned char)msgType, 6)) != RLC_MAC_SUCCESS)
+ {
+ DBG_ERROR("RlcMacMsgType::EncodeMsgType msgType failure %x\n", result);
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+
+RlcMacResult RlcMacMsgType::DecodeMsgType(BitStreamIn &dataStream)
+{
+ DBG_FUNC("RlcMacMsgType::DecodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Extract message type bits from the input bit stream.
+ if ((result = dataStream.ExtractBits8(msgType, 6)) != RLC_MAC_SUCCESS)
+ {
+ DBG_ERROR("RlcMacMsgType::DecodeIe msgType extraction failed\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/RlcMacOamProc.cpp b/data/mnet/GP10/Host/Rlc_mac/src/RlcMacOamProc.cpp
new file mode 100644
index 0000000..bd39522
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/RlcMacOamProc.cpp
@@ -0,0 +1,253 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : RlcMacOamProc.cpp
+// Author(s) : Tim Olson
+// Create Date : 4/11/2001
+// Description :
+//
+// *******************************************************************
+
+
+#include "RlcMacTask.h"
+#include "Rlc_Mac/RlcMacIntf.h"
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::DecodeOamAdminMsgInd
+**
+** PURPOSE: The Oam message indication is decoded. If decoding is
+** successful the appropriate action is taken.
+**
+** INPUT PARAMETERS: msgReq - oam message indication structure
+**
+** RETURN VALUE(S): JC_SUCCESS
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::DecodeOamAdminMsgInd(RlcMacAdminStateChangeType *msgReq)
+{
+ DBG_FUNC("RlcMacTask::DecodeOamMsgInd", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ switch (msgReq->oamObj)
+ {
+ case RLC_MAC_TIMESLOT:
+ {
+ switch (msgReq->adminState)
+ {
+ case unlocked:
+ {
+ DBG_TRACE("RLC/MAC: Received Unlock Req - TRX(%d) TS(%d)\n",
+ msgReq->trx, msgReq->timeSlot);
+ // See if any downlink data can be sent now.
+ CheckDLMsgQueues();
+ }
+ break;
+ case locked:
+ {
+ DBG_TRACE("RLC/MAC: Received Lock Req - TRX(%d) TS(%d)\n",
+ msgReq->trx, msgReq->timeSlot);
+ // Drop all current TBFs on specified timeslot
+ tbfPool.AbnormalReleaseTs(msgReq->trx, msgReq->timeSlot);
+ }
+ break;
+ case shuttingDown:
+ {
+ DBG_TRACE("RLC/MAC: Received Shutdown Req - TRX(%d) TS(%d)\n",
+ msgReq->trx, msgReq->timeSlot);
+ // Don't need to do anything.
+ }
+ break;
+ }
+ }
+ break;
+ case RLC_MAC_TRX:
+ {
+ switch (msgReq->adminState)
+ {
+ case unlocked:
+ {
+ DBG_TRACE("RLC/MAC: Received Unlock Req - TRX(%d)\n",
+ msgReq->trx);
+ // See if any downlink data can be sent now.
+ CheckDLMsgQueues();
+ }
+ break;
+ case locked:
+ {
+ DBG_TRACE("RLC/MAC: Received Lock Req - TRX(%d)\n",
+ msgReq->trx);
+ // Drop all current TBFs on specified trx
+ tbfPool.AbnormalReleaseTrx(msgReq->trx);
+ }
+ break;
+ case shuttingDown:
+ {
+ DBG_TRACE("RLC/MAC: Received Shutdown Req - TRX(%d)\n",
+ msgReq->trx);
+ // Don't need to do anything.
+ }
+ break;
+ }
+ }
+ break;
+ case RLC_MAC_GP:
+ {
+ switch (msgReq->adminState)
+ {
+ case unlocked:
+ {
+ DBG_TRACE("RLC/MAC: Received GP Unlock Req\n");
+ // See if any downlink data can be sent now.
+ CheckDLMsgQueues();
+ }
+ break;
+ case locked:
+ {
+ DBG_TRACE("RLC/MAC: Received GP Lock Req\n");
+ // Drop all current TBFs
+ tbfPool.AbnormalReleaseBts();
+ }
+ break;
+ case shuttingDown:
+ {
+ DBG_TRACE("RLC/MAC: Received GP Shutdown Req\n");
+ // Don't need to do anything.
+ }
+ break;
+ }
+ }
+ break;
+ default:
+ {
+ DBG_WARNING("RlcMacTask::DecodeOamMsgInd: Invalid oam obj %#x\n",
+ msgReq->oamObj);
+ return (JC_ERROR);
+ }
+ }
+
+ DBG_LEAVE();
+ return(status);
+}
+
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::DecodeOamOpMsgInd
+**
+** PURPOSE: The Oam message indication is decoded. If decoding is
+** successful the appropriate action is taken.
+**
+** INPUT PARAMETERS: msgReq - oam message indication structure
+**
+** RETURN VALUE(S): JC_SUCCESS
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::DecodeOamOpMsgInd(RlcMacOpStateChangeType *msgReq)
+{
+ DBG_FUNC("RlcMacTask::DecodeOamOpMsgInd", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ switch (msgReq->oamObj)
+ {
+ case RLC_MAC_TIMESLOT:
+ {
+ switch (msgReq->opState)
+ {
+ case opStateEnabled:
+ {
+ DBG_TRACE("RLC/MAC: Received Op state enable Req - TRX(%d) TS(%d)\n",
+ msgReq->trx, msgReq->timeSlot);
+ // See if any downlink data can be sent now.
+ CheckDLMsgQueues();
+ }
+ break;
+ case opStateDisabled:
+ {
+ DBG_TRACE("RLC/MAC: Received Op state disable Req - TRX(%d) TS(%d)\n",
+ msgReq->trx, msgReq->timeSlot);
+ // Drop all current TBFs on specified timeslot
+ tbfPool.AbnormalReleaseTs(msgReq->trx, msgReq->timeSlot);
+ }
+ break;
+ }
+ }
+ break;
+ case RLC_MAC_TRX:
+ {
+ switch (msgReq->opState)
+ {
+ case opStateEnabled:
+ {
+ DBG_TRACE("RLC/MAC: Received Op state enable Req - TRX(%d)\n",
+ msgReq->trx);
+ // See if any downlink data can be sent now.
+ CheckDLMsgQueues();
+ }
+ break;
+ case opStateDisabled:
+ {
+ DBG_TRACE("RLC/MAC: Received Op state disable Req - TRX(%d)\n",
+ msgReq->trx);
+ // Drop all current TBFs on specified trx
+ tbfPool.AbnormalReleaseTrx(msgReq->trx);
+ }
+ break;
+ }
+ }
+ break;
+ case RLC_MAC_GP:
+ {
+ switch (msgReq->opState)
+ {
+ case opStateEnabled:
+ {
+ DBG_TRACE("RLC/MAC: Received GP Op state disable Req\n");
+ // See if any downlink data can be sent now.
+ CheckDLMsgQueues();
+ }
+ break;
+ case opStateDisabled:
+ {
+ DBG_TRACE("RLC/MAC: Received GP Op state enable Req\n");
+ // Drop all current TBFs
+ tbfPool.AbnormalReleaseBts();
+ }
+ break;
+ }
+ }
+ break;
+ default:
+ {
+ DBG_WARNING("RlcMacTask::DecodeOamMsgInd: Invalid oam obj %#x\n",
+ msgReq->oamObj);
+ return (JC_ERROR);
+ }
+ }
+
+ DBG_LEAVE();
+ return(status);
+}
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/RlcMacRmMdProc.cpp b/data/mnet/GP10/Host/Rlc_mac/src/RlcMacRmMdProc.cpp
new file mode 100644
index 0000000..9cefb59
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/RlcMacRmMdProc.cpp
@@ -0,0 +1,141 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : RlcMacRmMdProc.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#include "RlcMacTask.h"
+#include "Rlc_mac/RlcMacIntf.h"
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::ProcessRmMdMsgInd
+**
+** PURPOSE: This function decodes the MD message primitive type and
+** initiates the appropriate action.
+**
+** INPUT PARAMETERS: msgReq - MD message request
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::ProcessRmMdMsgInd(T_CNI_RIL3MD_RRM_MSG *msgReq)
+{
+ DBG_FUNC("RlcMacTask::ProcessRmMdMsgInd", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+
+
+ switch (msgReq->primitive_type)
+ {
+ case L23PT_DL_RANDOM_ACCESS_IND :
+ {
+ status = ProcessChanReq(msgReq);
+ }
+ break;
+ default :
+ {
+ DBG_WARNING("RlcMacTask::ProcessRmMdMsgInd: Unkown primitive type %#x\n",
+ msgReq->primitive_type);
+ status = JC_INVALID_MSG;
+ }
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::ProcessChanReq
+**
+** PURPOSE: A CHANNEL REQUEST was received on the RACH channel. This
+** request was forwarded from RM and handled here. The layer 1 message
+** will be decoded. If decoded successfully then a single block allocation
+** will be granted.
+**
+** For now no one phase access requests will be granted.
+**
+** INPUT PARAMETERS: msgReq - layer 1 message request
+**
+** RETURN VALUE(S): JC_OK
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS RlcMacTask::ProcessChanReq(T_CNI_RIL3MD_RRM_MSG *msgReq)
+{
+ DBG_FUNC("RlcMacTask::ProcessChanReq", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+ T_CNI_RIL3RRM_MSG_CHANNEL_REQUEST chanReq;
+
+ // Use RIL3 to decode the channel request message.
+ chanReq.neci = CNI_RIL3_NECI_NOT_SUPPORTED; // Needed by Ril3
+ T_CNI_RIL3_RESULT ril3Result = CNI_RIL3RRM_DecodeChannelRequest (
+ msgReq->l3_data.buffer,
+ &chanReq );
+
+ // The message was decoded properly. Handle the two possible data
+ // establishment causes:
+ // 1. One phase packet access
+ // 2. Single block packet access
+ if (ril3Result == CNI_RIL3_RESULT_SUCCESS)
+ {
+ DBG_TRACE("RLC/MAC: Received CHANNEL REQUEST on CCCH - estCause(%#x)\n",
+ chanReq.estCause);
+ switch (chanReq.estCause)
+ {
+ // For now only a two-phase access is allowed. Therefore only a
+ // single block allocation will be granted here.
+ case CNI_RIL3_EST_CALL_ONE_PHASE_PACKET_ACCESS :
+ case CNI_RIL3_EST_CALL_SINGLE_BLOCK_PACKET_ACCESS :
+ {
+ status = ULSingleBlockAllocation(&chanReq, msgReq);
+ }
+ break;
+ default :
+ DBG_WARNING("RlcMacTask::ProcessChanReq: Unkown establishment cause %#x\n",
+ chanReq.estCause);
+ status = JC_INVALID_MSG;
+ }
+ }
+ else
+ {
+ DBG_WARNING("RlcMacTask::ProcessChanReq: RIL3 decode failed\n");
+ status = JC_INVALID_MSG;
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/RlcMacShow.cpp b/data/mnet/GP10/Host/Rlc_mac/src/RlcMacShow.cpp
new file mode 100644
index 0000000..8138887
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/RlcMacShow.cpp
@@ -0,0 +1,107 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : RlcMacShow.cpp
+// Author(s) : Tim Olson
+// Create Date : 12/5/2000
+// Description : Provides access to all RLC/MAC show routines.
+//
+// *******************************************************************
+
+
+#include "RlcMacTask.h"
+
+
+
+void ShowTAITableTrx(int trx)
+{
+ RlcMacTask::theRlcMacTask->tsPool.ShowTAITable(trx);
+}
+
+void ShowTAITableTrxTs(int trx, int ts)
+{
+ RlcMacTask::theRlcMacTask->tsPool.ShowTAITable(trx, ts);
+}
+
+
+
+void ShowUSFTableTrx(int trx)
+{
+ RlcMacTask::theRlcMacTask->tsPool.ShowUSFTable(trx);
+}
+
+void ShowUSFTableTrxTs(int trx, int ts)
+{
+ RlcMacTask::theRlcMacTask->tsPool.ShowUSFTable(trx, ts);
+}
+
+
+
+void ShowULTFITableTrx(int trx)
+{
+ RlcMacTask::theRlcMacTask->tsPool.ShowULTFITable(trx);
+}
+
+void ShowDLTFITableTrx(int trx)
+{
+ RlcMacTask::theRlcMacTask->tsPool.ShowDLTFITable(trx);
+}
+
+
+void ShowChannelCombTrx(int trx)
+{
+ RlcMacTask::theRlcMacTask->tsPool.ShowChannelComb(trx);
+}
+
+void ShowChannelCombTrxTs(int trx, int ts)
+{
+ RlcMacTask::theRlcMacTask->tsPool.ShowChannelComb(trx, ts);
+}
+
+
+void ShowTimeslotInfoTrx(int trx)
+{
+ RlcMacTask::theRlcMacTask->tsPool.ShowTimeslotInfo(trx);
+}
+
+void ShowTimeslotInfoTrxTs(int trx, int ts)
+{
+ RlcMacTask::theRlcMacTask->tsPool.ShowTimeslotInfo(trx, ts);
+}
+
+
+void ShowAllocatedUplinkTBF()
+{
+ RlcMacTask::theRlcMacTask->tbfPool.ShowULAllocatedTBF();
+}
+
+void ShowAllocatedDownlinkTBF()
+{
+ RlcMacTask::theRlcMacTask->tbfPool.ShowDLAllocatedTBF();
+}
+
+void ShowFreeUplinkTBF()
+{
+ RlcMacTask::theRlcMacTask->tbfPool.ShowULFreeTBF();
+}
+
+void ShowFreeDownlinkTBF()
+{
+ RlcMacTask::theRlcMacTask->tbfPool.ShowDLFreeTBF();
+}
+
+void ShowAllUplinkTBF()
+{
+ RlcMacTask::theRlcMacTask->tbfPool.ShowULAllTBF();
+}
+
+void ShowAllDownlinkTBF()
+{
+ RlcMacTask::theRlcMacTask->tbfPool.ShowDLAllTBF();
+}
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/RlcMacTask.cpp b/data/mnet/GP10/Host/Rlc_mac/src/RlcMacTask.cpp
new file mode 100644
index 0000000..1009338
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/RlcMacTask.cpp
@@ -0,0 +1,404 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : RlcMacTask.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#include "RlcMacTask.h"
+#include "RlcMacConfig.h"
+#include "Os/JCMsgQueue.h"
+#include "GP10OsTune.h"
+#include "MnetModuleId.h"
+#include "GP10MsgTypes.h"
+#include "dsp/dsphmsg.h"
+#include "Grr/grr_intf.h"
+
+// Flag used to indicate that the one and only RlcMac task
+// has been created.
+bool RlcMacTask::isCreated = FALSE;
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::RlcMacTask
+**
+** PURPOSE: RlcMacTask constructor.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+RlcMacTask::RlcMacTask() : RlcMacTaskObj(RLCMAC_TASK_NAME)
+{
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: SysCommand_RlcMac
+**
+** PURPOSE: SysCommand_RlcMac is called anytime the system needs to notify
+** a module about a system event.
+**
+** INPUT PARAMETERS: action - type of system command
+**
+** RETURN VALUE(S): OK
+**
+**----------------------------------------------------------------------------*/
+int SysCommand_RlcMac(T_SYS_CMD action)
+{
+
+ switch(action){
+ case SYS_SHUTDOWN:
+ printf("[RlcMac] Received system shutdown notification\n");
+ break;
+ case SYS_START:
+ printf("[RlcMac] Received system start notification\n");
+ if (RlcMacTask::InitRlcMac() != OK)
+ {
+ printf("Unable to initialize RlcMac properly\n");
+ }
+ break;
+
+ case SYS_REBOOT:
+ printf("[RlcMac] Received system reboot notification\n");
+ break;
+
+ default:
+ printf("[RlcMac] Unknown system command received %d\n", action);
+ }
+
+ return OK;
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::InitRlcMac
+**
+** PURPOSE: InitRlcMac function provides the basic initialization for the
+** RLC/MAC task. A single instance of RlcMacTask is created. The single
+** instance is referenced by static member pointer theRlcMacTask.
+**
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+
+int RlcMacTask::InitRlcMac(void)
+{
+ DBG_FUNC("RlcMacTask::InitRlcMac",RLC_MAC);
+ DBG_ENTER();
+
+ if (isCreated == FALSE)
+ {
+ // Create the one and only RlcMacTask object.
+ if ((theRlcMacTask = new RlcMacTask()) == 0)
+ {
+ DBG_ERROR("RlcMac: Unable to allocate memory for RlcMacTask\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ // Create the RlcMac message queue
+ RlcMacMsgQ = new JCMsgQueue(RLCMAC_MAX_MSGS, RLCMAC_MAX_MSG_LENGTH, JC_MSG_Q_PRIORITY);
+
+ if (!RlcMacMsgQ)
+ {
+ DBG_ERROR("RlcMac: Unable to create message queue\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ if (theRlcMacTask->RlcMacTaskObj.JCTaskSpawn(RLCMAC_TASK_PRIORITY,
+ RLCMAC_TASK_OPTION,
+ RLCMAC_TASK_STACK_SIZE,
+ (FUNCPTR) RlcMacTask::RlcMacLoop,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ MODULE_RLCMAC, JC_CRITICAL_TASK ) == ERROR)
+ {
+ DBG_ERROR("RlcMac: Unable to spawn task\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ isCreated = TRUE;
+
+ // TEMP !!!! TEMP !!!!
+ // For now set MIB variables
+ oam_setMibIntVar(MODULE_RLCMAC,MIB_t3191, 5);
+ oam_setMibIntVar(MODULE_RLCMAC,MIB_t3193, 2);
+ oam_setMibIntVar(MODULE_RLCMAC,MIB_t3195, 5);
+ oam_setMibIntVar(MODULE_RLCMAC,MIB_t3169, 5);
+ }
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: CallRlcMacLoop
+**
+** PURPOSE: This is a wrapper function used to call RlcMacLoop. This is needed
+** so that a simple extern declaration is sufficient to call RlcMacLoop. If
+** RlcMacLoop were call directly the entire MCHTask class would need to be
+** included in the root task scope.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+int CallRlcMacLoop(void)
+{
+ return RlcMacTask::RlcMacLoop();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RlcMacTask::RlcMacLoop
+**
+** PURPOSE: RlcMacLoop is the main message processing loop for the RlcMacTask.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+int RlcMacTask::RlcMacLoop( void )
+{
+ DBG_FUNC("RlcMacTask::RlcMacLoop", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status;
+ JCMsgQueue *replyMsgQ;
+ GP10_MESSAGE_TYPES msgType;
+ MNET_MODULE_ID modId;
+ char rlcMacMsg[sizeof(BSSGP_API_MSG)];
+ unsigned int nBytes;
+
+ theRlcMacTask->RlcMacTaskObj.JCTaskEnterLoop();
+
+ while (1)
+ {
+ if (status = RlcMacMsgQ->JCMsgQReceive
+ (
+ &replyMsgQ,
+ (unsigned int *)&msgType,
+ &modId,
+ rlcMacMsg,
+ &nBytes,
+ JC_WAIT_FOREVER
+ ) == ERROR)
+ {
+ DBG_WARNING("RlcMacTask::RlcMacLoop: Msg receive error status(%#x)\n",
+ status);
+ continue;
+ }
+
+ switch (msgType)
+ {
+ case RLCMAC_READY_TO_GO :
+ {
+ DBG_TRACE("RLC/MAC received RLCMAC_READY_TO_GO msg\n");
+ // Setup channel information from GRR
+ for (int trx = 0; trx < MAX_TRX; trx++)
+ {
+ for (int ts = 0; ts < MAX_TIMESLOTS; ts++)
+ {
+ theRlcMacTask->tsPool.SetChannelComb(trx, ts,
+ grr_GetTrxSlotChanComb(trx, ts));
+ }
+ }
+ grr_SendReadyToGoAck(MODULE_RLCMAC, grr_MsgQId);
+ }
+ break;
+ case RLCMAC_TIMESLOT_CONFIG :
+ {
+ RlcMacTSConfiguration *configMsg = (RlcMacTSConfiguration *)rlcMacMsg;
+ DBG_TRACE("RLC/MAC received RLCMAC_TIMESLOT_CONFIG msg\n");
+ DBG_TRACE("RLC/MAC Setting trx(%d) ts(%d) chanComb(%d)\n",
+ configMsg->trx, configMsg->timeslot, configMsg->chanComb);
+ theRlcMacTask->tsPool.SetChannelComb(configMsg->trx, configMsg->timeslot,
+ configMsg->chanComb);
+ }
+ break;
+ case RLCMAC_ADMIN_STATE_CHANGE :
+ {
+ DBG_TRACE("RLC/MAC received RLCMAC_ADMIN_STATE_CHANGE msg\n");
+ theRlcMacTask->DecodeOamAdminMsgInd((RlcMacAdminStateChangeType *)rlcMacMsg);
+ }
+ break;
+ case RLCMAC_OP_STATE_CHANGE :
+ {
+ DBG_TRACE("RLC/MAC received RLCMAC_OP_STATE_CHANGE msg\n");
+ theRlcMacTask->DecodeOamOpMsgInd((RlcMacOpStateChangeType *)rlcMacMsg);
+ }
+ break;
+ case RLCMAC_RM_MD_MSG_IND :
+ {
+ DBG_TRACE("RLC/MAC received RLCMAC_RM_MD_MSG_IND msg\n");
+ theRlcMacTask->ProcessRmMdMsgInd((T_CNI_RIL3MD_RRM_MSG *)rlcMacMsg);
+ }
+ break;
+ case RLCMAC_L1_MSG_IND :
+ {
+ DBG_TRACE("RLC/MAC received RLCMAC_L1_MSG_IND msg\n");
+ theRlcMacTask->DecodeL1MsgInd((RlcMacL1MsgIndType *)rlcMacMsg);
+ }
+ break;
+ case RLCMAC_DL_PDU_REQ :
+ {
+ DBG_TRACE("RLC/MAC received RLCMAC_DL_PDU_REQ msg\n");
+ theRlcMacTask->AllocateDLResources((BSSGP_DL_UNITDATA_MSG *)rlcMacMsg);
+ }
+ break;
+ case RLCMAC_L1_RTS :
+ {
+ DBG_TRACE("RLC/MAC received RLCMAC_L1_RTS msg\n");
+ theRlcMacTask->DecodeL1MsgInd((RlcMacL1MsgIndType *)rlcMacMsg);
+ }
+ break;
+ case RLCMAC_T3169_EXPIRY :
+ {
+ DBG_TRACE("RLC/MAC received RLCMAC_T3169_EXPIRY msg\n");
+ int tbfPointer = 0;
+
+ for (int i = sizeof(int) - 1; i >= 0; i--)
+ {
+ tbfPointer |= (rlcMacMsg[i] << (i * 8));
+ }
+
+ ULTbf *pUlTbf = (ULTbf *)(tbfPointer);
+ if ((pUlTbf) && (pUlTbf->GetTbfState() != Tbf::FREE))
+ {
+ pUlTbf->rlcLink.ProcessT3169Expiry();
+ }
+ }
+ break;
+ case RLCMAC_T3195_EXPIRY :
+ {
+ DBG_TRACE("RLC/MAC received RLCMAC_T3195_EXPIRY msg\n");
+ int tbfPointer = 0;
+
+ for (int i = sizeof(int) - 1; i >= 0; i--)
+ {
+ tbfPointer |= (rlcMacMsg[i] << (i * 8));
+ }
+
+ DLTbf *pDlTbf = (DLTbf *)(tbfPointer);
+ if ((pDlTbf) && (pDlTbf->GetTbfState() != Tbf::FREE))
+ {
+ pDlTbf->rlcLink.ProcessT3195Expiry();
+ }
+ }
+ break;
+ case RLCMAC_T3191_EXPIRY :
+ {
+ DBG_TRACE("RLC/MAC received RLCMAC_T3191_EXPIRY msg\n");
+ int tbfPointer = 0;
+
+ for (int i = sizeof(int) - 1; i >= 0; i--)
+ {
+ tbfPointer |= (rlcMacMsg[i] << (i * 8));
+ }
+
+ DLTbf *pDlTbf = (DLTbf *)(tbfPointer);
+ if ((pDlTbf) && (pDlTbf->GetTbfState() != Tbf::FREE))
+ {
+ pDlTbf->rlcLink.ProcessT3191Expiry();
+ }
+ }
+ break;
+ case RLCMAC_T3193_EXPIRY :
+ {
+ DBG_TRACE("RLC/MAC received RLCMAC_T3193_EXPIRY msg\n");
+ int tbfPointer = 0;
+
+ for (int i = sizeof(int) - 1; i >= 0; i--)
+ {
+ tbfPointer |= (rlcMacMsg[i] << (i * 8));
+ }
+
+ DLTbf *pDlTbf = (DLTbf *)(tbfPointer);
+ if ((pDlTbf) && (pDlTbf->GetTbfState() != Tbf::FREE))
+ {
+ pDlTbf->rlcLink.ProcessT3193Expiry();
+ }
+ }
+ break;
+ case RLCMAC_DL_ACTIVITY_TIMER_EXPIRY :
+ {
+ DBG_TRACE("RLC/MAC received RLCMAC_DL_ACTIVITY_TIMER_EXPIRY msg\n");
+ int tbfPointer = 0;
+
+ for (int i = sizeof(int) - 1; i >= 0; i--)
+ {
+ tbfPointer |= (rlcMacMsg[i] << (i * 8));
+ }
+
+ DLTbf *pDlTbf = (DLTbf *)(tbfPointer);
+ if ((pDlTbf) && (pDlTbf->GetTbfState() != Tbf::FREE))
+ {
+ pDlTbf->rlcLink.ProcessActivityTimerExpiry();
+ }
+ }
+ break;
+ case RLCMAC_UL_ACTIVITY_TIMER_EXPIRY :
+ {
+ DBG_TRACE("RLC/MAC received RLCMAC_UL_ACTIVITY_TIMER_EXPIRY msg\n");
+ int tbfPointer = 0;
+
+ for (int i = sizeof(int) - 1; i >= 0; i--)
+ {
+ tbfPointer |= (rlcMacMsg[i] << (i * 8));
+ }
+
+ ULTbf *pUlTbf = (ULTbf *)(tbfPointer);
+ if ((pUlTbf) && (pUlTbf->GetTbfState() != Tbf::FREE))
+ {
+ pUlTbf->rlcLink.ProcessActivityTimerExpiry();
+ }
+ }
+ break;
+ default :
+ {
+ DBG_WARNING("RlcMacTask::RlcMacLoop: Unkown message type %#x\n",
+ msgType);
+ }
+ }
+
+ }
+
+ DBG_LEAVE();
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ScheduleAllocationInfo.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ScheduleAllocationInfo.cpp
new file mode 100644
index 0000000..0d86d60
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ScheduleAllocationInfo.cpp
@@ -0,0 +1,373 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ScheduleAllocationInfo.cpp
+// Author(s) : Daryl Kaiser
+// Create Date : 1/29/2001
+// Description :
+//
+// *******************************************************************
+
+#include "ScheduleAllocationInfo.h"
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleAllocationInfo::ComputeMultislotOptions
+**
+** PURPOSE: Compute valid multislot options (i.e., combinations of UL and DL
+** time slots) based on user capability. Save results in the
+** calling object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+bool ScheduleAllocationInfo::ComputeMultislotOptions(void)
+{
+ DBG_FUNC("ScheduleAllocationInfo::ComputeMultislotOptions", RLC_MAC_RES_ALLOC);
+ DBG_ENTER();
+
+ /*=========================================================================
+ * Validate QoS profile. If any value is out of range, limit it.
+ *=========================================================================*/
+ if ( multislotClass < 1 )
+ {
+ DBG_ERROR(" Illegal for QoS for TLLI 0x%x: MultislotClass=%d. Setting value to 1.\n",
+ tbf->tlli.GetTLLI(), multislotClass);
+ multislotClass = 1;
+ }
+ else if ( multislotClass > 12 )
+ {
+ DBG_ERROR(" Illegal for TLLI QoS for 0x%x: MultislotClass=%d. Setting value to 12.\n",
+ tbf->tlli.GetTLLI(), multislotClass);
+ multislotClass = 12;
+ }
+ if ( delayClass < 1 )
+ {
+ if ( direction == DL )
+ {
+ DBG_ERROR(" Illegal for QoS for TLLI 0x%x: DelayClass=%d. Setting value to 1.\n",
+ tbf->tlli.GetTLLI(), delayClass);
+ }
+ else
+ {
+ DBG_ERROR(" Illegal for QoS for TLLI 0x%x: RadioPriority=%d. Setting value to 1.\n",
+ tbf->tlli.GetTLLI(), delayClass);
+ }
+ delayClass = 1;
+ }
+ else if ( delayClass > 4 )
+ {
+ if ( direction == DL )
+ {
+ DBG_ERROR(" Illegal for QoS for TLLI 0x%x: DelayClass=%d. Setting value to 4.\n",
+ tbf->tlli.GetTLLI(), delayClass);
+ }
+ else
+ {
+ DBG_ERROR(" Illegal for QoS for TLLI 0x%x: RadioPriority=%d. Setting value to 4.\n",
+ tbf->tlli.GetTLLI(), delayClass);
+ }
+ delayClass = 4;
+ }
+ if ( precedenceClass < 1 )
+ {
+ DBG_ERROR(" Illegal for QoS for TLLI 0x%x: PrecedenceClass=%d. Setting value to 1.\n",
+ tbf->tlli.GetTLLI(), precedenceClass);
+ precedenceClass = 1;
+ }
+ else if ( precedenceClass > 3 )
+ {
+ DBG_ERROR(" Illegal for TLLI QoS for 0x%x: PrecedenceClass=%d. Setting value to 3.\n",
+ tbf->tlli.GetTLLI(), precedenceClass);
+ precedenceClass = 3;
+ }
+ if ( peakThroughputClass < 1 )
+ {
+ DBG_ERROR(" Illegal for QoS for TLLI 0x%x: PeakThroughputClass=%d. Setting value to 1.\n",
+ tbf->tlli.GetTLLI(), precedenceClass);
+ peakThroughputClass = 1;
+ }
+ else if ( peakThroughputClass > 9 )
+ {
+ DBG_ERROR(" Illegal for TLLI QoS for 0x%x: PeakThroughputClass=%d. Setting value to 9.\n",
+ tbf->tlli.GetTLLI(), precedenceClass);
+ peakThroughputClass = 9;
+ }
+
+ /*------------------------------------------------------------
+ * For troubleshooting, report the QoS parameters
+ *------------------------------------------------------------*/
+ if ( direction == DL )
+ {
+ DBG_TRACE(" QoS for TLLI 0x%x: Multi=%d Delay=%d Prec=%d PkTp=%d\n",
+ tbf->tlli.GetTLLI(), multislotClass, delayClass, precedenceClass, peakThroughputClass);
+ }
+ else
+ {
+ DBG_TRACE(" QoS for TLLI 0x%x: Multi=%d RadioPriority=%d PkTp=%d\n",
+ tbf->tlli.GetTLLI(), multislotClass, delayClass, peakThroughputClass);
+ }
+
+ /*=========================================================================
+ * Set maximum number of time slots based on multislot class
+ *=========================================================================*/
+ maxDlSlots = multiMaxDlSlots[multislotClass-1];
+ maxUlSlots = multiMaxUlSlots[multislotClass-1];
+
+ /*=========================================================================
+ * Compute multislot options based on user capability
+ *=========================================================================*/
+ int mclass = multislotClass-1;
+ int tindex; // multislot table index
+ int cindex; // configuration index
+ int ts; // time slot
+ MultiSet* multiSet; // convenient struct for accessing multislot params
+ /*------------------------------------------------------------
+ * Determine number of multislot configurations
+ *------------------------------------------------------------*/
+ nbrOfCandConfigs = 0;
+ for ( tindex=0; tindex<nbrMultiConfig[mclass]; tindex++ )
+ {
+ multiSet = (MultiSet*)multiConfig[mclass][tindex];
+ nbrOfCandConfigs += 1 + multiSet->rangeEndDL - multiSet->rangeStartDL;
+ }
+ if ( nbrOfCandConfigs > MAX_MULTI_CONFIG_CANDIDATES )
+ {
+ nbrOfCandConfigs = MAX_MULTI_CONFIG_CANDIDATES;
+ DBG_ERROR(" Error: Too many candidate multislot configurations, %d\n", nbrOfCandConfigs);
+ }
+
+ /*------------------------------------------------------------
+ * Initialize multislot configurations
+ *------------------------------------------------------------*/
+ for ( cindex=0; cindex<nbrOfCandConfigs; cindex++ )
+ {
+ candMultiConfig[cindex].valid = FALSE;
+ for ( ts=0; ts<8; ts++ )
+ {
+ candMultiConfig[cindex].allowedTsDL[ts] = FALSE;
+ candMultiConfig[cindex].allowedTsUL[ts] = FALSE;
+ }
+ }
+ /*------------------------------------------------------------
+ * Compute multislot configurations for this multislot class
+ *------------------------------------------------------------*/
+ cindex = 0;
+ for ( tindex=0; tindex<nbrMultiConfig[mclass]; tindex++ )
+ {
+ multiSet = (MultiSet*)multiConfig[mclass][tindex];
+ int offDL; // downlink offset
+ int offUL = multiSet->slotOffsetUL;
+ int porderDL = multiSet->patternOrderDL-1;
+ int pindexDL = multiSet->patternIndexDL-1;
+ int porderUL = multiSet->patternOrderUL-1;
+ int pindexUL = multiSet->patternIndexUL-1;
+ int allowedTs;
+ /*--------------------------------------------------------
+ * Loop over all starting DL time slots
+ *--------------------------------------------------------*/
+ for ( offDL = multiSet->rangeStartDL;
+ offDL <= multiSet->rangeEndDL; offDL++ )
+ {
+ candMultiConfig[cindex].valid = TRUE;
+ /*----------------------------------------------------
+ * Enter DL pattern. Note porderDL is zero-based.
+ *----------------------------------------------------*/
+ for ( ts=0; ts<=porderDL; ts++ )
+ {
+ allowedTs = offDL + tsPattern[porderDL][pindexDL][ts];
+ candMultiConfig[cindex].allowedTsDL[allowedTs] = TRUE;
+ }
+ /*----------------------------------------------------
+ * Enter UL pattern. Note porderUL is zero-based.
+ *----------------------------------------------------*/
+ for ( ts=0; ts<=porderUL; ts++ )
+ {
+ allowedTs = offDL + offUL + tsPattern[porderUL][pindexUL][ts];
+ candMultiConfig[cindex].allowedTsUL[allowedTs] = TRUE;
+ }
+ /*----------------------------------------------------
+ * Done setting this configuration. Increment to next.
+ *----------------------------------------------------*/
+ cindex += 1;
+ }
+ }
+ DBG_TRACE(" Total of %d multislot configurations\n", cindex);
+ DBG_LEAVE();
+ return(TRUE);
+}
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleAllocationInfo::ComputeDesiredNumberOfSlots
+**
+** PURPOSE: Compute the number of UL or DL time slots to allocate this user
+** based on user's multislot capability, but constrained by the
+** user's peak throughput class.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): desired number of slots
+**
+**----------------------------------------------------------------------------*/
+int ScheduleAllocationInfo::ComputeDesiredNumberOfSlots(void) const
+{
+ int desiredSlots = (direction==DL) ? maxDlSlots : maxUlSlots;\
+ int testClass = min(peakThroughputClass, 5);
+ switch(testClass)
+ {
+ case 5:
+ desiredSlots = min(desiredSlots, 8);
+ break;
+ case 4:
+ desiredSlots = min(desiredSlots, 4);
+ break;
+ case 3:
+ desiredSlots = min(desiredSlots, 2);
+ break;
+ default:
+ desiredSlots = 1;
+ break;
+ }
+ return(desiredSlots);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleAllocationInfo::ConstrainCandMultiConfig
+**
+** PURPOSE: Exclude candidate multislot configurations that contain time
+** slots that have been disallowed already for this TBF and those
+** that do not include time slots already allocated to the TBF.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void ScheduleAllocationInfo::ConstrainCandMultiConfig(void)
+{
+ int cindex;
+ int ts;
+
+ /*-------------------------------------------------------------------------
+ * Mark invalid all multislot configurations that: (1) include a TS that has
+ * been disallowed already for this TBF, or (2) do not include all of the TS
+ * already allocated to the TBF up to this point.
+ *-------------------------------------------------------------------------*/
+ for ( cindex=0; cindex<nbrOfCandConfigs; cindex++ )
+ {
+ for ( ts=0; candMultiConfig[cindex].valid && ts<MAX_TIMESLOTS; ts++ )
+ {
+ if ( (allocatedTsDL[ts] && !candMultiConfig[cindex].allowedTsDL[ts]) ||
+ (allocatedTsUL[ts] && !candMultiConfig[cindex].allowedTsUL[ts]) )
+ {
+ candMultiConfig[cindex].valid = FALSE;
+ }
+ }
+ }
+ /*-------------------------------------------------------------------------
+ * Initialize list of potential natural timeslots in the TBF structure
+ *-------------------------------------------------------------------------*/
+ for ( ts=0; ts<MAX_TIMESLOTS; ts++ )
+ {
+ tbf->naturalTs[ts] = FALSE;
+ }
+ /*-------------------------------------------------------------------------
+ * Use all surviving multislot configurations to update the list of
+ * potential natural timeslots in the TBF structure
+ *-------------------------------------------------------------------------*/
+ for ( cindex=0; cindex<nbrOfCandConfigs; cindex++ )
+ {
+ if ( candMultiConfig[cindex].valid )
+ {
+ for ( ts=0; ts<MAX_TIMESLOTS; ts++ )
+ {
+ if ( candMultiConfig[cindex].allowedTsDL[ts] &&
+ candMultiConfig[cindex].allowedTsUL[ts] )
+ {
+ tbf->naturalTs[ts] = TRUE;
+ }
+ }
+ }
+ }
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleAllocationInfo::IsAllowedTs
+**
+** PURPOSE: Check whether time slot is allowed by any multislot configuration
+**
+** INPUT PARAMETERS:
+** dir - link direction (DL or UL)
+** ts - time slot index (0..MAX_TIMESLOTS-1)
+**
+** RETURN VALUE(S): Whether slot is allowed (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool ScheduleAllocationInfo::IsAllowedTs(LinkDirection dir, int ts)
+{
+ bool status = FALSE;
+
+ for ( int cindex=0; cindex<nbrOfCandConfigs && !status ; cindex++ )
+ {
+ if ( candMultiConfig[cindex].valid &&
+ ( (dir==DL && candMultiConfig[cindex].allowedTsDL[ts]) ||
+ (dir==UL && candMultiConfig[cindex].allowedTsUL[ts]) ) )
+ {
+ status = TRUE;
+ }
+ }
+ return(status);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleAllocationInfo::IncludesNaturalTs
+**
+** PURPOSE: Check whether (a) this time slot is a natural slot or (b) the
+** TBF already includes a natural time slot.
+**
+** INPUT PARAMETERS:
+** dir - link direction (DL or UL)
+** newTs - time slot index (0..MAX_TIMESLOTS-1)
+**
+** RETURN VALUE(S): Whether slot is allowed (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool ScheduleAllocationInfo::IncludesNaturalTs(LinkDirection dir, int newTs)
+{
+ bool status = FALSE;
+
+ /*-------------------------------------------------------------------------
+ * If the input slot is a natural time slot, let it be allocated
+ *-------------------------------------------------------------------------*/
+ if ( tbf->naturalTs[newTs] )
+ {
+ status = TRUE;
+ }
+ /*-------------------------------------------------------------------------
+ * If the TBF has already been allocated a natural time slot, then allow
+ * any other valid time slot be allocated
+ *-------------------------------------------------------------------------*/
+ for ( int ts=0; ts<MAX_TIMESLOTS && !status; ts++ )
+ {
+ if ( tbf->naturalTs[ts] && ((dir==DL && allocatedTsDL[ts]) ||
+ (dir==UL && allocatedTsUL[ts])) )
+ {
+ status = TRUE;
+ }
+ }
+
+ return(status);
+}
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ScheduleInfo.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ScheduleInfo.cpp
new file mode 100644
index 0000000..5c3a717
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ScheduleInfo.cpp
@@ -0,0 +1,56 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ScheduleInfo.cpp
+// Author(s) : Daryl Kaiser
+// Create Date : 1/16/2001
+// Description :
+//
+// *******************************************************************
+
+#include "ScheduleInfo.h"
+#include "grr/grr_intf.h"
+#include "vipermib.h"
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleInfo::OkayToAddUser
+**
+**----------------------------------------------------------------------------*/
+bool ScheduleInfo::OkayToAddUser(LinkDirection dir) const
+{
+ if ( (nbrUsersUL + nbrUsersDL) < MAX_USERS_PER_SLOT &&
+ ( (dir==UL && (nbrUsersUL < MAX_USERS_PER_SLOT_UL) ) ||
+ (dir==DL) ) )
+ {
+ return(TRUE);
+ }
+ else
+ {
+ return(FALSE);
+ }
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleInfo::UpdateUsersAndCapacity
+**
+**----------------------------------------------------------------------------*/
+void ScheduleInfo::UpdateUsersAndCapacity(LinkDirection dir)
+{
+ if ( dir == DL )
+ {
+ scheduleQueueDL.GetUsersAndCapacity(&nbrUsersDL, &utilizedCapacityDL);
+ }
+ else
+ {
+ scheduleQueueUL.GetUsersAndCapacity(&nbrUsersUL, &utilizedCapacityUL);
+ }
+}
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ScheduleQueue.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ScheduleQueue.cpp
new file mode 100644
index 0000000..c7729b4
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ScheduleQueue.cpp
@@ -0,0 +1,694 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ScheduleQueue.cpp
+// Author(s) : Daryl Kaiser
+// Create Date : 12/22/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ScheduleQueue.h"
+
+const int ScheduleQueue::nbrEntries[QUEUE_NUM_LEVELS] = {7,9,4,12};
+const float ScheduleQueue::capacityPerEntry[QUEUE_NUM_LEVELS] =
+ {float(0.125),float(0.0125),float(0.0025),float(0.0002)};
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleQueue::ScheduleQueue
+**
+** PURPOSE: Constructor.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+ScheduleQueue::ScheduleQueue(LinkDirection dir) : direction(dir)
+{
+ int level;
+ int index;
+ /*-------------------------------------------------------------------------
+ * Initialize master scheduler queue entries at all levels. Indices, too.
+ *-------------------------------------------------------------------------*/
+ for ( level=0; level<QUEUE_NUM_LEVELS; level++ )
+ {
+ for ( index=0; index<QUEUE_MAX_SIZE; index++ )
+ {
+ currentIndex[level] = -1;
+ queue[level][index].userTbf = NULL_TBF;
+ queue[level][index].precedence = 0;
+ queue[level][index].entryNumber = 0;
+ queue[level][index].importance = NULL_IMPORTANCE;
+ }
+ }
+ /*-------------------------------------------------------------------------
+ * Initialize temporary duplicate queue entries at all levels
+ *-------------------------------------------------------------------------*/
+ for ( level=0; level<QUEUE_NUM_LEVELS; level++ )
+ {
+ for ( index=0; index<QUEUE_MAX_SIZE; index++ )
+ {
+ savedQueue[level][index].userTbf = NULL_TBF;
+ savedQueue[level][index].precedence = 0;
+ savedQueue[level][index].entryNumber = 0;
+ savedQueue[level][index].importance = NULL_IMPORTANCE;
+ }
+ }
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleQueue::FindAvailableEntries
+**
+** PURPOSE: Find the number of schedule queue entries available to user.
+** Optionally go out of requested delay class (queue level).
+**
+** INPUT PARAMETERS:
+** desiredLevel - queue level (0..QUEUE_NUM_LEVELS-1)
+** precedence - precedencd class (1-3)
+** tryOtherLevels - try other than desired level (T/F)
+**
+** RETURN VALUE(S): number of available queue entries
+**
+**----------------------------------------------------------------------------*/
+int ScheduleQueue::FindAvailableEntries (Tbf* pTbf,
+ int desiredLevel,
+ int precedence,
+ bool tryOtherLevels)
+{
+ int rankIndex[QUEUE_MAX_SIZE];
+ int rankImportance[QUEUE_MAX_SIZE];
+ Tbf* rankTbf[QUEUE_MAX_SIZE];
+ int availableEntries = 0;
+ int entryNumber;
+
+ /*-------------------------------------------------------------------------
+ * Rank importance values for the desired queue level from worst to best
+ *-------------------------------------------------------------------------*/
+ Rank(desiredLevel, rankIndex, rankImportance, rankTbf);
+
+ /*-------------------------------------------------------------------------
+ * Find # of queue entries that new user would get
+ *-------------------------------------------------------------------------*/
+ int newImportance;
+ bool isAvailable = TRUE;
+ for ( entryNumber=0;
+ isAvailable && entryNumber<nbrEntries[desiredLevel];
+ entryNumber++ )
+ {
+ newImportance = (entryNumber==0) ? precedence : 10*precedence + entryNumber;
+ if ( newImportance >= rankImportance[entryNumber] )
+ {
+ isAvailable = FALSE;
+ }
+ else if ( pTbf != rankTbf[entryNumber] )
+ {
+ availableEntries += 1;
+ }
+ }
+ return(availableEntries);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleQueue::AllocateEntries
+**
+** PURPOSE: Allocate schedule queue entries to user.
+** Optionally go out of requested delay class (queue level).
+**
+** INPUT PARAMETERS:
+** pTbf - ptr to DL or UL TBF structure
+** desiredLevel - queue level (0..QUEUE_NUM_LEVELS-1)
+** precedence - precedence class (1-3)
+** tryOtherLevels - try other than desired level (T/F)
+**
+** RETURN VALUE(S): number of allocated queue entries
+**
+**----------------------------------------------------------------------------*/
+int ScheduleQueue::AllocateEntries (Tbf *pTbf,
+ int desiredLevel,
+ int precedence,
+ bool tryOtherLevels)
+{
+ int rankIndex[QUEUE_MAX_SIZE];
+ int rankImportance[QUEUE_MAX_SIZE];
+ Tbf* rankTbf[QUEUE_MAX_SIZE];
+ int entryNumber;
+
+ /*-------------------------------------------------------------------------
+ * Rank importance values for the desired queue level from worst to best
+ *-------------------------------------------------------------------------*/
+ Rank(desiredLevel, rankIndex, rankImportance, rankTbf);
+
+ /*-------------------------------------------------------------------------
+ * Allocate as many queue entries as user is entitled to receive
+ *-------------------------------------------------------------------------*/
+ bool madeAllocation = TRUE;
+ for ( entryNumber=0;
+ madeAllocation && entryNumber<nbrEntries[desiredLevel];
+ entryNumber++ )
+ {
+ madeAllocation = AllocateOneEntry(desiredLevel, rankIndex[entryNumber], pTbf,
+ precedence, entryNumber);
+ }
+ return(entryNumber-1);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleQueue::AllocateOneEntry
+**
+** PURPOSE: Compute importance of user's next entry. If it beats the
+** importance of the existing queue entry, overwrite it.
+**
+** INPUT PARAMETERS:
+** level - queue level (0..QUEUE_NUM_LEVELS-1)
+** index - queue index (0..QUEUE_MAX_SIZE-1)
+** pTbf - ptr to DL or UL TBF structure
+** precedence - new user's precedence class (1-3)
+** entryNumber - new user's entry number (1st, 2nd,..)
+**
+** RETURN VALUE(S): whether new entry was allocated (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool ScheduleQueue::AllocateOneEntry (int level,
+ int index,
+ Tbf *pTbf,
+ int precedence,
+ int entryNumber)
+{
+ int newImportance = (entryNumber==0) ? precedence : 10*precedence + entryNumber;
+ if ( newImportance < queue[level][index].importance )
+ {
+ SetEntry(level, index, pTbf, precedence, entryNumber, newImportance);
+ return(TRUE);
+ }
+ else
+ {
+ return(FALSE);
+ }
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleQueue::DellocateEntries
+**
+** PURPOSE: Dellocate schedule queue entries from user and rebalance
+** remaining entries in the queue.
+**
+** INPUT PARAMETERS:
+** pTbf - ptr to DL or UL TBF structure
+** level - queue level (0..QUEUE_NUM_LEVELS-1)
+**
+** RETURN VALUE(S): number of queue entries deallocated
+**
+**----------------------------------------------------------------------------*/
+int ScheduleQueue::DeallocateEntries (Tbf *pTbf, int level)
+{
+ /*-------------------------------------------------------------------------
+ * Deallocate all entries for this user
+ *-------------------------------------------------------------------------*/
+ int entries = 0;
+ for ( int index=0; index<QUEUE_MAX_SIZE; index++ )
+ {
+ if ( queue[level][index].userTbf == pTbf )
+ {
+ entries += 1;
+ queue[level][index].userTbf = NULL_TBF;
+ queue[level][index].precedence = 0;
+ queue[level][index].entryNumber = 0;
+ queue[level][index].importance = NULL_IMPORTANCE;
+ }
+ }
+ return(entries);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleQueue::BalanceEntries
+**
+** PURPOSE: Balance schedule queue entries based on precedence of all
+** remaining users.
+**
+** INPUT PARAMETERS:
+** level - queue level (0..QUEUE_NUM_LEVELS-1)
+**
+** RETURN VALUE(S): number of allocated queue entries
+**
+**----------------------------------------------------------------------------*/
+void ScheduleQueue::BalanceEntries (int level)
+{
+ /*---------------------------------------------------------------------
+ * Find all remaining users at this queue level
+ *---------------------------------------------------------------------*/
+ Tbf* remainingTbf[QUEUE_MAX_SIZE];
+ int remainingPrecedence[QUEUE_MAX_SIZE];
+ int highestEntry[QUEUE_MAX_SIZE];
+ GetAllTbf(level, remainingTbf, remainingPrecedence, highestEntry);
+
+ /*---------------------------------------------------------------------
+ * For each remaining user, allocate as many entries as possible
+ **** for now, ignore peak throughput
+ *---------------------------------------------------------------------*/
+ int entryNumber;
+ for ( int user=0; user<QUEUE_MAX_SIZE; user++ )
+ {
+ if ( remainingTbf[user] != NULL_TBF )
+ {
+ /*-------------------------------------------------------------
+ * Rank importance values for this queue from worst to best
+ *-------------------------------------------------------------*/
+ int rankIndex[QUEUE_MAX_SIZE];
+ int rankImportance[QUEUE_MAX_SIZE];
+ Tbf* rankTbf[QUEUE_MAX_SIZE];
+ Rank(level, rankIndex, rankImportance, rankTbf);
+
+ bool madeAllocation = TRUE;
+ for ( entryNumber=0;
+ madeAllocation && entryNumber<QUEUE_MAX_SIZE;
+ entryNumber++ )
+ {
+ madeAllocation = AllocateOneEntry(level, rankIndex[entryNumber],
+ remainingTbf[user], remainingPrecedence[user],
+ entryNumber+highestEntry[user]+1);
+ }
+ }
+ }
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleQueue::GetEntryTbf
+**
+** PURPOSE: Get TBF pointer of one queue entry
+**
+** INPUT PARAMETERS:
+** level - queue level (0..QUEUE_NUM_LEVELS-1)
+** index - queue index (0..QUEUE_MAX_SIZE-1)
+**
+** RETURN VALUE(S): ptr to TBF
+**
+**----------------------------------------------------------------------------*/
+Tbf* ScheduleQueue::GetEntryTbf (int level, int index) const
+{
+ return(queue[level][index].userTbf);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleQueue::GetCurrentEntryTbf
+**
+** PURPOSE: Get TBF pointer of current queue entry (using currentIndex)
+**
+** INPUT PARAMETERS:
+** level - queue level (0..QUEUE_NUM_LEVELS-1)
+**
+** RETURN VALUE(S): ptr to TBF
+**
+**----------------------------------------------------------------------------*/
+Tbf* ScheduleQueue::GetCurrentEntryTbf (int level) const
+{
+ return(queue[level][currentIndex[level]].userTbf);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleQueue::GetAllTbf
+**
+** PURPOSE: Compile a list of all TBFs in a particular queue. Also list
+** the precedence and highest allocated entry for the user.
+**
+** INPUT PARAMETERS:
+** level - queue level (0..QUEUE_NUM_LEVELS-1)
+** tbf[] - array of TBF pointers (size=QUEUE_MAX_SIZE)
+** precedence[] - array of user precedence (same size)
+** highestEntry[] - array of user's highest entry (ditto)
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+int ScheduleQueue::GetAllTbf(int level,
+ Tbf **tbf,
+ int *precedence,
+ int *highestEntry)
+{
+ int i;
+ int nbrRemainingUsers(0);
+
+ /*---------------------------------------------------------------------
+ * Initialize output to null entries
+ *---------------------------------------------------------------------*/
+ for ( i=0; i<QUEUE_MAX_SIZE; i++ )
+ {
+ tbf[i] = NULL_TBF;
+ }
+ /*---------------------------------------------------------------------
+ * Search through all schedule queue entries looking for unique TBFs
+ *---------------------------------------------------------------------*/
+ for ( i=0; i<QUEUE_MAX_SIZE; i++ )
+ {
+ if ( queue[level][i].userTbf != NULL_TBF )
+ {
+ /*-------------------------------------------------------------
+ * Check whether TBF is already in tbf[] list
+ *-------------------------------------------------------------*/
+ int foundTbf = FALSE;
+ for ( int k=0; k<nbrRemainingUsers && !foundTbf; k++)
+ {
+ if ( tbf[k] == queue[level][i].userTbf )
+ {
+ foundTbf = TRUE;
+ /*----------------------------------------------------
+ * It's in the list, now save highest entry
+ *----------------------------------------------------*/
+ if ( queue[level][i].entryNumber > highestEntry[k] )
+ {
+ highestEntry[k] = queue[level][i].entryNumber;
+ }
+ }
+ }
+ /*-------------------------------------------------------------
+ * If TBF is not yet in tbf[] list, enter it now
+ *-------------------------------------------------------------*/
+ if ( !foundTbf )
+ {
+ tbf[nbrRemainingUsers] = queue[level][i].userTbf;
+ precedence[nbrRemainingUsers] = queue[level][i].precedence;
+ highestEntry[nbrRemainingUsers] = queue[level][i].entryNumber;
+ nbrRemainingUsers += 1;
+ /*-------------------------------------------------------------
+ * Check that each TBF is not in FREE state. If so, it's a bug.
+ *-------------------------------------------------------------*/
+ if ( queue[level][i].userTbf->GetTbfState() == Tbf::FREE )
+ {
+ printf("Error found by ScheduleQueue::GetAllTbf: TBF is in FREE state\n");
+ }
+ }
+ }
+ }
+ return(nbrRemainingUsers);
+}
+
+ /*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleQueue::GetEntryImportance
+**
+** PURPOSE: Get importance value of one queue entry
+**
+** INPUT PARAMETERS:
+** level - queue level (0..QUEUE_NUM_LEVELS-1)
+** index - queue index (0..QUEUE_MAX_SIZE-1)
+**
+** RETURN VALUE(S): importance value
+**
+**----------------------------------------------------------------------------*/
+int ScheduleQueue::GetEntryImportance (int level, int index) const
+{
+ return(queue[level][index].importance);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleQueue::SetEntry
+**
+** PURPOSE: Set TBF and importance of one queue entry
+**
+** INPUT PARAMETERS:
+** level - queue level (0..QUEUE_NUM_LEVELS-1)
+** index - queue index (0..QUEUE_MAX_SIZE-1)
+** pTbf - ptr to DL or UL TBF structure
+** precedence - precedence class (1-3)
+** entryNumber - entry for this user (1st, 2nd, etc)
+** importance - importance value
+**
+** RETURN VALUE(S): number of available queue entries
+**
+**----------------------------------------------------------------------------*/
+void ScheduleQueue::SetEntry (int level, int index, Tbf *pTbf, int precedence,
+ int entryNumber, int importance)
+{
+ queue[level][index].userTbf = pTbf;
+ queue[level][index].precedence = precedence;
+ queue[level][index].entryNumber = entryNumber;
+ queue[level][index].importance = importance;
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleQueue::ResetCurrentIndex
+**
+** PURPOSE: Reset current index of one queue level
+**
+** INPUT PARAMETERS:
+** level - queue level (0..QUEUE_NUM_LEVELS-1)
+**
+** RETURN VALUE(S): number of available queue entries
+**
+**----------------------------------------------------------------------------*/
+void ScheduleQueue::ResetCurrentIndex (int level)
+{
+ currentIndex[level] = -1;
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleQueue::IncrementCurrentIndex
+**
+** PURPOSE: Increment current index of one queue level
+**
+** INPUT PARAMETERS:
+** level - queue level (0..QUEUE_NUM_LEVELS-1)
+**
+** RETURN VALUE(S): indicates whether index is still within queue bounds
+**
+**----------------------------------------------------------------------------*/
+bool ScheduleQueue::IncrementCurrentIndex (int level)
+{
+ currentIndex[level] += 1;
+ return (currentIndex[level] < nbrEntries[level]);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleQueue::Rank
+**
+** PURPOSE: Rank one queue level by importance value from worst to best
+**
+** INPUT:
+** level - queue level (0..QUEUE_NUM_LEVELS-1)
+** OUTPUT:
+** rank[] - array of importance values
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void ScheduleQueue::Rank(int level, int *rankIndex, int *rankImportance, Tbf **rankTbf)
+{
+ int index;
+ int localCopy[QUEUE_MAX_SIZE];
+
+ /*-------------------------------------------------------------------------
+ * Construct a local copy of importance values for the desired queue level
+ *-------------------------------------------------------------------------*/
+ for ( index=0; index<QUEUE_MAX_SIZE; index++ )
+ {
+ localCopy[index] = queue[level][index].importance;
+ }
+ /*-------------------------------------------------------------------------
+ * In each of nbrEntries[level] passes, find and mark worst importance
+ *-------------------------------------------------------------------------*/
+ for ( int pass=0; pass<nbrEntries[level]; pass++)
+ {
+ rankImportance[pass] = 0;
+ rankTbf[pass] = NULL_TBF;
+ for ( index=0; index<nbrEntries[level]; index++ )
+ {
+ if ( localCopy[index] > rankImportance[pass] )
+ {
+ rankIndex[pass] = index;
+ rankImportance[pass] = localCopy[index];
+ rankTbf[pass] = queue[level][index].userTbf;
+ }
+ }
+ localCopy[rankIndex[pass]] = -1; // done with this entry
+ }
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleQueue::ScheduleNextBlock
+**
+** PURPOSE: Schedule the next RLC block from the queues of one slot
+**
+** INPUT: none
+**
+** OUTPUT: pTbf - ptr to scheduled UL or DL TBF structure
+**
+** RETURN VALUE(S): indicates whether entry was assigned (T) or not (F)
+**
+**----------------------------------------------------------------------------*/
+bool ScheduleQueue::ScheduleNextBlock (Tbf **ppTbf)
+{
+ DBG_FUNC("ScheduleQueue::ScheduleNextBlock", RLC_MAC_SCHEDULER);
+ DBG_ENTER();
+
+ bool empty[QUEUE_NUM_LEVELS];
+
+ /*-------------------------------------------------------------------------
+ * First, determine which queues contain valid TBFs and which are empty.
+ * If the queue's first entry is a null TBF, then the entire queue is empty.
+ *-------------------------------------------------------------------------*/
+ for ( int level=0; level<QUEUE_NUM_LEVELS; level++)
+ {
+ if ( GetEntryTbf(level,0) == NULL_TBF ) empty[level] = TRUE;
+ else empty[level] = FALSE;
+ }
+
+ DBG_TRACE(" Empty list = %d,%d,%d,%d\n", empty[0],empty[1],empty[2],empty[3]);
+
+ /*-------------------------------------------------------------------------
+ * Take at most two passes through the queue hierarchy for this time slot
+ * looking for a TBF in ALLOCATED state. When found, set valid TBF pointer.
+ *-------------------------------------------------------------------------*/
+ *ppTbf = NULL_TBF;
+ for ( int pass=0; pass<2 && *ppTbf==NULL_TBF; pass++ )
+ {
+ /*-------------------------------------------------------------------------
+ * Starting from lowest delay class queue, look for a non-null TBF to send
+ *-------------------------------------------------------------------------*/
+ for ( level=0; level<QUEUE_NUM_LEVELS && *ppTbf==NULL_TBF; level++)
+ {
+ /*-------------------------------------------------------------------------
+ * If the first queue entry is null, they're all null. Skip the entire queue.
+ *-------------------------------------------------------------------------*/
+ if ( !empty[level] )
+ {
+ /*-------------------------------------------------------------------------
+ * Increment this queue's entry index until finding a TBF that is ALLOCATED.
+ *-------------------------------------------------------------------------*/
+ while ( *ppTbf==NULL_TBF && IncrementCurrentIndex(level) )
+ {
+ *ppTbf = GetCurrentEntryTbf(level);
+
+ DBG_TRACE(" Pass=%d, Level=%d, index=%d, TLLI=0x%x, TbfState=%d\n",
+ pass,level,currentIndex[level],(*ppTbf)->tlli.GetTLLI(),(*ppTbf)->GetTbfState());
+
+ if ( (*ppTbf)->GetTbfState() != Tbf::ALLOCATED )
+ {
+ *ppTbf = NULL_TBF;
+ }
+ }
+ /*-------------------------------------------------------------------------
+ * If no TBF was found in ALLOCATED state, the entry index was left one
+ * position beyond the queue end. Reset it and loop to next queue level.
+ *-------------------------------------------------------------------------*/
+ if ( *ppTbf==NULL_TBF )
+ {
+ ResetCurrentIndex(level);
+ }
+ }
+ }
+ }
+ DBG_TRACE(" Leaving with (*ppTbf)=%d\n", (*ppTbf));
+ DBG_LEAVE();
+ return (*ppTbf!=NULL_TBF);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleQueue::GetUsersAndCapacity
+**
+**----------------------------------------------------------------------------*/
+void ScheduleQueue::GetUsersAndCapacity(int *nbrUsers, float *utilizedCapacity)
+{
+ /*---------------------------------------------------------------------
+ * Find # of users at each queue level
+ *---------------------------------------------------------------------*/
+ Tbf* tbf[QUEUE_MAX_SIZE];
+ int precedence[QUEUE_MAX_SIZE];
+ int highestEntry[QUEUE_MAX_SIZE];
+ int usersAtLevel;
+ *nbrUsers = 0;
+ *utilizedCapacity = 0.0;
+ for ( int level=0; level<QUEUE_NUM_LEVELS; level++ )
+ {
+ usersAtLevel = GetAllTbf(level, tbf, precedence, highestEntry);
+ *nbrUsers += usersAtLevel;
+ *utilizedCapacity += capacityPerEntry[level] * usersAtLevel;
+ }
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleQueue::CopyQueue
+**
+** PURPOSE: Make exact copies of the current master schedule queues and
+** save them in the savedQueue temporary storage in this object
+**
+** INPUT: none
+**
+** OUTPUT: none
+**
+** RETURN VALUE(S): pointer to the copied queues
+**
+**----------------------------------------------------------------------------*/
+void ScheduleQueue::CopyQueue(void)
+{
+ int level;
+ int index;
+ /*-------------------------------------------------------------------------
+ * Copy master scheduler queue entries into temporary savedQueue
+ *-------------------------------------------------------------------------*/
+ for ( level=0; level<QUEUE_NUM_LEVELS; level++ )
+ {
+ for ( index=0; index<QUEUE_MAX_SIZE; index++ )
+ {
+ savedQueue[level][index].userTbf = queue[level][index].userTbf;
+ savedQueue[level][index].precedence = queue[level][index].precedence;
+ savedQueue[level][index].entryNumber = queue[level][index].entryNumber;
+ savedQueue[level][index].importance = queue[level][index].importance;
+ }
+ }
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ScheduleQueue::RestoreQueue
+**
+** PURPOSE: Restore the master schedule queues to their original states,
+** as recorded in savedQueue temporary storage in this object
+**
+** INPUT: none
+**
+** OUTPUT: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void ScheduleQueue::RestoreQueue(void)
+{
+ int level;
+ int index;
+ /*-------------------------------------------------------------------------
+ * Restore master scheduler queue entries using values in savedQueue
+ *-------------------------------------------------------------------------*/
+ for ( level=0; level<QUEUE_NUM_LEVELS; level++ )
+ {
+ for ( index=0; index<QUEUE_MAX_SIZE; index++ )
+ {
+ queue[level][index].userTbf = savedQueue[level][index].userTbf;
+ queue[level][index].precedence = savedQueue[level][index].precedence;
+ queue[level][index].entryNumber = savedQueue[level][index].entryNumber;
+ queue[level][index].importance = savedQueue[level][index].importance;
+ }
+ }
+}
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/SingleBlockAllocationStruct.cpp b/data/mnet/GP10/Host/Rlc_mac/src/SingleBlockAllocationStruct.cpp
new file mode 100644
index 0000000..494c7a5
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/SingleBlockAllocationStruct.cpp
@@ -0,0 +1,141 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : SingleBlockAllocationStruct.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "SingleBlockAllocationStruct.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// class SingleBlockAllocationStruct
+//
+// Description:
+// Single Block Allocation Struct -- GSM04.60 11.2.29
+//
+// <Single Block Allocation struct > ::=
+// < TIMESLOT_NUMBER : bit (3) >
+// { 0 | 1 < ALPHA : bit (4) >
+// < GAMMA_TN : bit (5) >}
+// { 0 | 1 < P0 : bit (4) >
+// < BTS_PWR_CTRL_MODE : bit (1) >
+// < PR_MODE : bit (1) > }
+// < TBF Starting Time : < Starting Frame Number Description IE > > ;
+// *******************************************************************
+
+
+RlcMacResult SingleBlockAllocationStruct::EncodeSingleBlockAllocationStruct(BitStreamOut &dataStream)
+{
+ DBG_FUNC("SingleBlockAllocationStruct::EncodeNCMeasParamStruct", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack Single Block Allocation Struct bits into the output bit stream.
+ if (isValid)
+ {
+ // Encode Timeslot Number Allocation bit
+ // < TIMESLOT_NUMBER : bit (3) >
+ dataStream.InsertBits8(timeslot, 3);
+
+ // Encode ALPHA and GAMMA if valid
+ // { 0 | 1 < ALPHA : bit (4) >
+ // < GAMMA_TN : bit (5) >}
+ if (powerIndication.isValid)
+ {
+ dataStream.InsertBits8(1, 1);
+ dataStream.InsertBits8(powerIndication.alpha, 4);
+ dataStream.InsertBits8(powerIndication.gamma, 5);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode PO, BTS Power Control Mode and PR Mode
+ // { 0 | 1 < P0 : bit (4) >
+ // < BTS_PWR_CTRL_MODE : bit (1) >
+ // < PR_MODE : bit (1) > }
+ if (powerControl.isValid)
+ {
+ dataStream.InsertBits8(1, 1);
+ result = powerControl.po.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ result = powerControl.btsPowerCtlMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ result = powerControl.prMode.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ // Encode TBF Starting Time
+ // < TBF Starting Time : < Starting Frame Number Description IE > > ;
+ if (startTime.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = startTime.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("SingleBlockAllocationStruct::EncodeSingleBlockAllocationStruct Dynamic "
+ "Allocation Struct not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void SingleBlockAllocationStruct::DisplaySingleBlockAllocationStruct(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tSingle Block Allocation Struct\n");
+
+ // Print out Timeslot Number Allocation bit
+ outObj->Trace("\tTimeslot ---> %d\n", timeslot);
+
+ // Print out ALPHA and GAMMA if valid
+ if (powerIndication.isValid)
+ {
+ outObj->Trace("\tAlpha ---> %f\n",
+ (powerIndication.alpha > 10) ? 1.0 : (float) (powerIndication.alpha * 0.1));
+ outObj->Trace("\tGamma ---> %d dB\n", powerIndication.gamma<<1) ;
+ }
+
+ // Print out PO, BTS Power Control Mode and PR Mode
+ if (powerControl.isValid)
+ {
+ powerControl.po.DisplayDetails(outObj);
+ powerControl.btsPowerCtlMode.DisplayDetails(outObj);
+ powerControl.prMode.DisplayDetails(outObj);
+ }
+
+ // Print out TBF Starting Time
+ if (startTime.IsValid())
+ {
+ startTime.DisplayDetails(outObj);
+ }
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/TAITable.cpp b/data/mnet/GP10/Host/Rlc_mac/src/TAITable.cpp
new file mode 100644
index 0000000..0e9bfe4
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/TAITable.cpp
@@ -0,0 +1,76 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : TAITable.cpp
+// Author(s) : Tim Olson
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#include "TAITable.h"
+
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+TAITable::TAITable()
+{
+ // Initialize TAI entries to point to zero.
+ for (int i=0; i < MAX_TAI_PER_TS; i++)
+ {
+ pTAIEntry[i] = 0;
+ }
+}
+
+
+unsigned char TAITable::AllocateTAI(Tbf *pTbf)
+{
+ DBG_FUNC("TAITable::AllocateTAI", RLC_MAC);
+ DBG_ENTER();
+
+ // Search through the list of TAI entries. If an entry is zero then
+ // it is free.
+ for (int i=0; i < MAX_TAI_PER_TS; i++)
+ {
+ if (pTAIEntry[i] == 0)
+ {
+ pTAIEntry[i] = pTbf;
+ DBG_LEAVE();
+ return (i);
+ }
+ }
+
+ DBG_LEAVE();
+ return (INVALID_TAI);
+}
+
+
+void TAITable::ReleaseTAI(unsigned char tai)
+{
+ DBG_FUNC("TAITable::ReleaseTAI", RLC_MAC);
+ DBG_ENTER();
+
+ if (tai < MAX_TAI_PER_TS)
+ {
+ pTAIEntry[tai] = 0;
+ }
+
+ DBG_LEAVE();
+}
+
+
+void TAITable::ShowTAITable()
+{
+ for (int i=0; i < MAX_TAI_PER_TS; i++)
+ {
+ printf("TAI %2d : TBF - %x\n", i, pTAIEntry[i]);
+ }
+}
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/TSPool.cpp b/data/mnet/GP10/Host/Rlc_mac/src/TSPool.cpp
new file mode 100644
index 0000000..0eb34fa
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/TSPool.cpp
@@ -0,0 +1,469 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : TSPool.cpp
+// Author(s) : Tim Olson
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#include "TSPool.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+
+TSPool::TSPool()
+{
+ for (int i=0; i < MAX_TRX; i++)
+ {
+ // Initialize TFI table to be all unallocated.
+ for (int k=0; k < MAX_TFI; k++)
+ {
+ sysUlTFI[i][k] = 0;
+ sysDlTFI[i][k] = 0;
+ }
+ }
+}
+
+//----------------------------------------------------------------------------
+// TAI functions
+//----------------------------------------------------------------------------
+unsigned char TSPool::AllocateTAI(int trx, int ts, Tbf *pTbf)
+{
+ DBG_FUNC("TSPool::AllocateTAI", RLC_MAC);
+ DBG_ENTER();
+
+ unsigned char tai;
+
+ if (IsTrxTsValid(trx, ts))
+ {
+ tai = sysTS[trx][ts].AllocateTAI(pTbf);
+ pTbf->tai = tai;
+ pTbf->taiTs = ts;
+ }
+ else
+ {
+ DBG_WARNING("TSPool::AllocateTAI: Invalid trx (%d) or ts (%d)\n", trx, ts);
+ tai = INVALID_TAI;
+ }
+
+ DBG_LEAVE();
+ return (tai);
+}
+
+
+void TSPool::ReleaseTAI(int trx, int ts, unsigned char tai)
+{
+ DBG_FUNC("TSPool::ReleaseTAI", RLC_MAC);
+ DBG_ENTER();
+
+ if (IsTrxTsValid(trx, ts))
+ {
+ sysTS[trx][ts].ReleaseTAI(tai);
+ }
+ else
+ {
+ DBG_WARNING("TSPool::ReleaseTAI: Invalid trx (%d) or ts (%d)\n", trx, ts);
+ }
+
+ DBG_LEAVE();
+}
+
+void TSPool::ShowTAITable(int trx)
+{
+ if (IsTrxValid(trx))
+ {
+ for (int i=0; i < MAX_TIMESLOTS; i++)
+ {
+ printf("TAI Table for Trx(%d) Timeslot(%d)\n", trx, i);
+ sysTS[trx][i].ShowTAITable();
+ }
+ }
+ else
+ {
+ printf("Invalid trx (%d)\n", trx);
+ }
+}
+
+void TSPool::ShowTAITable(int trx, int ts)
+{
+ if (IsTrxTsValid(trx, ts))
+ {
+ printf("TAI Table for Trx(%d) Timeslot(%d)\n", trx, ts);
+ sysTS[trx][ts].ShowTAITable();
+ }
+ else
+ {
+ printf("Invalid trx (%d) or ts(%d)\n", trx, ts);
+ }
+}
+
+
+
+//----------------------------------------------------------------------------
+// USF functions
+//----------------------------------------------------------------------------
+unsigned char TSPool::AllocateUSF(int trx, int ts, ULTbf *pTbf)
+{
+ DBG_FUNC("TSPool::AllocateUSF", RLC_MAC);
+ DBG_ENTER();
+
+ unsigned char usf;
+
+ if (IsTrxTsValid(trx, ts))
+ {
+ usf = sysTS[trx][ts].AllocateUSF(pTbf);
+ pTbf->usf[ts] = usf;
+ }
+ else
+ {
+ DBG_WARNING("TSPool::AllocateTUSF: Invalid trx (%d) or ts (%d)\n", trx, ts);
+ usf = INVALID_USF;
+ }
+
+ DBG_LEAVE();
+ return (usf);
+}
+
+
+void TSPool::ReleaseUSF(int trx, int ts, unsigned char usf)
+{
+ DBG_FUNC("TSPool::ReleaseUSF", RLC_MAC);
+ DBG_ENTER();
+
+ if (IsTrxTsValid(trx, ts))
+ {
+ sysTS[trx][ts].ReleaseUSF(usf);
+ }
+ else
+ {
+ DBG_WARNING("TSPool::ReleaseUSF: Invalid trx (%d) or ts (%d)\n", trx, ts);
+ }
+
+ DBG_LEAVE();
+}
+
+void TSPool::ShowUSFTable(int trx)
+{
+ if (IsTrxValid(trx))
+ {
+ for (int i=0; i < MAX_TIMESLOTS; i++)
+ {
+ printf("USF Table for Trx(%d) Timeslot(%d)\n", trx, i);
+ sysTS[trx][i].ShowUSFTable();
+ }
+ }
+ else
+ {
+ printf("Invalid trx (%d)\n", trx);
+ }
+}
+
+void TSPool::ShowUSFTable(int trx, int ts)
+{
+ if (IsTrxTsValid(trx, ts))
+ {
+ printf("USF Table for Trx(%d) Timeslot(%d)\n", trx, ts);
+ sysTS[trx][ts].ShowUSFTable();
+ }
+ else
+ {
+ printf("Invalid trx (%d) or ts(%d)\n", trx, ts);
+ }
+}
+
+
+
+
+//----------------------------------------------------------------------------
+// TFI functions
+//----------------------------------------------------------------------------
+unsigned char TSPool::AllocateULTFI(int trx, ULTbf *pUlTbf)
+{
+ DBG_FUNC("TSPool::AllocateULTFI", RLC_MAC);
+ DBG_ENTER();
+
+ unsigned char tfi;
+
+ if (IsTrxValid(trx))
+ {
+ for (tfi = 0; tfi < MAX_TFI; tfi++)
+ {
+ if (!sysUlTFI[trx][tfi])
+ {
+ sysUlTFI[trx][tfi] = pUlTbf;
+ pUlTbf->tfi.SetTFI(tfi);
+ break;
+ }
+ }
+ }
+ else
+ {
+ DBG_WARNING("TSPool::AllocateULTFI: Invalid trx (%d)\n", trx);
+ tfi = INVALID_TFI;
+ }
+
+ DBG_LEAVE();
+ return (tfi);
+}
+
+void TSPool::ReleaseULTFI(int trx, unsigned char tfi)
+{
+ DBG_FUNC("TSPool::ReleaseULTFI", RLC_MAC);
+ DBG_ENTER();
+
+ if (IsTrxValid(trx) && IsTfiValid(tfi))
+ {
+ sysUlTFI[trx][tfi] = 0;
+ }
+ else
+ {
+ DBG_WARNING("TSPool::ReleaseULTFI: Invalid trx (%d) or tfi (%d)\n", trx, tfi);
+ }
+
+ DBG_LEAVE();
+}
+
+ULTbf *TSPool::FindULTbf(int trx, unsigned char tfi)
+{
+ DBG_FUNC("TSPool::FindULTbf", RLC_MAC);
+ DBG_ENTER();
+
+ if (IsTrxValid(trx) && (tfi < MAX_TFI))
+ {
+ return (sysUlTFI[trx][tfi]);
+ }
+ else
+ {
+ return (0);
+ }
+ DBG_LEAVE();
+}
+
+void TSPool::ShowULTFITable(int trx)
+{
+ if (IsTrxValid(trx))
+ {
+ printf("Uplink TFI Table for Trx(%d)\n", trx);
+ for (int i = 0; i < MAX_TFI; i++)
+ {
+ printf("TFI %d = %#x\n", i, sysUlTFI[trx][i]);
+ }
+ }
+ else
+ {
+ printf("Invalid trx (%d)\n", trx);
+ }
+}
+
+
+unsigned char TSPool::AllocateDLTFI(int trx, DLTbf *pDlTbf)
+{
+ DBG_FUNC("TSPool::AllocateDLTFI", RLC_MAC);
+ DBG_ENTER();
+
+ unsigned char tfi;
+
+ if (IsTrxValid(trx))
+ {
+ for (tfi = 0; tfi < MAX_TFI; tfi++)
+ {
+ if (!sysDlTFI[trx][tfi])
+ {
+ sysDlTFI[trx][tfi] = pDlTbf;
+ pDlTbf->tfi.SetTFI(tfi);
+ break;
+ }
+ }
+ }
+ else
+ {
+ DBG_WARNING("TSPool::AllocateDLTFI: Invalid trx (%d)\n", trx);
+ tfi = INVALID_TFI;
+ }
+
+ DBG_LEAVE();
+ return (tfi);
+}
+
+void TSPool::ReleaseDLTFI(int trx, unsigned char tfi)
+{
+ DBG_FUNC("TSPool::ReleaseDLTFI", RLC_MAC);
+ DBG_ENTER();
+
+ if (IsTrxValid(trx) && IsTfiValid(tfi))
+ {
+ sysDlTFI[trx][tfi] = 0;
+ }
+ else
+ {
+ DBG_WARNING("TSPool::ReleaseDLTFI: Invalid trx (%d) or tfi (%d)\n", trx, tfi);
+ }
+
+ DBG_LEAVE();
+}
+
+DLTbf *TSPool::FindDLTbf(int trx, unsigned char tfi)
+{
+ DBG_FUNC("TSPool::FindDLTbf", RLC_MAC);
+ DBG_ENTER();
+
+ if (IsTrxValid(trx) && (tfi < MAX_TFI))
+ {
+ return (sysDlTFI[trx][tfi]);
+ }
+ else
+ {
+ return (0);
+ }
+ DBG_LEAVE();
+}
+
+void TSPool::ShowDLTFITable(int trx)
+{
+ if (IsTrxValid(trx))
+ {
+ printf("Downlink TFI Table for Trx(%d)\n", trx);
+ for (int i = 0; i < MAX_TFI; i++)
+ {
+ printf("TFI %d = %#x\n", i, sysDlTFI[trx][i]);
+ }
+ }
+ else
+ {
+ printf("Invalid trx (%d)\n", trx);
+ }
+}
+
+//----------------------------------------------------------------------------
+// DL signalling queue functions
+//----------------------------------------------------------------------------
+JC_STATUS TSPool::QueueDLSignallingMsg
+(
+ int trx,
+ int ts,
+ MsgPacchReq *l1Msg
+)
+{
+ DBG_FUNC("TSPool::QueueDLSignallingMsg", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_ERROR;
+
+ if (IsTrxTsValid(trx, ts))
+ {
+ status = sysTS[trx][ts].QueueDLSignallingMsg(l1Msg);
+ }
+ else
+ {
+ DBG_WARNING("TSPool::QueueDLSignallingMsg: Invalid trx (%d) or ts (%d)\n", trx, ts);
+ }
+
+ DBG_LEAVE();
+ return(status);
+}
+
+
+MsgPacchReq *TSPool::DequeueDLSignallingMsg
+(
+ int trx,
+ int ts
+)
+{
+ DBG_FUNC("TSPool::DequeueDLSignallingMsg", RLC_MAC);
+ DBG_ENTER();
+
+ MsgPacchReq *pPacchMsg;
+
+ if (IsTrxTsValid(trx, ts))
+ {
+ pPacchMsg = sysTS[trx][ts].DequeueDLSignallingMsg();
+ }
+ else
+ {
+ DBG_WARNING("TSPool::DequeueDLSignallingMsg: Invalid trx (%d) or ts (%d)\n", trx, ts);
+ pPacchMsg = 0;
+ }
+
+ DBG_LEAVE();
+ return(pPacchMsg);
+}
+
+
+
+//----------------------------------------------------------------------------
+// Channel Combination functions
+//----------------------------------------------------------------------------
+
+void TSPool::ShowChannelComb(int trx)
+{
+ if (IsTrxValid(trx))
+ {
+ printf("Channel Combinations for Trx(%d)\n", trx);
+ for (int i=0; i < MAX_TIMESLOTS; i++)
+ {
+ printf("\tTimeslot(%d) = %d\n", i, sysTS[trx][i].GetChannelComb());
+ }
+ }
+ else
+ {
+ printf("Invalid trx (%d)\n", trx);
+ }
+}
+
+void TSPool::ShowChannelComb(int trx, int ts)
+{
+ if (IsTrxTsValid(trx, ts))
+ {
+ printf("Channel Combination for Trx(%d) Timeslot(%d) = %d\n", trx, ts,
+ sysTS[trx][ts].GetChannelComb());
+ }
+ else
+ {
+ printf("Invalid trx (%d) or ts(%d)\n", trx, ts);
+ }
+}
+
+
+//----------------------------------------------------------------------------
+// General Timeslot functions
+//----------------------------------------------------------------------------
+
+void TSPool::ShowTimeslotInfo(int trx)
+{
+ if (IsTrxValid(trx))
+ {
+ for (int i=0; i < MAX_TIMESLOTS; i++)
+ {
+ printf("Trx (%d) Timeslot (%d) Information\n", trx, i);
+ sysTS[trx][i].ShowTimeslotInfo();
+ }
+ }
+ else
+ {
+ printf("Invalid trx (%d)\n", trx);
+ }
+}
+
+
+void TSPool::ShowTimeslotInfo(int trx, int ts)
+{
+ if (IsTrxTsValid(trx, ts))
+ {
+ printf("Trx (%d) Timeslot (%d) Information\n", trx, ts);
+ sysTS[trx][ts].ShowTimeslotInfo();
+ }
+ else
+ {
+ printf("Invalid trx (%d) or ts(%d)\n", trx, ts);
+ }
+}
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/Tbf.cpp b/data/mnet/GP10/Host/Rlc_mac/src/Tbf.cpp
new file mode 100644
index 0000000..c443148
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/Tbf.cpp
@@ -0,0 +1,21 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : Tbf.cpp
+// Author(s) : Tim Olson
+// Create Date : 01/08/2001
+// Description :
+//
+// *******************************************************************
+
+#include "Tbf.h"
+
+unsigned char Tbf::sysCtlAckCount = 0;
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/TbfPool.cpp b/data/mnet/GP10/Host/Rlc_mac/src/TbfPool.cpp
new file mode 100644
index 0000000..62fcc6d
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/TbfPool.cpp
@@ -0,0 +1,423 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : TbfPool.cpp
+// Author(s) : Tim Olson
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#include "TbfPool.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+//--------------------------------------------------------------------------
+// Functions related to administrative and op state changes
+//--------------------------------------------------------------------------
+
+void TbfPool::AbnormalReleaseBts()
+{
+ DBG_FUNC("TbfPool::AbnormalReleaseBts", RLC_MAC);
+ DBG_ENTER();
+
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ if (sysULTbf[i].GetTbfState() != Tbf::FREE)
+ {
+ sysULTbf[i].AbnormalReleaseULTbf();
+ }
+
+ if (sysDLTbf[i].GetTbfState() != Tbf::FREE)
+ {
+ sysDLTbf[i].AbnormalReleaseDLTbf();
+ }
+ }
+
+ DBG_LEAVE();
+}
+
+
+void TbfPool::AbnormalReleaseTrx(int trx)
+{
+ DBG_FUNC("TbfPool::AbnormalReleaseTrx", RLC_MAC);
+ DBG_ENTER();
+
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ if ((sysULTbf[i].GetTbfState() != Tbf::FREE) &&
+ (sysULTbf[i].trx == trx))
+ {
+ sysULTbf[i].AbnormalReleaseULTbf();
+ }
+
+ if ((sysDLTbf[i].GetTbfState() != Tbf::FREE) &&
+ (sysDLTbf[i].trx == trx))
+ {
+ sysDLTbf[i].AbnormalReleaseDLTbf();
+ }
+ }
+
+ DBG_LEAVE();
+}
+
+
+void TbfPool::AbnormalReleaseTs(int trx, int ts)
+{
+ DBG_FUNC("TbfPool::AbnormalReleaseTs", RLC_MAC);
+ DBG_ENTER();
+
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ if ((sysULTbf[i].GetTbfState() != Tbf::FREE) &&
+ (sysULTbf[i].trx == trx) && (sysULTbf[i].allocatedTs[ts] == TRUE))
+ {
+ sysULTbf[i].AbnormalReleaseULTbf();
+ }
+
+ if ((sysDLTbf[i].GetTbfState() != Tbf::FREE) &&
+ (sysDLTbf[i].trx == trx) && (sysDLTbf[i].allocatedTs[ts] == TRUE))
+ {
+ sysDLTbf[i].AbnormalReleaseDLTbf();
+ }
+ }
+
+ DBG_LEAVE();
+}
+
+
+//--------------------------------------------------------------------------
+// Functions related to uplink TBF
+//--------------------------------------------------------------------------
+ULTbf *TbfPool::EstablishULTbf(
+ IeAccessType *accessType,
+ IeTLLI *tlli,
+ IeChannelRequestDescription *chanReqDesc,
+ IeMSRadioAccessCapability *radioAccessCapability
+)
+{
+ DBG_FUNC("TbfPool::EstablishULTbf", RLC_MAC);
+ DBG_ENTER();
+
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ if (sysULTbf[i].GetTbfState() == Tbf::FREE)
+ {
+ if (sysULTbf[i].EstablishULTbf(accessType, tlli, chanReqDesc,
+ radioAccessCapability) == JC_OK)
+ {
+ return (&sysULTbf[i]);
+ }
+ else
+ {
+ break;
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return(0);
+}
+
+
+ULTbf *TbfPool::FindULTbf(IeGlobalTFI &globalTfi)
+{
+ DBG_FUNC("TbfPool::FindULTbf", RLC_MAC);
+ DBG_ENTER();
+
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ if (sysULTbf[i].GetTbfState() != Tbf::FREE)
+ {
+ if (sysULTbf[i].tfi.GetTFI() == globalTfi.GetGlobalTFI())
+ {
+ return (&sysULTbf[i]);
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return (0);
+}
+
+ULTbf *TbfPool::FindULTbf(IeTFI &tfi)
+{
+ DBG_FUNC("TbfPool::FindULTbf", RLC_MAC);
+ DBG_ENTER();
+
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ if (sysULTbf[i].GetTbfState() != Tbf::FREE)
+ {
+ if (sysULTbf[i].tfi.GetTFI() == tfi.GetTFI())
+ {
+ return (&sysULTbf[i]);
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return (0);
+}
+
+
+
+ULTbf *TbfPool::FindULTbf(unsigned long tlli)
+{
+ DBG_FUNC("TbfPool::FindULTbf", RLC_MAC);
+ DBG_ENTER();
+
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ if (sysULTbf[i].GetTbfState() != Tbf::FREE)
+ {
+ if (sysULTbf[i].tlli.GetTLLI() == tlli)
+ {
+ return (&sysULTbf[i]);
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return (0);
+}
+
+
+ULTbf *TbfPool::FindULTbf(unsigned char controlAckTag)
+{
+ DBG_FUNC("TbfPool::FindULTbf", RLC_MAC);
+ DBG_ENTER();
+
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ if (sysULTbf[i].GetTbfState() != Tbf::FREE)
+ {
+ if (sysULTbf[i].GetControlAckTag() == controlAckTag)
+ {
+ return (&sysULTbf[i]);
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return (0);
+}
+
+
+
+
+
+//--------------------------------------------------------------------------
+// Functions related to downlink TBF
+//--------------------------------------------------------------------------
+
+
+DLTbf *TbfPool::EstablishDLTbf(BSSGP_DL_UNITDATA_MSG *pUnitDataMsg, bool ctrlAck)
+{
+ DBG_FUNC("TbfPool::EstablishDLTbf", RLC_MAC);
+ DBG_ENTER();
+
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ if (sysDLTbf[i].GetTbfState() == Tbf::FREE)
+ {
+ if (sysDLTbf[i].EstablishDLTbf(pUnitDataMsg, ctrlAck) == JC_OK)
+ {
+ return (&sysDLTbf[i]);
+ }
+ else
+ {
+ break;
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return(0);
+}
+
+
+
+DLTbf *TbfPool::FindDLTbf(unsigned long tlli)
+{
+ DBG_FUNC("TbfPool::FindDLTbf", RLC_MAC);
+ DBG_ENTER();
+
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ if (sysDLTbf[i].GetTbfState() != Tbf::FREE)
+ {
+ if (sysDLTbf[i].tlli.GetTLLI() == tlli)
+ {
+ return (&sysDLTbf[i]);
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return (0);
+}
+
+
+
+DLTbf *TbfPool::FindDLTbf(IeGlobalTFI &globalTfi)
+{
+ DBG_FUNC("TbfPool::FindDLTbf", RLC_MAC);
+ DBG_ENTER();
+
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ if (sysDLTbf[i].GetTbfState() != Tbf::FREE)
+ {
+ if (sysDLTbf[i].tfi.GetTFI() == globalTfi.GetGlobalTFI())
+ {
+ return (&sysDLTbf[i]);
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return (0);
+}
+
+DLTbf *TbfPool::FindDLTbf(IeTFI &tfi)
+{
+ DBG_FUNC("TbfPool::FindDLTbf", RLC_MAC);
+ DBG_ENTER();
+
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ if (sysDLTbf[i].GetTbfState() != Tbf::FREE)
+ {
+ if (sysDLTbf[i].tfi.GetTFI() == tfi.GetTFI())
+ {
+ return (&sysDLTbf[i]);
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return (0);
+}
+
+
+DLTbf *TbfPool::FindDLTbf(unsigned char controlAckTag)
+{
+ DBG_FUNC("TbfPool::FindDLTbf", RLC_MAC);
+ DBG_ENTER();
+
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ if (sysDLTbf[i].GetTbfState() != Tbf::FREE)
+ {
+ if (sysDLTbf[i].CheckControlAckTag(controlAckTag))
+ {
+ return (&sysDLTbf[i]);
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return (0);
+}
+
+
+
+
+
+
+bool TbfPool::AnyActiveTBF(int trx, int ts)
+{
+ DBG_FUNC("TbfPool::AnyActiveTBF", RLC_MAC);
+ DBG_ENTER();
+
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ if (((sysDLTbf[i].GetTbfState() == Tbf::ALLOCATED) &&
+ (sysDLTbf[i].trx == trx) && (sysDLTbf[i].allocatedTs[ts])) ||
+ ((sysULTbf[i].GetTbfState() == Tbf::ALLOCATED) &&
+ (sysULTbf[i].trx == trx) && (sysULTbf[i].allocatedTs[ts])))
+ {
+ return (TRUE);
+ }
+ }
+
+ DBG_LEAVE();
+ return(FALSE);
+}
+
+
+
+
+void TbfPool::ShowULAllocatedTBF()
+{
+ printf("Allocated Uplink TBFs\n");
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ if (sysULTbf[i].GetTbfState() != Tbf::FREE)
+ {
+ sysULTbf[i].ShowTBFInfo();
+ }
+ }
+}
+
+void TbfPool::ShowDLAllocatedTBF()
+{
+ printf("Allocated Downlink TBFs\n");
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ if (sysDLTbf[i].GetTbfState() != Tbf::FREE)
+ {
+ sysDLTbf[i].ShowTBFInfo();
+ }
+ }
+}
+
+void TbfPool::ShowULFreeTBF()
+{
+ printf("Free Uplink TBFs\n");
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ if (sysULTbf[i].GetTbfState() == Tbf::FREE)
+ {
+ sysULTbf[i].ShowTBFInfo();
+ }
+ }
+}
+
+void TbfPool::ShowDLFreeTBF()
+{
+ printf("Free Downlink TBFs\n");
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ if (sysDLTbf[i].GetTbfState() == Tbf::FREE)
+ {
+ sysDLTbf[i].ShowTBFInfo();
+ }
+ }
+}
+
+void TbfPool::ShowULAllTBF()
+{
+ printf("All Uplink TBFs\n");
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ sysULTbf[i].ShowTBFInfo();
+ }
+}
+
+void TbfPool::ShowDLAllTBF()
+{
+ printf("All Downlink TBFs\n");
+ for (int i = 0; i < MAX_TFI * MAX_TRX; i++)
+ {
+ sysDLTbf[i].ShowTBFInfo();
+ }
+}
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/Timeslot.cpp b/data/mnet/GP10/Host/Rlc_mac/src/Timeslot.cpp
new file mode 100644
index 0000000..c74d066
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/Timeslot.cpp
@@ -0,0 +1,42 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : Timeslot.cpp
+// Author(s) : Tim Olson
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#include "Timeslot.h"
+
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+void Timeslot::ShowTimeslotInfo()
+{
+ printf("Channel Comb (%d) Data RTS count (%d) Signalling RTS count (%d) RTI (%d)\n",
+ channelComb, dataRTSCount, signallingRTSCount, rti);
+ sysTAI.ShowTAITable();
+ sysUSF.ShowUSFTable();
+}
+
+
+
+
+
+ int channelComb;
+ int dataRTSCount;
+ int signallingRTSCount;
+ TAITable sysTAI;
+ USFTable sysUSF;
+ DLSignallingMsgQueue sysDLSigMsgQ;
+ unsigned char rti;
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ULDataBlockPool.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ULDataBlockPool.cpp
new file mode 100644
index 0000000..cc4608a
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ULDataBlockPool.cpp
@@ -0,0 +1,120 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ULDataBlockPool.cpp
+// Author(s) : Tim Olson
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#include "ULDataBlockPool.h"
+
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+DbgOutput ULDataBlock::MsgDisplayObj("RLC/MAC Msg", RLC_MAC_MSG);
+
+
+void ULDataBlock::DisplayDataBlock()
+{
+ MsgDisplayObj.Trace("UPLINK RLC DATA BLOCK\n");
+ MsgDisplayObj.HexDump(streamIn.GetBitStream(),
+ streamIn.GetStreamLen());
+}
+
+
+
+ULDataBlockPool::ULDataBlockPool()
+{
+ // Initialize head and tail pointer.
+ head = tail = 0;
+
+ // Allocate enough uplink blocks to handle max uplink TBF's.
+ for (int i=0; i < MAX_TFI * MAX_TRX * MAX_RL_BLOCKS_PER_PDU; i++)
+ {
+ ULDataBlock *pUlDataBlock = new ULDataBlock();
+ // Remove data blocks from the head.
+ if ((head != tail) || ((head == tail) && (head!=0)))
+ {
+ tail->next = pUlDataBlock;
+ pUlDataBlock->next = 0;
+ tail = pUlDataBlock;
+ }
+ else
+ {
+ // Handle special case where list is empty.
+ head = tail = pUlDataBlock;
+ pUlDataBlock->next = 0;
+ }
+ }
+}
+
+
+ULDataBlockPool::~ULDataBlockPool()
+{
+ while (head->next)
+ {
+ ULDataBlock *pUlDataBlock = head;
+ head = pUlDataBlock->next;
+ delete (pUlDataBlock);
+ }
+}
+
+
+ULDataBlock *ULDataBlockPool::GetULDataBlock()
+{
+ DBG_FUNC("ULDataBlockPool::GetULDataBlock", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ ULDataBlock *pUlDataBlock;
+
+ // Remove data blocks from the head.
+ if (head != tail)
+ {
+ pUlDataBlock = head;
+ head = pUlDataBlock->next;
+ }
+ else
+ {
+ pUlDataBlock = head;
+ head = tail = 0;
+ }
+
+ DBG_LEAVE();
+ return (pUlDataBlock);
+}
+
+
+void ULDataBlockPool::ReturnULDataBlock(ULDataBlock *pUlDataBlock)
+{
+ DBG_FUNC("ULDataBlockPool::ReturnULDataBlock", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ // Remove data blocks from the head.
+ if ((head != tail) || ((head == tail) && (head!=0)))
+ {
+ tail->next = pUlDataBlock;
+ pUlDataBlock->next = 0;
+ tail = pUlDataBlock;
+ }
+ else
+ {
+ // Handle special case where list is empty.
+ head = tail = pUlDataBlock;
+ pUlDataBlock->next = 0;
+ }
+
+ // Reset the length octet pointer.
+ pUlDataBlock->ulHeader.ResetCurrLengthOctet();
+
+ DBG_LEAVE();
+ return;
+}
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ULRlcLink.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ULRlcLink.cpp
new file mode 100644
index 0000000..447b6fc
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ULRlcLink.cpp
@@ -0,0 +1,1104 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ULRlcLink.cpp
+// Author(s) : Tim Olson
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#include "ULRlcLink.h"
+#include "RlcMacTask.h"
+#include "MsgPacketUplinkAckNack.h"
+#include "bssgp\bssgp_util.h"
+
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+void HexDumper(UINT8 *buffer, int length );
+
+// Static uplink data block pool.
+ULDataBlockPool ULRlcLink::sysUlDataBlockPool;
+
+int ULRlcLink::N3103_MAX = 5;
+int ULRlcLink::N3101_MAX = 8;
+
+ULRlcLink::ULRlcLink() : k(RCV_WINDOW_SIZE_K)
+{
+ rlcMode = ACKNOWLEDGED_RLC_MODE;
+
+ // V(R) and V(Q) are initially set to 0.
+ vR = 0;
+ vQ = 0;
+
+ // Set V(N) to INVALID.
+ for (int i = 0; i < RLC_MOD_VAL; i++)
+ {
+ vN[i] = INVALID;
+ pUlBlocks[i] = 0;
+ }
+
+ firstDataBlock = 0;
+ lastDataBlock = LAST_BLOCK_UNKNOWN;
+ numRLCBlocksSinceLastAck = MAX_RLC_BLOCKS_BETWEEN_ACKS;
+ endOfTBF = FALSE;
+ chanCoding.SetChannelCodingCommand(IeChannelCodingCommand::CS_1);
+ pAssociatedTbf = 0;
+
+ pT3169 = new JCCTimer((FUNCPTR)ULRlcLink::T3169TimerExpiry, 0);
+ pActivityTimer = new JCCTimer((FUNCPTR)ULRlcLink::ActivityTimerExpiry, 0);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ULRlcLink::EstablishRLCLink
+**
+** PURPOSE: Initialize all the RLC state information for a new uplink TBF.
+**
+** INPUT PARAMETERS: mode - RLC Mode (acked or not acked)
+**
+** RETURN VALUE(S): JC_SUCCESS
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS ULRlcLink::EstablishRLCLink(ULTbf *pUlTbf, RLC_MODE mode)
+{
+ DBG_FUNC("ULRlcLink::EstablishRLCLink", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ rlcMode = mode;
+
+ // V(R) and V(Q) are initially set to 0.
+ vR = 0;
+ vQ = 0;
+
+ // Set V(N) to INVALID.
+ for (int i = 0; i < RLC_MOD_VAL; i++)
+ {
+ vN[i] = INVALID;
+ pUlBlocks[i] = 0;
+ }
+
+ firstDataBlock = 0;
+ lastDataBlock = LAST_BLOCK_UNKNOWN;
+ numRLCBlocksSinceLastAck = MAX_RLC_BLOCKS_BETWEEN_ACKS;
+ endOfTBF = FALSE;
+
+ // For now we will start with channel coding set to CS-0
+ chanCoding.SetChannelCodingCommand(IeChannelCodingCommand::CS_1);
+
+ // Hang on to the tbf object.
+ pAssociatedTbf = pUlTbf;
+ pUlTbf->ClearControlAckTag();
+
+ // Clear counters.
+ n3103 = 0;
+ n3101 = 0;
+
+ // Start Activity Timer
+ pActivityTimer->setTimerMSec(MAX_ALLOWED_INACTIVE_TIME, (int)pAssociatedTbf);
+
+ DBG_TRACE("RLC/MAC: Uplink RLC link established tbf(%#x)\n", pUlTbf);
+ if (rlcMode == ACKNOWLEDGED_RLC_MODE)
+ DBG_TRACE("\tRLC Mode (ACKNOWLEDGED) k = %d V(R) = %d V(Q) = %d\n",
+ k, vR, vQ);
+ else
+ DBG_TRACE("\tRLC Mode (UNACKNOWLEDGED) k = %d V(R) = %d V(Q) = %d\n",
+ k, vR, vQ);
+
+ DBG_LEAVE();
+ return (status);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ULRlcLink::UpdateTSSpecificData
+**
+** PURPOSE: This function will be called after timeslots are allocated. Any
+** data that requires timeslot information should be set here.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void ULRlcLink::UpdateTSSpecificData()
+{
+ DBG_FUNC("ULRlcLink::UpdateTSSpecificData", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ int numTs = 0;
+
+ for (int i = 0; i < MAX_TIMESLOTS; i++)
+ {
+ if (pAssociatedTbf->allocatedTs[i]) numTs++;
+ }
+
+ n3101FirstBlkBuffer = numTs * 4;
+
+ DBG_LEAVE();
+ return;
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: DLRlcLink::AbnormalRelease
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): JC_SUCCESS
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS ULRlcLink::AbnormalRelease()
+{
+ DBG_FUNC("ULRlcLink::AbnormalRelease", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ // Inactivate the tbf so that no more scheduling occurs.
+ pAssociatedTbf->SetTbfState(Tbf::INACTIVE);
+
+ // Send a PACKET TBF RELEASE message.
+ status = RlcMacTask::theRlcMacTask->SendPacketTBFRelease(0, pAssociatedTbf,
+ MsgPacketTBFRelease::ABNORMAL_RELEASE);
+
+ // Use T3169 to allow enough time to send the deactivate message.
+ pT3169->cancelTimer();
+ pT3169->setTimerMSec(T3169_VALUE, (int)pAssociatedTbf);
+
+ DBG_LEAVE();
+ return (status);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ULRlcLink::UpdateRcvStateVariables
+**
+** PURPOSE: Update the receive state variables V(Q), V(R) and V(N)
+** appropriately.
+**
+** INPUT PARAMETERS: pUlDataBlock - pointer to the received data block
+**
+** RETURN VALUE(S): TRUE - if data block is in receive window
+** FALSE - if data block is not in receive window
+**
+**----------------------------------------------------------------------------*/
+bool ULRlcLink::UpdateRcvStateVariables(ULDataBlock *pUlDataBlock)
+{
+ DBG_FUNC("ULRlcLink::UpdateRcvStateVariables", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ // Handle acknowledged mode.
+ if (rlcMode == ACKNOWLEDGED_RLC_MODE)
+ {
+ // Verify that the BSN is in the active window.
+ // [V(Q) <= BSN < V(Q) + k]
+ int rcvDiff = vQ - pUlDataBlock->ulHeader.GetBSN();
+ if (rcvDiff > 0) rcvDiff = RLC_MOD_VAL - rcvDiff;
+ if (rcvDiff < k)
+ {
+ // Update V(R) based on the BSN
+ // In RLC acknowledged mode:
+ // V(R) is set to [BSN'+1] mod 128 provided [V(R) <= BSN' < V(Q) + k]
+ if ((vR <= pUlDataBlock->ulHeader.GetBSN()) || ((vR > pUlDataBlock->ulHeader.GetBSN()) &&
+ (vQ > pUlDataBlock->ulHeader.GetBSN())))
+ {
+ int tmpVR = vR;
+
+ vR = (pUlDataBlock->ulHeader.GetBSN() + 1) % RLC_MOD_VAL;
+
+ // Since V(R) moved update the V(N) state of any elements that are
+ // less than V(R)-k mod 128
+ while (tmpVR != vR)
+ {
+ vN[(tmpVR+(k+1)) % RLC_MOD_VAL] = INVALID;
+ tmpVR = ++tmpVR % RLC_MOD_VAL;
+ }
+ }
+
+ // Update V(N) to RECEIVED for newly received block
+ vN[pUlDataBlock->ulHeader.GetBSN() % RLC_MOD_VAL] = RECEIVED;
+
+ // If this BSN is at the start of the window then update V(Q)
+ if (pUlDataBlock->ulHeader.GetBSN() % RLC_MOD_VAL == vQ)
+ {
+ // Find the next non-received BSN or V(R).
+ while (vQ != vR)
+ {
+ vQ = ++vQ % RLC_MOD_VAL;
+ if (vN[vQ] == INVALID) break;
+ }
+ }
+ }
+ // BSN is out of the active window so throw it on the floor.
+ else
+ {
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ }
+ // Handle unacknowledged mode.
+ else
+ {
+ // Don't do any updating if we already received this block. NOTE the
+ // only time this should happen is on the last block.
+ if (vR != (pUlDataBlock->ulHeader.GetBSN()) + 1 % RLC_MOD_VAL)
+ {
+ // Update V(R) based on the BSN
+ // In RLC unacknowledged mode:
+ // V(R) is set to [BSN'+1] mod 128
+ vR = (pUlDataBlock->ulHeader.GetBSN()) + 1 % RLC_MOD_VAL;
+
+ // Update V(Q)
+ // If [V(R) - V(Q)] mod 128 > k then V(Q) = [V(R) - k] mod 128
+ if (vR >= vQ)
+ {
+ if ((vR - vQ) % RLC_MOD_VAL > k)
+ {
+ vQ = vR - k;
+ }
+ }
+ else
+ {
+ if (vR + (RLC_MOD_VAL - vQ) > k)
+ {
+ vQ = (RLC_MOD_VAL - (k - vR)) % RLC_MOD_VAL;
+ }
+ }
+ }
+ else
+ {
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ }
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ULRlcLink::SendULAckNack
+**
+** PURPOSE: Send a PACKET UPLINK ACK/NACK message.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void ULRlcLink::SendULAckNack()
+{
+ DBG_FUNC("ULRlcLink::SendULAckNack", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ DLMacHeader ackMsgHdr;
+ MsgPacketUplinkAckNack ackMsg;
+ int trx, ts;
+ unsigned char controlAckTag = CTL_ACK_TAG_NOT_APPLICABLE;
+
+ RlcMacTask::theRlcMacTask->TSSelectionRequest(&trx, &ts, pAssociatedTbf);
+ // Assemble RLC/MAC header.
+ ackMsgHdr.SetPayloadType(DLMacHeader::RLC_CTRL_BLOCK_NO_OPT_OCTETS);
+ ackMsgHdr.SetRRBP(DLMacHeader::FN_N_13);
+ ackMsgHdr.SetSPBit(DLMacHeader::RRBP_NOT_VALID);
+ // USF will be filled in later.
+
+ // Assemble Packet Uplink Ack/Nack.
+ ackMsg.pageMode.SetPageMode(IePageMode::NORMAL_PAGING);
+ ackMsg.uplinkTFI = pAssociatedTbf->tfi;
+ ackMsg.chanCoding = chanCoding;
+
+ // If we have seen the last block see if we can set the final bit
+ IeAckNackDescription::FINAL_ACK_INDICATION finalAck;
+ if (endOfTBF == TRUE)
+ {
+ // For acknowledged mode we must verify that all blocks were received.
+ if (rlcMode == ACKNOWLEDGED_RLC_MODE)
+ {
+ if (vR == vQ)
+ {
+ finalAck = IeAckNackDescription::TBF_COMPLETE;
+ // Add a tag to the PACCH IND message sent to the DSP. This tag will be
+ // returned in the PACCH REQ or PACCH NACK message.
+ controlAckTag = pAssociatedTbf->SetControlAckTag();
+ // Set the state to inactive so it won't be scheduled.
+ pAssociatedTbf->SetTbfState(Tbf::INACTIVE);
+ // Set the Relative Reserve Bit Period to valid.
+ ackMsgHdr.SetSPBit(DLMacHeader::RRBP_VALID);
+ }
+ else
+ {
+ finalAck = IeAckNackDescription::TBF_INCOMPLETE;
+ }
+ }
+ // For unacknowledged mode once we see the last block the TBF is over.
+ else
+ {
+ finalAck = IeAckNackDescription::TBF_COMPLETE;
+ // Add a tag to the PACCH IND message sent to the DSP. This tag will be
+ // returned in the PACCH REQ or PACCH NACK message.
+ controlAckTag = pAssociatedTbf->SetControlAckTag();
+ // Set the state to inactive so it won't be scheduled.
+ pAssociatedTbf->SetTbfState(Tbf::INACTIVE);
+ // Set the Relative Reserve Bit Period to valid.
+ ackMsgHdr.SetSPBit(DLMacHeader::RRBP_VALID);
+ }
+ }
+ // Not the end of the TBF
+ else
+ {
+ finalAck = IeAckNackDescription::TBF_INCOMPLETE;
+ }
+
+ // Build the received block bitmap.
+ unsigned char rrb[RRB_SIZE];
+ int vrTmp = vR;
+ bzero((char *)rrb, RRB_SIZE);
+ for (int i = RRB_SIZE-1; i >= 0; i--)
+ {
+ unsigned char bitPos = 1;
+ while (bitPos)
+ {
+ if (--vrTmp < 0)
+ vrTmp += RLC_MOD_VAL;
+ if (vN[vrTmp] == RECEIVED)
+ rrb[i] |= bitPos;
+ bitPos <<= 1;
+ }
+ }
+
+ ackMsg.ackNackDescription.SetAckNackDescription(finalAck, (unsigned char)vR, rrb);
+
+ DBG_TRACE("RLC/MAC: Sending UPLINK ACK/NACK - tbf(%#x)\n", pAssociatedTbf);
+
+ if (RlcMacTask::theRlcMacTask->SendPacchMsg(trx, ts, &ackMsgHdr, &ackMsg, controlAckTag,
+ RLC_MAC_ACCESS_BURST) != JC_OK)
+ {
+ DBG_WARNING("ULRlcLink::SendULAckNack: failed\n");
+ }
+
+ // Reset the acknowledgement counter.
+ numRLCBlocksSinceLastAck = MAX_RLC_BLOCKS_BETWEEN_ACKS;
+
+ DBG_LEAVE();
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ULRlcLink::ReceivePacketControlAck
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void ULRlcLink::ReceivePacketControlAck(MsgPacketControlAcknowledgement *pCtrlMsg)
+{
+ DBG_FUNC("ULRlcLink::ReceivePacketControlAck", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ DBG_TRACE("RLC/MAC: Received PACKET CONTROL ACK - tbf(%#x)\n", pAssociatedTbf);
+
+ // Canel T3169.
+ pT3169->cancelTimer();
+
+ // Cancel Activity Timer
+ pActivityTimer->cancelTimer();
+
+ // Resources may now be released.
+ ReleaseDataBlocks(0, RLC_MOD_VAL);
+ pAssociatedTbf->ReleaseULTbf();
+
+ DBG_LEAVE();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ULRlcLink::ProcessT3169Expiry
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void ULRlcLink::ProcessT3169Expiry()
+{
+ DBG_FUNC("ULRlcLink::ProcessT3169Expiry", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ DBG_TRACE("RLC/MAC: T3169 Expired - TBF(%#x)\n", pAssociatedTbf);
+ // Canel T3169.
+ pT3169->cancelTimer();
+
+ // Cancel Activity Timer
+ pActivityTimer->cancelTimer();
+
+ // Resources may now be released.
+ ReleaseDataBlocks(0, RLC_MOD_VAL);
+ pAssociatedTbf->ReleaseULTbf();
+
+ DBG_LEAVE();
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ULRlcLink::ProcessActivityTimerExpiry
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void ULRlcLink::ProcessActivityTimerExpiry()
+{
+ DBG_FUNC("ULRlcLink::ProcessActivityTimerExpiry", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ DBG_TRACE("RLC/MAC: ActivityTimer Expired - TBF(%#x)\n", pAssociatedTbf);
+
+ // Resources may now be released.
+ ReleaseDataBlocks(0, RLC_MOD_VAL);
+ pAssociatedTbf->ReleaseULTbf();
+
+ DBG_LEAVE();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ULRlcLink::ReceivePacketControlNack
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void ULRlcLink::ReceivePacketControlNack()
+{
+ DBG_FUNC("ULRlcLink::ReceivePacketControlNack", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ DBG_TRACE("RLC/MAC: Received PACKET CONTROL NACK - tbf(%#x)\n", pAssociatedTbf);
+
+ // If we have not reached N3203max then send another uplink ack nack with
+ // the final bit set.
+ if (++n3103 < N3103_MAX)
+ {
+ SendULAckNack();
+ }
+ else
+ {
+ pT3169->setTimerMSec(T3169_VALUE, (int)pAssociatedTbf);
+ DBG_TRACE("RLC/MAC: Starting T3169 for %d seconds - TBF(%#x)\n", 5, pAssociatedTbf);
+ }
+ DBG_LEAVE();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ULRlcLink::ReassembleULPDU
+**
+** PURPOSE: Reassemble an uplink PDU(s).
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void ULRlcLink::ReassembleULPDU()
+{
+ DBG_FUNC("ULRlcLink::ReassembleULPDU", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ unsigned char pduBuf[MAX_RLC_PDU_SIZE];
+ unsigned char *pPduBuf = pduBuf;
+
+ int currDataBlock = firstDataBlock;
+ bool firstLoop;
+
+ while (1)
+ {
+ firstLoop = TRUE;
+ do {
+ // Increment if this is not the first loop.
+ if (!firstLoop)
+ {
+ currDataBlock = ++currDataBlock % RLC_MOD_VAL;
+ }
+
+ // If there is no data block then we must be in unacknowledged mode.
+ if (pUlBlocks[currDataBlock])
+ {
+ if (pUlBlocks[currDataBlock]->ulHeader.GetExtensionBit() == ULMacHeader::EXTENSION_OCTET_FOLLOWS)
+ {
+ unsigned char length;
+ ULMacHeader::MORE_BIT more;
+ ULMacHeader::EXTENSION_BIT extBit;
+ pUlBlocks[currDataBlock]->ulHeader.GetCurrentLengthOctet(&length, &more, &extBit);
+
+ if (length != INVALID_LENGTH_VAL)
+ {
+ // For M=0 and E=1 there is no more data for this PDU and no more extension octets.
+ // There is an exception case where the length is equal to zero. For this case the last
+ // octet for the PDU is in the next RLC block. The rest of this length equal zero
+ // case will be handled below in the lastDataBlock section.
+ if (((more == ULMacHeader::NO_MORE_LLC_DATA) && (extBit == ULMacHeader::NO_EXTENSION_OCTET)) &&
+ (length == 0))
+ {
+ // When the length is zero all the RLC data bytes in the RLC block are for this PDU.
+ // The final octet is in the next RLC data block.
+ // Grab all the rest of the octets in this RLC block.
+ int len = pUlBlocks[currDataBlock]->GetDataBlockLength() -
+ pUlBlocks[currDataBlock]->streamIn.GetCurrentPosition();
+ pUlBlocks[currDataBlock]->streamIn.ExtractBytesN(pPduBuf, len);
+ pPduBuf += len;
+ }
+ // For M=1 and E=x another PDU follows.
+ // This RLC block contains the start and end of the current PDU.
+ else
+ {
+ // For this case the bytes indicated by length are for the current
+ // PDU. So here we just copy out those bytes.
+ pUlBlocks[currDataBlock]->streamIn.ExtractBytesN(pPduBuf, length);
+ pPduBuf += length;
+ }
+ }
+ // No more extension octets so the remaining octets must be for this PDU.
+ else
+ {
+ // This is a case where there must have previously been a PDU end in this
+ // RLC block and the remaining bytes are for another PDU.
+ int len = pUlBlocks[currDataBlock]->GetDataBlockLength() -
+ pUlBlocks[currDataBlock]->streamIn.GetCurrentPosition();
+ pUlBlocks[currDataBlock]->streamIn.ExtractBytesN(pPduBuf, len);
+ pPduBuf += len;
+ }
+ }
+ // No extension bit so just get all the bytes in the RLC block.
+ else
+ {
+ // For this case all the remaining bytes in this RLC block are for the current
+ // PDU. So here we just copy out the remaining bytes.
+ int len = pUlBlocks[currDataBlock]->GetDataBlockLength() -
+ pUlBlocks[currDataBlock]->streamIn.GetCurrentPosition();
+ pUlBlocks[currDataBlock]->streamIn.ExtractBytesN(pPduBuf, len);
+ pPduBuf += len;
+ }
+ }
+ // In unacknowledged mode and no data block was received.
+ else
+ {
+ // Add in fill bits.
+ bfill ((char *)pPduBuf, chanCoding.GetNumFillBytes(), 0);
+ pPduBuf += chanCoding.GetNumFillBytes();
+ }
+
+ firstLoop = FALSE;
+ } while (currDataBlock != lastDataBlock);
+
+ //---------------------------------------------------------------------
+ // PDU is reassembled
+ //---------------------------------------------------------------------
+
+ // We have processed the end of this PDU so send it to BSSGP.
+ SendBSSGPUnitData(pduBuf, pPduBuf - pduBuf);
+
+ // Update the start and end data pointer and release data blocks.
+ if (ScanDataBlocks(currDataBlock))
+ {
+ continue;
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ DBG_LEAVE();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ULRlcLink::IsPDUAssemblyNeeded
+**
+** PURPOSE: Check whether packet reassembly can happen now.
+**
+** INPUT PARAMETERS: pUlDataBlock - pointer to the received data block
+**
+** RETURN VALUE(S): TRUE - if it is time for packet reassembly
+** FALSE - if it is NOT time for packet reassembly
+**
+**----------------------------------------------------------------------------*/
+bool ULRlcLink::IsPDUAssemblyNeeded(ULDataBlock *pUlDataBlock)
+{
+ DBG_FUNC("ULRlcLink::IsPDUAssemblyNeeded", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ bool reassemblyNeeded = FALSE;
+
+ // If we have not seen the last RLC block for a given PDU then see if this
+ // is the last block.
+ if (lastDataBlock == LAST_BLOCK_UNKNOWN)
+ {
+ // We are at the last RLC block for a PDU if CV=0 or if there is a length
+ // indicator with a non-zero length value.
+ if (pUlDataBlock->ulHeader.GetCountdownVal() == 0)
+ {
+ // Record the last RLC block position.
+ lastDataBlock = pUlDataBlock->ulHeader.GetBSN() % RLC_MOD_VAL;
+ }
+ else if (pUlDataBlock->ulHeader.GetExtensionBit() == ULMacHeader::EXTENSION_OCTET_FOLLOWS)
+ {
+ unsigned char length;
+ ULMacHeader::MORE_BIT more;
+ ULMacHeader::EXTENSION_BIT extBit;
+ if (pUlDataBlock->ulHeader.GetCurrentLengthOctet(&length, &more, &extBit))
+ {
+ if ((length != 0) && (length != INVALID_LENGTH_VAL))
+ {
+ // Record the last RLC block position.
+ lastDataBlock = pUlDataBlock->ulHeader.GetBSN() % RLC_MOD_VAL;
+ }
+ }
+ }
+ }
+
+ // If we have seen the last RLC block for a given PDU then check to
+ // see if all the blocks have been received for acknowledged mode.
+ if (lastDataBlock != LAST_BLOCK_UNKNOWN)
+ {
+ // For acknowledged mode we must have received all the RLC blocks
+ // to reassemble.
+ if (rlcMode == ACKNOWLEDGED_RLC_MODE)
+ {
+ int rcvDiff = vQ - lastDataBlock;
+
+ if (rcvDiff < 0) rcvDiff += RLC_MOD_VAL;
+ // If all the RLC blocks have been received then reassemble.
+ if (rcvDiff < k)
+ {
+ reassemblyNeeded = TRUE;
+ }
+ }
+ // The unacknowledged mode PDU can be reassembled now.
+ else
+ {
+ reassemblyNeeded = TRUE;
+ }
+ }
+
+ DBG_LEAVE();
+ return (reassemblyNeeded);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ULRlcLink::ScanDataBlocks
+**
+** PURPOSE: Check to see if another PDU reassembly can occur. To do this
+** we must look at the M and E bits of the current data block and if
+** necessary scan forward in subsequently received data blocks.
+**
+** INPUT PARAMETERS: currDataBlock - index of the current data block
+**
+** RETURN VALUE(S): TRUE - if more reassembly can occur
+** FALSE - if NO more reassembly can occur
+**
+**----------------------------------------------------------------------------*/
+bool ULRlcLink::ScanDataBlocks(int currDataBlock)
+{
+ DBG_FUNC("ULRlcLink::ScanDataBlocks", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ // Check to see if the last block processed has an extension bit.
+ if (pUlBlocks[currDataBlock]->ulHeader.GetExtensionBit() == ULMacHeader::EXTENSION_OCTET_FOLLOWS)
+ {
+ unsigned char length;
+ ULMacHeader::MORE_BIT more;
+ ULMacHeader::EXTENSION_BIT extBit;
+ pUlBlocks[currDataBlock]->ulHeader.GetCurrentLengthOctet(&length, &more, &extBit);
+
+ // M=1 and E=0. There is more data to come and an extension follows. Scanning
+ // below will detect if the PDU is ready to reassemble. In any case the current
+ // block is the start and the end is unkown at this time.
+ //
+ // M=1 and E=1. There is more data but no more extensions. The next PDU starts in this
+ // RLC block, but does not end there. Scanning below will detect if the rest of the
+ // data blocks have been received.
+ if (((more == ULMacHeader::MORE_LLC_DATA) && (extBit == ULMacHeader::EXTENSION_OCTET_FOLLOWS)) ||
+ ((more == ULMacHeader::MORE_LLC_DATA) && (extBit == ULMacHeader::NO_EXTENSION_OCTET)))
+ {
+ // Advance to the next length octet.
+ pUlBlocks[currDataBlock]->ulHeader.GetNextLengthOctet(&length, &more, &extBit);
+ }
+ // M=0 and E=1. No more data to come and no extension.
+ else if ((more == ULMacHeader::NO_MORE_LLC_DATA) && (extBit == ULMacHeader::NO_EXTENSION_OCTET))
+ {
+ // The new starting block will be the next data block.
+ ++currDataBlock % RLC_MOD_VAL;
+ }
+ }
+ // No extension octet.
+ else
+ {
+ // The new starting block will be the next data block.
+ ++currDataBlock % RLC_MOD_VAL;
+ // No end is known yet...we will have to scan forward.
+ lastDataBlock = LAST_BLOCK_UNKNOWN;
+ }
+
+ // Free all data blocks up to but not including the current data block.
+ ReleaseDataBlocks(firstDataBlock, currDataBlock);
+ // Move the first data block to be the current one.
+ firstDataBlock = currDataBlock;
+ // No end is known yet...we will have to scan forward.
+ lastDataBlock = LAST_BLOCK_UNKNOWN;
+
+ // Scan ahead to see if we can reassemble more PDUs
+ while (currDataBlock != vR)
+ {
+ if (pUlBlocks[currDataBlock])
+ {
+ if (IsPDUAssemblyNeeded(pUlBlocks[currDataBlock]))
+ {
+ // Keep reassembling.
+ return(TRUE);
+ }
+ }
+ currDataBlock = ++currDataBlock % RLC_MOD_VAL;
+ }
+
+ DBG_LEAVE();
+ return (FALSE);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ULRlcLink::ReceiveULDataBlock
+**
+** PURPOSE: Accept a new uplink RLC block and process it.
+**
+** INPUT PARAMETERS: pUlDataBlock - pointer to the received data block
+**
+** RETURN VALUE(S): JC_SUCCESS
+** JC_ERROR
+**
+**----------------------------------------------------------------------------*/
+JC_STATUS ULRlcLink::ReceiveULDataBlock(ULDataBlock *pUlDataBlock)
+{
+ DBG_FUNC("ULRlcLink::ReceiveULDataBlock", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ // Clear N3101 since a data bock was received. Also clear the extra allowance
+ // in N3101 before the first block has been received.
+ n3101 = 0;
+ n3101FirstBlkBuffer = 0;
+
+ // Start Activity Timer
+ pActivityTimer->setTimerMSec(MAX_ALLOWED_INACTIVE_TIME, (int)pAssociatedTbf);
+
+ // Update the receive variables V(Q), V(R) and V(N).
+ if (UpdateRcvStateVariables(pUlDataBlock))
+ {
+ DBG_TRACE("RLC/MAC: Uplink RLC block received tbf(%#x)\n", pAssociatedTbf);
+ DBG_TRACE("\tBSN = %d V(R) = %d V(Q) = %d\n", pUlDataBlock->ulHeader.GetBSN(),
+ vR, vQ);
+
+ // Insert data block into list of blocks for reassembly.
+ if (pUlBlocks[pUlDataBlock->ulHeader.GetBSN() % RLC_MOD_VAL])
+ {
+ // This RLC block has already been received so just throw it away.
+ ULRlcLink::sysUlDataBlockPool.ReturnULDataBlock(pUlDataBlock);
+ }
+ else
+ {
+ pUlBlocks[pUlDataBlock->ulHeader.GetBSN() % RLC_MOD_VAL] = pUlDataBlock;
+ }
+
+ // Check to see if an UPLINK ACK/NACK message is needed and send one.
+ // Three reasons to send an ack/nack:
+ // 1. Periodically send one - based on numRLCBlocksSinceLastAck
+ // 2. We just received the block with the final BSN.
+ // 3. We previously received the PDU with the final BSN, but just now
+ // acknowledged all other blocks.
+ if ((!(--numRLCBlocksSinceLastAck)) || pUlDataBlock->ulHeader.GetCountdownVal() == 0 ||
+ ((endOfTBF == TRUE) && (vQ = vR)))
+ {
+ // Remember that we have seen the PDU with the final BSN.
+ if (pUlDataBlock->ulHeader.GetCountdownVal() == 0)
+ {
+ endOfTBF = TRUE;
+ }
+
+ SendULAckNack();
+ }
+
+ // Check to see if a PDU assembly can occur.
+ if (IsPDUAssemblyNeeded(pUlDataBlock))
+ {
+ ReassembleULPDU();
+ }
+ }
+ // Received block was not in the receive window so throw it away.
+ else
+ {
+ DBG_TRACE("RLC/MAC: Uplink RLC block received tbf(%#x)\n", pAssociatedTbf);
+ DBG_TRACE("\tOutside rcv window or already received: BSN = %d\n",
+ pUlDataBlock->ulHeader.GetBSN());
+ ULRlcLink::sysUlDataBlockPool.ReturnULDataBlock(pUlDataBlock);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ULRlcLink::ReleaseDataBlocks
+**
+** PURPOSE: Give back data blocks to the uplink data block pool. Note that
+** the endBlock will not be released. So to release a single block
+** startBlock must be one less than endBlock.
+**
+** INPUT PARAMETERS: startBlock - index of the starting data block
+** endBlock - index of the ending data block
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void ULRlcLink::ReleaseDataBlocks(int startBlock, int endBlock)
+{
+ DBG_FUNC("ULRlcLink::ReleaseDataBlocks", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ if (endBlock > RLC_MOD_VAL) endBlock = RLC_MOD_VAL;
+
+ for (int i = startBlock; i != endBlock; i = ++i % (RLC_MOD_VAL+1))
+ {
+ if (pUlBlocks[i] && (i < RLC_MOD_VAL))
+ {
+ ULRlcLink::sysUlDataBlockPool.ReturnULDataBlock(pUlBlocks[i]);
+ pUlBlocks[i] = 0;
+ }
+ }
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ULRlcLink::SendBSSGPUnitData
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: pBuf - pointer to the uplink PDU
+** length - length of the PDU
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void ULRlcLink::SendBSSGPUnitData(unsigned char *pBuf, int len)
+{
+ DBG_FUNC("ULRlcLink::SendBSSGPUnitData", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ DBG_TRACE("RLC/MAC: Sending BSSGP uplink pdu (%#x) length (%d)\n", pBuf, len);
+ HexDumper(pBuf, len);
+
+ BSSGP_API_MSG msg;
+ bzero((char *)&msg, sizeof(BSSGP_API_MSG));
+
+ // Grab a buffer from BSSGP for the LLC PDU.
+ char *pdu = bssgp_util_get_rx_buff(len);
+
+ if (pdu)
+ {
+ // Build bssgp message.
+ msg.msg_type = BSSGP_API_MSG_UL_UNITDATA;
+ msg.magic = BSSGP_MAGIC;
+ msg.msg.ul_unitdata.tlli.tlli = pAssociatedTbf->tlli.GetTLLI();
+ msg.msg.ul_unitdata.tlli.ie_present = TRUE;
+ msg.msg.ul_unitdata.qos_profile;
+ msg.msg.ul_unitdata.qos_profile.ie_present = TRUE;
+ // msg.msg.ul_unitdata.qos_profile.bucket_leak_rate[2]; -- filled in by BSSGP
+ msg.msg.ul_unitdata.qos_profile.precedence_class = (CNI_RIL3_QOS_PRECEDENCE_CLASS)pAssociatedTbf->chanReq.radioPriority;
+ msg.msg.ul_unitdata.qos_profile.a_bit = (QOS_PROFILE_A_BIT)rlcMode;
+ if (pAssociatedTbf->accType.GetAccessType() == IeAccessType::TWO_PHASE)
+ {
+ msg.msg.ul_unitdata.qos_profile.t_bit = SDU_CONTAINS_DATA;
+ }
+ else
+ {
+ msg.msg.ul_unitdata.qos_profile.t_bit = SDU_CONTAINS_SIGNALLING;
+ }
+ msg.msg.ul_unitdata.qos_profile.cr_bit = (QOS_PROFILE_CR_BIT)pAssociatedTbf->chanReq.llcPduType;
+
+ //msg.msg.ul_unitdata.cell_id; -- filled in by BSSGP
+ bcopy((char *)pBuf, pdu, len);
+ msg.msg.ul_unitdata.pdu.data = (unsigned char *)pdu;
+ msg.msg.ul_unitdata.pdu.data_len = len;
+ //msgmsg.ul_unitdata.bvci; -- filled in by BSSGP
+ }
+ else
+ {
+ DBG_WARNING("ULRlcLink::SendBSSGPUnitData: no BSSGP buf available for %d byte pdu!\n",
+ len);
+ }
+
+ if (!bssgp_api_send_msg(msg))
+ {
+ DBG_WARNING("ULRlcLink::SendBSSGPUnitData: bssgp_api_send_msg failed!\n");
+ }
+
+ DBG_LEAVE();
+ return;
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ULRlcLink::IncrementN3101
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): TRUE - if N3101 has not reached max
+** FALSE - if N3101 has reached max
+**
+**----------------------------------------------------------------------------*/
+bool ULRlcLink::IncrementN3101()
+{
+ DBG_FUNC("ULRlcLink::IncrementN3101", RLC_MAC_RLC_LINK);
+ DBG_ENTER();
+
+ bool ret = TRUE;
+
+ // NOTE: An extra number of counts are allowed before the first RLC block
+ // is received. This is because RLC/MAC does not no when the assignment
+ // was sent to the MS. This means some uplink blocks may be reserved
+ // before the MS see the assignement. This extra buffer should prevent
+ // the TBF from being released.
+ if (++n3101 >= (N3101_MAX + n3101FirstBlkBuffer))
+ {
+ // N3101 has reached max so stop scheduling this TBF and start T3169.
+ pAssociatedTbf->SetTbfState(Tbf::INACTIVE);
+ pT3169->setTimerMSec(T3169_VALUE, (int)pAssociatedTbf);
+ DBG_TRACE("RLC/MAC: N3101 = N3101Max - TBF(%#x)\n", pAssociatedTbf);
+ }
+
+ DBG_LEAVE();
+ return (ret);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ULRlcLink::T3169TimerExpiry
+**
+** PURPOSE: Send a T3169 expiry message to the specified uplink TBF.
+**
+** INPUT PARAMETERS: tbfPointer - pointer to the uplink tbf
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+int ULRlcLink::T3169TimerExpiry(int tbfPointer)
+{
+ if (tbfPointer)
+ {
+ RlcMacT3169Expiry(tbfPointer);
+ }
+ return(OK);
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ULRlcLink::ActivityTimerExpiry
+**
+** PURPOSE: Send an activity timer expiry message to the specified uplink TBF.
+**
+** INPUT PARAMETERS: tbfPointer - pointer to the uplink tbf
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+int ULRlcLink::ActivityTimerExpiry(int tbfPointer)
+{
+ if (tbfPointer)
+ {
+ RlcMacULActivityTimerExpiry(tbfPointer);
+ }
+ return(OK);
+}
+
+
+void ULRlcLink::ShowRlcLinkInfo()
+{
+ printf("Uplink RLC link information:\n");
+ if (rlcMode == ACKNOWLEDGED_RLC_MODE)
+ printf("\tRLC Mode (ACKNOWLEDGED)");
+ else
+ printf("\tRLC Mode (UNACKNOWLEDGED)");
+ printf(" k = %d V(R) = %d V(Q) = %d\n", k, vR, vQ);
+ printf("\tV(N) : R=Received, I=INVALID\n");
+ printf("\t");
+ for (int i = 0; i < RLC_MOD_VAL; i++)
+ {
+ if (((i % 32) == 0) && (i != 0)) printf("\n\t");
+ if (vN[i] == RECEIVED)
+ printf("R");
+ else
+ printf("I");
+ }
+ printf("\n");
+
+ printf("\tfirstDataBlock (%d) lastDataBlock(%d)\n",
+ firstDataBlock, lastDataBlock);
+ printf("\tnumRLCBlocksSinceLastAck(%d) endOfTbf(%d)\n",
+ numRLCBlocksSinceLastAck, endOfTBF);
+ printf("\tAssociated TBF (%#x)\n", pAssociatedTbf);
+ switch (chanCoding.GetChannelCodingCommand())
+ {
+ case IeChannelCodingCommand::CS_1 : printf("\tCurrent Channel Coding: CS_1\n"); break;
+ case IeChannelCodingCommand::CS_2 : printf("\tCurrent Channel Coding: CS_2\n"); break;
+ case IeChannelCodingCommand::CS_3 : printf("\tCurrent Channel Coding: CS_3\n"); break;
+ case IeChannelCodingCommand::CS_4 : printf("\tCurrent Channel Coding: CS_4\n"); break;
+ }
+ printf("\tN3101 = %d N3103 = %d\n", n3101, n3103);
+}
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ULTbf.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ULTbf.cpp
new file mode 100644
index 0000000..d212e74
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ULTbf.cpp
@@ -0,0 +1,160 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ULTbf.cpp
+// Author(s) : Tim Olson
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "RlcMacTask.h"
+#include "ScheduleAllocationInfo.h"
+#include "ULTbf.h"
+#include "USFTable.h"
+
+#include "grr\grr_intf.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+JC_STATUS ULTbf::EstablishULTbf(
+ IeAccessType *accessType,
+ IeTLLI *tlli,
+ IeChannelRequestDescription *chanReqDesc,
+ IeMSRadioAccessCapability *radioAccessCapability
+)
+{
+ DBG_FUNC("ULTbf::EstablishULTbf", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ // Initialize tbf request info.
+ accType = *accessType;
+ chanReq = *chanReqDesc;
+ raCapability = *radioAccessCapability;
+ Tbf::tlli = *tlli;
+
+ // Initialize the RLC link
+
+ // Clear out allocated resources. Open up allowed resources.
+ for (int i=0; i < MAX_TIMESLOTS; i++)
+ {
+ allocatedTs[i] = FALSE;
+ usf[i] = 0;
+ }
+ trx = NULL_TRX;
+
+ if ((status = rlcLink.EstablishRLCLink(this,
+ (ULRlcLink::RLC_MODE)chanReqDesc->rlcMode.GetRlcMode())) == JC_OK)
+ {
+ SetTbfState(ALLOCATED);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+JC_STATUS ULTbf::ReallocateTbf(
+ IeAccessType *accessType,
+ IeChannelRequestDescription *chanReqDesc,
+ IeMSRadioAccessCapability *radioAccessCapability
+)
+{
+ DBG_FUNC("ULTbf::ReallocateTbf", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ accType = *accessType;
+ chanReq = *chanReqDesc;
+ raCapability = *radioAccessCapability;
+
+ DBG_LEAVE();
+ return (status);
+}
+
+JC_STATUS ULTbf::ReleaseULTbf()
+{
+ DBG_FUNC("ULTbf::ReleaseULTbf", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ // Release resources with the scheduler.
+ RlcMacTask::theRlcMacTask->ULReleaseResourceRequest(this);
+ // Release resources with the dsps.
+ RlcMacTask::theRlcMacTask->SendULDeactivationMsg(this);
+ SetTbfState(FREE);
+
+ DBG_LEAVE();
+ return (status);
+}
+
+JC_STATUS ULTbf::AbnormalReleaseULTbf()
+{
+ DBG_FUNC("ULTbf::AbnormalReleaseULTbf", RLC_MAC);
+ DBG_ENTER();
+
+ JC_STATUS status = JC_OK;
+
+ status = rlcLink.AbnormalRelease();
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+void ULTbf::ShowTBFInfo()
+{
+ printf("Uplink TBF %#x - State(%d)\n", this, GetTbfState());
+ printf("\tTLLI = %#x TFI = %d\n", tlli.GetTLLI(), tfi.GetTFI());
+ printf("\tAllocated Timeslots on TRX(%d):", trx);
+ for (int i=0; i < MAX_TIMESLOTS; i++)
+ {
+ if (allocatedTs[i] == TRUE)
+ {
+ printf(" TS(%d) USF(%d)", i, usf[i]);
+ }
+ }
+ printf("\n");
+ printf("\tTAI Timeslot (%d) TAI(%d)\n", taiTs, tai);
+ rlcLink.ShowRlcLinkInfo();
+ printf("\n");
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: ULTbf::GetMultislotClass
+**
+** PURPOSE: Get multislot class sent from GPRS Server and stored in DLTbf
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): mobile's multislot class, 1-18
+**
+**----------------------------------------------------------------------------*/
+int ULTbf::GetMultislotClass(void)
+{
+ if ( raCapability.IsValid() )
+ {
+ for ( int i=0; i<MAX_ACCESS_TECHNOLOGIES; i++ )
+ {
+ if ( raCapability.MSRACapabilityValuePart[i].isValid &&
+ raCapability.MSRACapabilityValuePart[i].accessTechnologyType ==
+ (IeMSRadioAccessCapability::ACCESS_TECHNOLOGY_TYPE)grr_GetRadioAccessTechnology() )
+ return (raCapability.MSRACapabilityValuePart[i].GPRSCapability.gprsMultislotClass);
+ }
+ }
+ // If multislot class is not present, return Multislot Class 1
+ return(1);
+}
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/USFTable.cpp b/data/mnet/GP10/Host/Rlc_mac/src/USFTable.cpp
new file mode 100644
index 0000000..c8ddcfb
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/USFTable.cpp
@@ -0,0 +1,75 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : USFTable.cpp
+// Author(s) : Tim Olson
+// Create Date : 12/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#include "USFTable.h"
+
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+USFTable::USFTable()
+{
+ // Initialize USF entries to point to zero.
+ for (int i=0; i < MAX_USF_PER_TS; i++)
+ {
+ pUSFEntry[i] = 0;
+ }
+}
+
+
+unsigned char USFTable::AllocateUSF(ULTbf *pTbf)
+{
+ DBG_FUNC("USFTable::AllocateUSF", RLC_MAC);
+ DBG_ENTER();
+
+ // Search through the list of USF entries. If an entry is zero then
+ // it is free. USF 0 is reserved as a dummy USF.
+ for (int i=1; i < MAX_USF_PER_TS; i++)
+ {
+ if (pUSFEntry[i] == 0)
+ {
+ pUSFEntry[i] = pTbf;
+ DBG_LEAVE();
+ return (i);
+ }
+ }
+
+ DBG_LEAVE();
+ return (INVALID_USF);
+}
+
+
+void USFTable::ReleaseUSF(unsigned char usf)
+{
+ DBG_FUNC("USFTable::ReleaseUSF", RLC_MAC);
+ DBG_ENTER();
+ if (usf < MAX_USF_PER_TS)
+ {
+ pUSFEntry[usf] = 0;
+ }
+
+ DBG_LEAVE();
+}
+
+
+void USFTable::ShowUSFTable()
+{
+ for (int i=0; i < MAX_USF_PER_TS; i++)
+ {
+ printf("USF %2d : TBF - %x\n", i, pUSFEntry[i]);
+ }
+}
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/bitstream.cpp b/data/mnet/GP10/Host/Rlc_mac/src/bitstream.cpp
new file mode 100644
index 0000000..121fad9
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/bitstream.cpp
@@ -0,0 +1,278 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : bitstream.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#include "bitstream.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+// *******************************************************************
+// class BitStreamOut
+//
+// Description:
+//
+// *******************************************************************
+
+// Pack up to 8 bits of data.
+RlcMacResult BitStreamOut::InsertBits8(unsigned char bits, int numBits)
+{
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ if (numBits <= 8)
+ {
+ // Figure out how much shifting is needed to get the significant
+ // bits in the byte starting at the current bit pointer.
+ int bitShift = (8 - (bitPointer % 8)) - numBits;
+
+ // If bitShift is positive then there is all the bits are
+ // in the current byte.
+ if (bitShift >= 0)
+ {
+ dataStream[streamLen] |= (bits << bitShift);
+ }
+ // Some of the bits needed are in the next byte.
+ else
+ {
+ dataStream[streamLen] |= (bits >> (-bitShift));
+ dataStream[streamLen+1] |= (bits << (8 + bitShift));
+ }
+
+ bitPointer += numBits;
+ streamLen = bitPointer >> 3;
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_NUM_BITS;
+ }
+
+ return (result);
+}
+
+
+// Pack up to 16 bits of data.
+RlcMacResult BitStreamOut::InsertBits16(unsigned short bits, int numBits)
+{
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ if (numBits <= 16)
+ {
+ while (numBits)
+ {
+ int currNumBits = (numBits % 8) ? numBits % 8 : 8;
+ result = InsertBits8((unsigned char)(bits >> (numBits - currNumBits)),
+ currNumBits);
+ numBits -= currNumBits;
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_NUM_BITS;
+ }
+
+ return (result);
+}
+
+
+RlcMacResult BitStreamOut::InsertBits32(unsigned long bits, int numBits)
+{
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ if (numBits <= 32)
+ {
+ while (numBits)
+ {
+ int currNumBits = (numBits % 8) ? numBits % 8 : 8;
+ result = InsertBits8((unsigned char)(bits >> (numBits - currNumBits)),
+ currNumBits);
+ numBits -= currNumBits;
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_NUM_BITS;
+ }
+
+ return (result);
+}
+
+
+RlcMacResult BitStreamOut::InsertBytesN(unsigned char *bytes, int numBytes)
+{
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ for (int i = 0; i < numBytes; i++)
+ {
+ result = InsertBits8(bytes[i], 8);
+ }
+
+ return (result);
+}
+
+
+
+void BitStreamOut::PadToOctetBoundary()
+{
+ dataStream[streamLen] |= ((0xff >> (bitPointer % 8)) & 0x2b);
+ bitPointer += (bitPointer % 8) ? (8 - (bitPointer % 8)) : 0;
+ streamLen = bitPointer >> 3;
+}
+
+
+void BitStreamOut::PadWithSparePadding(int len)
+{
+ // Make sure the stream is on an octet boundary and then pad with 0x2b
+ PadToOctetBoundary();
+ while (streamLen < len)
+ {
+ dataStream[streamLen++] = 0x2b;
+ bitPointer += 8;
+ };
+}
+
+
+// *******************************************************************
+// class BitStreamIn
+//
+// Description:
+//
+// *******************************************************************
+
+
+
+// Extract up to 8 bits of data.
+RlcMacResult BitStreamIn::ExtractBits8(unsigned char &bits, int numBits)
+{
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ if ((bitPointer + numBits) >> 3 > streamLen)
+ {
+ return (RLC_MAC_ERROR);
+ }
+
+ if (numBits <= 8)
+ {
+ // First zero out the return value
+ bits = 0;
+
+ // Figure out how much shifting is needed to get the significant
+ // bits in the byte starting at the current bit pointer.
+ int bitShift = (8 - (bitPointer % 8)) - numBits;
+
+ // If bitShift is positive then all the bits are extracted from
+ // the current byte.
+ if (bitShift >= 0)
+ {
+ bits |= ((dataStream[currByte] >> bitShift) & (0xff >> (8 - numBits)));
+ }
+ // Some of the bits need to come from the next byte.
+ else
+ {
+ bits |= (dataStream[currByte] << (-bitShift));
+ bits |= (dataStream[currByte+1] >> (8 + bitShift));
+ bits &= (0xff >> (8 - numBits));
+ }
+
+ bitPointer += numBits;
+ currByte = bitPointer >> 3;
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_NUM_BITS;
+ }
+
+ return (result);
+}
+
+
+// Extract up to 16 bits of data.
+RlcMacResult BitStreamIn::ExtractBits16(unsigned short &bits, int numBits)
+{
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ if ((bitPointer + numBits) >> 3 > streamLen)
+ {
+ return (RLC_MAC_ERROR);
+ }
+
+ if (numBits <= 16)
+ {
+ bits = 0;
+ while (numBits)
+ {
+ int currNumBits = (numBits % 8) ? numBits % 8 : 8;
+ unsigned char aByte;
+ result = ExtractBits8(aByte, currNumBits);
+ bits |= ((unsigned short)aByte) << (8 * ((numBits-1) / 8));
+ numBits -= currNumBits;
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_NUM_BITS;
+ }
+
+ return (result);
+}
+
+
+// Extract up to 32 bits of data.
+RlcMacResult BitStreamIn::ExtractBits32(unsigned long &bits, int numBits)
+{
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ if ((bitPointer + numBits) >> 3 > streamLen)
+ {
+ return (RLC_MAC_ERROR);
+ }
+
+ if (numBits <= 32)
+ {
+ bits = 0;
+ while (numBits)
+ {
+ int currNumBits = (numBits % 8) ? numBits % 8 : 8;
+ unsigned char aByte;
+ result = ExtractBits8(aByte, currNumBits);
+ bits |= ((unsigned long)aByte) << (8 * ((numBits-1) / 8));
+ numBits -= currNumBits;
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_NUM_BITS;
+ }
+
+ return (result);
+}
+
+
+RlcMacResult BitStreamIn::ExtractBytesN(unsigned char *bytes, int numBytes)
+{
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ if ((bitPointer + numBytes*8) >> 3 > streamLen)
+ {
+ return (RLC_MAC_ERROR);
+ }
+
+ for (int i = 0; i < numBytes; i++)
+ {
+ result = ExtractBits8(bytes[i], 8);
+ }
+
+ return (result);
+}
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieARFCN.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieARFCN.cpp
new file mode 100644
index 0000000..d9e6422
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieARFCN.cpp
@@ -0,0 +1,80 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieARFCN.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieARFCN.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// class IeARFCN
+//
+// Description:
+// ARFCN IE -- GSM04.60 11.2.4
+// *******************************************************************
+RlcMacResult IeARFCN::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeARFCN::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack ARFCN bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits16(arfcn, 10);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeARFCN::EncodeIe ARFCN not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+RlcMacResult IeARFCN::DecodeIe(BitStreamIn &dataStream)
+{
+ DBG_FUNC("IeARFCN::DecodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Extract ARFCN bits from the input bit stream.
+ if ((result = dataStream.ExtractBits16(arfcn, 10)) == RLC_MAC_SUCCESS)
+ {
+ isValid = TRUE;
+ }
+ else
+ {
+ DBG_ERROR("IeARFCN::DecodeIe ARFCN extraction failed\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeARFCN::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tARFCN ---> %d\n", arfcn);
+ }
+}
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieARFCNIndexList.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieARFCNIndexList.cpp
new file mode 100644
index 0000000..7909c17
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieARFCNIndexList.cpp
@@ -0,0 +1,95 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieARFCNIndexList.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieARFCNIndexList.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+// *******************************************************************
+// class IeARFCNIndexList
+//
+// Description:
+// ARFCN Index List IE -- GSM04.60 12.10a
+//
+// < ARFCN index list struct > ::=
+// < ARFCN_INDEX : bit (6) >
+// { 0 | 1 < ARFCN index list struct > } ;
+//
+// *******************************************************************
+
+RlcMacResult IeARFCNIndexList::SetARFCNIndexList(unsigned char count, unsigned char *list)
+{
+ if (count <= RLC_MAC_MAX_RF_FREQS)
+ {
+ numIndex = count;
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+
+ for (int i = 0; i < numIndex; i++)
+ {
+ arfcnIndex[i] = list[i];
+ }
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+}
+
+
+
+
+RlcMacResult IeARFCNIndexList::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeARFCNIndexList::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack ARFCN Index List bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8(arfcnIndex[0], 6);
+ for (int i = 1; i < numIndex; i++)
+ {
+ dataStream.InsertBits8(1, 1);
+ dataStream.InsertBits8(arfcnIndex[i], 6);
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeARFCNIndexList::EncodeIe arfcnIndex not valid\n");
+ }
+ dataStream.InsertBits8(0, 1);
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeARFCNIndexList::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tARFCN Index List\n");
+ for (int i = 0; i < numIndex; i++)
+ {
+ outObj->Trace("\t\t%d\n", arfcnIndex[i]);
+ }
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieAccessType.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieAccessType.cpp
new file mode 100644
index 0000000..b24c4f0
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieAccessType.cpp
@@ -0,0 +1,61 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieAccessType.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieAccessType.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char accessTypeNames[][64] =
+{
+ "Two Phase Access Request",
+ "Page Response",
+ "Cell Update",
+ "Mobility Management procedure"
+};
+
+// *******************************************************************
+// class IeAccessType
+//
+// Description:
+// ACCESS_TYPE IE -- GSM04.60 11.2.16
+// *******************************************************************
+
+RlcMacResult IeAccessType::DecodeIe(BitStreamIn &dataStream)
+{
+ DBG_FUNC("IeAccessType::DecodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+ unsigned char val;
+
+ // Extract ACESS_TYPE bits from the input bit stream.
+ result = dataStream.ExtractBits8(val, 2);
+ RLC_MAC_RESULT_CHECK(result);
+ accessType = (ACCESS_TYPE)val;
+ isValid = TRUE;
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeAccessType::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tACCESS_TYPE ---> %s\n", accessTypeNames[accessType]);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieAckNackDescription.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieAckNackDescription.cpp
new file mode 100644
index 0000000..e0f82fb
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieAckNackDescription.cpp
@@ -0,0 +1,110 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieAckNackDescription.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieAckNackDescription.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+char finalAckNames[][64] =
+{
+ "retransmission are requested and TBF is incomplete",
+ "no retransmissions requested and all RLC blocks acknowledged"
+};
+
+// *******************************************************************
+// class IeAckNackDescription
+//
+// Description:
+// Ack Nack Dscription IE -- GSM04.60 12.3
+//
+// < Ack/Nack Description IE > ::=
+// < FINAL_ACK_INDICATION : bit (1) >
+// < STARTING_SEQUENCE_NUMBER : bit (7) >
+// < RECEIVED_BLOCK_BITMAP : bit (64) > ;
+// *******************************************************************
+
+RlcMacResult IeAckNackDescription::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeAckNackDescription::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack ACK/NACK Description bits into the output bit stream.
+ if (isValid)
+ {
+ // < FINAL_ACK_INDICATION : bit (1) >
+ dataStream.InsertBits8((unsigned char)finalAckIndication, 1);
+
+ // < STARTING_SEQUENCE_NUMBER : bit (7) >
+ dataStream.InsertBits8(startingSeqNum, 7);
+
+ // < RECEIVED_BLOCK_BITMAP : bit (64) > ;
+ dataStream.InsertBytesN(recBlockBitmap, RRB_SIZE);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeAckNackDescription::EncodeIe ACK/NACK Description not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+RlcMacResult IeAckNackDescription::DecodeIe(BitStreamIn &dataStream)
+{
+ DBG_FUNC("IeAckNackDescription::DecodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+ unsigned char val;
+
+ // Extract ACK/NACK Description bits from the input bit stream.
+ // < FINAL_ACK_INDICATION : bit (1) >
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ finalAckIndication = (FINAL_ACK_INDICATION)val;
+
+ // < STARTING_SEQUENCE_NUMBER : bit (7) >
+ result = dataStream.ExtractBits8(startingSeqNum, 7);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // < RECEIVED_BLOCK_BITMAP : bit (64) > ;
+ result = dataStream.ExtractBytesN(recBlockBitmap, RRB_SIZE);
+ RLC_MAC_RESULT_CHECK(result);
+
+ isValid = TRUE;
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeAckNackDescription::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tACK/NACK Description\n");
+ outObj->Trace("\t\tFinal ACK Indication ---> %s\n", finalAckNames[finalAckIndication]);
+ outObj->Trace("\t\tStarting Sequence Number ---> %d\n", startingSeqNum);
+ outObj->Trace("\t\tReceive Block BitMap\n");
+ outObj->Trace("\t\t%02x %02x %02x %02x %02x %02x %02x %02x\n",
+ recBlockBitmap[0], recBlockBitmap[1], recBlockBitmap[2], recBlockBitmap[3],
+ recBlockBitmap[4], recBlockBitmap[5], recBlockBitmap[6], recBlockBitmap[7]);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieAllocationBitMap.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieAllocationBitMap.cpp
new file mode 100644
index 0000000..b11d865
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieAllocationBitMap.cpp
@@ -0,0 +1,92 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieAllocationBitMap.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieAllocationBitMap.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+// *******************************************************************
+// class IeAllocationBitMap
+//
+// Description:
+// Allocation Bit Map IE -- GSM04.60 12.4
+//
+// *******************************************************************
+
+RlcMacResult IeAllocationBitMap::SetAllocationBitMap(unsigned char len, unsigned char *map)
+{
+ if (len <= (MAX_ALLOCATION_BITMAP_LEN >> 3))
+ {
+ allocLength = len;
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+
+ for (int i = 0; i < len++; i++)
+ {
+ allocBitMap[i] = map[i];
+ }
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+}
+
+
+
+
+RlcMacResult IeAllocationBitMap::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeAllocationBitMap::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack Allocation Bit Map bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8((allocLength<<3), 7);
+ for (int i = 0; i < allocLength; i++)
+ {
+ dataStream.InsertBits8(allocBitMap[i], 8);
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeAllocationBitMap::EncodeIe Allocation Bitmap not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeAllocationBitMap::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tAllocation Bit Map\n");
+ if (allocLength > 0)
+ {
+ for (int i = 0; i < allocLength; i++)
+ {
+ outObj->Trace("\t\t%x\n", allocBitMap[i]);
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieBSIC.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieBSIC.cpp
new file mode 100644
index 0000000..beb9529
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieBSIC.cpp
@@ -0,0 +1,82 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieBSIC.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieBSIC.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// class IeBSIC
+//
+// Description:
+// BSIC IE -- GSM04.60 11.2.4
+// *******************************************************************
+
+RlcMacResult IeBSIC::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeBSIC::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack BSIC bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8(bsic, 6);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeBSIC::EncodeIe BSIC not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+RlcMacResult IeBSIC::DecodeIe(BitStreamIn &dataStream)
+{
+ DBG_FUNC("IeBSIC::DecodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Extract BSIC bits from the input bit stream.
+ if ((result = dataStream.ExtractBits8(bsic, 6)) == RLC_MAC_SUCCESS)
+ {
+ isValid = TRUE;
+ }
+ else
+ {
+ DBG_ERROR("IeBSIC::DecodeIe BSIC extraction failed\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeBSIC::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tBSIC ---> %o %o\n", bsic>>3, bsic);
+ }
+}
+
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieBtsPowerCtlMode.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieBtsPowerCtlMode.cpp
new file mode 100644
index 0000000..5dd6892
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieBtsPowerCtlMode.cpp
@@ -0,0 +1,63 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieBtsPowerCtlMode.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieBtsPowerCtlMode.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char pCtlModeNames[][64] =
+{
+ "Mode A",
+ "Mode B"
+};
+
+// *******************************************************************
+// class IeBtsPowerCtlMode
+//
+// Description:
+// Bts Power Control Mode IE -- GSM04.60 11.2.29
+// *******************************************************************
+
+RlcMacResult IeBtsPowerCtlMode::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeBtsPowerCtlMode::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack Bts Power Control Mode bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8((unsigned char)pCtlMode, 1);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeBtsPowerCtlMode::EncodeIe power control mode invalid failure\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeBtsPowerCtlMode::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tBts Power Control Mode ---> %s\n", pCtlModeNames[pCtlMode]);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieChangeMark.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieChangeMark.cpp
new file mode 100644
index 0000000..3be52ba
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieChangeMark.cpp
@@ -0,0 +1,75 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieChangeMark.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieChangeMark.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// class IeChangeMark
+//
+// Description:
+// Change Mark IE -- GSM04.60 12.8
+// *******************************************************************
+RlcMacResult IeChangeMark::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeChangeMark::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack Change Mark bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8(changeMark, 2);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeChangeMark::EncodeIe ChangeMark failure %x\n", result);
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+RlcMacResult IeChangeMark::DecodeIe(BitStreamIn &dataStream)
+{
+ DBG_FUNC("IeChangeMark::DecodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Extract CHANGE_MARK bits from the input bit stream.
+ result = dataStream.ExtractBits8(changeMark, 2);
+ RLC_MAC_RESULT_CHECK(result);
+ isValid = TRUE;
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeChangeMark::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tChange Mark ---> %d\n", changeMark);
+ }
+}
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieChannelCodingCommand.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieChannelCodingCommand.cpp
new file mode 100644
index 0000000..8bbb53f
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieChannelCodingCommand.cpp
@@ -0,0 +1,65 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieChannelCodingCommand.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieChannelCodingCommand.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char codingNames[][64] =
+{
+ "CS-1",
+ "CS-2",
+ "CS-3",
+ "CS-4"
+};
+
+// *******************************************************************
+// class IeChannelCodingCommand
+//
+// Description:
+// PR Mode IE -- GSM04.60 11.2.29
+// *******************************************************************
+
+RlcMacResult IeChannelCodingCommand::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeChannelCodingCommand::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack Channel Coding Command bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8((unsigned char)coding, 2);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeChannelCodingCommand::EncodeIe Channel Coding Command not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeChannelCodingCommand::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tCHANNEL CODING COMMAND ---> %s\n", codingNames[coding]);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieChannelNeeded.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieChannelNeeded.cpp
new file mode 100644
index 0000000..38fb067
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieChannelNeeded.cpp
@@ -0,0 +1,65 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieChannelNeeded.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieChannelNeeded.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char chanNeededNames[][64] =
+{
+ "Any Channel",
+ "SDCCH",
+ "TCH/F (Full rate)",
+ "TCH/H or TCH/F (Dual rate)"
+};
+
+// *******************************************************************
+// class IeChannelNeeded
+//
+// Description:
+// Channel Needed IE -- GSM04.60 11.2.10
+// *******************************************************************
+
+RlcMacResult IeChannelNeeded::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeChannelNeeded::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack Channel Needed bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8((unsigned char)chanNeeded, 2);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeChannelNeeded::EncodeIe Channel Needed not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeChannelNeeded::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tChannelNeeded ---> %s\n", chanNeededNames[chanNeeded]);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieChannelRequestDescription.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieChannelRequestDescription.cpp
new file mode 100644
index 0000000..6fb1227
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieChannelRequestDescription.cpp
@@ -0,0 +1,85 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieChannelRequestDescription.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieChannelRequestDescription.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+char llcPduTypeNames[][64] =
+{
+ "LLC PDU is SACK or ACK",
+ "LLC PDU is not SACK or ACK"
+};
+
+// *******************************************************************
+// class IeChannelRequestDescription
+//
+// Description:
+// Channel Request Description IE -- GSM04.60 12.7
+//
+// < Channel Request Description IE > ::=
+// < PEAK_THROUGHPUT_CLASS : bit (4) >
+// < RADIO_PRIORITY : bit (2) >
+// < RLC_MODE : bit (1) >
+// < LLC_PDU_TYPE : bit (1) >
+// < RLC_OCTET_COUNT : bit (16) > ;
+// *******************************************************************
+
+
+RlcMacResult IeChannelRequestDescription::DecodeIe(BitStreamIn &dataStream)
+{
+ DBG_FUNC("IeChannelRequestDescription::DecodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+ unsigned char val;
+
+ // Extract the Channel Request Description from the input bit stream.
+ result = dataStream.ExtractBits8(peakThroughputClass, 4);
+ RLC_MAC_RESULT_CHECK(result);
+
+ result = dataStream.ExtractBits8(radioPriority, 2);
+ RLC_MAC_RESULT_CHECK(result);
+
+ result = rlcMode.DecodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ llcPduType = (LLC_PDU_TYPE)val;
+
+ result = dataStream.ExtractBits16(rlcOctetCount, 16);
+ RLC_MAC_RESULT_CHECK(result);
+
+ isValid = TRUE;
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeChannelRequestDescription::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tChannel Request Description\n");
+ outObj->Trace("\tPeak Thoughput Class ---> %d\n", peakThroughputClass);
+ outObj->Trace("\tRadio Priority ---> %d\n", radioPriority);
+ rlcMode.DisplayDetails(outObj);
+ outObj->Trace("\tLLC PDU Type ---> %s\n", llcPduTypeNames[llcPduType]);
+ outObj->Trace("\tRLC Octet Count ---> %d\n", rlcOctetCount);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieFrequencyParameters.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieFrequencyParameters.cpp
new file mode 100644
index 0000000..0a1fcf7
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieFrequencyParameters.cpp
@@ -0,0 +1,159 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieFrequencyParameters.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieFrequencyParameters.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+// *******************************************************************
+// class IeFrequencyParameters
+//
+// Description:
+// Frequency Parameters IE -- GSM04.60 12.8
+//
+// < Frequency Parameters IE > ::=
+// < TSC : bit (3) >
+// { 00 < ARFCN : bit (10) >
+// | 01 < Indirect encoding : < Indirect encoding struct > >
+// | 10 < Direct encoding 1 : < Direct encoding 1 struct > >
+// | 11 < Direct encoding 2 : < Direct encoding 2 struct > > } ;
+//
+// < Indirect encoding struct > ::=
+// < MAIO : bit (6) >
+// < MA_NUMBER : bit (4) >
+// { 0 | 1 < CHANGE_MARK_1 : bit (2) >
+// { 0 | 1 < CHANGE_MARK_2 : bit (2) > } } ;
+//
+// < Direct encoding 1 struct > ::=
+// < MAIO : bit (6) >
+// < GPRS Mobile Allocation : < GPRS Mobile Allocation IE > > ;
+//
+// < Direct encoding 2 struct > ::=
+// < MAIO : bit (6) >
+// < HSN : bit (6) >
+// < Length of MA Frequency List contents : bit (4) >
+// < MA Frequency List contents : octet (val(Length of MA Frequency List contents) + 3) > ;
+// *******************************************************************
+
+
+RlcMacResult IeFrequencyParameters::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeFrequencyParameters::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack Frequency List bits into the output bit stream.
+ result = tsc.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ if (arfcn.IsValid())
+ {
+ dataStream.InsertBits8(0, 2);
+ result = arfcn.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else if (IndirectEncoding.isValid)
+ {
+ dataStream.InsertBits8(1, 2);
+ result = IndirectEncoding.maio.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ result = IndirectEncoding.maNumber.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ if (IndirectEncoding.changeMark1.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = IndirectEncoding.changeMark1.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ if (IndirectEncoding.changeMark2.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = IndirectEncoding.changeMark2.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+ }
+ else if (DirectEncoding1.isValid)
+ {
+ result = DirectEncoding1.maio.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ result = DirectEncoding1.gprsMobileAllocation.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else if (DirectEncoding2.isValid)
+ {
+ result = DirectEncoding2.maio.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ result = DirectEncoding2.hsn.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ result = DirectEncoding2.maFreqList.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ DBG_ERROR("IeFrequencyParameters::EncodeIe failure no valid freq encoding\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeFrequencyParameters::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tFrequency Paramters\n");
+ tsc.DisplayDetails(outObj);
+ if (arfcn.IsValid())
+ {
+ arfcn.DisplayDetails(outObj);
+ }
+ else if (IndirectEncoding.isValid)
+ {
+ IndirectEncoding.maio.DisplayDetails(outObj);
+ IndirectEncoding.maNumber.DisplayDetails(outObj);
+ if (IndirectEncoding.changeMark1.IsValid())
+ {
+ IndirectEncoding.changeMark1.DisplayDetails(outObj);
+ if (IndirectEncoding.changeMark2.IsValid())
+ {
+ IndirectEncoding.changeMark2.DisplayDetails(outObj);
+ }
+ }
+ }
+ else if (DirectEncoding1.isValid)
+ {
+ DirectEncoding1.maio.DisplayDetails(outObj);
+ DirectEncoding1.gprsMobileAllocation.DisplayDetails(outObj);
+ }
+ else if (DirectEncoding2.isValid)
+ {
+ DirectEncoding2.maio.DisplayDetails(outObj);
+ DirectEncoding2.hsn.DisplayDetails(outObj);
+ DirectEncoding2.maFreqList.DisplayDetails(outObj);
+ }
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieGPRSMobileAllocation.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieGPRSMobileAllocation.cpp
new file mode 100644
index 0000000..197539f
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieGPRSMobileAllocation.cpp
@@ -0,0 +1,115 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieGPRSMobileAllocation.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieGPRSMobileAllocation.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+// *******************************************************************
+// class IeGPRSMobileAllocation
+//
+// Description:
+// GPRS Mobile Allocation IE -- GSM04.60 12.10a
+//
+// < GPRS Mobile Allocation IE > ::=
+// < HSN : bit (6) >
+// { 0 | 1 < RFL number list : < RFL number list struct > > }
+// { 0 < MA_LENGTH : bit (6) >
+// < MA_BITMAP : bit (val(MA_LENGTH) + 1) >
+// | 1 { 0 | 1 < ARFCN index list : < ARFCN index list struct > > } } ;
+//
+// < RFL number list struct > ::=
+// < RFL_NUMBER : bit (4) >
+// { 0 | 1 < RFL number list struct > } ;
+// < ARFCN index list struct > ::=
+// < ARFCN_INDEX : bit (6) >
+// { 0 | 1 < ARFCN index list struct > } ;
+// *******************************************************************
+
+
+RlcMacResult IeGPRSMobileAllocation::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeGPRSMobileAllocation::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack GPRS Mobile Allocation bits into the output bit stream.
+ if (isValid)
+ {
+ result = hsn.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+
+ if (rflNumberList.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = rflNumberList.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ if (maBitMap.IsValid())
+ {
+ dataStream.InsertBits8(0, 1);
+ result = maBitMap.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else if (arfcnIndexList.IsValid())
+ {
+ dataStream.InsertBits8(1, 1);
+ result = arfcnIndexList.EncodeIe(dataStream);
+ RLC_MAC_RESULT_CHECK(result);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeGPRSMobileAllocation::EncodeIe GPRS Mobile Allocation not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeGPRSMobileAllocation::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tGPRS Mobile Allocation\n");
+ if (rflNumberList.IsValid())
+ {
+ rflNumberList.DisplayDetails(outObj);
+ }
+
+ if (maBitMap.IsValid())
+ {
+ maBitMap.DisplayDetails(outObj);
+ }
+ else if (arfcnIndexList.IsValid())
+ {
+ arfcnIndexList.DisplayDetails(outObj);
+ }
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieGlobalPacketTimingAdvance.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieGlobalPacketTimingAdvance.cpp
new file mode 100644
index 0000000..a85e29a
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieGlobalPacketTimingAdvance.cpp
@@ -0,0 +1,113 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieGlobalPacketTimingAdvance.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieGlobalPacketTimingAdvance.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+// *******************************************************************
+// class IeGlobalPacketTimingAdvance
+//
+// Description:
+// Timing Advance IE -- GSM04.60 12.12a
+//
+// < Global Packet Timing Advance IE > ::=
+// { 0 | 1 < TIMING_ADVANCE_VALUE : bit (6) > }
+// { 0 | 1 < UPLINK_TIMING_ADVANCE_INDEX : bit (4) >
+// < UPLINK_TIMING_ADVANCE_TIMESLOT_NUMBER : bit (3) > }
+// { 0 | 1 < DOWNLINK_TIMING_ADVANCE_INDEX : bit (4) >
+// < DOWNLINK_TIMING_ADVANCE_TIMESLOT_NUMBER : bit (3) > }
+//
+// *******************************************************************
+
+RlcMacResult IeGlobalPacketTimingAdvance::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeGlobalPacketTimingAdvance::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack Timing Advance bits into the output bit stream.
+ if (isValid)
+ {
+ if (isTaValueValid)
+ {
+ dataStream.InsertBits8(1, 1);
+ dataStream.InsertBits8(taValue, 6);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ if (isUplinkTaIndexValid)
+ {
+ dataStream.InsertBits8(1, 1);
+ dataStream.InsertBits8(uplinkTaIndex, 4);
+ dataStream.InsertBits8(uplinkTsNumber, 3);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ if (isDownlinkTaIndexValid)
+ {
+ dataStream.InsertBits8(1, 1);
+ dataStream.InsertBits8(downlinkTaIndex, 4);
+ dataStream.InsertBits8(downlinkTsNumber, 3);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeGlobalPacketTimingAdvance::EncodeIe Global TA invalid failure\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeGlobalPacketTimingAdvance::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tGlobal Packet Timing Advance\n");
+
+ if (isTaValueValid)
+ {
+ outObj->Trace("\t\tTA Value ---> %d\n", taValue);
+ }
+
+ if (isUplinkTaIndexValid)
+ {
+ outObj->Trace("\t\tUplink TA Index ---> %d\n", uplinkTaIndex);
+ outObj->Trace("\t\tUplink Timeslot ---> %d\n", uplinkTsNumber);
+ }
+
+ if (isDownlinkTaIndexValid)
+ {
+ outObj->Trace("\t\tDownlink TA Index ---> %d\n", downlinkTaIndex);
+ outObj->Trace("\t\tDownlink Timeslot ---> %d\n", downlinkTsNumber);
+ }
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieGlobalPowerControlParms.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieGlobalPowerControlParms.cpp
new file mode 100644
index 0000000..573f727
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieGlobalPowerControlParms.cpp
@@ -0,0 +1,91 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieGlobalPowerControlParms.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieGlobalPowerControlParms.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char pcMeasChanNames[][64] =
+{
+ "downlink measurements for power control on BCCH",
+ "downlink measurements for power control on PDCH"
+};
+
+char intMeasChanAvailNames[][64] =
+{
+ "PSI4 message not broadcast",
+ "PSI4 message broadcast"
+};
+
+
+// *******************************************************************
+// class IeGlobalPowerControlParms
+//
+// Description:
+// Global Power Control Parameters IE -- GSM04.60 12.9
+//
+// < Global Power Control Parameters IE > ::=
+// < ALPHA : bit (4) >
+// < T_AVG_W : bit (5) >
+// < T_AVG_T : bit (5) >
+// < Pb : bit (4) >
+// < PC_MEAS_CHAN : bit (1) >
+// < INT_MEAS_CHANNEL_LIST_AVAIL : bit (1) >
+// < N_AVG_I : bit (4) > ;
+// *******************************************************************
+
+
+RlcMacResult IeGlobalPowerControlParms::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeGlobalPowerControlParms::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack Global Power Control Pararmeter bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8(alpha, 4);
+ dataStream.InsertBits8(tAvgW, 5);
+ dataStream.InsertBits8(tAvgT, 5);
+ dataStream.InsertBits8(pb, 4);
+ dataStream.InsertBits8((unsigned char)pcMeasChan, 1);
+ dataStream.InsertBits8((unsigned char)intMeasChanAvail, 1);
+ dataStream.InsertBits8(nAvgI, 4);
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeGlobalPowerControlParms::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tGlobal Power Control Parameters\n");
+ outObj->Trace("\t\tAlpha -----> %f\n",
+ (alpha > 10) ? 1.0 : (float) (alpha * 0.1));
+ outObj->Trace("\t\tT AVG W ---> %d\n", tAvgW);
+ outObj->Trace("\t\tT AVG T ---> %d\n", tAvgT);
+ outObj->Trace("\t\tPb --------> -%d dB\n", pb*2);
+ outObj->Trace("\t\tPC MEAS CHAN\n");
+ outObj->Trace("\t\t\t%s\n", pcMeasChanNames[pcMeasChan]);
+ outObj->Trace("\t\tINT_MEAS_CHAN LIST AVAIL\n");
+ outObj->Trace("\t\t\t%s\n", intMeasChanAvailNames[intMeasChanAvail]);
+ outObj->Trace("\t\tN AVG I ---> %d\n", nAvgI);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieGlobalTFI.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieGlobalTFI.cpp
new file mode 100644
index 0000000..307e2c9
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieGlobalTFI.cpp
@@ -0,0 +1,94 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieGlobalTFI.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieGlobalTFI.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char tfiTypeNames[][64] =
+{
+ "UPLINK",
+ "DOWNLINK"
+};
+
+
+// *******************************************************************
+// class IeGlobalTFI
+//
+// Description:
+// Global TFI IE -- GSM04.60 12.10
+//
+// < Global TFI IE > ::=
+// { 0 < UPLINK_TFI : bit (5) >
+// | 1 < DOWNLINK_TFI : bit (5) > } ;
+//
+// *******************************************************************
+
+RlcMacResult IeGlobalTFI::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeGlobalTFI::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack Global TFI bits into the output bit stream.
+ // < Global TFI IE > ::=
+ // { 0 < UPLINK_TFI : bit (5) >
+ // | 1 < DOWNLINK_TFI : bit (5) > } ;
+ if (isValid)
+ {
+ dataStream.InsertBits8((unsigned char)tfiType, 1);
+ dataStream.InsertBits8(globalTFI, 5);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeGlobalTFI::EncodeIe tfiType not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+RlcMacResult IeGlobalTFI::DecodeIe(BitStreamIn &dataStream)
+{
+ DBG_FUNC("IeGlobalTFI::DecodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+ unsigned char val;
+
+ // Extract Global TFI bits from the input bit stream.
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ tfiType = (RLC_MAC_TFI_TYPE)val;
+
+ result = dataStream.ExtractBits8(globalTFI, 5);
+ RLC_MAC_RESULT_CHECK(result);
+
+ isValid = TRUE;
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeGlobalTFI::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tGlobal TFI ---> %#x, %s\n", globalTFI, tfiTypeNames[tfiType]);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieHSN.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieHSN.cpp
new file mode 100644
index 0000000..1e13314
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieHSN.cpp
@@ -0,0 +1,58 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieHSN.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieHSN.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// class IeHSN
+//
+// Description:
+// HSN IE -- GSM04.60 12.8
+// *******************************************************************
+RlcMacResult IeHSN::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeHSN::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack HSN bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8(hsn, 7);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeHSN::EncodeIe HSN not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeHSN::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tHSN ---> %d\n", hsn);
+ }
+}
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieLSAParameters.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieLSAParameters.cpp
new file mode 100644
index 0000000..2ebd65a
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieLSAParameters.cpp
@@ -0,0 +1,141 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieLSAParameters.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieLSAParameters.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+// *******************************************************************
+// class IeLSAParameters
+//
+// Description:
+// LSA Parameters IE -- GSM04.60 12.28
+//
+// < LSA Parameters IE > ::=
+// < NR_OF_FREQ_OR_CELLS : bit (5) >:
+// < LSA ID information : < LSA ID information struct >> } *(val (NR_OF_FREQ_OR_CELLS)) };
+//
+// < LSA ID information struct > ::=
+// { 1 { 0 < LSA_ID : bit (24) >
+// |1 < ShortLSA_ID : bit (10) >} } ** 0 ;
+//
+// *******************************************************************
+
+RlcMacResult IeLSAParameters::SetLSAParameters(unsigned char numIds, unsigned int *ids)
+{
+ if (numIds <= MAX_FREQ_OR_CELLS)
+ {
+ numFreqOrCells = numIds;
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+
+ for (int i = 0; i < numIds; i++)
+ {
+ LSAIdInfo.lsaIds[i] = ids[i];
+ }
+ isValid = TRUE;
+ type = LONG;
+ return (RLC_MAC_SUCCESS);
+}
+
+
+RlcMacResult IeLSAParameters::SetLSAParameters(unsigned char numIds, unsigned short *shortIds)
+{
+ if (numIds <= MAX_FREQ_OR_CELLS)
+ {
+ numFreqOrCells = numIds;
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+
+ for (int i = 0; i < numIds; i++)
+ {
+ LSAIdInfo.shortLsaIds[i] = shortIds[i];
+ }
+ isValid = TRUE;
+ type = SHORT;
+ return (RLC_MAC_SUCCESS);
+}
+
+
+RlcMacResult IeLSAParameters::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeLSAParameters::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack LSA Parameters bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8(numFreqOrCells, 5);
+ if (numFreqOrCells > 0)
+ {
+ dataStream.InsertBits8(1, 1);
+ for (int i = 0; i < numFreqOrCells; i++)
+ {
+ if (type == LONG)
+ {
+ dataStream.InsertBits8(0, 1);
+ dataStream.InsertBits32(LSAIdInfo.lsaIds[i], 24);
+ }
+ else
+ {
+ dataStream.InsertBits8(1, 1);
+ dataStream.InsertBits16(LSAIdInfo.shortLsaIds[i], 10);
+ }
+ }
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeLSAParameters::EncodeIe numFreqOrCells not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeLSAParameters::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tLSA Parameters\n"
+ "\t\tNumber of frequencies or cells --> %#x\n", numFreqOrCells);
+ if (numFreqOrCells > 0)
+ {
+ for (int i = 0; i < numFreqOrCells; i++)
+ {
+ if (type == LONG)
+ {
+ outObj->Trace("\t\tLSA ID %d ---> %x\n", LSAIdInfo.lsaIds[i]);
+ }
+ else
+ {
+ outObj->Trace("\t\tShort LSA ID %d ---> %x\n", LSAIdInfo.shortLsaIds[i]);
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieMABitMap.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieMABitMap.cpp
new file mode 100644
index 0000000..31e9f00
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieMABitMap.cpp
@@ -0,0 +1,98 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieMABitMap.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieMABitMap.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+// *******************************************************************
+// class IeMABitMap
+//
+// Description:
+// MA Bit Map IE -- GSM04.60 12.10a
+//
+// *******************************************************************
+
+RlcMacResult IeMABitMap::SetMABitMap(unsigned char len, unsigned char *map)
+{
+ if (len <= (maLength >> 3))
+ {
+ maLength = len;
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+
+ for (int i = 0; i < ((len+1+8) >> 3); i++)
+ {
+ maBitMap[i] = map[i];
+ }
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+}
+
+
+
+
+RlcMacResult IeMABitMap::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeMABitMap::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack MA Bit Map bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8(maLength, 6);
+ for (int i = 0; i < ((maLength + 1) >> 3); i++)
+ {
+ dataStream.InsertBits8(maBitMap[i], 8);
+ }
+
+ if ((maLength+1) % 8)
+ {
+ dataStream.InsertBits8(maBitMap[(maLength+1)/8] >>(8-(maLength+1)%8),
+ (maLength+1)%8);
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeMABitMap::EncodeIe MA Bitmap not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeMABitMap::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tMA Bit Map\n");
+ if (maLength > 0)
+ {
+ for (int i = 0; i < ((maLength + 1) >> 3); i++)
+ {
+ outObj->Trace("\t\t%x\n", maBitMap[i]);
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieMACMode.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieMACMode.cpp
new file mode 100644
index 0000000..85ad65d
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieMACMode.cpp
@@ -0,0 +1,65 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieMACMode.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieMACMode.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char macModeNames[][64] =
+{
+ "Dynamic Allocation",
+ "Extended Dynamic Allocation",
+ "Fixed Allocation, not half duplex mode",
+ "Fixed Allocation, half duplex mode"
+};
+
+// *******************************************************************
+// class IeMacMode
+//
+// Description:
+// Mac Mode IE -- GSM04.60 11.2.7
+// *******************************************************************
+
+RlcMacResult IeMacMode::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeMacMode::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack MAC mode bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8((unsigned char)macMode, 2);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeMacMode::EncodeIe failure %x\n", result);
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeMacMode::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tMAC Mode ---> %s\n", macModeNames[macMode]);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieMAFreqList.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieMAFreqList.cpp
new file mode 100644
index 0000000..802ad77
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieMAFreqList.cpp
@@ -0,0 +1,750 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieMAFreqList.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieMAFreqList.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// class IeMAFreqList
+//
+// Description:
+// MA Frequency List IE -- GSM04.60 12.8
+// *******************************************************************
+
+
+RlcMacResult IeMAFreqList::SetMAFreqList(unsigned char numEntries, unsigned short *arfcns)
+{
+ if ((numEntries <= MA_LIST_MAX_RF_FREQS) && (numEntries > 0))
+ {
+ numArfcns = numEntries;
+
+ // Sort and store list
+ int duplicates = 0;
+ for (int i = 0; i < numArfcns; i++)
+ {
+ int index = 0;
+ for (int j = 0; j < numArfcns; j++)
+ {
+ if ((arfcns[i] <= arfcns[j]) && (i != j))
+ {
+ index++;
+ }
+ // Count how many duplicates (x2) in the list.
+ if (arfcns[i] == arfcns[j])
+ {
+ duplicates++;
+ }
+ }
+ arfcnList[index] = arfcns[i];
+ };
+
+ // Reduce the total count by the number of duplicates. Note that
+ // duplicates were double counted above.
+ numArfcns -= (duplicates >> 1);
+
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+}
+
+
+
+RlcMacResult IeMAFreqList::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeMAFreqList::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result;
+ unsigned char MAListLen;
+ unsigned char MAList[MAX_MA_FREQ_LIST_LEN];
+
+ // Select the appropriate format.
+ switch(SelectFrequencyListFormat())
+ {
+ case FREQ_LIST_FORMAT_BIT_MAP_0:
+ result = EncodeFreqListBitMap0(MAListLen, MAList);
+ break;
+ case FREQ_LIST_FORMAT_VARIABLE_BIT_MAP:
+ result = EncodeFreqListVariableBitMap(MAListLen, MAList);
+ break;
+ case FREQ_LIST_FORMAT_1024_RANGE:
+ result = EncodeFreqList1024Range(MAListLen, MAList);
+ break;
+ case FREQ_LIST_FORMAT_512_RANGE:
+ result = EncodeFreqList512Range(MAListLen, MAList);
+ break;
+ case FREQ_LIST_FORMAT_256_RANGE:
+ result = EncodeFreqList256Range(MAListLen, MAList);
+ break;
+ case FREQ_LIST_FORMAT_128_RANGE:
+ result = EncodeFreqList128Range(MAListLen, MAList);
+ break;
+ default:
+ return RLC_MAC_ERROR;
+ }
+
+
+ // Pack Change Mark bits into the output bit stream.
+/* if ((result = dataStream.InsertBits8(changeMark, 2)) != RLC_MAC_SUCCESS)
+ {
+ DBG_ERROR("MAFreqList::EncodeIe ChangeMark failure %x\n", result);
+ } */
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+RlcMacResult IeMAFreqList::EncodeFreqList1024Range(unsigned char &MAListLen, unsigned char *MAList)
+{
+ DBG_FUNC("IeMAFreqList::EncodeFreqList1024Range", RLC_MAC);
+ DBG_ENTER();
+
+ if (numArfcns > 17)
+ {
+ DBG_ERROR("EncodeFreqList1024Range: too many freqs %d\n, max=17", numArfcns);
+ return RLC_MAC_PARAMETER_RANGE_ERROR;
+ }
+
+ int i;
+ unsigned short W[64]; for(i=0; i < 64; W[i++]=0);
+ unsigned short freqSet[64]; for(i=0; i < 64; freqSet[i++]=0);
+ for(i=0; i < MAX_MA_FREQ_LIST_LEN; MAList[i++]=0);
+
+ int numInSet= 0;
+ // check if freq 0 is in the set, remove from the set if it is
+ unsigned char f0 = 0;
+ for (i=0; i < numArfcns; i++)
+ {
+ if (arfcnList[i]== 0)
+ {
+ f0 = 1;
+ } else
+ {
+ freqSet[numInSet++] = arfcnList[i] - 1;
+ }
+ }
+
+ // find the orig arfcn,
+ unsigned short origArfcn = ReduceMinArfcn(numInSet, freqSet);
+
+ // encode W[]
+ EncodeFreqsSubTree(1, 1023, freqSet, numInSet, W);
+
+ // generate the Wbits[]
+ unsigned short Wbits[64];
+ SetWbits(10, 16, Wbits);
+
+ // now encode IE
+ MAList[0] = 0x80 | (f0 << 2);
+ int buffLen;
+ StuffArray(numInSet, &W[1], &Wbits[1], buffLen, 2, MAList);
+
+ MAListLen = (unsigned char) buffLen;
+ // populate back to ARFCN array the modified frequency list
+ // depending whether 0 is in or not, the rest is in W[] array starting from 1.
+ if(f0)
+ {
+ // ARFCN 0 is in the list
+ arfcnList[0]=0;
+ GetFreqSetFromW(0,1023,W,numArfcns-1,arfcnList);
+ } else {
+ // ARFCN 0 is in NOT the list
+ GetFreqSetFromW(0,1023,W,numArfcns,arfcnList);
+ for(i=1;i<=numArfcns;i++) arfcnList[i-1]=arfcnList[i];
+ }
+
+ DBG_LEAVE();
+ return RLC_MAC_SUCCESS;
+}
+
+
+
+RlcMacResult IeMAFreqList::EncodeFreqList512Range(unsigned char &MAListLen, unsigned char *MAList)
+{
+ DBG_FUNC("IeMAFreqList::EncodeFreqList512Range", RLC_MAC);
+ DBG_ENTER();
+
+ if (numArfcns > 18)
+ {
+ DBG_ERROR("EncodeFreqList512Range: too many freqs %d\n, max=18", numArfcns);
+ return RLC_MAC_PARAMETER_RANGE_ERROR;
+ }
+
+ int i;
+ unsigned short W[64]; for(i=0; i < 64; W[i++]=0);
+ unsigned short freqSet[64]; for(i=0; i < 64; freqSet[i++]=0);
+ for(i=0; i < MAX_MA_FREQ_LIST_LEN; MAList[i++]=0);
+
+ // find the orig arfcn,
+ unsigned short origArfcn = ReduceMinArfcn(numArfcns, freqSet);
+
+
+ // encode W[]
+ EncodeFreqsSubTree(1, 511, freqSet, numArfcns - 1, W);
+
+ // generate the Wbits[]
+ unsigned short Wbits[64];
+ SetWbits(9, 17, Wbits);
+
+ // Encode IE
+ // IEI is encoded in msg encode function
+
+ MAList[0] = 0x88 | ((unsigned char )(origArfcn >> 9));
+ MAList[1] = ((unsigned char)(origArfcn >> 1));
+ MAList[2] = ((unsigned char)(origArfcn << 7));
+
+ int bufferLengthForW = MAX_MA_FREQ_LIST_LEN - 2;
+ StuffArray(numArfcns - 1, &W[1], &Wbits[1], bufferLengthForW, 7, &MAList[2]);
+
+ MAListLen = (unsigned char)(bufferLengthForW + 2);
+
+
+ // populate back to ARFCN array the modified frequency list
+ // origArfcn is the 1st one, the rest is in W[] array starting 1.
+ arfcnList[0]=origArfcn;
+ GetFreqSetFromW(origArfcn,511,W,numArfcns-1,arfcnList);
+
+ DBG_LEAVE();
+ return RLC_MAC_SUCCESS;
+
+}
+
+
+RlcMacResult IeMAFreqList::EncodeFreqList256Range(unsigned char &MAListLen, unsigned char *MAList)
+{
+ DBG_FUNC("IeMAFreqList::EncodeFreqList512Range", RLC_MAC);
+ DBG_ENTER();
+
+ if (numArfcns > 22)
+ {
+ DBG_ERROR("EncodeFreqList256Range: too many freqs %d\n, max=22", numArfcns);
+ return RLC_MAC_PARAMETER_RANGE_ERROR;
+ }
+
+ int i;
+ unsigned short W[64]; for(i=0; i < 64; W[i++]=0);
+ unsigned short freqSet[64]; for(i=0; i < 64; freqSet[i++]=0);
+ for(i=0; i < MAX_MA_FREQ_LIST_LEN; MAList[i++]=0);
+
+ // find the orig arfcn,
+ unsigned short origArfcn = ReduceMinArfcn(numArfcns, freqSet);
+
+ // encode W[]
+ EncodeFreqsSubTree(1, 255, freqSet, numArfcns - 1, W);
+
+ // generate the Wbits[]
+ unsigned short Wbits[64];
+ SetWbits(8, 21, Wbits);
+
+ // Encode IE
+ MAList[0] = 0x8a | ((unsigned char )(origArfcn >> 9));
+ MAList[1] = ((unsigned char)(origArfcn >> 1));
+ MAList[2] = ((unsigned char)(origArfcn << 7));
+
+ int bufferLengthForW = MAX_MA_FREQ_LIST_LEN - 2;
+ StuffArray(numArfcns - 1, &W[1], &Wbits[1], bufferLengthForW, 7, &MAList[2]);
+
+ MAListLen = (unsigned char)(bufferLengthForW + 2);
+
+ // populate back to ARFCN array the modified frequency list
+ // origArfcn is the 1st one, the rest is in W[] array starting 1.
+ arfcnList[0]=origArfcn;
+ GetFreqSetFromW(origArfcn,255,W,numArfcns-1,arfcnList);
+
+ DBG_LEAVE();
+ return RLC_MAC_SUCCESS;
+}
+
+
+
+RlcMacResult IeMAFreqList::EncodeFreqList128Range(unsigned char &MAListLen, unsigned char *MAList)
+{
+ DBG_FUNC("IeMAFreqList::EncodeFreqList128Range", RLC_MAC);
+ DBG_ENTER();
+
+ if (numArfcns > 29)
+ {
+ DBG_ERROR("EncodeFreqList128Range: too many freqs %d, max=29\n", numArfcns);
+ return RLC_MAC_PARAMETER_RANGE_ERROR;
+ }
+
+ int i;
+ unsigned short W[64]; for(i=0; i < 64; W[i++]=0);
+ unsigned short freqSet[64]; for(i=0; i < 64; freqSet[i++]=0);
+ for(i=0; i < MAX_MA_FREQ_LIST_LEN; MAList[i++]=0);
+
+ // find the orig arfcn,
+ unsigned short origArfcn = ReduceMinArfcn(numArfcns, freqSet);
+
+ // encode W[]
+ EncodeFreqsSubTree(1, 127, freqSet, numArfcns - 1, W);
+
+ // generate the Wbits[]
+ unsigned short Wbits[64];
+ SetWbits(7, 28, Wbits);
+
+ // Encode IE
+ MAList[0] = 0x8c | ((unsigned char )(origArfcn >> 9));
+ MAList[1] = ((unsigned char)(origArfcn >> 1));
+ MAList[2] = ((unsigned char)(origArfcn << 7));
+
+ int bufferLengthForW = MAX_MA_FREQ_LIST_LEN - 2;
+ StuffArray(numArfcns - 1, &W[1], &Wbits[1], bufferLengthForW, 7, &MAList[2]);
+
+ MAListLen = (unsigned char)(bufferLengthForW + 2);
+
+ // populate back to ARFCN array the modified frequency list
+ // origArfcn is the 1st one, the rest is in W[] array starting 1.
+ arfcnList[0]=origArfcn;
+ GetFreqSetFromW(origArfcn,127,W,numArfcns-1,arfcnList);
+
+ DBG_LEAVE();
+ return RLC_MAC_SUCCESS;
+}
+
+
+
+
+RlcMacResult IeMAFreqList::EncodeFreqListVariableBitMap(unsigned char &MAListLen, unsigned char *MAList)
+{
+ DBG_FUNC("IeMAFreqList::EncodeFreqListVariableBitMap", RLC_MAC);
+ DBG_ENTER();
+
+ if (numArfcns > 64)
+ {
+ DBG_ERROR("EncodeFreqListVariableBitMap: too many freqs %d\n",
+ numArfcns);
+ return RLC_MAC_PARAMETER_RANGE_ERROR;
+ }
+
+ // find the orig arfcn
+ unsigned short origArfcn = arfcnList[0];
+
+ int i;
+ for (i=1; i < numArfcns; i++)
+ {
+ if (arfcnList[i] < origArfcn)
+ {
+ origArfcn = arfcnList[i];
+ }
+ }
+
+ for (i=0; i < MAX_MA_FREQ_LIST_LEN; i++)
+ {
+ MAList[i] = 0;
+ }
+
+ // Encode IE
+ MAList[0] = 0x8e | ((unsigned char )(origArfcn >> 9));
+ MAList[1] = ((unsigned char)(origArfcn >> 1));
+ MAList[2] = ((unsigned char)(origArfcn << 7));
+
+ int octet, lshift, diffmod, maxOctet = 3;
+ for (i=0; i < numArfcns; i++)
+ {
+ if (arfcnList[i] == origArfcn) continue;
+ short diff = arfcnList[i] - origArfcn;
+
+ octet = 2 + (diff / 8);
+ if (octet >= MAX_MA_FREQ_LIST_LEN)
+ {
+ DBG_ERROR("EncodeFreqListVariableBitMap: arfcn out of range %d, origArfcn %d\n",
+ arfcnList[i], origArfcn);
+ return RLC_MAC_PARAMETER_RANGE_ERROR;
+ }
+ if (octet > maxOctet)
+ {
+ maxOctet = octet;
+ }
+
+ diffmod = diff % 8;
+ lshift = 7 - diffmod;
+ MAList[octet] |= 1 << lshift;
+ }
+
+ MAListLen = (unsigned char)(maxOctet + 1);
+
+ // populate back to ARFCN array the modified frequency list
+ // origArfcn is the 1st one
+
+ int j,idx=0;
+ arfcnList[idx++]=origArfcn;
+ for(i=2;i<=maxOctet;i++)
+ {
+ for(j=7;j>=0;j--)
+ {
+ if(i==2 && j==7) continue; // skip the ORIG-ARFCN bit
+ if( (MAList[i] & (0x01<<j)) != 0)
+ {
+ arfcnList[idx++]=origArfcn+((i-2)*8+(8-j)-1) ;
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return RLC_MAC_SUCCESS;
+}
+
+
+
+RlcMacResult IeMAFreqList::EncodeFreqListBitMap0(unsigned char &MAListLen, unsigned char *MAList)
+{
+ DBG_FUNC("IeMAFreqList::EncodeFreqListBitMap0", RLC_MAC);
+ DBG_ENTER();
+ // this format is used for arfcn range is 1 to 124
+
+ int i;
+ for (i=0; i < 16; i++)
+ {
+ MAList[i] = 0;
+ }
+ for (i=0; i < numArfcns; i++)
+ {
+ if (arfcnList[i] == 0 || arfcnList[i] > 124)
+ {
+ DBG_ERROR("EncodeFreqListBitMap0: arfcn out of range %d\n", arfcnList[i]);
+ return RLC_MAC_PARAMETER_RANGE_ERROR;
+ }
+ int octet, bit;
+ octet = 15 - ((arfcnList[i]-1) / 8);
+ bit = (arfcnList[i]-1) % 8;
+
+ if (bit > 0)
+ {
+ MAList[octet] |= 1 << bit;
+ } else
+ {
+ MAList[octet] |= 0x01;
+ }
+ }
+ // format ID and spare bits are 0s, no need to encode
+ DBG_LEAVE();
+ return RLC_MAC_SUCCESS;
+}
+
+
+FREQ_LIST_FORMAT_ID IeMAFreqList::SelectFrequencyListFormat()
+{
+ DBG_FUNC("IeMAFreqList::SelectFrequencyListFormat", RLC_MAC);
+ DBG_ENTER();
+
+ // find the min and max freq,
+ unsigned short minArfcn = arfcnList[0];
+ unsigned short maxArfcn = arfcnList[0];
+
+ // find the min and max frequencies
+ for (int i=1; i < numArfcns; i++)
+ {
+ if (arfcnList[i] < minArfcn) minArfcn = arfcnList[i];
+ if (arfcnList[i] > maxArfcn) maxArfcn = arfcnList[i];
+ }
+
+ if( (maxArfcn - minArfcn) > 512) return FREQ_LIST_FORMAT_1024_RANGE;
+ if( (maxArfcn - minArfcn) > 256) return FREQ_LIST_FORMAT_512_RANGE;
+ if( (maxArfcn - minArfcn) > 128) return FREQ_LIST_FORMAT_256_RANGE;
+ if( (maxArfcn - minArfcn) > 111) return FREQ_LIST_FORMAT_128_RANGE;
+ DBG_LEAVE();
+ return FREQ_LIST_FORMAT_VARIABLE_BIT_MAP;
+}
+
+
+// helper function to get the GREATEST_POWER_OF_2_LESSER_OR_EQUAL_TO(index)
+int IeMAFreqList::GetGreatestPowerOf2LessorOrEqualTo(int index)
+{
+ DBG_FUNC("IeMAFreqList::GetGreatestPowerOf2LessorOrEqualTo", RLC_MAC);
+ DBG_ENTER();
+
+ int answer;
+ for(answer=1;answer<=index;answer*=2);
+ DBG_LEAVE();
+ return answer/2;
+}
+
+
+// NOTE, freq-list encoding is an expensive operation,
+// application user should preformat it once, and
+// store, and use the preformat msg to send
+//
+//
+// IMPORTANT!!! The index must start from 1 instead of 0. Effectively,
+// W[0] is NOT used. The result starts from W[1], W[2], ...
+// and so on.
+
+void IeMAFreqList::EncodeFreqsSubTree(int index, int range,unsigned short *set,
+ short numberInSet, unsigned short *W)
+{
+ DBG_FUNC("IeMAFreqList::EncodeFreqsSubTree", RLC_MAC);
+ DBG_ENTER();
+
+ if(numberInSet == 0)
+ {
+ W[index] = 0;
+ DBG_LEAVE();
+ return;
+ }
+ if(numberInSet == 1)
+ {
+ W[index] = 1 + set[0];
+ DBG_LEAVE();
+ return;
+ }
+
+ int half = range/2;
+ int halfminus = ((range-1)/2);
+ int halfSet = (numberInSet -1)/2;
+ int n, j, i ;
+ int pivotIndex=(-1);
+ for(i=0; i < numberInSet; i++)
+ {
+ n = 0;
+ for(j=0; j < numberInSet; j++)
+ {
+ if (((range + set[j] - set[i]) % range) <= halfminus)
+ n++;
+ }
+ if ((n-1) == halfSet)
+ {
+ // found the pivot point
+ pivotIndex = i;
+ break;
+ }
+ }
+ if(pivotIndex<0)
+ {
+ // impossible. error in algorithm
+ DBG_ERROR("IeMAFreqList: CNI_RIL3_EncodeFreqsSubTree() algorithm detect data set error. ARFCN list potential duplication\n");
+ }
+ W[index] = set[pivotIndex] + 1;
+
+
+ // get the GREATEST_POWER_OF_2_LESSER_OR_EQUAL_TO(index)
+ int power2s = GetGreatestPowerOf2LessorOrEqualTo(index);
+
+ // encode the left side
+ unsigned short subSet[18];
+ unsigned short origValue = (set[pivotIndex] + halfminus + 1) % range;
+ short subSetIndex = 0;
+ for(i=0; i < numberInSet; i++)
+ {
+ if(((range + set[i] - origValue) % range) < half)
+ {
+ subSet[subSetIndex++] = (range + set[i]- origValue) % range;
+ }
+ }
+
+ EncodeFreqsSubTree(index + power2s, range/2, subSet, subSetIndex, W);
+
+ // encode the right side
+ origValue = (set[pivotIndex] + 1) % range;
+ subSetIndex = 0;
+ for(i=0; i < numberInSet; i++)
+ {
+ if(((range + set[i] - origValue) % range) < half)
+ {
+ subSet[subSetIndex++] = (range + set[i]- origValue) % range;
+ }
+ }
+
+ EncodeFreqsSubTree((index + 2 * power2s), (range -1)/2, subSet, subSetIndex, W);
+ DBG_LEAVE();
+}
+
+void IeMAFreqList::GetFreqSetFromW(unsigned short origArfcn, int original_range,
+ unsigned short *W, short numberInW, unsigned short *set)
+{
+ DBG_FUNC("IeMAFreqList::GetFreqSetFromW", RLC_MAC);
+ DBG_ENTER();
+
+ int index, K;
+ int range;
+ unsigned short N;
+
+ for(K=1;K<=numberInW; K++)
+ {
+ index = K;
+ range = original_range / GetGreatestPowerOf2LessorOrEqualTo(index);
+ N = W[index] - 1;
+ while(index>1)
+ {
+ range = 2*range+1;
+ if(2*index<3*GetGreatestPowerOf2LessorOrEqualTo(index))
+ {
+ // left child
+ index = index - GetGreatestPowerOf2LessorOrEqualTo(index)/2;
+ N = (N+W[index]-1+(range-1)/2+1) % range;
+ } else {
+ // right child
+ index = index - GetGreatestPowerOf2LessorOrEqualTo(index);
+ N = (N+W[index]-1+1) % range;
+ }
+ }
+ set[K]=origArfcn+N+1;
+ }
+ DBG_LEAVE();
+}
+
+void IeMAFreqList::SetWbits(int firstNumBits, int arrayLength, unsigned short *Wbits)
+{
+ DBG_FUNC("IeMAFreqList::SetWbits", RLC_MAC);
+ DBG_ENTER();
+
+ // generate the Wbits[]
+ memset(&Wbits[1], 0, (sizeof(short)*arrayLength));
+ Wbits[1] = firstNumBits;
+ int i, k;
+ int powerk = 1;
+ for (k = 1, i=2; (i<=arrayLength) && (k < firstNumBits); k++)
+ {
+ powerk *=2;
+ for(i= powerk;
+ (i <= arrayLength) && (i <= (powerk*2)-1);
+ i++
+ )
+ {
+ Wbits[i] = firstNumBits-k;
+ }
+ }
+ DBG_LEAVE();
+}
+
+
+// Set the reducedArfcn array equal to arfcn array of all freq except the
+// F0, minus F0 + 1
+// return F0
+unsigned short IeMAFreqList::ReduceMinArfcn(int numFreq, unsigned short *reducedArfcn)
+{
+ DBG_FUNC("IeMAFreqList::ReduceMinArfcn", RLC_MAC);
+ DBG_ENTER();
+
+ // find the min freq,
+ unsigned short minArfcn = arfcnList[0];
+ int i;
+ for (i=1; i < numFreq; i++)
+ {
+ if (arfcnList[i] < minArfcn)
+ {
+ minArfcn = arfcnList[i];
+ }
+ }
+
+ int numInSet = 0;
+ for (i=0; i < numFreq; i++)
+ {
+ if (arfcnList[i] > minArfcn)
+ {
+ reducedArfcn[numInSet++] = arfcnList[i] - minArfcn - 1;
+ }
+ }
+ DBG_LEAVE();
+ return minArfcn;
+}
+
+void IeMAFreqList::StuffArray(
+ int arrayLength,
+ unsigned short *W,
+ unsigned short *Wbits,
+ int &bufferLength,
+ int startBit, // 1-8; 1:lsb, 8:msb, msbs before startBit have to be preserved
+ // startBit is advanced to the next available bit before return
+ unsigned char *buffer)
+{
+ DBG_FUNC("IeMAFreqList::StuffArray", RLC_MAC);
+ DBG_ENTER();
+
+ unsigned long pipe;
+ int pipebits;
+ pipebits = 8 - startBit;
+
+ if(pipebits > 0)
+ {
+ // set up the initial value in the pipe which is stored in buffer[0] msbs
+ pipe = buffer[0] >> startBit;
+ }
+
+ int maxBufferLength = bufferLength;
+ int bufferIndex = 0;
+ unsigned char value;
+ int i = 0;
+ while ((i < arrayLength) && (bufferIndex < maxBufferLength))
+ {
+
+ // Wbits[] can NOT be greater than 24. If this is not hold true
+ // the algorithm will not pipe.
+
+ if((pipebits + Wbits[i])<=32)
+ {
+ pipe = (pipe << Wbits[i]) + W[i];
+ pipebits +=Wbits[i];
+ i++;
+ continue; // while loop
+ }
+
+ // need to output byte because not enough to hold the next entry
+ if(pipebits < 8)
+ {
+ DBG_ERROR("IeMAFreqList::StuffArray error, pipebits < 8\n");
+ return;
+ }
+
+ value = (unsigned char )(pipe >> (pipebits-8));
+ buffer[bufferIndex++] = value;
+ pipe = pipe - (value << (pipebits-8));
+ pipebits = pipebits - 8;
+ }
+
+ // at this point, we shall have no more W[] to encode. We shall start to empty
+ // the data in the pipe
+
+ while(pipebits>=8) // empty the remaining whole bytes in the pipe
+ {
+ value = (unsigned char)(pipe >> (pipebits-8));
+ buffer[bufferIndex++] = value;
+ pipe = pipe - (value << (pipebits-8));
+ pipebits = pipebits -8;
+ }
+
+ if(pipebits>0) // clean up the last fractional byte
+ {
+ buffer[bufferIndex++] = (unsigned char)(pipe << (8-pipebits));
+ }
+
+ bufferLength = bufferIndex;
+ DBG_LEAVE();
+ return;
+}
+
+
+void IeMAFreqList::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tMA Freq List");
+ for (int i = 0; i < numArfcns; i++)
+ {
+ if ((i % 5) == 0) outObj->Trace("\n\t\t");
+ outObj->Trace("%4d", arfcnList[i]);
+ }
+ outObj->Trace("\n");
+ }
+}
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieMAIO.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieMAIO.cpp
new file mode 100644
index 0000000..03e2a7c
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieMAIO.cpp
@@ -0,0 +1,58 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieMAIO.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieMAIO.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// class IeMAIO
+//
+// Description:
+// MAIO IE -- GSM04.60 12.8
+// *******************************************************************
+RlcMacResult IeMAIO::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeMAIO::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack MAIO bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8(maio, 7);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeMAIO::EncodeIe MAIO not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeMAIO::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tMAIO ---> %d\n", maio);
+ }
+}
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieMANumber.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieMANumber.cpp
new file mode 100644
index 0000000..1f9a6ac
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieMANumber.cpp
@@ -0,0 +1,58 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieMANumber.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieMANumber.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// class IeMANumber
+//
+// Description:
+// MA Number IE -- GSM04.60 12.8
+// *******************************************************************
+RlcMacResult IeMANumber::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeMANumber::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack MA Number bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8(maNum, 4);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeMANumber::EncodeIe MANumber not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeMANumber::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tMA Number ---> %d\n", maNum);
+ }
+}
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieMSRadioAccessCapability.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieMSRadioAccessCapability.cpp
new file mode 100644
index 0000000..e594425
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieMSRadioAccessCapability.cpp
@@ -0,0 +1,448 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieMSRadioAccessCapability.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieMSRadioAccessCapability.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+char raTypeNames[][64] =
+{
+ "GSM P",
+ "GSM E",
+ "GSM R",
+ "GSM 1800",
+ "GSM 1900"
+};
+
+char a5BitsNames[][64] =
+{
+ "encryption algorithm NOT available",
+ "encryption algorithm available"
+};
+
+char esIndNames[][64] =
+{
+ "controlled early Classmark Sending - option is not implemented",
+ "controlled early Classmark Sending - option isimplemented"
+};
+
+char vgcsNames[][64] =
+{
+ "no VGCS capability or no notifications wanted",
+ "VGCS capability and notifications wanted"
+};
+
+char vbsNames[][64] =
+{
+ "no VBS capability or no notifications wanted",
+ "VBS capability and notifications wanted"
+};
+
+char psNames[][64] =
+{
+ "PS capability not present",
+ "PS capability present"
+};
+
+char gprsExtendedDynamicAllocNames[][80] =
+{
+ "Extended Dynamic Allocation Capability for GPRS is not implemented",
+ "Extended Dynamic Allocation Capability for GPRS is implemented"
+};
+
+// *******************************************************************
+// class IeMSRadioAccessCapability
+//
+// Description:
+// Power Control Parameters IE -- GSM04.60 11.2.16, GSM04.08 10.5.5.12a
+//
+// < MS Radio Access Capability IE > ::=
+//
+// <MS RA capability value part struct >::= --recursive structure allows any number of Access technologies
+// < Access Technology Type: bit (4) >
+// < Access capabilities : <Access capabilities struct> >
+// { 0 | 1 <MS RA capability value part struct> } ;
+//
+// < Access capabilities struct > ::=
+// < Length : bit (7) > -- length in bits of Content and spare bits
+// <Access capabilities : <Content>>
+// <spare bits>** ; -- expands to the indicated length
+// -- may be used for future enhancements
+//
+// < Content > ::=
+// < RF Power Capability : bit (3) >
+// { 0 | 1 <A5 bits : <A5 bits> > } -- zero means that the same values apply for parameters as in the immediately preceeding Access capabilities field within this IE
+// -- The presence of the A5 bits is mandatory in the 1st Access capabilities struct within this IE.
+// < ES IND : bit >
+// < PS : bit >
+// < VGCS : bit >
+// < VBS : bit >
+// { 0 | 1 < Multislot capability : Multislot capability struct > } ; -- zero means that the same values apply for multislot parameters as in the immediately preceeding Access capabilities field within this IE.
+// -- The presence of the Multislot capability struct is mandatory in the 1st Access capabilities struct within this IE.
+//
+// < Multislot capability struct > ::=
+// { 0 | 1 < HSCSD multislot class : bit (5) > }
+// { 0 | 1 < GPRS multislot class : bit (5) > < GPRS Extended Dynamic Allocation Capability : bit > }
+// { 0 | 1 < SMS_VALUE : bit (4) > < SM_VALUE : bit (4) > } ;
+//
+// <A5 bits> ::= < A5/1 : bit> <A5/2 : bit> <A5/3 : bit> <A5/4 : bit> <A5/5 : bit> <A5/6 : bit> <A5/7 : bit>; -- bits for circuit mode ciphering algorithms
+//
+// *******************************************************************
+
+
+RlcMacResult IeMSRadioAccessCapability::DecodeIe(BitStreamIn &dataStream)
+{
+ DBG_FUNC("IeMSRadioAccessCapability::DecodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+ unsigned char val;
+
+ // Extract the MS Radio Access Capablility from the input bit stream.
+ for (int i = 0; i < MAX_ACCESS_TECHNOLOGIES; i++)
+ {
+ // First instance of the MS RA capability value part struct is mandatory.
+ // Subsequent instances are optional.
+ if (i != 0)
+ {
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ if (val == 0)
+ {
+ isValid = TRUE;
+ return (result);
+ }
+ }
+
+ // < Access Technology Type: bit (4) >
+ result = dataStream.ExtractBits8(val, 4);
+ RLC_MAC_RESULT_CHECK(result);
+ MSRACapabilityValuePart[i].accessTechnologyType = (ACCESS_TECHNOLOGY_TYPE)val;
+
+ // < Length : bit (7) > -- length in bits of Content and spare bits
+ result = dataStream.ExtractBits8(MSRACapabilityValuePart[i].length, 7);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // < RF Power Capability : bit (3) >
+ result = dataStream.ExtractBits8(MSRACapabilityValuePart[i].rfPowerCapability, 3);
+ RLC_MAC_RESULT_CHECK(result);
+
+ // { 0 | 1 <A5 bits : <A5 bits> > } -- zero means that the same values apply for parameters as in the immediately preceeding Access capabilities field within this IE
+ // -- The presence of the A5 bits is mandatory in the 1st Access capabilities struct within this IE.
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ if (val == 1)
+ {
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ MSRACapabilityValuePart[i].a51Bit = (A5_BITS)val;
+
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ MSRACapabilityValuePart[i].a52Bit = (A5_BITS)val;
+
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ MSRACapabilityValuePart[i].a53Bit = (A5_BITS)val;
+
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ MSRACapabilityValuePart[i].a54Bit = (A5_BITS)val;
+
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ MSRACapabilityValuePart[i].a55Bit = (A5_BITS)val;
+
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ MSRACapabilityValuePart[i].a56Bit = (A5_BITS)val;
+
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ MSRACapabilityValuePart[i].a57Bit = (A5_BITS)val;
+ }
+ else
+ {
+ if (i != 0)
+ {
+ MSRACapabilityValuePart[i].a51Bit = MSRACapabilityValuePart[i-1].a51Bit;
+ MSRACapabilityValuePart[i].a52Bit = MSRACapabilityValuePart[i-1].a52Bit;
+ MSRACapabilityValuePart[i].a53Bit = MSRACapabilityValuePart[i-1].a53Bit;
+ MSRACapabilityValuePart[i].a54Bit = MSRACapabilityValuePart[i-1].a54Bit;
+ MSRACapabilityValuePart[i].a55Bit = MSRACapabilityValuePart[i-1].a55Bit;
+ MSRACapabilityValuePart[i].a56Bit = MSRACapabilityValuePart[i-1].a56Bit;
+ MSRACapabilityValuePart[i].a57Bit = MSRACapabilityValuePart[i-1].a57Bit;
+ }
+ else
+ {
+ DBG_ERROR("IeMSRadioAccessCapability::DecodeIe A5 bits not valid\n");
+ }
+ }
+
+ // < ES IND : bit >
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ MSRACapabilityValuePart[i].esInd = (ES_IND)val;
+
+ // < PS : bit >
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ MSRACapabilityValuePart[i].ps = (PS)val;
+
+ // < VGCS : bit >
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ MSRACapabilityValuePart[i].vgcs = (VGCS)val;
+
+ // < VBS : bit >
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ MSRACapabilityValuePart[i].vbs = (VBS)val;
+
+ // { 0 | 1 < Multislot capability : Multislot capability struct > } ; -- zero means that the same values apply for multislot parameters as in the immediately preceeding Access capabilities field within this IE.
+ // -- The presence of the Multislot capability struct is mandatory in the 1st Access capabilities struct within this IE.
+ result = dataStream.ExtractBits8(val, 1);
+ if (val == 1)
+ {
+ // { 0 | 1 < HSCSD multislot class : bit (5) > }
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ if (val == 1)
+ {
+ result = dataStream.ExtractBits8(
+ MSRACapabilityValuePart[i].HSCSDMultislotClass.hscsdMultislotClass, 5);
+ RLC_MAC_RESULT_CHECK(result);
+ MSRACapabilityValuePart[i].HSCSDMultislotClass.isValid = TRUE;
+ }
+ else
+ {
+ MSRACapabilityValuePart[i].HSCSDMultislotClass.isValid = FALSE;
+ }
+
+ // { 0 | 1 < GPRS multislot class : bit (5) > < GPRS Extended Dynamic Allocation Capability : bit > }
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ if (val == 1)
+ {
+ result = dataStream.ExtractBits8(
+ MSRACapabilityValuePart[i].GPRSCapability.gprsMultislotClass, 5);
+ RLC_MAC_RESULT_CHECK(result);
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ MSRACapabilityValuePart[i].GPRSCapability.gprsExtendedDynamicAllocationCapability =
+ (GPRS_EXTENDED_DYNAMIC_ALLOC_CAPABILITY)val;
+ MSRACapabilityValuePart[i].GPRSCapability.isValid = TRUE;
+ }
+ else
+ {
+ MSRACapabilityValuePart[i].GPRSCapability.isValid = FALSE;
+ }
+
+ // { 0 | 1 < SMS_VALUE : bit (4) > < SM_VALUE : bit (4) > } ;
+ result = dataStream.ExtractBits8(val, 1);
+ RLC_MAC_RESULT_CHECK(result);
+ if (val == 1)
+ {
+ result = dataStream.ExtractBits8(
+ MSRACapabilityValuePart[i].SwitchMeasure.smsValue, 4);
+ RLC_MAC_RESULT_CHECK(result);
+ result = dataStream.ExtractBits8(
+ MSRACapabilityValuePart[i].SwitchMeasure.smValue, 4);
+ RLC_MAC_RESULT_CHECK(result);
+ MSRACapabilityValuePart[i].SwitchMeasure.isValid = TRUE;
+ }
+ else
+ {
+ MSRACapabilityValuePart[i].SwitchMeasure.isValid = FALSE;
+ }
+ }
+ else
+ {
+ if (i != 0)
+ {
+ MSRACapabilityValuePart[i].HSCSDMultislotClass.hscsdMultislotClass =
+ MSRACapabilityValuePart[i-1].HSCSDMultislotClass.hscsdMultislotClass;
+ MSRACapabilityValuePart[i].HSCSDMultislotClass.isValid =
+ MSRACapabilityValuePart[i-1].HSCSDMultislotClass.isValid;
+
+ MSRACapabilityValuePart[i].GPRSCapability.gprsMultislotClass =
+ MSRACapabilityValuePart[i-1].GPRSCapability.gprsMultislotClass;
+ MSRACapabilityValuePart[i].GPRSCapability.gprsExtendedDynamicAllocationCapability =
+ MSRACapabilityValuePart[i-1].GPRSCapability.gprsExtendedDynamicAllocationCapability;
+ MSRACapabilityValuePart[i].GPRSCapability.isValid =
+ MSRACapabilityValuePart[i-1].GPRSCapability.isValid;
+
+ MSRACapabilityValuePart[i].SwitchMeasure.smsValue =
+ MSRACapabilityValuePart[i-1].SwitchMeasure.smsValue;
+ MSRACapabilityValuePart[i].SwitchMeasure.smValue =
+ MSRACapabilityValuePart[i-1].SwitchMeasure.smValue;
+ MSRACapabilityValuePart[i].SwitchMeasure.isValid =
+ MSRACapabilityValuePart[i-1].SwitchMeasure.isValid;
+ }
+ else
+ {
+ DBG_ERROR("IeMSRadioAccessCapability::DecodeIe Multislot capability not valid\n");
+ }
+ }
+
+ MSRACapabilityValuePart[i].isValid = TRUE;
+ }
+
+ isValid = TRUE;
+ DBG_LEAVE();
+ return (result);
+}
+
+
+IeMSRadioAccessCapability &IeMSRadioAccessCapability::operator=(
+ const T_CNI_RIL3_IE_MS_RADIO_ACCESS_CAPABILITY &raCap)
+{
+ if (raCap.ie_present == TRUE)
+ {
+ SetMSRadioAccessCapabilityValid();
+ for (int i = 0; i < raCap.number_of_ra_capabilities; i++)
+ {
+ MSRACapabilityValuePart[i].isValid = TRUE;
+ MSRACapabilityValuePart[i].accessTechnologyType =
+ (ACCESS_TECHNOLOGY_TYPE)raCap.ms_ra_capability[i].access_technology_type;
+ MSRACapabilityValuePart[i].rfPowerCapability =
+ raCap.ms_ra_capability[i].rf_power_capability;
+ MSRACapabilityValuePart[i].a51Bit =
+ (raCap.ms_ra_capability[i].a5_1_algorithm) ? A5_X_AVAILABLE : A5_X_NOT_AVAILABLE;
+ MSRACapabilityValuePart[i].a52Bit =
+ (raCap.ms_ra_capability[i].a5_2_algorithm) ? A5_X_AVAILABLE : A5_X_NOT_AVAILABLE;
+ MSRACapabilityValuePart[i].a53Bit =
+ (raCap.ms_ra_capability[i].a5_3_algorithm) ? A5_X_AVAILABLE : A5_X_NOT_AVAILABLE;
+ MSRACapabilityValuePart[i].a54Bit =
+ (raCap.ms_ra_capability[i].a5_4_algorithm) ? A5_X_AVAILABLE : A5_X_NOT_AVAILABLE;
+ MSRACapabilityValuePart[i].a55Bit =
+ (raCap.ms_ra_capability[i].a5_5_algorithm) ? A5_X_AVAILABLE : A5_X_NOT_AVAILABLE;
+ MSRACapabilityValuePart[i].a56Bit =
+ (raCap.ms_ra_capability[i].a5_6_algorithm) ? A5_X_AVAILABLE : A5_X_NOT_AVAILABLE;
+ MSRACapabilityValuePart[i].a57Bit =
+ (raCap.ms_ra_capability[i].a5_7_algorithm) ? A5_X_AVAILABLE : A5_X_NOT_AVAILABLE;
+ MSRACapabilityValuePart[i].esInd =
+ (raCap.ms_ra_capability[i].es_ind) ? EARLY_CLASSMARK_SENDING_IMPLEMENTED :
+ EARLY_CLASSMARK_SENDING_NOT_IMPLEMENTED;
+ MSRACapabilityValuePart[i].ps =
+ (raCap.ms_ra_capability[i].ps) ? PS_PRESENT : PS_NOT_PRESENT;
+ MSRACapabilityValuePart[i].vgcs =
+ (raCap.ms_ra_capability[i].vgcs) ? VGCS_CAPABILITY : NO_VGCS_CAPABILITY;
+ MSRACapabilityValuePart[i].vbs =
+ (raCap.ms_ra_capability[i].vbs) ? VBS_CAPABILITY : NO_VBS_CAPABILITY;
+ if (raCap.ms_ra_capability[i].multislot_capability.present)
+ {
+ if (raCap.ms_ra_capability[i].multislot_capability.hscsd_param_present)
+ {
+ MSRACapabilityValuePart[i].HSCSDMultislotClass.isValid = TRUE;
+ MSRACapabilityValuePart[i].HSCSDMultislotClass.hscsdMultislotClass =
+ raCap.ms_ra_capability[i].multislot_capability.hscsd_multi_slot_class;
+ }
+ if (raCap.ms_ra_capability[i].multislot_capability.gprs_params_present)
+ {
+ MSRACapabilityValuePart[i].GPRSCapability.isValid = TRUE;
+ MSRACapabilityValuePart[i].GPRSCapability.gprsMultislotClass =
+ raCap.ms_ra_capability[i].multislot_capability.gprs_multi_slot_class;
+ MSRACapabilityValuePart[i].GPRSCapability.gprsExtendedDynamicAllocationCapability =
+ (raCap.ms_ra_capability[i].multislot_capability.gprs_dynamic_allocation_capability) ?
+ EXTENDED_DYNAMIC_ALLOC_IMPLEMENTED : EXTENDED_DYNAMIC_ALLOC_NOT_IMPLEMENTED;
+ }
+ if (raCap.ms_ra_capability[i].multislot_capability.sms_params_present)
+ {
+ MSRACapabilityValuePart[i].SwitchMeasure.isValid = TRUE;
+ MSRACapabilityValuePart[i].SwitchMeasure.smsValue =
+ raCap.ms_ra_capability[i].multislot_capability.switch_measure_switch_value;
+ MSRACapabilityValuePart[i].SwitchMeasure.smValue =
+ raCap.ms_ra_capability[i].multislot_capability.switch_measure_value;
+ }
+ }
+ }
+ }
+ return (*this);
+}
+
+
+void IeMSRadioAccessCapability::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tMS Radio Access Capability\n");
+ for (int i = 0; i < MAX_ACCESS_TECHNOLOGIES; i++)
+ {
+ if (MSRACapabilityValuePart[i].isValid)
+ {
+ outObj->Trace("\tAccess Technology #%d\n", i);
+ outObj->Trace("\t\tAccess Technology Type ---> %s\n",
+ raTypeNames[MSRACapabilityValuePart[i].accessTechnologyType]);
+
+ outObj->Trace("\t\tLength ---> %d\n", MSRACapabilityValuePart[i].length);
+
+ outObj->Trace("\t\tRF Power Capability ---> %d\n",
+ MSRACapabilityValuePart[i].rfPowerCapability);
+
+ outObj->Trace("\t\tA5/1 ---> %s\n",
+ a5BitsNames[MSRACapabilityValuePart[i].a51Bit]);
+ outObj->Trace("\t\tA5/2 ---> %s\n",
+ a5BitsNames[MSRACapabilityValuePart[i].a52Bit]);
+ outObj->Trace("\t\tA5/3 ---> %s\n",
+ a5BitsNames[MSRACapabilityValuePart[i].a53Bit]);
+ outObj->Trace("\t\tA5/4 ---> %s\n",
+ a5BitsNames[MSRACapabilityValuePart[i].a54Bit]);
+ outObj->Trace("\t\tA5/5 ---> %s\n",
+ a5BitsNames[MSRACapabilityValuePart[i].a55Bit]);
+ outObj->Trace("\t\tA5/6 ---> %s\n",
+ a5BitsNames[MSRACapabilityValuePart[i].a56Bit]);
+ outObj->Trace("\t\tA5/7 ---> %s\n",
+ a5BitsNames[MSRACapabilityValuePart[i].a57Bit]);
+
+ outObj->Trace("\t\tES IND ---> %s\n",
+ esIndNames[MSRACapabilityValuePart[i].esInd]);
+
+ outObj->Trace("\t\tPS ---> %s\n",
+ psNames[MSRACapabilityValuePart[i].ps]);
+
+ outObj->Trace("\t\tVGCS ---> %s\n",
+ vgcsNames[MSRACapabilityValuePart[i].vgcs]);
+
+ outObj->Trace("\t\tVBS ---> %s\n",
+ vbsNames[MSRACapabilityValuePart[i].vbs]);
+
+ if (MSRACapabilityValuePart[i].HSCSDMultislotClass.isValid)
+ {
+ outObj->Trace("\t\tHSCSD multislot class ---> %d\n",
+ MSRACapabilityValuePart[i].HSCSDMultislotClass.hscsdMultislotClass);
+ }
+
+ if (MSRACapabilityValuePart[i].GPRSCapability.isValid)
+ {
+ outObj->Trace("\t\tGPRS Multislot class ---> %d\n",
+ MSRACapabilityValuePart[i].GPRSCapability.gprsMultislotClass);
+ outObj->Trace("\t\tGPRS Extended Dynamic Allocation Capability ---> \n\t\t\t%s\n",
+ gprsExtendedDynamicAllocNames[MSRACapabilityValuePart[i].GPRSCapability.gprsExtendedDynamicAllocationCapability]);
+ }
+
+ if (MSRACapabilityValuePart[i].SwitchMeasure.isValid)
+ {
+ outObj->Trace("\t\tSMS_VALUE ---> %d/4 timeslot\n",
+ MSRACapabilityValuePart[i].SwitchMeasure.smsValue+1);
+ outObj->Trace("\t\tSM_VALUE ---> %d/4 timeslot\n",
+ MSRACapabilityValuePart[i].SwitchMeasure.smValue+1);
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieMobileIdentity.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieMobileIdentity.cpp
new file mode 100644
index 0000000..8a87d58
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieMobileIdentity.cpp
@@ -0,0 +1,177 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieMobileIdentity.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieMobileIdentity.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char miNames[][64] =
+{
+ "No Identity",
+ "IMSI",
+ "IMEI",
+ "IMEISV",
+ "TMSI/P-TMSI"
+};
+
+
+// *******************************************************************
+// class IeMobileIdentity
+//
+// Description:
+// Mobile Identity IE -- GSM04.60 11.2.10
+// GSM04.08 10.1.5.4
+// *******************************************************************
+
+RlcMacResult IeMobileIdentity::SetMobileIdentity(MOBILE_IDENTITY_TYPE type,
+ int numDigits, unsigned char *digits)
+{
+ if (numDigits <= MAX_MOBILE_ID_LEN)
+ {
+ numMiDigits = numDigits;
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+
+ miType = type;
+
+ for (int i = 0; i < numDigits; i++)
+ {
+ miDigits[i] = digits[i];
+ }
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+}
+
+
+RlcMacResult IeMobileIdentity::SetMobileIdentity(MOBILE_IDENTITY_TYPE type,
+ unsigned long tmsi)
+{
+ miType = type;
+ p_tmsi = tmsi;
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+}
+
+
+
+
+RlcMacResult IeMobileIdentity::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeMobileIdentity::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack Mobile Identity bits into the output bit stream.
+ if (isValid)
+ {
+ if (miType == TMSI_PTMSI)
+ {
+ // For TMSI or PTMSI the length of Mobile Identity octet will be 5.
+ dataStream.InsertBits8(5, 4);
+ // Bits 5-8 are "1111"
+ dataStream.InsertBits8(0xf, 4);
+ // Odd/even indicator set to 0 for (p)tmsi
+ dataStream.InsertBits8(0, 1);
+
+ dataStream.InsertBits8(miType, 3);
+
+ dataStream.InsertBits32(p_tmsi, 32);
+ }
+ else if (miType == NO_IDENTITY)
+ {
+ // For no identity the length of Mobile Identity octet will be 1.
+ dataStream.InsertBits8(1, 4);
+ // Bits 5-8 are "1111"
+ dataStream.InsertBits8(0xf, 4);
+ // Odd/even indicator set to 0 for (p)tmsi
+ dataStream.InsertBits8(0, 1);
+
+ dataStream.InsertBits8(miType, 3);
+ }
+ else if (miType == IMEISV)
+ {
+ // For IMEISV the length of Mobile Identity octet will be 9.
+ dataStream.InsertBits8(8, 4);
+ // Bits 5-8 are are "1111".
+ dataStream.InsertBits8(0xf, 4);
+ // Odd/even indicator set to 0 to indicate even number of digits
+ dataStream.InsertBits8(0, 1);
+
+ dataStream.InsertBits8(miType, 3);
+
+ for (int i = 0; i < numMiDigits; i++)
+ {
+ dataStream.InsertBits8(miDigits[i], 4);
+ }
+ }
+ else
+ {
+ // For MSI or IMEI the length of Mobile Identity octet will be 8.
+ dataStream.InsertBits8(8, 4);
+ // Bits 5-8 are the first identity digit.
+ dataStream.InsertBits8(miDigits[0], 4);
+ // Odd/even indicator set to 1 to indicate odd number of digits
+ dataStream.InsertBits8(1, 1);
+
+ dataStream.InsertBits8(miType, 3);
+
+ for (int i = 1; i < numMiDigits; i++)
+ {
+ dataStream.InsertBits8(miDigits[i], 4);
+ }
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeMobileIdentity::EncodeIe arfcnIndex not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeMobileIdentity::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tMobile Identity\n");
+ if (miType == TMSI_PTMSI)
+ {
+ outObj->Trace("\t\t%s ---> %#x\n", miNames[miType], p_tmsi);
+ }
+ else if (miType == NO_IDENTITY)
+ {
+ outObj->Trace("\t\t%s ---> none\n", miNames[miType]);
+ }
+ else
+ {
+ char id[MAX_MOBILE_ID_LEN+1];
+ int i;
+ for (i = 0; i < numMiDigits; i++)
+ {
+ sprintf(id+i, "%01d", miDigits[i]);
+ }
+ id[i] = 0;
+ outObj->Trace("\t\t%s ---> %s\n", miNames[miType], id);
+ }
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieNLN.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieNLN.cpp
new file mode 100644
index 0000000..591674f
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieNLN.cpp
@@ -0,0 +1,58 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieNLN.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieNLN.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// class IeNLN
+//
+// Description:
+// NLN IE -- GSM04.60 11.2.10
+// GSM04.08 10.5.2.23
+// *******************************************************************
+
+RlcMacResult IeNLN::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeNLN::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack NLN bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8(nln, 2);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeNLN::EncodeIe NLN not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeNLN::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tNLN ---> %d\n", nln);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/iePO.cpp b/data/mnet/GP10/Host/Rlc_mac/src/iePO.cpp
new file mode 100644
index 0000000..a44e920
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/iePO.cpp
@@ -0,0 +1,57 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : iePO.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "iePO.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// class IePO
+//
+// Description:
+// PO IE -- GSM04.60 11.2.29
+// *******************************************************************
+
+RlcMacResult IePO::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IePO::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack PO bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8(po, 4);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IePO::EncodeIe PO not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IePO::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tPO ---> %d dB\n", po*2);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/iePRMode.cpp b/data/mnet/GP10/Host/Rlc_mac/src/iePRMode.cpp
new file mode 100644
index 0000000..40878ff
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/iePRMode.cpp
@@ -0,0 +1,63 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : iePRMode.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "iePRMode.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char prModeNames[][64] =
+{
+ "PR Mode A : for one addressed MS",
+ "PR Mode B : for all MS"
+};
+
+// *******************************************************************
+// class IePRMode
+//
+// Description:
+// PR Mode IE -- GSM04.60 11.2.29
+// *******************************************************************
+
+RlcMacResult IePRMode::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IePRMode::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack PR Mode bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8((unsigned char)prMode, 1);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IePRMode::EncodeIe PR Mode not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IePRMode::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tPR Mode ---> %s\n", prModeNames[prMode]);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/iePTMSI.cpp b/data/mnet/GP10/Host/Rlc_mac/src/iePTMSI.cpp
new file mode 100644
index 0000000..68be64f
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/iePTMSI.cpp
@@ -0,0 +1,57 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : iePTMSI.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "iePTMSI.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// class IePTMSI
+//
+// Description:
+// PTMSI IE -- GSM03.03
+// *******************************************************************
+
+RlcMacResult IePTMSI::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IePTMSI::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack PTMSI bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits32(ptmsi, 32);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IePTMSI::EncodeIe ptmsi not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IePTMSI::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tPTMSI ---> %#x\n", ptmsi);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/iePacketReqRef.cpp b/data/mnet/GP10/Host/Rlc_mac/src/iePacketReqRef.cpp
new file mode 100644
index 0000000..5cf1118
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/iePacketReqRef.cpp
@@ -0,0 +1,72 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : iePacketReqRef.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "iePacketReqRef.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+// *******************************************************************
+// class IePacketReqRef
+//
+// Description:
+// Packet Request Ref IE -- GSM04.60 12.11
+// GSM04.08 10.5.2.38
+//
+// < Packet Request Reference IE > ::=
+// < RANDOM_ACCESS_INFORMATION value : bit (11) >
+// < FRAME_NUMBER : bit (16) > ;
+//
+// *******************************************************************
+
+RlcMacResult IePacketReqRef::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IePacketReqRef::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack Packet Request Reference bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits16(randAccInfo, 11);
+ dataStream.InsertBits8(T1, 5);
+ dataStream.InsertBits8(T3, 6);
+ dataStream.InsertBits8(T2, 5);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IePacketReqRef::EncodeIe Packet Req Ref failure\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IePacketReqRef::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tPacket Request Ref\n"
+ "\t\tRandom Access Info --> %#x\n"
+ "\t\tFrame Number T1 -----> %#x\n"
+ "\t\tFrame Number T2 -----> %#x\n"
+ "\t\tFrame Number T3 -----> %#x\n",
+ randAccInfo, T1, T2, T3);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/iePacketTimingAdvance.cpp b/data/mnet/GP10/Host/Rlc_mac/src/iePacketTimingAdvance.cpp
new file mode 100644
index 0000000..58a0169
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/iePacketTimingAdvance.cpp
@@ -0,0 +1,95 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : iePacketTimingAdvance.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "iePacketTimingAdvance.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+// *******************************************************************
+// class IePacketTimingAdvance
+//
+// Description:
+// Packet Timing Advance IE -- GSM04.60 12.12
+//
+// < Packet Timing Advance IE > ::=
+// { 0 | 1 < TIMING_ADVANCE_VALUE : bit (6) > }
+// { 0 | 1 < TIMING_ADVANCE_INDEX : bit (4) >
+// < TIMING_ADVANCE_TIMESLOT_NUMBER : bit (3) > } ;
+//
+// *******************************************************************
+
+RlcMacResult IePacketTimingAdvance::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IePacketTimingAdvance::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack Timing Advance bits into the output bit stream.
+ if (isValid)
+ {
+ if (isTaValueValid)
+ {
+ dataStream.InsertBits8(1, 1);
+ dataStream.InsertBits8(taValue, 6);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+
+ if (isTaIndexValid)
+ {
+ dataStream.InsertBits8(1, 1);
+ dataStream.InsertBits8(taIndex, 4);
+ dataStream.InsertBits8(tsNumber, 3);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IePacketTimingAdvance::EncodeIe TA not valid %x\n", result);
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IePacketTimingAdvance::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tPacket Timing Advance\n");
+
+ if (isTaValueValid)
+ {
+ outObj->Trace("\t\tTA Value ---> %d\n", taValue);
+ }
+
+ if (isTaIndexValid)
+ {
+ outObj->Trace("\t\tTA Index ---> %d\n", taIndex);
+ outObj->Trace("\t\tTimeslot ---> %d\n", tsNumber);
+ }
+
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/iePageMode.cpp b/data/mnet/GP10/Host/Rlc_mac/src/iePageMode.cpp
new file mode 100644
index 0000000..9a2fc71
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/iePageMode.cpp
@@ -0,0 +1,65 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : iePageMode.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "iePageMode.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char pageModeNames[][64] =
+{
+ "Normal Paging",
+ "Extended Paging",
+ "Paging Reorganization",
+ "Same as before"
+};
+
+// *******************************************************************
+// class IePageMode
+//
+// Description:
+// Page Mode IE -- GSM04.60 12.20
+// *******************************************************************
+
+RlcMacResult IePageMode::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IePageMode::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack Page Mode bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8((unsigned char)pageMode, 2);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IePageMode::EncodeIe Page Mode not valid %x\n", result);
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IePageMode::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tPage Mode ---> %s\n", pageModeNames[pageMode]);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/iePersistenceLevel.cpp b/data/mnet/GP10/Host/Rlc_mac/src/iePersistenceLevel.cpp
new file mode 100644
index 0000000..17b7ce5
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/iePersistenceLevel.cpp
@@ -0,0 +1,64 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : iePersistenceLevel.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "iePersistenceLevel.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+// *******************************************************************
+// class IePersistenceLevel
+//
+// Description:
+// Page Mode IE -- GSM04.60 12.14
+// *******************************************************************
+
+RlcMacResult IePersistenceLevel::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IePersistenceLevel::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack persistence level bits into the output bit stream.
+ if (isValid)
+ {
+ for (int i = 0; i < MAX_NUM_RADIO_PRIORITY; i++)
+ {
+ dataStream.InsertBits8((unsigned char)persistenceLevel[i], 4);
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IePersistenceLevel::EncodeIe Persistence level not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IePersistenceLevel::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ for (int i = 0; i < MAX_NUM_RADIO_PRIORITY; i++)
+ {
+ outObj->Trace("\tPersisence Level %d ---> %d\n", i, persistenceLevel[i]);
+ }
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/iePowerControlParameters.cpp b/data/mnet/GP10/Host/Rlc_mac/src/iePowerControlParameters.cpp
new file mode 100644
index 0000000..653f581
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/iePowerControlParameters.cpp
@@ -0,0 +1,114 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : iePowerControlParameters.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "iePowerControlParameters.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+// *******************************************************************
+// class IePowerControlParameters
+//
+// Description:
+// Power Control Parameters IE -- GSM04.60 12.13
+//
+// < Power Control Parameters IE > ::=
+// < ALPHA : bit (4) >
+// { 0 | 1 < GAMMA_TN0 : bit (5) > }
+// { 0 | 1 < GAMMA_TN1 : bit (5) > }
+// { 0 | 1 < GAMMA_TN2 : bit (5) > }
+// { 0 | 1 < GAMMA_TN3 : bit (5) > }
+// { 0 | 1 < GAMMA_TN4 : bit (5) > }
+// { 0 | 1 < GAMMA_TN5 : bit (5) > }
+// { 0 | 1 < GAMMA_TN6 : bit (5) > }
+// { 0 | 1 < GAMMA_TN7 : bit (5) > } ;
+//
+// *******************************************************************
+
+RlcMacResult IePowerControlParameters::SetPowerControlParameters(unsigned char alp,
+ GammaStruct *gammas)
+{
+ if (alp <= MAX_ALPHA_VALUE)
+ {
+ alpha = alp;
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+
+ for (int i = 0; i < MAX_NUM_GAMMAS; i++)
+ {
+ gammaTn[i] = gammas[i];
+ }
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+}
+
+
+
+
+RlcMacResult IePowerControlParameters::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IePowerControlParameters::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack Power Control Parameters bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8(alpha, 4);
+ for (int i = 0; i < MAX_NUM_GAMMAS; i++)
+ {
+ if (gammaTn[i].isValid)
+ {
+ dataStream.InsertBits8(1, 1);
+ dataStream.InsertBits8(gammaTn[i].gamma, 5);
+ }
+ else
+ {
+ dataStream.InsertBits8(0, 1);
+ }
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IePowerControlParameters::EncodeIe Power Control Parms not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IePowerControlParameters::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tPower Control Paramters\n");
+ outObj->Trace("\t\tAlpha ---> %f\n",
+ (alpha > 10) ? 1.0 : (float) (alpha * 0.1));
+ for (int i = 0; i < MAX_NUM_GAMMAS; i++)
+ {
+ if (gammaTn[i].isValid)
+ {
+ outObj->Trace("\t\tGAMMA_TN%d ---> %d dB\n", i, gammaTn[i].gamma<<1);
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieRFLNumberList.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieRFLNumberList.cpp
new file mode 100644
index 0000000..7f5230f
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieRFLNumberList.cpp
@@ -0,0 +1,95 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieRFLNumberList.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieRFLNumberList.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+// *******************************************************************
+// class IeRFLNumberList
+//
+// Description:
+// RFL Number List IE -- GSM04.60 12.10a
+//
+// < RFL number list struct > ::=
+// < RFL_NUMBER : bit (4) >
+// { 0 | 1 < RFL number list struct > } ;
+//
+// *******************************************************************
+
+RlcMacResult IeRFLNumberList::SetRFLNumberList(unsigned char count, unsigned char *list)
+{
+ if (count <= RLC_MAC_MAX_RF_FREQS)
+ {
+ numNums = count;
+ }
+ else
+ {
+ return (RLC_MAC_PARAMETER_RANGE_ERROR);
+ }
+
+ for (int i = 0; i < numNums; i++)
+ {
+ numberList[i] = list[i];
+ }
+ isValid = TRUE;
+ return (RLC_MAC_SUCCESS);
+}
+
+
+
+
+RlcMacResult IeRFLNumberList::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeRFLNumberList::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack RFL Number List bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8(numberList[0], 6);
+ for (int i = 1; i < numNums; i++)
+ {
+ dataStream.InsertBits8(1, 1);
+ dataStream.InsertBits8(numberList[i], 6);
+ }
+ dataStream.InsertBits8(0, 1);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeRFLNumberList::EncodeIe numberList not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeRFLNumberList::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tRFL Number List\n");
+ for (int i = 0; i < numNums; i++)
+ {
+ outObj->Trace("\t\t%d\n", numberList[i]);
+ }
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieRLCBlocksGranted.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieRLCBlocksGranted.cpp
new file mode 100644
index 0000000..efa8f40
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieRLCBlocksGranted.cpp
@@ -0,0 +1,58 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieRLCBlocksGranted.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieRLCBlocksGranted.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// class IeRLCBlocksGranted
+//
+// Description:
+// RLC Blocks Granted IE -- GSM04.60 11.2.29
+//
+// *******************************************************************
+
+RlcMacResult IeRLCBlocksGranted::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeRLCBlocksGranted::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack RLC Blocks Granted bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8(rlcBlocksGranted, 8);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeRLCBlocksGranted::EncodeIe RLC Blocks Granted not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeRLCBlocksGranted::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tRLC Blocks Granted ---> %#x\n", rlcBlocksGranted);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieRLCMode.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieRLCMode.cpp
new file mode 100644
index 0000000..a724f21
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieRLCMode.cpp
@@ -0,0 +1,86 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieRLCMode.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieRLCMode.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char rlcModeNames[][64] =
+{
+ "RLC acknowledged mode",
+ "RLC unacknowledged mode"
+};
+
+// *******************************************************************
+// class IeRlcMode
+//
+// Description:
+// RLC Mode IE -- GSM04.60 11.2.7
+// *******************************************************************
+
+RlcMacResult IeRlcMode::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeRlcMode::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack RLC mode bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8((unsigned char)rlcMode, 1);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeRlcMode::EncodeIe RLC Mode not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+RlcMacResult IeRlcMode::DecodeIe(BitStreamIn &dataStream)
+{
+ DBG_FUNC("IeRlcMode::DecodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+ unsigned char val;
+
+ // Extract RLC Mode bits from the input bit stream.
+ if ((result = dataStream.ExtractBits8(val, 1)) == RLC_MAC_SUCCESS)
+ {
+ rlcMode = (RLC_MODE)val;
+ isValid = TRUE;
+ }
+ else
+ {
+ DBG_ERROR("IeRlcMode::DecodeIe tlli extraction failed\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeRlcMode::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tRLC Mode ---> %s\n", rlcModeNames[rlcMode]);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieStartFrameNum.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieStartFrameNum.cpp
new file mode 100644
index 0000000..429b917
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieStartFrameNum.cpp
@@ -0,0 +1,80 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieStartFrameNum.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieStartFrameNum.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// class IeStartFrameNum
+//
+// Description:
+// Start Frame Number IE -- GSM04.60 12.21
+//
+// *******************************************************************
+
+RlcMacResult IeStartFrameNum::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeStartFrameNum::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack Start Frame Number bits into the output bit stream.
+ if (isValid)
+ {
+ if (startFrameType == ABSOLUTE_FRAME_NUM)
+ {
+ dataStream.InsertBits8(0, 1);
+ dataStream.InsertBits8(T1, 5);
+ dataStream.InsertBits8(T3, 6);
+ dataStream.InsertBits8(T2, 5);
+ }
+ else
+ {
+ dataStream.InsertBits8(1, 1);
+ dataStream.InsertBits16(k, 13);
+ }
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeStartFrameNum::EncodeIe Start Frame not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeStartFrameNum::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ if (startFrameType == ABSOLUTE_FRAME_NUM)
+ {
+ outObj->Trace("\tAbsolute Start Frame Number\n");
+ outObj->Trace("\t\tT1 ---> %d\n", T1);
+ outObj->Trace("\t\tT2 ---> %d\n", T2);
+ outObj->Trace("\t\tT3 ---> %d\n", T3);
+ }
+ else
+ {
+ outObj->Trace("\tRelative Start Frame Number\n");
+ outObj->Trace("\t\tk ---> %d\n", k);
+ }
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieTFI.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieTFI.cpp
new file mode 100644
index 0000000..90c9494
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieTFI.cpp
@@ -0,0 +1,79 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieTFI.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieTFI.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// class IeTFI
+//
+// Description:
+// TFI IE -- GSM04.60 12.15
+//
+// *******************************************************************
+
+RlcMacResult IeTFI::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeTFI::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack TFI bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8(tfi, 5);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeTFI::EncodeIe TFI not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+RlcMacResult IeTFI::DecodeIe(BitStreamIn &dataStream)
+{
+ DBG_FUNC("IeTFI::DecodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Extract TFI bits from the input bit stream.
+ if ((result = dataStream.ExtractBits8(tfi, 5)) == RLC_MAC_SUCCESS)
+ {
+ isValid = TRUE;
+ }
+ else
+ {
+ DBG_ERROR("IeTFI::DecodeIe TFI extraction failed\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeTFI::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tTFI ---> %#x\n", tfi);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieTLLI.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieTLLI.cpp
new file mode 100644
index 0000000..5be6edd
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieTLLI.cpp
@@ -0,0 +1,79 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieTLLI.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieTLLI.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// class IeTLLI
+//
+// Description:
+// TLLI IE -- GSM04.60 12.16
+// *******************************************************************
+
+RlcMacResult IeTLLI::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeTLLI::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack TLLI bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits32(tlli, 32);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeTLLI::EncodeIe tlli not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+RlcMacResult IeTLLI::DecodeIe(BitStreamIn &dataStream)
+{
+ DBG_FUNC("IeTLLI::DecodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Extract TLLI bits from the input bit stream.
+ if ((result = dataStream.ExtractBits32((unsigned long &)tlli, 32)) == RLC_MAC_SUCCESS)
+ {
+ isValid = TRUE;
+ }
+ else
+ {
+ DBG_ERROR("IeTLLI::DecodeIe tlli extraction failed\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeTLLI::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tTLLI ---> %#x\n", tlli);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieTMSI.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieTMSI.cpp
new file mode 100644
index 0000000..c44b9aa
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieTMSI.cpp
@@ -0,0 +1,57 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieTMSI.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieTMSI.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// class IeTMSI
+//
+// Description:
+// TMSI IE -- GSM03.03
+// *******************************************************************
+
+RlcMacResult IeTMSI::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeTMSI::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack TMSI bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits32(tmsi, 32);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeTMSI::EncodeIe tmsi not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeTMSI::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tTMSI ---> %#x\n", tmsi);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieTQI.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieTQI.cpp
new file mode 100644
index 0000000..2a63264
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieTQI.cpp
@@ -0,0 +1,58 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieTQI.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieTQI.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// class IeTQI
+//
+// Description:
+// TFI IE -- GSM04.60 12.17
+//
+// *******************************************************************
+
+RlcMacResult IeTQI::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeTQI::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack TQI bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits16(tqi, 16);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeTQI::EncodeIe TQI not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeTQI::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tTQI ---> %#x\n", tqi);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieTSC.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieTSC.cpp
new file mode 100644
index 0000000..89f5db1
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieTSC.cpp
@@ -0,0 +1,58 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieTSC.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieTSC.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+// *******************************************************************
+// class IeTSC
+//
+// Description:
+// TSC IE -- GSM04.60 12.8
+// *******************************************************************
+RlcMacResult IeTSC::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeTSC::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack TSC bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8(tsc, 3);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeTSC::EncodeIe TSC not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeTSC::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tTSC ---> %d\n", tsc);
+ }
+}
+
+
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieTimeslotAllocation.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieTimeslotAllocation.cpp
new file mode 100644
index 0000000..009c806
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieTimeslotAllocation.cpp
@@ -0,0 +1,69 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieTimeslotAllocation.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieTimeslotAllocation.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+
+char allocNames[][64] =
+{
+ "not allocated",
+ "allocated"
+};
+
+// *******************************************************************
+// class IeTimeslotAllocation
+//
+// Description:
+// RLC Mode IE -- GSM04.60 12.18
+// *******************************************************************
+
+RlcMacResult IeTimeslotAllocation::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeTimeslotAllocation::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack Timeslot Allocation bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8(tsAllocation, 8);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeTimeslotAllocation::EncodeIe TS Allocation not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeTimeslotAllocation::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\tTimeslot Allocation\n");
+ for (int i = 0; i < 8; i++)
+ {
+ outObj->Trace("\t\tTimeslot (%d) ---> %s\n",
+ i, allocNames[(tsAllocation >> (7 - i)) & 1]);
+ }
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/ieeMLPPPriority.cpp b/data/mnet/GP10/Host/Rlc_mac/src/ieeMLPPPriority.cpp
new file mode 100644
index 0000000..9874af6
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/ieeMLPPPriority.cpp
@@ -0,0 +1,70 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : ieeMLPPPriority.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "ieeMLPPPriority.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+
+char eMLPPPriNames[][64] =
+{
+ "no priority applied",
+ "call priority level 4",
+ "call priority level 3",
+ "call priority level 2",
+ "call priority level 1",
+ "call priority level 0",
+ "call priority level A",
+ "call priority level B"
+};
+
+// *******************************************************************
+// class IeeMLPPPriority
+//
+// Description:
+// eMLPP Priority IE -- GSM04.60 11.2.10
+// GSM04.08 10.5.2.24
+// *******************************************************************
+
+RlcMacResult IeeMLPPPriority::EncodeIe(BitStreamOut &dataStream)
+{
+ DBG_FUNC("IeeMLPPPriority::EncodeIe", RLC_MAC);
+ DBG_ENTER();
+
+ RlcMacResult result = RLC_MAC_SUCCESS;
+
+ // Pack eMLPP Priority bits into the output bit stream.
+ if (isValid)
+ {
+ dataStream.InsertBits8((unsigned char)emlppPriority, 3);
+ }
+ else
+ {
+ result = RLC_MAC_INVALID_IE;
+ DBG_ERROR("IeeMLPPPriority::EncodeIe eMLPP Priority not valid\n");
+ }
+
+ DBG_LEAVE();
+ return (result);
+}
+
+
+void IeeMLPPPriority::DisplayDetails(DbgOutput *outObj)
+{
+ if (isValid)
+ {
+ outObj->Trace("\teMLPPPriority ---> %s\n", eMLPPPriNames[emlppPriority]);
+ }
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/msgL1Decode.cpp b/data/mnet/GP10/Host/Rlc_mac/src/msgL1Decode.cpp
new file mode 100644
index 0000000..3c7b8af
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/msgL1Decode.cpp
@@ -0,0 +1,295 @@
+/*******************************************************************************
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+*******************************************************************************/
+
+/*******************************************************************************
+msgL1Decode
+
+This file contains the functins to deccode the messages received from Layer 1.
+There is one function per message type. The caller supplies the message in a
+byte array and receives the decoded message in a structure. The memory of the
+prepared structured is managed by the caller.
+*/
+
+#include "vxWorks.h"
+#include "string.h"
+#include "msgL1.h"
+
+#if _BYTE_ORDER == _BIG_ENDIAN
+#define BYTES_TO_WORD(b) *(int*)b
+#else
+#define BYTES_TO_WORD(b) LONGSWAP(*(int*)b)
+#endif
+
+/*******************************************************************************
+*/
+static void msgDecodeHeader
+(
+ char** ppMsgIn,
+ MsgHeader* header
+)
+{
+ header->function = *(*ppMsgIn)++;
+ header->type = (*(*ppMsgIn)++ << 8) | *(*ppMsgIn)++;
+ header->trx = *(*ppMsgIn)++;
+}
+
+/*******************************************************************************
+*/
+static void msgDecodeChannel
+(
+ char** ppMsgIn,
+ Channel* channel
+)
+{
+ channel->typeTs = *(*ppMsgIn)++;
+ channel->ccch = *(*ppMsgIn)++;
+}
+
+/*******************************************************************************
+*/
+static void msgDecodeFrameNum
+(
+ char** ppMsgIn,
+ FrameNum* frame
+)
+{
+ frame->t1 = (*(*ppMsgIn) >> 3) & 0x1F;
+ frame->t3 = ((*(*ppMsgIn)++ << 3) & 0x1C) | ((*(*ppMsgIn) >> 5) & 0x07);
+ frame->t2 = *(*ppMsgIn)++ & 0x1F;
+}
+
+/*******************************************************************************
+*/
+void msgDecodePrach
+(
+ char* msgIn,
+ MsgPrach* msgOut
+)
+{
+ msgDecodeHeader(&msgIn, &msgOut->header);
+ msgDecodeChannel(&msgIn, &msgOut->channel);
+ msgDecodeFrameNum(&msgIn, &msgOut->frameNum);
+ msgOut->packetAccessRef = (*msgIn++ << 8) | (*msgIn++ & 0x0F);
+ msgOut->ta = *msgIn++;
+ msgOut->power = *msgIn;
+}
+
+/*******************************************************************************
+*/
+void msgDecodePacch
+(
+ char* msgIn,
+ MsgPacchInd* msgOut
+)
+{
+ msgDecodeHeader(&msgIn, &msgOut->header);
+ msgDecodeChannel(&msgIn, &msgOut->channel);
+ msgOut->tbf = *msgIn++;
+ bcopy(msgIn, msgOut->data, MAX_RLC_CONTROL_MSG);
+}
+
+/*******************************************************************************
+*/
+void msgDecodePdtch
+(
+ char* msgIn,
+ MsgPdtchInd* msgOut,
+ int msgSize
+)
+{
+ msgDecodeHeader(&msgIn, &msgOut->header);
+ msgDecodeChannel(&msgIn, &msgOut->channel);
+ msgOut->codeRate = *msgIn++;
+ bcopy(msgIn, msgOut->data, msgSize - DSP_CHAN_IE_SIZE + DSP_MSG_HDR_SIZE -
+ DSP_CODE_RATE_SIZE);
+}
+
+/*******************************************************************************
+*/
+void msgDecodeUlPowerTiming
+(
+ char* msgIn,
+ MsgUlPowerTiming* msgOut
+)
+{
+ msgDecodeHeader(&msgIn, &msgOut->header);
+ msgDecodeChannel(&msgIn, &msgOut->channel);
+ msgOut->groupTfi = *msgIn;
+}
+
+/*******************************************************************************
+*/
+void msgDecodeUlTbfActivationAck
+(
+ char* msgIn,
+ MsgUlTbfActivationAck* msgOut
+)
+{
+ msgDecodeHeader(&msgIn, &msgOut->header);
+ msgOut->tlli = BYTES_TO_WORD(msgIn);
+}
+
+/*******************************************************************************
+*/
+static void msgDecodeCommon
+(
+ char* msgIn,
+ MsgCommon* msgOut
+)
+{
+ msgDecodeHeader(&msgIn, &msgOut->header);
+ msgOut->tlli = BYTES_TO_WORD(msgIn);
+}
+
+/*******************************************************************************
+*/
+void msgDecodeUlTbfDeactivationAck
+(
+ char* msgIn,
+ MsgUlTbfDeactivationAck* msgOut
+)
+{
+ msgDecodeCommon(msgIn, (MsgCommon *)msgOut);
+}
+
+/*******************************************************************************
+*/
+void msgDecodeDlTbfActivationAck
+(
+ char* msgIn,
+ MsgDlTbfActivationAck* msgOut
+)
+{
+ msgDecodeCommon(msgIn, (MsgCommon *)msgOut);
+}
+
+/*******************************************************************************
+*/
+void msgDecodeDlTbfDeactivationAck
+(
+ char* msgIn,
+ MsgDlTbfDeactivationAck* msgOut
+)
+{
+ msgDecodeCommon(msgIn, (MsgCommon *)msgOut);
+}
+
+/*******************************************************************************
+*/
+void msgDecodeUlTbfReconfigAck
+(
+ char* msgIn,
+ MsgUlTbfReconfigAck* msgOut
+)
+{
+ msgDecodeCommon(msgIn, (MsgCommon *)msgOut);
+}
+
+/*******************************************************************************
+*/
+void msgDecodeDlTbfReconfigAck
+(
+ char* msgIn,
+ MsgDlTbfReconfigAck* msgOut
+)
+{
+ msgDecodeCommon(msgIn, (MsgCommon *)msgOut);
+}
+
+/*******************************************************************************
+*/
+void msgDecodeReadyToSend
+(
+ char* msgIn,
+ MsgReadyToSend* msgOut
+)
+{
+ msgDecodeHeader(&msgIn, &msgOut->header);
+ msgDecodeChannel(&msgIn, &msgOut->channel);
+ msgOut->link = *msgIn++;
+ msgOut->numBuffs = *msgIn;
+}
+
+/*******************************************************************************
+*/
+void msgDecodePacchNack
+(
+ char* msgIn,
+ MsgPacchNack* msgOut
+)
+{
+ msgDecodeHeader(&msgIn, &msgOut->header);
+ msgDecodeChannel(&msgIn, &msgOut->channel);
+ msgOut->tbf = *msgIn;
+}
+
+
+/*******************************************************************************
+*/
+void msgDecodeSingleBlockAssignAlert
+(
+ char* msgIn,
+ MsgSingleBlockAssignAlert* msgOut
+)
+{
+ msgDecodeHeader(&msgIn, &msgOut->header);
+ msgOut->ts = *msgIn++;
+ msgOut->frameNum = BYTES_TO_WORD(msgIn);
+ msgIn += 4;
+ msgOut->ARFCN = 0;
+ msgOut->ARFCN |= (*msgIn++ << 8);
+ msgOut->ARFCN |= *msgIn;
+}
+
+
+/*******************************************************************************
+*/
+void msgDecodeDLAssignAlert
+(
+ char* msgIn,
+ MsgDLAssignAlert* msgOut
+)
+{
+ msgDecodeHeader(&msgIn, &msgOut->header);
+ msgOut->ts = *msgIn++;
+ msgOut->frameNum = BYTES_TO_WORD(msgIn);
+ msgIn += 4;
+ msgOut->ARFCN = 0;
+ msgOut->ARFCN |= (*msgIn++ << 8);
+ msgOut->ARFCN |= *msgIn++;
+ msgOut->tag = *msgIn;
+}
+
+
+/*******************************************************************************
+*/
+void msgDecodePacchAbInd
+(
+ char* msgIn,
+ MsgPacchAbInd* msgOut
+)
+{
+ msgDecodeHeader(&msgIn, &msgOut->header);
+ msgDecodeChannel(&msgIn, &msgOut->channel);
+ msgOut->tag = *msgIn++;
+ msgOut->data[0] = *msgIn++;
+ msgOut->data[1] = *msgIn++ << 5;
+ msgOut->ta = *msgIn;
+}
+
+
+/*******************************************************************************
+*/
+void msgDecodeCodeRateReq
+(
+ char* msgIn,
+ MsgCodeRateReq* msgOut
+)
+{
+ msgDecodeHeader(&msgIn, &msgOut->header);
+ msgOut->tbfType = *msgIn++;
+ msgOut->groupTfi = *msgIn++;
+ msgOut->codeRate = *msgIn;
+}
diff --git a/data/mnet/GP10/Host/Rlc_mac/src/msgL1Encode.cpp b/data/mnet/GP10/Host/Rlc_mac/src/msgL1Encode.cpp
new file mode 100644
index 0000000..318d4e5
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src/msgL1Encode.cpp
@@ -0,0 +1,303 @@
+/*******************************************************************************
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+*******************************************************************************/
+
+/*******************************************************************************
+msgL1Encode
+
+This file contains the functins to encode the messages to be sent to Layer 1.
+There is one function per message type. The caller supplies the message in a
+structure and receives the encoded byte array. The memory of the prepared byte
+array is managed by the caller.
+*/
+
+#include "vxworks.h"
+#include "string.h"
+#include "msgL1.h"
+
+#if _BYTE_ORDER == _BIG_ENDIAN
+#define WORD_TO_BYTES(w,b) *(int*)b=w
+#else
+#define WORD_TO_BYTES(w,b) LONGSWAP(w),*(int*)b=w
+#endif
+
+/*******************************************************************************
+*/
+static /*inline*/ void msgEncodeHeader
+(
+ MsgHeader* msgHeader,
+ char** ppMsg
+)
+{
+ *(*ppMsg)++ = msgHeader->function;
+ *(*ppMsg)++ = (msgHeader->type) >> 8;
+ *(*ppMsg)++ = (msgHeader->type) & 0xFF;
+ *(*ppMsg)++ = msgHeader->trx;
+}
+
+/*******************************************************************************
+*/
+static /*inline*/ void taiEncode
+(
+ Tai* taiIn,
+ char** ppTaiOut
+)
+{
+ *(*ppTaiOut)++ = taiIn->ts;
+ *(*ppTaiOut)++ = taiIn->tai;
+}
+
+/*******************************************************************************
+*/
+static /*inline*/ void timeEncode
+(
+ Time* timeIn,
+ char** ppTimeOut
+)
+{
+ *(*ppTimeOut)++ = timeIn->imm;
+ *(*ppTimeOut)++ = ((timeIn->frameNum.t1) << 3) | (((timeIn->frameNum.t3) >> 3) & 0x07);
+ *(*ppTimeOut)++ = ((timeIn->frameNum.t3) << 5) | ((timeIn->frameNum.t2) & 0x1F);
+}
+
+/*******************************************************************************
+*/
+int msgEncodePtcch
+(
+ MsgPtcch* msgIn,
+ char* msg
+)
+{
+ const int MsgSize = MAX_RLC_CONTROL_MSG + DSP_CHAN_IE_SIZE + DSP_MSG_HDR_SIZE;
+
+ msgEncodeHeader(&msgIn->header, &msg);
+ *msg++ = msgIn->channel.typeTs;
+ *msg++ = msgIn->channel.ccch;
+ bcopy(msgIn->data, msg, MAX_RLC_CONTROL_MSG);
+ return MsgSize;
+}
+
+/*******************************************************************************
+*/
+int msgEncodePacch
+(
+ MsgPacchReq* msgIn,
+ char* msg
+)
+{
+ const int MsgSize = MAX_RLC_CONTROL_MSG + DSP_CHAN_IE_SIZE + DSP_MSG_HDR_SIZE +
+ DSP_TAG_SIZE + DSP_BURST_TYPE_SIZE;
+
+ msgEncodeHeader(&msgIn->header, &msg);
+ *msg++ = msgIn->channel.typeTs;
+ *msg++ = msgIn->channel.ccch;
+ *msg++ = msgIn->tbf;
+ *msg++ = msgIn->burstType;
+ bcopy(msgIn->data, msg, MAX_RLC_CONTROL_MSG);
+ return MsgSize;
+}
+
+/*******************************************************************************
+*/
+int msgEncodePdtch
+(
+ MsgPdtchReq* msgIn,
+ char* msg,
+ int dataBlkSize
+)
+{
+ const int MsgSize = DSP_CHAN_IE_SIZE + DSP_MSG_HDR_SIZE + DSP_CODE_RATE_SIZE +
+ DSP_TAG_SIZE + DSP_BURST_TYPE_SIZE + dataBlkSize;
+
+ msgEncodeHeader(&msgIn->header, &msg);
+ *msg++ = msgIn->channel.typeTs;
+ *msg++ = msgIn->channel.ccch;
+ *msg++ = msgIn->tbf;
+ *msg++ = msgIn->burstType;
+ *msg++ = msgIn->codeRate;
+ bcopy(msgIn->data, msg, dataBlkSize);
+ return MsgSize;
+}
+
+/*******************************************************************************
+*/
+int msgEncodeUlTbfActivation
+(
+ MsgUlTbfActivation* msgIn,
+ char* msg
+)
+{
+ const int MsgSize = 18;
+
+ msgEncodeHeader(&msgIn->header, &msg);
+ WORD_TO_BYTES(msgIn->tlli, msg);
+ msg += 4;
+ *msg++ = msgIn->tbfMode;
+ *msg++ = msgIn->groupTfi;
+ *msg++ = msgIn->channel;
+ *msg++ = msgIn->tsAllocation;
+ WORD_TO_BYTES(msgIn->usfTsMap, msg);
+ msg += 4;
+ taiEncode(&msgIn->tai, &msg);
+ /* timeEncode(&msgIn->startTime, &msg); */
+ /* USF granularity */
+ return MsgSize;
+}
+
+/*******************************************************************************
+*/
+int msgEncodeUlTbfDeactivation
+(
+ MsgUlTbfDeactivation* msgIn,
+ char* msg
+)
+{
+ const int MsgSize = 8;
+
+ msgEncodeHeader(&msgIn->header, &msg);
+ WORD_TO_BYTES(msgIn->tlli, msg);
+ return MsgSize;
+}
+
+/*******************************************************************************
+*/
+int msgEncodeDlTbfActivation
+(
+ MsgDlTbfActivation* msgIn,
+ char* msg
+)
+{
+ const int MsgSize = 13;
+
+ msgEncodeHeader(&msgIn->header, &msg);
+ WORD_TO_BYTES(msgIn->tlli, msg);
+ msg += 4;
+ *msg++ = msgIn->groupTfi;
+ *msg++ = msgIn->channel;
+ *msg++ = msgIn->tsAllocation;
+ *msg++ = msgIn->msPower;
+ *msg++ = msgIn->ta;
+ /* timeEncode(&msgIn->startTime, &msg); */
+ return MsgSize;
+}
+
+/*******************************************************************************
+*/
+int msgEncodeDlTbfDeactivation
+(
+ MsgDlTbfDeactivation* msgIn,
+ char* msg
+)
+{
+ const int MsgSize = 8;
+
+ msgEncodeHeader(&msgIn->header, &msg);
+ WORD_TO_BYTES(msgIn->tlli, msg);
+ return MsgSize;
+}
+
+/*******************************************************************************
+*/
+int msgEncodeUlTbfReconfig
+(
+ MsgUlTbfReconfig* msgIn,
+ char* msg
+)
+{
+ const int MsgSize = 18;
+
+ msgEncodeHeader(&msgIn->header, &msg);
+ WORD_TO_BYTES(msgIn->tlli, msg);
+ msg += 4;
+ *msg++ = msgIn->groupTfi;
+ *msg++ = msgIn->channel;
+ *msg++ = msgIn->tbfMode;
+ *msg++ = msgIn->tsAllocation;
+ WORD_TO_BYTES(msgIn->usfTsMap, msg);
+ msg += 4;
+ taiEncode(&msgIn->tai, &msg);
+ /* timeEncode(&msgIn->startTime, &msg); */
+ return MsgSize;
+}
+
+/*******************************************************************************
+*/
+int msgEncodeDlTbfReconfig
+(
+ MsgDlTbfReconfig* msgIn,
+ char* msg
+)
+{
+ const int MsgSize = 11;
+
+ msgEncodeHeader(&msgIn->header, &msg);
+ WORD_TO_BYTES(msgIn->tlli, msg);
+ msg += 4;
+ *msg++ = msgIn->groupTfi;
+ *msg++ = msgIn->channel;
+ *msg++ = msgIn->tsAllocation;
+ /* timeEncode(&msgIn->startTime, &msg); */
+ return MsgSize;
+}
+
+
+/*******************************************************************************
+*/
+int msgEncodeSingleBlockAssignAlertAck
+(
+ MsgSingleBlockAssignAlertAck* msgIn,
+ char* msg
+)
+{
+ const int MsgSize = 10;
+
+ msgEncodeHeader(&msgIn->header, &msg);
+ *msg++ = msgIn->channel.typeTs;
+ *msg++ = msgIn->channel.ccch;
+ WORD_TO_BYTES(msgIn->frameNum, msg);
+ return MsgSize;
+}
+
+
+/*******************************************************************************
+*/
+int msgEncodeDLAssignAlertAck
+(
+ MsgDLAssignAlertAck* msgIn,
+ char* msg
+)
+{
+ const int MsgSize = 11;
+
+ msgEncodeHeader(&msgIn->header, &msg);
+ *msg++ = msgIn->channel.typeTs;
+ *msg++ = msgIn->channel.ccch;
+ WORD_TO_BYTES(msgIn->frameNum, msg);
+ msg+=4;
+ *msg = msgIn->tag;
+ return MsgSize;
+}
+
+
+/*******************************************************************************
+*/
+int msgEncodeDLAckNackInfo
+(
+ MsgDLAckNackInfo* msgIn,
+ char* msg
+)
+{
+ const int MsgSize = 20;
+
+ msgEncodeHeader(&msgIn->header, &msg);
+ WORD_TO_BYTES(msgIn->tlli, msg);
+ msg += 4;
+ *msg++ = msgIn->groupTfi;
+ *msg++ = msgIn->cValue;
+ *msg++ = msgIn->rxqual;
+ *msg++ = msgIn->iLevelMask;
+ for (int i=0; i<8; i++)
+ *msg++ = msgIn->iLevelByTs[i];
+ return MsgSize;
+}
diff --git a/data/mnet/GP10/Host/Rlc_mac/src_api/Makefile b/data/mnet/GP10/Host/Rlc_mac/src_api/Makefile
new file mode 100644
index 0000000..e938b67
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src_api/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = Rlc_mac
+THIS_DIRECTORY = src_api
+MY_OUTPUT = $(OBJDIR)\Rlc_mac_api.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) .\bin\*.o
+ $(RM) .\bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src_api/RlcMacIntf.cpp b/data/mnet/GP10/Host/Rlc_mac/src_api/RlcMacIntf.cpp
new file mode 100644
index 0000000..760bb35
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src_api/RlcMacIntf.cpp
@@ -0,0 +1,577 @@
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : RlcMacIntf.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+#include "Rlc_mac/RlcMacIntf.h"
+#include "GP10MsgTypes.h"
+#include "GP10Err.h"
+#include "logging\vclogging.h"
+#include "logging\vcmodules.h"
+#include "dsp\dsphmsg.h"
+
+
+// Main message queue for the RLC/MAC task
+JCMsgQueue *RlcMacMsgQ;
+
+
+//----------------------------------------------------------------------------
+// RLC/MAC Interface Functions
+//----------------------------------------------------------------------------
+JC_STATUS RlcMacGrrReadyToGo(void)
+{
+ DBG_FUNC("RlcMacGrrReadyToGo", RLC_MAC_INTF);
+ DBG_ENTER();
+
+ JC_STATUS status;
+
+ // Send message the main RLC/MAC message queue.
+ if ((status = RlcMacMsgQ->JCMsgQSend(
+ (JCMsgQueue *)0, // No reply needed
+ RLCMAC_READY_TO_GO,
+ MODULE_RM,
+ (char *)0,
+ 0,
+ JC_NO_WAIT,
+ JC_MSG_PRI_NORMAL)) != JC_OK)
+ {
+ DBG_ERROR("RlcMacGrrReadyToGo: Unable to send message status(%x)\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+JC_STATUS RlcMacConfigureTS(int trx, int timeslot, int chanComb)
+{
+ DBG_FUNC("RlcMacTSConfigure", RLC_MAC_INTF);
+ DBG_ENTER();
+
+ JC_STATUS status;
+
+ RlcMacTSConfiguration configMsg;
+
+ configMsg.trx = trx;
+ configMsg.timeslot = timeslot;
+ configMsg.chanComb = chanComb;
+
+ // Send message to the main RLC/MAC message queue.
+ if ((status = RlcMacMsgQ->JCMsgQSend(
+ (JCMsgQueue *)0, // No reply needed
+ RLCMAC_TIMESLOT_CONFIG,
+ MODULE_RM,
+ (char *)&configMsg,
+ sizeof(RlcMacTSConfiguration),
+ JC_NO_WAIT,
+ JC_MSG_PRI_NORMAL)) != JC_OK)
+ {
+ DBG_ERROR("RlcMacTSConfigure: Unable to send message status(%x)\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+JC_STATUS RlcMacTSAdminState(int trx, int timeSlot, AdministrativeState state)
+{
+ DBG_FUNC("RlcMacTSAdminState", RLC_MAC_INTF);
+ DBG_ENTER();
+
+ JC_STATUS status;
+ RlcMacAdminStateChangeType adminChangeMsg;
+
+ adminChangeMsg.adminState = state;
+ adminChangeMsg.oamObj = RLC_MAC_TIMESLOT;
+ adminChangeMsg.trx = trx;
+ adminChangeMsg.timeSlot = timeSlot;
+
+ // Send message the main RLC/MAC message queue.
+ if ((status = RlcMacMsgQ->JCMsgQSend(
+ (JCMsgQueue *)0, // No reply needed
+ RLCMAC_ADMIN_STATE_CHANGE,
+ MODULE_RM,
+ (char *)&adminChangeMsg,
+ sizeof(RlcMacAdminStateChangeType),
+ JC_NO_WAIT,
+ JC_MSG_PRI_NORMAL)) != JC_OK)
+ {
+ DBG_ERROR("RlcMacTSAdminState: Unable to send message status(%x)\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+JC_STATUS RlcMacTRXAdminState(int trx, AdministrativeState state)
+{
+ DBG_FUNC("RlcMacTRXAdminState", RLC_MAC_INTF);
+ DBG_ENTER();
+
+ JC_STATUS status;
+ RlcMacAdminStateChangeType adminChangeMsg;
+
+ adminChangeMsg.adminState = state;
+ adminChangeMsg.oamObj = RLC_MAC_TRX;
+ adminChangeMsg.trx = trx;
+
+ // Send message the main RLC/MAC message queue.
+ if ((status = RlcMacMsgQ->JCMsgQSend(
+ (JCMsgQueue *)0, // No reply needed
+ RLCMAC_ADMIN_STATE_CHANGE,
+ MODULE_RM,
+ (char *)&adminChangeMsg,
+ sizeof(RlcMacAdminStateChangeType),
+ JC_NO_WAIT,
+ JC_MSG_PRI_NORMAL)) != JC_OK)
+ {
+ DBG_ERROR("RlcMacTRXAdminState: Unable to send message status(%x)\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+JC_STATUS RlcMacGPAdminState(AdministrativeState state)
+{
+ DBG_FUNC("RlcMacGPAdminState", RLC_MAC_INTF);
+ DBG_ENTER();
+
+ JC_STATUS status;
+ RlcMacAdminStateChangeType adminChangeMsg;
+
+ adminChangeMsg.adminState = state;
+ adminChangeMsg.oamObj = RLC_MAC_GP;
+
+ // Send message the main RLC/MAC message queue.
+ if ((status = RlcMacMsgQ->JCMsgQSend(
+ (JCMsgQueue *)0, // No reply needed
+ RLCMAC_ADMIN_STATE_CHANGE,
+ MODULE_RM,
+ (char *)&adminChangeMsg,
+ sizeof(RlcMacAdminStateChangeType),
+ JC_NO_WAIT,
+ JC_MSG_PRI_NORMAL)) != JC_OK)
+ {
+ DBG_ERROR("RlcMacGPAdminState: Unable to send message status(%x)\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+JC_STATUS RlcMacTSOpState(int trx, int timeSlot, EnableDisable state)
+{
+ DBG_FUNC("RlcMacTSOpState", RLC_MAC_INTF);
+ DBG_ENTER();
+
+ JC_STATUS status;
+ RlcMacOpStateChangeType opChangeMsg;
+
+ opChangeMsg.opState = state;
+ opChangeMsg.oamObj = RLC_MAC_TIMESLOT;
+ opChangeMsg.trx = trx;
+ opChangeMsg.timeSlot = timeSlot;
+
+ // Send message the main RLC/MAC message queue.
+ if ((status = RlcMacMsgQ->JCMsgQSend(
+ (JCMsgQueue *)0, // No reply needed
+ RLCMAC_OP_STATE_CHANGE,
+ MODULE_RM,
+ (char *)&opChangeMsg,
+ sizeof(RlcMacOpStateChangeType),
+ JC_NO_WAIT,
+ JC_MSG_PRI_NORMAL)) != JC_OK)
+ {
+ DBG_ERROR("RlcMacTSOpState: Unable to send message status(%x)\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+JC_STATUS RlcMacTRXOpState(int trx, EnableDisable state)
+{
+ DBG_FUNC("RlcMacTRXOpState", RLC_MAC_INTF);
+ DBG_ENTER();
+
+ JC_STATUS status;
+ RlcMacOpStateChangeType opChangeMsg;
+
+ opChangeMsg.opState = state;
+ opChangeMsg.oamObj = RLC_MAC_TRX;
+ opChangeMsg.trx = trx;
+
+ // Send message the main RLC/MAC message queue.
+ if ((status = RlcMacMsgQ->JCMsgQSend(
+ (JCMsgQueue *)0, // No reply needed
+ RLCMAC_OP_STATE_CHANGE,
+ MODULE_RM,
+ (char *)&opChangeMsg,
+ sizeof(RlcMacOpStateChangeType),
+ JC_NO_WAIT,
+ JC_MSG_PRI_NORMAL)) != JC_OK)
+ {
+ DBG_ERROR("RlcMacTRXOpState: Unable to send message status(%x)\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+
+JC_STATUS RlcMacGPOpState(EnableDisable state)
+{
+ DBG_FUNC("RlcMacGPOpState", RLC_MAC_INTF);
+ DBG_ENTER();
+
+ JC_STATUS status;
+ RlcMacOpStateChangeType opChangeMsg;
+
+ opChangeMsg.opState = state;
+ opChangeMsg.oamObj = RLC_MAC_GP;
+
+ // Send message the main RLC/MAC message queue.
+ if ((status = RlcMacMsgQ->JCMsgQSend(
+ (JCMsgQueue *)0, // No reply needed
+ RLCMAC_OP_STATE_CHANGE,
+ MODULE_RM,
+ (char *)&opChangeMsg,
+ sizeof(RlcMacOpStateChangeType),
+ JC_NO_WAIT,
+ JC_MSG_PRI_NORMAL)) != JC_OK)
+ {
+ DBG_ERROR("RlcMacGPOpState: Unable to send message status(%x)\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+JC_STATUS RlcMacRmMdMsgInd(T_CNI_RIL3MD_RRM_MSG *chanReq)
+{
+ DBG_FUNC("RlcMacRmMdMsgInd", RLC_MAC_INTF);
+ DBG_ENTER();
+
+ JC_STATUS status;
+
+ // Send message the main RLC/MAC message queue.
+ if ((status = RlcMacMsgQ->JCMsgQSend(
+ (JCMsgQueue *)0, // No reply needed
+ RLCMAC_RM_MD_MSG_IND,
+ MODULE_RM,
+ (char *)chanReq,
+ sizeof(T_CNI_RIL3MD_RRM_MSG),
+ JC_NO_WAIT,
+ JC_MSG_PRI_NORMAL)) != JC_OK)
+ {
+ DBG_ERROR("RlcMacRmMdMsgInd: Unable to send message status(%x)\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+
+JC_STATUS RlcMacL1MsgInd(unsigned char *msg, int len)
+{
+ DBG_FUNC("RlcMacL1MsgInd", RLC_MAC_INTF);
+ DBG_ENTER();
+
+ JC_STATUS status;
+
+ RlcMacL1MsgIndType rlcMacMsg;
+
+ // Populate Layer 1 Message Request structure.
+ rlcMacMsg.len = len;
+ for (int i=0; i < len; i++)
+ {
+ rlcMacMsg.l1Msg[i] = msg[i];
+ }
+
+ if ((msg[1] == ((unsigned char)(PH_READY2SEND_IND>>8))) &&
+ (msg[2] == ((unsigned char)PH_READY2SEND_IND)))
+ {
+ // Send message to the main RLC/MAC message queue.
+ if ((status = RlcMacMsgQ->JCMsgQSend(
+ (JCMsgQueue *)0, // No reply needed
+ RLCMAC_L1_RTS,
+ MODULE_L1,
+ (char *)&rlcMacMsg,
+ sizeof(RlcMacL1MsgIndType),
+ JC_NO_WAIT,
+ JC_MSG_PRI_URGENT)) != JC_OK)
+ {
+ DBG_ERROR("RlcMacL1MsgInd: Unable to send message status(%x)\n",
+ status);
+ }
+ }
+ else
+ {
+ // Send message to the main RLC/MAC message queue.
+ if ((status = RlcMacMsgQ->JCMsgQSend(
+ (JCMsgQueue *)0, // No reply needed
+ RLCMAC_L1_MSG_IND,
+ MODULE_L1,
+ (char *)&rlcMacMsg,
+ sizeof(RlcMacL1MsgIndType),
+ JC_NO_WAIT,
+ JC_MSG_PRI_NORMAL)) != JC_OK)
+ {
+ DBG_ERROR("RlcMacL1MsgInd: Unable to send message status(%x)\n",
+ status);
+ }
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+JC_STATUS RlcMacBssgpUnitDataRequest(BSSGP_DL_UNITDATA_MSG *msg)
+{
+ DBG_FUNC("RlcMacBssgpUnitDataRequest", RLC_MAC_INTF);
+ DBG_ENTER();
+
+ JC_STATUS status;
+
+ // Send message to the main RLC/MAC message queue.
+ if ((status = RlcMacMsgQ->JCMsgQSend(
+ (JCMsgQueue *)0, // No reply needed
+ RLCMAC_DL_PDU_REQ,
+ MODULE_RM, // Needs to be BSSGP when its added.
+ (char *)msg,
+ sizeof(BSSGP_DL_UNITDATA_MSG),
+ JC_NO_WAIT,
+ JC_MSG_PRI_NORMAL)) != JC_OK)
+ {
+ DBG_ERROR("RlcMacBssgpUnitDataRequest: Unable to send message status(%x)\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+JC_STATUS RlcMacT3169Expiry(int tbfPointer)
+{
+ DBG_FUNC("RlcMacT3169Expiry", RLC_MAC_INTF);
+ DBG_ENTER();
+
+ JC_STATUS status;
+
+ char msg[sizeof(int)];
+
+ for (int i = 0; i < sizeof(int); i++)
+ {
+ msg[i] = tbfPointer >> (i * 8);
+ }
+
+ // Send message to the main RLC/MAC message queue.
+ if ((status = RlcMacMsgQ->JCMsgQSend(
+ (JCMsgQueue *)0, // No reply needed
+ RLCMAC_T3169_EXPIRY,
+ MODULE_RLCMAC,
+ msg,
+ sizeof(int),
+ JC_NO_WAIT,
+ JC_MSG_PRI_NORMAL)) != JC_OK)
+ {
+ DBG_ERROR("RlcMacT3169Expiry: Unable to send message status(%x)\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+JC_STATUS RlcMacT3195Expiry(int tbfPointer)
+{
+ DBG_FUNC("RlcMacT3195Expiry", RLC_MAC_INTF);
+ DBG_ENTER();
+
+ JC_STATUS status;
+
+ char msg[sizeof(int)];
+
+ for (int i = 0; i < sizeof(int); i++)
+ {
+ msg[i] = tbfPointer >> (i * 8);
+ }
+
+ // Send message to the main RLC/MAC message queue.
+ if ((status = RlcMacMsgQ->JCMsgQSend(
+ (JCMsgQueue *)0, // No reply needed
+ RLCMAC_T3195_EXPIRY,
+ MODULE_RLCMAC,
+ msg,
+ sizeof(int),
+ JC_NO_WAIT,
+ JC_MSG_PRI_NORMAL)) != JC_OK)
+ {
+ DBG_ERROR("RlcMacT3195Expiry: Unable to send message status(%x)\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+JC_STATUS RlcMacT3191Expiry(int tbfPointer)
+{
+ DBG_FUNC("RlcMacT3191Expiry", RLC_MAC_INTF);
+ DBG_ENTER();
+
+ JC_STATUS status;
+
+ char msg[sizeof(int)];
+
+ for (int i = 0; i < sizeof(int); i++)
+ {
+ msg[i] = tbfPointer >> (i * 8);
+ }
+
+ // Send message to the main RLC/MAC message queue.
+ if ((status = RlcMacMsgQ->JCMsgQSend(
+ (JCMsgQueue *)0, // No reply needed
+ RLCMAC_T3191_EXPIRY,
+ MODULE_RLCMAC,
+ msg,
+ sizeof(int),
+ JC_NO_WAIT,
+ JC_MSG_PRI_NORMAL)) != JC_OK)
+ {
+ DBG_ERROR("RlcMacT3191Expiry: Unable to send message status(%x)\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+JC_STATUS RlcMacT3193Expiry(int tbfPointer)
+{
+ DBG_FUNC("RlcMacT3193Expiry", RLC_MAC_INTF);
+ DBG_ENTER();
+
+ JC_STATUS status;
+
+ char msg[sizeof(int)];
+
+ for (int i = 0; i < sizeof(int); i++)
+ {
+ msg[i] = tbfPointer >> (i * 8);
+ }
+
+ // Send message to the main RLC/MAC message queue.
+ if ((status = RlcMacMsgQ->JCMsgQSend(
+ (JCMsgQueue *)0, // No reply needed
+ RLCMAC_T3193_EXPIRY,
+ MODULE_RLCMAC,
+ msg,
+ sizeof(int),
+ JC_NO_WAIT,
+ JC_MSG_PRI_NORMAL)) != JC_OK)
+ {
+ DBG_ERROR("RlcMacT3193Expiry: Unable to send message status(%x)\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+JC_STATUS RlcMacDLActivityTimerExpiry(int tbfPointer)
+{
+ DBG_FUNC("RlcMacDLActivityTimerExpiry", RLC_MAC_INTF);
+ DBG_ENTER();
+
+ JC_STATUS status;
+
+ char msg[sizeof(int)];
+
+ for (int i = 0; i < sizeof(int); i++)
+ {
+ msg[i] = tbfPointer >> (i * 8);
+ }
+
+ // Send message to the main RLC/MAC message queue.
+ if ((status = RlcMacMsgQ->JCMsgQSend(
+ (JCMsgQueue *)0, // No reply needed
+ RLCMAC_DL_ACTIVITY_TIMER_EXPIRY,
+ MODULE_RLCMAC,
+ msg,
+ sizeof(int),
+ JC_NO_WAIT,
+ JC_MSG_PRI_NORMAL)) != JC_OK)
+ {
+ DBG_ERROR("RlcMacDLActivityTimerExpiry: Unable to send message status(%x)\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+JC_STATUS RlcMacULActivityTimerExpiry(int tbfPointer)
+{
+ DBG_FUNC("RlcMacULActivityTimerExpiry", RLC_MAC_INTF);
+ DBG_ENTER();
+
+ JC_STATUS status;
+
+ char msg[sizeof(int)];
+
+ for (int i = 0; i < sizeof(int); i++)
+ {
+ msg[i] = tbfPointer >> (i * 8);
+ }
+
+ // Send message to the main RLC/MAC message queue.
+ if ((status = RlcMacMsgQ->JCMsgQSend(
+ (JCMsgQueue *)0, // No reply needed
+ RLCMAC_UL_ACTIVITY_TIMER_EXPIRY,
+ MODULE_RLCMAC,
+ msg,
+ sizeof(int),
+ JC_NO_WAIT,
+ JC_MSG_PRI_NORMAL)) != JC_OK)
+ {
+ DBG_ERROR("RlcMacULActivityTimerExpiry: Unable to send message status(%x)\n",
+ status);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
diff --git a/data/mnet/GP10/Host/Rlc_mac/src_init/Makefile b/data/mnet/GP10/Host/Rlc_mac/src_init/Makefile
new file mode 100644
index 0000000..70916a1
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src_init/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = Rlc_mac
+THIS_DIRECTORY = src_init
+MY_OUTPUT = $(OBJDIR)\Rlc_mac_init.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) .\bin\*.o
+ $(RM) .\bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/src_init/RlcMacInit.cpp b/data/mnet/GP10/Host/Rlc_mac/src_init/RlcMacInit.cpp
new file mode 100644
index 0000000..78b80c7
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/src_init/RlcMacInit.cpp
@@ -0,0 +1,21 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// File : RlcMacInit.cpp
+// Author(s) : Tim Olson
+// Create Date : 6/5/2000
+// Description :
+//
+// *******************************************************************
+
+
+#include "RlcMacTask.h"
+
+// Global variable for Message Queue
+RlcMacTask *RlcMacTask::theRlcMacTask = 0;
diff --git a/data/mnet/GP10/Host/Rlc_mac/test/Makefile b/data/mnet/GP10/Host/Rlc_mac/test/Makefile
new file mode 100644
index 0000000..597e4d5
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/test/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = test
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\rlc_mac_test.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) .\bin\*.o
+ $(RM) .\bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/test/MsgTest.cpp b/data/mnet/GP10/Host/Rlc_mac/test/MsgTest.cpp
new file mode 100644
index 0000000..beb7dab
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/test/MsgTest.cpp
@@ -0,0 +1,1041 @@
+#include "MsgPacketAccessReject.h"
+#include "MsgPacketDownlinkAssignment.h"
+#include "MsgPacketPagingRequest.h"
+#include "MsgPacketPDCHRelease.h"
+#include "MsgPacketPollingRequest.h"
+#include "MsgPacketPowerCtlTimingAdvance.h"
+#include "MsgPacketTBFRelease.h"
+#include "MsgPacketDownlinkDummyControlBlock.h"
+#include "MsgPacketUplinkAssignment.h"
+#include "MsgPacketTimeslotReconfigure.h"
+#include "MsgPacketUplinkAckNack.h"
+#include "MsgPacketCellChangeFailure.h"
+#include "MsgPacketControlAcknowledgement.h"
+#include "MsgPacketDownlinkAckNack.h"
+#include "MsgPacketUplinkDummyControlBlock.h"
+#include "MsgPacketResourceRequest.h"
+#include "MsgPacketMobileTBFStatus.h"
+
+// *******************************************************************
+// PACKET ACCESS REJECT
+//
+// GSM 04.60 11.2.1
+//
+// < Packet Access Reject message content > ::=
+// < PAGE_MODE : bit (2) >
+// < Reject : < Reject struct > >
+// { { 1 < Additional Reject: < Reject struct > > } ** 0
+// < padding bits > } // -- truncation at end of message allowed, bits '0' assumed
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// < Reject struct > ::=
+// { 0 < TLLI : bit (32) >
+// | 1 { 0 < Packet Request Reference : < Packet Request Reference IE > >
+// | 1 < Global TFI : < Global TFI IE > > } }
+// { 0 | 1 < WAIT_INDICATION : bit (8) >
+// < WAIT _INDICATION_SIZE : bit (1) > }
+// ! < Ignore : bit (*) = <no string> > ;
+//
+// *******************************************************************
+void TestPacketAccessRejectMsg()
+{
+ BitStreamOut outStream;
+
+ MsgPacketAccessReject packetAccessRejectMsg;
+
+ packetAccessRejectMsg.pageMode.SetPageMode(PageMode::EXTENDED_PAGING);
+ packetAccessRejectMsg.reject.tlli.SetTLLI(0x1234);
+ packetAccessRejectMsg.reject.waitInd.SetWaitIndication(200, WaitIndication::UNITS_OF_SECONDS);
+
+ packetAccessRejectMsg.EncodeMsg(outStream);
+ packetAccessRejectMsg.DisplayMsgShort(&outStream);
+ packetAccessRejectMsg.DisplayMsgDetail();
+
+ packetAccessRejectMsg.pageMode.SetPageMode(PageMode::NORMAL_PAGING);
+ packetAccessRejectMsg.reject.tlli.ClearTLLI();
+ packetAccessRejectMsg.reject.packetReqRef.SetPacketReqRef(0x12,1,2,3);
+ packetAccessRejectMsg.reject.waitInd.SetWaitIndication(200, WaitIndication::UNITS_OF_20_MS);
+
+ outStream.ClearBitStream();
+ packetAccessRejectMsg.EncodeMsg(outStream);
+ packetAccessRejectMsg.DisplayMsgShort(&outStream);
+ packetAccessRejectMsg.DisplayMsgDetail();
+
+ packetAccessRejectMsg.pageMode.SetPageMode(PageMode::PAGING_REORGANIZATION);
+ packetAccessRejectMsg.reject.packetReqRef.ClearPacketReqRef();
+ packetAccessRejectMsg.reject.waitInd.ClearWaitIndication();
+ packetAccessRejectMsg.reject.globalTFI.SetGlobalTFI(18, GlobalTFI::UPLINK_TFI);
+
+ outStream.ClearBitStream();
+ packetAccessRejectMsg.EncodeMsg(outStream);
+ packetAccessRejectMsg.DisplayMsgShort(&outStream);
+ packetAccessRejectMsg.DisplayMsgDetail();
+
+ packetAccessRejectMsg.pageMode.SetPageMode(PageMode::PAGING_SAME_AS_BEFORE);
+ packetAccessRejectMsg.additionalReject.globalTFI.SetGlobalTFI(18, GlobalTFI::DOWNLINK_TFI);
+ packetAccessRejectMsg.additionalReject.isValid = TRUE;
+
+ outStream.ClearBitStream();
+ packetAccessRejectMsg.EncodeMsg(outStream);
+ packetAccessRejectMsg.DisplayMsgShort(&outStream);
+ packetAccessRejectMsg.DisplayMsgDetail();
+}
+
+// *******************************************************************
+// PACKET DOWNLINK ASSIGNMENT
+//
+// GSM 04.60 11.2.7
+//
+// < Packet Downlink Assignment message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 | 1 <PERSISTENCE_LEVEL : bit (4) > * 4 }
+// { { 0 < Global TFI : < Global TFI IE > >
+// | 10 < TLLI : bit (32) > }
+// { 0 -- Message escape
+// { < MAC_MODE : bit (2) >
+// < RLC_MODE : bit (1) >
+// < CONTROL_ACK : bit (1) >
+// < TIMESLOT_ALLOCATION : bit (8) >
+// < Packet Timing Advance : < Packet Timing Advance IE > >
+// { 0 | 1 < P0 : bit (4) >
+// < BTS_PWR_CTRL_MODE : bit (1) >
+// < PR_MODE : bit (1) >}
+// { { 0 | 1 < Frequency Parameters : < Frequency Parameters IE > > }
+// { 0 | 1 < DOWNLINK_TFI_ASSIGNMENT : bit (5) > }
+// { 0 | 1 < Power Control Parameters : < Power Control Parameters IE > > }
+// { 0 | 1 < TBF Starting Time : < Starting Frame Number Description IE > > }
+// { 0 | 1 < Measurement Mapping : < Measurement Mapping struct > > }
+// < padding bits > } // -- truncation at end of message allowed, bits '0' assumed
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Message escape : 1 bit (*) = <no string> > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// < Measurement Mapping struct > ::=
+// < Measurement Starting Time : < Starting Frame Number Description IE > >
+// < MEASUREMENT_INTERVAL : bit (5) >
+// < MEASUREMENT_BITMAP : bit (8) > ;
+//
+// *******************************************************************
+void TestPacketDownlinkAssignmentMsg()
+{
+ BitStreamOut outStream;
+
+ MsgPacketDownlinkAssignment packetDlAssignMsg;
+
+ packetDlAssignMsg.pageMode.SetPageMode(PageMode::NORMAL_PAGING);
+ unsigned char persLev[4] = {1,2,3,4};
+ packetDlAssignMsg.persistenceLevel.SetPersistenceLevel(persLev);
+ packetDlAssignMsg.tlli.SetTLLI(0x1234);
+ packetDlAssignMsg.macMode.SetMacMode(MacMode::DYNAMIC_ALLOCATION);
+ packetDlAssignMsg.rlcMode.SetRlcMode(RlcMode::RLC_ACKNOWLEDGED);
+ packetDlAssignMsg.controlAck = FALSE;
+ packetDlAssignMsg.tsAllocation.SetTimeslotAllocation(0x4);
+ packetDlAssignMsg.timingAdvance.SetPacketTimingAdvance(1);
+ packetDlAssignMsg.PwrParams.po.SetPO(9);
+ packetDlAssignMsg.PwrParams.pCtlMode.SetBtsPowerCtlMode(BtsPowerCtlMode::MODE_A);
+ packetDlAssignMsg.PwrParams.prMode.SetPRMode(PRMode::PR_MODE_B_ALL_MS);
+ packetDlAssignMsg.PwrParams.isValid = TRUE;
+ packetDlAssignMsg.frequencyParameters.tsc.SetTSC(5);
+ packetDlAssignMsg.frequencyParameters.arfcn.SetARFCN(585);
+ packetDlAssignMsg.frequencyParameters.SetFrequencyParameters();
+ packetDlAssignMsg.dlTFIAssignment.SetTFI(18);
+ GammaStruct gammas[8] = {{1,1},{1,2},{0,3},{1,4},{1,5},{1,6},{1,7},{1,8}};
+ packetDlAssignMsg.powerControlParameters.SetPowerControlParameters(3, gammas);
+ packetDlAssignMsg.tbfStartingTime.SetStartFrameNum(1,2,3);
+ packetDlAssignMsg.measMapping.measStartTime.SetStartFrameNum(4,5,6);
+ packetDlAssignMsg.measMapping.measInterval = 5;
+ packetDlAssignMsg.measMapping.measBitMap = 10;
+ packetDlAssignMsg.measMapping.isValid = TRUE;
+
+ packetDlAssignMsg.EncodeMsg(outStream);
+ packetDlAssignMsg.DisplayMsgShort(&outStream);
+ packetDlAssignMsg.DisplayMsgDetail();
+}
+
+
+
+// *******************************************************************
+// PACKET PAGING REQUEST
+//
+// GSM 04.60 11.2.10
+//
+// < Packet Paging Request message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 | 1 < PERSISTENCE_LEVEL : bit (4) >* 4}
+// { 0 | 1 < NLN : bit (2) > }
+// { { 1 < Repeated Page info : < Repeated Page info struct > > } ** 0
+// < padding bits > } // -- truncation at end of message allowed, bits '0' assumed
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// < Repeated Page info struct > ::=
+// { 0 -- Page request for TBF establishment
+// { 0 < PTMSI : bit (32) >
+// | 1 < Length of Mobile Identity contents : bit (4) >
+// < Mobile Identity : octet (val (Length of Mobile Identity contents)) > }
+// | 1 -- Page request for RR conn. establishment
+// { 0 < TMSI : bit (32) >
+// | 1 < Length of Mobile Identity contents : bit (4) >
+// < Mobile Identity : octet (val (Length of Mobile Identity contents)) > }
+// < CHANNEL_NEEDED : bit (2) >
+// { 0 | 1 < eMLPP_PRIORITY : bit (3) > } }
+// ! < Ignore : bit (*) = <no string> > ;
+//
+// *******************************************************************
+void TestPacketPagingRequestMsg()
+{
+ BitStreamOut outStream;
+
+ MsgPacketPagingRequest packetPageReqMsg;
+
+ packetPageReqMsg.pageMode.SetPageMode(PageMode::NORMAL_PAGING);
+ unsigned char persLev[4] = {1,2,3,4};
+ packetPageReqMsg.persistenceLevel.SetPersistenceLevel(persLev);
+ packetPageReqMsg.nln.SetNLN(2);
+ packetPageReqMsg.RepeatedPageInfo[0].TBFPage.ptmsi.SetPTMSI(0x1234abcd);
+ packetPageReqMsg.RepeatedPageInfo[0].TBFPage.isValid = TRUE;
+ packetPageReqMsg.RepeatedPageInfo[0].isValid = TRUE;
+ unsigned char imsi[15] = {0,1,2,3,4,5,6,7,8,9,0,1,2,3,4};
+ packetPageReqMsg.RepeatedPageInfo[1].TBFPage.mobileId.SetMobileIdentity(
+ MobileIdentity::IMSI, 15, imsi);
+ packetPageReqMsg.RepeatedPageInfo[1].TBFPage.isValid = TRUE;
+ packetPageReqMsg.RepeatedPageInfo[1].isValid = TRUE;
+ packetPageReqMsg.RepeatedPageInfo[3].RRConnPage.tmsi.SetTMSI(0xa5a5a5a5);
+ packetPageReqMsg.RepeatedPageInfo[3].RRConnPage.chanNeeded.SetChannelNeeded(
+ ChannelNeeded::TCH_F_FULL_RATE);
+ packetPageReqMsg.RepeatedPageInfo[3].RRConnPage.isValid = TRUE;
+ packetPageReqMsg.RepeatedPageInfo[3].isValid = TRUE;
+
+ packetPageReqMsg.RepeatedPageInfo[2].RRConnPage.mobileId.SetMobileIdentity(
+ MobileIdentity::TMSI_PTMSI, 0xf0f0f0f0);
+ packetPageReqMsg.RepeatedPageInfo[2].RRConnPage.chanNeeded.SetChannelNeeded(
+ ChannelNeeded::ANY_CHANNEL);
+ packetPageReqMsg.RepeatedPageInfo[2].RRConnPage.emlpPriority.SeteMLPPPriority(
+ eMLPPPriority::CALL_PRIORITY_LEVEL_A);
+ packetPageReqMsg.RepeatedPageInfo[2].RRConnPage.isValid = TRUE;
+ packetPageReqMsg.RepeatedPageInfo[2].isValid = TRUE;
+
+ packetPageReqMsg.EncodeMsg(outStream);
+ packetPageReqMsg.DisplayMsgShort(&outStream);
+ packetPageReqMsg.DisplayMsgDetail();
+}
+
+
+// *******************************************************************
+// PACKET PDCH RELEASE
+//
+// GSM 04.60 11.2.11
+//
+// < Packet PDCH Release message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 | 1 < TIMESLOTS_AVAILABLE : bit (8) > }
+// < padding bits >
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// *******************************************************************
+void TestPacketPDCHReleaseMsg()
+{
+ BitStreamOut outStream;
+
+ MsgPacketPDCHRelease packetPDCHRelMsg;
+
+ packetPDCHRelMsg.pageMode.SetPageMode(PageMode::NORMAL_PAGING);
+ packetPDCHRelMsg.tsAllocation.SetTimeslotAllocation(0x2);
+
+ packetPDCHRelMsg.EncodeMsg(outStream);
+ packetPDCHRelMsg.DisplayMsgShort(&outStream);
+ packetPDCHRelMsg.DisplayMsgDetail();
+}
+
+
+// *******************************************************************
+// PACKET POLLING REQUEST
+//
+// GSM 04.60 11.2.12
+//
+// < Packet Polling Request message content > ::=
+// < PAGE_MODE : bit (2) >
+// { { 0 < Global TFI : < Global TFI IE > >
+// | 10 < TLLI : bit (32) >
+// | 110 < TQI : bit (16) > }
+// < TYPE_OF_ACK : bit (1) >
+// { < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// *******************************************************************
+void TestPacketPollingRequestMsg()
+{
+ BitStreamOut outStream;
+
+ MsgPacketPollingRequest packetPollReqMsg;
+
+ packetPollReqMsg.pageMode.SetPageMode(PageMode::NORMAL_PAGING);
+ packetPollReqMsg.tqi.SetTQI(0xfefe);
+ packetPollReqMsg.typeOfAck = MsgPacketPollingRequest::ACK_MSG_RLCMAC_CONTROL_BLOCK;
+
+ packetPollReqMsg.EncodeMsg(outStream);
+ packetPollReqMsg.DisplayMsgShort(&outStream);
+ packetPollReqMsg.DisplayMsgDetail();
+}
+
+
+// *******************************************************************
+// PACKET POWER CONTROL / TIMING ADVANCE
+//
+// GSM 04.60 11.2.13
+//
+// < Packet Power Control/Timing Advance message content > ::=
+// < PAGE_MODE : bit (2) >
+// { { 0 < Global TFI : < Global TFI IE > >
+// | 110 < TQI : bit (16) >
+// | 111 < Packet Request Reference : < Packet Request Reference IE > > }
+// { 0 -- Message escape
+// { { 0 | 1 < Global Power Control Parameters : < Global Power Control Parameters IE >> }
+// { 0 < Global Packet Timing Advance : < Global Packet Timing Advance IE > >
+// < Power Control Parameters : < Power Control Parameters IE > >
+// | 1 { 0 < Global Packet Timing Advance : < Global Packet Timing Advance IE > >
+// | 1 < Power Control Parameters : < Power Control parameters IE > > } }
+// < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Message escape : 1 bit (*) = <no string> > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// *******************************************************************
+void TestPacketPowerCtlTimingAdvanceMsg()
+{
+ BitStreamOut outStream;
+
+ MsgPacketPowerCtlTimingAdvance packetPwrTAMsg;
+
+ packetPwrTAMsg.pageMode.SetPageMode(PageMode::NORMAL_PAGING);
+ packetPwrTAMsg.tqi.SetTQI(0xabcd);
+ packetPwrTAMsg.globalPowerControlParams.SetAlpha(12);
+ packetPwrTAMsg.globalPowerControlParams.SetTAvgW(28);
+ packetPwrTAMsg.globalPowerControlParams.SetTAvgT(18);
+ packetPwrTAMsg.globalPowerControlParams.SetPb(6);
+ packetPwrTAMsg.globalPowerControlParams.SetPcMeasChan(
+ GlobalPowerControlParms::DL_MEAS_ON_BCCH);
+ packetPwrTAMsg.globalPowerControlParams.SetNAvgI(7);
+ packetPwrTAMsg.globalPowerControlParams.SetIntMeasChanAvail(
+ GlobalPowerControlParms::PSI4_MSG_BROADCAST);
+ packetPwrTAMsg.globalPowerControlParams.SetGlobalPowerControlParms();
+ packetPwrTAMsg.globalTA.SetGlobalPacketTimingAdvanceUplink(3,1);
+ packetPwrTAMsg.globalTA.SetGlobalPacketTimingAdvanceDownlink(5,2);
+
+ packetPwrTAMsg.EncodeMsg(outStream);
+ packetPwrTAMsg.DisplayMsgShort(&outStream);
+ packetPwrTAMsg.DisplayMsgDetail();
+}
+
+
+// *******************************************************************
+// PACKET TBF RELEASE
+//
+// GSM 04.60 11.2.26
+//
+// < Packet TBF Release message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 < GLOBAL_TFI : Global TFI IE >
+// { < UPLINK_RELEASE : bit (1) >
+// < DOWNLINK_RELEASE : bit (1) >
+// < TBF_RELEASE_CAUSE : bit (4) = { 0000 | 0010 } >
+// < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// *******************************************************************
+void TestPakcetTBFReleaseMsg()
+{
+ BitStreamOut outStream;
+
+ MsgPacketTBFRelease packetTBFRelMsg;
+
+ packetTBFRelMsg.pageMode.SetPageMode(PageMode::NORMAL_PAGING);
+ packetTBFRelMsg.globalTFI.SetGlobalTFI(16, GlobalTFI::UPLINK_TFI);
+ packetTBFRelMsg.uplinkRel = MsgPacketTBFRelease::TBF_NOT_RELEASED;
+ packetTBFRelMsg.downlinkRel = MsgPacketTBFRelease::TBF_RELEASED;
+ packetTBFRelMsg.relCause = MsgPacketTBFRelease::NORMAL_RELEASE;
+
+ packetTBFRelMsg.EncodeMsg(outStream);
+ packetTBFRelMsg.DisplayMsgShort(&outStream);
+ packetTBFRelMsg.DisplayMsgDetail();
+}
+
+
+// *******************************************************************
+// PACKET DOWNLINK DUMMY CONTROL BLOCK
+//
+// GSM 04.60 11.2.7
+//
+// < Packet Downlink Dummy Control Block message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 | 1 <PERSISTENCE_LEVEL : bit (4) > * 4 }
+// < padding bits >
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// *******************************************************************
+void TestPacketDownlinkDummyControlBlockMsg()
+{
+ BitStreamOut outStream;
+
+ MsgPacketDownlinkDummyControlBlock packetDlDummyCtlBlk;
+
+ packetDlDummyCtlBlk.pageMode.SetPageMode(PageMode::NORMAL_PAGING);
+ unsigned char persLev[4] = {1,2,3,4};
+ packetDlDummyCtlBlk.persistenceLevel.SetPersistenceLevel(persLev);
+
+ packetDlDummyCtlBlk.EncodeMsg(outStream);
+ packetDlDummyCtlBlk.DisplayMsgShort(&outStream);
+ packetDlDummyCtlBlk.DisplayMsgDetail();
+}
+
+
+// *******************************************************************
+// PACKET UPLINK ASSIGNMENT
+//
+// GSM 04.60 11.2.29
+//
+// < Packet Uplink Assignment message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 | 1 <PERSISTENCE_LEVEL : bit (4) > * 4 }
+// { { 0 < Global TFI : < Global TFI IE > >
+// | 10 < TLLI : bit (32) >
+// | 110 < TQI : bit (16) >
+// | 111 < Packet Request Reference : < Packet Request Reference IE > > }
+// { 0 -- Message escape
+// { < CHANNEL_CODING_COMMAND : bit (2) >
+// < TLLI_BLOCK_CHANNEL_CODING : bit (1) >
+// < Packet Timing Advance : < Packet Timing Advance IE > >
+// { 0 | 1 < Frequency Parameters : < Frequency Parameters IE > > }
+// { 01 <Dynamic Allocation : < Dynamic Allocation struct > >
+// | 10 <Single Block Allocation : < Single Block Allocation struct > >
+// | 00 < extension >
+// | 11 < Fixed allocation : < Fixed Allocation struct > > }
+// < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Message escape : 1 bit (*) = <no string> > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// <extension> ::= -- Future extension can be done by modifying this structure
+// null ;
+//
+// <Dynamic Allocation struct > ::=
+// < Extended Dynamic Allocation : bit (1) >
+// { 0 | 1 < P0 : bit (4) >
+// < PR_MODE : bit (1) > }
+// < USF_GRANULARITY : bit (1) >
+// { 0 | 1 < UPLINK_TFI_ASSIGNMENT : bit (5) > }
+// { 0 | 1 < RLC_DATA_BLOCKS_GRANTED : bit (8) > }
+// { 0 | 1 < TBF Starting Time : < Starting Frame Number Description IE > > }
+// { 0 -- Timeslot Allocation
+// { 0 | 1 < USF_TN0 : bit (3) > }
+// { 0 | 1 < USF_TN1 : bit (3) > }
+// { 0 | 1 < USF_TN2 : bit (3) > }
+// { 0 | 1 < USF_TN3 : bit (3) > }
+// { 0 | 1 < USF_TN4 : bit (3) > }
+// { 0 | 1 < USF_TN5 : bit (3) > }
+// { 0 | 1 < USF_TN6 : bit (3) > }
+// { 0 | 1 < USF_TN7 : bit (3) > }
+// | 1 -- Timeslot Allocation with Power Control Parameters
+// < ALPHA : bit (4) >
+// { 0 | 1 < USF_TN0 : bit (3) >
+// < GAMMA_TN0 : bit (5) > }
+// { 0 | 1 < USF_TN1 : bit (3) >
+// < GAMMA_TN1 : bit (5) > }
+// { 0 | 1 < USF_TN2 : bit (3) >
+// < GAMMA_TN2 : bit (5) > }
+// { 0 | 1 < USF_TN3 : bit (3) >
+// < GAMMA_TN3 : bit (5) > }
+// { 0 | 1 < USF_TN4 : bit (3) >
+// < GAMMA_TN4 : bit (5) > }
+// { 0 | 1 < USF_TN5 : bit (3) >
+// < GAMMA_TN5 : bit (5) > }
+// { 0 | 1 < USF_TN6 : bit (3) >
+// < GAMMA_TN6 : bit (5) > }
+// { 0 | 1 < USF_TN7 : bit (3) >
+// < GAMMA_TN7 : bit (5) > } } ;
+//
+// <Single Block Allocation struct > ::=
+// < TIMESLOT_NUMBER : bit (3) >
+// { 0 | 1 < ALPHA : bit (4) >
+// < GAMMA_TN : bit (5) >}
+// { 0 | 1 < P0 : bit (4) >
+// < BTS_PWR_CTRL_MODE : bit (1) >
+// < PR_MODE : bit (1) > }
+// < TBF Starting Time : < Starting Frame Number Description IE > > ;
+//
+// <Fixed Allocation struct > ::=
+// { 0 | 1 < UPLINK_TFI_ASSIGNMENT : bit (5) > }
+// < FINAL_ALLOCATION : bit (1) >
+// < DOWNLINK_CONTROL_TIMESLOT: bit (3) >
+// { 0 | 1 < P0 : bit (4) >
+// < BTS_PWR_CTRL_MODE : bit (1) >
+// < PR_MODE : bit (1) > }
+// { 0 < TIMESLOT_ALLOCATION : bit (8) >
+// | 1 < Power Control Parameters : < Power Control Parameters IE > > }
+// < HALF_DUPLEX_MODE : bit (1) >
+// < TBF Starting Time : < Starting Frame Number Description IE > >
+// { 0 { 0 -- with length of Allocation Bitmap
+// < BLOCKS_OR_BLOCK_PERIODS : bit (1) >
+// < ALLOCATION_BITMAP_LENGTH : bit (7) >
+// < ALLOCATION_BITMAP : bit (val(ALLOCATION_BITMAP_LENGTH)) >
+// | 1 -- without length of Allocation Bitmap (fills remainder of the message)
+// < ALLOCATION_BITMAP : bit ** > }
+// ! < Message escape : 1 bit (*) = <no string> > } ;
+//
+// *******************************************************************
+void TestPacketUplinkAssignmentMsg()
+{
+ BitStreamOut outStream;
+
+ MsgPacketUplinkAssignment packetULAssignment;
+
+ packetULAssignment.pageMode.SetPageMode(PageMode::NORMAL_PAGING);
+ unsigned char persLev[4] = {1,2,3,4};
+ packetULAssignment.persistenceLevel.SetPersistenceLevel(persLev);
+ packetULAssignment.globalTFI.SetGlobalTFI(11, GlobalTFI::UPLINK_TFI);
+ packetULAssignment.chanCoding.SetChannelCodingCommand(
+ ChannelCodingCommand::CS_1);
+ packetULAssignment.tlliBlockCoding =
+ MsgPacketUplinkAssignment::USE_CS1_FOR_DATA_BLK_WITH_TLLI;
+ packetULAssignment.timingAdvance.SetPacketTimingAdvance(0);
+ packetULAssignment.dynamicAllocation.allocType =
+ DynamicAllocationStruct::EXTENDED_DYNAMIC_ALLOCATION;
+ packetULAssignment.dynamicAllocation.usfGranularity =
+ DynamicAllocationStruct::ONE_RLC_MAC_BLOCK;
+ packetULAssignment.dynamicAllocation.uplinkTFI.SetTFI(22);
+ packetULAssignment.dynamicAllocation.rlcBlocksGranted.SetRLCBlocksGranted(100);
+ packetULAssignment.dynamicAllocation.timeslotAllocation.isValid = TRUE;
+ TimeslotAllocationEntry entries[8] = {{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{1,7}};
+ packetULAssignment.dynamicAllocation.timeslotAllocation.tsAllocEntry = entries;
+ packetULAssignment.dynamicAllocation.isValid = TRUE;
+
+ packetULAssignment.EncodeMsg(outStream);
+ packetULAssignment.DisplayMsgShort(&outStream);
+ packetULAssignment.DisplayMsgDetail();
+}
+
+
+// *******************************************************************
+// PACKET TIMESLOT RECONFIGURE
+//
+// GSM 04.60 11.2.31
+//
+// < Packet Timeslot Reconfigure message content > ::=
+// < PAGE_MODE : bit (2) >
+// { 0 < GLOBAL_TFI : < Global TFI IE > >
+// { 0 -- Message escape
+// { < CHANNEL_CODING_COMMAND : bit (2) >
+// < Global Packet Timing Advance : < Global Packet Timing Advance IE > >
+// < DOWNLINK_RLC_MODE : bit (1) >
+// < CONTROL_ACK : bit (1) >
+// { 0 | 1 < DOWNLINK_TFI_ASSIGNMENT : bit (5) > }
+// { 0 | 1 < UPLINK_TFI_ASSIGNMENT : bit (5) > }
+// < DOWNLINK_TIMESLOT_ALLOCATION : bit (8) >
+// { 0 | 1 < Frequency Parameters : < Frequency Parameters IE > > }
+// { 0 < Dynamic Allocation : < Dynamic Allocation struct > >
+// | 1 < Fixed allocation : < Fixed Allocation struct > >}
+// < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Message escape : 1 bit (*) = <no string> > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// <Dynamic Allocation struct > ::=
+// < Extended Dynamic Allocation : bit (1) >
+// { 0 | 1 < P0 : bit (4) >
+// < PR_MODE : bit (1) > }
+// < USF_GRANULARITY : bit (1) >
+// { 0 | 1 < RLC_DATA_BLOCKS_GRANTED : bit (8) > }
+// { 0 | 1 < TBF Starting Time : < Starting Frame Number Description IE > > }
+// { 0 -- Timeslot Allocation
+// { 0 | 1 < USF_TN0 : bit (3) > }
+// { 0 | 1 < USF_TN1 : bit (3) > }
+// { 0 | 1 < USF_TN2 : bit (3) > }
+// { 0 | 1 < USF_TN3 : bit (3) > }
+// { 0 | 1 < USF_TN4 : bit (3) > }
+// { 0 | 1 < USF_TN5 : bit (3) > }
+// { 0 | 1 < USF_TN6 : bit (3) > }
+// { 0 | 1 < USF_TN7 : bit (3) > }
+// | 1 -- Timeslot Allocation with Power Control Parameters
+// < ALPHA : bit (4) >
+// { 0 | < USF_TN0 : bit (3) >
+// < GAMMA_TN0 : bit (5) > }
+// { 0 | 1 < USF_TN1 : bit (3) >
+// < GAMMA_TN1 : bit (5) > }
+// { 0 | 1 < USF_TN2 : bit (3) >
+// < GAMMA_TN2 : bit (5) > }
+// { 0 | 1 < USF_TN3 : bit (3) >
+// < GAMMA_TN3 : bit (5) > }
+// { 0 | 1 < USF_TN4 : bit (3) >
+// < GAMMA_TN4 : bit (5) > }
+// { 0 | 1 < USF_TN5 : bit (3) >
+// < GAMMA_TN5 : bit (5) > }
+// { 0 | 1 < USF_TN6 : bit (3) >
+// < GAMMA_TN6 : bit (5) > }
+// { 0 | 1 < USF_TN7 : bit (3) >
+// < GAMMA_TN7 : bit (5) > } } ;
+//
+// <Fixed Allocation struct > ::=
+// { 0 < UPLINK_TIMESLOT_ALLOCATION : bit (8) >
+// | 1 < Power Control Parameters : < Power Control Parameters IE > > }
+// < FINAL_ALLOCATION : bit (1) >
+// < DOWNLINK_CONTROL_TIMESLOT: bit (3) >
+// { 0 | 1 < P0 : bit (4) >
+// < BTS_PWR_CTRL_MODE : bit (1) >
+// < PR_MODE : bit (1) > }
+// { 0 | 1 < Measurement Mapping : < Measurement Mapping struct > > }
+// < TBF Starting Time : < Starting Frame Number Description IE > >
+// { 0 { 0 -- with length of Allocation Bitmap
+// < BLOCKS_OR_BLOCK_PERIODS : bit (1) >
+// < ALLOCATION_BITMAP_LENGTH : bit (7) >
+// < ALLOCATION_BITMAP : bit (val(ALLOCATION_BITMAP_LENGTH)) >
+// | 1 -- without length of Allocation Bitmap (fills remainder of the message)
+// < ALLOCATION_BITMAP : bit ** > }
+// ! < Message escape : 1 bit (*) = <no string> > } ;
+//
+// < Measurement Mapping struct > ::=
+// < Measurement Starting Time : < Starting Frame Number Description IE >
+// < MEASUREMENT_INTERVAL : bit (5) >
+// < MEASUREMENT_BITMAP : bit (8) > ;
+//
+// *******************************************************************
+void TestPacketTimeslotReconfigureMsg()
+{
+ BitStreamOut outStream;
+
+ MsgPacketTimeslotReconfigure packetTSRecon;
+
+ packetTSRecon.pageMode.SetPageMode(PageMode::NORMAL_PAGING);
+ packetTSRecon.globalTFI.SetGlobalTFI(11, GlobalTFI::UPLINK_TFI);
+ packetTSRecon.chanCoding.SetChannelCodingCommand(
+ ChannelCodingCommand::CS_4);
+ packetTSRecon.globalTimingAdvance.SetGlobalPacketTimingAdvanceUplink(0,2);
+ packetTSRecon.globalTimingAdvance.SetGlobalPacketTimingAdvanceDownlink(1,2);
+ packetTSRecon.dlRlcMode.SetRlcMode(RlcMode::RLC_UNACKNOWLEDGED);
+ packetTSRecon.controlAck = TRUE;
+ packetTSRecon.dlTfi.SetTFI(31);
+ packetTSRecon.dlTimeslotAllocation.SetTimeslotAllocation(3);
+ packetTSRecon.dynamicAllocation.allocType =
+ DynamicAllocationStruct::EXTENDED_DYNAMIC_ALLOCATION;
+ packetTSRecon.dynamicAllocation.usfGranularity =
+ DynamicAllocationStruct::ONE_RLC_MAC_BLOCK;
+ packetTSRecon.dynamicAllocation.uplinkTFI.SetTFI(22);
+ packetTSRecon.dynamicAllocation.rlcBlocksGranted.SetRLCBlocksGranted(100);
+ packetTSRecon.dynamicAllocation.timeslotAllocation.isValid = TRUE;
+ TimeslotAllocationEntry entries[8] = {{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{1,7}};
+ packetTSRecon.dynamicAllocation.timeslotAllocation.tsAllocEntry = entries;
+ packetTSRecon.dynamicAllocation.isValid = TRUE;
+
+ packetTSRecon.EncodeMsg(outStream);
+ packetTSRecon.DisplayMsgShort(&outStream);
+ packetTSRecon.DisplayMsgDetail();
+}
+
+
+// *******************************************************************
+// PACKET UPLINK ACK NACK
+//
+// GSM 04.60 11.2.28
+//
+// < Packet Uplink Ack/Nack message content > ::=
+// < PAGE MODE : bit (2) >
+// { 00 < UPLINK_TFI : bit (5) >
+// { 0 -- Message escape
+// { < CHANNEL_CODING_COMMAND : bit (2) >
+// < Ack/Nack Description : < Ack/Nack Description IE > >
+// { 0 | 1 < CONTENTION_RESOLUTION_TLLI : bit (32) > }
+// { 0 | 1 < Packet Timing Advance : < Packet Timing Advance IE > > }
+// { 0 | 1 < Power Control Parameters : < Power Control Parameters IE > > }
+// { 0 | 1 < Extension Bits : Extension Bits IE > } -- sub-clause 12.26
+// { 0 | 1 < Fixed Allocation Parameters : < Fixed Allocation struct > > }
+// < padding bits >
+// ! < Non-distribution part error : bit (*) = < no string > > }
+// ! < Message escape : 1 bit (*) = <no string> > }
+// ! < Address information part error : bit (*) = < no string > > }
+// ! < Distribution part error : bit (*) = < no string > > ;
+//
+// < Fixed Allocation struct > ::=
+// < FINAL_ALLOCATION : bit (1) >
+// { 0 -- Repeat Allocation
+// < TS_OVERRIDE : bit (8) >
+// | 1 -- Allocation with Allocation bitmap
+// < TBF Starting Time : < Starting Frame Number Description IE > >
+// { 0 | 1 <TIMESLOT_ALLOCATION : bit (8) > }
+// { 0 { 0 -- with length of Allocation Bitmap
+// < BLOCKS_OR_BLOCK_PERIODS : bit (1) >
+// < ALLOCATION_BITMAP_LENGTH : bit (7) >
+// < ALLOCATION_BITMAP : bit (val(ALLOCATION_BITMAP_LENGTH)) >
+// | 1 -- without length of Allocation Bitmap (fills remainder of the message)
+// < ALLOCATION_BITMAP : bit ** > } }
+// ! < Message escape : 1 bit (*) = <no string> >;
+//
+// *******************************************************************
+void TestPacketUplinkAckNackMsg()
+{
+ BitStreamOut outStream;
+
+ MsgPacketUplinkAckNack packetUplinkAckNack;
+
+ packetUplinkAckNack.pageMode.SetPageMode(PageMode::NORMAL_PAGING);
+ packetUplinkAckNack.uplinkTFI.SetTFI(0xd);
+ packetUplinkAckNack.chanCoding.SetChannelCodingCommand(
+ ChannelCodingCommand::CS_2);
+ unsigned char rrb[8] = {1, 2, 3, 4, 5, 6, 7, 8};
+ packetUplinkAckNack.ackNackDescription.SetAckNackDescription(AckNackDescription::TBF_COMPLETE,
+ (unsigned char)15, rrb);
+ packetUplinkAckNack.timingAdvance.SetPacketTimingAdvance(2);
+
+ packetUplinkAckNack.EncodeMsg(outStream);
+ packetUplinkAckNack.DisplayMsgShort(&outStream);
+ packetUplinkAckNack.DisplayMsgDetail();
+}
+
+
+
+// *******************************************************************
+// PACKET CELL CHANGE FAILURE
+//
+// GSM 04.60 11.2.26
+//
+// < Packet Cell Change Failure message content > ::=
+// < TLLI : bit (32) >
+// < ARFCN : bit (10) >
+// < BSIC : bit (6) >
+// < CAUSE : bit (4) >
+// < padding bits > ;
+//
+// *******************************************************************
+void TestPacketCellChangeFailureMsg()
+{
+ BitStreamOut outStream;
+ MsgPacketCellChangeFailure packetCellChangeFailure;
+
+ // Add msg type
+ outStream.InsertBits8(RlcMacMsgType::PACKET_CELL_CHANGE_FAILURE, 6);
+ // Add a tlli
+ outStream.InsertBits32(0xabcd, 32);
+ // Add ARFCN
+ outStream.InsertBits16(0x1f, 10);
+ // Add BSIC
+ outStream.InsertBits8(4, 6);
+ // Add cause
+ outStream.InsertBits8(0, 4);
+ outStream.PadToOctetBoundary();
+
+ BitStreamIn inStream(outStream.GetBitStream(), outStream.GetStreamLen());
+
+ packetCellChangeFailure.DecodeMsg(inStream);
+ packetCellChangeFailure.DisplayMsgShort(&outStream);
+ packetCellChangeFailure.DisplayMsgDetail();
+}
+
+
+// *******************************************************************
+// PACKET CONTROL ACKNOWLEDGEMENT
+//
+// GSM 04.60 11.2.2
+//
+// < Packet Control Acknowledgement message content > ::= -- RLC/MAC control block format
+// < TLLI : bit (32) >
+// < CTRL_ACK : bit (2) >
+// < padding bits > ;
+//
+// < Packet Control Acknowledgement 11 bit message > ::= -- 11-bit access burst format
+// < MESSAGE_TYPE : bit (9) == 1111 1100 1 >
+// < CTRL_ACK : bit (2) > ;
+//
+// < Packet Control Acknowledgement 8 bit message > ::= -- 8-bit access burst format
+// < MESSAGE_TYPE : bit (6) == 0111 11 >
+// < CTRL_ACK : bit (2) > ;
+//
+// *******************************************************************
+void TestPacketControlAcknowledgementMsg()
+{
+ BitStreamOut outStream;
+ MsgPacketControlAcknowledgement packetControlAcknowledgement;
+
+ // Add msg type
+ outStream.InsertBits8(RlcMacMsgType::PACKET_CONTROL_ACK, 6);
+ // Add a tlli
+ outStream.InsertBits32(0x1234abcd, 32);
+ // Add control ack
+ outStream.InsertBits8(1, 2);
+ outStream.PadToOctetBoundary();
+
+ BitStreamIn inStream(outStream.GetBitStream(), outStream.GetStreamLen());
+
+ packetControlAcknowledgement.DecodeMsg(inStream);
+ packetControlAcknowledgement.DisplayMsgShort(&outStream);
+ packetControlAcknowledgement.DisplayMsgDetail();
+}
+
+
+// *******************************************************************
+// PACKET DOWNLINK ACK NACK
+//
+// GSM 04.60 11.2.6
+//
+// < Packet Downlink Ack/Nack message content > ::=
+// < DOWNLINK_TFI : bit (5) >
+// < Ack/Nack Description : < Ack/Nack Description IE > >
+// { 0 | 1 < Channel Request Description : < Channel Request Description IE > > }
+// < Channel Quality Report : < Channel Quality Report struct > >
+// < padding bits > ;
+//
+// < Channel Quality Report struct > ::=
+// < C_VALUE : bit (6) >
+// < RXQUAL : bit (3) >
+// < SIGN_VAR : bit (6) >
+// { 0 | 1 < I_LEVEL_TN0 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN1 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN2 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN3 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN4 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN5 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN6 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN7 : bit (4) > } ;
+//
+// *******************************************************************
+void TestPacketDownlinkAckNackMsg()
+{
+ BitStreamOut outStream;
+ MsgPacketDownlinkAckNack packetDownlinkAckNack;
+
+ // Add msg type
+ outStream.InsertBits8(RlcMacMsgType::PACKET_DOWNLINK_ACK_NACK, 6);
+ // Add a downlink tfi
+ outStream.InsertBits8(0xa, 5);
+ // Add Ack/Nack Description
+ outStream.InsertBits8(AckNackDescription::TBF_INCOMPLETE, 1);
+ outStream.InsertBits8(0x35, 7);
+ unsigned char recBlkBmap[RRB_SIZE];
+ for (int i=0; i<RRB_SIZE; i++)
+ {
+ recBlkBmap[i] = i;
+ }
+ outStream.InsertBytesN(recBlkBmap, RRB_SIZE);
+
+ // Add in Channel Request Description
+ outStream.InsertBits8(1, 1);
+ outStream.InsertBits8(5, 4);
+ outStream.InsertBits8(0, 2);
+ outStream.InsertBits8(RlcMode::RLC_ACKNOWLEDGED, 1);
+ outStream.InsertBits8(ChannelRequestDescription::NOT_SACK_OR_ACK, 1);
+ outStream.InsertBits16(0x9876, 16);
+
+ // Add in Channel Quality Report
+ outStream.InsertBits8(1, 6);
+ outStream.InsertBits8(2, 3);
+ outStream.InsertBits8(3, 6);
+ for (i=0; i < MAX_TIMESLOTS-1; i++)
+ {
+ outStream.InsertBits8(0, 1);
+ }
+ outStream.InsertBits8(1, 1);
+ outStream.InsertBits8(3, 4);
+
+ outStream.PadToOctetBoundary();
+
+ BitStreamIn inStream(outStream.GetBitStream(), outStream.GetStreamLen());
+
+ packetDownlinkAckNack.DecodeMsg(inStream);
+ packetDownlinkAckNack.DisplayMsgShort(&outStream);
+ packetDownlinkAckNack.DisplayMsgDetail();
+}
+
+// *******************************************************************
+// PACKET UPLINK DUMMY CONTROL BLOCK
+//
+// GSM 04.60 11.2.8b
+//
+// < Packet Uplink Dummy Control Block message content > ::=
+// < TLLI : bit (32) >
+// < padding bits > ;
+//
+// *******************************************************************
+void TestPacketUplinkDummyControlBlockMsg()
+{
+ BitStreamOut outStream;
+ MsgPacketUplinkDummyControlBlock packetUplinkDummyControlBlock;
+
+ // Add msg type
+ outStream.InsertBits8(RlcMacMsgType::PACKET_UPLINK_DUMMY_CONTROL_BLOCK, 6);
+ // Add a downlink tlli
+ outStream.InsertBits32(0x1234abcd, 32);
+
+ outStream.PadToOctetBoundary();
+
+ BitStreamIn inStream(outStream.GetBitStream(), outStream.GetStreamLen());
+
+ packetUplinkDummyControlBlock.DecodeMsg(inStream);
+ packetUplinkDummyControlBlock.DisplayMsgShort(&outStream);
+ packetUplinkDummyControlBlock.DisplayMsgDetail();
+}
+
+
+// *******************************************************************
+// PACKET RESOURCE REQUEST
+//
+// GSM 04.60 11.2.16
+//
+// < Packet Resource Request message content > ::=
+// { 0 | 1 < ACCESS_TYPE : bit (2) > }
+// { 0 < Global TFI : < Global TFI IE > >
+// | 1 < TLLI : < TLLI IE > > }
+// { 0 | 1 < MS Radio Access Capability : < MS Radio Access Capability IE > > }
+// < Channel Request Description : < Channel Request Description IE > >
+// { 0 | 1 < CHANGE_MARK : bit (2) > }
+// < C_VALUE : bit (6) >
+// { 0 | 1 < SIGN_VAR : bit (6) >}
+// { 0 | 1 < I_LEVEL_TN0 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN1 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN2 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN3 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN4 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN5 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN6 : bit (4) > }
+// { 0 | 1 < I_LEVEL_TN7 : bit (4) > }
+// < padding bits > ;
+//
+// *******************************************************************
+void TestPacketResourceRequestMsg()
+{
+ BitStreamOut outStream;
+ MsgPacketResourceRequest packetResourceRequest;
+
+ // Add msg type
+ outStream.InsertBits8(RlcMacMsgType::PACKET_RESOURCE_REQUEST, 6);
+ // Add ACCESS_TYPE
+ outStream.InsertBits8(1,1);
+ outStream.InsertBits8(AccessType::TWO_PHASE,2);
+
+ // Add a downlink global tfi
+ outStream.InsertBits8(0,1);
+ outStream.InsertBits8(1,1);
+ outStream.InsertBits8(0x5, 5);
+ // Add MS Radio Access Capability
+ outStream.InsertBits8(1,1);
+ // Access Technology Type
+ outStream.InsertBits8(MSRadioAccessCapability::GSM_1900, 4);
+ // Length of Content Struct
+ outStream.InsertBits8(37,7);
+
+ // RF Power Capability
+ outStream.InsertBits8(2, 3);
+ // A5 bits
+ outStream.InsertBits8(1,1);
+ outStream.InsertBits8(0x60,7);
+ // ES IND
+ outStream.InsertBits8(MSRadioAccessCapability::EARLY_CLASSMARK_SENDING_NOT_IMPLEMENTED,1);
+ // PS
+ outStream.InsertBits8(MSRadioAccessCapability::PS_PRESENT,1);
+ // VGCS
+ outStream.InsertBits8(MSRadioAccessCapability::VGCS_CAPABILITY,1);
+ // VBS
+ outStream.InsertBits8(MSRadioAccessCapability::VBS_CAPABILITY,1);
+ // Multislot class
+ outStream.InsertBits8(1,1);
+ // HSCSD multislot class
+ outStream.InsertBits8(1,1);
+ outStream.InsertBits8(18,5);
+ // GPRS multislot class and GPRS Extended Dynamic Allocation Capability
+ outStream.InsertBits8(1,1);
+ outStream.InsertBits8(5,5);
+ outStream.InsertBits8(1,1);
+ // SMS_VALUE and SM_VALUE
+ outStream.InsertBits8(1,1);
+ outStream.InsertBits8(0xf,4);
+ outStream.InsertBits8(0,4);
+
+ // Only one MS RA capability value part struct
+ outStream.InsertBits8(0,1);
+
+ // Add in Channel Request Description
+ outStream.InsertBits8(5, 4);
+ outStream.InsertBits8(0, 2);
+ outStream.InsertBits8(RlcMode::RLC_ACKNOWLEDGED, 1);
+ outStream.InsertBits8(ChannelRequestDescription::NOT_SACK_OR_ACK, 1);
+ outStream.InsertBits16(0x9876, 16);
+
+ // Add in Change Mark
+ outStream.InsertBits8(1, 1);
+ outStream.InsertBits8(1, 2);
+ // Add in C_VALUE
+ outStream.InsertBits8(2, 6);
+ // Add in SIGN_VAR
+ outStream.InsertBits8(1, 1);
+ outStream.InsertBits8(0x12, 6);
+ // Add in I_LEVEL_TNX values
+ outStream.InsertBits8(1, 1);
+ outStream.InsertBits8(1, 4);
+ for (int i=1; i < MAX_TIMESLOTS; i++)
+ {
+ outStream.InsertBits8(0, 1);
+ }
+
+ outStream.PadToOctetBoundary();
+
+ BitStreamIn inStream(outStream.GetBitStream(), outStream.GetStreamLen());
+
+ packetResourceRequest.DecodeMsg(inStream);
+ packetResourceRequest.DisplayMsgShort(&outStream);
+ packetResourceRequest.DisplayMsgDetail();
+}
+
+// *******************************************************************
+// PACKET MOBILE TBF STATUS
+//
+// GSM 04.60 11.2.9c
+//
+// < Packet Mobile TBF Status message content > ::=
+// < GLOBAL TFI : < Global TFI IE > >
+// < TBF_CAUSE : bit (3) >
+// { 0 | 1 < STATUS_MESSAGE_TYPE : bit (6) > }
+// < padding bits > ;
+//
+// *******************************************************************
+void TestPacketMobileTBFStatusMsg()
+{
+ BitStreamOut outStream;
+ MsgPacketMobileTBFStatus packetMobileTBFStatus;
+
+ // Add msg type
+ outStream.InsertBits8(RlcMacMsgType::PACKET_MOBILE_TBF_STATUS, 6);
+ // Add a uplink global tfi
+ outStream.InsertBits8(0,1);
+ outStream.InsertBits8(0x12, 5);
+ // Add TBF_CAUSE
+ outStream.InsertBits8(MsgPacketMobileTBFStatus::NON_DISTRIBUTION_TYPE,3);
+ // Add STATUS_MESSAGE_TYPE
+ outStream.InsertBits8(1,1);
+ outStream.InsertBits8(RlcMacMsgType::PACKET_TIMESLOT_RECONFIGURE, 6);
+
+ outStream.PadToOctetBoundary();
+
+ BitStreamIn inStream(outStream.GetBitStream(), outStream.GetStreamLen());
+
+ packetMobileTBFStatus.DecodeMsg(inStream);
+ packetMobileTBFStatus.DisplayMsgShort(&outStream);
+ packetMobileTBFStatus.DisplayMsgDetail();
+}
+
+
+void RlcMacMsgTest()
+{
+ TestPacketAccessRejectMsg() ;
+ TestPacketDownlinkAssignmentMsg();
+ TestPacketPagingRequestMsg();
+}
+
+
+
+void RlcMacIeTest()
+{
+
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Rlc_mac/test/testStart b/data/mnet/GP10/Host/Rlc_mac/test/testStart
new file mode 100644
index 0000000..ee4cc53
--- /dev/null
+++ b/data/mnet/GP10/Host/Rlc_mac/test/testStart
@@ -0,0 +1,21 @@
+
+# load viperLoad, viperLoadList functions
+load_path = malloc(150);
+strcpy(load_path, getenv("VIPERCALL_BASE"))
+strcat(load_path, "/Bin/load_module.out")
+ld(0, 0, load_path)
+
+taskDelay(10)
+
+# load applications
+viperLoadList("Scripts/module_list", getenv("VIPERCALL_BASE"), 1)
+
+ld 1,1,"/ata/vipercall/bin/rlc_mac.out"
+ld 1,1,"/ata/vipercall/bin/rlc_mac_test.out"
+
+SysCommand_Log 1
+
+SetModuleLogOptions 350,0x1f3
+SetModuleLogOptions 351,0x1f3
+SetModuleLogOptions 352,0x1f3
+
diff --git a/data/mnet/GP10/Host/Root/Makefile b/data/mnet/GP10/Host/Root/Makefile
new file mode 100644
index 0000000..6be70f9
--- /dev/null
+++ b/data/mnet/GP10/Host/Root/Makefile
@@ -0,0 +1,16 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src src_api
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ $(CP) bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Root/include/RootTask.h b/data/mnet/GP10/Host/Root/include/RootTask.h
new file mode 100644
index 0000000..c6a4f0e
--- /dev/null
+++ b/data/mnet/GP10/Host/Root/include/RootTask.h
@@ -0,0 +1,55 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : RootTask.h
+// Author(s) : Tim Olson
+// Create Date : 9/18/2000
+// Description :
+//
+// *******************************************************************
+#ifndef _ROOTTASK_H_
+#define _ROOTTASK_H_ /* include once only */
+
+#include "JCErr.h"
+#include "AlarmCode.h"
+
+
+class RootTask {
+public:
+
+ ~RootTask();
+
+ static int InitRootTask();
+ static void RootRebootHook();
+ static int RootMain(void);
+
+ void InitializeSystemModuleList();
+ JC_STATUS SetSelfRebootMode(bool mode);
+ void EngageSelfReboot(int i);
+ void UpdateRadioBoardEeprom();
+ void WaitForModuleStatusCheck();
+ short CheckForMCHTest();
+ void SendAlarm(Alarm_errorCode_t err_code, int arg1, int arg2);
+
+ static RootTask *theRootTask;
+
+private:
+ static bool isOneCreated;
+
+ // Disallow the following functions
+ RootTask();
+ RootTask(const RootTask&);
+ RootTask& operator=(const RootTask&);
+ int operator== (const RootTask&) const;
+};
+
+
+#endif
diff --git a/data/mnet/GP10/Host/Root/src/Makefile b/data/mnet/GP10/Host/Root/src/Makefile
new file mode 100644
index 0000000..39959da
--- /dev/null
+++ b/data/mnet/GP10/Host/Root/src/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = Root
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\$(THIS_APP_DIR).out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Root/src/RootTask.cpp b/data/mnet/GP10/Host/Root/src/RootTask.cpp
new file mode 100644
index 0000000..6ff68f0
--- /dev/null
+++ b/data/mnet/GP10/Host/Root/src/RootTask.cpp
@@ -0,0 +1,601 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : RootTask.cpp
+// Author(s) : Tim Olson
+// Create Date : 10/18/2000
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+#include <stdio.h>
+#include <rebootLib.h>
+#include <sysLib.h>
+#include <rebootLib.h>
+#include "RootTask.h"
+#include "GP10OsTune.h"
+#include "Os/JCModule.h"
+#include "Os/JCTask.h"
+#include "MCH/post.h"
+#include "oam_api.h"
+
+// *******************************************************************
+// external routines declarations.
+// *******************************************************************
+// SysCommand
+extern int SysCommand_Log (T_SYS_CMD action);
+extern int SysCommand_Alarm (T_SYS_CMD action);
+extern int SysCommand_MCH (T_SYS_CMD action);
+extern int SysCommand_Lapdm (T_SYS_CMD action);
+extern int SysCommand_Voip (T_SYS_CMD action);
+extern int SysCommand_VChan (T_SYS_CMD action);
+extern int SysCommand_Ludb (T_SYS_CMD action);
+extern int SysCommand_MM (T_SYS_CMD action);
+extern int SysCommand_CC (T_SYS_CMD action);
+extern int SysCommand_L1Proxy (T_SYS_CMD action);
+extern int SysCommand_MD (T_SYS_CMD action);
+extern int SysCommand_RM (T_SYS_CMD action);
+extern int SysCommand_PM (T_SYS_CMD action);
+extern int SysCommand_CDR (T_SYS_CMD action);
+extern int SysCommand_TcpSrv (T_SYS_CMD action);
+extern int SysCommand_VBLink (T_SYS_CMD action);
+extern int SysCommand_RlcMac (T_SYS_CMD action);
+extern int SysCommand_GRR (T_SYS_CMD action);
+extern int SysCommand_BSSGP (T_SYS_CMD action);
+extern int SysCommand_GSLink (T_SYS_CMD action);
+
+extern void go (unsigned int port);
+extern STATUS RestoreEepromFromNVRam(void);
+extern STATUS CheckEeprom(void);
+extern "C" STATUS SaveEepromInNVRam(void);
+extern void csu_TblInitAll(void); /* from \GP10\Host\CsuNew\src\csu_table.cpp */
+
+#define L1PROXY_DSP_PORT0 0
+#define L1PROXY_DSP_PORT1 1
+
+#define EEPROM_STATUS_OK 0
+#define EEPROM_STATUS_UPDATE 1
+#define EEPROM_STATUS_REPORT_ERROR 2
+
+// Flag used to indicate that the one and only root task
+// has been created.
+bool RootTask::isOneCreated = FALSE;
+
+// Pointer to the one and only root task object.
+RootTask *RootTask::theRootTask = 0;
+
+// flags
+short gRebootDelayInSec = 10;
+short gModuleCheckDelayInSec = 10;
+
+int isSelfRebootEnabled = TRUE;
+
+// reboot status flag
+static BOOL isSystemRebooting = FALSE;
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RootTask::RootTask
+**
+** PURPOSE: RootTask constructor.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+RootTask::RootTask()
+{
+ isSystemRebooting = FALSE;
+ isOneCreated = TRUE;
+
+ if(rebootHookAdd((FUNCPTR)RootTask::RootRebootHook) != OK){
+ printf("[RootTask] couldn't add reboot hook!\n");
+ }
+
+ // Create the task sync semaphore.
+ pMnetSyncSem = new SEM_ID;
+ *pMnetSyncSem = semBCreate(SEM_Q_FIFO, SEM_EMPTY);
+
+ // Update tNetTask priority.
+ taskPrioritySet(taskNameToId("tNetTask"), NET_TASK_PRIORITY);
+
+ // create RootTask
+ if(taskSpawn("RootTask",
+ ROOT_TASK_PRIORITY1,
+ ROOT_TASK_OPTION,
+ ROOT_TASK_STACK_SIZE,
+ (FUNCPTR) RootTask::RootMain,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) == ERROR)
+ {
+ // error creating task. log the error and return.
+ printf("[RootTask] Fatal Error on taskSpawn(RootTask).\n");
+ };
+}
+
+
+extern "C"
+{
+int ShellInitRootTask()
+{
+ return (RootTask::InitRootTask());
+}
+}
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RootTask::InitRootTask
+**
+** PURPOSE: InitRootTask creates the one and only root task. A static
+** member of RooTask called theRootTask is used to access the root task
+** object.
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): JC_OK - RootTask created.
+** JC_ERROR - RootTask not created.
+**
+**----------------------------------------------------------------------------*/
+int RootTask::InitRootTask()
+{
+ // Create the one and only RootTask object.
+ if (isOneCreated == FALSE)
+ {
+ theRootTask = new RootTask();
+ }
+
+ if (theRootTask)
+ return (JC_OK);
+ else
+ return (JC_ERROR);
+}
+
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RootTask::SetSelfRebootMode
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): JC_OK - if mode changed.
+** JC_ERROR - if mode not changed.
+**
+**----------------------------------------------------------------------------*/
+extern "C"
+{
+JC_STATUS ShellSetSelfRebootMode(bool mode)
+{
+ return (RootTask::theRootTask->SetSelfRebootMode(mode));
+}
+}
+JC_STATUS RootTask::SetSelfRebootMode(bool mode)
+{
+ if(mode)
+ {
+ if (isSelfRebootEnabled)
+ {
+ printf("[RootTask] Self Reboot Mode already in place.\n");
+ return (JC_ERROR);
+ }
+ else
+ {
+ isSelfRebootEnabled = mode;
+ printf("[RootTask] Self Reboot Mode now turned on.\n");
+ printf("(Reboot will happen on critical task suspend.)\n");
+ return (JC_OK);
+ }
+ }
+ else
+ {
+ if (!isSelfRebootEnabled)
+ {
+ printf("[RootTask] Self Reboot Mode already turned off.\n");
+ return (JC_ERROR);
+ }
+ else
+ {
+ isSelfRebootEnabled = mode;
+ printf("[RootTask] Self Reboot Mode now turned off.\n");
+ printf("(Reboot will not happen on critical task suspend.)\n");
+ return (JC_OK);
+ }
+ }
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RootTask::EngageSelfReboot
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): JC_OK - if mode changed.
+** JC_ERROR - if mode not changed.
+**
+**----------------------------------------------------------------------------*/
+void RootTask::EngageSelfReboot(int i)
+{
+ if (isSelfRebootEnabled)
+ {
+ printf("[RootTask] Self Reboot Mode engaged\n");
+ for(int j=0; j < MNET_MAX_MODULE_IDS; j++)
+ {
+ if((j!=i) && JCModule::systemModules[j])
+ {
+ JCModule::systemModules[j]->ShutdownModule();
+ }
+ }
+
+ printf("[RootTask] System will reboot in %d seconds.\n", gRebootDelayInSec);
+ taskDelay(gRebootDelayInSec * sysClkRateGet());
+
+ printf("[RootTask] Reboot...\n");
+ reboot(BOOT_CLEAR);
+ }
+ else
+ {
+ printf("[RootTask] Self Reboot Mode NOT engaged\n");
+ }
+}
+
+
+#define MOD_CHECK_DELAY_SECS 1
+#define ROOT_MAX_MOD_CHECK_ATTEMPTS 60
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RootTask::WaitForModuleStatusCheck
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void RootTask::WaitForModuleStatusCheck()
+{
+ bool allModulesReady = FALSE;
+ int modCheckDelay = MOD_CHECK_DELAY_SECS * sysClkRateGet();
+ int numAttempts = ROOT_MAX_MOD_CHECK_ATTEMPTS;
+
+ while ((!allModulesReady) && (numAttempts != 0))
+ {
+ allModulesReady = JCModule::AllTasksInMainLoop();
+ taskDelay(modCheckDelay);
+ numAttempts--;
+ }
+
+ if (!allModulesReady)
+ {
+ printf ("[RootTask] WARNING: not all tasks are ready...continuing anyway!\n");
+ }
+
+ JCModule::ShowModuleStat();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RootTask::SendAlarm
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void RootTask::SendAlarm(Alarm_errorCode_t err_code, int arg1=0, int arg2=0 )
+{
+ if (err_code != EC_NOERROR)
+ {
+ if (JC_OK!=alarm_raise_args(MODULE_SYSINIT, MIB_errorCode_SYSINIT,
+ err_code, arg1, arg2))
+ {
+ printf("Unable to raise alarm: \"alarm_raise(0x%02x, 0x%08x)\" failed\n",
+ MODULE_SYSINIT, err_code);
+ }
+ } else {
+ if (JC_OK!=alarm_clear(MODULE_SYSINIT, MIB_errorCode_SYSINIT, EC_NOERROR))
+ {
+ printf("Unable to raise alarm: \"alarm_clear(0x%02x, 0x%08x)\" failed\n",
+ MODULE_SYSINIT, err_code);
+ }
+ }
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RootTask::UpdateRadioBoardEeprom
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void RootTask::UpdateRadioBoardEeprom()
+{
+ int status;
+
+ // Now check if any updates need to be made to EEPROM
+ if ((status = CheckEeprom()) == EEPROM_STATUS_REPORT_ERROR)
+ {
+ SendAlarm(EC_ROOT_TX_POWER_TABLE_ERROR);
+ printf("[RootTask] WARNING - Radio Board EEPROM is corrupted!\n"
+ "Default power tables will be used!\n");
+ }
+ else if (status == EEPROM_STATUS_UPDATE)
+ {
+ printf("[RootTask] Saving updated Radio Board EEPROM into NV Ram!\n");
+ if (SaveEepromInNVRam() != STATUS_OK)
+ {
+ printf("[RootTask] WARNING - Unable to save Radio Board EEPROM!\n");
+ }
+ }
+}
+
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RootTask::CheckForMCHTest
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+short RootTask::CheckForMCHTest()
+{
+ /* looks like post test results booleans are kept differently from
+ the name of functions - "1" means fail.
+ Interpreted correctly here : kevinelim */
+
+ bool any_fail = postAllTestsOkay();
+ bool mpc_sram_fail = postMpcSramOkay();
+ bool dsp0_int_data_fail = postDsp0IntDataRamOkay();
+ bool dsp1_int_data_fail = postDsp1IntDataRamOkay();
+ bool dsp0_int_prog_fail = postDsp0IntProgRamOkay();
+ bool dsp1_int_prog_fail = postDsp1IntProgRamOkay();
+ bool dsp0_ext_fail = postDsp0ExtRamOkay();
+ bool dsp1_ext_fail = postDsp1ExtRamOkay();
+ bool fpga0_fail = postFPGA0Okay();
+ bool fpga1_fail = postFPGA1Okay();
+ bool i2c_fail = postI2COkay();
+ short ret = 0;
+
+ printf("[RootTask] checking for post test - any failed?: %d\n", any_fail);
+ if(any_fail){
+ if(mpc_sram_fail){
+ printf("-- mpc_sram fail\n");
+ SendAlarm(EC_ROOT_MPC_SRAM_FAIL);
+ }
+ if(dsp0_int_data_fail){
+ printf("-- dsp0_int_data fail\n");
+ SendAlarm(EC_ROOT_DSP0_INT_DATA_RAM_FAIL);
+ }
+ if(dsp1_int_data_fail){
+ printf("-- dsp1_int_data fail\n");
+ SendAlarm(EC_ROOT_DSP1_INT_DATA_RAM_FAIL);
+ }
+ if(dsp0_int_prog_fail){
+ printf("-- dsp0_int_prog fail\n");
+ SendAlarm(EC_ROOT_DSP0_INT_PROG_RAM_FAIL);
+ }
+ if(dsp1_int_prog_fail){
+ printf("-- dsp1_int_prog fail\n");
+ SendAlarm(EC_ROOT_DSP1_INT_PROG_RAM_FAIL);
+ }
+ if(dsp0_ext_fail){
+ printf("-- dsp0_ext fail\n");
+ SendAlarm(EC_ROOT_DSP0_EXT_RAM_FAIL);
+ }
+ if(dsp1_ext_fail){
+ printf("-- dsp1_ext fail\n");
+ SendAlarm(EC_ROOT_DSP1_EXT_RAM_FAIL);
+ }
+ if(fpga0_fail){
+ printf("-- fpga0 fail\n");
+ SendAlarm(EC_ROOT_FPGA0_FAIL);
+ }
+ if(fpga1_fail){
+ printf("-- fpga1 fail\n");
+ SendAlarm(EC_ROOT_FPGA1_FAIL);
+ }
+ if(i2c_fail){
+ printf("-- i2c fail\n");
+ SendAlarm(EC_ROOT_I2C_FAIL);
+ }
+ ret = 1;
+ }
+ return ret;
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RootTask::InitializeSystemModuleList
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void RootTask::InitializeSystemModuleList()
+{
+ for (int i=0; i < MNET_MAX_MODULE_IDS; i++)
+ {
+ JCModule::systemModules[i] = 0;
+ }
+
+ JCModule::systemModules[0] = new JCModule(MODULE_LOG, SysCommand_Log, "SysCommand_Log");
+ JCModule::systemModules[1] = new JCModule(MODULE_TCPSRV, SysCommand_TcpSrv, "SysCommand_TcpSrv");
+ JCModule::systemModules[2] = new JCModule(MODULE_ALARM, SysCommand_Alarm, "SysCommand_Alarm");
+ JCModule::systemModules[3] = new JCModule(MODULE_MCH, SysCommand_MCH, "SysCommand_MCH");
+ JCModule::systemModules[4] = new JCModule(MODULE_VBLINK, SysCommand_VBLink, "SysCommand_VBLink");
+ JCModule::systemModules[5] = new JCModule(MODULE_CDR, SysCommand_CDR, "SysCommand_CDR");
+ JCModule::systemModules[6] = new JCModule(MODULE_PM, SysCommand_PM, "SysCommand_PM");
+ JCModule::systemModules[7] = new JCModule(MODULE_L2, SysCommand_Lapdm, "SysCommand_Lapdm");
+ JCModule::systemModules[8] = new JCModule(MODULE_H323, SysCommand_Voip, "SysCommand_Voip");
+ JCModule::systemModules[9] = new JCModule(MODULE_EXT_VC, SysCommand_VChan, "SysCommand_VChan");
+ JCModule::systemModules[10] = new JCModule(MODULE_LUDB, SysCommand_Ludb, "SysCommand_Ludb");
+ JCModule::systemModules[11] = new JCModule(MODULE_MM, SysCommand_MM, "SysCommand_MM");
+ JCModule::systemModules[12] = new JCModule(MODULE_CC, SysCommand_CC, "SysCommand_CC");
+ JCModule::systemModules[13] = new JCModule(MODULE_L1, SysCommand_L1Proxy, "SysCommand_L1Proxy");
+ JCModule::systemModules[14] = new JCModule(MODULE_MD, SysCommand_MD, "SysCommand_MD");
+ JCModule::systemModules[15] = new JCModule(MODULE_RLCMAC, SysCommand_RlcMac, "SysCommand_RlcMac");
+ JCModule::systemModules[16] = new JCModule(MODULE_GRR, SysCommand_GRR, "SysCommand_GRR");
+ JCModule::systemModules[17] = new JCModule(MODULE_RM, SysCommand_RM, "SysCommand_RM");
+ JCModule::systemModules[18] = new JCModule(MODULE_BSSGP, SysCommand_BSSGP, "SysCommand_BSSGP");
+ JCModule::systemModules[19] = new JCModule(MODULE_GSLINK, SysCommand_GSLink, "SysCommand_GSLink");
+ return;
+}
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RootTask::RootMain
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+int RootTask::RootMain(void)
+{
+ int i;
+ bool isSysModuleMissing = FALSE;
+
+ csu_TblInitAll(); /* klim 5/9/01 */
+
+ theRootTask->InitializeSystemModuleList();
+
+ for(i=0; i<MNET_MAX_MODULE_IDS; i++)
+ {
+ if (JCModule::systemModules[i])
+ {
+ if (!JCModule::systemModules[i]->StartModule())
+ {
+ isSysModuleMissing = TRUE;
+ }
+ }
+ }
+
+ // Verify the EEPROM on the radio board.
+ theRootTask->UpdateRadioBoardEeprom();
+
+ theRootTask->WaitForModuleStatusCheck();
+
+ if (pMnetSyncSem)
+ semFlush(*pMnetSyncSem);
+
+ go (L1PROXY_DSP_PORT1);
+ go (L1PROXY_DSP_PORT0);
+
+ if (isSysModuleMissing)
+ {
+ theRootTask->SendAlarm(EC_ROOT_SYSCMD_SYM_NOT_FOUND);
+ }
+
+ theRootTask->CheckForMCHTest();
+
+ taskPrioritySet(taskNameToId("RootTask"), ROOT_TASK_PRIORITY2);
+
+ while (1) {
+ for(i=0; i<MNET_MAX_MODULE_IDS; i++)
+ {
+ if ((JCModule::systemModules[i]) && (!isSystemRebooting))
+ {
+ JCTask *pTask;
+ SYSTEM_MODULE_STATUS modStat;
+ if (((modStat = JCModule::systemModules[i]->CheckModule(&pTask)) != MODULE_OK))
+ {
+ if ((modStat == TASK_MISSING) && (!pTask->GetTaskAlarmStatus()))
+ {
+ if (pTask->GetTaskImportance() == JC_CRITICAL_TASK)
+ theRootTask->SendAlarm(EC_ROOT_CRITICAL_TASK_MISSING,
+ JCModule::systemModules[i]->GetModuleId());
+ else
+ theRootTask->SendAlarm(EC_ROOT_NON_CRITICAL_TASK_MISSING,
+ JCModule::systemModules[i]->GetModuleId());
+ pTask->SetTaskAlarmStatus(TRUE);
+ }
+
+ if ((modStat == TASK_SUSPENDED) && (!pTask->GetTaskAlarmStatus()))
+ {
+ if (pTask->GetTaskImportance() == JC_CRITICAL_TASK)
+ theRootTask->SendAlarm(EC_ROOT_CRITICAL_TASK_SUSPEND,
+ JCModule::systemModules[i]->GetModuleId());
+ else
+ theRootTask->SendAlarm(EC_ROOT_NON_CRITICAL_TASK_SUSPEND,
+ JCModule::systemModules[i]->GetModuleId());
+ pTask->SetTaskAlarmStatus(TRUE);
+ }
+
+ if (pTask->GetTaskImportance() == JC_CRITICAL_TASK)
+ {
+ theRootTask->EngageSelfReboot(i);
+ }
+ }
+ }
+ }
+ taskDelay(gModuleCheckDelayInSec * sysClkRateGet());
+ }
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: RootTask::RootRebootHook
+**
+** PURPOSE:
+**
+** INPUT PARAMETERS: none
+**
+** RETURN VALUE(S): none
+**
+**----------------------------------------------------------------------------*/
+void RootTask::RootRebootHook()
+{
+ int i, j;
+ printf("[RootTask] Reboot preparation in progress\n");
+ for(i=0; i<MNET_MAX_MODULE_IDS; i++)
+ {
+ if (JCModule::systemModules[i])
+ {
+ JCModule::systemModules[i]->RebootModule();
+ }
+ }
+ isSystemRebooting = TRUE;
+ printf("[RootTask] System reboot in progress...\n");
+ for(i=0; i<1000; i++) for(j=0; j<5000; j++); // give some time to print last line
+}
+
+
diff --git a/data/mnet/GP10/Host/Root/src_api/Makefile b/data/mnet/GP10/Host/Root/src_api/Makefile
new file mode 100644
index 0000000..ed8ee4a
--- /dev/null
+++ b/data/mnet/GP10/Host/Root/src_api/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = Root
+THIS_DIRECTORY = src_api
+MY_OUTPUT = $(OBJDIR)\SysModules.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Root/src_api/SystemModules.cpp b/data/mnet/GP10/Host/Root/src_api/SystemModules.cpp
new file mode 100644
index 0000000..269ac5a
--- /dev/null
+++ b/data/mnet/GP10/Host/Root/src_api/SystemModules.cpp
@@ -0,0 +1,57 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SystemModules.cpp
+// Author(s) : Tim Olson
+// Create Date : 10/18/2000
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+#include "Os/JCModule.h"
+#include "MnetModuleId.h"
+
+JCModule *JCModule::systemModules[MNET_MAX_MODULE_IDS];
+
+
+char MnetModuleNames [][MNET_MAX_MODULE_ID_NAME] =
+{
+ "L1Proxy" ,
+ "Message Delivery",
+ "RR",
+ "MM",
+ "CC" ,
+ "Lapdm",
+ "Ril3-SMS",
+ "OAM",
+ "H323",
+ "LUDB",
+ "External GP10",
+ "Logger",
+ "MCH",
+ "Alarm",
+ "SysInit",
+ "PM",
+ "SMS-CBC",
+ "VBLink",
+ "CDR",
+ "CISS",
+ "TCP Server",
+ "HOA",
+ "BSSGP",
+ "RLC_MAC",
+ "GRR",
+ "GSLink"
+};
+
diff --git a/data/mnet/GP10/Host/Scripts/DSPTest b/data/mnet/GP10/Host/Scripts/DSPTest
new file mode 100644
index 0000000..9a8360e
--- /dev/null
+++ b/data/mnet/GP10/Host/Scripts/DSPTest
@@ -0,0 +1,31 @@
+# startup script
+# DSPTest
+
+# Lower the priority for tShell task, tTelnetOutTask, tTelnetInTask
+shellTaskPriority=255
+telnetTaskPriority=255
+
+# load viperLoad, viperLoadList functions
+load_path = malloc(150);
+strcpy(load_path, getenv("VIPERCALL_BASE"))
+strcat(load_path, "/Bin/load_module.out")
+ld(0, 0, load_path)
+
+taskDelay(10)
+
+# load applications
+viperLoadList("Scripts/module_list", getenv("VIPERCALL_BASE"), 1)
+
+cdcTestInit("fpga/fpga.rbf", getenv("VIPERCALL_BASE"))
+
+# Bring up Required Tasks
+SysCommand_Log(1)
+SysCommand_MCH(1)
+SysCommand_L1Proxy(1)
+
+LoadDSPCode("bin/manuDsp.out", getenv("VIPERCALL_BASE"))
+
+#Done executing startup script ltrav/scripts/DSPTest
+
+
+
diff --git a/data/mnet/GP10/Host/Scripts/README b/data/mnet/GP10/Host/Scripts/README
new file mode 100644
index 0000000..b40d6ef
--- /dev/null
+++ b/data/mnet/GP10/Host/Scripts/README
@@ -0,0 +1,62 @@
+ The purpose of this email is to remind every one about the new way of
+ starting vipercells and the new startup script files.
+
+ Last week it was decided that a common startup script file will be used
+ irrespective of booting/loading form network or flash. The name of this
+ script file is viperStart. (For cdc boards 8, 9, and 10, it is
+ viperStartCdc1; for cdcim boards it is viperStartCdcim.) These files
+ reside in the scripts directory. The startup script file loads all the
+ required modules, calls functions to initialize hardware and starts
+ DSPs.
+
+ The startup script file is specified in the boot parameter. This field
+ when loading from compact flash is /ata/ViperCall/scripts/viperStart.
+ While loading from network specify appropriate path. For example,
+ /Beta1-load/Beta2_01/scripts. Also remember to set the 'other' field of
+ the boot parameter to correct vipercall base. This field for example can
+ be /ata/ViperCall or /Beta-load/Beta2_01.
+
+ The startup scripts file that we have been using from Tornado should be
+ considered deprecated.
+
+ -Chetan Katira
+
+Another reminder for people who want to use some private built module
+instead of official builds... To do this,
+
+1. Copy official viperStart and module_list (preferable from RCS) to your
+ private directory.
+ For example, I put copies into K:\Beta2-Load\Test-Script\ as
+ myStart, my_list
+
+2. In myStart, change one line of
+ viperLoadList("Scripts/module_list", getenv("VIPERCALL_BASE"), 1)
+ to
+
+ viperLoadList("/Beta2-Load/Test-Script/my_list", getenv("VIPERCALL_BASE"), 0)
+
+3. In my_list, change the module path.
+ For example, from
+ Bin/l1proxy.out
+ to
+
+ #/Beta2-Load/Test-Bin/l1proxy.out
+
+ Notice # sign suppresses appending base directory and uses absolute path
+ for the filename.
+
+4. Set boot param for 'other' field to official build directory, e.g.
+ /Beta2-Load/Beta2.0.1
+
+5. Put /Beta2-Load/Test-Script/myStart to init script bootParam
+ or run script "< myStart" from the correct pwd.
+
+ -Kevin Lim
+
+p.s. This only works with vxWorks version Beta1.0.2 or Beta2.0.2 up.
+ Also, module_list lines should end with UNIX EOL. 'vi -b' works.
+ So far, I know Tornado, Notepad saved file will give errors.
+ You can use wordpad but you have to rename to remove '.txt'.
+ If this is too much trouble, we will fix this.
+
+
diff --git a/data/mnet/GP10/Host/Scripts/iosinit.ini b/data/mnet/GP10/Host/Scripts/iosinit.ini
new file mode 100644
index 0000000..ffe62ce
--- /dev/null
+++ b/data/mnet/GP10/Host/Scripts/iosinit.ini
@@ -0,0 +1,9 @@
+#To install Vxworks Shell
+setenv vxshell var VIPERCALL_BASE string /bin/vxsh.out
+ldvxsh env vxshell
+
+#Gp10 ini file
+#if you choose to change the file name put the new file name after
+# keyword string in this command
+setenv VXSH_STARTUP_SCRIPT var VIPERCALL_BASE string /scripts/viperstart
+
diff --git a/data/mnet/GP10/Host/Scripts/iosinit_crypto.ini b/data/mnet/GP10/Host/Scripts/iosinit_crypto.ini
new file mode 100644
index 0000000..ffe62ce
--- /dev/null
+++ b/data/mnet/GP10/Host/Scripts/iosinit_crypto.ini
@@ -0,0 +1,9 @@
+#To install Vxworks Shell
+setenv vxshell var VIPERCALL_BASE string /bin/vxsh.out
+ldvxsh env vxshell
+
+#Gp10 ini file
+#if you choose to change the file name put the new file name after
+# keyword string in this command
+setenv VXSH_STARTUP_SCRIPT var VIPERCALL_BASE string /scripts/viperstart
+
diff --git a/data/mnet/GP10/Host/Scripts/module_list b/data/mnet/GP10/Host/Scripts/module_list
new file mode 100644
index 0000000..37621de
--- /dev/null
+++ b/data/mnet/GP10/Host/Scripts/module_list
@@ -0,0 +1,61 @@
+Bin/SysModules.out
+Bin/snmp.out
+Bin/Os.out
+Bin/auxPort.out
+Bin/fpgaConfig.out
+Bin/drfInterface.out
+Bin/clkInterface.out
+Bin/cdcUtils.out
+
+Bin/sntpc.out
+
+Bin/tcpserver.out
+Bin/logging.out
+Bin/sslc.out
+Bin/soc.out
+Bin/alarm.out
+Bin/cdr.out
+Bin/pm.out
+Bin/subsc.out
+
+Bin/l1proxy_init.out
+Bin/lapdm_init.out
+Bin/mmm_init.out
+Bin/ccm_init.out
+Bin/Rlc_mac_init.out
+Bin/grr_init.out
+Bin/rm_init.out
+Bin/mch_init.out
+
+Bin/lapdm_api.out
+Bin/jcc_api.out
+Bin/mmm_api.out
+Bin/ccm_api.out
+Bin/Rlc_mac_api.out
+Bin/grr_api.out
+Bin/rm_api.out
+Bin/mch_api.out
+Bin/bssgp_api.out
+
+Bin/jetrtp.out
+Bin/csu.out
+Bin/l1proxy.out
+Bin/coff_loader.out
+Bin/ril3.out
+Bin/lapdm.out
+Bin/jvc.out
+Bin/voiptask.out
+Bin/jcc.out
+Bin/mmm.out
+Bin/ccm.out
+Bin/cc_test.out
+Bin/Rlc_mac.out
+Bin/grr.out
+Bin/rm.out
+Bin/mch.out
+Bin/post.out
+Bin/bssgp.out
+Bin/gslink.out
+Bin/http.out
+Bin/Root.out
+
diff --git a/data/mnet/GP10/Host/Scripts/module_list_crypto b/data/mnet/GP10/Host/Scripts/module_list_crypto
new file mode 100644
index 0000000..cf8a36b
--- /dev/null
+++ b/data/mnet/GP10/Host/Scripts/module_list_crypto
@@ -0,0 +1,62 @@
+Bin/SysModules.out
+Bin/snmp.out
+Bin/Os.out
+Bin/auxPort.out
+Bin/fpgaConfig.out
+Bin/drfInterface.out
+Bin/clkInterface.out
+Bin/cdcUtils.out
+
+Bin/sntpc.out
+
+Bin/tcpserver.out
+Bin/logging.out
+Bin/sslc_k9.out
+Bin/soc_k8.out
+Bin/alarm.out
+Bin/cdr.out
+Bin/pm.out
+Bin/subsc.out
+
+Bin/l1proxy_init.out
+Bin/lapdm_init.out
+Bin/mmm_init.out
+Bin/ccm_init.out
+Bin/Rlc_mac_init.out
+Bin/grr_init.out
+Bin/rm_init.out
+Bin/mch_init.out
+
+Bin/lapdm_api.out
+Bin/jcc_api.out
+Bin/mmm_api.out
+Bin/ccm_api.out
+Bin/Rlc_mac_api.out
+Bin/grr_api.out
+Bin/rm_api.out
+Bin/mch_api.out
+Bin/bssgp_api.out
+
+Bin/jetrtp.out
+Bin/csu.out
+Bin/l1proxy.out
+Bin/coff_loader.out
+Bin/ril3.out
+Bin/lapdm.out
+Bin/jvc.out
+Bin/voiptask.out
+Bin/jcc.out
+Bin/mmm.out
+Bin/ccm.out
+Bin/cc_test.out
+Bin/Rlc_mac.out
+Bin/grr.out
+Bin/rm.out
+Bin/mch.out
+Bin/post.out
+Bin/bssgp.out
+Bin/gslink.out
+Bin/http.out
+Bin/Root.out
+Bin/ssh_k8.out
+
diff --git a/data/mnet/GP10/Host/Scripts/oamStart b/data/mnet/GP10/Host/Scripts/oamStart
new file mode 100644
index 0000000..7715d43
--- /dev/null
+++ b/data/mnet/GP10/Host/Scripts/oamStart
@@ -0,0 +1,29 @@
+# Oam startup scrip
+# viperStart
+
+# Lower the priority for tShell task, tTelnetOutTask, tTelnetInTask
+shellTaskPriority=255
+telnetTaskPriority=255
+
+# load viperLoad, viperLoadList functions
+load_path = malloc(150);
+strcpy(load_path, getenv("VIPERCALL_BASE"))
+strcat(load_path, "/Bin/LoadModule.out")
+ld(0, 0, load_path)
+
+taskDelay(10)
+
+# load applications
+viperLoadList("Scripts/oam_module_list", getenv("VIPERCALL_BASE"), 1)
+
+# initialize Snm
+snmp_initialize(0)
+
+cdcInit("fpga/fpga.rbf", getenv("VIPERCALL_BASE"))
+
+# sync time with the serve
+time_syncTime()
+
+# load http server
+http_taskCreate()
+
diff --git a/data/mnet/GP10/Host/Scripts/oam_module_list b/data/mnet/GP10/Host/Scripts/oam_module_list
new file mode 100644
index 0000000..e9cd06b
--- /dev/null
+++ b/data/mnet/GP10/Host/Scripts/oam_module_list
@@ -0,0 +1,19 @@
+Bin/SysModules.out
+Bin/snmp.out
+Bin/Os.out
+Bin/auxPort.out
+Bin/fpgaConfig.out
+Bin/drfInterface.out
+Bin/clkInterface.out
+Bin/cdcUtils.out
+
+Bin/sntpc.out
+Bin/http.out
+
+Bin/tcpserver.out
+Bin/logging.out
+Bin/alarm.out
+Bin/cdr.out
+Bin/pm.out
+Bin/subsc.out
+
diff --git a/data/mnet/GP10/Host/Scripts/showall.txt b/data/mnet/GP10/Host/Scripts/showall.txt
new file mode 100644
index 0000000..4cc4285
--- /dev/null
+++ b/data/mnet/GP10/Host/Scripts/showall.txt
@@ -0,0 +1,7 @@
+ccDataPrint
+mmDataPrint
+irtDataPrint
+csu_ShowAllSrcTable
+intg_ShowRmChans
+VoipShowAllCalls
+handoverRtpDataPrint
diff --git a/data/mnet/GP10/Host/Scripts/viperStart b/data/mnet/GP10/Host/Scripts/viperStart
new file mode 100644
index 0000000..1e5ebf7
--- /dev/null
+++ b/data/mnet/GP10/Host/Scripts/viperStart
@@ -0,0 +1,55 @@
+# startup script
+# viperStart
+
+# Lower the priority for tShell task, tTelnetOutTask, tTelnetInTask
+shellTaskPriority=255
+telnetTaskPriority=255
+
+# load viperLoad, viperLoadList functions
+load_path = malloc(150);
+strcpy(load_path, getenv("VIPERCALL_BASE"))
+strcat(load_path, "/Bin/LoadModule.out")
+ld(0, 0, load_path)
+
+taskDelay(10)
+
+# load applications
+viperLoadList("Scripts/module_list", getenv("VIPERCALL_BASE"), 1)
+
+# initialize Snmp
+snmp_initialize(0)
+
+cdcInit("fpga/fpga.rbf", getenv("VIPERCALL_BASE"))
+
+# Execute power on self tests
+ExecutePost
+
+# sync time with the server
+time_syncTime()
+
+# load http server
+http_taskCreate()
+
+# load DSP
+initDsp(0)
+initDsp(1)
+initInt()
+
+ldCoff("bin/dsp_k8.out", getenv("VIPERCALL_BASE"))
+
+# Bring Up RootTask
+taskDelay(300)
+ShellInitRootTask
+
+taskDelay(700)
+
+intg_SendChanActivation(0,1)
+intg_SendChanDeActivation(0,1)
+intg_SendChanActivation(1,1)
+intg_SendChanDeActivation(1,1)
+
+strcpy(load_path, getenv("VIPERCALL_BASE"))
+strcat(load_path, "/Bin/gp10cli.out")
+ld(0, 0, load_path)
+commands_init();
+cd(getenv("VIPERCALL_BASE")) \ No newline at end of file
diff --git a/data/mnet/GP10/Host/Scripts/viperStartCdc1 b/data/mnet/GP10/Host/Scripts/viperStartCdc1
new file mode 100644
index 0000000..ac9e7f1
--- /dev/null
+++ b/data/mnet/GP10/Host/Scripts/viperStartCdc1
@@ -0,0 +1,59 @@
+# startup script
+# viperStartCdc1
+# Set the TIMEZONE variable here
+putenv("TIMEZONE=PST:PST:480:040102:100102")
+
+# Lower the priority for tShell task, tTelnetOutTask, tTelnetInTask
+shellTaskPriority=100
+telnetTaskPriority=100
+
+snmp_initialize(0)
+
+# load viperLoad, viperLoadList functions
+load_path = malloc(150);
+strcpy(load_path, getenv("VIPERCALL_BASE"))
+strcat(load_path, "/Bin/load_module.out")
+ld(0, 0, load_path)
+
+taskDelay(10)
+
+# load applications
+viperLoadList("Scripts/module_list", getenv("VIPERCALL_BASE"), 1)
+
+cdcInit("fpga/fpgaCdc1.rbf", getenv("VIPERCALL_BASE"))
+
+# sync time with the server
+time_syncTime()
+
+# load http server
+http_taskCreate()
+
+# Bring Up RootTask
+taskDelay(400)
+rootTaskInit
+rootNoReboot
+
+# load DSP
+initDsp(0)
+initDsp(1)
+initInt()
+ldCoff("bin/dsp.out", getenv("VIPERCALL_BASE"))
+taskDelay(500)
+
+# start DSP runs
+go 1
+go 0
+
+taskDelay(100)
+
+disableAgc 0
+disableAgc 1
+intg_SetUlSG(0, 0x280)
+intg_SetUlSG(1, 0x280)
+
+intg_SendChanActivation(0,1)
+intg_SendChanDeActivation(0,1)
+intg_SendChanActivation(1,1)
+intg_SendChanDeActivation(1,1)
+
+
diff --git a/data/mnet/GP10/Host/Scripts/viperStartCdcim b/data/mnet/GP10/Host/Scripts/viperStartCdcim
new file mode 100644
index 0000000..db7865e
--- /dev/null
+++ b/data/mnet/GP10/Host/Scripts/viperStartCdcim
@@ -0,0 +1,59 @@
+# startup script
+# viperStartCdcim
+# Set the TIMEZONE variable here
+putenv("TIMEZONE=PST:PST:480:040102:100102")
+
+# Lower the priority for tShell task, tTelnetOutTask, tTelnetInTask
+shellTaskPriority=100
+telnetTaskPriority=100
+
+snmp_initialize(0)
+
+# load viperLoad, viperLoadList functions
+load_path = malloc(150);
+strcpy(load_path, getenv("VIPERCALL_BASE"))
+strcat(load_path, "/Bin/load_module.out")
+ld(0, 0, load_path)
+
+taskDelay(10)
+
+# load applications
+viperLoadList("Scripts/module_list", getenv("VIPERCALL_BASE"), 1)
+
+cdcInit("fpga/fpgaCdcim.rbf", getenv("VIPERCALL_BASE"))
+
+# load time server
+time_syncTime()
+
+# load http server
+http_taskCreate()
+
+# Bring Up RootTask
+taskDelay(400)
+rootTaskInit
+rootNoReboot
+
+# load DSP
+initDsp(0)
+initDsp(1)
+initInt()
+ldCoff("bin/dsp.out", getenv("VIPERCALL_BASE"))
+taskDelay(500)
+
+# start DSP runs
+go 0
+go 1
+
+taskDelay(100)
+
+disableAgc 0
+disableAgc 1
+intg_SetUlSG(0, 0x280)
+intg_SetUlSG(1, 0x280)
+
+intg_SendChanActivation(0,1)
+intg_SendChanDeActivation(0,1)
+intg_SendChanActivation(1,1)
+intg_SendChanDeActivation(1,1)
+
+
diff --git a/data/mnet/GP10/Host/Scripts/viperStart_crypto b/data/mnet/GP10/Host/Scripts/viperStart_crypto
new file mode 100644
index 0000000..12b9b0c
--- /dev/null
+++ b/data/mnet/GP10/Host/Scripts/viperStart_crypto
@@ -0,0 +1,58 @@
+# startup script
+# viperStart
+
+# Lower the priority for tShell task, tTelnetOutTask, tTelnetInTask
+shellTaskPriority=255
+telnetTaskPriority=255
+
+# load viperLoad, viperLoadList functions
+load_path = malloc(150);
+strcpy(load_path, getenv("VIPERCALL_BASE"))
+strcat(load_path, "/Bin/LoadModule.out")
+ld(0, 0, load_path)
+
+taskDelay(10)
+
+# load applications
+viperLoadList("Scripts/module_list", getenv("VIPERCALL_BASE"), 1)
+
+# initialize Snmp
+snmp_initialize(0)
+
+cdcInit("fpga/fpga.rbf", getenv("VIPERCALL_BASE"))
+
+# Execute power on self tests
+ExecutePost
+
+# sync time with the server
+time_syncTime()
+
+# load http server
+http_taskCreate()
+
+# load DSP
+initDsp(0)
+initDsp(1)
+initInt()
+
+ldCoff("bin/dsp_k9.out", getenv("VIPERCALL_BASE"))
+
+# Bring Up RootTask
+csu_TblInitAll()
+taskDelay(300)
+ShellInitRootTask
+
+taskDelay(700)
+
+intg_SendChanActivation(0,1)
+intg_SendChanDeActivation(0,1)
+intg_SendChanActivation(1,1)
+intg_SendChanDeActivation(1,1)
+
+strcpy(load_path, getenv("VIPERCALL_BASE"))
+strcat(load_path, "/Bin/gp10cli.out")
+ld(0, 0, load_path)
+commands_init();
+
+SSH_main();
+cd(getenv("VIPERCALL_BASE"))
diff --git a/data/mnet/GP10/Host/TcpServer/Makefile b/data/mnet/GP10/Host/TcpServer/Makefile
new file mode 100644
index 0000000..22705b3
--- /dev/null
+++ b/data/mnet/GP10/Host/TcpServer/Makefile
@@ -0,0 +1,16 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ $(CP) bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/TcpServer/Src/Makefile b/data/mnet/GP10/Host/TcpServer/Src/Makefile
new file mode 100644
index 0000000..41ebf3c
--- /dev/null
+++ b/data/mnet/GP10/Host/TcpServer/Src/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = TcpServer
+THIS_DIRECTORY = Src
+MY_OUTPUT = $(OBJDIR)\tcpServer.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/TimeSync/Makefile b/data/mnet/GP10/Host/TimeSync/Makefile
new file mode 100644
index 0000000..22705b3
--- /dev/null
+++ b/data/mnet/GP10/Host/TimeSync/Makefile
@@ -0,0 +1,16 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ $(CP) bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/TimeSync/src/Makefile b/data/mnet/GP10/Host/TimeSync/src/Makefile
new file mode 100644
index 0000000..3b322d5
--- /dev/null
+++ b/data/mnet/GP10/Host/TimeSync/src/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = TimeSync
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\sntpc.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/ViperBase/admin.c b/data/mnet/GP10/Host/ViperBase/admin.c
new file mode 100644
index 0000000..d445843
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperBase/admin.c
@@ -0,0 +1,2267 @@
+/* admin.c
+ *
+ */
+
+#include <gkadd.h>
+#include <gkrgi.h>
+#include <gklrqi.h>
+#include <gkstorage.h>
+#include <cfgapi.h>
+#include <li.h>
+
+#include <SubscInfoType.h>
+
+#include "support.h"
+#include "exchange.h"
+#include "admin.h"
+#include "jcras.h"
+#include "init.h"
+
+static char pszEndpointPrintSpec[] = "%19s %6s %22s %22s %6s\n";
+
+PJCCONFIG pCfgTree;
+
+static char pszDelims[] = "\\/, ";
+static char pszFieldSeparator[] = ", ";
+static char pszLineSeparator[] = "\r\n";
+static char pszDefaultDataFile[] = "jcvbase.dat";
+static char pszDataFileHeader[] = "JetCell ViperBase Main Data File";
+
+/*
+ *
+ */
+BOOL EndpointsPrint( void )
+{
+ gkHREG hReg;
+ gkHAPPREG haReg;
+
+ StringPrint( "\n" );
+ StringPrint( pszEndpointPrintSpec,
+ "H323 ID", "Phone", "RAS Address", "Q.931 Address", "Online" );
+ StringPrint( " ------------------------------------------------------------------------------\n" );
+
+ switch( gkrgiGetFirstEntryHandle( &hReg, &haReg ) )
+ {
+ case GKRGI_OK:
+ break;
+
+ case GKRGI_NOT_FOUND:
+ StringPrint( "There are no endpoints to show...\n" );
+ return TRUE;
+
+ default:
+ DebugLog( "Error in gkrgiGetFirstEntryHandle()\n" );
+ return FALSE;
+ }
+
+ do
+ {
+ EndpointPrint( hReg );
+
+ }while( GKRGI_OK == gkrgiGetNextEntryHandle( hReg, &hReg, &haReg ) );
+
+
+ return TRUE;
+}
+
+/*
+ *
+ */
+BOOL EndpointPrint( gkHREG hReg )
+{
+ gkrgiParameterStatus_t nRegStatus;
+ gkaddName_t Name; /* array */
+ gkaddPhone_t Phone; /* array */
+ gkaddTransport_t TransRAS, TransQ931;
+ char pszRAS[32], pszQ931[32];
+ int i, nPhones;
+
+ if( GKRGI_OK != gkrgiMsgPending( hReg ) && !RegIsDynamic( hReg ) && !RegIsStatic( hReg ) )
+ return TRUE;
+
+ nRegStatus = RegIsDynamic( hReg ) ? gkrgiSttsDynamic : gkrgiSttsStatic;
+
+ gkrgiGetParameter( hReg, gkrgiParamName, nRegStatus, 1, Name );
+
+ gkrgiGetNumberOfAddresses( hReg, gkrgiParamPhone, nRegStatus, &nPhones );
+
+ if( nPhones == 1 )
+ gkrgiGetParameter( hReg, gkrgiParamPhone, nRegStatus, 1, Phone );
+ else
+ strcpy( Phone, ( nPhones < 1 ) ? "none" : "many" );
+
+ gkrgiGetParameter( hReg, gkrgiParamCallSignal, nRegStatus, 1, &TransQ931 );
+ gkrgiGetParameter( hReg, gkrgiParamRAS, nRegStatus, 1, &TransRAS );
+
+ StringPrint( pszEndpointPrintSpec,
+ Name,
+ Phone,
+ TransAddrToString( &TransRAS, pszRAS ),
+ TransAddrToString( &TransQ931, pszQ931 ),
+ RegIsDynamic( hReg ) ? "yes" : "no" );
+
+ if( nPhones > 1 )
+ {
+ for( i = 1; i <= nPhones; i++ )
+ {
+ gkrgiGetParameter( hReg, gkrgiParamPhone, nRegStatus, i, Phone );
+ StringPrint( ( i % 15 == 0 ) ? " %s\n" : " %s", Phone );
+ }
+
+ StringPrint( "\n" );
+ }
+
+/*
+ nDataSize = 64;
+
+ if( GKRGI_OK == gkrgiGetAppMemblock( hReg, &nDataSize, pszMobileUserData ) )
+ StringPrint( "\t%s\n", pszMobileUserData );
+*/
+ return TRUE;
+}
+
+/*
+ *
+ */
+char* TransAddrToString( gkaddTransport_t* pTransAddr, char* Buffer )
+{
+ char buf[16];
+
+ sprintf( Buffer, "%s:%d", gkaddIp2String( pTransAddr->ip, buf ), pTransAddr->port );
+
+ return Buffer;
+}
+
+/*
+ *
+ */
+BOOL MobileAdd( char* pszIMSI, char* pszNumber, char* pszComment,
+ USHORT nProfileSize, void* ProfileData, char* pszResult )
+{
+ PJCMOBILE pMobile;
+
+ if( pszIMSI == NULL || pszNumber == NULL )
+ {
+ strcpy( pszResult, "Some parameters are not specified" );
+ return FALSE;
+ }
+
+ if( MobileFindByIMSI( pszIMSI, NULL ) )
+ {
+ strcpy( pszResult, "Another mobile exists with the same IMSI" );
+ return FALSE;
+ }
+
+ if( jcNumberExists( pszNumber ) )
+ {
+ strcpy( pszResult, "Another entity exists with the same number" );
+ return FALSE;
+ }
+
+ DebugLog( "Adding mobile '%s', extension '%s'\n", pszIMSI, pszNumber );
+
+ pMobile = New( JCMOBILE );
+ pMobile->pszIMSI = StringCreate( pszIMSI );
+ pMobile->pszNumber = StringCreate( pszNumber );
+ pMobile->pszComment = StringCreate( pszComment );
+
+ if( ( pMobile->nProfileSize = nProfileSize ) == 0 )
+ pMobile->ProfileData = NULL;
+ else
+ {
+ pMobile->ProfileData = SpecialAlloc( nProfileSize );
+ memcpy( pMobile->ProfileData, ProfileData, nProfileSize );
+ }
+
+ pMobile->hReg = NULL;
+ pMobile->hMobileCell = 0;
+
+ ListAddTail( pCfgTree->pListMobiles, pMobile );
+
+ sprintf( pszResult, "Mobile '%s' added", pszIMSI );
+ return TRUE;
+}
+
+/*
+ *
+ */
+BOOL MobileDelete( PJCMOBILE pMobile, PNODE pNode, char* pszResult )
+{
+
+ ListRemoveNode( pCfgTree->pListMobiles, pNode );
+
+ if( pMobile->hReg != NULL )
+ {
+ gkrgiDeleteAddress( pMobile->hReg, gkrgiParamPhone, gkrgiSttsDynamic, pMobile->pszNumber );
+ jcgkNonStdRasSendURQ( pMobile->hReg, pMobile );
+ }
+
+ StringDelete( pMobile->pszIMSI );
+ StringDelete( pMobile->pszNumber );
+ StringDelete( pMobile->pszComment );
+
+ SpecialFree( pMobile->ProfileData );
+
+ Delete( pMobile );
+
+ strcpy( pszResult, "Mobile deleted" );
+ return TRUE;
+}
+
+/*
+ *
+ */
+BOOL IpPhoneDelete( PJCIPPHONE pIPPhone, PNODE pNode, char* pszResult )
+{
+
+ ListRemoveNode( pCfgTree->pListIPPhones, pNode );
+
+ StringDelete( pIPPhone->pszName );
+ StringDelete( pIPPhone->pszNumber );
+ StringDelete( pIPPhone->pszIPAddress );
+ StringDelete( pIPPhone->pszComment );
+ Delete( pIPPhone );
+
+ strcpy( pszResult, "IP phone deleted" );
+ return TRUE;
+}
+
+/*
+ *
+ */
+BOOL MobilesImport( char* pszFile, char* pszResult )
+{
+ FILE* pfd;
+ char pszLine[80], pszIMSI[80], pszNumber[80];
+
+ if( NULL == pszFile )
+ {
+ strcpy( pszResult, "No filename specified" );
+ return FALSE;
+ }
+
+ if( NULL == ( pfd = fopen( pszFile, "rt" ) ) )
+ {
+ sprintf( pszResult, "Error opening file '%s'", pszFile );
+ return FALSE;
+ }
+
+ while( fgets( pszLine, 80, pfd ) )
+ if( 2 == sscanf( pszLine, " %s %s ", pszIMSI, pszNumber ) )
+ MobileAdd( pszIMSI, pszNumber, NULL, 0, NULL, pszResult );
+
+ fclose( pfd );
+
+ strcpy( pszResult, "Mobiles import completed" );
+ return TRUE;
+}
+
+/*
+ *
+ */
+PJCMOBILE MobileFindByIMSI( char* pszIMSI, PNODE* ppNode )
+{
+ PNODE pNode;
+ PJCMOBILE pMobile;
+
+ ListForEachNode( pCfgTree->pListMobiles, pNode )
+ {
+ pMobile = (PJCMOBILE)NodeGetPtr( pNode );
+
+ if( 0 == StringCompare( pMobile->pszIMSI, pszIMSI ) )
+ {
+ if( ppNode ) *ppNode = pNode;
+ return pMobile;
+ }
+ }
+
+ if( ppNode ) *ppNode = NULL;
+ return NULL;
+}
+
+/*
+ *
+ */
+PJCIPPHONE IpPhoneFindByName( char* pszName, PNODE* ppNode )
+{
+ PNODE pNode;
+ PJCIPPHONE pIPPhone;
+
+ ListForEachNode( pCfgTree->pListIPPhones, pNode )
+ {
+ pIPPhone = (PJCIPPHONE)NodeGetPtr( pNode );
+
+ if( 0 == StringCompare( pIPPhone->pszName, pszName ) )
+ {
+ if( ppNode ) *ppNode = pNode;
+ return pIPPhone;
+ }
+ }
+
+ if( ppNode ) *ppNode = NULL;
+ return NULL;
+}
+
+/*
+ *
+ */
+PJCIPPHONE IpPhoneFindByNumber( char* pszNumber )
+{
+ PNODE pNode;
+ PJCIPPHONE pIPPhone;
+
+ ListForEachNode( pCfgTree->pListIPPhones, pNode )
+ {
+ pIPPhone = (PJCIPPHONE)NodeGetPtr( pNode );
+
+ if( 0 == StringCompare( pIPPhone->pszNumber, pszNumber ) )
+ return pIPPhone;
+ }
+
+ return NULL;
+}
+
+/*
+ *
+ */
+PJCGATEWAY jcGatewayFindByName( char* pszName, PNODE* ppNode )
+{
+ PNODE pNode;
+ PJCGATEWAY pGateway;
+
+ ListForEachNode( pCfgTree->pListGateways, pNode )
+ {
+ pGateway = (PJCGATEWAY)NodeGetPtr( pNode );
+
+ if( 0 == StringCompare( pGateway->pszName, pszName ) )
+ {
+ if( ppNode ) *ppNode = pNode;
+ return pGateway;
+ }
+ }
+
+ if( ppNode ) *ppNode = NULL;
+ return NULL;
+}
+
+/*
+ *
+ */
+PJCGATEWAY jcGatewayFindByAddress( UINT32 ip, PNODE* ppNode )
+{
+ PNODE pNode;
+ PJCGATEWAY pGateway;
+ char buf[16];
+
+ gkaddIp2String( ip, buf );
+
+ ListForEachNode( pCfgTree->pListGateways, pNode )
+ {
+ pGateway = (PJCGATEWAY)NodeGetPtr( pNode );
+
+ if( 0 == StringCompare( pGateway->pszIPAddress, buf ) )
+ {
+ if( ppNode ) *ppNode = pNode;
+ return pGateway;
+ }
+ }
+
+ if( ppNode ) *ppNode = NULL;
+ return NULL;
+}
+
+/*
+ *
+ */
+PJCGATEWAY jcGatewayFindByNumber( char* Number )
+{
+ PNODE pNode;
+ PJCGATEWAY pGateway;
+
+ if( NULL == Number || Number[0] == '\0' )
+ return NULL;
+
+ ListForEachNode( pCfgTree->pListGateways, pNode )
+ {
+ pGateway = (PJCGATEWAY)NodeGetPtr( pNode );
+
+ if( 0 == strncmp( Number, pGateway->pszPrefix, pGateway->nPrefixSize ) )
+ return pGateway;
+ }
+
+ return NULL;
+}
+
+/*
+ *
+ */
+PJCMOBILE MobileFindByNumber( char* pszNumber )
+{
+ PNODE pNode;
+ PJCMOBILE pMobile;
+
+ ListForEachNode( pCfgTree->pListMobiles, pNode )
+ {
+ pMobile = (PJCMOBILE)NodeGetPtr( pNode );
+
+ if( 0 == StringCompare( pMobile->pszNumber, pszNumber ) )
+ return pMobile;
+ }
+
+ return NULL;
+}
+
+/*
+ *
+ */
+BOOL IpPhonesImport( char* pszFile, char* pszResult )
+{
+ FILE* pfd;
+ char pszLine[80], pszName[80], pszNumber[80], pszQ931Address[80];
+
+ if( NULL == pszFile )
+ {
+ strcpy( pszResult, "No filename specified" );
+ return FALSE;
+ }
+
+ if( NULL == ( pfd = fopen( pszFile, "rt" ) ) )
+ {
+ sprintf( pszResult, "Error opening file '%s'", pszFile );
+ return FALSE;
+ }
+
+ while( fgets( pszLine, 80, pfd ) )
+ if( 3 == sscanf( pszLine, " %s %s %s ", pszName, pszNumber, pszQ931Address ) )
+ IpPhoneAdd( pszName, pszNumber, pszQ931Address, NULL, pszResult );
+
+ fclose( pfd );
+
+ strcpy( pszResult, "IP phones import completed" );
+ return TRUE;
+}
+
+/*
+ *
+ */
+BOOL jcGatewaysImport( char* pszFile, char* pszResult )
+{
+ FILE* pfd;
+ char pszLine[80], pszName[80], pszPrefix[80], pszQ931Address[80];
+
+ if( NULL == pszFile )
+ {
+ strcpy( pszResult, "No filename specified" );
+ return FALSE;
+ }
+
+ if( NULL == ( pfd = fopen( pszFile, "rt" ) ) )
+ {
+ sprintf( pszResult, "Error opening file '%s'", pszFile );
+ return FALSE;
+ }
+
+ while( fgets( pszLine, 80, pfd ) )
+ if( 3 == sscanf( pszLine, " %s %s %s ", pszName, pszPrefix, pszQ931Address ) )
+ jcGatewayAdd( pszName, pszPrefix, pszQ931Address, FALSE, NULL, pszResult );
+
+ fclose( pfd );
+
+ strcpy( pszResult, "Gateways import completed" );
+ return TRUE;
+}
+
+/*
+ *
+ */
+BOOL IpPhoneAdd( char* pszName, char* pszNumber, char* pszQ931Address,
+ char* pszComment, char* pszResult )
+{
+ PJCIPPHONE pIpPhone;
+
+ if( pszName == NULL || pszNumber == NULL || pszQ931Address == NULL )
+ {
+ strcpy( pszResult, "Some parameters are not specified" );
+ return FALSE;
+ }
+
+ if( IpPhoneFindByName( pszName, NULL ) )
+ {
+ strcpy( pszResult, "Another IP phone exists with the same name" );
+ return FALSE;
+ }
+
+ if( jcNumberExists( pszNumber ) )
+ {
+ strcpy( pszResult, "Another entity exists with the same number" );
+ return FALSE;
+ }
+
+ DebugLog( "Adding IP phone '%s', number '%s', address '%s'\n",
+ pszName, pszNumber, pszQ931Address );
+
+ pIpPhone = New( JCIPPHONE );
+ pIpPhone->pszName = StringCreate( pszName );
+ pIpPhone->pszNumber = StringCreate( pszNumber );
+ pIpPhone->pszIPAddress = StringCreate( pszQ931Address );
+ pIpPhone->pszComment = StringCreate( pszComment );
+
+ ListAddTail( pCfgTree->pListIPPhones, pIpPhone );
+
+ sprintf( pszResult, "IP phone '%s' added", pszName );
+ return TRUE;
+}
+
+/*
+ *
+ */
+BOOL jcGatewayAdd( char* pszName, char* pszPrefix, char* pszIPAddress,
+ BOOL bStripPrefix, char* pszComment, char* pszResult )
+{
+ PJCGATEWAY pGateway;
+
+ if( pszName == NULL || pszPrefix == NULL || pszIPAddress == NULL )
+ {
+ strcpy( pszResult, "Some parameters are not specified" );
+ return FALSE;
+ }
+
+ if( jcGatewayFindByName( pszName, NULL ) )
+ {
+ strcpy( pszResult, "Another gateway exists with the same name" );
+ return FALSE;
+ }
+
+ if( jcGatewayFindByNumber( pszPrefix ) )
+ {
+ strcpy( pszResult, "Another gateway exists with the same prefix" );
+ return FALSE;
+ }
+
+ DebugLog( "Adding gateway '%s', prefix '%s', address '%s'\n", pszName, pszPrefix, pszIPAddress );
+
+ pGateway = New( JCGATEWAY );
+ pGateway->pszName = StringCreate( pszName );
+ pGateway->pszPrefix = StringCreate( pszPrefix );
+ pGateway->nPrefixSize = strlen( pszPrefix );
+ pGateway->pszIPAddress = StringCreate( pszIPAddress );
+ pGateway->bStripPrefix = bStripPrefix;
+ pGateway->pszComment = StringCreate( pszComment );
+
+ ListAddTail( pCfgTree->pListGateways, pGateway );
+
+ sprintf( pszResult, "Gateway '%s' added", pszName );
+ return TRUE;
+}
+
+/*
+ *
+ */
+BOOL jcGatewayDelete( PJCGATEWAY pGateway, PNODE pNode, char* pszResult )
+{
+
+ ListRemoveNode( pCfgTree->pListGateways, pNode );
+
+ StringDelete( pGateway->pszName );
+ StringDelete( pGateway->pszPrefix );
+ StringDelete( pGateway->pszIPAddress );
+ StringDelete( pGateway->pszComment );
+
+ Delete( pGateway );
+
+ strcpy( pszResult, "Gateway deleted" );
+ return TRUE;
+}
+
+/*
+ *
+ */
+void MngmCmdCallBack( pMngmCommandData_t pData )
+{
+ static JCNAMEDPROC Commands[] = {
+ "Add", MngmCmdAdd,
+ "Delete", MngmCmdDelete,
+ "Set", MngmCmdSet,
+ "Get", MngmCmdGet,
+ "Show", MngmCmdGet,
+ "Save", MngmCmdSave,
+ "Import", MngmCmdImport,
+ NULL, NULL
+ };
+
+ char *pszCommand, *pszParams;
+
+ if( NULL == ( pszCommand = StringToken( pData->pszInput, pszDelims, &pszParams ) ) )
+ {
+ strcpy( pData->pszOutput, "No command specified" );
+ pData->nOutput = FALSE;
+ return;
+ }
+
+ pData->nOutput = jcProcCallByName( pszCommand, Commands, 0, pszParams, NULL, pData->pszOutput );
+ return;
+}
+
+/*
+ *
+ */
+int jcProcCallByName( char* pszName, JCNAMEDPROC* pProcArray,
+ int nParam, char* pszParam, PVOID pParam, char* pszResult )
+{
+ for( ; pProcArray->pszProc; pProcArray++ )
+ {
+ if( 0 == StringICompare( pszName, pProcArray->pszProc ) )
+ return (*pProcArray->pfnProc)( nParam, pszParam, pParam, pszResult );
+ }
+
+ sprintf( pszResult, "Can't recognize '%s'", pszName );
+ return FALSE;
+}
+
+/*
+ *
+ */
+int MngmCmdNotImplemented( int nParam, char* pszParam, PVOID pParam, char* pszResult )
+{
+ strcpy( pszResult, "This command is not implemented" );
+ return FALSE;
+}
+
+/*
+ *
+ */
+int MngmCmdNoValue( char* pszResult )
+{
+ strcpy( pszResult, "The value is not specified" );
+ return FALSE;
+}
+
+/*
+ *
+ */
+int MngmCmdValueSetOK( char* pszResult )
+{
+ strcpy( pszResult, "The value was changed" );
+ return TRUE;
+}
+
+/*
+ *
+ */
+int MngmCmdAdd( int nParam, char* pszParam, PVOID pParam, char* pszResult )
+{
+ return MngmCmdRootObjs( jcMngmCmdAdd, pszParam, pszResult );
+}
+
+/*
+ *
+ */
+int MngmCmdDelete( int nParam, char* pszParam, PVOID pParam, char* pszResult )
+{
+ return MngmCmdRootObjs( jcMngmCmdDelete, pszParam, pszResult );
+}
+
+/*
+ *
+ */
+int MngmCmdSet( int nParam, char* pszParam, PVOID pParam, char* pszResult )
+{
+ return MngmCmdRootObjs( jcMngmCmdSet, pszParam, pszResult );
+}
+
+/*
+ *
+ */
+int MngmCmdGet( int nParam, char* pszParam, PVOID pParam, char* pszResult )
+{
+ return MngmCmdRootObjs( jcMngmCmdGet, pszParam, pszResult );
+}
+
+/*
+ *
+ */
+int MngmCmdImport( int nParam, char* pszParam, PVOID pParam, char* pszResult )
+{
+ return MngmCmdRootObjs( jcMngmCmdImport, pszParam, pszResult );
+}
+
+/*
+ * finds the object in configuration tree by path, calls appropriate function
+ */
+int MngmCmdRootObjs( int nCommand, char* pszParam, char* pszResult )
+{
+ static JCNAMEDPROC RootObjs[] = {
+ "MaxCalls", MngmCmdMaxCalls,
+ "RASPort", MngmCmdRASPort,
+ "Q931Port", MngmCmdQ931Port,
+ "RASResponseTimeout", MngmCmdRASResponseTimeout,
+ "Q931ResponseTimeout", MngmCmdQ931ResponseTimeout,
+ "Q931ConnectTimeout", MngmCmdQ931ConnectTimeout,
+ "GatekeeperID", MngmCmdGatekeeperID,
+ "TelnetPort", MngmCmdTelnetPort,
+ "IVRNumber", MngmCmdIVRNumber,
+ "IPPhones", MngmCmdIpPhones,
+ "Gateways", MngmCmdGateways,
+ "Mobiles", MngmCmdMobiles,
+ "ViperCells", MngmCmdViperCells,
+ NULL, NULL };
+
+ char *pszObjName;
+
+ if( NULL == ( pszObjName = StringToken( NULL, pszDelims, &pszParam ) ) )
+ {
+ strcpy( pszResult, "No configuration object specified" );
+ return FALSE;
+ }
+ else
+ return jcProcCallByName( pszObjName, RootObjs, nCommand, pszParam, NULL, pszResult );
+}
+
+/*
+ *
+ */
+int MngmCmdMaxCalls( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdIntGet( pCfgTree->nMaxCalls, pszResult );
+
+ case jcMngmCmdSet:
+ return MngmCmdIntSet( &pCfgTree->nMaxCalls, 1, 200, pszParam, pszResult );
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdRASPort( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdIntGet( pCfgTree->RASPort, pszResult );
+
+ case jcMngmCmdSet:
+ return MngmCmdIntSet( &pCfgTree->RASPort, 1025, 65535, pszParam, pszResult );
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdQ931Port( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdIntGet( pCfgTree->Q931Port, pszResult );
+
+ case jcMngmCmdSet:
+ return MngmCmdIntSet( &pCfgTree->Q931Port, 1025, 65535, pszParam, pszResult );
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdRASResponseTimeout( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdIntGet( pCfgTree->RASResponseTO, pszResult );
+
+ case jcMngmCmdSet:
+ return MngmCmdIntSet( &pCfgTree->RASResponseTO, 5, 360, pszParam, pszResult );
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdQ931ResponseTimeout( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdIntGet( pCfgTree->Q931ResponseTO, pszResult );
+
+ case jcMngmCmdSet:
+ return MngmCmdIntSet( &pCfgTree->Q931ResponseTO, 5, 360, pszParam, pszResult );
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdQ931ConnectTimeout( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdIntGet( pCfgTree->Q931ConnectTO, pszResult );
+
+ case jcMngmCmdSet:
+ return MngmCmdIntSet( &pCfgTree->Q931ConnectTO, 5, 360, pszParam, pszResult );
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdTelnetPort( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdIntGet( pCfgTree->TelnetPort, pszResult );
+
+ case jcMngmCmdSet:
+ return MngmCmdIntSet( &pCfgTree->TelnetPort, 1025, 65535, pszParam, pszResult );
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdGatekeeperID( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdStringGet( pCfgTree->pszGatekeeperID, pszResult );
+
+ case jcMngmCmdSet:
+ return MngmCmdStringSet( &pCfgTree->pszGatekeeperID, pszParam, pszResult );
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdIVRNumber( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdStringGet( pCfgTree->pszIVRNumber, pszResult );
+
+ case jcMngmCmdSet:
+ {
+ char* pszNumber;
+
+ if( NULL != ( pszNumber = StringToken( NULL, pszDelims, &pszParam ) ) &&
+ jcNumberExists( pszNumber ) )
+ {
+ strcpy( pszResult, "Another entity exists with the same number" );
+ return FALSE;
+ }
+
+ StringReplace( &pCfgTree->pszIVRNumber, pszNumber ); /* NULL is OK */
+
+ return MngmCmdValueSetOK( pszResult );
+ }
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdIntGet( int nSource, char* pszResult )
+{
+ sprintf( pszResult, "%d", nSource );
+ return TRUE;
+}
+
+/*
+ *
+ */
+int MngmCmdIntSet( int* pnTarget, int nMin, int nMax, char* pszParam, char* pszResult )
+{
+ int nValue;
+ char* pszValue;
+
+ if( NULL == ( pszValue = StringToken( NULL, pszDelims, &pszParam ) ) )
+ return MngmCmdNoValue( pszResult );
+
+ nValue = atoi( pszValue );
+
+ if( nValue < nMin || nValue > nMax )
+ {
+ sprintf( pszResult, "The value is out of valid range (%d...%d)", nMin, nMax );
+ return FALSE;
+ }
+
+ *pnTarget = nValue;
+
+ return MngmCmdValueSetOK( pszResult );
+}
+
+/*
+ *
+ */
+int MngmCmdStringGet( char* pszSource, char* pszResult )
+{
+ if( pszSource )
+ {
+ strcpy( pszResult, pszSource );
+ return TRUE;
+ }
+ else
+ {
+ strcpy( pszResult, "<no current value>" );
+ return FALSE;
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdStringSet( char** ppszTarget, char* pszParam, char* pszResult )
+{
+ char* pszValue;
+
+ if( NULL == ( pszValue = StringToken( NULL, pszDelims, &pszParam ) ) )
+ return MngmCmdNoValue( pszResult );
+
+ StringReplace( ppszTarget, pszValue );
+
+ return MngmCmdValueSetOK( pszResult );
+}
+
+/*
+ *
+ */
+int MngmCmdMobiles( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ char *pszIMSI, *pszNumber, *pszComment;
+ PNODE pNode;
+ char buf[128];
+
+ pszIMSI = StringToken( NULL, pszDelims, &pszParam );
+
+ switch( nCommand )
+ {
+ case jcMngmCmdAdd:
+ pszNumber = StringToken( NULL, pszDelims, &pszParam );
+ pszComment = StringToken( NULL, pszDelims, &pszParam );
+ return MobileAdd( pszIMSI, pszNumber, pszComment, 0, NULL, pszResult );
+
+ case jcMngmCmdGet:
+ if( pszIMSI == NULL ) /* mobiles list */
+ {
+ pszResult[0] = '\0';
+
+ ListForEachNode( pCfgTree->pListMobiles, pNode )
+ {
+ MngmCmdMobileGetAllParams( (PJCMOBILE)NodeGetPtr( pNode ), buf );
+ strcat( pszResult, buf );
+ strcat( pszResult, pszLineSeparator );
+ }
+
+ return TRUE;
+ }
+ else
+ return MngmCmdMobile( pszIMSI, nCommand, pszParam, pszResult );
+
+ case jcMngmCmdDelete:
+ case jcMngmCmdSet:
+ if( pszIMSI == NULL )
+ {
+ strcpy( pszResult, "No IMSI specified for the mobile" );
+ return FALSE;
+ }
+ else
+ return MngmCmdMobile( pszIMSI, nCommand, pszParam, pszResult );
+
+ case jcMngmCmdImport:
+ return MobilesImport( pszIMSI /* pszIMSI has filename in this case */, pszResult );
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdMobile( char* pszIMSI, int nCommand, char* pszParam, char* pszResult )
+{
+ static JCNAMEDPROC MobileObjs[] = {
+ "IMSI", MngmCmdMobileIMSI,
+ /* "Number", MngmCmdMobileNumber, blocked to avoid inconsistency with profile */
+ "Comment", MngmCmdMobileComment,
+ NULL, NULL };
+
+ PJCMOBILE pMobile;
+ PNODE pNode;
+ char* pszObj;
+
+ if( NULL == ( pMobile = MobileFindByIMSI( pszIMSI, &pNode ) ) )
+ {
+ sprintf( pszResult, "Mobile '%s' not found", pszIMSI );
+ return FALSE;
+ }
+
+ pszObj = StringToken( NULL, pszDelims, &pszParam );
+
+ switch( nCommand )
+ {
+ case jcMngmCmdDelete:
+ return MobileDelete( pMobile, pNode, pszResult );
+
+ case jcMngmCmdGet:
+ if( pszObj == NULL ) /* get all parameters for this mobile */
+ return MngmCmdMobileGetAllParams( pMobile, pszResult );
+ else
+ return jcProcCallByName( pszObj, MobileObjs, nCommand, pszParam, pMobile, pszResult );
+
+ case jcMngmCmdSet:
+ if( pszObj == NULL )
+ {
+ strcpy( pszResult, "No configuration object specified for the mobile" );
+ return FALSE;
+ }
+ else
+ return jcProcCallByName( pszObj, MobileObjs, nCommand, pszParam, pMobile, pszResult );
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdMobileGetAllParams( PJCMOBILE pMobile, char* pszResult )
+{
+ char *pszCellID, *pszComment;
+
+ if( pMobile->hReg == NULL )
+ pszCellID = "<offline>";
+ else
+ pszCellID = jcRegGetNames( pMobile->hReg );
+
+ pszComment = pMobile->pszComment ? pMobile->pszComment : "<no comment>";
+
+ sprintf( pszResult, "%s%s%s%s%s%s%s",
+ pMobile->pszIMSI, pszFieldSeparator,
+ pMobile->pszNumber, pszFieldSeparator,
+ pszComment, pszFieldSeparator,
+ pszCellID );
+
+ return TRUE;
+}
+
+/*
+ *
+ */
+int MngmCmdMobileIMSI( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ PJCMOBILE pMobile = (PJCMOBILE)pParam;
+
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdStringGet( pMobile->pszIMSI, pszResult );
+
+ case jcMngmCmdSet:
+ {
+ char* pszValue;
+
+ if( NULL == ( pszValue = StringToken( NULL, pszDelims, &pszParam ) ) )
+ return MngmCmdNoValue( pszResult );
+
+ if( MobileFindByIMSI( pszValue, NULL ) )
+ {
+ strcpy( pszResult, "Another mobile exists with the same IMSI" );
+ return FALSE;
+ }
+
+ StringReplace( &pMobile->pszIMSI, pszValue );
+ return MngmCmdValueSetOK( pszResult );
+ }
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdMobileNumber( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ PJCMOBILE pMobile = (PJCMOBILE)pParam;
+
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdStringGet( pMobile->pszNumber, pszResult );
+
+ case jcMngmCmdSet:
+ {
+ char* pszValue;
+
+ if( NULL == ( pszValue = StringToken( NULL, pszDelims, &pszParam ) ) )
+ return MngmCmdNoValue( pszResult );
+
+ if( jcNumberExists( pszValue ) )
+ {
+ strcpy( pszResult, "Another entity exists with the same number" );
+ return FALSE;
+ }
+
+ if( pMobile->hReg != NULL )
+ {
+ gkrgiDeleteAddress( pMobile->hReg, gkrgiParamPhone, gkrgiSttsDynamic,
+ pMobile->pszNumber );
+ gkrgiAddAddress( pMobile->hReg, gkrgiParamPhone, gkrgiSttsDynamic, pszValue );
+ }
+
+ StringReplace( &pMobile->pszNumber, pszValue );
+ return MngmCmdValueSetOK( pszResult );
+ }
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdMobileComment( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ PJCMOBILE pMobile = (PJCMOBILE)pParam;
+
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdStringGet( pMobile->pszComment, pszResult );
+
+ case jcMngmCmdSet:
+ return MngmCmdStringSet( &pMobile->pszComment, pszParam, pszResult );
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdSave( int nParam, char* pszParam, PVOID pParam, char* pszResult )
+{
+ char* pszFileName;
+ FILE* hFile;
+
+ if( NULL == ( pszFileName = StringToken( NULL, pszDelims, &pszParam ) ) )
+ pszFileName = pszDefaultDataFile;
+
+ if( NULL == ( hFile = fopen( pszFileName, "wb" ) ) )
+ {
+ sprintf( pszResult, "Unable to open file '%s'", pszFileName );
+ return FALSE;
+ }
+
+ if( FALSE == jcFileWriteString( hFile, pszDataFileHeader ) ||
+ FALSE == jcFileWriteUShort( hFile, JC_DATA_FILE_VERSION ) ||
+
+ FALSE == jcFileWriteUShort( hFile, (USHORT)pCfgTree->nMaxCalls ) ||
+ FALSE == jcFileWriteUShort( hFile, (USHORT)pCfgTree->RASPort ) ||
+ FALSE == jcFileWriteUShort( hFile, (USHORT)pCfgTree->Q931Port ) ||
+ FALSE == jcFileWriteUShort( hFile, (USHORT)pCfgTree->RASResponseTO ) ||
+ FALSE == jcFileWriteUShort( hFile, (USHORT)pCfgTree->Q931ResponseTO ) ||
+ FALSE == jcFileWriteUShort( hFile, (USHORT)pCfgTree->Q931ConnectTO ) ||
+ FALSE == jcFileWriteString( hFile, pCfgTree->pszGatekeeperID ) ||
+ FALSE == jcFileWriteUShort( hFile, (USHORT)pCfgTree->TelnetPort ) ||
+ FALSE == jcFileWriteString( hFile, pCfgTree->pszIVRNumber ) ||
+
+ FALSE == jcSaveIpPhones( hFile ) ||
+ FALSE == jcSaveGateways( hFile ) ||
+ FALSE == jcSaveMobiles( hFile ) )
+ {
+ fclose( hFile );
+ sprintf( pszResult, "Error to write to file '%s'", pszFileName );
+ return FALSE;
+ }
+
+ fclose( hFile );
+ strcpy( pszResult, "Configuration saved" );
+ return TRUE;
+}
+
+/*
+ *
+ */
+BOOL jcFileWriteBuf( FILE* hFile, UCHAR* buf, int nSize )
+{
+ return 1 == fwrite( buf, nSize, 1, hFile );
+}
+
+/*
+ *
+ */
+BOOL jcFileReadBuf( FILE* hFile, UCHAR* buf, int nSize )
+{
+ return 1 == fread( buf, nSize, 1, hFile );
+
+}
+
+/*
+ *
+ */
+BOOL jcFileWriteString( FILE* hFile, char* pszString )
+{
+ int nSize;
+
+ if( NULL == pszString )
+ nSize = 0;
+ else
+ nSize = strlen( pszString );
+
+ if( FALSE == jcFileWriteUShort( hFile, (USHORT)nSize ) )
+ return FALSE;
+
+ if( nSize > 0 )
+ return jcFileWriteBuf( hFile, (UCHAR*)pszString, nSize );
+ else
+ return TRUE;
+}
+
+/*
+ *
+ */
+char* jcFileReadString( FILE* hFile, char* pszString, int nMaxSize )
+{
+ int nSize;
+
+ if( 0 == ( nSize = jcFileReadUShort( hFile ) ) ||
+ nSize >= nMaxSize ||
+ FALSE == jcFileReadBuf( hFile, (UCHAR*)pszString, nSize ) )
+ {
+ pszString[0] = '\0';
+ return NULL;
+ }
+
+ pszString[nSize] = '\0';
+ return pszString;
+}
+
+/*
+ *
+ */
+BOOL jcFileWriteULong( FILE* hFile, ULONG uLong )
+{
+ UCHAR pszBuffer[4];
+
+ pszBuffer[0] = (UCHAR)( ( uLong >> 0 ) & 0xFF );
+ pszBuffer[1] = (UCHAR)( ( uLong >> 8 ) & 0xFF );
+ pszBuffer[2] = (UCHAR)( ( uLong >> 16 ) & 0xFF );
+ pszBuffer[3] = (UCHAR)( ( uLong >> 24 ) & 0xFF );
+
+ return jcFileWriteBuf( hFile, pszBuffer, 4 );
+}
+
+/*
+ *
+ */
+ULONG jcFileReadULong( FILE* hFile )
+{
+ UCHAR pszBuffer[4];
+
+ if( FALSE == jcFileReadBuf( hFile, pszBuffer, 4 ) )
+ return 0;
+ else
+ return ( (ULONG)pszBuffer[0] << 0 ) |
+ ( (ULONG)pszBuffer[1] << 8 ) |
+ ( (ULONG)pszBuffer[2] << 16 ) |
+ ( (ULONG)pszBuffer[3] << 24 );
+}
+
+/*
+ *
+ */
+BOOL jcFileWriteUShort( FILE* hFile, USHORT uShort )
+{
+ UCHAR pszBuffer[2];
+
+ pszBuffer[0] = (UCHAR)( ( uShort >> 0 ) & 0xFF );
+ pszBuffer[1] = (UCHAR)( ( uShort >> 8 ) & 0xFF );
+
+ return jcFileWriteBuf( hFile, pszBuffer, 2 );
+}
+
+/*
+ *
+ */
+USHORT jcFileReadUShort( FILE* hFile )
+{
+ UCHAR pszBuffer[2];
+
+ if( FALSE == jcFileReadBuf( hFile, pszBuffer, 2 ) )
+ return 0;
+ else
+ return ( (USHORT)pszBuffer[0] << 0 ) |
+ ( (USHORT)pszBuffer[1] << 8 );
+}
+
+/*
+ *
+ */
+BOOL jcSaveIpPhones( FILE* hFile )
+{
+ PNODE pNode;
+ PJCIPPHONE pIPPhone;
+
+ if( FALSE == jcFileWriteULong( hFile, ListGetCount( pCfgTree->pListIPPhones ) ) )
+ return FALSE;
+
+ ListForEachNode( pCfgTree->pListIPPhones, pNode )
+ {
+ pIPPhone = (PJCIPPHONE)NodeGetPtr( pNode );
+
+ if( FALSE == jcFileWriteString( hFile, pIPPhone->pszName ) ||
+ FALSE == jcFileWriteString( hFile, pIPPhone->pszNumber ) ||
+ FALSE == jcFileWriteString( hFile, pIPPhone->pszIPAddress ) ||
+ FALSE == jcFileWriteString( hFile, pIPPhone->pszComment ) )
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/*
+ *
+ */
+BOOL jcSaveGateways( FILE* hFile )
+{
+ PNODE pNode;
+ PJCGATEWAY pGateway;
+
+ if( FALSE == jcFileWriteULong( hFile, ListGetCount( pCfgTree->pListGateways ) ) )
+ return FALSE;
+
+ ListForEachNode( pCfgTree->pListGateways, pNode )
+ {
+ pGateway = (PJCGATEWAY)NodeGetPtr( pNode );
+
+ if( FALSE == jcFileWriteString( hFile, pGateway->pszName ) ||
+ FALSE == jcFileWriteString( hFile, pGateway->pszPrefix ) ||
+ FALSE == jcFileWriteString( hFile, pGateway->pszIPAddress ) ||
+ FALSE == jcFileWriteUShort( hFile, (USHORT)pGateway->bStripPrefix ) ||
+ FALSE == jcFileWriteString( hFile, pGateway->pszComment ) )
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/*
+ *
+ */
+BOOL jcSaveMobiles( FILE* hFile )
+{
+ PNODE pNode;
+ PJCMOBILE pMobile;
+
+ if( FALSE == jcFileWriteULong( hFile, ListGetCount( pCfgTree->pListMobiles ) ) )
+ return FALSE;
+
+ ListForEachNode( pCfgTree->pListMobiles, pNode )
+ {
+ pMobile = (PJCMOBILE)NodeGetPtr( pNode );
+
+ if( FALSE == jcFileWriteString( hFile, pMobile->pszIMSI ) ||
+ FALSE == jcFileWriteString( hFile, pMobile->pszNumber ) ||
+ FALSE == jcFileWriteString( hFile, pMobile->pszComment ) ||
+ FALSE == jcFileWriteUShort( hFile, pMobile->nProfileSize ) )
+ return FALSE;
+
+ if( pMobile->nProfileSize > 0 )
+ if( FALSE == jcFileWriteBuf( hFile, (UCHAR*)pMobile->ProfileData, pMobile->nProfileSize ) )
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/*
+ *
+ */
+FILE* jcOpenConfigFile( char* pszFileName, USHORT* pnVersion )
+{
+ FILE* hFile;
+ char pszBuffer[128];
+
+ if( NULL == pszFileName ) pszFileName = pszDefaultDataFile;
+
+ if( NULL == ( hFile = fopen( pszFileName, "rb" ) ) )
+ {
+ StringPrint( "Unable to open file '%s'\n", pszFileName );
+ return NULL;
+ }
+
+ if( NULL == jcFileReadString( hFile, pszBuffer, 128 ) ||
+ 0 != StringCompare( pszBuffer, pszDataFileHeader ) )
+ {
+ fclose( hFile );
+ StringPrint( "The file '%s' is not %s\n", pszFileName, pszDataFileHeader );
+ return NULL;
+ }
+
+ if( ( *pnVersion = jcFileReadUShort( hFile ) ) > JC_DATA_FILE_VERSION )
+ {
+ fclose( hFile );
+ StringPrint( "Main Data File Version: %d, Supported: %d\n",
+ *pnVersion, JC_DATA_FILE_VERSION );
+ return NULL;
+ }
+ else
+ return hFile;
+}
+
+/*
+ *
+ */
+BOOL jcReadIpPhones( FILE* hFile, USHORT nVersion )
+{
+ char Name[256], Number[256], IPAddress[256], Comment[256], Result[256];
+ char *pszName, *pszNumber, *pszIPAddress, *pszComment;
+ ULONG nCount;
+
+ nCount = jcFileReadULong( hFile );
+
+ while( ( nCount-- ) > 0 )
+ {
+ pszName = jcFileReadString( hFile, Name, 256 );
+ pszNumber = jcFileReadString( hFile, Number, 256 );
+ pszIPAddress = jcFileReadString( hFile, IPAddress, 256 );
+ pszComment = jcFileReadString( hFile, Comment, 256 );
+
+ IpPhoneAdd( pszName, pszNumber, pszIPAddress, pszComment, Result );
+ }
+
+ return TRUE;
+}
+
+/*
+ *
+ */
+BOOL jcReadGateways( FILE* hFile, USHORT nVersion )
+{
+ char Name[256], Prefix[256], IPAddress[256], Comment[256], Result[256];
+ char *pszName, *pszPrefix, *pszIPAddress, *pszComment;
+
+ BOOL bStripPrefix;
+ ULONG nCount;
+
+ nCount = jcFileReadULong( hFile );
+
+ while( ( nCount-- ) > 0 )
+ {
+ pszName = jcFileReadString( hFile, Name, 256 );
+ pszPrefix = jcFileReadString( hFile, Prefix, 256 );
+ pszIPAddress = jcFileReadString( hFile, IPAddress, 256 );
+ bStripPrefix = jcFileReadUShort( hFile );
+ pszComment = jcFileReadString( hFile, Comment, 256 );
+
+ jcGatewayAdd( pszName, pszPrefix, pszIPAddress, bStripPrefix, pszComment, Result );
+ }
+
+ return TRUE;
+}
+
+/*
+ *
+ */
+BOOL jcReadMobiles( FILE* hFile, USHORT nVersion )
+{
+ char IMSI[256], Number[256], Comment[256], Result[256], Buffer[16*1024];
+ char *pszIMSI, *pszNumber, *pszComment;
+ ULONG nCount;
+ USHORT nProfileSize;
+
+ nCount = jcFileReadULong( hFile );
+
+ while( ( nCount-- ) > 0 )
+ {
+ pszIMSI = jcFileReadString( hFile, IMSI, 256 );
+ pszNumber = jcFileReadString( hFile, Number, 256 );
+ pszComment = jcFileReadString( hFile, Comment, 256 );
+
+ if( nVersion > 0 && ( nProfileSize = jcFileReadUShort( hFile ) ) > 0 )
+ {
+ jcFileReadBuf( hFile, (UCHAR*)Buffer, nProfileSize );
+ MobileAdd( pszIMSI, pszNumber, pszComment, nProfileSize, Buffer, Result );
+ }
+ else
+ {
+ MobileAdd( pszIMSI, pszNumber, pszComment, 0, NULL, Result );
+ }
+ }
+
+ return TRUE;
+}
+
+/*
+ *
+ */
+int MngmCmdIpPhones( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ char *pszName, *pszNumber, *pszIPAddress, *pszComment;
+ PNODE pNode;
+ char buf[128];
+
+ pszName = StringToken( NULL, pszDelims, &pszParam );
+
+ switch( nCommand )
+ {
+ case jcMngmCmdAdd:
+ pszNumber = StringToken( NULL, pszDelims, &pszParam );
+ pszIPAddress = StringToken( NULL, pszDelims, &pszParam );
+ pszComment = StringToken( NULL, pszDelims, &pszParam );
+ return IpPhoneAdd( pszName, pszNumber, pszIPAddress, pszComment, pszResult );
+
+ case jcMngmCmdGet:
+ if( pszName == NULL ) /* IP Phones list */
+ {
+ pszResult[0] = '\0';
+
+ ListForEachNode( pCfgTree->pListIPPhones, pNode )
+ {
+ MngmCmdIpPhoneGetAllParams( (PJCIPPHONE)NodeGetPtr( pNode ), buf );
+ strcat( pszResult, buf );
+ strcat( pszResult, pszLineSeparator );
+ }
+
+ return TRUE;
+ }
+ else
+ return MngmCmdIpPhone( pszName, nCommand, pszParam, pszResult );
+
+ case jcMngmCmdDelete:
+ case jcMngmCmdSet:
+ if( pszName == NULL )
+ {
+ strcpy( pszResult, "No name specified for the IP phone" );
+ return FALSE;
+ }
+ else
+ return MngmCmdIpPhone( pszName, nCommand, pszParam, pszResult );
+
+ case jcMngmCmdImport:
+ return IpPhonesImport( pszName /* pszName has filename in this case */, pszResult );
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdIpPhoneGetAllParams( PJCIPPHONE pIPPhone, char* pszResult )
+{
+ sprintf( pszResult, "%s%s%s%s%s%s%s",
+ pIPPhone->pszName, pszFieldSeparator,
+ pIPPhone->pszNumber, pszFieldSeparator,
+ pIPPhone->pszIPAddress, pszFieldSeparator,
+ pIPPhone->pszComment ? pIPPhone->pszComment : "<no comment>" );
+ return TRUE;
+}
+
+/*
+ *
+ */
+int MngmCmdIpPhone( char* pszName, int nCommand, char* pszParam, char* pszResult )
+{
+ static JCNAMEDPROC IpPhoneObjs[] = {
+ "Name", MngmCmdIpPhoneName,
+ "Number", MngmCmdIpPhoneNumber,
+ "IPAddress", MngmCmdIpPhoneIPAddress,
+ "Comment", MngmCmdIpPhoneComment,
+ NULL, NULL };
+
+ PJCIPPHONE pIPPhone;
+ PNODE pNode;
+ char* pszObj;
+
+ if( NULL == ( pIPPhone = IpPhoneFindByName( pszName, &pNode ) ) )
+ {
+ sprintf( pszResult, "IP phone '%s' not found", pszName );
+ return FALSE;
+ }
+
+ pszObj = StringToken( NULL, pszDelims, &pszParam );
+
+ switch( nCommand )
+ {
+ case jcMngmCmdDelete:
+ return IpPhoneDelete( pIPPhone, pNode, pszResult );
+
+ case jcMngmCmdGet:
+ if( pszObj == NULL ) /* get all parameters for this IP Phone */
+ return MngmCmdIpPhoneGetAllParams( pIPPhone, pszResult );
+ else
+ return jcProcCallByName( pszObj, IpPhoneObjs, nCommand, pszParam, pIPPhone, pszResult );
+
+ case jcMngmCmdSet:
+ if( pszObj == NULL )
+ {
+ strcpy( pszResult, "No configuration object specified for the IP phone" );
+ return FALSE;
+ }
+ else
+ return jcProcCallByName( pszObj, IpPhoneObjs, nCommand, pszParam, pIPPhone, pszResult );
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdIpPhoneName( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ PJCIPPHONE pIPPhone = (PJCIPPHONE)pParam;
+
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdStringGet( pIPPhone->pszName, pszResult );
+
+ case jcMngmCmdSet:
+ {
+ char* pszValue;
+
+ if( NULL == ( pszValue = StringToken( NULL, pszDelims, &pszParam ) ) )
+ return MngmCmdNoValue( pszResult );
+
+ if( IpPhoneFindByName( pszValue, NULL ) )
+ {
+ strcpy( pszResult, "Another IP phone exists with the same name" );
+ return FALSE;
+ }
+
+ StringReplace( &pIPPhone->pszName, pszValue );
+ return MngmCmdValueSetOK( pszResult );
+ }
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdIpPhoneNumber( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ PJCIPPHONE pIPPhone = (PJCIPPHONE)pParam;
+
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdStringGet( pIPPhone->pszNumber, pszResult );
+
+ case jcMngmCmdSet:
+ {
+ char* pszValue;
+
+ if( NULL == ( pszValue = StringToken( NULL, pszDelims, &pszParam ) ) )
+ return MngmCmdNoValue( pszResult );
+
+ if( jcNumberExists( pszValue ) )
+ {
+ strcpy( pszResult, "Another entity exists with the same number" );
+ return FALSE;
+ }
+
+ StringReplace( &pIPPhone->pszNumber, pszValue );
+ return MngmCmdValueSetOK( pszResult );
+ }
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+/*
+ *
+ */
+int MngmCmdIpPhoneIPAddress( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ PJCIPPHONE pIPPhone = (PJCIPPHONE)pParam;
+
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdStringGet( pIPPhone->pszIPAddress, pszResult );
+
+ case jcMngmCmdSet:
+ return MngmCmdStringSet( &pIPPhone->pszIPAddress, pszParam, pszResult );
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdIpPhoneComment( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ PJCIPPHONE pIPPhone = (PJCIPPHONE)pParam;
+
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdStringGet( pIPPhone->pszComment, pszResult );
+
+ case jcMngmCmdSet:
+ return MngmCmdStringSet( &pIPPhone->pszComment, pszParam, pszResult );
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdGateways( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ char *pszName, *pszPrefix, *pszIPAddress, *pszStripPrefix, *pszComment;
+ BOOL bStripPrefix;
+ PNODE pNode;
+ char buf[128];
+
+ pszName = StringToken( NULL, pszDelims, &pszParam );
+
+ switch( nCommand )
+ {
+ case jcMngmCmdAdd:
+ pszPrefix = StringToken( NULL, pszDelims, &pszParam );
+ pszIPAddress = StringToken( NULL, pszDelims, &pszParam );
+ pszStripPrefix = StringToken( NULL, pszDelims, &pszParam );
+ pszComment = StringToken( NULL, pszDelims, &pszParam );
+
+ bStripPrefix = ( 0 == StringICompare( pszStripPrefix, "yes" ) );
+
+ return jcGatewayAdd( pszName, pszPrefix, pszIPAddress,
+ bStripPrefix, pszComment, pszResult );
+
+ case jcMngmCmdGet:
+ if( pszName == NULL ) /* gateways list */
+ {
+ pszResult[0] = '\0';
+
+ ListForEachNode( pCfgTree->pListGateways, pNode )
+ {
+ MngmCmdGatewayGetAllParams( (PJCGATEWAY)NodeGetPtr( pNode ), buf );
+ strcat( pszResult, buf );
+ strcat( pszResult, pszLineSeparator );
+ }
+
+ return TRUE;
+ }
+ else
+ return MngmCmdGateway( pszName, nCommand, pszParam, pszResult );
+
+ case jcMngmCmdDelete:
+ case jcMngmCmdSet:
+ if( pszName == NULL )
+ {
+ strcpy( pszResult, "No name specified for the gateway" );
+ return FALSE;
+ }
+ else
+ return MngmCmdGateway( pszName, nCommand, pszParam, pszResult );
+
+ case jcMngmCmdImport:
+ return jcGatewaysImport( pszName /* pszName has filename in this case */, pszResult );
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdGateway( char* pszName, int nCommand, char* pszParam, char* pszResult )
+{
+ static JCNAMEDPROC GatewayObjs[] = {
+ "Name", MngmCmdGatewayName,
+ "Prefix", MngmCmdGatewayPrefix,
+ "IPAddress", MngmCmdGatewayIPAddress,
+ "StripPrefix", MngmCmdGatewayStripPrefix,
+ "Comment", MngmCmdGatewayComment,
+ NULL, NULL };
+
+ PJCGATEWAY pGateway;
+ PNODE pNode;
+ char* pszObj;
+
+ if( NULL == ( pGateway = jcGatewayFindByName( pszName, &pNode ) ) )
+ {
+ sprintf( pszResult, "Gateway '%s' not found", pszName );
+ return FALSE;
+ }
+
+ pszObj = StringToken( NULL, pszDelims, &pszParam );
+
+ switch( nCommand )
+ {
+ case jcMngmCmdDelete:
+ return jcGatewayDelete( pGateway, pNode, pszResult );
+
+ case jcMngmCmdGet:
+ if( pszObj == NULL ) /* get all parameters for this gateway */
+ return MngmCmdGatewayGetAllParams( pGateway, pszResult );
+ else
+ return jcProcCallByName( pszObj, GatewayObjs, nCommand, pszParam, pGateway, pszResult );
+
+ case jcMngmCmdSet:
+ if( pszObj == NULL )
+ {
+ strcpy( pszResult, "No configuration object specified for the gateway" );
+ return FALSE;
+ }
+ else
+ return jcProcCallByName( pszObj, GatewayObjs, nCommand, pszParam, pGateway, pszResult );
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdGatewayGetAllParams( PJCGATEWAY pGateway, char* pszResult )
+{
+ sprintf( pszResult, "%s%s%s%s%s%s%s%s%s",
+ pGateway->pszName, pszFieldSeparator,
+ pGateway->pszPrefix, pszFieldSeparator,
+ pGateway->pszIPAddress, pszFieldSeparator,
+ pGateway->bStripPrefix ? "yes" : "no", pszFieldSeparator,
+ pGateway->pszComment ? pGateway->pszComment : "<no comment>" );
+ return TRUE;
+}
+
+/*
+ *
+ */
+int MngmCmdGatewayName( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ PJCGATEWAY pGateway = (PJCGATEWAY)pParam;
+
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdStringGet( pGateway->pszName, pszResult );
+
+ case jcMngmCmdSet:
+ {
+ char* pszValue;
+
+ if( NULL == ( pszValue = StringToken( NULL, pszDelims, &pszParam ) ) )
+ return MngmCmdNoValue( pszResult );
+
+ if( jcGatewayFindByName( pszValue, NULL ) )
+ {
+ strcpy( pszResult, "Another gateway exists with the same name" );
+ return FALSE;
+ }
+
+ StringReplace( &pGateway->pszName, pszValue );
+ return MngmCmdValueSetOK( pszResult );
+ }
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdGatewayPrefix( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ PJCGATEWAY pGateway = (PJCGATEWAY)pParam;
+
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdStringGet( pGateway->pszPrefix, pszResult );
+
+ case jcMngmCmdSet:
+ {
+ char* pszValue;
+
+ if( NULL == ( pszValue = StringToken( NULL, pszDelims, &pszParam ) ) )
+ return MngmCmdNoValue( pszResult );
+
+ if( jcGatewayFindByNumber( pszValue ) )
+ {
+ strcpy( pszResult, "Another gateway exists with the same prefix" );
+ return FALSE;
+ }
+
+ StringReplace( &pGateway->pszPrefix, pszValue );
+ pGateway->nPrefixSize = strlen( pszValue );
+ return MngmCmdValueSetOK( pszResult );
+ }
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdGatewayIPAddress( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ PJCGATEWAY pGateway = (PJCGATEWAY)pParam;
+
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdStringGet( pGateway->pszIPAddress, pszResult );
+
+ case jcMngmCmdSet:
+ return MngmCmdStringSet( &pGateway->pszIPAddress, pszParam, pszResult );
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdGatewayStripPrefix( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ PJCGATEWAY pGateway = (PJCGATEWAY)pParam;
+
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdStringGet( pGateway->bStripPrefix ? "yes" : "no", pszResult );
+
+ case jcMngmCmdSet:
+ {
+ char* pszValue;
+
+ if( NULL == ( pszValue = StringToken( NULL, pszDelims, &pszParam ) ) )
+ return MngmCmdNoValue( pszResult );
+
+ pGateway->bStripPrefix = ( 0 == StringICompare( pszValue, "yes" ) );
+
+ return MngmCmdValueSetOK( pszResult );
+ }
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdGatewayComment( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ PJCGATEWAY pGateway = (PJCGATEWAY)pParam;
+
+ switch( nCommand )
+ {
+ case jcMngmCmdGet:
+ return MngmCmdStringGet( pGateway->pszComment, pszResult );
+
+ case jcMngmCmdSet:
+ return MngmCmdStringSet( &pGateway->pszComment, pszParam, pszResult );
+
+ default:
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+ }
+}
+
+/*
+ *
+ */
+int MngmCmdViperCells( int nCommand, char* pszParam, PVOID pParam, char* pszResult )
+{
+ gkHREG hReg;
+ gkHAPPREG haReg;
+ char buf[128];
+
+ if( nCommand == jcMngmCmdGet )
+ {
+ pszResult[0] = '\0';
+
+ if( GKRGI_OK != gkrgiGetFirstEntryHandle( &hReg, &haReg ) )
+ return TRUE;
+
+ do
+ {
+ MngmCmdViperCellGetAllParams( hReg, buf );
+ strcat( pszResult, buf );
+ strcat( pszResult, pszLineSeparator );
+
+ }while( GKRGI_OK == gkrgiGetNextEntryHandle( hReg, &hReg, &haReg ) );
+
+ return TRUE;
+ }
+ else
+ return MngmCmdNotImplemented( nCommand, pszParam, NULL, pszResult );
+}
+
+/*
+ *
+ */
+int MngmCmdViperCellGetAllParams( gkHREG hReg, char* pszResult )
+{
+ char* pszNames;
+ gkaddTransport_t TransRAS;
+ int nMobiles;
+ char pszIP[16];
+
+ pszNames = jcRegGetNames( hReg );
+
+ if( GKRGI_OK == gkrgiGetParameter( hReg, gkrgiParamRAS, gkrgiSttsDynamic, 1, &TransRAS ) )
+ gkaddIp2String( TransRAS.ip, pszIP );
+ else
+ strcpy( pszIP, "<unknown>" );
+
+ if( GKRGI_OK != gkrgiGetNumberOfAddresses( hReg, gkrgiParamPhone, gkrgiSttsDynamic, &nMobiles ) )
+ nMobiles = 0;
+
+ sprintf( pszResult, "%s%s%s%s%d",
+ pszNames, pszFieldSeparator,
+ pszIP, pszFieldSeparator,
+ nMobiles );
+
+ return TRUE;
+}
+
+/*
+ *
+ */
+BOOL jcNumberExists( char* pszNumber )
+{
+ if( MobileFindByNumber( pszNumber ) ||
+ IpPhoneFindByNumber( pszNumber ) ||
+ jcGatewayFindByNumber( pszNumber ) ||
+ 0 == StringCompare( pCfgTree->pszIVRNumber, pszNumber ) )
+ return TRUE;
+ else
+ return FALSE;
+}
+
+/*
+ *
+ */
+void MngmAPICallBack( pMngmCommandData_t pApiData )
+{
+ char *pszBuffer, *pszIMSI;
+ int nSize;
+ USHORT nProfileSize;
+ char IMSI[16], Number[32];
+ long nRequestID;
+ PJCMOBILE pMobile;
+ char Buffer[16*1024];
+
+ pszBuffer = pApiData->pszInput;
+
+ if( MNGM_API_VERSION != jcUShortUnpack( &pszBuffer ) )
+ {
+ DebugLog( "MngmAPICallBack(): wrong protocol or corrupted message\n" );
+ pApiData->nOutput = 0; /* error, no response will be sent */
+ return;
+ }
+
+ switch( jcUShortUnpack( &pszBuffer ) )
+ {
+ case MngmMsgRequestGeneric:
+ {
+ MngmCommandData_t CommandData;
+
+ nRequestID = jcULongUnpack( &pszBuffer );
+
+ CommandData.pszInput = pszBuffer;
+ CommandData.pszOutput = Buffer;
+ MngmCmdCallBack( &CommandData );
+
+ jcMngmResponseGenericPack( pApiData, nRequestID,
+ (short)CommandData.nOutput, CommandData.pszOutput );
+ return;
+ }
+
+ case MngmMsgRequestGetMobileProfile:
+ {
+ nRequestID = jcULongUnpack( &pszBuffer );
+ pszIMSI = jcStringUnpack( &pszBuffer );
+
+ pMobile = MobileFindByIMSI( pszIMSI, NULL );
+
+ pszBuffer = pApiData->pszOutput;
+ nSize = 0;
+ jcUShortPack( MNGM_API_VERSION, &pszBuffer, &nSize );
+ jcUShortPack( MngmMsgResponseGetMobileProfile, &pszBuffer, &nSize );
+ jcULongPack( nRequestID, &pszBuffer, &nSize );
+
+ if( pMobile == NULL || pMobile->nProfileSize == 0 )
+ {
+ jcUShortPack( 0, &pszBuffer, &nSize );
+ }
+ else
+ {
+ jcUShortPack( pMobile->nProfileSize, &pszBuffer, &nSize );
+ memcpy( pszBuffer, pMobile->ProfileData, pMobile->nProfileSize );
+ nSize += pMobile->nProfileSize;
+ }
+
+ pApiData->nOutput = nSize;
+ return;
+ }
+
+ case MngmMsgRequestSetMobileProfile:
+ {
+ nRequestID = jcULongUnpack( &pszBuffer );
+ nProfileSize = jcUShortUnpack( &pszBuffer );
+
+ if( nProfileSize <= 0 ||
+ FALSE == jcMobileProfileGetParams( pszBuffer, nProfileSize, IMSI, Number ) ||
+ NULL == ( pMobile = MobileFindByIMSI( IMSI, NULL ) ) )
+ {
+ jcMngmResponseGenericPack( pApiData, nRequestID, 0, "Wrong profile or unknown mobile" );
+ return;
+ }
+
+ if( 0 != StringCompare( pMobile->pszNumber, Number ) ) /* number has changed */
+ {
+ if( FALSE == MngmCmdMobileNumber( jcMngmCmdSet, Number, (PVOID)pMobile, Buffer ) )
+ {
+ jcMngmResponseGenericPack( pApiData, nRequestID, 0, Buffer );
+ return;
+ }
+ }
+
+ if( nProfileSize != pMobile->nProfileSize )
+ {
+ SpecialFree( pMobile->ProfileData );
+ pMobile->ProfileData = SpecialAlloc( nProfileSize );
+ pMobile->nProfileSize = nProfileSize;
+ }
+ memcpy( pMobile->ProfileData, pszBuffer, nProfileSize );
+ jcMngmResponseGenericPack( pApiData, nRequestID, 1, "The profile was changed" );
+
+ if( pMobile->hReg != NULL )
+ jcgkNonStdRasSendProfile( pMobile->hReg, (NSRASHANDLE)pMobile, pMobile->hMobileCell,
+ pMobile->nProfileSize, pMobile->ProfileData );
+ return;
+ }
+
+ case MngmMsgRequestAddMobileProfile:
+ {
+ nRequestID = jcULongUnpack( &pszBuffer );
+ nProfileSize = jcUShortUnpack( &pszBuffer );
+
+ if( nProfileSize <= 0 ||
+ FALSE == jcMobileProfileGetParams( pszBuffer, nProfileSize, IMSI, Number ) )
+ {
+ jcMngmResponseGenericPack( pApiData, nRequestID, 0, "Wrong profile" );
+ return;
+ }
+
+ jcMngmResponseGenericPack( pApiData, nRequestID,
+ (short)MobileAdd( IMSI, Number, NULL, nProfileSize, pszBuffer, Buffer ), Buffer );
+ return;
+ }
+
+ default:
+ {
+ DebugLog( "MngmAPICallBack(): unsupported message\n" );
+ pApiData->nOutput = 0; /* error, no response will be sent */
+ return;
+ }
+ }
+
+ return;
+}
+
+/*
+ *
+ */
+BOOL jcMobileProfileGetParams( char* pszProfile, USHORT nProfileSize,
+ char* pszIMSI, char* pszNumber )
+{
+ T_SUBSC_INFO SubscrInfo;
+
+ if( 0 != DecodeSubscInfo( pszProfile, nProfileSize, &SubscrInfo ) )
+ return FALSE;
+
+ memcpy( pszIMSI, SubscrInfo.imsi.mcc, 3 );
+ memcpy( pszIMSI + 3, SubscrInfo.imsi.mnc, 2 );
+ memcpy( pszIMSI + 5, SubscrInfo.imsi.msin, 10 );
+ pszIMSI[15] = '\0';
+
+ memcpy( pszNumber, SubscrInfo.msisdn.digits, SubscrInfo.msisdn.num_digit );
+ pszNumber[SubscrInfo.msisdn.num_digit] = '\0';
+
+ return TRUE;
+}
+
+/*
+ *
+ */
+void jcMngmResponseGenericPack( pMngmCommandData_t pApiData,
+ long nRequestID, short nResult, char* pszTextData )
+{
+ char *pszBuffer;
+ int nSize;
+
+ pszBuffer = pApiData->pszOutput;
+ nSize = 0;
+
+ jcUShortPack( MNGM_API_VERSION, &pszBuffer, &nSize );
+ jcUShortPack( MngmMsgResponseGeneric, &pszBuffer, &nSize );
+ jcULongPack( nRequestID, &pszBuffer, &nSize );
+ jcUShortPack( nResult, &pszBuffer, &nSize );
+ jcStringPack( pszTextData, &pszBuffer, &nSize );
+
+ pApiData->nOutput = nSize;
+ return;
+}
diff --git a/data/mnet/GP10/Host/ViperBase/admin.h b/data/mnet/GP10/Host/ViperBase/admin.h
new file mode 100644
index 0000000..960dff4
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperBase/admin.h
@@ -0,0 +1,210 @@
+/* admin.h
+ *
+ */
+
+#define JC_DATA_FILE_VERSION 2
+/* 0 - initial version;
+ * 1 - mobile subscriber profile added;
+ * 2 - pszIVRNumber added
+ */
+
+typedef struct
+{
+ int nMaxCalls;
+ int RASPort;
+ int Q931Port;
+ int RASResponseTO;
+ int Q931ResponseTO;
+ int Q931ConnectTO;
+ PSTR pszGatekeeperID;
+ int TelnetPort;
+ PSTR pszIVRNumber;
+
+ PLIST pListIPPhones; /* JCIPPHONE */
+ PLIST pListGateways; /* JCGATEWAY */
+ PLIST pListMobiles; /* JCMOBILE */
+
+}JCCONFIG, *PJCCONFIG;
+
+typedef struct
+{
+ PSTR pszIMSI;
+ PSTR pszNumber;
+ PSTR pszComment;
+
+ USHORT nProfileSize;
+ void* ProfileData;
+
+ gkHREG hReg; /* has ViperCell the mobile currently belongs to */
+ NSRASHANDLE hMobileCell; /* ViperCell's mobile handle */
+
+}JCMOBILE, *PJCMOBILE;
+
+typedef struct
+{
+ PSTR pszName;
+ PSTR pszNumber;
+ PSTR pszIPAddress;
+ PSTR pszComment;
+
+}JCIPPHONE, *PJCIPPHONE;
+
+typedef struct
+{
+ PSTR pszName;
+ PSTR pszPrefix;
+ size_t nPrefixSize;
+ PSTR pszIPAddress;
+ BOOL bStripPrefix;
+ PSTR pszComment;
+
+}JCGATEWAY, *PJCGATEWAY;
+
+typedef enum
+{
+ jcMngmCmdAdd,
+ jcMngmCmdDelete,
+ jcMngmCmdSet,
+ jcMngmCmdGet,
+ jcMngmCmdSave,
+ jcMngmCmdImport
+
+}jcMngmCmd_t;
+
+/* "Named Proc" mechanism, calls function by name provided as text string */
+
+typedef int (*pfnCommand_t)( int nParam, char* pszParam, PVOID pParam, char* pszResult );
+
+typedef struct
+{
+ char* pszProc;
+ pfnCommand_t pfnProc;
+
+}JCNAMEDPROC, *PJCNAMEDPROC;
+
+int jcProcCallByName( char* pszName, JCNAMEDPROC* pProcArray,
+ int nParam, char* pszParam, PVOID pParam, char* pszResult );
+
+BOOL EndpointsPrint( void );
+BOOL EndpointPrint( gkHREG );
+char* TransAddrToString( gkaddTransport_t*, char* Buffer ); /* returns Buffer */
+
+BOOL MobilesImport( char* pszFile, char* pszResult );
+BOOL IpPhonesImport( char* pszFile, char* pszResult );
+BOOL jcGatewaysImport( char* pszFile, char* pszResult );
+BOOL MobileAdd( char* pszIMSI, char* pszNumber, char* pszComment,
+ USHORT nProfileSize, void* ProfileData, char* pszResult );
+BOOL MobileDelete( PJCMOBILE, PNODE, char* pszResult );
+BOOL IpPhoneAdd( char* pszName, char* pszNumber, char* pszQ931Address,
+ char* pszComment, char* pszResult );
+BOOL IpPhoneDelete( PJCIPPHONE, PNODE pNode, char* pszResult );
+BOOL jcGatewayAdd( char* pszName, char* pszPrefix, char* pszIPAddress,
+ BOOL bStripPrefix, char* pszComment, char* pszResult );
+BOOL jcGatewayDelete( PJCGATEWAY, PNODE pNode, char* pszResult );
+PJCMOBILE MobileFindByIMSI( char* pszName, PNODE* );
+PJCMOBILE MobileFindByNumber( char* pszNumber );
+PJCIPPHONE IpPhoneFindByName( char* pszName, PNODE* );
+PJCIPPHONE IpPhoneFindByNumber( char* pszNumber );
+PJCGATEWAY jcGatewayFindByName( char* pszName, PNODE* );
+PJCGATEWAY jcGatewayFindByAddress( UINT32 ip, PNODE* );
+PJCGATEWAY jcGatewayFindByNumber( char* pszNumber );
+BOOL jcNumberExists( char* pszNumber );
+
+/* parsing mngm commands */
+void MngmCmdCallBack( pMngmCommandData_t );
+int MngmCmdNotImplemented( int nParam, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdNoValue( char* pszResult );
+int MngmCmdValueSetOK( char* pszResult );
+int MngmCmdIntGet( int nSource, char* pszResult );
+int MngmCmdIntSet( int* pnTarget, int nMin, int nMax, char* pszParam, char* pszResult );
+int MngmCmdStringGet( char* pszSource, char* pszResult );
+int MngmCmdStringSet( char** ppszTarget, char* pszParam, char* pszResult );
+
+int MngmCmdAdd( int nParam, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdDelete( int nParam, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdGet( int nParam, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdSet( int nParam, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdSave( int nParam, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdImport( int nParam, char* pszParam, PVOID pParam, char* pszResult );
+
+int MngmCmdRootObjs( int nCommand, char* pszParam, char* pszResult );
+int MngmCmdMaxCalls( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdRASPort( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdQ931Port( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdRASResponseTimeout( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdQ931ResponseTimeout( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdQ931ConnectTimeout( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdGatekeeperID( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdTelnetPort( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdIVRNumber( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+
+int MngmCmdMobiles( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdMobile( char* pszIMSI, int nCommand, char* pszParam, char* pszResult );
+int MngmCmdMobileIMSI( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdMobileNumber( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdMobileComment( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdMobileGetAllParams( PJCMOBILE, char* pszResult );
+
+int MngmCmdIpPhones( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdIpPhone( char* pszName, int nCommand, char* pszParam, char* pszResult );
+int MngmCmdIpPhoneName( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdIpPhoneNumber( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdIpPhoneIPAddress( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdIpPhoneComment( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdIpPhoneGetAllParams( PJCIPPHONE, char* pszResult );
+
+int MngmCmdGateways( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdGateway( char* pszName, int nCommand, char* pszParam, char* pszResult );
+int MngmCmdGatewayName( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdGatewayPrefix( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdGatewayIPAddress( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdGatewayStripPrefix( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdGatewayComment( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdGatewayGetAllParams( PJCGATEWAY, char* pszResult );
+
+int MngmCmdViperCells( int nCommand, char* pszParam, PVOID pParam, char* pszResult );
+int MngmCmdViperCellGetAllParams( gkHREG, char* pszResult );
+
+/* Data File I/O */
+BOOL jcFileWriteBuf( FILE* hFile, UCHAR* buf, int nSize );
+BOOL jcFileReadBuf( FILE* hFile, UCHAR* buf, int nSize );
+BOOL jcFileWriteString( FILE* hFile, char* pszString );
+char* jcFileReadString( FILE* hFile, char* pszString, int nMaxSize );
+BOOL jcFileWriteULong( FILE* hFile, ULONG );
+ULONG jcFileReadULong( FILE* hFile );
+BOOL jcFileWriteUShort( FILE* hFile, USHORT );
+USHORT jcFileReadUShort( FILE* hFile );
+
+BOOL jcSaveIpPhones( FILE* hFile );
+BOOL jcSaveGateways( FILE* hFile );
+BOOL jcSaveMobiles( FILE* hFile );
+BOOL jcReadIpPhones( FILE* hFile, USHORT nVersion );
+BOOL jcReadGateways( FILE* hFile, USHORT nVersion );
+BOOL jcReadMobiles( FILE* hFile, USHORT nVersion );
+FILE* jcOpenConfigFile( char* pszFileName, USHORT* pnVersion );
+
+extern PJCCONFIG pCfgTree;
+
+/* Non-telnet management client API support */
+
+#define MNGM_API_VERSION 0
+
+typedef enum
+{
+ MngmMsgRequestGeneric = 0,
+ MngmMsgResponseGeneric = 1,
+
+ MngmMsgAlertGeneric = 100,
+
+ MngmMsgRequestGetMobileProfile = 200,
+ MngmMsgResponseGetMobileProfile = 201,
+ MngmMsgRequestSetMobileProfile = 202,
+ MngmMsgRequestAddMobileProfile = 203
+
+}MngmMsg_t;
+
+void MngmAPICallBack( pMngmCommandData_t );
+
+BOOL jcMobileProfileGetParams( char* pszProfile, USHORT nProfileSize,
+ char* pszIMSI, char* pszNumber );
+void jcMngmResponseGenericPack( pMngmCommandData_t, long nRequestID, short nResult, char* pszTextData );
diff --git a/data/mnet/GP10/Host/ViperBase/exchange.c b/data/mnet/GP10/Host/ViperBase/exchange.c
new file mode 100644
index 0000000..ffe641e
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperBase/exchange.c
@@ -0,0 +1,240 @@
+/* exchange.c
+ * $Id: exchange.c,v 1.4 1999-07-30 10:38:38-07 olet Exp $
+ * Non Standard Interface between GK and H.323 task
+ */
+
+#include "support.h"
+#include "exchange.h"
+
+/*
+ *
+ */
+void jcNonStdRasMessageRRQPack( NonStdRasMessageRRQ_t* pMsgRRQ, UCHAR** ppszBuffer, int* pnSize )
+{
+ jcStringPack( pMsgRRQ->pszMobileID, ppszBuffer, pnSize );
+ jcULongPack( pMsgRRQ->hMobileCell, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcNonStdRasMessageRRQUnpack( NonStdRasMessageRRQ_t* pMsgRRQ, UCHAR** ppszBuffer )
+{
+ pMsgRRQ->pszMobileID = jcStringUnpack( ppszBuffer );
+ pMsgRRQ->hMobileCell = jcULongUnpack( ppszBuffer );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcNonStdRasMessageRCFPack( NonStdRasMessageRCF_t* pMsgRCF, UCHAR** ppszBuffer, int* pnSize )
+{
+ jcULongPack( pMsgRCF->hMobileGK, ppszBuffer, pnSize );
+ jcULongPack( pMsgRCF->hMobileCell, ppszBuffer, pnSize );
+ jcStringPack( pMsgRCF->pszNumber, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcNonStdRasMessageRCFUnpack( NonStdRasMessageRCF_t* pMsgRCF, UCHAR** ppszBuffer )
+{
+ pMsgRCF->hMobileGK = jcULongUnpack( ppszBuffer );
+ pMsgRCF->hMobileCell = jcULongUnpack( ppszBuffer );
+ pMsgRCF->pszNumber = jcStringUnpack( ppszBuffer );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcNonStdRasMessageRRJPack( NonStdRasMessageRRJ_t* pMsgRRJ, UCHAR** ppszBuffer, int* pnSize )
+{
+ jcULongPack( pMsgRRJ->hMobileCell, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcNonStdRasMessageRRJUnpack( NonStdRasMessageRRJ_t* pMsgRRJ, UCHAR** ppszBuffer )
+{
+ pMsgRRJ->hMobileCell = jcULongUnpack( ppszBuffer );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcNonStdRasMessageURQPack( NonStdRasMessageURQ_t* pMsgURQ, UCHAR** ppszBuffer, int* pnSize )
+{
+ jcULongPack( pMsgURQ->hMobileGK, ppszBuffer, pnSize );
+ jcULongPack( pMsgURQ->hMobileCell, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcNonStdRasMessageURQUnpack( NonStdRasMessageURQ_t* pMsgURQ, UCHAR** ppszBuffer )
+{
+ pMsgURQ->hMobileGK = jcULongUnpack( ppszBuffer );
+ pMsgURQ->hMobileCell = jcULongUnpack( ppszBuffer );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcNonStdRasMessageUCFPack( NonStdRasMessageUCF_t* pMsgUCF, UCHAR** ppszBuffer, int* pnSize )
+{
+ jcULongPack( pMsgUCF->hMobileGK, ppszBuffer, pnSize );
+ jcULongPack( pMsgUCF->hMobileCell, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcNonStdRasMessageUCFUnpack( NonStdRasMessageUCF_t* pMsgUCF, UCHAR** ppszBuffer )
+{
+ pMsgUCF->hMobileGK = jcULongUnpack( ppszBuffer );
+ pMsgUCF->hMobileCell = jcULongUnpack( ppszBuffer );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcNonStdRasMessageCellLRQPack( NonStdRasMessageCellLRQ_t* pMsgCellLRQ,
+ UCHAR** ppszBuffer, int* pnSize )
+{
+ jcStringPack( pMsgCellLRQ->pszCellID, ppszBuffer, pnSize );
+ jcULongPack( pMsgCellLRQ->hCell, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcNonStdRasMessageCellLRQUnpack( NonStdRasMessageCellLRQ_t* pMsgCellLRQ, UCHAR** ppszBuffer )
+{
+ pMsgCellLRQ->pszCellID = jcStringUnpack( ppszBuffer );
+ pMsgCellLRQ->hCell = jcULongUnpack( ppszBuffer );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcNonStdRasMessageCellLCFPack( NonStdRasMessageCellLCF_t* pMsgCellLCF,
+ UCHAR** ppszBuffer, int* pnSize )
+{
+ jcStringPack( pMsgCellLCF->pszCellID, ppszBuffer, pnSize );
+ jcStringPack( pMsgCellLCF->pszIpAddress, ppszBuffer, pnSize );
+ jcULongPack( pMsgCellLCF->hCell, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcNonStdRasMessageCellLCFUnpack( NonStdRasMessageCellLCF_t* pMsgCellLCF, UCHAR** ppszBuffer )
+{
+ pMsgCellLCF->pszCellID = jcStringUnpack( ppszBuffer );
+ pMsgCellLCF->pszIpAddress = jcStringUnpack( ppszBuffer );
+ pMsgCellLCF->hCell = jcULongUnpack( ppszBuffer );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcNonStdRasMessageCellLRJPack( NonStdRasMessageCellLRJ_t* pMsgCellLRJ,
+ UCHAR** ppszBuffer, int* pnSize )
+{
+ jcStringPack( pMsgCellLRJ->pszCellID, ppszBuffer, pnSize );
+ jcULongPack( pMsgCellLRJ->hCell, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcNonStdRasMessageCellLRJUnpack( NonStdRasMessageCellLRJ_t* pMsgCellLRJ, UCHAR** ppszBuffer )
+{
+ pMsgCellLRJ->pszCellID = jcStringUnpack( ppszBuffer );
+ pMsgCellLRJ->hCell = jcULongUnpack( ppszBuffer );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcNonStdRasMessageMobileProfileRequestPack( NonStdRasMessageMobileProfileRequest_t* pMsg,
+ UCHAR** ppszBuffer, int* pnSize )
+{
+ jcULongPack( pMsg->hMobileGK, ppszBuffer, pnSize );
+ jcULongPack( pMsg->hMobileCell, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcNonStdRasMessageMobileProfileRequestUnpack( NonStdRasMessageMobileProfileRequest_t* pMsg,
+ UCHAR** ppszBuffer )
+{
+ pMsg->hMobileGK = jcULongUnpack( ppszBuffer );
+ pMsg->hMobileCell = jcULongUnpack( ppszBuffer );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcNonStdRasMessageMobileProfilePack( NonStdRasMessageMobileProfile_t* pMsg,
+ UCHAR** ppszBuffer, int* pnSize )
+{
+ jcULongPack( pMsg->hMobileGK, ppszBuffer, pnSize );
+ jcULongPack( pMsg->hMobileCell, ppszBuffer, pnSize );
+ jcUShortPack( pMsg->nProfileSize, ppszBuffer, pnSize );
+ jcBufferPack( pMsg->pProfileData, pMsg->nProfileSize, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcNonStdRasMessageMobileProfileUnpack( NonStdRasMessageMobileProfile_t* pMsg,
+ UCHAR** ppszBuffer )
+{
+ pMsg->hMobileGK = jcULongUnpack( ppszBuffer );
+ pMsg->hMobileCell = jcULongUnpack( ppszBuffer );
+ pMsg->nProfileSize = jcUShortUnpack( ppszBuffer );
+ pMsg->pProfileData = jcBufferUnpack( pMsg->nProfileSize, ppszBuffer );
+
+ return;
+}
diff --git a/data/mnet/GP10/Host/ViperBase/exchange.h b/data/mnet/GP10/Host/ViperBase/exchange.h
new file mode 100644
index 0000000..e26311c
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperBase/exchange.h
@@ -0,0 +1,144 @@
+/* exchange.h
+ * $Id: exchange.h 1.4 1999/07/30 17:38:38 olet Exp $
+ * Non Standard Interface between GK and H.323 task
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define H323_MANUFACTURER_CODE_JETCELL 63846 /* !! have to get real one */
+#define H323_COUNTRY_CODE_USA 181
+
+#define NON_STD_MSG_MAX_LEN 1024
+#define NON_STD_RAS_PROTOCOL 1 /* to be cahnged when GK and H.323 task are no longer compatible */
+
+typedef ULONG NSRASHANDLE;
+
+typedef enum
+{
+ NonStdRasMessageTypeRRQ,
+ NonStdRasMessageTypeRCF,
+ NonStdRasMessageTypeRRJ,
+ NonStdRasMessageTypeURQ,
+ NonStdRasMessageTypeUCF,
+
+ NonStdRasMessageTypeCellLRQ,
+ NonStdRasMessageTypeCellLCF,
+ NonStdRasMessageTypeCellLRJ,
+
+ NonStdRasMessageTypeMobileProfileRequest,
+ NonStdRasMessageTypeMobileProfile,
+
+}NonStdRasMessageType;
+
+typedef struct
+{
+ char* pszMobileID;
+ NSRASHANDLE hMobileCell;
+
+}NonStdRasMessageRRQ_t;
+
+void jcNonStdRasMessageRRQPack( NonStdRasMessageRRQ_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageRRQUnpack( NonStdRasMessageRRQ_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ NSRASHANDLE hMobileGK;
+ NSRASHANDLE hMobileCell;
+ char* pszNumber;
+
+}NonStdRasMessageRCF_t;
+
+void jcNonStdRasMessageRCFPack( NonStdRasMessageRCF_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageRCFUnpack( NonStdRasMessageRCF_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ NSRASHANDLE hMobileCell;
+
+}NonStdRasMessageRRJ_t;
+
+void jcNonStdRasMessageRRJPack( NonStdRasMessageRRJ_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageRRJUnpack( NonStdRasMessageRRJ_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ NSRASHANDLE hMobileGK;
+ NSRASHANDLE hMobileCell;
+
+}NonStdRasMessageURQ_t; /* can be sent both ways */
+
+void jcNonStdRasMessageURQPack( NonStdRasMessageURQ_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageURQUnpack( NonStdRasMessageURQ_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ NSRASHANDLE hMobileGK;
+ NSRASHANDLE hMobileCell;
+
+}NonStdRasMessageUCF_t; /* can be sent both ways */
+
+void jcNonStdRasMessageUCFPack( NonStdRasMessageUCF_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageUCFUnpack( NonStdRasMessageUCF_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ char* pszCellID;
+ NSRASHANDLE hCell;
+
+}NonStdRasMessageCellLRQ_t;
+
+void jcNonStdRasMessageCellLRQPack( NonStdRasMessageCellLRQ_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageCellLRQUnpack( NonStdRasMessageCellLRQ_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ char* pszCellID;
+ char* pszIpAddress;
+ NSRASHANDLE hCell;
+
+}NonStdRasMessageCellLCF_t;
+
+void jcNonStdRasMessageCellLCFPack( NonStdRasMessageCellLCF_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageCellLCFUnpack( NonStdRasMessageCellLCF_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ char* pszCellID;
+ NSRASHANDLE hCell;
+
+}NonStdRasMessageCellLRJ_t;
+
+void jcNonStdRasMessageCellLRJPack( NonStdRasMessageCellLRJ_t*, UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageCellLRJUnpack( NonStdRasMessageCellLRJ_t*, UCHAR** ppszBuffer );
+
+typedef struct
+{
+ NSRASHANDLE hMobileGK;
+ NSRASHANDLE hMobileCell;
+
+}NonStdRasMessageMobileProfileRequest_t;
+
+void jcNonStdRasMessageMobileProfileRequestPack( NonStdRasMessageMobileProfileRequest_t*,
+ UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageMobileProfileRequestUnpack( NonStdRasMessageMobileProfileRequest_t*,
+ UCHAR** ppszBuffer );
+
+typedef struct
+{
+ NSRASHANDLE hMobileGK;
+ NSRASHANDLE hMobileCell;
+ USHORT nProfileSize;
+ PVOID pProfileData;
+
+}NonStdRasMessageMobileProfile_t;
+
+void jcNonStdRasMessageMobileProfilePack( NonStdRasMessageMobileProfile_t*,
+ UCHAR** ppszBuffer, int* pnSize );
+void jcNonStdRasMessageMobileProfileUnpack( NonStdRasMessageMobileProfile_t*, UCHAR** ppszBuffer );
+
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/data/mnet/GP10/Host/ViperBase/gateways.txt b/data/mnet/GP10/Host/ViperBase/gateways.txt
new file mode 100644
index 0000000..d07e6ea
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperBase/gateways.txt
@@ -0,0 +1,4 @@
+
+StarGateInt 6 10.1.1.198
+StarGateOut 9 10.1.1.198
+Cisco 1 10.1.1.8 \ No newline at end of file
diff --git a/data/mnet/GP10/Host/ViperBase/hlr.txt b/data/mnet/GP10/Host/ViperBase/hlr.txt
new file mode 100644
index 0000000..ab596be
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperBase/hlr.txt
@@ -0,0 +1,17 @@
+
+IMSI-1 2201
+IMSI-2 2202
+IMSI-3 2203
+
+310170107412222 2204 Nokia - Red
+310170107599992 2205 Motorola - 2
+310170107279472 2206 Nokia - Black
+310170107279488 2209 Motorola - 1
+310170107599993 2210 TEMS Mobile
+310170200164003 2211 Jan Long security code 9476
+001010000000001 2207 R&S
+001010123456789 2208 RACAL
+208014609514590 2299 Alcatel
+234305774004210 2212 Ericsson
+
+
diff --git a/data/mnet/GP10/Host/ViperBase/init.c b/data/mnet/GP10/Host/ViperBase/init.c
new file mode 100644
index 0000000..7b80d37
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperBase/init.c
@@ -0,0 +1,203 @@
+/* init.c
+ *
+ */
+
+/* GKLib includes */
+#include <gkmain.h>
+#include <gkadd.h>
+#include <gkrgi.h>
+#include <gklrqi.h>
+#include <gkcci.h>
+#include <gkstorage.h>
+#include <cfgapi.h>
+#include <li.h>
+
+#include "support.h"
+#include "exchange.h"
+#include "init.h"
+#include "admin.h"
+#include "jcras.h"
+#include "jccall.h"
+
+void CALLCONV GKLibPrintRegular( const char* pszString, int nLevel );
+void CALLCONV GKLibPrintException( const char* pszString );
+
+/*
+ *
+ */
+BOOL MainInit( int argc, char** argv )
+{
+ FILE* hFile;
+ USHORT nVersion; /* config file version */
+ char pszBuffer[128];
+
+ DebugLevelInit( !ParamIsPresent( argc, argv, "-nolog" ) );
+
+ pCfgTree = New( JCCONFIG );
+ pCfgTree->pListIPPhones = ListCreate();
+ pCfgTree->pListGateways = ListCreate();
+ pCfgTree->pListMobiles = ListCreate();
+
+ if( NULL == ( hFile = jcOpenConfigFile( ParamGetValue( argc, argv, "-db", NULL ), &nVersion ) ) )
+ {
+ pCfgTree->nMaxCalls = JCGK_DEF_MAX_CALLS;
+ pCfgTree->RASPort = JCGK_DEF_RAS_PORT;
+ pCfgTree->Q931Port = JCGK_DEF_Q931_PORT;
+ pCfgTree->RASResponseTO = JCGK_DEF_RAS_RESPONSE_TO;
+ pCfgTree->Q931ResponseTO = JCGK_DEF_Q931_RESPONSE_TO;
+ pCfgTree->Q931ConnectTO = JCGK_DEF_Q931_CONNECT_TO;
+ pCfgTree->pszGatekeeperID = StringCreate( "ViperBase" );
+ pCfgTree->TelnetPort = JCGK_DEF_TELNET_PORT;
+ pCfgTree->pszIVRNumber = NULL;
+ }
+ else
+ {
+ pCfgTree->nMaxCalls = jcFileReadUShort( hFile );
+ pCfgTree->RASPort = jcFileReadUShort( hFile );
+ pCfgTree->Q931Port = jcFileReadUShort( hFile );
+ pCfgTree->RASResponseTO = jcFileReadUShort( hFile );
+ pCfgTree->Q931ResponseTO = jcFileReadUShort( hFile );
+ pCfgTree->Q931ConnectTO = jcFileReadUShort( hFile );
+ pCfgTree->pszGatekeeperID = StringCreate(
+ jcFileReadString( hFile, pszBuffer, ArraySize( pszBuffer ) ) );
+ pCfgTree->TelnetPort = jcFileReadUShort( hFile );
+
+ if( nVersion < 2 )
+ pCfgTree->pszIVRNumber = NULL;
+ else
+ pCfgTree->pszIVRNumber = StringCreate(
+ jcFileReadString( hFile, pszBuffer, ArraySize( pszBuffer ) ) );
+ }
+
+ if( FALSE == PlatformLayerInit() ||
+ FALSE == GKLibInit( argc, argv ) )
+ return FALSE;
+
+
+ if( NULL != hFile )
+ {
+ jcReadIpPhones( hFile, nVersion );
+ jcReadGateways( hFile, nVersion );
+ jcReadMobiles( hFile, nVersion );
+
+ fclose( hFile );
+ }
+
+ if( FALSE == MngmPortInit( JCGK_MNGM_CLIENT_PORT, (pfnCommonCallBack)MngmAPICallBack, FALSE ) ||
+ FALSE == MngmPortInit( pCfgTree->TelnetPort, (pfnCommonCallBack)MngmCmdCallBack, TRUE ) )
+ return FALSE;
+
+ return TRUE;
+}
+
+/*
+ *
+ */
+BOOL GKLibInit( int argc, char** argv )
+{
+ int nMemSize;
+ gkmainRas_t RASParams;
+ gkmainQ931_t Q931Params;
+
+ static GKRGIEVENT regHandler = { jcRegHandler, NULL };
+ static GKNSMEVENT nsmHandler = { jcNonStdMsgHandler };
+ static GKLRQIEVENT lrqHandler = { jcLrqHandler, NULL };
+ static GKCCIEVENT callHandler = { jcStateHandler, jcCallMsgHandler, jcCallHookHandler, jcBandwidthHandler, jcFacilityHandler };
+ static GK_STORAGE_STRUCT storageHandler = { jcStorageInit, jcStorageAccess };
+
+ /* print function for library debug output */
+ gkmainSetNotify( GKLibPrintRegular );
+ gkmainSetException( GKLibPrintException );
+ gkmainSetDbgL( 0 );
+
+ if( gkmainConfigMaxRegistrations( JCGK_REGISTRATIONS, JCGK_CELLS_PER_REGISTRATION,
+ JCGK_REG_CELL_SIZE, &nMemSize ) < 0 )
+ {
+ DebugLog( "Error in gkmainConfigMaxRegistrations()\n" );
+ return FALSE;
+ }
+
+ if( gkmainConfigMaxCalls( pCfgTree->nMaxCalls, NULL ) < 0 )
+ {
+ DebugLog( "Error in gkmainConfigMaxCalls()\n" );
+ return FALSE;
+ }
+
+ RASParams.responseTO = pCfgTree->RASResponseTO;
+ RASParams.port = pCfgTree->RASPort;
+ strcpy( RASParams.multicastIp, GKMAIN_DEFAULT_multicastIp );
+ RASParams.multicastPort = GKMAIN_DEFAULT_multicastPort;
+
+ Q931Params.responseTO = pCfgTree->Q931ResponseTO;
+ Q931Params.connectTO = pCfgTree->Q931ConnectTO;
+ Q931Params.port = pCfgTree->Q931Port;
+
+ if( gkmainConfigStack( &RASParams, &Q931Params ) < 0 )
+ {
+ DebugLog( "Error in gkmainConfigStack()\n" );
+ return FALSE;
+ }
+
+ gkrgiSetEventHandler( &regHandler, sizeof( GKRGIEVENT ) );
+ gkrgiSetNSMHandler( &nsmHandler, sizeof( GKNSMEVENT ) );
+ gklrqiSetEventHandler( &lrqHandler, sizeof( GKLRQIEVENT ) );
+ gkcciSetEventHandler( &callHandler, sizeof( GKCCIEVENT ) );
+ gkstorageSetStorageFunctions( &storageHandler, sizeof( GK_STORAGE_STRUCT ) );
+
+ if( 0 != gkmainInit() )
+ {
+ DebugLog( "Error in gkmainInit()\n" );
+ return FALSE;
+ }
+
+ gkcfgiSetGKID( pCfgTree->pszGatekeeperID );
+ gkcfgiZonePropertiesSet( GKCFGI_DHCP, TRUE );
+ gkcfgiZonePropertiesSet( GKCFGI_ROUTED_CALLING_MODE, TRUE );
+ gkcfgiZonePropertiesSet( GKCFGI_OPEN_ZONE, TRUE );
+ gkcfgiZonePropertiesSet( GKCFGI_IRQ_INTERVAL, 25 /* minimal allowed */ );
+ gkcfgiZonePropertiesSet( GKCFGI_ENABLE_MULTICAST, 0 );
+
+ return TRUE;
+}
+
+/*
+ *
+ */
+void CALLCONV GKLibPrintRegular( const char* pszString, int nLevel )
+{
+ if( NULL == pszString ) return;
+
+ DebugLog( "GKL: %s\n", pszString + 11 /* to cut off timestamp */ );
+
+ return;
+}
+
+/*
+ *
+ */
+void CALLCONV GKLibPrintException( const char* pszString )
+{
+ if( NULL == pszString ) return;
+
+ DebugLog( "GKL(!): %s\n", pszString + 11 /* to cut off timestamp */ );
+
+ return;
+}
+
+/*
+ *
+ */
+INT32 CALLCONV jcStorageInit( void )
+{
+ return GKSTORAGE_OK;
+}
+
+/*
+ *
+ */
+INT32 CALLCONV jcStorageAccess( IN gkstorageAccessMode_t mode, IN OUT UINT8* gkBuffer,
+ IN UINT32 bufferSize, IN gkstorageIdentifier_t appStorageID,
+ IN UINT32 offsetInStorage )
+{
+ return GKSTORAGE_OK;
+}
diff --git a/data/mnet/GP10/Host/ViperBase/init.h b/data/mnet/GP10/Host/ViperBase/init.h
new file mode 100644
index 0000000..1158c29
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperBase/init.h
@@ -0,0 +1,26 @@
+/* init.h
+ *
+ */
+
+#define JCGK_REGISTRATIONS 20
+#define JCGK_CELLS_PER_REGISTRATION 100
+#define JCGK_REG_CELL_SIZE 8
+
+/* default values for configurable parameters */
+#define JCGK_DEF_MAX_CALLS 100
+#define JCGK_DEF_RAS_PORT 1719
+#define JCGK_DEF_RAS_RESPONSE_TO 30
+#define JCGK_DEF_Q931_PORT 1720
+#define JCGK_DEF_Q931_RESPONSE_TO 30
+#define JCGK_DEF_Q931_CONNECT_TO 180
+#define JCGK_DEF_TELNET_PORT 11785
+#define JCGK_MNGM_CLIENT_PORT 11786
+ /* this is hardcoded on a client side, not for modifications */
+
+BOOL MainInit( int argc, char** argv );
+BOOL GKLibInit( int argc, char** argv );
+
+INT32 CALLCONV jcStorageInit( void );
+INT32 CALLCONV jcStorageAccess( IN gkstorageAccessMode_t mode, IN OUT UINT8* gkBuffer,
+ IN UINT32 bufferSize, IN gkstorageIdentifier_t appStorageID,
+ IN UINT32 offsetInStorage );
diff --git a/data/mnet/GP10/Host/ViperBase/ipphones.txt b/data/mnet/GP10/Host/ViperBase/ipphones.txt
new file mode 100644
index 0000000..b407736
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperBase/ipphones.txt
@@ -0,0 +1,11 @@
+
+olet 8825 10.1.1.33
+adergun 8826 10.1.1.25
+winfield 8821 10.1.1.22
+xxu 8824 10.1.1.27
+target1 8809 10.1.1.24
+bhavaAtHome 8899 10.1.1.226
+bhava 8827 10.1.1.37
+rvandyke 8828 10.1.1.21
+
+
diff --git a/data/mnet/GP10/Host/ViperBase/jccall.c b/data/mnet/GP10/Host/ViperBase/jccall.c
new file mode 100644
index 0000000..8588166
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperBase/jccall.c
@@ -0,0 +1,246 @@
+/* jccall.c
+ *
+ */
+
+#include <gkadd.h>
+#include <gktypes.h>
+#include <gkrgi.h>
+#include <gkcci.h>
+
+#include "support.h"
+#include "exchange.h"
+#include "jccall.h"
+#include "admin.h"
+
+/*
+ *
+ */
+INT32 CALLCONV jcStateHandler(
+ IN gkHCALL hCall,
+ IN OUT gkHAPPCALL* phaCall,
+ IN gkcciState_t State,
+ IN gkcciReason_t Reason )
+{
+
+ DebugLog( "Call %u, State '%s', Reason '%s'\n", hCall,
+ gkcciStateName( State ), gkcciReasonName( Reason ) );
+
+ switch( State )
+ {
+ case gkcciSttCannotComplete:
+ {
+ switch( Reason )
+ {
+ case gkcciRsnCannotSendLRQ:
+ return jcMainRouting( hCall, phaCall );
+
+ case gkcciRsnOutOfService:
+ case gkcciRsnNoAnswer:
+ case gkcciRsnAppTO:
+ return jcCallSendToIVR( hCall, phaCall, cmReasonTypeUnreachableDestination );
+
+ case gkcciRsnLinesBusy:
+ return jcCallSendToIVR( hCall, phaCall, cmReasonTypeCalledPartyNotRegistered );
+
+ case gkcciRsnDestBusy:
+ return jcCallSendToIVR( hCall, phaCall, cmReasonTypeAdaptiveBusy );
+
+ case gkcciRsnDestReject:
+ return jcCallSendToIVR( hCall, phaCall, cmReasonTypeDestinationRejection );
+
+ case gkcciRsnUndefined:
+ default:
+ return jcCallSendToIVR( hCall, phaCall, cmReasonTypeUndefinedReason );
+ }
+ }
+
+ default:
+ break;
+ }
+
+ return gkcciDefaultStateEventHandler( hCall, phaCall, State, Reason );
+}
+
+/*
+ *
+ */
+INT32 CALLCONV jcBandwidthHandler(
+ IN gkHCALL hCall,
+ IN OUT gkHAPPCALL* haCall,
+ IN gkcciBandwidthEvent_t Event,
+ IN gkcciSide_t Side,
+ IN gkcciBandwidthReason_t Reason,
+ IN gktypeBw_t RequestedBWInBPS )
+{
+
+ /* DebugLog( "jcBandwidthHandler(), Event = %d, Reason = %d\n", Event, Reason ); */
+
+ switch( Event )
+ {
+
+ default:
+ break;
+ }
+
+ return gkcciDefaultBandwidthEventHandler( hCall, haCall, Event, Side, Reason, RequestedBWInBPS );
+}
+
+/*
+ *
+ */
+INT32 CALLCONV jcFacilityHandler(
+ IN gkHCALL hCall,
+ IN OUT gkHAPPCALL* haCall,
+ IN INT32 FacilityHandle,
+ IN gkcciFacilityEvent_t Event,
+ IN gkcciSide_t Side,
+ IN gkcciFacilityReason_t Reason )
+{
+
+ /* DebugLog( "jcFacilityHandler(), Event = %d, Reason = %d\n", Event, Reason ); */
+
+ switch( Event )
+ {
+
+ default:
+ break;
+ }
+
+ return gkcciDefaultFacilityEventHandler( hCall, haCall, FacilityHandle, Event, Side, Reason );
+}
+
+/*
+ *
+ */
+INT32 CALLCONV jcCallMsgHandler(
+ IN gkHCALL hCall,
+ IN OUT gkHAPPCALL* haCall,
+ IN gkcciMsg_t Msg,
+ IN gkcciSide_t Side )
+{
+
+ /* DebugLog( "jcCallMsgHandler(): %s\n", gkcciMsgName( Msg ) ); */
+
+ switch( Msg )
+ {
+ case gkcciMsgSendSetup:
+ default:
+ break;
+ }
+
+ return gkcciOK;
+}
+
+/*
+ *
+ */
+INT32 CALLCONV jcCallHookHandler(
+ IN gkHCALL hCall,
+ IN OUT gkHAPPCALL* haCall,
+ IN HCALL hsCall,
+ IN HRAS hsRas,
+ IN gkcciMsg_t Msg,
+ IN gkcciSide_t Side )
+{
+
+ switch( Msg )
+ {
+ case gkcciMsgSendSetup:
+ {
+ char buf[16];
+ sprintf( buf, "%d", (int)*haCall ); /* disconnect reason for IVR */
+ cmCallSetParam( hsCall, cmParamUserUser, 0, strlen( buf ) + 1, buf );
+ break;
+ }
+
+ default:
+ break;
+ }
+
+ return gkcciOK;
+}
+
+/*
+ *
+ */
+int jcMainRouting( gkHCALL hCall, gkHAPPCALL* phaCall )
+{
+ gkaddAlias_t Alias;
+ gkaddTransport_t Transport;
+ PJCGATEWAY pGateway;
+ PJCIPPHONE pIPPhone;
+ char *pszIPAddress, *pszName;
+
+ if( gkcciOK != gkcciGetParameter( hCall, gkcciParamAlias, gkcciSideDest, 0, 0, &Alias ) )
+ return jcCallSendToIVR( hCall, phaCall, cmReasonTypeBadFormatAddress );
+
+ if( NULL != ( pIPPhone = IpPhoneFindByNumber( Alias.aliasStr ) ) )
+ {
+ pszName = pIPPhone->pszName;
+ pszIPAddress = pIPPhone->pszIPAddress;
+ }
+ else if( NULL != ( pGateway = jcGatewayFindByNumber( Alias.aliasStr ) ) )
+ {
+ pszName = pGateway->pszName;
+ pszIPAddress = pGateway->pszIPAddress;
+
+ if( pGateway->bStripPrefix )
+ {
+ char *pszSrc, *pszDst;
+
+ pszDst = Alias.aliasStr;
+ pszSrc = Alias.aliasStr + pGateway->nPrefixSize;
+
+ while( *pszDst++ = *pszSrc++ )
+ ;
+ }
+ }
+ else
+ {
+ DebugLog( "Number '%s' not found!\n", Alias.aliasStr );
+ return jcCallSendToIVR( hCall, phaCall, cmReasonTypeCalledPartyNotRegistered );
+ }
+
+ Transport.ip = gkaddString2Ip( pszIPAddress );
+ Transport.port = 1720;
+ Transport.routeType = gkaddIpNoRoute;
+ Transport.routeLength = 0;
+
+ DebugLog( "Sending SETUP to %s, %s, %s\n", pszName, pszIPAddress, Alias.aliasStr );
+
+ gkcciSetParameter( hCall, gkcciParamCallSignal, gkcciSideDest, 0, 0, &Transport );
+ gkcciDeleteAlias( hCall, gkcciParamAlias, gkcciSideDest, 0, 0 );
+ gkcciSetParameter( hCall, gkcciParamAlias, gkcciSideDest, 0, 0, &Alias );
+
+ gkcciReply( hCall, gkcciDontDisconnectStartAddressResolution, gkcciReplyRsnAddressFinal );
+ return gkcciOK;
+}
+
+/*
+ *
+ */
+int jcCallSendToIVR( gkHCALL hCall, gkHAPPCALL* phaCall, int Reason )
+{
+ gkaddAlias_t Alias;
+ char* pszIVRNumber;
+ char UserInfo[16];
+
+ sprintf( UserInfo, "%d", Reason );
+
+ if( NULL == ( pszIVRNumber = pCfgTree->pszIVRNumber ) ||
+ gkcciOK != gkcciGetParameter( hCall, gkcciParamAlias, gkcciSideDest, 0, 0, &Alias ) ||
+ 0 == StringCompare( pszIVRNumber, Alias.aliasStr ) )
+ {
+ gkcciReply( hCall, gkcciConfirmDisconnect, gkcciReplyRsnUndefined );
+ return gkcciOK;
+ }
+
+ *phaCall = (gkHAPPCALL)Reason; /* disconnect reason for IVR */
+
+ strcpy( Alias.aliasStr, pszIVRNumber );
+ gkcciDeleteAlias( hCall, gkcciParamAlias, gkcciSideDest, 0, 0 );
+ gkcciSetParameter( hCall, gkcciParamAlias, gkcciSideDest, 0, 0, &Alias );
+ gkcciReply( hCall, gkcciDontDisconnectStartAddressResolution, gkcciReplyRsnAliasChange );
+
+ return gkcciOK;
+}
diff --git a/data/mnet/GP10/Host/ViperBase/jccall.h b/data/mnet/GP10/Host/ViperBase/jccall.h
new file mode 100644
index 0000000..5425529
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperBase/jccall.h
@@ -0,0 +1,45 @@
+/* jccall.h
+ *
+ */
+
+INT32 CALLCONV jcStateHandler(
+ IN gkHCALL hCall,
+ IN OUT gkHAPPCALL* haCall,
+ IN gkcciState_t State,
+ IN gkcciReason_t Reason );
+
+INT32 CALLCONV jcCallMsgHandler(
+ IN gkHCALL hCall,
+ IN OUT gkHAPPCALL* haCall,
+ IN gkcciMsg_t Msg,
+ IN gkcciSide_t Side );
+
+INT32 CALLCONV jcBandwidthHandler(
+ IN gkHCALL hCall,
+ IN OUT gkHAPPCALL* haCall,
+ IN gkcciBandwidthEvent_t Event,
+ IN gkcciSide_t Side,
+ IN gkcciBandwidthReason_t Reason,
+ IN gktypeBw_t RequestedBWInBPS );
+
+INT32 CALLCONV jcFacilityHandler(
+ IN gkHCALL hCall,
+ IN OUT gkHAPPCALL* haCall,
+ IN INT32 FacilityHandle,
+ IN gkcciFacilityEvent_t Event,
+ IN gkcciSide_t Side,
+ IN gkcciFacilityReason_t Reason );
+
+INT32 CALLCONV jcCallHookHandler(
+ IN gkHCALL hCall,
+ IN OUT gkHAPPCALL* haCall,
+ IN HCALL hsCall,
+ IN HRAS hsRas,
+ IN gkcciMsg_t Msg,
+ IN gkcciSide_t Side );
+
+BOOL RegIsDynamic( IN gkHREG hReg );
+BOOL RegIsStatic( IN gkHREG hReg );
+
+int jcMainRouting( gkHCALL, gkHAPPCALL* );
+int jcCallSendToIVR( gkHCALL, gkHAPPCALL*, int Reason );
diff --git a/data/mnet/GP10/Host/ViperBase/jcras.c b/data/mnet/GP10/Host/ViperBase/jcras.c
new file mode 100644
index 0000000..36b442a
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperBase/jcras.c
@@ -0,0 +1,523 @@
+/* jcras.c
+ *
+ */
+
+#include <gkadd.h>
+#include <gkrgi.h>
+#include <gklrqi.h>
+#include <li.h>
+
+#include "support.h"
+#include "exchange.h"
+#include "admin.h"
+#include "jcras.h"
+
+/*
+ *
+ */
+INT32 CALLCONV jcRegHandler(
+ IN gkHREG hReg,
+ IN OUT gkHAPPREG* phaReg,
+ IN gkrgiEvent_t Event,
+ IN gkrgiReason_t Reason )
+{
+ PNODE pNode;
+ PJCMOBILE pMobile;
+
+ DebugLog( "'%s', Event '%s', Reason '%s'\n", jcRegGetNames( hReg ),
+ gkrgiEventName( Event ), gkrgiReasonName( Reason ) );
+
+ switch( Event )
+ {
+ case gkrgiEvApprovedRRQ:
+ gkrgiReply( hReg, gkrgiRplyConfirm, gkrgiRplyRsnUndefined );
+ return GKRGI_OK;
+
+ case gkrgiEvSendingMessage:
+
+ if( Reason != gkrgiRsnSendingGKURQ && Reason != gkrgiRsnSendingApplicationURQ )
+ break;
+
+ /* going through! */
+
+ case gkrgiEvApprovedURQ:
+
+ ListForEachNode( pCfgTree->pListMobiles, pNode )
+ {
+ pMobile = (PJCMOBILE)NodeGetPtr( pNode );
+
+ if( pMobile->hReg == hReg )
+ {
+ pMobile->hReg = NULL;
+ pMobile->hMobileCell = 0;
+ }
+ }
+
+ break;
+
+ default:
+ break;
+ }
+
+ return gkrgiDefaultRegHandler( hReg, phaReg, Event, Reason );
+}
+
+/*
+ *
+ */
+INT32 CALLCONV jcNonStdMsgHandler(
+ IN gkHREG hReg,
+ IN OUT gkHAPPREG* phaReg,
+ IN HRAS hsRas,
+ IN gktypeNonStandardParam* appParam )
+{
+ PJCMOBILE pMobile;
+ UCHAR* pszBuffer;
+
+ if( NULL == ( pszBuffer = (UCHAR*)appParam->data ) ||
+ appParam->dataLength <= 0 ||
+ appParam->t35CountryCode != H323_COUNTRY_CODE_USA ||
+ appParam->manufacturerCode != H323_MANUFACTURER_CODE_JETCELL ||
+ NON_STD_RAS_PROTOCOL != jcUShortUnpack( &pszBuffer ) )
+ {
+ DebugLog( "jcNonStdMsgHandler() error: unrecognized non standard message\n" );
+ return 0;
+ }
+
+ switch( jcUShortUnpack( &pszBuffer ) ) /* message type */
+ {
+ case NonStdRasMessageTypeRRQ:
+ {
+ NonStdRasMessageRRQ_t MsgRRQ;
+
+ jcNonStdRasMessageRRQUnpack( &MsgRRQ, &pszBuffer );
+
+ if( NULL == ( pMobile = MobileFindByIMSI( MsgRRQ.pszMobileID, NULL ) ) )
+ {
+ jcgkNonStdRasSendRRJ( hReg, MsgRRQ.hMobileCell );
+ }
+ else
+ {
+ if( pMobile->hReg != NULL && pMobile->hReg != hReg ) /* old registration */
+ {
+ gkrgiDeleteAddress( pMobile->hReg, gkrgiParamPhone, gkrgiSttsDynamic, pMobile->pszNumber );
+ jcgkNonStdRasSendURQ( pMobile->hReg, pMobile );
+ }
+
+ gkrgiAddAddress( hReg, gkrgiParamPhone, gkrgiSttsDynamic, pMobile->pszNumber );
+ jcgkNonStdRasSendRCF( hReg, pMobile, MsgRRQ.hMobileCell );
+
+ pMobile->hReg = hReg;
+ pMobile->hMobileCell = MsgRRQ.hMobileCell;
+ }
+ break;
+ }
+
+ case NonStdRasMessageTypeURQ:
+ {
+ NonStdRasMessageURQ_t MsgURQ;
+
+ jcNonStdRasMessageURQUnpack( &MsgURQ, &pszBuffer );
+
+ pMobile = (PJCMOBILE)MsgURQ.hMobileGK;
+
+ if( NULL == ListFindByPtr( pCfgTree->pListMobiles, pMobile ) )
+ /* only to make sure pMobile is valid */
+ {
+ DebugLog( "jcNonStdMsgHandler(): invalid mobile handle in URQ\n" );
+ }
+ else
+ {
+ gkrgiDeleteAddress( hReg, gkrgiParamPhone, gkrgiSttsDynamic, pMobile->pszNumber );
+ pMobile->hReg = NULL;
+ pMobile->hMobileCell = 0;
+ }
+
+ jcgkNonStdRasSendUCF( hReg, MsgURQ.hMobileGK, MsgURQ.hMobileCell );
+
+ break;
+ }
+
+ case NonStdRasMessageTypeUCF:
+ break; /* nothing to do */
+
+ case NonStdRasMessageTypeCellLRQ:
+ {
+ NonStdRasMessageCellLRQ_t MsgCellLRQ;
+ char* pszIpAddr;
+
+ jcNonStdRasMessageCellLRQUnpack( &MsgCellLRQ, &pszBuffer );
+
+ if( NULL == ( pszIpAddr = jcRegGetIpByName( MsgCellLRQ.pszCellID ) ) )
+ jcgkNonStdRasSendCellLRJ( hReg, MsgCellLRQ.pszCellID, MsgCellLRQ.hCell );
+ else
+ jcgkNonStdRasSendCellLCF( hReg, MsgCellLRQ.pszCellID, pszIpAddr, MsgCellLRQ.hCell );
+
+ break;
+ }
+
+ case NonStdRasMessageTypeMobileProfileRequest:
+ {
+ NonStdRasMessageMobileProfileRequest_t MsgReq;
+
+ jcNonStdRasMessageMobileProfileRequestUnpack( &MsgReq, &pszBuffer );
+
+ pMobile = (PJCMOBILE)MsgReq.hMobileGK;
+
+ if( NULL == ListFindByPtr( pCfgTree->pListMobiles, pMobile ) )
+ /* only to make sure pMobile is valid */
+ {
+ DebugLog( "jcNonStdMsgHandler(): invalid mobile handle in MobileProfileRequest\n" );
+ jcgkNonStdRasSendProfile( hReg, MsgReq.hMobileGK, MsgReq.hMobileCell, 0, NULL );
+ }
+ else
+ jcgkNonStdRasSendProfile( hReg, MsgReq.hMobileGK, MsgReq.hMobileCell,
+ pMobile->nProfileSize, pMobile->ProfileData );
+ break;
+ }
+
+ default:
+ DebugLog( "jcNonStdMsgHandler() error: unrecognized message\n" );
+ return 0;
+ }
+
+ return 0;
+}
+
+
+/*
+ *
+ */
+/*
+INT32 CALLCONV jcRegHook(
+ IN gkHREG hReg,
+ IN OUT gkHAPPREG* phaReg,
+ IN HRAS hsRas,
+ IN gkrgiMessage_t Msg )
+{
+
+ DebugLog( "jcRegHook(), Msg = %d\n", Msg );
+
+ return TRUE;
+}
+*/
+/*
+ *
+ */
+INT32 CALLCONV jcLrqHandler(
+ IN gkHLRQ hLRQ,
+ IN OUT gkHAPPLRQ* haLRQ,
+ IN gklrqiEvent_t Event,
+ IN gklrqiReason_t Reason )
+{
+
+ DebugLog( "jcLrqHandler(), Event = %d\n", Event );
+
+ switch( Event )
+ {
+ default:
+ break;
+ }
+
+ return gklrqiDefaultLRQHandler( hLRQ, haLRQ, Event, Reason );
+}
+
+/*
+ *
+ */
+BOOL RegIsDynamic( IN gkHREG hReg )
+{
+ BOOL isDynamic;
+
+ if( gkrgiIsDynamic( hReg, &isDynamic ) < 0 )
+ return FALSE;
+
+ return isDynamic;
+}
+
+/*
+ *
+ */
+BOOL RegIsStatic( IN gkHREG hReg )
+{
+ BOOL isStatic;
+
+ if( gkrgiIsStatic( hReg, &isStatic ) < 0 )
+ return FALSE;
+
+ return isStatic;
+}
+
+/*
+ *
+ */
+void jcgkNonStdRasSendRCF( gkHREG hReg, PJCMOBILE pMobile, NSRASHANDLE hMobileCell )
+{
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+ NonStdRasMessageRCF_t MsgRCF;
+
+ MsgRCF.hMobileGK = (NSRASHANDLE)pMobile;
+ MsgRCF.hMobileCell = hMobileCell;
+ MsgRCF.pszNumber = pMobile->pszNumber;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypeRCF, &pszBuffer, &nSize );
+ jcNonStdRasMessageRCFPack( &MsgRCF, &pszBuffer, &nSize );
+
+ jcgkNonStdMsgSend( hReg, buffer, nSize );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcgkNonStdRasSendRRJ( gkHREG hReg, NSRASHANDLE hMobileCell )
+{
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+ NonStdRasMessageRRJ_t MsgRRJ;
+
+ MsgRRJ.hMobileCell = hMobileCell;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypeRRJ, &pszBuffer, &nSize );
+ jcNonStdRasMessageRRJPack( &MsgRRJ, &pszBuffer, &nSize );
+
+ jcgkNonStdMsgSend( hReg, buffer, nSize );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcgkNonStdRasSendUCF( gkHREG hReg, NSRASHANDLE hMobileGK, NSRASHANDLE hMobileCell )
+{
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+ NonStdRasMessageUCF_t MsgUCF;
+
+ MsgUCF.hMobileGK = hMobileGK;
+ MsgUCF.hMobileCell = hMobileCell;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypeUCF, &pszBuffer, &nSize );
+ jcNonStdRasMessageUCFPack( &MsgUCF, &pszBuffer, &nSize );
+
+ jcgkNonStdMsgSend( hReg, buffer, nSize );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcgkNonStdRasSendURQ( gkHREG hReg, PJCMOBILE pMobile )
+{
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+ NonStdRasMessageURQ_t MsgURQ;
+
+ MsgURQ.hMobileGK = (NSRASHANDLE)pMobile;
+ MsgURQ.hMobileCell = pMobile->hMobileCell;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypeURQ, &pszBuffer, &nSize );
+ jcNonStdRasMessageURQPack( &MsgURQ, &pszBuffer, &nSize );
+
+ jcgkNonStdMsgSend( hReg, buffer, nSize );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcgkNonStdRasSendCellLRJ( gkHREG hReg, char* pszCellID, NSRASHANDLE hCell )
+{
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+ NonStdRasMessageCellLRJ_t MsgCellLRJ;
+
+ MsgCellLRJ.pszCellID = pszCellID;
+ MsgCellLRJ.hCell = hCell;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypeCellLRJ, &pszBuffer, &nSize );
+ jcNonStdRasMessageCellLRJPack( &MsgCellLRJ, &pszBuffer, &nSize );
+
+ jcgkNonStdMsgSend( hReg, buffer, nSize );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcgkNonStdRasSendCellLCF( gkHREG hReg, char* pszCellID, char* pszIpAddress, NSRASHANDLE hCell )
+{
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+ NonStdRasMessageCellLCF_t MsgCellLCF;
+
+ MsgCellLCF.pszCellID = pszCellID;
+ MsgCellLCF.pszIpAddress = pszIpAddress;
+ MsgCellLCF.hCell = hCell;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypeCellLCF, &pszBuffer, &nSize );
+ jcNonStdRasMessageCellLCFPack( &MsgCellLCF, &pszBuffer, &nSize );
+
+ jcgkNonStdMsgSend( hReg, buffer, nSize );
+
+ return;
+}
+
+/*
+ *
+ */
+void jcgkNonStdRasSendProfile( gkHREG hReg, NSRASHANDLE hMobileGK, NSRASHANDLE hMobileCell,
+ USHORT nProfileSize, PVOID pProfileData )
+{
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+ NonStdRasMessageMobileProfile_t Msg;
+
+ Msg.hMobileGK = hMobileGK;
+ Msg.hMobileCell = hMobileCell;
+ Msg.nProfileSize = nProfileSize;
+ Msg.pProfileData = pProfileData;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypeMobileProfile, &pszBuffer, &nSize );
+ jcNonStdRasMessageMobileProfilePack( &Msg, &pszBuffer, &nSize );
+
+ jcgkNonStdMsgSend( hReg, buffer, nSize );
+
+ return;
+}
+
+/*
+ *
+ */
+BOOL jcgkNonStdMsgSend( gkHREG hReg, UCHAR* msg, int size )
+{
+ gktypeNonStandardParam NSP;
+
+ if( size > NON_STD_MSG_MAX_LEN )
+ {
+ DebugLog( "jcgkNonStdMsgSend() error: message size is too big (%d > %d)\n",
+ size, NON_STD_MSG_MAX_LEN );
+ return FALSE;
+ }
+
+ NSP.data = (char*)msg;
+ NSP.dataLength = size;
+ NSP.objectLength = 0;
+ NSP.t35CountryCode = H323_COUNTRY_CODE_USA;
+ NSP.t35Extension = 0;
+ NSP.manufacturerCode = H323_MANUFACTURER_CODE_JETCELL;
+
+ if( GKRGI_OK != gkrgiSendNonStandardMsg( hReg, &NSP ) )
+ {
+ DebugLog( "Error in gkrgiSendNonStandardMsg()\n" );
+ return FALSE;
+ }
+ else
+ return TRUE;
+}
+
+/*
+ *
+ */
+char* jcRegGetNames( gkHREG hReg )
+{
+ static char Buffer[512];
+ gkaddName_t Name;
+ int i, nNames;
+
+ if( GKRGI_OK != gkrgiGetNumberOfAddresses( hReg, gkrgiParamName, gkrgiSttsDynamic, &nNames ) ||
+ nNames <= 0 )
+ return strcpy( Buffer, "<unknown>" );
+
+ Buffer[0] = '\0';
+
+ for( i = nNames; i > 0; i-- )
+ {
+ if( GKRGI_OK == gkrgiGetParameter( hReg, gkrgiParamName, gkrgiSttsDynamic, i, Name ) )
+ {
+ strcat( Buffer, Name );
+ if( i > 1 ) strcat( Buffer, "/" );
+ }
+ }
+
+ return Buffer;
+}
+
+/*
+ *
+ */
+char* jcRegGetIpByName( char* pszName )
+{
+ gkHREG hReg;
+ gkHAPPREG haReg;
+ gkaddName_t Name;
+ gkaddTransport_t TransRAS;
+ int i, nNames;
+ static char pszRAS[32];
+
+ if( GKRGI_OK != gkrgiGetFirstEntryHandle( &hReg, &haReg ) )
+ return NULL;
+
+ do
+ {
+ if( GKRGI_OK != gkrgiGetNumberOfAddresses( hReg, gkrgiParamName, gkrgiSttsDynamic, &nNames ) ||
+ nNames <= 0 )
+ continue;
+
+ for( i = 1; i <= nNames; i++ )
+ {
+ if( GKRGI_OK == gkrgiGetParameter( hReg, gkrgiParamName, gkrgiSttsDynamic, i, Name ) &&
+ 0 == StringCompare( pszName, Name ) )
+ {
+ if( GKRGI_OK == gkrgiGetParameter( hReg, gkrgiParamRAS, gkrgiSttsDynamic, 1, &TransRAS ) )
+ return gkaddIp2String( TransRAS.ip, pszRAS );
+ else
+ return NULL;
+ }
+ }
+
+ }while( GKRGI_OK == gkrgiGetNextEntryHandle( hReg, &hReg, &haReg ) );
+
+ return NULL;
+}
diff --git a/data/mnet/GP10/Host/ViperBase/jcras.h b/data/mnet/GP10/Host/ViperBase/jcras.h
new file mode 100644
index 0000000..d120565
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperBase/jcras.h
@@ -0,0 +1,45 @@
+/* jcras.h
+ *
+ */
+
+INT32 CALLCONV jcRegHandler(
+ IN gkHREG hReg,
+ IN OUT gkHAPPREG* phaReg,
+ IN gkrgiEvent_t Event,
+ IN gkrgiReason_t Reason );
+
+INT32 CALLCONV jcNonStdMsgHandler(
+ IN gkHREG hReg,
+ IN OUT gkHAPPREG* phaReg,
+ IN HRAS hsRas,
+ IN gktypeNonStandardParam* appParam );
+
+/*
+INT32 CALLCONV jcRegHook(
+ IN gkHREG hReg,
+ IN OUT gkHAPPREG* haReg,
+ IN HRAS hsRas,
+ IN gkrgiMessage_t Msg );
+*/
+INT32 CALLCONV jcLrqHandler(
+ IN gkHLRQ hLRQ,
+ IN OUT gkHAPPLRQ* haLRQ,
+ IN gklrqiEvent_t Event,
+ IN gklrqiReason_t Reason );
+
+BOOL RegIsDynamic( IN gkHREG );
+BOOL RegIsStatic( IN gkHREG );
+
+BOOL jcgkNonStdMsgSend( gkHREG, UCHAR* msg, int size );
+
+void jcgkNonStdRasSendRCF( gkHREG, PJCMOBILE, NSRASHANDLE hMobileCell );
+void jcgkNonStdRasSendRRJ( gkHREG, NSRASHANDLE hMobileCell );
+void jcgkNonStdRasSendUCF( gkHREG, NSRASHANDLE hMobileGK, NSRASHANDLE hMobileCell );
+void jcgkNonStdRasSendURQ( gkHREG, PJCMOBILE );
+void jcgkNonStdRasSendCellLCF( gkHREG hReg, char* pszCellID, char* pszIpAddress, NSRASHANDLE hCell );
+void jcgkNonStdRasSendCellLRJ( gkHREG, char* pszCellID, NSRASHANDLE hCell );
+void jcgkNonStdRasSendProfile( gkHREG, NSRASHANDLE hMobileGK, NSRASHANDLE hMobileCell,
+ USHORT nProfileSize, PVOID pProfileData );
+
+char* jcRegGetNames( gkHREG );
+char* jcRegGetIpByName( char* pszName );
diff --git a/data/mnet/GP10/Host/ViperBase/jcvbase.dat b/data/mnet/GP10/Host/ViperBase/jcvbase.dat
new file mode 100644
index 0000000..a5d95aa
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperBase/jcvbase.dat
Binary files differ
diff --git a/data/mnet/GP10/Host/ViperBase/main.c b/data/mnet/GP10/Host/ViperBase/main.c
new file mode 100644
index 0000000..d514bfb
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperBase/main.c
@@ -0,0 +1,46 @@
+/*
+ * main.c
+ */
+
+/* GKLib includes */
+#include <gkadd.h>
+#include <gkrgi.h>
+#include <gkstorage.h>
+#include <li.h>
+
+#include "support.h"
+#include "exchange.h"
+#include "init.h"
+#include "admin.h"
+
+void EndpointsPrintTimer( PVOID );
+
+/*
+ *
+ */
+int main( int argc, char** argv )
+{
+
+ if( FALSE == MainInit( argc, argv ) )
+ {
+ StringPrint( "Initialization Error\n" );
+ return FALSE;
+ }
+
+ StringPrint( "Initialization Successful\n\n" );
+
+ /* TimerCreate( 30, EndpointsPrintTimer, NULL, TRUE ); */
+
+ MainLoop();
+
+ return TRUE;
+}
+
+/*
+ *
+ */
+void EndpointsPrintTimer( PVOID pVoid )
+{
+ EndpointsPrint();
+ return;
+}
diff --git a/data/mnet/GP10/Host/ViperBase/platform.c b/data/mnet/GP10/Host/ViperBase/platform.c
new file mode 100644
index 0000000..302504d
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperBase/platform.c
@@ -0,0 +1,692 @@
+/* platform.c
+ * $Id: platform.c,v 1.4 1999-07-30 10:38:42-07 olet Exp $
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "support.h"
+
+#if defined( WIN32 )
+
+# include <windows.h>
+
+static HWND hMainWnd;
+LRESULT CALLBACK WndProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
+#define MNGM_TELNET_ACCEPT ( WM_USER + 1 )
+#define MNGM_TELNET_READ ( WM_USER + 2 )
+#define MNGM_CLIENT_ACCEPT ( WM_USER + 3 )
+#define MNGM_CLIENT_READ ( WM_USER + 4 )
+
+#elif defined( __VXWORKS__ )
+
+/* VxWorks */
+# include <taskLib.h>
+# include <ioLib.h>
+
+/* Rad */
+# include <mti.h>
+# include <seli.h>
+# include <pi.h>
+
+#define RAD_MAX_TIMERS 100
+static HSTIMER hsTimer;
+static TIMER jcTimersArray[RAD_MAX_TIMERS];
+void VxWorksTimerCallBack( void* pData );
+
+void RadPipeCallBack( int hPipe, piEvents Event, BOOL Error, void* pData );
+
+#else
+
+# include <signal.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/socket.h>
+
+#endif
+
+/* Telnet Support */
+
+#define JC_MAX_TELNET_IN_STRING 256
+#define JC_MAX_TELNET_OUT_STRING 16384
+#define JCTELNETPROMPT "\r\nViperBase> "
+
+typedef struct
+{
+ SOCKET hSocket;
+ char Command[JC_MAX_TELNET_IN_STRING]; /* current command */
+ unsigned short nBytesInCommand;
+
+}JCTELNET, *PJCTELNET;
+
+static PLIST pListTelnets;
+static pfnCommonCallBack pfnCommandCallBack;
+static pfnCommonCallBack pfnMngmAPICallBack;
+/*
+ *
+ */
+BOOL PlatformLayerInit( void )
+{
+
+# if defined( WIN32 )
+
+ static char szAppName[] = "ViperBase";
+ WNDCLASS wc;
+ HANDLE hInstance = GetModuleHandle(NULL);
+
+ /* increasing process priority */
+ SetPriorityClass( GetCurrentProcess(), HIGH_PRIORITY_CLASS );
+
+ /* increasing scrolling buffer */
+/*
+ {
+ HANDLE hStdout;
+ COORD coord;
+
+ coord.X = 80;
+ coord.Y = 1000;
+
+ hStdout = GetStdHandle( STD_OUTPUT_HANDLE );
+
+ SetConsoleScreenBufferSize( hStdout, coord );
+ }
+*/
+ /* creating invisible main window */
+ wc.style = CS_HREDRAW | CS_VREDRAW;
+ wc.lpfnWndProc = WndProc;
+ wc.cbClsExtra = 0;
+ wc.cbWndExtra = 0;
+ wc.hInstance = hInstance;
+ wc.hIcon = LoadIcon( NULL, IDI_APPLICATION );
+ wc.hCursor = LoadCursor( NULL, IDC_ARROW );
+ wc.hbrBackground = GetStockObject( WHITE_BRUSH );
+ wc.lpszMenuName = "";
+ wc.lpszClassName = szAppName;
+
+ RegisterClass( &wc ) ;
+
+ hMainWnd = CreateWindow( szAppName, szAppName, WS_OVERLAPPEDWINDOW,
+ CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
+ NULL, NULL, hInstance, NULL );
+
+# elif defined( __VXWORKS__ )
+
+ int i, hShell;
+
+ if( ERROR != ( hShell = open( "/vio/0", O_CREAT | O_RDWR, 0 ) ) )
+ {
+ ioGlobalStdSet( STD_OUT, hShell );
+ ioGlobalStdSet( STD_ERR, hShell );
+ }
+
+
+ if( 0 == ( hsTimer = mtimerInit( RAD_MAX_TIMERS, NULL ) ) )
+ {
+ StringPrint( "Error in mtimerInit()\n" );
+ return FALSE;
+ }
+
+ for( i = 0; i < RAD_MAX_TIMERS; i++ )
+ jcTimersArray[i].pfnCallBack = NULL; /* indicates it is available */
+
+# else
+
+ signal( SIGPIPE, SIG_IGN );
+
+# endif
+
+ pListTelnets = ListCreate();
+
+ return TRUE;
+}
+
+/*
+ *
+ */
+BOOL PlatformLayerDown( void )
+{
+
+#if defined( __VXWORKS__ )
+
+ mtimerEnd( hsTimer );
+
+#else
+
+#endif
+
+ return TRUE;
+}
+
+/*
+ *
+ */
+void SpecialSleep( int nSeconds )
+{
+# if defined( WIN32 )
+
+ Sleep( nSeconds * 1000 );
+
+# elif defined( __VXWORKS__ )
+
+ taskDelay( nSeconds * 100 ); /* not a precise timeout! */
+
+# else
+
+ sleep( nSeconds );
+
+# endif
+
+ return;
+}
+
+/*
+ *
+ */
+void SpecialDebugBreak( void )
+{
+# ifdef WIN32
+ DebugBreak();
+
+# else
+ abort();
+
+# endif
+
+ return;
+}
+
+#if defined( __VXWORKS__ )
+
+/*
+ *
+ */
+BOOL MainLoop( void )
+{
+ while( 1 ) seliSelect();
+
+ return TRUE;
+}
+
+/*
+ *
+ */
+PRADPIPE RadPipeOpen( char* Name, int nMsgSize, int nMaxMsgs, pfnCommonCallBack pfnUserCallBack )
+{
+ int hPipe;
+ PRADPIPE pPipe;
+/*
+ DebugLog( "Creating Pipe '%s', MsgSize = %d, MaxMsgs = %d\n", Name, nMsgSize, nMaxMsgs );
+*/
+ if( ERROR == piInit() )
+ {
+ StringPrint( "Error in piInit()\n" );
+ return FALSE;
+ }
+
+ if( ERROR == ( hPipe = piOpen( Name, nMsgSize, nMaxMsgs ) ) &&
+ 0 > ( hPipe = open( Name, O_RDWR, 644 ) ) )
+ {
+ StringPrint( "Error in piOpen()\n" );
+ return FALSE;
+ }
+
+ pPipe = New( RADPIPE );
+ pPipe->hPipe = hPipe;
+ pPipe->pfnUserCallBack = pfnUserCallBack;
+ pPipe->nMsgSize = nMsgSize;
+ pPipe->pMsg = SpecialAlloc( nMsgSize );
+
+ piCallOn( hPipe, piEvRead, (piCallback)RadPipeCallBack, pPipe );
+
+ return pPipe;
+}
+
+/*
+ *
+ */
+BOOL RadPipeWrite( PRADPIPE pPipe, PVOID pMessage )
+{
+
+ if( pPipe->nMsgSize != piWrite( pPipe->hPipe, (UINT8*)pMessage, pPipe->nMsgSize ) )
+ {
+ DebugLog( "Error in piWrite()\n" );
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/*
+ *
+ */
+void RadPipeCallBack( int hPipe, piEvents Event, BOOL Error, void* pData )
+{
+ PRADPIPE pPipe;
+ int i, nPipeMsgs;
+
+ pPipe = (PRADPIPE)pData;
+
+ if( Error || pPipe->hPipe != hPipe )
+ {
+ DebugLog( "Error in RadPipeCallBack()\n" );
+ return;
+ }
+
+ ioctl( hPipe, FIONMSGS, (int)&nPipeMsgs );
+
+ for( i = 0; i < nPipeMsgs; i++ )
+ {
+ if( pPipe->nMsgSize != piRead( hPipe, (UINT8*)pPipe->pMsg, pPipe->nMsgSize ) )
+ {
+ DebugLog( "Error in piRead()\n" );
+ return;
+ }
+
+ (*pPipe->pfnUserCallBack)( pPipe->pMsg );
+ }
+
+ return;
+}
+
+/*
+ *
+ */
+BOOL RadPipeClose( PRADPIPE pPipe )
+{
+ piClose( pPipe->hPipe );
+ piEnd();
+
+ SpecialFree( pPipe->pMsg );
+ Delete( pPipe );
+
+ return TRUE;
+}
+
+
+#elif defined( WIN32 )
+
+/*
+ *
+ */
+BOOL MainLoop( void )
+{
+ MSG msg;
+
+ while( GetMessage( &msg, NULL, 0, 0 ) )
+ {
+ TranslateMessage( &msg );
+ DispatchMessage( &msg );
+ }
+
+ return TRUE;
+}
+
+/*
+ *
+ */
+char* toHex(BYTE* data, int len)
+{
+ static char buf[100];
+ char* digits="0123456789ABCDEF";
+ unsigned i;
+ for (i=0;i<min(len,sizeof(buf)/2-1);i++)
+ {
+ buf[i*2]=digits[data[i]>>4];
+ buf[i*2+1]=digits[data[i]&0xf];
+ }
+ buf[i*2]=0;
+ return buf;
+}
+
+/*
+ *
+ */
+LRESULT CALLBACK WndProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
+{
+ switch( uMsg )
+ {
+ case WM_TIMER:
+ {
+ PTIMER pTimer = (PTIMER)wParam;
+
+ (*pTimer->pfnCallBack)( pTimer->pData );
+
+ if( FALSE == pTimer->bMultiple )
+ TimerDelete( pTimer );
+
+ return 0;
+ }
+
+ case MNGM_TELNET_ACCEPT:
+ {
+ SOCKET hSocket;
+ PJCTELNET pTelnet;
+
+ if( WSAGETSELECTERROR( lParam ) != 0 ||
+ INVALID_SOCKET == ( hSocket = accept( (SOCKET)wParam, NULL, NULL ) ) ||
+ SOCKET_ERROR == WSAAsyncSelect( hSocket, hMainWnd, MNGM_TELNET_READ,
+ FD_READ | FD_CLOSE ) )
+ {
+ DebugLog( "Error accepting telnet client\n" );
+ break;
+ }
+
+ MngmTelnetSendString( hSocket, "\r\nJetCell ViperBase Telnet Management Interface"
+ "\r\nPlease see ViperBase manual for commands syntax\r\n" );
+
+ MngmTelnetSendString( hSocket, JCTELNETPROMPT );
+
+ pTelnet = New( JCTELNET );
+ pTelnet->hSocket = hSocket;
+ pTelnet->nBytesInCommand = 0;
+
+ ListAddTail( pListTelnets, pTelnet );
+
+ DebugLog( "Telnet client connected\n" );
+
+ break;
+ }
+
+ case MNGM_CLIENT_ACCEPT:
+ {
+ SOCKET hSocket;
+
+ if( WSAGETSELECTERROR( lParam ) != 0 ||
+ INVALID_SOCKET == ( hSocket = accept( (SOCKET)wParam, NULL, NULL ) ) ||
+ SOCKET_ERROR == WSAAsyncSelect( hSocket, hMainWnd, MNGM_CLIENT_READ,
+ FD_READ | FD_CLOSE ) )
+ {
+ DebugLog( "Error accepting management client\n" );
+ break;
+ }
+
+ DebugLog( "Management client connected\n" );
+
+ break;
+ }
+
+ case MNGM_TELNET_READ:
+ {
+ char BufferIn[JC_MAX_TELNET_IN_STRING], BufferOut[JC_MAX_TELNET_OUT_STRING];
+ int nBytes;
+ PNODE pNode;
+ PJCTELNET pTelnet;
+ SOCKET hSocket = (SOCKET)wParam;
+ MngmCommandData_t CommandData;
+
+ ListForEachNode( pListTelnets, pNode )
+ {
+ pTelnet = (PJCTELNET)NodeGetPtr( pNode );
+
+ if( hSocket == pTelnet->hSocket )
+ break; /* found */
+ }
+
+ if( WSAGETSELECTEVENT( lParam ) == FD_CLOSE )
+ {
+ ListRemoveNode( pListTelnets, pNode );
+ Delete( pTelnet );
+ DebugLog( "Telnet client disconnected\n" );
+ break;
+ }
+
+ if( SOCKET_ERROR == ( nBytes = recv( hSocket, BufferIn, JC_MAX_TELNET_IN_STRING, 0 ) ) )
+ {
+ DebugLog( "MNGM_TELNET_READ: error in recv()\n" );
+ break;
+ }
+
+ if( BufferIn[0] >= 32 && BufferIn[0] <= 126 ) /* printable ASCII character */
+ {
+ if( pTelnet->nBytesInCommand + nBytes < JC_MAX_TELNET_IN_STRING - 1 )
+ {
+ memcpy( pTelnet->Command + pTelnet->nBytesInCommand, BufferIn, nBytes );
+ pTelnet->nBytesInCommand += nBytes;
+ send( hSocket, BufferIn, nBytes, 0 ); /* echo back */
+ }
+ else
+ MngmTelnetSendString( hSocket, "\a" ); /* beep */
+ }
+ else
+ {
+ switch( BufferIn[0] )
+ {
+ case 0x0D: /* end of line */
+
+ if( pTelnet->nBytesInCommand > 0 )
+ {
+ MngmTelnetSendString( hSocket, "\r\n" );
+
+ pTelnet->Command[pTelnet->nBytesInCommand] = '\0';
+ CommandData.pszInput = pTelnet->Command;
+ CommandData.pszOutput = BufferOut;
+
+ (*pfnCommandCallBack)( (PVOID)&CommandData );
+
+ MngmTelnetSendString( hSocket, BufferOut );
+
+ pTelnet->nBytesInCommand = 0; /* reset */
+ }
+
+ MngmTelnetSendString( hSocket, JCTELNETPROMPT );
+
+ break;
+
+ case 0x08: /* back space */
+ case 0x7F: /* delete */
+ if( pTelnet->nBytesInCommand > 0 )
+ {
+ pTelnet->nBytesInCommand--;
+ MngmTelnetSendString( hSocket, "\b \b" ); /* erase last character */
+ }
+ else
+ MngmTelnetSendString( hSocket, "\a" ); /* beep */
+
+ break;
+
+ default: /* for now ignoring everything else */
+ MngmTelnetSendString( hSocket, "\a" ); /* beep */
+ break;
+ }
+ }
+
+ break;
+ }
+
+ case MNGM_CLIENT_READ:
+ {
+ char BufferIn[1024], BufferOut[JC_MAX_TELNET_OUT_STRING];
+ SOCKET hSocket = (SOCKET)wParam;
+ MngmCommandData_t RequestData;
+
+ if( WSAGETSELECTEVENT( lParam ) == FD_CLOSE )
+ {
+ DebugLog( "Management client disconnected\n" );
+ break;
+ }
+
+ if( SOCKET_ERROR == recv( hSocket, BufferIn, 1024, 0 ) )
+ {
+ DebugLog( "MNGM_CLIENT_READ: error in recv()\n" );
+ break;
+ }
+
+ RequestData.pszInput = BufferIn;
+ RequestData.pszOutput = BufferOut;
+
+ (*pfnMngmAPICallBack)( (PVOID)&RequestData );
+
+ if( RequestData.nOutput > 0 )
+ send( hSocket, BufferOut, RequestData.nOutput, 0 );
+
+ break;
+ }
+
+ default:
+ break;
+ }
+
+ return DefWindowProc( hwnd, uMsg, wParam, lParam );
+}
+
+#endif
+
+
+#if defined( WIN32 )
+
+/*
+ *
+ */
+PTIMER TimerCreate( time_t tmInterval, pfnCommonCallBack pfnCallBack, PVOID pData, BOOL bMultiple )
+{
+ PTIMER pTimer;
+
+ ExecBreakIf( tmInterval <= 0, "Incorrect interval" );
+
+ pTimer = New( TIMER );
+
+ pTimer->pData = pData;
+ pTimer->pfnCallBack = pfnCallBack;
+ pTimer->bMultiple = bMultiple;
+
+ if( FALSE == SetTimer( hMainWnd, (UINT)pTimer, 1000 * tmInterval, NULL ) )
+ {
+ Delete( pTimer );
+ DebugLog( "Error in SetTimer()\n" );
+ return NULL;
+ }
+
+ return pTimer;
+}
+
+/*
+ *
+ */
+BOOL TimerDelete( PTIMER pTimer )
+{
+ if( NULL == pTimer )
+ return FALSE;
+
+ if( FALSE == KillTimer( hMainWnd, (UINT)pTimer ) )
+ DebugLog( "Error in KillTimer()\n" );
+
+ Delete( pTimer );
+
+ return TRUE;
+}
+
+
+#elif defined( __VXWORKS__ )
+
+/*
+ *
+ */
+PTIMER TimerCreate( time_t tmInterval, pfnCommonCallBack pfnCallBack, PVOID pData, BOOL bMultiple )
+{
+ int i;
+ PTIMER pTimer;
+
+ ExecBreakIf( tmInterval <= 0, "Incorrect interval" );
+
+ for( i = 0, pTimer = jcTimersArray; i < RAD_MAX_TIMERS; i++, pTimer++ )
+ if( pTimer->pfnCallBack == NULL )
+ goto Found;
+
+ DebugLog( "Error in TimerCreate(): can't find available jcTimersArray slot\n" );
+ return NULL;
+
+Found:
+
+ if( 0 > mtimerSet( hsTimer, (LPMTIMEREVENTHANDLER)VxWorksTimerCallBack,
+ (PVOID)pTimer, 1000 * tmInterval ) )
+ {
+ DebugLog( "Error in mtimerSet()\n" );
+ return NULL;
+ }
+
+ pTimer->pData = pData;
+ pTimer->pfnCallBack = pfnCallBack;
+ pTimer->bMultiple = bMultiple;
+
+ return pTimer;
+}
+
+/*
+ *
+ */
+void VxWorksTimerCallBack( PVOID pData )
+{
+ PTIMER pTimer = (PTIMER)pData;
+
+ (*pTimer->pfnCallBack)( pTimer->pData );
+
+ if( FALSE == pTimer->bMultiple )
+ TimerDelete( pTimer );
+
+ return;
+}
+
+/*
+ *
+ */
+BOOL TimerDelete( PTIMER pTimer )
+{
+ if( NULL == pTimer )
+ return FALSE;
+
+ mtimerResetByValue( hsTimer, (LPMTIMEREVENTHANDLER)VxWorksTimerCallBack, (PVOID)pTimer );
+
+ pTimer->pfnCallBack = NULL; /* indicates it is available */
+
+ return TRUE;
+}
+
+#endif
+
+#if defined( WIN32 )
+
+/*
+ *
+ */
+BOOL MngmPortInit( int MngmPort, pfnCommonCallBack pfnMngmCallBack, BOOL bTelnet )
+{
+ struct sockaddr_in SockAddr;
+ SOCKET hSocket;
+ int nWinMsgType;
+
+ SockAddr.sin_family = AF_INET;
+ SockAddr.sin_addr.s_addr = INADDR_ANY;
+ SockAddr.sin_port = htons( (u_short)MngmPort );
+
+ nWinMsgType = bTelnet ? MNGM_TELNET_ACCEPT : MNGM_CLIENT_ACCEPT;
+
+ if( INVALID_SOCKET == ( hSocket = socket( AF_INET, SOCK_STREAM, 0 ) ) ||
+ SOCKET_ERROR == bind( hSocket, (LPSOCKADDR)&SockAddr, sizeof( SockAddr ) ) ||
+ SOCKET_ERROR == listen( hSocket, 1 ) ||
+ SOCKET_ERROR == WSAAsyncSelect( hSocket, hMainWnd, nWinMsgType, FD_ACCEPT ) )
+ {
+ DebugLog( "MngmPortInit(): error while initializing the socket\n" );
+ return FALSE;
+ }
+
+ if( bTelnet )
+ pfnCommandCallBack = pfnMngmCallBack;
+ else
+ pfnMngmAPICallBack = pfnMngmCallBack;
+
+ return TRUE;
+}
+
+/*
+ *
+ */
+BOOL MngmTelnetSendString( int hSocket, char* pszString )
+{
+ send( hSocket, pszString, strlen( pszString ), 0 );
+ return TRUE;
+}
+
+#elif defined( __VXWORKS__ )
+
+#endif
+
diff --git a/data/mnet/GP10/Host/ViperBase/support.c b/data/mnet/GP10/Host/ViperBase/support.c
new file mode 100644
index 0000000..7b53954
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperBase/support.c
@@ -0,0 +1,615 @@
+/* support.c
+ * $Id: support.c,v 1.3 1999-07-30 10:38:43-07 olet Exp $
+ *
+ * miscellaneous general purpose functions
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <time.h>
+
+#include "support.h"
+
+static ULONG nMemoryChunks = 0;
+static ULONG szMemoryChunks = 0;
+
+static BOOL bDebugLog = FALSE;
+
+/*
+ *
+ */
+PVOID SpecialAlloc( size_t szBytes )
+{
+ PVOID pvoid;
+ size_t szTotalBytes;
+
+# if defined( _DEBUG )
+ szTotalBytes = szBytes + 2 * sizeof( ULONG );
+# else
+ szTotalBytes = szBytes;
+# endif /* _DEBUG */
+
+ ExecBreakIf( NULL == ( pvoid = malloc( szTotalBytes ) ), "Not enough memory" );
+
+# if defined( _DEBUG )
+
+ nMemoryChunks++;
+ szMemoryChunks += szBytes;
+
+ *(ULONG*)pvoid = (ULONG)szBytes;
+ pvoid = (ULONG*)pvoid + 1;
+
+ *(ULONG*)pvoid = (ULONG)0xFEDCABCD; /* tag */
+ pvoid = (ULONG*)pvoid + 1;
+
+# endif /* _DEBUG */
+
+ return pvoid;
+}
+
+/*
+ *
+ */
+void SpecialFree( PVOID pvoid )
+{
+ if( pvoid == NULL )
+ return;
+
+# if defined( _DEBUG )
+ {
+ ULONG szThisChunk;
+
+ pvoid = (ULONG*)pvoid - 1;
+
+ ExecBreakIf( *(ULONG*)pvoid != (ULONG)0xFEDCABCD, "Invalid pointer" );
+
+ pvoid = (ULONG*)pvoid - 1;
+ szThisChunk = *(ULONG*)pvoid;
+
+ nMemoryChunks--;
+ szMemoryChunks -= szThisChunk;
+
+ memset( pvoid, 0x00, szThisChunk + 2 * sizeof( ULONG ) );
+ }
+# endif /* _DEBUG */
+
+ free( pvoid );
+
+ return;
+}
+
+/*
+ *
+ */
+ULONG MemoryGetTotalBlocks( void )
+{
+ return nMemoryChunks;
+}
+
+/*
+ *
+ */
+ULONG MemoryGetTotalSize( void )
+{
+ return szMemoryChunks;
+}
+
+/*
+ *
+ */
+PSTR StringCreate( char* psz )
+{
+ PSTR pszNew;
+ if( psz == NULL ) return NULL;
+ pszNew = (PSTR)SpecialAlloc( strlen( psz ) + 1 );
+ strcpy( pszNew, psz );
+ return pszNew;
+}
+
+/*
+ *
+ */
+void StringDelete( PSTR psz )
+{
+ if( psz != NULL )
+ Delete( psz );
+}
+
+/*
+ *
+ */
+size_t StringLength( char* psz )
+{
+ if( psz == NULL )
+ return 0;
+ else
+ return strlen( psz );
+}
+
+/*
+ *
+ */
+int StringICompare( char* psz1, char* psz2 )
+{
+
+# if defined( WIN32 )
+# define stricmp _stricmp
+# elif defined( __VXWORKS__ )
+# define stricmp strcoll
+# else
+# define stricmp strcasecmp
+# endif
+
+ if( psz1 == NULL || psz2 == NULL )
+ return ~0;
+ else
+ return stricmp( psz1, psz2 );
+}
+
+/*
+ *
+ */
+PSTR StringReplace( PSTR* ppszOld, char* psz )
+{
+ if( 0 == StringCompare( *ppszOld, psz ) )
+ return *ppszOld;
+ else
+ {
+ StringDelete( *ppszOld );
+ return *ppszOld = StringCreate( psz );
+ }
+}
+
+/*
+ *
+ */
+char* StringSplit( char* psz, char SplitChar )
+{
+ char c;
+
+ for( ; c = *psz; psz++ )
+ {
+ if( c == SplitChar )
+ {
+ *psz = '\0';
+ return psz + 1;
+ }
+ }
+
+ return psz;
+}
+
+/*
+ *
+ */
+char* StringToken( char* pszThis, char* pszDelims, char** ppszNext )
+{
+ size_t szToken;
+
+ if( pszThis == NULL )
+ pszThis = *ppszNext;
+
+ while( *pszThis != '\0' && 0 == ( szToken = strcspn( pszThis, pszDelims ) ) )
+ pszThis++; /* skipping leading delimiters */
+
+ switch( *pszThis )
+ {
+ case '\0':
+ return NULL;
+
+ case '"': /* remove this case if there's no need to treat quotation marks specially */
+ return StringToken( pszThis + 1, "\"", ppszNext );
+
+ default:
+ if( *( *ppszNext = pszThis + szToken ) != '\0' )
+ *(*ppszNext)++ = '\0';
+
+ return pszThis;
+ }
+}
+
+/*
+ *
+ */
+void StringPrint( char* pszFormat, ... )
+{
+ va_list pArg;
+ va_start( pArg, pszFormat );
+ vfprintf( stderr, pszFormat, pArg );
+ va_end( pArg );
+}
+
+/*
+ *
+ */
+void StringIndent( int nSpaces )
+{
+ char pszBuf[128];
+ int i;
+
+ for( i = 0; i < nSpaces; i++ )
+ pszBuf[i] = ' ';
+
+ pszBuf[nSpaces] = '\0';
+
+ StringPrint( pszBuf );
+
+ return;
+}
+
+/*
+ *
+ */
+int DivideInts( int nDivident, int nDivisor )
+{
+ int nQuotient;
+
+ if( nDivisor == 0 )
+ return ~0;
+
+ nQuotient = nDivident / nDivisor;
+
+ if( nDivident - nQuotient * nDivisor >= ( nQuotient + 1 ) * nDivisor - nDivident )
+ nQuotient++;
+
+ return nQuotient;
+}
+
+/*
+ *
+ */
+PLIST ListCreate( void )
+{
+ PLIST pList;
+
+ pList = New( LIST );
+
+ pList->pNodeHead = pList->pNodeTail = NULL;
+ pList->nObjectsCount = 0;
+
+ return pList;
+}
+
+/*
+ *
+ */
+void ListDelete( PLIST pList )
+{
+ ListRemoveAllNodes( pList );
+ Delete( pList );
+ return;
+}
+
+/*
+ *
+ */
+PNODE ListAddHead( PLIST pList, PVOID pObj )
+{
+ PNODE pNode = New( NODE );
+
+ pNode->pObject = pObj;
+
+ pList->nObjectsCount++;
+
+ if( NULL != ( pNode->pNodeNext = pList->pNodeHead ) )
+ pNode->pNodeNext->pNodePrev = pNode;
+ else
+ pList->pNodeTail = pNode;
+
+ pNode->pNodePrev = NULL;
+
+ pList->pNodeHead = pNode;
+
+ return pNode;
+}
+
+/*
+ *
+ */
+PNODE ListAddTail( PLIST pList, PVOID pObj )
+{
+ PNODE pNode = New( NODE );
+
+ pNode->pObject = pObj;
+
+ pList->nObjectsCount++;
+
+ if( NULL != ( pNode->pNodePrev = pList->pNodeTail ) )
+ pNode->pNodePrev->pNodeNext = pNode;
+ else
+ pList->pNodeHead = pNode;
+
+ pNode->pNodeNext = NULL;
+
+ pList->pNodeTail = pNode;
+
+ return pNode;
+}
+
+/*
+ *
+ */
+void ListRemoveAllNodes( PLIST pList )
+{
+ PNODE pNode, pNodeNext;
+
+ for( pNode = pList->pNodeHead; pNode; pNode = pNodeNext )
+ {
+ pNodeNext = pNode->pNodeNext;
+ Delete( pNode );
+ }
+
+ pList->pNodeHead = pList->pNodeTail = NULL;
+ pList->nObjectsCount = 0;
+
+ return;
+}
+
+/*
+ *
+ */
+void ListRemoveNode( PLIST pList, PNODE pNode )
+{
+ if( pNode == pList->pNodeHead )
+ pList->pNodeHead = pNode->pNodeNext;
+ else
+ pNode->pNodePrev->pNodeNext = pNode->pNodeNext;
+
+ if( pNode == pList->pNodeTail )
+ pList->pNodeTail = pNode->pNodePrev;
+ else
+ pNode->pNodeNext->pNodePrev = pNode->pNodePrev;
+
+ pList->nObjectsCount--;
+
+ Delete( pNode );
+
+ return;
+}
+
+/*
+ *
+ */
+PNODE ListFindByPtr( PLIST pList, PVOID pObj )
+{
+ PNODE pNode;
+
+ for( pNode = pList->pNodeHead; pNode; pNode = pNode->pNodeNext )
+ if( pNode->pObject == pObj )
+ return pNode;
+
+ return NULL;
+}
+
+/*
+ *
+ */
+PNODE ListFindByData( PLIST pList, PVOID pObjPattern, ObjectCompareProc pfnObjectCompare )
+{
+ PNODE pNode;
+
+ for( pNode = pList->pNodeHead; pNode; pNode = pNode->pNodeNext )
+ if( 0 == (*pfnObjectCompare)( pObjPattern, pNode->pObject ) )
+ return pNode;
+
+ return NULL;
+}
+
+/*
+ *
+ */
+char* GetDateTimeString( time_t tm )
+{
+ static char szBuf[32];
+
+ strftime( szBuf, 32, "[%m/%d/%y %H:%M:%S]", localtime( &tm ) );
+
+ return szBuf;
+}
+
+
+/*
+ *
+ */
+char* GetOption( char* pszSection, char* pszOption, char* pszDefaultValue )
+{
+ char* pszValue;
+
+ pszValue = pszDefaultValue; /* !! */
+
+ return pszValue;
+}
+
+
+/*
+ *
+ */
+char* ParamGetValue( int argc, char** argv, char* pszParam, char* pszDefaultValue )
+{
+ int i;
+
+ for( i = 1; i < argc; i++ )
+ if( 0 == StringCompare( argv[i], pszParam ) && ++i < argc )
+ return argv[i];
+
+ return pszDefaultValue;
+}
+
+/*
+ *
+ */
+BOOL ParamIsPresent( int argc, char** argv, char* pszParam )
+{
+ int i;
+
+ for( i = 1; i < argc; i++ )
+ if( 0 == StringCompare( argv[i], pszParam ) )
+ return TRUE;
+
+ return FALSE;
+}
+
+/*
+ *
+ */
+void DebugFatalErrorBreak( char* pszText, char* pszFile, int nLine )
+{
+ StringPrint( "\nFatal Error: %s, File: %s, Line: %d\n", pszText, pszFile, nLine );
+
+ SpecialDebugBreak();
+
+ return;
+}
+
+/*
+ *
+ */
+BOOL DebugLevelInit( BOOL bLogEnabled )
+{
+ bDebugLog = bLogEnabled;
+ return TRUE;
+}
+
+/*
+ *
+ */
+void DebugLog( char* pszFormat, ... )
+{
+ va_list pArg;
+
+ if( FALSE == bDebugLog )
+ return;
+
+ va_start( pArg, pszFormat );
+ vfprintf( stderr, pszFormat, pArg );
+ va_end( pArg );
+ return;
+}
+
+/*
+ *
+ */
+void jcStringPack( char* pszString, UCHAR** ppszBuffer, int* pnSize )
+{
+ size_t nSize;
+
+ nSize = strlen( pszString ) + 1;
+ strcpy( *ppszBuffer, pszString );
+
+ *ppszBuffer += nSize;
+ *pnSize += nSize;
+
+ return;
+}
+
+/*
+ *
+ */
+char* jcStringUnpack( UCHAR** ppszBuffer )
+{
+ char* pszString = *ppszBuffer;
+
+ *ppszBuffer += strlen( pszString ) + 1;
+
+ return pszString;
+}
+
+/*
+ *
+ */
+void jcBufferPack( PVOID pData, USHORT nDataSize, UCHAR** ppszBuffer, int* pnSize )
+{
+ if( nDataSize == 0 ) return;
+
+ memcpy( *ppszBuffer, pData, nDataSize );
+
+ *ppszBuffer += nDataSize;
+ *pnSize += nDataSize;
+
+ return;
+}
+
+/*
+ *
+ */
+PVOID jcBufferUnpack( USHORT nDataSize, UCHAR** ppszBuffer )
+{
+ PVOID pData;
+
+ if( nDataSize == 0 ) return NULL;
+
+ pData = *ppszBuffer;
+ *ppszBuffer += nDataSize;
+
+ return pData;
+}
+
+/*
+ *
+ */
+void jcULongPack( ULONG uLong, UCHAR** ppszBuffer, int* pnSize )
+{
+ UCHAR* pszBuffer = *ppszBuffer;
+
+ pszBuffer[0] = (UCHAR)( ( uLong >> 0 ) & 0xFF );
+ pszBuffer[1] = (UCHAR)( ( uLong >> 8 ) & 0xFF );
+ pszBuffer[2] = (UCHAR)( ( uLong >> 16 ) & 0xFF );
+ pszBuffer[3] = (UCHAR)( ( uLong >> 24 ) & 0xFF );
+
+ *ppszBuffer += 4;
+ *pnSize += 4;
+
+ return;
+}
+
+/*
+ *
+ */
+ULONG jcULongUnpack( UCHAR** ppszBuffer )
+{
+ ULONG uLong;
+ UCHAR* pszBuffer = *ppszBuffer;
+
+ uLong = ( (ULONG)pszBuffer[0] << 0 ) |
+ ( (ULONG)pszBuffer[1] << 8 ) |
+ ( (ULONG)pszBuffer[2] << 16 ) |
+ ( (ULONG)pszBuffer[3] << 24 );
+
+ *ppszBuffer += 4;
+
+ return uLong;
+}
+
+/*
+ *
+ */
+void jcUShortPack( USHORT uShort, UCHAR** ppszBuffer, int* pnSize )
+{
+ UCHAR* pszBuffer = *ppszBuffer;
+
+ pszBuffer[0] = (UCHAR)( ( uShort >> 0 ) & 0xFF );
+ pszBuffer[1] = (UCHAR)( ( uShort >> 8 ) & 0xFF );
+
+ *ppszBuffer += 2;
+ *pnSize += 2;
+
+ return;
+}
+
+/*
+ *
+ */
+USHORT jcUShortUnpack( UCHAR** ppszBuffer )
+{
+ USHORT uShort;
+ UCHAR* pszBuffer = *ppszBuffer;
+
+ uShort = ( (USHORT)pszBuffer[0] << 0 ) |
+ ( (USHORT)pszBuffer[1] << 8 );
+
+ *ppszBuffer += 2;
+
+ return uShort;
+}
diff --git a/data/mnet/GP10/Host/ViperBase/support.h b/data/mnet/GP10/Host/ViperBase/support.h
new file mode 100644
index 0000000..7765f4f
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperBase/support.h
@@ -0,0 +1,188 @@
+/* support.h
+ * $Id: support.h,v 1.4 1999-07-30 10:38:44-07 olet Exp $
+ *
+ * miscellaneous general purpose functions
+ */
+
+#ifndef _INC_SUPPORT
+#define _INC_SUPPORT
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stddef.h>
+#include <time.h>
+#include <string.h>
+
+#define FALSE 0
+#define TRUE 1
+
+#if !defined( __RVCOMMON_H ) && !defined( __INCvxTypesOldh )
+typedef int BOOL;
+#endif
+
+#if !defined( __INCvxTypesOldh )
+typedef unsigned long ULONG;
+typedef unsigned short USHORT;
+typedef unsigned char UCHAR;
+#endif
+
+typedef void* PVOID;
+typedef char* PSTR;
+
+#define ArraySize( Array ) ( sizeof( Array ) / sizeof( Array[0] ) )
+
+#define New( OBJECT ) ( (OBJECT*)SpecialAlloc( sizeof( OBJECT ) ) )
+#define Delete( pObject ) ( SpecialFree( (PVOID)( pObject ) ) )
+
+typedef int (*ObjectCompareProc)( void* pObjPattern, void* pObjFromList );
+
+typedef struct _NODE* PNODE;
+
+typedef struct _NODE
+{
+ PNODE pNodeNext;
+ PNODE pNodePrev;
+ PVOID pObject;
+}NODE;
+
+typedef struct _LIST
+{
+ PNODE pNodeHead;
+ PNODE pNodeTail;
+ unsigned nObjectsCount;
+}LIST, *PLIST;
+
+
+typedef void ( *pfnCommonCallBack )( PVOID );
+
+typedef struct _TIMER
+{
+ pfnCommonCallBack pfnCallBack;
+ PVOID pData;
+ BOOL bMultiple;
+
+}TIMER, *PTIMER;
+
+
+#define ListGetHead( pList ) ( pList->pNodeHead )
+#define ListGetTail( pList ) ( pList->pNodeTail )
+#define ListGetCount( pList ) ( pList->nObjectsCount )
+
+#define NodeGetNext( pNode ) ( pNode->pNodeNext )
+#define NodeGetPrev( pNode ) ( pNode->pNodePrev )
+#define NodeGetPtr( pNode ) ( pNode->pObject )
+
+#define ListForEachNode( pList, pNode ) \
+ for( pNode = ListGetHead( pList ); \
+ pNode; \
+ pNode = NodeGetNext( pNode ) )
+
+#define ListForEachNodeSafe( pList, pNode, pNodeNext ) \
+ for( pNodeNext = ( pNode = ListGetHead( pList ) ) ? NodeGetNext( pNode ) : NULL ; \
+ pNode; \
+ pNodeNext = ( pNode = pNodeNext ) ? NodeGetNext( pNode ) : NULL )
+
+/* memory */
+PVOID SpecialAlloc( size_t );
+void SpecialFree( PVOID );
+ULONG MemoryGetTotalBlocks( void );
+ULONG MemoryGetTotalSize( void );
+
+/* list */
+PLIST ListCreate( void );
+void ListDelete( PLIST );
+void ListRemoveAllNodes( PLIST ); /* doesn't remove objects itself! */
+void ListRemoveNode( PLIST, PNODE );
+PNODE ListAddHead( PLIST, PVOID );
+PNODE ListAddTail( PLIST, PVOID );
+PNODE ListFindByPtr( PLIST, PVOID );
+PNODE ListFindByData( PLIST, PVOID pObjPattern, ObjectCompareProc );
+
+/* strings */
+PSTR StringCreate( char* psz );
+void StringDelete( PSTR );
+PSTR StringReplace( PSTR* ppszOld, char* psz );
+size_t StringLength( char* psz );
+int StringICompare( char* psz1, char* psz2 );
+char* StringSplit( char* psz, char SplitChar );
+void StringPrint( char* pszFormat, ... );
+void StringIndent( int nSpaces );
+char* StringToken( char* pszThis, char* pszDelims, char** ppszNext );
+
+#define StringCompare( psz1, psz2 ) \
+ ( ( psz1 == NULL || psz2 == NULL ) ? ~0 : strcmp( psz1, psz2 ) )
+
+/* log control */
+BOOL DebugLevelInit( BOOL bLogEnabled );
+void DebugLog( char* pszFormat, ... );
+
+/* math */
+int DivideInts( int nDivident, int nDivisor );
+
+/* timer */
+PTIMER TimerCreate( time_t tmInterval, pfnCommonCallBack, PVOID pData, BOOL bMultiple );
+BOOL TimerDelete( PTIMER );
+
+/* message loop */
+BOOL MainLoop( void );
+
+/* RAD input pipe */
+typedef struct
+{
+ int hPipe;
+ pfnCommonCallBack pfnUserCallBack;
+ int nMsgSize;
+ PVOID pMsg; /* place to read received message */
+
+}RADPIPE, *PRADPIPE;
+
+PRADPIPE RadPipeOpen( char* Name, int nMsgSize, int nMaxMsgs, pfnCommonCallBack );
+BOOL RadPipeWrite( PRADPIPE, PVOID pMessage );
+BOOL RadPipeClose( PRADPIPE );
+
+/* debug */
+#define ExecBreak( Text ) DebugFatalErrorBreak( Text, __FILE__, __LINE__ )
+#define ExecBreakIf( Cond, Text ) if( Cond ) ExecBreak( Text )
+void DebugFatalErrorBreak( char* pszText, char* pszFile, int nLine );
+void SpecialDebugBreak( void );
+
+/* misc */
+char* GetDateTimeString( time_t );
+char* GetOption( char* pszSection, char* pszOption, char* pszDefaultValue );
+char* ParamGetValue( int argc, char** argv, char* pszParam, char* pszDefaultValue );
+BOOL ParamIsPresent( int argc, char** argv, char* pszParam );
+void SpecialSleep( int nSeconds );
+BOOL SocketKeepAlive( int hSocket, BOOL );
+BOOL PlatformLayerInit( void );
+BOOL PlatformLayerDown( void );
+
+/* management */
+
+typedef struct
+{
+ char* pszInput;
+ char* pszOutput;
+ int nOutput;
+
+}MngmCommandData_t, *pMngmCommandData_t;
+
+BOOL MngmPortInit( int MngmPort, pfnCommonCallBack pfnMngmCallBack, BOOL bTelent );
+BOOL MngmTelnetSendString( int hSocket, char* pszString );
+
+/* packing / unpacking for network messages */
+void jcStringPack( char* pszString, UCHAR** ppszBuffer, int* pnSize );
+char* jcStringUnpack( UCHAR** ppszBuffer );
+void jcULongPack( ULONG uLong, UCHAR** ppszBuffer, int* pnSize );
+ULONG jcULongUnpack( UCHAR** ppszBuffer );
+void jcUShortPack( USHORT uShort, UCHAR** ppszBuffer, int* pnSize );
+USHORT jcUShortUnpack( UCHAR** ppszBuffer );
+void jcBufferPack( PVOID pData, USHORT nDataSize, UCHAR** ppszBuffer, int* pnSize );
+PVOID jcBufferUnpack( USHORT nDataSize, UCHAR** ppszBuffer );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _INC_SUPPORT */
diff --git a/data/mnet/GP10/Host/ViperWatch/Images/Jetcelllogo.jpg b/data/mnet/GP10/Host/ViperWatch/Images/Jetcelllogo.jpg
new file mode 100644
index 0000000..97d064b
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/Images/Jetcelllogo.jpg
Binary files differ
diff --git a/data/mnet/GP10/Host/ViperWatch/Images/animated_vipercell.gif b/data/mnet/GP10/Host/ViperWatch/Images/animated_vipercell.gif
new file mode 100644
index 0000000..129d52a
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/Images/animated_vipercell.gif
Binary files differ
diff --git a/data/mnet/GP10/Host/ViperWatch/Images/ciscologo.jpg b/data/mnet/GP10/Host/ViperWatch/Images/ciscologo.jpg
new file mode 100644
index 0000000..dc936c9
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/Images/ciscologo.jpg
Binary files differ
diff --git a/data/mnet/GP10/Host/ViperWatch/Images/filler.gif b/data/mnet/GP10/Host/ViperWatch/Images/filler.gif
new file mode 100644
index 0000000..b169fb1
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/Images/filler.gif
Binary files differ
diff --git a/data/mnet/GP10/Host/ViperWatch/Images/gp10.jpg b/data/mnet/GP10/Host/ViperWatch/Images/gp10.jpg
new file mode 100644
index 0000000..c702a69
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/Images/gp10.jpg
Binary files differ
diff --git a/data/mnet/GP10/Host/ViperWatch/Images/minus.gif b/data/mnet/GP10/Host/ViperWatch/Images/minus.gif
new file mode 100644
index 0000000..5442059
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/Images/minus.gif
Binary files differ
diff --git a/data/mnet/GP10/Host/ViperWatch/Images/plus.gif b/data/mnet/GP10/Host/ViperWatch/Images/plus.gif
new file mode 100644
index 0000000..91c5db9
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/Images/plus.gif
Binary files differ
diff --git a/data/mnet/GP10/Host/ViperWatch/Images/sp_close.gif b/data/mnet/GP10/Host/ViperWatch/Images/sp_close.gif
new file mode 100644
index 0000000..b934910
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/Images/sp_close.gif
Binary files differ
diff --git a/data/mnet/GP10/Host/ViperWatch/Images/vipercell.gif b/data/mnet/GP10/Host/ViperWatch/Images/vipercell.gif
new file mode 100644
index 0000000..086bc4b
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/Images/vipercell.gif
Binary files differ
diff --git a/data/mnet/GP10/Host/ViperWatch/Introduction.htm b/data/mnet/GP10/Host/ViperWatch/Introduction.htm
new file mode 100644
index 0000000..5143953
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/Introduction.htm
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<!-- saved from url=(0018)http://10.1.2.101/ -->
+<HTML><HEAD><TITLE>Cisco GSM Port (GP) Manager</TITLE>
+<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
+<META content=JavaScript name=VI60_defaultClientScript>
+<META content="Microsoft FrontPage 4.0" name=GENERATOR>
+<META content=FrontPage.Editor.Document name=ProgId></HEAD><FRAMESET
+rows=65,*,21><FRAME name=header noResize scrolling=no
+src="Introduction_files/top_frame.html" target="main"><FRAMESET
+cols=216,*><FRAME name=contents src="Introduction_files/left_frame.html"
+target="main"><FRAME name=main src="Introduction_files/dual_trx_card.html"
+target="main"></FRAMESET><FRAME name=footer noResize scrolling=no
+src="Introduction_files/bottom_frame.html"
+target="footer"><NOFRAMES>
+
+ <body onload="$%reloadTopframe#$">
+ <p>This page uses frames, but your browser doesn't support them.
+
+ </body>
+
+ </NOFRAMES></FRAMESET></HTML>
diff --git a/data/mnet/GP10/Host/ViperWatch/Java/AlarmApplet.class b/data/mnet/GP10/Host/ViperWatch/Java/AlarmApplet.class
new file mode 100644
index 0000000..7d9c873
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/Java/AlarmApplet.class
Binary files differ
diff --git a/data/mnet/GP10/Host/ViperWatch/Java/AlarmCommThread.class b/data/mnet/GP10/Host/ViperWatch/Java/AlarmCommThread.class
new file mode 100644
index 0000000..6baccc8
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/Java/AlarmCommThread.class
Binary files differ
diff --git a/data/mnet/GP10/Host/ViperWatch/Java/MibWM.jar b/data/mnet/GP10/Host/ViperWatch/Java/MibWM.jar
new file mode 100644
index 0000000..c540f95
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/Java/MibWM.jar
Binary files differ
diff --git a/data/mnet/GP10/Host/ViperWatch/Text/AlarmCode.English b/data/mnet/GP10/Host/ViperWatch/Text/AlarmCode.English
new file mode 100644
index 0000000..59b914b
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/Text/AlarmCode.English
@@ -0,0 +1,115 @@
+// AlarmCode.English
+// Copyright (C) 2000 Cisco Systems, Inc.
+// All rights reserved
+// WARNING: This file is automatically generated by an AlarmCode tool
+// Any changes made to this file will be overwritten by
+// subsequent uses of the tool.
+//
+// ALARM_ERROR_CODE | "ALARM_SYNOPSIS" | "ALARM_DETAIL_MESSAGE"
+ 0 | Module alarm has cleared | The alarm code %1 was cleared by module %module. The operational state of GSM Port depends on alarm status from all modules.
+ 16711681 | Module booting up | Module %module is booting up now
+ 16711682 | Module shutting down | Module %module is shutting down now
+ 16711683 | Out of Internal Memory Error | The GSM Port ran out of memory. Module %module did not complete its intended operation. GSM Port must be rebooted to recover from this situation.
+ 16711684 | System Internal Error | GSM Port software system encountered an unexpected error, which resulted in data corruption. GSM Port must be rebooted to recover from this situation.
+ 16711685 | Reboot Started | The GSM Port is rebooting now.
+ 131074 | First DSP/FPGA Hardware Failure | Bit clock at the first DSP/Fpga is not functioning. GSM Port must be rebooted to recover from this situation.
+ 131075 | Second DSP/FPGA Hardware Failure | Bit clock at the second DSP/Fpga is not functioning. GSM Port must be rebooted to recover from this situation.
+ 131076 | First DSP not responding | Link between RM and first DSP is broken. GSM Port must be rebooted to recover from this situation.
+ 131077 | Second DSP not responding | Link between RM and second DSP is broken. GSM Port can function in a reduced-Capacity mode if the first DSP can function properly. GSM Port must be rebooted to recover from this situation.
+ 131078 | Cell Broadcast Channel unusable | Cell broadcast channel initialization failed. Cell broadcast will not be supported until the next reboot. This channel, however, does not affect the operational state of the GSM Port.
+ 131079 | No usable traffic channel | Initialization of all the traffic channels failed. Please unlock them if they are locked. If the their admin state is already unlocked, please reboot the system.
+ 131080 | No TRX enabled | Initialization of both TRX failed. Please unlock them if they are locked. If the their admin state is already unlocked, please reboot the system.
+ 131081 | Illegal Configuration - No BCCH Channel | No BCCH channel combination is specified in the MIB. Please check the first TRX configuration through GP Manager.
+ 131082 | Illegal Configuration - Unsupported Channel | Unsupported channel combination is detected in the MIB. Please check both first and second TRX configuration through GP Manager
+ 131083 | Illegal Configuration - Two BCCH Channel | Only one BCCH channel is supported at this time but two BCCH channel configuration found. Please correct this problem through GP Manager.
+ 131084 | Illegal Configuration - Too many Channel Combination I | Too many channel combination I configuration found. Please correct this problem through GP Manager.
+ 131085 | Illegal Configuration - Multiple BCCH Channels | Only one BCCH channel is supported at this time but more than two BCCH channels have been configured. Please correct this problem through GP Manager.
+ 131086 | System Call Failure - Watchdog timer create | RM module detects failure in creating WatchDog Timer which is essential for proper software operation. GSM Port must be rebooted to recover from this situation.
+ 131087 | System Call Failure - Message queue receive | RM module encountered failure in receiving message. GSM Port must be rebooted to recover from this situation.
+ 131088 | OAM Api Failure | Could not set a field of a MIB table entry.
+ 131089 | Oam Api Failure | Could not set a MIB integer variable.
+ 131090 | RF board not detected | Failed to detect RF board. Please check if it is there.
+ 135169 | GSM Port Locked | The GSM Port was locked successfully. Existing calls (if any) were aborted. No new calls can be made through GSM Port.
+ 135170 | GSM Port Unlocked | The GSM Port was unlocked successfully. GSM Port can accept new calls if its operational state is enabled.
+ 135171 | GSM Port Shutting Down | The GSM Port is being shutdown. No new calls can be made through GSM Port. Existing calls are maintained until terminates normally.
+ 135172 | First TRX Locked | The first TRX was locked successfully. Locking of first TRX is equivalent of locking of GSM Port. Existing calls (if any) were aborted. No new calls can be made through GSM Port.
+ 135173 | Second TRX Locked | The second TRX was locked successfully. Existing calls (if any) were aborted. No new calls will be made through this TRX.
+ 135174 | First TRX Unlocked | The first TRX was unlocked successfully. New calls can be made through this TRX.
+ 135175 | Second TRX Unlocked | The second TRX was unlocked successfully. New calls can be made through this TRX.
+ 135176 | First TRX shutting down | The first TRX is being shutting down. Shutting down first TRX is equivalent of shutting down GSM Port. No new calls can be made through GSM Port. Existing calls are maintained until terminates normally.
+ 135177 | Second TRX shutting down | The second TRX is being shutting down. No new calls can be made through this TRX. Existing calls are maintained until terminates normally.
+ 135178 | First TRX Time Slot 0 locked | Locking of Time Slot 0 of first TRX is equivalent of locking GSM Port. Existing calls (if any) were aborted. No new calls can be made through GSM Port.
+ 135179 | First TRX Time Slot 1 locked | Time slot 1 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135180 | First TRX Time Slot 2 locked | Time slot 2 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135181 | First TRX Time Slot 3 locked | Time slot 3 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135182 | First TRX Time Slot 4 locked | Time slot 4 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135183 | First TRX Time Slot 5 locked | Time slot 5 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135184 | First TRX Time Slot 6 locked | Time slot 6 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135185 | First TRX Time Slot 7 locked | Time slot 7 of the first TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135186 | Second TRX Time Slot 0 locked | Time slot 0 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135187 | Second TRX Time Slot 1 locked | Time slot 1 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135188 | Second TRX Time Slot 2 locked | Time slot 2 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135189 | Second TRX Time Slot 3 locked | Time slot 3 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135190 | Second TRX Time Slot 4 locked | Time slot 4 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135191 | Second TRX Time Slot 5 locked | Time slot 5 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135192 | Second TRX Time Slot 6 locked | Time slot 6 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135193 | Second TRX Time Slot 7 locked | Time slot 7 of the second TRX was locked successfully. Existing call (if any) was aborted. No new call can be made through this time slot.
+ 135194 | First TRX Time Slot 0 Unlocked | Time slot 0 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135195 | First TRX Time Slot 1 Unlocked | Time slot 1 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135196 | First TRX Time Slot 2 Unlocked | Time slot 2 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135197 | First TRX Time Slot 3 Unlocked | Time slot 3 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135198 | First TRX Time Slot 4 Unlocked | Time slot 4 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135199 | First TRX Time Slot 5 Unlocked | Time slot 5 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135200 | First TRX Time Slot 6 Unlocked | Time slot 6 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135201 | First TRX Time Slot 7 Unlocked | Time slot 7 of the first TRX was unlocked successfully. New calls can be made through this time slot.
+ 135202 | Second TRX Time Slot 0 Unlocked | Time slot 0 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135203 | Second TRX Time Slot 1 Unlocked | Time slot 1 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135204 | Second TRX Time Slot 2 Unlocked | Time slot 2 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135205 | Second TRX Time Slot 3 Unlocked | Time slot 3 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135206 | Second TRX Time Slot 4 Unlocked | Time slot 4 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135207 | Second TRX Time Slot 5 Unlocked | Time slot 5 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135208 | Second TRX Time Slot 6 Unlocked | Time slot 6 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135209 | Second TRX Time Slot 7 Unlocked | Time slot 7 of the second TRX was unlocked successfully. New calls can be made through this time slot.
+ 135210 | First TRX Time Slot 0 shutting down | Time slot 0 of the first TRX is being shutdown. Shutting down Time Slot 0 of First TRX is equivalent of shutting down GSM Port. Existing calls will be maintained until terminate normally. No new calls can be made through GSM Port.
+ 135211 | First TRX Time Slot 1 shutting down | Time slot 1 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135212 | First TRX Time Slot 2 shutting down | Time slot 2 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135213 | First TRX Time Slot 3 shutting down | Time slot 3 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135214 | First TRX Time Slot 4 shutting down | Time slot 4 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135215 | First TRX Time Slot 5 shutting down | Time slot 5 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135216 | First TRX Time Slot 6 shutting down | Time slot 6 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135217 | First TRX Time Slot 7 shutting down | Time slot 7 of the first TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135218 | Second TRX Time Slot 0 shutting down | Time slot 0 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135219 | Second TRX Time Slot 1 shutting down | Time slot 1 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135220 | Second TRX Time Slot 2 shutting down | Time slot 2 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135221 | Second TRX Time Slot 3 shutting down | Time slot 3 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135222 | Second TRX Time Slot 4 shutting down | Time slot 4 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135223 | Second TRX Time Slot 5 shutting down | Time slot 5 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135224 | Second TRX Time Slot 6 shutting down | Time slot 6 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135225 | Second TRX Time Slot 7 shutting down | Time slot 7 of the second TRX is being shutdown. Existing call (if any) will be maintained until terminate normally. No new call can be made through this time slot.
+ 135226 | Radio for the first TRX is off | Radio for the first TRX is off
+ 135227 | Radio for the second TRX is off | Radio for the second TRX is off
+ 135228 | RM detects corrupted Layer 1 message | RM module detected a corrupted message from Layer 1.
+ 327681 | LAPDm Internal Failure | Data corruption in the LAPDm Layer software. The system needs a reboot
+ 327936 | LAPDm Resource Exhausted | LAPDm Layer ran out of available frame buffer. This is most likely caused by radio link problem with MS.
+ 462848 | (Re)Load MIB | New MIB have been loaded on %1. You most likely need to reboot the GSM Port
+ 462850 | MIB save option Change - Timer enabled | MIB save timer has been disabled on %1.
+ 462849 | MIB save option Change - Timer disabled | MIB save timer has been disabled on %1.
+ 462851 | MIB Option Change - Duplicate save allowed | MIB save option change on %1.
+ 462852 | MIB option change - Duplicate save not allowed | Duplicate saving of the MIB is now disabled. This will improve the response time of the set operation at GP Manager
+ 458753 | GSM Port Operator-Initiated Reboot | The operator has initiated a reboot on %1. GSM Port will reboot within a few seconds.
+ 524289 | GMC Link Down | Detected link lost to GMC. Please check the operational status of GMC and the physical network connectivity between GMC and GSM Port.
+ 917505 | MPC SRAM test failure | MCH Module's Test results indicates that there was a failure in MPC SRAM Test.
+ 917506 | DSP0 internal data RAM test failure | MCH Module's Post Test results indicates that there was a failure in DSP0's internal data RAM Test.
+ 917507 | DSP1 internal data RAM test failure | MCH Module's Post Test results indicates that there was a failure in DSP1's internal data RAM Test.
+ 917508 | DSP0 internal program RAM test failure | MCH Module's Post Test results indicates that there was a failure in DSP0's internal program RAM Test.
+ 917509 | DSP1 internal program RAM test failure | MCH Module's Post Test results indicates that there was a failure in DSP1's internal program RAM Test.
+ 917510 | DSP0 external RAM test failure | MCH Module's Post Test results indicates that there was a failure in DSP0's external RAM Test.
+ 917511 | DSP1 external RAM test failure | MCH Module's Post Test results indicates that there was a failure in DSP1's external RAM Test.
+ 917512 | FPGA0 test failure | MCH Module's Post Test results indicates that there was a failure in FPGA0 Test.
+ 917513 | FPGA1 test failure | MCH Module's Post Test results indicates that there was a failure in FPGA1 Test.
+ 917514 | I2C test failure | MCH Module's Post Test results indicates that there was a failure in I2C Test.
+ 917515 | ViperTask startup delay detected | One or more ViperTask has a delay on startup, reporting readiness late.
+ 917516 | SysCommand_xxx symbol not found | One or more module's SysCommand_xxx() function symbol is not found. Check module loading logs.
+ 917517 | ViperTask suspension detected | One or more ViperTask suspension detected.
+ 917518 | ViperTask exit abnormally detected | One or more ViperTask exited abnormally detected.
+ 917519 | LoadModule failure | Loading module object codes had problems. Check startup logs.
diff --git a/data/mnet/GP10/Host/ViperWatch/adjcell_handover_package.htm b/data/mnet/GP10/Host/ViperWatch/adjcell_handover_package.htm
new file mode 100644
index 0000000..69cdd47
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/adjcell_handover_package.htm
@@ -0,0 +1,289 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Adjacent Cell Handover Package</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+
+var noCols = Number("16");
+var noRows = Number("16");
+var index = 1;
+function displayIndex()
+{
+ document.write(" " + index++ + " ");
+}
+
+function PresetForm(theForm)
+{
+ for (var i = 0; i < theForm.adjCell_synchronizedSelect.length; i++)
+ {
+ if(theForm.elements[(i+1)*noCols-1].value > 0)
+ {
+ theForm.elements[(i*noCols)].checked = true;
+ theForm.elements[(i*noCols)].defaultChecked = true;
+ }
+ ZeroOutRow(theForm.elements[(i*noCols)])
+ cvtIntToBCD(theForm.elements[(i*noCols)+1], 3);
+ theForm.elements[(i*noCols)+1].defaultValue = theForm.elements[(i*noCols)+1].value;
+ cvtIntToBCD(theForm.elements[(i*noCols)+2], 2);
+ theForm.elements[(i*noCols)+2].defaultValue = theForm.elements[(i*noCols)+2].value;
+ selectOption(theForm.adjCell_synchronizedSelect[i], theForm.elements[(i*noCols)+9]);
+ clickCheckBox(theForm.elements[(i*noCols)+noCols-3], theForm.elements[(i*noCols)+noCols-2]);
+ }
+ return true;
+}
+
+function ZeroOutRow(theCheck)
+{
+ var theIndex = Number(theCheck.value);
+
+ if (!theCheck.checked)
+ {
+ for (var i = 1; i < noCols; i++)
+ {
+ if (i != 8)
+ {
+ theCheck.form.elements[(theIndex*noCols)+i].value = 0;
+ }
+ }
+ }
+ return true;
+}
+
+function validateRow(theForm, theIndex)
+{
+ if (theForm.elements[theIndex*noCols].checked)
+ {
+ if (theForm.elements[(theIndex*noCols)+3].value == 0)
+ {
+ alert("You must provide a non-zero Location Area Code (LAC) for the cell configured at row " + Number(theIndex+1) );
+ theForm.elements[(theIndex*noCols)+3].focus();
+
+ return false;
+ }
+
+ for (var i = 1; i <= 5 ; i++)
+ {
+ if ( i != 4 && i != 3 )
+ {
+ if (theForm.elements[(theIndex*noCols)+i].value == 0)
+ {
+ if (!confirm("You are trying to save a zero for at least one of the fields of the neighboring cell configured at row " + Number(theIndex+1) + ".\n Though zero is a legitimate value for this field it should be used sparingly.\n Are you sure you want to save this parameter."))
+ {
+ theForm.elements[(theIndex*noCols)+i].focus();
+ return false;
+ } else {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ return true;
+}
+
+
+function ParseForm(theForm)
+{
+ for (var i = 0; i < theForm.adjCell_synchronizedSelect.length; i++)
+ {
+ if (!validateRow(theForm, i))
+ return false;
+ }
+ for (var theIndex = 0; theIndex < theForm.adjCell_synchronizedSelect.length; theIndex++)
+ {
+ if (theForm.elements[theIndex*noCols].checked)
+ {
+ theForm.elements[(theIndex*noCols)+noCols-1].value = theForm.elements[(theIndex*noCols)+3].value;
+ if (theForm.elements[(theIndex*noCols)+noCols-3].checked)
+ theForm.elements[(theIndex*noCols)+noCols-2].value = 1;
+ else
+ theForm.elements[(theIndex*noCols)+noCols-2].value = 0;
+ }
+ }
+ return true;
+}
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="adjcell_handover">
+
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" height="238">
+ <tr>
+ <td height="232">
+ <h2 align="center">Adjacent Cell Handover Package</h2>
+ <table border="1">
+ <tr>
+ <td rowspan="2"><b>Index</b></td>
+ <td rowspan="2"><b>Selected</b></td>
+
+ <td colspan="4"
+ title="This attribute contains the Cell Identification (CI) and the Location Area of the cell. A Location Area is unique within a GSM PLMN; a Cell Identification is unique within a location area. For further details see Specification GSM 03.03.">
+ <p align="center"><b>Cell Global Identity</b></td>
+ <td rowspan="2"
+ title="This attribute contains the absolute radio frequency channel number of the BCCH channel of adjacent cells. This information is sent to the mobile station.">
+ <p align="center"><b>BCCH<br>
+ &nbsp;Frequency</b></p>
+ </td>
+ <td colspan="2"
+ title="This attribute contains the Base Station Identity Code (BSIC), which is transmitted on the SCH and used for identifying a BTS. The BSIC consists of the Network Colour Code (NCC) and the Base Station Colour Code (BCC). Refer to Specification GSM 04.08.">
+ <p align="center"><b>BSIC</b></td>
+ <td rowspan="2"
+ title="The synchronized attribute indicates whether the adjacent cell is synchronized with the origin cell. Refer to Specification GSM 05.08 [21] (N_CELL_LIST).">
+ <p align="center"><b>Synchronized<br>
+ &nbsp;</b></p>
+ </td>
+ <td rowspan="2"
+ title="The hoMargin attribute value is used as a threshold to prevent repetitive hand-over between adjacent cells, in case the handover is caused by received signal level or the power budget process. Refer to Annex A of Specification GSM 05.08 [21] (HO_MARGIN (n)).">
+ <p align="center"><b>Handover<br>
+ Margin<br>
+ (dB)</b></p>
+ </td>
+ <td rowspan="2"
+ title="The msTxPwrMaxCell attribute is used to indicate the maximum power level a MS may use in an adjacent cell. See Table 1 of Annex A of Specification GSM 05.08 [21] (MS_TXPWR_MAX (n)).">
+ <p align="center"><b>Max Tx<br>
+ &nbsp;Power<br>
+ (dBm)</b></p>
+ </td>
+ <td rowspan="2"
+ title="The rxLevMinCell attribute holds the minimum received signal strength in a cell, for a MS to be handed over to that cell. See Annex A of Specification GSM 05.08 [21] (RXLEV_MIN (n)). Each adjacent cell may have a different specific value.">
+ <p align="center"><b>Min Rx<br>
+ &nbsp;Level</b></p>
+ </td>
+ <td rowspan="2"
+ title="External handover">
+ <p align="center"><b>External<br>
+ Handover</b></p>
+ </td>
+ </tr>
+ <tr>
+ <td title="Mobile Country Code"><b>MCC</b></td>
+ <td title="Mobile Network Code"><b>MNC</b></td>
+ <td title="Location Area Code"><b>LAC</b></td>
+ <td title="Cell Identification"><b>CI</b></td>
+ <td title="Network Colour Code"><b>NCC</b></td>
+ <td title="Base Station Colour Code"><b>BCC</b></td>
+ </tr>
+
+ <form method="POST">
+ <!$%createTable(adjCell_handoverIndex,*,,,,,adjCell_handoverIndex,adjCell_handoverCellID,adjCell_mcc,adjCell_mnc,adjCell_lac,adjCell_ci,adjCell_bCCHFrequency,adjCell_ncc,adjCell_cid,adjCell_synchronized,adjCell_hoPriorityLevel,adjCell_hoMargin,adjCell_msTxPwrMaxCell,adjCell_rxLevMinCell,adjCell_isExternal)#$>
+ <!$%REPEAT(adjCell_handoverIndex,1,16)#$>
+ <tr>
+ <td valign="middle" align="center"><script> displayIndex() </script></td>
+ <td valign="middle" align="center" title="Check this button and fill the rest of the row if you want to enable add cell as a handover candidate.">
+ <input type="checkbox" name="used.$%getInstance(adjCell_handoverIndex)#$" value="$%getInstance(adjCell_handoverIndex)#$" onClick="ZeroOutRow(this);">
+ </td>
+ <td valign="middle" align="center" title="Mobile Country Code: 3 Digits">
+ <p align="center"><input type="text" name="adjCell_mcc.$%getInstance(adjCell_handoverIndex)#$" value="$%adjCell_mcc#$" size="3"
+ maxlength="3" onchange="isValidInt(this,0,999); cvtIntToBCD(this,3);"></p>
+ </td>
+ <td valign="middle" align="center" title="Mobile Network Code: 2 Digits">
+ <p align="center"><input type="text" name="adjCell_mnc.$%getInstance(adjCell_handoverIndex)#$" value="$%adjCell_mnc#$" size="2"
+ maxlength="2" onchange="isValidInt(this,0,99); cvtIntToBCD(this,2);"></p>
+ </td>
+ <td valign="middle" align="center" title="Location Area Code: INTEGER (0..65535)">
+ <p align="center"><input type="text" name="adjCell_lac.$%getInstance(adjCell_handoverIndex)#$" value="$%adjCell_lac#$" size="6"
+ maxlength="6" onchange="return isValidInt(this);"></p>
+ </td>
+ <td valign="middle" align="center" title="Cell Identity : INTEGER (0..65535)">
+ <p align="center"><input type="text" name="adjCell_ci.$%getInstance(adjCell_handoverIndex)#$" value="$%adjCell_ci#$" size="5"
+ maxlength="5" onchange="return isValidInt(this,0,65534);"></p>
+ </td>
+ <td valign="middle" align="center" title="BCCH frequency of the cell -- INTEGER(0..1023)">
+ <p align="center"><input type="text" name="adjCell_bCCHFrequency.$%getInstance(adjCell_handoverIndex)#$" value="$%adjCell_bCCHFrequency#$"
+ size="4" maxlength="4" onchange="return isValidInt(this,0,1023);"></p>
+ </td>
+ <td valign="middle" align="center" title="Network (PLMN) Colour Code: INTEGER (0..7)">
+ <p align="center"><input type="text" name="adjCell_ncc.$%getInstance(adjCell_handoverIndex)#$" value="$%adjCell_ncc#$" size="1"
+ maxlength="1" onchange="return isValidInt(this,0,7);"></p>
+ </td>
+ <td valign="middle" align="center" title="Base Transceiver Station (BTS) Colour Code: INTEGER (0..7)">
+ <p align="center"><input type="text" name="adjCell_cid.$%getInstance(adjCell_handoverIndex)#$" value="$%adjCell_cid#$" size="1"
+ maxlength="1" onchange="return isValidInt(this,0,7);"></p>
+ </td>
+ <td valign="middle" align="center"><select size="1" name="adjCell_synchronizedSelect">
+ <!------------- Not used now
+ <option value="1">Yes</option>
+ -------------->
+ <option value="0">NO</option>
+ </select></td>
+ <input name="adjCell_synchronized.$%getInstance(adjCell_handoverIndex)#$" type="hidden" value="$%adjCell_synchronized#$">
+ <td valign="middle" align="center" title="INTEGER (0..24) -- dB">
+ <p align="center"><input type="text" name="adjCell_hoMargin.$%getInstance(adjCell_handoverIndex)#$" value="$%adjCell_hoMargin#$" size="2"
+ maxlength="2" onchange="return isValidInt(this,0,24);"></p>
+ </td>
+ <td valign="middle" align="center"
+ title="TxPower ::= INTEGER
+-- Value in dBm
+-- TXPWR range in GSM 900: 5..39 dBm
+-- TXPWR range in DCS 1800: 0..30 dBm
+-- TXPWR range in PCS 1900: 0..33 dBm">
+ <p align="center"><input type="text" name="adjCell_msTxPwrMaxCell.$%getInstance(adjCell_handoverIndex)#$"
+ value="$%adjCell_msTxPwrMaxCell#$" size="2" maxlength="2" onchange="return isValidTxPower(this, $%gsmdcsIndicator#$);"></p>
+ </td>
+
+ <td valign="middle" align="center"
+ title="RxLev ::= INTEGER (0..63)
+-- 0 : &lt; -110 dB,
+-- 1 : -110 dB .. -109 dB
+-- 2 : -109 dB .. -108 dB
+--
+-- 63: &gt; -48 dB
+-- Ref. GSM 05.08 (RXLEV)">
+ <p align="center"><input type="text" name="adjCell_rxLevMinCell.$%getInstance(adjCell_handoverIndex)#$" value="$%adjCell_rxLevMinCell#$"
+ size="2" maxlength="2" onchange="return isValidInt(this,0,63);"></p>
+ </td>
+
+ <td valign="middle" align="center" title="External Handover">
+ <input type="checkbox" name="ExternalCheckBox">
+ <input type="hidden" name="adjCell_isExternal.$%getInstance(adjCell_handoverIndex)#$" value="$%adjCell_isExternal#$">
+ </td>
+
+ </tr>
+ <input type="hidden" name="adjCell_handoverCellID.$%getInstance(adjCell_handoverIndex)#$" value="$%adjCell_handoverCellID#$">
+ <!$%endRow(adjCell_handoverIndex)#$>
+ <!$%REPEAT(END)#$>
+ <!$%endTable(adjCell_handoverIndex)#$>
+
+ </table>
+ <div align="center">
+ <center>
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </center>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p align="center">&nbsp;</p>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/adjcell_reslection_package.htm b/data/mnet/GP10/Host/ViperWatch/adjcell_reslection_package.htm
new file mode 100644
index 0000000..c06bcc9
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/adjcell_reslection_package.htm
@@ -0,0 +1,155 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Adjacent Cell Reselection Package</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+var noCols = 3;
+var index = 1;
+function displayIndex()
+{
+ document.write(" " + index++ + " ");
+}
+
+function PresetForm(theForm)
+{
+
+ for (var i = 0; i < 16; i++)
+ {
+ if(theForm.elements[(i+1)*noCols-1].value > 0)
+ {
+ theForm.elements[(i*noCols)].checked = true;
+ theForm.elements[(i*noCols)].defaultChecked = true;
+ }
+ ZeroOutRow(theForm.elements[(i*noCols)])
+ }
+ return true;
+}
+
+function validateRow(theForm, theIndex)
+{
+ if (theForm.elements[theIndex*noCols].checked)
+ {
+ if (theForm.elements[(theIndex*noCols)+1].value == 0)
+ {
+ if (!confirm("You are trying to save a neighbouring cell with a zero BCCH frequency at row " + Number(theIndex+1) + ".\n Though zero is a legitimate ARFCN frequency it should be used sparingly.\n Are you sure you want to save this parameter."))
+ {
+ theForm.elements[(theIndex*noCols)+1].focus();
+ return false;
+ } else {
+ return true;
+ }
+
+ }
+ }
+ return true;
+}
+
+
+function ParseForm(theForm)
+{
+ for (var i = 0; i < 16; i++)
+ {
+ if (!validateRow(theForm, i))
+ return false;
+ }
+ return true;
+}
+
+function ZeroOutRow(theCheck)
+{
+ var theIndex = Number(theCheck.value);
+ if (theCheck.checked)
+ {
+ theCheck.form.elements[(theIndex*noCols)+noCols-1].value = theIndex+1;
+ } else {
+ for (var i = 1; i < noCols; i++)
+ {
+ theCheck.form.elements[(theIndex*noCols)+i].value = 0;
+ }
+ }
+ return true;
+}
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="adjcell_handover">
+
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="381">
+ <tr>
+ <td width="365">
+ <h2 align="center">Adjacent Cell Reselection Package</h2>
+ <div align="center">
+ <table border="1" cellpadding="2">
+ <tr>
+ <td width="42" height="22" align="center" >
+ <p align="center">Index</td>
+ <td width="51" height="22" align="center" >
+ <p align="center">Selected</td>
+ <td width="107" height="22" align="center" >
+ <p align="center">BCCH Frequency</td>
+ </tr>
+
+ <!$%createTable(adjCell_reselectionIndex,*,,,,,adjCell_reselectionIndex,adjCell_reselectionCellID,adjCell_reselectionBCCHFrequency)#$>
+ <!$%REPEAT(adjCell_reselectionIndex,1,16)#$>
+ <tr>
+ <td width="42" align="center"><font face="Arial, Helvetica"><script> displayIndex() </script></font></td>
+ <td width="51" align="center">
+ <p align="center">
+ <input type="checkbox" name="used.$%getInstance(adjCell_reselectionIndex)#$" value="$%getInstance(adjCell_reselectionIndex)#$" onClick="ZeroOutRow(this);">
+ </p>
+ </td>
+ <td width="107" align="center">
+ <p align="center"><input type="text" name="adjCell_reselectionBCCHFrequency.$%getInstance(adjCell_reselectionIndex)#$"
+ value="$%adjCell_reselectionBCCHFrequency#$" size="4" maxlength="4" onchange="return isValidInt(this,0,1023);"></p>
+ </td>
+ </tr>
+ <input type="hidden" name="adjCell_reselectionCellID.$%getInstance(adjCell_reselectionIndex)#$" value="$%adjCell_reselectionCellID#$">
+ <!$%endRow(adjCell_reselectionIndex)#$>
+ <!$%REPEAT(END)#$>
+ <!$%endTable(adjCell_reselectionIndex)#$>
+
+
+ </table>
+ </div>
+ <div align="center">
+ <center>
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </center>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p align="center">&nbsp;</p>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/adjcent_cell_mgmt_overview.htm b/data/mnet/GP10/Host/ViperWatch/adjcent_cell_mgmt_overview.htm
new file mode 100644
index 0000000..a143dcc
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/adjcent_cell_mgmt_overview.htm
@@ -0,0 +1,28 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Adjacent Cell Configuration Management</title>
+</head>
+
+<body onload="$%reloadTopframe#$">
+
+<SCRIPT language="JavaScript" src="./js/link.js"></SCRIPT>
+
+<h2><nobr>Adjacent Cell Configuration Management</nobr></h2>
+<p>Adjacent Cell Configuration Management&nbsp; section&nbsp; consists of the following pages:</p>
+<ul>
+ <li><nobr><a href="adjcell_handover_package.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Adjacent Cell Handover Package">Adjacent Cell Handover Package</a></nobr></li>
+ <li><nobr><a href="adjcell_reslection_package.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Adjacent Cell Reselection Package">Adjacent Cell Reselection Package</a><br>
+ </li>
+ </ul>
+</nobr>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/alarm.htm b/data/mnet/GP10/Host/ViperWatch/alarm.htm
new file mode 100644
index 0000000..13e04db
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/alarm.htm
@@ -0,0 +1,21 @@
+<HTML>
+<Title>GP10 Alarm</Title>
+<BODY onload="$%reloadTopframe#$">
+
+<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+WIDTH = 0 HEIGHT = 0 codebase="http://java.sun.com/products/plugin/1.2/jinstall-12-win32.cab#Version=1,2,0,0">
+<PARAM NAME = CODE VALUE = "Java/AlarmApplet.class">
+<PARAM NAME = CODEBASE VALUE = "./" >
+<PARAM NAME = NEWINDOW VALUE = "TRUE" >
+<PARAM NAME = ARCHIVE VALUE = "Java/MibWM.jar" >
+
+<PARAM NAME="type" VALUE="application/x-java-applet;version=1.2">
+<PARAM NAME = cabbase VALUE ="Java/MibWM.cab">
+<COMMENT>
+<EMBED type="application/x-java-applet;version=1.2" NEWINDOW="TRUE" java_CODE = "Java/AlarmApplet.class" java_CODEBASE = "./" java_ARCHIVE = "Java/MibWM.jar" WIDTH = 720 HEIGHT = 400 cabbase = "Java/MibWM.cab" pluginspage="http://Java.sun.com/products/plugin/1.2/plugin-install.html"><NOEMBED></COMMENT>
+
+</NOEMBED></EMBED>
+</OBJECT>
+
+</BODY>
+</HTML>
diff --git a/data/mnet/GP10/Host/ViperWatch/alarm_detail.htm b/data/mnet/GP10/Host/ViperWatch/alarm_detail.htm
new file mode 100644
index 0000000..a9979fc
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/alarm_detail.htm
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+
+<head>
+<title>Detail Alarm Information</title>
+<meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
+<meta content="noIndex, Follow" name="Robots">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<style>body { margin: 0px }
+</style>
+<script >
+
+var time, severity, module, detail, got
+function displayTopic(alarmText)
+{
+ var re = /%20/gi;
+ var newText = alarmText.replace(re, " ");
+ var aAlarm = newText.split("|")
+
+ if (aAlarm.length < 6)
+ {
+ document.write("Error: Alarm Could not be retrieved");
+ return;
+ }
+ if (aAlarm[5])
+ {
+ document.write(aAlarm[5]);
+ } else {
+ document.write("Error: Alarm Could not be retrieved");
+ return;
+ }
+ got = "true";
+ time = aAlarm[1];
+ severity = aAlarm[2];
+ module= aAlarm[4];
+
+ // Replace module
+ re = /%module/gi;
+ detail = aAlarm[6].replace(re, module);
+
+ // Replace Arguments
+ if (aAlarm.length > 7)
+ re = /%1/gi;
+ detail = detail.replace(re, aAlarm[7]);
+
+}
+
+function getSeverityText(theSeverity)
+{
+ var textState = "";
+ var Color = "";
+ var help = ""
+
+ switch(theSeverity)
+ {
+ case "0":
+ // Critical
+ textState = "Critical";
+ break;
+ case "1":
+ // Major
+ textState = "Major";
+ break;
+ case "2":
+ // Minor
+ textState = "Minor";
+ break;
+ case "3":
+ // Alarm Cleared
+ textState = "Information";
+ break;
+
+ default:
+ textState = "Invalid";
+ break;
+ }
+
+ return textState;
+
+}
+
+
+function displayTime(utctime)
+{
+
+ var gmtDate = new Date(utctime*1000);
+ return gmtDate.toLocaleString();
+}
+
+
+function DisplayDetail()
+{
+if ( got == "true")
+ {
+ document.write("Reporting Module: " + module);
+ document.write("<br>Reported time: " + displayTime(time));
+ document.write("<br>Severity: " + getSeverityText(severity));
+ document.write("<p>Message: " + detail);
+ }
+}
+
+
+
+</script>
+
+</head>
+
+<body alink="#006699" bgcolor="#FFFFCC" link="#006699" vlink="#006699" marginwidth="0" marginheight="0" onload="$%reloadTopframe#$">
+
+<center>
+<table border="0" cellpadding="3" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td bgcolor="#cccccc" valign="center" width="90%"><b><font face="arial,helvetica" size="3">
+<script>
+displayTopic("$%AlarmDetail#$")
+</script>
+
+ </font></b></td>
+ <td bgcolor="#cccccc" width="10">&nbsp;&nbsp;&nbsp;</td>
+ <td align="right" bgcolor="#cccccc" valign="center"><a href="javascript:window.close()"><img alt="Close this window and continue" border="0"
+ height="19" name="sp_close" src="Images/sp_close.gif" vspace="20" width="103"></a>
+ <tr>
+ <td colspan="3" valign="top" width="*" bgcolor="#FFFFCC"><br>
+ <font face="arial,helvetica" size="2"><b>
+ <script> DisplayDetail() </script>
+ </b></font></td>
+ </tr>
+ </tbody>
+</table>
+</center>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/apaIndexPage.htm b/data/mnet/GP10/Host/ViperWatch/apaIndexPage.htm
new file mode 100644
index 0000000..e0d0106
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/apaIndexPage.htm
@@ -0,0 +1,41 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>New Page 1</title>
+</head>
+
+<body onload="$%reloadTopframe#$">
+
+<SCRIPT language="JavaScript" src="./js/link.js"></SCRIPT>
+
+<h2><nobr>Automatic Parameter Allocation</nobr></h2>
+<p>Automatic Parameter Allocation section consists of the following screens:</p>
+<ul>
+ <li><a
+ href="automatic_parameter_allocation.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Automatic Parameter Allocation Parameters">Automatic Parameter
+ Allocation</a></nobr></li>
+ <li><a
+ href="apa_invalid_frequency_table.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Automatic Parameter Allocation Invalid Frequencies">Automatic
+ Parameter Allocation Invalid
+ Frequencies</a></li>
+ <li><nobr><a
+ href="apa_clock_source_frequency_table.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title=" Automatic Parameter Allocation Source Frequencies">Automatic Parameter
+ Allocation Clock Source
+ Frequencies</a></li>
+</ul>
+</nobr>
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/apa_clock_source_frequency_table.htm b/data/mnet/GP10/Host/ViperWatch/apa_clock_source_frequency_table.htm
new file mode 100644
index 0000000..be23145
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/apa_clock_source_frequency_table.htm
@@ -0,0 +1,69 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Clock Source Frequencies</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" >
+
+var index = 1;
+function displayIndex()
+{
+ document.write(" " + index++ + " ");
+}
+
+</Script>
+
+
+<body onload="$%reloadTopframe#$" >
+<form method="POST" cellpadding="0" name="apaClockSourceFrequencyTable">
+
+<div align="center">
+ <table border="4" bgcolor="#D6D3CE">
+ <tr>
+ <td>
+ <h3 align="center">
+ &nbsp;Clock Source Frequencies</h3>
+ <div align="center">
+ <center>
+ <table border="1" width="97%">
+ <tr>
+ <td height="19" align="center" >Index&nbsp;</td>
+ <td height="19" align="center" >ARFCN</td>
+ </tr>
+ <! $%createTable(apaClockSourceFrequencyIndex,*,,,,,apaClockSourceFrequencyIndex,apaClockSourceFrequencyArfcn)#$ >
+ <! $%REPEAT(apaClockSourceFrequencyIndex,1,64)#$ >
+ <tr>
+ <td align="center"><script> displayIndex() </script> </td>
+ <td align="center">$%apaClockSourceFrequencyArfcn#$</td>
+ </tr>
+
+ <! $%endRow(apaClockSourceFrequencyIndex)#$ >
+ <! $%REPEAT(END)#$ >
+ <! $%endTable(apaClockSourceFrequencyIndex)#$>
+
+ </table>
+ </center>
+ </div>
+ <center>
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"><input name="B2" type="submit" value="Submit"> </td>
+ <td align="center"> <input name="Recall1" type="button" value="Recall" onclick="window.location.reload()"></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+</div>
+
+</form>
+
+</body>
+
diff --git a/data/mnet/GP10/Host/ViperWatch/apa_invalid_frequency_table.htm b/data/mnet/GP10/Host/ViperWatch/apa_invalid_frequency_table.htm
new file mode 100644
index 0000000..8001c79
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/apa_invalid_frequency_table.htm
@@ -0,0 +1,69 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Automatic Parameter Allocation Invalid Frequency Table </title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" >
+
+var index = 1;
+function displayIndex()
+{
+ document.write(" " + index++ + " ");
+}
+
+</Script>
+
+
+<body onload="$%reloadTopframe#$">
+<form method="POST" cellpadding="0" name="apaClockSourceFrequencyTable">
+
+<div align="center">
+ <table border="4" bgcolor="#D6D3CE" width="90">
+ <tr>
+ <td width="583">
+ <h3 align="center">
+ &nbsp;Invalid Frequency List</h3>
+ <div align="center">
+ <center>
+ <table border="1" width="80%">
+ <tr>
+ <td height="19" align="center">Index&nbsp;</td>
+ <td height="19" align="center">ARFCN</td>
+ </tr>
+ <! $%createTable(apaInvalidFrequencyIndex,*,,,,,apaInvalidFrequencyIndex,apaInvalidFrequencyArfcn)#$ >
+ <! $%REPEAT(apaInvalidFrequencyIndex,1,64)#$ >
+ <tr>
+ <td align="center"><script> displayIndex() </script> </td>
+ <td align="center">$%apaInvalidFrequencyArfcn#$</td>
+ </tr>
+
+ <! $%endRow(apaInvalidFrequencyIndex)#$ >
+ <! $%REPEAT(END)#$ >
+ <! $%endTable(apaInvalidFrequencyIndex)#$>
+
+ </table>
+ </center>
+ </div>
+ <center>
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"><input name="B2" type="submit" value="Submit" title="Click to commit the Change"> </td>
+ <td align="center"> <input name="Recall" type="button" value="Recall" onclick="window.location.reload()" title="Click to reload the page""></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+</div>
+
+</form>
+
+</body>
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/apa_page.htm b/data/mnet/GP10/Host/ViperWatch/apa_page.htm
new file mode 100644
index 0000000..eedc80c
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/apa_page.htm
@@ -0,0 +1,44 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>New Page 1</title>
+</head>
+
+<body onload="$%reloadTopframe#$">
+
+<h2><nobr>GP10 Specific MIB Pages</nobr></h2>
+<p>GP10 Specific MIB section contains the following pages:</p>
+<ul>
+ <li><nobr><a href="dual_trx_card.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main" title="Dual TRX Card Related Parameters">Dual
+ TRX Card</a></nobr></li>
+ <li><nobr><a href="arfcn_rssi_function.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main" title="ARFCN RSS Fuction">ARFCN
+ RSS Function</a></nobr></li>
+ <li><nobr><a href="clock_card.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main" title="Clock Card Related Parameters">Clock
+ Card</a></nobr></li>
+ <li><nobr><a href="gps_card.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main" title="GPS Card Related Parameters">GPS
+ Card</a></nobr></li>
+ <li><nobr><a href="power_card.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main" title="Power Card Related Parameters">Power
+ Card</a></nobr></li>
+ <li><nobr><a href="external_power_supply.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main" title="External Power Supply Related Parameters">External
+ Power Supply</a></nobr></li>
+ <li><nobr><a href="cdc_board.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main" title="CDC Board Specific Parameters">CDC
+ Board</a></nobr></li>
+ <li><nobr><a href="apaPage.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main" title="apaPage.htm">Automatic
+ Parameter Allocation</a></nobr>
+ <ul>
+ <li><nobr><img height="1" src="Images/filler.gif" width="0"><a href="automatic_parameter_allocation.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main" title="Automatic Parameter Allocation Parameters">A</a><a href="javascript:history.go(0)" onclick="toggle(54);return false" onmouseover="window.status='No further items';return true;" target="_self" title="No further items"></a><a href="automatic_parameter_allocation.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main" title="Automatic Parameter Allocation Parameters">utomatic
+ Parameter Allocation</a></nobr></li>
+ <li><nobr><a href="javascript:history.go(0)" onclick="toggle(54);return false" onmouseover="window.status='No further items';return true;" target="_self" title="No further items"></a><a href="apa_invalid_frequency_table.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" style="COLOR: green" target="main" title="Automatic Parameter Allocation Invalid Frequencies">Invalid
+ Frequencies</a></nobr></li>
+ <li><nobr><a href="javascript:history.go(0)" onclick="toggle(54);return false" onmouseover="window.status='No further items';return true;" target="_self" title="No further items">&nbsp;</a><a href="apa_clock_source_frequency_table.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main" title=" Automatic Parameter Allocation Source Frequencies">Clock
+ Source Frequencies</a></nobr></li>
+ </ul>
+ </li>
+</ul>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/arfcn_rssi_clock_control_table.htm b/data/mnet/GP10/Host/ViperWatch/arfcn_rssi_clock_control_table.htm
new file mode 100644
index 0000000..c6b5611
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/arfcn_rssi_clock_control_table.htm
@@ -0,0 +1,92 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Parameter</title>
+</head>
+
+<SCRIPT >
+
+
+function selectOption(theSelect, valueHolder)
+{
+ if (valueHolder.value < 0 && valueHolder.value >= theSelect.length)
+ {
+ window.alert("Incorrect MIB value for " + valueHolder.name + " "+ valueHolder.value + "Corrected to 0");
+ valueHolder.value = 0;
+ }
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].value == valueHolder.value)
+ {
+ theSelect.options[i].selected = true;
+ break;
+ }
+ }
+
+}
+
+function presetButtons(theForm)
+{
+
+ return true;
+}
+
+function parseSelect(theSelect, valueHolder)
+{
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].selected)
+ {
+ valueHolder.value = theSelect.options[i].value;
+ break;
+ }
+ }
+}
+
+function parseButtons(theForm)
+{
+ return true;
+}
+
+</SCRIPT>
+
+<body onload="presetButtons(this.document.forms[0]);$%reloadTopframe#$">
+<form method="POST" cellpadding="0" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
+
+<div align="center">
+ <table border="1">
+ <tr>
+ <td colspan="3" align="center">
+ <h2>ARFCN RSSI Clock Control Table</h2>
+ </td>
+ </tr>
+ <center>
+ <tr>
+ <td height="19" align="center"><font color="#000000">Index</font></td>
+ <td height="19" align="center"><font color="#000000">ARFCN</font></td>
+ <td height="19" align="center"><font color="#000000">Clock Recovery Mode</font></td>
+ </tr>
+ <tr>
+ <td height="23"></td>
+ <td height="23">
+ </td>
+ <td height="23">
+ </td>
+ </tr>
+ <tr>
+ <td height="23"></td>
+ <td height="23"></td>
+ <td height="23"></td>
+ </tr>
+ </table>
+ </center>
+</div>
+
+<p align="center"><input name="B1" type="submit" value="Submit"> <input name="Recall" type="button" value="Recall" onclick="window.location.reload()"><input name="Reset" type="reset" value="Reset" onclick="presetButtons(window.document.forms[0])"></p>
+</form>
+
+</body>
+
diff --git a/data/mnet/GP10/Host/ViperWatch/arfcn_rssi_function.htm b/data/mnet/GP10/Host/ViperWatch/arfcn_rssi_function.htm
new file mode 100644
index 0000000..3696cc9
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/arfcn_rssi_function.htm
@@ -0,0 +1,117 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>ARFCN&nbsp; RSSI Function</title>
+</head>
+<SCRIPT language="JavaScript" src="./js/common.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+
+function ParseForm(theForm)
+{
+ ParseSelect(theForm.arfcnRssiControlModeSelect, theForm.arfcnRssiControlMode);
+ ParseSelect(theForm.clockRecoveryControlModeSelect, theForm.clockRecoveryControlMode);
+}
+
+function PresetForm(theForm)
+{
+ selectOption(theForm.arfcnRssiControlModeSelect, theForm.arfcnRssiControlMode);
+ selectOption(theForm.clockRecoveryControlModeSelect, theForm.clockRecoveryControlMode);
+}
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this);" name="arfcn_rssi_function" >
+
+<input type="hidden" name="arfcnRssiControlMode" value="$%arfcnRssiControlMode#$" >
+<input type="hidden" name="clockRecoveryControlMode" value="$%clockRecoveryControlMode#$" >
+
+<div align="center">
+ <table border="4" bgcolor="#D6D3CE" width="336">
+ <tr>
+ <td width="504">
+ <h2 align="center">ARFCN&nbsp; RSSI Function</h2>
+ <center>
+ <div align="center">
+ <center>
+ <table border="0">
+ <tr>
+ <td height="23">ARFCN RSSI Control Mode</td>
+ <td height="23"><select name="arfcnRssiControlModeSelect" size="1">
+ <option value="1">ON</option>
+ <option value="0" selected>OFF</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td height="23">Clock Recovery Control Mode</td>
+ <td height="23"><select name="clockRecoveryControlModeSelect" size="1">
+ <option value="1">ON</option>
+ <option value="0" selected>OFF</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td height="23"></td>
+ <td height="23"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table border="1">
+ <tr>
+ <td colspan="3" align="center">
+ <p align="center"><b>ARFCN RSSI Clock Control Table</b></td>
+ </tr>
+ <tr>
+ <td align="center">Index</td>
+ <td align="center">ARFCN</td>
+ <td align="center">Recovery Mode</td>
+ </tr>
+ <! $%createTable(arfcnRssiClockControlIndex,*,,,,,arfcnRssiClockControlIndex,arfcnRssiClockControlArfcn,arfcnRssiClockRecoveryMode)#$ >
+ <! $%REPEAT(arfcnRssiClockControlIndex,1,64)#$ >
+ <tr>
+ <td align="center">$%arfcnRssiClockControlIndex#$</td>
+ <td align="center">$%arfcnRssiClockControlArfcn#$</td>
+ <td aline="center"> <SCRIPT language="JavaScript"> printOnOffMode($%arfcnRssiClockRecoveryMode#$) </script> </td>
+ </tr>
+
+ <! $%endRow(arfcnRssiClockControlIndex)#$ >
+ <! $%REPEAT(END)#$ >
+ <! $%endTable(arfcnRssiClockControlIndex)#$>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit"> </td>
+ <td align="center"> <input name="Recall" type="button" value="Recall" onclick="window.location.reload()"></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </td>
+ </tr>
+ </table>
+</div>
+
+</form>
+
+</body>
+
diff --git a/data/mnet/GP10/Host/ViperWatch/attem_immi_assign.htm b/data/mnet/GP10/Host/ViperWatch/attem_immi_assign.htm
new file mode 100644
index 0000000..4fb28de
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/attem_immi_assign.htm
@@ -0,0 +1,88 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Automatic Parameter Allocation Invalid Frequency Table</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/perCause.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/common.js"></SCRIPT>
+
+
+
+<body onload="$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" name="apaClockSourceFrequencyTable">
+
+ <div align="center">
+ <table border="4" bgcolor="#D6D3CE" width="466">
+ <tr>
+ <td width="996">
+ <h3 align="center">&nbsp;Attempted Immediate Assignment<br>
+ &nbsp;Procedures, per cause</h3>
+ <div align="center">
+ <center>
+ <table border="0">
+ <tr>
+ <td align="left">
+ <p align="left"><b> Start Time:</b></td>
+ <td>
+ <i>
+ <script> displayTime("$%meanPCHAGCHQueueLength#$") </script>
+ </i>
+ </td>
+ </tr>
+ <tr>
+ <td align="left"><b>Duration:</b></td>
+ <td><i>Last Completed 15-MinuteMeasurement Interval</i></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table border="1" width="83%">
+ <tr>
+ <td height="19" align="left" width="80%"><font face="&#12;charset0Courier" size="3"><b>Channel
+ Assignment Cause</b></font></td>
+ <td height="19" align="center" width="20%">
+ <p align="center"><font face="&#12;charset0Courier" size="2"><b>Attempt
+ Count</b></font></p>
+ </td>
+ </tr>
+ <! $%createTable(attImmediateAssingProcsCause,*,,,,,attImmediateAssingProcsCause,attImmediateAssingProcsValue)#$ >
+ <! $%REPEAT(attImmediateAssingProcsCause,1,8)#$ >
+ <tr>
+ <td align="left" width="80%"> <script> displayCause("$%attImmediateAssingProcsCause#$")</script></td>
+ <td align="center" width="20%">$%attImmediateAssingProcsValue#$</td>
+ </tr>
+
+ <! $%endRow(attImmediateAssingProcsCause)#$ >
+ <! $%REPEAT(END)#$ >
+ <! $%endTable(attImmediateAssingProcsCause)#$>
+
+ </table>
+ </center>
+ </div>
+ <center>
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"><input name="Recall1" type="button" value="Recall" onclick="window.location.reload()"></td>
+ </tr>
+ </table>
+ </div>
+ </center>
+ </td>
+ </tr>
+ </table>
+ </div>
+</form>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/automatic_parameter_allocation.htm b/data/mnet/GP10/Host/ViperWatch/automatic_parameter_allocation.htm
new file mode 100644
index 0000000..ae588f1
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/automatic_parameter_allocation.htm
@@ -0,0 +1,102 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Automatic Parameter Allocation</title>
+</head>
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+
+<script language="JavaScript">
+
+
+
+function PresetForm(theForm)
+{
+ clickCheckBox(theForm.apaEnableCheck, theForm.apaEnable);
+}
+
+function ParseForm(theForm)
+{
+ parseCheckBox(theForm.apaEnableCheck, theForm.apaEnable);
+}
+</script>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+<form method="POST" cellpadding="0" name="ApaParameters">
+
+<input name="apaEnable" type="hidden" value="$%apaEnable#$">
+
+<div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="473">
+ <tr>
+ <td width="636">
+ <h2 align="center">Automatic Parameter Allocation</h2>
+ <div align="center">
+ <table border="0" width="436">
+ <tr>
+ <td height="23" width="272" align="left"><font color="#000000">Enable
+ Automatic Parameter Allocation&nbsp;</font></td>
+ <td height="23" width="150" align="left">
+ <p style="padding-top: 0px; padding-bottom: 0px"><font color="#000000"><input type="checkbox" name="apaEnableCheck" value="" checked></font></td>
+ </tr>
+ <tr>
+ <td height="23" width="272" align="left"><font color="#000000">Scan Frequency
+ Low Bound:</font></td>
+ <td height="23" width="150" align="left"><input type="text" name="apaScanFrequencyLowBound" size="5" value="$%apaScanFrequencyLowBound#$" onchange="return isValidInt(this,0,1023);"></td>
+ </tr>
+ <tr>
+ <td height="22" width="272" align="left"><font color="#000000">Scan Frequency
+ High Bound:</font></td>
+ <td height="22" width="150" align="left">
+ <p style="padding-top: 0px; padding-bottom: 0px"><input type="text" name="apaScanFrequencyHighBound" size="5" value="$%apaScanFrequencyHighBound#$" onchange="return isValidInt(this,0,1023);"></td>
+ </tr>
+ <tr>
+ <td height="23" width="272" align="left"><font color="#000000">Max. Power
+ Setting for the GP10:</font></td>
+ <td height="23" width="150" align="left"><input type="text" name="apaMaxPowerSetting" size="5" value="$%apaMaxPowerSetting#$" onchange="return isValidInt(this,0,100);"></td>
+ </tr>
+ <tr>
+ <td height="23" width="272" align="left"><font COLOR="#000000">Min. RSSI
+ Threshold for Neighboring Cell:</font></td>
+ <td height="23" width="150" align="left">
+ <p style="padding-top: 0px; padding-bottom: 0px"><input type="text" name="apaMinRSSIThresholdForNeighborId" size="5" value="$%apaMinRSSIThresholdForNeighborId#$" onchange="return isValidInt(this,0,1023);"></td>
+ </tr>
+ <tr>
+ <td height="23" width="272" align="left"><font color="#000000">Scan Rate for
+ Checking RSSI Value</font></td>
+ <td height="23" width="150" align="left"><input type="text" name="apaScanRate" size="5" value="$%apaScanRate#$" onchange="return isValidInt(this,0,1023);"></td>
+ </tr>
+ <tr>
+ <td height="23" width="272" align="left"><font COLOR="#000000">Hysteresis for
+ Change Power on the BCCH</font></td>
+ <td height="23" width="150" align="left">
+ <p style="padding-top: 0px; padding-bottom: 0px"><input type="text" name="apaHysteresisForBCCHPower" size="5" value="$%apaHysteresisForBCCHPower#$" onchange="return isValidInt(this,0,1023);"></td>
+ </tr>
+ <tr>
+ <td height="21" width="272"></td>
+ <td height="21" width="150"></td>
+ </tr>
+ </table>
+ </div>
+
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"><input name="submit" type="submit" value="Submit" onClick="ParseForm(this.form)"> </td>
+ <td align="center"> <input name="Recall" type="button" value="Recall" onclick="window.location.reload()"></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+</div>
+
+</form>
+
+</body>
+
diff --git a/data/mnet/GP10/Host/ViperWatch/bottom_frame.htm b/data/mnet/GP10/Host/ViperWatch/bottom_frame.htm
new file mode 100644
index 0000000..b1cc671
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/bottom_frame.htm
@@ -0,0 +1,25 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>New Page 1</title>
+<base target="_self">
+</head>
+
+<body>
+
+<h2>
+<font color="#800080">
+<a href="/Alarm.html">
+<marquee bgcolor="#FFFFFF" width="100%" height="100%">Click anywhere here if you wish to see GP10 alarm.</marquee>
+</a>
+</font>
+</h2>
+
+
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/bts_basic_package.htm b/data/mnet/GP10/Host/ViperWatch/bts_basic_package.htm
new file mode 100644
index 0000000..ea76edd
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/bts_basic_package.htm
@@ -0,0 +1,310 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>BTS Basic Package</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/state.js"></SCRIPT>
+
+
+
+
+<SCRIPT language="JavaScript">
+
+function updateCheckBox(theForm, theCheckBox)
+{
+
+ for (var i = 0; i < theCheckBox.length; i++)
+ {
+ if (theForm.elements[i].value == "1")
+ {
+ theCheckBox[i].checked = true;
+ theCheckBox[i].defaultChecked = true;
+
+ }
+ }
+
+}
+
+
+function PresetForm(theForm)
+{
+ theForm.ny1.defaultValue = 0;
+
+ updateCheckBox(theForm, theForm.plmnPermittedCheck);
+ cvtIntToBCD(theForm.bts_mcc, "3");
+ theForm.bts_mcc.defaultValue = theForm.bts_mcc.value;
+ cvtIntToBCD(theForm.bts_mnc, "2");
+ theForm.bts_mnc.defaultValue = theForm.bts_mnc.value;
+ selectOption(theForm.bts_administrativeStateSelect,theForm.bts_administrativeState);
+ return true;
+}
+
+
+
+function updateHidden(theForm, theCheckBox)
+{
+
+ for (var i = 0; i < theCheckBox.length; i++)
+ {
+ if (theCheckBox[i].checked)
+ {
+ theForm.elements[i].value = "1";
+ } else {
+ theForm.elements[i].value = "0";
+ }
+ }
+}
+
+
+function ParseForm(theForm)
+{
+ updateHidden(theForm, theForm.plmnPermittedCheck);
+ parseSelect(theForm.bts_administrativeStateSelect, theForm.bts_administrativeState);
+ theForm.btsID.value = theForm.bts_lac.value;
+}
+
+function displayGsmDcsInd(theState)
+{
+ var textState = "";
+ var Color = "";
+ switch(theState)
+ {
+ case "0":
+ textState = "GSM 900";
+ Color += "Black";
+ break;
+ case "1":
+ textState = "DCS 1800";
+ Color += "Black";
+ break;
+ case "2":
+ textState = "PCS 1900";
+ Color += "Black";
+ break;
+ default:
+ textState = "Invalid";
+ Color += "Yellow";
+ help = "Invalid value of operational state!!!"
+ break;
+ }
+ document.write("<font color=\"" + Color + "\"> " + textState + "</font>");
+}
+
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="dual_trx_card">
+
+ <!$%createTable(plmnPermittedIndex,*,,,,,plmnPermittedIndex,plmnPermitted)#$>
+ <!$%REPEAT(plmnPermittedIndex,1,8)#$>
+ <input type="hidden" name="plmnPermitted.$%getInstance(plmnPermittedIndex)#$" value="$%plmnPermitted#$">
+ <!$%endRow(plmnPermittedIndex)#$><!$%REPEAT(END)#$>
+ <!$%endTable(plmnPermittedIndex)#$>
+
+ <input name="bts_administrativeState" type="hidden" value="$%bts_administrativeState#$">
+ <input name="btsID" type="hidden" value="$%bts_ci#$">
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="536">
+ <tr>
+ <td width="520">
+ <h2 align="center">BTS Basic Package</h2>
+ <div align="center">
+ <table border="1">
+ <tr>
+ <td><b>Current State:</b>
+ <div align="center">
+ <table border="0">
+ <tr>
+ <td height="23" align="left">Administrative State:</td>
+ <td height="23" align="left">
+ <select name="bts_administrativeStateSelect" size="1" onchange="return ConfirmAdminState(this, this.form.bts_administrativeState, 'GP10', 'GP10', '1', 'NIL');">
+ <option value="0">Locked</option>
+ <option selected value="1">Unlocked</option>
+ <option value="2">Shutting Down</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td height="23" align="left">Operational State:</td>
+ <td height="23" align="left">
+ <script> displayState("$%bts_operationalState#$") </script>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div align="center">
+ <center>
+ <table border="1" height="451" width="521" cellpadding="2">
+ <tr>
+ <td height="34" width="260"
+ title="BSIC is transmitted on the SCH and used for identifying a BTS. It consists of the Network Colour Code (NCC) and the Base Station Colour Code (BCC)">Base
+ Station Identity Code (BSIC)</td>
+ <td height="34" width="246" title="Network (PLMN) Colour Code: INTEGER (0..7)">
+ <table border="0" width="100%">
+ <tr>
+ <td height="34" width="57" title="Network (PLMN) Colour Code: INTEGER (0..7)">NCC:&nbsp;&nbsp; &nbsp;</td>
+ <td height="34" width="57" title="Network (PLMN) Colour Code: INTEGER (0..7)"><font face="Times New Roman"><input name="bts_ncc"
+ size="1" maxlength="1" value="$%bts_ncc#$" onchange="return isValidInt(this,0,7);"></font></td>
+ <td height="34" width="67" title="Base Transceiver Station (BTS) Colour Code: INTEGER (0..7)">BCC:&nbsp;</td>
+ <td height="34" width="65" title="Base Transceiver Station (BTS) Colour Code: INTEGER (0..7)"><font face="Times New Roman"><input
+ name="bts_cid" size="1" maxlenght="1" value="$%bts_cid#$" onchange="return isValidInt(this,0,7);"></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td height="69" width="261"
+ title="This attribute contains the Cell Identification (CI) and the Location Area of the cell. A Location Area is unique within a GSM PLMN; a Cell Identification is unique within a location area.">Cell
+ Global Identity:</td>
+ <td height="65" width="242" title="Mobile Country Code: 3 Digits">
+ <table border="0" width="100%">
+ <tr>
+ <td height="25" width="57" title="Mobile Country Code: 3 Digits">MCC:</td>
+ <td height="25" width="56" title="Mobile Country Code: 3 Digits"><font face="Times New Roman"><input name="bts_mcc" size="3"
+ maxlength="3" value="$%bts_mcc#$" onchange="return isValidInt(this,0,999);"></font></td>
+ <td height="25" width="65" title="Mobile Network Code: 2 Digits">MNC:&nbsp;</td>
+ <td height="25" width="64" title="Mobile Network Code: 2 Digits"><font face="Times New Roman"><input name="bts_mnc" size="2"
+ maxlength="2" value="$%bts_mnc#$" onchange="return isValidInt(this,0,99);"></font></td>
+ </tr>
+ <tr>
+ <td height="40" width="57" title="Location Area Code: INTEGER (0..65535)">LAC:&nbsp;</td>
+ <td height="40" width="56" title="Location Area Code: INTEGER (0..65535)"><font face="Times New Roman"><input name="bts_lac"
+ size="5" maxlength="5" value="$%bts_lac#$" onchange="return isValidInt(this,0,65535);"></font></td>
+ <td height="40" width="65" title="Cell Identity : INTEGER (0..65535)">CI:&nbsp;</td>
+ <td height="40" width="64" title="Cell Identity : INTEGER (0..65535)"><font face="Times New Roman"><input name="bts_ci" size="5"
+ maxlength="5" value="$%bts_ci#$" onchange="return isValidInt(this,0,65535);"></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td height="36" width="261"
+ title="The cell-reselect-hysteresis attribute indicates the value of the receiver RF power level hysteresis required for cell reselection.">Cell
+ Reselect Hysteresis:<br>
+ <font size="1">&nbsp;(in 2dB step):</font></td>
+ <td height="36" width="246" title="This parameter has a range of 0 to 14 dB with a step size of 2 dB and is coded as INTEGER (0..7)."><input
+ name="cellReselectHysteresis" size="1" maxlength="1" value="$%cellReselectHysteresis#$" onchange="return isValidInt(this,0,7);"></td>
+ </tr>
+ <tr>
+ <td height="29" width="261"
+ title="Indicates the type (GSM, PCS, DCS 1800) of the cell. The value may be used to interpret or check other attribute values.">Radio
+ Indicator:</td>
+ <td height="29" width="246">
+ <script> displayGsmDcsInd("$%gsmdcsIndicator#$") </script>
+<!----
+ <select name="gsmdcsIndicatorSelect" size="1" readonly disabled>
+ <option value="0">GSM 900</option>
+ <option value="1">DCS 1800</option>
+ <option value="2" selected>PCS 1900</option>
+ </select>
+------------------->
+ </td>
+ </tr>
+ <tr>
+ <td height="43" width="261"
+ title="The ny1 attribute indicates the maximum number of repetitions of the PHYSICAL INFORMATION message on the radio interface (GSM 04.08). This message is sent by the BTS to the MS during a handover procedure between two not synchronized cells, in order to establish a physical channel connection on the new cell.">Max
+ Number of Repetitions of Physical Info. (ny1):</td>
+ <td height="43" width="246" title="INTEGER"><input name="ny1" size="10" value="$%ny1#$" onchange="return isValidInt(this,0,7);"></td>
+ </tr>
+ <tr>
+ <td height="74" width="261" title="NCCs for which the MS is permitted to report measurement results.">PLMN Permitted NCCs</td>
+ <td height="70" width="240" title="Select if the MS is permitted to report measurement results to NCC 0">
+ <table border="0" width="100%">
+ <tr>
+ <td height="35" width="60" title="Select if the MS is permitted to report measurement results to NCC 0">
+ <p align="center">0<br>
+ <input name="plmnPermittedCheck" type="checkbox" value="ON"></td>
+ <td height="35" width="60" title="Select if the MS is permitted to report measurement results to NCC 1.">
+ <p align="center">1<br>
+ <input name="plmnPermittedCheck" type="checkbox" value="ON"></td>
+ <td height="35" width="60" title="Select if the MS is permitted to report measurement results to NCC 2.">
+ <p align="center">2<br>
+ <input name="plmnPermittedCheck" type="checkbox" value="ON"></td>
+ <td height="35" width="60" title="Select if the MS is permitted to report measurement results to NCC 3.">
+ <p align="center">3<br>
+ <input name="plmnPermittedCheck" type="checkbox" value="ON"></td>
+ </tr>
+ <tr>
+ <td height="35" width="60" title="Select if the MS is permitted to report measurement results to NCC 4.">
+ <p align="center">4<br>
+ <input name="plmnPermittedCheck" type="checkbox" value="ON"></td>
+ <td height="35" width="60" title="Select if the MS is permitted to report measurement results to NCC 5.">
+ <p align="center">5<br>
+ <input name="plmnPermittedCheck" type="checkbox" value="ON"></td>
+ <td height="35" width="60" title="Select if the MS is permitted to report measurement results to NCC 6.">
+ <p align="center">6<br>
+ <input name="plmnPermittedCheck" type="checkbox" value="ON"></td>
+ <td height="35" width="60" title="Select if the MS is permitted to report measurement results to NCC 7.">
+ <p align="center">7<br>
+ <input name="plmnPermittedCheck" type="checkbox" value="ON"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td height="31" width="261"
+ title="This attribute is used to indicate the maximum value of the radio link counter needed to detect a radio link failure.">Radio Link
+ Timeout<br>
+ &nbsp;<font size="1">(in 4 SACCH frame unit):</font></td>
+ <td height="31" width="246" title="Integer(0..15)"><input name="radioLinkTimeout" size="2" maxlength="2" value="$%radioLinkTimeout#$"
+ onchange="return isValidInt(this,0,15);"></td>
+ </tr>
+ <tr>
+ <td height="31" width="261"
+ title="This attribute is used to indicate the minimum receive level at the MS required for access to the system.">Minimum Receive Level
+ Access:</td>
+ <td height="31" width="246"
+ title="RxLev ::= INTEGER (0..63)
+-- 0 : &lt; -110 dB,
+-- 1 : -110 dB .. -109 dB
+-- 2 : -109 dB .. -108 dB
+--
+-- 63: &gt; -48 dB
+-- Ref. GSM 05.08 (RXLEV)"><input name="rxLevAccessMin" size="2" maxlength="2" value="$%rxLevAccessMin#$" onchange="return isValidInt(this,0,63);"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <p align="center">&nbsp;
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/bts_ccch_config_package.htm b/data/mnet/GP10/Host/ViperWatch/bts_ccch_config_package.htm
new file mode 100644
index 0000000..50a3918
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/bts_ccch_config_package.htm
@@ -0,0 +1,162 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>CCCH Config Package</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+
+function PresetForm(theForm)
+{
+ selectOption(theForm.maxNumberRetransmissionsSelect, theForm.maxNumberRetransmissions);
+ clickCheckBox(theForm.cellBarQualify, theForm.rm_nim_0_6);
+ return true;
+}
+
+function ParseForm(theForm)
+{
+ parseSelect(theForm.maxNumberRetransmissionsSelect, theForm.maxNumberRetransmissions);
+ parseCheckBox(theForm.cellBarQualify, theForm.rm_nim_0_6);
+ theForm.noOfBlocksForAccessGrant.value = "0";
+
+ return true;
+}
+
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this);" name="bts_ccch_config">
+
+ <input type="HIDDEN" name="maxNumberRetransmissions" value="$%maxNumberRetransmissions#$">
+ <input type="HIDDEN" name="rm_nim_0_6" value="$%rm_nim_0_6#$">
+
+ <h2 align="center">&nbsp;</h2>
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="441">
+ <tr>
+ <td width="503">
+ <h2 align="center">BTS CCCH Configuration Package</h2>
+ <div align="center">
+ <table border="1" width="352" height="230">
+ <tr>
+ <td width="267"
+ title="Maximum number of retransmissions a MS may perform on the RACH. Refer to Specification GSM 05.08 (MAX_RETRAN)." height="21">Max. Number
+ Retransmission</td>
+ <td width="71" height="21"><select name="maxNumberRetransmissionsSelect" size="1">
+ <option value="1" selected>1</option>
+ <option value="2">2</option>
+ <option value="4">4</option>
+ <option value="7">7</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td width="267"
+ title="The maximum transmit power level a MS may use when accessing the cell until commanded otherwise. See Specification GSM 05.08 (MS_TXPWR_MAX_CCH). This parameter is also used in order to evaluate the path loss criterion parameter (C1) of a cell. See Specification GSM 05.08.">MS
+ Tx Power Max CCH</font></td>
+ <td width="71" title="TxPower ::= INTEGER
+-- Value in dBm
+-- TXPWR range in GSM 900: 5..39 dBm
+-- TXPWR range in DCS 1800: 0..30 dBm
+-- TXPWR range in PCS 1900: 0..33 dBm" height="23">
+
+ <input type="text" name="mSTxPwrMaxCCH" size="2" value="$%mSTxPwrMaxCCH#$" maxlength="2"
+ onchange="return isValidTxPower(this, $%gsmdcsIndicator#$);"></td>
+ </tr>
+ <tr>
+ <td width="267"
+ title="The number of TDMA frames reserved for the Access Grant channel during a period of 51 TDMA frames (a multiframe). Only a value of zero is supported at this time. For details refer to pecification GSM 05.02." height="23">No.
+ of Blocks for Access Grant</td>
+ <td width="71" title="Integer(0..0)" height="23"><input type="text" name="noOfBlocksForAccessGrant" size="1"
+ value="$%noOfBlocksForAccessGrant#$" maxlength="1" onchange="return isValidInt(this,0,0);"></td>
+ </tr>
+ <tr>
+ <td width="267"
+ title="The number of multiframes (51 frames) between two transmissions of the same paging message to mobiles of the same paging group." height="23">No.
+ of Multi-frames Between Paging</td>
+ <td width="71" title="Integer(2..9)" height="23"><input type="text" name="noOfMultiframesBetweenPaging" size="1"
+ value="$%noOfMultiframesBetweenPaging#$" maxlength="1" onchange="return isValidInt(this,2,9);"></td>
+ </tr>
+ <tr>
+ <td width="267"
+ title="Represents the maximum number of RACH slots a MS must wait, after an unsuccessful random access attempt, before a new random access. The value is coded as an integer in the range 0 to 15." height="23">No.
+ of Slots Spread Trans (Tx Integer)</td>
+ <td width="71" title="Integer(0..15)" height="23"><input type="text" name="numberOfSlotsSpreadTrans" size="2"
+ value="$%numberOfSlotsSpreadTrans#$" maxlength="2" onchange="return isValidInt(this,0,15);"></td>
+ </tr>
+ <tr>
+ <td height="23"
+ title="Applies an offset to the C2 reselection criterion. (see CELL_RESELECT_OFFSETin GSM 05.08)."
+ width="359">
+ <p align="left">Cell Reselect Offset</p>
+ </td>
+ <td height="23"
+ title="Integer(0-63) (in 2 dB steps)
+Accepted values 0 to 126 dB, i.e. 0 = 0 dB, 1 = 2 dB, etc."
+ width="53"><input type="text" name="rm_nim_0_3" size="2"
+ value="$%rm_nim_0_3#$" maxlength="2" onchange="return isValidInt(this,0,63);"></td>
+ </tr>
+ <tr>
+ <td height="23" align="left"
+ title="Applies a negative offset to C2 for the duration of PENALTY_TIME."
+ width="359">
+ <p align="left">Temporary Offset</p>
+ </td>
+ <td height="23" align="left" title="Integer(0..7) in 10 dB steps.
+Accepted values 0 to 60 dB, i.e. 0 = 0 dB, 1 = 10 dB, etc. and 7 = infinity" width="53"><input type="text" name="rm_nim_0_4" size="2"
+ value="$%rm_nim_0_4#$" maxlength="2" onchange="return isValidInt(this,0,7);"></td>
+ </tr>
+ <tr>
+ <td height="23" align="left"
+ title="Gives the duration for which the temporary offset is applied. "
+ width="359">Penalty Offset</td>
+ <td height="23" align="left" title="RxLev ::= INTEGER (0..31) (in 20 sec steps)
+Accepted values from 20 to 620 second, i.e. 0 = 20 s, 1 = 40 s, etc.
+31 is reserved to indicate that CELL_RESELECT_OFFSET is subtracted from C2 and TEMPORARY_OFFSET is ignored."
+
+ width="53"><input type="text" name="rm_nim_0_5" size="2"
+ value="$%rm_nim_0_5#$" maxlength="2" onchange="return isValidInt(this,0,31);"></td>
+ </tr>
+ <tr>
+ <td height="23" align="left"
+ title="Specifies whether cell bar qualifies for this cell"
+ width="359">Cell Bar Qualify?</td>
+ <td height="23" align="left" title="Check if Cell bar qualify applies to this GP10"
+ width="53"><input type="checkbox" name="cellBarQualify"></td>
+ </tr>
+ </table>
+ </div>
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/bts_cell_allocaiton_table.htm b/data/mnet/GP10/Host/ViperWatch/bts_cell_allocaiton_table.htm
new file mode 100644
index 0000000..bb7d044
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/bts_cell_allocaiton_table.htm
@@ -0,0 +1,95 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>BTS Package Cell Allocaiton Table</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+
+function copyValue(src, dst)
+{
+ src.value = dst.value
+ return true;
+}
+
+</SCRIPT>
+
+<body onload="$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" name="btsPackageCellAllocationTable">
+<input type="hidden" name="carrierFrequency_0.0" value="$%carrierFrequency_0#$">
+<input type="hidden" name="carrierFrequency_1.0" value="$%carrierFrequency_1#$">
+
+
+ <div align="center">
+ <table border="4" bgcolor="#D6D3CE" width="354">
+ <tr>
+ <td width="847">
+ <h3 align="center">&nbsp;BTS Package&nbsp;<br>
+ Cell Allocation Table</h3>
+ <div align="center">
+ <center>
+ <table border="1" width="283"
+ title="This table defines the set of radio frequencies allocated and available to the current GP10. The first element sets the BCCH frequency.">
+ <tr>
+ <td height="19" align="center" width="171">Radio Carrier</td>
+ <td height="19" align="center" width="96">ARFCN</td>
+ </tr>
+ <! $%createTable(cellAllocation,*,,,,,cellAllocationIndex,cellAllocation)#$ >
+ <tr>
+ <td align="center" width="171"> <p align="left"> First Radio Carrier&nbsp;</p> </td>
+ <td align="center" title="Cell Allocation frequency entry -- INTEGER(0..1023)" width="96">
+ <input type="text" name="cellAllocation.$%getInstance(cellAllocation)#$" value="$%cellAllocation#$" size="4" maxlength="4"
+ onchange="return isValidInt(this,0,1023) && copyValue(this.form.elements[0], this);">
+ </td>
+ </tr>
+ <! $%endRow(cellAllocation)#$ >
+
+ <tr>
+ <td align="center" width="171"> <p align="left"> Second Radio Carrier
+ </p> </td>
+ <td align="center" title="Cell Allocation frequency entry -- INTEGER(0..1023)" width="96">
+ <input type="text" name="cellAllocation.$%getInstance(cellAllocation)#$" value="$%cellAllocation#$" size="4" maxlength="4"
+ onchange="return isValidInt(this,0,1023)&& copyValue(this.form.elements[1], this);">
+ </td>
+ </tr>
+ <! $%endRow(cellAllocation)#$ >
+ <! $%endTable(cellAllocation)#$>
+
+ </table>
+ </center>
+ </div>
+ <center>
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </div>
+ </center>
+ </td>
+ </tr>
+ </table>
+ </div>
+</form>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/bts_cell_allocaiton_table.old.htm b/data/mnet/GP10/Host/ViperWatch/bts_cell_allocaiton_table.old.htm
new file mode 100644
index 0000000..420c2db
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/bts_cell_allocaiton_table.old.htm
@@ -0,0 +1,190 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-us">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Adjacent Cell Handover Package</title>
+</head>
+
+
+<SCRIPT >
+
+function clickButton(theRadio, valueHolder)
+{
+ if (valueHolder.value != 0 && valueHolder.value != 1)
+ {
+ window.alert("Incorrect MIB value for " + valueHolder.name + " "+ valueHolder.value + "Corrected to 0");
+ valueHolder.value = 0;
+ }
+
+ for (var i = 0; i < theRadio.length; i++)
+ {
+ if (theRadio[i].value == valueHolder.value)
+ {
+ theRadio[i].click();
+ break;
+ }
+ }
+}
+
+function selectOption(theSelect, valueHolder)
+{
+ if (valueHolder.value < 0 && valueHolder.value >= theSelect.length)
+ {
+ window.alert("Incorrect MIB value for " + valueHolder.name + " "+ valueHolder.value + "Corrected to 0");
+ valueHolder.value = 0;
+ }
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].value == valueHolder.value)
+ {
+ theSelect.options[i].selected = true;
+ break;
+ }
+ }
+
+}
+
+function clickCheckBox(theCheckBox)
+{
+
+ // window.alert("length " + theCheckBox.length );
+ for (var i = 0; i < theCheckBox.length; i++)
+ {
+ if (!((theCheckBox[i].value == 0) || (theCheckBox[i].checked)) )
+ {
+ theCheckBox[i].click();
+ }
+ }
+
+}
+
+
+
+function presetButtons(theForm)
+{
+
+ // selectOption(theForm.basebandAdministrativeStateSelect, theForm.basebandAdministrativeState_0);
+ // clickButton(theForm.basebandOperationalStateRadio, theForm.basebandOperationalState_0);
+ // clickCheckBox(theForm.notAllowedClassCheck);
+
+return true;
+}
+
+function parseRadio(radioButton, valueHolder)
+{
+ for (var i = 0; i < radioButton.length; i++)
+ {
+ if (radioButton[i].checked)
+ {
+ valueHolder.value = radioButton[i].value;
+ break;
+ }
+ }
+}
+
+function parseSelect(theSelect, valueHolder)
+{
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].selected)
+ {
+ valueHolder.value = theSelect.options[i].value;
+ break;
+ }
+ }
+}
+
+function isValidInt(theField, minValue, maxValue)
+{
+ if (theField.value == "")
+ {
+ alert("Please enter a value for the " + theField.name + " field.");
+ theField.value = theField.defaultValue;
+ theField.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789";
+ var checkStr = theField.value;
+ var allValid = true;
+ var decPoints = 0;
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ {
+ if (ch == checkOK.charAt(j))
+ break;
+ }
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the " + theField.name + " field.");
+ theField.value = theField.defaultValue;
+ theField.focus();
+ return (false);
+ }
+ var prsVal = parseInt(theField.value);
+ if (prsVal < minValue || prsVal > maxValue)
+ {
+ alert("Please enter a value greater than or equal to " + minValue + " and less than or equal to " + maxValue +" in the " + theField.name + " field.");
+ theField.value = theField.defaultValue;
+ theField.focus();
+ return (false);
+ }
+ return (true);
+}
+
+</SCRIPT>
+
+<body onload="$%reloadTopframe#$">
+<form method="post" name="cellAllocation">
+
+<p align="center"><font size="5">BTS Package - Cell Allocation Table</font>
+<p align="left">This table&nbsp; defines the set of radio frequencies allocated and available to the current
+GP10. The first element sets the BCCH frequency.<br>
+
+<div align="center">
+<table border="1" cellpadding="0" cellspacing="4" height="56" width="349">
+<tr>
+<td width="156" height="22">
+<p align="center">Index</td>
+<td width="175" height="22">
+<p align="center">Cell Allocation<br>
+(ARFCN)</td>
+</tr>
+
+ <! $%createTable(cellAllocationIndex,*,,,,,cellAllocationIndex,cellAllocation)#$ >
+ <! $%REPEAT(cellAllocationIndex,1,8)#$ >
+<tr>
+<td width="156" height="26">
+<p align="center">$%cellAllocationIndex#$</p>
+</td>
+<td height="26" width="175">
+<p align="center"><input type="text" name="cellAllocation.$%getInstance(cellAllocationIndex)#$" value="$%cellAllocation#$" size="4" maxlength="4" onchange="return isValidInt(this,0,1023);" title="Cell Allocation ARFCN"></p>
+</td>
+</tr>
+ <! $%endRow(cellAllocationIndex)#$ >
+ <! $%REPEAT(END)#$ >
+ <! $%endTable(cellAllocationIndex)#$ >
+
+</table>
+</div>
+
+<p align="center"><font size="3"><input name="Submit" type="submit" value="Submit" maxlength="0" title="Click this button to commit the change."> <input name="Recall" type="button" value="Recall" onclick="window.location.reload()"></font>&nbsp; <font size="3" title="Click this button to get the fresh value from the MIB."><input name="Reset" type="reset" value="Reset" maxlength="0" title="Click this button to get the default value."></font></p>
+</form>
+
+<p>
+</form>
+
+</body>
+
diff --git a/data/mnet/GP10/Host/ViperWatch/bts_options_package.htm b/data/mnet/GP10/Host/ViperWatch/bts_options_package.htm
new file mode 100644
index 0000000..745d35a
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/bts_options_package.htm
@@ -0,0 +1,288 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>BTS Options Package</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+
+
+
+<SCRIPT language="JavaScript">
+
+function updateCheckBox(theForm, theCheckBox)
+{
+
+ for (var i = 0; i < theCheckBox.length; i++)
+ {
+ if (theForm.elements[i].value == "1")
+ {
+ theCheckBox[i].checked = true;
+ theCheckBox[i].defaultChecked = true;
+
+ }
+ }
+
+}
+
+function PresetForm(theForm)
+{
+clickRadio(theForm.allowIMSIAttachDetachRadio, theForm.allowIMSIAttachDetach);
+clickRadio(theForm.cellBarredRadio, theForm.cellBarred);
+clickRadio(theForm.dtxDownlinkRadio, theForm.dtxDownlink);
+clickRadio(theForm.emergencyCallRestrictedRadio, theForm.emergencyCallRestricted);
+clickRadio(theForm.isImsiCheckRequiredRadio, theForm.rm_nim_1_0);
+selectOption(theForm.dtxUplinkOption, theForm.dtxUplink);
+updateCheckBox(theForm, theForm.notAllowedClassCheck);
+
+return true;
+}
+
+
+
+function updateHidden(theForm, theCheckBox)
+{
+
+ //window.alert("length " + theCheckBox.length );
+ for (var i = 0; i < theCheckBox.length; i++)
+ {
+ if (theCheckBox[i].checked)
+ {
+ theForm.elements[i].value = "1";
+ } else {
+ theForm.elements[i].value = "0";
+ }
+ }
+}
+
+
+function ParseForm(theForm)
+{
+ parseRadio(theForm.allowIMSIAttachDetachRadio, theForm.allowIMSIAttachDetach);
+ parseRadio(theForm.cellBarredRadio, theForm.cellBarred);
+ parseRadio(theForm.dtxDownlinkRadio, theForm.dtxDownlink);
+ parseRadio(theForm.emergencyCallRestrictedRadio, theForm.emergencyCallRestricted);
+ parseRadio(theForm.isImsiCheckRequiredRadio, theForm.rm_nim_1_0);
+ parseSelect(theForm.dtxUplinkOption, theForm.dtxUplink);
+ updateHidden(theForm, theForm.notAllowedClassCheck);
+}
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="bts_options_package">
+
+
+ <!$%createTable(notAllowedAccessClassIndex,*,,,,,notAllowedAccessClassIndex,notAllowedAccessClass)#$>
+ <!$%REPEAT(notAllowedAccessClassIndex,1,16)#$>
+ <input type="hidden" name="notAllowedAccessClass.$%getInstance(notAllowedAccessClassIndex)#$" value="$%notAllowedAccessClass#$">
+ <!$%endRow(notAllowedAccessClassIndex)#$>
+ <!$%REPEAT(END)#$>
+ <!$%endTable(notAllowedAccessClassIndex)#$>
+ <input type="hidden" name="allowIMSIAttachDetach" value="$%allowIMSIAttachDetach#$">
+ <input type="hidden" name="cellBarred" value="$%cellBarred#$">
+ <input type="hidden" name="dtxDownlink" value="$%dtxDownlink#$">
+ <input type="hidden" name="dtxUplink" value="$%dtxUplink#$">
+ <input type="hidden" name="emergencyCallRestricted" value="$%emergencyCallRestricted#$">
+ <input type="hidden" name="rm_nim_1_0" value="$%rm_nim_1_0#$">
+
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="536">
+ <tr>
+ <td width="520">
+ <h2 align="center">BTS Options Package</h2>
+ <div align="center">
+ <center>
+ <table border="1" height="345" width="521" cellpadding="2">
+ <tr>
+ <td height="19" valign="middle">Use&nbsp; IMSI attach/detach procedure?</td>
+ <td height="19" valign="middle" align="center" nowrap>
+ <table border="0" width="100%">
+ <tr>
+ <td height="32" valign="middle" align="center" nowrap><input name="allowIMSIAttachDetachRadio" type="radio" value="1">Yes</td>
+ <td height="32" valign="middle" align="center" nowrap><input name="allowIMSIAttachDetachRadio" type="radio" value="0"> No</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td height="8" valign="middle">Cell Barred?&nbsp;</td>
+ <td height="8" valign="middle" align="center" nowrap>
+ <table border="0" width="100%">
+ <tr>
+ <td height="32" valign="middle" align="center" nowrap><input name="cellBarredRadio" type="radio" value="1"> Yes</td>
+ <td height="32" valign="middle" align="center" nowrap><input name="cellBarredRadio" type="radio" value="0"> No</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td height="14" valign="middle">Downlink DTX is available in the BTS?</td>
+ <td height="14" valign="middle" align="center" nowrap>
+ <table border="0" width="100%">
+ <tr>
+ <td height="32" valign="middle" align="center" nowrap>
+ <input name="dtxDownlinkRadio" type="radio" value="1"> Yes</td>
+ <td height="32" valign="middle" align="center" nowrap>
+ <input name="dtxDownlinkRadio" type="radio" value="0" Checked> No</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td height="22" valign="middle">Discontinuous Transmission (DTX) mode to be used by the Mobile Stations (dtxUplink)</td>
+ <td height="22" valign="middle" align="left" nowrap><select name="dtxUplinkOption" size="1">
+ <option value="0">MS may use DTX</option>
+ <option value="1">MS shall use DTX</option>
+ <option selected value="2">MS shall not use DTX</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td height="30" valign="middle">Is IMSI required for Emergency
+ calls?</td>
+ <td height="30" valign="middle" align="center" nowrap>
+ <table border="0" width="100%">
+ <tr>
+ <td height="1" valign="middle" align="center" nowrap><input name="isImsiCheckRequiredRadio" type="radio" value="1" checked> Yes</td>
+ <td height="1" valign="middle" align="center" nowrap><input name="isImsiCheckRequiredRadio" type="radio" value="0"> No</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td height="30" valign="middle">Emergency calls restricted to MSs belonging to access classes from 11 to 15?</td>
+ <td height="30" valign="middle" align="center" nowrap>
+ <table border="0" width="100%">
+ <tr>
+ <td height="1" valign="middle" align="center" nowrap><input name="emergencyCallRestrictedRadio" type="radio" value="1" checked> Yes</td>
+ <td height="1" valign="middle" align="center" nowrap><input name="emergencyCallRestrictedRadio" type="radio" value="0"> No</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td height="158" valign="middle">MS Access Classes not allowed to access the cell<br>
+ (notAllowedAccessClasses)</td>
+ <td height="158">
+ <table border="0" width="100%">
+ <tr>
+ <td height="10" valign="middle" align="center" title="Check if MS Access Classe 0 is not allowed to access the cell.">
+ <p align="center">0<br>
+ <input name="notAllowedClassCheck" type="checkbox" value="ON"></p>
+ </td>
+ <td height="27" valign="middle" align="center" title="Check if MS Access Classe 1 is not allowed to access the cell.">
+ <p align="center">1<br>
+ <input name="notAllowedClassCheck" type="checkbox" value="ON"></p>
+ </td>
+ <td height="27" valign="middle" align="center" title="Check if MS Access Classe 2 is not allowed to access the cell.">
+ <p align="center">2<br>
+ <input name="notAllowedClassCheck" type="checkbox" value="ON"></p>
+ </td>
+ <td height="27" valign="middle" align="center" title="Check if MS Access Classe 3 is not allowed to access the cell.">
+ <p align="center">3<br>
+ <input name="notAllowedClassCheck" type="checkbox" value="ON"></p>
+ </td>
+ </tr>
+ <tr>
+ <td height="10" valign="middle" align="center" title="Check if MS Access Classe 4 is not allowed to access the cell.">
+ <p align="center">4<br>
+ <input name="notAllowedClassCheck" type="checkbox" value="ON"></p>
+ </td>
+ <td height="10" valign="middle" align="center" title="Check if MS Access Classe 5 is not allowed to access the cell.">
+ <p align="center">5<br>
+ <input name="notAllowedClassCheck" type="checkbox" value="ON"></p>
+ </td>
+ <td height="10" valign="middle" align="center" title="Check if MS Access Classe 6 is not allowed to access the cell.">
+ <p align="center">6<br>
+ <input name="notAllowedClassCheck" type="checkbox" value="ON"></p>
+ </td>
+ <td height="10" valign="middle" align="center" title="Check if MS Access Classe 7 is not allowed to access the cell.">
+ <p align="center">7<br>
+ <input name="notAllowedClassCheck" type="checkbox" value="ON"></p>
+ </td>
+ </tr>
+ <tr>
+ <td height="21" valign="middle" align="center" title="Check if MS Access Classe 8 is not allowed to access the cell.">
+ <p align="center">8<br>
+ <input name="notAllowedClassCheck" type="checkbox" value="ON"></p>
+ </td>
+ <td height="21" valign="middle" align="center" title="Check if MS Access Classe 9 is not allowed to access the cell.">
+ <p align="center">9<br>
+ <input name="notAllowedClassCheck" type="checkbox" value="ON"></p>
+ </td>
+ <td height="21" valign="middle" align="center" title="Check if MS Access Classe 10 is not allowed to access the cell.">
+ <p align="center">10<br>
+ <input name="notAllowedClassCheck" type="checkbox" value="ON"></p>
+ </td>
+ <td height="21" valign="middle" align="center" title="Check if MS Access Classe 11 is not allowed to access the cell.">
+ <p align="center">11<br>
+ <input name="notAllowedClassCheck" type="checkbox" value="ON"></p>
+ </td>
+ </tr>
+ <tr>
+ <td height="11" valign="middle" align="center" title="Check if MS Access Classe 12 is not allowed to access the cell.">
+ <p align="center">12<br>
+ <input name="notAllowedClassCheck" type="checkbox" value="ON"></p>
+ </td>
+ <td height="11" valign="middle" align="center" title="Check if MS Access Classe 13 is not allowed to access the cell.">
+ <p align="center">13<br>
+ <input name="notAllowedClassCheck" type="checkbox" value="ON"></p>
+ </td>
+ <td height="11" valign="middle" align="center" title="Check if MS Access Classe 14 is not allowed to access the cell.">
+ <p align="center">14<br>
+ <input name="notAllowedClassCheck" type="checkbox" value="ON"></p>
+ </td>
+ <td height="11" valign="middle" align="center" title="Check if MS Access Classe 15 is not allowed to access the cell.">
+ <p align="center">15<br>
+ <input name="notAllowedClassCheck" type="checkbox" value="ON"></p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td height="38" valign="middle"
+ title="The interval for the MS periodic location updates. The interval is measured in decihours; the range is 0 to 255 decihours (25.5 hours). The value zero indicates that the MS should not perform any periodic location updates.">Periodic
+ Location Update Interval (timerPeriodicUpdateMS) <font size="1">(Deci Hours)</font></td>
+ <td height="38" valign="middle" align="left" title="0 to 255 deci hours"><input maxlength="3" name="timerPeriodicUpdateMS" size="3"
+ value="$%timerPeriodicUpdateMS#$" onchange="return isValidInt(this,0,255);"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <p align="center">&nbsp;
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/bts_timers_package.htm b/data/mnet/GP10/Host/ViperWatch/bts_timers_package.htm
new file mode 100644
index 0000000..7463ec6
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/bts_timers_package.htm
@@ -0,0 +1,519 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>BTS Timers Package</title>
+</head>
+
+<body onload="$%reloadTopframe#$">
+
+<h3 align="center">BTS Timers Package</h3>
+<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
+function FrontPage_Form1_Validator(theForm)
+{
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.sdcchSAPI0.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"sdcchSAPI0\" field.");
+ theForm.sdcchSAPI0.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.facchTCHF.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"facchTCHF\" field.");
+ theForm.facchTCHF.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.facchTCHH.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"facchTCHH\" field.");
+ theForm.facchTCHH.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.sacchTCHSAPI0.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"sacchTCHSAPI0\" field.");
+ theForm.sacchTCHSAPI0.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.sacchSDCCH.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"sacchSDCCH\" field.");
+ theForm.sacchSDCCH.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.sdcchSAPI3.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"sdcchSAPI3\" field.");
+ theForm.sdcchSAPI3.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.t3101.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"t3101\" field.");
+ theForm.t3101.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.t3103.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"t3103\" field.");
+ theForm.t3103.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.t3105.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"t3105\" field.");
+ theForm.t3105.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.t3107.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"t3107\" field.");
+ theForm.t3107.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.t3109.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"t3109\" field.");
+ theForm.t3109.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.t3111.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"t3111\" field.");
+ theForm.t3111.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.t3113.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"t3113\" field.");
+ theForm.t3113.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.sdcchTCHSAPI3.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"sdcchTCHSAPI3\" field.");
+ theForm.sdcchTCHSAPI3.focus();
+ return (false);
+ }
+ return (true);
+}
+//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" name="FrontPage_Form1" onsubmit="return FrontPage_Form1_Validator(this)">
+
+<div align="center">
+<center>
+<table border="1" height="205" cellspacing="1" width="499">
+ <tbody>
+ <tr>
+ <td height="23" colspan="3" width="489">
+ <p align="center"><b>T200 Timers -- in 5ms units</b></td>
+ </tr>
+ <tr>
+ <td height="23" align="right" width="138">SDCCH SAPI 0</td>
+ <td height="23" width="80">
+ <p align="right"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" --><input name="sdcchSAPI0" size="10" value="$%sdcchSAPI0#$"></p>
+ </td>
+ <td height="23" width="259"><font size="1">SDCCH, SAPI 0 layer 2
+ timer&nbsp;</font></td>
+ <font face="Arial" size="2">
+ </tr>
+ <tr>
+ <td height="25" align="right" width="138"></font>FACCH
+ TCHF</td>
+ <td height="25" width="80">
+ <p align="right"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" --><input name="facchTCHF" size="10" value="$%facchTCHF#$"></p>
+ </td>
+ <td height="25" width="259"><font size="1">Associated with a Full
+ Rate TCH layer 2 timer</font></td>
+ <font face="Arial" size="2">
+ </tr>
+ <tr>
+ <td height="23" align="right" width="138"></font>FACCH
+ TCHH</td>
+ <td height="23" width="80">
+ <p align="right"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" --><input name="facchTCHH" size="10" value="$%facchTCHH#$"></p>
+ </td>
+ <td height="23" width="259"><font size="1">Associated with a Half
+ Rate TCH layer 2 timer</font></td>
+ <font face="Arial" size="2">
+ </tr>
+ <tr>
+ <td height="23" align="right" width="138"></font>TCH
+ SAPI 0</td>
+ <td height="23" width="80">
+ <p align="right"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" --><input name="sacchTCHSAPI0" size="10" value="$%sacchTCHSAPI0#$"></p>
+ </td>
+ <td height="23" width="259"><font size="1">Associated with SACCH with
+ TCH SAPI 0 layer 2 timer</font></td>
+ <font face="Arial" size="2">
+ </tr>
+ <tr>
+ <td height="23" align="right" width="138"></font>SACCH
+ SDCCH</td>
+ <td height="23" width="80"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" --><input name="sacchSDCCH" size="10" value="$%sacchSDCCH#$"></td>
+ <td height="23" width="259"><font size="1">Associated with SACCH with
+ SDCCH layer 2 timer</font></td>
+ <font face="Arial" size="2">
+ </tr>
+ <tr>
+ <td height="23" align="right" width="138"></font>SDCCH
+ SAPI 3</td>
+ <td height="23" width="80"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" --><input name="sdcchSAPI3" size="10" value="$%sdcchSAPI3#$"></td>
+ <td height="23" width="259"><font size="1">Associated with SDCCH,
+ SAPI 3 layer 2 timer</font></td>
+ </tr>
+ <font face="Arial" size="2">
+ <tr>
+ <th colspan="3" width="489">T31xx Timers -- in 10ms units</th>
+ </tr>
+ <tr>
+ <td align="right" width="138">T3101</td>
+ <td width="80"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" --><input name="t3101" size="10" value="$%t3101#$"></td>
+ </font>
+ <td width="259">
+ <font face="Arial" size="1">
+ Used with IMMEDIATE ASSIGNMENT&nbsp;</font></td>
+ </tr>
+ <font face="Arial" size="2">
+ <tr>
+ <td align="right" width="138">T3103</td>
+ <td width="80"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" --><input name="t3103" size="10" value="$%t3103#$"></td>
+ </font>
+ <td width="259">
+ <font face="Arial" size="1">
+ Used with HANDOVER COMMAND</font></td>
+ </tr>
+ <font face="Arial" size="2">
+ <tr>
+ <td align="right" width="138">T3105</td>
+ <td width="80"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" --><input name="t3105" size="10" value="$%t3105#$"></td>
+ </font>
+ <td width="259">
+ <font face="Arial" size="1">
+ Used with PHYSICAL INFORMATION</font></td>
+ </tr>
+ <font face="Arial" size="2">
+ <tr>
+ <td align="right" width="138">T3107</td>
+ <td width="80"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" --><input name="t3107" size="10" value="$%t3107#$"></td>
+ </font>
+ <td width="259">
+ <font face="Arial" size="1">
+ Used with ASSIGNMENT COMMAND</font></td>
+ </tr>
+ <font face="Arial" size="2">
+ <tr>
+ <td align="right" width="138">T3109</td>
+ <td width="80"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" --><input name="t3109" size="10" value="$%t3109#$"></td>
+ </font>
+ <td width="259">
+ <font face="Arial" size="1">
+ Used for lower layer failure</font></td>
+ </tr>
+ <font face="Arial" size="2">
+ <tr>
+ <td align="right" width="138">T3111</td>
+ <td width="80"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" --><input name="t3111" size="10" value="$%t3111#$"></td>
+ </font>
+ <td width="259">
+ <font face="Arial" size="1">
+ Used for Channel Activation Delay</font></td>
+ </tr>
+ <font face="Arial" size="2">
+ <tr>
+ <td align="right" width="138">T3113</td>
+ <td width="80"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" --><input name="t3113" size="10" value="$%t3113#$"></td>
+ </font>
+ <td width="259">
+ <font face="Arial" size="1">
+ Used with Paging Messages</font></td>
+ </tr>
+ <tr>
+ <td height="23" align="right" width="138">SACCH
+ TCH SAPI 3</td>
+ <td height="23" width="80"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" --><input name="sdcchTCHSAPI3" size="10" value="$%sdcchTCHSAPI3#$"></td>
+ <td height="23" width="259"><font size="1">Associated with SACCH with
+ TCH, SAPI 3 layer 2 timer</font></td>
+ </tr>
+ </tbody>
+ </table>
+ </center>
+ </div>
+
+ <font face="Arial" size="2">
+ <p align="center"><INPUT name=B1 type=submit value="Submit">
+ <font size="3"> <input name="Reset" type="reset" value="Reset" maxlength="0"></font><INPUT name=Recall type=button value="Recall" onClick="window.location.reload()" >
+ </p>
+ </form>
+</font>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/call_config_data.htm b/data/mnet/GP10/Host/ViperWatch/call_config_data.htm
new file mode 100644
index 0000000..801b2e5
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/call_config_data.htm
@@ -0,0 +1,100 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Layer 3 (CCM) Timers</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+
+<SCRIPT Language="JavaScript">
+
+function PresetButtons(theForm)
+{
+ return true
+
+}
+
+function ParseForm(theForm)
+{
+ return true
+
+}
+
+</SCRIPT>
+
+<body onload="PresetButtons(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this);" name="rm_config_data">
+
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="384">
+ <tr>
+ <td width="446">
+ <h2 align="center">Layer 3 (CCM) Timers</h2>
+ <div align="center">
+ <table border="1" width="316">
+ <tr>
+ <td height="23" width="215" align="center"><b>Timer Name</b></td>
+ <td height="23" width="85" align="center">
+ <p style="padding-top: 0px; padding-bottom: 0px"><b>Value<br>
+ <font size="1">(in 10ms Units)</font></b></td>
+ </tr>
+ <tr>
+ <td height="23" width="215">Alerting received Timer<br>
+ (T301)</td>
+ <td height="23" width="85"><font face="Times New Roman"><input type="text" name="cc_alerting_T301" size="5" maxlenght="5"
+ value="$%cc_alerting_T301#$"></font></td>
+ </tr>
+ <tr>
+ <td height="20" width="215">Setup sent Timer<br>
+ (T303)</td>
+ <td height="20" width="85"><font face="Times New Roman"><input type="text" name="cc_setup_T303" size="5" maxlenght="5"
+ value="$%cc_setup_T303#$"></font></td>
+ </tr>
+ <tr>
+ <td height="23" width="215">Call Confirmed received Timer (T310)</td>
+ <td height="23" width="85"><font face="Times New Roman"><input type="text" name="cc_call_confirmed_T310" size="5" maxlenght="5"
+ value="$%cc_call_confirmed_T310#$"></font></td>
+ </tr>
+ <tr>
+ <td height="23" width="215">Connect sent Timer<br>
+ (T313)</td>
+ <td height="23" width="85"><font face="Times New Roman"><input type="text" name="cc_connect_T313" size="5" maxlenght="5"
+ value="$%cc_connect_T313#$"></font></td>
+ </tr>
+ <tr>
+ <td height="23" width="215">Disconnect sent Time<br>
+ (T305)</td>
+ <td height="23" width="85"><font face="Times New Roman"><input type="text" name="cc_disconnect_T305" size="5" maxlenght="5"
+ value="$%cc_disconnect_T305#$"></font></td>
+ </tr>
+ <tr>
+ <td height="23" width="215">Release sent Timer<br>
+ (T308)</td>
+ <td height="23" width="85"><font face="Times New Roman"><input type="text" name="cc_release_T308" size="5" maxlenght="5"
+ value="$%cc_release_T308#$"></font></td>
+ </tr>
+ </table>
+ </div>
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"><input name="B2" type="submit" value="Submit"></td>
+ <td align="center"><input name="Recall1" type="button" value="Recall" onclick="window.location.reload()"></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/call_control_measurement.htm b/data/mnet/GP10/Host/ViperWatch/call_control_measurement.htm
new file mode 100644
index 0000000..4d713f9
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/call_control_measurement.htm
@@ -0,0 +1,221 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Call Control Measurement Parameters</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/common.js"></SCRIPT>
+
+
+
+<script language="JavaScript">
+
+
+function PresetForm(theForm)
+{
+ // clickCheckBox(theForm.apaEnableCheck, theForm.apaEnable);
+}
+
+function ParseForm(theForm)
+{
+ // parseCheckBox(theForm.apaEnableCheck, theForm.apaEnable);
+}
+
+</script>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" name="call_control_measurements">
+
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="472">
+ <tr>
+ <td valign="middle" width="679">
+ <h2 align="center">Call Control Measurement Parameters</h2>
+ <div align="center">
+ <center>
+ <table border="0">
+ <tr>
+ <td align="left">
+ <p align="left"><b> Start Time:</b></td>
+ <td>
+ <i>
+ <script> displayTime("$%meanPCHAGCHQueueLength#$") </script>
+ </i>
+ </td>
+ </tr>
+ <tr>
+ <td align="left"><b>Duration:</b></td>
+ <td><i>Last Completed 15-Minute Measurement Interval</i></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table border="1" cellspacing="0" cellpadding="0" width="90%">
+ <tr>
+ <th valign="middle" align="left" width="80%" nowrap>Parameters</th>
+ <th valign="middle" align="left" width="17%" >Value</th>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Attempted mobile originating calls:</td>
+ </center>
+ </center>
+
+ <center>
+ <center>
+ <td valign="middle" align="left" width="17%" >$%attMobileOriginatingCalls#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Successful mobile originating calls:</td>
+ <td valign="middle" align="left" width="17%" >$%succMobileOriginatingCalls#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Answered mobile originating calls:</td>
+ <td valign="middle" align="left" width="17%" >$%ansMobileOriginatingCalls#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Attempted mobile terminating calls:</td>
+ <td valign="middle" align="left" width="17%" >$%attMobileTerminatingCalls#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Successful mobile terminating calls:</td>
+ <td valign="middle" align="left" width="17%" >$%succMobileTerminatingCalls#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Answered mobile terminating calls:</td>
+ <td valign="middle" align="left" width="17%" >$%ansMobileTerminatingCalls#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Attempted Mobile Emergency calls</td>
+ <td valign="middle" align="left" width="17%" >$%attMobileEmergencyCalls#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Successful Mobile Emergency calls</td>
+ <td valign="middle" align="left" width="17%" >$%succMobileEmergencyCalls#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Answered Mobile Emergency calls</td>
+ <td valign="middle" align="left" width="17%" >$%ansMobileEmergencyCalls#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Attempted ciphering mode control procedures:</td>
+ <td valign="middle" align="left" width="17%" >$%attCipheringModeControlProcs#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Successful ciphering mode control procedures:</td>
+ <td valign="middle" align="left" width="17%" >$%succCipheringModeControlProcs#$</td>
+ </tr>
+ <!------ Hide for now
+
+ <tr>
+ <td valign="middle" align="left">Attempted interrogations of GMC for routing</td>
+ <td valign="middle" align="center" width="100" height="19">$%attInterrogationOfHLRsForRouting#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left">Successful interrogations of GMC (MSRN obtained)</td>
+ <td valign="middle" align="center" width="100" height="19">$%succInterrogationOfHLRsMSRNObtained#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left">Successful interrogations of GMC (call Forwarding)</td>
+ <td valign="middle" align="center" width="100" height="19">$%succInterrogationOfHLRsCallForwarding#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left">Attempted operations for mobile originating point to point SMs</td>
+ <td valign="middle" align="center" width="100" height="19">$%attOpForMobileOriginatingPointToPointSMs#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" >Successful operations for mobile originating point to point SMs</td>
+ <td valign="middle" align="center" width="100" height="19">$%succOpForMobileOriginatingPointToPointSMs#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left">Attempted operations for mobile terminating point to point SMs</td>
+ <td valign="middle" align="center" width="100" height="19">$%attOpForMobileTerminatingPointToPointSMs#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" >Successful operations for mobile terminating point to point SMs</td>
+ <td valign="middle" align="center" width="100">$%succOpForMobileTerminatingPointToPointSMs#$</td>
+ </tr>
+ <tr>
+ --------------------->
+ <td valign="middle" align="left" width="80%" nowrap>Mean time to provide the
+ call setup service:</td>
+ <td valign="middle" align="left" width="17%" >
+ <script language="JavaScript"> cvtTicks2Sec("$%meanTimeToCallSetupService#$"); </script>
+ </td>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Mean time to provide the
+ location update service:</td>
+ <td valign="middle" align="left" width="17%" >
+ <script language="JavaScript"> cvtTicks2Sec("$%meanTimeToLocationUpdateService#$"); </script>
+ </td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Transactions on the MM-layer<br>
+ where subscriber was identified with IMSI:</td>
+ <td valign="middle" align="left" width="17%" >$%transSubIdentifiedWithIMSI#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>IMSI detach procedures:</td>
+ <td valign="middle" align="left" width="17%" >$%imsiDetachProcs#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>IMSI attach procedures;:</td>
+ <td valign="middle" align="left" width="17%" >$%imsiAttachProcs#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Attempted incoming
+ inter-GP10 Handovers:</td>
+ <td valign="middle" align="left" width="17%" >$%attIncomingInterMSCHDOs#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Successful incoming
+ inter-GP10 Handovers:</td>
+ <td valign="middle" align="left" width="17%" >$%succIncomingInterMSCHDOs#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Attempted outgoing
+ inter-GP10 Handovers:</td>
+ <td valign="middle" align="left" width="17%" >$%attOutgoingInterMSCHDOs#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Successful outgoing
+ inter-GP10 Handovers:</td>
+ <td valign="middle" align="left" width="17%" >$%succOutgoingInterMSCHDOs#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Unsuccessful inter-GP10 Handovers<br>
+ with reconnection to old channels, per
+ GP10:</td>
+ <td valign="middle" align="left" width="17%" >$%unsuccExternHDOsWithReconnectionPerMSC#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Unsuccessful inter-GP10 Handovers<br>
+ with loss of connection, per GP10:</td>
+ <td valign="middle" align="left" width="17%" >$%unsuccExternHDOsWithLossOfConnectionPerMSC#$</td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </td>
+ </tr>
+ </table>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/call_measurement_overview.htm b/data/mnet/GP10/Host/ViperWatch/call_measurement_overview.htm
new file mode 100644
index 0000000..19a27ee
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/call_measurement_overview.htm
@@ -0,0 +1,30 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>New Page 1</title>
+</head>
+
+<body onload="$%reloadTopframe#$">
+
+<SCRIPT language="JavaScript" src="./js/link.js"></SCRIPT>
+
+<h2><nobr>Call Control Measurement Parameters</nobr></h2>
+<p>Call Control Measurement section&nbsp; consists of the following pages:</p>
+<ul>
+ <li><nobr><a href="call_control_measurement.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Call Control Measurement Parameters">Call Control Measurement Parameters</a></nobr></li>
+ <!------------ not used --------------
+ <li><nobr><a href="external_handover.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="External Handover, per Cause">External Handovers</a><br>
+ </li>
+ ------------------->
+ </ul>
+</nobr>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/cdc_board.htm b/data/mnet/GP10/Host/ViperWatch/cdc_board.htm
new file mode 100644
index 0000000..dcc9cd5
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/cdc_board.htm
@@ -0,0 +1,74 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>CDC Borad Parameters</title>
+</head>
+
+<SCRIPT >
+
+
+
+function PresetForm(theForm)
+{
+
+ return true;
+}
+
+function ParseForm(theForm)
+{
+ return true;
+}
+
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="cdc_board">
+
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="390">
+ <tr>
+ <td width="583">
+ <h2 align="center">CDC Board</h2>
+ <div align="center">
+ <table border="1" width="352">
+ <tr>
+ <td height="40" width="112"><font color="#000000">Serial Number:</font></td>
+ <td height="40" width="224">
+ <p style="padding-top: 0px; padding-bottom: 0px">$%cdcBoardSerialNumber#$&nbsp; </td>
+ </tr>
+ <tr>
+ <td height="40" width="112"><font color="#000000">MAC Address:</font></td>
+ <td height="40" width="224">$%cdcBoardMACAddress#$&nbsp; </td>
+ </tr>
+ </table>
+ </div>
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+</form>
+<p align="center">&nbsp;</p>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/cdr_timer.htm b/data/mnet/GP10/Host/ViperWatch/cdr_timer.htm
new file mode 100644
index 0000000..1e1c986
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/cdr_timer.htm
@@ -0,0 +1,83 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>CDR Timer</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+
+function ParseForm(theForm)
+{
+ return true;
+}
+
+function PresetForm(theForm)
+{
+ return true;
+}
+
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="cdr_timer">
+
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="352">
+ <tr>
+ <td width="473">
+ <h2 align="center">CDR Control Timers</h2>
+ <div align="center">
+ <center>
+ <table border="1" width="273">
+ <tr>
+ <th valign="middle" align="center" width="165">Timer Name</th>
+ <th valign="middle" title="Integer(1..30) (the unit is 1min)" align="center" width="92">Value<br>
+ <font size="1">(in 1min Units)</font></th>
+ </tr>
+ <tr>
+ <td valign="middle" align="center" title="Timer to trigger CDR generation for long calls" >Long Call Timer</td>
+ </center>
+ </center>
+ <td valign="middle" title="Integer(1..30) (the unit is 1min">
+ <p align="center"><input name="cdrLongCallTimer" size="5" maxlenght="2" value="$%cdrLongCallTimer#$" onchange="isValidInt(this,1,30)"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </center>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p align="center">&nbsp;</p>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/cell_config_mgmt.htm b/data/mnet/GP10/Host/ViperWatch/cell_config_mgmt.htm
new file mode 100644
index 0000000..4991daf
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/cell_config_mgmt.htm
@@ -0,0 +1,39 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GP10 GSM MIB</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/link.js"></SCRIPT>
+
+<body onload="$%reloadTopframe#$">
+
+<h1 align="center">&nbsp;Cell Configuration Management</h1>
+<p>Cell Configuration Management section consists of the following pages:</p>
+<ul>
+ <li><nobr><a href="bts_basic_package.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="BTS Basic Package as defined in GSM spec">BTS Basic Package</a></nobr></li>
+ <li><nobr><a href="bts_cell_allocaiton_table.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="BTS Cell Allocation Table">BTS Cell Allocation Table</a></nobr></li>
+ <li><nobr><a href="bts_ccch_config_package.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="BTS CCCH Config Package">BTS CCCH Configuration Package</a></nobr></li>
+ <li><nobr><a href="bts_options_package.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="BTS Options Package">BTS Options Package</a></nobr></li>
+ <li><nobr><a href="trx1_package.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="First Transceiver Package">First TRX Package</a></nobr></li>
+ <li><nobr><a href="trx2_package.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Second Transceiver Package">Second TRX Package</a></nobr></li>
+ <li><nobr><a href="rf1_package.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="First Radio Carrier Package">First Radio Carrier Package</a></nobr></li>
+ <li><nobr><a href="rf2_package.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Second Radio Carrier Package">Second Radio Carrier Package</a></nobr></li>
+</ul>
+
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/cell_measurement.htm b/data/mnet/GP10/Host/ViperWatch/cell_measurement.htm
new file mode 100644
index 0000000..d2e5e5c
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/cell_measurement.htm
@@ -0,0 +1,217 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Cell Control Measurement Parameters</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/common.js"></SCRIPT>
+<script language="JavaScript">
+
+function displayTime(utctime)
+{
+
+ var gmtDate = new Date(utctime*1000);
+ document.write(gmtDate.toLocaleString());
+}
+
+
+function PresetForm(theForm)
+{
+ // clickCheckBox(theForm.apaEnableCheck, theForm.apaEnable);
+}
+
+function ParseForm(theForm)
+{
+ // parseCheckBox(theForm.apaEnableCheck, theForm.apaEnable);
+}
+</script>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" name="ApaParameters">
+
+ <input name="apaEnable" type="hidden" value="$%apaEnable#$">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="491">
+ <tr>
+ <td height="10" valign="middle" width="945">
+ <h2 align="center">Cell Control Measurement Parameters</h2>
+ </center>
+ <table border="0" width="100%">
+ <tr>
+ <td width="100%">
+ <div align="center">
+ <table border="0">
+ <tr>
+ <td align="left">
+ <p align="left"><b>Start Time:</b></td>
+ <center>
+ <td>
+ <i>
+ <script> displayTime("$%meanPCHAGCHQueueLength#$") </script>
+ </i>
+ </td>
+ </tr>
+ <tr>
+ <td align="left"><b>Duration:</b></td>
+ <td><i>Last Completed 15-Minute Measurement Interval</i></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td width="100%">
+ <div align="center">
+ <table border="1" cellspacing="0" cellpadding="0" width="90%">
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap><b>Parameters</b></td>
+ <td valign="middle" align="left" width="20%" nowrap><b>Values</b></td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Attempted transmission of paging messages :</td>
+ <td valign="middle" align="left" width="20%" nowrap>$%attTransOfPagingMessagesThePCH#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Unsuccessful transmission of paging messages:</td>
+ <td valign="middle" align="left" width="20%" nowrap>$%unsuccTransOfPagingMessagesThePCH#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Attempted
+ immediate assignment procedures:</td>
+ <td valign="middle" align="left" width="20%" nowrap>$%attImmediateAssingProcs#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Successful
+ immediate assignment procedures:</td>
+ <td valign="middle" align="left" width="20%" nowrap>$%succImmediateAssingProcs#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Mean duration of a successful paging procedure:</td>
+ <td valign="middle" align="left" width="20%" nowrap>
+ <script language="JavaScript"> cvtTicks2Sec("$%meanDurationOfSuccPagingProcs#$"); </script>
+ </td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Number of available TCHs:</td>
+ <td valign="middle" align="left" width="20%" nowrap>$%nbrOfAvailableTCHs#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Mean number of busy
+ TCHs:</td>
+ <td valign="middle" align="left" width="20%" nowrap>$%meanNbrOfBusyTCHs#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Maximum number of busy
+ TCHs:</td>
+ <td valign="middle" align="left" width="20%" nowrap>$%maxNbrOfBusyTCHs#$</td>
+ </tr>
+ <!---------------- Not Used
+ <tr>
+ <td valign="middle" align="left" height="10" width="80%"><font size="2">Mean number of idle TCHs per interference band:</font></td>
+ <td valign="middle" align="center" width="20%">$%meanNbrOfIdleTCHsPerInterferenceBand#$</td>
+ </tr>
+ ---------------------->
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Attempted TCH seizures:</td>
+ <td valign="middle" align="left" width="20%" nowrap>$%attTCHSeizures#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Successful TCH seizures:</td>
+ <td valign="middle" align="left" width="20%" nowrap>$%succTCHSeizures#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Attempted TCH seizures meeting<br>
+ an TCH blocked state:</td>
+ <td valign="middle" align="left" width="20%" nowrap>$%attTCHSeizuresMeetingTCHBlockedState#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>All available TCH allocated time:</td>
+ <td valign="middle" align="left" width="20%" nowrap>
+ <script language="JavaScript"> cvtTicks2Sec("$%allAvailableTCHAllocatedTime#$"); </script>
+ </td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Mean TCH busy
+ time</td>
+ <td valign="middle" align="left" width="20%" nowrap>
+ <script language="JavaScript"> cvtTicks2Sec("$%meanTCHBusyTime#$"); </script>
+ </td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Number of lost radio links while using a
+ TCH:</td>
+ <td valign="middle" align="left" width="20%" nowrap>$%nbrOfLostRadioLinksTCH#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Number of available SDCCHs:</td>
+ <td valign="middle" align="left" width="20%" nowrap>$%nbrOfAvailableSDCCHs#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Mean number of busy
+ SDCCHs:</td>
+ <td valign="middle" align="left" width="20%" nowrap>$%meanNbrOfBusySDCCHs#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Maximum number of busy
+ SDCCHs:</td>
+ <td valign="middle" align="left" width="20%" nowrap>$%maxNbrOfBusySDCCHs#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Attempted SDCCH seizures meeting<br>
+ an SDCCH blocked state:</td>
+ <td valign="middle" align="left" width="20%" nowrap>$%attSDCCHSeizuresMeetingSDCCHBlockedState#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>All available SDCCH allocated time:</td>
+ <td valign="middle" align="left" width="20%" nowrap>
+ <script language="JavaScript"> cvtTicks2Sec("$%allAvailableSDCCHAllocatedTime#$"); </script>
+ </td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Number of lost radio links while using an
+ SDCCH:</td>
+ <td valign="middle" align="left" width="20%" nowrap>$%nbrOfLostRadioLinksSDCCH#$</td>
+ </tr>
+ <!------------------- Not used
+ <tr>
+ <td valign="middle" align="left" height="10" width="80%"><font size="2">Relative time downlink power control at maximum:</font></td>
+ <td valign="middle" align="center" width="20%">$%relativeTimeDLPowerControlAtMax#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" height="10" width="80%"><font size="2">Relative time uplink power control at maximum:</font></td>
+ <td valign="middle" align="center" width="20%">$%relativeTimeULPowerControlAtMax#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" height="10" width="80%"><font size="2">Successful Internal Handovers, intra-CELL:</font></td>
+ <td valign="middle" align="center" width="20%">$%succInternalHDOsIntraCell#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" height="10" width="80%"><font size="2">Unsuccessful Internal Handovers, intra-CELL:</font></td>
+ <td valign="middle" align="center" width="20%">$%unsuccInternalHDOsIntraCell#$</td>
+ </tr>
+ --------------------------->
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/cell_measurement_overview.htm b/data/mnet/GP10/Host/ViperWatch/cell_measurement_overview.htm
new file mode 100644
index 0000000..829e80e
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/cell_measurement_overview.htm
@@ -0,0 +1,30 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>New Page 1</title>
+</head>
+
+<body onload="$%reloadTopframe#$">
+
+<SCRIPT language="JavaScript" src="./js/link.js"></SCRIPT>
+
+<h2><nobr>Cell Measurement</nobr></h2>
+<p>Cell Measurement section consists of the following pages:</p>
+<ul>
+ <li><nobr><a href="cell_measurement.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Cell Measurement Parameters">Cell Measurement Parameters</a></nobr></li>
+ <li><nobr><a href="attem_immi_assign.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Attempted Immediate Assignment Procedures per cause">Attempted Immediate Assignment Measurement</a></nobr></li>
+ <li><nobr><a href="succ_immi_assi.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Successful Immediate Assignment Measurement per cause">Successful Immediate Assignment Measurement</a><br>
+ </li>
+ </ul>
+</nobr>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/cli.htm b/data/mnet/GP10/Host/ViperWatch/cli.htm
new file mode 100644
index 0000000..cf85547
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/cli.htm
@@ -0,0 +1,80 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-us">
+<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>CLI Session Status</title>
+</head>
+
+<script>
+
+function PresetForm(theForm)
+{
+ if (theForm.CliStatus.value.substr(0,1) == 0)
+ {
+ // disable termination button
+ theForm.terminate.disabled = true;
+ }
+ else
+ {
+ // enable termination button
+ theForm.terminate.disabled = false;
+ }
+
+ return true;
+}
+
+function ParseForm(theForm)
+{
+ if (theForm.terminate.disabled)
+ {
+ alert("There is no active CLI session!");
+ return false;
+ }
+ else
+ {
+ theForm.CliTerminate.value = "TERMINATE";
+ return true;
+ }
+}
+
+
+</script>
+
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" onsubmit="return ParseForm(this)">
+ <input type="hidden" name="CliTerminate" value="">
+ <input type="hidden" name="CliStatus" value ="$%CliStatus#$">
+ <table bgcolor="#D6D3CE" align="CENTER" border="4" width="549">
+ <tr>
+ <td width="533"><div align="center"><center><h2>CLI Session Status</h2>
+ </center></div>
+ <table align="CENTER" width="496" border>
+ <tr>
+ <td width="120"><b>Session Status</b></td>
+ <td><script>document.write(document.forms[0].CliStatus.value.substr(1));</script></td>
+ </tr>
+ </table>
+ <table align="CENTER">
+ <tr>
+ <td height="10"></td>
+ </tr>
+ <tr>
+ <td><input type="submit" name="terminate" value=" Terminate Session " title="Click this button to commit the change.">
+ </td>
+ <td height="60"><input type="button" value=" Recall " onclick="window.location.reload()"
+ title="Click this button to refresh the form."> </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+</form>
+</body>
+</html>
+
+<!-- password --> \ No newline at end of file
diff --git a/data/mnet/GP10/Host/ViperWatch/clock_card.htm b/data/mnet/GP10/Host/ViperWatch/clock_card.htm
new file mode 100644
index 0000000..5c91c2a
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/clock_card.htm
@@ -0,0 +1,119 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Clock Card Parameters</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+
+<script language="JavaScript" >
+
+function ParseForm(theForm)
+{
+ return true;
+}
+
+function PresetForm(theForm)
+{
+ return true;
+}
+
+function displayClkCardAlarm(theState)
+{
+ var textState = "";
+ var Color = "";
+
+ switch(theState)
+ {
+ case "0":
+ textState = "No Alarm Condition";
+ Color += "Green";
+ break;
+ case "1":
+ textState = "Burst Alarm Active";
+ Color += "Red";
+ break;
+ case "2":
+ textState = "Frame Alarm Active";
+ Color += "Red";
+ break;
+ case "3":
+ textState = "Both Burst and Frame Alarm Active";
+ Color += "Green";
+ break;
+
+ default:
+ textState = "Invalid Mib Data";
+ Color += "Yellow";
+ break;
+ }
+ document.write(" <font Color=\"" + Color + "\" >" + textState + "</font> </td>");
+}
+
+</script>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this);" name="clock_card">
+
+ <input type="hidden" name="clockCardStatus" value="$%clockCardStatus#$">
+ <p align="center">&nbsp;</p>
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="443" height="278">
+ <tr>
+ <td width="505" height="272">
+ <h2 align="center">Clock Card</h2>
+ <div align="center">
+ <table border="1" width="383" height="149">
+ <tr>
+ <td height="19" width="156">Serial Number</td>
+ <td height="19" width="213">$%clockCardCrystalUpTime#$&nbsp;&nbsp; </td>
+ </tr>
+ <tr>
+ <td height="19" width="156"><font color="#000000">Software Revision&nbsp;</font></td>
+ <td height="19" width="213">$%clockCardSoftwareVersion#$&nbsp; </td>
+ </tr>
+ <tr>
+ <td height="9" width="156"> <font color="#000000">Alarm (Interrupt) Status</font></td>
+ <td height="9" width="213">
+ <SCRIPT language="JavaScript"> displayClkCardAlarm("$%clockCardStatus#$") </script>
+ </td>
+ </tr>
+ <tr>
+ <td height="28" width="156"><font color="#000000">Days Since Tune-Up</font></td>
+ <td height="28" width="213">$%clockCardType#$&nbsp; </td>
+ </tr>
+ <tr>
+ <td height="19" width="156"><font color="#000000">Days Since Power on</font></td>
+ <td height="19" width="213">$%clockCardDAC#$&nbsp; </td>
+ </tr>
+ </table>
+ </div>
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/dual_trx_card.htm b/data/mnet/GP10/Host/ViperWatch/dual_trx_card.htm
new file mode 100644
index 0000000..bc03309
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/dual_trx_card.htm
@@ -0,0 +1,149 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Parameter</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+
+function ParseForm(theForm)
+{
+}
+
+function PresetForm(theForm)
+{
+}
+
+function displayLockStatus(theStatus)
+{
+ if (theStatus == "1")
+ {
+ document.write("Locked");
+ } else {
+ document.write("Not Locked");
+ }
+}
+function displayMemoryStatus(theStatus)
+{
+ if (theStatus == "1")
+ {
+ document.write("Successfully Read");
+ } else {
+ document.write("Default");
+ }
+}
+
+function displayFpgaStatus(theStatus)
+{
+ if (theStatus == "1")
+ {
+ document.write("Not Synchronized");
+ } else {
+ document.write("Synchronized");
+ }
+}
+
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="dual_trx_card">
+
+ <font face="Times New Roman"><input type="hidden" name="trxLoopBackMode" value="$%trxLoopBackMode#$"></font>
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="425">
+ <tr>
+ <td width="409">
+ <h2 align="center">Dual TRX Card</h2>
+ <div align="center">
+ <center>
+ <table border="1" width="349">
+ <tr>
+ <td align="left" width="180">Serial Number:</td>
+ <td height="23" width="157"><font face="Times New Roman">$%trxSerialNumber#$</font></td>
+ </tr>
+ <tr>
+ <td align="left" width="180">Software Version:</td>
+ <td height="21" width="157"><font face="Times New Roman">$%trxSoftwareVersion#$</font></td>
+ </tr>
+ <tr>
+ <td align="left" width="180">FPGA Synchronization Status</td>
+ <td height="21" width="157">
+ <script language="javaScript"> displayFpgaStatus("$%gpsCardStatus#$") </script>
+ </td>
+ </tr>
+ <tr>
+ <td align="left" width="180">Trim Value Status</td>
+ <td height="21" width="157">
+ <script language="javaScript"> displayMemoryStatus("$%trxLoopBackMode#$") </script>
+ </td>
+ </tr>
+ <tr>
+ <td align="left" width="337" colspan="2">
+ <p align="center">&nbsp;
+ <p align="center"><b>PLL Lock Detect Status:</b>
+ <table border="1" width="331" cellpadding="2">
+ <tr>
+ <td height="23" align="left" width="200">Master Reference Synthesizer:</td>
+ <td height="23" width="113">
+ <script language="javaScript"> displayLockStatus("$%referenceFrequencyPLL_LockDetectStatus#$") </script>
+ </td>
+ </tr>
+ <tr>
+ <td height="23" align="left" width="200">Transceiver 1 Synthesizer:</td>
+ <td height="23" width="113">
+ <script language="javaScript"> displayLockStatus("$%transceiver_1_PLL_LockDetectStatus#$") </script>
+ </td>
+ </tr>
+ <tr>
+ <td height="23" align="left" width="200">Transceiver 2 Synthesizer:</td>
+ <td height="23" width="113">
+ <script language="javaScript"> displayLockStatus("$%transceiver_2B_PLL_LockDetectStatus#$") </script>
+ </td>
+ </tr>
+ <tr>
+ <td height="23" align="left" width="200">Intermediate Frequency Synthesizer:</td>
+ <td height="23" width="113">
+ <script language="javaScript"> displayLockStatus("$%intermediateFrequency_LockDetectStatus#$") </script>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <p align="center">&nbsp;</p>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/export_import.htm b/data/mnet/GP10/Host/ViperWatch/export_import.htm
new file mode 100644
index 0000000..ff1c7d3
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/export_import.htm
@@ -0,0 +1,142 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Export/Import MIB</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT >
+function validateFileName(theFileName)
+{
+
+ if (theFileName.value== "")
+ {
+ alert("Please enter a value for the \"oam Alternate mibFileName\" field.");
+ theFileName.focus();
+ return (false);
+ }
+
+ if (theFileName.value.length < 5)
+ {
+ alert("Please enter at least 5 characters in the file name field.");
+ theFileName.focus();
+ return (false);
+ }
+
+ var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_./";
+ var checkStr = theFileName.value;
+ var allValid = true;
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ }
+ if (!allValid)
+ {
+ alert("Invalid characters in file name field.");
+ theFileName.focus();
+ return (false);
+ }
+ return (true);
+}
+
+function PresetForm(theForm)
+{
+
+ return true;
+}
+
+
+function ParseForm(theForm)
+{
+ parseSelect(theForm.oamCommandSelect, theForm.oamCommand);
+
+ if (theForm.oamCommand.value == "4")
+ {
+ alert("You must reboot the system once the load MIB operation is successful.")
+ }
+ return validateFileName(theForm.oamAlternateMibFileName);
+
+
+}
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" onsubmit="return ParseForm(this)" name="mib_flush">
+ <div align="center">
+ <center>
+
+ <table border="4" bgcolor="#D6D3CE" width="500">
+ <tr>
+ <td width="552">
+ <h2 align="center">Load/Save Mib</h2>
+ <table border="0" width="529">
+ <tr>
+ <td width="170" nowrap valign="middle">Alternate MIB File Name:</td>
+ <td width="362" nowrap valign="middle">
+ <p ><input type="text" name="oamAlternateMibFileName" size="40" value="$%oamAlternateMibFileName#$" maxlength="120">
+ </tr>
+ <tr>
+ <td width="170" nowrap valign="middle">Operation:</td>
+ <td width="362" nowrap valign="middle"><select name="oamCommandSelect" size="1"
+ title="The file name is only valid for importing and exporting of MIB ascii file.">
+ <option value="4">Load MIB from the Alternate Mib File</option>
+ <option value="8" selected>Save MIB to the Alternate Mib File</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td width="170" nowrap valign="middle">&nbsp;&nbsp;</td>
+ <td width="362" nowrap valign="middle">&nbsp;&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="170" nowrap valign="middle">
+ <p align="center"><font color="#000080">Note</font></p>
+ </td>
+ <center>
+ <td width="362" nowrap valign="middle">
+ <p><font color="#000080">The path name of the specified
+ file must exist on the compact flash, otherwise the operation
+ will fail.</font></p>
+ </td>
+ <input type="HIDDEN" name="oamCommand" value="0">
+ </tr>
+ </table>
+ <div align="center">
+ <table border="0" cellpadding="3" width="150">
+ <tr>
+ <td align="center" width="62">&nbsp;</td>
+ <td align="center" width="63">&nbsp;</td>
+ </tr>
+ <tr>
+ <td align="center" width="62"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center" width="63"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center" width="62"></td>
+ <td align="center" width="63"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/external_handover.htm b/data/mnet/GP10/Host/ViperWatch/external_handover.htm
new file mode 100644
index 0000000..e76e4a3
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/external_handover.htm
@@ -0,0 +1,81 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Automatic Parameter Allocation Invalid Frequency Table</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/perCause.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/common.js"></SCRIPT>
+
+
+
+<body onload="$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" name="apaClockSourceFrequencyTable">
+
+ <div align="center">
+ <table border="4" bgcolor="#D6D3CE" width="379">
+ <tr>
+ <td width="909">
+ <h3 align="center"><font color="#000080">&nbsp;</font>External Handovers, per cause</h3>
+ <div align="center">
+ <center>
+ <table border="0">
+ <tr>
+ <td bgcolor="#C0C0C0">
+ <p align="center">Measurement Start Time:</td>
+ <td bgcolor="#C0C0C0"><script> displayTime("$%meanPCHAGCHQueueLength#$") </script>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#C0C0C0">Measurement Duration:</td>
+ <td bgcolor="#C0C0C0">&nbsp;15 Minutes</td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table border="1" width="449">
+ <tr>
+ <td height="19" align="center" width="45%">Cause of the external handover</td>
+ <td height="19" align="center" width="230">Counter of the number of external handovers for this cause.</td>
+ </tr>
+ <! $%createTable(apaInvalidFrequencyIndex,*,,,,,apaInvalidFrequencyIndex,apaInvalidFrequencyArfcn)#$ >
+ <! $%REPEAT(apaInvalidFrequencyIndex,1,16)#$ >
+ <tr>
+ <td align="center" width="45%"><font color="#000080"> <script> displayCause("$%externalHDOsPerCauseCode#$") </script> </font></td>
+ <td align="center" width="230"><font color="#000080">$%externalHDOsPerCauseValue#$</font></td>
+ </tr>
+
+ <! $%endRow(apaInvalidFrequencyIndex)#$ >
+ <! $%REPEAT(END)#$ >
+ <! $%endTable(apaInvalidFrequencyIndex)#$>
+
+ </table>
+ </center>
+ </div>
+ <center>
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"><font color="#000080"><input name="B2" type="submit" value="Submit" disabled></font></td>
+ <td align="center"><font color="#000080"><input name="Recall1" type="button" value="Recall" onclick="window.location.reload()"></font></td>
+ </tr>
+ </table>
+ </div>
+ </center>
+ </td>
+ </tr>
+ </table>
+ </div>
+</form>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/external_power_supply.htm b/data/mnet/GP10/Host/ViperWatch/external_power_supply.htm
new file mode 100644
index 0000000..7c9ca26
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/external_power_supply.htm
@@ -0,0 +1,109 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Parameter</title>
+</head>
+
+<SCRIPT >
+
+
+function selectOption(theSelect, valueHolder)
+{
+ if (valueHolder.value < 0 && valueHolder.value >= theSelect.length)
+ {
+ window.alert("Incorrect MIB value for " + valueHolder.name + " "+ valueHolder.value + "Corrected to 0");
+ valueHolder.value = 0;
+ }
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].value == valueHolder.value)
+ {
+ theSelect.options[i].selected = true;
+ break;
+ }
+ }
+
+}
+
+function presetButtons(theForm)
+{
+
+ return true;
+}
+
+function parseSelect(theSelect, valueHolder)
+{
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].selected)
+ {
+ valueHolder.value = theSelect.options[i].value;
+ break;
+ }
+ }
+}
+
+function parseButtons(theForm)
+{
+ return true;
+}
+
+</SCRIPT>
+
+<body onload="presetButtons(this.document.forms[0]);$%reloadTopframe#$">
+<form method="POST" cellpadding="0" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
+
+<input type="hidden" name="powerSupplyType" value="$%powerSupplyType#$"><input type="hidden" name="powerSupplyStatus" value="$%powerSupplyStatus#$">
+
+<div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="368">
+ <tr>
+ <td width="430">
+ <h2 align="center">External Power Supply</h2>
+ <div align="center">
+ <table border="0">
+ <tr>
+ <td height="23"><font COLOR="#000000">Type</font></td>
+ <td height="23">
+ <p style="padding-top: 0px; padding-bottom: 0px"><select name="powerSupplyTypeSelect" size="1">
+ <option selected value="0">A1</option>
+ <option value="1">A2</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td height="22"><font COLOR="#000000">Status</font></td>
+ <td height="22"><select name="powerSupplyStatusSelect" size="1">
+ <option selected value="0">Normal</option>
+ <option value="1">Not Working</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td height="21" width="107"></td>
+ <td height="21" width="300"></td>
+ </tr>
+ </table>
+ </div>
+
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"><input name="B2" type="submit" value="Submit"> </td>
+ <td align="center"> <input name="Recall1" type="button" value="Recall" onclick="window.location.reload()"></td>
+ <td align="center"><input name="Reset1" type="reset" value="Reset"></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+</div>
+
+</form>
+
+</body>
+
diff --git a/data/mnet/GP10/Host/ViperWatch/feature_control.htm b/data/mnet/GP10/Host/ViperWatch/feature_control.htm
new file mode 100644
index 0000000..3490540
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/feature_control.htm
@@ -0,0 +1,184 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Feature Control</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+
+
+<SCRIPT language="JavaScript">
+
+function PresetForm(theForm)
+{
+ theForm.AuthCiphSelect.selectedIndex = Number(theForm.mm_authenticationRequired.value) + Number(theForm.mm_cipheringRequired.value);
+ theForm.AuthCiphSelect.defaultSelectedIndex = theForm.AuthCiphSelect.selectedIndex;
+ SyncFrequency(theForm.AuthCiphSelect, theForm.rm_nim_0_7);
+ //clickCheckBox(theForm.mm_IMEICheckRequiredCheck, theForm.mm_IMEICheckRequired);
+ //clickCheckBox(theForm.gprsCheck, theForm.enableGprs);
+ clickCheckBox(theForm.smscbCheck, theForm.rm_nim_0_1);
+ clickCheckBox(theForm.overloadedCellBarring, theForm.rm_nim_1_1);
+
+ // clickCheckBox(theForm.frequencyHoppingCheck, theForm.rm_nim_0_2);
+ return true;
+}
+
+
+function ParseForm(theForm)
+{
+ switch(theForm.AuthCiphSelect.selectedIndex)
+ {
+ case 0:
+ theForm.mm_authenticationRequired.value = 0;
+ theForm.mm_cipheringRequired.value = 0;
+ break;
+ case 1:
+ theForm.mm_authenticationRequired.value = 1;
+ theForm.mm_cipheringRequired.value = 0;
+ break;
+ case 2:
+ theForm.mm_authenticationRequired.value = 1;
+ theForm.mm_cipheringRequired.value = 1;
+ break;
+ }
+ //parseCheckBox(theForm.mm_IMEICheckRequiredCheck, theForm.mm_IMEICheckRequired);
+ //parseCheckBox(theForm.gprsCheck, theForm.enableGprs);
+ parseCheckBox(theForm.smscbCheck, theForm.rm_nim_0_1);
+ parseCheckBox(theForm.overloadedCellBarring, theForm.rm_nim_1_1);
+
+ // parseCheckBox(theForm.frequencyHoppingCheck, theForm.rm_nim_0_2);
+ return true;
+
+}
+
+function SyncFrequency(theSelect, theDm)
+{
+ if (theSelect.selectedIndex == 0)
+ {
+ theDm.disabled = true;
+ } else {
+ theDm.disabled = false;
+ }
+}
+
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="feature_control">
+
+ <input name="rm_nim_0_1" type="hidden" value="$%rm_nim_0_1#$">
+ <input name="rm_nim_0_2" type="hidden" value="0">
+ <input type="hidden" name="mm_authenticationRequired" value="$%mm_authenticationRequired#$">
+ <input type="hidden" name="mm_cipheringRequired" value="$%mm_cipheringRequired#$">
+ <!--<input type="hidden" name="enableGprs" value="$%enableGprs#$">-->
+
+ <!--- Not used at this time
+ <input type="hidden" name="mm_IMEICheckRequired" value="$%mm_IMEICheckRequired#$">
+ -------------->
+ <input type="hidden" name="rm_nim_1_1" value="$%rm_nim_1_1#$">
+
+
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="506">
+ <tr>
+ <td width="490">
+ <h2 align="center">Feature Control</h2>
+ </center>
+ <div align="center">
+ <table border="0" width="368">
+ <tr>
+ <td height="23" width="354" colspan="2">
+ <center>
+ <table border="1" width="100%">
+ <tr>
+ <td width="100%">
+ <p align="center"><b>&nbsp;Authentication and Ciphering</b></p>
+ <table border="0" width="471">
+ <tr>
+ <td width="168">Authentication Option:</td>
+ <td width="282"><select size="1" name="AuthCiphSelect" onchange="SyncFrequency(this, this.form.rm_nim_0_7);">>
+ <option selected value="0">Disable Ciphering and Authentication</option>
+ <option value="1">Enable Authentication Only</option>
+ <option value="2">Enable both Ciphering and
+ Authentication</option>
+ </select></td>
+ <td width="1"></td>
+ </tr>
+ <tr>
+ <td width="168">Authentication Frequency:</td>
+ <td width="282"><input type="text" name="rm_nim_0_7" value="$%rm_nim_0_7#$" size="1" maxlength="1" onchange="return isValidIntName(this,0,5, 'Authentication Frequency');"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </center>
+
+ </td>
+ </tr>
+ <tr>
+ <td width="354" colspan="2"></td>
+ </tr>
+ <!-------- Not used at this time
+ <tr>
+ <td width="27"><input type="checkbox" name="mm_IMEICheckRequiredCheck" value="ON"></td>
+ <td width="327">Enable IMEI Check</td>
+ </tr>
+ ------------->
+ <!--<tr>
+ <td height="23" width="27"><input type="checkbox" name="gprsCheck" value="ON"></td>
+ <td height="23" width="327"><font color="#000000">Enable GPRS</font></td>
+ </tr>-->
+ <tr>
+ <td height="23" width="27"><input type="checkbox" name="smscbCheck"></td>
+ <td height="23" width="327"><font color="#000000">Enable SMS-CB</font></td>
+ </tr>
+ <tr>
+ <td height="23" width="27"><input type="checkbox" name="overloadedCellBarring" value="ON"></td>
+ <td height="23" width="327"><font color="#000000">Enable Overloaded Cell Barring</font></td>
+ </tr>
+ <!--- Not used now
+ <tr>
+ <td height="16" width="27" title="Frequency hopping is not available at this time">
+ <input type="checkbox" name="frequencyHoppingCheck"></td>
+ <td height="16" width="327"><font color="#000000">Enable Frequency Hopping</font></td>
+ </tr>
+ ------------------->
+ </table>
+ </div>
+ <div align="center">
+ <center>
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p align="center">&nbsp;</p>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/feedback.htm b/data/mnet/GP10/Host/ViperWatch/feedback.htm
new file mode 100644
index 0000000..6173eaa
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/feedback.htm
@@ -0,0 +1,67 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-us">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Please tell us what you think about this page in the GPManager</title>
+</head>
+
+
+<body onload="$%reloadTopframe#$">
+<p>Please tell us what you think about this page in the GPManager, or anything else that comes to mind. We welcome all of your comments and suggestions.</p>
+<form method="POST">
+
+<p><strong>What kind of comment would you like to send?</strong></p>
+<dl>
+<dd><input type="radio" name="MessageType" value="Complaint">Complaint <input type="radio" name="MessageType" value="Problem">Problem <input type="radio" checked name="MessageType" value="Suggestion">Suggestion <input type="radio" name="MessageType" value="Praise">Praise</dd>
+</dl>
+<p><strong>What about us do you want to comment on?</strong></p>
+<dl>
+<dd><select name="Subject" size="1">
+<option selected>Web Site</option>
+<option>Company</option>
+<option>Products</option>
+<option>Store</option>
+<option>Employee</option>
+<option>(Other)</option>
+</select> Page Name: <input type="text" size="26" maxlength="256" name="PageName"></dd>
+</dl>
+<p><strong>Enter your comments in the space provided below:</strong></p>
+<dl>
+<dd><textarea name="Comments" rows="9" cols="67"></textarea></dd>
+</dl>
+<p><strong>Tell us how to get in touch with you:</strong></p>
+<dl>
+<dd>
+<table>
+<tr>
+<td>Name
+<td><input type="text" size="35" maxlength="256" name="Username">
+</tr>
+<tr>
+<td>E-mail
+<td><input type="text" size="35" maxlength="256" name="UserEmail">
+</tr>
+<tr>
+<td>Tel
+<td><input type="text" size="35" maxlength="256" name="UserTel">
+</tr>
+<tr>
+<td>FAX
+<td><input type="text" size="35" maxlength="256" name="UserFax">
+</tr>
+</table>
+</dd>
+</dl>
+<dl>
+<dd><input type="checkbox" name="ContactRequested" value="ContactRequested"> Please contact me as soon as possible regarding this matter.</dd>
+</dl>
+<p><input type="submit" value="Submit Comments"> <input type="reset" value="Clear Form"></p>
+</form>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/frequency_hopping.htm b/data/mnet/GP10/Host/ViperWatch/frequency_hopping.htm
new file mode 100644
index 0000000..5a96010
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/frequency_hopping.htm
@@ -0,0 +1,88 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Parameter</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+
+<SCRIPT language="JavaScript" >
+
+var index = 1;
+function displayIndex()
+{
+ document.write(" " + index++ + " ");
+}
+
+</Script>
+<body onload="$%reloadTopframe#$" >
+<form method="POST" cellpadding="0" name="apaClockSourceFrequencyTable">
+
+<div align="center">
+ <table border="4" bgcolor="#D6D3CE">
+ <tr>
+ <td>
+ <h3 align="center">
+ Frequency Hopping</h3>
+ <div align="center">
+ <center>
+ <table border="0">
+ <tr>
+ <td>Hopping Sequence Number:</td>
+ <td><input type="text" name="hoppingSequenceNumber" size="20"
+ value="$%hoppingSequenceNumber#$"></td>
+ </tr>
+ <tr>
+ <td>Mobile Allocation Table:</td>
+ <td><input type="text" name="mobileAllocationTable" size="20"
+ value="$%mobileAllocationTable#$"></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table border="1" width="97%" height="0">
+ <tr>
+ <td height="19" align="center" width="206" >Index&nbsp;</td>
+ <td height="19" align="center" width="88" >ARFCN</td>
+ </tr>
+ <! $%createTable(mobileAllocationIndex,*,,,,,mobileAllocationIndex,mobileAllocation)#$ >
+ <! $%REPEAT(mobileAllocationIndex,1,16)#$ >
+ <tr>
+ <td align="center" width="206"><script> displayIndex() </script></td>
+ <td title="an entry of radio freuency (ARFCNs) allocated to all channel that belong to the frequencyHopping instance that contains the attribute." align="center" width="88"><input type="text" name="mobileAllocation.$%getInstance(cellAllocationIndex)#$" value="$%mobileAllocation#$" size="4" maxlength="4" onchange="return isValidInt(this,0,1023);"></td>
+ </tr>
+
+ <! $%endRow(mobileAllocationIndex)#$ >
+ <! $%REPEAT(END)#$ >
+ <! $%endTable(mobileAllocationIndex)#$>
+
+ </table>
+ </center>
+ </div>
+ <center>
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"><input name="B2" type="submit" value="Submit"> </td>
+ <td align="center"> <input name="Recall1" type="button" value="Recall" onclick="window.location.reload()"></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+</div>
+
+</form>
+
+</body>
+
diff --git a/data/mnet/GP10/Host/ViperWatch/gprs_basic_package.htm b/data/mnet/GP10/Host/ViperWatch/gprs_basic_package.htm
new file mode 100644
index 0000000..d0530d9
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/gprs_basic_package.htm
@@ -0,0 +1,127 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GPRS Basic Package</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/state.js"></SCRIPT>
+
+
+<SCRIPT language="JavaScript">
+
+function PresetForm(theForm)
+{
+ selectOption(theForm.enableGprsSelect,theForm.enableGprs);
+ return true;
+}
+
+
+
+function ParseForm(theForm)
+{
+ parseSelect(theForm.enableGprsSelect, theForm.enableGprs);
+
+ if (!validateIp(theForm.gprsServerIpAddress, "GPRS IP Address"))
+ return false;
+
+ return true;
+}
+
+function PrintDisableMessage(theElem)
+{
+ if (theElem.value == 0)
+ {
+ alert("You are going to disable GPRS feature.\nPlease make sure that all slot is not configured as GPRS");
+ }
+}
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="gprs_basic_package">
+
+ <input name="enableGprs" type="hidden" value="$%enableGprs#$">
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="340">
+ <tr>
+ <td >
+ <h2 align="center">GPRS Basic Package</h2>
+ <div align="center">
+ <table border="1">
+ <tr>
+ <td><b>Current State:</b>
+ <div align="center">
+ <table border="0">
+ <tr>
+ <td height="23" align="left">GPRS Feature:</td>
+ <td height="23" align="left">
+ <select name="enableGprsSelect" size="1" onChange="PrintDisableMessage(this);">
+ <option value="0">Disable</option>
+ <option selected value="1">Enable</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td height="23" align="left">Operational State:</td>
+ <td height="23" align="left">
+ <script> displayState("$%gprsOperationalStatus#$") </script>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div align="center">
+ <center>
+ <p>
+ <p>
+ <table border="1" cellpadding="2">
+ <tr>
+ <td width="130" height="34" title="GPRS server's IP address">GPRS IP Address
+ </td>
+ <td width="130">
+ <font face="Times New Roman">
+ <input name="gprsServerIpAddress" size="15" maxlength="15" value="$%gprsServerIpAddress#$">
+ </font>
+ </td>
+ </tr>
+ <tr>
+ <td height="34" title="Routing Area Code to indicate which RA this GP10 belongs to">GPRS RAC
+ </td>
+ <td title="Routing Area Code: INTEGER (0..65535)">
+ <font face="Times New Roman">
+ <input name="gprsRac" size="5" maxlength="5" value="$%gprsRac#$" onchange="return isValidInt(this, 0, 65535);">
+ </font>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table height="50" border="0" cellpadding="3">
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/gprs_interface_bssgp.htm b/data/mnet/GP10/Host/ViperWatch/gprs_interface_bssgp.htm
new file mode 100644
index 0000000..2501307
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/gprs_interface_bssgp.htm
@@ -0,0 +1,232 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GPRS BSSGP Parameters</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+
+
+
+<SCRIPT language="JavaScript">
+
+function PresetForm(theForm)
+{
+ // for TEST elements
+ theForm.blockTimer.defaultValue = 1; // set def value!
+ theForm.resetTimer.defaultValue = 1; // set def value!
+ theForm.suspendTimer.defaultValue = 1; // set def value!
+ theForm.resumeTimer.defaultValue = 1; // set def value!
+ theForm.capUpdateTimer.defaultValue = 1; // set def value!
+ theForm.blockRetries.defaultValue = 3;
+ theForm.unBlockRetries.defaultValue = 3;
+ theForm.resetRetries.defaultValue = 3;
+ theForm.suspendRetries.defaultValue = 3;
+ theForm.resumeRetries.defaultValue = 3;
+ theForm.raCapUpdateRetries.defaultValue = 3;
+ theForm.timeInterval.defaultValue = 5; // set def value!
+ theForm.networkPort.defaultValue = 22240;
+
+ return true;
+}
+
+function ParseForm(theForm)
+{
+ if (isValidInt(theForm.blockTimer, 1, 30)==false)
+ return false;
+ if (isValidInt(theForm.resetTimer, 1, 120)==false)
+ return false;
+ if (isValidInt(theForm.suspendTimer, 1, 10)==false)
+ return false;
+ if (isValidInt(theForm.resumeTimer, 1, 10)==false)
+ return false;
+ if (isValidInt(theForm.capUpdateTimer, 1, 30)==false)
+ return false;
+ if (isValidInt(theForm.blockRetries, 0, 65535)==false)
+ return false;
+ if (isValidInt(theForm.unBlockRetries, 0, 65535)==false)
+ return false;
+ if (isValidInt(theForm.resetRetries, 0, 65535)==false)
+ return false;
+ if (isValidInt(theForm.suspendRetries, 0, 65535)==false)
+ return false;
+ if (isValidInt(theForm.resumeRetries, 0, 65535)==false)
+ return false;
+ if (isValidInt(theForm.raCapUpdateRetries, 0, 65535)==false)
+ return false;
+ if (isValidInt(theForm.timeInterval, 5, 6000)==false)
+ return false;
+ if (isValidInt(theForm.networkPort, 1024, 65535)==false)
+ return false;
+
+ return true;
+}
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="gprs_interface_rlcmac">
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="340">
+ <tr>
+ <td >
+ <h2 align="center">GPRS BSSGP Parameters</h2>
+ <div align="center">
+ <center>
+ <table border="1" cellpadding="2">
+ <!-- Text blockTimer -->
+ <tr>
+ <td width="180" valign="middle" title="Timer Value that guards the blocking or unblocking procedures.">
+ Block Timer
+ </td>
+ <td width="100" valign="middle" align="left" title="INTEGER (1..30)">
+ <input name="blockTimer" value="$%blockTimer#$" maxlength="2" size="4" onchange="return isValidInt(this,1,30);"></td>
+ </tr>
+
+ <!-- Text resetTimer -->
+ <tr>
+ <td valign="middle" title="Timer Value that guards the reset procedure.">
+ Reset Timer
+ </td>
+ <td valign="middle" align="left" title="(1..120)">
+ <input name="resetTimer" value="$%resetTimer#$" maxlength="3" size="5" onchange="return isValidInt(this,1,120);"></td>
+ </tr>
+
+ <!-- Text suspendTimer -->
+ <tr>
+ <td valign="middle" title="Timer Value that guards the suspend procedure.">
+ Suspend Timer
+ </td>
+ <td valign="middle" align="left" title="INTEGER (1..10)">
+ <input name="suspendTimer" value="$%suspendTimer#$" maxlength="2" size="4" onchange="return isValidInt(this,1,10);"></td>
+ </tr>
+
+ <!-- Text resumeTimer -->
+ <tr>
+ <td valign="middle" title="Timer Value that guards the resume procedure.">
+ Resume Timer
+ </td>
+ <td valign="middle" align="left" title="INTEGER (1..10)">
+ <input name="resumeTimer" value="$%resumeTimer#$" maxlength="2" size="4" onchange="return isValidInt(this,1,10);"></td>
+ </tr>
+
+ <!-- Text capUpdateTimer -->
+ <tr>
+ <td valign="middle" title="Timer Value that guards the RA_CAPABILITY_UPDATE procedure.">
+ Capability Update Timer
+ </td>
+ <td valign="middle" align="left" title="INTEGER (1..30)">
+ <input name="capUpdateTimer" value="$%capUpdateTimer#$" maxlength="2" size="4" onchange="return isValidInt(this,1,30);"></td>
+ </tr>
+
+ <!-- Text blockRetries -->
+ <tr>
+ <td valign="middle" title="Number of BSSGP Virtual Connection (BVC) Block Retries.">
+ Block Retries
+ </td>
+ <td valign="middle" align="left" title="INTEGER">
+ <input name="blockRetries" value="$%blockRetries#$" maxlength="5" size="7" onchange="return isValidInt(this,0,65535);"></td>
+ </tr>
+
+ <!-- Text unBlockRetries -->
+ <tr>
+ <td valign="middle" title="Number of BSSGP Virtual Connection (BVC) UnBlock Retries.">
+ UnBlock Retries
+ </td>
+ <td valign="middle" align="left" title="INTEGER">
+ <input name="unBlockRetries" value="$%unBlockRetries#$" maxlength="5" size="7" onchange="return isValidInt(this,0,65535);"></td>
+ </tr>
+
+ <!-- Text resetRetries -->
+ <tr>
+ <td valign="middle" title="Number of BSSGP Virtual Connection (BVC) Reset Retries.">
+ Reset Retries
+ </td>
+ <td valign="middle" align="left" title="INTEGER">
+ <input name="resetRetries" value="$%resetRetries#$" maxlength="5" size="7" onchange="return isValidInt(this,0,65535);"></td>
+ </tr>
+
+ <!-- Text suspendRetries -->
+ <tr>
+ <td valign="middle" title="Number of BSSGP Virtual Connection (BVC) Suspend Retries.">
+ Suspend Retries
+ </td>
+ <td valign="middle" align="left" title="INTEGER">
+ <input name="suspendRetries" value="$%suspendRetries#$" maxlength="5" size="7" onchange="return isValidInt(this,0,65535);"></td>
+ </tr>
+
+ <!-- Text resumeRetries -->
+ <tr>
+ <td valign="middle" title="Number of BSSGP Virtual Connection (BVC) Resume Retries.">
+ Resume Retries
+ </td>
+ <td valign="middle" align="left" title="INTEGER">
+ <input name="resumeRetries" value="$%resumeRetries#$" maxlength="5" size="7" onchange="return isValidInt(this,0,65535);"></td>
+ </tr>
+
+ <!-- Text raCapUpdateRetries -->
+ <tr>
+ <td valign="middle" title="Number of BSSGP Virtual Connection (BVC) RA-CAPABILITY-UPDATE Retries.">
+ RA Capability Update Retries
+ </td>
+ <td valign="middle" align="left" title="INTEGER">
+ <input name="raCapUpdateRetries" value="$%raCapUpdateRetries#$" maxlength="5" size="7" onchange="return isValidInt(this,0,65535);"></td>
+ </tr>
+
+ <!-- Text timeInterval -->
+ <tr>
+ <td valign="middle" title="Interval after Flow Control MS before SGSN may use SGSN generated Bmax and R.">
+ Time Interval
+ </td>
+ <td valign="middle" align="left" title="INTEGER (5..6000)">
+ <input name="timeInterval" value="$%timeInterval#$" maxlength="4" size="6" onchange="return isValidInt(this,5,6000);"></td>
+ </tr>
+
+ <!-- Text networkPort -->
+ <tr>
+ <td valign="middle" title="Base UDP port for Network QOS levels.">
+ Network Port
+ </td>
+ <td valign="middle" align="left" title="INTEGER (1024..65535)">
+ <input name="networkPort" value="$%networkPort#$" maxlength="5" size="7" onchange="return isValidInt(this,1024,65535);"></td>
+ </tr>
+
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table height="50" border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <p align="center">&nbsp;
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
+
diff --git a/data/mnet/GP10/Host/ViperWatch/gprs_interface_overview.htm b/data/mnet/GP10/Host/ViperWatch/gprs_interface_overview.htm
new file mode 100644
index 0000000..624e6ea
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/gprs_interface_overview.htm
@@ -0,0 +1,34 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GPRS Interface MIB</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/link.js"></SCRIPT>
+
+<body onload="$%reloadTopframe#$">
+
+<h1 align="center">GPRS Interface MIB</h1>
+<p>GPRS Interface MIB Consists of following MIB Packages:</p>
+<ul>
+ <li><nobr><a href="gprs_rss_overview.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="GPRS Radio Subsystem Parameter">GPRS Radio Subsystem Parameters</a></nobr></li>
+ <li><nobr><a href="gprs_interface_rlcmac.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="GPRS Radio Link Control Parameters">GPRS Radio Link Control Parameters</a></nobr></li>
+ <li><nobr><a href="gprs_interface_bssgp.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="GPRS BSSGP parameters">GPRS BSSGP Parameters</a></nobr></li>
+</ul>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/gprs_interface_rlcmac.htm b/data/mnet/GP10/Host/ViperWatch/gprs_interface_rlcmac.htm
new file mode 100644
index 0000000..1f7f9da
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/gprs_interface_rlcmac.htm
@@ -0,0 +1,128 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GPRS Radio Link Control Parameters</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+
+
+
+<SCRIPT language="JavaScript">
+
+function PresetForm(theForm)
+{
+ // for TEST elements
+ theForm.t3169.defaultValue = 5;
+ theForm.t3191.defaultValue = 5;
+ theForm.t3193.defaultValue = 3;
+ theForm.t3195.defaultValue = 5;
+
+ return true;
+}
+
+function ParseForm(theForm)
+{
+ return true;
+}
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="gprs_interface_rlcmac">
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="440">
+ <tr>
+ <td >
+ <h2 align="center">GPRS Radio Link Control Parameters</h2>
+ <div align="center">
+ <center>
+ <table border="1" cellpadding="2">
+ <!-- Text t3169 -->
+ <tr>
+ <td width="120" valign="middle" title="Wait for Reuse of USF and TFI after the mobile station
+uplink assignment is invalid.Defines when the current
+uplink assignment is surely invalid on the mobile station
+side so that the assigned USF(s) and TFI can be reused on
+the uplink. During that period the corresponding USF(s) is
+not broadcast.">
+ T3169
+ </td>
+ <td width="120" valign="middle" align="left" title="INTEGER (1..30)">
+ <input name="t3169" value="$%t3169#$" maxlength="2" size="4" onchange="return isValidInt(this,1,30);"></td>
+ </tr>
+
+ <!-- Text t3191 -->
+ <tr>
+ <td valign="middle" title="Wait for reuse of TFI after sending of the last RLC Data
+BlockDefines when the current assignment is surely invalid
+on the mobile station side so that the TFI can be reused.">
+ T3191
+ </td>
+ <td valign="middle" align="left" title="INTEGER (1..30)">
+ <input name="t3191" value="$%t3191#$" maxlength="2" size="4" onchange="return isValidInt(this,1,30);"></td>
+ </tr>
+
+ <!-- Text t3193 -->
+ <tr>
+ <td valign="middle" title="Wait for reuse of TFI after reception of the final Packet
+Downlink Ack/Nack from the mobile station.Defines when
+timer T3192 on the mobile station side has surely expired
+so that the TFI can be reused.">
+ T3193
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..65535)">
+ <input name="t3193" value="$%t3193#$" maxlength="5" size="5" onchange="return isValidInt(this,0,65535);"></td>
+ </tr>
+
+ <!-- Text t3195 -->
+ <tr>
+ <td valign="middle" title="Wait for reuse of TFI when there is no response from
+the MS (radio failure or cell change)Defines when the
+current assignment is surely invalid on the mobile
+station side so that the TFI can be reused.">
+ T3195
+ </td>
+ <td valign="middle" align="left" title="INTEGER (1..30)">
+ <input name="t3195" value="$%t3195#$" maxlength="2" size="4" onchange="return isValidInt(this,1,30);"></td>
+ </tr>
+
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table height="50" border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <p align="center">&nbsp;
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
+
diff --git a/data/mnet/GP10/Host/ViperWatch/gprs_interface_rss1.htm b/data/mnet/GP10/Host/ViperWatch/gprs_interface_rss1.htm
new file mode 100644
index 0000000..502182e
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/gprs_interface_rss1.htm
@@ -0,0 +1,305 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GPRS Radio Subsystem Link Control Parameters 1</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+
+
+<SCRIPT language="JavaScript">
+
+function PresetForm(theForm)
+{
+ // for TEXT elements
+ theForm.gprsMsTxpwrMaxCch.defaultValue = 30;
+ theForm.gprsRexLevAccessMin.defaultValue = 10;
+ theForm.gprsReselectOffset.defaultValue = 0;
+ theForm.lsaId.defaultValue = 0;
+ theForm.hcsThreshold.defaultValue = 0;
+ theForm.gprsPenaltyTime.defaultValue = 0;
+ theForm.gprsCellReselectHysteresis.defaultValue = 4;
+ theForm.alpha.defaultValue = 10;
+ theForm.pB.defaultValue = 0;
+
+
+ // for select element
+ selectOption(theForm.priorityClassSelect, theForm.priorityClass);
+ selectOption(theForm.gprsTemporaryOffsetSelect, theForm.gprsTemporaryOffset);
+ selectOption(theForm.gprsRaReselectHysteresisSelect,theForm.gprsRaReselectHysteresis);
+ selectOption(theForm.c32QualSelect, theForm.c32Qual);
+ selectOption(theForm.c31HysteresisSelect, theForm.c31Hysteresis);
+ selectOption(theForm.networkControlOrderSelect, theForm.networkControlOrder);
+
+
+ return true;
+}
+
+function ParseForm(theForm)
+{
+ if (isValidInt(theForm.gprsMsTxpwrMaxCch,0,31)==false)
+ return false;
+ if (isValidInt(theForm.gprsRexLevAccessMin,0,63)==false)
+ return false;
+ if (isValidInt(theForm.gprsReselectOffset,0,31)==false)
+ return false;
+ if (isValidInt(theForm.lsaId,0,65535)==false)
+ return false;
+ if (isValidInt(theForm.hcsThreshold,0,31)==false)
+ return false;
+ if (isValidInt(theForm.gprsPenaltyTime,0,31)==false)
+ return false;
+ if (isValidInt(theForm.gprsCellReselectHysteresis,0,7)==false)
+ return false;
+ if (isValidInt(theForm.alpha,0,10)==false)
+ return false;
+
+ // for select element
+ parseSelect(theForm.priorityClassSelect, theForm.priorityClass);
+ parseSelect(theForm.gprsTemporaryOffsetSelect, theForm.gprsTemporaryOffset);
+ parseSelect(theForm.gprsRaReselectHysteresisSelect, theForm.gprsRaReselectHysteresis);
+ parseSelect(theForm.c32QualSelect, theForm.c32Qual);
+ parseSelect(theForm.c31HysteresisSelect, theForm.c31Hysteresis);
+ parseSelect(theForm.networkControlOrderSelect, theForm.networkControlOrder);
+
+ return true;
+}
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="gprs_interface_rss1_package">
+
+ <!-- Begin of Hidden Elements -->
+ <input type="hidden" name="priorityClass" value="$%priorityClass#$">
+ <input type="hidden" name="gprsTemporaryOffset" value="$%gprsTemporaryOffset#$">
+ <input type="hidden" name="gprsRaReselectHysteresis" value="$%gprsRaReselectHysteresis#$">
+ <input type="hidden" name="c32Qual" value="$%c32Qual#$">
+ <input type="hidden" name="c31Hysteresis" value="$%c31Hysteresis#$">
+ <input type="hidden" name="networkControlOrder" value="$%networkControlOrder#$">
+ <!-- End of Hidden Elements -->
+
+ <div align="center">
+ <center>
+ <table width="670" border="4" bgcolor="#D6D3CE" >
+ <tr>
+ <td>
+ <h2 align="center">GPRS Radio Subsystem Link Control Parameters 1</h2>
+ <div align="center">
+ <center>
+ <table border="1" height="345" cellpadding="2">
+ <!-- Text gprsMsTxpwrMaxCch -->
+ <tr>
+ <td valign="middle" title="The maximum TX power level an MS may use when accessing the system.">
+ MS Tx Pwr Max CCH
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..31)">
+ <input maxlength="2" name="gprsMsTxpwrMaxCch" size="4" value="$%gprsMsTxpwrMaxCch#$" onchange="return isValidInt(this,0,31);">
+ </td>
+ </tr>
+ <!-- Text gprsRexLevAccessMin -->
+ <tr>
+ <td valign="middle" title="Minimum received signal level at the MS required for access to the system.">
+ Rex Lev Access Min
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..63)">
+ <input maxlength="2" name="gprsRexLevAccessMin" size="4" value="$%gprsRexLevAccessMin#$" onchange="return isValidInt(this,0,63);">
+ </td>
+ </tr>
+ <!-- Text gprsReselectOffset -->
+ <tr>
+ <td valign="middle" title="Applies an offset and hysteresis to the C32 re-selection criterion. -52, -48,... -12, -10,... 12, 16, ... 48">
+ Reselect Offset
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..31)">
+ <input maxlength="2" name="gprsReselectOffset" size="4" value="$%gprsReselectOffset#$" onchange="return isValidInt(this,0,31);">
+ </td>
+ </tr>
+ <!-- Select priorityClass -->
+ <tr>
+ <td valign="middle" title="The HCS Priority for the cells.">
+ Priority Class
+ </td>
+ <td valign="middle" align="left" nowrap>
+ <select name="priorityClassSelect" size="1">
+ <option selected value="0">Packet Access is not allowed in the cell.</option>
+ <option value="1">Spare, shall be interpreted as 0</option>
+ <option value="2">Spare, shall be interpreted as 0</option>
+ <option value="3">Packet access is allowed for priority level 1</option>
+ <option value="4">Packet access is allowed for priority level 1 to 2</option>
+ <option value="5">Packet access is allowed for priority level 1 to 3</option>
+ <option value="6">Packet access is allowed for priority level 1 to 4</option>
+ <option value="7">Spare, shall be interpreted as 6</option>
+ </select>
+ </td>
+ </tr>
+ <!-- Text lsaId -->
+ <tr>
+ <td valign="middle" title="The LSA Identities for the cell">
+ LSA Id
+ </td>
+ <td valign="middle" align="left" title="INTEGER(0..65535)">
+ <input maxlength="5" name="lsaId" size="6" value="$%lsaId#$" onchange="return isValidInt(this,0,65535);">
+ </td>
+ </tr>
+ <!-- Text hcsThreshold -->
+ <tr>
+ <td valign="middle" title="HCS signal level threshold -110, -108,..., -48">
+ HCS Threshold
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..31)">
+ <input maxlength="2" name="hcsThreshold" size="4" value="$%hcsThreshold#$" onchange="return isValidInt(this,0,31);">
+ </td>
+ </tr>
+ <!-- Select gprsTemporaryOffset -->
+ <tr>
+ <td valign="middle" title="Applies a negative offset to C32 for the duration of PENALTY_TIME. 0, 10,..., 60 dB, infinity">
+ Temporary Offset
+ </td>
+ <td valign="middle" align="left" nowrap>
+ <select name="gprsTemporaryOffsetSelect" size="1">
+ <option selected value="0">0 dB</option>
+ <option value="1">10 dB</option>
+ <option value="2">20 dB</option>
+ <option value="3">30 dB</option>
+ <option value="4">40 dB</option>
+ <option value="5">50 dB</option>
+ <option value="6">60 dB</option>
+ <option value="7">Infinity</option>
+ </select>
+ </td>
+ </tr>
+ <!-- Text gprsPenaltyTime -->
+ <tr>
+ <td valign="middle" title="Gives the duration for which the temporary offset is applied. 10, 20,..., 320 seconds">
+ Penalty Time
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..31)">
+ <input maxlength="2" name="gprsPenaltyTime" size="4" value="$%gprsPenaltyTime#$" onchange="return isValidInt(this,0,31);">
+ </td>
+ </tr>
+ <!-- Text gprsCellReselectHysteresis -->
+ <tr>
+ <td valign="middle" title="Additional hysteresis applied in Ready state for cells in the same RA. 0, 2,..., 14 dB">
+ Cell Reselect Hysteresis
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..7)">
+ <input maxlength="1" name="gprsCellReselectHysteresis" size="4" value="$%gprsCellReselectHysteresis#$" onchange="return isValidInt(this,0,7);">
+ </td>
+ </tr>
+ <!-- Select gprsRaReselectHysteresis -->
+ <tr>
+ <td valign="middle" title="Additional hysteresis applied for cells in different RAs. 0, 2,..., 14 dB">
+ RA Reselect Hysteresis
+ </td>
+ <td valign="middle" align="left" nowrap>
+ <select name="gprsRaReselectHysteresisSelect" size="1">
+ <option value="0">0 dB</option>
+ <option value="1">2 dB</option>
+ <option value="2">4 dB</option>
+ <option value="3">6 dB</option>
+ <option selected value="4">8 dB</option>
+ <option value="5">10 dB</option>
+ <option value="6">12 dB</option>
+ <option value="7">14 dB</option>
+ </select>
+ </td>
+ </tr>
+ <!-- Select c32Qual -->
+ <tr>
+ <td valign="middle" title="Flag indicating an exception rule for GPRS_RESELECT_OFFSET.">
+ C32 Qual
+ </td>
+ <td valign="middle" align="left" nowrap>
+ <select name="c32QualSelect" size="1">
+ <option selected value="0">Off</option>
+ <option value="1">On</option>
+ </select>
+ </td>
+
+ </tr>
+ <!-- Select c31Hysteresis -->
+ <tr>
+ <td valign="middle" title="Flag indicating if hysteresis shall be applied to C31.">
+ C31 Hysteresis
+ </td>
+ <td valign="middle" align="left" nowrap>
+ <select name="c31HysteresisSelect" size="1">
+ <option selected value="0">Off</option>
+ <option value="1">On</option>
+ </select>
+ </td>
+ </tr>
+ <!-- Text alpha -->
+ <tr>
+ <td valign="middle" title="This field is a binary representation of the paremeter for MS output Power control in units of 0.1">
+ Alpha
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..10)">
+ <input maxlength="2" name="alpha" size="4" value="$%alpha#$" onchange="return isValidInt(this,0,10);">
+ </td>
+ </tr>
+ <!-- Text pB -->
+ <tr>
+ <td valign="middle" title="Power reduction used by BTS on PBCCH blocks, relatively to the output power used on BCCH 0, -2,..., -30 dB">
+ Power Reduction on PBCCH
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..15)">
+ <input maxlength="2" name="pB" size="4" value="$%pB#$" onchange="return isValidInt(this,0,15);">
+ </td>
+ </tr>
+ <!-- Select networkControlOrder -->
+ <tr>
+ <td valign="middle" title="Controls cell re-selection and measurement reporting">
+ Network Control Order
+ </td>
+ <td valign="middle" align="left" nowrap>
+ <select name="networkControlOrderSelect" size="1">
+ <option value="0">NC0: MS controlled cell re-selection, no measurement reporting,</option>
+ <option selected value="1">NC1: MS controlled cell re-selection, MS sends measurement reports</option>
+ <option value="2">Network controlled cell re-selection, MS sends measurement reports</option>
+ <option value="3">Reserved for future use, interpreted as NC0 by mobile station.</option>
+ </select>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table height="50" border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <p align="center">&nbsp;
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
+
+
+
+
diff --git a/data/mnet/GP10/Host/ViperWatch/gprs_interface_rss2.htm b/data/mnet/GP10/Host/ViperWatch/gprs_interface_rss2.htm
new file mode 100644
index 0000000..10b24e8
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/gprs_interface_rss2.htm
@@ -0,0 +1,274 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GPRS Radio Subsystem Link Control Parameters 2</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+
+
+<SCRIPT language="JavaScript">
+
+function PresetForm(theForm)
+{
+ // for TEXT elements
+ theForm.intFrequency.defaultValue = 0;
+ theForm.nccPermitted.defaultValue = 0;
+ theForm.tavgW.defaultValue = 15;
+ theForm.tavgT.defaultValue = 5;
+ theForm.navgI.defaultValue = 4;
+ theForm.gprsMsTargetPower.defaultValue = 30;
+
+
+ // for select element
+ selectOption(theForm.ncReportingPeriodISelect, theForm.ncReportingPeriodI);
+ selectOption(theForm.ncReportingPeriodTSelect, theForm.ncReportingPeriodT);
+ selectOption(theForm.extMeasurementOrderSelect, theForm.extMeasurementOrder);
+ selectOption(theForm.extReportingPeriodSelect, theForm.extReportingPeriod);
+ selectOption(theForm.extReportingTypeSelect, theForm.extReportingType);
+ selectOption(theForm.pcMeasChanSelect, theForm.pcMeasChan);
+ selectOption(theForm.spgcCcchSupSelect, theForm.spgcCcchSup);
+
+ return true;
+}
+
+function ParseForm(theForm)
+{
+ // for select element
+ parseSelect(theForm.ncReportingPeriodISelect, theForm.ncReportingPeriodI);
+ parseSelect(theForm.ncReportingPeriodTSelect, theForm.ncReportingPeriodT);
+ parseSelect(theForm.extMeasurementOrderSelect, theForm.extMeasurementOrder);
+ parseSelect(theForm.extReportingPeriodSelect, theForm.extReportingPeriod);
+ parseSelect(theForm.extReportingTypeSelect, theForm.extReportingType);
+ parseSelect(theForm.pcMeasChanSelect, theForm.pcMeasChan);
+ parseSelect(theForm.spgcCcchSupSelect, theForm.spgcCcchSup);
+
+ return true;
+}
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="gprs_options_package">
+
+ <!-- Begin of Hidden Elements -->
+ <input type="hidden" name="ncReportingPeriodI" value="$%ncReportingPeriodI#$">
+ <input type="hidden" name="ncReportingPeriodT" value="$%ncReportingPeriodT#$">
+ <input type="hidden" name="extMeasurementOrder" value="$%extMeasurementOrder#$">
+ <input type="hidden" name="extReportingPeriod" value="$%extReportingPeriod#$">
+ <input type="hidden" name="extReportingType" value="$%extReportingType#$">
+ <input type="hidden" name="pcMeasChan" value="$%pcMeasChan#$">
+ <input type="hidden" name="spgcCcchSup" value="$%spgcCcchSup#$">
+ <!-- End of Hidden Elements -->
+
+ <div align="center">
+ <center>
+ <table width="590" border="4" bgcolor="#D6D3CE" >
+ <tr>
+ <td >
+ <h2 align="center">GPRS Radio Subsystem Link Control Parameters 2</h2>
+ <div align="center">
+ <center>
+ <table border="1" height="345" cellpadding="2">
+ <!-- Select ncReportingPeriodI -->
+ <tr>
+ <td valign="middle" title="Time period for measurement reporting 0.48, 0.96, 1.92, ..., 61.44 seconds">
+ NC Reporting Period I
+ </td>
+ <td valign="middle" align="left" nowrap>
+ <select name="ncReportingPeriodISelect" size="1">
+ <option selected value="0">0.48 Sec</option>
+ <option value="1">0.96 Sec</option>
+ <option value="2">1.92 Sec</option>
+ <option value="3">3.84 Sec</option>
+ <option value="4">7.68 Sec</option>
+ <option value="5">15.36 Sec</option>
+ <option value="6">30.72 Sec</option>
+ <option value="7">61.44 Sec</option>
+ </select>
+ </td>
+ </tr>
+ <!-- Select ncReportingPeriodT -->
+ <tr>
+ <td valign="middle" title="Time period for measurement reporting 0.48, 0.96, 1.92, ..., 61.44 seconds">
+ NC Reporting Period T
+ </td>
+ <td valign="middle" align="left" nowrap>
+ <select name="ncReportingPeriodTSelect" size="1">
+ <option selected value="0">0.48 Sec</option>
+ <option value="1">0.96 Sec</option>
+ <option value="2">1.92 Sec</option>
+ <option value="3">3.84 Sec</option>
+ <option value="4">7.68 Sec</option>
+ <option value="5">15.36 Sec</option>
+ <option value="6">30.72 Sec</option>
+ <option value="7">61.44 Sec</option>
+ </select>
+ </td>
+
+ </tr>
+ <!-- Select extMeasurementOrder -->
+ <tr>
+ <td valign="middle" title="Controls extended measurement reporting.">
+ Extended Measurement Order
+ </td>
+ <td valign="middle" align="left" nowrap>
+ <select name="extMeasurementOrderSelect" size="1">
+ <option selected value="0">0</option>
+ <option value="1">1</option>
+ <option value="2">2</option>
+ <option value="3">3</option>
+ </select>
+ </td>
+
+
+ </tr>
+ <!-- Select extReportingPeriod -->
+ <tr>
+ <td valign="middle" title="Time period for measurement reporting 60, 120, 240,..., 7680 seconds">
+ Extended Reporting Period
+ </td>
+ <td valign="middle" align="left" nowrap>
+ <select name="extReportingPeriodSelect" size="1">
+ <option selected value="0">60 Sec</option>
+ <option value="1">120 Sec</option>
+ <option value="2">240 Sec</option>
+ <option value="3">480 Sec</option>
+ <option value="4">960 Sec</option>
+ <option value="5">1920 Sec</option>
+ <option value="6">3840 Sec</option>
+ <option value="7">7280 Sec</option>
+ </select>
+ </td>
+ </tr>
+ <!-- Select extReportingType -->
+ <tr>
+ <td valign="middle" title="">
+ Extended Reporting Type
+ </td>
+ <td valign="middle" align="left" nowrap>
+ <select name="extReportingTypeSelect" size="1">
+ <option selected value="1">1</option>
+ <option value="2">2</option>
+ <option value="3">3</option>
+ </select>
+ </td>
+ </tr>
+ <!-- Text intFrequency -->
+ <tr>
+ <td valign="middle" title="Frequency for which the MS shall include interference measurements in extended measurement report type 3.">
+ Interference Frequency
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..31)">
+ <input maxlength="2" name="intFrequency" size="4" value="$%intFrequency#$" onchange="return isValidInt(this,0,31);">
+ </td>
+ </tr>
+ <!-- Text nccPermitted -->
+ <tr>
+ <td valign="middle" title="Bit map of NCC part of BSIC for which the MS shall report extended measurements.">
+ NCC Permitted
+ </td>
+ <td valign="middle" align="left" title="INTEGER(0..65535)">
+ <input maxlength="5" name="nccPermitted" size="6" value="$%nccPermitted#$" onchange="return isValidInt(this,0,65535);">
+ </td>
+ </tr>
+ <!-- Select pcMeasChan -->
+ <tr>
+ <td valign="middle" title="Flag that indicates whether the downlink measurements for power control shall be made on BCCH or PDCH.">
+ PC Measurement Channel
+ </td>
+ <td valign="middle" align="left" nowrap>
+ <select name="pcMeasChanSelect" size="1">
+ <option selected value="0">Off</option>
+ <option value="1">On</option>
+ </select>
+ </td>
+ </tr>
+ <!-- Text tavgW -->
+ <tr>
+ <td valign="middle" title="Signal level filter period for power control in packet idle mode2(k/2)/ 6 multiframes, k = 0,1,..., 25">
+ T Avg W
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..25)">
+ <input maxlength="2" name="tavgW" size="4" value="$%tavgW#$" onchange="return isValidInt(this,0,25);">
+ </td>
+ </tr>
+ <!-- Text tavgT -->
+ <tr>
+ <td valign="middle" title="Signal level filter period for power control in packet transfer mode2(k/2)/ 6 multiframes, k = 0,1,..., 25">
+ T Avg T
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..25)">
+ <input maxlength="2" name="tavgT" size="4" value="$%tavgT#$" onchange="return isValidInt(this,0,25);">
+ </td>
+ </tr>
+ <!-- Text navgI -->
+ <tr>
+ <td valign="middle" title="Interference signal level filter constant for power control 2(k/2), k = 0,1,..., 15">
+ N Avg I
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..15)">
+ <input maxlength="2" name="navgI" size="4" value="$%navgI#$" onchange="return isValidInt(this,0,15);">
+ </td>
+ </tr>
+ <!-- Text gprsMsTargetPower -->
+ <tr>
+ <td valign="middle" title="open loop power control is employed, telling the MS to assume a balanced link and adjust its transmitted power to meet the desired target at the GP. A target is send to the MS in the form of a power control value, gamma, which is computed based on MS_GPRS_TARGET_POWER using the formula in 05.08.">
+ GPRS MS Target Power
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..63)">
+ <input maxlength="2" name="gprsMsTargetPower" size="4" value="$%gprsMsTargetPower#$" onchange="return isValidInt(this,0,63);">
+ </td>
+ </tr>
+ <!-- Select spgcCcchSup -->
+ <tr>
+ <td valign="middle" title="This field indicates the support of the parameter SPLIT_PG_CYCLE on CCCH on the network side">
+ SPGC CCCH Support
+ </td>
+ <td valign="middle" align="left" nowrap>
+ <select name="spgcCcchSupSelect" size="1">
+ <option selected value="0">SPLIT_PG_CYCLE is not supported on CCCH in this cell</option>
+ <option value="1">SPLIT_PG_CYCLE is supported on CCCH in this cell</option>
+ </select>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table height="50" border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <p align="center">&nbsp;
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
+
+
+
diff --git a/data/mnet/GP10/Host/ViperWatch/gprs_interface_rss_freq_table.htm b/data/mnet/GP10/Host/ViperWatch/gprs_interface_rss_freq_table.htm
new file mode 100644
index 0000000..1d4f25c
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/gprs_interface_rss_freq_table.htm
@@ -0,0 +1,154 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GPRS Network Control Frequency Table Package</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+var noCols = 2;
+var index = 1;
+function displayIndex()
+{
+ document.write(" " + index++ + " ");
+}
+
+function PresetForm(theForm)
+{
+
+ for (var i = 0; i < 16; i++)
+ {
+ if(theForm.elements[(i+1)*noCols-1].value > 0)
+ {
+ theForm.elements[(i*noCols)].checked = true;
+ theForm.elements[(i*noCols)].defaultChecked = true;
+ }
+ ZeroOutRow(theForm.elements[(i*noCols)])
+ }
+ return true;
+}
+
+function validateRow(theForm, theIndex)
+{
+ if (theForm.elements[theIndex*noCols].checked)
+ {
+ if (theForm.elements[(theIndex*noCols)+1].value == 0)
+ {
+ if (!confirm("You are trying to save a frequency with a zero Network Control frequency at row " + Number(theIndex+1) + ".\n Though zero is a legitimate frequency it should be used sparingly.\n Are you sure you want to save this parameter."))
+ {
+ theForm.elements[(theIndex*noCols)+1].focus();
+ return false;
+ } else {
+ return true;
+ }
+
+ }
+ }
+ return true;
+}
+
+
+function ParseForm(theForm)
+{
+ for (var i = 0; i < 16; i++)
+ {
+ if (!validateRow(theForm, i))
+ return false;
+ }
+ return true;
+}
+
+function ZeroOutRow(theCheck)
+{
+ var theIndex = Number(theCheck.value);
+ if (theCheck.checked)
+ {
+ ;
+ } else {
+ for (var i = 1; i < noCols; i++)
+ {
+ theCheck.form.elements[(theIndex*noCols)+i].value = 0;
+ }
+ }
+ return true;
+}
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="ncfrequency">
+
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="520">
+ <tr>
+ <td >
+ <h2 align="center">GPRS Network Control Frequency Table</h2>
+ <div align="center">
+ <table border="1" cellpadding="2">
+ <tr>
+ <th width="42" height="22" align="center" >
+ <p align="center">Index</th>
+ <th width="51" height="22" align="center" >
+ <p align="center">Selected</th>
+ <th width="107" height="22" align="center" >
+ <p align="center">Frequency</th>
+ </tr>
+
+ <!$%createTable(ncFrequencyListIndex,*,,,,,ncFrequencyListIndex,ncFrequency)#$>
+ <!$%REPEAT(ncFrequencyListIndex,1,16)#$>
+ <tr>
+ <td width="42" align="center"><font face="Arial, Helvetica"><script> displayIndex() </script></font></td>
+ <td width="51" align="center">
+ <p align="center">
+ <input type="checkbox" name="used.$%getInstance(ncFrequencyListIndex)#$" value="$%getInstance(ncFrequencyListIndex)#$" onClick="ZeroOutRow(this);">
+ </p>
+ </td>
+ <td width="107" align="center">
+ <p align="center"><input type="text" name="ncFrequency.$%getInstance(ncFrequencyListIndex)#$"
+ value="$%ncFrequency#$" size="4" maxlength="4" onchange="return isValidInt(this,0,1023);"></p>
+ </td>
+ </tr>
+ <!$%endRow(ncFrequencyListIndex)#$>
+ <!$%REPEAT(END)#$>
+ <!$%endTable(ncFrequencyListIndex)#$>
+
+
+ </table>
+ </div>
+ <div align="center">
+ <center>
+ <table height="50" border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </center>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p align="center">&nbsp;</p>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/gprs_measurement_package.htm b/data/mnet/GP10/Host/ViperWatch/gprs_measurement_package.htm
new file mode 100644
index 0000000..10f1f94
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/gprs_measurement_package.htm
@@ -0,0 +1,152 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GPRS Measurement Package</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/common.js"></SCRIPT>
+
+
+<script language="JavaScript">
+
+function PresetForm(theForm)
+{
+}
+
+function ParseForm(theForm)
+{
+}
+</script>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" name="gprs_measurements">
+
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="630">
+ <tr>
+ <td valign="middle">
+ <h2 align="center">GPRS Measurement Package</h2>
+ <div align="center">
+ <center>
+ <table border="0">
+ <tr>
+ <td align="left">
+ <p align="left"><b> Start Time:</b></td>
+ <td>
+ <i>
+ <script> displayTime("$%meanPacketQueueLength#$") </script>
+ </i>
+ </td>
+ </tr>
+ <tr>
+ <td align="left"><b>Duration:</b></td>
+ <td><i>Last Completed 15-Minute Measurement Interval</i></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table border="1" cellspacing="0" cellpadding="0" width="90%">
+ <tr>
+ <th valign="middle" align="left" width="80%" nowrap>Parameters</th>
+ <th valign="middle" align="left" width="17%" >Value</th>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Total number of flush request messages:</td>
+ <td valign="middle" align="left" width="17%" >$%flushReqRecvd#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Total number of PAGING messages:</td>
+ <td valign="middle" align="left" width="17%" >$%pagingReqRecvd#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Mean time interval between consecutive mobile <br>
+ originating packet channel access request:</td>
+ <td valign="middle" align="left" width="17%" >$%meanPsInterArrivalTime#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Current number of available PDCHs:</td>
+ <td valign="middle" align="left" width="17%" >$%availablePdch#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Mean number of available PDCHs:</td>
+ <td valign="middle" align="left" width="17%" >$%meanAvailablePdch#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Maximum number of available PDCHs:</td>
+ <td valign="middle" align="left" width="17%" >$%maxAvailablePdch#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Minimum number of available PDCHs:</td>
+ <td valign="middle" align="left" width="17%" >$%minAvailablePdch#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Mean number of occupied PDCHs:</td>
+ <td valign="middle" align="left" width="17%" >$%meanOccupiedPdch#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Highest recorded number of occupied PDCHs:</td>
+ <td valign="middle" align="left" width="17%" >$%maxOccupiedPdch#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Lowest recorded number of occupied PDCHs:</td>
+ <td valign="middle" align="left" width="17%" >$%minOccupiedPdch#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Total amount of time in the granularity period of PDCH:</td>
+ <td valign="middle" align="left" width="17%" >$%availablePdchAllocTime#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Number of Paging messages transmitted over PCCCH:</td>
+ <td valign="middle" align="left" width="17%" >$%packetPagingMessages#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Mean of PPCH-PAGCH queue length:</td>
+ <td valign="middle" align="left" width="17%" >$%pagchQueueLength#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Number of discarded Paging messages:</td>
+ <td valign="middle" align="left" width="17%" >$%pagesDiscardedFromPpch#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Number of channel assignment request:</td>
+ <td valign="middle" align="left" width="17%" >$%assignmentRequest#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Successful number of channel assignment request:</td>
+ <td valign="middle" align="left" width="17%" >$%succAssignmentProc#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Successful number of PDTCH seizures:</td>
+ <td valign="middle" align="left" width="17%" >$%succPdtchSeizures#$</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left" width="80%" nowrap>Number of service upgrades and downgrades:</td>
+ <td valign="middle" align="left" width="17%" >$%serviceChanges#$</td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table height="50" border="0" cellpadding="3">
+ <tr>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </td>
+ </tr>
+ </table>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/gprs_options_package.htm b/data/mnet/GP10/Host/ViperWatch/gprs_options_package.htm
new file mode 100644
index 0000000..b5f273f
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/gprs_options_package.htm
@@ -0,0 +1,297 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GPRS Option Package</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+
+
+
+<SCRIPT language="JavaScript">
+
+function PresetForm(theForm)
+{
+ // for TEXT elements
+ theForm.t3168.defaultValue = 4;
+ theForm.bsCvMax.defaultValue = 7;
+ theForm.panDec.defaultValue = 1;
+ theForm.panInc.defaultValue = 1;
+ theForm.raColour.defaultValue = 0;
+ theForm.cbchTrxSlot.defaultValue = 0;
+ theForm.siChangeField.defaultValue = 0;
+
+ // for select element
+ selectOption(theForm.nmoSelect, theForm.nmo);
+ selectOption(theForm.t3192Select, theForm.t3192);
+ selectOption(theForm.drxTimerMaxSelect, theForm.drxTimerMax);
+ selectOption(theForm.accessBurstTypeSelect,theForm.accessBurstType);
+ selectOption(theForm.controlAckTypeSelect,theForm.controlAckType);
+ selectOption(theForm.panMaxSelect, theForm.panMax);
+ selectOption(theForm.si13PositionSelect, theForm.si13Position);
+ selectOption(theForm.cbchTrxSelect, theForm.cbchTrx);
+ selectOption(theForm.bcchChangeMarkSelect,theForm.bcchChangeMark);
+
+ return true;
+}
+
+function ParseForm(theForm)
+{
+ // for select element
+ parseSelect(theForm.nmoSelect, theForm.nmo);
+ parseSelect(theForm.t3192Select, theForm.t3192);
+ parseSelect(theForm.drxTimerMaxSelect, theForm.drxTimerMax);
+ parseSelect(theForm.accessBurstTypeSelect,theForm.accessBurstType);
+ parseSelect(theForm.controlAckTypeSelect, theForm.controlAckType);
+ parseSelect(theForm.panMaxSelect, theForm.panMax);
+ parseSelect(theForm.si13PositionSelect, theForm.si13Position);
+ parseSelect(theForm.cbchTrxSelect, theForm.cbchTrx);
+ parseSelect(theForm.bcchChangeMarkSelect, theForm.bcchChangeMark);
+
+ return true;
+}
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="gprs_options_package">
+
+
+ <input type="hidden" name="nmo" value="$%nmo#$">
+ <input type="hidden" name="t3192" value="$%t3192#$">
+ <input type="hidden" name="drxTimerMax" value="$%drxTimerMax#$">
+ <input type="hidden" name="accessBurstType" value="$%accessBurstType#$">
+ <input type="hidden" name="controlAckType" value="$controlAckType%#$">
+ <input type="hidden" name="panMax" value="$%panMax#$">
+ <input type="hidden" name="si13Position" value="$%si13Position#$">
+ <input type="hidden" name="cbchTrx" value="$%cbchTrx#$">
+ <input type="hidden" name="bcchChangeMark" value="$%bcchChangeMark#$">
+
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="440">
+ <tr>
+ <td >
+ <h2 align="center">GPRS Option Package</h2>
+ <div align="center">
+ <center>
+ <table border="1" height="345" cellpadding="2">
+ <!-- Select nmo -->
+ <tr>
+ <td valign="middle" title="The maximum TX power level an MS may use when accessing the system.">
+ NMO
+ </td>
+ <td valign="middle" align="left" nowrap><select name="nmoSelect" size="1">
+ <option value="0">0</option>
+ <option selected value="1">1</option>
+ <option value="2">2</option>
+ <option value="3">3</option>
+ </select></td>
+ </tr>
+ <!-- Text t3168 -->
+ <tr>
+ <td valign="middle" title="TimeOut value for t3168, The timeout value is given as the value plus one, in units of 500 msecs.">
+ T3168 (500mS unit)
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..7) 500mS Unit">
+ <input maxlength="1" name="t3168" size="2" value="$%t3168#$" onchange="return isValidInt(this,0,7);"></td>
+ </tr>
+ <!-- Select t3192 -->
+ <tr>
+ <td valign="middle" title="TimeOut value for t3192, The timeout values are 500, 1000, 1500, 0, 80, 120, 160, 200. In case of 0 msec the timer is not started.">
+ T3192
+ </td>
+ <td valign="middle" align="left" nowrap><select name="t3192Select" size="1">
+ <option value="0">500</option>
+ <option value="1">1000</option>
+ <option value="2">1500</option>
+ <option selected value="3">0</option>
+ <option value="4">80</option>
+ <option value="5">120</option>
+ <option value="6">160</option>
+ <option value="7">200</option>
+ </select></td>
+ </tr>
+ <!-- Select drxTimerMax -->
+ <tr>
+ <td valign="middle" title="The field is a binary representation of the parameter DRX_TIMER_MAX. The parameter value is given as two taken to the power of the binary value minus one (2^n - 1).i.e. 0,1,2,4,8,16,32,64 secs">
+ Drx Timer Max
+ </td>
+ <td valign="middle" align="left" nowrap><select name="drxTimerMaxSelect" size="1">
+ <option value="0">0 Sec</option>
+ <option value="1">1 Sec</option>
+ <option value="2">2 Sec</option>
+ <option value="3">4 Sec</option>
+ <option value="4">8 Sec</option>
+ <option value="5">16 Sec</option>
+ <option value="6">32 Sec</option>
+ <option selected value="7">64 Sec</option>
+ </select></td>
+ </tr>
+ <!-- Select accessBurstType -->
+ <tr>
+ <td valign="middle" title="Indicates if 8 or 11 bit access burst shall be used on PRACH, PTCCH/U and in the PACKET CONTROL ACKNOWLEDGEMENT message when the format is four access bursts.
+0 - 8 bit access burst shall be used
+1 - 11 bit access burst shall be used.">
+ Access Burst Type
+ </td>
+ <td valign="middle" align="left" nowrap><select name="accessBurstTypeSelect" size="1">
+ <option selected value="0">8 bit access burst shall be used</option>
+ <option value="1">11 bit access burst shall be used</option>
+ </select></td>
+ </tr>
+ <!-- Select controlAckType -->
+ <tr>
+ <td valign="middle" title="Represents the default format of the PACKET CONTROL ACKNOWLEDGEMENT message.
+0 - format is four access bursts
+1 - format is RLC/MAC control block.">
+ Control Ack Type
+ </td>
+ <td valign="middle" align="left" nowrap><select name="controlAckTypeSelect" size="1">
+ <option selected value="0">Format is four access bursts</option>
+ <option value="1">Format is RLC/MAC control block</option>
+ </select></td>
+ </tr>
+ <!-- Text bsCvMax -->
+ <tr>
+ <td valign="middle" title="Represents the parameter BS_CV_MAX. The value BS_CV_MAX = 0 shall be interpreted as value BS_CV_MAX=1 for claculation of T3198, T3200 and N3104max Values.">
+ Bs Cv Max
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..15)">
+ <input maxlength="2" name="bsCvMax" size="2" value="$%bsCvMax#$" onchange="return isValidInt(this,0,15);"></td>
+ </tr>
+ <!-- Text panDec -->
+ <tr>
+ <td valign="middle" title="Represents the parameter PAN_DEC.">
+ Pan Dec
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..7)">
+ <input maxlength="1" name="panDec" size="2" value="$%panDec#$" onchange="return isValidInt(this,0,7);"></td>
+ </tr>
+ <!-- Text panInc -->
+ <tr>
+ <td valign="middle" title="Represents the parameter PAN_INC.">
+ Pan Inc
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..7)">
+ <input maxlength="1" name="panInc" size="2" value="$%panInc#$" onchange="return isValidInt(this,0,7);"></td>
+ </tr>
+ <!-- Select panMax -->
+ <tr>
+ <td valign="middle" title="Represents the maximum value allowed for counter N3102.
+0 - 4
+1 - 8
+2 - 12
+3 - 16
+4 - 20
+5 - 24
+6 - 28
+7 - 32.">
+ Pan Max
+ </td>
+ <td valign="middle" align="left" nowrap><select name="panMaxSelect" size="1">
+ <option value="0">4</option>
+ <option value="1">8</option>
+ <option value="2">12</option>
+ <option value="3">16</option>
+ <option selected value="4">20</option>
+ <option value="5">24</option>
+ <option value="6">28</option>
+ <option value="7">32</option>
+ </select></td>
+ </tr>
+ <!-- Text raColour -->
+ <tr>
+ <td valign="middle" title="If the mobile station receives different values of the RA COLOUR field in different cell, the mobile station shall interpret the cell re-selection information as if the two cells belong to different routing areas.">
+ RA Colour
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..7)">
+ <input maxlength="1" name="raColour" size="2" value="$%raColour#$" onchange="return isValidInt(this,0,7);"></td>
+ </tr>
+ <!-- Select si13Position -->
+ <tr>
+ <td valign="middle" title="The SI13 POSITION indicates the minimum schedule for where the SYSTEM INFORMATION TYPE 13 message is sent on BCCH.">
+ SI13 Position
+ </td>
+ <td valign="middle" align="left" nowrap><select name="si13PositionSelect" size="1">
+ <option selected value="0">0</option>
+ <option value="1">1</option>
+ </select></td>
+ </tr>
+ <!-- Text cbchTrxSlot -->
+ <tr>
+ <td valign="middle" title="This value indicates the Timeslot Number for TN field of SI4 message">
+ CBCH Trx Slot
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..7)">
+ <input maxlength="1" name="cbchTrxSlot" size="2" value="$%cbchTrxSlot#$" onchange="return isValidInt(this,0,7);"></td>
+ </tr>
+ <!-- Select cbchTrx -->
+ <tr>
+ <td valign="middle" title="This value means the logical number for carrier frequency. The ARFCN field of SI4 message is coded as binary representation of the absolute RF channel number by this value.">
+ CBCH Trx
+ </td>
+ <td valign="middle" align="left" nowrap><select name="cbchTrxSelect" size="1">
+ <option selected value="0">0</option>
+ <option value="1">1</option>
+ </select></td>
+ </tr>
+ <!-- Select bcchChangeMark -->
+ <tr>
+ <td valign="middle" title="This value indicates the status of the information on BCCH. This value shall be changed each time the information on BCCH, except for the contents of the SI-13 message, is changed.">
+ BCCH Change Mark
+ </td>
+ <td valign="middle" align="left" nowrap><select name="bcchChangeMarkSelect" size="1">
+ <option selected value="0">0</option>
+ <option value="1">1</option>
+ <option value="2">2</option>
+ <option value="3">3</option>
+ </select></td>
+ </tr>
+ <!-- Text siChangeField -->
+ <tr>
+ <td valign="middle" title="This value means the representation of which information was changed at the last indication in BCCH_CHANGE_MARK.">
+ SI Change Field
+ </td>
+ <td valign="middle" align="left" title="INTEGER (0..15)">
+ <input maxlength="2" name="siChangeField" size="2" value="$%siChangeField#$" onchange="return isValidInt(this,0,15);"></td>
+ </tr>
+
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table height="50" border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <p align="center">&nbsp;
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
+
diff --git a/data/mnet/GP10/Host/ViperWatch/gprs_overview.htm b/data/mnet/GP10/Host/ViperWatch/gprs_overview.htm
new file mode 100644
index 0000000..1beffbd
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/gprs_overview.htm
@@ -0,0 +1,38 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GP10 GPRS MIB</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/link.js"></SCRIPT>
+
+<body onload="$%reloadTopframe#$">
+
+<h1 align="center">GP10 GPRS MIB</h1>
+<p>GP10 GPRS MIB Consists of following MIB Packages:</p>
+<ul>
+ <li><nobr><a href="gprs_basic_package.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="GP10 basic parameters to support GPRS">GPRS Basic Parameters</a></nobr></li>
+ <li><nobr><a href="gprs_options_package.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="GP10 cell option parameters to support GPRS">GPRS Option Parameters</a></nobr></li>
+ <li><nobr><a href="gprs_interface_overview.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="GP10 Interface parameters to support GPRS">GPRS Interface Parameters</a></nobr></li>
+ <li><nobr><a href="gprs_measurement_package.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="GP10 measurement parameters">GPRS Measurement Parameters</a></nobr></li>
+</ul>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/gprs_rss_overview.htm b/data/mnet/GP10/Host/ViperWatch/gprs_rss_overview.htm
new file mode 100644
index 0000000..812a8b5
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/gprs_rss_overview.htm
@@ -0,0 +1,34 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GPRS Radio Subsystem Link Control MIB</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/link.js"></SCRIPT>
+
+<body onload="$%reloadTopframe#$">
+
+<h1 align="center">GPRS Radio Subsystem Link Control Parameters</h1>
+<p>GPRS Radio Subsystem Link Control MIB Consists of following Parameters:</p>
+<ul>
+ <li><nobr><a href="gprs_interface_rss1.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="GPRS Radio Subsystem Parameter 1">GPRS Radio Subsystem Parameters Group 1</a></nobr></li>
+ <li><nobr><a href="gprs_interface_rss2.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="GPRS Radio Subsystem Parameter 2">GPRS Radio Subsystem Parameters Group 2</a></nobr></li>
+ <li><nobr><a href="gprs_interface_rss_freq_table.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="GPRS Network Control Frequency Table">GPRS Network Control Frequency Table</a></nobr></li>
+</ul>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/gps_card.htm b/data/mnet/GP10/Host/ViperWatch/gps_card.htm
new file mode 100644
index 0000000..db99e56
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/gps_card.htm
@@ -0,0 +1,111 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GPS Card Parameters</title>
+</head>
+
+<SCRIPT >
+
+
+
+function PresetForm(theForm)
+{
+
+ return true;
+}
+
+function ParseForm(theForm)
+{
+ return true;
+}
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="gps_card">
+
+ <input type="hidden" name="gpsSatelliteStatus" value="$%gpsSatelliteStatus#$"><input type="hidden" name="gpsCardStatus"
+ value="$%gpsCardStatusSelect#$">
+ <p align="center">&nbsp;</p>
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="437">
+ <tr>
+ <td width="499">
+ <h2 align="center">GPS Card</h2>
+ <div align="center">
+ <table border="1" width="90%">
+ <tr>
+ <td height="1" width="184"><font color="#000000">Type</font></td>
+ <td height="1" width="223">
+ <p style="padding-top: 0px; padding-bottom: 0px">$%gpsCardType#$ </td>
+ </tr>
+ <tr>
+ <td height="22" width="184"><font color="#000000">Software Version</font></td>
+ <td height="22" width="223">$%gpsCardSoftwareVersion#$&nbsp; </td>
+ </tr>
+ <tr>
+ <td height="24" width="184"><font color="#000000">Current Status</font></td>
+ <td height="24" width="223">$%gpsCardStatus#$ </td>
+ </tr>
+ <tr>
+ <td height="23" width="184"><font color="#000000">Position</font></td>
+ <td height="23" width="223">$%gpsPosition#$&nbsp;&nbsp; </td>
+ </tr>
+ <tr>
+ <td height="23" width="184"><font color="#000000">GPS Time</font></td>
+ <td height="23" width="223">
+ <p style="padding-top: 0px; padding-bottom: 0px">$%gpsTime#$ &nbsp;</td>
+ </tr>
+ <tr>
+ <td height="23" width="184"><font color="#000000">UTC Time</font></td>
+ <td height="23" width="223">$%utcTime#$ &nbsp;</td>
+ </tr>
+ <tr>
+ <td height="23" width="184"><font color="#000000">Clock Status Frequency Error</font></td>
+ <td height="23" width="223">$%clockStatusFrequencyError#$ </td>
+ </tr>
+ <tr>
+ <td height="23" width="184"><font color="#000000">Clock Status DAC Voltage</font></td>
+ <td height="23" width="223">$%clockStatusDACVoltage#$ </td>
+ </tr>
+ <tr>
+ <td height="23" width="184"><font color="#000000">Antenna Status</font></td>
+ <td height="23" width="223">$%gpsAntennaStatus#$ </td>
+ </tr>
+ <tr>
+ <td height="23" width="184"><font color="#000000">Satellite Status</font></td>
+ <td height="23" width="223">$%gpsSatelliteStatus#$ </td>
+ </tr>
+ </table>
+ </div>
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change." disabled></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/h323_parameters.htm b/data/mnet/GP10/Host/ViperWatch/h323_parameters.htm
new file mode 100644
index 0000000..a7d8cb9
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/h323_parameters.htm
@@ -0,0 +1,115 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GP10 Voip Parameters</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/ip.js"></SCRIPT>
+
+
+<SCRIPT >
+
+function PresetForm(theForm)
+{
+ cvtIntToBCD(theForm.h323_t35CountryCode, 3);
+ theForm.h323_t35CountryCode.defaultValue = theForm.h323_t35CountryCode.value;
+ return true;
+}
+
+function ParseForm(theForm)
+{
+ return validateIp(theForm.h323_GKIPAddress, "GMC IP Address");
+
+}
+
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" onsubmit="return ParseForm(this);" name="h323Mib">
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="446">
+ <tr>
+ <td width="430">
+ <h2 align="center">GP10 VoIP Parameters</h2>
+ <div align="center">
+ <table border="1" width="94%">
+ <tr>
+ <td width="100%">&nbsp;
+ <div align="center">
+ <table border="0" width="90%">
+ <tr>
+ <td><font face="Times New Roman">GMC Port</font></td>
+ <td><input type="text" name="h323_GKPort" size="5" maxlenght="5" value="$%h323_GKPort#$"
+ onchange="isValidInt(this,0,65535);"></td>
+ </tr>
+ <tr>
+ <td><font face="Times New Roman">GMC IP Address</font></td>
+ <td><input type="text" name="h323_GKIPAddress" size="15" maxlength="15" value="$%h323_GKIPAddress#$"></td>
+ </tr>
+ <tr>
+ <td>
+ <p style="padding-top: 0px; padding-bottom: 0px"><font face="Times New Roman">Call
+ Signaling Port</font></td>
+ <td>
+ <p style="padding-top: 0px; padding-bottom: 0px" align="left"><input type="text" name="h323_Q931CallSignalingPort"
+ size="5" maxlength="5" value="$%h323_Q931CallSignalingPort#$" onchange="isValidInt(this,0,65535);"></td>
+ </tr>
+ <tr>
+ <td>T35 Country Code</td>
+ <td>
+ <p align="left"><font face="Times New Roman"><input type="text" name="h323_t35CountryCode" size="3"
+ value="$%h323_t35CountryCode#$" maxlength="3" onchange="isValidInt(this,0,999);cvtIntToBCD(this,3)"></font></p>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+ <table border="0" width="90%">
+ <tr>
+ <td width="100%"><blink><font size="1" color="#0000FF"><br>
+ Note: Changes made&nbsp;
+ on this page&nbsp; will not be effective until the next reboot&nbsp;
+ of&nbsp; the GP10.</font>
+ </td>
+ </tr>
+ </table>
+ <blink>
+ </div>
+ <center>
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/handover_control_mgmt_overview.htm b/data/mnet/GP10/Host/ViperWatch/handover_control_mgmt_overview.htm
new file mode 100644
index 0000000..b7f970e
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/handover_control_mgmt_overview.htm
@@ -0,0 +1,70 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>New Page 1</title>
+</head>
+
+<body onload="$%reloadTopframe#$">
+
+<SCRIPT language="JavaScript" src="./js/link.js"></SCRIPT>
+
+<h2><nobr>GP10 Specific MIB</nobr></h2>
+<p>GP10 Specific&nbsp; section of the MIB consists of the following:</p>
+<ul>
+ <li><nobr><a href="dual_trx_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Dual TRX Card Related Parameters">Dual TRX Card</a></nobr></li>
+ <li><nobr><a href="arfcn_rssi_function.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="ARFCN RSS Fuction">AR</a><a
+ href="arfcn_rssi_function.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="ARFCN RSS Fuction">FCN RSS Function</a></nobr></li>
+ <li><nobr><a href="clock_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Clock Card Related Parameters">Clock Card</a></nobr></li>
+ <li><nobr><a href="gps_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="GPS Card Related Parameters">GPS Card</a></nobr></li>
+ <li><nobr><a href="power_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Power Card Related Parameters">Power Card</a></nobr></li>
+ <li><nobr><a href="external_power_supply.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="External Power Supply Related Parameters">External Power Supply</a></nobr></li>
+ <li><nobr><a href="cdc_board.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="CDC Board Specific Parameters">CDC Board</a></nobr></li>
+</ul>
+<ul>
+ <li><nobr><a href="automatic_parameter_allocation.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Automatic Parameter Allocation Parameters">Automatic Parameter
+ Allocation</a></nobr></li>
+ <li><nobr><a href="apa_invalid_frequency_table.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Automatic Parameter Allocation Invalid Frequencies">Automatic Parameter
+ Allocation&nbsp; Invalid Frequencies</a></nobr></li>
+ <li><nobr><a href="apa_clock_source_frequency_table.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title=" Automatic Parameter Allocation Source Frequencies">Automatic
+ Parameter Allocation Clock Source Frequencies</a><img height="1"
+ src="filler.gif" width="0"></nobr></li>
+</ul>
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/handover_control_package.htm b/data/mnet/GP10/Host/ViperWatch/handover_control_package.htm
new file mode 100644
index 0000000..83a64fd
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/handover_control_package.htm
@@ -0,0 +1,175 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Handover Control Package</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+
+function PresetForm(theForm)
+{
+
+ return true;
+}
+
+function ParseForm(theForm)
+{
+
+ return true;
+}
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="power_control">
+
+ <input name="adjCell_synchronized.$%getInstance(adjCell_handoverIndex)#$" type="hidden" value="$%adjCell_synchronized#$">
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="646">
+ <tr>
+ <td width="630">
+ <h2 align="center">Handover Control Options</h2>
+ <table border="0" width="100%">
+ <tr>
+ <td width="50%">
+ </td>
+ <td valign="top">
+ </td>
+ </tr>
+ <tr>
+ <td width="50%">
+ <table border="1" cellspacing="1" width="308">
+ <tr>
+ <th colspan="2" width="298">
+ <p align="center"><b>Handover Threshold Signal Strength</b></th>
+ </tr>
+ <tr>
+ <td width="248">Threshold level for handover due to uplink strength</td>
+ <td width="44"
+ title="RxLev ::= INTEGER (0..63)
+-- 0 : &lt; -110 dB,
+-- 1 : -110 dB .. -109 dB
+-- 2 : -109 dB .. -108 dB
+--
+-- 63: &gt; -48 dB
+-- Ref. GSM 05.08 (RXLEV)"><input type="text" name="hoThresholdLevParamRxLevelUL" size="2" value="$%hoThresholdLevParamRxLevelUL#$" maxlength="2"
+ onchange="isValidInt(this,0,63);"></td>
+ </tr>
+ <tr>
+ <td width="248">Threshold level for handover due to downlink
+ strength</td>
+ <td width="44"
+ title="RxLev ::= INTEGER (0..63)
+-- 0 : &lt; -110 dB,
+-- 1 : -110 dB .. -109 dB
+-- 2 : -109 dB .. -108 dB
+--
+-- 63: &gt; -48 dB
+-- Ref. GSM 05.08 (RXLEV)"><input type="text" name="hoThresholdLevParamRxLevelDL" size="2" value="$%hoThresholdLevParamRxLevelDL#$" maxlength="2"
+ onchange="isValidInt(this,0,63);"></td>
+ </tr>
+ <tr>
+ <td width="248" title="The number of averages that have to be taken into account, when making a handover decision (N5).">N5</td>
+ <td width="44" title="INTEGER (1..31)"><input type="text" name="hoThresholdLevParamNx" size="2" value="$%hoThresholdLevParamNx#$"
+ maxlength="2" onchange="isValidInt(this,1,31);"></td>
+ </tr>
+ <tr>
+ <td width="248"
+ title="The number of averages (out of total averages) that have to be upper/lower than the threshold, before making a handover decision (P5).">P5</td>
+ <td width="44" title="INTEGER (1..31)"><input type="text" name="hoThresholdLevParamPx" size="2" value="$%hoThresholdLevParamPx#$"
+ maxlength="2" onchange="isValidInt(this,1,31);"></td>
+ </tr>
+ </table>
+ </td>
+ <td width="50%">
+ <table border="1" cellspacing="1" width="311">
+ <tr>
+ <th colspan="2" height="19" width="301">
+ <p align="center"><b>Handover&nbsp; Threshold Signal Quality</b></th>
+ </tr>
+ <tr>
+ <td height="21" width="256">Threshold level for handover due to uplink quality&nbsp;</td>
+ <td height="21"
+ title="RxQual ::= INTEGER (0..7)
+-- 0: less than 0.2%
+-- 1: 0.2% to 0.4%
+-- 2: 0.4% to 0.8%
+-- 3: 0.8% to 1.6%
+-- 4: 1.6% to 3.2%
+-- 5: 3.2% to 6.4%
+-- 6: 6.4% to 12.8%
+-- 7: greater than 12.8%" width="39"><input type="text" name="hoThresholdQualParamRxQualUL" size="1" value="$%hoThresholdQualParamRxQualUL#$"
+ maxlength="1" onchange="isValidInt(this,0,7)"></td>
+ </tr>
+ <tr>
+ <td height="23" width="256">Threshold level for handover due to
+ downlink quality</td>
+ <td height="23"
+ title="RxQual ::= INTEGER (0..7)
+-- 0: less than 0.2%
+-- 1: 0.2% to 0.4%
+-- 2: 0.4% to 0.8%
+-- 3: 0.8% to 1.6%
+-- 4: 1.6% to 3.2%
+-- 5: 3.2% to 6.4%
+-- 6: 6.4% to 12.8%
+-- 7: greater than 12.8%" width="39"><input type="text" name="hoThresholdQualParamRxQualDL" size="1" value="$%hoThresholdQualParamRxQualDL#$"
+ maxlength="1" onchange="isValidInt(this,0,7)"></td>
+ </tr>
+ <tr>
+ <td height="23" width="256" title="The number of averages that have to be taken into account, when making a handover decision (N6).">N6</td>
+ <td height="23" width="39" title="INTEGER (1..31)"><input type="text" name="hoThresholdQualParamNx" size="2"
+ value="$%hoThresholdQualParamNx#$" maxlength="2" onchange="isValidInt(this,1,31)"></td>
+ </tr>
+ <tr>
+ <td height="23" width="256"
+ title="The number of averages (out of total averages) that have to be upper/lower than the threshold, before making a handover decision (P6).">P6</td>
+ <td height="23" width="39" title="INTEGER (1..31)"><input type="text" name="hoThresholdQualParamPx" size="2"
+ value="$%hoThresholdQualParamPx#$" maxlength="2" onchange="isValidInt(this,1,31)"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td width="50%"></td>
+ <td width="50%"></td>
+ </tr>
+ </table>
+ <div align="center">
+ <center>
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </center>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p align="center">&nbsp;</p>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/handover_timer.htm b/data/mnet/GP10/Host/ViperWatch/handover_timer.htm
new file mode 100644
index 0000000..5a24a66
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/handover_timer.htm
@@ -0,0 +1,119 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Handover Timer</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+
+function ParseForm(theForm)
+{
+ return true;
+}
+
+function PresetForm(theForm)
+{
+ return true;
+}
+
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="handover_timer">
+
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="352">
+ <tr>
+ <td width="473">
+ <h2 align="center">Handover Timers</h2>
+ <div align="center">
+ <center>
+ <table border="1" width="273">
+ <tr>
+ <th valign="middle" align="center" width="165">Timer Name</th>
+ <th valign="middle" title="Integer(0..65535) (the unit is 10ms)" align="center" width="92">Value<br>
+ <font size="1">(in 10ms Units)</font></th>
+ </tr>
+ <tr>
+ <td valign="middle" align="center">T103</td>
+ </center>
+ </center>
+ <td valign="middle" title="Integer(0..65535) (the unit is 10ms)">
+ <p align="center"><input name="t103" size="5" maxlenght="5" value="$%t103#$" onchange="isValidInt(this,0,65535)"></td>
+ </tr>
+ <center>
+ <center>
+ <tr>
+ <td valign="middle" align="center">T104</td>
+ </center>
+ </center>
+ <td valign="middle" title="Integer(0..65535) (the unit is 10ms)">
+ <p align="center"><input name="t104" size="5" maxlenght="5" value="$%t104#$" onchange="isValidInt(this,0,65535)"></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="middle" align="center">T202</td>
+ </center>
+ </center>
+ <td valign="middle" title="Integer(0..65535) (the unit is 10ms)">
+ <p align="center"><input name="t202" size="5" maxlenght="5" value="$%t202#$" onchange="isValidInt(this,0,65535)"></p>
+ </td>
+ </tr>
+ <center>
+ <center>
+ <tr>
+ <td valign="middle" align="center">T204</td>
+ </center>
+ </center>
+ <td valign="middle" title="Integer(0..65535) (the unit is 10ms)">
+ <p align="center"><input name="t204" size="5" maxlenght="5" value="$%t204#$" onchange="isValidInt(this,0,65535)"></p>
+ </td>
+ </tr>
+ <center>
+ <center>
+ <tr>
+ <td valign="middle" align="center">T211</td>
+ <td valign="middle" title="Integer(0..65535) (the unit is 10ms)">
+ <p align="center"><input name="t211" size="5" maxlenght="5" value="$%t211#$" onchange="isValidInt(this,0,65535)"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </center>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p align="center">&nbsp;</p>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/help.htm b/data/mnet/GP10/Host/ViperWatch/help.htm
new file mode 100644
index 0000000..ae961b9
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/help.htm
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML><HEAD><TITLE>$%helpTopic#$</TITLE>
+<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
+<META content="noIndex, Follow" name=Robots>
+
+<STYLE>BODY {
+ MARGIN: 0px
+}
+</STYLE>
+<script >
+function displayTopic(helpTopic)
+{
+ re = /%20/gi;
+ document.write(helpTopic.replace(re, " "));
+}
+</script>
+
+</HEAD>
+<BODY aLink=#006699 bgColor=#ffffff link=#006699 vLink=#006699 marginwidth="0"
+marginheight="0">
+<CENTER>
+<TABLE border=0 cellPadding=3 cellSpacing=0 width="100%">
+ <TBODY>
+ <TR>
+ <TD bgColor=#cccccc vAlign=center width="90%"><B><FONT
+ face=arial,helvetica size=3>
+<script>
+displayTopic("$%helpTopic#$")
+</script>
+
+ </FONT></B> </TD>
+ <TD bgColor=#cccccc width=10>&nbsp;&nbsp;&nbsp;</TD>
+ <TD align=right bgColor=#cccccc vAlign=center><A
+ href="javascript:window.close()"><IMG
+ alt="Close this window and continue" border=0 height=19 name=sp_close
+ src="Images/sp_close.gif" vspace=20 width=103></A>
+ <TR>
+ <TD colSpan=3 vAlign=top width=* bgcolor="#FFFFCC"><BR><FONT face=arial,helvetica
+ size=2><B>$%helpDetail#$</B></FONT> </TD></TR></TBODY></TABLE></CENTER></BODY></HTML>
diff --git a/data/mnet/GP10/Host/ViperWatch/hep.htm b/data/mnet/GP10/Host/ViperWatch/hep.htm
new file mode 100644
index 0000000..33e4a0c
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/hep.htm
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML><HEAD><TITLE>$%helpTopic#$</TITLE>
+<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
+<META content="noIndex, Follow" name=Robots>
+
+<STYLE>BODY {
+ MARGIN: 0px
+}
+</STYLE>
+</HEAD>
+<script>
+displayTopic(helpTopic)
+{
+ document.write(helpTopic.replace("%20", " ");
+}
+
+
+
+
+
+</script>
+
+<BODY aLink=#006699 bgColor=#ffffff link=#006699 vLink=#006699 marginwidth="0"
+marginheight="0">
+<CENTER>
+<TABLE border=0 cellPadding=3 cellSpacing=0 width="100%">
+ <TBODY>
+ <TR>
+ <TD bgColor=#cccccc vAlign=center width="90%"><B><FONT
+ face=arial,helvetica size=3>
+<script>
+displayTopic("$%helpTopic#$")
+</script>
+
+</FONT></B> </TD>
+ <TD bgColor=#cccccc width=10>&nbsp;&nbsp;&nbsp;</TD>
+ <TD align=right bgColor=#cccccc vAlign=center><A
+ href="javascript:window.close()"><IMG
+ alt="Close this window and continue" border=0 height=19 name=sp_close
+ src="images/sp_close.gif" vspace=20 width=103></A> <!-- <a href="javascript:window.close()" OnMouseOver="img_over('close_ico')" OnMouseOut="img_out('close_ico')"><img src="/images/site/buttons/close_button.gif" name=close_ico border=0 vspace=20 width=103 height=19 alt="Close this window and continue"></a> --></TD></TR>
+ <TR>
+ <TD colSpan=3 vAlign=top width=*><BR><FONT face=arial,helvetica
+ size=2><B>$%helpDetail#$</B></FONT> </TD></TR></TBODY></TABLE></CENTER></BODY></HTML>
diff --git a/data/mnet/GP10/Host/ViperWatch/ho_averaging_parameters.htm b/data/mnet/GP10/Host/ViperWatch/ho_averaging_parameters.htm
new file mode 100644
index 0000000..4e19ee4
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/ho_averaging_parameters.htm
@@ -0,0 +1,572 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-us">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Handover Control Package</title>
+</head>
+
+<SCRIPT >
+
+function selectOption(theSelect, valueHolder)
+{
+ if (valueHolder.value < 0 && valueHolder.value >= theSelect.length)
+ {
+ window.alert("Incorrect MIB value for " + valueHolder.name + " "+ valueHolder.value + "Corrected to 0");
+ valueHolder.value = 0;
+ }
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].value == valueHolder.value)
+ {
+ theSelect.options[i].selected = true;
+ break;
+ }
+ }
+
+}
+
+function presetButtons(theForm)
+{
+ selectOption(theForm.hoAveragingAdjCellParamWeightingSelect, theForm.hoAveragingAdjCellParamWeighting);
+ selectOption(theForm.hoAveragingLevParamWeightingSelect, theForm.hoAveragingLevParamWeighting);
+ selectOption(theForm.hoAveragingQualParamWeightingSelect, theForm.hoAveragingQualParamWeighting);
+ return true;
+}
+
+function parseSelect(theSelect, valueHolder)
+{
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].selected)
+ {
+ valueHolder.value = theSelect.options[i].value;
+ break;
+ }
+ }
+}
+function parseButtons(theForm)
+{
+ parseSelect(theForm.hoAveragingAdjCellParamWeightingSelect, theForm.hoAveragingAdjCellParamWeighting);
+ parseSelect(theForm.hoAveragingLevParamWeightingSelect, theForm.hoAveragingLevParamWeighting);
+ parseSelect(theForm.hoAveragingQualParamWeightingSelect, theForm.hoAveragingQualParamWeighting);
+ return true;
+}
+</SCRIPT>
+
+<body onload="presetButtons(this.document.forms[0]);$%reloadTopframe#$">
+
+<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
+function FrontPage_Form1_Validator(theForm)
+{
+
+ if (theForm.hoAveragingAdjCellParamHreqave.value == "")
+ {
+ alert("Please enter a value for the \"Handover Averaging Adjacent Cell Hreqave\" field.");
+ theForm.hoAveragingAdjCellParamHreqave.focus();
+ return (false);
+ }
+
+ if (theForm.hoAveragingAdjCellParamHreqave.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Handover Averaging Adjacent Cell Hreqave\" field.");
+ theForm.hoAveragingAdjCellParamHreqave.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoAveragingAdjCellParamHreqave.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Handover Averaging Adjacent Cell Hreqave\" field.");
+ theForm.hoAveragingAdjCellParamHreqave.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Handover Averaging Adjacent Cell Hreqave\" field.");
+ theForm.hoAveragingAdjCellParamHreqave.focus();
+ return (false);
+ }
+
+ if (theForm.hoAveragingAdjCellParamHreqt.value == "")
+ {
+ alert("Please enter a value for the \"Handover Averaging Adjacent Cell Hreqt\" field.");
+ theForm.hoAveragingAdjCellParamHreqt.focus();
+ return (false);
+ }
+
+ if (theForm.hoAveragingAdjCellParamHreqt.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Handover Averaging Adjacent Cell Hreqt\" field.");
+ theForm.hoAveragingAdjCellParamHreqt.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoAveragingAdjCellParamHreqt.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Handover Averaging Adjacent Cell Hreqt\" field.");
+ theForm.hoAveragingAdjCellParamHreqt.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Handover Averaging Adjacent Cell Hreqt\" field.");
+ theForm.hoAveragingAdjCellParamHreqt.focus();
+ return (false);
+ }
+
+ if (theForm.hoAveragingDistParamHreqave.value == "")
+ {
+ alert("Please enter a value for the \"Handover Averaging Distance Hreqave\" field.");
+ theForm.hoAveragingDistParamHreqave.focus();
+ return (false);
+ }
+
+ if (theForm.hoAveragingDistParamHreqave.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Handover Averaging Distance Hreqave\" field.");
+ theForm.hoAveragingDistParamHreqave.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoAveragingDistParamHreqave.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Handover Averaging Distance Hreqave\" field.");
+ theForm.hoAveragingDistParamHreqave.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Handover Averaging Distance Hreqave\" field.");
+ theForm.hoAveragingDistParamHreqave.focus();
+ return (false);
+ }
+
+ if (theForm.hoAveragingDistParamHreqt.value == "")
+ {
+ alert("Please enter a value for the \"Handover Averaging Distance Hreqt\" field.");
+ theForm.hoAveragingDistParamHreqt.focus();
+ return (false);
+ }
+
+ if (theForm.hoAveragingDistParamHreqt.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Handover Averaging Distance Hreqt\" field.");
+ theForm.hoAveragingDistParamHreqt.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoAveragingDistParamHreqt.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Handover Averaging Distance Hreqt\" field.");
+ theForm.hoAveragingDistParamHreqt.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Handover Averaging Distance Hreqt\" field.");
+ theForm.hoAveragingDistParamHreqt.focus();
+ return (false);
+ }
+
+ if (theForm.hoAveragingLevParamHreqave.value == "")
+ {
+ alert("Please enter a value for the \"Handover Averaging Level Hreqave\" field.");
+ theForm.hoAveragingLevParamHreqave.focus();
+ return (false);
+ }
+
+ if (theForm.hoAveragingLevParamHreqave.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Handover Averaging Level Hreqave\" field.");
+ theForm.hoAveragingLevParamHreqave.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoAveragingLevParamHreqave.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Handover Averaging Level Hreqave\" field.");
+ theForm.hoAveragingLevParamHreqave.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Handover Averaging Level Hreqave\" field.");
+ theForm.hoAveragingLevParamHreqave.focus();
+ return (false);
+ }
+
+ if (theForm.hoAveragingLevParamHreqt.value == "")
+ {
+ alert("Please enter a value for the \"Handover Averaging Level Hreqt\" field.");
+ theForm.hoAveragingLevParamHreqt.focus();
+ return (false);
+ }
+
+ if (theForm.hoAveragingLevParamHreqt.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Handover Averaging Level Hreqt\" field.");
+ theForm.hoAveragingLevParamHreqt.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoAveragingLevParamHreqt.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Handover Averaging Level Hreqt\" field.");
+ theForm.hoAveragingLevParamHreqt.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Handover Averaging Level Hreqt\" field.");
+ theForm.hoAveragingLevParamHreqt.focus();
+ return (false);
+ }
+
+ if (theForm.hoAveragingQualParamHreqave.value == "")
+ {
+ alert("Please enter a value for the \"Handover Averaging Signal Quality Hreqave\" field.");
+ theForm.hoAveragingQualParamHreqave.focus();
+ return (false);
+ }
+
+ if (theForm.hoAveragingQualParamHreqave.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Handover Averaging Signal Quality Hreqave\" field.");
+ theForm.hoAveragingQualParamHreqave.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoAveragingQualParamHreqave.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Handover Averaging Signal Quality Hreqave\" field.");
+ theForm.hoAveragingQualParamHreqave.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Handover Averaging Signal Quality Hreqave\" field.");
+ theForm.hoAveragingQualParamHreqave.focus();
+ return (false);
+ }
+
+ if (theForm.hoAveragingQualParamHreqt.value == "")
+ {
+ alert("Please enter a value for the \"Handover Averaging Quality Hreqt\" field.");
+ theForm.hoAveragingQualParamHreqt.focus();
+ return (false);
+ }
+
+ if (theForm.hoAveragingQualParamHreqt.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Handover Averaging Quality Hreqt\" field.");
+ theForm.hoAveragingQualParamHreqt.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoAveragingQualParamHreqt.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Handover Averaging Quality Hreqt\" field.");
+ theForm.hoAveragingQualParamHreqt.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Handover Averaging Quality Hreqt\" field.");
+ theForm.hoAveragingQualParamHreqt.focus();
+ return (false);
+ }
+ return (true);
+}
+//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
+
+<div align="center">
+ <center>
+ <table border="0" cellpadding="0" cellspacing="0" height="291" width="587">
+ <tr>
+ <td align="right" valign="top" colspan="2" height="20" width="669">
+ <p align="center"><font size="4">Handover Package Averaging Parameters</font></td>
+ </tr>
+ <tr>
+ <td align="right" valign="top" height="8" width="7">
+
+ <div align="center">
+ <center>
+ <table border="1" cellspacing="1" width="301">
+ <tr>
+ <th colspan="2" height="15" align="left" width="291">
+ <p align="center">Adjacent Cell Parameters</p>
+ </th>
+ </tr>
+ <tr>
+ <td height="24" align="left" width="199">Hreqave</td>
+ <td height="24" align="left" width="86"><!--webbot bot="Validation" S-Display-Name="Handover Averaging Adjacent Cell Hreqave" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="hoAveragingAdjCellParamHreqave" size="2" value="$%hoAveragingAdjCellParamHreqave#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td height="24" align="left" width="199">Hreqt</td>
+ <td height="24" align="left" width="86"><!--webbot bot="Validation" S-Display-Name="Handover Averaging Adjacent Cell Hreqt" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="hoAveragingAdjCellParamHreqt" size="2" value="$%hoAveragingAdjCellParamHreqt#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td height="24" align="left" width="199">Weighting</td>
+ <td height="24" align="left" width="86"><select size="1" name="hoAveragingAdjCellParamWeightingSelect">
+ <option value="1">1</option>
+ <option value="2" selected>2</option>
+ <option value="3">3</option>
+ </select></td>
+ <input type="hidden" name="hoAveragingAdjCellParamWeighting" value="$%hoAveragingAdjCellParamWeighting#$">
+ </tr>
+ </table>
+ </center>
+ </div>
+
+ </td>
+ <td valign="top" height="1" align="center" width="290">
+ <table border="1" cellspacing="1" width="363">
+ <tr>
+ <th colspan="2" height="15" width="353">
+ <p align="center">&nbsp;Distance&nbsp;&nbsp; Parameters</th>
+ </tr>
+ <tr>
+ <td height="22" width="279">Hreqave</td>
+ <td height="22" width="68"><!--webbot bot="Validation" S-Display-Name="Handover Averaging Distance Hreqave" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="hoAveragingDistParamHreqave" size="2" value="$%hoAveragingDistParamHreqave#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td height="24" width="279">Hreqt</td>
+ <td height="24" width="68"><!--webbot bot="Validation" S-Display-Name="Handover Averaging Distance Hreqt" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="hoAveragingDistParamHreqt" size="2" value="$%hoAveragingDistParamHreqt#$" maxlength="2"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td align="center" valign="top" height="95" width="297">
+ <table border="1" cellspacing="1" width="295">
+ <tr>
+ <th colspan="2" height="15" width="285">
+ <p align="center">Level Parameters (signal Strength)</th>
+ </tr>
+ <tr>
+ <td height="22" width="196">Hreqave</td>
+ <td height="22" width="83"><!--webbot bot="Validation" S-Display-Name="Handover Averaging Level Hreqave" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="hoAveragingLevParamHreqave" size="2" value="$%hoAveragingLevParamHreqave#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td height="30" width="196">Hreqt</td>
+ <td height="30" width="83"><!--webbot bot="Validation" S-Display-Name="Handover Averaging Level Hreqt" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="hoAveragingLevParamHreqt" size="2" value="$%hoAveragingLevParamHreqt#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td height="24" width="196">Weighting</td>
+ <td height="24" width="83"><select size="1" name="hoAveragingLevParamWeightingSelect">
+ <option value="1">1</option>
+ <option value="2" selected>2</option>
+ <option value="3">3</option>
+ </select></td>
+ <input type="hidden" name="hoAveragingLevParamWeighting" value="$%hoAveragingLevParamWeighting#$">
+
+ </tr>
+ </table>
+ </td>
+ <td align="center" valign="top" height="95" width="361">
+ <table border="1" cellspacing="1" width="98%">
+ <tr>
+ <th colspan="2" width="286">
+ <p align="center">Quality&nbsp; Parameters (signal Quality)</th>
+ </tr>
+ <tr>
+ <td height="22" width="223">Hreqave</td>
+ <td height="22" width="57"><!--webbot bot="Validation" S-Display-Name="Handover Averaging Signal Quality Hreqave" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="hoAveragingQualParamHreqave" size="2" value="$%hoAveragingQualParamHreqave#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td height="30" width="223">Hreqt</td>
+ <td height="30" width="57"><!--webbot bot="Validation" S-Display-Name="Handover Averaging Quality Hreqt" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="hoAveragingQualParamHreqt" size="2" value="$%hoAveragingQualParamHreqt#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td height="24" width="223">Weighting</td>
+ <td height="24" width="57"><select size="1" name="hoAveragingQualParamWeightingSelect">
+ <option value="1">1</option>
+ <option value="2" selected>2</option>
+ <option value="3">3</option>
+ </select></td>
+ </tr>
+ <input type="hidden" name="hoAveragingQualParamWeighting" value="$%hoAveragingQualParamWeighting#$">
+
+ </table>
+ </td>
+ </tr>
+ </table>
+ </center>
+</div>
+
+<p align="center"><input name="B1" type="submit" value="Submit" onclick="parseButtons(window.document.forms[0])"> <input name="Recall" type="button" value="Recall" onclick="window.location.reload()"> <input name="Reset" type="reset" value="Reset" onclick="presetButtons(window.document.forms[0])"> </p>
+</form>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/ho_interface_averaging_parameters.htm b/data/mnet/GP10/Host/ViperWatch/ho_interface_averaging_parameters.htm
new file mode 100644
index 0000000..19e021d
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/ho_interface_averaging_parameters.htm
@@ -0,0 +1,406 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-us">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Handover Control Package</title>
+</head>
+
+<body onload="$%reloadTopframe#$">
+<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
+function FrontPage_Form1_Validator(theForm)
+{
+
+ if (theForm.interferenceAveragingParamAveragingPeriod.value == "")
+ {
+ alert("Please enter a value for the \"Averaging Period (INTAVE)\" field.");
+ theForm.interferenceAveragingParamAveragingPeriod.focus();
+ return (false);
+ }
+
+ if (theForm.interferenceAveragingParamAveragingPeriod.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Averaging Period (INTAVE)\" field.");
+ theForm.interferenceAveragingParamAveragingPeriod.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.interferenceAveragingParamAveragingPeriod.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Averaging Period (INTAVE)\" field.");
+ theForm.interferenceAveragingParamAveragingPeriod.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "1" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"1\" and less than or equal to \"31\" in the \"Averaging Period (INTAVE)\" field.");
+ theForm.interferenceAveragingParamAveragingPeriod.focus();
+ return (false);
+ }
+
+ if (theForm.interferenceAveragingParamThresholdBoundary0.value == "")
+ {
+ alert("Please enter a value for the \"Threshold Boundray 1\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary0.focus();
+ return (false);
+ }
+
+ if (theForm.interferenceAveragingParamThresholdBoundary0.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Threshold Boundray 1\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary0.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.interferenceAveragingParamThresholdBoundary0.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Threshold Boundray 1\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary0.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "63"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"63\" in the \"Threshold Boundray 1\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary0.focus();
+ return (false);
+ }
+
+ if (theForm.interferenceAveragingParamThresholdBoundary1.value == "")
+ {
+ alert("Please enter a value for the \"Threshold Boundray 1\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary1.focus();
+ return (false);
+ }
+
+ if (theForm.interferenceAveragingParamThresholdBoundary1.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Threshold Boundray 1\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary1.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.interferenceAveragingParamThresholdBoundary1.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Threshold Boundray 1\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary1.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "63"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"63\" in the \"Threshold Boundray 1\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary1.focus();
+ return (false);
+ }
+
+ if (theForm.interferenceAveragingParamThresholdBoundary2.value == "")
+ {
+ alert("Please enter a value for the \"Threshold Boundray 2\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary2.focus();
+ return (false);
+ }
+
+ if (theForm.interferenceAveragingParamThresholdBoundary2.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Threshold Boundray 2\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary2.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.interferenceAveragingParamThresholdBoundary2.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Threshold Boundray 2\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary2.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "63"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"63\" in the \"Threshold Boundray 2\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary2.focus();
+ return (false);
+ }
+
+ if (theForm.interferenceAveragingParamThresholdBoundary3.value == "")
+ {
+ alert("Please enter a value for the \"Threshold Boundray 3\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary3.focus();
+ return (false);
+ }
+
+ if (theForm.interferenceAveragingParamThresholdBoundary3.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Threshold Boundray 3\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary3.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.interferenceAveragingParamThresholdBoundary3.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Threshold Boundray 3\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary3.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "63"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"63\" in the \"Threshold Boundray 3\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary3.focus();
+ return (false);
+ }
+
+ if (theForm.interferenceAveragingParamThresholdBoundary4.value == "")
+ {
+ alert("Please enter a value for the \"Threshold Boundray 4\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary4.focus();
+ return (false);
+ }
+
+ if (theForm.interferenceAveragingParamThresholdBoundary4.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Threshold Boundray 4\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary4.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.interferenceAveragingParamThresholdBoundary4.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Threshold Boundray 4\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary4.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "63"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"63\" in the \"Threshold Boundray 4\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary4.focus();
+ return (false);
+ }
+
+ if (theForm.interferenceAveragingParamThresholdBoundary5.value == "")
+ {
+ alert("Please enter a value for the \"Threshold Boundray 5\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary5.focus();
+ return (false);
+ }
+
+ if (theForm.interferenceAveragingParamThresholdBoundary5.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Threshold Boundray 5\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary5.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.interferenceAveragingParamThresholdBoundary5.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Threshold Boundray 5\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary5.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "63"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"63\" in the \"Threshold Boundray 5\" field.");
+ theForm.interferenceAveragingParamThresholdBoundary5.focus();
+ return (false);
+ }
+ return (true);
+}
+//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
+
+<div align="center">
+ <center>
+ <table border="0" cellpadding="0" cellspacing="0" height="200" width="308">
+ <tr>
+ <td align="center" valign="top" height="48" width="306">
+ <p align="center"><font size="4">Handover Package <br>
+ Interference Averaging Parameters</font></td>
+ </tr>
+ <tr>
+ <td align="center" valign="top" height="1" width="306">
+ <table border="1" cellspacing="1" width="98%">
+ <tr>
+ <td>Averaging Period</td>
+ <td><!--webbot bot="Validation" S-Display-Name="Averaging Period (INTAVE)" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="1" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="interferenceAveragingParamAveragingPeriod" size="2" value="$%interferenceAveragingParamAveragingPeriod#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td>Threshold Boundary 0</td>
+ <td><!--webbot bot="Validation" s-display-name="Threshold Boundray 1" s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-maximum-length="2" s-validation-constraint="Greater than or equal to" s-validation-value="0" s-validation-constraint="Less than or equal to" s-validation-value="63" --><input type="text" name="interferenceAveragingParamThresholdBoundary0" size="2" value="$%interferenceAveragingParamThresholdBoundary0#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td>Threshold Boundary 1</td>
+ <td><!--webbot bot="Validation" s-display-name="Threshold Boundray 1" s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-maximum-length="2" s-validation-constraint="Greater than or equal to" s-validation-value="0" s-validation-constraint="Less than or equal to" s-validation-value="63" --><input type="text" name="interferenceAveragingParamThresholdBoundary1" size="2" value="$%interferenceAveragingParamThresholdBoundary1#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td>Threshold Boundary 2</td>
+ <td><!--webbot bot="Validation" s-display-name="Threshold Boundray 2" s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-maximum-length="2" s-validation-constraint="Greater than or equal to" s-validation-value="0" s-validation-constraint="Less than or equal to" s-validation-value="63" --><input type="text" name="interferenceAveragingParamThresholdBoundary2" size="2" value="$%interferenceAveragingParamThresholdBoundary2#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td>Threshold Boundary 3</td>
+ <td><!--webbot bot="Validation" s-display-name="Threshold Boundray 3" s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-maximum-length="2" s-validation-constraint="Greater than or equal to" s-validation-value="0" s-validation-constraint="Less than or equal to" s-validation-value="63" --><input type="text" name="interferenceAveragingParamThresholdBoundary3" size="2" value="$%interferenceAveragingParamThresholdBoundary3#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td>Threshold Boundary 4</td>
+ <td><!--webbot bot="Validation" s-display-name="Threshold Boundray 4" s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-maximum-length="2" s-validation-constraint="Greater than or equal to" s-validation-value="0" s-validation-constraint="Less than or equal to" s-validation-value="63" --><input type="text" name="interferenceAveragingParamThresholdBoundary4" size="2" value="$%interferenceAveragingParamThresholdBoundary4#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td>Threshold&nbsp; Boundary 5</td>
+ <td><!--webbot bot="Validation" s-display-name="Threshold Boundray 5" s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-maximum-length="2" s-validation-constraint="Greater than or equal to" s-validation-value="0" s-validation-constraint="Less than or equal to" s-validation-value="63" --><input type="text" name="interferenceAveragingParamThresholdBoundary5" size="2" value="$%interferenceAveragingParamThresholdBoundary5#$" maxlength="2"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </center>
+</div>
+
+<p align="center"><input name="B1" type="submit" value="Submit" > <input name="Recall" type="button" value="Recall" onclick="window.location.reload()"> <input name="Reset" type="reset" value="Reset"> </p>
+</form>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/ho_threshold_parameters.htm b/data/mnet/GP10/Host/ViperWatch/ho_threshold_parameters.htm
new file mode 100644
index 0000000..27079d6
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/ho_threshold_parameters.htm
@@ -0,0 +1,852 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-us">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Handover Control Package</title>
+</head>
+
+<body onload="$%reloadTopframe#$">
+<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
+function FrontPage_Form1_Validator(theForm)
+{
+
+ if (theForm.hoThresholdDistParamTimeadv.value == "")
+ {
+ alert("Please enter a value for the \"Timeing Advance (MS_RANGE_MAX)\" field.");
+ theForm.hoThresholdDistParamTimeadv.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdDistParamTimeadv.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Timeing Advance (MS_RANGE_MAX)\" field.");
+ theForm.hoThresholdDistParamTimeadv.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoThresholdDistParamTimeadv.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Timeing Advance (MS_RANGE_MAX)\" field.");
+ theForm.hoThresholdDistParamTimeadv.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "99"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"99\" in the \"Timeing Advance (MS_RANGE_MAX)\" field.");
+ theForm.hoThresholdDistParamTimeadv.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdDistParamP8.value == "")
+ {
+ alert("Please enter a value for the \"Number of distance grater than max distance (P8)\" field.");
+ theForm.hoThresholdDistParamP8.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdDistParamP8.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Number of distance grater than max distance (P8)\" field.");
+ theForm.hoThresholdDistParamP8.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoThresholdDistParamP8.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Number of distance grater than max distance (P8)\" field.");
+ theForm.hoThresholdDistParamP8.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Number of distance grater than max distance (P8)\" field.");
+ theForm.hoThresholdDistParamP8.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdDistParamN8.value == "")
+ {
+ alert("Please enter a value for the \"Number of total distance measurements (N8)\" field.");
+ theForm.hoThresholdDistParamN8.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdDistParamN8.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Number of total distance measurements (N8)\" field.");
+ theForm.hoThresholdDistParamN8.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoThresholdDistParamN8.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Number of total distance measurements (N8)\" field.");
+ theForm.hoThresholdDistParamN8.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Number of total distance measurements (N8)\" field.");
+ theForm.hoThresholdDistParamN8.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdInterfaceParamRxLevelUL.value == "")
+ {
+ alert("Please enter a value for the \"Threshold level for handover, reason interference (RXLEV_UL_IH)\" field.");
+ theForm.hoThresholdInterfaceParamRxLevelUL.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdInterfaceParamRxLevelUL.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Threshold level for handover, reason interference (RXLEV_UL_IH)\" field.");
+ theForm.hoThresholdInterfaceParamRxLevelUL.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoThresholdInterfaceParamRxLevelUL.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Threshold level for handover, reason interference (RXLEV_UL_IH)\" field.");
+ theForm.hoThresholdInterfaceParamRxLevelUL.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "63"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"63\" in the \"Threshold level for handover, reason interference (RXLEV_UL_IH)\" field.");
+ theForm.hoThresholdInterfaceParamRxLevelUL.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdInterfaceParamRxLevelDL.value == "")
+ {
+ alert("Please enter a value for the \"Threshold level for handover, reason interference (RXLEV_DL_IH)\" field.");
+ theForm.hoThresholdInterfaceParamRxLevelDL.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdInterfaceParamRxLevelDL.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Threshold level for handover, reason interference (RXLEV_DL_IH)\" field.");
+ theForm.hoThresholdInterfaceParamRxLevelDL.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoThresholdInterfaceParamRxLevelDL.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Threshold level for handover, reason interference (RXLEV_DL_IH)\" field.");
+ theForm.hoThresholdInterfaceParamRxLevelDL.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "63"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"63\" in the \"Threshold level for handover, reason interference (RXLEV_DL_IH)\" field.");
+ theForm.hoThresholdInterfaceParamRxLevelDL.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdInterfaceParamPx.value == "")
+ {
+ alert("Please enter a value for the \"Number of total distance measurements (P7)\" field.");
+ theForm.hoThresholdInterfaceParamPx.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdInterfaceParamPx.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Number of total distance measurements (P7)\" field.");
+ theForm.hoThresholdInterfaceParamPx.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoThresholdInterfaceParamPx.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Number of total distance measurements (P7)\" field.");
+ theForm.hoThresholdInterfaceParamPx.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Number of total distance measurements (P7)\" field.");
+ theForm.hoThresholdInterfaceParamPx.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdInterfaceParamNx.value == "")
+ {
+ alert("Please enter a value for the \"Number of total distance measurements (N7)\" field.");
+ theForm.hoThresholdInterfaceParamNx.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdInterfaceParamNx.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Number of total distance measurements (N7)\" field.");
+ theForm.hoThresholdInterfaceParamNx.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoThresholdInterfaceParamNx.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Number of total distance measurements (N7)\" field.");
+ theForm.hoThresholdInterfaceParamNx.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Number of total distance measurements (N7)\" field.");
+ theForm.hoThresholdInterfaceParamNx.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdLevParamRxLevelUL.value == "")
+ {
+ alert("Please enter a value for the \"Threshold level for handover, reason uplink signal strength (L_R\" field.");
+ theForm.hoThresholdLevParamRxLevelUL.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdLevParamRxLevelUL.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Threshold level for handover, reason uplink signal strength (L_R\" field.");
+ theForm.hoThresholdLevParamRxLevelUL.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoThresholdLevParamRxLevelUL.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Threshold level for handover, reason uplink signal strength (L_R\" field.");
+ theForm.hoThresholdLevParamRxLevelUL.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "63"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"63\" in the \"Threshold level for handover, reason uplink signal strength (L_R\" field.");
+ theForm.hoThresholdLevParamRxLevelUL.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdLevParamRxLevelDL.value == "")
+ {
+ alert("Please enter a value for the \"Threshold level for handover, reason downlink signal strength (L\" field.");
+ theForm.hoThresholdLevParamRxLevelDL.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdLevParamRxLevelDL.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Threshold level for handover, reason downlink signal strength (L\" field.");
+ theForm.hoThresholdLevParamRxLevelDL.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoThresholdLevParamRxLevelDL.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Threshold level for handover, reason downlink signal strength (L\" field.");
+ theForm.hoThresholdLevParamRxLevelDL.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "63"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"63\" in the \"Threshold level for handover, reason downlink signal strength (L\" field.");
+ theForm.hoThresholdLevParamRxLevelDL.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdLevParamPx.value == "")
+ {
+ alert("Please enter a value for the \"hoThresholdLevParamPx\" field.");
+ theForm.hoThresholdLevParamPx.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdLevParamPx.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"hoThresholdLevParamPx\" field.");
+ theForm.hoThresholdLevParamPx.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoThresholdLevParamPx.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"hoThresholdLevParamPx\" field.");
+ theForm.hoThresholdLevParamPx.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"hoThresholdLevParamPx\" field.");
+ theForm.hoThresholdLevParamPx.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdLevParamNx.value == "")
+ {
+ alert("Please enter a value for the \"Number of out of range averages\" field.");
+ theForm.hoThresholdLevParamNx.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdLevParamNx.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Number of out of range averages\" field.");
+ theForm.hoThresholdLevParamNx.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoThresholdLevParamNx.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Number of out of range averages\" field.");
+ theForm.hoThresholdLevParamNx.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Number of out of range averages\" field.");
+ theForm.hoThresholdLevParamNx.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdQualParamRxQualUL.value == "")
+ {
+ alert("Please enter a value for the \"Threshold level for handover, reason uplink signal quality (L_RX\" field.");
+ theForm.hoThresholdQualParamRxQualUL.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdQualParamRxQualUL.value.length > 1)
+ {
+ alert("Please enter at most 1 characters in the \"Threshold level for handover, reason uplink signal quality (L_RX\" field.");
+ theForm.hoThresholdQualParamRxQualUL.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoThresholdQualParamRxQualUL.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Threshold level for handover, reason uplink signal quality (L_RX\" field.");
+ theForm.hoThresholdQualParamRxQualUL.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "7"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"7\" in the \"Threshold level for handover, reason uplink signal quality (L_RX\" field.");
+ theForm.hoThresholdQualParamRxQualUL.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdQualParamRxQualDL.value == "")
+ {
+ alert("Please enter a value for the \"Threshold level for handover, reason downlink signal quality (L_\" field.");
+ theForm.hoThresholdQualParamRxQualDL.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdQualParamRxQualDL.value.length > 1)
+ {
+ alert("Please enter at most 1 characters in the \"Threshold level for handover, reason downlink signal quality (L_\" field.");
+ theForm.hoThresholdQualParamRxQualDL.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoThresholdQualParamRxQualDL.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Threshold level for handover, reason downlink signal quality (L_\" field.");
+ theForm.hoThresholdQualParamRxQualDL.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "7"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"7\" in the \"Threshold level for handover, reason downlink signal quality (L_\" field.");
+ theForm.hoThresholdQualParamRxQualDL.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdQualParamPx.value == "")
+ {
+ alert("Please enter a value for the \"The number of out of range averages ( P6)\" field.");
+ theForm.hoThresholdQualParamPx.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdQualParamPx.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"The number of out of range averages ( P6)\" field.");
+ theForm.hoThresholdQualParamPx.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoThresholdQualParamPx.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"The number of out of range averages ( P6)\" field.");
+ theForm.hoThresholdQualParamPx.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"The number of out of range averages ( P6)\" field.");
+ theForm.hoThresholdQualParamPx.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdQualParamNx.value == "")
+ {
+ alert("Please enter a value for the \"The number of averages to be considered (N6)\" field.");
+ theForm.hoThresholdQualParamNx.focus();
+ return (false);
+ }
+
+ if (theForm.hoThresholdQualParamNx.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"The number of averages to be considered (N6)\" field.");
+ theForm.hoThresholdQualParamNx.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.hoThresholdQualParamNx.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"The number of averages to be considered (N6)\" field.");
+ theForm.hoThresholdQualParamNx.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"The number of averages to be considered (N6)\" field.");
+ theForm.hoThresholdQualParamNx.focus();
+ return (false);
+ }
+ return (true);
+}
+//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
+
+<div align="center">
+ <center>
+ <table border="0" cellpadding="0" cellspacing="0" height="342" width="678">
+ <tr>
+ <th align="center" valign="top" colspan="3" height="22" width="678">Handover Threshold Parameters</th>
+ </tr>
+ <tr>
+ <td align="right" valign="top" height="59" rowspan="2" width="7"></td>
+ <td valign="top" height="5" align="center" width="297">
+ <table border="1" cellspacing="1" width="291">
+ <tr>
+ <th colspan="2">
+ <p align="center">Distance Parameters</th>
+ </tr>
+ <tr>
+ <td>&nbsp;Timing advance (MS_RANGE_MAX)</td>
+ <td><!--webbot bot="Validation" s-display-name="Timeing Advance (MS_RANGE_MAX)" s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-maximum-length="2" s-validation-constraint="Greater than or equal to" s-validation-value="0" s-validation-constraint="Less than or equal to" s-validation-value="99" --><input type="text" name="hoThresholdDistParamTimeadv" size="2" value="$%hoThresholdDistParamTimeadv#$" maxlength="2">
+ &nbsp;</td>
+ </tr>
+ <tr>
+ <td>P8</td>
+ <td><!--webbot bot="Validation" S-Display-Name="Number of distance grater than max distance (P8)" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="hoThresholdDistParamP8" size="2" value="$%hoThresholdDistParamP8#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td>N8</td>
+ <td><!--webbot bot="Validation" S-Display-Name="Number of total distance measurements (N8)" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="hoThresholdDistParamN8" size="2" value="$%hoThresholdDistParamN8#$" maxlength="2"></td>
+ </tr>
+ </table>
+ </td>
+ <td valign="top" height="5" align="center" width="368">
+ <table border="1" cellspacing="1" width="100%">
+ <tr>
+ <th colspan="2">
+ <p align="center">Interference Parameters</th>
+ </tr>
+ <tr>
+ <td>RxLevelUL (RXLEV_UL_IH)</td>
+ <td><!--webbot bot="Validation" s-display-name="Threshold level for handover, reason interference (RXLEV_UL_IH)" s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-maximum-length="2" s-validation-constraint="Greater than or equal to" s-validation-value="0" s-validation-constraint="Less than or equal to" s-validation-value="63" --><input type="text" name="hoThresholdInterfaceParamRxLevelUL" size="2" value="$%hoThresholdInterfaceParamRxLevelUL#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td>RxLevelDL (RXLEV_DL_IH)</td>
+ <td><!--webbot bot="Validation" s-display-name="Threshold level for handover, reason interference (RXLEV_DL_IH)" s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-maximum-length="2" s-validation-constraint="Greater than or equal to" s-validation-value="0" s-validation-constraint="Less than or equal to" s-validation-value="63" --><input type="text" name="hoThresholdInterfaceParamRxLevelDL" size="2" value="$%hoThresholdInterfaceParamRxLevelDL#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td>&nbsp;P7</td>
+ <td><!--webbot bot="Validation" s-display-name="Number of total distance measurements (P7)" s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-maximum-length="2" s-validation-constraint="Greater than or equal to" s-validation-value="0" s-validation-constraint="Less than or equal to" s-validation-value="31" --><input type="text" name="hoThresholdInterfaceParamPx" size="2" value="$%hoThresholdInterfaceParamPx#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td>&nbsp;N7</td>
+ <td><!--webbot bot="Validation" S-Display-Name="Number of total distance measurements (N7)" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="hoThresholdInterfaceParamNx" size="2" value="$%hoThresholdInterfaceParamNx#$" maxlength="2"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td align="center" valign="top" height="54" width="297">
+ <table border="1" cellspacing="1" width="98%">
+ <tr>
+ <th colspan="2" height="15">
+ <p align="center">Level Parameters (Signal Strength)</th>
+ </tr>
+ <tr>
+ <td height="24">RxLevelUL</td>
+ <td height="24"><!--webbot bot="Validation" s-display-name="Threshold level for handover, reason uplink signal strength (L_RXLEV_UL_H)." s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-maximum-length="2" s-validation-constraint="Greater than or equal to" s-validation-value="0" s-validation-constraint="Less than or equal to" s-validation-value="63" --><input type="text" name="hoThresholdLevParamRxLevelUL" size="2" value="$%hoThresholdLevParamRxLevelUL#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td height="24">RxLevelDL</td>
+ <td height="24"><!--webbot bot="Validation" s-display-name="Threshold level for handover, reason downlink signal strength (L_RXLEV_DL_H)" s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-maximum-length="2" s-validation-constraint="Greater than or equal to" s-validation-value="0" s-validation-constraint="Less than or equal to" s-validation-value="63" --><input type="text" name="hoThresholdLevParamRxLevelDL" size="2" value="$%hoThresholdLevParamRxLevelDL#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td height="24">Px</td>
+ <td height="24"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="hoThresholdLevParamPx" size="2" value="$%hoThresholdLevParamPx#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td height="24">Nx</td>
+ <td height="24"><!--webbot bot="Validation" s-display-name="Number of out of range averages" s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-maximum-length="2" s-validation-constraint="Greater than or equal to" s-validation-value="0" s-validation-constraint="Less than or equal to" s-validation-value="31" --><input type="text" name="hoThresholdLevParamNx" size="2" value="$%hoThresholdLevParamNx#$" maxlength="2"></td>
+ </tr>
+ </table>
+ </td>
+ <td align="center" valign="top" height="54" width="368">
+ <table border="1" cellspacing="1" width="100%">
+ <tr>
+ <th colspan="2">
+ <p align="center">Quality Parameters (Signal Quality)</th>
+ </tr>
+ <tr>
+ <td>RxQualUL&nbsp; (L_RXQUAL_UL_H)</td>
+ <td><!--webbot bot="Validation" S-Display-Name="Threshold level for handover, reason uplink signal quality (L_RXQUAL_UL_H)" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="1" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="7" --><input type="text" name="hoThresholdQualParamRxQualUL" size="1" value="$%hoThresholdQualParamRxQualUL#$" maxlength="1"></td>
+ </tr>
+ <tr>
+ <td>RxQualDL (L_RXQUAL_DL_H)</td>
+ <td><!--webbot bot="Validation" S-Display-Name="Threshold level for handover, reason downlink signal quality (L_RXQUAL_DL_H)" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="1" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="7" --><input type="text" name="hoThresholdQualParamRxQualDL" size="1" value="$%hoThresholdQualParamRxQualDL#$" maxlength="1"></td>
+ </tr>
+ <tr>
+ <td>P6</td>
+ <td><!--webbot bot="Validation" s-display-name="The number of out of range averages ( P6)" s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-maximum-length="2" s-validation-constraint="Greater than or equal to" s-validation-value="0" s-validation-constraint="Less than or equal to" s-validation-value="31" --><input type="text" name="hoThresholdQualParamPx" size="2" value="$%hoThresholdQualParamPx#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td>N6</td>
+ <td><!--webbot bot="Validation" s-display-name="The number of averages to be considered (N6)" s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-maximum-length="2" s-validation-constraint="Greater than or equal to" s-validation-value="0" s-validation-constraint="Less than or equal to" s-validation-value="31" --><input type="text" name="hoThresholdQualParamNx" size="2" value="$%hoThresholdQualParamNx#$" maxlength="2"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </center>
+</div>
+
+<p align="center"><input name="B1" type="submit" value="Submit" > <input name="Recall" type="button" value="Recall" onclick="window.location.reload()"> <input name="Reset" type="reset" value="Reset"> </p>
+</form>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/htlm_alarm.htm b/data/mnet/GP10/Host/ViperWatch/htlm_alarm.htm
new file mode 100644
index 0000000..236372e
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/htlm_alarm.htm
@@ -0,0 +1,184 @@
+
+<HTML>
+<HEAD>
+<META name="Robots" content="noIndex, Follow">
+<title>GP10 Alarm Log</title>
+</head>
+
+<SCRIPT LANGUAGE="javascript" src="./js/common.js"> </script>
+
+
+<SCRIPT LANGUAGE="javascript">
+<!-- start hiding
+var hiColor = "green"
+var orgLinkColor = "";
+var index = 1;
+function getNextIndex()
+{
+ return index++;
+}
+
+function DisplayDetail(theAlarm)
+{
+ var url = "./alarm_detail.htm?" + theAlarm;
+ var popupWin1 = window.open (url, "AlarmDetail", "width=550,height=250,toolbar=0,scrollbars=1,resizable=1");
+ if (!document.all && window.focus) popupWin1.focus();
+
+}
+
+
+function getSeverityText(theSeverity)
+{
+ var textState = "";
+ var Color = "";
+ var help = ""
+
+ switch(theSeverity)
+ {
+ case "0":
+ // Critical
+ textState = "Critical";
+ Color = "#FF0000";
+ help = "A ciritcal Alarm."
+ break;
+ case "1":
+ // Major
+ textState = "Major";
+ Color = "#FF00FF";
+ help = "A major Alarm"
+ break;
+ case "2":
+ // Minor
+ textState = "Minor";
+ Color = "#0000FF";
+ help = "a Minor Alarm"
+ break;
+ case "3":
+ // Alarm Cleared
+ textState = "Information";
+ Color = "#000080";
+ help = "Alarm Information"
+ break;
+
+ default:
+ textState = "Invalid";
+ Color = "Yellow";
+ help = "Invalid value of Admin. State"
+ break;
+ }
+
+ return "title=\"" + help + "\" > <font Color=\"" + Color + "\" >" + textState + "</font> </font>";
+
+}
+
+
+function displayTime(utctime)
+{
+
+ var gmtDate = new Date(utctime*1000);
+ return gmtDate.toLocaleString();
+}
+
+
+function DisplayAlarm (sAlarm)
+{
+ var aAlarm = sAlarm.split("|")
+
+ if (aAlarm.lenght < 6)
+ return;
+
+ document.write("<tr>")
+ //document.write("<td align=\"center\">" + getNextIndex() + "</td>");
+ document.write("<td align=\"center\">" + aAlarm[0] + "</td>");
+ document.write("<td align=\"center\">" + displayTime(aAlarm[1]) + "</td>");
+ document.write("<td align=\"left\"" + getSeverityText(aAlarm[2]) + "</td>");
+ document.write("<td align=\"left\"> <font size=\"-1\"> " + aAlarm[4] + " </font> </td>");
+ document.write("<td title=\"Click to see the detail of alarm code: " + aAlarm[5] + ". \" align=\"center\"> <a href=\"JavaScript:DisplayDetail(\'" + sAlarm + "\')\"> " + aAlarm[5] + "</a> </td>");
+ document.write("</tr>")
+}
+
+function DisplayUrl(url, helpText, displayText, hiColor)
+{
+
+ document.write("<A target=\"_blank\" TITLE=\"" + helpText + "\" href=\"http://" + url + "/\" onMouseOver='highlight(this, hiColor);' onMouseOut='undoHighlight(this);' >" + displayText + "</A>")
+}
+
+function highlight(obj, color) {
+ orgLinkColor = obj.style.color;
+ obj.style.color=color;
+}
+
+function undoHighlight(obj) {
+ obj.style.color=orgLinkColor;
+}
+
+function comapare(first, second)
+{
+ var aFirst = first.split("|");
+ var aSecond = second.split("|");
+ if (aFirst.lenght < 5)
+ return 1;
+
+ if (aSecond.length < 5)
+ return -1;
+
+ return aSecond[0] - aFirst[0];
+}
+
+function DisplayAlarmList(sAlarmList)
+{
+ var aAlarmList = sAlarmList.split("#");
+
+ aAlarmList.sort(comapare);
+
+ for (var i=0; i< aAlarmList.length-1; i++)
+ {
+ DisplayAlarm(aAlarmList [i])
+ }
+}
+
+// end hiding -->
+
+</SCRIPT>
+<body marginwidth="0" marginheight="0" bgcolor="#C6C3C6" onload="$%reloadTopframe#$">
+<div align="center">
+ <table border="4" bgcolor="#D6D3CE" width="100%" height="100%">
+ <tr>
+ <td width="95%">
+ <div align="center">
+ <table border="0" cellpadding="3" width="100%">
+ <tr>
+ <td align="center" width="80%">
+ <h2 align="left"><font color="#000080">GP10 Alarm Log&nbsp;</font></h2>
+ </td>
+ <center>
+ <form>
+ <td align="center" width="10%">
+ <input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ <td align="center" width="10%">
+ <input name="Close" type="button" value="Close" title="Click this button to close the window."
+ onclick="window.close()"></td>
+ </form>
+ </tr>
+ </table>
+ </div>
+ <table border="1" width="100%">
+ <tr>
+ <th nowrap width="5%">&nbsp;ID</th>
+ <th nowrap width="40%">Date/Time</th>
+ <th nowrap width="15%">Severity</th>
+ <th nowrap width="25%">Module</th>
+ <th nowrap width="10%">Error Code</th>
+ </tr>
+ <script language="JavaScript"> DisplayAlarmList("$%AlarmList#$"); </script>
+ </table>
+ </center>
+ </td>
+ </tr>
+ </table>
+</div>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/index.htm b/data/mnet/GP10/Host/ViperWatch/index.htm
new file mode 100644
index 0000000..a515da5
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/index.htm
@@ -0,0 +1,28 @@
+
+<html>
+
+<head>
+<meta name="VI60_defaultClientScript" content="JavaScript">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Cisco GSM Port (GP)&nbsp; Manager</title>
+</head>
+
+<frameset rows="60,*,1">
+ <frame name="header" scrolling="no" target="main" src="top_frame.htm" marginwidth="0" marginheight="0">
+ <frameset cols="166,*">
+ <frame name="contents" target="main" src="left_frame.htm" scrolling="auto">
+ <frame name="main" target="main" src="welcome.htm" scrolling="auto">
+ </frameset>
+ <frame name="footer" scrolling="no" target="footer" src="bottom_frame.htm" noresize marginwidth="0" marginheight="0">
+ <noframes>
+
+ <body>
+
+ <p>This page uses frames, but your browser doesn't support them.
+
+ </body>
+ </noframes>
+</frameset>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/js/common.js b/data/mnet/GP10/Host/ViperWatch/js/common.js
new file mode 100644
index 0000000..41f1f91
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/js/common.js
@@ -0,0 +1,37 @@
+function printOnOffMode(theValue)
+{
+ var textValue = "";
+ switch (theValue)
+ {
+ case "0":
+ textValue = "Off";
+ break;
+ case "1":
+ textValue = "On";
+ break;
+ default:
+ textValue = "Undefined"
+ break;
+ }
+ document.write(textValue);
+}
+
+var index = 1;
+function displayIndex()
+{
+ document.write(" " + index++ + " ");
+}
+
+function displayTime(utctime)
+{
+ var gmtDate = new Date(utctime*1000);
+ document.write(gmtDate.toLocaleString());
+}
+
+function cvtTicks2Sec(ticks)
+{
+ var secTime = parseFloat(ticks)/ parseFloat("60.0");
+ var secStr = secTime.toString();
+ var i = secStr.indexOf(".");
+ document.write(secStr.substr(0, i+4) + " (sec)");
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/ViperWatch/js/form.js b/data/mnet/GP10/Host/ViperWatch/js/form.js
new file mode 100644
index 0000000..1fbf171
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/js/form.js
@@ -0,0 +1,152 @@
+function clickRadio(theRadio, valueHolder)
+{
+ if (valueHolder.value != 0 && valueHolder.value != 1)
+ {
+ window.alert("Incorrect MIB value for " + valueHolder.name + " "+ valueHolder.value + "Corrected to 0");
+ valueHolder.value = 0;
+ }
+
+ for (var i = 0; i < theRadio.length; i++)
+ {
+ if (theRadio[i].value == valueHolder.value)
+ {
+ theRadio[i].click();
+ theRadio[i].defaultChecked = true;
+ break;
+ }
+ }
+}
+
+function selectOption(theSelect, valueHolder)
+{
+ if (valueHolder.value < 0 && valueHolder.value >= theSelect.length)
+ {
+ window.alert("Incorrect MIB value for " + valueHolder.name + " "+ valueHolder.value + "Corrected to 0");
+ valueHolder.value = 0;
+ }
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].value == valueHolder.value)
+ {
+ theSelect.options[i].selected = true;
+ theSelect.options[i].defaultSelected = true;
+ break;
+ }
+ }
+
+}
+
+function selectDisabledOption(theSelect, theValue)
+{
+ theSelect.disabled = true
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].value == theValue)
+ {
+ theSelect.options[i].selected = true;
+ break;
+ }
+ theSelect.options[i].selected = true;
+ }
+}
+
+
+function clickCheckBox(theCheckBox, valueHolder)
+{
+ if (!theCheckBox.length || theCheckBox.length==1)
+ {
+ if (valueHolder.value == true)
+ {
+ theCheckBox.checked = true;
+ theCheckBox.defaultChecked = true;
+
+ } else {
+ theCheckBox.checked = false;
+ theCheckBox.defaultChecked = false;
+ }
+
+ } else {
+ for (var i = 0; i < theCheckBox.length; i++)
+ {
+ if (theCheckBox.elements[i].value == valueHolder.name)
+ {
+ if (valueHolder.value == "1")
+ {
+ theCheckBox[i].checked = true;
+ theCheckBox[i].defaultChecked = true;
+
+ }
+ else
+ {
+ theCheckBox[i].checked = false;
+ theCheckBox[i].defaultChecked = false;
+ }
+ }
+ }
+ }
+}
+
+
+function parseRadio(radioButton, valueHolder)
+{
+ for (var i = 0; i < radioButton.length; i++)
+ {
+ if (radioButton[i].checked)
+ {
+ valueHolder.value = radioButton[i].value;
+ break;
+ }
+ }
+}
+
+function parseSelect(theSelect, valueHolder)
+{
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].selected)
+ {
+ valueHolder.value = theSelect.options[i].value;
+ break;
+ }
+ }
+}
+
+function parseCheckBox(theCheckBox, valueHolder)
+{
+
+ if (!theCheckBox.length || theCheckBox.length == 1)
+ {
+ if (theCheckBox.checked == true)
+ {
+ valueHolder.value = "1";
+ } else {
+ valueHolder.value = "0";
+ }
+
+ } else {
+
+ for (var i = 0; i < theCheckBox.length; i++)
+ {
+ if (theCheckBox.elements[i].value == valueHolder.name)
+ {
+ if (theCheckBox[i].checked == true)
+ {
+ valueHolder.value = "1";
+ } else {
+ valueHolder.value = "0";
+ }
+ }
+ }
+ }
+}
+
+function cvtIntToBCD(theTextField, digitCount)
+{
+ var allZeros = "";
+ for (var i= theTextField.value.length; i <digitCount; i++)
+ {
+ allZeros += "0";
+ }
+ theTextField.value = allZeros+ theTextField.value;
+ return true
+}
diff --git a/data/mnet/GP10/Host/ViperWatch/js/integer.js b/data/mnet/GP10/Host/ViperWatch/js/integer.js
new file mode 100644
index 0000000..7d48690
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/js/integer.js
@@ -0,0 +1,159 @@
+// index is a global variable on the script
+function isInt(theField)
+{
+ if (theField.value == "")
+ {
+ alert("Please enter a value for the " + theField.name + " field.");
+ theField.value = theField.defaultValue;
+ theField.focus();
+ return (false);
+ }
+
+ var checkOK = "-0123456789";
+ var checkStr = theField.value;
+ var allValid = true;
+ var decPoints = 0;
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ {
+ if (ch == checkOK.charAt(j))
+ break;
+ }
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the " + theField.name + " field.");
+ theField.value = theField.defaultValue;
+ theField.focus();
+ return (false);
+ }
+ return (true);
+}
+
+function isValidInt(theField, minValue, maxValue)
+{
+ if (!isInt(theField))
+ return (false);
+
+ var prsVal = parseInt(theField.value);
+ if (prsVal < minValue || prsVal > maxValue)
+ {
+ if (minValue == maxValue)
+ alert("Only valid value in the " + theField.name + " field is " + minValue + ".");
+ else
+ alert("Please enter a value greater than or equal to " + minValue + " and less than or equal to " + maxValue +" in the " + theField.name + " field.");
+ theField.value = theField.defaultValue;
+ theField.focus();
+ return (false);
+ }
+ return (true);
+}
+
+function nextIndex(prevIndex)
+{
+ var tmp = Number(prevIndex);
+ tmp++
+ document.write(" " + tmp + " ");
+}
+
+function isIntName(theField, name)
+{
+ if (theField.value == "")
+ {
+ alert("Please enter a value for the " + name + " field.");
+ theField.value = theField.defaultValue;
+ theField.focus();
+ return (false);
+ }
+
+ var checkOK = "-0123456789";
+ var checkStr = theField.value;
+ var allValid = true;
+ var decPoints = 0;
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ {
+ if (ch == checkOK.charAt(j))
+ break;
+ }
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the " + name + " field.");
+ theField.value = theField.defaultValue;
+ theField.focus();
+ return (false);
+ }
+ return (true);
+}
+
+function isValidIntName(theField, minValue, maxValue, name)
+{
+ if (!isIntName(theField, name))
+ return (false);
+
+ var prsVal = parseInt(theField.value);
+ if (prsVal < minValue || prsVal > maxValue)
+ {
+ alert("Please enter a value greater than or equal to " + minValue + " and less than or equal to " + maxValue +" in the " + name + " field.");
+ theField.value = theField.defaultValue;
+ theField.focus();
+ return (false);
+ }
+ return (true);
+}
+
+function isValidTxPower(theField, theRadioType)
+{
+ var max
+ var min
+ var textRadioType
+
+ if (!isIntName(theField, "Tx Power"))
+ return (false);
+
+ switch(theRadioType)
+ {
+ case 0:
+ max = 39
+ min = 5
+ textRadioType = "GSM 900";
+ break;
+ case 1:
+ max = 30
+ min = 0
+ textRadioType = "DCS 1800";
+ break;
+ case 2:
+ max = 33
+ min = 0
+ textRadioType = "PCS 1900";
+ break;
+ default:
+ alert("Invalid Radio type configured at the MIB. Please reboot the GP10.");
+ theField.value = theField.defaultValue;
+ return (false)
+ }
+ if (theField.value < min || theField.value > max)
+ {
+ alert("For GP10 product TX Power in " + textRadioType + ": " + min + ".." + max + " dBm");
+ theField.value = theField.defaultValue;
+ theField.focus();
+ return (false);
+ }
+ return (true);
+}
diff --git a/data/mnet/GP10/Host/ViperWatch/js/ip.js b/data/mnet/GP10/Host/ViperWatch/js/ip.js
new file mode 100644
index 0000000..117743c
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/js/ip.js
@@ -0,0 +1,109 @@
+function cvtIntToIP(theField)
+{
+ var ip = theField.value
+ var byte1 = (ip >> 24) & 0x000000FF
+ var byte2 = (ip >> 16) & 0x000000FF
+ var byte3 = (ip >> 8) & 0x000000FF
+ var byte4 = (ip & 0x000000FF)
+ theField.value = byte1 + "." + byte2 + "." + byte3 + "." + byte4;
+ // alert ("IP Address = " + theField.value);
+ return true;
+}
+
+function cvtIPToInt(theIP)
+{
+ var checkOK = "0123456789.";
+ var checkStr = theIP.value;
+ var allValid = true;
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ }
+ if (!allValid)
+ {
+ alert("Invalid character in the IP address field: " + theIP.name);
+ theIP.focus();
+ return (false);
+ }
+
+ ipBytes = theIP.value.split(".",4);
+ if(ipBytes.length != 4)
+ {
+ alert("Invalid IP address:" + theIP.name);
+ theIP.focus();
+ return false;
+ }
+
+ for(var i=0; i<4; i++)
+ {
+ if (ipBytes[i] <= 0 || ipBytes[i] >= 0xFF)
+ {
+ alert("Invalid IP address:" + theIP.name);
+ theIP.focus();
+ return false
+ }
+ }
+
+ // Now finally we are converting here
+ var ip = ((ipBytes[0] << 24) & 0xFF000000)
+ | ((ipBytes[1] << 16) & 0x00FF0000)
+ | ((ipBytes[2] << 8) & 0x0000FF00)
+ | (ipBytes[3] & 0x000000FF);
+
+ theIP.value = ip;
+ return (true);
+}
+
+
+function validateIp(theIP, name)
+{
+ var checkOK = "0123456789.";
+ var checkStr = theIP.value;
+ var allValid = true;
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ }
+ if (!allValid)
+ {
+ alert("Invalid character in the IP address field: " + name);
+ theIP.focus();
+ return (false);
+ }
+
+ ipBytes = theIP.value.split(".",4);
+ if(ipBytes.length != 4)
+ {
+ alert("Invalid IP address:" + name);
+ theIP.focus();
+ return false;
+ }
+
+ for(var i=0; i<4; i++)
+ {
+ if (ipBytes[i] < 0 || ipBytes[i] > 0xFF)
+ {
+ alert("Invalid IP address:" + name);
+ theIP.focus();
+ return false
+ }
+ }
+
+ return (true);
+}
diff --git a/data/mnet/GP10/Host/ViperWatch/js/link.js b/data/mnet/GP10/Host/ViperWatch/js/link.js
new file mode 100644
index 0000000..eeba921
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/js/link.js
@@ -0,0 +1,14 @@
+
+var orgLinkColor =""; // used to remember link color prior to highlight.
+var linkHilightColor = "green"; // Link highlight color
+
+function highlight(obj, color)
+{
+ orgLinkColor = obj.style.color;
+ obj.style.color=color;
+}
+
+function undoHighlight(obj)
+{
+ obj.style.color=orgLinkColor;
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/ViperWatch/js/perCause.js b/data/mnet/GP10/Host/ViperWatch/js/perCause.js
new file mode 100644
index 0000000..2e59194
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/js/perCause.js
@@ -0,0 +1,65 @@
+function displayCause(theCause)
+{
+ var textCause = "";
+ var longDesc = "";
+
+ switch(theCause)
+ {
+ case "160": // 0xa0
+ // Emergency call
+ textCause = "Emergency call (" + theCause + ")";
+ break;
+ case "192": //0xc0
+ // Call re-establishment; TCH/F was in use
+ textCause = "Call re-establishment (" + theCause + ")"
+ longDesc = "TCH/F was in use";
+ break;
+
+ case "128": //0x80
+ // Answer to paging
+ textCause = "Answer to paging (" + theCause + ")";
+ longDesc = "Full Rate only";
+ break;
+
+ case "16": //0x10
+ // Answer to paging
+ textCause = "Answer to paging (" + theCause + ")";
+ longDesc = "SDCCH only";
+
+ break;
+
+ case "32": //0x20
+ // Answer to paging
+ textCause = "Answer to paging (" + theCause + ")";
+ longDesc = "Dual rate mobile";
+ break;
+
+ case "224": //0xe0
+ // Originating call and TCH/F is needed
+ textCause = "Originating call (" + theCause + ")";
+ longDesc = "TCH/F is needed to complete the originating call";
+ break;
+
+ case "0": // 0x00
+ // Location updating
+ textCause = "Location updating (" + theCause + ")";
+ longDesc = "TCH/F is needed to complete the location update";
+
+ break;
+
+ case "12":
+ // Other procedures which can be completed with
+ // an SDCCH and the network sets NECI bit to 1
+ textCause = "Other procedures (" + theCause + ")";
+ longDesc = "the procedures which can be completed with an SDCCH and the network sets NECI bit to 1";
+ break;
+ default:
+ textCause = "Unknown Cause (" + theCause + ")";
+ longDesc = "Invalid Cause Number in the MIB";
+
+
+ break;
+ }
+ document.write(textCause + "<br> <font size='-1'> <I>" + longDesc + "</I> </font>");
+}
+
diff --git a/data/mnet/GP10/Host/ViperWatch/js/state.js b/data/mnet/GP10/Host/ViperWatch/js/state.js
new file mode 100644
index 0000000..a01dd8f
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/js/state.js
@@ -0,0 +1,223 @@
+function displayOpState(theState)
+{
+ var textState = "";
+ var Color = "";
+ var help = ""
+
+ switch(theState)
+ {
+ case "0":
+ // Disabled
+ textState = "Disabled";
+ Color += "Red";
+ help = "The operation state is disabled. Check if there is an outstanding alarm."
+ break;
+ case "1":
+ // Enabled
+ textState = "Enabled";
+ Color += "Green";
+ help = "The operation state is enabled."
+ break;
+ default:
+ textState = "Invalid";
+ Color += "Yellow";
+ help = "Invalid value of operational state!!!"
+ break;
+ }
+ document.write("<td height=\"14\" title=\"" + help + "\" > <font size=1> Op. State: <font Color=\"" + Color + "\" >" + textState + "</font> </font> </td>");
+}
+
+function displayAdminState(theState)
+{
+ var textState = "";
+ var Color = "";
+ var help = ""
+
+ switch(theState)
+ {
+ case "0":
+ // Disabled
+ textState = "Locked";
+ Color = "Red";
+ help = "The Admin. state is locked by the operator."
+ break;
+ case "1":
+ // Enabled
+ textState = "Unlocked";
+ Color = "Green";
+ help = "The Admin. state is unlocked."
+ break;
+ case "2":
+ // Shuttig Down
+ textState = "Shutting down";
+ Color = "Pink";
+ help = "The GP10 is being shutdown"
+ break;
+ default:
+ textState = "Invalid";
+ Color = "Yellow";
+ help = "Invalid value of Admin. state"
+ break;
+ }
+ document.write("<td height=\"14\" title=\"" + help + "\" > <font size=1> Admin. State: <font Color=\"" + Color + "\" >" + textState + "</font> </font></td>");
+
+}
+
+
+function displayState(theState)
+{
+ var textState = "";
+ var Color = "";
+
+ switch(theState)
+ {
+ case "0":
+ // Disabled
+ textState = "Disabled";
+ Color += "Red";
+ break;
+ case "1":
+ // Enabled
+ textState = "Enabled";
+ Color += "Green";
+ break;
+ default:
+ textState = "Invalid";
+ Color += "Yellow";
+ help = "Invalid value of operational state!!!"
+ break;
+ }
+ document.write("<font color=\"" + Color + "\"> " + textState + "</font>");
+}
+
+function displayAlarmStatus(theAlarmCode)
+{
+ var textStatus = "";
+ var Color = "";
+
+ switch(theAlarmCode)
+ {
+ case "0":
+ // Disabled
+ textState = "Cleared";
+ Color += "Green";
+ break;
+ case "1":
+ // Enabled
+ textState = "Critical";
+ Color += "Red";
+ break;
+ case "2":
+ // Disabled
+ textState = "Major";
+ Color += "#FF00FF";
+ break;
+ case "3":
+ // Enabled
+ textState = "Minor";
+ Color += "#800080";
+ break;
+ case "4":
+ // Enabled
+ textState = "Alarm Outsanding";
+ Color += "Yellow";
+ break;
+ default:
+ textState = "Unknown";
+ Color += "black";
+ break;
+ }
+ document.write("<font color=\"" + Color + "\"> " + textState + "</font>");
+}
+
+function ConfirmAdminState(theSelect, valueHolder, changeUnit, effectiveUnit, parentState, theParent)
+{
+ var status = true;
+ var locked = "0";
+ var unlocked = "1";
+ var shuttingDown = "2";
+
+ var orgState = valueHolder.value;
+ var newState;
+ var status = true;
+
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].selected)
+ {
+ newState = theSelect.options[i].value;
+ break;
+ }
+ }
+
+ if(parentState == locked && newState != locked)
+ {
+ alert("Please first unlock the admin state of the " + theParent + " before changing " + changeUnit + ".");
+ orgState = locked;
+ status = false;
+ } else {
+
+ switch(orgState)
+ {
+ case "0": // locked
+ if (newState == shuttingDown)
+ {
+ alert ("Changing the Admin. State of " + changeUnit + " from \"Locked\" to \"Shutting Down\" is not allowed.");
+ status = false;
+ }
+ break;
+ case "1": //unlocked
+ if( newState == locked)
+ {
+ status = confirm("Warning: Changing Admin State of " + changeUnit + " from \"Unlocked\" to \"Locked\" will prevent " +
+ "new calls being made on this " + effectiveUnit + ", and existing Call(s) on this " + effectiveUnit +
+ " will be aborted immediately. Do you want to proceed?");
+ } else if (newState == shuttingDown) {
+ status = confirm("Warning: Changing Admin State of " + changeUnit + " from \"Unlocked\" to \"Shutting Down\" will prevent " +
+ "new calls being made on this " + effectiveUnit + ". Existing Call(s) on this " + effectiveUnit +
+ " will still be preserved until it terminates normally. Do you want to proceed?");
+ }
+ break;
+ case "2":
+ if (newState == locked)
+ {
+ status = confirm("Warning: Changing Admin. State "+ changeUnit + " from \"Shutting Down\" to \"Locked\" will immediately abort " +
+ "all existing Call(s) on this" + effectiveUnit +". Do you want to proceed?");
+ }
+ } // switch
+ }
+
+ if (!status)
+ {
+ theSelect.options[orgState].selected = true;
+ }
+ return status;
+}
+
+function displayPowerClass(theClass)
+{
+ var textClass= "";
+ var Color = "";
+ switch(theClass)
+ {
+ case "1":
+ textClass = "M1 (0.2W - GSM 900)";
+ Color += "Black";
+ break;
+ case "2":
+ textClass = "M3 (0.1W - DCS 1800)";
+ Color += "Black";
+ break;
+ case "3":
+ textClass = "M2 (0.2W - PCS 1900)";
+ Color += "Black";
+ break;
+ default:
+ Color += "Red";
+ textClass = "Invalid Power Class (corrupted MIB data)!!!"
+ break;
+ }
+ document.write("<font color=\"" + Color + "\"> " + textClass + "</font>");
+}
+
+
diff --git a/data/mnet/GP10/Host/ViperWatch/last_error.htm b/data/mnet/GP10/Host/ViperWatch/last_error.htm
new file mode 100644
index 0000000..6776941
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/last_error.htm
@@ -0,0 +1,92 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Latest OAM Operation Status</title>
+</head>
+
+<SCRIPT >
+function displayStatus(theStatus)
+{
+
+ document.write( "<B>");
+ switch (theStatus)
+ {
+ case "1":
+ document.write( "<font color='#FF00FF'> IN PROGESS </font>");
+ break;
+ case "2":
+ document.write( "SUCCESSFUL");
+ break;
+ case "3":
+ document.write( "<font color='#FF0000'> FAILED </font>");
+ break;
+ default:
+ document.write( "NIL");
+ break;
+ }
+ document.write( "</B>");
+
+}
+
+</SCRIPT>
+
+<body onload="$%reloadTopframe#$">
+
+<h2 align="left">&nbsp;</h2>
+<div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="557">
+ <tr>
+ <td width="541">
+ <h2 align="center">Latest OAM Operation Status</h2>
+ <div align="center">
+ <table border="0" width="82%">
+ <tr>
+ <td width="100%">
+ <div align="left">
+ <table border="1" cellpadding="3">
+ <tr>
+ <td align="right">Latest OAM Operation Status:</td>
+ <td align="left"> <SCRIPT language="JavaScript"> displayStatus("$%oamCommandExecutionStatus#$"); </SCRIPT>
+ </td>
+ </tr>
+ <tr>
+ <td align="right">Latest Error:</td>
+ <td align="left"><font color="#FF0000">&nbsp;$%oamCommandLastError#$</font></td>
+ </tr>
+ </table>
+ </div>
+ <p>Note: The &quot;Latest Error&quot; is a system error which occurred during the processing of a previously originated OAM operation.&nbsp; If there is no error at any OAM operation,
+ the error string is not changed.</p>
+ <p>Please click<a href="javascript:history.go(-1)" title="Click to gack to the previous page. This operation will not reload the page">
+ here</a> to go back to the previous page.</td>
+ </tr>
+ </table>
+ </div>
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </div>
+ </center>
+ </td>
+ </tr>
+ </table>
+</div>
+<h2 align="left">&nbsp;</h2>
+<p>&nbsp;</p>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/layer2_timer.htm b/data/mnet/GP10/Host/ViperWatch/layer2_timer.htm
new file mode 100644
index 0000000..c70f749
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/layer2_timer.htm
@@ -0,0 +1,138 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Layer 2 Timer</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+
+function ParseForm(theForm)
+{
+ return true;
+}
+
+function PresetForm(theForm)
+{
+ return true;
+}
+
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="layer2_timer">
+
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="352">
+ <tr>
+ <td width="473">
+ <h2 align="center">Layer 2 (LAPDm) Timers</h2>
+ <div align="center">
+ <center>
+ <table border="1">
+ <tr>
+ <th valign="middle" align="center">Timer Name</th>
+ <th valign="middle" title="Integer(0..65535) (the unit is 5ms)" align="center">Value<br>
+ <font size="1">(in 5ms Units)</font></th>
+ </tr>
+ <tr>
+ <td valign="middle" align="left">SDCCH&nbsp; SAPI 0 Timer<br>
+ ( sdcchSAPI0)</td>
+ </center>
+ </center>
+ <td valign="middle" title="Integer(0..65535) (the unit is 5ms)">
+ <p align="left"><input name="sdcchSAPI0" size="5" maxlenght="5" value="$%sdcchSAPI0#$" onchange="isValidInt(this,0,65535)"></td>
+ </tr>
+ <center>
+ <center>
+ <tr>
+ <td valign="middle" align="left">Full Rate TCH&nbsp; Timer<br>
+ (facchTCHF)</td>
+ </center>
+ </center>
+ <td valign="middle" title="Integer(0..65535) (the unit is 5ms)">
+ <p align="left"><input name="facchTCHF" size="5" maxlenght="5" value="$%facchTCHF#$" onchange="isValidInt(this,0,65535)"></p>
+ </td>
+ </tr>
+ <!-----
+ <tr>
+ <td valign="middle" align="left">Half Rate TCH Timer<br>
+ (facchTCHH)</td>
+ </center>
+ </center>
+ <td valign="middle" title="Integer(0..65535) (the unit is 5ms)">
+ <p align="left"><input name="facchTCHH" size="5" maxlenght="5" value="$%facchTCHH#$" onchange="isValidInt(this,0,65535)"></p>
+ </td>
+ </tr>
+ ----------->
+ <center>
+ <center>
+ <tr>
+ <td valign="middle" align="left">SACCH with TCH SAPI 0 Timer<br>
+ (sacchTCHSAPI0)</td>
+ </center>
+ </center>
+ <td valign="middle" title="Integer(0..65535) (the unit is 5ms)">
+ <p align="left"><input name="sacchTCHSAPI0" size="5" maxlenght="5" value="$%sacchTCHSAPI0#$" onchange="isValidInt(this,0,65535)"></p>
+ </td>
+ </tr>
+ <center>
+ <center>
+ <tr>
+ <td valign="middle" align="left">SACCH with SDCCH Timer<br>
+ (sacchSDCCH)</td>
+ <td valign="middle" title="Integer(0..65535) (the unit is 5ms)">
+ <p align="left"><input name="sacchSDCCH" size="5" maxlenght="5" value="$%sacchSDCCH#$" onchange="isValidInt(this,0,65535)"></td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left">SDCCH, SAPI 3 Timer<br>
+ (sdcchSAPI3)</td>
+ <td valign="middle" title="Integer(0..65535) (the unit is 5ms)"><input name="sdcchSAPI3" size="5" maxlenght="5" value="$%sdcchSAPI3#$"
+ onchange="isValidInt(this,0,65535)"></td>
+ </tr>
+ <tr>
+ <td valign="middle" align="left">SDCCH with TCH, SAPI 3 Timer<br>
+ (sdcchTCHSAPI3)</td>
+ <td valign="middle" title="Integer(0..65535) (the unit is 5ms)"><input name="sdcchTCHSAPI3" size="5" maxlenght="5"
+ value="$%sdcchTCHSAPI3#$" onchange="isValidInt(this,0,65535)"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </center>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p align="center">&nbsp;</p>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/layer3_timer.htm b/data/mnet/GP10/Host/ViperWatch/layer3_timer.htm
new file mode 100644
index 0000000..dff35a8
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/layer3_timer.htm
@@ -0,0 +1,118 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Layer 3 Timer</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+
+function ParseForm(theForm)
+{
+ return true;
+}
+
+function PresetForm(theForm)
+{
+ return true;
+}
+
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="layer2_timer">
+
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="380">
+ <tr>
+ <td width="501">
+ <h2 align="center">Layer 3 (RRM) Timers</h2>
+ <div align="center">
+ <table border="1" width="273">
+ <tr>
+ <td align="left" valign="middle" width="165"><b>&nbsp;Timer Name</b></td>
+ <td align="left" valign="middle" title="Integer(0..65535) (the unit is 10ms)" width="92">
+ <p align="center"><b>&nbsp;Value<br>
+ <font size="1">( in 10ms units)</font></b></td>
+ </tr>
+ <tr>
+ <td align="left" valign="middle" width="165"><span style="text-transform: capitalize">Immediate Assignment<br>
+ &nbsp;(T3101)</span></td>
+ <td align="left" valign="middle" title="Integer(0..65535) (the unit is 10ms)" width="92"><input name="t3101" size="5" maxlenght="5"
+ value="$%t3101#$" onchange="isValidInt(this,0,65535)"></td>
+ </tr>
+ <tr>
+ <td align="left" valign="middle" width="165"><span style="text-transform: capitalize">&nbsp;Handover Command<br>
+ (T3103)</span></td>
+ <td align="left" valign="middle" title="Integer(0..65535) (the unit is 10ms)" width="92"><input name="t3103" size="5" maxlenght="5"
+ value="$%t3103#$" onchange="isValidInt(this,0,65535)"></td>
+ </tr>
+ <tr>
+ <td align="left" valign="middle" width="165"><span style="text-transform: capitalize">physical Information<br>
+ (T3105)</span></td>
+ <td align="left" valign="middle" title="Integer(0..65535) (the unit is 10ms)" width="92"><input name="t3105" size="5" maxlenght="5"
+ value="$%t3105#$" onchange="isValidInt(this,0,65535)"></td>
+ </tr>
+ <tr>
+ <td align="left" valign="middle" width="165"><span style="text-transform: capitalize">Assignment Command<br>
+ (T3107)</span></td>
+ <td align="left" valign="middle" title="Integer(0..65535) (the unit is 10ms)" width="92"><input name="t3107" size="5" maxlenght="5"
+ value="$%t3107#$" onchange="isValidInt(this,0,65535)"></td>
+ </tr>
+ <tr>
+ <td align="left" valign="middle" width="165"><span style="text-transform: capitalize">lower layer failure<br>
+ (T3109)</span></td>
+ <td align="left" valign="middle" title="Integer(0..65535) (the unit is 10ms)" width="92"><input name="t3109" size="5" maxlenght="5"
+ value="$%t3109#$" onchange="isValidInt(this,0,65535)"></td>
+ </tr>
+ <tr>
+ <td align="left" valign="middle" width="165"><span style="text-transform: capitalize">Channel Activation Delay<br>
+ (T3111)</span></td>
+ <td align="left" valign="middle" title="Integer(0..65535) (the unit is 10ms)" width="92"><input name="t3111" size="5" maxlenght="5"
+ value="$%t3111#$" onchange="isValidInt(this,0,65535)"></td>
+ </tr>
+ <tr>
+ <td align="left" valign="middle" width="165"><span style="text-transform: capitalize">Paging Messages<br>
+ (T3113)</span></td>
+ <td align="left" valign="middle" title="Integer(0..65535) (the unit is 10ms)" width="92"><input name="t3113" size="5" maxlenght="5"
+ value="$%t3113#$" onchange="isValidInt(this,0,65535)"></td>
+ </tr>
+ </table>
+ </div>
+ <div align="center">
+ <center>
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </center>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p align="center">&nbsp;</p>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/left_frame.htm b/data/mnet/GP10/Host/ViperWatch/left_frame.htm
new file mode 100644
index 0000000..a42c1f4
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/left_frame.htm
@@ -0,0 +1,387 @@
+<HTML>
+<HEAD>
+<META name="Robots" content="noIndex, Follow">
+<title>Cisco GMS Port Manager Table of Contents</title>
+</head>
+
+<SCRIPT language="javascript">
+
+function OpenAlarm()
+{
+ var url = "./htlm_alarm.htm";
+ var popupWin = window.open (url, "HtmlbasedViperCellAlarm", "width=650,height=200,toolbar=0,scrollbars=1,resizable=1");
+ if (!document.all && window.focus) popupWin.focus();
+}
+
+</SCRIPT>
+
+<SCRIPT language="javascript">
+
+<!-- begin hiding
+
+var orgLinkColor =""; // used to remember link color prior to highlight.
+var linkHilightColor = "green"; // Link highlight color
+
+// ** BEGIN OUTLINE AUTHOR-ADUSTABLE SPECIFICATIONS **//
+
+// size of horizontal indent per level
+var indentPixels = 20
+
+// art files and sizes for three widget styles
+// (all three widgets must have same height/width)
+var collapsedWidget = "./Images/plus.gif"
+var expandedWidget = "./Images/minus.gif"
+var endpointWidget = "./Images/filler.gif" //was end.gif
+var widgetWidth = 11
+var widgetHeight = 11
+
+
+var db = new Array();
+
+// inputArray[0] is an empty string. The data starts at inputArray[1].
+// Expecting a string with lines of this form:
+// TYPE::DISPLAY::"URL"::HELP
+// where type is 0 (part), 1 (preface, index)), 2 (chapter-level),
+// 3 (h1), 4 (h2)
+// how to identify document types:
+// book with parts: if a book has parts, assume it has everything else.
+// book without parts: as soon as you see a type=2, it's got chapters;
+// still look for a part, though
+// single file document: if you get to the end and never see a type=2,
+// then it's a single-file document
+// Check to see if the book has parts or chapters.
+// The answer determines the depth argument.
+
+var hasParts = false;
+var hasChapters = false;
+var inPrefaceyThing = false;
+var recordCount = 1;
+
+var prevLevel = 0;
+
+
+// Create array object containing outline content and attributes.
+// To adapt outline for your use, modify this table.
+// Start the array with [1], and continue without gaps to your last item.
+// The order of the five parameters:
+// 1. Integer of indentation level (0 is leftmost margin level)
+// 2. String to display in outline entry.
+// 3. URL of link for outline entry; Use empty string ("") for no link
+// 4. Help Message to be displayed')
+
+// THIS DEVEDGE DOCUMENT STARTS HERE
+var documentName = "GPManager";
+
+// AddEntry(level, outline text, url, help
+AddEntry(0, "System Information", "main", "welcome.htm", "General Information of this GP10");
+// AddEntry(0, "GP10 Management Info", "main", "vipercell_mgmt_info.htm", "GP10 Management Information");
+AddEntry(0, "GSM MIB", "main", "vipercell_gsm_mib.htm", "GP10 GSM MIB");
+
+AddEntry(1, "Cell Configuration Management", "main", "cell_config_mgmt.htm", "Cell Configuration Management Overview");
+AddEntry(2, "BTS Basic Package", "main", "bts_basic_package.htm", "BTS Basic Package as defined in GSM spec");
+AddEntry(2, "BTS Cell Allocation Table", "main", "bts_cell_allocaiton_table.htm", "BTS Cell Allocation Table");
+AddEntry(2, "BTS CCCH Config Package", "main", "bts_ccch_config_package.htm", "BTS CCCH Config Package");
+AddEntry(2, "BTS Options Package", "main", "bts_options_package.htm", "BTS Options Package");
+AddEntry(2, "First TRX Package", "main", "trx1_package.htm", "First Transceiver Package");
+AddEntry(2, "Second TRX Package", "main", "trx2_package.htm", "Second Transceiver Package");
+AddEntry(2, "First Radio Carrier Package", "main", "rf1_package.htm", "First Radio Carrier Package");
+AddEntry(2, "Second Radio Carrier Package", "main", "rf2_package.htm", "Second Radio Carrier Package");
+
+//AddEntry(2, "Frequency Hopping", "main", "frequency_hopping.htm", "Frequency Hopping Package");
+
+AddEntry(1, "Protocol Configuration Management", "main", "proto_config_mgmt.htm", "Protocol Configuration Management");
+AddEntry(2, "Layer 2 (LAPDm) Timers", "main", "layer2_timer.htm", "Layer 2 (LAPDm) Timers");
+AddEntry(2, "Layer 3 (RRM) Timers", "main", "layer3_timer.htm", "Layer 3 (RRM) Timers");
+AddEntry(2, "Layer 3 (CCM) Timers", "main", "call_config_data.htm", "Layer 3 (CCM) Timers");
+AddEntry(2, "Handover Timers", "main", "handover_timer.htm", "Handover Timers");
+AddEntry(2, "CDR Control Timers", "main", "cdr_timer.htm", "CDR Control Timers");
+
+
+
+AddEntry(1, "Adjacent Cell Configuration Management", "main", "adjcent_cell_mgmt_overview.htm", "Adjacent Cell Management Overview");
+AddEntry(2, "Adjacent Cell Handover Package", "main", "adjcell_handover_package.htm", "Adjacent Cell Handover Package");
+AddEntry(2, "Adjacent Cell Reselection Package", "main", "adjcell_reslection_package.htm", "Adjacent Cell Reselection Package");
+
+//AddEntry(1, "Power Control Management", "main", "power_control_mgmt_overview.htm", "Power Control Management Overview");
+AddEntry(1, "MS Power Control Parameters", "main", "power_control_package.htm", "Power Control Package");
+// AddEntry(2, "Power Control Averaging Parameters", "main", "pc_averaging_parameters.htm", "");
+// AddEntry(2, "Power Control Threshold Parameters", "main", "pc_threshold_parameters.htm", "");
+
+// AddEntry(1, "Handover Control Management", "main", "handover_control_mgmt_overview.htm", "Handover Control Management Overview");
+AddEntry(1, "Handover Control General Parameters", "main", "handover_control_package.htm", "");
+// AddEntry(2, "Handover Averaging Parameters", "main", "ho_averaging_parameters.htm", "");
+// AddEntry(2, "Handover Threshold Parameters", "main", "ho_threshold_parameters.htm", "");
+// AddEntry(2, "Handover Interference Averaging Parameters", "main", "ho_interference_averaging_parameters.htm", "");
+
+AddEntry(1, "Cell Measurement Package", "main", "cell_measurement_overview.htm", "Cell Measurement Overview");
+AddEntry(2, "Cell Measurement Parameters", "main", "cell_measurement.htm", "Cell Measurement Parameters");
+AddEntry(2, "Attempted Immediate Assignment Measurement", "main", "attem_immi_assign.htm", "Attempted Immediate Assignment Procedures per cause");
+AddEntry(2, "Successful Immediate Assignment Measurement", "main", "succ_immi_assi.htm", "Successful Immediate Assignment Measurement per cause");
+
+AddEntry(1, "Call Control Measurement Package", "main", "call_measurement_overview.htm", "Call Measurement Overview");
+AddEntry(2, "Call Control Measurement Parameters", "main", "call_control_measurement.htm", "Call Control Measurement Parameters");
+// AddEntry(2, "External Handovers", "main", "external_handover.htm", "External Handover, per Cause");
+
+//AddEntry(0, "", "", "", "");
+// AddEntry(0, "H323 Mib", "main", "vipercell_h323_overview.htm", "GP10 VoIP MIB overview");
+AddEntry(0, "VoIP Parameters", "main", "h323_parameters.htm", "GP10 VoIP Parameters");
+
+//AddEntry(0, "", "", "", "");
+AddEntry(0, "System Feature Control", "main", "feature_control.htm", "System Feature Configuration");
+
+//AddEntry(0, "", "", "", "");
+// AddEntry(0, "GP10 Config MIB", "main", "vipercell_config_overview.htm", "GP10 Configuration MIB Overview");
+// AddEntry(1, "Call Config Data", "main", "call_config_data.htm", "");
+// AddEntry(1, "Mobility Config Data", "main", "mobility_config_data.htm", "");
+// AddEntry(1, "Radio Resource Config Data", "main", "radio_resource_config_data.htm", "");
+
+//AddEntry(0, "", "", "", "");
+
+AddEntry(0, "GPRS Package", "main", "gprs_overview.htm", "GP10 GPRS Package Overview");
+AddEntry(1, "GPRS Basic Package", "main", "gprs_basic_package.htm", "GPRS Basic Parameters");
+AddEntry(1, "GPRS Option Package", "main", "gprs_options_package.htm", "GPRS Option Parameters");
+AddEntry(1, "GPRS Interface Package", "main", "gprs_interface_overview.htm", "GPRS Interface Parameters");
+AddEntry(2, "RSS Package", "main", "gprs_rss_overview.htm", "RSS Group Parameters");
+AddEntry(3, "RSS Parameter 1", "main", "gprs_interface_rss1.htm", "RSS Parameter 1");
+AddEntry(3, "RSS Parameter 2", "main", "gprs_interface_rss2.htm", "RSS Parameter 2");
+AddEntry(3, "RSS Frequency Table", "main", "gprs_interface_rss_freq_table.htm", "RSS Frequency Table");
+AddEntry(2, "RLCMAC Package", "main", "gprs_interface_rlcmac.htm", "RLCMAC Parameters");
+AddEntry(2, "BSSGP Package", "main", "gprs_interface_bssgp.htm", "BSSGP Parameters");
+AddEntry(1, "GPRS Measurement Package", "main", "gprs_measurement_package.htm", "GPRS Measurement Package");
+
+AddEntry(0, "Maintenance", "main", "maintenance.htm", "GP10 Maintenance Overview");
+AddEntry(1, "User Management", "main", "user_mgmt.htm", "GP10 User Management.");
+AddEntry(1, "Load and Save MIB", "main", "export_import.htm", "Save and Load file to and from a disk file.");
+AddEntry(1, "Reboot GP10", "main", "reboot.htm", "Reboot the GP10");
+AddEntry(1, "Oam Operation Status", "main", "last_error.htm", "Status of Last OAM Oparation");
+AddEntry(1, "Maintenance Command Handler", "main", "mch.htm", "GP10 Maintenance Command Handler Interface");
+AddEntry(1, "CDR Configuration", "main", "ssl_conf.htm", "CDR Configuration for SSL Connection and Password "); // 06/20/01
+AddEntry(1, "CLI Status", "main", "cli.htm", "Get status and terminate CLI session");
+
+//AddEntry(0, "", "", "", "");
+AddEntry(0, "GP10 Specific MIB", "main", "vipercell_specific.htm", "Overview of GP10 Specific MIB");
+AddEntry(1, "Dual TRX Card", "main", "dual_trx_card.htm", "Dual TRX Card Related Parameters");
+// AddEntry(1, "ARFCN RSS Function", "main", "arfcn_rssi_function.htm", "ARFCN RSS Fuction");
+AddEntry(1, "Clock Card", "main", "clock_card.htm", "Clock Card Related Parameters");
+// AddEntry(1, "GPS Card", "main", "gps_card.htm", "GPS Card Related Parameters");
+AddEntry(1, "Power Supply Status", "main", "power_card.htm", "Power Supply Status");
+// AddEntry(1, "External Power Supply", "main", "external_power_supply.htm", "External Power Supply Related Parameters");
+AddEntry(1, "CDC Board", "main", "cdc_board.htm", "CDC Board Specific Parameters");
+
+// AddEntry(1, "Automatic Parameter Allocation", "main", "apa_overview", "Automatic Paramter Allocation Overview");
+// AddEntry(2, "Automatic Parameter Allocation", "main", "automatic_parameter_allocation", "Automatic Parameter Allocation Parameters");
+// AddEntry(2, "Invalid Frequencies", "main", "apa_invalid_frequency_table", "Automatic Parameter Allocation Invalid Frequencies");
+// AddEntry(2, "Clock Source Frequencies", "main", "apa_clock_source_frequency_table", " Automatic Parameter Allocation Source Frequencies");
+
+//AddEntry(0, "", "", "", "");
+//AddEntry(0, "Test and Diagnostic", "main", "mch.htm", "GP10 Maintenance Command Handler Interface"); // commented out 08/02/01
+//AddEntry(0, "ViperAlarm", "footer", "alarm.htm", "GP10 Alarm Interface");
+AddEntry(0, "ViperAlarm Log", "", "javascript:OpenAlarm()", "Html-based GP10 Alarm Log");
+
+// THIS DEVEDGE DOCUMENT ENDS HERE
+
+
+function AddEntry(level, display, target, url, help)
+{
+
+ db[recordCount++] = new dbRecord(false, level, display, target, url, help);
+ if (recordCount-2 > 0)
+ {
+ db[recordCount-2].mother = (level > prevLevel)
+ }
+
+ prevLevel = level;
+}
+
+// object constructor for each outline entry
+function dbRecord(mother, level, display, target, url, help){
+ this.mother = mother // is this item a parent?
+ this.display = display // text to display
+ this.URL = url // link tied to text; if empty string, item appears as straight text
+ this.HELP = help // Displays balloon help
+ this.indent = level // how many levels nested?
+ this.target = target // Target frame
+ return this
+}
+
+// pre-load all images into cache
+var fillerImg = new Image(1,1)
+fillerImg.src = "./Images/filler.gif"
+var collapsedImg = new Image(widgetWidth,widgetHeight)
+collapsedImg.src = collapsedWidget
+var expandedImg = new Image(widgetWidth,widgetHeight)
+expandedImg.src = expandedWidget
+var endpointImg = new Image(widgetWidth,widgetHeight)
+endpointImg.src = endpointWidget
+
+// ** functions that get and set persistent cookie data **
+// set cookie data
+var mycookie = document.cookie
+function setCurrState(setting) {
+ mycookie = document.cookie = "currState=" + escape(setting)
+}
+// retrieve cookie data
+function getCurrState() {
+ var label = "currState="
+ var labelLen = label.length
+ var cLen = mycookie.length
+ var i = 0
+ while (i < cLen) {
+ var j = i + labelLen
+ if (mycookie.substring(i,j) == label) {
+ var cEnd = mycookie.indexOf(";",j)
+ if (cEnd == -1) {
+ cEnd = mycookie.length
+ }
+ return unescape(mycookie.substring(j,cEnd))
+ }
+ i++
+ }
+ return ""
+}
+
+// **function that updates persistent storage of state**
+// toggles an outline mother entry, storing new value in the cookie
+function toggle(n) {
+ if (n != 0) {
+ var newString = ""
+ var currState = getCurrState() // of whole outline
+ var expanded = currState.charAt(n-1) // of clicked item
+ newString += currState.substring(0,n-1)
+ newString += expanded ^ 1 // Bitwise XOR clicked item
+ newString += currState.substring(n,currState.length)
+ setCurrState(newString) // write new state back to cookie
+ }
+}
+
+// **functions used in assembling updated outline**
+// returns the proper GIF file name for each entry's control
+function getGIF(n) {
+ var mom = db[n].mother // is entry a parent?
+ var expanded = getCurrState().charAt(n-1) // of clicked item
+ if (!mom) {
+ return endpointWidget
+ } else {
+ if (expanded == 1) {
+ return expandedWidget
+ }
+ }
+ return collapsedWidget
+}
+
+// returns the proper status line text based on the icon style
+function getGIFStatus(n) {
+ var mom = db[n].mother // is entry a parent
+ var expanded = getCurrState().charAt(n-1) // of rolled item
+ if (!mom) {
+ return "No further items"
+ } else {
+ if (expanded == 1) {
+ return "Click to collapse nested items"
+ }
+ }
+ return "Click to expand nested items"
+}
+
+// initialize 'current state' storage field
+if (getCurrState() == "" || getCurrState().length != (db.length-1)) {
+ initState = ""
+ for (i = 1; i < db.length; i++) {
+ initState += "0"
+ }
+ setCurrState(initState)
+}
+
+function highlight(obj, color) {
+ orgLinkColor = obj.style.color;
+ obj.style.color=color;
+}
+
+function undoHighlight(obj) {
+ obj.style.color=orgLinkColor;
+}
+
+
+function display(obj, display) {
+ obj.style.display=display;
+}
+
+function displayURL(url, display, help, target)
+{
+ document.write(insertURL(url, display, help, target));
+
+}
+
+function insertURL(url, display, help, target)
+{
+ return("<FONT SIZE='-1'> <A target=\"" + target + "\" title=\"" + help + "\" HREF=\"" + url + "\" onMouseOver='highlight(this,linkHilightColor);' onMouseOut='undoHighlight(this);' > " + display + "</A></FONT><BR>")
+}
+
+// end -->
+</SCRIPT>
+
+<body bgcolor="#FFFFFF" text="#000000">
+
+<SCRIPT LANGUAGE="javascript">
+<!-- start
+// build new outline based on the values of the cookie
+// and data points in the outline data array.
+// This fires each time the user clicks on a control,
+// because the HREF for each one reloads the current document.
+var newOutline = ""
+var prevIndentDisplayed = 0
+var showMyDaughter = 0
+// DOCUMENT NAME IS HERE (DEVEDGE INFO WAS PREVIOUSLY HERE ALSO BUT WAS MOVED TO LATER IN FILE)
+document.write("<NOBR><FONT SIZE=-1><B>" + documentName + "</FONT></B></NOBR><BR>")
+// DOCUMENT NAME ENDS HERE
+// cycle through each entry in the outline array
+for (var i = 1; i < db.length; i++) {
+ var theGIF = getGIF(i) // get the image
+ var theGIFStatus = getGIFStatus(i) // get the status message
+ var currIndent = db[i].indent // get the indent level
+ var expanded = getCurrState().charAt(i-1) // current state
+ // display entry only if it meets one of three criteria
+ if (currIndent == 0 || currIndent <= prevIndentDisplayed || (showMyDaughter == 1 && (currIndent - prevIndentDisplayed == 1))) {
+ newOutline += "<NOBR><IMG SRC=\"./Images/filler.gif\" HEIGHT = 1 WIDTH =" + (indentPixels * currIndent) + ">"
+ newOutline += "<A HREF=\"javascript:history.go(0)\" target=_self title=\"" + theGIFStatus + "\" onMouseOver=\"window.status=\'" + theGIFStatus + "\';return true;\" onClick=\"toggle(" + i + ");return " + (theGIF != endpointWidget) + "\">"
+ newOutline += "<IMG SRC=\"" + theGIF + "\" HEIGHT=" + widgetHeight + " WIDTH=" + widgetWidth + " BORDER=0></A>"
+
+ if (db[i].HELP == "" || db[i].HELP == null)
+ db[i].HELP = db[i].URL;
+ if (db[i].URL == "" || db[i].URL == null) {
+ newOutline += " <FONT SIZE='-1'> " + db[i].display + " </FONT> </NOBR><BR>" // no link, just a listed item
+ } else {
+ newOutline += insertURL(db[i].URL, db[i].display, db[i].HELP, db[i].target);
+ }
+ prevIndentDisplayed = currIndent
+ showMyDaughter = expanded
+ if (db.length > 25) {
+ document.write(newOutline)
+ newOutline = ""
+ }
+ }
+}
+// document.write(newOutline)
+
+document.write("<HR>")
+// DEVEDGE INFORMATION STARTS HERE
+
+displayURL("http://www.cisco.com/", "Cisco Systems, Inc.", "Cisco Systems, Inc.", "main");
+displayURL("http://www.cisco.com/public/copyright.html", "Important Notices", "Important Notices", "main");
+displayURL("http://www.cisco.com/public/privacy.html", "Privacy Statement", "Privacy Statement", "main");
+
+document.write("<HR>")
+// DEVEDGE INFORMATION ENDS HERE
+document.write("<NOBR><FONT SIZE=-2>If cookies are disabled,</FONT></NOBR><BR>")
+document.write("<NOBR><FONT SIZE=-2>this outline cannot expand.</FONT></NOBR><BR>")
+document.write("<NOBR><FONT SIZE=-2>This frame is resizable.</FONT></NOBR><BR>")
+
+document.write("<FONT SIZE=-2>Last Modified: Aug 21, 2000</FONT></NOBR>")
+
+// end -->
+
+</script>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/logout.htm b/data/mnet/GP10/Host/ViperWatch/logout.htm
new file mode 100644
index 0000000..3696638
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/logout.htm
@@ -0,0 +1,27 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>User Logout Page</title>
+</head>
+
+<body>
+
+<br>
+<H2>
+You are deauthorized successfully.
+</H2>
+<br>
+<br>
+
+<h3>
+<p>
+If you want to login, please press the page link you want to see
+then you can see a login authentication window.
+</P>
+</h3>
+</body>
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/maintenance.htm b/data/mnet/GP10/Host/ViperWatch/maintenance.htm
new file mode 100644
index 0000000..0d42d99
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/maintenance.htm
@@ -0,0 +1,49 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GP10 OA&amp;M Operation</title>
+</head>
+
+<SCRIPT>
+var linkHilightColor = "green";
+var orgLinkColor;
+
+function highlight(obj, color) {
+ orgLinkColor = obj.style.color;
+ obj.style.color=color;
+}
+
+function undoHighlight(obj) {
+ obj.style.color=orgLinkColor;
+}
+
+
+</SCRIPT>
+
+<body onload="$%reloadTopframe#$">
+
+<h2><nobr>GP10 Maintenance Pages</nobr></h2>
+<p>GP10 Maintenance section contains the following pages:</p>
+<ul>
+ <li><nobr><a href="user_mgmt.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main" title="Configure MIB Data Flush Frequency etc.">User
+ Management</a></nobr></li>
+ <li><nobr><a href="export_import.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Export or Import MIB to and from an ASCII file">Load/Save MIB</a></nobr></li>
+ <li><nobr><a href="reboot.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Reboot the GP10">Reboot GP10</a></nobr></li>
+ <li><nobr><a href="last_error.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Status of Last OAM Oparation">Latest OAM Operation Status</a></nobr></li>
+ <li><nobr><a href="mch.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="GP10 Maintenance Command Handler Interface">Maintenance Command Handler</a><br>
+ <li><nobr><a href="ssl_conf.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="CDR Configuration">CDR Configuration</a><br>
+ <li><nobr><a href="cli.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Get status and terminate CLI session.">CLI Status</a></nobr></li>
+ </ul>
+</nobr>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/mch.htm b/data/mnet/GP10/Host/ViperWatch/mch.htm
new file mode 100644
index 0000000..913322f
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/mch.htm
@@ -0,0 +1,11 @@
+<HTML>
+<HEAD>
+<Title>GP10 Maintenance Command Handler Applet</Title>
+</HEAD>
+<BODY onload="$%reloadTopframe#$">
+<h2 align="left"> Maintenance Command Handler</h2>
+<applet archive="./Java/mch.jar" code=mchControl.class height=480 width=640>
+</applet>
+
+</BODY>
+</HTML> \ No newline at end of file
diff --git a/data/mnet/GP10/Host/ViperWatch/mib_flush.htm b/data/mnet/GP10/Host/ViperWatch/mib_flush.htm
new file mode 100644
index 0000000..a33da8c
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/mib_flush.htm
@@ -0,0 +1,71 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Configure MIB Flush Option</title>
+</head>
+
+<body onload="$%reloadTopframe#$">
+
+<form method="POST" onsubmit="return ParseForm(this)" name="mib_flush">
+ <input type="HIDDEN" name="oam_operation" value="$%oam_operation#$">
+ <table border="0" width="83%" cellspacing="3" cellpadding="3" height="96">
+ <tr>
+ <td width="100%" height="84">
+ <p align="left">&nbsp;
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="557">
+ <tr>
+ <td width="541">
+ <h2 align="center">Configure MIB Flush Option</h2>
+ </center>
+ <div align="center">
+ <table border="0" width="82%">
+ <tr>
+ <td width="100%">
+ <p align="left">This screen allows you configure MIB flush
+ delay timer. The value&nbsp; may range from 2 to 300
+ seconds. Smaller number will result in frequent disk I/O.</td>
+ </tr>
+ </table>
+ </div>
+ <center>
+ <table border="0">
+ <tr>
+ <td>MIB Flush Delay Timer</td>
+ <td><input type="text" name="mibFlushDelayTimer" size="7" value="30"></td>
+ </tr>
+ </table>
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center">&nbsp;</td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()" title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </div>
+ </center></td>
+ </tr>
+ </table>
+ </div>
+ <p align="left"><br>
+ </td>
+ </tr>
+ </table>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/mobility_config_data.htm b/data/mnet/GP10/Host/ViperWatch/mobility_config_data.htm
new file mode 100644
index 0000000..29ae4d3
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/mobility_config_data.htm
@@ -0,0 +1,104 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Parameter</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+
+<SCRIPT Language="JavaScript">
+
+
+function PresetForm(theForm)
+{
+ clickCheckBox(theForm.mm_authenticationRequiredCheck, theForm.mm_authenticationRequired);
+ clickCheckBox(theForm.mm_cipheringRequiredCheck, theForm.mm_cipheringRequired);
+ clickCheckBox(theForm.mm_IMEICheckRequiredCheck, theForm.mm_IMEICheckRequired);
+ return true;
+}
+
+
+function ParseForm(theForm)
+{
+ parseCheckBox(theForm.mm_authenticationRequiredCheck, theForm.mm_authenticationRequired);
+ parseCheckBox(theForm.mm_cipheringRequiredCheck, theForm.mm_cipheringRequired);
+ parseCheckBox(theForm.mm_IMEICheckRequiredCheck, theForm.mm_IMEICheckRequired);
+ return true;
+
+}
+
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this);" name="mm_config_data">
+
+ <input type="hidden" name="mm_authenticationRequired" value="$%mm_authenticationRequired#$" >
+ <input type="hidden" name="mm_cipheringRequired" value="$%mm_cipheringRequired#$" >
+ <input type="hidden" name="mm_IMEICheckRequired" value="$%mm_IMEICheckRequired#$" >
+
+
+
+<div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="384">
+ <tr>
+ <td width="446">
+ <h2 align="center">Mobility Management Configuration&nbsp; Options</h2>
+ <div align="center">
+ <table border="0" width="368">
+ <tr>
+ <td>Max. #&nbsp; of MM Connections</td>
+ <td><font size="1"><input type="text" name="mm_max_mm_connections"size="6" maxlength="6" value="$%mm_max_mm_connections#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td>Paging Response Timer<span lang="FR" style="mso-ansi-language:FR"> -T3113<o:p>
+ </o:p>
+ </span></td>
+ <td><font size="1"><input type="text" name="mm_paging_t3113" size="6" maxlength="6" value="$%mm_paging_t3113#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td>Authentication Required</td>
+ <td><input type="checkbox" name="mm_authenticationRequiredCheck" value="" ></td>
+ </tr>
+ <tr>
+ <td>Ciphering Required<o:p>
+&nbsp;</td>
+ <td><input type="checkbox" name="mm_cipheringRequiredCheck" value="" ></td>
+ </tr>
+ <tr>
+ <td>IMEI Check Required</td>
+ <td><input type="checkbox" name="mm_IMEICheckRequiredCheck" value="" ></td>
+
+ </tr>
+ <tr>
+ <td height="21" width="236"></td>
+ <td height="21" width="118"></td>
+ </tr>
+ </table>
+ </div>
+
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"><input name="B2" type="submit" value="Submit"> </td>
+ <td align="center"> <input name="Recall1" type="button" value="Recall" onclick="window.location.reload()"></td>
+ <td align="center"><input name="Reset1" type="reset" value="Reset"></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+</div>
+
+<p align="center">&nbsp;</p>
+
+</form>
+
+</body>
+
diff --git a/data/mnet/GP10/Host/ViperWatch/mobility_config_data.old.htm b/data/mnet/GP10/Host/ViperWatch/mobility_config_data.old.htm
new file mode 100644
index 0000000..7420e51
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/mobility_config_data.old.htm
@@ -0,0 +1,184 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Parameter</title>
+</head>
+
+<SCRIPT >
+
+function updateCheckBox(theCheckBox)
+{
+
+ if (theCheckBox.value == "1")
+ {
+ theCheckBox.checked = true;
+ } else {
+ theCheckBox.checked = false;
+ }
+}
+
+function presetButtons(theForm)
+{
+ updateCheckBox(theForm.mm_authenticationRequiredCheck);
+ updateCheckBox(theForm.mm_cipheringRequiredCheck);
+ updateCheckBox(theForm.mm_IMEICheckRequiredCheck);
+ return true;
+}
+
+function updateCheckBoxValue(theCheckBox, valueHolder)
+{
+
+ if (theCheckBox.checked == true)
+ {
+ valueHolder.value = "1";
+ }
+
+}
+
+function parseButtons(theForm)
+{
+ updateCheckBoxValue(theForm.mm_authenticationRequiredCheck, theForm.mm_authenticationRequired);
+ updateCheckBoxValue(theForm.mm_cipheringRequiredCheck, theForm.mm_cipheringRequired);
+ updateCheckBoxValue(theForm.mm_IMEICheckRequiredCheck, theForm.mm_IMEICheckRequired);
+ return true;
+
+}
+
+
+</SCRIPT>
+
+<body onload="presetButtons(this.document.forms[0]);$%reloadTopframe#$">
+<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
+function FrontPage_Form1_Validator(theForm)
+{
+
+ if (theForm.mm_max_mm_connections.value == "")
+ {
+ alert("Please enter a value for the \"mm_max_mm_connections\" field.");
+ theForm.mm_max_mm_connections.focus();
+ return (false);
+ }
+
+ if (theForm.mm_max_mm_connections.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"mm_max_mm_connections\" field.");
+ theForm.mm_max_mm_connections.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.mm_max_mm_connections.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"mm_max_mm_connections\" field.");
+ theForm.mm_max_mm_connections.focus();
+ return (false);
+ }
+
+ if (theForm.mm_paging_t3113.value == "")
+ {
+ alert("Please enter a value for the \"mm_paging_t3113\" field.");
+ theForm.mm_paging_t3113.focus();
+ return (false);
+ }
+
+ if (theForm.mm_paging_t3113.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"mm_paging_t3113\" field.");
+ theForm.mm_paging_t3113.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.mm_paging_t3113.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"mm_paging_t3113\" field.");
+ theForm.mm_paging_t3113.focus();
+ return (false);
+ }
+ return (true);
+}
+//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" cellpadding="0" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
+
+<h2 align="center">Mobility Config Parameters</h2>
+
+<div align="center">
+ <center>
+ <table border="1">
+ <tr>
+ <td height="21" align="left"><strong><font face="Times New Roman">Parameter</font></strong></td>
+ <td height="21" align="left"><strong><font face="Times New Roman">Value</font></strong></td>
+ </tr>
+ <tr>
+ <td>Max. #&nbsp; of MM Connections</td>
+ <td><font size="1"><!--webbot bot="Validation" s-data-type="Integer"
+ s-number-separators="x" b-value-required="TRUE" i-maximum-length="6" --><input type="text" name="mm_max_mm_connections" size="6" value="$%mm_max_mm_connections#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td>Paging Response Timer<span lang="FR" style="mso-ansi-language:FR"> -T3113<o:p>
+ </o:p>
+ </span></td>
+ <td><font size="1"><!--webbot bot="Validation" s-data-type="Integer"
+ s-number-separators="x" b-value-required="TRUE" i-maximum-length="6" --><input type="text" name="mm_paging_t3113" size="6" value="$%mm_paging_t3113#$" maxlength="6"></font></td>
+ <tr>
+ <td>Authentication Required</td>
+ <td><input type="checkbox" name="mm_authenticationRequiredCheck" value="$%mm_authenticationRequired#$" ></td>
+ <tr>
+ <td>Ciphering Required<o:p>
+&nbsp;</td>
+ <td><input type="checkbox" name="mm_cipheringRequiredCheck" value="$%mm_cipheringRequired#$" ></td>
+ <tr>
+ <td>IMEI Check Required</td>
+ <td><input type="checkbox" name="mm_IMEICheckRequiredCheck" value="$%mm_IMEICheckRequired#$" ></td>
+
+ <input type="hidden" name="mm_authenticationRequired" value="0" >
+ <input type="hidden" name="mm_cipheringRequired" value="0" >
+ <input type="hidden" name="mm_IMEICheckRequired" value="0" >
+
+
+ </table>
+ </center>
+</div>
+
+<p align="center">&nbsp;<input name="B1" type="submit" value="Submit" onClick="parseButtons(window.document.forms[0]);"> <input name="Recall" type="button" value="Recall" onclick="window.location.reload()"><input name="Reset" type="reset" value="Reset" onclick="presetButtons(window.document.forms[0])"> </p>
+
+</form>
+
+</body>
+
diff --git a/data/mnet/GP10/Host/ViperWatch/oam_config_data.htm b/data/mnet/GP10/Host/ViperWatch/oam_config_data.htm
new file mode 100644
index 0000000..e4e1f4c
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/oam_config_data.htm
@@ -0,0 +1,153 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GP10 Configuration Data</title>
+</head>
+
+<SCRIPT >
+
+function selectOption(theSelect, valueHolder)
+{
+ if (valueHolder.value < 0 && valueHolder.value >= theSelect.length)
+ {
+ window.alert("Incorrect MIB value for " + valueHolder.name + " "+ valueHolder.value + "Corrected to 0");
+ valueHolder.value = 0;
+ }
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].value == valueHolder.value)
+ {
+ theSelect.options[i].selected = true;
+ break;
+ }
+ }
+
+}
+
+
+function presetButtons(theForm)
+{
+
+ selectOption(theForm.oam_operationSelect, theForm.oam_operation);
+ return true;
+}
+
+
+function parseSelect(theSelect, valueHolder)
+{
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].selected)
+ {
+ valueHolder.value = theSelect.options[i].value;
+ break;
+ }
+ }
+}
+
+function parseButtons(theForm)
+{
+ parseSelect(theForm.oam_operationSelect, theForm.oam_operation);
+ //window.alert("Successfully parsed");
+}
+
+</SCRIPT>
+
+<body onload="presetButtons(this.document.forms[0]);$%reloadTopframe#$">
+<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
+function FrontPage_Form1_Validator(theForm)
+{
+
+ if (theForm.oam_mibFileName1.value == "")
+ {
+ alert("Please enter a value for the \"oam mibFileName\" field.");
+ theForm.oam_mibFileName1.focus();
+ return (false);
+ }
+
+ if (theForm.oam_mibFileName1.value.length < 5)
+ {
+ alert("Please enter at least 5 characters in the \"oam mibFileName\" field.");
+ theForm.oam_mibFileName1.focus();
+ return (false);
+ }
+
+ if (theForm.oam_mibFileName1.value.length > 30)
+ {
+ alert("Please enter at most 30 characters in the \"oam mibFileName\" field.");
+ theForm.oam_mibFileName1.focus();
+ return (false);
+ }
+
+ var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-_-.";
+ var checkStr = theForm.oam_mibFileName1.value;
+ var allValid = true;
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ }
+ if (!allValid)
+ {
+ alert("Please enter only letter, digit and \"_-.\" characters in the \"oam mibFileName\" field.");
+ theForm.oam_mibFileName1.focus();
+ return (false);
+ }
+ return (true);
+}
+//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" cellpadding="0" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
+
+ <input type="HIDDEN" name="oam_operation" value="$%oam_operation#$">
+<h2 align="center">MIB Export-Import GP10 MIB<br>
+</h2>
+
+<div align="center">
+ <center>
+ <table border="2" width="60%" cellspacing="3" cellpadding="3">
+ <tr>
+ <td width="100%">This screen will allow you to export or import GP10
+ MIB of $%viperCellName#$ (IP: $%viperCellIPAddress#$)&nbsp;
+ to and from the specified ASCII file.&nbsp;<br>
+ &nbsp;
+
+<div align="left">
+ <table border="0">
+ <tr>
+ <td>MIB File Name:</td>
+ <td>
+ <p style=" padding-top: 0px; padding-bottom: 0px"><!--webbot bot="Validation"
+ s-display-name="oam mibFileName" s-data-type="String" b-allow-letters="TRUE"
+ b-allow-digits="TRUE" s-allow-other-chars="_-." b-value-required="TRUE"
+ i-minimum-length="5" i-maximum-length="30" --><input type="text" name="oam_mibFileName1" size="30" value="$%oam_mibFileName#$" maxlength="30">
+ </tr>
+ <tr>
+ <td>Operation:</td>
+ <td><select name="oam_operationSelect" size="1" title="The file name is only valid for importing and exporting of MIB ascii file.">
+ <option value="5">Import MIB from the ASCII file</option>
+ <option value="6">Export Mib to the ASCII file</option>
+ <option selected value="0">None</option>
+ </select></td>
+ </table>
+</div>
+
+ <p align="center"><input name="Submit" type="submit" value="Submit" onclick="parseButtons(window.document.forms[0])" title="Press this button to commit the change in this page."></td>
+ </tr>
+ </table>
+ </center>
+</div>
+
+<p align="center">&nbsp; </p>
+</form>
+
+</body>
+
diff --git a/data/mnet/GP10/Host/ViperWatch/pc_averaging_parameters.htm b/data/mnet/GP10/Host/ViperWatch/pc_averaging_parameters.htm
new file mode 100644
index 0000000..4a51dc9
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/pc_averaging_parameters.htm
@@ -0,0 +1,379 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-us">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Handover Control Package</title>
+</head>
+<SCRIPT >
+
+function clickButton(theRadio, valueHolder)
+{
+ if (valueHolder.value != 0 && valueHolder.value != 1)
+ {
+ window.alert("Incorrect MIB value for " + valueHolder.name + " "+ valueHolder.value + "Corrected to 0");
+ valueHolder.value = 0;
+ }
+
+ for (var i = 0; i < theRadio.length; i++)
+ {
+ if (theRadio[i].value == valueHolder.value)
+ {
+ theRadio[i].click();
+ break;
+ }
+ }
+}
+
+function selectOption(theSelect, valueHolder)
+{
+ if (valueHolder.value < 0 && valueHolder.value >= theSelect.length)
+ {
+ window.alert("Incorrect MIB value for " + valueHolder.name + " "+ valueHolder.value + "Corrected to 0");
+ valueHolder.value = 0;
+ }
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].value == valueHolder.value)
+ {
+ theSelect.options[i].selected = true;
+ break;
+ }
+ }
+
+}
+
+function clickCheckBox(theCheckBox)
+{
+
+ // window.alert("length " + theCheckBox.length );
+ for (var i = 0; i < theCheckBox.length; i++)
+ {
+ if (!((theCheckBox[i].value == 0) || (theCheckBox[i].checked)) )
+ {
+ theCheckBox[i].click();
+ }
+ }
+
+}
+
+
+
+function presetButtons(theForm)
+{
+ selectOption(theForm.pcAveragingLevWeightingSelect, theForm.pcAveragingLevWeighting);
+ selectOption(theForm.pcAveragingQualWeightingSelect, theForm.pcAveragingQualWeighting);
+return true;
+}
+
+function parseRadio(radioButton, valueHolder)
+{
+ for (var i = 0; i < radioButton.length; i++)
+ {
+ if (radioButton[i].checked)
+ {
+ valueHolder.value = radioButton[i].value;
+ break;
+ }
+ }
+}
+
+function parseSelect(theSelect, valueHolder)
+{
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].selected)
+ {
+ valueHolder.value = theSelect.options[i].value;
+ break;
+ }
+ }
+}
+function parseButtons(theForm)
+{
+ parseSelect(theForm.pcAveragingLevWeightingSelect, theForm.pcAveragingLevWeighting);
+ parseSelect(theForm.pcAveragingQualWeightingSelect, theForm.pcAveragingQualWeighting);
+ return true;
+}
+</SCRIPT>
+
+<body onload="presetButtons(this.document.forms[0]);$%reloadTopframe#$">
+
+<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
+function FrontPage_Form1_Validator(theForm)
+{
+
+ if (theForm.pcAveragingLevHreqave.value == "")
+ {
+ alert("Please enter a value for the \"Handover Averaging Level Hreqave\" field.");
+ theForm.pcAveragingLevHreqave.focus();
+ return (false);
+ }
+
+ if (theForm.pcAveragingLevHreqave.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Handover Averaging Level Hreqave\" field.");
+ theForm.pcAveragingLevHreqave.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcAveragingLevHreqave.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Handover Averaging Level Hreqave\" field.");
+ theForm.pcAveragingLevHreqave.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Handover Averaging Level Hreqave\" field.");
+ theForm.pcAveragingLevHreqave.focus();
+ return (false);
+ }
+
+ if (theForm.pcAveragingLevHreqt.value == "")
+ {
+ alert("Please enter a value for the \"Handover Averaging Level Hreqt\" field.");
+ theForm.pcAveragingLevHreqt.focus();
+ return (false);
+ }
+
+ if (theForm.pcAveragingLevHreqt.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Handover Averaging Level Hreqt\" field.");
+ theForm.pcAveragingLevHreqt.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcAveragingLevHreqt.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Handover Averaging Level Hreqt\" field.");
+ theForm.pcAveragingLevHreqt.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Handover Averaging Level Hreqt\" field.");
+ theForm.pcAveragingLevHreqt.focus();
+ return (false);
+ }
+
+ if (theForm.pcAveragingQualHreqave.value == "")
+ {
+ alert("Please enter a value for the \"Handover Averaging Signal Quality Hreqave\" field.");
+ theForm.pcAveragingQualHreqave.focus();
+ return (false);
+ }
+
+ if (theForm.pcAveragingQualHreqave.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Handover Averaging Signal Quality Hreqave\" field.");
+ theForm.pcAveragingQualHreqave.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcAveragingQualHreqave.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Handover Averaging Signal Quality Hreqave\" field.");
+ theForm.pcAveragingQualHreqave.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Handover Averaging Signal Quality Hreqave\" field.");
+ theForm.pcAveragingQualHreqave.focus();
+ return (false);
+ }
+
+ if (theForm.pcAveragingQualHreqt.value == "")
+ {
+ alert("Please enter a value for the \"Handover Averaging Quality Hreqt\" field.");
+ theForm.pcAveragingQualHreqt.focus();
+ return (false);
+ }
+
+ if (theForm.pcAveragingQualHreqt.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Handover Averaging Quality Hreqt\" field.");
+ theForm.pcAveragingQualHreqt.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcAveragingQualHreqt.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Handover Averaging Quality Hreqt\" field.");
+ theForm.pcAveragingQualHreqt.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Handover Averaging Quality Hreqt\" field.");
+ theForm.pcAveragingQualHreqt.focus();
+ return (false);
+ }
+ return (true);
+}
+//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
+
+<div align="center">
+ <center>
+ <table border="0" cellpadding="0" cellspacing="0" height="280" width="407">
+ <tr>
+ <th valign="top" height="36" width="383" align="center"><font size="4">Power Control Averaging Parameters</font></th>
+ </tr>
+ <tr>
+ <td valign="top" height="125" width="383" align="center">
+
+ <div align="center">
+ <center>
+ <table border="1" cellspacing="1" width="411">
+ <tr>
+ <th colspan="2" height="15" width="401">
+ <p align="center">Level Parameters (Signal Strength)</th>
+ </tr>
+ <tr>
+ <td height="22" width="208">Hreqave</td>
+ <td height="22" width="187"><!--webbot bot="Validation" S-Display-Name="Handover Averaging Level Hreqave" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="pcAveragingLevHreqave" size="2" value="$%pcAveragingLevHreqave#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td height="30" width="208">Hreqt</td>
+ <td height="30" width="187"><!--webbot bot="Validation" S-Display-Name="Handover Averaging Level Hreqt" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="pcAveragingLevHreqt" size="2" value="$%pcAveragingLevHreqt#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td height="24" width="208">Weighting</td>
+ <td height="24" width="187"><select size="1" name="pcAveragingLevWeightingSelect">
+ <option value="1">1</option>
+ <option value="2">2</option>
+ <option value="3">3</option>
+ </select></td>
+ </tr>
+ <input type="hidden" name="pcAveragingLevWeighting" value="$%pcAveragingLevWeighting#$">
+ </table>
+ </center>
+ </div>
+
+ </td>
+ </tr>
+ <tr>
+ <td align="center" valign="top" height="10" width="383">
+ <table border="1" height="104" width="408">
+ <tr>
+ <th colspan="2" height="8" align="left" width="398">
+ <p align="center">Quality&nbsp; Parameters (Signal Quality)</th>
+ </tr>
+ <tr>
+ <td height="24" align="left" width="210">Hreqave</td>
+ <td height="24" align="left" width="182"><!--webbot bot="Validation" S-Display-Name="Handover Averaging Signal Quality Hreqave" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="pcAveragingQualHreqave" size="2" value="$%pcAveragingQualHreqave#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td height="24" align="left" width="210">Hreqt</td>
+ <td height="24" align="left" width="182"><!--webbot bot="Validation" S-Display-Name="Handover Averaging Quality Hreqt" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="pcAveragingQualHreqt" size="2" value="$%pcAveragingQualHreqt#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td height="24" align="left" width="210">Weighting</td>
+ <td height="24" align="left" width="182"><select size="1" name="pcAveragingQualWeightingSelect">
+ <option value="1">1</option>
+ <option value="2">2</option>
+ <option value="3">3</option>
+ </select></td>
+ <input type="hidden" name="pcAveragingQualWeighting" value="$%pcAveragingQualWeighting#$">
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </center>
+</div>
+
+<p align="center"><input name="B1" type="submit" value="Submit" onclick="parseButtons(window.document.forms[0])"> <input name="Recall" type="button" value="Recall" onclick="window.location.reload()"> <input name="Reset" type="reset" value="Reset" onclick="presetButtons(window.document.forms[0])"> </p>
+</form>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/pc_threshold_parameters.htm b/data/mnet/GP10/Host/ViperWatch/pc_threshold_parameters.htm
new file mode 100644
index 0000000..8c854a3
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/pc_threshold_parameters.htm
@@ -0,0 +1,908 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-us">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Handover Control Package</title>
+</head>
+
+<body onload="$%reloadTopframe#$">
+<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
+function FrontPage_Form1_Validator(theForm)
+{
+
+ if (theForm.pcLowerThresholdLevParamRxLevelUL.value == "")
+ {
+ alert("Please enter a value for the \"pcLowerThresholdLevParamRxLevelUL\" field.");
+ theForm.pcLowerThresholdLevParamRxLevelUL.focus();
+ return (false);
+ }
+
+ if (theForm.pcLowerThresholdLevParamRxLevelUL.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"pcLowerThresholdLevParamRxLevelUL\" field.");
+ theForm.pcLowerThresholdLevParamRxLevelUL.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcLowerThresholdLevParamRxLevelUL.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"pcLowerThresholdLevParamRxLevelUL\" field.");
+ theForm.pcLowerThresholdLevParamRxLevelUL.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "63"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"63\" in the \"pcLowerThresholdLevParamRxLevelUL\" field.");
+ theForm.pcLowerThresholdLevParamRxLevelUL.focus();
+ return (false);
+ }
+
+ if (theForm.pcLowerThresholdLevParamRxLevelDL.value == "")
+ {
+ alert("Please enter a value for the \"pcLowerThresholdLevParamRxLevelDL\" field.");
+ theForm.pcLowerThresholdLevParamRxLevelDL.focus();
+ return (false);
+ }
+
+ if (theForm.pcLowerThresholdLevParamRxLevelDL.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"pcLowerThresholdLevParamRxLevelDL\" field.");
+ theForm.pcLowerThresholdLevParamRxLevelDL.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcLowerThresholdLevParamRxLevelDL.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"pcLowerThresholdLevParamRxLevelDL\" field.");
+ theForm.pcLowerThresholdLevParamRxLevelDL.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "63"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"63\" in the \"pcLowerThresholdLevParamRxLevelDL\" field.");
+ theForm.pcLowerThresholdLevParamRxLevelDL.focus();
+ return (false);
+ }
+
+ if (theForm.pcLowerThresholdLevParamPx.value == "")
+ {
+ alert("Please enter a value for the \"pcLowerThresholdLevParamPx\" field.");
+ theForm.pcLowerThresholdLevParamPx.focus();
+ return (false);
+ }
+
+ if (theForm.pcLowerThresholdLevParamPx.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"pcLowerThresholdLevParamPx\" field.");
+ theForm.pcLowerThresholdLevParamPx.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcLowerThresholdLevParamPx.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"pcLowerThresholdLevParamPx\" field.");
+ theForm.pcLowerThresholdLevParamPx.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"pcLowerThresholdLevParamPx\" field.");
+ theForm.pcLowerThresholdLevParamPx.focus();
+ return (false);
+ }
+
+ if (theForm.pcLowerThresholdLevParamNx.value == "")
+ {
+ alert("Please enter a value for the \"pcLowerThresholdLevParamNx\" field.");
+ theForm.pcLowerThresholdLevParamNx.focus();
+ return (false);
+ }
+
+ if (theForm.pcLowerThresholdLevParamNx.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"pcLowerThresholdLevParamNx\" field.");
+ theForm.pcLowerThresholdLevParamNx.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcLowerThresholdLevParamNx.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"pcLowerThresholdLevParamNx\" field.");
+ theForm.pcLowerThresholdLevParamNx.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"pcLowerThresholdLevParamNx\" field.");
+ theForm.pcLowerThresholdLevParamNx.focus();
+ return (false);
+ }
+
+ if (theForm.pcUpperThresholdLevParamRxLevelUL.value == "")
+ {
+ alert("Please enter a value for the \"pcUpperThresholdLevParamRxLevelUL\" field.");
+ theForm.pcUpperThresholdLevParamRxLevelUL.focus();
+ return (false);
+ }
+
+ if (theForm.pcUpperThresholdLevParamRxLevelUL.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"pcUpperThresholdLevParamRxLevelUL\" field.");
+ theForm.pcUpperThresholdLevParamRxLevelUL.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcUpperThresholdLevParamRxLevelUL.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"pcUpperThresholdLevParamRxLevelUL\" field.");
+ theForm.pcUpperThresholdLevParamRxLevelUL.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "63"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"63\" in the \"pcUpperThresholdLevParamRxLevelUL\" field.");
+ theForm.pcUpperThresholdLevParamRxLevelUL.focus();
+ return (false);
+ }
+
+ if (theForm.pcUpperThresholdLevParamRxLevelDL.value == "")
+ {
+ alert("Please enter a value for the \"pcUpperThresholdLevParamRxLevelDL\" field.");
+ theForm.pcUpperThresholdLevParamRxLevelDL.focus();
+ return (false);
+ }
+
+ if (theForm.pcUpperThresholdLevParamRxLevelDL.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"pcUpperThresholdLevParamRxLevelDL\" field.");
+ theForm.pcUpperThresholdLevParamRxLevelDL.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcUpperThresholdLevParamRxLevelDL.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"pcUpperThresholdLevParamRxLevelDL\" field.");
+ theForm.pcUpperThresholdLevParamRxLevelDL.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "63"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"63\" in the \"pcUpperThresholdLevParamRxLevelDL\" field.");
+ theForm.pcUpperThresholdLevParamRxLevelDL.focus();
+ return (false);
+ }
+
+ if (theForm.pcUpperThresholdLevParamPx.value == "")
+ {
+ alert("Please enter a value for the \"pcUpperThresholdLevParamPx\" field.");
+ theForm.pcUpperThresholdLevParamPx.focus();
+ return (false);
+ }
+
+ if (theForm.pcUpperThresholdLevParamPx.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"pcUpperThresholdLevParamPx\" field.");
+ theForm.pcUpperThresholdLevParamPx.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcUpperThresholdLevParamPx.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"pcUpperThresholdLevParamPx\" field.");
+ theForm.pcUpperThresholdLevParamPx.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"pcUpperThresholdLevParamPx\" field.");
+ theForm.pcUpperThresholdLevParamPx.focus();
+ return (false);
+ }
+
+ if (theForm.pcUpperThresholdLevParamNx.value == "")
+ {
+ alert("Please enter a value for the \"Number of out of range averages\" field.");
+ theForm.pcUpperThresholdLevParamNx.focus();
+ return (false);
+ }
+
+ if (theForm.pcUpperThresholdLevParamNx.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Number of out of range averages\" field.");
+ theForm.pcUpperThresholdLevParamNx.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcUpperThresholdLevParamNx.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Number of out of range averages\" field.");
+ theForm.pcUpperThresholdLevParamNx.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Number of out of range averages\" field.");
+ theForm.pcUpperThresholdLevParamNx.focus();
+ return (false);
+ }
+
+ if (theForm.pcLowerThresholdQualParamRxQualUL.value == "")
+ {
+ alert("Please enter a value for the \"pcLowerThresholdQualParamRxQualUL\" field.");
+ theForm.pcLowerThresholdQualParamRxQualUL.focus();
+ return (false);
+ }
+
+ if (theForm.pcLowerThresholdQualParamRxQualUL.value.length > 1)
+ {
+ alert("Please enter at most 1 characters in the \"pcLowerThresholdQualParamRxQualUL\" field.");
+ theForm.pcLowerThresholdQualParamRxQualUL.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcLowerThresholdQualParamRxQualUL.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"pcLowerThresholdQualParamRxQualUL\" field.");
+ theForm.pcLowerThresholdQualParamRxQualUL.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "7"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"7\" in the \"pcLowerThresholdQualParamRxQualUL\" field.");
+ theForm.pcLowerThresholdQualParamRxQualUL.focus();
+ return (false);
+ }
+
+ if (theForm.pcLowerThresholdQualParamRxQualDL.value == "")
+ {
+ alert("Please enter a value for the \"pcLowerThresholdQualParamRxQualDL\" field.");
+ theForm.pcLowerThresholdQualParamRxQualDL.focus();
+ return (false);
+ }
+
+ if (theForm.pcLowerThresholdQualParamRxQualDL.value.length > 1)
+ {
+ alert("Please enter at most 1 characters in the \"pcLowerThresholdQualParamRxQualDL\" field.");
+ theForm.pcLowerThresholdQualParamRxQualDL.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcLowerThresholdQualParamRxQualDL.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"pcLowerThresholdQualParamRxQualDL\" field.");
+ theForm.pcLowerThresholdQualParamRxQualDL.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "7"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"7\" in the \"pcLowerThresholdQualParamRxQualDL\" field.");
+ theForm.pcLowerThresholdQualParamRxQualDL.focus();
+ return (false);
+ }
+
+ if (theForm.pcLowerThresholdQualParamPx.value == "")
+ {
+ alert("Please enter a value for the \"Number of total distance measurements (N8)\" field.");
+ theForm.pcLowerThresholdQualParamPx.focus();
+ return (false);
+ }
+
+ if (theForm.pcLowerThresholdQualParamPx.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Number of total distance measurements (N8)\" field.");
+ theForm.pcLowerThresholdQualParamPx.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcLowerThresholdQualParamPx.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Number of total distance measurements (N8)\" field.");
+ theForm.pcLowerThresholdQualParamPx.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Number of total distance measurements (N8)\" field.");
+ theForm.pcLowerThresholdQualParamPx.focus();
+ return (false);
+ }
+
+ if (theForm.pcLowerThresholdQualParamNx.value == "")
+ {
+ alert("Please enter a value for the \"Number of distance grater than max distance (P8)\" field.");
+ theForm.pcLowerThresholdQualParamNx.focus();
+ return (false);
+ }
+
+ if (theForm.pcLowerThresholdQualParamNx.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"Number of distance grater than max distance (P8)\" field.");
+ theForm.pcLowerThresholdQualParamNx.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcLowerThresholdQualParamNx.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Number of distance grater than max distance (P8)\" field.");
+ theForm.pcLowerThresholdQualParamNx.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"Number of distance grater than max distance (P8)\" field.");
+ theForm.pcLowerThresholdQualParamNx.focus();
+ return (false);
+ }
+
+ if (theForm.pcUpperThresholdQualParamRxQualUL.value == "")
+ {
+ alert("Please enter a value for the \"Threshold level for handover, reason uplink signal quality (L_RX\" field.");
+ theForm.pcUpperThresholdQualParamRxQualUL.focus();
+ return (false);
+ }
+
+ if (theForm.pcUpperThresholdQualParamRxQualUL.value.length > 1)
+ {
+ alert("Please enter at most 1 characters in the \"Threshold level for handover, reason uplink signal quality (L_RX\" field.");
+ theForm.pcUpperThresholdQualParamRxQualUL.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcUpperThresholdQualParamRxQualUL.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Threshold level for handover, reason uplink signal quality (L_RX\" field.");
+ theForm.pcUpperThresholdQualParamRxQualUL.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "7"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"7\" in the \"Threshold level for handover, reason uplink signal quality (L_RX\" field.");
+ theForm.pcUpperThresholdQualParamRxQualUL.focus();
+ return (false);
+ }
+
+ if (theForm.pcUpperThresholdQualParamRxQualDL.value == "")
+ {
+ alert("Please enter a value for the \"Threshold level for handover, reason downlink signal quality (L_\" field.");
+ theForm.pcUpperThresholdQualParamRxQualDL.focus();
+ return (false);
+ }
+
+ if (theForm.pcUpperThresholdQualParamRxQualDL.value.length > 1)
+ {
+ alert("Please enter at most 1 characters in the \"Threshold level for handover, reason downlink signal quality (L_\" field.");
+ theForm.pcUpperThresholdQualParamRxQualDL.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcUpperThresholdQualParamRxQualDL.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"Threshold level for handover, reason downlink signal quality (L_\" field.");
+ theForm.pcUpperThresholdQualParamRxQualDL.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "7"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"7\" in the \"Threshold level for handover, reason downlink signal quality (L_\" field.");
+ theForm.pcUpperThresholdQualParamRxQualDL.focus();
+ return (false);
+ }
+
+ if (theForm.pcUpperThresholdQualParamPx.value == "")
+ {
+ alert("Please enter a value for the \"The number of averages to be considered (N6)\" field.");
+ theForm.pcUpperThresholdQualParamPx.focus();
+ return (false);
+ }
+
+ if (theForm.pcUpperThresholdQualParamPx.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"The number of averages to be considered (N6)\" field.");
+ theForm.pcUpperThresholdQualParamPx.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcUpperThresholdQualParamPx.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"The number of averages to be considered (N6)\" field.");
+ theForm.pcUpperThresholdQualParamPx.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"The number of averages to be considered (N6)\" field.");
+ theForm.pcUpperThresholdQualParamPx.focus();
+ return (false);
+ }
+
+ if (theForm.pcUpperThresholdQualParamNx.value == "")
+ {
+ alert("Please enter a value for the \"The number of out of range averages ( P6)\" field.");
+ theForm.pcUpperThresholdQualParamNx.focus();
+ return (false);
+ }
+
+ if (theForm.pcUpperThresholdQualParamNx.value.length > 2)
+ {
+ alert("Please enter at most 2 characters in the \"The number of out of range averages ( P6)\" field.");
+ theForm.pcUpperThresholdQualParamNx.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.pcUpperThresholdQualParamNx.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"The number of out of range averages ( P6)\" field.");
+ theForm.pcUpperThresholdQualParamNx.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "31"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"31\" in the \"The number of out of range averages ( P6)\" field.");
+ theForm.pcUpperThresholdQualParamNx.focus();
+ return (false);
+ }
+ return (true);
+}
+//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
+
+<p align="center"><font size="5">Power Control Threshold Parameters</font></p>
+
+<div align="center">
+ <center>
+ <table border="1" cellpadding="0" cellspacing="0" height="383" width="678">
+ <tr>
+ <th align="center" valign="top" colspan="2" height="22" width="308">Lower Threshold</th>
+ <td align="right" valign="top" height="22" width="370">
+ <p align="center"><font size="4">Upper Threshold</font></td>
+ </tr>
+ <tr>
+ <td align="right" valign="top" height="100" rowspan="2" width="7"></td>
+ <td valign="top" height="5" align="center" width="297">
+ <table border="1" cellspacing="1" width="291">
+ <tr>
+ <th colspan="2" width="281">
+ <p align="center">Level Parameters (Signal Strength)</th>
+ </tr>
+ <tr>
+ <td width="186">RxLevelUL</td>
+ <td width="89"><!--webbot bot="Validation" s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-maximum-length="2" s-validation-constraint="Greater than or equal to" s-validation-value="0" s-validation-constraint="Less than or equal to" s-validation-value="63" --><input type="text" name="pcLowerThresholdLevParamRxLevelUL" size="2" value="$%pcLowerThresholdLevParamRxLevelUL#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td width="186">RxLevelDL</td>
+ <td width="89"><!--webbot bot="Validation" s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-maximum-length="2" s-validation-constraint="Greater than or equal to" s-validation-value="0" s-validation-constraint="Less than or equal to" s-validation-value="63" --><input type="text" name="pcLowerThresholdLevParamRxLevelDL" size="2" value="$%pcLowerThresholdLevParamRxLevelDL#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td width="186">Px</td>
+ <td width="89"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="pcLowerThresholdLevParamPx" size="2" value="$%pcLowerThresholdLevParamPx#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td width="186">&nbsp;Nx</td>
+ <td width="89"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="pcLowerThresholdLevParamNx" size="2" value="$%pcLowerThresholdLevParamNx#$" maxlength="2"></td>
+ </tr>
+ </table>
+ </td>
+ <td valign="top" height="5" align="center" width="368">
+ <table border="1" cellspacing="1" width="100%">
+ <tr>
+ <th colspan="2" height="15">
+ <p align="center">Level Parameters (Signal Strength)</th>
+ </tr>
+ <tr>
+ <td height="24">RxLevelUL</td>
+ <td height="24"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="63" --><input type="text" name="pcUpperThresholdLevParamRxLevelUL" size="2" value="$%pcUpperThresholdLevParamRxLevelUL#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td height="24">RxLevelDL</td>
+ <td height="24"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="63" --><input type="text" name="pcUpperThresholdLevParamRxLevelDL" size="2" value="$%pcUpperThresholdLevParamRxLevelDL#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td height="24">Px</td>
+ <td height="24"><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="pcUpperThresholdLevParamPx" size="2" value="$%pcUpperThresholdLevParamPx#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td height="24">Nx</td>
+ <td height="24"><!--webbot bot="Validation" S-Display-Name="Number of out of range averages" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="pcUpperThresholdLevParamNx" size="2" value="$%pcUpperThresholdLevParamNx#$" maxlength="2"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td align="center" valign="top" height="95" width="297">
+ <table border="1" cellspacing="1" width="98%">
+ <tr>
+ <th colspan="2">
+ <p align="center">Quality Parameters (Signal Quality)</th>
+ </tr>
+ <tr>
+ <td>RxQualUL</td>
+ <td><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="1" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="7" --><input type="text" name="pcLowerThresholdQualParamRxQualUL" size="1" value="$%pcLowerThresholdQualParamRxQualUL#$" maxlength="1">
+ &nbsp;</td>
+ </tr>
+ <tr>
+ <td>RxQualDL</td>
+ <td><!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="1" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="7" --><input type="text" name="pcLowerThresholdQualParamRxQualDL" size="1" value="$%pcLowerThresholdQualParamRxQualDL#$" maxlength="1"></td>
+ </tr>
+ <tr>
+ <td>Px</td>
+ <td><!--webbot bot="Validation" S-Display-Name="Number of total distance measurements (N8)" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="pcLowerThresholdQualParamPx" size="2" value="$%pcLowerThresholdQualParamPx#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td>Nx</td>
+ <td><!--webbot bot="Validation" S-Display-Name="Number of distance grater than max distance (P8)" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="pcLowerThresholdQualParamNx" size="2" value="$%pcLowerThresholdQualParamNx#$" maxlength="2"></td>
+ </tr>
+ </table>
+ </td>
+ <td align="center" valign="top" height="95" width="368">
+ <table border="1" cellspacing="1" width="100%">
+ <tr>
+ <th colspan="2" height="19">
+ <p align="center">Quality Parameters (Signal Quality)</th>
+ </tr>
+ <tr>
+ <td height="21">RxQualUL</td>
+ <td height="21"><!--webbot bot="Validation" S-Display-Name="Threshold level for handover, reason uplink signal quality (L_RXQUAL_UL_H)" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="1" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="7" --><input type="text" name="pcUpperThresholdQualParamRxQualUL" size="1" value="$%pcUpperThresholdQualParamRxQualUL#$" maxlength="1"></td>
+ </tr>
+ <tr>
+ <td height="23">RxQualDL</td>
+ <td height="23"><!--webbot bot="Validation" S-Display-Name="Threshold level for handover, reason downlink signal quality (L_RXQUAL_DL_H)" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="1" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="7" --><input type="text" name="pcUpperThresholdQualParamRxQualDL" size="1" value="$%pcUpperThresholdQualParamRxQualDL#$" maxlength="1"></td>
+ </tr>
+ <tr>
+ <td height="23">Px</td>
+ <td height="23"><!--webbot bot="Validation" S-Display-Name="The number of averages to be considered (N6)" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="pcUpperThresholdQualParamPx" size="2" value="$%pcUpperThresholdQualParamPx#$" maxlength="2"></td>
+ </tr>
+ <tr>
+ <td height="23">Nx</td>
+ <td height="23"><!--webbot bot="Validation" S-Display-Name="The number of out of range averages ( P6)" S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE" I-Maximum-Length="2" S-Validation-Constraint="Greater than or equal to" S-Validation-Value="0" S-Validation-Constraint="Less than or equal to" S-Validation-Value="31" --><input type="text" name="pcUpperThresholdQualParamNx" size="2" value="$%pcUpperThresholdQualParamNx#$" maxlength="2"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </center>
+</div>
+
+<p align="center"><input name="B1" type="submit" value="Submit" > <input name="Recall" type="button" value="Recall" onclick="window.location.reload()"> <input name="Reset" type="reset" value="Reset"> </p>
+</form>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/power_card.htm b/data/mnet/GP10/Host/ViperWatch/power_card.htm
new file mode 100644
index 0000000..70f615d
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/power_card.htm
@@ -0,0 +1,82 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Power Card</title>
+</head>
+
+<SCRIPT >
+
+function presetButtons(theForm)
+{
+
+ return true;
+}
+
+function parseButtons(theForm)
+{
+ return true;
+}
+
+function displayPwrVolt(volt)
+{
+ var aVolt = volt.split("=");
+ if(aVolt.length >1)
+ {
+ document.write("<tr><td>" + aVolt[0] +" </td><td> " + aVolt[1] + "</td> </tr>\n");
+ }
+}
+
+function displayPwrVolts(thePwrStatus)
+{
+ var aVolts = thePwrStatus.split("|");
+ for (var i=0; i< aVolts .length; i++)
+ {
+ displayPwrVolt(aVolts[i])
+ }
+}
+
+
+
+</SCRIPT>
+
+<body onload="presetButtons(this.document.forms[0]);$%reloadTopframe#$">
+<form method="POST" cellpadding="0" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
+
+<div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="440">
+ <tr>
+ <td width="502">
+ <h2 align="center">Power Supply Status</h2>
+ <div align="center">
+ <table border="1" width="352">
+ <tr>
+ <td height="23" width="175"><b>Expected Voltage (± 5%)</b></td>
+ <td height="23" width="163"><b>Actual Voltage</b></td>
+ </tr>
+ <script language="JavaScript"> displayPwrVolts("$%cdcPwrSupplyStatus#$"); </script>
+ </table>
+ </div>
+
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"> <input name="Recall1" type="button" value="Recall" onclick="window.location.reload()"></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+</div>
+
+<p align="center">&nbsp;</p>
+
+</form>
+
+</body>
+
diff --git a/data/mnet/GP10/Host/ViperWatch/power_control_mgmt_overview.htm b/data/mnet/GP10/Host/ViperWatch/power_control_mgmt_overview.htm
new file mode 100644
index 0000000..b7f970e
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/power_control_mgmt_overview.htm
@@ -0,0 +1,70 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>New Page 1</title>
+</head>
+
+<body onload="$%reloadTopframe#$">
+
+<SCRIPT language="JavaScript" src="./js/link.js"></SCRIPT>
+
+<h2><nobr>GP10 Specific MIB</nobr></h2>
+<p>GP10 Specific&nbsp; section of the MIB consists of the following:</p>
+<ul>
+ <li><nobr><a href="dual_trx_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Dual TRX Card Related Parameters">Dual TRX Card</a></nobr></li>
+ <li><nobr><a href="arfcn_rssi_function.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="ARFCN RSS Fuction">AR</a><a
+ href="arfcn_rssi_function.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="ARFCN RSS Fuction">FCN RSS Function</a></nobr></li>
+ <li><nobr><a href="clock_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Clock Card Related Parameters">Clock Card</a></nobr></li>
+ <li><nobr><a href="gps_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="GPS Card Related Parameters">GPS Card</a></nobr></li>
+ <li><nobr><a href="power_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Power Card Related Parameters">Power Card</a></nobr></li>
+ <li><nobr><a href="external_power_supply.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="External Power Supply Related Parameters">External Power Supply</a></nobr></li>
+ <li><nobr><a href="cdc_board.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="CDC Board Specific Parameters">CDC Board</a></nobr></li>
+</ul>
+<ul>
+ <li><nobr><a href="automatic_parameter_allocation.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Automatic Parameter Allocation Parameters">Automatic Parameter
+ Allocation</a></nobr></li>
+ <li><nobr><a href="apa_invalid_frequency_table.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Automatic Parameter Allocation Invalid Frequencies">Automatic Parameter
+ Allocation&nbsp; Invalid Frequencies</a></nobr></li>
+ <li><nobr><a href="apa_clock_source_frequency_table.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title=" Automatic Parameter Allocation Source Frequencies">Automatic
+ Parameter Allocation Clock Source Frequencies</a><img height="1"
+ src="filler.gif" width="0"></nobr></li>
+</ul>
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/power_control_package.htm b/data/mnet/GP10/Host/ViperWatch/power_control_package.htm
new file mode 100644
index 0000000..1453142
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/power_control_package.htm
@@ -0,0 +1,340 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Adjacent Cell Handover Package</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+
+function PresetForm(theForm)
+{
+
+ return true;
+}
+
+function ParseForm(theForm)
+{
+
+ return true;
+}
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="power_control">
+
+ <input name="adjCell_synchronized.$%getInstance(adjCell_handoverIndex)#$" type="hidden" value="$%adjCell_synchronized#$">
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="507">
+ <tr>
+ <td width="491">
+ <h2 align="center">MS Power Control Parameters</h2>
+ </center>
+ <div align="center">
+ <table border="1" cellspacing="1" width="428" height="152">
+ <tr>
+ <td height="38"
+ title="The number of SACCH multiframes over which signal strength measurements are averaged, i.e. the window size (Hreqave in GSM 05.08)."
+ width="359">
+ <p align="left">Signal Strength Measurements Averaging window&nbsp;</p>
+ </td>
+ <center>
+ <td height="38" title="Integer(0..31) (in number of SACCH multiframe)" width="53"><input type="text" name="pcAveragingLevHreqave"
+ size="2" value="$%pcAveragingLevHreqave#$" maxlength="2" onchange="isValidInt(this,0,31);"></td>
+ </tr>
+ </center>
+ <tr>
+ <td height="38" align="left"
+ title="The number of SACCH multiframes over which signal quality measurements are averaged, i.e. the window size (Hreqave in GSM 05.08)."
+ width="359">
+ <p align="left">Signal Quality Measurements Averaging window</p>
+ </td>
+ <center>
+ <td height="38" align="left" title="Integer(0..31) (in number of SACCH multiframe)" width="53"><input type=" text"
+ name="pcAveragingQualHreqave" size="2" value="$%pcAveragingQualHreqave#$" maxlength="2" onchange="isValidInt(this,0,31);"></td>
+ </tr>
+ <tr>
+ <td height="23" align="left"
+ title="The value for the upper threshold of a mobile's RXLEV before activation of uplink dynamic power control."
+ width="359">Uplink Power Control Target</td>
+ <td height="23" align="left" title="RxLev ::= INTEGER (0..63)
+-- 0 : &lt; -110 dB,
+-- 1 : -110 dB .. -109 dB
+-- 2 : -109 dB .. -108 dB
+--
+-- 63: &gt; -48 dB
+-- Ref. GSM 05.08 (RXLEV)" width="53"><input type=" text"
+ name="pcLowerThresholdLevParamRxLevelUL" size="2" value="$%pcLowerThresholdLevParamRxLevelUL#$" maxlength="2" onchange="isValidInt(this,0,63);"></td>
+ </tr>
+ <tr>
+ <td height="23"
+ title="The msTxPwrMaxCell attribute is used to indicate the maximum power level a MS may use in an adjacent cell."
+ width="249">Maximum MS Tx Power</td>
+ <td height="23"
+ title="TxPower ::= INTEGER
+-- Value in dBm
+-- TXPWR range in GSM 900: 5..39 dBm
+-- TXPWR range in DCS 1800: 0..30 dBm
+-- TXPWR range in PCS 1900: 0..33 dBm" width="43"><input type="text" name="msTxPwrMaxCellDef" size="2" value="$%msTxPwrMaxCellDef#$" maxlength="2"
+ onchange="return isValidTxPower(this, $%gsmdcsIndicator#$);"></td>
+ </tr>
+ </table>
+ </div>
+<!--------
+ <table border="0" width="100%">
+ <tr>
+ <td width="50%"></td>
+ <td width="50%"></td>
+ </tr>
+ <tr>
+ <td width="50%">
+ <table border="1" cellspacing="1" width="307" height="188">
+ <tr>
+ <th colspan="2" width="297" height="19">
+ <p align="center"><b>Lower Threshold Signal Strength</b></th>
+ </tr>
+ <tr>
+ <td width="231" height="38">Threshold level for uplink power increase (L_RXLEV_UL_P)</td>
+ <td width="60"
+ title="RxLev ::= INTEGER (0..63)
+-- 0 : &lt; -110 dB,
+-- 1 : -110 dB .. -109 dB
+-- 2 : -109 dB .. -108 dB
+--
+-- 63: &gt; -48 dB
+-- Ref. GSM 05.08 (RXLEV)" height="38"><input type="text" name="pcLowerThresholdLevParamRxLevelUL" size="2"
+ value="$%pcLowerThresholdLevParamRxLevelUL#$" maxlength="2" onchange="isValidInt(this,0,63);"></td>
+ </tr>
+ <tr>
+ <td width="231" height="38">Threshold level for downlink power increase (L_RXLEV_DL_P).</td>
+ <td width="60"
+ title="RxLev ::= INTEGER (0..63)
+-- 0 : &lt; -110 dB,
+-- 1 : -110 dB .. -109 dB
+-- 2 : -109 dB .. -108 dB
+--
+-- 63: &gt; -48 dB
+-- Ref. GSM 05.08 (RXLEV)" height="38"><input type="text" name="pcLowerThresholdLevParamRxLevelDL" size="2"
+ value="$%pcLowerThresholdLevParamRxLevelDL#$" maxlength="2" onchange="isValidInt(this,0,63)"></td>
+ </tr>
+ <tr>
+ <td width="231" title="The total number of averages that have to be taken into account before power increase decision (N1)."
+ height="23">N1</td>
+ <td width="60" title="INTEGER (1..31)" height="23"><input type="text" name="pcLowerThresholdLevParamNx" size="2"
+ value="$%pcLowerThresholdLevParamNx#$" maxlength="2" onchange="isValidInt(this,0,31)"></td>
+ </tr>
+ <tr>
+ <td width="231"
+ title="The number of averages (out of total averages) that have to be lower than the threshold, before making a power increase decision (P1)."
+ height="40">P1</td>
+ <td width="60" title="INTEGER (1..31)" height="40"><input type="text" name="pcLowerThresholdLevParamPx" size="2"
+ value="$%pcLowerThresholdLevParamPx#$" maxlength="2" onchange="isValidInt(this,0,31)"></td>
+ </tr>
+ </table>
+ </td>
+ <td width="50%">
+ <table border="1" cellspacing="1" width="313">
+ <tr>
+ <th colspan="2" width="299">
+ <p align="center"><b>Upper Threshold Signal Strength</b></th>
+ </tr>
+ <tr>
+ <td width="249">Threshold level for uplink power reduction<br>
+ (U_RXLEV_UL_P)</td>
+ <td width="48"
+ title="RxLev ::= INTEGER (0..63)
+-- 0 : &lt; -110 dB,
+-- 1 : -110 dB .. -109 dB
+-- 2 : -109 dB .. -108 dB
+--
+-- 63: &gt; -48 dB
+-- Ref. GSM 05.08 (RXLEV)"><input type="text" name="pcUpperThresholdLevParamRxLevelUL" size="2" value="$%pcUpperThresholdLevParamRxLevelUL#$"
+ maxlength="2" onchange="isValidInt(this,0,63);"></td>
+ </tr>
+ <tr>
+ <td width="249">Threshold level for downlink power reduction (U_RXLEV_DL_P).</td>
+ <td width="48"
+ title="RxLev ::= INTEGER (0..63)
+-- 0 : &lt; -110 dB,
+-- 1 : -110 dB .. -109 dB
+-- 2 : -109 dB .. -108 dB
+--
+-- 63: &gt; -48 dB
+-- Ref. GSM 05.08 (RXLEV)"><input type="text" name="pcUpperThresholdLevParamRxLevelDL" size="2" value="$%pcUpperThresholdLevParamRxLevelDL#$"
+ maxlength="2" onchange="isValidInt(this,0,63)"></td>
+ </tr>
+ <tr>
+ <td width="249" title="The total number of averages that have to be taken into account before power reduction decision (N2).">N2</td>
+ <td width="48" title="INTEGER (1..31)"><input type="text" name="pcUpperThresholdLevParamNx1" size="2"
+ value="$%pcUpperThresholdLevParamNx#$" maxlength="2" onchange="isValidInt(this,0,31)"></td>
+ </tr>
+ <tr>
+ <td width="249"
+ title="The number of averages (out of total averages) that have to be lower than the threshold, before making a power reduction decision (P2).">P2</td>
+ <td width="48" title="INTEGER (1..31)"><input type="text" name="pcUpperThresholdLevParamPx1" size="2"
+ value="$%pcUpperThresholdLevParamPx#$" maxlength="2" onchange="isValidInt(this,0,31)"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td width="50%">
+ <table border="1" cellspacing="1" width="307">
+ <tr>
+ <th colspan="2" width="297">
+ <p align="center"><b>&nbsp;Lower Threshold Signal Quality</b></th>
+ </tr>
+ <tr>
+ <td width="235">Threshold level for uplink power increase (L_RXQUAL_UL_P).</td>
+ <td width="56"
+ title="RxQual ::= INTEGER (0..7)
+-- 0: less than 0.2%
+-- 1: 0.2% to 0.4%
+-- 2: 0.4% to 0.8%
+-- 3: 0.8% to 1.6%
+-- 4: 1.6% to 3.2%
+-- 5: 3.2% to 6.4%
+-- 6: 6.4% to 12.8%
+-- 7: greater than 12.8%"><input type="text" name="pcLowerThresholdQualParamRxQualUL" size="1" value="$%pcLowerThresholdQualParamRxQualUL#$"
+ maxlength="1" onchange="isValidInt(this,0,7)"></td>
+ </tr>
+ <tr>
+ <td width="235">Threshold level for downlink power increase (L_RXQUAL_DL_P).</td>
+ <td
+ title="RxQual ::= INTEGER (0..7)
+-- 0: less than 0.2%
+-- 1: 0.2% to 0.4%
+-- 2: 0.4% to 0.8%
+-- 3: 0.8% to 1.6%
+-- 4: 1.6% to 3.2%
+-- 5: 3.2% to 6.4%
+-- 6: 6.4% to 12.8%
+-- 7: greater than 12.8%" width="56"><input type="text" name="pcLowerThresholdQualParamRxQualDL" size="1"
+ value="$%pcLowerThresholdQualParamRxQualDL#$" maxlength="1" onchange="isValidInt(this,0,7)"></td>
+ </tr>
+ <tr>
+ <td title="The total number of averages that have to be taken into account before power increase decision (N3)." width="235">N3</td>
+ <td width="56" title="INTEGER (1..31)"><input type="text" name="pcLowerThresholdQualParamNx" size="2"
+ value="$%pcLowerThresholdQualParamNx#$" maxlength="2" onchange="isValidInt(this,0,31)">
+ </tr>
+ <tr>
+ <td
+ title="The number of averages (out of total averages) that have to be lower than the threshold, before making a power increase decision (P3)."
+ width="235">P3</td>
+ <td width="56" title="INTEGER (1..31)"><input type="text" name="pcLowerThresholdQualParamPx" size="2"
+ value="$%pcLowerThresholdQualParamPx#$" maxlength="2" onchange="isValidInt(this,0,31)"></td>
+ </tr>
+ </table>
+ </td>
+ <td width="50%">
+ <table border="1" cellspacing="1" width="313">
+ <tr>
+ <th colspan="2" height="19" width="303">
+ <p align="center"><b>Upper Threshold Signal Quality</b></th>
+ </tr>
+ <tr>
+ <td height="21" width="251">Threshold level for uplink power reduction (U_RXQUAL_UL_P)</td>
+ <td height="21"
+ title="RxQual ::= INTEGER (0..7)
+-- 0: less than 0.2%
+-- 1: 0.2% to 0.4%
+-- 2: 0.4% to 0.8%
+-- 3: 0.8% to 1.6%
+-- 4: 1.6% to 3.2%
+-- 5: 3.2% to 6.4%
+-- 6: 6.4% to 12.8%
+-- 7: greater than 12.8%" width="46"><input type="text" name="pcUpperThresholdQualParamRxQualUL" size="1"
+ value="$%pcUpperThresholdQualParamRxQualUL#$" maxlength="1" onchange="isValidInt(this,0,7)"></td>
+ </tr>
+ <tr>
+ <td height="23" width="251">Threshold level for downlink power reduction (U_RXQUAL_DL_P).</td>
+ <td height="23"
+ title="RxQual ::= INTEGER (0..7)
+-- 0: less than 0.2%
+-- 1: 0.2% to 0.4%
+-- 2: 0.4% to 0.8%
+-- 3: 0.8% to 1.6%
+-- 4: 1.6% to 3.2%
+-- 5: 3.2% to 6.4%
+-- 6: 6.4% to 12.8%
+-- 7: greater than 12.8%" width="46"><input type="text" name="pcUpperThresholdQualParamRxQualDL" size="1"
+ value="$%pcUpperThresholdQualParamRxQualDL#$" maxlength="1" onchange="isValidInt(this,0,7)"></td>
+ </tr>
+ <tr>
+ <td height="23" width="251"
+ title="The total number of averages that have to be taken into account before power reduction decision (N4).">N4</td>
+ <td height="23" width="46" title="INTEGER (1..31)"><input type="text" name="pcUpperThresholdQualParamNx" size="2"
+ value="$%pcUpperThresholdQualParamNx#$" maxlength="2" onchange="isValidInt(this,0,31)"></td>
+ </tr>
+ <tr>
+ <td height="23" width="251"
+ title="The number of averages (out of total averages) that have to be lower than the threshold, before making a power reduction decision (P4).">P4</td>
+ <td height="23" width="46" title="INTEGER (1..31)"><input type="text" name="pcUpperThresholdQualParamPx" size="2"
+ value="$%pcUpperThresholdQualParamPx#$" maxlength="2" onchange="isValidInt(this,0,31)"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ <p>&nbsp;</p>
+ <div align="center">
+ <table border="1" cellspacing="1">
+ <tr>
+ <th colspan="2" height="15">Threshold Signal Strength</th>
+ </tr>
+ <tr>
+ <td height="22"
+ title="The number of SACCH multiframes over which signal strength measurements are averaged, i.e. the window size (Hreqave in GSM 05.08).">Threshold
+ for activating uplink dynamic power Control</td>
+ <td height="22"
+ title="RxLev ::= INTEGER (0..63)
+-- 0 : &lt; -110 dB,
+-- 1 : -110 dB .. -109 dB
+-- 2 : -109 dB .. -108 dB
+--
+-- 63: &gt; -48 dB
+-- Ref. GSM 05.08 (RXLEV)"><input type="text" name="pcAveragingLevHreqave1" size="2" value="$%pcAveragingLevHreqave#$" maxlength="2"
+ onchange="isValidInt(this,0,31);"></td>
+ </tr>
+ </table>
+ ------->
+
+ <div align="center">
+ <center>
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </center>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <p align="center">&nbsp;</p>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/proto_config_mgmt.htm b/data/mnet/GP10/Host/ViperWatch/proto_config_mgmt.htm
new file mode 100644
index 0000000..759ca12
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/proto_config_mgmt.htm
@@ -0,0 +1,34 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>New Page 1</title>
+</head>
+
+<body onload="$%reloadTopframe#$">
+
+<SCRIPT language="JavaScript" src="./js/link.js"></SCRIPT>
+
+<h2>Protocol Configuration Management</h2>
+<p>This section currently consists of the following pages:</p>
+<ul>
+ <li><nobr><a href="layer2_timer.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Layer 2 (LAPDm) Timers">Layer 2 (LAPDm) Timers</a></nobr></li>
+ <li><nobr><a href="layer3_timer.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Layer 3 Timers">Layer 3&nbsp; (RRM) Timers</a></nobr></li>
+ <li><nobr><a href="call_config_data.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Call Config Timers">Layer 3 (CCM) Timers</a></nobr></li>
+ <li><nobr><a href="handover_timer.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Handover Timers">Handover Timers</a><br>
+ <li><nobr><a href="cdr_timer.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="CDR Control Timers">CDR Control Timers</a><br>
+ <br>
+ </nobr></li>
+</ul>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/radio_parameters.htm b/data/mnet/GP10/Host/ViperWatch/radio_parameters.htm
new file mode 100644
index 0000000..1375968
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/radio_parameters.htm
@@ -0,0 +1,2348 @@
+<html>
+
+<head>
+
+ <META NAME="VPSiteProject" CONTENT="file:///D|/JetCell/Gui/jetcell.vpp"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<title>Radio Parameters</title>
+
+
+<meta name="Microsoft Border" content="none, default">
+</head>
+
+<body onload="$%reloadTopframe#$">
+ <font size="3"><!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
+function FrontPage_Form1_Validator(theForm)
+{
+
+ if (theForm.NCC.value == "")
+ {
+ alert("Please enter a value for the \"NCC\" field.");
+ theForm.NCC.focus();
+ return (false);
+ }
+
+ if (theForm.NCC.value.length < 1)
+ {
+ alert("Please enter at least 1 characters in the \"NCC\" field.");
+ theForm.NCC.focus();
+ return (false);
+ }
+
+ if (theForm.NCC.value.length > 1)
+ {
+ alert("Please enter at most 1 characters in the \"NCC\" field.");
+ theForm.NCC.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.NCC.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"NCC\" field.");
+ theForm.NCC.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "7"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"7\" in the \"NCC\" field.");
+ theForm.NCC.focus();
+ return (false);
+ }
+
+ if (theForm.BCC.value == "")
+ {
+ alert("Please enter a value for the \"BCC\" field.");
+ theForm.BCC.focus();
+ return (false);
+ }
+
+ if (theForm.BCC.value.length < 1)
+ {
+ alert("Please enter at least 1 characters in the \"BCC\" field.");
+ theForm.BCC.focus();
+ return (false);
+ }
+
+ if (theForm.BCC.value.length > 1)
+ {
+ alert("Please enter at most 1 characters in the \"BCC\" field.");
+ theForm.BCC.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.BCC.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"BCC\" field.");
+ theForm.BCC.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "7"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"7\" in the \"BCC\" field.");
+ theForm.BCC.focus();
+ return (false);
+ }
+
+ if (theForm.MCC.value == "")
+ {
+ alert("Please enter a value for the \"MCC\" field.");
+ theForm.MCC.focus();
+ return (false);
+ }
+
+ if (theForm.MCC.value.length < 1)
+ {
+ alert("Please enter at least 1 characters in the \"MCC\" field.");
+ theForm.MCC.focus();
+ return (false);
+ }
+
+ if (theForm.MCC.value.length > 4)
+ {
+ alert("Please enter at most 4 characters in the \"MCC\" field.");
+ theForm.MCC.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.MCC.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"MCC\" field.");
+ theForm.MCC.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "999"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"999\" in the \"MCC\" field.");
+ theForm.MCC.focus();
+ return (false);
+ }
+
+ if (theForm.MNC.value == "")
+ {
+ alert("Please enter a value for the \"MNC\" field.");
+ theForm.MNC.focus();
+ return (false);
+ }
+
+ if (theForm.MNC.value.length < 1)
+ {
+ alert("Please enter at least 1 characters in the \"MNC\" field.");
+ theForm.MNC.focus();
+ return (false);
+ }
+
+ if (theForm.MNC.value.length > 3)
+ {
+ alert("Please enter at most 3 characters in the \"MNC\" field.");
+ theForm.MNC.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.MNC.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"MNC\" field.");
+ theForm.MNC.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "99"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"99\" in the \"MNC\" field.");
+ theForm.MNC.focus();
+ return (false);
+ }
+
+ if (theForm.LAC.value == "")
+ {
+ alert("Please enter a value for the \"LAC\" field.");
+ theForm.LAC.focus();
+ return (false);
+ }
+
+ if (theForm.LAC.value.length < 1)
+ {
+ alert("Please enter at least 1 characters in the \"LAC\" field.");
+ theForm.LAC.focus();
+ return (false);
+ }
+
+ if (theForm.LAC.value.length > 5)
+ {
+ alert("Please enter at most 5 characters in the \"LAC\" field.");
+ theForm.LAC.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.LAC.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"LAC\" field.");
+ theForm.LAC.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "65535"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"65535\" in the \"LAC\" field.");
+ theForm.LAC.focus();
+ return (false);
+ }
+
+ if (theForm.LAC1.value == "")
+ {
+ alert("Please enter a value for the \"LAC\" field.");
+ theForm.LAC1.focus();
+ return (false);
+ }
+
+ if (theForm.LAC1.value.length < 1)
+ {
+ alert("Please enter at least 1 characters in the \"LAC\" field.");
+ theForm.LAC1.focus();
+ return (false);
+ }
+
+ if (theForm.LAC1.value.length > 5)
+ {
+ alert("Please enter at most 5 characters in the \"LAC\" field.");
+ theForm.LAC1.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.LAC1.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"LAC\" field.");
+ theForm.LAC1.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "65535"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"65535\" in the \"LAC\" field.");
+ theForm.LAC1.focus();
+ return (false);
+ }
+
+ if (theForm.CellReselectHysteresis.value == "")
+ {
+ alert("Please enter a value for the \"CellReselectHysteresis\" field.");
+ theForm.CellReselectHysteresis.focus();
+ return (false);
+ }
+
+ if (theForm.CellReselectHysteresis.value.length < 1)
+ {
+ alert("Please enter at least 1 characters in the \"CellReselectHysteresis\" field.");
+ theForm.CellReselectHysteresis.focus();
+ return (false);
+ }
+
+ if (theForm.CellReselectHysteresis.value.length > 1)
+ {
+ alert("Please enter at most 1 characters in the \"CellReselectHysteresis\" field.");
+ theForm.CellReselectHysteresis.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.CellReselectHysteresis.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"CellReselectHysteresis\" field.");
+ theForm.CellReselectHysteresis.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "7"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"7\" in the \"CellReselectHysteresis\" field.");
+ theForm.CellReselectHysteresis.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.NY1.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"NY1\" field.");
+ theForm.NY1.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.CCCHloadindication.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"CCCHloadindication\" field.");
+ theForm.CCCHloadindication.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.RadioLinkTimeout.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"RadioLinkTimeout\" field.");
+ theForm.RadioLinkTimeout.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "15"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"15\" in the \"RadioLinkTimeout\" field.");
+ theForm.RadioLinkTimeout.focus();
+ return (false);
+ }
+
+ if (theForm.RxLevAccessMin.value == "")
+ {
+ alert("Please enter a value for the \"RxLevAccessMin\" field.");
+ theForm.RxLevAccessMin.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.RxLevAccessMin.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"RxLevAccessMin\" field.");
+ theForm.RxLevAccessMin.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "63"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"63\" in the \"RxLevAccessMin\" field.");
+ theForm.RxLevAccessMin.focus();
+ return (false);
+ }
+
+ if (theForm.CCCHLoadIndication.value == "")
+ {
+ alert("Please enter a value for the \"CCCHLoadIndication\" field.");
+ theForm.CCCHLoadIndication.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.CCCHLoadIndication.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"CCCHLoadIndication\" field.");
+ theForm.CCCHLoadIndication.focus();
+ return (false);
+ }
+ return (true);
+}
+//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="_derived/nortbots.htm" onsubmit="location.href='_derived/nortbots.htm';return false;" name="FrontPage_Form1" webbot-action="--WEBBOT-SELF--" WEBBOT-onSubmit="return FrontPage_Form1_Validator(this)">
+ <!--webbot bot="SaveResults" startspan
+ U-File="D:\Oam\Manager\_private\form_results.txt" S-Format="TEXT/CSV"
+ S-Label-Fields="TRUE" --><strong>[FrontPage Save Results Component]</strong><!--webbot
+ bot="SaveResults" endspan i-checksum="6561" --></font><table border="0" width="887" cellspacing="0" cellpadding="0">
+ <tr>
+ <td width="232"><font face="Courier New" size="3"><strong>Parameter</strong></font></td>
+ <td width="342"><font size="3"><strong>Value</strong></font></td>
+ <td width="495"></td>
+ </tr>
+ <tr>
+ <td width="232"><font SIZE="2" face="Courier New">bsIdentityCode:</font></td>
+ <td width="342"><font SIZE="2">NCC: <!--webbot bot="Validation"
+ S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE"
+ I-Minimum-Length="1" I-Maximum-Length="1"
+ S-Validation-Constraint="Greater than or equal to"
+ S-Validation-Value="0" S-Validation-Constraint="Less than or equal to"
+ S-Validation-Value="7" --><input type="text" name="NCC" size="1" maxlength="1">&nbsp; BCC:
+ <!--webbot bot="Validation" S-Data-Type="Integer"
+ S-Number-Separators="x" B-Value-Required="TRUE" I-Minimum-Length="1"
+ I-Maximum-Length="1"
+ S-Validation-Constraint="Greater than or equal to"
+ S-Validation-Value="0" S-Validation-Constraint="Less than or equal to"
+ S-Validation-Value="7" --><input type="text" name="BCC" size="1" maxlength="1"></font></td>
+ <td width="495"><font SIZE="2">BTS BSIC = NCC + BCC</font></td>
+ </tr>
+ <tr>
+ <td width="232" rowspan="2"><font SIZE="2" face="Courier New">cellGlobalIdentity:</font></td>
+ <td width="342"><font SIZE="2">MCC: <!--webbot bot="Validation"
+ S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE"
+ I-Minimum-Length="1" I-Maximum-Length="4"
+ S-Validation-Constraint="Greater than or equal to"
+ S-Validation-Value="0" S-Validation-Constraint="Less than or equal to"
+ S-Validation-Value="999" --><input type="text" name="MCC" size="4" maxlength="4"> MNC:
+ <!--webbot bot="Validation" S-Data-Type="Integer"
+ S-Number-Separators="x" B-Value-Required="TRUE" I-Minimum-Length="1"
+ I-Maximum-Length="3"
+ S-Validation-Constraint="Greater than or equal to"
+ S-Validation-Value="0" S-Validation-Constraint="Less than or equal to"
+ S-Validation-Value="99" --><input type="text" name="MNC" size="3" maxlength="3"> </font></td>
+ <td width="495" rowspan="2">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="342"><font SIZE="2">LAC: <!--webbot bot="Validation"
+ S-Display-Name="LAC" S-Data-Type="Integer" S-Number-Separators="x"
+ B-Value-Required="TRUE" I-Minimum-Length="1" I-Maximum-Length="5"
+ S-Validation-Constraint="Greater than or equal to"
+ S-Validation-Value="0" S-Validation-Constraint="Less than or equal to"
+ S-Validation-Value="65535" --><input type="text" name="LAC" size="5" maxlength="5"> Cell ID:
+ <!--webbot bot="Validation" S-Display-Name="LAC" S-Data-Type="Integer"
+ S-Number-Separators="x" B-Value-Required="TRUE" I-Minimum-Length="1"
+ I-Maximum-Length="5"
+ S-Validation-Constraint="Greater than or equal to"
+ S-Validation-Value="0" S-Validation-Constraint="Less than or equal to"
+ S-Validation-Value="65535" --><input type="text" name="LAC1" size="5" maxlength="5"> </font></td>
+ </tr>
+ <tr>
+ <td width="232"><p style="padding-top: 0px; padding-bottom: 0px"><font SIZE="2" face="Courier New">cellReselectHysteresis:</font></td>
+ <td width="342"><p style="padding-top: 0px; padding-bottom: 0px"><font SIZE="2"><!--webbot
+ bot="Validation" S-Data-Type="Integer" S-Number-Separators="x"
+ B-Value-Required="TRUE" I-Minimum-Length="1" I-Maximum-Length="1"
+ S-Validation-Constraint="Greater than or equal to"
+ S-Validation-Value="0" S-Validation-Constraint="Less than or equal to"
+ S-Validation-Value="7" --><input type="text" name="CellReselectHysteresis" size="3" maxlength="1"></font></td>
+ <td width="495">x 2dB steps</td>
+ </tr>
+ <tr>
+ <td width="232"><p style="padding-top: 0px; padding-bottom: 0px"><font SIZE="2" face="Courier New">gsmdcsIndicator:</font></td>
+ <td width="342"><p style="padding-top: 0px; padding-bottom: 0px"><select name="D1" size="1">
+ <option value="GSM-900">GSM-900</option>
+ <option value="EGSM-900">EGSM-900</option>
+ <option value="DCS-1800">DCS-1800</option>
+ <option value="PCS-1900">PCS-1900</option>
+ </select></td>
+ <td width="495">&lt;This is only allowed when creating the VC&gt;</td>
+ </tr>
+ <tr>
+ <td width="232"><p style="padding-top: 0px; padding-bottom: 0px"><font SIZE="2" face="Courier New">ny1:</font></td>
+ <td width="342"><p style="padding-top: 0px; padding-bottom: 0px"><font SIZE="2"><!--webbot
+ bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" --><input type="text" name="NY1" size="10"></font></td>
+ <td width="495">Max Number Repetitions of PHYSICAL INFO</td>
+ </tr>
+ <tr>
+ <td width="232"><p style="padding-top: 0px; padding-bottom: 0px"><font SIZE="2" face="Courier New">periodCCCHLoadIndication:</font></td>
+ <td width="342"><p style="padding-top: 0px; padding-bottom: 0px"><font SIZE="2"><!--webbot
+ bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" --><input type="text" name="CCCHloadindication" size="20"></font></td>
+ <td width="495">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="232"><p style="padding-top: 0px; padding-bottom: 0px"><font SIZE="2" face="Courier New">plmnPermitted:</font></td>
+ <td width="342"><p style="padding-top: 0px; padding-bottom: 0px">7 <input type="checkbox" name="NCC7" value="ON">6 <input type="checkbox" name="NCC8" value="ON">5 <input type="checkbox" name="NCC9" value="ON">4 <input type="checkbox" name="NCC10" value="ON">3 <input type="checkbox" name="NCC11" value="ON">2 <input type="checkbox" name="NCC12" value="ON">1
+ <input type="checkbox" name="NCC13" value="ON">0 <input type="checkbox" name="NCC14" value="ON"></td>
+ <td width="495">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="232"><p style="padding-top: 0px; padding-bottom: 0px"><font SIZE="2" face="Courier New">rACHBusyThreshold:</font></td>
+ <td width="342"><p style="padding-top: 0px; padding-bottom: 0px"><font SIZE="2"><input type="text" name="T9" size="20"></font></td>
+ <td width="495">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="232"><p style="padding-top: 0px; padding-bottom: 0px"><font SIZE="2" face="Courier New">rACHLoadAveragingSlots:</font></td>
+ <td width="342"><p style="padding-top: 0px; padding-bottom: 0px"><font SIZE="2"><input type="text" name="T10" size="20"></font></td>
+ <td width="495">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="232"><p style="padding-top: 0px; padding-bottom: 0px"><font SIZE="2" face="Courier New">radioLinkTimeout:</font></td>
+ <td width="342"><p style="padding-top: 0px; padding-bottom: 0px"><font SIZE="2"><!--webbot
+ bot="Validation" S-Data-Type="Integer" S-Number-Separators="x"
+ S-Validation-Constraint="Greater than or equal to"
+ S-Validation-Value="0" S-Validation-Constraint="Less than or equal to"
+ S-Validation-Value="15" --><input type="text" name="RadioLinkTimeout" size="3" value="0"></font></td>
+ <td width="495">x 4 SACCH Frames</td>
+ </tr>
+ <tr>
+ <td width="232"><p style="padding-top: 0px; padding-bottom: 0px"><font SIZE="2" face="Courier New">rxLevAccessMin:</font></td>
+ <td width="342"><p style="padding-top: 0px; padding-bottom: 0px"><font SIZE="2"><!--webbot
+ bot="Validation" S-Data-Type="Integer" S-Number-Separators="x"
+ B-Value-Required="TRUE"
+ S-Validation-Constraint="Greater than or equal to"
+ S-Validation-Value="0" S-Validation-Constraint="Less than or equal to"
+ S-Validation-Value="63" --><input type="text" name="RxLevAccessMin" size="3"></font></td>
+ <td width="495">See GSM TS 05.08 RXLEV</td>
+ </tr>
+ <tr>
+ <td width="232"><p style="padding-top: 0px; padding-bottom: 0px"><font SIZE="2" face="Courier New">thresholdCCCHLoadIndication:</font></td>
+ <td width="342"><p style="padding-top: 0px; padding-bottom: 0px"><font SIZE="2"><!--webbot
+ bot="Validation" S-Data-Type="Integer" S-Number-Separators="x"
+ B-Value-Required="TRUE" --><input type="text" name="CCCHLoadIndication" size="20"></font></td>
+ <td width="495">&nbsp;</td>
+ </tr>
+ </table>
+ <font SIZE="2"><p><input type="submit" value="Apply" name="btsBasicPackageApply"><input type="button" value="Recall" name="btsBasicPackageRecall"><input type="reset" value="Defaults" name="btsBasicPackageDefaults"></p>
+ </form>
+ <blockquote>
+ <p><font size="3"><u>bts -&gt;btsCCCHConfigurationPackage</u></font></p>
+ </blockquote>
+ </font><font size="3"><!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
+function FrontPage_Form2_Validator(theForm)
+{
+
+ if (theForm.NoBlockAccessGrant.value == "")
+ {
+ alert("Please enter a value for the \"NoBlockAccessGrant\" field.");
+ theForm.NoBlockAccessGrant.focus();
+ return (false);
+ }
+
+ if (theForm.NoBlockAccessGrant.value.length < 1)
+ {
+ alert("Please enter at least 1 characters in the \"NoBlockAccessGrant\" field.");
+ theForm.NoBlockAccessGrant.focus();
+ return (false);
+ }
+
+ if (theForm.NoBlockAccessGrant.value.length > 1)
+ {
+ alert("Please enter at most 1 characters in the \"NoBlockAccessGrant\" field.");
+ theForm.NoBlockAccessGrant.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.NoBlockAccessGrant.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"NoBlockAccessGrant\" field.");
+ theForm.NoBlockAccessGrant.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "7"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"7\" in the \"NoBlockAccessGrant\" field.");
+ theForm.NoBlockAccessGrant.focus();
+ return (false);
+ }
+
+ if (theForm.NoMulitframes.value == "")
+ {
+ alert("Please enter a value for the \"NoMulitframes\" field.");
+ theForm.NoMulitframes.focus();
+ return (false);
+ }
+
+ if (theForm.NoMulitframes.value.length < 1)
+ {
+ alert("Please enter at least 1 characters in the \"NoMulitframes\" field.");
+ theForm.NoMulitframes.focus();
+ return (false);
+ }
+
+ if (theForm.NoMulitframes.value.length > 1)
+ {
+ alert("Please enter at most 1 characters in the \"NoMulitframes\" field.");
+ theForm.NoMulitframes.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.NoMulitframes.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"NoMulitframes\" field.");
+ theForm.NoMulitframes.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "2" && prsVal <= "9"))
+ {
+ alert("Please enter a value greater than or equal to \"2\" and less than or equal to \"9\" in the \"NoMulitframes\" field.");
+ theForm.NoMulitframes.focus();
+ return (false);
+ }
+ return (true);
+}
+//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="_derived/nortbots.htm" onsubmit="location.href='_derived/nortbots.htm';return false;" name="FrontPage_Form2" webbot-action="--WEBBOT-SELF--" WEBBOT-onSubmit="return FrontPage_Form2_Validator(this)">
+ <!--webbot bot="SaveResults" startspan
+ U-File="D:\Oam\Manager\_private\form_results.txt" S-Format="TEXT/CSV"
+ S-Label-Fields="TRUE" --><strong>[FrontPage Save Results Component]</strong><!--webbot
+ bot="SaveResults" endspan i-checksum="6561" --><table border="1" width="853">
+ <tr>
+ <td width="230"></font><font size="3">&nbsp;</font></td>
+ <td width="191"><font size="3">&nbsp;</font></td>
+ <td width="611"><font size="3">&nbsp;</font></td>
+ </tr>
+ <tr>
+ <td width="230"><font face="Courier New" SIZE="2">maxNumberRetransmission: </font></td>
+ <font FACE="Arial" SIZE="2"><td width="191"><select name="MaxREtran" size="1">
+ <option value="1">One</option>
+ <option value="2">Two</option>
+ <option value="4">Four</option>
+ <option value="7">Seven</option>
+ </select></font></td>
+ <td width="611">&nbsp;</td>
+ </tr>
+ <tr>
+ <font SIZE="2"><td width="230"><font face="Courier New">mSTxPwrMaxCCHL:</font></font></td>
+ <font FACE="Arial" SIZE="2"><td width="191"><input type="text" name="T2" size="20"></font></td>
+ <td width="611">&nbsp;</td>
+ </tr>
+ <tr>
+ <font SIZE="2"><td width="230"><font face="Courier New">noOfBlocksForAccessGrant:</font></font></td>
+ <font FACE="Arial" SIZE="2"><td width="191"><!--webbot bot="Validation"
+ S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE"
+ I-Minimum-Length="1" I-Maximum-Length="1"
+ S-Validation-Constraint="Greater than or equal to"
+ S-Validation-Value="0" S-Validation-Constraint="Less than or equal to"
+ S-Validation-Value="7" --><input type="text" name="NoBlockAccessGrant" size="2" maxlength="1"></font></td>
+ <td width="611"><font FACE="Arial" SIZE="2">Needs to be Linked to BCCH Combination</font></td>
+ </tr>
+ <tr>
+ <font SIZE="2"><td width="230"><font face="Courier New">noOfMultiframesBetweenPaging:</font></font></td>
+ <font FACE="Arial" SIZE="2"><td width="191"><!--webbot bot="Validation"
+ S-Data-Type="Integer" S-Number-Separators="x" B-Value-Required="TRUE"
+ I-Minimum-Length="1" I-Maximum-Length="1"
+ S-Validation-Constraint="Greater than or equal to"
+ S-Validation-Value="2" S-Validation-Constraint="Less than or equal to"
+ S-Validation-Value="9" --><input type="text" name="NoMulitframes" size="2" value="2" maxlength="1"></font></td>
+ <td width="611">&nbsp;</td>
+ </tr>
+ <tr>
+ <font SIZE="2"><td width="230"><font face="Courier New">numberOfSlotsSpreadTrans:</font></font></td>
+ <font FACE="Arial" SIZE="2"><td width="191"><input type="text" name="T5" size="20"></font></td>
+ <td width="611">&nbsp;</td>
+ </tr>
+ </table>
+ <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
+ </form>
+ <blockquote>
+ <p><font size="3"><u>bts -&gt;btsOptionsPackage</u></font></p>
+ </blockquote>
+<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
+function FrontPage_Form3_Validator(theForm)
+{
+
+ if (theForm.PeriodicLocationUpdate.value == "")
+ {
+ alert("Please enter a value for the \"PeriodicLocationUpdate\" field.");
+ theForm.PeriodicLocationUpdate.focus();
+ return (false);
+ }
+
+ if (theForm.PeriodicLocationUpdate.value.length < 1)
+ {
+ alert("Please enter at least 1 characters in the \"PeriodicLocationUpdate\" field.");
+ theForm.PeriodicLocationUpdate.focus();
+ return (false);
+ }
+
+ if (theForm.PeriodicLocationUpdate.value.length > 3)
+ {
+ alert("Please enter at most 3 characters in the \"PeriodicLocationUpdate\" field.");
+ theForm.PeriodicLocationUpdate.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.PeriodicLocationUpdate.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"PeriodicLocationUpdate\" field.");
+ theForm.PeriodicLocationUpdate.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "255"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"255\" in the \"PeriodicLocationUpdate\" field.");
+ theForm.PeriodicLocationUpdate.focus();
+ return (false);
+ }
+ return (true);
+}
+//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="_derived/nortbots.htm" onsubmit="location.href='_derived/nortbots.htm';return false;" name="FrontPage_Form3" webbot-action="--WEBBOT-SELF--" WEBBOT-onSubmit="return FrontPage_Form3_Validator(this)">
+ <!--webbot bot="SaveResults" startspan
+ U-File="D:\Oam\Manager\_private\form_results.txt" S-Format="TEXT/CSV"
+ S-Label-Fields="TRUE" --><strong>[FrontPage Save Results Component]</strong><!--webbot
+ bot="SaveResults" endspan i-checksum="6561" --><table border="1" width="854">
+ <tr>
+ <td width="236"><font SIZE="2" face="Courier New">allowIMSIAttachDetach</font></td>
+ <td width="196"><input type="radio" value="V1" name="IMSIAttach"></td>
+ <td width="606">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="236"><font SIZE="2" face="Courier New">callReestablishmentAllowed</font></td>
+ <td width="196"><input type="radio" value="V2" name="CallReestablish"></td>
+ <td width="606">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="236"><font SIZE="2" face="Courier New">cellBarred</font></td>
+ <td width="196"><input type="radio" value="V3" name="CellBarred"></td>
+ <td width="606">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="236"><font SIZE="2" face="Courier New">dtxDownlink</font></td>
+ <td width="196"><input type="radio" value="V4" name="DTXDownlin"></td>
+ <td width="606">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="236"><font SIZE="2" face="Courier New">dtxUplink</font></td>
+ <td width="196"><select name="DTXUplink" size="1">
+ <option value="0">MS May Used DTX</option>
+ <option value="1">MS Shall use DTX</option>
+ <option selected value="2">MS Shall Not use DTX</option>
+ </select></td>
+ <td width="606">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="236"><font SIZE="2" face="Courier New">emergencyCallRestricted</font></td>
+ <td width="196"><input type="radio" value="V5" name="EmergencyCall"></td>
+ <td width="606">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="236"><font SIZE="2" face="Courier New">notAllowedAccessClasses</font></td>
+ <td width="196"><select name="D1" size="1" multiple>
+ <option value="Class 1">Class 1</option>
+ <option value="Class 2">Class 2</option>
+ <option value="Class 3">Class 3</option>
+ <option value="Class 4">Class 4</option>
+ </select></td>
+ <td width="606">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="236"><font SIZE="2" face="Courier New">timerPeriodicUpdateMS</font></td>
+ <td width="196"><!--webbot bot="Validation" S-Data-Type="Integer"
+ S-Number-Separators="x" B-Value-Required="TRUE" I-Minimum-Length="1"
+ I-Maximum-Length="3"
+ S-Validation-Constraint="Greater than or equal to"
+ S-Validation-Value="0" S-Validation-Constraint="Less than or equal to"
+ S-Validation-Value="255" --><input type="text" name="PeriodicLocationUpdate" size="3" maxlength="3"></td>
+ <td width="606"><small><font face="Courier New">In Deci Hours</font></small></td>
+ </tr>
+ </table>
+ <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
+ </form>
+ <blockquote>
+ <font FACE="Arial" SIZE="2"><u><p>channel -&gt; channelPackage&nbsp; This needs to be done
+ on a per TRX&nbsp; basis</u></font></p>
+ </blockquote>
+ <form method="POST" action="_derived/nortbots.htm" onSubmit="location.href='_derived/nortbots.htm';return false;" webbot-action="--WEBBOT-SELF--" WEBBOT-onSubmit>
+ <!--webbot bot="SaveResults" startspan
+ U-File="D:\Oam\Manager\_private\form_results.txt" S-Format="TEXT/CSV"
+ S-Label-Fields="TRUE" --><strong>[FrontPage Save Results Component]</strong><!--webbot
+ bot="SaveResults" endspan i-checksum="6561" --><table border="1" width="853">
+ <tr>
+ <td width="145"><font face="Times New Roman" SIZE="2"><strong>Select TRX -&gt;</strong></font></td>
+ <td width="335" colspan="2"><select name="D4" size="1">
+ <option selected value="1">TRX 1</option>
+ <option value="2">TRX 2</option>
+ </select></td>
+ <td width="558">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="145"><font face="Times New Roman" SIZE="2"><strong>Channel Number</strong></font></td>
+ <td width="166" align="center"><strong>Channel Type</strong></td>
+ <td width="169" align="center"><strong>Training Sequence</strong></td>
+ <td width="558">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="145" align="center"><font size="2" face="Times New Roman"><strong>1</strong></font></td>
+ <td width="166"><select name="D2" size="1">
+ <option value="0">TCH Full</option>
+ <option value="1">TCH Half</option>
+ <option value="2">TCH Half 2</option>
+ <option value="3">SDCCH</option>
+ <option value="4">Main BCCH</option>
+ <option value="5">BCCH Combined</option>
+ <option value="6">CCCH</option>
+ <option value="7">BCCH with CBCH</option>
+ <option value="8">SDCCH with CBCH</option>
+ </select></td>
+ <td width="169"><select name="D3" size="1">
+ <option selected value="Use BCC">Use BCC</option>
+ <option value="TSC 1">TSC 1</option>
+ <option value="TSC 2">TSC 2</option>
+ <option value="TSC 3">TSC 3</option>
+ <option value="TSC 4">TSC 4</option>
+ <option value="TSC 5">TSC 5</option>
+ <option value="TSC 6">TSC 6</option>
+ <option value="TSC 7">TSC 7</option>
+ <option value="TSC 8">TSC 8</option>
+ <option value="TSC 9 - Special">TSC 9 - Special</option>
+ </select></td>
+ <td width="558">The Channel Type restrictions need to be checked</td>
+ </tr>
+ <tr>
+ <td width="145" align="center"><font size="2" face="Times New Roman"><strong>2</strong></font></td>
+ <td width="166"><select name="Channel2" size="1">
+ <option value="0">TCH Full</option>
+ <option value="1">TCH Half</option>
+ <option value="2">TCH Half 2</option>
+ <option value="3">SDCCH</option>
+ <option value="6">CCCH</option>
+ <option value="8">SDCCH with CBCH</option>
+ </select></td>
+ <td width="169"><select name="D3" size="1">
+ <option selected value="Use BCC">Use BCC</option>
+ <option value="TSC 1">TSC 1</option>
+ <option value="TSC 2">TSC 2</option>
+ <option value="TSC 3">TSC 3</option>
+ <option value="TSC 4">TSC 4</option>
+ <option value="TSC 5">TSC 5</option>
+ <option value="TSC 6">TSC 6</option>
+ <option value="TSC 7">TSC 7</option>
+ <option value="TSC 8">TSC 8</option>
+ <option value="TSC 9 - Special">TSC 9 - Special</option>
+ </select></td>
+ <td width="558">The Channel Type restrictions need to be checked</td>
+ </tr>
+ <tr>
+ <td width="145" align="center"><font size="2" face="Times New Roman"><strong>3</strong></font></td>
+ <td width="166"><select name="Channel3" size="1">
+ <option value="0">TCH Full</option>
+ <option value="1">TCH Half</option>
+ <option value="2">TCH Half 2</option>
+ <option value="3">SDCCH</option>
+ <option value="6">CCCH</option>
+ <option value="8">SDCCH with CBCH</option>
+ </select></td>
+ <td width="169"><select name="D3" size="1">
+ <option selected value="Use BCC">Use BCC</option>
+ <option value="TSC 1">TSC 1</option>
+ <option value="TSC 2">TSC 2</option>
+ <option value="TSC 3">TSC 3</option>
+ <option value="TSC 4">TSC 4</option>
+ <option value="TSC 5">TSC 5</option>
+ <option value="TSC 6">TSC 6</option>
+ <option value="TSC 7">TSC 7</option>
+ <option value="TSC 8">TSC 8</option>
+ <option value="TSC 9 - Special">TSC 9 - Special</option>
+ </select></td>
+ <td width="558">The Channel Type restrictions need to be checked</td>
+ </tr>
+ <tr>
+ <td width="145" align="center"><font size="2" face="Times New Roman"><strong>4</strong></font></td>
+ <td width="166"><select name="Channel4" size="1">
+ <option value="0">TCH Full</option>
+ <option value="1">TCH Half</option>
+ <option value="2">TCH Half 2</option>
+ <option value="3">SDCCH</option>
+ <option value="6">CCCH</option>
+ <option value="8">SDCCH with CBCH</option>
+ </select></td>
+ <td width="169"><select name="D3" size="1">
+ <option selected value="Use BCC">Use BCC</option>
+ <option value="TSC 1">TSC 1</option>
+ <option value="TSC 2">TSC 2</option>
+ <option value="TSC 3">TSC 3</option>
+ <option value="TSC 4">TSC 4</option>
+ <option value="TSC 5">TSC 5</option>
+ <option value="TSC 6">TSC 6</option>
+ <option value="TSC 7">TSC 7</option>
+ <option value="TSC 8">TSC 8</option>
+ <option value="TSC 9 - Special">TSC 9 - Special</option>
+ </select></td>
+ <td width="558">The Channel Type restrictions need to be checked</td>
+ </tr>
+ <tr>
+ <td width="145" align="center"><font size="2" face="Times New Roman"><strong>5</strong></font></td>
+ <td width="166"><select name="Channel5" size="1">
+ <option value="0">TCH Full</option>
+ <option value="1">TCH Half</option>
+ <option value="2">TCH Half 2</option>
+ <option value="3">SDCCH</option>
+ <option value="6">CCCH</option>
+ <option value="8">SDCCH with CBCH</option>
+ </select></td>
+ <td width="169"><select name="D3" size="1">
+ <option selected value="Use BCC">Use BCC</option>
+ <option value="TSC 1">TSC 1</option>
+ <option value="TSC 2">TSC 2</option>
+ <option value="TSC 3">TSC 3</option>
+ <option value="TSC 4">TSC 4</option>
+ <option value="TSC 5">TSC 5</option>
+ <option value="TSC 6">TSC 6</option>
+ <option value="TSC 7">TSC 7</option>
+ <option value="TSC 8">TSC 8</option>
+ <option value="TSC 9 - Special">TSC 9 - Special</option>
+ </select></td>
+ <td width="558">The Channel Type restrictions need to be checked</td>
+ </tr>
+ <tr>
+ <td width="145" align="center"><font size="2" face="Times New Roman"><strong>6</strong></font></td>
+ <td width="166"><select name="Channel6" size="1">
+ <option value="0">TCH Full</option>
+ <option value="1">TCH Half</option>
+ <option value="2">TCH Half 2</option>
+ <option value="3">SDCCH</option>
+ <option value="6">CCCH</option>
+ <option value="8">SDCCH with CBCH</option>
+ </select></td>
+ <td width="169"><select name="D3" size="1">
+ <option selected value="Use BCC">Use BCC</option>
+ <option value="TSC 1">TSC 1</option>
+ <option value="TSC 2">TSC 2</option>
+ <option value="TSC 3">TSC 3</option>
+ <option value="TSC 4">TSC 4</option>
+ <option value="TSC 5">TSC 5</option>
+ <option value="TSC 6">TSC 6</option>
+ <option value="TSC 7">TSC 7</option>
+ <option value="TSC 8">TSC 8</option>
+ <option value="TSC 9 - Special">TSC 9 - Special</option>
+ </select></td>
+ <td width="558">The Channel Type restrictions need to be checked</td>
+ </tr>
+ <tr>
+ <td width="145" align="center"><font size="2" face="Times New Roman"><strong>7</strong></font></td>
+ <td width="166"><select name="D2" size="1">
+ <option value="0">TCH Full</option>
+ <option value="1">TCH Half</option>
+ <option value="2">TCH Half 2</option>
+ <option value="3">SDCCH</option>
+ <option value="6">CCCH</option>
+ <option value="8">SDCCH with CBCH</option>
+ </select></td>
+ <td width="169"><select name="D3" size="1">
+ <option selected value="Use BCC">Use BCC</option>
+ <option value="TSC 1">TSC 1</option>
+ <option value="TSC 2">TSC 2</option>
+ <option value="TSC 3">TSC 3</option>
+ <option value="TSC 4">TSC 4</option>
+ <option value="TSC 5">TSC 5</option>
+ <option value="TSC 6">TSC 6</option>
+ <option value="TSC 7">TSC 7</option>
+ <option value="TSC 8">TSC 8</option>
+ <option value="TSC 9 - Special">TSC 9 - Special</option>
+ </select></td>
+ <td width="558">The Channel Type restrictions need to be checked</td>
+ </tr>
+ <tr>
+ <td width="145" align="center"><font size="2" face="Times New Roman"><strong>8</strong></font></td>
+ <td width="166"><select name="Channel8" size="1">
+ <option value="0">TCH Full</option>
+ <option value="1">TCH Half</option>
+ <option value="2">TCH Half 2</option>
+ <option value="3">SDCCH</option>
+ <option value="6">CCCH</option>
+ <option value="8">SDCCH with CBCH</option>
+ </select></td>
+ <td width="169"><select name="D3" size="1">
+ <option selected value="Use BCC">Use BCC</option>
+ <option value="TSC 1">TSC 1</option>
+ <option value="TSC 2">TSC 2</option>
+ <option value="TSC 3">TSC 3</option>
+ <option value="TSC 4">TSC 4</option>
+ <option value="TSC 5">TSC 5</option>
+ <option value="TSC 6">TSC 6</option>
+ <option value="TSC 7">TSC 7</option>
+ <option value="TSC 8">TSC 8</option>
+ <option value="TSC 9 - Special">TSC 9 - Special</option>
+ </select></td>
+ <td width="558">The Channel Type restrictions need to be checked</td>
+ </tr>
+ </table>
+ <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
+ </form>
+ <u><font FACE="Arial" SIZE="2"><p></font><font size="3">radioCarrier -&gt;
+ radioCarrierPackage</font></u></p>
+<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
+function FrontPage_Form5_Validator(theForm)
+{
+
+ if (theForm.MaxPowerReduction.value == "")
+ {
+ alert("Please enter a value for the \"MaxPowerReduction\" field.");
+ theForm.MaxPowerReduction.focus();
+ return (false);
+ }
+
+ if (theForm.MaxPowerReduction.value.length > 1)
+ {
+ alert("Please enter at most 1 characters in the \"MaxPowerReduction\" field.");
+ theForm.MaxPowerReduction.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-,";
+ var checkStr = theForm.MaxPowerReduction.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ if (ch != ",")
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"MaxPowerReduction\" field.");
+ theForm.MaxPowerReduction.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "15"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"15\" in the \"MaxPowerReduction\" field.");
+ theForm.MaxPowerReduction.focus();
+ return (false);
+ }
+ return (true);
+}
+//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="_derived/nortbots.htm" onsubmit="location.href='_derived/nortbots.htm';return false;" name="FrontPage_Form5" webbot-action="--WEBBOT-SELF--" WEBBOT-onSubmit="return FrontPage_Form5_Validator(this)">
+ <!--webbot bot="SaveResults" startspan
+ U-File="D:\Oam\Manager\_private\form_results.txt" S-Format="TEXT/CSV"
+ S-Label-Fields="TRUE" --><strong>[FrontPage Save Results Component]</strong><!--webbot
+ bot="SaveResults" endspan i-checksum="6561" --><table border="1" width="872">
+ <tr>
+ <td width="259"><font size="2" face="Courier New">powerClass</font></td>
+ <td width="193"><select name="PowerClass" size="1">
+ <option value="M1 - 250mW">M1 - 250mW</option>
+ <option value="M2 - 160mW">M2 - 160mW</option>
+ </select></td>
+ <td width="606">Some of this will depend on the GSM Indicator type above</td>
+ </tr>
+ <tr>
+ <td width="259"><font size="2" face="Courier New">txPwrMaxReduction</font></td>
+ <td width="193"><!--webbot bot="Validation" S-Data-Type="Integer"
+ S-Number-Separators="," B-Value-Required="TRUE" I-Maximum-Length="1"
+ S-Validation-Constraint="Greater than or equal to"
+ S-Validation-Value="0" S-Validation-Constraint="Less than or equal to"
+ S-Validation-Value="15" --><input type="text" name="MaxPowerReduction" size="2" maxlength="1"></td>
+ <td width="606">in 2dB Steps</td>
+ </tr>
+ </table>
+ <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
+ </form>
+ <ul>
+ <li><big><strong>Protocol Configuration Management</strong></big></li>
+ </ul>
+ <p><font FACE="Arial" SIZE="2"><u>bsc-&gt; bscBasicPackage</u></font></p>
+ <table border="1" width="843">
+ <tr>
+ <td width="186"><font size="2" face="Courier New">handoverReqParam</font></td>
+ <td width="173">&nbsp;</td>
+ <td width="466">Need to check this one out</td>
+ </tr>
+ </table>
+ <p><u><font FACE="Arial" SIZE="2">bts -&gt;btsQueuingPackage</font></u></p>
+<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
+function FrontPage_Form6_Validator(theForm)
+{
+
+ if (theForm.MaxQLength.value == "")
+ {
+ alert("Please enter a value for the \"MaxQLength\" field.");
+ theForm.MaxQLength.focus();
+ return (false);
+ }
+
+ if (theForm.MaxQLength.value.length < 1)
+ {
+ alert("Please enter at least 1 characters in the \"MaxQLength\" field.");
+ theForm.MaxQLength.focus();
+ return (false);
+ }
+
+ if (theForm.MaxQLength.value.length > 3)
+ {
+ alert("Please enter at most 3 characters in the \"MaxQLength\" field.");
+ theForm.MaxQLength.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-,";
+ var checkStr = theForm.MaxQLength.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ if (ch != ",")
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"MaxQLength\" field.");
+ theForm.MaxQLength.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "100"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"100\" in the \"MaxQLength\" field.");
+ theForm.MaxQLength.focus();
+ return (false);
+ }
+ return (true);
+}
+//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="_derived/nortbots.htm" onsubmit="location.href='_derived/nortbots.htm';return false;" name="FrontPage_Form6" webbot-action="--WEBBOT-SELF--" WEBBOT-onSubmit="return FrontPage_Form6_Validator(this)">
+ <!--webbot bot="SaveResults" startspan
+ U-File="D:\Oam\Manager\_private\form_results.txt" S-Format="TEXT/CSV"
+ S-Label-Fields="TRUE" --><strong>[FrontPage Save Results Component]</strong><!--webbot
+ bot="SaveResults" endspan i-checksum="6561" --><table border="1" width="829">
+ <tr>
+ <td width="186"><font size="2" face="Courier New">maxQueueLength</font></td>
+ <td width="172"><!--webbot bot="Validation" S-Data-Type="Integer"
+ S-Number-Separators="," B-Value-Required="TRUE" I-Minimum-Length="1"
+ I-Maximum-Length="3"
+ S-Validation-Constraint="Greater than or equal to"
+ S-Validation-Value="0" S-Validation-Constraint="Less than or equal to"
+ S-Validation-Value="100" --><input type="text" name="MaxQLength" size="3" maxlength="3"></td>
+ <td width="453">% of all TCHs</td>
+ </tr>
+ <tr>
+ <td width="186"><font size="2" face="Courier New">msPriorityUsedInQueuing</font></td>
+ <td width="172">?</td>
+ <td width="453">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="186"><font size="2" face="Courier New">timeLimitCall</font></td>
+ <td width="172">?</td>
+ <td width="453">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="186"><font size="2" face="Courier New">timeLimitHandover</font></td>
+ <td width="172">?</td>
+ <td width="453">&nbsp;</td>
+ </tr>
+ </table>
+ <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
+ </form>
+ <p><u><font FACE="Arial" SIZE="2">bts-&gt;btsTimerPackage</font></u></p>
+ <font FACE="Arial" SIZE="2"><!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
+function FrontPage_Form7_Validator(theForm)
+{
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.T200SDCCH.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"T200SDCCH\" field.");
+ theForm.T200SDCCH.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.T200FACCHTCHF.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"T200FACCHTCHF\" field.");
+ theForm.T200FACCHTCHF.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.T200FACCHTCHF1.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"T200FACCHTCHF1\" field.");
+ theForm.T200FACCHTCHF1.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.T200TCHSAPI0.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"T200TCHSAPI0\" field.");
+ theForm.T200TCHSAPI0.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.T200TCHSAPI1.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"T200TCHSAPI1\" field.");
+ theForm.T200TCHSAPI1.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.T200TCHSAPI2.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"T200TCHSAPI2\" field.");
+ theForm.T200TCHSAPI2.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.T200TCHSAPI3.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"T200TCHSAPI3\" field.");
+ theForm.T200TCHSAPI3.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.T3101.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"T3101\" field.");
+ theForm.T3101.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.T3103.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"T3103\" field.");
+ theForm.T3103.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.T3105.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"T3105\" field.");
+ theForm.T3105.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.T3107.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"T3107\" field.");
+ theForm.T3107.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.T3109.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"T3109\" field.");
+ theForm.T3109.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.T3111.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"T3111\" field.");
+ theForm.T3111.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.T3113.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"T3113\" field.");
+ theForm.T3113.focus();
+ return (false);
+ }
+ return (true);
+}
+//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="_derived/nortbots.htm" onsubmit="location.href='_derived/nortbots.htm';return false;" name="FrontPage_Form7" webbot-action="--WEBBOT-SELF--" WEBBOT-onSubmit="return FrontPage_Form7_Validator(this)">
+ <!--webbot bot="SaveResults" startspan
+ U-File="D:\Oam\Manager\_private\form_results.txt" S-Format="TEXT/CSV"
+ S-Label-Fields="TRUE" --><strong>[FrontPage Save Results Component]</strong><!--webbot
+ bot="SaveResults" endspan i-checksum="6561" --><table border="1" width="829" height="205">
+ <tr>
+ <td width="186" height="23"></font><font size="2" face="Courier New">T200:SDCCH SAPI 0</font><font FACE="Arial" SIZE="2"></td>
+ <td width="172" height="23"><!--webbot bot="Validation"
+ S-Data-Type="Integer" S-Number-Separators="x" --><input type="text" name="T200SDCCH" size="20"></td>
+ <font size="1"><td width="453" height="23"><font face="Tahoma">SDCCH, SAPI 0 layer
+ 2 timer in 5ms units</font></td>
+ </font><font FACE="Arial" SIZE="2">
+ </tr>
+ <tr>
+ <td width="186" height="25"></font><font size="2" face="Courier New">T200:FACCH TCHF</font><font FACE="Arial" SIZE="2"></td>
+ <td width="172" height="25"><!--webbot bot="Validation"
+ S-Data-Type="Integer" S-Number-Separators="x" --><input type="text" name="T200FACCHTCHF" size="20"></td>
+ <font size="1"><td width="453" height="25"><font face="Tahoma">Associated with a
+ Full Rate TCH layer 2 timer in 5ms units</font></td>
+ </font><font FACE="Arial" SIZE="2">
+ </tr>
+ <tr>
+ <td width="186" height="23"></font><font size="2" face="Courier New">T200:FACCH TCHH</font><font FACE="Arial" SIZE="2"></td>
+ <td width="172" height="23"><!--webbot bot="Validation"
+ S-Data-Type="Integer" S-Number-Separators="x" --><input type="text" name="T200FACCHTCHF1" size="20"></td>
+ <font size="1"><td width="453" height="23"><font face="Tahoma">Associated with a
+ Half Rate TCH layer 2 timer in 5ms units</font></td>
+ </font><font FACE="Arial" SIZE="2">
+ </tr>
+ <tr>
+ <td width="186" height="23"></font><font size="2" face="Courier New">T200:TCH SAPI 0</font><font FACE="Arial" SIZE="2"></td>
+ <td width="172" height="23"><!--webbot bot="Validation"
+ S-Data-Type="Integer" S-Number-Separators="x" --><input type="text" name="T200TCHSAPI0" size="20"></td>
+ <font size="1"><td width="453" height="23"><font face="Tahoma">Associated with
+ SACCH with TCH SAPI 0 layer 2 timer in 5ms units</font></td>
+ </font><font FACE="Arial" SIZE="2">
+ </tr>
+ <tr>
+ <td width="186" height="23"></font><font size="2" face="Courier New">T200:SACCH SDCCH</font><font FACE="Arial" SIZE="2"></td>
+ <td width="172" height="23"><!--webbot bot="Validation"
+ S-Data-Type="Integer" S-Number-Separators="x" --><input type="text" name="T200TCHSAPI1" size="20"></td>
+ <font size="1"><td width="453" height="23"><font face="Tahoma">Associated with
+ SACCH with SDCCH layer 2 timer in 5ms units</font></td>
+ </font><font FACE="Arial" SIZE="2">
+ </tr>
+ <tr>
+ <td width="186" height="23"></font><font size="2" face="Courier New">T200:SDCCH SAPI 3</font><font FACE="Arial" SIZE="2"></td>
+ <td width="172" height="23"><!--webbot bot="Validation"
+ S-Data-Type="Integer" S-Number-Separators="x" --><input type="text" name="T200TCHSAPI2" size="20"></td>
+ <font size="1"><td width="453" height="23"><font face="Tahoma">Associated with
+ SDCCH, SAPI 3 layer 2 timer in 5ms units</font></td>
+ </font><font FACE="Arial" SIZE="2">
+ </tr>
+ <tr>
+ <td width="186" height="23"></font><font size="2" face="Courier New">T200:SACCH TCH SAPI 3</font><font FACE="Arial" SIZE="2"></td>
+ <td width="172" height="23"><!--webbot bot="Validation"
+ S-Data-Type="Integer" S-Number-Separators="x" --><input type="text" name="T200TCHSAPI3" size="20"></td>
+ <font size="1"><td width="453" height="23"><font face="Tahoma">Associated with
+ SACCH with TCH, SAPI 3 layer 2 timer in 5ms units</font></td>
+ </font><font FACE="Arial" SIZE="2">
+ </tr>
+ </table>
+ <p>&nbsp;</p>
+ <table border="1" width="829">
+ <tr>
+ <td width="186"></font><font size="2" face="Courier New">T3101</font><font FACE="Arial" SIZE="2"></td>
+ <td width="172"><!--webbot bot="Validation" S-Data-Type="Integer"
+ S-Number-Separators="x" --><input type="text" name="T3101" size="20"></td>
+ <font size="1"><td width="453"><font face="Tahoma">Used with IMMEDIATE ASSIGNMENT</font></td>
+ </font><font FACE="Arial" SIZE="2">
+ </tr>
+ <tr>
+ <td width="186"></font><font size="2" face="Courier New">T3103</font><font FACE="Arial" SIZE="2"></td>
+ <td width="172"><!--webbot bot="Validation" S-Data-Type="Integer"
+ S-Number-Separators="x" --><input type="text" name="T3103" size="20"></td>
+ <font size="1"><td width="453"><font face="Tahoma">Used with HANDOVER COMMAND</font></td>
+ </font><font FACE="Arial" SIZE="2">
+ </tr>
+ <tr>
+ <td width="186"></font><font size="2" face="Courier New">T3105</font><font FACE="Arial" SIZE="2"></td>
+ <td width="172"><!--webbot bot="Validation" S-Data-Type="Integer"
+ S-Number-Separators="x" --><input type="text" name="T3105" size="20"></td>
+ <font size="1"><td width="453"><font face="Tahoma">Used with PHYSICAL INFORMATION</font></td>
+ </font><font FACE="Arial" SIZE="2">
+ </tr>
+ <tr>
+ <td width="186"></font><font size="2" face="Courier New">T3107</font><font FACE="Arial" SIZE="2"></td>
+ <td width="172"><!--webbot bot="Validation" S-Data-Type="Integer"
+ S-Number-Separators="x" --><input type="text" name="T3107" size="20"></td>
+ <font size="1"><td width="453"><font face="Tahoma">Used with ASSIGNMENT COMMAND</font></td>
+ </font><font FACE="Arial" SIZE="2">
+ </tr>
+ <tr>
+ <td width="186"></font><font size="2" face="Courier New">T3109</font><font FACE="Arial" SIZE="2"></td>
+ <td width="172"><!--webbot bot="Validation" S-Data-Type="Integer"
+ S-Number-Separators="x" --><input type="text" name="T3109" size="20"></td>
+ <font size="1"><td width="453"><font face="Tahoma">Used for lower layer failure</font></td>
+ </font><font FACE="Arial" SIZE="2">
+ </tr>
+ <tr>
+ <td width="186"></font><font size="2" face="Courier New">T3111</font><font FACE="Arial" SIZE="2"></td>
+ <td width="172"><!--webbot bot="Validation" S-Data-Type="Integer"
+ S-Number-Separators="x" --><input type="text" name="T3111" size="20"></td>
+ <font size="1"><td width="453"><font face="Tahoma">Used for Channel Activation
+ Delay</font></td>
+ </font><font FACE="Arial" SIZE="2">
+ </tr>
+ <tr>
+ <td width="186"></font><font size="2" face="Courier New">T3113</font><font FACE="Arial" SIZE="2"></td>
+ <td width="172"><!--webbot bot="Validation" S-Data-Type="Integer"
+ S-Number-Separators="x" --><input type="text" name="T3113" size="20"></td>
+ <font size="1"><td width="453"><font face="Tahoma">Used with Paging Messages</font></td>
+ </font><font FACE="Arial" SIZE="2">
+ </tr>
+ </table>
+ <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
+ </form>
+ </font><ul>
+ <li><big><strong>Adjacent Cell Configuration Management</strong></big></li>
+ <li>There may be multiple of these for the Handover case</li>
+ <li><table BORDER="1" CELLSPACING="2" CELLPADDING="4" WIDTH="630">
+ <tr>
+ <td WIDTH="28%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><b><p ALIGN="CENTER">Managed
+ Object Classes</b></font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><b><p ALIGN="CENTER">Packages</b></font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><b><p ALIGN="CENTER">Attributes/Actions/Notifications</b></font></td>
+ </tr>
+ <tr>
+ <td WIDTH="28%" VALIGN="TOP"><font FACE="Arial" SIZE="2">adjacentCellHandOver</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font FACE="Arial" SIZE="2">adjacentCellHandOverPackage</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font FACE="Arial" SIZE="2">adjacentCellID<p>bCCHFrequency
+ (from cellAllocation)</p>
+ <p>bsIdentityCode (as in cell config)</p>
+ <p>cellGlobalIdentity ( as above )</p>
+ <p>synchronized</font></td>
+ </tr>
+ <tr>
+ <td WIDTH="28%" VALIGN="TOP"><font FACE="Arial" SIZE="2">adjacentCellReselection</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font FACE="Arial" SIZE="2">adjacentCellReselectionPackage</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font FACE="Arial" SIZE="2">adjacentCellID<p>bCCHFrequency</font></td>
+ </tr>
+ </table>
+ </li>
+ <li><big><strong>Power Control Management</strong></big></li>
+ <li>This package needs to be provided by JetCell</li>
+ <li><big><strong>Handover Control Management</strong></big></li>
+ <li>We need to be able to make several of these for different Adjacent cells.<table BORDER="1" CELLSPACING="2" CELLPADDING="4" WIDTH="628">
+ <tr>
+ <td WIDTH="31%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><b><p ALIGN="CENTER">Managed
+ Object Classes</b></font></td>
+ <td WIDTH="34%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><b><p ALIGN="CENTER">Packages</b></font></td>
+ <td WIDTH="34%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><b><p ALIGN="CENTER">Attributes/Actions/Notifications</b></font></td>
+ </tr>
+ <tr>
+ <td WIDTH="31%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><u>basebandTransceiver </u></font></td>
+ <td WIDTH="34%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><u>basebandTransceiverPackage</u></font></td>
+ <td WIDTH="34%" VALIGN="TOP"><font FACE="Arial" SIZE="2">forcedHO (action)</font></td>
+ </tr>
+ <tr>
+ <td WIDTH="31%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><u>bsc </u></font></td>
+ <td WIDTH="34%" VALIGN="TOP"><font FACE="Arial" SIZE="2">internalInterCellHandoverPackage</font></td>
+ <td WIDTH="34%" VALIGN="TOP"><font FACE="Arial" SIZE="2">enableInternalInterCellHandover</font></td>
+ </tr>
+ <tr>
+ <td WIDTH="31%" VALIGN="TOP">&nbsp;</td>
+ <td WIDTH="34%" VALIGN="TOP"><font FACE="Arial" SIZE="2">internalIntraCellHandoverPackage</font></td>
+ <td WIDTH="34%" VALIGN="TOP"><font FACE="Arial" SIZE="2">enableInternalIntraCellHandover</font></td>
+ </tr>
+ <tr>
+ <td WIDTH="31%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><u>bts </u></font></td>
+ <td WIDTH="34%" VALIGN="TOP"><font FACE="Arial" SIZE="2"><u>btsBasicPackage</u></font></td>
+ <td WIDTH="34%" VALIGN="TOP"><font FACE="Arial" SIZE="2">forcedHO (action)</font></td>
+ </tr>
+ <tr>
+ <td WIDTH="31%" VALIGN="TOP">&nbsp;</td>
+ <td WIDTH="34%" VALIGN="TOP"><font FACE="Arial" SIZE="2">hoMsmtProcessingModePackage</font></td>
+ <td WIDTH="34%" VALIGN="TOP"><font FACE="Arial" SIZE="2">hoMsmtProcessingMode</font></td>
+ </tr>
+ <tr>
+ <td WIDTH="31%" VALIGN="TOP"><font FACE="Arial" SIZE="2">handoverControl </font></td>
+ <td WIDTH="34%" VALIGN="TOP"><font FACE="Arial" SIZE="2">handoverControlPackage</font></td>
+ <td WIDTH="34%" VALIGN="TOP"><font FACE="Arial" SIZE="2">handoverControlID<p>msmtProcParamLoc</font></td>
+ </tr>
+ <tr>
+ <td VALIGN="TOP" COLSPAN="3"><font FACE="Arial" SIZE="2"><b>GSM 05.08 Algorithm Management
+ Related</b></font></td>
+ </tr>
+ <tr>
+ <td WIDTH="31%" VALIGN="TOP"><font FACE="Arial" SIZE="2">adjacentCellHandOverGSM0508 </font></td>
+ <td WIDTH="34%" VALIGN="TOP"><font FACE="Arial" SIZE="2">adjacentCellHandOverGSM0508Package</font></td>
+ <td WIDTH="34%" VALIGN="TOP"><font FACE="Arial" SIZE="2">hoMargin<p>hoPriorityLevel</p>
+ <p>msTxPwrMaxCell (as in mSTxPwrMaxCCH)</p>
+ <p>rxLevMinCell</font></td>
+ </tr>
+ <tr>
+ <td WIDTH="31%" VALIGN="TOP"><font FACE="Arial" SIZE="2">handoverControlGSM0508 </font></td>
+ <td WIDTH="34%" VALIGN="TOP"><font FACE="Arial" SIZE="2">handoverControlGSM0508Package</font></td>
+ <td WIDTH="34%" VALIGN="TOP"><font FACE="Arial" SIZE="2">enableOptHandoverProcessing<p>hoAveragingAdjCellParam</p>
+ <p>hoAveragingDistParam</p>
+ <p>hoAveragingLevParam</p>
+ <p>hoAveragingQualParam</p>
+ <p>hoMarginDef</p>
+ <p>hoThresholdDistParam</p>
+ <p>hoThresholdInterferenceParam</p>
+ <p>hoThresholdLevParam</p>
+ <p>hoThresholdQualParam</p>
+ <p>interferenceAveragingParam</p>
+ <p>msTxPwrMaxCellDef</p>
+ <p>rxLevMinCellDef</font></td>
+ </tr>
+ </table>
+ </li>
+ <li><big><strong>Frequency Control Management</strong></big></li>
+ <li><big><strong>Not sure how this one works as it is a containment class, I think?</strong></big></li>
+ </ul>
+ <p><font SIZE="2" face="Courier New"><u>basebandTransceiver
+ -&gt;basebandTransceiverPackage</u></font></p>
+ <p><font SIZE="2" face="Courier New">relatedRadioCarrier</font></p>
+ <p><font SIZE="2" face="Courier New"><u>bts -&gt;btsBasicPackage</u></font></p>
+ <p><font SIZE="2" face="Courier New">cellAllocation </font></p>
+ <p><u><font SIZE="2" face="Courier New">bts -&gt;channelConfigModPackage</font></u></p>
+ <p><font SIZE="2"><font face="Courier New">channelConfigModification (action)</font></p>
+ <p><font face="Courier New">channelModComplete (notification)</font></font></p>
+ <p><font SIZE="2" face="Courier New"><u>channel -&gt;channelPackage</u></font></p>
+ <!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
+function FrontPage_Form8_Validator(theForm)
+{
+
+ if (theForm.HSN.value == "")
+ {
+ alert("Please enter a value for the \"HSN\" field.");
+ theForm.HSN.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.HSN.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"HSN\" field.");
+ theForm.HSN.focus();
+ return (false);
+ }
+
+ var chkVal = allNum;
+ var prsVal = parseInt(allNum);
+ if (chkVal != "" && !(prsVal >= "0" && prsVal <= "63"))
+ {
+ alert("Please enter a value greater than or equal to \"0\" and less than or equal to \"63\" in the \"HSN\" field.");
+ theForm.HSN.focus();
+ return (false);
+ }
+ return (true);
+}
+//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="_derived/nortbots.htm" onsubmit="location.href='_derived/nortbots.htm';return false;" name="FrontPage_Form8" webbot-action="--WEBBOT-SELF--" WEBBOT-onSubmit="return FrontPage_Form8_Validator(this)">
+ <!--webbot bot="SaveResults" startspan
+ U-File="D:\Oam\Manager\_private\form_results.txt" S-Format="TEXT/CSV"
+ S-Label-Fields="TRUE" --><strong>[FrontPage Save Results Component]</strong><!--webbot
+ bot="SaveResults" endspan i-checksum="6561" --><table border="1" width="869">
+ <tr>
+ <td width="237"><font size="2" face="Courier New">frequencyUsage</font></td>
+ <td width="182"><select name="D1" size="1">
+ <option value="0">No Use - Initial Value</option>
+ <option value="Non Hopping">Non Hopping</option>
+ <option value="Hopping">Hopping</option>
+ </select></td>
+ <td width="432">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="237"><font size="2" face="Courier New">frequencyHoppingSystem </font></td>
+ <td width="182">&nbsp;</td>
+ <td width="432">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="237"><font size="2" face="Courier New">frequencyHoppingSystemPackage</font></td>
+ <td width="182">&nbsp;</td>
+ <td width="432">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="237"><font SIZE="2" face="Courier New">frequencyHoppingSystemID</font></td>
+ <td width="182">&nbsp;</td>
+ <td width="432">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="237"><font face="Courier New" SIZE="2">hoppingSequenceNumber</font></td>
+ <td width="182"><!--webbot bot="Validation" S-Data-Type="Integer"
+ S-Number-Separators="x" B-Value-Required="TRUE"
+ S-Validation-Constraint="Greater than or equal to"
+ S-Validation-Value="0" S-Validation-Constraint="Less than or equal to"
+ S-Validation-Value="63" --><input type="text" name="HSN" size="3"></td>
+ <td width="432">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="237"><font face="Courier New" SIZE="2">mobileAllocation</font></td>
+ <td width="182"><select name="MobileAllocation" size="1" multiple>
+ <option value="Non Hopping">Non Hopping</option>
+ <option value="No Allocation Set">No Allocation Set</option>
+ </select></td>
+ <td width="432">&nbsp;</td>
+ </tr>
+ </table>
+ <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
+ </form>
+ <p><font SIZE="2" face="Courier New"><u>radioCarrier -&gt;radioCarrierPackage</u></font></p>
+ <table border="1" width="869">
+ <tr>
+ <td width="236"><font size="2" face="Courier New">carrierFrequencyList</font></td>
+ <td width="182">&nbsp;</td>
+ <td width="433">&nbsp;</td>
+ </tr>
+ </table>
+ <ul>
+ <li><big><strong>Architectural Element Management</strong></big></li>
+ <li><big><strong>Do we need this section</strong></big></li>
+ </ul>
+ <table BORDER="1" CELLSPACING="2" CELLPADDING="4" WIDTH="630">
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><font size="2"><b><p ALIGN="CENTER"><font face="Courier New">Managed
+ Object Classes</font></b></font></td>
+ <td WIDTH="35%" VALIGN="TOP"><font size="2"><b><p ALIGN="CENTER"><font face="Courier New">Packages</font></b></font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font size="2"><b><p ALIGN="CENTER"><font face="Courier New">Attributes/Actions/Notifications</font></b></font></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><font face="Courier New" size="2">basebandTransceiver </font></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">basebandTransceiverPackage</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font size="2"><font face="Courier New">basebandTransceiverID</font><p><font face="Courier New">relatedGSMEquipment</font></p>
+ <p><font face="Courier New">relatedOAMLapdLink</font></p>
+ <p><font face="Courier New">relatedTelecomLapdLink</font></p>
+ <p><font face="Courier New">State/Status Attributes***</font></font></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">equipmentRelatedAlarmPackage*</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">functionalRelatedAlarmPackage**</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><font face="Courier New" size="2">bsc </font></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">bscBasicPackage</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font size="2"><font face="Courier New">bscID</font><p><font face="Courier New">relatedGSMEquipment</font></p>
+ <p><font face="Courier New">State/Status Attributes***</font></font></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">adjustExternalTimePackage</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font face="Courier New" size="2">adjustExternalTime (action)</font></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">equipmentRelatedAlarmPackage*</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">functionalRelatedAlarmPackage**</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><font face="Courier New" size="2">bssFunction </font></td>
+ <td WIDTH="35%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="36%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><font face="Courier New" size="2">bts </font></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">btsBasicPackage</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font size="2"><font face="Courier New">btsID</font><p><font face="Courier New">relatedGSMEquipment</font></p>
+ <p><font face="Courier New">relatedOAMLapdLink</font></p>
+ <p><font face="Courier New">relatedTranscoder</font></p>
+ <p><font face="Courier New">State/Status Attributes***</font></font></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">equipmentRelatedAlarmPackage*</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">functionalRelatedAlarmPackage**</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><font face="Courier New" size="2">btsSiteManager </font></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">btsSiteManagerBasicPackage</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font size="2"><font face="Courier New">btsSiteManagerID</font><p><font face="Courier New">relatedGSMEquipment</font></p>
+ <p><font face="Courier New">relatedOAMLapdLink</font></font></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">equipmentRelatedAlarmPackage*</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><font face="Courier New" size="2">channel </font></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">channelPackage</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font size="2"><font face="Courier New">channelID</font><p><font face="Courier New">relatedGSMEquipment</font></p>
+ <p><font face="Courier New">terrTrafChannel</font></p>
+ <p><font face="Courier New">State/Status Attributes***</font></font></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">equipmentRelatedAlarmPackage*</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">functionalRelatedAlarmPackage**</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><font face="Courier New" size="2">gsmManagedFunction </font></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">locationNamePackage</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font face="Courier New" size="2">locationName</font></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">userLabelPackage</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font face="Courier New" size="2">userLabel</font></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><font face="Courier New" size="2">lapdLink </font></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">lapdLinkPackage</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font size="2"><font face="Courier New">lapdLinkID</font><p><font face="Courier New">abisSigChannel</font></p>
+ <p><font face="Courier New">sapi</font></p>
+ <p><font face="Courier New">tei</font></p>
+ <p><font face="Courier New">State/Status Attributes***</font></font></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">functionalRelatedAlarmPackage**</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><font face="Courier New" size="2">pcmCircuit </font></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">pcmCircuitPackage</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font size="2"><font face="Courier New">pcmCircuitID</font><p><font face="Courier New">relatedGSMEquipment</font></p>
+ <p><font face="Courier New">administrativeState</font></p>
+ <p><font face="Courier New">State/Status Attributes***</font></font></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">equipmentRelatedAlarmPackage*</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">functionalRelatedAlarmPackage**</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><font face="Courier New" size="2">radioCarrier </font></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">radioCarrierPackage</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font size="2"><font face="Courier New">radioCarrierID</font><p><font face="Courier New">relatedGSMEquipment</font></p>
+ <p><font face="Courier New">State/Status Attributes***</font></font></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">equipmentRelatedAlarmPackage*</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">functionalRelatedAlarmPackage**</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><font face="Courier New" size="2">transcoder </font></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">transcoderPackage</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font size="2"><font face="Courier New">transcoderID</font><p><font face="Courier New">relatedGSMEquipment</font></p>
+ <p><font face="Courier New">State/Status Attributes***</font></font></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">transcoderMatrixPackage</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font face="Courier New" size="2">transcoderMatrix</font></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">equipmentRelatedAlarmPackage*</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New" size="2">functionalRelatedAlarmPackage**</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><big><font face="Courier New">&nbsp;</font></big></td>
+ </tr>
+ </table>
+ <ul>
+ <li><big><strong>Software Management</strong></big></li>
+ <li>THis needs to be aligned with our strategy?<table BORDER="1" CELLSPACING="2" CELLPADDING="4" WIDTH="630">
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><font SIZE="2"><b><p ALIGN="CENTER"><font face="Courier New">Managed
+ Object Classes</font></b></font></td>
+ <td WIDTH="35%" VALIGN="TOP"><font SIZE="2"><b><p ALIGN="CENTER"><font face="Courier New">Packages</font></b></font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font SIZE="2"><b><p ALIGN="CENTER"><font face="Courier New">Attributes/Actions/Notifications</font></b></font></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><font face="Courier New"><font SIZE="2">executableSoftwareUnit
+ </font></font></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New"><font SIZE="2">executableSoftwareUnitPackage</font></font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font face="Courier New"><font SIZE="2">relatedRSUs</font></font></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><font face="Courier New"><font SIZE="2">operatingSoftwareUnit
+ </font></font></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New"><font SIZE="2">operatingSoftwareUnitPackage</font></font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font SIZE="2"><font face="Courier New">operatingSoftwareID</font><p><font face="Courier New">backupESU</font></p>
+ <p><font face="Courier New">fallbackESU</font></p>
+ <p><font face="Courier New">newESU </font></p>
+ <p><font face="Courier New">runningESU</font></p>
+ <p><font face="Courier New">administrativeState</font></p>
+ <p><font face="Courier New">controlStatus</font></p>
+ <p><font face="Courier New">alarmStatus</font></p>
+ <p><font face="Courier New">operationalState</font></p>
+ <p><font face="Courier New">availabilityStatus</font></font></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><font face="Courier New"><font SIZE="2">replaceableSoftwareUnit
+ </font></font></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New"><font SIZE="2">replaceableSoftwareUnitPackage</font></font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font face="Courier New"><font SIZE="2">relatedFiles</font></font></td>
+ </tr>
+ <tr>
+ <td WIDTH="29%" VALIGN="TOP"><font SIZE="2" face="Courier New">simpleFileTransferControl </font></td>
+ <td WIDTH="35%" VALIGN="TOP"><font face="Courier New">&nbsp;</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font SIZE="2"><font face="Courier New">requestTransferDown
+ (action)</font><p><font face="Courier New">transferDownComplete (action)</font></p>
+ <p><font face="Courier New">transferDownReady (notification)</font></font></td>
+ </tr>
+ </table>
+ </li>
+ <li><big><strong>Equipment Management</strong></big></li>
+ <li>&nbsp;<table BORDER="1" CELLSPACING="2" CELLPADDING="4" WIDTH="631">
+ <tr>
+ <td WIDTH="32%" VALIGN="TOP"><font SIZE="2"><b><p ALIGN="CENTER"><font face="Courier New">Managed
+ Object Classes</font></b></font></td>
+ <td WIDTH="33%" VALIGN="TOP"><font SIZE="2"><b><p ALIGN="CENTER"><font face="Courier New">Packages</font></b></font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font SIZE="2"><b><p ALIGN="CENTER"><font face="Courier New">Attributes/Actions/Notifications</font></b></font></td>
+ </tr>
+ <tr>
+ <td WIDTH="32%" VALIGN="TOP"><font SIZE="2" face="Courier New">gsmEquipment </font></td>
+ <td WIDTH="33%" VALIGN="TOP"><font SIZE="2" face="Courier New">gsmEquipmentPackage</font></td>
+ <td WIDTH="36%" VALIGN="TOP"><font SIZE="2"><font face="Courier New">equipmentType</font><p><font face="Courier New">relatedGSMFunctionalObjects</font></font></td>
+ </tr>
+ </table>
+ </li>
+ </ul>
+
+<p>&nbsp;</p>
+
+<blockquote>
+ <ul>
+ <li><big><strong>Mobility Management Related Parameters</strong></big></li>
+ </ul>
+</blockquote>
+
+<blockquote>
+ <ul>
+ <li><big><strong>Call Control Related Parameters</strong></big></li>
+ </ul>
+</blockquote>
+
+<hr>
+
+<ul>
+ <li><a href="h323_parameters.htm"><strong><big><big>H.323 Parameters</big></big></strong></a></li>
+ <li><a href="jetcell_parameters.htm"><strong><big><big>JetCell Parameters</big></big></strong></a></li>
+ <li><a href="misc_parameters.htm"><strong><big><big>Miscellaneous Parameters</big></big></strong></a></li>
+ <li><a href="view_stats.htm"><strong><big><big>View Statistic Logs</big></big></strong></a></li>
+ <li><a href="main_features.htm"><strong><big><big>Mantainence Features (Must be Operator)</big></big></strong></a></li>
+</ul>
+
+<p><a href="access_vipercell.htm">Return to Access Page</a>&nbsp; <a href="index.htm">Return
+to Start</a>
+ </body>
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/radio_resource_config_data.htm b/data/mnet/GP10/Host/ViperWatch/radio_resource_config_data.htm
new file mode 100644
index 0000000..4dd3fba
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/radio_resource_config_data.htm
@@ -0,0 +1,94 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Parameter</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+
+<SCRIPT Language="JavaScript">
+
+function parseSelect(theSelect, valueHolder)
+{
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].selected)
+ {
+ valueHolder.value = theSelect.options[i].value;
+ break;
+ }
+ }
+}
+
+function PresetButtons(theForm)
+{
+ selectOption(theForm.gsmdcsIndicatorSelect, theForm.gsmdcsIndicator);
+ clickCheckBox(theForm.rm_nim_0_0Check, theForm.rm_nim_0_0);
+}
+
+function ParseForm(theForm)
+{
+ parseSelect(theForm.rm_nim_0_0Select, theForm.rm_nim_0_0);
+ parseCheckBox(theForm.rm_nim_0_1Check, theForm.rm_nim_0_1);
+ parseCheckBox(theForm.rm_nim_0_2Check, theForm.rm_nim_0_2);
+
+}
+
+</SCRIPT>
+
+<body onload="PresetButtons(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this);" name="rm_config_data">
+
+ <input name="rm_nim_0_0" type="hidden" value="$%rm_nim_0_0#$"><input name="gsmdcsIndicator" type="hidden" value="$%gsmdcsIndicator#$">
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="384">
+ <tr>
+ <td width="446">
+ <h2 align="center">GP10 Internal Control Screen</h2>
+ <div align="center">
+ <table border="0" width="368">
+ <tr>
+ <td height="23" width="236"><font color="#000000">Swap TRX Required</font></td>
+ <td height="23" width="118">
+ <p style="padding-top: 0px; padding-bottom: 0px"><input type="checkbox" name="rm_nim_0_0Check" value="ON"></td>
+ </tr>
+ <tr>
+ <td height="29" width="261"
+ title="Indicates the type (GSM, PCS, DCS 1800) of the cell. The value may be used to interpret or check other attribute values.">Radio
+ Indicator:</td>
+ <td height="29" width="246"><select name="gsmdcsIndicatorSelect" size="1">
+ <option value="0">GSM 900</option>
+ <option value="1">DCS 1800</option>
+ <option value="2" selected>PCS 1900</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td height="21" width="236"></td>
+ <td height="21" width="118"></td>
+ </tr>
+ </table>
+ </div>
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"><input name="B2" type="submit" value="Submit"></td>
+ <td align="center"><input name="Recall1" type="button" value="Recall" onclick="window.location.reload()"></td>
+ <td align="center"><input name="Reset1" type="reset" value="Reset"></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/radio_resource_config_data.htm.old.htm b/data/mnet/GP10/Host/ViperWatch/radio_resource_config_data.htm.old.htm
new file mode 100644
index 0000000..496a374
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/radio_resource_config_data.htm.old.htm
@@ -0,0 +1,2130 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Parameter</title>
+</head>
+
+<SCRIPT >
+
+
+function selectOption(theSelect, valueHolder)
+{
+ if (valueHolder.value < 0 && valueHolder.value >= theSelect.length)
+ {
+ window.alert("Incorrect MIB value for " + valueHolder.name + " "+ valueHolder.value + "Corrected to 0");
+ valueHolder.value = 0;
+ }
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].value == valueHolder.value)
+ {
+ theSelect.options[i].selected = true;
+ break;
+ }
+ }
+
+}
+
+function presetButtons(theForm)
+{
+
+ return true;
+}
+
+function parseSelect(theSelect, valueHolder)
+{
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].selected)
+ {
+ valueHolder.value = theSelect.options[i].value;
+ break;
+ }
+ }
+}
+
+function parseButtons(theForm)
+{
+ return true;
+}
+
+</SCRIPT>
+
+<body onload="presetButtons(this.document.forms[0]);$%reloadTopframe#$">
+<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
+function FrontPage_Form1_Validator(theForm)
+{
+
+ if (theForm.rm_t3L2.value == "")
+ {
+ alert("Please enter a value for the \"rm_t3L2\" field.");
+ theForm.rm_t3L2.focus();
+ return (false);
+ }
+
+ if (theForm.rm_t3L2.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_t3L2\" field.");
+ theForm.rm_t3L2.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_t3L2.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_t3L2\" field.");
+ theForm.rm_t3L2.focus();
+ return (false);
+ }
+
+ if (theForm.rm_bsCcChans.value == "")
+ {
+ alert("Please enter a value for the \"rm_bsCcChans\" field.");
+ theForm.rm_bsCcChans.focus();
+ return (false);
+ }
+
+ if (theForm.rm_bsCcChans.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_bsCcChans\" field.");
+ theForm.rm_bsCcChans.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_bsCcChans.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_bsCcChans\" field.");
+ theForm.rm_bsCcChans.focus();
+ return (false);
+ }
+
+ if (theForm.rm_bsCcchSdcchComb.value == "")
+ {
+ alert("Please enter a value for the \"rm_bsCcchSdcchComb\" field.");
+ theForm.rm_bsCcchSdcchComb.focus();
+ return (false);
+ }
+
+ if (theForm.rm_bsCcchSdcchComb.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_bsCcchSdcchComb\" field.");
+ theForm.rm_bsCcchSdcchComb.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_bsCcchSdcchComb.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_bsCcchSdcchComb\" field.");
+ theForm.rm_bsCcchSdcchComb.focus();
+ return (false);
+ }
+
+ if (theForm.rm_sysInfoOnOffMap.value == "")
+ {
+ alert("Please enter a value for the \"rm_sysInfoOnOffMap\" field.");
+ theForm.rm_sysInfoOnOffMap.focus();
+ return (false);
+ }
+
+ if (theForm.rm_sysInfoOnOffMap.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_sysInfoOnOffMap\" field.");
+ theForm.rm_sysInfoOnOffMap.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_sysInfoOnOffMap.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_sysInfoOnOffMap\" field.");
+ theForm.rm_sysInfoOnOffMap.focus();
+ return (false);
+ }
+
+ if (theForm.rm_airInterface.value == "")
+ {
+ alert("Please enter a value for the \"rm_airInterface\" field.");
+ theForm.rm_airInterface.focus();
+ return (false);
+ }
+
+ if (theForm.rm_airInterface.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_airInterface\" field.");
+ theForm.rm_airInterface.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_airInterface.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_airInterface\" field.");
+ theForm.rm_airInterface.focus();
+ return (false);
+ }
+
+ if (theForm.rm_viperCellTsc.value == "")
+ {
+ alert("Please enter a value for the \"rm_viperCellTsc\" field.");
+ theForm.rm_viperCellTsc.focus();
+ return (false);
+ }
+
+ if (theForm.rm_viperCellTsc.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_viperCellTsc\" field.");
+ theForm.rm_viperCellTsc.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_viperCellTsc.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_viperCellTsc\" field.");
+ theForm.rm_viperCellTsc.focus();
+ return (false);
+ }
+
+ if (theForm.rm_maxSlotPerTrx.value == "")
+ {
+ alert("Please enter a value for the \"rm_maxSlotPerTrx\" field.");
+ theForm.rm_maxSlotPerTrx.focus();
+ return (false);
+ }
+
+ if (theForm.rm_maxSlotPerTrx.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_maxSlotPerTrx\" field.");
+ theForm.rm_maxSlotPerTrx.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_maxSlotPerTrx.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_maxSlotPerTrx\" field.");
+ theForm.rm_maxSlotPerTrx.focus();
+ return (false);
+ }
+
+ if (theForm.rm_maxTrxs.value == "")
+ {
+ alert("Please enter a value for the \"rm_maxTrxs\" field.");
+ theForm.rm_maxTrxs.focus();
+ return (false);
+ }
+
+ if (theForm.rm_maxTrxs.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_maxTrxs\" field.");
+ theForm.rm_maxTrxs.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_maxTrxs.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_maxTrxs\" field.");
+ theForm.rm_maxTrxs.focus();
+ return (false);
+ }
+
+ if (theForm.rm_maxTchfs.value == "")
+ {
+ alert("Please enter a value for the \"rm_maxTchfs\" field.");
+ theForm.rm_maxTchfs.focus();
+ return (false);
+ }
+
+ if (theForm.rm_maxTchfs.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_maxTchfs\" field.");
+ theForm.rm_maxTchfs.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_maxTchfs.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_maxTchfs\" field.");
+ theForm.rm_maxTchfs.focus();
+ return (false);
+ }
+
+ if (theForm.rm_maxSdcch4s.value == "")
+ {
+ alert("Please enter a value for the \"rm_maxSdcch4s\" field.");
+ theForm.rm_maxSdcch4s.focus();
+ return (false);
+ }
+
+ if (theForm.rm_maxSdcch4s.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_maxSdcch4s\" field.");
+ theForm.rm_maxSdcch4s.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_maxSdcch4s.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_maxSdcch4s\" field.");
+ theForm.rm_maxSdcch4s.focus();
+ return (false);
+ }
+
+ if (theForm.rm_trxOnOffMap.value == "")
+ {
+ alert("Please enter a value for the \"rm_trxOnOffMap\" field.");
+ theForm.rm_trxOnOffMap.focus();
+ return (false);
+ }
+
+ if (theForm.rm_trxOnOffMap.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_trxOnOffMap\" field.");
+ theForm.rm_trxOnOffMap.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_trxOnOffMap.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_trxOnOffMap\" field.");
+ theForm.rm_trxOnOffMap.focus();
+ return (false);
+ }
+
+ if (theForm.rm_networkIfConfig.value == "")
+ {
+ alert("Please enter a value for the \"rm_networkIfConfig\" field.");
+ theForm.rm_networkIfConfig.focus();
+ return (false);
+ }
+
+ if (theForm.rm_networkIfConfig.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_networkIfConfig\" field.");
+ theForm.rm_networkIfConfig.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_networkIfConfig.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_networkIfConfig\" field.");
+ theForm.rm_networkIfConfig.focus();
+ return (false);
+ }
+
+ if (theForm.rm_bcchTrx.value == "")
+ {
+ alert("Please enter a value for the \"rm_bcchTrx\" field.");
+ theForm.rm_bcchTrx.focus();
+ return (false);
+ }
+
+ if (theForm.rm_bcchTrx.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_bcchTrx\" field.");
+ theForm.rm_bcchTrx.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_bcchTrx.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_bcchTrx\" field.");
+ theForm.rm_bcchTrx.focus();
+ return (false);
+ }
+
+ if (theForm.rm_preAlphaTrx.value == "")
+ {
+ alert("Please enter a value for the \"rm_preAlphaTrx\" field.");
+ theForm.rm_preAlphaTrx.focus();
+ return (false);
+ }
+
+ if (theForm.rm_preAlphaTrx.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_preAlphaTrx\" field.");
+ theForm.rm_preAlphaTrx.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_preAlphaTrx.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_preAlphaTrx\" field.");
+ theForm.rm_preAlphaTrx.focus();
+ return (false);
+ }
+
+ if (theForm.rm_ccchBcchComb.value == "")
+ {
+ alert("Please enter a value for the \"rm_ccchBcchComb\" field.");
+ theForm.rm_ccchBcchComb.focus();
+ return (false);
+ }
+
+ if (theForm.rm_ccchBcchComb.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_ccchBcchComb\" field.");
+ theForm.rm_ccchBcchComb.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_ccchBcchComb.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_ccchBcchComb\" field.");
+ theForm.rm_ccchBcchComb.focus();
+ return (false);
+ }
+
+ if (theForm.rm_ccchConf.value == "")
+ {
+ alert("Please enter a value for the \"rm_ccchConf\" field.");
+ theForm.rm_ccchConf.focus();
+ return (false);
+ }
+
+ if (theForm.rm_ccchConf.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_ccchConf\" field.");
+ theForm.rm_ccchConf.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_ccchConf.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_ccchConf\" field.");
+ theForm.rm_ccchConf.focus();
+ return (false);
+ }
+
+ if (theForm.rm_synchChanInfo.value == "")
+ {
+ alert("Please enter a value for the \"rm_synchChanInfo\" field.");
+ theForm.rm_synchChanInfo.focus();
+ return (false);
+ }
+
+ if (theForm.rm_synchChanInfo.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_synchChanInfo\" field.");
+ theForm.rm_synchChanInfo.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_synchChanInfo.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_synchChanInfo\" field.");
+ theForm.rm_synchChanInfo.focus();
+ return (false);
+ }
+
+ if (theForm.rm_SGainCtrlSetting_0_0.value == "")
+ {
+ alert("Please enter a value for the \"rm_SGainCtrlSetting_0_0\" field.");
+ theForm.rm_SGainCtrlSetting_0_0.focus();
+ return (false);
+ }
+
+ if (theForm.rm_SGainCtrlSetting_0_0.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_SGainCtrlSetting_0_0\" field.");
+ theForm.rm_SGainCtrlSetting_0_0.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_SGainCtrlSetting_0_0.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_SGainCtrlSetting_0_0\" field.");
+ theForm.rm_SGainCtrlSetting_0_0.focus();
+ return (false);
+ }
+
+ if (theForm.rm_SGainCtrlSetting_1_0.value == "")
+ {
+ alert("Please enter a value for the \"rm_SGainCtrlSetting_1_0\" field.");
+ theForm.rm_SGainCtrlSetting_1_0.focus();
+ return (false);
+ }
+
+ if (theForm.rm_SGainCtrlSetting_1_0.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_SGainCtrlSetting_1_0\" field.");
+ theForm.rm_SGainCtrlSetting_1_0.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_SGainCtrlSetting_1_0.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_SGainCtrlSetting_1_0\" field.");
+ theForm.rm_SGainCtrlSetting_1_0.focus();
+ return (false);
+ }
+
+ if (theForm.rm_SGainCtrlSetting_0_1.value == "")
+ {
+ alert("Please enter a value for the \"rm_SGainCtrlSetting_0_1\" field.");
+ theForm.rm_SGainCtrlSetting_0_1.focus();
+ return (false);
+ }
+
+ if (theForm.rm_SGainCtrlSetting_0_1.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_SGainCtrlSetting_0_1\" field.");
+ theForm.rm_SGainCtrlSetting_0_1.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_SGainCtrlSetting_0_1.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_SGainCtrlSetting_0_1\" field.");
+ theForm.rm_SGainCtrlSetting_0_1.focus();
+ return (false);
+ }
+
+ if (theForm.rm_SGainCtrlSetting_1_1.value == "")
+ {
+ alert("Please enter a value for the \"rm_SGainCtrlSetting_1_1\" field.");
+ theForm.rm_SGainCtrlSetting_1_1.focus();
+ return (false);
+ }
+
+ if (theForm.rm_SGainCtrlSetting_1_1.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_SGainCtrlSetting_1_1\" field.");
+ theForm.rm_SGainCtrlSetting_1_1.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_SGainCtrlSetting_1_1.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_SGainCtrlSetting_1_1\" field.");
+ theForm.rm_SGainCtrlSetting_1_1.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_0_0.value == "")
+ {
+ alert("Please enter a value for the \"rm_nim_0_0\" field.");
+ theForm.rm_nim_0_0.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_0_0.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_nim_0_0\" field.");
+ theForm.rm_nim_0_0.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_nim_0_0.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_nim_0_0\" field.");
+ theForm.rm_nim_0_0.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_1_0.value == "")
+ {
+ alert("Please enter a value for the \"rm_nim_1_0\" field.");
+ theForm.rm_nim_1_0.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_1_0.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_nim_1_0\" field.");
+ theForm.rm_nim_1_0.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_nim_1_0.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_nim_1_0\" field.");
+ theForm.rm_nim_1_0.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_0_1.value == "")
+ {
+ alert("Please enter a value for the \"rm_nim_0_1\" field.");
+ theForm.rm_nim_0_1.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_0_1.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_nim_0_1\" field.");
+ theForm.rm_nim_0_1.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_nim_0_1.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_nim_0_1\" field.");
+ theForm.rm_nim_0_1.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_1_1.value == "")
+ {
+ alert("Please enter a value for the \"rm_nim_1_1\" field.");
+ theForm.rm_nim_1_1.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_1_1.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_nim_1_1\" field.");
+ theForm.rm_nim_1_1.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_nim_1_1.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_nim_1_1\" field.");
+ theForm.rm_nim_1_1.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_0_2.value == "")
+ {
+ alert("Please enter a value for the \"rm_nim_0_2\" field.");
+ theForm.rm_nim_0_2.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_0_2.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_nim_0_2\" field.");
+ theForm.rm_nim_0_2.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_nim_0_2.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_nim_0_2\" field.");
+ theForm.rm_nim_0_2.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_1_2.value == "")
+ {
+ alert("Please enter a value for the \"rm_nim_1_2\" field.");
+ theForm.rm_nim_1_2.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_1_2.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_nim_1_2\" field.");
+ theForm.rm_nim_1_2.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_nim_1_2.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_nim_1_2\" field.");
+ theForm.rm_nim_1_2.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_0_3.value == "")
+ {
+ alert("Please enter a value for the \"rm_nim_0_3\" field.");
+ theForm.rm_nim_0_3.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_0_3.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_nim_0_3\" field.");
+ theForm.rm_nim_0_3.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_nim_0_3.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_nim_0_3\" field.");
+ theForm.rm_nim_0_3.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_1_3.value == "")
+ {
+ alert("Please enter a value for the \"rm_nim_1_3\" field.");
+ theForm.rm_nim_1_3.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_1_3.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_nim_1_3\" field.");
+ theForm.rm_nim_1_3.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_nim_1_3.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_nim_1_3\" field.");
+ theForm.rm_nim_1_3.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_0_4.value == "")
+ {
+ alert("Please enter a value for the \"rm_nim_0_4\" field.");
+ theForm.rm_nim_0_4.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_0_4.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_nim_0_4\" field.");
+ theForm.rm_nim_0_4.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_nim_0_4.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_nim_0_4\" field.");
+ theForm.rm_nim_0_4.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_1_4.value == "")
+ {
+ alert("Please enter a value for the \"rm_nim_1_4\" field.");
+ theForm.rm_nim_1_4.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_1_4.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_nim_1_4\" field.");
+ theForm.rm_nim_1_4.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_nim_1_4.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_nim_1_4\" field.");
+ theForm.rm_nim_1_4.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_0_5.value == "")
+ {
+ alert("Please enter a value for the \"rm_nim_0_5\" field.");
+ theForm.rm_nim_0_5.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_0_5.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_nim_0_5\" field.");
+ theForm.rm_nim_0_5.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_nim_0_5.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_nim_0_5\" field.");
+ theForm.rm_nim_0_5.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_1_5.value == "")
+ {
+ alert("Please enter a value for the \"rm_nim_1_5\" field.");
+ theForm.rm_nim_1_5.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_1_5.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_nim_1_5\" field.");
+ theForm.rm_nim_1_5.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_nim_1_5.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_nim_1_5\" field.");
+ theForm.rm_nim_1_5.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_0_6.value == "")
+ {
+ alert("Please enter a value for the \"rm_nim_0_6\" field.");
+ theForm.rm_nim_0_6.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_0_6.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_nim_0_6\" field.");
+ theForm.rm_nim_0_6.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_nim_0_6.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_nim_0_6\" field.");
+ theForm.rm_nim_0_6.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_1_6.value == "")
+ {
+ alert("Please enter a value for the \"rm_nim_1_6\" field.");
+ theForm.rm_nim_1_6.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_1_6.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_nim_1_6\" field.");
+ theForm.rm_nim_1_6.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_nim_1_6.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_nim_1_6\" field.");
+ theForm.rm_nim_1_6.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_0_7.value == "")
+ {
+ alert("Please enter a value for the \"rm_nim_0_7\" field.");
+ theForm.rm_nim_0_7.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_0_7.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_nim_0_7\" field.");
+ theForm.rm_nim_0_7.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_nim_0_7.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_nim_0_7\" field.");
+ theForm.rm_nim_0_7.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_1_7.value == "")
+ {
+ alert("Please enter a value for the \"rm_nim_1_7\" field.");
+ theForm.rm_nim_1_7.focus();
+ return (false);
+ }
+
+ if (theForm.rm_nim_1_7.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_nim_1_7\" field.");
+ theForm.rm_nim_1_7.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_nim_1_7.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_nim_1_7\" field.");
+ theForm.rm_nim_1_7.focus();
+ return (false);
+ }
+
+ if (theForm.rm_trxSynthSetting_0_0.value == "")
+ {
+ alert("Please enter a value for the \"rm_trxSynthSetting_0_0\" field.");
+ theForm.rm_trxSynthSetting_0_0.focus();
+ return (false);
+ }
+
+ if (theForm.rm_trxSynthSetting_0_0.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_trxSynthSetting_0_0\" field.");
+ theForm.rm_trxSynthSetting_0_0.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_trxSynthSetting_0_0.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_trxSynthSetting_0_0\" field.");
+ theForm.rm_trxSynthSetting_0_0.focus();
+ return (false);
+ }
+
+ if (theForm.rm_trxSynthSetting_1_0.value == "")
+ {
+ alert("Please enter a value for the \"rm_trxSynthSetting_1_0\" field.");
+ theForm.rm_trxSynthSetting_1_0.focus();
+ return (false);
+ }
+
+ if (theForm.rm_trxSynthSetting_1_0.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_trxSynthSetting_1_0\" field.");
+ theForm.rm_trxSynthSetting_1_0.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_trxSynthSetting_1_0.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_trxSynthSetting_1_0\" field.");
+ theForm.rm_trxSynthSetting_1_0.focus();
+ return (false);
+ }
+
+ if (theForm.rm_trxSynthSetting_0_1.value == "")
+ {
+ alert("Please enter a value for the \"rm_trxSynthSetting_0_1\" field.");
+ theForm.rm_trxSynthSetting_0_1.focus();
+ return (false);
+ }
+
+ if (theForm.rm_trxSynthSetting_0_1.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_trxSynthSetting_0_1\" field.");
+ theForm.rm_trxSynthSetting_0_1.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_trxSynthSetting_0_1.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_trxSynthSetting_0_1\" field.");
+ theForm.rm_trxSynthSetting_0_1.focus();
+ return (false);
+ }
+
+ if (theForm.rm_trxSynthSetting_1_1.value == "")
+ {
+ alert("Please enter a value for the \"rm_trxSynthSetting_1_1\" field.");
+ theForm.rm_trxSynthSetting_1_1.focus();
+ return (false);
+ }
+
+ if (theForm.rm_trxSynthSetting_1_1.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_trxSynthSetting_1_1\" field.");
+ theForm.rm_trxSynthSetting_1_1.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_trxSynthSetting_1_1.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_trxSynthSetting_1_1\" field.");
+ theForm.rm_trxSynthSetting_1_1.focus();
+ return (false);
+ }
+
+ if (theForm.rm_trxFpgaDelay_0_0.value == "")
+ {
+ alert("Please enter a value for the \"rm_trxFpgaDelay_0_0\" field.");
+ theForm.rm_trxFpgaDelay_0_0.focus();
+ return (false);
+ }
+
+ if (theForm.rm_trxFpgaDelay_0_0.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_trxFpgaDelay_0_0\" field.");
+ theForm.rm_trxFpgaDelay_0_0.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_trxFpgaDelay_0_0.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_trxFpgaDelay_0_0\" field.");
+ theForm.rm_trxFpgaDelay_0_0.focus();
+ return (false);
+ }
+
+ if (theForm.rm_trxFpgaDelay_1_0.value == "")
+ {
+ alert("Please enter a value for the \"rm_trxFpgaDelay_1_0\" field.");
+ theForm.rm_trxFpgaDelay_1_0.focus();
+ return (false);
+ }
+
+ if (theForm.rm_trxFpgaDelay_1_0.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_trxFpgaDelay_1_0\" field.");
+ theForm.rm_trxFpgaDelay_1_0.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_trxFpgaDelay_1_0.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_trxFpgaDelay_1_0\" field.");
+ theForm.rm_trxFpgaDelay_1_0.focus();
+ return (false);
+ }
+
+ if (theForm.rm_trxFpgaDelay_0_1.value == "")
+ {
+ alert("Please enter a value for the \"rm_trxFpgaDelay_0_1\" field.");
+ theForm.rm_trxFpgaDelay_0_1.focus();
+ return (false);
+ }
+
+ if (theForm.rm_trxFpgaDelay_0_1.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_trxFpgaDelay_0_1\" field.");
+ theForm.rm_trxFpgaDelay_0_1.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_trxFpgaDelay_0_1.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_trxFpgaDelay_0_1\" field.");
+ theForm.rm_trxFpgaDelay_0_1.focus();
+ return (false);
+ }
+
+ if (theForm.rm_trxFpgaDelay_1_1.value == "")
+ {
+ alert("Please enter a value for the \"rm_trxFpgaDelay_1_1\" field.");
+ theForm.rm_trxFpgaDelay_1_1.focus();
+ return (false);
+ }
+
+ if (theForm.rm_trxFpgaDelay_1_1.value.length > 6)
+ {
+ alert("Please enter at most 6 characters in the \"rm_trxFpgaDelay_1_1\" field.");
+ theForm.rm_trxFpgaDelay_1_1.focus();
+ return (false);
+ }
+
+ var checkOK = "0123456789-";
+ var checkStr = theForm.rm_trxFpgaDelay_1_1.value;
+ var allValid = true;
+ var decPoints = 0;
+ var allNum = "";
+ for (i = 0; i < checkStr.length; i++)
+ {
+ ch = checkStr.charAt(i);
+ for (j = 0; j < checkOK.length; j++)
+ if (ch == checkOK.charAt(j))
+ break;
+ if (j == checkOK.length)
+ {
+ allValid = false;
+ break;
+ }
+ allNum += ch;
+ }
+ if (!allValid)
+ {
+ alert("Please enter only digit characters in the \"rm_trxFpgaDelay_1_1\" field.");
+ theForm.rm_trxFpgaDelay_1_1.focus();
+ return (false);
+ }
+ return (true);
+}
+//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" cellpadding="0" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1">
+
+<h2 align="center">Radio Resource&nbsp; Config Parameters</h2>
+
+<div align="center">
+ <center>
+ <table border="1" width="60%" height="643">
+ <tr>
+ <td width="50%" rowspan="4" valign="top" height="612">
+ <table border="1" width="100%">
+ <tr>
+ <td width="100%" colspan="2" align="center"><b>Resource Config Data</b></td>
+ </tr>
+ <tr>
+ <td width="50%"><span style="mso-ansi-language: FR" lang="FR">T</span><span lang="FR" style="mso-ansi-language:FR">3L01</span></td>
+ <td width="50%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_t3L2" size="6" value="$%rm_t3L01#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="50%"><span lang="FR" style="mso-ansi-language:FR">bsCcChans</span></td>
+ <td width="50%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_bsCcChans" size="6" value="$%rm_bsCcChans#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="50%"><span lang="FR" style="mso-ansi-language:FR">bsCcchSdcchComb</span></td>
+ <td width="50%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_bsCcchSdcchComb" size="6" value="$%rm_bsCcchSdcchComb#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="50%"><span lang="FR" style="mso-ansi-language:FR">sysInfoOnOffMap</span></td>
+ <td width="50%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_sysInfoOnOffMap" size="6" value="$%rm_sysInfoOnOffMap#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="50%"><span lang="FR" style="mso-ansi-language:FR">airInterface</span></td>
+ <td width="50%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_airInterface" size="6" value="$%rm_airInterface#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="50%"><span lang="FR" style="mso-ansi-language:FR">viperCellTsc</span></td>
+ <td width="50%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_viperCellTsc" size="6" value="$%rm_viperCellTsc#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="50%"><span lang="FR" style="mso-ansi-language:FR">maxSlotPerTrx</span></td>
+ <td width="50%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_maxSlotPerTrx" size="6" value="$%rm_maxSlotPerTrx#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="50%"><span lang="FR" style="mso-ansi-language:FR">maxTrxs</span></td>
+ <td width="50%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_maxTrxs" size="6" value="$%rm_maxTrxs#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="50%">maxTchfs</td>
+ <td width="50%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_maxTchfs" size="6" value="$%rm_maxTchfs#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="50%">maxSdcch4s</td>
+ <td width="50%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_maxSdcch4s" size="6" value="$%rm_maxSdcch4s#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="50%">trxOnOffMap</td>
+ <td width="50%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_trxOnOffMap" size="6" value="$%rm_trxOnOffMap#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="50%">networkIfConfig</td>
+ <td width="50%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_networkIfConfig" size="6" value="$%rm_networkIfConfig#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="50%">bcchTrx</td>
+ <td width="50%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_bcchTrx" size="6" value="$%rm_bcchTrx#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="50%">preAlphaTrx</td>
+ <td width="50%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_preAlphaTrx" size="6" value="$%rm_preAlphaTrx#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="50%">ccchBcchComb</td>
+ <td width="50%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_ccchBcchComb" size="6" value="$%rm_ccchBcchComb#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="50%">ccchConf</td>
+ <td width="50%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_ccchConf" size="6" value="$%rm_ccchConf#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="50%">rm_synchChanInfo</td>
+ <td width="50%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_synchChanInfo" size="6" value="$%rm_synchChanInfo#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="100%" colspan="2">
+ <table border="1" cellspacing="1" width="100%">
+ <tr>
+ <td width="100%" colspan="3">
+ <p align="center"><b>Static Gain Control Setting</b></td>
+ </tr>
+ <tr>
+ <td width="18%">Link</td>
+ <td width="26%">TRX 0</td>
+ <td width="56%">TRX 1</td>
+ </tr>
+ <tr>
+ <td width="18%">UL</td>
+ <td width="26%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_SGainCtrlSetting_0_0" size="6" value="$%rm_SGainCtrlSetting_0_0#$" maxlength="6"></font></td>
+ <td width="56%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_SGainCtrlSetting_1_0" size="6" value="$%rm_SGainCtrlSetting_1_0#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="18%">DL</td>
+ <td width="26%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_SGainCtrlSetting_0_1" size="6" value="$%rm_SGainCtrlSetting_0_1#$" maxlength="6"></font></td>
+ <td width="56%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_SGainCtrlSetting_1_1" size="6" value="$%rm_SGainCtrlSetting_1_1#$" maxlength="6"></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td width="50%" valign="top" height="311">
+ <table border="1" width="100%">
+ <tr>
+ <td width="100%" colspan="3">
+ <p align="center"><b>Network Interface Mapping</b></td>
+ </tr>
+ <tr>
+ <td width="18%">Time Slot</td>
+ <td width="37%">TRX 0</td>
+ <td width="45%">TRX 1</td>
+ </tr>
+ <tr>
+ <td width="18%">1</td>
+ <td width="37%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_nim_0_0" size="6" value="$%rm_nim_0_0#$" maxlength="6"></font></td>
+ <td width="45%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_nim_1_0" size="6" value="$%rm_nim_1_0#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="18%">2</td>
+ <td width="37%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_nim_0_1" size="6" value="$%rm_nim_0_1#$" maxlength="6"></font></td>
+ <td width="45%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_nim_1_1" size="6" value="$%rm_nim_1_1#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="18%">3</td>
+ <td width="37%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_nim_0_2" size="6" value="$%rm_nim_0_2#$" maxlength="6"></font></td>
+ <td width="45%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_nim_1_2" size="6" value="$%rm_nim_1_2#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="18%">4</td>
+ <td width="37%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_nim_0_3" size="6" value="$%rm_nim_0_3#$" maxlength="6"></font></td>
+ <td width="45%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_nim_1_3" size="6" value="$%rm_nim_1_3#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="18%">5</td>
+ <td width="37%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_nim_0_4" size="6" value="$%rm_nim_0_4#$" maxlength="6"></font></td>
+ <td width="45%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_nim_1_4" size="6" value="$%rm_nim_1_4#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="18%">6</td>
+ <td width="37%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_nim_0_5" size="6" value="$%rm_nim_0_5#$" maxlength="6"></font></td>
+ <td width="45%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_nim_1_5" size="6" value="$%rm_nim_1_5#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="18%">7</td>
+ <td width="37%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_nim_0_6" size="6" value="$%rm_nim_0_6#$" maxlength="6"></font></td>
+ <td width="45%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_nim_1_6" size="6" value="$%rm_nim_1_6#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="18%">8</td>
+ <td width="37%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_nim_0_7" size="6" value="$%rm_nim_0_7#$" maxlength="6"></font></td>
+ <td width="45%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_nim_1_7" size="6" value="$%rm_nim_1_7#$" maxlength="6"></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td width="50%" valign="top" height="120">
+ <table border="1" cellspacing="1" width="100%">
+ <tr>
+ <td width="100%" colspan="3">
+ <p align="center"><b>&nbsp;TRX Synthesizer&nbsp; Tuning Setting</b></td>
+ </tr>
+ <tr>
+ <td width="18%">#</td>
+ <td width="28%">TRX1</td>
+ <td width="54%">TRX0</td>
+ </tr>
+ <tr>
+ <td width="18%">1</td>
+ <td width="28%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_trxSynthSetting_0_0" size="6" value="$%rm_trxSynthSetting_0_0#$" maxlength="6"></font></td>
+ <td width="54%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_trxSynthSetting_1_0" size="6" value="$%rm_trxSynthSetting_1_0#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="18%">2</td>
+ <td width="28%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_trxSynthSetting_0_1" size="6" value="$%rm_trxSynthSetting_0_1#$" maxlength="6"></font></td>
+ <td width="54%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_trxSynthSetting_1_1" size="6" value="$%rm_trxSynthSetting_1_1#$" maxlength="6"></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td width="50%" valign="top" height="118">
+ <table border="1" cellspacing="1" width="100%">
+ <tr>
+ <td width="100%" colspan="3">
+ <p align="center"><b>TRX FPGA Delay</b></td>
+ </tr>
+ <tr>
+ <td width="18%">Link</td>
+ <td width="38%">TRX 0</td>
+ <td width="44%">TRX 1</td>
+ </tr>
+ <tr>
+ <td width="18%">UL</td>
+ <td width="38%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_trxFpgaDelay_0_0" size="6" value="$%rm_trxFpgaDelay_0_0#$" maxlength="6"></font></td>
+ <td width="44%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_trxFpgaDelay_1_0" size="6" value="$%rm_trxFpgaDelay_1_0#$" maxlength="6"></font></td>
+ </tr>
+ <tr>
+ <td width="18%">DL</td>
+ <td width="38%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_trxFpgaDelay_0_1" size="6" value="$%rm_trxFpgaDelay_0_1#$" maxlength="6"></font></td>
+ <td width="44%"><font size="1"><!--webbot bot="Validation"
+ s-data-type="Integer" s-number-separators="x" b-value-required="TRUE"
+ i-maximum-length="6" --><input type="text" name="rm_trxFpgaDelay_1_1" size="6" value="$%rm_trxFpgaDelay_1_1#$" maxlength="6"></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td width="50%" valign="top" height="35"></td>
+ </tr>
+ </table>
+ </center>
+</div>
+
+<p align="center"><input name="B1" type="submit" value="Submit" onclick="parseButtons(window.document.forms[0])"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"></p>
+</form>
+
+</body>
+
diff --git a/data/mnet/GP10/Host/ViperWatch/reboot.htm b/data/mnet/GP10/Host/ViperWatch/reboot.htm
new file mode 100644
index 0000000..be32506
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/reboot.htm
@@ -0,0 +1,82 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GP10 Reboot Screen</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT >
+
+function PresetForm(theForm)
+{
+
+ return true;
+}
+
+
+function ParseForm(theForm)
+{
+ var status = false;
+ theForm.oamCommand.value = "64";
+ if (theForm.oamCommand.value != "0")
+ {
+ status = confirm("Are you sure you want to reboot the GP10?")
+ }
+ return status
+
+}
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="Reboot">
+
+ <input type="HIDDEN" name="oamCommand" value="$%oamCommand#$">
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="557">
+ <tr>
+ <td width="541">
+ <h2 align="center">Reboot GP10</h2>
+ </center>
+ <div align="center">
+ <table border="0" width="82%">
+ <tr>
+ <td width="100%">
+ <p align="left">This screen allows you to reboot $%viperCellName#$ (IP: $%viperCellIPAddress#$).&nbsp; </p>
+ <p align="left"><font color="#FF0000"><blink>WARNING: Rebooting a GP10 will bring the GP10 to its initial default state (based on MIB settings). All the existing calls through this GP10 will be terminated and Mobile Stations registered(location updated) to this GP10 will be deregistered. Since rebooting GP10 stops the HTTP server, please use refresh button to reconnect back to the GP10 after GP10 completes the reboot procedure (about 2 minutes). </blink></font></p>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <center>
+ <table border="0">
+ <tr>
+ <td width="362" nowrap>
+
+ </select>
+ </tr>
+ </table>
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Reboot" title="Click this button to reboot the GP10."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </div>
+ </center>
+ </td>
+ </tr>
+ </table>
+ </div>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/rf1_package.htm b/data/mnet/GP10/Host/ViperWatch/rf1_package.htm
new file mode 100644
index 0000000..beae746
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/rf1_package.htm
@@ -0,0 +1,151 @@
+<html>
+
+<head>
+<meta name="VI60_defaultClientScript" content="JavaScript">
+<title>First Radio Carrier Configuration</title>
+<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+<meta content="Microsoft FrontPage 4.0" name="GENERATOR">
+<meta content="FrontPage.Editor.Document" name="ProgId">
+<base target="_self">
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/common.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/state.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+
+
+
+<SCRIPT language="JavaScript">
+function PresetForm(theForm)
+{
+ // selectOption(theForm.carrier_administrativeState_0Select, theForm.carrier_administrativeState_0);
+ return true;
+}
+
+
+function ParseForm(theForm)
+{
+ // parseSelect(theForm.carrier_administrativeState_0Select, theForm.carrier_administrativeState_0);
+ return true;
+}
+
+function copyValue(src, dst)
+{
+ src.value = dst.value
+ return true;
+}
+
+</SCRIPT>
+
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form name="rf1_package" method="post" onsubmit="return ParseForm(this);">
+
+ <input type="hidden" name="cellAllocation.0" value="$%cellAllocation.0#$">
+
+ <!-- Fixed value -->
+ <input type="hidden" name="radioCarrierID_0" value="0">
+ <!---- Not used now
+ <input name="carrier_administrativeState_0" type="hidden" value="$%carrier_administrativeState_0#$">
+ ------------------->
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="453">
+ <tr>
+ <td width="437">
+ <h2 align="center">First Radio Carrier Configuration</h2>
+ <div align="center">
+ <table border="1" width="392">
+ <!------------ Not used now
+ <tr>
+ <td height="23" align="left">Operational State:</td>
+ <td height="23" align="left">
+ <script> displayState("$%carrier_operationalState_0#$") </script>
+ </td>
+ </tr>
+ <tr>
+ <td height="23" align="left">Administrative State:</td>
+ <td height="23" align="left"><select name="carrier_administrativeState_0Select" size="1" onchange="lockWarning(this, 1)">
+ <option value="0">Locked</option>
+ <option value="1" selected>Unlocked</option>
+ <option value="2">Shuttingd Down</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td height="21" align="left"> Alarm Status:</td>
+ <td height="21" align="left">
+ <script> displayAlarmStatus("$%carrier_alarmStatus_0#$") </script>
+ </td>
+ </tr>
+ --------------------------->
+ <tr>
+ <td width="202">Power Class</td>
+ <td width="176">
+ <script> displayPowerClass("$%powerClass_0#$") </script>
+
+ <!-------------
+ <select name="powerClass_0Select" size="1">
+ <option value="1">Power Class M1 (0.2W - GSM 900)</option>
+ <option selected value="2">Power Class M3 (0.1W - DCS 1800)</option>
+ <option value="3">Power Class M2 (0.2W - PCS 1900)</option>
+ </select>
+ ------------------>
+ </td>
+
+ </tr>
+ <tr>
+ <td title="The number of 2 dB steps the TX should be reduced from the maximum transmit power, for tuning the cell coverage." width="202">Max.
+ Transmit Power Reduction<br>
+ <font size="1">(in 2dB steps)</font></td>
+ <td title="Integer(0..6)" width="176"><input name="txPwrMaxReduction_0" size="1" maxlength="1" value="$%txPwrMaxReduction_0#$"
+ onchange="return isValidInt(this,0,6);"> &nbsp;</td>
+ </tr>
+ <tr>
+ <td title="Constant radio frequency assigned to the radioCarrier object." width="202">Radio Frequency</td>
+ <td title="Integer(0..1023)" width="176"><input type="text" name="carrierFrequency_0.0" value="$%carrierFrequency_0#$" size="4" maxlength="4"
+ onchange="return isValidInt(this,0,1023) && copyValue(this.form.elements[0], this)"></td>
+ </tr>
+ </table>
+ </div>
+ </center>
+ <div align="center">
+ <center>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table border="0">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </form>
+
+ </table>
+
+</body>
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/ViperWatch/rf2_package.htm b/data/mnet/GP10/Host/ViperWatch/rf2_package.htm
new file mode 100644
index 0000000..5f3bf0e
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/rf2_package.htm
@@ -0,0 +1,139 @@
+<html>
+
+<head>
+<meta name="VI60_defaultClientScript" content="JavaScript">
+<title>Second Radio Carrier Configuration</title>
+<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+<meta content="Microsoft FrontPage 4.0" name="GENERATOR">
+<meta content="FrontPage.Editor.Document" name="ProgId">
+<base target="_self">
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/common.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/state.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+
+
+
+<SCRIPT language="JavaScript">
+function PresetForm(theForm)
+{
+ // selectOption(theForm.carrier_administrativeState_1Select, theForm.carrier_administrativeState_1);
+ return true;
+}
+
+
+function ParseForm(theForm)
+{
+ // parseSelect(theForm.carrier_administrativeState_1Select, theForm.carrier_administrativeState_1);
+ return true;
+}
+
+function copyValue(src, dst)
+{
+ src.value = dst.value
+ return true;
+}
+
+</SCRIPT>
+
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form name="rf2_package" method="post" onsubmit="return ParseForm(this);">
+
+
+ <input type="hidden" name="cellAllocation.1" value="$%cellAllocation.1#$">
+ <!-- Fixed value -->
+ <input type="hidden" name="radioCarrierID_1" value="1">
+ <!---- Not used now
+ <input name="carrier_administrativeState_1" type="hidden" value="$%carrier_administrativeState_1#$">
+ ------------------->
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="463">
+ <tr>
+ <td width="447">
+ <h2 align="center">Second Radio Carrier Configuration</h2>
+ <div align="center">
+ <table border="1" width="413">
+ <!------------ Not used now
+ <tr>
+ <td height="23" align="left">Operational State:</td>
+ <td height="23" align="left">
+ <script> displayState("$%carrier_operationalState_1#$") </script>
+ </td>
+ </tr>
+ <tr>
+ <td height="23" align="left">Administrative State:</td>
+ <td height="23" align="left"><select name="carrier_administrativeState_1Select" size="1" onchange="lockWarning(this, 1)">
+ <option value="0">Locked</option>
+ <option value="1" selected>Unlocked</option>
+ <option value="2">Shuttingd Down</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td height="21" align="left"> Alarm Status:</td>
+ <td height="21" align="left">
+ <script> displayAlarmStatus("$%carrier_alarmStatus_1#$") </script>
+ </td>
+ </tr>
+ --------------------------->
+ <tr>
+ <td width="206">Power Class</td>
+ <td width="193"> <script> displayPowerClass("$%powerClass_1#$") </script>
+
+ <!-------------
+ <select name="powerClass_1Select" size="1">
+ <option value="1">Power Class M1 (0.2W - GSM 900)</option>
+ <option selected value="2">Power Class M3 (0.1W - DCS 1800)</option>
+ <option value="3">Power Class M2 (0.2W - PCS 1900)</option>
+ </select>
+ ------------------>
+ </td>
+ </tr>
+ <tr>
+ <td title="The number of 2 dB steps the TX should be reduced from the maximum transmit power, for tuning the cell coverage." width="206">Max.
+ Transmit Power Reduction<br>
+ <font size="1">(in 2dB steps)</font></td>
+ <td title="Integer(0..6)" width="193"><input name="txPwrMaxReduction_1" size="1" maxlength="1" value="$%txPwrMaxReduction_1#$"
+ onchange="return isValidInt(this,0,6);"> &nbsp;</td>
+ </tr>
+ <tr>
+ <td title="Constant radio frequency assigned to the radioCarrier object." width="206">Radio Frequency</td>
+ <td title="Integer(0..1023)" width="193"><input type="text" name="carrierFrequency_1.0" value="$%carrierFrequency_1#$" size="4" maxlength="4"
+ onchange="return isValidInt(this,0,1023) && copyValue(this.form.elements[0], this);"></td>
+ </tr>
+ </table>
+ </div>
+ </center>
+ <div align="center">
+ <center>
+ <table border="0">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </form>
+
+ </table>
+
+</body>
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/ViperWatch/ssl_conf.htm b/data/mnet/GP10/Host/ViperWatch/ssl_conf.htm
new file mode 100644
index 0000000..36bad00
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/ssl_conf.htm
@@ -0,0 +1,132 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta http-equiv="Content-Language" content="en-us">
+<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>CDR Configuration</title>
+</head>
+<script language="JavaScript"
+src="js/form.js"></script>
+<script>
+
+function PresetForm(theForm)
+{
+ clickCheckBox(theForm.ClientSslEnable, theForm.cdrClientSSLEnable); // MIB var cdrClientSSLEnable
+
+ if (theForm.ClientSslEnable.checked)
+ {
+ theForm.SslPassword.disabled = false;
+ }
+ else
+ {
+ theForm.SslPassword.disabled = true;
+ }
+
+ return true;
+}
+
+function ParseForm(theForm)
+{
+ parseCheckBox(theForm.ClientSslEnable, theForm.cdrClientSSLEnable);
+ return true;
+}
+
+
+function ClientSslEnableClickHandler(theElem)
+{
+ var bSslPassDisabled = theElem.form.SslPassword.disabled;
+
+ if (theElem.checked) // enable Client SSL password
+ {
+ theElem.form.SslPassword.disabled = false;
+ }
+ else // disable Client SSL password
+ {
+ theElem.form.SslPassword.disabled = true;
+ }
+}
+
+
+
+function writeSslGroup()
+{
+ var EncryptEnabled = document.forms[0].SslCapability.value;
+
+ if (EncryptEnabled == 1)
+ {
+ CheckBoxOrHidden = "checkbox";
+ PasswordOrHidden = "password";
+ }
+ else
+ {
+ CheckBoxOrHidden = "hidden";
+ PasswordOrHidden = "hidden";
+ }
+
+ document.write("<tr>");
+ document.write("<td align='RIGHT' width='169'>");
+ document.write("<input type='" + CheckBoxOrHidden + "' name='ClientSslEnable' OnClick='ClientSslEnableClickHandler(this);' value='ON'>");
+ document.write("</td>");
+ if (EncryptEnabled == 1)
+ document.write("<td width='319'>Enable SSL connection between GP10 and GMC");
+ document.write("</td>");
+ document.write("</tr>");
+
+ document.write("<tr>");
+ if (EncryptEnabled == 1)
+ document.write("<td align='RIGHT' width='169'><b>SSL Password</b>");
+ document.write("</td>");
+ document.write("<td width='319'><input type='" + PasswordOrHidden + "' name='SslPassword' MAXLENGTH='60' size='20' value='$%SslPassword#$' onFocus=\"if (this.disabled) {alert(\'SSL is not enabled\'); blur(); }\"> ");
+ document.write("</td>");
+ document.write("</tr>");
+
+ if (EncryptEnabled != 1)
+ {
+ document.write("<tr>");
+ document.write("<td colspan='2' align='center'><h3>This system does not have SSL capability.</h3>");
+ document.write("</tr>");
+ }
+ return;
+}
+
+</script>
+
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" onsubmit="return ParseForm(this)">
+ <input type="hidden" name="cdrClientSSLEnable" value="$%cdrClientSSLEnable#$">
+ <input type="hidden" name="SslCapability" value="$%SslCapability#$">
+
+ <table bgcolor="#D6D3CE" align="CENTER" border="4" width="549">
+ <tr>
+ <td width="533"><div align="center"><center><h2>CDR Configuration </h2></center></div>
+
+ <table align="CENTER" width="496">
+ <script> writeSslGroup()</script>
+ </table>
+
+ <table border="0" width="387">
+ <tr>
+ <td width="379" align="CENTER"><blink><font color="#0000FF" size="1" face="Times New Roman">
+ Changes made on this page will only be effective after the reboot of GMC.</font></blink>
+ </td>
+ </tr>
+ </table>
+
+ <table align="CENTER">
+ <tr>
+ <td><input type="submit" value=" Submit " title="Click this button to commit the change.">
+ </td>
+ <td><input type="button" value=" Recall " onclick="window.location.reload()" title="Click this button to refresh the form.">
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+</form>
+</body>
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/status_page.htm b/data/mnet/GP10/Host/ViperWatch/status_page.htm
new file mode 100644
index 0000000..0c5c55f
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/status_page.htm
@@ -0,0 +1,51 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GP10 OAM Operation Status Page</title>
+</head>
+
+<script Language="JavaScript">
+function displayStatus(theStatus)
+{
+ document.write( "<B>");
+ switch (theStatus)
+ {
+ case "1":
+ document.write( "IN PROGESS");
+ break;
+ case "2":
+ document.write( "SUCCESSFUL");
+ break;
+ case "3":
+ document.write( "FAILED");
+ document.write( "<p> <a href=/last_error.htm title='Click here to see the error message'> Reason of failure </a></p>")
+ break;
+ default:
+ window.alert("Unknown");
+ break;
+ }
+ document.write( "</B>");
+
+}
+
+</script>
+
+<body onload="$%reloadTopframe#$">
+<h2 align="left">OA&amp;M Operation Status
+</h2>
+
+&nbsp;
+ <p>The OA&amp;M operation you just&nbsp; initiated:
+
+ <script Language="JavaScript">
+ displayStatus("$%oamCommandExecutionStatus#$");
+ </script>
+
+ <p>Please click<a href="javascript:history.go(-1)" title="Click to go back to the previous page. This operation will not reload the page">
+ here</a> to go back to the previous page.</p>
+ <p>&nbsp;</p>
+</body>
+
diff --git a/data/mnet/GP10/Host/ViperWatch/succ_immi_assi.htm b/data/mnet/GP10/Host/ViperWatch/succ_immi_assi.htm
new file mode 100644
index 0000000..16161fb
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/succ_immi_assi.htm
@@ -0,0 +1,86 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Successful Immediate Assignment Procedures, per cause</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/perCause.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/common.js"></SCRIPT>
+
+
+
+<body onload="$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" name="apaClockSourceFrequencyTable">
+
+ <div align="center">
+ <table border="4" bgcolor="#D6D3CE" width="498">
+ <tr>
+ <td width="1028">
+ <h3 align="center">&nbsp;Successful Immediate Assignment<br>
+ &nbsp;Procedures, per cause</h3>
+ <div align="center">
+ <center>
+ <table border="0">
+ <tr>
+ <td align="left">
+ <p align="left"><b> Start Time:</b></td>
+ <td>
+ <i>
+ <script> displayTime("$%meanPCHAGCHQueueLength#$") </script>
+ </i>
+ </td>
+ </tr>
+ <tr>
+ <td align="left"><b>Duration:</b></td>
+ <td><i>Last Completed 15-Minute Measurement Interval</i></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table border="1" width="449" height="49">
+ <tr>
+ <th height="18" align="left" width="80%"><font face="&#12;charset0Courier" size="3">Channel
+ Assignment Cause</font></th>
+ <th height="18" align="center" width="20%"><font face="&#12;charset0Courier" size="2">Successful
+ Count</font></th>
+ </tr>
+ <! $%createTable(succImmediateAssingProcsCause,*,,,,,succImmediateAssingProcsCause,succImmediateAssingProcsValue)#$ >
+ <! $%REPEAT(succImmediateAssingProcsCause,1,8)#$ >
+ <tr>
+ <td align="left" width="80%" height="19"> <script> displayCause("$%succImmediateAssingProcsCause#$") </script> </td>
+ <td align="center" width="20%" height="19">$%succImmediateAssingProcsValue#$</td>
+ </tr>
+
+ <! $%endRow(succImmediateAssingProcsCause)#$ >
+ <! $%REPEAT(END)#$ >
+ <! $%endTable(succImmediateAssingProcsCause)#$>
+
+ </table>
+ </center>
+ </div>
+ <center>
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"><input name="Recall1" type="button" value="Recall" onclick="window.location.reload()"></td>
+ </tr>
+ </table>
+ </div>
+ </center>
+ </td>
+ </tr>
+ </table>
+ </div>
+</form>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/test.htm b/data/mnet/GP10/Host/ViperWatch/test.htm
new file mode 100644
index 0000000..71fbd43
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/test.htm
@@ -0,0 +1,97 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Cisco GP10 Internal Test Page</title>
+<base target="_parent">
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+
+<SCRIPT Language="JavaScript">
+
+function parseSelect(theSelect, valueHolder)
+{
+ for (var i = 0; i < theSelect.length; i++)
+ {
+ if (theSelect.options[i].selected)
+ {
+ valueHolder.value = theSelect.options[i].value;
+ break;
+ }
+ }
+}
+
+function PresetButtons(theForm)
+{
+ selectOption(theForm.gsmdcsIndicatorSelect, theForm.gsmdcsIndicator);
+ clickCheckBox(theForm.rm_nim_0_0Check, theForm.rm_nim_0_0);
+}
+
+function ParseForm(theForm)
+{
+ parseSelect(theForm.gsmdcsIndicatorSelect, theForm.gsmdcsIndicator);
+ theForm.powerClass_0.value = Number(theForm.gsmdcsIndicator.value)+1;
+ theForm.powerClass_1.value = Number(theForm.gsmdcsIndicator.value)+1;
+ parseCheckBox(theForm.rm_nim_0_0Check, theForm.rm_nim_0_0);
+}
+
+</SCRIPT>
+
+<body onload="PresetButtons(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this);" name="rm_config_data">
+
+ <input name="rm_nim_0_0" type="hidden" value="$%rm_nim_0_0#$">
+ <input name="gsmdcsIndicator" type="hidden" value="$%gsmdcsIndicator#$">
+ <input name="powerClass_0" type="hidden" >
+ <input name="powerClass_1" type="hidden" >
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="384">
+ <tr>
+ <td width="446">
+ <h2 align="center">Cisco GP10 Internal Test Screen</h2>
+ <div align="center">
+ <table border="0" width="368">
+ <tr>
+ <td height="23" width="236"><font color="#000000">Swap TRX Required</font></td>
+ <td height="23" width="118">
+ <p style="padding-top: 0px; padding-bottom: 0px"><input type="checkbox" name="rm_nim_0_0Check" value="ON"></td>
+ </tr>
+ <tr>
+ <td height="29" width="261"
+ title="Indicates the type (GSM, PCS, DCS 1800) of the cell. The value may be used to interpret or check other attribute values.">Radio
+ Indicator:</td>
+ <td height="29" width="246"><select name="gsmdcsIndicatorSelect" size="1">
+ <option value="0">GSM 900</option>
+ <option value="1">DCS 1800</option>
+ <option value="2" selected>PCS 1900</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td height="21" width="236"></td>
+ <td height="21" width="118"></td>
+ </tr>
+ </table>
+ </div>
+ <div align="center">
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"><input name="B2" type="submit" value="Submit"></td>
+ <td align="center"><input name="Recall1" type="button" value="Recall" onclick="window.location.reload()"></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/top_frame.htm b/data/mnet/GP10/Host/ViperWatch/top_frame.htm
new file mode 100644
index 0000000..5ad7bf1
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/top_frame.htm
@@ -0,0 +1,112 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GSM Port(GP) Manager Title Page</title>
+
+<script language="JavaScript">
+
+function logoutCfm()
+{
+ var status = false;
+ var msg="The best way to logout is to quit a browser.\n\nIf you want to logout without having to quit a browser.\nUser name : bye\nPassword : blank or any password\nin the next authentication windows.";
+ status = confirm(msg)
+ return status
+}
+
+function displayOpState(theState)
+{
+ var textState = "";
+ var Color = "";
+ var help = ""
+
+ switch(theState)
+ {
+ case "0":
+ // Disabled
+ textState = "Disabled";
+ Color += "Red";
+ help = "The operation state is disabled. Check if there is an outstanding alarm."
+ break;
+ case "1":
+ // Enabled
+ textState = "Enabled";
+ Color += "Green";
+ help = "The operation state is enabled."
+ break;
+ default:
+ textState = "Invalid";
+ Color += "Yellow";
+ help = "Invalid value of operational state!!!"
+ break;
+ }
+ document.write("<td height=\"10\" width=\"16%\" valign=\"top\" align=\"center\" title=\"" + help + "\" > <font size=1> Op. State: <font Color=\"" + Color + "\" >" + textState + "</font> </font> </td>");
+}
+
+function displayAdminState(theState)
+{
+ var textState = "";
+ var Color = "";
+ var help = ""
+
+ switch(theState)
+ {
+ case "0":
+ // Disabled
+ textState = "Locked";
+ Color = "Red";
+ help = "The Admin. state is locked by the operator."
+ break;
+ case "1":
+ // Enabled
+ textState = "Unlocked";
+ Color = "Green";
+ help = "The Admin. state is unlocked."
+ break;
+ case "2":
+ // Shuttig Down
+ textState = "Shutting down";
+ Color = "Pink";
+ help = "The GP10 is being shutdown"
+ break;
+ default:
+ textState = "Invalid";
+ Color = "Yellow";
+ help = "Invalid value of Admin. state"
+ break;
+ }
+ document.write("<td height=\"10\" width\"16%\" valign=\"top\" align=\"center\" title=\"" + help + "\" > <font size=1> Admin. State: <font Color=\"" + Color + "\" >" + textState + "</font> </font></td>");
+
+}
+</script>
+
+<base target="main">
+
+</head>
+
+<body topmargin="0" leftmargin="0" onload="setInterval('window.location.reload()', 300000);">
+
+<table border="0" cellspacing="0" cellpadding="0" width="98%" height="1">
+ <tr>
+ <td width="90%" height="10" align="center" colspan="6" valign="middle"> <h3>Cisco GSM Port
+ Manager</h3></td>
+ <td width="10%" height="20" align="right" rowspan="2" valign="middle"><img border="0" src="Images/ciscologo.jpg" width="68" height="50" alt="Cisco Logo"></td>
+ </tr>
+ <tr>
+ <td height="10" width="16%" valign="top" align="center"><font size="1">User: $%UserName#$</font></td>
+ <td height="10" width="16%" valign="top" align="center"><font size="1">Name: $%viperCellName#$</font></td>
+ <td height="10" width="16%" valign="top" align="center"><font size="1">IP Address:$%viperCellIPAddress#$</font></td>
+ <script language="JavaScript"> displayOpState("$%bts_operationalState#$") </script>
+ <script language="JavaScript"> displayAdminState("$%bts_administrativeState#$") </script>
+ <td height="10" width="10%" valign="top" align="center"><a target=main onClick="return logoutCfm()" href="logout.htm" ><font size="1">Logout</font></a></td>
+ </tr>
+
+ </table>
+<p>&nbsp;</p>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/trx1_package.htm b/data/mnet/GP10/Host/ViperWatch/trx1_package.htm
new file mode 100644
index 0000000..46f5307
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/trx1_package.htm
@@ -0,0 +1,288 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<base target="_self">
+</head>
+
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/common.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/state.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+function PresetForm(theForm)
+{
+ selectOption(theForm.basebandAdministrativeState_0Select, theForm.basebandAdministrativeState_0);
+ var j = "1" // skip the first one
+ for (var i = "0"; i < theForm.channelCombination_0Select.length; i++)
+ {
+ j++ // Channel ID is not used
+ selectOption(theForm.channelCombination_0Select[i], theForm.elements[j++]);
+ selectOption(theForm.channelTsc_0Select[i], theForm.elements[j++]);
+ selectOption(theForm.channelAdministrativeState_0Select[i], theForm.elements[j++]);
+ j = j+3 // Operational State is not used
+
+ }
+
+ if (theForm.btsState.value == "0")
+ {
+ disableAllAdminState(theForm);
+ } else if (theForm.basebandAdministrativeState_0Select.selectedIndex == "0") {
+ disableAllTimeSlotAdminState(theForm);
+ }
+ return true;
+}
+
+
+function ParseForm(theForm)
+{
+ parseSelect(theForm.basebandAdministrativeState_0Select, theForm.basebandAdministrativeState_0);
+ var j = "1"
+ for (var i = 0; i < theForm.channelCombination_0Select.length; i++)
+ {
+
+ j++ // Channel ID is not used
+ parseSelect(theForm.channelCombination_0Select[i], theForm.elements[j++]);
+ parseSelect(theForm.channelTsc_0Select[i], theForm.elements[j++]);
+ parseSelect(theForm.channelAdministrativeState_0Select[i], theForm.elements[j++]);
+ j = j+3 // Operational State is not used
+ }
+ return true;
+}
+
+function disableAllAdminState(theForm)
+{
+ theForm.basebandAdministrativeState_0Select.disabled = true;
+ disableAllTimeSlotAdminState(theForm);
+
+}
+
+function disableAllTimeSlotAdminState(theForm)
+{
+ for (var i = 0; i < theForm.channelAdministrativeState_0Select.length; i++)
+ {
+ theForm.channelAdministrativeState_0Select[i].disabled = true;
+ }
+}
+
+function ChangeAll(theSelect, valueHolder, changeUnit, effectiveUnit, parentUnit, parentUnitName)
+{
+
+ var status = ConfirmAdminState(theSelect, valueHolder, changeUnit, effectiveUnit, parentUnit, parentUnitName);
+
+ if (status)
+ {
+ theSelect.form.basebandAdministrativeState_0Select.options[theSelect.selectedIndex].selected = true;
+ for (var i = 0; i < theSelect.form.channelAdministrativeState_0Select.length; i++)
+ {
+ theSelect.form.channelAdministrativeState_0Select[i].options[theSelect.selectedIndex].selected = true;
+ if( theSelect.selectedIndex == "1")
+ {
+ theSelect.form.channelAdministrativeState_0Select[i].disabled = false;
+ } else {
+ theSelect.form.channelAdministrativeState_0Select[i].disabled = true;
+ }
+ }
+ } else {
+ theSelect.form.reset()
+ }
+
+ return true;
+}
+
+
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form name="trx1_package" method="post" onsubmit="return ParseForm(this);">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="569">
+ <tr>
+ <td width="553">
+ <h2 align="center">First Transceiver Configuration</h2>
+ </center>
+ <center>
+ <table border="1">
+ <tr>
+ <td><b>Current State:</b><center>
+ <table border="0">
+ <tr>
+ <td height="23" align="left">Administrative State:</td>
+ <td height="23" align="left"><select name="basebandAdministrativeState_0Select" size="1"
+ onchange="ChangeAll(this, this.form.basebandAdministrativeState_0, 'first TRX', 'GP10', this.form.btsState.value, 'GP10 at BTS Basic Package');">
+ <option value="0">Locked</option>
+ <option value="1" selected>Unlocked</option>
+ <option value="2">Shutting Down</option>
+ </select></td>
+ </tr>
+ <!---- Do not display alarm now
+ <tr>
+ <td height="21" align="left"> Alarm Status:</td>
+ <td height="21" align="left">
+ <script> displayAlarmStatus("$%basebandAlarmStatus_0#$") </script>
+
+ </td>
+ </tr>
+ ---->
+
+ <tr>
+ <td height="23" align="left">Operational State:</td>
+ <td height="23" align="left">
+ <script language="JavaScript"> displayState("$%basebandOperationalState_0#$") </script>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </td>
+ </tr>
+ </table>
+ </center>
+ <table border="1" width="100%">
+ <tr>
+ <th width="46" align="center" height="38"><strong>Time<br>
+ Slot</strong></th>
+ <th width="150" align="center" height="38"><strong>Channel<br>
+ Combination</strong></th>
+ <th width="95" align="center" height="38"><strong>Training Sequence</strong></th>
+ <th width="132" height="38">&nbsp;<strong>Administration<br>
+ State</strong></th>
+ <th width="97" height="38"><strong>Operational<br>
+ State</strong></th>
+ </tr>
+ <!$%createTable(channelIndex_0,*,,,,,channelIndex_0,channelID_0,channelCombination_0,channelFrequencyUsage_0,channelTsc_0,channelAdministrativeState_0,channelOperationalState_0)#$>
+ <input type="hidden" name="channelID_0.$%getInstance(channelIndex_0)#$" value="$%getInstance(channelIndex_0)#$">
+ <input type="hidden" name="channelCombination_0.$%getInstance(channelIndex_0)#$" value="$%channelCombination_0#$">
+ <input type="hidden" name="channelTsc_0.$%getInstance(channelIndex_0)#$" value="$%channelTsc_0#$">
+ <input type="hidden" name="channelAdministrativeState_0.$%getInstance(channelIndex_0)#$" value="$%channelAdministrativeState_0#$">
+ <tr>
+ <td width="46" height="38">
+ <p align="center">$%getInstance(channelIndex_0)#$</td>
+ <td width="150" height="38"><select name="channelCombination_0Select" size="1">
+ <!----------------------------
+ <option value="1">TCH Full</option>
+ <option value="2">TCH Half</option>
+ <option value="3">TCH Half 2</option>
+ <option value="4">Main BCCH</option>
+ ---------------------------->
+ <option value="5">BCCH Combined</option>
+ <!----
+ <option value="6">CCCH</option>
+ <option value="7">BCCH with CBCH</option>
+ <option value="8">SDCCH with CBCH</option>
+ ----->
+ </select></td>
+ <td width="95" height="38"><select name="channelTsc_0Select" size="1">
+ <option selected value="0">Use BCC</option>
+ <!----------------------------------------
+ <option value="1">TSC 1</option>
+ <option value="2">TSC 2</option>
+ <option value="3">TSC 3</option>
+ <option value="4">TSC 4</option>
+ <option value="5">TSC 5</option>
+ <option value="6">TSC 6</option>
+ <option value="7">TSC 7</option>
+ <option value="8">TSC 8</option>
+---------------------->
+ </select></td>
+ <td width="132" height="38"><select name="channelAdministrativeState_0Select" size="1"
+ onchange="ChangeAll(this, this.form.elements[$%getInstance(channelIndex_0)#$*7+4], 'time slot zero of the first TRX', 'GP10', this.form.basebandAdministrativeState_0Select.selectedIndex, 'first TRX');">
+ <option value="0">Locked</option>
+ <option value="1" selected>Unlocked</option>
+ <option value="2">Shutting Down</option>
+ </select></td>
+ <td width="97" height="38">
+ <script language="JavaScript"> displayState("$%channelOperationalState_0#$") </script>
+ </td>
+ </tr>
+ <!$%endRow(channelIndex_0)#$>
+ <!$%REPEAT(channelIndex_0,2,8)#$>
+ <input type="hidden" name="channelID_0.$%getInstance(channelIndex_0)#$" value="$%getInstance(channelIndex_0)#$"><input type="hidden"
+ name="channelCombination_0.$%getInstance(channelIndex_0)#$" value="$%channelCombination_0#$"><input type="hidden" name="channelTsc_0.$%getInstance(channelIndex_0)#$"
+ value="$%channelTsc_0#$"><input type="hidden" name="channelAdministrativeState_0.$%getInstance(channelIndex_0)#$" value="$%channelAdministrativeState_0#$">
+ <tr>
+ <td width="46" height="38">
+ <p align="center">$%getInstance(channelIndex_0)#$</p>
+ </td>
+ <td width="150" height="38"><select name="channelCombination_0Select" size="1">
+ <option value="1">TCH Full&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</option>
+ <option value="13">PDTCH</option>
+ <!----
+ <option value="2">TCH Half</option>
+ <option value="3">TCH Half 2</option>
+ <option value="4">Main BCCH</option>
+ <option value="5">BCCH Combined</option>
+ <option value="6">CCCH</option>
+ <option value="7">BCCH with CBCH</option>
+ <option value="8">SDCCH with CBCH</option>
+ ----->
+ </select></td>
+ <td width="95" height="38"><select name="channelTsc_0Select" size="1">
+ <option selected value="0">Use BCC</option>
+ <!----------------------------------------
+ <option value="1">TSC 1</option>
+ <option value="2">TSC 2</option>
+ <option value="3">TSC 3</option>
+ <option value="4">TSC 4</option>
+ <option value="5">TSC 5</option>
+ <option value="6">TSC 6</option>
+ <option value="7">TSC 7</option>
+ <option value="8">TSC 8</option>
+---------------------->
+ </select></td>
+ <td width="132" height="38"><select name="channelAdministrativeState_0Select" size="1"
+ onchange="ConfirmAdminState(this, this.form.elements[$%getInstance(channelIndex_0)#$*7+4], 'this time slot', 'time slot', this.form.basebandAdministrativeState_0Select.selectedIndex, 'first TRX');">
+ <option value="0">Locked</option>
+ <option value="1" selected>Unlocked</option>
+ <option value="2">Shutting Down</option>
+ </select></td>
+ <td width="97" height="38">
+ <script language="JavaScript"> displayState("$%channelOperationalState_0#$") </script>
+ </td>
+ </tr>
+ <!$%endRow(channelIndex_0)#$>
+
+ <!$%REPEAT(END)#$>
+ <!$%endTable(channelIndex_0)#$>
+
+ <input type="hidden" name="basebandAdministrativeState_0" value="$%basebandAdministrativeState_0#$">
+ <!-----------------------------
+ Not used at present
+<input type="hidden" name="basebandAlarmStatus_0" value="$%basebandAlarmStatus_0#$">
+<input type="hidden" name="basebandOperationalState_0" value="$%basebandOperationalState_0#$">
+
+---------------->
+
+ <!-- Fixed value -->
+ <input type="hidden" name="basebandTransceiverID_0" value="0">
+ <input type="hidden" name="relatedRadioCarrier_0" value="0">
+ <input type="hidden" name="btsState" value="$%bts_administrativeState#$">
+ </table>
+ <center>
+ <table border="0">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()" title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+
+ </form>
+
+ </td>
+ </tr>
+ </table>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/trx2_package.htm b/data/mnet/GP10/Host/ViperWatch/trx2_package.htm
new file mode 100644
index 0000000..63f2a25
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/trx2_package.htm
@@ -0,0 +1,213 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Second Transceiver Configuration</title>
+<base target="_self">
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/common.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/state.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+function PresetForm(theForm)
+{
+ selectOption(theForm.basebandAdministrativeState_1Select, theForm.basebandAdministrativeState_1);
+ var j = "1" // skip the first one
+ for (var i = "0"; i < theForm.channelCombination_1Select.length; i++)
+ {
+ j++ // Channel ID is not used
+ selectOption(theForm.channelCombination_1Select[i], theForm.elements[j++]);
+ selectOption(theForm.channelTsc_1Select[i], theForm.elements[j++]);
+ selectOption(theForm.channelAdministrativeState_1Select[i], theForm.elements[j++]);
+ j = j+3 // Operational State is not used
+ }
+ if (theForm.btsState.value == "0")
+ {
+ disableAllAdminState(theForm);
+ } else if (theForm.basebandAdministrativeState_1Select.selectedIndex == "0") {
+ disableAllTimeSlotAdminState(theForm);
+ }
+ return true;
+}
+
+function disableAllAdminState(theForm)
+{
+ theForm.basebandAdministrativeState_1Select.disabled = true;
+ disableAllTimeSlotAdminState(theForm);
+
+}
+function disableAllTimeSlotAdminState(theForm)
+{
+ for (var i = 0; i < theForm.channelAdministrativeState_1Select.length; i++)
+ {
+ theForm.channelAdministrativeState_1Select[i].disabled = true;
+ }
+}
+function ParseForm(theForm)
+{
+ parseSelect(theForm.basebandAdministrativeState_1Select, theForm.basebandAdministrativeState_1);
+ var j = "1"
+ for (var i = 0; i < theForm.channelCombination_1Select.length; i++)
+ {
+ j++ // Channel ID is not used
+ parseSelect(theForm.channelCombination_1Select[i], theForm.elements[j++]);
+ parseSelect(theForm.channelTsc_1Select[i], theForm.elements[j++]);
+ parseSelect(theForm.channelAdministrativeState_1Select[i], theForm.elements[j++]);
+ j = j+3 // Operational State is not used
+ }
+ return true;
+}
+function ChangeAll(theSelect, valueHolder, changeUnit, effectiveUnit, theParent, theParentName)
+{
+ var status = ConfirmAdminState(theSelect, valueHolder, changeUnit, effectiveUnit, theParent, theParentName);
+ if (status)
+ {
+ theSelect.form.basebandAdministrativeState_1Select.options[theSelect.selectedIndex].selected = true;
+ for (var i = 0; i < theSelect.form.channelAdministrativeState_1Select.length; i++)
+ {
+ theSelect.form.channelAdministrativeState_1Select[i].options[theSelect.selectedIndex].selected = true;
+ if(theSelect.selectedIndex == "1")
+ {
+ theSelect.form.channelAdministrativeState_1Select[i].disabled = false;
+ } else {
+ theSelect.form.channelAdministrativeState_1Select[i].disabled = true;
+ }
+
+ }
+ } else {
+ theSelect.form.reset()
+ }
+ return true;
+}
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form name="trx2_package" method="post" onsubmit="return ParseForm(this);">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="569">
+ <tr>
+ <td width="553">
+ <h2 align="center">Second Transceiver Configuration</h2>
+ <center>
+ <table border="1">
+ <tr>
+ <td><b>Current State:</b>
+ <table border="0">
+ <tr>
+ <td height="23" align="left">Administrative State:</td>
+ <td height="23" align="left"><select name="basebandAdministrativeState_1Select" size="1" onchange="ChangeAll(this, this.form.basebandAdministrativeState_1, 'the second TRX', 'TRX', this.form.btsState.value, 'GP10 at BTS Basic Package');">
+ <option value="0">Locked</option>
+ <option value="1" selected>Unlocked</option>
+ <option value="2">Shutting Down</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td height="23" align="left">Operational State:</td>
+ <td height="23" align="left">
+ <script> displayState("$%basebandOperationalState_1#$") </script>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </center><center>
+ <table border="1" width="100%">
+ <tr>
+ <th width="46" align="center" height="38"><strong>Time<br>
+ Slot</strong></th>
+ <th width="150" align="center" height="38"><strong>Channel<br>
+ Combination</strong></th>
+ <th width="95" align="center" height="38"><strong>Training Sequence</strong></th>
+ <th width="132" height="38">&nbsp;<strong>Administration<br>
+ State</strong></th>
+ <th width="97" height="38"><strong>Operational<br>
+ State</strong></th>
+ </tr>
+ <!$%createTable(channelIndex_1,*,,,,,channelIndex_1,channelID_1,channelCombination_1,channelFrequencyUsage_1,channelTsc_1,channelAdministrativeState_1,channelOperationalState_1)#$>
+
+ <input type="hidden" name="channelID_1.$%getInstance(channelIndex_1)#$" value="$%getInstance(channelIndex_1)#$"><input type="hidden" name="channelCombination_1.$%getInstance(channelIndex_1)#$" value="$%channelCombination_1#$"><input type="hidden" name="channelTsc_1.$%getInstance(channelIndex_1)#$" value="$%channelTsc_1#$"><input type="hidden" name="channelAdministrativeState_1.$%getInstance(channelIndex_1)#$" value="$%channelAdministrativeState_1#$">
+ <tr>
+ <td width="46" height="38">
+ <p align="center">$%getInstance(channelIndex_1)#$</td>
+ <td width="150" height="38"><select name="channelCombination_1Select" size="1">
+ <option value="1">TCH Full</option>
+ <option value="13">PDTCH</option>
+ </select></td>
+ <td width="95" height="38"><select name="channelTsc_1Select" size="1">
+ <option selected value="0">Use BCC</option>
+ </select></td>
+ <td width="132" height="38"><select name="channelAdministrativeState_1Select" size="1" onchange="ConfirmAdminState(this, this.form.elements[$%getInstance(channelIndex_1)#$*7+4], 'this time slot', 'time slot', this.form.basebandAdministrativeState_1Select.selectedIndex, 'second TRX');">
+ <option value="0">Locked</option>
+ <option value="1" selected>Unlocked</option>
+ <option value="2">Shutting Down</option>
+ </select></td>
+ <td width="97" height="38">
+ <script language="JavaScript"> displayState("$%channelOperationalState_1#$") </script>
+ </td>
+ </tr>
+ <!$%endRow(channelIndex_1)#$>
+ <!$%REPEAT(channelIndex_1,2,8)#$>
+ <input type="hidden" name="channelID_1.$%getInstance(channelIndex_1)#$" value="$%getInstance(channelIndex_1)#$"><input type="hidden" name="channelCombination_1.$%getInstance(channelIndex_1)#$" value="$%channelCombination_1#$"><input type="hidden" name="channelTsc_1.$%getInstance(channelIndex_1)#$" value="$%channelTsc_1#$"><input type="hidden" name="channelAdministrativeState_1.$%getInstance(channelIndex_1)#$" value="$%channelAdministrativeState_1#$">
+ <tr>
+ <td width="46" height="38">
+ <p align="center">$%getInstance(channelIndex_1)#$</p>
+ </td>
+ <td width="150" height="38"><select name="channelCombination_1Select" size="1">
+ <option value="1">TCH Full</option>
+ <option value="13">PDTCH</option>
+ </select></td>
+ <td width="95" height="38"><select name="channelTsc_1Select" size="1">
+ <option selected value="0">Use BCC</option>
+ </select></td>
+ <td width="132" height="38"><select name="channelAdministrativeState_1Select" size="1" onchange="ConfirmAdminState(this, this.form.elements[$%getInstance(channelIndex_1)#$*7+4], 'this time slot', 'time slot', this.form.basebandAdministrativeState_1Select.selectedIndex, 'second TRX');">
+ <option value="0">Locked</option>
+ <option value="1" selected>Unlocked</option>
+ <option value="2">Shutting Down</option>
+ </select></td>
+ <td width="97" height="38">
+ <script language="JavaScript"> displayState("$%channelOperationalState_1#$") </script>
+ </td>
+ </tr>
+ <!$%endRow(channelIndex_1)#$>
+
+ <!$%REPEAT(END)#$>
+ <!$%endTable(channelIndex_1)#$>
+
+ <input type="hidden" name="basebandAdministrativeState_1" value="$%basebandAdministrativeState_1#$">
+
+ <!-- Fixed value -->
+ <input type="hidden" name="basebandTransceiverID_1" value="1"><input type="hidden" name="relatedRadioCarrier_1" value="1"><input type="hidden" name="btsState" value="$%bts_administrativeState#$">
+ </table>
+ </center><center>
+ <table border="0">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."></td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()" title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </form>
+
+ </td>
+ </tr>
+ </table>
+ </center>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/user_add.htm b/data/mnet/GP10/Host/ViperWatch/user_add.htm
new file mode 100644
index 0000000..a78d84c
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/user_add.htm
@@ -0,0 +1,128 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Add GP10 User</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+
+function PresetForm(theForm)
+{
+ return true;
+}
+
+
+function ParseForm(theForm)
+{
+ var year, hour, month;
+ var newDate;
+
+ if (theForm.userName.value.length < 4)
+ {
+ alert("Too short user name!")
+ return false;
+ }
+ if (theForm.password1.value.length < 4)
+ {
+ alert("Too short password!")
+ return false;
+ }
+
+ if (theForm.password1.value != theForm.password2.value)
+ {
+ alert("Two passwords do not match ")
+ return false;
+ }
+
+ parseSelect(theForm.accessLevel, theForm.ac)
+
+ theForm.elements[0].value = theForm.userName.value + "|" + theForm.password1.value + "|" + theForm.ac.value;
+}
+
+
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" onsubmit="return ParseForm(this)" name="smscbAddMsg">
+
+ <input name="ViperCellUserMgmt(AddUser)" type="hidden" value="">
+
+ <input name="ac" type="hidden" value="">
+ <table border="0" width="83%" cellspacing="3" cellpadding="3" height="92">
+ <tr>
+ <td width="100%" height="80">
+ <p align="left">&nbsp;
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="540">
+ <tr>
+ <td width="587">
+ <h2 align="center">Add GP10 User</h2>
+ </center>
+ <center>
+ <table border="0" width="95%">
+ <tr>
+ <td width="30%" nowrap height="23" align="left">User Name</td>
+ <td nowrap width="70%">
+ <p style=" padding-top: 0px; padding-bottom: 0px"><input name="userName" size="25" maxlength="32">
+ </tr>
+ <tr>
+ <td width="30%" nowrap height="23" align="left"> Access Level</td>
+ <td nowrap width="70%">
+ <p style=" padding-top: 0px; padding-bottom: 0px">
+ <select size="1" name="accessLevel">
+ <option selected value="1">Normal</option>
+ <option value="0">Administrator</option>
+ </select>
+ </tr>
+ <tr>
+ <td width="30%" nowrap height="23" align="left">Password</td>
+ <td nowrap width="70%">
+ <p style=" padding-top: 0px; padding-bottom: 0px"><input type="password" name="password1" size="25" maxlength="32">
+ </tr>
+ <tr>
+ <td width="30%" nowrap height="23" align="left">Confirm Password</td>
+ <td nowrap width="70%">
+ <p style=" padding-top: 0px; padding-bottom: 0px"><input type="password" name="password2" size="25" maxlength="32">
+ </tr>
+ </table>
+ <div align="center">
+ <table border="0" cellpadding="3" width="212">
+ <tr>
+ <td align="center" width="64">&nbsp;</td>
+ <td align="center" width="62"></td>
+ <td align="center" width="56"></td>
+ </tr>
+ <tr>
+ <td align="center" width="64"></td>
+ <td align="center" width="62"><input name="B1" type="submit" value="Add User" title="Click this button to commit the change."></td>
+ <td align="center" width="56"></td>
+ </tr>
+ <tr>
+ <td align="center" width="64"></td>
+ <td align="center" width="62"></td>
+ <td align="center" width="56"></td>
+ </tr>
+ </table>
+ </div>
+ </center>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/user_chg.htm b/data/mnet/GP10/Host/ViperWatch/user_chg.htm
new file mode 100644
index 0000000..d1b0ce7
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/user_chg.htm
@@ -0,0 +1,127 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Add GP10 User</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+
+function PresetForm(theForm)
+{
+ return true;
+}
+
+
+function ParseForm(theForm)
+{
+ var year, hour, month;
+ var newDate;
+ var tmpval
+
+ if (theForm.userName.value.length < 4)
+ {
+ alert("Too short user name!")
+ return false;
+ }
+ if (theForm.password1.value.length < 4)
+ {
+ alert("Too short password!")
+ return false;
+ }
+
+ if (theForm.password1.value != theForm.password2.value)
+ {
+ alert("Two passwords do not match ")
+ return false;
+ }
+
+ tmpval= theForm.userName.value;
+ tmpval += "|" + theForm.oldPassword.value + "|"
+
+ theForm.elements[0].value = tmpval + theForm.password1.value;
+}
+
+
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" onsubmit="return ParseForm(this)" name="smscbAddMsg">
+
+ <input name="ViperCellUserMgmt(ChgUser)" type="hidden" value="">
+
+ <input name="ac" type="hidden" value="">
+ <p>&nbsp;</p>
+ <table border="0" width="83%" cellspacing="3" cellpadding="3" height="92">
+ <tr>
+ <td width="100%" height="80">
+ <p align="left">&nbsp;
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="540">
+ <tr>
+ <td width="587">
+ <h2 align="center">Change Password</h2>
+ </center>
+ <center>
+ <table border="0" width="95%">
+ <tr>
+ <td width="30%" nowrap height="23" align="left">User Name</td>
+ <td nowrap width="70%">
+ <p style=" padding-top: 0px; padding-bottom: 0px"><input name="userName" size="25" maxlength="32" value="$%ViperCellUserMgmt(GetUser)#$">
+ </tr>
+ <tr>
+ <td width="30%" nowrap height="23" align="left">Old Password</td>
+ <td nowrap width="70%">
+ <p style=" padding-top: 0px; padding-bottom: 0px"><input type="password" name="oldPassword" size="25" maxlength="32">
+ </tr>
+ <tr>
+ <td width="30%" nowrap height="23" align="left">New Password</td>
+ <td nowrap width="70%">
+ <p style=" padding-top: 0px; padding-bottom: 0px"><input type="password" name="password1" size="25" maxlength="32">
+ </tr>
+ <tr>
+ <td width="30%" nowrap height="23" align="left">Confirm New Password</td>
+ <td nowrap width="70%">
+ <p style=" padding-top: 0px; padding-bottom: 0px"><input type="password" name="password2" size="25" maxlength="32">
+ </tr>
+ </table>
+ <div align="center">
+ <table border="0" cellpadding="3" width="212">
+ <tr>
+ <td align="center" width="64">&nbsp;</td>
+ <td align="center" width="62"></td>
+ <td align="center" width="56"></td>
+ </tr>
+ <tr>
+ <td align="center" width="64"></td>
+ <td align="center" width="62"><input name="B1" type="submit" value="Change Password" title="Click this button to commit the change."></td>
+ <td align="center" width="56"></td>
+ </tr>
+ <tr>
+ <td align="center" width="64"></td>
+ <td align="center" width="62"></td>
+ <td align="center" width="56"></td>
+ </tr>
+ </table>
+ </div>
+ </center>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/user_del.htm b/data/mnet/GP10/Host/ViperWatch/user_del.htm
new file mode 100644
index 0000000..7a288fd
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/user_del.htm
@@ -0,0 +1,98 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>Add GP10 User</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/integer.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+
+function PresetForm(theForm)
+{
+ return true;
+}
+
+
+function ParseForm(theForm)
+{
+ var year, hour, month;
+ var newDate;
+ var tmpval
+
+ if (theForm.userName.value.length < 4)
+ {
+ alert("Too short user name!")
+ return false;
+ }
+
+ theForm.elements[0].value = theForm.userName.value;
+}
+
+
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" onsubmit="return ParseForm(this)" name="smscbAddMsg">
+
+ <input name="ViperCellUserMgmt(DelUser)" type="hidden" value="">
+
+ <input name="ac" type="hidden" value="">
+ <p>&nbsp;</p>
+ <table border="0" width="83%" cellspacing="3" cellpadding="3" height="92">
+ <tr>
+ <td width="100%" height="80">
+ <p align="left">&nbsp;
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="540">
+ <tr>
+ <td width="587">
+ <h2 align="center">Delete User</h2>
+ </center>
+ <center>
+ <table border="0" width="95%">
+ <tr>
+ <td width="30%" nowrap height="23" align="left">User Name</td>
+ <td nowrap width="70%">
+ <p style=" padding-top: 0px; padding-bottom: 0px"><input name="userName" size="25" maxlength="32" value="$%ViperCellUserMgmt(GetUser)#$">
+ </tr>
+ </table>
+ <div align="center">
+ <table border="0" cellpadding="3" width="212">
+ <tr>
+ <td align="center" width="64">&nbsp;</td>
+ <td align="center" width="62"></td>
+ <td align="center" width="56"></td>
+ </tr>
+ <tr>
+ <td align="center" width="64"></td>
+ <td align="center" width="62"><input name="B1" type="submit" value="Delete User" title="Click this button to commit the change."></td>
+ <td align="center" width="56"></td>
+ </tr>
+ <tr>
+ <td align="center" width="64"></td>
+ <td align="center" width="62"></td>
+ <td align="center" width="56"></td>
+ </tr>
+ </table>
+ </div>
+ </center>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ </table>
+ <p align="center">&nbsp;</p>
+</form>
+
+</body>
diff --git a/data/mnet/GP10/Host/ViperWatch/user_mgmt.htm b/data/mnet/GP10/Host/ViperWatch/user_mgmt.htm
new file mode 100644
index 0000000..c0c5e9b
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/user_mgmt.htm
@@ -0,0 +1,79 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>SMSCB Message Management Page</title>
+</head>
+
+<body onload="$%reloadTopframe#$">
+
+<SCRIPT language="JavaScript" src="./js/link.js"></SCRIPT>
+
+<Script language="JavaScript">
+
+function displayTime(utctime)
+{
+
+ var gmtDate = new Date(utctime*1000);
+ return gmtDate.toLocaleString();
+}
+
+
+function DisplayUser (sMsg)
+
+{
+ var aMsg = sMsg.split("|")
+
+ if (aMsg[0].length < 1) return;
+
+ document.write("<tr>")
+ document.write("<td align=\"left\" valign=\"middle\" width=\"30%\"> " + aMsg[0] + " </td>");
+ document.write("<td align=\"middle\" valign=\"middle\" width=\"20%\">[<a href=\"./user_del.htm?" + aMsg[0] + "\">Delete User</a>][<a href=\"./user_chg.htm?" + aMsg[0] + "\">Change Password </a>]</td>");
+ document.write("</tr>");
+}
+
+function DisplayUserList(sMsgList)
+{
+ var aMsgList = sMsgList.split("#");
+
+ for (var i=0; i< aMsgList.length-1; i++)
+ {
+ DisplayUser(aMsgList [i])
+ }
+}
+
+</Script>
+
+<h2 align="left"><nobr>GP10 User Management</nobr></h2>
+
+<p>&nbsp;
+<table border="0" cellPadding="2" cellSpacing="0" width="80%">
+ <tbody>
+ <tr>
+ <td bgColor="#dcdcdc" vAlign="top" width="407"><b><font face="Arial">Current
+ Users</font></b></td>
+ <td align="right" bgColor="#dcdcdc" width="302"><font face="arial" size="-1"><a href="user_add.htm">Add
+ a new user</a></font></td>
+ </tr>
+ </tbody>
+</table>
+<p>&nbsp;
+<table border="1" cellPadding="4" cellSpacing="0" width="80%">
+ <tbody>
+ <tr bgColor="#ffffcc">
+ <th valign="middle" width="30%"> User Name</th>
+ <th valign="middle" width="70%">Action</th>
+ </tr>
+ <!----------
+ Test string Ram##Shyam#Gore#Sundari###
+ ------------>
+ <Script > DisplayUserList("$%ViperCellUserMgmt(GetUserList)#$") </Script>
+ </tbody>
+</table>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/user_status.htm b/data/mnet/GP10/Host/ViperWatch/user_status.htm
new file mode 100644
index 0000000..35b40b0
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/user_status.htm
@@ -0,0 +1,23 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>User Management Operation Status </title>
+</head>
+
+<script Language="JavaScript">
+
+</script>
+
+<body onload="$%reloadTopframe#$">
+<h2 align="left">User Management Operation Status
+</h2>
+
+$%ViperCellUserMgmt(GetResult)#$
+ <p>Please click<a title="List of current users" href="user_mgmt.htm"> here</a> to see current GP10
+ user list.</p>
+ <p>&nbsp;</p>
+</body>
+
diff --git a/data/mnet/GP10/Host/ViperWatch/viper_cell_gsm_mib.htm b/data/mnet/GP10/Host/ViperWatch/viper_cell_gsm_mib.htm
new file mode 100644
index 0000000..d39ff79
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/viper_cell_gsm_mib.htm
@@ -0,0 +1,58 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GP10 GSM MIB</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/link.js"></SCRIPT>
+
+<body onload="$%reloadTopframe#$">
+&nbsp;
+<h1 align="center">GP10 GSM MIB</h1>
+<p>GP10 GSM MIB Consists of following MIB Packages:</p>
+<ul>
+ <li><nobr><font size="-1"><a href="cell_config_mgmt.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Cell Configuration Management Overview">Cell Configuration Management</a></font></nobr></li>
+ <li><nobr><font size="-1"><a href="proto_config_mgmt.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Protocol Configuration Management">Protocol Configuration Management</a></font></nobr></li>
+ <li><nobr><font size="-1"><a
+ href="adjcent_cell_mgmt_overview.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Adjacent Cell Management Overview">Adjacent Cell Configuration
+ Management</a></font></nobr></li>
+ <li><nobr><font size="-1"><a
+ href="power_control_mgmt_overview.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Power Control Management Overview">Power Control Management</a></font></nobr></li>
+ <li><nobr><font size="-1"><a
+ href="handover_control_mgmt_overview.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Handover Control Management Overview">Handover Control Management</a></font></nobr></li>
+ <li><nobr><font size="-1"><a
+ href="cell_measuremnt_overview.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Cell Measurement Overview">Cell Measurement Package</a></font></nobr></li>
+ <li><nobr><font size="-1"><a
+ href="call_measuremnt_overview.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" style="COLOR: green"
+ target="main" title="Call Measurement Overview">Call Control Measurement
+ Package</a></font><br>
+ <img height="1" src="Images/filler.gif" width="0"></nobr></li>
+</ul>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/vipercell_config_overview.htm b/data/mnet/GP10/Host/ViperWatch/vipercell_config_overview.htm
new file mode 100644
index 0000000..b7f970e
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/vipercell_config_overview.htm
@@ -0,0 +1,70 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>New Page 1</title>
+</head>
+
+<body onload="$%reloadTopframe#$">
+
+<SCRIPT language="JavaScript" src="./js/link.js"></SCRIPT>
+
+<h2><nobr>GP10 Specific MIB</nobr></h2>
+<p>GP10 Specific&nbsp; section of the MIB consists of the following:</p>
+<ul>
+ <li><nobr><a href="dual_trx_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Dual TRX Card Related Parameters">Dual TRX Card</a></nobr></li>
+ <li><nobr><a href="arfcn_rssi_function.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="ARFCN RSS Fuction">AR</a><a
+ href="arfcn_rssi_function.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="ARFCN RSS Fuction">FCN RSS Function</a></nobr></li>
+ <li><nobr><a href="clock_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Clock Card Related Parameters">Clock Card</a></nobr></li>
+ <li><nobr><a href="gps_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="GPS Card Related Parameters">GPS Card</a></nobr></li>
+ <li><nobr><a href="power_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Power Card Related Parameters">Power Card</a></nobr></li>
+ <li><nobr><a href="external_power_supply.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="External Power Supply Related Parameters">External Power Supply</a></nobr></li>
+ <li><nobr><a href="cdc_board.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="CDC Board Specific Parameters">CDC Board</a></nobr></li>
+</ul>
+<ul>
+ <li><nobr><a href="automatic_parameter_allocation.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Automatic Parameter Allocation Parameters">Automatic Parameter
+ Allocation</a></nobr></li>
+ <li><nobr><a href="apa_invalid_frequency_table.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Automatic Parameter Allocation Invalid Frequencies">Automatic Parameter
+ Allocation&nbsp; Invalid Frequencies</a></nobr></li>
+ <li><nobr><a href="apa_clock_source_frequency_table.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title=" Automatic Parameter Allocation Source Frequencies">Automatic
+ Parameter Allocation Clock Source Frequencies</a><img height="1"
+ src="filler.gif" width="0"></nobr></li>
+</ul>
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/vipercell_gsm_mib.htm b/data/mnet/GP10/Host/ViperWatch/vipercell_gsm_mib.htm
new file mode 100644
index 0000000..3d70043
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/vipercell_gsm_mib.htm
@@ -0,0 +1,36 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GP10 GSM MIB</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/link.js"></SCRIPT>
+
+<body onload="$%reloadTopframe#$">
+
+<h1 align="center">GP10 GSM MIB</h1>
+<p>GP10 GSM MIB section consists of the following pages:</p>
+<ul>
+ <li><nobr><a href="cell_config_mgmt.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Cell Configuration Management Overview">Cell Configuration Management</a></nobr></li>
+ <li><nobr><a href="proto_config_mgmt.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Protocol Configuration Management">Protocol Configuration Management</a></nobr></li>
+ <li><nobr><a href="adjcent_cell_mgmt_overview.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Adjacent Cell Management Overview">Adjacent Cell Configuration Management</a></nobr></li>
+ <li><nobr><a href="power_control_package.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Power Control Package">MS Power Control Parameters</a></nobr></li>
+ <li><nobr><a href="handover_control_package.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="handover_control_package">Handover Control General Parameters</a></nobr></li>
+ <li><nobr><a href="cell_measurement_overview.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Cell Measurement Overview">Cell Measurement Package</a></nobr></li>
+ <li><nobr><a href="call_measurement_overview.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Call Measurement Overview">Call Control Measurement Package</a></nobr></li>
+</ul>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/vipercell_h323_overview.htm b/data/mnet/GP10/Host/ViperWatch/vipercell_h323_overview.htm
new file mode 100644
index 0000000..b7f970e
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/vipercell_h323_overview.htm
@@ -0,0 +1,70 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>New Page 1</title>
+</head>
+
+<body onload="$%reloadTopframe#$">
+
+<SCRIPT language="JavaScript" src="./js/link.js"></SCRIPT>
+
+<h2><nobr>GP10 Specific MIB</nobr></h2>
+<p>GP10 Specific&nbsp; section of the MIB consists of the following:</p>
+<ul>
+ <li><nobr><a href="dual_trx_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Dual TRX Card Related Parameters">Dual TRX Card</a></nobr></li>
+ <li><nobr><a href="arfcn_rssi_function.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="ARFCN RSS Fuction">AR</a><a
+ href="arfcn_rssi_function.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="ARFCN RSS Fuction">FCN RSS Function</a></nobr></li>
+ <li><nobr><a href="clock_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Clock Card Related Parameters">Clock Card</a></nobr></li>
+ <li><nobr><a href="gps_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="GPS Card Related Parameters">GPS Card</a></nobr></li>
+ <li><nobr><a href="power_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Power Card Related Parameters">Power Card</a></nobr></li>
+ <li><nobr><a href="external_power_supply.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="External Power Supply Related Parameters">External Power Supply</a></nobr></li>
+ <li><nobr><a href="cdc_board.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="CDC Board Specific Parameters">CDC Board</a></nobr></li>
+</ul>
+<ul>
+ <li><nobr><a href="automatic_parameter_allocation.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Automatic Parameter Allocation Parameters">Automatic Parameter
+ Allocation</a></nobr></li>
+ <li><nobr><a href="apa_invalid_frequency_table.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Automatic Parameter Allocation Invalid Frequencies">Automatic Parameter
+ Allocation&nbsp; Invalid Frequencies</a></nobr></li>
+ <li><nobr><a href="apa_clock_source_frequency_table.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title=" Automatic Parameter Allocation Source Frequencies">Automatic
+ Parameter Allocation Clock Source Frequencies</a><img height="1"
+ src="filler.gif" width="0"></nobr></li>
+</ul>
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/vipercell_maintenance_overview.htm b/data/mnet/GP10/Host/ViperWatch/vipercell_maintenance_overview.htm
new file mode 100644
index 0000000..b6586bb
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/vipercell_maintenance_overview.htm
@@ -0,0 +1,70 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GP10 Maintenance Overview</title>
+</head>
+
+<body onload="$%reloadTopframe#$">
+
+<SCRIPT language="JavaScript" src="./js/link.js"></SCRIPT>
+
+<h2><nobr>GP10 Maintenance Overview</nobr></h2>
+<p>GP10 maintenance overview section consists of the following:</p>
+<ul>
+ <li><nobr><a href="dual_trx_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Dual TRX Card Related Parameters">Dual TRX Card</a></nobr></li>
+ <li><nobr><a href="arfcn_rssi_function.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="ARFCN RSS Fuction">AR</a><a
+ href="arfcn_rssi_function.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="ARFCN RSS Fuction">FCN RSS Function</a></nobr></li>
+ <li><nobr><a href="clock_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Clock Card Related Parameters">Clock Card</a></nobr></li>
+ <li><nobr><a href="gps_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="GPS Card Related Parameters">GPS Card</a></nobr></li>
+ <li><nobr><a href="power_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Power Card Related Parameters">Power Card</a></nobr></li>
+ <li><nobr><a href="external_power_supply.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="External Power Supply Related Parameters">External Power Supply</a></nobr></li>
+ <li><nobr><a href="cdc_board.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="CDC Board Specific Parameters">CDC Board</a></nobr></li>
+</ul>
+<ul>
+ <li><nobr><a href="automatic_parameter_allocation.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Automatic Parameter Allocation Parameters">Automatic Parameter
+ Allocation</a></nobr></li>
+ <li><nobr><a href="apa_invalid_frequency_table.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Automatic Parameter Allocation Invalid Frequencies">Automatic Parameter
+ Allocation&nbsp; Invalid Frequencies</a></nobr></li>
+ <li><nobr><a href="apa_clock_source_frequency_table.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title=" Automatic Parameter Allocation Source Frequencies">Automatic
+ Parameter Allocation Clock Source Frequencies</a><img height="1"
+ src="filler.gif" width="0"></nobr></li>
+</ul>
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/vipercell_mgmt_info.htm b/data/mnet/GP10/Host/ViperWatch/vipercell_mgmt_info.htm
new file mode 100644
index 0000000..e1e50c9
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/vipercell_mgmt_info.htm
@@ -0,0 +1,184 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GP10 System Information</title>
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+<SCRIPT language="JavaScript" src="./js/ip.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+
+
+function ParseForm(theForm)
+{
+ return (validateIp(theForm.viperCellDefGateway, "Default Gateway") && IpWarning(theForm));
+}
+
+function PresetForm(theForm)
+{
+ return true;
+}
+
+function IpWarning(theForm)
+{
+ if (theForm.ipAdress.defaultValue != theForm.ipAdress.value)
+ {
+ alert("You are trying to change IP address of GP10. The change will not take effect until you reboot the GP10.");
+ }
+ return true;
+}
+
+function isValidName(theField, name)
+{
+ if (theField.value == "")
+ {
+ alert("Please enter a value for the " + name + " field.");
+ theField.value = theField.defaultValue;
+ theField.focus();
+ return (false);
+ }
+
+ var checkOK = " ()#-0123456789";
+ var checkStr = theField.value;
+ var allValid = true;
+ var decPoints = 0;
+ var status;
+ for (i = 0; i < checkStr.length; i++)
+ {
+ status = false;
+ ch = checkStr.charAt(i);
+ if (((ch >= "a".charAt(0)) && (ch <= "z".charAt(0)) ) || ((ch >= "A".charAt(0)) && (ch <= "Z".charAt(0))))
+ {
+ status = true;
+ } else {
+
+ for (j = 0; j < checkOK.length; j++)
+ {
+ if (ch == checkOK.charAt(j))
+ {
+ status = true;
+ break;
+ }
+ }
+ }
+ if (!status)
+ {
+ allValid = false;
+ break;
+ }
+ }
+ if (!allValid)
+ {
+ alert("Please enter valid characters in " + name + " field.");
+ theField.value = theField.defaultValue;
+ theField.focus();
+ return (false);
+ }
+ return (true);
+}
+
+
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="dual_trx_card" >
+
+<font face="Times New Roman">
+
+<div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="501">
+ <tr>
+ <td width="485">
+ <h2 align="center">GP10 System Information</h2>
+ <div align="center">
+
+<font face="Times New Roman">
+
+ <table border="1" width="445" height="381">
+ <tr>
+ <td width="167" height="23" align="left"> Name:</td>
+ <td width="262" height="23"><input type="text" name="viperCellName" size="30" value="$%viperCellName#$" maxlength="30" onChange="isValidName(this, 'GP10 Name');"></td>
+ </tr>
+ <tr>
+ <td width="167" height="23" align="left">IP Address: Subnet Mask</td>
+ <td width="262" height="23"><input type="text" name="ipAdress" size="35" value="$%ipAdress#$"></td>
+ </tr>
+ <tr>
+ <td width="167" height="23" align="left">Default IP Gateway</td>
+ <td width="262" height="23"><input type="text" name="viperCellDefGateway" size="35" value="$%viperCellDefGateway#$"></td>
+ </tr>
+ <tr>
+ <td width="167" height="23" align="left">Location:</td>
+ <td width="262" height="23"><input type="text" name="viperCellLocation" size="35" value="$%viperCellLocation#$"></td>
+ </tr>
+ <tr>
+ <td width="167" height="23" align="left">Asset Number:</td>
+ <td width="262" height="23"><input type="text" name="viperCellAssetNumber" size="20" value="$%viperCellAssetNumber#$" maxlength="20"></td>
+ </tr>
+ <tr>
+ <td width="167" height="22" align="left">Customer Name:</td>
+ <td width="262" height="22"><input type="text" name="viperCellCustomerName" size="30" value="$%viperCellCustomerName#$" maxlength="30"></td>
+ </tr>
+ <tr>
+ <td width="167" height="98" align="left">Customer Address:</td>
+ <td width="262" height="98"><textarea rows="4" name="viperCellCustomerAddress" cols="30">$%viperCellCustomerAddress#$</textarea></td>
+ </tr>
+ <tr>
+ <td width="167" height="23" align="left">Customer Phone:</td>
+ <td width="262" height="23"><input type="text" name="viperCellCustomerPhone" size="30" value="$%viperCellCustomerPhone#$" maxlength="30"></td>
+ </tr>
+ <tr>
+ <td width="167" height="23" align="left">Customer Email:</td>
+ <td width="262" height="23"><input type="text" name="viperCellCustomerEmail" size="30" value="$%viperCellCustomerEmail#$"></td>
+ </tr>
+ <tr>
+ <td width="167" height="98" align="left">Comments:</td>
+ <td width="262" height="98"><textarea rows="4" name="viperCellCustomerInfo" cols="30">$%viperCellCustomerInfo#$</textarea></td>
+ </tr>
+ </table>
+ <table border="0">
+ <tr>
+ <td width="90%"><blink><font color="#0000FF" size="1" face="Times New Roman">Note:
+ Changes made on this page will only be effective after the reboot of
+ GP10.</font></blink></td>
+ </tr>
+ </table>
+ </div>
+
+ <div align="center">
+ <center>
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center"><input name="B1" type="submit" value="Submit" title="Click this button to commit the change."> </td>
+ <td align="center"> <input name="Recall" type="button" value="Recall" onclick="window.location.reload()" title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+</div>
+
+<p align="center">&nbsp;</p>
+
+<p align="center">&nbsp;</p>
+</form>
+
+</body>
+
diff --git a/data/mnet/GP10/Host/ViperWatch/vipercell_specific.htm b/data/mnet/GP10/Host/ViperWatch/vipercell_specific.htm
new file mode 100644
index 0000000..a96e6b4
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/vipercell_specific.htm
@@ -0,0 +1,30 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GP10 Specific MIB</title>
+</head>
+
+<body onload="$%reloadTopframe#$">
+
+<SCRIPT language="JavaScript" src="./js/link.js"></SCRIPT>
+
+<h2><nobr>GP10 Specific MIB</nobr></h2>
+<p>GP10 Specific&nbsp; section of the MIB consists of the following pages:</p>
+<ul>
+ <li><nobr><a href="dual_trx_card.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Dual TRX Card Related Parameters">Dual TRX Card</a></nobr></li>
+ <li><nobr><a href="clock_card.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Clock Card Related Parameters">Clock Card</a></nobr></li>
+ <li><nobr><a href="power_card.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Power Supply Status">Power Supply Status</a></nobr></li>
+ <li><nobr><a href="cdc_board.htm" onmouseout="undoHighlight(this);" onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="CDC Board Specific Parameters">CDC Board</a></nobr></li>
+</ul>
+
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/vipercell_specific_overview.htm b/data/mnet/GP10/Host/ViperWatch/vipercell_specific_overview.htm
new file mode 100644
index 0000000..0039bb6
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/vipercell_specific_overview.htm
@@ -0,0 +1,70 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GP10 Specific Overview</title>
+</head>
+
+<body onload="$%reloadTopframe#$">
+
+<SCRIPT language="JavaScript" src="./js/link.js"></SCRIPT>
+
+<h2><nobr>GP10 Specific Overview</nobr></h2>
+<p>GP10 Specific Overview section of the MIB consists of the following:</p>
+<ul>
+ <li><nobr><a href="dual_trx_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Dual TRX Card Related Parameters">Dual TRX Card</a></nobr></li>
+ <li><nobr><a href="arfcn_rssi_function.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="ARFCN RSS Fuction">AR</a><a
+ href="arfcn_rssi_function.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="ARFCN RSS Fuction">FCN RSS Function</a></nobr></li>
+ <li><nobr><a href="clock_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Clock Card Related Parameters">Clock Card</a></nobr></li>
+ <li><nobr><a href="gps_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="GPS Card Related Parameters">GPS Card</a></nobr></li>
+ <li><nobr><a href="power_card.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Power Card Related Parameters">Power Card</a></nobr></li>
+ <li><nobr><a href="external_power_supply.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="External Power Supply Related Parameters">External Power Supply</a></nobr></li>
+ <li><nobr><a href="cdc_board.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="CDC Board Specific Parameters">CDC Board</a></nobr></li>
+</ul>
+<ul>
+ <li><nobr><a href="automatic_parameter_allocation.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Automatic Parameter Allocation Parameters">Automatic Parameter
+ Allocation</a></nobr></li>
+ <li><nobr><a href="apa_invalid_frequency_table.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title="Automatic Parameter Allocation Invalid Frequencies">Automatic Parameter
+ Allocation&nbsp; Invalid Frequencies</a></nobr></li>
+ <li><nobr><a href="apa_clock_source_frequency_table.htm"
+ onmouseout="undoHighlight(this);"
+ onmouseover="highlight(this,linkHilightColor);" target="main"
+ title=" Automatic Parameter Allocation Source Frequencies">Automatic
+ Parameter Allocation Clock Source Frequencies</a><img height="1"
+ src="filler.gif" width="0"></nobr></li>
+</ul>
+</body>
+
+</html>
diff --git a/data/mnet/GP10/Host/ViperWatch/welcome.htm b/data/mnet/GP10/Host/ViperWatch/welcome.htm
new file mode 100644
index 0000000..629feb2
--- /dev/null
+++ b/data/mnet/GP10/Host/ViperWatch/welcome.htm
@@ -0,0 +1,175 @@
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>GP10 System Information</title>
+<base target="main">
+</head>
+
+<SCRIPT language="JavaScript" src="./js/form.js"></SCRIPT>
+
+<SCRIPT language="JavaScript">
+
+function ParseForm(theForm)
+{
+ return true;
+}
+
+function PresetForm(theForm)
+{
+ return true;
+}
+
+function displayTime(ltime)
+{
+ var locTime = new Date(ltime*1000);
+ document.write( locTime.toLocaleString());
+}
+
+function displayCdcTemp(theCelsius)
+{
+ if (theCelsius < 80)
+ {
+ document.write( theCelsius + " °C ");
+ document.write( "( " + (9*theCelsius + 160)/5 + " °F )");
+ } else {
+ document.write( "Invalid temperature value. <br>Please recall the page again.");
+ }
+}
+
+
+
+</SCRIPT>
+
+<body onload="PresetForm(this.document.forms[0]);$%reloadTopframe#$">
+
+<form method="POST" cellpadding="0" onsubmit="return ParseForm(this)" name="dual_trx_card">
+
+ <font face="Times New Roman">
+ <div align="center">
+ <center>
+ <table border="0" cellspacing="1" width="485">
+ <tr>
+ <td width="96">
+ <h1 align="center"><img border="0" src="Images/gp10.jpg" width="89" height="71" align="right"></h1>
+ </td>
+ </center>
+ <td width="375">
+ <h1 align="left">Cisco GSM Port Manager&nbsp;</h1>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div align="center">
+ <center>
+ <table border="4" bgcolor="#D6D3CE" width="480" height="522">
+ <tr>
+ <td width="464" height="516">
+ <h2 align="center">System Information</h2>
+ <div align="center">
+ <center>
+ <table border="1" height="361" width="439">
+ <tr>
+ <td align="left" height="21" width="167">Name:</td>
+ <td height="21" width="258">$%viperCellName#$&nbsp; </td>
+ </tr>
+ <tr>
+ <td align="left" height="21" width="167">IP Address:</td>
+ <td height="21" width="258"> $%viperCellIPAddress#$ </td>
+ </tr>
+ <tr>
+ <td align="left" height="20" width="167">Default IP Gateway</td>
+ <td height="20" width="258"> $%viperCellDefGateway#$ </td>
+ </tr>
+ <tr>
+ <td align="left" height="21" width="167">Current System Time:</td>
+ <td height="21" width="258">
+ <script Language="JavaScript"> displayTime("$%viperCellTime#$") </script>
+ &nbsp;
+ </td>
+ </tr>
+ <tr>
+ <td align="left" height="21" width="167">Current System Temperature</td>
+ <td height="21" width="258">
+ <script language="JavaScript"> displayCdcTemp("$%cdcTemperature#$"); </script>
+ </td>
+ </tr>
+ <tr>
+ <td align="left" height="21" width="167">Location:</td>
+ <td height="21" width="258">$%viperCellLocation#$&nbsp;</td>
+ </tr>
+ <tr>
+ <td align="left" height="21" width="167">Serial Number:</td>
+ <td height="21" width="258">$%viperCellSerialNumber#$&nbsp;</td>
+ </tr>
+ <tr>
+ <td align="left" height="21" width="167">Asset Number:</td>
+ <td height="21" width="258">$%viperCellAssetNumber#$&nbsp;</td>
+ </tr>
+ <tr>
+ <td align="left" height="35" width="167">Software Build:</td>
+ <td height="35" width="258">$%viperCellSoftwareBuild#$&nbsp;</td>
+ </tr>
+ <tr>
+ <td align="left" height="21" width="167">Customer Name:</td>
+ <td height="21" width="258">$%viperCellCustomerName#$&nbsp; </td>
+ </tr>
+ <tr>
+ <td align="left" height="87" width="167">Customer Address:</td>
+</font>
+ <td height="87" width="258"><pre>$%viperCellCustomerAddress#$ </pre></td>
+ </tr>
+
+ <font face="Times New Roman">
+ <tr>
+ <td align="left" height="21" width="167">Customer Phone:</td>
+ <td height="21" width="258">$%viperCellCustomerPhone#$&nbsp; </td>
+ </tr>
+ <tr>
+ <td align="left" height="21" width="167">Customer Email:</td>
+ <td height="21" width="258">$%viperCellCustomerEmail#$&nbsp; </td>
+ </tr>
+ <tr>
+ <td align="left" height="28" width="167">Customer Info.:</td>
+ <td height="28" width="258">$%viperCellCustomerInfo#$&nbsp; </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <div align="center">
+ <center>
+ <table border="0" cellpadding="3">
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ <tr>
+ <td align="center">
+
+ <font face="Times New Roman">
+ <input name="Change" type="button" value="Change" onclick="window.location.pathname='/vipercell_mgmt_info.htm';"
+ title="Click ths button to change this information.">
+</font>
+ </td>
+ <td align="center"><input name="Recall" type="button" value="Recall" onclick="window.location.reload()"
+ title="Click this button to refresh the form."></td>
+ </tr>
+ <tr>
+ <td align="center"></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </font>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ </form>
+
+</body>
diff --git a/data/mnet/GP10/Host/bssgp/Makefile b/data/mnet/GP10/Host/bssgp/Makefile
new file mode 100644
index 0000000..fec5f3b
--- /dev/null
+++ b/data/mnet/GP10/Host/bssgp/Makefile
@@ -0,0 +1,17 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src src_api
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ copy bin\*.out $(TOP_OF_VOB)\bin\*.out
+
diff --git a/data/mnet/GP10/Host/bssgp/src/Makefile b/data/mnet/GP10/Host/bssgp/src/Makefile
new file mode 100644
index 0000000..015c621
--- /dev/null
+++ b/data/mnet/GP10/Host/bssgp/src/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = bssgp
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\$(THIS_APP_DIR).out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR = bssgp
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) .\bin\*.o
+ $(RM) .\bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/bssgp/src/bssgp_api_gp.cpp b/data/mnet/GP10/Host/bssgp/src/bssgp_api_gp.cpp
new file mode 100644
index 0000000..f21e9a4
--- /dev/null
+++ b/data/mnet/GP10/Host/bssgp/src/bssgp_api_gp.cpp
@@ -0,0 +1,413 @@
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : bssgp_api.cpp *
+ * *
+ * Description : API handler functions for the BSS-GP layer module *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |10/10/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include "bssgp/bssgp_prot.h"
+#include "bssgp/bssgp_util.h"
+#include "bssgp/bssgp_api.h"
+#include "bssgp/bssgp_encoder.h"
+#include "bssgp/bssgp_net.h"
+#include "bssgp/bssgp_unitdata.h"
+
+/* common for all platforms */
+#include "Os/JCModule.h"
+#include "Os/JCTask.h"
+#include "Os/JCMsgQueue.h"
+
+/* common for GS */
+#include "GP10OsTune.h"
+#include "GP10MsgTypes.h"
+#include "MnetModuleId.h"
+#include "oam_api.h"
+
+
+
+/*
+ * Definitions
+ */
+#define BSSGP_MAX_API_MSGS_IN_Q 100
+
+
+
+/*
+ * Global variables
+ *
+ */
+extern MSG_Q_ID bssgp_api_msg_q;
+extern BOOL g_bssgp_shutdown, g_bssgp_api_initialized;
+extern BSSGP_CONFIGURATION bssgp_config;
+JCTask *g_bssgp_net_task,*g_bssgp_api_task;
+
+
+
+
+
+/*
+ * Function prototypes
+ */
+BOOL bssgp_api_initialize(void);
+void bssgp_api_handler(void);
+BOOL bssgp_api_send_msg(BSSGP_API_MSG msg);
+void bssgp_api_process_msg(BSSGP_API_MSG api_msg);
+BOOL bssgp_gp_initialize(void);
+int SysCommand_BSSGP(T_SYS_CMD action);
+
+
+
+
+
+
+/*
+ * bssgp_api_get_config
+ */
+BOOL
+bssgp_api_get_config()
+{
+ DBG_FUNC("bssgp_api_get_config",BSSGP_LAYER);
+ DBG_ENTER();
+ long int oam_retval;
+ UINT8 mcc[3],mnc[3],rac;
+ UINT16 lac;
+
+
+ /* Cell ID */
+ oam_retval = 0;
+ if (oam_getMibIntVar(MIB_btsID, (long int*)&oam_retval) != STATUS_OK) {
+ printf("Unable to get GP-10 Cell ID from OAM!!\n");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ else {
+ DBG_TRACE("GP-10 Cell ID OAM value %ld\n",oam_retval);
+ bssgp_config.cell_id.ie_present = TRUE;
+ bssgp_config.cell_id.value = oam_retval;
+ }
+
+
+ /* Retrieve the RAI */
+
+ bssgp_config.routing_area_id.ie_present = TRUE;
+
+ /* Mobile Country Code */
+ if (oam_getMibIntVar(MIB_bts_mcc, (long int *)&oam_retval) != STATUS_OK) {
+ printf("Unable to get GP-10 MCC from OAM!!\n");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ else {
+
+ if (oam_getByteAryByInt(oam_retval, (char*)mcc, 3) != STATUS_OK) {
+ }
+ else {
+ DBG_TRACE("GP-10 MCC OAM value %d:%d:%d\n",mcc[0],mcc[1],mcc[2]);
+ bssgp_config.routing_area_id.mcc[0] = mcc[0];
+ bssgp_config.routing_area_id.mcc[1] = mcc[1];
+ bssgp_config.routing_area_id.mcc[2] = mcc[2];
+ }
+ }
+
+ /* Mobile Network Code */ // kevinlim 05/11/01
+ if (oam_getMnc(mnc) != STATUS_OK) {
+ printf("Unable to get GP-10 MNC from OAM!!\n");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ else {
+ bssgp_config.routing_area_id.mnc[0] = mnc[0];
+ bssgp_config.routing_area_id.mnc[1] = mnc[1];
+ bssgp_config.routing_area_id.mnc[2] = mnc[2];
+ DBG_TRACE("GP-10 MNC OAM value %d:%d:%x\n",mnc[0],mnc[1],mnc[2]);
+ }
+
+
+ /* Location Area Code */
+ oam_retval = 0;
+ if (oam_getMibIntVar(MIB_bts_lac, (long int*)&oam_retval) != STATUS_OK) {
+ printf("Unable to get GP-10 LAC from OAM!!\n");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ else {
+ bssgp_config.routing_area_id.lac = (UINT16)oam_retval;
+ DBG_TRACE("GP-10 LAC OAM value %ld\n",oam_retval);
+ }
+
+ /* Routing Area Code */
+ oam_retval = 0;
+ if (oam_getMibIntVar(MIB_gprsRac, (long int*)&oam_retval) != STATUS_OK) {
+ printf("Unable to get GP-10 RAC from OAM!!\n");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ else {
+ bssgp_config.routing_area_id.rac = oam_retval;
+ DBG_TRACE("GP-10 RAC OAM value %ld\n",bssgp_config.routing_area_id.rac);
+ }
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_api_initialize
+ */
+BOOL
+bssgp_api_initialize()
+{
+ DBG_FUNC("bssgp_api_initialize",BSSGP_LAYER);
+ DBG_ENTER();
+
+ bssgp_api_msg_q = msgQCreate(BSSGP_MAX_API_MSGS_IN_Q,sizeof(BSSGP_API_MSG),MSG_Q_FIFO);
+ if (bssgp_api_msg_q == NULL) {
+ DBG_ERROR("Unable to create message queue for BSSGP !!\n");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ g_bssgp_api_initialized = TRUE;
+
+ memset(&bssgp_config,0,sizeof(bssgp_config));
+
+ if (!bssgp_api_get_config()) {
+ DBG_ERROR("Unable to get configuration values for BSSGP!\n");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ DBG_TRACE("BSSGP API interface initialized successfully\n");
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_api_handler
+ */
+void
+bssgp_api_handler()
+{
+ DBG_FUNC("bssgp_api_handler",BSSGP_LAYER);
+ DBG_ENTER();
+ BSSGP_API_MSG msg;
+
+ if (g_bssgp_api_initialized == FALSE) {
+ DBG_ERROR("BSSGP API not initialized yet!!\n");
+ DBG_LEAVE();
+ return;
+ }
+
+ memset(&msg,0,sizeof(BSSGP_API_MSG));
+
+ g_bssgp_api_task->JCTaskEnterLoop();
+ while(!g_bssgp_shutdown) {
+
+ if (msgQReceive(bssgp_api_msg_q,(char *)&msg,sizeof(BSSGP_API_MSG),WAIT_FOREVER)!=ERROR) {
+ bssgp_api_process_msg(msg);
+ }
+ else {
+ DBG_ERROR("Error receiving API msg on BSSGP API msg Q;errno %d\n",errno);
+ }
+ }
+ g_bssgp_api_task->JCTaskNormExit();
+ DBG_LEAVE();
+ return;
+}
+
+
+
+
+
+
+
+/*
+ * bssgp_api_process_msg
+ */
+void
+bssgp_api_process_msg(BSSGP_API_MSG api_msg)
+{
+ DBG_FUNC("bssgp_api_process_msg",BSSGP_LAYER);
+ DBG_ENTER();
+
+ BOOL tx_msg = TRUE;
+ BSSGP_NETWORK_QOS_LEVEL qos_reqd;
+ UINT8 *tx_buff;
+ UINT16 buff_len;
+ int buff_size_reqd=0;
+
+ buff_len = 0;
+ /*
+ * These buffer sizes required are ballpark estimates ;-)
+ */
+ if (api_msg.msg_type == BSSGP_API_MSG_UL_UNITDATA) {
+ buff_size_reqd = (api_msg.msg.ul_unitdata.pdu.data_len + 100);
+ }
+ else {
+ buff_size_reqd = 250;
+ }
+
+ tx_buff = (UINT8*)bssgp_util_get_rx_buff(buff_size_reqd);
+
+ if (!bssgp_encode_msg(&api_msg,tx_buff,&buff_len,&qos_reqd,&tx_msg)) {
+ DBG_ERROR("Error encoding msg type %s\n",bssgp_util_get_api_msg_str(api_msg.msg_type));
+ DBG_LEAVE();
+ return;
+
+ }
+
+ if (tx_msg) {
+ bssgp_net_tx_msg(qos_reqd,tx_buff,buff_len);
+ bssgp_util_return_rx_buff((char*)tx_buff);
+ }
+ if (api_msg.msg_type == BSSGP_API_MSG_UL_UNITDATA) {
+ bssgp_util_return_rx_buff((char*)api_msg.msg.ul_unitdata.pdu.data);
+ }
+
+
+ DBG_LEAVE();
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+ * bssgp_gp_initialize
+ */
+BOOL
+bssgp_gp_initialize()
+{
+ BOOL status = FALSE;
+ JC_STATUS ret_status;
+
+ status = bssgp_api_initialize();
+ if (!status) {
+ printf("Cannot initialize BSSGP API interface\n");
+ return (status);
+ }
+
+ status = bssgp_net_initialize();
+ if (!status) {
+ printf("Cannot initialize BSSGP Network interface\n");
+ return (status);
+ }
+
+
+ status = bssgp_util_init_rx_buffs();
+ if (!status) {
+ printf("Cannot initialize BSSGP Network interface\n");
+ return (status);
+ }
+
+ /* FIXME : Got to get UDT buffer configuration variables from the MIB */
+ status = bssgp_udt_initialize(BSSGP_UNITDATA_MAX_TLLI_LISTS,1000,NULL);
+ if (!status) {
+ printf("Cannot initialize BSSGP Unitdata buffers\n");
+ return (status);
+ }
+
+ /* create task instance */
+ g_bssgp_net_task = new JCTask("BSSGP_NET");
+
+ ret_status = g_bssgp_net_task->JCTaskSpawn(BSSGP_TASK_PRIORITY,
+ BSSGP_TASK_OPTION,
+ BSSGP_TASK_STACK_SIZE,
+ (FUNCPTR)bssgp_net_task,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ MODULE_BSSGP, JC_CRITICAL_TASK);
+ if(ret_status == JC_ERROR){
+ printf("[BSSGP] JCTaskSpawn returned error.\n");
+ }
+ else {
+ printf("[BSSGP] Net task spawned (tid=0x%x) \n", g_bssgp_net_task->GetTaskId());
+ g_bssgp_api_task = new JCTask("BSSGP_API");
+ ret_status = g_bssgp_api_task->JCTaskSpawn(BSSGP_TASK_PRIORITY,
+ BSSGP_TASK_OPTION,
+ BSSGP_TASK_STACK_SIZE,
+ (FUNCPTR)bssgp_api_handler,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ MODULE_BSSGP, JC_CRITICAL_TASK);
+ if(ret_status == JC_ERROR){
+ printf("[BSSGP] JCTaskSpawn returned error.\n");
+ }
+ else {
+ printf("[BSSGP] API task spawned (tid=0x%x) \n", g_bssgp_net_task->GetTaskId());
+ status = TRUE;
+ }
+ }
+
+ return (status);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+ * SysCommand_BSSGP
+ */
+int
+SysCommand_BSSGP(T_SYS_CMD action)
+{
+ int tid;
+
+ switch(action){
+
+ case SYS_SHUTDOWN:
+ printf("[BSSGP] Received system shutdown notification\n");
+ break;
+
+ case SYS_START: {
+ printf("[BSSGP] Received task start notification\n");
+ if (!bssgp_gp_initialize()) {
+ printf("Unable to initialize BSSGP task\n");
+ }
+ else {
+ printf("Initialized BSSGP task successfully\n");
+ }
+ }
+ break;
+
+ case SYS_REBOOT:
+ printf("[BSSGP] Reboot ready.\n");
+ break;
+
+ default:
+ printf("[BSSGP] Unknown system command received\n");
+ }
+ return 0;
+}
diff --git a/data/mnet/GP10/Host/bssgp/src_api/Makefile b/data/mnet/GP10/Host/bssgp/src_api/Makefile
new file mode 100644
index 0000000..5e85056
--- /dev/null
+++ b/data/mnet/GP10/Host/bssgp/src_api/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = bssgp_api
+THIS_DIRECTORY = src_api
+MY_OUTPUT = $(OBJDIR)\$(THIS_APP_DIR).out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) .\bin\*.o
+ $(RM) .\bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/bssgp/src_api/bssgp_api.cpp b/data/mnet/GP10/Host/bssgp/src_api/bssgp_api.cpp
new file mode 100644
index 0000000..28b626a
--- /dev/null
+++ b/data/mnet/GP10/Host/bssgp/src_api/bssgp_api.cpp
@@ -0,0 +1,379 @@
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : bssgp_api.cpp *
+ * *
+ * Description : API handler functions for the BSS-GP layer module *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |10/10/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include "bssgp/bssgp_prot.h"
+#include "bssgp/bssgp_util.h"
+#include "bssgp/bssgp_api.h"
+#include "bssgp/bssgp_encoder.h"
+#include "bssgp/bssgp_net.h"
+
+/* common for all platforms */
+#include "Os/JCModule.h"
+#include "Os/JCTask.h"
+#include "Os/JCMsgQueue.h"
+
+/* common for GS */
+#include "GP10OsTune.h"
+#include "GP10MsgTypes.h"
+#include "MnetModuleId.h"
+
+
+
+
+
+/*
+ * Global variables are declared here
+ */
+MSG_Q_ID bssgp_api_msg_q;
+BOOL g_bssgp_shutdown=FALSE, g_bssgp_api_initialized = FALSE;
+BSSGP_NET_CONFIG bssgp_net_config;
+BSSGP_CONFIGURATION bssgp_config;
+
+
+/*
+ * !!!!! FIXME : FIXME : FIXME : FIXME : FIXME : FIXME : FIXME : FIXME !!!!!
+ *
+ * Right now we are going to allocate memory buffers ourselves here, but
+ * in a short while we should change to using ZBufs
+ *
+ */
+#define BSSGP_UTIL_MAX_BUFFS_PER_SIZE 100
+#define BSSGP_BUFF_MAGIC 0x456
+
+typedef struct {
+
+ BOOL used;
+ int magic;
+ UINT8 buff[256];
+
+} BSSGP_RX_BUFF_256;
+
+
+typedef struct {
+
+ BOOL used;
+ int magic;
+ UINT8 buff[512];
+
+} BSSGP_RX_BUFF_512;
+
+typedef struct {
+
+ BOOL used;
+ int magic;
+ UINT8 buff[1500];
+
+} BSSGP_RX_BUFF_1500;
+
+
+static BSSGP_RX_BUFF_256 *rx_buffs_256[BSSGP_UTIL_MAX_BUFFS_PER_SIZE];
+static BSSGP_RX_BUFF_512 *rx_buffs_512[BSSGP_UTIL_MAX_BUFFS_PER_SIZE];
+static BSSGP_RX_BUFF_1500 *rx_buffs_1500[BSSGP_UTIL_MAX_BUFFS_PER_SIZE];
+
+
+
+/*
+ * bssgp_api_send_msg
+ *
+ * Notes : main api function for sending msgs via
+ * BSSGP from GS to GP-10 and vice versa
+ */
+BOOL
+bssgp_api_send_msg(BSSGP_API_MSG msg)
+{
+ DBG_FUNC("bssgp_api_send_msg",BSSGP_LAYER);
+ DBG_ENTER();
+ BOOL status = FALSE;
+
+ if (g_bssgp_api_initialized == FALSE) {
+ DBG_ERROR("BSSGP API not initialized yet!!");
+ DBG_LEAVE();
+ return(status);
+ }
+
+ if (msg.magic != BSSGP_MAGIC) {
+ DBG_ERROR("BSSGP API message invalid!");
+ DBG_LEAVE();
+ return (status);
+ }
+
+ if ((msg.msg_type < BSSGP_API_MSG_DL_UNITDATA) || (msg.msg_type >= BSSGP_API_MAX_MSGS)) {
+ DBG_TRACE("Invalid BSSGP API Message %d received",msg.msg_type);
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ else {
+ DBG_TRACE("Received BSSGP API Message %s",bssgp_util_get_api_msg_str(msg.msg_type));
+ }
+
+
+
+ status = TRUE;
+ /* fixme : need to check msgqsend status */
+ msgQSend(bssgp_api_msg_q,(char *)&msg,sizeof(BSSGP_API_MSG),NO_WAIT,MSG_PRI_NORMAL);
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+
+
+
+
+
+
+
+/*
+ * bssgp_util_init_rx_buffs
+ */
+BOOL
+bssgp_util_init_rx_buffs()
+{
+ DBG_FUNC("bssgp_util_init_rx_buffs",BSSGP_LAYER);
+ DBG_ENTER();
+ int count,reverse_count;
+
+
+ for(count=0;count<BSSGP_UTIL_MAX_BUFFS_PER_SIZE;count++) {
+
+ rx_buffs_256[count] = (BSSGP_RX_BUFF_256 *)malloc(sizeof(BSSGP_RX_BUFF_256));
+ if (rx_buffs_256[count] == NULL) {
+ DBG_ERROR("Unable to allocate 256 byte buffer number %d for buff pool",count);
+ for(reverse_count=count-1;reverse_count>=0;reverse_count--) {
+ free(rx_buffs_256[reverse_count]);
+ }
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ rx_buffs_256[count]->used = FALSE;
+ rx_buffs_256[count]->magic = BSSGP_BUFF_MAGIC;
+
+ rx_buffs_512[count] = (BSSGP_RX_BUFF_512 *)malloc(sizeof(BSSGP_RX_BUFF_512));
+ if (rx_buffs_512[count] == NULL) {
+ DBG_ERROR("Unable to allocate 512 byte buffer number %d for buff pool",count);
+ free(rx_buffs_256[count]);
+ for(reverse_count=count-1;reverse_count>=0;reverse_count--) {
+ free(rx_buffs_512[reverse_count]);
+ free(rx_buffs_256[reverse_count]);
+ }
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ rx_buffs_512[count]->used = FALSE;
+ rx_buffs_512[count]->magic = BSSGP_BUFF_MAGIC;
+
+
+ rx_buffs_1500[count] = (BSSGP_RX_BUFF_1500 *)malloc(sizeof(BSSGP_RX_BUFF_1500));
+ if (rx_buffs_1500[count] == NULL) {
+ DBG_ERROR("Unable to allocate 1500 byte buffer number %d for buff pool",count);
+ free(rx_buffs_256[count]);
+ free(rx_buffs_512[count]);
+ for(reverse_count=count-1;reverse_count>=0;reverse_count--) {
+ free(rx_buffs_1500[reverse_count]);
+ free(rx_buffs_512[reverse_count]);
+ free(rx_buffs_256[reverse_count]);
+ }
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ rx_buffs_1500[count]->used = FALSE;
+ rx_buffs_1500[count]->magic = BSSGP_BUFF_MAGIC;
+
+
+ }
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+
+/*
+ * bssgp_util_get_rx_buff
+ */
+char *
+bssgp_util_get_rx_buff(int buff_size_reqd)
+{
+ DBG_FUNC("bssgp_util_get_rx_buff",BSSGP_LAYER);
+ DBG_ENTER();
+ int count;
+ if (buff_size_reqd <= 256) {
+ for(count=0;count<BSSGP_UTIL_MAX_BUFFS_PER_SIZE;count++) {
+ if (rx_buffs_256[count]->used == FALSE) {
+ rx_buffs_256[count]->used = TRUE;
+ rx_buffs_256[count]->magic = BSSGP_BUFF_MAGIC;
+ DBG_LEAVE();
+ return ((char*)rx_buffs_256[count]->buff);
+ }
+ }
+ }
+ if (buff_size_reqd <= 512) {
+ for(count=0;count<BSSGP_UTIL_MAX_BUFFS_PER_SIZE;count++) {
+ if (rx_buffs_512[count]->used == FALSE) {
+ rx_buffs_512[count]->used = TRUE;
+ rx_buffs_512[count]->magic = BSSGP_BUFF_MAGIC;
+ DBG_LEAVE();
+ return ((char*)rx_buffs_512[count]->buff);
+ }
+ }
+ }
+
+ if (buff_size_reqd <= 1500) {
+ for(count=0;count<BSSGP_UTIL_MAX_BUFFS_PER_SIZE;count++) {
+ if (rx_buffs_1500[count]->used == FALSE) {
+ rx_buffs_1500[count]->used = TRUE;
+ rx_buffs_1500[count]->magic = BSSGP_BUFF_MAGIC;
+ DBG_LEAVE();
+ return ((char*)rx_buffs_1500[count]->buff);
+ }
+ }
+ }
+
+ if (buff_size_reqd > 1500) {
+ DBG_ERROR("Requesting buffer size greater than 1500; %d",buff_size_reqd);
+ }
+ else {
+ DBG_ERROR("Exhausted all buffers in memory pool");
+ }
+
+ DBG_LEAVE();
+ return ((char*)NULL);
+}
+
+
+/*
+ * bssgp_util_return_rx_buff
+ */
+void
+bssgp_util_return_rx_buff(char *buff)
+{
+ int negative_offset;
+ BSSGP_RX_BUFF_256 *rx_buff;
+ negative_offset = offsetof(BSSGP_RX_BUFF_256,buff);
+ rx_buff = (BSSGP_RX_BUFF_256*)&buff[-negative_offset];
+ if (rx_buff->magic == BSSGP_BUFF_MAGIC) {
+ rx_buff->used = FALSE;
+ }
+ else {
+ printf("Buffer mgmt error, ptr buff %x, rx_buff %x!",buff,rx_buff);
+ }
+}
+
+
+/*
+ * bssgp_util_get_api_msg_str
+ */
+char *
+bssgp_util_get_api_msg_str(BSSGP_API_MSG_TYPE api_msg)
+{
+ static char *api_msg_str[] = {
+ "Downlink Unitdata",
+ "Uplink Unitdata",
+ "Paging",
+ "Radio Status",
+ "Suspend",
+ "Suspend Ack",
+ "Suspend Nack",
+ "Resume",
+ "Resume Ack",
+ "Resume Nack",
+ "Location Update",
+ "Location Update Ack",
+ "Location Update Nack"
+ };
+ if ((api_msg >= 0) && (api_msg < BSSGP_API_MAX_MSGS)) {
+ return (api_msg_str[api_msg]);
+ }
+ else {
+ return ("Unknown Message");
+ }
+
+}
+
+
+/*
+ * bssgp_net_get_bvci_by_ip
+ */
+BSSGP_BVCI
+bssgp_net_get_bvci_by_ip(char *ip_addr)
+{
+ DBG_FUNC("bssgp_net_get_bvci_by_ip",BSSGP_NET_LAYER);
+ DBG_ENTER();
+ BSSGP_BVCI bvci = BSSGP_MAX_BVCI;
+ unsigned short count;
+
+ for (count=0;count<BSSGP_MAX_BVCI;count++) {
+ if (bssgp_net_config.bvci_list[count].used == TRUE) {
+ if (strcmp(bssgp_net_config.bvci_list[count].peer_ip_addr,ip_addr)==0) {
+ bvci = count;
+ DBG_LEAVE();
+ return(bvci);
+ }
+ }
+ else continue;
+ }
+ DBG_ERROR("Could not find BVCI for IP address %s",ip_addr);
+ DBG_LEAVE();
+ return (bvci);
+}
+
+/*
+ * bssgp_net_add_bvci
+ */
+BSSGP_BVCI
+bssgp_net_add_bvci(char *peer_ip_addr, T_CNI_RIL3_IE_CELL_ID cell_id,UINT8 rac)
+{
+ DBG_FUNC("bssgp_net_add_bvci",BSSGP_NET_LAYER);
+ DBG_ENTER();
+ BSSGP_BVCI bvci = BSSGP_MAX_BVCI;
+ strcpy(bssgp_net_config.bvci_list[BSSGP_ROOT_BVCI].peer_ip_addr,peer_ip_addr);
+ bssgp_net_config.bvci_list[BSSGP_ROOT_BVCI].used = TRUE;
+ bssgp_net_config.bvci_list[BSSGP_ROOT_BVCI].cell_id.ie_present = TRUE;
+ bssgp_net_config.bvci_list[BSSGP_ROOT_BVCI].cell_id.value = cell_id.value;
+ bssgp_net_config.bvci_list[BSSGP_ROOT_BVCI].routing_area_code = rac;
+
+ DBG_TRACE("Added Root BVCI : IP %s, Cell-ID %d, RAC %d ",
+ bssgp_net_config.bvci_list[BSSGP_ROOT_BVCI].peer_ip_addr,
+ bssgp_net_config.bvci_list[BSSGP_ROOT_BVCI].cell_id.value,
+ bssgp_net_config.bvci_list[BSSGP_ROOT_BVCI].routing_area_code
+ );
+
+
+ DBG_LEAVE();
+ return (bvci);
+}
+
+
+
+/*
+ * bssgp_net_get_ip_by_bvci
+ */
+char *
+bssgp_net_get_ip_by_bvci(BSSGP_BVCI bvci)
+{
+ DBG_FUNC("bssgp_net_get_ip_by_bvci",BSSGP_NET_LAYER);
+ DBG_ENTER();
+ DBG_ERROR("BSSGP : bssgp_net_get_ip_by_bvci not implemented!\n");
+ DBG_LEAVE();
+ return(NULL);
+}
+
diff --git a/data/mnet/GP10/Host/bssgp/src_api/bssgp_unitdata.cpp b/data/mnet/GP10/Host/bssgp/src_api/bssgp_unitdata.cpp
new file mode 100644
index 0000000..6bba50a
--- /dev/null
+++ b/data/mnet/GP10/Host/bssgp/src_api/bssgp_unitdata.cpp
@@ -0,0 +1,1288 @@
+/****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : bssgp_unitdata.cpp *
+ * *
+ * Description : Routines for manipulation of the unitdata buffers *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |10/10/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "bssgp/bssgp_prot.h"
+#include "bssgp/bssgp_util.h"
+#include "bssgp/bssgp_unitdata.h"
+#include "rlc_mac/rlcmacintf.h"
+
+
+/*
+ * TO DO : TO DO : TO DO : TO DO : TO DO : IMPLEMENT LOCKS FOR THE QUEUES !!!!!
+ *
+ *
+ *
+ *
+ *
+ */
+
+/*
+ * Here is how this Queues data structure looks :
+ *
+ *
+ *
+ *
+ *
+ * (head) (tail)
+ * |------------| |------------| |------------|
+ * |--- QOS 1 ----| UDT BUFF 1 |---| UDT BUFF 2 |.........---| UDT BUFF N |
+ * | |------------| |------------| |------------|
+ * |
+ * | |------------|
+ * |--------| |--- QOS 2 ----| UDT BUFF 1 |
+ * | | | |------------|
+ * | TLLI 1 |--|
+ * | (head) | | |------------|
+ * |--------| |--- QOS 3 ----| UDT BUFF 1 |
+ * . | |------------|
+ * . |
+ * . | |------------|
+ * . |--- QOS 4 ----| UDT BUFF 1 |
+ * . |------------|
+ * .
+ * . (head) (tail)
+ * . |------------| |------------| |------------|
+ * . |--- QOS 1 ----| UDT BUFF 1 |---| UDT BUFF 2 |.........---| UDT BUFF N |
+ * . | |------------| |------------| |------------|
+ * . |
+ * . | |------------|
+ * |--------| |--- QOS 2 ----| UDT BUFF 1 |
+ * | | | |------------|
+ * | TLLI N |--|
+ * | (tail) | | |------------|
+ * |--------| |--- QOS 3 ----| UDT BUFF 1 |
+ * | |------------|
+ * |
+ * | |------------|
+ * |--- QOS 4 ----| UDT BUFF 1 |
+ * |------------|
+ *
+ *
+ *
+ */
+
+static BSSGP_UNITDATA_CONFIG *bssgp_udt_config=NULL;
+
+
+
+
+/*
+ * bssgp_udt_initialize
+ */
+BOOL
+bssgp_udt_initialize(int tlli_list_count,int bssgp_udt_buffer_count,BSSGP_UDT_WATERMARK_CB watermark_cb)
+{
+ DBG_FUNC("bssgp_udt_initialize",BSSGP_UNITDATA_LAYER);
+ DBG_ENTER();
+ BOOL status = FALSE;
+
+ if (bssgp_udt_config != NULL)
+ {
+ DBG_ERROR("UDT layer already initialized\n");
+ DBG_LEAVE();
+ return (status);
+ }
+ /* allocate the configuration structure */
+ bssgp_udt_config = (BSSGP_UNITDATA_CONFIG*)malloc(sizeof(BSSGP_UNITDATA_CONFIG));
+ if (bssgp_udt_config == NULL)
+ {
+ DBG_ERROR("UDT layer already initialized\n");
+ DBG_LEAVE();
+ return (status);
+ }
+ memset(bssgp_udt_config,0,sizeof(BSSGP_UNITDATA_CONFIG));
+ bssgp_udt_config->tlli_list_count = tlli_list_count;
+ bssgp_udt_config->udt_buff_count = bssgp_udt_buffer_count;
+ bssgp_udt_config->watermark_cb = watermark_cb;
+ /* FIXME : Got to retrieve these values from the MIB later on */
+ bssgp_udt_config->tlli_low_watermark_bytes = 8092;
+ bssgp_udt_config->tlli_high_watermark_bytes = 10240;
+
+
+ DBG_TRACE("%d UDT buffers specified, %d TLLI lists specified in pool\n",
+ tlli_list_count,bssgp_udt_buffer_count);
+
+
+ if (!bssgp_udt_allocate_buff_pool())
+ {
+ DBG_ERROR("Unable to allocate buffer pool\n");
+ free(bssgp_udt_config);
+ bssgp_udt_config = NULL;
+ DBG_LEAVE();
+ return (status);
+ }
+ DBG_TRACE("Allocated the UDT buffer pool\n");
+ if (!bssgp_udt_allocate_tlli_pool())
+ {
+ DBG_ERROR("Unable to allocate TLLI list pool\n");
+ bssgp_udt_free_buff_pool();
+ free(bssgp_udt_config);
+ bssgp_udt_config = NULL;
+ DBG_LEAVE();
+ return (status);
+ }
+ else
+ {
+ status = TRUE;
+ }
+
+ DBG_TRACE("Allocated the TLLI lists pool\n");
+ DBG_TRACE("Unitdata layer initialized successfully\n");
+ DBG_LEAVE();
+ return (status);
+}
+
+
+
+
+/*
+ * bssgp_udt_shutdown
+ */
+void
+bssgp_udt_shutdown()
+{
+ DBG_FUNC("bssgp_udt_shutdown",BSSGP_UNITDATA_LAYER);
+ DBG_ENTER();
+
+ /*
+ * Need to put in checks for verifying everything has been cleaned up
+ */
+ bssgp_udt_free_tlli_pool();
+
+ bssgp_udt_free_buff_pool();
+
+ free(bssgp_udt_config);
+ bssgp_udt_config = NULL;
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+
+
+/*
+ * bssgp_udt_put_buffer_in_q
+ */
+BOOL
+bssgp_udt_put_buffer_in_q(TLLI tlli,BSSGP_NETWORK_QOS_LEVEL qos_level,UINT8 *buff, int buff_size,BSSGP_DL_UNITDATA_MSG dl_unitdata)
+{
+ DBG_FUNC("bssgp_udt_put_buffer_in_q",BSSGP_UNITDATA_LAYER);
+ DBG_ENTER();
+ BOOL status= FALSE;
+ PBSSGP_UDT_BUFFER udt_buff;
+ PBSSGP_UDT_TLLI_Q tlli_q;
+
+
+ udt_buff = (PBSSGP_UDT_BUFFER)bssgp_udt_get_buff_from_pool();
+ if (udt_buff == NULL)
+ {
+ DBG_ERROR("No more UDT buffers available in pool!\n");
+ DBG_LEAVE();
+ return (status);
+ }
+ DBG_TRACE("Using UDT buff %#x\n",udt_buff);
+
+ udt_buff->data = buff;
+ udt_buff->data_size = buff_size;
+ memcpy(&udt_buff->dl_unitdata,&dl_unitdata,sizeof(dl_unitdata));
+ udt_buff->dl_unitdata.pdu.data = buff;
+ udt_buff->dl_unitdata.pdu.data_len = buff_size;
+
+
+ /*
+ * Initially, two possibilities : (1) either there are no TLLI Qs
+ * or (2) there is atleast one TLLI Q
+ */
+ if (bssgp_udt_config->tlli_q_head == NULL)
+ {
+ /*
+ * No TLLI Qs present case:
+ */
+ DBG_TRACE("No TLLI Qs present, will add one\n");
+ tlli_q = bssgp_udt_get_tlli_list_from_pool();
+ if (tlli_q == NULL)
+ {
+ DBG_ERROR("Cannot allocate TLLI List from pool!\n");
+ bssgp_udt_return_buff_to_pool(udt_buff);
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ DBG_TRACE("Using TLLI Q-List %#x\n",tlli_q);
+ bssgp_udt_config->tlli_q_head = tlli_q;
+ bssgp_udt_config->tlli_q_tail = tlli_q;
+ tlli_q->prev = NULL;
+ tlli_q->next = NULL;
+ tlli_q->tlli = tlli;
+ /* Stick it in the appropriate QoS level q */
+ tlli_q->qos_queues[qos_level].qos_level = qos_level;
+ /* This fella would be the first */
+ tlli_q->qos_queues[qos_level].buff_list_head = udt_buff;
+ tlli_q->qos_queues[qos_level].buff_list_tail = udt_buff;
+ udt_buff->prev = NULL;
+ udt_buff->next = NULL;
+ /* FIXME : Check return status here */
+ RlcMacBssgpUnitDataRequest(&dl_unitdata);
+
+
+ }
+ else
+ {
+ /*
+ * One or more TLLI Qs present case; so now there are two
+ * possibilities again; either (1) this TLLI is one which
+ * already has a Q or (2) we need to create a Q for this TLLI
+ */
+ if (bssgp_udt_config->tlli_q_head == NULL)
+ {
+ DBG_ERROR("BSSGP: ERROR-Queue head is null!\n");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ tlli_q = bssgp_udt_config->tlli_q_head;
+ while ((tlli_q->next != NULL) && (tlli_q->tlli != tlli))
+ {
+ tlli_q = tlli_q->next;
+ }
+ if (tlli_q->tlli == tlli)
+ {
+ /*
+ * Found the sucker, stick this guy into the right place
+ */
+
+ DBG_TRACE("Found Q for TLLI %#x\n",tlli_q->tlli);
+ /*
+ * First check whether hi watermark has been indicated
+ * and if so whether we have a callback function; otherwise
+ * we need to drop it onto the floor
+ */
+ if ( (tlli_q->high_watermark_indicated) && (bssgp_udt_config->watermark_cb == NULL))
+ {
+ DBG_ERROR("High watermark reached for this TLLI %#x, RX Bytes %d, buff count %d, dropping buffer\n",
+ tlli_q->tlli,tlli_q->rx_bytes,tlli_q->buff_count);
+ bssgp_udt_return_buff_to_pool(udt_buff);
+ DBG_LEAVE();
+ return (FALSE);
+ }
+
+ /* Now again two cases, there might be no buffers in this
+ * Q or there might be some
+ */
+ if (tlli_q->qos_queues[qos_level].buff_list_head == NULL)
+ {
+ DBG_TRACE("No buffers in Q for TLLI %#x, will send ping to RLC\n",tlli_q->tlli);
+ /* this guy becomes both the head n the tail */
+ tlli_q->qos_queues[qos_level].buff_list_head = udt_buff;
+ tlli_q->qos_queues[qos_level].buff_list_tail = udt_buff;
+ udt_buff->prev = NULL;
+ udt_buff->next = NULL;
+ /* FIXME : Check return status here */
+ RlcMacBssgpUnitDataRequest(&dl_unitdata);
+
+ }
+ else
+ {
+ DBG_TRACE("%d buffers : %d bytes present in Q for TLLI %#x, will NOT send ping to RLC\n",
+ tlli_q->qos_queues[qos_level].buff_count,tlli_q->qos_queues[qos_level].rx_bytes,
+ tlli_q->tlli);
+ /* this guy becomes the new tail */
+ udt_buff->prev = tlli_q->qos_queues[qos_level].buff_list_tail;
+ (tlli_q->qos_queues[qos_level].buff_list_tail)->next = udt_buff;
+ udt_buff->next = NULL;
+ tlli_q->qos_queues[qos_level].buff_list_tail = udt_buff;
+ }
+ }
+ else if (tlli_q->next == NULL)
+ {
+ DBG_TRACE("No Q for TLLI %#x, will allocate new one & ping RLC\n",tlli_q->tlli);
+ /*
+ * Duh, this tlli aint there, so grab a new one & stick it in
+ */
+ tlli_q = bssgp_udt_get_tlli_list_from_pool();
+ if (tlli_q == NULL)
+ {
+ DBG_ERROR("Cannot allocate TLLI List from pool!\n");
+ bssgp_udt_return_buff_to_pool(udt_buff);
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ DBG_TRACE("Using TLLI Q-List %#x\n",tlli_q);
+ /* stick this TLLI list to the bottom */
+ tlli_q->prev = bssgp_udt_config->tlli_q_tail;
+ (bssgp_udt_config->tlli_q_tail)->next = tlli_q;
+ tlli_q->next = NULL;
+ bssgp_udt_config->tlli_q_tail = tlli_q;
+ tlli_q->tlli = tlli;
+ /* Stick it in the appropriate QoS level q */
+ tlli_q->qos_queues[qos_level].qos_level = qos_level;
+ /* This fella would be the first in the QoS level list */
+ tlli_q->qos_queues[qos_level].buff_list_head = udt_buff;
+ tlli_q->qos_queues[qos_level].buff_list_tail = udt_buff;
+ udt_buff->prev = NULL;
+ udt_buff->next = NULL;
+ /* FIXME : Check return status here */
+ RlcMacBssgpUnitDataRequest(&dl_unitdata);
+
+ }
+ }
+
+
+ status = TRUE;
+ /* Update all the counters */
+ tlli_q->qos_queues[qos_level].buff_count++;
+ tlli_q->qos_queues[qos_level].rx_bytes += buff_size;
+
+ tlli_q->buff_count++;
+ tlli_q->rx_bytes += buff_size;
+ if (tlli_q->rx_bytes >= bssgp_udt_config->tlli_high_watermark_bytes)
+ {
+ tlli_q->high_watermark_indicated = TRUE;
+ /*
+ *
+ */
+ if (bssgp_udt_config->watermark_cb != NULL)
+ {
+ (*bssgp_udt_config->watermark_cb)(tlli_q->tlli,tlli_q->rx_bytes,tlli_q->buff_count,TRUE);
+ }
+ }
+
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+
+/*
+ * bssgp_udt_get_buff_by_tlli
+ */
+UINT8 *
+bssgp_udt_get_buff_by_tlli(TLLI tlli, BSSGP_DL_UNITDATA_MSG *dl_unitdata)
+{
+ DBG_FUNC("bssgp_udt_get_buff_by_tlli",BSSGP_UNITDATA_LAYER);
+ DBG_ENTER();
+ UINT8 *buff = NULL;
+ int count;
+ PBSSGP_UDT_TLLI_Q tlli_q;
+ PBSSGP_UDT_BUFFER udt_buff;
+
+ tlli_q = bssgp_udt_config->tlli_q_head;
+ if (tlli_q == NULL)
+ {
+ DBG_ERROR("No TLLI lists present\n");
+ DBG_LEAVE();
+ return NULL;
+ }
+ while( (tlli_q->next != NULL) && (tlli_q->tlli != tlli) )
+ {
+ tlli_q = tlli_q->next;
+ }
+ if (tlli_q->tlli == tlli)
+ {
+ /* Found the tlli list */
+ if (tlli_q->buff_count == 0)
+ {
+ DBG_TRACE("No buffers in Q for TLLI %#x\n",tlli);
+ }
+ else
+ {
+ /* Start by looking for the highest QoS level */
+ for(count=0;count<BSSGP_MAX_NETWORK_QOS_LEVELS;count++)
+ {
+ if (tlli_q->qos_queues[count].buff_count == 0) continue;
+ else
+ {
+ udt_buff = tlli_q->qos_queues[count].buff_list_head;
+ if (udt_buff == NULL)
+ {
+ DBG_ERROR("BSSGP: ERROR-Queue head is null!\n");
+ DBG_LEAVE();
+ return (NULL);
+ }
+ if (udt_buff->next != NULL)
+ {
+ /* move the head */
+ tlli_q->qos_queues[count].buff_list_head = udt_buff->next;
+ (udt_buff->next)->prev = NULL;
+ }
+ else
+ {
+ /* nothing left now */
+ tlli_q->qos_queues[count].buff_list_head =
+ tlli_q->qos_queues[count].buff_list_tail = NULL;
+ }
+ tlli_q->qos_queues[count].buff_count--;
+ tlli_q->qos_queues[count].rx_bytes -= udt_buff->data_size;
+ tlli_q->buff_count--;
+ tlli_q->rx_bytes -= udt_buff->data_size;
+ if ( (tlli_q->rx_bytes <= bssgp_udt_config->tlli_low_watermark_bytes) &&
+ (tlli_q->high_watermark_indicated) )
+ {
+ if (bssgp_udt_config->watermark_cb != NULL)
+ {
+ (*bssgp_udt_config->watermark_cb)(tlli_q->tlli,tlli_q->rx_bytes,tlli_q->buff_count,FALSE);
+ }
+ DBG_TRACE("Clearing out High Watermark flag for TLLI %#x\n",tlli_q->tlli);
+ tlli_q->high_watermark_indicated = FALSE;
+
+ }
+ buff = (UINT8*)udt_buff->data;
+ memcpy(dl_unitdata,&udt_buff->dl_unitdata,sizeof(BSSGP_DL_UNITDATA_MSG));
+ bssgp_udt_return_buff_to_pool(udt_buff);
+ if (tlli_q->buff_count == 0)
+ {
+ /*
+ * Nothing else in this TLLI's Q, so start a timer to wait for
+ * a while, and if still nothing is there remove the list
+ * and stick it back into the available pool
+ */
+ /* TO DO : Timer for returning lists to pool */
+ }
+ break;
+ }
+ } /* End of for loop */
+ } /* end of else if tlli_q->buff_count == 0 */
+
+ }
+ else
+ {
+ /* Could not find a list for this TLLI */
+ DBG_WARNING("No Q for TLLI %#x\n",tlli);
+ }
+
+
+
+
+ DBG_LEAVE();
+ return(buff);
+}
+
+
+/*
+ * bssgp_udt_get_buff_by_qos
+ *
+ * This function searches thru all the TLLI lists
+ * to find any PDU at this QoS level; and if found
+ * returns it. However, to make sure that this search,
+ * if conducted repeatedly, has some round-robin method
+ * in it w.r.t. TLLIs (the search shouldnt hit the same TLLI
+ * constantly if other TLLIs have PDUs with the same QoS);
+ * this TLLI list is extracted and stuck to the bottom of the
+ * TLLI list linked list, so that next time this TLLI list
+ * would be the last one searched
+ */
+UINT8 *
+bssgp_udt_get_buff_by_qos(BSSGP_NETWORK_QOS_LEVEL qos_level,BSSGP_DL_UNITDATA_MSG *dl_unitdata)
+{
+ DBG_FUNC("bssgp_udt_get_buff_by_qos",BSSGP_UNITDATA_LAYER);
+ DBG_ENTER();
+ UINT8 *buff = NULL;
+ PBSSGP_UDT_TLLI_Q tlli_q;
+ PBSSGP_UDT_BUFFER udt_buff;
+
+ tlli_q = bssgp_udt_config->tlli_q_head;
+ if (tlli_q == NULL)
+ {
+ DBG_ERROR("No TLLI lists present\n");
+ DBG_LEAVE();
+ return NULL;
+ }
+ while (tlli_q->next != NULL)
+ {
+ if (tlli_q->buff_count > 0)
+ {
+ if (tlli_q->qos_queues[qos_level].buff_count > 0)
+ {
+ /*
+ * OK, we found a TLLI which has a buffered PDU with this QoS level
+ * so extract it first
+ */
+ if (tlli_q->qos_queues[qos_level].buff_list_head == NULL)
+ {
+ DBG_ERROR("BSSGP: ERROR-Queue head is null!\n");
+ DBG_LEAVE();
+ return (NULL);
+ }
+ udt_buff = tlli_q->qos_queues[qos_level].buff_list_head;
+ if (udt_buff->next != NULL)
+ {
+ tlli_q->qos_queues[qos_level].buff_list_head = udt_buff->next;
+ (udt_buff->next)->prev = NULL;
+ }
+ else
+ {
+ tlli_q->qos_queues[qos_level].buff_list_head =
+ tlli_q->qos_queues[qos_level].buff_list_tail = NULL;
+ }
+ tlli_q->qos_queues[qos_level].buff_count--;
+ tlli_q->qos_queues[qos_level].rx_bytes -= udt_buff->data_size;
+ tlli_q->buff_count--;
+ tlli_q->rx_bytes -= udt_buff->data_size;
+ if ( (tlli_q->rx_bytes <= bssgp_udt_config->tlli_low_watermark_bytes) &&
+ (tlli_q->high_watermark_indicated) )
+ {
+ if (bssgp_udt_config->watermark_cb != NULL)
+ {
+ (*bssgp_udt_config->watermark_cb)(tlli_q->tlli,tlli_q->rx_bytes,tlli_q->buff_count,FALSE);
+ }
+
+ }
+ buff = (UINT8*)udt_buff->data;
+ memcpy(dl_unitdata,&udt_buff->dl_unitdata,sizeof(BSSGP_DL_UNITDATA_MSG));
+ bssgp_udt_return_buff_to_pool(udt_buff);
+ /*
+ * Now manipulate the TLLI linked list table so that
+ * this TLLI list is at the end of the linked list
+ * Four cases here:
+ * (1) it is at the head, but not the tail
+ * (2) it is at the tail, but not at the head
+ * (3) it is both the head & the tail
+ * (4) it is neither the head nor the tail
+ * For cases (1) & (4), we need to move it to the tail of the list;
+ * and for cases (2) & (3), we dont need to do anything for obvious reasons
+ */
+ /* case (3) above */
+ if ((tlli_q != bssgp_udt_config->tlli_q_head) && (tlli_q != bssgp_udt_config->tlli_q_tail))
+ {
+ (tlli_q->prev)->next = tlli_q->next;
+ (tlli_q->next)->prev = tlli_q->prev;
+ /* move the tail */
+ tlli_q->prev = bssgp_udt_config->tlli_q_tail;
+ (bssgp_udt_config->tlli_q_tail)->next = tlli_q;
+ tlli_q->next = NULL;
+ bssgp_udt_config->tlli_q_tail = tlli_q;
+ }
+ /* case (1) above */
+ else if ((tlli_q == bssgp_udt_config->tlli_q_head) && (tlli_q != bssgp_udt_config->tlli_q_tail))
+ {
+ bssgp_udt_config->tlli_q_head = tlli_q->next;
+ (bssgp_udt_config->tlli_q_head)->prev = NULL;
+ tlli_q->prev = bssgp_udt_config->tlli_q_tail;
+ (bssgp_udt_config->tlli_q_tail)->next = tlli_q;
+ bssgp_udt_config->tlli_q_tail = tlli_q;
+ tlli_q->next = NULL;
+ }
+ DBG_LEAVE();
+ return (buff);
+
+ }
+ }
+ /* code should fall through here and we should switch to the next TLLI list */
+ tlli_q = tlli_q->next;
+ }
+
+
+
+ DBG_LEAVE();
+ return(buff);
+}
+
+
+/*
+ * bssgp_udt_get_buff_by_tlli_qos
+ */
+UINT8 *
+bssgp_udt_get_buff_by_tlli_qos(TLLI tlli, BSSGP_NETWORK_QOS_LEVEL qos_level,BSSGP_DL_UNITDATA_MSG *dl_unitdata)
+{
+ DBG_FUNC("bssgp_udt_get_buff_by_tlli_qos",BSSGP_UNITDATA_LAYER);
+ DBG_ENTER();
+ UINT8 *buff = NULL;
+ PBSSGP_UDT_TLLI_Q tlli_q;
+ PBSSGP_UDT_BUFFER udt_buff;
+
+ tlli_q = bssgp_udt_config->tlli_q_head;
+ if (tlli_q == NULL)
+ {
+ DBG_ERROR("No TLLI lists present\n");
+ DBG_LEAVE();
+ return NULL;
+ }
+ while( (tlli_q->next != NULL) && (tlli_q->tlli != tlli) )
+ {
+ tlli_q = tlli_q->next;
+ }
+ if (tlli_q->tlli == tlli)
+ {
+ /* Found the tlli list */
+ if (tlli_q->buff_count == 0)
+ {
+ DBG_TRACE("No buffers in Q for TLLI %#x\n",tlli);
+ }
+ else
+ {
+ if (tlli_q->qos_queues[qos_level].buff_count == 0)
+ {
+ DBG_TRACE("No buffers in Q for TLLI %#x at QoS level %d\n",tlli,qos_level);
+ }
+ else {
+ udt_buff = tlli_q->qos_queues[qos_level].buff_list_head;
+ if (udt_buff == NULL)
+ {
+ DBG_ERROR("BSSGP: ERROR-Queue head is null!\n");
+ DBG_LEAVE();
+ return (NULL);
+ }
+ if (udt_buff->next != NULL)
+ {
+ /* Shift the head of the buff list */
+ tlli_q->qos_queues[qos_level].buff_list_head = udt_buff->next;
+ (udt_buff->next)->prev = NULL;
+ }
+ else
+ {
+ /* nothin left in the buff list */
+ tlli_q->qos_queues[qos_level].buff_list_head =
+ tlli_q->qos_queues[qos_level].buff_list_tail = NULL;
+ }
+ tlli_q->qos_queues[qos_level].buff_count--;
+ tlli_q->qos_queues[qos_level].rx_bytes -= udt_buff->data_size;
+ tlli_q->buff_count--;
+ tlli_q->rx_bytes -= udt_buff->data_size;
+ if ( (tlli_q->rx_bytes <= bssgp_udt_config->tlli_low_watermark_bytes) &&
+ (tlli_q->high_watermark_indicated) )
+ {
+ if (bssgp_udt_config->watermark_cb != NULL)
+ {
+ (*bssgp_udt_config->watermark_cb)(tlli_q->tlli,tlli_q->rx_bytes,tlli_q->buff_count,FALSE);
+ }
+
+ }
+ buff = (UINT8*)udt_buff->data;
+ memcpy(dl_unitdata,&udt_buff->dl_unitdata,sizeof(BSSGP_DL_UNITDATA_MSG));
+ bssgp_udt_return_buff_to_pool(udt_buff);
+ if (tlli_q->buff_count == 0)
+ {
+ /*
+ * Nothing else in this TLLI's Q, so start a timer to wait for
+ * a while, and if still nothing is there remove the list
+ * and stick it back into the available pool
+ */
+ /* TO DO : Timer for returning lists to pool */
+ }
+
+ DBG_LEAVE();
+ return (buff);
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return(buff);
+}
+
+
+
+
+
+
+
+
+/*
+ * bssgp_udt_check_buff_by_tlli
+ *
+ * This functions checks the lists/qs to see if there are ANY buffers
+ * in the list/q for this particular TLLI; returns TRUE if there atleast
+ * one, FALSE otherwise
+ *
+ */
+BOOL
+bssgp_udt_check_buff_by_tlli(TLLI tlli, BSSGP_DL_UNITDATA_MSG **dl_unitdata)
+{
+ DBG_FUNC("bssgp_udt_check_buff_by_tlli",BSSGP_UNITDATA_LAYER);
+ DBG_ENTER();
+ UINT8 *buff = NULL;
+ int count;
+ PBSSGP_UDT_TLLI_Q tlli_q;
+ PBSSGP_UDT_BUFFER udt_buff;
+
+ tlli_q = bssgp_udt_config->tlli_q_head;
+ if (tlli_q == NULL)
+ {
+ DBG_LEAVE();
+ return FALSE;
+ }
+ while( (tlli_q->next != NULL) && (tlli_q->tlli != tlli) )
+ {
+ tlli_q = tlli_q->next;
+ }
+ if (tlli_q->tlli == tlli) {
+ /* Found the tlli list */
+ if (tlli_q->buff_count == 0)
+ {
+ DBG_TRACE("No buffers in Q for TLLI %#x\n",tlli);
+ DBG_LEAVE();
+ return(FALSE);
+ }
+ else {
+ /* Start by looking for the highest QoS level */
+ for(count=0;count<BSSGP_MAX_NETWORK_QOS_LEVELS;count++)
+ {
+ if (tlli_q->qos_queues[count].buff_count == 0) continue;
+ else
+ {
+ if (tlli_q->qos_queues[count].buff_list_head == NULL)
+ {
+ DBG_ERROR("BSSGP: ERROR-Queue head is null!\n");
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ *dl_unitdata = &tlli_q->qos_queues[count].buff_list_head->dl_unitdata;
+ DBG_LEAVE();
+ return (TRUE);
+ }
+ } /* End of for loop */
+ } /* end of else if tlli_q->buff_count == 0 */
+
+ }
+ else
+ {
+ /* Could not find a list for this TLLI */
+ DBG_TRACE("No Q for TLLI %#x\n",tlli);
+ }
+
+
+
+
+ DBG_LEAVE();
+ return(FALSE);
+}
+
+
+/*
+ * bssgp_udt_check_buff_by_qos
+ *
+ * This function checks the lists/qs to see if there is atleast one buffer
+ * queued up at this QoS level; returns TRUE if there is atleast one,
+ * FALSE otherwise
+ */
+BOOL
+bssgp_udt_check_buff_by_qos(BSSGP_NETWORK_QOS_LEVEL qos_level, BSSGP_DL_UNITDATA_MSG **dl_unitdata)
+{
+ DBG_FUNC("bssgp_udt_check_buff_by_qos",BSSGP_UNITDATA_LAYER);
+ DBG_ENTER();
+ UINT8 *buff = NULL;
+ PBSSGP_UDT_TLLI_Q tlli_q;
+ PBSSGP_UDT_BUFFER udt_buff;
+
+ tlli_q = bssgp_udt_config->tlli_q_head;
+ if (tlli_q == NULL)
+ {
+ DBG_LEAVE();
+ return FALSE;
+ }
+ while (tlli_q != NULL)
+ {
+ if (tlli_q->buff_count > 0)
+ {
+ if (tlli_q->qos_queues[qos_level].buff_count > 0)
+ {
+ DBG_TRACE("Found UDT buffer at QoS level %d\n",qos_level);
+ /*
+ * Now manipulate the TLLI linked list table so that
+ * this TLLI list is at the end of the linked list
+ * Four cases here:
+ * (1) it is at the head, but not the tail
+ * (2) it is at the tail, but not at the head
+ * (3) it is both the head & the tail
+ * (4) it is neither the head nor the tail
+ * For cases (1) & (4), we need to move it to the tail of the list;
+ * and for cases (2) & (3), we dont need to do anything for obvious reasons
+ */
+ /* case (3) above */
+ if ((tlli_q != bssgp_udt_config->tlli_q_head) && (tlli_q != bssgp_udt_config->tlli_q_tail))
+ {
+ (tlli_q->prev)->next = tlli_q->next;
+ (tlli_q->next)->prev = tlli_q->prev;
+ /* move the tail */
+ tlli_q->prev = bssgp_udt_config->tlli_q_tail;
+ (bssgp_udt_config->tlli_q_tail)->next = tlli_q;
+ tlli_q->next = NULL;
+ bssgp_udt_config->tlli_q_tail = tlli_q;
+ }
+ /* case (1) above */
+ else if ((tlli_q == bssgp_udt_config->tlli_q_head) && (tlli_q != bssgp_udt_config->tlli_q_tail))
+ {
+ bssgp_udt_config->tlli_q_head = tlli_q->next;
+ (bssgp_udt_config->tlli_q_head)->prev = NULL;
+ tlli_q->prev = bssgp_udt_config->tlli_q_tail;
+ (bssgp_udt_config->tlli_q_tail)->next = tlli_q;
+ bssgp_udt_config->tlli_q_tail = tlli_q;
+ tlli_q->next = NULL;
+ }
+ *dl_unitdata = &tlli_q->qos_queues[qos_level].buff_list_head->dl_unitdata;
+ DBG_LEAVE();
+ return (TRUE);
+
+ }
+ }
+ else
+ {
+ DBG_TRACE("TLLI %#x has no buffer at QoS level %d\n",tlli_q->tlli,qos_level);
+ }
+ /* code should fall through here and we should switch to the next TLLI list */
+ tlli_q = tlli_q->next;
+ }
+
+
+
+ DBG_LEAVE();
+ return(FALSE);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+ * bssgp_udt_flush_tlli
+ *
+ * Flushes (discards) all the buffers of a particular TLLI
+ *
+ */
+void
+bssgp_udt_flush_tlli(TLLI tlli)
+{
+ DBG_FUNC("bssgp_udt_flush_tlli",BSSGP_UNITDATA_LAYER);
+ DBG_ENTER();
+ int count;
+ PBSSGP_UDT_TLLI_Q tlli_q;
+ UINT32 bytes_freed,buffs_freed;
+
+ tlli_q = bssgp_udt_config->tlli_q_head;
+ if (tlli_q == NULL)
+ {
+ DBG_ERROR("No buffers in Q\n");
+ DBG_LEAVE();
+ return;
+ }
+
+ while( (tlli_q->next != NULL) && (tlli_q->tlli != tlli) )
+ {
+ tlli_q = tlli_q->next;
+ }
+
+ if (tlli_q->tlli == tlli)
+ {
+ /* Found the tlli list */
+ if (tlli_q->buff_count == 0)
+ {
+ DBG_TRACE("No buffers in Q for TLLI %#x to be flushed\n",tlli);
+ }
+ else
+ {
+ for(count=0;count<BSSGP_MAX_NETWORK_QOS_LEVELS;count++)
+ {
+ if (tlli_q->qos_queues[count].buff_count > 0)
+ {
+ bytes_freed = buffs_freed = 0;
+ bssgp_udt_free_qos_list_buffs(&tlli_q->qos_queues[count],&bytes_freed,&buffs_freed);
+ tlli_q->buff_count -= buffs_freed;
+ tlli_q->rx_bytes -= bytes_freed;
+ }
+ }
+ if ( (tlli_q->qos_queues[count].buff_count > 0) || (tlli_q->qos_queues[count].rx_bytes > 0) )
+ {
+ DBG_ERROR("Memory leak detected while trying to flush Q\n");
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+ * bssgp_udt_allocate_buff_pool
+ *
+ * Initial allocation of the pool of buffers which are
+ * used to queue up the data in a FIFO style
+ */
+BOOL
+bssgp_udt_allocate_buff_pool()
+{
+ DBG_FUNC("bssgp_udt_allocate_buff_pool",BSSGP_UNITDATA_LAYER);
+ DBG_ENTER();
+ BOOL status = FALSE;
+ UINT32 count,reverse_count;
+ PBSSGP_UDT_BUFFER udt_buff;
+
+ bssgp_udt_config->udt_buff_pool = (PBSSGP_UDT_BUFF_POOL_ENTRY)malloc(sizeof(BSSGP_UDT_BUFF_POOL_ENTRY) * bssgp_udt_config->udt_buff_count);
+ if (bssgp_udt_config->udt_buff_pool == NULL)
+ {
+ DBG_ERROR("Could not allocate memory for UDT buffer pool entry array %d\n",count);
+ free(bssgp_udt_config->udt_buff_pool);
+ DBG_LEAVE();
+ return (status);
+ }
+ DBG_TRACE("UDT buffer array allocated successfully\n");
+
+ for(count=0;count<bssgp_udt_config->udt_buff_count;count++)
+ {
+ bssgp_udt_config->udt_buff_pool[count].entry = (PBSSGP_UDT_BUFFER)malloc(sizeof(BSSGP_UDT_BUFFER));
+ if (bssgp_udt_config->udt_buff_pool[count].entry == NULL)
+ {
+ DBG_ERROR("Could not allocate memory for UDT buffer %d\n",count);
+ for(reverse_count=count-1;reverse_count>=0;reverse_count--)
+ {
+ free(bssgp_udt_config->udt_buff_pool[reverse_count].entry);
+ free(bssgp_udt_config->udt_buff_pool);
+ DBG_LEAVE();
+ return (status);
+ }
+ }
+ else
+ {
+ udt_buff = bssgp_udt_config->udt_buff_pool[count].entry;
+ memset(udt_buff,0,sizeof(BSSGP_UDT_BUFFER));
+ bssgp_udt_config->udt_buff_pool[count].used = FALSE;
+ udt_buff->magic = BSSGP_UNITDATA_MAGIC;
+ udt_buff->index = count;
+ }
+ }
+ DBG_TRACE("All UDT buffers allocated successfully\n");
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+
+
+
+/*
+ * bssgp_udt_free_buff_pool
+ */
+BOOL
+bssgp_udt_free_buff_pool()
+{
+ DBG_FUNC("bssgp_udt_free_buff_pool",BSSGP_UNITDATA_LAYER);
+ DBG_ENTER();
+ UINT32 count;
+ DBG_TRACE("Freeing alll UDT buffers\n");
+ for(count=0;count<bssgp_udt_config->udt_buff_count;count++)
+ {
+ free(bssgp_udt_config->udt_buff_pool[count].entry);
+ }
+ free(bssgp_udt_config->udt_buff_pool);
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+/*
+ * bssgp_udt_get_buff_from_pool
+ */
+PBSSGP_UDT_BUFFER
+bssgp_udt_get_buff_from_pool()
+{
+ DBG_FUNC("bssgp_udt_get_buff_from_pool",BSSGP_UNITDATA_LAYER);
+ DBG_ENTER();
+ UINT32 count;
+
+
+ for(count=0;count<bssgp_udt_config->udt_buff_count;count++)
+ {
+ if (bssgp_udt_config->udt_buff_pool[count].used == FALSE)
+ {
+ bssgp_udt_config->udt_buff_pool[count].used = TRUE;
+ DBG_LEAVE();
+ return(bssgp_udt_config->udt_buff_pool[count].entry);
+ }
+ }
+
+ DBG_ERROR("Out of UDT buffers!!\n");
+
+ DBG_LEAVE();
+ return (NULL);
+}
+
+
+
+
+/*
+ * bssgp_udt_return_buff_to_pool
+ */
+void
+bssgp_udt_return_buff_to_pool(PBSSGP_UDT_BUFFER udt_buff)
+{
+ DBG_FUNC("bssgp_udt_return_buff_to_pool",BSSGP_UNITDATA_LAYER);
+ DBG_ENTER();
+
+
+ if (udt_buff == NULL)
+ {
+ DBG_ERROR("Invalid buffer : NULL returned into UDT buffer pool !\n");
+ }
+ else if (udt_buff->magic != BSSGP_UNITDATA_MAGIC)
+ {
+ DBG_ERROR("Invalid buffer %#x returned into UDT buffer pool !\n",udt_buff);
+ }
+ else
+ {
+ if (udt_buff->index >= bssgp_udt_config->udt_buff_count)
+ {
+ DBG_ERROR("Invalid buffer %#x:%d returned into UDT buffer pool !\n",udt_buff,udt_buff->index);
+ }
+ else if (udt_buff != bssgp_udt_config->udt_buff_pool[udt_buff->index].entry)
+ {
+ DBG_ERROR("Invalid buffer %#x:%d != %#x returned into UDT buffer pool !\n",
+ udt_buff,udt_buff->index,
+ bssgp_udt_config->udt_buff_pool[udt_buff->index].entry);
+ }
+ else
+ {
+ udt_buff->magic = BSSGP_UNITDATA_MAGIC;
+ bssgp_udt_config->udt_buff_pool[udt_buff->index].used = FALSE;
+ }
+ }
+ DBG_LEAVE();
+ return;
+}
+
+
+/*
+ * bssgp_udt_allocate_tlli_pool
+ */
+BOOL
+bssgp_udt_allocate_tlli_pool()
+{
+ DBG_FUNC("bssgp_udt_allocate_tlli_pool",BSSGP_UNITDATA_LAYER);
+ DBG_ENTER();
+ BOOL status = FALSE;
+ UINT32 count,reverse_count;
+ PBSSGP_UDT_TLLI_Q tlli_q;
+
+ bssgp_udt_config->tlli_pool = (PBSSGP_UDT_TLLI_POOL_ENTRY)malloc(sizeof(BSSGP_UDT_TLLI_POOL_ENTRY)*bssgp_udt_config->tlli_list_count);
+ if (bssgp_udt_config->tlli_pool == NULL)
+ {
+ DBG_ERROR("Could not allocate memory for TLLI Pool List Array %d\n",count);
+ free(bssgp_udt_config->tlli_pool);
+ DBG_LEAVE();
+ return (status);
+ }
+ DBG_TRACE("TLLI list array allocated successfully\n");
+
+ for(count=0;count<bssgp_udt_config->tlli_list_count;count++)
+ {
+ bssgp_udt_config->tlli_pool[count].entry = (PBSSGP_UDT_TLLI_Q)malloc(sizeof(BSSGP_UDT_TLLI_Q));
+ if (bssgp_udt_config->tlli_pool[count].entry == NULL)
+ {
+ DBG_ERROR("Could not allocate memory for TLLI List %d\n",count);
+ for(reverse_count=count-1;reverse_count>=0;reverse_count--)
+ {
+ free(bssgp_udt_config->tlli_pool[reverse_count].entry);
+ free(bssgp_udt_config->tlli_pool);
+ DBG_LEAVE();
+ return (status);
+ }
+ }
+ else
+ {
+ tlli_q = bssgp_udt_config->tlli_pool[count].entry;
+ memset(tlli_q,0,sizeof(BSSGP_UDT_TLLI_Q));
+ bssgp_udt_config->tlli_pool[count].used = FALSE;
+ tlli_q->magic = BSSGP_UNITDATA_MAGIC;
+
+ for(int index=0;index<BSSGP_MAX_NETWORK_QOS_LEVELS;index++)
+ {
+ tlli_q->qos_queues[index].buff_list_head = NULL;
+ tlli_q->qos_queues[index].buff_list_tail = NULL;
+ tlli_q->qos_queues[index].qos_level = (BSSGP_NETWORK_QOS_LEVEL)index;
+ }
+ tlli_q->index = count;
+ }
+ }
+ DBG_TRACE("All TLLI lists allocated successfully\n");
+
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+
+
+
+/*
+ * bssgp_udt_free_tlli_pool
+ */
+BOOL
+bssgp_udt_free_tlli_pool()
+{
+ DBG_FUNC("bssgp_udt_free_tlli_pool",BSSGP_UNITDATA_LAYER);
+ DBG_ENTER();
+ UINT32 count;
+
+ DBG_TRACE("Freeing all TLLI lists\n");
+ for(count=0;count<bssgp_udt_config->tlli_list_count;count++)
+ {
+ free(bssgp_udt_config->tlli_pool[count].entry);
+ }
+ free(bssgp_udt_config->tlli_pool);
+ DBG_LEAVE();
+ return (TRUE);
+}
+
+
+
+/*
+ * bssgp_udt_get_tlli_list_from_pool
+ */
+PBSSGP_UDT_TLLI_Q
+bssgp_udt_get_tlli_list_from_pool()
+{
+ DBG_FUNC("bssgp_udt_get_tlli_list_from_pool",BSSGP_UNITDATA_LAYER);
+ DBG_ENTER();
+ UINT32 count;
+
+ for(count=0;count<bssgp_udt_config->tlli_list_count;count++) {
+ if (bssgp_udt_config->tlli_pool[count].used == FALSE) {
+ bssgp_udt_config->tlli_pool[count].used = TRUE;
+ DBG_LEAVE();
+ return(bssgp_udt_config->tlli_pool[count].entry);
+ }
+ }
+
+ DBG_ERROR("Out of TLLI lists!!\n");
+
+
+ DBG_LEAVE();
+ return (NULL);
+}
+
+
+/*
+ * bssgp_udt_return_tlli_list_to_pool
+ */
+void
+bssgp_udt_return_tlli_list_to_pool(PBSSGP_UDT_TLLI_Q tlli_q)
+{
+ DBG_FUNC("bssgp_udt_return_tlli_list_to_pool",BSSGP_UNITDATA_LAYER);
+ DBG_ENTER();
+
+ if (tlli_q == NULL) {
+ DBG_ERROR("Invalid TLLI list : NULL returned into TLLI list pool !\n");
+ }
+ else if (tlli_q->magic != BSSGP_UNITDATA_MAGIC) {
+ DBG_ERROR("Invalid TLLI list %#x returned into TLLI list pool !\n",tlli_q);
+ }
+ else {
+ if (tlli_q->index >= bssgp_udt_config->tlli_list_count) {
+ DBG_ERROR("Invalid TLLI list %#x:%d returned into TLLI list pool !\n",tlli_q,tlli_q->index);
+ }
+ else if (tlli_q != bssgp_udt_config->tlli_pool[tlli_q->index].entry) {
+ DBG_ERROR("Invalid TLLI list %#x:%d != %#x returned into TLLI list pool !\n",tlli_q,tlli_q->index,
+ bssgp_udt_config->tlli_pool[tlli_q->index].entry);
+ }
+ else {
+ int index = tlli_q->index;
+ if (tlli_q->qos_queues[index].buff_list_head != NULL) {
+ DBG_ERROR("Memory leak detected; trying to free TLLI Q %d without freeing %d buffers\n",
+ index,tlli_q->qos_queues[index].buff_count);
+ UINT32 bytes_freed=0,buffs_freed=0;
+ bssgp_udt_free_qos_list_buffs(&tlli_q->qos_queues[index],&bytes_freed,&buffs_freed);
+ tlli_q->buff_count -= buffs_freed;
+ tlli_q->rx_bytes -= bytes_freed;
+ }
+
+ memset(tlli_q,0,sizeof(BSSGP_UDT_TLLI_Q));
+ bssgp_udt_config->tlli_pool[index].used = FALSE;
+ tlli_q->magic = BSSGP_UNITDATA_MAGIC;
+ for(index=0;index<BSSGP_MAX_NETWORK_QOS_LEVELS;index++) {
+ tlli_q->qos_queues[index].buff_list_head = NULL;
+ tlli_q->qos_queues[index].buff_list_tail = NULL;
+ tlli_q->qos_queues[index].qos_level = (BSSGP_NETWORK_QOS_LEVEL)index;
+ }
+ tlli_q->index = index;
+ }
+ }
+ DBG_LEAVE();
+ return;
+}
+
+
+/*
+ * bssgp_udt_free_qos_buffs
+ */
+void
+bssgp_udt_free_qos_list_buffs(PBSSGP_UDT_QOS_Q qos_q, UINT32 *bytes_freed, UINT32 *buffs_freed)
+{
+
+ DBG_FUNC("bssgp_udt_free_qos_buffs",BSSGP_UNITDATA_LAYER);
+ DBG_ENTER();
+ PBSSGP_UDT_BUFFER udt_buff;
+ udt_buff = qos_q->buff_list_head;
+ if (udt_buff == NULL) {
+ *bytes_freed = 0;
+ *buffs_freed = 0;
+ qos_q->buff_list_head =
+ qos_q->buff_list_tail = NULL;
+ DBG_LEAVE();
+
+ }
+ while(udt_buff->next != NULL) {
+ udt_buff = udt_buff->next;
+ qos_q->rx_bytes -= (udt_buff->prev)->data_size;
+ *bytes_freed += (udt_buff->prev)->data_size;
+ bssgp_udt_return_buff_to_pool(udt_buff->prev);
+ qos_q->buff_count--;
+ *buffs_freed += 1;
+ }
+ bssgp_udt_return_buff_to_pool(udt_buff);
+
+ qos_q->rx_bytes -= (udt_buff->prev)->data_size;
+ *bytes_freed += (udt_buff->prev)->data_size;
+ qos_q->buff_count--;
+ *buffs_freed += 1;
+
+ qos_q->buff_list_head =
+ qos_q->buff_list_tail = NULL;
+
+ if ((qos_q->buff_count > 0) || (qos_q->rx_bytes > 0)) {
+ DBG_ERROR("Memory leak!!\n");
+ }
+
+ DBG_LEAVE();
+ return;
+}
+
diff --git a/data/mnet/GP10/Host/cc/Makefile b/data/mnet/GP10/Host/cc/Makefile
new file mode 100644
index 0000000..ded5f26
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/Makefile
@@ -0,0 +1,18 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+
+SUBDIRS=src src_api src_init test
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+
+copyall:
+ $(CP) bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/cc/cc.dsp b/data/mnet/GP10/Host/cc/cc.dsp
new file mode 100644
index 0000000..3793762
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/cc.dsp
@@ -0,0 +1,402 @@
+# Microsoft Developer Studio Project File - Name="cc" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=cc - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "cc.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "cc.mak" CFG="cc - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "cc - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "cc - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName "cc"
+# PROP Scc_LocalPath "."
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "cc - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ELSEIF "$(CFG)" == "cc - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "%WIND_BASE%\target\config\all" /I "%WIND_BASE%\target\src\config" /I "%WIND_BASE%\target\src\drv" /I "\ViperCell" /I "\vipercell\cc\include" /I "jcc\include" /I "cdc_bsp" /I "oam\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D CPU=PPC860 /D "VXWORKS" /D "H323_Exist" /D "__VXWORKS__" /D "VIPER_IP" /D "FAST_RTP_READ" /D "VX_IGNORE_GNU_LIBS" /D "__PROTOTYPE_5_0" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ENDIF
+
+# Begin Target
+
+# Name "cc - Win32 Release"
+# Name "cc - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\src\CallConfig.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CallLeg.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CallTask.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CCBldMSMsg.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CCconfig.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CCH323Util.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CCHalfCall.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CCHandover.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CCHndUtil.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CCHoSrcHnd.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CCHoTrgHnd.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src_init\CCinit.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CCMobExtHnd.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CCMobIntHnd.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CCMobRemHnd.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CCMsgAnal.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CCOamHnd.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CCSessionHandler.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CCTask.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CCUtil.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CissCallLeg.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\hortp.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\smqueue.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\SmsCommon.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\SmsFsm.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\SmsHalfCall.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\SmsHandlers.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\SmsLeg.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\SmsMsgBuilder.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cc\CallConfig.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cc\CallLeg.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cc\cc_util_ext.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cc\CCconfig.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cc\CCH323Util.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cc\CCHalfCall.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cc\CCHandover.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cc\CCInt.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cc\CCMsgAnal.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cc\CCSessionHandler.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cc\CCTypes.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cc\CCUtil.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cc\hortp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\jcc\JCCComMsg.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\jcc\JCCL3Msg.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cc\smqueue.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cc\SmsCommonDef.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cc\SmsHalfCall.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cc\SmsHandler.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cc\SMSLeg.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cc\SmsMsgBuilder.h
+# End Source File
+# End Group
+# Begin Group "Source API files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\src_api\CCapiH323.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src_api\CCapiViperLink.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src_api\CCMobUtil.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src_api\ccutil2.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src_api\SmsVblink.cpp
+# End Source File
+# End Group
+# Begin Group "Docs"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=".\encode cc.txt"
+
+!IF "$(CFG)" == "cc - Win32 Release"
+
+!ELSEIF "$(CFG)" == "cc - Win32 Debug"
+
+# PROP Exclude_From_Build 1
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=".\procs sms.txt"
+
+!IF "$(CFG)" == "cc - Win32 Release"
+
+!ELSEIF "$(CFG)" == "cc - Win32 Debug"
+
+# PROP Exclude_From_Build 1
+
+!ENDIF
+
+# End Source File
+# End Group
+# Begin Group "Logging Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\logging\src\l3MsLog.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\logging\src\logging.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\logging\include\VCLOGGING.H
+# End Source File
+# Begin Source File
+
+SOURCE=..\logging\include\vcmodules.h
+# End Source File
+# End Group
+# Begin Group "L1Proxy Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\l1proxy\src\l1MsMsgProc.cpp
+# End Source File
+# End Group
+# Begin Group "RM API Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;h"
+# Begin Source File
+
+SOURCE=..\rm\Include\rm_ccintf.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\rm\Src_api\rm_EntryIdVsTrxSlot.cpp
+# End Source File
+# End Group
+# Begin Group "MM source files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;h"
+# Begin Source File
+
+SOURCE=..\mm\src\MMMdMsgProc.cpp
+# End Source File
+# End Group
+# Begin Group "LUDB Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;h"
+# Begin Source File
+
+SOURCE=..\jcc\src\LUDBVoipMsgProc.cpp
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/data/mnet/GP10/Host/cc/src/A_Handover_Common.cpp b/data/mnet/GP10/Host/cc/src/A_Handover_Common.cpp
new file mode 100644
index 0000000..e21e120
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/A_Handover_Common.cpp
@@ -0,0 +1,133 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2001
+// All Rights Reserved
+//
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : ($CC)/src/A_Handover_Common.cpp
+// Author(s) : Tai Yu
+// Description :
+//
+// FILE DESCRIPTION:
+//
+//
+// CHANGE HISTORY:
+//
+// Date Description
+// ---------- --------------------------------------------
+// 2001-05-15 First Incarnation
+//
+// =================================================================
+
+#include "CC\A_Handover_Common.h"
+
+A_Result_t
+AIF_Encode(
+ T_AIF_MSG *AIF_Msg,
+ T_AIF_MessageUnit *AIF_MsgUnit)
+{
+ unsigned char *buffer = AIF_MsgUnit->buffer;
+ int length = AIF_MSG_LENGTH;
+ A_Result_t result;
+
+ if (length < 2) return A_INCORRECT_LENGTH;
+
+ switch(AIF_Msg->header.msgType)
+ {
+ case A_HANDOVER_REQUEST_TYPE:
+ result = A_EncodeHandoverRequest(
+ AIF_Msg->handoverRequest,
+ buffer,
+ length);
+ AIF_MsgUnit->msgLength = length;
+ return result;
+ case A_HANDOVER_REQUEST_ACK_TYPE:
+ result = A_EncodeHandoverRequestAck(
+ AIF_Msg->handoverRequestAck,
+ buffer,
+ length);
+ AIF_MsgUnit->msgLength = length;
+ return result;
+ case A_HANDOVER_COMPLETE_TYPE:
+ result = A_EncodeHandoverComplete(
+ AIF_Msg->handoverComplete,
+ buffer,
+ length);
+ AIF_MsgUnit->msgLength = length;
+ return result;
+ case A_HANDOVER_FAILURE_TYPE:
+ result = A_EncodeHandoverFailure(
+ AIF_Msg->handoverFailure,
+ buffer,
+ length);
+ AIF_MsgUnit->msgLength = length;
+ return result;
+ case A_HANDOVER_DETECT_TYPE:
+ result = A_EncodeHandoverDetect(
+ AIF_Msg->handoverDetect,
+ buffer,
+ length);
+ AIF_MsgUnit->msgLength = length;
+ return result;
+ case A_QUEUING_INDICATION_TYPE:
+ result = A_EncodeMessageType(
+ A_RESULT_SUCCESS,
+ length,
+ buffer);
+ AIF_MsgUnit->msgLength = length;
+ return result;
+ default:
+ return A_UNKNOWN_MESSAGE_TYPE;
+ }
+}
+
+A_Result_t
+AIF_Decode(
+ T_AIF_MessageUnit *AIF_MsgUnit,
+ T_AIF_MSG *AIF_Msg)
+{
+ unsigned char *buffer = AIF_MsgUnit->buffer;
+ int length = AIF_MsgUnit->msgLength;
+
+ if (length < 2) return A_INCORRECT_LENGTH;
+
+ AIF_Msg->header.msgType = AIF_MsgUnit->buffer[0];
+
+ switch(AIF_Msg->header.msgType)
+ {
+ case A_HANDOVER_REQUEST_TYPE:
+ return A_DecodeHandoverRequest(
+ &buffer[1],
+ length,
+ AIF_Msg->handoverRequest);
+ case A_HANDOVER_REQUEST_ACK_TYPE:
+ return A_DecodeHandoverRequestAck(
+ &buffer[1],
+ length,
+ AIF_Msg->handoverRequestAck);
+ case A_HANDOVER_COMPLETE_TYPE:
+ return A_DecodeHandoverComplete(
+ &buffer[1],
+ length,
+ AIF_Msg->handoverComplete);
+ case A_HANDOVER_FAILURE_TYPE:
+ return A_DecodeHandoverFailure(
+ &buffer[1],
+ length,
+ AIF_Msg->handoverFailure);
+ case A_HANDOVER_DETECT_TYPE:
+ return A_DecodeHandoverDetect(
+ &buffer[1],
+ length,
+ AIF_Msg->handoverDetect);
+ case A_QUEUING_INDICATION_TYPE:
+ AIF_Msg->msgType = A_QUEUING_INDICATION_TYPE;
+ return A_RESULT_SUCCESS;
+ default:
+ return A_UNKNOWN_MESSAGE_TYPE;
+ }
+}
+
diff --git a/data/mnet/GP10/Host/cc/src/A_Handover_Complete_Msg.cpp b/data/mnet/GP10/Host/cc/src/A_Handover_Complete_Msg.cpp
new file mode 100644
index 0000000..a8f4a6b
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/A_Handover_Complete_Msg.cpp
@@ -0,0 +1,99 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2001
+// All Rights Reserved
+//
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : ($CC)/src/A_Handover_Complete_Msg.cpp
+// Author(s) : Tai Yu
+// Create Date : 05-22-01
+// Description : Source Vipercell Exteral Handover Complete Message
+// Encode and Decode Functions
+//
+// FILE DESCRIPTION:
+//
+//
+// CHANGE HISTORY:
+//
+// Date Description
+// ---------- --------------------------------------------
+// 2001-05-22 First Incarnation
+//
+// =================================================================
+
+#include "CC\A_Handover_Complete_Msg.h"
+
+// 3.2.1.12
+A_Result_t
+A_EncodeHandoverComplete(
+ A_Handover_Complete_t &handoverComplete,
+ unsigned char *buffer,
+ int &length
+ )
+{
+ A_Result_t resultCode;
+ int ieLength = 1;
+ int bufferIndex = 1;
+
+ if (length < 4)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+
+ // Encode message header
+ A_EncodeMessageType((A_Ie_Message_Type_t)A_HANDOVER_COMPLETE_TYPE,
+ ieLength,
+ &buffer[0]);
+
+ if(handoverComplete.rrCause.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeRRCause(
+ handoverComplete.rrCause,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ length = bufferIndex;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeHandoverComplete(
+ unsigned char *buffer,
+ int length,
+ A_Handover_Complete_t &handoverComplete
+ )
+{
+ if(length < 4)
+ {
+ return A_MANDATORY_IE_MISSING;
+ }
+
+ A_Result_t resultCode;
+ int ieLength = 0;
+ int bufferIndex = 0;
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_RR_CAUSE_TYPE))
+ {
+ resultCode = A_DecodeRRCause(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverComplete.rrCause);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ return A_RESULT_SUCCESS;
+}
diff --git a/data/mnet/GP10/Host/cc/src/A_Handover_Detect_Msg.cpp b/data/mnet/GP10/Host/cc/src/A_Handover_Detect_Msg.cpp
new file mode 100644
index 0000000..2efa6d3
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/A_Handover_Detect_Msg.cpp
@@ -0,0 +1,80 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2001
+// All Rights Reserved
+//
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : ($CC)/src/A_Handover_Detect_Msg.cpp
+// Author(s) : Tai Yu
+// Create Date : 05-22-01
+// Description : Source Vipercell Exteral Handover Detect Message
+// Encode and Decode Functions
+//
+// FILE DESCRIPTION:
+//
+//
+// CHANGE HISTORY:
+//
+// Date Description
+// ---------- --------------------------------------------
+// 2001-05-22 First Incarnation
+//
+// =================================================================
+
+#include "CC\A_Handover_Detect_Msg.h"
+
+// 3.2.1.40
+A_Result_t
+A_EncodeHandoverDetect(
+ A_Handover_Detect_t &handoverDetect,
+ unsigned char *buffer,
+ int &length
+ )
+{
+ A_Result_t resultCode;
+ int ieLength = 1;
+
+ if (length < 1)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+
+ // Encode message header
+ A_EncodeMessageType((A_Ie_Message_Type_t)A_HANDOVER_DETECT_TYPE,
+ ieLength,
+ &buffer[0]);
+
+ length = 1;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeHandoverDetect(
+ unsigned char *buffer,
+ int length,
+ A_Handover_Detect_t &handoverDetect
+ )
+{
+ int decodedLength;
+
+ if(length < 1)
+ {
+ return A_MANDATORY_IE_MISSING;
+ }
+
+ if(buffer[0] != A_HANDOVER_DETECT_TYPE)
+ {
+ return A_UNKNOWN_MESSAGE_TYPE;
+ }
+
+ // Decode message header
+ A_DecodeMessageType(&buffer[0],
+ decodedLength,
+ handoverDetect.msgType);
+
+ return A_RESULT_SUCCESS;
+}
diff --git a/data/mnet/GP10/Host/cc/src/A_Handover_Failure_Msg.cpp b/data/mnet/GP10/Host/cc/src/A_Handover_Failure_Msg.cpp
new file mode 100644
index 0000000..a729582
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/A_Handover_Failure_Msg.cpp
@@ -0,0 +1,180 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2001
+// All Rights Reserved
+//
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : ($CC)/src/A_Handover_Failure_Msg.cpp
+// Author(s) : Tai Yu
+// Create Date : 05-15-01
+// Description : Source Vipercell Exteral Handover Failure Message
+// Encode and Decode Functions
+//
+// FILE DESCRIPTION:
+//
+//
+// CHANGE HISTORY:
+//
+// Date Description
+// ---------- --------------------------------------------
+// 2001-05-15 First Incarnation
+//
+// =================================================================
+
+#include "CC\A_Handover_Failure_Msg.h"
+
+// 3.2.1.16
+A_Result_t
+A_EncodeHandoverFailure(
+ A_Handover_Failure_t &handoverFailure,
+ unsigned char *buffer,
+ int &length
+ )
+{
+ A_Result_t resultCode;
+ int ieLength = 1;
+ int bufferIndex = 1;
+
+ if (length < 4)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+
+ // Encode message header
+ A_EncodeMessageType(A_HANDOVER_FAILURE_TYPE,
+ ieLength,
+ &buffer[0]);
+
+ if(handoverFailure.cause.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeCause(
+ handoverFailure.cause,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_MANDATORY_IE_RETURN_CODE(resultCode);
+ }
+ else
+ return A_MANDATORY_IE_MISSING;
+
+ if(handoverFailure.rrCause.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeRRCause(
+ handoverFailure.rrCause,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ if(handoverFailure.circuitPool.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeCircuitPool(
+ handoverFailure.circuitPool,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ if(handoverFailure.circuitPoolList.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeCircuitPoolList(
+ handoverFailure.circuitPoolList,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ length = bufferIndex;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeHandoverFailure(
+ unsigned char *buffer,
+ int length,
+ A_Handover_Failure_t &handoverFailure
+ )
+{
+ if(length < 4)
+ {
+ return A_MANDATORY_IE_MISSING;
+ }
+
+ A_Result_t resultCode;
+ int ieLength = 0;
+ int bufferIndex = 0;
+
+ resultCode = A_DecodeCause(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverFailure.cause);
+
+ A_CHECK_MANDATORY_IE_RETURN_CODE(resultCode);
+
+ bufferIndex += ieLength;
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_RR_CAUSE_TYPE))
+ {
+ resultCode = A_DecodeRRCause(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverFailure.rrCause);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_CIRCUIT_POOL_TYPE))
+ {
+ resultCode = A_DecodeCircuitPool(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverFailure.circuitPool);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_CIRCUIT_POOL_LIST_TYPE))
+ {
+ resultCode = A_DecodeCircuitPoolList(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverFailure.circuitPoolList);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ return A_RESULT_SUCCESS;
+}
diff --git a/data/mnet/GP10/Host/cc/src/A_Handover_Ie.cpp b/data/mnet/GP10/Host/cc/src/A_Handover_Ie.cpp
new file mode 100644
index 0000000..2649a33
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/A_Handover_Ie.cpp
@@ -0,0 +1,1335 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2001
+// All Rights Reserved
+//
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : ($CC)/src/A_Handover_Ie.cpp
+// Author(s) : Tai Yu
+// Description :
+//
+// FILE DESCRIPTION:
+//
+//
+// CHANGE HISTORY:
+//
+// Date Description
+// ---------- --------------------------------------------
+// 2001-05-15 First Incarnation
+//
+// =================================================================
+
+#include "CC\A_Handover_Ie.h"
+
+// 3.2.2.1 Message_Type
+/*
+typedef unsigned char A_Ie_Message_Type_t;
+*/
+
+A_Result_t
+A_EncodeMessageType(
+ A_Ie_Message_Type_t messageType,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ buffer[0] = messageType;
+
+ ieLength = 1;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeMessageType(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Message_Type_t &messageType)
+{
+
+ messageType = buffer[0];
+
+ ieLength = 1;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.2 Circuit_Identity_Code
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned short pcmMultiplex:11;
+ unsigned short timeslot:5;
+} A_Ie_Circuit_Identity_Code_t;
+*/
+
+A_Result_t
+A_EncodeCircuitIdentityCode(
+ A_Ie_Circuit_Identity_Code_t &cirIdenCode,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(cirIdenCode.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_CIRCUIT_IDENTITY_CODE_TYPE;
+
+ buffer[1] = (unsigned char)(cirIdenCode.pcmMultiplex >> 3);
+
+ buffer[2] = ((unsigned char)((cirIdenCode.pcmMultiplex & 0x07) << 5) |
+ (unsigned char)(cirIdenCode.timeslot & 0x1F));
+
+ ieLength = 3;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeCircuitIdentityCode(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Circuit_Identity_Code_t &cirIdenCode)
+{
+ cirIdenCode.ie_present = true;
+
+ cirIdenCode.elementIdentifier = buffer[0];
+
+ cirIdenCode.pcmMultiplex = ((buffer[1] << 3) | ((buffer[2] >> 5) & 0x7));
+
+ cirIdenCode.timeslot = (buffer[2] & 0x1F);
+
+ ieLength = 3;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.5 Cause
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char cause;
+ unsigned char cause2;
+} A_Ie_Cause_t;
+*/
+
+A_Result_t
+A_EncodeCause(
+ A_Ie_Cause_t &cause,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(cause.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_CAUSE_TYPE;
+
+ buffer[1] = (cause.cause & 0x8 == 0x8) ? 1 : 2;
+
+ buffer[2] = cause.cause;
+
+ ieLength = 3;
+ if (cause.cause & 0x8 == 0x8)
+ {
+ buffer[3] = cause.cause2;
+ ieLength = 4;
+ }
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeCause(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Cause_t &cause)
+{
+ cause.ie_present = true;
+
+ cause.elementIdentifier = buffer[0];
+
+ cause.length = buffer[1];
+
+ cause.cause = buffer[2];
+
+ if (cause.cause & 0x8 == 0x8)
+ cause.cause2 = buffer[3];
+
+ ieLength = cause.length + 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.10 Encryption_Information
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char permittedAlgorithm;
+ unsigned char key[8];
+} A_Ie_Encryption_Information_t;
+*/
+
+A_Result_t
+A_EncodeEncryptInformation(
+ A_Ie_Encryption_Information_t &encryptInfo,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(encryptInfo.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_ENCRYPTION_INFORMATION_TYPE;
+
+ buffer[1] = encryptInfo.length;
+
+ buffer[2] = encryptInfo.permittedAlgorithm;
+
+ if (encryptInfo.length > 1)
+ memcpy(&buffer[3], encryptInfo.key, 8);
+
+ ieLength = 11;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeEncryptInformation(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Encryption_Information_t &encryptInfo)
+{
+ encryptInfo.ie_present = true;
+
+ encryptInfo.elementIdentifier = buffer[0];
+
+ encryptInfo.length = buffer[1];
+
+ encryptInfo.permittedAlgorithm = buffer[2];
+
+ if (encryptInfo.length > 1)
+ memcpy(encryptInfo.key, &buffer[3], 8);
+
+ ieLength = encryptInfo.length + 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.11
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char speechDataIndicator;
+ unsigned char channelRateAndType;
+ unsigned char permittedIndicator[8];
+} A_Ie_Channel_Type_t;
+*/
+
+A_Result_t
+A_EncodeChannelType(
+ A_Ie_Channel_Type_t &channelType,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(channelType.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_CHANNEL_TYPE_TYPE;
+
+ buffer[1] = channelType.length;
+
+ buffer[2] = channelType.speechDataIndicator & 0x0F;
+
+ buffer[3] = channelType.channelRateAndType;
+
+ if (channelType.length > 2)
+ {
+ memcpy(&buffer[4], channelType.permittedIndicator, channelType.length - 2);
+ }
+
+ ieLength = channelType.length + 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeChannelType(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Channel_Type_t &channelType)
+{
+ channelType.ie_present = true;
+
+ channelType.elementIdentifier = buffer[0];
+
+ channelType.length = buffer[1];
+
+ channelType.speechDataIndicator = buffer[2];
+
+ channelType.channelRateAndType = buffer[3];
+
+ if (channelType.length > 2)
+ {
+ memcpy(channelType.permittedIndicator, &buffer[4], channelType.length - 2);
+ }
+
+ ieLength = channelType.length + 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+
+// 3.2.2.17
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char cellIdDescriminator;
+ unsigned char mcc[3];
+ unsigned char mnc[3];
+ unsigned short lac;
+ unsigned short ci;
+} A_Ie_Cell_Identifier_t;
+*/
+
+A_Result_t
+A_EncodeCellIdentifier(
+ A_Ie_Cell_Identifier_t &cellIdentifier,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(cellIdentifier.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_CELL_IDENTIFIER_TYPE;
+
+ buffer[1] = cellIdentifier.length;
+
+ buffer[2] = cellIdentifier.cellIdDescriminator & 0xF;
+
+ switch (cellIdentifier.cellIdDescriminator)
+ {
+ case 0:
+ buffer[3] = ((unsigned char)(cellIdentifier.mcc[1]) << 4 |
+ (unsigned char)(cellIdentifier.mcc[0]));
+ buffer[4] = ((unsigned char)(cellIdentifier.mnc[2]) << 4 |
+ (unsigned char)(cellIdentifier.mcc[2]));
+ buffer[5] = ((unsigned char)(cellIdentifier.mnc[1]) << 4 |
+ (unsigned char)(cellIdentifier.mnc[0]));
+ buffer[6] = (unsigned char)(cellIdentifier.lac >> 8);
+ buffer[7] = (unsigned char)(cellIdentifier.lac & 0xFF);
+ buffer[8] = (unsigned char)(cellIdentifier.ci >> 8);
+ buffer[9] = (unsigned char)(cellIdentifier.ci & 0xFF);
+
+ ieLength = 10;
+ break;
+ case 1:
+ buffer[3] = (unsigned char)(cellIdentifier.lac >> 8);
+ buffer[4] = (unsigned char)(cellIdentifier.lac & 0xFF);
+ buffer[5] = (unsigned char)(cellIdentifier.ci >> 8);
+ buffer[6] = (unsigned char)(cellIdentifier.ci & 0xFF);
+
+ ieLength = 7;
+ break;
+ case 2:
+ buffer[3] = (unsigned char)(cellIdentifier.ci >> 8);
+ buffer[4] = (unsigned char)(cellIdentifier.ci & 0xFF);
+
+ ieLength = 5;
+ break;
+ default:
+ break;
+ }
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeCellIdentifier(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Cell_Identifier_t &cellIdentifier)
+{
+ cellIdentifier.ie_present = true;
+
+ cellIdentifier.elementIdentifier = buffer[0];
+
+ cellIdentifier.length = buffer[1];
+
+ cellIdentifier.cellIdDescriminator = buffer[2] & 0x0F;
+
+ switch (cellIdentifier.cellIdDescriminator)
+ {
+ case 0:
+ cellIdentifier.mcc[1] = (buffer[3] >> 4);
+ cellIdentifier.mcc[0] = (buffer[3] & 0xF);
+ cellIdentifier.mcc[2] = (buffer[4] & 0xF);
+ cellIdentifier.mnc[2] = (buffer[4] >> 4);
+ cellIdentifier.mnc[1] = (buffer[5] >> 4);
+ cellIdentifier.mnc[0] = (buffer[5] & 0xF);
+ cellIdentifier.lac = (unsigned short)(buffer[6] << 8) | (unsigned short)buffer[7];
+ cellIdentifier.ci = (unsigned short)(buffer[8] << 8) | (unsigned short)buffer[9];
+
+ ieLength = 10;
+ break;
+ case 1:
+ cellIdentifier.lac = (unsigned short)(buffer[3] << 8) | (unsigned short)buffer[4];
+ cellIdentifier.ci = (unsigned short)(buffer[5] << 8) | (unsigned short)buffer[6];
+
+ ieLength = 7;
+ break;
+ case 2:
+ cellIdentifier.ci = (unsigned short)(buffer[3] << 8) | (unsigned short)buffer[4];
+
+ ieLength = 5;
+ break;
+ default:
+ break;
+ }
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.18
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char priority;
+} A_Ie_Priority_t;
+*/
+
+A_Result_t
+A_EncodePriority(
+ A_Ie_Priority_t &priority,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(priority.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_PRIORITY_TYPE;
+
+ buffer[1] = priority.length;
+
+ buffer[2] = priority.priority;
+
+ ieLength = 3;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodePriority(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Priority_t &priority)
+{
+ priority.ie_present = true;
+
+ priority.elementIdentifier = buffer[0];
+
+ priority.length = buffer[1];
+
+ priority.priority = buffer[2];
+
+ ieLength = 3;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.9
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char protocolDisc;
+ unsigned char transactionID;
+} A_Ie_Layer3_Header_Information_t;
+*/
+
+A_Result_t
+A_EncodeLayer3HeaderInformation(
+ A_Ie_Layer3_Header_Information_t &layer3HeaderInfo,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(layer3HeaderInfo.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_LAYER3_HEADER_INFORMATION_TYPE;
+
+ buffer[1] = layer3HeaderInfo.length;
+
+ buffer[2] = layer3HeaderInfo.protocolDisc;
+
+ buffer[3] = layer3HeaderInfo.transactionID;
+
+ ieLength = 4;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeLayer3HeaderInformation(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Layer3_Header_Information_t &layer3HeaderInfo)
+{
+ layer3HeaderInfo.ie_present = true;
+
+ layer3HeaderInfo.elementIdentifier = buffer[0];
+
+ layer3HeaderInfo.length = buffer[1];
+
+ layer3HeaderInfo.protocolDisc = buffer[2];
+
+ layer3HeaderInfo.transactionID = buffer[3];
+
+ ieLength = layer3HeaderInfo.length + 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.19
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char classmark[3];
+} A_Ie_Classmark_Information2_t;
+*/
+
+A_Result_t
+A_EncodeClassmarkInformation2(
+ A_Ie_Classmark_Information2_t &classmarkInfo2,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(classmarkInfo2.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_CLASSMARK_INFORMATION2_TYPE;
+
+ buffer[1] = classmarkInfo2.length;
+
+ memcpy(&buffer[2], classmarkInfo2.classmark, classmarkInfo2.length);
+
+ ieLength = classmarkInfo2.length + 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeClassmarkInformation2(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Classmark_Information2_t &classmarkInfo2)
+{
+ classmarkInfo2.ie_present = true;
+
+ classmarkInfo2.elementIdentifier = buffer[0];
+
+ classmarkInfo2.length = buffer[1];
+
+ if (classmarkInfo2.length > 0)
+ memcpy(classmarkInfo2.classmark, &buffer[2], classmarkInfo2.length);
+
+ ieLength = classmarkInfo2.length + 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.20
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char classmark[12];
+} A_Ie_Classmark_Information3_t;
+*/
+
+A_Result_t
+A_EncodeClassmarkInformation3(
+ A_Ie_Classmark_Information3_t &classmarkInfo3,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(classmarkInfo3.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_CLASSMARK_INFORMATION3_TYPE;
+
+ buffer[1] = classmarkInfo3.length;
+
+ memcpy(&buffer[2], classmarkInfo3.classmark, classmarkInfo3.length);
+
+ ieLength = classmarkInfo3.length + 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeClassmarkInformation3(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Classmark_Information3_t &classmarkInfo3)
+{
+ classmarkInfo3.ie_present = true;
+
+ classmarkInfo3.elementIdentifier = buffer[0];
+
+ classmarkInfo3.length = buffer[1];
+
+ if (classmarkInfo3.length > 0)
+ memcpy(classmarkInfo3.classmark, &buffer[2], classmarkInfo3.length);
+
+ ieLength = classmarkInfo3.length + 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.21
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char bandToBeUsed;
+} A_Ie_Interference_Band_To_Be_Used_t;
+*/
+
+A_Result_t
+A_EncodeInterferenceBandToBeUsed(
+ A_Ie_Interference_Band_To_Be_Used_t &interferenceBandToBeUsed,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(interferenceBandToBeUsed.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_INTERFERENCE_BAND_TO_BE_USED_TYPE;
+
+ buffer[1] = interferenceBandToBeUsed.bandToBeUsed;
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeInterferenceBandToBeUsed(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Interference_Band_To_Be_Used_t &interferenceBandToBeUsed)
+{
+ interferenceBandToBeUsed.ie_present = true;
+
+ interferenceBandToBeUsed.elementIdentifier = buffer[0];
+
+ interferenceBandToBeUsed.bandToBeUsed = buffer[1];
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.22
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char rrCause;
+} A_Ie_RR_Cause_t;
+*/
+
+A_Result_t
+A_EncodeRRCause(
+ A_Ie_RR_Cause_t &rrCause,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(rrCause.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_RR_CAUSE_TYPE;
+
+ buffer[1] = rrCause.rrCause;
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeRRCause(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_RR_Cause_t &rrCause)
+{
+ rrCause.ie_present = true;
+
+ rrCause.elementIdentifier = buffer[0];
+
+ rrCause.rrCause = buffer[1];
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.24
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char layer3Info[256];
+} A_Ie_Layer3_Information_t;
+*/
+
+A_Result_t
+A_EncodeLayer3Information(
+ A_Ie_Layer3_Information_t &layer3Info,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(layer3Info.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_LAYER3_INFORMATION_TYPE;
+
+ buffer[1] = layer3Info.length;
+
+ memcpy(&buffer[2], layer3Info.layer3Info, layer3Info.length);
+
+ ieLength = layer3Info.length + 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeLayer3Information(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Layer3_Information_t &layer3Info)
+{
+ layer3Info.ie_present = true;
+
+ layer3Info.elementIdentifier = buffer[0];
+
+ layer3Info.length = buffer[1];
+
+ if (layer3Info.length > 0)
+ memcpy(layer3Info.layer3Info, &buffer[2], layer3Info.length);
+
+ ieLength = layer3Info.length + 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.26
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char downlinkDTXFlag;
+} A_Ie_Downlink_DTX_Flag_t;
+*/
+
+A_Result_t
+A_EncodeDownlinkDTXFlag(
+ A_Ie_Downlink_DTX_Flag_t &downlinkDTXFlag,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(downlinkDTXFlag.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_DOWNLINK_DTX_FLAG_TYPE;
+
+ buffer[1] = downlinkDTXFlag.downlinkDTXFlag;
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeDownlinkDTXFlag(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Downlink_DTX_Flag_t &downlinkDTXFlag)
+{
+ downlinkDTXFlag.ie_present = true;
+
+ downlinkDTXFlag.elementIdentifier = buffer[0];
+
+ downlinkDTXFlag.downlinkDTXFlag = buffer[1];
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.30 (One of Information1 or Information2)
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char classmark;
+} A_Ie_Classmark_Information1_t;
+*/
+
+A_Result_t
+A_EncodeClassmarkInformation1(
+ A_Ie_Classmark_Information1_t &classmarkInfo1,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(classmarkInfo1.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_CLASSMARK_INFORMATION1_TYPE;
+
+ buffer[1] = classmarkInfo1.classmark;
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeClassmarkInformation1(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Classmark_Information1_t &classmarkInfo1)
+{
+ classmarkInfo1.ie_present = true;
+
+ classmarkInfo1.elementIdentifier = buffer[0];
+
+ classmarkInfo1.classmark = buffer[1];
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.33
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char channelMode:4;
+ unsigned char channel:4;
+} A_Ie_Chosen_Channel_t;
+*/
+
+A_Result_t
+A_EncodeChosenChannel(
+ A_Ie_Chosen_Channel_t &chosenChannel,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(chosenChannel.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_CHOSEN_CHANNEL_TYPE;
+
+ buffer[1] = ((chosenChannel.channelMode << 4) & 0xF0) | (chosenChannel.channel & 0x0F);
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeChosenChannel(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Chosen_Channel_t &chosenChannel)
+{
+ chosenChannel.ie_present = true;
+
+ chosenChannel.elementIdentifier = buffer[0];
+
+ chosenChannel.channelMode = buffer[1] >> 4;
+
+ chosenChannel.channel = buffer[1] & 0x0F;
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.44
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char algorithmId;
+} A_Ie_Chosen_Encrypt_Algorithm_t;
+*/
+
+A_Result_t
+A_EncodeChosenEncryptAlorithm(
+ A_Ie_Chosen_Encrypt_Algorithm_t &chosenAlgorithm,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(chosenAlgorithm.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_CHOSEN_ENCRYPTION_ALGORITHM_TYPE;
+
+ buffer[1] = chosenAlgorithm.algorithmId;
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeChosenEncryptAlorithm(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Chosen_Encrypt_Algorithm_t &chosenAlgorithm)
+{
+ chosenAlgorithm.ie_present = true;
+
+ chosenAlgorithm.elementIdentifier = buffer[0];
+
+ chosenAlgorithm.algorithmId = buffer[1];
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.45
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char circuitPoolNumber;
+} A_Ie_Circuit_Pool_t;
+*/
+
+A_Result_t
+A_EncodeCircuitPool(
+ A_Ie_Circuit_Pool_t &circuitPool,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(circuitPool.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_CIRCUIT_POOL_TYPE;
+
+ buffer[1] = circuitPool.circuitPoolNumber;
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeCircuitPool(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Circuit_Pool_t &circuitPool)
+{
+ circuitPool.ie_present = true;
+
+ circuitPool.elementIdentifier = buffer[0];
+
+ circuitPool.circuitPoolNumber = buffer[1];
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.46
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char circuitPoolList[32];
+} A_Ie_Circuit_Pool_List_t;
+*/
+
+A_Result_t
+A_EncodeCircuitPoolList(
+ A_Ie_Circuit_Pool_List_t &circuitPoolList,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(circuitPoolList.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_CIRCUIT_POOL_LIST_TYPE;
+
+ buffer[1] = circuitPoolList.length;
+
+ memcpy(&buffer[2], circuitPoolList.circuitPoolList, circuitPoolList.length);
+
+ ieLength = circuitPoolList.length + 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeCircuitPoolList(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Circuit_Pool_List_t &circuitPoolList)
+{
+ circuitPoolList.ie_present = true;
+
+ circuitPoolList.elementIdentifier = buffer[0];
+
+ circuitPoolList.length = buffer[1];
+
+ if (circuitPoolList.length > 0)
+ memcpy(circuitPoolList.circuitPoolList, &buffer[2], circuitPoolList.length);
+
+ ieLength = circuitPoolList.length + 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.49
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char channelMode:4;
+ unsigned char channel:4;
+} A_Ie_Current_Channel_Type1_t;
+*/
+
+A_Result_t
+A_EncodeCurrentChannelType1(
+ A_Ie_Current_Channel_Type1_t &currentChannelType,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(currentChannelType.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_CURRENT_CHANNEL_TYPE1_TYPE;
+
+ buffer[1] = ((currentChannelType.channelMode << 4) & 0xF0) | (currentChannelType.channel & 0x0F);
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeCurrentChannelType1(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Current_Channel_Type1_t &currentChannelType)
+{
+ currentChannelType.ie_present = true;
+
+ currentChannelType.elementIdentifier = buffer[0];
+
+ currentChannelType.channelMode = buffer[1] >> 4;
+
+ currentChannelType.channel = buffer[1] & 0x0F;
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.51
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char speechVersionId;
+} A_Ie_Speech_Version_t;
+*/
+
+A_Result_t
+A_EncodeSpeechVersion(
+ A_Ie_Speech_Version_t &speechVersion,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(speechVersion.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_SPEECH_VERSION_TYPE;
+
+ buffer[1] = speechVersion.speechVersionId & 0x7F;
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeSpeechVersion(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Speech_Version_t &speechVersion)
+{
+ speechVersion.ie_present = true;
+
+ speechVersion.elementIdentifier = buffer[0];
+
+ speechVersion.speechVersionId = buffer[1];
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.54
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+} A_Ie_Talker_Flag_t;
+*/
+
+A_Result_t
+A_EncodeTalkerFlag(
+ A_Ie_Talker_Flag_t &talkerFlag,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(talkerFlag.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_SPEECH_VERSION_TYPE;
+
+ ieLength = 1;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeTalkerFlag(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Talker_Flag_t &talkerFlag)
+{
+ talkerFlag.ie_present = true;
+
+ talkerFlag.elementIdentifier = buffer[0];
+
+ ieLength = 1;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.55
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char groupDesc[4];
+} A_Ie_Group_Call_Reference_t;
+*/
+
+A_Result_t
+A_EncodeGroupCallReference(
+ A_Ie_Group_Call_Reference_t &groupCallReference,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(groupCallReference.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_GROUP_CALL_REFERENCE_TYPE;
+
+ buffer[1] = groupCallReference.length;
+
+ memcpy(&buffer[2], groupCallReference.groupDesc, groupCallReference.length);
+
+ ieLength = groupCallReference.length + 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeGroupCallReference(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Group_Call_Reference_t &groupCallReference)
+{
+ groupCallReference.ie_present = true;
+
+ groupCallReference.elementIdentifier = buffer[0];
+
+ groupCallReference.length = buffer[1];
+
+ if (groupCallReference.length > 0)
+ memcpy(groupCallReference.groupDesc, &buffer[2], groupCallReference.length);
+
+ ieLength = groupCallReference.length + 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.57
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char SMI;
+} A_Ie_Config_Evolution_Indication_t;
+*/
+
+A_Result_t
+A_EncodeConfigEvolutionIndication(
+ A_Ie_Config_Evolution_Indication_t &configEvolutionIndication,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(configEvolutionIndication.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_GROUP_CALL_REFERENCE_TYPE;
+
+ buffer[1] = configEvolutionIndication.SMI & 0xF;
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeConfigEvolutionIndication(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Config_Evolution_Indication_t &configEvolutionIndication)
+{
+ configEvolutionIndication.ie_present = true;
+
+ configEvolutionIndication.elementIdentifier = buffer[0];
+
+ configEvolutionIndication.SMI = buffer[1] & 0xF;
+
+ ieLength = 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+// 3.2.2.59
+/*
+typedef struct {
+ bool ie_present:1;
+ unsigned char elementIdentifier;
+ unsigned char length;
+ unsigned char oldBssToNewBssIe[256];
+} A_Ie_Old_BSS_To_New_BSS_Info_t;
+*/
+
+A_Result_t
+A_EncodeBssToNewBssInfo(
+ A_Ie_Old_BSS_To_New_BSS_Info_t &oldBssToNewBssInfo,
+ int &ieLength,
+ unsigned char *buffer)
+{
+ if(oldBssToNewBssInfo.ie_present != true)
+ {
+ return A_IE_MISSING;
+ }
+
+ buffer[0] = A_OLD_BSS_TO_NEW_BSS_INFORMATION_TYPE;
+
+ buffer[1] = oldBssToNewBssInfo.length;
+
+ memcpy(&buffer[2], oldBssToNewBssInfo.oldBssToNewBssIe, oldBssToNewBssInfo.length);
+
+ ieLength = oldBssToNewBssInfo.length + 2;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeBssToNewBssInfo(
+ unsigned char *buffer,
+ int &ieLength,
+ A_Ie_Old_BSS_To_New_BSS_Info_t &oldBssToNewBssInfo)
+{
+ oldBssToNewBssInfo.ie_present = true;
+
+ oldBssToNewBssInfo.elementIdentifier = buffer[0];
+
+ oldBssToNewBssInfo.length = buffer[1];
+
+ if (oldBssToNewBssInfo.length > 0)
+ memcpy(oldBssToNewBssInfo.oldBssToNewBssIe, &buffer[2], oldBssToNewBssInfo.length);
+
+ ieLength = oldBssToNewBssInfo.length + 2;
+
+ return A_RESULT_SUCCESS;
+}
diff --git a/data/mnet/GP10/Host/cc/src/A_Handover_Request_Ack_Msg.cpp b/data/mnet/GP10/Host/cc/src/A_Handover_Request_Ack_Msg.cpp
new file mode 100644
index 0000000..da22395
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/A_Handover_Request_Ack_Msg.cpp
@@ -0,0 +1,235 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2001
+// All Rights Reserved
+//
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : ($CC)/src/A_Handover_Request_Ack_Msg.cpp
+// Author(s) : Tai Yu
+// Create Date : 05-15-01
+// Description : Source Vipercell Exteral Handover Request Ack Message
+// Encode and Decode Functions
+//
+// FILE DESCRIPTION:
+//
+//
+// CHANGE HISTORY:
+//
+// Date Description
+// ---------- --------------------------------------------
+// 2001-05-15 First Incarnation
+//
+// =================================================================
+
+#include "CC\A_Handover_Request_Ack_Msg.h"
+
+// 3.2.1.16
+A_Result_t
+A_EncodeHandoverRequestAck(
+ A_Handover_Request_Ack_t &handoverRequestAck,
+ unsigned char *buffer,
+ int &length
+ )
+{
+ A_Result_t resultCode;
+ int ieLength = 1;
+ int bufferIndex = 1;
+
+ if (length < 12)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+
+ // Encode message header
+ A_EncodeMessageType(A_HANDOVER_REQUEST_ACK_TYPE,
+ ieLength,
+ &buffer[0]);
+
+
+ if(handoverRequestAck.layer3Information.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeLayer3Information(
+ handoverRequestAck.layer3Information,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_MANDATORY_IE_RETURN_CODE(resultCode);
+ }
+ else
+ return A_MANDATORY_IE_MISSING;
+
+ if(handoverRequestAck.chosenChannel.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeChosenChannel(
+ handoverRequestAck.chosenChannel,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ if(handoverRequestAck.chosenEncryptAlgorithm.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeChosenEncryptAlorithm(
+ handoverRequestAck.chosenEncryptAlgorithm,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ if(handoverRequestAck.circuitPool.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeCircuitPool(
+ handoverRequestAck.circuitPool,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ if(handoverRequestAck.speechVersionChosen.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeSpeechVersion(
+ handoverRequestAck.speechVersionChosen,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ if(handoverRequestAck.circuitIdentityCode.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeCircuitIdentityCode(
+ handoverRequestAck.circuitIdentityCode,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ length = bufferIndex;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeHandoverRequestAck(
+ unsigned char *buffer,
+ int length,
+ A_Handover_Request_Ack_t &handoverRequestAck
+ )
+{
+ if(length < 12)
+ {
+ return A_MANDATORY_IE_MISSING;
+ }
+
+ A_Result_t resultCode;
+ int ieLength = 0;
+ int bufferIndex = 0;
+
+ resultCode = A_DecodeLayer3Information(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequestAck.layer3Information);
+
+ A_CHECK_MANDATORY_IE_RETURN_CODE(resultCode);
+
+ bufferIndex += ieLength;
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_CHOSEN_CHANNEL_TYPE))
+ {
+ resultCode = A_DecodeChosenChannel(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequestAck.chosenChannel);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_CHOSEN_ENCRYPTION_ALGORITHM_TYPE))
+ {
+ resultCode = A_DecodeChosenEncryptAlorithm(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequestAck.chosenEncryptAlgorithm);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_CIRCUIT_POOL_TYPE))
+ {
+ resultCode = A_DecodeCircuitPool(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequestAck.circuitPool);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_SPEECH_VERSION_TYPE))
+ {
+ resultCode = A_DecodeSpeechVersion(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequestAck.speechVersionChosen);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_CIRCUIT_IDENTITY_CODE_TYPE))
+ {
+ resultCode = A_DecodeCircuitIdentityCode(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequestAck.circuitIdentityCode);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ return A_RESULT_SUCCESS;
+}
diff --git a/data/mnet/GP10/Host/cc/src/A_Handover_Request_Msg.cpp b/data/mnet/GP10/Host/cc/src/A_Handover_Request_Msg.cpp
new file mode 100644
index 0000000..7eb6b53
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/A_Handover_Request_Msg.cpp
@@ -0,0 +1,600 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2001
+// All Rights Reserved
+//
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : ($CC)/src/A_Handover_Request_Msg.cpp
+// Author(s) : Tai Yu
+// Create Date : 05-15-01
+// Description : Source Vipercell Exteral Handover Request Message
+// Encode and Decode Functions
+//
+// FILE DESCRIPTION:
+//
+//
+// CHANGE HISTORY:
+//
+// Date Description
+// ---------- --------------------------------------------
+// 2001-05-15 First Incarnation
+//
+// =================================================================
+
+#include "CC\A_Handover_Request_Msg.h"
+
+// 3.2.1.16
+A_Result_t
+A_EncodeHandoverRequest(
+ A_Handover_Request_t &handoverRequest,
+ unsigned char *buffer,
+ int &length
+ )
+{
+ A_Result_t resultCode;
+ int ieLength = 1;
+ int bufferIndex = 1;
+
+ if (length < 23)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+
+ // Encode message header
+ A_EncodeMessageType(A_HANDOVER_REQUEST_TYPE,
+ ieLength,
+ &buffer[0]);
+
+ ieLength = 1;
+
+ if(handoverRequest.channelType.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeChannelType(
+ handoverRequest.channelType,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_MANDATORY_IE_RETURN_CODE(resultCode);
+ }
+ else
+ return A_MANDATORY_IE_MISSING;
+
+ if(handoverRequest.encryptionInformation.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeEncryptInformation(
+ handoverRequest.encryptionInformation,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_MANDATORY_IE_RETURN_CODE(resultCode);
+ }
+ else
+ return A_MANDATORY_IE_MISSING;
+
+ if(handoverRequest.classmarkInformation1.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeClassmarkInformation1(
+ handoverRequest.classmarkInformation1,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_MANDATORY_IE_RETURN_CODE(resultCode);
+ }
+ else
+ if(handoverRequest.classmarkInformation2.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeClassmarkInformation2(
+ handoverRequest.classmarkInformation2,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_MANDATORY_IE_RETURN_CODE(resultCode);
+ }
+ else
+ return A_MANDATORY_IE_MISSING;
+
+ if(handoverRequest.cellIdentifierServing.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeCellIdentifier(
+ handoverRequest.cellIdentifierServing,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_MANDATORY_IE_RETURN_CODE(resultCode);
+ }
+ else
+ return A_MANDATORY_IE_MISSING;
+
+ if(handoverRequest.priority.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodePriority(
+ handoverRequest.priority,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ if(handoverRequest.circuitIdentityCode.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeCircuitIdentityCode(
+ handoverRequest.circuitIdentityCode,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ if(handoverRequest.downlinkDTXFlag.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeDownlinkDTXFlag(
+ handoverRequest.downlinkDTXFlag,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ if(handoverRequest.cellIdentifierTarget.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeCellIdentifier(
+ handoverRequest.cellIdentifierTarget,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_MANDATORY_IE_RETURN_CODE(resultCode);
+ }
+ else
+ return A_MANDATORY_IE_MISSING;
+
+ if(handoverRequest.interferenceBandToBeUsed.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeInterferenceBandToBeUsed(
+ handoverRequest.interferenceBandToBeUsed,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ if(handoverRequest.cause.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeCause(
+ handoverRequest.cause,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ if(handoverRequest.classmarkInformation3.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeClassmarkInformation3(
+ handoverRequest.classmarkInformation3,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ if(handoverRequest.currentChannelType1.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeCurrentChannelType1(
+ handoverRequest.currentChannelType1,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ if(handoverRequest.speechVersionUsed.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeSpeechVersion(
+ handoverRequest.speechVersionUsed,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ if(handoverRequest.groupCallReference.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeGroupCallReference(
+ handoverRequest.groupCallReference,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ if(handoverRequest.talkerFlag.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeTalkerFlag(
+ handoverRequest.talkerFlag,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ if(handoverRequest.configEvolIndication.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeConfigEvolutionIndication(
+ handoverRequest.configEvolIndication,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ if(handoverRequest.chosenEncryptAlgorithmServing.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeChosenEncryptAlorithm(
+ handoverRequest.chosenEncryptAlgorithmServing,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ if(handoverRequest.oldBSSToNewBSSInfo.ie_present)
+ {
+ if(length <= bufferIndex)
+ {
+ return A_INCORRECT_LENGTH;
+ }
+ resultCode = A_EncodeBssToNewBssInfo(
+ handoverRequest.oldBSSToNewBSSInfo,
+ ieLength,
+ &buffer[bufferIndex]);
+ bufferIndex += ieLength;
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ }
+
+ length = bufferIndex;
+
+ return A_RESULT_SUCCESS;
+}
+
+A_Result_t
+A_DecodeHandoverRequest(
+ unsigned char *buffer,
+ int length,
+ A_Handover_Request_t &handoverRequest
+ )
+{
+ if(length < 12)
+ {
+ return A_MANDATORY_IE_MISSING;
+ }
+
+ A_Result_t resultCode;
+ int ieLength = 0;
+ int bufferIndex = 0;
+
+ resultCode = A_DecodeChannelType(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequest.channelType);
+
+ A_CHECK_MANDATORY_IE_RETURN_CODE(resultCode);
+
+ bufferIndex += ieLength;
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_ENCRYPTION_INFORMATION_TYPE))
+ {
+ resultCode = A_DecodeEncryptInformation(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequest.encryptionInformation);
+
+ A_CHECK_MANDATORY_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+ else
+ return A_MANDATORY_IE_MISSING;
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_CLASSMARK_INFORMATION1_TYPE))
+ {
+ resultCode = A_DecodeClassmarkInformation1(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequest.classmarkInformation1);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ } else
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_CLASSMARK_INFORMATION2_TYPE))
+ {
+ resultCode = A_DecodeClassmarkInformation2(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequest.classmarkInformation2);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+ else
+ return A_MANDATORY_IE_MISSING;
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_CELL_IDENTIFIER_TYPE))
+ {
+ resultCode = A_DecodeCellIdentifier(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequest.cellIdentifierServing);
+
+ A_CHECK_MANDATORY_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+ else
+ return A_MANDATORY_IE_MISSING;
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_PRIORITY_TYPE))
+ {
+ resultCode = A_DecodePriority(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequest.priority);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_CIRCUIT_IDENTITY_CODE_TYPE))
+ {
+ resultCode = A_DecodeCircuitIdentityCode(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequest.circuitIdentityCode);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_DOWNLINK_DTX_FLAG_TYPE))
+ {
+ resultCode = A_DecodeDownlinkDTXFlag(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequest.downlinkDTXFlag);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_CELL_IDENTIFIER_TYPE))
+ {
+ resultCode = A_DecodeCellIdentifier(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequest.cellIdentifierTarget);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_INTERFERENCE_BAND_TO_BE_USED_TYPE))
+ {
+ resultCode = A_DecodeInterferenceBandToBeUsed(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequest.interferenceBandToBeUsed);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_CAUSE_TYPE))
+ {
+ resultCode = A_DecodeCause(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequest.cause);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_CLASSMARK_INFORMATION3_TYPE))
+ {
+ resultCode = A_DecodeClassmarkInformation3(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequest.classmarkInformation3);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_CURRENT_CHANNEL_TYPE1_TYPE))
+ {
+ resultCode = A_DecodeCurrentChannelType1(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequest.currentChannelType1);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_SPEECH_VERSION_TYPE))
+ {
+ resultCode = A_DecodeSpeechVersion(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequest.speechVersionUsed);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_GROUP_CALL_REFERENCE_TYPE))
+ {
+ resultCode = A_DecodeGroupCallReference(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequest.groupCallReference);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_TALKER_FLAG_TYPE))
+ {
+ resultCode = A_DecodeTalkerFlag(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequest.talkerFlag);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_CONFIGURATION_EVOLUTION_INDICATION))
+ {
+ resultCode = A_DecodeConfigEvolutionIndication(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequest.configEvolIndication);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_CHOSEN_ENCRYPTION_ALGORITHM_TYPE))
+ {
+ resultCode = A_DecodeChosenEncryptAlorithm(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequest.chosenEncryptAlgorithmServing);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ if((length > bufferIndex) &&
+ (buffer[bufferIndex] == A_OLD_BSS_TO_NEW_BSS_INFORMATION_TYPE))
+ {
+ resultCode = A_DecodeBssToNewBssInfo(
+ &buffer[bufferIndex],
+ ieLength,
+ handoverRequest.oldBSSToNewBSSInfo);
+
+ A_CHECK_OPTIONAL_IE_RETURN_CODE(resultCode);
+ bufferIndex += ieLength;
+ }
+
+ return A_RESULT_SUCCESS;
+}
diff --git a/data/mnet/GP10/Host/cc/src/CCBldMSMsg.cpp b/data/mnet/GP10/Host/cc/src/CCBldMSMsg.cpp
new file mode 100644
index 0000000..f8e6387
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CCBldMSMsg.cpp
@@ -0,0 +1,523 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCBldMSMsg.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// included VxWorks headers
+#include "vxWorks.h"
+
+#include "JCC/JCCLog.h"
+#include "Logging/VCLOGGING.h"
+
+// included L3 Message header for messages from other Layer 3 modules (CC, RR)
+#include "JCC/JCCL3Msg.h"
+
+#include "CC/CCHalfCall.h"
+
+#include "CC/CCSessionHandler.h"
+
+#include "ril3/ril3_common.h"
+
+#include "ril3/ril3md.h"
+
+#include "pm/pm_class.h"
+
+#include "CC/CallLeg.h"
+
+void
+CCHalfCall::buildMSMsgCommon()
+{
+ // But, before we start populating the message content,
+ // zap it clean first.
+ DBG_FUNC("CCHalfCall::buildMSMsgCommon", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ CNI_RIL3_ZAPMSG(&msOutMsg, sizeof(T_CNI_RIL3CC_MSG));
+
+ // header portion --------------------------------------------------
+ msOutMsg.header.protocol_descriminator = CNI_RIL3_PD_CC;
+ msOutMsg.header.si_ti = ti;
+ DBG_LEAVE();
+}
+
+T_CNI_RIL3_RESULT
+CCHalfCall::buildMSMsg(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+
+ DBG_FUNC("CCHalfCall::buildMSMsg", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // call the Encoder function to encode the message
+ msOutResult = CNI_RIL3CC_Encode(&msOutMsg, // input message definition
+ msEncodedMsg // encoded layer-3 message
+ );
+
+ // check the encoding result before sending the message
+ if (msOutResult != CNI_RIL3_RESULT_SUCCESS)
+ {
+ JCCLog1("CC Error : Encoding MS Message (Problem = %d) \n ",
+ msOutResult);
+ DBG_ERROR("CC Error : Encoding MS Message (Problem = %d) \n ",
+ msOutResult);
+ }
+ else
+ {
+ // encoding successful, send the message to LAPDm for delivery
+ parent->parent->sendL2Msg(msEncodedMsg);
+
+ JCCLog1("CC Call Log: Sent Message to LAPDm, (Message Type = %d)\n",
+ msOutMsg.header.message_type);
+ DBG_TRACE("CC Call Log: Sent Message to LAPDm, (Message Type = %d)\n",
+ msOutMsg.header.message_type);
+
+ }
+
+ DBG_LEAVE();
+ return (msOutResult);
+}
+
+T_CNI_RIL3_RESULT
+CCHalfCall::buildStartDtmfAck(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ T_CNI_RIL3CC_MSG_START_DTMF_ACK
+ *startDTMFAck
+ = &msOutMsg.startDTMFAck ;
+
+ DBG_FUNC("CCHalfCall::buildStartDtmfAck", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ buildMSMsgCommon();
+
+ msOutMsg.header.message_type = CNI_RIL3CC_MSGID_START_DTMF_ACKNOWLEDGE;
+ startDTMFAck->keypadFacility = currKeypadFacility_;
+
+ DBG_LEAVE();
+ return (buildMSMsg(msEncodedMsg));
+}
+
+T_CNI_RIL3_RESULT
+CCHalfCall::buildStartDtmfRej(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ T_CNI_RIL3CC_MSG_START_DTMF_REJECT
+ *startDTMFReject
+ = &msOutMsg.startDTMFReject ;
+
+ DBG_FUNC("CCHalfCall::buildStartDtmfRej", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ buildMSMsgCommon();
+
+ msOutMsg.header.message_type = CNI_RIL3CC_MSGID_START_DTMF_REJECT;
+
+ // Worry about exact reason later!
+ startDTMFReject->cause = rlsCause;
+
+ DBG_LEAVE();
+ return (buildMSMsg(msEncodedMsg));
+}
+
+T_CNI_RIL3_RESULT
+CCHalfCall::buildStopDtmfAck(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ T_CNI_RIL3CC_MSG_STOP_DTMF_ACK
+ *stopDTMFAck
+ = &msOutMsg.stopDTMFAck ;
+
+ DBG_FUNC("CCHalfCall::buildStopDtmfAck", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ buildMSMsgCommon();
+
+ msOutMsg.header.message_type = CNI_RIL3CC_MSGID_STOP_DTMF_ACKNOWLEDGE;
+
+ DBG_LEAVE();
+ return (buildMSMsg(msEncodedMsg));
+}
+
+T_CNI_RIL3_RESULT
+CCHalfCall::buildAlerting(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ T_CNI_RIL3CC_MSG_ALERTING
+ *alerting
+ = &msOutMsg.alerting ;
+
+ DBG_FUNC("CCHalfCall::buildAlerting", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ buildMSMsgCommon();
+
+ msOutMsg.header.message_type = CNI_RIL3CC_MSGID_ALERTING;
+
+ //Test Code
+ //msOutMsg.alerting.progressInd = h323InMsg->l3_data.voipMsg.basicCallInMsg.EventInfo.AlertingProgressIE;
+ DBG_TRACE("CC CALL LOG: progressIE info exist(%d) codingStd(%d) loc(%d) desc(%d)\n",
+ h323InMsg->l3_data.voipMsg.basicCallInMsg.EventInfo.AlertingProgressIE.ie_present,
+ h323InMsg->l3_data.voipMsg.basicCallInMsg.EventInfo.AlertingProgressIE.codingStandard,
+ h323InMsg->l3_data.voipMsg.basicCallInMsg.EventInfo.AlertingProgressIE.location,
+ h323InMsg->l3_data.voipMsg.basicCallInMsg.EventInfo.AlertingProgressIE.progressDesp);
+
+ DBG_LEAVE();
+ return (buildMSMsg(msEncodedMsg));
+}
+
+
+T_CNI_RIL3_RESULT
+CCHalfCall::buildProgress(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ T_CNI_RIL3CC_MSG_PROGRESS
+ *progress
+ = &msOutMsg.progress ;
+
+ DBG_FUNC("CCHalfCall::buildProgress", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ //Test Code
+ DBG_TRACE("CC CALL LOG: buildProgress progress IE info exist(%d) codingStd(%d) loc(%d) desc(%d)\n",
+ h323InMsg->l3_data.voipMsg.basicCallInMsg.EventInfo.AlertingProgressIE.ie_present,
+ h323InMsg->l3_data.voipMsg.basicCallInMsg.EventInfo.AlertingProgressIE.codingStandard,
+ h323InMsg->l3_data.voipMsg.basicCallInMsg.EventInfo.AlertingProgressIE.location,
+ h323InMsg->l3_data.voipMsg.basicCallInMsg.EventInfo.AlertingProgressIE.progressDesp);
+
+ buildMSMsgCommon();
+ msOutMsg.header.message_type = CNI_RIL3CC_MSGID_PROGRESS;
+ msOutMsg.progress.progressInd = h323InMsg->l3_data.voipMsg.basicCallInMsg.EventInfo.AlertingProgressIE;
+
+ DBG_LEAVE();
+ return (buildMSMsg(msEncodedMsg));
+}
+
+T_CNI_RIL3_RESULT
+CCHalfCall::buildCallProceeding(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ T_CNI_RIL3CC_MSG_CALL_PROCEEDING
+ *callProceeding
+ = &msOutMsg.callProceeding ;
+
+ DBG_FUNC("CCHalfCall::buildCallProceeding", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ buildMSMsgCommon();
+
+ msOutMsg.header.message_type = CNI_RIL3CC_MSGID_CALL_PROCEEDING;
+
+ // Add Bearer Capability standard one from the local variable.
+ callProceeding->bearCap1 = bearerCap;
+
+ DBG_LEAVE();
+ return (buildMSMsg(msEncodedMsg));
+}
+
+T_CNI_RIL3_RESULT
+CCHalfCall::buildConnect(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ T_CNI_RIL3CC_MSG_CONNECT
+ *connect
+ = &msOutMsg.connect;
+
+ DBG_FUNC("CCHalfCall::buildConnect", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ buildMSMsgCommon();
+
+ msOutMsg.header.message_type = CNI_RIL3CC_MSGID_CONNECT;
+
+ DBG_LEAVE();
+ return (buildMSMsg(msEncodedMsg));
+}
+
+T_CNI_RIL3_RESULT
+CCHalfCall::buildConnectAck(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ DBG_FUNC("CCHalfCall::buildConnectAck", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ buildMSMsgCommon();
+
+ // No IEs in this message other than header.
+ msOutMsg.header.message_type = CNI_RIL3CC_MSGID_CONNECT_ACKNOWLEDGE;
+
+ // peg
+ PM_CCMeasurement.ansMobileTerminatingCalls.increment();
+
+ DBG_LEAVE();
+ return (buildMSMsg(msEncodedMsg));
+}
+
+T_CNI_RIL3_RESULT
+CCHalfCall::buildDisconnect(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ T_CNI_RIL3CC_MSG_DISCONNECT
+ *disconnect
+ = &msOutMsg.disconnect ;
+
+ DBG_FUNC("CCHalfCall::buildDisconnect", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ buildMSMsgCommon();
+
+ msOutMsg.header.message_type = CNI_RIL3CC_MSGID_DISCONNECT;
+
+ disconnect->cause = rlsCause;
+ DBG_LEAVE();
+ return (buildMSMsg(msEncodedMsg));
+}
+
+T_CNI_RIL3_RESULT
+CCHalfCall::buildReleaseComplete(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ T_CNI_RIL3CC_MSG_RELEASE_COMPLETE
+ *releaseComplete
+ = &msOutMsg.releaseComplete;
+
+ DBG_FUNC("CCHalfCall::buildReleaseComplete", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ buildMSMsgCommon();
+
+ msOutMsg.header.message_type =CNI_RIL3CC_MSGID_RELEASE_COMPLETE;
+
+ releaseComplete->cause = rlsCause;
+
+ DBG_LEAVE();
+ return (buildMSMsg(msEncodedMsg));
+}
+
+T_CNI_RIL3_RESULT
+CCHalfCall::buildReleaseReq(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ T_CNI_RIL3CC_MSG_RELEASE
+ *release
+ = &msOutMsg.release ;
+
+ DBG_FUNC("CCHalfCall::buildReleaseReq", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ buildMSMsgCommon();
+
+ msOutMsg.header.message_type = CNI_RIL3CC_MSGID_RELEASE;
+
+ release->cause = rlsCause;
+
+ DBG_LEAVE();
+ return (buildMSMsg(msEncodedMsg));
+}
+
+T_CNI_RIL3_RESULT
+CCHalfCall::buildSetup(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ T_CNI_RIL3CC_MSG_SETUP
+ *setup
+ = &msOutMsg.setup ;
+
+ DBG_FUNC("CCHalfCall::buildSetup", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ buildMSMsgCommon();
+
+ msOutMsg.header.message_type = CNI_RIL3CC_MSGID_SETUP;
+
+ // Add Bearer Capability standard one from the local variable.
+ setup->bearCap1 = bearerCap;
+
+ setup->callingBCD = callingPartyNum;
+
+ if(parent->waitingCallLeg)
+ {
+ // Add signal Information Element
+ setup->signal.ie_present = true;
+ setup->signal.signalValue = CNI_RIL3_SIGNAL_CALL_WAITING_TONE_ON;
+ }
+
+ // peg
+ PM_CCMeasurement.attMobileTerminatingCalls.increment();
+
+ DBG_LEAVE();
+ return (buildMSMsg(msEncodedMsg));
+}
+
+
+//CH<xxu:11-10-99>
+T_CNI_RIL3_RESULT
+CCHalfCall::buildHoldAck(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ DBG_FUNC("CCHalfCall::buildHoldAck", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ buildMSMsgCommon();
+
+ msOutMsg.header.message_type = CNI_RIL3CC_MSGID_HOLD_ACKNOWLEDGE;
+
+ DBG_LEAVE();
+ return (buildMSMsg(msEncodedMsg));
+
+}
+
+//CH<xxu:11-10-99>
+T_CNI_RIL3_RESULT
+CCHalfCall::buildRetvAck(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ DBG_FUNC("CCHalfCall::buildRetvAck", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ buildMSMsgCommon();
+
+ msOutMsg.header.message_type = CNI_RIL3CC_MSGID_RETRIEVE_ACKNOWLEDGE;
+
+ DBG_LEAVE();
+ return (buildMSMsg(msEncodedMsg));
+
+}
+
+//CH<xxu:11-10-99>
+T_CNI_RIL3_RESULT
+CCHalfCall::buildHoldRej(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ T_CNI_RIL3CC_MSG_HOLD_REJECT
+ *holdReject
+ = &msOutMsg.holdReject ;
+
+ DBG_FUNC("CCHalfCall::buildHoldRej", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ buildMSMsgCommon();
+
+ msOutMsg.header.message_type = CNI_RIL3CC_MSGID_HOLD_REJECT;
+
+ //Mandatory IE: cause
+ holdReject->cause.ie_present = true;
+ holdReject->cause.codingStandard = CNI_RIL3_GSMPLMN_CODING;
+ holdReject->cause.location =CNI_RIL3_LOCATION_PRIVATE_NETWORK_LOCAL_USER;
+ holdReject->cause.causeValue = chCause_;
+ holdReject->cause.diagnosticsLength = 0;
+
+ DBG_LEAVE();
+ return (buildMSMsg(msEncodedMsg));
+}
+
+//CH<xxu:11-10-99>
+T_CNI_RIL3_RESULT
+CCHalfCall::buildRetvRej(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ T_CNI_RIL3CC_MSG_RETRIEVE_REJECT
+ *retvReject
+ = &msOutMsg.retrieveReject;
+
+ DBG_FUNC("CCHalfCall::buildRetvRej", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ buildMSMsgCommon();
+
+ msOutMsg.header.message_type = CNI_RIL3CC_MSGID_RETRIEVE_REJECT;
+
+ //Mandatory IE: cause
+ retvReject->cause.ie_present = true;
+ retvReject->cause.codingStandard = CNI_RIL3_GSMPLMN_CODING;
+ retvReject->cause.location =CNI_RIL3_LOCATION_PRIVATE_NETWORK_LOCAL_USER;
+ retvReject->cause.causeValue = chCause_;
+ retvReject->cause.diagnosticsLength = 0;
+
+ DBG_LEAVE();
+ return (buildMSMsg(msEncodedMsg));
+
+}
+
+T_CNI_RIL3_RESULT
+CCHalfCall::buildStatusInfo(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ T_CNI_RIL3CC_MSG_STATUS
+ *statusMsg
+ = &msOutMsg.status;
+
+ DBG_FUNC("CCHalfCall::buildStatusInfo", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ buildMSMsgCommon();
+
+ msOutMsg.header.message_type = CNI_RIL3CC_MSGID_STATUS;
+
+ // Mandatory IE: cause
+ statusMsg->cause = rlsCause;
+ if (msDecodeResult == CNI_RIL3_RESULT_SUCCESS) // not caused by protocol errors
+ {
+ DBG_TRACE("CC Call Log: Response to status enquiry\n");
+ statusMsg->cause.causeValue = CNI_RIL3_CAUSE_RESPONSE_TO_STATUS_ENQUIRY;
+ }
+ else
+ {
+ DBG_TRACE("CC Call Log: status message because of decoding error, (dec.res.=%d)\n",
+ msDecodeResult);
+ }
+
+ // Mandatory IE: call state
+ statusMsg->callState.ie_present = true;
+ statusMsg->callState.codingStandard = CNI_RIL3_GSMPLMN_CODING;
+
+ switch(callState_) {
+ case HC_ST_DISCONNECT_IND:
+ statusMsg->callState.state = CNI_RIL3_CALL_STATE_DISCONNECT_INDICATION;
+ break;
+ case HC_ST_RELEASE_REQ:
+ statusMsg->callState.state = CNI_RIL3_CALL_STATE_RELEASE_REQUEST;
+ break;
+ case HC_ST_ACTIVE:
+ statusMsg->callState.state = CNI_RIL3_CALL_STATE_ACTIVE;
+ break;
+ case THC_ST_MM_CONN_REQ:
+ statusMsg->callState.state = CNI_RIL3_CALL_STATE_MM_CONNECTION_PENDING;
+ break;
+ case THC_ST_CALL_CONFIRMED:
+ statusMsg->callState.state = CNI_RIL3_CALL_STATE_MT_CALL_CONFIRMED;
+ break;
+ case THC_ST_ALERTING:
+ statusMsg->callState.state = CNI_RIL3_CALL_STATE_CALL_RECEIVED;
+ break;
+ case THC_ST_PRESENTING_CALL:
+ statusMsg->callState.state = CNI_RIL3_CALL_STATE_CALL_PRESENT;
+ break;
+ case OHC_ST_CONNECT_INDICATION:
+ statusMsg->callState.state = CNI_RIL3_CALL_STATE_CONNECT_INDICATION;
+ break;
+ case OHC_ST_ANSWER_PENDING:
+ statusMsg->callState.state = CNI_RIL3_CALL_STATE_CALL_DELIVERED;
+ break;
+ case OHC_ST_CALL_PROCEEDING:
+ case OHC_ST_OFFERING_CALL:
+ statusMsg->callState.state = CNI_RIL3_CALL_STATE_MO_CALL_PROCEEDING;
+ break;
+ case HC_ST_NULL:
+ statusMsg->callState.state = CNI_RIL3_CALL_STATE_NULL;
+ break;
+ default:
+ statusMsg->callState.state = CNI_RIL3_CALL_STATE_NULL;
+
+ }
+
+ if (chState_ != CH_ST_IDLE)
+ {
+ statusMsg->auxStates.ie_present = true;
+ statusMsg->auxStates.holdState = (T_CNI_RIL3_HOLD_AUXILIARY_STATES)(chState_ - 1);
+ // Change when multiparty is implemented.
+ statusMsg->auxStates.mptyState = CNI_RIL3_MPTY_STATE_IDLE;
+ }
+
+ DBG_LEAVE();
+ return (buildMSMsg(msEncodedMsg));
+
+}
diff --git a/data/mnet/GP10/Host/cc/src/CCExtHoTrgHnd.cpp b/data/mnet/GP10/Host/cc/src/CCExtHoTrgHnd.cpp
new file mode 100644
index 0000000..ef2ee0e
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CCExtHoTrgHnd.cpp
@@ -0,0 +1,3591 @@
+
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCExtHoTrgHnd.cpp
+// Author(s) : Xiaode Xu
+// Create Date : 06-07-01
+// Description : External Handover--Handin&PostHandin trg-GP handlers
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+//
+
+#include "CC/CCHandover.h"
+
+#include "CC/CCSessionHandler.h"
+
+#include "CC/CCUtil.h"
+
+#include "CC/CallConfig.h"
+
+#include "jcc/JCCLog.h"
+#include "logging/VCLOGGING.h"
+
+#include "stdio.h"
+
+// Temporarily use csu_head instead of csu_intf
+#include "csunew/csu_head.h"
+
+#include "CC/hortp.h"
+
+#include "lapdm/cni_debug.h"
+
+#include "pm/pm_class.h"
+
+extern MSG_Q_ID ccMsgQId;
+
+#include "cc/a_handover_common.h"
+#include "voip/vblink.h"
+#include "voip/exchangeho.h"
+
+#define TICKS_PER_10MS (sysClkRateGet()) / 100
+
+extern bool useViperBase;
+extern GlobalCellId_t MY_GLOBALCELL_ID;
+extern INT32 forcedHandover;
+extern INT32 forcedHandmsc3;
+extern GlobalCellId_t ccHoTrgGlobalCellId;
+extern UINT32 ccHoTrgCellIpAddress;
+
+
+extern T_CNI_LAPDM_OID rm_GetOid (T_CNI_IRT_ID entryId, T_CNI_LAPDM_SAPI sapi);
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+int
+CCTargetHandoverExtHo::handleHoaCcMsg(InterHoaVcMsg_t *hoaCcInMsg)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleHoaCcMsg", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ CCHandover::handleHoaCcMsg(hoaCcInMsg);
+
+ DBG_LEAVE();
+ return(smHandleEvent());
+}
+
+int
+CCTargetHandoverExtHo::smHandleEvent(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::smHandleEvent", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ int returnValue = 0;
+
+ if (currEvent != JCC_NULL_EVENT)
+ {
+ currEvent =
+ (this->*extHoTrgHandler[hoState_][currEvent - HAND_SRC_EVENT_BASE])();
+ }
+
+ switch(currEvent)
+ {
+ case CC_RELEASE_CALL:
+ returnValue = ccReleaseCall();
+ break;
+
+ case CC_RELEASE_OWN:
+ returnValue = ccReleaseOwn();
+ break;
+
+ case CC_RELEASE_GP_HO:
+ ccReleaseGpHo();
+ break;
+
+ case CC_RELEASE_GP_HB:
+ ccReleaseGpHb();
+ break;
+
+ case CC_RELEASE_GP_H3:
+ ccReleaseGpH3();
+ break;
+
+ case CC_RELEASE_EH_HB:
+ ccReleaseEhHb();
+ break;
+
+ case CC_RELEASE_GP_EH_HB:
+ ccReleaseGpEhHb();
+ break;
+
+ case CC_MESSAGE_PROCESSING_COMPLT:
+ case JCC_NULL_EVENT:
+ // Do Nothing
+ break;
+
+ default:
+ DBG_ERROR("{\nMNETeiTRACE(etgt::smHandleEvent): Got Bad Event (event=%d, hoState=%d, callId=%d)\n}\n",
+ currEvent, hoState_, callIndex);
+ break;
+ }
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::smHandleEvent): Event Handled (event=%d, currEvent=%d)\n}\n",
+ currEvent, returnValue);
+
+ DBG_LEAVE();
+ return(returnValue);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleAnchToTrgPerfHoReq(void)
+{
+ int i;
+ A_Result_t result;
+ bool found = false;
+ T_CNI_RIL3_SPEECH_VERSION speechVer;
+ int choosenEncryption;
+
+ DBG_FUNC("CCTargetHandoverExtHo::handleAnchToTrgPerfHoReq", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ //Copy the Anchor information.
+ hoAgId_ = hoaInMsg->origSubId;
+ hoNumber_ = hoaInMsg->msgData.perfExtHandoverReq.handoverNumber;
+
+ DBG_CALL_TRACE(hoaInMsg->origSubId, "{\nMNETeiTRACE(etrg::handleAnchToTrgPerfHoReq): [<==HOA PERFORM_HANDOVER_REQ] (hoAgId=%d, callId=%d)\n}\n",
+ hoaInMsg->origSubId, hoaInMsg->destSubId);
+
+ //Decode A-interface message
+ memset( (char*)&aifMsg, 0, sizeof(T_AIF_MSG));
+
+ if ( A_RESULT_SUCCESS != (result=
+ AIF_Decode((T_AIF_MessageUnit*)&(hoaInMsg->msgData.perfExtHandoverReq.A_HANDOVER_REQUEST), &aifMsg)) )
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleAnchToTrgPerfHoReq): A-MSG decoding err (err=%d, hoAgId_=%d)\nA-MSG:\n",
+ result, hoAgId_);
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleAnchToTrgPerfHoReq) Received A-HANDOVER_REQ DUMP (length=%d): \n",
+ hoaInMsg->msgData.perfExtHandoverReq.A_HANDOVER_REQUEST.msglength);
+
+ DBG_HEXDUMP(
+ (unsigned char*)hoaInMsg->msgData.perfExtHandoverReq.A_HANDOVER_REQUEST.A_INTERFACE_DATA,
+ (int)hoaInMsg->msgData.perfExtHandoverReq.A_HANDOVER_REQUEST.msglength
+ );
+ DBG_TRACE("\n END-OF-DUMP\n}\n");
+
+ DBG_ERROR("\n}\n");
+
+ //remember reason
+ hoEndCause_ = MC_HO_UNEXPECTED_DATA_VALUE; //EHOcause
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleAnchToTrgPerfHoReq) Received A-INTERFACE-MSG DUMP (length=%d): \n",
+ hoaInMsg->msgData.perfExtHandoverReq.A_HANDOVER_REQUEST.msglength);
+ DBG_HEXDUMP(
+ (unsigned char*)hoaInMsg->msgData.perfExtHandoverReq.A_HANDOVER_REQUEST.A_INTERFACE_DATA,
+ (int)hoaInMsg->msgData.perfExtHandoverReq.A_HANDOVER_REQUEST.msglength
+ );
+ DBG_TRACE("\n END-OF-DUMP\n}\n");
+
+ if (aifMsg.msgType != A_HANDOVER_REQUEST_TYPE)
+ {
+ //Unexpected A-MSG received, ignore but report
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleAnchToTrgPerfHoReq): unexpected A-MSG (msgType=%d,hoState_=%d)\n}\n",
+ aifMsg.msgType, hoState_);
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ //Build a message sent to MM for Handover Req. Only allow voice handover now
+ A_Handover_Request_t *pRequest = (A_Handover_Request_t*)&aifMsg.handoverRequest;
+
+ //Check if a good Current Channel IE contained in the A-MESSAGE
+ if ( (pRequest->channelType.speechDataIndicator != 1) || //1-speech
+ (pRequest->channelType.channelRateAndType != 8) ) //8-TCH F
+ {
+ DBG_WARNING("{\nMNETeiWARNING(etrg::handleAnchToTrgPerfHoReq): bad currChannel IE (iePresent=%d, speechDataIndicator=%d, channelRateAndType=%d)\n}\n",
+ pRequest->channelType.ie_present,
+ pRequest->channelType.speechDataIndicator,
+ pRequest->channelType.channelRateAndType);
+
+ hoEndCause_ = MC_HO_UNEXPECTED_DATA_VALUE; //EHOcause
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+////Check if a good Speech Version (used) IE contained in the A-MESSAGE
+//if ( !(pRequest->speechVersionUsed.ie_present) ||
+// !( (pRequest->speechVersionUsed.speechVersionId == 0x01) || //FR
+// (pRequest->speechVersionUsed.speechVersionId == 0x21) ) ) //EFR
+//{
+// DBG_WARNING("{\nMNETeiWARNING(etrg::handleAnchToTrgPerfHoReq): bad speechVersionUsed IE (iePresent=%d, speechVerison=%x)\n}\n",
+// pRequest->speechVersionUsed.ie_present,
+// pRequest->speechVersionUsed.speechVersionId);
+//
+// hoEndCause_ = MC_HO_UNEXPECTED_DATA_VALUE; //EHOcause
+
+// DBG_LEAVE();
+// return (CC_RELEASE_CALL);
+//}
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleAnchToTrgPerfHoReq) MESSAGE DATA:\n");
+ DBG_TRACE(" : hoAgId_=%d, callId=%d\n",hoAgId_, callIndex);
+ DBG_TRACE(" : hoGlobalCellId_ (type=%d, mcc[1-3]:%x,%x,%x; mnc[1-3]:%x,%x,%x;lac=%x,ci=%x)\n",
+ hoGlobalCellId_.ci_disc,hoGlobalCellId_.mcc[0],hoGlobalCellId_.mcc[1],hoGlobalCellId_.mcc[2],
+ hoGlobalCellId_.mnc[0],hoGlobalCellId_.mnc[1],hoGlobalCellId_.mnc[2],hoGlobalCellId_.lac,hoGlobalCellId_.ci);
+ DBG_TRACE(" : hoNumber_ (present=%d,numberType=%d,numberingPlan=%d,numDigits=%d)\n",
+ hoNumber_.ie_present,hoNumber_.numberType,hoNumber_.numberingPlan,hoNumber_.numDigits);
+ DBG_TRACE(" (digits[1-10]:%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x)\n",
+ hoNumber_.digits[0],hoNumber_.digits[1],hoNumber_.digits[1],
+ hoNumber_.digits[3],hoNumber_.digits[4],hoNumber_.digits[5],
+ hoNumber_.digits[6],hoNumber_.digits[7],hoNumber_.digits[8],
+ hoNumber_.digits[9],hoNumber_.digits[10]);
+ DBG_TRACE("\n : Handover Number Hex Dump:\n");
+ DBG_HEXDUMP( (unsigned char*) &hoNumber_, sizeof(T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER));
+ DBG_TRACE("\n");
+ DBG_TRACE(" : speechDataIndicator=%d, channelRateAndType=%d, permittedIndicator[0-7]=%x,%x,%x,%x,%x,%x,%x,%x\n",
+ pRequest->channelType.speechDataIndicator,
+ pRequest->channelType.channelRateAndType,
+ pRequest->channelType.permittedIndicator[0],
+ pRequest->channelType.permittedIndicator[1],
+ pRequest->channelType.permittedIndicator[2],
+ pRequest->channelType.permittedIndicator[3],
+ pRequest->channelType.permittedIndicator[4],
+ pRequest->channelType.permittedIndicator[5],
+ pRequest->channelType.permittedIndicator[6],
+ pRequest->channelType.permittedIndicator[7]);
+
+ DBG_TRACE(" : ciphData (ciphAlog=%d, ciphKey[1-8]: %x,%x,%x,%x,%x,%x,%x,%x)\n}\n",
+ pRequest->encryptionInformation.permittedAlgorithm,
+ pRequest->encryptionInformation.key[0],
+ pRequest->encryptionInformation.key[1],
+ pRequest->encryptionInformation.key[2],
+ pRequest->encryptionInformation.key[3],
+ pRequest->encryptionInformation.key[4],
+ pRequest->encryptionInformation.key[5],
+ pRequest->encryptionInformation.key[6],
+ pRequest->encryptionInformation.key[7]);
+
+ // Store requested encryption and channel type info for negotiation
+ reqEncrypt_ = pRequest->encryptionInformation;
+ reqChannelType_ = pRequest->channelType;
+
+ // Negotiate encryption
+ choosenEncryption = selectEncryption();
+
+ if (choosenEncryption == -1)
+ {
+ currEncrypt_.cmd.cipherModeSetting.ciphering = CNI_RIl3_CIPHER_NO_CIPHERING;
+ }
+ else
+ {
+ currEncrypt_.cmd.cipherModeSetting.ciphering = CNI_RIl3_CIPHER_START_CIPHERING;
+ currEncrypt_.cmd.cipherModeSetting.algorithm = (T_CNI_RIL3_CIPHER_ALGORITHM) choosenEncryption;
+
+ memcpy( (unsigned char*) currEncrypt_.Kc, (unsigned char*) pRequest->encryptionInformation.key, 8);
+ }
+
+ // Negotiate codec
+ speechVer = (T_CNI_RIL3_SPEECH_VERSION) selectChannelType();
+
+ if (speechVer == -1)
+ {
+ DBG_WARNING("{\nMNETeiWARNING(etrg::handleAnchToTrgPerfHoReq): bad currChannel IE (permittedIndicator[0-7]=%x,%x,%x,%x,%x,%x,%x.%x)\n}\n",
+ pRequest->channelType.permittedIndicator[0],
+ pRequest->channelType.permittedIndicator[1],
+ pRequest->channelType.permittedIndicator[2],
+ pRequest->channelType.permittedIndicator[3],
+ pRequest->channelType.permittedIndicator[4],
+ pRequest->channelType.permittedIndicator[5],
+ pRequest->channelType.permittedIndicator[6],
+ pRequest->channelType.permittedIndicator[7]);
+
+ hoEndCause_ = MC_HO_UNEXPECTED_DATA_VALUE; //EHOcause
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ currSpeechCh_.version = speechVer;
+ currChannel_.bearerType = BEARER_SPEECH;
+ currChannel_.speechChann.version = speechVer;
+ currClassmark_ = pRequest->classmarkInformation2;
+
+ memcpy( (unsigned char*) &(mmOutMsg.l3_data.handReq.cipherCmd), (unsigned char*) &currEncrypt_,
+ sizeof(IntraL3CipherModeCommand_t) );
+ mmOutMsg.l3_data.handReq.channelType = currChannel_;
+ mmOutMsg.l3_data.handReq.qid = msgQId;
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchToTrgPerfHoReq): [==>MM MM_EST_REQ] (hoAgId_=%d, callId=%d)\n}\n",
+ hoAgId_, callIndex);
+
+ // Send internal MM msg -
+ sendMM(INTRA_L3_MM_EST_REQ, INTRA_L3_RR_HANDOVER_REQ, parent->entryId, &mmOutMsg);
+
+ hoState_ = HAND_ST_TRG_RCV_HO_REQ;
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleTrgHoReqAck(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleTrgHoReqAck", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ T_CNI_L3_ID newId;
+ newId.msgq_id = msgQId;
+ newId.sub_id = 0; // No sub id needed here
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgHoReqAck): [<==MM MM_EST_CNF] (hoAgId=%d,callIndex=%d,entryId=%d)\n}\n",
+ hoAgId_, callIndex, mmInMsg->entry_id);
+
+ // <Igal 1-6-00> Updated to standard IRT setup
+ if (parent->setIrt(mmInMsg->entry_id, newId) == false)
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgHoReqAck): setIrt API failed for (entryId=%d)\n}\n",
+ mmInMsg->entry_id);
+
+ hoEndCause_ = MC_HO_SYSTEM_FAILURE; //EHOcause
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ // GET OID AND SAPI
+ T_CNI_RIL3_IRT_ENTRY irtEntry;
+ irtEntry.entry_id = mmInMsg->entry_id;
+
+ if ( (CNI_RIL3_IRT_Get_Entry_by_Entry_ID(&irtEntry))
+ == false )
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgHoReqAck): getIrt API failed for entryId=%d)\n}\n",
+ mmInMsg->entry_id);
+
+ hoEndCause_ = MC_HO_SYSTEM_FAILURE; //EHOcause
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ // Setup the entry id, oid, and sapi
+ parent->entryId = mmInMsg->entry_id;
+ parent->oid = irtEntry.lapdm_oid;
+
+ //Populate data for encoding A-HANDOVER-ACKNOWLEDGE message
+ A_Handover_Request_Ack_t *pRequestAck = (A_Handover_Request_Ack_t*) &aifMsg.handoverRequestAck;
+
+ memset((char*) &aifMsg,0,sizeof(T_AIF_MSG));
+
+ //Mandatory IEs
+ pRequestAck->msgType = A_HANDOVER_REQUEST_ACK_TYPE;
+ pRequestAck->layer3Information.ie_present = true;
+ pRequestAck->layer3Information.elementIdentifier = 0x17; //layer3Information-IEI
+ pRequestAck->layer3Information.length = (unsigned char) mmInMsg->l3_data.handReqAck.handCmd.msgLength;
+ memcpy((char*)pRequestAck->layer3Information.layer3Info,
+ (char*)mmInMsg->l3_data.handReqAck.handCmd.buffer,
+ (int) mmInMsg->l3_data.handReqAck.handCmd.msgLength);
+
+ //Optional IEs
+ pRequestAck->chosenChannel.ie_present = true;
+ pRequestAck->chosenChannel.elementIdentifier = 0x21; //chosen channel-IEI
+ pRequestAck->chosenChannel.channelMode = 9; //speech (full/half)
+ pRequestAck->chosenChannel.channel = 4; //1-TCH full
+
+ pRequestAck->speechVersionChosen.ie_present = true;
+ pRequestAck->speechVersionChosen.elementIdentifier= 0x40;//speechVersionChosen-IEI
+ if (currSpeechCh_.version == 0)
+ pRequestAck->speechVersionChosen.speechVersionId = 0x01;
+ else if (currSpeechCh_.version == 2)
+ pRequestAck->speechVersionChosen.speechVersionId = 0x21;
+ else
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgHoReqAck): CC Internal error (speechVer=%d)\n\n}\n",
+ currSpeechCh_.version);
+
+ hoEndCause_ = MC_HO_SYSTEM_FAILURE; //EHOcause
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ pRequestAck->chosenEncryptAlgorithm.ie_present = true;
+ pRequestAck->chosenEncryptAlgorithm.elementIdentifier = 0x2c;
+ if (currEncrypt_.cmd.cipherModeSetting.ciphering == CNI_RIl3_CIPHER_NO_CIPHERING)
+ {
+ pRequestAck->chosenEncryptAlgorithm.algorithmId = 0x01; //no encryption used
+ } else if (currEncrypt_.cmd.cipherModeSetting.algorithm == CNI_RIL3_CIPHER_ALGORITHM_A51)
+ {
+ pRequestAck->chosenEncryptAlgorithm.algorithmId = 0x02; //A51 used
+ } else if (currEncrypt_.cmd.cipherModeSetting.algorithm == CNI_RIL3_CIPHER_ALGORITHM_A52)
+ {
+ pRequestAck->chosenEncryptAlgorithm.algorithmId = 0x03; //A52 used
+ } else
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgHoReqAck): CC Internal error (ciphSetting=%d, ciphAlgo=%d)\n\n}\n",
+ currEncrypt_.cmd.cipherModeSetting.ciphering,
+ currEncrypt_.cmd.cipherModeSetting.algorithm);
+
+ hoEndCause_ = MC_HO_SYSTEM_FAILURE; //EHOcause
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ //Encode A-MSG: HANDOVER REQUEST ACKNOWLEDGE
+ A_Result_t result;
+ NonStdRasMessagePerformHandoverAck_t requestAck;
+
+ memset( (char*) &requestAck, 0, sizeof(NonStdRasMessagePerformHandoverAck_t) );
+ if ( A_RESULT_SUCCESS != (result=
+ AIF_Encode(&aifMsg, (T_AIF_MessageUnit*)&requestAck.A_INTERFACE_MSG) ) )
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgHoReqAck): A-HANDOVER-REQUEST-ACKNOWLEDGE encoding failed (result=%d)\n\n}\n",
+ result);
+
+ hoEndCause_ = MC_HO_SYSTEM_FAILURE; //EHOcause
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleTrgHoReqAck) Received A-HANDOVER-REQ-ACK DUMP (length=%d): \n",
+ requestAck.A_INTERFACE_MSG.msglength);
+ DBG_HEXDUMP(
+ (unsigned char*)requestAck.A_INTERFACE_MSG.A_INTERFACE_DATA,
+ (int) requestAck.A_INTERFACE_MSG.msglength
+ );
+ DBG_TRACE("\n END-OF-DUMP\n}\n");
+
+ //Send PERFORM-HANDOVER-ACK (positive) to HOA
+ requestAck.reason = 0;
+ requestAck.header.origSubId = callIndex;
+ requestAck.header.destSubId = hoAgId_;
+
+ if (!VBLinkPerformHandoverAck(&requestAck))
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgHoReqAck): VBLinkPerformHandoverAck API failed !\n",
+ result);
+ DBG_HEXDUMP(
+ (unsigned char*) &requestAck,
+ (int) (requestAck.A_INTERFACE_MSG.msglength+6)
+ );
+
+ DBG_ERROR("}\n");
+
+ hoEndCause_ = MC_HO_SYSTEM_FAILURE; //EHOcause
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgHoReqAck): [==>HOA PERFORM_HANDOVER_ACK(p)] (hoAgId=%d,callIndex=%d,entryId=%d)\n}\n",
+ hoAgId_, callIndex, mmInMsg->entry_id);
+
+ //start the T204 timer
+ parent->sessionTimer->setTimer(5000); // CALL_HAND_TRG_T204
+ DBG_CALL_TRACE(hoAgId_, "\nMNETeiTRACE(etrg::handleTrgHoReqAck): [<==CC START TIMER T204] (hoAgId=%d, callId=%d, T204=%d msec)\n}\n",
+ hoAgId_, callIndex, (int)CALL_HAND_TRG_T204/TICKS_PER_10MS);
+
+ hoState_ = HAND_ST_TRG_SND_HO_REQ_ACK;
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleTrgHoReqNack(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleTrgHoReqNack", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_,"{\nMNETeiTRACE(etrg::handleTrgHoReqNack): [<==MM MM_EST_REJ] (hoAgId=%d,callIndex=%d)\n}\n",
+ hoAgId_, callIndex);
+
+ //Populate data for encoding A-HANDOVER-FAILURE message
+ memset(&aifMsg, 0, sizeof(A_Handover_Failure_t));
+
+ A_Handover_Failure_t *pFailure = (A_Handover_Failure_t*) &aifMsg.handoverFailure;
+
+ //Mandatory IEs
+ pFailure->msgType = A_HANDOVER_FAILURE_TYPE;
+ pFailure->cause.ie_present = true;
+ pFailure->cause.elementIdentifier = 0x04; //cause IEI
+ pFailure->cause.length = 1;
+ pFailure->cause.cause = 0x21; //No radio resource available
+
+ //Optional IEs
+
+ //Encode A-MSG: HANDOVER REQUEST ACKNOWLEDGE
+ A_Result_t result;
+ NonStdRasMessagePerformHandoverAck_t requestAck;
+
+ memset( (char*) &requestAck, 0, sizeof(NonStdRasMessagePerformHandoverAck_t) );
+ if ( A_RESULT_SUCCESS != (result=
+ AIF_Encode(&aifMsg, (T_AIF_MessageUnit*)&requestAck.A_INTERFACE_MSG) ) )
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgHoReqNack): A-HANDOVER-FAILURE encoding failed (result=%d)\n\n}\n",
+ result);
+
+ hoEndCause_ = MC_HO_SYSTEM_FAILURE; //EHOcause
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ //Send PERFORM-HANDOVER-ACK (negative) to HOA
+ //requestAck.reason = 1;
+ requestAck.header.origSubId = callIndex;
+ requestAck.header.destSubId = hoAgId_;
+
+ if (!VBLinkPerformHandoverAck(&requestAck))
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgHoReqNack): VBLinkPerformHandoverAck API failed !\n",
+ result);
+ DBG_HEXDUMP(
+ (unsigned char*) &requestAck,
+ (int) (requestAck.A_INTERFACE_MSG.msglength+6)
+ );
+
+ DBG_ERROR("}\n");
+
+ hoEndCause_ = MC_HO_SYSTEM_FAILURE; //EHOcause
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etgt::handleTrgHoReqNack): [==>HOA PERFORM_HANDOVER_ACK(n)] (hoAgId=%d,callIndex=%d)\n}\n",
+ hoAgId_, callIndex);
+
+ hoEndCause_ = (HandoverCause_t)0;
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleAnchToTrgEndHandover(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleAnchToTrgEndHandover", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoaInMsg->origSubId, "{\nMNETeiTRACE(etrg::handleAnchToTrgEndHandover): [<==HOA END_HANDOVER] (hoAgId=%d,callId=%d,reason=%d)\n}\n",
+ hoaInMsg->origSubId, hoaInMsg->destSubId,
+ hoaInMsg->msgData.extEndHandover.reason);
+
+ parent->sessionTimer->cancelTimer();
+
+ parent->sessionTimer->cancelTimer();
+
+ DBG_LEAVE();
+ return(CC_RELEASE_OWN);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleTrgMmRelInd(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleTrgMmRelInd", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etgt::handleTrgMmRelInd): [<==MM MM_REL_IND (RSL)] (hoAgId=%d,callId=%d,entryId=%d)\n",
+ hoAgId_, callIndex, parent->entryId);
+
+ //Clean up the on-going handover
+ hoEndCause_ = MC_HO_RLS_FAILURE; //EHOcause
+ parent->setReleaseCause(CNI_RIL3_CAUSE_DESTINATION_OUT_OF_ORDER);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleTrgHoComplt(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleTrgHoComplt", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ //Populate data for encoding A-HANDOVER-COMPLETE message
+ memset(&aifMsg, 0, sizeof(A_Handover_Complete_t));
+
+ A_Handover_Complete_t *pComplete = (A_Handover_Complete_t*) &aifMsg.handoverComplete;
+
+ //Mandatory IEs
+ pComplete->msgType = A_HANDOVER_COMPLETE_TYPE;
+
+ //Optional IEs
+ pComplete->rrCause.ie_present = true;
+ pComplete->rrCause.elementIdentifier = 0x15; //cause IEI
+ pComplete->rrCause.rrCause = 0; //normal event
+
+ //Encode A-MSG: HANDOVER REQUEST ACKNOWLEDGE
+ A_Result_t result;
+ NonStdRasMessageHandoverSuccess_t hoSuccess;
+
+ memset( (char*) &hoSuccess, 0, sizeof(NonStdRasMessageHandoverSuccess_t) );
+ if ( A_RESULT_SUCCESS != (result=
+ AIF_Encode(&aifMsg, (T_AIF_MessageUnit*)&hoSuccess.A_INTERFACE_MSG) ) )
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgHoComplt): A-HANDOVER-COMPLETE encoding failed (result=%d)\n\n}\n",
+ result);
+
+ hoEndCause_ = MC_HO_SYSTEM_FAILURE; //EHOcause
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ //Send HANDOVER-SUCCESS to HOA
+ hoSuccess.header.origSubId = callIndex;
+ hoSuccess.header.destSubId = hoAgId_;
+
+ if (!VBLinkHandoverSuccess(&hoSuccess))
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgHoComplt): VBLinkHandoverSuccess API failed !\n",
+ result);
+ DBG_HEXDUMP(
+ (unsigned char*) &hoSuccess,
+ (int) (hoSuccess.A_INTERFACE_MSG.msglength+4)
+ );
+
+ DBG_ERROR("}\n");
+
+ hoEndCause_ = MC_HO_SYSTEM_FAILURE; //EHOcause
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ //Stop T204 if the voice path is connected too
+ if (parent->hoCallVoiceConnected())
+ {
+ parent->sessionTimer->cancelTimer();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etgt::handleTrgHoComplt): [==>HOA HANDOVER-COMPLETE both signaling and voice] (hoAgId=%d,callId=%d,entryId=%d)\n",
+ hoAgId_, callIndex, parent->entryId);
+ DBG_CALL_TRACE(hoAgId_," : [<==CC STOP T204] (hoAgId=%d, callId=%d, T204=%d msec)\n}\n",
+ hoAgId_, callIndex, (int)CALL_HAND_TRG_T204/TICKS_PER_10MS);
+ } else
+ {
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etgt::handleTrgHoComplt): [==>HOA HANDOVER-COMPLETE signaling only] (hoAgId=%d,callId=%d,entryId=%d)\n}\n",
+ hoAgId_, callIndex, parent->entryId);
+ }
+
+ hoState_ = HAND_ST_TRG_HO_COMPLT;
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleTrgHoAccess(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleTrgHoAccess", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etgt::handleTrgHoAccess): [<==RM HANDOVER-ACCESS] (hoAgId=%d,callId=%d,entryId=%d)\n}\n",
+ hoAgId_, callIndex, parent->entryId);
+
+ //Populate data for encoding A-HANDOVER-COMPLETE message
+ memset(&aifMsg, 0, sizeof(A_Handover_Detect_t));
+
+ A_Handover_Detect_t *pDetect = (A_Handover_Detect_t*) &aifMsg.handoverDetect;
+
+ //Mandatory IEs
+ pDetect->msgType = A_HANDOVER_DETECT_TYPE;
+
+ //Optional IEs
+
+ //Encode A-MSG: HANDOVER DETECT
+ A_Result_t result;
+ NonStdRasMessageHandoverAccess_t hoAccess;
+
+ memset( (char*) &hoAccess, 0, sizeof(NonStdRasMessageHandoverAccess_t) );
+
+ //Send HANDOVER-ACCESS to HOA
+ hoAccess.header.origSubId = callIndex;
+ hoAccess.header.destSubId = hoAgId_;
+
+ if (!VBLinkHandoverAccess(&hoAccess))
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgHoAccess): VBLinkHandoverAccess API failed !\n",
+ result);
+ DBG_HEXDUMP(
+ (unsigned char*) &hoAccess,
+ (int) (hoAccess.A_INTERFACE_MSG.msglength+4)
+ );
+
+ DBG_ERROR("}\n");
+
+ hoEndCause_ = MC_HO_SYSTEM_FAILURE; //EHOcause
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etgt::handleTrgHoAccess): [==>HOA HANDOVER-DETECT] (hoAgId=%d,callId=%d,entryId=%d)\n}\n",
+ hoAgId_, callIndex, parent->entryId);
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+void
+CCTargetHandoverExtHo::sendMMMsgToRemoteCC (IntraL3Msg_t *mmMsg)
+{
+ //Send Response to CM SERVICE REQUEST (either CM SERVICE ACCEPT or REJECT)
+
+ DBG_FUNC("CCTargetHandoverExtHo::sendMMMsgToCC", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::sendMMMsgToRemoteCC): CC Internal Error (hoAgId=%d,callId=%d,hoState=%d,currEvent=%d)\n}\n",
+ hoAgId_,callIndex,hoState_,currEvent);
+ //vcOutMsg.msgType = INTER_VC_CC_POST_HANDOVER_MOB_EVENT ;
+ //vcOutMsg.msgData.postHoMobEventData.intraL3Msg = *mmMsg;
+
+ // Source, Destination
+ //sendVcMsg (MODULE_CC, MODULE_MM);
+
+ DBG_LEAVE();
+}
+
+void
+CCTargetHandoverExtHo::sendMSMsgToAnchorCC(T_CNI_RIL3MD_CCMM_MSG *msInMsg)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::sendMSMsgToAnchorCC", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etgt::sendMSMsgToAnchorCC): [<==L2 MS MESSAGE] (hoAgId=%d,callId=%d,entryId=%d)\n",
+ hoAgId_, callIndex, parent->entryId);
+ DBG_HEXDUMP((unsigned char*) msInMsg->l3_data.buffer, msInMsg->l3_data.msgLength);
+ DBG_CALL_TRACE(hoAgId_, "}\n");
+
+ //Relay the MS message received to HOA
+ NonStdRasMessagePostHandoverMobEvent_t l3msg;
+
+ l3msg.header.origSubId = callIndex;
+ l3msg.header.destSubId = hoAgId_;
+
+ l3msg.LAYER3PDU.LAYER3DATA[0] = 0x01; //DTAP 1st byte of Distribution Data Unit (Discrimination)
+ l3msg.LAYER3PDU.LAYER3DATA[1] = 0x80; //DTAP 2nd byte of Distribution Data Unit (FACCH or SDCCH, SAPI0)
+ l3msg.LAYER3PDU.LAYER3DATA[2] = (unsigned char) msInMsg->l3_data.msgLength; //length of L3 Msg followed
+ memcpy((char*) &l3msg.LAYER3PDU.LAYER3DATA[3], (char*) msInMsg->l3_data.buffer, //body of L3 Msg
+ (int)msInMsg->l3_data.msgLength);
+ l3msg.LAYER3PDU.msglength = (unsigned short) 3 + msInMsg->l3_data.msgLength;
+
+ if (!VBLinkPostHandoverMobEvent(&l3msg))
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::sendMSMsgToAnchorCC): VBLinkPostHandoverMobEvent API failed !\n}\n");
+ DBG_HEXDUMP((unsigned char*) &l3msg, l3msg.LAYER3PDU.msglength+2);
+
+ DBG_ERROR("}\n");
+
+ hoEndCause_ = MC_HO_SYSTEM_FAILURE; //EHOcause
+
+ // send END_HANDOVER and RELEASE-HOA to HOA then cleanup self: radio resource, hoCallLeg, context
+ // DBG_LEAVE();
+ // return (CC_RELEASE_CALL);
+
+ return;
+ }
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etgt::sendMSMsgToAnchorCC): [==>HOA MS MESSAGE] (hoAgId=%d,callId=%d,entryId=%d)\n",
+ hoAgId_, callIndex);
+ DBG_HEXDUMP((unsigned char*) &l3msg, l3msg.LAYER3PDU.msglength+2);
+ DBG_CALL_TRACE(hoAgId_, "}\n");
+
+ DBG_LEAVE();
+}
+
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleTrgT204TimerExpiry(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleTrgT204TimerExpiry", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etgt::handleTrgT204TimerExpiry): [<==CC T204 FIRED] (hoAgId=%d,callId=%d,entryId=%d)\n",
+ hoAgId_, callIndex, parent->entryId);
+
+ //Clean up the on-going handover
+ hoEndCause_ = MC_HO_T204_TIMEOUT; //EHOcause
+ parent->setReleaseCause(CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+}
+
+
+BOOL
+CCTargetHandoverExtHo::cleanup(BOOL force = FALSE)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::cleanup", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE((unsigned long)hoAgId_, "{\nMNETeiTRACE(etgt::cleanup): [<==CC T204 FIRED] (hoAgId=%d,callId=%d,entryId=%d)\n",
+ hoAgId_, callIndex, parent->entryId);
+
+ //Send END_HANDOVER, RELEASE_HOA to HOA
+ if (hoAgId_ != -1)
+ {
+ NonStdRasMessageEndHandover_t endHandover;
+ endHandover.header.origSubId = callIndex;
+ endHandover.header.destSubId = hoAgId_;
+ endHandover.reason = hoEndCause_;
+
+ if (!VBLinkEndHandover(&endHandover))
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::cleanup): VBLinkEndHandover API failed\n}\n");
+ }
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::cleanup): [==>HOA END_HANDOVER (hoAgId=%d, callId=%d, entryId=%d)\n}\n",
+ hoAgId_, callIndex, parent->entryId);
+
+ //NonStdRasMessageReleaseHOA_t relHoa;
+ //relHoa.header.origSubId = callIndex;
+ //relHoa.header.destSubId = hoAgId_;
+
+ //if (!VBLinkReleaseHOA(&relHoa))
+ //{
+ // DBG_ERROR("{\nMNETeiERROR(etrg::cleanup): VBLinkReleaseHOA API failed\n}\n");
+ //}
+
+ //DBG_TRACE("{\nMNETeiTRACE(etrg::cleanup): [==>HOA RELEASE_HANDOVER_AGENT (hoAgId=%d, callId=%d, entryId=%d)\n}\n",
+ // hoAgId_, callIndex, parent->entryId);
+ }
+
+ initData();
+
+ DBG_LEAVE();
+ return(true);
+
+}
+
+CCTargetHandoverExtHo::CCTargetHandoverExtHo(CCSessionHandler *session,
+ int callId ,
+ MSG_Q_ID qid )
+ : CCHandover (session, callId, qid)
+{
+ voiceConnected = false;
+
+ CCHandover::initData();
+}
+
+int
+CCTargetHandoverExtHo::handleTimeoutMsg (IntraL3Msg_t *ccInMsg)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleTimeoutMsg", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ currEvent = HAND_TRG_TIMER_EXPIRY;
+
+ DBG_LEAVE();
+ return(smHandleEvent());
+}
+
+int
+CCTargetHandoverExtHo::handleRRMsg(IntraL3Msg_t *rrMsg,
+ JCCEvent_t hoEvent)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleRRMsg", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ CCHandover::handleRRMsg(rrMsg, hoEvent);
+
+ DBG_LEAVE();
+ return(smHandleEvent());
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleAnchToTrgPerfHbAck(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleAnchToTrgPerfHbAck", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ //cancel T211 timer
+ parent->sessionTimer->cancelTimer();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchToTrgPerfHbAck): [<==HOA PERFORM_HANDBACK_ACK (p)] (callId=%d, entryId=%d)\n}\n",
+ callIndex, parent->entryId);
+
+ //Decode A-interface message
+ A_Result_t result;
+ memset( (char*)&aifMsg, 0, sizeof(T_AIF_MSG));
+
+ if ( A_RESULT_SUCCESS != (result=
+ AIF_Decode((T_AIF_MessageUnit*)&(hoaInMsg->msgData.perfExtHandbackAck.A_INTERFACE_MSG), &aifMsg)) )
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleAnchToTrgPerfHbAck): A-MSG decoding err (err=%d, hoAgId=%d,callId=%d)\n",
+ result, hoAgId_,callIndex);
+ DBG_ERROR(" A-INTERFACE MESSAGE Hex Dump:\n");
+ DBG_HEXDUMP(
+ (unsigned char*)hoaInMsg->msgData.perfExtHandbackAck.A_INTERFACE_MSG.A_INTERFACE_DATA,
+ (int)hoaInMsg->msgData.perfExtHandbackAck.A_INTERFACE_MSG.msglength
+ );
+ DBG_ERROR("\n}\n");
+
+ //remember reason
+ hoEndCause_ = JC_FAILURE_A_INTERFACE_MESSAGE_DECODING_FAILED; //EHOcause
+
+ DBG_LEAVE();
+ return (CC_RELEASE_EH_HB);
+ }
+
+ if (aifMsg.msgType != A_HANDOVER_REQUEST_ACK_TYPE)
+ {
+ //Unexpected A-MSG received, ignore but report
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleAnchToTrgPerfHbAck): unexpected A-MSG (msgType=%d,hoState_=%d)\n}\n",
+ aifMsg.msgType, hoState_);
+
+ hoEndCause_ = JC_FAILURE_A_INTERFACE_MESSAGE_TYPE_INCOMPATIBLE;
+
+ DBG_LEAVE();
+ return (CC_RELEASE_EH_HB);
+ }
+
+ if (!(aifMsg.handoverRequestAck.layer3Information.ie_present))
+ {
+ //Unexpected A-MSG received, ignore but report
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleAnchToTrgPerfHbAck): A_HANDOVER_ACK without HANDOVER COMMAND (hoAgId=%d,callId=%d,hoState=%d)\n}\n",
+ hoAgId_,callIndex,hoState_);
+ hoEndCause_ = JC_FAILURE_A_HANDOVER_ACKNOWLEDGE_WITHOUT_L3_DATA;
+
+ DBG_LEAVE();
+ return (CC_RELEASE_EH_HB);
+ }
+
+ switch(hoState_)
+ {
+ case HAND_ST_ANCH_SND_HB_REQ:
+ //Relay message to GP-B
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_ACK;
+ vcOutMsg.msgData.perfHandbackAck.handCmd.msgLength =
+ aifMsg.handoverRequestAck.layer3Information.length;
+ memcpy(vcOutMsg.msgData.perfHandbackAck.handCmd.buffer,
+ aifMsg.handoverRequestAck.layer3Information.layer3Info,
+ aifMsg.handoverRequestAck.layer3Information.length);
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ DBG_CALL_TRACE(hoAgId_,"{\nMNETeiTRACE(etrg::handleAnchToTrgPerfHbAck) [==>GP-B PERFORM_HANDBACK_ACK] (callId=%d,entryId=%d)\n}\n",
+ callIndex,parent->entryId);
+
+ hoState_ = HAND_ST_ANCH_RCV_HB_REQ_ACK;
+
+ break;
+
+ case HAND_ST_TRG_SND_HB_REQ:
+ //Send internal RR msg
+ rrOutMsg.l3_data.handCmd.handCmd.msgLength = aifMsg.handoverRequestAck.layer3Information.length;
+ memcpy(rrOutMsg.l3_data.handCmd.handCmd.buffer, aifMsg.handoverRequestAck.layer3Information.layer3Info,
+ aifMsg.handoverRequestAck.layer3Information.length);
+
+ sendRR(INTRA_L3_DATA, INTRA_L3_RR_HANDOVER_COMMAND, parent->entryId, &rrOutMsg);
+
+ DBG_CALL_TRACE(hoAgId_,"{\nMNETeiTRACE(etrg::handleAnchToTrgPerfHbAck) [==>RM HANDOVER_COMMAND] (callId=%d,entryId=%d)\n}\n",
+ callIndex,parent->entryId);
+
+ // start the T204 timer
+ parent->sessionTimer->setTimer(CALL_HAND_TRG_T204);
+
+ hoState_ = HAND_ST_TRG_RCV_HB_REQ_ACK;
+
+ break;
+
+ default:
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleAnchToTrgPerfHbAck): CC Error Inproper hoState(%d) (hoAgId=%d,callId=%d\n}\n",
+ hoState_,hoAgId_,callIndex);
+
+ hoEndCause_ = JC_FAILURE_INPROPER_HANDOVER_STATE;
+
+ DBG_LEAVE();
+ return (CC_RELEASE_EH_HB);
+ }
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleAnchToTrgPerfHbNack(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleAnchToTrgPerfHbNack", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchToTrgPerfHbNack): [<==HOA PERFORM_HANDBACK_ACK (n)] (callId=%d, entryId=%d)\n}\n",
+ callIndex, parent->entryId);
+
+ // cancel Tsho timer
+ parent->sessionTimer->cancelTimer();
+
+ int i;
+ IntraL3HandoverRequired_t *inMsg = &handReqd;
+
+ switch (hoState_)
+ {
+ case HAND_ST_TRG_SND_HB_REQ:
+ if ( (i=getNextHoCandidate()) == (-1) )
+ {
+ DBG_TRACE("MNETeiTRACE(etrg::handleAnchToTrgPerfHbNack): no more candidate to retrytry (#ofCands=%d)\n",
+ inMsg->numCandidates);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_EH_HB);
+ } else
+ {
+ //Try next candidate
+ candGlobalCellId_t candidate;
+ candidate = inMsg->candGlobalCellId[i];
+
+ DBG_TRACE("MNETeiTRACE(etrg::handleAnchToTrgPerfHbNack): try next cand cell! %d-th of Cands(%d) candCell(%x,%x%x%x,%x%x%x,%x,%x) hoState(%d)\n",
+ i,inMsg->numCandidates,
+ candidate.candGlobalCellId.mcc[0],candidate.candGlobalCellId.mcc[1],
+ candidate.candGlobalCellId.mcc[2],
+ candidate.candGlobalCellId.mnc[0],candidate.candGlobalCellId.mnc[1],
+ candidate.candGlobalCellId.mnc[2],
+ candidate.candGlobalCellId.lac, candidate.candGlobalCellId.ci, hoState_);
+
+ if (candidate.candIsExternal)
+ {
+ //Handback from anchor GP to PLMN case
+ populateAHandoverRequest( &MY_GLOBALCELL_ID, &candidate.candGlobalCellId);
+
+ A_Result_t result;
+ NonStdRasMessagePerformHandbackRQ_t handbackRQ;
+
+ memset( (char*) &handbackRQ, 0, sizeof(NonStdRasMessagePerformHandbackRQ_t) );
+
+ if ( A_RESULT_SUCCESS != (result=
+ AIF_Encode(&aifMsg, (T_AIF_MessageUnit*)&handbackRQ.A_HANDOVER_REQUEST) ) )
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleAnchToTrgPerfHbNack): A-HANDOVER-REQUEST encoding failed (result=%d)\n\n}\n",
+ result);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_EH_HB);
+ }
+
+ //Send PERFORM-HANDBACK-REQ to HOA
+ handbackRQ.hoCause = inMsg->hoCause;
+ handbackRQ.header.origSubId = callIndex;
+ handbackRQ.header.destSubId = hoAgId_;
+ handbackRQ.globalCellID = candidate.candGlobalCellId;
+ handbackRQ.externalCell = true;
+
+ if (!VBLinkPerformHandback(&handbackRQ))
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleAnchToTrgPerfHbNack): VBLinkPerformHandoverAck API failed !\n}\n");
+
+ DBG_HEXDUMP( (unsigned char*) &handbackRQ,
+ (int) (handbackRQ.A_HANDOVER_REQUEST.msglength+26)
+ );
+
+ DBG_ERROR("}\n");
+
+ DBG_LEAVE();
+ return (CC_RELEASE_EH_HB);
+ }
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchToTrgPerfHbNack): [==>HOA PERFORM_HANDBACK_REQ](callId=%d,entryId=%d)\n}\n",
+ callIndex, parent->entryId);
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleAnchToTrgPerfHbNack) PERFORM_HANDBACK_REQ MESSAGE DATA:\n");
+ DBG_TRACE(" : hoAgId_=%d, callId=%d\n",hoAgId_, callIndex);
+ DBG_TRACE(" : target cell(type=%d, mcc[1-3]:%x,%x,%x; mnc[1-3]:%x,%x,%x;lac=%x,ci=%x)\n",
+ handbackRQ.globalCellID.ci_disc,
+ handbackRQ.globalCellID.mcc[0],handbackRQ.globalCellID.mcc[1],handbackRQ.globalCellID.mcc[2],
+ handbackRQ.globalCellID.mnc[0],handbackRQ.globalCellID.mnc[1],handbackRQ.globalCellID.mnc[2],
+ handbackRQ.globalCellID.lac,handbackRQ.globalCellID.ci);
+
+ DBG_TRACE(" Encoded A_HANDOVER_REQ HEX DUMP:\n");
+ DBG_HEXDUMP((unsigned char*) &handbackRQ, sizeof (NonStdRasMessagePerformHandoverRQ_t) );
+ DBG_TRACE(" \n}\n");
+
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleAnchToTrgPerfHbNack) Received A-INTERFACE-MSG DUMP (length=%d): \n",
+ handbackRQ.A_HANDOVER_REQUEST.msglength);
+ DBG_HEXDUMP(
+ (unsigned char*)handbackRQ.A_HANDOVER_REQUEST.A_INTERFACE_DATA,
+ (int)handbackRQ.A_HANDOVER_REQUEST.msglength
+ );
+ DBG_TRACE("\n END-OF-DUMP\n}\n");
+
+ parent->sessionTimer->setTimer(CALL_HAND_TRG_T211);
+
+ DBG_CALL_TRACE(hoAgId_, "\nMNETeiTRACE(etrg::handleAnchToTrgPerfHbNack): [<==CC START TIMER T211] (callId=%d, T211=%d ticks)\n}\n",
+ callIndex, (int)CALL_HAND_TRG_T211);
+
+ hoState_ = HAND_ST_TRG_SND_HB_REQ;
+
+ } else
+ {
+ //Handover from anchor GP to another GP case
+ sprintf(&(cellLocationRequest.ViperCellId[0]), "%d:%d",
+ candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+
+ cellLocationRequest.TxnId = callIndex;
+
+ if (false == VBLinkLocationRequest(cellLocationRequest) )
+ {
+ // Ignore the message
+ DBG_ERROR("{\nMNETeiTRACE(etrg::handleAnchToTrgPerfHbNack): VBLinkLocationRequest failed!\n");
+ DBG_ERROR(" (hoAgId=%d callId=%d entryId=%d,lac=%d,ci=%d)\n}\n",
+ hoAgId_, callIndex, parent->entryId,
+ candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_EH_HB);
+ }
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchToTrgPerfHbNack): [==>HOA IP_ADDRESS_REQ](callId=%d,entryId=%d,lac=%d,ci=%d)\n}\n",
+ callIndex, parent->entryId,
+ candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchToTrgPerfHbNack): [<==CC START TIMER Tvb](callId=%d,entryId=%d,lac=%d,ci=%d)\n}\n",
+ callIndex, parent->entryId,
+ candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_TVB);
+
+ hoState_ = HAND_ST_ANCH_VC_IP_ADDRESS_REQ;
+ }
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ break;
+
+ case HAND_ST_ANCH_SND_HB_REQ:
+ // Abort HB part at GP-B
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_NACK;
+ vcOutMsg.msgData.perfHandbackNack.cause = JC_FAILURE_A_HANDOVER_FAILURE;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ DBG_CALL_TRACE(hoAgId_,"{\nMNETeiTRACE(etrg::handleAnchToTrgPerfHbAck) [==>GP-B PERFORM_HANDBACK_NACK] (callId=%d,hoState=%d)\n}\n",
+ callIndex,hoState_);
+
+ DBG_LEAVE();
+ return(CC_RELEASE_GP_HB);
+
+ break;
+
+ default:
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleAnchToTrgPerfHbNack): CC Error Inproper hoState(%d) (hoAgId=%d,callId=%d\n}\n",
+ hoState_,hoAgId_,callIndex);
+
+ hoEndCause_ = JC_FAILURE_INPROPER_HANDOVER_STATE;
+
+ DBG_LEAVE();
+ return (JCC_NULL_EVENT);
+ }
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleTrgT211TimerExpiry(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleTrgT211TimerExpiry", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgT211TimerExpiry): [<==CC TIMER T211 FIRED](callId=%d,entryId=%d)\n}\n",
+ callIndex, parent->entryId);
+
+ hoEndCause_ = JC_FAILURE_T211_TIMEOUT;
+
+ DBG_LEAVE();
+ return (CC_RELEASE_EH_HB);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleTrgHoReqd(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleTrgHoReqd", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ int i;
+
+ IntraL3HandoverRequired_t *inMsg = &rrInMsg->l3_data.handReqd;
+ candGlobalCellId_t candidate;
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgHoReqd): [<==RM HANDOVER REQUIRED] (callId=%d, entryId=%d, #Cands=%d)\n}\n",
+ callIndex, parent->entryId, inMsg->numCandidates);
+
+ candidate.candIsExternal = false;
+ candidate.candIsTried = true;
+ candidate.candGlobalCellId = hoGlobalCellId_;
+
+ handReqd = *inMsg;
+
+ if (!forcedHandover)
+ {
+ if ((inMsg->numCandidates) <= 0)
+ {
+ // Ignore the message
+ DBG_ERROR ("{\nMNETeiERROR(etrg::handleTrgHoReqd): Handover Required Error (bad numCandidates = %d)\n}\n",
+ inMsg->numCandidates);
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ if ( (i=getNextHoCandidate()) == (-1) )
+ {
+ DBG_ERROR ("{\nMNETeiERROR(etrg::handleTrgHoReqd): Handover Required Error (all bad #candidates = %d)\n}\n",
+ inMsg->numCandidates);
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ candIndex_ = i;
+ candidate = inMsg->candGlobalCellId[i];
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleTrgHoReqd): Selected %dth of Candidates(%d) (mcc:%x%x%x mnc:%x%x%x lac:%d ci:%d) (hoState %d)\n}\n",
+ i, inMsg->numCandidates,
+ candidate.candGlobalCellId.mcc[0],candidate.candGlobalCellId.mcc[1],
+ candidate.candGlobalCellId.mcc[2],
+ candidate.candGlobalCellId.mnc[0],candidate.candGlobalCellId.mnc[1],
+ candidate.candGlobalCellId.mnc[2],
+ candidate.candGlobalCellId.lac, candidate.candGlobalCellId.ci, hoState_);
+ }
+
+ if (candidate.candIsExternal)
+ {
+ //Handback from anchor GP to PLMN
+ populateAHandoverRequest(&MY_GLOBALCELL_ID, &candidate.candGlobalCellId);
+
+ A_Result_t result;
+ NonStdRasMessagePerformHandbackRQ_t handbackRQ;
+
+ memset( (char*) &handbackRQ, 0, sizeof(NonStdRasMessagePerformHandbackRQ_t) );
+
+ if ( A_RESULT_SUCCESS != (result=
+ AIF_Encode(&aifMsg, (T_AIF_MessageUnit*)&handbackRQ.A_HANDOVER_REQUEST) ) )
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgHoReqd): A-HANDOVER-REQUEST encoding failed (result=%d)\n\n}\n",
+ result);
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //Send PERFORM-HANDBACK-REQ to HOA
+ handbackRQ.hoCause = inMsg->hoCause;
+ handbackRQ.header.origSubId = callIndex;
+ handbackRQ.header.destSubId = hoAgId_;
+ handbackRQ.globalCellID = candidate.candGlobalCellId;
+ handbackRQ.externalCell = true;
+
+ if (!VBLinkPerformHandback(&handbackRQ))
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgHoReqd): VBLinkPerformHandoverAck API failed !\n}\n");
+
+ DBG_HEXDUMP( (unsigned char*) &handbackRQ,
+ (int) (handbackRQ.A_HANDOVER_REQUEST.msglength+26)
+ );
+
+ DBG_ERROR("}\n");
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchHoReqd): [==>HOA PERFORM_HANDBACK_REQ](callId=%d,entryId=%d)\n}\n",
+ callIndex, parent->entryId);
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleAnchHoReqd) PERFORM_HANDBACK_REQ MESSAGE DATA:\n");
+ DBG_TRACE(" : hoAgId_=%d, callId=%d\n",hoAgId_, callIndex);
+ DBG_TRACE(" : target cell(type=%d, mcc[1-3]:%x,%x,%x; mnc[1-3]:%x,%x,%x;lac=%x,ci=%x)\n",
+ handbackRQ.globalCellID.ci_disc,
+ handbackRQ.globalCellID.mcc[0],handbackRQ.globalCellID.mcc[1],handbackRQ.globalCellID.mcc[2],
+ handbackRQ.globalCellID.mnc[0],handbackRQ.globalCellID.mnc[1],handbackRQ.globalCellID.mnc[2],
+ handbackRQ.globalCellID.lac,handbackRQ.globalCellID.ci);
+
+ DBG_TRACE(" Encoded A_HANDOVER_REQ HEX DUMP:\n");
+ DBG_HEXDUMP((unsigned char*) &handbackRQ, sizeof (NonStdRasMessagePerformHandoverRQ_t) );
+ DBG_TRACE(" \n}\n");
+
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleTrgHoReqAck) Received A-INTERFACE-MSG DUMP (length=%d): \n",
+ handbackRQ.A_HANDOVER_REQUEST.msglength);
+ DBG_HEXDUMP(
+ (unsigned char*)handbackRQ.A_HANDOVER_REQUEST.A_INTERFACE_DATA,
+ (int)handbackRQ.A_HANDOVER_REQUEST.msglength
+ );
+ DBG_TRACE("\n END-OF-DUMP\n}\n");
+
+ parent->sessionTimer->setTimer(CALL_HAND_TRG_T211);
+ DBG_CALL_TRACE(hoAgId_, "\nMNETeiTRACE(etrg::handleTrgHoReqAck): [<==CC START TIMER T211] (callId=%d, T211=%d msec)\n}\n",
+ callIndex, (int)CALL_HAND_TRG_T211);
+
+ hoState_ = HAND_ST_TRG_SND_HB_REQ;
+
+ } else
+ {
+ //Handover from anchor GP to another GP case
+ sprintf(&(cellLocationRequest.ViperCellId[0]), "%d:%d",
+ candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+
+ cellLocationRequest.TxnId = callIndex;
+
+ if (false == VBLinkLocationRequest(cellLocationRequest) )
+ {
+ // Ignore the message
+ DBG_ERROR("{\nMNETeiTRACE(etrg::handleAnchHoReqd): VBLinkLocationRequest failed!\n");
+ DBG_ERROR(" (hoAgId=%d callId=%d entryId=%d,lac=%d,ci=%d)\n}\n",
+ hoAgId_, callIndex, parent->entryId,
+ candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchHoReqd): [==>HOA IP_ADDRESS_REQ](callId=%d,entryId=%d,lac=%d,ci=%d)\n}\n",
+ callIndex, parent->entryId,
+ candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchHoReqd): [<==CC START TIMER Tvb](callId=%d,entryId=%d,lac=%d,ci=%d)\n}\n",
+ callIndex, parent->entryId,
+ candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_TVB);
+
+
+ hoState_ = HAND_ST_ANCH_VC_IP_ADDRESS_REQ;
+ }
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleTrgToAnchHoAccess(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleTrgToAnchHoAccess", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchHoAccess): [<==GP-B HANDOVER_ACCESS] (callIndex=%d,hoState=%d,reIpAddr=%x,reCallId=%d)\n}\n",
+ callIndex, hoState_, vcInMsg->origVcAddress, vcInMsg->origSubId);
+
+ //Send up bss APDU to PLMN (anchor part)
+ NonStdRasMessagePostHandoverMobEvent_t bssApdu;
+
+ bssApdu.header.origSubId = callIndex;
+ bssApdu.header.destSubId = hoAgId_;
+
+ bssApdu.LAYER3PDU.LAYER3DATA[0] = 0x00; //BSSMAP
+ bssApdu.LAYER3PDU.LAYER3DATA[1] = 1;
+ bssApdu.LAYER3PDU.LAYER3DATA[2] = A_HANDOVER_DETECT_TYPE;
+
+ bssApdu.LAYER3PDU.msglength = 3;
+
+ if (!VBLinkPostHandoverMobEvent(&bssApdu))
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgToAnchHoAccess): VBLinkPostHandoverMobEvent API failed !\n}\n");
+ DBG_HEXDUMP((unsigned char*) &bssApdu, bssApdu.LAYER3PDU.msglength+2);
+
+ DBG_ERROR("}\n");
+ } else
+ {
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etgt::handleTrgHoFail): [==>HOA A-HANDOVER-DETECT] (callId=%d,hoState=%d)\n",
+ callIndex,hoState_);
+ DBG_HEXDUMP((unsigned char*) &bssApdu, bssApdu.LAYER3PDU.msglength+2);
+ DBG_CALL_TRACE(hoAgId_, "}\n");
+ }
+
+ DBG_LEAVE();
+ return(CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleAnchHoReqNack(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleAnchHoReqNack", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_,"{\nMNETeiTRACE(etrg::handleAnchHoReqNack): [<==RR MM_EST_REJ(hoReqNack)](callId=%d,hoState=%d)\n}\n",
+ callIndex, hoState_);
+
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_NACK;
+ vcOutMsg.msgData.perfHandbackNack.cause = rrInMsg->l3_data.handReqNack.cause;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ //
+ DBG_LEAVE();
+ return (CC_RELEASE_GP_HB);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleAnchHoReqAck(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleAnchHoReqAck", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchHoReqAck): [<==RR MM_EST_CNF(hoReqAck)](callId=%d,hoState=%d)\n}\n",
+ callIndex, hoState_);
+
+
+ T_CNI_L3_ID newId;
+ newId.msgq_id = msgQId;
+ newId.sub_id = 0;
+
+ if (parent->setIrt (mmInMsg->entry_id, newId) == false)
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleAnchHoReqAck) CC Call Error IRT SET problem for (entryId=%d)(hoAgId=%d,callId=%d,hoState=%d)\n}\n",
+ mmInMsg->entry_id,hoAgId_,callIndex,hoState_);
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchHoReqAck): [==>GP-B PERFORM_HANDBACK_NACK](callId=%d,entryId=%d,hoState=%d)\n}\n",
+ callIndex, mmInMsg->entry_id, hoState_);
+
+ // Treat it like a Ho. Req. Nack.
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_NACK;
+ vcOutMsg.msgData.perfHandbackNack.cause = JC_FAILURE_IRT_TABLE_SET_FAILED;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_GP_HB);
+ }
+
+ // Setup the entry id, oid, and sapi
+ parent->entryId = mmInMsg->entry_id;
+
+ // GET OID AND SAPI
+ T_CNI_RIL3_IRT_ENTRY irtEntry;
+ irtEntry.entry_id = mmInMsg->entry_id;
+
+ if ( (CNI_RIL3_IRT_Get_Entry_by_Entry_ID(&irtEntry)) == false )
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleAnchHoReqAck) CC Call Error IRT GET problem for (entryId=%d)(hoAgId=%d,callId=%d,hoState=%d)\n}\n",
+ mmInMsg->entry_id,hoAgId_,callIndex,hoState_);
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchHoReqAck): [==>GP-B PERFORM_HANDBACK_NACK](callId=%d,entryId=%d,hoState=%d)\n}\n",
+ callIndex, mmInMsg->entry_id, hoState_);
+
+ // Treat it like a Ho. Req. Nack.
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_NACK;
+ vcOutMsg.msgData.perfHandbackNack.cause = JC_FAILURE_IRT_TABLE_GET_FAILED;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_GP_HB);
+ }
+
+ parent->oid = irtEntry.lapdm_oid;
+
+ // Make a simplex connection between the remote rtp channel and the rf channel
+ T_CSU_PORT_ID rfSinkPort, rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rfSinkPort.portType = CSU_GSM_PORT;
+ rtpSourcePort.portType = CSU_RTP_PORT;
+
+ rfSinkPort.portId.gsmHandler = parent->entryId;
+ rtpSourcePort.portId.rtpHandler = VoipCallGetRTPHandle(parent->hoCallLeg->h323CallHandle);
+
+ if ((csuResult = csu_SimplexConnect(&rtpSourcePort, &rfSinkPort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleAnchHoReqAck) CSU UNI-CONNECT failed (entryId=%d,h323Hndl=%p)(hoAgId=%d,callId=%d,hoState=%d)\n}\n",
+ mmInMsg->entry_id,parent->hoCallLeg->h323CallHandle, hoAgId_,callIndex,hoState_);
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchHoReqAck): [==>GP-B PERFORM_HANDBACK_NACK](callId=%d,entryId=%d,hoState=%d)\n}\n",
+ callIndex, mmInMsg->entry_id, hoState_);
+
+ // Treat it like a Ho. Req. Nack.
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_NACK;
+ vcOutMsg.msgData.perfHandbackNack.cause = JC_FAILURE_CSU_UNI_CONNECT_FAILED;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_GP_HB);
+ }
+
+ hoSimplexConnected_ = true;
+
+ //Send the Perform Ack message.
+
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_ACK;
+ vcOutMsg.msgData.perfHandbackAck.handCmd = mmInMsg->l3_data.handReqAck.handCmd;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchHoReqAck): [==>GP-B PERFORM_HANDBACK_ACK](callId=%d,entryId=%d,hoState=%d)\n}\n",
+ callIndex, mmInMsg->entry_id, hoState_);
+
+ // start the T202 timer
+ parent->sessionTimer->setTimer(CALL_HAND_TRG_T202); //ext-HO FFS-TIMER
+
+ hoState_ = HAND_ST_ANCH_SND_HB_REQ_ACK;
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleAnchHoComplt(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleAnchHoComplt", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchHoComplt): [<==RM HANDOVER_COMPLETE] (callIndex=%d,entryId=%d,hoState=%d)\n}\n",
+ callIndex, parent->entryId, hoState_);
+
+ //Send the Complete Handback message.
+ vcOutMsg.msgType = INTER_VC_CC_COMPLETE_HANDBACK;
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+
+ //Make voice connection
+ T_CSU_PORT_ID oldPort, srcPort, snkPort;
+ T_CSU_RESULT_CON csuResult;
+
+ oldPort.portType = CSU_RTP_PORT;
+ oldPort.portId.rtpHandler = hoRtpSession_;
+
+ if (hoRtpSession_ != NULL)
+ {
+ if ( (csuResult = csu_OrigTermBreakAll(&oldPort)) != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_WARNING("{\nMNETeiWARNING(etrg::handleAnchHoComplt) CSU BreakAll Error(%d) for oldPort(%d, %x)\n}\n",
+ csuResult, oldPort.portType, oldPort.portId.rtpHandler);
+
+ //Ignore this warning to allow call going along
+ }
+
+ ReleaseHandoverRtpChannel(hoRtpSession_);
+
+ hoRtpSession_ = NULL;
+ }
+
+ srcPort.portType = CSU_RTP_PORT;
+ srcPort.portId.rtpHandler = VoipCallGetRTPHandle(parent->hoCallLeg->h323CallHandle);
+
+ snkPort.portType = CSU_GSM_PORT;
+ snkPort.portId.gsmHandler = parent->entryId;
+ if ((csuResult = csu_DuplexConnect(&srcPort, &snkPort)) != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleAnchHoComplt) CSU 2-WAY Conn Error (%d) SrcPort(%d:%p)<->SnkPort(%d:%p)\n}\n",
+ csuResult, srcPort.portType, srcPort.portId.rtpHandler, snkPort.portType, snkPort.portId.rtpHandler);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ //Empty the queues now. Do this only at the end.
+ emptyRRQueue ();
+ emptyDownlinkQueue();
+ emptyMMQueue ();
+
+ //
+ DBG_LEAVE();
+ return (CC_RELEASE_GP_HO);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleAnchPostHoRls(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleAnchPostHoRls", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchPostHoRls): [<==GP-B POST_HANDOVER_RLS] (callIndex=%d,hoState=%d,reIpAddr=%x,reCallId=%d)\n}\n",
+ callIndex, hoState_, vcInMsg->origVcAddress, vcInMsg->origSubId);
+
+ // cancel any timers running
+ parent->sessionTimer->cancelTimer();
+
+ hoEndCause_ = MC_HO_RLS_FAILURE;
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleTrgToAnchPostHoMobEvent(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleTrgToAnchPostHoMobEvent", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchPostHoMobEvent): [<==GP-B POST_HANDOVER_EVENT] (callIndex=%d,hoState=%d,reIpAddr=%x,reCallId=%d)\n}\n",
+ callIndex, hoState_, vcInMsg->origVcAddress, vcInMsg->origSubId);
+
+ //PostL3RecvMsLog(msInMsg->lapdm_oid, msInMsg->sapi, &msInMsg->l3_data);
+
+ switch (vcInMsg->origModuleId)
+ {
+ case MODULE_RM:
+ //Should not happen: ignore RR message but watch out for analysis when it really occurs.
+ DBG_WARNING("{\nMNETeiTRACE(etrg::handleAnchPostHoMobEvent): [<==GP-B POST_HANDOVER_EVENT (RR Message)] (callIndex=%d,hoState=%d,reIpAddr=%x,reCallId=%d)\n}\n",
+ hoAgId_, callIndex, hoState_, vcInMsg->origVcAddress, vcInMsg->origSubId);
+
+ break;
+
+ case MODULE_MD:
+ //Pass up to PLMN (anchor)
+ sendMSMsgToAnchorCC(&vcInMsg->msgData.postHoMobEventData.msInMsg);
+ break;
+
+ default:
+ // late event
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgToAnchPostHoMobEvent) CC Error Invalid OrigModuleId(%d) (hoAgId=%d,callId=%d,hoState=%d, reIpAddr=%x, reCallId=%d)\n}\n",
+ vcInMsg->origModuleId, hoAgId_, callIndex, hoState_, vcInMsg->origVcAddress, vcInMsg->origSubId);
+ }
+
+ DBG_LEAVE();
+ return(CC_MESSAGE_PROCESSING_COMPLT);
+
+}
+
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleTrgToAnchPerfHbReq(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleTrgToAnchPerfHbReq", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHbReq): [<==GP-B PERFORM_SUBSEQUENT_HO_REQ] (callIndex=%d,hoState=%d,reIpAddr=%x,reCallId=%d cand(MCC:%x%x% MNC:%x%x%x LAC:%x CI:%x)\n}\n",
+ callIndex, hoState_, vcInMsg->origVcAddress, vcInMsg->origSubId,
+ vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId.mcc[2],
+ vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId.mcc[1],
+ vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId.mcc[0],
+ vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId.mnc[2],
+ vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId.mnc[1],
+ vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId.mnc[0],
+ vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId.lac,
+ vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId.ci);
+
+ // Use the same criteria as when triggered on the anchor side.
+ if (!parent->hoCallVoiceConnected())
+ {
+ // Need to fix the cause value for the nack.
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHbReq): HB disallowed due to improper hoCallState(%d) (hoAgId=%d,callId=%d,reIpAddr=%x,reCallId=%d)\n}\n",
+ parent->hoCallState(),hoAgId_,callIndex, vcInMsg->origVcAddress, vcInMsg->origSubId);
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHbReq): [==>GP-B PERFORM_SUBSEQUENT_HO_REQ] (callIndex=%d,hoState=%d,reIpAddr=%x,reCallId=%d)\n}\n",
+ callIndex, hoState_, vcInMsg->origVcAddress, vcInMsg->origSubId);
+
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_NACK;
+ vcOutMsg.msgData.perfHandbackNack.cause = JC_FAILURE_HANDBACK_NOT_ALLOWED;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ return(CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ if ( isEqualGlobalCellId(&(vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId), &MY_GLOBALCELL_ID) &&
+ !forcedHandmsc3 )
+ {
+ //HB->anchor GP scenario
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHbReq): [<==GP-B HANDBACK to GP-A] (callIndex=%d,hoState=%d,reIpAddr=%x,reCallId=%d)\n}\n",
+ callIndex, hoState_, vcInMsg->origVcAddress, vcInMsg->origSubId);
+
+ // Build MM_EST_REQ for sake of the handback <ext-HO FFS-CIPH>
+ memcpy( (unsigned char*) &(mmOutMsg.l3_data.handReq.cipherCmd),
+ (unsigned char*) &currEncrypt_, sizeof(IntraL3CipherModeCommand_t));
+ mmOutMsg.l3_data.handReq.channelType = currChannel_;
+ mmOutMsg.l3_data.handReq.qid = msgQId;
+
+ // Send internal MM msg -
+ sendMM(INTRA_L3_MM_EST_REQ, INTRA_L3_RR_HANDOVER_REQ, parent->entryId, &mmOutMsg);
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchToTrgPerfHoReq): [==>MM MM_EST_REQ] (hoAgId_=%d,callId=%d,speech%d:%d,ciph:%d:%d,Kc:%x%x%x%x)\n}\n",
+ hoAgId_, callIndex,
+ vcOutMsg.msgData.perfHandoverReq.channelType.bearerType,
+ vcOutMsg.msgData.perfHandoverReq.channelType.speechChann.version,
+ currEncrypt_.cmd.cipherModeSetting.ciphering,
+ currEncrypt_.cmd.cipherModeSetting.algorithm,
+ currEncrypt_.Kc[0],currEncrypt_.Kc[1],
+ currEncrypt_.Kc[2],currEncrypt_.Kc[3]);
+
+ parent->sessionTimer->setTimer(CALL_HAND_TRG_T202);
+
+ hoState_ = HAND_ST_ANCH_RCV_HB_REQ;
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+ } else
+ {
+ VBLINK_API_CELL_LOCATION_REQUEST_MSG t_cellLocationRequest;
+
+ if (forcedHandmsc3)
+ {
+ h3GlobalCellId_ = ccHoTrgGlobalCellId;
+ h3VcIpAddress_ = ccHoTrgCellIpAddress;
+ } else
+ {
+ h3GlobalCellId_ = vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId;
+
+ }
+
+ candGlobalCellId_t candidate;
+ candidate = vcInMsg->msgData.perfHandbackReq.globalCellId;
+
+ if (candidate.candIsExternal)
+ {
+ //Handback from non-anchor GP to PLMN
+ populateAHandoverRequest(&MY_GLOBALCELL_ID, &candidate.candGlobalCellId);
+
+ A_Result_t result;
+ NonStdRasMessagePerformHandbackRQ_t handbackRQ;
+
+ memset( (char*) &handbackRQ, 0, sizeof(NonStdRasMessagePerformHandbackRQ_t) );
+
+ if ( A_RESULT_SUCCESS != (result=
+ AIF_Encode(&aifMsg, (T_AIF_MessageUnit*)&handbackRQ.A_HANDOVER_REQUEST) ) )
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgToAnchPerfHbReq): A-HANDOVER-REQUEST encoding error(%d)(hoAgId=%d,callIndex=%d)\n\n}\n",
+ result,hoAgId_,callIndex);
+
+ hoEndCause_ = JC_FAILURE_A_INTERFACE_MESSAGE_ENCODING_FAILED;
+
+ DBG_LEAVE();
+ return (CC_RELEASE_EH_HB);
+ }
+
+ //Send PERFORM-HANDBACK-REQ to HOA
+ handbackRQ.hoCause = vcInMsg->msgData.perfHandbackReq.hoCause;
+ handbackRQ.header.origSubId = callIndex;
+ handbackRQ.header.destSubId = hoAgId_;
+ handbackRQ.globalCellID = h3GlobalCellId_;
+ handbackRQ.externalCell = true;
+
+ if (!VBLinkPerformHandback(&handbackRQ))
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgToAnchPerfHbReq): VBLinkPerformHandoverAck() failed! (hoAgId=%d,callId=%d,hoState=%d)\n}\n",
+ hoAgId_,callIndex,hoState_);
+
+ DBG_HEXDUMP( (unsigned char*) &handbackRQ,
+ (int) (handbackRQ.A_HANDOVER_REQUEST.msglength+26)
+ );
+
+ DBG_ERROR("}\n");
+
+ hoEndCause_ = JC_FAILURE_A_INTERFACE_MESSAGE_ENCODING_FAILED;
+
+ DBG_LEAVE();
+ return (CC_RELEASE_EH_HB);
+ }
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHbReq): [==>HOA PERFORM_HANDBACK_REQ](callId=%d,entryId=%d)\n}\n",
+ callIndex, parent->entryId);
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHbReq) PERFORM_HANDBACK_REQ MESSAGE DATA:\n");
+ DBG_TRACE(" : hoAgId_=%d, callId=%d\n",hoAgId_, callIndex);
+ DBG_TRACE(" : target cell(type=%d, mcc[1-3]:%x,%x,%x; mnc[1-3]:%x,%x,%x;lac=%x,ci=%x)\n",
+ handbackRQ.globalCellID.ci_disc,
+ handbackRQ.globalCellID.mcc[0],handbackRQ.globalCellID.mcc[1],handbackRQ.globalCellID.mcc[2],
+ handbackRQ.globalCellID.mnc[0],handbackRQ.globalCellID.mnc[1],handbackRQ.globalCellID.mnc[2],
+ handbackRQ.globalCellID.lac,handbackRQ.globalCellID.ci);
+
+ DBG_TRACE(" Encoded A_HANDOVER_REQ HEX DUMP:\n");
+ DBG_HEXDUMP((unsigned char*) &handbackRQ, sizeof (NonStdRasMessagePerformHandoverRQ_t) );
+ DBG_TRACE(" \n}\n");
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHbReq) Received A-INTERFACE-MSG DUMP (length=%d): \n",
+ handbackRQ.A_HANDOVER_REQUEST.msglength);
+ DBG_HEXDUMP(
+ (unsigned char*)handbackRQ.A_HANDOVER_REQUEST.A_INTERFACE_DATA,
+ (int)handbackRQ.A_HANDOVER_REQUEST.msglength
+ );
+ DBG_TRACE("\n END-OF-DUMP\n}\n");
+
+ parent->sessionTimer->setTimer(CALL_HAND_TRG_T211);
+ hoState_ = HAND_ST_ANCH_SND_HB_REQ;
+
+ } else
+ {
+ //Handover to 3rd GP10
+ if ( (!forcedHandmsc3) || (forcedHandmsc3&&useViperBase) )
+ {
+ //H3 scenario. Go ahead to inquire IP address of mscB'
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHbReq): [<==GP-B HANDTO3rd to GP-B'] (callIndex=%d,hoState=%d,B-reIpAddr=%x,B-reCallId-B=%d,B'-LAC:%x,B'-CI:%x)\n}\n",
+ callIndex, hoState_, vcInMsg->origVcAddress, vcInMsg->origSubId,
+ h3GlobalCellId_.lac, h3GlobalCellId_.ci);
+
+ sprintf(&(t_cellLocationRequest.ViperCellId[0]), "%d:%d", h3GlobalCellId_.lac,h3GlobalCellId_.ci);
+
+ t_cellLocationRequest.TxnId = callIndex;
+
+ if (VBLinkLocationRequest(t_cellLocationRequest) == false)
+ {
+ //Ignore the message
+ DBG_ERROR("{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHbReq):VBLinkLocationRequest()failed for GP(%d:%d)(hoAgId=%d,callId=%d,hoState=%d)\n}\n",
+ h3GlobalCellId_.lac, h3GlobalCellId_.ci,hoAgId_,callIndex,hoState_);
+
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_NACK;
+ vcOutMsg.msgData.perfHandbackNack.cause = JC_FAILURE_ANCH_VB_LINK_PROBLEM;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_GP_HB);
+ }
+
+ // start the VB timer
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_TVB);
+
+ //MSC-B' born here while MSC-B is still alive. Mark handover type and relevant state
+ hoState_ = HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ;
+
+ } else
+ {
+ //MSC-B' born here
+ hoState_ = HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ;
+
+ DBG_LEAVE();
+ return (handleVcAddressRsp());
+ }
+ }
+ }
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleVcAddressRsp(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleVcAddressRsp", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleVcAddressRsp): [<==HOA IP ADDRESS RSP] (callIndex=%d,entryId=%d,ipAddr=%x)\n}\n",
+ callIndex, parent->entryId,hoVcIpAddress_);
+
+ //Cancel Timer Tvb
+ parent->sessionTimer->cancelTimer();
+
+ switch (hoState_)
+ {
+ case HAND_ST_ANCH_VC_IP_ADDRESS_REQ:
+ //Handover from anchor GP->another GP
+ if (hoRtpSession_ != NULL)
+ ReleaseHandoverRtpChannel(hoRtpSession_);
+ break;
+
+ case HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ:
+ //Handover to 3rd GP from nonanchor GP
+ if (h3RtpSession_ != NULL)
+ ReleaseHandoverRtpChannel(h3RtpSession_);
+ break;
+
+ default:
+ DBG_ERROR("{\nMNETeiTRACE(etrg::handleVcAddressRsp): CC Internal Error (hoAgId=%d,callId=%d,entryId=%d,hoState=%d)\n",
+ hoAgId_, callIndex, parent->entryId, hoState_);
+ DBG_LEAVE();
+ return (JCC_NULL_EVENT);
+ }
+
+ HJCRTPSESSION reRtpSession;
+
+ if ((reRtpSession = AssignHandoverRtpChannel())
+ == NULL)
+ {
+ // Do not proceed with ho
+ DBG_ERROR ("{\nMNETeiTRACE(etrg::handleVcAddressRsp): AssignHandoverRtpChannel failed for reRtpSession(hoAgId=%d,callId=%d,entryId=%d,hoState=%d\n}\n",
+ hoAgId_,callIndex,parent->entryId,hoState_);
+ DBG_LEAVE();
+ return( (hoState_==HAND_ST_ANCH_VC_IP_ADDRESS_REQ) ? CC_RELEASE_GP_HO:CC_RELEASE_GP_H3);
+ }
+
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDOVER;
+ vcOutMsg.msgData.perfHandoverReq.sourceInRtpPort
+ = GetIncomingHandoverRtpPort(reRtpSession);
+ vcOutMsg.msgData.perfHandoverReq.channelType.bearerType
+ = BEARER_SPEECH;
+ vcOutMsg.msgData.perfHandoverReq.channelType.speechChann
+ = currSpeechCh_;
+ vcOutMsg.msgData.perfHandoverReq.globalCellId
+ = MY_GLOBALCELL_ID;
+
+ IntraL3CipherModeCommand_t cipherCmd;
+ //if (getExtHoCipherAlgo(&cipherCmd))
+ {
+ DBG_ERROR("{\nMNETeiTRACE(etrg::handleVcAddressRsp): getExtHoCipherAlgo() failed (hoAgId=%d,callId=%d,entryId=%d,hoState=%d)\n}\n",
+ hoAgId_,callIndex,parent->entryId,hoState_);
+ cipherCmd.cmd.cipherModeSetting.ciphering = CNI_RIl3_CIPHER_NO_CIPHERING;
+ }
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleVcAddressRsp): PerfHo (bearer %d, spchVer %d, ciphSet %d, algo %d, kc:%x,%x,%x,%x)\n}\n",
+ vcOutMsg.msgData.perfHandoverReq.channelType.bearerType,
+ vcOutMsg.msgData.perfHandoverReq.channelType.speechChann.version,
+ cipherCmd.cmd.cipherModeSetting.ciphering,
+ cipherCmd.cmd.cipherModeSetting.algorithm,
+ cipherCmd.Kc[0],cipherCmd.Kc[1],
+ cipherCmd.Kc[2],cipherCmd.Kc[3]);
+
+ memcpy( (unsigned char*) &(vcOutMsg.msgData.perfHandoverReq.cipherCmd),
+ (unsigned char*) &(cipherCmd),
+ sizeof (IntraL3CipherModeCommand_t) );
+
+
+ // Send Perform Handover to the Target ViperCell.
+ switch (hoState_)
+ {
+ case HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ:
+ // H3 case
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleVcAddressRsp): [==>GP-B' PERFORM_HANDOVER_REQ(h3)] (callIndex=%d,entryId=%d,lac=%d,ci=%d)\n}\n",
+ hoAgId_, callIndex, parent->entryId, hoGlobalCellId_.lac, hoGlobalCellId_.ci);
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleVcAddressRsp): hand3rd info (loRtpHndl=%p, loPort=%d, h3VcIpAddress=%d)\n}\n",
+ reRtpSession, vcOutMsg.msgData.perfHandoverReq.sourceInRtpPort, h3VcIpAddress_);
+
+ sendVcMsgH3(MODULE_CC, MODULE_CC);
+
+ h3RtpSession_ = reRtpSession;
+ hoState_ = HAND_ST_ANCH_SND_H3_REQ;
+ break;
+
+ case HAND_ST_ANCH_VC_IP_ADDRESS_REQ:
+ // HO case
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleVcAddressRsp): [==>GP-B PERFORM_HANDOVER_REQ(ho)] (callIndex=%d,entryId=%d,lac=%d,ci=%d)\n}\n",
+ hoAgId_, callIndex, parent->entryId, hoGlobalCellId_.lac, hoGlobalCellId_.ci);
+
+ DBG_TRACE("{\nNETeiTRACE(etrg::handleVcAddressRsp): handover info (loRtpHndl=%p, loPort=%d, hoVcIpAddress=%d)\n}\n",
+ reRtpSession, vcOutMsg.msgData.perfHandoverReq.sourceInRtpPort, hoVcIpAddress_);
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ hoRtpSession_ = reRtpSession;
+ hoState_ = HAND_ST_ANCH_SND_HO_REQ;
+
+ break;
+ }
+
+ // start the T202 timer
+ parent->sessionTimer->setTimer(CALL_HAND_TRG_T202);
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleAnchTvbTimerExpiry(void)
+{
+ JCCEvent_t retEvent = JCC_NULL_EVENT;
+
+ DBG_FUNC("CCTargetHandoverExtHo::handleAnchTvbTimerExpiry", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchTvbTimerExpiry): [<==CC TIMER Tvb FIRED] (callIndex=%d,hoState=%d)\n}\n",
+ callIndex, hoState_);
+
+ switch(hoState_)
+ {
+ case HAND_ST_ANCH_VC_IP_ADDRESS_REQ:
+ hoState_ = HAND_ST_TRG_HO_COMPLT;
+ retEvent = CC_MESSAGE_PROCESSING_COMPLT;
+
+ break;
+
+ case HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ:
+ retEvent = CC_RELEASE_GP_HB;
+
+ break;
+
+ default:
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleAnchTvbTimerExpiry): CC Error Inproper hoState(%d) (hoAgId=%d,callId=%d)\n}\n",
+ hoState_,hoAgId_,callIndex);
+ break;
+ }
+
+ DBG_LEAVE();
+ return (retEvent);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleAnchHoFail(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleAnchHoFail", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchHoFail): [<==RR HANDOVER FAILURE](callId=%d,entryId=%d)\n}\n",
+ callIndex, parent->entryId);
+
+ //cancel T202 timer
+ parent->sessionTimer->cancelTimer();
+
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_REVERT_TO_OLD;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ // break connection
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = hoRtpSession_;
+
+ if ((csuResult = csu_OrigTermBreakAll(&rtpSourcePort)) != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleAnchHoFail) CSU BreakAll Error(%d) for rtpPort(%d:%p)\n}\n",
+ csuResult, rtpSourcePort.portType, (int)rtpSourcePort.portId.rtpHandler);
+ }
+
+ DBG_LEAVE();
+ return (CC_RELEASE_GP_HO);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleTrgHoFail(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleTrgHoFail", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgHoFail): [<==RR HANDOVER FAILURE](callId=%d,entryId=%d)\n}\n",
+ callIndex, parent->entryId);
+
+ //cancel T204
+ parent->sessionTimer->cancelTimer();
+
+ //Pass an A-HANDOVER FAILURE to anchor i.e. PLMN
+
+ //Zero out message description
+ A_Handover_Failure_t *pFailure = (A_Handover_Failure_t*) &aifMsg.handoverFailure;
+ memset((char*) &aifMsg,0,sizeof(T_AIF_MSG));
+
+ //Mandatory IEs
+ pFailure->msgType = A_HANDOVER_FAILURE_TYPE;
+ pFailure->cause.ie_present = true;
+ pFailure->cause.elementIdentifier = 0x04;
+ pFailure->cause.length = 1;
+ pFailure->cause.length = (unsigned char) rrInMsg->l3_data.handFail.cause;
+
+ //No optional IEs furnished now
+
+ //Encode A-HANDOVER-FAILURE msg
+ A_Result_t result; A_INTERFACE_MSG_STRUCT_t aifData;
+ memset( (char*) &aifData, 0, sizeof(A_INTERFACE_MSG_STRUCT_t) );
+ if ( A_RESULT_SUCCESS != (result=
+ AIF_Encode(&aifMsg, (T_AIF_MessageUnit*)&aifData) ) )
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgHoFail): A-HANDOVER-FAILURE encoding failed (result=%d)\n\n}\n",
+ result);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_EH_HB);
+ }
+
+ //Send up bss APDU to PLMN (anchor part)
+ NonStdRasMessagePostHandoverMobEvent_t bssApdu;
+
+ bssApdu.header.origSubId = callIndex;
+ bssApdu.header.destSubId = hoAgId_;
+
+ bssApdu.LAYER3PDU.LAYER3DATA[0] = 0x00; //BSSMAP
+ bssApdu.LAYER3PDU.LAYER3DATA[1] = (unsigned char) aifData.msglength;
+ memcpy((char*)&bssApdu.LAYER3PDU.LAYER3DATA[2],(char*)aifData.A_INTERFACE_DATA,
+ aifData.msglength);
+ bssApdu.LAYER3PDU.msglength = (unsigned short) (2 + aifData.msglength);
+
+ if (!VBLinkPostHandoverMobEvent(&bssApdu))
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgHoFail): VBLinkPostHandoverMobEvent API failed !\n}\n");
+ DBG_HEXDUMP((unsigned char*) &bssApdu, bssApdu.LAYER3PDU.msglength+2);
+
+ DBG_ERROR("}\n");
+
+ DBG_LEAVE();
+ return (CC_RELEASE_EH_HB);;
+ }
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etgt::handleTrgHoFail): [==>HOA A-HANDOVER-FAILURE] (callId=%d,entryId=%d)\n",
+ callIndex,parent->entryId);
+ DBG_HEXDUMP((unsigned char*) &bssApdu, bssApdu.LAYER3PDU.msglength+2);
+ DBG_CALL_TRACE(hoAgId_, "}\n");
+
+ //Retry next candidate if there is candidate
+ int i;
+ IntraL3HandoverRequired_t *inMsg = &handReqd;
+
+ if ( (i=getNextHoCandidate()) == (-1) )
+ {
+ DBG_TRACE("MNETeiTRACE(etrg::handleTrgHoFail): no more candidate to retrytry (#ofCands=%d)\n",
+ inMsg->numCandidates);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_EH_HB);
+
+ } else
+ {
+ candGlobalCellId_t candidate;
+ candidate = inMsg->candGlobalCellId[i];
+
+ DBG_TRACE("MNETeiTRACE(etrg::handleTrgHoFail): try next cand cell! %d-th of Cands(%d) candCell(%x,%x%x%x,%x%x%x,%x,%x) hoState(%d)\n",
+ i,inMsg->numCandidates,
+ candidate.candGlobalCellId.mcc[0],candidate.candGlobalCellId.mcc[1],
+ candidate.candGlobalCellId.mcc[2],candidate.candGlobalCellId.mnc[0],
+ candidate.candGlobalCellId.mnc[1],candidate.candGlobalCellId.mnc[2],
+ candidate.candGlobalCellId.lac, candidate.candGlobalCellId.ci,
+ hoState_);
+
+ if (candidate.candIsExternal)
+ {
+ //Handback from anchor GP to PLMN case
+ populateAHandoverRequest(&MY_GLOBALCELL_ID, &candidate.candGlobalCellId);
+
+ A_Result_t result;
+ NonStdRasMessagePerformHandbackRQ_t handbackRQ;
+
+ memset( (char*) &handbackRQ, 0, sizeof(NonStdRasMessagePerformHandbackRQ_t) );
+
+ if ( A_RESULT_SUCCESS != (result=
+ AIF_Encode(&aifMsg, (T_AIF_MessageUnit*)&handbackRQ.A_HANDOVER_REQUEST) ) )
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgHoFail): A-HANDOVER-REQUEST encoding failed (result=%d)\n\n}\n",
+ result);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_EH_HB);
+ }
+
+ //Send PERFORM-HANDBACK-REQ to HOA
+ handbackRQ.hoCause = inMsg->hoCause;
+ handbackRQ.header.origSubId = callIndex;
+ handbackRQ.header.destSubId = hoAgId_;
+ handbackRQ.globalCellID = candidate.candGlobalCellId;
+ handbackRQ.externalCell = true;
+
+ if (!VBLinkPerformHandback(&handbackRQ))
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgHoFail): VBLinkPerformHandoverAck API failed !\n}\n");
+
+ DBG_HEXDUMP( (unsigned char*) &handbackRQ,
+ (int) (handbackRQ.A_HANDOVER_REQUEST.msglength+26)
+ );
+
+ DBG_ERROR("}\n");
+
+ DBG_LEAVE();
+ return (CC_RELEASE_EH_HB);
+ }
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgHoFail): [==>HOA PERFORM_HANDBACK_REQ](callId=%d,entryId=%d)\n}\n",
+ callIndex, parent->entryId);
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleTrgHoFail) PERFORM_HANDBACK_REQ MESSAGE DATA:\n");
+ DBG_TRACE(" : hoAgId_=%d, callId=%d\n",hoAgId_, callIndex);
+ DBG_TRACE(" : target cell(type=%d, mcc[1-3]:%x,%x,%x; mnc[1-3]:%x,%x,%x;lac=%x,ci=%x)\n",
+ handbackRQ.globalCellID.ci_disc,
+ handbackRQ.globalCellID.mcc[0],handbackRQ.globalCellID.mcc[1],handbackRQ.globalCellID.mcc[2],
+ handbackRQ.globalCellID.mnc[0],handbackRQ.globalCellID.mnc[1],handbackRQ.globalCellID.mnc[2],
+ handbackRQ.globalCellID.lac,handbackRQ.globalCellID.ci);
+
+ DBG_TRACE(" Encoded A_HANDOVER_REQ HEX DUMP:\n");
+ DBG_HEXDUMP((unsigned char*) &handbackRQ, sizeof (NonStdRasMessagePerformHandoverRQ_t) );
+ DBG_TRACE(" \n}\n");
+
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleTrgHoFail) Received A-INTERFACE-MSG DUMP (length=%d): \n",
+ handbackRQ.A_HANDOVER_REQUEST.msglength);
+ DBG_HEXDUMP(
+ (unsigned char*)handbackRQ.A_HANDOVER_REQUEST.A_INTERFACE_DATA,
+ (int)handbackRQ.A_HANDOVER_REQUEST.msglength
+ );
+ DBG_TRACE("\n END-OF-DUMP\n}\n");
+
+ parent->sessionTimer->setTimer(CALL_HAND_TRG_T211);
+
+ DBG_CALL_TRACE(hoAgId_, "\nMNETeiTRACE(etrg::handleTrgHoFail): [<==CC START TIMER T211] (callId=%d, T211=%d ticks)\n}\n",
+ callIndex, (int)CALL_HAND_TRG_T211);
+
+ hoState_ = HAND_ST_TRG_SND_HB_REQ;
+
+ } else
+ {
+ //Handover from anchor GP to another GP case
+ sprintf(&(cellLocationRequest.ViperCellId[0]), "%d:%d",
+ candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+
+ cellLocationRequest.TxnId = callIndex;
+
+ if (false == VBLinkLocationRequest(cellLocationRequest) )
+ {
+ // Ignore the message
+ DBG_ERROR("{\nMNETeiTRACE(etrg::handleTrgHoFail): VBLinkLocationRequest failed!\n");
+ DBG_ERROR(" (hoAgId=%d callId=%d entryId=%d,lac=%d,ci=%d)\n}\n",
+ hoAgId_, callIndex, parent->entryId,
+ candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_EH_HB);
+ }
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgHoFail): [==>HOA IP_ADDRESS_REQ](callId=%d,entryId=%d,lac=%d,ci=%d)\n}\n",
+ callIndex, parent->entryId,
+ candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgHoFail): [<==CC START TIMER Tvb](callId=%d,entryId=%d,lac=%d,ci=%d)\n}\n",
+ callIndex, parent->entryId,
+ candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_TVB);
+
+ hoState_ = HAND_ST_ANCH_VC_IP_ADDRESS_REQ;
+ }
+ }
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleAnchToTrgCompltHb(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleAnchToTrgCompltHb", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchToTrgCompltHb): [<==HOA HANDBACK SUCCESS] (callIndex=%d, entryId=%d,hoState=%d)\n}\n",
+ callIndex, parent->entryId,hoState_);
+
+ // cancel T204 timer
+ parent->sessionTimer->cancelTimer();
+
+ if (hoState_==HAND_ST_ANCH_RCV_HB_REQ_ACK)
+ {
+ vcOutMsg.msgType = INTER_VC_CC_COMPLETE_HANDBACK;
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleAnchToTrgCompltHb): [==>GP-B HANDBACK SUCCESS] (callIndex=%d,hoState=%d)\n}\n",
+ callIndex, hoState_);
+ }
+
+ DBG_LEAVE();
+ return (CC_RELEASE_OWN);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleTrgToAnchCompltHo(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleTrgToAnchCompltHo", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ //cancel T202
+ parent->sessionTimer->cancelTimer();
+
+ GlobalCellId_t globalCellId, globalCellId_t;
+
+ T_CSU_PORT_ID oldPort, srcPort, snkPort;
+ T_CSU_RESULT_CON csuResult;
+
+ srcPort.portType = CSU_RTP_PORT;
+ srcPort.portId.rtpHandler = VoipCallGetRTPHandle(parent->hoCallLeg->h323CallHandle);
+
+ switch (hoState_)
+ {
+ case HAND_ST_ANCH_RCV_HO_REQ_ACK:
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchCompltHo): [<==GP-B HANDOVER_COMPLETE] (callIndex=%d,hoState=%d,reIpAddr=%x,reCallId=%d)\n}\n",
+ callIndex, hoState_, vcInMsg->origVcAddress, vcInMsg->origSubId);
+
+ oldPort.portType = CSU_GSM_PORT;
+ oldPort.portId.gsmHandler = parent->entryId;
+ snkPort.portType = CSU_RTP_PORT;
+ snkPort.portId.rtpHandler = hoRtpSession_;
+
+ globalCellId = hoGlobalCellId_;
+
+ break;
+
+ case HAND_ST_ANCH_RCV_H3_REQ_ACK:
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchCompltHo): [<==GP-B' HANDOVER_COMPLETE] (callIndex=%d,hoState=%d,reIpAddr=%x,reCallId=%d)\n}\n",
+ callIndex, hoState_, vcInMsg->origVcAddress, vcInMsg->origSubId);
+
+ oldPort.portType = CSU_RTP_PORT;
+ oldPort.portId.rtpHandler = hoRtpSession_;
+ snkPort.portType = CSU_RTP_PORT;
+ snkPort.portId.rtpHandler = h3RtpSession_;
+
+ globalCellId = h3GlobalCellId_;
+
+ break;
+
+ default:
+ DBG_ERROR("{\nMNETeiTRACE(etrg::handleTrgToAnchCompltHo) CC Inproper hoState(%d)(hoAgId=%d,callId=%d)\n}\n",
+ hoState_,hoAgId_,callIndex);
+
+ DBG_LEAVE();
+ return(JCC_NULL_EVENT);
+ }
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleTrgToAnchCompltHo) (hoState=%d) srcPort(%d:%p) oldPort(%d:%p) snkPort(%d,%x)\n}\n",
+ hoState_,
+ srcPort.portType, srcPort.portId.rtpHandler,
+ oldPort.portType, oldPort.portId.rtpHandler,
+ snkPort.portType, snkPort.portId.rtpHandler);
+
+ if ( (csuResult = csu_OrigTermBreakAll(&oldPort)) != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_WARNING("{\nMNETeiWARNING(etrg::handleTrgToAnchCompltHo) CSU BreakAll Error(%d) for oldPort(%d, %x)\n}\n",
+ csuResult, oldPort.portType, oldPort.portId.rtpHandler);
+
+ //Ignore this warning to allow call going along
+ }
+
+ // Make duplex ho or h3 connection between src and snk rtp ports
+ if ((csuResult = csu_DuplexConnect(&snkPort, &srcPort)) != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgToAnchCompltHo) CSU 2-WAY Conn Error (%d) SrcPort(%d:%p)<->SnkPort(%d:%p)\n}\n",
+ csuResult, srcPort.portType, srcPort.portId.rtpHandler, snkPort.portType, snkPort.portId.rtpHandler);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchCompltHo): [==>CSU 2-WAY CONNECT] src(%d:%p) snk(%d:%p)] (callIndex=%d, hoState=%d, reIpAddr=%x,reCallId=%d)\n}\n",
+ srcPort.portType, srcPort.portId.rtpHandler, snkPort.portType, snkPort.portId.rtpHandler,
+ callIndex, hoState_, vcInMsg->origVcAddress, vcInMsg->origSubId);
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleTrgToAnchCompltHo) BEFORE B'->B (hoAgId=%d,callId=%d,hoState=%d) ho(rtp=%p:%d vcCc=%x:%d vcId=%d:%d) h3(rtp=%p:%d vcCc=%x:%d vcId=%d:%d)\n}\n",
+ hoAgId_,callIndex, hoState_,
+ hoRtpSession_,otherHoIncomingRtpPort_, hoVcIpAddress_,hoVcCallIndex_, hoGlobalCellId_.lac,hoGlobalCellId_.ci,
+ h3RtpSession_,otherH3IncomingRtpPort_, h3VcIpAddress_,h3VcCallIndex_, h3GlobalCellId_.lac,h3GlobalCellId_.ci);
+
+ if (hoState_ == HAND_ST_ANCH_RCV_H3_REQ_ACK)
+ {
+ // Send the Complete Handback message to vcB
+ vcOutMsg.msgType = INTER_VC_CC_COMPLETE_HANDBACK;
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ //Release hoRtpHndle
+
+ if ( hoRtpSession_ != NULL ) ReleaseHandoverRtpChannel(hoRtpSession_);
+
+ // Update vcB'->vcB
+ hoRtpSession_ = h3RtpSession_;
+ h3RtpSession_ = NULL;
+ hoVcIpAddress_ = h3VcIpAddress_;
+ h3VcIpAddress_ = 0;
+ hoVcCallIndex_ = h3VcCallIndex_;
+ h3VcCallIndex_ = CC_MAX_CC_CALLS_DEF_VAL;
+ otherHoIncomingRtpPort_ = otherH3IncomingRtpPort_;
+ otherH3IncomingRtpPort_ = 0;
+ hoGlobalCellId_ = h3GlobalCellId_;
+ memset(&h3GlobalCellId_, 0, sizeof(GlobalCellId_t));
+
+ hoSimplexConnected_ = false;
+ h3SimplexConnected_ = false;
+ hoSrcLinkLost_ = false;
+ h3SrcLinkLost_ = false;
+ } else
+ {
+ // Release rf
+ if (parent->entryId != (T_CNI_IRT_ID) JCC_UNDEFINED )
+ {
+ // Send internal MM msg - release channel
+ sendMM(INTRA_L3_MM_REL_REQ, INTRA_L3_NULL_MSG, parent->entryId, &mmOutMsg);
+ parent->resetIrt();
+ }
+
+ parent->entryId = (T_CNI_IRT_ID) JCC_UNDEFINED;
+ parent->oid = CNI_LAPDM_NULL_OID;
+ hoSimplexConnected_ = false;
+ hoSrcLinkLost_ = false;
+ }
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleTrgToAnchCompltHo) AFTER B'->B (hoAgId=%d,callId=%d,hoState=%d) ho(rtp=%p:%d vcCc=%x:%d vcId=%d:%d) h3(rtp=%p:%d vcCc=%x:%d vcId=%d:%d)\n}\n",
+ hoAgId_,callIndex, hoState_,
+ hoRtpSession_,otherHoIncomingRtpPort_, hoVcIpAddress_,hoVcCallIndex_, hoGlobalCellId_.lac,hoGlobalCellId_.ci,
+ h3RtpSession_,otherH3IncomingRtpPort_, h3VcIpAddress_,h3VcCallIndex_, h3GlobalCellId_.lac,h3GlobalCellId_.ci);
+
+ hoState_ = HAND_ST_ANCH_HO_COMPLT;
+
+ // empty the queues now that the handover is successful
+ // Do this only at the end.
+
+ emptyRRQueue ();
+ emptyDownlinkQueue();
+ emptyMMQueue ();
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleTrgT202TimerExpiry(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleTrgT202TimerExpiry", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgT202TimerExpiry): [<==CC TIMER T202 FIRED] (callIndex=%d,entryId=%d)\n}\n",
+ callIndex, parent->entryId);
+
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleTrgToAnchPerfHoAck(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleTrgToAnchPerfHoAck", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ //cancel T202
+ parent->sessionTimer->cancelTimer();
+
+ T_CSU_PORT_ID rtpSinkPort;
+
+ switch(hoState_)
+ {
+ case HAND_ST_ANCH_SND_H3_REQ:
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoAck): [<==GP-B' PERFORM_HANDOVER_ACK] (callIndex=%d,entryId=%d,hoState=%d,reIpAddr=%x,reCallId=%d)\n}\n",
+ callIndex, parent->entryId, hoState_, vcInMsg->origVcAddress, vcInMsg->origSubId);
+
+ h3VcCallIndex_ = vcInMsg->origSubId;
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoAck) hand23rd (hoAgId=%d,callId=%d,entryId=%d,h3RtpHndl=%p) (reIpAddr=%x, reCallId=%d, reRtpPort=%d)\n}\n",
+ hoAgId_, callIndex, parent->entryId, h3RtpSession_,
+ h3VcIpAddress_, h3VcCallIndex_, vcInMsg->msgData.perfHandoverAck.targetInRtpPort);
+
+ if (h3RtpSession_ == NULL)
+ {
+ DBG_WARNING("{\nMNETeiWARNING(etrg::handleTrgToAnchPerfHoAck) h3RtpHandle NULL (hoAgId=%d,callId=%d,entryId=%d, hoState=%d)(reIpAddr=%x,reCallId=%d)\n}\n",
+ hoAgId_,callIndex, parent->entryId, hoState_, h3VcIpAddress_, h3VcCallIndex_);
+
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_ANCH_H3_RTP_HANDLE_NULL;
+ sendVcMsgH3(MODULE_CC, MODULE_CC);
+
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_NACK;
+ vcOutMsg.msgData.perfHandbackNack.cause = JC_FAILURE_ANCH_H3_RTP_HANDLE_NULL;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_GP_H3);
+ }
+
+ SetRemoteHandoverRtpPort(h3RtpSession_, h3VcIpAddress_,
+ vcInMsg->msgData.perfHandoverAck.targetInRtpPort);
+
+ rtpSinkPort.portType = CSU_RTP_PORT;
+ rtpSinkPort.portId.rtpHandler = h3RtpSession_;
+
+ break;
+
+ case HAND_ST_ANCH_SND_HO_REQ:
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoAck): [<==GP-B PERFORM_HANDOVER_ACK] (callIndex=%d,entryId=%d,hoState=%d,reIpAddr=%x,reCallId=%d)\n}\n",
+ callIndex, parent->entryId, hoState_, vcInMsg->origVcAddress, vcInMsg->origSubId);
+
+ hoVcCallIndex_ = vcInMsg->origSubId;
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoAck) handover (hoAgId=%d,callId=%d,entryId=%d,hoRtpHndl=%p) (reIpAddr=%x, reCallId=%d, reRtpPort=%d)\n}\n",
+ hoAgId_, callIndex, parent->entryId, hoRtpSession_,
+ hoVcIpAddress_, hoVcCallIndex_, vcInMsg->msgData.perfHandoverAck.targetInRtpPort);
+
+ if (hoRtpSession_ == NULL)
+ {
+ DBG_WARNING("{\nMNETeiWARNING(etrg::handleTrgToAnchPerfHoAck) hoRtpHandle NULL (hoAgId=%d,callId=%d,entryId=%d, hoState=%d)(reIpAddr=%x,reCallId=%d)\n}\n",
+ hoAgId_,callIndex, parent->entryId, hoState_, hoVcIpAddress_, hoVcCallIndex_);
+
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_ANCH_HO_RTP_HANDLE_NULL;
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_GP_HO);
+ }
+
+ SetRemoteHandoverRtpPort(hoRtpSession_, hoVcIpAddress_,
+ vcInMsg->msgData.perfHandoverAck.targetInRtpPort);
+
+ rtpSinkPort.portType = CSU_RTP_PORT;
+ rtpSinkPort.portId.rtpHandler = hoRtpSession_;
+
+ break;
+
+ default:
+ //Deadly problem, need shoubleshooting first before running ahead !
+ DBG_ERROR ("{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoAck): CC Error Inproper hoState(%d) (hoAgId=%d,callId=%d)\n}\n",
+ hoState_,hoAgId_,callIndex);
+ DBG_LEAVE();
+ return (JCC_NULL_EVENT);
+ }
+
+ // simplex conn for ho or h3
+
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = VoipCallGetRTPHandle(parent->hoCallLeg->h323CallHandle);
+
+ if ((csuResult = csu_SimplexConnect(&rtpSourcePort, &rtpSinkPort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_ERROR("{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoAck): CSU 1-Way Conn Error(%d) (hoAgId=%d,callId=%d,hoState=%d,srcRtpHndl=%p,snkRtpHndl=%p)\n}\n",
+ csuResult, hoAgId_,callIndex,hoState_,
+ (int)rtpSourcePort.portId.rtpHandler,
+ (int)rtpSinkPort.portId.rtpHandler);
+
+ if (hoState_ == HAND_ST_ANCH_SND_H3_REQ)
+ {
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDBACK;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_CSU_UNI_CONNECT_FAILED;
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_CSU_UNI_CONNECT_FAILED;
+ sendVcMsgH3(MODULE_CC, MODULE_CC);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_GP_H3);
+ } else
+ {
+ //hoState_ == HAND_ST_ANCH_SND_HO_REQ)
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_CSU_UNI_CONNECT_FAILED;
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_GP_HO);
+ }
+ }
+
+ // Handover or handover to 3rd Simplex Connection is made successfully
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoAck): [==>CSU 1-WAY CONNECT](callId=%d,hoState=%d,src=%d:%p<-->snk=%d:%p)\n}\n",
+ callIndex, hoState_,
+ rtpSinkPort.portType, rtpSinkPort.portId.rtpHandler,
+ rtpSourcePort.portType, rtpSourcePort.portId.rtpHandler);
+
+ switch(hoState_)
+ {
+ case HAND_ST_ANCH_SND_HO_REQ:
+ // Send internal RR msg
+ rrOutMsg.l3_data.handCmd.handCmd = vcInMsg->msgData.perfHandoverAck.handCmd;
+
+ sendRR(INTRA_L3_DATA, INTRA_L3_RR_HANDOVER_COMMAND, parent->entryId, &rrOutMsg);
+
+ hoSimplexConnected_ = true;
+ hoState_ = HAND_ST_ANCH_RCV_HO_REQ_ACK;
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoAck): [==>RM HANDOVER_COMMAND](callId=%d,hoState=%d,entryId=%d)\n}\n",
+ callIndex, hoState_,parent->entryId);
+ break;
+
+ case HAND_ST_ANCH_SND_H3_REQ:
+ //Send HB ack to MSC-B based on HO ack from MSC-B'
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_ACK;
+ vcOutMsg.msgData.perfHandbackAck.handCmd = vcInMsg->msgData.perfHandoverAck.handCmd;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ h3SimplexConnected_ = true;
+ hoState_ = HAND_ST_ANCH_RCV_H3_REQ_ACK;
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoAck): [==>GP-B PERFORM_HANDBACK_ACK](callId=%d,entryId=%d,hoState=%d)\n}\n",
+ callIndex,parent->entryId,hoState_);
+
+ break;
+ }
+
+ // start the T202 timer
+ parent->sessionTimer->setTimer(CALL_HAND_TRG_T202);
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleTrgToAnchPerfHoNack(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleTrgToAnchPerfHoNack", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ //cancel T202
+ parent->sessionTimer->cancelTimer();
+
+ int i;
+ IntraL3HandoverRequired_t *inMsg = &handReqd;
+
+ switch(hoState_)
+ {
+ case HAND_ST_ANCH_SND_HO_REQ:
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoNack): [<==GP-B PERFORM_HANDOVER_NACK] (callIndex=%d,entryId=%d,hoState=%d,reIpAddr=%x,reCallId=%d)\n}\n",
+ callIndex, parent->entryId, hoState_, vcInMsg->origVcAddress, vcInMsg->origSubId);
+
+ if ( (i=getNextHoCandidate()) != (-1) )
+ {
+ //Try next candidate
+ candGlobalCellId_t candidate;
+ candidate = inMsg->candGlobalCellId[i];
+
+ DBG_TRACE("MNETeiTRACE(etrg::handleTrgToAnchPerfHoNack): try next cand cell! %d-th of Cands(%d) candCell(%x,%x%x%x,%x%x%x,%x,%x) hoState(%d)\n}\n",
+ i,inMsg->numCandidates,
+ candidate.candGlobalCellId.mcc[0],candidate.candGlobalCellId.mcc[1],
+ candidate.candGlobalCellId.mcc[2],candidate.candGlobalCellId.mnc[0],
+ candidate.candGlobalCellId.mnc[1],candidate.candGlobalCellId.mnc[2],
+ candidate.candGlobalCellId.lac, candidate.candGlobalCellId.ci,
+ hoState_);
+
+ if (candidate.candIsExternal)
+ {
+ //Handback from anchor GP to PLMN case
+ populateAHandoverRequest(&MY_GLOBALCELL_ID, &candidate.candGlobalCellId);
+
+ A_Result_t result;
+ NonStdRasMessagePerformHandbackRQ_t handbackRQ;
+
+ memset( (char*) &handbackRQ, 0, sizeof(NonStdRasMessagePerformHandbackRQ_t) );
+
+ if ( A_RESULT_SUCCESS != (result=
+ AIF_Encode(&aifMsg, (T_AIF_MessageUnit*)&handbackRQ.A_HANDOVER_REQUEST) ) )
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgToAnchPerfHoNack): A-HANDOVER-REQUEST encoding failed (result=%d)\n\n}\n",
+ result);
+
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_A_INTERFACE_MESSAGE_ENCODING_FAILED;
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_GP_HO);
+ }
+
+ //Send PERFORM-HANDBACK-REQ to HOA
+ handbackRQ.hoCause = inMsg->hoCause;
+ handbackRQ.header.origSubId = callIndex;
+ handbackRQ.header.destSubId = hoAgId_;
+ handbackRQ.globalCellID = candidate.candGlobalCellId;
+ handbackRQ.externalCell = true;
+
+ if (!VBLinkPerformHandback(&handbackRQ))
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgToAnchPerfHoNack): VBLinkPerformHandoverAck API failed !\n}\n");
+
+ DBG_HEXDUMP( (unsigned char*) &handbackRQ,
+ (int) (handbackRQ.A_HANDOVER_REQUEST.msglength+26)
+ );
+
+ DBG_ERROR("}\n");
+
+ DBG_LEAVE();
+ return (CC_RELEASE_GP_HO);
+ }
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoNack): [==>HOA PERFORM_HANDBACK_REQ](callId=%d,entryId=%d,lac=%d,ci=%d)\n}\n",
+ callIndex, parent->entryId,candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoNack) PERFORM_HANDBACK_REQ MESSAGE DATA:\n");
+ DBG_TRACE(" : hoAgId_=%d, callId=%d\n",hoAgId_, callIndex);
+ DBG_TRACE(" : target cell(type=%d, mcc[1-3]:%x,%x,%x; mnc[1-3]:%x,%x,%x;lac=%x,ci=%x)\n",
+ handbackRQ.globalCellID.ci_disc,
+ handbackRQ.globalCellID.mcc[0],handbackRQ.globalCellID.mcc[1],handbackRQ.globalCellID.mcc[2],
+ handbackRQ.globalCellID.mnc[0],handbackRQ.globalCellID.mnc[1],handbackRQ.globalCellID.mnc[2],
+ handbackRQ.globalCellID.lac,handbackRQ.globalCellID.ci);
+
+ DBG_TRACE(" Encoded A_HANDOVER_REQ HEX DUMP:\n");
+ DBG_HEXDUMP((unsigned char*) &handbackRQ, sizeof (NonStdRasMessagePerformHandoverRQ_t) );
+ DBG_TRACE(" \n}\n");
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoNack) Received A-INTERFACE-MSG DUMP (length=%d): \n",
+ handbackRQ.A_HANDOVER_REQUEST.msglength);
+ DBG_HEXDUMP(
+ (unsigned char*)handbackRQ.A_HANDOVER_REQUEST.A_INTERFACE_DATA,
+ (int)handbackRQ.A_HANDOVER_REQUEST.msglength
+ );
+ DBG_TRACE("\n END-OF-DUMP\n}\n");
+
+ parent->sessionTimer->setTimer(CALL_HAND_TRG_T211);
+
+ DBG_CALL_TRACE(hoAgId_, "\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoNack): [<==CC START TIMER T211] (callId=%d, T211=%d ticks,lac=%d,ci=%d)\n}\n",
+ callIndex, (int)CALL_HAND_TRG_T211,candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+
+ hoState_ = HAND_ST_TRG_SND_HB_REQ;
+
+ } else
+ {
+ //Handover from anchor GP to another GP case
+ sprintf(&(cellLocationRequest.ViperCellId[0]), "%d:%d",
+ candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+
+ cellLocationRequest.TxnId = callIndex;
+
+ if (false == VBLinkLocationRequest(cellLocationRequest) )
+ {
+ // Ignore the message
+ DBG_ERROR("{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoNack): VBLinkLocationRequest failed!\n");
+ DBG_ERROR(" (hoAgId=%d callId=%d entryId=%d,lac=%d,ci=%d)\n}\n",
+ hoAgId_, callIndex, parent->entryId,
+ candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_GP_HO);
+ }
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoNack): [==>HOA IP_ADDRESS_REQ](callId=%d,entryId=%d,lac=%d,ci=%d)\n}\n",
+ callIndex, parent->entryId,
+ candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoNack): [<==CC START TIMER Tvb](hoAgId=%d,callId=%d,entryId=%d,lac=%d,ci=%d)\n}\n",
+ hoAgId_, callIndex, parent->entryId,
+ candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_TVB);
+
+ hoState_ = HAND_ST_ANCH_VC_IP_ADDRESS_REQ;
+ }
+
+ } else
+ {
+ DBG_TRACE("MNETeiTRACE(etrg::handleTrgToAnchPerfHoNack): run-out of (#ofCands=%d) (hoAgId=%d,callId=%d,entryId=%d,hoState=%d)\n",
+ inMsg->numCandidates,hoAgId_,callIndex,parent->entryId,hoState_);
+ DBG_LEAVE();
+ return (CC_RELEASE_GP_HO);
+ }
+
+ break;
+
+ case HAND_ST_ANCH_SND_H3_REQ:
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoNack): [<==GP-B' PERFORM_HANDOVER_NACK] (callIndex=%d,entryId=%d,hoState=%d,reIpAddr=%x,reCallId=%d)\n}\n",
+ callIndex, parent->entryId, hoState_, vcInMsg->origVcAddress, vcInMsg->origSubId);
+
+ //Abort action @ MSC-B'
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = vcInMsg->msgData.perfHandoverNack.cause;
+
+ sendVcMsgH3(MODULE_CC, MODULE_CC);
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoNack): [==>GP-B' ABORT_HANDOVER] (callIndex=%d,hoState=%d,reIpAddr=%x,reCallId=%d)\n}\n",
+ callIndex, hoState_, vcInMsg->origVcAddress, vcInMsg->origSubId);
+
+ // Abort HB part at MSC-B
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_NACK;
+ vcOutMsg.msgData.perfHandbackNack.cause = vcInMsg->msgData.perfHandoverNack.cause;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoNack): [==>GP-B ABORT_HANDBACK] (callIndex=%d,hoState=%d,reIpAddr=%x,reCallId=%d)\n}\n",
+ callIndex, hoState_, hoVcIpAddress_, hoVcCallIndex_);
+
+ DBG_LEAVE();
+ return(CC_RELEASE_GP_H3);
+
+ break;
+
+ default:
+ //Deadly problem, need shoubleshooting right away !
+ DBG_ERROR ("{\nMNETeiTRACE(etrg::handleTrgToAnchPerfHoNack): CC Inproper hoState(%d) (hoAgId=%d,callId=%d)\n}\n",
+ hoState_, hoAgId_, callIndex);
+ DBG_LEAVE();
+
+ return (JCC_NULL_EVENT);
+ }
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleTrgToAnchAbortHb(void)
+{
+ JCCEvent_t retEvent;
+
+ DBG_FUNC("CCTargetHandoverExtHo::handleTrgToAnchAbortHb", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchAbortHb): [<==GP-B ABORT_HANDBACK](callId=%d,hoState=%d)\n}\n",
+ callIndex, hoState_);
+
+ parent->sessionTimer->cancelTimer();
+
+ if ( (hoState_ == HAND_ST_ANCH_SND_HB_REQ) || (hoState_ ==HAND_ST_ANCH_RCV_HB_REQ_ACK) )
+ retEvent = CC_RELEASE_GP_EH_HB;
+ else if ( (hoState_ == HAND_ST_ANCH_RCV_HB_REQ) || (hoState_ == HAND_ST_ANCH_SND_HB_REQ_ACK) ||
+ (hoState_ == HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ) )
+ retEvent = CC_RELEASE_GP_HB;
+
+ else if ( (hoState_ == HAND_ST_ANCH_RCV_H3_REQ_ACK) || (hoState_ == HAND_ST_ANCH_SND_H3_REQ) )
+ {
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = vcInMsg->msgData.abortHandback.cause;
+ sendVcMsgH3(MODULE_CC, MODULE_CC);
+
+ retEvent = CC_RELEASE_GP_H3;
+ } else
+ {
+ retEvent = JCC_NULL_EVENT;
+ }
+
+ DBG_LEAVE();
+ return(retEvent);
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleTrgToAnchHbFail(void)
+{
+ JCCEvent_t retEvent = JCC_NULL_EVENT;
+
+ DBG_FUNC("CCTargetHandoverExtHo::handleTrgToAnchHbFail", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgToAnchHbFail): [<==GP-B HANDOVER FAILURE](callId=%d,hoState=%d)\n}\n",
+ callIndex, hoState_);
+
+ //Cancel T202 or T204
+ parent->sessionTimer->cancelTimer();
+ A_Handover_Failure_t *pFailure = (A_Handover_Failure_t*) &aifMsg.handoverFailure;
+
+ switch (hoState_)
+ {
+ case HAND_ST_ANCH_RCV_H3_REQ_ACK:
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_ANCH_H3_RTP_HANDLE_NULL;
+ sendVcMsgH3(MODULE_CC, MODULE_CC);
+
+ retEvent = CC_RELEASE_GP_H3;
+
+ break;
+
+ case HAND_ST_ANCH_RCV_HB_REQ_ACK:
+ //Zero out message description
+ memset((char*) &aifMsg,0,sizeof(T_AIF_MSG));
+
+ //Mandatory IEs
+ pFailure->msgType = A_HANDOVER_FAILURE_TYPE;
+ pFailure->cause.ie_present = true;
+ pFailure->cause.elementIdentifier = 0x04;
+ pFailure->cause.length = 1;
+ pFailure->cause.length = (unsigned char) vcInMsg->msgData.abortHandback.cause;
+
+ //No optional IEs furnished now
+
+ //Encode A-HANDOVER-FAILURE msg
+ A_Result_t result; A_INTERFACE_MSG_STRUCT_t aifData;
+ memset( (char*) &aifData, 0, sizeof(A_INTERFACE_MSG_STRUCT_t) );
+ if ( A_RESULT_SUCCESS != (result=
+ AIF_Encode(&aifMsg, (T_AIF_MessageUnit*)&aifData) ) )
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgToAnchHbFail): A-HANDOVER-FAILURE encoding error(%d)(hoAgId=%d,callIndex=%d,hoState=%d)\n}\n",
+ result,hoAgId_,callIndex,hoState_);
+
+ retEvent = CC_RELEASE_EH_HB;
+ }
+
+ //Send up bss APDU to PLMN (anchor part)
+ NonStdRasMessagePostHandoverMobEvent_t bssApdu;
+
+ bssApdu.header.origSubId = callIndex;
+ bssApdu.header.destSubId = hoAgId_;
+
+ bssApdu.LAYER3PDU.LAYER3DATA[0] = 0x00; //BSSMAP
+ bssApdu.LAYER3PDU.LAYER3DATA[1] = (unsigned char) aifData.msglength;
+ memcpy((char*)&bssApdu.LAYER3PDU.LAYER3DATA[2],(char*)aifData.A_INTERFACE_DATA,
+ aifData.msglength);
+ bssApdu.LAYER3PDU.msglength = (unsigned short) (2 + aifData.msglength);
+
+ if (!VBLinkPostHandoverMobEvent(&bssApdu))
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::handleTrgToAnchHbFail): VBLinkPostHandoverMobEvent() failed (hoAgId=%d,callIndex=%d,hoState=%d)\n}\n",
+ hoAgId_,callIndex,hoState_);
+ DBG_HEXDUMP((unsigned char*) &bssApdu, bssApdu.LAYER3PDU.msglength+2);
+
+ DBG_ERROR("}\n");
+
+ retEvent = CC_RELEASE_EH_HB;
+ }
+
+ DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etgt::handleTrgToAnchHbFail): [==>HOA A-HANDOVER-FAILURE] (callId=%d,entryId=%d,hoState=%d)\n",
+ callIndex,parent->entryId,hoState_);
+ DBG_HEXDUMP((unsigned char*) &bssApdu, bssApdu.LAYER3PDU.msglength+2);
+ DBG_CALL_TRACE(hoAgId_, "}\n");
+
+ retEvent = CC_RELEASE_EH_HB;
+
+ break;
+
+ default:
+ DBG_ERROR("{\nMNETeiERROR)(etrg::handleTrgToAnchHbFail):CC Error Inproper hoState(%d)(hoAgId=%d,callId=%d)\n}\n",
+ hoState_,hoAgId_,callIndex);
+ break;
+ }
+
+ DBG_LEAVE();
+ return (retEvent);
+
+}
+
+int
+CCTargetHandoverExtHo::ccReleaseCall(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::ccReleaseCall", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::ccReleaseCall): CC External Handover (CC_RELEASE_CALL event=%d)(hoAgId=%d,callId=%d,hoState=%d)\n}\n",
+ hoEndCause_,hoAgId_,callIndex,hoState_);
+
+ //Cancel whatever timer in case
+ parent->sessionTimer->cancelTimer();
+
+ //Send END_HANDOVER to HOA
+ NonStdRasMessageEndHandover_t endHandover;
+ endHandover.header.origSubId = callIndex;
+ endHandover.header.destSubId = hoAgId_;
+ endHandover.reason = hoEndCause_;
+
+ if (!VBLinkEndHandover(&endHandover))
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::smHandleEvent): VBLinkEndHandover API failed(hoAgId=%d,callId=%d,hoState=%d,cause=%d)\n}\n",
+ hoAgId_,callIndex,hoState_,hoEndCause_);
+ } else
+ {
+ DBG_TRACE("{\nMNETeiTRACE(etrg::smHandleEvent): [==>HOA END_HANDOVER cause=%d)](hoAgId=%d,callId=%d,hoState=%d)\n}\n",
+ hoEndCause_, hoAgId_, callIndex, hoState_);
+ }
+
+ //Send RELEASE_HOA to HOA
+ //NonStdRasMessageReleaseHOA_t relHoa;
+ //relHoa.header.origSubId = callIndex;
+ //relHoa.header.destSubId = hoAgId_;
+
+ //if (!VBLinkReleaseHOA(&relHoa))
+ //{
+ // DBG_ERROR("{\nMNETeiERROR(etrg::smHandleEvent): VBLinkReleaseHOA API failed\n}\n");
+ //} else
+ //{
+ // DBG_TRACE("{\nMNETeiTRACE(etrg::smHandleEvent): [==>HOA RELEASE_HANDOVER_AGENT (hoAgId=%d,callId=%d,entryId=%d)\n}\n",
+ // hoAgId_, callIndex, parent->entryId);
+ //}
+
+ hoAgId_ = -1;
+
+ DBG_LEAVE();
+ return(CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING);
+}
+
+
+int
+CCTargetHandoverExtHo::ccReleaseOwn(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::ccReleaseOwn", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::ccReleaseCall): CC External Handover (CC_RELEASE_OWN)(hoAgId=%d,callId=%d,hoState=%d)\n}\n",
+ hoAgId_,callIndex, hoState_);
+
+ //Cancel whatever timer in case
+ parent->sessionTimer->cancelTimer();
+
+ hoAgId_ = -1;
+
+ DBG_LEAVE();
+ return(CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING);
+}
+
+void
+CCTargetHandoverExtHo::ccReleaseGpHo(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::ccReleaseGpHo", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::ccReleaseGpHo): CC External Handover (CC_RELEASE_GP_HO)(hoAgId=%d,callId=%d,hoState=%d)\n}\n",
+ hoAgId_,callIndex,hoState_);
+
+ //Cancel whatever timer in case
+ parent->sessionTimer->cancelTimer();
+
+ if (hoRtpSession_ != NULL)
+ {
+ // break connection
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = hoRtpSession_;
+
+ if ((csuResult = csu_OrigTermBreakAll(&rtpSourcePort)) != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::ccReleaseGpHo) CC CSU OrigTerm Break All Error(%d) (hoAgId=%d,callId=%d,hoRtpSession=%x)\n",
+ csuResult,hoAgId_,callIndex, (int)hoRtpSession_);
+
+ //Skip this error but may report via OAM if it cares.
+ }
+
+ ReleaseHandoverRtpChannel(hoRtpSession_);
+
+ hoRtpSession_ = NULL;
+ }
+
+ msMsgsQueued_ = false;
+ rrMsgsQueued_ = false;
+ hoSimplexConnected_ = false;
+ hoSrcLinkLost_ = false; //ext-HO FFS ???
+ hoVcCallIndex_ = CC_MAX_CC_CALLS_DEF_VAL;
+ hoVcIpAddress_ = 0;
+ otherHoIncomingRtpPort_ = 0;
+ memset(&hoGlobalCellId_, 0, sizeof(GlobalCellId_t));
+
+ hoState_ = HAND_ST_TRG_HO_COMPLT;
+
+ DBG_LEAVE();
+ return; //(CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+void
+CCTargetHandoverExtHo::ccReleaseGpH3(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::ccReleaseGpH3", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::ccReleaseGpH3): CC External Handover (CC_RELEASE_GP_H3)(hoAgId=%d,callId=%d,hoState=%d)\n}\n",
+ hoAgId_,callIndex, hoState_);
+
+ //Cancel whatever timer in case
+ parent->sessionTimer->cancelTimer();
+
+ if (h3RtpSession_ != NULL)
+ {
+ // break connection
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = h3RtpSession_;
+
+ if ((csuResult = csu_OrigTermBreakAll(&rtpSourcePort)) != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::ccReleaseGpH3) CC CSU OrigTerm Break All Error(%d) (hoAgId=%d,callId=%d,hoRtpSession=%x)\n",
+ csuResult,hoAgId_,callIndex, (int)h3RtpSession_);
+
+ //Skip this error but may report via OAM if it cares.
+ }
+
+ ReleaseHandoverRtpChannel(h3RtpSession_);
+
+ h3RtpSession_ = NULL;
+ }
+
+ msMsgsQueued_ = false;
+ rrMsgsQueued_ = false;
+
+ h3SimplexConnected_ = false;
+ h3VcCallIndex_ = CC_MAX_CC_CALLS_DEF_VAL;
+ h3VcIpAddress_ = 0;
+ otherH3IncomingRtpPort_ = 0;
+ h3SrcLinkLost_ = false; //ext-HO FFS ???
+ memset(&h3GlobalCellId_, 0, sizeof(GlobalCellId_t));
+
+ hoState_ = HAND_ST_ANCH_HO_COMPLT;
+
+ DBG_LEAVE();
+ return; //(CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+void
+CCTargetHandoverExtHo::ccReleaseGpHb(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::ccReleaseGpHb", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::ccReleaseGpHb): CC External Handover (CC_RELEASE_GP_HB)(hoAgId=%d,callId=%d,hoState=%d)\n}\n",
+ hoAgId_,callIndex, hoState_);
+
+ //Cancel whatever timer in case
+ parent->sessionTimer->cancelTimer();
+
+ if (parent->entryId != (T_CNI_IRT_ID) JCC_UNDEFINED)
+ {
+ //Break the connections with the RF Port
+ T_CSU_PORT_ID rfSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rfSourcePort.portType = CSU_GSM_PORT;
+ rfSourcePort.portId.gsmHandler = parent->entryId;
+
+ if ((csuResult = csu_OrigTermBreakAll(&rfSourcePort)) != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_ERROR("CSU Error : Disconn. Failure, (Result = %d) for (entryId = %d)\n",
+ csuResult, parent->entryId);
+
+ // Can only generate OA&M log.
+ }
+
+ IntraL3Msg_t mmOutMsg;
+
+ // Send internal MM msg for release
+ sendMM(INTRA_L3_MM_REL_REQ, INTRA_L3_NULL_MSG, parent->entryId, &mmOutMsg);
+ parent->resetIrt();
+ parent->entryId = (T_CNI_IRT_ID) JCC_UNDEFINED;
+ parent->oid = CNI_LAPDM_NULL_OID;
+ }
+
+
+ hoSimplexConnected_ = false;
+ hoState_ = HAND_ST_ANCH_HO_COMPLT;
+
+ DBG_LEAVE();
+ return; //(CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+void
+CCTargetHandoverExtHo::ccReleaseEhHb(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::ccReleaseEhHb", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::ccReleaseGpHb): CC External Handover (CC_RELEASE_EH_HB)(hoAgId=%d,callId=%d,hoState=%d)\n}\n",
+ hoAgId_,callIndex, hoState_);
+
+ //Cancel whatever timer in case
+ parent->sessionTimer->cancelTimer();
+
+
+ hoState_ = HAND_ST_TRG_HO_COMPLT;
+
+ DBG_LEAVE();
+ return; //(CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+void
+CCTargetHandoverExtHo::ccReleaseGpEhHb(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::ccReleaseGpEhHb", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::ccReleaseGpEhHb): CC External Handover (CC_RELEASE_GP_EH_HB)(hoAgId=%d,callId=%d,hoState=%d)\n}\n",
+ hoAgId_,callIndex, hoState_);
+
+ //Cancel whatever timer in case
+ parent->sessionTimer->cancelTimer();
+
+ hoState_ = HAND_ST_ANCH_HO_COMPLT;
+
+ DBG_LEAVE();
+ return; //(CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+int
+CCTargetHandoverExtHo::handleVcCcMsg(InterVcMsg_t *vcCcInMsg)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleVcCcMsg", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ CCHandover::handleVcCcMsg(vcCcInMsg);
+
+ DBG_LEAVE();
+ return(smHandleEvent());
+}
+
+void
+CCTargetHandoverExtHo::initData()
+{
+ DBG_FUNC("CCTargetHandoverExtHo::initData", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ //Cancel whatever timer in case
+ //parent->sessionTimer->cancelTimer();
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_REMOTE_END_HANDOVER;
+
+ switch (hoState_)
+ {
+ case HAND_ST_ANCH_SND_H3_REQ: case HAND_ST_ANCH_RCV_H3_REQ_ACK:
+ sendVcMsgH3(MODULE_CC, MODULE_CC);
+ case HAND_ST_ANCH_SND_HO_REQ: case HAND_ST_ANCH_RCV_HO_REQ_ACK:
+ case HAND_ST_ANCH_HO_COMPLT : case HAND_ST_ANCH_SND_HB_REQ :
+ case HAND_ST_ANCH_RCV_HB_REQ_ACK: case HAND_ST_ANCH_RCV_HB_REQ :
+ case HAND_ST_ANCH_SND_HB_REQ_ACK: case HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ:
+ sendVcMsg(MODULE_CC, MODULE_CC);
+ break;
+
+ default:
+ break;
+ }
+
+ if (hoRtpSession_ != NULL)
+ {
+ // break connection
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = hoRtpSession_;
+
+ if ((csuResult = csu_OrigTermBreakAll(&rtpSourcePort)) != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::initData) CC CSU OrigTerm Break All Error(%d) (hoAgId=%d,callId=%d,hoRtpSession=%x)\n",
+ csuResult,hoAgId_,callIndex, (int)hoRtpSession_);
+
+ //Skip this error but may report via OAM if it cares.
+ }
+
+ ReleaseHandoverRtpChannel(hoRtpSession_);
+ }
+
+ if (h3RtpSession_ != NULL)
+ {
+ // break connection
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = h3RtpSession_;
+
+ if ((csuResult = csu_OrigTermBreakAll(&rtpSourcePort)) != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::initData) CC CSU OrigTerm Break All Error(%d) (hoAgId=%d,callId=%d,hoRtpSession=%x)\n",
+ csuResult,hoAgId_,callIndex, (int)h3RtpSession_);
+
+ //Skip this error but may report via OAM if it cares.
+ }
+
+ ReleaseHandoverRtpChannel(h3RtpSession_);
+ }
+
+
+ if (parent->entryId != (T_CNI_IRT_ID) JCC_UNDEFINED)
+ {
+ //Break the connections with the RF Port
+ T_CSU_PORT_ID rfSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rfSourcePort.portType = CSU_GSM_PORT;
+ rfSourcePort.portId.gsmHandler = parent->entryId;
+
+ if ((csuResult = csu_OrigTermBreakAll(&rfSourcePort)) != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_ERROR("{\nMNETeiERROR(etrg::initData) CC CSU OrigTerm Break All Error(%d) (hoAgId=%d,callId=%d,entryId=%d)\n",
+ csuResult, hoAgId_,callIndex, parent->entryId);
+
+ // Can only generate OA&M log.
+ }
+
+ // Send internal MM msg for release
+ IntraL3Msg_t mmOutMsg;
+
+ sendMM(INTRA_L3_MM_REL_REQ, INTRA_L3_NULL_MSG, parent->entryId, &mmOutMsg);
+ parent->resetIrt();
+ parent->entryId = (T_CNI_IRT_ID) JCC_UNDEFINED;
+ parent->oid = CNI_LAPDM_NULL_OID;
+ }
+
+ msMsgsQueued_ = false;
+ rrMsgsQueued_ = false;
+
+ hoSimplexConnected_ = false;
+ hoSrcLinkLost_ = false; //ext-HO FFS ???
+ hoVcCallIndex_ = CC_MAX_CC_CALLS_DEF_VAL;
+ hoVcIpAddress_ = 0;
+ otherHoIncomingRtpPort_ = 0;
+ memset(&hoGlobalCellId_, 0, sizeof(GlobalCellId_t));
+
+ h3SimplexConnected_ = false;
+ h3VcCallIndex_ = CC_MAX_CC_CALLS_DEF_VAL;
+ h3VcIpAddress_ = 0;
+ otherH3IncomingRtpPort_ = 0;
+ h3SrcLinkLost_ = false; //ext-HO FFS ???
+ memset(&h3GlobalCellId_, 0, sizeof(GlobalCellId_t));
+
+ currSpeechCh_.version = CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1;
+ currChannel_.bearerType = BEARER_SPEECH;
+ currChannel_.speechChann.version= CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1;
+ hoEndCause_ = MC_HO_SUCCESS;
+ memset(&currEncrypt_, 0, sizeof(IntraL3CipherModeCommand_t));
+
+ parent->handoverSession = NULL;
+
+ hoState_ = HAND_ST_IDLE;
+
+ DBG_LEAVE();
+ return; //(CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+int
+CCTargetHandoverExtHo::handleMMMsg(IntraL3Msg_t *mmMsg,
+ JCCEvent_t hoEvent)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleMMMsg", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ CCHandover::handleMMMsg(mmMsg, hoEvent);
+
+ DBG_LEAVE();
+ return(smHandleEvent());
+}
+
+void
+CCTargetHandoverExtHo::emptyDownlinkQueue (void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::emptyDownlinkQueue", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ short index;
+
+ // Empty second level PDU Queue first
+ // Messages will be send to the target Vipercell
+ parent->flashSapi3Queue();
+
+ if (msMsgsQueued_ > 0)
+ {
+ for(index=0; index< msMsgsQueued_; index++)
+ {
+ parent->sendL2Msg(&downlinkQueue_[index]);
+ }
+
+ msMsgsQueued_ = 0;
+ }
+
+ DBG_LEAVE();
+}
+
+
+void
+CCTargetHandoverExtHo::addToRRQueue (IntraL3Msg_t *rrMsg)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::addToRRQueue", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ if (rrMsgsQueued_)
+ {
+ // Queue is full. Do Nothing.
+ }
+ else
+ {
+ savedRRMsg_ = *rrMsg;
+ rrMsgsQueued_ = true;
+ }
+
+ DBG_LEAVE();
+}
+
+void
+CCTargetHandoverExtHo::emptyRRQueue (void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::emptyRRQueue", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ if (!rrMsgsQueued_)
+ {
+ // Queue is empty. Do Nothing.
+ }
+ else
+ {
+ parent->sendRRMsg(savedRRMsg_.primitive_type,
+ savedRRMsg_.message_type,
+ &savedRRMsg_);
+
+ rrMsgsQueued_ = false;
+ }
+
+ DBG_LEAVE();
+}
+
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleNullEvent(void)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::handleNullEvent",CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ if (vcInMsg->msgType==INTER_VC_CC_POST_HANDOVER_MOB_EVENT)
+ {
+ DBG_CALL_TRACE(hoAgId_,"{\nMNETeiTRACE(etrg::handleNullEvent):[<==GP(%x:%x) MS MESSAGE](callId=%d,hoState=%d)\n}\n",
+ vcInMsg->origVcAddress,vcInMsg->origSubId,callIndex,hoState_);
+ } else
+ {
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleNullEvent): CC Ignored Event(%d) (hoAgId=%d,callIndex=%d,hoState=%d)\n}\n",
+ currEvent,hoAgId_,callIndex,hoState_);
+ }
+ DBG_LEAVE();
+ return (JCC_NULL_EVENT);
+}
+
+void
+CCTargetHandoverExtHo::sendL2MsgToGpBCc(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ DBG_FUNC("CCAnchorHandover::sendL2MsgToGpBCc", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ vcOutMsg.msgType = INTER_VC_CC_POST_HANDOVER_DATA_EVENT;
+ vcOutMsg.msgData.postHoMobEventData.msEncodedMsg = *msEncodedMsg;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+ DBG_LEAVE();
+}
+
+JCCEvent_t
+CCTargetHandoverExtHo::handleAnchToTrgPostHoHoaEvent(void)
+{
+ DBG_FUNC ("CCTargetHandoverExtHo::handleAnchToTrgPostHoHoaEvent", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ T_CNI_LAPDM_L3MessageUnit msMsg;
+
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleAnchToTrgPostHoHoaEvent) Received POST HOA EVENT DUMP (length=%d): \n",
+ hoaInMsg->msgData.postExtHoMobEventData.LAYER3PDU.msglength);
+
+ DBG_HEXDUMP(
+ (unsigned char*)&(hoaInMsg->msgData.postExtHoMobEventData.LAYER3PDU.LAYER3DATA),
+ (int)hoaInMsg->msgData.postExtHoMobEventData.LAYER3PDU.msglength
+ );
+ DBG_TRACE("\n END-OF-DUMP\n}\n");
+
+ msMsg.msgLength = hoaInMsg->msgData.postExtHoMobEventData.LAYER3PDU.LAYER3DATA[2];
+ memcpy( (char*)msMsg.buffer,
+ (char*)&(hoaInMsg->msgData.postExtHoMobEventData.LAYER3PDU.LAYER3DATA[3]),
+ (int) msMsg.msgLength);
+
+
+ //If handing around within MNET in progress. Relay the message properly
+ switch (hoState_)
+ {
+ case HAND_ST_TRG_HO_COMPLT: case HAND_ST_TRG_SND_HB_REQ:
+ case HAND_ST_ANCH_VC_IP_ADDRESS_REQ: case HAND_ST_ANCH_SND_HO_REQ:
+ //Send MS message to GP-A
+ sendL2MsgToGpACc(&msMsg);
+ break;
+
+ case HAND_ST_ANCH_HO_COMPLT: case HAND_ST_ANCH_SND_HB_REQ:
+ case HAND_ST_ANCH_RCV_HB_REQ: case HAND_ST_ANCH_SND_H3_REQ:
+ case HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ:
+ //Send MS message to GP-B
+ sendL2MsgToGpBCc(&msMsg);
+ break;
+
+ case HAND_ST_ANCH_RCV_HO_REQ_ACK: case HAND_ST_ANCH_SND_HB_REQ_ACK:
+ case HAND_ST_ANCH_RCV_H3_REQ_ACK:
+ //Queue up MS messages since MNET handover is in progress
+ addToDownlinkQueue(&msMsg);
+ break;
+
+ case HAND_ST_TRG_RCV_HB_REQ_ACK: case HAND_ST_ANCH_RCV_HB_REQ_ACK:
+ default:
+ DBG_WARNING("{\nMNETeiTRACE(etrg::handleAnchToTrgPostHoHoaEvent): Ignore this MS message from HOA (hoAgId=%d,callId=%d,hoState=%d)\n}\n",
+ hoAgId_,callIndex,hoState_);
+ break;
+ }
+
+ DBG_LEAVE();
+ return(CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+bool
+CCTargetHandoverExtHo::sendL2MsgToGpACc (T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ DBG_FUNC ("CCTargetHandoverExtHo::sendL2MsgToGpACc", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ bool retVal = true;
+
+ //T_CNI_RIL3_PROTOCOL_DISCRIMINATOR msgPd = extractPd (msEncodedMsg);
+ //T_CNI_LAPDM_SAPI sapi = (msgPd == CNI_RIL3_PD_SMS) ? SAPI_SMS : SAPI_MAIN;
+ T_CNI_LAPDM_SAPI sapi = SAPI_MAIN;
+ // Retrieve oid for the channel according to SAPI from RR
+ T_CNI_LAPDM_OID msgOid;
+
+ //if (sapi == SAPI_MAIN || getSapi3Status())
+ {
+ // SAPI=0 message or SAPI=3 connection is already established
+ if ((msgOid = rm_GetOid (parent->entryId, sapi)) == CNI_LAPDM_NULL_OID)
+ {
+ DBG_ERROR ("{\nMNETeiTRACE(etrg::sendL2MsgToGpACc) Invalid OID received from RM (hoAgId=%d,callId=%d, hoState=%d entryId=%d sapi=%d)\n",
+ hoAgId_,callIndex, hoState_, parent->entryId, sapi);
+ retVal = false;
+ }
+
+ CNI_LAPDM_Dl_Data_Request (msgOid, sapi, msEncodedMsg);
+ PostL3SendMsLog (msgOid, sapi, msEncodedMsg);
+
+ }
+ //else
+ {
+ // Establish SAPI=3 before sending SMS messages to LAPDm
+ // sendDLMsg (L3L2_DL_EST_REQ, SAPI_SMS);
+ // Queue message till connection is established
+ //sapi3Queue_.add (msEncodedMsg );
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+void
+CCTargetHandoverExtHo::addToDownlinkQueue (T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ DBG_FUNC("CCTargetHandoverExtHo::addToDownlinkQueue", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ if (msMsgsQueued_ < MAX_HO_SRC_DOWNLINK_QUEUE_LENGTH)
+ {
+ downlinkQueue_[msMsgsQueued_] = *msEncodedMsg;
+ msMsgsQueued_++;
+ }
+
+ DBG_LEAVE();
+}
+
+
+int
+CCTargetHandoverExtHo::handleVbCcMsg (IntraL3Msg_t *vbCcInMsg)
+{
+
+ JCCEvent_t retEvent;
+
+ DBG_FUNC("CCTargetHandoverExtHo::handleVbCcMsg", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ // Copy the ip address from the message
+ UINT32 reVcIpAddress;
+ reVcIpAddress = inet_addr(&(vbCcInMsg->l3_data.ipAddressResponse.ViperCellIpAddress[0]) );
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleVbCcMsg): Received IP Addr Rsp Msg (hoAgId=%d,callId=%d,hoState=%d,ipAddr=%x,hoCell=%d:%d,h3CellId=%d:%d)\n}\n",
+ hoAgId_, callIndex,hoState_, reVcIpAddress,hoGlobalCellId_.lac,hoGlobalCellId_.ci,h3GlobalCellId_.lac,h3GlobalCellId_.ci);
+
+ if ((hoState_ != HAND_ST_ANCH_VC_IP_ADDRESS_REQ) && (hoState_ != HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ ))
+ {
+ // Do Nothing, late message
+
+ DBG_TRACE("{\nMNETeiTRACE(etrg::handleVbCcMsg): Late IP Address Response ignored (callId=%d,hoState=%d,ipAddr=%x)\n}\n",
+ hoAgId_,callIndex, hoState_,reVcIpAddress);
+
+ retEvent = ( (hoState_==HAND_ST_ANCH_VC_IP_ADDRESS_REQ) ? CC_RELEASE_GP_HO:CC_RELEASE_GP_H3);
+ }
+
+ if (reVcIpAddress == 0)
+ {
+ DBG_ERROR ("{\nMNETeiERROR(etrg::handleVbCcMsg): IP Address Failed (hoAgId=%d,callId=%d,hoState=%d)\n",
+ hoAgId_,callIndex,hoState_);
+ DBG_ERROR("\n Check if an adjacent vipercell is still up running properly\n}\n");
+
+ retEvent = ( (hoState_==HAND_ST_ANCH_VC_IP_ADDRESS_REQ) ? CC_RELEASE_GP_HO:CC_RELEASE_GP_H3);
+ } else
+ {
+ //Proceed to do handover or hand 3rd
+
+ currEvent = HC_VB_GET_VC_ADDRESS_RSP;
+ if (hoState_==HAND_ST_ANCH_VC_IP_ADDRESS_REQ) hoVcIpAddress_ = reVcIpAddress;
+ else h3VcIpAddress_ = reVcIpAddress;
+
+ DBG_LEAVE();
+ return (smHandleEvent());
+ }
+
+ DBG_LEAVE();
+ return (retEvent);
+
+}
+
diff --git a/data/mnet/GP10/Host/cc/src/CCH323Util.cpp b/data/mnet/GP10/Host/cc/src/CCH323Util.cpp
new file mode 100644
index 0000000..c2e1baa
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CCH323Util.cpp
@@ -0,0 +1,413 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCH23Util.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 02-01-98
+// Description : CC (VOIP)H323 side utilities
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "CC/CCH323Util.h"
+
+#include "logging/VCLOGGING.h"
+
+#include "JCC/JCCLog.h"
+
+#include "taskLib.h"
+
+#include "CC/CallLeg.h"
+
+//ext-HO <chenj:06-06-11>
+#include "CC/HOCallLeg.h"
+
+//CDR <xxu:08-21-00> BEGIN
+#include "JCC/LUDBapi.h"
+#include "CDR/CdrVoiceCall.h"
+#include "CDR/CdrSSA.h"
+extern BtsBasicPackage ccBtsBasicPackage;
+
+void gCaptureSetupCdr( IntraL3Msg_t *h323InMsg,
+ CdrRecCauseTerm_t cdrCause,
+ T_CNI_RIL3_CAUSE_VALUE ccCause );
+
+bool
+ sendH323DisconnectMsg(
+ IntraL3Msg_t *h323InMsg,
+ CdrRecCauseTerm_t cdrCause,
+ T_CNI_RIL3_CAUSE_VALUE ccCause )
+ {
+ DBG_FUNC("sendH323DisconnectMsg", CC_LAYER);
+ DBG_ENTER();
+
+ VOIP_API_MESSAGE voipOutMsg;
+
+ bool retValue;
+
+ voipOutMsg.Magic = VOIP_API_MAGIC_VALUE;
+
+ voipOutMsg.MessageType = VOIP_API_CALL_RELEASE;
+
+ voipOutMsg.CallRelease.cause = ccCause;
+
+ DBG_TRACE("CC->H323 LOG: Sending Disconnect Msg reason(%d) h323CallHandle(%d) ludbId(%d)\n",
+ ccCause,h323InMsg->call_handle,
+ h323InMsg->entry_id);
+
+ voipOutMsg.VoipCallHandle = h323InMsg->call_handle;
+
+ voipOutMsg.LudbId = h323InMsg->entry_id;
+
+ // Eventhough the Transaction Id is not used in this case, fill in this
+ // parameter with the NULL value to make it valid.
+ voipOutMsg.TxnId = VOIP_NULL_CALL_HANDLE;
+
+ retValue = VoipApiMessageHandler(&voipOutMsg);
+
+ // Capture CDR data for all MTC landed in GP
+ gCaptureSetupCdr(h323InMsg, cdrCause, ccCause);
+
+ DBG_LEAVE();
+ return (retValue);
+ }
+ //CDR <xxu:08-21-00> END
+
+ bool
+ sendH323Msg(TwoPartyCallLeg *parent,
+ JCCEvent_t remoteEvent,
+ CCRemMsgData_t remMsgData)
+ {
+ DBG_FUNC("sendH323Msg", CC_LAYER);
+ DBG_ENTER();
+
+ VOIP_API_MESSAGE voipOutMsg;
+
+ bool retValue;
+
+ voipOutMsg.Magic = VOIP_API_MAGIC_VALUE;
+
+ voipOutMsg.TxnId = parent->callIndex;
+
+ voipOutMsg.LudbId = parent->ludbIndex();
+
+ voipOutMsg.VoipCallHandle = parent->h323CallHandle;
+
+ switch (remoteEvent)
+ {
+ case HC_REMOTE_DTMF_REQ:
+ voipOutMsg.MessageType = VOIP_API_CALL_DTMF;
+ voipOutMsg.CallDtmf.Digit = (VOIP_DTMF_DIGIT) (DTMF_DIGIT_0 + remMsgData.dtmfDigit);
+ voipOutMsg.CallDtmf.Duration = 15;
+ break;
+
+ case THC_REMOTE_TERM_ADDRESS:
+
+ voipOutMsg.MessageType = VOIP_API_CALL_SETUP;
+ voipOutMsg.CallSetup = remMsgData.setup;
+
+ // DBG_TRACE("Call Log: called party number sent to Voip:\n");
+ // DBG_TRACE("(numDigits=%d), (%d), (%d), (%d), (%d), (%d)\n",
+ // voipOutMsg.CallSetup.CalledPartyNumber.numDigits,
+ // voipOutMsg.CallSetup.CalledPartyNumber.digits[0],
+ // voipOutMsg.CallSetup.CalledPartyNumber.digits[1],
+ // voipOutMsg.CallSetup.CalledPartyNumber.digits[2],
+ // voipOutMsg.CallSetup.CalledPartyNumber.digits[3],
+ // voipOutMsg.CallSetup.CalledPartyNumber.digits[4]
+ // );
+
+ break;
+
+ case HC_REMOTE_CALL_PROGRESS:
+ voipOutMsg.MessageType = VOIP_API_CALL_PROCEEDING;
+ voipOutMsg.CallProceeding = remMsgData.callProceeding;
+ break;
+
+ case OHC_REMOTE_ALERTING:
+ voipOutMsg.MessageType = VOIP_API_CALL_ALERTING;
+ break;
+
+ case OHC_REMOTE_ANSWER:
+ voipOutMsg.MessageType = VOIP_API_CALL_ANSWER;
+ break;
+
+ case HC_REMOTE_DISCONNECT_REQ:
+ case HC_REMOTE_RELEASE_COMPLETE:
+ // To avoid sending the release a second time to H323
+
+ if (! (parent->disconnectSentToVoip))
+ {
+ parent->disconnectSentToVoip = true;
+ voipOutMsg.MessageType = VOIP_API_CALL_RELEASE;
+ voipOutMsg.CallRelease = remMsgData.callRelease;
+ JCCLog1("CC->Voip: Disconnect (reason = %d)\n",
+ voipOutMsg.CallRelease.cause);
+ DBG_TRACE("CC->Voip: Disconnect (reason = %d)\n",
+ voipOutMsg.CallRelease.cause);
+
+ // The following is needed when the Voip side starts handling
+ // Disconnect right after a setup!!
+ }
+ else
+ {
+ // Do Nothing
+ DBG_LEAVE();
+ return (true);
+ }
+ break;
+
+ //BCT <xxu:07-11-00> BEGIN
+ case OHC_REMOTE_BCT_INVOKE:
+ voipOutMsg.MessageType = VOIP_API_CALL_TRANSFER;
+ voipOutMsg.CallTransfer = remMsgData.callTransfer;
+ break;
+ //BCT <xxu:07-11-00> END
+
+ default:
+ DBG_ERROR("CC->H323 ERROR: Unexpected (Remote Event = %d) from GSM CC.\n",
+ remoteEvent);
+ DBG_LEAVE();
+ return (false);
+
+ }
+
+ DBG_TRACE("CC->H323 LOG: Sending Msg(%d) TxnId(%d) h323CallHandle(%d) ludbId(%d) reEv(%d) callLeg(%d) entryId(%d)\n",
+ voipOutMsg.MessageType,
+ voipOutMsg.TxnId,
+ voipOutMsg.VoipCallHandle,
+ voipOutMsg.LudbId,
+ remoteEvent,
+ parent->callLegNum,
+ parent->entryId() );
+
+ retValue = VoipApiMessageHandler(&voipOutMsg);
+
+ DBG_LEAVE();
+ return (retValue);
+ }
+
+ // <ext-HO <chenj:06-11-01>
+ bool
+ sendH323MsgExtHo(HOCallLeg *parent,
+ JCCEvent_t remoteEvent,
+ CCRemMsgData_t remMsgData,
+ unsigned short callLegId)
+ {
+ DBG_FUNC("sendH323Msg", CC_LAYER);
+ DBG_ENTER();
+
+ VOIP_API_MESSAGE voipOutMsg;
+
+ bool retValue;
+
+ voipOutMsg.Magic = VOIP_API_MAGIC_VALUE;
+
+ voipOutMsg.TxnId = ( (callLegId << 8) |
+ (parent->callIndex & 0xFF) );
+
+ voipOutMsg.LudbId = parent->ludbIndex();
+
+ voipOutMsg.VoipCallHandle = parent->h323CallHandle;
+
+ switch (remoteEvent)
+ {
+ case HC_REMOTE_DTMF_REQ:
+ voipOutMsg.MessageType = VOIP_API_CALL_DTMF;
+ voipOutMsg.CallDtmf.Digit = (VOIP_DTMF_DIGIT) (DTMF_DIGIT_0 + remMsgData.dtmfDigit);
+ voipOutMsg.CallDtmf.Duration = 15;
+ break;
+
+ case THC_REMOTE_TERM_ADDRESS:
+
+ voipOutMsg.MessageType = VOIP_API_CALL_SETUP;
+ voipOutMsg.CallSetup = remMsgData.setup;
+
+ break;
+
+ case HC_REMOTE_CALL_PROGRESS:
+ voipOutMsg.MessageType = VOIP_API_CALL_PROCEEDING;
+ voipOutMsg.CallProceeding = remMsgData.callProceeding;
+ break;
+
+ case OHC_REMOTE_ALERTING:
+ voipOutMsg.MessageType = VOIP_API_CALL_ALERTING;
+ break;
+
+ case OHC_REMOTE_ANSWER:
+ voipOutMsg.MessageType = VOIP_API_CALL_ANSWER;
+ break;
+
+ case HC_REMOTE_DISCONNECT_REQ:
+ case HC_REMOTE_RELEASE_COMPLETE:
+ // To avoid sending the release a second time to H323
+
+ if (! (parent->disconnectSentToVoip))
+ {
+ parent->disconnectSentToVoip = true;
+ voipOutMsg.MessageType = VOIP_API_CALL_RELEASE;
+ voipOutMsg.CallRelease = remMsgData.callRelease;
+ JCCLog1("CC->Voip: Disconnect (reason = %d)\n",
+ voipOutMsg.CallRelease.cause);
+ DBG_TRACE("CC->Voip: Disconnect (reason = %d)\n",
+ voipOutMsg.CallRelease.cause);
+
+ // The following is needed when the Voip side starts handling
+ // Disconnect right after a setup!!
+ }
+ else
+ {
+ // Do Nothing
+ DBG_LEAVE();
+ return (true);
+ }
+ break;
+
+ //BCT <xxu:07-11-00> BEGIN
+ case OHC_REMOTE_BCT_INVOKE:
+ voipOutMsg.MessageType = VOIP_API_CALL_TRANSFER;
+ voipOutMsg.CallTransfer = remMsgData.callTransfer;
+ break;
+ //BCT <xxu:07-11-00> END
+
+ default:
+ DBG_ERROR("CC->H323 ERROR: Unexpected (Remote Event = %d) from GSM CC.\n",
+ remoteEvent);
+ DBG_LEAVE();
+ return (false);
+
+ }
+
+ DBG_TRACE("CC->H323 LOG: Sending Msg(%d) TxnId(%d) h323CallHandle(%d) ludbId(%d) reEv(%d) callLeg(%d) entryId(%d)\n",
+ voipOutMsg.MessageType,
+ voipOutMsg.TxnId,
+ voipOutMsg.VoipCallHandle,
+ voipOutMsg.LudbId,
+ remoteEvent,
+ parent->callLegNum,
+ parent->entryId() );
+
+ retValue = VoipApiMessageHandler(&voipOutMsg);
+
+ DBG_LEAVE();
+ return (retValue);
+ }
+
+
+ //CDR <xxu:08-23-00> BEGIN
+ void gCaptureSetupCdr(
+ IntraL3Msg_t *h323InMsg,
+ CdrRecCauseTerm_t cdrCause,
+ T_CNI_RIL3_CAUSE_VALUE ccCause )
+ {
+ CCdrVoiceCall ccCdr;
+
+ T_SUBSC_IE_ISDN *msisdn;
+ short ludbIndex = h323InMsg->entry_id;
+
+ DBG_FUNC("msgHandlerInit", CC_LAYER);
+ DBG_ENTER();
+
+ // Capture setup cdr data
+ if (ludbGetSubscInfoExists(ludbIndex))
+ {
+ ccCdr.setServedIMSI(ludbGetMobileIdPtr(ludbIndex));
+ msisdn = ludbGetMSISDNPtr(ludbIndex);
+ msisdn->num_plan[0] = 0x11;
+ ccCdr.setServedMSISDN(msisdn);
+ //ccCdr.setServedMSISDN(ludbGetMSISDNPtr(ludbIndex));
+ }
+
+ ccCdr.seisure_NormalTermination(0);
+
+ ccCdr.setCallingPartyNumber( &h323InMsg->l3_data.voipMsg.setup.CallingPartyNumber );
+ //ccCdr.setCalledPartyNumber( &h323InMsg->l3_data.voipMsg.setup.CalledPartyNumber );
+
+ if ( ludbIsProvCW(ludbIndex) && ludbIsActiveCW(ludbIndex) &&
+ (ccCause== CNI_RIL3_CAUSE_USER_BUSY) )
+ {
+ CCdrSSA cwCdr;
+ if (ludbGetSubscInfoExists(ludbIndex))
+ {
+ cwCdr.setServedIMSI(ludbGetMobileIdPtr(ludbIndex));
+ msisdn = ludbGetMSISDNPtr(ludbIndex);
+ msisdn->num_plan[0] = 0x11;
+ cwCdr.setServedMSISDN(msisdn);
+ //cwCdr.setServedMSISDN(ludbGetMSISDNPtr(ludbIndex));
+ }
+ cwCdr.setCorrelatedEventRefNumber(ccCdr.getEventRefNumber());
+ cwCdr.generateRecord(CDR_SS_ACTION_INVOCATION, SUPP_SERV_CW, CNI_RIL3_CAUSE_USER_BUSY);
+ }
+
+ //Load up with Location area info
+ T_CNI_RIL3_IE_LOCATION_AREA_ID lai;
+ T_CNI_RIL3_IE_CELL_ID ci;
+
+ ci.ie_present = true;
+ ci.value = ((short)(ccBtsBasicPackage.bts_ci));
+
+ lai.ie_present = true;
+ lai.mcc[0] = ((char*)&(ccBtsBasicPackage.bts_mcc))[0];
+ lai.mcc[1] = ((char*)&(ccBtsBasicPackage.bts_mcc))[1];
+ lai.mcc[2] = ((char*)&(ccBtsBasicPackage.bts_mcc))[2];
+ lai.mnc[0] = ((char*)&(ccBtsBasicPackage.bts_mnc))[0];
+ lai.mnc[1] = ((char*)&(ccBtsBasicPackage.bts_mnc))[1];
+ lai.lac = ((short)(ccBtsBasicPackage.bts_lac));
+
+ DBG_TRACE("mcc(%d,%d,%d) mnc(%d,%d) lac(%d) ci(%d)\n",
+ lai.mcc[0],lai.mcc[1],lai.mcc[2],lai.mnc[0],lai.mnc[1],lai.lac,ci.value);
+
+ DBG_TRACE("MCC(%d,%d,%d) MNC(%d,%d)\n",
+ ((char*)&(ccBtsBasicPackage.bts_mcc))[0],
+ ((char*)&(ccBtsBasicPackage.bts_mcc))[1],
+ ((char*)&(ccBtsBasicPackage.bts_mcc))[2],
+ ((char*)&(ccBtsBasicPackage.bts_mnc))[0],
+ ((char*)&(ccBtsBasicPackage.bts_mnc))[1]);
+
+ ccCdr.setLocationAreaCID(&lai, &ci);
+
+ // Generate last CDR record
+ ccCdr.release(ccCause, cdrCause);
+ }
+ //CDR <xxu:08-23-00> END
+
+
+ //ext-HO <xxu:06-01-01>
+ bool
+ sendH323DisconnectMsgExtHo(VOIP_CALL_HANDLE callHandle, T_CNI_RIL3_CAUSE_VALUE ccCause)
+ {
+ DBG_FUNC("sendH323DisconnectMsgExtHo", CC_HO_LAYER);
+ DBG_ENTER();
+
+ VOIP_API_MESSAGE voipOutMsg;
+
+ bool retValue;
+
+ voipOutMsg.Magic = VOIP_API_MAGIC_VALUE;
+ voipOutMsg.MessageType = VOIP_API_CALL_RELEASE;
+
+ voipOutMsg.CallRelease.cause = ccCause;
+ voipOutMsg.VoipCallHandle = callHandle;
+
+ voipOutMsg.LudbId = -1;
+
+ voipOutMsg.TxnId = VOIP_NULL_CALL_HANDLE;
+
+ retValue = VoipApiMessageHandler(&voipOutMsg);
+
+ DBG_TRACE("{\nMNEThoTRACE(sendH323DisconnectMsgExtHo): [==>VOIP DISCONNECT HANDOVER VOICE PATH] (hoCallHandle(%x), cause(%d)\n}\n",
+ callHandle, ccCause);
+
+ DBG_LEAVE();
+ return (retValue);
+ }
diff --git a/data/mnet/GP10/Host/cc/src/CCHalfCall.cpp b/data/mnet/GP10/Host/cc/src/CCHalfCall.cpp
new file mode 100644
index 0000000..2de3bb0
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CCHalfCall.cpp
@@ -0,0 +1,563 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCHalfCall.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : CC Half call main methods
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+//
+#include "taskLib.h"
+
+#include "CC/CCHalfCall.h"
+
+#include "CC/CCMsgAnal.h"
+
+#include "jcc/JCCLog.h"
+
+#include "stdio.h"
+
+#include "CC/CCUtil.h"
+
+#include "CC/CCInt.h"
+
+#include "CC/CCH323Util.h"
+
+#include "logging/VCLOGGING.h"
+
+#include "pm/pm_class.h"
+
+#include "csunew/csu_head.h"
+
+#include "CC/CallConfig.h"
+
+#include "CC/CallLeg.h"
+
+extern bool callTrace;
+
+extern DbgOutput Dbg;
+
+inline int JCCDBG_TRACE2(char *str) { DBG_TRACE(str); return true;};
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+// !> move the following?
+// this goes inside the Call Half Class definition
+HalfCallMsgHandler_t generatedEventHandler[MAX_GENERATED_EVENTS];
+
+// this goes inside the Call Half Class definition
+HalfCallMsgHandler_t callStateHandler[MAX_CALL_STATES][MAX_CALL_EXTERNAL_EVENTS];
+
+// Channel state machine
+HalfCallMsgHandler_t channStateHandler[MAX_CHANN_STATES][MAX_CHANN_EXTERNAL_EVENTS];
+
+ CCHalfCall::CCHalfCall ()
+ {
+
+ }
+
+ CCOrigHalfCall::CCOrigHalfCall (TwoPartyCallLeg *callLeg, JCCTimer *tclTimer)
+ {
+ //PR1378 <xxu:08-16-00>
+ //UINT16 uint16TimerValue;
+ //int timerValue;
+
+ // Timer Data below is used for sending timeout to the correct task.
+ CCHalfCall::parent = callLeg;
+
+ //uint16TimerValue = (((UINT16)(parent->callLegNum)) & (0x000F)) << 8;
+ //uint16TimerValue = uint16TimerValue | (((UINT16)(parent->callIndex)) & 0x00FF);
+
+ //timerValue = (short)uint16TimerValue;
+
+ hcTimer = tclTimer;
+ //hcTimer = new JCCTimer(callTimerExpiry, timerValue);
+
+ initData();
+ }
+
+ CCTermHalfCall::CCTermHalfCall (TwoPartyCallLeg *callLeg, JCCTimer *tclTimer)
+ {
+ //PR1378 <xxu:08-16-00>
+ //UINT16 uint16TimerValue;
+ //int timerValue;
+
+ // Timer Data below is used for sending timeout to the correct task.
+ CCHalfCall::parent = callLeg;
+
+ //uint16TimerValue = (((UINT16)(parent->callLegNum)) & (0x000F)) << 8;
+ //uint16TimerValue = uint16TimerValue | (((UINT16)(parent->callIndex)) & 0x00FF);
+
+ //timerValue = (short)uint16TimerValue;
+
+ hcTimer = tclTimer;
+ //hcTimer = new JCCTimer(callTimerExpiry, timerValue);
+
+ initData();
+ }
+
+ void
+ CCOrigHalfCall::setupNewCall (T_CNI_RIL3_SI_TI newCallTi,
+ T_CNI_RIL3_CM_SERVICE_TYPE serviceRequested)
+ {
+
+ DBG_FUNC("CCOrigHalfCall::setupNewCall", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ char callTaskName[20];
+
+ sprintf(&callTaskName[0],
+ "Call-%d EntryId-%d\0",
+ parent->callIndex,
+ parent->entryId());
+
+ if (callTrace)
+ {
+ Dbg.Func(&callTaskName[0], CC_LAYER);
+ }
+
+ // set transaction Id - first message for CC
+ // The starting entity uses 0. Other side uses 1.
+ ti = (newCallTi | ORIG_OR_MASK);
+
+ // set to null state so that we can take care of abnormal cleanups.
+ callState_ = HC_ST_NULL;
+
+ // start the timer when waiting for the setup message
+ hcTimer->setTimer(CALL_MM_CONN_EST_T999);
+
+ isEmergencyCall = (serviceRequested == CNI_RIL3_CM_SERVICE_TYPE_EMERGENCY_CALL);
+ DBG_LEAVE();
+ }
+
+ void
+ CCHalfCall::cleanup(void)
+ {
+
+ DBG_FUNC("CCHalfCall::cleanup", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ currEvent = CC_MM_CONNECTION_REL;
+ smHandleFirstCallEvent();
+ DBG_LEAVE();
+ }
+
+ void
+ CCOrigHalfCall::initData(void)
+ {
+ CCHalfCall::ti = ORIG_OR_MASK; // ti = 0 from MS
+ CCHalfCall::initData();
+ }
+
+ void
+ CCTermHalfCall::initData(void)
+ {
+ // This is used in terminations as is
+ CCHalfCall::ti = parent->callLegNum;
+ CCHalfCall::initData();
+ }
+
+ void
+ CCHalfCall::initData(void)
+ {
+
+ DBG_FUNC("CCHalfCall::initData", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // cancel any timers
+ hcTimer->cancelTimer();
+
+ releaseCounter = 0;
+ callState_ = HC_ST_FREE;
+
+ //CH<xxu:11-10-99>
+ chState_ = CH_ST_IDLE;
+
+ //BCT <xxu:09-24-00>
+ if (annState_ == ANN_PLAY_ON)
+ {
+ //Stop inband annoucement
+ T_CSU_RESULT_CON csuResult;
+
+ DBG_TRACE("CC->CSU(bct): call released, stop inband alert ann(%d,%x)-->snk(%d,%x,%d)\n",
+ annSrcPort_.portType,
+ (int)annSrcPort_.portId.rtpHandler,
+ annSnkPort_.portType,
+ (int)annSnkPort_.portId.rtpHandler,
+ (int)annSnkPort_.speechVersion);
+
+ if ( (csuResult = csu_SimplexBreak(&annSrcPort_, &annSnkPort_))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_WARNING("CC->CSU(bct): call released, stop inband alert s-break failed xlst(%d) ann(%d,%x) snk(%d,%x,%d)\n",
+ csuResult,
+ annSrcPort_.portType,
+ (int)annSrcPort_.portId.rtpHandler,
+ annSnkPort_.portType,
+ (int)annSnkPort_.portId.rtpHandler,
+ (int)annSnkPort_.speechVersion);
+
+ }
+
+ }
+
+ //BCT <xxu:09-24-00>
+ annState_ = ANN_PLAY_OFF;
+
+ channState_ = RES_ST_IDLE;
+
+ currSpeechCh_.version = CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1;
+
+ currEvent = JCC_NULL_EVENT;
+ msOutResult = CNI_RIL3_RESULT_SUCCESS;
+
+ // Have a standard release cause to use
+ memset(&rlsCause, 0, sizeof(T_CNI_RIL3_IE_CAUSE)); // first zap this ie
+ rlsCause.ie_present = true;
+ rlsCause.codingStandard = CNI_RIL3_GSMPLMN_CODING;
+ rlsCause.location = CNI_RIL3_LOCATION_PRIVATE_NETWORK_LOCAL_USER;
+ rlsCause.causeValue = CNI_RIL3_CAUSE_NORMAL_UNSPECIFIED;
+ rlsCause.diagnosticsLength = 0;
+
+ //CAUSE<xxu:03-21-00> BEGIN
+
+ // pre-initialized value
+ //voipReleaseCause_ = MOBILE_CAUSE_NORMAL_CALL_CLEARING;
+
+ voipReleaseCause_ = CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING;
+
+ //CAUSE<xxu:03-21-00> END
+
+ // initialize cpn
+ cpn.ie_present = false;
+
+ // Have a simple Bearer Capability to use - for speech only
+ // Allocate a full rate channel based on this.
+ memset(&bearerCap, 0, sizeof(T_CNI_RIL3_IE_BEARER_CAPABILITY)); // first zap this ie
+ bearerCap.ie_present = true;
+
+ // octet 3 after TL - only one byte needed
+ bearerCap.codingStandard = CNI_RIL3_GSM_STANDARD_CODING;
+ bearerCap.transferMode = CNI_RIL3_TRANSFER_CIRCUIT_MODE;
+ bearerCap.infoTransferCap = CNI_RIL3_INFO_TRANSFER_SPEECH;
+ // Following is used only in Mob-to-Nwk direction. It should be set to
+ // default value in the Encoding routine for the Nwk-to-Mob direction - Syang
+ bearerCap.radioChannelReq = CNI_RIL3_FULL_RATE_SUPPORT_ONLY_MS; // 01
+
+ callingPartyNum.ie_present = false;
+
+ alertingSent_ = false;
+ progressSent_ = false;
+ connectSent_ = false;
+
+ DBG_LEAVE();
+
+ if (callTrace)
+ {
+ Dbg.Func(taskName(taskIdSelf()), CC_LAYER);
+ }
+
+ isEmergencyCall = false;
+ }
+
+ void
+ CCHalfCall::printData(JCCPrintStFn fnPtr)
+ {
+ char * hcStr1Ptr = "Half Call Data: \n";
+ char hcStr2[120];
+
+ char callTaskName[22];
+
+ sprintf(&callTaskName[0],
+ "Call-%d EntryId-%d: \0",
+ parent->callIndex,
+ parent->entryId());
+
+ //BCT <xxu:08-01-00> BEGIN
+ sprintf(&hcStr2[0],
+ "ti(%d),curEv(%d),decRes(%d),encRes(%d),callSt(%d),channSt(%d),chState(%d),rlsCause(%d) annSt(%d)\n",
+ ti,
+ currEvent,
+ msDecodeResult,
+ msOutResult,
+ callState_,
+ channState_,
+ chState_,
+ rlsCause.causeValue,
+ annState_
+ );
+ //BCT <xxu:08-01-00> END
+
+ (*fnPtr)(callTaskName);
+ (*fnPtr)(hcStr1Ptr);
+ (*fnPtr)(&hcStr2[0]);
+
+ }
+
+ int
+ CCHalfCall::handleMobMsg(T_CNI_RIL3CC_MSG *msInMsg,
+ T_CNI_RIL3_RESULT decodeResult,
+ T_CNI_RIL3_CAUSE_VALUE causeValue,
+ JCCEvent_t inEvent)
+ {
+ DBG_FUNC("CCHalfCall::handleMobMsg", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ currEvent = inEvent;
+ msDecodedMsg = msInMsg;
+ msDecodeResult = decodeResult;
+ if (msDecodeResult != CNI_RIL3_RESULT_SUCCESS)
+ {
+ rlsCause.causeValue = causeValue;
+
+ //CAUSE<xxu:03-21-00> BEGIN
+ if (causeValue==CNI_RIL3_CAUSE_INVALID_MANDATORY_INFO)
+ voipReleaseCause_ = CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+ else
+ voipReleaseCause_ = causeValue;
+
+ //CAUSE<xxu:03-21-00> END
+
+ }
+
+ DBG_LEAVE();
+ return (smHandleFirstCallEvent());
+ }
+
+ int
+ CCHalfCall::handleTimeoutMsg(IntraL3Msg_t *ccInMsg)
+ {
+ DBG_FUNC("CCHalfCall::handleTimeoutMsg", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // We already know that it is a timeout msg
+ //CH<xxu:11-10-99> now CH not supported during & after HO
+ if (chState_ == CH_ST_HREQ)
+ {
+ currEvent = HC_LOCAL_CHTR_EXP;
+ DBG_LEAVE();
+ return (smHandleFirstCallEvent());
+ }
+ else
+ {
+ currEvent = HC_LOCAL_PROTOCOL_TIMEOUT;
+
+ rlsCause.causeValue = CNI_RIL3_CAUSE_RECOVERY_ON_TIMER_EXPIRY;
+
+ DBG_LEAVE();
+ return (smHandleFirstCallEvent());
+ }
+ }
+
+
+ JCCEvent_t
+ CCHalfCall::handleInvalidChannEvent(void)
+ {
+ DBG_FUNC("CCHalfCall::handleInvalidChannEvent", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // let the developer/tester/fields person decide.
+ // The user of the system needs to check this out if there was other problem.
+ // Otherwise, this is just a race condition.
+ JCCLog2("RR->CC Chann Warning: Invalid/Late (event = %d) in (State = %d) \n",
+ currEvent,
+ channState_);
+ DBG_WARNING("RR->CC Chann Warning: Invalid/Late (event = %d) in (State = %d) \n",
+ currEvent,
+ channState_);
+ DBG_LEAVE();
+ return (JCC_NULL_EVENT);
+
+ }
+
+ int
+ CCHalfCall::handleRemoteEvent(IntraL3Msg_t* h323Msg, JCCEvent_t remoteEvent,
+ CCRemMsgData_t inRemMsg)
+ {
+ DBG_FUNC("CCHalfCall::handleRemoteEvent", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // copy message data
+ h323InMsg = h323Msg;
+ remMsgData = inRemMsg;
+
+ currEvent = remoteEvent;
+
+ // Just call the SM Handle Event
+ DBG_LEAVE();
+ return (smHandleFirstCallEvent());
+ }
+
+ int
+ CCHalfCall::smHandleEvent(void)
+ {
+ DBG_FUNC("CCHalfCall::smHandleEvent", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // Call Handler and loop
+ while ((currEvent != JCC_NULL_EVENT) &&
+ (currEvent != CC_MESSAGE_PROCESSING_COMPLT) &&
+ (currEvent != CC_RELEASE_CALL))
+ {
+ // sm logic here - one-to-one mapping for internal events
+ // that are generated from within.
+ // state is already factored in
+ currEvent =
+ (this->*generatedEventHandler[currEvent - CC_INTERNAL_GEN_EVENT_BASE])();
+ }
+
+ if (currEvent == CC_RELEASE_CALL)
+ {
+ int storedCause;
+
+ parent->handleReleaseCall();
+
+ // causeValue below Works because 0 is unused.
+ storedCause = (0 - rlsCause.causeValue);
+
+ initData();
+ DBG_LEAVE();
+ return(storedCause);
+ }
+
+ DBG_LEAVE();
+ return(0);
+ }
+
+ int
+ CCHalfCall::smHandleFirstCallEvent(void)
+ {
+ DBG_FUNC("CCHalfCall::smHandleFirstCallEvent", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // Come up with the correct handler that should handle the msg
+ // based on the state
+
+ #ifdef _JCC_DEBUG
+ ccEntryPrint(ccSession[parent->callIndex], JCCLog);
+ #endif
+
+ if (callTrace)
+ {
+
+ ccEntryPrint(ccSession[parent->callIndex], JCCDBG_TRACE2);
+ }
+
+ //TEST
+ //printf("CC Log FirstCallEv: callIndex(%d), callSt(%d), curEv(%d)\n", parent->callIndex, callState_, currEvent);
+
+ // For Call States:
+ if (currEvent != JCC_NULL_EVENT)
+ {
+ currEvent =
+ (this->*callStateHandler[callState_][currEvent - CC_INTERNAL_CALL_EVENT_BASE])();
+ }
+
+ DBG_LEAVE();
+ return(smHandleEvent());
+ }
+
+ JCCEvent_t
+ CCHalfCall::handleInvalidEvent(void)
+ {
+
+ DBG_FUNC("CCHalfCall::handleInvalidEvent", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // let the developer/tester/fields person decide.
+ // The user of the system needs to check this out if there was other problem.
+ // Otherwise, this is just a race condition.
+ JCCLog2("CC Call Warning: Invalid (event = %d) in (State = %d) \n",
+ currEvent,
+ callState_);
+ DBG_WARNING("CC Call Warning: Invalid (event = %d) in (State = %d) \n",
+ currEvent,
+ callState_);
+ DBG_LEAVE();
+ return (JCC_NULL_EVENT);
+
+ }
+
+ bool
+ CCHalfCall::sendRemote(JCCEvent_t remoteEvent)
+ {
+ DBG_FUNC("CCHalfCall::sendRemote", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // Copy the disconnect reason, if it is a release message.
+ if (remoteEvent == HC_REMOTE_RELEASE_COMPLETE)
+ {
+ remMsgData.callRelease.cause = voipReleaseCause_;
+ }
+
+ // send to H323 task
+ DBG_LEAVE();
+ return (sendH323Msg(parent, remoteEvent, remMsgData));
+ }
+
+ JCCEvent_t
+ CCHalfCall::handleMobProtocolProblem(void)
+ {
+ DBG_FUNC("CCHalfCall::handleMobProtocolProblem", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ //CAUSE<xxu:03-21-00> BEGIN
+
+ rlsCause.causeValue = CNI_RIL3_CAUSE_PROTOCOL_ERROR_UNSPECIFIED;
+ voipReleaseCause_ = CNI_RIL3_CAUSE_DESTINATION_OUT_OF_ORDER;
+
+ //CAUSE<xxu:03-21-00> END
+
+ DBG_LEAVE();
+ return (CC_TWO_STAGE_DISCONNECT);
+ }
+
+ int
+ CCHalfCall::handleMMMsg(IntraL3Msg_t *mmMsg,
+ JCCEvent_t inEvent)
+ {
+ DBG_FUNC("CCHalfCall::handleMMMsg", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ mmInMsg = mmMsg;
+
+ currEvent = inEvent;
+
+ DBG_LEAVE();
+ return(smHandleFirstCallEvent());
+
+ }
+
+ int
+ CCHalfCall::handleRRMsg(IntraL3Msg_t *rrMsg,
+ JCCEvent_t inEvent)
+ {
+ DBG_FUNC("CCHalfCall::handleRRMsg", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ rrInMsg = rrMsg;
+
+ currEvent = inEvent;
+
+ currEvent =
+ (this->*channStateHandler[channState_][currEvent - CC_INTERNAL_CHANN_EVENT_BASE])();
+
+ DBG_LEAVE();
+ return(smHandleEvent());
+ }
diff --git a/data/mnet/GP10/Host/cc/src/CCHandover.cpp b/data/mnet/GP10/Host/cc/src/CCHandover.cpp
new file mode 100644
index 0000000..adb5f28
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CCHandover.cpp
@@ -0,0 +1,2191 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCHandover.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+//
+#include "taskLib.h"
+
+#include "jcc/JCCUtil.h"
+
+#include "logging/VCLOGGING.h"
+
+#include "defs.h"
+#include "oam_api.h"
+#include "pm/pm_class.h"
+
+#include "CC/CCHandover.h"
+
+#include "CC/CCUtil.h"
+
+#include "CC/CCSessionHandler.h"
+
+#include "CC/hortp.h"
+
+// ext-HO <chenj:06-06-01>
+#include "jcc/JCCEHoMsg.h"
+
+//GCELL<tyu:06-01-01> BEGIN
+extern GlobalCellId_t MY_GLOBALCELL_ID;
+//GCELL<tyu:06-01-01> END
+
+//Ciphering <chenj:07-17-01>
+extern unsigned char rm_DspCiphCap;
+#define RM_DSPA52(X) (X & 2)
+#define RM_DSPA51(X) (X & 1)
+#include "jcc/LUDBApi.h"
+
+// Handover state machine
+AnchorHandoverMsgHandler_t hoSrcHandler[MAX_HO_SRC_STATES][MAX_HO_SRC_EVENTS];
+TargetHandoverMsgHandler_t hoTrgHandler[MAX_HO_TRG_STATES][MAX_HO_TRG_EVENTS];
+
+//ext-HO <xxu:06-07-01>
+ExtHoTargetHandoverMsgHandler_t extHoTrgHandler[MAX_HO_TRG_STATES+MAX_HO_SRC_STATES][MAX_HO_TRG_EVENTS+MAX_HO_SRC_EVENTS];
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+ CCHandover::CCHandover (CCSessionHandler *session,
+ int callId ,
+ MSG_Q_ID qid )
+ : mmQueue_(this)
+ {
+ parent = session;
+ callIndex = callId ;
+ msgQId = qid ;
+ hoRtpSession_ = NULL ;
+ }
+
+ CCAnchorHandover::CCAnchorHandover(CCSessionHandler *session,
+ int callId ,
+ MSG_Q_ID qid )
+ : CCHandover (session, callId, qid)
+ {
+ hoSimplexConnected_ = false;
+ h3SimplexConnected_ = false;
+
+ initData();
+
+ }
+
+ CCTargetHandover::CCTargetHandover(CCSessionHandler *session,
+ int callId ,
+ MSG_Q_ID qid )
+ : CCHandover (session, callId, qid)
+ {
+ voiceConnected = false;
+
+ initData();
+ }
+
+ void
+ CCHandover::initData (void)
+ {
+ DBG_FUNC ("CCHandover::initData", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ hoState_ = HAND_ST_IDLE;
+ hoVcCallIndex_ = CC_MAX_CC_CALLS_DEF_VAL;
+
+//GCELL<tyu:06-01-01> BEGIN
+ memset(&hoGlobalCellId_, 0, sizeof(GlobalCellId_t));
+//GCELL<tyu:06-01-01> END
+
+ hoVcIpAddress_ = 0;
+
+ otherHoIncomingRtpPort_ = 0;
+
+ if (hoRtpSession_ != NULL)
+ {
+ // Release the Ho RTP channel
+ ReleaseHandoverRtpChannel(hoRtpSession_);
+ hoRtpSession_ = NULL;
+ }
+
+ parent->handoverSession = NULL;
+
+ hoSrcLinkLost_ = false;
+
+ //ext-HO <xxu:05-07-01>
+ hoAgId_ = -1;
+ h3AgId_ = -1;
+ memset(&hoNumber_, 0, sizeof(T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER));
+ hoEndCause_ = MC_HO_SUCCESS;
+ memset(&currEncrypt_, 0, sizeof(IntraL3CipherModeCommand_t));
+ reqEncrypt_.ie_present = false;
+ optCurrEncrypt_.ie_present = false;
+ reqChannelType_.ie_present = false;
+ optCurrChannelType_.ie_present = false;
+ currClassmark_.ie_present = false;
+ currChannel_.bearerType = BEARER_SPEECH;
+ currChannel_.speechChann.version = CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1;
+ currSpeechCh_.version = CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1;
+
+ DBG_LEAVE();
+ }
+
+
+ bool
+ CCHandover::isEqualGlobalCellId (const GlobalCellId_t *gCell1,const GlobalCellId_t *gCell2)
+ {
+ if (gCell1->mcc[0] != gCell2->mcc[0] ||
+ gCell1->mcc[1] != gCell2->mcc[1] ||
+ gCell1->mcc[2] != gCell2->mcc[2] ||
+ gCell1->mnc[0] != gCell2->mnc[0] ||
+ gCell1->mnc[1] != gCell2->mnc[1] ||
+ gCell1->mnc[2] != gCell2->mnc[2] ||
+ gCell1->lac != gCell2->lac ||
+ gCell1->ci != gCell2->ci)
+ return false;
+ else
+ return true;
+ }
+
+ void CCHandover::emptyMMQueue (void)
+ {
+
+ DBG_FUNC("CCHandover::emptyMMQueue", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ mmQueue_.flash ();
+
+ DBG_LEAVE();
+ }
+
+ void
+ CCAnchorHandover::addToDownlinkQueue (T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+ {
+
+ DBG_FUNC("CCAnchorHandover::addToDownlinkQueue", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ if (msMsgsQueued_ < MAX_HO_SRC_DOWNLINK_QUEUE_LENGTH)
+ {
+ downlinkQueue_[msMsgsQueued_] = *msEncodedMsg;
+ msMsgsQueued_++;
+ }
+
+ DBG_LEAVE();
+ }
+
+
+ void
+ CCAnchorHandover::emptyDownlinkQueue (void)
+ {
+
+ DBG_FUNC("CCAnchorHandover::emptyDownlinkQueue", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ short index;
+
+ // Empty second level PDU Queue first
+ // Messages will be send to the target Vipercell
+ parent->flashSapi3Queue();
+
+ if (msMsgsQueued_ > 0)
+ {
+ for(index=0; index< msMsgsQueued_; index++)
+ {
+ parent->sendL2Msg(&downlinkQueue_[index]);
+ }
+
+ msMsgsQueued_ = 0;
+ }
+
+ DBG_LEAVE();
+ }
+
+
+ void
+ CCAnchorHandover::addToRRQueue (IntraL3Msg_t *rrMsg)
+ {
+
+ DBG_FUNC("CCAnchorHandover::addToRRQueue", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ if (rrMsgsQueued_)
+ {
+ // Queue is full. Do Nothing.
+ }
+ else
+ {
+ savedRRMsg_ = *rrMsg;
+ rrMsgsQueued_ = true;
+ }
+
+ DBG_LEAVE();
+ }
+
+ void
+ CCAnchorHandover::emptyRRQueue (void)
+ {
+
+ DBG_FUNC("CCAnchorHandover::emptyRRQueue", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ if (!rrMsgsQueued_)
+ {
+ // Queue is empty. Do Nothing.
+ }
+ else
+ {
+ parent->sendRRMsg(savedRRMsg_.primitive_type,
+ savedRRMsg_.message_type,
+ &savedRRMsg_);
+
+ rrMsgsQueued_ = false;
+ }
+
+ DBG_LEAVE();
+ }
+
+ void
+ CCTargetHandover::initData (void)
+ {
+
+ DBG_FUNC("CCTargetHandover::initData", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ if (parent->entryId != (T_CNI_IRT_ID) JCC_UNDEFINED )
+ {
+ //ext-HO <xxu:07-09-01>
+ //if (voiceConnected)
+ {
+ // Break the connections with the RF Port
+ T_CSU_PORT_ID rfSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rfSourcePort.portType = CSU_GSM_PORT;
+ rfSourcePort.portId.gsmHandler = parent->entryId;
+
+ if ((csuResult = csu_OrigTermBreakAll(&rfSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_ERROR("CSU Error : Ho Disconn. Failure, (Result = %d) for (entryId = %d)\n",
+ csuResult, parent->entryId);
+
+ // Can only generate OA&M log.
+ }
+
+ voiceConnected = false;
+
+ }
+
+ sendMM(INTRA_L3_MM_REL_REQ, INTRA_L3_NULL_MSG, parent->entryId, &mmOutMsg);
+ }
+
+ CCHandover::initData();
+ DBG_LEAVE();
+
+ }
+
+ void
+ CCTargetHandover::initHandbackData()
+ {
+ DBG_FUNC("CCTargetHandover::initHandbackData", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ hoState_ = HAND_ST_TRG_HO_COMPLT;
+ DBG_LEAVE();
+ }
+
+ void
+ CCAnchorHandover::initHandbackData()
+ {
+ DBG_FUNC("CCAnchorHandover::initHandbackData", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ hoState_ = HAND_ST_ANCH_HO_COMPLT;
+
+ if (hoSimplexConnected_)
+ {
+ // Break the connections with the RF Port
+ T_CSU_PORT_ID rfSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rfSourcePort.portType = CSU_GSM_PORT;
+ rfSourcePort.portId.gsmHandler = parent->entryId;
+
+ if ((csuResult = csu_OrigTermBreakAll(&rfSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog2("CSU Error : Disconn. Failure, (Result = %d) for (entryId = %d)\n",
+ csuResult, parent->entryId);
+ DBG_ERROR("CSU Error : Disconn. Failure, (Result = %d) for (entryId = %d)\n",
+ csuResult, parent->entryId);
+
+ // Can only generate OA&M log.
+ }
+
+ hoSimplexConnected_ = false;
+ }
+
+ //BCT <xxu:09-22-00> Begin
+ TwoPartyCallLeg *whichLeg;
+ whichLeg = parent->activeLeg();
+
+ if (whichLeg != NULL)
+ {
+ if ( whichLeg->msSide != NULL )
+ {
+ if (whichLeg->msSide->annState_ == ANN_PLAY_WAITING)
+ {
+ //Play inband ringback to transferred party for BCT
+ T_CSU_RESULT_CON csuResult;
+ whichLeg->msSide->annSrcPort_.portType = CSU_ANN_PORT;
+ whichLeg->msSide->annSrcPort_.portId.annHandler = 0;
+ whichLeg->msSide->annSnkPort_.portType = CSU_RTP_PORT;
+ whichLeg->msSide->annSnkPort_.portId.rtpHandler = hoRtpSession_;
+ whichLeg->msSide->annSnkPort_.speechVersion = whichLeg->msSide->currSpeechCh_.version;
+
+ DBG_TRACE("CC->CSU(bct): start inband alert annState(%d) ann(%d,%x) --> snk(%d,%x,%d)\n",
+ whichLeg->msSide->annState_,
+ whichLeg->msSide->annSrcPort_.portType,
+ whichLeg->msSide->annSrcPort_.portId.annHandler,
+ whichLeg->msSide->annSnkPort_.portType,
+ whichLeg->msSide->annSnkPort_.portId.rtpHandler,
+ whichLeg->msSide->annSnkPort_.speechVersion);
+
+ if ( (csuResult = csu_SimplexConnect(&whichLeg->msSide->annSrcPort_,
+ &whichLeg->msSide->annSnkPort_))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_WARNING("CC->BCT(csuSConnFailedAfterHoFailed):xlst(%d) ann(%d,%x) snk(%d,%x,%d)\n",
+ csuResult,
+ whichLeg->msSide->annSrcPort_.portType,
+ (int)whichLeg->msSide->annSrcPort_.portId.rtpHandler,
+ whichLeg->msSide->annSnkPort_.portType,
+ (int)whichLeg->msSide->annSnkPort_.portId.rtpHandler,
+ (int)whichLeg->msSide->annSnkPort_.speechVersion);
+
+ //ignore this remote alerting
+ }
+ whichLeg->msSide->annState_ = ANN_PLAY_ON;
+ }
+ }
+ }
+ //BCT <xxu:09-21-00> END
+
+ DBG_LEAVE();
+ }
+
+ int
+ CCHandover::handleMMMsg(IntraL3Msg_t *mmMsg,
+ JCCEvent_t hoEvent)
+ {
+ DBG_FUNC("CCHandover::handleMMMsg", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ mmInMsg = mmMsg;
+ currEvent = hoEvent;
+ DBG_LEAVE();
+ return(0);
+
+ }
+
+ int
+ CCAnchorHandover::handleMMMsg(IntraL3Msg_t *mmMsg,
+ JCCEvent_t hoEvent)
+ {
+ DBG_FUNC("CCAnchorHandover::handleMMMsg", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ CCHandover::handleMMMsg(mmMsg, hoEvent);
+
+ DBG_LEAVE();
+ return(smHandleEvent());
+
+ }
+
+ int
+ CCTargetHandover::handleMMMsg(IntraL3Msg_t *mmMsg,
+ JCCEvent_t hoEvent)
+ {
+ DBG_FUNC("CCTargetHandover::handleMMMsg", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ CCHandover::handleMMMsg(mmMsg, hoEvent);
+
+ DBG_LEAVE();
+ return(smHandleEvent());
+
+ }
+
+ int
+ CCHandover::handleRRMsg(IntraL3Msg_t *rrMsg,
+ JCCEvent_t hoEvent)
+ {
+ DBG_FUNC("CCHandover::handleRRMsg", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ rrInMsg = rrMsg;
+ currEvent = hoEvent;
+ DBG_LEAVE();
+ return(0);
+
+ }
+
+ int
+ CCAnchorHandover::handleRRMsg(IntraL3Msg_t *rrMsg,
+ JCCEvent_t hoEvent)
+ {
+ DBG_FUNC("CCAnchorHandover::handleRRMsg", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ CCHandover::handleRRMsg(rrMsg, hoEvent);
+
+ DBG_LEAVE();
+ return(smHandleEvent());
+
+
+ }
+
+ int
+ CCTargetHandover::handleRRMsg(IntraL3Msg_t *rrMsg,
+ JCCEvent_t hoEvent)
+ {
+ DBG_FUNC("CCTargetHandover::handleRRMsg", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ CCHandover::handleRRMsg(rrMsg, hoEvent);
+
+ DBG_LEAVE();
+ return(smHandleEvent());
+
+
+ }
+
+ JCCEvent_t
+ CCHandover::handleMMLateEstCnf(void)
+ {
+
+ DBG_FUNC("handleMMLateEstCnf", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // handle the case where a late establish confirm comes in
+ // for a handover request that was previously sent.
+ sendMM (INTRA_L3_MM_REL_REQ,
+ INTRA_L3_NULL_MSG,
+ mmInMsg->entry_id,
+ &mmOutMsg);
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ JCCEvent_t
+ CCHandover::handleInvalidEvent(void)
+ {
+
+ DBG_FUNC("CCHandover::handleInvalidEvent", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // let the developer/tester/fields person decide.
+ // The user of the system needs to check this out if there was other problem.
+ // Otherwise, this is just a race condition.
+ JCCLog2("CC Handover Warning: (Invalid event = %d) in (State = %d) \n",
+ currEvent,
+ hoState_);
+ DBG_WARNING("CC Handover Warning: (Invalid event = %d) in (State = %d) \n",
+ currEvent,
+ hoState_);
+ DBG_LEAVE();
+ return (JCC_NULL_EVENT);
+
+ }
+
+ JCCEvent_t
+ CCHandover::handleInternalEvent (JCCEvent_t handEvent)
+ {
+ DBG_FUNC("CCHandover::handleInternalEvent", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ DBG_LEAVE();
+ return(CC_RELEASE_CALL);
+
+ }
+
+ //HO<xxu:03-07-00>
+ JCCEvent_t
+ CCAnchorHandover::handleInternalEvent (JCCEvent_t handEvent)
+ {
+
+ DBG_FUNC("CCAnchorHandover::handleInternalEvent", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ JCCEvent_t returnValue = JCC_NULL_EVENT;
+
+ DBG_TRACE("CC INFO @anch-handleInternalEvent: ho(%d, %d), event %d\n",
+ hoType_, hoState_, handEvent);
+
+ // check for handover
+ switch (hoState_)
+ {
+ case HAND_ST_IDLE:
+ // No Handover activity
+ returnValue = CC_RELEASE_CALL;
+ break;
+
+ case HAND_ST_ANCH_VC_IP_ADDRESS_REQ:
+ case HAND_ST_ANCH_SND_HO_REQ:
+ // Skip event loop. cleanup handover and continue to cleanup session.
+ handleAnchDuringHoRls();
+ returnValue = CC_RELEASE_CALL;
+ break;
+
+ case HAND_ST_ANCH_RCV_HO_REQ_ACK:
+ {
+ // There is a risk that we never receive any message
+ // from Target ViperCell. Also, we haven't released
+ // the old channel and connection resources and setup the
+ // two-way connection with the new Ho RTP channel.
+
+ // Do not cancel T103 timer - timer value should be set accordingly!
+ // This will let us handle the case described above.
+ // hcTimer->cancelTimer();
+
+ hoSrcLinkLost_ = true;
+
+ // Wait for a Handover Complete from Target
+ // Do Nothing else
+ returnValue = CC_MESSAGE_PROCESSING_COMPLT;
+ break;
+ }
+
+ case HAND_ST_ANCH_HO_COMPLT:
+ case HAND_ST_ANCH_RCV_HB_REQ:
+ // Should not receive this msg. in these states.
+ // Late Message. Ignore!
+ returnValue = CC_MESSAGE_PROCESSING_COMPLT;
+ break;
+
+ case HAND_ST_ANCH_SND_HB_REQ_ACK:
+ // cancel T104 timer
+ parent->sessionTimer->cancelTimer();
+ // There is a chance for recovery.
+ handleAnchT104TimerExpiry();
+ returnValue = CC_MESSAGE_PROCESSING_COMPLT;
+ break;
+
+ default:
+ DBG_ERROR("CC Handover Error: (Invalid Anchor State = %d)(hoType %d) \n",
+ hoState_, hoType_);
+ }
+
+
+ DBG_LEAVE();
+ return(returnValue);
+ }
+
+ JCCEvent_t
+ CCTargetHandover::handleInternalEvent (JCCEvent_t handEvent)
+ {
+ DBG_FUNC("CCTargetHandover::handleInternalEvent", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ JCCEvent_t returnValue = JCC_NULL_EVENT;
+
+ // check for handover
+ switch (hoState_)
+ {
+
+ case HAND_ST_TRG_RCV_HO_REQ:
+ case HAND_ST_TRG_SND_HO_REQ_ACK:
+ case HAND_ST_TRG_HO_COMPLT:
+ case HAND_ST_TRG_SND_HB_REQ:
+ handleTrgPostHoRls();
+ returnValue = CC_RELEASE_CALL;
+ break;
+
+ case HAND_ST_TRG_RCV_HB_REQ_ACK:
+ {
+ // There is a risk that we never receive any message
+ // from Target(Anchor) ViperCell. Also, we haven't released
+ // the old channel and connection resources and setup the
+ // new connection with the new Ho RTP channel.
+
+ // Do not cancel T203 timer - timer value should be set accordingly!
+ // This will let us handle the case described above.
+ // hcTimer->cancelTimer();
+
+ hoSrcLinkLost_ = true;
+
+ // Wait for a Handover Complete from Target
+ // Do Nothing else
+ returnValue = CC_MESSAGE_PROCESSING_COMPLT;
+ break;
+ }
+
+ default:
+ DBG_ERROR("CC Handover Error: (Invalid Target State = %d) \n",
+ hoState_);
+ }
+
+ DBG_LEAVE();
+ return(returnValue);
+
+ }
+
+ int
+ CCHandover::handleTimeoutMsg (IntraL3Msg_t *ccInMsg)
+ {
+ DBG_FUNC("CCHandover::handleTimeoutMsg", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ DBG_LEAVE();
+ return(0);
+
+ }
+
+ int
+ CCAnchorHandover::handleTimeoutMsg (IntraL3Msg_t *ccInMsg)
+ {
+ DBG_FUNC("CCAnchorHandover::handleTimeoutMsg", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ currEvent = HAND_SRC_TIMER_EXPIRY;
+
+ DBG_LEAVE();
+ return(smHandleEvent());
+
+ }
+
+ int
+ CCTargetHandover::handleTimeoutMsg (IntraL3Msg_t *ccInMsg)
+ {
+ DBG_FUNC("CCTargetHandover::handleTimeoutMsg", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ currEvent = HAND_TRG_TIMER_EXPIRY;
+
+ DBG_LEAVE();
+ return(smHandleEvent());
+
+ }
+
+
+ int
+ CCHandover::handleVcCcMsg(InterVcMsg_t *vcCcInMsg)
+ {
+
+ DBG_FUNC("CCHandover::handleVcCcMsg", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ vcInMsg = vcCcInMsg;
+
+ switch (vcInMsg->msgType)
+ {
+ case INTER_VC_CC_PERFORM_HANDOVER:
+ currEvent = HAND_PERFORM_HO_REQ;
+ // peg
+ PM_CCMeasurement.attIncomingInterMSCHDOs.increment();
+ break;
+
+ case INTER_VC_CC_ABORT_HANDOVER:
+ currEvent = HAND_ABORT_HO;
+ break;
+
+ case INTER_VC_CC_PERFORM_HANDOVER_ACK:
+ currEvent = HAND_PERFORM_HO_ACK;
+ break;
+
+ case INTER_VC_CC_PERFORM_HANDOVER_NACK:
+ currEvent = HAND_PERFORM_HO_NACK;
+ break;
+
+ case INTER_VC_CC_COMPLETE_HANDOVER:
+ currEvent = HAND_COMPLT_HO;
+ // peg
+ PM_CCMeasurement.succOutgoingInterMSCHDOs.increment();
+ break;
+
+ case INTER_VC_CC_RLS_CALL:
+ currEvent = HAND_RLS_CALL;
+ break;
+
+ case INTER_VC_CC_POST_HANDOVER_MOB_EVENT:
+ currEvent = HAND_POSTHO_MOB_EVENT;
+ break;
+
+ // Handback Events
+
+ case INTER_VC_CC_PERFORM_HANDBACK:
+ currEvent = HAND_PERFORM_HO_REQ;
+ // peg
+ PM_CCMeasurement.attIncomingInterMSCHDOs.increment();
+ break;
+
+ case INTER_VC_CC_ABORT_HANDBACK:
+ currEvent = HAND_ABORT_HO;
+ break;
+
+ case INTER_VC_CC_PERFORM_HANDBACK_ACK:
+ currEvent = HAND_PERFORM_HO_ACK;
+ break;
+
+ case INTER_VC_CC_PERFORM_HANDBACK_NACK:
+ currEvent = HAND_PERFORM_HO_NACK;
+ break;
+
+ case INTER_VC_CC_COMPLETE_HANDBACK:
+ currEvent = HAND_COMPLT_HO;
+ // peg
+ PM_CCMeasurement.succOutgoingInterMSCHDOs.increment();
+ break;
+
+ default:
+ DBG_ERROR("CC Call Error: Unexpected (Msg Type = %d) from Vipercell.\n",
+ vcInMsg->msgType);
+ currEvent = JCC_NULL_EVENT;
+
+ }
+
+ DBG_LEAVE();
+ return(0);
+ }
+
+ int
+ CCAnchorHandover::handleVcCcMsg(InterVcMsg_t *vcCcInMsg)
+ {
+ DBG_FUNC("CCAnchorHandover::handleVcCcMsg", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ CCHandover::handleVcCcMsg(vcCcInMsg);
+
+ DBG_LEAVE();
+ return(smHandleEvent());
+ }
+
+ int
+ CCTargetHandover::handleVcCcMsg(InterVcMsg_t *vcCcInMsg)
+ {
+ DBG_FUNC("CCTargetHandover::handleVcCcMsg", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ CCHandover::handleVcCcMsg(vcCcInMsg);
+
+ DBG_LEAVE();
+ return(smHandleEvent());
+ }
+
+ void
+ CCHandover::printData (JCCPrintStFn fnPtr)
+ {
+ char * hcStr1Ptr = "Call Handover Data : ";
+ char hcStr2[120];
+
+ sprintf(&hcStr2[0],
+ "state( %d), hoCallIndex( %d), VcMCC(%x%x%x), VcMNC(%x%x%x), VcLac(%d), VcCellId( %d), VcIpAddress( %d)\n",
+ hoState_,
+ hoVcCallIndex_,
+ hoGlobalCellId_.mcc[0],hoGlobalCellId_.mcc[1],hoGlobalCellId_.mcc[2],
+ hoGlobalCellId_.mnc[0],hoGlobalCellId_.mnc[1],hoGlobalCellId_.mnc[2],
+ hoGlobalCellId_.lac,
+ hoGlobalCellId_.ci,
+ hoVcIpAddress_
+ );
+
+ //if (hoState_ != HAND_ST_IDLE)
+ // {
+ (*fnPtr)(hcStr1Ptr);
+ (*fnPtr)(&hcStr2[0]);
+ // }
+ }
+
+ void
+ CCTargetHandover::printData (JCCPrintStFn fnPtr)
+ {
+ CCHandover::printData(fnPtr);
+
+ char * hcStr1Ptr = "Call Target Handover Data : ";
+ char hcStr2[120];
+
+ sprintf(&hcStr2[0],
+ "voiceConnected( %d)\n",
+ voiceConnected
+ );
+
+ if (hoState_ != HAND_ST_IDLE)
+ {
+ (*fnPtr)(hcStr1Ptr);
+ (*fnPtr)(&hcStr2[0]);
+ }
+ }
+
+ //HO<xxu:02-23-00> Handle H3
+ BOOL
+ CCAnchorHandover::cleanup(BOOL force = FALSE)
+ {
+ BOOL retVal;
+
+ DBG_FUNC("CCAnchorHandover::cleanup", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ if (force == FALSE)
+ {
+ // FALSE returned on canceling handover in process (incompleted)
+ // The return value is used in the CCSessionHandler::cleanup()
+ // as a condition for cleaning the call upon remote VC failure
+ retVal = (hoState_ < HAND_ST_ANCH_HO_COMPLT) ? FALSE : TRUE;
+
+ // Cleanup source
+ switch (hoType_)
+ {
+ case HO_TY_HANDMSC3:
+ //Keep ho but drop h3
+ handleAnchPostH3Rls();
+ hoState_ = HAND_ST_ANCH_HO_COMPLT;
+ hoType_ = HO_TY_HANDOVER;
+ retVal = FALSE;
+ break;
+
+ case HO_TY_HANDOVER:
+ case HO_TY_HANDBACK:
+ //Drop ho
+ handleAnchPostHoRls();
+ break;
+
+ case HO_TY_EXT_HANDOVER:
+ case HO_TY_EXT_HANDBACK:
+ case HO_TY_EXT_HANDMSC3:
+ case HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR:
+ case HO_TY_MNET_NONANCHOR_HANDBACK_TO_MSC3:
+ // <ext-ho <chenj: 06-05-01>
+ handleAnchPostExtHoRls();
+ break;
+
+ default:
+ // own messup happend, trouble shooting immediately!
+ DBG_ERROR ("CC Error @anch-cleanup: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ break;
+ }
+ }
+ else
+ {
+ // <Igal: 04-10-01>
+ // Unconditional complete cleanup
+ retVal = TRUE;
+
+ // <ext-ho <chenj: 06-05-01>
+ handleAnchPostExtHoRls();
+
+ handleAnchPostHoRls();
+ handleAnchPostH3Rls();
+
+ initData();
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+ }
+
+ BOOL
+ CCTargetHandover::cleanup(BOOL force = FALSE)
+ {
+
+ DBG_FUNC("CCTargetHandover::cleanup", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // Cleanup target
+ handleTrgPostHoRls();
+
+ DBG_LEAVE();
+
+ // Always TRUE. Target session is always cleaned when a connection
+ // with the target VC and the anchor session is lost.
+ // The return value is used in the CCSessionHandler::cleanup()
+ return (TRUE);
+ }
+
+ int
+ CCHandover::smHandleEvent(void)
+ {
+
+ DBG_FUNC("CCHandover::smHandleEvent", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ DBG_LEAVE();
+ return(0);
+ }
+
+ int
+ CCAnchorHandover::smHandleEvent(void)
+ {
+ DBG_FUNC("CCAnchorHandover::smHandleEvent", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ int returnValue = 0;
+
+ if (currEvent != JCC_NULL_EVENT)
+ {
+ currEvent =
+ (this->*hoSrcHandler[hoState_][currEvent - HAND_SRC_EVENT_BASE])();
+ }
+ else
+ {
+ DBG_LEAVE();
+ return(0);
+ }
+
+ switch(currEvent)
+ {
+ case CC_RELEASE_CALL:
+ returnValue = -1; // release call
+
+ break;
+
+ case CC_RELEASE_HOCALLLEG:
+ // ext-HO <chenj:06-11-01>
+ // JOE: later, might want to pass a correct cause
+ parent->hoCallLeg->cleanup( CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING );
+
+ returnValue = 0; // do NOT release call (just the external call leg)!
+
+ break;
+
+ case CC_RELEASE_H3CALLLEG:
+ // ext-HO <chenj:06-11-01>
+ // JOE: later, might want to pass a correct cause
+ parent->h3CallLeg->cleanup( CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING );
+
+ returnValue = 0; // do NOT release call (just the external call leg)!
+
+ break;
+
+ case CC_RELEASE_ALLHOCALLLEG:
+ // EHO <chenj:06-11-01>
+ // JOE: later, might want to pass a correct cause
+ parent->hoCallLeg->cleanup( CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING );
+ parent->h3CallLeg->cleanup( CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING );
+
+ returnValue = 0; // do NOT release call (just the external call leg)!
+
+ break;
+
+ case CC_RELEASE_OWN:
+ //Return to proceed with call legs and call releases
+ returnValue = CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING;
+ break;
+
+ case CC_TWO_STAGE_DISCONNECT:
+ returnValue = -1;
+ break;
+
+ case CC_MESSAGE_PROCESSING_COMPLT:
+ case JCC_NULL_EVENT:
+ // Do Nothing
+ break;
+
+ default:
+
+ DBG_ERROR("CC Handover Internal Error: (Bad event=%d), (state=%d), (session=%d)\n",
+ currEvent,
+ hoState_,
+ callIndex);
+ }
+
+ DBG_LEAVE();
+ return(returnValue);
+ }
+
+ int
+ CCTargetHandover::smHandleEvent(void)
+ {
+ DBG_FUNC("CCTargetHandover::smHandleEvent", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ int returnValue = 0;
+
+ if (currEvent != JCC_NULL_EVENT)
+ {
+ currEvent =
+ (this->*hoTrgHandler[hoState_][currEvent - HAND_SRC_EVENT_BASE])();
+ }
+ else
+ {
+ DBG_LEAVE();
+ return(0);
+ }
+
+
+ switch(currEvent)
+ {
+ case CC_RELEASE_CALL:
+ returnValue = -1;
+ break;
+
+ case CC_MESSAGE_PROCESSING_COMPLT:
+ case JCC_NULL_EVENT:
+ // Do Nothing
+ break;
+
+ default:
+
+ DBG_ERROR("CC Handover Internal Error: (Bad event=%d), (state=%d), (session=%d)\n",
+ currEvent,
+ hoState_,
+ callIndex);
+ }
+
+ DBG_LEAVE();
+ return(returnValue);
+ }
+
+ void
+ CCTargetHandover::sendRRMsgToAnchorCC(IntraL3Msg_t *rrMsg)
+ {
+
+ DBG_FUNC("CCTargetHandover::sendRRMsgToAnchorCC", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // Do Nothing
+ vcOutMsg.msgType = INTER_VC_CC_POST_HANDOVER_MOB_EVENT;
+ vcOutMsg.msgData.postHoMobEventData.intraL3Msg = *rrMsg;
+ sendVcMsg(MODULE_RM, MODULE_CC);
+ DBG_LEAVE();
+ }
+
+ void
+ CCTargetHandover::sendMSMsgToAnchorCC(T_CNI_RIL3MD_CCMM_MSG *msInMsg)
+ {
+ DBG_FUNC("CCTargetHandover::sendMSMsgToAnchorCC", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ vcOutMsg.msgType = INTER_VC_CC_POST_HANDOVER_MOB_EVENT;
+ vcOutMsg.msgData.postHoMobEventData.msInMsg = *msInMsg;
+ sendVcMsg(MODULE_MD, MODULE_CC);
+ DBG_LEAVE();
+ }
+
+
+ void CCTargetHandover::sendMMMsgToRemoteCC (IntraL3Msg_t *mmMsg)
+ {
+ /* Forward CM SERVICE REQUEST to the anchor CC (CM Session) */
+
+ DBG_FUNC("CCTargetHandover::sendMMMsgToCC", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ vcOutMsg.msgType = INTER_VC_CC_POST_HANDOVER_MOB_EVENT ;
+ vcOutMsg.msgData.postHoMobEventData.intraL3Msg = *mmMsg;
+
+ // Source, Destination
+ sendVcMsg (MODULE_MM, MODULE_CC);
+
+ DBG_LEAVE();
+ }
+
+
+ void
+ CCAnchorHandover::sendL2MsgToTargetCC(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+ {
+ DBG_FUNC("CCAnchorHandover::sendL2MsgToTargetCC", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ vcOutMsg.msgType = INTER_VC_CC_POST_HANDOVER_DATA_EVENT;
+ vcOutMsg.msgData.postHoMobEventData.msEncodedMsg = *msEncodedMsg;
+
+ // Igal: PDU has to be intercepted by the CM Session on the target side
+ sendVcMsg(MODULE_CC, MODULE_CC);
+ DBG_LEAVE();
+ }
+
+
+ void
+ CCAnchorHandover::sendRRMsgToTargetCC(IntraL3Msg_t *rrMsg)
+ {
+ DBG_FUNC("CCAnchorHandover::sendRRMsgToTargetCC", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ vcOutMsg.msgType = INTER_VC_CC_POST_HANDOVER_DATA_EVENT; //INTER_VC_CC_POST_HANDOVER_MOB_EVENT;
+ vcOutMsg.msgData.postHoMobEventData.intraL3Msg = *rrMsg;
+ sendVcMsg(MODULE_CC, MODULE_RM);
+ DBG_LEAVE();
+ }
+
+
+ void CCAnchorHandover::sendMMMsgToRemoteCC (IntraL3Msg_t *mmMsg)
+ {
+ /* Send Response to CM SERVICE REQUEST (either CM SERVICE ACCEPT or REJECT)
+ to the target MM */
+
+ DBG_FUNC("CCAnchorHandover::sendMMMsgToCC", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ vcOutMsg.msgType = INTER_VC_CC_POST_HANDOVER_MOB_EVENT ;
+ vcOutMsg.msgData.postHoMobEventData.intraL3Msg = *mmMsg;
+
+ // Source, Destination
+ sendVcMsg (MODULE_CC, MODULE_MM);
+
+ DBG_LEAVE();
+ }
+
+
+ T_CSU_PORT_ID
+ CCAnchorHandover::mobileCsuPort(void)
+ {
+ DBG_FUNC("CCAnchorHandover::mobileCsuPort", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ T_CSU_PORT_ID rtpSourcePort;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+
+ if (hoState_ == HAND_ST_ANCH_EHO_COMPLT) // External handover
+ {
+ rtpSourcePort.portId.rtpHandler = VoipCallGetRTPHandle(parent->hoCallLeg->h323CallHandle);
+ }
+ else
+ {
+ rtpSourcePort.portId.rtpHandler = hoRtpSession_;
+ }
+
+ return(rtpSourcePort);
+
+ DBG_LEAVE();
+ }
+
+
+ //HO<xxu:01-31-00> give type of going handover
+ JCCEvent_t
+ CCHandover::handleNullEvent(void)
+ {
+
+ DBG_FUNC("handleNullEvent", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CC Info: hoType '%d', hoState '%d'\n", hoType_, hoState_);
+ // Do Nothing.
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+
+ //HO<xxu:01-31-00> init h3
+ void
+ CCAnchorHandover::initHandmsc3Data(void)
+ {
+ DBG_FUNC("CCAnchorHandover::initHandmsc3Data", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ if (h3SimplexConnected_)
+ {
+ // Break connections with the RF Port
+ T_CSU_PORT_ID dstRtpPort;
+ T_CSU_RESULT_CON csuResult;
+
+ dstRtpPort.portType = CSU_RTP_PORT;
+ dstRtpPort.portId.rtpHandler = h3RtpSession_;
+
+ if ((csuResult = csu_OrigTermBreakAll(&dstRtpPort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog3("CSU Error : Disconn. Failure, (hoType|hoState: %x) (Result = %d)(rtpHndler %x) \n",
+ (hoType_<<8|hoState_), csuResult, (int) h3RtpSession_);
+ DBG_ERROR("CSU Error : Disconn. Failure, (hoType %d;hoState_ %d)(Result = %d)(rtpHndler %x) \n",
+ hoType_, hoState_, csuResult, h3RtpSession_);
+
+ // Can only generate OA&M log.
+ }
+ }
+
+ if (h3RtpSession_ != NULL)
+ {
+ // Release the H3 RTP channel
+ ReleaseHandoverRtpChannel(h3RtpSession_);
+ }
+
+ msMsgsQueued_ = 0;
+ rrMsgsQueued_ = false;
+
+ h3SimplexConnected_ = false;
+ h3VcCallIndex_ = CC_MAX_CC_CALLS_DEF_VAL;
+//GCELL<tyu:06-01-01> BEGIN
+ memset(&h3GlobalCellId_, 0, sizeof(GlobalCellId_t));
+//GCELL<tyu:06-01-01> END
+ h3VcIpAddress_ = 0;
+ otherH3IncomingRtpPort_ = 0;
+ h3RtpSession_ = NULL;
+
+ h3SrcLinkLost_ = false;
+ hoType_ = HO_TY_HANDOVER;
+ hoState_ = HAND_ST_ANCH_HO_COMPLT;
+
+ //BCT <xxu:09-22-00> Begin
+ TwoPartyCallLeg *whichLeg;
+ whichLeg = parent->activeLeg();
+
+ if (whichLeg != NULL)
+ {
+ if ( whichLeg->msSide != NULL )
+ {
+ if (whichLeg->msSide->annState_ == ANN_PLAY_WAITING)
+ {
+ //Play inband ringback to transferred party for BCT
+ T_CSU_RESULT_CON csuResult;
+ whichLeg->msSide->annSrcPort_.portType = CSU_ANN_PORT;
+ whichLeg->msSide->annSrcPort_.portId.annHandler = 0;
+ whichLeg->msSide->annSnkPort_.portType = CSU_RTP_PORT;
+ whichLeg->msSide->annSnkPort_.portId.rtpHandler = hoRtpSession_;
+ whichLeg->msSide->annSnkPort_.speechVersion = whichLeg->msSide->currSpeechCh_.version;
+
+
+ DBG_TRACE("CC->CSU(bct): start inband alert annState(%d) ann(%d,%x) --> snk(%d,%x,%d)\n",
+ whichLeg->msSide->annState_,
+ whichLeg->msSide->annSrcPort_.portType,
+ whichLeg->msSide->annSrcPort_.portId.annHandler,
+ whichLeg->msSide->annSnkPort_.portType,
+ whichLeg->msSide->annSnkPort_.portId.rtpHandler,
+ whichLeg->msSide->annSnkPort_.speechVersion);
+
+ if ( (csuResult = csu_SimplexConnect( &whichLeg->msSide->annSrcPort_,
+ &whichLeg->msSide->annSnkPort_))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_WARNING("CC->BCT(csuSConnFailedAfterHoFailed):xlst(%d) ann(%d,%x) snk(%d,%x,%d)\n",
+ csuResult,
+ whichLeg->msSide->annSrcPort_.portType,
+ (int)whichLeg->msSide->annSrcPort_.portId.rtpHandler,
+ whichLeg->msSide->annSnkPort_.portType,
+ (int)whichLeg->msSide->annSnkPort_.portId.rtpHandler,
+ (int)whichLeg->msSide->annSnkPort_.speechVersion);
+
+ //ignore this remote alerting
+ }
+ whichLeg->msSide->annState_ = ANN_PLAY_ON;
+ }
+ }
+ }
+ //BCT <xxu:09-21-00> END
+
+
+ //RETRY<xxu:04-24-00> BEGIN
+ hoRetry_ = 0;
+ //RETRY<xxu:04-24-00> END
+
+ DBG_LEAVE();
+ }
+
+
+ //HO<xxu:01-31-00> init ho
+ void
+ CCAnchorHandover::initData (void)
+ {
+
+ DBG_FUNC("CCAnchorHandover::initData", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ msMsgsQueued_ = 0;
+
+ rrMsgsQueued_ = false;
+
+ if (hoSimplexConnected_)
+ {
+ // break connection
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = hoRtpSession_;
+
+ if ((csuResult = csu_OrigTermBreakAll(&rtpSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog2("CSU Error : Ho Disconn. Failure, (Result = %d) for (rtp port = %x)\n",
+ csuResult,
+ (int)hoRtpSession_);
+ DBG_ERROR("CSU Error : Ho Disconn. Failure, (Result = %d) for (rtp port = %x)\n",
+ csuResult,
+ (int)hoRtpSession_);
+
+ // Can only generate OA&M log.
+ }
+
+ hoSimplexConnected_ = false;
+ }
+
+
+ if (h3SimplexConnected_)
+ {
+ // Break connections with the RF Port
+ T_CSU_PORT_ID dstRtpPort;
+ T_CSU_RESULT_CON csuResult;
+
+ dstRtpPort.portType = CSU_RTP_PORT;
+ dstRtpPort.portId.rtpHandler = h3RtpSession_;
+
+ if ((csuResult = csu_OrigTermBreakAll(&dstRtpPort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog3("CSU Error : Disconn. Failure, (hoType|hoState: %x) (Result = %d)(rtpHndler %x) \n",
+ (hoType_<<8|hoState_), csuResult, (int) h3RtpSession_);
+ DBG_ERROR("CSU Error : Disconn. Failure, (hoType %d;hoState_ %d)(Result = %d)(rtpHndler %x) \n",
+ hoType_, hoState_, csuResult, h3RtpSession_);
+
+ // Can only generate OA&M log.
+ }
+ }
+
+ if (h3RtpSession_ != NULL)
+ {
+ // Release the H3 RTP channel
+ ReleaseHandoverRtpChannel(h3RtpSession_);
+ }
+
+ msMsgsQueued_ = 0;
+ rrMsgsQueued_ = false;
+
+ h3SimplexConnected_ = false;
+ h3VcCallIndex_ = CC_MAX_CC_CALLS_DEF_VAL;
+//GCELL<tyu:06-01-01> BEGIN
+ memset(&h3GlobalCellId_, 0, sizeof(GlobalCellId_t));
+//GCELL<tyu:06-01-01> END
+ h3VcIpAddress_ = 0;
+ otherH3IncomingRtpPort_ = 0;
+ h3RtpSession_ = NULL;
+
+ h3SrcLinkLost_ = false;
+
+ // ext-HO <chenj:06-29-01>
+ memset(&targetMscNumber_, 0, sizeof(T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER));
+
+ //BCT <xxu:09-22-00> Begin
+ TwoPartyCallLeg *whichLeg;
+ whichLeg = parent->activeLeg();
+
+ if (whichLeg != NULL)
+ {
+ if ( whichLeg->msSide != NULL )
+ {
+ if (whichLeg->msSide->annState_ == ANN_PLAY_WAITING)
+ {
+ //Play inband ringback to transferred party for BCT
+ T_CSU_RESULT_CON csuResult;
+ whichLeg->msSide->annSrcPort_.portType = CSU_ANN_PORT;
+ whichLeg->msSide->annSrcPort_.portId.annHandler = 0;
+ whichLeg->msSide->annSnkPort_.portType = CSU_GSM_PORT;
+ whichLeg->msSide->annSnkPort_.portId.gsmHandler = parent->entryId;
+ whichLeg->msSide->annSnkPort_.speechVersion = whichLeg->msSide->currSpeechCh_.version;
+
+
+ DBG_TRACE("CC->CSU(bct): start inband alert annState(%d) ann(%d,%x) --> snk(%d,%x,%d)\n",
+ whichLeg->msSide->annState_,
+ whichLeg->msSide->annSrcPort_.portType,
+ whichLeg->msSide->annSrcPort_.portId.annHandler,
+ whichLeg->msSide->annSnkPort_.portType,
+ whichLeg->msSide->annSnkPort_.portId.rtpHandler,
+ whichLeg->msSide->annSnkPort_.speechVersion);
+
+ if ( (csuResult = csu_SimplexConnect(&whichLeg->msSide->annSrcPort_,
+ &whichLeg->msSide->annSnkPort_))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_WARNING("CC->BCT(csuSConnFailedAfterHoFailed):xlst(%d) ann(%d,%x) snk(%d,%x,%d)\n",
+ csuResult,
+ whichLeg->msSide->annSrcPort_.portType,
+ (int)whichLeg->msSide->annSrcPort_.portId.rtpHandler,
+ whichLeg->msSide->annSnkPort_.portType,
+ (int)whichLeg->msSide->annSnkPort_.portId.rtpHandler,
+ (int)whichLeg->msSide->annSnkPort_.speechVersion);
+
+ //ignore this remote alerting
+ }
+ whichLeg->msSide->annState_ = ANN_PLAY_ON;
+ }
+ }
+ }
+ //BCT <xxu:09-21-00> END
+
+ CCHandover::initData();
+
+ //HO<xxu: 01-27-00>
+ hoType_ = (HandoverTypes_t) 0;
+
+ //RETRY<xxu:04-24-00> BEGIN
+ hoRetry_ = 0;
+ //RETRY<xxu:04-24-00> END
+
+ DBG_LEAVE();
+ }
+
+ //HO<xxu:01-28-00> need handle both h3 and ho
+ int
+ CCAnchorHandover::handleVbCcMsg(IntraL3Msg_t *vbCcInMsg)
+ {
+ UINT32 reVcIpAddress;
+ bool location_rejected = false;
+
+ DBG_FUNC("CCAnchorHandover::handleVbCcMsg", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CC->Handover Info: CCAnchorHandover::handleVbCcMsg (hoType %d, hoState %d)\n",
+ hoType_, hoState_);
+
+ if (hoState_ != HAND_ST_ANCH_VC_IP_ADDRESS_REQ &&
+ hoState_ != HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ )
+ {
+ // Do Nothing
+ // Late Message
+ DBG_LEAVE();
+ return 0;
+ }
+
+ // PR CSCdv18197 <chenj:08-27-01>
+ // A string "0" instead of NULL for rejected case
+ if ((vbCcInMsg->l3_data.ipAddressResponse.ViperCellIpAddress[0] == '0') &&
+ (vbCcInMsg->l3_data.ipAddressResponse.ViperCellIpAddress[0] == '\n'))
+ {
+ location_rejected = true;
+ }
+ else
+ {
+ // Copy the ip address from the message
+ reVcIpAddress =
+ inet_addr(&(vbCcInMsg->l3_data.ipAddressResponse.ViperCellIpAddress[0]) );
+
+ if (reVcIpAddress == 0)
+ {
+ location_rejected = true;
+ }
+
+ switch(hoType_)
+ {
+ case HO_TY_HANDOVER:
+ hoVcIpAddress_ = reVcIpAddress;
+
+ break;
+
+ case HO_TY_HANDMSC3:
+ h3VcIpAddress_ = reVcIpAddress;
+
+ break;
+
+ default:
+ //Deadly error, can't go further. Troubleshooting needed !
+ JCCLog2 ("CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ DBG_ERROR ("CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ location_rejected = true;
+ return (0);
+ }
+ }
+
+ if (location_rejected)
+ {
+ // Do Nothing
+ JCCLog2 ("VOIP->CC Error: Ip Address failed (hoType %d, hoState %d)\n",
+ hoType_, hoState_);
+ JCCLog("Check if an adjacent vipercell is down, but radio is powered on.\n");
+ DBG_ERROR ("VOIP->CC Error: Ip Address failed (hoType %d, hoState %d)\n",
+ hoType_, hoState_);
+ DBG_ERROR("Check if an adjacent vipercell is down, but radio is powered on.\n");
+
+ // Give up this ho or h3 effort wait for next Handover Required message.
+ if (hoType_==HO_TY_HANDOVER)
+ initData();
+ else
+ initHandmsc3Data();
+ }else
+ {
+ JCCLog3 ("VOIP->CC Log: (hoType %d, hoState %d) (Ip Address = %d) returned.\n",
+ hoType_, hoState_,
+ reVcIpAddress);
+ DBG_TRACE ("VOIP->CC Log: (hoType %d, hoState %d) (Ip Address = %d) returned.\n",
+ hoType_, hoState_,
+ reVcIpAddress);
+
+ // VC IP Address Request was sent out.
+ currEvent = HC_VB_GET_VC_ADDRESS_RSP;
+
+ DBG_LEAVE();
+ return (smHandleEvent());
+ }
+
+ DBG_LEAVE();
+ return(0);
+ }
+
+ //RETRY<xxu:04-25-00> BEGIN
+ int
+ CCHandover::getNextHoCandidate(void)
+ {
+ int i;
+ IntraL3HandoverRequired_t *inMsg = &handReqd;
+
+ DBG_FUNC("CCHandover::getNextHoCandidate", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // Assume all the candidates are already sorted in terms of perference
+ // Make sure a candidate to try is a valid one
+ for (i=0;i<inMsg->numCandidates;i++)
+ {
+ // xxuTbdHo: multiple VBs ie networkId
+
+ DBG_TRACE("TRACE-getNextHoCandidate: Cand MCC %x%x%x MNC %x%x%x Lac %d Ci %d IsExtern %d IsTried %d\n",
+ inMsg->candGlobalCellId[i].candGlobalCellId.mcc[0], inMsg->candGlobalCellId[i].candGlobalCellId.mcc[1], inMsg->candGlobalCellId[i].candGlobalCellId.mcc[2],
+ inMsg->candGlobalCellId[i].candGlobalCellId.mnc[0], inMsg->candGlobalCellId[i].candGlobalCellId.mnc[1], inMsg->candGlobalCellId[i].candGlobalCellId.mnc[2],
+ inMsg->candGlobalCellId[i].candGlobalCellId.lac, inMsg->candGlobalCellId[i].candGlobalCellId.ci, inMsg->candGlobalCellId[i].candIsExternal,
+ inMsg->candGlobalCellId[i].candIsTried);
+
+ if ((isEqualGlobalCellId(&(inMsg->candGlobalCellId[i].candGlobalCellId), &MY_GLOBALCELL_ID) == false) &&
+ (inMsg->candGlobalCellId[i].candIsTried == FALSE))
+ {
+ inMsg->candGlobalCellId[i].candIsTried = true;
+ // Found an untried candidate that is not myself, so break out of for loop.
+ break;
+ }
+ else
+ {
+ DBG_WARNING("RR->CC Alert: %th of (numCandidates %d) in handReqd msg is self\n",
+ i, inMsg->numCandidates);
+ }
+ }
+
+ if (i>=inMsg->numCandidates)
+ {
+ DBG_ERROR ("RR->CC Error: look for next candidate, all of (numCandidates = %d) are bad \n",
+ inMsg->numCandidates);
+ DBG_LEAVE();
+ return (-1);
+ }
+
+ DBG_LEAVE();
+ return (i);
+ }
+ //RETRY<xxu:04-25-00> END
+
+
+//ext-HO <xxu:05-22-01>
+int
+CCHandover::handleHoaCcMsg(InterHoaVcMsg_t *hoaCcInMsg)
+{
+ DBG_TRACEho("{\nMNEThoTRACE(ho::handleHoaCcMsg): entering......\n}\n");
+
+ hoaInMsg = hoaCcInMsg;
+
+ switch (hoaInMsg->msgType)
+ {
+ case INTER_EHO_PERFORM_HANDOVER_REQUEST:
+ currEvent = HAND_PERFORM_HO_REQ;
+ break;
+
+ case INTER_EHO_PERFORM_HANDOVER_ACK:
+ if (hoaCcInMsg->msgData.perfExtHandoverAck.reason)
+ currEvent = HAND_PERFORM_HO_NACK;
+ else
+ currEvent = HAND_PERFORM_HO_ACK;
+
+ break;
+
+ case INTER_EHO_END_HANDOVER:
+ currEvent = HAND_END_HO;
+ break;
+
+ case INTER_EHO_HANDOVER_ACCESS:
+ currEvent = HAND_HO_ACCESS;
+ break;
+
+ case INTER_EHO_HANDOVER_SUCCESS:
+ currEvent = HAND_COMPLT_HO;
+ break;
+
+ case INTER_EHO_HANDOVER_MOB_EVENT:
+ // <tyy:6-29-01> POSTMOB
+ // Check DTAP 1st byte of Distribution Data Unit (Discrimination)
+ if (hoaInMsg->msgData.postExtHoMobEventData.LAYER3PDU.LAYER3DATA[0] & 0x01 == 1)
+ {
+ if (parent->handoverSession == parent->targetHandoverSessionExtHo)
+ currEvent = HAND_POSTHO_HOA_EVENT;
+ else
+ currEvent = HAND_POSTHO_MOB_EVENT;
+ }
+ else { // If it's a BSSMAP message instead then check for detect or failure
+ if (hoaInMsg->msgData.postExtHoMobEventData.LAYER3PDU.LAYER3DATA[2] == A_HANDOVER_DETECT_TYPE)
+ currEvent = HAND_HO_ACCESS;
+ else if (hoaInMsg->msgData.postExtHoMobEventData.LAYER3PDU.LAYER3DATA[2] == A_HANDOVER_FAILURE_TYPE)
+ currEvent = HAND_SRC_HO_FAIL;
+ else
+ {
+ DBG_ERRORho("{\nMNEThoWARNING(ho::handleHoaCcMsg): Unexpected (A-Int MsgType %d) in MOB Event from HOA\n}\n",
+ hoaInMsg->msgData.postExtHoMobEventData.LAYER3PDU.LAYER3DATA[2]);
+ currEvent = JCC_NULL_EVENT;
+ }
+ }
+ break;
+
+ case INTER_EHO_PERFORM_HANDBACK_REQUEST:
+ currEvent = HAND_PERFORM_HO_REQ;
+ break;
+
+ case INTER_EHO_PERFORM_HANDBACK_ACK:
+ if (hoaCcInMsg->msgData.perfExtHandbackAck.reason)
+ currEvent = HAND_PERFORM_HO_NACK;
+ else
+ currEvent = HAND_PERFORM_HO_ACK;
+ break;
+
+ case INTER_EHO_COMPLETE_HANDBACK:
+ currEvent = HAND_COMPLT_HO;
+
+ default:
+ DBG_ERRORho("{\nMNEThoWARNING(ho::handleHoaCcMsg): Unexpected (msgType = %d) from HOA\n}\n",
+ hoaInMsg->msgType);
+ currEvent = JCC_NULL_EVENT;
+
+ }
+
+ if (currEvent != JCC_NULL_EVENT)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(ho::handleHoaCcMsg): received a HOA msg (msgType=%d, event=%d, callId=%d)\n}\n",
+ hoaInMsg->msgType, currEvent, callIndex);
+ }
+
+ return(0);
+}
+
+
+// ----------------------- External Handover Methods -------------------------------
+
+ void
+ CCHandover::classmarkFill( T_AIF_MSG *aifMsg )
+ {
+ DBG_FUNC("CCHandover::classmarkFill", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ aifMsg->handoverRequest.classmarkInformation1.elementIdentifier = A_CLASSMARK_INFORMATION1_TYPE;
+ aifMsg->handoverRequest.classmarkInformation1.ie_present = false;
+
+ aifMsg->handoverRequest.classmarkInformation2.elementIdentifier = A_CLASSMARK_INFORMATION2_TYPE;
+ aifMsg->handoverRequest.classmarkInformation2.ie_present = true;
+ aifMsg->handoverRequest.classmarkInformation2.length = 3;
+
+ if (parent->handoverSession == parent->anchorHandoverSession)
+ { // External handover SERVING
+ if (parent->classmark2Info.ie_present)
+ {
+ unsigned char *pclass = (unsigned char *)&aifMsg->handoverRequest.classmarkInformation2.classmark[0];
+
+ if (parent->classmark2Info.revLevel == CNI_RIL3_REV_LEVEL_PHASE2)
+ pclass[0] |= 0x20;
+ if (parent->classmark2Info.esInd == CNI_RIL3_EARLY_CLASSMARK_SENDING_IMPLEMENTED)
+ pclass[0] |= 0x10;
+ if (parent->classmark2Info.a51 == CNI_RIL3_A51_NOT_AVAILABLE)
+ pclass[0] |= 0x08;
+
+ pclass[0] |= parent->classmark2Info.rfPowerCap;
+
+ if (parent->classmark2Info.psCap == CNI_RIL3_PS_CAPABILITY_PRESENT)
+ pclass[1] |= 0x40;
+ if (parent->classmark2Info.ssScreening == CNI_RIL3_SS_SCREENING_PHASE2)
+ pclass[1] |= 0x10;
+ if (parent->classmark2Info.smCap == CNI_RIL3_SM_MT_PTP_SUPPORTED)
+ pclass[1] |= 0x08;
+ if (parent->classmark2Info.vbsReception == CNI_RIL3_VBS_NOTIFICATION_WANTED)
+ pclass[1] |= 0x04;
+ if (parent->classmark2Info.vgcsReception == CNI_RIL3_VGCS_NOTIFICATION_WANTED)
+ pclass[1] |= 0x02;
+ if (parent->classmark2Info.fcFreqCap == CNI_RIL3_GSM_EXTENTION_BAND_G1_SUPPORTED)
+ pclass[1] |= 0x01;
+ if (parent->classmark2Info.classmark3 == CNI_RIL3_CLASSMARK3_INFO_AVAILABLE)
+ pclass[2] |= 0x80;
+ if (parent->classmark2Info.cmsp == CNI_RIL3_NETWORK_INITIATED_MO_SUPPORTED)
+ pclass[2] |= 0x04;
+ if (parent->classmark2Info.a53 == CNI_RIL3_A53_AVAILABLE)
+ pclass[2] |= 0x02;
+ if (parent->classmark2Info.a52 == CNI_RIL3_A52_AVAILABLE)
+ pclass[2] |= 0x01;
+ }
+ else
+ {
+ DBG_ERROR("Error@classmarkFill: Classmark2Info ie NOT present. Filling with default values.\n");
+ // Classmark 2 Default values (see 04.08 section 10.5.1.6 Mobile Station Classmark 6)
+ // - Revision = phase 2 MS
+ // - "Controlled Early classmark sending" option is NOT implemented in the MS
+ // - Encryption algorithm A5/1 AVAILABLE
+ // - PCS 1900 CLASS 3
+ // - Pseudo-synchronization capability NOT present
+ // - Suplementary Service screening indicator = 0
+ // - SM capability SUPPORTED
+ // - VBS, VGCS, CM3, LCS VA, SoLSA, CMSP, A5/3 all NOT supported
+ // - Frequency capability = 0
+ // - A5/2 algorithm SUPPORTED
+
+ aifMsg->handoverRequest.classmarkInformation2.classmark[0] = 0x22;
+ aifMsg->handoverRequest.classmarkInformation2.classmark[1] = 0x08;
+ aifMsg->handoverRequest.classmarkInformation2.classmark[2] = 0x01;
+ }
+ }
+ else
+ { // External handover TARGET
+ aifMsg->handoverRequest.classmarkInformation2 = currClassmark_;
+ }
+
+ aifMsg->handoverRequest.classmarkInformation3.elementIdentifier = A_CLASSMARK_INFORMATION3_TYPE;
+ aifMsg->handoverRequest.classmarkInformation3.ie_present = false;
+
+ DBG_LEAVE();
+ }
+
+ void
+ CCHandover::channelTypeFill( T_AIF_MSG *aifMsg )
+ {
+ int i;
+ int version_count = 0;
+ TwoPartyCallLeg *whichLeg;
+ T_CNI_RIL3_SPEECH_VERSION version;
+
+ aifMsg->handoverRequest.channelType.elementIdentifier = A_CHANNEL_TYPE_TYPE;
+ aifMsg->handoverRequest.channelType.ie_present = true;
+
+ aifMsg->handoverRequest.channelType.speechDataIndicator = 1; // Speech
+ aifMsg->handoverRequest.channelType.channelRateAndType = 8; // Full rate TCH channel Bm
+
+ if (parent->handoverSession == parent->anchorHandoverSession)
+ { // External handover SERVING
+ whichLeg = parent->activeLeg();
+
+ for (i=0; i<3; i++)
+ {
+ if (whichLeg->msSide->bearCap1speechVersionInd_[i].fieldPresent)
+ {
+ version = whichLeg->msSide->bearCap1speechVersionInd_[i].version;
+
+ if (version == CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1) {
+ aifMsg->handoverRequest.channelType.permittedIndicator[version_count] = 0x01; // NOTE: This is actually GSM VERSION 1 in 08.08 spec (full rate FR)
+ version_count ++;
+ } else if (version == CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_2) {
+ aifMsg->handoverRequest.channelType.permittedIndicator[version_count] = 0x21; // NOTE: This is actually GSM VERSION 3 in 08.08 spec (full rate AMR)
+ version_count ++;
+ } else if (version == CNI_RIL3_GSM_HALF_RATE_SPEECH_VERSION_1) {
+ aifMsg->handoverRequest.channelType.permittedIndicator[version_count] = 0x05; // NOTE: This is actually GSM VERSION 3 in 08.08 spec (full rate AMR)
+ version_count ++;
+ } else
+ {
+ DBG_ERRORho("CCHandover::channelTypeFill -- Version content error (version=%d)\n", version);
+ }
+ }
+ }
+ }
+ else
+ { // External handover TARGET
+ if (currSpeechCh_.version = CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1)
+ {
+ aifMsg->handoverRequest.channelType.permittedIndicator[0] = 0x01;
+ }
+ else if (currSpeechCh_.version = CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_2)
+ {
+ aifMsg->handoverRequest.channelType.permittedIndicator[0] = 0x21;
+ }
+ else if (currSpeechCh_.version = CNI_RIL3_GSM_HALF_RATE_SPEECH_VERSION_1)
+ {
+ aifMsg->handoverRequest.channelType.permittedIndicator[0] = 0x05;
+ }
+ else
+ {
+ DBG_ERRORho("CCHandover::channelTypeFill -- Version content error (version=%d)\n", version);
+ }
+ version_count = 1;
+ }
+
+ switch (version_count)
+ {
+ case 1:
+ aifMsg->handoverRequest.channelType.length = 3;
+ break;
+
+ case 2:
+ aifMsg->handoverRequest.channelType.length = 4;
+ aifMsg->handoverRequest.channelType.permittedIndicator[0] |= 0x80; // Set extension bit 8
+ break;
+
+ case 3:
+ aifMsg->handoverRequest.channelType.length = 5;
+ aifMsg->handoverRequest.channelType.permittedIndicator[0] |= 0x80; // Set extension bit 8
+ aifMsg->handoverRequest.channelType.permittedIndicator[1] |= 0x80; // Set extension bit 8
+ break;
+
+ case 0:
+ default:
+ DBG_ERRORho("CCHandover::channelTypeFill -- Content error (i=%d)\n", i);
+ aifMsg->handoverRequest.channelType.length = 3;
+ aifMsg->handoverRequest.channelType.permittedIndicator[0] = 0x21;
+ }
+ }
+
+ void
+ CCHandover::currentChannelTypeFill( T_AIF_MSG *aifMsg )
+ {
+ aifMsg->handoverRequest.currentChannelType1.elementIdentifier = A_CURRENT_CHANNEL_TYPE1_TYPE;
+ aifMsg->handoverRequest.currentChannelType1.ie_present = true;
+ aifMsg->handoverRequest.currentChannelType1.channelMode = 1; // Speech
+ aifMsg->handoverRequest.currentChannelType1.channel = 8; // Full rate TCH channel Bm
+ }
+
+ unsigned char
+ CCHandover::findGpCipheringCapability(void)
+ {
+ DBG_FUNC("CCHandover::findGpCipheringCapability", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ unsigned char ciphCap=0;
+
+ if (RM_DSPA51(rm_DspCiphCap)) ciphCap |= 0x02;
+ if (RM_DSPA52(rm_DspCiphCap)) ciphCap |= 0x04;
+
+ if (ciphCap)
+ ciphCap &= 0xFE;
+ else
+ ciphCap = 1; // No Encryption
+
+ DBG_TRACE("INFO@findGpCipheringCapability (ciphCap=0x%x)\n",ciphCap);
+ DBG_LEAVE();
+ return(ciphCap);
+ }
+
+ void
+ CCHandover::encryptionInformationFill( T_AIF_MSG *aifMsg )
+ {
+ IntraL3CipherModeCommand_t cipherCmd;
+
+ if (parent->handoverSession == parent->anchorHandoverSession)
+ { // External handover SERVING
+ if (ludbGetCipherAlgo(parent->ludbIndex, &cipherCmd))
+ {
+ DBG_ERRORho (" WARNING: ludbGetCipherAlgo() failed, (ludbIndex = %d)\n",
+ parent->ludbIndex);
+ cipherCmd.cmd.cipherModeSetting.ie_present = true;
+ cipherCmd.cmd.cipherModeSetting.ciphering = CNI_RIl3_CIPHER_NO_CIPHERING;
+ }
+ }
+ else
+ { // External handover TARGET
+ cipherCmd = currEncrypt_;
+ }
+
+ aifMsg->handoverRequest.encryptionInformation.elementIdentifier = A_ENCRYPTION_INFORMATION_TYPE;
+ if (cipherCmd.cmd.cipherModeSetting.ie_present)
+ {
+ aifMsg->handoverRequest.encryptionInformation.ie_present = true;
+ aifMsg->handoverRequest.encryptionInformation.length = 9;
+ if (cipherCmd.cmd.cipherModeSetting.ciphering == CNI_RIl3_CIPHER_NO_CIPHERING)
+ {
+ aifMsg->handoverRequest.encryptionInformation.permittedAlgorithm = 1; // No encryption
+ }
+ else
+ {
+ aifMsg->handoverRequest.encryptionInformation.permittedAlgorithm = findGpCipheringCapability();
+ }
+
+ memcpy( (unsigned char*)aifMsg->handoverRequest.encryptionInformation.key,
+ (unsigned char*)cipherCmd.Kc, CIPHER_KC_LEN);
+ }
+ else
+ {
+ aifMsg->handoverRequest.encryptionInformation.ie_present = true;
+ aifMsg->handoverRequest.encryptionInformation.permittedAlgorithm = 1; // No Ciphering
+ aifMsg->handoverRequest.encryptionInformation.length = 9;
+ };
+ }
+
+ void
+ CCHandover::currentEncryptionAlgorithmFill( T_AIF_MSG *aifMsg )
+ {
+ IntraL3CipherModeCommand_t cipherCmd;
+
+ if (parent->handoverSession == parent->anchorHandoverSession)
+ { // External handover SERVING
+ if (ludbGetCipherAlgo(parent->ludbIndex, &cipherCmd))
+ {
+ DBG_ERRORho (" WARNING: ludbGetCipherAlgo() failed, (ludbIndex = %d)\n",
+ parent->ludbIndex);
+ cipherCmd.cmd.cipherModeSetting.ie_present = true;
+ cipherCmd.cmd.cipherModeSetting.ciphering = CNI_RIl3_CIPHER_NO_CIPHERING;
+ }
+ }
+ else
+ { // External handover TARGET
+ cipherCmd = currEncrypt_;
+ }
+
+ aifMsg->handoverRequest.chosenEncryptAlgorithmServing.elementIdentifier = A_CHOSEN_ENCRYPTION_ALGORITHM_TYPE;
+ if (cipherCmd.cmd.cipherModeSetting.ie_present)
+ {
+ aifMsg->handoverRequest.chosenEncryptAlgorithmServing.ie_present = true;
+ if (cipherCmd.cmd.cipherModeSetting.ciphering == CNI_RIl3_CIPHER_NO_CIPHERING)
+ {
+ aifMsg->handoverRequest.chosenEncryptAlgorithmServing.algorithmId = 1; // No encryption
+ }
+ else
+ {
+ switch (cipherCmd.cmd.cipherModeSetting.algorithm)
+ {
+ case CNI_RIL3_CIPHER_ALGORITHM_A51:
+ {
+ aifMsg->handoverRequest.chosenEncryptAlgorithmServing.algorithmId = 0x02; // GSM A5/1
+ break;
+ }
+
+ case CNI_RIL3_CIPHER_ALGORITHM_A52:
+ {
+ aifMsg->handoverRequest.chosenEncryptAlgorithmServing.algorithmId = 0x03; // GSM A5/2
+ break;
+ }
+
+ case CNI_RIL3_CIPHER_ALGORITHM_A53:
+ {
+ aifMsg->handoverRequest.chosenEncryptAlgorithmServing.algorithmId = 0x04; // GSM A5/3
+ break;
+ }
+
+ case CNI_RIL3_CIPHER_ALGORITHM_A54:
+ {
+ aifMsg->handoverRequest.chosenEncryptAlgorithmServing.algorithmId = 0x05; // GSM A5/4
+ break;
+ }
+
+ case CNI_RIL3_CIPHER_ALGORITHM_A55:
+ {
+ aifMsg->handoverRequest.chosenEncryptAlgorithmServing.algorithmId = 0x06; // GSM A5/5
+ break;
+ }
+
+ case CNI_RIL3_CIPHER_ALGORITHM_A56:
+ {
+ aifMsg->handoverRequest.chosenEncryptAlgorithmServing.algorithmId = 0x07; // GSM A5/6
+ break;
+ }
+
+ case CNI_RIL3_CIPHER_ALGORITHM_A57:
+ {
+ aifMsg->handoverRequest.chosenEncryptAlgorithmServing.algorithmId = 0x08; // GSM A5/7
+ break;
+ }
+ }
+
+ aifMsg->handoverRequest.chosenEncryptAlgorithmServing.algorithmId = findGpCipheringCapability();
+ }
+ }
+ else
+ {
+ aifMsg->handoverRequest.chosenEncryptAlgorithmServing.ie_present = true;
+ aifMsg->handoverRequest.chosenEncryptAlgorithmServing.algorithmId = 1; // No Ciphering
+ };
+ }
+
+ void
+ CCHandover::populateAHandoverRequest(GlobalCellId_t *serving_cell, GlobalCellId_t *target_cell)
+ {
+ memset( (char*)&aifMsg, 0, sizeof(T_AIF_MSG));
+ aifMsg.header.msgType = A_HANDOVER_REQUEST_TYPE;
+
+ // Mandatory A-interface parameters
+ channelTypeFill( &aifMsg );
+ encryptionInformationFill( &aifMsg );
+ classmarkFill( &aifMsg );
+
+ aifMsg.handoverRequest.cellIdentifierTarget.elementIdentifier = A_CELL_IDENTIFIER_TYPE;
+ aifMsg.handoverRequest.cellIdentifierTarget.ie_present = true;
+ aifMsg.handoverRequest.cellIdentifierTarget.length = 8;
+ aifMsg.handoverRequest.cellIdentifierTarget.cellIdDescriminator = 0; // The whole Cell Global Id is used
+ memcpy ((unsigned char *) aifMsg.handoverRequest.cellIdentifierTarget.mcc,
+ (char *) target_cell->mcc,
+ NUM_MCC_DIGITS);
+ memcpy ((unsigned char *) aifMsg.handoverRequest.cellIdentifierTarget.mnc,
+ (char *) target_cell->mnc,
+ NUM_MNC_DIGITS);
+ aifMsg.handoverRequest.cellIdentifierTarget.lac = target_cell->lac;
+ aifMsg.handoverRequest.cellIdentifierTarget.ci = target_cell->ci;
+
+
+ aifMsg.handoverRequest.cellIdentifierServing.elementIdentifier = A_CELL_IDENTIFIER_TYPE;
+ aifMsg.handoverRequest.cellIdentifierServing.ie_present = true;
+ aifMsg.handoverRequest.cellIdentifierServing.length = 8;
+ aifMsg.handoverRequest.cellIdentifierServing.cellIdDescriminator = 0; // The whole Cell Global Id is used
+ memcpy ((unsigned char *) aifMsg.handoverRequest.cellIdentifierServing.mcc,
+ (char *) serving_cell->mcc,
+ NUM_MCC_DIGITS);
+ memcpy ((unsigned char *) aifMsg.handoverRequest.cellIdentifierServing.mnc,
+ (char *) serving_cell->mnc,
+ NUM_MNC_DIGITS);
+ aifMsg.handoverRequest.cellIdentifierServing.lac = serving_cell->lac;
+ aifMsg.handoverRequest.cellIdentifierServing.ci = serving_cell->ci;
+
+ // Optional A-interface parameters
+ currentChannelTypeFill( &aifMsg );
+ currentEncryptionAlgorithmFill( &aifMsg );
+
+
+ DBG_TRACEho(" AIFMSG PRE-AIF PROCESSING MESSAGE DATA: A_HANDOVER_REQUEST_TYPE\n");
+ DBG_TRACEho(" {\n");
+ DBG_TRACEho(" - channelType\n");
+ DBG_TRACEho(" - speechDataIndicator=%d\n",
+ aifMsg.handoverRequest.channelType.speechDataIndicator);
+ DBG_TRACEho(" - channelRateAndType=%d\n",
+ aifMsg.handoverRequest.channelType.channelRateAndType);
+ DBG_TRACEho(" - permittedIndicator[0-7]=%x,%x,%x,%x,%x,%x,%x,%x\n",
+ aifMsg.handoverRequest.channelType.permittedIndicator[0],
+ aifMsg.handoverRequest.channelType.permittedIndicator[1],
+ aifMsg.handoverRequest.channelType.permittedIndicator[2],
+ aifMsg.handoverRequest.channelType.permittedIndicator[3],
+ aifMsg.handoverRequest.channelType.permittedIndicator[4],
+ aifMsg.handoverRequest.channelType.permittedIndicator[5],
+ aifMsg.handoverRequest.channelType.permittedIndicator[6],
+ aifMsg.handoverRequest.channelType.permittedIndicator[7]);
+ DBG_TRACEho(" - encryptionInformation (ie_present=%d)\n",
+ aifMsg.handoverRequest.encryptionInformation.ie_present);
+ DBG_TRACEho(" - permittedAlgorithm=%d\n",
+ aifMsg.handoverRequest.encryptionInformation.permittedAlgorithm);
+ DBG_TRACEho(" - ciphData (ciphKey[1-8]: %x,%x,%x,%x,%x,%x,%x,%x)\n",
+ aifMsg.handoverRequest.encryptionInformation.key[0],
+ aifMsg.handoverRequest.encryptionInformation.key[1],
+ aifMsg.handoverRequest.encryptionInformation.key[2],
+ aifMsg.handoverRequest.encryptionInformation.key[3],
+ aifMsg.handoverRequest.encryptionInformation.key[4],
+ aifMsg.handoverRequest.encryptionInformation.key[5],
+ aifMsg.handoverRequest.encryptionInformation.key[6],
+ aifMsg.handoverRequest.encryptionInformation.key[7]);
+ DBG_TRACEho(" - classmarkInformation2\n");
+ DBG_TRACEho(" - classmark[0-2]: %x,%x,%x\n",
+ aifMsg.handoverRequest.classmarkInformation2.classmark[0],
+ aifMsg.handoverRequest.classmarkInformation2.classmark[1],
+ aifMsg.handoverRequest.classmarkInformation2.classmark[2]);
+ DBG_TRACEho(" - cellIdentifierTarget\n");
+ DBG_TRACEho(" - cellIdDescriminator=%d\n",
+ aifMsg.handoverRequest.cellIdentifierTarget.cellIdDescriminator);
+ DBG_TRACEho(" - cellIdentifierTarget.mcc[0-2]: %x%x%x\n",
+ aifMsg.handoverRequest.cellIdentifierTarget.mcc[0],
+ aifMsg.handoverRequest.cellIdentifierTarget.mcc[1],
+ aifMsg.handoverRequest.cellIdentifierTarget.mcc[2]);
+ DBG_TRACEho(" - cellIdentifierTarget.mnc[0-2]: %x%x%x\n",
+ aifMsg.handoverRequest.cellIdentifierTarget.mnc[0],
+ aifMsg.handoverRequest.cellIdentifierTarget.mnc[1],
+ aifMsg.handoverRequest.cellIdentifierTarget.mnc[2]);
+ DBG_TRACEho(" - lac=%d\n",
+ aifMsg.handoverRequest.cellIdentifierTarget.lac);
+ DBG_TRACEho(" - ci=%d\n",
+ aifMsg.handoverRequest.cellIdentifierTarget.ci);
+ DBG_TRACEho(" - cellIdentifierServing\n");
+ DBG_TRACEho(" - cellIdDescriminator=%d\n",
+ aifMsg.handoverRequest.cellIdentifierServing.cellIdDescriminator);
+ DBG_TRACEho(" - cellIdentifierServing.mcc[0-2]: %x%x%x\n",
+ aifMsg.handoverRequest.cellIdentifierServing.mcc[0],
+ aifMsg.handoverRequest.cellIdentifierServing.mcc[1],
+ aifMsg.handoverRequest.cellIdentifierServing.mcc[2]);
+ DBG_TRACEho(" - cellIdentifierServing.mnc[0-2]: %x%x%x\n",
+ aifMsg.handoverRequest.cellIdentifierServing.mnc[0],
+ aifMsg.handoverRequest.cellIdentifierServing.mnc[1],
+ aifMsg.handoverRequest.cellIdentifierServing.mnc[2]);
+ DBG_TRACEho(" - lac=%d\n",
+ aifMsg.handoverRequest.cellIdentifierServing.lac);
+ DBG_TRACEho(" - ci=%d\n",
+ aifMsg.handoverRequest.cellIdentifierServing.ci);
+ DBG_TRACEho(" - currentChannelType1\n");
+ DBG_TRACEho(" - channelMode=%d\n",
+ aifMsg.handoverRequest.currentChannelType1.channelMode);
+ DBG_TRACEho(" - channel=%d\n",
+ aifMsg.handoverRequest.currentChannelType1.channel);
+
+ DBG_TRACEho("\n aifMsg hexdump: ");
+ DBG_HEXDUMPho((unsigned char*) &aifMsg, sizeof (T_AIF_MSG) );
+ DBG_TRACEho("\n }\n");
+ }
+
+ int
+ CCHandover::selectEncryption(void)
+ {
+ DBG_FUNC("CCHandover::selectEncryption", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ int ret_val = -1;
+
+ if (optCurrEncrypt_.ie_present)
+ {
+ switch (optCurrEncrypt_.algorithmId)
+ {
+ case 0x01: // No encryption
+ ret_val = -1;
+ break;
+
+ case 0x02: // A51 algorithm
+ if RM_DSPA51(rm_DspCiphCap)
+ ret_val = CNI_RIL3_CIPHER_ALGORITHM_A51;
+ else
+ ret_val = -1;
+ break;
+
+ case 0x03: // A52 algorithm
+ if RM_DSPA52(rm_DspCiphCap)
+ ret_val = CNI_RIL3_CIPHER_ALGORITHM_A52;
+ else
+ ret_val = -1;
+ break;
+
+ default:
+ ret_val = -1;
+ }
+ }
+ else
+ {
+ ret_val = -1; // No encryption
+ }
+
+ DBG_TRACE("INFO@selectEncryption (ret_val=%d)\n",ret_val);
+ DBG_LEAVE();
+ return (ret_val);
+ }
+
+ int
+ CCHandover::selectChannelType(void)
+ {
+ DBG_FUNC("CCHandover::selectChannelType", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ int ret_val = -1;
+ int i;
+
+ for (i=0;i<8;i++)
+ {
+ if ((aifMsg.handoverRequest.channelType.permittedIndicator[i] & 0x7F) == 0x21)
+ {
+ ret_val = CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_2;
+ break;
+ }
+
+ if ((aifMsg.handoverRequest.channelType.permittedIndicator[i] & 0x7F) == 0x01)
+ {
+ ret_val = CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1;
+ // Don't break -- want to search through entire list for Version 2 preference
+ }
+
+ if ((aifMsg.handoverRequest.channelType.permittedIndicator[i] & 0x7F) == 0x05)
+ {
+ ret_val = CNI_RIL3_GSM_HALF_RATE_SPEECH_VERSION_1;
+ // Don't break -- want to search through entire list for Version 2 preference
+ }
+ }
+
+ DBG_TRACE("INFO@selectChannelType (ret_val=%d)\n",ret_val);
+ DBG_LEAVE();
+ return (ret_val);
+ }
+
+
diff --git a/data/mnet/GP10/Host/cc/src/CCHndUtil.cpp b/data/mnet/GP10/Host/cc/src/CCHndUtil.cpp
new file mode 100644
index 0000000..60ba22d
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CCHndUtil.cpp
@@ -0,0 +1,168 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCHndUtil.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 05-01-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "CC/CCHalfCall.h"
+
+#include "CC/CCInt.h"
+
+#include "logging/VCLOGGING.h"
+
+#include "jcc/JCCLog.h"
+
+#include "defs.h"
+#include "oam_api.h"
+
+//GCELL<tyu:06-01-01> BEGIN
+extern GlobalCellId_t MY_GLOBALCELL_ID;
+//GCELL<tyu:06-01-01> END
+
+#include "pm/pm_class.h"
+
+#include "csunew/csu_head.h"
+
+#include "CC/hortp.h"
+
+#include "CC/CCHandover.h"
+
+
+void
+CCHandover::sendVcMsg(JcModuleId_t origModule,
+ JcModuleId_t destModule)
+{
+ DBG_FUNC("CCHandover::sendVcMsg", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ vcOutMsg.origModuleId = origModule;
+ vcOutMsg.origSubId = callIndex;
+//GCELL<tyu:06-01-01> BEGIN
+ vcOutMsg.origVcId.cellId = MY_GLOBALCELL_ID.ci;
+ vcOutMsg.origVcId.networkId = MY_GLOBALCELL_ID.lac;
+//GCELL<tyu:06-01-01> END
+ // lac setting
+ vcOutMsg.origVcAddress = MY_VIPERCELL_IP_ADDRESS;
+
+//GCELL<tyu:06-01-01> BEGIN
+ vcOutMsg.destVcId.cellId = hoGlobalCellId_.ci;
+ vcOutMsg.destVcId.networkId = hoGlobalCellId_.lac;
+//GCELL<tyu:06-01-01> END
+ vcOutMsg.destVcAddress = hoVcIpAddress_;
+ vcOutMsg.destModuleId = destModule;
+ vcOutMsg.destSubId = hoVcCallIndex_;
+
+ // send the message.
+ if (! JcMsgSendToVipercell(&vcOutMsg) )
+ {
+ JCCLog1("CC Call Ho Error : sendVcMsg (dest Vipercell Address = %d) error\n ",
+ vcOutMsg.destVcAddress);
+ DBG_ERROR("CC Call Ho Error : sendVcMsg (dest Vipercell Address = %d) error\n ",
+ vcOutMsg.destVcAddress);
+ }
+ else
+ {
+ // peg here when we are successful
+ switch (vcOutMsg.msgType)
+ {
+ case INTER_VC_CC_PERFORM_HANDOVER:
+ case INTER_VC_CC_PERFORM_HANDBACK:
+ PM_CCMeasurement.attOutgoingInterMSCHDOs.increment();
+ break;
+
+ case INTER_VC_CC_COMPLETE_HANDOVER:
+ case INTER_VC_CC_COMPLETE_HANDBACK:
+ PM_CCMeasurement.succIncomingInterMSCHDOs.increment();
+ break;
+
+ default:
+ break;
+ }
+
+
+ JCCLog2("CC Call Ho Log: Sent Message to (VC# = %d) with (ip address = %d)\n",
+ vcOutMsg.destVcId.cellId,
+ vcOutMsg.destVcAddress);
+
+ DBG_TRACE("CC Call Ho Log: Sent Message to (VC# = %d) with (ip address = %d)\n",
+ vcOutMsg.destVcId.cellId,
+ vcOutMsg.destVcAddress);
+ }
+ DBG_LEAVE();
+}
+
+
+//HO<xxu:01-24-00>used to send message to MSC-B'
+void
+CCHandover::sendVcMsgH3(JcModuleId_t origModule,
+ JcModuleId_t destModule)
+{
+ DBG_FUNC("CCHandover::sendVcMsgH3", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ vcOutMsg.origModuleId = origModule;
+ vcOutMsg.origSubId = callIndex;
+//GCELL<tyu:06-01-01> BEGIN
+ vcOutMsg.origVcId.cellId = MY_GLOBALCELL_ID.ci;
+ vcOutMsg.origVcId.networkId = MY_GLOBALCELL_ID.lac;
+//GCELL<tyu:06-01-01> END
+ vcOutMsg.origVcAddress = MY_VIPERCELL_IP_ADDRESS;
+
+//GCELL<tyu:06-01-01> BEGIN
+ vcOutMsg.destVcId.cellId = h3GlobalCellId_.ci;
+ vcOutMsg.destVcId.networkId = h3GlobalCellId_.lac;
+//GCELL<tyu:06-01-01> END
+ vcOutMsg.destVcAddress = h3VcIpAddress_;
+ vcOutMsg.destModuleId = destModule;
+ vcOutMsg.destSubId = h3VcCallIndex_;
+
+ // send the message.
+ if (! JcMsgSendToVipercell(&vcOutMsg) )
+ {
+ JCCLog1("CC Error(JCC) : sendVcMsgH3 (dest Vipercell Address = %d) error\n ",
+ vcOutMsg.destVcAddress);
+ DBG_ERROR("CC Error(JCC) : sendVcMsgH3 (dest Vipercell Address = %d) error\n ",
+ vcOutMsg.destVcAddress);
+ }
+ else
+ {
+ // peg here when we are successful
+ switch (vcOutMsg.msgType)
+ {
+ case INTER_VC_CC_PERFORM_HANDOVER:
+ case INTER_VC_CC_PERFORM_HANDBACK:
+ PM_CCMeasurement.attOutgoingInterMSCHDOs.increment();
+ break;
+
+ default:
+ break;
+ }
+
+ JCCLog2("CC Call Log (JCC): Sent Message to (VC# = %d) with (ip address = %d)\n",
+ vcOutMsg.destVcId.cellId,
+ vcOutMsg.destVcAddress);
+
+ DBG_TRACE("CC Call Log (JCC): Sent Message to (VC# = %d) with (ip address = %d)\n",
+ vcOutMsg.destVcId.cellId,
+ vcOutMsg.destVcAddress);
+ }
+ DBG_LEAVE();
+}
+
+
diff --git a/data/mnet/GP10/Host/cc/src/CCHoSrcHnd.cpp b/data/mnet/GP10/Host/cc/src/CCHoSrcHnd.cpp
new file mode 100644
index 0000000..2d7a77d
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CCHoSrcHnd.cpp
@@ -0,0 +1,2922 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCHoSrcHnd.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 05-01-99
+// Description : Source Vipercell Handover Event handlers
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+
+//
+
+#include "CC/CCHandover.h"
+
+#include "CC/CCSessionHandler.h"
+
+#include "CC/CCUtil.h"
+
+#include "CC/CallConfig.h"
+#include "CC/CCInt.h"
+#include "CC/CCH323Util.h"
+
+#include "jcc/JCCLog.h"
+#include "logging/VCLOGGING.h"
+
+#include "stdio.h"
+
+// Temporarily use csu_head instead of csu_intf
+#include "csunew/csu_head.h"
+
+#include "CC/hortp.h"
+
+#include "lapdm/cni_debug.h"
+
+#include "logging/VCLOGGING.h"
+
+#include "strLib.h"
+
+#include "string.h"
+
+#include "pm/pm_class.h"
+
+#include "voip/vblink.h"
+
+//ext-HO <chenj:05-29-01>
+#include "voip/exchangeho.h"
+#include "CC/A_Handover_Request_Msg.h"
+
+//CDR <xxu:08-22-00> BEGIN
+#include "CDR/CdrVoiceCall.h"
+extern BtsBasicPackage ccBtsBasicPackage;
+extern AdjacentCellPackage ccAdjacentCellPackage;
+
+//CDR <xxu:08-22-00> END
+
+//GCELL<tyu:06-01-01> BEGIN
+extern GlobalCellId_t MY_GLOBALCELL_ID;
+const GlobalCellId_t OTHER_GLOBALCELL_ID_DEF_VAL = {0, {'0','0','0'}, {'0','0','0'}, 1, 1};
+
+GlobalCellId_t ccHoTrgGlobalCellId = OTHER_GLOBALCELL_ID_DEF_VAL;
+//GCELL<tyu:06-01-01> END
+
+
+bool forcedHandover = false;
+
+bool useViperBase = false;
+
+bool forcedHandmsc3 = false;
+
+UINT32 ccHoTrgCellIpAddress = inet_addr(GetViperCellIpAddress());
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+ //CIPH<xxu:02-10-00>
+ int ludbGetCipherAlgo(short ludbIndex, IntraL3CipherModeCommand_t *cipherCmd);
+
+ void
+ forcedHandoverOn (void)
+ {
+ forcedHandover = true;
+ }
+
+ void
+ forcedHandoverOff (void)
+ {
+ forcedHandover = false;
+ }
+
+ void
+ forcedHandmsc3On (void)
+ {
+ forcedHandmsc3 = true;
+ }
+
+ void
+ forcedHandmsc3Off (void)
+ {
+ forcedHandmsc3 = false;
+ }
+
+ void
+ useViperBaseOn (void)
+ {
+ useViperBase = true;
+ }
+
+ void
+ useViperBaseOff (void)
+ {
+ useViperBase = false;
+ }
+
+//GCELL<tyu:06-01-01> BEGIN
+ void
+ setTargetCellId(short newVal)
+ {
+ ccHoTrgGlobalCellId.ci = newVal;
+ }
+
+ void
+ setTargetGlobalCellId(char mcc0, char mcc1, char mcc2, char mnc0, char mnc1, char mnc2, short lac, short ci)
+ {
+ ccHoTrgGlobalCellId.ci_disc = 0; // Whole Cell Id
+ ccHoTrgGlobalCellId.mcc[0] = mcc0;
+ ccHoTrgGlobalCellId.mcc[1] = mcc1;
+ ccHoTrgGlobalCellId.mcc[2] = mcc2;
+ ccHoTrgGlobalCellId.mnc[0] = mnc0;
+ ccHoTrgGlobalCellId.mnc[1] = mnc1;
+ ccHoTrgGlobalCellId.mnc[2] = mnc2;
+ ccHoTrgGlobalCellId.lac = lac;
+ ccHoTrgGlobalCellId.ci = ci;
+ }
+//GCELL<tyu:06-01-01> END
+
+ void
+ setTargetIpAddress(char *trgIpAddress)
+ {
+ ccHoTrgCellIpAddress = inet_addr(trgIpAddress);
+ }
+
+ //HO<xxu:02-15-00> add test code for H3
+ JCCEvent_t
+ CCAnchorHandover::handleAnchHoReqd(void)
+ {
+ int i;
+
+ DBG_FUNC("CCAnchorHandover::handleAnchHoReqd", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // get handover vipercell id
+
+ //RETRY<xxu:04-21-00> BEGIN
+ //VBLINK_API_CELL_LOCATION_REQUEST_MSG cellLocationRequest;
+ //RETRY<xxu:04-21-00> END
+
+ IntraL3HandoverRequired_t *inMsg = &rrInMsg->l3_data.handReqd;
+
+ //initData();
+
+//GCELL<tyu:06-01-01> BEGIN
+ hoGlobalCellId_ = ccHoTrgGlobalCellId;
+//GCELL<tyu:06-01-01> END
+
+ hoVcIpAddress_ = ccHoTrgCellIpAddress;
+
+ //RETRY<xxu:04-24-00> BEGIN
+ hoNextCandidate_ = false;
+ //RETRY<xxu:04-24-00> END
+
+ handReqd = *inMsg;
+
+ if (!forcedHandover)
+ {
+ if ( (i=getNextHoCandidate()) == (-1) )
+ {
+ // Ignore the message
+ JCCLog1 ("RR->CC Error: Handover Required, bad (numCandidates = %d)\n",
+ inMsg->numCandidates);
+ DBG_ERROR ("RR->CC Error: Handover Required, bad (numCandidates = %d)\n",
+ inMsg->numCandidates);
+ //initData();
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //GCELL<tyu:06-01-01> BEGIN
+ hoGlobalCellId_ = inMsg->candGlobalCellId[i].candGlobalCellId;
+
+ DBG_TRACE("CC HO Info @anch-HoReqd: #ofCand %d, candVcId(%d,%x%x%x,%x%x%x,%d,%d) ho(type %d, state %d)\n",
+ inMsg->numCandidates, i,
+ hoGlobalCellId_.mcc[0],hoGlobalCellId_.mcc[1],hoGlobalCellId_.mcc[2],
+ hoGlobalCellId_.mnc[0],hoGlobalCellId_.mnc[1],hoGlobalCellId_.mnc[2],
+ hoGlobalCellId_.lac, hoGlobalCellId_.ci,
+ hoType_, hoState_);
+
+
+ // ext-HO <chenj: 05-29-01>
+ if (!inMsg->candGlobalCellId[i].candIsExternal)
+ { // Candidate is internal to MNET
+
+ hoType_ = HO_TY_HANDOVER;
+
+ sprintf(&(cellLocationRequest.ViperCellId[0]), "%d:%d", hoGlobalCellId_.lac,hoGlobalCellId_.ci);
+
+ cellLocationRequest.TxnId = callIndex;
+
+ if (VBLinkLocationRequest(cellLocationRequest)
+ == false)
+ {
+ // Ignore the message
+ DBG_ERROR ("CC->VB Link Error: Failed on Cell Location Request Message\n");
+
+ initData();
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ hoState_ = HAND_ST_ANCH_VC_IP_ADDRESS_REQ;
+
+ } else { // Candidate is external to MNET
+ JCCEvent_t event_result;
+
+ hoType_ = HO_TY_EXT_HANDOVER;
+
+ // Send Perform HO to external PLMN
+ event_result = ExtPerformHO();
+ if ( event_result != CC_MESSAGE_PROCESSING_COMPLT )
+ {
+ DBG_LEAVE();
+ return event_result;
+ }
+ }
+
+ //RETRY<xxu:04-21-00> BEGIN
+ // start the VB timer
+
+ hoRetry_ = 1;
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_THO);
+ //RETRY<xxu:04-21-00> END
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+ }
+
+ else
+ {
+ if (useViperBase)
+ {
+ // ext-HO <chenj: 05-29-01>
+ if (!inMsg->candGlobalCellId[i].candIsExternal)
+ { // Candidate is internal to MNET
+ hoType_ = HO_TY_HANDOVER;
+
+ sprintf(&(cellLocationRequest.ViperCellId[0]), "%d:%d", hoGlobalCellId_.lac,hoGlobalCellId_.ci);
+
+ cellLocationRequest.TxnId = callIndex;
+
+ if (VBLinkLocationRequest(cellLocationRequest)
+ == false)
+ {
+ // Ignore the message
+ DBG_ERROR ("CC->VB Link Error: Failed on Cell Location Request Message\n");
+
+ initData();
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ DBG_TRACE("CC->VB Link Info: viperCellId[0] '%s', lac '%d', cellId '%d', callIndex '%d'\n",
+ (&cellLocationRequest.ViperCellId[0]),
+ hoGlobalCellId_.lac,
+ hoGlobalCellId_.ci,
+ cellLocationRequest.TxnId);
+
+ hoState_ = HAND_ST_ANCH_VC_IP_ADDRESS_REQ;
+
+ } else { // Candidate is external to MNET
+ JCCEvent_t event_result;
+
+ hoType_ = HO_TY_EXT_HANDOVER;
+
+ // Send Perform HO to external PLMN
+ event_result = ExtPerformHO();
+ if ( event_result != CC_MESSAGE_PROCESSING_COMPLT )
+ {
+ DBG_LEAVE();
+ return event_result;
+ }
+ }
+
+ //RETRY<xxu:04-21-00> BEGIN
+ hoRetry_ = 1;
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_THO);
+ //RETRY<xxu:04-21-00> END
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+ }
+ else
+ {
+ hoType_ = HO_TY_HANDOVER;
+ hoState_ = HAND_ST_ANCH_VC_IP_ADDRESS_REQ;
+ DBG_LEAVE();
+ return (handleVcAddressRsp());
+ }
+ }
+ }
+
+
+ JCCEvent_t
+ CCAnchorHandover::handleAnchHoFail(void)
+ {
+ IntraL3HandoverRequired_t *inMsg = &handReqd;
+
+ DBG_FUNC("CCAnchorHandover::handleAnchHoFail", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // cancel T103 timer
+ parent->sessionTimer->cancelTimer();
+
+ // Send Abort Handover to the Target ViperCell.
+
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_REVERT_TO_OLD;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ if (hoSimplexConnected_)
+ {
+ // break connection
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = hoRtpSession_;
+
+ if ((csuResult = csu_OrigTermBreakAll(&rtpSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog2("CSU Error : Ho Disconn. Failure, (Result = %d) for (rtp port = %x)\n",
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler);
+ DBG_ERROR("CSU Error : Ho Disconn. Failure, (Result = %d) for (rtp port = %x)\n",
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler);
+
+ // Can only generate OA&M log.
+ }
+
+ hoSimplexConnected_ = false;
+ }
+
+ //RETRY<xxu:04-24-00> BEGIN
+ // retry next candidate
+ int i;
+ if ( (i=getNextHoCandidate()) != (-1) )
+ {
+ //Try next candidate
+ hoNextCandidate_ = true;
+ candIndex_ = i;
+
+ //GCELL<tyu:06-01-01> BEGIN
+ hoGlobalCellId_ = inMsg->candGlobalCellId[i].candGlobalCellId;
+
+ DBG_TRACE("CC HO Info @handleAnchHoFail(ho): #ofCand %d, candVcId(%d,%x%x%x,%x%x%x,%d,%d) ho(type %d, state %d)\n",
+ inMsg->numCandidates, i,
+ hoGlobalCellId_.mcc[0],hoGlobalCellId_.mcc[1],hoGlobalCellId_.mcc[2],
+ hoGlobalCellId_.mnc[0],hoGlobalCellId_.mnc[1],hoGlobalCellId_.mnc[2],
+ hoGlobalCellId_.lac, hoGlobalCellId_.ci,
+ hoType_, hoState_);
+
+ sprintf(&(cellLocationRequest.ViperCellId[0]), "%d:%d", hoGlobalCellId_.lac,hoGlobalCellId_.ci);
+ //GCELL<tyu:06-01-01> END
+
+ cellLocationRequest.TxnId = callIndex;
+
+ if (VBLinkLocationRequest(cellLocationRequest)
+ == false)
+ {
+ // Ignore the message
+ DBG_ERROR ("CC->VB Link Error: Failed on Cell Location Request Message\n");
+
+ initData();
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ // start the VB timer
+ hoRetry_ = 0;
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_TVB);
+
+ hoState_ = HAND_ST_ANCH_VC_IP_ADDRESS_REQ;
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+ } else
+ //RETRY<xxu:04-25-00> END
+
+ {
+ //RETRY<xxu:04-25-00> BEGIN
+ //GCELL<tyu:06-01-01> END
+ DBG_TRACE("CC HO Info@handleAnchHoFail(ho): #ofCand %d, lastCandVcId(%d,%x%x%x,%x%x%x,%d,%d) ho(type %d, state %d)\n",
+ inMsg->numCandidates, candIndex_,
+ hoGlobalCellId_.mcc[0],hoGlobalCellId_.mcc[1],hoGlobalCellId_.mcc[2],
+ hoGlobalCellId_.mnc[0],hoGlobalCellId_.mnc[1],hoGlobalCellId_.mnc[2],
+ hoGlobalCellId_.lac, hoGlobalCellId_.ci,
+ hoType_, hoState_);
+ //GCELL<tyu:06-01-01> END
+ //RETRY<xxu:04-25-00> END
+
+ // Release the Ho RTP channel
+ ReleaseHandoverRtpChannel(hoRtpSession_);
+ hoRtpSession_ = NULL;
+
+ initData();
+
+ // empty the queues now that the handover failed
+ emptyRRQueue ();
+ emptyDownlinkQueue();
+ emptyMMQueue ();
+ }
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ JCCEvent_t
+ CCAnchorHandover::handleAnchDuringHoRls(void)
+ {
+ DBG_FUNC("CCAnchorHandover::handleAnchDuringHoRls", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // cancel any timers running
+ parent->sessionTimer->cancelTimer();
+
+ if (hoState_ != HAND_ST_ANCH_VC_IP_ADDRESS_REQ)
+ {
+ // Send Abort Handover to the Target ViperCell.
+
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_BASE;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ }
+
+ if (hoSimplexConnected_)
+ {
+ // break connection
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = hoRtpSession_;
+
+ if ((csuResult = csu_OrigTermBreakAll(&rtpSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+
+ JCCLog2("CSU Error : Ho Disconn. Failure, (Result = %d) for (rtp port = %x)\n",
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler);
+ DBG_ERROR("CSU Error : Ho Disconn. Failure, (Result = %d) for (rtp port = %x)\n",
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler);
+
+ // Can only generate OA&M log.
+ }
+
+ hoSimplexConnected_ = false;
+
+ }
+
+ // Release the Ho RTP channel
+ ReleaseHandoverRtpChannel(hoRtpSession_);
+ hoRtpSession_ = NULL;
+
+ initData();
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+ }
+
+
+ // utility for Mobile and Connection Resource cleanup
+ void
+ CCAnchorHandover::releaseMobAndConnRes(void)
+ {
+ DBG_FUNC("CCAnchorHandover::releaseMobAndConnRes", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ if (parent->entryId != (T_CNI_IRT_ID) JCC_UNDEFINED )
+ {
+ if (hoSimplexConnected_)
+ {
+ // Break the connections with the RF Port
+ T_CSU_PORT_ID rfSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rfSourcePort.portType = CSU_GSM_PORT;
+ rfSourcePort.portId.gsmHandler = parent->entryId;
+
+ if ((csuResult = csu_OrigTermBreakAll(&rfSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog2("CSU Error : Ho Disconn. Failure, (Result = %d) for (entryId = %d)\n",
+ csuResult,
+ parent->entryId);
+ DBG_ERROR("CSU Error : Ho Disconn. Failure, (Result = %d) for (entryId = %d)\n",
+ csuResult,
+ parent->entryId);
+
+ // Can only generate OA&M log.
+ }
+
+ hoSimplexConnected_ = false;
+
+ }
+ }
+
+ releaseMobRes();
+ DBG_LEAVE();
+ }
+
+ // utility for cleanup
+ void
+ CCAnchorHandover::releaseMobRes(void)
+ {
+ DBG_FUNC("CCAnchorHandover::releaseMobRes", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ if (parent->entryId != (T_CNI_IRT_ID) JCC_UNDEFINED )
+ {
+ // Send internal MM msg - release channel
+ sendMM(INTRA_L3_MM_REL_REQ, INTRA_L3_NULL_MSG, parent->entryId, &mmOutMsg);
+
+ // <Igal 1-6-00> Updated to standard IRT reset
+ parent->resetIrt();
+ }
+
+ parent->entryId = (T_CNI_IRT_ID) JCC_UNDEFINED;
+ parent->oid = CNI_LAPDM_NULL_OID;
+ DBG_LEAVE();
+ }
+
+ //HO<xxu:02-17-00> handle both ho and h3 cases
+ JCCEvent_t
+ CCAnchorHandover::handleTrgToAnchCompltHo(void)
+ {
+ DBG_FUNC("CCAnchorHandover::handleTrgToAnchCompltHo", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // cancel T103 timer
+ parent->sessionTimer->cancelTimer();
+
+ TwoPartyCallLeg *whichLeg;
+
+ // as long as handover is allowed, active leg is mandatory here.
+ if ((whichLeg = parent->activeLeg()) == NULL)
+ {
+ // internal error condition
+ // should not have ended up in signaling only mode.
+ // abort handover and session
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ //CDR <xxu:08-22-00>
+ //GCELL<tyu:06-01-01> END
+ GlobalCellId_t globalCellId, globalCellId_t;
+
+ T_CSU_PORT_ID oldPort, srcPort, snkPort;
+ T_CSU_RESULT_CON csuResult;
+
+ srcPort.portType = CSU_RTP_PORT;
+ srcPort.portId.rtpHandler = VoipCallGetRTPHandle(whichLeg->h323CallHandle);
+
+ switch (hoType_)
+ {
+ case HO_TY_HANDOVER:
+ oldPort.portType = CSU_GSM_PORT;
+ oldPort.portId.gsmHandler = parent->entryId;
+ snkPort.portType = CSU_RTP_PORT;
+ snkPort.portId.rtpHandler = hoRtpSession_;
+ //GCELL<tyu:06-01-01> END
+ globalCellId = hoGlobalCellId_;
+
+ break;
+
+ case HO_TY_HANDMSC3:
+ oldPort.portType = CSU_RTP_PORT;
+ oldPort.portId.rtpHandler = hoRtpSession_;
+ snkPort.portType = CSU_RTP_PORT;
+ snkPort.portId.rtpHandler = h3RtpSession_;
+ //GCELL<tyu:06-01-01> END
+ globalCellId = h3GlobalCellId_;
+
+ break;
+
+ default:
+ // Own messup happened. Need immediate attendance thus don't go further.
+ // Also release any resource engaged.
+
+ JCCLog2("CC Error internal messed up: (hoType = %d) (hoState = %d)\n",
+ hoType_, hoState_);
+ DBG_ERROR("CC Error internal messed up: (hoType = %d) (hoState = %d)\n",
+ hoType_, hoState_);
+
+ releaseMobRes();
+ handleAnchPostH3Rls();
+
+ DBG_LEAVE();
+ return(handleAnchPostHoRls());
+ }
+
+ //CDR <xxu:08-22-00> BEGIN
+ T_CNI_RIL3_IE_LOCATION_AREA_ID lai;
+ T_CNI_RIL3_IE_CELL_ID ci;
+
+ for (int i=0; i<16; i++)
+ {
+ int mccInteger, mncInteger;
+
+ mccInteger = ((unsigned int)(((AdjCell_HandoverEntry*)
+ (ccAdjacentCellPackage.adjCell_handoverTable))[i].adjCell_mcc));
+ //GCELL<tyu:06-01-01> BEGIN
+ globalCellId_t.mcc[0] = ((char*)&(mccInteger))[0];
+ globalCellId_t.mcc[1] = ((char*)&(mccInteger))[1];
+ globalCellId_t.mcc[2] = ((char*)&(mccInteger))[2];
+
+ mncInteger = ((unsigned int)(((AdjCell_HandoverEntry*)
+ (ccAdjacentCellPackage.adjCell_handoverTable))[i].adjCell_mnc));
+ globalCellId_t.mnc[0] = ((char*)&(mncInteger))[0];
+ globalCellId_t.mnc[1] = ((char*)&(mncInteger))[1];
+ globalCellId_t.mnc[2] = ((char*)&(mncInteger))[2];
+
+ globalCellId_t.lac = ((unsigned short)(((AdjCell_HandoverEntry*)
+ (ccAdjacentCellPackage.adjCell_handoverTable))[i].adjCell_lac));;
+ globalCellId_t.ci = ((unsigned short)(((AdjCell_HandoverEntry*)
+ (ccAdjacentCellPackage.adjCell_handoverTable))[i].adjCell_ci));;
+
+ if (isEqualGlobalCellId(&globalCellId, &globalCellId_t))
+ break;
+ //GCELL<tyu:06-01-01> END
+ }
+
+ if (i>=16)
+ //GCELL<tyu:06-01-01>
+ DBG_WARNING("CC WARNING (ho-cdr): (hoType = %d) (hoState = %d), vc(%d,%d)\n",
+ hoType_, hoState_, globalCellId.lac, globalCellId.ci);
+ else
+ {
+ lai.ie_present = true;
+ lai.mcc[0] = ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (ccAdjacentCellPackage.adjCell_handoverTable))[i].adjCell_mcc))[0];
+ lai.mcc[1] = ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (ccAdjacentCellPackage.adjCell_handoverTable))[i].adjCell_mcc))[1];
+ lai.mcc[2] = ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (ccAdjacentCellPackage.adjCell_handoverTable))[i].adjCell_mcc))[2];
+ lai.mnc[0] = ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (ccAdjacentCellPackage.adjCell_handoverTable))[i].adjCell_mnc))[0];
+ lai.mnc[1] = ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (ccAdjacentCellPackage.adjCell_handoverTable))[i].adjCell_mnc))[1];
+ lai.lac = ((short)((((AdjCell_HandoverEntry*)
+ (ccAdjacentCellPackage.adjCell_handoverTable))[i].adjCell_lac)));
+
+ ci.ie_present = true;
+ ci.value = ((short)((((AdjCell_HandoverEntry*)
+ (ccAdjacentCellPackage.adjCell_handoverTable))[i].adjCell_ci)));
+
+ if ( (parent->callLeg1->msSide != NULL) &&
+ (parent->callLeg1->msSide->callState_ == HC_ST_ACTIVE) )
+ parent->callLeg1->ccCdr.handover(&lai, &ci);
+ if ( (parent->callLeg2->msSide != NULL) &&
+ (parent->callLeg2->msSide->callState_ == HC_ST_ACTIVE) )
+ parent->callLeg2->ccCdr.handover(&lai, &ci);
+ }
+
+ //CDR <xxu:08-22-00> END
+
+ DBG_TRACE("CC->@anch:handleTrgToAnchCompltHo: voConn %d, ho(%d,%d) src(%d,%x) old(%d,%x) snk(%d,%x)\n",
+ whichLeg->voiceConnected,
+ hoType_, hoState_,
+ srcPort.portType, srcPort.portId.rtpHandler,
+ oldPort.portType, oldPort.portId.rtpHandler,
+ snkPort.portType, snkPort.portId.rtpHandler );
+
+ if (whichLeg->voiceConnected)
+ {
+ // Break old connections
+
+ if ( (csuResult = csu_OrigTermBreakAll(&oldPort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog3("CSU Error : Break old conn failure, (Result = %d) for oldPort(%d, %x)\n",
+ csuResult,
+ oldPort.portType,
+ (int) oldPort.portId.rtpHandler);
+ DBG_ERROR("CSU Error : Break old conn failure, (Result = %d) for oldPort(%d, %x)\n",
+ csuResult,
+ oldPort.portType,
+ oldPort.portId.rtpHandler);
+
+ // Can only generate OA&M log.
+ }
+
+ // Allow going along since ho is complete already
+
+ whichLeg->voiceConnected = false;
+
+ // Make duplex ho or h3 connection between src and snk rtp ports
+
+ if ((csuResult = csu_DuplexConnect(&snkPort, &srcPort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog3("CSU Error : Make conn failure, (Result = %d) for (snk %p, src %p)\n",
+ csuResult,
+ (int)snkPort.portId.rtpHandler, (int)srcPort.portId.rtpHandler);
+ DBG_ERROR("CSU Error : Make conn failure, (Result = %d) for (snk %p, src %p)\n",
+ csuResult,
+ snkPort.portId.rtpHandler, srcPort.portId.rtpHandler);
+
+ // Treat this as internal messup, thus don't go further either !
+ //
+
+ if (hoType_ == HO_TY_HANDOVER)
+ {
+ // ho: Cleanup!
+ releaseMobRes();
+
+ DBG_LEAVE();
+ return(handleAnchPostHoRls());
+
+ } else
+ {
+ // h3: Cleanup!
+ handleAnchPostH3Rls();
+
+ DBG_LEAVE();
+ return(handleAnchPostHoRls());
+ }
+ }
+
+ //
+ whichLeg->voiceConnected = true;
+
+ } else
+ {
+ // break the simplex connection setup earlier.
+
+ if ((csuResult = csu_OrigTermBreakAll(&srcPort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+
+ JCCLog2("CSU Error : Break src conn failure, (Result = %d) for vpPortHndl %p)\n",
+ csuResult,
+ (int)srcPort.portId.rtpHandler);
+ DBG_ERROR("CSU Error : Break src conn failure, (Result = %d) for vpPortHndl %p)\n",
+ csuResult,
+ srcPort.portId.rtpHandler);
+
+ // Can only generate OA&M log.
+ }
+ }
+
+ //GCELL<tyu:06-01-01> BEGIN
+ DBG_TRACE("CC->@anch:handleTrgToAnchCompltHo bf. B'->B: hoType %d, ho(rtp %p, vcIp %x vcId %d, callId %d, rePort %d)\n",
+ hoType_,
+ hoRtpSession_,
+ hoVcIpAddress_,
+ hoGlobalCellId_.ci,
+ hoVcCallIndex_,
+ otherHoIncomingRtpPort_);
+
+ DBG_TRACE("CC->@anch:handleTrgToAnchCompltHo bf. B'->B: hoType %d, h3(rtp %p, vcIp %x vcId %d, callId %d, rePort %d)\n",
+ hoType_,
+ h3RtpSession_,
+ h3VcIpAddress_,
+ h3GlobalCellId_.ci,
+ h3VcCallIndex_,
+ otherH3IncomingRtpPort_);
+ //GCELL<tyu:06-01-01> END
+
+ // h3: update MSC-B' as MSC-B
+
+ if (hoType_ == HO_TY_HANDMSC3)
+ {
+ // Send the Complete Handback message to vcB
+
+ vcOutMsg.msgType = INTER_VC_CC_COMPLETE_HANDBACK;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ // Release old tgt rtpHndle
+
+ if ( hoRtpSession_ != NULL )
+ {
+ if ( (csuResult = csu_OrigTermBreakAll(&oldPort))
+ != CSU_RESULT_CON_SUCCESS )
+ {
+ // This failure may not be a real failure, thus only treating it as INFO type
+
+ JCCLog2("CSU INFO : Break old conn failure, (Result = %d) for oldRtpHndl %p)\n",
+ csuResult,
+ (int)oldPort.portId.rtpHandler);
+ DBG_TRACE("CSU INFO : Break old conn failure, (Result = %d) for oldRtptHndl %p)\n",
+ csuResult,
+ oldPort.portId.rtpHandler);
+ }
+
+ ReleaseHandoverRtpChannel(hoRtpSession_);
+ }
+
+ // Update vcB'->vcB
+
+ hoRtpSession_ = h3RtpSession_;
+ h3RtpSession_ = NULL;
+ hoVcIpAddress_ = h3VcIpAddress_;
+ h3VcIpAddress_ = 0;
+ hoVcCallIndex_ = h3VcCallIndex_;
+ h3VcCallIndex_ = CC_MAX_CC_CALLS_DEF_VAL;
+ otherHoIncomingRtpPort_ = otherH3IncomingRtpPort_;
+ otherH3IncomingRtpPort_ = 0;
+ //GCELL<tyu:06-01-01> BEGIN
+ hoGlobalCellId_ = h3GlobalCellId_;
+ memset(&h3GlobalCellId_, 0, sizeof(GlobalCellId_t));
+ //GCELL<tyu:06-01-01> END
+ hoSimplexConnected_ = false;
+ h3SimplexConnected_ = false;
+ hoSrcLinkLost_ = false;
+ h3SrcLinkLost_ = false;
+
+ } else
+ {
+ // Release rf
+ releaseMobRes();
+
+ hoSimplexConnected_ = false;
+ hoSrcLinkLost_ = false;
+ }
+
+ //GCELL<tyu:06-01-01> BEGIN
+ DBG_TRACE("CC->@anch:handleTrgToAnchCompltHo af. B'->B: hoType %d, ho(rtp %p, vcIp %x vcId %d, callId %d, rePort %d)\n",
+ hoType_,
+ hoRtpSession_,
+ hoVcIpAddress_,
+ hoGlobalCellId_.ci,
+ hoVcCallIndex_,
+ otherHoIncomingRtpPort_);
+
+
+ DBG_TRACE("CC->@anch:handleTrgToAnchCompltHo af. B'->B: hoType_ %d, h3(rtp %p, vcIp %x vcId %d, callId %d, rePort %d)\n",
+ hoType_,
+ h3RtpSession_,
+ h3VcIpAddress_,
+ h3GlobalCellId_.ci,
+ h3VcCallIndex_,
+ otherH3IncomingRtpPort_);
+ //GCELL<tyu:06-01-01> END
+
+ hoType_ = HO_TY_HANDOVER;
+ hoState_ = HAND_ST_ANCH_HO_COMPLT;
+
+ //BCT <xxu:09-22-00> Begin
+ if ( whichLeg->msSide != NULL )
+ {
+ if (whichLeg->msSide->annState_ == ANN_PLAY_WAITING)
+ {
+ //Play inband ringback to transferred party for BCT
+ T_CSU_RESULT_CON csuResult;
+ whichLeg->msSide->annSrcPort_.portType = CSU_ANN_PORT;
+ whichLeg->msSide->annSrcPort_.portId.annHandler = 0;
+ whichLeg->msSide->annSnkPort_.portType = CSU_RTP_PORT;
+ whichLeg->msSide->annSnkPort_.portId.rtpHandler = hoRtpSession_;
+ whichLeg->msSide->annSnkPort_.speechVersion = whichLeg->msSide->currSpeechCh_.version;
+
+ DBG_TRACE("CC->CSU(bct): start inband alert annState(%d) ann(%d,%x) --> snk(%d,%x,%d)\n",
+ whichLeg->msSide->annState_,
+ whichLeg->msSide->annSrcPort_.portType,
+ whichLeg->msSide->annSrcPort_.portId.annHandler,
+ whichLeg->msSide->annSnkPort_.portType,
+ whichLeg->msSide->annSnkPort_.portId.rtpHandler,
+ whichLeg->msSide->annSnkPort_.speechVersion);
+
+ if ( (csuResult = csu_SimplexConnect( &whichLeg->msSide->annSrcPort_,
+ &whichLeg->msSide->annSnkPort_) )
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_WARNING("CC->BCT(csuSConnFailedAfterHo):xlst(%d) ann(%d,%x) snk(%d,%x,%d)\n",
+ csuResult,
+ whichLeg->msSide->annSrcPort_.portType,
+ (int)whichLeg->msSide->annSrcPort_.portId.rtpHandler,
+ whichLeg->msSide->annSnkPort_.portType,
+ (int)whichLeg->msSide->annSnkPort_.portId.rtpHandler,
+ (int)whichLeg->msSide->annSnkPort_.speechVersion);
+
+ //ignore this remote alerting
+ }
+ whichLeg->msSide->annState_ = ANN_PLAY_ON;
+ }
+
+ }
+ //BCT <xxu:09-21-00> END
+
+ // empty the queues now that the handover is successful
+ // Do this only at the end.
+
+ emptyRRQueue ();
+ emptyDownlinkQueue();
+ emptyMMQueue ();
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+
+ JCCEvent_t
+ CCAnchorHandover::handleAnchT104TimerExpiry(void)
+ {
+ DBG_FUNC("CCAnchorHandover::handleAnchT104TimerExpiry", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // Send Handback Nack to the Target ViperCell.
+ // Ack was already sent! Is that Ok?
+
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_NACK;
+ vcOutMsg.msgData.perfHandbackNack.cause = JC_FAILURE_T104_TIMEOUT;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ releaseMobAndConnRes();
+
+ initHandbackData();
+
+ // empty the queues now that the handover failed
+ emptyRRQueue ();
+ emptyDownlinkQueue();
+ emptyMMQueue ();
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ JCCEvent_t
+ CCAnchorHandover::handleAnchHoReqAck(void)
+ {
+ DBG_FUNC("CCAnchorHandover::handleAnchHoReqAck", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ TwoPartyCallLeg *whichLeg;
+
+ // as long as handover is allowed, active leg is mandatory here.
+ if ((whichLeg = parent->activeLeg()) == NULL)
+ {
+ // signaling activity (CISS, SMS Point to Point, etc)
+ // abort handover
+ DBG_LEAVE();
+ return (handleAnchHoReqNack());
+ }
+
+ T_CNI_L3_ID newId;
+ newId.msgq_id = msgQId;
+ newId.sub_id = 0; // No sub id needed here
+
+
+ // <Igal 1-6-00> Updated to standard IRT setup
+ if (parent->setIrt (mmInMsg->entry_id, newId) == false)
+ {
+ // Treat it like a Ho. Req. Nack.
+ releaseMobAndConnRes();
+ DBG_LEAVE();
+ return (handleAnchHoReqNack());
+ }
+
+ // Setup the entry id, oid, and sapi
+ parent->entryId = mmInMsg->entry_id;
+
+ // GET OID AND SAPI
+ T_CNI_RIL3_IRT_ENTRY irtEntry;
+ irtEntry.entry_id = mmInMsg->entry_id;
+
+ if ( (CNI_RIL3_IRT_Get_Entry_by_Entry_ID(&irtEntry))
+ == false )
+ {
+ JCCLog1("CC Call Error : IRT Table problem for (entry id = %d)\n ", mmInMsg->entry_id);
+ DBG_ERROR("CC Call Error : IRT Table problem for (entry id = %d)\n ", mmInMsg->entry_id);
+
+ releaseMobAndConnRes();
+ DBG_LEAVE();
+ return (handleAnchHoReqNack());
+ }
+
+ parent->oid = irtEntry.lapdm_oid;
+
+ // Make a simplex connection between the remote rtp channel and the rf channel
+ T_CSU_PORT_ID rfSinkPort, rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rfSinkPort.portType = CSU_GSM_PORT;
+ rtpSourcePort.portType = CSU_RTP_PORT;
+
+ rfSinkPort.portId.gsmHandler = parent->entryId;
+ rtpSourcePort.portId.rtpHandler = VoipCallGetRTPHandle(whichLeg->h323CallHandle);
+
+ if ((csuResult = csu_SimplexConnect(&rtpSourcePort, &rfSinkPort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog3("CSU Error : Ho Simplex Conn. Failure, (Result = %d) for (rtp port = %x) and (entryId = %d)\n",
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler,
+ parent->entryId);
+ DBG_ERROR("CSU Error : Ho Simplex Conn. Failure, (Result = %d) for (rtp port = %x) and (entryId = %d)\n",
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler,
+ parent->entryId);
+
+ releaseMobAndConnRes();
+ DBG_LEAVE();
+ return (handleAnchHoReqNack());
+ }
+
+ hoSimplexConnected_ = true;
+
+ // Send the Perform Ack message.
+
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_ACK;
+ vcOutMsg.msgData.perfHandbackAck.handCmd = mmInMsg->l3_data.handReqAck.handCmd;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ // start the T104 timer
+ parent->sessionTimer->setTimer(CALL_HAND_TRG_T104);
+
+ hoState_ = HAND_ST_ANCH_SND_HB_REQ_ACK;
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ JCCEvent_t
+ CCAnchorHandover::handleAnchHoReqNack(void)
+ {
+ DBG_FUNC("CCAnchorHandover::handleAnchHoReqNack", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // Send the Perform Nack message.
+
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_NACK;
+ vcOutMsg.msgData.perfHandbackNack.cause = rrInMsg->l3_data.handReqNack.cause;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ initHandbackData();
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ JCCEvent_t
+ CCAnchorHandover::handleAnchHoComplt(void)
+ {
+ DBG_FUNC("CCAnchorHandover::handleAnchHoComplt", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // cancel T104 timer
+ parent->sessionTimer->cancelTimer();
+
+ TwoPartyCallLeg *whichLeg;
+
+ // as long as handover is allowed, active leg is mandatory here.
+ if ((whichLeg = parent->activeLeg()) == NULL)
+ {
+ // internal error condition
+ // should not have ended up in signaling only mode.
+ // abort handover and session
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ //CDR <xxu:08-22-00> BEGIN
+ T_CNI_RIL3_IE_LOCATION_AREA_ID lai;
+ T_CNI_RIL3_IE_CELL_ID ci;
+
+ ci.ie_present = true;
+ ci.value = ((short)(ccBtsBasicPackage.bts_ci));
+
+ lai.ie_present = true;
+ lai.mcc[0] = ((unsigned char*)&(ccBtsBasicPackage.bts_mcc))[0];
+ lai.mcc[1] = ((unsigned char*)&(ccBtsBasicPackage.bts_mcc))[1];
+ lai.mcc[2] = ((unsigned char*)&(ccBtsBasicPackage.bts_mcc))[2];
+ lai.mnc[0] = ((unsigned char*)&(ccBtsBasicPackage.bts_mnc))[0];
+ lai.mnc[1] = ((unsigned char*)&(ccBtsBasicPackage.bts_mnc))[1];
+ lai.lac = ((short)(ccBtsBasicPackage.bts_lac));
+
+ if ( (parent->callLeg1->msSide != NULL) &&
+ (parent->callLeg1->msSide->callState_ == HC_ST_ACTIVE) )
+ parent->callLeg1->ccCdr.handover(&lai, &ci);
+ if ( (parent->callLeg2->msSide != NULL) &&
+ (parent->callLeg2->msSide->callState_ == HC_ST_ACTIVE) )
+ parent->callLeg2->ccCdr.handover(&lai, &ci);
+ //CDR <xxu:08-22-00> END
+
+ // Send the Complete Handback message.
+ vcOutMsg.msgType = INTER_VC_CC_COMPLETE_HANDBACK;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ if (whichLeg->voiceConnected)
+ {
+ // Call is not held at this point for some reason.
+
+ // First take down the earlier connection
+
+ // Break the connections with the RTP Port
+ T_CSU_PORT_ID hoRtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ hoRtpSourcePort.portType = CSU_RTP_PORT;
+ hoRtpSourcePort.portId.rtpHandler = hoRtpSession_;
+
+ if ((csuResult = csu_OrigTermBreakAll(&hoRtpSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+
+ JCCLog2("CSU Error : Ho Disconn. Failure, (Result = %d) for (rtp port = %x)\n",
+ csuResult,
+ (int)hoRtpSourcePort.portId.rtpHandler);
+ DBG_ERROR("CSU Error : Ho Disconn. Failure, (Result = %d) for (rtp port = %x)\n",
+ csuResult,
+ (int)hoRtpSourcePort.portId.rtpHandler);
+
+ // Can only generate OA&M log.
+
+ // Don't continue
+
+ hoSimplexConnected_ = false;
+
+ // Release the Ho RTP channel
+ ReleaseHandoverRtpChannel(hoRtpSession_);
+ hoRtpSession_ = NULL;
+
+ initData();
+
+ DBG_LEAVE();
+ return(CC_TWO_STAGE_DISCONNECT);
+ }
+
+ // voice is broken
+ whichLeg->voiceConnected = false;
+
+ // Complete the connection
+ // Make a simplex connection between the remote rtp channel and the rf channel
+ T_CSU_PORT_ID rfSinkPort, rtpSourcePort;
+
+ rfSinkPort.portType = CSU_GSM_PORT;
+ rtpSourcePort.portType = CSU_RTP_PORT;
+
+ rfSinkPort.portId.gsmHandler = parent->entryId;
+ rtpSourcePort.portId.rtpHandler = VoipCallGetRTPHandle(whichLeg->h323CallHandle);
+
+ if ((csuResult = csu_DuplexConnect(&rfSinkPort, &rtpSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+
+ JCCLog3("CSU Error : Ho Duplex Conn. Failure, (Result = %d) for (rtp port = %x) and (entryId = %d)\n",
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler,
+ parent->entryId);
+ DBG_ERROR("CSU Error : Ho Duplex Conn. Failure, (Result = %d) for (rtp port = %x) and (entryId = %d)\n",
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler,
+ parent->entryId);
+
+ // Skip event loop.
+ // No recovery is possible
+ DBG_LEAVE();
+ return(CC_TWO_STAGE_DISCONNECT);
+
+ }
+ whichLeg->voiceConnected = true;
+
+ }
+
+ else
+ {
+ // break the simplex connection that was setup earlier.
+ // Break the connections with the RF Port
+ T_CSU_PORT_ID rfSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rfSourcePort.portType = CSU_GSM_PORT;
+ rfSourcePort.portId.gsmHandler = parent->entryId;
+
+ if ((csuResult = csu_OrigTermBreakAll(&rfSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog2("CSU Error : Ho Disconn. Failure, (Result = %d) for (entryId = %d)\n",
+ csuResult,
+ parent->entryId);
+ DBG_ERROR("CSU Error : Ho Disconn. Failure, (Result = %d) for (entryId = %d)\n",
+ csuResult,
+ parent->entryId);
+
+ // Can only generate OA&M log.
+ }
+
+ }
+
+ hoSimplexConnected_ = false;
+
+ // Release the Ho RTP channel
+ ReleaseHandoverRtpChannel(hoRtpSession_);
+ hoRtpSession_ = NULL;
+
+ initData();
+
+ //BCT <xxu:09-22-00> Begin
+ if ( (whichLeg->msSide != NULL) &&
+ (whichLeg->msSide->annState_ == ANN_PLAY_WAITING) )
+ {
+ //Play inband ringback to transferred party for BCT
+ T_CSU_RESULT_CON csuResult;
+ whichLeg->msSide->annSrcPort_.portType = CSU_ANN_PORT;
+ whichLeg->msSide->annSrcPort_.portId.annHandler = 0;
+ whichLeg->msSide->annSnkPort_.portType = CSU_GSM_PORT;
+ whichLeg->msSide->annSnkPort_.portId.gsmHandler = parent->entryId;
+ whichLeg->msSide->annSnkPort_.speechVersion = whichLeg->msSide->currSpeechCh_.version;
+
+ DBG_TRACE("CC->CSU(bct): start inband alert annState(%d) ann(%d,%x) --> snk(%d,%x,%d)\n",
+ whichLeg->msSide->annState_,
+ whichLeg->msSide->annSrcPort_.portType,
+ whichLeg->msSide->annSrcPort_.portId.annHandler,
+ whichLeg->msSide->annSnkPort_.portType,
+ whichLeg->msSide->annSnkPort_.portId.rtpHandler,
+ whichLeg->msSide->annSnkPort_.speechVersion);
+
+ if ( (csuResult = csu_SimplexConnect(&whichLeg->msSide->annSrcPort_,
+ &whichLeg->msSide->annSnkPort_))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_WARNING("CC->BCT(csuSConnFailedAfterHb):xlst(%d) ann(%d,%x) snk(%d,%x,%d)\n",
+ csuResult,
+ whichLeg->msSide->annSrcPort_.portType,
+ (int)whichLeg->msSide->annSrcPort_.portId.rtpHandler,
+ whichLeg->msSide->annSnkPort_.portType,
+ (int)whichLeg->msSide->annSnkPort_.portId.rtpHandler,
+ (int)whichLeg->msSide->annSnkPort_.speechVersion);
+
+ //ignore this remote alerting
+ }
+ whichLeg->msSide->annState_ = ANN_PLAY_ON;
+
+ }
+ //BCT <xxu:09-22-00> END
+
+
+ // empty the queues now that the handover is successful
+ // Do this only at the end.
+ emptyRRQueue ();
+ emptyDownlinkQueue();
+ emptyMMQueue ();
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //HO<xxu:01-24-00> Handle both H3 and HO
+ JCCEvent_t
+ CCAnchorHandover::handleVcAddressRsp(void)
+ {
+ DBG_FUNC("CCAnchorHandover::handleVcAddressRsp", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ TwoPartyCallLeg *whichLeg;
+
+ parent->sessionTimer->cancelTimer();
+
+ // as long as handover is allowed, active leg is mandatory here.
+ if ((whichLeg = parent->activeLeg()) == NULL)
+ {
+ // Either ho or h3: only h3 needs to abort mscB here
+ // signaling activity (CISS, SMS Point to Point, etc)
+ // cleanup mscA and abort handover junk @ target cell
+
+ switch (hoState_)
+ {
+ case HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ:
+ //H3
+ DBG_TRACE("vcA<-VB: got vcB' IP Addr Rsp but no active leg thus aborting mscB\n");
+
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_CALL_ALREADY_DROPPED;
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ //Cleanup h3
+ initHandmsc3Data();
+
+ //clear ho
+ initData();
+
+ break;
+
+ case HAND_ST_ANCH_VC_IP_ADDRESS_REQ:
+ //HO
+ DBG_TRACE("vcA<-VB: got vcB IP Addr Rsp but no active leg HO case\n");
+
+ //clear ho
+ initData();
+
+ break;
+
+ case HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR:
+ DBG_TRACE("vcA<-VB: got vcB IP Addr Rsp but no active leg HO case. (hoType:%d, hoState:%d)\n",
+ hoType_, hoState_);
+
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendEndHandover();
+ initData();
+
+ break;
+
+ default:
+ JCCLog2 ("CC Error: messeup hoType %d, hoState %d\n", hoType_, hoState_);
+ DBG_ERROR ("CC Error: messeup hoType %d, hoState %d\n", hoType_, hoState_);
+
+ //Internal messup bu cleanup is still better while trouble shooting it!
+ initHandmsc3Data();
+
+ //clear ho
+ initData();
+
+ break;
+ }
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ // Got active leg, assign a new Ho RTP channel
+ HJCRTPSESSION reRtpSession;
+
+ //RETRY<xxu:04-24-00> BEGIN
+ if (hoNextCandidate_)
+ {
+ if (hoType_ == HO_TY_HANDOVER)
+ reRtpSession = hoRtpSession_;
+ else if ( (hoType_ == HO_TY_HANDMSC3) ||
+ (hoType_ == HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR) )
+ reRtpSession = h3RtpSession_;
+ else
+ {
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //PR1521 <xxu:09-12-00>
+ // Release the Ho RTP channel
+ if (reRtpSession != NULL)
+ ReleaseHandoverRtpChannel(reRtpSession);
+ else
+ DBG_WARNING("CC Ho(retry): ho(%d,%d), last rtpHandle is NULL (%p)\n",
+ hoType_, hoState_, reRtpSession);
+ }
+
+ //RETRY<xxu:04-24-00> END
+ {
+ if ((reRtpSession = AssignHandoverRtpChannel())
+ == NULL)
+ {
+ // Do not proceed with ho or h3
+ JCCLog2 ("CC Error: rtp channel assignment failed (hoType %d, hoState %d)\n",
+ hoType_, hoState_);
+ DBG_ERROR ("CC Error: rtp channel assignment failed (hoType %d, hoState %d)\n",
+ hoType_, hoState_);
+
+ switch (hoState_)
+ {
+ case HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ:
+ // Give up the h3 effort but maintain the current ho
+ initHandmsc3Data();
+ break;
+
+ case HAND_ST_ANCH_VC_IP_ADDRESS_REQ:
+ // Change the state back to no handover
+ initData();
+ break;
+
+ case HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR:
+
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendHandbackNack();
+ initExtHandmsc3Data();
+ break;
+
+ default:
+ //Deadly error! Troubleshooting needed!
+ JCCLog2 ("CC Error: messed up hoState '%d'. (hoType %d)\n",
+ hoState_, hoType_);
+ DBG_ERROR ("CC Error: messed up hoState '%d'. (hoType %d)\n",
+ hoState_, hoType_);
+ break;
+ }
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+ }
+
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDOVER;
+ vcOutMsg.msgData.perfHandoverReq.sourceInRtpPort
+ = GetIncomingHandoverRtpPort(reRtpSession);
+ vcOutMsg.msgData.perfHandoverReq.channelType.bearerType
+ = BEARER_SPEECH;
+ vcOutMsg.msgData.perfHandoverReq.channelType.speechChann
+ = parent->currSpeechCh();
+ vcOutMsg.msgData.perfHandoverReq.globalCellId
+ = MY_GLOBALCELL_ID;
+
+ //CIPH<xxu:02-10-00>Begin
+
+ IntraL3CipherModeCommand_t cipherCmd;
+ if (ludbGetCipherAlgo(parent->ludbIndex, &cipherCmd))
+ {
+ //handling error return
+ JCCLog1 ("CC->Handover Error: ludbGetCipherAlgo() failed, (ludbIndex = %d)\n",
+ parent->ludbIndex);
+ DBG_ERROR ("CC->Handover Error: ludbGetCipherAlgo() failed, (ludbIndex = %d)\n",
+ parent->ludbIndex);
+ cipherCmd.cmd.cipherModeSetting.ciphering = CNI_RIl3_CIPHER_NO_CIPHERING;
+ }
+
+ DBG_TRACE("CC->@anch:PerfHo(a2t): ludbIndex = %d, bearer %d, spchVer %d, ciphSet %d, algo %d, kc(%x,%x)\n",
+ parent->ludbIndex,
+ vcOutMsg.msgData.perfHandoverReq.channelType.bearerType,
+ vcOutMsg.msgData.perfHandoverReq.channelType.speechChann.version,
+ cipherCmd.cmd.cipherModeSetting.ciphering,
+ cipherCmd.cmd.cipherModeSetting.algorithm,
+ cipherCmd.Kc[0],cipherCmd.Kc[1],
+ cipherCmd.Kc[0],cipherCmd.Kc[2]);
+
+ memcpy( (unsigned char*) &(vcOutMsg.msgData.perfHandoverReq.cipherCmd),
+ (unsigned char*) &(cipherCmd),
+ sizeof (IntraL3CipherModeCommand_t) );
+
+ //CIPH<xxu:02-10-00>End
+
+
+ // Send Perform Handover to the Target ViperCell.
+ switch (hoState_)
+ {
+ case HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ:
+ // H3 case
+
+ DBG_TRACE("CC->@anch:handleVcAddressRsp: loRtpHndl %p, loPort %d, h3VcIpAddress %d\n",
+ reRtpSession, vcOutMsg.msgData.perfHandoverReq.sourceInRtpPort, h3VcIpAddress_);
+
+ sendVcMsgH3(MODULE_CC, MODULE_CC);
+
+ h3RtpSession_ = reRtpSession;
+ hoState_ = HAND_ST_ANCH_SND_H3_REQ;
+ break;
+
+ case HAND_ST_ANCH_VC_IP_ADDRESS_REQ:
+ // HO case
+
+ DBG_TRACE("CC->@anch:handleVcAddressRsp: loRtpHndl %p, loPort %d, hoVcIpAddress %d\n",
+ reRtpSession, vcOutMsg.msgData.perfHandoverReq.sourceInRtpPort, hoVcIpAddress_);
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ hoRtpSession_ = reRtpSession;
+ hoState_ = HAND_ST_ANCH_SND_HO_REQ;
+ break;
+
+ case HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR:
+ DBG_TRACE("CC->@anch:handleVcAddressRsp: loRtpHndl %p, loPort %d, hoVcIpAddress %d\n",
+ reRtpSession, vcOutMsg.msgData.perfHandoverReq.sourceInRtpPort, hoVcIpAddress_);
+
+ sendVcMsgH3(MODULE_CC, MODULE_CC);
+
+ h3RtpSession_ = reRtpSession;
+ hoState_ = HAND_ST_ANCH_EHO_SND_H3_REQ;
+ break;
+ }
+
+ // start the Tho timer
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_THO);
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+
+ //HO<xxu:01-31-00> extend to handle both HO & H3
+ JCCEvent_t
+ CCAnchorHandover::handleTrgToAnchPerfHoNack(void)
+ {
+ int i;
+ IntraL3HandoverRequired_t *inMsg = &handReqd;
+
+ DBG_FUNC("CCAnchorHandover::handleTrgToAnchPerfHoNack", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // cancel Tho timer
+ parent->sessionTimer->cancelTimer();
+
+ // Only retry next candidate if available in this case
+ switch(hoType_)
+ {
+ case HO_TY_HANDOVER:
+ //RETRY<xxu:04-24-00> BEGIN retry next candidate
+ if ( (i=getNextHoCandidate()) != (-1) )
+ {
+ //Try next candidate
+ hoNextCandidate_ = true;
+ candIndex_ = i;
+
+ //GCELL<tyu:06-01-01> BEGIN
+ hoGlobalCellId_ = inMsg->candGlobalCellId[i].candGlobalCellId;
+
+ DBG_TRACE("CC HO Info @handleTrgToAnchPerfHoNack(ho): #ofCand %d, candVcId(%d,%x%x%x,%x%x%x,%d,%d) ho(type %d, state %d)\n",
+ inMsg->numCandidates, i,
+ hoGlobalCellId_.mcc[0],hoGlobalCellId_.mcc[1],hoGlobalCellId_.mcc[2],
+ hoGlobalCellId_.mnc[0],hoGlobalCellId_.mnc[1],hoGlobalCellId_.mnc[2],
+ hoGlobalCellId_.lac, hoGlobalCellId_.ci,
+ hoType_, hoState_);
+
+ sprintf(&(cellLocationRequest.ViperCellId[0]), "%d:%d", hoGlobalCellId_.lac,hoGlobalCellId_.ci);
+ //GCELL<tyu:06-01-01> END
+
+ cellLocationRequest.TxnId = callIndex;
+
+ if (VBLinkLocationRequest(cellLocationRequest)
+ == false)
+ {
+ // Ignore the message
+ DBG_ERROR ("CC->VB Link Error: Failed on Cell Location Request Message\n");
+
+ initData();
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ // start the VB timer
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_TVB);
+
+ hoState_ = HAND_ST_ANCH_VC_IP_ADDRESS_REQ;
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+ } else
+ //RETRY<xxu:04-24-00> END
+
+ {
+ // ho failed
+ if (hoSrcLinkLost_)
+ {
+ // peg
+ PM_CCMeasurement.unsuccExternHDOsWithLossOfConnectionPerMSC.increment();
+
+ initData();
+ DBG_LEAVE();
+ return(CC_RELEASE_CALL);
+ } else
+ {
+ initData();
+ }
+ }
+ break;
+
+ case HO_TY_HANDMSC3:
+ //Abort action @ MSC-B'
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_ANCH_V3_FAILED;
+
+ sendVcMsgH3(MODULE_CC, MODULE_CC);
+
+ // Abort HB part at MSC-B
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_NACK;
+ vcOutMsg.msgData.perfHandbackNack.cause = JC_FAILURE_ANCH_V3_FAILED;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ initHandmsc3Data();
+
+ break;
+
+ case HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR:
+ //Abort action @ MSC-B'
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_ANCH_V3_FAILED;
+
+ sendVcMsgH3(MODULE_CC, MODULE_CC);
+
+ // Abort HB part at MSC-B
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_NACK;
+ vcOutMsg.msgData.perfHandbackNack.cause = JC_FAILURE_ANCH_V3_FAILED;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ initHandmsc3Data();
+
+ break;
+
+ default:
+ //Deadly problem, need shoubleshooting first before running ahead !
+ JCCLog2 ("CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ DBG_ERROR ("CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ // empty the queues now that the handover failed
+ emptyRRQueue ();
+ emptyDownlinkQueue();
+ emptyMMQueue ();
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //HO<xxu:01-28-00> handle both h3 and ho casse!
+ JCCEvent_t
+ CCAnchorHandover::handleTrgToAnchPerfHoAck(void)
+ {
+ DBG_FUNC("CCAnchorHandover::handleTrgToAnchPerfHoAck", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // cancel Tho timer
+ parent->sessionTimer->cancelTimer();
+
+ TwoPartyCallLeg *whichLeg;
+
+ // as long as handover is allowed, active leg is mandatory here.
+ if ((whichLeg = parent->activeLeg()) == NULL)
+ {
+ // signaling activity (CISS, SMS Point to Point, etc)
+ // abort handover
+ JCCLog2 ("CC Trace: no active leg (hoType %d, hoState %d)\n", hoType_, hoState_);
+ DBG_TRACE ("CC Trace: no active leg (hoType %d, hoState %d)\n", hoType_, hoState_);
+ DBG_LEAVE();
+ return (handleAnchAbortWiCos(JC_FAILURE_CALL_ALREADY_DROPPED));
+ }
+
+ T_CSU_PORT_ID rtpSinkPort;
+ bool need_simplex_connection;
+
+ switch(hoType_)
+ {
+ case HO_TY_HANDMSC3:
+ DBG_TRACE("CC->@anch(h3):handleTrgToAnchPerfHoAck: loRtpHndl %p, reVcIpAddr %x, rePort %d\n",
+ h3RtpSession_,
+ h3VcIpAddress_,
+ vcInMsg->msgData.perfHandoverAck.targetInRtpPort);
+
+ h3VcCallIndex_ = vcInMsg->origSubId;
+
+ if (h3RtpSession_ == NULL)
+ {
+ DBG_WARNING("CC->@anch(h3):handleTrgToAnchPerfHoAck: ho(%d,%d) null-RtpHandle(%p)\n",
+ hoType_, hoState_, h3RtpSession_);
+ DBG_LEAVE();
+ return (handleAnchAbortWiCos(JC_FAILURE_ANCH_HO_DISALOWED));
+ }
+
+ SetRemoteHandoverRtpPort(h3RtpSession_,
+ h3VcIpAddress_,
+ vcInMsg->msgData.perfHandoverAck.targetInRtpPort);
+
+ rtpSinkPort.portType = CSU_RTP_PORT;
+ rtpSinkPort.portId.rtpHandler = h3RtpSession_;
+
+ DBG_TRACE("CC->@anch(h3):handleTrgToAnchPerfHoAck: (hoType %d, hoState_ %d)\n",
+ hoType_, hoState_);
+
+ need_simplex_connection = true;
+
+ break;
+
+ case HO_TY_HANDOVER:
+ hoVcCallIndex_ = vcInMsg->origSubId;
+
+ //PR1521 <xxu:09-12-00>
+ DBG_TRACE("CC->@anch(ho):handleTrgToAnchPerfHoAck: loRtpHndl %p, reVcIpAddr %x, rePort %d callIndex %d\n",
+ hoRtpSession_,
+ hoVcIpAddress_,
+ vcInMsg->msgData.perfHandoverAck.targetInRtpPort,
+ hoVcCallIndex_);
+
+ if (hoRtpSession_ == NULL)
+ {
+ DBG_WARNING("CC->@anch(ho):handleTrgToAnchPerfHoAck: ho(%d,%d) null-RtpHandle(%p)\n",
+ hoType_, hoState_, hoRtpSession_);
+ DBG_LEAVE();
+ return (handleAnchAbortWiCos(JC_FAILURE_ANCH_HO_DISALOWED));
+ }
+
+ SetRemoteHandoverRtpPort(hoRtpSession_,
+ hoVcIpAddress_,
+ vcInMsg->msgData.perfHandoverAck.targetInRtpPort);
+
+ rtpSinkPort.portType = CSU_RTP_PORT;
+ rtpSinkPort.portId.rtpHandler = hoRtpSession_;
+
+ need_simplex_connection = true;
+
+ break;
+
+ case HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR:
+ DBG_TRACE("CC->@anch(h3):handleTrgToAnchPerfHoAck: loRtpHndl %p, reVcIpAddr %x, rePort %d\n",
+ h3RtpSession_,
+ h3VcIpAddress_,
+ vcInMsg->msgData.perfHandoverAck.targetInRtpPort);
+
+ h3VcCallIndex_ = vcInMsg->origSubId;
+
+ if (h3RtpSession_ == NULL)
+ {
+ DBG_WARNING("CC->@anch(h3):handleTrgToAnchPerfHoAck: ho(%d,%d) null-RtpHandle(%p)\n",
+ hoType_, hoState_, h3RtpSession_);
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendEndHandover();
+ initData();
+
+ DBG_LEAVE();
+ return (CC_RELEASE_HOCALLLEG);
+ }
+
+ SetRemoteHandoverRtpPort(h3RtpSession_,
+ h3VcIpAddress_,
+ vcInMsg->msgData.perfHandoverAck.targetInRtpPort);
+
+ rtpSinkPort.portType = CSU_RTP_PORT;
+ rtpSinkPort.portId.rtpHandler = h3RtpSession_;
+
+ DBG_TRACE("CC->@anch(h3):handleTrgToAnchPerfHoAck: (hoType %d, hoState_ %d)\n",
+ hoType_, hoState_);
+
+ need_simplex_connection = false;
+
+ break;
+
+ default:
+ //Deadly problem, need shoubleshooting first before running ahead !
+ JCCLog2 ("CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ DBG_ERROR ("CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+
+ if (need_simplex_connection)
+ {
+ // simplex conn for ho or h3
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = VoipCallGetRTPHandle(whichLeg->h323CallHandle);
+
+ DBG_TRACE("CC->@anch PerfHock(t2a): (hoType %d,hoState %d) (vpRtpHndl %p->reRtpHndl %p)\n",
+ hoType_, hoState_, rtpSourcePort.portId.rtpHandler, rtpSinkPort.portId.rtpHandler);
+
+ if ((csuResult = csu_SimplexConnect(&rtpSourcePort, &rtpSinkPort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog2("CSU Error : Ho or h3 Simplex Conn. Failure, (hoType %d, hoState %)\n",
+ hoType_, hoState_);
+ JCCLog3("CSU Error : Ho or h3 Simplex Conn. Failure, (Result = %d) for (rtpPort %x --> rtpPort %x)\n",
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler,
+ (int)rtpSinkPort.portId.rtpHandler);
+ DBG_ERROR("CSU Error : Ho or h3 Simplex Conn. Failure, (hoType %d, hoState %) (Result = %d) for (rtpPort %x --> rtpPort %x)\n",
+ hoType_,hoState_,
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler,
+ (int)rtpSinkPort.portId.rtpHandler);
+
+ // Treating like a Handover Failure will behave as required.
+ // Skip event loop.
+ DBG_LEAVE();
+ return (handleAnchAbortWiCos(JC_FAILURE_CSU_SIMPLEX_CONNETION));
+ }
+ }
+
+ switch(hoType_)
+ {
+ case HO_TY_HANDOVER:
+ // Send internal RR msg
+ rrOutMsg.l3_data.handCmd.handCmd = vcInMsg->msgData.perfHandoverAck.handCmd;
+
+ // Dump the handover Command msg.
+ // CNI_DumpHex(&rrOutMsg.l3_data.handCmd.handCmd.buffer[0], 30);
+
+ sendRR(INTRA_L3_DATA, INTRA_L3_RR_HANDOVER_COMMAND, parent->entryId, &rrOutMsg);
+
+ hoSimplexConnected_ = true;
+ hoState_ = HAND_ST_ANCH_RCV_HO_REQ_ACK;
+
+ break;
+
+ case HO_TY_HANDMSC3:
+ //Send HB ack to MSC-B based on HO ack from MSC-B'
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_ACK;
+ vcOutMsg.msgData.perfHandbackAck.handCmd = vcInMsg->msgData.perfHandoverAck.handCmd;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ h3SimplexConnected_ = true;
+ hoState_ = HAND_ST_ANCH_RCV_H3_REQ_ACK;
+
+ break;
+
+ case HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR:
+
+ // Send HANDBACK ACK to external MSC which originated the PERFORM HANDBACK
+ sendHandbackAck();
+
+ hoState_ = HAND_ST_ANCH_EHO_RCV_H3_REQ_ACK;
+
+ break;
+
+
+ //default: no other case check needed again!
+
+ }
+
+ // start the T103 timer
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_T103);
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //HO<xxu:01-24-00> handle both HB and H3 cases!
+ JCCEvent_t
+ CCAnchorHandover::handleTrgToAnchPerfHbReq(void)
+ {
+ JCCEvent_t event_result;
+
+ DBG_FUNC("CCAnchorHandover::handleTrgToAnchPerfHbReq", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // Use the same criteria as when triggered on the anchor side.
+ if (!parent->isHandoverAllowed())
+ {
+ // Need to fix the cause value for the nack.
+ DBG_ERROR("vcA->vcB: HB or H3 failed on handover disallowed at vcA\n");
+ return(handleAnchHoReqNackWiCos(JC_FAILURE_ANCH_HO_DISALOWED));
+ }
+
+ //HO<xxu:01-24-00> Handle both HB and H3 scenarioes
+ //xxuHoTbd: need to check networkId to handle multiple VBs!
+
+ //GCELL<tyu:06-01-01> BEGIN
+ DBG_TRACE("CC HO Info @anch-PerfHbReq: Mcc(%x%x%x), Mnc(%x%x%x), candVcId(%d,%d), ho(type %d, state %d)\n",
+ vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId.mcc[0],
+ vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId.mcc[1],
+ vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId.mcc[2],
+ vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId.mnc[0],
+ vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId.mnc[1],
+ vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId.mnc[2],
+ vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId.lac,
+ vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId.ci,
+ hoType_, hoState_);
+
+
+ if (vcInMsg->msgData.perfHandbackReq.globalCellId.candIsExternal)
+ {
+ event_result = do_MNET_Handback_To_External_PLMN_scenario();
+ }
+ else
+ {
+ if ( isEqualGlobalCellId(&(vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId), &MY_GLOBALCELL_ID)
+ && !forcedHandmsc3 )
+ {
+ event_result = do_MNET_Handback_scenario();
+ }
+ else
+ {
+ event_result = do_MNET_Handback_To_Third_MNET_scenario();
+ }
+ }
+
+ DBG_LEAVE();
+ return(event_result);
+ }
+
+
+ //HO<xxu:01-31-00> extend to both HB and H3
+ JCCEvent_t
+ CCAnchorHandover::handleTrgToAnchAbortHb(void)
+ {
+ DBG_FUNC("CCAnchorHandover::handleTrgToAnchAbortHb", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CC Info: (hoType '%d', hoState %d') aborted by MSC-B\n",
+ hoType_, hoState_);
+
+ // cancel T104 (hb) or T103 (h3)
+ parent->sessionTimer->cancelTimer();
+
+ switch (hoType_)
+ {
+ case HO_TY_HANDBACK:
+ // Cleanup hb at anch
+
+ releaseMobAndConnRes();
+ initHandbackData();
+
+ break;
+
+ case HO_TY_HANDMSC3:
+ // Abort HO part at MSC-B'
+
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.perfHandbackNack.cause = JC_FAILURE_REVERT_TO_OLD;
+
+ sendVcMsgH3(MODULE_CC, MODULE_CC);
+
+ initHandmsc3Data();
+
+ break;
+
+ default:
+ //Deadly problem, need shoubleshooting first before running ahead !
+ JCCLog2 ("CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ DBG_ERROR ("CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ // empty the queues now that the handover failed
+ emptyRRQueue ();
+ emptyDownlinkQueue();
+ emptyMMQueue ();
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //HO<xxu:01-28-00> handle both h3 and ho cases!
+ JCCEvent_t
+ CCAnchorHandover::handleAnchThoTimerExpiry(void)
+ {
+ int i;
+ IntraL3HandoverRequired_t *inMsg = &handReqd;
+
+ DBG_FUNC("CCAnchorHandover::handleAnchThoTimerExpiry", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ //Retry next candidate if there is, otherwise give up handover effort
+
+ switch (hoType_)
+ {
+ case HO_TY_HANDOVER:
+ //RETRY<xxu:04-21-00> BEGIN, not retry to the same cell assumed
+ //if retry to the same cell needed, getNextHoCandidate could be
+ //modified to support this in the future.
+ if ( (i=getNextHoCandidate()) != (-1) )
+ {
+ //Try next candidate
+ hoNextCandidate_ = true;
+ candIndex_ = i;
+
+ //GCELL<tyu:06-01-01> BEGIN
+ hoGlobalCellId_ = inMsg->candGlobalCellId[i].candGlobalCellId;
+
+ DBG_TRACE("CC HO Info @handleAnchThoTimerExpiry(ho): #ofCand %d, candVcId(%d,%x%x%x,%x%x%x,%d,%d) ho(type %d, state %d)\n",
+ inMsg->numCandidates, i,
+ hoGlobalCellId_.mcc[0],hoGlobalCellId_.mcc[1],hoGlobalCellId_.mcc[2],
+ hoGlobalCellId_.mnc[0],hoGlobalCellId_.mnc[1],hoGlobalCellId_.mnc[2],
+ hoGlobalCellId_.lac, hoGlobalCellId_.ci,
+ hoType_, hoState_);
+
+ sprintf(&(cellLocationRequest.ViperCellId[0]), "%d:%d", hoGlobalCellId_.lac,hoGlobalCellId_.ci);
+ //GCELL<tyu:06-01-01> END
+
+ cellLocationRequest.TxnId = callIndex;
+
+ if (VBLinkLocationRequest(cellLocationRequest)
+ == false)
+ {
+ // Ignore the message
+ DBG_ERROR ("CC->VB Link Error: Failed on Cell Location Request Message\n");
+
+ //Release the Ho data @ MSC-A
+ ReleaseHandoverRtpChannel(hoRtpSession_);
+ hoRtpSession_ = NULL;
+
+ initData();
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ // start the VB timer
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_TVB);
+
+ hoState_ = HAND_ST_ANCH_VC_IP_ADDRESS_REQ;
+
+ //RETRY<xxu:04-21-00> END
+ } else
+ {
+ //Abort action @ MSC-B
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ //Release the Ho data @ MSC-A
+ ReleaseHandoverRtpChannel(hoRtpSession_);
+ hoRtpSession_ = NULL;
+ initData();
+ hoType_ = (HandoverTypes_t )0;
+ }
+
+ break;
+
+ case HO_TY_HANDMSC3:
+ //Abort action @ MSC-B'
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_THO_TIMEOUT;
+
+ sendVcMsgH3(MODULE_CC, MODULE_CC);
+
+ //Release the H3 data @ MSC-A
+ initHandmsc3Data();
+
+ //Abort HB from MSC-B to MSC-A
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_NACK;
+ vcOutMsg.msgData.perfHandbackNack.cause = JC_FAILURE_THO_TIMEOUT;
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ break;
+
+ default:
+ //Deadly problem, release call and troubleshoot asap!
+ JCCLog1("CC Error: messed up hoType_ '%d'\n", hoType_);
+ DBG_ERROR("CC Error: messed up hoType_ '%d'\n", hoType_);
+ DBG_LEAVE();
+ return(CC_RELEASE_CALL);
+ break;
+ }
+
+ // Treating like a Handover Failure will behave as required.
+ // Skip event loop.
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //HO<xxu:01-31-00> extend to handle ho and h3
+ JCCEvent_t
+ CCAnchorHandover::handleAnchT103TimerExpiry(void)
+ {
+ DBG_FUNC("CCAnchorHandover::handleAnchT103TimerExpiry", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // May consider to retry the same candidate later but right now just send
+ // Abort Handover to the Target ViperCell: MSC-B (ho); MSC-B' (h3) etc.
+
+ DBG_TRACE("CC Info: T103 expiry during (hoType %d, hoState)\n", hoType_, hoState_);
+
+ switch(hoType_)
+ {
+ case HO_TY_HANDOVER:
+ // Abort ho
+
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_T103_TIMEOUT;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+ initData();
+
+ return(CC_RELEASE_CALL);
+
+ break;
+
+ case HO_TY_HANDMSC3:
+ // Abort h3 at MSC-B'
+
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_T103_TIMEOUT;
+
+ sendVcMsgH3(MODULE_CC, MODULE_CC);
+
+ // Abort hb at MSC-B
+
+ vcOutMsg.msgData.perfHandbackNack.cause = JC_FAILURE_T103_TIMEOUT;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ initHandmsc3Data();
+ initData();
+
+ return(CC_RELEASE_CALL);
+
+ break;
+
+ case HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR:
+
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_TVB_TIMEOUT;
+
+ sendVcMsgH3(MODULE_CC, MODULE_CC);
+
+ //Send HANDBACK Nack to MSC which triggered PERFORM HANDBACK
+ hoEndCause_ = MC_HO_T204_TIMEOUT;
+ sendEndHandover();
+ initData();
+
+ DBG_LEAVE();
+ return (CC_RELEASE_HOCALLLEG);
+
+ default:
+ //Deadly problem, need shoubleshooting first before running ahead !
+ JCCLog2 ("CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ DBG_ERROR ("CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ // empty the queues now that the handover failed
+ emptyRRQueue ();
+ emptyDownlinkQueue();
+ emptyMMQueue ();
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //HO<xxu:02-23-00> handle h3 release
+ JCCEvent_t
+ CCAnchorHandover::handleAnchPostH3Rls(void)
+ {
+
+ DBG_FUNC("CCAnchorHandover::handleAnchPostH3Rls", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ switch(hoType_)
+ {
+ case HO_TY_HANDOVER:
+ case HO_TY_HANDBACK:
+ case HO_TY_HANDMSC3:
+
+ // cancel any timers running
+ parent->sessionTimer->cancelTimer();
+
+ // Send Abort Handover to new Target ViperCell.
+
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_BASE;
+
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ //Cleanup of MSC-A to MSC-B' part
+
+ sendVcMsgH3(MODULE_CC, MODULE_CC);
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = h3RtpSession_;
+
+ if (h3RtpSession_ != NULL)
+ {
+ if ((csuResult = csu_OrigTermBreakAll(&rtpSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog3("CSU Error @anch-PostH3Rls : break h3RtpHandle Failure, (hoType:%d) (Result:%d) (h3Port:%x)\n",
+ hoType_,
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler);
+ DBG_ERROR("CSU Error @anch-PostH3Rls : break h3RtpHandle Failure, (hoType:%d) (Result:%d) (h3Port:%x)\n",
+ hoType_,
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler);
+
+ // Can only generate OA&M log.
+ }
+
+ // Release the H3 RTP channel
+
+ ReleaseHandoverRtpChannel(h3RtpSession_);
+ } else
+ {
+ JCCLog2("CSU Warning @anch-PostH3Rls : h3RtpHandle is NULL (hoType:%d, hoState %d)\n",
+ hoType_, hoState_);
+ DBG_WARNING("CSU Warning @anch-PostH3Rls : h3RtpHandle is NULL (hoType:%d, hoState %d)\n",
+ hoType_, hoState_);
+ }
+
+
+ h3SimplexConnected_ = false;
+ h3RtpSession_ = NULL;
+
+ initHandmsc3Data();
+
+ default:
+ {
+ DBG_TRACE ("CC Info @anch-handleAnchPostH3Rls: doing nothing (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ DBG_LEAVE();
+ return(CC_MESSAGE_PROCESSING_COMPLT);
+ }
+ }
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ //HO<xxu:02-01-00>
+ JCCEvent_t
+ CCAnchorHandover::handleAnchPostHoRls(void)
+ {
+
+ DBG_FUNC("CCAnchorHandover::handleAnchPostHoRls", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // cancel any timers running
+ parent->sessionTimer->cancelTimer();
+
+ switch(hoType_)
+ {
+ case HO_TY_HANDOVER:
+ // Send Abort Handover to the Target ViperCell and release call
+
+ DBG_TRACE("CC HO INFO @anch-postHoRls: got RLS during HO (hoType %d) (hoState %d)\n",
+ hoType_, hoState_);
+
+ cleanHoCallWiCause(INTER_VC_CC_ABORT_HANDOVER, JC_FAILURE_OTGT_CALL_RLS);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+
+ break;
+
+ case HO_TY_HANDBACK:
+
+ // Send Abort Handback to the Anchor ViperCell and release call
+
+ DBG_TRACE("CC HO INFO @anch-postHoRls: got RLS during HB (hoType %d) (hoState %d)\n",
+ hoType_, hoState_);
+
+ cleanHoCallWiCause(INTER_VC_CC_ABORT_HANDOVER, JC_FAILURE_OTGT_CALL_RLS);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+
+ break;
+
+ case HO_TY_HANDMSC3:
+ // Process in terms of where H3 is progressing now
+
+ switch(hoState_)
+ {
+ case HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ:
+ // Just give up H3 effort and release call
+
+ initHandmsc3Data();
+ cleanHoCallWiCause(INTER_VC_CC_ABORT_HANDOVER,JC_FAILURE_OTGT_CALL_RLS);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+
+ break;
+
+ case HAND_ST_ANCH_SND_H3_REQ:
+ // Proceed in terms of where RLS is from old or new tgt cell
+
+ //GCELL<tyu:06-01-01>
+ if (vcInMsg->origVcId.cellId == h3GlobalCellId_.ci && vcInMsg->origVcId.networkId == h3GlobalCellId_.lac)
+ {
+ // Give up H3 effort but maintain current HO
+
+ cleanH3CallWiCause(INTER_VC_CC_ABORT_HANDOVER,JC_FAILURE_NTGT_CALL_RLS);
+ cleanHoCallWiCause(INTER_VC_CC_PERFORM_HANDBACK_NACK,JC_FAILURE_NTGT_CALL_RLS);
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+ //GCELL<tyu:06-01-01>
+ } else if (vcInMsg->origVcId.cellId == hoGlobalCellId_.ci && vcInMsg->origVcId.networkId == hoGlobalCellId_.lac)
+ {
+ // Release this call and cleanup call environment
+
+ // Abort both the H3 effort and current HO, release call
+ cleanH3CallWiCause(INTER_VC_CC_ABORT_HANDOVER,JC_FAILURE_NTGT_CALL_RLS);
+ cleanHoCallWiCause(INTER_VC_CC_ABORT_HANDOVER,JC_FAILURE_NTGT_CALL_RLS);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+
+ } else
+ {
+ // Log this wrong landed message and release call for trouble shoot
+
+ //GCELL<tyu:06-01-01>
+ DBG_ERROR ("CC Error @anch-postHoRls: messup ho(%d, %d) cellId(rx %d, ho %d, h3 %d)\n",
+ hoType_, hoState_,
+ vcInMsg->origVcId.cellId,
+ hoGlobalCellId_.ci, h3GlobalCellId_.ci);
+
+ // Abort both the H3 effort and current HO, release call
+ cleanH3CallWiCause(INTER_VC_CC_ABORT_HANDOVER,JC_FAILURE_NTGT_CALL_RLS);
+ cleanHoCallWiCause(INTER_VC_CC_ABORT_HANDOVER,JC_FAILURE_NTGT_CALL_RLS);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+
+ }
+
+ break;
+
+ case HAND_ST_ANCH_RCV_H3_REQ_ACK:
+ // Simply abort both H3 and HO now, also release call. Improve later!
+ cleanH3CallWiCause(INTER_VC_CC_ABORT_HANDOVER,JC_FAILURE_NTGT_CALL_RLS);
+ cleanHoCallWiCause(INTER_VC_CC_ABORT_HANDOVER,JC_FAILURE_NTGT_CALL_RLS);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+
+ break;
+
+ default:
+ // Ignore this H3 effort but maintain the cur HO
+ JCCLog3 ("CC Error @anch-postHoRls: messed up (hoType: %d) (hoState: %d) (cellId: %d\n",
+ hoType_, hoState_, vcInMsg->origVcId.cellId);
+ DBG_ERROR ("CC Error @anch-postHoRls: messed up (hoType: %d) (hoState: %d) (cellId: %d\n",
+ hoType_, hoState_, vcInMsg->origVcId.cellId);
+
+ // Abort both the H3 effort and current HO, release call
+ cleanH3CallWiCause(INTER_VC_CC_ABORT_HANDOVER,JC_FAILURE_NTGT_CALL_RLS);
+ cleanHoCallWiCause(INTER_VC_CC_ABORT_HANDOVER,JC_FAILURE_NTGT_CALL_RLS);
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ break;
+
+ default:
+ DBG_TRACE ("CC Info @anch-postHoRls: doing nothing (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+ }
+
+ }
+
+ //HO<xxu:02-01-00> extend to cover H3 case
+ JCCEvent_t
+ CCAnchorHandover::handleAnchPostHoMobEvent(void)
+ {
+
+ DBG_FUNC("CCAnchorHandover::handleAnchPostHoMobEvent", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ switch (vcInMsg->origModuleId)
+ {
+ case MODULE_RM:
+ // Need to call the handler in the session
+ parent->handleRRMsg(&vcInMsg->msgData.postHoMobEventData.intraL3Msg);
+ break;
+
+ case MODULE_MD:
+ // Need to call the handler in the session
+ parent->handleMobMsg(&vcInMsg->msgData.postHoMobEventData.msInMsg);
+ break;
+
+ default:
+ // late event
+ DBG_ERROR("EXT VC->CC Error: Unexpected event from (module id=%d)\n",
+ vcInMsg->origModuleId);
+
+ }
+
+ DBG_LEAVE();
+ return(CC_MESSAGE_PROCESSING_COMPLT);
+
+ }
+
+ //HO<xxu:01-27-00> sendback HoReqNack with failure cause
+ JCCEvent_t
+ CCAnchorHandover::handleAnchHoReqNackWiCos(JcFailureCause_t cause)
+ {
+ DBG_FUNC("CCAnchorHandover::handleAnchHoReqNackWiCos", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CC hb or h3 failed (cause: %d)\n", cause);
+
+ // Send the Perform Nack message.
+
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_NACK;
+ vcOutMsg.msgData.perfHandbackNack.cause = cause;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ switch (hoType_)
+ {
+ case HO_TY_HANDMSC3:
+ case HO_TY_EXT_HANDMSC3:
+ case HO_TY_MNET_NONANCHOR_HANDBACK_TO_MSC3:
+ initHandmsc3Data();
+
+ case HO_TY_HANDBACK:
+ case HO_TY_EXT_HANDBACK:
+ initHandbackData();
+ break;
+ default:
+ JCCLog2 ("CC Error: call dropped or messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ DBG_ERROR ("CC Error: call dropped or messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ break;
+ }
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //HO<xxu:01-28-00> Abort ho or h3 with a specific cause given
+ JCCEvent_t
+ CCAnchorHandover::handleAnchAbortWiCos(JcFailureCause_t cause)
+ {
+ DBG_FUNC("CCAnchorHandover::handleAnchAbortWiCos", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // Assume no retry is needed based on candidate list
+
+ // Send Abort Handover to the Target ViperCell.
+
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = cause;
+
+ switch(hoType_)
+ {
+
+ case HO_TY_HANDMSC3:
+ sendVcMsgH3(MODULE_CC, MODULE_CC);
+
+ // Release the H3 RTP channel
+ ReleaseHandoverRtpChannel(h3RtpSession_);
+ h3RtpSession_ = NULL;
+ initHandmsc3Data();
+
+ case HO_TY_HANDOVER:
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ // Release the Ho RTP channel
+ ReleaseHandoverRtpChannel(hoRtpSession_);
+ hoRtpSession_ = NULL;
+ initData();
+
+ break;
+
+ default:
+ JCCLog2 ("CC Error: call dropped or messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ DBG_ERROR ("CC Error: call dropped or messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ break;
+ }
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //HO<xxu:02-06-00>
+ JCCEvent_t
+ CCAnchorHandover::cleanHoCallWiCause(InterVcMsgType_t msg, JcFailureCause_t cause)
+ {
+ DBG_FUNC("CCAnchorHandover::cleanHoCallWiCause", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // Send Abort Handover to the Target ViperCell.
+
+ vcOutMsg.msgType = msg;
+ vcOutMsg.msgData.abortHandover.cause = cause;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ // break connection
+ if (msg==INTER_VC_CC_ABORT_HANDOVER)
+ {
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = hoRtpSession_;
+
+ if (hoRtpSession_ != NULL)
+ {
+ if ((csuResult = csu_OrigTermBreakAll(&rtpSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog3("CSU Error @anch-cleanHoCallWiCause : break hoRtpHandle Failure, (hoType:%d) (Result:%d) (hoPort:%x)\n",
+ hoType_,
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler);
+ DBG_ERROR("CSU Error @anch-cleanHoCallWiCause : break hoRtpHandle Failure, (hoType:%d) (Result:%d) (hoPort:%x)\n",
+ hoType_,
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler);
+
+ // Can only generate OA&M log.
+ }
+
+ // Release the Ho RTP channel
+
+ ReleaseHandoverRtpChannel(hoRtpSession_);
+
+ } else
+ {
+ JCCLog2("CSU Warning @anch-cleanHoCallWiCause : hoRtpHandle is NULL (hoType:%d, hoState %d)\n",
+ hoType_, hoState_);
+ DBG_WARNING("CSU Warning @anch-cleanHoCallWiCause : hoRtpHandle is NULL (hoType:%d, hoState %d)\n",
+ hoType_, hoState_);
+ }
+
+ hoSimplexConnected_ = false;
+ hoRtpSession_ = NULL;
+
+ initData();
+ }
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+ }
+
+ //HO<xxu:02-06-00>
+ JCCEvent_t
+ CCAnchorHandover::cleanH3CallWiCause(InterVcMsgType_t msg, JcFailureCause_t cause)
+ {
+ DBG_FUNC("CCAnchorHandover::cleanH3CallWiCause", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ // Send Abort Handover to the Target ViperCell.
+
+ vcOutMsg.msgType = msg;
+ vcOutMsg.msgData.abortHandover.cause = cause;
+
+ sendVcMsgH3(MODULE_CC, MODULE_CC);
+
+ // break connection
+ if (msg==INTER_VC_CC_ABORT_HANDOVER)
+ {
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = h3RtpSession_;
+
+ if (hoRtpSession_ != NULL)
+ {
+ if ((csuResult = csu_OrigTermBreakAll(&rtpSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog3("CSU Error @anch-cleanH3CallWiCause : break h3RtpHandle Failure, (hoType:%d) (Result:%d) (hoPort:%x)\n",
+ hoType_,
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler);
+ DBG_ERROR("CSU Error @anch-cleanH3CallWiCause : break h3RtpHandle Failure, (hoType:%d) (Result:%d) (hoPort:%x)\n",
+ hoType_,
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler);
+
+ // Can only generate OA&M log.
+ }
+
+ // Release the Ho RTP channel
+
+ ReleaseHandoverRtpChannel(h3RtpSession_);
+
+ } else
+ {
+ JCCLog2("CSU Warning @anch-cleanH3CallWiCause : h3RtpHandle is NULL (hoType:%d, hoState %d)\n",
+ hoType_, hoState_);
+ DBG_WARNING("CSU Warning @anch-cleanH3CallWiCause : h3RtpHandle is NULL (hoType:%d, hoState %d)\n",
+ hoType_, hoState_);
+ }
+
+ h3SimplexConnected_ = false;
+ h3RtpSession_ = NULL;
+
+ initHandmsc3Data();
+ }
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+ }
+
+ //HO<xxu:05-01-00> handle to btw anchor and VB
+ JCCEvent_t
+ CCAnchorHandover::handleAnchTvbTimerExpiry(void)
+ {
+ DBG_FUNC("CCAnchorHandover::handleAnchTvbTimerExpiry", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ switch (hoType_)
+ {
+ case HO_TY_HANDOVER:
+ //handover failed at the stage of target IP address resolution
+
+ DBG_ERROR ("CC->VB Link Timeout: Failed on Tvb expiry (hoSt %d, hoTyp %d)\n",
+ hoState_, hoType_);
+ initData();
+ DBG_LEAVE();
+
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+ break;
+
+ case HO_TY_HANDMSC3:
+ //Handmsc3 failed at the stage of target IP-address resolution
+
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_TVB_TIMEOUT;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ //Cleanup h3
+ initHandmsc3Data();
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+ break;
+
+ case HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR:
+ //Handmsc3 (to MNET) failed at the state of target IP-address resolution
+
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_TVB_TIMEOUT;
+
+ sendVcMsgH3(MODULE_CC, MODULE_CC);
+
+ //Send HANDBACK Nack to MSC which triggered PERFORM HANDBACK
+ hoEndCause_ = MC_HO_T204_TIMEOUT;
+ sendHandbackNack();
+ initExtHandbackData();
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+ default:
+ //Deadly problem, release call and troubleshoot asap!
+ DBG_ERROR("CC Ho Error: messed up at (hoSt %d, hoTyp %d, rc %d)\n",
+ hoState_, hoType_, hoRetry_);
+
+ return(CC_RELEASE_CALL);
+ break;
+ }
+
+ // Treating like a Handover Failure will behave as required.
+ // Skip event loop.
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+ }
+
+ // ext-HO <chenj:05-29-01>
+ int
+ CCAnchorHandover::handleHoaCcMsg(InterHoaVcMsg_t *hoaCcInMsg)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleHoaCcMsg): entering......\n}\n");
+
+ CCHandover::handleHoaCcMsg(hoaCcInMsg); // Set currEvent according to msg received
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleHoaCcMsg): leaving.\n}\n");
+ return (smHandleEvent());
+ }
+
+ // ext-HO <chenj:06-29-01>
+ JCCEvent_t
+ CCAnchorHandover::do_MNET_Handback_scenario(void)
+ {
+ DBG_FUNC("CCAnchorHandover::do_MNET_Handback_scenario", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ initHandbackData();
+
+ DBG_TRACE("vcB->vcA: hb is requested (hoType:%d, hoState:%d)\n",
+ hoType_, hoState_);
+
+ // Build a message for MM for Handover Req.
+ // Fill the data for MM message
+ mmOutMsg.l3_data.handReq.channelType.bearerType = BEARER_SPEECH;
+ mmOutMsg.l3_data.handReq.channelType.speechChann = parent->currSpeechCh();
+
+ //CIPH<xxu:02-10-00>Begin
+
+ IntraL3CipherModeCommand_t cipherCmd;
+ if (ludbGetCipherAlgo(parent->ludbIndex, &cipherCmd))
+ {
+ //handling error return
+ JCCLog1 ("CC->Handover Error: ludbGetCipherAlgo() failed, (ludbIndex = %d)\n",
+ parent->ludbIndex);
+ DBG_ERROR ("CC->Handover Error: ludbGetCipherAlgo() failed, (ludbIndex = %d)\n",
+ parent->ludbIndex);
+ cipherCmd.cmd.cipherModeSetting.ciphering = CNI_RIl3_CIPHER_NO_CIPHERING;
+ }
+
+ DBG_TRACE("CC->@anch:PerfHb(a2r): ludbIndex %d, bearer %d, spchVer %d, ciphSet %d, algo %d, kc(%x,%x)\n",
+ parent->ludbIndex,
+ vcOutMsg.msgData.perfHandoverReq.channelType.bearerType,
+ vcOutMsg.msgData.perfHandoverReq.channelType.speechChann.version,
+ cipherCmd.cmd.cipherModeSetting.ciphering,
+ cipherCmd.cmd.cipherModeSetting.algorithm,
+ cipherCmd.Kc[0],cipherCmd.Kc[1],
+ cipherCmd.Kc[0],cipherCmd.Kc[2]);
+
+ memcpy( (unsigned char*) &(mmOutMsg.l3_data.handReq.cipherCmd),
+ (unsigned char*) &(cipherCmd),
+ sizeof (IntraL3CipherModeCommand_t) );
+
+ //CIPH<xxu:02-10-00>End
+
+ mmOutMsg.l3_data.handReq.qid = msgQId;
+
+ // Send internal MM msg -
+ sendMM(INTRA_L3_MM_EST_REQ, INTRA_L3_RR_HANDOVER_REQ, parent->entryId, &mmOutMsg);
+
+ // Mark handover type and relevant state
+ hoType_ = HO_TY_HANDBACK;
+ hoState_ = HAND_ST_ANCH_RCV_HB_REQ;
+ DBG_LEAVE();
+ }
+
+ // ext-HO <chenj:06-29-01>
+ JCCEvent_t
+ CCAnchorHandover::do_MNET_Handback_To_Third_MNET_scenario(void)
+ {
+ VBLINK_API_CELL_LOCATION_REQUEST_MSG t_cellLocationRequest;
+
+ DBG_FUNC("CCAnchorHandover::do_MNET_Handback_To_Third_MNET_scenario", CC_HANDOVER_LAYER);
+ DBG_ENTER();
+
+ initHandmsc3Data();
+
+ if (forcedHandmsc3)
+ {
+ //GCELL<tyu:06-01-01>
+ h3GlobalCellId_ = ccHoTrgGlobalCellId;
+ h3VcIpAddress_ = ccHoTrgCellIpAddress;
+
+ } else
+ //GCELL<tyu:06-01-01>
+ h3GlobalCellId_ = vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId;
+
+ if ( (!forcedHandmsc3) || (forcedHandmsc3&&useViperBase) )
+ {
+ //H3 scenario. Go ahead to inquire IP address of mscB', later check
+ //if the mscB' is known or not.
+
+ //GCELL<tyu:06-01-01> BEGIN
+ DBG_TRACE("vcB->vcA: h3 is requested (hoType %d; hoState %d) (mcc %x%x%x, mnc %x%x%x, lac %d; ci %d)\n",
+ hoType_, hoState_, h3GlobalCellId_.mcc[0],h3GlobalCellId_.mcc[1],h3GlobalCellId_.mcc[2],
+ h3GlobalCellId_.mnc[0],h3GlobalCellId_.mnc[1],h3GlobalCellId_.mnc[2],h3GlobalCellId_.lac, h3GlobalCellId_.ci);
+
+ sprintf(&(t_cellLocationRequest.ViperCellId[0]), "%d:%d", h3GlobalCellId_.lac,h3GlobalCellId_.ci);
+ //GCELL<tyu:06-01-01> END
+
+ t_cellLocationRequest.TxnId = callIndex;
+
+ if (VBLinkLocationRequest(t_cellLocationRequest)
+ == false)
+ {
+ // Ignore the message
+ DBG_ERROR ("vcA->VB Link Error: h3 failed on calling VBLinkLocationRequest()(%d,%d)\n",
+ hoType_, hoState_);
+ DBG_LEAVE();
+ return (handleAnchHoReqNackWiCos(JC_FAILURE_ANCH_VB_LINK_PROBLEM));
+ }
+
+ //RETRY<xxu:04-21-00> BEGIN
+ // start the VB timer
+ hoRetry_ = 0;
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_TVB);
+ //RETRY<xxu:04-21-00> END
+
+ //MSC-B' born here while MSC-B is still alive. Mark handover type and relevant state
+ //GCELL<tyu:06-01-01>
+ h3GlobalCellId_ = vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId;
+ hoType_ = HO_TY_HANDMSC3;
+ hoState_ = HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ;
+
+ } else
+ {
+ //MSC-B' born here while MSC-B is still alive. Mark handover type and relevant state
+ hoType_ = HO_TY_HANDMSC3;
+ hoState_ = HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ;
+
+ DBG_LEAVE();
+ return (handleVcAddressRsp());
+ }
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ // ext-HO <chenj:06-29-01>
+ JCCEvent_t
+ CCAnchorHandover::do_MNET_Handback_To_External_PLMN_scenario(void)
+ {
+ A_Result_t A_result;
+ NonStdRasMessagePerformHandoverRQ_t Msg;
+ T_AIF_MessageUnit a_msg;
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::do_MNET_Handback_To_External_PLMN_scenario): entering......\n}\n");
+ initHandmsc3Data();
+
+ DBG_TRACEho(" Handback to External THIRD PLMN is requested (hoType:%d, hoState:%d)\n",
+ hoType_, hoState_);
+
+ h3GlobalCellId_ = vcInMsg->msgData.perfHandbackReq.globalCellId.candGlobalCellId;
+
+ // Set aifMsg's HANDOVER REQUEST A INTERFACE values
+ // JOE: Inter-GP10 handback currently does not give SERVING CELL ID...
+ // the code needs to be enhanced to pass back this value.
+ // For now, use MY_GLOBALCELL_ID as the serving_cell id.
+ populateAHandoverRequest( &MY_GLOBALCELL_ID, &h3GlobalCellId_);
+
+ if ((A_result = AIF_Encode( &aifMsg, &a_msg )) != A_RESULT_SUCCESS)
+ {
+ // Couldn't encode Perform Handover A-Interface msg.
+ DBG_ERRORho (" A Interface encoding Error: Perform Handver Request. Result (%d)\n",
+ (int) A_result);
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::do_MNET_Handback_To_External_PLMN_scenario): leaving.\n}\n");
+ return (handleAnchHoReqNackWiCos(JC_FAILURE_A_INTERFACE_MESSAGE_ENCODING_FAILED));
+ }
+
+ memset( (char*)&Msg, 0, sizeof(NonStdRasMessagePerformHandoverRQ_t));
+
+ Msg.A_HANDOVER_REQUEST.msglength = a_msg.msgLength;
+ memcpy(Msg.A_HANDOVER_REQUEST.A_INTERFACE_DATA,
+ (unsigned char*)a_msg.buffer, MAX_A_INTERFACE_LEN);
+
+ Msg.header.origSubId = callIndex;
+ // Note: need to put -1 as hoAgId since this requires GMC to create a new HOA
+ Msg.header.destSubId = -1; // NULL (unknown hoAgId - GMC will assign)
+ Msg.globalCellID = h3GlobalCellId_;
+ Msg.hoCause = vcInMsg->msgData.perfHandbackReq.hoCause;
+ Msg.hoNumberReqd = true; // Always TRUE
+ Msg.handoverNumber.ie_present = false; // NULL (unknown handoverNumber - GMC will assign)
+ Msg.mscNumber.ie_present = false; // NULL (unknown mscNumber - GMC will find out)
+
+ DBG_TRACEho(" MESSAGE DATA:\n");
+ DBG_TRACEho(" : hoAgId_=%d, callId=%d\n",hoAgId_, callIndex);
+ DBG_TRACEho(" : h3GlobalCellId_ (type=%d, mcc[1-3]:%x,%x,%x; mnc[1-3]:%x,%x,%x;lac=%x,ci=%x)\n",
+ h3GlobalCellId_.ci_disc,hoGlobalCellId_.mcc[0],h3GlobalCellId_.mcc[1],h3GlobalCellId_.mcc[2],
+ h3GlobalCellId_.mnc[0],h3GlobalCellId_.mnc[1],h3GlobalCellId_.mnc[2],h3GlobalCellId_.lac,hoGlobalCellId_.ci);
+ DBG_TRACEho(" : hoCause=SET TO 0 FOR NOW\n");
+
+
+ DBG_TRACEho(" a_msg.buffer POST-AIF PROCESSING MESSAGE DATA: A_HANDOVER_REQUEST_TYPE\n");
+ DBG_TRACEho(" {\n");
+ DBG_TRACEho(" \na_msg.buffer hexdump: ");
+ DBG_HEXDUMPho((unsigned char*) a_msg.buffer, a_msg.msgLength);
+ DBG_TRACEho("\n }\n");
+
+
+ DBG_TRACEho(" MSG POST-AIF PROCESSING MESSAGE DATA: A_HANDOVER_REQUEST_TYPE\n");
+ DBG_TRACEho(" {\n");
+ DBG_TRACEho(" \nMsg hexdump: ");
+ DBG_HEXDUMPho((unsigned char*) &Msg, sizeof (NonStdRasMessagePerformHandoverRQ_t) );
+ DBG_TRACEho("\n }\n");
+
+
+ if (VBLinkPerformHandoverRequest(&Msg)
+ == false)
+ {
+ // Ignore the message
+ DBG_ERRORho (" CC->VB Link ERROR: Failed on Perform Handver Request Message\n}\n");
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::do_Handover_To_Third_PLMN_scenario): leaving.\n}\n");
+ return (handleAnchHoReqNackWiCos(JC_FAILURE_ANCH_VB_LINK_PROBLEM));
+ }
+
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_TVB);
+
+ hoType_ = HO_TY_MNET_NONANCHOR_HANDBACK_TO_MSC3;
+ hoState_ = HAND_ST_ANCH_PERF_EHO_H3_REQ;
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::do_MNET_Handback_To_External_PLMN_scenario): leaving.\n}\n");
+ }
+
diff --git a/data/mnet/GP10/Host/cc/src/CCHoSrcHndExt.cpp b/data/mnet/GP10/Host/cc/src/CCHoSrcHndExt.cpp
new file mode 100644
index 0000000..d6ca196
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CCHoSrcHndExt.cpp
@@ -0,0 +1,2350 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCHoSrcHndExt.cpp
+// Author(s) : Joe Chen
+// Create Date : 05-30-01
+// Description : External Handover Event handlers for Anchor Session
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+
+#include "CC/CCHandover.h"
+
+#include "CC/CCSessionHandler.h"
+
+#include "CC/CCUtil.h"
+
+#include "CC/CallConfig.h"
+#include "CC/CCInt.h"
+#include "CC/CCH323Util.h"
+
+#include "jcc/JCCLog.h"
+#include "logging/VCLOGGING.h"
+
+#include "stdio.h"
+
+// Temporarily use csu_head instead of csu_intf
+#include "csunew/csu_head.h"
+
+#include "CC/hortp.h"
+
+#include "lapdm/cni_debug.h"
+
+#include "logging/VCLOGGING.h"
+
+#include "strLib.h"
+
+#include "string.h"
+
+#include "pm/pm_class.h"
+
+#include "voip/vblink.h"
+
+#include "voip/exchangeho.h"
+#include "CC/A_Handover_Request_Msg.h"
+#include "CC/A_Handover_Request_Ack_Msg.h"
+#include "jcc/LUDBApi.h"
+
+#include "ril3/ril3md.h"
+
+//CDR <xxu:08-22-00> BEGIN
+#include "CDR/CdrVoiceCall.h"
+
+#include "CC/A_Handover_Common.h"
+
+extern bool forcedHandover;
+extern bool useViperBase;
+extern bool forcedHandmsc3;
+extern GlobalCellId_t MY_GLOBALCELL_ID;
+extern GlobalCellId_t ccHoTrgGlobalCellId;
+extern UINT32 ccHoTrgCellIpAddress;
+extern BtsBasicPackage ccBtsBasicPackage;
+
+// Logging scripts
+extern void ViperLogSetModuleFilters(int module_id,short severity_level);
+extern void ccDataPrint();
+extern void mmDataPrint();
+extern void irtDataPrint();
+extern void csu_ShowAllSrcTable();
+extern void intg_ShowRmChans();
+extern void VoipShowAllCalls();
+extern void handoverRtpDataPrint();
+
+
+// *******************************************************************
+// Testing scripts
+// *******************************************************************
+
+void
+hologs()
+{
+ ViperLogSetModuleFilters( 0, 0x1ff); // CC Layer
+ ViperLogSetModuleFilters( 1, 0x1ff); // CC Session
+ ViperLogSetModuleFilters( 2, 0x1ff); // CC CallLeg
+ ViperLogSetModuleFilters( 4, 0x1ff); // CC HalfCall
+ ViperLogSetModuleFilters( 5, 0x1ff); // CC Handover
+ ViperLogSetModuleFilters( 7, 0x1ff); // CC EI
+ ViperLogSetModuleFilters( 8, 0x1ff); // CC EO
+ ViperLogSetModuleFilters( 9, 0x1ff); // CC HO
+ ViperLogSetModuleFilters( 10, 0x1ff); // CC ETRG
+ ViperLogSetModuleFilters( 75, 0x1ff); // H323
+ ViperLogSetModuleFilters( 76, 0x1ff); // H323 Protocol
+ ViperLogSetModuleFilters( 80, 0x1ff); // VBLINK
+ ViperLogSetModuleFilters(225, 0x1ff); // RM Layer
+}
+
+void
+hologsoff()
+{
+ ViperLogSetModuleFilters( 1000, 0); // Turn off logging
+}
+
+void
+showalltxt()
+{
+ ccDataPrint();
+// mmDataPrint();
+// irtDataPrint();
+ csu_ShowAllSrcTable();
+// intg_ShowRmChans();
+// VoipShowAllCalls();
+ handoverRtpDataPrint();
+}
+
+
+// *******************************************************************
+// External Handover functions.
+// *******************************************************************
+
+ JCCEvent_t
+ CCAnchorHandover::ExtPerformHO(void)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::ExtPerformHO): entering......\n}\n");
+
+ TwoPartyCallLeg *whichLeg;
+ NonStdRasMessagePerformHandoverRQ_t Msg;
+ T_AIF_MessageUnit a_msg;
+ A_Result_t A_result;
+
+
+ DBG_TRACEho(" Got an external handover candidate!\n");
+
+ // as long as handover is allowed, active leg is mandatory here.
+ if ((whichLeg = parent->activeLeg()) == NULL)
+ {
+ // abort handover
+ DBG_TRACEho(" WARNING: No active leg (hoType %d, hoState %d)\n}\n", hoType_, hoState_);
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::ExtPerformHO): leaving.\n}\n");
+ return (JCC_NULL_EVENT);
+ }
+
+ // Set aifMsg's HANDOVER REQUEST A INTERFACE values
+ populateAHandoverRequest( &MY_GLOBALCELL_ID, &hoGlobalCellId_ );
+
+ if ((A_result = AIF_Encode( &aifMsg, &a_msg )) != A_RESULT_SUCCESS)
+ {
+ // Couldn't encode Perform Handover A-Interface msg.
+ DBG_ERRORho (" A Interface encoding Error: Perform Handver Request. Result (%d)\n",
+ (int) A_result);
+ initData();
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::ExtPerformHO): leaving.\n}\n");
+ return (JCC_NULL_EVENT);
+ }
+
+ memset( (char*)&Msg, 0, sizeof(NonStdRasMessagePerformHandoverRQ_t));
+
+ Msg.A_HANDOVER_REQUEST.msglength = a_msg.msgLength;
+ memcpy(Msg.A_HANDOVER_REQUEST.A_INTERFACE_DATA,
+ (unsigned char*)a_msg.buffer, MAX_A_INTERFACE_LEN);
+
+ Msg.header.origSubId = callIndex;
+ Msg.header.destSubId = -1; // NULL (unknown hoAgId - GMC will assign)
+ Msg.globalCellID = hoGlobalCellId_;
+ Msg.hoCause = rrInMsg->l3_data.handReqd.hoCause;
+ Msg.hoNumberReqd = true; // Always TRUE
+ Msg.handoverNumber.ie_present = false; // NULL (unknown handoverNumber - GMC will assign)
+ Msg.mscNumber.ie_present = false; // NULL (unknown mscNumber - GMC will find out)
+
+ DBG_TRACEho(" MESSAGE DATA:\n");
+ DBG_TRACEho(" : hoAgId_=%d, callId=%d\n",hoAgId_, callIndex);
+ DBG_TRACEho(" : hoGlobalCellId_ (type=%d, mcc[1-3]:%x,%x,%x; mnc[1-3]:%x,%x,%x;lac=%x,ci=%x)\n",
+ hoGlobalCellId_.ci_disc,hoGlobalCellId_.mcc[0],hoGlobalCellId_.mcc[1],hoGlobalCellId_.mcc[2],
+ hoGlobalCellId_.mnc[0],hoGlobalCellId_.mnc[1],hoGlobalCellId_.mnc[2],hoGlobalCellId_.lac,hoGlobalCellId_.ci);
+ DBG_TRACEho(" : hoCause=%d\n",rrInMsg->l3_data.handReqd.hoCause);
+
+
+ DBG_TRACEho(" a_msg.buffer POST-AIF PROCESSING MESSAGE DATA: A_HANDOVER_REQUEST_TYPE\n");
+ DBG_TRACEho(" {\n");
+ DBG_TRACEho(" \na_msg.buffer hexdump: ");
+ DBG_HEXDUMPho((unsigned char*) a_msg.buffer, a_msg.msgLength);
+ DBG_TRACEho("\n }\n");
+
+
+ DBG_TRACEho(" MSG POST-AIF PROCESSING MESSAGE DATA: A_HANDOVER_REQUEST_TYPE\n");
+ DBG_TRACEho(" {\n");
+ DBG_TRACEho(" \nMsg hexdump: ");
+ DBG_HEXDUMPho((unsigned char*) &Msg, sizeof (NonStdRasMessagePerformHandoverRQ_t) );
+ DBG_TRACEho("\n }\n");
+
+
+ if (VBLinkPerformHandoverRequest(&Msg)
+ == false)
+ {
+ // Ignore the message
+ DBG_ERRORho (" CC->VB Link ERROR: Failed on Perform Handver Request Message\n}\n");
+
+ initData();
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::ExtPerformHO): leaving.\n}\n");
+ return (JCC_NULL_EVENT);
+ }
+
+ hoState_ = HAND_ST_ANCH_PERF_EHO_REQ;
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::ExtPerformHO): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+
+ JCCEvent_t
+ CCAnchorHandover::handleExtPerformHOAck(void)
+ {
+ A_Result_t aif_result;
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): entering......\n}\n");
+
+ // cancel timer
+ parent->sessionTimer->cancelTimer();
+
+ // save HO agent ID for later transactions
+ switch( hoType_ )
+ {
+ case HO_TY_EXT_HANDOVER:
+ {
+ hoAgId_ = hoaInMsg->origSubId;
+ break;
+ }
+
+ case HO_TY_EXT_HANDMSC3:
+ case HO_TY_MNET_NONANCHOR_HANDBACK_TO_MSC3:
+ {
+ h3AgId_ = hoaInMsg->origSubId;
+ break;
+ }
+
+ default:
+ {
+ //Deadly problem, need trouble shooting first before running ahead !
+ DBG_ERRORho (" CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ initData();
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): leaving.\n}\n");
+ return (CC_RELEASE_CALL);
+ }
+ };
+
+ TwoPartyCallLeg *whichLeg;
+
+ // as long as handover is allowed, active leg is mandatory here.
+ if ((whichLeg = parent->activeLeg()) == NULL)
+ {
+ DBG_TRACEho(" No active leg (hoType %d, hoState %d)\n}\n", hoType_, hoState_);
+
+ hoEndCause_ = MC_HO_SUCCESS; // Normal takedown
+ sendEndHandover();
+ initData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): leaving.\n}\n");
+ return (CC_RELEASE_ALLHOCALLLEG);
+ }
+
+ //Decode A-interface message
+ memset( (char*)&aifMsg, 0, sizeof(T_AIF_MSG));
+
+ aif_result = AIF_Decode((T_AIF_MessageUnit*)&(hoaInMsg->msgData.perfExtHandoverAck.A_INTERFACE_MSG),
+ &aifMsg);
+ if ( aif_result != A_RESULT_SUCCESS)
+ {
+ DBG_ERRORho("{\n A-MSG decoding ERROR (err=%d, hoAgId_=%d)\nA-MSG:\n",
+ aif_result, hoAgId_);
+ DBG_HEXDUMPho(
+ (unsigned char*)&hoaInMsg->msgData.perfExtHandoverAck.A_INTERFACE_MSG.A_INTERFACE_DATA,
+ (int)hoaInMsg->msgData.perfExtHandoverAck.A_INTERFACE_MSG.msglength
+ );
+ DBG_ERRORho("\n}\n");
+
+ hoEndCause_ = MC_HO_UNEXPECTED_DATA_VALUE;
+ sendEndHandover();
+ initData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): leaving.\n}\n");
+ return (CC_RELEASE_ALLHOCALLLEG);
+ }
+
+ if (aifMsg.msgType != A_HANDOVER_REQUEST_ACK_TYPE)
+ {
+ //Unexpected A-MSG received
+ DBG_ERRORho(" UNEXPECTED A-MSG (msgType=%d,hoState_=%d)\n",
+ aifMsg.msgType, hoState_);
+
+ hoEndCause_ = MC_HO_UNEXPECTED_DATA_VALUE;
+ sendEndHandover();
+ initData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): leaving.\n}\n");
+ return (CC_RELEASE_ALLHOCALLLEG);
+ }
+
+ hoNumber_ = hoaInMsg->msgData.perfExtHandoverAck.handoverNumber;
+
+ //Received PERFORM HANDOVER REQUEST ACK message
+ DBG_TRACEho(" Received PERFORM_HANDOVER_ACK from HOA (hoType_=%d, hoAgId_=%d, callIndex=%d)\n",
+ hoType_, hoAgId_, callIndex);
+
+ switch( hoType_ )
+ {
+ case HO_TY_EXT_HANDOVER:
+ {
+ // Ready HOCallLeg and send SETUP to VoIP (PLMN) to handover number
+ if (!parent->setupOrigExtHo())
+ {
+ // SETUP to VoIP subsystem failed
+ DBG_ERRORho(" ERROR in SETUP to VoIP system failed. Handover number (ie_present=%d),(numberType=%d),(plan=%d),(numDigits=%d)\n}\n",
+ hoNumber_.ie_present, hoNumber_.numberType, hoNumber_.numberingPlan, hoNumber_.numDigits);
+ DBG_ERRORho(" : handover number digits (%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x)\n}\n",
+ hoNumber_.digits[0],hoNumber_.digits[1],hoNumber_.digits[2], hoNumber_.digits[3],hoNumber_.digits[4],
+ hoNumber_.digits[5],hoNumber_.digits[6],hoNumber_.digits[7],hoNumber_.digits[8],hoNumber_.digits[9],hoNumber_.digits[10]);
+
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendEndHandover();
+ initData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): leaving.\n}\n");
+ return (CC_RELEASE_HOCALLLEG);
+ }
+
+ // Send internal RR msg
+ rrOutMsg.l3_data.handCmd.handCmd.msgLength = (unsigned short) aifMsg.handoverRequestAck.layer3Information.length;
+ memcpy( (unsigned char*) rrOutMsg.l3_data.handCmd.handCmd.buffer,
+ (unsigned char*) aifMsg.handoverRequestAck.layer3Information.layer3Info,
+ aifMsg.handoverRequestAck.layer3Information.length );
+
+ DBG_TRACEho(" Sending RR INTRA_L3_RR_HANDOVER_COMMAND.\n");
+ DBG_TRACEho(" rrOutMsg.l3_data.handCmd.handCmd hexdump: ");
+ DBG_TRACEho("\n ");
+ DBG_HEXDUMPho((unsigned char*) &rrOutMsg.l3_data.handCmd.handCmd, rrOutMsg.l3_data.handCmd.handCmd.msgLength + 2);
+
+ sendRR(INTRA_L3_DATA, INTRA_L3_RR_HANDOVER_COMMAND, parent->entryId, &rrOutMsg);
+
+ hoState_ = HAND_ST_ANCH_RCV_EHO_REQ_ACK;
+
+ break;
+ }
+
+ case HO_TY_EXT_HANDMSC3:
+ {
+ // Ready H3CallLeg and send SETUP to VoIP (PLMN) to handover number
+ if (!parent->setupOrigExtHo3())
+ {
+ // SETUP to VoIP subsystem failed
+ DBG_ERRORho(" ERROR in SETUP to VoIP system failed. Handover number (ie_present=%d),(numberType=%d),(plan=%d),(numDigits=%d)\n}\n",
+ hoNumber_.ie_present, hoNumber_.numberType, hoNumber_.numberingPlan, hoNumber_.numDigits);
+ DBG_ERRORho(" : handover number digits (%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x)\n}\n",
+ hoNumber_.digits[0],hoNumber_.digits[1],hoNumber_.digits[2], hoNumber_.digits[3],hoNumber_.digits[4],
+ hoNumber_.digits[5],hoNumber_.digits[6],hoNumber_.digits[7],hoNumber_.digits[8],hoNumber_.digits[9],hoNumber_.digits[10]);
+
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendEndHandover();
+ initData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): leaving.\n}\n");
+ return (CC_RELEASE_ALLHOCALLLEG);
+ }
+
+ // Send Handback ACK to the MSC which originated the Perform Handover.
+ sendHandbackAck();
+
+ hoState_ = HAND_ST_ANCH_RCV_EHO_H3_REQ_ACK;
+
+ break;
+ }
+
+ case HO_TY_MNET_NONANCHOR_HANDBACK_TO_MSC3:
+ {
+ // Ready H3CallLeg and send SETUP to VoIP (PLMN) to handover number
+ if (!parent->setupOrigExtHo3())
+ {
+ // SETUP to VoIP subsystem failed
+ DBG_ERRORho(" ERROR in SETUP to VoIP system failed. Handover number (ie_present=%d),(numberType=%d),(plan=%d),(numDigits=%d)\n}\n",
+ hoNumber_.ie_present, hoNumber_.numberType, hoNumber_.numberingPlan, hoNumber_.numDigits);
+ DBG_ERRORho(" : handover number digits (%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x)\n}\n",
+ hoNumber_.digits[0],hoNumber_.digits[1],hoNumber_.digits[2], hoNumber_.digits[3],hoNumber_.digits[4],
+ hoNumber_.digits[5],hoNumber_.digits[6],hoNumber_.digits[7],hoNumber_.digits[8],hoNumber_.digits[9],hoNumber_.digits[10]);
+
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendEndHandover();
+ initData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): leaving.\n}\n");
+ return (CC_RELEASE_H3CALLLEG);
+ }
+
+ // Send Handback ACK to the MNET GP10 which originated the Perform Handover.
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK_ACK;
+
+ vcOutMsg.msgData.perfHandbackAck.handCmd.msgLength = (unsigned short) aifMsg.handoverRequestAck.layer3Information.length;
+ memcpy((char*)vcOutMsg.msgData.perfHandbackAck.handCmd.buffer,
+ (char*)aifMsg.handoverRequestAck.layer3Information.layer3Info,
+ (int) aifMsg.handoverRequestAck.layer3Information.length);
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ hoState_ = HAND_ST_ANCH_RCV_EHO_H3_REQ_ACK;
+
+ break;
+ }
+
+ default:
+ {
+ //Deadly problem, need trouble shooting first before running ahead !
+ DBG_ERRORho (" CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): leaving.\n}\n");
+ return (CC_RELEASE_HOCALLLEG);
+ }
+ };
+
+ // start the T103 timer
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_T103);
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+
+ JCCEvent_t
+ CCAnchorHandover::handleExtPerformHONack(void)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHONack): entering......\n}\n");
+
+ DBG_TRACEho(" Received Perform Handover NACK instead of ACK (hoType=%d, reason=%d, hoAgId_=%d)\n}\n",
+ hoType_, hoaInMsg->msgData.perfExtHandoverAck.reason, hoAgId_);
+
+ // cancel timer
+ parent->sessionTimer->cancelTimer();
+
+ switch( hoType_ )
+ {
+ case HO_TY_EXT_HANDOVER:
+ {
+ // set hoAgId_ to -1 since Handover NACK should have ended the HOA session.
+ hoAgId_ = -1;
+ initData();
+ break;
+ }
+
+ case HO_TY_EXT_HANDMSC3:
+ {
+ // set h3AgId_ to -1 since Handover NACK should have ended the HOA session.
+ h3AgId_ = -1;
+ sendHandbackNack();
+ initExtHandmsc3Data();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHONack): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ case HO_TY_MNET_NONANCHOR_HANDBACK_TO_MSC3:
+ {
+ // set h3AgId_ to -1 since Handover NACK should have ended the HOA session.
+ h3AgId_ = -1;
+ initHandmsc3Data(); // Put hoState_ back to HAND_ST_ANCH_HO_COMPLT
+ return (handleAnchHoReqNackWiCos(JC_FAILURE_TARGETn_PERFORM_HANDOVER_REQ_NACK));
+ }
+
+ default:
+ {
+ //Deadly problem, need trouble shooting first before running ahead !
+ DBG_ERRORho (" CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+
+ hoEndCause_ = MC_HO_SYSTEM_FAILURE;
+ sendEndHandover();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): leaving.\n}\n");
+ return (CC_RELEASE_CALL);
+ }
+ };
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHONack): leaving.\n}\n");
+ return (CC_RELEASE_HOCALLLEG);
+ }
+
+
+ JCCEvent_t
+ CCAnchorHandover::handleTrgToAnchEndHandover(void)
+ {
+ JCCEvent_t return_val = CC_MESSAGE_PROCESSING_COMPLT;
+ JcSubId_t fromHoAgId = hoaInMsg->origSubId;
+ bool late_endhandover = FALSE;
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleTrgToAnchEndHandover): entering......\n}\n");
+
+ DBG_TRACEho(" Received END HANDOVER. Info:\n");
+ DBG_TRACEho(" (hoType '%d', hoState '%d', origSubId '%d', destSubId '%d', reason '%d')\n",
+ hoType_, hoState_,
+ hoaInMsg->origSubId,
+ hoaInMsg->destSubId,
+ hoaInMsg->msgData.extEndHandover.reason);
+
+ // Check for late END HANDOVER messages
+ // One time this happens is on completion of handover to thirds
+ // the old HOA sends an END HANDOVER when old callleg is released.
+ if ( (hoAgId_ != fromHoAgId) &&
+ (h3AgId_ != fromHoAgId) )
+ {
+ // When PERFORM handover is being sent and PERFORM ACK has
+ // not been received, then hoAgId_ or h3AgId_ has not been assigned
+ // yet, so don't mark it as a late endhandover!
+ if ( ( hoState_ != HAND_ST_ANCH_PERF_EHO_REQ ) &&
+ ( hoState_ != HAND_ST_ANCH_PERF_EHO_H3_REQ ) &&
+ ( hoState_ != HAND_ST_ANCH_EHO_SND_H3_REQ) )
+ {
+ late_endhandover = TRUE;
+ }
+ }
+
+ if ( late_endhandover )
+ {
+ // This is a LATE END HANDOVER message. Discard..
+ DBG_TRACEho(" Late HOA END HANDOVER message received. (hoAgId_=%d, h3AgId_=%d, hoaInMsg->origSubId=%d)\n",
+ hoAgId_, h3AgId_, hoaInMsg->origSubId);
+ return_val = CC_MESSAGE_PROCESSING_COMPLT;
+ }
+ else
+ {
+ switch (hoType_)
+ {
+ case HO_TY_EXT_HANDOVER:
+ {
+ parent->sessionTimer->cancelTimer();
+ // set hoAgId_ to -1 since END HANDOVER received should have ended the HOA session.
+ hoAgId_ = -1;
+ initData();
+ return_val = CC_RELEASE_HOCALLLEG;
+ break;
+ }
+
+ case HO_TY_EXT_HANDBACK:
+ {
+ parent->sessionTimer->cancelTimer();
+ releaseMobAndConnRes();
+ // set hoAgId_ to -1 since END HANDOVER received should have ended the HOA session.
+ hoAgId_ = -1;
+ initData();
+ return_val = CC_RELEASE_HOCALLLEG;
+ break;
+ }
+
+ case HO_TY_EXT_HANDMSC3:
+ case HO_TY_MNET_NONANCHOR_HANDBACK_TO_MSC3:
+ case HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR:
+ {
+ if (hoAgId_ == fromHoAgId)
+ {
+ // Received END HANDOVER from 1st HO call leg.
+ hoAgId_ = -1;
+
+ // Send End Handover to THIRD MSC if required
+ if (h3AgId_ != -1)
+ {
+ sendEndHandover();
+ }
+ initData();
+ return_val = CC_RELEASE_HOCALLLEG;
+ }
+ else
+ {
+ // Received END HANDOVER from 2nd HO call leg.
+ h3AgId_ = -1;
+
+ if (hoType_ == HO_TY_MNET_NONANCHOR_HANDBACK_TO_MSC3)
+ {
+ initHandmsc3Data(); // Reset values (internal handover)
+ }
+ else
+ {
+ initExtHandmsc3Data(); // Reset values (external handover)
+ }
+
+ return_val = CC_RELEASE_H3CALLLEG;
+ }
+ break;
+ }
+
+ default:
+ {
+ //Deadly problem, need shoubleshooting first before running ahead !
+ DBG_ERRORho (" CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ initData();
+ return_val = CC_RELEASE_ALLHOCALLLEG;
+ }
+ }
+
+ emptyRRQueue ();
+ emptyDownlinkQueue();
+ emptyMMQueue ();
+ }
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleTrgToAnchEndHandover): leaving.\n}\n");
+
+ return (return_val);
+ }
+
+ JCCEvent_t
+ CCAnchorHandover::handleAnchPostExtHoRls(void)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchPostExtHoRls): entering......\n}\n");
+
+ // Send End Handover to the Target and release call
+ DBG_TRACEho(" CC HO INFO @anch-handleAnchPostExtHoRls: got RLS during HO (hoType %d) (hoState %d)\n",
+ hoType_, hoState_);
+
+ // cancel any timers running
+ parent->sessionTimer->cancelTimer();
+
+ switch(hoType_)
+ {
+ case HO_TY_EXT_HANDOVER:
+ case HO_TY_EXT_HANDBACK:
+ {
+ hoEndCause_ = MC_HO_SUCCESS;
+ sendEndHandover();
+
+ // JOE: need to map right cause value
+ parent->hoCallLeg->cleanup(CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING);
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchPostExtHoRls): leaving.\n}\n");
+ return (CC_RELEASE_CALL);
+
+ break;
+ }
+
+ case HO_TY_EXT_HANDMSC3:
+ {
+ hoEndCause_ = MC_HO_SUCCESS;
+ sendEndHandover();
+
+ // JOE: need to map right cause value
+ parent->hoCallLeg->cleanup(CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING);
+ parent->h3CallLeg->cleanup(CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING);
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchPostExtHoRls): leaving.\n}\n");
+ return (CC_RELEASE_CALL);
+
+ break;
+ }
+
+
+ case HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR:
+ {
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDOVER;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_REMOTE_END_HANDOVER;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ hoEndCause_ = MC_HO_SUCCESS;
+ sendEndHandover();
+
+ parent->hoCallLeg->cleanup(CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING);
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchPostExtHoRls): leaving.\n}\n");
+ return (CC_RELEASE_CALL);
+
+ break;
+ }
+
+ case HO_TY_MNET_NONANCHOR_HANDBACK_TO_MSC3:
+ {
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDBACK;
+ vcOutMsg.msgData.abortHandover.cause = JC_FAILURE_REMOTE_END_HANDOVER;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ hoEndCause_ = MC_HO_SUCCESS;
+ sendEndHandover();
+
+ parent->h3CallLeg->cleanup(CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING);
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchPostExtHoRls): leaving.\n}\n");
+ return (CC_RELEASE_CALL);
+
+ break;
+ }
+
+ default:
+ {
+ DBG_ERRORho(" CC Error @anch-handleAnchPostExtHoRls: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ break;
+ }
+ }
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchPostExtHoRls): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+
+ JCCEvent_t
+ CCAnchorHandover::cleanExtHoCallWiCause(InterEHOMsgType_t msg, JcFailureCause_t cause)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::cleanExtHoCallWiCause): entering......\n}\n");
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::cleanExtHoCallWiCause): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+ }
+
+ void
+ CCAnchorHandover::sendL2MsgToTargetPLMN(T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::sendL2MsgToTargetPLMN): entering......\n}\n");
+
+ //Relay the MS message received to HOA
+ NonStdRasMessagePostHandoverMobEvent_t relaymsg;
+
+ memset( (char*)&relaymsg, 0, sizeof(NonStdRasMessagePostHandoverMobEvent_t));
+
+ relaymsg.header.origSubId = callIndex;
+ relaymsg.header.destSubId = hoAgId_;
+
+ relaymsg.LAYER3PDU.LAYER3DATA[0] = 0x01; //DTAP 1st byte of Distribution Data Unit (Discrimination)
+ relaymsg.LAYER3PDU.LAYER3DATA[1] = 0x80; //DTAP 2nd byte of Distribution Data Unit (FACCH or SDCCH, SAPI0)
+
+ relaymsg.LAYER3PDU.LAYER3DATA[2] = (unsigned char) msEncodedMsg->msgLength; //length of L3 Msg followed
+
+ relaymsg.LAYER3PDU.msglength= (unsigned short) msEncodedMsg->msgLength + 3;
+
+ memcpy((char*) &(relaymsg.LAYER3PDU.LAYER3DATA[3]),
+ (char*) msEncodedMsg->buffer, //body of L3 Msg
+ (int) relaymsg.LAYER3PDU.msglength);
+
+ DBG_TRACEho(" POST MOB EVENT [==>HOA MS MESSAGE] (hoAgId=%d,callId=%d, msEncodedMsg->msgLength=%d)\n",
+ hoAgId_, callIndex, msEncodedMsg->msgLength);
+ DBG_TRACEho(" {");
+ DBG_HEXDUMPho((unsigned char*) &(relaymsg.LAYER3PDU.LAYER3DATA[0]), relaymsg.LAYER3PDU.msglength + 20 );
+ DBG_TRACEho("}\n");
+
+ if (!VBLinkPostHandoverMobEvent(&relaymsg))
+ {
+ DBG_ERRORho("{\nMNEThoERROR(CCAnchorHandover::sendRRMsgToTargetPLMN): VBLinkPostHandoverMobEvent API failed !\n}\n");
+ DBG_HEXDUMPho((unsigned char*) &relaymsg, relaymsg.LAYER3PDU.msglength + 3);
+ DBG_TRACEho("}\n");
+
+ hoEndCause_ = MC_HO_SYSTEM_FAILURE; //EHOcause
+
+ return;
+ }
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::sendL2MsgToTargetCC): leaving.\n}\n");
+ }
+
+ void
+ CCAnchorHandover::sendRRMsgToTargetPLMN(IntraL3Msg_t *rrMsg)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::sendRRMsgToTargetPLMN): entering......\n}\n");
+
+ DBG_TRACEho(" MNET does NOT forward RR Msgs to target PLMN! rrMsg message_type (%d)\n",
+ (int) rrMsg->message_type );
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::sendRRMsgToTargetPLMN): leaving.\n}\n");
+ }
+
+ void
+ CCAnchorHandover::sendMMMsgToRemotePLMN (IntraL3Msg_t *mmMsg)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::sendMMMsgToRemotePLMN): entering......\n}\n");
+
+ DBG_TRACEho(" MNET does NOT forward MM Msgs to target PLMN! mmMsg message_type (%d)\n",
+ (int) mmMsg->message_type );
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::sendMMMsgToRemotePLMN): leaving.\n}\n");
+ }
+
+
+ JCCEvent_t
+ CCAnchorHandover::handleAnchExtHoTimerExpiry(void)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoTimerExpiry): entering......\n}\n");
+
+ DBG_ERRORho(" CC Timeout: External Handover expiry (hoSt %d, hoTyp %d)\n",
+ hoState_, hoType_);
+
+ switch (hoType_)
+ {
+ case HO_TY_EXT_HANDOVER:
+ {
+ hoEndCause_ = MC_HO_T204_TIMEOUT;
+ sendEndHandover();
+ initData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoTimerExpiry): leaving.\n}\n");
+ return ( CC_RELEASE_HOCALLLEG );
+ }
+
+ case HO_TY_EXT_HANDBACK:
+ {
+ releaseMobAndConnRes();
+ hoEndCause_ = MC_HO_T204_TIMEOUT;
+ sendHandbackNack();
+ initExtHandbackData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoTimerExpiry): leaving.\n}\n");
+ return ( CC_MESSAGE_PROCESSING_COMPLT );
+ }
+
+ case HO_TY_EXT_HANDMSC3:
+ {
+ hoEndCause_ = MC_HO_T204_TIMEOUT;
+ sendHandbackNack();
+ initExtHandmsc3Data();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoTimerExpiry): leaving.\n}\n");
+ return ( CC_MESSAGE_PROCESSING_COMPLT );
+ }
+
+ case HO_TY_MNET_NONANCHOR_HANDBACK_TO_MSC3:
+ {
+ hoEndCause_ = MC_HO_T204_TIMEOUT;
+ sendEndHandover();
+ initHandmsc3Data(); // Set state back to HAND_ST_ANCH_HO_COMPLT
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoTimerExpiry): leaving.\n}\n");
+ return ( CC_RELEASE_H3CALLLEG );
+ }
+
+ default:
+ {
+ //Deadly problem, release call and troubleshoot asap!
+ DBG_ERRORho(" CC Ho Error: messed up at (hoSt %d, hoTyp %d, rc %d)\n",
+ hoState_, hoType_, hoRetry_);
+ initData();
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoTimerExpiry): leaving.\n}\n");
+ return(CC_RELEASE_ALLHOCALLLEG);
+ }
+ }
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoTimerExpiry): leaving.\n}\n");
+ return (CC_RELEASE_HOCALLLEG);
+ }
+
+
+ JCCEvent_t
+ CCAnchorHandover::handleAnchPostExtHoMobEvent(void)
+ {
+ TwoPartyCallLeg *whichLeg;
+ short discrimination_val;
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchPostExtHoMobEvent): entering......\n}\n");
+
+ // as long as handover is allowed, active leg is mandatory here.
+ if ((whichLeg = parent->activeLeg()) == NULL)
+ {
+ // abort handover
+ DBG_TRACEho(" No active leg (hoType %d, hoState %d)\n", hoType_, hoState_);
+
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendEndHandover();
+ initData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchPostExtHoMobEvent): leaving.\n}\n");
+ return (CC_RELEASE_HOCALLLEG);
+ }
+
+ discrimination_val = hoaInMsg->msgData.postExtHoMobEventData.LAYER3PDU.LAYER3DATA[0] & 0x1;
+
+ switch (discrimination_val)
+ {
+ case 0: // For BSSMAP msgs
+ {
+ DBG_TRACEho(" Received BSSMAP msg. Doing nothing.\n");
+ break;
+ }
+
+ case 1: // For DTAP msgs
+ {
+ T_CNI_RIL3MD_CCMM_MSG msMsg;
+
+ msMsg.module_id = MODULE_MD;
+ msMsg.entry_id = parent->entryId;
+ msMsg.lapdm_oid = parent->oid;
+// msMsg.l3_id
+// msMsg.sapi
+ msMsg.primitive_type = L23PT_DL_DATA_IND;
+
+ msMsg.l3_data.msgLength = hoaInMsg->msgData.postExtHoMobEventData.LAYER3PDU.LAYER3DATA[2];
+ if (msMsg.l3_data.msgLength <= CNI_LAPDM_MAX_L3MSG_LENGTH)
+ {
+ memcpy( msMsg.l3_data.buffer,
+ &(hoaInMsg->msgData.postExtHoMobEventData.LAYER3PDU.LAYER3DATA[3]),
+ msMsg.l3_data.msgLength );
+
+ DBG_TRACEho(" Handling the following Mobile Event.\n");
+ DBG_TRACEho(" - module_id (%d) \n", msMsg.module_id);
+ DBG_TRACEho(" - entry_id (%d) \n", msMsg.entry_id);
+ DBG_TRACEho(" - lapdm_oid (%d) \n", msMsg.lapdm_oid);
+ DBG_TRACEho(" - primitive_type (%d) \n", msMsg.primitive_type);
+ DBG_TRACEho(" - l3_id: unknown\n");
+ DBG_TRACEho(" - sapi: unknown\n");
+
+ DBG_TRACEho(" - l3_data HEXDUMP:\n" );
+ DBG_HEXDUMPho((unsigned char*) msMsg.l3_data.buffer, msMsg.l3_data.msgLength );
+ DBG_TRACEho("\n");
+
+ parent->handleMobMsg(&msMsg);
+ }
+ else
+ {
+ DBG_ERRORho(" Layer3 PDU TOO LONG (msgLength %d)\n", msMsg.l3_data.msgLength);
+ }
+
+ break;
+ }
+
+ default:
+ {
+ DBG_ERRORho(" UNKNOWN discrimation value (discrimination_val %d)\n", discrimination_val);
+ }
+ }
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchPostExtHoMobEvent): leaving.\n}\n");
+ return(CC_MESSAGE_PROCESSING_COMPLT);
+
+ }
+
+
+ JCCEvent_t
+ CCAnchorHandover::handleAnchExtHoReqAck(void)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoReqAck): entering......\n}\n");
+
+ // cancel timer
+ parent->sessionTimer->cancelTimer();
+
+ TwoPartyCallLeg *whichLeg;
+
+ // as long as handover is allowed, active leg is mandatory here.
+ if ((whichLeg = parent->activeLeg()) == NULL)
+ {
+ DBG_TRACEho(" No active leg (hoType %d, hoState %d)\n}\n", hoType_, hoState_);
+
+ releaseMobAndConnRes();
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendEndHandover();
+ initData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoReqAck): leaving.\n}\n");
+ return (CC_RELEASE_HOCALLLEG);
+ }
+
+ T_CNI_L3_ID newId;
+ newId.msgq_id = msgQId;
+ newId.sub_id = 0; // No sub id needed here
+
+ if (parent->setIrt (mmInMsg->entry_id, newId) == false)
+ {
+ DBG_ERRORho(" Error: Not able to setIrt\n");
+
+ releaseMobAndConnRes();
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendHandbackNack();
+ initExtHandbackData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoReqAck): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ // Setup the entry id, oid, and sapi
+ parent->entryId = mmInMsg->entry_id;
+
+ // GET OID AND SAPI
+ T_CNI_RIL3_IRT_ENTRY irtEntry;
+ irtEntry.entry_id = mmInMsg->entry_id;
+
+ if ( (CNI_RIL3_IRT_Get_Entry_by_Entry_ID(&irtEntry))
+ == false )
+ {
+ DBG_ERRORho(" CC Call Error : IRT Table problem for (entry id = %d)\n ",
+ mmInMsg->entry_id);
+
+ releaseMobAndConnRes();
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendHandbackNack();
+ initExtHandbackData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoReqAck): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ parent->oid = irtEntry.lapdm_oid;
+
+ // Send the Perform Ack message.
+
+ sendHandbackAck();
+
+ // start the T104 timer
+ parent->sessionTimer->setTimer(CALL_HAND_TRG_T104);
+
+ DBG_TRACEho(" [<==CC START TIMER T104] (hoAgId=%d, callId=%d, T104=%d)\n",
+ hoAgId_, callIndex, (int)CALL_HAND_TRG_T104);
+
+ hoState_ = HAND_ST_ANCH_SND_EHB_REQ_ACK;
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoReqAck): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+
+
+ JCCEvent_t
+ CCAnchorHandover::sendHandbackAck(void)
+ {
+ SpeechChann_t currSpeechCh;
+ int choosenEncryption;
+ T_AIF_MSG temp_aifMsg = aifMsg; // copy for ext handover to third MSC purpose
+ //Populate data for encoding A-HANDOVER-ACKNOWLEDGE message
+ A_Handover_Request_Ack_t *pRequestAck = (A_Handover_Request_Ack_t*) &aifMsg.handoverRequestAck;
+
+ //Mandatory IEs
+ pRequestAck->msgType = A_HANDOVER_REQUEST_ACK_TYPE;
+ pRequestAck->layer3Information.ie_present = true;
+ pRequestAck->layer3Information.elementIdentifier = A_LAYER3_INFORMATION_TYPE;
+
+ switch( hoType_ )
+ {
+ case HO_TY_EXT_HANDBACK:
+ {
+ pRequestAck->layer3Information.length = (unsigned char) mmInMsg->l3_data.handReqAck.handCmd.msgLength;
+ memcpy((char*)pRequestAck->layer3Information.layer3Info,
+ (char*)mmInMsg->l3_data.handReqAck.handCmd.buffer,
+ (int) mmInMsg->l3_data.handReqAck.handCmd.msgLength);
+ break;
+ }
+
+ case HO_TY_EXT_HANDMSC3:
+ {
+ pRequestAck->layer3Information.length = (unsigned char) temp_aifMsg.handoverRequestAck.layer3Information.length;
+ memcpy((char*)pRequestAck->layer3Information.layer3Info,
+ (char*)temp_aifMsg.handoverRequestAck.layer3Information.layer3Info,
+ (int) temp_aifMsg.handoverRequestAck.layer3Information.length);
+ break;
+ }
+
+ case HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR:
+ {
+ pRequestAck->layer3Information.length = (unsigned char) vcInMsg->msgData.perfHandoverAck.handCmd.msgLength;
+ memcpy((char*)pRequestAck->layer3Information.layer3Info,
+ (char*)vcInMsg->msgData.perfHandoverAck.handCmd.buffer,
+ (int) vcInMsg->msgData.perfHandoverAck.handCmd.msgLength);
+ break;
+ }
+
+ default:
+ {
+ //Deadly problem, need trouble shooting first before running ahead !
+ DBG_ERRORho (" CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ initData();
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): leaving.\n}\n");
+ return (CC_RELEASE_HOCALLLEG);
+ }
+ };
+
+ //Optional IEs
+ pRequestAck->chosenChannel.ie_present = true;
+ pRequestAck->chosenChannel.elementIdentifier = A_CHOSEN_CHANNEL_TYPE;
+ pRequestAck->chosenChannel.channelMode = 9; //speech (full/half)
+ pRequestAck->chosenChannel.channel = 4; //Eight TCH full
+
+ pRequestAck->speechVersionChosen.ie_present = true;
+ pRequestAck->speechVersionChosen.elementIdentifier= A_SPEECH_VERSION_TYPE;
+ currSpeechCh = parent->currSpeechCh();
+ if (currSpeechCh.version == CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1)
+ pRequestAck->speechVersionChosen.speechVersionId = 0x01;
+ else if (currSpeechCh.version == CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_2)
+ pRequestAck->speechVersionChosen.speechVersionId = 0x21;
+ else if (currSpeechCh.version == CNI_RIL3_GSM_HALF_RATE_SPEECH_VERSION_1)
+ pRequestAck->speechVersionChosen.speechVersionId = 0x05;
+ else
+ {
+ DBG_ERRORho(" CC Internal error (speechVer=%d)\n",
+ currSpeechCh_.version);
+
+ releaseMobAndConnRes();
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendHandbackNack();
+ initExtHandbackData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::sendHandbackAck): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ choosenEncryption = selectEncryption();
+
+ pRequestAck->chosenEncryptAlgorithm.ie_present = true;
+ pRequestAck->chosenEncryptAlgorithm.elementIdentifier = A_CHOSEN_ENCRYPTION_ALGORITHM_TYPE;
+ if (choosenEncryption == -1)
+ {
+ pRequestAck->chosenEncryptAlgorithm.algorithmId = 0x01; //no encryption used
+ } else if (choosenEncryption == CNI_RIL3_CIPHER_ALGORITHM_A51)
+ {
+ pRequestAck->chosenEncryptAlgorithm.algorithmId = 0x02; //A51 used
+ } else if (choosenEncryption == CNI_RIL3_CIPHER_ALGORITHM_A52)
+ {
+ pRequestAck->chosenEncryptAlgorithm.algorithmId = 0x03; //A52 used
+ } else
+ {
+ DBG_ERRORho(" CC Internal error (choosenEncryption=%d)\n",
+ choosenEncryption);
+
+ releaseMobAndConnRes();
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendHandbackNack();
+ initExtHandbackData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::sendHandbackAck): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //Encode A-MSG: HANDOVER REQUEST ACKNOWLEDGE
+ A_Result_t result;
+ NonStdRasMessagePerformHandbackAck_t requestAck;
+
+ memset( (char*) &requestAck, 0, sizeof(NonStdRasMessagePerformHandbackAck_t) );
+ if ( A_RESULT_SUCCESS != (result=
+ AIF_Encode(&aifMsg, (T_AIF_MessageUnit*)&requestAck.A_INTERFACE_MSG) ) )
+ {
+ DBG_ERRORho(" A-HANDOVER-REQUEST-ACKNOWLEDGE encoding failed (result=%d)\n",
+ result);
+
+ releaseMobAndConnRes();
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendHandbackNack();
+ initExtHandbackData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::sendHandbackAck): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //Send PERFORM-HANDOVER-ACK (positive) to HOA
+ //requestAck.reason = 0;
+ requestAck.header.origSubId = callIndex;
+ requestAck.header.destSubId = hoAgId_;
+ requestAck.reason = MC_HO_SUCCESS;
+
+ if (!VBLinkPerformHandbackAck(&requestAck))
+ {
+ DBG_ERRORho(" VBLinkPerformHandbackAck API failed !\n",
+ result);
+ DBG_HEXDUMPho( (unsigned char*) &requestAck,
+ (int) (requestAck.A_INTERFACE_MSG.msglength+6));
+ DBG_ERRORho("}\n");
+
+ releaseMobAndConnRes();
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendHandbackNack();
+ initExtHandbackData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::sendHandbackAck): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ DBG_TRACEho(" [==>HOA PERFORM_HANDBACK_ACK(p)] (hoAgId=%d,callIndex=%d,entryId=%d)\n}\n",
+ hoAgId_, callIndex, mmInMsg->entry_id);
+ }
+
+ JCCEvent_t
+ CCAnchorHandover::sendHandbackNack(void)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::sendHandbackNack): entering......\n}\n");
+
+ //Send HANDBACK_NACK (which is really a HANDBACK ACK with a reason code other than SUCCESS)
+ NonStdRasMessagePerformHandbackAck_t handbackAck;
+
+ memset( (char*)&handbackAck, 0, sizeof(NonStdRasMessagePerformHandbackAck_t));
+ // Note: handbackAck's A_INTERFACE_MSG will be all zeros for a NACK.
+ handbackAck.header.origSubId = callIndex;
+ handbackAck.header.destSubId = hoAgId_;
+ handbackAck.reason = hoEndCause_;
+
+ if (!VBLinkPerformHandbackAck(&handbackAck))
+ {
+ DBG_ERRORho(" VBLinkPerformHandbackAck API FAILED\n");
+ } else
+ {
+ DBG_TRACEho(" Sent to HOA HANDBACK NACK (hoAgId=%d,callId=%d,entryId=%d,reason=%d)\n",
+ hoAgId_, callIndex, parent->entryId, hoEndCause_);
+ }
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::sendHandbackNack): leaving.\n}\n");
+
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+
+ JCCEvent_t
+ CCAnchorHandover::handleAnchExtHOT104TimerExpiry(void)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHOT104TimerExpiry): entering......\n}\n");
+
+ releaseMobAndConnRes();
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendEndHandover();
+ initData();
+
+ // JOE: check 03.09 spec as to whether should release entire call (take it all down) or send END HANDOVER
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHOT104TimerExpiry): leaving.\n}\n");
+ return (CC_RELEASE_HOCALLLEG);
+ }
+
+
+ JCCEvent_t
+ CCAnchorHandover::handleAnchExtHoComplt(void)
+ {
+ TwoPartyCallLeg *whichLeg;
+ bool sig_and_voice_complete = false;
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoComplt): entering......\n}\n");
+
+ switch( hoType_ )
+ {
+ case HO_TY_EXT_HANDOVER:
+ {
+ // cancel T103 timer only if VoIP CONNECT was received.
+ if (parent->hoCallLeg->voiceConnected)
+ {
+ parent->sessionTimer->cancelTimer();
+
+ DBG_TRACEho(" [==>HOA HANDOVER-COMPLETE both signaling and voice] (hoType=%d, hoAgId=%d,callId=%d,entryId=%d)\n",
+ hoType_, hoAgId_, callIndex, parent->entryId);
+
+ sig_and_voice_complete = true;
+ }
+ else
+ {
+ DBG_TRACEho(" [==>HOA HANDOVER-COMPLETE signaling only] (hoType=%d, hoAgId=%d,callId=%d,entryId=%d)\n",
+ hoType_, hoAgId_, callIndex, parent->entryId);
+
+ sig_and_voice_complete = false;
+ }
+
+ break;
+ }
+
+ case HO_TY_EXT_HANDBACK:
+ case HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR:
+ {
+ // cancel T103 timer always
+ parent->sessionTimer->cancelTimer();
+
+ DBG_TRACEho(" [==>HOA HANDBACK-COMPLETE] (hoAgId=%d,callId=%d,entryId=%d)\n",
+ hoAgId_, callIndex, parent->entryId);
+
+ sig_and_voice_complete = true;
+ break;
+ }
+
+ case HO_TY_EXT_HANDMSC3:
+ case HO_TY_MNET_NONANCHOR_HANDBACK_TO_MSC3:
+ {
+ // cancel T103 timer only if VoIP CONNECT was received.
+ if (parent->h3CallLeg->voiceConnected)
+ {
+ parent->sessionTimer->cancelTimer();
+
+ DBG_TRACEho(" [==>HOA HANDOVER-COMPLETE both signaling and voice] (hoType=%d, hoAgId=%d, h3AgId=%d, callId=%d,entryId=%d)\n",
+ hoType_, hoAgId_, h3AgId_, callIndex, parent->entryId);
+
+ sig_and_voice_complete = true;
+ }
+ else
+ {
+ DBG_TRACEho(" [==>HOA HANDOVER-COMPLETE signaling only] (hoType=%d, hoAgId=%d, h3AgId=%d, callId=%d, entryId=%d)\n",
+ hoType_, hoAgId_, h3AgId_, callIndex, parent->entryId);
+
+ sig_and_voice_complete = false;
+ }
+
+ break;
+ }
+
+ default:
+ {
+ //Deadly problem, need trouble shooting first before running ahead !
+ DBG_ERRORho (" CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ initData();
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): leaving.\n}\n");
+ return (CC_RELEASE_ALLHOCALLLEG);
+ }
+ }
+
+ // as long as handover is allowed, active leg is mandatory here.
+ if ((whichLeg = parent->activeLeg()) == NULL)
+ {
+ DBG_TRACEho(" No active leg (hoType %d, hoState %d)\n}\n", hoType_, hoState_);
+
+ releaseMobAndConnRes();
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendEndHandover();
+ initData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): leaving.\n}\n");
+ return (CC_RELEASE_ALLHOCALLLEG);
+ }
+
+ //Do CDR
+ T_CNI_RIL3_IE_LOCATION_AREA_ID lai;
+ T_CNI_RIL3_IE_CELL_ID ci;
+
+ switch( hoType_ )
+ {
+ case HO_TY_EXT_HANDOVER:
+ {
+ ci.ie_present = true;
+ ci.value = ((short)(hoGlobalCellId_.ci));
+ lai.ie_present = true;
+ lai.mcc[0] = ((unsigned char*)&(hoGlobalCellId_.mcc))[0];
+ lai.mcc[1] = ((unsigned char*)&(hoGlobalCellId_.mcc))[1];
+ lai.mcc[2] = ((unsigned char*)&(hoGlobalCellId_.mcc))[2];
+ lai.mnc[0] = ((unsigned char*)&(hoGlobalCellId_.mnc))[0];
+ lai.mnc[1] = ((unsigned char*)&(hoGlobalCellId_.mnc))[1];
+ lai.mnc[2] = ((unsigned char*)&(hoGlobalCellId_.mnc))[2];
+ lai.lac = ((short)(hoGlobalCellId_.lac));
+ break;
+ }
+
+ case HO_TY_EXT_HANDBACK:
+ {
+ ci.ie_present = true;
+ ci.value = ((short)(ccBtsBasicPackage.bts_ci));
+ lai.ie_present = true;
+ lai.mcc[0] = ((unsigned char*)&(ccBtsBasicPackage.bts_mcc))[0];
+ lai.mcc[1] = ((unsigned char*)&(ccBtsBasicPackage.bts_mcc))[1];
+ lai.mcc[2] = ((unsigned char*)&(ccBtsBasicPackage.bts_mcc))[2];
+ lai.mnc[0] = ((unsigned char*)&(ccBtsBasicPackage.bts_mnc))[0];
+ lai.mnc[1] = ((unsigned char*)&(ccBtsBasicPackage.bts_mnc))[1];
+ lai.mnc[2] = ((unsigned char*)&(ccBtsBasicPackage.bts_mnc))[2];
+ lai.lac = ((short)(ccBtsBasicPackage.bts_lac));
+ break;
+ }
+
+ case HO_TY_EXT_HANDMSC3:
+ case HO_TY_MNET_NONANCHOR_HANDBACK_TO_MSC3:
+ case HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR:
+ {
+ ci.ie_present = true;
+ ci.value = ((short)(h3GlobalCellId_.ci));
+ lai.ie_present = true;
+ lai.mcc[0] = ((unsigned char*)&(h3GlobalCellId_.mcc))[0];
+ lai.mcc[1] = ((unsigned char*)&(h3GlobalCellId_.mcc))[1];
+ lai.mcc[2] = ((unsigned char*)&(h3GlobalCellId_.mcc))[2];
+ lai.mnc[0] = ((unsigned char*)&(h3GlobalCellId_.mnc))[0];
+ lai.mnc[1] = ((unsigned char*)&(h3GlobalCellId_.mnc))[1];
+ lai.mnc[2] = ((unsigned char*)&(h3GlobalCellId_.mnc))[2];
+ lai.lac = ((short)(h3GlobalCellId_.lac));
+ break;
+ }
+
+ default:
+ {
+ //Deadly problem, need trouble shooting first before running ahead !
+ DBG_ERRORho (" CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ initData();
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): leaving.\n}\n");
+ return (CC_RELEASE_ALLHOCALLLEG);
+ }
+ };
+
+ if ( (parent->callLeg1->msSide != NULL) &&
+ (parent->callLeg1->msSide->callState_ == HC_ST_ACTIVE) )
+ parent->callLeg1->ccCdr.handover(&lai, &ci);
+ if ( (parent->callLeg2->msSide != NULL) &&
+ (parent->callLeg2->msSide->callState_ == HC_ST_ACTIVE) )
+ parent->callLeg2->ccCdr.handover(&lai, &ci);
+ //CDR END
+
+ // Relay HANDOVER SUCCESS
+ switch( hoType_ )
+ {
+ case HO_TY_EXT_HANDOVER:
+ {
+ // Release rf and RTP connections
+ hoSimplexConnected_ = true; // JOE: so GSM RTP connections will be
+ // released in releaseMobAndConnRes()
+ releaseMobAndConnRes();
+
+ hoSimplexConnected_ = false;
+ hoSrcLinkLost_ = false;
+
+ break;
+ }
+
+ case HO_TY_EXT_HANDBACK:
+ case HO_TY_EXT_HANDMSC3:
+ case HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR:
+ {
+ // Send HANDOVER SUCCESS to PLMN
+ // Populate data for encoding A-HANDOVER-COMPLETE message
+ memset(&aifMsg, 0, sizeof(A_Handover_Complete_t));
+
+ A_Handover_Complete_t *pComplete = (A_Handover_Complete_t*) &aifMsg.handoverComplete;
+
+ //Mandatory IEs
+ pComplete->msgType = A_HANDOVER_COMPLETE_TYPE;
+
+ //Optional IEs
+ pComplete->rrCause.ie_present = true;
+ pComplete->rrCause.elementIdentifier = A_RR_CAUSE_TYPE;
+ pComplete->rrCause.rrCause = 0; //normal event
+
+ //Encode A-MSG: HANDOVER REQUEST ACKNOWLEDGE
+ A_Result_t result;
+ NonStdRasMessageHandoverSuccess_t hoSuccess;
+
+ memset( (char*) &hoSuccess, 0, sizeof(NonStdRasMessageHandoverSuccess_t) );
+ if ( A_RESULT_SUCCESS != (result=
+ AIF_Encode(&aifMsg, (T_AIF_MessageUnit*)&hoSuccess.A_INTERFACE_MSG) ) )
+ {
+ DBG_ERRORho(" A-HANDOVER-COMPLETE encoding FAILED (result=%d)\n",
+ result);
+
+ // Really caught in a bad place. Mobile has already handed back and
+ // an internal error occured. So, just continue on and hope for the best!
+ DBG_TRACEho(" Continue processing HANDOVER SUCCESS anyways.\n");
+ }
+
+ // Send HANDOVER-SUCCESS to HOA
+ hoSuccess.header.origSubId = callIndex;
+ hoSuccess.header.destSubId = hoAgId_;
+
+ if (!VBLinkHandoverSuccess(&hoSuccess))
+ {
+ DBG_ERRORho(" VBLinkHandoverSuccess API failed!\n");
+ DBG_HEXDUMPho( (unsigned char*) &hoSuccess,
+ (int) (hoSuccess.A_INTERFACE_MSG.msglength+4));
+ DBG_ERRORho("}\n");
+
+ // Really caught in a bad place. Mobile has already handed back and
+ // an internal error occured. So, just continue on and hope for the best!
+ DBG_TRACEho(" Continue processing HANDOVER SUCCESS anyways.\n");
+ }
+
+ break;
+ }
+
+ case HO_TY_MNET_NONANCHOR_HANDBACK_TO_MSC3:
+ {
+ // Non-anchor MNET GP10 to external PLMN handback
+ // Send HANDOVER SUCCESS (Complete Handback) to MNET GP10
+
+ vcOutMsg.msgType = INTER_VC_CC_COMPLETE_HANDBACK;
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ break;
+ }
+
+ default:
+ {
+ //Deadly problem, need trouble shooting first before running ahead !
+ DBG_ERRORho (" CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ initData();
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): leaving.\n}\n");
+ return (CC_RELEASE_ALLHOCALLLEG);
+ }
+ };
+
+
+ if (whichLeg->voiceConnected)
+ {
+ // Call is not held at this point for some reason.
+
+ // First take down the earlier connection
+
+ // Break the connections with the RTP Port
+ T_CSU_PORT_ID hoRtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ switch( hoType_ )
+ {
+ case HO_TY_EXT_HANDOVER:
+ {
+ // do nothing (no connections to break)
+ hoRtpSourcePort.portType = CSU_NIL_PORT;
+ break;
+ }
+
+ case HO_TY_EXT_HANDBACK:
+ case HO_TY_EXT_HANDMSC3:
+ case HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR:
+ {
+ hoRtpSourcePort.portType = CSU_RTP_PORT;
+ hoRtpSourcePort.portId.rtpHandler = VoipCallGetRTPHandle(parent->hoCallLeg->h323CallHandle);
+ break;
+ }
+
+ case HO_TY_MNET_NONANCHOR_HANDBACK_TO_MSC3:
+ {
+ hoRtpSourcePort.portType = CSU_RTP_PORT;
+ hoRtpSourcePort.portId.rtpHandler = hoRtpSession_;
+ break;
+ }
+
+ default:
+ {
+ //Deadly problem, need trouble shooting first before running ahead !
+ DBG_ERRORho (" CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ initData();
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): leaving.\n}\n");
+ return (CC_RELEASE_ALLHOCALLLEG);
+ }
+ };
+
+ if (hoRtpSourcePort.portType != CSU_NIL_PORT)
+ {
+ if ((csuResult = csu_OrigTermBreakAll(&hoRtpSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_ERRORho(" CSU Error : Ho Disconn. Failure, (Result = %d) for (rtp port = %x)\n",
+ csuResult,
+ (int)hoRtpSourcePort.portId.rtpHandler);
+
+ // Release the Ho RTP channel
+ ReleaseHandoverRtpChannel(hoRtpSourcePort.portId.rtpHandler);
+ parent->hoCallLeg->h323CallHandle = VOIP_NULL_CALL_HANDLE;
+
+ // Really caught in a bad place. Mobile has already handed back and
+ // an internal error occured. So, just continue on and hope for the best!
+ DBG_TRACEho(" Continue processing HANDOVER SUCCESS anyways.\n");
+ }
+
+ // voice is broken
+ whichLeg->voiceConnected = false;
+ }
+
+ // Complete the connection
+ // Make a duplex connection between the remote rtp channel and the rf channel
+ T_CSU_PORT_ID rfSinkPort, rtpSourcePort;
+
+ switch( hoType_ )
+ {
+ case HO_TY_EXT_HANDOVER:
+ {
+ rfSinkPort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portType = CSU_RTP_PORT;
+
+ rfSinkPort.portId.rtpHandler = VoipCallGetRTPHandle(whichLeg->h323CallHandle);
+ rtpSourcePort.portId.rtpHandler = VoipCallGetRTPHandle(parent->hoCallLeg->h323CallHandle);
+ break;
+ }
+
+ case HO_TY_EXT_HANDBACK:
+ {
+ rfSinkPort.portType = CSU_GSM_PORT;
+ rtpSourcePort.portType = CSU_RTP_PORT;
+
+ rfSinkPort.portId.gsmHandler = parent->entryId;
+ rtpSourcePort.portId.rtpHandler = VoipCallGetRTPHandle(whichLeg->h323CallHandle);
+ break;
+ }
+
+ case HO_TY_EXT_HANDMSC3:
+ case HO_TY_MNET_NONANCHOR_HANDBACK_TO_MSC3:
+ case HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR:
+ {
+ rfSinkPort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portType = CSU_RTP_PORT;
+
+ rfSinkPort.portId.rtpHandler = VoipCallGetRTPHandle(whichLeg->h323CallHandle);
+ rtpSourcePort.portId.rtpHandler = VoipCallGetRTPHandle(parent->h3CallLeg->h323CallHandle);
+ break;
+ }
+
+ default:
+ {
+ //Deadly problem, need trouble shooting first before running ahead !
+ DBG_ERRORho (" CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ initData();
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): leaving.\n}\n");
+ return (CC_RELEASE_HOCALLLEG);
+ }
+ };
+
+
+ if ((csuResult = csu_DuplexConnect(&rfSinkPort, &rtpSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+
+ DBG_ERRORho("CSU Error : Ho Duplex Conn. Failure, (Result = %d) for (rtp port = %x) and (entryId = %d)\n",
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler,
+ parent->entryId);
+
+ // Really caught in a bad place. Mobile has already handed back and
+ // an internal error occured. So, just continue on and hope for the best!
+ DBG_TRACEho(" Continue processing HANDOVER SUCCESS anyways.\n");
+
+ }
+ whichLeg->voiceConnected = true;
+
+ }
+
+ // empty the queues now that the handover is successful
+ // Do this only at the end.
+ emptyRRQueue ();
+ emptyDownlinkQueue();
+ emptyMMQueue ();
+
+ switch( hoType_ )
+ {
+ case HO_TY_EXT_HANDOVER:
+ {
+ hoState_ = HAND_ST_ANCH_EHO_COMPLT;
+ break;
+ }
+ case HO_TY_EXT_HANDBACK:
+ {
+ // Send DISCONNECT (RELEASE COMPLETE) to VoIP (PLMN)
+ parent->hoCallLeg->disconnectOrigExtHo();
+
+ initData();
+ break;
+ }
+
+ case HO_TY_EXT_HANDMSC3:
+ {
+ // Send DISCONNECT (RELEASE COMPLETE) to VoIP (PLMN)
+ parent->hoCallLeg->disconnectOrigExtHo();
+
+ // Need to swap HO with H3 data only if signalling AND voice are completed
+ if (sig_and_voice_complete)
+ {
+ swapH3Data();
+ hoType_ = HO_TY_EXT_HANDOVER;
+ }
+
+ // Note: if signalling and voice is NOT completed, leave hoType_ as
+ // it is (don't reset it to HO_TY_EXT_HANDOVER) since when
+ // voice gets completed, the hoType will signify if swapH3Data is needed.
+
+ hoState_ = HAND_ST_ANCH_EHO_COMPLT;
+ break;
+ }
+
+ case HO_TY_MNET_NONANCHOR_HANDBACK_TO_MSC3:
+ {
+ // Release Inter-GP10 RTP ports.
+ if ( hoRtpSession_ != NULL )
+ {
+ ReleaseHandoverRtpChannel(hoRtpSession_);
+ }
+
+ // Need to swap HO with H3 data only if signalling AND voice are completed
+ if (sig_and_voice_complete)
+ {
+ swapH3Data();
+ hoType_ = HO_TY_EXT_HANDOVER;
+ }
+
+ // Note: if signalling and voice is NOT completed, leave hoType_ as
+ // it is (don't reset it to HO_TY_EXT_HANDOVER) since when
+ // voice gets completed, the hoType will signify if swapH3Data is needed.
+
+ hoState_ = HAND_ST_ANCH_EHO_COMPLT;
+ break;
+ }
+
+ case HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR:
+ {
+ // clear up external handover data
+ hoAgId_ = -1;
+ h3AgId_ = -1;
+
+ // JOE: clear everything to make it look like a normal GP10 to GP10 handover took place.
+ hoType_ = HO_TY_HANDOVER;
+ hoState_ = HAND_ST_ANCH_HO_COMPLT; // Leave in state after normal inter-GP10 handover
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoComplt): leaving.\n}\n");
+ return (CC_RELEASE_ALLHOCALLLEG);
+ }
+
+ default:
+ {
+ //Deadly problem, need trouble shooting first before running ahead !
+ DBG_ERRORho (" CC Error: messed up (hoType: %d) (hoState: %d)\n",
+ hoType_, hoState_);
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): leaving.\n}\n");
+ return (CC_RELEASE_ALLHOCALLLEG);
+ }
+ };
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoComplt): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+
+ void
+ CCAnchorHandover::swapH3Data(void)
+ {
+ HOCallLeg * tempCallLeg;
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::swapH3Data): entering......\n}\n");
+
+ DBG_TRACEho(" Swapping the following handover data.\n");
+ DBG_TRACEho(" - hoAgId_ (%d) with h3AgId_ (%d)\n", hoAgId_, h3AgId_);
+ DBG_TRACEho(" - hoCallLeg (%d) with h3CallLeg (%d)\n", parent->hoCallLeg, parent->h3CallLeg);
+
+ hoAgId_ = h3AgId_;
+ h3AgId_ = -1;
+
+ tempCallLeg = parent->hoCallLeg;
+ parent->hoCallLeg = parent->h3CallLeg;
+ parent->h3CallLeg = tempCallLeg;
+ // parent->h3CallLeg->initData(); //JOE: some sort of cleanup for h3CallLeg should be done
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::swapH3Data): leaving.\n}\n");
+ }
+
+ JCCEvent_t
+ CCAnchorHandover::handleAnchExtHoFail(void)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoFail): entering......\n}\n");
+
+ DBG_TRACEho(" [<==RR HANDOVER FAILURE](callId=%d,entryId=%d)\n",
+ callIndex, parent->entryId);
+
+ //cancel T204
+ parent->sessionTimer->cancelTimer();
+
+ //Send EndHandover to Target (as opposed to HANDOVER FAILURE) specified by 03.09
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendEndHandover();
+ hoAgId_ = -1; // since EndHandover was sent.
+
+
+ //Retry next candidate if there is candidate
+ int i;
+ IntraL3HandoverRequired_t *inMsg = &handReqd;
+
+ if ( (i=getNextHoCandidate()) == (-1) )
+ {
+ DBG_TRACEho(" No more candidate to retry (#ofCands=%d)\n",
+ inMsg->numCandidates);
+
+ initData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoFail): leaving.\n}\n");
+ return (CC_RELEASE_HOCALLLEG);
+ } else
+ {
+ candGlobalCellId_t candidate;
+ candidate = inMsg->candGlobalCellId[i];
+
+ DBG_TRACEho(" Trying next cand cell! %d-th of Cands(%d) candCell(%x,%x%x%x,%x%x%x,%x,%x) hoType(%d) hoState(%d)\n",
+ i,inMsg->numCandidates,
+ candidate.candGlobalCellId.mcc[0],candidate.candGlobalCellId.mcc[1],candidate.candGlobalCellId.mcc[2],
+ candidate.candGlobalCellId.mnc[0],candidate.candGlobalCellId.mnc[1],candidate.candGlobalCellId.mnc[2],
+ candidate.candGlobalCellId.lac, candidate.candGlobalCellId.ci,
+ hoType_, hoState_);
+
+ if (candidate.candIsExternal)
+ {
+ A_Result_t A_result;
+ T_AIF_MessageUnit a_msg;
+
+ NonStdRasMessagePerformHandoverRQ_t Msg;
+
+ //External handover from anchor GP to PLMN case
+ populateAHandoverRequest( &MY_GLOBALCELL_ID, &candidate.candGlobalCellId );
+
+ if ((A_result = AIF_Encode( &aifMsg, &a_msg )) != A_RESULT_SUCCESS)
+ {
+ // Couldn't encode Perform Handover A-Interface msg.
+ DBG_ERRORho (" A Interface encoding Error: Perform Handover Request. Result (%d)\n",
+ (int) A_result);
+ initData();
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoFail): leaving.\n}\n");
+ return (CC_RELEASE_HOCALLLEG);
+ }
+
+ memset( (char*)&Msg, 0, sizeof(NonStdRasMessagePerformHandoverRQ_t));
+
+ Msg.A_HANDOVER_REQUEST.msglength = a_msg.msgLength;
+ memcpy(Msg.A_HANDOVER_REQUEST.A_INTERFACE_DATA,
+ (unsigned char*)a_msg.buffer, MAX_A_INTERFACE_LEN);
+
+ Msg.header.origSubId = callIndex;
+ // Note: destSubId (hoAgId) needs to be -1 to make GMC assign a NEW HOA.
+ Msg.header.destSubId = -1; // NULL (unknown hoAgId - GMC will assign)
+ Msg.globalCellID = hoGlobalCellId_;
+ Msg.hoCause = rrInMsg->l3_data.handReqd.hoCause;
+ Msg.hoNumberReqd = true; // Always TRUE
+ Msg.handoverNumber.ie_present = false; // NULL (unknown handoverNumber - GMC will assign)
+ Msg.mscNumber.ie_present = false; // NULL (unknown mscNumber - GMC will find out)
+
+ DBG_TRACEho(" MESSAGE DATA:\n");
+ DBG_TRACEho(" : hoAgId_=%d, callId=%d\n",hoAgId_, callIndex);
+ DBG_TRACEho(" : hoGlobalCellId_ (type=%d, mcc[1-3]:%x,%x,%x; mnc[1-3]:%x,%x,%x;lac=%x,ci=%x)\n",
+ hoGlobalCellId_.ci_disc,hoGlobalCellId_.mcc[0],hoGlobalCellId_.mcc[1],hoGlobalCellId_.mcc[2],
+ hoGlobalCellId_.mnc[0],hoGlobalCellId_.mnc[1],hoGlobalCellId_.mnc[2],hoGlobalCellId_.lac,hoGlobalCellId_.ci);
+ DBG_TRACEho(" : hoCause=%d\n",rrInMsg->l3_data.handReqd.hoCause);
+
+
+ DBG_TRACEho(" a_msg.buffer POST-AIF PROCESSING MESSAGE DATA: A_HANDOVER_REQUEST_TYPE\n");
+ DBG_TRACEho(" {\n");
+ DBG_TRACEho(" \na_msg.buffer hexdump: ");
+ DBG_HEXDUMPho((unsigned char*) a_msg.buffer, a_msg.msgLength);
+ DBG_TRACEho("\n }\n");
+
+
+ DBG_TRACEho(" MSG POST-AIF PROCESSING MESSAGE DATA: A_HANDOVER_REQUEST_TYPE\n");
+ DBG_TRACEho(" {\n");
+ DBG_TRACEho(" \nMsg hexdump: ");
+ DBG_HEXDUMPho((unsigned char*) &Msg, sizeof (NonStdRasMessagePerformHandoverRQ_t) );
+ DBG_TRACEho("\n }\n");
+
+ if (VBLinkPerformHandoverRequest(&Msg)
+ == false)
+ {
+ // Ignore the message
+ DBG_ERRORho (" CC->VB Link ERROR: Failed on Perform Handver Request Message\n}\n");
+
+ initData();
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::ExtPerformHO): leaving.\n}\n");
+ return (CC_RELEASE_HOCALLLEG);
+ }
+
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_THO);
+ hoState_ = HAND_ST_ANCH_PERF_EHO_REQ;
+
+ } else
+ {
+
+ // JOE: Do handover to this scenerio later!
+
+ DBG_TRACEho(" S/W not ready yet for handover retry to VIPERCELL!\n");
+ initData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoFail): leaving.\n}\n");
+ return (CC_RELEASE_HOCALLLEG);
+
+// //Handover from anchor GP to another GP case
+// sprintf(&(cellLocationRequest.ViperCellId[0]), "%d:%d",
+// candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+//
+// cellLocationRequest.TxnId = callIndex;
+//
+// if (false == VBLinkLocationRequest(cellLocationRequest) )
+// {
+// // Ignore the message
+// DBG_ERROR("{\nMNETeiTRACE(etrg::handleTrgHoFail): VBLinkLocationRequest failed!\n");
+// DBG_ERROR(" (hoAgId=%d callId=%d entryId=%d,lac=%d,ci=%d)\n}\n",
+// hoAgId_, callIndex, parent->entryId,
+// candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+// DBG_LEAVE();
+// return (CC_RELEASE_EH_HB);
+// }
+
+// DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgHoFail): [==>HOA IP_ADDRESS_REQ](callId=%d,entryId=%d,lac=%d,ci=%d)\n}\n",
+// callIndex, parent->entryId,
+// candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+//
+// DBG_CALL_TRACE(hoAgId_, "{\nMNETeiTRACE(etrg::handleTrgHoFail): [<==CC START TIMER Tvb](callId=%d,entryId=%d,lac=%d,ci=%d)\n}\n",
+// callIndex, parent->entryId,
+// candidate.candGlobalCellId.lac,candidate.candGlobalCellId.ci);
+//
+// parent->sessionTimer->setTimer(CALL_HAND_SRC_TVB)
+//
+// hoState_ = HAND_ST_ANCH_VC_IP_ADDRESS_REQ
+ }
+ }
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHoFail): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+
+ JCCEvent_t
+ CCAnchorHandover::handleAnchExtHandbackFail(void)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHandbackFail): entering......\n}\n");
+
+ DBG_TRACEho(" [<==RR HANDBACK FAILURE](callId=%d,entryId=%d)\n",
+ callIndex, parent->entryId);
+
+ // cancel T204
+ parent->sessionTimer->cancelTimer();
+
+ // JOE ----- What are we supposed to do on HANDBACK FAILURES?? ------
+ releaseMobAndConnRes();
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendEndHandover();
+ initData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchExtHandbackFail): leaving.\n}\n");
+ return (CC_RELEASE_HOCALLLEG);
+ }
+
+
+ JCCEvent_t
+ CCAnchorHandover::handleAnchPostExtHoHandbackEvent(void)
+ {
+ A_Result_t aif_result;
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchPostExtHoHandbackEvent): entering......\n}\n");
+
+ TwoPartyCallLeg *whichLeg;
+
+ // as long as handover is allowed, active leg is mandatory here.
+ if ((whichLeg = parent->activeLeg()) == NULL)
+ {
+ DBG_TRACEho(" No active leg (hoType %d, hoState %d)\n}\n", hoType_, hoState_);
+
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendEndHandover();
+ initData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchPostExtHoHandbackEvent): leaving.\n}\n");
+ return (CC_RELEASE_HOCALLLEG);
+ }
+
+ //Decode A-interface message
+ memset( (char*)&aifMsg, 0, sizeof(T_AIF_MSG));
+
+ aif_result = AIF_Decode((T_AIF_MessageUnit*)&(hoaInMsg->msgData.perfExtHandbackReq.A_HANDOVER_REQUEST),
+ &aifMsg);
+ if ( aif_result != A_RESULT_SUCCESS)
+ {
+ DBG_ERRORho("{\n A-MSG decoding ERROR (err=%d, hoAgId_=%d)\nA-MSG:\n",
+ aif_result, hoAgId_);
+ DBG_HEXDUMPho(
+ (unsigned char*)&hoaInMsg->msgData.perfExtHandbackReq.A_HANDOVER_REQUEST.A_INTERFACE_DATA,
+ (int)hoaInMsg->msgData.perfExtHandbackReq.A_HANDOVER_REQUEST.msglength
+ );
+ DBG_ERRORho("\n}\n");
+
+ hoEndCause_ = MC_HO_UNEXPECTED_DATA_VALUE;
+ sendHandbackNack();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchPostExtHoHandbackEvent): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ if (aifMsg.msgType != A_HANDOVER_REQUEST_TYPE)
+ {
+ //Unexpected A-MSG received
+ DBG_ERRORho(" UNEXPECTED A-MSG (msgType=%d,hoState_=%d)\n",
+ aifMsg.msgType, hoState_);
+
+ hoEndCause_ = MC_HO_UNEXPECTED_DATA_VALUE;
+ sendHandbackNack();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleExtPerformHOAck): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //Received PERFORM HANDOVER REQUEST ACK message
+ DBG_TRACEho(" Received PERFORM_HANDBACK REQUEST from HOA (hoAgId_=%d, callIndex=%d)\n",
+ hoAgId_, callIndex);
+
+ // Use the same criteria as when triggered on the anchor side.
+ if (!parent->isHandoverAllowed())
+ {
+ // Need to fix the cause value for the nack.
+ DBG_ERRORho(" External HB or H3 failed on handover disallowed.\n");
+
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendHandbackNack();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchPostExtHoHandbackEvent): leaving.\n}\n");
+ return(CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ // Store target MSC number for Perform Handover to THIRD MSC number
+ // so HOA will be able to address MAP message.
+ targetMscNumber_ = hoaInMsg->msgData.perfExtHandbackReq.mscNumber;
+
+ // Store requested encryption and channel type info for negotiation
+ reqEncrypt_ = aifMsg.handoverRequest.encryptionInformation;
+ optCurrEncrypt_ = aifMsg.handoverRequest.chosenEncryptAlgorithmServing;
+ reqChannelType_ = aifMsg.handoverRequest.channelType;
+ optCurrChannelType_ = aifMsg.handoverRequest.currentChannelType1;
+
+ DBG_TRACEho(" CC External HO Info @anch-PerfHbReq: Mcc(%x%x%x), Mnc(%x%x%x), lac(%d), ci(%d), state %d)\n",
+ hoaInMsg->msgData.perfExtHandbackReq.globalCellID.mcc[0],
+ hoaInMsg->msgData.perfExtHandbackReq.globalCellID.mcc[1],
+ hoaInMsg->msgData.perfExtHandbackReq.globalCellID.mcc[2],
+ hoaInMsg->msgData.perfExtHandbackReq.globalCellID.mnc[0],
+ hoaInMsg->msgData.perfExtHandbackReq.globalCellID.mnc[1],
+ hoaInMsg->msgData.perfExtHandbackReq.globalCellID.mnc[2],
+ hoaInMsg->msgData.perfExtHandbackReq.globalCellID.lac,
+ hoaInMsg->msgData.perfExtHandbackReq.globalCellID.ci,
+ hoState_);
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchPostExtHoHandbackEvent): leaving.\n}\n");
+
+ if (hoaInMsg->msgData.perfExtHandbackReq.externalCell)
+ {
+ return(do_Handover_To_Third_PLMN_scenario());
+ }
+ else
+ {
+ if ( isEqualGlobalCellId(&(hoaInMsg->msgData.perfExtHandbackReq.globalCellID), &MY_GLOBALCELL_ID) )
+ {
+ return(do_Handback_scenario());
+ }
+ else
+ {
+ return(do_Handback_To_Third_MNET_scenario());
+ }
+ }
+ }
+
+
+ JCCEvent_t
+ CCAnchorHandover::do_Handover_To_Third_PLMN_scenario(void)
+ {
+ A_Result_t A_result;
+ NonStdRasMessagePerformHandoverRQ_t Msg;
+ T_AIF_MessageUnit a_msg;
+ GlobalCellId_t serving_cell;
+ T_AIF_MSG temp_aifMsg = aifMsg; // copy for ext handover to third MSC purpose
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::do_Handover_To_Third_PLMN_scenario): entering......\n}\n");
+
+ initExtHandmsc3Data();
+
+ DBG_TRACEho(" External HANDBACK to THIRD PLMN is requested (hoType:%d, hoState:%d)\n",
+ hoType_, hoState_);
+
+ h3GlobalCellId_ = hoaInMsg->msgData.perfExtHandbackReq.globalCellID;
+
+ // Set aifMsg's HANDOVER REQUEST A INTERFACE values
+ serving_cell.ci_disc = 0;
+ memcpy( (char *)serving_cell.mcc,
+ (char *)aifMsg.handoverRequest.cellIdentifierServing.mcc,
+ NUM_MCC_DIGITS );
+ memcpy( (char *)serving_cell.mnc,
+ (char *)aifMsg.handoverRequest.cellIdentifierServing.mnc,
+ NUM_MNC_DIGITS );
+ serving_cell.lac = aifMsg.handoverRequest.cellIdentifierServing.lac;
+ serving_cell.ci = aifMsg.handoverRequest.cellIdentifierServing.ci;
+
+ populateAHandoverRequest( &serving_cell, &h3GlobalCellId_);
+
+ if ((A_result = AIF_Encode( &aifMsg, &a_msg )) != A_RESULT_SUCCESS)
+ {
+ // Couldn't encode Perform Handover A-Interface msg.
+ DBG_ERRORho (" A Interface encoding Error: Perform Handver Request. Result (%d)\n",
+ (int) A_result);
+
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendHandbackNack();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::do_Handover_To_Third_PLMN_scenario): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ memset( (char*)&Msg, 0, sizeof(NonStdRasMessagePerformHandoverRQ_t));
+
+ Msg.A_HANDOVER_REQUEST.msglength = a_msg.msgLength;
+ memcpy(Msg.A_HANDOVER_REQUEST.A_INTERFACE_DATA,
+ (unsigned char*)a_msg.buffer, MAX_A_INTERFACE_LEN);
+
+ Msg.header.origSubId = callIndex;
+ // Note: need to put -1 as hoAgId since this requires GMC to create a new HOA
+ Msg.header.destSubId = -1; // NULL (unknown hoAgId - GMC will assign)
+ Msg.globalCellID = h3GlobalCellId_;
+ Msg.hoCause = 0; // JOE: Do this cause later (extract from A-interface msg)
+ Msg.hoNumberReqd = true; // Always TRUE
+ Msg.handoverNumber.ie_present = false; // NULL (unknown handoverNumber - GMC will assign)
+ Msg.mscNumber.ie_present = true;
+ Msg.mscNumber = targetMscNumber_; // Send MSC number which was received on HANDBACK
+
+ DBG_TRACEho(" MESSAGE DATA:\n");
+ DBG_TRACEho(" : hoAgId_=%d, h3AgId_=%d, callId=%d\n",hoAgId_, h3AgId_, callIndex);
+ DBG_TRACEho(" : h3GlobalCellId_ (type=%d, mcc[1-3]:%x,%x,%x; mnc[1-3]:%x,%x,%x;lac=%x,ci=%x)\n",
+ h3GlobalCellId_.ci_disc,hoGlobalCellId_.mcc[0],h3GlobalCellId_.mcc[1],h3GlobalCellId_.mcc[2],
+ h3GlobalCellId_.mnc[0],h3GlobalCellId_.mnc[1],h3GlobalCellId_.mnc[2],h3GlobalCellId_.lac,hoGlobalCellId_.ci);
+ DBG_TRACEho(" : hoCause=SET TO 0 FOR NOW\n");
+ DBG_TRACEho(" : targetMscNumber_ (present=%d,numberType=%d,numberingPlan=%d,numDigits=%d)\n",
+ targetMscNumber_.ie_present,targetMscNumber_.numberType,targetMscNumber_.numberingPlan,targetMscNumber_.numDigits);
+ DBG_TRACEho(" (digits[1-10]:%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x)\n",
+ targetMscNumber_.digits[0],targetMscNumber_.digits[1],targetMscNumber_.digits[2],
+ targetMscNumber_.digits[3],targetMscNumber_.digits[4],targetMscNumber_.digits[5],
+ targetMscNumber_.digits[6],targetMscNumber_.digits[7],targetMscNumber_.digits[8],
+ targetMscNumber_.digits[9],targetMscNumber_.digits[10]);
+
+
+ DBG_TRACEho(" a_msg.buffer POST-AIF PROCESSING MESSAGE DATA: A_HANDOVER_REQUEST_TYPE\n");
+ DBG_TRACEho(" {\n");
+ DBG_TRACEho(" \na_msg.buffer hexdump: ");
+ DBG_HEXDUMPho((unsigned char*) a_msg.buffer, a_msg.msgLength);
+ DBG_TRACEho("\n }\n");
+
+
+ DBG_TRACEho(" MSG POST-AIF PROCESSING MESSAGE DATA: A_HANDOVER_REQUEST_TYPE\n");
+ DBG_TRACEho(" {\n");
+ DBG_TRACEho(" \nMsg hexdump: ");
+ DBG_HEXDUMPho((unsigned char*) &Msg, sizeof (NonStdRasMessagePerformHandoverRQ_t) );
+ DBG_TRACEho("\n }\n");
+
+
+ if (VBLinkPerformHandoverRequest(&Msg)
+ == false)
+ {
+ // Ignore the message
+ DBG_ERRORho (" CC->VB Link ERROR: Failed on Perform Handver Request Message\n}\n");
+
+ hoEndCause_ = MC_HO_SUBHO_FAILURE; // JOE: May not be best error cause.
+ sendHandbackNack();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::do_Handover_To_Third_PLMN_scenario): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_TVB);
+
+ hoType_ = HO_TY_EXT_HANDMSC3;
+ hoState_ = HAND_ST_ANCH_PERF_EHO_H3_REQ;
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::do_Handover_To_Third_PLMN_scenario): leaving.\n}\n");
+ }
+
+
+ JCCEvent_t
+ CCAnchorHandover::do_Handback_scenario(void)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::do_Handback_scenario): entering......\n}\n");
+ // External Handback scenario
+ initExtHandbackData();
+
+ DBG_TRACEho(" External HANDBACK is requested (hoState:%d)\n",
+ hoState_);
+
+ // Build a message for MM for Handover Req.
+ // Fill the data for MM message
+ mmOutMsg.l3_data.handReq.channelType.bearerType = BEARER_SPEECH;
+ // Since this is a handback, the anchor's current speech version is
+ // preferred. If the current speech version is not supported, more has
+ // to be done in terms of changing the gateway's speech mode on the fly.
+ mmOutMsg.l3_data.handReq.channelType.speechChann = parent->currSpeechCh();
+
+ IntraL3CipherModeCommand_t cipherCmd;
+ if (ludbGetCipherAlgo(parent->ludbIndex, &cipherCmd))
+ {
+ //handling error return
+ DBG_ERRORho(" CC->Handover Error: ludbGetCipherAlgo() failed, (ludbIndex = %d)\n",
+ parent->ludbIndex);
+ cipherCmd.cmd.cipherModeSetting.ciphering = CNI_RIl3_CIPHER_NO_CIPHERING;
+ }
+
+ DBG_TRACEho(" CC->@anch:PerfHb(a2r): ludbIndex %d, bearer %d, permittedIndicator[0-7] %x,%x,%x,%x,%x,%x,%x,%x, ciphSet %d, algo %d, kc(%x,%x)\n",
+ parent->ludbIndex,
+ aifMsg.handoverRequest.channelType.speechDataIndicator,
+ aifMsg.handoverRequest.channelType.permittedIndicator[0],
+ aifMsg.handoverRequest.channelType.permittedIndicator[1],
+ aifMsg.handoverRequest.channelType.permittedIndicator[2],
+ aifMsg.handoverRequest.channelType.permittedIndicator[3],
+ aifMsg.handoverRequest.channelType.permittedIndicator[4],
+ aifMsg.handoverRequest.channelType.permittedIndicator[5],
+ aifMsg.handoverRequest.channelType.permittedIndicator[6],
+ aifMsg.handoverRequest.channelType.permittedIndicator[7],
+ cipherCmd.cmd.cipherModeSetting.ciphering,
+ cipherCmd.cmd.cipherModeSetting.algorithm,
+ cipherCmd.Kc[0],cipherCmd.Kc[1],
+ cipherCmd.Kc[0],cipherCmd.Kc[2]);
+
+ memcpy( (unsigned char*) &(mmOutMsg.l3_data.handReq.cipherCmd),
+ (unsigned char*) &(cipherCmd),
+ sizeof (IntraL3CipherModeCommand_t) );
+
+ mmOutMsg.l3_data.handReq.qid = msgQId;
+
+ // Send internal MM msg -
+ sendMM(INTRA_L3_MM_EST_REQ, INTRA_L3_RR_HANDOVER_REQ, parent->entryId, &mmOutMsg);
+
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_TVB);
+ hoType_ = HO_TY_EXT_HANDBACK;
+ hoState_ = HAND_ST_ANCH_RCV_EHO_HB_REQ;
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::do_Handback_scenario): leaving.\n}\n");
+ }
+
+
+
+ JCCEvent_t
+ CCAnchorHandover::do_Handback_To_Third_MNET_scenario(void)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::do_Handback_To_Third_MNET_scenario): entering......\n}\n");
+ // External handback to third (but target is within MNET) scenario
+ initExtHandmsc3Data();
+
+ h3GlobalCellId_ = hoaInMsg->msgData.perfExtHandbackReq.globalCellID;
+
+ DBG_TRACEho(" External HANDBACK to THIRD within MNET is requested (hoType:%d, hoState:%d) (mcc %x%x%x, mnc %x%x%x, lac %d; ci %d)\n",
+ hoType_, hoState_,
+ h3GlobalCellId_.mcc[0],h3GlobalCellId_.mcc[1],h3GlobalCellId_.mcc[2],
+ h3GlobalCellId_.mnc[0],h3GlobalCellId_.mnc[1],h3GlobalCellId_.mnc[2],
+ h3GlobalCellId_.lac, h3GlobalCellId_.ci);
+
+ VBLINK_API_CELL_LOCATION_REQUEST_MSG t_cellLocationRequest;
+
+ //H3 scenario. Go ahead to inquire IP address of mscB', later check
+ //if the mscB' is known or not.
+
+ sprintf(&(t_cellLocationRequest.ViperCellId[0]), "%d:%d", h3GlobalCellId_.lac,h3GlobalCellId_.ci);
+
+ t_cellLocationRequest.TxnId = callIndex;
+
+ if (VBLinkLocationRequest(t_cellLocationRequest)
+ == false)
+ {
+ // Ignore the message
+ DBG_ERRORho(" VB Link Error: h3 failed on calling VBLinkLocationRequest()(%d,%d)\n",
+ hoType_, hoState_);
+
+ hoEndCause_ = MC_HO_SUBHO_FAILURE;
+ sendHandbackNack();
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::handleAnchPostExtHoHandbackEvent): leaving.\n}\n");
+ return(CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_TVB);
+ hoType_ = HO_TY_EXT_HANDBACK_TO_MNET_NONANCHOR;
+ hoState_ = HAND_ST_ANCH_EHO_H3_VC_IP_ADDRESS_REQ;
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::do_Handback_To_Third_MNET_scenario): leaving.\n}\n");
+ }
+
+
+ void
+ CCAnchorHandover::sendEndHandover(void)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(ho::sendEndHandover): entering......\n}\n");
+
+ if (hoAgId_ != -1)
+ {
+ //Send END_HANDOVER to HOA
+ NonStdRasMessageEndHandover_t endHandover;
+
+ memset( (char*)&endHandover, 0, sizeof(NonStdRasMessageEndHandover_t));
+ endHandover.header.origSubId = callIndex;
+ endHandover.header.destSubId = hoAgId_;
+ endHandover.reason = hoEndCause_;
+
+ if (!VBLinkEndHandover(&endHandover))
+ {
+ DBG_ERRORho(" VBLinkEndHandover API FAILED\n");
+ } else
+ {
+ DBG_TRACEho(" Sent to HOA END_HANDOVER (hoAgId=%d,callId=%d,entryId=%d)\n",
+ hoAgId_, callIndex, parent->entryId);
+ }
+ }
+
+ if (h3AgId_ != -1)
+ {
+ //Send END_HANDOVER to HOA
+ NonStdRasMessageEndHandover_t endHandover;
+
+ memset( (char*)&endHandover, 0, sizeof(NonStdRasMessageEndHandover_t));
+ endHandover.header.origSubId = callIndex;
+ endHandover.header.destSubId = h3AgId_;
+ endHandover.reason = hoEndCause_;
+
+ if (!VBLinkEndHandover(&endHandover))
+ {
+ DBG_ERRORho(" VBLinkEndHandover API FAILED\n");
+ } else
+ {
+ DBG_TRACEho(" Sent to HOA END_HANDOVER (h3AgId=%d,callId=%d,entryId=%d)\n",
+ h3AgId_, callIndex, parent->entryId);
+ }
+ }
+
+ DBG_TRACEho("{\nMNEThoTRACE(ho::sendEndHandover): leaving.\n}\n");
+ }
+
+ void
+ CCAnchorHandover::initExtHandbackData(void)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::initExtHandbackData): entering......\n}\n");
+
+ hoState_ = HAND_ST_ANCH_EHO_COMPLT;
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::initExtHandbackData): leaving.\n}\n");
+ }
+
+
+ void
+ CCAnchorHandover::initExtHandmsc3Data(void)
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::initExtHandmsc3Data): entering......\n}\n");
+
+ if (h3SimplexConnected_)
+ {
+ // Break connections with the RF Port
+ T_CSU_PORT_ID dstRtpPort;
+ T_CSU_RESULT_CON csuResult;
+
+ dstRtpPort.portType = CSU_RTP_PORT;
+ dstRtpPort.portId.rtpHandler = h3RtpSession_;
+
+ if ((csuResult = csu_OrigTermBreakAll(&dstRtpPort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_ERRORho(" CSU Error : Disconn. Failure, (hoType %d;hoState_ %d)(Result = %d)(rtpHndler %x) \n",
+ hoType_, hoState_, csuResult, h3RtpSession_);
+
+ // Can only generate OA&M log.
+ }
+ }
+
+ if (h3RtpSession_ != NULL)
+ {
+ // Release the H3 RTP channel
+ ReleaseHandoverRtpChannel(h3RtpSession_);
+ }
+
+ msMsgsQueued_ = 0;
+ rrMsgsQueued_ = false;
+
+ h3SimplexConnected_ = false;
+ h3VcCallIndex_ = CC_MAX_CC_CALLS_DEF_VAL;
+ memset(&h3GlobalCellId_, 0, sizeof(GlobalCellId_t));
+ h3VcIpAddress_ = 0;
+ otherH3IncomingRtpPort_ = 0;
+ h3RtpSession_ = NULL;
+
+ h3SrcLinkLost_ = false;
+ hoType_ = HO_TY_EXT_HANDOVER;
+ hoState_ = HAND_ST_ANCH_EHO_COMPLT;
+
+ DBG_TRACEho("{\nMNEThoTRACE(CCAnchorHandover::initExtHandmsc3Data): leaving.\n}\n");
+ } \ No newline at end of file
diff --git a/data/mnet/GP10/Host/cc/src/CCHoTrgHnd.cpp b/data/mnet/GP10/Host/cc/src/CCHoTrgHnd.cpp
new file mode 100644
index 0000000..96665c5
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CCHoTrgHnd.cpp
@@ -0,0 +1,704 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCHoTrgHnd.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 05-01-99
+// Description : Target Vipercell Handover Event handlers
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+//
+
+#include "CC/CCHandover.h"
+
+#include "CC/CCSessionHandler.h"
+
+#include "CC/CCUtil.h"
+
+#include "CC/CallConfig.h"
+
+#include "jcc/JCCLog.h"
+#include "logging/VCLOGGING.h"
+
+#include "stdio.h"
+
+// Temporarily use csu_head instead of csu_intf
+#include "csunew/csu_head.h"
+
+#include "CC/hortp.h"
+
+#include "lapdm/cni_debug.h"
+
+#include "pm/pm_class.h"
+
+#ifdef _SOFT_MOB
+extern T_CNI_LAPDM_OID softMobLapdmOid[];
+#endif
+
+extern MSG_Q_ID ccMsgQId;
+extern INT32 forcedHandover;
+
+//GCELL<tyu:06-01-01>
+extern GlobalCellId_t MY_GLOBALCELL_ID;
+
+//Ciphering <chenj:07-17-01>
+extern unsigned char rm_DspCiphCap;
+#define RM_DSPA52(X) (X & 2)
+#define RM_DSPA51(X) (X & 1)
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+JCCEvent_t
+CCTargetHandover::handleTrgHoReqAck(void)
+{
+
+ DBG_FUNC("CCTargetHandover::handleTrgHoReqAck", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ T_CNI_L3_ID newId;
+ newId.msgq_id = msgQId;
+ newId.sub_id = 0; // No sub id needed here
+
+ // <Igal 1-6-00> Updated to standard IRT setup
+ if (parent->setIrt(mmInMsg->entry_id, newId) == false)
+ {
+ sendMM (INTRA_L3_MM_REL_REQ, INTRA_L3_NULL_MSG, parent->entryId, &mmOutMsg);
+
+ DBG_LEAVE();
+ return (handleTrgHoReqNack());
+ }
+
+ // Setup the entry id, oid, and sapi
+ parent->entryId = mmInMsg->entry_id;
+
+ // GET OID AND SAPI
+ T_CNI_RIL3_IRT_ENTRY irtEntry;
+ irtEntry.entry_id = mmInMsg->entry_id;
+
+ if ( (CNI_RIL3_IRT_Get_Entry_by_Entry_ID(&irtEntry))
+ == false )
+ {
+ JCCLog1("CC Call Error : IRT Table problem for (entry id = %d)\n ", mmInMsg->entry_id);
+ DBG_ERROR("CC Call Error : IRT Table problem for (entry id = %d)\n ", mmInMsg->entry_id);
+
+ sendMM(INTRA_L3_MM_REL_REQ, INTRA_L3_NULL_MSG, parent->entryId, &mmOutMsg);
+ DBG_LEAVE();
+ return (handleTrgHoReqNack());
+ }
+
+ parent->oid = irtEntry.lapdm_oid;
+
+ // Assign a new Ho RTP channel
+ if ((hoRtpSession_ = AssignHandoverRtpChannel())
+ == NULL)
+ {
+ // Do not proceed with handover
+ JCCLog ("CC->Handover RTP Pool Error: assignment fail\n");
+ DBG_ERROR ("CC->Handover RTP Pool Error: assignment fail\n");
+ sendMM(INTRA_L3_MM_REL_REQ, INTRA_L3_NULL_MSG, parent->entryId, &mmOutMsg);
+ DBG_LEAVE();
+ return (handleTrgHoReqNack());
+ }
+
+ // Setup the remote RTP Port
+ SetRemoteHandoverRtpPort(hoRtpSession_,
+ hoVcIpAddress_,
+ otherHoIncomingRtpPort_);
+
+ DBG_TRACE("CC HO tgt-handleTrgHoReqAck Info: loRtpHndl %p, reVcIpAddr %x, rePort %d\n",
+ hoRtpSession_, hoVcIpAddress_, otherHoIncomingRtpPort_);
+
+ // Make a connection between the rtp channel and the rf channel
+ T_CSU_PORT_ID rfSourcePort, rtpSinkPort;
+ T_CSU_RESULT_CON csuResult;
+
+ rfSourcePort.portType = CSU_GSM_PORT;
+ rtpSinkPort.portType = CSU_RTP_PORT;
+
+ rfSourcePort.portId.gsmHandler = parent->entryId;
+ rtpSinkPort.portId.rtpHandler = hoRtpSession_;
+
+ if ((csuResult = csu_DuplexConnect(&rfSourcePort, &rtpSinkPort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog3("CSU Error : Ho Duplex Conn. Failure, (Result = %d) for (rtp port = %x) and (entryId = %d)\n",
+ csuResult,
+ (int)rtpSinkPort.portId.rtpHandler,
+ parent->entryId);
+ DBG_ERROR("CSU Error : Ho Duplex Conn. Failure, (Result = %d) for (rtp port = %x) and (entryId = %d)\n",
+ csuResult,
+ (int)rtpSinkPort.portId.rtpHandler,
+ parent->entryId);
+ sendMM(INTRA_L3_MM_REL_REQ, INTRA_L3_NULL_MSG, parent->entryId, &mmOutMsg);
+ DBG_LEAVE();
+ return (handleTrgHoReqNack());
+
+ }
+
+ voiceConnected = true;
+
+ // Send the Perform Ack message.
+
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDOVER_ACK;
+ vcOutMsg.msgData.perfHandoverAck.targetInRtpPort
+ = GetIncomingHandoverRtpPort(hoRtpSession_);
+ vcOutMsg.msgData.perfHandoverAck.handCmd = mmInMsg->l3_data.handReqAck.handCmd;
+
+ // Dump the handover Command msg.
+ // CNI_DumpHex(&vcOutMsg.msgData.perfHandoverAck.handCmd.buffer[0], 30);
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ // start the T204 timer
+ parent->sessionTimer->setTimer(CALL_HAND_TRG_T204);
+
+ hoState_ = HAND_ST_TRG_SND_HO_REQ_ACK;
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCTargetHandover::handleTrgHoReqNack(void)
+{
+
+ DBG_FUNC("CCTargetHandover::handleTrgHoReqNack", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ // Send the Perform Nack message.
+
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDOVER_NACK;
+ vcOutMsg.msgData.perfHandoverNack.cause = rrInMsg->l3_data.handReqNack.cause;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ initData();
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ //
+}
+
+JCCEvent_t
+CCTargetHandover::handleTrgHoComplt(void)
+{
+
+ DBG_FUNC("CCTargetHandover::handleTrgHoComplt", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ // cancel T204 timer
+ parent->sessionTimer->cancelTimer();
+
+ // Send the Complete Handover message.
+
+ vcOutMsg.msgType = INTER_VC_CC_COMPLETE_HANDOVER;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ hoState_ = HAND_ST_TRG_HO_COMPLT;
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCTargetHandover::handleTrgT204TimerExpiry(void)
+{
+ DBG_FUNC("CCTargetHandover::handleTrgT204TimerExpiry", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ // Send Handover Nack to the Source ViperCell.
+ // Ack was already sent! Is that Ok?
+
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDOVER_NACK;
+ vcOutMsg.msgData.perfHandoverNack.cause = JC_FAILURE_T204_TIMEOUT;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ if (voiceConnected)
+ {
+ // break connection
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = hoRtpSession_;
+
+ if ((csuResult = csu_OrigTermBreakAll(&rtpSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog2("CSU Error : Ho Disconn. Failure, (Result = %d) for (rtp port = %x)\n",
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler);
+ DBG_ERROR("CSU Error : Ho Disconn. Failure, (Result = %d) for (rtp port = %x)\n",
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler);
+
+ // Can only generate OA&M log.
+ }
+
+ voiceConnected = false;
+ }
+
+ // Release the Ho RTP channel
+ ReleaseHandoverRtpChannel(hoRtpSession_);
+ hoRtpSession_ = NULL;
+
+ initData();
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+}
+
+JCCEvent_t
+CCTargetHandover::handleTrgPostHoRls(void)
+{
+ DBG_FUNC("CCTargetHandover::handleTrgPostHoRls", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ vcOutMsg.msgType = INTER_VC_CC_RLS_CALL;
+ vcOutMsg.msgData.rlsCall.cause = JC_FAILURE_BASE;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ DBG_LEAVE();
+ return (handleAnchToTrgAbortHo());
+}
+
+JCCEvent_t
+CCTargetHandover::handleAnchToTrgPerfHoReq(void)
+{
+
+ DBG_FUNC("CCTargetHandover::handleAnchToTrgPerfHoReq", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ // Copy the Anchor information.
+ hoVcIpAddress_ = vcInMsg->origVcAddress;
+ hoVcCallIndex_ = vcInMsg->origSubId;
+
+//GCELL<tyu:06-01-01> BEGIN
+ hoGlobalCellId_ = vcInMsg->msgData.perfHandoverReq.globalCellId;
+//GCELL<tyu:06-01-01> END
+
+ otherHoIncomingRtpPort_ = vcInMsg->msgData.perfHandoverReq.sourceInRtpPort;
+
+ // Build a message for MM for Handover Req.
+ // Fill the data for MM message
+ currSpeechCh_ = vcInMsg->msgData.perfHandoverReq.channelType.speechChann;
+ mmOutMsg.l3_data.handReq.channelType = vcInMsg->msgData.perfHandoverReq.channelType;
+ mmOutMsg.l3_data.handReq.qid = msgQId;
+
+ //CIPH<xxu:02-10-00> begin
+
+ memcpy( (unsigned char*) &(mmOutMsg.l3_data.handReq.cipherCmd),
+ (unsigned char*) &(vcInMsg->msgData.perfHandoverReq.cipherCmd),
+ sizeof (IntraL3CipherModeCommand_t) );
+
+ // Make sure ciphering algorithm is supported on target GP10
+ if (mmOutMsg.l3_data.handReq.cipherCmd.cmd.cipherModeSetting.ciphering ==
+ CNI_RIl3_CIPHER_START_CIPHERING)
+ {
+ switch (mmOutMsg.l3_data.handReq.cipherCmd.cmd.cipherModeSetting.algorithm)
+ {
+ case CNI_RIL3_CIPHER_ALGORITHM_A51:
+ if (!RM_DSPA51(rm_DspCiphCap) )
+ { // Algorithm not supported, turn off ciphering
+
+ DBG_TRACE("handleAnchToTrgPerfHoReq TURNING CIPHERING OFF: previous algorithm %d\n",
+ mmOutMsg.l3_data.handReq.cipherCmd.cmd.cipherModeSetting.ciphering);
+
+ mmOutMsg.l3_data.handReq.cipherCmd.cmd.cipherModeSetting.ciphering =
+ CNI_RIl3_CIPHER_NO_CIPHERING;
+ }
+ break;
+
+ case CNI_RIL3_CIPHER_ALGORITHM_A52:
+ if ( !RM_DSPA52(rm_DspCiphCap) )
+ { // Algorithm not supported, turn off ciphering
+ DBG_TRACE("handleAnchToTrgPerfHoReq TURNING CIPHERING OFF: previous algorithm %d\n",
+ mmOutMsg.l3_data.handReq.cipherCmd.cmd.cipherModeSetting.ciphering);
+
+ mmOutMsg.l3_data.handReq.cipherCmd.cmd.cipherModeSetting.ciphering =
+ CNI_RIl3_CIPHER_NO_CIPHERING;
+ }
+ break;
+
+ default:
+ DBG_TRACE("handleAnchToTrgPerfHoReq TURNING CIPHERING OFF: previous algorithm %d\n",
+ mmOutMsg.l3_data.handReq.cipherCmd.cmd.cipherModeSetting.ciphering);
+
+ mmOutMsg.l3_data.handReq.cipherCmd.cmd.cipherModeSetting.ciphering =
+ CNI_RIl3_CIPHER_NO_CIPHERING;
+ }
+ }
+
+ IntraL3CipherModeCommand_t *p;
+ p = (IntraL3CipherModeCommand_t *) &(vcInMsg->msgData.perfHandoverReq.cipherCmd);
+
+
+ DBG_TRACE("CC->@tgt:HoReq(t2r): ludbIndex = %d, bearer %d, spchVer %d, ciphSet %d, algo %d, kc(%x,%x)\n",
+ parent->ludbIndex,
+ vcOutMsg.msgData.perfHandoverReq.channelType.bearerType,
+ vcOutMsg.msgData.perfHandoverReq.channelType.speechChann.version,
+ p->cmd.cipherModeSetting.ciphering,
+ p->cmd.cipherModeSetting.algorithm,
+ p->Kc[0], p->Kc[1]);
+
+ //CIPH<xxu:02-10-00> End
+
+ DBG_TRACE("CC->@tgt:HoReq(t2r): callId %d, callQid(%p, %p), ccMsgQId %p\n",
+ callIndex, msgQId,
+ ccSession[callIndex].msgQId,
+ ccMsgQId);
+
+ // Send internal MM msg -
+ sendMM(INTRA_L3_MM_EST_REQ, INTRA_L3_RR_HANDOVER_REQ, parent->entryId, &mmOutMsg);
+
+ hoState_ = HAND_ST_TRG_RCV_HO_REQ;
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCTargetHandover::handleAnchToTrgAbortHo(void)
+{
+ DBG_FUNC("CCTargetHandover::handleAnchToTrgAbortHo", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ // cancel T204 timer
+ parent->sessionTimer->cancelTimer();
+
+ if (voiceConnected)
+ {
+ // break connection
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = hoRtpSession_;
+
+ if ((csuResult = csu_OrigTermBreakAll(&rtpSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+
+ JCCLog2("CSU Error : Ho Disconn. Failure, (Result = %d) for (rtp port = %x)\n",
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler);
+ DBG_ERROR("CSU Error : Ho Disconn. Failure, (Result = %d) for (rtp port = %x)\n",
+ csuResult,
+ (int)rtpSourcePort.portId.rtpHandler);
+
+ // Can only generate OA&M log.
+ }
+
+ voiceConnected = false;
+
+ }
+
+ // Release the Ho RTP channel
+ ReleaseHandoverRtpChannel(hoRtpSession_);
+ hoRtpSession_ = NULL;
+
+ initData();
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+
+}
+
+
+JCCEvent_t
+CCTargetHandover::handleAnchToTrgPerfHbAck(void)
+{
+ DBG_FUNC("CCTargetHandover::handleAnchToTrgPerfHbAck", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ // cancel Tsho timer
+ parent->sessionTimer->cancelTimer();
+
+ // Send internal RR msg
+ rrOutMsg.l3_data.handCmd.handCmd = vcInMsg->msgData.perfHandbackAck.handCmd;
+
+#ifdef _SOFT_MOB
+ if (!(parent->oid < softMobLapdmOid[0]))
+ {
+ printf("Soft Mob Log: Hand Cmd. sent, Send Hand Cmd. Complete now\n");
+ }
+ else
+#endif
+ {
+ sendRR(INTRA_L3_DATA, INTRA_L3_RR_HANDOVER_COMMAND, parent->entryId, &rrOutMsg);
+ }
+
+ // start the T203 timer
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_T203);
+
+ hoState_ = HAND_ST_TRG_RCV_HB_REQ_ACK;
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+//RETRY<xxu:04-27-00>
+JCCEvent_t
+CCTargetHandover::handleAnchToTrgPerfHbNack(void)
+{
+ DBG_FUNC("CCTargetHandover::handleAnchToTrgPerfHbNack", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ // cancel Tsho timer
+ parent->sessionTimer->cancelTimer();
+
+ //RETRY<xxu:04-25-00> BEGIN
+ //Retry next candidate if there is another left
+ int i;
+ IntraL3HandoverRequired_t *inMsg = &handReqd;
+
+ if ( (i=getNextHoCandidate()) != (-1) )
+ {
+ //Try next candidate
+ //GCELL<tyu:06-01-01> BEGIN
+ candGlobalCellId_t candidate;
+
+ hoNextCandidate_ = true;
+ candIndex_ = i;
+
+ candidate = inMsg->candGlobalCellId[i];
+ //GCELL<tyu:06-01-01> END
+
+ DBG_TRACE("Next Candidate (trg::handleTrgHoReqd): Selected %d-th of Candidates(%d) (isExt=%d, isTried=%d, mcc:%x%x%x mnc:%x%x%x lac:%d ci:%d) (hoState %d)\n",
+ i, inMsg->numCandidates,
+ candidate.candIsExternal, candidate.candIsTried,
+ candidate.candGlobalCellId.mcc[0],candidate.candGlobalCellId.mcc[1],candidate.candGlobalCellId.mcc[2],
+ candidate.candGlobalCellId.mnc[0],candidate.candGlobalCellId.mnc[1],candidate.candGlobalCellId.mnc[2],
+ candidate.candGlobalCellId.lac, candidate.candGlobalCellId.ci, hoType_, hoState_);
+
+ // Send Perform Handback to the Anchor ViperCell.
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK;
+ vcOutMsg.msgData.perfHandbackReq.channelType.bearerType = BEARER_SPEECH;
+ vcOutMsg.msgData.perfHandbackReq.channelType.speechChann = currSpeechCh_;
+ //GCELL<tyu:06-01-01> END
+ vcOutMsg.msgData.perfHandbackReq.globalCellId = candidate;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ // start the Tsho timer
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_TSHO);
+
+ hoState_ = HAND_ST_TRG_SND_HB_REQ;
+
+ } else
+ {
+ initHandbackData();
+
+ if (hoSrcLinkLost_)
+ {
+ // peg
+ PM_CCMeasurement.unsuccExternHDOsWithLossOfConnectionPerMSC.increment();
+
+ vcOutMsg.msgType = INTER_VC_CC_RLS_CALL;
+ vcOutMsg.msgData.rlsCall.cause = JC_FAILURE_BASE;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+ DBG_LEAVE();
+ return (handleAnchToTrgAbortHo());
+ }
+ }
+
+ //
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCTargetHandover::handleAnchToTrgCompltHb(void)
+{
+ DBG_FUNC("CCTargetHandover::handleAnchToTrgCompltHb", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ // cancel T203 timer
+ parent->sessionTimer->cancelTimer();
+
+ // Release the Ho RTP channel
+ ReleaseHandoverRtpChannel(hoRtpSession_);
+ hoRtpSession_ = NULL;
+
+ initData();
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+}
+
+JCCEvent_t
+CCTargetHandover::handleTrgTshoTimerExpiry(void)
+{
+ DBG_FUNC("CCTargetHandover::handleTrgTshoTimerExpiry", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ // Assume no retry is needed based on candidate list
+
+ // Send Abort Handback to the Anchor ViperCell.
+
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDBACK;
+ vcOutMsg.msgData.abortHandback.cause = JC_FAILURE_TSHO_TIMEOUT;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ initHandbackData();
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCTargetHandover::handleTrgT203TimerExpiry(void)
+{
+ DBG_FUNC("CCTargetHandover::handleTrgT203TimerExpiry", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ // Assume no retry is needed based on candidate list
+
+ // Send Abort Handback to the Anchor ViperCell.
+
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDBACK;
+ vcOutMsg.msgData.abortHandback.cause = JC_FAILURE_T203_TIMEOUT;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ //ext-HO <xxu:07-09-01>
+ //initHandbackData();
+ initData();
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+}
+
+JCCEvent_t
+CCTargetHandover::handleTrgHoFail(void)
+{
+ DBG_FUNC("CCTargetHandover::handleTrgHoFail", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ // cancel T203 timer
+ parent->sessionTimer->cancelTimer();
+
+ // Assume no retry is needed based on candidate list
+
+ // Send Abort Handback to the Anchor ViperCell.
+
+ vcOutMsg.msgType = INTER_VC_CC_ABORT_HANDBACK;
+
+ //ext-HO <xxu:06-28-01>
+ vcOutMsg.msgData.abortHandback.cause = rrInMsg->l3_data.handFail.cause;
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ initHandbackData();
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+
+//HO<xxu:02-01-00> extend to cover H3
+JCCEvent_t
+CCTargetHandover::handleTrgHoReqd(void)
+{
+ int i;
+
+ DBG_FUNC("CCTargetHandover::handleTrgHoReqd", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ IntraL3HandoverRequired_t *inMsg = &rrInMsg->l3_data.handReqd;
+ //GCELL<tyu:06-01-01> END
+ candGlobalCellId_t candidate;
+
+ DBG_TRACE("CC Info: Received Handover Required (numCandidates = %d)\n",
+ inMsg->numCandidates);
+
+ //Assume go back to anchor. If not update candidate to MSC-B' (3rd party cell)
+ //GCELL<tyu:06-01-01> END
+ candidate.candIsExternal = false;
+ candidate.candIsTried = true;
+ candidate.candGlobalCellId = hoGlobalCellId_;
+
+ handReqd = *inMsg;
+
+ if (!forcedHandover)
+ {
+ if ((inMsg->numCandidates) <= 0)
+ {
+ // Ignore the message
+ DBG_ERROR ("RR->CC Error (trg::handleTrgHoReqd): Handover Required, bad (numCandidates = %d)\n",
+ inMsg->numCandidates);
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ // Make sure a candidate to try is a valid one
+ if ( (i=getNextHoCandidate()) == (-1) )
+ {
+ DBG_ERROR ("RR->CC (trg::handleTrgHoReqd): Handover Required Error (all bad #candidates = %d)\n",
+ inMsg->numCandidates);
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ candIndex_ = i;
+ candidate = inMsg->candGlobalCellId[i];
+
+ DBG_TRACE("RR->CC (trg::handleTrgHoReqd): Selected %d-th of Candidates(%d) (isExt=%d, isTried=%d, mcc:%x%x%x mnc:%x%x%x lac:%d ci:%d) (hoState %d)\n}\n",
+ i, inMsg->numCandidates,
+ candidate.candIsExternal, candidate.candIsTried,
+ candidate.candGlobalCellId.mcc[0],candidate.candGlobalCellId.mcc[1],
+ candidate.candGlobalCellId.mcc[2],
+ candidate.candGlobalCellId.mnc[0],candidate.candGlobalCellId.mnc[1],
+ candidate.candGlobalCellId.mnc[2],
+ candidate.candGlobalCellId.lac, candidate.candGlobalCellId.ci, hoState_);
+
+ // Save candidate list for future retry
+ handReqd = *inMsg;
+ candIndex_ = i;
+ //GCELL<tyu:06-01-01> END
+
+ }
+
+ // Send Perform Handback to the Anchor ViperCell.
+ vcOutMsg.msgType = INTER_VC_CC_PERFORM_HANDBACK;
+ vcOutMsg.msgData.perfHandbackReq.channelType.bearerType = BEARER_SPEECH;
+ vcOutMsg.msgData.perfHandbackReq.channelType.speechChann = currSpeechCh_;
+ vcOutMsg.msgData.perfHandbackReq.globalCellId = candidate;
+ //GCELL<tyu:06-01-01> END
+
+ sendVcMsg(MODULE_CC, MODULE_CC);
+
+ // start the Tsho timer
+ parent->sessionTimer->setTimer(CALL_HAND_SRC_TSHO);
+
+ hoState_ = HAND_ST_TRG_SND_HB_REQ;
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
diff --git a/data/mnet/GP10/Host/cc/src/CCMobExtHnd.cpp b/data/mnet/GP10/Host/cc/src/CCMobExtHnd.cpp
new file mode 100644
index 0000000..e24429c
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CCMobExtHnd.cpp
@@ -0,0 +1,1422 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCMobExtHnd.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : CC Mobile side External Event Handlers.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "JCC/JCCLog.h"
+#include "logging/VCLOGGING.h"
+
+#include "stdio.h"
+
+#include "sysLib.h"
+
+//CH<xxu:11-11-99>
+#include "csunew/csu_head.h"
+
+//
+#include "CC/CCHalfCall.h"
+#include "CC/CallConfig.h"
+
+#include "CC/CallLeg.h"
+#include "CC/CCSessionHandler.h"
+
+#include "jcc/LUDBInstance.h"
+#include "JCC/LUDBapi.h"
+
+// included MD and IRT headers for messages from MS
+#include "ril3/ril3md.h"
+
+#include "rm/rm_head.h"
+extern u8 rm_EntryIdToTrxSlot(T_CNI_IRT_ID entryId, u16 *gsmHandler);
+extern bool callTrace;
+
+const int CALL_CFNRY_TIMER = 300; // 5 seconds
+const int CALL_WAITING_T3_TIMER = 1800; // 30 seconds
+
+//BCT <xxu:08-11-00> BEGIN
+extern int CALL_BCT_NUMBER_TVB;
+//BCT <xxu:08-11-00> END
+
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+// Current State is THC_ST_CALL_CONFIRMED
+
+JCCEvent_t
+CCHalfCall::handleMobNoReply(void)
+{
+ DBG_FUNC("CCHalfCall::handleMobNoReply", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ //CAUSE<xxu:03-21-00> BEGIN
+
+ //skip event loop
+ //voipReleaseCause_ = MOBILE_CAUSE_USER_ALERTING_NO_ANSWER;
+ voipReleaseCause_ = CNI_RIL3_CAUSE_USER_ALERTING_NO_ANSWER;
+
+ //CAUSE<xxu:03-21-00> END
+
+ rlsCause.causeValue = CNI_RIL3_CAUSE_USER_ALERTING_NO_ANSWER;
+
+ // print out the trx, timeslot for better debugging
+ UINT16 gsmHandler;
+ UINT8 trx, slot;
+ T_SUBSC_IE_ISDN* isdnPtr;
+
+ if (rm_EntryIdToTrxSlot(parent->entryId(),
+ &gsmHandler) ==
+ RM_TRUE)
+ {
+
+ trx = (UINT8)(gsmHandler>>8);
+ slot = (UINT8)(gsmHandler);
+
+ if (callTrace)
+ {
+ DBG_WARNING("CC Log: User No Reply on (TRX=%d),(Slot=%d),(entryId=%d)\n",
+ trx, slot, parent->entryId());
+ if ((isdnPtr = ludbGetMSISDNPtr(parent->ludbIndex())) != NULL)
+ {
+ DBG_WARNING("CC Log: MS (DN=%s)\n",
+ isdnPtr->digits);
+ }
+ }
+ else
+ {
+ DBG_TRACE("CC Log: User No Reply on (TRX=%d),(Slot=%d),(entryId=%d)\n",
+ trx, slot, parent->entryId());
+ if ((isdnPtr = ludbGetMSISDNPtr(parent->ludbIndex())) != NULL)
+ {
+ DBG_TRACE("CC Log: MS (DN=%s)\n",
+ isdnPtr->digits);
+ }
+ }
+ }
+
+ //CAUSE<xxu:04-06-00> BEGING
+
+ // Always do sendRemote at the end of the handler.
+ // Now send the internal Rel Complt message to the other H.323 half call -
+ if (sendRemote(HC_REMOTE_RELEASE_COMPLETE) == false)
+ // failed commn. with the remote side - treat as a release complete
+ // from the remote side and cleanup - skip event loop.
+ {
+ DBG_LEAVE();
+ return (handleMobRemoteAbnormalRelCom());
+ }
+
+ voipReleaseCause_ = CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING;
+ rlsCause.causeValue = CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING;
+
+ //CAUSE<xxu:04-06-00> END
+
+ DBG_LEAVE();
+ return(handleDisconnectReq());
+}
+
+JCCEvent_t
+CCHalfCall::handleMobAlerting(void)
+{
+ int timerForCFNRy;
+
+ DBG_FUNC("CCHalfCall::handleMobAlerting", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // cancel call confirmed timer
+ hcTimer->cancelTimer();
+
+ callState_ = THC_ST_ALERTING;
+
+ if (ludbIsProvCFNRY(parent->ludbIndex()) &&
+ ludbIsActiveCFNRY(parent->ludbIndex()))
+ {
+ if ((timerForCFNRy = ludbGetTimerCFNRY(parent->ludbIndex()))
+ >= 5)
+ {
+ timerForCFNRy = timerForCFNRy * (sysClkRateGet());
+ }
+ else
+ {
+ timerForCFNRy = CALL_CFNRY_TIMER;
+ }
+
+ hcTimer->setTimer(timerForCFNRy);
+ }
+ else if (parent->waitingCallLeg)
+ {
+ hcTimer->setTimer(CALL_WAITING_T3_TIMER);
+ }
+ else
+ {
+ hcTimer->setTimer(CALL_ALERTING_T301);
+ }
+
+ // Always do sendRemote at the end of the handler.
+ // Now send the internal Alerting message to the other H.323 half call -
+ if (sendRemote(OHC_REMOTE_ALERTING) == false)
+ // failed commn. with the remote side - treat as a release complete
+ // from the remote side and cleanup -
+ // one stage release - skip event loop.
+ {
+ DBG_LEAVE();
+ return (handleMobRemoteAbnormalRelCom());
+ }
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCHalfCall::handleMobCallProgress(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleMobCallProgress", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ int i;
+
+ // cancel setup timer
+ hcTimer->cancelTimer();
+
+ // declare a pointer to the call confirmed portion of the message
+ T_CNI_RIL3CC_MSG_CALL_CONFIRMED *callConf = &(msDecodedMsg->callConfirmed);
+
+ // !< handle user busy cause value. - Network should know this already,
+ // - The MS maybe talking to a different network??
+
+ // !! handle BC info elements as per 7.01
+
+ // !< Call Control capabilities can be ignored for now
+
+ callState_ = THC_ST_CALL_CONFIRMED;
+
+ hcTimer->setTimer(CALL_CALL_CONFIRMED_T310);
+
+ //PR1508 FR only case
+ DBG_TRACE("RIL3->CC code(Ms)(MTC): 1st(%d,%d) 2nd(%d,%d) 3rd(%d,%d)\n",
+ callConf->bearCap1.speechVersionInd[0].fieldPresent,
+ callConf->bearCap1.speechVersionInd[0].version,
+ callConf->bearCap1.speechVersionInd[1].fieldPresent,
+ callConf->bearCap1.speechVersionInd[1].version,
+ callConf->bearCap1.speechVersionInd[2].fieldPresent,
+ callConf->bearCap1.speechVersionInd[2].version);
+
+ if (!(callConf->bearCap1.ie_present))
+ {
+ callConf->bearCap1.ie_present = true;
+ callConf->bearCap1.speechVersionInd[0].fieldPresent = true;
+ callConf->bearCap1.speechVersionInd[0].version = CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1;
+ callConf->bearCap1.speechVersionInd[1].fieldPresent = false;
+ callConf->bearCap1.speechVersionInd[2].fieldPresent = false;
+ }
+
+ // setup remote data struct
+ for (i=0; i < 3; i++)
+ {
+ remMsgData.callProceeding.bearerCap.speechVersionInd[i] =
+ callConf->bearCap1.speechVersionInd[i];
+ }
+
+
+ if ( !( callConf->bearCap1.speechVersionInd[0].fieldPresent ||
+ callConf->bearCap1.speechVersionInd[1].fieldPresent ||
+ callConf->bearCap1.speechVersionInd[2].fieldPresent ) )
+
+ {
+ remMsgData.callProceeding.bearerCap.speechVersionInd[0].fieldPresent = 1;
+ remMsgData.callProceeding.bearerCap.speechVersionInd[0].version = CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1;
+ }
+
+ DBG_TRACE("RIL3->CC code(Voip)(MTC): 1st(%d,%d) 2nd(%d,%d) 3rd(%d,%d)\n",
+ remMsgData.callProceeding.bearerCap.speechVersionInd[0].fieldPresent,
+ remMsgData.callProceeding.bearerCap.speechVersionInd[0].version,
+ remMsgData.callProceeding.bearerCap.speechVersionInd[1].fieldPresent,
+ remMsgData.callProceeding.bearerCap.speechVersionInd[1].version,
+ remMsgData.callProceeding.bearerCap.speechVersionInd[2].fieldPresent,
+ remMsgData.callProceeding.bearerCap.speechVersionInd[2].version);
+
+ bearCap1speechVersionInd_[0] = remMsgData.callProceeding.bearerCap.speechVersionInd[0];
+ bearCap1speechVersionInd_[1] = remMsgData.callProceeding.bearerCap.speechVersionInd[1];
+ bearCap1speechVersionInd_[2] = remMsgData.callProceeding.bearerCap.speechVersionInd[2];
+
+ // Always do sendRemote at the end of the handler.
+ // Now send setup to the other half call.
+ if (sendRemote(HC_REMOTE_CALL_PROGRESS) == false)
+ // failed commn. with the remote side - treat as a release complete
+ // from the remote side and cleanup - skip event loop.
+ {
+ DBG_LEAVE();
+ return (handleMobRemoteAbnormalRelCom());
+ }
+
+ // EFR Change
+ // Start Res. Assignment
+ // Very Early Assignment - Begin
+ // DBG_LEAVE();
+ // return (CC_RESOURCE_ASSIGN_REQ);
+ // Very Early Assignment - End
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCHalfCall::handleMobAnswer(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleMobAnswer", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // cancel alerting timer
+ hcTimer->cancelTimer();
+
+ // !< handle subaddress may be needed.
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ callState_ = HC_ST_ACTIVE;
+
+ // Now send the internal Answer message to the other H.323 half call -
+ if (sendRemote(OHC_REMOTE_ANSWER) == false)
+ // failed commn. with the remote side - treat as a release complete
+ // from the remote side and cleanup - skip event loop.
+ {
+ rlsCause.causeValue = CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+ voipReleaseCause_ = CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+
+ DBG_LEAVE();
+ return (handleMobRemoteAbnormalRelCom());
+ }
+
+ // Build the Connect Ack. Message towards the MS.
+ if ( (msOutResult = buildConnectAck (&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the error. Release RR resources
+
+ rlsCause.causeValue = CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+ voipReleaseCause_ = CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+ }
+
+ if (!parent->waitingCallLeg)
+ {
+ // Very Early Assignment - Begin
+ // Synchronize with the Channel state machine
+ if (channState_ != RES_ST_ASSIGNED)
+ {
+ // Channel is not assigned. Cleanup.
+ // This way, you don't accept a late msg. accidentally.
+ channState_ = RES_ST_IDLE;
+
+ // Print a log for warning
+ JCCLog1("CC Warning: H.245 channel selection for (call = %d) too late/missing?\n",
+ parent->callIndex);
+ DBG_WARNING("CC Warning: H.245 channel selection for (call = %d) too late/missing?\n",
+ parent->callIndex);
+
+ //CDR <xxu:08-21-00> BEGIN
+ rlsCause.causeValue = CNI_RIL3_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE;
+ voipReleaseCause_ = CNI_RIL3_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE;
+
+ DBG_LEAVE();
+ return (CC_TWO_STAGE_DISCONNECT);
+ }
+
+ // Very Early Assignment - End
+
+ // CDR <xxu:08-21-00>
+ parent->ccCdr.answer((unsigned char)BEARER_SPEECH, (unsigned char)currSpeechCh_.version);
+ parent->ccCdrCallState = true;
+ parent->ccCdrTimer->setTimer(CALL_CDR_10M);
+
+ }
+ else
+ {
+ if (parent->parent->isOtherLegHeld(parent->callLegNum))
+ {
+ // No longer waiting
+ parent->waitingCallLeg = false;
+ DBG_LEAVE();
+ return (CC_RESOURCE_ASSIGN_REQ);
+ }
+ else
+ {
+ // Do not allow this call
+
+ //CAUSE<xxu:08-21-00> BEGIN
+
+ rlsCause.causeValue = CNI_RIL3_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE;
+ voipReleaseCause_ = CNI_RIL3_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE;
+
+ //CAUSE<xxu:08-21-00> END
+
+ DBG_LEAVE();
+ return (CC_TWO_STAGE_DISCONNECT);
+ }
+ }
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCHalfCall::handleConnectAck(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleConnectAck", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // cancel connect timer
+ hcTimer->cancelTimer();
+
+ // CDR <xxu:08-21-00>
+ parent->ccCdr.answer((unsigned char)BEARER_SPEECH, (unsigned char)currSpeechCh_.version);
+ parent->ccCdrCallState = true;
+ parent->ccCdrTimer->setTimer(CALL_CDR_10M);
+
+ if (!isEmergencyCall)
+ {
+ PM_CCMeasurement.ansMobileOriginatingCalls.increment();
+ }
+ else
+ {
+ PM_CCMeasurement.ansMobileEmergencyCalls.increment();
+ }
+
+ callState_ = HC_ST_ACTIVE;
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCHalfCall::handleMobTermAddress(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleMobTermAddress", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+ T_SUBSC_IE_MOBILE_ID_IMSI *imsiPtr;
+ T_SUBSC_IE_ISDN *msisdnPtr;
+ int i;
+
+ // declare a pointer to the setup portion of the message
+ T_CNI_RIL3CC_MSG_SETUP *setup = &(msDecodedMsg->setup);
+
+ // Copy the transaction identifier
+ ti = (msDecodedMsg->header.si_ti | ORIG_OR_MASK);
+
+ // Cancel MM Conn Est timer
+ hcTimer->cancelTimer();
+
+ setupTime_ = tickGet();
+
+ // !< BC1 is mandatory. BC2 may be included. - only look at the
+ // message data to see what the MS is saying.
+ // It shoudl be capable of Full Rate Speech, come on!
+
+ // Copy locally the above
+ cpn = setup->calledBCD;
+
+ //CDR <xxu:08-29-00>
+ parent->ccCdr.setCalledPartyNumber(&cpn);
+
+ // DBG_TRACE("CC Call Log: (called party number = %d,%d,%d,%d) \n",
+ // cpn.digits[0],
+ // cpn.digits[1],
+ // cpn.digits[2],
+ // cpn.digits[3]);
+
+ // !< CLIR suppression, invocation - 4.81
+ // !< CC Capabilities may be included.
+
+ // setup remote data struct
+ remMsgData.setup.CalledPartyNumber = cpn;
+ for (i=0; i < 3; i++)
+ {
+
+ remMsgData.setup.bearerCap.speechVersionInd[i] =
+ setup->bearCap1.speechVersionInd[i];
+
+ }
+
+ //PR1475 FR only case
+
+ DBG_TRACE("RIL3->CC code(Rx): 1st(%d,%d) 2nd(%d,%d) 3rd(%d,%d)\n",
+ setup->bearCap1.speechVersionInd[0].fieldPresent,
+ setup->bearCap1.speechVersionInd[0].version,
+ setup->bearCap1.speechVersionInd[1].fieldPresent,
+ setup->bearCap1.speechVersionInd[1].version,
+ setup->bearCap1.speechVersionInd[2].fieldPresent,
+ setup->bearCap1.speechVersionInd[2].version);
+
+ if (!(setup->bearCap1.ie_present))
+ {
+ setup->bearCap1.ie_present = true;
+ setup->bearCap1.speechVersionInd[0].fieldPresent = true;
+ setup->bearCap1.speechVersionInd[0].version = CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1;
+ setup->bearCap1.speechVersionInd[1].fieldPresent = false;
+ setup->bearCap1.speechVersionInd[2].fieldPresent = false;
+ }
+
+
+ if ( !( setup->bearCap1.speechVersionInd[0].fieldPresent ||
+ setup->bearCap1.speechVersionInd[1].fieldPresent ||
+ setup->bearCap1.speechVersionInd[2].fieldPresent ) )
+ {
+ remMsgData.setup.bearerCap.speechVersionInd[0].fieldPresent = 1;
+ remMsgData.setup.bearerCap.speechVersionInd[0].version = CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1;
+ }
+
+ DBG_TRACE("RIL3->CC code(Tx): 1st(%d,%d) 2nd(%d,%d) 3rd(%d,%d)\n",
+ remMsgData.setup.bearerCap.speechVersionInd[0].fieldPresent,
+ remMsgData.setup.bearerCap.speechVersionInd[0].version,
+ remMsgData.setup.bearerCap.speechVersionInd[1].fieldPresent,
+ remMsgData.setup.bearerCap.speechVersionInd[1].version,
+ remMsgData.setup.bearerCap.speechVersionInd[2].fieldPresent,
+ remMsgData.setup.bearerCap.speechVersionInd[2].version);
+
+ bearCap1speechVersionInd_[0] = remMsgData.setup.bearerCap.speechVersionInd[0];
+ bearCap1speechVersionInd_[1] = remMsgData.setup.bearerCap.speechVersionInd[1];
+ bearCap1speechVersionInd_[2] = remMsgData.setup.bearerCap.speechVersionInd[2];
+
+ remMsgData.setup.IsEmergencyCall = false;
+
+ callState_ = OHC_ST_OFFERING_CALL;
+
+ // !< Need to check with the LUDB that the call be allowed.
+ // check subscriber's permissions & other SS interactions - future
+ // Authorize the origination attempt
+ if (! gLUDB.authOrig(parent->ludbIndex(), cpn))
+ {
+ JCCLog1("Origination Authorization failed, (LUDB Index = %d)\n",
+ parent->ludbIndex());
+ DBG_TRACE("Origination Authorization failed, (LUDB Index = %d)\n",
+ parent->ludbIndex());
+ DBG_LEAVE();
+
+ return (handleMobRemoteAbnormalRelCom());
+ }
+
+ //CLIR <xxu:07-26-01> Begin
+ T_SS_SUBSC_CLIR_OPTION option;
+ bool isProvCLIR;
+ int ret;
+
+ if (ret=ludbGetCLIROption(parent->ludbIndex(), &option, &isProvCLIR))
+ {
+ DBG_ERROR("CC Half Call Log: ludbGetCLIROption() Failed (error=%d) for (ludbId=%d)\n",
+ ret, parent->ludbIndex());
+ DBG_LEAVE();
+ return (handleMobRemoteAbnormalRelCom());
+ }
+
+ DBG_TRACE("CC Half Call Log: ludbGetCLIROption() returned data (isProvCLIR=%d,option=%d,ret=%d,ludbId=%d)\n",
+ isProvCLIR, option, ret, parent->ludbIndex());
+
+ if (isProvCLIR)
+ {
+ if (setup->clirInvocation.ie_present || setup->clirSuppression.ie_present)
+ {
+ //Reject the call
+ DBG_TRACE("CC Half Call Log: Call rejected due to illegal attempt of CLIR featire clirInv(%d) clirSup(%d)!\n",
+ setup->clirInvocation.ie_present, setup->clirSuppression.ie_present);
+ rlsCause.causeValue = CNI_RIL3_CAUSE_REQUESTED_SERVICE_NOT_SUBSCRIBED;
+ DBG_LEAVE();
+ return (handleMobRemoteAbnormalRelCom());
+ }
+
+ remMsgData.setup.clir.ie_present = true;
+ remMsgData.setup.clir.clirSetting = CNI_RIL3_PRESENTATION_ALLOWED;
+
+ } else
+ {
+ switch(option)
+ {
+ case CLIR_PERMANENT:
+ //if (setup->clirSuppression.ie_present) Need to notify subscriber later
+ remMsgData.setup.clir.ie_present = true;
+ remMsgData.setup.clir.clirSetting = CNI_RIL3_PRESENTATION_RESTRICTED;
+ break;
+
+ case CLIR_TEMP_DFT_RESTRICTED:
+ remMsgData.setup.clir.ie_present = true;
+ if (setup->clirSuppression.ie_present)
+ remMsgData.setup.clir.clirSetting = CNI_RIL3_PRESENTATION_ALLOWED;
+ else
+ remMsgData.setup.clir.clirSetting = CNI_RIL3_PRESENTATION_RESTRICTED;
+ break;
+
+ case CLIR_TEMP_DFT_ALLOWED:
+ remMsgData.setup.clir.ie_present = true;
+ if (setup->clirInvocation.ie_present)
+ remMsgData.setup.clir.clirSetting = CNI_RIL3_PRESENTATION_RESTRICTED;
+ else
+ remMsgData.setup.clir.clirSetting = CNI_RIL3_PRESENTATION_ALLOWED;
+ break;
+
+ default:
+ DBG_ERROR("CC Half Call Log: ludbGetCLIROption() Incorrect Option(%d) for (ludbId=%d)\n",
+ option, parent->ludbIndex());
+ break;
+ }
+ }
+
+ DBG_TRACE("CC Half Call Log: CLIR sent to VoIP (ie_present=%d,clirSetting=%d,ludbId=%d)\n",
+ remMsgData.setup.clir.ie_present,
+ remMsgData.setup.clir.clirSetting, parent->ludbIndex());
+
+ //CLIR <xxu:07-26-01> End
+
+ // Build Call Proceeding as soon as the origination authorization
+ // is successful. Don't have to wait for a Call Proceeding from the
+ // H323 side.
+ // Build the Call Proceeding Message towards the MS.
+ if ( (msOutResult = buildCallProceeding (&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the error. Release RR resources
+
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+ }
+
+ // BCT <xxu:07-11-00> BEGIN
+ if ( parent->getBctInvoke() )
+ {
+ hcTimer->setTimer(CALL_BCT_NUMBER_TVB);
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+ // BCT <xxu:07-11-00> END
+
+ // copy the call reference value towards the VOIP side.
+ // remMsgData.callSetup.callRefValue = parent->callRefValue;
+
+ // Always do sendRemote at the end of the handler.
+ // Now send setup to the other half call.
+ if (sendRemote(THC_REMOTE_TERM_ADDRESS) == false)
+ // failed commn. with the remote side - treat as a release complete
+ // from the remote side and cleanup - skip event loop.
+ {
+
+ DBG_LEAVE();
+ return (handleMobRemoteAbnormalRelCom());
+ }
+
+ // set this boolean to true until we actually send a setup request to VOIP.
+ parent->disconnectSentToVoip = false;
+
+ // EFR Change
+ // Also send a request to RRM for channel assignment.
+ // Very early assignment - begin
+ // DBG_LEAVE();
+ // return (CC_RESOURCE_ASSIGN_REQ);
+ // Very early assignment - end
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCHalfCall::handleMobEmergencyOrigination(void)
+{
+ DBG_FUNC("CCHalfCall::handleMobEmergencyOrigination", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+ T_SUBSC_IE_MOBILE_ID_IMSI *imsiPtr;
+ T_SUBSC_IE_ISDN *msisdnPtr;
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+ int i;
+
+ // declare a pointer to the setup portion of the message
+ T_CNI_RIL3CC_MSG_EMERGENCY_SETUP *setup = &(msDecodedMsg->emergencySetup);
+
+ // Copy the transaction identifier
+ ti = (msDecodedMsg->header.si_ti | ORIG_OR_MASK);
+
+ // Cancel MM Conn Est timer
+ hcTimer->cancelTimer();
+
+ setupTime_ = tickGet();
+
+ cpn.ie_present = false;
+
+ cpn.numDigits = 1;
+
+ // setup remote data struct
+ remMsgData.setup.CalledPartyNumber = cpn;
+
+ // Bearer Capability is optional.
+ // If BC not present, initialize with FR
+
+ if (!(setup->bearCap.ie_present))
+ {
+ setup->bearCap.ie_present = true;
+ setup->bearCap.speechVersionInd[0].fieldPresent = true;
+ setup->bearCap.speechVersionInd[0].version = CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1;
+ setup->bearCap.speechVersionInd[1].fieldPresent = false;
+ setup->bearCap.speechVersionInd[2].fieldPresent = false;
+ }
+
+ if ( !( setup->bearCap.speechVersionInd[0].fieldPresent ||
+ setup->bearCap.speechVersionInd[1].fieldPresent ||
+ setup->bearCap.speechVersionInd[2].fieldPresent ) )
+ {
+ setup->bearCap.speechVersionInd[0].fieldPresent = 1;
+ setup->bearCap.speechVersionInd[0].version = CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1;
+ }
+
+ for (i=0; i < 3; i++)
+ {
+ remMsgData.setup.bearerCap.speechVersionInd[i] =
+ setup->bearCap.speechVersionInd[i];
+ }
+
+ //PR1508
+ DBG_TRACE("RIL3->CC code(Voip)(Em): 1st(%d,%d) 2nd(%d,%d) 3rd(%d,%d)\n",
+ remMsgData.setup.bearerCap.speechVersionInd[0].fieldPresent,
+ remMsgData.setup.bearerCap.speechVersionInd[0].version,
+ remMsgData.setup.bearerCap.speechVersionInd[1].fieldPresent,
+ remMsgData.setup.bearerCap.speechVersionInd[1].version,
+ remMsgData.setup.bearerCap.speechVersionInd[2].fieldPresent,
+ remMsgData.setup.bearerCap.speechVersionInd[2].version);
+
+ remMsgData.setup.IsEmergencyCall = true;
+
+ callState_ = OHC_ST_OFFERING_CALL;
+
+ // Build Call Proceeding as soon as the origination authorization
+ // is successful. Don't have to wait for a Call Proceeding from the
+ // H323 side.
+ // Build the Call Proceeding Message towards the MS.
+ if ( (msOutResult = buildCallProceeding (&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the error. Release RR resources
+
+ //CAUSE<xxu:03-21-00> BEGIN
+
+ rlsCause.causeValue = CNI_RIL3_CAUSE_TEMPORARY_FAILURE;
+ voipReleaseCause_ = CNI_RIL3_CAUSE_TEMPORARY_FAILURE;
+
+ //CAUSE<xxu:03-21-00> END
+
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+ }
+
+ // copy the call reference value towards the VOIP side.
+ // remMsgData.callSetup.callRefValue = parent->callRefValue;
+
+ // Always do sendRemote at the end of the handler.
+ // Now send setup to the other half call.
+ if (sendRemote(THC_REMOTE_TERM_ADDRESS) == false)
+ // failed commn. with the remote side - treat as a release complete
+ // from the remote side and cleanup - skip event loop.
+ {
+ DBG_LEAVE();
+ return (handleMobRemoteAbnormalRelCom());
+ }
+
+ // set this boolean to true until we actually send a setup request to VOIP.
+ parent->disconnectSentToVoip = false;
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+// disconnect handler
+JCCEvent_t
+CCHalfCall::handleDisconnectReq(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleDisconnectReq", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ if ((currEvent == HC_LOCAL_DISCONNECT_REQ) && // Mobile disconnected
+ (msDecodeResult == CNI_RIL3_RESULT_SUCCESS)) // not caused by protocol errors
+ {
+ // declare a pointer to the disconnect portion of the message
+ T_CNI_RIL3CC_MSG_DISCONNECT *msInMsg = &(msDecodedMsg->disconnect);
+
+ if (callState_ != HC_ST_DISCONNECT_IND)
+ rlsCause.causeValue = msInMsg->cause.causeValue;
+
+ // Make sure that release cause is not sent in the release message.
+ rlsCause.ie_present = false;
+
+ if (rlsCause.causeValue == 0)
+ {
+ DBG_TRACE("RIL3->CC Warning: cause value from the Mobile is 0!\n");
+ rlsCause.causeValue = CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING;
+ }
+ }
+
+ //CAUSE<xxu:03-21-00> BEGIN
+
+ else if (currEvent == HC_LOCAL_PROTOCOL_TIMEOUT)
+ {
+ if (callState_ != THC_ST_ALERTING)
+ rlsCause.causeValue = CNI_RIL3_CAUSE_RECOVERY_ON_TIMER_EXPIRY;
+ }
+ else
+ {
+ if (currEvent != CC_TWO_STAGE_DISCONNECT)
+ rlsCause.causeValue = CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING;
+ }
+
+ voipReleaseCause_ = rlsCause.causeValue;
+
+ // Always do sendRemote at the end of the handler.
+ // Now send the internal Rel Complt message to the other H.323 half call -
+ if (sendRemote(HC_REMOTE_RELEASE_COMPLETE) == false)
+ // failed commn. with the remote side - treat as a release complete
+ // from the remote side and cleanup - skip event loop.
+ {
+ DBG_LEAVE();
+ return (handleMobRemoteAbnormalRelCom());
+ }
+
+ //switch (rlsCause.causeValue)
+ // {
+ // case CNI_RIL3_CAUSE_USER_BUSY:
+ // voipReleaseCause_ = MOBILE_CAUSE_USER_BUSY;
+ // break;
+ //
+ // case CNI_RIL3_CAUSE_CALL_REJECTED:
+ // voipReleaseCause_ = MOBILE_CAUSE_CALL_REJECTED;
+ // break;
+ //
+ // case CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING:
+ // voipReleaseCause_ = MOBILE_CAUSE_NORMAL_CALL_CLEARING;
+ // break;
+ //
+ // case CNI_RIL3_CAUSE_CHANNEL_UNACCEPTABLE:
+ // voipReleaseCause_ = MOBILE_CAUSE_CHANNEL_UNACCEPTABLE;
+ // break;
+ //
+ // case CNI_RIL3_CAUSE_NORMAL_UNSPECIFIED:
+ // voipReleaseCause_ = MOBILE_CAUSE_UNSPECIFIED;
+ // break;
+ //
+ // default:
+ // switch((rlsCause.causeValue) >> 4)
+ // {
+ // case CNI_RIL3_CAUSE_CLASS_RESOURCE_UNAVAILABLE:
+ // voipReleaseCause_ = MOBILE_CAUSE_RESOURCES_UNAVAILABLE;
+ // break;
+ //
+ // case CNI_RIL3_CAUSE_CLASS_PROTOCOL_ERROR:
+ // voipReleaseCause_ = MOBILE_CAUSE_UNSPECIFIED;
+ // break;
+ //
+ // default:
+ // voipReleaseCause_ = MOBILE_CAUSE_UNSPECIFIED;
+ // break;
+ // }
+ // }
+
+ //CAUSE<xxu:03-21-00> END
+
+ // cancel any timers
+ hcTimer->cancelTimer();
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ // Build the Release Message towards the MS.
+ if ( (msOutResult = buildReleaseReq (&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the error. Release RR resources
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+ }
+
+
+ // start the release timer
+ hcTimer->setTimer(CALL_RELEASE_T308);
+ releaseCounter = 1;
+
+ callState_ = HC_ST_RELEASE_REQ;
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+// Same handler can also be used for when an abnormal Rls is received
+JCCEvent_t
+CCHalfCall::handleReleaseReq(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleReleaseReq", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // Look at Cause value?
+ if ((currEvent == HC_LOCAL_RELEASE_REQ) && // Mobile sent release
+ (msDecodeResult == CNI_RIL3_RESULT_SUCCESS)) // not caused by protocol errors
+ {
+ //CAUSE<xxu:03-21-00> BEGIN
+
+ DBG_TRACE("CC Info: handleReleaseReq, ie_present %d, causeValue %d\n",
+ msDecodedMsg->release.cause.ie_present,
+ msDecodedMsg->release.cause.causeValue);
+
+ if (msDecodedMsg->release.cause.ie_present &&
+ callState_ != HC_ST_DISCONNECT_IND)
+ {
+ rlsCause.causeValue = msDecodedMsg->release.cause.causeValue;
+ }
+
+ //CAUSE<xxu:03-21-00> END
+
+ // Make sure that cause is not sent in the release complete message.
+ rlsCause.ie_present = false;
+ }
+
+ //CAUSE<xxu:03-21-00> BEGIN
+
+ voipReleaseCause_ = rlsCause.causeValue;
+
+ //CAUSE<xxu:03-21-00> END
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ // Build the Release Message towards the MS.
+ if ( (msOutResult = buildReleaseComplete (&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the error. Release RR resources
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+ }
+
+
+ // !< Transaction Id. has to be released, maybe in res_release? Yes
+
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+}
+
+// Not be used for when an abnormal Rls Complete
+JCCEvent_t
+CCHalfCall::handleMobReleaseComplete(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleMobReleaseComplete", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ //CAUSE<xxu:03-21-00> BEGIN
+
+ if ( (msDecodeResult == CNI_RIL3_RESULT_SUCCESS) &&
+ (msDecodedMsg->header.message_type==CNI_RIL3CC_MSGID_RELEASE_COMPLETE) &&
+ (msDecodedMsg->releaseComplete.cause.ie_present) )
+ {
+ rlsCause.causeValue = msDecodedMsg->releaseComplete.cause.causeValue;
+ voipReleaseCause_ = msDecodedMsg->releaseComplete.cause.causeValue;
+ }
+
+ //CAUSE<xxu:03-21-00> END
+
+ // No need to look at Cause value for now.
+ // !< Transaction Id. has to be released - in res_release
+
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+}
+
+//CAUSE<xxu:03-21-00> BEGIN
+JCCEvent_t
+CCHalfCall::handleMobReleaseCompleteUtil(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleMobReleaseCompleteUtil", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ callState_ = HC_ST_NULL;
+
+ // No need to look at Cause value for now.
+ // !< Transaction Id. has to be released - in res_release
+
+ // Always do sendRemote at the end of the handler.
+ // Now send the internal Rel Complt message to the other H.323 half call -
+
+ if (sendRemote(HC_REMOTE_RELEASE_COMPLETE) == false)
+ // failed commn. with the remote side - treat as a release complete
+ // from the remote side and cleanup - skip event loop.
+ {
+ DBG_LEAVE();
+ return (handleMobRemoteAbnormalRelCom());
+ }
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+}
+
+//CAUSE<xxu:03-21-00> END
+
+JCCEvent_t
+CCHalfCall::handleStartDtmf(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleStartDtmf", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ //
+ // declare a pointer to the start dtmf portion of the message
+ T_CNI_RIL3CC_MSG_START_DTMF *msInMsg = &(msDecodedMsg->startDTMF);
+
+ currKeypadFacility_ = msInMsg->keypadFacility;
+
+ // Send an Ack. back to the MS.
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ // Build the Ack Message towards the MS.
+ if ( (msOutResult = buildStartDtmfAck (&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the error. Not critical to the call.
+ JCCLog1("RIL3->CC: Build Start DTMF Ack problem, (RIL3 result = %d)\n",
+ msOutResult);
+ DBG_ERROR("RIL3->CC: Build Start DTMF Ack problem, (RIL3 result = %d)\n",
+ msOutResult);
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ DBG_TRACE ("CC DTMF Log: (keypad info. = %d) received.\n",
+ msInMsg->keypadFacility.keypadInfo);
+
+ // Nullify the digit
+ remMsgData.dtmfDigit = 0;
+
+ remMsgData.dtmfDigit = (short)(msInMsg->keypadFacility.keypadInfo);
+
+ if (remMsgData.dtmfDigit == 0x23)
+ {
+ remMsgData.dtmfDigit = 0x0b;
+ }
+ else
+ {
+ remMsgData.dtmfDigit = (remMsgData.dtmfDigit & 0x0f);
+ }
+
+ // Send an Ack. back to the MS.
+ if (sendRemote(HC_REMOTE_DTMF_REQ) == false)
+ // failed commn. with the remote side
+ {
+ // Log the error. Not critical to the call.
+ JCCLog("CC->VOIP: Start DTMF problem. Send to remote(H323) failed\n");
+ DBG_ERROR("CC->VOIP: Start DTMF problem. Send to remote(H323) failed\n");
+ }
+
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCHalfCall::handleStopDtmf(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleStopDtmf", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ //
+ // Send an Ack. back to the MS.
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ // Build the Ack Message towards the MS.
+ if ( (msOutResult = buildStopDtmfAck (&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the error. Not critical to the call.
+ JCCLog1("RIL3->CC: Build Stop DTMF Ack problem, (RIL3 result = %d)\n",
+ msOutResult);
+ DBG_ERROR("RIL3->CC: Build Stop DTMF Ack problem, (RIL3 result = %d)\n",
+ msOutResult);
+ }
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+// !< For all msgs,local and remote, User-to-User support can be added later,
+// connected subaddress is related to this.
+
+//CH<xxu:11-10-99>
+JCCEvent_t
+CCHalfCall::handleHoldAct(void)
+{
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ DBG_FUNC("CCHalfCall::handleHoldAct", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE ("CC CallLog @HoldAct: callId=%d, callState=%d, chState=%d\n",
+ parent->callIndex, callState_, chState_);
+
+ //Calling this method implies the call's main state is active right now
+ //Accept the HoldAct from mobile and behave consistently inside network
+ chState_ = CH_ST_HELD;
+
+ // Build the Hold Ack Message towards the MS.
+ if ( (msOutResult = buildHoldAck(&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the software design bug, no workaround is proper here.
+ JCCLog1("RIL3->CC: Build HoldAck problem, (RIL3 result = %d)\n",
+ msOutResult);
+ DBG_ERROR("RIL3->CC: Build HoldAck problem, (RIL3 result = %d)\n",
+ msOutResult);
+ chState_ = CH_ST_IDLE;
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //Hold the call's traffic path
+ T_CSU_PORT_ID srcPort, dstPort;
+ T_CSU_RESULT_CON csuResult;
+
+ srcPort = parent->parent->mobileCsuPort();
+ dstPort.portType = CSU_RTP_PORT;
+ dstPort.portId.rtpHandler = VoipCallGetRTPHandle(parent->h323CallHandle);
+
+ if ((csuResult = csu_DuplexBreak(&srcPort, &dstPort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog2("CSU Error : Disconn. Failure, (Result = %d) for (entryId = %d)\n",
+ csuResult, parent->entryId());
+ DBG_ERROR("CSU Error : Disconn. Failure, (Result = %d) for (entryId = %d)\n",
+ csuResult, parent->entryId());
+
+ }
+
+ parent->voiceConnected = false;
+
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+//CH<xxu:11-24-99>
+JCCEvent_t
+CCHalfCall::handleHoldRej(void)
+{
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ DBG_FUNC("CCHalfCall::handleHoldRej", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE ("CC CallLog @HoldRej: callId=%d, callState=%d, chState=%d\n",
+ parent->callIndex, callState_, chState_);
+
+ //Only build and send out HOLD REJ message, nothing else!
+
+ // Build the Hold Rej Message towards the MS.
+ if ( (msOutResult = buildHoldRej(&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the software design bug, no workaround is proper here.
+ JCCLog1("RIL3->CC: Build HoldRej problem, (RIL3 result = %d)\n",
+ msOutResult);
+ DBG_ERROR("RIL3->CC: Build HoldRej problem, (RIL3 result = %d)\n",
+ msOutResult);
+ }
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+//CH<xxu:11-10-99>
+JCCEvent_t
+CCHalfCall::handleRetvAct(void)
+{
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ DBG_FUNC("CCHalfCall::handleRetvAct", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE ("CC CallLog @RetvAct: callId=%d, callState=%d, chState=%d\n",
+ parent->callIndex, callState_, chState_);
+
+ //Calling this method implies the call's main state is active right now
+ //Accept the RetvAct from mobile and behave consistently inside network
+ chState_ = CH_ST_IDLE;
+
+ // Build the Retv Ack Message towards the MS.
+ if ( (msOutResult = buildRetvAck(&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the software design bug, no workaround is proper here.
+ JCCLog1("RIL3->CC: Build RetvAck problem, (RIL3 result = %d)\n",
+ msOutResult);
+ DBG_ERROR("RIL3->CC: Build RetvAck problem, (RIL3 result = %d)\n",
+ msOutResult);
+ chState_ = CH_ST_IDLE;
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //Unhold the call's traffic path
+ T_CSU_PORT_ID srcPort, dstPort;
+ T_CSU_RESULT_CON csuResult;
+
+ srcPort = parent->parent->mobileCsuPort();
+ dstPort.portType = CSU_RTP_PORT;
+ dstPort.portId.rtpHandler = VoipCallGetRTPHandle(parent->h323CallHandle);
+
+ if ((csuResult = csu_DuplexConnect(&srcPort, &dstPort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog2("CSU Error : Disconn. Failure, (Result = %d) for (entryId = %d)\n",
+ csuResult, parent->entryId());
+ DBG_ERROR("CSU Error : Disconn. Failure, (Result = %d) for (entryId = %d)\n",
+ csuResult, parent->entryId());
+ }
+
+ parent->voiceConnected = true;
+
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+//CH<xxu:11-24-99>
+JCCEvent_t
+CCHalfCall::handleRetvRej(void)
+{
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ DBG_FUNC("CCHalfCall::handleRetvRej", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE ("CC CallLog @RetvRej: callId=%d, callState=%d, chState=%d\n",
+ parent->callIndex, callState_, chState_);
+
+ //Calling this method implies the call's main state is active right now
+ //Only build and send out RETRIEVE REJ message, nothing else!
+
+ // Build the Retv Reg Message towards the MS.
+ if ( (msOutResult = buildRetvRej(&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the software design bug, no workaround is proper here.
+ JCCLog1("RIL3->CC: Build RetvRej problem, (RIL3 result = %d)\n",
+ msOutResult);
+ DBG_ERROR("RIL3->CC: Build RetvRej problem, (RIL3 result = %d)\n",
+ msOutResult);
+ }
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+//CH<xxu:11-10-99>
+JCCEvent_t
+CCHalfCall::handleHoldReq(void)
+{
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ DBG_FUNC("CCHalfCall::handleHoldReq", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE ("CC CallLog @HoldReq: callId=%d, callState=%d, chState=%d\n",
+ parent->callIndex, callState_, chState_);
+
+ //Calling this method implies the call's main state is active right now
+ //Accept the HoldReq from mobile and behave consistently inside network
+ chState_ = CH_ST_HREQ;
+
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+//CH<xxu:11-10-99>
+JCCEvent_t
+CCHalfCall::handleSwapTimerExpiry(void)
+{
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ DBG_FUNC("CCHalfCall::handleSwapTimerExpiry", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE ("CC CallLog @SwapTimerExpiry: callId=%d, callState=%d, chState=%d\n",
+ parent->callIndex, callState_, chState_);
+
+ //Calling this method implies the call's main state is active right now
+ //Accept the RetvAct from mobile and behave consistently inside network
+ chState_ = CH_ST_IDLE;
+
+ // Build the Hold Rej Message towards the MS.
+ if ( (msOutResult = buildHoldRej(&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the software design bug, no workaround is proper here.
+ JCCLog1("RIL3->CC: Build HoldRej problem, (RIL3 result = %d)\n",
+ msOutResult);
+ DBG_ERROR("RIL3->CC: Build HoldRej problem, (RIL3 result = %d)\n",
+ msOutResult);
+ //return (CC_MESSAGE_PROCESSING_COMPLT); //Allow voice is better
+ }
+
+ //Resume traffic path blindly
+ T_CSU_PORT_ID srcPort,dstPort;
+
+ srcPort = parent->parent->mobileCsuPort();
+ dstPort.portType = CSU_RTP_PORT;
+ dstPort.portId.rtpHandler = VoipCallGetRTPHandle(parent->h323CallHandle);
+
+ csu_DuplexConnect(&srcPort, &dstPort);
+
+ parent->voiceConnected = true;
+
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+//CH<xxu:Mod 12-13-99>
+JCCEvent_t
+CCHalfCall::handleRetvReq(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleRetvReq", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE ("CC CallLog @handleRetvReq: callId=%d, callState=%d, chState=%d\n",
+ parent->callIndex, callState_, chState_);
+
+ // If external handover has occurred
+ if (parent->parent->handoverSession->hoState_ == HAND_ST_ANCH_EHO_COMPLT)
+ {
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+ T_CSU_PORT_ID rfSourcePort, rtpSinkPort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSinkPort.portType = CSU_RTP_PORT;
+ rtpSinkPort.portId.rtpHandler = VoipCallGetRTPHandle(parent->h323CallHandle);
+
+ rfSourcePort = parent->parent->mobileCsuPort();
+
+ if ((csuResult = csu_DuplexConnect(&rfSourcePort, &rtpSinkPort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog2("CSU Error : Duplex Conn. Failure, (Result = %d) for (rtp port = %x)\n",
+ csuResult,
+ (int)rtpSinkPort.portId.rtpHandler);
+ DBG_ERROR("CSU Error : Duplex Conn. Failure, (Result = %d) for (rtp port = %x)\n",
+ csuResult,
+ (int)rtpSinkPort.portId.rtpHandler);
+
+ rlsCause.causeValue = CNI_RIL3_CAUSE_TEMPORARY_FAILURE; //CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+
+ //CAUSE<xxu:03-21-00> BEGIN
+
+ voipReleaseCause_ = CNI_RIL3_CAUSE_TEMPORARY_FAILURE; //CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+
+ //CAUSE<xxu:03-21-00> END
+
+ DBG_LEAVE();
+ return (CC_TWO_STAGE_DISCONNECT);
+ }
+
+ parent->voiceConnected = true;
+
+ // Build the Retv Ack Message towards the MS.
+ if ( (msOutResult = buildRetvAck(&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the software design bug, no workaround is proper here.
+ JCCLog1("RIL3->CC: Build RetvAck problem, (RIL3 result = %d)\n",
+ msOutResult);
+ DBG_ERROR("RIL3->CC: Build RetvAck problem, (RIL3 result = %d)\n",
+ msOutResult);
+ }
+
+ //Voice path connected successfully for Retrive operation, send back RETV ACK
+ parent->msSide->chState_ = CH_ST_IDLE;
+
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+
+ //Change chState to CH_ST_RREQ and return CC_RESOURCE_ASSIGN_REQ to reconnect
+ //traffic channel back
+
+ chState_ = CH_ST_RREQ;
+
+ return (CC_RESOURCE_ASSIGN_REQ);
+}
+
+JCCEvent_t
+CCHalfCall::handleMobStatusInfo(void)
+{
+ DBG_FUNC("CCHalfCall::handleMobStatusInfo", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // declare a pointer to the status portion of the message
+ T_CNI_RIL3CC_MSG_STATUS *statusMsg = &(msDecodedMsg->status);
+
+ // let the developer/tester/fields person decide.
+ // The user of the system needs to check this out to find the problem.
+ DBG_WARNING("MS->CC Status: (coding = %d, cause = %d),(coding = %d, call state = %d) \n",
+ statusMsg->cause.codingStandard,
+ statusMsg->cause.causeValue,
+ statusMsg->callState.codingStandard,
+ statusMsg->callState.state);
+ if (statusMsg->auxStates.ie_present)
+ {
+ DBG_WARNING("MS->CC Status: Aux. states(hold state = %d),(mpty state = %d) \n",
+ statusMsg->auxStates.holdState,
+ statusMsg->auxStates.mptyState);
+ }
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+}
+
+JCCEvent_t
+CCHalfCall::handleMobStatusEnquiry(void)
+{
+ DBG_FUNC("CCHalfCall::handleMobStatusEnquiry", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ // Build the Status Message towards the MS.
+ if ( (msOutResult = buildStatusInfo (&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the error. Don't Release Channel resources. It is not a critical problem.
+ }
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+}
+
diff --git a/data/mnet/GP10/Host/cc/src/CCMobIntHnd.cpp b/data/mnet/GP10/Host/cc/src/CCMobIntHnd.cpp
new file mode 100644
index 0000000..73905c4
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CCMobIntHnd.cpp
@@ -0,0 +1,696 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCMobIntHnd.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : CC Handlers for events triggered internal to ViperCell.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+//
+#include "CC/CCHalfCall.h"
+#include "CC/CallLeg.h"
+#include "CC/CCSessionHandler.h"
+
+#include "CC/CCUtil.h"
+#include "CC/CallConfig.h"
+
+#include "logging/VCLOGGING.h"
+#include "jcc/JCCLog.h"
+
+// included MD and IRT headers for messages from MS
+#include "ril3/ril3md.h"
+
+#include "stdio.h"
+
+// Temporarily use csu_head instead of csu_intf
+#include "csunew/csu_head.h"
+
+#include "JCC/LUDBapi.h"
+
+#include "JCC/JCCUtil.h"
+
+bool forcedCodec = false;
+
+extern bool callTrace;
+
+INT16 forcedCodecSpeechVersion = CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_2;
+
+#include "rm/rm_head.h"
+extern u8 rm_EntryIdToTrxSlot(T_CNI_IRT_ID entryId, u16 *gsmHandler);
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+// Timeout during THC_ST_CALL_CONFIRMED, THC_ST_ALERTING,
+// THC_ST_PRESENTING_CALL and OHC_ST_CONNECT_INDICATION
+// are all handled the same as CC_TWO_STAGE_DISCONNECT
+// event, which is basically the logic in handleDisconnectReq
+// !< But in these cases, Release Cause is needed when used to
+// initiate call clearing. Set it in the timeout handlers.
+
+void
+forcedCodecOn (void)
+{
+ forcedCodec = true;
+}
+
+void
+forcedCodecOff (void)
+{
+ forcedCodec = false;
+}
+
+void
+setCodecSpeechVersion (INT16 speechVersion)
+{
+ forcedCodecSpeechVersion = speechVersion;
+}
+
+// Connection Manager functionality
+JCCEvent_t
+CCHalfCall::handleConnReq(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleConnReq", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ T_CSU_PORT_ID rfSourcePort, rtpSinkPort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSinkPort.portType = CSU_RTP_PORT;
+ rtpSinkPort.portId.rtpHandler = VoipCallGetRTPHandle(parent->h323CallHandle);
+
+ rfSourcePort = parent->parent->mobileCsuPort();
+
+ if ((csuResult = csu_DuplexConnect(&rfSourcePort, &rtpSinkPort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog2("CSU Error : Duplex Conn. Failure, (Result = %d) for (rtp port = %x)\n",
+ csuResult,
+ (int)rtpSinkPort.portId.rtpHandler);
+ DBG_ERROR("CSU Error : Duplex Conn. Failure, (Result = %d) for (rtp port = %x)\n",
+ csuResult,
+ (int)rtpSinkPort.portId.rtpHandler);
+
+ rlsCause.causeValue = CNI_RIL3_CAUSE_TEMPORARY_FAILURE; //CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+
+ //CAUSE<xxu:03-21-00> BEGIN
+
+ voipReleaseCause_ = CNI_RIL3_CAUSE_TEMPORARY_FAILURE; //CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+
+ //CAUSE<xxu:03-21-00> END
+
+ DBG_LEAVE();
+ return (CC_TWO_STAGE_DISCONNECT);
+ }
+
+ parent->voiceConnected = true;
+
+ if ( (callState_==HC_ST_ACTIVE && chState_==CH_ST_RREQ) || (parent->bctArrival_) )
+ {
+ //BCT <xxuL09-22-00> BEGIN
+ if (parent->bctArrival_)
+ {
+ //Bridge voice path for BCT
+ DBG_TRACE("CC->BCT(csuDconn): chState(%d,%d) callSt(%d) bct(%d,%d) callHndl(%x) snk(%d,%x)\n",
+ parent->h245ChannState, channState_,callState_,
+ parent->getBctInvoke(), parent->bctArrival_,
+ parent->h323CallHandle,
+ rfSourcePort.portType, rfSourcePort.portId.rtpHandler);
+ parent->bctArrival_ = false;
+ }
+
+ DBG_LEAVE();
+ return (CC_CONNECT_COMPLT);
+ } else
+ {
+ // CDR <xxu:08-21-00> BEGIN
+ parent->ccCdr.answer((unsigned char)BEARER_SPEECH, (unsigned char)currSpeechCh_.version);
+ parent->ccCdrCallState = true;
+ parent->ccCdrTimer->setTimer(CALL_CDR_10M);
+
+ // CDR <xxu:08-21-00> END
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+}
+
+JCCEvent_t
+CCHalfCall::handleNullEvent(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleNullEvent", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // Do Nothing.
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+// Disconnect Timeout
+JCCEvent_t
+CCHalfCall::handleDisconnectTimeout(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleDisconnectTimeout", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // !< Release Cause (same as the Disconnect Cause) needs to be included.
+ // !< A second Release Cause may be included(timer expiry)
+
+ // print out the trx, timeslot for better debugging
+ UINT16 gsmHandler;
+ UINT8 trx, slot;
+ T_SUBSC_IE_ISDN* isdnPtr;
+
+ if (rm_EntryIdToTrxSlot(parent->entryId(),
+ &gsmHandler) ==
+ RM_TRUE)
+ {
+
+ trx = (UINT8)(gsmHandler>>8);
+ slot = (UINT8)(gsmHandler);
+
+ DBG_WARNING("CC Log: Disconnect got no response from MS on (TRX=%d),(Slot=%d),(entryId=%d)\n",
+ trx, slot, parent->entryId());
+ if ((isdnPtr = ludbGetMSISDNPtr(parent->ludbIndex())) != NULL)
+ {
+ DBG_WARNING("CC Log: MS (DN=%s)\n",
+ isdnPtr->digits);
+ }
+ }
+
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ // Build the Release Message towards the MS.
+ if ( (msOutResult = buildReleaseReq (&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the error. Release RR resources
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+ }
+
+ // start the release timer
+ hcTimer->setTimer(CALL_RELEASE_T308);
+ releaseCounter = 1;
+
+ callState_ = HC_ST_RELEASE_REQ;
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCHalfCall::handleReleaseTimeout(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleReleaseTimeout", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // print out the trx, timeslot for better debugging
+ UINT16 gsmHandler;
+ UINT8 trx, slot;
+ T_SUBSC_IE_ISDN* isdnPtr;
+
+ if (rm_EntryIdToTrxSlot(parent->entryId(),
+ &gsmHandler) ==
+ RM_TRUE)
+ {
+
+ trx = (UINT8)(gsmHandler>>8);
+ slot = (UINT8)(gsmHandler);
+
+ DBG_WARNING("CC Log: Release got no response from MS on (TRX=%d),(Slot=%d),(entryId=%d),(releaseCount=%d)\n",
+ trx, slot, parent->entryId(), releaseCounter);
+ if ((isdnPtr = ludbGetMSISDNPtr(parent->ludbIndex())) != NULL)
+ {
+ DBG_WARNING("CC Log: MS (DN=%s)\n",
+ isdnPtr->digits);
+ }
+ }
+
+
+ if (releaseCounter == 0)
+ {
+ // already repeated release msg.
+ // !< Transaction Id. has to be released, maybe in res_release? - Yes!
+
+ // Release RR resources
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+ }
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ // Build the Release Message towards the MS.
+ if ( (msOutResult = buildReleaseReq (&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the error. Release RR resources
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+ }
+
+ // start the release timer
+ hcTimer->setTimer(CALL_RELEASE_T308);
+ releaseCounter = 0;
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCHalfCall::handleMobResRelease(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleMobResRelease", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // Release Local Resources
+ // Release Connection resources, if there are any
+ if (parent->voiceConnected)
+ {
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = VoipCallGetRTPHandle(parent->h323CallHandle);
+
+ if ((csuResult = csu_OrigTermBreakAll(&rtpSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+
+ JCCLog2("CSU Error : Disconn. Failure, (Result = %d) for (RTPHandle = %p)\n",
+ csuResult, (int)rtpSourcePort.portId.rtpHandler);
+ DBG_ERROR("CSU Error : Disconn. Failure, (Result = %d) for (RTPHandle = %p)\n",
+ csuResult, rtpSourcePort.portId.rtpHandler);
+
+ // Can only generate OA&M log.
+ }
+
+ parent->voiceConnected = false;
+
+ }
+
+ // Always do sendRemote at the end of the handler.
+ // Now send the internal Rel Complt message to the other H.323 half call -
+ if (sendRemote(HC_REMOTE_RELEASE_COMPLETE) == false)
+ // failed commn. with the remote side - treat as a release complete
+ // from the remote side and cleanup - skip event loop.
+ {
+ DBG_LEAVE();
+ return (handleMobRemoteAbnormalRelCom());
+ }
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+
+}
+
+JCCEvent_t
+CCHalfCall::handleChannAssignReq(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleChannAssignReq", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+
+ IntraL3Msg_t rrOutMsg;
+
+ if (forcedCodec)
+ {
+ currSpeechCh_.version =
+ (T_CNI_RIL3_SPEECH_VERSION)forcedCodecSpeechVersion;
+ }
+
+ // Assign Local Resources
+ // Send internal RR msg
+ rrOutMsg.l3_data.channAssignCmd.channelType.bearerType = BEARER_SPEECH;
+
+ rrOutMsg.l3_data.channAssignCmd.channelType.speechChann
+ = currSpeechCh_;
+
+ DBG_TRACE("CC->RR: Chann Assignment Request with Speech Version: %d",
+ rrOutMsg.l3_data.channAssignCmd.channelType.speechChann.version);
+
+ parent->parent->sendRRMsg((IntraL3PrimitiveType_t)(parent->callLegNum), INTRA_L3_RR_CHANN_ASSIGN_CMD, &rrOutMsg);
+
+ channState_ = RES_ST_ASS_REQ;
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCHalfCall::handleChannAssignComplt(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleChannAssignComplt", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // Synchronize with the main state machine
+ channState_ = RES_ST_ASSIGNED;
+
+ if (parent->procType == CC_PROC_MOB_ORIG)
+ {
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ ULONG setupCompltTime;
+
+ if (!alertingSent_)
+ {
+ // calculate the setup time
+ setupCompltTime = tickGet();
+
+ DBG_TRACE("Call Setup time in number of system ticks(%d)\n",
+ (setupCompltTime - setupTime_));
+
+ PM_CCMeasurement.meanTimeToCallSetupService.addRecord(setupCompltTime - setupTime_);
+
+ if (!isEmergencyCall)
+ {
+ PM_CCMeasurement.succMobileOriginatingCalls.increment();
+ }
+ else
+ {
+ PM_CCMeasurement.succMobileEmergencyCalls.increment();
+ }
+ }
+
+ if ((callState_ == OHC_ST_CONNECT_INDICATION) &&
+ !connectSent_ )
+ {
+
+ // Build the Connect Message towards the MS.
+ if ( (msOutResult = buildConnect (&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the error. Release RR resources
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+ }
+
+ // start the connect timer
+ hcTimer->setTimer(CALL_CONNECT_T313);
+
+ connectSent_ = true;
+ }
+ }
+ else if (parent->procType == CC_PROC_MOB_TERM)
+ {
+ PM_CCMeasurement.succMobileTerminatingCalls.increment();
+ }
+
+ // Connection Manager functionality
+ if (parent->h245ChannState == RES_ST_ASSIGNED)
+ {
+ // Both channels are setup.
+ DBG_LEAVE();
+ return (CC_MAKE_CONNECTION_REQ);
+ }
+ else
+ {
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+}
+
+JCCEvent_t
+CCHalfCall::handleChannAssignFail(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleChannAssignFail", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // Synchronize with the main state machine
+ channState_ = RES_ST_IDLE;
+
+ rlsCause.causeValue = CNI_RIL3_CAUSE_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE;
+
+ //CAUSE<xxu:03-21-00> BEGIN
+
+ voipReleaseCause_ = CNI_RIL3_CAUSE_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE;
+
+ //CAUSE<xxu:03-21-00> END
+
+ DBG_LEAVE();
+ return (CC_TWO_STAGE_DISCONNECT);
+}
+
+JCCEvent_t
+CCHalfCall::handleMMRelInd(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleMMRelInd", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+
+ // Release Connection resources, if there are any
+ if (parent->voiceConnected)
+ {
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = VoipCallGetRTPHandle(parent->h323CallHandle);
+
+ if ((csuResult = csu_OrigTermBreakAll(&rtpSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+
+ JCCLog2("CSU Error : Disconn. Failure, (Result = %d) for (RTPHandle = %p)\n",
+ csuResult, (int)rtpSourcePort.portId.rtpHandler);
+ DBG_ERROR("CSU Error : Disconn. Failure, (Result = %d) for (RTPHandle = %p)\n",
+ csuResult, rtpSourcePort.portId.rtpHandler);
+
+ // Can only generate OA&M log.
+ }
+
+ parent->voiceConnected = false;
+
+ }
+
+ // Always do sendRemote at the end of the handler.
+ if (sendRemote(HC_REMOTE_RELEASE_COMPLETE) == false)
+ // failed commn. with the remote side - treat as a release complete
+ // from the remote side and cleanup - skip event loop.
+ {
+ DBG_LEAVE();
+ return (handleMobRemoteAbnormalRelCom());
+ }
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+
+}
+
+JCCEvent_t
+CCHalfCall::handleMMEstCnf(void)
+{
+
+ DBG_FUNC("CCHalfCall::handleMMEstCnf", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ // !! For Setup, BC 1 may be ommitted if only one directory number
+ // is allocated for all services. - 9.07 - build one BC from the 4.08
+ // first simple example
+
+ // !< For Setup, Called party subaddress may be included, if Orig. included it
+ // Build the Setup Message towards the MS. - No Mandatory IEs
+
+ char callTaskName[20];
+
+ sprintf(&callTaskName[0],
+ "Call-%d EntryId-%d\0",
+ parent->callIndex,
+ parent->entryId());
+
+ if ( (msOutResult = buildSetup (&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the error. Release RR resources
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+ }
+
+ // start the disconnect timer
+ hcTimer->setTimer(CALL_SETUP_T303);
+
+ callState_ = THC_ST_PRESENTING_CALL;
+
+ DBG_LEAVE();
+
+ if (callTrace)
+ {
+ Dbg.Func(&callTaskName[0], CC_LAYER);
+ }
+
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+}
+
+JCCEvent_t
+CCHalfCall::handleMMEstRej(void)
+{
+
+
+ DBG_FUNC("CCHalfCall::handleMMEstRej", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // Page Timeout
+
+ if (mmInMsg->l3_data.pageReq.imsi == ludbGetMobileId(parent->ludbIndex()))
+ {
+ // continue
+ }
+ else
+ {
+//TEST
+//printf("CC Log: receive handleMMEstRej for (ludbIndex = %d)\n", parent->ludbIndex());
+//T_CNI_RIL3_IE_MOBILE_ID imsi_t1, imsi_t2;
+//imsi_t1 = ludbGetMobileId(parent->ludbIndex());
+//imsi_t2 = mmInMsg->l3_data.pageReq.imsi;
+//char *p_t1, *p_t2;
+//p_t1 = (char*) &imsi_t1;
+//p_t2 = (char*) &imsi_t2;
+//printf("IMSI from MM message:\n");
+//int i;
+//for (i=0;i<9;i++)
+//{
+// printf("%2x", (*p_t1++));
+//}
+//printf("\n");
+//printf("IMSI retv from LUDB:\n");
+//for (i=0;i<9;i++)
+//{
+// printf("%2x", (*p_t2++));
+//}
+//printf("\n");
+
+//ccEntryPrint(ccSession[mobInCall(parent->ludbIndex())], JCCPrintf);
+
+ // late message for a different page request
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //CAUSE<xxu:03-21-00> BEGIN
+
+ // Always do sendRemote at the end of the handler.
+ //voipReleaseCause_ = MOBILE_CAUSE_USER_NO_PAGE_RESPONSE;
+
+ //rlsCause.causeValue = CNI_RIL3_CAUSE_NOT_ROUTE_TO_DESTINATION;
+
+ voipReleaseCause_ = mmInMsg->cause;
+ rlsCause.causeValue = mmInMsg->cause;
+
+ //CAUSE<xxu:03-21-00> END
+
+ if (sendRemote(HC_REMOTE_RELEASE_COMPLETE) == false)
+ // failed commn. with the remote side - treat as a release complete
+ // from the remote side and cleanup - skip event loop.
+ {
+ DBG_LEAVE();
+ return (handleMobRemoteAbnormalRelCom());
+ }
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+
+}
+
+// !< For all msgs,local and remote, User-to-User support can be added later,
+// connected subaddress is related to this.
+
+JCCEvent_t
+CCHalfCall::handleConnComplt(void)
+{
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ DBG_FUNC("CCHalfCall::handleConnComplt", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE ("CC CallLog @handleConnComplt: callId=%d, callState=%d, chState=%d\n",
+ parent->callIndex, callState_, chState_);
+
+ if (callState_ == HC_ST_ACTIVE && chState_ == CH_ST_RREQ)
+ {
+ //Voice path connected successfully for Retrive operation, send back RETV ACK
+ chState_ = CH_ST_IDLE;
+
+ // Build the Retv Ack Message towards the MS.
+ if ( (msOutResult = buildRetvAck(&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the software design bug, no workaround is proper here.
+ JCCLog1("RIL3->CC: Build RetvAck problem, (RIL3 result = %d)\n",
+ msOutResult);
+ DBG_ERROR("RIL3->CC: Build RetvAck problem, (RIL3 result = %d)\n",
+ msOutResult);
+ }
+
+ chState_ = CH_ST_IDLE;
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //Here handling other jobs triggered by CC_CONNECT_COMPLT in the future
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCHalfCall::handleConnFail(void)
+{
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ DBG_FUNC("CCHalfCall::handleConnFail", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE ("CC CallLog @handleConnComplt: callId=%d, callState=%d, chState=%d\n",
+ parent->callIndex, callState_, chState_);
+
+ if (callState_ == HC_ST_ACTIVE && chState_ == CH_ST_RREQ)
+ {
+ // Log the software design bug, no workaround is proper here.
+ JCCLog("CC->CC: Voice path connection failed\n");
+ DBG_ERROR("CC->CC: Voice path connection failed\n");
+
+ // Build the Retv Rej Message towards the MS.
+ if ( (msOutResult = buildRetvRej(&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the software design bug, no workaround is proper here.
+ JCCLog1("RIL3->CC: Build RetvRej problem, (RIL3 result = %d)\n",
+ msOutResult);
+ DBG_ERROR("RIL3->CC: Build RetvRej problem, (RIL3 result = %d)\n",
+ msOutResult);
+ }
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //Here handling other jobs triggered by CC_CONNECT_FAILED in the future
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
diff --git a/data/mnet/GP10/Host/cc/src/CCMobRemHnd.cpp b/data/mnet/GP10/Host/cc/src/CCMobRemHnd.cpp
new file mode 100644
index 0000000..7ff3b8e
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CCMobRemHnd.cpp
@@ -0,0 +1,870 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCMobRemHnd.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : CC Handlers for events triggered by the other half
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "JCC/JCCLog.h"
+
+#include "logging/VCLOGGING.h"
+#include "JCC/LUDBInstance.h"
+#include "JCC/LUDBapi.h"
+
+#include "CC/CCSessionHandler.h"
+#include "CC/CCUtil.h"
+#include "CC/CallConfig.h"
+
+// included MD and IRT headers for messages from MS
+#include "ril3/ril3md.h"
+
+//CDR <xxu:08-21-00>
+#include "CDR/CdrVoiceCall.h"
+
+#include "rm/rm_head.h"
+extern u8 rm_EntryIdToTrxSlot(T_CNI_IRT_ID entryId, u16 *gsmHandler);
+extern bool callTrace;
+
+// handle remote events
+// !< For all msgs,local and remote, User-to-User support can be added later,
+// connected subaddress is related to this.
+
+// Remote Disconnect
+JCCEvent_t
+CCHalfCall::handleMobRemoteDisconnect(void)
+{
+
+ DBG_FUNC("handleMobRemoteDisconnect", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ // Cause is Mandatory. Use rlsCause to set it before building
+ // !< For now there is a generic rlsCause in the Half Call Object.
+
+ // To avoid sending the release to H323
+ parent->disconnectSentToVoip = true;
+
+ //CAUSE<xxu:03-21-00> BEGIN
+
+ rlsCause.causeValue =
+ (T_CNI_RIL3_CAUSE_VALUE) remMsgData.basicCallInMsg.ReasonCode;
+
+ // Set the release cause for the Mobile based on the Voip value.
+
+ //switch (remMsgData.basicCallInMsg.ReasonCode) {
+ //
+ //case VOIP_MOBILE_REASON_DESTINATION_BUSY:
+ // rlsCause.causeValue = CNI_RIL3_CAUSE_USER_BUSY;
+ // break;
+ //
+ //case VOIP_MOBILE_REASON_DESTINATION_REJECTED:
+ // rlsCause.causeValue = CNI_RIL3_CAUSE_CALL_REJECTED;
+ // break;
+ //
+ //case VOIP_MOBILE_REASON_DESTINATION_UNREACHABLE:
+ // rlsCause.causeValue = CNI_RIL3_CAUSE_NO_USER_RESPONDING; // Or is it CNI_RIL3_CAUSE_NOT_ROUTE_TO_DESTINATION
+ // // Or CNI_RIL3_CAUSE_USER_ALERTING_NO_ANSWER
+ // break;
+ //
+ //case VOIP_MOBILE_REASON_REMOTE_HANGUP:
+ // rlsCause.causeValue = CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING;
+ // break;
+ //
+ //case VOIP_MOBILE_REASON_VOIP_TASK_ERROR:
+ // rlsCause.causeValue = CNI_RIL3_CAUSE_TEMPORARY_FAILURE;
+ // break;
+ //
+ //default:
+ // // Do Nothing
+ // // Use the pre-stored value (normal, unspecified)
+ // break;
+ //
+ //}
+
+ // print out the trx, timeslot for better debugging
+ UINT16 gsmHandler;
+ UINT8 trx, slot;
+ T_SUBSC_IE_ISDN* isdnPtr;
+
+ if (parent->entryId() != (T_CNI_IRT_ID) JCC_UNDEFINED )
+ if (rm_EntryIdToTrxSlot(parent->entryId(),
+ &gsmHandler) ==
+ RM_TRUE)
+ {
+
+ trx = (UINT8)(gsmHandler>>8);
+ slot = (UINT8)(gsmHandler);
+
+ if (callTrace)
+ {
+ DBG_WARNING("CC Log: Remote(VOIP) Side Disconnected on (TRX=%d),(Slot=%d),(entryId=%d),(cause=%d)\n",
+ trx, slot, parent->entryId(), rlsCause.causeValue);
+ if ((isdnPtr = ludbGetMSISDNPtr(parent->ludbIndex())) != NULL)
+ {
+ DBG_WARNING("CC Log: MS (DN=%s)\n",
+ isdnPtr->digits);
+ }
+ }
+ else
+ {
+ DBG_TRACE("CC Log: Remote(VOIP) Side Disconnected on (TRX=%d),(Slot=%d),(entryId=%d),(cause=%d)\n",
+ trx, slot, parent->entryId(), rlsCause.causeValue);
+ if ((isdnPtr = ludbGetMSISDNPtr(parent->ludbIndex())) != NULL)
+ {
+ DBG_TRACE("CC Log: MS (DN=%s)\n",
+ isdnPtr->digits);
+ }
+ }
+ }
+
+
+ // If the state is currently waiting for a connection response from a lower layer
+ // then just do a mobile resource release
+ if (callState_ == THC_ST_MM_CONN_REQ)
+ {
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+ }
+
+ // Release Connection resources, if there are any, rightaway
+ // so that the RTP Port could be re-assigned from VOIP.
+ if (parent->voiceConnected)
+ {
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = VoipCallGetRTPHandle(parent->h323CallHandle);
+
+ if ((csuResult = csu_OrigTermBreakAll(&rtpSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+
+ JCCLog2("CSU Error : Disconn. Failure, (Result = %d) for (RTPHandle = %p)\n",
+ csuResult, (int)rtpSourcePort.portId.rtpHandler);
+ DBG_ERROR("CSU Error : Disconn. Failure, (Result = %d) for (RTPHandle = %p)\n",
+ csuResult, rtpSourcePort.portId.rtpHandler);
+
+ // Can only generate OA&M log.
+ }
+
+ parent->voiceConnected = false;
+
+ }
+
+ // Build the Disconnect Message towards the MS.
+ if ( (msOutResult = buildDisconnect (&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the error. Release Channel resources
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+ }
+
+ // start the disconnect timer
+ hcTimer->setTimer(CALL_DISCONNECT_T305);
+
+ callState_ = HC_ST_DISCONNECT_IND;
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+}
+
+// Remote Release Complete - Abnormal
+// Can ignore the normal ones for now - Resources are
+// released even before that msg. is received.
+
+JCCEvent_t
+CCHalfCall::handleMobRemoteAbnormalRelCom(void)
+{
+ DBG_FUNC("handleMobRemoteAbnormalRelCom", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // cancel any timers
+ hcTimer->cancelTimer();
+
+ // To avoid sending the release to H323
+ parent->disconnectSentToVoip = true;
+
+ // If the state is currently waiting for a connection response from a lower layer
+ // then just do a mobile resource release
+ if (callState_ == THC_ST_MM_CONN_REQ)
+ {
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+ }
+
+ // One stage release
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ // Build the Release Message towards the MS.
+ if ( (msOutResult = buildReleaseComplete (&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the error. Release RR resources
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+ }
+
+
+ // !< Transaction Id. has to be released, maybe in res_release? Yes
+
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+
+ // return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+// Remote Alerting
+JCCEvent_t
+CCHalfCall::handleMobRemoteAlerting(void)
+{
+
+ DBG_FUNC("handleMobRemoteAlerting", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ ULONG setupCompltTime;
+
+ // Make sure that the channel is assigned. Always assume that
+ // you want to do in-band alerting.
+ // if ((channState_ == RES_ST_ASSIGNED) &&
+ // !alertingSent_)
+
+ //if (!progressSent_)
+ //{
+ //Test code for progress IE
+ if (h323InMsg->l3_data.voipMsg.basicCallInMsg.EventInfo.AlertingProgressIE.ie_present)
+ {
+ DBG_TRACE("CC CALL LOG: Alerting progress IE info exist(%d) codingStd(%d) loc(%d) desc(%d)\n",
+ h323InMsg->l3_data.voipMsg.basicCallInMsg.EventInfo.AlertingProgressIE.ie_present,
+ h323InMsg->l3_data.voipMsg.basicCallInMsg.EventInfo.AlertingProgressIE.codingStandard,
+ h323InMsg->l3_data.voipMsg.basicCallInMsg.EventInfo.AlertingProgressIE.location,
+ h323InMsg->l3_data.voipMsg.basicCallInMsg.EventInfo.AlertingProgressIE.progressDesp);
+
+ if ( (msOutResult = buildProgress(&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ //Log the error. Release RR resources
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+ }
+ }
+
+ //} else
+ //{
+ // // Build the Alerting Message towards the MS.
+ // if ( (msOutResult = buildAlerting (&msEncodedMsg))
+ // != CNI_RIL3_RESULT_SUCCESS )
+ // {
+ // // Log the error. Release RR resources
+ // callState_ = HC_ST_NULL;
+ // DBG_LEAVE();
+ // return (CC_RES_RELEASE);
+ // }
+ //}
+
+ // Build the Alerting Message towards the MS.
+ if ( (msOutResult = buildAlerting (&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the error. Release RR resources
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+ }
+
+ // calculate the setup time
+ setupCompltTime = tickGet();
+
+ DBG_TRACE("Call Setup time in number of system ticks(%d)\n",
+ (setupCompltTime - setupTime_));
+
+ PM_CCMeasurement.meanTimeToCallSetupService.addRecord(setupCompltTime - setupTime_);
+
+ if (!isEmergencyCall)
+ {
+ PM_CCMeasurement.succMobileOriginatingCalls.increment();
+ }
+ else
+ {
+ PM_CCMeasurement.succMobileEmergencyCalls.increment();
+ }
+
+ alertingSent_ = true;
+
+ //}
+
+ callState_ = OHC_ST_ANSWER_PENDING;
+
+ // With current implementation, VOIP could send another Codec Selected
+ // just before connect. Always do Mode Modify(to traffic) just before connect.
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+// Remote Answer
+JCCEvent_t
+CCHalfCall::handleMobRemoteAnswer(void)
+{
+
+ DBG_FUNC("handleMobRemoteAnswer", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+
+ // If external handover has occurred
+ if (parent->parent->handoverSession->hoState_ == HAND_ST_ANCH_EHO_COMPLT)
+ {
+ T_CSU_PORT_ID rfSourcePort, rtpSinkPort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSinkPort.portType = CSU_RTP_PORT;
+ rtpSinkPort.portId.rtpHandler = VoipCallGetRTPHandle(parent->h323CallHandle);
+
+ rfSourcePort = parent->parent->mobileCsuPort();
+
+ if ((csuResult = csu_DuplexConnect(&rfSourcePort, &rtpSinkPort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ JCCLog2("CSU Error : Duplex Conn. Failure, (Result = %d) for (rtp port = %x)\n",
+ csuResult,
+ (int)rtpSinkPort.portId.rtpHandler);
+ DBG_ERROR("CSU Error : Duplex Conn. Failure, (Result = %d) for (rtp port = %x)\n",
+ csuResult,
+ (int)rtpSinkPort.portId.rtpHandler);
+
+ rlsCause.causeValue = CNI_RIL3_CAUSE_TEMPORARY_FAILURE; //CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+
+ //CAUSE<xxu:03-21-00> BEGIN
+
+ voipReleaseCause_ = CNI_RIL3_CAUSE_TEMPORARY_FAILURE; //CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+
+ //CAUSE<xxu:03-21-00> END
+
+ DBG_LEAVE();
+ return (CC_TWO_STAGE_DISCONNECT);
+ }
+
+ parent->voiceConnected = true;
+
+ chState_ = CH_ST_IDLE;
+ channState_ = RES_ST_ASSIGNED;
+ }
+
+ // Make sure that the channel is assigned.
+ if ( ( (channState_ == RES_ST_ASSIGNED) ) &&
+ !connectSent_)
+ {
+ // Build the Connect Message towards the MS.
+ if ( (msOutResult = buildConnect (&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ //CAUSE<xxu:03-22-00> BEGIN
+
+ voipReleaseCause_ = CNI_RIL3_CAUSE_TEMPORARY_FAILURE;
+ rlsCause.causeValue = CNI_RIL3_CAUSE_TEMPORARY_FAILURE;
+
+ //CAUSE<xxu:03-22-00> END
+
+ // Log the error. Release RR resources
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+ }
+
+ // start the connect timer
+ hcTimer->setTimer(CALL_CONNECT_T313);
+
+ connectSent_ = true;
+ }
+
+ // // Very early assignment - begin
+ // // Synchronize with the Channel state machine
+ // if (channState_ != RES_ST_ASSIGNED)
+ // {
+ // // Channel is not assigned. Cleanup.
+ // channState_ = RES_ST_IDLE;
+
+ // rlsCause.causeValue = CNI_RIL3_CAUSE_TEMPORARY_FAILURE;
+
+ // DBG_LEAVE();
+ // return (CC_TWO_STAGE_DISCONNECT);
+ // }
+ // // Very early assignment - end
+
+ callState_ = OHC_ST_CONNECT_INDICATION;
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCHalfCall::handleMobRemoteCallProgress1(void)
+{
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ DBG_FUNC("handleMobRemoteCallProgress1", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // !< Do we need to wait for Call Confirmed before sending Call Proceeding
+ // to the originating side to get the negotiated BCs
+ // - No need, clarified with Ian
+
+ // !! For Call Proceeding, we need the Bearer Cap1, Cap2, and Repeat Ind.
+ // if needed by Setup, as specified by 07.01.
+
+ DBG_TRACE("CC CALL LOG: Progress progress IE info exist(%d) codingStd(%d) loc(%d) desc(%d)\n",
+ h323InMsg->l3_data.voipMsg.basicCallInMsg.EventInfo.AlertingProgressIE.ie_present,
+ h323InMsg->l3_data.voipMsg.basicCallInMsg.EventInfo.AlertingProgressIE.codingStandard,
+ h323InMsg->l3_data.voipMsg.basicCallInMsg.EventInfo.AlertingProgressIE.location,
+ h323InMsg->l3_data.voipMsg.basicCallInMsg.EventInfo.AlertingProgressIE.progressDesp);
+
+ if ( (msOutResult = buildProgress(&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ //Log the error. Release RR resources
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RES_RELEASE);
+ }
+
+
+ progressSent_ = true;
+
+ if (callState_ != OHC_ST_ANSWER_PENDING)
+ callState_ = OHC_ST_CALL_PROCEEDING;
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCHalfCall::handleMobRemoteCallProgress(void)
+{
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ DBG_FUNC("handleMobRemoteCallProgress", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // !< Do we need to wait for Call Confirmed before sending Call Proceeding
+ // to the originating side to get the negotiated BCs
+ // - No need, clarified with Ian
+
+ // !! For Call Proceeding, we need the Bearer Cap1, Cap2, and Repeat Ind.
+ // if needed by Setup, as specified by 07.01.
+
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCHalfCall::handleMobRemoteTermAddress(void)
+{
+ JCCEvent_t retEvent;
+
+ DBG_FUNC("handleMobRemoteTermAddress", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ // copy from the remote message to the local var
+ cpn = remMsgData.callOffering.CalledPartyNumber;
+ callingPartyNum = remMsgData.callOffering.CallingPartyNumber;
+
+ //CDR <xxu:08-24-00>
+ if (callingPartyNum.ie_present)
+ parent->ccCdr.setCallingPartyNumber(&callingPartyNum);
+ //parent->ccCdr.setCalledPartyNumber(&cpn);
+
+ DBG_TRACE("Call: calling party number received from Voip:\n");
+ DBG_TRACE("(ie_present=%d),(numberType=%d),(plan=%d),(numDigits=%d) no(%x,%x,%x,%x)\n",
+ callingPartyNum.ie_present,
+ callingPartyNum.numberType,
+ callingPartyNum.numberingPlan,
+ callingPartyNum.numDigits,
+ callingPartyNum.digits[0],
+ callingPartyNum.digits[1],
+ callingPartyNum.digits[2],
+ callingPartyNum.digits[3]);
+ // callingPartyNum.ie_present = true;
+
+ // !< Map the incoming Called Party Number to a service (like fax, data, voice)?
+
+ // Authorize the termination attempt
+ if ( ! (gLUDB.authTerm(parent->ludbIndex(), cpn)) )
+ {
+ DBG_TRACE("Termination Authorization failed, (LUDB Index = %d)\n",
+ (int)parent->ludbIndex());
+
+ voipReleaseCause_ = CNI_RIL3_CAUSE_NOT_ROUTE_TO_DESTINATION;
+ rlsCause.causeValue = CNI_RIL3_CAUSE_NOT_ROUTE_TO_DESTINATION;
+
+ DBG_LEAVE();
+ return(handleMobReleaseCompleteUtil());
+ }
+
+ // <Igal: 05-15-00> Allows MT Call setup during active SMS transfer.
+ if (parent->parent->isMmConnected() == false)
+ {
+ IntraL3Msg_t mmOutMsg;
+
+ // Fill the data for MM message
+ mmOutMsg.l3_data.pageReq.imsi = ludbGetMobileId(parent->ludbIndex());
+ mmOutMsg.l3_data.pageReq.qid = parent->msgQId;
+
+ DBG_TRACE("page request msgQId: %p/n", parent->msgQId);
+
+ // Send internal MM msg - imsi needs to be included for paging
+ sendMM(INTRA_L3_MM_EST_REQ, INTRA_L3_MM_LOCATE_MS, parent->entryId(), &mmOutMsg);
+
+ callState_ = THC_ST_MM_CONN_REQ;
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+ else
+ {
+ // waiting call or MM connection is already established by the SMS. No need to locate him.
+ retEvent = handleMMEstCnf();
+ DBG_LEAVE();
+ return (retEvent);
+ }
+
+}
+
+JCCEvent_t
+CCHalfCall::handleMobRemoteH323ChannReady(void)
+{
+
+ DBG_FUNC("handleMobRemoteH323ChannReady", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ //BCT <xxu:09-22-00> BEGIN
+ if (parent->h245ChannState==RES_ST_ASSIGNED)
+ {
+ DBG_TRACE("CC BCT VConn: h245ChState(%d) hoHndl(%p) callSt(%d) chanSt(%d) bct(%d,%d)\n",
+ parent->h245ChannState, callState_, channState_,
+ parent->getBctInvoke(), parent->bctArrival_);
+
+ //This is a second voice connected message
+ if (callState_ != HC_ST_ACTIVE)
+ {
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+ }
+ //BCT <xxu:09-22-00> END
+
+ // Synchronize with the main state machine
+ parent->h245ChannState = RES_ST_ASSIGNED;
+
+ // Connection Manager functionality
+ if (channState_ == RES_ST_ASSIGNED)
+ {
+ // Both channels are setup.
+ DBG_LEAVE();
+ return (CC_MAKE_CONNECTION_REQ);
+ }
+ else
+ {
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+}
+
+JCCEvent_t
+CCHalfCall::handleMobRemoteChannSelected(void)
+{
+
+ DBG_FUNC("handleMobRemoteChannSelected", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ currSpeechCh_.version = remMsgData.codecSelected.Codec;
+
+ if (channState_ != RES_ST_IDLE)
+ {
+ // Ignore the second request.
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ if (!parent->waitingCallLeg)
+ {
+ DBG_LEAVE();
+ return (CC_RESOURCE_ASSIGN_REQ);
+ }
+ else
+ {
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+}
+
+
+//BCT <xxu:08-11-00> BEGIN
+JCCEvent_t
+CCHalfCall::handleBctNumberReqTimeout(void)
+{
+ DBG_FUNC("handleBctNumberReqTimeout", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CC->BCT(BctNumReqTimeout): h245ChState(%d) hoHndl(%p) callSt(%d) chanSt(%d) bct(%d,%d)\n",
+ parent->h245ChannState, callState_, channState_,
+ parent->getBctInvoke(), parent->bctArrival_);
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ parent->disconnectSentToVoip = true;
+
+ rlsCause.causeValue = CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+ // Build the Disconnect Message towards the MS.
+ if ( (msOutResult = buildDisconnect (&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the error. Release Channel resources
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ // start the disconnect timer
+ hcTimer->setTimer(CALL_DISCONNECT_T305);
+
+ callState_ = HC_ST_DISCONNECT_IND;
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCHalfCall::handleGetBctNumberNack(void)
+{
+ DBG_FUNC("handleGetBctNumberNack", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CC->BCT(BctNumNack): h245ChState(%d) hoHndl(%p) callSt(%d) chanSt(%d) bct(%d,%d)\n",
+ parent->h245ChannState, callState_, channState_,
+ parent->getBctInvoke(), parent->bctArrival_);
+
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ parent->disconnectSentToVoip = true;
+
+ rlsCause.causeValue = (T_CNI_RIL3_CAUSE_VALUE)
+ remMsgData.basicCallInMsg.ReasonCode;
+
+ // Build the Disconnect Message towards the MS.
+ if ( (msOutResult = buildDisconnect (&msEncodedMsg))
+ != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Log the error. Release Channel resources
+ callState_ = HC_ST_NULL;
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ // start the disconnect timer
+ hcTimer->setTimer(CALL_DISCONNECT_T305);
+
+ callState_ = HC_ST_DISCONNECT_IND;
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+}
+//BCT <xxu:08-11-00> END
+
+
+//BCT <xxu:09-22-00> BEGIN
+JCCEvent_t
+CCHalfCall::handleBctUpdateHandles(void)
+{
+ DBG_FUNC("handleBctUpdateHandles", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CC->BCT(UpdateHandles): chanSt(%d,%d) callSt(%d) h323CallHdnl(%x,%x) bct(%d,%d)\n",
+ parent->h245ChannState, channState_, callState_,
+ parent->oH323CallHandle, parent->h323CallHandle,
+ parent->getBctInvoke(), parent->bctArrival_);
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCHalfCall::handleMobRemoteAlerting2nd(void)
+{
+ DBG_FUNC("handleMobRemoteAlerting2nd", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CC->BCT(Alerting): h245ChState(%d) hoHndl(%p) callSt(%d) chanSt(%d) bct(%d,%d)\n",
+ parent->h245ChannState, callState_, channState_,
+ parent->getBctInvoke(), parent->bctArrival_);
+
+ //second alerting received from H323. This can only happen to BCT now
+ if (parent->h245ChannState != RES_ST_ASSIGNED)
+ {
+ //This is an unexpected alterting, ignore
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //Play annoucement in terms of handover condition
+ CCHandover *handoverSession;
+ handoverSession = parent->getHandoverSession();
+
+ if ( handoverSession != NULL )
+ {
+ if ( (handoverSession->hoState_ == HAND_ST_ANCH_HO_COMPLT) ||
+ (handoverSession->hoState_ == HAND_ST_ANCH_EHO_COMPLT) )
+ annState_ = ANN_PLAY_ON;
+ else
+ annState_ = ANN_PLAY_WAITING;
+ } else
+ annState_ = ANN_PLAY_ON;
+
+ if (annState_ == ANN_PLAY_ON)
+ {
+ //Play inband annoucement
+ T_CSU_RESULT_CON csuResult;
+
+ annSrcPort_.portType = CSU_ANN_PORT;
+ annSrcPort_.portId.annHandler = 0; //CSU_ANN_RINGBACK ID
+ annSnkPort_ = parent->parent->mobileCsuPort();
+ annSnkPort_.speechVersion = currSpeechCh_.version;
+
+ DBG_TRACE("CC->CSU(bct): start inband alert ann(%d,%x) --> snk(%d,%x,%d)\n",
+ annSrcPort_.portType,
+ (int)annSrcPort_.portId.rtpHandler,
+ annSnkPort_.portType,
+ (int)annSnkPort_.portId.rtpHandler,
+ (int)annSnkPort_.speechVersion);
+
+ if ( (csuResult = csu_SimplexConnect(&annSrcPort_, &annSnkPort_))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_WARNING("CC->CSU(bct): inband alert s-conn failed xlst(%d) ann(%d,%x) snk(%d,%x,%d)\n",
+ csuResult,
+ annSrcPort_.portType,
+ (int)annSrcPort_.portId.rtpHandler,
+ annSnkPort_.portType,
+ (int)annSnkPort_.portId.rtpHandler,
+ (int)annSnkPort_.speechVersion);
+
+ //ignore this remote alerting
+
+ }
+
+ }
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+CCHalfCall::handleMobRemoteChannSelected2nd(void)
+{
+ JCCEvent_t ret_val;
+
+ DBG_FUNC("handleMobRemoteChannSelected2nd", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CC->BCT(ChanSelect): h245ChState(%d) hoHndl(%p) callSt(%d) chanSt(%d) bct(%d,%d)\n",
+ parent->h245ChannState, callState_, channState_,
+ parent->getBctInvoke(), parent->bctArrival_);
+
+ currSpeechCh_.version = remMsgData.codecSelected.Codec;
+
+ if ( (channState_ != RES_ST_ASSIGNED) || (callState_ != HC_ST_ACTIVE) )
+ {
+ // Ignore the unexpected 2nd request
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //Cancel current annoucement if there is one
+ if (annState_ == ANN_PLAY_ON)
+ {
+ //Stop inband annoucement
+ T_CSU_RESULT_CON csuResult;
+
+ DBG_TRACE("CC->CSU(bct): stop inband alert ann(%d,%x) --> snk(%d,%x,%d)\n",
+ annSrcPort_.portType,
+ (int)annSrcPort_.portId.rtpHandler,
+ annSnkPort_.portType,
+ (int)annSnkPort_.portId.rtpHandler,
+ (int)annSnkPort_.speechVersion);
+
+ if ( (csuResult = csu_SimplexBreak(&annSrcPort_, &annSnkPort_))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_WARNING("CC->CSU(bct): inband alert s-break failed xlst(%d) ann(%d,%x) snk(%d,%x,%d)\n",
+ csuResult,
+ annSrcPort_.portType,
+ (int)annSrcPort_.portId.rtpHandler,
+ annSnkPort_.portType,
+ (int)annSnkPort_.portId.rtpHandler,
+ (int)annSnkPort_.speechVersion);
+
+ }
+
+ }
+
+ annState_ = ANN_PLAY_OFF;
+
+ // if external handover is in effect, don't bother re-assigning
+ // channels (RR establishment), since it is still UP
+ if ( ( parent->parent->handoverSession != NULL ) &&
+ ( parent->parent->handoverSession->hoState_ == HAND_ST_ANCH_EHO_COMPLT ) )
+ {
+ channState_ = RES_ST_ASSIGNED;
+ ret_val = CC_MESSAGE_PROCESSING_COMPLT;
+ }
+ else
+ {
+ channState_ = RES_ST_ASS_REQ;
+ ret_val = CC_RESOURCE_ASSIGN_REQ;
+ }
+
+ DBG_LEAVE();
+ return (ret_val);
+}
+
+JCCEvent_t
+CCHalfCall::handleMobRemoteAnswer2nd(void)
+{
+
+ DBG_FUNC("handleMobRemoteAnswer2nd", CC_HALFCALL_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("CC->BCT(Answer): h245ChState(%d) hoHndl(%p) callSt(%d) chanSt(%d) bct(%d,%d)\n",
+ parent->h245ChannState, callState_, channState_,
+ parent->getBctInvoke(), parent->bctArrival_);
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+//BCT <xxu:08-22-00> END
diff --git a/data/mnet/GP10/Host/cc/src/CCMsgAnal.cpp b/data/mnet/GP10/Host/cc/src/CCMsgAnal.cpp
new file mode 100644
index 0000000..55cb5fc
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CCMsgAnal.cpp
@@ -0,0 +1,356 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCMsgAnal.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : CC types shared with other modules.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// included L3 Message header for messages from other Layer 3 modules (MM, RR)
+#include "CC/CCMsgAnal.h"
+
+#include "jcc/JCCLog.h"
+#include "logging/VCLOGGING.h"
+
+#if defined(_NO_ED) || defined(_SOFT_MOB)
+ #include "JCC/JCC_ED.h"
+#else
+ #include "ril3/ril3_common.h"
+ #define JCC_RIL3CC_Decode CNI_RIL3CC_Decode
+ #define JCC_RIL3SMS_Decode CNI_RIL3SMS_CP_Decode
+#endif
+
+#ifdef _SOFT_MOB
+ extern T_CNI_LAPDM_OID softMobLapdmOid[];
+#endif
+
+#include "taskLib.h"
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+
+CCMsgAnalyzer::CCMsgAnalyzer()
+ : msDecodeResult(CNI_RIL3_RESULT_SUCCESS)
+{
+}
+
+
+JCCEvent_t
+CCMsgAnalyzer::mapToCcEvent(T_CNI_RIL3MD_CCMM_MSG *msInMsg)
+{
+
+ DBG_FUNC (taskName(taskIdSelf()), CC_LAYER);
+ DBG_ENTER();
+
+ if (msInMsg->primitive_type != L23PT_DL_DATA_IND)
+ {
+ DBG_ERROR("CC Error : Only Data Ind expected. Bad (Primitive = %d) \n",
+ msInMsg->primitive_type);
+ return (JCC_NULL_EVENT);
+ }
+
+ // call the Decoder function to decode the message
+ if ((msDecodeResult =
+ JCC_RIL3CC_Decode
+ (
+#ifdef _NO_ED
+ TRUE,
+#else
+ #ifdef _SOFT_MOB
+ !((msInMsg->lapdm_oid) < softMobLapdmOid[0]),
+ #endif
+#endif
+ &msInMsg->l3_data, // input encoded layer-3 msg
+ &msDecodedMsg // output decoded message
+ ))
+ != CNI_RIL3_RESULT_SUCCESS)
+ {
+
+ DBG_ERROR("CC Error : Decoding MS Message (Problem = %d). \n ", msDecodeResult);
+
+ // decoding error. Something wrong with the message. Switch on
+ // the return code to handle different types of error
+ switch(msDecodeResult)
+ {
+ case CNI_RIL3_MANDATORY_IE_MISSING:
+ case CNI_RIL3_NON_SEMANTICAL_MANDATORY_IE_ERROR:
+ // mandatory IE error. This is a protocol violation from the
+ // the peer layer-3 entity
+ causeValue = CNI_RIL3_CAUSE_INVALID_MANDATORY_INFO;
+
+ switch(msDecodedMsg.header.message_type)
+ {
+ // RIL3CC Call establishment messages:
+ case CNI_RIL3CC_MSGID_SETUP:
+ return (HC_LOCAL_RELEASE_REQ);
+ break;
+
+ // RIL3CC Call clearing messages:
+ case CNI_RIL3CC_MSGID_DISCONNECT:
+ return (HC_LOCAL_DISCONNECT_REQ);
+ break;
+ case CNI_RIL3CC_MSGID_RELEASE:
+ return (HC_LOCAL_RELEASE_REQ);
+ break;
+ case CNI_RIL3CC_MSGID_RELEASE_COMPLETE:
+ return (HC_LOCAL_RELEASE_COMPLETE);
+ break;
+
+ case CNI_RIL3CC_MSGID_START_DTMF:
+ // Let the MS timeout
+ return (JCC_NULL_EVENT);
+ break;
+
+ case CNI_RIL3CC_MSGID_STATUS:
+ return (HC_LOCAL_RELEASE_REQ);
+ break;
+
+ default:
+ // ignore the message and return status message.
+ return(HC_LOCAL_STATUS_ENQUIRY);
+ break;
+
+ }
+ break;
+
+ case CNI_RIL3_INCORRECT_LENGTH:
+ // message is too short. Ignore the message. Currently RIL3 does not disntinguish between
+ // this and incorrect length for a particular i.e.. Need to fix.
+ return (JCC_NULL_EVENT);
+ break;
+
+ case CNI_RIL3_UNKNOWN_MESSAGE_TYPE:
+ // ignore the message and return status.
+ causeValue = CNI_RIL3_CAUSE_MESSAGE_TYPE_NON_EXISTENT;
+ return (HC_LOCAL_STATUS_ENQUIRY);
+ break;
+
+ case CNI_RIL3_NON_IMPERATIVE_MESSAGE_PART_ERROR:
+ // not critical. ignore the error and continue as if the ie did not exist.
+ break;
+
+
+ default:
+ //CAUSE<xxu:03-27-00> BEGIN
+
+ // internal error. continuing may lead to other problems.
+ //causeValue = CNI_RIL3_CAUSE_PROTOCOL_ERROR_UNSPECIFIED;
+ //return (HC_LOCAL_PROTOCOL_PROBLEM);
+
+ causeValue = CNI_RIL3_CAUSE_PROTOCOL_ERROR_UNSPECIFIED;
+ return (JCC_NULL_EVENT);
+ //CAUSE<xxu:03-27-00> END
+
+ break;
+ }
+
+ }
+
+ PostL3RecvMsLog(msInMsg->lapdm_oid, msInMsg->sapi, &msInMsg->l3_data);
+ // decoded layer-3 message correctly.
+ // switch on the message type
+ switch(msDecodedMsg.header.message_type) {
+ // RIL3CC Call establishment messages:
+ case CNI_RIL3CC_MSGID_ALERTING:
+ return (THC_LOCAL_ALERTING);
+ break;
+ case CNI_RIL3CC_MSGID_CALL_CONFIRMED:
+ return (HC_LOCAL_CALL_PROGRESS);
+ break;
+ case CNI_RIL3CC_MSGID_CONNECT:
+ return (THC_LOCAL_ANSWER);
+ break;
+ case CNI_RIL3CC_MSGID_CONNECT_ACKNOWLEDGE:
+ return (OHC_LOCAL_CONNECT_ACK);
+ break;
+ case CNI_RIL3CC_MSGID_EMERGENCY_SETUP:
+ return (OHC_LOCAL_EMERGENCY_ORIGINATION);
+ break;
+ case CNI_RIL3CC_MSGID_SETUP:
+ return (OHC_LOCAL_TERM_ADDRESS);
+ break;
+
+ case CNI_RIL3CC_MSGID_START_DTMF:
+ return (HC_LOCAL_START_DTMF);
+ break;
+ case CNI_RIL3CC_MSGID_STOP_DTMF:
+ return (HC_LOCAL_STOP_DTMF);
+ break;
+
+ // RIL3CC Call clearing messages:
+ case CNI_RIL3CC_MSGID_DISCONNECT:
+ return (HC_LOCAL_DISCONNECT_REQ);
+ break;
+ case CNI_RIL3CC_MSGID_RELEASE:
+ return (HC_LOCAL_RELEASE_REQ);
+ break;
+ case CNI_RIL3CC_MSGID_RELEASE_COMPLETE:
+ return (HC_LOCAL_RELEASE_COMPLETE);
+ break;
+
+ //CH<xxu:11-24-99
+ case CNI_RIL3CC_MSGID_HOLD:
+ return (HC_EXTNL_HOLD_REQ);
+ break;
+
+ case CNI_RIL3CC_MSGID_RETRIEVE:
+ return (HC_EXTNL_RETV_REQ);
+ break;
+
+ case CNI_RIL3CC_MSGID_STATUS:
+ return (HC_LOCAL_STATUS_INFO);
+ break;
+
+ case CNI_RIL3CC_MSGID_STATUS_ENQUIRY:
+ return (HC_LOCAL_STATUS_ENQUIRY);
+ break;
+
+ default:
+ // log error
+ DBG_ERROR("CC Error: Unexpected CC Message, (Msg Type = %d)\n",
+ msDecodedMsg.header.message_type);
+ return (JCC_NULL_EVENT);
+ break;
+ }
+
+ return (JCC_NULL_EVENT);
+}
+
+
+JCCEvent_t
+CCMsgAnalyzer::mapToSmsEvent (T_CNI_RIL3MD_CCMM_MSG *msInMsg)
+{
+ JCCEvent_t retVal;
+ int temp ;
+ char buffer [256];
+ unsigned char * pTemp;
+
+ sprintf (buffer, "CCMsgAnalyzer::mapToSmsEvent %s\n", taskName(taskIdSelf()));
+
+ DBG_FUNC (buffer, CC_SMS_LAYER);
+ DBG_ENTER();
+
+ if (msInMsg->primitive_type != L23PT_DL_DATA_IND)
+ {
+ DBG_ERROR("CC Error : Only Data Ind expected. Bad (Primitive = %d) \n",
+ msInMsg->primitive_type);
+ DBG_LEAVE();
+ return (JCC_NULL_EVENT);
+ }
+
+ DBG_TRACE ("SMS PDU received in decoder. Oid = %d, SAPI = %d, Msg lenght = %d\n",
+ msInMsg->lapdm_oid, msInMsg->sapi, msInMsg->l3_data.msgLength );
+
+// DBG_HEXDUMP ((UINT8 *)&msInMsg->l3_data, msInMsg->l3_data.msgLength);
+/*
+ temp = msInMsg->l3_data.msgLength;
+ pTemp = (UINT8 *)&msInMsg->l3_data;
+
+ while (temp > 0)
+ {
+ DBG_HEXDUMP (pTemp, ((temp <= 16) ? temp : 16) );
+ temp -= 16;
+ pTemp += 16;
+ }
+*/
+ // call the Decoder function to decode the message
+ if ((msDecodeResult =
+ JCC_RIL3SMS_Decode
+ (
+#ifdef _NO_ED
+ TRUE,
+#else
+ #ifdef _SOFT_MOB
+ !((msInMsg->lapdm_oid) < softMobLapdmOid[0]),
+ #endif
+#endif
+ &msInMsg->l3_data, // input encoded layer-3 msg
+ &msDecodedSmsMsg // output decoded message
+ ))
+ != CNI_RIL3_RESULT_SUCCESS)
+ {
+ DBG_ERROR ("SMS PDU decode error %d\n", msDecodeResult);
+
+ if (msDecodeResult == CNI_RIL3_INCORRECT_LENGTH)
+ retVal = JCC_NULL_EVENT; // Discard short message 04.11 9.2.1
+ else
+ retVal = SMS_EVENT_PROTOCOL_ERROR; // Investigate the nature
+ // of the error and act accordinately
+ // Use SmsLeg3 for it?
+ }
+ else
+ {
+ // decoded layer-3 message correctly.
+ // switch on the message type
+ switch(msDecodedSmsMsg.header.message_type)
+ {
+ case CNI_RIL3SMS_MSGID_CP_DATA :
+ DBG_TRACE ("Uplink CP-DATA Data: PD = %d, TI = %d, RPDU length=%d:\n",
+ msDecodedSmsMsg.cp_data.header.protocol_descriminator,
+ msDecodedSmsMsg.cp_data.header.si_ti ,
+ msDecodedSmsMsg.cp_data.cp_user_data.length );
+
+ temp = msDecodedSmsMsg.cp_data.cp_user_data.length;
+ pTemp = msDecodedSmsMsg.cp_data.cp_user_data.rpdu_data;
+
+ while (temp > 0)
+ {
+ DBG_HEXDUMP (pTemp, ((temp <= 16) ? temp : 16) );
+ temp -= 16;
+ pTemp += 16;
+ }
+
+ retVal = SMS_EVENT_CP_DATA;
+ break;
+
+ case CNI_RIL3SMS_MSGID_CP_ACK :
+ DBG_TRACE ("Uplink CP-ACK Info: PD = %d, TI = %d\n" ,
+ msDecodedSmsMsg.cp_ack.header.protocol_descriminator,
+ msDecodedSmsMsg.cp_ack.header.si_ti );
+
+ retVal = SMS_EVENT_CP_ACK ;
+ break;
+
+ case CNI_RIL3SMS_MSGID_CP_ERROR:
+ DBG_TRACE ("Uplink CP-ERROR Data: PD = %d, TI = %d. Cause is %d - %d\n" ,
+ msDecodedSmsMsg.cp_error.header.protocol_descriminator ,
+ msDecodedSmsMsg.cp_error.header.si_ti ,
+ msDecodedSmsMsg.cp_error.cp_cause.ie_present ,
+ msDecodedSmsMsg.cp_error.cp_cause.causeValue );
+
+ retVal = SMS_EVENT_CP_ERROR;
+ break;
+
+ default:
+ // log error
+ DBG_ERROR ("CC Session Error: Unexpected SMS Message, (Msg Type = %d)\n",
+ msDecodedMsg.header.message_type);
+ retVal = SMS_EVENT_PROTOCOL_ERROR;
+ break;
+ }
+ }
+
+ DBG_WARNING ("SMS PDU decode result. Event %d\n", retVal);
+
+ PostL3RecvMsLog (msInMsg->lapdm_oid, msInMsg->sapi, &msInMsg->l3_data);
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
diff --git a/data/mnet/GP10/Host/cc/src/CCOamHnd.cpp b/data/mnet/GP10/Host/cc/src/CCOamHnd.cpp
new file mode 100644
index 0000000..9ab0b45
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CCOamHnd.cpp
@@ -0,0 +1,768 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCOamHnd.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 07-01-99
+// Description : CC Oam handlers trap registration, trap handling,
+// initialization, and restarts
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "stdio.h"
+#include "JCC/JCCLog.h"
+#include "logging/VCLOGGING.h"
+
+
+// declare the CC task spawning function
+extern int ccInit();
+
+// CC Types
+#include "CC/CCTypes.h"
+#include "CC/CCInt.h"
+
+#include "CC/CCconfig.h"
+#include "CC/CallConfig.h"
+
+#include "logging/VCLOGGING.h"
+
+#include "oam_api.h"
+
+#include "RIL3/ril3irt_db.h"
+
+#include "csunew/csu_head.h"
+
+extern CNI_RIL3IRT_DB CNI_IRT_database;
+
+extern void ccCallDataInit(void);
+
+//GCELL<tyu:06-01-01> BEGIN
+GlobalCellId_t MY_GLOBALCELL_ID;
+const GlobalCellId_t MY_GLOBALCELL_ID_DEF_VAL = {0, {'0','0','0'}, {'0','0','0'}, 1, 1};
+//GCELL<tyu:06-01-01> END
+
+UINT32 MY_VIPERCELL_IP_ADDRESS;
+
+//CDR <xxu:08-22-00> BEGIN
+BtsBasicPackage ccBtsBasicPackage;
+AdjCell_HandoverEntry ccAdjCellHoTable[16];
+AdjacentCellPackage ccAdjacentCellPackage;
+void ccGetBtsBasicPackage(void);
+void ccGetAdjacentCellPackage(void);
+
+//CDR <xxu:08-22-00> END
+
+// Number ticks in 10 milliseconds
+#define TICKS_PER_10MS (sysClkRateGet()) / 100
+
+int CALL_MM_CONN_EST_T999; // MM Connection Established - Network (MO)
+int CALL_ALERTING_T301; // Alerting received Timer - Network (MT)
+int CALL_SETUP_T303; // Setup sent - Network (MT)
+int CALL_CALL_CONFIRMED_T310; // Call Confirmed received Timer - Network (MT)
+int CALL_CONNECT_T313; // Connect sent Timer - Network (MO)
+int CALL_DISCONNECT_T305; // Disconnect sent Timer - Network (MO and MT)
+int CALL_RELEASE_T308; // Release sent Timer - Network (MO and MT)
+
+int SMS_WAIT_CP_ACK_TC1; // Wait for CP-ACK
+int SMS_WAIT_DISCONNECT; // Allows to send the last CP-ACK on SACCH/TCH
+
+//CH<xxu:11-24-99>
+int CALL_HOLD_RETV_TIMER; // Time control for call swapping
+
+//RETRY<xxu:04-28-00> BEGIN
+int CALL_HAND_SRC_TVB; // Time control for shake-hand btw anchor and VB
+//RETRY<xxu:04-28-00> END
+
+//BCT <xxu:08-11-00> BEGIN
+int CALL_BCT_NUMBER_TVB; // Time control for shake-hand btw VC&VB for BCT
+//RETRY<xxu:04-28-00> END
+
+//BCT <xxu:07-06-00> BEGIN
+char CALL_BCT_PREFIX[10]; // Prefix defined for blind call transfer invocation
+char CALL_BCT_PREFIX_LEN; //
+//BCT <xxu:07-06-00> END
+
+//CDR <xxu:08-24-00>
+int CALL_CDR_10M; // 10m call duration timer for CDR
+
+int CALL_SAFETY_TIMER; // Call Task running too long
+
+// Handover Config
+int CALL_HAND_SRC_THO; // Handover - waiting for Target Perform Ho Req Ack (ANCH)
+int CALL_HAND_SRC_T103; // Handover - waiting for Target Ho Complt (ANCH)
+int CALL_HAND_TRG_T204; // Handover - waiting for Mobile Handover Complt (TRG)
+
+int CALL_HAND_SRC_TSHO; // Handover - waiting for Target Perform Hb Req Ack (TRG)
+int CALL_HAND_SRC_T203; // Handover - waiting for Target Hb Complt (TRG)
+int CALL_HAND_TRG_T104; // Handover - waiting for Mobile Handover Complt (ANCH)
+
+
+//ext-HO <xxu:07-01-01>
+int CALL_HAND_TRG_T211; // Handover - waiting for Mobile Handover Complt or Failure (TRG)
+int CALL_HAND_TRG_T202; // Handover - waiting for Mobile Handover Complt btw BSSs under MSC-B
+
+SpeechChann_t currChannDef;
+
+
+void irtCCDataInit(void)
+{
+ short i;
+ for(i=0; i< MAX_RIL3IRT_DB_ENTRIES ; i++)
+ {
+ CNI_IRT_database.m_entry[i].cc_id = cc_id;
+ }
+}
+
+void ccDataInit(void)
+{
+ ccCallDataInit();
+ irtCCDataInit();
+ //csu_ClearAllTable();
+}
+
+// OAM Trap Registration
+void callOamTrapRegister(void)
+{
+ DBG_FUNC("callOamTrapRegister", CC_LAYER);
+ DBG_ENTER();
+
+ STATUS oamStatus;
+
+ // Reset any trap setting to get a clean start
+ if ((oamStatus = oam_unsetTrapByModule(MODULE_CC))
+ != STATUS_OK)
+ {
+ DBG_ERROR("OAM->Call ERROR: Failed(status = %d) for unsetTrapByModule\n",
+ oamStatus);
+ }
+
+ // Register to trap callConfigData for timers
+ if ((oamStatus = oam_setTrap(MODULE_CC, ccMsgQId, MIB_callConfigData))
+ != STATUS_OK)
+ {
+ DBG_ERROR("OAM->Call ERROR: Failed(status = %d) in setTrap for callConfigData\n",
+ oamStatus);
+ }
+
+ //CDR <xxu:08-22-00> BEGIN
+ if ((oamStatus = oam_setTrap(MODULE_CC, ccMsgQId, MIB_btsBasicPackage))
+ != STATUS_OK)
+ {
+ DBG_ERROR("OAM->Call ERROR: Failed(status = %d) in setTrap for BtsBasicPackage\n",
+ oamStatus);
+ }
+
+ if ((oamStatus = oam_setTrap(MODULE_CC, ccMsgQId, MIB_adjacentCellPackage))
+ != STATUS_OK)
+ {
+ DBG_ERROR("OAM->Call ERROR: Failed(status = %d) in setTrap for adjCellPackage\n",
+ oamStatus);
+ }
+
+ if ((oamStatus = oam_setTrap(MODULE_CC, ccMsgQId, MIB_handoverTimerMib))
+ != STATUS_OK)
+ {
+ DBG_ERROR("OAM->Call ERROR: Failed(status = %d) in setTrap for handoverTimerMib\n",
+ oamStatus);
+ }
+ //CDR <xxu:08-22-00> END
+
+ DBG_LEAVE();
+}
+
+//BCT xxu<07-17-00> BEGIN
+void setBctPrefix(char *prefix)
+{
+ printf(" OLD: prefix=%s, length=%d; NEW: prefix=%s, length=%d\n",
+ CALL_BCT_PREFIX, CALL_BCT_PREFIX_LEN,
+ prefix, strlen(prefix));
+ memset(CALL_BCT_PREFIX,0,10);
+ strcpy(CALL_BCT_PREFIX,prefix);
+ CALL_BCT_PREFIX_LEN = strlen(CALL_BCT_PREFIX);
+}
+//BCT xxu<07-17-00> END
+
+// OAM Call Data Initialization
+void callOamDataInit(void)
+{
+ DBG_FUNC("callOamDataInit", CC_LAYER);
+ DBG_ENTER();
+
+ CallConfigData callConfigVal;
+ HandoverTimerMib handoverTimerVal;
+ STATUS oamStatus;
+
+ // Temporarily assign default values here.
+ CALL_MM_CONN_EST_T999 = CALL_MM_CONN_EST_T999_DEF_VAL * TICKS_PER_10MS;
+ CALL_ALERTING_T301 = CALL_ALERTING_T301_DEF_VAL * TICKS_PER_10MS;
+ CALL_SETUP_T303 = CALL_SETUP_T303_DEF_VAL * TICKS_PER_10MS;
+ CALL_CALL_CONFIRMED_T310 = CALL_CALL_CONFIRMED_T310_DEF_VAL * TICKS_PER_10MS;
+ CALL_CONNECT_T313 = CALL_CONNECT_T313_DEF_VAL * TICKS_PER_10MS;
+ CALL_DISCONNECT_T305 = CALL_DISCONNECT_T305_DEF_VAL * TICKS_PER_10MS;
+ CALL_RELEASE_T308 = CALL_RELEASE_T308_DEF_VAL * TICKS_PER_10MS;
+ CALL_SAFETY_TIMER = CALL_SAFETY_TIMER_DEF_VAL * TICKS_PER_10MS;
+
+ //CDR <xxu:08-24-00>
+ CALL_CDR_10M = CALL_CDR_10M_DEF_VAL;
+
+ //CH<xxu:11-24-99>
+ CALL_HOLD_RETV_TIMER = CALL_HOLD_RETV_TIMER_DEF_VAL;
+
+ //RETRY<xxu:05-01-00> BEGIN
+ CALL_HAND_SRC_TVB = CALL_HAND_SRC_TVB_DEF_VAL;
+ //RETRY<xxu:05-01-00> END
+
+ //BCT <xxu:07-06-00> BEGIN
+ CALL_BCT_NUMBER_TVB = CALL_HAND_SRC_TVB_DEF_VAL;
+
+ strcpy(CALL_BCT_PREFIX, "44*");
+ CALL_BCT_PREFIX_LEN = strlen(CALL_BCT_PREFIX);
+ for (int i=0;i<CALL_BCT_PREFIX_LEN;i++)
+ {
+ switch (CALL_BCT_PREFIX[i])
+ {
+ case 0x2A: //'*'
+ CALL_BCT_PREFIX[i] = 0x0A;
+ break;
+
+ case 0x23: //'#'
+ CALL_BCT_PREFIX[i] = 0x0B;
+ break;
+ default: //'0'-'9'
+ if ( CALL_BCT_PREFIX[i] >= 0x30 && CALL_BCT_PREFIX[i] < 0x40 )
+ CALL_BCT_PREFIX[i] -= 0x30;
+ else
+ DBG_ERROR("OAM->CC@callOamDataInit: bctPrefix=%s", CALL_BCT_PREFIX);
+ break;
+ }
+ }
+ //BCT<xxu:07-06-00> END
+
+ // Temporary assignment of Handover Timers
+ CALL_HAND_SRC_THO = CALL_HAND_SRC_THO_DEF_VAL * TICKS_PER_10MS;
+ CALL_HAND_SRC_T103 = CALL_HAND_SRC_T103_DEF_VAL * TICKS_PER_10MS;
+ CALL_HAND_TRG_T204 = CALL_HAND_TRG_T204_DEF_VAL * TICKS_PER_10MS;
+
+ CALL_HAND_SRC_TSHO = CALL_HAND_SRC_TSHO_DEF_VAL * TICKS_PER_10MS;
+ CALL_HAND_SRC_T203 = CALL_HAND_SRC_T203_DEF_VAL * TICKS_PER_10MS;
+ CALL_HAND_TRG_T104 = CALL_HAND_TRG_T104_DEF_VAL * TICKS_PER_10MS;
+
+ //ext-HO <xxu:07-01-01>
+ CALL_HAND_TRG_T211 = CALL_HAND_TRG_T211_DEF_VAL * TICKS_PER_10MS;
+ CALL_HAND_TRG_T202 = CALL_HAND_TRG_T202_DEF_VAL * TICKS_PER_10MS;
+
+ // SMS timers
+ SMS_WAIT_CP_ACK_TC1= SMS_WAIT_CP_ACK_TC1_DEF_VAL * TICKS_PER_10MS;
+ SMS_WAIT_DISCONNECT= SMS_WAIT_DISCONNECT_DEF_VAL * TICKS_PER_10MS;
+
+ if ((oamStatus = getMibStruct(MIB_callConfigData,
+ (OCTET_T *)&callConfigVal, sizeof(callConfigVal)))
+ != STATUS_OK)
+ {
+ // failed to get OAM Config. data.
+ DBG_ERROR("OAM->Call FATAL ERROR: failed(status = %d) to get Call Config.\n",
+ oamStatus);
+ printf("OAM->Call FATAL ERROR: failed(status = %d) to get Call Config.\n",
+ oamStatus);
+ }
+ else
+ {
+ printf("CC Call oam data: (T301=%d), (T303=%d), (T310=%d)\n",
+ callConfigVal.cc_alerting_T301,
+ callConfigVal.cc_setup_T303,
+ callConfigVal.cc_call_confirmed_T310);
+
+ printf(" (T313=%d), (T305=%d), (T308=%d).\n\n",
+ callConfigVal.cc_connect_T313,
+ callConfigVal.cc_disconnect_T305,
+ callConfigVal.cc_release_T308);
+
+ // make the conversion between the MIB value (in 10 ms) and the
+ // actual Timer value used in the VxWorks API call (1 VxWorks ticks = 16.69ms)
+ CALL_ALERTING_T301 = (callConfigVal.cc_alerting_T301) * TICKS_PER_10MS;
+ CALL_SETUP_T303 = (callConfigVal.cc_setup_T303) * TICKS_PER_10MS;
+ CALL_CALL_CONFIRMED_T310 = (callConfigVal.cc_call_confirmed_T310) * TICKS_PER_10MS;
+ CALL_CONNECT_T313 = (callConfigVal.cc_connect_T313) * TICKS_PER_10MS;
+ CALL_DISCONNECT_T305 = (callConfigVal.cc_disconnect_T305) * TICKS_PER_10MS;
+ CALL_RELEASE_T308 = (callConfigVal.cc_release_T308) * TICKS_PER_10MS;
+ }
+
+ if ((oamStatus = getMibStruct(MIB_handoverTimerMib,
+ (OCTET_T *)&handoverTimerVal, sizeof(HandoverTimerMib)))
+ != STATUS_OK)
+ {
+ // failed to get OAM Config. data.
+ DBG_ERROR("OAM->Call FATAL ERROR: failed(status = %d) to get Handover Timer.\n",
+ oamStatus);
+ printf("OAM->Call FATAL ERROR: failed(status = %d) to get Handover Timer.\n",
+ oamStatus);
+ }
+ else
+ {
+ printf("CC Call oam data: (T101=%d), (T102=%d), (T103=%d), (T104=%d)\n",
+ handoverTimerVal.t101,
+ handoverTimerVal.t102,
+ handoverTimerVal.t103,
+ handoverTimerVal.t104);
+
+ printf(" (T201=%d), (T202=%d), (T204=%d), (T210=%d), (T211=%d).\n\n",
+ handoverTimerVal.t201,
+ handoverTimerVal.t202,
+ handoverTimerVal.t204,
+ handoverTimerVal.t210,
+ handoverTimerVal.t211);
+
+ // make the conversion between the MIB value (in 10 ms) and the
+ // actual Timer value used in the VxWorks API call (1 VxWorks ticks = 16.69ms)
+ CALL_HAND_SRC_T103 = (handoverTimerVal.t103) * TICKS_PER_10MS;
+ CALL_HAND_TRG_T104 = (handoverTimerVal.t104) * TICKS_PER_10MS;
+ CALL_HAND_TRG_T202 = (handoverTimerVal.t202) * TICKS_PER_10MS;
+ CALL_HAND_TRG_T204 = (handoverTimerVal.t204) * TICKS_PER_10MS;
+ CALL_HAND_TRG_T211 = (handoverTimerVal.t211) * TICKS_PER_10MS;
+ }
+
+
+
+
+ //CDR <xxu:08-22-00> BEGIN
+ ccGetBtsBasicPackage();
+ ccGetAdjacentCellPackage();
+ //CDR <xxu:08-22-00> END
+
+ currChannDef.version = CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_2;
+
+ DBG_LEAVE();
+}
+
+// OAM CC Data Initialization
+void ccOamDataInit(void)
+{
+ DBG_FUNC("ccOamDataInit", CC_LAYER);
+ DBG_ENTER();
+
+ INT_32_T mibVal;
+ STATUS oamStatus;
+
+ if ((oamStatus = getMibIntVar(MIB_bts_operationalState, &mibVal))
+ != STATUS_OK)
+ {
+ // failed to get OAM Config. data.
+ printf("OAM->CC FATAL ERROR: failed(status = %d) to get CC Config - BTS Op State.\n",
+ oamStatus);
+ printf("CC Log: FATAL - CC Non functional - cannot get BTS Op. State.\n");
+ DBG_ERROR("OAM->CC FATAL ERROR: failed(status = %d) to get CC Config - BTS Op State.\n",
+ oamStatus);
+ DBG_ERROR("CC Log: FATAL - CC Non functional - cannot get BTS Op. State.\n");
+ }
+ else
+ {
+ ccOldBTSState = mibVal;
+ }
+
+ // Temporarily assign a default value for cc calls here.
+ CC_MAX_CC_CALLS = CC_MAX_CC_CALLS_DEF_VAL;
+
+ // if ((oamStatus = getMibIntVar(MIB_cc_max_calls, &mibVal))
+ // != STATUS_OK)
+ // {
+ // // failed to get OAM Config. data.
+ // DBG_ERROR("OAM->CC FATAL ERROR: failed(status = %d) to get CC Config - Max Calls.\n",
+ // oamStatus);
+ // printf("OAM->CC FATAL ERROR: failed(status = %d) to get CC Config - Max Calls.\n",
+ // oamStatus);
+ // }
+ // else
+ // {
+ // CC_MAX_CC_CALLS = mibVal;
+ // }
+
+ //GCELL<tyu:06-01-01> REMOVED
+
+ MY_VIPERCELL_IP_ADDRESS = inet_addr(GetViperCellIpAddress());
+
+ // Get config. data that is used by the individual calls - including the timers.
+ callOamDataInit();
+
+ DBG_LEAVE();
+}
+
+void ccOamHandleBTSOpStateChange(INT_32_T opSt)
+{
+ DBG_FUNC("ccOamHandleBTSOpStateChange", CC_LAYER);
+ DBG_ENTER();
+
+ // Handle (Disabled->Enabled) and (Enabled->Disabled) changes.
+ DBG_TRACE("OAM->CC Log: Trap received for BTS (Oper. State = %d)\n",
+ opSt);
+
+ if (ccOldBTSState == VAL_bts_operationalState_enabled)
+ {
+ if ((ccOldBTSState = opSt) == VAL_bts_operationalState_disabled)
+ {
+ ccDataInit();
+ }
+ }
+ else
+ {
+ // No special action needed.
+ ccOldBTSState = opSt;
+ }
+ DBG_LEAVE();
+}
+
+
+// OAM Trap Handling
+void callOamProcessTrapMsg(TrapMsg* oamInMsg)
+{
+ DBG_FUNC("callOamProcessTrapMsg", CC_LAYER);
+ DBG_ENTER();
+
+ // DBG_TRACE("OAM->CC Log: Trap received. (Mib Tag = %d), (MsgType = %d)\n",
+ // oamInMsg->mibTag,
+ // oamInMsg->msgType);
+
+ switch(oamInMsg->msgType) {
+
+ case MT_TRAP:
+ {
+ //Got a trap notification
+ switch (MIB_TBL(oamInMsg->mibTag))
+ {
+ case MTBL_btsBasicPackage:
+ ccGetBtsBasicPackage();
+ if (oamInMsg->mibTag == MIB_bts_operationalState)
+ ccOamHandleBTSOpStateChange(oamInMsg->val.varVal);
+ break;
+ case MTBL_adjacentCellPackage:
+ ccGetAdjacentCellPackage();
+ break;
+
+ default:
+ {
+ switch(oamInMsg->mibTag) {
+ case MIB_cc_alerting_T301:
+ CALL_ALERTING_T301 = (oamInMsg->val.varVal) * TICKS_PER_10MS;
+ break;
+
+ case MIB_cc_setup_T303:
+ CALL_SETUP_T303 = (oamInMsg->val.varVal) * TICKS_PER_10MS;
+ break;
+
+ case MIB_cc_call_confirmed_T310:
+ CALL_CALL_CONFIRMED_T310 = (oamInMsg->val.varVal) * TICKS_PER_10MS;
+ break;
+
+ case MIB_cc_connect_T313:
+ CALL_CONNECT_T313 = (oamInMsg->val.varVal) * TICKS_PER_10MS;
+ break;
+
+ case MIB_cc_disconnect_T305:
+ CALL_DISCONNECT_T305 = (oamInMsg->val.varVal) * TICKS_PER_10MS;
+ break;
+
+ case MIB_cc_release_T308:
+ CALL_RELEASE_T308 = (oamInMsg->val.varVal) * TICKS_PER_10MS;
+ break;
+
+ case MIB_t103:
+ CALL_HAND_SRC_T103 = (oamInMsg->val.varVal) * TICKS_PER_10MS;
+ break;
+
+ case MIB_t104:
+ CALL_HAND_TRG_T104 = (oamInMsg->val.varVal) * TICKS_PER_10MS;
+ break;
+
+ case MIB_t202:
+ CALL_HAND_TRG_T202 = (oamInMsg->val.varVal) * TICKS_PER_10MS;
+ break;
+
+ case MIB_t204:
+ CALL_HAND_TRG_T204 = (oamInMsg->val.varVal) * TICKS_PER_10MS;
+ break;
+
+ case MIB_t211:
+ CALL_HAND_TRG_T211 = (oamInMsg->val.varVal) * TICKS_PER_10MS;
+ break;
+
+ case MIB_t101:
+ case MIB_t102:
+ case MIB_t201:
+ case MIB_t210:
+ case MIB_cc_mm_conn_est_T999:
+ case MIB_cc_safety_timer:
+ case MIB_cc_max_L3_msgs:
+ case MIB_cc_l3_msg_q_priority:
+ case MIB_cc_task_priority:
+ case MIB_cc_task_stack_size:
+ case MIB_cc_max_calls:
+ // ignore
+ break;
+
+ //CDR <xxu:08-22-00> BEGIN
+ //case MIB_bts_operationalState:
+ // ccOamHandleBTSOpStateChange(oamInMsg->val.varVal);
+ // break;
+ //CDR <xxu:08-22-00> END
+
+ default:
+ DBG_ERROR("OAM->CC Call Error: Unexpected (Mib Tag = %d) for Trap. \n",
+ oamInMsg->mibTag);
+ break;
+ }
+ }
+ break;
+ }
+ }
+ break;
+
+ default:
+ DBG_ERROR("OAM->CC Call Error: Unexpected (Msg Type = %d).\n",
+ oamInMsg->msgType);
+ break;
+ }
+ DBG_LEAVE();
+}
+
+void ccRestart(void)
+{
+ short i;
+ for(i=0; i< CC_MAX_CC_CALLS;i++)
+ {
+ semTake(ccSession[i].semId, WAIT_FOREVER);
+ semDelete(ccSession[i].semId);
+ }
+}
+
+// cc reboot action
+int SysCommand_CC (T_SYS_CMD action)
+{
+ DBG_FUNC("SysCommand_CC", CC_LAYER);
+ DBG_ENTER();
+
+ switch(action){
+
+ case SYS_SHUTDOWN:
+ printf("[CC] shutdown notification received\n");
+ DBG_TRACE("[CC] shutdown notification received\n");
+ break;
+
+ case SYS_REBOOT:
+ printf("[CC] Reboot notification received. No action needed.\n");
+ DBG_TRACE("[CC] Reboot notification received. No action needed.\n");
+ break;
+
+ case SYS_START:
+ // Also print out a Starting marker for logs
+ DBG_TRACE("******************************************************************************\n");
+
+ printf("[CC] start notification received\n");
+ DBG_TRACE("[CC] start notification received\n");
+
+ // create message queue and put the message queue ID in a global
+ // variable so that all the Layer-3 Interface API functions can send
+ // message to this queue
+
+ ccMsgQId = msgQCreate(CC_MAX_L3_MSGS, // number of messages
+ CC_MAX_MSG_LENGTH, // size of each message
+ CC_L3_MSG_Q_PRIORITY // priority of the queue
+ );
+
+
+ // check message queue creation result
+ if(ccMsgQId == NULL)
+ {
+ // message queue creation failure. No point to continue.
+ printf("CC FATAL ERROR: failed to create message queue\n" );
+ //Abort the task.
+ DBG_LEAVE();
+ return (-1);
+ }
+
+ //Initialize for RRM to enter into IRT
+ cc_id.msgq_id = ccMsgQId;
+
+ short i;
+ // Initialize all sub tasks message queues.
+ for(i=0; i< CC_MAX_CC_CALLS_DEF_VAL;i++)
+ {
+
+ // create message queue and put the message queue ID in a global
+ // variable so that all the Layer-3 Interface API functions can send
+ // message to this queue
+
+ ccSession[i].msgQId =
+ msgQCreate(CALL_MAX_L3_MSGS, // number of messages
+ CC_MAX_MSG_LENGTH, // size of each message
+ CALL_L3_MSG_Q_PRIORITY // priority of the queue
+ );
+
+
+ // check message queue creation result
+ if(ccSession[i].msgQId == NULL)
+ {
+ // message queue creation failure. No point to continue.
+ //Abort the task.
+ // message queue creation failure. No point to continue.
+ printf("CC CALL FATAL ERROR: failed to create message queue\n" );
+
+ DBG_LEAVE();
+ return (-1);
+ }
+
+ }
+
+ // module initialization etc.
+ ccInit();
+ break;
+
+ default:
+ DBG_ERROR("Root->CC Call Error: Unexpected (action = %d).\n",
+ action);
+ DBG_LEAVE();
+ return(-1);
+
+ }
+ DBG_LEAVE();
+ return 0;
+}
+
+//CDR <xxu:08-22-00> BEGIN
+void ccGetBtsBasicPackage(void)
+{
+ DBG_FUNC("ccGetBtsBasicPackage", CC_LAYER);
+ DBG_ENTER();
+
+ STATUS oamStatus;
+
+ oamStatus = getMibStruct(MIB_btsBasicPackage, (unsigned char*)&ccBtsBasicPackage,
+ sizeof(BtsBasicPackage));
+ if (oamStatus != STATUS_OK)
+ {
+ // failed to get btsBasicPackage data.
+ DBG_ERROR("OAM->Call FATAL ERROR: failed(status = %d) to get ccbtsBasicPackage\n",
+ oamStatus);
+ printf("OAM->Call FATAL ERROR: failed(status = %d) to get ccbtsBasicPackage\n",
+ oamStatus);
+ // Temporarily assign a default value here.
+//GCELL<tyu:06-01-01> BEGIN
+ MY_GLOBALCELL_ID = MY_GLOBALCELL_ID_DEF_VAL;
+ }
+
+ // Convert mcc, mnc to byte string
+ getByteAryByInt(ccBtsBasicPackage.bts_mcc, (char *) &ccBtsBasicPackage.bts_mcc,3);
+ getByteAryByInt(ccBtsBasicPackage.bts_mnc, (char *) &ccBtsBasicPackage.bts_mnc, 2);
+
+ // Initialize MY_GLOBALCELL_ID here
+ MY_GLOBALCELL_ID.mcc[0] = ((char*)&(ccBtsBasicPackage.bts_mcc))[0];
+ MY_GLOBALCELL_ID.mcc[1] = ((char*)&(ccBtsBasicPackage.bts_mcc))[1];
+ MY_GLOBALCELL_ID.mcc[2] = ((char*)&(ccBtsBasicPackage.bts_mcc))[2];
+
+ MY_GLOBALCELL_ID.mnc[0] = ((char*)&(ccBtsBasicPackage.bts_mnc))[0];
+ MY_GLOBALCELL_ID.mnc[1] = ((char*)&(ccBtsBasicPackage.bts_mnc))[1];
+ MY_GLOBALCELL_ID.mnc[2] = 0xf;
+
+
+ MY_GLOBALCELL_ID.lac = ccBtsBasicPackage.bts_lac;
+ MY_GLOBALCELL_ID.ci = ccBtsBasicPackage.bts_ci;
+//GCELL<tyu:06-01-01> END
+
+ DBG_TRACE("MCC(%d,%d,%d) MNC(%d,%d)\n",
+ ((char*)&(ccBtsBasicPackage.bts_mcc))[0],
+ ((char*)&(ccBtsBasicPackage.bts_mcc))[1],
+ ((char*)&(ccBtsBasicPackage.bts_mcc))[2],
+ ((char*)&(ccBtsBasicPackage.bts_mnc))[0],
+ ((char*)&(ccBtsBasicPackage.bts_mnc))[1]);
+
+}
+
+void ccGetAdjacentCellPackage(void)
+{
+ DBG_FUNC("ccGetAdjacentCellPackage", CC_LAYER);
+ DBG_ENTER();
+
+ STATUS oamStatus;
+
+ if (STATUS_OK != (oamStatus = getMibStruct(MIB_adjacentCellPackage,
+ (OCTET_T *)&ccAdjacentCellPackage, sizeof(AdjacentCellPackage))))
+ {
+ // failed to get adjacentCellPackage.
+ DBG_ERROR("OAM->Call FATAL ERROR: failed(status = %d) to get adjacentCellPackage\n",
+ oamStatus);
+ printf("OAM->Call FATAL ERROR: failed(status = %d) in to get adjacentCellPackage\n",
+ oamStatus);
+ return;
+ }
+
+ //Get handover table list
+ if (STATUS_OK != (oamStatus = getMibTbl(MIBT_adjCell_handoverEntry,
+ (OCTET_T *)&ccAdjCellHoTable, sizeof(ccAdjCellHoTable))))
+ {
+ // failed to get btsBasicPackage data.
+ DBG_ERROR("OAM->Call FATAL ERROR: failed(status = %d) to get ccAdjCellHoTable\n",
+ oamStatus);
+ printf("OAM->Call FATAL ERROR: failed(status = %d) to get ccAdjCellHoTable\n",
+ oamStatus);
+ return;
+ }
+
+
+ ccAdjacentCellPackage.adjCell_handoverTable= (Table *)&ccAdjCellHoTable;
+
+ for ( int i=0; i<16; i++)
+ {
+
+ if (((unsigned int)(((AdjCell_HandoverEntry*)
+ (ccAdjacentCellPackage.adjCell_handoverTable))[i].adjCell_handoverCellID)))
+ {
+
+ getByteAryByInt( ((AdjCell_HandoverEntry*)(&ccAdjCellHoTable))[i].adjCell_mcc,
+ (char*)&(((AdjCell_HandoverEntry*)(&ccAdjCellHoTable))[i].adjCell_mcc),3);
+ getByteAryByInt( ((AdjCell_HandoverEntry*)(&ccAdjCellHoTable))[i].adjCell_mnc,
+ (char*)&(((AdjCell_HandoverEntry*)(&ccAdjCellHoTable))[i].adjCell_mnc),2);
+
+ DBG_TRACE("%dth ADJ-CELL MCC(%d,%d,%d) MNC(%d,%d) LAC(%d) CI(%d)\n", i,
+ ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (ccAdjacentCellPackage.adjCell_handoverTable))[i].adjCell_mcc))[0],
+ ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (ccAdjacentCellPackage.adjCell_handoverTable))[i].adjCell_mcc))[1],
+ ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (ccAdjacentCellPackage.adjCell_handoverTable))[i].adjCell_mcc))[2],
+ ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (ccAdjacentCellPackage.adjCell_handoverTable))[i].adjCell_mnc))[0],
+ ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (ccAdjacentCellPackage.adjCell_handoverTable))[i].adjCell_mnc))[1],
+ ((short)((((AdjCell_HandoverEntry*)
+ (ccAdjacentCellPackage.adjCell_handoverTable))[i].adjCell_lac))),
+ ((short)((((AdjCell_HandoverEntry*)
+ (ccAdjacentCellPackage.adjCell_handoverTable))[i].adjCell_ci)))
+ );
+ }
+ }
+
+}
+
+void ccSetCdrTimer(int val)
+{
+ long t;
+ t = (long)((CALL_CDR_10M * 16.7)/1000)/60;
+
+ printf("Old ccCdr Timer value(tick %d, % min): %d\n", CALL_CDR_10M, t);
+ CALL_CDR_10M = (int)((val*60000)/16.7);
+ printf("New ccCdr Timer value(tick %d, % min): %d\n", CALL_CDR_10M, val);
+
+}
+//CDR <xxu:08-22-00> END
+
+
diff --git a/data/mnet/GP10/Host/cc/src/CCSessionHandler.cpp b/data/mnet/GP10/Host/cc/src/CCSessionHandler.cpp
new file mode 100644
index 0000000..f29ad43
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CCSessionHandler.cpp
@@ -0,0 +1,3580 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCSessionHandler.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-99
+// Description : CC Session Handler
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+//
+#include "taskLib.h"
+
+#include "jcc/JCCLog.h"
+
+#include "JCC/JCCUtil.h"
+
+#include "logging/VCLOGGING.h"
+
+//CH<xxu:11-24-99>
+#include "jcc/LUDBApi.h"
+#include "ril3/ie_cause.h"
+#include "ril3/ril3_sms_rp.h"
+#include "rm/rm_ccintf.h"
+
+#include "CC/CallConfig.h"
+#include "CC/CCSessionHandler.h"
+
+//CDR <xxu:08-21-00>
+#include "CDR/CdrVoiceCall.h"
+#include "CDR/CdrSSA.h"
+
+#include "CC/CCUtil.h"
+
+#include "CC/CCInt.h"
+
+#include "stdio.h"
+
+#include "CC/CCHandover.h"
+
+bool smsSendVbLinkRelease(LUDB_ID, UINT32, T_CNI_RIL3_RP_CAUSE_VALUE cause =
+ CNI_RIL3_RP_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE);
+
+extern int findCallUsingCallHandle( VOIP_CALL_HANDLE callHandle);
+
+extern void sessionDataInit(int);
+
+//BCT <xxu:07-06-00> BEGIN
+extern char CALL_BCT_PREFIX[10]; //Prefix defined for blind call transfer invocation
+extern char CALL_BCT_PREFIX_LEN; //
+extern bool sendH323Msg(TwoPartyCallLeg *, JCCEvent_t, CCRemMsgData_t);
+extern bool VBLinkTransferRequest(unsigned short,
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER,
+ T_CNI_RIL3_IE_CALLING_PARTY_BCD_NUMBER);
+
+//BCT <xxu:07-06-00> END
+
+#include "rm/rm_head.h"
+extern u8 rm_EntryIdToTrxSlot(T_CNI_IRT_ID entryId, u16 *gsmHandler);
+
+extern bool callTrace;
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+CCSessionHandler::CCSessionHandler (CCSession_t *session)
+ :parent (session),
+ sapi3Queue_(this )
+{
+
+ entryId = (T_CNI_IRT_ID) JCC_UNDEFINED;
+
+ //BCT <xxu:09-25-00>
+ //anchorHandoverSession = new CCAnchorHandover(this, parent->callIndex, parent->msgQId);
+ //targetHandoverSession = new CCTargetHandover(this, parent->callIndex, parent->msgQId);
+
+ // Initialize the handover to NULL value, which means that no handover is going on
+ //handoverSession = NULL;
+
+ ma = new CCMsgAnalyzer();
+
+ callLeg1 = new TwoPartyCallLeg(this, parent->callIndex, parent->msgQId, 1);
+ callLeg2 = new TwoPartyCallLeg(this, parent->callIndex, parent->msgQId, 2);
+
+ // Placeholder to refuse a third callleg request from MS.
+ callLeg3 = new TwoPartyCallLeg(this, parent->callIndex, parent->msgQId, 3);
+
+ smsLeg1 = new SmsLeg (this, parent->callIndex, parent->msgQId, 4); //MT SMS leg
+ smsLeg2 = new SmsLeg (this, parent->callIndex, parent->msgQId, 5); //M0 SMS leg
+ smsLeg3 = new SmsLeg (this, parent->callIndex, parent->msgQId, 6); //MT SMS leg
+
+ cissCallLeg = new CISSCallLeg(this, parent->callIndex, parent->msgQId, 0);
+
+ //ext-HO <xxu:06-08-01>
+ hoCallLeg = new HOCallLeg(this, parent->callIndex, parent->msgQId, 7);
+ h3CallLeg = new HOCallLeg(this, parent->callIndex, parent->msgQId, 8);
+
+ //BCT <xxu:09-25-00>
+ anchorHandoverSession = new CCAnchorHandover(this, parent->callIndex, parent->msgQId);
+ targetHandoverSession = new CCTargetHandover(this, parent->callIndex, parent->msgQId);
+ // ext-ho <xxu:06-14-01>
+ targetHandoverSessionExtHo = new CCTargetHandoverExtHo(this, parent->callIndex, parent->msgQId);
+
+ // Initialize the handover to NULL value, which means that no handover is going on
+ handoverSession = NULL;
+
+
+ UINT16 uint16TimerValue;
+ int timerValue;
+
+ uint16TimerValue = (((UINT16)(3)) & (0x000F)) << 8;
+ uint16TimerValue = uint16TimerValue | (((UINT16)(parent->callIndex)) & 0x00FF);
+
+ timerValue = (short)uint16TimerValue;
+ sessionTimer = new JCCTimer(callTimerExpiry, timerValue);
+
+ initData();
+}
+
+
+//ext-HO <xxu:06-08-01>
+void
+CCSessionHandler::handleReleaseCallLegExtHo(CallLeg *leg)
+{
+
+ DBG_FUNC("CCSessionHandler::handleReleaseCallLegExtHo", CC_HO_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("{\nMNEThoTRACE(cs::handleReleaseCallLegExtHo): ho-Call Leg released\n}\n");
+
+ // Need to wait until all the Call Legs are released to release the session
+ if ((callLeg1->idle) && (callLeg2->idle) && (cissCallLeg->idle) &&
+ (smsLeg1->isIdle()) && (smsLeg2->isIdle()) && (smsLeg3->isIdle()) &&
+ (hoCallLeg->idle) && (h3CallLeg->idle) )
+ {
+ DBG_TRACE("{\nMNEThoTRACE(cs::handleReleaseCallLegExtHo): ho-Call Leg is released last!\n}\n");
+ cleanup();
+ }
+
+ DBG_LEAVE();
+}
+
+//ext-HO <xxu:06-08-01>
+void
+CCSessionHandler::handleReleaseCallLegExtH3(CallLeg *leg)
+{
+
+ DBG_FUNC("CCSessionHandler::handleReleaseCallLegExtH3", CC_HO_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("{\nMNEThoTRACE(cs::handleReleaseCallLegExtH3): h3-Call Leg released\n}\n");
+
+ // Need to wait until all the Call Legs are released to release the session
+ if ((callLeg1->idle) && (callLeg2->idle) && (cissCallLeg->idle) &&
+ (smsLeg1->isIdle()) && (smsLeg2->isIdle()) && (smsLeg3->isIdle()) &&
+ (hoCallLeg->idle) && (h3CallLeg->idle) )
+ {
+ DBG_TRACE("{\nMNEThoTRACE(cs::handleReleaseCallLegExtH3): h3-Call Leg is released last!\n}\n");
+ cleanup();
+ }
+
+ DBG_LEAVE();
+}
+
+
+void
+CCSessionHandler::handleReleaseCallLeg (CallLeg *leg)
+{
+
+ DBG_FUNC("CCSessionHandler::handleReleaseCallLeg", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ // Need to wait until all the Call Legs are released to release the session
+ if ((callLeg1->idle) && (callLeg2->idle) && (cissCallLeg->idle) &&
+ (smsLeg1->isIdle()) && (smsLeg2->isIdle()) && (smsLeg3->isIdle()))
+ {
+ DBG_TRACE("handleReleaseCallLeg:performing CCSession cleanup\n");
+ cleanup();
+ }
+ else if (isMmSetupTermActive() && getMmTermSetupLeg() == leg)
+ { // Reset the Mobile Termination Leg if there is another active Leg in a session
+ DBG_TRACE("handleReleaseCallLeg:performing CCSession resetMmTermSetup\n");
+ resetMmTermSetup();
+ }
+
+ DBG_LEAVE();
+}
+
+void
+CCSessionHandler::initData ()
+{
+ DBG_FUNC("CCSessionHandler::initData", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ // Do the following only if entry id is valid.
+ // In terminations and cleanups, it may not be setup yet.
+ // Check the case below to take care of paging failure cases.
+
+ if (entryId != (T_CNI_IRT_ID) JCC_UNDEFINED )
+ {
+
+ IntraL3Msg_t mmOutMsg;
+
+ // Send internal MM msg - no data needed
+ sendMM(INTRA_L3_MM_REL_REQ, INTRA_L3_NULL_MSG, entryId, &mmOutMsg);
+
+ resetIrt ();
+
+ entryId = (T_CNI_IRT_ID) JCC_UNDEFINED;
+ }
+
+ oid = CNI_LAPDM_NULL_OID;
+
+ ludbIndex = JCC_UNDEFINED;
+
+ releaseCause = CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING;
+
+ isEmergencyCall = false;
+
+ resetSapi3 ();
+ resetMmTermSetup ();
+
+ sapi3Queue_.reset();
+
+ handleReleaseSession(parent);
+
+ //BCT <xxu:07-06-00> BEGIN
+ bctInvoke_ = false;
+ bctTi_ = ORIG_OR_MASK;
+ bctLeg_ = NULL;
+ //BCT <xxu:07-06-00> END
+
+ //CDR <xxu:08-23-00>
+ mobileId.mobileIdType = CNI_RIL3_NO_MOBILE_ID;
+
+ //ext-HO <xxu:06-08-01>
+ hoCallHandle = VOIP_NULL_CALL_HANDLE;
+
+ DBG_LEAVE();
+}
+
+bool CCSessionHandler::resetIrt ()
+{
+ bool retVal;
+
+ DBG_FUNC ("CCSessionHandler::resetIrt", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ retVal = setIrt (entryId, cc_id);
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+// Sets all the required IRTs for CC
+bool CCSessionHandler::setIrt (T_CNI_IRT_ID inEntryId, T_CNI_L3_ID& newId)
+{
+ bool retVal = (inEntryId != (T_CNI_IRT_ID) JCC_UNDEFINED);
+
+ DBG_FUNC ("CCSessionHandler::setIrt", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ // Check validity of the received entry ID and Update CC entry for FACCH IRT entry
+ if ( retVal == true &&
+ (retVal = CNI_RIL3_IRT_Set_CC_Id (inEntryId, newId)) == true )
+ {
+ // Update CC entry for SACCH IRT entry
+ retVal = CNI_RIL3_IRT_Set_CC_Id (rm_GetSacchEntryId (inEntryId), newId);
+ }
+
+ if (retVal == false)
+ DBG_WARNING ("CC Call Error : IRT Table set problem for (entry id = %d)\n ", inEntryId);
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+void
+CCSessionHandler::printData (JCCPrintStFn fnPtr)
+{
+ char * shStr1Ptr = "Session Handler Data : ";
+ char shStr2[120];
+
+ //BCT <xxu:07-12-00> BEGIN add BCT info
+ sprintf(&shStr2[0],
+ "lapId( %d), irtId( %d), (ludbId %d) (emergency %d) bct(inv %d, ti %d, leg %p)\n",
+ oid,
+ entryId,
+ ludbIndex,
+ isEmergencyCall,
+ bctInvoke_,
+ bctTi_,
+ bctLeg_
+ );
+ //BCT <xxu:07-12-00> END add BCT info
+
+ (*fnPtr)(shStr1Ptr);
+ (*fnPtr)(&shStr2[0]);
+
+ if (handoverSession == anchorHandoverSession)
+ {
+ anchorHandoverSession->printData(fnPtr);
+ }
+ else if (handoverSession == targetHandoverSession)
+ {
+ targetHandoverSession->printData(fnPtr);
+ }
+
+ callLeg1->printData (fnPtr);
+ callLeg2->printData (fnPtr);
+ cissCallLeg->printData (fnPtr);
+ smsLeg1->printData (fnPtr);
+ smsLeg2->printData (fnPtr);
+ smsLeg3->printData (fnPtr);
+
+}
+
+bool
+CCSessionHandler::setupOrig(T_CNI_IRT_ID irtId ,
+ T_CNI_RIL3_CM_SERVICE_TYPE cmServType)
+{
+ /* Called ONLY for the very first MO setup (either call or SMS-PP */
+ bool retVal = true;
+
+ DBG_FUNC("CCSessionHandler::setupOrig", CC_SESSION_LAYER);
+ DBG_ENTER();
+ entryId = irtId;
+ // Also initialize other variables in the session
+
+
+ T_CNI_RIL3_IRT_ENTRY irtEntry;
+ irtEntry.entry_id = entryId;
+
+ if ( (CNI_RIL3_IRT_Get_Entry_by_Entry_ID(&irtEntry)) == false )
+ {
+ DBG_ERROR("IRT Error : IRT Table problem, (Entry Id = %d) \n ",
+ entryId);
+
+ // Cleanup action ?? - Release all resources
+ initData();
+ DBG_LEAVE();
+ return (false);
+ }
+
+ oid = irtEntry.lapdm_oid;
+
+ if (cmServType == CNI_RIL3_CM_SERVICE_TYPE_SHORT_MESSAGE_SERVICE)
+ {
+ DBG_TRACE ("Init MO SMS connection.\n");
+
+ //Call to MO SMS setup: smsLeg2 is designated for MO SMS
+ retVal = smsLeg2->setupOrig();
+ }
+ else if (cmServType != CNI_RIL3_CM_SERVICE_TYPE_SUPPLEMENTARY_SERVICE)
+ {
+ isEmergencyCall = (cmServType == CNI_RIL3_CM_SERVICE_TYPE_EMERGENCY_CALL);
+
+ callLeg1->setupOrig(0, cmServType);
+ retVal = true;
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+SpeechChann_t
+CCSessionHandler::currSpeechCh(void)
+{
+ DBG_FUNC("CCSessionHandler::currSpeechCh", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ DBG_LEAVE();
+ if ( (activeLeg == NULL) || (activeLeg()->msSide == NULL) )
+ return (currChannDef);
+ else
+ return(activeLeg()->msSide->currSpeechCh_);
+}
+
+//Igal: Updated for SMS HO
+bool
+CCSessionHandler::isHandoverAllowed(void)
+{
+ DBG_FUNC("CCSessionHandler::isHandoverAllowed", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ bool callLeg1Ok, callLeg2Ok = false, smsHoAllowed;
+
+ if ((!callLeg1->idle) && (callLeg1->msSide != NULL))
+ {
+ DBG_TRACE("isHandoverAllowed Info: callLeg1's channState_(%d) callState_(%d)\n",
+ callLeg1->msSide->channState_,
+ callLeg1->msSide->callState_);
+
+ if (((callLeg1->msSide->channState_ == RES_ST_ASSIGNED) && // Do not allow SDCCH (or) TCH signaling mode handovers
+ ((callLeg1->msSide->callState_ != HC_ST_RELEASE_REQ) &&
+ (callLeg1->msSide->callState_ != HC_ST_DISCONNECT_IND))) ||
+ (callLeg1->waitingCallLeg))
+//
+// if ((callLeg1->msSide->callState_ == HC_ST_ACTIVE) ||
+// (callLeg1->msSide->callState_ == OHC_ST_ANSWER_PENDING) ||
+// (callLeg1->msSide->callState_ == THC_ST_ALERTING))
+
+
+ {
+ // Don't allow handovers during NON-STABLE call state!
+ if (callLeg1->isActive())
+ {
+ callLeg1Ok = true;
+ }
+ }
+ }
+ else if (!callLeg2->idle)
+ {
+ callLeg1Ok = true;
+ }
+
+ if ((!callLeg2->idle) && (callLeg2->msSide != NULL))
+ {
+ DBG_TRACE("isHandoverAllowed Info: callLeg2's channState_(%d) callState_(%d)\n",
+ callLeg2->msSide->channState_,
+ callLeg2->msSide->callState_);
+
+ if (((callLeg2->msSide->channState_ == RES_ST_ASSIGNED) &&
+ ((callLeg2->msSide->callState_ != HC_ST_RELEASE_REQ) &&
+ (callLeg2->msSide->callState_ != HC_ST_DISCONNECT_IND))) ||
+ (callLeg2->waitingCallLeg))
+//
+// if ((callLeg2->msSide->callState_ == HC_ST_ACTIVE) ||
+// (callLeg2->msSide->callState_ == OHC_ST_ANSWER_PENDING) ||
+// (callLeg2->msSide->callState_ == THC_ST_ALERTING))
+ {
+
+ // Don't allow handovers during NON-STABLE call state!
+ if (callLeg2->isActive())
+ {
+ callLeg2Ok = true;
+ }
+ }
+ }
+ else if (!callLeg1->idle)
+ {
+ callLeg2Ok = true;
+ }
+
+ //Igal: SMS Handover conditions
+ smsHoAllowed = isSmsHoAllowed();
+
+ DBG_TRACE("isHandoverAllowed Info: callLeg1Ok(%d) callLeg2Ok(%d) smsHoAllowed(%d) bctInvoke_(%d) getBctArrival(%d)\n",
+ callLeg1Ok, callLeg2Ok, smsHoAllowed, bctInvoke_, getBctArrival());
+
+ DBG_LEAVE();
+
+ //BCT <xxu:07-14-00> BEGIN
+ return (callLeg1Ok && callLeg2Ok && smsHoAllowed && !bctInvoke_ && !getBctArrival());
+ //BCT <xxu:07-14-00> BEGIN
+
+}
+
+bool
+CCSessionHandler::isOtherLegHeld(short legNum)
+{
+ DBG_FUNC("CCSessionHandler::isOtherLegHeld", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ bool returnValue = false;
+ TwoPartyCallLeg *otherLeg;
+
+ if (legNum == 1)
+ {
+ otherLeg = callLeg2;
+ }
+ else
+ {
+ otherLeg = callLeg1;
+ }
+
+ if ((otherLeg->idle) ||
+ (otherLeg->msSide == NULL))
+ {
+ returnValue = true;
+ }
+ else if (otherLeg->msSide->chState_ == CH_ST_HELD)
+ {
+ returnValue = true;
+ }
+
+ DBG_LEAVE();
+ return(returnValue);
+}
+
+
+bool CCSessionHandler::isSmsHoAllowed ()
+{
+ DBG_FUNC ("CCSessionHandler::isSmsHoAllowed", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ bool retVal = (smsLeg1->isHoAllowed() &&
+ smsLeg2->isHoAllowed() &&
+ smsLeg3->isHoAllowed() );
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+TwoPartyCallLeg *
+CCSessionHandler::activeLeg(void)
+{
+ DBG_FUNC("CCSessionHandler::activeLeg", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ TwoPartyCallLeg *returnValue = NULL;
+
+ //Igal: update this message, change return type to CallLeg?
+
+ if ((!callLeg1->idle) && (callLeg1->msSide != NULL))
+ {
+ if (((callLeg2->idle) ||
+ (callLeg1->msSide->chState_ == CH_ST_IDLE) ||
+ (callLeg1->msSide->chState_ == CH_ST_HREQ)) &&
+ (!callLeg1->waitingCallLeg))
+ {
+ returnValue = callLeg1;
+ }
+ }
+
+ if ((!callLeg2->idle) && (callLeg2->msSide != NULL))
+ {
+ if (((callLeg1->idle) ||
+ (callLeg2->msSide->chState_ == CH_ST_IDLE) ||
+ (callLeg2->msSide->chState_ == CH_ST_HREQ)) &&
+ (!callLeg2->waitingCallLeg))
+ {
+ returnValue = callLeg2;
+ }
+ }
+
+ // Otherwise, we are doing a signaling activity (CISS, SMS Point to Point, etc)
+
+ DBG_LEAVE();
+ return(returnValue);
+}
+
+CallLeg *
+CCSessionHandler::getCallLegForNewTermination(bool &waitingCallLeg)
+{
+ DBG_FUNC("CCSessionHandler::getCallLegForNewTermination", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ TwoPartyCallLeg *whichLeg = NULL;
+ bool waitingAllowed = (ludbIsProvCW(ludbIndex) &&
+ ludbIsActiveCW(ludbIndex) &&
+ !isEmergencyCall ); // Override features for emergency call
+
+ if ((callLeg1->idle) &&
+ ((callLeg2->idle) || ((callLeg2->isActive()) && waitingAllowed)))
+ {
+ whichLeg = callLeg1;
+ waitingCallLeg = (!(callLeg2->idle));
+ }
+ else if ((callLeg2->idle) &&
+ ((callLeg1->idle) || ((callLeg1->isActive()) && waitingAllowed)))
+ {
+ whichLeg = callLeg2;
+ waitingCallLeg = (!(callLeg1->idle));
+ }
+
+ DBG_LEAVE();
+
+ return (whichLeg);
+}
+
+CallLeg *
+CCSessionHandler::getSmsLegForNewTermination (bool &waitingCallLeg)
+{
+ DBG_FUNC("CCSessionHandler::getSmsLegForNewTermination", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ SmsLeg *whichLeg = NULL_PTR;
+
+ if (smsLeg1->isIdle())
+ whichLeg = smsLeg1;
+
+ waitingCallLeg = false;
+
+ DBG_LEAVE();
+ return (whichLeg);
+}
+
+
+bool
+CCSessionHandler::setupTerm(VOIP_CALL_HANDLE voipCallHandle,
+ int cdrIndex ,
+ int callRefValue ,
+ bool isFirst )
+{
+ DBG_FUNC("CCSessionHandler::setupTerm", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ bool waitingCallLeg = false ;
+ bool returnValue = true ;
+
+ CallLeg *whichLeg;
+
+ if (isMmSetupTermActive() == true)
+ { // Only one MT MM connection setup in progress is allowed per MS
+ // Second attempt is rejected
+ whichLeg = NULL;
+ DBG_TRACE ("CM Log: second MT setup attempt while ongoing MT setup (%s) in progress\n",
+ (voipCallHandle != VOIP_NULL_CALL_HANDLE) ? "Voice Call" : "SMS");
+ }
+ else if (voipCallHandle != VOIP_NULL_CALL_HANDLE)
+ // Get termination leg for the Voice call
+ whichLeg = getCallLegForNewTermination (waitingCallLeg);
+ else
+ // Get termination for the SMS
+ whichLeg = getSmsLegForNewTermination (waitingCallLeg);
+
+ if (whichLeg != NULL)
+ {
+ if (isFirst)
+ setMmTermSetup (whichLeg); // Mark beginning of the MM Connection Setup
+
+ // Invoke virtual function
+ whichLeg->setupTerm (voipCallHandle, cdrIndex, callRefValue, waitingCallLeg);
+
+ if ( waitingCallLeg && (!isFirst) )
+ {
+ // CDR <xxu:08-21-00> BEGIN: for Voice call only
+ CCdrSSA cwCdr;
+ if (ludbGetSubscInfoExists(ludbIndex))
+ {
+ cwCdr.setServedIMSI(ludbGetMobileIdPtr(ludbIndex));
+ cwCdr.setServedMSISDN(ludbGetMSISDNPtr(ludbIndex));
+ }
+ cwCdr.setCorrelatedEventRefNumber(whichLeg->ccCdr.getEventRefNumber());
+ cwCdr.generateRecord(CDR_SS_ACTION_INVOCATION,SUPP_SERV_CW,CNI_RIL3_CAUSE_SUCCESS);
+ // CDR <xxu:08-21-00> END
+ }
+ returnValue = true;
+ }
+ else if (voipCallHandle == VOIP_NULL_CALL_HANDLE)
+ { // SMS MT setup during ongoing MT MM connection esteblishment
+ returnValue = false;
+ }
+ else
+ { // Either MT call setup during ongoing MT MM connection esteblishment or
+ // the call is rejected
+
+ // print out the trx, timeslot for better debugging
+ UINT16 gsmHandler;
+ UINT8 trx, slot;
+ T_SUBSC_IE_ISDN* isdnPtr;
+
+ if (rm_EntryIdToTrxSlot(entryId,
+ &gsmHandler) ==
+ RM_TRUE)
+ {
+
+ trx = (UINT8)(gsmHandler>>8);
+ slot = (UINT8)(gsmHandler);
+
+ if (callTrace)
+ {
+ DBG_WARNING("CC Log: User Busy on (TRX=%d),(Slot=%d),(entryId=%d)\n",
+ trx, slot, entryId);
+ if ((isdnPtr = ludbGetMSISDNPtr(ludbIndex)) != NULL)
+ {
+ DBG_WARNING("CC Log: MS (DN=%s)\n",
+ isdnPtr->digits);
+ }
+ }
+ else
+ {
+ DBG_TRACE("CC Log: User Busy on (TRX=%d),(Slot=%d),(entryId=%d)\n",
+ trx, slot, entryId);
+ if ((isdnPtr = ludbGetMSISDNPtr(ludbIndex)) != NULL)
+ {
+ DBG_TRACE("CC Log: MS (DN=%s)\n",
+ isdnPtr->digits);
+ }
+ }
+ }
+
+ returnValue = false;
+ }
+
+ DBG_LEAVE();
+ return(returnValue);
+}
+
+bool
+CCSessionHandler::setupTargetHandover(void)
+{
+ DBG_FUNC("CCSessionHandler::setupTargetHandover", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ handoverSession = targetHandoverSession;
+
+ DBG_LEAVE();
+ return(true);
+
+}
+
+//ext-HO <xxu:05-16-01>
+bool
+CCSessionHandler::setupTargetHandoverExtHo(void)
+{
+ DBG_TRACEei("{\nMNETeiTRACE(cs::setupTargetHandoverExtHo): entering......\n}\n");
+
+ handoverSession = targetHandoverSessionExtHo;
+
+ return(true);
+
+}
+
+bool
+CCSessionHandler::findHandle(VOIP_CALL_HANDLE voipCallHandle)
+{
+ DBG_FUNC("CCSessionHandler::findHandle", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ if (((!callLeg1->idle) && (callLeg1->h323CallHandle == voipCallHandle)) ||
+ ((!callLeg2->idle) && (callLeg2->h323CallHandle == voipCallHandle)))
+ {
+ DBG_LEAVE();
+ return(true);
+ }
+
+ DBG_LEAVE();
+ return(false);
+
+}
+
+bool
+CCSessionHandler::routeFromVoipToCallLeg(IntraL3Msg_t *h323InMsg,
+ TwoPartyCallLeg *&whichLeg)
+{
+ DBG_FUNC("CCSessionHandler::routeFromVoipToCallLeg", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ bool ret; //BCT <xxu:09-21-00>
+ ret = false;
+
+ whichLeg = NULL;
+
+ if ((!callLeg1->idle) &&
+ ((callLeg1->h323CallHandle == h323InMsg->call_handle) ||
+ (callLeg1->h323CallHandle == VOIP_NULL_CALL_HANDLE)))
+ {
+ whichLeg = callLeg1;
+ callLeg1->h323CallHandle = h323InMsg->call_handle;
+ ret = true; //BCT <xxu:09-21-00>
+ }
+ else if ((!callLeg2->idle) &&
+ ((callLeg2->h323CallHandle == h323InMsg->call_handle) ||
+ (callLeg2->h323CallHandle == VOIP_NULL_CALL_HANDLE)))
+ {
+ whichLeg = callLeg2;
+ callLeg2->h323CallHandle = h323InMsg->call_handle;
+ ret = true; //BCT <xxu:09-21-00>
+ }
+
+ // This is a VOIP error. Put in a temporary fix such that we are not left with half calls
+ else if ((h323InMsg->entry_id = findCallUsingCallHandle( h323InMsg->call_handle))
+ == (CC_MAX_CC_CALLS))
+ {
+ DBG_WARNING("H323->CC: Late Msg(%d) h323CallHandle(%p) SessionId(%d)\n",
+ h323InMsg->message_type,
+ (int)h323InMsg->call_handle,
+ parent->callIndex );
+ }
+ else
+ {
+ if (ERROR == msgQSend( ccSession[h323InMsg->entry_id].msgQId,
+ (char *) h323InMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT, //PR1553 <xxu> WAIT_FOREVER
+ MSG_PRI_NORMAL
+ ) )
+ {
+ DBG_ERROR("CC Call -> CC Call Error : sendCC msgQSend (QID = %p) error\n ",
+ (int)ccSession[h323InMsg->entry_id].msgQId);
+
+ }
+ }
+
+ //BCT <xxu:09-21-00> BEGIN
+ if ( (whichLeg != NULL) &&
+ (h323InMsg->message_type == INTRA_L3_CC_BCT_UPDATE_HANDLES) )
+ {
+ whichLeg->bctArrival_ = true;
+ whichLeg->oH323CallHandle = h323InMsg->call_handle;
+ whichLeg->h323CallHandle = h323InMsg->l3_data.voipMsg.callUpdateHandles.NewHandle;
+
+ //break whatever traffic connections sunk to old rtp handler
+ bool hoSimplexConnected = false;
+ bool h3SimplexConnected = false;
+
+ if (!h323InMsg->l3_data.voipMsg.callUpdateHandles.ReconnectOnTransferFailure)
+ {
+ if ( (handoverSession != NULL)&&(handoverSession == anchorHandoverSession) )
+ {
+ hoSimplexConnected = anchorHandoverSession->hoSimplexConnected_;
+ h3SimplexConnected = anchorHandoverSession->h3SimplexConnected_;
+ anchorHandoverSession->hoSimplexConnected_ = false;
+ anchorHandoverSession->h3SimplexConnected_ = false;
+ }
+
+ if ( whichLeg->voiceConnected || hoSimplexConnected || h3SimplexConnected )
+ {
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = VoipCallGetRTPHandle(whichLeg->oH323CallHandle);
+
+ if ( (csuResult = csu_OrigTermBreakAll(&rtpSourcePort) )
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_ERROR("CC->CSU Error(bct): Disconn Failed (Result=%d)for(RTPHandle=%p)\n",
+ csuResult, rtpSourcePort.portId.rtpHandler);
+ //Can only generate OAM report
+ }
+ }
+
+ whichLeg->voiceConnected = false;
+ } else
+ {
+ //Reconnect the call between transferring and transferred party due to BCT failure
+ if (whichLeg->msSide->chState_!=CH_ST_HELD)
+ {
+ T_CSU_PORT_ID srcPort, snkPort;
+ T_CSU_RESULT_CON result;
+
+ srcPort.portType = CSU_RTP_PORT;
+ srcPort.portId.rtpHandler = VoipCallGetRTPHandle(whichLeg->h323CallHandle);
+ snkPort.portType = CSU_NIL_PORT;
+
+ if (handoverSession==NULL)
+ {
+ //connect to gsm port
+ snkPort.portType = CSU_GSM_PORT;
+ snkPort.portId.gsmHandler = entryId;
+ }
+
+ if ((handoverSession!=NULL)&&(handoverSession==anchorHandoverSession)&&
+ (anchorHandoverSession->hoState_==HAND_ST_ANCH_HO_COMPLT) )
+ {
+ //connect to rtp port
+ snkPort.portType = CSU_RTP_PORT;
+ snkPort.portId.rtpHandler = anchorHandoverSession->hoRtpSession_;
+
+ }
+
+ if ((handoverSession!=NULL)&&(handoverSession==anchorHandoverSession)&&
+ (anchorHandoverSession->hoState_==HAND_ST_ANCH_EHO_COMPLT) )
+ {
+ //connect to rtp port
+ snkPort.portType = CSU_RTP_PORT;
+ snkPort.portId.rtpHandler = VoipCallGetRTPHandle(hoCallLeg->h323CallHandle);
+
+ }
+
+ if (snkPort.portType!=CSU_NIL_PORT)
+ {
+ //make duplex connection
+ if ((result = csu_DuplexConnect(&srcPort, &snkPort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_ERROR("CSU Error(BCT): duplex conn (Result=%d) for src(%d,%x) snk(%d,%x)\n",
+ result,
+ srcPort.portType, srcPort.portId.rtpHandler,
+ snkPort.portType, snkPort.portId.rtpHandler );
+ }
+ }
+
+ whichLeg->voiceConnected = true;
+
+ }
+ }
+
+ }
+
+ //BCT <xxu:09-21-00> END
+
+ DBG_LEAVE();
+ return(ret);
+}
+
+SmsLeg * CCSessionHandler::findSmsReference (UINT32 refNum)
+{
+ SmsLeg * whichLeg = NULL_PTR;
+
+ DBG_FUNC ("CCSessionHandler::findSmsReference", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ if (refNum == smsLeg1->getVbRefNum())
+ whichLeg = smsLeg1;
+ else if (refNum == smsLeg2->getVbRefNum())
+ whichLeg = smsLeg2;
+ else
+ whichLeg = NULL_PTR; /* If there is no SMS leg to forward the message
+ return NULL_PTR */
+ DBG_LEAVE();
+ return (whichLeg);
+}
+
+
+bool
+CCSessionHandler::routeFromVoipToSmsLeg (IntraL3Msg_t * h323InMsg,
+ SmsLeg *&whichLeg )
+{
+ DBG_FUNC ("CCSessionHandler::routeFromVoipToSmsLeg", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ SMS_VBLINK_MSGTYPE type = (SMS_VBLINK_MSGTYPE) h323InMsg->l3_data.smsVbMsg.hdr.msgType;
+
+ whichLeg = NULL_PTR;
+
+ if (type == MNSMS_EST_Req) // always forwarded to the MT Setup
+ {
+ /* Race condition could happend here:
+ MNSMS-EST Req is sent to the active MS but by the time Call task is ready to
+ process the message all the activities are complited and the session is released */
+
+ whichLeg = smsLeg1;
+ }
+ else // Otherwise, is routed according to Vb Reference number
+ whichLeg = findSmsReference (h323InMsg->l3_data.smsVbMsg.hdr.refNum);
+
+ DBG_LEAVE();
+ return (!(whichLeg == NULL_PTR));
+}
+
+
+bool
+CCSessionHandler::routeFromMsToCallLeg(T_CNI_RIL3CC_MSG *msInDecodedMsg,
+ TwoPartyCallLeg *&whichLeg)
+{
+ DBG_FUNC("CCSessionHandler::routeFromMsToCallLeg", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ whichLeg = NULL;
+
+ if ((!callLeg1->idle) && (callLeg1->msSide != NULL))
+ {
+ if (((callLeg1->msSide->callState_ == HC_ST_NULL) &&
+ ((msInDecodedMsg->header.message_type == CNI_RIL3CC_MSGID_SETUP) ||
+ (msInDecodedMsg->header.message_type == CNI_RIL3CC_MSGID_EMERGENCY_SETUP)) && // can we get a disconnect here?
+ (callLeg1->procType == CC_PROC_MOB_ORIG))|| // waiting for origination setup
+ (((msInDecodedMsg->header.si_ti >> 3) == 0) && // Mobile Origination
+ (callLeg1->msSide->ti == (msInDecodedMsg->header.si_ti | ORIG_OR_MASK)) &&
+ (callLeg1->procType == CC_PROC_MOB_ORIG)) || // any origination protocol message
+ (((msInDecodedMsg->header.si_ti >> 3) == 1) && // Mobile Termination
+ (callLeg1->msSide->ti == (msInDecodedMsg->header.si_ti & TERM_AND_MASK)) &&
+ (callLeg1->procType == CC_PROC_MOB_TERM))) // any termination protocol message
+
+ {
+ whichLeg = callLeg1;
+ DBG_LEAVE();
+ return(true);
+ }
+ }
+
+ if ((!callLeg2->idle) && (callLeg2->msSide != NULL))
+ {
+ if ((((msInDecodedMsg->header.si_ti >> 3) == 0) && // Mobile Origination
+ (callLeg2->msSide->ti == (msInDecodedMsg->header.si_ti | ORIG_OR_MASK)) &&
+ (callLeg2->procType == CC_PROC_MOB_ORIG)) || // any origination protocol message
+ (((msInDecodedMsg->header.si_ti >> 3) == 1) && // Mobile Termination
+ (callLeg2->msSide->ti == (msInDecodedMsg->header.si_ti & TERM_AND_MASK)) &&
+ (callLeg2->procType == CC_PROC_MOB_TERM))) // any termination protocol message
+ {
+ whichLeg = callLeg2;
+ DBG_LEAVE();
+ return(true);
+ }
+ }
+
+ // Take care of the setup situations
+ if ( (msInDecodedMsg->header.message_type == CNI_RIL3CC_MSGID_SETUP) ||
+ (msInDecodedMsg->header.message_type == CNI_RIL3CC_MSGID_EMERGENCY_SETUP) )
+ {
+ //BCT <xxu:07-12-00> BEGIN
+
+ if ( ( (!callLeg1->idle) && (!callLeg2->idle)) ||
+ (bctInvoke_) ||
+ ((handoverSession != NULL) &&
+ ( (handoverSession->hoState_ != HAND_ST_ANCH_HO_COMPLT) &&
+ (handoverSession->hoState_ != HAND_ST_ANCH_EHO_COMPLT) ) ) )
+ {
+ //Ignore any subsequent call setup while a BCT is in progress or both call leg in use
+ //"handoverSession" supposed to be NULL while receiving a bct SETUP
+
+ DBG_WARNING("MS->CC Warning: block bct call setup for sessionId(%d) due to (bctInv %d,hoSession %p)\n",
+ parent->callIndex, bctInvoke_, handoverSession);
+
+ callLeg3->setupOrig(msInDecodedMsg->header.si_ti);
+
+ callLeg3->msSide->handleMobMsg(msInDecodedMsg,
+ CNI_RIL3_RESULT_SUCCESS, // decoding result
+ CNI_RIL3_CAUSE_RESOURCES_UNAVAILABLE_UNSPECIFIED,
+ HC_LOCAL_RELEASE_REQ); // release request
+ DBG_LEAVE();
+ return(false);
+ } else
+ {
+ if ( (msInDecodedMsg->header.message_type == CNI_RIL3CC_MSGID_SETUP) &&
+ (!memcmp(msInDecodedMsg->setup.calledBCD.digits, CALL_BCT_PREFIX, CALL_BCT_PREFIX_LEN)) )
+ {
+ //BCT invocation, and check if BCT is provisioned
+
+ DBG_TRACE("CC Call Log: (bct prefix = %d,%d,%d,%d)\n",
+ msInDecodedMsg->setup.calledBCD.digits[0],
+ msInDecodedMsg->setup.calledBCD.digits[1],
+ msInDecodedMsg->setup.calledBCD.digits[2],
+ msInDecodedMsg->setup.calledBCD.digits[3]);
+
+ msInDecodedMsg->setup.calledBCD.numDigits -= CALL_BCT_PREFIX_LEN;
+ memcpy(msInDecodedMsg->setup.calledBCD.digits,
+ &msInDecodedMsg->setup.calledBCD.digits[CALL_BCT_PREFIX_LEN],
+ msInDecodedMsg->setup.calledBCD.numDigits);
+
+ DBG_TRACE("CC Call Log: (bct-to number = %d,%d,%d,%d)\n",
+ msInDecodedMsg->setup.calledBCD.digits[0],
+ msInDecodedMsg->setup.calledBCD.digits[1],
+ msInDecodedMsg->setup.calledBCD.digits[2],
+ msInDecodedMsg->setup.calledBCD.digits[3]);
+
+ if ( !ludbIsProvECT(ludbIndex) )
+ //if (0)
+ {
+ // Handle its release through the placeholder for the third call leg.
+
+ DBG_TRACE("LUDB->CC BCT: not provisioned for (ludbIndex = %d, sessionId = %d)\n",
+ ludbIndex, parent->callIndex);
+
+ callLeg3->setupOrig(msInDecodedMsg->header.si_ti);
+
+ callLeg3->msSide->handleMobMsg(msInDecodedMsg,
+ CNI_RIL3_RESULT_SUCCESS, // decoding result
+ CNI_RIL3_CAUSE_REQUESTED_SERVICE_NOT_SUBSCRIBED ,
+ HC_LOCAL_RELEASE_REQ); // release request
+ DBG_LEAVE();
+ return(false);
+ }
+
+ //BCT race condition
+ if (getBctArrival())
+ {
+ // Handle its release through the placeholder for the third call leg.
+ DBG_TRACE("CC->BCT: a bct call arriving, block bct invoke(ludbId=%d, sessId=%d)\n",
+ ludbIndex, parent->callIndex);
+
+ callLeg3->setupOrig(msInDecodedMsg->header.si_ti);
+
+ callLeg3->msSide->handleMobMsg(msInDecodedMsg,
+ CNI_RIL3_RESULT_SUCCESS, // decoding result
+ CNI_RIL3_CAUSE_TEMPORARY_FAILURE,
+ HC_LOCAL_RELEASE_REQ); // release request
+ DBG_LEAVE();
+ return(false);
+ }
+
+ bctInvoke_ = true;
+ }
+
+ TwoPartyCallLeg *otherLeg;
+
+ if ( callLeg1->idle ) { whichLeg = callLeg1; otherLeg = callLeg2; }
+ else { whichLeg = callLeg2; otherLeg = callLeg1; }
+
+ if ( bctInvoke_ )
+ {
+ if ( otherLeg->msSide->callState_ != HC_ST_ACTIVE )
+ {
+ // Reject this BCT invocation since the call to bct is being released now
+
+ bctInvoke_ = false;
+
+ DBG_TRACE("CC BCT: call to bct is being released now (ludbIndex = %d, sessionId = %d)\n",
+ ludbIndex, parent->callIndex);
+
+ callLeg3->setupOrig(msInDecodedMsg->header.si_ti);
+
+ callLeg3->msSide->handleMobMsg(msInDecodedMsg,
+ CNI_RIL3_RESULT_SUCCESS, // decoding result
+ CNI_RIL3_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE,
+ HC_LOCAL_RELEASE_REQ); // release request
+ DBG_LEAVE();
+ return(false);
+ } else
+ {
+ //Inquire VB-TTF function for xfered-to number
+ T_SUBSC_IE_ISDN* isdnPtr;
+ if ((isdnPtr = ludbGetMSISDNPtr(ludbIndex)) != NULL)
+ {
+ //DBG_TRACE("CC Log: MS (DN=%s)\n",
+ // isdnPtr->digits);
+ msInDecodedMsg->setup.callingBCD.ie_present = true;
+ msInDecodedMsg->setup.callingBCD.numberType = CNI_RIL3_NUMBER_TYPE_INTERNATIONAL;
+ msInDecodedMsg->setup.callingBCD.numberingPlan = (T_CNI_RIL3_NUMBERING_PLAN_ID)isdnPtr->num_plan[0];
+ msInDecodedMsg->setup.callingBCD.numDigits = isdnPtr->num_digit;
+ for (int i=0;i<isdnPtr->num_digit;i++)
+ {
+ if ( isdnPtr->digits[i] >= 0x30 && isdnPtr->digits[i] < 0x40 )
+ msInDecodedMsg->setup.callingBCD.digits[i] = isdnPtr->digits[i] - 0x30;
+ else
+ DBG_ERROR("CC LOG LUDB(bct): invalid msisdn digit (%d,%c)\n",
+ i, (char) isdnPtr->digits[i]);
+ }
+ DBG_TRACE("CC Call Log: (calling Party BCD = %s)\n",
+ msInDecodedMsg->setup.callingBCD.digits);
+ }
+
+
+ if (!VBLinkTransferRequest(parent->callIndex,
+ msInDecodedMsg->setup.calledBCD,
+ msInDecodedMsg->setup.callingBCD))
+ {
+ // Reject this BCT invocation since the call to bct is being released now
+ DBG_ERROR ("CC->VB Link Err(bct): Failed on VBLinkTransferRequest\n");
+
+ bctInvoke_ = false;
+
+ DBG_TRACE("CC BCT: call to bct is being released now (ludbIndex = %d, sessionId = %d)\n",
+ ludbIndex, parent->callIndex);
+
+ callLeg3->setupOrig(msInDecodedMsg->header.si_ti);
+
+ callLeg3->msSide->handleMobMsg(msInDecodedMsg,
+ CNI_RIL3_RESULT_SUCCESS, // decoding result
+ CNI_RIL3_CAUSE_REQUESTED_SERVICE_NOT_SUBSCRIBED ,
+ HC_LOCAL_RELEASE_REQ); // release request
+ DBG_LEAVE();
+ return(false);
+ }
+
+ //Go ahead to do bct
+ DBG_TRACE("CC Call Log: (calling Party BCD = %d,%d,%d,%d)\n",
+ msInDecodedMsg->setup.callingBCD.digits[0],
+ msInDecodedMsg->setup.callingBCD.digits[1],
+ msInDecodedMsg->setup.callingBCD.digits[2],
+ msInDecodedMsg->setup.callingBCD.digits[3]);
+
+ bctTi_ = (msInDecodedMsg->header.si_ti | ORIG_OR_MASK);
+ bctLeg_ = whichLeg;
+ bctMainLeg_ = otherLeg;
+
+ CalledPartyNumber = msInDecodedMsg->setup.calledBCD;
+
+ //BCTCalling Party Number shalle be transferred party's number
+ //CallingPartyNumber = msInDecodedMsg->setup.callingBCD;
+ if (bctMainLeg_->procType==CC_PROC_MOB_ORIG)
+ {
+ CallingPartyNumber.ie_present = true;
+ CallingPartyNumber.numberType = bctMainLeg_->msSide->cpn.numberType;
+ CallingPartyNumber.numberingPlan = bctMainLeg_->msSide->cpn.numberingPlan;
+ CallingPartyNumber.presentationInd = CNI_RIL3_PRESENTATION_ALLOWED;
+ CallingPartyNumber.screeningInd = CNI_RIL3_SCREENING_NETWORK_PROVIDED; //TBD
+ CallingPartyNumber.numDigits = bctMainLeg_->msSide->cpn.numDigits;
+ memcpy(CallingPartyNumber.digits,bctMainLeg_->msSide->cpn.digits,bctMainLeg_->msSide->cpn.numDigits);
+ }
+ else
+ CallingPartyNumber = bctMainLeg_->msSide->callingPartyNum;
+
+ }
+ }
+
+ whichLeg->setupOrig(msInDecodedMsg->header.si_ti);
+ DBG_LEAVE();
+ return(true);
+ }
+
+ //BCT <xxu:07-12-00> END
+ }
+
+ DBG_WARNING("MS->CC Warning: Late Msg. for (ti = %p) (Session Id = %d)\n",
+ msInDecodedMsg->header.si_ti,
+ parent->callIndex );
+
+ DBG_LEAVE();
+ return(false);
+}
+
+bool CCSessionHandler::routeFromMsToSmsLeg (T_CNI_RIL3_CP_HEADER& msInDecodedHdr, SmsLeg *&whichLeg)
+{
+ DBG_FUNC("CCSessionHandler::routeFromMsToSmsLeg", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ unsigned newTi = msInDecodedHdr.si_ti;
+
+ if (newTi <= 7 ||
+ (newTi == smsLeg2->getTi() & TI_TERM_AND_MASK &&
+ (smsLeg1->getTi() == SMS_TI_INVALID || newTi != smsLeg1->getTi()))) //CP-ERROR correction
+ whichLeg = smsLeg2; // Transaction is originated by MS
+ else
+ whichLeg = smsLeg1;
+
+ DBG_LEAVE();
+ return (false);
+}
+
+
+void
+CCSessionHandler::cleanup (T_CNI_RIL3_CAUSE_VALUE cause, BOOL normClear)
+{
+ // This function has defaul value defined for the both parameters.
+ // T_CNI_RIL3_CAUSE_VALUE cause = CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING
+ // BOOL normClear = TRUE,
+ // should be set FALSE only when called as a result of remove ViperCell failure
+
+ BOOL isMigratedCall = FALSE;
+
+ DBG_FUNC ("CCSessionHandler::cleanup", CC_SESSION_LAYER);
+ DBG_ENTER ();
+
+ // <Igal: 04-10-01>
+ if (handoverSession != NULL)
+ {
+ isMigratedCall = handoverSession->cleanup (normClear);
+ }
+
+ if (normClear == TRUE || isMigratedCall == TRUE)
+ {
+ // Either normal call session release or migrated call release
+
+ // Otherwise, if the reason is external ViperCell failure:
+ // Incomplete HO is canceled due to failure of the target ViperCell (above).
+ // Call session continues on the current cell.
+
+ if (entryId != (T_CNI_IRT_ID) JCC_UNDEFINED )
+ {
+ IntraL3Msg_t mmOutMsg ;
+ T_CNI_IRT_ID tempEntryId = entryId;
+
+ // Send internal MM msg - no data needed
+ sendMM(INTRA_L3_MM_REL_REQ, INTRA_L3_NULL_MSG, entryId, &mmOutMsg);
+
+ resetIrt ();
+
+ // do not set entryId to null here.
+ // It might be used below in one of the components
+ }
+ callLeg1->cleanup (cause);
+ callLeg2->cleanup (cause);
+
+ //ext-HO <xxu:06-07-01>
+ hoCallLeg->cleanup (cause);
+ h3CallLeg->cleanup (cause);
+
+ cissCallLeg->cleanup (cause);
+
+ if (smsLeg1)
+ smsLeg1->cleanup (cause);
+ if (smsLeg2)
+ smsLeg2->cleanup (cause);
+ if (smsLeg3)
+ smsLeg3->cleanup (cause);
+
+ // set entryId to null here
+ entryId = (T_CNI_IRT_ID) JCC_UNDEFINED;
+ initData();
+ }
+
+ DBG_LEAVE();
+
+}
+
+int
+CCSessionHandler::handleMMMsg(IntraL3Msg_t *mmMsg)
+{
+ DBG_FUNC("CCSessionHandler::handleMMMsg", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ int retVal ;
+ bool hoEvent ;
+ JCCEvent_t currEvent;
+
+ mmInMsg = mmMsg;
+
+ switch (mmInMsg->primitive_type)
+ {
+ case INTRA_L3_MM_EST_CNF:
+
+ switch (mmInMsg->message_type)
+ {
+ case INTRA_L3_RR_PAGE_RSP:
+ currEvent = CC_MM_CONNECTION_CNF;
+ hoEvent = false;
+ break;
+
+ case INTRA_L3_RR_HANDOVER_REQ_ACK:
+ currEvent = HAND_TRG_HO_REQ_ACK;
+ hoEvent = true;
+ break;
+
+ default:
+ DBG_ERROR("CC Session Error: Unexpected (Msg Type = %d) from MM.\n",
+ mmInMsg->message_type);
+ currEvent = JCC_NULL_EVENT;
+
+ }
+ break;
+
+ case INTRA_L3_MM_EST_IND:
+ {
+ currEvent = CC_MM_CONNECTION_IND;
+ hoEvent = false;
+ }
+ break;
+
+ case INTRA_L3_MM_EST_REJ:
+ switch (mmInMsg->message_type)
+ {
+ case INTRA_L3_RR_PAGE_REQ:
+ currEvent = CC_MM_CONNECTION_REJ;
+ hoEvent = false;
+ break;
+
+ case INTRA_L3_RR_HANDOVER_REQ_NACK:
+ currEvent = HAND_TRG_HO_REQ_NACK;
+ hoEvent = true;
+ break;
+
+ default:
+ DBG_ERROR("CC Call Error: Unexpected (Msg Type = %d) from MM.\n",
+ mmInMsg->message_type);
+ currEvent = JCC_NULL_EVENT;
+
+ }
+ break;
+
+
+ case INTRA_L3_MM_REL_IND:
+ currEvent = CC_MM_CONNECTION_REL;
+ hoEvent = false;
+ break;
+
+ default:
+ DBG_ERROR("CC Call Error: Unexpected (Msg Primitive = %d) from MM.\n",
+ mmInMsg->primitive_type);
+ currEvent = JCC_NULL_EVENT;
+
+ }
+
+ // For call events:
+ if (currEvent != JCC_NULL_EVENT)
+ {
+ // For Handover events:
+ if (hoEvent)
+ {
+ if (handoverSession != NULL)
+ {
+ int causeValue;
+
+ if (handoverSession == anchorHandoverSession)
+ {
+ causeValue = anchorHandoverSession->handleMMMsg(mmMsg, currEvent);
+ }
+
+ //ext-HO <xxu:06-08-01>
+ else if (handoverSession == targetHandoverSession)
+ {
+ causeValue = targetHandoverSession->handleMMMsg(mmMsg, currEvent);
+
+ } else if (handoverSession == targetHandoverSessionExtHo)
+ {
+ causeValue = targetHandoverSessionExtHo->handleMMMsg(mmMsg, currEvent);
+ } else
+ {
+ DBG_ERROR("{\nMNEThoERROR(cs::handleMMMsg): invalid handoverSession (hoSession=%p, anchSession=%p, trgSession=%p, trgSessionExtHo=%p)\n}\n",
+ handoverSession, anchorHandoverSession, targetHandoverSession, targetHandoverSessionExtHo);
+ causeValue = -1;
+ }
+
+
+
+ if (causeValue != 0)
+ {
+ retVal = smHandleEvent(CC_RELEASE_CALL)
+
+ DBG_LEAVE();
+ return (retVal);
+ }
+ else
+ {
+ DBG_LEAVE();
+ return (0);
+ }
+ }
+
+ if (currEvent == HAND_TRG_HO_REQ_ACK)
+ {
+ // handle the case where a late establish confirm comes in
+ // for a handover request that was previously sent.
+ IntraL3Msg_t mmOutMsg;
+ sendMM (INTRA_L3_MM_REL_REQ,
+ INTRA_L3_NULL_MSG ,
+ mmMsg->entry_id ,
+ &mmOutMsg );
+ }
+ else
+ {
+ DBG_WARNING("CC Call Warning: Late Handover Msg? (MM Event=%d), (session id=%d).\n",
+ currEvent,
+ parent->callIndex);
+ }
+
+ DBG_LEAVE();
+ return (0);
+ }
+
+ else
+ { // non-handover events MM handling
+ int causeValue;
+
+ if (handoverSession == targetHandoverSession &&
+ currEvent == CC_MM_CONNECTION_IND )
+ {
+ /* Forwarding MM-EST Ind to the anchor side */
+
+ DBG_TRACE ("CM Session: Forward secondary MM-EST Ind to the anchor.\n");
+
+ sendMMMsg (mmMsg);
+ retVal = 0;
+
+ //ext-HO <xxu:07-01-01>
+ } else if ((handoverSession == targetHandoverSessionExtHo) &&
+ (currEvent == CC_MM_CONNECTION_IND ))
+ {
+ causeValue = targetHandoverSessionExtHo->handleMMMsg(mmMsg, currEvent);
+ if (causeValue)
+ retVal = smHandleEvent(CC_RELEASE_CALL);
+ }
+
+ else
+ retVal = smHandleEvent (currEvent);
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+ }
+
+ DBG_LEAVE();
+ return (0);
+}
+
+int
+CCSessionHandler::handleRRMsg(IntraL3Msg_t *rrMsg)
+{
+ DBG_FUNC("CCSessionHandler::handleRRMsg", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ bool hoEvent;
+ JCCEvent_t currEvent;
+
+ rrInMsg = rrMsg;
+
+ switch (rrInMsg->message_type)
+ {
+ case INTRA_L3_RR_CHANN_ASSIGN_COM:
+ currEvent = CC_RESOURCE_ASSIGN_COMPLT;
+ hoEvent = false;
+ break;
+
+ case INTRA_L3_RR_CHANN_ASSIGN_FAIL:
+ currEvent = CC_RESOURCE_ASSIGN_FAIL;
+ hoEvent = false;
+ break;
+
+ case INTRA_L3_RR_HANDOVER_REQUIRED:
+ currEvent = JCC_NULL_EVENT;
+
+ if (handoverSession == NULL)
+ {
+ // Ignore any Handover Required messages in anchor, if they need to be blocked.
+ if (!isHandoverAllowed())
+ {
+ break;
+ }
+
+ handoverSession = anchorHandoverSession;
+
+ //SAPI=3 connection is local. Reset the flag
+ resetSapi3 ();
+ }
+
+ DBG_TRACE("CC->Handover Info: received Intra L3 RR Handover Required message\n");
+ //printData(JCCPrintf);
+ currEvent = HAND_SRC_HO_REQD;
+ hoEvent = true;
+ break;
+
+ case INTRA_L3_RR_HANDOVER_COMPLETE:
+ currEvent = HAND_TRG_HO_COMPLT;
+ hoEvent = true;
+ break;
+
+ //ext-HO <xxu:06-08-01>
+ case INTRA_L3_RR_HANDOVER_ACCESS:
+ currEvent = HAND_HO_ACCESS;
+ hoEvent = true;
+ break;
+
+
+ case INTRA_L3_RR_HANDOVER_FAILURE:
+ currEvent = HAND_SRC_HO_FAIL;
+ PM_CCMeasurement.unsuccExternHDOsWithReconnectionPerMSC.increment();
+ hoEvent = true;
+ break;
+
+ default:
+ DBG_ERROR("CC Call Error: Unexpected (Msg Type = %d) from RR.\n",
+ rrInMsg->message_type);
+ currEvent = JCC_NULL_EVENT;
+
+ }
+
+ // For Channel States:
+ if (currEvent != JCC_NULL_EVENT)
+ {
+ // For Handover States:
+ if (hoEvent)
+ {
+ if (handoverSession != NULL)
+ {
+ int causeValue;
+
+ if (handoverSession == anchorHandoverSession)
+ {
+ causeValue = anchorHandoverSession->handleRRMsg(rrMsg, currEvent);
+ }
+ //ext-HO <xxu:06-08-01>
+ else if (handoverSession == targetHandoverSession)
+ {
+ causeValue = targetHandoverSession->handleRRMsg(rrMsg, currEvent);
+
+ } else if (handoverSession == targetHandoverSessionExtHo)
+ {
+ causeValue = targetHandoverSessionExtHo->handleRRMsg(rrMsg, currEvent);
+ } else
+ {
+ DBG_ERROR("{\nMNEThoERROR(cs::handleRRMsg): invalid handoverSession (hoSession=%p, anchSession=%p, trgSession=%p, trgSessionExtHo=%p)\n}\n",
+ handoverSession, anchorHandoverSession, targetHandoverSession, targetHandoverSessionExtHo);
+ causeValue = -1;
+ }
+
+ if (causeValue != 0)
+ {
+ DBG_LEAVE();
+ return(smHandleEvent(CC_RELEASE_CALL));
+ }
+ else
+ {
+ DBG_LEAVE();
+ return (0);
+ }
+
+ }
+
+ DBG_WARNING("CC Call Warning: Late Handover Msg? (RR Event=%d), (session id=%d).\n",
+ currEvent,
+ parent->callIndex);
+
+ DBG_LEAVE();
+ return(0);
+
+ }
+ else
+ {
+ // non-handover events
+ int causeValue;
+
+ TwoPartyCallLeg *whichLeg;
+
+ if (handoverSession == targetHandoverSession)
+ {
+ // handover on target side.
+ targetHandoverSession->sendRRMsgToAnchorCC(rrMsg);
+ DBG_LEAVE();
+ return(0);
+ }
+
+ switch (rrInMsg->primitive_type)
+ {
+ case 1:
+ whichLeg = callLeg1;
+ break;
+
+ case 2:
+ whichLeg = callLeg2;
+ break;
+
+ default:
+ DBG_ERROR("RR->CC ERROR: Unexpected (Call Leg Num=%d) from RR , (event=%d) (session id=%d)\n",
+ rrInMsg->primitive_type,
+ currEvent,
+ parent->callIndex);
+ DBG_LEAVE();
+ return(0);
+ }
+
+ if ((!(whichLeg->idle)) && (whichLeg->msSide != NULL))
+ {
+ if ((causeValue = whichLeg->msSide->handleRRMsg(rrMsg, currEvent)) != 0)
+ {
+ handleReleaseCallLeg(whichLeg);
+ DBG_LEAVE();
+ return(causeValue);
+ }
+ }
+ else
+ {
+ // late event
+ DBG_WARNING("RR->CC Warning: Unexpected/Late RR event for (call leg Num=%d), (event=%d) (session id=%d)\n",
+ rrInMsg->primitive_type,
+ currEvent,
+ parent->callIndex);
+ }
+ }
+ }
+ else
+ {
+ }
+
+ //Do Nothing
+ DBG_LEAVE();
+ return(0);
+}
+
+int
+CCSessionHandler::handleTimeoutMsg(IntraL3Msg_t *ccInMsg)
+{
+ DBG_FUNC("CCSessionHandler::handleTimeoutMsg", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ CallLeg *whichLeg;
+ // We already know that it is a timeout msg
+
+ switch (ccInMsg->entry_id)
+ {
+ case 0:
+ whichLeg = cissCallLeg;
+ break;
+
+ case 1:
+ whichLeg = callLeg1;
+ break;
+
+ case 2:
+ whichLeg = callLeg2;
+ break;
+
+ case 3:
+ whichLeg = NULL;
+ break;
+
+ case 4:
+ whichLeg = smsLeg1;
+ break;
+
+ case 5:
+ whichLeg = smsLeg2;
+ break;
+
+ case 6:
+ whichLeg = smsLeg3;
+ break;
+
+ case 7:
+ whichLeg = hoCallLeg;
+ break;
+
+ case 8:
+ whichLeg = h3CallLeg;
+ break;
+
+ default:
+ DBG_ERROR("CC Error: Invalid Timeout (call leg number=%d)\n",
+ ccInMsg->entry_id);
+ DBG_LEAVE();
+ return(0);
+ }
+
+ int causeValue;
+
+ if (whichLeg != NULL)
+ {
+ // Not Session related
+ if (whichLeg->idle == false)
+ {
+ if ((causeValue = whichLeg->handleTimeoutMsg(ccInMsg)) != 0)
+ {
+ handleReleaseCallLeg(whichLeg);
+ DBG_LEAVE();
+
+ return(causeValue);
+ }
+ else
+ {
+ DBG_LEAVE();
+ return(0);
+
+ }
+ }
+
+ // late event
+ DBG_WARNING("CC Warning: Unexpected/Late Timeout event for (call leg=%d), (session id=%d)\n",
+ ccInMsg->entry_id,
+ parent->callIndex);
+ }
+ else
+ {
+ if (handoverSession != NULL)
+ {
+ int causeValue = 0; //ext-HO <xxu:06-07-01>
+
+ if (handoverSession == anchorHandoverSession)
+ {
+ causeValue = anchorHandoverSession->handleTimeoutMsg(ccInMsg);
+ }
+ else if (handoverSession == targetHandoverSession)
+ {
+ causeValue = targetHandoverSession->handleTimeoutMsg(ccInMsg);
+
+ } //ext-HO <xxu:06-07-01>
+ else if (handoverSession == targetHandoverSessionExtHo)
+ {
+ causeValue = targetHandoverSessionExtHo->handleTimeoutMsg(ccInMsg);
+ } else
+ {
+ DBG_ERROR("CC Error: No handover session is linked to the fired session timer (callId=%d)\n",
+ parent->callIndex);
+ }
+
+ if (causeValue != 0)
+ {
+ DBG_LEAVE();
+ return(smHandleEvent(CC_RELEASE_CALL));
+ }
+ else
+ {
+ DBG_LEAVE();
+ return (0);
+ }
+ }
+ // Call Hold feature goes here
+ }
+
+ DBG_LEAVE();
+ return(0);
+}
+
+//ext-HO <xxu:05-16-01>
+int
+CCSessionHandler::handleHoaCcMsg (InterHoaVcMsg_t *ccInMsg)
+{
+ int causeValue = 0;
+
+ DBG_FUNC("CCSessionHandler::handleHoaCcMsg", CC_HO_LAYER);
+ DBG_ENTER();
+
+ if (handoverSession != NULL)
+ {
+ if (handoverSession == targetHandoverSessionExtHo)
+ {
+ causeValue = targetHandoverSessionExtHo->handleHoaCcMsg(ccInMsg);
+
+ } else if (handoverSession == anchorHandoverSession)
+ {
+ causeValue = anchorHandoverSession->handleHoaCcMsg(ccInMsg);
+ }
+ else
+ {
+ DBG_WARNING("{\nMNEThoWARNING(cs::handleHoaCcMsg): late ho msg from HOA (msgType=%d,callId=%d)\n}\n",
+ ccInMsg->msgType, parent->callIndex);
+ }
+
+ } else
+ {
+ DBG_WARNING("{\nMNEThoTRACE(cs::handleHoaCcMsg): late msg from HOA (msgType=%d,callId=%d,cause=%d)\n}\n",
+ ccInMsg->msgType, parent->callIndex);
+ }
+
+ if (causeValue != 0)
+ {
+ DBG_WARNING("{\nMNEThoWARNING(cs::handleHoaCcMsg):(cause=%d,msgType=%d,callId=%d)......\n}\n",
+ causeValue, ccInMsg->msgType, parent->callIndex);
+
+ cleanup();
+ //cleanup((T_CNI_RIL3_CAUSE_VALUE)causeValue,true);
+ }
+
+
+ DBG_LEAVE();
+
+ return (0);
+}
+
+int
+CCSessionHandler::handleVcCcMsg (InterVcMsg_t *vcCcInMsg)
+{
+ DBG_FUNC("CCSessionHandler::handleVcCcMsg", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ if (handoverSession != NULL)
+ {
+ int causeValue = 0;
+
+ if (handoverSession == anchorHandoverSession)
+ {
+ causeValue = anchorHandoverSession->handleVcCcMsg(vcCcInMsg);
+ }
+ //ext-HO <xxu:05-17-01> BEGIN
+ else if (handoverSession == targetHandoverSessionExtHo)
+ {
+ //This is only expected for post-handin scenario and this GP10 functions as anchor for the remote GP10 and
+ //as target for the PLMN anchor MSC.
+
+ DBG_TRACEei("{\nMNETeiTRACE(cs::handleVcCcMsg): recv a message from another GP (msgType=%d, callId=%d):\n",
+ vcCcInMsg->msgType, parent->callIndex);
+ DBG_TRACEei(" : origGP(IPAddr=%x, subId=%d) DestGP(IPAddr=%x,subId=%d)\n}\n",
+ vcCcInMsg->origVcAddress, vcCcInMsg->origSubId,
+ vcCcInMsg->destVcAddress, vcCcInMsg->destSubId );
+
+ causeValue = targetHandoverSessionExtHo->handleVcCcMsg(vcCcInMsg);
+
+ } //ext-HO <xxu:05-17-01> END
+ else
+ { // <Igal 1-6-00> Updated for handling PDUs forwarded between ViperCells after HO
+ if (vcCcInMsg->msgType == INTER_VC_CC_POST_HANDOVER_DATA_EVENT)
+ { // PDU forwarded from anchor side CM to target LAPDm via CM Session
+ sendL2Msg (&vcCcInMsg->msgData.postHoMobEventData.msEncodedMsg);
+ causeValue = 0;
+ }
+ else
+ causeValue = targetHandoverSession->handleVcCcMsg(vcCcInMsg);
+ }
+
+ if (causeValue != 0)
+ {
+ DBG_LEAVE();
+ return (smHandleEvent(CC_RELEASE_CALL));
+ }
+ else
+ {
+ DBG_LEAVE();
+ return (0);
+ }
+ }
+
+ DBG_WARNING ("CC Call Warning: Late Handover Msg from other ViperCell, (session id=%d).\n",
+ parent->callIndex);
+
+ DBG_LEAVE();
+ return (0);
+}
+
+
+int
+CCSessionHandler::handleVbCissMsg(CISSVblinkMsg_t &cissInMsg)
+{
+ DBG_FUNC("CCSessionHandler::handleVbCissMsg", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ if (!cissCallLeg->idle)
+ {
+ int causeValue;
+ if ((causeValue = cissCallLeg->handleVbMsg(cissInMsg)) != 0)
+ {
+ handleReleaseCallLeg(cissCallLeg);
+ DBG_LEAVE();
+ return(causeValue);
+ }
+ else
+ {
+ DBG_LEAVE();
+ return(0);
+ }
+ }
+
+ // late event
+ DBG_WARNING("MS->CC Warning: Unexpected/Late MS CISS event for (session id=%d)\n",
+ parent->callIndex);
+ DBG_LEAVE();
+ return(0);
+}
+
+//CH<xxu:11-22-99>
+int
+CCSessionHandler::handleMobHoldRetvReq(JCCEvent_t& event, TwoPartyCallLeg* leg)
+{
+ TwoPartyCallLeg *otherLeg;
+
+ DBG_FUNC("handleMobHoldRetvReq", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ //CDR <xxu:08-21-00> BEGIN
+ CCdrSSA chCdr;
+ if ( ludbGetSubscInfoExists(ludbIndex) && !isEmergencyCall && leg != NULL)
+ {
+ chCdr.setServedIMSI(ludbGetMobileIdPtr(ludbIndex));
+ chCdr.setServedMSISDN(ludbGetMSISDNPtr(ludbIndex));
+ chCdr.setCorrelatedEventRefNumber(leg->ccCdr.getEventRefNumber());
+ }
+ //CDR <xxu:08-21-00> END
+
+ //Check if HOLD service provisioned or not
+ if ( !ludbIsProvHOLD(this->ludbIndex) ||
+ isEmergencyCall ) // Override features for emergency call
+ {
+ //HOLD service is not provisioned, send back HOLD REJ msg
+ DBG_WARNING("Hold service not provisioned for (%d, %d)\n",
+ this->ludbIndex,event);
+ if (event==HC_EXTNL_HOLD_REQ)
+ {
+ event = HC_LOCAL_HOLD_REJ;
+ leg->msSide->chCause_ = CNI_RIL3_CAUSE_REQUESTED_SERVICE_NOT_SUBSCRIBED;
+
+ //CDR <xxu:08-21-00> BEGIN
+ if (!isEmergencyCall)
+ chCdr.generateRecord( CDR_SS_ACTION_INVOCATION,
+ (unsigned char)SUPP_SERV_HOLD,
+ CNI_RIL3_CAUSE_REQUESTED_SERVICE_NOT_SUBSCRIBED );
+ //CDR <xxu:08-21-00> END
+
+ DBG_LEAVE();
+ return (0);
+ }
+ //Retrieval of a held call is always allowed, go retrieve!
+ }
+
+ //HOLD service is provisioned and go ahead
+ if (leg==callLeg1) otherLeg=callLeg2;
+ else if (leg==callLeg2) otherLeg=callLeg1;
+ else
+ {
+ DBG_ERROR("Internal logic messed up: got invalid callLeg (%d,%d,%d)\n",
+ this->entryId, parent->callIndex, leg);
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ //Hold/Retv Ev
+ switch ( event )
+ {
+ case HC_EXTNL_HOLD_REQ:
+ //Check if only one call now
+ if (otherLeg->msSide == NULL)
+ {
+ //Only one call existing now
+ if (leg->msSide->callState_==HC_ST_ACTIVE &&
+ leg->msSide->chState_==CH_ST_IDLE )
+ {
+ //this one call is qualified for being held
+ event = HC_LOCAL_HOLD_ACT;
+
+ //CDR <xxu:08-21-00>
+ chCdr.generateRecord( CDR_SS_ACTION_INVOCATION,
+ (unsigned char)SUPP_SERV_HOLD,
+ CNI_RIL3_CAUSE_SUCCESS);
+ DBG_LEAVE();
+ return (0);
+ } else
+ {
+ //this one call is not qualified for being held
+ event = HC_LOCAL_HOLD_REJ;
+ leg->msSide->chCause_ = CNI_RIL3_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE;
+
+ //CDR <xxu:08-21-00>
+ chCdr.generateRecord( CDR_SS_ACTION_INVOCATION,
+ (unsigned char)SUPP_SERV_HOLD,
+ CNI_RIL3_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE);
+
+ DBG_LEAVE();
+ return (0);
+ }
+ }
+
+ //Sanitory check: make sure that CALL HOLD timer should not be running!
+ if (leg->msSide->hcTimer->timerSet_ || // Need to change the usage of timers
+ (otherLeg->msSide->callState_== HC_ST_ACTIVE &&
+ otherLeg->msSide->hcTimer->timerSet_)) // other services may also need it
+ {
+ //Received two HOLD REQ messages in a row, log and reject this 2nd!
+ DBG_WARNING("Received two HOLD REQs in a row, curSession(%d,%d)\n",
+ this->entryId,parent->callIndex);
+ event = HC_LOCAL_HOLD_REJ;
+ leg->msSide->chCause_ = CNI_RIL3_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE;
+
+ //CDR <xxu:08-21-00>
+ chCdr.generateRecord( CDR_SS_ACTION_INVOCATION,
+ (unsigned char)SUPP_SERV_HOLD,
+ CNI_RIL3_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE);
+
+ DBG_LEAVE();
+ return (0);
+ }
+
+ //No HOLD REQ is pending right now. Go ahead to handle it. First of all
+ //Check if this leg is staying in (active, idle), otherwise reject it.
+ if (leg->msSide->callState_ != HC_ST_ACTIVE ||
+ leg->msSide->chState_ != CH_ST_IDLE )
+ {
+ DBG_WARNING("Mobile tries HOLD a non (active,idle) call:(%d,%d)\n",
+ this->entryId, parent->callIndex);
+ event = HC_LOCAL_HOLD_REJ;
+ leg->msSide->chCause_ = CNI_RIL3_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE;
+
+ //CDR <xxu:08-22-00>
+ chCdr.generateRecord( CDR_SS_ACTION_INVOCATION,
+ (unsigned char)SUPP_SERV_HOLD,
+ CNI_RIL3_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE);
+ DBG_LEAVE();
+ return (0);
+ }
+
+ //Sanitory check: got two HolDReqs!
+ if (leg->msSide->hcTimer->timerSet_)
+ {
+ //Received two HOLD REQ messages in a row, log and reject this 2nd!
+ DBG_WARNING("Received two HOLD REQs in a row, curSession(%d,%d)\n",
+ this->entryId,parent->callIndex);
+ event = HC_LOCAL_HOLD_REJ;
+ leg->msSide->hcTimer->cancelTimer(); //doesn't make sense to keep it running!
+ leg->msSide->chCause_ = CNI_RIL3_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE;
+
+ //CDR <xxu:08-22-00>
+ chCdr.generateRecord( CDR_SS_ACTION_INVOCATION,
+ (unsigned char)SUPP_SERV_HOLD,
+ CNI_RIL3_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE);
+ DBG_LEAVE();
+ return (0);
+ }
+
+ //Current leg is qualified for HOLD,process in terms of two HOLD cases
+ if (otherLeg->msSide->callState_ == HC_ST_ACTIVE)
+ {
+ if (otherLeg->msSide->chState_ == CH_ST_HELD)
+ {
+ //SWAP case: handle HOLD part, start timer!
+ leg->msSide->hcTimer->setTimer(CALL_HOLD_RETV_TIMER);
+ event = HC_LOCAL_HOLD_REQ;
+
+ //CDR <xxu:08-22-00>
+ chCdr.generateRecord( CDR_SS_ACTION_INVOCATION,
+ (unsigned char)SUPP_SERV_HOLD,
+ CNI_RIL3_CAUSE_SUCCESS);
+ DBG_LEAVE();
+ return (0);
+ } else
+ {
+ //Kind of mess-up happened, reject and log!
+ DBG_WARNING("Mess-up occurs btw two legs in proc HOLD REQ\n");
+ event = HC_LOCAL_HOLD_REJ;
+ leg->msSide->chCause_ = CNI_RIL3_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE;
+
+ //CDR <xxu:08-22-00>
+ chCdr.generateRecord( CDR_SS_ACTION_INVOCATION,
+ (unsigned char)SUPP_SERV_HOLD,
+ CNI_RIL3_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE);
+ DBG_LEAVE();
+ return (0);
+ }
+ } else
+ {
+ //the other leg is not active, go ahead to HOLD the cur leg
+ event = HC_LOCAL_HOLD_ACT;
+
+ //CDR <xxu:08-22-00>
+ chCdr.generateRecord( CDR_SS_ACTION_INVOCATION,
+ (unsigned char)SUPP_SERV_HOLD,
+ CNI_RIL3_CAUSE_SUCCESS);
+ DBG_LEAVE();
+ return (0);
+ }
+
+ break;
+
+ case HC_EXTNL_RETV_REQ:
+ //Check if only one call now
+ if (otherLeg->msSide == NULL)
+ {
+ //Only one call existing now
+ if (leg->msSide->callState_==HC_ST_ACTIVE &&
+ leg->msSide->chState_==CH_ST_HELD )
+ {
+ //this one call is qualified for being retved
+ //CH<xxu:Mod 12-13-99>
+ //event = HC_LOCAL_RETV_ACT;
+ event = HC_LOCAL_RETV_REQ;
+ DBG_LEAVE();
+ return (0);
+ } else
+ {
+ //this one call is not qualified for being held
+ event = HC_LOCAL_RETV_REJ;
+ leg->msSide->chCause_ = CNI_RIL3_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE;
+ DBG_LEAVE();
+ return (0);
+ }
+ }
+
+ //If the leg is not on hold, log and reject this message. Sort of messed-up!
+ if (leg->msSide->callState_!=HC_ST_ACTIVE||leg->msSide->chState_!=CH_ST_HELD)
+ {
+ DBG_WARNING("RETRIEVE a non-(active, held) call (%d,%d), messed up!\n",
+ this->entryId, parent->callIndex);
+ event = HC_LOCAL_RETV_REJ;
+ leg->msSide->chCause_ = CNI_RIL3_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE;
+ DBG_LEAVE();
+ return (0);
+ }
+
+ //If the otherLeg is in (active, holdReq) and call hold is running, do swap!
+ if (otherLeg->msSide->callState_ == HC_ST_ACTIVE)
+ {
+ if (otherLeg->msSide->chState_ == CH_ST_HREQ)
+ {
+ //Do SWAP now: send the HREQ leg to HELD and pull back the HELD active!
+ otherLeg->msSide->hcTimer->cancelTimer();
+ otherLeg->msSide->handleHoldAct();
+ //CH<xxu:Mod 12-13-99>
+ //event = HC_LOCAL_RETV_ACT;
+ event = HC_LOCAL_RETV_REQ;
+
+ DBG_LEAVE();
+ return (0);
+ } else
+ {
+ //Kind of mess-up happened, reject and log!
+ DBG_WARNING("Mess-up occurs btw two legs in proc RETV REQ\n");
+ event = HC_LOCAL_RETV_REJ;
+ leg->msSide->chCause_ = CNI_RIL3_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE;
+ DBG_LEAVE();
+ return (0);
+ }
+ } else
+ {
+ //the other leg is not active, go ahead to RETV the cur leg
+ //CH<xxu:Mod 12-13-99>
+ //event = HC_LOCAL_RETV_ACT;
+ event = HC_LOCAL_RETV_REQ;
+ DBG_LEAVE();
+ return (0);
+ }
+
+ break;
+
+ default:
+ //Sanitory check, may be removed in the future
+ DBG_ERROR("Logic messed up! Got non HOLD/RETRIEVE event\n");
+ break;
+ }
+
+ event = CC_MESSAGE_PROCESSING_COMPLT;
+ DBG_LEAVE();
+ return (0);
+}
+
+int
+CCSessionHandler::handleMobMsg(T_CNI_RIL3MD_CCMM_MSG *msInMsg)
+// This function handles not only the MS PDUs but local DL management messages as well
+{
+ JCCEvent_t currEvent ;
+ CallLeg *whichLeg = NULL_PTR;
+ int retVal = 0 ;
+
+ T_CNI_RIL3_PROTOCOL_DISCRIMINATOR msgPd ;
+ T_CNI_LAPDM_L2L3PrimitiveType l2MsgType = msInMsg->primitive_type;
+
+ DBG_FUNC ("CCSessionHandler::handleMobMsg", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ if (l2MsgType == L23PT_DL_DATA_IND || l2MsgType == L23PT_DL_UDATA_IND)
+ {
+ if (handoverSession == targetHandoverSession)
+ { // handover on target side
+ targetHandoverSession->sendMSMsgToAnchorCC(msInMsg);
+ DBG_LEAVE();
+ return (0);
+ }
+
+ //ext-HO <xxu:05-31-01>
+ if (handoverSession == targetHandoverSessionExtHo)
+ {
+ targetHandoverSessionExtHo->sendMSMsgToAnchorCC(msInMsg);
+ DBG_LEAVE();
+ return (0);
+ }
+
+ msgPd = extractPd (&msInMsg->l3_data);
+
+ switch (msgPd)
+ {
+ case CNI_RIL3_PD_NON_CALL_RELATED_SS: // CISS message
+
+ if (msInMsg->l3_data.msgLength < 2)
+ { // Msg is too short. Discard it
+ retVal = 0;
+ }
+ else
+ {
+ whichLeg = cissCallLeg;
+ retVal = cissCallLeg->handleMsMsg (msInMsg);
+ }
+ break;
+
+ case CNI_RIL3_PD_SMS : // SMS message
+
+ if ((currEvent = ma->mapToSmsEvent(msInMsg)) != JCC_NULL_EVENT)
+ {
+ routeFromMsToSmsLeg (ma->msDecodedSmsMsg.header, (SmsLeg *&)whichLeg);
+
+ retVal = ((SmsLeg *)whichLeg)->handleMsMsg (ma->msDecodedSmsMsg, currEvent);
+ }
+ else
+ { // garbage Message received from MS will be discarded without reaction
+ retVal = 0;
+ }
+ break;
+
+ case CNI_RIL3_PD_CC : // CC message
+
+ currEvent = ma->mapToCcEvent (msInMsg);
+
+ if (routeFromMsToCallLeg (&ma->msDecodedMsg, (TwoPartyCallLeg *&)whichLeg))
+ {
+ //CH<xxu:11-22-99>: convert to the two events to internal events
+ if (currEvent==HC_EXTNL_HOLD_REQ || currEvent==HC_EXTNL_RETV_REQ)
+ {
+ //Got a Hold or Retv msg for 1 of 2 legs
+ handleMobHoldRetvReq(currEvent, (TwoPartyCallLeg *)whichLeg);
+ }
+
+ retVal = ((TwoPartyCallLeg *)whichLeg)->msSide->handleMobMsg (&ma->msDecodedMsg ,
+ ma->msDecodeResult,
+ ma->causeValue ,
+ currEvent );
+ }
+ else
+ {
+ // late event
+ // Warning messages printed in the routing method above.
+ }
+ break;
+
+ default:
+ DBG_ERROR ("CC Session error: Message with unknown PD = %d\n", msgPd);
+ retVal = 0;
+ break;
+ }
+ }
+ else if (msInMsg->sapi == SAPI_SMS &&
+ (l2MsgType == L23PT_DL_EST_CONF || l2MsgType == L23PT_DL_EST_IND) )
+ { // SAPI3 (SMS) connection management messages (setup)
+
+ // SAPI3 connection is created and stays valid until MM connection is released
+ setSapi3 (); // SAPI3 connection is established
+
+ flashSapi3Queue ();
+
+ // SAPI=3 connection is handled by the Session Handler and
+ // will not be forwarded to the Leg level
+ }
+ else if (msInMsg->sapi == SAPI_SMS &&
+ (l2MsgType == L23PT_DL_REL_IND || l2MsgType == L23PT_MDL_ERROR) )
+ {
+ // SAPI3 (SMS) connection management messages (release)
+ // Properly release all the active SMS connections
+
+ currEvent = SMS_EVENT_MD_ERROR_IND;
+
+ if (handoverSession == targetHandoverSession)
+ { // handover on target side
+ targetHandoverSession->sendMSMsgToAnchorCC(msInMsg);
+ DBG_LEAVE();
+ return (0);
+ }
+ else
+ {
+ resetSapi3 (); // Unconditional clear SAPI=3 flag and
+ sapi3Queue_.reset(); // clean the queue
+
+ // Notify SMS legs about connection failure
+ if (!smsLeg1->isIdle())
+ {
+ smsLeg1->handleL2Msg (*msInMsg, currEvent);
+ handleReleaseCallLeg (smsLeg1);
+ }
+
+ if (!smsLeg2->isIdle())
+ {
+ smsLeg2->handleL2Msg (*msInMsg, currEvent);
+ handleReleaseCallLeg (smsLeg2);
+ }
+
+ if (!smsLeg3->isIdle())
+ {
+ smsLeg3->handleL2Msg (*msInMsg, currEvent);
+ handleReleaseCallLeg (smsLeg3);
+ }
+ }
+
+ DBG_LEAVE ();
+ return (1); // have to do this because more than one SMS leg could be released
+ }
+ else
+ {
+ DBG_ERROR ("CM Session: Unexpected Msg received from MD (L2 type = %d)\n", l2MsgType);
+ retVal = 0;
+ }
+
+ if (retVal != 0)
+ {
+ handleReleaseCallLeg (whichLeg);
+ }
+
+ DBG_LEAVE ();
+ return (retVal);
+}
+
+
+int
+CCSessionHandler::smHandleEvent(JCCEvent_t currEvent)
+{
+ DBG_FUNC("CCSessionHandler::smHandleEvent", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ JCCEvent_t resultEvent;
+
+ switch (currEvent)
+ {
+ case CC_MM_CONNECTION_CNF:
+ resultEvent = handleMMEstCnf();
+ break;
+
+ case CC_MM_CONNECTION_REL:
+ resultEvent = handleMMRelInd();
+ break;
+
+ case CC_MM_CONNECTION_REJ:
+ case CC_RELEASE_CALL:
+ case JCC_NULL_EVENT:
+ resultEvent = currEvent;
+ break;
+
+ case CC_MM_CONNECTION_IND:
+ // Igal: Take care of the new SMS Serv Req during a call or
+ // concatinated MO SMS-PP
+ resultEvent = handleMMEstInd();
+ break;
+
+ default:
+ // Should not come here
+ resultEvent = JCC_NULL_EVENT;
+ DBG_ERROR("CC Session error : Invalid event in smHandleEvent(%d)\n", currEvent);
+
+ }
+
+ switch (resultEvent)
+ {
+ case CC_MM_CONNECTION_CNF:
+ case CC_MM_CONNECTION_REJ:
+ { /* Response to the MM connection Esteblish request.
+ Requesting Leg is stored and canbe accessed using getMmTermSetupLeg() */
+ int causeValue = 0;
+ CallLeg * tempLeg = getMmTermSetupLeg ();
+
+ if (tempLeg == smsLeg1 && !smsLeg1->isIdle())
+ { // This is SMS initiated setup and it's still active
+ if (causeValue = smsLeg1->handleMmMsg (*mmInMsg, resultEvent))
+ {
+ handleReleaseCallLeg (smsLeg1);
+ DBG_LEAVE();
+ return (causeValue);
+ }
+ // Allows another CM level MT SETUP when MM connection setup is complete
+ resetMmTermSetup ();
+ }
+ else if (tempLeg == callLeg1 && ((!(callLeg1->idle)) && (callLeg1->msSide != NULL_PTR)))
+ { // This is a response for MM-EST Req (Page Request) for MT voice or data call
+ if ((causeValue = callLeg1->msSide->handleMMMsg(mmInMsg, resultEvent)) != 0)
+ {
+ handleReleaseCallLeg (callLeg1);
+ DBG_LEAVE();
+ return (causeValue);
+ }
+ // Allows another CM level MT SETUP when MM connection setup is complete
+ resetMmTermSetup ();
+ }
+ else
+ { // late event
+ int legNum = (!tempLeg) ? (-1) : tempLeg->callLegNum;
+
+ DBG_WARNING ("MM->CC Warning: Unexpected/Late MM Est Response event for leg %d,\
+ (event=%d) (session id=%d)\n",
+ legNum, resultEvent, parent->callIndex);
+ }
+ }
+ break;
+
+ case CC_MM_CONNECTION_IND:
+ {
+ if (isMmConnected()) // Avoiding possible race condition
+ {
+ if (smsLeg2->setupOrig() == false) // smsLeg2 is designated for MO SMS support
+ smsLeg2->cleanup((T_CNI_RIL3_CAUSE_VALUE)smsLeg2->getRemRelCause());
+ }
+ else
+ DBG_WARNING ("Unexpected late MM-EST Ind for SAPI=3 received by the CM session %d.\n",
+ parent->callIndex);
+ }
+ break;
+
+ case JCC_NULL_EVENT:
+ case CC_MESSAGE_PROCESSING_COMPLT:
+ //Do Nothing
+ break;
+
+ case CC_RELEASE_CALL:
+ cleanup(releaseCause, TRUE);
+ DBG_LEAVE();
+ return(-1);
+ break;
+
+ default:
+ // Should not come here
+ DBG_ERROR("CC Session error : Invalid event in smHandleEvent(%d)\n", currEvent);
+
+ }
+
+ DBG_LEAVE();
+ return (0);
+}
+
+
+JCCEvent_t
+CCSessionHandler::handleMMRelInd(void)
+{
+ DBG_FUNC("CCSessionHandler::handleMMRelInd", CC_SESSION_LAYER);
+ DBG_ENTER();
+ JCCEvent_t currEvent;
+
+ //CAUSE<xxu:03-21-00>
+ //releaseCause = CNI_RIL3_CAUSE_TEMPORARY_FAILURE;
+ releaseCause = mmInMsg->cause;
+
+ DBG_TRACE("CC <- MM: MmRelInd contained release cause %d\n", mmInMsg->cause);
+
+ // check for handover
+ if (handoverSession != NULL)
+ {
+ if (handoverSession == anchorHandoverSession)
+ {
+ currEvent = anchorHandoverSession->handleInternalEvent(CC_MM_CONNECTION_REL);
+ }
+ else
+ {
+ currEvent = targetHandoverSession->handleInternalEvent(CC_MM_CONNECTION_REL);
+ }
+
+ DBG_LEAVE();
+ return(currEvent);
+ }
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+}
+
+
+JCCEvent_t
+CCSessionHandler::handleMMEstCnf(void)
+{
+ DBG_FUNC("CCSessionHandler::handleMMEstCnf", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ // MM uses the msg Q to echo back to the correct task.
+
+ if ((mmInMsg->l3_data.pageRsp.mobileId == ludbGetMobileId(ludbIndex)) && // for this mobile
+ (entryId == (T_CNI_IRT_ID) JCC_UNDEFINED)) // we are currently waiting for a confirm
+ {
+ // continue
+ }
+ else
+ {
+ // handle late page response from MM for a different Mobile.
+
+ IntraL3Msg_t mmOutMsg;
+
+ // Send internal MM msg for release
+ sendMM(INTRA_L3_MM_REL_REQ, INTRA_L3_NULL_MSG, mmInMsg->entry_id, &mmOutMsg);
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+
+ // !< Need to generate a transaction identifer to use
+ // For now, always use 0 - No Supplementary Services
+
+ T_CNI_L3_ID newId ;
+ T_CNI_IRT_ID newEntryId = mmInMsg->entry_id;
+ bool retVal ;
+
+ newId.msgq_id = parent->msgQId;
+ newId.sub_id = 0; // No sub id needed here
+
+ if (setIrt (newEntryId, newId) == false)
+ {
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ // Setup the entry id, oid, and sapi
+ entryId = mmInMsg->entry_id;
+
+ // Store Mobile Classmark Info <chenj:07-24-01>
+ classmark2Info = mmInMsg->l3_data.pageRsp.classmark2;
+
+ // GET OID AND SAPI
+ T_CNI_RIL3_IRT_ENTRY irtEntry;
+ irtEntry.entry_id = mmInMsg->entry_id;
+
+ if ( (CNI_RIL3_IRT_Get_Entry_by_Entry_ID(&irtEntry))
+ == false )
+ {
+ DBG_ERROR("CC Call Error : IRT Table Problem for (entry Id = %d)\n",
+ mmInMsg->entry_id);
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+ oid = irtEntry.lapdm_oid;
+ // sapi = SAPI_MAIN;
+
+ DBG_LEAVE();
+ return (CC_MM_CONNECTION_CNF);
+}
+
+
+JCCEvent_t CCSessionHandler::handleMMEstInd (void)
+{
+ JCCEvent_t event ;
+ bool result;
+ T_CNI_RIL3_CM_SERVICE_TYPE cmServType =
+ mmInMsg->l3_data.servReq.cmServiceType.serviceType;
+
+ DBG_FUNC("CCSessionHandler::handleMMEstInd", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ if (cmServType == CNI_RIL3_CM_SERVICE_TYPE_SHORT_MESSAGE_SERVICE)
+ {
+ event = CC_MM_CONNECTION_IND;
+
+ DBG_TRACE ("CC Session: Secondary MO SMS Serv. Request received.\n");
+ }
+ else
+ { // This CM Service Type is not expected
+ // Previously was blocked by the MM
+ DBG_ERROR ("CC Session Error: Unexpected MM_EST_IND, service type %d - releasing call!\n",
+ cmServType);
+ // PR CSCdv12866 <chenj:08-21-01>
+ // A 2nd MM establishment is sent to CC for the same mobile. This is an
+ // error condition and the MM/RR states need to be reset.
+ event = CC_RELEASE_CALL;
+ }
+
+ DBG_LEAVE();
+ return (event);
+}
+
+
+JCCEvent_t
+h323MapToEvent(IntraL3Msg_t* h323InMsg,
+ CCRemMsgData_t &remMsgData)
+{
+
+ DBG_FUNC("CCSessionHandler::h323MapToEvent", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ JCCEvent_t remoteEvent;
+
+ // Copy the incoming VOIP message to the remote message data structure
+ remMsgData = h323InMsg->l3_data.voipMsg;
+
+ switch (h323InMsg->message_type)
+ {
+ //<xxu:03-22-01> Handle Progress Message
+ case INTRA_L3_CC_Q931_PROGRESS:
+ remoteEvent = HC_REMOTE_CALL_PROGRESS_1;
+ break;
+
+ //BCT <xxu:09-21-00>
+ case INTRA_L3_CC_BCT_UPDATE_HANDLES:
+ remoteEvent = HC_REMOTE_BCT_UPDATE_HANDLES;
+ break;
+
+ //BCT <xxu:07-13-00> BEGIN
+ case INTRA_L3_CC_H450_BCT_STATUS:
+ remoteEvent = OHC_REMOTE_BCT_STATUS;
+ break;
+ //BCT <xxu:07-13-00> END
+
+ case INTRA_L3_CC_Q931_SETUP:
+ remoteEvent = THC_REMOTE_TERM_ADDRESS;
+ remMsgData.callOffering = h323InMsg->l3_data.setup.callOffering;
+ break;
+
+ case INTRA_L3_CC_Q931_CALL_PROC:
+ remoteEvent = HC_REMOTE_CALL_PROGRESS;
+ break;
+
+ case INTRA_L3_CC_Q931_ALERTING:
+ remoteEvent = OHC_REMOTE_ALERTING;
+ break;
+
+ case INTRA_L3_CC_Q931_CONNECT:
+ remoteEvent = OHC_REMOTE_ANSWER;
+ break;
+
+ case INTRA_L3_CC_Q931_DISCONNECT:
+ remoteEvent = HC_REMOTE_DISCONNECT_REQ;
+ break;
+
+ case INTRA_L3_CC_H245_CHANN_READY:
+ remoteEvent = HC_REMOTE_CONNECTION_CONTROL;
+ break;
+
+ case INTRA_L3_CC_H245_CHANN_SELECT:
+ remoteEvent = HC_REMOTE_CHANN_SELECT;
+ break;
+
+ case INTRA_L3_CC_RAS_IP_ADDRESS_RESPONSE:
+ remoteEvent = HC_VB_GET_VC_ADDRESS_RSP;
+ break;
+
+ //BCT <xxu:08-11-00> BEGIN
+ case INTRA_L3_CC_RAS_BCT_NUMBER_RESPONSE:
+ remoteEvent = HC_VB_GET_BCT_NUMBER_RSP;
+ break;
+ //BCT <xxu:08-11-00> END
+
+ case INTRA_L3_CC_VC_UPDATE_INFO:
+ // Check ViperCell Status
+ if (h323InMsg->l3_data.statusVCMsg.status == VC_STATUS_DOWN)
+ remoteEvent = EXT_VC_FAIL;
+ else
+ {
+ remoteEvent = JCC_NULL_EVENT;
+
+ DBG_ERROR ("CC Session Error: VOIP ViperCell update with unknown status %d.\n",
+ h323InMsg->l3_data.statusVCMsg.status);
+ }
+ break;
+
+ case INTRA_L3_SMS_MESSAGE:
+ { // SMS-PP related message
+ switch (h323InMsg->l3_data.smsVbMsg.hdr.msgType)
+ {
+ case MNSMS_EST_Req :
+ remoteEvent = SMS_EVENT_MNSMS_EST_REQ ;
+ break;
+
+ case MNSMS_DATA_Req :
+ remoteEvent = SMS_EVENT_MNSMS_DATA_REQ ;
+ break;
+
+ case MNSMS_ABORT_Req:
+ remoteEvent = SMS_EVENT_MNSMS_ABORT_REQ;
+ break;
+
+ case MNSMS_REL_Req :
+ remoteEvent = SMS_EVENT_MNSMS_REL_REQ ;
+ break;
+
+ default:
+ DBG_ERROR ("CM SESSION : Invalid SMS message (type = %d) from VOIP.\n",
+ h323InMsg->l3_data.smsVbMsg.hdr.msgType);
+ remoteEvent = SMS_EVENT_PROTOCOL_ERROR ;
+ break;
+ }
+ }
+ break;
+
+ default:
+ DBG_ERROR("CC Call Error: Unexpected (Msg Type = %d) from VOIP.\n",
+ h323InMsg->message_type);
+ remoteEvent = JCC_NULL_EVENT;
+
+ }
+
+ DBG_LEAVE();
+ return (remoteEvent);
+}
+
+int
+CCSessionHandler::handleH323Msg(IntraL3Msg_t* h323InMsg)
+{
+ DBG_FUNC("CCSessionHandler::handleH323Msg", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ JCCEvent_t remoteEvent ;
+ CCRemMsgData_t remMsgData ;
+ CallLeg *leg ;
+ bool needResponse = true;
+ int causeValue = 0 ;
+
+ remoteEvent = h323MapToEvent (h323InMsg, remMsgData);
+
+ switch (remoteEvent)
+ {
+ //BCT <xxu: 08-11-00> BEGIN
+ case HC_VB_GET_BCT_NUMBER_RSP:
+ if (h323InMsg->l3_data.bctNumberResponse.rejectCause)
+ {
+ //Release BCT leg but keep the other
+ if (bctLeg_ != NULL && bctInvoke_ && bctLeg_->msSide != NULL)
+ {
+ //CDR <xxu:08-22-00> BEGIN
+ if ( ludbGetSubscInfoExists(ludbIndex) && bctMainLeg_ != NULL )
+ {
+ CCdrSSA bctCdr;
+ bctCdr.setServedIMSI(ludbGetMobileIdPtr(ludbIndex));
+ bctCdr.setServedMSISDN(ludbGetMSISDNPtr(ludbIndex));
+ bctCdr.setCorrelatedEventRefNumber(bctMainLeg_->ccCdr.getEventRefNumber());
+ bctCdr.generateRecord( CDR_SS_ACTION_INVOCATION, SUPP_SERV_ECT,
+ (T_CNI_RIL3_CAUSE_VALUE)remMsgData.basicCallInMsg.ReasonCode);
+ }
+
+ CCRemMsgData_t remMsgData;
+ remMsgData.basicCallInMsg.ReasonCode = h323InMsg->l3_data.bctNumberResponse.rejectCause;
+ bctLeg_->msSide->handleRemoteEvent(h323InMsg, HC_VB_GET_BCT_NUMBER_RSP, remMsgData);
+
+ }
+
+ } else
+ {
+ //Continue current BCT process
+ if (bctLeg_->msSide != NULL)
+ bctLeg_->msSide->hcTimer->cancelTimer();
+
+ DBG_TRACE("VBLink->CC Log(bct): Bct Num Rsp(reqSeqNo %d, rejCause %d) bctNo(%d,%d,%d,%d,%d)\n",
+ h323InMsg->l3_data.bctNumberResponse.reqSeqNumber,
+ h323InMsg->l3_data.bctNumberResponse.rejectCause,
+ h323InMsg->l3_data.bctNumberResponse.cpn.digits[0],
+ h323InMsg->l3_data.bctNumberResponse.cpn.digits[1],
+ h323InMsg->l3_data.bctNumberResponse.cpn.digits[2],
+ h323InMsg->l3_data.bctNumberResponse.cpn.digits[3],
+ h323InMsg->l3_data.bctNumberResponse.cpn.digits[4] );
+
+ if (bctMainLeg_ != NULL && bctLeg_ != NULL )
+ {
+ //Release the bct leg only
+ CCRemMsgData_t remMsgData;
+ remMsgData.basicCallInMsg.ReasonCode = CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING;
+ bctLeg_->msSide->handleRemoteEvent(h323InMsg, HC_VB_GET_BCT_NUMBER_RSP, remMsgData);
+
+ XltCalledPartyNumber = h323InMsg->l3_data.bctNumberResponse.cpn;
+ CCRemMsgData_t bctMsgData;
+ bctMsgData.callTransfer.CalledPartyNumber = h323InMsg->l3_data.bctNumberResponse.cpn;
+ bctMsgData.callTransfer.CallingPartyNumber = CallingPartyNumber;
+
+ sendH323Msg(bctMainLeg_, OHC_REMOTE_BCT_INVOKE, bctMsgData);
+ } else
+ {
+ DBG_TRACE("VBLink->CC Log(bct): BCT not going any more when received BCT Num Rsp\n");
+ }
+ }
+ break;
+ //BCT <xxu: 08-11-00> END
+
+ case HC_VB_GET_VC_ADDRESS_RSP:
+ {
+ if (handoverSession == anchorHandoverSession)
+ causeValue = anchorHandoverSession->handleVbCcMsg(h323InMsg);
+ else
+ causeValue = targetHandoverSessionExtHo->handleVbCcMsg(h323InMsg);
+ }
+ break;
+
+ case EXT_VC_FAIL:
+ {
+ DBG_TRACE("CC Session: Received external ViperCell failure notification.\n");
+
+ // Cancel handover in process to the failed cell but keep the call.
+ // Always disconnect calls already migrated to the failed remote cell
+ cleanup (CNI_RIL3_CAUSE_RESOURCES_UNAVAILABLE_UNSPECIFIED, FALSE);
+ causeValue = 0;
+ }
+ break;
+
+ case SMS_EVENT_MNSMS_REL_REQ :
+ case SMS_EVENT_MNSMS_ABORT_REQ:
+ {
+ needResponse = false;
+ }
+ case SMS_EVENT_MNSMS_EST_REQ :
+ case SMS_EVENT_MNSMS_DATA_REQ :
+ {
+ SmsLeg * whichLeg;
+
+ DBG_TRACE ("CM Session: SMS message (event = %d) received from VBLink.\n",
+ remoteEvent);
+ if (routeFromVoipToSmsLeg (h323InMsg, whichLeg))
+ {
+ causeValue = whichLeg->handleVbMsg (h323InMsg->l3_data.smsVbMsg, remoteEvent);
+ leg = whichLeg;
+ }
+ else
+ {
+ DBG_WARNING ("CM Session: Unable to forward a late message (event = %d) to SMS leg\n",
+ remoteEvent);
+ if (needResponse) // Respond with MNSMS-ERROR Ind. Otherwise, discard it
+ smsSendVbLinkRelease (ludbIndex, h323InMsg->l3_data.smsVbMsg.hdr.refNum);
+
+ causeValue = 0; // No need to release a leg
+ }
+ }
+ break;
+
+ case SMS_EVENT_PROTOCOL_ERROR :
+ { // Invalid SMS message type. Discard it
+ // Should never reach this point (the check is implemented in the unpacking method.
+ DBG_ERROR ("CM Session: Discard invalid SMS message received from VOIP.\n");
+ causeValue = 0;
+ }
+ break;
+
+ default:
+ {
+ //if (remoteEvent == THC_REMOTE_TERM_ADDRESS)
+ //{
+ TwoPartyCallLeg *whichLeg ;
+
+ if (routeFromVoipToCallLeg (h323InMsg, whichLeg))
+ {
+ //ProgressIE
+
+
+ //CDR <xxu:08-23-00>
+ whichLeg->ccCdr.setQ931Crv(h323InMsg->H323CRV);
+
+ //BCT <xxu: 07-13-00> BEGIN
+ if (bctInvoke_)
+ {
+ //Internal messup, debugging asap!
+ if (bctLeg_ == whichLeg) {
+ DBG_ERROR("H323->CC Warning: event(%d) VOIP msg(%d) for bctLeg (%p) (sessId=%d)\n",
+ remoteEvent, h323InMsg->message_type, bctLeg_, parent->callIndex);
+ return(0);
+ }
+
+ remoteEvent = HC_REMOTE_DISCONNECT_REQ;
+ switch(h323InMsg->message_type)
+ {
+ case INTRA_L3_CC_H450_BCT_STATUS:
+ {
+ //CDR <xxu:08-22-00> BEGIN
+ CCdrSSA bctCdr;
+ if (ludbGetSubscInfoExists(ludbIndex))
+ {
+ bctCdr.setServedIMSI(ludbGetMobileIdPtr(ludbIndex));
+ bctCdr.setServedMSISDN(ludbGetMSISDNPtr(ludbIndex));
+ }
+ bctCdr.setCorrelatedEventRefNumber(bctMainLeg_->ccCdr.getEventRefNumber());
+ //CDR <xxu:08-22-00> END
+
+ if (!remMsgData.basicCallInMsg.ReasonCode)
+ {
+ //CDR <xxu:08-22-00>
+ bctCdr.generateRecord( CDR_SS_ACTION_INVOCATION, SUPP_SERV_ECT,
+ CNI_RIL3_CAUSE_SUCCESS );
+
+ //BCT success, disconnect bct call first if not released yet
+ remMsgData.basicCallInMsg.ReasonCode =
+ (unsigned char) CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING;
+ if ( (bctLeg_ != NULL) && (bctLeg_->msSide != NULL) &&
+ (bctLeg_->msSide->callState_ == OHC_ST_OFFERING_CALL) )
+ bctLeg_->msSide->handleRemoteEvent(h323InMsg,remoteEvent, remMsgData);
+
+ //BCT success, disconnect the original call if it is active
+ remMsgData.basicCallInMsg.ReasonCode =
+ (unsigned char) CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING;
+ if (whichLeg->msSide->callState_ == HC_ST_ACTIVE)
+ whichLeg->msSide->handleRemoteEvent(h323InMsg,remoteEvent, remMsgData);
+
+ } else
+ {
+ //CDR <xxu:08-22-00>
+ bctCdr.generateRecord( CDR_SS_ACTION_INVOCATION, SUPP_SERV_ECT,
+ (T_CNI_RIL3_CAUSE_VALUE)remMsgData.basicCallInMsg.ReasonCode );
+
+ //BCT failed, disconnect the bct call only
+ remMsgData.basicCallInMsg.ReasonCode =
+ (unsigned char) CNI_RIL3_CAUSE_NORMAL_UNSPECIFIED;
+ if ( (bctLeg_ != NULL) && (bctLeg_->msSide != NULL) &&
+ (bctLeg_->msSide->callState_ == OHC_ST_OFFERING_CALL) )
+ bctLeg_->msSide->handleRemoteEvent(h323InMsg,remoteEvent, remMsgData);
+ }
+ }
+ break;
+
+ //Clean itself if senseing two side doing BCT at the same time
+ case INTRA_L3_CC_BCT_UPDATE_HANDLES:
+ case INTRA_L3_CC_Q931_DISCONNECT:
+ //BCT does not make any sense, disconnect first call
+ if ( (bctLeg_ != NULL ) && (bctLeg_->msSide != NULL) &&
+ (bctLeg_->msSide->callState_ == OHC_ST_OFFERING_CALL) )
+ bctLeg_->msSide->handleRemoteEvent(h323InMsg,remoteEvent, remMsgData);
+
+ //BCT does not make any sense, disconnect second call
+ if ( (whichLeg->msSide->callState_ == HC_ST_ACTIVE) )
+ whichLeg->msSide->handleRemoteEvent(h323InMsg,remoteEvent, remMsgData);
+
+ break;
+
+ default:
+ //Wrong landing from VoIP, ignore this message
+ DBG_WARNING ("H323->CC Warning: Unexpected VOIP event for (session id=%d) (ev = %d)\n",
+ parent->callIndex, h323InMsg->message_type);
+ break;
+ }
+ return (0);
+ }
+
+ //BCT <xxu: 07-13-00> END
+
+ if (whichLeg->msSide != NULL)
+ {
+ causeValue = whichLeg->msSide->handleRemoteEvent(h323InMsg,remoteEvent, remMsgData);
+ leg = whichLeg;
+ }
+ }
+ else
+ {
+ // late event
+ DBG_WARNING ("H323->CC: Unexpected/Late msg(%d) h323CallHandle(%d) sessionId(%d)\n",
+ h323InMsg->message_type,
+ h323InMsg->call_handle,
+ parent->callIndex);
+
+ //BCT <xxu:07-13-00> BEGIN
+ causeValue = 0;
+ //BCT <xxu:07-13-00> END
+
+ }
+ }
+ }
+
+ if (causeValue)
+ {
+ handleReleaseCallLeg (leg);
+ }
+
+ DBG_LEAVE();
+ return (causeValue);
+}
+
+
+//HO<xxu:01-31-00> extend to handle H3
+void
+CCSessionHandler::sendRRMsg(IntraL3PrimitiveType_t primType,
+ IntraL3MsgType_t msgType,
+ IntraL3Msg_t *rrOutMsg)
+{
+ DBG_FUNC("CCSessionHandler::sendRRMsg", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ // if handover is in progress, then we need to send it to the target vipercell.
+ if (handoverSession == anchorHandoverSession)
+ {
+ rrOutMsg->primitive_type = primType;
+ rrOutMsg->message_type = msgType;
+
+ if (( anchorHandoverSession->hoState_ == HAND_ST_ANCH_RCV_HO_REQ_ACK) ||
+ ( anchorHandoverSession->hoState_ == HAND_ST_ANCH_SND_HB_REQ_ACK) ||
+ ( anchorHandoverSession->hoState_ == HAND_ST_ANCH_RCV_H3_REQ_ACK) ||
+
+ // ext-HO <chenj:06-12-01>
+ // JOE: need to add handback and h3 states for external handovers
+ ( anchorHandoverSession->hoState_ == HAND_ST_ANCH_RCV_EHO_REQ_ACK) )
+ {
+ // Handover Command is sent. Queue messages
+ anchorHandoverSession->addToRRQueue(rrOutMsg);
+ DBG_LEAVE();
+ return;
+ }
+ else if(anchorHandoverSession->hoState_ == HAND_ST_ANCH_HO_COMPLT)
+ {
+ // handover on anchor side.
+ anchorHandoverSession->sendRRMsgToTargetCC(rrOutMsg);
+ DBG_LEAVE();
+ return;
+ }
+ // ext-HO <chenj:06-12-01>
+ else if(anchorHandoverSession->hoState_ == HAND_ST_ANCH_EHO_COMPLT)
+ {
+ // handover on anchor side.
+ // send message to target PLMN using POST HANDOVER MOB EVENT MAP message
+ anchorHandoverSession->sendRRMsgToTargetPLMN (rrOutMsg);
+ }
+ else
+ {
+ DBG_TRACE("sendRRMsg ERROR: incorrect hoState_(%d)\n",
+ anchorHandoverSession->hoState_);
+ }
+ }
+
+ sendRR (primType, msgType, entryId, rrOutMsg);
+ DBG_LEAVE();
+}
+
+
+void CCSessionHandler::sendMMMsg (IntraL3Msg_t *mmOutMsg)
+{
+ /* Forward MM messages between target and anchor CM */
+
+ DBG_FUNC("CCSessionHandler::sendMMMsg", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ if (handoverSession == targetHandoverSession)
+ {
+ handoverSession->sendMMMsgToRemoteCC (mmOutMsg);
+ }
+
+ else if (handoverSession == anchorHandoverSession)
+ {
+ if ((anchorHandoverSession->hoState_ == HAND_ST_ANCH_RCV_HO_REQ_ACK) ||
+ (anchorHandoverSession->hoState_ == HAND_ST_ANCH_SND_HB_REQ_ACK) ||
+ (anchorHandoverSession->hoState_ == HAND_ST_ANCH_RCV_H3_REQ_ACK) ||
+
+ // ext-HO <chenj:06-12-01>
+ // JOE: need to add handback and h3 states for external handovers
+ ( anchorHandoverSession->hoState_ == HAND_ST_ANCH_RCV_EHO_REQ_ACK) )
+ {
+ // Handover Command is sent. Queue messages
+ handoverSession->mmQueue_.add (mmOutMsg);
+ }
+ else if(anchorHandoverSession->hoState_ == HAND_ST_ANCH_HO_COMPLT)
+ {
+ // handover on anchor side.
+ handoverSession->sendMMMsgToRemoteCC (mmOutMsg);
+ }
+ // ext-HO <chenj:06-12-01>
+ else if(anchorHandoverSession->hoState_ == HAND_ST_ANCH_EHO_COMPLT)
+ {
+ // handover on anchor side.
+ // send message to target PLMN using POST HANDOVER MOB EVENT MAP message
+ anchorHandoverSession->sendMMMsgToRemotePLMN (mmOutMsg);
+ }
+ else
+ {
+ DBG_TRACE("sendMMMsg ERROR: incorrect hoState_(%d)\n",
+ anchorHandoverSession->hoState_);
+ }
+ }
+
+ else
+ {
+ DBG_ERROR ("CM Session: Request to send MM message to non-existing remote CC.\n");
+ }
+
+ DBG_LEAVE();
+}
+
+
+void
+CCSessionHandler::sendDLMsg (L3L2MsgType_t msgType = L3L2_DL_EST_REQ,
+ T_CNI_LAPDM_SAPI sapi = SAPI_SMS )
+{ // currently handling only DL-EST Req (SAPI3) from SMS
+
+ DBG_FUNC ("CCSessionHandler::sendDLMsg", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ T_CNI_LAPDM_OID msgOid = rm_GetOid (entryId, sapi);
+
+ if (msgType != L3L2_DL_EST_REQ || sapi != SAPI_SMS)
+ {
+ DBG_ERROR ("CM session error: Request to send unknown msg (type %d, SAPI %d) to LAPDm\n",
+ msgType, sapi);
+ }
+ else
+ {
+ // if handover is in progress, then we need to send it to the target vipercell.
+ if (handoverSession == anchorHandoverSession)
+ {
+ if ((anchorHandoverSession->hoState_ == HAND_ST_ANCH_RCV_HO_REQ_ACK) ||
+ (anchorHandoverSession->hoState_ == HAND_ST_ANCH_SND_HB_REQ_ACK) ||
+ (anchorHandoverSession->hoState_ == HAND_ST_ANCH_RCV_H3_REQ_ACK) )
+ {
+ /* Handover Command is sent. Not allowed to setup SAPI=3 connection.
+ IT will be set on the new cell */
+ DBG_WARNING (" Session Manager: Late request for SAPI=3 establishment is ignored.\n Handover is in process.\n");
+ }
+ else if(anchorHandoverSession->hoState_ >= HAND_ST_ANCH_HO_COMPLT)
+ {
+ // handover on anchor side.
+ DBG_ERROR (" Session Manager: Unexpected request for SAPI=3 establishment is ignored.\n Handover is completed.\n");
+ }
+ else
+ CNI_LAPDM_Dl_Establish_Request (msgOid, sapi, EM_NORMAL, NULL_PTR);
+ }
+ else
+ CNI_LAPDM_Dl_Establish_Request (msgOid, sapi, EM_NORMAL, NULL_PTR);
+ }
+
+ DBG_LEAVE();
+ return ;
+}
+
+
+//HO<xxu:01-31-00> extend to handle H3
+void
+CCSessionHandler::sendL2Msg (T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ DBG_FUNC ("CCSessionHandler::sendL2Msg", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ // if handover is in progress, then we need to send it to the target vipercell.
+ if (handoverSession == anchorHandoverSession)
+ {
+ if ( ( anchorHandoverSession->hoState_ == HAND_ST_ANCH_RCV_HO_REQ_ACK) ||
+ ( anchorHandoverSession->hoState_ == HAND_ST_ANCH_SND_HB_REQ_ACK) ||
+ ( anchorHandoverSession->hoState_ == HAND_ST_ANCH_RCV_H3_REQ_ACK) ||
+
+ // ext-HO <chenj:06-12-01>
+ // JOE: need to add handback and h3 states for external handovers
+ ( anchorHandoverSession->hoState_ == HAND_ST_ANCH_RCV_EHO_REQ_ACK) )
+ {
+ // Handover Command is sent. Queue messages
+ anchorHandoverSession->addToDownlinkQueue(msEncodedMsg);
+ }
+ else if ((anchorHandoverSession->hoState_ >= HAND_ST_ANCH_HO_COMPLT) &&
+ (anchorHandoverSession->hoState_ <= HAND_ST_ANCH_RCV_H3_REQ_ACK) )
+ {
+ // handover on anchor side.
+ anchorHandoverSession->sendL2MsgToTargetCC (msEncodedMsg);
+ }
+ // ext-HO <chenj:06-12-01>
+ else if ( (anchorHandoverSession->hoState_ >= HAND_ST_ANCH_RCV_EHO_HB_REQ) &&
+ (anchorHandoverSession->hoState_ <= HAND_ST_ANCH_EHO_COMPLT) )
+ {
+ // handover on anchor side.
+ // send message to target PLMN using POST HANDOVER MOB EVENT MAP message
+ anchorHandoverSession->sendL2MsgToTargetPLMN (msEncodedMsg);
+ }
+ else
+ { // send PDU or if SAPI=3 is not ready establish it and queue message
+ forwardPdu (msEncodedMsg);
+ }
+ }
+ else
+ { // send PDU or if SAPI=3 is not ready establish it and queue message
+ forwardPdu (msEncodedMsg);
+ }
+
+ DBG_LEAVE();
+}
+
+
+bool CCSessionHandler::forwardPdu (T_CNI_LAPDM_L3MessageUnit *msEncodedMsg)
+{
+ DBG_FUNC ("CCSessionHandler::forwardPdu", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ bool retVal = true;
+
+ T_CNI_RIL3_PROTOCOL_DISCRIMINATOR msgPd = extractPd (msEncodedMsg);
+
+ T_CNI_LAPDM_SAPI sapi = (msgPd == CNI_RIL3_PD_SMS) ? SAPI_SMS : SAPI_MAIN;
+
+ // Retrieve oid for the channel according to SAPI from RR
+ T_CNI_LAPDM_OID msgOid;
+
+ if (sapi == SAPI_MAIN || getSapi3Status())
+ { // SAPI=0 message or SAPI=3 connection is already established
+ if ((msgOid = rm_GetOid (entryId, sapi)) == CNI_LAPDM_NULL_OID)
+ {
+ DBG_ERROR ("CM Session: Invalid OID received from RM (entryId = %d, sapi = %d)\n",
+ entryId, sapi);
+ retVal = false;
+ }
+
+ CNI_LAPDM_Dl_Data_Request (msgOid, sapi, msEncodedMsg);
+
+ PostL3SendMsLog (msgOid, sapi, msEncodedMsg);
+ }
+ else
+ {
+ // Establish SAPI=3 before sending SMS messages to LAPDm
+ sendDLMsg (L3L2_DL_EST_REQ, SAPI_SMS);
+ // Queue message till connection is established
+ sapi3Queue_.add (msEncodedMsg );
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+T_CSU_PORT_ID
+CCSessionHandler::mobileCsuPort(void)
+{
+
+ DBG_FUNC("CCSessionHandler::mobileCsuPort", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ // if handover is in progress, then we need to send it to the target vipercell.
+ if ((handoverSession == anchorHandoverSession) &&
+ ( (anchorHandoverSession->hoState_ == HAND_ST_ANCH_HO_COMPLT) ||
+ (anchorHandoverSession->hoState_ == HAND_ST_ANCH_EHO_COMPLT) ) )
+ {
+ // handover on anchor side. Get CSU port for handover.
+ DBG_LEAVE();
+ return(anchorHandoverSession->mobileCsuPort());
+ }
+ else
+ {
+ T_CSU_PORT_ID rfSourcePort;
+ rfSourcePort.portType = CSU_GSM_PORT;
+
+ rfSourcePort.portId.gsmHandler = entryId;
+
+ DBG_LEAVE();
+ return(rfSourcePort);
+ }
+
+}
+
+
+void CCSessionHandler::flashSapi3Queue ()
+{
+ sapi3Queue_.flash();
+}
+
+
+void
+sendStatusMsg(int sessionNum,
+ int callLeg)
+{
+ if ((0 <= sessionNum) &&
+ (sessionNum < CC_MAX_CC_CALLS))
+ {
+ switch (callLeg) {
+ case 1:
+ ccSession[sessionNum].sessionHandler->callLeg1->msSide->handleMobStatusEnquiry();
+ break;
+ case 2:
+ ccSession[sessionNum].sessionHandler->callLeg2->msSide->handleMobStatusEnquiry();
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+
+//BCT <xxu:09-22-00>
+bool
+CCSessionHandler::getBctArrival(void)
+{
+ if (callLeg1 != NULL)
+ {
+ if (callLeg1->bctArrival_)
+ return true;
+ }
+
+ if (callLeg2 != NULL)
+ {
+ if (callLeg2->bctArrival_)
+ return true;
+ }
+
+ return false;
+}
+
+//ext_HO <xxu:05-16-01>
+int
+CCSessionHandler::handleH323MsgExtH3(IntraL3Msg_t* h323InMsg)
+{
+ JCCEvent_t remoteEvent ;
+ CCRemMsgData_t remMsgData ;
+ int causeValue=0 ;
+
+ DBG_FUNC("CCSessionHandler::handleH323MsgExtH3", CC_EO_LAYER);
+ DBG_ENTER();
+
+ remoteEvent = h323MapToEventExtH3(h323InMsg, remMsgData);
+
+ if (h3CallLeg->msSide != NULL)
+ {
+ causeValue = h3CallLeg->msSide->handleRemoteEvent(h323InMsg, remoteEvent, remMsgData);
+ }
+
+ if (causeValue)
+ {
+ DBG_ERROR("{\nMNEThoERROR(cs::handleH323MsgExtH3): release h3CallLeg due to h3Call issue\n}\n");
+ handleReleaseCallLegExtH3(h3CallLeg);
+ }
+
+ DBG_LEAVE();
+ return causeValue;
+}
+
+//ext-HO <xxu:05-16-01>
+int
+CCSessionHandler::handleH323MsgExtHo(IntraL3Msg_t* h323InMsg)
+{
+ JCCEvent_t remoteEvent ;
+ CCRemMsgData_t remMsgData ;
+ int causeValue=0 ;
+
+ DBG_FUNC("CCSessionHandler::handleH323MsgExtHo", CC_HO_LAYER);
+ DBG_ENTER();
+
+ remoteEvent = h323MapToEventExtHo(h323InMsg, remMsgData);
+
+ if (hoCallLeg->msSide != NULL)
+ {
+ causeValue = hoCallLeg->msSide->handleRemoteEvent(h323InMsg, remoteEvent, remMsgData);
+ }
+
+ if (causeValue)
+ {
+ DBG_ERROR("{\nMNEThoERROR(cs::handleH323MsgExtHo): release hoCallLeg due to hoCall issue\n}\n");
+ handleReleaseCallLegExtHo(hoCallLeg);
+ }
+
+ DBG_LEAVE();
+ return causeValue;
+}
+
+//ext-HO <xxu:05-10-01>
+bool
+CCSessionHandler::setupTermExtHo(IntraL3Msg_t* h323InMsg)
+{
+ DBG_FUNC("CCSessionHandler::setupTermExtHo", CC_EI_LAYER);
+ DBG_ENTER();
+
+ if ( (handoverSession == NULL) || (handoverSession !=targetHandoverSessionExtHo) )
+ {
+ DBG_ERROR("{\nMNETeiERROR(cs::setupTermExtHo): no call session for hoCall SETUP (callId=%d,h323Handle=%x)\n}\n",
+ parent->callIndex, h323InMsg->call_handle);
+ return false;
+ }
+
+ //Invoke virtual function
+ hoCallLeg->setupTermExtHo(h323InMsg);
+
+ DBG_LEAVE();
+ return(true);
+}
+
+//ext-HO <xxu:05-16-01>
+JCCEvent_t
+CCSessionHandler::h323MapToEventExtHo(IntraL3Msg_t* h323InMsg,
+ CCRemMsgData_t &remMsgData)
+{
+ JCCEvent_t remoteEvent;
+
+ DBG_FUNC("CCSessionHandler::h323MapToEventExtHo", CC_HO_LAYER);
+ DBG_ENTER();
+
+ // Copy the incoming VOIP message to the remote message data structure
+ remMsgData = h323InMsg->l3_data.voipMsg;
+
+ switch (h323InMsg->message_type)
+ {
+ case INTRA_L3_CC_Q931_SETUP:
+ remoteEvent = THC_EHO_REMOTE_TERM_ADDRESS;
+ remMsgData.callOffering = h323InMsg->l3_data.setup.callOffering;
+ break;
+
+ case INTRA_L3_CC_Q931_CALL_PROC:
+ remoteEvent = OHC_EHO_REMOTE_CALL_PROGRESS;
+ break;
+
+ case INTRA_L3_CC_Q931_CONNECT:
+ remoteEvent = OHC_EHO_REMOTE_ANSWER;
+ break;
+
+ case INTRA_L3_CC_Q931_DISCONNECT:
+ remoteEvent = HC_EHO_REMOTE_DISCONNECT_REQ;
+ break;
+
+ case INTRA_L3_CC_H245_CHANN_READY:
+ remoteEvent = HC_EHO_REMOTE_CONNECTION_CONTROL;
+ break;
+
+ case INTRA_L3_CC_H245_CHANN_SELECT:
+ remoteEvent = HC_EHO_REMOTE_CHANN_SELECT;
+ break;
+
+ default:
+ remoteEvent = JCC_NULL_EVENT;
+ }
+
+ if (remoteEvent==JCC_NULL_EVENT)
+ {
+ DBG_WARNING("{\nMNEThoWARNING(cs::h323MapToEventExtHo): unexpected h323 message (msgType=%d,callId=%d)\n}\n",
+ h323InMsg->message_type,parent->callIndex);
+ } else
+ {
+ DBG_TRACE("{\nMNEThoTRACE(cs::h323MapToEventExtHo): received H323 Message (msgType=%d,event=%d,callId=%d)\n}\n",
+ h323InMsg->message_type, remoteEvent, parent->callIndex);
+ }
+
+ DBG_LEAVE();
+ return (remoteEvent);
+}
+
+//ext-HO <xxu:05-16-01>
+JCCEvent_t
+CCSessionHandler::h323MapToEventExtH3(IntraL3Msg_t* h323InMsg,
+ CCRemMsgData_t &remMsgData)
+{
+ JCCEvent_t remoteEvent;
+
+ DBG_FUNC("CCSessionHandler::h323MapToEventExtH3", CC_HO_LAYER);
+ DBG_ENTER();
+
+ // Copy the incoming VOIP message to the remote message data structure
+ remMsgData = h323InMsg->l3_data.voipMsg;
+
+ DBG_TRACE("{\nMNEThoTRACE(cs::h323MapToEventExtH3): received H323 Message (msgType=%d,callId=%d)\n}\n",
+ h323InMsg->message_type, parent->callIndex);
+
+ switch (h323InMsg->message_type)
+ {
+ case INTRA_L3_CC_Q931_SETUP:
+ remoteEvent = THC_EHO_REMOTE_TERM_ADDRESS;
+ remMsgData.callOffering = h323InMsg->l3_data.setup.callOffering;
+ break;
+
+ case INTRA_L3_CC_Q931_CALL_PROC:
+ remoteEvent = OHC_EHO_REMOTE_CALL_PROGRESS;
+ break;
+
+ case INTRA_L3_CC_Q931_CONNECT:
+ remoteEvent = OHC_EHO_REMOTE_ANSWER;
+ break;
+
+ case INTRA_L3_CC_Q931_DISCONNECT:
+ remoteEvent = HC_EHO_REMOTE_DISCONNECT_REQ;
+ break;
+
+ case INTRA_L3_CC_H245_CHANN_READY:
+ remoteEvent = HC_EHO_REMOTE_CONNECTION_CONTROL;
+ break;
+
+ case INTRA_L3_CC_H245_CHANN_SELECT:
+ remoteEvent = HC_EHO_REMOTE_CHANN_SELECT;
+ break;
+
+ default:
+ remoteEvent = JCC_NULL_EVENT;
+ }
+
+ if (remoteEvent==JCC_NULL_EVENT)
+ {
+ DBG_WARNING("{\nMNEThoWARNING(cs::h323MapToEventExtH3): unexpected h323 message (msgType=%d,callId=%d)\n}\n",
+ h323InMsg->message_type,parent->callIndex);
+ } else
+ {
+ DBG_TRACE("{\nMNEThoTRACE(cs::h323MapToEventExtH3): received H323 Message (msgType=%d, event=%d, callId=%d)\n}\n",
+ h323InMsg->message_type, remoteEvent, parent->callIndex);
+ }
+
+ DBG_LEAVE();
+ return (remoteEvent);
+}
+
+
+void
+CCSessionHandler::setReleaseCause(T_CNI_RIL3_CAUSE_VALUE cause)
+{
+ releaseCause = cause;
+}
+
+
+//ext-HO <xxu:07-08-01>
+BOOL
+CCSessionHandler::hoCallVoiceConnected(void)
+{
+ if (hoCallLeg->msSide != NULL)
+ {
+ return (hoCallLeg->voiceConnected);
+ } else
+ {
+ DBG_WARNINGho("{\nMNEThoWARNING(cs::hoCallVoiceConnected): no hoCall context any more (hoAgId=%d,callId=%d)\n}\n",
+ handoverSession->hoAgId_, handoverSession->callIndex);
+ return false;
+ }
+}
+
+HalfCallStates_t
+CCSessionHandler::hoCallState(void)
+{
+ if (hoCallLeg->msSide != NULL)
+ {
+ return (hoCallLeg->msSide->callState_);
+ } else
+ {
+ DBG_WARNINGho("{\nMNEThoWARNING(cs::hoCallState): no hoCall context found! (hoAgId=%d,callId=%d)\n}\n",
+ handoverSession->hoAgId_, handoverSession->callIndex);
+ return (EHO_ST_NULL);
+ }
+}
+
+//ext-HO <xxu:06-08-01>
+BOOL
+CCSessionHandler::h3CallVoiceConnected(void)
+{
+ if (hoCallLeg->msSide != NULL)
+ {
+ return (hoCallLeg->voiceConnected);
+ } else
+ {
+ DBG_WARNINGho("{\nMNEThoWARNING(cs::h3CallVoiceConnected): no h3Call context any more (hoAgId=%d,callId=%d)\n}\n",
+ handoverSession->hoAgId_, handoverSession->callIndex);
+ return false;
+ }
+}
+
+
+//ext-HO <chenj:06-11-01>
+bool
+CCSessionHandler::setupOrigExtHo(void)
+{
+ DBG_FUNC("CCSessionHandler::setupOrigExtHo", CC_EO_LAYER);
+ DBG_ENTER();
+
+ if ( (handoverSession == NULL) || (handoverSession != anchorHandoverSession) )
+ {
+ DBG_ERROR("{\nMNETeoERROR(cs::setupOrigExtHo): no call session for hoCall SETUP (callId=%d)\n}\n",
+ parent->callIndex);
+ return false;
+ }
+
+ hoCallLeg->setupOrigExtHo();
+
+ DBG_LEAVE();
+ return(true);
+}
+
+//ext-HO <chenj:06-11-01>
+bool
+CCSessionHandler::setupOrigExtHo3(void)
+{
+ DBG_FUNC("CCSessionHandler::setupOrigExtHo3", CC_EO_LAYER);
+ DBG_ENTER();
+
+ if ( (handoverSession == NULL) || (handoverSession != anchorHandoverSession) )
+ {
+ DBG_ERROR("{\nMNETeoERROR(cs::setupOrigExtHo): no call session for hoCall SETUP (callId=%d)\n}\n",
+ parent->callIndex);
+ return false;
+ }
+
+ h3CallLeg->setupOrigExtHo();
+
+ DBG_LEAVE();
+ return(true);
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/cc/src/CCTask.cpp b/data/mnet/GP10/Host/cc/src/CCTask.cpp
new file mode 100644
index 0000000..673c296
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CCTask.cpp
@@ -0,0 +1,1995 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCTask.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : The Main Loop for the controlling root CC task.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "stdio.h"
+#include "JCC/JCCLog.h"
+#include "logging/VCLOGGING.h"
+
+// included L3 Message header for messages from other Layer 3 modules (CC, RR)
+#include "JCC/JCCL3Msg.h"
+#include "jcc/LUDBInstance.h"
+#include "JCC/LUDBapi.h"
+
+// CC Types
+#include "CC/CCHalfCall.h"
+// ext-HO <chenj:05-16-01>
+#include "CC/HOHalfCall.h"
+
+#include "CC/CCHandover.h"
+
+#include "CC/CCSessionHandler.h"
+
+#include "CC/CCInt.h"
+#include "CC/CCUtil.h"
+
+#include "CC/CCconfig.h"
+#include "CC/CallConfig.h"
+
+#include "CC/CCH323Util.h"
+
+#include "oam_api.h"
+
+#include "CC/hortp.h"
+#include "jcc/viperchannel.h"
+#include "Os/JCTask.h"
+
+#include "ril3\ril3_sms_rp.h"
+
+bool smsSendVbLinkRelease (LUDB_ID, UINT32, T_CNI_RIL3_RP_CAUSE_VALUE cause =
+ CNI_RIL3_RP_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE);
+
+JCTask ccTaskObj("CCTask");
+
+//ext-HO <xxu: 05-16-01>
+DbgOutput ccExtHoEiDbg("GP10ei:", CC_EI_LAYER);
+DbgOutput ccExtHoEoDbg("GP10eo:", CC_EO_LAYER);
+DbgOutput ccExtHoHoDbg("GP10ho:", CC_HO_LAYER);
+bool ccCallTrace=false;
+
+// Call initialization function
+extern int callInit(const short callIndex);
+
+// Call Oam functions
+extern void callOamProcessTrapMsg(TrapMsg* oamInMsg);
+extern void ccOamDataInit(void);
+extern void callOamTrapRegister(void);
+
+FUNCPTR callTimerExpiry; // call timer action - with the Qid
+
+INT_32_T ccOldBTSState = VAL_bts_operationalState_disabled;
+
+bool callTrace = false;
+
+DBG_FUNC("CC Main", CC_LAYER);
+
+void
+callTraceOn (void)
+{
+ callTrace = true;
+}
+
+void
+callTraceOff (void)
+{
+ callTrace = false;
+}
+
+int callTimerExpiryAction(int timerData)
+{
+ // The timerData parameter is of 4 bytes long
+ //
+ // When timer is fired and this function is called by the System Clock ISR,
+ // the timerData is passed back.
+
+ // format a timer expiration message and send to the CC/MM task that
+ // is using the timer.
+
+ UINT16 uint16TimerData;
+ short callId;
+ MSG_Q_ID qid;
+
+ IntraL3Msg_t timeoutMsg;
+
+ uint16TimerData = ((UINT16)timerData) & 0x0FFF;
+
+ callId = (short)(uint16TimerData & 0x00FF);
+
+ if ((0 <= callId) &&
+ ( callId < CC_MAX_CC_CALLS))
+ {
+ qid = ccSession[callId].msgQId;
+ }
+ else
+ {
+ // send it to the cc main task so it can print out a log.
+ // Don't log from here.
+ qid = ccMsgQId;
+ }
+
+ timeoutMsg.module_id = MODULE_CC;
+
+ // send the call leg number in this field
+ timeoutMsg.entry_id = (short) ((uint16TimerData & 0x0F00) >> 8);
+
+ timeoutMsg.message_type = INTRA_L3_TIMEOUT_MSG;
+
+ // CDR <xxu:08-22-00>
+ timeoutMsg.signature = timerData;
+
+ // send the message. Since this is invoked by the System Clock ISR,
+ // we do NOT want to wait for the message delivery.
+ // Return it right away if cannot send on the message queue.
+ msgQSend( qid,
+ (char *) &timeoutMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT, // this is called by ISR, don't wait
+ MSG_PRI_NORMAL
+ );
+ return 0;
+
+}
+
+int CCTimerExpiryAction(int timerData)
+{
+ // The timerData parameter is of 4 bytes long
+ //
+ // When timer is fired and this function is called by the System Clock ISR,
+ // the timerData is passed back.
+
+ // format a timer expiration message and send to the CC/MM task that
+ // is using the timer.
+
+ IntraL3Msg_t timeoutMsg;
+
+ timeoutMsg.module_id = MODULE_CC;
+ timeoutMsg.entry_id = timerData;
+
+ timeoutMsg.message_type = INTRA_L3_TIMEOUT_MSG;
+
+ // send the message. Since this is invoked by the System Clock ISR,
+ // we do NOT want to wait for the message delivery.
+ // Return it right away if cannot send on the message queue.
+ msgQSend( ccMsgQId,
+ (char *) &timeoutMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT, // this is called by ISR, don't wait
+ MSG_PRI_NORMAL
+ );
+ return 0;
+}
+
+
+// Initialize the Message Handler Member function table.
+void msgHandlerInit(void)
+{
+ DBG_FUNC("msgHandlerInit", CC_LAYER);
+ DBG_ENTER();
+
+ // First initialize everything to a handler for invalid event.
+ short i, j;
+
+ for (i=0; i< MAX_GENERATED_EVENTS; i++)
+ {
+ generatedEventHandler[i] = &CCHalfCall::handleInvalidEvent;
+ }
+
+ for (i=0; i< MAX_CALL_EXTERNAL_EVENTS; i++)
+ {
+ for (j=0; j< MAX_CALL_STATES ; j++)
+ {
+ callStateHandler[j][i] = &CCHalfCall::handleInvalidEvent;
+ }
+ }
+
+ // ext-HO <chenj:06-13-01>
+ for (i=0; i< MAX_EHO_CALL_EXTERNAL_EVENTS; i++)
+ {
+ for (j=0; j< MAX_EHO_CALL_STATES ; j++)
+ {
+ ehoCallStateHandler[j][i] = &HOHalfCall::handleInvalidEvent;
+ }
+ }
+
+ for (i=0; i< MAX_HO_SRC_EVENTS; i++)
+ {
+ for (j=0; j< MAX_HO_SRC_STATES ; j++)
+ {
+ hoSrcHandler[j][i] = &CCHandover::handleInvalidEvent;
+ }
+ }
+
+ for (i=0; i< MAX_HO_TRG_EVENTS; i++)
+ {
+ for (j=0; j< MAX_HO_TRG_STATES ; j++)
+ {
+ hoTrgHandler[j][i] = &CCHandover::handleInvalidEvent;
+ }
+ }
+
+ for (i=0; i< MAX_HO_TRG_EVENTS+MAX_HO_SRC_EVENTS; i++)
+ {
+ for (j=0; j< MAX_HO_TRG_STATES+MAX_HO_SRC_STATES ; j++)
+ {
+ extHoTrgHandler[j][i] = &CCTargetHandoverExtHo::handleInvalidEvent;
+ }
+ }
+
+ // Handler for entire row of handover:
+ for (j=0; j< MAX_HO_SRC_STATES; j++)
+ {
+ hoSrcHandler[j][HAND_TRG_HO_REQ_ACK] = &CCHandover::handleMMLateEstCnf;
+ }
+
+ // Handler for entire row of handover:
+ for (j=0; j< MAX_HO_TRG_STATES; j++)
+ {
+ hoSrcHandler[j][HAND_TRG_HO_REQ_ACK] = &CCHandover::handleMMLateEstCnf;
+ }
+
+ for (i=0; i< MAX_CHANN_EXTERNAL_EVENTS; i++)
+ {
+ for (j=0; j< MAX_CHANN_STATES; j++)
+ {
+ channStateHandler[j][i] = &CCHalfCall::handleInvalidChannEvent;
+ }
+ }
+
+ // Assign Chann Handlers.
+ channStateHandler[RES_ST_ASS_REQ][CC_RESOURCE_ASSIGN_COMPLT - CC_INTERNAL_CHANN_EVENT_BASE]
+ = &CCHalfCall::handleChannAssignComplt ;
+
+ channStateHandler[RES_ST_ASS_REQ][CC_RESOURCE_ASSIGN_FAIL - CC_INTERNAL_CHANN_EVENT_BASE]
+ = &CCHalfCall::handleChannAssignFail;
+
+ // Generated Event Handlers.
+ generatedEventHandler[CC_TWO_STAGE_DISCONNECT - CC_INTERNAL_GEN_EVENT_BASE]
+ = &CCHalfCall::handleDisconnectReq;
+ generatedEventHandler[CC_RESOURCE_ASSIGN_REQ - CC_INTERNAL_GEN_EVENT_BASE]
+ = &CCHalfCall::handleChannAssignReq;
+ generatedEventHandler[CC_RES_RELEASE - CC_INTERNAL_GEN_EVENT_BASE]
+ = &CCHalfCall::handleMobResRelease;
+ generatedEventHandler[CC_MAKE_CONNECTION_REQ - CC_INTERNAL_GEN_EVENT_BASE]
+ = &CCHalfCall::handleConnReq;
+
+ //CH<xxu:Mod 12-13-99>
+ generatedEventHandler[CC_CONNECT_COMPLT - CC_INTERNAL_GEN_EVENT_BASE]
+ = &CCHalfCall::handleConnComplt;
+ generatedEventHandler[CC_CONNECT_FAIL - CC_INTERNAL_GEN_EVENT_BASE]
+ = &CCHalfCall::handleConnFail;
+
+ // Entire column initialization
+ for (i=0; i< MAX_CALL_EXTERNAL_EVENTS; i++)
+ {
+ callStateHandler[HC_ST_FREE][i]
+ = &CCHalfCall::handleNullEvent;
+
+ callStateHandler[HC_ST_NULL][i]
+ = &CCHalfCall::handleNullEvent;
+
+ }
+
+ // ext-HO <chenj:06-13-01>
+ // Entire column initialization
+ for (i=0; i< MAX_EHO_CALL_EXTERNAL_EVENTS; i++)
+ {
+ ehoCallStateHandler[EHO_ST_FREE][i]
+ = &HOHalfCall::handleNullEvent;
+
+ ehoCallStateHandler[EHO_ST_NULL][i]
+ = &HOHalfCall::handleNullEvent;
+ }
+
+ // Handler for entire row: for error, disconnect, release
+
+ for (j=HC_ST_ACTIVE; j< MAX_CALL_STATES ; j++)
+ {
+ // None of these events are applicable to Free or Null states.
+
+ callStateHandler[j][HC_LOCAL_PROTOCOL_PROBLEM - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobProtocolProblem;
+
+ callStateHandler[j][CC_MM_CONNECTION_REL - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMMRelInd;
+
+ callStateHandler[j][HC_REMOTE_RELEASE_COMPLETE - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteAbnormalRelCom;
+
+ callStateHandler[j][HC_LOCAL_DISCONNECT_REQ - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleDisconnectReq;
+
+ callStateHandler[j][HC_REMOTE_DISCONNECT_REQ - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteDisconnect;
+
+ callStateHandler[j][HC_LOCAL_RELEASE_REQ - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleReleaseReq;
+
+ callStateHandler[j][HC_LOCAL_RELEASE_COMPLETE - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobReleaseComplete;
+
+ // H245 Channel established
+ callStateHandler[j][HC_REMOTE_CONNECTION_CONTROL - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteH323ChannReady;
+
+ // Status Handling
+ callStateHandler[j][HC_LOCAL_STATUS_INFO - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobStatusInfo;
+ callStateHandler[j][HC_LOCAL_STATUS_ENQUIRY - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobStatusEnquiry;
+ }
+
+ // External Event Handlers.
+
+ callStateHandler[HC_ST_FREE][THC_REMOTE_TERM_ADDRESS - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteTermAddress;
+
+ // To take care of the radio link loss even before setup arrives.
+ callStateHandler[HC_ST_NULL][CC_MM_CONNECTION_REL - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMMRelInd;
+
+ //For getting rid of CC stuck at this state. This timeout linked to T999 timer
+ callStateHandler[HC_ST_NULL][HC_LOCAL_PROTOCOL_TIMEOUT - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobResRelease;
+
+ // Handle a Release coming in even before setup
+ callStateHandler[HC_ST_NULL][HC_LOCAL_RELEASE_REQ - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleReleaseReq;
+ callStateHandler[HC_ST_NULL][OHC_LOCAL_TERM_ADDRESS - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobTermAddress;
+ callStateHandler[HC_ST_NULL][OHC_LOCAL_EMERGENCY_ORIGINATION - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobEmergencyOrigination;
+
+ callStateHandler[HC_ST_ACTIVE][HC_REMOTE_DISCONNECT_REQ - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteDisconnect;
+ callStateHandler[HC_ST_ACTIVE][HC_LOCAL_DISCONNECT_REQ - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleDisconnectReq;
+
+//BCT <xxu:09-22-00>
+// callStateHandler[HC_ST_ACTIVE][OHC_REMOTE_ALERTING - CC_INTERNAL_CALL_EVENT_BASE]
+// = &CCHalfCall::handleMobRemoteAlerting;
+// callStateHandler[HC_ST_ACTIVE][HC_REMOTE_CHANN_SELECT - CC_INTERNAL_CALL_EVENT_BASE]
+// = &CCHalfCall::handleMobRemoteChannSelected;
+
+ callStateHandler[HC_ST_ACTIVE][HC_REMOTE_CONNECTION_CONTROL - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteH323ChannReady;
+
+//BCT <xxu:09-22-00>
+//callStateHandler[HC_ST_ACTIVE][OHC_REMOTE_ANSWER - CC_INTERNAL_CALL_EVENT_BASE]
+// = &CCHalfCall::handleNullEvent;
+
+ callStateHandler[HC_ST_ACTIVE][HC_REMOTE_CALL_PROGRESS - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleNullEvent;
+
+ callStateHandler[HC_ST_ACTIVE][HC_LOCAL_START_DTMF - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleStartDtmf;
+ callStateHandler[HC_ST_ACTIVE][HC_LOCAL_STOP_DTMF - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleStopDtmf;
+
+ //CH<xxu:11-10-99>
+ callStateHandler[HC_ST_ACTIVE][HC_LOCAL_HOLD_ACT - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleHoldAct;
+ callStateHandler[HC_ST_ACTIVE][HC_LOCAL_HOLD_REJ - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleHoldRej;
+ callStateHandler[HC_ST_ACTIVE][HC_LOCAL_RETV_ACT - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleRetvAct;
+ callStateHandler[HC_ST_ACTIVE][HC_LOCAL_RETV_REJ - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleRetvRej;
+ callStateHandler[HC_ST_ACTIVE][HC_LOCAL_HOLD_REQ - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleHoldReq;
+
+ //CH<xxu:Mod 12-13-99>
+ callStateHandler[HC_ST_ACTIVE][HC_LOCAL_RETV_REQ - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleRetvReq;
+
+ //BCT <xxu:09-21-00> BEGIN
+ callStateHandler[HC_ST_ACTIVE][HC_REMOTE_BCT_UPDATE_HANDLES - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleBctUpdateHandles;
+ callStateHandler[HC_ST_ACTIVE][OHC_REMOTE_ALERTING - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteAlerting2nd;
+ callStateHandler[HC_ST_ACTIVE][HC_REMOTE_CHANN_SELECT - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteChannSelected2nd;
+ callStateHandler[HC_ST_ACTIVE][OHC_REMOTE_ANSWER - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteAnswer2nd;
+ //BCT <xxu:09-21-00> END
+
+ callStateHandler[HC_ST_ACTIVE][HC_LOCAL_CHTR_EXP - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleSwapTimerExpiry;
+
+ callStateHandler[HC_ST_RELEASE_REQ][HC_LOCAL_RELEASE_COMPLETE - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobReleaseComplete;
+ callStateHandler[HC_ST_RELEASE_REQ][HC_LOCAL_PROTOCOL_TIMEOUT - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleReleaseTimeout;
+ callStateHandler[HC_ST_RELEASE_REQ][HC_REMOTE_RELEASE_COMPLETE - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleNullEvent;
+ callStateHandler[HC_ST_RELEASE_REQ][HC_LOCAL_DISCONNECT_REQ - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleNullEvent;
+ callStateHandler[HC_ST_RELEASE_REQ][HC_REMOTE_DISCONNECT_REQ - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleNullEvent;
+
+ // Take care of the race condition where a release request is received
+ // when a release request is sent to the MS.
+ callStateHandler[HC_ST_RELEASE_REQ][HC_LOCAL_RELEASE_REQ - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobReleaseComplete;
+
+ callStateHandler[HC_ST_DISCONNECT_IND][HC_LOCAL_RELEASE_REQ - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleReleaseReq;
+ callStateHandler[HC_ST_DISCONNECT_IND][HC_LOCAL_PROTOCOL_TIMEOUT - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleDisconnectTimeout;
+ callStateHandler[HC_ST_DISCONNECT_IND][HC_LOCAL_DISCONNECT_REQ - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleDisconnectReq;
+ // The above rare situation will send two Disconnects to the remote side -
+ // No problem - ignored through NULL event.
+ callStateHandler[HC_ST_DISCONNECT_IND][HC_REMOTE_DISCONNECT_REQ - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleNullEvent;
+ callStateHandler[HC_ST_DISCONNECT_IND][HC_REMOTE_RELEASE_COMPLETE - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleNullEvent;
+
+ callStateHandler[OHC_ST_OFFERING_CALL][HC_REMOTE_CALL_PROGRESS_1 - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteCallProgress1;
+ callStateHandler[OHC_ST_OFFERING_CALL][HC_REMOTE_CALL_PROGRESS - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteCallProgress;
+ callStateHandler[OHC_ST_OFFERING_CALL][OHC_REMOTE_ALERTING - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteAlerting;
+ callStateHandler[OHC_ST_OFFERING_CALL][OHC_REMOTE_ANSWER - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteAnswer;
+ callStateHandler[OHC_ST_OFFERING_CALL][HC_REMOTE_CHANN_SELECT - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteChannSelected;
+
+ //BCT <xxu:08-11-00> BEGIN
+ callStateHandler[OHC_ST_OFFERING_CALL][HC_LOCAL_PROTOCOL_TIMEOUT - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleBctNumberReqTimeout;
+ callStateHandler[OHC_ST_OFFERING_CALL][HC_VB_GET_BCT_NUMBER_RSP - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleGetBctNumberNack;
+ //BCT <xxu:08-11-00> END
+
+ callStateHandler[OHC_ST_CALL_PROCEEDING][OHC_REMOTE_ALERTING - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteAlerting;
+ callStateHandler[OHC_ST_CALL_PROCEEDING][OHC_REMOTE_ANSWER - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteAnswer;
+ callStateHandler[OHC_ST_CALL_PROCEEDING][HC_REMOTE_CHANN_SELECT - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteChannSelected;
+ callStateHandler[OHC_ST_CALL_PROCEEDING][HC_REMOTE_CALL_PROGRESS_1 - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteCallProgress1;
+
+
+ callStateHandler[OHC_ST_ANSWER_PENDING][OHC_REMOTE_ANSWER - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteAnswer;
+ callStateHandler[OHC_ST_ANSWER_PENDING][HC_REMOTE_CHANN_SELECT - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteChannSelected;
+ callStateHandler[OHC_ST_ANSWER_PENDING][HC_REMOTE_CALL_PROGRESS - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteCallProgress;
+ callStateHandler[OHC_ST_ANSWER_PENDING][HC_REMOTE_CALL_PROGRESS_1 - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteCallProgress1;
+
+ callStateHandler[OHC_ST_CONNECT_INDICATION][OHC_LOCAL_CONNECT_ACK - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleConnectAck;
+ callStateHandler[OHC_ST_CONNECT_INDICATION][HC_LOCAL_PROTOCOL_TIMEOUT - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleDisconnectReq;
+ callStateHandler[OHC_ST_CONNECT_INDICATION][HC_REMOTE_CALL_PROGRESS_1 - CC_INTERNAL_CALL_EVENT_BASE]
+ = CCHalfCall::handleNullEvent;
+
+ callStateHandler[THC_ST_PRESENTING_CALL][HC_LOCAL_CALL_PROGRESS - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobCallProgress;
+ callStateHandler[THC_ST_PRESENTING_CALL][HC_LOCAL_PROTOCOL_TIMEOUT - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleReleaseReq; // to send Release Complete
+
+ callStateHandler[THC_ST_ALERTING][THC_LOCAL_ANSWER - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobAnswer;
+ callStateHandler[THC_ST_ALERTING][HC_LOCAL_PROTOCOL_TIMEOUT - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobNoReply;
+ callStateHandler[THC_ST_ALERTING][HC_REMOTE_CHANN_SELECT - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteChannSelected;
+
+ callStateHandler[THC_ST_CALL_CONFIRMED][THC_LOCAL_ALERTING - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobAlerting;
+ callStateHandler[THC_ST_CALL_CONFIRMED][THC_LOCAL_ANSWER - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobAnswer;
+ callStateHandler[THC_ST_CALL_CONFIRMED][HC_LOCAL_PROTOCOL_TIMEOUT - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleDisconnectReq;
+ callStateHandler[THC_ST_CALL_CONFIRMED][HC_REMOTE_CHANN_SELECT - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMobRemoteChannSelected;
+
+ callStateHandler[THC_ST_MM_CONN_REQ][CC_MM_CONNECTION_CNF - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMMEstCnf;
+ callStateHandler[THC_ST_MM_CONN_REQ][CC_MM_CONNECTION_REJ - CC_INTERNAL_CALL_EVENT_BASE]
+ = &CCHalfCall::handleMMEstRej;
+
+ // ---------------------------- EXTERNAL HANDOVER -----------------------------
+ // ext-HO <chenj:05-29-01>
+ ehoCallStateHandler[EHO_ST_NULL][OHC_EHO_LOCAL_TERM_ADDRESS - CC_INTERNAL_EHO_CALL_EVENT_BASE]
+ = &HOHalfCall::handleEHOMobTermAddress;
+
+ ehoCallStateHandler[EHO_ST_OFFERING_CALL][OHC_EHO_REMOTE_CALL_PROGRESS - CC_INTERNAL_EHO_CALL_EVENT_BASE]
+ = &HOHalfCall::handleEHOMobCallProgress;
+ ehoCallStateHandler[EHO_ST_OFFERING_CALL][HC_EHO_REMOTE_CHANN_SELECT - CC_INTERNAL_EHO_CALL_EVENT_BASE]
+ = &HOHalfCall::handleEHOMobRemoteChannSelected;
+ ehoCallStateHandler[EHO_ST_OFFERING_CALL][OHC_EHO_REMOTE_ANSWER - CC_INTERNAL_EHO_CALL_EVENT_BASE]
+ = &HOHalfCall::handleEHOMobRemoteAnswer;
+ ehoCallStateHandler[EHO_ST_OFFERING_CALL][HC_EHO_REMOTE_CONNECTION_CONTROL - CC_INTERNAL_EHO_CALL_EVENT_BASE]
+ = &HOHalfCall::handleEHOMobRemoteChannReady;
+ ehoCallStateHandler[EHO_ST_OFFERING_CALL][HC_EHO_REMOTE_DISCONNECT_REQ - CC_INTERNAL_EHO_CALL_EVENT_BASE]
+ = &HOHalfCall::handleEHOMobRemoteDisconnect;
+ ehoCallStateHandler[EHO_ST_OFFERING_CALL][HC_EHO_LOCAL_PROTOCOL_TIMEOUT - CC_INTERNAL_EHO_CALL_EVENT_BASE]
+ = &HOHalfCall::handleHoCallTimeout;
+
+ ehoCallStateHandler[EHO_ST_ACTIVE][HC_EHO_LOCAL_DISCONNECT_REQ - CC_INTERNAL_EHO_CALL_EVENT_BASE]
+ = &HOHalfCall::handleEHOMobLocalDisconnect;
+ ehoCallStateHandler[EHO_ST_ACTIVE][HC_EHO_REMOTE_DISCONNECT_REQ - CC_INTERNAL_EHO_CALL_EVENT_BASE]
+ = &HOHalfCall::handleEHOMobRemoteDisconnect;
+ ehoCallStateHandler[EHO_ST_ACTIVE][HC_EHO_LOCAL_PROTOCOL_TIMEOUT - CC_INTERNAL_EHO_CALL_EVENT_BASE]
+ = &HOHalfCall::handleHoCallTimeout;
+
+ // ext-HO <xxu:06-07-01>
+ ehoCallStateHandler[HC_ST_FREE][THC_EHO_REMOTE_TERM_ADDRESS - CC_INTERNAL_EHO_CALL_EVENT_BASE]
+ = &HOHalfCall::handleEHOMobRemoteTermAddress;
+ ehoCallStateHandler[EHO_ST_CONFIRMED][HC_EHO_LOCAL_PROTOCOL_TIMEOUT - CC_INTERNAL_EHO_CALL_EVENT_BASE]
+ = &HOHalfCall::handleHoCallTimeout;
+ ehoCallStateHandler[EHO_ST_CONFIRMED][HC_EHO_REMOTE_DISCONNECT_REQ - CC_INTERNAL_EHO_CALL_EVENT_BASE]
+ = &HOHalfCall::handleEHOMobRemoteDisconnect;
+ ehoCallStateHandler[EHO_ST_CONFIRMED][HC_EHO_REMOTE_CHANN_SELECT - CC_INTERNAL_EHO_CALL_EVENT_BASE]
+ = &HOHalfCall::handleEHOMobRemoteChannSelectedEi;
+ ehoCallStateHandler[EHO_ST_ACTIVE][HC_EHO_REMOTE_CONNECTION_CONTROL - CC_INTERNAL_EHO_CALL_EVENT_BASE]
+ = &HOHalfCall::handleEHOMobRemoteChannReady;
+ ehoCallStateHandler[EHO_ST_ACTIVE][HC_EHO_REMOTE_DISCONNECT_REQ - CC_INTERNAL_EHO_CALL_EVENT_BASE]
+ = &HOHalfCall::handleEHOMobRemoteDisconnect;
+
+ // ext-HO <chenj:05-29-01>
+ // external handout scenerio
+ hoSrcHandler[HAND_ST_ANCH_PERF_EHO_REQ][HAND_PERFORM_HO_ACK - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleExtPerformHOAck;
+ hoSrcHandler[HAND_ST_ANCH_PERF_EHO_REQ][HAND_PERFORM_HO_NACK - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleExtPerformHONack;
+ hoSrcHandler[HAND_ST_ANCH_PERF_EHO_REQ][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchEndHandover;
+ hoSrcHandler[HAND_ST_ANCH_PERF_EHO_REQ][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchExtHoTimerExpiry;
+ hoSrcHandler[HAND_ST_ANCH_PERF_EHO_REQ][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleNullEvent;
+ hoSrcHandler[HAND_ST_ANCH_PERF_EHO_REQ][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostExtHoRls;
+
+ hoSrcHandler[HAND_ST_ANCH_RCV_EHO_REQ_ACK][HAND_HO_ACCESS - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleNullEvent; // Nothing is done for HO ACCESS
+ hoSrcHandler[HAND_ST_ANCH_RCV_EHO_REQ_ACK][HAND_COMPLT_HO - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchExtHoComplt;
+ hoSrcHandler[HAND_ST_ANCH_RCV_EHO_REQ_ACK][HAND_SRC_HO_FAIL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchExtHoFail;
+ hoSrcHandler[HAND_ST_ANCH_RCV_EHO_REQ_ACK][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchEndHandover;
+ hoSrcHandler[HAND_ST_ANCH_RCV_EHO_REQ_ACK][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchExtHoTimerExpiry;
+ hoSrcHandler[HAND_ST_ANCH_RCV_EHO_REQ_ACK][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleNullEvent;
+ hoSrcHandler[HAND_ST_ANCH_RCV_EHO_REQ_ACK][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostExtHoRls;
+
+ hoSrcHandler[HAND_ST_ANCH_EHO_COMPLT][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchEndHandover;
+ hoSrcHandler[HAND_ST_ANCH_EHO_COMPLT][HAND_POSTHO_MOB_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostExtHoMobEvent;
+ hoSrcHandler[HAND_ST_ANCH_EHO_COMPLT][HAND_PERFORM_HO_REQ - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostExtHoHandbackEvent; // Handback event
+ hoSrcHandler[HAND_ST_ANCH_EHO_COMPLT][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostExtHoRls;
+
+
+ // external handback (to anchor GP10) scenerio
+ hoSrcHandler[HAND_ST_ANCH_RCV_EHO_HB_REQ][HAND_PERFORM_HO_REQ - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleNullEvent;
+ hoSrcHandler[HAND_ST_ANCH_RCV_EHO_HB_REQ][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchEndHandover;
+ hoSrcHandler[HAND_ST_ANCH_RCV_EHO_HB_REQ][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchExtHoTimerExpiry;
+ hoSrcHandler[HAND_ST_ANCH_RCV_EHO_HB_REQ][HAND_TRG_HO_REQ_ACK - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchExtHoReqAck;
+ hoSrcHandler[HAND_ST_ANCH_RCV_EHO_HB_REQ][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostExtHoRls;
+
+ hoSrcHandler[HAND_ST_ANCH_SND_EHB_REQ_ACK][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleNullEvent;
+ hoSrcHandler[HAND_ST_ANCH_SND_EHB_REQ_ACK][HAND_SRC_HO_FAIL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchExtHandbackFail;
+ hoSrcHandler[HAND_ST_ANCH_SND_EHB_REQ_ACK][HAND_TRG_HO_COMPLT - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchExtHoComplt;
+ hoSrcHandler[HAND_ST_ANCH_SND_EHB_REQ_ACK][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchEndHandover;
+ hoSrcHandler[HAND_ST_ANCH_SND_EHB_REQ_ACK][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchExtHOT104TimerExpiry;
+ hoSrcHandler[HAND_ST_ANCH_SND_EHB_REQ_ACK][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostExtHoRls;
+
+
+ // external handback (to another PLMN) scenerio AND
+ // internal handback from non-achor MNET to external MSC3
+ hoSrcHandler[HAND_ST_ANCH_PERF_EHO_H3_REQ][HAND_PERFORM_HO_ACK - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleExtPerformHOAck;
+ hoSrcHandler[HAND_ST_ANCH_PERF_EHO_H3_REQ][HAND_PERFORM_HO_NACK - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleExtPerformHONack;
+ hoSrcHandler[HAND_ST_ANCH_PERF_EHO_H3_REQ][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchEndHandover;
+ hoSrcHandler[HAND_ST_ANCH_PERF_EHO_H3_REQ][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchExtHoTimerExpiry;
+ hoSrcHandler[HAND_ST_ANCH_PERF_EHO_H3_REQ][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleNullEvent;
+ hoSrcHandler[HAND_ST_ANCH_PERF_EHO_H3_REQ][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostExtHoRls;
+
+ hoSrcHandler[HAND_ST_ANCH_RCV_EHO_H3_REQ_ACK][HAND_HO_ACCESS - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleNullEvent; // JOE: nothing is done with HANDOVER ACCESS
+ hoSrcHandler[HAND_ST_ANCH_RCV_EHO_H3_REQ_ACK][HAND_COMPLT_HO - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchExtHoComplt;
+ hoSrcHandler[HAND_ST_ANCH_RCV_EHO_H3_REQ_ACK][HAND_SRC_HO_FAIL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchExtHandbackFail;
+ hoSrcHandler[HAND_ST_ANCH_RCV_EHO_H3_REQ_ACK][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchEndHandover;
+ hoSrcHandler[HAND_ST_ANCH_RCV_EHO_H3_REQ_ACK][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchExtHoTimerExpiry;
+ hoSrcHandler[HAND_ST_ANCH_RCV_EHO_H3_REQ_ACK][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleNullEvent;
+ hoSrcHandler[HAND_ST_ANCH_RCV_EHO_H3_REQ_ACK][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostExtHoRls;
+
+
+ // external handback (to non-anchor GP10) scenerio
+ hoSrcHandler[HAND_ST_ANCH_EHO_H3_VC_IP_ADDRESS_REQ][HC_VB_GET_VC_ADDRESS_RSP - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleVcAddressRsp;
+ hoSrcHandler[HAND_ST_ANCH_EHO_H3_VC_IP_ADDRESS_REQ][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchTvbTimerExpiry;
+ hoSrcHandler[HAND_ST_ANCH_EHO_H3_VC_IP_ADDRESS_REQ][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleNullEvent;
+ hoSrcHandler[HAND_ST_ANCH_EHO_H3_VC_IP_ADDRESS_REQ][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostExtHoRls;
+
+
+ hoSrcHandler[HAND_ST_ANCH_EHO_SND_H3_REQ][HAND_PERFORM_HO_ACK - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchPerfHoAck;
+ hoSrcHandler[HAND_ST_ANCH_EHO_SND_H3_REQ][HAND_PERFORM_HO_NACK - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchPerfHoNack;
+ hoSrcHandler[HAND_ST_ANCH_EHO_SND_H3_REQ][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchThoTimerExpiry;
+ hoSrcHandler[HAND_ST_ANCH_EHO_SND_H3_REQ][HAND_POSTHO_MOB_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostHoMobEvent;
+ hoSrcHandler[HAND_ST_ANCH_EHO_SND_H3_REQ][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleNullEvent;
+ hoSrcHandler[HAND_ST_ANCH_EHO_SND_H3_REQ][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostExtHoRls;
+
+
+ hoSrcHandler[HAND_ST_ANCH_EHO_RCV_H3_REQ_ACK][HAND_COMPLT_HO - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchExtHoComplt;
+ hoSrcHandler[HAND_ST_ANCH_EHO_RCV_H3_REQ_ACK][HAND_ABORT_HO - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchEndHandover;
+ hoSrcHandler[HAND_ST_ANCH_EHO_RCV_H3_REQ_ACK][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchT103TimerExpiry;
+ hoSrcHandler[HAND_ST_ANCH_EHO_RCV_H3_REQ_ACK][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleNullEvent;
+ hoSrcHandler[HAND_ST_ANCH_EHO_RCV_H3_REQ_ACK][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostExtHoRls;
+
+
+ // ----------------------------------------------------------------------------
+
+
+ // Source Handover Event Handlers
+ hoSrcHandler[HAND_ST_IDLE][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchHoReqd;
+
+ hoSrcHandler[HAND_ST_ANCH_VC_IP_ADDRESS_REQ][HC_VB_GET_VC_ADDRESS_RSP - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleVcAddressRsp;
+ hoSrcHandler[HAND_ST_ANCH_VC_IP_ADDRESS_REQ][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleNullEvent;
+
+ //RETRY<xxu:04-21-00> BEGIN
+ hoSrcHandler[HAND_ST_ANCH_VC_IP_ADDRESS_REQ][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchTvbTimerExpiry;
+ //RETRY<xxu:04-21-00> END
+
+ //HO<xxu:01-28-00>
+ hoSrcHandler[HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ][HC_VB_GET_VC_ADDRESS_RSP - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleVcAddressRsp;
+ hoSrcHandler[HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ][HAND_POSTHO_MOB_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostHoMobEvent;
+ hoSrcHandler[HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostHoRls;
+ hoSrcHandler[HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleNullEvent;
+
+ //RETRY<xxu:04-21-00> BEGIN
+ hoSrcHandler[HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ][HAND_ABORT_HO - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchAbortHb;
+ hoSrcHandler[HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchTvbTimerExpiry;
+ //RETRY<xxu:04-21-00> END
+
+ hoSrcHandler[HAND_ST_ANCH_SND_HO_REQ][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchPerfHoNack;
+ hoSrcHandler[HAND_ST_ANCH_SND_HO_REQ][HAND_PERFORM_HO_ACK - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchPerfHoAck;
+ hoSrcHandler[HAND_ST_ANCH_SND_HO_REQ][HAND_PERFORM_HO_NACK - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchPerfHoNack;
+ hoSrcHandler[HAND_ST_ANCH_SND_HO_REQ][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchThoTimerExpiry;
+ hoSrcHandler[HAND_ST_ANCH_SND_HO_REQ][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleNullEvent;
+
+ //HO<xxu:01-28-00> H3
+ //hoSrcHandler[HAND_ST_ANCH_SND_H3_REQ][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ // = &CCAnchorHandover::handleTrgToAnchPerfHoNack;
+ hoSrcHandler[HAND_ST_ANCH_SND_H3_REQ][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostHoRls;
+ hoSrcHandler[HAND_ST_ANCH_SND_H3_REQ][HAND_PERFORM_HO_ACK - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchPerfHoAck;
+ hoSrcHandler[HAND_ST_ANCH_SND_H3_REQ][HAND_PERFORM_HO_NACK - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchPerfHoNack;
+ hoSrcHandler[HAND_ST_ANCH_SND_H3_REQ][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchThoTimerExpiry;
+ hoSrcHandler[HAND_ST_ANCH_SND_H3_REQ][HAND_POSTHO_MOB_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostHoMobEvent;
+ hoSrcHandler[HAND_ST_ANCH_SND_H3_REQ][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleNullEvent;
+
+ //RETRY<xxu:04-27-00> BEGIN
+ hoSrcHandler[HAND_ST_ANCH_SND_H3_REQ][HAND_ABORT_HO - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchAbortHb;
+ //RETRY<xxu:04-27-00> END
+
+ hoSrcHandler[HAND_ST_ANCH_RCV_HO_REQ_ACK][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchPerfHoNack;
+ hoSrcHandler[HAND_ST_ANCH_RCV_HO_REQ_ACK][HAND_SRC_HO_FAIL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchHoFail;
+ hoSrcHandler[HAND_ST_ANCH_RCV_HO_REQ_ACK][HAND_PERFORM_HO_NACK - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchPerfHoNack;
+ hoSrcHandler[HAND_ST_ANCH_RCV_HO_REQ_ACK][HAND_COMPLT_HO - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchCompltHo;
+ hoSrcHandler[HAND_ST_ANCH_RCV_HO_REQ_ACK][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchT103TimerExpiry;
+ // Race condition
+ hoSrcHandler[HAND_ST_ANCH_SND_HO_REQ][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleNullEvent;
+
+ hoSrcHandler[HAND_ST_ANCH_HO_COMPLT][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostHoRls;
+ hoSrcHandler[HAND_ST_ANCH_HO_COMPLT][HAND_POSTHO_MOB_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostHoMobEvent;
+ hoSrcHandler[HAND_ST_ANCH_HO_COMPLT][HAND_PERFORM_HO_REQ - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchPerfHbReq;
+
+ hoSrcHandler[HAND_ST_ANCH_RCV_HB_REQ][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostHoRls;
+ hoSrcHandler[HAND_ST_ANCH_RCV_HB_REQ][HAND_POSTHO_MOB_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostHoMobEvent;
+
+ //HO<xxu:02-01-00>
+ hoSrcHandler[HAND_ST_ANCH_RCV_HB_REQ][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleNullEvent;
+
+ hoSrcHandler[HAND_ST_ANCH_RCV_HB_REQ][HAND_TRG_HO_REQ_ACK - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchHoReqAck;
+ hoSrcHandler[HAND_ST_ANCH_RCV_HB_REQ][HAND_TRG_HO_REQ_NACK - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchHoReqNack;
+ hoSrcHandler[HAND_ST_ANCH_RCV_HB_REQ][HAND_ABORT_HO - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchAbortHb;
+
+ hoSrcHandler[HAND_ST_ANCH_SND_HB_REQ_ACK][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostHoRls;
+ hoSrcHandler[HAND_ST_ANCH_SND_HB_REQ_ACK][HAND_POSTHO_MOB_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostHoMobEvent;
+
+ //HO<xxu:02-01-00>
+ hoSrcHandler[HAND_ST_ANCH_SND_HB_REQ_ACK][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleNullEvent;
+
+ hoSrcHandler[HAND_ST_ANCH_SND_HB_REQ_ACK][HAND_TRG_HO_COMPLT - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchHoComplt;
+ hoSrcHandler[HAND_ST_ANCH_SND_HB_REQ_ACK][HAND_ABORT_HO - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchAbortHb;
+ hoSrcHandler[HAND_ST_ANCH_SND_HB_REQ_ACK][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchT104TimerExpiry;
+
+ //RETRY<xxu:04-27-00> BEGIN
+ hoSrcHandler[HAND_ST_ANCH_SND_HB_REQ_ACK][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostHoRls;
+ //RETRY<xxu:04-27-00> END
+
+ //HO<xxu:01-28-00> H3 handle RR->A or B'->A HoComplt or HAND_RLS_CALL due to timeout
+ //hoSrcHandler[HAND_ST_ANCH_RCV_H3_REQ_ACK][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ // = &CCAnchorHandover::handleTrgToAnchPerfHoNack;
+ hoSrcHandler[HAND_ST_ANCH_RCV_H3_REQ_ACK][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostHoRls;
+ hoSrcHandler[HAND_ST_ANCH_RCV_H3_REQ_ACK][HAND_COMPLT_HO - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchCompltHo;
+ hoSrcHandler[HAND_ST_ANCH_RCV_H3_REQ_ACK][HAND_ABORT_HO - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleTrgToAnchAbortHb; //H3 or HB failed at MSC-B
+ hoSrcHandler[HAND_ST_ANCH_RCV_H3_REQ_ACK][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchT103TimerExpiry;
+ hoSrcHandler[HAND_ST_ANCH_RCV_H3_REQ_ACK][HAND_POSTHO_MOB_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleAnchPostHoMobEvent;
+ hoSrcHandler[HAND_ST_ANCH_RCV_H3_REQ_ACK][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCAnchorHandover::handleNullEvent;
+
+
+ // Target Handover Event Handlers
+ hoTrgHandler[HAND_ST_IDLE][HAND_PERFORM_HO_REQ - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleAnchToTrgPerfHoReq;
+
+ hoTrgHandler[HAND_ST_TRG_RCV_HO_REQ][HAND_TRG_HO_REQ_ACK - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleTrgHoReqAck;
+ hoTrgHandler[HAND_ST_TRG_RCV_HO_REQ][HAND_TRG_HO_REQ_NACK - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleTrgHoReqNack;
+ hoTrgHandler[HAND_ST_TRG_RCV_HO_REQ][HAND_ABORT_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleAnchToTrgAbortHo;
+
+ hoTrgHandler[HAND_ST_TRG_SND_HO_REQ_ACK][HAND_TRG_HO_COMPLT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleTrgHoComplt;
+ hoTrgHandler[HAND_ST_TRG_SND_HO_REQ_ACK][HAND_ABORT_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleAnchToTrgAbortHo;
+ hoTrgHandler[HAND_ST_TRG_SND_HO_REQ_ACK][HAND_TRG_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleTrgT204TimerExpiry;
+
+ hoTrgHandler[HAND_ST_TRG_HO_COMPLT][HAND_ABORT_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleAnchToTrgAbortHo;
+ hoTrgHandler[HAND_ST_TRG_HO_COMPLT][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleTrgHoReqd;
+
+ hoTrgHandler[HAND_ST_TRG_SND_HB_REQ][HAND_ABORT_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleAnchToTrgAbortHo;
+ hoTrgHandler[HAND_ST_TRG_SND_HB_REQ][HAND_PERFORM_HO_ACK - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleAnchToTrgPerfHbAck;
+ hoTrgHandler[HAND_ST_TRG_SND_HB_REQ][HAND_PERFORM_HO_NACK - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleAnchToTrgPerfHbNack;
+ hoTrgHandler[HAND_ST_TRG_SND_HB_REQ][HAND_TRG_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleTrgTshoTimerExpiry;
+ hoTrgHandler[HAND_ST_TRG_SND_HB_REQ][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleNullEvent;
+
+ hoTrgHandler[HAND_ST_TRG_RCV_HB_REQ_ACK][HAND_ABORT_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleAnchToTrgAbortHo;
+ hoTrgHandler[HAND_ST_TRG_RCV_HB_REQ_ACK][HAND_SRC_HO_FAIL - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleTrgHoFail;
+ hoTrgHandler[HAND_ST_TRG_RCV_HB_REQ_ACK][HAND_PERFORM_HO_NACK - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleAnchToTrgPerfHbNack;
+ hoTrgHandler[HAND_ST_TRG_RCV_HB_REQ_ACK][HAND_COMPLT_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleAnchToTrgCompltHb;
+ hoTrgHandler[HAND_ST_TRG_RCV_HB_REQ_ACK][HAND_TRG_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleTrgT203TimerExpiry;
+ // Race condition
+ hoTrgHandler[HAND_ST_TRG_RCV_HB_REQ_ACK][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandover::handleNullEvent;
+
+ //ext-HO <xxu:06-07-01> : External Handover--Handin case handlers
+ extHoTrgHandler[HAND_ST_IDLE][HAND_PERFORM_HO_REQ - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgPerfHoReq;
+
+ extHoTrgHandler[HAND_ST_TRG_RCV_HO_REQ][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgEndHandover;
+ extHoTrgHandler[HAND_ST_TRG_RCV_HO_REQ][HAND_TRG_HO_REQ_ACK - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgHoReqAck;
+ extHoTrgHandler[HAND_ST_TRG_RCV_HO_REQ][HAND_TRG_HO_REQ_NACK - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgHoReqNack;
+
+ extHoTrgHandler[HAND_ST_TRG_SND_HO_REQ_ACK][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgEndHandover;
+ extHoTrgHandler[HAND_ST_TRG_SND_HO_REQ_ACK][HAND_TRG_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgT204TimerExpiry;
+ extHoTrgHandler[HAND_ST_TRG_SND_HO_REQ_ACK][HAND_HO_ACCESS - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgHoAccess;
+ extHoTrgHandler[HAND_ST_TRG_SND_HO_REQ_ACK][HAND_TRG_HO_COMPLT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgHoComplt;
+
+ extHoTrgHandler[HAND_ST_TRG_HO_COMPLT][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgEndHandover;
+ extHoTrgHandler[HAND_ST_TRG_HO_COMPLT][HAND_TRG_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgT204TimerExpiry;
+ extHoTrgHandler[HAND_ST_TRG_HO_COMPLT][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgMmRelInd;
+ extHoTrgHandler[HAND_ST_TRG_HO_COMPLT][HAND_POSTHO_HOA_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgPostHoHoaEvent;
+
+ //ext-HO <xxu:06-07-01> : External Handover postHandin--Handback anchor GP->PLMN
+ extHoTrgHandler[HAND_ST_TRG_HO_COMPLT][HAND_SRC_HO_REQD - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgHoReqd;
+
+ extHoTrgHandler[HAND_ST_TRG_SND_HB_REQ][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgEndHandover;
+ extHoTrgHandler[HAND_ST_TRG_SND_HB_REQ][HAND_PERFORM_HO_ACK - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgPerfHbAck;
+ extHoTrgHandler[HAND_ST_TRG_SND_HB_REQ][HAND_PERFORM_HO_NACK - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgPerfHbNack;
+ extHoTrgHandler[HAND_ST_TRG_SND_HB_REQ][HAND_TRG_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgT211TimerExpiry; //formerly Tsho timer
+ extHoTrgHandler[HAND_ST_TRG_SND_HB_REQ][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgMmRelInd;
+ extHoTrgHandler[HAND_ST_TRG_SND_HB_REQ][HAND_POSTHO_HOA_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgPostHoHoaEvent;
+
+ extHoTrgHandler[HAND_ST_TRG_RCV_HB_REQ_ACK][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgEndHandover;
+ extHoTrgHandler[HAND_ST_TRG_RCV_HB_REQ_ACK][HAND_SRC_HO_FAIL - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgHoFail;
+ extHoTrgHandler[HAND_ST_TRG_RCV_HB_REQ_ACK][HAND_COMPLT_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgCompltHb;
+ extHoTrgHandler[HAND_ST_TRG_RCV_HB_REQ_ACK][HAND_TRG_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgT204TimerExpiry; //formerly T203 timer
+ extHoTrgHandler[HAND_ST_TRG_RCV_HB_REQ_ACK][HAND_POSTHO_HOA_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleNullEvent;
+
+ //ext-HO <xxu:06-07-01> : External Handover postHandin--Handover to another GP
+ extHoTrgHandler[HAND_ST_ANCH_VC_IP_ADDRESS_REQ][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgEndHandover;
+ extHoTrgHandler[HAND_ST_ANCH_VC_IP_ADDRESS_REQ][HC_VB_GET_VC_ADDRESS_RSP - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleVcAddressRsp;
+ extHoTrgHandler[HAND_ST_ANCH_VC_IP_ADDRESS_REQ][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchTvbTimerExpiry;
+ extHoTrgHandler[HAND_ST_ANCH_VC_IP_ADDRESS_REQ][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgMmRelInd;
+ extHoTrgHandler[HAND_ST_ANCH_VC_IP_ADDRESS_REQ][HAND_POSTHO_HOA_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgPostHoHoaEvent;
+
+ extHoTrgHandler[HAND_ST_ANCH_SND_HO_REQ][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgEndHandover;
+ extHoTrgHandler[HAND_ST_ANCH_SND_HO_REQ][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgMmRelInd;
+ extHoTrgHandler[HAND_ST_ANCH_SND_HO_REQ][HAND_TRG_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgT202TimerExpiry; //interBSS handover under MSC-B
+ extHoTrgHandler[HAND_ST_ANCH_SND_HO_REQ][HAND_PERFORM_HO_ACK - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchPerfHoAck;
+ extHoTrgHandler[HAND_ST_ANCH_SND_HO_REQ][HAND_PERFORM_HO_NACK - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchPerfHoNack;
+ extHoTrgHandler[HAND_ST_ANCH_SND_HO_REQ][HAND_POSTHO_HOA_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgPostHoHoaEvent;
+
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HO_REQ_ACK][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgEndHandover;
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HO_REQ_ACK][HAND_TRG_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgT202TimerExpiry; //interBSS handover under MSC-B
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HO_REQ_ACK][HAND_COMPLT_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchCompltHo;
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HO_REQ_ACK][HAND_SRC_HO_FAIL - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchHoFail;
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HO_REQ_ACK][HAND_POSTHO_HOA_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgPostHoHoaEvent;
+
+ extHoTrgHandler[HAND_ST_ANCH_HO_COMPLT][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgEndHandover;
+ extHoTrgHandler[HAND_ST_ANCH_HO_COMPLT][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchPostHoRls;
+ extHoTrgHandler[HAND_ST_ANCH_HO_COMPLT][HAND_POSTHO_HOA_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgPostHoHoaEvent;
+ extHoTrgHandler[HAND_ST_ANCH_HO_COMPLT][HAND_POSTHO_MOB_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchPostHoMobEvent;
+
+ //ext-HO <xxu:06-07-01> : External Handover postHandin-->Handback nonanchor GP->PLMN
+ extHoTrgHandler[HAND_ST_ANCH_HO_COMPLT][HAND_PERFORM_HO_REQ - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchPerfHbReq;
+
+ extHoTrgHandler[HAND_ST_ANCH_SND_HB_REQ][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgEndHandover;
+ extHoTrgHandler[HAND_ST_ANCH_SND_HB_REQ][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchPostHoRls;
+ extHoTrgHandler[HAND_ST_ANCH_SND_HB_REQ][HAND_ABORT_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchAbortHb;
+ extHoTrgHandler[HAND_ST_ANCH_SND_HB_REQ][HAND_PERFORM_HO_ACK - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgPerfHbAck;
+ extHoTrgHandler[HAND_ST_ANCH_SND_HB_REQ][HAND_PERFORM_HO_NACK - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgPerfHbNack;
+ extHoTrgHandler[HAND_ST_ANCH_SND_HB_REQ][HAND_TRG_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgT211TimerExpiry; //formerly Tsho timer
+ extHoTrgHandler[HAND_ST_ANCH_SND_HB_REQ][HAND_POSTHO_MOB_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchPostHoMobEvent;
+ extHoTrgHandler[HAND_ST_ANCH_SND_HB_REQ][HAND_POSTHO_HOA_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgPostHoHoaEvent;
+
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HB_REQ_ACK][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgEndHandover;
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HB_REQ_ACK][HAND_TRG_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgT204TimerExpiry; //formerly T203 timer
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HB_REQ_ACK][HAND_ABORT_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchHbFail; //revert to old cell case
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HB_REQ_ACK][HAND_HO_ACCESS - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchHoAccess;
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HB_REQ_ACK][HAND_COMPLT_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgCompltHb;
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HB_REQ_ACK][HAND_POSTHO_HOA_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleNullEvent;
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HB_REQ_ACK][HAND_POSTHO_MOB_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchPostHoMobEvent;
+
+ //ext-HO <xxu:06-07-01> : External Handover postHandin-->Handback nonanchor GP->anchor GP
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HB_REQ][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgEndHandover;
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HB_REQ][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchPostHoRls;
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HB_REQ][HAND_ABORT_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchAbortHb;
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HB_REQ][HAND_TRG_HO_REQ_ACK - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchHoReqAck;
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HB_REQ][HAND_TRG_HO_REQ_NACK - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchHoReqNack;
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HB_REQ][HAND_TRG_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgT202TimerExpiry; //formerly T203 timer
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HB_REQ][HAND_POSTHO_HOA_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgPostHoHoaEvent;
+ extHoTrgHandler[HAND_ST_ANCH_RCV_HB_REQ][HAND_POSTHO_MOB_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchPostHoMobEvent;
+
+ extHoTrgHandler[HAND_ST_ANCH_SND_HB_REQ_ACK][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgEndHandover;
+ extHoTrgHandler[HAND_ST_ANCH_SND_HB_REQ_ACK][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgT202TimerExpiry; //interBSS handover under MSC-B
+ extHoTrgHandler[HAND_ST_ANCH_SND_HB_REQ_ACK][HAND_TRG_HO_COMPLT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchHoComplt;
+ extHoTrgHandler[HAND_ST_ANCH_SND_HB_REQ_ACK][HAND_ABORT_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchHbFail;
+ extHoTrgHandler[HAND_ST_ANCH_SND_HB_REQ_ACK][HAND_POSTHO_HOA_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgPostHoHoaEvent;
+ extHoTrgHandler[HAND_ST_ANCH_SND_HB_REQ_ACK][HAND_POSTHO_MOB_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchPostHoMobEvent;
+
+ //ext-HO <xxu:06-07-01> : External Handover postHandin-->Handover to 3rd within MNET
+ extHoTrgHandler[HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgEndHandover;
+ extHoTrgHandler[HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchPostHoRls;
+ extHoTrgHandler[HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchTvbTimerExpiry;
+ extHoTrgHandler[HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ][HAND_ABORT_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchAbortHb;
+ extHoTrgHandler[HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ][HAND_POSTHO_HOA_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgPostHoHoaEvent;
+ extHoTrgHandler[HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ][HAND_POSTHO_MOB_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchPostHoMobEvent;
+ extHoTrgHandler[HAND_ST_ANCH_H3_VC_IP_ADDRESS_REQ][HC_VB_GET_VC_ADDRESS_RSP - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleVcAddressRsp;
+
+ extHoTrgHandler[HAND_ST_ANCH_SND_H3_REQ][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgEndHandover;
+ extHoTrgHandler[HAND_ST_ANCH_SND_H3_REQ][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchPostHoRls;
+ extHoTrgHandler[HAND_ST_ANCH_SND_H3_REQ][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgT202TimerExpiry; //formerly Tho timer
+ extHoTrgHandler[HAND_ST_ANCH_SND_H3_REQ][HAND_ABORT_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchAbortHb;
+ extHoTrgHandler[HAND_ST_ANCH_SND_H3_REQ][HAND_PERFORM_HO_ACK - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchPerfHoAck;
+ extHoTrgHandler[HAND_ST_ANCH_SND_H3_REQ][HAND_PERFORM_HO_NACK - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchPerfHoNack;
+ extHoTrgHandler[HAND_ST_ANCH_SND_H3_REQ][HAND_POSTHO_HOA_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgPostHoHoaEvent;
+ extHoTrgHandler[HAND_ST_ANCH_SND_H3_REQ][HAND_POSTHO_MOB_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchPostHoMobEvent;
+
+ extHoTrgHandler[HAND_ST_ANCH_RCV_H3_REQ_ACK][HAND_END_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgEndHandover;
+ extHoTrgHandler[HAND_ST_ANCH_RCV_H3_REQ_ACK][HAND_RLS_CALL - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchPostHoRls;
+ extHoTrgHandler[HAND_ST_ANCH_RCV_H3_REQ_ACK][HAND_SRC_TIMER_EXPIRY - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgT202TimerExpiry; //formerly Tho timer
+ extHoTrgHandler[HAND_ST_ANCH_RCV_H3_REQ_ACK][HAND_ABORT_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchAbortHb;
+ extHoTrgHandler[HAND_ST_ANCH_RCV_H3_REQ_ACK][HAND_COMPLT_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchCompltHo;
+ extHoTrgHandler[HAND_ST_ANCH_RCV_H3_REQ_ACK][HAND_ABORT_HO - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchHbFail;
+ extHoTrgHandler[HAND_ST_ANCH_RCV_H3_REQ_ACK][HAND_POSTHO_HOA_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleAnchToTrgPostHoHoaEvent;
+ extHoTrgHandler[HAND_ST_ANCH_RCV_H3_REQ_ACK][HAND_POSTHO_MOB_EVENT - HAND_SRC_EVENT_BASE]
+ = &CCTargetHandoverExtHo::handleTrgToAnchPostHoMobEvent;
+ DBG_LEAVE();
+
+}
+
+// Data Structure Initialization for an individual call task
+void callDataInit(void)
+{
+ DBG_FUNC("callDataInit", CC_LAYER);
+ DBG_ENTER();
+
+ // Initialize the Message Handler Member function table.
+ msgHandlerInit();
+
+
+ // create the function pointers for use in each session.
+ callTimerExpiry = (FUNCPTR) callTimerExpiryAction;
+
+ DBG_LEAVE();
+
+}
+
+// Data Structure Initialization
+void ccInitialize(void)
+{
+ DBG_FUNC("ccInitialize", CC_LAYER);
+ DBG_ENTER();
+
+ ccOamDataInit();
+ callDataInit();
+
+ short i;
+ for(i=0; i< CC_MAX_CC_CALLS;i++)
+ {
+ // First create the semaphore and hold for initialize
+ ccSession[i].semId = semMCreate(SEM_Q_PRIORITY | SEM_INVERSION_SAFE);
+
+ // Take the semaphore
+ semTake(ccSession[i].semId, WAIT_FOREVER);
+
+ // Initialize the parent session first before the Calls.
+ // Particularly the callIndex below is important, as it is used in the HC
+ ccEntryInit(&ccSession[i]);
+ ccSession[i].callIndex = i;
+ ccSession[i].taskId = NULL;
+
+ // create two way links (pointers) between the session and half call
+ ccSession[i].sessionHandler = new CCSessionHandler(&ccSession[i]);
+
+ }
+ DBG_LEAVE();
+
+}
+
+void sessionDataInit(int i)
+{
+ DBG_FUNC("sessionDataInit", CC_LAYER);
+ DBG_ENTER();
+
+ semTake(ccSession[i].semId, WAIT_FOREVER);
+ ccSession[i].safetyTimer->cancelTimer();
+
+ //CAUSE<xxu:03-27-00> Begin
+ //ccSession[i].sessionHandler->cleanup(CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER, TRUE);
+ ccSession[i].sessionHandler->cleanup(CNI_RIL3_CAUSE_TEMPORARY_FAILURE, TRUE);
+
+ //CAUSE<xxu:03-27-00> Begin
+
+ // semFlush(ccSession[i].semId);
+ handleReleaseSession(&ccSession[i]);
+ semGive(ccSession[i].semId);
+ DBG_LEAVE();
+}
+
+void ccCallDataInit(void)
+{
+ DBG_FUNC("ccCallDataInit", CC_LAYER);
+ DBG_ENTER();
+ short i;
+ for(i=0; i< CC_MAX_CC_CALLS;i++)
+ {
+ sessionDataInit(i);
+ }
+ DBG_LEAVE();
+}
+
+int findCallUsingCallHandle( VOIP_CALL_HANDLE callHandle)
+{
+ DBG_FUNC("findCallUsingCallHandle", CC_LAYER);
+ DBG_ENTER();
+
+ short i;
+ for(i=0; i< CC_MAX_CC_CALLS;i++)
+ {
+ if (!(ccSession[i].free))
+ {
+ if ((ccSession[i].sessionHandler)->findHandle(callHandle ))
+ {
+ DBG_LEAVE();
+ return (i);
+ }
+ }
+ }
+ DBG_LEAVE();
+
+ return (CC_MAX_CC_CALLS);
+
+}
+
+// entry function for the CC Module (VxWorks Task)
+int ccMain(void)
+{
+ //ext-HO <xxu: 05-16-01>
+ //Make sure external handover trace in place
+ DBG_ENTERei();
+ DBG_ENTEReo();
+ DBG_ENTERho();
+
+ // Semaphores are defined and also taken here.
+ ccInitialize();
+
+ // Register for dynamic changes in timer values for call configuration.
+ // Moved here so that the message queue is initialized correctly.
+ callOamTrapRegister();
+
+ // Initialize the Handover RTP Pool
+ if (!InitializeHandoverRtpPool() )
+ {
+ // failed to initialize Handover RTP Pool. Abort the task.
+ printf("CC MAIN FATAL ERROR: failed to create Handover RTP Pool\n" );
+ return ERROR;
+ }
+
+ // Initialize Viper to Viper channel
+ // InitializeViperChannel(TRUE); // moved to SysCommand_VChan
+
+ // create all the call tasks.
+
+ short callId;
+ for(callId=0; callId< CC_MAX_CC_CALLS;callId++)
+ {
+ if ( (ccSession[callId].taskId = callInit(callId)) == ERROR)
+ {
+ // Call task creation failure. No point to continue.
+ // Abort the CC task.
+ return ERROR;
+ }
+
+ ccSession[callId].safetyTimer
+ = new JCCTimer((FUNCPTR) CCTimerExpiryAction,
+ ccSession[callId].taskId);
+
+ semGive(ccSession[callId].semId);
+
+ }
+
+ // local message queue buffer
+ CCMMInputMsg_t inMsg;
+
+ // enter infinite loop to wait for message and process message from MS
+ // or other layer-3 modules
+ ccTaskObj.JCTaskEnterLoop();
+ while(true)
+ {
+ //
+
+ if (msgQReceive(ccMsgQId,
+ (char *) &inMsg,
+ CC_MAX_MSG_LENGTH,
+ WAIT_FOREVER)
+ == ERROR)
+ {
+ // failed to receive message. VxWorks error. Abort the task.
+ printf("CC MAIN FATAL ERROR: failed to receive on CC Message Queue\n" );
+ return ERROR;
+ }
+
+ DBG_TRACE ("M%d->CC MAIN LOG: Task \"%s\" Received a message\n",
+ inMsg.intraL3Msg.module_id, taskName(taskIdSelf()));
+
+ // check for BTS Operational first
+
+ if (ccOldBTSState == VAL_bts_operationalState_disabled)
+ {
+ switch (inMsg.intraL3Msg.module_id) {
+ case MODULE_OAM:
+ callOamProcessTrapMsg((TrapMsg *) &inMsg);
+ break;
+ default:
+ DBG_WARNING("CC MAIN WARNING: BTS Operation Disabled. Ignoring new call request from (Module = %d)\n.",
+ inMsg.intraL3Msg.module_id);
+ }
+ }
+ else
+ {
+ // action based on the sending module
+ //
+ switch (inMsg.intraL3Msg.module_id) {
+ case MODULE_MM:
+ {
+ IntraL3Msg_t *mmInMsg = &inMsg.intraL3Msg;
+
+ DBG_TRACE("MM->CC MAIN LOG: Received Msg(%d) Prim(%d) entryId(%d)\n",
+ mmInMsg->message_type,
+ mmInMsg->primitive_type,
+ mmInMsg->entry_id);
+
+ switch (mmInMsg->primitive_type) {
+ case INTRA_L3_MM_EST_IND:
+ {
+ T_CNI_RIL3_CM_SERVICE_TYPE cmServType =
+ mmInMsg->l3_data.servReq.cmServiceType.serviceType;
+
+ if ((cmServType != CNI_RIL3_CM_SERVICE_TYPE_MO_CALL_OR_PACKET_MODE) &&
+ (cmServType != CNI_RIL3_CM_SERVICE_TYPE_EMERGENCY_CALL ) &&
+ (cmServType != CNI_RIL3_CM_SERVICE_TYPE_SUPPLEMENTARY_SERVICE ) &&
+ (cmServType != CNI_RIL3_CM_SERVICE_TYPE_SHORT_MESSAGE_SERVICE ) )
+ {
+ // This CM Service Type not allowed
+ // Clear the call - Send Rel Req to MM
+ IntraL3Msg_t mmOutMsg;
+ sendMM (INTRA_L3_MM_REL_REQ,
+ INTRA_L3_NULL_MSG,
+ mmInMsg->entry_id,
+ &mmOutMsg);
+ break;
+ }
+
+ if ((callId = mobInCall2 (mmInMsg->entry_id)) != JCC_ERROR)
+ {
+ DBG_WARNING ("MM->CC MAIN WARNING: recv MM-EST-IND but CallTask already allocated sessionId(%d)\n",
+ callId);
+ }
+ else if ( initNewMSConn(mmInMsg->entry_id, callId) == JCC_ERROR )
+ {
+ DBG_WARNING("MM->CC MAIN WARNING: New Connection could not be initialized\n");
+
+ // Clear the call - Send Rel Req to MM
+ IntraL3Msg_t mmOutMsg;
+ sendMM (INTRA_L3_MM_REL_REQ,
+ INTRA_L3_NULL_MSG,
+ mmInMsg->entry_id,
+ &mmOutMsg);
+ break;
+ }
+
+ //
+ semTake(ccSession[callId].semId, WAIT_FOREVER);
+
+ // Find the ludbIndex for the Originating IMSI
+ if (JCC_ERROR ==
+ (ccSession[callId].sessionHandler->ludbIndex
+ = ludbGetEntryByMobileId(mmInMsg->l3_data.servReq.mobileId)))
+ {
+ // We need to take care of the case where we
+ // retrieve the profile when not present.
+ DBG_WARNING("MM->CC MAIN WARNING: Originating Mobile not registered in LUDB sessionId(%d)\n",
+ callId);
+
+ // Reset the IRT Table entry to point to the mother task's Queue
+ ccSession[callId].sessionHandler->resetIrt();
+
+ handleReleaseSession(&ccSession[callId]);
+ IntraL3Msg_t mmOutMsg;
+ sendMM (INTRA_L3_MM_REL_REQ,
+ INTRA_L3_NULL_MSG,
+ mmInMsg->entry_id,
+ &mmOutMsg);
+ semGive(ccSession[callId].semId);
+
+ break;
+ }
+
+ //CDR <xxu:08-23-00>
+ memcpy(&ccSession[callId].sessionHandler->mobileId,
+ &mmInMsg->l3_data.servReq.mobileId,
+ sizeof(T_CNI_RIL3_IE_MOBILE_ID));
+
+ // Store Mobile Classmark Info <chenj:07-24-01>
+ ccSession[callId].sessionHandler->classmark2Info =
+ mmInMsg->l3_data.servReq.classmark2;
+
+ // Setup the Session for Mobile Origination
+ if (!(ccSession[callId].sessionHandler->setupOrig(mmInMsg->entry_id, cmServType)))
+ {
+ handleReleaseSession(&ccSession[callId]);
+ IntraL3Msg_t mmOutMsg;
+ sendMM (INTRA_L3_MM_REL_REQ,
+ INTRA_L3_NULL_MSG,
+ mmInMsg->entry_id,
+ &mmOutMsg);
+ semGive(ccSession[callId].semId);
+ break;
+ }
+
+ // Give up the originating session semaphore.
+ semGive(ccSession[callId].semId);
+ break;
+ }
+
+ default:
+ DBG_WARNING("MM->CC MAIN WARNING: Unexpected Msg(%d) Prim(%d)MM.\n",
+ mmInMsg->message_type, mmInMsg->primitive_type);
+ }
+
+ break;
+ }
+ case MODULE_CC:
+ {
+ IntraL3Msg_t *ccInMsg = &inMsg.intraL3Msg;
+
+ DBG_TRACE("CC->CC MAIN LOG: Received msg(%d) callLeg(%d) signature(%d))\n",
+ ccInMsg->message_type, ccInMsg->entry_id, ccInMsg->signature);
+
+ if (ccInMsg->message_type != INTRA_L3_TIMEOUT_MSG)
+ {
+ DBG_ERROR("CC->CC MAIN LOG: Unexpected (Msg Type = %d) from CC.\n",
+ ccInMsg->message_type);
+ break;
+ }
+
+ // Inform for debugging
+ // Action - Kill and restart the call process?
+ DBG_ERROR("CC->CC MAIN ERROR: Call running too long(infinite loop?) CallTaskId(%d)\n",
+ ccInMsg->entry_id);
+ break;
+ }
+
+ case MODULE_H323:
+ {
+ IntraL3Msg_t *h323InMsg = &inMsg.intraL3Msg ;
+ short ludbIndex = h323InMsg->entry_id;
+ bool isFirstSetup = true ;
+
+ DBG_TRACE("H323->CC MAIN LOG: Received a VOIP message {msgType=%d, h323Hndl=%p, entryId=%d}\n",
+ h323InMsg->message_type,
+ (int)(h323InMsg->call_handle),
+ h323InMsg->entry_id);
+
+ switch (h323InMsg->message_type) {
+ case INTRA_L3_CC_Q931_SETUP:
+ if ((callId = ccIsHandoverCallSetup(h323InMsg)) != JCC_ERROR)
+ {
+ DBG_TRACEei("{\nMNETeiTRACE(ccMain): received ext-handin SETUP {msgType=%d, callId=%d, h323Hndl=%p, entryId=%d\n}\n",
+ h323InMsg->message_type,
+ callId,
+ (int)(h323InMsg->call_handle),
+ h323InMsg->entry_id);
+
+ //Proceed with setting up the handover call leg
+ if ( !ccSession[callId].sessionHandler->setupTermExtHo(h323InMsg) )
+ {
+ //Failed to setup the handover call leg, report the failure and abort ext-handin
+ DBG_ERRORei("{\nMNETeiERROR(ccMain): setupTermExtHo failed {msgType=%d, callId=%d, h323Hndl=%p, entryId=%d\n}\n",
+ h323InMsg->message_type,
+ callId,
+ (int)(h323InMsg->call_handle),
+ h323InMsg->entry_id);
+
+ DBG_CCDATA(callId);
+
+ //Give up this ext-handin call leg setup and notify VOIP task
+ if (!sendH323DisconnectMsgExtHo(h323InMsg->call_handle,
+ CNI_RIL3_CAUSE_CALL_REJECTED) )
+ {
+ DBG_ERRORei("{\nMNETeiERROR(ccMain): sendH323 DISCONNECT failed {msgType=%d, callId=%d, h323Hndl=%p, entryId=%d, ccCause=%d\n}\n",
+ h323InMsg->message_type,
+ callId,
+ (int)(h323InMsg->call_handle),
+ h323InMsg->entry_id,
+ (int)CNI_RIL3_CAUSE_CALL_REJECTED);
+ }
+
+ //Cleanup
+ sessionDataInit(callId);
+
+ break;
+ }
+
+ //Proceed the handin callleg setup to its responsible call task
+
+ ccSession[callId].sessionHandler->hoCallHandle = h323InMsg->call_handle;
+
+ if (ERROR == msgQSend( ccSession[callId].msgQId,
+ (char *) h323InMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT,
+ MSG_PRI_NORMAL
+ ) )
+ {
+ DBG_ERRORei("{\nMNETeiERROR(ccMain): msgQSend error {QID=%p, msgType=%d, callId=%d, h323Hndl=%p, entryId=%d\n}\n",
+ (int)ccSession[callId].msgQId,
+ h323InMsg->message_type,
+ callId,
+ (int)(h323InMsg->call_handle),
+ h323InMsg->entry_id
+ );
+
+ DBG_CCDATA(callId);
+
+ //vxWorks API failed, abort the the handin effort.
+ if (!sendH323DisconnectMsgExtHo( h323InMsg->call_handle,
+ CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER ))
+ {
+ DBG_ERRORei("{\nMNETeiERROR(ccMain): sendH323 DISCONNECT failed {msgType=%d, callId=%d, h323Hndl=%p, entryId=%d, ccCause=%d\n}\n",
+ h323InMsg->message_type,
+ callId,
+ (int)(h323InMsg->call_handle),
+ h323InMsg->entry_id,
+ (int)CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER);
+ }
+
+ //Cleanup
+ sessionDataInit(callId);
+
+ break;
+ }
+
+ break;
+
+ } //ext-HO <xxu:05-07-10> END
+
+ else
+ {
+ if (!ludbGetSubscInfoExists(ludbIndex))
+ {
+
+ DBG_ERROR("H323->CC MAIN ERROR: VOIP passed an invalid ludb index(%d) Msg(%d)\n",
+ ludbIndex, h323InMsg->message_type);
+
+ //CDR <xxu:08-23-00>
+ if (!sendH323DisconnectMsg(h323InMsg,
+ CDR_REC_UNSUCCESSFUL_CALL_ATTEMPT,
+ CNI_RIL3_CAUSE_CALL_REJECTED))
+ {
+ DBG_ERROR("H323->CC MAIN ERROR: Failed to send Disconnect cdrCause(%d) ccCause(%d)\n",
+ (int)CDR_REC_UNSUCCESSFUL_CALL_ATTEMPT,
+ (int)CNI_RIL3_CAUSE_CALL_REJECTED);
+ }
+
+ break;
+ }
+
+ // Check if the user is already in a call. Entry id has the ludb index
+ if ((callId = mobInCall(ludbIndex))
+ != JCC_ERROR)
+ {
+ // Need to send this event to the existing call.
+ // Use the current call Id.
+ isFirstSetup = false;
+ }
+
+ // Connection Initialization -
+ // New MS MM Connection that needs a CC level service
+ else if ((callId = ccCallAlloc ())
+ == JCC_ERROR)
+ {
+ DBG_WARNING("H323->CC MAIN WARNING: No CC Connections left for allocation Msg(%d)\n",
+ h323InMsg->message_type);
+
+ //CDR <xxu:08-23-00>
+ if (!sendH323DisconnectMsg( h323InMsg,
+ CDR_REC_UNSUCCESSFUL_CALL_ATTEMPT,
+ CNI_RIL3_CAUSE_SWITCHING_EQUIPMENT_CONGESTION ))
+ {
+
+ DBG_ERROR("H323->CC MAIN ERROR: Failed to send Disconnect cdrCause(%d) ccCause(%d)\n",
+ (int)CDR_REC_UNSUCCESSFUL_CALL_ATTEMPT,
+ (int)CNI_RIL3_CAUSE_SWITCHING_EQUIPMENT_CONGESTION);
+ }
+
+
+ break;
+ }
+
+ // first and the concecutive MT call setups
+ semTake(ccSession[callId].semId, WAIT_FOREVER);
+
+ //3TY<xxu: 04-09-99> race condition
+ ccSession[callId].free = false ;
+ ccSession[callId].sessionHandler->ludbIndex = ludbIndex;
+
+ // Setup the Session for Mobile Termination
+ if (!ccSession[callId].sessionHandler->setupTerm( h323InMsg->call_handle ,
+ (int)h323InMsg->H323CRV,
+ 0 ,
+ isFirstSetup ))
+ {
+ // Do not proceed with the termination attempt.
+ // MM Setup in progress initiated by the SMS-PP or another call setup
+ // Busy and Call Waiting cases are handled inside setupTerm.
+
+ DBG_TRACE("H323->CC MAIN TRACE: setupTerm failed Msg(%d) h323CallHandle(%p) sessionId(%d) ludbId(%d)\n",
+ h323InMsg->message_type,
+ (int)(h323InMsg->call_handle), callId,
+ h323InMsg->entry_id);
+
+ //CDR <xxu:08-23-00>
+ if (!sendH323DisconnectMsg( h323InMsg,
+ CDR_REC_UNSUCCESSFUL_CALL_ATTEMPT,
+ CNI_RIL3_CAUSE_USER_BUSY))
+ {
+ DBG_ERROR("H323->CC MAIN ERROR: Failed to send Disconnect cdrCause(%d) ccCause(%d)\n",
+ (int)CDR_REC_UNSUCCESSFUL_CALL_ATTEMPT,
+ (int)CNI_RIL3_CAUSE_USER_BUSY);
+ }
+
+ // Give up the terminating session semaphore.
+ semGive(ccSession[callId].semId);
+
+ break;
+ }
+
+ // Give up the terminating session semaphore.
+ semGive(ccSession[callId].semId);
+
+ if (ERROR == msgQSend( ccSession[callId].msgQId,
+ (char *) h323InMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT, //PR1553 <xxu> WAIT_FOREVER,
+ MSG_PRI_NORMAL
+ ) )
+ {
+
+ DBG_ERROR("H323->CC MAIN ERROR: sendCC msgQSend (QID = %p) error\n ",
+ (int)ccSession[callId].msgQId);
+
+ //CAUSE<xxu:03-21-00> BEGIN
+ //Major problem with the queue. Need to release the call!
+ //sessionDataInit(callId);
+
+ //CDR <xxu:08-23-00>
+ if (!sendH323DisconnectMsg( h323InMsg,
+ CDR_REC_UNSUCCESSFUL_CALL_ATTEMPT,
+ CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER ))
+ {
+ DBG_ERROR("H323->CC MAIN ERROR: Failed to send Disconnect cdrCause(%d) ccCause(%d)\n",
+ (int)CDR_REC_UNSUCCESSFUL_CALL_ATTEMPT,
+ (int)CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER);
+ }
+
+ sessionDataInit(callId);
+
+ break;
+ }
+
+ break;
+ }
+
+ case INTRA_L3_SMS_MESSAGE:
+ {
+ /* Expecting MNSMS-EST Req only. MNSMS-ABORT Req should be discarded.
+ All the other messages will be rejected. */
+
+ SMS_VBLINK_MSGTYPE MsgType = (SMS_VBLINK_MSGTYPE)h323InMsg->l3_data.smsVbMsg.hdr.msgType;
+
+ if (MsgType == MNSMS_ABORT_Req || MsgType == MNSMS_REL_Req)
+ {
+ // Late Abort Mobile is not involved in any activities. Do nothing
+ DBG_TRACE ("Late MNSMS-ABORT Req ref. number %d received from ViperBase.\n",
+ h323InMsg->l3_data.smsVbMsg.hdr.refNum);
+ break;
+ }
+
+ if (MsgType != MNSMS_EST_Req)
+ {
+ // Late SMS message other than Abort or Release. Need to be rejected.
+ DBG_TRACE ("Late MNSMS message type %d, ref. number %d received from ViperBase.\n",
+ MsgType, h323InMsg->l3_data.smsVbMsg.hdr.refNum);
+
+ if (!smsSendVbLinkRelease(ludbIndex, h323InMsg->l3_data.smsVbMsg.hdr.refNum))
+ {
+ DBG_ERROR("SMS->VOIP Error : Failed to reject SMS transaction.\n");
+ }
+ break;
+ }
+
+ if (!ludbGetSubscInfoExists (ludbIndex))
+ { // received ludb index is not valid
+ DBG_ERROR ("SMS->VOIP Error : Message contains invalid LUDB index =%d\n",
+ ludbIndex);
+
+ /* This error could only happend due to an implementation error in VB<->VC.
+ Send MNSMS-ERROR Ind to the originator.
+ This will require allocate Call task, initialize it, send reject and
+ reliase. Very low chance for a potential problem: could be no availiable
+ CC. */
+
+ if (!smsSendVbLinkRelease(ludbIndex, h323InMsg->l3_data.smsVbMsg.hdr.refNum,
+ CNI_RIL3_RP_CAUSE_UNIDENTIFIED_SUBSCRIBER))
+ {
+ DBG_ERROR("SMS->VOIP Error: Failed to reject SMS transaction.\n");
+ }
+ break;
+ }
+
+ if ((callId = mobInCall(ludbIndex)) != JCC_ERROR)
+ {
+ // Need to send this event to the existing call.
+ // Use an existing call Id.
+ isFirstSetup = false;
+ }
+ // Connection Initialization -
+ // New MS MM Connection that needs CM level service
+ else if ((callId = ccCallAlloc ()) == JCC_ERROR)
+ {
+ // Error - No Connections left.
+ if (!smsSendVbLinkRelease(ludbIndex, h323InMsg->l3_data.smsVbMsg.hdr.refNum,
+ CNI_RIL3_RP_CAUSE_CONGESTION ))
+ {
+ DBG_ERROR("SMS->VOIP Error: Failed to reject SMS transaction.\n");
+ }
+
+ DBG_WARNING ("CC Warning: No Connections left.\n");
+ break;
+ }
+
+ // first and the concecutive MT SMS setups
+ semTake (ccSession[callId].semId, WAIT_FOREVER);
+
+ ccSession[callId].free = false ;
+ ccSession[callId].sessionHandler->ludbIndex = ludbIndex;
+
+ // Setup the Session for SMS Mobile Termination
+ // New function (setupSmsTerm) or modify the existing one???
+ if (!ccSession[callId].sessionHandler->setupTerm(VOIP_NULL_CALL_HANDLE,
+ 0 , //CDR <xxu:08-24-00>
+ 0 , //CDR <xxu:08-24-00>
+ isFirstSetup ))
+ {
+ // Do not proceed with the termination attempt.
+ // 1.MM MT Setup in progress initiated by SMS-PP or MT call setup
+ // 2.MS is involved in ongoing MT SMS transfer
+
+ if (!smsSendVbLinkRelease (ludbIndex, h323InMsg->l3_data.smsVbMsg.hdr.refNum,
+ CNI_RIL3_RP_CAUSE_CONGESTION ))
+ {
+ DBG_ERROR ("SMS->VOIP Error: Failed to reject SMS transaction.\n");
+ }
+
+ // Give up the terminating session semaphore.
+ semGive (ccSession[callId].semId);
+
+ DBG_TRACE ("MT SMS attempt is rejected due to busy conditions.\n");
+ break;
+ }
+
+ // Give up the terminating session semaphore.
+ semGive(ccSession[callId].semId);
+
+ if (ERROR == msgQSend (ccSession[callId].msgQId ,
+ (char *) h323InMsg ,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT , //PR1553 <xxu> WAIT_FOREVER
+ MSG_PRI_NORMAL ))
+ {
+ // Major problem with the queue. Need to release the call
+ if (!smsSendVbLinkRelease(ludbIndex, h323InMsg->l3_data.smsVbMsg.hdr.refNum))
+ {
+ DBG_ERROR ("SMS->VOIP Error: Failed to reject SMS transaction.\n");
+ }
+
+ DBG_ERROR ("CC->CC Call(SMS) Error: sendCC msgQSend (QID = %p) error\n ",
+ (int)ccSession[callId].msgQId);
+
+ sessionDataInit (callId);
+
+ break;
+ }
+ }
+ break;
+
+ case INTRA_L3_CC_VC_UPDATE_INFO:
+ {
+ DBG_TRACE ("H323->CC MAIN LOG: Received VC Update Msg(%d) for this GP\n",
+ h323InMsg->message_type);
+
+ if (h323InMsg->l3_data.statusVCMsg.status != VC_STATUS_DOWN)
+ {
+ // Unknown ViperCell Status
+ DBG_WARNING ("H323->CC MAIN WARNING: Received unknown ViperCell update status %d\n",
+ h323InMsg->l3_data.statusVCMsg.status);
+ break;
+ }
+
+ for (callId = 0; callId < CC_MAX_CC_CALLS; ++callId)
+ {
+ if (ccSession[callId].free != True &&
+ ccSession[callId].sessionHandler != NULL )
+ {
+ //GCELL<tyu:06-01-01>
+ if (ccSession[callId].sessionHandler->handoverSession->hoGlobalCellId_.ci ==
+ h323InMsg->l3_data.statusVCMsg.btsID.cellId &&
+ ccSession[callId].sessionHandler->handoverSession->hoGlobalCellId_.lac ==
+ h323InMsg->l3_data.statusVCMsg.btsID.networkId)
+ // networkId is not in use
+ {
+ // This active CC session is involved in Handover with
+ // the failed ViperCell
+ if (msgQSend (ccSession[callId].msgQId,
+ (char *)h323InMsg ,
+ sizeof (IntraL3Msg_t) ,
+ NO_WAIT , //PR1553 <xxu> WAIT_FOREVER
+ MSG_PRI_NORMAL ) == ERROR)
+ {
+ DBG_ERROR ("H323->CC MAIN ERROR: sendCC msgQSend (QID = %p) error Msg(%d)\n ",
+ (int)ccSession[h323InMsg->entry_id].msgQId,
+ h323InMsg->message_type);
+ } // Sending Msg
+ } // Compare cell ID
+ } // Check Call session
+ } // for loop
+ break;
+ }
+
+ default:
+
+ // route messages that come with a null txn id through CC Main Task.
+ if (h323InMsg->entry_id == VOIP_API_NULL_TXN_ID)
+ {
+ // Null value is received for transaction id.
+ // Check if there is a valid call with this call handle
+ if ((h323InMsg->entry_id = findCallUsingCallHandle( h323InMsg->call_handle))
+ == (CC_MAX_CC_CALLS))
+ {
+ DBG_WARNING("H323->CC MAIN WARNING: Late Msg. for (Handle = %p) with Null Transaction Id.\n",
+ (int)h323InMsg->call_handle);
+
+ }
+ else
+ {
+ if (ERROR == msgQSend( ccSession[h323InMsg->entry_id].msgQId,
+ (char *) h323InMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT, //PR1553 <xxu> WAIT_FOREVER,
+ MSG_PRI_NORMAL
+ ) )
+ {
+ DBG_ERROR("H323->CC MAIN ERROR: sendCC msgQSend (QID = %p) error Msg(%d)\n ",
+ (int)ccSession[h323InMsg->entry_id].msgQId,
+ h323InMsg->message_type);
+
+ }
+ else
+ {
+ DBG_WARNING("H323->CC MAIN WARNING: Msg(%d) for (Handle=%p) w/Null Tran. for (call=%d),(ludbId=%d)\n",
+ h323InMsg->message_type,
+ (int)h323InMsg->call_handle,
+ h323InMsg->entry_id,
+ ccSession[h323InMsg->entry_id].sessionHandler->ludbIndex);
+ }
+ }
+ }
+ }
+ }
+ break;
+
+ //ext-HO <xxu:05-16-01>
+ case MODULE_EXTHOA:
+ {
+ InterHoaVcMsg_t *hoaInMsg = &inMsg.hoaCcMsg;
+ DBG_TRACEei("{\nMNETeiTRACE(ccMain): Received Msg from HOA (msgType=%d)\n}\n",
+ hoaInMsg->msgType);
+
+ switch (hoaInMsg->msgType)
+ {
+ case INTER_EHO_PERFORM_HANDOVER_REQUEST:
+ {
+ // Handle external-handin scenario
+ if (JCC_ERROR == (callId=ccCallAlloc()) )
+ {
+ // Error - No Connections left. N need to send Handover Nack for now
+ // other side will timeout
+ DBG_WARNINGei("{\nMNETeiWARNING(ccMain): No Connections left in GP10\n}\n");
+ break;
+ }
+
+ //
+ semTake(ccSession[callId].semId, WAIT_FOREVER);
+
+ if (ERROR == msgQSend( ccSession[callId].msgQId,
+ (char *) &inMsg,
+ sizeof(struct VcCcMsg_t),
+ NO_WAIT,
+ MSG_PRI_NORMAL
+ ) )
+ {
+ // Need to release the call!
+ handleReleaseSession(&ccSession[callId]);
+
+ // no need to send Handover Nack for now. other side will timeout
+ DBG_ERRORei("{\nMNETeiERROR(ccMain): msgQSend failed! (QID=%p, callId=%d)\n}\n",
+ (int)ccSession[callId].msgQId, callId);
+ }
+
+ // Setup the Session for Mobile Handover
+ ccSession[callId].sessionHandler->setupTargetHandoverExtHo();
+
+ // Give up the handover session semaphore.
+ semGive(ccSession[callId].semId);
+ break;
+ }
+
+ default:
+ {
+
+ DBG_ERRORei("{\nMNETeiWARNING(ccMain): received unexpected msg from HOA (msgType=%d)\n}\n",
+ hoaInMsg->msgType);
+ break;
+ }
+
+ }
+
+ break;
+
+ }
+
+ case MODULE_EXT_VC:
+ {
+ InterVcMsg_t *vcInMsg = &inMsg.vcCcMsg.vcToVcMsg;
+
+ DBG_TRACE ("VC->CC MAIN LOG: Received Msg(%d) from another GP\n",
+ vcInMsg->msgType);
+
+ switch (vcInMsg->msgType) {
+ case INTER_VC_CC_PERFORM_HANDOVER:
+ {
+
+ // Connection Initialization -
+ // New Handover Connection that needs a CC level service
+
+ if ((callId = ccCallAlloc())
+ == JCC_ERROR)
+ {
+ // Error - No Connections left.
+ // no need to send Handover Nack for now
+ // other side will timeout
+ DBG_WARNING("VC->CC MAIN WARNING: No Connections left for handover\n ");
+ break;
+ }
+
+ //
+ semTake(ccSession[callId].semId, WAIT_FOREVER);
+
+ if (ERROR == msgQSend( ccSession[callId].msgQId,
+ (char *) &inMsg,
+ sizeof(struct VcCcMsg_t),
+ NO_WAIT, //PR1553 <xxu> WAIT_FOREVER,
+ MSG_PRI_NORMAL
+ ) )
+ {
+ // Need to release the call!
+ handleReleaseSession(&ccSession[callId]);
+
+ // no need to send Handover Nack for now
+ // other side will timeout
+ DBG_ERROR("VC->CC MAIN ERROR: sendCC msgQSend (QID = %p) sessionId(%d) error\n ",
+ (int)ccSession[callId].msgQId, callId);
+ }
+
+ // Setup the Session for Mobile Handover
+ ccSession[callId].sessionHandler->setupTargetHandover();
+
+ // Give up the handover session semaphore.
+ semGive(ccSession[callId].semId);
+ break;
+ }
+
+ default:
+ DBG_ERROR("VC->CC MAIN ERROR: Unexpected (Msg Type = %d) from other ViperCell.\n",
+ vcInMsg->msgType);
+ }
+
+ break;
+ }
+
+ case MODULE_OAM:
+ TrapMsg *oamInMsg;
+ oamInMsg = (TrapMsg*)&inMsg;
+ DBG_TRACE("OAM->CC MAIN LOG: received an OAM msg(%d) tag(%x) valTyp(%d) val(%d)\n",
+ oamInMsg->msgType,
+ oamInMsg->mibTag,
+ oamInMsg->valType,
+ oamInMsg->val.varVal);
+
+ callOamProcessTrapMsg((TrapMsg *) &inMsg);
+ break;
+
+ case MODULE_RM:
+ case T_CNI_MD_ID:
+ default:
+ // log as a warning. let the user of the system take action based on other symptoms.
+ DBG_WARNING("CC MAIN WARNING: (Late?) Msg. from unexpected Module, (Mod. Id = %d)(primTyp=%d) (sapi %d, entryId %d)\n",
+ inMsg.intraL3Msg.module_id, inMsg.mdMsg.primitive_type,
+ inMsg.mdMsg.sapi,
+ inMsg.mdMsg.entry_id
+ );
+ }
+ }
+ }
+}
+
diff --git a/data/mnet/GP10/Host/cc/src/CCUtil.cpp b/data/mnet/GP10/Host/cc/src/CCUtil.cpp
new file mode 100644
index 0000000..7c81e65
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CCUtil.cpp
@@ -0,0 +1,222 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCUtil.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "JCC/JCCLog.h"
+#include "logging/VCLOGGING.h"
+
+#include "stdio.h"
+
+#include "CC/CCsessionHandler.h"
+
+// included L3 Message header for messages from other Layer 3 modules (CC, RR)
+#include "JCC/JCCL3Msg.h"
+#include "rm/rm_ccintf.h"
+
+#include "ril3/ril3_sms_rp.h"
+#include "voip/vblink.h"
+
+
+// CC Message Constants
+#include "CC/CCconfig.h"
+
+#include "CC/CCUtil.h"
+
+bool smsSendVbLinkRelease (LUDB_ID, UINT32, T_CNI_RIL3_RP_CAUSE_VALUE cause =
+ CNI_RIL3_RP_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE);
+
+extern bool smsUseVblink;
+
+
+/*----------------------------------------------------------------*/
+
+void ccEntryInit(CCSession_t *session)
+{
+ session->free = true;
+
+}
+
+// Handles the release of a session
+void
+handleReleaseSession(CCSession_t *session)
+{
+ DBG_FUNC("handleReleaseSession", CC_LAYER);
+ DBG_ENTER();
+ ccEntryInit(session);
+ DBG_LEAVE();
+}
+
+short ccCallAlloc()
+{
+ DBG_FUNC("ccCallAlloc", CC_LAYER);
+ DBG_ENTER();
+ short i;
+ for(i=0; i< CC_MAX_CC_CALLS; i++)
+ {
+ if (ccSession[i].free == true)
+ {
+ // take the semaphore for the originating session.
+ semTake(ccSession[i].semId, WAIT_FOREVER);
+
+ ccSession[i].free = false;
+
+ semGive(ccSession[i].semId);
+
+ DBG_LEAVE();
+ return i;
+ }
+ }
+
+ DBG_LEAVE();
+ return JCC_ERROR;
+}
+
+
+short initNewMSConn (const T_CNI_IRT_ID newEntryId,
+ short &callIndex )
+{
+ short retVal = JCC_SUCCESS;
+ T_CNI_L3_ID newId ;
+
+ DBG_FUNC("initNewMSConn", CC_LAYER);
+ DBG_ENTER();
+
+ // Connection Initialization -
+ // New MS MM Connection that needs a CC level service
+ if ((callIndex = ccCallAlloc()) == JCC_ERROR)
+ {
+ // Error - No Connections left.
+ DBG_ERROR ("CC Error : No Connections left. \n ");
+
+ retVal = JCC_ERROR;
+ }
+ else
+ {
+ DBG_TRACE ("CC Log: (call selected = %d) for (entry id = %d) \n", callIndex, newEntryId);
+
+ newId.msgq_id = ccSession[callIndex].msgQId;
+ newId.sub_id = 0 ; // No sub id needed here
+
+ // Update IRT
+ if (ccSession[callIndex].sessionHandler->setIrt (newEntryId, newId) == false)
+ {
+ semTake ( ccSession[callIndex].semId, WAIT_FOREVER);
+ handleReleaseSession (&ccSession[callIndex] );
+ semGive ( ccSession[callIndex].semId);
+
+ retVal = JCC_ERROR;
+ }
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+void ccEntryPrint(CCSession_t &session, JCCPrintStFn fnPtr)
+{
+ char callStr1[90];
+
+ // Pre-format the call data Strings.
+ sprintf(&callStr1[0],
+ "Sess. Data: (Qid %p), (TaskId %p) (callId %d)\n",
+ session.msgQId,
+ session.taskId,
+ session.callIndex);
+
+ (*fnPtr)(&callStr1[0]);
+
+ session.sessionHandler->printData(fnPtr);
+
+}
+
+
+// Internal Data Printing
+void ccDataPrint()
+{
+ short i;
+ for(i=0; i< CC_MAX_CC_CALLS;i++)
+ {
+ printf("CC Session#(%d):", i);
+ if (ccSession[i].free)
+ {
+ printf(" is free\n");
+ }
+ else
+ {
+ ccEntryPrint(ccSession[i], JCCPrintf);
+ }
+ }
+}
+
+
+bool smsSendVbLinkRelease(LUDB_ID ludbIndex, UINT32 refNum,
+ T_CNI_RIL3_RP_CAUSE_VALUE cause = CNI_RIL3_RP_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE)
+/* Used to send MNSMS-ERROR Ind from outside SMS Leg. Mostly in error cases. */
+{
+ SmsVblinkMsg_t smsMsgOut;
+ bool retVal = true;
+
+ DBG_FUNC ("smsSendVbLinkRelease", CC_SMS_LAYER); //Igal: change it later to CC_LAYER
+ DBG_ENTER();
+
+ memset (&smsMsgOut, sizeof (SmsVblinkMsg_t), 0);
+
+ // prepare message data. Ensure the network byte order for the header elements
+ smsMsgOut.hdr.magic = htonl (SMS_MAGIC_NUMBER);
+ smsMsgOut.hdr.refNum = htonl (refNum );
+ smsMsgOut.hdr.msgType = htonl (MNSMS_ERROR_Ind );
+ smsMsgOut.hdr.status = htonl (cause );
+ smsMsgOut.hdr.msgLen = htonl (0 );
+
+ // sent message to VBLink
+ if (smsUseVblink)
+ {
+ // The total message length calculation could be wrong
+ // if ported to the different platform or
+ // compiled with the word alignment other than 4 bytes
+ retVal = VBLinkMsToNetSmspp (ludbIndex ,
+ (unsigned char *)&smsMsgOut,
+ SMS_VBLINK_HDRSIZE );
+ DBG_TRACE ("Send MNSMS-ERROR Ind, ref. number %d, cause %d \n", refNum, cause);
+ }
+ else
+ {
+ DBG_TRACE ("SMS: VBLink interface is OFF. Message will not be send to ViperBase\n");
+ DBG_HEXDUMP ((unsigned char *)&smsMsgOut, sizeof (SMS_VBLINK_HDRSIZE));
+ }
+
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+//ext-HO <xxu:05-16-01>
+void ccSetCallTrace(void)
+{
+ ccCallTrace=true;
+}
+
+void ccResetCallTrace(void)
+{
+ ccCallTrace=false;
+}
+
diff --git a/data/mnet/GP10/Host/cc/src/CCconfig.cpp b/data/mnet/GP10/Host/cc/src/CCconfig.cpp
new file mode 100644
index 0000000..f12ba9e
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CCconfig.cpp
@@ -0,0 +1,62 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCconfig.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// included VxWorks headers
+#include "vxWorks.h"
+#include "MnetModuleId.h"
+#include "taskLib.h"
+
+#include "CC/CCconfig.h"
+
+#include "Os/JCTask.h"
+#include "GP10OsTune.h"
+
+#include "stdio.h"
+
+// declare the CC task entry function
+extern int ccMain();
+extern JCTask ccTaskObj;
+
+
+void ccInit()
+{
+ // This CC configuration function initializes the entire CC
+ // module.
+ //
+ // A typical invocation is usually be done from the
+ // OA&M subsystem
+
+ // create the CC task
+ if( ERROR == ccTaskObj.JCTaskSpawn(
+ CC_TASK_PRIORITY, // priority
+ CC_TASK_OPTION, // option word
+ CC_TASK_STACK_SIZE, // stack size
+ (FUNCPTR) ccMain, // entry function pointer
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ MODULE_CC,
+ JC_CRITICAL_TASK) )
+ {
+ // error creating task. log the error and return.
+ printf("CC FATAL ERROR: failed to create CC Main task.\n" );
+ };
+}
+
diff --git a/data/mnet/GP10/Host/cc/src/CallConfig.cpp b/data/mnet/GP10/Host/cc/src/CallConfig.cpp
new file mode 100644
index 0000000..b75f635
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CallConfig.cpp
@@ -0,0 +1,73 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CallConfig.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// included VxWorks headers
+#include "vxWorks.h"
+#include "JCC/JCCLog.h"
+#include "MnetModuleId.h"
+#include "taskLib.h"
+#include "stdio.h"
+
+#include "CC/CCconfig.h"
+#include "Os/JCTask.h"
+#include "GP10OsTune.h"
+
+// declare the CC task entry function
+extern int callMain(const short callIndex);
+extern JCTask *CallTaskObjs[CC_MAX_CC_CALLS_DEF_VAL];
+
+
+int callInit(const short callIndex)
+{
+ // This call configuration function initializes one call session task.
+ //
+ // A typical invocation is usually be done from the
+ // CC subsystem
+
+ int taskId;
+ char callTaskName[10];
+
+ sprintf(&callTaskName[0], "Call-%d\0", callIndex);
+
+ // create the call task
+ CallTaskObjs[callIndex] = new JCTask(&callTaskName[0]);
+ if(( taskId = CallTaskObjs[callIndex]->JCTaskSpawn(
+ CC_SUB_TASK_PRIORITY, // priority
+ CC_SUB_TASK_OPTION, // option word
+// Calltask (Call-0) was overflowing at 10,352 bytes with
+// external handover turned on and doing 3 way call hold/retrieve toggling
+// The stack size is increased to 20,000 for now.
+// Need to find a better number later!
+// ext-ho <chenj:08-16-01>
+ CC_SUB_TASK_STACK_SIZE * 2, // stack size
+ (FUNCPTR) callMain, // entry function pointer
+ callIndex, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ MODULE_CC,
+ JC_NON_CRITICAL_TASK) )
+ == ERROR )
+ {
+ // error creating task. log the error and return.
+ printf("CC CALL FATAL ERROR: failed to create CC Call (task = %d)\n",
+ callIndex);
+ };
+ return taskId;
+}
diff --git a/data/mnet/GP10/Host/cc/src/CallLeg.cpp b/data/mnet/GP10/Host/cc/src/CallLeg.cpp
new file mode 100644
index 0000000..6653016
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CallLeg.cpp
@@ -0,0 +1,558 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CallLeg.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+//
+#include "taskLib.h"
+
+#include "jcc/JCCLog.h"
+
+#include "logging/VCLOGGING.h"
+
+#include "defs.h"
+#include "oam_api.h"
+#include "pm/pm_class.h"
+
+#include "CC/CCSessionHandler.h"
+
+#include "CC/CallLeg.h"
+
+extern int CALL_CDR_10M;
+
+#include "new.h"
+
+// Temporarily use csu_head instead of csu_intf
+#include "csunew/csu_head.h"
+
+//CDR <xxu:08-24-00>
+//CDR <xxu:08-21-00> BEGIN
+#include "JCC/LUDBapi.h"
+#include "CDR/CdrVoiceCall.h"
+#include "CDR/CdrSSA.h"
+extern BtsBasicPackage ccBtsBasicPackage;
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+//BCT-TEST
+//BCT <xxu:07-12-00> BEGIN
+
+T_CNI_RIL3_SI_TI
+//CallLeg::getBctTi()
+TwoPartyCallLeg::getBctTi()
+{
+ return (parent->bctTi_);
+}
+bool
+//CallLeg::getBctInvoke()
+TwoPartyCallLeg::getBctInvoke()
+{
+ return (parent->bctInvoke_);
+}
+
+TwoPartyCallLeg*
+//CallLeg::getBctLeg()
+TwoPartyCallLeg::getBctLeg()
+{
+ return (parent->bctLeg_);
+}
+
+T_CNI_IRT_ID
+//CallLeg::getEntryId()
+TwoPartyCallLeg::getEntryId()
+{
+ return (parent->entryId);
+}
+
+CCHandover*
+//CallLeg::getHandoverSession()
+TwoPartyCallLeg::getHandoverSession()
+{
+ return (parent->handoverSession);
+}
+
+CCAnchorHandover*
+//CallLeg::getAnchorHandoverSession()
+TwoPartyCallLeg::getAnchorHandoverSession()
+{
+ return (parent->anchorHandoverSession);
+}
+
+HJCRTPSESSION
+//CallLeg::getHoRtpSession()
+TwoPartyCallLeg::getHoRtpSession()
+{
+ if ( (parent->handoverSession != NULL) &&
+ (parent->handoverSession == parent->anchorHandoverSession) )
+ return (parent->handoverSession->hoRtpSession_);
+ else
+ return (NULL);
+}
+//BCT <xxu:07-12-00> END
+
+T_CNI_LAPDM_OID
+CallLeg::oid()
+{
+ return(parent->oid);
+}
+
+T_CNI_IRT_ID
+CallLeg::entryId()
+{
+ return(parent->entryId);
+}
+
+short
+CallLeg::ludbIndex()
+{
+ return(parent->ludbIndex);
+}
+
+CallLeg::CallLeg ()
+{
+}
+
+TwoPartyCallLeg::TwoPartyCallLeg (CCSessionHandler *session,
+ int callId, MSG_Q_ID qid,
+ short legNum)
+{
+ CallLeg::parent = session;
+ CallLeg::callIndex = callId;
+ CallLeg::msgQId = qid;
+ CallLeg::callLegNum = legNum;
+
+ msSide = NULL;
+
+ voiceConnected = false;
+
+ // allocate half call store to the maximum size possible.
+ halfCallStorage =
+ operator new[] ((sizeof(CCOrigHalfCall) > sizeof(CCTermHalfCall))
+ ? sizeof(CCOrigHalfCall)
+ : sizeof(CCTermHalfCall));
+
+ //PR1378 <xxu:08-16-00> Begin
+
+ UINT16 uint16TimerValue;
+ int timerValue;
+
+ uint16TimerValue = (((UINT16)(legNum)) & (0x000F)) << 8;
+ uint16TimerValue = uint16TimerValue | (((UINT16)(callIndex)) & 0x00FF);
+ timerValue = (short)uint16TimerValue;
+
+ tclTimer = new JCCTimer(callTimerExpiry, timerValue);
+
+ //PR1378 <xxu:08-16-00> End
+
+ //CDR <xxu:08-22-00> BEGIN
+ uint16TimerValue = (((UINT16)(legNum)) & (0x000F)) << 8;
+ uint16TimerValue = uint16TimerValue | (((UINT16)(callIndex)) & 0x00FF);
+ timerValue = (short)uint16TimerValue;
+ timerValue |= 0xF0000000; //add CDR timer signature
+ ccCdrTimer = new JCCTimer(callTimerExpiry, timerValue);
+ //CDR <xxu:08-22-00> END
+
+ initData();
+
+}
+
+void
+CallLeg::initData ()
+{
+ DBG_FUNC("CallLeg::initData", CC_CALLLEG_LAYER);
+ DBG_ENTER();
+
+ idle = true;
+
+ cdrIndex = 0;
+ callRefValue = 0;
+
+ DBG_LEAVE();
+}
+
+void
+TwoPartyCallLeg::cleanup (T_CNI_RIL3_CAUSE_VALUE cause)
+{
+ DBG_FUNC("TwoPartyCallLeg::cleanup", CC_CALLLEG_LAYER);
+ DBG_ENTER();
+
+ if (msSide != NULL)
+ {
+ msSide->rlsCause.causeValue = cause;
+
+ //CAUSE<xxu:03-21-00> BEGIN
+
+ msSide->voipReleaseCause_ = cause;
+
+ //CAUSE<xxu:03-21-00> END
+
+ msSide->cleanup();
+ }
+
+ initData();
+
+ DBG_LEAVE();
+}
+
+void
+TwoPartyCallLeg::initData ()
+{
+ DBG_FUNC("TwoPartyCallLeg::initData", CC_CALLLEG_LAYER);
+ DBG_ENTER();
+
+ waitingCallLeg = false;
+
+ //BCT <xxu:07-13-00> BEGIN
+ if ( (parent->bctLeg_ != NULL) || (parent->bctInvoke_) )
+ {
+ parent->bctTi_ = ORIG_OR_MASK;
+ parent->bctInvoke_ = false;
+ parent->bctLeg_ = NULL;
+ }
+ //BCT <xxu:07-13-00> END
+
+ //BCT <xxu:09-22-00>
+ bctArrival_ = false;
+
+ //CDR <xxu:08-22-00>
+ ccCdrCallState = false;
+ ccCdrTimer->cancelTimer();
+ tclTimer->cancelTimer();
+
+ h323CallHandle = VOIP_NULL_CALL_HANDLE;
+ disconnectSentToVoip = false;
+
+ procType = CC_PROC_NULL;
+ msSide = NULL;
+
+ h245ChannState = RES_ST_IDLE;
+
+ // Do the following only if entry id is valid.
+ // In terminations and cleanups, it may not be setup yet.
+ // Release Connection resources, if there are any
+ if (voiceConnected)
+ {
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = VoipCallGetRTPHandle(h323CallHandle);
+
+ if ((csuResult = csu_OrigTermBreakAll(&rtpSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+
+ JCCLog2("CSU Error : Disconn. Failure, (Result = %d) for (RTPHandle = %p)\n",
+ csuResult, (int)rtpSourcePort.portId.rtpHandler);
+ DBG_ERROR("CSU Error : Disconn. Failure, (Result = %d) for (RTPHandle = %p)\n",
+ csuResult, (int)rtpSourcePort.portId.rtpHandler);
+
+ // Can only generate OA&M log.
+ }
+
+ voiceConnected = false;
+ }
+
+ isEmergencyCall = false;
+
+ CallLeg::initData ();
+ DBG_LEAVE();
+
+}
+
+void
+TwoPartyCallLeg::handleReleaseCall()
+{
+ DBG_FUNC("TwoPartyCallLeg::handleReleaseCall", CC_CALLLEG_LAYER);
+ DBG_ENTER();
+
+ // check both sides - for now no VOIP in CC.
+ // if ((origSide->callState_ == HC_ST_FREE) &&
+ // (termSide->callState_ == HC_ST_FREE) )
+
+ DBG_TRACE("CC Info: CallLeg releaseCall cause(%d) ccCdrCallState(%d)\n",
+ msSide->rlsCause.causeValue, ccCdrCallState);
+
+ //CDR <xxu:08-22-00> BEGIN
+ //Collect CDR data for all call releases if its call leg already set up
+ if (msSide != NULL && this != parent->bctLeg_)
+ {
+ CdrRecCauseTerm_t cdrCause;
+
+ if (ccCdrCallState)
+ {
+ if ( msSide->rlsCause.causeValue != CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING )
+ cdrCause = CDR_REC_STABLE_CALL_ABNORMAL_TERM;
+ else
+ cdrCause = CDR_REC_NORM_RELEASE;
+ } else
+ cdrCause = CDR_REC_UNSUCCESSFUL_CALL_ATTEMPT;
+
+ ccCdr.release(msSide->rlsCause.causeValue, cdrCause);
+ ccCdrTimer->cancelTimer();
+ ccCdrCallState = false;
+ }
+ //CDR <xxu:08-22-00> END
+
+ initData();
+ DBG_LEAVE();
+}
+
+void
+CallLeg::printData (JCCPrintStFn fnPtr)
+{
+}
+
+void
+TwoPartyCallLeg::printData (JCCPrintStFn fnPtr)
+{
+ char * tpClStr1Ptr = "Two Party Call Leg :\n";
+ char tpClStr2[120];
+
+ // Pre-format the call data Strings.
+ sprintf(&tpClStr2[0],
+ "(proc %d) (h245ChSt %d) (conn. %d) (discSenttoVoip %d) (callHnd %p) (callLegNum %p)\n",
+ procType,
+ h245ChannState,
+ voiceConnected,
+ disconnectSentToVoip,
+ h323CallHandle,
+ callLegNum
+ );
+
+ (*fnPtr)(tpClStr1Ptr);
+ (*fnPtr)(&tpClStr2[0]);
+
+ if (msSide != NULL)
+ {
+ msSide->printData(fnPtr);
+ }
+
+}
+
+void
+TwoPartyCallLeg::setupOrig (T_CNI_RIL3_SI_TI ti,
+ T_CNI_RIL3_CM_SERVICE_TYPE serviceRequested)
+{
+ DBG_FUNC("TwoPartyCallLeg::setupOrig", CC_CALLLEG_LAYER);
+ DBG_ENTER();
+
+ idle = false;
+ procType = CC_PROC_MOB_ORIG;
+
+ //PR1378 <xxu:08-16-00>
+ origSide = new (halfCallStorage) CCOrigHalfCall(this, tclTimer);
+ msSide = origSide;
+
+ // set this boolean to true until we actually send a setup request to VOIP.
+ disconnectSentToVoip = true;
+
+ isEmergencyCall = (serviceRequested == CNI_RIL3_CM_SERVICE_TYPE_EMERGENCY_CALL);
+
+ origSide->setupNewCall(ti, serviceRequested);
+
+ //CDR <xxu:08-21-00> BEGIN
+ ccCdr.initialize();
+
+ if (isEmergencyCall && parent->mobileId.mobileIdType==CNI_RIL3_IMEI)
+ {
+ ccCdr.setServedIMEI(&parent->mobileId);
+ ccCdr.seisure_EmergencyOrigination(ti);
+ }
+ else
+ {
+ if (ludbGetSubscInfoExists(parent->ludbIndex))
+ {
+ ccCdr.setServedIMSI(ludbGetMobileIdPtr(parent->ludbIndex));
+ T_SUBSC_IE_ISDN *msisdn;
+ msisdn = ludbGetMSISDNPtr(parent->ludbIndex);
+ msisdn->num_plan[0] = 0x11;
+ ccCdr.setServedMSISDN(msisdn);
+ }
+
+ ccCdr.seisure_NormalOrigination(ti);
+ }
+ //Load up with Location area info
+ T_CNI_RIL3_IE_LOCATION_AREA_ID lai;
+ T_CNI_RIL3_IE_CELL_ID ci;
+
+ ci.ie_present = true;
+ ci.value = ((short)(ccBtsBasicPackage.bts_ci));
+
+ lai.ie_present = true;
+ lai.mcc[0] = ((char*)&(ccBtsBasicPackage.bts_mcc))[0];
+ lai.mcc[1] = ((char*)&(ccBtsBasicPackage.bts_mcc))[1];
+ lai.mcc[2] = ((char*)&(ccBtsBasicPackage.bts_mcc))[2];
+ lai.mnc[0] = ((char*)&(ccBtsBasicPackage.bts_mnc))[0];
+ lai.mnc[1] = ((char*)&(ccBtsBasicPackage.bts_mnc))[1];
+ lai.lac = ((short)(ccBtsBasicPackage.bts_lac));
+
+ ccCdr.setLocationAreaCID(&lai,&ci);
+
+ DBG_TRACE("mcc(%d,%d,%d) mnc(%d,%d) lac(%d) ci(%d)\n",
+ lai.mcc[0],lai.mcc[1],lai.mcc[2],lai.mnc[0],lai.mnc[1],lai.lac,ci.value);
+
+ DBG_TRACE("MCC(%d,%d,%d) MNC(%d,%d)\n",
+ ((char*)&(ccBtsBasicPackage.bts_mcc))[0],
+ ((char*)&(ccBtsBasicPackage.bts_mcc))[1],
+ ((char*)&(ccBtsBasicPackage.bts_mcc))[2],
+ ((char*)&(ccBtsBasicPackage.bts_mnc))[0],
+ ((char*)&(ccBtsBasicPackage.bts_mnc))[1]);
+
+ //CDR <xxu:08-21-00> END
+
+ DBG_LEAVE();
+
+}
+
+bool
+TwoPartyCallLeg::isActive(void)
+{
+ DBG_FUNC("TwoPartyCallLeg::isActive", CC_CALLLEG_LAYER);
+ DBG_ENTER();
+
+ if (msSide != NULL) {
+ DBG_LEAVE();
+ return(msSide->callState_==HC_ST_ACTIVE);
+ }
+}
+
+void
+TwoPartyCallLeg::setupTerm (VOIP_CALL_HANDLE voipCallHandle,
+ int index,
+ int refValue,
+ bool callWaiting)
+{
+ DBG_FUNC("TwoPartyCallLeg::setupTerm", CC_CALLLEG_LAYER);
+ DBG_ENTER();
+
+ idle = false;
+ procType = CC_PROC_MOB_TERM;
+
+ //PR1378 <xxu:08-11-00>
+ termSide = new (halfCallStorage) CCTermHalfCall(this, tclTimer);
+
+ msSide = termSide;
+ h323CallHandle = voipCallHandle;
+ waitingCallLeg = callWaiting;
+
+ //CDR <xxu:08-21-00>
+ ccCdr.initialize();
+
+ if (ludbGetSubscInfoExists(parent->ludbIndex))
+ {
+ ccCdr.setServedIMSI(ludbGetMobileIdPtr(parent->ludbIndex));
+ T_SUBSC_IE_ISDN *msisdn;
+ msisdn = ludbGetMSISDNPtr(parent->ludbIndex);
+ msisdn->num_plan[0] = 0x11;
+ ccCdr.setServedMSISDN(msisdn);
+ //ccCdr.setServedMSISDN(ludbGetMSISDNPtr(parent->ludbIndex));
+ }
+
+ ccCdr.seisure_NormalTermination(callLegNum);
+ ccCdr.setQ931Crv( (unsigned short)index );
+
+ //ccCdr.setCallingPartyNumber(h323InMsg->setup.CallingPartyNumber);
+ //ccCdr.setCalledPartyNumber(h323InMsg->setup.CalledPartyNumber);
+
+ //Load up with Location area info
+ T_CNI_RIL3_IE_LOCATION_AREA_ID lai;
+ T_CNI_RIL3_IE_CELL_ID ci;
+
+ ci.ie_present = true;
+ ci.value = ((short)(ccBtsBasicPackage.bts_ci));
+
+ lai.ie_present = true;
+ lai.mcc[0] = ((char*)&(ccBtsBasicPackage.bts_mcc))[0];
+ lai.mcc[1] = ((char*)&(ccBtsBasicPackage.bts_mcc))[1];
+ lai.mcc[2] = ((char*)&(ccBtsBasicPackage.bts_mcc))[2];
+ lai.mnc[0] = ((char*)&(ccBtsBasicPackage.bts_mnc))[0];
+ lai.mnc[1] = ((char*)&(ccBtsBasicPackage.bts_mnc))[1];
+ lai.lac = ((short)(ccBtsBasicPackage.bts_lac));
+
+ ccCdr.setLocationAreaCID(&lai,&ci);
+
+ DBG_TRACE("mcc(%d,%d,%d) mnc(%d,%d) lac(%d) ci(%d)\n",
+ lai.mcc[0],lai.mcc[1],lai.mcc[2],lai.mnc[0],lai.mnc[1],lai.lac,ci.value);
+
+ DBG_TRACE("MCC(%d,%d,%d) MNC(%d,%d)\n",
+ ((char*)&(ccBtsBasicPackage.bts_mcc))[0],
+ ((char*)&(ccBtsBasicPackage.bts_mcc))[1],
+ ((char*)&(ccBtsBasicPackage.bts_mcc))[2],
+ ((char*)&(ccBtsBasicPackage.bts_mnc))[0],
+ ((char*)&(ccBtsBasicPackage.bts_mnc))[1]);
+
+ DBG_LEAVE();
+}
+
+int
+TwoPartyCallLeg::handleTimeoutMsg(IntraL3Msg_t *ccInMsg)
+{
+ DBG_FUNC("TwoPartyCallLeg::handleTimeoutMsg", CC_CALLLEG_LAYER);
+ DBG_ENTER();
+
+ if (msSide != NULL)
+ {
+ //CDR <xxu:08-22-00> BEGIN
+ int retVal;
+
+ retVal = 0;
+
+ if ( (ccInMsg->signature & 0xF0000000) == 0xF0000000 )
+ {
+ // handle 10min call duration timeout for CDR
+ if (ccCdrCallState)
+ {
+ ccCdr.generateCallRecord(true);
+ ccCdrTimer->setTimer(CALL_CDR_10M);
+ }
+ } else
+ {
+ if ( (msSide->callState_ == OHC_ST_OFFERING_CALL) && parent->bctInvoke_ && parent->bctMainLeg_)
+ {
+ CCdrSSA bctCdr;
+ if (ludbGetSubscInfoExists(parent->ludbIndex))
+ {
+ bctCdr.setServedIMSI(ludbGetMobileIdPtr(parent->ludbIndex));
+ bctCdr.setServedMSISDN(ludbGetMSISDNPtr(parent->ludbIndex));
+ }
+ bctCdr.setCorrelatedEventRefNumber(parent->bctMainLeg_->ccCdr.getEventRefNumber());
+ bctCdr.generateRecord(CDR_SS_ACTION_INVOCATION, SUPP_SERV_ECT, CNI_RIL3_CAUSE_TEMPORARY_FAILURE);
+ }
+
+ retVal = msSide->handleTimeoutMsg(ccInMsg);
+ }
+
+ //CDR <xxu:08-22-00> END
+
+ DBG_LEAVE();
+ return (retVal);
+ }
+
+ DBG_ERROR("Call Leg Error : Unexpected Timeout Message\n");
+ DBG_LEAVE();
+ return(0);
+}
+
+
+
+
diff --git a/data/mnet/GP10/Host/cc/src/CallTask.cpp b/data/mnet/GP10/Host/cc/src/CallTask.cpp
new file mode 100644
index 0000000..1ed5178
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CallTask.cpp
@@ -0,0 +1,358 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CallTask.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : The Main Loop for each individual task.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// included VxWorks headers
+#include "vxWorks.h"
+#include "taskLib.h"
+
+#include "logging/VCLOGGING.h"
+
+// included L3 Message header for messages from other Layer 3 modules (CC, RR)
+#include "JCC/JCCL3Msg.h"
+
+// CC Message Constants
+#include "CC/CallConfig.h"
+#include "CC/CCTypes.h"
+#include "CC/CCInt.h"
+#include "CC/CCUtil.h"
+#include "CC/CCH323Util.h"
+#include "CC/CCHalfCall.h"
+#include "CC/CCSessionHandler.h"
+
+#include "taskLib.h"
+
+#include "Os/JCTask.h"
+
+// included MD and IRT headers for messages from MS
+#include "ril3/ril3_common.h"
+
+#include "ril3/ril3md.h"
+
+// included LAPDm header for downlink messages
+#include "lapdm/lapdm_l3intf.h"
+
+#include "oam_api.h"
+#include "vipermib.h"
+
+extern DbgOutput Dbg;
+
+extern bool callTrace;
+
+JCTask *CallTaskObjs[CC_MAX_CC_CALLS_DEF_VAL];
+
+inline int JCCDBG_TRACE1(char *str) { DBG_TRACE(str); return true;};
+
+// entry function for the Call Module (VxWorks Task)
+int callMain(const short callIndex)
+{
+ DBG_FUNC(taskName(taskIdSelf()), CC_LAYER);
+ DBG_ENTER();
+
+ // This task's call session
+ CCSession_t *callSession = &ccSession[callIndex];
+
+ // local message queue buffer
+ CCMMInputMsg_t inMsg;
+
+ // enter infinite loop to wait for message and process message from MS
+ // or other layer-3 modules
+ CallTaskObjs[callIndex]->JCTaskEnterLoop();
+
+ while (true)
+ {
+ if (msgQReceive (callSession->msgQId,
+ (char *) &inMsg ,
+ CC_MAX_MSG_LENGTH ,
+ WAIT_FOREVER )
+ == ERROR)
+ {
+ // failed to receive message. VxWorks error. Abort the task.
+ printf("??->CC CALL FATAL ERROR: failed to read VxWorks message queue\n" );
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ DBG_TRACE ("M%d->CC CALL LOG: Call Task \"%s\" Received a message\n",
+ inMsg.intraL3Msg.module_id, taskName(taskIdSelf()));
+
+ //ISSUE<xxu:04-12-00>
+ if (callSession->free && inMsg.intraL3Msg.message_type != INTRA_L3_CC_Q931_SETUP)
+ {
+ if ( (inMsg.intraL3Msg.module_id == MODULE_MM) &&
+ (inMsg.intraL3Msg.primitive_type == INTRA_L3_MM_EST_CNF) )
+ {
+ // handle the case where a late establish confirm comes in
+ // for a page request or a handover request that was previously sent.
+ IntraL3Msg_t mmOutMsg;
+ sendMM (INTRA_L3_MM_REL_REQ,
+ INTRA_L3_NULL_MSG,
+ inMsg.intraL3Msg.entry_id,
+ &mmOutMsg);
+ }
+ else
+ {
+ DBG_WARNING("M%d->CC CALL WARNING: Received Unexpected/Late Msg(%d) Prim(%d) sessionId(%d)\n",
+ inMsg.intraL3Msg.module_id,
+ inMsg.intraL3Msg.message_type,
+ inMsg.intraL3Msg.primitive_type,
+ callSession->callIndex
+ );
+ DBG_WARNING("CC CALL WARNING: Check protocol at the source. \n");
+ }
+ }
+
+ else
+ {
+ // take the semaphore before processing the message.
+ semTake(callSession->semId, WAIT_FOREVER);
+
+ //ISSUE<xxu: 04-12-00>
+ callSession->free = false;
+
+ // Call the safety timer before processing the message,
+ // because of event loops. msg sent to mother CC task.
+ callSession->safetyTimer->setTimer(CALL_SAFETY_TIMER);
+
+ // action based on the sending module
+ //
+ switch (inMsg.intraL3Msg.module_id)
+ {
+ case T_CNI_MD_ID:
+ {
+ T_CNI_RIL3MD_CCMM_MSG *msInMsg = &inMsg.mdMsg;
+
+ DBG_TRACE("MD->CC CALL LOG: Received Prim(%d) sessionId(%d)\n",
+ msInMsg->primitive_type,
+ callSession->callIndex);
+
+ callSession->sessionHandler->handleMobMsg(msInMsg);
+
+ break;
+ }
+
+ case MODULE_MM:
+ {
+ IntraL3Msg_t *mmInMsg = &inMsg.intraL3Msg;
+
+ DBG_TRACE("MM->CC CALL LOG: Received Msg(%d) Prim(%d) entryId(%d) sessionId(%d)\n",
+ mmInMsg->message_type,
+ mmInMsg->primitive_type,
+ mmInMsg->entry_id,
+ callSession->callIndex);
+
+ callSession->sessionHandler->handleMMMsg(mmInMsg);
+
+ break;
+ }
+
+ case MODULE_RM:
+ {
+ IntraL3Msg_t *rrInMsg = &inMsg.intraL3Msg;
+
+ DBG_TRACE("RM->CC CALL LOG: Recived Msg(%d) Prim(%d) entryId(%d) sessionId(%d)\n",
+ rrInMsg->message_type,
+ rrInMsg->primitive_type,
+ rrInMsg->entry_id,
+ callSession->callIndex);
+
+ if (callTrace)
+ {
+ ccEntryPrint(*callSession, JCCDBG_TRACE1);
+ }
+
+ callSession->sessionHandler->handleRRMsg(rrInMsg);
+
+ break;
+ }
+
+ // <Igal 31-5-00> Updated for handling forwarded interVC PDUs
+ case MODULE_CC:
+ {
+ IntraL3Msg_t *ccInMsg = &inMsg.intraL3Msg ;
+
+ DBG_TRACE("CC->CC CALL LOG: Received msg(%d) callLeg(%d) signature(%d) sessionId(%d)\n",
+ ccInMsg->message_type, ccInMsg->entry_id, ccInMsg->signature,
+ callSession->callIndex);
+
+ switch (ccInMsg->message_type)
+ {
+ case INTRA_L3_TIMEOUT_MSG:
+ callSession->sessionHandler->handleTimeoutMsg (ccInMsg);
+ break;
+
+ default:
+ DBG_ERROR("CC->CC CALL ERROR: Unexpected (Msg Type = %d) from CC.\n",
+ ccInMsg->message_type);
+ }
+
+ break;
+ }
+
+ case MODULE_H323:
+ {
+ IntraL3Msg_t *h323InMsg = &inMsg.intraL3Msg;
+
+ //ext-HO <xxu: 05-10-01>
+ if ( h323InMsg->call_handle != -1 ) // If first message from VOIP in calltask, then can NOT be related to external handover
+ {
+ if ( (callSession->sessionHandler->hoCallHandle==h323InMsg->call_handle) || // note: hoCallHandle is used for hand-in case only
+ (h323InMsg->callleg_id == 7) ) // JOE: Use constant instead of hard-coded value for hoCallLeg
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(callMain): Recv VOIP Msg (msgType=%d, hoHndl=%p, callId=%d, ludbId=%d)\n}\n",
+ h323InMsg->message_type,
+ (int)(h323InMsg->call_handle),
+ callSession->callIndex,
+ h323InMsg->entry_id);
+
+ if (callSession->sessionHandler->handleH323MsgExtHo(h323InMsg) )
+ {
+ DBG_ERRORho("{\nMNEThoERROR(callMain): Recv VOIP Msg (msgType=%d, hoHndl=%p, callId=%d, ludbId=%d)\n}\n",
+ h323InMsg->message_type,
+ (int)(h323InMsg->call_handle),
+ callSession->callIndex,
+ h323InMsg->entry_id);
+ }
+ }
+ else if ( h323InMsg->callleg_id == 8 ) // JOE: Use constant instead of hard-coded value for h3CallLeg
+ {
+ DBG_TRACEho("{\nMNEThoTRACE(callMain): Recv VOIP Msg (msgType=%d, h3Hndl=%p, callId=%d, ludbId=%d)\n}\n",
+ h323InMsg->message_type,
+ (int)(h323InMsg->call_handle),
+ callSession->callIndex,
+ h323InMsg->entry_id);
+
+ if (callSession->sessionHandler->handleH323MsgExtH3(h323InMsg) )
+ {
+ DBG_ERRORho("{\nMNEThoERROR(callMain): Recv VOIP Msg (msgType=%d, h3Hndl=%p, callId=%d, ludbId=%d)\n}\n",
+ h323InMsg->message_type,
+ (int)(h323InMsg->call_handle),
+ callSession->callIndex,
+ h323InMsg->entry_id);
+ }
+ }
+ else
+ {
+ DBG_TRACE("H323->CC CALL LOG: Received Msg(%d) h323CallHandle(%p) sessionId(%d)\n",
+ h323InMsg->message_type,
+ (int)(h323InMsg->call_handle),
+ callSession->callIndex);
+
+ callSession->sessionHandler->handleH323Msg(h323InMsg);
+ }
+ }
+ else
+ {
+ DBG_TRACE("H323->CC CALL LOG: Received Msg(%d) h323CallHandle(%p) sessionId(%d)\n",
+ h323InMsg->message_type,
+ (int)(h323InMsg->call_handle),
+ callSession->callIndex);
+
+ callSession->sessionHandler->handleH323Msg(h323InMsg);
+ }
+
+ break;
+ }
+
+ //ext-HO <xxu:05-16-01>
+ case MODULE_EXTHOA:
+ {
+ InterHoaVcMsg_t *hoaInMsg = &inMsg.hoaCcMsg;
+
+ DBG_TRACEho("{\nMNEThoTRACE(callMain): Received Msg from HOA (msgType=%d, callId=%d)\n}\n",
+ hoaInMsg->msgType, callSession->callIndex);
+
+ DBG_CCDATA(callSession->callIndex);
+
+ callSession->sessionHandler->handleHoaCcMsg(hoaInMsg);
+
+ break;
+ }
+
+ case MODULE_EXT_VC:
+ {
+ InterVcMsg_t *vcInMsg = &inMsg.vcCcMsg.vcToVcMsg;
+
+ DBG_TRACE ("VC->CC CALL LOG: Received Msg(%d) from another GP\n",
+ vcInMsg->msgType);
+
+ if (callTrace)
+ {
+ ccEntryPrint (*callSession, JCCDBG_TRACE1);
+ }
+
+ callSession->sessionHandler->handleVcCcMsg (vcInMsg);
+
+ break;
+ }
+
+ case MODULE_CISS:
+ {
+ CISSVblinkMsg_t *cissInMsg = &inMsg.intraL3Msg.l3_data.cissMsg;
+
+ DBG_TRACE("VB->CC CISS: Received Msg(%d) from ViperBase\n",
+ cissInMsg->msgType);
+
+ if (callTrace)
+ {
+ ccEntryPrint(*callSession, JCCDBG_TRACE1);
+ }
+
+ callSession->sessionHandler->handleVbCissMsg(inMsg.intraL3Msg.l3_data.cissMsg);
+
+ break;
+ }
+
+ case MODULE_LUDB:
+ {
+ DBG_TRACE ("LUDB->CC CALL LOG: Received Msg (%d) sessionId(%d)\n",
+ inMsg.intraL3Msg.message_type, callSession->callIndex );
+
+ if (inMsg.intraL3Msg.message_type == INTRA_L3_LUDB_PURGE_PROFILE)
+ {
+ callSession->sessionHandler->cleanup (CNI_RIL3_CAUSE_REQUESTED_SERVICE_NOT_SUBSCRIBED);
+ }
+ else
+ {
+ DBG_ERROR ("CC Call Error: Unexpected Msg [type = %d] from LUDB.\n",
+ inMsg.intraL3Msg.message_type );
+ }
+ break;
+ }
+
+
+ default:
+ // log error
+ DBG_ERROR("CC CALL ERROR: Received a Msg from unexpected (Module = %d).\n",
+ inMsg.intraL3Msg.module_id);
+ }
+
+ // Now let go of the semaphores.
+ semGive(callSession->semId);
+
+ // Message Processing complete. Cancel the safety timer.
+ callSession->safetyTimer->cancelTimer();
+ }
+ }
+ CallTaskObjs[callIndex]->JCTaskNormExit();
+}
+
+
diff --git a/data/mnet/GP10/Host/cc/src/CissCallLeg.cpp b/data/mnet/GP10/Host/cc/src/CissCallLeg.cpp
new file mode 100644
index 0000000..57a6343
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/CissCallLeg.cpp
@@ -0,0 +1,262 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 0.1
+// Status : Under development
+// File : CissCallLeg.cpp
+// Author(s) : Bhawani Sapkota
+// Create Date : 11-22-1999
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+//
+
+#include "CC/CallLeg.h"
+#include "CC/CCSessionHandler.h"
+
+
+#define CC_CISS_LAYER 3
+
+// #include "cdr.h"
+// #include "CallCDR.h"
+
+// *******************************************************************
+//
+// *******************************************************************
+bool VBLinkMsToNetCiss(LUDB_ID, unsigned char *, int);
+
+
+
+// converts the message from host byte ordering format
+// to the network byte ordering
+static bool
+ccCissPackVblinkMsg(unsigned char buffer[],
+ int &size,
+ CISSVblinkMsg_t &cissMsg
+ )
+{
+ CISSVblinkMsg_t dstMsg;
+ size = cissMsg.msgLen + kCissVbLinkMsgHdrLen;
+ bool status = false;
+
+ DBG_FUNC("ccCissPackVblinkMsg", CC_CISS_LAYER);
+ DBG_ENTER();
+
+
+ if (size > kCissVbLinkMsgHdrLen && size <= sizeof(CISSVblinkMsg_t))
+ {
+ dstMsg.Magic = htonl(VOIP_API_MAGIC_VALUE);
+ dstMsg.callIdx = htonl(cissMsg.callIdx);
+ dstMsg.msgType = htonl(cissMsg.msgType);
+ dstMsg.status = htonl(cissMsg.status);
+ dstMsg.msgLen = htonl(cissMsg.msgLen);
+ memcpy(dstMsg.msg, cissMsg.msg, cissMsg.msgLen);
+ memcpy(buffer, (char *)&dstMsg, size);
+ status = true;
+ } else {
+ DBG_ERROR("Incorrect message size = %d\n", cissMsg.msgLen);
+ }
+
+ DBG_LEAVE();
+ return status;
+}
+
+
+// call the vbLink routine to send message
+static bool ccCissSendToViberBase(LUDB_ID ludbIdx, CISSVblinkMsg_t& cissMsg)
+{
+ unsigned char buffer[sizeof (CISSVblinkMsg_t)];
+ int msgLen;
+ bool status = false;
+
+ DBG_FUNC("ccCissSendToViberBase", CC_CISS_LAYER);
+ DBG_ENTER();
+
+ if (ccCissPackVblinkMsg(buffer, msgLen, cissMsg))
+ {
+ DBG_TRACE("Ludb Index = %d, Buffer Len = %d\n", ludbIdx, msgLen);
+ DBG_HEXDUMP(buffer, msgLen);
+ status = VBLinkMsToNetCiss(ludbIdx, buffer, msgLen);
+ }
+
+ DBG_LEAVE();
+ return status;
+}
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+
+CISSCallLeg::CISSCallLeg (CCSessionHandler *session,
+ int callId,
+ MSG_Q_ID qid,
+ short callLegNum):cissState_(CISS_ST_IDLE)
+{
+ CallLeg::parent = session;
+ CallLeg::callIndex = callId;
+ CallLeg::msgQId = qid;
+ CallLeg::callLegNum = callLegNum;
+ initData();
+ return;
+
+}
+
+
+CISSCallLeg::~CISSCallLeg()
+{
+ return;
+}
+
+void
+CISSCallLeg::cleanup (T_CNI_RIL3_CAUSE_VALUE cause)
+{
+ DBG_FUNC("CISSCallLeg::cleanup", CC_CISS_LAYER);
+ DBG_ENTER();
+ initData();
+ DBG_LEAVE();
+ return;
+}
+
+void
+CISSCallLeg::initData ()
+{
+ DBG_FUNC("CISSCallLeg::initData", CC_CISS_LAYER);
+ DBG_ENTER();
+ //Just call the parent's routine
+ CallLeg::initData ();
+ DBG_LEAVE();
+
+}
+
+int
+CISSCallLeg::handleTimeoutMsg(IntraL3Msg_t *ccInMsg)
+{
+ DBG_FUNC("CISSCallLeg::handleTimeoutMsg", CC_CALLLEG_LAYER);
+ DBG_ENTER();
+
+ DBG_ERROR("Call Leg Error : Unexpected Timeout Message\n");
+
+ DBG_LEAVE();
+ return(0);
+}
+
+
+int
+CISSCallLeg::handleMsMsg(T_CNI_RIL3MD_CCMM_MSG *msInMsg)
+{
+ int retval = 0;
+ CISSVblinkMsg_t cissVbLinkMsg;
+ unsigned char buffer[sizeof(CISSVblinkMsg_t)];
+ int msgLen;
+
+ DBG_FUNC("CISSCallLeg::handleMsMsg", CC_CISS_LAYER);
+ DBG_ENTER();
+
+ cissVbLinkMsg.msgLen = msInMsg->l3_data.msgLength;
+ if (cissVbLinkMsg.msgLen > CNI_LAPDM_MAX_L3MSG_LENGTH || cissVbLinkMsg.msgLen <=0)
+ {
+ DBG_ERROR("CISS:Incorrect CISS Msg Len (Message len = %d)\n", cissVbLinkMsg.msgLen);
+ retval = 0-CNI_RIL3_CAUSE_INVALID_MANDATORY_INFO;
+ this->idle = true;
+ this->cissState_ = CISS_ST_IDLE;
+ } else {
+
+ cissVbLinkMsg.callIdx = this->callIndex;
+ memcpy(cissVbLinkMsg.msg, msInMsg->l3_data.buffer, cissVbLinkMsg.msgLen);
+ cissVbLinkMsg.msgType = CNI_RIL3SS_MSGID_REGISTER;
+ cissVbLinkMsg.status = 0;
+ if (ccCissSendToViberBase(this->ludbIndex(), cissVbLinkMsg))
+ {
+ this->idle = false;
+ this->cissState_ = CISS_ST_VB;
+ } else {
+ DBG_ERROR("CISS: Error Sending message to ViperBase\n");
+ retval = 0-CNI_RIL3_CAUSE_TEMPORARY_FAILURE;
+ this->idle = true;
+ this->cissState_ = CISS_ST_IDLE;
+ }
+
+ }
+
+ DBG_LEAVE();
+ return retval;
+}
+
+int
+CISSCallLeg::handleVbMsg(CISSVblinkMsg_t &netInMsg)
+{
+ int retval;
+
+ DBG_FUNC("CISSCallLeg::handleVbMsg", CC_CISS_LAYER);
+ DBG_ENTER();
+
+ T_CNI_LAPDM_L3MessageUnit l3msg;
+
+ l3msg.msgLength = (unsigned short) netInMsg.msgLen;
+ for(int i=0;i<l3msg.msgLength; i++) l3msg.buffer[i]= netInMsg.msg[i];
+
+ DBG_TRACE("CISS network message status = %d\n", netInMsg.status);
+
+ DBG_TRACE("CISS-->LAPDm CISS Message to Mobile (Type = %d)\n", netInMsg.msgType);
+ DBG_TRACE( "Oid = %d, Sapimain = %d, length=%d\n", oid(), SAPI_MAIN, l3msg.msgLength);
+ DBG_HEXDUMP(l3msg.buffer, l3msg.msgLength);
+
+ // send the message to LAPDm for delivery
+ // call the session handler sendL2 method
+ // if call is handed over to anotehr cell, sendL2 will take care of
+ // sending the Mobile message to the correct cell.
+ parent->sendL2Msg(&l3msg);
+
+
+ if (netInMsg.msgType == CNI_RIL3SS_MSGID_RELEASE_COMPLETE)
+ {
+ retval = 0 - netInMsg.status;
+ idle = true;
+ cissState_ = CISS_ST_IDLE;
+
+ } else {
+ idle = false;
+ cissState_ = CISS_ST_MS;
+ retval = 0;
+ }
+ DBG_TRACE( "idle = %d, cissState_ = %d, retval = %d\n", idle, cissState_, retval);
+ DBG_LEAVE();
+ return retval;
+}
+
+
+void
+CISSCallLeg::printData (JCCPrintStFn fnPtr)
+{
+ char * tpClStr1Ptr = "CISS Call Leg :\n";
+ char tpClStr2[120];
+
+ // Pre-format the call data Strings.
+ sprintf(&tpClStr2[0],
+ "(callIndex = %d) (callRefValue= %d) (CISS State = %d) (ludbIdx = %d) \n",
+ callIndex,
+ callRefValue,
+ cissState_,
+ ludbIndex()
+ );
+ (*fnPtr)(tpClStr1Ptr);
+ (*fnPtr)(&tpClStr2[0]);
+
+}
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/cc/src/HOCallLeg.cpp b/data/mnet/GP10/Host/cc/src/HOCallLeg.cpp
new file mode 100644
index 0000000..c98429a
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/HOCallLeg.cpp
@@ -0,0 +1,353 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : HOCallLeg.cpp
+// Author(s) : Joe Chen
+// Create Date : 05-15-2001
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+//
+
+#include <vxworks.h>
+#include <string.h>
+#include <taskLib.h>
+
+#include "CC/CCUtil.h"
+
+
+#include "Logging\vcmodules.h"
+
+#include "CC/CCSessionHandler.h"
+
+#include "CC/HOCallLeg.h"
+
+#include "new.h"
+
+extern bool callTrace;
+
+// *******************************************************************
+//
+// *******************************************************************
+
+
+// *******************************************************************
+// HOCallLeg class
+// *******************************************************************
+
+
+HOCallLeg::HOCallLeg (CCSessionHandler *session,
+ int callId ,
+ MSG_Q_ID qid ,
+ short legNum )
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOCallLeg::HOCallLeg): entering......\n}\n");
+
+ // Init parent class data
+ HOCallLeg::parent = session;
+ HOCallLeg::callIndex = callId ;
+ HOCallLeg::msgQId = qid ;
+ HOCallLeg::callLegNum = legNum ;
+
+ msSide = NULL;
+ voiceConnected = false;
+
+ // allocate half call store to the maximum size possible.
+ halfExtHoCallStorage =
+ operator new[] ((sizeof(HOMoHalfCall) > sizeof(HOMtHalfCall))
+ ? sizeof(HOMoHalfCall)
+ : sizeof(HOMtHalfCall));
+
+ UINT16 uint16TimerValue;
+ int timerValue;
+
+ uint16TimerValue = (((UINT16)(legNum)) & (0x000F)) << 8;
+ uint16TimerValue = uint16TimerValue | (((UINT16)(callIndex)) & 0x00FF);
+ timerValue = (short)uint16TimerValue;
+
+ tclTimer = new JCCTimer(callTimerExpiry, timerValue);
+
+ initData ();
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOCallLeg::HOCallLeg): leaving.\n}\n");
+}
+
+
+void
+HOCallLeg::cleanup (T_CNI_RIL3_CAUSE_VALUE cause)
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOCallLeg::cleanup): entering......\n}\n");
+
+ if (msSide != NULL)
+ {
+ msSide->rlsCause.causeValue = cause;
+
+ msSide->voipReleaseCause_ = cause;
+
+ msSide->cleanup();
+ }
+
+ initData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOCallLeg::cleanup): leaving.\n}\n");
+}
+
+void
+HOCallLeg::initData ()
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOCallLeg::cleanup): entering......\n}\n");
+
+ tclTimer->cancelTimer();
+
+ h323CallHandle = VOIP_NULL_CALL_HANDLE;
+ disconnectSentToVoip = false;
+
+ procType = CC_PROC_NULL;
+ msSide = NULL;
+
+ // Do the following only if entry id is valid.
+ // In terminations and cleanups, it may not be setup yet.
+ // Release Connection resources, if there are any
+ if (voiceConnected)
+ {
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = VoipCallGetRTPHandle(h323CallHandle);
+
+ if ((csuResult = csu_OrigTermBreakAll(&rtpSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_ERRORho("{\nMNEThoTRACE(HOCallLeg::cleanup):CSU Error : Disconn. Failure, (Result = %d) for (RTPHandle = %p)\n}\n",
+ csuResult, (int)rtpSourcePort.portId.rtpHandler);
+
+ // Can only generate OA&M log.
+ }
+
+ voiceConnected = false;
+ }
+
+ CallLeg::initData ();
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOCallLeg::cleanup): leaving.\n}\n");
+
+}
+
+void
+HOCallLeg::handleReleaseCall()
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOCallLeg::handleReleaseCall): entering......\n}\n");
+
+ DBG_TRACEho(" CC Info: CallLeg releaseCall cause(%d)\n}\n",
+ msSide->rlsCause.causeValue);
+
+ initData();
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOCallLeg::handleReleaseCall): leaving.\n}\n");
+}
+
+void
+HOCallLeg::printData (JCCPrintStFn fnPtr)
+{
+ char * tpClStr1Ptr = "HO Call Leg :\n";
+ char tpClStr2[120];
+
+ // Pre-format the call data Strings.
+ sprintf(&tpClStr2[0],
+ "(proc %d) (conn. %d) (discSenttoVoip %d) (callHnd %p) (callLegNum %p)\n",
+ procType,
+ voiceConnected,
+ disconnectSentToVoip,
+ h323CallHandle,
+ callLegNum
+ );
+
+ (*fnPtr)(tpClStr1Ptr);
+ (*fnPtr)(&tpClStr2[0]);
+
+ if (msSide != NULL)
+ {
+ msSide->printData(fnPtr);
+ }
+
+}
+
+void
+HOCallLeg::setupOrigExtHo (void)
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOCallLeg::setupOrigExtHo): entering......\n}\n");
+
+ idle = false;
+ procType = CC_PROC_MOB_ORIG;
+
+ origSide = new (halfExtHoCallStorage) HOMoHalfCall(this , tclTimer);
+
+ msSide = origSide;
+
+ // set this boolean to true until we actually send a setup request to VOIP.
+ disconnectSentToVoip = true;
+
+ origSide->setupNewCall();
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOCallLeg::setupOrigExtHo): leaving.\n}\n");
+
+}
+
+void
+HOCallLeg::disconnectOrigExtHo (void)
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOCallLeg::disconnectOrigExtHo): entering......\n}\n");
+
+ origSide->disconnectNewCall();
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOCallLeg::disconnectOrigExtHo): leaving.\n}\n");
+}
+
+void
+HOCallLeg::setupTermExtHo (IntraL3Msg_t* h323InMsg)
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOCallLeg::setupTermExtHo): entering......\n}\n");
+
+
+ DBG_TRACEho("{\nMNETeiTRACE(hoLeg::setupTermExtHo): setup hoCall (hoAgId=%d, callId=%d)\n}\n",
+ hoAgId(),callIndexEHO());
+
+ idle = false;
+ procType = CC_PROC_MOB_TERM;
+
+ termSide = new (halfExtHoCallStorage) HOMtHalfCall(this, tclTimer);
+
+ msSide = termSide;
+ h323CallHandle = h323InMsg->call_handle;
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOCallLeg::setupTermExtHo): leaving.\n}\n");
+}
+
+int
+HOCallLeg::handleTimeoutMsg(IntraL3Msg_t *ccInMsg)
+{
+ int retVal;
+
+ retVal = 0;
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOCallLeg::handleTimeoutMsg): entering......\n}\n");
+
+ if (msSide != NULL)
+ {
+ retVal = msSide->handleTimeoutMsg(ccInMsg);
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOCallLeg::handleTimeoutMsg): leaving.\n}\n");
+ return (retVal);
+ }
+
+ DBG_ERRORho(" Call Leg ERROR : Unexpected Timeout Message\n");
+ DBG_TRACEho("{\nMNEThoTRACE(HOCallLeg::handleTimeoutMsg): leaving.\n}\n");
+ return(retVal);
+}
+
+
+//ext-HO <xxu:06-07-01>
+JcSubId_t
+HOCallLeg::hoAgId(void)
+{
+ if (parent->handoverSession != NULL)
+ return(parent->handoverSession->hoAgId_);
+ else
+ {
+ DBG_ERRORho("{\nMNEThoERROR(holeg:hoAgId): retrieve hoAgId but no handover session\n}\n");
+ return (-1);
+
+ }
+}
+
+//ext-HO <xxu:06-07-01>
+int
+HOCallLeg::callIndexEHO(void)
+{
+ if (parent->handoverSession != NULL)
+ return(parent->handoverSession->callIndex);
+ else
+ {
+ DBG_ERRORho("{\nMNEThoERROR(holeg:callIndex): retrieve callIndex but no handover session\n}\n");
+ return (-1);
+ }
+}
+
+//ext-HO <xxu:06-07-01>
+BOOL
+HOCallLeg::authTerm(void)
+{
+ return ((parent->handoverSession==NULL) ? true:false);
+}
+
+//ext-HO <xxu:06-07-01>
+T_CNI_RIL3_SPEECH_VERSION
+HOCallLeg::speechVersion(void)
+{
+ if (parent->handoverSession != NULL)
+ return (parent->handoverSession->currSpeechCh_.version);
+ else
+ {
+ DBG_ERRORho("{\nMNEThoERROR(holeg:speechVersion): retrieve current speech version but no handover session\n}\n");
+ return (CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1);
+ }
+}
+
+//ext-HO <xxu:06-07-01>
+BOOL
+HOCallLeg::cancelHoTimerIfNeeded(void)
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOCallLeg::cancelHoTimerIfNeeded): entering......\n}\n");
+
+ BOOL ret = true;
+
+ if ( (parent->handoverSession->hoState_ == HAND_ST_TRG_HO_COMPLT) &&
+ (parent->handoverSession ==parent->targetHandoverSessionExtHo) )
+ {
+ //external handover--handin scenario
+ DBG_TRACEho("MNETeiTRACE(hoLeg::cancelHoTimerIfNeeded): [PLMN->MNET HANDOVER COMPLETE](hoAgId=%d,callId=%d,entryId=%d)\n}\n",
+ hoAgId(),callIndexEHO(),entryId());
+
+ parent->sessionTimer->cancelTimer();
+
+ } else if ( (parent->handoverSession->hoState_ == HAND_ST_ANCH_EHO_COMPLT) &&
+ (parent->handoverSession ==parent->anchorHandoverSession) )
+ {
+ DBG_TRACEho("MNETeoTRACE(hoLeg::cancelHoTimerIfNeeded): [MNET->PLMN HANDOVER COMPLETE](hoAgId=%d,callId=%d,entryId=%d)\n}\n",
+ hoAgId(),callIndexEHO(),entryId());
+
+ parent->sessionTimer->cancelTimer();
+
+ // Swap HO data if all is completed and we had handover to THIRD
+ if ( ( parent->anchorHandoverSession->hoType_ == HO_TY_EXT_HANDMSC3 ) ||
+ ( parent->anchorHandoverSession->hoType_ == HO_TY_MNET_NONANCHOR_HANDBACK_TO_MSC3 ) )
+ {
+ parent->anchorHandoverSession->swapH3Data();
+ parent->anchorHandoverSession->hoType_ = HO_TY_EXT_HANDOVER;
+ }
+ } else
+ {
+ DBG_WARNINGho("MNETeoTRACE(hoLeg::cancelHoTimerIfNeeded): Handover Call established but waiting for HANDOVER COMPLETE(hoAgId=%d,callId=%d,entryId=%d)\n}\n",
+ hoAgId(),callIndexEHO(),entryId());
+
+ ret = true; //false;
+ }
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOCallLeg::cancelHoTimerIfNeeded): leaving.\n}\n");
+ return (ret);
+}
+
+
diff --git a/data/mnet/GP10/Host/cc/src/HOHalfCall.cpp b/data/mnet/GP10/Host/cc/src/HOHalfCall.cpp
new file mode 100644
index 0000000..61e88c8
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/HOHalfCall.cpp
@@ -0,0 +1,808 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : HOHalfCall.cpp
+// Author(s) : Xiaode and Joe
+// Create Date : 05-15-2001
+// Description : HOHalfCall functionality for External Handovers
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+
+#include "CC/CCSessionHandler.h"
+#include "CC/CallConfig.h"
+#include "CC/HOHalfCall.h"
+
+#include "voip/voipapi.h"
+#include "CC/CCH323Util.h"
+
+#include "CC/CCUtil.h"
+
+
+HOHalfCallMsgHandler_t ehoCallStateHandler[MAX_EHO_CALL_STATES][MAX_EHO_CALL_EXTERNAL_EVENTS];
+
+/*******************************************************************/
+
+HOHalfCall::HOHalfCall ()
+{
+
+}
+
+
+void
+HOHalfCall::cleanup(void)
+{
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::cleanup): entering......\n}\n");
+
+ // Release Connection resources, if there are any
+ if (parent->voiceConnected)
+ {
+ T_CSU_PORT_ID rtpSourcePort;
+ T_CSU_RESULT_CON csuResult;
+
+ rtpSourcePort.portType = CSU_RTP_PORT;
+ rtpSourcePort.portId.rtpHandler = VoipCallGetRTPHandle(parent->h323CallHandle);
+
+ if ((csuResult = csu_OrigTermBreakAll(&rtpSourcePort))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+
+ JCCLog2("CSU Error : Disconn. Failure, (Result = %d) for (RTPHandle = %p)\n",
+ csuResult, (int)rtpSourcePort.portId.rtpHandler);
+ DBG_ERRORho("CSU Error : Disconn. Failure, (Result = %d) for (RTPHandle = %p)\n",
+ csuResult, rtpSourcePort.portId.rtpHandler);
+
+ // Can only generate OA&M log.
+ }
+
+ parent->voiceConnected = false;
+
+ }
+
+ // Always do sendRemote as the LAST step of the handler.
+ sendRemote(HC_REMOTE_RELEASE_COMPLETE);
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::cleanup): leaving.\n}\n");
+}
+
+
+JCCEvent_t
+HOHalfCall::handleNullEvent(void)
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleNullEvent): entering......\n}\n");
+
+ // Do Nothing.
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleNullEvent): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+
+void
+HOHalfCall::initData(void)
+{
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::initData): entering......\n}\n");
+
+ // cancel any timers
+ hcTimer->cancelTimer();
+
+ releaseCounter = 0;
+ callState_ = HC_ST_FREE;
+
+ //CH<xxu:11-10-99>
+ chState_ = CH_ST_IDLE;
+
+ channState_ = RES_ST_IDLE;
+
+ currSpeechCh_.version = CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1;
+
+ currEvent = JCC_NULL_EVENT;
+
+ // Have a standard release cause to use
+ memset(&rlsCause, 0, sizeof(T_CNI_RIL3_IE_CAUSE)); // first zap this ie
+ rlsCause.ie_present = true;
+ rlsCause.codingStandard = CNI_RIL3_GSMPLMN_CODING;
+ rlsCause.location = CNI_RIL3_LOCATION_PRIVATE_NETWORK_LOCAL_USER;
+ rlsCause.causeValue = CNI_RIL3_CAUSE_NORMAL_UNSPECIFIED;
+ rlsCause.diagnosticsLength = 0;
+
+ voipReleaseCause_ = CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING;
+
+ // initialize party numbers
+ cpn.ie_present = false;
+ callingPartyNum.ie_present = false;
+
+ // Have a simple Bearer Capability to use - for speech only
+ // Allocate a full rate channel based on this.
+ memset(&bearerCap, 0, sizeof(T_CNI_RIL3_IE_BEARER_CAPABILITY)); // first zap this ie
+ bearerCap.ie_present = true;
+
+ // octet 3 after TL - only one byte needed
+ bearerCap.codingStandard = CNI_RIL3_GSM_STANDARD_CODING;
+ bearerCap.transferMode = CNI_RIL3_TRANSFER_CIRCUIT_MODE;
+ bearerCap.infoTransferCap = CNI_RIL3_INFO_TRANSFER_SPEECH;
+ // Following is used only in Mob-to-Nwk direction. It should be set to
+ // default value in the Encoding routine for the Nwk-to-Mob direction - Syang
+ bearerCap.radioChannelReq = CNI_RIL3_FULL_RATE_SUPPORT_ONLY_MS; // 01
+
+ callingPartyNum.ie_present = false;
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::initData): leaving.\n}\n");
+
+}
+
+void
+HOHalfCall::printData(JCCPrintStFn fnPtr)
+{
+ char * hcStr1Ptr = "Half Call Data: \n";
+ char hcStr2[120];
+
+ char callTaskName[22];
+
+ sprintf(&callTaskName[0],
+ "Call-%d EntryId-%d: \0",
+ parent->callIndex,
+ parent->entryId());
+
+ //JOE: Add internal variables
+ sprintf(&hcStr2[0],
+ "curEv(%d),callSt(%d),channSt(%d),chState(%d),rlsCause(%d)\n",
+ currEvent,
+ callState_,
+ channState_,
+ chState_,
+ rlsCause.causeValue
+ );
+
+ (*fnPtr)(callTaskName);
+ (*fnPtr)(hcStr1Ptr);
+ (*fnPtr)(&hcStr2[0]);
+
+}
+
+
+int
+HOHalfCall::handleTimeoutMsg(IntraL3Msg_t *ccInMsg)
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleTimeoutMsg): entering......\n}\n");
+
+ currEvent = HC_EHO_LOCAL_PROTOCOL_TIMEOUT;
+
+ rlsCause.causeValue = CNI_RIL3_CAUSE_RECOVERY_ON_TIMER_EXPIRY;
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleTimeoutMsg): leaving.\n}\n");
+
+ return (smHandleFirstCallEvent());
+}
+
+int
+HOHalfCall::handleRemoteEvent(IntraL3Msg_t* h323Msg, JCCEvent_t remoteEvent,
+ CCRemMsgData_t inRemMsg)
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleRemoteEvent): entering......\n}\n");
+
+ // copy message data
+ h323InMsg = h323Msg;
+ remMsgData = inRemMsg;
+
+ currEvent = remoteEvent;
+
+ // Just call the SM Handle Event
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleRemoteEvent): leaving.\n}\n");
+ return (smHandleFirstCallEvent());
+}
+
+int
+HOHalfCall::smHandleEvent(void)
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::smHandleEvent): entering......\n}\n");
+
+ if (currEvent == CC_RELEASE_CALL)
+ {
+ int storedCause;
+
+ parent->handleReleaseCall();
+
+ // causeValue below Works because 0 is unused.
+ storedCause = (0 - rlsCause.causeValue);
+
+ initData();
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::smHandleEvent): leaving.\n}\n");
+ return(storedCause);
+ }
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::smHandleEvent): leaving.\n}\n");
+ return(0);
+}
+
+int
+HOHalfCall::smHandleFirstCallEvent(void)
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::smHandleFirstCallEvent): entering......\n}\n");
+
+ // For Call States:
+ if (currEvent != JCC_NULL_EVENT)
+ {
+ currEvent =
+ (this->*ehoCallStateHandler[callState_][currEvent - CC_INTERNAL_EHO_CALL_EVENT_BASE])();
+ }
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::smHandleFirstCallEvent): leaving.\n}\n");
+ return(smHandleEvent());
+}
+
+JCCEvent_t
+HOHalfCall::handleInvalidEvent(void)
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleInvalidEvent): entering......\n}\n");
+
+ DBG_WARNINGho("{\nMNEThoTRACE(HOHalfCall::handleInvalidEvent):CC Call Warning: Invalid (event = %d) in (State = %d) \n}\n",
+ currEvent,
+ callState_);
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleInvalidEvent): leaving.\n}\n");
+ return (JCC_NULL_EVENT);
+
+}
+
+bool
+HOHalfCall::sendRemote(JCCEvent_t remoteEvent)
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::sendRemote): entering......\n}\n");
+
+ // Copy the disconnect reason, if it is a release message.
+ if (remoteEvent == HC_REMOTE_RELEASE_COMPLETE)
+ {
+ remMsgData.callRelease.cause = voipReleaseCause_;
+ }
+
+ // send to H323 task
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::sendRemote): leaving.\n}\n");
+ return (sendH323MsgExtHo(parent, remoteEvent, remMsgData, parent->callLegNum));
+}
+
+
+JCCEvent_t
+HOHalfCall::handleEHOMobTermAddress(void)
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleEHOMobTermAddress): entering......\n}\n");
+
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER hoNumber;
+ SpeechChann_t speechchann;
+ int i;
+
+ hoNumber = parent->parent->handoverSession->hoNumber_;
+
+ DBG_TRACEho(" EHO Call Log: hoNumber (ie_present=%d),(numberType=%d),(plan=%d),(numDigits=%d)\n",
+ hoNumber.ie_present,
+ hoNumber.numberType,
+ hoNumber.numberingPlan,
+ hoNumber.numDigits
+ );
+ DBG_TRACEho(" handover number digits (%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x)\n}\n",
+ hoNumber.digits[0],hoNumber.digits[1],hoNumber.digits[2],
+ hoNumber.digits[3],hoNumber.digits[4],
+ hoNumber.digits[5],hoNumber.digits[6],
+ hoNumber.digits[7],hoNumber.digits[8],hoNumber.digits[9],hoNumber.digits[10]);
+
+ // setup remote data struct
+ remMsgData.setup.CalledPartyNumber = hoNumber;
+ // no calling party number needed
+ remMsgData.setup.CallingPartyNumber.ie_present = false;
+
+ speechchann = parent->parent->currSpeechCh();
+
+ remMsgData.setup.bearerCap.speechVersionInd[0].fieldPresent = true;
+ remMsgData.setup.bearerCap.speechVersionInd[0].version = speechchann.version;
+
+ for (i=1; i < 3; i++)
+ {
+ remMsgData.setup.bearerCap.speechVersionInd[i].fieldPresent = false;
+ }
+
+
+ DBG_TRACEho(" SpeechVersionInd: 1st(%d,%d) 2nd(%d,%d) 3rd(%d,%d)\n",
+ remMsgData.setup.bearerCap.speechVersionInd[0].fieldPresent,
+ remMsgData.setup.bearerCap.speechVersionInd[0].version,
+ remMsgData.setup.bearerCap.speechVersionInd[1].fieldPresent,
+ remMsgData.setup.bearerCap.speechVersionInd[1].version,
+ remMsgData.setup.bearerCap.speechVersionInd[2].fieldPresent,
+ remMsgData.setup.bearerCap.speechVersionInd[2].version);
+
+ remMsgData.setup.IsEmergencyCall = false;
+
+ callState_ = EHO_ST_OFFERING_CALL;
+
+
+ DBG_TRACEho(" Sending SETUP to remote side.\n");
+
+ // Now send setup to the other half call.
+ if (sendRemote(THC_REMOTE_TERM_ADDRESS) == false)
+ // failed commn. with the remote side - treat as a release complete
+ // from the remote side and cleanup - skip event loop.
+ {
+ DBG_ERRORho(" ERROR in Sending SETUP.\n");
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleEHOMobTermAddress): leaving.\n}\n");
+ return (CC_RELEASE_CALL);
+ }
+
+ //reuse this timer for watch dog purpose in case no response from VOIP
+ hcTimer->setTimer(CALL_SETUP_T303);
+
+
+ // set this boolean to true until we actually send a setup request to VOIP.
+ parent->disconnectSentToVoip = false;
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleEHOMobTermAddress): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+JCCEvent_t
+HOHalfCall::handleEHOMobCallProgress(void)
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleEHOMobCallProgress): entering......\n}\n");
+
+ // as long as handover is allowed, active leg is mandatory here.
+ if ((parent->parent->activeLeg()) == NULL)
+ {
+ DBG_TRACEho(" Call no longer active.\n");
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleEHOMobCallProgress): leaving.\n}\n");
+ return (CC_RELEASE_CALL);
+ }
+
+ DBG_TRACEho(" Received CALL PROGRESS. (h323InMsg->call_handle=%d)\n",
+ h323InMsg->call_handle);
+
+ // Save h323 call handle
+ parent->h323CallHandle = h323InMsg->call_handle;
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleEHOMobCallProgress): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+}
+
+JCCEvent_t
+HOHalfCall::handleEHOMobRemoteChannSelected(void)
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleEHOMobRemoteChannSelected): entering......\n}\n");
+
+ // as long as handover is allowed, active leg is mandatory here.
+ if ((parent->parent->activeLeg()) == NULL)
+ {
+ DBG_TRACEho(" Call no longer active.\n");
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleEHOMobRemoteChannSelected): leaving.\n}\n");
+ return (CC_RELEASE_CALL);
+ }
+
+ currSpeechCh_.version = remMsgData.codecSelected.Codec;
+
+ DBG_TRACEho(" Received Channel Selected: speech version:(%d)\n",
+ currSpeechCh_.version);
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleEHOMobRemoteChannSelected): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+
+}
+
+JCCEvent_t
+HOHalfCall::handleEHOMobRemoteAnswer(void)
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleEHOMobRemoteAnswer): entering......\n}\n");
+
+ //Stop guarding timer
+ hcTimer->cancelTimer();
+
+ // as long as handover is allowed, active leg is mandatory here.
+ if ((parent->parent->activeLeg()) == NULL)
+ {
+ DBG_TRACEho(" Call no longer active.\n}\n");
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleEHOMobRemoteAnswer): leaving.\n}\n");
+ return (CC_RELEASE_CALL);
+ }
+
+ DBG_TRACEho(" Connect received.\n");
+
+ callState_ = EHO_ST_ACTIVE;
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleEHOMobRemoteAnswer): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+// Remote Disconnect
+JCCEvent_t
+HOHalfCall::handleEHOMobRemoteDisconnect(void)
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleEHOMobRemoteDisconnect): entering......\n}\n");
+
+ // Cause is Mandatory. Use rlsCause to set it before building
+ // !< For now there is a generic rlsCause in the Half Call Object.
+
+ // To avoid sending the release to H323
+ parent->disconnectSentToVoip = true;
+
+ //CAUSE<xxu:03-21-00> BEGIN
+
+ rlsCause.causeValue =
+ (T_CNI_RIL3_CAUSE_VALUE) remMsgData.basicCallInMsg.ReasonCode;
+
+ callState_ = EHO_ST_FREE;
+
+ // Trigger the sending of END HANDOVERS and Releasing HO Call Legs
+ // (make sure this is an anchor session... should not be called in target!)
+ if (parent->parent->handoverSession == parent->parent->anchorHandoverSession)
+ {
+ parent->parent->anchorHandoverSession->handleAnchPostExtHoRls();
+ }
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleEHOMobRemoteDisconnect): leaving.\n}\n");
+ return (CC_RELEASE_CALL);
+
+}
+
+
+
+/*******************************************************************/
+HOMoHalfCall::HOMoHalfCall (HOCallLeg *callLeg, JCCTimer *tclTimer)
+{
+ parent = callLeg;
+
+ hcTimer = tclTimer;
+ initData();
+}
+
+void
+HOMoHalfCall::setupNewCall (void)
+{
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOMoHalfCall::setupNewCall): entering......\n}\n");
+
+ // set to null state so that we can take care of abnormal cleanups.
+ callState_ = EHO_ST_NULL;
+
+ // set first event of SETUP message to VoIP
+ currEvent = OHC_EHO_LOCAL_TERM_ADDRESS;
+
+ smHandleFirstCallEvent();
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOMoHalfCall::setupNewCall): leaving.\n}\n");
+}
+
+void
+HOMoHalfCall::disconnectNewCall (void)
+{
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOMoHalfCall::disconnectNewCall): entering......\n}\n");
+
+ currEvent = HC_EHO_LOCAL_DISCONNECT_REQ;
+
+ smHandleFirstCallEvent();
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOMoHalfCall::disconnectNewCall): leaving.\n}\n");
+}
+
+
+
+JCCEvent_t
+HOHalfCall::handleEHOMobLocalDisconnect(void)
+{
+ DBG_TRACEho("{\nMNEThoTRACE(HOMoHalfCall::handleEHOMobLocalDisconnect): entering......\n}\n");
+
+ voipReleaseCause_ = CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING;
+
+ // Always do sendRemote at the end of the handler.
+ // Now send the internal Rel Complt message to the other H.323 half call -
+ if (sendRemote(HC_REMOTE_RELEASE_COMPLETE) == false)
+ // failed commn. with the remote side - treat as a release complete
+ // from the remote side and cleanup - skip event loop.
+ {
+ DBG_ERRORho(" ERROR in sending RELEASE COMPLETE to remote side.\n");
+
+ // Since this is the release sequence. Continue anyway.
+ DBG_TRACEho(" Continue release anyway.\n");
+ }
+
+ DBG_TRACEho("{\nMNEThoTRACE(HOMoHalfCall::handleEHOMobLocalDisconnect): leaving.\n}\n");
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+void
+HOMoHalfCall::initData(void)
+{
+ HOHalfCall::initData();
+
+}
+
+
+
+/*******************************************************************/
+HOMtHalfCall::HOMtHalfCall (HOCallLeg *callLeg, JCCTimer *tclTimer)
+{
+ HOHalfCall::parent = callLeg;
+
+ hcTimer = tclTimer;
+ initData();
+}
+
+void
+HOMtHalfCall::initData(void)
+{
+ HOHalfCall::initData();
+}
+
+//ext-HO <xxu:06=07-01>
+JCCEvent_t
+HOHalfCall::handleEHOMobRemoteTermAddress(void)
+{
+ JCCEvent_t retEvent;
+
+ DBG_FUNC("HOHalfCall::handleEHOMobRemoteTermAddress", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+
+ DBG_TRACEho("{\nMNETeiTRACE(hoCall::handleEHOMobRemoteTermAddress): [<==VOIP SETUP] (hoAgId=%d,callId=%d]\n}\n",
+ parent->hoAgId(), parent->callIndexEHO() );
+
+ // copy from the remote message to the local var
+ cpn = remMsgData.callOffering.CalledPartyNumber;
+
+ DBG_TRACE("{\nMNETeiTRACE(hoCall::handleEHOMobRemoteTermAddress): hoNumber (cpn) received in SETUP\n");
+ DBG_TRACE(" : (ie_present=%d),(numberType=%d),(plan=%d),(numDigits=%d)\n",
+ cpn.ie_present,
+ cpn.numberType,
+ cpn.numberingPlan,
+ cpn.numDigits
+ );
+
+ DBG_TRACE(" : handover number digits (%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x)\n}\n",
+ cpn.digits[0],cpn.digits[1],cpn.digits[2],cpn.digits[3],cpn.digits[4],
+ cpn.digits[5],cpn.digits[6],cpn.digits[7],cpn.digits[8],cpn.digits[9],cpn.digits[10]
+ );
+
+ //Eject CALL PROGRESS to VOIP right away
+ retEvent = fakeEHOMobCallProgress();
+
+ DBG_LEAVE();
+ return (retEvent);
+}
+
+//ext-HO <xxu:06=07-01>
+JCCEvent_t
+HOHalfCall::fakeEHOMobCallProgress(void)
+{
+ DBG_FUNC("HOHalfCall::ejectEHOMobCallProgress", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ if (parent->speechVersion() == -1)
+ {
+ DBG_ERRORho("{\nMNETeiERROR(hoCall::fakeEHOMobCallProgress): no speech version recorded\n}\n");
+ rlsCause.causeValue = CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+ voipReleaseCause_ = CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ remMsgData.callProceeding.bearerCap.speechVersionInd[0].fieldPresent = 1;
+ remMsgData.callProceeding.bearerCap.speechVersionInd[0].version = parent->speechVersion();
+
+ remMsgData.callProceeding.bearerCap.speechVersionInd[1].fieldPresent = 0;
+ remMsgData.callProceeding.bearerCap.speechVersionInd[2].fieldPresent = 0;
+
+ // Always do sendRemote at the end of the handler
+ if (sendRemote(HC_REMOTE_CALL_PROGRESS) == false)
+ {
+ DBG_ERRORho("{\nMNETeiERROR(hoCall::fakeEHOMobCallProgress): [==>VOIP PROGRESS failed] (hoAgId=%d, callId=%d,speechVersion=%d)\n}\n",
+ parent->hoAgId(), parent->callIndexEHO(),parent->speechVersion());
+ rlsCause.causeValue = CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+ voipReleaseCause_ = CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ DBG_TRACEho("{\nMNETeiTRACE(hoCall::fakeEHOMobCallProgress): [==>VOIP CALL PROGRESS] (hoAgId=%d,callId=%d,speechVersion=%d)\n}\n",
+ parent->hoAgId(), parent->callIndexEHO(),parent->speechVersion() );
+
+ //reuse this timer for watch dog purpose in case no response from VOIP
+ hcTimer->setTimer(CALL_CALL_CONFIRMED_T310);
+
+ callState_ = EHO_ST_CONFIRMED;
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+//ext-HO <xxu:06=07-01>
+JCCEvent_t
+HOHalfCall::handleHoCallTimeout(void)
+{
+
+ DBG_FUNC("HOHalfCall::handleHoCallTimeout", CC_HO_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACEho("{\nMNETeiTRACE(hoCall::handleHoCallTimeout): [<==CC HO-CALL TIMEOUT] (hoAgId=%d, callId=%d,callState=%d)\n}\n",
+ parent->hoAgId(), parent->callIndexEHO(), callState_);
+
+ if (sendRemote(HC_REMOTE_RELEASE_COMPLETE) == false)
+ {
+ DBG_ERRORho("{\nMNETeiERROR(hoCall::handleHoCallTimeout): [==>VOIP RELEASE_COMPLETE failed] (hoAgId=%d, callId=%d)\n}\n",
+ parent->hoAgId(), parent->callIndexEHO());
+ }
+
+ DBG_TRACEho("{\nMNETeiTRACE(hoCall::handleHoCallTimeout): [==>VOIP RELEASE_COMPLETE cos timeout] (hoAgId=%d, callId=%d)\n}\n",
+ parent->hoAgId(), parent->callIndexEHO());
+
+ rlsCause.causeValue = CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+ voipReleaseCause_ = CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+
+ DBG_LEAVE();
+
+ // JOE: probably a better way than looking at procType (esp considering post handover cases)
+ if (parent->procType == CC_PROC_MOB_ORIG)
+ { // hand-out scenario
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+ }
+ else
+ { // Hand-in scenario
+ return (CC_RELEASE_CALL);
+ }
+
+}
+
+JCCEvent_t
+HOHalfCall::handleEHOMobRemoteChannSelectedEi(void)
+{
+ JCCEvent_t retEvent;
+
+ DBG_FUNC("HOHallCall::handleEHOMobRemoteChannSelectedEi", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ //Stop guarding timer
+ hcTimer->cancelTimer();
+
+ //Sanitory check applied
+ if (remMsgData.codecSelected.Codec != parent->speechVersion() )
+ {
+ DBG_ERRORho("{\nMNETeiERROR(hoCall::handleEHOMobRemoteChannSelectedEi): [<==VOIP CODEC SELECT failed] failed] (hoAgId=%d, callId=%d,loCodec=%d,reCodec=%d)\n}\n",
+ parent->hoAgId(), parent->callIndexEHO(), remMsgData.codecSelected.Codec,
+ parent->speechVersion());
+
+ rlsCause.causeValue = CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+ voipReleaseCause_ = CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ DBG_TRACEho("{\nMNETeiTRACE(hoCall::handleEHOMobRemoteChannSelectedEi): [<==VOIP CODEC SELECT] (hoAgId=%d, callId=%d, codec=%d)\n}\n",
+ parent->hoAgId(), parent->callIndexEHO(), remMsgData.codecSelected.Codec);
+
+ currSpeechCh_.version = remMsgData.codecSelected.Codec;
+
+ //inject CONNECT to VOIP here
+ retEvent = fakeEHOMobConnect();
+
+ DBG_LEAVE();
+ return (retEvent);
+
+}
+
+//ext-HO <xxu:06-07-01>
+JCCEvent_t
+HOHalfCall::handleEHOMobRemoteChannReady(void)
+{
+ DBG_FUNC("HOHallCall::handleEHOMobRemoteChannReady", CC_HO_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACEho("{\nMNEThoTRACE(hoCall::handleEHOMobRemoteChannReady): [<==VOIP VOICE CONNECTED] (hoAgId=%d, callId=%d)\n}\n",
+ parent->hoAgId(), parent->callIndexEHO());
+
+ //JOE: to cover post-handout case where src could be either RTP or GSM
+ //Make two-way connnection
+ T_CSU_PORT_ID src, snk;
+ T_CSU_RESULT_CON csuResult;
+
+ snk.portType = CSU_RTP_PORT;
+ snk.portId.rtpHandler = VoipCallGetRTPHandle(parent->h323CallHandle);
+
+ // If hand-out then SRC is RTP, else hand-in SRC is GSM
+ // JOE: probably a better way than looking at procType (esp considering post handover cases)
+ if (parent->procType == CC_PROC_MOB_ORIG)
+ { // hand-out scenario
+ TwoPartyCallLeg *whichLeg;
+
+ // as long as handover is allowed, active leg is mandatory here.
+ if ((whichLeg = parent->parent->activeLeg()) == NULL)
+ {
+ DBG_TRACEho(" Call no longer active.\n");
+ DBG_TRACEho("{\nMNEThoTRACE(HOHalfCall::handleEHOMobRemoteChannReady): leaving.\n}\n");
+ return (CC_RELEASE_CALL);
+ }
+
+ src.portType = CSU_RTP_PORT;
+ src.portId.rtpHandler = VoipCallGetRTPHandle(whichLeg->h323CallHandle);
+ }
+ else
+ { // Hand-in scenario
+ src.portType = CSU_GSM_PORT;
+ src.portId.gsmHandler = parent->entryId();
+ }
+
+ if ( (csuResult = csu_DuplexConnect(&src, &snk))
+ != CSU_RESULT_CON_SUCCESS)
+ {
+ DBG_ERROR("{\nMNEThoERROR(hoCall::handleEHOMobRemoteChannReady): [==>CSU DUPLEX CONNECT failed] (hoAgId=%d,callId=%d,result=%d,src(%d,%x),snk(%d,%x))\n}\n",
+ parent->hoAgId(), parent->callIndexEHO(), csuResult, src.portType, src.portId.rtpHandler, snk.portType, snk.portId.rtpHandler); csuResult,
+
+ rlsCause.causeValue = CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+ voipReleaseCause_ = CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ DBG_TRACEho("{\nMNEThoTRACE(hoCall::handleEHOMobRemoteChannReady): [==>CSU DUPLEX CONNECTION] (hoAgId=%d,callId=%d, src(%d,%x),snk(%d,%x))\n}\n",
+ parent->hoAgId(), parent->callIndexEHO(), src.portType, src.portId.rtpHandler, snk.portType, snk.portId.rtpHandler);
+
+ parent->voiceConnected = true;
+
+ //Cancel handover timer if needed
+ parent->cancelHoTimerIfNeeded();
+ //if (!parent->cancelHoTimerIfNeeded())
+ //{
+ // DBG_WARNING("{\nMNEThoWARNING(\nMENTeiWARNING(hoCall::handleEHOMobRemoteChannReady): [HO CALL UP BUT NO HANDOVER] (hoAgId=%d,callId=%d)\n}\n",
+ // parent->hoAgId(), parent->callIndexEHO() );
+ //
+ // rlsCause.causeValue = CNI_RIL3_CAUSE_CALL_REJECTED;
+ // voipReleaseCause_ = CNI_RIL3_CAUSE_CALL_REJECTED;
+ //
+ // DBG_LEAVE();
+ // return (CC_RELEASE_CALL);
+ //}
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
+
+//ext-HO <xxu:06-07-01>
+JCCEvent_t
+HOHalfCall::fakeEHOMobConnect(void)
+{
+ DBG_FUNC("HOHallCall::fakeEHOMobConnect", CC_HO_LAYER);
+ DBG_ENTER();
+
+ //inject a fake CONNECT message sent to VOIP right now
+ if (sendRemote(OHC_REMOTE_ANSWER) == false)
+ {
+ rlsCause.causeValue = CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+ voipReleaseCause_ = CNI_RIL3_CAUSE_NETWORK_OUT_OF_ORDER;
+
+
+ DBG_ERRORho("{\nMNEThoTRACE(hoCall::fakeEHOMobConnect): [==>VOIP CONNECT sendRemote failed] (hoAgId=%d, callId=%d)\n}\n",
+ parent->hoAgId(), parent->callIndexEHO());
+
+
+ DBG_LEAVE();
+ return (CC_RELEASE_CALL);
+ }
+
+ DBG_TRACEho("{\nMNEThoTRACE(hoCall::fakeEHOMobConnect): [==>VOIP CONNECT] (hoAgId=%d, callId=%d)\n}\n",
+ parent->hoAgId(), parent->callIndexEHO());
+
+ callState_ = EHO_ST_ACTIVE;
+
+ DBG_LEAVE();
+ return (CC_MESSAGE_PROCESSING_COMPLT);
+}
diff --git a/data/mnet/GP10/Host/cc/src/Makefile b/data/mnet/GP10/Host/cc/src/Makefile
new file mode 100644
index 0000000..5d584fe
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = cc
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\ccm.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif
diff --git a/data/mnet/GP10/Host/cc/src/SmsCommon.cpp b/data/mnet/GP10/Host/cc/src/SmsCommon.cpp
new file mode 100644
index 0000000..6560441
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/SmsCommon.cpp
@@ -0,0 +1,53 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SmsCommon.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 01-20-2000
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files. SMS common functions
+// *******************************************************************
+//
+
+#include <vxworks.h>
+#include <string.h>
+
+#include "Logging\vcmodules.h"
+
+#include "CC/CCSessionHandler.h"
+
+#include "CC/SmsLeg.h"
+
+
+// call the vbLink routine to send message
+static bool ccSmsSendToViberBase(LUDB_ID ludbIdx, SmsVblinkMsg_t smsMsg)
+{
+ unsigned char buffer[sizeof (SmsVblinkMsg_t)];
+ int msgLen;
+ bool status = false;
+
+ DBG_FUNC ("ccSmsSendToViberBase", CC_SMS_LAYER);
+ DBG_ENTER ();
+/*
+ if (ccSmsPackVblinkMsg(buffer, msgLen, cissMsg))
+ {
+ DBG_TRACE("Ludb Index = %d, Buffer Len = %d\n", ludbIdx, msgLen);
+ DBG_HEXDUMP(buffer, msgLen);
+ status = VBLinkMsToNetCiss(ludbIdx, buffer, msgLen);
+ }
+*/
+ DBG_LEAVE ();
+ return status;
+}
diff --git a/data/mnet/GP10/Host/cc/src/SmsFsm.cpp b/data/mnet/GP10/Host/cc/src/SmsFsm.cpp
new file mode 100644
index 0000000..50ec85c
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/SmsFsm.cpp
@@ -0,0 +1,222 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SmsFsm.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 01-20-2000
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+//
+
+#include <vxworks.h>
+
+#include "CC/SmsHalfCall.h"
+
+const int SmsOneFsm_ = 0;
+
+/* ================================================================ */
+/* SMS FSM tables */
+
+/* MO SMS FSM tables */
+const smsEventTableEntry_t smsHandlersMoIdle [] =
+{
+ {SMS_EVENT_MM_EST_IND , (SFH)smsHandlerMmEstInd , SMS_STATE_CONNECTED },
+
+ {SMS_EVENT_TIMEOUT , smsHandlerDef , SMS_STATE_NONE },
+
+ {SMS_EVENT_DEFAULT , smsHandlerDef , SMS_STATE_NONE }
+};
+
+
+// SMS_STATE_MT_CONNECT_MM is valid for MT FSM only
+const smsEventTableEntry_t smsHandlersMoInvalid [] =
+{
+ {SMS_EVENT_DEFAULT , smsHandlerDef , SMS_STATE_IDLE }
+};
+
+
+const smsEventTableEntry_t smsHandlersMoConnected [] =
+{
+ {SMS_EVENT_MM_REL_IND , smsHandlerMmRelInd , SMS_STATE_IDLE },
+
+ {SMS_EVENT_MD_ERROR_IND , smsHandlerMdErrInd , SMS_STATE_IDLE },
+
+ {SMS_EVENT_CP_DATA , (SFH)smsHandlerCpData , SMS_STATE_NONE },
+ {SMS_EVENT_CP_ACK , (SFH)smsHandlerCpReject , SMS_STATE_NONE },
+ {SMS_EVENT_CP_ERROR , (SFH)smsHandlerCpError , SMS_STATE_IDLE },
+
+ {SMS_EVENT_MNSMS_DATA_REQ , (SFH)smsHandlerMnDataReq, SMS_STATE_WAIT_CP_ACK},
+ {SMS_EVENT_MNSMS_REL_REQ , smsHandlerDef , SMS_STATE_IDLE },
+ {SMS_EVENT_MNSMS_ABORT_REQ, (SFH)smsHandlerMnAbortReq,SMS_STATE_DISCONNECT },
+
+ {SMS_EVENT_TIMEOUT , smsHandlerTimeout , SMS_STATE_IDLE },
+
+ {SMS_EVENT_DEFAULT , smsHandlerDef , SMS_STATE_NONE }
+};
+
+const smsEventTableEntry_t smsHandlersMoWaitCpAck [] =
+{
+// {SMS_EVENT_MM_EST_IND , smsHandlerMmRelInd , SMS_STATE_NONE }, //Concatineted MO Msg notifitation
+ {SMS_EVENT_MM_REL_IND , smsHandlerMmRelInd , SMS_STATE_IDLE },
+
+ {SMS_EVENT_MD_ERROR_IND , smsHandlerMdErrInd , SMS_STATE_IDLE },
+
+ {SMS_EVENT_CP_DATA , (SFH)smsHandlerCpData , SMS_STATE_NONE },
+ {SMS_EVENT_CP_ACK , (SFH)smsHandlerCpAck , SMS_STATE_CONNECTED },
+ {SMS_EVENT_CP_ERROR , (SFH)smsHandlerCpError , SMS_STATE_IDLE },
+
+ {SMS_EVENT_MNSMS_REL_REQ , smsHandlerDef , SMS_STATE_DISCONNECT },
+ {SMS_EVENT_MNSMS_ABORT_REQ, (SFH)smsHandlerMnAbortReq,SMS_STATE_DISCONNECT },
+
+ {SMS_EVENT_TIMEOUT , smsHandlerTimeoutAck , SMS_STATE_NONE },
+
+ {SMS_EVENT_DEFAULT , smsHandlerDef , SMS_STATE_NONE }
+};
+
+/*==================================================================*/
+/* MT SMS FSM tables */
+
+const smsEventTableEntry_t smsHandlersMtIdle [] =
+{
+ {SMS_EVENT_MNSMS_EST_REQ , (SFH)smsHandlerMnEstReq , SMS_STATE_MT_CONNECT_MM},
+
+ {SMS_EVENT_TIMEOUT , smsHandlerDef , SMS_STATE_NONE },
+
+ {SMS_EVENT_DEFAULT , smsHandlerDef , SMS_STATE_NONE }
+};
+
+
+/* Wait for MM (SAPI=0) and L2 (SAPI=3) connection establishment */
+const smsEventTableEntry_t smsHandlersMtWaitMm [] =
+{
+ {SMS_EVENT_MM_EST_CNF , smsHandlerMmEstCnf , SMS_STATE_NONE },
+ {SMS_EVENT_MM_EST_REJ , smsHandlerMmEstRej , SMS_STATE_IDLE },
+ {SMS_EVENT_MM_REL_IND , smsHandlerMmRelInd , SMS_STATE_IDLE },
+
+ {SMS_EVENT_MD_ERROR_IND , smsHandlerMdErrInd , SMS_STATE_IDLE },
+
+ {SMS_EVENT_MNSMS_REL_REQ , (SFH)smsHandlerMnRelReq , SMS_STATE_IDLE },
+ {SMS_EVENT_MNSMS_ABORT_REQ, (SFH)smsHandlerMnAbortReq,SMS_STATE_DISCONNECT },
+
+ {SMS_EVENT_TIMEOUT , smsHandlerTimeout , SMS_STATE_IDLE },
+
+ {SMS_EVENT_DEFAULT , smsHandlerDef , SMS_STATE_NONE }
+};
+
+
+const smsEventTableEntry_t smsHandlersMtConnected [] =
+{
+ {SMS_EVENT_MM_REL_IND , smsHandlerMmRelInd , SMS_STATE_IDLE },
+
+ {SMS_EVENT_MD_ERROR_IND , smsHandlerMdErrInd , SMS_STATE_IDLE },
+
+ {SMS_EVENT_CP_DATA , (SFH)smsHandlerCpData , SMS_STATE_NONE },
+ {SMS_EVENT_CP_ACK , (SFH)smsHandlerCpReject , SMS_STATE_NONE },
+ {SMS_EVENT_CP_ERROR , (SFH)smsHandlerCpError , SMS_STATE_IDLE },
+
+ {SMS_EVENT_MNSMS_DATA_REQ , (SFH)smsHandlerMnDataReq, SMS_STATE_WAIT_CP_ACK},
+ {SMS_EVENT_MNSMS_REL_REQ , (SFH)smsHandlerMnRelReq , SMS_STATE_DISCONNECT },
+ {SMS_EVENT_MNSMS_ABORT_REQ, (SFH)smsHandlerMnAbortReq,SMS_STATE_DISCONNECT },
+
+ {SMS_EVENT_TIMEOUT , smsHandlerTimeout , SMS_STATE_IDLE },
+
+ {SMS_EVENT_DEFAULT , smsHandlerDef , SMS_STATE_NONE }
+};
+
+
+const smsEventTableEntry_t smsHandlersMtWaitCpAck [] =
+{
+ {SMS_EVENT_MM_REL_IND , smsHandlerMmRelInd , SMS_STATE_IDLE },
+
+ {SMS_EVENT_MD_ERROR_IND , smsHandlerMdErrInd , SMS_STATE_IDLE },
+
+ {SMS_EVENT_CP_DATA , (SFH)smsHandlerCpData , SMS_STATE_CONNECTED },
+ {SMS_EVENT_CP_ACK , (SFH)smsHandlerCpAck , SMS_STATE_CONNECTED },
+ {SMS_EVENT_CP_ERROR , (SFH)smsHandlerCpError , SMS_STATE_IDLE },
+
+// {SMS_EVENT_MNSMS_DATA_REQ , smsHandlerDef , SMS_STATE_NONE },
+ {SMS_EVENT_MNSMS_REL_REQ , (SFH)smsHandlerMnRelReq , SMS_STATE_DISCONNECT },
+ {SMS_EVENT_MNSMS_ABORT_REQ, (SFH)smsHandlerMnAbortReq,SMS_STATE_DISCONNECT },
+
+ {SMS_EVENT_TIMEOUT , smsHandlerTimeoutAck , SMS_STATE_NONE },
+
+ {SMS_EVENT_DEFAULT , smsHandlerDef , SMS_STATE_NONE }
+};
+
+
+/*==================================================================*/
+/* Common tables */
+
+//SMS_STATE_DISCONNECT
+const smsEventTableEntry_t smsHandlersDisconnect [] =
+{
+ {SMS_EVENT_MM_REL_IND , smsHandlerMmRelInd , SMS_STATE_IDLE },
+
+ {SMS_EVENT_MD_ERROR_IND , smsHandlerMdErrInd , SMS_STATE_IDLE },
+
+ {SMS_EVENT_CP_ACK , (SFH)smsHandlerCpAck , SMS_STATE_IDLE },
+ {SMS_EVENT_CP_ERROR , (SFH)smsHandlerCpError , SMS_STATE_IDLE },
+
+ {SMS_EVENT_TIMEOUT , smsHandlerTimerDisc , SMS_STATE_NONE },
+
+ {SMS_EVENT_DEFAULT , smsHandlerDef , SMS_STATE_NONE }
+
+};
+
+/*==================================================================*/
+/* State tables */
+
+const smsEventTableEntry_t *smsMoTable [SMS_STATE_MAX] =
+{
+ smsHandlersMoIdle ,
+ smsHandlersMoInvalid ,
+ smsHandlersMoConnected,
+ smsHandlersMoWaitCpAck,
+ smsHandlersDisconnect
+};
+
+const smsEventTableEntry_t *smsMtTable [SMS_STATE_MAX] =
+{
+ smsHandlersMtIdle ,
+ smsHandlersMtWaitMm ,
+ smsHandlersMtConnected,
+ smsHandlersMtWaitCpAck,
+ smsHandlersDisconnect
+};
+
+
+/*==================================================================*/
+/*
+const smsEventTableEntry_t smsHandlersState??? [] =
+{
+ {SMS_EVENT_MM_EST_IND , smsHandlerDef, SMS_STATE_NONE },
+ {SMS_EVENT_MM_EST_CNF , smsHandlerDef, SMS_STATE_NONE },
+ {SMS_EVENT_MM_EST_REJ , smsHandlerDef, SMS_STATE_NONE },
+ {SMS_EVENT_MM_REL_IND , smsHandlerDef, SMS_STATE_NONE },
+
+ {SMS_EVENT_MD_ERROR_IND , smsHandlerDef, SMS_STATE_NONE },
+
+ {SMS_EVENT_CP_DATA , smsHandlerDef, SMS_STATE_NONE },
+ {SMS_EVENT_CP_ACK , smsHandlerDef, SMS_STATE_NONE },
+ {SMS_EVENT_CP_ERROR , smsHandlerDef, SMS_STATE_NONE },
+
+ {SMS_EVENT_MNSMS_DATA_REQ , smsHandlerDef, SMS_STATE_NONE },
+ {SMS_EVENT_MNSMS_REL_REQ , smsHandlerDef, SMS_STATE_NONE },
+ {SMS_EVENT_MNSMS_ABORT_REQ, smsHandlerDef, SMS_STATE_NONE },
+ {SMS_EVENT_TIMEOUT , smsHandlerDef, SMS_STATE_NONE },
+ {SMS_EVENT_DEFAULT , smsHandlerDef, SMS_STATE_NONE }
+};
+*/ \ No newline at end of file
diff --git a/data/mnet/GP10/Host/cc/src/SmsHalfCall.cpp b/data/mnet/GP10/Host/cc/src/SmsHalfCall.cpp
new file mode 100644
index 0000000..b9d667c
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/SmsHalfCall.cpp
@@ -0,0 +1,263 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SmsHalfCall.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 01-20-2000
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+
+#include "CC/CCSessionHandler.h"
+#include "CC/CallConfig.h"
+#include "CC/SmsHalfCall.h"
+
+extern const smsEventTableEntry_t *smsMoTable [],
+ *smsMtTable [];
+
+// *******************************************************************
+//
+// *******************************************************************
+#define SMS_EVENT_NUMBER (CC_MM_CONNECTION_IND - CC_MM_CONNECTION_REQ + SMS_EVENT_DEFAULT-SMS_EVENT_BASE)
+
+const char * SmsEventNames[SMS_EVENT_NUMBER] =
+{
+ {"Invalid" }, // 0
+ {"MM-EST Cnf" }, //92 1
+ {"MM-Est Rej" }, //93 2
+ {"MM-REL Ind" }, //94 3
+ {"MM-EST Ind" }, //95 4
+
+ {"DL-ERROR Ind" }, //301 5
+
+ {"CP-DATA" }, //302 6
+ {"CP-ACK" }, //303 7
+ {"CP-ERROR" }, //304 8
+ {"MNSMS-EST Req" }, //305 9
+ {"MNSMS-DATA Req" }, //306 10
+ {"MNSMS-REL Req" }, //307 11
+ {"MNSMS-ABORT Req" }, //308 12
+ {"TIMEOUT" }, //309 13
+ {"SMS-PROTOCOL ERROR"} //310 14
+};
+
+
+/*******************************************************************/
+
+SmsHalfCall::SmsHalfCall (SmsLeg& smsLeg, smsEventTableEntry_t **table)
+ : parent_ (smsLeg),
+ smsTable_(table )
+{
+ UINT16 uint16TimerValue;
+ int timerValue ;
+
+ // Timer Data below is used for sending timeout to the correct task.
+ uint16TimerValue = (((UINT16)(parent_.callLegNum)) & (0x000F)) << 8;
+ uint16TimerValue = uint16TimerValue | (((UINT16)(parent_.callIndex)) & 0x00FF);
+
+ timerValue = (short)uint16TimerValue;
+
+ smsTimer_ = new JCCTimer(callTimerExpiry, timerValue);
+
+ initData ();
+}
+
+
+SmsHalfCall::~SmsHalfCall ()
+{
+ delete smsTimer_;
+}
+
+
+void SmsHalfCall::initData ()
+{
+ currentState_ = SMS_STATE_IDLE;
+
+ resetNextState ();
+ resetLastAttemt ();
+ resetRpdu ();
+}
+
+
+void SmsHalfCall::cleanup (T_CNI_RIL3_CAUSE_VALUE cause)
+{
+ // Not used upon VBLink abnormal release!!!
+ initData ();
+}
+
+
+void SmsHalfCall::resetRpdu ()
+{
+ CNI_RIL3_ZAPMSG ((void *)&rpdu_, sizeof(T_CNI_RIL3_IE_CP_USER_DATA));
+}
+
+
+void SmsHalfCall::saveRpdu (SmsVblinkMsg_t *vbMsgData)
+{
+ DBG_FUNC ("SmsHalfCall::saveRpdu", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ if (vbMsgData->hdr.msgLen > 0)
+ {
+ rpdu_.ie_present = true;
+ rpdu_.length = vbMsgData->hdr.msgLen;
+
+ memcpy ((void *)&rpdu_.rpdu_data, vbMsgData->msg, rpdu_.length);
+ }
+ else
+ DBG_WARNING ("SMS: RP data is not presented.\n");
+
+ DBG_LEAVE();
+}
+
+
+void SmsHalfCall::setNewState (SmsState_t state)
+{
+ DBG_FUNC ("SmsHalfCall::setNewState", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ /*
+ New state is set according to the following rules:
+ 1. Equal to nextState_ (override the table default)
+ if it's set to a legal state [0, SMS_STATE_MAX) , else
+ 2. Stay without change if nextState_ == SMS_STATE_NONE, else
+ 3. Equal to required state, if it's a legal state , else
+ 4. Stay without change if state == SMS_STATE_NONE,
+ */
+
+ currentState_ = (nextState_ < SMS_STATE_MAX)
+ ? nextState_
+ : (nextState_ != SMS_STATE_NONE && state < SMS_STATE_MAX )
+ ? state
+ : currentState_;
+
+ nextState_ = SMS_STATE_MAX; // Reset it
+
+ DBG_WARNING ("SMS leg %d, new state = %d\n",
+ (parent_.callLegNum - SMS_LEGNUM_OFFSET), currentState_);
+
+ DBG_LEAVE();
+}
+
+
+// SMS FSM main access method
+bool SmsHalfCall::invokeHandler (JCCEvent_t newEvent, void *data, INT32 param1)
+{
+ bool retVal ;
+ int index = 0;
+
+ DBG_FUNC ("SmsHalfCall::invokeHandler", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ const smsEventTableEntry_t *stateTable = smsTable_[getState()];
+
+ if (validateEvent (newEvent))
+ {
+
+ DBG_TRACE ("invokeHandler (%s SMS Leg %d).\n\
+ Current State = %d, event %s (%d)\n",
+ (parent_.getSmsLegType() == SMS_MO_LEG) ? "MO" : "MT",
+ (parent_.callLegNum - SMS_LEGNUM_OFFSET), getState(),
+ getEventName(newEvent), newEvent);
+
+ while ((stateTable + index)->event != newEvent &&
+ (stateTable + index)->event != SMS_EVENT_DEFAULT )
+ {
+ ++index;
+ }
+
+ DBG_WARNING ("SMS FSM table entry num %d is selected for state %d.\n",
+ index, getState());
+
+ // Invoke an appropriate handler
+ retVal = (stateTable + index)->handler (this, data, param1);
+
+ // Set new state
+ // This state could be overrided by the handler!
+ if (retVal == false) // Call Continues
+ setNewState ((stateTable + index)->nextState);
+ else
+ setNewState (SMS_STATE_IDLE); // force state to IDLE
+
+ if (getState() == SMS_STATE_IDLE)
+ retVal = true; // safety measure
+ }
+
+ else
+ { // Invalid event (out of the range). No change in a state of the half call.
+ DBG_ERROR ("SMS Error: (SmsHalfCall::smsInvokeHandler) Event = %d is out of range\n",
+ newEvent);
+ retVal = false;
+ }
+
+ DBG_LEAVE ();
+ return (retVal);
+}
+
+const char * SmsHalfCall::getEventName (JCCEvent_t event)
+{
+ static char buff [50];
+
+ unsigned index;
+
+ switch (event)
+ {
+ case SMS_EVENT_MM_EST_CNF :
+ case SMS_EVENT_MM_EST_REJ :
+ case SMS_EVENT_MM_REL_IND :
+ case SMS_EVENT_MM_EST_IND :
+ index = event - CC_INTERNAL_CALL_EVENT_BASE -1;
+ break;
+
+ case SMS_EVENT_MD_ERROR_IND :
+ case SMS_EVENT_CP_DATA :
+ case SMS_EVENT_CP_ACK :
+ case SMS_EVENT_CP_ERROR :
+ case SMS_EVENT_MNSMS_EST_REQ :
+ case SMS_EVENT_MNSMS_DATA_REQ :
+ case SMS_EVENT_MNSMS_REL_REQ :
+ case SMS_EVENT_MNSMS_ABORT_REQ:
+ case SMS_EVENT_TIMEOUT :
+ case SMS_EVENT_PROTOCOL_ERROR :
+ index = event - SMS_EVENT_BASE + 4;
+ break;
+
+ default:
+ sprintf (buff, "Unknown SMS event %d", event);
+ return (buff);
+ }
+
+ return (SmsEventNames [index]);
+}
+
+
+/*******************************************************************/
+SmsMoHalfCall::SmsMoHalfCall (SmsLeg& smsLeg)
+ : SmsHalfCall (smsLeg, (smsEventTableEntry_t **)smsMoTable)
+{
+ ;
+}
+
+
+
+
+/*******************************************************************/
+SmsMtHalfCall::SmsMtHalfCall (SmsLeg& smsLeg)
+ : SmsHalfCall (smsLeg, (smsEventTableEntry_t **)smsMtTable)
+{
+ ;
+}
+
diff --git a/data/mnet/GP10/Host/cc/src/SmsHandlers.cpp b/data/mnet/GP10/Host/cc/src/SmsHandlers.cpp
new file mode 100644
index 0000000..fa47de4
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/SmsHandlers.cpp
@@ -0,0 +1,537 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SmsHandlers.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 01-20-2000
+// Description : Contains handlers for the SMS-PP FSM
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+//
+
+#include <vxworks.h>
+
+#include "logging\vclogging.h"
+#include "jcc\LUDBApi.h"
+
+#include "CC\CallConfig.h"
+#include "CC\CCUtil.h"
+#include "CC\CCSessionHandler.h"
+
+#include "CC\SmsLeg.h"
+#include "CC\SmsHalfCall.h"
+
+#define SMS_SEND_ABORT_TIMEOUT ((int)(SMS_WAIT_DISCONNECT * 1.5))
+
+
+/* SMS Event handlers */
+/* Handlers will return true is the Leg should be released, otherwise false */
+
+/* ========================================================== */
+/* SMS Default Event handler */
+
+bool smsHandlerDef (SmsHalfCall *hcall, void *data, INT32 param1)
+{
+ DBG_FUNC ("smsHandlerDef", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ SmsLeg & leg = hcall->getParent();
+
+ DBG_WARNING ("SMS: Event inconsistent with protocol state %d received by %s SMS leg %d\n",
+ hcall->getState(), (leg.getSmsLegType() == SMS_MO_LEG) ? "MO" : "MT",
+ (leg.callLegNum - SMS_LEGNUM_OFFSET));
+
+ DBG_LEAVE();
+ return (false);
+}
+
+
+/* ========================================================== */
+/* DL Layer handlers */
+
+bool smsHandlerMdErrInd (SmsHalfCall *hcall, void * data, INT32 param1)
+{
+ DBG_FUNC ("smsHandlerMdErrInd", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ SmsLeg & leg = hcall->getParent();
+
+ hcall->smsTimer_->cancelTimer();
+
+ // take cause in account
+ leg.setRemRelCause (CNI_RIL3_RP_CAUSE_PROTOCOL_ERROR_UNSPECIFIED);
+
+ DBG_LEAVE();
+ return (true);
+}
+
+
+/* ========================================================== */
+/* MM handlers */
+
+bool smsHandlerMmEstInd (SmsHalfCall *hcall, void *data, T_CNI_RIL3_SI_TI newTi)
+{
+ bool retVal = false ;
+ SmsLeg & leg = hcall->getParent();
+
+ DBG_FUNC ("smsHandlerMmEstInd", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ // Currently will reject second MO SMS request !!!
+ // Later will take care of concatenated MO SMS here:
+ // will not reject the message with different TI
+ // while waiting for the final CP-ACK
+ if (hcall->getState () == SMS_STATE_IDLE)
+ {
+ // set transaction Id - first message for SMS
+ // The starting entity uses 0. Other side uses 1.
+ // hcall->getParent().setTi (newTi | TI_ORIG_OR_MASK);
+
+ DBG_TRACE ("SMS Leg %d: Set TI = %d\n", (leg.callLegNum - SMS_LEGNUM_OFFSET),
+ leg.getTi());
+
+ // start the timer while waiting for the first CM level setup message
+ // Wait for the following SMS PDU
+ hcall->smsTimer_->setTimer (CALL_MM_CONN_EST_T999);
+ }
+ else
+ {
+ ; // Yet unexpected. Will be handled later
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+bool smsHandlerMmEstCnf (SmsHalfCall *hcall, void * data, INT32 param1)
+{
+ int result;
+ DBG_FUNC ("smsHandlerMmEstCnf", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ CCSessionHandler * session = hcall->getParent().parent;
+ bool retVal = false ;
+
+ hcall->smsTimer_->cancelTimer ();
+
+ /* MM connection has been established.
+ Forward CP-DATA to the session */
+ if ((result = hcall->getParent().msgBuilder->sendCpData())
+ == CNI_RIL3_RESULT_SUCCESS )
+ {
+ hcall->setNextState (SMS_STATE_WAIT_CP_ACK);
+ hcall->smsTimer_->setTimer (SMS_WAIT_CP_ACK_TC1 );
+ }
+ else
+ {
+ DBG_ERROR ("SMS: Unable to send CP-DATA. Error code %d\n", result);
+ retVal = true; // Release connection on packing error
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+bool smsHandlerMmEstRej (SmsHalfCall *hcall, void * data, INT32 param1)
+{
+ DBG_FUNC ("smsHandlerMmEstRej", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ hcall->smsTimer_->cancelTimer();
+
+ // Set error code for SMR to identify the case when Page request failed
+ // This error code is used ONLY inside ViperNet between VC and VB based
+ // SMS Entities and should not be forwarded to the SM-SC
+ hcall->getParent().setRemRelCause (CNI_RIL3_RP_CAUSE_UNKNOWN_SUBSCRIBER);
+
+ DBG_LEAVE();
+ return (true);
+}
+
+
+bool smsHandlerMmRelInd (SmsHalfCall *hcall, void *msgData, INT32 param1)
+{
+ DBG_FUNC ("smsHandlerMmRelInd", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ hcall->smsTimer_->cancelTimer();
+
+ DBG_LEAVE();
+ return (true);
+}
+
+
+/* ========================================================== */
+/* MS PDU handlers */
+
+bool smsHandlerCpData (SmsHalfCall *hcall, T_CNI_RIL3SMS_MSG_CP_DATA *msgCpData, INT32 param1)
+{
+ DBG_FUNC ("smsHandlerCpData", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ int result ;
+ bool retVal = false ;
+ SmsLeg & leg = hcall->getParent() ;
+ T_CNI_RIL3_SI_TI oldTi = leg.getTi() ,
+ newTi = msgCpData->header.si_ti & TI_TERM_AND_MASK;
+
+ // Cancel timer T999
+ hcall->smsTimer_->cancelTimer();
+
+ DBG_TRACE ("CP-DATA received by %s SMS leg %d, TI = %d\n",
+ (leg.getSmsLegType() == SMS_MO_LEG) ? "MO" : "MT",
+ (leg.callLegNum - SMS_LEGNUM_OFFSET), msgCpData->header.si_ti);
+
+ if (leg.getSmsLegType() == SMS_MO_LEG &&
+ (oldTi == SMS_TI_INVALID || // Condition 1.
+ (oldTi != newTi && hcall->getState() == SMS_STATE_WAIT_CP_ACK)) ) // Condition 2.
+ {
+ /* Valid for MO SMS Leg only!
+ 1. For the very first CP PDU received in the dialog OR
+ 2. Received next part of a concatenated MO message
+ described in GSM 04.11, ver 6.0.1, 5.4, page 23.
+ Accept and save received TI */
+ leg.setTi (newTi);
+ }
+ else if (oldTi == newTi)
+ { // Normal case. Consecutive PDU in the trasfer
+ ;
+ }
+ else
+ { // Handle unexpected CP-DATA
+ retVal = smsHandlerCpReject (hcall, (T_CNI_RIL3SMS_CP_MSG *)msgCpData, param1);
+
+ DBG_LEAVE();
+ return (retVal);
+ }
+
+ // send CP-ACK
+ if ((result = leg.msgBuilder->sendCpAck())
+ == CNI_RIL3_RESULT_SUCCESS )
+ {
+ if (leg.getSmsLegType() == SMS_MO_LEG)
+ { // MO (first uplink PDU) - send MNSMS-EST ind (msgCpData->cp_user_data) via VBLink
+ leg.msgBuilder->sendMnSmsEstInd (msgCpData->cp_user_data.length ,
+ msgCpData->cp_user_data.rpdu_data);
+ }
+ else
+ leg.msgBuilder->sendMnSmsDataInd (msgCpData->cp_user_data.length ,
+ msgCpData->cp_user_data.rpdu_data);
+ }
+ else
+ {
+ retVal = true; // Release connection on packing error
+ DBG_ERROR ("SMS: Unable to send CP-ACK. Error code %d\n", result);
+ }
+
+ DBG_LEAVE();
+ return (false);
+}
+
+
+// Response for CP-ACK. Valid in Wait_for_CP-ACK state
+bool smsHandlerCpAck (SmsHalfCall *hcall, T_CNI_RIL3SMS_MSG_CP_ACK *msgCpAck, INT32 param1)
+{
+ bool retVal = false;
+
+ DBG_FUNC ("smsHandlerCpAck", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ hcall->smsTimer_->cancelTimer();
+
+ if (hcall->getState() == SMS_STATE_DISCONNECT)
+ {
+ /* This is an ack for the last CP-DATA in a dialog. Release the leg. */
+ hcall->getParent().resetVbRefNum (); // no need to notify SMR
+ retVal = true;
+ }
+ else
+ hcall->resetRpdu(); // Cleanup RPDU storage
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+bool smsHandlerCpError (SmsHalfCall *hcall, T_CNI_RIL3SMS_MSG_CP_ERROR* msgCpError, INT32 param1)
+{
+ DBG_FUNC ("smsHandlerCpError", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ hcall->smsTimer_->cancelTimer();
+
+ hcall->getParent().setRemRelCause ((T_CNI_RIL3_RP_CAUSE_VALUE)
+ msgCpError->cp_cause.causeValue);
+
+ DBG_LEAVE();
+ return (true);
+}
+
+
+// Used to notify MS about receiving unexpected PDU
+bool smsHandlerCpReject (SmsHalfCall *hcall, T_CNI_RIL3SMS_CP_MSG* msgCpMsg, INT32 param1)
+{
+ DBG_FUNC ("smsHandlerCpReject", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ int result ;
+ bool retVal = false;
+ SmsLeg& leg = hcall->getParent();
+
+ hcall->smsTimer_->cancelTimer();
+
+ leg.setRemRelCause (CNI_RIL3_RP_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE);
+
+ // send CP-ERROR (Error = Msg not compatible with the protocol state[98])
+ if ((result = leg.msgBuilder->sendCpError(CNI_RIL3_CP_CAUSE_MSG_NOT_COMPATIBLE))
+ == CNI_RIL3_RESULT_SUCCESS )
+ {
+ hcall->setNewState (SMS_STATE_DISCONNECT );
+ hcall->smsTimer_->setTimer (SMS_SEND_ABORT_TIMEOUT);
+ }
+ else
+ {
+ DBG_ERROR ("SMS: Unable to send CP-ERROR. Error code %d\n", result);
+ retVal = true;
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+/* ========================================================== */
+/* VB Event handlers */
+
+// Use it for the accepted MT setup only. Otherwise, invoke reject method
+bool smsHandlerMnEstReq (SmsHalfCall *hcall ,
+ SmsVblinkMsg_t *vbMsgData,
+ T_CNI_RIL3_CP_CAUSE_VALUE cause )
+{
+ DBG_FUNC ("smsHandlerMnSmsEstReq", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ bool retVal = false ;
+ SmsLeg & leg = hcall->getParent();
+ IntraL3Msg_t mmOutMsg;
+
+ // Save RP data first
+ hcall->saveRpdu (vbMsgData);
+
+ // Initiate MM Setup (send MM-Est Req)
+
+ // Fill the data for MM message
+ mmOutMsg.l3_data.pageReq.imsi = ludbGetMobileId (leg.ludbIndex());
+ mmOutMsg.l3_data.pageReq.qid = leg.msgQId;
+
+ // Store received VB ref. number
+ leg.setVbRefNum (vbMsgData->hdr.refNum);
+ leg.allocateTi ();
+
+ if (leg.parent->isMmConnected() == false)
+ { // MM connection yet to be established
+ DBG_TRACE ("SMS: handover session = %p, anchor = %p, target = %p\n entryId %d\n",
+ leg.parent->handoverSession, leg.parent->anchorHandoverSession,
+ leg.parent->targetHandoverSession, leg.parent->entryId);
+
+ sendMM (INTRA_L3_MM_EST_REQ, INTRA_L3_MM_LOCATE_MS,
+ leg.entryId() , &mmOutMsg );
+
+ hcall->smsTimer_->setTimer (CALL_MM_CONN_EST_T999);
+ }
+ else
+ { /* Continue with the process by forwarding CP-DATA to MS */
+ retVal = smsHandlerMmEstCnf (hcall, NULL_PTR, 0);
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+bool smsHandlerMnDataReq (SmsHalfCall *hcall ,
+ SmsVblinkMsg_t *vbMsgData,
+ T_CNI_RIL3_CP_CAUSE_VALUE cause )
+{
+ bool retVal = false;
+ int result;
+
+ DBG_FUNC ("smsHandlerMnSmsDataReq", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ hcall->smsTimer_->cancelTimer();
+
+ // Save RP data first
+ hcall->saveRpdu (vbMsgData);
+
+ // Send CP-DATA
+ if ((result = hcall->getParent().msgBuilder->sendCpData())
+ == CNI_RIL3_RESULT_SUCCESS )
+ {
+ if (vbMsgData->hdr.status)
+ hcall->setNextState (SMS_STATE_DISCONNECT);
+ /* Indicates that this is a final message
+ from SMS-SC and the leg should be
+ disconnected upon completion. */
+ hcall->getParent().resetVbRefNum (); /* prevents sending notification to SMR on delivery error */
+
+ hcall->smsTimer_->setTimer (SMS_WAIT_CP_ACK_TC1);
+ }
+ else
+ {
+ retVal = true; // Release connection on packing error
+ DBG_ERROR ("SMS: Unable to send CP-DATA. Error code %d\n", result);
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+bool smsHandlerMnAbortReq (SmsHalfCall *hcall ,
+ SmsVblinkMsg_t *vbMsgData,
+ T_CNI_RIL3_CP_CAUSE_VALUE cause )
+{
+ DBG_FUNC ("smsHandlerMnAbortReq", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ int result ;
+ bool retVal = false;
+ SmsLeg& leg = hcall->getParent();
+
+ hcall->smsTimer_->cancelTimer();
+
+ // send CP-ERROR
+ if ((result = leg.msgBuilder->sendCpError(cause))
+ == CNI_RIL3_RESULT_SUCCESS )
+ {
+ leg.resetVbRefNum ();
+ hcall->smsTimer_->setTimer (SMS_SEND_ABORT_TIMEOUT);
+ }
+ else
+ {
+ DBG_ERROR ("SMS: Unable to send CP-ERROR. Error code %d\n", result);
+ retVal = true;
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+bool smsHandlerMnRelReq (SmsHalfCall *hcall ,
+ SmsVblinkMsg_t *vbMsgData,
+ T_CNI_RIL3_CP_CAUSE_VALUE cause )
+{
+ DBG_FUNC ("smsHandlerMnRelReq", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ SmsLeg & leg = hcall->getParent();
+
+ hcall->smsTimer_->cancelTimer ();
+ leg.resetVbRefNum();
+
+ /* This will allow us to send the final CP-ACK before the channel is released. */
+ if (leg.getSmsLegType() == SMS_MT_LEG &&
+ hcall->getState () == SMS_STATE_CONNECTED )
+ {
+ hcall->smsTimer_->setTimer (SMS_WAIT_DISCONNECT );
+ }
+
+ DBG_LEAVE();
+ return (false);
+}
+
+
+/* ========================================================== */
+/* Timer handlers */
+
+// Fatal SMS timeout handling
+bool smsHandlerTimeout (SmsHalfCall *hcall, void *data, INT32 param1)
+{
+ IntraL3Msg_t mmOutMsg;
+
+ DBG_FUNC ("smsHandlerTimeout", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ hcall->smsTimer_->cancelTimer();
+
+ // Igal: will take cause in account later
+
+ DBG_LEAVE();
+ return (true);
+}
+
+
+// Use it in Wait for CP-ACK state
+bool smsHandlerTimeoutAck (SmsHalfCall *hcall, void *data, INT32 param1)
+{
+ int result ;
+ IntraL3Msg_t mmOutMsg;
+ bool retVal = false;
+
+ DBG_FUNC ("smsHandlerTimeoutAck", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ if (hcall->isLastAttemt())
+ retVal = smsHandlerTimeout (hcall, data, param1); // second attempt has failed
+ else
+ { // resend CP-DATA
+ hcall->smsTimer_->cancelTimer();
+
+ hcall->setLastAttemt();
+
+ // send CP-DATA
+ if ((result = hcall->getParent().msgBuilder->sendCpData())
+ == CNI_RIL3_RESULT_SUCCESS )
+ {
+ hcall->smsTimer_->setTimer (SMS_WAIT_CP_ACK_TC1);
+ }
+ else
+ {
+ DBG_ERROR ("SMS: Unable to send CP-DATA. Error code %d\n", result);
+ retVal = true; // Release connection on packing error
+ }
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+// Use it state Wait for disconnect state
+bool smsHandlerTimerDisc (SmsHalfCall *hcall, void *data, INT32 param1)
+{
+ DBG_FUNC ("smsHandlerTimerDisc", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ bool retVal = true;
+
+ // No need to notify Remote side
+ hcall->getParent().resetVbRefNum ();
+
+ if (hcall->isRpdu())
+ { // This timeout is due to TC1 expiry for a last CP-DATA in a dialog.
+ // Possibly need to resend it.
+ retVal = smsHandlerTimeoutAck (hcall, data, param1);
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
diff --git a/data/mnet/GP10/Host/cc/src/SmsLeg.cpp b/data/mnet/GP10/Host/cc/src/SmsLeg.cpp
new file mode 100644
index 0000000..9b2710c
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/SmsLeg.cpp
@@ -0,0 +1,405 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SmsLeg.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 01-20-2000
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+//
+
+#include <vxworks.h>
+#include <string.h>
+#include <taskLib.h>
+
+
+#include "Logging\vcmodules.h"
+
+#include "CC/CCSessionHandler.h"
+
+#include "CC/SmsCommonDef.h"
+#include "CC/SmsLeg.h"
+
+extern bool callTrace;
+
+// *******************************************************************
+//
+// *******************************************************************
+
+
+// *******************************************************************
+// SmsLeg class
+// *******************************************************************
+
+// Definition of the static data member
+UINT32 SmsLeg::lastVbRefNum_ (0);
+
+
+SmsLeg::SmsLeg (CCSessionHandler *session,
+ int callId ,
+ MSG_Q_ID qid ,
+ short legNum )
+ : CallLeg ()
+{
+ DBG_FUNC ("SmsLeg::SmsLeg (...)", CC_SMS_LAYER);
+ DBG_ENTER();
+
+ msgBuilder = new SmsMsgBuilder (*this);
+
+ initData ();
+
+ // Init parent class data
+ CallLeg::parent = session;
+ CallLeg::callIndex = callId ;
+ CallLeg::msgQId = qid ;
+ CallLeg::callLegNum = legNum ;
+
+ if (callLegNum == SMS_MO_LEG_NUM)
+ InitMoLeg (); // MO SMS Leg
+ else
+ InitMtLeg (); // MT SMS leg
+
+ DBG_LEAVE();
+}
+
+
+void SmsLeg::initData ()
+{
+ DBG_FUNC ("SmsLeg::initData", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ //Init parent class
+ CallLeg::initData ();
+
+ // Reset local data
+ resetTi ();
+ resetVbRefNum ();
+ setRemRelCause (CNI_RIL3_RP_CAUSE_PROTOCOL_ERROR_UNSPECIFIED);
+
+ DBG_LEAVE();
+}
+
+
+bool SmsLeg::InitMoLeg ()
+{
+ DBG_FUNC ("SmsLeg::InitMoLeg", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ legType_ = SMS_MO_LEG;
+ smsFsm_ = new SmsMoHalfCall (*this);
+
+ DBG_LEAVE();
+ return true;
+}
+
+
+bool SmsLeg::InitMtLeg ()
+{
+ DBG_FUNC ("SmsLeg::InitMtLeg", CC_SMS_LAYER);
+ DBG_ENTER();
+
+ legType_ = SMS_MT_LEG;
+ smsFsm_ = new SmsMtHalfCall (*this);
+
+ DBG_LEAVE();
+ return (true);
+}
+
+
+SmsLeg::~SmsLeg ()
+{
+ // Allocated memory cleanup
+
+ if (smsFsm_)
+ delete smsFsm_;
+ if (msgBuilder)
+ delete msgBuilder;
+}
+
+
+void SmsLeg::cleanup (T_CNI_RIL3_CAUSE_VALUE cause)
+{
+ DBG_FUNC ("SmsLeg::cleanup", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ smsFsm_->cleanup (cause);
+
+ initData();
+
+ DBG_LEAVE();
+ return;
+}
+
+
+bool SmsLeg::setupOrig (T_CNI_RIL3_SI_TI ti)
+{
+ // false to reject the setup
+ bool retVal;
+
+ DBG_FUNC ("SmsLeg::setupOrig", CC_SMS_LAYER);
+ DBG_ENTER();
+
+ if (getSmsLegType() != SMS_MO_LEG)
+ {
+ DBG_ERROR ("SMS Error: SMS leg %d is of wrong type (MT).\n",
+ (callLegNum - SMS_LEGNUM_OFFSET));
+ return (isIdle()); // keep current state of the Leg
+ }
+
+ if (smsFsm_->invokeHandler (SMS_EVENT_MM_EST_IND, NULL_PTR, ti) == false)
+ { // returns true if the connection is rejected and the leg is released (reverse logic),
+ // otherwise mark the leg as Busy
+
+ setBusy ();
+ retVal = true;
+
+ if (callTrace)
+ {
+ char callTaskName[20];
+
+ sprintf (callTaskName, "Sms-%d EntryId-%d\0 MO", callIndex, entryId());
+
+ DBG_FUNC(callTaskName, CC_LAYER);
+ }
+ }
+ else
+ retVal = false;
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+void SmsLeg::setupTerm (VOIP_CALL_HANDLE voipCallHandle, int index ,
+ int refValue , bool callWaiting)
+{
+ DBG_FUNC ("SmsLeg::setupTerm", CC_SMS_LAYER);
+ DBG_ENTER();
+
+ if (isIdle())
+ {
+ /* voipCallHandle and callWaiting are not in use for the SMS */
+ /* CDR parameters */
+ cdrIndex = index ;
+ callRefValue = refValue;
+
+ setBusy ();
+ }
+
+ DBG_LEAVE();
+}
+
+
+bool SmsLeg::isHoAllowed ()
+{
+ // HO is allowed when SMS is Idle or in the stage of active signalling
+ return (isIdle() || getHc()->isActive());
+}
+
+
+int SmsLeg::handleTimeoutMsg (IntraL3Msg_t *smsTimerMsg)
+{
+ int retVal = 0;
+
+ DBG_FUNC ("SmsLeg::handleTimeoutMsg", CC_SMS_LAYER);
+ DBG_ENTER();
+
+ if (!isIdle())
+ {
+ /* Pass timer message to the FSM
+ Returns 0 if the leg is keep going,
+ otherwise returns disconnect cause value */
+ retVal = handleMsg (SMS_EVENT_TIMEOUT, NULL_PTR, 0);
+ }
+ else
+ {
+ DBG_ERROR ("SMS Leg %d Error: Unexpected Timeout Message.\n",
+ (callLegNum - SMS_LEGNUM_OFFSET) );
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+bool SmsLeg::handleL2Msg (T_CNI_RIL3MD_CCMM_MSG& l2InMsg, JCCEvent_t event)
+{ // L2 service messages (without PDU)
+ bool retVal;
+
+ DBG_FUNC ("SmsLeg::handleL2Msg", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ retVal = handleMsg (event, &l2InMsg, 0);
+
+ DBG_LEAVE ();
+ return (retVal);
+}
+
+
+bool SmsLeg::handleMmMsg (IntraL3Msg_t& msInMsg, JCCEvent_t event)
+{ // Handle MM service messages
+ bool retVal = false;
+
+ DBG_FUNC ("SmsLeg::handleMmMsg", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ // don't forward late MM Release Ind (in fact confirmation)
+ if (!(isIdle() && event == SMS_EVENT_MM_REL_IND))
+ {
+ // Don't check TI here
+ retVal = handleMsg (event, &msInMsg, 0);
+ }
+
+ DBG_LEAVE ();
+ return (retVal);
+}
+
+
+bool SmsLeg::handleMsMsg (T_CNI_RIL3SMS_CP_MSG& msInMsg, JCCEvent_t event)
+{
+ bool retVal;
+
+ DBG_FUNC ("SmsLeg::handleMsMsg", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ // Don't check TI here
+ retVal = handleMsg (event, &msInMsg, 0);
+
+ DBG_LEAVE ();
+ return (retVal);
+}
+
+
+bool SmsLeg::handleVbMsg (SmsVblinkMsg_t& netInMsg, JCCEvent_t event)
+{
+ bool retVal;
+
+ DBG_FUNC ("SmsLeg::handleVbMsg", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ retVal = handleMsg (event, &netInMsg, netInMsg.hdr.status);
+
+ DBG_LEAVE ();
+ return (retVal);
+}
+
+
+bool SmsLeg::handleMsg (JCCEvent_t event, void *data, INT32 param1)
+{
+ bool retVal;
+ T_CNI_RIL3_RP_CAUSE_VALUE cause ;
+
+ DBG_FUNC ("SmsLeg::handleMsg", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ if (isIdle()) // Protection: The Leg is not initiated
+ {
+ retVal = true; // The leg is already inactive
+ DBG_WARNING ("Idle %s SMS Leg %d received event %d. The message will be discarded.\n",
+ (getSmsLegType() == SMS_MO_LEG) ? "MO":"MT",
+ (callLegNum - SMS_LEGNUM_OFFSET) , event);
+ }
+ else if (retVal = smsFsm_->invokeHandler (event, data, param1))
+ {
+ cause = getRemRelCause ();
+
+ releaseRemSide (cause);
+ cleanup ((T_CNI_RIL3_CAUSE_VALUE)cause);
+ }
+
+ DBG_LEAVE ();
+ return (retVal);
+}
+
+
+bool SmsLeg::releaseRemSide (T_CNI_RIL3_RP_CAUSE_VALUE cause)
+{
+ DBG_FUNC ("SmsLeg::releaseRemSide", CC_SMS_LAYER);
+ DBG_ENTER ();
+
+ /* There is no Network side if reference number isn't allocated */
+ if (getVbRefNum() != INVALID_VC_SMS_REF_NUM)
+ { // release remote side on low layer error
+ msgBuilder->sendMnSmsErrorInd (cause);
+ resetVbRefNum ();
+ }
+
+ DBG_LEAVE ();
+ return (true);
+}
+
+
+/*===============================================================*/
+
+void SmsLeg::printData (JCCPrintStFn fnPtr)
+{
+ char strLeg [] = "Sms Leg:\n";
+ char strInfo[120];
+
+ sprintf (strInfo,
+ "(%s SMS Leg number = %d) (Idle - %s) (SMS FSM State = %d) (TI= %d) (VB ref. num %lu).\n",
+ (legType_ == SMS_MO_LEG) ? "MO" : "MT", callLegNum ,
+ (isIdle() ) ? "Yes" : "No",
+ smsFsm_->getState(), getTi(), getVbRefNum());
+
+ (*fnPtr)(strLeg );
+ (*fnPtr)(strInfo);
+}
+
+//static
+UINT32 SmsLeg::allocateVbRefNum ()
+{
+ if (++lastVbRefNum_ > MAX_VC_SMS_REF_NUM)
+ lastVbRefNum_ = MIN_VC_SMS_REF_NUM;
+
+ return (lastVbRefNum_);
+}
+
+
+void SmsLeg::setVbRefNum (UINT32 refNum = INVALID_VC_SMS_REF_NUM)
+{
+ DBG_FUNC ("SmsLeg::setVbRefNum", CC_SMS_LAYER);
+ DBG_ENTER();
+
+ // Store new ref. number in the object
+ vbRefNum_ = (refNum != INVALID_VC_SMS_REF_NUM)
+ ? refNum
+ : allocateVbRefNum ();
+
+ DBG_TRACE ("SMS: Set VBLink ref.num = %u by the task %s , SMS Leg %d\n",
+ vbRefNum_, taskName(taskIdSelf()), (callLegNum - SMS_LEGNUM_OFFSET));
+ DBG_LEAVE();
+}
+
+
+void SmsLeg::allocateTi ()
+{
+ /* Should be used for MT leg only */
+ DBG_FUNC ("SmsLeg::AllocateTi", CC_SMS_LAYER);
+ DBG_ENTER();
+
+ if (getSmsLegType() == SMS_MT_LEG)
+ {
+ setTi (callLegNum);
+ DBG_TRACE ("SMS: Allocate Ti = %d by the task %s , SMS Leg %d\n",
+ getTi(), taskName(taskIdSelf()), (callLegNum - SMS_LEGNUM_OFFSET));
+ }
+ else
+ DBG_ERROR ("SMS: MO Leg should use received TI. TI is not allocated.\n");
+
+ DBG_LEAVE();
+}
+
diff --git a/data/mnet/GP10/Host/cc/src/SmsMsgBuilder.cpp b/data/mnet/GP10/Host/cc/src/SmsMsgBuilder.cpp
new file mode 100644
index 0000000..bccc2ae
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/SmsMsgBuilder.cpp
@@ -0,0 +1,368 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SmsMsgBuilder.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 02-10-2000
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+//
+
+#include <vxworks.h>
+#include <string.h>
+
+#include "logging\vcmodules.h"
+
+#include "smspp\smspp_inf.h"
+
+#include "CC/CCSessionHandler.h"
+#include "CC/SmsLeg.h"
+#include "CC/SmsMsgBuilder.h"
+
+bool VBLinkMsToNetSmspp (LUDB_ID, unsigned char *, int);
+
+extern bool smsUseVblink ; // Controls whether to forward MNSMS msg's to ViperBase
+ int smsDamageCpData = 0; // For Test purposes only!!!
+
+/*===============================================================================*/
+/* Ud SMS-related messages pack and send methods */
+
+
+T_CNI_RIL3_RESULT SmsMsgBuilder::sendCpAck ()
+{
+ T_CNI_RIL3_RESULT retVal;
+
+ DBG_FUNC ("SmsMsgBuilder::buildCpAck", CC_SMS_LAYER);
+ DBG_ENTER();
+
+ if (buildMsMsgCommon ())
+ {
+ msOutMsg_.header.message_type = CNI_RIL3SMS_MSGID_CP_ACK;
+ retVal = sendMsMsg ();
+ }
+ else
+ retVal = CNI_RIL3_NON_CC_MESSAGE; // Used to indicate an error
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+T_CNI_RIL3_RESULT SmsMsgBuilder::sendCpError (T_CNI_RIL3_CP_CAUSE_VALUE cause)
+{
+ T_CNI_RIL3_RESULT retVal;
+
+ DBG_FUNC ("SmsMsgBuilder::buildCpError", CC_SMS_LAYER);
+ DBG_ENTER();
+
+ if (buildMsMsgCommon ())
+ {
+ msOutMsg_.header.message_type = CNI_RIL3SMS_MSGID_CP_ERROR;
+ msOutMsg_.cp_error.cp_cause.ie_present = true ;
+ msOutMsg_.cp_error.cp_cause.causeValue = cause ;
+
+ retVal = sendMsMsg ();
+ }
+ else
+ retVal = CNI_RIL3_NON_CC_MESSAGE; // Used to indicate an error
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+T_CNI_RIL3_RESULT SmsMsgBuilder::sendCpData ()
+{
+ T_CNI_RIL3_RESULT retVal;
+
+ DBG_FUNC ("SmsMsgBuilder::buildCpData", CC_SMS_LAYER);
+ DBG_ENTER();
+
+ const T_CNI_RIL3_IE_CP_USER_DATA & rpdu = parent_.getHc()->getRpdu();
+
+ if (buildMsMsgCommon ())
+ {
+ msOutMsg_.header.message_type = CNI_RIL3SMS_MSGID_CP_DATA;
+
+ if (rpdu.ie_present)
+ {
+ memcpy (&(msOutMsg_.cp_data.cp_user_data), &rpdu,
+ sizeof(T_CNI_RIL3_IE_CP_USER_DATA) );
+/*
+ DBG_TRACE ("SMS CP-DATA: RPDU length = %u Is present = %d\n",
+ msOutMsg_.cp_data.cp_user_data.length ,
+ msOutMsg_.cp_data.cp_user_data.ie_present );
+
+ DBG_HEXDUMP (msOutMsg_.cp_data.cp_user_data.rpdu_data,
+ msOutMsg_.cp_data.cp_user_data.length );
+*/
+ retVal = sendMsMsg ();
+ }
+ else
+ retVal = CNI_RIL3_MANDATORY_IE_MISSING;
+ }
+ else
+ retVal = CNI_RIL3_NON_CC_MESSAGE; // Used to indicate an error
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+bool SmsMsgBuilder::buildMsMsgCommon ()
+{
+ bool retVal = true;
+
+ DBG_FUNC ("SmsMsgBuilder::buildMsCommon", CC_SMS_LAYER);
+ DBG_ENTER();
+
+ T_CNI_RIL3_SI_TI ti = parent_.getTi();
+
+ if (ti == SMS_TI_INVALID)
+ {
+ DBG_WARNING ("SMS PDU builder error: TI isn't initialized\n");
+ retVal = false;
+ }
+ else
+ {
+ // But, before we start populating the message content,
+ // zap it clean first.
+ CNI_RIL3_ZAPMSG (&msOutMsg_, sizeof(T_CNI_RIL3SMS_CP_MSG));
+
+ if (parent_.getSmsLegType () == SMS_MO_LEG)
+ ti |= TI_ORIG_OR_MASK;
+
+ // CP message header portion
+ msOutMsg_.header.protocol_descriminator = CNI_RIL3_PD_SMS;
+ msOutMsg_.header.si_ti = ti ;
+
+ DBG_TRACE ("SMS->MS: Build downlink PDU: PD = %d, TI = %d\n",
+ msOutMsg_.header.protocol_descriminator ,
+ msOutMsg_.header.si_ti );
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+T_CNI_RIL3_RESULT SmsMsgBuilder::sendMsMsg ()
+{
+ T_CNI_RIL3_RESULT msOutResult ;
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ DBG_FUNC ("SmsMsgBuilder::sendMSMsg", CC_SMS_LAYER);
+ DBG_ENTER();
+
+ // call the Encoder function to encode the message
+ msOutResult = CNI_RIL3SMS_CP_Encode (&msOutMsg_ , // input message definition
+ &msEncodedMsg); // encoded layer-3 message
+
+ if (smsDamageCpData &&
+ msOutMsg_.header.message_type == CNI_RIL3SMS_MSGID_CP_DATA )
+ { // intentional damage CP-DATA PDU for testing purpose
+ if (smsDamageCpData == 1)
+ {
+ msEncodedMsg.buffer[1] = 3; /* Change CP-PDU type. Fatal error */
+ DBG_WARNING ("Damaging CP-DATA PDU type!!!\n");
+ }
+ if (smsDamageCpData == 2)
+ {
+ msEncodedMsg.buffer[2] = 0; /* Put RPDU lenght to 0. No RP-ACK will be sent by MS */
+ DBG_WARNING ("Damaging CP-DATA PDU. Reset RPDU length to 0!!!\n");
+ }
+ if (smsDamageCpData == 3)
+ {
+ msEncodedMsg.buffer[2] = 0x03; /* Put RPDU lenght to 0. No RP-ACK will be sent by MS */
+ DBG_WARNING ("Damaging CP-DATA PDU. Reset RPDU msg type to invalid value 0x03!!!\n");
+ }
+ }
+
+ // check the encoding result before sending the message
+ if (msOutResult != CNI_RIL3_RESULT_SUCCESS)
+ {
+ DBG_ERROR ("SMS Error: Encoding CP PDU (Problem = %d) \n ", msOutResult);
+ }
+ else
+ {
+ // encoding successful, send the message to LAPDm for delivery
+ parent_.parent->sendL2Msg (&msEncodedMsg);
+
+ DBG_TRACE ("SMS->MS: Sent PDU (Type = %d, Length = %d)to LAPDm\n",
+ msOutMsg_.header.message_type, msEncodedMsg.msgLength );
+ DBG_HEXDUMP ((unsigned char *)msEncodedMsg.buffer, msEncodedMsg.msgLength);
+ }
+
+ DBG_LEAVE();
+ return (msOutResult);
+}
+
+
+/*===============================================================================*/
+/* VBLink SMS-related pack and send methods */
+
+bool SmsMsgBuilder::sendMnSmsEstInd (UINT32 dataLength, UINT8* rpdu)
+{
+ bool retVal;
+
+ DBG_FUNC ("SmsMsgBuilder::sendMnSmsEstInd", CC_SMS_LAYER);
+ DBG_ENTER();
+
+ // Allocate and store new VB ref. number
+ setVbRefNum ();
+
+ retVal = sendVbMsg (MNSMS_EST_Ind, dataLength, rpdu);
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+bool SmsMsgBuilder::sendMnSmsDataInd (UINT32 dataLength, UINT8* rpdu)
+{
+ bool retVal;
+
+ DBG_FUNC ("SmsMsgBuilder::sendMnSmsDataInd", CC_SMS_LAYER);
+ DBG_ENTER();
+
+ retVal = sendVbMsg (MNSMS_DATA_Ind, dataLength, rpdu);
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+bool SmsMsgBuilder::sendMnSmsErrorInd (T_CNI_RIL3_RP_CAUSE_VALUE cause, UINT32 tempRefNum = 0)
+{
+ bool retVal = true;
+
+ DBG_FUNC ("SmsMsgBuilder::sendMnSmsErrorInd", CC_SMS_LAYER);
+ DBG_ENTER();
+
+ retVal = sendVbMsg (MNSMS_ERROR_Ind, 0, NULL_PTR, cause, tempRefNum);
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+bool SmsMsgBuilder::sendVbMsg (SMS_VBLINK_MSGTYPE msgType ,
+ UINT32 msgLength ,
+ UINT8 *msgData ,
+ UINT32 status = 0,
+ UINT32 tempRefNum = 0)
+{
+ /* status - disconnect cause or zero otherwise
+ tempRefNum - Used to reject incorrect message
+ that doesn't belong to the current SMS session */
+
+ int temp ;
+ unsigned char * pTemp ;
+ bool retVal = true;
+
+ DBG_FUNC ("SmsMsgBuilder::sendVbMsg", CC_SMS_LAYER);
+ DBG_ENTER();
+
+ UINT32 refNum = (tempRefNum) ? tempRefNum : getVbRefNum();
+
+ CNI_RIL3_ZAPMSG (&vbOutMsg_, sizeof(SmsVblinkMsg_t));
+
+ if (refNum == INVALID_VC_SMS_REF_NUM)
+ {
+ DBG_ERROR ("SMS->VBLINK: VB ref. number is not initialized. \
+ Abort sending VB Msg (type = %d)\n", msgType);
+
+ DBG_LEAVE();
+ return (false);
+ }
+
+ if (msgLength <= SMS_MAX_RP_MSG_LEN &&
+ (msgType > MNSMS_MSG_BASE && msgType < MNSMS_MSG_MAX) )
+ {
+ // prepare message data. Ensure the network byte order for the header elements
+ vbOutMsg_.hdr.magic = htonl (SMS_MAGIC_NUMBER);
+ vbOutMsg_.hdr.refNum = htonl (refNum );
+ vbOutMsg_.hdr.msgType = htonl (msgType );
+ vbOutMsg_.hdr.status = htonl (status );
+ vbOutMsg_.hdr.msgLen = htonl (msgLength );
+
+ if (msgLength)
+ { // copy RP message raw data
+ memcpy (vbOutMsg_.msg, msgData, msgLength);
+ }
+
+ DBG_TRACE ("SMS->VBLINK: Attempt to send MNSMS message (type %u) from entity (LUDB = %d),\n\
+ ref number %u, status = %u, RPDU length = %u. RPDU dump: \n",
+ msgType, parent_.ludbIndex(), refNum, status, msgLength);
+
+// DBG_HEXDUMP ((unsigned char *)&vbOutMsg_.msg, msgLength);
+
+ temp = msgLength;
+ pTemp = (unsigned char *)&vbOutMsg_.msg;
+
+ while (temp > 0)
+ {
+ DBG_HEXDUMP (pTemp, ((temp <= 16) ? temp : 16) );
+ temp -= 16;
+ pTemp += 16;
+ }
+
+ // sent message to VBLink
+ if (smsUseVblink)
+ {
+ // The total message length calculation could be wrong
+ // if ported to the different platform or
+ // compiled with the word alignment other than 4 bytes
+ retVal = VBLinkMsToNetSmspp (parent_.parent->ludbIndex ,
+ (unsigned char *)&vbOutMsg_ ,
+ SMS_VBLINK_HDRSIZE + msgLength);
+ }
+ else
+ {
+ DBG_WARNING ("SMS->VBLINK: VBLink interface is OFF. Message will not be send to ViperBase.\n");
+ DBG_HEXDUMP ((unsigned char *)&vbOutMsg_, sizeof (SmsVblinkMsg_t));
+ retVal = false;
+ }
+ }
+ else
+ {
+ DBG_ERROR ("SMS->VBLINK: VBLink message data (Msg type %d) is invalid.\n", msgType);
+ retVal = false;
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+UINT32 SmsMsgBuilder::getVbRefNum ()
+{
+ return (parent_.getVbRefNum());
+}
+
+
+// Allocate and store new VB ref. number
+void SmsMsgBuilder::setVbRefNum ()
+{
+ DBG_FUNC ("SmsMsgBuilder::setVbRefNum", CC_SMS_LAYER);
+ DBG_ENTER();
+
+ parent_.setVbRefNum ();
+
+ DBG_LEAVE();
+}
+
+
diff --git a/data/mnet/GP10/Host/cc/src/hortp.cpp b/data/mnet/GP10/Host/cc/src/hortp.cpp
new file mode 100644
index 0000000..3085551
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/hortp.cpp
@@ -0,0 +1,217 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+#include "string.h"
+#include "logging\vcmodules.h"
+#include "logging\vclogging.h"
+#include "CC/hortp.h"
+
+
+HANDOVER_CHANNEL HandoverChannelArray[MAX_HANDOVER_CHANNELS];
+
+
+/*
+ * InitializeHandpverRtpPool
+ */
+BOOL
+InitializeHandoverRtpPool()
+{
+ DBG_FUNC("InitializeHandoverRtpPool",CC_LAYER);
+ DBG_ENTER();
+ BOOL RetStatus=FALSE;
+ PHANDOVER_CHANNEL pChannel;
+
+ int Counter,ArraySize;
+
+ ArraySize = MAX_HANDOVER_CHANNELS * sizeof(HANDOVER_CHANNEL);
+
+ memset(HandoverChannelArray,0,ArraySize);
+
+
+ for(Counter=0;Counter<MAX_HANDOVER_CHANNELS;Counter++)
+ {
+ pChannel = (PHANDOVER_CHANNEL)&HandoverChannelArray[Counter];
+
+ pChannel->LocalPort = Counter+HANDOVER_RTP_POOL_BEGIN;
+
+ pChannel->RtpHandle = jcRtpOpenEx(pChannel->LocalPort, 1, 0xff, "JetCellBTS" );
+
+ ASSERT(pChannel->RtpHandle != NULL);
+ if (pChannel->RtpHandle == NULL)
+ {
+ DBG_ERROR("Could not open RTP port !!\n");
+ DBG_LEAVE();
+ return RetStatus;
+ }
+
+ jcRtpSetEventHandler(pChannel->RtpHandle,HoRtpEventHandler,NULL,"HOver");
+
+#ifdef FAST_RTP_READ
+ jcRtpSetFastReadHandler(pChannel->RtpHandle,HoRtpFastReadHandler);
+#endif
+ /*
+ * Notify CSU of the new RTP port
+ */
+ T_CSU_PORT_ID CsuPort;
+ CsuPort.portType = CSU_RTP_PORT;
+ CsuPort.portId.rtpHandler = pChannel->RtpHandle;
+ if (csu_RegSrcSnkPort(&CsuPort) != CSU_RESULT_REG_SUCCESS) {
+ DBG_ERROR("Unable to register RTP port with CSU!!\n");
+ }
+ else {
+ RetStatus = TRUE;
+ }
+
+ DBG_TRACE("RTP %X\n",pChannel->RtpHandle);
+ }
+
+ DBG_LEAVE();
+ return(RetStatus);
+}
+
+
+
+/*
+ * AssignHandoverRtpChannel
+ */
+HJCRTPSESSION
+AssignHandoverRtpChannel()
+{
+ DBG_FUNC("AssignHandoverRtpChannel",CC_LAYER);
+ DBG_ENTER();
+ int Count;
+ PHANDOVER_CHANNEL pChannel;
+
+
+ for(Count=0;Count<MAX_HANDOVER_CHANNELS;Count++) {
+ pChannel = &HandoverChannelArray[Count];
+ if (pChannel->Used == FALSE) {
+ pChannel->Used = TRUE;
+ DBG_LEAVE();
+ return(pChannel->RtpHandle);
+ }
+ }
+
+ DBG_LEAVE();
+ return(NULL);
+}
+
+
+
+/*
+ * ReleaseHandoverRtpChannel
+ */
+void
+ReleaseHandoverRtpChannel(HJCRTPSESSION RtpHandle)
+{
+ DBG_FUNC("ReleaseHandoverRtpChannel",CC_LAYER);
+ DBG_ENTER();
+ int Count;
+ PHANDOVER_CHANNEL pChannel;
+
+ for(Count=0;Count<MAX_HANDOVER_CHANNELS;Count++) {
+ pChannel = &HandoverChannelArray[Count];
+ if (pChannel->RtpHandle == RtpHandle) {
+ pChannel->Used = FALSE;
+ break;
+ }
+ }
+ DBG_LEAVE();
+}
+
+
+
+/*
+ * handoverRtpDataPrint
+ */
+void
+handoverRtpDataPrint(void)
+{
+
+ int Count;
+ PHANDOVER_CHANNEL pChannel;
+
+
+ for(Count=0;Count<MAX_HANDOVER_CHANNELS;Count++) {
+ pChannel = &HandoverChannelArray[Count];
+ if (pChannel->Used == FALSE)
+ {
+ printf("RtpHandle = %p is not used\n", pChannel->RtpHandle);
+ }
+ else
+ {
+ printf("RtpHandle = %p is used\n", pChannel->RtpHandle);
+ }
+ }
+
+}
+
+
+
+/*
+ * GetIncomingHandoverRtpPort
+ */
+UINT16
+GetIncomingHandoverRtpPort(HJCRTPSESSION RtpHandle)
+{
+ DBG_FUNC("GetIncomingHandoverRtpPort",CC_LAYER);
+ DBG_ENTER();
+ int Count;
+ PHANDOVER_CHANNEL pChannel;
+ int RetStatus = 0;
+
+ for(Count=0;Count<MAX_HANDOVER_CHANNELS;Count++) {
+ pChannel = &HandoverChannelArray[Count];
+ if (pChannel->RtpHandle == RtpHandle) {
+ RetStatus = pChannel->LocalPort;
+ break;
+ }
+ }
+
+ DBG_LEAVE();
+ return(RetStatus);
+}
+
+
+
+/*
+ * SetRemoteHandoverRtpPort
+ */
+void
+SetRemoteHandoverRtpPort(HJCRTPSESSION RtpHandle,UINT32 ip,UINT16 port)
+{
+ DBG_FUNC("SetRemoteHandoverRtpPort",CC_LAYER);
+ DBG_ENTER();
+
+ jcRtpSetRemoteAddress( RtpHandle, ip, port );
+
+ DBG_LEAVE();
+}
+
+
+
+/*
+ * HoRtpEventHandler
+ */
+RTP_READ_STATUS HoRtpEventHandler(HJCRTPSESSION RtpHandle,void *Context)
+{
+ RTPEventHandler(RtpHandle, (int)Context,0);
+}
+
+
+
+#ifdef FAST_RTP_READ
+/*
+ * HoRtpFastReadHandler
+ */
+void
+HoRtpFastReadHandler(HJCRTPSESSION RtpHandle,unsigned char *newPacket,int packetLength,rtpParam RtpParam,void *Context)
+{
+ RTPFastReadHandler(RtpHandle,newPacket,packetLength,RtpParam,(int)Context,0);
+
+}
+#endif
diff --git a/data/mnet/GP10/Host/cc/src/smqueue.cpp b/data/mnet/GP10/Host/cc/src/smqueue.cpp
new file mode 100644
index 0000000..54ec1e8
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src/smqueue.cpp
@@ -0,0 +1,120 @@
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, Inc 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SmsLeg.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 26-05-2000
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+//
+
+#include <vxworks.h>
+
+#include "cc/ccsessionhandler.h"
+#include "cc/smqueue.h"
+
+
+
+
+/*=========================================================================*/
+
+void SmQueue::flash ()
+{
+ unsigned index = 0;
+
+ DBG_FUNC ("SmQueue::flash", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ lock();
+
+ while (!isEmpty ())
+ {
+ DBG_TRACE ("SmQueue: Send PDU %d to LAPDm\n", (index+1));
+ parent_.sendL2Msg (storage_ + index++);
+ --queueCounter_;
+ }
+
+ initData();
+
+ DBG_LEAVE();
+}
+
+
+bool SmQueue::add (const T_CNI_LAPDM_L3MessageUnit * inMsg)
+{
+ bool retVal = false;
+
+ DBG_FUNC ("SmQueue::add", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ if (!(isLocked() || isFull()))
+ {
+ storage_[queueCounter_++] = *inMsg;
+ retVal = true ;
+ }
+ else
+ DBG_ERROR ("SmQueue: attempt to add message to the full queue. lock=%d, full=%d\n",
+ isLocked(), isFull() );
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+/*=========================================================================*/
+
+void SmQueueMm::flash ()
+{
+ unsigned index = 0;
+
+ DBG_FUNC ("SmQueueMm::flash", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ lock();
+
+ while (!isEmpty ())
+ {
+ DBG_TRACE ("SmQueueMm: Send MM Message %d\n", (index+1));
+ parent_.parent->sendMMMsg (storage_ + index++);
+ --queueCounter_;
+ }
+
+ initData();
+
+ DBG_LEAVE();
+}
+
+
+bool SmQueueMm::add (const IntraL3Msg_t * inMsg)
+{
+ bool retVal = false;
+
+ DBG_FUNC ("SmQueueMm::add", CC_SESSION_LAYER);
+ DBG_ENTER();
+
+ if (!(isLocked() || isFull()))
+ {
+ storage_[queueCounter_++] = *inMsg;
+ retVal = true ;
+ }
+ else
+ DBG_ERROR ("SmQueueMm: attempt to add message to the full queue. lock=%d, full=%d\n",
+ isLocked(), isFull() );
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
diff --git a/data/mnet/GP10/Host/cc/src_api/CCMobUtil.cpp b/data/mnet/GP10/Host/cc/src_api/CCMobUtil.cpp
new file mode 100644
index 0000000..e59de74
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src_api/CCMobUtil.cpp
@@ -0,0 +1,124 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCMobUtil.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+#include "stdio.h"
+
+#include "jcc/JCCLog.h"
+
+#include "logging/VCLOGGING.h"
+
+#include "CC/CCUtil.h"
+
+// Need to include MM Message Queue
+#include "mm/MMInt.h"
+
+// Need to include RR Message Queue
+#ifndef _NO_RRM
+extern MSG_Q_ID rm_MsgQId;
+#endif
+
+bool
+sendRR (IntraL3PrimitiveType_t prim ,
+ IntraL3MsgType_t msgType ,
+ T_CNI_IRT_ID entryId ,
+ IntraL3Msg_t *rrOutMsg)
+{
+ DBG_FUNC("sendRR", CC_LAYER);
+ DBG_ENTER();
+
+ rrOutMsg->module_id = MODULE_CC;
+ rrOutMsg->primitive_type = prim;
+ rrOutMsg->message_type = msgType;
+
+ rrOutMsg->entry_id = entryId;
+
+ // send the message.
+#ifndef _NO_RRM
+ if (ERROR == msgQSend( rm_MsgQId,
+ (char *) rrOutMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT, //PR1553 <xxu> WAIT_FOREVER,
+ MSG_PRI_NORMAL
+ ) )
+ {
+ DBG_ERROR("CC Error : sendRR msgQSend (QID = %d) error\n ",
+ (int)rm_MsgQId);
+ DBG_LEAVE();
+ return(false);
+ }
+ else
+ {
+ DBG_TRACE("CC Call Log: Sent Message to RR, (Prim. Type = %d), (Msg Type = %d)\n",
+ prim,
+ msgType);
+ if (msgType == INTRA_L3_RR_CHANN_ASSIGN_CMD)
+ {
+ DBG_TRACE("CC->RR: Chann Assignment Request with Speech Version: %d",
+ rrOutMsg->l3_data.channAssignCmd.channelType.speechChann.version);
+ }
+
+ DBG_LEAVE();
+ return(true);
+ }
+
+#endif
+ DBG_LEAVE();
+ return(true);
+}
+
+bool
+sendMM (IntraL3PrimitiveType_t prim ,
+ IntraL3MsgType_t msgType ,
+ T_CNI_IRT_ID entryId ,
+ IntraL3Msg_t *mmOutMsg)
+{
+ DBG_FUNC("sendMM", CC_LAYER);
+ DBG_ENTER();
+
+ mmOutMsg->module_id = MODULE_CC;
+ mmOutMsg->primitive_type = prim;
+ mmOutMsg->message_type = msgType;
+
+ mmOutMsg->entry_id = entryId;
+
+ // send the message.
+ if (ERROR == msgQSend( mmMsgQId,
+ (char *) mmOutMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT, //PR1553 <xxu> WAIT_FOREVER,
+ MSG_PRI_NORMAL
+ ) )
+ {
+ DBG_ERROR("CC Error : sendMM msgQSend (QID=%d) error\n ",
+ (int)mmMsgQId);
+ DBG_LEAVE();
+ return(false);
+ }
+ else
+ {
+ DBG_TRACE("CC Call Log: Sent Message to MM, Prim. Type, Msg Type: %d %d\n",
+ prim,
+ msgType);
+ DBG_LEAVE();
+ return(true);
+ }
+}
+
diff --git a/data/mnet/GP10/Host/cc/src_api/CCapiH323.cpp b/data/mnet/GP10/Host/cc/src_api/CCapiH323.cpp
new file mode 100644
index 0000000..e4fec03
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src_api/CCapiH323.cpp
@@ -0,0 +1,450 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCapiH323.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 02-15-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include <stdlib.h>
+
+// included L3 Message header for messages from other Layer 3 modules (CC, RR)
+#include "logging/VCLOGGING.h"
+
+#include "voip/voipapi.h"
+#include "jcc/JCCUtil.h"
+#include "jcc/JCCVcMsg.h"
+#include "CC/CCInt.h"
+#include "CC/CCconfig.h"
+#include "CC/CCTypes.h"
+#include "voip/vblink.h"
+
+// Global Variables for current Call Sessions
+CCSession_t ccSession[CC_MAX_CC_CALLS_DEF_VAL];
+short CC_MAX_CC_CALLS; //
+
+bool
+checkTransactionId( VOIP_CALL_HANDLE callHandle,
+ T_CNI_IRT_ID txnId,
+ IntraL3Msg_t *ccOutMsg)
+{
+ DBG_FUNC("checkTransactionId", CC_LAYER);
+ DBG_ENTER();
+
+ short callId;
+ short callLegId;
+
+ // get the call id and call leg id bits out
+ callId = (txnId & 0xff);
+ callLegId = ((txnId >> 8) & 0xff);
+
+ // Get the Message Queue Id for the Call Control Task
+ if ( (0 > callId) ||
+ ( callId >= CC_MAX_CC_CALLS) )
+ {
+ if (callId == VOIP_API_NULL_TXN_ID)
+ {
+ // Null value is received for transaction id.
+ // send this message to the parent cc task
+
+ }
+ else
+ {
+ DBG_ERROR("H323->CC Error : Bad (txnId = %d) with (Handle = %p)\n",
+ txnId,
+ (int)callHandle
+ );
+ DBG_LEAVE();
+ return (false);
+ }
+ }
+ else
+ {
+ // if (ccSession[transactionId].h323CallHandle != VOIP_NULL_CALL_HANDLE)
+ // {
+ // if ((ccSession[transactionId].sessionHandler)->findHandle(callHandle))
+ // {
+ // // Transaction id is not valid.
+ // DBG_WARNING("H323->CC Warning: Late Msg. for (Handle = %p) (Txn.Id = %d)\n",
+ // (int)callHandle,
+ // transactionId );
+ // DBG_LEAVE();
+ // return (false);
+ // }
+ // }
+ };
+
+ // check call leg id range
+ if ( (callLegId < 0) || // When callLegId == 0 signifies non-external handover callp event
+ (callLegId > 8) ) // JOE: Replace hardcoded values with CONSTANT.
+ {
+ DBG_ERROR("H323->CC Error : Bad (txnId = %d) with (Handle = %p)\n",
+ txnId,
+ (int)callHandle
+ );
+ DBG_LEAVE();
+ return (false);
+ };
+
+ ccOutMsg->entry_id = callId;
+ DBG_LEAVE();
+ return (true);
+}
+
+bool
+CcVoipMessageHandler(VOIP_API_MESSAGE *voipInMsg)
+{
+ DBG_FUNC("CcVoipMessageHandler", CC_LAYER);
+ DBG_ENTER();
+
+ MSG_Q_ID qid;
+ IntraL3Msg_t ccOutMsg;
+ short callId;
+ short callLegId;
+
+ ccOutMsg.module_id = MODULE_H323;
+ ccOutMsg.call_handle = voipInMsg->VoipCallHandle;
+
+ //CDR <xxu:08-24-00>
+ ccOutMsg.H323CRV = voipInMsg->H323CRV;
+
+ // EHO <chenj:06-25-01>
+ // get the call id and call leg id bits out
+ callId = (voipInMsg->TxnId & 0xff);
+ callLegId = ((voipInMsg->TxnId >> 8) & 0xff);
+
+ ccOutMsg.callleg_id = callLegId;
+
+ DBG_TRACE("H323->CC API LOG: Sending CC a Msg(%d) callHandle(%d) ludbId(%d) sessionId(%d) callleg (%d)\n",
+ (int)voipInMsg->MessageType,(int)voipInMsg->VoipCallHandle, (int)voipInMsg->LudbId,
+ (int)callId,
+ (int)callLegId);
+
+ switch (voipInMsg->MessageType) {
+
+ //BCT <xxu:09-21-00> BEGIN
+ case VOIP_API_CALL_UPDATE_HANDLES:
+ {
+ if (callId == VOIP_API_NULL_TXN_ID)
+ {
+ qid = ccMsgQId;
+ }
+ else
+ {
+ qid = ccSession[callId].msgQId;
+ }
+
+ ccOutMsg.l3_data.voipMsg.callUpdateHandles.NewHandle = voipInMsg->CallUpdateHandles.NewHandle;
+
+ //DBG_TRACE("VOIP->CC(api): BCT update call handles at transferred party:\n");
+ //DBG_TRACE("VOIP->CC(api): oldHandle(%x), newHandle(%x), sessionId(%d), ludbId(%d) qId(%x)\n",
+ // voipInMsg->VoipCallHandle,
+ // voipInMsg->CallUpdateHandles.NewHandle,
+ // voipInMsg->TxnId,
+ // voipInMsg->LudbId,
+ // qid);
+
+ ccOutMsg.entry_id = voipInMsg->LudbId;
+
+ ccOutMsg.message_type = (IntraL3MsgType_t)INTRA_L3_CC_BCT_UPDATE_HANDLES;
+ break;
+ }
+ //BCT <xxu:09-21-00> END
+
+ case VOIP_API_CALL_OFFERING:
+ {
+ qid = ccMsgQId;
+
+ ccOutMsg.l3_data.setup.callOffering = voipInMsg->CallOffering;
+
+ // DBG_TRACE("API: calling party number received from Voip:\n");
+ // DBG_TRACE(
+ // "(ie_present=%d),(numberType=%d),(plan=%d),(numDigits=%d)\n",
+ // voipInMsg->CallOffering.CallingPartyNumber.ie_present,
+ // voipInMsg->CallOffering.CallingPartyNumber.numberType,
+ // voipInMsg->CallOffering.CallingPartyNumber.numberingPlan,
+ // voipInMsg->CallOffering.CallingPartyNumber.numDigits);
+
+ // DBG_TRACE("API: called party number received from Voip:\n");
+ // DBG_TRACE("(numDigits=%d), (%d), (%d), (%d), (%d), (%d)\n",
+ // voipInMsg->CallOffering.CalledPartyNumber.numDigits,
+ // voipInMsg->CallOffering.CalledPartyNumber.digits[0],
+ // voipInMsg->CallOffering.CalledPartyNumber.digits[1],
+ // voipInMsg->CallOffering.CalledPartyNumber.digits[2],
+ // voipInMsg->CallOffering.CalledPartyNumber.digits[3],
+ // voipInMsg->CallOffering.CalledPartyNumber.digits[4]
+ // );
+
+ ccOutMsg.entry_id = voipInMsg->LudbId;
+
+ ccOutMsg.message_type =
+ (IntraL3MsgType_t)
+ INTRA_L3_CC_Q931_SETUP;
+ break;
+ }
+
+ case VOIP_API_CODEC_SELECTED:
+ {
+ if (!(checkTransactionId(voipInMsg->VoipCallHandle,
+ voipInMsg->TxnId,
+ &ccOutMsg)))
+ {
+ DBG_LEAVE();
+ return (false);
+ }
+
+ if (ccOutMsg.entry_id == VOIP_API_NULL_TXN_ID)
+ {
+ qid = ccMsgQId;
+ }
+ else
+ {
+ qid = ccSession[ccOutMsg.entry_id].msgQId;
+ }
+
+ ccOutMsg.message_type = INTRA_L3_CC_H245_CHANN_SELECT;
+ ccOutMsg.l3_data.voipMsg.codecSelected = voipInMsg->CodecSelected;
+ break;
+ }
+
+ case VOIP_API_CALL_EVENT:
+ {
+ if (!(checkTransactionId(voipInMsg->VoipCallHandle,
+ voipInMsg->TxnId,
+ &ccOutMsg)))
+ {
+ DBG_LEAVE();
+ return (false);
+ }
+
+ if (ccOutMsg.entry_id == VOIP_API_NULL_TXN_ID)
+ {
+ qid = ccMsgQId;
+ }
+ else
+ {
+ qid = ccSession[ccOutMsg.entry_id].msgQId;
+ }
+
+ ccOutMsg.message_type = (IntraL3MsgType_t)
+ (INTRA_L3_CC_Q931_BASE + (voipInMsg->CallEvent.CallEvent - VOIP_MOBILE_CALL_EVENT_BASE));
+ ccOutMsg.l3_data.voipMsg.basicCallInMsg = voipInMsg->CallEvent;
+ break;
+ }
+
+ default:
+ {
+ DBG_ERROR("H323->CC API ERROR: Unexpected Msg(%d) callHandle(%d) ludbId(%d) sessionId(%d) callleg(%d)\n",
+ (int)voipInMsg->MessageType, (int)voipInMsg->VoipCallHandle, (int)voipInMsg->LudbId,
+ (int)callId,
+ (int)callLegId);
+
+ DBG_LEAVE();
+ return(false);
+ }
+
+ }
+
+ // send the message.
+ if (ERROR == msgQSend( qid,
+ (char *) &ccOutMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT, //PR1553 <xxu> WAIT_FOREVER,
+ MSG_PRI_NORMAL
+ ) )
+ {
+ DBG_ERROR("H323->CC API ERROR: sendCC msgQSend (QID = %p) error\n ",
+ (int)qid);
+ DBG_LEAVE();
+ return (false);
+ }
+ else
+ {
+ //DBG_TRACE("H323 Log: Sent Message to CC, (Call Handle = %p), (Msg Type = %d), (reason = %d)\n",
+ // (int)ccOutMsg.call_handle,
+ // ccOutMsg.message_type,
+ // voipInMsg->CallEvent.ReasonCode);
+ DBG_LEAVE();
+ return (true);
+ }
+}
+
+bool
+CcVBLinkMessageHandler(char *cellId, char *ipAddress, TXN_ID txnId)
+{
+
+ DBG_FUNC("CcVBLinkMessageHandler", CC_LAYER);
+ DBG_ENTER();
+
+ MSG_Q_ID qid;
+ IntraL3Msg_t ccOutMsg;
+
+ ccOutMsg.module_id = MODULE_H323;
+
+ DBG_TRACE("VBL->CC API LOG: Sending CC IP Addr Rsp Msg(%d) cellId(%s) ipAddr(%s) sessionId(%d)\n",
+ (int)INTRA_L3_CC_RAS_IP_ADDRESS_RESPONSE,
+ cellId, ipAddress, txnId);
+
+ if ( (0 > txnId) ||
+ (txnId >= CC_MAX_CC_CALLS) )
+ {
+ DBG_ERROR("VBL->CC API ERROR: Bad txnId(%d)\n",
+ txnId);
+ DBG_LEAVE();
+ return(false);
+ }
+
+ ccOutMsg.entry_id = txnId;
+
+ qid = ccSession[ccOutMsg.entry_id].msgQId;
+
+ ccOutMsg.message_type = INTRA_L3_CC_RAS_IP_ADDRESS_RESPONSE;
+
+ strcpy(&(ccOutMsg.l3_data.ipAddressResponse.ViperCellId[0]), cellId);
+
+ strcpy(&(ccOutMsg.l3_data.ipAddressResponse.ViperCellIpAddress[0]), ipAddress);
+
+ // send the message.
+ if (ERROR == msgQSend( qid,
+ (char *) &ccOutMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT, //PR1553 <xxu> WAIT_FOREVER,
+ MSG_PRI_NORMAL
+ ) )
+ {
+ DBG_ERROR("VBL->CC API ERROR: sendCC msgQSend (QID = %p) error\n ",
+ (int)qid);
+ DBG_LEAVE();
+ return(false);
+ }
+ else
+ {
+ //DBG_TRACE("VB Link Log: Sent Message to CC (cell id requested = %s)",
+ // cellId);
+ DBG_LEAVE();
+ return(true);
+ }
+
+}
+
+
+BOOL CcVBLinkCellStatusUpdate (char *pCellId, VBLINK_VC_STATUS_INFO status)
+{
+ IntraL3Msg_t ccOutMsg;
+ int cellNum ;
+
+ DBG_FUNC ("CcVBLinkCellStatusUpdate", CC_LAYER);
+ DBG_ENTER ();
+
+ ccOutMsg.module_id = MODULE_H323 ;
+ ccOutMsg.call_handle = 0 ;
+ ccOutMsg.message_type = INTRA_L3_CC_VC_UPDATE_INFO;
+
+ if ((cellNum = atoi (pCellId)) <= 0)
+ {
+ // Invalid ViperCell ID
+ DBG_ERROR ("VBL->CC API ERROR: Sending CC a Msg(%d) w. Invalid CellID(%s) cellNum(%d) status(%d)\n",
+ (int)INTRA_L3_CC_VC_UPDATE_INFO, pCellId, cellNum, status);
+ DBG_LEAVE ();
+ return (FALSE);
+ }
+
+ DBG_TRACE("VBL->CC API LOG: Sending CC GP StatusUpdate Msg(%d) cellId(%s) cellNum(%d) StatusUpdate(%d)\n",
+ (int)INTRA_L3_CC_VC_UPDATE_INFO, pCellId, cellNum, status);
+
+ // Correct Network ID is not provided at this time
+ ccOutMsg.l3_data.statusVCMsg.btsID.networkId = 0 ;
+ ccOutMsg.l3_data.statusVCMsg.btsID.cellId = cellNum;
+ ccOutMsg.l3_data.statusVCMsg.status = status ;
+
+ // send the message.
+ if (ERROR == msgQSend (ccMsgQId ,
+ (char *) &ccOutMsg ,
+ sizeof (struct IntraL3Msg_t),
+ NO_WAIT , //PR1553 <xxu> WAIT_FOREVER
+ MSG_PRI_NORMAL ) )
+ {
+ DBG_ERROR ("VBL->CC API ERROR : sendCC msgQSend (QID = %p) error.\n",
+ (int)ccMsgQId);
+ DBG_LEAVE ();
+
+ return (FALSE);
+ }
+
+ //DBG_TRACE ("ViperLink Log: Sent VC update message to CC, ID = %d, status = %d .\n",
+ // cellNum, status);
+ DBG_LEAVE ();
+
+ return (TRUE);
+}
+
+
+//BCT <xxu:08-11-00> BEGIN
+bool
+CcVBLinkTransferResponse (
+ unsigned short reqSeqNumber,
+ unsigned char rejectCause,
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER cpn )
+{
+
+ DBG_FUNC("CCVBLinkTransferResponse", CC_LAYER);
+ DBG_ENTER();
+
+ MSG_Q_ID qid;
+ IntraL3Msg_t ccOutMsg;
+
+ ccOutMsg.module_id = MODULE_H323;
+
+ DBG_TRACE("VBL->CC API LOG: Sending BCT No. Rsp reqSeqNo(%d) rejectCause(%d) bctNo(%d,%d,%d,%d,%d,%d)\n",
+ reqSeqNumber, rejectCause, cpn.digits[0], cpn.digits[1], cpn.digits[2], cpn.digits[3],
+ cpn.digits[4], cpn.digits[5]);
+
+ if ( reqSeqNumber >= CC_MAX_CC_CALLS )
+ {
+ DBG_ERROR("VBL->CC API ERROR: Bad reqSegNumber(%d)\n",
+ reqSeqNumber);
+ DBG_LEAVE();
+ return(false);
+ }
+
+ ccOutMsg.entry_id = reqSeqNumber;
+
+ qid = ccSession[ccOutMsg.entry_id].msgQId;
+ ccOutMsg.message_type = INTRA_L3_CC_RAS_BCT_NUMBER_RESPONSE;
+ ccOutMsg.l3_data.bctNumberResponse.reqSeqNumber = reqSeqNumber;
+ ccOutMsg.l3_data.bctNumberResponse.rejectCause = rejectCause;
+ memcpy(&(ccOutMsg.l3_data.bctNumberResponse.cpn), &cpn,
+ sizeof(T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER));
+
+ // send the message.
+ if (ERROR == msgQSend( qid,
+ (char *) &ccOutMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT, //PR1553 <xxu> WAIT_FOREVER,
+ MSG_PRI_NORMAL
+ ) )
+ {
+ DBG_ERROR("VBL->CC API ERROR: sendCC msgQSend (QID = %p) error\n ",
+ (int)qid);
+ DBG_LEAVE();
+ return(false);
+ }
+
+ DBG_LEAVE();
+ return(true);
+}
+//BCT <xxu:08-11-00> END
diff --git a/data/mnet/GP10/Host/cc/src_api/CCapiViperLink.cpp b/data/mnet/GP10/Host/cc/src_api/CCapiViperLink.cpp
new file mode 100644
index 0000000..4c77d85
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src_api/CCapiViperLink.cpp
@@ -0,0 +1,150 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 0.1
+// Status : Under development
+// File : CCapiViperLink.cpp
+// Author(s) : Bhawani Sapkota
+// Create Date : 11-24-1999
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// included L3 Message header for messages from other Layer 3 modules (CC, RR)
+
+#include "logging/VCLOGGING.h"
+
+#include "voip/voipapi.h"
+#include "jcc/JCCLog.h"
+#include "jcc/JCCUtil.h"
+#include "CC/CCInt.h"
+#include "CC/CCconfig.h"
+#include "CC/CCTypes.h"
+
+// converts the message from network byte ordering format
+// to the host byte ordering format
+
+static bool
+ccCissUnpackVblinkMsg(CISSVblinkMsg_t &cissMsg,
+ unsigned char buffer[],
+ int size
+ )
+{
+ CISSVblinkMsg_t &orgMsg = (CISSVblinkMsg_t &) *buffer;
+ DBG_FUNC("ccCissUnpackVblinkMsg", CC_CISS_LAYER);
+ DBG_ENTER();
+
+
+ // Check the integrity of the message first
+ cissMsg.Magic = ntohl(orgMsg.Magic);
+ if (cissMsg.Magic != VOIP_API_MAGIC_VALUE)
+ {
+ // corrupt message
+
+ DBG_ERROR("Corrupt message (magic number = %d)\n", cissMsg.Magic);
+ DBG_LEAVE();
+ return false;
+ }
+
+ cissMsg.msgLen = ntohl(orgMsg.msgLen);
+ if (cissMsg.msgLen <= 0
+ || (int) (cissMsg.msgLen + kCissVbLinkMsgHdrLen) != size)
+ {
+
+ DBG_ERROR("Incorrect msg length (expected = %d, actual = %d)\n",
+ cissMsg.msgLen+kCissVbLinkMsgHdrLen,
+ size
+ );
+
+ DBG_LEAVE();
+ return false;
+ // message size is not correct, corrupt message
+ }
+
+ cissMsg.callIdx = ntohl(orgMsg.callIdx);
+ cissMsg.msgType = (T_CNI_RIL3_MESSAGE_TYPE) ntohl(orgMsg.msgType);
+ cissMsg.status = ntohl(orgMsg.status);
+ memcpy(cissMsg.msg, orgMsg.msg, cissMsg.msgLen);
+
+ DBG_LEAVE();
+ return true;
+}
+
+// Actual call back function called by VBLink task
+bool
+ccCissProcessViperBaseMsg(LUDB_ID ludbIdx, char * buffer, int size)
+{
+ CISSVblinkMsg_t cissMsg;
+ bool status = false;
+ int cause;
+
+ DBG_FUNC("ccCissProcessViperBaseMsg", CC_CISS_LAYER);
+ DBG_ENTER();
+
+ DBG_HEXDUMP((unsigned char *) buffer, size);
+ status = ccCissUnpackVblinkMsg(cissMsg, (unsigned char *) buffer, size);
+ DBG_TRACE("CISS STATUS = %d\n", cissMsg.status);
+
+
+ if (status)
+ {
+
+ MSG_Q_ID qid;
+ IntraL3Msg_t ccOutMsg;
+
+ memset((void *) &ccOutMsg, 0, sizeof(IntraL3Msg_t));
+
+ ccOutMsg.module_id = MODULE_CISS;
+
+ if ( cissMsg.callIdx < 0 || cissMsg.callIdx >= CC_MAX_CC_CALLS)
+ {
+ DBG_ERROR("CISS->CC Error : Bad (Transaction Id = %d)\n",
+ cissMsg.callIdx);
+ DBG_LEAVE();
+ return false;
+ }
+
+ ccOutMsg.entry_id = cissMsg.callIdx;
+
+ qid = ccSession[cissMsg.callIdx].msgQId;
+
+ ccOutMsg.message_type = (IntraL3MsgType_t) cissMsg.msgType;
+
+ ccOutMsg.l3_data.cissMsg = cissMsg;
+
+
+ // send the message.
+ if (ERROR == msgQSend(
+ qid,
+ (char *) &ccOutMsg,
+ sizeof(CISSVblinkMsg_t),
+ NO_WAIT, //PR1553 <xxu> WAIT_FOREVER,
+ MSG_PRI_NORMAL)
+ )
+ {
+ DBG_ERROR("CISS->CC Error : sendCC msgQSend (QID = %p) error\n ",
+ (int)qid);
+ status = false;
+
+ } else {
+ DBG_TRACE("CISS Log: Sent Message to CC, (Entry ID = %p), (Msg Type = %d)\n",
+ (int)ccOutMsg.entry_id,
+ ccOutMsg.message_type);
+ status = true;
+ }
+ }
+ DBG_LEAVE();
+ return status;
+
+}
+
diff --git a/data/mnet/GP10/Host/cc/src_api/Makefile b/data/mnet/GP10/Host/cc/src_api/Makefile
new file mode 100644
index 0000000..096aeca
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src_api/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = cc
+THIS_DIRECTORY = src_api
+MY_OUTPUT = $(OBJDIR)\ccm_api.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif
diff --git a/data/mnet/GP10/Host/cc/src_api/SmsVblink.cpp b/data/mnet/GP10/Host/cc/src_api/SmsVblink.cpp
new file mode 100644
index 0000000..ade59e5
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src_api/SmsVblink.cpp
@@ -0,0 +1,169 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SmsVblink.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 31-03-2000
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+//
+
+#include <vxworks.h>
+#include <string.h>
+
+#include "logging\vcmodules.h"
+#include "logging\vclogging.h"
+
+#include "jcc\jcccommsg.h"
+
+//#include "voip\vblink.h"
+
+#include "CC\ccint.h"
+#include "CC\ccutil.h"
+
+bool smsUseVblink = true; /* Controls whether to forward MNSMS msg's from SMS to
+ ViperBase and visa versa. */
+
+// Local declarations
+static bool smsUnpackVblinkMsg (SmsVblinkMsg_t&, const SmsVblinkMsg_t *, unsigned int);
+
+
+/* Parser and routing function for the MNSMS messages received from SMR entity */
+bool smsReceiveSmrMsg (LUDB_ID ludbIdx, unsigned char *msgData, unsigned int msgLen)
+{
+ MSG_Q_ID qid ;
+ bool retVal ;
+ int sessionId;
+ IntraL3Msg_t l3MsgOut ;
+ SMS_VBLINK_MSGTYPE msgType ;
+
+ SmsVblinkMsg_t& smsMsgOut = l3MsgOut.l3_data.smsVbMsg;
+
+ DBG_FUNC ("smsReceiveSmrMsg", CC_SMS_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE ("VBLINK->SMS: received message from ViperBase.\n");
+// DBG_HEXDUMP (msgData, msgLen);
+
+ if (smsUseVblink == false)
+ {
+ DBG_WARNING ("VBLink->SMS: VBLink interface is OFF. The message will not be forwarded to SMS.\n");
+ DBG_LEAVE ();
+ return (false);
+ }
+
+ if (msgLen < SMS_VBLINK_HDRSIZE || msgLen > sizeof (SmsVblinkMsg_t))
+ {
+ DBG_ERROR ("VBLink->SMS Error : Invalid message length = %d \n", msgLen);
+ DBG_LEAVE ();
+ return (false);
+ }
+
+ // Reset the output message pool
+ memset (&l3MsgOut, 0, sizeof(IntraL3Msg_t));
+
+ if (smsUnpackVblinkMsg (smsMsgOut, (SmsVblinkMsg_t *)msgData, msgLen) == false)
+ {
+ DBG_LEAVE ();
+ return (false);
+ }
+
+ msgType = ( SMS_VBLINK_MSGTYPE)smsMsgOut.hdr.msgType;
+
+ if (msgType <= MNSMS_MSG_BASE || msgType >= MNSMS_MSG_MAX)
+ {
+ DBG_ERROR ("VBLink->SMS Error : Unknown message type = %d \n", smsMsgOut.hdr.msgType);
+ DBG_LEAVE ();
+ return (false);
+ }
+
+ l3MsgOut.module_id = MODULE_H323 ;
+ l3MsgOut.message_type = INTRA_L3_SMS_MESSAGE ;
+ l3MsgOut.entry_id = ludbIdx ;
+
+ // The following parameters are not in use
+ l3MsgOut.call_handle = VOIP_NULL_CALL_HANDLE;
+
+ // Forward the message to the appropriate CC entity (either CC main or Call-x task)
+ // MNSMS-EST Req always sent to CC Main task in order to avoid race conditions
+ if (msgType != MNSMS_EST_Req && (sessionId = mobInCall(ludbIdx)) != JCC_ERROR)
+ qid = ccSession[sessionId].msgQId; // MS is already engaged
+ else
+ qid = ccMsgQId; // MS is not involved in any, forward to the CC main task
+
+ // send the message
+ if (ERROR == msgQSend (qid ,
+ (char *)&l3MsgOut ,
+ sizeof (IntraL3Msg_t),
+ NO_WAIT, //PR1553 <xxu> WAIT_FOREVER,
+ MSG_PRI_NORMAL ))
+ {
+ DBG_ERROR ("VBLINK->SMS Error : sendCC msgQSend (QID = %p) error\n ",
+ (int)qid);
+ retVal = false;
+ }
+ else
+ {
+ DBG_TRACE ("VBLINK->SMS: Sent Message to SMS, (LUDB = %d), (Msg Type = %d)\n",
+ ludbIdx, smsMsgOut.hdr.msgType);
+ retVal = true;
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+static bool smsUnpackVblinkMsg (SmsVblinkMsg_t& smsMsgOut,
+ const SmsVblinkMsg_t *smsMsgIn ,
+ unsigned int msgLen )
+{
+ DBG_FUNC("smsUnpackVblinkMsg", CC_SMS_LAYER);
+ DBG_ENTER();
+
+ // Check integrity of the message
+ if ((smsMsgOut.hdr.magic = ntohl (smsMsgIn->hdr.magic)) != SMS_MAGIC_NUMBER)
+ {
+ // corrupted or non-SMS message
+ DBG_ERROR ("VBLINK->SMS Error: Corrupted message is received (magic number = %#x)\n",
+ smsMsgOut.hdr.magic);
+ DBG_LEAVE ();
+ return (false);
+ }
+
+ // Check the associated RP message data length
+ if ((smsMsgOut.hdr.msgLen = ntohl(smsMsgIn->hdr.msgLen)) > SMS_MAX_RP_MSG_LEN)
+ {
+ DBG_ERROR ("VBLINK->SMS Error: Invalid RP message data length = %ul is received\n",
+ smsMsgOut.hdr.msgLen);
+ DBG_LEAVE ();
+ return (false);
+ }
+
+ smsMsgOut.hdr.refNum = ntohl (smsMsgIn->hdr.refNum );
+ smsMsgOut.hdr.msgType = ntohl (smsMsgIn->hdr.msgType);
+ smsMsgOut.hdr.status = ntohl (smsMsgIn->hdr.status );
+
+ memcpy (smsMsgOut.msg, smsMsgIn->msg, smsMsgOut.hdr.msgLen);
+
+ DBG_TRACE ("VBLINK->SMS: Received message type %d, ref.num = %d, status = %d\n RPDU Data: ",
+ smsMsgOut.hdr.msgType, smsMsgOut.hdr.refNum, smsMsgOut.hdr.status);
+ DBG_HEXDUMP (smsMsgOut.msg, smsMsgOut.hdr.msgLen);
+
+ DBG_LEAVE();
+ return (true);
+}
+
diff --git a/data/mnet/GP10/Host/cc/src_api/ccutil2.cpp b/data/mnet/GP10/Host/cc/src_api/ccutil2.cpp
new file mode 100644
index 0000000..93a2d66
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src_api/ccutil2.cpp
@@ -0,0 +1,201 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCUtil2.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 04-04-00
+// Description : This file contains common CC utility functions
+// required by the ccm_api module.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include <vxworks.h>
+
+#include "jcc/JCCComMsg.h"
+#include "cc/CCsessionHandler.h"
+#include "cc/cc_util_ext.h"
+
+//ext-HO <xxu:06-08-01>
+//ext-HO <xxu:06-08-01>
+short ccHoNumberCompare(T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER *hoNumber,
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER *cpn,
+ int length )
+{
+ short result;
+
+ DBG_FUNC("ccHoNumberCompare", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ result = 1;
+
+ if ( (hoNumber->ie_present==cpn->ie_present) &&
+ (hoNumber->numberType==cpn->numberType) &&
+ (hoNumber->numberingPlan==cpn->numberingPlan) &&
+ (hoNumber->numDigits==cpn->numDigits) )
+
+ {
+ if (memcmp(hoNumber->digits, cpn->digits, hoNumber->numDigits)==0)
+ {
+ DBG_TRACE("{\nccHoNumberCompare: CPN is Handove Number\n}\n");
+ result = 0;
+ } else
+ {
+ DBG_TRACE("{\nccHoNumberCompare: CPN is NOT Handove Number\n}\n");
+ }
+ } else
+ {
+
+ DBG_TRACE("{\nccHoNumberCompare: CPN is NOT Handove Number\n}\n");
+ }
+
+ DBG_LEAVE();
+ return result;
+}
+
+short ccIsHandoverCallSetup(IntraL3Msg_t *h323InMsg)
+{
+ T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER cpn;
+ cpn = h323InMsg->l3_data.voipMsg.callOffering.CalledPartyNumber;
+
+ DBG_FUNC("ccIsHandoverCallSetup", CC_ETRG_LAYER);
+ DBG_ENTER();
+
+ //Dump cpn for debugging purpose
+ DBG_TRACE("{\nMNETeiTRACE(ccIsHandoverCallSetup): handover call SETUP cpn:\n");
+ DBG_TRACE(" (cpn.ie_present=%d, cpn.numberType=%d, cpn.numberingPlan=%d\n",
+ cpn.ie_present,cpn.numberType,cpn.numberingPlan);
+ DBG_TRACE(" (cpn.numDigits=%d digits:%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x)\n\n",
+ cpn.numDigits,cpn.digits[0],cpn.digits[1],cpn.digits[2],
+ cpn.digits[3],cpn.digits[4],cpn.digits[5],cpn.digits[6],
+ cpn.digits[7],cpn.digits[8],cpn.digits[9],cpn.digits[10]);
+ DBG_TRACE(" SETUP CPN Hex Dump:\n");
+ DBG_HEXDUMP((unsigned char*)&cpn, sizeof(T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER));
+ DBG_TRACE("}\n\n");
+
+ short i;
+ for(i=0; i< CC_MAX_CC_CALLS; i++)
+ {
+ if ( (ccSession[i].free==false) &&
+ (ccSession[i].sessionHandler->handoverSession
+ == ccSession[i].sessionHandler->targetHandoverSessionExtHo) )
+ {
+ if (ccHoNumberCompare(&ccSession[i].sessionHandler->handoverSession->hoNumber_, &cpn,
+ sizeof(T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER)) == 0)
+ {
+ DBG_TRACE("\nMNETeiTRACE(ccIsHandoverCallSetup): found Handover Session(callId=%d)\n}\n",
+ i);
+ DBG_LEAVE();
+ return i;
+ }
+
+ }
+ }
+
+ DBG_LEAVE();
+ return JCC_ERROR;
+}
+
+
+//Overloaded method for searching according to ludbIndex
+short mobInCall (const short ludbIndex)
+{
+ DBG_FUNC("mobInCall(ludbIndex)", CC_LAYER);
+ DBG_ENTER();
+
+ short i;
+ for(i=0; i< CC_MAX_CC_CALLS; i++)
+ {
+ if (ccSession[i].free == false)
+ {
+ if (ccSession[i].sessionHandler->ludbIndex == ludbIndex)
+ {
+ DBG_LEAVE();
+ return i;
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return JCC_ERROR;
+}
+
+//Overloaded method for searching according to entry ID
+short mobInCall2 (const T_CNI_IRT_ID entryId)
+{
+ DBG_FUNC("mobInCall(entryId)", CC_LAYER);
+ DBG_ENTER();
+
+ short index;
+ for (index = 0; index < CC_MAX_CC_CALLS; index++)
+ {
+ if (ccSession[index].free == false)
+ {
+ if (ccSession[index].sessionHandler->entryId == entryId)
+ {
+ DBG_LEAVE();
+ return (index);
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return JCC_ERROR;
+}
+
+
+// <Igal: 04-10-01>
+// Unconditional release CC session(s) by the LUDB index
+bool CcNotifyPurge (short ludbIndex)
+{
+ DBG_FUNC("CcNotifyPurge", CC_LAYER);
+ DBG_ENTER();
+
+ bool retVal = true;
+ short callIdx ;
+ IntraL3Msg_t ccOutMsg;
+
+ memset (&ccOutMsg, 0, sizeof(IntraL3Msg_t));
+
+ ccOutMsg.module_id = MODULE_LUDB ;
+ ccOutMsg.primitive_type = INTRA_L3_DATA ;
+ ccOutMsg.message_type = INTRA_L3_LUDB_PURGE_PROFILE;
+
+ for (callIdx = 0; callIdx < CC_MAX_CC_CALLS; ++callIdx)
+ {
+ if (ccSession[callIdx].free != True &&
+ ccSession[callIdx].sessionHandler != NULL )
+ {
+ if (ccSession[callIdx].sessionHandler->ludbIndex == ludbIndex)
+ {
+ // Use priority in order to prevent CC from accessing removed LUDB entry
+ // while processing other inputs
+ if (msgQSend (ccSession[callIdx].msgQId ,
+ (char *)&ccOutMsg ,
+ sizeof (struct IntraL3Msg_t),
+ NO_WAIT ,
+ MSG_PRI_URGENT ) == ERROR)
+ {
+ DBG_ERROR ("LUDB->CC API ERROR: send CC Call task [QID = %p] error.\n",
+ (int)ccSession[callIdx].msgQId );
+ retVal = false;
+ }
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
diff --git a/data/mnet/GP10/Host/cc/src_init/CCinit.cpp b/data/mnet/GP10/Host/cc/src_init/CCinit.cpp
new file mode 100644
index 0000000..038b444
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src_init/CCinit.cpp
@@ -0,0 +1,30 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCinit.cpp
+// Author(s) : Sheausong Yang
+// Create Date : 11-01-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "ril3/ril3md.h"
+
+// Global variable for Message Queue
+MSG_Q_ID ccMsgQId;
+
+// Used by RRM to create IRT entries.
+T_CNI_L3_ID cc_id;
+
diff --git a/data/mnet/GP10/Host/cc/src_init/Makefile b/data/mnet/GP10/Host/cc/src_init/Makefile
new file mode 100644
index 0000000..6a2f622
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/src_init/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = cc
+THIS_DIRECTORY = src_init
+MY_OUTPUT = $(OBJDIR)\ccm_init.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif
diff --git a/data/mnet/GP10/Host/cc/test/CCtestUpdateVC.cpp b/data/mnet/GP10/Host/cc/test/CCtestUpdateVC.cpp
new file mode 100644
index 0000000..a5b7844
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/test/CCtestUpdateVC.cpp
@@ -0,0 +1,54 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CCtestUpdateVC.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 11-01-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// included VxWorks headers
+#include <vxWorks.h>
+
+#include "jcc/JCCVcMsg.h"
+#include "voip/vblink.h"
+
+#include "CC/CCTypes.h"
+
+bool sendVcFailNotification (unsigned short);
+
+bool sendVcFailNotification (unsigned short cellId)
+{
+ BOOL retVal ;
+ VOIP_API_MESSAGE voipMsg;
+ char vcName [256];
+
+ sprintf ((char *)vcName, "%d", cellId);
+
+ if ((retVal = CcVBLinkCellStatusUpdate (vcName, VC_STATUS_DOWN)) == TRUE)
+ {
+ printf ("DBG: Using test function for sending ViperCell Num %s Failure Msg.\n",
+ vcName );
+ }
+ else
+ {
+ printf ("DBG: Failed to send ViperCell Num %s Failure Msg to CC using test function.\n",
+ vcName );
+ }
+
+ return retVal;
+}
+
diff --git a/data/mnet/GP10/Host/cc/test/ForC.h b/data/mnet/GP10/Host/cc/test/ForC.h
new file mode 100644
index 0000000..3931150
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/test/ForC.h
@@ -0,0 +1,83 @@
+#ifndef ForC_H
+#define ForC_H
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : ForC.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// included VxWorks headers
+#include "vxWorks.h"
+#include "JCC/JCCLog.h"
+#include "JCC/JCCL3Msg.h"
+
+#include "lapdm/lapdm_l3intf.h"
+
+#include "MM/MMConfig.h"
+#include "MM/MMInt.h"
+#include "RIL3/ril3irt_db.h"
+
+#include "CC/CallConfig.h"
+#include "CC/CCconfig.h"
+#include "CC/CCInt.h"
+#include "CC/CCTypes.h"
+
+#include "JCC/LUDBInstance.h"
+#include "JCC/LUDBConfig.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+extern void populateLUDB();
+
+extern void tccInit();
+
+extern void tmmPrint();
+
+extern void tccPrint();
+
+extern void tmmInit();
+
+
+extern void ccTest();
+
+extern void irtDataPrint();
+
+void fromMS(short entryId,
+ T_CNI_LAPDM_L2L3PrimitiveType prim,
+ unsigned char buff0,
+ unsigned char buff1);
+extern
+void fromRRtoMM(short entryId,
+ IntraL3PrimitiveType_t prim,
+ IntraL3MsgType_t msgType);
+extern
+void fromRRtoCC(short entryId,
+ IntraL3PrimitiveType_t prim,
+ IntraL3MsgType_t msgType,
+ short msSide);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // ForC_H
diff --git a/data/mnet/GP10/Host/cc/test/Makefile b/data/mnet/GP10/Host/cc/test/Makefile
new file mode 100644
index 0000000..0e01078
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/test/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = cc
+THIS_DIRECTORY = test
+MY_OUTPUT = $(OBJDIR)\cc_test.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif
diff --git a/data/mnet/GP10/Host/cc/test/ccVarTest.cpp b/data/mnet/GP10/Host/cc/test/ccVarTest.cpp
new file mode 100644
index 0000000..c762857
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/test/ccVarTest.cpp
@@ -0,0 +1,441 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : ccVarTest.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+#include "stdio.h"
+
+#include "vxWorks.h"
+#include "oam_api.h"
+#include "JCC/JCCL3Msg.h"
+
+#include "lapdm/lapdm_l3intf.h"
+
+#include "MM/MMConfig.h"
+#include "MM/MMInt.h"
+
+
+extern MobilityConfigData mmCfg;
+
+// Used by RRM to create IRT entries.
+extern T_CNI_L3_ID mm_id;
+
+#include "RIL3/ril3irt_db.h"
+
+#include "CC/CallConfig.h"
+#include "CC/CCconfig.h"
+#include "CC/CCInt.h"
+#include "CC/CCTypes.h"
+
+#include "JCC/LUDBInstance.h"
+#include "JCC/LUDBConfig.h"
+
+#include "JCC/JCCLog.h"
+
+extern void mmDataInit(void);
+extern void ccDataInit(void);
+
+extern short registerUser(const T_CNI_RIL3_IE_MOBILE_ID& imsi);
+
+extern short testIMSIindex;
+
+extern T_CNI_RIL3_IE_MOBILE_ID testIMSI[];
+
+extern short origSoftMobDialedNumIndex;
+
+extern T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER testDialedNum[];
+
+extern T_CNI_IRT_ID softMobEntryId[];
+
+extern T_CNI_LAPDM_OID softMobLapdmOid[]; // Any large number
+
+extern int termSoftMobIndex,
+ origSoftMobIndex;
+
+T_CNI_LAPDM_L2L3CallBackData callback[CC_MAX_CC_CALLS_DEF_VAL];
+
+T_CNI_L3_ID l3Id1, l3Id2;
+
+bool readIMSITable( char* dnFile )
+{
+ FILE* pfd;
+ short i, j;
+ int inp;
+
+ if( NULL == ( pfd = fopen( dnFile, "r" ) ) )
+ {
+ printf( "Error opening file '%s'\n", dnFile );
+ return (false);
+ }
+
+ for(i=0; i< CC_MAX_CC_CALLS;i++)
+ {
+ testIMSI[i].numDigits = 15;
+
+ for (j=0; j < testIMSI[i].numDigits; j++)
+ {
+ fscanf( pfd , "%d", &inp);
+ testIMSI[i].digits[j] = inp;
+ }
+
+ fscanf(pfd, "\n");
+
+ testIMSI[i].ie_present = true;
+
+ testIMSI[i].mobileIdType = CNI_RIL3_IMSI;
+
+ for (j=0; j < testIMSI[i].numDigits; j++)
+ {
+ printf( "%d ", testIMSI[i].digits[j]);
+ }
+
+ printf("\n");
+ }
+
+ fclose( pfd );
+
+ return (true);
+}
+
+void locReqSet(short imsiIndex)
+{
+ testIMSIindex = imsiIndex;
+}
+
+void origSoftMobSet(short dialedNum)
+{
+ origSoftMobDialedNumIndex = dialedNum;
+}
+
+void softMobSet(short imsiIndex)
+{
+ testIMSIindex = imsiIndex;
+}
+
+void softMobStart(short imsiIndex)
+{
+
+ // Prepare L3 Ids
+ l3Id1.msgq_id = mmMsgQId;
+ l3Id1.sub_id = (unsigned short) mmCfg.mm_max_mm_connections;
+
+ l3Id2.msgq_id = ccMsgQId;
+
+ softMobSet(imsiIndex);
+
+ callback[imsiIndex].lapdm_oid = softMobLapdmOid[imsiIndex];
+ callback[imsiIndex].data.msgLength = 2;
+ callback[imsiIndex].sapi = 0;
+ callback[imsiIndex].layer3_ID = 1;
+ callback[imsiIndex].unserved_data_after_release = false;
+
+ callback[imsiIndex].error_cause = EC_NO_ERROR;
+
+ // Create the IRT entry
+
+ softMobEntryId[imsiIndex] =
+ // lapdm_oid, rr_id, mm_id, cc_id
+ CNI_RIL3_IRT_Register(softMobLapdmOid[imsiIndex], l3Id2, l3Id1, l3Id2 );
+
+}
+
+extern CNI_RIL3IRT_DB CNI_IRT_database;
+
+void
+irtEntryPrint(T_CNI_RIL3IRT_DB_ENTRY &irtDBEntry)
+{
+ printf("IRT DBEntry: %d, %d, %p, %d, %p, %d, %p, %d \n",
+ irtDBEntry.entry_id,
+ irtDBEntry.lapdm_oid,
+ irtDBEntry.rrm_id.msgq_id,
+ irtDBEntry.rrm_id.sub_id,
+ irtDBEntry.mm_id.msgq_id,
+ irtDBEntry.mm_id.sub_id,
+ irtDBEntry.cc_id.msgq_id,
+ irtDBEntry.cc_id.sub_id);
+}
+
+void irtDataPrint()
+{
+ short i;
+ JCCLog("***************************************************************************************\n");
+ JCCLog("**************************************Synchronize with ShowAll*************************\n");
+ JCCLog("***************************************************************************************\n");
+
+ for(i=0; i< 38; i++)
+ {
+ irtEntryPrint(CNI_IRT_database.m_entry[i]);
+ }
+}
+
+// void irtMMDataInit()
+// {
+// short i;
+// for(i=0; i< 25 ; i++)
+// {
+// CNI_IRT_database.m_entry[i].mm_id = mm_id;
+// }
+// }
+
+// void mmDataInit()
+// {
+// mmConnDataInit();
+// irtMMDataInit();
+// }
+
+void softMobInit(short imsiIndex)
+{
+ softMobSet(imsiIndex);
+ mmDataInit();
+ ccDataInit();
+}
+
+void fromMS(short callbackIndex,
+ T_CNI_LAPDM_L2L3PrimitiveType prim,
+ unsigned char buff0,
+ unsigned char buff1)
+{
+ callback[callbackIndex].primitive_type = prim;
+ callback[callbackIndex].data.buffer[0] = buff0;
+ callback[callbackIndex].data.buffer[1] = buff1;
+
+ CNI_RIL3MD_L3CallBack (&callback[callbackIndex]);
+ printf("CC Test Log: Sent Message from Soft MS, Prim. Type, Buffer Contents: %d %d %d\n",
+ prim,
+ buff0,
+ buff1);
+}
+
+void fromRRtoMM(short callIndex,
+ IntraL3PrimitiveType_t prim,
+ IntraL3MsgType_t msgType)
+{
+ short entryId = softMobEntryId[callIndex];
+
+ IntraL3Msg_t rrToMMMsg;
+
+ rrToMMMsg.module_id = MODULE_RM;
+ rrToMMMsg.primitive_type = prim;
+ rrToMMMsg.message_type = msgType;
+
+ rrToMMMsg.entry_id = entryId;
+
+ // Fill in the required message fields.
+ rrToMMMsg.l3_data.pageRsp.mobileId = testIMSI[callIndex];
+
+ // send the message.
+ if (ERROR == msgQSend( mmMsgQId,
+ (char *) &rrToMMMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT,
+ MSG_PRI_NORMAL
+ ) )
+ {
+ printf("CC Test Error : fromRRtoMM msgQSend (QID=%d) error\n ",
+ mmMsgQId);
+ }
+ else
+ {
+ printf("CC Test Log: Sent Message from RR to MM, Prim. Type, Msg Type: %d %d\n",
+ prim,
+ msgType);
+ }
+}
+
+void fromRRtoCC(IntraL3PrimitiveType_t prim,
+ IntraL3MsgType_t msgType,
+ short callIndex)
+{
+ CCSession_t *sess = &ccSession[callIndex];
+ short entryId = softMobEntryId[callIndex];
+
+ IntraL3Msg_t rrToCCMsg;
+
+ rrToCCMsg.module_id = MODULE_RM;
+ rrToCCMsg.primitive_type = prim;
+ rrToCCMsg.message_type = msgType;
+
+ rrToCCMsg.entry_id = entryId;
+
+ // send the message.
+ if (ERROR == msgQSend( sess->msgQId,
+ (char *) &rrToCCMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT,
+ MSG_PRI_NORMAL
+ ) )
+ {
+ printf("CC Test Error : fromRRtoCC msgQSend (QID=%d) error\n ",
+ ccMsgQId);
+ }
+ else
+ {
+ printf("CC Test Log: Sent Message from RR to CC, Prim. Type, Msg Type: %d %d\n",
+ prim,
+ msgType);
+ }
+}
+
+bool readDialedNumberTable( char* dnFile )
+{
+ FILE* pfd;
+ short i, j;
+ int inp;
+
+ if( NULL == ( pfd = fopen( dnFile, "r" ) ) )
+ {
+ printf( "Error opening file '%s'\n", dnFile );
+ return (false);
+ }
+
+ for(i=0; i< CC_MAX_CC_CALLS;i++)
+ {
+ testDialedNum[i].numDigits = 4;
+
+ for (j=0; j < testDialedNum[i].numDigits; j++)
+ {
+ fscanf( pfd , "%d", &inp);
+ testDialedNum[i].digits[j] = inp;
+ }
+ fscanf(pfd, "\n");
+
+ testDialedNum[i].ie_present = true;
+ testDialedNum[i].numberType = CNI_RIL3_NUMBER_TYPE_NETWORK_SPECIFIC;
+ testDialedNum[i].numberingPlan = CNI_RIL3_NUMBERING_PLAN_PRIVATE;
+
+
+ for (j=0; j < testDialedNum[i].numDigits; j++)
+ {
+ printf( "%d ", testDialedNum[i].digits[j]);
+ }
+
+ printf("\n");
+
+ }
+
+ fclose( pfd );
+
+ return (true);
+}
+
+/*
+
+void readIMSITable()
+{
+ int i = origSoftMobIndex;
+
+ testIMSI[i].ie_present = true;
+
+ testIMSI[i].mobileIdType = CNI_RIL3_IMSI;
+
+ testIMSI[i].numDigits = 15;
+
+ testIMSI[i].digits[0] = 3;
+ testIMSI[i].digits[1] = 1;
+ testIMSI[i].digits[2] = 0;
+ testIMSI[i].digits[3] = 1;
+ testIMSI[i].digits[4] = 7;
+ testIMSI[i].digits[5] = 0;
+ testIMSI[i].digits[6] = 1;
+ testIMSI[i].digits[7] = 0;
+ testIMSI[i].digits[8] = 7;
+ testIMSI[i].digits[9] = 4;
+ testIMSI[i].digits[10] = 1;
+ testIMSI[i].digits[11] = 2;
+ testIMSI[i].digits[12] = 2;
+ testIMSI[i].digits[13] = 2;
+ testIMSI[i].digits[14] = 2;
+
+ i = termSoftMobIndex;
+
+ testIMSI[i].ie_present = true;
+
+ testIMSI[i].mobileIdType = CNI_RIL3_IMSI;
+
+ testIMSI[i].numDigits = 15;
+
+ testIMSI[i].digits[0] = 3;
+ testIMSI[i].digits[1] = 1;
+ testIMSI[i].digits[2] = 0;
+ testIMSI[i].digits[3] = 1;
+ testIMSI[i].digits[4] = 7;
+ testIMSI[i].digits[5] = 0;
+ testIMSI[i].digits[6] = 1;
+ testIMSI[i].digits[7] = 0;
+ testIMSI[i].digits[8] = 7;
+ testIMSI[i].digits[9] = 5;
+ testIMSI[i].digits[10] = 9;
+ testIMSI[i].digits[11] = 9;
+ testIMSI[i].digits[12] = 9;
+ testIMSI[i].digits[13] = 9;
+ testIMSI[i].digits[14] = 2;
+}
+
+*/
+
+/*
+void readDialedNumberTable()
+{
+ short i = origSoftMobIndex;
+
+ testDialedNum[i].ie_present = true;
+ testDialedNum[i].numberType = CNI_RIL3_NUMBER_TYPE_NETWORK_SPECIFIC;
+ testDialedNum[i].numberingPlan = CNI_RIL3_NUMBERING_PLAN_PRIVATE;
+
+ testDialedNum[i].numDigits = 4;
+
+ testDialedNum[i].digits[0] = 2;
+ testDialedNum[i].digits[1] = 2;
+ testDialedNum[i].digits[2] = 0;
+ testDialedNum[i].digits[3] = 4;
+
+ i = termSoftMobIndex;
+
+ testDialedNum[i].digits[0] = 2;
+ testDialedNum[i].digits[1] = 2;
+ testDialedNum[i].digits[2] = 0;
+ testDialedNum[i].digits[3] = 5;
+
+ i = 4;
+
+ testDialedNum[i].digits[0] = 8;
+ testDialedNum[i].digits[1] = 8;
+ testDialedNum[i].digits[2] = 2;
+ testDialedNum[i].digits[3] = 4;
+
+ i = 5;
+
+ testDialedNum[i].digits[0] = 8;
+ testDialedNum[i].digits[1] = 8;
+ testDialedNum[i].digits[2] = 2;
+ testDialedNum[i].digits[3] = 5;
+
+ i = 6;
+
+ testDialedNum[i].digits[0] = 8;
+ testDialedNum[i].digits[1] = 8;
+ testDialedNum[i].digits[2] = 2;
+ testDialedNum[i].digits[3] = 6;
+
+
+}
+*/
+
+
+
diff --git a/data/mnet/GP10/Host/cc/test/closeLogFile b/data/mnet/GP10/Host/cc/test/closeLogFile
new file mode 100644
index 0000000..63a7158
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/test/closeLogFile
@@ -0,0 +1,5 @@
+# Force an update write on the log file.
+
+logFdDelete(logFile)
+
+close(logFile) \ No newline at end of file
diff --git a/data/mnet/GP10/Host/cc/test/disconnecTerm b/data/mnet/GP10/Host/cc/test/disconnecTerm
new file mode 100644
index 0000000..725990c
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/test/disconnecTerm
@@ -0,0 +1,18 @@
+#Disconnect Terminator
+
+# Disconnect to CC - T
+# Soft Mobile Index L1L2Prim PD Msg. Type
+fromMS(termSoftMobIndex, 4, 3, 0x25)
+
+
+# Release Complete to CC - T
+# Soft Mobile Index L1L2Prim PD Msg. Type
+fromMS(termSoftMobIndex, 4, 3, 0x2a)
+
+# Make sure that all resource data is back in idle state
+
+tmmPrint
+
+tccPrint
+
+irtDataPrint
diff --git a/data/mnet/GP10/Host/cc/test/disconnectOrig b/data/mnet/GP10/Host/cc/test/disconnectOrig
new file mode 100644
index 0000000..3d40dde
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/test/disconnectOrig
@@ -0,0 +1,17 @@
+#Disconnect Originator
+
+# Disconnect to CC - O
+# Soft Mobile Index L1L2Prim PD Msg. Type
+fromMS(origSoftMobIndex, 4, 3, 0x25)
+
+# Release Complete to CC - O
+# Soft Mobile Index L1L2Prim PD Msg. Type
+fromMS(origSoftMobIndex, 4, 3, 0x2a)
+
+# Make sure that all resource data is back in idle state
+
+tmmPrint
+
+tccPrint
+
+irtDataPrint
diff --git a/data/mnet/GP10/Host/cc/test/integ b/data/mnet/GP10/Host/cc/test/integ
new file mode 100644
index 0000000..0110837
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/test/integ
@@ -0,0 +1,101 @@
+#
+# load all the module-init files (with global variables)
+#
+ld < K:/Workdirs/integration/l1proxy/I80486/l1proxy_init.out
+ld < K:/Workdirs/integration/lapdm/I80486/lapdm_init.out
+ld < K:/Workdirs/integration/mm/I80486/mmm_init.out
+ld < K:/Workdirs/integration/cc/I80486/ccm_init.out
+ld < K:/Workdirs/integration/rm/I80486/rm_init.out
+
+#
+# load all the module-api files (used by other modules)
+#
+ld < K:/Workdirs/integration/lapdm/I80486/lapdm_api.out
+ld < K:/Workdirs/integration/rm/I80486/rm_api.out
+
+#
+# load all the core module files next
+#
+ld < K:/Workdirs/integration/l1proxy/I80486/l1proxy.out
+ld < K:/Workdirs/integration/lapdm/I80486/lapdm.out
+ld < K:/Workdirs/integration/ril3/I80486/ril3.out
+ld < K:/Workdirs/integration/jcc/I80486/jcc.out
+ld < K:/Workdirs/integration/mm/I80486/mmm.out
+ld < K:/Workdirs/integration/cc/I80486/ccm.out
+ld < K:/Workdirs/integration/cc/I80486/cc_test.out
+ld < K:/Workdirs/integration/rm/I80486/rm.out
+
+
+#
+# Initialization of all modules
+#
+CNI_LAPDM_Initialization
+
+#
+# Ready-to-send scheme: 1 means LAPDm will remember the RTS and will not require
+# L1 to send RTS all the times. 0 means use the standard way, L1 needs to send up
+# RTS all the times. LAPDm will not cache the RTS. 0 is the default.
+#
+cni_lapdm_enable_rts_caching = 1
+# cni_lapdm_enable_rts_caching = 0
+
+#cni_testInit
+
+#create a lapdm instance channel type 0, trx 0, channel num 1, link 1
+#CNI_LAPDM_Create_Instance(0, 0 , 0x2000, 0)
+#CNI_LAPDM_Create_Instance(0, 0 , 0x2800, 0)
+#CNI_LAPDM_Create_Instance(0, 0 , 0x3000, 0)
+#CNI_LAPDM_Create_Instance(0, 0 , 0x3800, 0)
+
+
+#L3 register a lapdm instance oid 0, sapi 0, layer3_id 10, and a call back function
+#CNI_LAPDM_Instance_Registration(0, 0, 0x20, cni_l3CallBack)
+#CNI_LAPDM_Instance_Registration(1, 0, 0x28, cni_l3CallBack)
+#CNI_LAPDM_Instance_Registration(2, 0, 0x30, cni_l3CallBack)
+#CNI_LAPDM_Instance_Registration(3, 0, 0x38, cni_l3CallBack)
+
+# MD debugging dump. 0 (disable) or 1 (enable)
+CNI_RIL3MD_EnableDebug = 0
+
+# Start MM Task and print its data
+mmInit
+mmDataPrint
+
+# Start CC Task and print its data
+ccInit
+ccDataPrint
+
+# Initialize the IRT Table
+CNI_RIL3_IRT_Init
+
+# Start RRM Task
+rm_Task
+
+# Start the Orig and Term Soft Mobiles
+# LUDB Index for Terminating Mobile
+origSoftMobStart(0 )
+termSoftMobStart()
+
+# load dsp coff file
+pBlkDev = ramDevCreate(0, 512, 2000, 2000, 0)
+dosFsMkfs("/RAM1", pBlkDev)
+pwd
+#copy " K:/Workdirs/integration/dsp/Dsp.out","/RAM1/Dsp.out"
+#copy "integration/dsp/hpitest.out","/RAM1/dsp.out"
+#
+initL1
+newInitDsp
+newGo
+
+# Send logs to a file under pre-alpha
+# open the log file
+logFile = open("K:/Workdirs/integration/Pre-Alpha/mmcc-log.txt", 2, 0)
+# Go to the end to append the new logs
+lseek(logFile, 0, 2)
+# Set the file as the new log file
+logFdSet(logFile)
+
+#
+i
+
+
diff --git a/data/mnet/GP10/Host/cc/test/kill b/data/mnet/GP10/Host/cc/test/kill
new file mode 100644
index 0000000..27a155e
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/test/kill
@@ -0,0 +1,37 @@
+td lapdm_phserver
+td lapdm_dlserver
+
+td mmMain
+td ccMain
+td OrigCall
+td TermCall
+td L1TaskUp
+td L1TaskDn
+td rmTask
+
+
+unld "l1proxy_init.out"
+
+unld "lapdm_init.out"
+unld "mmm_init.out"
+unld "ccm_init.out"
+unld "rm_init.out"
+
+unld "lapdm_api.out"
+unld "rm_api.out"
+
+unld "l1proxy.out"
+unld "lapdm.out"
+unld "ril3.out"
+unld "jcc.out"
+unld "mmm.out"
+unld "ccm.out"
+unld "cc_test.out"
+unld "rm.out"
+
+# Force an update write on the log file.
+
+logFdDelete(logFile)
+
+close(logFile)
+
diff --git a/data/mnet/GP10/Host/cc/test/makeOrigCall b/data/mnet/GP10/Host/cc/test/makeOrigCall
new file mode 100644
index 0000000..18471b3
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/test/makeOrigCall
@@ -0,0 +1,23 @@
+# LUDB Index for Terminating Mobile
+origSoftMobInit(1 )
+
+
+# CM Service Request to MM - O
+# Soft Mobile Index L1L2Prim PD Msg. Type
+fromMS(origSoftMobIndex, 1, 5, 0x24)
+
+# Setup to CC - O
+# Soft Mobile Index L1L2Prim PD Msg. Type
+fromMS(origSoftMobIndex, 4 , 3, 5)
+
+# Chann Assigned - O
+# IRT EntryId JCCL3Prim Msg. Type O/T
+fromRRtoCC(origSoftMobEntryId, 0, 2, origSoftMobIndex)
+
+# Connect Ack to CC - O
+# Soft Mobile Index L1L2Prim PD Msg. Type
+fromMS(origSoftMobIndex, 4, 3, 0x0f)
+
+
+
+
diff --git a/data/mnet/GP10/Host/cc/test/makeTermCall b/data/mnet/GP10/Host/cc/test/makeTermCall
new file mode 100644
index 0000000..20a48af
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/test/makeTermCall
@@ -0,0 +1,27 @@
+#
+termSoftMobInit()
+
+# Page Response - T
+# IRT EntryId JCCL3Prim Msg. Type
+fromRRtoMM(termSoftMobEntryId, 13, 11)
+
+
+# Call Confirmed to CC - T
+# Soft Mobile Index L1L2Prim PD Msg. Type
+fromMS(termSoftMobIndex, 4, 3, 0x08)
+
+# Chann Assigned - T
+# IRT EntryId JCCL3Prim Msg. Type O/T
+fromRRtoCC(termSoftMobEntryId, 0, 2, termSoftMobIndex)
+
+# Alerting to CC - T
+# Soft Mobile Index L1L2Prim PD Msg. Type
+fromMS(termSoftMobIndex, 4, 3, 0x01)
+
+# Connect to CC - T
+# Soft Mobile Index L1L2Prim PD Msg. Type
+fromMS(termSoftMobIndex, 4, 3, 0x07)
+
+
+
+
diff --git a/data/mnet/GP10/Host/cc/test/setLogFile b/data/mnet/GP10/Host/cc/test/setLogFile
new file mode 100644
index 0000000..65033a7
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/test/setLogFile
@@ -0,0 +1,8 @@
+# Send logs to a file under pre-alpha
+# open the log file
+logFile = open("K:/Workdirs/integration/Pre-Alpha/mmcc-log.txt", 2, 0)
+# Go to the end to append the new logs
+lseek(logFile, 0, 2)
+# Set the file as the new log file
+logFdSet(logFile)
+
diff --git a/data/mnet/GP10/Host/cc/test/test1.zip b/data/mnet/GP10/Host/cc/test/test1.zip
new file mode 100644
index 0000000..81cc547
--- /dev/null
+++ b/data/mnet/GP10/Host/cc/test/test1.zip
Binary files differ
diff --git a/data/mnet/GP10/Host/cdcUtils/Makefile b/data/mnet/GP10/Host/cdcUtils/Makefile
new file mode 100644
index 0000000..72afbdd
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/Makefile
@@ -0,0 +1,16 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= aux_port fpgaConfig cdcUtils clkInterface coff_loader drfInterface
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ $(CP) bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/cdcUtils/aux_port/Makefile b/data/mnet/GP10/Host/cdcUtils/aux_port/Makefile
new file mode 100644
index 0000000..d5832dd
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/aux_port/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = cdcUtils
+THIS_DIRECTORY = auxPort
+MY_OUTPUT = $(OBJDIR)\auxPort.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif
diff --git a/data/mnet/GP10/Host/cdcUtils/aux_port/auxPort.c b/data/mnet/GP10/Host/cdcUtils/aux_port/auxPort.c
new file mode 100644
index 0000000..2d4e5e9
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/aux_port/auxPort.c
@@ -0,0 +1,80 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+#include <vxWorks.h>
+#include <semLib.h>
+#include "cdcUtils/auxPort.h"
+
+/* external */
+extern int sysAuxPortAddr;
+
+/* global */
+
+/* file local */
+static int auxPortOutCopy;
+
+void auxPortInit()
+{
+ auxPortOutCopy = LED1_OFF | LED2_OFF | LED3_OFF | FAULT_LED_OFF |
+ RF1_EN | RF2_EN | RF_RESET_NOT |
+ DSPA_RST_NOT | DSPB_RST_NOT |
+ FPGA_DCLK | FPGA_DATA;
+ *(UINT*)sysAuxPortAddr = auxPortOutCopy;
+}
+
+
+/******************************************************************************
+auxPortOutSet - aux. port output set
+
+This routine provides a mechanism to set certain bits on the 'write only'
+auxillary output port.
+Set the given vaue at the auxillary output port.
+A bit mask is supplied to indicate which bits are to be set. A '1' in the mask
+indiactes that value for that bit position is to be set. A '0' means that the
+value for that bit position is unchanged.
+
+This routine provides a mechanism to set certain bits on the 'write only'
+auxillary output port. This fuction maintance a copy of the aux. output and
+provides mutual exclusion.
+
+This routine should be called to write to the auxillary output port. This is
+*/
+void auxPortOutSet
+(
+ int val, /* value to write to aux out port */
+ int mask /* bit mask with which to set the value */
+)
+{
+ int lock;
+
+
+/* semTake(auxPortSem, WAIT_FOREVER); */
+ taskLock();
+
+ lock = intLock(); /* lock interrupts */
+ /* This mechanism is used for mutual exclusion instead of using
+ a semaphore to avoid overhead to guard very small code */
+ auxPortOutCopy = (auxPortOutCopy & ~mask) | (val & mask); /* save the copy */
+ *(UINT*)sysAuxPortAddr = auxPortOutCopy; /* write to the port */
+ intUnlock(lock); /* unlock interrupts */
+
+/* semGive(auxPortSem); */
+ taskUnlock();
+
+
+}
+
+/******************************************************************************
+auxPortOutGet - aux Port Output Get
+
+Returns the value of aux. output port
+*/
+UINT auxPortOutGet()
+{
+ return auxPortOutCopy;
+}
+
diff --git a/data/mnet/GP10/Host/cdcUtils/cdcUtils/CPU_Mon.c b/data/mnet/GP10/Host/cdcUtils/cdcUtils/CPU_Mon.c
new file mode 100644
index 0000000..c4d1fa9
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/cdcUtils/CPU_Mon.c
@@ -0,0 +1,612 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/********************************************************************
+*
+* FILE NAME: CPU_Mon.c
+*
+* DESCRIPTION: This file contains routines for the DS1780.
+*
+* NOTES:
+*
+* VERSION: 1.0 10/06/99 14:45:15
+*
+* SCCS ID: "@(#)CPU_Mon.c"
+*
+********************************************************************/
+
+#include <vxWorks.h>
+#include "CDC_BSP/i2c.h"
+#include "cdcUtils/CPU_Mon_IF.h"
+
+/* if defined it will include test modules. */
+#define DS1780_TEST
+
+
+/************* Static Globals *****************/
+
+static UINT8 Chassis_Intrusion = 0x00;
+
+static UINT8 DS1780_ADDR = 0x2C;
+static int _1_CHAR = 0x01;
+
+static UINT8 CONFIG_REG = 0x40;
+static UINT8 INIT_REGS = 0x80;
+static UINT8 MONITOR_MODE = 0x01;
+
+static UINT8 INTR_STAT_1_REG = 0x41;
+static UINT8 INTR_1_STATUS_MASK = 0x1D;
+
+static UINT8 INTR_STAT_2_REG = 0x42;
+static UINT8 INTR_2_STATUS_MASK = 0x10;
+
+static UINT8 INTR_1_MASK_REG = 0x43;
+static UINT8 INTR_1_MASK = 0xC2;
+
+static UINT8 INTR_2_MASK_REG = 0x44;
+static UINT8 INTR_2_MASK = 0x03;
+
+static UINT8 CHASSIS_INTR_CLR_REG = 0x46;
+static UINT8 CLR_CHASSIS_INTR = 0x80;
+
+static UINT8 SER_ADDR_REG = 0x48;
+static UINT8 DEFAULT_ADDR = 0x2C;
+
+static UINT8 TEMP_CFG_REG = 0x4B;
+static UINT8 DISABLE_INTRS = 0x01;
+static UINT8 DEFAULT_INTR_MODE = 0x00;
+static UINT8 NINTH_TEMP_BIT = 0x80;
+
+static UINT8 _2_5_V_Thres_ID = 0x01;
+static UINT8 _1_7_VOLTS = 0x82;
+static UINT8 _2_0_VOLTS = 0x99;
+static UINT8 _3_3_V_Thres_ID = 0x02;
+static UINT8 _3_1_VOLTS = 0xB4;
+static UINT8 _3_5_VOLTS = 0xCB;
+static UINT8 _5_V_Thres_ID = 0x04;
+static UINT8 _4_75_VOLTS = 0xB6;
+static UINT8 _5_2_VOLTS = 0xC7;
+
+/***** Value RAM Definitions ******************/
+
+static UINT8 _2_5_V_READING_ADDR = 0x20;
+static UINT8 _3_3_V_READING_ADDR = 0x22;
+static UINT8 _5_V_READING_ADDR = 0x23;
+
+static UINT8 MSB_TEMP_READING_ADDR = 0x27;
+
+static UINT8 _2_5_HIGH_LIMIT_ADDR = 0x2B;
+static UINT8 _2_5_LOW_LIMIT_ADDR = 0x2C;
+static UINT8 _3_3_HIGH_LIMIT_ADDR = 0x2F;
+static UINT8 _3_3_LOW_LIMIT_ADDR = 0x30;
+static UINT8 _5_HIGH_LIMIT_ADDR = 0x31;
+static UINT8 _5_LOW_LIMIT_ADDR = 0x32;
+
+static UINT8 HOT_TEMP_HIGH_ADDR = 0x39;
+static UINT8 _0_DEGREES = 0x00;
+static UINT8 _45_DEGREES = 0x2D;
+static UINT8 HOT_TEMP_HYST_LOW_ADDR = 0x3A;
+
+static UINT8 CO_ID_NUMBER_ADDR = 0x3E;
+static UINT8 STEPPING_ID_ADDR = 0x3F;
+
+
+/********** Local Prototypes ******************/
+
+STATUS DS1780_Poll(void);
+STATUS DS1780_Init(void);
+STATUS DS1780_Intr_Setup(void);
+STATUS DS1780_Init_Thresholds(void);
+STATUS DS1780_Set_Voltage_Thresholds(UINT8 Threshold_ID, UINT8 High, UINT8 Low);
+STATUS DS1780_Set_Temp_Thresholds(UINT8 High, UINT8 Low);
+STATUS DS1780_I2C_Wr(unsigned char *outch, unsigned char devAddr,
+ unsigned char wAddr, int numChars);
+STATUS DS1780_I2C_Rd(unsigned char *outch, unsigned char devAddr,
+ unsigned char wAddr, int numChars);
+
+#ifdef DS1780_TEST
+
+STATUS DS1780_Rd_Regs(void);
+STATUS DS1780_Rd_Loc(unsigned char Addr);
+STATUS DS1780_Wr_Loc(unsigned char Addr, unsigned char Value);
+STATUS DS1780_Test_Read(void);
+
+#endif
+
+
+/*****************************************************************************
+ *
+ * Module Name: DS1780_Init
+ *
+ * Purpose: Initializes the DS1780 and sets it to its operating mode.
+ *
+ *****************************************************************************/
+
+STATUS DS1780_Init(void)
+{
+ STATUS Result;
+
+ Result = DS1780_I2C_Wr(&INIT_REGS, DS1780_ADDR, CONFIG_REG, _1_CHAR);
+
+ if ( Result == OK )
+ {
+ Result = DS1780_Intr_Setup();
+
+ if ( Result == OK )
+ {
+ Result = DS1780_Init_Thresholds();
+
+ if ( Result == OK )
+ {
+ Result = DS1780_I2C_Wr(&MONITOR_MODE, DS1780_ADDR,
+ CONFIG_REG, _1_CHAR);
+ }
+ }
+ }
+
+ return(Result);
+}
+
+
+/*****************************************************************************
+ *
+ * Module Name: DS1780_Poll
+ *
+ * Purpose: Routine to poll the status of the DS1780 measurements.
+ *
+ *****************************************************************************/
+
+STATUS DS1780_Poll(void)
+{
+ STATUS Result;
+ UINT8 Value;
+
+ Result = DS1780_I2C_Rd(&Value, DS1780_ADDR, INTR_STAT_1_REG, _1_CHAR);
+
+ if ( Result == OK )
+ {
+ if ( (Value & INTR_1_STATUS_MASK) != OK )
+ Result = ERROR;
+ else
+ {
+ Result = DS1780_I2C_Rd(&Value, DS1780_ADDR, INTR_STAT_2_REG, _1_CHAR);
+
+ if ( (Value & INTR_2_STATUS_MASK) != OK )
+ {
+ Chassis_Intrusion = INTR_2_STATUS_MASK;
+
+ Result = ERROR;
+ }
+ }
+ }
+
+ return(Result);
+}
+
+/*****************************************************************************
+ *
+ * Module Name: DS1780_Read
+ *
+ * Purpose: Reads the monitored values of the DS1780 Measurements.
+ *
+ *****************************************************************************/
+
+STATUS DS1780_Read(t_DS1780 *data)
+{
+ STATUS Result;
+ UINT8 Value;
+
+ Result = DS1780_I2C_Rd(&data->_2_5_V_Mon_Value, DS1780_ADDR, _2_5_V_READING_ADDR, _1_CHAR);
+
+ if ( Result == OK )
+ {
+ Result = DS1780_I2C_Rd(&data->_3_3_V_Mon_Value, DS1780_ADDR, _3_3_V_READING_ADDR, _1_CHAR);
+
+ if ( Result == OK )
+ {
+ Result = DS1780_I2C_Rd(&data->_5_V_Mon_Value, DS1780_ADDR, _5_V_READING_ADDR, _1_CHAR);
+
+ if ( Result == OK )
+ {
+ Result = DS1780_I2C_Rd(&data->Temp_Mon_Value, DS1780_ADDR, MSB_TEMP_READING_ADDR, _1_CHAR);
+
+ if ( Result == OK )
+ {
+ data->Chassis_Intrusion_Status = Chassis_Intrusion;
+ Chassis_Intrusion = OK;
+ }
+ }
+ }
+ }
+
+ return(Result);
+}
+
+
+/*****************************************************************************
+ *
+ * Module Name: DS1780_Intr_Setup
+ *
+ * Purpose: Initializes the DS1780 voltage and temperature thresholds.
+ *
+ *****************************************************************************/
+
+STATUS DS1780_Intr_Setup(void)
+{
+ STATUS Result;
+
+ Result = DS1780_I2C_Wr(&INTR_1_MASK, DS1780_ADDR, INTR_1_MASK_REG, _1_CHAR);
+
+ if ( Result == OK )
+ {
+ Result = DS1780_I2C_Wr(&INTR_2_MASK, DS1780_ADDR, INTR_2_MASK_REG, _1_CHAR);
+
+ if ( Result == OK )
+ Result = DS1780_I2C_Wr(&DEFAULT_INTR_MODE, DS1780_ADDR, TEMP_CFG_REG, _1_CHAR);
+ }
+
+ return(Result);
+}
+
+/*****************************************************************************
+ *
+ * Module Name: DS1780_Init_Thresholds
+ *
+ * Purpose: Initializes the DS1780 voltage and temperature thresholds.
+ *
+ *****************************************************************************/
+
+STATUS DS1780_Init_Thresholds(void)
+{
+ STATUS Result;
+
+ Result = DS1780_Set_Voltage_Thresholds(_2_5_V_Thres_ID, _2_0_VOLTS, _1_7_VOLTS);
+
+ if ( Result == OK )
+ {
+ Result = DS1780_Set_Voltage_Thresholds(_3_3_V_Thres_ID, _3_5_VOLTS, _3_1_VOLTS);
+
+ if ( Result == OK )
+
+ Result = DS1780_Set_Voltage_Thresholds(_5_V_Thres_ID, _5_2_VOLTS, _4_75_VOLTS);
+ }
+
+ if ( Result == OK )
+
+ Result = DS1780_Set_Temp_Thresholds( _45_DEGREES, _0_DEGREES);
+
+ return(Result);
+}
+
+/*****************************************************************************
+ *
+ * Module Name: DS1780_Set_Voltage_Thresholds
+ *
+ * Purpose: Sets the DS1780 voltage threshold.
+ *
+ *****************************************************************************/
+
+STATUS DS1780_Set_Voltage_Thresholds(UINT8 Threshold_ID, UINT8 High, UINT8 Low)
+{
+ STATUS Result = OK;
+ UINT8 wHiAddr, wLoAddr;
+
+ if ( Threshold_ID == _2_5_V_Thres_ID )
+ {
+ wHiAddr = _2_5_HIGH_LIMIT_ADDR;
+ wLoAddr = _2_5_LOW_LIMIT_ADDR;
+ }
+ else if ( Threshold_ID == _3_3_V_Thres_ID )
+ {
+ wHiAddr = _3_3_HIGH_LIMIT_ADDR;
+ wLoAddr = _3_3_LOW_LIMIT_ADDR;
+ }
+ else if ( Threshold_ID == _5_V_Thres_ID )
+ {
+ wHiAddr = _5_HIGH_LIMIT_ADDR;
+ wLoAddr = _5_LOW_LIMIT_ADDR;
+ }
+ else
+ Result = ERROR;
+
+
+ if ( Result == OK )
+ {
+ Result = DS1780_I2C_Wr( &High, DS1780_ADDR, wHiAddr, _1_CHAR );
+
+ if ( Result == OK )
+
+ Result = DS1780_I2C_Wr( &Low, DS1780_ADDR, wLoAddr, _1_CHAR );
+ }
+
+ return(Result);
+}
+
+
+/*****************************************************************************
+ *
+ * Module Name: DS1780_Set_Temp_Thresholds
+ *
+ * Purpose: Sets the DS1780 temperature thresholds.
+ *
+ *****************************************************************************/
+
+STATUS DS1780_Set_Temp_Thresholds(UINT8 High, UINT8 Low)
+{
+ STATUS Result;
+
+ Result = DS1780_I2C_Wr( &High, DS1780_ADDR, HOT_TEMP_HIGH_ADDR, _1_CHAR );
+
+ if ( Result == OK )
+
+ Result = DS1780_I2C_Wr( &Low, DS1780_ADDR, HOT_TEMP_HYST_LOW_ADDR, _1_CHAR );
+
+ return(Result);
+
+}
+
+
+/*****************************************************************************
+ *
+ * Module Name: DS1780_Read_Company_Id
+ *
+ * Purpose: Reads the DS1780 Company I.D. value.
+ *
+ *****************************************************************************/
+
+STATUS DS1780_Read_Company_Id(unsigned char *outch)
+{
+ STATUS Result;
+
+ Result = DS1780_I2C_Rd(outch, DS1780_ADDR, CO_ID_NUMBER_ADDR, _1_CHAR);
+
+ return(Result);
+}
+
+/*****************************************************************************
+ *
+ * Module Name: DS1780_Stepping_Id
+ *
+ * Purpose: Reads the DS1780 Stepping I.D. value.
+ *
+ *****************************************************************************/
+
+STATUS DS1780_Stepping_Id(unsigned char *outch)
+{
+ STATUS Result;
+
+ Result = DS1780_I2C_Rd(outch, DS1780_ADDR, STEPPING_ID_ADDR, _1_CHAR);
+
+ return(Result);
+}
+
+
+/*****************************************************************************
+ *
+ * Module Name: DS1780_I2C_Rd
+ *
+ * Purpose: Reads data from the DS1780 via I2C bus.
+ *
+ *****************************************************************************/
+
+STATUS DS1780_I2C_Rd(unsigned char *outch, unsigned char devAddr,
+ unsigned char wAddr, int numChars)
+{
+ STATUS Results;
+ int i;
+
+ I2Coperation(ON);
+
+ for (i = 0, Results = ERROR; (i < 10) && (Results == ERROR); i++)
+ { /* if error try muliple times since I2Cread can fail occasionally */
+ Results = I2Cread(outch, devAddr, wAddr, numChars);
+ taskDelay(2);
+ }
+
+ I2Coperation(OFF);
+
+ return(Results);
+}
+
+
+/*****************************************************************************
+ *
+ * Module Name: DS1780_I2C_Wr
+ *
+ * Purpose: Writes data to the DS1780 via I2C bus.
+ *
+ *****************************************************************************/
+
+STATUS DS1780_I2C_Wr(unsigned char *outch, unsigned char devAddr,
+ unsigned char wAddr, int numChars)
+{
+ STATUS Results;
+
+ I2Coperation(ON);
+
+ Results = I2Cwrite(outch, devAddr, wAddr, numChars);
+
+ I2Coperation(OFF);
+
+ return(Results);
+}
+
+
+/*****************************************************************************
+ *
+ * T E S T C O D E
+ *
+ *****************************************************************************/
+
+#ifdef DS1780_TEST
+
+/*****************************************************************************
+ *
+ * Module Name: DS1780_Rd_Regs
+ *
+ * Purpose: Test Module to read the DS1780 registers.
+ *
+ *****************************************************************************/
+
+STATUS DS1780_Rd_Regs(void)
+{
+ STATUS Result;
+ unsigned char Value;
+
+ Result = DS1780_I2C_Rd(&Value, DS1780_ADDR, CONFIG_REG, _1_CHAR);
+ printf("CONFIG_REG = %d\n", Value);
+
+ Result = DS1780_I2C_Rd(&Value, DS1780_ADDR, INTR_STAT_1_REG, _1_CHAR);
+ printf("INTR_STAT_1_REG = %d\n", Value);
+
+ Result = DS1780_I2C_Rd(&Value, DS1780_ADDR, INTR_STAT_2_REG, _1_CHAR);
+ printf("INTR_STAT_2_REG = %d\n", Value);
+
+ Result = DS1780_I2C_Rd(&Value, DS1780_ADDR, INTR_1_MASK_REG, _1_CHAR);
+ printf("INTR_1_MASK_REG = %d\n", Value);
+
+ Result = DS1780_I2C_Rd(&Value, DS1780_ADDR, INTR_2_MASK_REG, _1_CHAR);
+ printf("INTR_2_MASK_REG = %d\n", Value);
+
+ return(Result);
+}
+
+/*****************************************************************************
+ *
+ * Module Name: DS1780_Rd_Loc
+ *
+ * Purpose: Test Module to read the DS1780 memory locations.
+ *
+ *****************************************************************************/
+
+STATUS DS1780_Rd_Loc(unsigned char Addr)
+{
+ STATUS Result;
+ unsigned char Value;
+
+ Result = DS1780_I2C_Rd(&Value, DS1780_ADDR, Addr, _1_CHAR);
+
+ printf("Value = %d\n", Value);
+
+ return(Result);
+}
+
+/*****************************************************************************
+ *
+ * Module Name: DS1780_Wr_Loc
+ *
+ * Purpose: Test Module to write the DS1780 locations.
+ *
+ *****************************************************************************/
+
+STATUS DS1780_Wr_Loc(unsigned char Addr, unsigned char Value)
+{
+ STATUS Result;
+
+ Result = DS1780_I2C_Wr(&Value, DS1780_ADDR, Addr, _1_CHAR);
+
+ return(Result);
+}
+
+
+/*****************************************************************************
+ *
+ * Module Name: DS1780_get1_8_V
+ *
+ * Purpose: Returns 1.8 Voltage status
+ *
+ *****************************************************************************/
+
+float DS1780_get1_8_V(void)
+{
+ t_DS1780 data;
+
+ DS1780_Read(&data);
+
+ return (float)((2.5 * (float)data._2_5_V_Mon_Value)/192);
+}
+/*****************************************************************************
+ *
+ * Module Name: DS1780_get3_3_V
+ *
+ * Purpose: Returns 3.3 Voltage status.
+ *
+ *****************************************************************************/
+
+float DS1780_get3_3_V(void)
+{
+ t_DS1780 data;
+
+ DS1780_Read(&data);
+
+ return (float)((3.3 * (float)data._3_3_V_Mon_Value)/192);
+}
+/*****************************************************************************
+ *
+ * Module Name: DS1780_get5_0_V
+ *
+ * Purpose: returns 5 voltage status
+ *
+ *****************************************************************************/
+
+float DS1780_get5_0_V(void)
+{
+ t_DS1780 data;
+ DS1780_Read(&data);
+
+ return (float)((5.0 * (float)data._5_V_Mon_Value)/192);
+}
+
+/*****************************************************************************
+ *
+ * Module Name: DS1780_getCdcTemp
+ *
+ * Purpose: return cdc temperature.
+ *
+ *****************************************************************************/
+
+int DS1780_getCdcTemp(void)
+{
+ t_DS1780 data;
+
+ DS1780_Read(&data);
+
+ return data.Temp_Mon_Value;
+}
+
+/*****************************************************************************
+ *
+ * Module Name: DS1780_Test_Read
+ *
+ * Purpose: Test the DS1780_Read Module.
+ *
+ *****************************************************************************/
+
+STATUS DS1780_Test_Read(void)
+{
+ STATUS Results;
+ t_DS1780 data;
+
+ Results = DS1780_Read(&data);
+
+ printf("2.5_V_Mon_Value = %d", data._2_5_V_Mon_Value);
+ printf(" = %f volts\n", ((2.5 * (float)data._2_5_V_Mon_Value)/192));
+
+ printf("3.3_V_Mon_Value = %d", data._3_3_V_Mon_Value);
+ printf(" = %f volts\n", ((3.3 * (float)data._3_3_V_Mon_Value)/192));
+
+ printf("5 V_Mon_Value = %d", data._5_V_Mon_Value);
+ printf(" = %f volts\n", ((5 * (float)data._5_V_Mon_Value)/192));
+
+ printf("Temp_Mon_Value = %d degrees C\n", data.Temp_Mon_Value);
+
+ printf("Chassis_Intrusion_Status = %d\n", data.Chassis_Intrusion_Status);
+
+ return(Results);
+}
+
+#endif
diff --git a/data/mnet/GP10/Host/cdcUtils/cdcUtils/Makefile b/data/mnet/GP10/Host/cdcUtils/cdcUtils/Makefile
new file mode 100644
index 0000000..6397397
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/cdcUtils/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = cdcUtils
+THIS_DIRECTORY = cdcUtils
+MY_OUTPUT = $(OBJDIR)\cdcUtils.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif
diff --git a/data/mnet/GP10/Host/cdcUtils/cdcUtils/cdcUtils.c b/data/mnet/GP10/Host/cdcUtils/cdcUtils/cdcUtils.c
new file mode 100644
index 0000000..65105f2
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/cdcUtils/cdcUtils.c
@@ -0,0 +1,617 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+#include "vxWorks.h"
+#include "stdio.h"
+#include "cdc_bsp\nvRam.h"
+#include "cdcUtils\auxPort.h"
+#include "l1proxy\l1proxy.h"
+#include "mch\MCHDefs.h"
+
+#define CDC_SERNUM_SIZE MAX_CDC_SN /* cdc serial number size */
+
+/*--------- externals ---------*/
+extern char ds2401[8]; /* global 8 byte buffer */
+extern int ds2401CRC; /* calculated checksum */
+void oamHwInfoPopulate();
+extern STATUS I2Cwrite(unsigned char*, unsigned char, unsigned char, int);
+extern STATUS I2Cread(unsigned char*, unsigned char, unsigned char, int);
+extern void I2Coperation(int);
+
+#define ON 1
+#define OFF 0
+
+
+/*---------- globals ----------*/
+char cdcSerialNum[CDC_SERNUM_SIZE + 1] = "????";
+char cdcMacAddrStr[12 + 1];
+int radioBoardVerifyEepromOn = 1;
+
+void cdcBootromVerInfo(void);
+char *cdcGetBootromVersion(void);
+int cdcVerifyBootromCheckSum(void);
+char *cdcBootromVerDate(void);
+int cdcGetBootromCheckSum(void);
+int cdcCalCheckSum(unsigned char *loc, int number);
+
+/*******************************************************************************
+cdcLed1On - LED 1 On
+Turn LED 1 on
+*/
+void cdcLed1On()
+{
+ auxPortOutSet(~LED1_OFF, LED1_OFF);
+}
+
+
+/*******************************************************************************
+cdcLed1Off - LED 1 Off
+Turn LED 1 off
+*/
+void cdcLed1Off()
+{
+ auxPortOutSet(LED1_OFF, LED1_OFF);
+}
+
+
+/*******************************************************************************
+cdcLed2On - LED 2 On
+Turn LED 2 on
+*/
+void cdcLed2On()
+{
+ auxPortOutSet(~LED2_OFF, LED2_OFF);
+}
+
+
+/*******************************************************************************
+cdcLed2Off - LED 2 Off
+Turn LED 2 off
+*/
+void cdcLed2Off()
+{
+ auxPortOutSet(LED2_OFF, LED2_OFF);
+}
+
+
+/*******************************************************************************
+cdcLed3On - LED 3 On
+Turn LED 3 on
+*/
+void cdcLed3On()
+{
+ auxPortOutSet(~LED3_OFF, LED3_OFF);
+}
+
+
+/*******************************************************************************
+cdcLed3Off - LED 3 Off
+Turn LED 3 off
+*/
+void cdcLed3Off()
+{
+ auxPortOutSet(LED3_OFF, LED3_OFF);
+}
+
+
+/*******************************************************************************
+cdcFaultLedOn - Fault LED On
+Turn Fault LED on
+*/
+void cdcLed4On()
+{
+ auxPortOutSet(~FAULT_LED_OFF, FAULT_LED_OFF);
+}
+
+
+/*******************************************************************************
+cdcFaultLedOff - Fault LED Off
+Turn Fault LED off
+*/
+void cdcLed4Off()
+{
+ auxPortOutSet(FAULT_LED_OFF, FAULT_LED_OFF);
+}
+
+
+/*******************************************************************************
+cdcLed5On - LED 5 On
+Turn LED 5 on
+*/
+void cdcLed5On()
+{
+ auxPortOutSet(LED5_ON, LED5_ON);
+}
+
+
+/*******************************************************************************
+cdcLed5Off - LED 5 Off
+Turn LED 5 off
+*/
+void cdcLed5Off()
+{
+ auxPortOutSet(~LED5_ON, LED5_ON);
+}
+
+
+/*******************************************************************************
+cdcPowerOff - CDC Power Off
+Turn off Power to CDC
+*/
+void cdcPowerOff()
+{
+ auxPortOutSet(CDC_POWER_OFF, CDC_POWER_OFF);
+}
+
+
+/*******************************************************************************
+cdcSerialNumGet - CDC Serial Number Get
+
+*/
+void cdcSerialNumGet()
+{
+ cdcSerialNum[CDC_SERNUM_SIZE] = 0;
+ if (sysCDCSerialNumGet(cdcSerialNum) != OK)
+ {
+ cdcSerialNum[0] = 'x';
+ cdcSerialNum[1] = 'x';
+ cdcSerialNum[2] = 'x';
+ cdcSerialNum[3] = 'x';
+ cdcSerialNum[4] = 0;
+ }
+}
+
+/*******************************************************************************
+cdcSerialNumReturn - CDC Serial Number Return
+
+*/
+char* cdcSerialNumReturn()
+{
+ return cdcSerialNum;
+}
+
+
+/*******************************************************************************
+cdcSerialNumPrint - CDC Serial Number Print
+
+*/
+void cdcSerialNumPrint()
+{
+ printf("CDC Serial Number: %s\n", cdcSerialNum);
+}
+
+
+/*******************************************************************************
+cdcMacAddrGet - CDC MAC Address Get
+
+*/
+char* cdcMacAddrGet()
+{
+ char macAddr[6];
+ int i;
+
+ taskDelay(10);
+ sysEnetAddrGet(0, macAddr);
+ taskDelay(10);
+ for (i = 0; i < 6; i++)
+ {
+ sprintf(&cdcMacAddrStr[i * 2], "%02X", macAddr[6 - 1 - i]);
+ }
+ cdcMacAddrStr[12] = 0;
+
+ return cdcMacAddrStr;
+}
+
+/*******************************************************************************
+dspReset
+
+reset DSPs
+*/
+void dspReset(void)
+{
+ /* put DSPs in reset */
+ auxPortOutSet(~(DSPA_RST_NOT|DSPB_RST_NOT), DSPA_RST_NOT|DSPB_RST_NOT);
+ /* delay 1.0 s */
+ taskDelay((int)(1.0 * sysClkRateGet()));
+ /* bring DSPs out of reset */
+ auxPortOutSet((DSPA_RST_NOT|DSPB_RST_NOT), DSPA_RST_NOT|DSPB_RST_NOT);
+}
+
+
+/*******************************************************************************
+cdcInit
+
+Initialize CDC board
+*/
+STATUS cdcInit(const char* fpgaFile, const char *base_prefix)
+{
+ char fName[256];
+ STATUS retVal = OK;
+
+ strcpy(fName, base_prefix);
+ strcat(fName, "/");
+ strcat(fName, fpgaFile);
+
+ auxPortInit(); /* Initilalize auxillary output port */
+ cdcSerialNumGet(); /* Get CDC serial Number */
+
+ printf("Resetting DSPs\n");
+ dspReset();
+
+ printf("Configuring FPGAs\n");
+ if ((fpgaConfig(fName)) != 0)
+ {
+ printf("FPGA configuration failed\n");
+ retVal = ERROR;
+ }
+
+ if (radioBoardVerifyEepromOn)
+ {
+ printf("Validating Radio Board EEPROM\n");
+ if ((VerifyRadioBoardEeprom() != OK))
+ {
+ printf("Radio Board EEPROM valication failed!\n");
+ }
+ }
+ else
+ {
+ printf("Radio Board EEPROM will NOT be validated\n");
+ }
+
+ printf("Initializing Dual RF module\n");
+ if ((drfInit()) != OK)
+ {
+ printf("RF module initialization failed\n");
+ retVal = ERROR;
+ }
+
+ printf("Initializing Clock module\n");
+ if ((clkInit()) != OK)
+ {
+ printf("Clock module initialization failed\n");
+ retVal = ERROR;
+ }
+
+ cdcLed5On(); /* Turn on LED 5 */
+
+ /* Initialize MIB hardware parameters */
+ oamHwInfoPopulate();
+
+ return retVal;
+}
+
+
+/*******************************************************************************
+cdcTestInit
+
+Initialize CDC board for Board Testing
+*/
+STATUS cdcTestInit(const char* fpgaFile, const char *base_prefix)
+{
+ char fName[256];
+ STATUS retVal = OK;
+
+ strcpy(fName, base_prefix);
+ strcat(fName, "/");
+ strcat(fName, fpgaFile);
+
+ auxPortInit(); /* Initilalize auxillary output port */
+ cdcSerialNumGet(); /* Get CDC serial Number */
+
+ printf("Configuring FPGAs\n");
+ if ((fpgaConfig(fName)) != 0)
+ {
+ printf("FPGA configuration failed\n");
+ retVal = ERROR;
+ }
+
+ cdcLed5On(); /* Turn on LED 5 */
+
+ return retVal;
+}
+
+/*******************************************************************************
+cdcBootromVerInfo
+
+Sends Bootrom version information to standard I/O.
+*/
+void cdcBootromVerInfo(void)
+{
+ char *chPtr;
+
+ chPtr = (char *)0x20000020;
+ printf("Bootrom %s\n", chPtr);
+
+ chPtr = (char *)0x20000000;
+ printf("Bootrom Date: %s\n", chPtr);
+}
+
+
+/*******************************************************************************
+cdcBootromVerInfo
+
+Returns Bootrom version.
+*/
+char *cdcGetBootromVersion(void)
+{
+ char *chPtr;
+
+ chPtr = (char *)0x20000020;
+ return(chPtr);
+}
+
+/*******************************************************************************
+IsCorrectCdcBootromVer
+
+Returns OK if bootrom version info 1st character = 'V'
+*/
+int IsCorrectCdcBootromVer(void)
+{
+ char *chPtr;
+
+ chPtr = cdcGetBootromVersion();
+
+ if ( *chPtr != 'V' )
+ return ERROR;
+ else
+ return OK;
+}
+
+/*******************************************************************************
+cdcBootromVerDate
+
+Returns Bootrom version date.
+*/
+char *cdcBootromVerDate(void)
+{
+ char *chPtr;
+
+ chPtr = (char *)0x20000000;
+ return(chPtr);
+}
+
+
+/*******************************************************************************
+cdcVerifyBootromCheckSum
+
+Verifies checksum for bootrom memory locations.
+
+RETURNS: OK = Valid Bootrom ERROR = Bootrom is corrupted or wrong version
+*/
+int cdcVerifyBootromCheckSum(void)
+{
+ int checksum;
+ int fileCheckSum;
+ unsigned char *pfileCheckSum;
+ unsigned char cfilesum[5];
+ int result;
+
+ if ( IsCorrectCdcBootromVer() == OK )
+ {
+ pfileCheckSum = (unsigned char *)0x20000060;
+ strcpy(cfilesum,pfileCheckSum);
+ sscanf(cfilesum, "%x", &fileCheckSum);
+ checksum = cdcGetBootromCheckSum();
+
+ if ( fileCheckSum == checksum )
+ {
+ result = OK;
+ printf("Bootrom CheckSum is valid\n");
+ }
+ else
+ {
+ printf("Bootrom CheckSum Verify FAILED !!\n");
+ result = ERROR;
+ }
+ }
+ else
+ {
+ printf("Bootrom CheckSum Verify FAILED\n");
+ printf("No CheckSum info in header, wrong bootrom version !!\n");
+ result = ERROR;
+ }
+
+ return(result);
+}
+
+
+/*******************************************************************************
+cdcGetBootromCheckSum
+
+Calculates checksum for bootrom memory locations if the bootrom version is valid.
+*/
+int cdcGetBootromCheckSum(void)
+{
+ int checksum = 0;
+ int databytes = 0;
+ unsigned char *pDataBytes;
+
+ if ( IsCorrectCdcBootromVer() == OK )
+ {
+ pDataBytes = (unsigned char *)0x20000064;
+
+ sscanf((char *)pDataBytes, "%d", &databytes);
+
+ checksum = cdcCalCheckSum((unsigned char *)0x20000100, databytes);
+ }
+ return(checksum);
+}
+
+
+/*******************************************************************************
+cdcCalCheckSum
+
+Calculates checksum for consecutive memory locations.
+*/
+int cdcCalCheckSum(unsigned char *loc, int number)
+{
+ int i;
+ int calcChkSum = 0;
+
+ for (i = 0; i < number; i++)
+ {
+ calcChkSum += loc[i];
+ }
+
+ calcChkSum = (~calcChkSum) & 0xff;
+
+ printf("Checksum = %02x\n", calcChkSum);
+
+ return(calcChkSum);
+}
+
+
+
+
+/*****************************************************************************
+ *
+ * Module Name: SaveEepromInNVRam
+ *
+ * Purpose: Read EEPROM from the radio board and store in NVRam.
+ *
+ *****************************************************************************/
+STATUS SaveEepromInNVRam(void)
+{
+ STATUS status;
+ unsigned char buf[RADIO_BOARD_EEPROM_SIZE];
+ int i2cRetryCount;
+
+ i2cRetryCount = 3;
+ do
+ {
+ I2Coperation(ON);
+ status = I2Cread(buf, 0x52, 0, RADIO_BOARD_EEPROM_SIZE/2);
+ I2Coperation(OFF);
+ } while ((status != OK) && (--i2cRetryCount > 0));
+
+ if (status == OK)
+ {
+ i2cRetryCount = 3;
+ do
+ {
+ I2Coperation(ON);
+ status = I2Cread(buf+RADIO_BOARD_EEPROM_SIZE/2, 0x53, 0, RADIO_BOARD_EEPROM_SIZE/2);
+ I2Coperation(OFF);
+ } while ((status != OK) && (--i2cRetryCount > 0));
+ }
+
+ if (status == OK)
+ {
+ status = sysRadioBoardEepromSet((char *)buf);
+ }
+ return(status);
+}
+
+
+/*****************************************************************************
+ *
+ * Module Name: RestoreEepromFromNVRam
+ *
+ * Purpose: Read saved EEPROM from NVRam. If it does not match the current
+ * EEPROM values then write the NVRam version to the radio board.
+ *
+ *****************************************************************************/
+STATUS RestoreEepromFromNVRam(void)
+{
+ STATUS status;
+ unsigned char nvRamEeprom[RADIO_BOARD_EEPROM_SIZE];
+ unsigned char radioBoardEeprom[RADIO_BOARD_EEPROM_SIZE];
+ int i2cRetryCount, i;
+
+ /* Read in the EEPROM table stored in NNRam */
+ status = sysRadioBoardEepromGet((char *)nvRamEeprom);
+
+ /* Read in the Radio Board EEPROM */
+ i2cRetryCount = 3;
+ do
+ {
+ I2Coperation(ON);
+ status = I2Cread(radioBoardEeprom, 0x52, 0, RADIO_BOARD_EEPROM_SIZE/2);
+ I2Coperation(OFF);
+ } while ((status != OK) && (--i2cRetryCount > 0));
+
+ if (status == OK)
+ {
+ i2cRetryCount = 3;
+ do
+ {
+ I2Coperation(ON);
+ status = I2Cread(radioBoardEeprom+RADIO_BOARD_EEPROM_SIZE/2, 0x53, 0, RADIO_BOARD_EEPROM_SIZE/2);
+ I2Coperation(OFF);
+ } while ((status != OK) && (--i2cRetryCount > 0));
+ }
+
+ if (status == OK)
+ {
+ /* Check NVRam version against Radio Board version */
+ for (i = 0; i < RADIO_BOARD_EEPROM_SIZE; i++)
+ {
+ /* If any errors are found then write out the NVRam version */
+ if (nvRamEeprom[i] != radioBoardEeprom[i])
+ {
+ printf("Radio Board EEPROM does not match NV Ram!\n"
+ "Radio Board EEPROM will be updated to match NV Ram!\n");
+ I2Coperation(ON);
+ for ( i=0; i<RADIO_BOARD_EEPROM_SIZE/2; i++ )
+ {
+ i2cRetryCount = 3;
+ do
+ {
+ status = I2Cwrite(nvRamEeprom+i, 0x52, (unsigned char)i, 1);
+ taskDelay(2); /* Limit how fast the EEPROM gets the bytes */
+ } while ((status != OK) && (--i2cRetryCount > 0));
+ }
+ for ( i=RADIO_BOARD_EEPROM_SIZE/2; i<RADIO_BOARD_EEPROM_SIZE; i++ )
+ {
+ i2cRetryCount = 3;
+ do
+ {
+ status = I2Cwrite(nvRamEeprom+i, 0x53, (unsigned char)i, 1);
+ taskDelay(2); /* Limit how fast the EEPROM gets the bytes */
+ } while ((status != OK) && (--i2cRetryCount > 0));
+ }
+
+ I2Coperation(OFF);
+ break;
+ }
+ }
+ }
+
+ return(status);
+}
+
+
+
+/*******************************************************************************
+VerifyRadioBoardEeprom
+
+*/
+
+int VerifyRadioBoardEeprom()
+{
+ int status;
+ /* If there is a valid saved Radio EEPROM in NvRam then
+ restore that on the radio board. */
+ if (sysIsRadioBoardEepromSet())
+ {
+ if ((status = RestoreEepromFromNVRam()) != OK)
+ {
+ printf("WARNING - Unable to restore Radio Board EEPROM!\n");
+ }
+ }
+ /* Otherwise we have to assume the EEPROM is ok so we will
+ move it into NvRam. */
+ else
+ {
+ printf("Saving Radio Board EEPROM into NV Ram!\n");
+ if ((status = SaveEepromInNVRam()) != OK)
+ {
+ printf("WARNING - Unable to save Radio Board EEPROM!\n");
+ }
+ }
+ return(status);
+}
diff --git a/data/mnet/GP10/Host/cdcUtils/cdcUtils/oamHwInfoSet.c b/data/mnet/GP10/Host/cdcUtils/cdcUtils/oamHwInfoSet.c
new file mode 100644
index 0000000..29ad02d
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/cdcUtils/oamHwInfoSet.c
@@ -0,0 +1,189 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/********************************************************************
+*
+* FILE NAME: oamHwInfoSet.c
+*
+* DESCRIPTION: This file contains routine to populate hardware
+* information to the MIB.
+* COMPONENTS:
+*
+*
+* NOTES:
+*
+* REVISION HISTORY
+*__________________________________________________________________
+*----------+--------+----------------------------------------------
+* Name | Date | Reason
+*----------+--------+----------------------------------------------
+* Bhawani |02/15/00| Initial Draft
+* Bhawani |05/11/00| Added ViperCell Serial Number initializaion
+* Bhawani |08/09/00| Added Default Router Initialization part
+* Bhawani |03/09/01| Change MIB tag for the default Gateway
+*----------+--------+----------------------------------------------
+********************************************************************
+*/
+
+#include "stdio.h"
+#include "vxWorks.h"
+#include "cdcUtils/auxPort.h"
+
+#include "oam_api.h"
+#include "cdcUtils/cdcUtils.h"
+#include "cdcUtils/drfInterface.h"
+#include "clkInterface.h"
+#include "cdc_bsp/nvRam.h"
+
+/* Used temporarily to circumvent OAM API restriction */
+#define MY_MODULE_ID MODULE_OAM
+
+STATUS cdcSetMibStr(MibTag tag, char *pszValue)
+{
+ STATUS status = ERROR;
+
+
+ if (pszValue)
+ {
+ int nLen = strlen(pszValue) + 1;
+#ifdef _DEBUG
+ printf("Setting %s = %s\n", snmp_tagName(tag), pszValue);
+#endif
+
+ if( oam_setMibByteAry(MY_MODULE_ID, tag, pszValue, nLen) != STATUS_OK)
+ {
+ printf("oam_setMibByteAry failure (tag = %s, value = %s)\n", snmp_tagName(tag), pszValue);
+ } else {
+ status = OK;
+ }
+ }
+ return status;
+}
+
+
+STATUS cdcSetMibInt(MibTag tag, int iValue)
+{
+ STATUS status = ERROR;
+
+#ifdef _DEBUG
+ printf("Setting %s = %d\n", snmp_tagName(tag), iValue);
+#endif
+
+ if( oam_setMibIntVar(MY_MODULE_ID, tag, iValue) != STATUS_OK)
+ {
+ printf("oam_setMibIntVal failure (tag = %s, value = %d)\n", snmp_tagName(tag), iValue);
+ } else {
+ status = OK;
+ }
+ return status;
+}
+
+
+char *cdcCvtIp2Str(unsigned long ip)
+{
+ static char buf[16];
+ unsigned char *pIp = (unsigned char *) &ip;
+ sprintf(buf, "%u.%u.%u.%u", pIp[0], pIp[1], pIp[2], pIp[3]);
+ return buf;
+}
+
+
+void oamHwInfoPopulate()
+{
+ int dulaTrxStatus;
+ STATUS status;
+ int drfType = drfTypeGet();
+ int pwrClass = drfType+1;
+ char pszSerialNumber[MAX_VC_SN+1];
+ unsigned long ip;
+ char *pszIP;
+
+ /* initialize 1780 */
+ DS1780_Init();
+
+ /* Set GSM DCS indicator */
+ cdcSetMibInt(MIB_gsmdcsIndicator, drfType);
+ cdcSetMibInt(MIB_powerClass_0, pwrClass);
+ cdcSetMibInt(MIB_powerClass_1, pwrClass);
+
+ /* Cdc board inititializaiton */
+
+ /* Serial Number */
+ cdcSetMibStr(MIB_cdcBoardSerialNumber, cdcSerialNumReturn());
+
+ /* Mac Address */
+ cdcSetMibStr(MIB_cdcBoardMACAddress, cdcMacAddrGet());
+
+
+ /* Dual Trx */
+
+ /* Serial Number */
+ cdcSetMibStr(MIB_trxSerialNumber, drfSerialNumReturn());
+
+ /*Version Number */
+ cdcSetMibStr(MIB_trxSoftwareVersion, drfVersionReturn());
+
+ /* Get Status */
+
+ if ((status = drfStatGet(&dulaTrxStatus)) != OK)
+ {
+ printf("drfStatusGet failure (status = %d)\n", status);
+ } else {
+
+ /* Set the PLL Lock Status */
+ cdcSetMibInt(MIB_monitorReceiverPLL_LockDetectStatus, (dulaTrxStatus & 0x00000004)==0?0:1);
+ cdcSetMibInt(MIB_referenceFrequencyPLL_LockDetectStatus, (dulaTrxStatus & 0x00000008)==0?0:1);
+ cdcSetMibInt(MIB_transceiver_1_PLL_LockDetectStatus, (dulaTrxStatus & 0x00000010)==0?0:1);
+ cdcSetMibInt(MIB_transceiver_2A_PLL_LockDetectStatus, (dulaTrxStatus & 0x00000020)==0?0:1);
+ cdcSetMibInt(MIB_transceiver_2B_PLL_LockDetectStatus, (dulaTrxStatus & 0x00000040)==0?0:1);
+ cdcSetMibInt(MIB_intermediateFrequency_LockDetectStatus, (dulaTrxStatus & 0x00000080)==0?0:1);
+
+ /* Memory Status */
+ cdcSetMibInt(MIB_trxLoopBackMode, (dulaTrxStatus &0x00004000));
+
+ /* FPGA Syncronization */
+ cdcSetMibInt(MIB_gpsCardStatus, (dulaTrxStatus & 0x00002000));
+ }
+
+ /* Clock card */
+
+ /* Serial Number */
+ cdcSetMibStr(MIB_clockCardCrystalUpTime, clkSerialNumReturn());
+
+ /* Version Number */
+ cdcSetMibStr(MIB_clockCardSoftwareVersion, clkSoftVersionReturn());
+
+ /* Alarm Status */
+ cdcSetMibInt(MIB_clockCardStatus, clkStatGet());
+
+
+ /* Days Since Tuneup: */
+ cdcSetMibInt(MIB_clockCardType, clkNumDaysTuneGet());
+
+ /* Days Since Power On: */
+ cdcSetMibInt(MIB_clockCardDAC, clkNumDaysRunGet());
+
+ /* Initialize VieprCell Serial Number */
+ pszSerialNumber[MAX_VC_SN] = 0;
+ if (sysSerialNumGet (pszSerialNumber) == OK)
+ {
+ cdcSetMibStr(MIB_viperCellSerialNumber, pszSerialNumber);
+ } else {
+ printf("sysSerialNumGet failure; could not set ViperCell serial number\n");
+ }
+
+ /* Add the default gateway */
+
+ if (oam_getMibIntVar(MIB_viperCellDefGateway, &ip))
+ {
+ printf("oam_getMibIntVal failure (tag = %s)\n", snmp_tagName(MIB_viperCellDefGateway));
+ } else {
+ pszIP = cdcCvtIp2Str(ip);
+ routeAdd("0", pszIP);
+ printf("Default gateway %s has been added\n", pszIP);
+ }
+}
diff --git a/data/mnet/GP10/Host/cdcUtils/clkInterface/Makefile b/data/mnet/GP10/Host/cdcUtils/clkInterface/Makefile
new file mode 100644
index 0000000..d35c870
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/clkInterface/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = cdcUtils
+THIS_DIRECTORY = clkInterface
+MY_OUTPUT = $(OBJDIR)\clkInterface.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif
diff --git a/data/mnet/GP10/Host/cdcUtils/clkInterface/clkInterface.c b/data/mnet/GP10/Host/cdcUtils/clkInterface/clkInterface.c
new file mode 100644
index 0000000..eb21d8b
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/clkInterface/clkInterface.c
@@ -0,0 +1,1221 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/*********************************************************************
+
+clkInterface - Clock Interface
+
+This file consists a set of functions to interface with the Clock Module.
+
+Before any of the functions can be used the interface needs to be initialized with
+function clkInit().
+
+All the clock interface functions make use of the function clkCmd() to send a
+command to the clock module. clKCmd() sends the given command to the clock module
+and reads the response after 320 ms. This function can also be used to send
+a command to the clock module from the console.
+
+A function clkNumGet is used by other funcion that need to send a command and read
+a numerical value from the response.
+
+All the commands to the clock module are ASCII coded. Each command has an ASCII
+coded response. The clock module asssumes that the commands are being sent from
+a console and sends a prompt at the end of all responses. The command charaters are
+not echoed by the clock module. Each command is terminated with a
+'carraige return' character.
+*/
+
+#include <vxWorks.h>
+#include <ioLib.h>
+#include <semLib.h>
+#include "cdc_bsp/nvRam.h"
+
+#define MAX_CMD_LEN 30
+#define MAX_RSP_LEN 30
+#define NUM_VERSION_STAGES 2
+#define SERIAL_NUM_LEN 15
+#define EEPROM_SIZE_REVC CLOCK_BOARD_EEPROM_SIZE
+#define EEPROM_SIZE_REV1_8 15
+
+/*---------- Globals ----------*/
+char clkSerialNum[SERIAL_NUM_LEN + 1] = "xxxxxxxxxxxxxxx";
+char clkSoftVersion[4] = "x.x";
+int clkVerifyEepromOn = 1;
+
+/*-------- File Locals --------*/
+static SEM_ID clkSem;
+static int clkFd;
+static int clkVerStage;
+
+LOCAL STATUS clkSoftVersionGet();
+
+/**********************************************************************
+clkInterfaceInit - Interface Initialize
+
+Inititlaizes the clock module interface..
+*/
+
+/* This routine opens the serial port for the clock module */
+
+static STATUS clkInterfaceInit() /* RETURN: OK or ERROR */
+{
+ STATUS retStat = ERROR;
+
+ /* create a semaphore for mutual exclusion */
+ clkSem = semMCreate(SEM_Q_PRIORITY | SEM_INVERSION_SAFE | SEM_DELETE_SAFE);
+ if (clkSem != NULL)
+ {
+ clkFd = open("/tyCo/1", O_RDWR, 0); /* open the serial port */
+ if (clkFd != ERROR)
+ {
+ /* The response to first command to clock card is discoverd to be just a prompt.
+ Issue a dummy command so that the first real command is not the first command */
+ write(clkFd, "\r", 1); /* send a carraige return */
+ taskDelay(2); /* wait for the response */
+ ioctl(clkFd, FIORFLUSH, 0); /* clear the 'read' buffer */
+ retStat = OK;
+ }
+ }
+ return retStat;
+}
+
+
+/**********************************************************************
+clkInit - Initialize
+
+Inititlaizes the clock module interface and reads and saves the clock module
+serial number.
+This function should be called once before any commands can be
+sent to the clock module.
+*/
+
+/* This routine opens the serial port for the clock module */
+
+STATUS clkInit() /* RETURN: OK or ERROR */
+{
+ STATUS retStat = ERROR;
+
+ clkVerStage = NUM_VERSION_STAGES - 1; /* assume latest */
+ if (clkInterfaceInit() == OK) /* intitlize the interface */
+ {
+ if (clkSoftVersionGet() == OK) /* read the software version number */
+ {
+ if ((clkSoftVersion[0] >= '0') && (clkSoftVersion[0] <= '9'))
+ { /* valid number */
+ if (clkSoftVersion[0] >= '2')
+ clkVerStage = 1; /* version >= 2.x */
+ else
+ clkVerStage = 0;
+
+ if (clkVerifyEepromOn) clkValidateEeprom();
+
+ if (clkSerialNumGet() == OK) /* read the serial number */
+ retStat = OK;
+ }
+ }
+ }
+
+ return retStat;
+}
+
+
+/**********************************************************************
+clkSerialNumReturn - Serial Number Return
+
+Returns the Serial Number of the clock module.
+*/
+char* clkSerialNumReturn()
+{
+ return clkSerialNum;
+}
+
+
+/**********************************************************************
+clkSerialNumPrint - Serial Number Print
+
+Prints the Serial Number of the clock module.
+*/
+clkSerialNumPrint()
+{
+ printf("Clock Module Serial Number: %s\n", clkSerialNum);
+}
+
+
+/**********************************************************************
+clkSoftVersionReturn - Software Version Return
+
+Returns the Software Version of the clock module.
+*/
+char* clkSoftVersionReturn()
+{
+ return clkSoftVersion;
+}
+
+
+/**********************************************************************
+clkSoftVersionPrint - Software Version Print
+
+Prints the Software Version of the clock module.
+*/
+clkSoftVersionPrint()
+{
+ printf("Clock Module Software Version: %s\n", clkSoftVersion);
+}
+
+
+/**********************************************************************
+clkCmd - Command
+
+This function sends a command to the clock module and returns the response.
+It provides interface to clock module for other functions. It can also be
+used for sending a command to the clock module from console.
+
+This function is used by all other functions to send a command to the clock
+module. Normally this function should not called directly. Instead one of
+the specicfic functions that make use of this function should be called.
+
+If the pointer to response is 0, it is assumed that the command was issued
+from the console the response is printed on the standard output.
+
+This functions waits for 320 ms.to check if a response is available. Error is
+returnrd if there is no response.
+*/
+
+/*
+All the responses from clock module are begin with cr-lf characters and the response ends
+with a cr-lf chracters and a prompt character.
+*/
+
+STATUS clkCmd( /* RETURN: OK / ERROR */
+ const char* cmd, /* IN : command */
+ char* rsp /* OUT: response */
+ )
+{
+ STATUS retStat = ERROR;
+ UINT cmdLen;
+ UCHAR rspBuff[MAX_RSP_LEN + 1]; /* + 1 for lf/cr */
+ UINT nBytesUnread;
+ UINT i;
+
+/* retStat = semTake(clkSem, WAIT_FOREVER); /* Block the resourse */
+ if ((semTake(clkSem, WAIT_FOREVER)) != ERROR)
+ {
+ cmdLen = strlen(cmd);
+ ioctl(clkFd, FIORFLUSH, 0); /* clear read buffer */
+ write(clkFd, (char*) cmd, cmdLen); /* send the command */
+ write(clkFd, "\r", 1); /* end with carriage return */
+
+ taskDelay(10); /* wait for response */
+ ioctl(clkFd, FIONREAD, (int)&nBytesUnread); /* check if anything in the read buffer */
+ if (nBytesUnread > 0)
+ { /* Something to read */
+ read(clkFd, rspBuff, 2); /* read CR-LF */
+ read(clkFd, rspBuff, MAX_RSP_LEN); /* read the ascii string */
+ /* loop to find the end of the response */
+ for (i = 0; i < MAX_RSP_LEN; i++)
+ {
+ if ((rspBuff[i] == 0x0A) || (rspBuff[i] == 0x0D)) /* CR/LF ? */
+ {
+ rspBuff[i] = NULL; /* change to null */
+ if (rsp != 0)
+ { /* valid rsp pointer */
+ memcpy(rsp, rspBuff, i);
+ rsp[i] = NULL; /* null terminate */
+ }
+ else
+ { /* command must be from console */
+ printf("CLK Response: %s\n", rspBuff);
+ }
+ retStat = OK;
+ break;
+ }
+ } /* for (i */
+ } /* if (nBytes */
+ } /* if (retStat */
+ semGive(clkSem); /* release the resource */
+ return retStat;
+}
+
+
+/**********************************************************************
+clkNumGet - Number Get
+
+Sends a command to clock module and reads the response.
+This fuctions is used by other functions requiring to send a command to
+the clock module and reading an unsigned numerical value back.
+Returns the number or -1 for error.
+*/
+
+/*
+The response consists of a series of chracters followed by the ascii coded digits.
+The rspExpected does not include the digits. Number of digits can vary. The maximum
+number of digits is numDigits.
+*/
+
+STATUS clkNumGet( /* RETURN : number or -1 for ERROR */
+ const char* cmd, /* IN: commnad */
+ const char* rspExpected, /* IN: expected response */
+ int numDigits, /* IN: maximum number of digits at the end */
+ int* num /* OUT: returned value, valid if STATUS=OK */
+ )
+{
+ char rsp[MAX_RSP_LEN + 1]; /* + 1 for null */
+ int i;
+ int errorFound; /* boolean: error found in response */
+ const char* pRsp;
+ int rspExpectedLen;
+
+ if ((clkCmd(cmd, rsp)) == OK)
+ { /* command successful */
+ rspExpectedLen = strlen(rspExpected);
+ if (memcmp(rsp, rspExpected, rspExpectedLen) == 0)
+ { /* response is expected response */
+ /* search for end of command and compute number */
+ /* read characters from 'left' */
+ for (i = 0, *num = 0, errorFound = FALSE, pRsp = &rsp[rspExpectedLen];
+ (i < numDigits) && (*pRsp != 0) && (errorFound == FALSE);
+ i++, pRsp++ )
+ {
+ if ((*pRsp >= '0') && (*pRsp <= '9'))
+ {
+ *num = *num * 10 + (*pRsp - '0'); /* convert from ASCII */
+ }
+ else
+ errorFound = TRUE; /* invalid character */
+ }
+
+ if ((i == 0) || (*pRsp != 0)) /* No digits or response too long */
+ errorFound = TRUE;
+
+ if (errorFound == FALSE)
+ return OK; /* return offset */
+
+ }
+ }
+ return ERROR; /* return ERROR */
+
+}
+
+
+/**********************************************************************
+clkOffsetSet - Offset Set
+
+Sends a command to clock module to set the given offset.
+Return OK or ERROR.
+*/
+
+/*
+The command sent to the clock module is $PTELS,OFFSET,xxx / $PTELS,OFFS,xxx
+The expected response is $PTELA,OFFSET,xxx / $PTELA,OFFS,xxx
+*/
+
+STATUS clkOffsetSet( /* RETURN: OK / ERROR */
+ UINT offset /* IN: offset */
+ )
+{
+ const char* cmdSet[] = {"$PTELS,OFFSET,","$PTELS,OFFS,"};
+ const char* rspExpectedSet[] = {"$PTELA,OFFSET,","$PTELA,OFFS,"};
+
+ char cmd[MAX_CMD_LEN + 1]; /* + 1 for null */
+ char rspExpected[MAX_RSP_LEN + 1]; /* + 1 for null */
+ char rsp[MAX_RSP_LEN + 1]; /* + 1 for null */
+
+ if (offset <= 127)
+ {
+ /* select command and append the offset in ASCII */
+ sprintf(cmd, "%s%d", cmdSet[clkVerStage], offset);
+ sprintf(rspExpected, "%s%d", rspExpectedSet[clkVerStage], offset);
+
+ if ((clkCmd(cmd, rsp)) == OK) /* send the command */
+ {
+ if ((strcmp(rsp, rspExpected)) == 0) /* Is the response expected response? */
+ return OK;
+ }
+ }
+ return ERROR;
+}
+
+
+/**********************************************************************
+clkOffsetGet - Offset Get
+
+Sends a command to clock module to read the offset.
+Returns the offset or -1 for error.
+*/
+
+/*
+The command sent to the clock module is $PTELQ,OFFSET / $PTELQ,OFFS
+The expected response is $PTELR,OFFSET,xxx / $PTELR,OFFS,xxx
+*/
+
+int clkOffsetGet() /* RETURN: offset or -1 for error */
+{
+ const char* cmdSet[] = {"$PTELQ,OFFSET","$PTELQ,OFFS"};
+ const char* rspExpectedSet[] = {"$PTELR,OFFSET,","$PTELR,OFFS,"};
+ int num;
+
+ if (clkNumGet(cmdSet[clkVerStage], rspExpectedSet[clkVerStage], 3, &num) != OK)
+ {
+ num = -1;
+ }
+ return (num);
+}
+
+
+/**********************************************************************
+clkOscillatorSet - Oscillator Type Set
+
+Sends a command to clock module to set the given Oscillator Type.
+Return OK or ERROR.
+*/
+
+/*
+The command sent to the clock module is $PTELS,OSC,xxx
+The expected response is $PTELA,OSC,xxx
+*/
+
+STATUS clkOscillatorSet( /* RETURN: OK / ERROR */
+ UINT type /* IN: offset */
+ )
+{
+ char cmd[MAX_CMD_LEN + 1]; /* + 1 for null */
+ char rspExpected[MAX_RSP_LEN + 1]; /* + 1 for null */
+ char rsp[MAX_RSP_LEN + 1]; /* + 1 for null */
+
+ if (type <= 127)
+ {
+ /* select command and append the offset in ASCII */
+ sprintf(cmd, "$PTELS,OSC,%d", type);
+ sprintf(rspExpected, "$PTELA,OSC,%d", type);
+
+ if ((clkCmd(cmd, rsp)) == OK) /* send the command */
+ {
+ if ((strcmp(rsp, rspExpected)) == 0) /* Is the response expected response? */
+ return OK;
+ }
+ }
+ return ERROR;
+}
+
+
+/**********************************************************************
+clkBoardRevSet - Board Revision Set
+
+Sends a command to clock module to set the given Board Revision.
+Return OK or ERROR.
+*/
+
+/*
+The command sent to the clock module is $PTELS,BOARD,xxx / $PTELS,BRD,xxx
+The expected response is $PTELA,BOARD,xxx / $PTELA,BRD,xxx
+*/
+
+STATUS clkBoardRevSet( /* RETURN: OK / ERROR */
+ UINT rev /* IN: offset */
+ )
+{
+ const char* cmdSet[] = {"$PTELS,BOARD,","$PTELS,BRD,"};
+ const char* rspExpectedSet[] = {"$PTELA,BOARD,","$PTELA,BRD,"};
+
+ char cmd[MAX_CMD_LEN + 1]; /* + 1 for null */
+ char rspExpected[MAX_RSP_LEN + 1]; /* + 1 for null */
+ char rsp[MAX_RSP_LEN + 1]; /* + 1 for null */
+
+ /* select command and append the offset in ASCII */
+ sprintf(cmd, "%s%d", cmdSet[clkVerStage], rev);
+ sprintf(rspExpected, "%s%d", rspExpectedSet[clkVerStage], rev);
+
+ if ((clkCmd(cmd, rsp)) == OK) /* send the command */
+ {
+ if ((strcmp(rsp, rspExpected)) == 0) /* Is the response expected response? */
+ return OK;
+ }
+ return ERROR;
+}
+
+
+/**********************************************************************
+clkChecksumSet - Checksum Set
+
+Sends a command to clock module to set the given checksum value.
+Return OK or ERROR.
+*/
+
+/*
+The command sent to the clock module is $PTELS,CHECKSUM,xxx / $PTELS,CKSM,xxx
+The expected response is $PTELA,CHECKSUM,xxx / $PTELA,CKSM,xxx
+*/
+
+STATUS clkChecksumSet( /* RETURN: OK / ERROR */
+ UINT checksum /* IN: offset */
+ )
+{
+ const char* cmdSet[] = {"$PTELS,CHECKSUM","$PTELS,CKSM"};
+ const char* rspExpectedSet[] = {"$PTELA,CHECKSUM,","$PTELA,CKSM,"};
+
+ char cmd[MAX_CMD_LEN + 1]; /* + 1 for null */
+ char rspExpected[MAX_RSP_LEN + 1]; /* + 1 for null */
+ char rsp[MAX_RSP_LEN + 1]; /* + 1 for null */
+
+ /* select command and append the offset in ASCII */
+ sprintf(cmd, "%s", cmdSet[clkVerStage]);
+ sprintf(rspExpected, "%s%d", rspExpectedSet[clkVerStage], checksum);
+
+ if ((clkCmd(cmd, rsp)) == OK) /* send the command */
+ {
+ if ((strcmp(rsp, rspExpected)) == 0) /* Is the response expected response? */
+ return OK;
+ }
+ return ERROR;
+}
+
+
+/**********************************************************************
+clkOscillatorTransferFuncSet - Oscillator Transfer Function Set
+
+Sends a command to clock module to set the given Oscillator transfer function.
+Return OK or ERROR.
+*/
+
+/*
+The command sent to the clock module is $PTELS,POS,0 / $PTELS,NEG,1
+The expected response is $PTELA,POS,0 / $PTELA,NEG,1
+*/
+
+STATUS clkOscillatorTransferFuncSet( /* RETURN: OK / ERROR */
+ UINT val /* IN: value */
+ )
+{
+ char cmd[MAX_CMD_LEN + 1]; /* + 1 for null */
+ char rspExpected[MAX_RSP_LEN + 1]; /* + 1 for null */
+ char rsp[MAX_RSP_LEN + 1]; /* + 1 for null */
+
+ if (val == 0)
+ {
+ /* select command and append the offset in ASCII */
+ sprintf(cmd, "$PTELS,POS");
+ sprintf(rspExpected, "$PTELA,POS,0");
+ }
+ else
+ {
+ /* select command and append the offset in ASCII */
+ sprintf(cmd, "$PTELS,NEG");
+ sprintf(rspExpected, "$PTELA,NEG,1");
+ }
+
+ if ((clkCmd(cmd, rsp)) == OK) /* send the command */
+ {
+ if ((strcmp(rsp, rspExpected)) == 0) /* Is the response expected response? */
+ return OK;
+ }
+
+ return ERROR;
+}
+
+
+/**********************************************************************
+clkClockSelectSet - Clock Select Set
+
+Sends a command to clock module to set the given Clock select value.
+Return OK or ERROR.
+*/
+
+/*
+The command sent to the clock module is $PTELS,E1 / $PTELS,T1
+The expected response is $PTELA,E1,1 / $PTELA,T1,0
+*/
+
+STATUS clkClockSelectSet( /* RETURN: OK / ERROR */
+ UINT val /* IN: value */
+ )
+{
+ char cmd[MAX_CMD_LEN + 1]; /* + 1 for null */
+ char rspExpected[MAX_RSP_LEN + 1]; /* + 1 for null */
+ char rsp[MAX_RSP_LEN + 1]; /* + 1 for null */
+
+ if (val == 0)
+ {
+ /* select command and append the offset in ASCII */
+ sprintf(cmd, "$PTELS,T1");
+ sprintf(rspExpected, "$PTELA,T1,0");
+ }
+ else
+ {
+ /* select command and append the offset in ASCII */
+ sprintf(cmd, "$PTELS,E1");
+ sprintf(rspExpected, "$PTELA,E1,1");
+ }
+
+ if ((clkCmd(cmd, rsp)) == OK) /* send the command */
+ {
+ if ((strcmp(rsp, rspExpected)) == 0) /* Is the response expected response? */
+ return OK;
+ }
+
+ return ERROR;
+}
+
+
+/**********************************************************************
+clkSerialNumSet - Serial Number Set
+
+Sends a command to clock module to set the serial number
+Returns the offset OK or ERROR.
+*/
+
+/* No Longer Available */
+
+
+/**********************************************************************
+clkSerialNumGet - Serial Number Get
+
+Sends a command to clock module to read the offset.
+Returns the serial number or -1 for error.
+*/
+
+/*
+for clkVerStage 0
+The command sent to the clock module is $PTELQ,SERIAL
+The expected response is $PTELR,SERIAL,xxx
+
+for other clkVerStage
+The commands sent to the clock module are $PTELQ,SA $PTELQ,SB $PTELQ,SC
+The expected responses are $PTELR,SA,xxx $PTELR,SB,xxx $PTELR,SC,xxx
+The most significant bits are SA and the least significant bits are SC
+*/
+
+STATUS clkSerialNumGet() /* RETURN: OK/ERROR */
+{
+ STATUS retStat = ERROR;
+ char serialNum[SERIAL_NUM_LEN + 1];
+ int num;
+
+ if (clkVerStage == 0)
+ {
+ retStat = clkNumGet("$PTELQ,SERIAL", "$PTELR,SERIAL,", 5, &num);
+ if (retStat != ERROR)
+ {
+ sprintf(clkSerialNum, "%05d", num);
+ }
+ }
+ else
+ {
+ retStat = clkNumGet("$PTELQ,SA", "$PTELR,SA,", 5, &num);
+ if (retStat != ERROR)
+ {
+ sprintf(serialNum, "%05d", num);
+ retStat = clkNumGet("$PTELQ,SB", "$PTELR,SB,", 5, &num);
+ if (retStat != ERROR)
+ {
+ sprintf(serialNum, "%s%05d", serialNum, num);
+ retStat = clkNumGet("$PTELQ,SC", "$PTELR,SC,", 5, &num);
+ if (retStat != ERROR)
+ {
+ sprintf(serialNum, "%s%05d", serialNum, num);
+ strcpy(clkSerialNum, serialNum);
+ }
+ }
+ }
+ }
+ return retStat;
+}
+
+/**********************************************************************
+clkSerialNumSet - Serial Number Set
+
+Sends a command to clock module to write the offset.
+Returns the serial number or -1 for error.
+*/
+
+/*
+for clkVerStage 0
+The command sent to the clock module is $PTELQ,SERIAL
+The expected response is $PTELR,SERIAL,xxx
+
+for other clkVerStage
+The commands sent to the clock module are $PTELQ,SA $PTELQ,SB $PTELQ,SC
+The expected responses are $PTELR,SA,xxx $PTELR,SB,xxx $PTELR,SC,xxx
+The most significant bits are SA and the least significant bits are SC
+*/
+
+STATUS clkSerialNumSet(unsigned short serialA, unsigned short serialB,
+ unsigned short serialC) /* RETURN: OK/ERROR */
+{
+ char cmd[MAX_CMD_LEN + 1]; /* + 1 for null */
+ char rspExpected[MAX_RSP_LEN + 1]; /* + 1 for null */
+ char rsp[MAX_RSP_LEN + 1]; /* + 1 for null */
+
+ if (clkVerStage == 0)
+ {
+ /* select command and append the offset in ASCII */
+ sprintf(cmd, "$PTELS,SERIAL,%d", serialA);
+ sprintf(rspExpected, "$PTELA,SERIAL,%d", serialA);
+
+ if ((clkCmd(cmd, rsp)) == OK) /* send the command */
+ {
+ if ((strcmp(rsp, rspExpected)) == 0) /* Is the response expected response? */
+ return OK;
+ }
+ }
+ else
+ {
+ /* select command and append the offset in ASCII */
+ sprintf(cmd, "$PTELS,SA,%d", serialA);
+ sprintf(rspExpected, "$PTELA,SA,%d", serialA);
+
+ if ((clkCmd(cmd, rsp)) == OK) /* send the command */
+ {
+ if ((strcmp(rsp, rspExpected)) != 0) /* Is the response expected response? */
+ return ERROR;
+ }
+
+ sprintf(cmd, "$PTELS,SB,%d", serialB);
+ sprintf(rspExpected, "$PTELA,SB,%d", serialB);
+
+ if ((clkCmd(cmd, rsp)) == OK) /* send the command */
+ {
+ if ((strcmp(rsp, rspExpected)) != 0) /* Is the response expected response? */
+ return ERROR;
+ }
+
+ sprintf(cmd, "$PTELS,SC,%d", serialC);
+ sprintf(rspExpected, "$PTELA,SC,%d", serialC);
+
+ if ((clkCmd(cmd, rsp)) == OK) /* send the command */
+ {
+ if ((strcmp(rsp, rspExpected)) != 0) /* Is the response expected response? */
+ return ERROR;
+ }
+ }
+
+ return OK;
+}
+
+
+/**********************************************************************
+clkStatGet - Status Get
+
+Sends a command to clock module to read the status.
+Returns the status or -1 for error.
+
+The returned status is:
+
+ 0 - No Alarm conditions
+ 1 - Burst Alarm Active
+ 2 - Frame Alarm Active
+ 3 - Borth Burst and Fram Alarms active
+*/
+
+/*
+The command sent to the clock module is $PTELQ,INT
+The expected response is $PTELR,INT,x
+*/
+
+int clkStatGet() /* RETURN: status or -1 for error */
+{
+ char cmd[] = "$PTELQ,INT";
+ char rspExpected[] = "$PTELR,INT,";
+ int num;
+
+ if (clkNumGet(cmd, rspExpected, 2, &num) != OK)
+ {
+ num = -1;
+ }
+ return (num); /* Max. 1 digit expected */
+}
+
+
+/**********************************************************************
+clkNumDaysTuneReset - Number of Days Tune Reset
+
+Sends a command to clock module to reset the 'Number of Days since Tuning' count.
+Returns the status or -1 for error.
+*/
+
+/*
+The command sent to the clock module is $PTELS,TUNE
+The expected response is $PTELA,TUNE,0
+*/
+
+STATUS clkNumDaysTuneReset() /* RETURN: OK / ERROR */
+{
+ char cmd[] = "$PTELS,TUNE";
+ char rspExpected[] = "$PTELA,TUNE,0";
+ char rsp[MAX_RSP_LEN + 1]; /* + 1 for null */
+
+ if ((clkCmd(cmd, rsp)) == OK) /* send the command */
+ {
+ if ((strcmp(rsp, rspExpected)) == 0) /* Is the response expected response? */
+ return OK;
+ }
+
+ return ERROR;
+}
+
+
+/**********************************************************************
+clkNumDaysTuneGet - Number of Days Tune Get
+
+Sends a command to clock module to read the number of days since last tuneup.
+Returns the no. of days or -1 for error.
+*/
+
+/*
+The command sent to the clock module is $PTELQ,TUNE
+The expected response is $PTELR,TUNE,xxxx
+*/
+
+int clkNumDaysTuneGet() /* RETURN: number of days or -1 for error */
+{
+ char cmd[] = "$PTELQ,TUNE";
+ char rspExpected[] = "$PTELR,TUNE,";
+ int num;
+
+ if (clkNumGet(cmd, rspExpected, 4, &num) != OK)
+ {
+ num = -1;
+ }
+
+ return (num); /* Max. 4 digits expected */
+}
+
+
+/**********************************************************************
+clkNumDaysRunReset - Number of Days Run Reset
+
+Sends a command to clock module to reset the 'Number of Days since Running' count.
+Returns the status or -1 for error.
+*/
+
+/*
+The command sent to the clock module is $PTELS,RUN
+The expected response is $PTELA,RUN,0
+*/
+
+STATUS clkNumDaysRunReset() /* RETURN: OK / ERROR */
+
+{
+ char cmd[] = "$PTELS,RUN";
+ char rspExpected[] = "$PTELA,RUN,0";
+ char rsp[MAX_RSP_LEN + 1]; /* + 1 for null */
+
+ if ((clkCmd(cmd, rsp)) == OK) /* send the command */
+ {
+ if ((strcmp(rsp, rspExpected)) == 0) /* Is the response expected response? */
+ return OK;
+ }
+
+ return ERROR;
+}
+
+
+/**********************************************************************
+clkNumDaysRunGet - Number of Days Run Get
+
+Sends a command to clock module to read the number of days since it is running.
+Returns the no. of days or -1 for error.
+*/
+
+/*
+The command sent to the clock module is $PTELQ,RUN
+The expected response is $PTELR,RUN,xxxx
+*/
+
+int clkNumDaysRunGet() /* RETURN: number of days or -1 for error */
+{
+ char cmd[] = "$PTELQ,RUN";
+ char rspExpected[] = "$PTELR,RUN,";
+ int num;
+
+ if (clkNumGet(cmd, rspExpected, 4, &num) != OK)
+ {
+ num = -1;
+ }
+
+ return (num); /* Max. 4 digits expected */
+}
+
+
+/**********************************************************************
+clkSoftVersionGet - Software Version Get
+
+Sends a command to clock module to get the software version.
+Saves the software version in the file local variable clkSoftVersion.
+*/
+
+/*
+The command sent to the clock module is $PTELQ,SOFT / $PTELQ,SFT
+The expected response is $PTELR,SOFT,x.x / $PTELR,SFT,x.x
+*/
+
+
+LOCAL STATUS clkSoftVersionGet()
+{
+ const char* cmdSet[] = {"$PTELQ,SOFT","$PTELQ,SFT"};
+ const char* rspExpected[] = {"$PTELR,SOFT,","$PTELR,SFT,"};
+
+ char rsp[MAX_RSP_LEN + 1]; /* + 1 for null */
+ int verFound; /* TRUE/ FALSE */
+ int clkStat; /* OK / ERROR */
+ int i;
+ int rspExpectedLen;
+
+ for (verFound = FALSE, clkStat = OK, i = 0;
+ (verFound == FALSE) && (clkStat == OK) && (i < NUM_VERSION_STAGES);
+ i++)
+ {
+ clkStat = clkCmd(cmdSet[i], rsp);
+ if (clkStat == OK)
+ {
+ if (memcmp(rsp, rspExpected[i], strlen(rspExpected[i])) == 0)
+ {
+ verFound = TRUE;
+ rspExpectedLen = strlen(rspExpected[i]);
+ clkSoftVersion[0] = rsp[0 + rspExpectedLen];
+ clkSoftVersion[1] = rsp[1 + rspExpectedLen];
+ clkSoftVersion[2] = rsp[2 + rspExpectedLen];
+ }
+ }
+ }
+ return verFound ? OK : ERROR;
+}
+
+
+/**********************************************************************
+clkSetEepromValue - Set a location in EEPROM.
+
+*/
+
+STATUS clkSetEepromValue(int location, unsigned char val)
+{
+ const char* cmdSet[] = {"$PTELS,EEPROM,","$PTELS,EEPRM,"};
+ const char* rspExpectedSet[] = {"$PTELA,EEPROM,","$PTELA,EEPRM,"};
+
+ char cmd[MAX_CMD_LEN + 1]; /* + 1 for null */
+ char rspExpected[MAX_RSP_LEN + 1]; /* + 1 for null */
+ char rsp[MAX_RSP_LEN + 1]; /* + 1 for null */
+
+ /* select command and append the offset in ASCII */
+ sprintf(cmd, "%s%d,%d", cmdSet[clkVerStage], location, val);
+ sprintf(rspExpected, "%s%d", rspExpectedSet[clkVerStage], val);
+
+ if ((clkCmd(cmd, rsp)) == OK) /* send the command */
+ {
+ if ((strcmp(rsp, rspExpected)) == 0) /* Is the response expected response? */
+ return OK;
+ }
+ return ERROR;
+}
+
+
+/**********************************************************************
+clkSetDateOfLastTuning - Set the last clock tuning date.
+*/
+STATUS clkSetDateOfLastTuning(unsigned char month, unsigned char day, unsigned short year)
+{
+ if (month > 12) return ERROR;
+ if (day > 31) return ERROR;
+
+ if (clkVerStage == 0)
+ {
+ if (clkSetEepromValue(11, month) != OK) return ERROR;
+ if (clkSetEepromValue(12, day) != OK) return ERROR;
+ if (clkSetEepromValue(13, (unsigned char)(year>>8)) != OK) return ERROR;
+ if (clkSetEepromValue(14, (unsigned char) year) != OK) return ERROR;
+ }
+ else
+ {
+ if (clkSetEepromValue(16, month) != OK) return ERROR;
+ if (clkSetEepromValue(17, day) != OK) return ERROR;
+ if (clkSetEepromValue(18, (unsigned char)(year>>8)) != OK) return ERROR;
+ if (clkSetEepromValue(19, (unsigned char) year) != OK) return ERROR;
+ }
+
+ return OK;
+}
+
+
+/**********************************************************************
+clkGetDateOfLastTuning - Get the last clock tuning date.
+*/
+STATUS clkGetDateOfLastTuning(unsigned char *month, unsigned char *day, unsigned short *year)
+{
+ char cmd[MAX_CMD_LEN + 1];
+ char rsp[MAX_CMD_LEN + 1];
+ int num;
+ const char* cmdSet[] = {"$PTELQ,EEPROM,","$PTELQ,EEPRM,"};
+ const char* rspSet[] = {"$PTELR,EEPROM,","$PTELR,EEPRM,"};
+
+ if (clkVerStage == 0)
+ sprintf(cmd, "%s%d", cmdSet[clkVerStage], 11);
+ else
+ sprintf(cmd, "%s%d", cmdSet[clkVerStage], 16);
+ sprintf(rsp, "%s", rspSet[clkVerStage]);
+ if (clkNumGet(cmd, rsp, 3, &num) != OK) return ERROR;
+ *month = (unsigned char)num;
+
+ if (clkVerStage == 0)
+ sprintf(cmd, "%s%d", cmdSet[clkVerStage], 12);
+ else
+ sprintf(cmd, "%s%d", cmdSet[clkVerStage], 17);
+ sprintf(rsp, "%s", rspSet[clkVerStage]);
+ if (clkNumGet(cmd, rsp, 3, &num) != OK) return ERROR;
+ *day = (unsigned char)num;
+
+ if (clkVerStage == 0)
+ sprintf(cmd, "%s%d", cmdSet[clkVerStage], 13);
+ else
+ sprintf(cmd, "%s%d", cmdSet[clkVerStage], 18);
+ sprintf(rsp, "%s", rspSet[clkVerStage]);
+ if (clkNumGet(cmd, rsp, 3, &num) != OK) return ERROR;
+ *year = (unsigned short)(num<<8);
+
+ if (clkVerStage == 0)
+ sprintf(cmd, "%s%d", cmdSet[clkVerStage], 14);
+ else
+ sprintf(cmd, "%s%d", cmdSet[clkVerStage], 19);
+ sprintf(rsp, "%s", rspSet[clkVerStage]);
+ if (clkNumGet(cmd, rsp, 3, &num) != OK) return ERROR;
+ *year |= (unsigned short)(num);
+
+
+ if (*month > 12) return ERROR;
+ if (*day > 31) return ERROR;
+
+ return OK;
+}
+
+
+/**********************************************************************
+clkShowDateOfLastTuning - Print the last clock tuning date.
+*/
+STATUS clkShowDateOfLastTuning()
+{
+ unsigned char month;
+ unsigned char day;
+ unsigned short year;
+
+ if (clkGetDateOfLastTuning(&month, &day, &year) == OK)
+ {
+ printf("Clock Last Tuned on %d/%d/%d.\n", month, day, year);
+ }
+ else
+ {
+ printf("Unable to retrieve a valid clock tuning data!\n");
+ }
+}
+
+
+/**********************************************************************
+clkReadAllEeprom - Read in all the clocks EEPROM values.
+
+*/
+
+STATUS clkReadAllEeprom(unsigned char *buf)
+{
+ STATUS status;
+ char cmd[MAX_CMD_LEN + 1];
+ char rsp[MAX_CMD_LEN + 1];
+ int numBytes, i, num;
+ const char* cmdSet[] = {"$PTELQ,EEPROM,","$PTELQ,EEPRM,"};
+ const char* rspSet[] = {"$PTELR,EEPROM,","$PTELR,EEPRM,"};
+
+ status = OK;
+
+ if (clkVerStage == 0)
+ numBytes = EEPROM_SIZE_REV1_8;
+ else
+ numBytes = EEPROM_SIZE_REVC;
+
+ for (i = 0; i < numBytes; i++)
+ {
+ sprintf(cmd, "%s%d", cmdSet[clkVerStage], i);
+ sprintf(rsp, "%s", rspSet[clkVerStage]);
+ if ((status = clkNumGet(cmd, rsp, 3, &num)) != OK)
+ {
+ break;
+ }
+ else
+ {
+ buf[i] = (unsigned char)num;
+ }
+ }
+
+ return (status);
+}
+
+/**********************************************************************
+clkSaveEepromToNvRam - Copy Clock EEPROM to NV Ram
+
+Reads the clock cards EEPROM values and stores them in the NV Ram on CDC.
+*/
+
+
+STATUS clkSaveEepromToNvRam() /* RETURN: OK / ERROR */
+
+{
+ STATUS status;
+ unsigned char buf[EEPROM_SIZE_REVC];
+
+ /* Read EEPROM from clock card */
+ status = clkReadAllEeprom(buf);
+
+ /* Write EEPROM data to NV Ram */
+ if (status == OK)
+ status = sysClockBoardEepromSet((char *)buf);
+
+ return status;
+}
+
+
+/**********************************************************************
+clkRestoreEepromFromNvRam - Copy Clock EEPROM saved in NV Ram to clock card
+
+Compares the NV Ram saved values against the clock card's EEPROM values.
+If there is a mismatch then the values are copied from NV Ram to EEPROM.
+*/
+
+
+STATUS clkRestoreEepromFromNvRam() /* RETURN: OK / ERROR */
+
+{
+ unsigned char nvRamEeprom[EEPROM_SIZE_REVC];
+ unsigned char clockBoardEeprom[EEPROM_SIZE_REVC];
+ STATUS status;
+ int i, j, numBytes;
+ unsigned short serialA, serialB, serialC;
+
+ /* Read NV Ram copy of EEPROM */
+ status = sysClockBoardEepromGet((char *)nvRamEeprom);
+
+ /* Read EEPROM from clock card */
+ if (status == OK)
+ {
+ status = clkReadAllEeprom(clockBoardEeprom);
+
+ if (status == OK)
+ {
+ if (clkVerStage == 0)
+ numBytes = EEPROM_SIZE_REV1_8;
+ else
+ numBytes = EEPROM_SIZE_REVC;
+
+ for (i=0; i < numBytes; i++)
+ {
+ /* skip all the Num Days values.... */
+ if (clkVerStage == 0)
+ if (i == 6 || i == 7 || i == 8 || i == 9) continue;
+ else
+ if (i == 4 || i == 5 || i == 6 || i == 7) continue;
+
+ if (nvRamEeprom[i] != clockBoardEeprom[i])
+ {
+ printf("Clock Board EEPROM does not match NV Ram!\n"
+ "Clock Board EEPROM will be updated to match NV Ram!\n");
+ /* Write EEPROM from NV Ram */
+
+ /* Set Digital Pot value */
+ if (clkOffsetSet(nvRamEeprom[0]) != OK)
+ printf("Clock Board Update: Unable to restore Digital Pot value!\n");
+
+ /* Set Oscillator transfer function */
+ if (clkOscillatorTransferFuncSet(nvRamEeprom[1]) != OK)
+ printf("Clock Board Update: Unable to restore Oscillator Transfer function value!\n");
+
+ /* Set Clock Select value */
+ if (clkClockSelectSet(nvRamEeprom[2]) != OK)
+ printf("Clock Board Update: Unable to restore Clock Select value!\n");
+
+ /* Set Board Revision */
+ if (clkBoardRevSet(nvRamEeprom[3]) != OK)
+ printf("Clock Board Update: Unable to restore Board Revision!\n");
+
+ if (clkVerStage == 0)
+ {
+ /* Set Serial Number */
+ serialA = nvRamEeprom[4] | (nvRamEeprom[5] << 8);
+ if (clkSerialNumSet(serialA,0,0) != OK)
+ printf("Clock Board Update: Unable to restore Serial Number!\n");
+
+ /* Restore any remaining bytes in EEPROM */
+ for (j=11; j < EEPROM_SIZE_REV1_8; j++)
+ {
+ if (clkSetEepromValue(j, nvRamEeprom[j]) != OK)
+ printf("Clock Board Update: Unable to restore EEPROM loc %d to %d!\n",
+ j, nvRamEeprom[j]);
+ }
+
+ /* Set Checksum */
+ if (clkChecksumSet(nvRamEeprom[10]) != OK)
+ printf("Clock Board Update: Checksum does not match stored value!\n");
+ }
+ else
+ {
+ /* Set Oscillator Type */
+ if (clkOscillatorSet(nvRamEeprom[9]) != OK)
+ printf("Clock Board Update: Unable to restore Oscillator Type!\n");
+
+ /* Set Serial Number */
+ serialA = nvRamEeprom[10] | (nvRamEeprom[11] << 8);
+ serialB = nvRamEeprom[12] | (nvRamEeprom[13] << 8);
+ serialC = nvRamEeprom[14] | (nvRamEeprom[15] << 8);
+ if (clkSerialNumSet(serialA,serialB,serialC) != OK)
+ printf("Clock Board Update: Unable to restore Serial Number!\n");
+
+ /* Restore any remaining bytes in EEPROM */
+ for (j=16; j < EEPROM_SIZE_REVC; j++)
+ {
+ if (clkSetEepromValue(j, nvRamEeprom[j]) != OK)
+ printf("Clock Board Update: Unable to restore EEPROM loc %d to %d!\n",
+ j, nvRamEeprom[j]);
+ }
+
+ /* Set Checksum */
+ if (clkChecksumSet(nvRamEeprom[8]) != OK)
+ printf("Clock Board Update: Checksum does not match stored value!\n");
+ }
+
+ break;
+ }
+ }
+ }
+ }
+ return status;
+}
+
+
+/**********************************************************************
+clkValidateEeprom - Make sure the EEPROM is correct
+
+
+*/
+
+
+STATUS clkValidateEeprom() /* RETURN: OK / ERROR */
+{
+ STATUS status = OK;
+ /* If NV Ram has a saved EEPROM copy then use it to verify the EEPROM */
+ printf("Validating Clock Board EEPROM\n");
+ if (sysIsClockBoardEepromSet())
+ {
+ if ((status = clkRestoreEepromFromNvRam()) != OK)
+ {
+ printf("WARNING - Unable to restore Clock Board EEPROM!\n");
+ }
+ }
+ /* Otherwise assume the clock board EEPROM is good and save it to Nv Ram */
+ else
+ {
+ printf("Saving Clock Board EEPROM into NV Ram!\n");
+ if ((status = clkSaveEepromToNvRam()) != OK)
+ {
+ printf("WARNING - Unable to save Clock Board EEPROM!\n");
+ }
+ }
+
+ return (status);
+}
diff --git a/data/mnet/GP10/Host/cdcUtils/coff_loader/Makefile b/data/mnet/GP10/Host/cdcUtils/coff_loader/Makefile
new file mode 100644
index 0000000..62a6752
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/coff_loader/Makefile
@@ -0,0 +1,53 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = cdcUtils
+THIS_DIRECTORY = Coff_loader
+MY_OUTPUT = $(OBJDIR)\Coff_loader.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif
diff --git a/data/mnet/GP10/Host/cdcUtils/coff_loader/cload.c b/data/mnet/GP10/Host/cdcUtils/coff_loader/cload.c
new file mode 100644
index 0000000..382176b
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/coff_loader/cload.c
@@ -0,0 +1,1929 @@
+/***************************************************************************
+* FILENAME: cload.c
+* VERSION: 2.6 5/2/96 13:11:03
+* SCCS ID: "@(#)cload.c 2.6 5/2/96"
+***************************************************************************/
+/******************************************************************************/
+/* CLOAD.C - Generic COFF Loader Version 6.00 4/96 */
+/******************************************************************************/
+/* */
+/* This module contains functions to read in and load a COFF object file. */
+/* The following routines are defined here: */
+/* */
+/* cload() - Main driver for COFF loader. */
+/* cload_headers() - Read in the various headers of the COFF file. */
+/* cload_data() - Read in the raw data and load it into memory. */
+/* cload_sect_data() - Read, relocate, and write out one section. */
+/* cload_cinit() - Process one buffer of C initialization records. */
+/* cload_symbols() - Read in the symbol table. */
+/* cload_strings() - Read in the string table. */
+/* str_free() - Free a string table. */
+/* sym_read() - Read and relocate a symbol and its aux entry. */
+/* sym_name() - Return a pointer to the name of a symbol. */
+/* sym_add_name() - Add a symbol name to the string table. */
+/* reloc_add() - Add a symbol to the relocation symbol table. */
+/* relocate() - Perform a single relocation. */
+/* reloc_read() - Read in and swap one relocation entry. */
+/* reloc_size() - Return the field size of a relocation type. */
+/* reloc_offset() - Return the field offset of a relocation type. */
+/* reloc_stop() - Return the number of bits to read for a reloc type. */
+/* sym_reloc_amount()- Return relocation amount for a relocation entry. */
+/* unpack() - Extract a relocation field from object bytes. */
+/* repack() - Encode a relocated field into object bytes. */
+/* cload_lineno() - Read in & swap line number entries. */
+/* swap4byte() - Swap the order of bytes in a long. */
+/* swap2byte() - Swap the order of bytes in a short. */
+/* */
+/* The loader calls the following external functions to perform application */
+/* specific tasks: */
+/* */
+/* set_reloc_amount() - Define relocation amounts for each section. */
+/* mem_write() - Load a buffer of data into memory. */
+/* lookup_sym() - Look up a symbol in an external symbol table. */
+/* load_syms() - Build the symbol table for the application. */
+/* myalloc() - Application version of malloc(). */
+/* mralloc() - Application version of realloc(). */
+/* load_msg() - Write diagnostic messages during loading. */
+/* */
+/******************************************************************************/
+#include "header.h"
+
+
+/*----------------------------------------------------------------------------*/
+/* CONSTANTS, MACROS, VARIABLES, AND STRUCTURES FOR THE LOADER. */
+/*----------------------------------------------------------------------------*/
+#define TRUE 1
+#define FALSE 0
+
+#define WORDSZ sizeof(T_DATA) /* SIZE OF DATA UNITS IN OBJ FILE */
+
+/*----------------------------------------------------------------------------*/
+/* APPLICATION VARIABLES */
+/*----------------------------------------------------------------------------*/
+FILE *fin; /* INPUT FILE */
+int verbose = FALSE; /* PRINT PROGRESS INFO */
+int need_data = TRUE; /* APPLICATION NEEDS RAW DATA */
+int need_symbols = FALSE; /* APPLICATION NEEDS SYMBOL TABLE */
+int clear_bss = FALSE; /* CLEAR BSS SECTION */
+
+/*----------------------------------------------------------------------------*/
+/* LOADER VARIABLES */
+/*----------------------------------------------------------------------------*/
+FILHDR file_hdr; /* FILE HEADER STRUCTURE */
+int coff_version; /* COFF VERSION USED IN FILE */
+AOUTHDR o_filehdr; /* OPTIONAL (A.OUT) FILE HEADER */
+T_ADDR entry_point; /* ENTRY POINT OF MODULE */
+T_ADDR *reloc_amount = NULL; /* AMOUNT OF RELOCATION PER SECTION */
+char *sect_hdrs = NULL; /* ARRAY OF SECTION HEADERS */
+char *o_sect_hdrs = NULL; /* ARRAY OF OLD COFF SECTION HEADERS */
+int n_sections; /* NUMBER OF SECTIONS IN THE FILE */
+int big_e_target; /* TARGET DATA IN BIG-ENDIAN FORMAT */
+int byte_swapped; /* BYTE ORDERING OPPOSITE OF HOST */
+int curr_sect; /* SECTION NUMBER CURRENTLY LOADING */
+int load_err; /* ERROR CODE RETURNED IF LOADER FAILS*/
+struct strtab *str_head = NULL; /* LIST OF STRING TABLE BUFFERS */
+
+static T_SIZE init_size = 0; /* CURRENT SIZE OF C INITIALIZATION */
+static int need_reloc; /* RELOCATION REQUIRED */
+
+#ifdef notnow
+int big_e_config = TRG_DEF_BIG_E; /* ENDIANNESS CONFIGURATION */
+#endif
+int big_e_config = FALSE; /* ENDIANNESS CONFIGURATION */
+
+/*----------------------------------------------------------------------------*/
+/* THIS STRUCTURE IS USED TO STORE THE RELOCATION AMOUNTS FOR SYMBOLS. */
+/* EACH RELOCATABLE SYMBOL HAS A CORRESPONDING ENTRY IN THIS TABLE. */
+/* THE TABLE IS SORTED BY SYMBOL INDEX; LOOKUP USES A BINARY SEARCH. */
+/*----------------------------------------------------------------------------*/
+typedef struct
+{
+ long rt_index; /* INDEX OF SYMBOL IN SYMBOL TABLE */
+ long rt_disp; /* AMOUNT OF RELOCATION */
+} RELOC_TAB;
+
+/*----------------------------------------------------------------------------*/
+/* THE RELOCATION SYMBOL TABLE IS ALLOCATED DYNAMICALLY, AND REALLOCATED */
+/* AS MORE SPACE IS NEEDED. */
+/*----------------------------------------------------------------------------*/
+#define RELOC_TAB_START 128 /* STARTING SIZE OF TABLE */
+#define RELOC_GROW_SIZE 128 /* REALLOC AMOUNT FOR TABLE */
+
+#ifdef notnow
+static RELOC_TAB *reloc_tab = NULL; /* RELOCATION SYMBOL TABLE */
+#endif
+RELOC_TAB *reloc_tab = NULL; /* RELOCATION SYMBOL TABLE */
+
+static int reloc_tab_size; /* CURRENT ALLOCATED AMOUNT */
+static int reloc_sym_index; /* CURRENT SIZE OF TABLE */
+
+/*----------------------------------------------------------------------------*/
+/* RUN-TIME RELOCATION (AS OPPOSED TO LOAD-TIME) RELOCATION IS DETERMINED */
+/* AS FOLLOWS: IF THE SECTION'S RUNTIME ADDRESS == LOADTIME ADDRESS, USE */
+/* LOADTIME RELOCATION. OTHERWISE, ASSUME LOADTIME RELOC ONLY (RUNTIME RELOC */
+/* == 0). */
+/*----------------------------------------------------------------------------*/
+#define RUN_RELOC_AMOUNT(i) ((SECT_HDR(i)->s_paddr == SECT_HDR(i)->s_vaddr) ? \
+ reloc_amount[i] : 0)
+
+/*----------------------------------------------------------------------------*/
+/* DEFINE A STRUCTURE FOR STRING TABLE BUFFERS. THESE BUFFERS ARE STORED */
+/* AS A LINKED LIST OF MEMORY PACKETS, EACH CONTAINING UP TO 64K OF THE */
+/* STRING TABLE. */
+/*----------------------------------------------------------------------------*/
+typedef struct strtab
+{
+ unsigned long size; /* SIZE OF THIS PACKET */
+ unsigned long offset; /* STARTING OFFSET OF THIS PACKET */
+ unsigned long index; /* AMOUNT CURRENTLY FILLED */
+ struct strtab *next; /* NEXT BUFFER */
+ char buf[1]; /* STRING DATA (EXPAND AS ALLOCATED) */
+} STRTAB;
+
+#define MAX_STRING_ALLOC (unsigned int)(0xffff-sizeof(STRTAB)+1)
+ /* MAX STRING BUFFER: 64K (SMALL HOSTS)*/
+#define MIN_STRING_ALLOC 0x0400 /* MIN STRING BUFFER: 1K */
+
+unsigned long unpack();
+int cload_strings();
+int reloc_offset(int);
+void str_free(STRTAB *);
+
+
+/******************************************************************************/
+/* */
+/* CLOAD() - Main driver for COFF loader. */
+/* */
+/******************************************************************************/
+int cload()
+{
+ int result;
+
+ load_err = 0;
+ result = cload_headers() && cload_symbols() && cload_data();
+
+ if (reloc_tab) myfree(reloc_tab);
+ reloc_tab = NULL;
+
+ return result;
+}
+
+
+/******************************************************************************/
+/* */
+/* CLOAD_HEADERS() - Read in the various headers of the COFF file. */
+/* */
+/******************************************************************************/
+int cload_headers()
+{
+ int i;
+
+ byte_swapped = FALSE;
+ need_reloc = FALSE;
+
+ if (fseek(fin, 0L, 0) != 0 || !fread(&file_hdr, FILHSZ, 1, fin))
+ { load_err = E_FILE; return FALSE; }
+
+ /*-------------------------------------------------------------------------*/
+ /* MAKE SURE THIS IS REALLY A COFF FILE. CHECK FOR SWAPPED FILES. */
+ /* DETERMINE BYTE ORDERING OF OBJECT DATA. */
+ /*-------------------------------------------------------------------------*/
+ if (!ISCOFF(file_hdr.f_magic))
+ {
+ swap2byte(&file_hdr.f_magic);
+
+ if (!ISCOFF(file_hdr.f_magic)) { load_err = E_MAGIC; return FALSE; }
+
+ byte_swapped = TRUE;
+
+ swap2byte(&file_hdr.f_nscns); swap4byte(&file_hdr.f_timdat);
+ swap4byte(&file_hdr.f_symptr); swap4byte(&file_hdr.f_nsyms);
+ swap2byte(&file_hdr.f_opthdr); swap2byte(&file_hdr.f_flags);
+#if COFF_VERSION_1 || COFF_VERSION_2
+ swap2byte(&file_hdr.f_target_id);
+#endif
+ }
+
+ /*-------------------------------------------------------------------------*/
+ /* DETERMINE THE ENDIANNESS OF THE COFF FILE, AND ENSURE THE ENDIANNESS OF */
+ /* THE FILE IS THE SAME AS THE TARGET, IF THERE IS A TARGET. */
+ /*-------------------------------------------------------------------------*/
+ big_e_target = ((file_hdr.f_flags & F_BIG) != 0);
+ if (big_e_config != DONTCARE && big_e_target != big_e_config)
+ { load_err = E_ENDIAN; return FALSE; }
+
+ /*-------------------------------------------------------------------------*/
+ /* DETERMINE VERSION OF COFF BEING USED, CHECK TARGET ID IF NEEDED. */
+ /*-------------------------------------------------------------------------*/
+ if (ISCOFF_1(file_hdr.f_magic) || ISCOFF_2(file_hdr.f_magic))
+ {
+ if (!ISMAGIC(file_hdr.f_target_id)) { load_err = E_MAGIC; return FALSE; }
+ coff_version = file_hdr.f_magic;
+ }
+ else coff_version = COFF_MAGIC_0;
+
+ /*-------------------------------------------------------------------------*/
+ /* READ IN OPTIONAL HEADER, IF THERE IS ONE, AND SWAP IF NEEDED. */
+ /*-------------------------------------------------------------------------*/
+ if (file_hdr.f_opthdr == AOUTSZ)
+ {
+ fseek(fin, (long)FILHSZ_IN(coff_version), 0);
+ if (fread(&o_filehdr, file_hdr.f_opthdr, 1, fin) != 1)
+ { load_err = E_FILE; return FALSE; }
+
+ if (byte_swapped)
+ {
+ swap2byte(&o_filehdr.magic); swap2byte(&o_filehdr.vstamp);
+ swap4byte(&o_filehdr.tsize); swap4byte(&o_filehdr.dsize);
+ swap4byte(&o_filehdr.bsize); swap4byte(&o_filehdr.entrypt);
+ swap4byte(&o_filehdr.text_start); swap4byte(&o_filehdr.data_start);
+ }
+ entry_point = o_filehdr.entrypt;
+ }
+
+ /*-------------------------------------------------------------------------*/
+ /* Read in string table so that we can see long section names, if needed. */
+ /* This used tobe read right before the symbol table was read, but now the */
+ /* section headers use "flexname" method to specify section names and so */
+ /* might need access to a string table entry. */
+ /*-------------------------------------------------------------------------*/
+ if (!cload_strings()) return FALSE;
+
+ /*-------------------------------------------------------------------------*/
+ /* READ IN SECTION HEADERS. */
+ /*-------------------------------------------------------------------------*/
+ if (sect_hdrs) myfree(sect_hdrs);
+ if (o_sect_hdrs) myfree(o_sect_hdrs);
+
+ if (!(sect_hdrs = myalloc((n_sections = file_hdr.f_nscns) * SCNHSZ)))
+ { load_err = E_ALLOC; return FALSE; }
+
+ fseek(fin, (long)FILHSZ_IN(coff_version) + file_hdr.f_opthdr, 0);
+
+ /*-------------------------------------------------------------------------*/
+ /* Depending on which version of COFF we are reading, set up the section */
+ /* headers or s copy that we can translate into the new version. */
+ /*-------------------------------------------------------------------------*/
+ if (ISCOFF_2(coff_version))
+ {
+ if (fread(sect_hdrs,SCNHSZ_IN(coff_version),n_sections,fin) != n_sections)
+ { load_err = E_FILE; return FALSE; }
+ }
+ else
+ {
+ if (!(o_sect_hdrs = myalloc(n_sections * SCNHSZ_IN(coff_version))))
+ { load_err = E_ALLOC; return FALSE; }
+
+ if (fread(o_sect_hdrs,SCNHSZ_IN(coff_version),n_sections,fin) != n_sections)
+ { load_err = E_FILE; return FALSE; }
+ }
+
+ if (reloc_amount) myfree(reloc_amount);
+
+ if (!(reloc_amount = myalloc(n_sections * sizeof(T_ADDR))))
+ { load_err = E_ALLOC; return FALSE; }
+
+ /*-------------------------------------------------------------------------*/
+ /* SWAP SECTION HEADERS IF REQUIRED. */
+ /*-------------------------------------------------------------------------*/
+ for (i = 0; i < n_sections; i++)
+ {
+ SCNHDR *sptr = SECT_HDR(i);
+ O_SCNHDR *tptr = O_SECT_HDR(i);
+
+ if (byte_swapped)
+ {
+ /*-----------------------------------------------------------------*/
+ /* Swap sections according to native COFF version. */
+ /*-----------------------------------------------------------------*/
+ if (ISCOFF_2(coff_version))
+ {
+ if (sptr->s_zeroes == 0L) swap4byte(&sptr->s_offset);
+ swap4byte(&sptr->s_paddr); swap4byte(&sptr->s_vaddr);
+ swap4byte(&sptr->s_size); swap4byte(&sptr->s_scnptr);
+ swap4byte(&sptr->s_relptr); swap4byte(&sptr->s_lnnoptr);
+ swap4byte(&sptr->s_nreloc); swap4byte(&sptr->s_nlnno);
+ swap4byte(&sptr->s_flags); swap2byte(&sptr->s_page);
+ }
+ else
+ {
+ swap4byte(&tptr->os_paddr); swap4byte(&tptr->os_vaddr);
+ swap4byte(&tptr->os_size); swap4byte(&tptr->os_scnptr);
+ swap4byte(&tptr->os_relptr); swap4byte(&tptr->os_lnnoptr);
+ swap2byte(&tptr->os_nreloc); swap2byte(&tptr->os_nlnno);
+ swap2byte(&tptr->os_flags);
+ }
+ }
+
+ /*---------------------------------------------------------------------*/
+ /* Old COFF version section headers are now ready to be transferred. */
+ /*---------------------------------------------------------------------*/
+ if (!ISCOFF_2(coff_version))
+ {
+ strncpy(sptr->s_name, tptr->os_name, SYMNMLEN);
+ sptr->s_paddr = tptr->os_paddr;
+ sptr->s_vaddr = tptr->os_vaddr;
+ sptr->s_size = tptr->os_size;
+ sptr->s_scnptr = tptr->os_scnptr;
+ sptr->s_relptr = tptr->os_relptr;
+ sptr->s_lnnoptr = tptr->os_lnnoptr;
+ sptr->s_nreloc = tptr->os_nreloc;
+ sptr->s_nlnno = tptr->os_nlnno;
+ sptr->s_flags = tptr->os_flags;
+ sptr->s_page = tptr->os_page;
+ }
+
+ reloc_amount[i] = 0;
+
+ /*---------------------------------------------------------------------*/
+ /* Fix up section name if it is a pointer into the string table. */
+ /*---------------------------------------------------------------------*/
+ if (sptr->s_zeroes == 0L)
+ {
+ STRTAB *packet = str_head;
+ while (sptr->s_offset < (long)packet->offset) packet = packet->next;
+ sptr->s_nptr = packet->buf + (sptr->s_offset - packet->offset);
+ }
+ }
+
+ /*-------------------------------------------------------------------------*/
+ /* CALL AN EXTERNAL ROUTINE TO DETERMINE THE RELOCATION AMOUNTS FOR */
+ /* EACH SECTION. */
+ /*-------------------------------------------------------------------------*/
+ if (!set_reloc_amount()) { load_err = E_SETRELOC; return FALSE; }
+ for (i = 0; i < n_sections; i++) need_reloc |= (reloc_amount[i] != 0);
+ if (!need_data) need_reloc = FALSE;
+
+ if (need_reloc && (file_hdr.f_flags & F_RELFLG))
+ { load_err = E_RELOC; return FALSE; }
+
+ if (verbose) load_msg(" %d sections, %s format, %s data\n %s\n",
+ n_sections,
+ byte_swapped ? "swapped" : "unswapped",
+ big_e_target ? "big-E" : "little-E",
+ need_reloc ? "Relocatable file" : "No reloc");
+
+ return TRUE;
+}
+
+
+/******************************************************************************/
+/* */
+/* CLOAD_DATA() - Read in the raw data and load it into memory. */
+/* */
+/******************************************************************************/
+int cload_data()
+{
+ int ok = TRUE;
+
+ if (!need_data) return TRUE;
+
+ /*-------------------------------------------------------------------------*/
+ /* LOOP THROUGH THE SECTIONS AND LOAD THEM ONE AT A TIME. */
+ /*-------------------------------------------------------------------------*/
+ for (curr_sect = 0; curr_sect < n_sections && ok; curr_sect++)
+ {
+ SCNHDR *sptr = SECT_HDR(curr_sect);
+ char *sname = (sptr->s_zeroes == 0L) ?
+ sptr->s_nptr : SNAMECPY(sptr->s_name);
+
+ /*----------------------------------------------------------------------*/
+ /* IF THIS IS THE TEXT SECTION, RELOCATE THE ENTRY POINT. */
+ /*----------------------------------------------------------------------*/
+ if ((sptr->s_flags & STYP_TEXT) && !strcmp(sname, ".text"))
+ entry_point += RUN_RELOC_AMOUNT(curr_sect);
+
+ /*----------------------------------------------------------------------*/
+ /* IGNORE EMPTY SECTIONS OR SECTIONS WHOSE FLAGS INDICATE THE */
+ /* SECTION IS NOT TO BE LOADED. IF THE CLEAR_BSS FLAG IS SET, BSS */
+ /* IS "LOADED" EVEN THOUGH IT HAS NO DATA, AND DEFER THE CINIT */
+ /* SECTION UNTIL LATER TO ENSURE BSS IS LOADED FIRST. */
+ /*----------------------------------------------------------------------*/
+ if ((sptr->s_scnptr || (clear_bss && IS_BSS(sptr))) &&
+ (sptr->s_size) &&
+ !(sptr->s_flags & STYP_DSECT) &&
+ !(sptr->s_flags & STYP_COPY) &&
+ !(sptr->s_flags & STYP_NOLOAD))
+ {
+ if (verbose) load_msg(" Loading <%s>,\taddr=0x%lx, size=0x%03lx",
+ sname, sptr->s_vaddr + reloc_amount[curr_sect],
+ sptr->s_size);
+
+ ok &= cload_sect_data(sptr);
+ if (verbose) load_msg("\n");
+ }
+
+ /*----------------------------------------------------------------------*/
+ /* IF CLEAR_BSS IS NOT SET, GO AHEAD AND DO CINIT IN ORDER. */
+ /*----------------------------------------------------------------------*/
+ if (!clear_bss && IS_CINIT(sptr))
+ {
+ if (verbose) load_msg(" Autoinitialization from <%s>", sname);
+ ok &= cload_sect_data(sptr);
+ if (verbose) load_msg("\n");
+ }
+ }
+
+ /*-------------------------------------------------------------------------*/
+ /* IF WE DEFERRED CINIT, LOAD IT/THEM NOW. */
+ /*-------------------------------------------------------------------------*/
+ if (clear_bss)
+ for (curr_sect = 0; curr_sect < n_sections && ok; curr_sect++)
+ {
+ SCNHDR *sptr = SECT_HDR(curr_sect);
+ char *sname = (sptr->s_zeroes == 0L) ?
+ sptr->s_nptr : SNAMECPY(sptr->s_name);
+
+ if (IS_CINIT(sptr))
+ {
+ if (verbose) load_msg(" Autoinitialization from <%s>", sname);
+ ok &= cload_sect_data(sptr);
+ if (verbose) load_msg("\n");
+ }
+ }
+
+ return ok;
+}
+
+
+/******************************************************************************/
+/* */
+/* CLOAD_SECT_DATA() - Read, relocate, and write out the data for one section.*/
+/* */
+/******************************************************************************/
+int cload_sect_data(sptr)
+ SCNHDR *sptr;
+{
+ T_ADDR addr = sptr->s_vaddr; /* CURRENT ADDRESS IN SECTION */
+ unsigned long nbytes; /* BYTE COUNT WITHIN SECTION */
+ int packet_size; /* SIZE OF CURRENT DATA BUFFER */
+ int excess = 0; /* BYTES LEFT FROM PREVIOUS BUFFER */
+ unsigned int n_reloc = 0; /* COUNTER FOR RELOCATION ENTRIES */
+ RELOC reloc; /* RELOCATION ENTRY */
+ unsigned char packet[LOADBUFSIZE]; /* LOAD BUFFER */
+ int relsz = RELSZ_IN(coff_version);
+
+ /*-------------------------------------------------------------------------*/
+ /* READ THE FIRST RELOCATION ENTRY, IF THERE ARE ANY. */
+ /* IF THIS IS A BSS SECTION, CLEAR THE LOAD BUFFER. */
+ /*-------------------------------------------------------------------------*/
+ if (need_reloc && sptr->s_nreloc &&
+ (fseek(fin, sptr->s_relptr, 0) != 0 || !reloc_read(&reloc)))
+ { load_err = E_FILE; return FALSE; }
+
+ if (IS_BSS(sptr))
+#ifdef OTIS
+ if (mem_fill((TRG_MVAL)0, LOCTOBYTE(sptr->s_size), addr, sptr->s_page))
+ return TRUE;
+ else { load_err = E_MEMWRITE; return FALSE; }
+#else
+ for (nbytes = 0; nbytes < LOADBUFSIZE; ++nbytes) packet[nbytes] = 0;
+#endif
+
+ /*-------------------------------------------------------------------------*/
+ /* COPY ALL THE DATA IN THE SECTION. */
+ /*-------------------------------------------------------------------------*/
+ for (nbytes = 0; nbytes < (unsigned long)LOCTOBYTE(sptr->s_size);
+ nbytes += packet_size)
+ {
+ int j;
+
+ /*----------------------------------------------------------------------*/
+ /* READ IN A BUFFER OF DATA. IF THE PREVIOUS RELOCATION SPANNED */
+ /* ACCROSS THE END OF THE LAST BUFFER, COPY THE LEFTOVER BYTES INTO */
+ /* THE BEGINNING OF THE NEW BUFFER. */
+ /*----------------------------------------------------------------------*/
+ for (j = 0; j < excess; ++j) packet[j] = packet[packet_size + j];
+
+ packet_size = (int)MIN(LOCTOBYTE(sptr->s_size) - nbytes, LOADBUFSIZE);
+
+ if ( !IS_BSS(sptr) &&
+ (fseek(fin, sptr->s_scnptr + (long)(nbytes + excess), 0) != 0 ||
+ fread(packet + excess, packet_size - excess, 1, fin) != 1))
+ { load_err = E_FILE; return FALSE; }
+ excess = 0;
+
+ /*----------------------------------------------------------------------*/
+ /* READ AND PROCESS ALL THE RELOCATION ENTRIES THAT AFFECT DATA */
+ /* CURRENTLY IN THE BUFFER. */
+ /*----------------------------------------------------------------------*/
+ if (need_reloc)
+ while (n_reloc < sptr->s_nreloc &&
+ (T_ADDR)reloc.r_vaddr < addr + BYTETOLOC(packet_size))
+ {
+ int i = (int)LOCTOBYTE(reloc.r_vaddr - addr);/*BYTE INDEX OF FIELD*/
+
+ /*----------------------------------------------------------------*/
+ /* IF THIS RELOCATION SPANS PAST THE END OF THE BUFFER, */
+ /* SET 'EXCESS' TO THE NUMBER OF REMAINING BYTES AND FLUSH THE */
+ /* BUFFER. AT THE NEXT FILL, THESE BYTES WILL BE COPIED FROM */
+ /* THE END OF THE BUFFER TO THE BEGINNING AND THEN RELOCATED. */
+ /*----------------------------------------------------------------*/
+ if (i + MAX((int)WORDSZ, reloc_size(reloc.r_type)) > packet_size)
+ {
+ i -= i % LOADWORDSIZE; /* DON'T BREAK WITHIN A WORD */
+ excess = packet_size - i;
+ packet_size = i;
+ break;
+ }
+
+ /*----------------------------------------------------------------*/
+ /* PERFORM THE RELOCATION AND READ IN THE NEXT RELOCATION ENTRY. */
+ /*----------------------------------------------------------------*/
+ if (!relocate(&reloc, packet + i, curr_sect)) return FALSE;
+
+ if (n_reloc++ < sptr->s_nreloc &&
+ (fseek(fin, sptr->s_relptr + ((long)n_reloc * relsz), 0) != 0 ||
+ !reloc_read(&reloc)))
+ { load_err = E_FILE; return FALSE; }
+ }
+
+ /*----------------------------------------------------------------------*/
+ /* WRITE OUT THE RELOCATED DATA TO THE TARGET DEVICE. IF THIS IS A */
+ /* CINIT SECTION, CALL A SPECIAL FUNCTION TO HANDLE IT. */
+ /*----------------------------------------------------------------------*/
+ if (!(IS_CINIT(sptr) ?
+ cload_cinit(packet, &packet_size, &excess) :
+ mem_write(packet, packet_size, addr + reloc_amount[curr_sect],
+ sptr->s_page)))
+ { load_err = E_MEMWRITE; return FALSE; }
+
+ /*----------------------------------------------------------------------*/
+ /* KEEP TRACK OF THE ADDRESS WITHIN THE SECTION. */
+ /*----------------------------------------------------------------------*/
+ addr += BYTETOLOC(packet_size);
+
+ if (verbose) load_msg(".");
+ }
+ return TRUE;
+}
+
+
+/******************************************************************************/
+/* */
+/* CLOAD_CINIT() - Process one buffer of C initialization records. */
+/* */
+/******************************************************************************/
+int cload_cinit(packet, packet_size, excess)
+ unsigned char *packet; /* LOAD BUFFER */
+ int *packet_size; /* POINTER TO BUFFER SIZE */
+ int *excess; /* RETURNED NUMBER OF UNUSED BYTES */
+{
+ int i; /* BYTE COUNTER */
+ int init_packet_size; /* SIZE OF CURRENT INITIALIZATION */
+ static T_ADDR init_addr; /* ADDRESS OF CURRENT INITIALIZATION */
+ int bss_sect; /* BSS SECTION ASSOC WITH CINIT SEC */
+
+ /*-------------------------------------------------------------------------*/
+ /* FIND THE BSS SECTION ASSOCIATED WITH THE THE CINIT SECTION CURRENTLY */
+ /* BEING LOADED. */
+ /*-------------------------------------------------------------------------*/
+ for (bss_sect = 0; bss_sect < n_sections; ++bss_sect)
+ if (IS_BSS(SECT_HDR(bss_sect))) break;
+
+ /*-------------------------------------------------------------------------*/
+ /* PROCESS ALL THE INITIALIZATION RECORDS IN THE BUFFER. */
+ /*-------------------------------------------------------------------------*/
+ for (i = 0; i < *packet_size; i += init_packet_size)
+ {
+ /*----------------------------------------------------------------------*/
+ /* IF STARTING A NEW INITIALIZATION, READ THE SIZE AND ADDRESS FROM */
+ /* THE TABLE. */
+ /*----------------------------------------------------------------------*/
+ if (init_size == 0)
+ {
+ T_SIZE temp;
+ int align;
+
+ /*-------------------------------------------------------------------*/
+ /* POSITION THE BYTE INDEX ON THE NEXT INIT RECORD. */
+ /*-------------------------------------------------------------------*/
+ if (align = (i % INIT_ALIGN)) i += (INIT_ALIGN - align);
+
+ /*-------------------------------------------------------------------*/
+ /* IF THE SIZE AND ADDRESS ARE NOT FULLY CONTAINED IN THIS BUFFER, */
+ /* STOP HERE. SET THE 'EXCESS' COUNTER TO THE NUMBER OF UNPROCESSED */
+ /* BYTES - THESE WILL BE COPIED TO THE HEAD OF THE NEXT BUFFER. */
+ /*-------------------------------------------------------------------*/
+ if ((int)(i + sizeof(T_SIZE)) > *packet_size)
+ { *excess += *packet_size - i; *packet_size = i; break; }
+
+ /*-------------------------------------------------------------------*/
+ /* IF THE NEXT SIZE FIELD IS ZERO, BREAK. */
+ /*-------------------------------------------------------------------*/
+ temp = unpack(packet + i, sizeof(T_SIZE)*8, sizeof(T_SIZE)*8, 0);
+ if (temp == 0) break;
+
+ /*-------------------------------------------------------------------*/
+ /* READ THE ADDRESS FIELD, IF IT'S ALL HERE. */
+ /*-------------------------------------------------------------------*/
+ if ((int)(i + sizeof(T_SIZE) + sizeof(T_IADDR)) > *packet_size)
+ { *excess += *packet_size - i; *packet_size = i; break; }
+
+ i += sizeof(T_SIZE);
+ init_size = temp;
+ init_addr = unpack(packet+i, sizeof(T_IADDR)*8, sizeof(T_IADDR)*8, 0);
+ i += sizeof(T_IADDR);
+ }
+
+ /*----------------------------------------------------------------------*/
+ /* WRITE OUT THE CURRENT PACKET, UP TO THE END OF THE BUFFER. */
+ /*----------------------------------------------------------------------*/
+ if (init_packet_size =
+ MIN(*packet_size - i, (int)(init_size * INIT_WSIZE)))
+ {
+ if (verbose)
+ load_msg("\n\tLoading <.cinit>,\taddr=0x%lx, size=0x%04lx",
+ init_addr, init_size);
+
+ if (!mem_write(packet + i, init_packet_size, init_addr,
+ SECT_HDR(bss_sect)->s_page))
+ return FALSE;
+
+ init_addr += BYTETOLOC(init_packet_size);
+ init_size -= init_packet_size / INIT_WSIZE;
+ }
+ }
+ return TRUE;
+}
+
+
+/******************************************************************************/
+/* */
+/* CLOAD_SYMBOLS() - Read in the symbol table. */
+/* */
+/******************************************************************************/
+int cload_symbols()
+{
+ SYMENT sym;
+ AUXENT aux;
+ long first, next;
+
+ if (file_hdr.f_nsyms == 0 || (!need_symbols && !need_reloc)) return TRUE;
+
+ /*------------------------------------------------------------------------*/
+ /* ALLOCATE THE RELOCATION SYMBOL TABLE. */
+ /*------------------------------------------------------------------------*/
+ if (need_reloc)
+ {
+ reloc_sym_index = 0;
+ reloc_tab_size = MIN(RELOC_TAB_START, (int)file_hdr.f_nsyms);
+
+ if (!(reloc_tab = myalloc(reloc_tab_size * sizeof(RELOC_TAB))))
+ { load_err = E_ALLOC; return FALSE; }
+ }
+
+ /*------------------------------------------------------------------------*/
+ /* IF THE APPLICATION NEEDS THE SYMBOL TABLE, LET IT READ IT IN. */
+ /* PASS NEED_RELOC TO THE APPLICATION SO THAT IT CAN CALL RELOC_ADD(). */
+ /*------------------------------------------------------------------------*/
+ if (need_symbols)
+ {
+ if (load_syms(need_reloc)) return TRUE;
+ else { load_err = E_SYM; return FALSE; }
+ }
+
+ /*------------------------------------------------------------------------*/
+ /* READ THE SYMBOL TABLE AND BUILD THE RELOCATION SYMBOL TABLE */
+ /* FOR SYMBOLS THAT CAN BE USED IN RELCOATION, STORE THEM IN A */
+ /* SPECIAL SYMBOL TABLE THAT CAN BE SEARCHED QUICKLY DURING */
+ /* RELOCATION. */
+ /*------------------------------------------------------------------------*/
+ for (first = 0; first < file_hdr.f_nsyms; first = next)
+ {
+ if (!(next = sym_read(first, &sym, &aux)))
+ { load_err = E_FILE; return FALSE; }
+
+ if (sym.n_sclass == C_EXT || sym.n_sclass == C_EXTREF ||
+ sym.n_sclass == C_STAT || sym.n_sclass == C_LABEL ||
+ sym.n_sclass == C_SYSTEM || sym.n_sclass == C_BLOCK ||
+ sym.n_sclass == C_FCN || sym.n_sclass == C_STATLAB ||
+ sym.n_sclass == C_EXTLAB)
+ if (!reloc_add(first, &sym)) return FALSE;
+ }
+ return TRUE;
+}
+
+
+/******************************************************************************/
+/* */
+/* CLOAD_STRINGS() - Read in the string table. */
+/* */
+/******************************************************************************/
+int cload_strings()
+{
+ unsigned long str_size; /* SIZE OF STRING TABLE */
+ unsigned long bufsize; /* SIZE OF CURRENT BUFFER */
+ unsigned int ntoread; /* AMOUNT TO READ FROM FILE */
+ int excess; /* AMOUNT LEFT OVER FROM LAST BUFFER */
+ STRTAB *packet; /* STRING TABLE BUFFER PACKET */
+
+ /*------------------------------------------------------------------------*/
+ /* FREE ANY PREVIOUS STRING BUFFERS */
+ /*------------------------------------------------------------------------*/
+ str_free(str_head); str_head = NULL;
+
+ /*------------------------------------------------------------------------*/
+ /* SEEK TO THE END OF THE SYMBOL TABLE AND READ IN THE SIZE OF THE STRING */
+ /* TABLE. */
+ /*------------------------------------------------------------------------*/
+ if ((file_hdr.f_nsyms == 0) ||
+ fseek(fin, file_hdr.f_symptr + (file_hdr.f_nsyms * SYMESZ), 0) != 0 ||
+ fread(&str_size, sizeof(long), 1, fin) != 1)
+ return TRUE;
+
+ if (byte_swapped) swap4byte(&str_size);
+
+ /*------------------------------------------------------------------------*/
+ /* THE STRING TABLE IS READ IN AS A LINKED LIST OF BUFFERS. TO */
+ /* PREVENT NAMES FROM BEING SPLIT ACROSS MULTIPLE BUFFERS, ANY PARTIAL */
+ /* NAME AT THE END OF A BUFFER IS COPIED INTO THE BEGINNING OF THE */
+ /* NEXT BUFFER. THE VARIABLE 'EXCESS' KEEPS TRACK OF HOW MUCH NEEDS */
+ /* TO BE COPIED FROM THE PREVIOUS BUFFER. */
+ /*------------------------------------------------------------------------*/
+ str_size -= 4; /* SUBTRACT OFF 4 BYTES ALREADY READ */
+ excess = 0; /* INITIALIZE LAST-BUFFER OVERFLOW */
+
+ if (verbose) load_msg(" %ld symbols. String table size=%ld\n",
+ file_hdr.f_nsyms, str_size ? str_size : 0L);
+
+ /*------------------------------------------------------------------------*/
+ /* READ STRING BUFFERS UNTIL THE WHOLE STRING TABLE IS READ. */
+ /*------------------------------------------------------------------------*/
+ while (str_size)
+ {
+ /*---------------------------------------------------------------------*/
+ /* ALLOCATE A NEW BUFFER. ON 16-BIT MACHINES, RESTRICT THE */
+ /* BUFFER SIZE TO THE MAXIMUM THAT CAN BE ALLOCATED AT ONCE. */
+ /*---------------------------------------------------------------------*/
+ bufsize = str_size + excess;
+
+ if (sizeof(int) < 4 && bufsize > MAX_STRING_ALLOC)
+ bufsize = MAX_STRING_ALLOC;
+
+ if (!(packet = myalloc(sizeof(STRTAB) + (unsigned int)bufsize - 1)))
+ { load_err = E_ALLOC; return FALSE; }
+
+ /*---------------------------------------------------------------------*/
+ /* COPY ANY PARTIAL STRING FROM THE LAST BUFFER INTO THIS ONE. */
+ /* THEN FILL THE REST OF THE BUFFER BY READING FROM THE FILE. */
+ /*---------------------------------------------------------------------*/
+ if (excess)
+ strncpy(packet->buf, str_head->buf + str_head->size, excess);
+
+ ntoread = (unsigned int)(bufsize - excess);
+ if (fread(packet->buf + excess, ntoread, 1, fin) != 1)
+ { load_err = E_FILE; return FALSE; }
+ str_size -= ntoread;
+
+ /*---------------------------------------------------------------------*/
+ /* IF THE BUFFER ENDS IN A PARTIAL STRING (DOESN'T END IN NULL), */
+ /* KEEP TRACK OF HOW MANY CHARACTERS ARE IN THE PARTIAL STRING */
+ /* SO THEY CAN BE COPIED INTO THE NEXT BUFFER. */
+ /*---------------------------------------------------------------------*/
+ for (excess = 0; packet->buf[bufsize - 1]; --bufsize, ++excess) ;
+
+ /*---------------------------------------------------------------------*/
+ /* LINK THE NEW BUFFER INTO THE HEAD OF THE LIST. */
+ /*---------------------------------------------------------------------*/
+ packet->size =
+ packet->index = bufsize;
+ packet->next = str_head;
+ packet->offset = str_head ? (str_head->offset + str_head->size) : 4;
+ str_head = packet;
+ }
+ return TRUE;
+}
+
+
+/******************************************************************************/
+/* */
+/* STR_FREE() - Free the list of string table buffers. */
+/* */
+/******************************************************************************/
+void str_free(str_head)
+ STRTAB *str_head;
+{
+ STRTAB *this, *next;
+
+ for (this = str_head; this; this = next)
+ {
+ next = this->next;
+ myfree(this);
+ }
+}
+
+
+
+/******************************************************************************/
+/* */
+/* SYM_READ() - Read and relocate a symbol and its aux entry. Return the */
+/* index of the next symbol. */
+/* */
+/******************************************************************************/
+long sym_read(index, sym, aux)
+ long index;
+ SYMENT *sym;
+ AUXENT *aux;
+{
+ /*------------------------------------------------------------------------*/
+ /* READ IN A SYMBOL AND ITS AUX ENTRY. */
+ /*------------------------------------------------------------------------*/
+ if (fseek(fin, file_hdr.f_symptr + (index * SYMESZ), 0) != 0 ||
+ fread(sym, SYMESZ, 1, fin) != 1 ||
+ (sym->n_numaux && fread(aux, SYMESZ, 1, fin) != 1))
+ { load_err = E_FILE; return FALSE; }
+
+ if (byte_swapped)
+ {
+ /*--------------------------------------------------------------------*/
+ /* SWAP THE SYMBOL TABLE ENTRY. */
+ /*--------------------------------------------------------------------*/
+ if (sym->n_zeroes == 0) swap4byte(&sym->n_offset);
+ swap4byte(&sym->n_value);
+ swap2byte(&sym->n_scnum);
+ swap2byte(&sym->n_type);
+
+ /*--------------------------------------------------------------------*/
+ /* SWAP THE AUX ENTRY, BASED ON THE STORAGE CLASS. */
+ /*--------------------------------------------------------------------*/
+ if (sym->n_numaux) switch(sym->n_sclass)
+ {
+ case C_FILE : break;
+
+ case C_STRTAG :
+ case C_UNTAG :
+ case C_ENTAG : swap4byte(&aux->x_tag.x_fsize);
+ swap4byte(&aux->x_tag.x_endndx);
+ break;
+
+ case C_FCN : if (!strcmp(sym->n_name, ".bf"))
+ {
+ swap2byte(&aux->x_block.x_lcnt);
+ swap4byte(&aux->x_block.x_regmask);
+ swap4byte(&aux->x_block.x_framesize);
+ }
+
+ case C_BLOCK : swap2byte(&aux->x_block.x_lnno);
+ swap4byte(&aux->x_block.x_endndx);
+ break;
+
+ case C_EOS : swap4byte(&aux->x_eos.x_fsize);
+ swap4byte(&aux->x_eos.x_tagndx);
+ break;
+
+ default : /*-------------------------------------------------*/
+ /* HANDLE FUNCTION DEFINITION SYMBOL */
+ /*-------------------------------------------------*/
+ if (((sym->n_type >> 4) & 3) == DT_FCN)
+ {
+ swap4byte(&aux->x_func.x_tagndx);
+ swap4byte(&aux->x_func.x_fsize);
+ swap4byte(&aux->x_func.x_lnnoptr);
+ swap4byte(&aux->x_func.x_endndx);
+ }
+
+ /*-------------------------------------------------*/
+ /* HANDLE ARRAYS. */
+ /*-------------------------------------------------*/
+ else if (((sym->n_type >> 4) & 3) == DT_ARY)
+ {
+ swap4byte(&aux->x_array.x_tagndx);
+ swap4byte(&aux->x_array.x_fsize);
+ swap2byte(&aux->x_array.x_dimen[0]);
+ swap2byte(&aux->x_array.x_dimen[1]);
+ swap2byte(&aux->x_array.x_dimen[2]);
+ swap2byte(&aux->x_array.x_dimen[3]);
+ }
+
+ /*-------------------------------------------------*/
+ /* HANDLE SECTION DEFINITIONS */
+ /*-------------------------------------------------*/
+ else if (sym->n_type == 0)
+ {
+ swap4byte(&aux->x_scn.x_scnlen);
+ swap2byte(&aux->x_scn.x_nreloc);
+ swap2byte(&aux->x_scn.x_nlinno);
+ }
+
+ /*-------------------------------------------------*/
+ /* HANDLE MISC SYMBOL RECORD */
+ /*-------------------------------------------------*/
+ else
+ {
+ swap4byte(&aux->x_sym.x_fsize);
+ swap4byte(&aux->x_sym.x_tagndx);
+ }
+ }
+ }
+
+ /*------------------------------------------------------------------------*/
+ /* RELOCATE THE SYMBOL, BASED ON ITS STORAGE CLASS. */
+ /*------------------------------------------------------------------------*/
+ switch(sym->n_sclass)
+ {
+ case C_SYSTEM :
+ case C_EXT :
+ case C_EXTREF :
+ case C_STAT :
+ case C_LABEL :
+ case C_BLOCK :
+ case C_FCN :
+ case C_STATLAB :
+ case C_EXTLAB :
+ /*------------------------------------------------------------------*/
+ /* IF THE SYMBOL IS UNDEFINED, CALL AN APPLICATION ROUTINE TO LOOK */
+ /* IT UP IN AN EXTERNAL SYMBOL TABLE. IF THE SYMBOL IS DEFINED, */
+ /* RELOCATE IT ACCORDING TO THE SECTION IT IS DEFINED IN. */
+ /*------------------------------------------------------------------*/
+ if (sym->n_scnum == 0)
+ lookup_sym((short)index, sym, aux);
+ else if (sym->n_scnum > 0)
+ {
+ if (sym->n_sclass == C_STATLAB || sym->n_sclass == C_EXTLAB)
+ sym->n_value += reloc_amount[sym->n_scnum - 1];
+ else sym->n_value += RUN_RELOC_AMOUNT(sym->n_scnum - 1);
+ }
+ }
+
+ return (index + sym->n_numaux + 1);
+}
+
+
+/******************************************************************************/
+/* */
+/* SYM_NAME() - Return a pointer to the name of a symbol in either the symbol */
+/* entry or the string table. */
+/* */
+/******************************************************************************/
+char *sym_name(symptr)
+ SYMENT *symptr;
+{
+ static char temp[9];
+
+ if (symptr->n_zeroes == 0)
+ {
+ STRTAB *packet = str_head;
+ while (symptr->n_offset < (long)packet->offset) packet = packet->next;
+
+ return packet->buf + (symptr->n_offset - packet->offset);
+ }
+
+ strncpy(temp, symptr->n_name, 8);
+ temp[8] = 0;
+ return temp;
+}
+
+
+/******************************************************************************/
+/* */
+/* SYM_ADD_NAME() - Given a symbol table entry, return a pointer to the */
+/* symbol's name in the string table. Add the name to the */
+/* table if it's not already there. */
+/* */
+/******************************************************************************/
+char *sym_add_name(symptr)
+ SYMENT *symptr;
+{
+ char *dest;
+ char *result;
+ int i;
+
+ /*------------------------------------------------------------------------*/
+ /* IF THE SYMBOL'S NAME WAS IN THE COFF STRING TABLE, LOOK THROUGH THE */
+ /* LIST OF STRING TABLE BUFFERS UNTIL FINDING THE ONE THE NAME IS IN, */
+ /* AND SIMPLY POINT INTO THE BUFFER. */
+ /*------------------------------------------------------------------------*/
+ if (symptr->n_zeroes == 0)
+ return sym_name(symptr);
+
+ /*------------------------------------------------------------------------*/
+ /* OTHERWISE ADD THE STRING TO THE STRING TABLE. */
+ /* ALLOCATE AND LINK IN A NEW PACKET IF NECESSARY. NEW PACKETS ARE */
+ /* LINKED TO THE HEAD OF THE LIST TO EASE ADDING NEW SYMBOLS. */
+ /*------------------------------------------------------------------------*/
+ if (!str_head || str_head->index + SYMNMLEN + 1 > str_head->size)
+ {
+ STRTAB *packet;
+
+ if (!(packet = myalloc(sizeof(STRTAB) + MIN_STRING_ALLOC - 1)))
+ { load_err = E_ALLOC; return NULL; }
+
+ packet->size = MIN_STRING_ALLOC;
+ packet->index = 0;
+ packet->next = str_head;
+ packet->offset = str_head ? (str_head->offset + str_head->size) : 4;
+ str_head = packet;
+ }
+
+ /*------------------------------------------------------------------------*/
+ /* COPY THE NAME INTO THE STRING TABLE. */
+ /*------------------------------------------------------------------------*/
+ result = dest = str_head->buf + str_head->index;
+ for (i = 0; *dest++ = symptr->n_name[i++]; )
+ if (i == SYMNMLEN) { *dest++ = '\0'; ++i; break; }
+
+ symptr->n_zeroes = 0;
+ symptr->n_offset = str_head->offset + str_head->index;
+ str_head->index += i;
+ return result;
+}
+
+
+/******************************************************************************/
+/* */
+/* RELOC_ADD() - Add an entry to the relocation symbol table. This table */
+/* stores relocation information for each relocatable symbol. */
+/* */
+/******************************************************************************/
+int reloc_add(index, sym)
+ long index;
+ SYMENT *sym;
+{
+ long disp; /* RELOCATION AMOUNT FOR THIS SYMBOL */
+
+ if (!need_reloc) return TRUE;
+
+ /*-------------------------------------------------------------------------*/
+ /* USE THE SYMBOL VALUE TO CALCULATE THE RELOCATION AMOUNT: */
+ /* 1) IF THE SYMBOL WAS UNDEFINED (DEFINED IN SECTION 0), USE THE */
+ /* SYMBOL'S VALUE. */
+ /* 2) IF THE SYMBOL HAS A POSITIVE SECTION NUMBER, USE THE RELOCATION */
+ /* AMOUNT FOR THE SECTION IN WHICH THE SYMBOL IS DEFINED. */
+ /* 3) OTHERWISE, THE SYMBOL IS ABSOLUTE, SO THE RELOCATION AMOUNT IS 0. */
+ /*-------------------------------------------------------------------------*/
+ if (sym->n_scnum == 0)
+ disp = sym->n_value;
+ else if (sym->n_scnum > 0)
+ {
+ if (sym->n_sclass == C_STATLAB || sym->n_sclass == C_EXTLAB)
+ disp = reloc_amount[sym->n_scnum - 1];
+ else disp = RUN_RELOC_AMOUNT(sym->n_scnum - 1);
+ }
+ else disp = 0;
+
+ /*-------------------------------------------------------------------------*/
+ /* IF THERE IS A NON-ZERO RELOCATION AMOUNT, ADD THE SYMBOL TO THE TABLE. */
+ /*-------------------------------------------------------------------------*/
+ if (disp == 0) return TRUE;
+
+ if (reloc_sym_index >= reloc_tab_size)
+ {
+ reloc_tab_size += RELOC_GROW_SIZE;
+ reloc_tab = mralloc((char *)reloc_tab, reloc_tab_size*sizeof(RELOC_TAB));
+
+ if (!reloc_tab) { load_err = E_ALLOC; return FALSE; }
+ }
+ reloc_tab[reloc_sym_index ].rt_index = index;
+ reloc_tab[reloc_sym_index++].rt_disp = disp;
+
+ return TRUE;
+}
+
+
+/******************************************************************************/
+/* */
+/* RELOCATE() - Perform a single relocation by patching the raw data. */
+/* */
+/******************************************************************************/
+int relocate(rp, data, s)
+ RELOC *rp; /* RELOCATION ENTRY */
+ unsigned char *data; /* DATA BUFFER */
+ int s; /* INDEX OF CURRENT SECTION */
+{
+ int fieldsz = reloc_size(rp->r_type); /* SIZE OF ACTUAL PATCH VALUE */
+ int offset = reloc_offset(rp->r_type); /* OFFSET OF ACTUAL PATCH VALUE */
+ int wordsz = MAX(fieldsz, reloc_stop(rp->r_type)); /* SIZE CONTAINING FLD */
+ long objval; /* FIELD TO BE PATCHED */
+ long reloc_amt; /* AMOUNT OF RELOCATION */
+
+ int pp_shift_cnt = 0;
+ int pp_local = FALSE;
+ int pp_neg = FALSE;
+
+ if (rp->r_type == R_ABS) return TRUE; /* NOTHING TO DO */
+
+ /*-------------------------------------------------------------------------*/
+ /* DETERMINE THE RELOCATION AMOUNT FROM THE RELOCATION SYMBOL TABLE. */
+ /*-------------------------------------------------------------------------*/
+ reloc_amt = (rp->r_symndx == -1) ? RUN_RELOC_AMOUNT(s)
+ : sym_reloc_amount(rp);
+
+ /*-------------------------------------------------------------------------*/
+ /* EXTRACT THE RELOCATABLE FIELD FROM THE OBJECT DATA. */
+ /*-------------------------------------------------------------------------*/
+ objval = unpack(data, fieldsz, wordsz, offset + BIT_OFFSET(rp->r_vaddr));
+
+ /*-------------------------------------------------------------------------*/
+ /* MODIFY THE FIELD BASED ON THE RELOCATION TYPE. */
+ /*-------------------------------------------------------------------------*/
+ switch (rp->r_type)
+ {
+ /*----------------------------------------------------------------------*/
+ /* NORMAL RELOCATIONS: ADD IN THE RELOCATION AMOUNT. */
+ /*----------------------------------------------------------------------*/
+ case R_RELBYTE:
+ case R_RELWORD:
+ case R_REL24:
+ case R_RELLONG:
+ case R_DIR32:
+ case R_PARTLS16:
+ objval += reloc_amt;
+ break;
+
+ /*--------------------------------------------------------------------*/
+ /* ADD IN THE RELOCATION AMOUNT, BUT MAKE SURE WE'RE STILL IN THE */
+ /* 370'S REGISTER FILE. */
+ /*--------------------------------------------------------------------*/
+ case R_RRNREG:
+ case R_RRRELREG:
+ if (rp->r_type == R_RRNREG)
+ objval = ((char)objval + reloc_amt);
+ else objval += reloc_amt;
+
+ if (objval & ((-1L >> 8*fieldsz) << 8*fieldsz))
+ {
+ /* ERROR */
+ }
+
+ break;
+
+ /*--------------------------------------------------------------------*/
+ /* PP UNSCALED 15-BIT OFFSET RELOCATION. */
+ /*--------------------------------------------------------------------*/
+ case R_PP15 :
+ case R_PPL15 :
+ case R_PPN15 :
+ case R_PPLN15 :
+ {
+ int bit;
+ char *sname = (SECT_HDR(s)->s_zeroes == 0L) ?
+ SECT_HDR(s)->s_nptr : SNAMECPY(SECT_HDR(s)->s_name);
+
+ pp_local = (rp->r_type == R_PPL15) || (rp->r_type == R_PPLN15);
+
+ /*--------------------------------------------------------------*/
+ /* IF NEGATIVE RELOC TYPE, THEN TREAT CONST OFFSET AS A NEGATIVE*/
+ /*--------------------------------------------------------------*/
+ if (rp->r_type == R_PPN15 || rp->r_type == R_PPLN15)
+ {
+ objval = -objval;
+ rp->r_type -= 010; /* CHANGE TYPE TO NON NEG. */
+ }
+
+ objval += reloc_amt;
+
+ /*--------------------------------------------------------------*/
+ /* IF THE ADDRESS STILL FALLS WITHIN AN APPROPRIATE RANGE */
+ /*--------------------------------------------------------------*/
+ if ((objval >= 0x00000000 && objval <= 0x00007fff) ||
+ (objval >= 0x01000000 && objval <= 0x010007ff) )
+ break;
+
+ /*--------------------------------------------------------------*/
+ /* IF THE ADDRESS FALLS OUTSIDE AN APPROPRIATE RANGE, BUT CAN */
+ /* BE SCALED BY SIZE TO GET BACK INTO RANGE, THEN READ THE UPPER*/
+ /* BIT OF THE SIZE FIELD. IF IT IS A 1, THEN WE CAN SCALE THIS */
+ /* OFFSET BY 4, IF IT IS 0, THEN WE CAN SCALE THIS OFFSET BY 2. */
+ /*--------------------------------------------------------------*/
+ bit = unpack(data, 1, 64, pp_local ? 30 : 8);
+
+ /*--------------------------------------------------------------*/
+ /* DETERMINE IF THE OFFSET IS ALIGNED FOR SCALING. IF SO, */
+ /* THEN PACK THE SCALED OFFSET INTO INSTRUCTION, CHANGE THE */
+ /* RELOC TYPE TO SCALED, AND TURN ON SCALE BIT IN INSTRUCT. */
+ /*--------------------------------------------------------------*/
+ if (!(objval & ((2<<bit)-1)) &&
+ (objval >>= (bit+1)) >= 0 && objval <= 0x7fff)
+ {
+ rp->r_type = pp_local ? (bit ? R_PPL15W : R_PPL15H) :
+ (bit ? R_PP15W : R_PP15H);
+ repack(1, data, 1, 64, pp_local ? 28 : 6);
+ break;
+ }
+
+ /*--------------------------------------------------------------*/
+ /* ERROR, THE OFFSET WILL NOT FIT SCALED OR UNSCALED. */
+ /*--------------------------------------------------------------*/
+ if (verbose)
+ load_msg( "PP 15-bit offset overflow at %08lx in section %s",
+ rp->r_vaddr, sname);
+ load_err = E_RELOCENT;
+ return FALSE;
+ }
+
+ /*--------------------------------------------------------------------*/
+ /* PP SCALED 15-BIT OFFSET RELOCATION. FOR R_PP15W THE RELOC_AMT IS */
+ /* DIVIDED BY 4. FOR R_PP15H THE RELOC_AMT IS DIVIDED BY 2. */
+ /*--------------------------------------------------------------------*/
+ case R_PP15W :
+ case R_PPL15W :
+ case R_PPN15W :
+ case R_PPLN15W : pp_shift_cnt++; /* FALL THROUGH */
+
+ case R_PP15H :
+ case R_PPL15H :
+ case R_PPN15H :
+ case R_PPLN15H : pp_shift_cnt++; /* FALL THROUGH */
+ {
+ long obj_addr_x;
+ char *sname = (SECT_HDR(s)->s_zeroes == 0) ?
+ SECT_HDR(s)->s_nptr : SNAMECPY(SECT_HDR(s)->s_name);
+
+ /*--------------------------------------------------------------*/
+ /* NOTE THAT THIS IS DEPENDENT ON THE NUMBERING OF THESE RELOC */
+ /* VALUES. */
+ /*--------------------------------------------------------------*/
+ pp_local = (rp->r_type & 4);
+
+ /*--------------------------------------------------------------*/
+ /* IF NEGATIVE RELOC TYPE, THEN TREAT CONST OFFSET AS NEGATIVE */
+ /*--------------------------------------------------------------*/
+ if (rp->r_type >= R_PPN15)
+ {
+ objval = -objval;
+ rp->r_type -= 010; /* CHANGE TYPE TO NON NEG. */
+ }
+
+ obj_addr_x = (objval << pp_shift_cnt) + reloc_amt;
+
+ /*--------------------------------------------------------------*/
+ /* LINK TIME ADDRESS VIOLATES THE SCALING FACTOR WE ARE USING */
+ /* FOR THIS OPERAND. UNSCALE THE VALUE IF IT WILL FIT IN 15 BITS*/
+ /* BY CHANGING RELOC TYPE TO UNSCALED, AND CHANGING SCALE BIT */
+ /* IN THE INSTRUCTION. */
+ /*--------------------------------------------------------------*/
+ if (pp_shift_cnt && (reloc_amt & ((1<<pp_shift_cnt)-1)))
+ {
+ objval = obj_addr_x;
+ rp->r_type = (pp_local ? R_PPL15 : R_PP15);
+ repack(0, data, 1, 64, pp_local ? 28 : 6);
+ }
+ else objval = obj_addr_x >> pp_shift_cnt;
+
+ /*--------------------------------------------------------------*/
+ /* IF THE ADDRESS STILL FALLS WITHIN AN APPROPRIATE RANGE */
+ /*--------------------------------------------------------------*/
+ if ((objval >= 0x00000000 && objval <= 0x00007fff) ||
+ (obj_addr_x >= 0x01000000 && obj_addr_x <= 0x010007ff) )
+ break;
+
+ /*--------------------------------------------------------------*/
+ /* ERROR, THE OFFSET WILL NOT FIT SCALED OR UNSCALED. */
+ /*--------------------------------------------------------------*/
+ if (verbose)
+ load_msg( "PP 15-bit offset overflow at %08lx in section %s",
+ rp->r_vaddr, sname);
+ load_err = E_RELOCENT;
+ return FALSE;
+ }
+
+ /*--------------------------------------------------------------------*/
+ /* PP 16-bit byte offset relocation. For R_PP16B the lower 15-bits */
+ /* are handled just like R_PP15, and the upper bit is placed in the */
+ /* scale indicator bit of the field. */
+ /*--------------------------------------------------------------------*/
+ case R_PP16B :
+ case R_PPL16B :
+ case R_PPN16B :
+ case R_PPLN16B :
+ {
+ char *sname = (SECT_HDR(s)->s_zeroes == 0) ?
+ SECT_HDR(s)->s_nptr : SNAMECPY(SECT_HDR(s)->s_name);
+
+ pp_local = (rp->r_type == R_PPL16B) || (rp->r_type == R_PPLN16B);
+
+ /*--------------------------------------------------------------*/
+ /* READ THE SCALE BIT (16th BIT) AND CREATE 16 BIT CONSTANT OFF */
+ /*--------------------------------------------------------------*/
+ objval |= (unpack(data, 1, 64, pp_local ? 28 : 6) << 15);
+
+ /*--------------------------------------------------------------*/
+ /* IF NEGATIVE RELOC TYPE, THEN TREAT CONST OFFSET AS NEGATIVE */
+ /*--------------------------------------------------------------*/
+ if (rp->r_type == R_PPN16B || rp->r_type == R_PPLN16B)
+ {
+ objval = - objval;
+ rp->r_type -= 010; /* CHANGE THE TYPE TO A NON NEG TYPE. */
+ }
+
+ objval += reloc_amt;
+
+ /*--------------------------------------------------------------*/
+ /* IF THE ADDRESS STILL FALLS WITHIN AN APPROPRIATE RANGE */
+ /*--------------------------------------------------------------*/
+ if ((objval >= 0x00000000 && objval <= 0x0000ffff) ||
+ (objval >= 0x01000000 && objval <= 0x010007ff) )
+ {
+ /*-----------------------------------------------------------*/
+ /* RELOCATE THE 16TH BIT OF THE ADDRESS. */
+ /*-----------------------------------------------------------*/
+ repack(((objval&0x8000) >> 15), data, 1, 64, pp_local ? 28 : 6);
+ break;
+ }
+
+ /*--------------------------------------------------------------*/
+ /* ADDRESS IS OUT OF RANGE. */
+ /*--------------------------------------------------------------*/
+ if (verbose)
+ load_msg( "PP 15-bit offset overflow at %08lx in section %s",
+ rp->r_vaddr, sname);
+ load_err = E_RELOCENT;
+ return FALSE;
+ }
+
+ /*--------------------------------------------------------------------*/
+ /* PP BASE ADDRESS RELOCATION. BIT 0 IS 0 IF IN DATA RAM, 1 IF IN */
+ /* PARAMETER RAM. THIS CODE ASSUMES THAT WE DO NOT RELOCATE FROM */
+ /* PRAM TO DRAM OR FROM DRAM TO PRAM AT LOAD TIME. */
+ /*--------------------------------------------------------------------*/
+ case R_PPLBASE: pp_local = TRUE;
+ case R_PPBASE:
+ {
+ /*---------------------------------------------------------------*/
+ /* IF WAS DRAM AND RELOC_AMT IS GREAT ENOUGH TO MOVE INTO PRAM, */
+ /* CHANGE TO PRAM */
+ /*---------------------------------------------------------------*/
+ if (!objval && reloc_amt > (long)(0x01000000 - 0xC000)) objval = 1;
+
+ /*---------------------------------------------------------------*/
+ /* IF WAS PRAM AND RELOC_AMT IS NEGATIVE AND CAN MOVE INTO DRAM, */
+ /* CHANGE TO DRAM */
+ /*---------------------------------------------------------------*/
+ else if (objval && (-reloc_amt) > (long)(0x01000000 - 0xC000))
+ objval = 0;
+
+ break;
+ }
+
+ /*----------------------------------------------------------------------*/
+ /* 34010 ONE'S COMPLEMENT RELOCATION. SUBTRACT INSTEAD OF ADD. */
+ /*----------------------------------------------------------------------*/
+ case R_OCRLONG:
+ objval -= reloc_amt;
+ break;
+
+ /*----------------------------------------------------------------------*/
+ /* 34020 WORD-SWAPPED RELOCATION. SWAP BEFORE RELOCATING. */
+ /*----------------------------------------------------------------------*/
+ case R_GSPOPR32:
+ case R_OCBD32:
+ objval = ((objval >> 16) & 0xFFFF) | (objval << 16);
+ objval += (rp->r_type == R_GSPOPR32) ? reloc_amt : -reloc_amt;
+ objval = ((objval >> 16) & 0xFFFF) | (objval << 16);
+ break;
+
+ /*----------------------------------------------------------------------*/
+ /* PC-RELATIVE RELOCATIONS. IN THIS CASE THE RELOCATION AMOUNT */
+ /* IS ADJUSTED BY THE PC DIFFERENCE. IF THIS IS AN INTERNAL */
+ /* RELOCATION TO THE CURRENT SECTION, NO ADJUSTMENT IS NEEDED. */
+ /*----------------------------------------------------------------------*/
+ case R_PCRBYTE:
+ case R_PCRWORD:
+ case R_GSPPCR16:
+ case R_GSPPCA16:
+ case R_PCRLONG:
+ case R_PCR24:
+ {
+ int shift = 8 * (4 - fieldsz);
+ unsigned long pcdif = RUN_RELOC_AMOUNT(s);
+
+ /*----------------------------------------------------------------*/
+ /* HANDLE SPECIAL CASES OF JUMPING FROM ABSOLUTE SECTIONS (SPECIAL*/
+ /* RELOC TYPE) OR TO ABSOLUTE DESTINATION (SYMNDX == -1). IN */
+ /* EITHER CASE, SET THE APPROPRIATE RELOCATION AMOUNT TO 0. */
+ /*----------------------------------------------------------------*/
+ if( rp->r_symndx == -1 ) reloc_amt = 0;
+ if( rp->r_type == R_GSPPCA16) pcdif = 0;
+
+ reloc_amt -= pcdif;
+
+ if (rp->r_type == R_GSPPCR16 || rp->r_type == R_GSPPCA16)
+ reloc_amt >>= 4; /* BITS TO WORDS */
+
+ objval = (long)(objval << shift) >> shift; /* SIGN EXTEND */
+ objval += reloc_amt;
+ break;
+ }
+
+ /*----------------------------------------------------------------------*/
+ /* 320C30 PAGE-ADDRESSING RELOCATION. CALCULATE THE ADDRESS FROM */
+ /* THE 8-BIT PAGE VALUE IN THE FIELD, THE 16-BIT OFFSET IN THE RELOC */
+ /* ENTRY, AND THE RELOCATION AMOUNT. THEN, STORE THE 8-BIT PAGE */
+ /* VALUE OF THE RESULT BACK IN THE FIELD. */
+ /*----------------------------------------------------------------------*/
+ case R_PARTMS8:
+ objval = (long)((objval << 16) + rp->r_disp + reloc_amt) >> 16;
+ break;
+
+ /*----------------------------------------------------------------------*/
+ /* DSP(320) PAGE-ADDRESSING. CALCULATE ADDRESS FROM THE 16-BIT */
+ /* VALUE IN THE RELOCATION FIELD PLUS THE RELOCATION AMOUNT. OR THE */
+ /* TOP 9 BITS OF THIS RESULT INTO THE RELOCATION FIELD. */
+ /*----------------------------------------------------------------------*/
+ case R_PARTMS9:
+ objval = (objval & 0xFE00) |
+ (((long)(rp->r_disp + reloc_amt) >> 7) & 0x1FF);
+ break;
+
+ /*----------------------------------------------------------------------*/
+ /* DSP(320) PAGE-ADDRESSING. CALCULATE ADDRESS AS ABOVE, AND OR THE */
+ /* 7-BIT DISPLACEMENT INTO THE FIELD. */
+ /*----------------------------------------------------------------------*/
+ case R_PARTLS7:
+ objval = (objval & 0x80) | ((rp->r_disp + reloc_amt) & 0x7F);
+ break;
+
+ /*--------------------------------------------------------------------*/
+ /* RR(370) MSB RELOCATION. CALCULATE ADDRESS FROM THE 16-BIT VALUE */
+ /* IN THE RELOCATION ENTRY PLUS THE RELOCATION AMOUNT. PATCH THE */
+ /* MSB OF THE RESULT INTO THE RELOCATION FIELD. */
+ /*--------------------------------------------------------------------*/
+ case R_HIWORD:
+ objval += (rp->r_disp += (unsigned short)reloc_amt) >> 8;
+ break;
+
+ /*--------------------------------------------------------------------*/
+ /* C8+ High byte of 24-bit address. Calculate address from 24-bit */
+ /* value in the relocation entry plus the relocation amount. Patch */
+ /* the MSB of the result into the relocation field. */
+ /*--------------------------------------------------------------------*/
+ case R_C8PHIBYTE:
+ objval = (((objval << 16) + rp->r_disp + reloc_amt) >> 16);
+ break;
+
+ /*--------------------------------------------------------------------*/
+ /* C8+ Middle byte of 24-bit address. Calculate address from 24-bit */
+ /* value in the relocation entry plus the relocation amount. Patch */
+ /* the middle byte of the result into the relocation field. */
+ /*--------------------------------------------------------------------*/
+ case R_C8PMIDBYTE:
+ objval = (((objval << 16) + rp->r_disp + reloc_amt) >> 8);
+ break;
+
+ /*--------------------------------------------------------------------*/
+ /* C8+ Vector Address. Calculate address from 24-bit value in the */
+ /* relocation entry plus the relocation amount. MSB must be 0xFF */
+ /* since interrupt and trap handlers must be programmed in the top- */
+ /* most segment of memory. Patch bottom 16-bits of the result into */
+ /* the relocation field. */
+ /*--------------------------------------------------------------------*/
+ case R_C8PVECADR:
+ objval += reloc_amt;
+ if ((objval & 0xFF0000) != 0xFF0000)
+ {
+ /* ERROR */
+ }
+ objval &= 0xFFFF;
+ break;
+
+ /*----------------------------------------------------------------------*/
+ /* C8+ 24-bit Address. The byte ordering for 24-bit addresses on the */
+ /* C8+ is reversed (low, middle, high). Needs to be unordered, add */
+ /* in reloc_amt, then re-ordered. */
+ /*----------------------------------------------------------------------*/
+ case R_C8PADR24:
+ objval = ((objval>>16) | (objval&0xff00) | ((objval&0xff)<<16));
+ objval += reloc_amt;
+ objval = ((objval>>16) | (objval&0xff00) | ((objval&0xff)<<16));
+ break;
+
+ /*----------------------------------------------------------------------*/
+ /* DSP(320) 13-BIT CONSTANT. RELOCATE ONLY THE LOWER 13 BITS OF THE */
+ /* FIELD. */
+ /*----------------------------------------------------------------------*/
+ case R_REL13:
+ objval = (objval & 0xE000) | ((objval + reloc_amt) & 0x1FFF);
+ break;
+
+ /*----------------------------------------------------------------------*/
+ /* PRISM (370/16) code label relocation. Convert word address to byte */
+ /* address, add in relocation, convert back to word address. */
+ /*----------------------------------------------------------------------*/
+ case R_LABCOD:
+ objval = ((objval << 1) + reloc_amt) >> 1;
+ break;
+ }
+
+ /*-------------------------------------------------------------------------*/
+ /* PACK THE RELOCATED FIELD BACK INTO THE OBJECT DATA. */
+ /*-------------------------------------------------------------------------*/
+ repack(objval, data, fieldsz, wordsz, offset + BIT_OFFSET(rp->r_vaddr));
+ return TRUE;
+}
+
+
+/******************************************************************************/
+/* */
+/* RELOC_READ() - Read a single relocation entry. */
+/* */
+/******************************************************************************/
+int reloc_read(rptr)
+ RELOC *rptr;
+{
+#if COFF_VERSION_1 || COFF_VERSION_2
+ /*------------------------------------------------------------------------*/
+ /* THE FOLLOWING UNION IS USED TO READ IN VERSION 0 OR 1 RELOC ENTRIES */
+ /*------------------------------------------------------------------------*/
+ /* THE FORMAT OF RELOCATION ENTRIES CHANGED BETWEEN COFF VERSIONS 0 AND 1.*/
+ /* VERSION 0 HAS A 16 BIT SYMBOL INDEX, WHILE VERSION 1 HAS A 32 BIT INDX.*/
+ /*------------------------------------------------------------------------*/
+ union { RELOC new; RELOC_OLD old; } input_entry;
+
+ if (fread(&input_entry, RELSZ_IN(coff_version), 1, fin) != 1)
+ { load_err = E_FILE; return FALSE; }
+
+ /*------------------------------------------------------------------------*/
+ /* IF LOADING A VERSION 0 FILE, TRANSLATE ENTRY TO VERSION 1 FORMAT. */
+ /* (THIS COULD BE SIMPLER - ALL THE SWAPS EXCEPT FOR THE SYMBOL INDEX */
+ /* COULD BE DONE AFTER THE TRANSLATION - BUT THIS SEEMS TO BE CLEARER) */
+ /*------------------------------------------------------------------------*/
+ if (ISCOFF_0(coff_version))
+ {
+ if (byte_swapped)
+ {
+ swap4byte(&input_entry.old.r_vaddr);
+ swap2byte(&input_entry.old.r_symndx);
+ swap2byte(&input_entry.old.r_disp);
+ swap2byte(&input_entry.old.r_type);
+ }
+ rptr->r_vaddr = input_entry.old.r_vaddr;
+ rptr->r_symndx = input_entry.old.r_symndx;
+ rptr->r_disp = input_entry.old.r_disp;
+ rptr->r_type = input_entry.old.r_type;
+ }
+ else
+ {
+ if (byte_swapped)
+ {
+ swap4byte(&rptr->r_vaddr); swap4byte(&rptr->r_symndx);
+ swap2byte(&rptr->r_disp); swap2byte(&rptr->r_type);
+ }
+ *rptr = input_entry.new;
+ }
+
+#else
+ /*-------------------------------------------------------------------------*/
+ /* READ IN AND BYTE SWAP AN VERSION 0 RELOC ENTRY */
+ /*-------------------------------------------------------------------------*/
+ if (fread(rptr, RELSZ, 1, fin) != 1) { load_err = E_FILE; return FALSE; }
+
+ if (byte_swapped)
+ {
+ swap4byte(&rptr->r_vaddr);
+ swap2byte(&rptr->r_symndx);
+ swap2byte(&rptr->r_disp);
+ swap2byte(&rptr->r_type);
+ }
+#endif
+
+ return TRUE;
+}
+
+
+/*************************************************************************/
+/* */
+/* RELOC_SIZE()- */
+/* Return the field size of a relocation type. */
+/* */
+/*************************************************************************/
+
+int reloc_size(type)
+ int type;
+{
+ switch (type)
+ {
+ case R_PPBASE:
+ case R_PPLBASE: return 1;
+
+ case R_HIWORD:
+ case R_C8PHIBYTE:
+ case R_C8PMIDBYTE:
+ case R_RELBYTE:
+ case R_PCRBYTE:
+ case R_RRNREG:
+ case R_RRRELREG:
+ case R_PARTLS7: return 8;
+
+ case R_PP15:
+ case R_PP15W:
+ case R_PP15H:
+ case R_PP16B:
+ case R_PPN15:
+ case R_PPN15W:
+ case R_PPN15H:
+ case R_PPN16B:
+ case R_PPL15:
+ case R_PPL15W:
+ case R_PPL15H:
+ case R_PPL16B:
+ case R_PPLN15:
+ case R_PPLN15W:
+ case R_PPLN15H:
+ case R_PPLN16B: return 15;
+
+ case R_LABCOD:
+ case R_RELWORD:
+ case R_PCRWORD:
+ case R_GSPPCR16:
+ case R_GSPPCA16:
+ case R_PARTLS16:
+ case R_PARTMS8:
+ case R_PARTMS9:
+ case R_REL13:
+ case R_C8PVECADR: return 16;
+
+ case R_REL24:
+ case R_PCR24:
+ case R_PCR24W:
+ case R_C8PADR24: return 24;
+
+ case R_MPPCR:
+ case R_GSPOPR32:
+ case R_RELLONG:
+ case R_PCRLONG:
+ case R_OCBD32:
+ case R_OCRLONG:
+ case R_DIR32: return 32;
+
+ default: return 0;
+ }
+}
+
+
+/*************************************************************************/
+/* */
+/* RELOC_OFFSET()- */
+/* Return the offset of a relocation type field. The value of */
+/* offset should be the bit offset of the LSB of the field in */
+/* little-endian mode. */
+/* */
+/*************************************************************************/
+
+int reloc_offset(type)
+ int type;
+{
+ switch (type)
+ {
+ case R_PP15 :
+ case R_PP15W :
+ case R_PP15H :
+ case R_PP16B :
+ case R_PPN15 :
+ case R_PPN15W :
+ case R_PPN15H :
+ case R_PPN16B :
+ case R_PPLBASE : return 22;
+
+ case R_PPL15 :
+ case R_PPL15W :
+ case R_PPL15H :
+ case R_PPL16B :
+ case R_PPLN15 :
+ case R_PPLN15W :
+ case R_PPLN15H :
+ case R_PPLN16B :
+ case R_PPBASE : return 0;
+
+ default : return 0;
+ }
+}
+
+
+/*************************************************************************/
+/* */
+/* RELOC_STOP() - */
+/* Return the number of bits to read for a relocation type. */
+/* */
+/*************************************************************************/
+
+int reloc_stop(type)
+ int type;
+{
+ switch (type)
+ {
+ case R_PPBASE :
+ case R_PPLBASE :
+
+ case R_PP15 :
+ case R_PP15W :
+ case R_PP15H :
+ case R_PP16B :
+
+ case R_PPL15 :
+ case R_PPL15W :
+ case R_PPL15H :
+ case R_PPL16B :
+
+ case R_PPN15 :
+ case R_PPN15W :
+ case R_PPN15H :
+ case R_PPN16B :
+
+ case R_PPLN15 :
+ case R_PPLN15W :
+ case R_PPLN15H :
+ case R_PPLN16B : return 64;
+
+ default : return WORDSZ * 8;
+ }
+}
+
+
+/******************************************************************************/
+/* */
+/* SYM_RELOC_AMOUNT() - Determine the amount of relocation for a particular */
+/* relocation entry. Search the relocation symbol table */
+/* for the referenced symbol, and return the amount from */
+/* the table. */
+/* */
+/******************************************************************************/
+long sym_reloc_amount(rp)
+ RELOC *rp;
+{
+ long index = rp->r_symndx;
+
+ int i = 0,
+ j = reloc_sym_index - 1;
+
+ /*-------------------------------------------------------------------------*/
+ /* THIS IS A SIMPLE BINARY SEARCH (THE RELOC TABLE IS ALWAYS SORTED). */
+ /*-------------------------------------------------------------------------*/
+ while (i <= j)
+ {
+ int m = (i + j) / 2;
+ if (reloc_tab[m].rt_index < index) i = m + 1;
+ else if (reloc_tab[m].rt_index > index) j = m - 1;
+ else return reloc_tab[m].rt_disp; /* FOUND */
+ }
+
+ /*-------------------------------------------------------------------------*/
+ /* IF NOT FOUND, SYMBOL WAS NOT RELOCATED. */
+ /*-------------------------------------------------------------------------*/
+ return 0;
+}
+
+
+/******************************************************************************/
+/* */
+/* UNPACK() - Extract a relocation field from object bytes and convert into */
+/* a long so it can be relocated. */
+/* */
+/******************************************************************************/
+unsigned long unpack(data, fieldsz, wordsz, bit_offset)
+ unsigned char *data;
+ int fieldsz;
+ int wordsz;
+ int bit_offset;
+{
+ register int i;
+ unsigned long objval;
+ int start; /* MS byte with reloc data */
+ int stop; /* LS byte with reloc data */
+ int r = bit_offset & 7; /* num unused LS bits in stop */
+ int l = 8 - r; /* num used MS bits in stop */
+ int tr = ((bit_offset+fieldsz-1) & 7)+1; /* # LS bits in strt*/
+ int tl = 8 - tr; /* num unused MS bits in start */
+
+ start = (big_e_target ? (wordsz-fieldsz-bit_offset) :
+ (bit_offset+fieldsz-1)) >>3;
+ stop = (big_e_target ? (wordsz-bit_offset-1) : bit_offset) >>3;
+
+ if (start == stop) return (data[stop] >> r) & ((0x1 << fieldsz) - 0x1);
+
+ objval = (unsigned)((data[start] << tl) & 0xFF) >> tl;
+
+ if (big_e_target)
+ for (i=start+1; i<stop; ++i) objval = (objval << 8) | data[i];
+ else for (i=start-1; i>stop; --i) objval = (objval << 8) | data[i];
+
+ return (objval << l) | (data[stop] >> r);
+}
+
+
+
+/******************************************************************************/
+/* */
+/* REPACK() - Encode a binary relocated field back into the object data. */
+/* */
+/******************************************************************************/
+void repack(objval, data, fieldsz, wordsz, bit_offset)
+ unsigned long objval;
+ unsigned char *data;
+ int fieldsz;
+ int wordsz;
+ int bit_offset;
+{
+ register int i;
+ int start; /* MS byte with reloc data */
+ int stop; /* LS byte with reloc data */
+ int r = bit_offset & 7; /* num unused LS bits in stop */
+ int l = 8 - r; /* num used MS bits in stop */
+ int tr = ((bit_offset+fieldsz-1) & 7)+1; /* # LS bits in strt*/
+ int tl = 8 - tr; /* num unused MS bits in start */
+ unsigned long mask = (1ul << fieldsz) - 1ul;
+
+ if (fieldsz < sizeof(objval)) objval &= mask;
+
+ start = (big_e_target ? (wordsz-fieldsz-bit_offset) :
+ (bit_offset+fieldsz-1)) >>3;
+ stop = (big_e_target ? (wordsz-bit_offset-1) : bit_offset) >>3;
+
+ if (start == stop)
+ {
+ data[stop] &= ~(mask << r);
+ data[stop] |= (objval << r);
+ return;
+ }
+
+ data[start] &= ~((1<<tr)-1);
+ data[stop] &= ((1<< r)-1);
+ data[stop] |= (objval << r);
+ objval >>= l;
+
+ if (big_e_target)
+ for (i = stop - 1; i > start; objval >>= 8) data[i--] = objval;
+ else for (i = stop + 1; i < start; objval >>= 8) data[i++] = objval;
+
+ data[start] |= objval;
+}
+
+
+
+/******************************************************************************/
+/* */
+/* CLOAD_LINENO() - Read in, swap, and relocate line number entries. This */
+/* function is not called directly by the loader, but by the */
+/* application when it needs to read in line number entries. */
+/* */
+/******************************************************************************/
+int cload_lineno(filptr, count, lptr, scnum)
+ long filptr; /* WHERE TO READ FROM */
+ int count; /* HOW MANY TO READ */
+ LINENO *lptr; /* WHERE TO PUT THEM */
+ int scnum; /* SECTION NUMBER OF THESE ENTRIES */
+{
+ int i;
+
+ /*------------------------------------------------------------------------*/
+ /* READ IN THE REQUESTED NUMBER OF LINE NUMBER ENTRIES AS A BLOCK. */
+ /*------------------------------------------------------------------------*/
+ if (fseek(fin, filptr, 0) != 0) { load_err = E_FILE; return FALSE; }
+ for (i = 0; i < count; i++)
+ if (fread(lptr + i, 1, LINESZ, fin) != LINESZ)
+ { load_err = E_FILE; return FALSE; }
+
+ /*------------------------------------------------------------------------*/
+ /* SWAP AND RELOCATE EACH ENTRY, AS NECESSARY. */
+ /*------------------------------------------------------------------------*/
+ if (byte_swapped || RUN_RELOC_AMOUNT(scnum - 1))
+ for (i = 0; i < count; i++, lptr++)
+ {
+ if (byte_swapped)
+ {
+ swap2byte(&lptr->l_lnno);
+ swap4byte(&lptr->l_addr.l_paddr);
+ }
+
+ if (lptr->l_lnno != 0)
+ lptr->l_addr.l_paddr += RUN_RELOC_AMOUNT(scnum - 1);
+ }
+
+ return TRUE;
+}
+
+
+/******************************************************************************/
+/* */
+/* SWAP4BYTE() - Swap the order of bytes in a long. */
+/* */
+/******************************************************************************/
+void swap4byte(addr)
+ void *addr;
+{
+ unsigned long *value = addr;
+ unsigned long temp1, temp2, temp3, temp4;
+
+ temp1 = (*value) & 0xFF;
+ temp2 = (*value >> 8) & 0xFF;
+ temp3 = (*value >> 16) & 0xFF;
+ temp4 = (*value >> 24) & 0xFF;
+
+ *value = (temp1 << 24) | (temp2 << 16) | (temp3 << 8) | temp4;
+}
+
+
+/******************************************************************************/
+/* */
+/* SWAP2BYTE() - Swap the order of bytes in a short. */
+/* */
+/******************************************************************************/
+void swap2byte(addr)
+ void *addr;
+{
+ unsigned short *value = addr;
+ unsigned short temp1,temp2;
+
+ temp1 = temp2 = *value;
+ *value = ((temp2 & 0xFF) << 8) | ((temp1 >> 8) & 0xFF);
+}
diff --git a/data/mnet/GP10/Host/cdcUtils/coff_loader/coff.c b/data/mnet/GP10/Host/cdcUtils/coff_loader/coff.c
new file mode 100644
index 0000000..06d252d
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/coff_loader/coff.c
@@ -0,0 +1,462 @@
+/****************************************************************************/
+/* MAIN.C - Skeleton Driver for COFF Loader Version 6.00 4/96 */
+/****************************************************************************/
+/* */
+/* General: This module is a skeleton driver for a standalone COFF */
+/* loader. This file is NOT part of the generic loader, but */
+/* provides a sample interface to it that can provide a basis */
+/* for a specific loader. YOU MUST CUSTOMIZE THIS PROGRAM */
+/* FOR YOUR APPLICATION. In particular, you must write the */
+/* function 'mem_write()' which is the low-level function to */
+/* load target memory. */
+/* */
+/* Refer to the documentation provided with the loader for */
+/* details on how to interface with it. */
+/* */
+/* Usage: cload <-options> filename */
+/* Options: -b clear .bss section */
+/* -q quiet mode (no banner) */
+/* -r xxxx relocate by xxxx */
+/* -v verbose (debug) */
+/* */
+/*--------------------------------------------------------------------------*/
+/* Functions defined in this module: */
+/* */
+/* main() - Main driver for loader. */
+/* mem_write() - Load a buffer of raw data to the target. */
+/* set_reloc_amount() - Determine relocation amount for each section. */
+/* lookup_sym() - Stub for symbol lookup routine. */
+/* myalloc() - Application version of 'malloc()'. */
+/* mralloc() - Application version of 'realloc()'. */
+/* load_msg() - Called by loader to write debug messages. */
+/* */
+/****************************************************************************/
+#include "header.h"
+#include <string.h>
+#include "l1proxy/l1proxy.h"
+
+#if MSDOS
+#define READ_BIN "rb"
+#else
+#define READ_BIN "r"
+#endif
+
+void myfreeall(void);
+
+/*--------------------------------------------------------------------------*/
+/* LOADER DEFINITIONS */
+/*--------------------------------------------------------------------------*/
+FILE *fopen();
+char *strrchr(), *malloc(), *realloc();
+
+unsigned long reloc = 0; /* RELOCATION AMOUNT */
+int quiet = 0; /* NO BANNER */
+int memDebug = 0; /* DEBUG MEMORY */
+
+#ifdef unix
+
+/****************************************************************************/
+/* */
+/* MAIN() - Main driver for loader. Read in options and filename, open */
+/* COFF file, and call 'cload()'. */
+/* */
+/****************************************************************************/
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ char fname[256];
+ char *ctmp;
+ int i;
+ int files = 0;
+
+ need_symbols = 0; /* TELL LOADER NOT TO READ SYM TABLE */
+
+ /*-----------------------------------------------------------------------*/
+ /* PROCESS COMMAND LINE ARGUMENTS */
+ /*-----------------------------------------------------------------------*/
+ for (i = 1; i < argc; ++i)
+ {
+ char *argp = argv[i];
+
+ if (*argp == '-') /* OPTIONS */
+ while (*++argp) switch(*argp)
+ {
+ case 'B': case 'b': clear_bss = 1; break;
+ case 'Q': case 'q': quiet = 1; break;
+ case 'V': case 'v': ++verbose; break;
+ case 'R': case 'r': sscanf(argv[++i],"%lx",&reloc); break;
+ default : continue;
+ }
+ else /* FILENAMES */
+ {
+ strcpy(fname, argp);
+ files = 1;
+ }
+ }
+
+ /*-----------------------------------------------------------------------*/
+ /* SAY HELLO TO USER AND PROMPT FOR FILENAME IF NOT GIVEN. */
+ /*-----------------------------------------------------------------------*/
+ if (!quiet) printf("COFF Loader v6.00\n");
+
+ if (!files)
+ {
+ char *p;
+ printf(" COFF file [.out]: ");
+ fgets(fname, 64, stdin);
+ if (p = strrchr(fname, '\n')) *p = '\0';
+ }
+
+ /*-----------------------------------------------------------------------*/
+ /* OPEN THE COFF FILE. IF THE HOST DISTIGUISHES FILE TYPES, BE SURE */
+ /* TO OPEN IT AS A BINARY FILE. */
+ /*-----------------------------------------------------------------------*/
+ ctmp = strrchr(fname,'.');
+ if ((!ctmp) || (ctmp < strrchr(fname,'\\'))) strcat(fname,".out");
+
+ if (!(fin = fopen(fname, READ_BIN)))
+ { printf("\n>> can't open file <%s>\n", fname); exit(-1); }
+
+ /*-----------------------------------------------------------------------*/
+ /* LOAD THE FILE. CLOSE IT WHEN FINISHED. */
+ /*-----------------------------------------------------------------------*/
+ if (!cload()) { printf("\n>> error loading file\n"); exit(-1); }
+ fclose(fin);
+}
+#endif
+
+
+/****************************************************************************/
+/* */
+/* ldCoff() - Main driver for loader. */
+/* */
+/****************************************************************************/
+int ldCoff(char *file, char *base_prefix)
+{
+ char fname[256];
+ char *ctmp;
+ int i;
+ int files = 0;
+ int result = ERROR;
+
+ need_symbols = 0; /* TELL LOADER NOT TO READ SYM TABLE */
+ clear_bss = 1;
+ quiet = 1;
+ verbose = 0;
+ memDebug = 0;
+ strcpy(fname, base_prefix);
+ strcat(fname, "/");
+ strcat(fname, file);
+ files = 1;
+
+ /*-----------------------------------------------------------------------*/
+ /* SAY HELLO TO USER AND PROMPT FOR FILENAME IF NOT GIVEN. */
+ /*-----------------------------------------------------------------------*/
+ if (!quiet) printf("COFF Loader v6.00\n");
+
+ if (!files)
+ {
+ char *p;
+ printf(" COFF file [.out]: ");
+ fgets(fname, 64, stdin);
+ if (p = strrchr(fname, '\n')) *p = '\0';
+ }
+
+ /*-----------------------------------------------------------------------*/
+ /* OPEN THE COFF FILE. IF THE HOST DISTIGUISHES FILE TYPES, BE SURE */
+ /* TO OPEN IT AS A BINARY FILE. */
+ /*-----------------------------------------------------------------------*/
+ ctmp = strrchr(fname,'.');
+ if ((!ctmp) || (ctmp < strrchr(fname,'\\'))) strcat(fname,".out");
+
+ if (!(fin = fopen(fname, READ_BIN)))
+ {
+ printf("\n>> can't open file <%s>\n", fname);
+ return(ERROR);
+ }
+
+ /*-----------------------------------------------------------------------*/
+ /* LOAD THE FILE. CLOSE IT WHEN FINISHED. */
+ /*-----------------------------------------------------------------------*/
+ if (!cload())
+ {
+ printf("\n>> error loading file\n");
+ myfreeall();
+ return(ERROR);
+ }
+ fclose(fin);
+ myfreeall();
+ return(OK);
+}
+
+
+/****************************************************************************/
+/* */
+/* MEM_WRITE() - Load a buffer of raw data to the target. */
+/* */
+/* THIS FUNCTION MUST BE CUSTOMIZED FOR YOUR APPLICATION ! */
+/* */
+/* (As supplied, this function simply dumps the data out to the screen.) */
+/* */
+/****************************************************************************/
+int mem_write(buffer, nbytes, addr, page)
+ unsigned char *buffer; /* POINTER TO DATA BUFFER */
+ unsigned int nbytes; /* NUMBER OF 8-BIT BYTES */
+ T_ADDR addr; /* TARGET DESTINATION ADDRESS */
+ unsigned char page; /* TARGET DESTINATION PAGE */
+{
+ if (verbose)
+ {
+ int i;
+ printf("\n[%0*lx]:%d:", 2 * sizeof(T_ADDR), addr, nbytes);
+ for (i = 0; i < nbytes; ++i) printf("%02x ", buffer[i]);
+ printf("\n");
+ }
+
+#ifndef unix
+ {
+ unsigned char *p = buffer;
+ int verifyCount;
+ int isVerified = FALSE;
+ unsigned int verifyWord, n;
+
+ for (n = 0; n < nbytes; n += 4)
+ {
+ swap4byte(&p[n]);
+ }
+
+ /* Write the data to both dsp 0 and 1 */
+ hpi2dsp(1, buffer, addr, nbytes);
+ hpi2dsp(0, buffer, addr, nbytes);
+
+ /* Now verify that the data was written correctly. Each word will */
+ /* be verified one by one to assure that hpi auto increment did */
+ /* not introduce any errors. */
+ for (n = 0; n < nbytes; n += sizeof(unsigned int))
+ {
+ /* First try DSP 0 */
+ isVerified = FALSE;
+ verifyCount = 3;
+ do
+ {
+ dsp2hpi(0, addr+n, (unsigned char *)&verifyWord, sizeof(unsigned int));
+
+ if (*(unsigned int *)(buffer + n) != verifyWord)
+ {
+ hpi2dsp(0, buffer+n, addr+n, sizeof(unsigned int));
+ verifyCount--;
+ printf ("WARNING: Retrying writing DSP 0 addr %#x wrote(%#x)"
+ " read back(%#x)\n", addr+n, *(unsigned int *)(buffer + n),
+ verifyWord);
+ }
+ else
+ {
+ isVerified = TRUE;
+ }
+
+ } while ((isVerified == FALSE) && verifyCount);
+
+ if (!verifyCount)
+ {
+ printf ("ERROR: After 3 retries unable to write to DSP 0 addr %#x\n",
+ addr+n);
+ }
+
+ /* Now try DSP 1 */
+ isVerified = FALSE;
+ verifyCount = 3;
+ do
+ {
+ dsp2hpi(1, addr+n, (unsigned char *)&verifyWord, sizeof(unsigned int));
+
+ if (*(unsigned int *)(buffer + n) != verifyWord)
+ {
+ hpi2dsp(1, buffer+n, addr+n, sizeof(unsigned int));
+ verifyCount--;
+ printf ("WARNING: Retrying writing DSP 1 addr %#x wrote(%#x)"
+ " read back(%#x)\n", addr+n, *(unsigned int *)(buffer + n),
+ verifyWord);
+ }
+ else
+ {
+ isVerified = TRUE;
+ }
+
+ } while ((isVerified == FALSE) && verifyCount);
+
+ if (!verifyCount)
+ {
+ printf ("ERROR: After 3 retries unable to write to DSP 1 addr %x\n",
+ addr+n);
+ }
+ }
+ }
+#endif
+
+ /*-----------------------------------------------------------------------*/
+ /* INSERT CUSTOM CODE HERE TO LOAD TARGET MEMORY. */
+ /*-----------------------------------------------------------------------*/
+
+ return 1;
+}
+
+
+/****************************************************************************/
+/* */
+/* SET_RELOC_AMOUNT() - Determine relocation amount for each section. */
+/* */
+/****************************************************************************/
+int set_reloc_amount()
+{
+ int i;
+
+ for (i = 0; i< n_sections; ++i) reloc_amount[i] = reloc;
+ return 1;
+}
+
+
+/****************************************************************************/
+/* */
+/* LOOKUP_SYM() - Stub for symbol lookup routine. */
+/* */
+/****************************************************************************/
+void lookup_sym(indx, sym, aux)
+ long indx;
+ SYMENT *sym;
+ AUXENT *aux;
+{}
+
+
+/****************************************************************************/
+/* */
+/* LOAD_SYMS() - Stub for symbol load routine. This routine is only called */
+/* if the global flag 'need_symbols' is TRUE. */
+/* */
+/****************************************************************************/
+int load_syms(need_reloc)
+ int need_reloc;
+{
+ return 1;
+}
+
+
+
+/****************************************************************************/
+/* */
+/* MYALLOC() - Application version of 'malloc()'. */
+/* MRALLOC() - Application version of 'realloc()'. */
+/* */
+/****************************************************************************/
+void *myalloc(size)
+ unsigned int size;
+{
+ char *p = malloc(size);
+ if (memDebug) printf("malloc-->%08x %08x\n", p, size);
+ if (p) return p;
+
+ printf("\n>> out of memory\n");
+ exit(-1);
+}
+
+void *mralloc(p, size)
+ void *p;
+ unsigned int size;
+{
+ if (memDebug) printf("realloc-->%08x %08x", p, size);
+ p = realloc(p, size);
+ if (memDebug) printf(" %08x\n", p);
+ if (p) return p;
+
+ printf("\n>> out of memory\n");
+ exit(-1);
+}
+void myfree(void *p)
+{
+ if (memDebug) printf("free-->%08x\n", p);
+ free(p);
+}
+
+void *reloc_tab;
+void myfreeall(void)
+{
+ if (sect_hdrs)
+ {
+ myfree(sect_hdrs);
+ sect_hdrs = 0;
+ }
+
+ if (o_sect_hdrs)
+ {
+ myfree(o_sect_hdrs);
+ o_sect_hdrs = 0;
+ }
+
+ if (reloc_amount)
+ {
+ myfree(reloc_amount);
+ reloc_amount = 0;
+ }
+
+ if (reloc_tab)
+ {
+ myfree(reloc_tab);
+ reloc_tab = 0;
+ }
+
+ if (str_head)
+ {
+ str_free(str_head);
+ str_head = 0;
+ }
+}
+
+
+/****************************************************************************/
+/* */
+/* LOAD_MSG() - Called by loader to write debug messages. */
+/* */
+/****************************************************************************/
+void load_msg(a,b,c,d,e,f,g)
+char *a;
+long b,c,d,e,f,g;
+{
+ printf(a,b,c,d,e,f,g);
+}
+
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: LoadDSPCode
+**
+** PURPOSE: Send the DSP message to the preregistered message que.
+**
+** INPUT PARAMETERS: fileName - path & name of the file to load into DSP's
+**
+** RETURN VALUE(S): OK = File Loaded, ERROR = No File Loaded.
+**
+**----------------------------------------------------------------------------*/
+
+STATUS LoadDSPCode(char *fileName, char *base_prefix)
+{
+ STATUS result = ERROR;
+
+ if (fileName != NULL)
+ {
+ dspReset();
+ SetUpForDSPTestBootupMsg();
+
+ result = ldCoff(fileName, base_prefix);
+ if ( result == OK )
+ {
+ printf("Waiting for DSP Bootup message...\n");
+ WaitForDSPTestBootupMsg();
+ printf("Received DSP Bootup message\n");
+ }
+ else
+ printf("Bootup ERROR: ldCoff FAILED \n");
+ }
+
+ return(result);
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/cdcUtils/drfInterface/Makefile b/data/mnet/GP10/Host/cdcUtils/drfInterface/Makefile
new file mode 100644
index 0000000..448d1f3
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/drfInterface/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = cdcUtils
+THIS_DIRECTORY = drfInterface
+MY_OUTPUT = $(OBJDIR)\drfInterface.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/cdcUtils/drfInterface/drfInterface.c b/data/mnet/GP10/Host/cdcUtils/drfInterface/drfInterface.c
new file mode 100644
index 0000000..ae2aac2
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/drfInterface/drfInterface.c
@@ -0,0 +1,1477 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/*******************************************************************************
+drfInterface.c
+
+This module consists of two set of functions. One to interface with the Dual RF
+module and the other to write to and read from the EEPROM on the Dual RF
+module.
+
+*/
+/*
+
+All the commands to the rf module are sent by drfCmd(). This function is called
+by other functions. It should not be called directly. It can be used to send
+commands from console.
+
+*/
+
+#include "vxWorks.h"
+#include "stdio.h"
+#include "string.h"
+#include "semLib.h"
+#include "taskLib.h"
+#include "sysLib.h"
+
+#include "cdc_bsp/i2c.h"
+#include "cdcUtils/drfInterface.h"
+
+#define MAX_CMD_LEN 53
+#define MAX_CMD_SEG_SIZE 1
+#define RSP_LEN 4
+#define RF_ADDR 0x77
+#define RF_MEM_ADDR 0x52
+#define MAX_RF_MEM_SIZE 26
+#define VERSION_LEN 4
+#define SER_NUM_LEN 12
+
+
+/*---------- Globals ----------*/
+char drfVersion[VERSION_LEN + 1] = "xxxx"; /* Dual RF firmware version */
+char drfSerialNum[SER_NUM_LEN + 1] = "xxxxxxxxxxxx"; /* Dual RF serial Number */
+
+/*-------- File Locals --------*/
+static char rspDefault[RSP_LEN];
+static char drfMem[MAX_RF_MEM_SIZE];
+static SEM_ID drfSem;
+static int drfType;
+static unsigned int drfVersionStage;
+static unsigned int drfMemLayoutVer;
+static unsigned int drfMemSize;
+
+/*******************************************************************************
+
+ascDec2Int - ASCII Decimal to Integer
+
+Converts a string of four ASCII coded decimal chracters to an integer.
+
+*/
+
+static STATUS ascDec2Int /* RETURN: OK/ERROR in the input */
+ (
+ const char* str, /* IN : ASCII chracter string */
+ int* pNum /* OUT : number */
+ )
+{
+ int retVal = OK;
+ int pwr[4] = {1000,100,10,1};
+ int i;
+
+ *pNum = 0;
+ for (i = 0; i < 4; i++)
+ {
+ if ((str[i] >= '0') && (str[i] <= '9'))
+ {
+ *pNum += (str[i] - '0') * pwr[i];
+ printf("num: %d\n",*pNum);
+ }
+ else
+ {
+ retVal = ERROR;
+ break;
+ }
+ }
+ return retVal;
+}
+
+/*******************************************************************************
+
+ascHex2Int - ASCII Hex to Integer
+
+Converts a string of four ASCII coded hexadecimal chracters to an integer.
+
+*/
+
+static STATUS ascHex2Int /* RETURN: OK/ERROR in the input */
+ (
+ const char* str, /* IN : ASCII chracter string */
+ int* pNum /* OUT : number */
+ )
+{
+ int retVal = OK;
+ int pwr[4] = {16*16*16,16*16,16,1};
+ int i;
+
+ *pNum = 0;
+ for (i = 0; i < 4; i++)
+ {
+ if ((str[i] >= '0') && (str[i] <= '9'))
+ *pNum += (str[i] - '0') * pwr[i];
+ else if ((str[i] >= 'A') && (str[i] <= 'F'))
+ *pNum += (str[i] - 'A' + 10) * pwr[i];
+ else if ((str[i] >= 'a') && (str[i] <= 'f'))
+ *pNum += (str[i] - 'a' + 10) * pwr[i];
+ else
+ {
+ retVal = ERROR;
+ break;
+ }
+ }
+ return retVal;
+}
+
+/*******************************************************************************
+
+byte2AscDec - Byte to ASCII Decimal
+
+Converts a byte to three ascii coded decimal chracters
+
+*/
+
+static void byte2AscDec
+ (
+ unsigned char num, /* IN : byte to convert */
+ char* ascStr /* OUT : ASCII chracter string */
+ )
+{
+ ascStr[0] = '0' + num/100;
+ num -= (num/100)*100;
+ ascStr[1] = '0' + num/10;
+ num -= (num/10)*10;
+ ascStr[2] = '0' + num;
+}
+
+/*******************************************************************************
+
+byte2AscHex - Byte to ASCII Hex
+
+Converts a byte to two ascii coded hexadecimal chracters
+
+*/
+
+static void byte2AscHex
+ (
+ unsigned char num, /* IN : byte to convert */
+ char* ascStr /* OUT : ASCII chracter string */
+ )
+{
+ unsigned char temp;
+
+ temp = num >> 4;
+ if (temp < 10)
+ ascStr[0] = '0' + temp;
+ else
+ ascStr[0] = 'A' + temp - 10;
+
+ temp = num & 0xF;
+ if (temp < 10)
+ ascStr[1] = '0' + temp;
+ else
+ ascStr[1] = 'A' + temp - 10;
+}
+
+/*******************************************************************************
+rspOk - Response Ok
+
+Checks if the response from drf board is 'Command Successful'
+Returns true or false
+*/
+
+static int rspOk(char* rsp)
+{
+ if ((rsp[0] == '0') && (rsp[1] == '0') && (rsp[2] == '0') && (rsp[3] == '0'))
+ return TRUE;
+ else
+ return FALSE;
+}
+
+/*******************************************************************************
+rspError - Response Error
+
+Checks if the response from drf board is 'Command Unsuccessful'
+Returns true or false
+*/
+
+static int rspError(char* rsp)
+{
+ if ((rsp[0] == 'F') && (rsp[1] == 'F') && (rsp[2] == 'F') && (rsp[3] == 'F'))
+ return TRUE;
+ else
+ return FALSE;
+}
+
+
+/*******************************************************************************
+
+drfCmd - Command
+
+This rouine sends a command to dual radio board and receives the response back.
+It uses I2C interface routine to interface to the dual RF board.
+
+No more than one command is in progress at any given time.
+
+*/
+
+STATUS drfCmd
+ (
+ char* cmd, /* command: Null terminated chracter string */
+ char* rsp /* response */
+ )
+{
+ int retVal; /* Return Value */
+ int cmdLen; /* Command Length */
+ int i, n;
+
+ retVal = semTake(drfSem, WAIT_FOREVER); /* Block the resourse */
+ if (retVal == ERROR)
+ goto exit1;
+ if (rsp == 0)
+ rsp = rspDefault; /* if rsp is null set it to default */
+ cmdLen = strlen(cmd); /* find out length of the command */
+ if (cmdLen > MAX_CMD_LEN)
+ {
+ retVal = ERROR;
+ goto exit;
+ }
+
+ I2Coperation(ON);
+/*
+ for (i = 0; i < cmdLen; i += MAX_CMD_SEG_SIZE)
+ {
+ n = ((cmdLen - i) > MAX_CMD_SEG_SIZE) ? MAX_CMD_SEG_SIZE : (cmdLen - i);
+ printf("i%d n%d\n",i,n);
+ if ((retVal = I2Cwrite2(&cmd[i], RF_ADDR, n)) != OK)
+ break;
+ taskDelay(10);
+ }
+ if (retVal == OK)
+*/
+ for (i = 0, retVal = ERROR; (i < 5) && (retVal == ERROR); i++)
+ { /* if error try muliple times since I2Cread can fail occasionally */
+ if ((retVal = I2Cwrite2(cmd, RF_ADDR, cmdLen)) == OK) /* send the command */
+ {
+/* taskDelay((int)(0.1*sysClkRateGet())); /* sleep for 100 ms. */
+ taskDelay(2);
+ rsp[0] = '?';
+ rsp[1] = '?';
+ rsp[2] = '?';
+ rsp[3] = '?';
+ retVal = I2Cread2(rsp, RF_ADDR, RSP_LEN); /* read the response */
+ }
+ }
+ I2Coperation(OFF);
+
+ /* print response only for commands from console */
+ if ((rsp == rspDefault) && (retVal == OK))
+ printf("DRF response: %c%c%c%c\n",rsp[0],rsp[1],rsp[2],rsp[3]);
+
+ exit:
+ semGive(drfSem); /* release the resource */
+ exit1:
+ return retVal;
+}
+
+/*******************************************************************************
+
+drfPllRefFreqSet - PLL Reference Frequency Get
+
+Set the PLL reference frequency.
+
+*/
+
+STATUS drfPllRefFreqSet /* RETURN : OK, ERROR */
+ (
+ unsigned int freq /* IN : the freq to set */
+ )
+{
+ int retVal; /* return value */
+ char rsp[RSP_LEN]; /* response */
+
+ if (freq == 0)
+ retVal = drfCmd("PR10",rsp); /* set ref freq to 10Mhz */
+ else if (freq == 1)
+ retVal = drfCmd("PR13",rsp); /* set ref freq to 13Mhz */
+ else
+ retVal = ERROR; /* invalid input */
+
+
+ if (retVal == OK)
+ retVal = rspError(rsp) ? ERROR : OK;
+
+ return retVal;
+}
+
+/*******************************************************************************
+
+drfPllRefFreqGet - PLL Refrence Frequency Get
+
+Gets the PLL refernce frequency from the Dual RF board
+
+*/
+
+int drfPllRefFreqGet() /* RETURN : 0 - 10Mhz, 1 - 13Mhz, -1 - Error */
+
+{
+ int retVal = -1;
+ char rsp[RSP_LEN]; /* response */
+
+ retVal = drfCmd("PR?",rsp);
+
+ if (retVal == OK)
+ {
+ if ((rsp[2] == '1') && (rsp[3] == '0'))
+ {
+ retVal = 0;
+ }
+ else if ((rsp[2] == '1') && (rsp[3] == '3'))
+ {
+ retVal = 1;
+ }
+ }
+
+ return retVal;
+}
+
+/*******************************************************************************
+
+drfNullAttenSet - Nulliing Attenuator level Set
+
+Sets the Nulling attenuator level on the DRF board.
+
+*/
+
+STATUS drfNullAttenSet /* RETURN : OK, ERROR */
+ (
+ int attenLevel /* IN : attenuation Level * 10 */
+ )
+{
+ int retVal = ERROR;
+ char cmdStr[6] = {'N'}; /* N??.? + null */
+ char rsp[RSP_LEN]; /* response */
+
+ if (attenLevel > 999)
+ goto exit;
+ byte2AscDec(attenLevel, &cmdStr[1]);
+
+ /* insert decimal point */
+ cmdStr[4] = cmdStr[3];
+ cmdStr[3] = '.';
+ cmdStr[5] = 0;
+
+ if (drfCmd(cmdStr, rsp) == OK)
+ retVal = rspOk(rsp) ? OK : ERROR;
+
+ exit:
+ return retVal;
+}
+
+/*******************************************************************************
+
+drfNullAttenGet - Null Attenuator level Get
+
+Gets the null attenuator level from the DRF board
+
+*/
+
+STATUS drfNullAttenGet /* RETURN : OK, ERROR */
+ (
+ int* level /* OUT : Attenuator level * 10 */
+ )
+{
+ int retVal = ERROR; /* return value */
+ char rsp[RSP_LEN]; /* response */
+ int temp;
+
+ if (drfCmd("N?",rsp) == OK)
+ {
+ if (!(rspError(rsp)))
+ {
+ /* remove decimal point from the string */
+ rsp[2] = rsp[1];
+ rsp[1] = rsp[0];
+ rsp[0] = '0';
+
+ if (ascDec2Int(rsp, &temp) == OK)
+ {
+ *level = temp;
+ retVal = OK;
+ }
+ }
+ }
+
+ return retVal;
+}
+
+/*******************************************************************************
+
+drfNullAttenMin - Null Attenuation Minimization algotrithm
+
+Commands dual RF board to run Null Attenuation minimization algotrithm.
+
+*/
+
+STATUS drfNullAttenMin() /* RETUEN : OK, ERROR */
+{
+ int retVal = ERROR;
+ char rsp[RSP_LEN]; /* response */
+
+ if (drfCmd("NM",rsp) == OK)
+ {
+ if (rspOk(rsp))
+ retVal = OK;
+ }
+ return retVal;
+}
+
+/*******************************************************************************
+
+drfLockStatGet - Lock Status Get
+
+Gets the lock status of dual RF board.
+
+*/
+int drfLockStatGet /* RETUEN : 0 - not locked, 1 - locked, -1 - error */
+ (
+ PLLType pll /* IN : pll type */
+ )
+{
+ int retVal = 0;
+ char* cmd = "";
+ char rsp[RSP_LEN]; /* response */
+
+ switch (pll)
+ {
+ case Mon:
+ cmd = "LDM";
+ break;
+ case Ref:
+ cmd = "LDR";
+ break;
+ case T1:
+ cmd = "LD1";
+ break;
+ case T2A:
+ cmd = "LD2A";
+ break;
+ case T2B:
+ cmd = "LD2B";
+ break;
+ case IF:
+ cmd = "LDI";
+ break;
+ default:
+ retVal = -1;
+ break;
+ }
+
+ if (retVal != -1)
+ {
+ if (drfCmd(cmd, rsp) == OK)
+ {
+ if (rspError(rsp))
+ retVal = -1;
+ else if (rsp[0] == 0x00)
+ retVal = 0;
+ else
+ retVal = 1;
+ }
+ else
+ retVal = -1;
+ }
+
+ return retVal;
+}
+
+/*******************************************************************************
+
+drfRSSIGet - RSSI (Receiver Signal Strength Indication) Get
+
+Gets RSSI (Receiver Signal Strength Indication) from the dual RF board
+
+*/
+
+int drfRSSIGet() /* RETURN : RSSI or -1 for error */
+{
+ int retVal = -1;
+ char rsp[RSP_LEN]; /* response */
+
+ if (drfCmd("R",rsp) == OK)
+ {
+ if (!(rspError(rsp)))
+ if (ascHex2Int((const char*)rsp, &retVal) == ERROR)
+ retVal = -1;
+ }
+ return retVal;
+}
+
+/*******************************************************************************
+
+drfLoopbackSet - Loopback Set
+
+Sets Loopback signal low/high on the dual RF board
+
+*/
+
+STATUS drfLoopbackSet /* RETURN : OK, ERROR */
+ (
+ int txNum, /* IN : transmitter, 0 or 1 */
+ int lowHigh /* IN : 0 - set low, !0 - set high */
+ )
+{
+ int retVal = ERROR;
+ char* cmd;
+ char rsp[RSP_LEN]; /* response */
+
+ if (txNum >= 2)
+ goto exit;
+
+ if (txNum == 0)
+ {
+ if (lowHigh == 0)
+ cmd = "LB10";
+ else
+ cmd = "LB11";
+ }
+ else
+ {
+ if (lowHigh == 0)
+ cmd = "LB20";
+ else
+ cmd = "LB21";
+ }
+
+ if (drfCmd(cmd, rsp) == OK)
+ retVal = rspOk(rsp) ? OK : ERROR;
+
+ exit:
+ return retVal;
+
+}
+
+/*******************************************************************************
+
+drfTxPwrSet - Tx Power Set
+
+Sets Tx Power control low/high on the dual RF board
+
+*/
+
+STATUS drfTxPwrSet /* RETURN : OK, ERROR */
+ (
+ int txNum, /* IN : transmitter, 0 or 1 */
+ int lowHigh /* IN : 0 - set low, !0 - set high */
+ )
+{
+ int retVal = ERROR;
+ char* cmd;
+ char rsp[RSP_LEN]; /* response */
+
+ if (txNum >= 2)
+ goto exit;
+
+ if (txNum == 0)
+ {
+ if (lowHigh == 0)
+ cmd = "T10";
+ else
+ cmd = "T11";
+ }
+ else
+ {
+ if (lowHigh == 0)
+ cmd = "T20";
+ else
+ cmd = "T21";
+ }
+
+ if (drfCmd(cmd, rsp) == OK)
+ retVal = rspOk(rsp) ? OK : ERROR;
+
+ exit:
+ return retVal;
+}
+
+/*******************************************************************************
+
+drfFpgaTxPwrEnable - FPGA Tx Power Enable
+
+Enables FPGA interface Power Control
+
+*/
+
+STATUS drfFpgaTxPwrEnable /* RETURN : OK, ERROR */
+ (
+ int txNum /* IN : transmitter, 0 or 1 */
+ )
+{
+ int retVal = ERROR;
+ char* cmd;
+ char rsp[RSP_LEN]; /* response */
+
+ if (txNum >= 2)
+ goto exit;
+
+ if (txNum == 0)
+ {
+ cmd = "T1E";
+ }
+ else
+ {
+ cmd = "T2E";
+ }
+
+ if (drfCmd(cmd, rsp) == OK)
+ retVal = rspOk(rsp) ? OK : ERROR;
+
+ exit:
+ return retVal;
+}
+
+/*******************************************************************************
+
+drfFpgaTxPwrDisable - FPGA Tx Power Enable
+
+Disables FPGA interface Power Control
+
+*/
+
+STATUS drfFpgaTxPwrDisable /* RETURN : OK, ERROR */
+ (
+ int txNum /* IN : transmitter, 0 or 1 */
+ )
+{
+ int retVal = ERROR;
+ char* cmd;
+ char rsp[RSP_LEN]; /* response */
+
+ if (txNum >= 2)
+ goto exit;
+
+ if (txNum == 0)
+ {
+ cmd = "T1D";
+ }
+ else
+ {
+ cmd = "T2D";
+ }
+
+ if (drfCmd(cmd, rsp) == OK)
+ retVal = rspOk(rsp) ? OK : ERROR;
+
+ exit:
+ return retVal;
+}
+
+/*******************************************************************************
+
+drfFreqHopEnable - Frequency Hopping Enable
+
+This command does two things, it allows the FPGAs to manipulate the ARFCNs,
+and it also allows the FPGAs to manipulate the transmitter's power control.
+*/
+
+STATUS drfFreqHopEnable() /* RETURN : OK, ERROR */
+{
+ int retVal = ERROR;
+ char rsp[RSP_LEN]; /* response */
+
+ if (drfCmd("HE", rsp) == OK)
+ retVal = rspOk(rsp) ? OK : ERROR;
+
+ exit:
+ return retVal;
+}
+
+/*******************************************************************************
+
+drfFreqHopDisable - Frequency Hopping Disable
+
+This command does two things, it prevents the FPGAs from manipulating the ARFCNs,
+and it also prevents the FPGAs from manipulating the transmitter's power control
+*/
+
+STATUS drfFreqHopDisable() /* RETURN : OK, ERROR */
+{
+ int retVal = ERROR;
+ char rsp[RSP_LEN]; /* response */
+
+ if (drfCmd("HD", rsp) == OK)
+ retVal = rspOk(rsp) ? OK : ERROR;
+
+ exit:
+ return retVal;
+}
+
+/*******************************************************************************
+
+drfVersionGet - Version Get
+
+Gets the Version Number of dual RF board firmware
+*/
+
+LOCAL STATUS drfVersionGet() /* RETURN : OK, ERROR */
+{
+ int retVal = ERROR;
+ char rsp[RSP_LEN]; /* response */
+
+ if ((drfCmd("V",rsp)) == ERROR)
+ goto exit;
+
+ if (!(rspError(rsp)))
+ {
+ drfVersion[0] = rsp[0];
+ drfVersion[1] = rsp[1];
+ drfVersion[2] = rsp[2];
+ drfVersion[3] = rsp[3];
+
+ retVal = OK;
+ }
+ exit:
+ return retVal;
+}
+
+
+/*******************************************************************************
+
+drfVersionReturn - Version Retuen
+
+Returns the Version Number of dual RF board firmware.
+*/
+char* drfVersionReturn()
+{
+ return drfVersion;
+}
+
+
+/*******************************************************************************
+
+drfVersionPrint - Version Print
+
+Prints the version no. of dual RF board firmware
+
+*/
+
+void drfVersionPrint()
+{
+ printf("Dual RF Module Firmware Version: %s\n", drfVersion);
+}
+
+
+/*******************************************************************************
+
+drfSerialNumGet - SerialNumber Get
+
+Gets the Serial Number of dual RF board
+*/
+
+LOCAL STATUS drfSerialNumGet() /* RETURN : OK, ERROR */
+{
+ int retVal = ERROR;
+ char rsp[RSP_LEN * 3]; /* response */
+ int i;
+
+ if (drfVersionStage == 0)
+ {
+ if ((drfCmd("S?",rsp)) != ERROR)
+ {
+ if (!(rspError(rsp)))
+ {
+ drfSerialNum[0] = rsp[0];
+ drfSerialNum[1] = rsp[1];
+ drfSerialNum[2] = rsp[2];
+ drfSerialNum[3] = rsp[3];
+ drfSerialNum[4] = 0; /* null terminate */
+ retVal = OK;
+ }
+ }
+ }
+ else if (drfVersionStage == 1)
+ {
+ if ((drfCmd("SI?", rsp)) != ERROR)
+ {
+ if (!(rspError(rsp)))
+ {
+ if ((drfCmd("SN?", &rsp[RSP_LEN])) != ERROR)
+ {
+ if (!(rspError(&rsp[RSP_LEN])))
+ {
+ for (i = 0; i < (RSP_LEN * 2); i++)
+ drfSerialNum[i] = rsp[i];
+ drfSerialNum[i] = 0; /* null terminate */
+ retVal = OK;
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ if ((drfCmd("SI?", rsp)) != ERROR)
+ {
+ if (!(rspError(rsp)))
+ {
+ if ((drfCmd("SN?", &rsp[RSP_LEN])) != ERROR)
+ {
+ if (!(rspError(rsp)))
+ {
+ if ((drfCmd("SX?", &rsp[RSP_LEN * 2])) != ERROR)
+ {
+ if (!(rspError(&rsp[RSP_LEN])))
+ {
+ for (i = 0; i < (RSP_LEN * 3); i++)
+ drfSerialNum[i] = rsp[i];
+ drfSerialNum[i] = 0; /* null terminate */
+ retVal = OK;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+ return retVal;
+}
+
+
+/*******************************************************************************
+
+drfSerialNumPrint - Serial Number Print
+
+Prints the Serial Number of dual RF board
+
+*/
+
+void drfSerialNumPrint()
+{
+ printf("Dual RF Module Serial Number: %s\n", drfSerialNum);
+}
+
+
+/*******************************************************************************
+
+drfSerialNumReturn - Serial Number Return
+
+Returns the Serial Number of dual RF board.
+
+*/
+char* drfSerialNumReturn()
+{
+ return drfSerialNum;
+}
+
+
+/*******************************************************************************
+
+drfInfoSet - Information Set
+
+Detrmines and saves the type of the RF module present in the system.
+
+Sets the drfType to following:
+ 0 - 900 system
+ 1 - 1800 system
+ 2 - 1900 system
+ -1 - Undtermined
+
+Determines the stage of version of firmware on the RF board and sets
+drfVersionStage.
+
+Determines the version of the memory layout on the rf board and sets
+drfMemLayoutVersion
+
+drfVersionStage and drfMemLayoutVersion are for the internal use only.
+*/
+
+/*
+The type of the system is figured out from the version number of the
+drf firmare. The version of the layout is also figured out from the firmware
+version number.
+
+If the version no. begins with a letter, the letter indiacates type
+of the board. Px.x is 1900, Dx.x is 1800, Gx.x is 900, and Ex.x is extended gsm
+system. If there is no leading letter, the leading digit is 0. Versions 01.x is
+for 1900 systems and versions 02.x is for 1800 systems
+*/
+
+/*
+If version is P1.x, D1.x, G1.x, E1.x, 01.x, or 02.x the drfVersion stage
+should be set to 0. This versions are no longer built.
+If the version id P2.x, D2.x, G2.x, or E2.x the drfVersionStage is set to 1
+*/
+
+LOCAL void drfInfoSet()
+{
+ drfType = -1; /* undertermined type */
+ drfVersionStage = 2; /* assume newest version */
+
+ if (drfVersion[0] == 'P')
+ drfType = 2; /* 1900 */
+ else if (drfVersion[0] == 'D')
+ drfType = 1; /* 1800 */
+ else if ((drfVersion[0] == 'G') || (drfVersion[0] == 'E'))
+ drfType = 0; /* 900 */
+ else if (drfVersion[0] == '0')
+ {
+ if (drfVersion[1] == '1')
+ drfType = 2; /* 1900 */
+ else if (drfVersion[1] == '2')
+ drfType = 1; /* 1800 */
+ drfVersionStage = 0; /* old version */
+ }
+
+ if (drfVersionStage != 0)
+ { /* version is not 0x.x */
+ if (drfVersion[1] == '1')
+ drfVersionStage = 0; /* old version */
+ else if (drfVersion[1] == '2')
+ {
+ if (drfVersion[3] < '2')
+ drfVersionStage = 1; /* old version */
+ }
+ }
+
+
+ if (drfVersionStage == 0)
+ {
+ drfMemLayoutVer = 0;
+ drfMemSize = 22;
+ }
+ else if (drfVersionStage == 1)
+ {
+ drfMemLayoutVer = 1;
+ drfMemSize = 24;
+ }
+ else
+ {
+ drfMemLayoutVer = 2;
+ drfMemSize = 26;
+ }
+}
+
+
+/*******************************************************************************
+
+drfTypeGet - Type Get
+
+Returns type of the RF module present in the system.
+Returns
+ 0 - 900 system
+ 1 - 1800 system
+ 2 - 1900 system
+ -1 - Undetermined
+*/
+int drfTypeGet() /* RETURN: 0,1,2, or -1 */
+{
+ return drfType;
+}
+
+/*******************************************************************************
+
+drfIQSwapGet - IQ Swap Get
+
+Returns TRUE if I/Q signals are swapped on the RF board. The swapping is as
+compared to the original 1900 board.
+*/
+int drfIQSwapGet() /* RETURN: TRUE / FALSE */
+{
+ if ((drfTypeGet() == 2) && (drfVersion[0] == '0'))
+ return FALSE;
+ else
+ return TRUE;
+}
+
+/*******************************************************************************
+
+drfFreqHopGet - Frequency Hop Get
+
+Returns if the TRX is capable of hopping.
+*/
+int drfFreqHopGet /* RETURN: TRUE /FALSE */
+ (
+ UINT trx /* IN: trx number */
+ )
+{
+ return FALSE; /* no hopping as of yet */
+}
+
+/*******************************************************************************
+
+drfMemSend - Memory Send
+
+Sends dual RF board contents of memory on that board
+
+*/
+
+LOCAL STATUS drfMemSend() /* RETURN : ok/error */
+{
+
+ STATUS retVal = ERROR;
+ char cmdStr[1 + MAX_RF_MEM_SIZE *2 + 1] = {'Q'};
+ char rsp[RSP_LEN]; /* response */
+ char* pCmd;
+ int i;
+
+ /* build the command string */
+ for (i = 0, pCmd = &cmdStr[1]; i < drfMemSize; i++, pCmd+=2)
+ {
+ byte2AscHex(drfMem[i], pCmd);
+ }
+ cmdStr[drfMemSize * 2 + 1] = 0; /* null terminate */
+ /* send the command */
+ if (drfCmd(cmdStr, rsp) == OK)
+ {
+ retVal = rspOk(rsp) ? OK : ERROR;
+ }
+ exit:
+ return retVal;
+
+}
+
+/*******************************************************************************
+
+drfStatGet - Status Get
+
+Gets status of dual RF board.
+
+*/
+
+STATUS drfStatGet /* RETURN: OK ro ERROR */
+ (
+ int* pStatus /* OUT: drf status here */
+ )
+{
+ STATUS retVal = ERROR;
+ char rsp[RSP_LEN]; /* response */
+
+ if (pStatus != NULL)
+ {
+ if (drfCmd("?",rsp) == OK)
+ {
+ if (ascHex2Int(rsp, pStatus) == OK)
+ {
+ retVal = OK;
+ }
+ }
+ }
+ return retVal;
+}
+
+
+
+
+/*******************************************************************************
+
+drfStatGet - Status Get
+
+Gets status of dual RF board.
+
+*/
+
+long drfSynthStatusGet(void )
+{
+ long retVal = 0xFFFFFFFF;
+ char rsp[RSP_LEN]; /* response */
+
+ if (drfCmd("?",rsp) == OK)
+ {
+ /*retVal = rsp[0] | (rsp[1]<<8) | (rsp[2]<<16) | (rsp[3]<<24);*/
+ ascHex2Int(rsp, & retVal);
+ }
+
+ return retVal;
+}
+/*******************************************************************************
+
+drfInterfaceInit - Interface Initialize
+
+Initializes Dual RF interface
+
+*/
+STATUS drfInterfaceInit()
+{
+ drfSem = semMCreate(SEM_Q_PRIORITY | SEM_INVERSION_SAFE | SEM_DELETE_SAFE);
+ if (drfSem == NULL)
+ return ERROR;
+ else
+ return OK;
+}
+
+/*******************************************************************************
+
+drfInit - Initialize
+
+Initializes dual RF board interface, reads the EEPROM on the RF board, and sends
+the values to the dual RF borad. The host reads the memory on behalf of the dual
+radio board to avoid multiple masters on the I2C bus. The I2C interface on MPC860
+processor has known issues related to multi-master mode operation.
+
+*/
+
+STATUS drfInit()
+
+{
+ STATUS retVal = ERROR;
+ int status; /* drf status */
+ int i;
+
+ retVal = drfInterfaceInit();
+ if (retVal == ERROR)
+ goto exit;
+
+ drfVersionGet(); /* get the Dual RF firmware version */
+ drfInfoSet(); /* set the RF board firmware version no. etc. */
+
+ /* read the dual RF EEPROM */
+ I2Coperation(ON);
+ /* if error try muliple times since I2Cread can fail occasionally */
+ for (i = 0, retVal = ERROR; (i < 5) && (retVal == ERROR); i++)
+ retVal = I2Cread(drfMem, RF_MEM_ADDR, 0, drfMemSize);
+ I2Coperation(OFF);
+ if (retVal == ERROR)
+ goto exit;
+
+ /* send the read values to the drf board */
+ retVal = drfMemSend();
+
+ drfSerialNumGet(); /* get the Dual RF serial number */
+ drfStatGet(&status); /* get the Dual RF board's status */
+ if ((status & EEPROM_REQUIRED) != 0)
+ printf("Error: Dual RF did not receive EEPROM values\n");
+ if ((status & EEPROM_DEFAULT_USED) != 0)
+ printf("Error: Dual RF using default EEPROM settings\n");
+
+ /* Enable frequency hopping.
+ This enables the FPGA interface to the RF module.
+ This command does two things, it allows the FPGAs to manipulate the ARFCNs,
+ and it also allows the FPGAs to manipulate the transmitter's power control.
+ */
+ if ((drfFreqHopEnable()) == ERROR)
+ goto exit;
+
+ /* Enable the PA on transceivers.
+ The actual setting of the PA power enable control will be determined by the
+ FPGA interface.
+ */
+ if ((drfFpgaTxPwrEnable(0)) == ERROR)
+ goto exit;
+ if ((drfFpgaTxPwrEnable(1)) == ERROR)
+ goto exit;
+
+ exit:
+ return retVal;
+}
+
+/*---------------------------------------------------------------------------*/
+/* Following commands read and write data to the EEPROM on the dual RF board */
+/*---------------------------------------------------------------------------*/
+
+/* RF EEPROM Layout */
+/* To be indexed by drfMemLayoutVersion */
+
+UINT DACI1[] = {0x00, 0x0B, 0x0B};
+UINT DACQ1[] = {0x01, 0x0C, 0x0C};
+UINT DACGREF1[] = {0x02, 0x0D, 0x0D};
+UINT DACDELAY[] = {0x03, 0x0E, 0x0E};
+UINT DACVCXO[] = {0x04, 0x0F, 0x0F};
+UINT DACGREF2[] = {0x05, 0x10, 0x10};
+UINT DACQ2[] = {0x06, 0x11, 0x11};
+UINT DACI2[] = {0x07, 0x12, 0x12};
+UINT NULL_FFEDBACK[] = {0x08, 0x13, 0x13};
+UINT ARFCN1_LSB[] = {0x09, 0x00, 0x00};
+UINT ARFCN1_MSB[] = {0x0A, 0x01, 0x01};
+UINT ARFCN2A_LSB[] = {0x0B, 0x02, 0x02};
+UINT ARFCN2A_MSB[] = {0x0C, 0x03, 0x03};
+UINT ARFCN2B_LSB[] = {0x0D, 0x04, 0x04};
+UINT ARFCN2B_MSB[] = {0x0E, 0x05, 0x05};
+UINT ARFCN_MON_LSB[] = {0x0F, 0x06, 0x06};
+UINT ARFCN_MON_MSB[] = {0x10, 0x07, 0x06};
+UINT RFF_FREQ_INPUT[] = {0x11, 0x08, 0x08};
+UINT REF_FREQ_MODE[] = {0x12, 0x09, 0x09};
+UINT SERIAL_INFO_LSB[] = {0x13, 0x14, 0x14};
+UINT SERIAL_INFO_MSB[] = {0x14, 0x15, 0x15};
+UINT CHECKSUM[] = {0x15, 0x0A, 0x0A};
+UINT SERIAL_NUM_LSB[] = {0xFF, 0x16, 0x16}; /* Invalid for index 0 */
+UINT SERIAL_NUM_MSB[] = {0xFF, 0x17, 0x17}; /* Invalid for index 0 */
+UINT SERIAL_XN_LSB[] = {0xFF, 0xFF, 0x18}; /* Invalid for index 0 */
+UINT SERIAL_XN_MSB[] = {0xFF, 0xFF, 0x19}; /* Invalid for index 0 */
+
+/*-----------------------------------------------------------------
+drfMemUpdate - Memory Update
+Updates given address of EEPROM in DRF module with the given value.
+In addtion to this updates checksum field in the memory if required.
+If the adress of the memory being updated is less than the address of
+the chekcsum than the checksum is updates.
+*/
+LOCAL STATUS drfMemUpdate(char addr, char value)
+{
+ STATUS retStat = ERROR;
+ char oldValue;
+ char checksum;
+
+ if ((addr < drfMemSize) && (addr != CHECKSUM[drfMemLayoutVer]))
+ {
+ I2Coperation(ON);
+ if ((I2Cread(&oldValue, RF_MEM_ADDR, addr, 1)) == OK)
+ {
+ if ((I2Cwrite(&value, RF_MEM_ADDR, addr, 1)) == OK)
+ {
+ taskDelay(2);
+ if (addr < CHECKSUM[drfMemLayoutVer])
+ {
+ I2Cread(&checksum, RF_MEM_ADDR, CHECKSUM[drfMemLayoutVer], 1);
+ checksum = checksum + (oldValue - value);
+ I2Cwrite(&checksum, RF_MEM_ADDR, CHECKSUM[drfMemLayoutVer], 1);
+ taskDelay(2);
+ }
+ retStat = OK;
+ }
+ }
+ if (retStat == ERROR)
+ printf("Error accessing DRF Memory\n");
+ I2Coperation(OFF);
+ }
+ else
+ {
+ printf("Error: Illegal DRF memory address specified for update\n");
+ }
+
+ return retStat;
+}
+
+/*-----------------------------------------------------------------
+drfMemDacI1Write - Memory DAC I1 Write
+Writes DAC I1 trim value in the drf EEPROM
+*/
+STATUS drfMemDacI1Write(char newI1)
+{
+ return drfMemUpdate(DACI1[drfMemLayoutVer], newI1);
+}
+
+/*-----------------------------------------------------------------
+drfMemDacQ1Write - Memory DAC Q1 Write
+Writes DAC Q1 trim value in the drf EEPROM
+*/
+STATUS drfMemDacQ1Write(char newQ1)
+{
+ return drfMemUpdate(DACQ1[drfMemLayoutVer], newQ1);
+}
+
+/*-----------------------------------------------------------------
+drfMemDacI2Write - Memory DAC I2 Write
+Writes DAC I2 trim value in the drf EEPROM
+*/
+STATUS drfMemDacI2Write(char newI2)
+{
+ return drfMemUpdate(DACI2[drfMemLayoutVer], newI2);
+}
+
+/*-----------------------------------------------------------------
+drfMemDacQ2Write - Memory DAC Q2 Write
+Writes DAC Q2 trim value in the drf EEPROM
+*/
+STATUS drfMemDacQ2Write(char newQ2)
+{
+ return drfMemUpdate(DACQ2[drfMemLayoutVer], newQ2);
+}
+
+/*-----------------------------------------------------------------
+drfMemLocRead - Memory Location Read
+Reads the given memory location of EEPROM on the DRF module
+*/
+LOCAL STATUS drfMemLocRead(char addr, char* pValue)
+{
+ STATUS retStat;
+
+ I2Coperation(ON);
+ retStat = I2Cread(pValue, RF_MEM_ADDR, addr,1);
+ I2Coperation(OFF);
+ if (retStat == ERROR)
+ printf("Error reading from DRF memory\n");
+ return retStat;
+}
+
+/*-----------------------------------------------------------------
+drfMemDacI1Print - Memory DAC I1 Print
+Prints the DAC I1 trim value in drf EEPROM
+*/
+void drfMemDacI1Print()
+{
+ char value;
+
+ if ((drfMemLocRead(DACI1[drfMemLayoutVer], &value)) == OK)
+ {
+ printf("DRF DAC I1 in EEPROM: 0x%02x\n",value);
+ }
+}
+
+/*-----------------------------------------------------------------
+drfMemDacQ1Print - Memory DAC Q1 Print
+Prints the DAC Q1 trim value in drf EEPROM
+*/
+void drfMemDacQ1Print()
+{
+ char value;
+
+ if ((drfMemLocRead(DACQ1[drfMemLayoutVer], &value)) == OK)
+ {
+ printf("DRF DAC Q1 in EEPROM: 0x%02x\n", value);
+ }
+}
+
+/*-----------------------------------------------------------------
+drfMemDacI2Print - Memory DAC I2 Print
+Prints the DAC I2 trim value in drf EEPROM
+*/
+void drfMemDacI2Print()
+{
+ char value;
+
+ if ((drfMemLocRead(DACI2[drfMemLayoutVer], &value)) == OK)
+ {
+ printf("DRF DAC I2 in EEPROM: 0x%02x\n",value);
+ }
+}
+
+/*-----------------------------------------------------------------
+drfMemDacQ2Print - Memory DAC Q2 Print
+Prints the DAC Q2 trim value in drf EEPROM
+*/
+void drfMemDacQ2Print()
+{
+ char value;
+
+ if ((drfMemLocRead(DACQ2[drfMemLayoutVer], &value)) == OK)
+ {
+ printf("DRF DAC Q2 in EEPROM: 0x%02x\n",value);
+ }
+}
+
+/*-----------------------------------------------------------------
+drfMemSerialNumPrint - Memory Serial Number Print
+Prints the serial number in the drf EEPROM
+*/
+void drfMemSerialNumPrint()
+{
+ char numLsb;
+ char numMsb;
+ char serialNum[SER_NUM_LEN + 1];
+
+/*
+Serial Number Format:
+For memLayaoutVersion 0
+16 bits: SERIAL_INFO
+
+For memLayoutVesrion 1
+32 bits: SERIAL_INFO and SERIAL_NUM. INFO has MSB and NUM has LSB
+
+other memLayoutVersion
+48 bits: SERIAL_INFO, SERIAL_NUM, and SERIAL_SX. INFO has MSB and SX has LSB
+*/
+ if (((drfMemLocRead(SERIAL_INFO_LSB[drfMemLayoutVer], &numLsb)) == OK) &&
+ ((drfMemLocRead(SERIAL_INFO_MSB[drfMemLayoutVer], &numMsb)) == OK) )
+ {
+ sprintf(serialNum, "%04x", (numMsb << 8) | numLsb);
+ if (drfMemLayoutVer == 0)
+ printf("DRF Serial Number in EEPROM: 0x%s\n", serialNum);
+ else
+ if (((drfMemLocRead(SERIAL_NUM_LSB[drfMemLayoutVer], &numLsb)) == OK) &&
+ ((drfMemLocRead(SERIAL_NUM_MSB[drfMemLayoutVer], &numMsb)) == OK) )
+ {
+ sprintf(serialNum, "%s%04x", serialNum, (numMsb << 8) | numLsb);
+ if (drfMemLayoutVer == 1)
+ printf("DRF Serial Number in EEPROM: 0x%s\n", serialNum);
+ else
+ if (((drfMemLocRead(SERIAL_XN_LSB[drfMemLayoutVer], &numLsb)) == OK) &&
+ ((drfMemLocRead(SERIAL_XN_MSB[drfMemLayoutVer], &numMsb)) == OK) )
+ printf("DRF Serial Number in EEPROM: %s%04x\n", serialNum,
+ (numMsb << 8) | numLsb);
+ }
+ }
+ else
+ {
+ printf("Error reading from DRF memory\n");
+ }
+}
+
+/*-----------------------------------------------------------------
+drfMemSerialNumWrite - Memory Serial Number Write
+Writes the given serial number in the drf EEPROM
+*/
+
+/* No Longer Available */
+
+/*-----------------------------------------------------------------
+drfMemChecksumCompute - Memory Checksum Compute
+Computes the checksum of the data in drf EEPROM
+*/
+LOCAL STATUS drfMemChecksumCompute(char* pChecksum)
+{
+ STATUS retStat;
+ char drfEeprom[MAX_RF_MEM_SIZE - 1];
+ int i;
+
+ I2Coperation(ON);
+ retStat = I2Cread(drfEeprom, RF_MEM_ADDR, 0, CHECKSUM[drfMemLayoutVer]);
+ I2Coperation(OFF);
+ for (i = 0, *pChecksum =0; i < CHECKSUM[drfMemLayoutVer]; i++)
+ {
+ *pChecksum += drfEeprom[i];
+ }
+ *pChecksum = 0 - *pChecksum;
+ return retStat;
+}
+
+/*-----------------------------------------------------------------
+drfMemChecksumCheck - Memory Checksum Check
+Checks if the cheksum in the drf EEPROM is correct.
+Also prints the cheksum the in drf EEPROM
+*/
+STATUS drfMemChecksumCheck()
+{
+ STATUS retStat = ERROR;
+ char checksum;
+ char checksumMem;
+
+ if (((drfMemChecksumCompute(&checksum)) == OK) &&
+ ((drfMemLocRead(CHECKSUM[drfMemLayoutVer], &checksumMem)) == OK))
+ {
+ if ((checksum - checksumMem) == 0)
+ printf("DRF EEPROM checksum is correct\n");
+ else
+ printf("DRF EEPROM checksum is incorrect\n");
+ printf("DRF EEPROM checksum: 0x%02x\n",checksumMem);
+ retStat = OK;
+ }
+ else
+ {
+ printf("Error reading from DRF memory\n");
+ }
+ return retStat;
+}
+
+
+/*-----------------------------------------------------------------
+drfMemCheksumFix - Memory Checksum Fix
+Fixes cheksum in drf EEPROM by computing and writing the new checksum
+*/
+STATUS drfMemChecksumFix()
+{
+ STATUS retStat;
+ char checksum;
+
+ retStat = drfMemChecksumCompute(&checksum);
+ I2Coperation(ON);
+ retStat = I2Cwrite(&checksum, RF_MEM_ADDR, CHECKSUM[drfMemLayoutVer], 1);
+ I2Coperation(OFF);
+ if (retStat == ERROR)
+ printf("Error accessing DRF Memory\n");
+ return retStat;
+}
+
diff --git a/data/mnet/GP10/Host/cdcUtils/fpgaConfig/Makefile b/data/mnet/GP10/Host/cdcUtils/fpgaConfig/Makefile
new file mode 100644
index 0000000..f1abcdb
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/fpgaConfig/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = cdcUtils
+THIS_DIRECTORY = fpgaConfig
+MY_OUTPUT = $(OBJDIR)\fpgaConfig.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/cdcUtils/fpgaConfig/fpgaConfig.c b/data/mnet/GP10/Host/cdcUtils/fpgaConfig/fpgaConfig.c
new file mode 100644
index 0000000..c1daa03
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/fpgaConfig/fpgaConfig.c
@@ -0,0 +1,154 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/*******************************************************************************
+Altera FPGA configuration
+
+fpgaConfig - Configures FPGAs
+*******************************************************************************/
+
+/*
+Revision History
+----------------
+99/10/17 ck Modified to use auxPortOutSet function
+99/05/03 ck Initial Version
+*/
+
+#include <vxworks.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <taskLib.h>
+#include <vxLib.h>
+#include <drv/multi/ppc860siu.h>
+#include "cdcUtils/auxPort.h"
+
+#define CONFIG_DONE_BIT 0x00010000
+
+/******************************************************************************
+fpgaConfig
+
+Configure FPGAs. This routine is called to configure the FPGAs. It is called
+once after system boots. It reads the data to be programmed from file fpga.rbf
+
+RETURNS
+ 0 - Success
+ Errors
+ -1 - CONFIG_DONE does not go low
+ -2 - CONFIG_DONE does not go high at the end of configuration
+
+ -100 - Error Reading file
+ -200 - Cannot allocate memory
+
+External Signals
+ In - CONFIG_DONE on port B
+ Out - NCONFIG on Aux. Port
+ Out - DCLK on Aux. Port
+ Out - DATA on Aux. Port
+
+******************************************************************************/
+
+int fpgaConfig
+ (
+ const char* fileName
+ )
+{
+
+ FILE* file; /* input file */
+ char* buff;
+ int buffSize;
+ int byteIndex;
+ int bitNum;
+ char outByte;
+ int returnVal;
+ char i;
+ int immrVal = vxImmrGet();
+
+ /* read the file */
+ file = fopen(fileName,"rb");
+ if (file == 0)
+ {
+ returnVal = -100;
+ goto exit2;
+ }
+ fseek(file,0,SEEK_END);
+ buffSize = ftell(file);
+ fseek(file,0,SEEK_SET);
+ buff = (char *)malloc(buffSize);
+ if (buff == 0)
+ {
+ returnVal = -200;
+ fclose(file);
+ goto exit2;
+ }
+ fread(buff,1,buffSize,file);
+ fclose(file);
+
+ auxPortOutSet(FPGA_NCONFIG, FPGA_NCONFIG); /* NCONFIG high */
+ for(i=0;i<100;i++); /* keep NCONFIG high for a while */
+
+ /* NCONFIG low,DCLK low */
+ auxPortOutSet(~(FPGA_NCONFIG|FPGA_DCLK), FPGA_NCONFIG|FPGA_DCLK);
+ for(i=0;i<100;i++); /* wait at least 2us */
+ auxPortOutSet(FPGA_NCONFIG, FPGA_NCONFIG); /* NCONFIG high */
+ for(i=0;i<250;i++); /* wait at least 5us */
+
+ if (*PBDAT(immrVal) & CONFIG_DONE_BIT)
+ {
+ returnVal = -1;
+ goto exit1;
+ }
+
+ for (byteIndex = 0; byteIndex < buffSize; byteIndex++)
+ {
+
+ /* check if CONFIG_DONE goes high early */
+ /* commented out because CONFIG_DONE goes hiag a few bits before
+ is transferred */
+/*
+ if ((*PBDAT(immrVal) & CONFIG_DONE_BIT))
+ {
+ returnVal = -3;
+ goto exit;
+ }
+*/
+ outByte = buff[byteIndex];
+ for (bitNum = 0; bitNum < 8; bitNum++)
+ {
+ auxPortOutSet((outByte << 6) & ~FPGA_DCLK, FPGA_DATA|FPGA_DCLK); /* DATA, DCLK low */
+ /* wait minimum 50ns */
+ for(i=0;i<4;i++);
+ auxPortOutSet(FPGA_DCLK, FPGA_DCLK); /* DCLK high */
+ /* wait minimum 50ns */
+ for(i=0;i<4;i++);
+
+ outByte = outByte >> 1;
+
+ }
+ }
+
+ /* at this point CONFIG_DONE should be high */
+ if (!(*PBDAT(immrVal) & CONFIG_DONE_BIT))
+ { /* CONFIG_DONE low */
+ returnVal = -2;
+ goto exit1;
+ }
+
+ /* clock ten extra cycles */
+ for (byteIndex = 0; byteIndex < 10; byteIndex++)
+ {
+ auxPortOutSet(~FPGA_DCLK, FPGA_DCLK) ; /* DCLK low */
+ for (i=0;i<4;i++); /* wait minimum 50ns */
+ auxPortOutSet(FPGA_DCLK, FPGA_DCLK); /* DCLK high */
+ for (i=0;i<4;i++); /* wait minimum 50ns */;
+ }
+ returnVal = 0;
+
+ exit1:
+ free(buff);
+ exit2:
+ return(returnVal);
+}
diff --git a/data/mnet/GP10/Host/cdcUtils/include/clkInterface.h b/data/mnet/GP10/Host/cdcUtils/include/clkInterface.h
new file mode 100644
index 0000000..0866d80
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/include/clkInterface.h
@@ -0,0 +1,68 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/*---- Function Declarations ----*/
+
+/**********************************************************************
+clkSerialNumReturn - Serial Number Return
+
+Returns the Serial Number of the clock module.
+*/
+char* clkSerialNumReturn();
+
+
+/**********************************************************************
+clkSoftVersionReturn - Software Version Return
+
+Returns the Software Version of the clock module.
+*/
+char* clkSoftVersionReturn();
+
+
+/**********************************************************************
+clkStatGet - Status Get
+
+Sends a command to clock module to read the status.
+Returns the status or -1 for error.
+
+Thre returned status is:
+
+ 0 - No Alarm conditions
+ 1 - Burst Alarm Active
+ 2 - Frame Alarm Active
+ 3 - Borth Burst and Fram Alarms active
+*/
+int clkStatGet(); /* RETURN: status or -1 for error */
+
+
+/**********************************************************************
+clkNumDaysTuneGet - Number of Days Tune Get
+
+Sends a command to clock module to read the number of days since last tuneup.
+Returns the no. of days or -1 for error.
+*/
+int clkNumDaysTuneGet(); /* RETURN: number of days or -1 for error */
+
+
+/**********************************************************************
+clkNumDaysRunGet - Number of Days Run Get
+
+Sends a command to clock module to read the number of days since it is running.
+Returns the no. of days or -1 for error.
+*/
+
+int clkNumDaysRunGet(); /* RETURN: number of days or -1 for error */
+
+
+/**********************************************************************
+clkGetDateOfLastTuning - Get the date of the last tuning of the clock
+
+Sends a command to clock module to read the last tuning date.
+Returns OK or ERROR.
+*/
+
+STATUS clkGetDateOfLastTuning(unsigned char *month, unsigned char *day, unsigned short *year);
diff --git a/data/mnet/GP10/Host/cdcUtils/include/cload.h b/data/mnet/GP10/Host/cdcUtils/include/cload.h
new file mode 100644
index 0000000..23c6852
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/include/cload.h
@@ -0,0 +1,106 @@
+/***************************************************************************
+* FILENAME: cload.h
+* VERSION: 2.4 5/2/96 13:12:48
+* SCCS ID: "@(#)cload.h 2.4 5/2/96"
+***************************************************************************/
+/*****************************************************************************/
+/* CLOAD.H - Header file for Generic COFF Loader Version 4.00 9/92 */
+/*****************************************************************************/
+
+/*---------------------------------------------------------------------------*/
+/* THIS MACRO IS USED TO FACILIATE ACCESS TO THE SECTION HEADERS */
+/*---------------------------------------------------------------------------*/
+#define SECT_HDR(i) ((SCNHDR *)(sect_hdrs + (i) * SCNHSZ))
+
+/*---------------------------------------------------------------------------*/
+/* THIS MACRO IS USED TO FACILITATE BACKWARDS COMPATIBILITY FOR COFF- */
+/* DEPENDENT TOOLS THAT SUPPORT COFF VERSION 2. */
+/*---------------------------------------------------------------------------*/
+#define O_SECT_HDR(i) ((O_SCNHDR *)(o_sect_hdrs + (i)*SCNHSZ_IN(coff_version)))
+
+/*----------------------------------------------------------------------------*/
+/* STATIC COPY OF 8 CHARACTER SECTION NAME, GUARANTEED NULL TERMINATION WHEN */
+/* USED AS A STRING. */
+/*----------------------------------------------------------------------------*/
+static char stat_nm[SYMNMLEN+1]={'\0','\0','\0','\0','\0','\0','\0','\0','\0'};
+#define SNAMECPY(s) ((char *)strncpy(stat_nm, (s), SYMNMLEN))
+
+/*---------------------------------------------------------------------------*/
+/* THESE MACROS ARE USED TO FIND CINIT AND BSS SECTIONS */
+/*---------------------------------------------------------------------------*/
+#define IS_BSS(sptr) ((sptr->s_flags & STYP_BSS) && \
+ !strcmp(sptr->s_name, ".bss") )
+#define IS_CINIT(sptr) ((sptr->s_flags & STYP_COPY) && \
+ !strcmp(sptr->s_name, CINIT) )
+
+/*---------------------------------------------------------------------------*/
+/* VARIABLES SET BY THE APPLICATION. */
+/*---------------------------------------------------------------------------*/
+extern FILE *fin; /* COFF INPUT FILE */
+extern int verbose; /* PRINT PROGRESS INFO */
+extern int need_data; /* READ IN RAW DATA */
+extern int need_symbols; /* READ IN SYMBOL TABLE */
+extern int clear_bss; /* CLEAR BSS SECTION */
+extern int big_e_config; /* ENDIANNESS CONFIGURATION OF TARGET */
+
+/*---------------------------------------------------------------------------*/
+/* VARIABLES SET BY THE LOADER. */
+/*---------------------------------------------------------------------------*/
+extern FILHDR file_hdr; /* FILE HEADER STRUCTURE */
+extern int coff_version; /* VERSION OF COFF USED BY FILE */
+extern AOUTHDR o_filehdr; /* OPTIONAL (A.OUT) FILE HEADER */
+extern T_ADDR entry_point; /* ENTRY POINT OF MODULE */
+extern T_ADDR *reloc_amount; /* AMOUNT OF RELOCATION PER SECTION */
+extern char *sect_hdrs; /* ARRAY OF SECTION HEADERS */
+extern char *o_sect_hdrs; /* ARRAY OF OLD COFF SECTION HEADERS */
+extern int n_sections; /* NUMBER OF SECTIONS IN THE FILE */
+extern int big_e_target; /* OBJECT DATA IS STORED MSB FIRST */
+extern int byte_swapped; /* BYTE ORDERING OPPOSITE OF HOST */
+extern int curr_sect; /* INDEX OF SECTION CURRENTLY LOADING */
+extern int load_err; /* ERROR CODE RETURNED IF LOADER FAILS */
+extern struct strtab *str_head; /* HEAD OF STRING BUFFER LIST */
+
+/*--------------------------------------------------------------------------*/
+/* CLOAD.C PROTOTYPES */
+/*--------------------------------------------------------------------------*/
+extern int cload PARMS((void));
+extern int cload_headers PARMS((void));
+extern int cload_data PARMS((void));
+extern int cload_sect_data PARMS((struct scnhdr *));
+extern int cload_cinit PARMS((unsigned char *, int *, int *));
+extern int cload_symbols PARMS((void));
+extern int cload_strings PARMS((void));
+extern void str_free PARMS((struct strtab *));
+extern long sym_read PARMS((long, struct syment *, union auxent *));
+extern char *sym_name PARMS((struct syment *));
+extern char *sym_add_name PARMS((struct syment *));
+extern int reloc_add PARMS((long, struct syment *));
+extern int relocate PARMS((RELOC *, unsigned char *, int));
+extern int reloc_read PARMS((RELOC *));
+extern int reloc_size PARMS((int));
+extern int reloc_offset PARMS((int));
+extern int reloc_stop PARMS((int));
+extern long sym_reloc_amount PARMS((RELOC *));
+extern unsigned long unpack PARMS((unsigned char *, int, int, int));
+extern void repack PARMS((unsigned long, unsigned char *, int,int,int));
+extern int cload_lineno PARMS((long, int, struct lineno *, int));
+extern void swap4byte PARMS((void *));
+extern void swap2byte PARMS((void *));
+
+/*---------------------------------------------------------------------------*/
+/* VALUE OF big_e_config IF THERE IS NO TARGET AND SO IT'S A DON'T CARE. */
+/*---------------------------------------------------------------------------*/
+#define DONTCARE -1
+
+/*---------------------------------------------------------------------------*/
+/* ERROR CODES */
+/*---------------------------------------------------------------------------*/
+#define E_FILE 1 /* ERROR READING COFF FILE */
+#define E_MAGIC 2 /* WRONG MAGIC NUMBER */
+#define E_RELOC 3 /* FILE IS NOT RELOCATABLE */
+#define E_SYM 4 /* LOAD_SYM RETURNED FALSE */
+#define E_ALLOC 5 /* MYALLOC OR MRALLOC RETURNED FALSE */
+#define E_SETRELOC 6 /* SET_RELOC_AMOUNT RETURNED FALSE */
+#define E_MEMWRITE 7 /* MEM_WRITE RETURNED FALSE */
+#define E_RELOCENT 8 /* RELOC ENTRY RULES VIOLATED */
+#define E_ENDIAN 9 /* OBJ ENDIANESS CONFLICTS WITH TARGET */
diff --git a/data/mnet/GP10/Host/cdcUtils/include/coff.h b/data/mnet/GP10/Host/cdcUtils/include/coff.h
new file mode 100644
index 0000000..a8ad237
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/include/coff.h
@@ -0,0 +1,590 @@
+/***************************************************************************
+* FILENAME: coff.h
+* VERSION: 2.5 8/5/96 11:36:08
+* SCCS ID: "@(#)coff.h 2.5 8/5/96"
+***************************************************************************/
+/**************************************************************************/
+/* COFF.H - Definition of COFF structures and definitions. */
+/* */
+/* This file defines all standard COFF definitions, used by any program */
+/* which reads or writes COFF files. */
+/* */
+/* HISTORY */
+/* --/--/83 - Original (lost in the mists of time) */
+/* --/--/91 - Tektronics relocation entry kludge */
+/* 01/07/94 RET - Reworked file header and relocation entries, add */
+/* COFF version support. (Removed Tek kludge) */
+/* 12/24/95 TMS - Reworked section header structures for COFF 2 */
+/* */
+/**************************************************************************/
+
+/*------------------------------------------------------------------------*/
+/* COFF VERSION FLAGS */
+/*------------------------------------------------------------------------*/
+#if !defined(COFF_VERSION_0) && \
+ !defined(COFF_VERSION_1) && \
+ !defined(COFF_VERSION_2)
+#define COFF_VERSION_0 0
+#define COFF_VERSION_1 0
+#define COFF_VERSION_2 1
+#endif
+
+#ifndef COFF_VERSION_0
+#define COFF_VERSION_0 0
+#endif
+
+#ifndef COFF_VERSION_1
+#define COFF_VERSION_1 0
+#endif
+
+#ifndef COFF_VERSION_2
+#define COFF_VERSION_2 0
+#endif
+
+/*------------------------------------------------------------------------*/
+/* COFF MAGIC NUMBERS */
+/*------------------------------------------------------------------------*/
+#define COFF_MAGIC_0 0300 /* ORIGINAL VERSION OF COFF */
+#define COFF_MAGIC_1 0301
+#define COFF_MAGIC_2 0302
+
+/*------------------------------------------------------------------------*/
+/* COFF TARGET ID's (FORMERLY MAGIC NUMBERS) */
+/* NOTE!!! DEFINE THE MACRO "MAGIC" TO BE ONE OF THESE MACROS. */
+/*------------------------------------------------------------------------*/
+#define MAGIC_340 0220
+#define MAGIC_370 0221
+#define MAGIC_DSP 0222
+#define MAGIC_C30 0223
+#define MAGIC_380 0224
+#define MAGIC_MVP 0225
+#define MAGIC_C16 0226
+#define MAGIC_ARM 0227
+#define MAGIC_LEAD 0230
+#define MAGIC_C60 0231
+#define MAGIC_C8P 0232
+#define MAGIC_LEADSDK 0233
+#define MAGIC_LEAD3 0234
+#define MAGIC_ANKOOR 0235
+
+#define MAGIC_MIN 0220 /* MINIMUM VALID MAGIC NUMBER */
+#define MAGIC_MAX 0235 /* MAXIMUM VALID MAGIC NUMBER */
+
+/*------------------------------------------------------------------------*/
+/* Macros to recognize magic numbers */
+/*------------------------------------------------------------------------*/
+#define ISCOFF(x) (ISCOFF_0(x)||ISCOFF_1(x)||ISCOFF_2(x)||ISMAGIC(x))
+#define ISMAGIC(x) (((unsigned short)(x)) == MAGIC)
+#define BADMAGIC(x) (((unsigned short)(x) & 0x8080) && !ISMAGIC(x))
+
+#if COFF_VERSION_2
+#define ISCOFF_0(x) ((unsigned short)(x) == COFF_MAGIC_0)
+#define ISCOFF_1(x) ((unsigned short)(x) == COFF_MAGIC_1)
+#define ISCOFF_2(x) ((unsigned short)(x) == COFF_MAGIC_2)
+#elif COFF_VERSION_1
+#define ISCOFF_0(x) ((unsigned short)(x) == COFF_MAGIC_0)
+#define ISCOFF_1(x) ((unsigned short)(x) == COFF_MAGIC_1)
+#define ISCOFF_2(x) FALSE
+#else
+#define ISCOFF_0(x) FALSE
+#define ISCOFF_1(x) FALSE
+#define ISCOFF_2(x) FALSE
+#endif
+
+#define ISMAGIC_ANY(x) (((unsigned short)(x)) >= MAGIC_MIN && \
+ ((unsigned short)(x)) <= MAGIC_MAX)
+#define ISCOFF_ANY(x) (ISCOFF_0(x) || ISCOFF_1(x) || \
+ ISCOFF_2(x) || ISMAGIC_ANY(x))
+
+
+#include "coffdefs.h"
+
+/*------------------------------------------------------------------------*/
+/* COFF FILE HEADER */
+/*------------------------------------------------------------------------*/
+struct filehdr
+{
+ unsigned short f_magic; /* magic number */
+ unsigned short f_nscns; /* number of sections */
+ long f_timdat; /* time & date stamp */
+ long f_symptr; /* file pointer to symtab */
+ long f_nsyms; /* number of symtab entries */
+ unsigned short f_opthdr; /* sizeof(optional hdr) */
+ unsigned short f_flags; /* flags */
+ unsigned short f_target_id; /* target architecture id */
+};
+
+#define FILHDR struct filehdr
+#define FILHSZ (COFF_VERSION_0 ? 20 : 22)
+#define FILHSZ_IN(version) (version >= COFF_MAGIC_1 ? 22 : 20)
+
+/*------------------------------------------------------------------------*/
+/* File header flags */
+/*------------------------------------------------------------------------*/
+#define F_RELFLG 0x01 /* relocation info stripped from file */
+#define F_EXEC 0x02 /* file is executable (no unresolved refs) */
+#define F_LNNO 0x04 /* line nunbers stripped from file */
+#define F_LSYMS 0x08 /* local symbols stripped from file */
+
+/*------------------------------------------------------------------------*/
+/* Target device identification flags (bits 4-7 in file header flags) */
+/*------------------------------------------------------------------------*/
+#define F_VERS0 0x0 /* 0th generation CPU */
+#define F_VERS1 0x10 /* 1st generation CPU */
+#define F_VERS2 0x20 /* 2nd generation CPU */
+#define F_VERS3 0x40 /* 3rd generation CPU */
+#define F_VERS4 0x80 /* 4th generation CPU */
+#define F_VERSION (F_VERS1 | F_VERS2 | F_VERS3 | F_VERS4)
+
+/*------------------------------------------------------------------------*/
+/* Target device raw data byte ordering flags (bits 8-9) */
+/*------------------------------------------------------------------------*/
+#define F_LITTLE 0x100 /* object code is LSB first */
+#define F_BIG 0x200 /* object code is MSB first */
+#define F_BYTE_ORDER (F_LITTLE | F_BIG)
+
+#define F_SYMMERGE 0x1000 /* Tags, etc were merged - no duplicates */
+
+
+/*------------------------------------------------------------------------*/
+/* OPTIONAL FILE HEADER */
+/*------------------------------------------------------------------------*/
+typedef struct aouthdr
+{
+ short magic; /* optional file header magic number */
+ short vstamp; /* version stamp */
+ long tsize; /* text size in bytes, padded to FW bdry*/
+ long dsize; /* initialized data " " */
+ long bsize; /* uninitialized data " " */
+ long entrypt; /* entry pt. */
+ long text_start; /* base of text used for this file */
+ long data_start; /* base of data used for this file */
+} AOUTHDR;
+
+#define AOUTSZ sizeof(AOUTHDR)
+#define AOUT1MAGIC 0410
+
+
+/*------------------------------------------------------------------------*/
+/* COMMON ARCHIVE FILE STRUCTURES */
+/* */
+/* ARCHIVE File Organization: */
+/* +---------------------------------------------+ */
+/* | ARCHIVE_MAGIC_STRING | */
+/* +---------------------------------------------+ */
+/* | ARCHIVE_FILE_MEMBER_1 | */
+/* +- - - - - - - - - - - - - - - - - - - - - - -+ */
+/* | Archive File Header "ar_hdr" | */
+/* | Contents (Ext symbol direct, text file) | */
+/* +---------------------------------------------+ */
+/* | ARCHIVE_FILE_MEMBER_2 | */
+/* +- - - - - - - - - - - - - - - - - - - - - - -+ */
+/* | Archive File Header "ar_hdr" | */
+/* | Contents (.o or text file) | */
+/* +---------------------------------------------+ */
+/* | . . . | */
+/* | . . . | */
+/* | . . . | */
+/* +---------------------------------------------+ */
+/* | ARCHIVE_FILE_MEMBER_n | */
+/* +- - - - - - - - - - - - - - - - - - - - - - -+ */
+/* | Archive File Header "ar_hdr" | */
+/* | Contents (.o or text file) | */
+/* +---------------------------------------------+ */
+/* */
+/*------------------------------------------------------------------------*/
+
+#define ARMAG "!<arch>\n"
+#define SARMAG 8
+#define ARFMAG "`\n"
+#define ARFMAG_SIZE 2
+
+struct ar_hdr /* archive file member header - printable ascii */
+{
+ char ar_name[16]; /* file member name - `/' terminated */
+ char ar_date[12]; /* file member date - decimal */
+ char ar_uid[6]; /* file member user id - decimal */
+ char ar_gid[6]; /* file member group id - decimal */
+ char ar_mode[8]; /* file member mode - octal */
+ char ar_size[10]; /* file member size - decimal */
+ char ar_fmag[2]; /* ARFMAG - string to end header */
+};
+
+#define ARHDR struct ar_hdr
+#define ARHSZ sizeof(ARHDR)
+#define AR_HDR_SZ sizeof(ARHDR)
+#define AR_FNAME_SIZE 16
+
+/*------------------------------------------------------------------------*/
+/* SECTION HEADER */
+/*------------------------------------------------------------------------*/
+#define SYMNMLEN 8 /* Number of characters in a symbol name */
+
+/*------------------------------------------------------------------------*/
+/* THE OLD COFF VERSION TYPE DEFINITION FOR SECTION HEADERS TO PROVIDE */
+/* BACKWARDS COMPATIBILITY FOR COFF-DEPENDENT TOOLS THAT SUPPORT COFF 2. */
+/*------------------------------------------------------------------------*/
+struct o_scnhdr
+{
+ char os_name[8]; /* section name */
+ long os_paddr; /* physical address */
+ long os_vaddr; /* virtual address */
+ long os_size; /* section size */
+ long os_scnptr; /* file ptr to raw data for scn */
+ long os_relptr; /* file ptr to relocation */
+ long os_lnnoptr; /* file ptr to line numbers */
+ unsigned short os_nreloc; /* number of relocation entries */
+ unsigned short os_nlnno; /* number of line number entries */
+ unsigned short os_flags; /* flags */
+ char os_reserved; /* reserved byte */
+ unsigned char os_page; /* memory page id */
+};
+
+/*------------------------------------------------------------------------*/
+/* THE NEW COFF VERSION TYPE DEFINITION FOR SECTION HEADERS. THIS */
+/* REVISION ALLOWS FOR UNRESTRICTED SECTION NAME LENGTH. */
+/*------------------------------------------------------------------------*/
+struct scnhdr
+{
+ union
+ {
+ char _s_name[SYMNMLEN]; /* old COFF version name fld */
+ struct
+ {
+ long _s_zeroes; /* new == 0 */
+ long _s_offset; /* offset into string table */
+ } _s_s;
+ char *_s_nptr[2]; /* allows for overlaying */
+ } _s;
+
+ long s_paddr; /* physical address */
+ long s_vaddr; /* virtual address */
+ long s_size; /* section size */
+ long s_scnptr; /* file ptr to raw data for section */
+ long s_relptr; /* file ptr to relocation */
+ long s_lnnoptr; /* file ptr to line numbers */
+ unsigned long s_nreloc; /* number of relocation entries */
+ unsigned long s_nlnno; /* number of line number entries */
+ unsigned long s_flags; /* flags */
+ short s_reserved; /* reserved 2 bytes */
+ unsigned short s_page; /* memory page id */
+};
+
+#define s_name _s._s_name
+#define s_nptr _s._s_nptr[1]
+#define s_zeroes _s._s_s._s_zeroes
+#define s_offset _s._s_s._s_offset
+
+#define O_SCNHDR struct o_scnhdr
+#define SCNHDR struct scnhdr
+#define O_SCNHSZ sizeof(O_SCNHDR)
+#define SCNHSZ sizeof(SCNHDR)
+#define SCNHSZ_IN(version) (version == COFF_MAGIC_2 ? SCNHSZ : O_SCNHSZ)
+
+/*------------------------------------------------------------------------*/
+/* Define constants for names of "special" sections */
+/*------------------------------------------------------------------------*/
+#define _TEXT ".text"
+#define _DATA ".data"
+#define _BSS ".bss"
+#define _REG ".reg"
+#define _CINIT ".cinit"
+#define _PINIT ".pinit"
+
+/*------------------------------------------------------------------------*/
+/* The low 8 bits of s_flags is used as a section "type" */
+/*------------------------------------------------------------------------*/
+#define STYP_REG 0x00 /* "regular" : allocated, relocated, loaded */
+#define STYP_DSECT 0x01 /* "dummy" : !allocated, relocated, !loaded */
+#define STYP_NOLOAD 0x02 /* "noload" : allocated, relocated, !loaded */
+#define STYP_GROUP 0x04 /* not used */
+#define STYP_PAD 0x08 /* not used */
+#define STYP_COPY 0x10 /* "copy" : used for C init tables -
+ not allocated, relocated,
+ loaded; reloc & lineno
+ entries processed normally */
+#define STYP_TEXT 0x20 /* section contains text only */
+#define STYP_DATA 0x40 /* section contains data only */
+#define STYP_BSS 0x80 /* section contains bss only */
+
+/*------------------------------------------------------------------------*/
+/* Bits 8-11 specify an alignment. The alignment is (2 ** x). */
+/*------------------------------------------------------------------------*/
+#define ALIGN_MASK 0xF00 /* mask for alignment factor */
+#define ALIGN_SIZE(s_flag) (1 << (((unsigned)s_flag & ALIGN_MASK) >> 8))
+
+#define STYP_BLOCK 0x1000 /* use alignment as blocking factor */
+#define STYP_PASS 0x2000 /* Pass section through unchanged */
+#define STYP_CLINK 0x4000 /* Conditionally link section */
+
+
+
+/*------------------------------------------------------------------------*/
+/* RELOCATION ENTRIES */
+/* WE SUPPORT TWO TYPES OF RELOCATION ENTRIES: */
+/* 1) OLD STYLE, WITH 16 BIT SYMBOL TABLE INDEX. */
+/* 2) NEW STYLE, WITH 32 BIT SYMBOL TABLE INDEX. */
+/* FOR ANY GIVEN INPUT FILE, THE FILE HEADER FLAG "F_RELOC_12" INDICATES */
+/* THE TYPE OF RELOCATION ENTRY IN THE FILE. */
+/* THE TARGET-SPECIFIC FLAG RELOC_ENTRY_12 DETERMINES WHETHER THE NEW */
+/* STYLE IS SUPPORTED ON A GIVEN TARGET. */
+/*------------------------------------------------------------------------*/
+typedef struct reloc_old
+{
+ long r_vaddr; /* (virtual) address of reference */
+ short r_symndx; /* index into symbol table */
+ unsigned short r_disp; /* additional bits for addr calc */
+ unsigned short r_type; /* relocation type */
+} RELOC_OLD;
+
+typedef struct reloc
+{
+ long r_vaddr; /* (virtual) address of reference */
+#if COFF_VERSION_0
+ short r_symndx; /* 16-bit index into symbol table */
+#else
+ long r_symndx; /* 32-bit index into symbol table */
+#endif
+ unsigned short r_disp; /* additional bits for addr calc */
+ unsigned short r_type; /* relocation type */
+} RELOC;
+
+#define RELSZ (COFF_VERSION_0 ? 10 : 12)
+#define RELSZ_IN(version) ((version >= COFF_MAGIC_1) ? 12 : 10)
+
+/*------------------------------------------------------------------------*/
+/* define all relocation types */
+/*------------------------------------------------------------------------*/
+#define R_ABS 0 /* absolute address - no relocation */
+#define R_DIR16 01 /* UNUSED */
+#define R_REL16 02 /* UNUSED */
+#define R_DIR24 04 /* UNUSED */
+#define R_REL24 05 /* 24 bits, direct */
+#define R_DIR32 06 /* UNUSED */
+#define R_RRRELREG 016 /* RR: 8 bit relocatable register */
+#define R_RELBYTE 017 /* 8 bits, direct */
+#define R_RELWORD 020 /* 16 bits, direct */
+#define R_RELLONG 021 /* 32 bits, direct */
+#define R_PCRBYTE 022 /* 8 bits, PC-relative */
+#define R_PCRWORD 023 /* 16 bits, PC-relative */
+#define R_PCRLONG 024 /* 32 bits, PC-relative */
+#define R_PCR24 025 /* 24 bits, PC-relative */
+#define R_PCR23H 026 /* 23 bits, PC-rel in halfwords(x>>1) */
+#define R_PCR24W 027 /* 24 bits, PC-rel in words (x >> 2) */
+#define R_OCRLONG 030 /* GSP: 32 bits, one's compl direct */
+#define R_GSPPCR16 031 /* GSP: 16 bits, PC relative (in words) */
+#define R_GSPOPR32 032 /* GSP: 32 bits, direct big-endian */
+#define R_GSPPCA16 033 /* GSP: same as GSPPCR16, but PC const */
+#define R_OCBD32 034 /* GSP: 32 bits, 1's compl,big-endian */
+#define R_RRNREG 035 /* RR: 8 bit reloc. reg. w/ neg off */
+#define R_PARTLS16 040 /* Brahma: 16 bit offset of 24 bit addr */
+#define R_PARTMS8 041 /* Brahma: 8 bit page of 24 bit addr */
+#define R_PARTLS7 050 /* DSP: 7 bit offset of 16 bit addr */
+#define R_PARTMS9 051 /* DSP: 9 bit page of 16 bit addr */
+#define R_REL13 052 /* DSP: 13 bits, direct */
+#define R_REL23 053 /* DSP,C54X: 23 bits, direct (ext addr) */
+#define R_RELXPC 054 /* DSP,C54X: 16 bits, relative to XPC */
+#define R_HIEXT 055 /* C54X: Hi word of extended prog addr */
+#define R_HIWORD 061 /* RR: 8 bit reloc. hi byte of word */
+#define R_LABCOD 062 /* C16 16-bit code address relocation */
+
+#define R_PPBASE 064 /* PP: Global Base address type */
+#define R_PPLBASE 065 /* PP: Local Base address type */
+#define R_PP15 070 /* PP: Global 15 bit offset */
+#define R_PP15W 071 /* PP: Global 15 bit offset / 4 */
+#define R_PP15H 072 /* PP: Global 15 bit offset / 2 */
+#define R_PP16B 073 /* PP: Global 16 bit offset for bytes */
+#define R_PPL15 074 /* PP: Local 15 bit offset */
+#define R_PPL15W 075 /* PP: Local 15 bit offset divided by 4 */
+#define R_PPL15H 076 /* PP: Local 15 bit offset divided by 2 */
+#define R_PPL16B 077 /* PP: Local 16 bit offset for bytes */
+#define R_PPN15 0100 /* PP: Global 15 bit neg offset */
+#define R_PPN15W 0101 /* PP: Global 15 bit neg offset / 4 */
+#define R_PPN15H 0102 /* PP: Global 15 bit neg offset / 2 */
+#define R_PPN16B 0103 /* PP: Global 16 bit neg byte offset */
+#define R_PPLN15 0104 /* PP: Local 15 bit neg offset */
+#define R_PPLN15W 0105 /* PP: Local 15 bit neg offset / 4 */
+#define R_PPLN15H 0106 /* PP: Local 15 bit neg offset / 2 */
+#define R_PPLN16B 0107 /* PP: Local 16 bit neg byte offset */
+
+#define R_MPPCR 0117 /* MP: 32-bit PC-relative / 4 */
+
+#define R_C60BASE 0120 /* C60: Data Page Pointer Based Offset */
+#define R_C60DIR15 0121 /* C60: LD/ST long Displacement */
+#define R_C60PCR21 0122 /* C60: 21-bit Packet PC Relative */
+#define R_C60LO16 0124 /* C60: MVK Low Half Register */
+#define R_C60HI16 0125 /* C60: MVKH/MVKLH High Half Register */
+
+#define R_C8PHIBYTE 0130 /* C8+: High byte of 24-bit address. */
+#define R_C8PMIDBYTE 0131 /* C8+: Middle byte of 24-bit address. */
+#define R_C8PVECADR 0132 /* C8+: Vector address (0xFFnnnn) */
+#define R_C8PADR24 0133 /* C8+: 24-bit address (rev byte order) */
+
+#define R_PARTLS6 0135 /* ANKOOR: 6 bit offset of 22 bit addr */
+#define R_PARTMID10 0136 /* ANKOOR: Middle 10 bits of 22 bit addr*/
+#define R_REL22 0137 /* ANKOOR: 22 bits, direct */
+#define R_PARTMS6 0140 /* ANKOOR: Upper 6 bits of 22 bit addr */
+#define R_PARTMS16 0141 /* ANKOOR: Upper 16 bits of 22 bit addr */
+#define R_ANKPCR16 0142 /* ANKOOR: PC relative 16 bit */
+#define R_ANKPCR8 0143 /* ANKOOR: PC relatvie 8 bit */
+
+
+/*------------------------------------------------------------------------*/
+/* LINE NUMBER ENTRIES */
+/*------------------------------------------------------------------------*/
+struct lineno
+{
+ union
+ {
+ long l_symndx; /* sym index of fcn name iff l_lnno == 0 */
+ long l_paddr; /* (physical) address of line number */
+ } l_addr;
+ unsigned short l_lnno; /* line number */
+};
+
+#define LINENO struct lineno
+#define LINESZ 6 /* sizeof(LINENO) */
+
+
+/*------------------------------------------------------------------------*/
+/* SYMBOL TABLE ENTRIES */
+/*------------------------------------------------------------------------*/
+
+#define FILNMLEN 14 /* Number of characters in a file name */
+#define DIMNUM 4 /* Number of array dimensions in aux entry */
+
+typedef unsigned short STYPE;
+
+struct syment
+{
+ union
+ {
+ char _n_name[SYMNMLEN]; /* old COFF version */
+ struct
+ {
+ long _n_zeroes; /* new == 0 */
+ long _n_offset; /* offset into string table */
+ } _n_n;
+ char *_n_nptr[2]; /* allows for overlaying */
+ } _n;
+
+ long n_value; /* value of symbol */
+ short n_scnum; /* section number */
+ STYPE n_type; /* type and derived type */
+ char n_sclass; /* storage class */
+ char n_numaux; /* number of aux. entries */
+};
+
+#define n_name _n._n_name
+#define n_nptr _n._n_nptr[1]
+#define n_zeroes _n._n_n._n_zeroes
+#define n_offset _n._n_n._n_offset
+
+/*------------------------------------------------------------------------*/
+/* Relocatable symbols have a section number of the */
+/* section in which they are defined. Otherwise, section */
+/* numbers have the following meanings: */
+/*------------------------------------------------------------------------*/
+#define N_UNDEF 0 /* undefined symbol */
+#define N_ABS -1 /* value of symbol is absolute */
+#define N_DEBUG -2 /* special debugging symbol */
+
+
+/*------------------------------------------------------------------------*/
+/* AUXILIARY SYMBOL ENTRY */
+/*------------------------------------------------------------------------*/
+#define SPACE(len, name) char name[len]
+
+union auxent
+{
+ struct
+ {
+ SPACE(4, _0_3);
+ long x_fsize; /* size of struct in bits. */
+ SPACE(4, _8_11);
+ long x_endndx; /* ptr to next sym beyond .eos */
+ SPACE(2, _16_17);
+ } x_tag;
+
+ struct
+ {
+ long x_tagndx; /* ptr to beginning of struct */
+ long x_fsize; /* size of struct in bits. */
+ SPACE(10, _8_17);
+ } x_eos;
+
+ struct
+ {
+ long x_tagndx; /* ptr to tag for function */
+ long x_fsize; /* size of function in bits */
+ long x_lnnoptr; /* file ptr to fcn line # */
+ long x_endndx; /* ptr to next sym beyond .ef */
+ SPACE(2, _16_17);
+ } x_func;
+
+ struct
+ {
+ long x_regmask; /* Mask of regs use by func */
+ unsigned short x_lnno; /* line number of block begin */
+ unsigned short x_lcnt; /* # line number entries in func */
+ long x_framesize; /* size of func local vars */
+ long x_endndx; /* ptr to next sym beyond .eb */
+ SPACE(2, _16_17);
+ } x_block;
+
+ struct
+ {
+ long x_tagndx; /* ptr to tag for array type */
+ long x_fsize; /* Size of array in bits. */
+ unsigned short x_dimen[DIMNUM];
+ SPACE(2, _16_17);
+ } x_array;
+
+ struct
+ {
+ long x_tagndx; /* str, un, or enum tag indx */
+ long x_fsize; /* Size of symbol */
+ SPACE(10, _10_17);
+ } x_sym;
+
+ struct
+ {
+ char x_fname[FILNMLEN];
+ } x_file;
+
+ struct
+ {
+ long x_scnlen; /* section length */
+ unsigned short x_nreloc; /* number of reloc entries */
+ unsigned short x_nlinno; /* number of line numbers */
+ SPACE(8, _10_17);
+ } x_scn;
+};
+
+#define SYMENT struct syment
+#define SYMESZ 18 /* sizeof(SYMENT) */
+
+#define AUXENT union auxent
+#define AUXESZ 18 /* sizeof(AUXENT) */
+
+/*------------------------------------------------------------------------*/
+/* NAMES OF "SPECIAL" SYMBOLS */
+/*------------------------------------------------------------------------*/
+#define _BF ".bf"
+#define _EF ".ef"
+#define _STEXT ".text"
+#define _ETEXT "etext"
+#define _SDATA ".data"
+#define _EDATA "edata"
+#define _SBSS ".bss"
+#define _END "end"
+#define _CINITPTR "cinit"
+#define _PINITPTR "pinit"
+#define _ASM_SRC_NAME "$ASM$" /* SPECIAL SYMBOL FOR ASSY SRC DEBUG */
+
+/*------------------------------------------------------------------------*/
+/* ENTRY POINT SYMBOLS */
+/*------------------------------------------------------------------------*/
+#define _START "_start"
+#define _MAIN "_main"
+
diff --git a/data/mnet/GP10/Host/cdcUtils/include/coffdefs.h b/data/mnet/GP10/Host/cdcUtils/include/coffdefs.h
new file mode 100644
index 0000000..47c1879
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/include/coffdefs.h
@@ -0,0 +1,232 @@
+/***************************************************************************
+* FILENAME: coffdefs.h
+* VERSION: 2.2 3/1/96 17:06:02
+* SCCS ID: "@(#)coffdefs.h 2.2 3/1/96"
+***************************************************************************/
+/**************************************************************************/
+/* COFFDEFS.H */
+/* Definitions of COFF symbol type and storage class fields. */
+/**************************************************************************/
+
+/*------------------------------------------------------------------------*/
+/* STORAGE CLASSES */
+/*------------------------------------------------------------------------*/
+#define C_NULL 0
+#define C_AUTO 1 /* AUTOMATIC VARIABLE */
+#define C_EXT 2 /* EXTERNAL SYMBOL */
+#define C_STAT 3 /* STATIC */
+#define C_REG 4 /* REGISTER VARIABLE */
+#define C_EXTREF 5 /* EXTERNAL DEFINITION */
+#define C_LABEL 6 /* LABEL */
+#define C_ULABEL 7 /* UNDEFINED LABEL */
+#define C_MOS 8 /* MEMBER OF STRUCTURE */
+#define C_ARG 9 /* FUNCTION ARGUMENT */
+#define C_STRTAG 10 /* STRUCTURE TAG */
+#define C_MOU 11 /* MEMBER OF UNION */
+#define C_UNTAG 12 /* UNION TAG */
+#define C_TPDEF 13 /* TYPE DEFINITION */
+#define C_USTATIC 14 /* UNDEFINED STATIC */
+#define C_ENTAG 15 /* ENUMERATION TAG */
+#define C_MOE 16 /* MEMBER OF ENUMERATION */
+#define C_REGPARM 17 /* REGISTER PARAMETER */
+#define C_FIELD 18 /* BIT FIELD */
+#define C_UEXT 19 /* TENTATIVE EXTERNAL DEFINITION */
+#define C_STATLAB 20 /* STATIC LOAD-TIME LABEL */
+#define C_EXTLAB 21 /* EXTERNAL LOAD-TIME LABEL */
+#define C_VREG 22 /* VIRTUAL REGISTER VARIABLE */
+#define C_SYSTEM 23 /* SYSTEM-WIDE SYMBOL */
+#define C_STATREG 24 /* STATIC REGISTER VARIABLE */
+#define C_EXTREG 25 /* EXTERNAL REGISTER VARIABLE */
+#define C_EXTREFREG 26 /* EXTERNAL REGISTER VARIABLE REFERENCE */
+#define C_VARARG 27 /* LAST DECLARED PARAMETER OF VARARG FN */
+#define C_EXTDEF 28 /* C_EXT DEFINED IN DIFFERENT FILE */
+#define C_USTATREG 29 /* UNDEFINED STATIC REGISTER VARIABLE */
+
+#define C_BLOCK 100 /* ".BB" OR ".EB" */
+#define C_FCN 101 /* ".BF" OR ".EF" */
+#define C_EOS 102 /* END OF STRUCTURE */
+#define C_FILE 103 /* FILE NAME */
+#define C_LINE 104 /* DUMMY SCLASS FOR LINE NUMBER ENTRY */
+#define C_ALIAS 105 /* DUPLICATE TAG */
+#define C_PREF 106 /* DUMMY SCLASS FOR REF PRAGMA TABLE ENTRY */
+
+#define C_GRPTAG 107 /* TAG FOR GROUPED GLOBAL VARIABLES */
+#define C_SMOG 108 /* STATIC MEMBER OF GROUP */
+#define C_EMOG 109 /* EXTERN MEMBER OF GROUP */
+#define C_EOG 110 /* END OF GROUP */
+
+/*------------------------------------------------------------------------*/
+/* STORAGE CLASS QUALIFIERS */
+/*------------------------------------------------------------------------*/
+#define CQ_NEAR 0x1
+#define CQ_FAR 0x2
+#define CQ_INLINE 0x4
+#define CQ_SUPPRESS 0x8
+#define CQ_CONTROL 0x10
+#define CQ_INTERRUPT 0x20
+#define CQ_TRAP 0x40
+#define CQ_GREGISTER 0x80
+#define CQ_PORT 0x100
+#define CQ_SYSTEM 0x200
+#define CQ_SYSTEMPP 0x400
+#define CQ_REENTRANT 0x800
+
+/*------------------------------------------------------------------------*/
+/* STORAGE CLASS MACROS */
+/*------------------------------------------------------------------------*/
+#define ISLOCAL(c) ((c) == C_AUTO || (c) == C_REG || (c) == C_VREG)
+#define ISPARM(c) ((c) == C_ARG || (c) == C_REGPARM || (c) == C_VARARG)
+#define ISAUTO(c) ((c) == C_AUTO || (c) == C_ARG || (c) == C_VARARG)
+#define ISREG(c) ((c) == C_REG || (c) == C_REGPARM || (c) == C_VREG || \
+ (c) == C_EXTREG || (c) == C_STATREG || (c) == C_EXTREFREG)
+#define ISTAG(c) ((c) == C_STRTAG || (c) == C_UNTAG || (c) == C_ENTAG)
+#define ISGROUP(c) ((c) == C_GRPTAG)
+
+#define ISMOS(c) ((c) == C_MOS || (c) == C_MOU || \
+ (c) == C_MOE || (c) == C_FIELD)
+
+#define ISXDEF(c) ((c) == C_STAT || (c) == C_STATREG || \
+ (c) == C_EXT || (c) == C_EXTDEF || (c) == C_EXTREG)
+
+#define ISEXT(c) ((c) == C_USTATIC || (c) == C_STAT || (c) == C_STATREG ||\
+ (c) == C_EXTREF || (c) == C_UEXT || (c) == C_EXTREFREG||\
+ (c) == C_EXT || (c) == C_EXTDEF || (c) == C_EXTREG ||\
+ (c) == C_EXTLAB || (c) == C_SYSTEM)
+
+#define ISGLOB(c) ((c) == C_EXTREF || (c) == C_UEXT || (c) == C_EXTREFREG||\
+ (c) == C_EXT || (c) == C_EXTDEF || (c) == C_EXTREG ||\
+ (c) == C_EXTLAB || (c) == C_SYSTEM)
+
+#define ISNEAR(cq) (((cq) & CQ_NEAR) != 0)
+#define ISFAR(cq) (((cq) & CQ_FAR) != 0)
+#define ISCONTROL(cq) (((cq) & CQ_CONTROL) != 0)
+#define ISGREGISTER(cq) (((cq) & CQ_GREGISTER) != 0)
+#define ISPORT(cq) (((cq) & CQ_PORT) != 0)
+#define ISINTERRUPT(cq) (((cq) & CQ_INTERRUPT) != 0)
+#define ISREENTRANT(cq) (((cq) & CQ_REENTRANT) != 0)
+#define ISTRAP(cq) (((cq) & CQ_TRAP) != 0)
+#define ISINT_OR_TRAP(cq) (((cq) & (CQ_TRAP | CQ_INTERRUPT)) != 0)
+
+
+
+/*------------------------------------------------------------------------*/
+/* BASIC TYPES - PACKED INTO THE LOWER 4 BITS OF THE TYPE FIELD */
+/*------------------------------------------------------------------------*/
+#define T_NULL 0x80 /* UNDEFINED OR ERROR TYPE (NO TYPE INFO) */
+#define T_VOID 0 /* VOID TYPE */
+#define T_SCHAR 1 /* CHARACTER (EXPLICITLY "signed") */
+#define T_CHAR 2 /* CHARACTER (IMPLICITLY SIGNED) */
+#define T_SHORT 3 /* SHORT INTEGER */
+#define T_INT 4 /* INTEGER */
+#define T_LONG 5 /* LONG INTEGER */
+#define T_FLOAT 6 /* SINGLE PRECISION FLOATING POINT */
+#define T_DOUBLE 7 /* DOUBLE PRECISION FLOATING POINT */
+#define T_STRUCT 8 /* STRUCTURE */
+#define T_UNION 9 /* UNION */
+#define T_ENUM 10 /* ENUMERATION */
+#define T_LDOUBLE 11 /* LONG DOUBLE FLOATING POINT */
+#define T_UCHAR 12 /* UNSIGNED CHARACTER */
+#define T_USHORT 13 /* UNSIGNED SHORT */
+#define T_UINT 14 /* UNSIGNED INTEGER */
+#define T_ULONG 15 /* UNSIGNED LONG */
+
+/*------------------------------------------------------------------------*/
+/* SIGNED AND UNSIGNED ARE NOT ACTUALLY STORED IN THE TYPE FIELD BUT */
+/* USED TO MODIFY THE BYTPE ACCORDINGLY. */
+/*------------------------------------------------------------------------*/
+#define T_SIGNED 16 /* BECOMES CHAR, SHORT, INT, OR LONG */
+#define T_UNSIGNED 17 /* BECOMES UCHAR, USHORT, UINT, OR ULONG */
+
+/*------------------------------------------------------------------------*/
+/* DERIVED TYPES: 2 BITS EACH */
+/*------------------------------------------------------------------------*/
+#define DT_NON 0x0 /* NO DERIVED TYPE */
+#define DT_PTR 0x1 /* POINTER */
+#define DT_FCN 0x2 /* FUNCTION */
+#define DT_ARY 0x3 /* ARRAY */
+
+/*------------------------------------------------------------------------*/
+/* TYPE QUALIFIERS - USES SAME ENCODING AS TYPE FIELDS */
+/*------------------------------------------------------------------------*/
+#define Q_CONST 0x1
+#define Q_VOLATILE 0x2
+
+
+/*------------------------------------------------------------------------*/
+/* TYPE FIELD MASKS AND SIZES */
+/*------------------------------------------------------------------------*/
+#define N_BTMASK 0xF /* MASK FOR BASIC TYPE */
+#define N_TMASK 0x30 /* MASK FOR FIRST DERIVED TYPE */
+#define N_DTMAX 12 /* MAXIMUM DERIVED TYPES */
+#define N_BTSHFT 4 /* SHIFT AMOUNT (WIDTH) FOR BASIC TYPE */
+#define N_TSHIFT 2 /* SHIFT AMOUNT (WIDTH) FOR DERIVED TYPES */
+
+/*------------------------------------------------------------------------*/
+/* TYPE MANIPULATION MACROS */
+/* */
+/* BTYPE(t) - Return basic type from t */
+/* DTYPE(t) - Return all derived types from t */
+/* DTYPE1(t) - Return 1st derived type from t */
+/* TQUAL(t,q) - Return qualification of type */
+/* UNQUAL(t,q) - Return unqualified version of type */
+/* */
+/* MKTYPE() - Build a type from basic and several derived types */
+/* DERIVE(d,t) - Build a type from basic and one derived type */
+/* INCREF(t) - Convert 't' into pointer to 't' */
+/* DECREF(t) - Remove first derviation from t */
+/* */
+/* ISINT(t) - TRUE if t is an integral type */
+/* ISSGN(t) - TRUE if t is a signed type */
+/* ISUNS(t) - TRUE if t is an unsigned type */
+/* ISFLT(t) - TRUE if t is a floating point type */
+/* ISDBL(t) - TRUE if t is a double or long double type */
+/* ISPTR(t) - TRUE if t is a pointer */
+/* ISFCN(t) - TRUE if t is a function */
+/* ISARY(t) - TRUE if t is an array */
+/* ISSTR(t) - TRUE if t is a struct, union, or enum type */
+/* ISAGG(t) - TRUE if t is an array, struct, or union */
+/* */
+/* ITOU(t) - convert signed type to unsigned equivalent */
+/* UTOI(t) - convert unsigned type to signed equivalent */
+/* NOSIGN(t) - convert signed or unsigned type to "plain" equivalent */
+/*------------------------------------------------------------------------*/
+#define BTYPE(t) ((int)((t) & N_BTMASK))
+#define DTYPE(t) ((t) & ~N_BTMASK)
+#define DTYPE1(t) (((t) & N_TMASK) >> N_BTSHFT)
+
+#define TQUAL(t,q) ((int)(DTYPE(t) ? DTYPE1(q) : BTYPE(q)))
+#define UNQUAL(t,q) (ISPTR(t) ? ((q) & ~N_TMASK) : ((q) & ~N_BTMASK))
+
+#define MKTYPE(basic, d1,d2,d3,d4,d5,d6) \
+ ((basic) | ((d1) << 4) | ((d2) << 6) | ((d3) << 8) |\
+ ((d4) << 10) | ((d5) << 12) | ((d6) << 14))
+#define DERIVE(d,t) ((DTYPE(t) << N_TSHIFT) | ((d) << N_BTSHFT) | BTYPE(t))
+#define INCREF(t) ((DTYPE(t) << N_TSHIFT) | (DT_PTR << N_BTSHFT) | BTYPE(t))
+#define DECREF(t) (DTYPE((t) >> N_TSHIFT) | BTYPE(t))
+
+#define ISSGN(t) (((t) >= T_SCHAR && (t) <= T_LONG) || (t) == T_ENUM)
+#define ISUNS(t) ((t) >= T_UCHAR && (t) <= T_ULONG)
+#define ISINT(t) (((t) >= T_SCHAR && (t) <= T_LONG) || (t) == T_ENUM || \
+ ((t) >= T_UCHAR && (t) <= T_ULONG))
+#define ISFLT(t) ((t) == T_FLOAT || (t) == T_DOUBLE || (t) == T_LDOUBLE)
+#define ISDBL(t) ((t) == T_DOUBLE || (t) == T_LDOUBLE)
+#define ISPTR(t) (((t) & N_TMASK) == (DT_PTR << N_BTSHFT))
+#define ISFCN(t) (((t) & N_TMASK) == (DT_FCN << N_BTSHFT))
+#define ISARY(t) (((t) & N_TMASK) == (DT_ARY << N_BTSHFT))
+#define ISSTR(t) ((t) == T_STRUCT || (t) == T_UNION || (t) == T_ENUM)
+#define ISAGG(t) (ISARY(t) || (t) == T_STRUCT || (t) == T_UNION)
+#define ISCHAR(t) ((t) == T_CHAR || (t) == T_SCHAR || (t) == T_UCHAR)
+#define ISSHORT(t) ((t) == T_SHORT || (t) == T_USHORT)
+#define ISLONG(t) ((t) == T_LONG || (t) == T_ULONG)
+
+#define ITOU(t) ((t) + (T_UCHAR - ((t) == T_SCHAR ? T_SCHAR : T_CHAR)))
+#define UTOI(t) ((t) - (T_UCHAR - T_CHAR))
+#define NOSIGN(t) (ISUNS(t) ? UTOI(t) : (t) == T_SCHAR ? T_CHAR : (t))
+
+/*------------------------------------------------------------------------*/
+/* ILLEGAL TYPES USED TO MARK SPECIAL OBJECTS. */
+/* */
+/* T_VENEER - DENOTES A VENEER OF A FUNCTION. */
+/*------------------------------------------------------------------------*/
+#define T_VENEER (MKTYPE(T_VOID, DT_FCN, DT_FCN, 0, 0, 0, 0))
+#define ISVENEER(t) ((t) == T_VENEER)
diff --git a/data/mnet/GP10/Host/cdcUtils/include/header.h b/data/mnet/GP10/Host/cdcUtils/include/header.h
new file mode 100644
index 0000000..1d7df1e
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/include/header.h
@@ -0,0 +1,35 @@
+/************************************************************************/
+/* HEADER.H - STANDARD HEADER FILE FOR COFF LOADERS */
+/************************************************************************/
+
+/*-----------------------------------------------------------------------*/
+/* THE PARMS MACRO IS USED TO EXPAND FUNCTION ARGUMENT PROTOTYPES. THIS */
+/* ENABLES THE SHARING OF PROTOTYPE DEFINITIONS BETWEEN ANSI AND N0N-ANSI*/
+/* COMPILERS. FOR ANSI COMPILERS PROTOTYPE PARAMETERS ARE INCLUDED, FOR */
+/* NON-ANSI COMPILERS PROTOTYPE PARAMETERS ARE EXCLUDED. */
+/* TO USE THE PARMS MACRO, PROTOTYPES SHOULD BE DEFINED IN THE */
+/* FOLLOWING MANNER: */
+/* extern int foo PARMS((double d, int i, char *s)); */
+/*-----------------------------------------------------------------------*/
+#ifdef __STDC__
+#define PARMS(x) x
+#else
+#define PARMS(x) ()
+#endif
+
+/*-----------------------------------------------------------------------*/
+/* INCLUDE STANDARD HEADER FILES */
+/*-----------------------------------------------------------------------*/
+#include <stdio.h>
+#include "version.h"
+#include "params.h"
+#include "coff.h"
+#include "cload.h"
+#include "proto.h"
+
+/*-----------------------------------------------------------------------*/
+/* CONSTANTS, MACROS, VARIABLES, AND STRUCTURES FOR THE LOADER. */
+/*-----------------------------------------------------------------------*/
+#define MIN(a,b) ((a)<(b)?(a):(b))
+#define MAX(a,b) ((a)>(b)?(a):(b))
+
diff --git a/data/mnet/GP10/Host/cdcUtils/include/params.h b/data/mnet/GP10/Host/cdcUtils/include/params.h
new file mode 100644
index 0000000..44c1b65
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/include/params.h
@@ -0,0 +1,277 @@
+/****************************************************************************/
+/* PARAMS.H - Target dependent parameters. */
+/****************************************************************************/
+
+#if TMS340
+typedef unsigned long T_ADDR; /* TYPE FOR TARGET ADDRESS */
+typedef unsigned short T_DATA; /* TYPE FOR TARGET DATA WORD */
+typedef unsigned short T_SIZE; /* TYPE FOR CINIT SIZE FIELD */
+typedef unsigned long T_IADDR; /* TYPE FOR CINIT ADDRESS FIELD */
+typedef unsigned short T_INSTRUCT; /* TYPE FOR INSTRUCTION OPCODE */
+
+#define MAGIC MAGIC_340
+/* #define NEW_SYM_NDX 1 USE 32-bit SYMBOL INDEX, NO DISP */
+#define BYTETOLOC(x) ((T_ADDR)(x)<<3) /* CONVERT ADDRESSES TO BYTES */
+#define LOCTOBYTE(x) ((x)>>3) /* CONVERT BYTES TO ADDRESSES */
+#define BIT_OFFSET(a) ((a)&7) /* BIT OFFSET OF ADDR WITHIN BYTE */
+
+#ifdef OTIS
+#define LOADBUFSIZE (TRG_MAX_MBLK/8) /* USE OTIS BUFFER SIZE */
+#else
+#define LOADBUFSIZE 0x1000 /* 16K BUFFER FOR LOADING DATA */
+#endif
+
+#define LOADWORDSIZE 2 /* MINIMUM DIVISOR OF LOAD SIZE */
+#define CINIT ".cinit" /* NAME OF CINIT SECTION */
+#define INIT_ALIGN 1 /* ALIGNMENT OF CINIT RECORDS */
+#define INIT_WSIZE 2 /* SIZE IN BYTES OF INIT DATA ITEMS */
+#endif
+
+#if TMS32030 || TMS32040
+typedef unsigned long T_ADDR; /* TYPE FOR TARGET ADDRESS */
+typedef unsigned long T_DATA; /* TYPE FOR TARGET DATA WORD */
+typedef unsigned long T_SIZE; /* TYPE FOR CINIT SIZE FIELD */
+typedef unsigned long T_IADDR; /* TYPE FOR CINIT ADDRESS FIELD */
+typedef unsigned long T_INSTRUCT; /* TYPE FOR INSTRUCTION OPCODE */
+
+#define MAGIC MAGIC_C30 /* Magic number for C30 */
+
+#define LOCTOBYTE(x) ((x)<<2) /* C30 word addrs to byte addrs */
+#define BYTETOLOC(x) ((x)>>2) /* byte addrs to word addrs */
+#define BIT_OFFSET(a) (0) /* BIT OFFSET OF ADDR WITHIN BYTE */
+
+#ifdef OTIS
+#define LOADBUFSIZE (TRG_MAX_MBLK/8) /* USE OTIS BUFFER SIZE */
+#else
+#define LOADBUFSIZE 0x0FF8 /* 4K-8 BUFFER FOR LOADING DATA */
+#endif
+
+#define LOADWORDSIZE 2 /* MINIMUM DIVISOR OF LOAD SIZE */
+#define CINIT ".cinit" /* NAME OF CINIT SECTION */
+#define INIT_ALIGN 1 /* ALIGNMENT OF CINIT RECORDS */
+#define INIT_WSIZE 4 /* SIZE IN BYTES OF INIT DATA ITEMS */
+#endif
+
+#if TMS32025 || TMS32050
+typedef unsigned short T_ADDR; /* TYPE FOR TARGET ADDRESS */
+typedef unsigned short T_DATA; /* TYPE FOR TARGET DATA WORD */
+typedef unsigned short T_SIZE; /* TYPE FOR CINIT SIZE FIELD */
+typedef unsigned short T_IADDR; /* TYPE FOR CINIT ADDRESS FIELD */
+typedef unsigned short T_INSTRUCT; /* TYPE FOR INSTRUCTION OPCODE */
+
+#define MAGIC MAGIC_DSP /* Magic number for C25 */
+
+#define LOCTOBYTE(x) ((x)<<1) /* 16-bit word addrs to byte addrs */
+#define BYTETOLOC(x) ((x)>>1) /* byte addrs to word addrs */
+#define BIT_OFFSET(a) (0) /* BIT OFFSET OF ADDR WITHIN BYTE */
+
+#ifdef OTIS
+#define LOADBUFSIZE (TRG_MAX_MBLK/8) /* USE OTIS BUFFER SIZE */
+#else
+#define LOADBUFSIZE 0x4000 /* 16K BUFFER FOR LOADING DATA */
+#endif /* ifdef OTIS */
+
+#define LOADWORDSIZE 2 /* MINIMUM DIVISOR OF LOAD SIZE */
+#define CINIT ".cinit" /* NAME OF CINIT SECTION */
+#define INIT_ALIGN 1 /* ALIGNMENT OF CINIT RECORDS */
+#define INIT_WSIZE 2 /* SIZE IN BYTES OF INIT DATA ITEMS */
+
+#endif /* TMS32025 || TMS32050 */
+
+#if TMS380
+typedef unsigned short T_ADDR; /* TYPE FOR TARGET ADDRESS */
+typedef unsigned short T_DATA; /* TYPE FOR TARGET DATA WORD */
+typedef unsigned short T_SIZE; /* TYPE FOR CINIT SIZE FIELD */
+typedef unsigned short T_IADDR; /* TYPE FOR CINIT ADDRESS FIELD */
+typedef unsigned short T_INSTRUCT; /* TYPE FOR INSTRUCTION OPCODE */
+
+#define MAGIC MAGIC_380 /* Magic number for TMS380 */
+
+#define LOCTOBYTE(x) x /* 16-bit byte addrs to byte addrs */
+#define BYTETOLOC(x) x /* byte addrs to byte addrs */
+#define BIT_OFFSET(a) (0) /* BIT OFFSET OF ADDR WITHIN BYTE */
+
+#ifdef OTIS
+#define LOADBUFSIZE (TRG_MAX_MBLK/8) /* USE OTIS BUFFER SIZE */
+#else
+#define LOADBUFSIZE 0x4000 /* 16K BUFFER FOR LOADING DATA */
+#endif
+
+#define LOADWORDSIZE 2 /* MINIMUM DIVISOR OF LOAD SIZE */
+#define CINIT ".cinit" /* NAME OF CINIT SECTION */
+#define INIT_ALIGN 2 /* ALIGNMENT OF CINIT RECORDS */
+#define INIT_WSIZE 1 /* SIZE IN BYTES OF INIT DATA ITEMS */
+#endif
+
+#if TMS370 || TMS370C8
+typedef unsigned short T_ADDR; /* TYPE FOR TARGET ADDRESS */
+typedef unsigned char T_DATA; /* TYPE FOR TARGET DATA WORD */
+typedef unsigned short T_SIZE; /* TYPE FOR CINIT SIZE FIELD */
+typedef unsigned short T_IADDR; /* TYPE FOR CINIT ADDRESS FIELD */
+typedef unsigned char T_INSTRUCT; /* TYPE FOR INSTRUCTION OPCODE */
+
+#define MAGIC MAGIC_370 /* 370 Magic Number */
+
+#define LOCTOBYTE(x) x /* 370 addresses are same as bytes */
+#define BYTETOLOC(x) x
+#define BIT_OFFSET(a) (0) /* BIT OFFSET OF ADDR WITHIN BYTE */
+
+#ifdef OTIS
+#define LOADBUFSIZE (TRG_MAX_MBLK/8) /* USE OTIS BUFFER SIZE */
+#else
+#define LOADBUFSIZE 0x4000 /* 16K BUFFER FOR LOADING DATA */
+#endif
+
+#define LOADWORDSIZE 2 /* MINIMUM DIVISOR OF LOAD SIZE */
+#define CINIT ".cinit" /* NAME OF CINIT SECTION */
+#define INIT_ALIGN 1 /* ALIGNMENT OF CINIT RECORDS */
+#define INIT_WSIZE 1 /* SIZE IN BYTES OF INIT DATA ITEMS */
+#endif
+
+#if MVP_PP
+typedef unsigned long T_ADDR; /* TYPE FOR TARGET ADDRESS */
+typedef unsigned long T_DATA; /* TYPE FOR TARGET DATA WORD */
+typedef unsigned long T_SIZE; /* TYPE FOR CINIT SIZE FIELD */
+typedef unsigned long T_IADDR; /* TYPE FOR CINIT ADDRESS FIELD */
+
+typedef struct {unsigned long ins_h; unsigned long ins_l; } T_INSTRUCT;
+ /* TYPE FOR INSTRUCTION OPCODE */
+
+#define MAGIC MAGIC_MVP /* PP Magic Number */
+
+#define LOCTOBYTE(x) (x) /* PP addresses are same as bytes */
+#define BYTETOLOC(x) (x)
+#define BIT_OFFSET(a) (0) /* BIT OFFSET OF ADDR WITHIN BYTE */
+
+#ifdef OTIS
+#define LOADBUFSIZE (TRG_MAX_MBLK/8) /* USE OTIS BUFFER SIZE */
+#else
+#define LOADBUFSIZE 0x4000 /* 16K BUFFER FOR LOADING DATA */
+#endif
+
+#define LOADWORDSIZE 8 /* MINIMUM DIVISOR OF LOAD SIZE */
+#define CINIT ".cinit" /* NAME OF CINIT SECTION */
+#define INIT_ALIGN 8 /* ALIGNMENT OF CINIT RECORDS */
+#define INIT_WSIZE 4 /* SIZE IN BYTES OF INIT DATA ITEMS */
+#endif
+
+#if MVP_MP
+typedef unsigned long T_ADDR; /* TYPE FOR TARGET ADDRESS */
+typedef unsigned long T_DATA; /* TYPE FOR TARGET DATA WORD */
+typedef unsigned long T_SIZE; /* TYPE FOR CINIT SIZE FIELD */
+typedef unsigned long T_IADDR; /* TYPE FOR CINIT ADDRESS FIELD */
+typedef unsigned long T_INSTRUCT; /* TYPE FOR INSTRUCTION OPCODE */
+
+#define FT_IEEE_FLT 1
+#define FT_IEEE_DBL 2
+#define FLT_PRECISION 4
+
+typedef struct trg_fval {
+ unsigned long fval1;
+ unsigned long fval2;
+} TRG_FVAL;
+
+#define MAGIC MAGIC_MVP /* MP Magic Number */
+
+#define LOCTOBYTE(x) (x) /* MP addresses are same as bytes */
+#define BYTETOLOC(x) (x)
+#define BIT_OFFSET(a) (0) /* BIT OFFSET OF ADDR WITHIN BYTE */
+
+#ifdef OTIS
+#define LOADBUFSIZE (TRG_MAX_MBLK/8) /* USE OTIS BUFFER SIZE */
+#else
+#define LOADBUFSIZE 0x4000 /* 16K BUFFER FOR LOADING DATA */
+#endif
+
+#define LOADWORDSIZE 8 /* MINIMUM DIVISOR OF LOAD SIZE */
+#define CINIT ".cinit" /* NAME OF CINIT SECTION */
+#define INIT_ALIGN 8 /* ALIGNMENT OF CINIT RECORDS */
+#define INIT_WSIZE 4 /* SIZE IN BYTES OF INIT DATA ITEMS */
+#endif
+
+#if LEAD
+typedef unsigned short T_ADDR; /* TYPE FOR TARGET ADDRESS */
+typedef unsigned short T_DATA; /* TYPE FOR TARGET DATA WORD */
+typedef unsigned short T_SIZE; /* TYPE FOR CINIT SIZE FIELD */
+typedef unsigned short T_IADDR; /* TYPE FOR CINIT ADDRESS FIELD */
+typedef unsigned short T_INSTRUCT; /* TYPE FOR INSTRUCTION OPCODE */
+
+#define MAGIC MAGIC_LEAD /* Magic number for C25 */
+
+#define LOCTOBYTE(x) ((x)<<1) /* 16-bit word addrs to byte addrs */
+#define BYTETOLOC(x) ((x)>>1) /* byte addrs to word addrs */
+#define BIT_OFFSET(a) (0) /* BIT OFFSET OF ADDR WITHIN BYTE */
+
+#ifdef OTIS
+#define LOADBUFSIZE (TRG_MAX_MBLK/8) /* USE OTIS BUFFER SIZE */
+#else
+#define LOADBUFSIZE 0x4000 /* 16K BUFFER FOR LOADING DATA */
+#endif /* ifdef OTIS */
+
+#define LOADWORDSIZE 2 /* MINIMUM DIVISOR OF LOAD SIZE */
+#define CINIT ".cinit" /* NAME OF CINIT SECTION */
+#define INIT_ALIGN 1 /* ALIGNMENT OF CINIT RECORDS */
+#define INIT_WSIZE 2 /* SIZE IN BYTES OF INIT DATA ITEMS */
+
+#endif /* LEAD */
+
+#if ARM
+typedef unsigned long T_ADDR; /* TYPE FOR TARGET ADDRESS */
+typedef unsigned long T_DATA; /* TYPE FOR TARGET DATA WORD */
+typedef unsigned long T_SIZE; /* TYPE FOR CINIT SIZE FIELD */
+typedef unsigned long T_IADDR; /* TYPE FOR CINIT ADDRESS FIELD */
+typedef unsigned long T_INSTRUCT; /* TYPE FOR INSTRUCTION OPCODE */
+
+#define MAGIC MAGIC_ARM /* Magic number for ARM */
+
+#define LOCTOBYTE(x) (x) /* ARM addresses are same as bytes */
+#define BYTETOLOC(x) (x)
+#define BIT_OFFSET(a) (0) /* BIT OFFSET OF ADDR WITHIN BYTE */
+
+#ifdef OTIS
+#define LOADBUFSIZE (TRG_MAX_MBLK/8) /* USE OTIS BUFFER SIZE */
+#else
+#define LOADBUFSIZE 0x4000 /* 16K BUFFER FOR LOADING DATA */
+#endif
+
+#define LOADWORDSIZE 4 /* MINIMUM DIVISOR OF LOAD SIZE */
+#define CINIT ".cinit" /* NAME OF CINIT SECTION */
+#define INIT_ALIGN 4 /* ALIGNMENT OF CINIT RECORDS */
+#define INIT_WSIZE 4 /* SIZE IN BYTES OF INIT DATA ITEMS */
+
+#endif /* ARM */
+
+#if TMS32060
+typedef unsigned long T_ADDR; /* TYPE FOR TARGET ADDRESS */
+typedef unsigned long T_DATA; /* TYPE FOR TARGET DATA WORD */
+typedef unsigned long T_SIZE; /* TYPE FOR CINIT SIZE FIELD */
+typedef unsigned long T_IADDR; /* TYPE FOR CINIT ADDRESS FIELD */
+typedef unsigned long T_INSTRUCT; /* TYPE FOR INSTRUCTION OPCODE */
+
+#define FT_IEEE_FLT 1
+#define FT_IEEE_DBL 2
+#define FLT_PRECISION 4
+
+typedef struct trg_fval {
+ unsigned long fval1;
+ unsigned long fval2;
+} TRG_FVAL;
+
+#define MAGIC MAGIC_C60 /* C60 Magic Number */
+
+#define LOCTOBYTE(x) (x) /* C60 addresses are same as bytes */
+#define BYTETOLOC(x) (x)
+#define BIT_OFFSET(a) (0) /* BIT OFFSET OF ADDR WITHIN BYTE */
+
+#ifdef OTIS
+#define LOADBUFSIZE (TRG_MAX_MBLK/8) /* USE OTIS BUFFER SIZE */
+#else
+#define LOADBUFSIZE 0x4000 /* 16K BUFFER FOR LOADING DATA */
+#endif
+
+#define LOADWORDSIZE 8 /* MINIMUM DIVISOR OF LOAD SIZE */
+#define CINIT ".cinit" /* NAME OF CINIT SECTION */
+#define INIT_ALIGN 8 /* ALIGNMENT OF CINIT RECORDS */
+#define INIT_WSIZE 4 /* SIZE IN BYTES OF INIT DATA ITEMS */
+#endif
+
diff --git a/data/mnet/GP10/Host/cdcUtils/include/proto.h b/data/mnet/GP10/Host/cdcUtils/include/proto.h
new file mode 100644
index 0000000..3be328a
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/include/proto.h
@@ -0,0 +1,13 @@
+/*****************************************************************************/
+/* PROTO.H - Prototypes for loader required functions. */
+/*****************************************************************************/
+
+/*--------------------------------------------------------------------------*/
+/* LOADER REQUIRED FUNCTIONS */
+/*--------------------------------------------------------------------------*/
+extern int mem_write PARMS((unsigned char *, unsigned int, T_ADDR, unsigned char));
+extern int set_reloc_amount PARMS((void));
+extern void lookup_sym PARMS((long indx, SYMENT *sym, AUXENT *aux));
+extern int load_syms PARMS((int need_reloc));
+extern void *myalloc PARMS((unsigned int size));
+extern void *mralloc PARMS((void *p, unsigned int size));
diff --git a/data/mnet/GP10/Host/cdcUtils/include/version.h b/data/mnet/GP10/Host/cdcUtils/include/version.h
new file mode 100644
index 0000000..e8de207
--- /dev/null
+++ b/data/mnet/GP10/Host/cdcUtils/include/version.h
@@ -0,0 +1,27 @@
+/**********************************************************************/
+/* VERSION.H -- HOST DEFINITION FLAGS. */
+/**********************************************************************/
+
+/****************************************************************************/
+/* TARGET SPECIFIC FLAGS */
+/****************************************************************************/
+#define TMS340 0 /* TMS340 */
+#define TMS34020 0 /* TMS340 340XX, 0 for 10 only */
+#define TMS370 0 /* Roadrunner */
+#define TMS370C8 0 /* C8 */
+#define TMS370C8P 0 /* C8+ */
+#define TMS32030 0 /* Brahma */
+#define TMS32025 0 /* Shiva, Himiko */
+#define TMS32050 0 /* Mosaic */
+#define TMS380 0 /* Eagle */
+#define TMS37016 0 /* Prism */
+#define MVP_PP 0 /* MVP PP */
+#define MVP_MP 0 /* MVP MP */
+#define ARM 0 /* ARM */
+#define LEAD 0
+#define TMS32060 1 /* C60 */
+
+#define MSDOS 0 /* FOR MS-DOS 2.0+ ON IBM PC */
+#define VAX_VMS 0 /* FOR VAX VMS 3.5 */
+#define UNIX 1 /* FOR SYSTEM V UNIX */
+#define MPW 0 /* FOR APPLE MACINTOSH OR MAC II */
diff --git a/data/mnet/GP10/Host/cdr/Makefile b/data/mnet/GP10/Host/cdr/Makefile
new file mode 100644
index 0000000..abb1c38
--- /dev/null
+++ b/data/mnet/GP10/Host/cdr/Makefile
@@ -0,0 +1,18 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+CC_INCLUDE += -Icdr\include
+
+copyall:
+ $(CP) bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/cdr/cdr.dsp b/data/mnet/GP10/Host/cdr/cdr.dsp
new file mode 100644
index 0000000..6c9b139
--- /dev/null
+++ b/data/mnet/GP10/Host/cdr/cdr.dsp
@@ -0,0 +1,280 @@
+# Microsoft Developer Studio Project File - Name="cdr" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=cdr - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "cdr.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "cdr.mak" CFG="cdr - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "cdr - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "cdr - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName "cdr"
+# PROP Scc_LocalPath "."
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "cdr - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /X /I "D:\vxworks\VxVmi860\vxVmi\target\h" /I "D:\vxworks\VxVmi860\vxVmi\target\config\all" /I "D:\vxworks\VxVmi860\vxVmi\target\src\config" /I "D:\vxworks\VxVmi860\vxVmi\target\src\drv" /I "\ViperCell" /I "\ViperCell\Cdr\include" /I "\vipercell\cc\include" /I "jcc\include" /I "\Vipercell\oam\include" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D CPU=PPC860 /D "VXWORKS" /D "H323_Exist" /D "__VXWORKS__" /D "VIPER_IP" /D "FAST_RTP_READ" /D "VX_IGNORE_GNU_LIBS" /D "__PROTOTYPE_5_0" /FR /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ELSEIF "$(CFG)" == "cdr - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /Za /W3 /GX /ZI /Od /X /I "D:\vxworks\VxVmi860\vxVmi\target\h" /I "D:\vxworks\VxVmi860\vxVmi\target\config\all" /I "D:\vxworks\VxVmi860\vxVmi\target\src\config" /I "D:\vxworks\VxVmi860\vxVmi\target\src\drv" /I "\ViperCell" /I "\ViperCell\Cdr\include" /I "\vipercell\cc\include" /I "jcc\include" /I "\Vipercell\oam\include" /D CPU=PPC860 /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "VXWORKS" /D "H323_Exist" /D "__VXWORKS__" /D "VIPER_IP" /D "FAST_RTP_READ" /D "VX_IGNORE_GNU_LIBS" /D "__PROTOTYPE_5_0" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ENDIF
+
+# Begin Target
+
+# Name "cdr - Win32 Release"
+# Name "cdr - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\Alarm\AlarmTool\AlarmCode.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\cdr\src_client\CdrApi.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\cdr\src_client\CdrBase.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CdrInit.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\cdr\src_client\CdrMain.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\cdr\src_client\CdrModule.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\cdr\src\CdrRef.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\cdr\src_client\CdrRefSem.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\cdr\src_client\CdrRemClientSocket.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\cdr\src_client\CdrSystem.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\socket\src_dbg\debug.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\Common_To_Host\include\AlarmCode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\cdr\include\CdrBase.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\cdr\include\CdrCommon.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\include\CdrDbg.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\cdrdefs.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\cdr\include\CdrInterface.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\cdr\include\CdrModule.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\cdr\include\CdrRef.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\cdr\include\CdrRefSem.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\cdr\include\CdrRemClientSocket.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\cdr\include\CdrShellIntf.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\include\cdr\CdrSSA.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\cdr\CdrVoiceCall.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\include\dbgfunc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\include\defs.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\include\mibtags.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\include\MnetModuleId.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\cdr\include\msgProc.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\include\StdAfx.h
+# End Source File
+# End Group
+# Begin Group "Source API files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\Common\cdr\src_client\CdrSSA.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\CdrVoiceCall.cpp
+# End Source File
+# End Group
+# Begin Group "Source Init Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# End Group
+# Begin Group "Socket Files"
+
+# PROP Default_Filter ""
+# Begin Group "Stub"
+
+# PROP Default_Filter ""
+# End Group
+# Begin Source File
+
+SOURCE=..\..\..\Common\socket\include\CallBackSSL.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\socket\src\GenClientSocket.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\include\socket\GenClientSocket.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\socket\src\GenSocket.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\include\socket\GenSocket.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\socket\src\GenSocketSSL.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\include\socket\GenSocketSSL.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\socket\src_ssl\GenSocketSSL_lib.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\include\socdefs.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\socket\src_ssl\ssl_intf.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\include\socket\SslIntf.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/data/mnet/GP10/Host/cdr/include/StdAfx.h b/data/mnet/GP10/Host/cdr/include/StdAfx.h
new file mode 100644
index 0000000..5987001
--- /dev/null
+++ b/data/mnet/GP10/Host/cdr/include/StdAfx.h
@@ -0,0 +1,42 @@
+#ifndef __STDAFX_H__
+#define __STDAFX_H__
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : stdafx.h
+// Author(s) : Igal Gutkin
+// Create Date : 11/08/00
+// Description : include file for standard system include files,
+// or project specific include files that are used
+// frequently, but are changed infrequently
+// *******************************************************************
+
+#include <vxworks.h>
+#include <stdio.h>
+#include <ctype.h>
+
+#include <string.h>
+#include <time.h>
+
+#include <sockLib.h>
+#include <hostLib.h>
+#include <ioLib.h>
+
+#include "MnetModuleId.h"
+
+#include "defs.h"
+#include "cdrdefs.h"
+
+
+#include "CdrDbg.h"
+
+
+#endif //__STDAFX_H__ \ No newline at end of file
diff --git a/data/mnet/GP10/Host/cdr/include/cdrdefs.h b/data/mnet/GP10/Host/cdr/include/cdrdefs.h
new file mode 100644
index 0000000..6707b34
--- /dev/null
+++ b/data/mnet/GP10/Host/cdr/include/cdrdefs.h
@@ -0,0 +1,49 @@
+#ifndef __CDRDEFS_H__
+#define __CDRDEFS_H__
+
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// File : CdrDefs.h
+// Author(s) : Igal Gutkin
+// Create Date : 8/22/00
+// Description : Application (GP10) dependant settings
+//
+// *******************************************************************
+
+#include "GP10OsTune.h"
+
+// CDR Module ID specific for GP10 application
+#define CDR_MODULE_ID MODULE_CDR
+
+// CDR Client alarms
+#define CDR_CLIENT_ALARM_ERRCODE MIB_errorCode_CDR
+
+// GP10 uses a local version of the logger
+#include "logging/VCLOGGING.h"
+
+
+// Debug interface definitions
+
+// Use stdiout as a debug output
+//#define __STDIOUT
+
+#ifdef __STDIOUT
+ #define _AM_TRACE_
+ #define _AM_DEBUG_
+ #define _AM_WARNING_
+#endif // __STDIOUT
+
+
+// specific value for GP10
+#define LAYER_ID CDR_LAYER
+
+
+#endif //__CDRDEFS_H__ \ No newline at end of file
diff --git a/data/mnet/GP10/Host/cdr/src/CdrInit.cpp b/data/mnet/GP10/Host/cdr/src/CdrInit.cpp
new file mode 100644
index 0000000..3070b87
--- /dev/null
+++ b/data/mnet/GP10/Host/cdr/src/CdrInit.cpp
@@ -0,0 +1,81 @@
+// *******************************************************************
+//
+// (c) Copyright CISCO Systems, 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : CdrInit.cpp
+// Author(s) : Igal Gutkin
+// Create Date : 10/02/00
+// Description : CDR client module class target-dependant methods
+// GP10 application.
+//
+// *******************************************************************
+
+#include "StdAfx.h"
+
+#include "CdrModule.h"
+
+#include "mibtags.h"
+#include "oam_api.h"
+
+
+// CDR server is co-located with GMC.
+// Retrive GMC IP address from the MIB on GP10.
+// Always use GMC IP as an address for the primary CDR server.
+bool CdrModule::loadData ()
+{
+ bool retVal = true;
+ ubyte4 tempIpAddr = 0 ,
+ tempStatus = 0 ;
+
+ AM_FUNC ("CdrModule::loadData", CDR_LAYER);
+ AM_ENTER();
+
+ // load parameters
+ // load CDR server info (IP, username, password) from the MIB
+
+ if (oam_getMibIntVar (MIB_h323_GKIPAddress, (sbyte4 *)&tempIpAddr) == STATUS_OK)
+ {
+ // For debug purpose ONLY, redirect CDR Server address here
+ // tempIpAddr = inet_addr ("...");
+
+ if (retVal = (tempIpAddr != 0))
+ {
+ srvrIp_ = tempIpAddr;
+
+ AM_TRACE (("CDR Server IP address is set to %s (%#08lx)\n",
+ GenSocket::getIp(srvrIp_), tempIpAddr ));
+ }
+ }
+ else
+ {
+ retVal = false;
+ AM_ERROR (("CDR Client: Unable to retrieve serving CDR Server (GMC) IP address from the MIB.\n"));
+ }
+
+ if (oam_getMibIntVar (MIB_cdrClientSSLEnable, (sbyte4 *)&tempStatus) == STATUS_OK)
+ {
+ bUseMibSSL_ = (tempStatus != 0) ? true : false;
+ }
+ else
+ {
+ retVal = false;
+ AM_ERROR (("CDR Client: Unable to retrieve SSL status from the MIB.\n"));
+ }
+
+ // Read password from the password file
+ readPwd ();
+
+ // retrive CDR MIB error code
+ if (oam_getMibIntVar (MIB_errorCode_CDR, (sbyte4 *)&tempStatus) == STATUS_OK)
+ majorAlarmCode_ = (AlarmCode_t)tempStatus;
+
+ AM_RETURN (retVal);
+}
+
diff --git a/data/mnet/GP10/Host/cdr/src/CdrVoiceCall.cpp b/data/mnet/GP10/Host/cdr/src/CdrVoiceCall.cpp
new file mode 100644
index 0000000..fc978a9
--- /dev/null
+++ b/data/mnet/GP10/Host/cdr/src/CdrVoiceCall.cpp
@@ -0,0 +1,328 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+// CdrVoiceCall.cpp: implementation of the CCdrVoiceCall class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#ifdef VXWORKS
+
+#include "stdafx.h"
+
+#include "Cdr\CdrVoiceCall.h"
+
+
+CCdrVoiceCall::CCdrVoiceCall()
+ : CCdrBase (),
+ isInit (true)
+{
+ initialize ();
+}
+
+
+void CCdrVoiceCall::initialize()
+{
+ // skip it for the very first time when is called by the constructor
+ if (!isInit)
+ CCdrBase::initialize ();
+ else
+ isInit = false;
+
+ call_duration = 0;
+ cc_cause = (T_CNI_RIL3_CAUSE_VALUE)0;
+ cdr_cause = CDR_REC_NORM_RELEASE ;
+ emergency_call = false;
+ q931_crv = 0;
+ radioChannelUsedStatus = CDR_FIELD_NOT_SET;
+ radio_channel_used_bearer_type = 0;
+ radio_channel_used_codec = 0;
+ seq_number = 0;
+ transaction_id = 0;
+
+ initLaChange ();
+ answer_time.initialize ();
+ begin_time.initialize ();
+ called_party_number.initialize ();
+ calling_party_number.initialize();
+ end_time.initialize ();
+ la_cell_id.initialize ();
+
+ served_imei.initialize ();
+
+ release_time.initialize();
+ seisure_time.initialize();
+ served_imei.initialize ();
+}
+
+void CCdrVoiceCall::initLaChange ()
+{
+ loc_change_count = 0;
+
+ for (int index=0; index<5; index++)
+ {
+ loc_change_la_cid[index].initialize ();
+ loc_change_time [index].initialize ();
+ }
+}
+
+void CCdrVoiceCall::setServedIMEI (T_CNI_RIL3_IE_MOBILE_ID *p_imei)
+ { served_imei.set(p_imei); }
+
+void CCdrVoiceCall::setCallingPartyNumber (T_SUBSC_IE_ISDN * p_CgPN)
+ {calling_party_number.set(p_CgPN); }
+
+void CCdrVoiceCall::setCalledPartyNumber (T_SUBSC_IE_ISDN * p_CdPN)
+ {called_party_number.set(p_CdPN); }
+
+void CCdrVoiceCall::setCallingPartyNumber (T_CNI_RIL3_IE_CALLING_PARTY_BCD_NUMBER *pNum)
+ { calling_party_number.set (pNum); }
+
+void CCdrVoiceCall::setCalledPartyNumber (T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER *pNum)
+ { called_party_number.set (pNum); }
+
+void CCdrVoiceCall::setLocationAreaCID (T_CNI_RIL3_IE_LOCATION_AREA_ID *pLaId,
+ T_CNI_RIL3_IE_CELL_ID *pCellId)
+ { la_cell_id.set (pLaId, pCellId); }
+
+
+void CCdrVoiceCall::seisure (int newTI)
+{
+ seisure_time.stamp ();
+ begin_time.stamp ();
+
+ transaction_id = newTI;
+ seq_number = 1 ;
+}
+
+void CCdrVoiceCall::seisure_NormalOrigination (int trans_id)
+{
+ // seisure time will not trigger sending of record
+ seisure (trans_id);
+
+ emergency_call = false;
+ setRecordType (CDR_RECORD_TYPE_MOC);
+}
+
+void CCdrVoiceCall::seisure_EmergencyOrigination (int trans_id)
+{
+ // seisure time will not trigger sending of record
+ seisure (trans_id);
+
+ emergency_call = true;
+ setRecordType (CDR_RECORD_TYPE_MOC);
+}
+
+void CCdrVoiceCall::seisure_NormalTermination (int trans_id)
+{
+ // seisure time will not trigger sending of record
+ seisure (trans_id);
+
+ emergency_call = false;
+ setRecordType (CDR_RECORD_TYPE_MTC);
+}
+
+
+void CCdrVoiceCall::answer(unsigned char bear_type, unsigned char codec)
+{
+ // answer time will not trigger sending of record
+ answer_time.stamp();
+
+ radioChannelUsedStatus = CDR_FIELD_SET_BUT_NOT_PRINT;
+ radio_channel_used_bearer_type = bear_type ;
+ radio_channel_used_codec = codec ;
+}
+
+
+void CCdrVoiceCall::generateCallRecord (bool partial)
+{
+ T_CDR_RECORD_TYPE recType = getRecordType();
+
+ // prepare all the data fields
+ end_time.stamp();
+
+ // Calculate the call duration according GSM 12.05
+ // 1. Incomplete calls (call attempts): from seizure to call release
+ // 2. Complete (answered) calls: from answer to release
+ // 3. Partial record: non-cumulitive duration of the individual partial record
+ // 4. Should not be 0
+
+ if (partial)
+ cdr_cause = CDR_REC_PARTIAL;
+
+ switch (cdr_cause)
+ {
+ case CDR_REC_PARTIAL:
+ // Partial record
+ call_duration = end_time.getTime() - begin_time.getTime();
+ break;
+
+ case CDR_REC_NORM_RELEASE:
+ // Complete call
+ if (seq_number > 1)
+ { // Last partial record
+ call_duration = release_time.getTime() - begin_time.getTime();
+ }
+ else
+ { // complete record
+ call_duration = release_time.getTime() - answer_time.getTime();
+ }
+ break;
+
+ default:
+ // Incomplete call attempt
+ call_duration = end_time.getTime() - seisure_time.getTime();
+ }
+
+ if (!call_duration)
+ ++call_duration; // zero duration correction
+
+ // generate common header fields first to the output buffer
+ printBaseFields ();
+
+ // print all the fields of this class to the outbuffer
+ //
+ // O2=Served IMEI
+ // N1=Calling Party Number
+ // N2=Called Party Number
+ // O5=Transaction ID
+ // O7=Location Area and Cell ID
+ // H1=Q931 CRV (for MOC)
+ // H2=Q931 CRV (for MTC)
+ // L1=Location Changes (may be repeated up to 5 times)
+ // T1=Seisure Time
+ // T2=Answer Time
+ // T3=Release Time
+ // E1=Emergency Call (MOC only)
+ // T9=Call Duration
+ // R1=Radio Channel Used - Bearer Type
+ // R2=Radio Channel Used - Codec
+ // C1=CC Cause for termination
+ // C2=CDR Cause for termination
+ // Z1=Sequence Number
+ // Z2=Begin Date and Time
+ // Z3=End Date and Time
+
+ // O2=Served IMEI
+ if (served_imei.status==CDR_FIELD_SET_BUT_NOT_PRINT)
+ count += sprintf(&cdr_msg.record[count],"%cO2=%s",CDR_FIELD_DELIMETER,served_imei.string());
+
+ // N1=Calling Party Number
+ if (recType == CDR_RECORD_TYPE_MTC && calling_party_number.status == CDR_FIELD_SET_BUT_NOT_PRINT)
+ count += sprintf(&cdr_msg.record[count],"%cN1=%s",CDR_FIELD_DELIMETER,calling_party_number.string());
+
+ // N2=Called Party Number
+ if (recType == CDR_RECORD_TYPE_MOC && called_party_number.status == CDR_FIELD_SET_BUT_NOT_PRINT)
+ count += sprintf(&cdr_msg.record[count],"%cN2=%s",CDR_FIELD_DELIMETER,called_party_number.string());
+
+ // O5=Transaction ID
+ count += sprintf(&cdr_msg.record[count],"%cO5=%d",CDR_FIELD_DELIMETER,transaction_id);
+
+ // O7=Location Area and Cell ID
+ count += sprintf(&cdr_msg.record[count],"%cO7=%s",CDR_FIELD_DELIMETER,la_cell_id.string());
+
+ // H1=Q931 CRV (for MOC)
+ // H2=Q931 CRV (for MTC)
+ count += sprintf (&cdr_msg.record[count],"%cH%c=%04X",
+ CDR_FIELD_DELIMETER, (recType == CDR_RECORD_TYPE_MOC) ? '1':'2', q931_crv);
+
+ // L1=Location Changes (may be repeated up to 5 times)
+ for (int index=0; index < loc_change_count; index++)
+ {
+ if (loc_change_la_cid[index].status == CDR_FIELD_SET_BUT_NOT_PRINT)
+ count += sprintf (&cdr_msg.record[count],"%cL1=%s%s", CDR_FIELD_DELIMETER,
+ loc_change_la_cid[index].string() , loc_change_time[index].string());
+ }
+
+ // T1=Seisure Time
+ if (seisure_time.status==CDR_FIELD_SET_BUT_NOT_PRINT)
+ count += sprintf(&cdr_msg.record[count],"%cT1=%s",CDR_FIELD_DELIMETER,seisure_time.string());
+
+ // T2=Answer Time
+ if (answer_time.status==CDR_FIELD_SET_BUT_NOT_PRINT)
+ count += sprintf(&cdr_msg.record[count],"%cT2=%s",CDR_FIELD_DELIMETER,answer_time.string());
+
+ // T3=Release Time
+ if (release_time.status==CDR_FIELD_SET_BUT_NOT_PRINT)
+ count += sprintf(&cdr_msg.record[count],"%cT3=%s",CDR_FIELD_DELIMETER,release_time.string());
+
+ if (recType == CDR_RECORD_TYPE_MOC)
+ { // E1=Emergency Call (MOC only)
+ count += sprintf(&cdr_msg.record[count],"%cE1=%d",CDR_FIELD_DELIMETER,emergency_call?1:0);
+ }
+
+ // T9=Call Duration
+ count += sprintf(&cdr_msg.record[count],"%cT9=%d",CDR_FIELD_DELIMETER,call_duration);
+
+ // R1=Radio Channel Used - Bearer Type
+ // R2=Radio Channel Used - Codec
+ if (radioChannelUsedStatus == CDR_FIELD_SET_BUT_NOT_PRINT)
+ { // these two fields are set and print along with answer time field
+ count += sprintf(&cdr_msg.record[count],"%cR1=%1d" ,CDR_FIELD_DELIMETER,radio_channel_used_bearer_type);
+ count += sprintf(&cdr_msg.record[count],"%cR2=%02X",CDR_FIELD_DELIMETER,radio_channel_used_codec);
+ radioChannelUsedStatus = CDR_FIELD_SET_AND_PRINTED;
+ }
+
+ // C1=CC Cause for termination
+ if (release_time.status != CDR_FIELD_NOT_SET)
+ {
+ // this field is set and print along with release time field
+ count+=sprintf(&cdr_msg.record[count],"%cC1=%d",CDR_FIELD_DELIMETER,cc_cause);
+ }
+
+ // C2=CDR Cause for termination
+ count += sprintf(&cdr_msg.record[count],"%cC2=%d",CDR_FIELD_DELIMETER,cdr_cause);
+
+ // Z1=Sequence Number
+ count += sprintf(&cdr_msg.record[count],"%cZ1=%d",CDR_FIELD_DELIMETER, seq_number++);
+
+ // Z2=Begin Date and Time
+ count += sprintf(&cdr_msg.record[count],"%cZ2=%s",CDR_FIELD_DELIMETER,begin_time.string());
+
+ // Z3=End Date and Time
+ count += sprintf(&cdr_msg.record[count],"%cZ3=%s",CDR_FIELD_DELIMETER,end_time.string());
+
+ // send the record off to the CDR Client
+ CCdrBase::generateRecord();
+
+ if (cdr_cause == CDR_REC_PARTIAL)
+ {
+ // reset Location Change history
+ initLaChange ();
+
+ // reset begin time for the next record
+ begin_time.stamp ();
+ }
+}
+
+void CCdrVoiceCall::release (T_CNI_RIL3_CAUSE_VALUE cc_cause_value, CdrRecCauseTerm_t cdr_cause_value)
+{
+ // release time will always trigger sending of the complete record
+ release_time.stamp();
+
+ cdr_cause = cdr_cause_value;
+ cc_cause = cc_cause_value ;
+
+ // print all the data fields
+ generateCallRecord (false);
+}
+
+
+void CCdrVoiceCall::handover (T_CNI_RIL3_IE_LOCATION_AREA_ID *pLaId ,
+ T_CNI_RIL3_IE_CELL_ID *pCellId)
+{
+ if (loc_change_count >= 5)
+ {
+ generateCallRecord (true);
+ initLaChange () ;
+ }
+
+ loc_change_time [loc_change_count].stamp() ;
+ loc_change_la_cid[loc_change_count].set(pLaId, pCellId);
+ loc_change_count++;
+}
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/cdr/src/Makefile b/data/mnet/GP10/Host/cdr/src/Makefile
new file mode 100644
index 0000000..89bc73e
--- /dev/null
+++ b/data/mnet/GP10/Host/cdr/src/Makefile
@@ -0,0 +1,53 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = cdr
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\cdr.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR = $(THIS_APP_DIR)
+
+REPLACE_LIST="src src_client"
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY) REPLACE=$(REPLACE_LIST)
+endif
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/cli/Makefile b/data/mnet/GP10/Host/cli/Makefile
new file mode 100644
index 0000000..38c754b
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/Makefile
@@ -0,0 +1,16 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ $(CP) bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/cli/include/cfg_adjcell.h b/data/mnet/GP10/Host/cli/include/cfg_adjcell.h
new file mode 100644
index 0000000..63c707b
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/cfg_adjcell.h
@@ -0,0 +1,197 @@
+
+#define CELL_SELECTED 1
+#define CELL_SYNCHRONISED 2
+
+#define BSIC_NCC 0
+#define BSIC_BCC 1
+
+
+/*
+ * enum to identify adjacent cell commands
+ */
+
+enum {
+ ADJ_CELL_RES_BCCH,
+ ADJ_CELL_RES,
+ ADJ_CELL_CC_VALUE,
+ ADJ_CELL_GI_VALUE,
+ ADJ_CELL_BCCH,
+ ADJ_CELL_SELECTION
+};
+
+/*
+ * codes to identify a cell
+ */
+enum {
+ GI_MCC,
+ GI_MNC,
+ GI_LAC,
+ GI_CI
+};
+
+/*
+ * bsic options
+ */
+static keyword_options bsic_options[] = {
+ { "ncc", "Network color code for PLMN",BSIC_NCC},
+ { "bcc", "Base station color code",BSIC_BCC},
+ {NULL,NULL,0}
+};
+
+/*
+ * selection options
+ */
+static keyword_options selection_options[] = {
+ { "selected", "Adjacent cell is active", CELL_SELECTED},
+ { "synchronised", "Origin cell is synchronised with the adjacent cell",CELL_SYNCHRONISED},
+ {NULL,NULL,0}
+};
+
+/*
+ * global identity options
+ */
+static keyword_options gi_options[] = {
+ /* { "mcc", "Mobile country code",GI_MCC},
+ { "mnc", "Mobile network code",GI_MNC},*/
+ { "lac", "Location area code", GI_LAC},
+ { "ci", "Cell identifier", GI_CI},
+ {NULL,NULL,0}
+};
+
+/*
+ * reselection bcch-frequency <0-1023>
+ */
+
+
+EOLS (bcch_freq_val_eol,adj_cell_parameters,ADJ_CELL_RES_BCCH);
+
+NUMBER (bcch_freq_value,bcch_freq_val_eol,no_alt,OBJ(int,1),0,1023,
+ "Frequncy value");
+NVGENS (bcch_freq_value_nv,bcch_freq_value,adj_cell_parameters,ADJ_CELL_RES_BCCH);
+
+NOPREFIX (bcch_freq_value_no,bcch_freq_value_nv,bcch_freq_val_eol);
+
+KEYWORD (res_bcch_freq,bcch_freq_value_no,no_alt,"bcch-frequency",
+ "The ARFCN of the BCCH for the adjacent cell",PRIV_CONF);
+
+
+/*
+ * reselection selected
+ */
+
+EOLS (res_index_eol,adj_cell_parameters,ADJ_CELL_RES);
+
+KEYWORD (res_index_sel,res_index_eol,res_bcch_freq,"selected",
+ "Select the adjacent cell to identify an active adjacent cell",PRIV_CONF);
+
+KEYWORD (cfg_reselection,res_index_sel,no_alt,"reselection",
+ "Parameters to identify the adjacent cells used for cell reselection",PRIV_CONF);
+
+/*
+ * handover bsic {NCC | BCC} <0-7>
+ */
+
+EOLS (cc_eol,adj_cell_parameters,ADJ_CELL_CC_VALUE);
+
+NUMBER (cc_value,cc_eol,no_alt,OBJ(int,2),0,7,
+ "Value of color code");
+
+NOPREFIX (cc_value_no,cc_value,cc_eol);
+
+KEYWORD_OPTIONS (cfg_cc,cc_value_no,no_alt,bsic_options,
+ OBJ(int,1),PRIV_CONF,0);
+
+NVGENS (cc_value_nv,cfg_cc,adj_cell_parameters,ADJ_CELL_CC_VALUE);
+
+KEYWORD (cell_bsic,cc_value_nv,no_alt,"bsic",
+ "Configure base station identity code elements",PRIV_CONF);
+
+
+/*
+ * handover cell-global-identity {mcc | mnc | lac | ci}<0-65535>
+ */
+
+EOLS (gi_cc_eol,adj_cell_parameters,ADJ_CELL_GI_VALUE);
+
+NUMBER (gi_cc_value,gi_cc_eol,no_alt,OBJ(int,2),0,65535,
+ "Value of code");
+
+NVGENS(gi_cc_value_nv,gi_cc_value,adj_cell_parameters,ADJ_CELL_GI_VALUE);
+
+NOPREFIX(cfg_gi_cc_no,gi_cc_value_nv,gi_cc_eol);
+
+ /****mnc*****/
+NUMBER(cfg_mnc_value,gi_cc_eol,no_alt,OBJ(int,2),1,99,"Mobile network code");
+NVGENS(cfg_mnc_value_nv,cfg_mnc_value,adj_cell_parameters,ADJ_CELL_GI_VALUE);
+NOPREFIX(cfg_mnc_no,cfg_mnc_value_nv,gi_cc_eol);
+KEYWORD(cell_gi_mnc,cfg_mnc_no,no_alt,
+ "mnc","Mobile network code",PRIV_CONF);
+ /***mcc***/
+NUMBER(cfg_mcc_value,gi_cc_eol,no_alt,OBJ(int,2),1,999,"Mobile country code");
+NVGENS(cfg_mcc_value_nv,cfg_mcc_value,adj_cell_parameters,ADJ_CELL_GI_VALUE);
+NOPREFIX(cfg_mcc_no,cfg_mcc_value_nv,gi_cc_eol);
+KEYWORD(cell_gi_mcc,cfg_mcc_no,cell_gi_mnc,
+ "mcc","Mobile country code",PRIV_CONF);
+ /*************/
+
+KEYWORD_OPTIONS (cfg_gi_cc,cfg_gi_cc_no,cell_gi_mcc,gi_options,
+ OBJ(int,1),PRIV_CONF,0);
+
+KEYWORD (cell_gi,cfg_gi_cc,cell_bsic,"cell-global-identity",
+ "Configure parameters to identify GP10s adjacent cell",PRIV_CONF);
+
+/*
+ * handover bcch-frequency <0-1023> handover-margin <0-24>
+ * max-tx-power <0-33> min-rx-level <0-63>
+ */
+
+
+EOLS (bcch_freq_eol,adj_cell_parameters,ADJ_CELL_BCCH);
+
+NUMBER (rx_level_value,bcch_freq_eol,no_alt,OBJ(int,4),0,63,
+ "Minimum signal level");
+
+KEYWORD (rx_level,rx_level_value,no_alt,"min-rx-level",
+ "Min received signal level from adjacent cell to consider handover for MS",PRIV_CONF);
+
+
+NUMBER (tx_power_value,rx_level,no_alt,OBJ(int,3),0,33,
+ "For PCS 1800 radio max is 30 and for PCS 1900 radio max is 33");
+
+KEYWORD (tx_power,tx_power_value,no_alt,"max-tx-power",
+ "Max transmit power a MS may use in adjacent cell",PRIV_CONF);
+
+NUMBER (margin_value,tx_power,no_alt,OBJ(int,2),0,24,
+ "Enter the handover margin value");
+
+KEYWORD (margin,margin_value,no_alt,"handover-margin",
+ "Threshold value used to prevent repetitive handovers between adjacent cells",PRIV_CONF);
+
+
+NUMBER (freq_value,margin,no_alt,OBJ(int,1),0,1023,
+ "Enter the Absolute Radio Frequency Channel Number value");
+
+NVGENS(freq_value_nv,freq_value,adj_cell_parameters,ADJ_CELL_BCCH);
+
+KEYWORD (bcch_freq,freq_value_nv,cell_gi,"bcch-frequency",
+ "The ARFCN of the BCCH for the adjacent cell",PRIV_CONF);
+
+
+/*
+ * handover {selected | synchronised}
+ */
+
+
+EOLS (index_eol,adj_cell_parameters,ADJ_CELL_SELECTION);
+
+
+KEYWORD_OPTIONS(index_sel,index_eol,bcch_freq,selection_options,OBJ(int,1),
+ PRIV_CONF,0);
+NVGENS (index_sel_nv,index_sel,adj_cell_parameters,ADJ_CELL_SELECTION);
+
+KEYWORD(cfg_handover,index_sel_nv,cfg_reselection,"handover",
+ "Configure parameters to identify cells around the cell created by GP10",PRIV_CONF);
+
+
+#undef ALTERNATE
+#define ALTERNATE cfg_handover
diff --git a/data/mnet/GP10/Host/cli/include/cfg_adjcell_exit.h b/data/mnet/GP10/Host/cli/include/cfg_adjcell_exit.h
new file mode 100644
index 0000000..3326347
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/cfg_adjcell_exit.h
@@ -0,0 +1,12 @@
+
+EOLS (gp10_adjcell_end_eol,exit_config_command,CMD_END);
+
+KEYWORD (gp10_adjcell_end,gp10_adjcell_end_eol,no_alt,"end",
+ "Exit gp10 config-adjcell mode to exec mode",PRIV_CONF);
+
+EOLNS (gp10_adjcell_exit_eol,gp10_sub_config_exit);
+KEYWORD (gp10_adjcell_exit, gp10_adjcell_exit_eol,gp10_adjcell_end, "exit",
+ "Exit gp10 config-adjcell mode", PRIV_CONF);
+
+#undef ALTERNATE
+#define ALTERNATE gp10_adjcell_exit
diff --git a/data/mnet/GP10/Host/cli/include/cfg_bts_basic.h b/data/mnet/GP10/Host/cli/include/cfg_bts_basic.h
new file mode 100644
index 0000000..fe9cb1f
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/cfg_bts_basic.h
@@ -0,0 +1,225 @@
+
+#define BSIC_NCC 0
+#define BSIC_BCC 1
+
+/*
+ * enums for command identification
+ */
+
+enum {
+ BTS_RECV_LEVEL,
+ BTS_LINK_TIMEOUT,
+ BTS_PER_NCC_ALL,
+ BTS_PER_NCC,
+ BTS_PHY_VALUE,
+ BTS_RES_VALUE,
+ BTS_GI_VALUE,
+ BTS_CC_VALUE,
+ BTS_ADMIN_STATE
+};
+
+
+/*
+ * enums for options
+ */
+
+enum {
+ STATE_LOCKED,
+ STATE_UNLOCKED,
+ STATE_SHUTDOWN
+};
+
+enum {
+ GI_MCC,
+ GI_MNC,
+ GI_LAC,
+ GI_CI
+};
+
+/*
+ * administrative state options
+ */
+
+static keyword_options admin_state_options[] = {
+ { "locked", "Cannot be accessed by mobile stations", STATE_LOCKED},
+ { "unlocked", "Can be accessed by mobile stations",STATE_UNLOCKED},
+ { "shutting-down","GP10 is in the process of becoming locked",STATE_SHUTDOWN},
+ {NULL,NULL,0}
+};
+
+/*
+ * bsic options
+ */
+static keyword_options bsic_options[] = {
+ { "ncc", "Network color code for PLMN",BSIC_NCC},
+ { "bcc", "Base station color code",BSIC_BCC},
+ {NULL,NULL,0}
+};
+
+/*
+ * options for global identity
+ */
+
+static keyword_options gi_options[] = {
+ /* { "mcc", "Mobile country code",GI_MCC},
+ { "mnc", "Mobile network code",GI_MNC},*/
+ { "lac", "Location area code", GI_LAC},
+ { "ci", "Cell identifier", GI_CI},
+ {NULL,NULL,0}
+};
+
+
+/*
+ *receive-level-access <0-63>
+ */
+
+EOLS (recv_level_eol,bts_basic_parameters,BTS_RECV_LEVEL);
+
+NUMBER (recv_level,recv_level_eol,no_alt,OBJ(int,1),0,63,
+ "Enter access level value");
+
+NVGENS (recv_level_nv,recv_level,bts_basic_parameters,BTS_RECV_LEVEL);
+
+NOPREFIX (recv_level_no,recv_level_nv,recv_level_eol);
+
+KEYWORD (cfg_recv_level_access,recv_level_no,no_alt,"receive-level-access",
+ "Min receive level at which a MS can access the system",PRIV_CONF);
+
+/*
+ * radio-link-timeout <0-15>
+ */
+
+EOLS (timeout_value_eol,bts_basic_parameters,BTS_LINK_TIMEOUT);
+
+NUMBER (timeout_value,timeout_value_eol,no_alt,OBJ(int,1),0,15,
+ "Enter timeout value");
+
+NVGENS (timeout_value_nv,timeout_value,bts_basic_parameters,BTS_LINK_TIMEOUT);
+
+NOPREFIX (timeout_value_no,timeout_value_nv,timeout_value_eol);
+
+KEYWORD (cfg_link_timeout,timeout_value_no,cfg_recv_level_access,"radio-link-timeout",
+ "Max value of radio link counter need to detect radio link failure",PRIV_CONF);
+
+
+/*
+ * plmn-permitted-ncc {all | 0-7}
+ */
+
+EOLS (ncc_all_eol,bts_basic_parameters,BTS_PER_NCC_ALL);
+
+KEYWORD (ncc_all,ncc_all_eol,no_alt,"all",
+ "Select all the ncc to use",PRIV_CONF);
+
+
+EOLS (ncc_eol,bts_basic_parameters,BTS_PER_NCC);
+
+NUMBER (per_ncc_value,ncc_eol,ncc_all,OBJ(int,1),0,7,
+ "Enter the ncc MS will use");
+
+NVGENS (per_ncc_value_nv,per_ncc_value,bts_basic_parameters,BTS_PER_NCC);
+
+KEYWORD (cfg_per_ncc,per_ncc_value_nv,cfg_link_timeout,"plmn-permitted-ncc",
+ "Network color codes used by the network",PRIV_CONF);
+
+/*
+ * physical-repetition <0-7>
+ */
+
+EOLS (phy_eol,bts_basic_parameters,BTS_PHY_VALUE);
+
+NUMBER (phy_value,phy_eol,no_alt,OBJ(int,1),0,7,
+ "Number of repetitions");
+NVGENS (phy_value_nv,phy_value,bts_basic_parameters,BTS_PHY_VALUE);
+
+NOPREFIX (phy_value_no,phy_value_nv,phy_eol);
+
+KEYWORD (cfg_phy_rep,phy_value_no,cfg_per_ncc,"physical-repetition",
+ "Max number of times GP10 should send the physical information to MSs",PRIV_CONF);
+
+/*
+ * cell-reselect-hysteresis <0-7>
+ */
+
+EOLS (res_eol,bts_basic_parameters,BTS_RES_VALUE);
+
+NUMBER (res_value,res_eol,no_alt,OBJ(int,1),0,7,
+ "Value of radio frequency power level");
+
+NVGENS (res_value_nv,res_value,bts_basic_parameters,BTS_RES_VALUE);
+
+NOPREFIX (res_value_no,res_value_nv,res_eol);
+
+KEYWORD (cfg_cell_res,res_value_no,cfg_phy_rep,"cell-reselect-hysteresis",
+ "Power level hysteresis required for cell reselction",PRIV_CONF);
+
+
+
+/*
+ * cell-global-identity {mcc | mnc | lac | ci} <0-65535>
+ */
+
+EOLS (gi_cc_eol,bts_basic_parameters,BTS_GI_VALUE);
+
+NUMBER (gi_cc_value,gi_cc_eol,no_alt,OBJ(int,2),0,65535,
+ "Value of code");
+
+NOPREFIX (gi_cc_value_no,gi_cc_value,gi_cc_eol);
+
+ /****mnc*****/
+NUMBER(cfg_mnc_value,gi_cc_eol,no_alt,OBJ(int,2),1,99,"Mobile network code");
+NOPREFIX(cfg_mnc_no,cfg_mnc_value,gi_cc_eol);
+KEYWORD(cell_gi_mnc,cfg_mnc_no,no_alt,
+ "mnc","Mobile network code",PRIV_CONF);
+ /***mcc***/
+NUMBER(cfg_mcc_value,gi_cc_eol,no_alt,OBJ(int,2),1,999,"Mobile country code");
+NOPREFIX(cfg_mcc_no,cfg_mcc_value,gi_cc_eol);
+KEYWORD(cell_gi_mcc,cfg_mcc_no,cell_gi_mnc,
+ "mcc","Mobile country code",PRIV_CONF);
+ /********/
+KEYWORD_OPTIONS (cfg_gi_cc,gi_cc_value_no,cell_gi_mcc,gi_options,
+ OBJ(int,1),PRIV_CONF,0);
+
+NVGENS (gi_cc_value_nv,cfg_gi_cc,bts_basic_parameters,BTS_GI_VALUE);
+
+KEYWORD (cfg_gi,gi_cc_value_nv,cfg_cell_res,"cell-global-identity",
+ "Configure parameters to identify GP10s cell",PRIV_CONF);
+
+
+/*
+ * bsic {ncc | bcc} <value>
+ */
+
+EOLS (cc_eol,bts_basic_parameters,BTS_CC_VALUE);
+
+NUMBER (cc_value,cc_eol,no_alt,OBJ(int,2),0,7,
+ "Value of color code");
+
+NOPREFIX (cc_value_no,cc_value,cc_eol);
+
+KEYWORD_OPTIONS (cfg_cc,cc_value_no,no_alt,bsic_options,
+ OBJ(int,1),PRIV_CONF,0);
+
+NVGENS (cc_value_nv,cfg_cc,bts_basic_parameters,BTS_CC_VALUE);
+
+KEYWORD (cfg_bsic,cc_value_nv,cfg_gi,"bsic",
+ "Configure base station identity code elements",PRIV_CONF);
+
+
+/*
+ * administrative-state [{locked | unlocked | shutdown}]
+ */
+
+EOLS (admin_state_eol,bts_basic_parameters,BTS_ADMIN_STATE);
+
+KEYWORD_OPTIONS (admin_state,admin_state_eol,no_alt,admin_state_options,
+ OBJ(int,1),PRIV_CONF,0);
+NVGENS (admin_state_nv,admin_state,bts_basic_parameters,BTS_ADMIN_STATE);
+
+NOPREFIX (admin_state_no,admin_state_nv,admin_state_eol);
+
+KEYWORD (cfg_bts_basic,admin_state_no,cfg_bsic,"administrative-state",
+ "State in which to place GP10",PRIV_CONF);
+
+#undef ALTERNATE
+#define ALTERNATE cfg_bts_basic
diff --git a/data/mnet/GP10/Host/cli/include/cfg_bts_exit.h b/data/mnet/GP10/Host/cli/include/cfg_bts_exit.h
new file mode 100644
index 0000000..d502054
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/cfg_bts_exit.h
@@ -0,0 +1,11 @@
+EOLS (gp10_cell_bts_end_eol,exit_config_command,CMD_END);
+
+KEYWORD (gp10_cell_bts_end,gp10_cell_bts_end_eol,no_alt,"end",
+ "Exit gp10 bts-basic mode to exec mode",PRIV_CONF);
+
+EOLNS (gp10_cell_bts_exit_eol,gp10_cell_sub_config_exit);
+KEYWORD (gp10_cell_bts_exit, gp10_cell_bts_exit_eol, gp10_cell_bts_end, "exit",
+ "Exit gp10 bts-basic mode", PRIV_CONF);
+
+#undef ALTERNATE
+#define ALTERNATE gp10_cell_bts_exit
diff --git a/data/mnet/GP10/Host/cli/include/cfg_bts_options.h b/data/mnet/GP10/Host/cli/include/cfg_bts_options.h
new file mode 100644
index 0000000..89b1da2
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/cfg_bts_options.h
@@ -0,0 +1,169 @@
+/*
+ * enums for command identification
+ */
+
+enum {
+ IMSI_ATTACH,
+ CELL_BARRED,
+ DOWNLINK_DTX,
+ IMSI_FOR_EMER,
+ RESTRICTED_EMER_CALL
+};
+
+enum {
+ UPDATE_INTERVAL,
+ ACCESS_CLASS,
+ DTX_MODE_OPTIONS,
+ ENABLE_OPTIONS
+};
+
+
+enum {
+ MAY_USE_DTX,
+ SHALL_USE_DTX,
+ SHALL_NOT_USE_DTX,
+};
+
+
+enum {
+ CFG_CELL_CCCH,
+ CFG_CELL_TRX,
+ CFG_CELL_BTS
+};
+/*
+ *bts enable options
+ */
+
+static keyword_options bts_enable_options[] = {
+ { "imsi-attach", "Enable IMSI attach/detach procedure in the cell",IMSI_ATTACH},
+ { "cell-barred", "Enable barring of MS camping on a cell",CELL_BARRED},
+ {"downlink-dtx","Enable availability of downlink discontinuous transmission",DOWNLINK_DTX},
+ {"imsi-for-emergency","Enable requirement of IMSI for MS to make emergency call",
+ IMSI_FOR_EMER},
+ {"restricted-emergency-call","Enable emergency calls restricted to MS from IMSI"
+ "class 11 to 15",RESTRICTED_EMER_CALL},
+ {NULL,NULL,0}
+};
+
+
+/*
+ * dtx mode options
+ */
+
+static keyword_options dtx_mode_options[] = {
+ { "ms-shall-use-dtx","MS shall use dtx for the uplink",SHALL_USE_DTX},
+ { "ms-may-use-dtx","MS may use dtx for the uplink",MAY_USE_DTX},
+ { "ms-shall-not-use-dtx","MS shall not use dtx for the uplink",SHALL_NOT_USE_DTX},
+ {NULL,NULL,0}
+};
+
+
+
+/*
+ * ccch-config
+ */
+
+EOLS (cfg_ccch_sub_eol,gp10_cell_subconfig_cmds,CFG_CELL_CCCH);
+
+NVGENS (cfg_ccch_sub_nv,cfg_ccch_sub_eol,gp10_cell_subconfig_cmds,CFG_CELL_CCCH);
+
+KEYWORD (cfg_bts_ccch,cfg_ccch_sub_nv,no_alt,"ccch-config",
+ "Configure bts ccch parameters",PRIV_CONF);
+
+/*
+ * bts-basic
+ */
+
+EOLS (cfg_bts_sub_eol,gp10_cell_subconfig_cmds,CFG_CELL_BTS);
+
+NVGENS (cfg_bts_sub_nv,cfg_bts_sub_eol,gp10_cell_subconfig_cmds,CFG_CELL_BTS);
+
+KEYWORD (cfg_bts_sub,cfg_bts_sub_nv,cfg_bts_ccch,"bts-basic",
+ "Configure bts basic parameters",PRIV_CONF);
+
+
+/*
+ * transceiver
+ */
+
+EOLS (cfg_sub_trx_num_eol,gp10_cell_subconfig_cmds,CFG_CELL_TRX);
+
+NUMBER (cfg_sub_trx_num,cfg_sub_trx_num_eol,no_alt,OBJ(int,1),
+ 0,1,"Enter transceiver number");
+
+NVGENS (cfg_sub_trx_nv,cfg_sub_trx_num,gp10_cell_subconfig_cmds,CFG_CELL_TRX);
+
+KEYWORD (cfg_trx_sub,cfg_sub_trx_nv,cfg_bts_sub,"transceiver",
+ "Configure transceiver parameters",PRIV_CONF);
+
+
+/*
+ *bts-options location-update-interval <0-255>
+ */
+
+EOLS (upd_ivl_eol,bts_options,UPDATE_INTERVAL);
+
+NUMBER (upd_ivl_val,upd_ivl_eol,no_alt,OBJ(int,1),0,255,
+ "Enter the interval");
+
+NVGENS (upd_ivl_val_nv,upd_ivl_val,bts_options,UPDATE_INTERVAL);
+
+NOPREFIX (upd_ivl_val_no,upd_ivl_val_nv,upd_ivl_eol);
+
+KEYWORD (loc_upd_ivl,upd_ivl_val_no,no_alt,"location-update-interval",
+ "Interval for periodic location updates from the MS in decihours",PRIV_CONF);
+
+
+
+/*
+ *bts-options ms-access-class-not-allowed <0-15>
+ */
+
+EOLS (access_class_eol,bts_options,ACCESS_CLASS);
+
+NUMBER (access_class_val,access_class_eol,no_alt,OBJ(int,1),0,15,
+ "Enter the access class not allowed");
+
+KEYWORD (bts_access_class,access_class_val,loc_upd_ivl,"ms-access-class-not-allowed",
+ "MS access classes not allowed to connect to the cell",PRIV_CONF);
+
+
+/*
+ * bts-options dtx-mode {ms-shall-use-dtx |
+ * ms-may-use-dtx | ms-shall-not-use-dtx}
+ */
+
+
+EOLS (dtx_mode_eol,bts_options,DTX_MODE_OPTIONS);
+
+KEYWORD_OPTIONS (dtx_mode_opt,dtx_mode_eol,no_alt,dtx_mode_options,OBJ(int,1),
+ PRIV_CONF,0);
+
+NOPREFIX (dtx_mode_opt_no,dtx_mode_opt,dtx_mode_eol);
+
+KEYWORD(dtx_mode,dtx_mode_opt_no,bts_access_class,"dtx-mode",
+ "Downlink discontinuous transmission mode options",PRIV_CONF);
+
+/*
+ * bts-options {imsi-attach | cell-barred | downlink-dtx | imsi-for-emergency |
+ * restricted-emergency-call} enable
+ */
+
+
+EOLS (bts_en_options_eol,bts_options,ENABLE_OPTIONS);
+
+KEYWORD (bts_opt_enable,bts_en_options_eol,no_alt,"enable",
+ "Enable the option",PRIV_CONF);
+
+KEYWORD_OPTIONS(bts_enable_options,bts_opt_enable,dtx_mode,bts_enable_options,OBJ(int,1),
+ PRIV_CONF,0);
+
+/*
+ * bts-options
+ */
+
+KEYWORD (cfg_bts_opt,bts_enable_options,cfg_trx_sub,"bts-options",
+ "Configure bts options",PRIV_CONF);
+
+#undef ALTERNATE
+#define ALTERNATE cfg_bts_opt
diff --git a/data/mnet/GP10/Host/cli/include/cfg_ccch.h b/data/mnet/GP10/Host/cli/include/cfg_ccch.h
new file mode 100644
index 0000000..e5a17ee
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/cfg_ccch.h
@@ -0,0 +1,189 @@
+
+#define ONE_RETR_RACH 1
+#define TWO_RETR_RACH 2
+#define FOUR_RETR_RACH 4
+#define SEVEN_RETR_RACH 7
+
+/*
+ * enum to identify ccch commands
+ */
+enum {
+ CCCH_CELL_BAR,
+ CCCH_OFFSET_PENALTY,
+ CCCH_OFFSET_TEMP,
+ CCCH_CELL_RESELECT,
+ CCCH_SPREAD_SLOT,
+ CCCH_MULT_FRAME,
+ CCCH_ACCESS_GRANT,
+ CCCH_MAX_TX_POWER,
+ CCCH_MAX_RETR
+};
+
+/*
+ * retransmission options
+ */
+static keyword_options ccch_ret_options[] = {
+ {"1","Retransmit one time on the random access channel",ONE_RETR_RACH},
+ {"2","Retransmit two time on the random access channel",TWO_RETR_RACH},
+ {"4","Retransmit four time on the random access channel",FOUR_RETR_RACH},
+ {"7","Retransmit seven time on the random access channel",SEVEN_RETR_RACH},
+ {NULL,NULL,0}
+};
+
+/*
+ * cell-bar-qualify enable
+ */
+
+EOLS (bar_qfy_eol,ccch_configuration,CCCH_CELL_BAR);
+
+KEYWORD (bar_qfy_enable,bar_qfy_eol,no_alt,"enable",
+ "Enable the option",PRIV_CONF);
+
+NVGENS (bar_qfy_nv,bar_qfy_enable,ccch_configuration,CCCH_CELL_BAR);
+
+KEYWORD (cell_bar_qfy,bar_qfy_nv,no_alt,"cell-bar-qualify",
+ "Enable to consider cell low priority by MS",PRIV_CONF);
+
+/*
+ * offset penalty <0-31>
+ */
+
+EOLS (ccch_penalty_eol,ccch_configuration,CCCH_OFFSET_PENALTY);
+
+NUMBER (ccch_penalty_val,ccch_penalty_eol,no_alt,OBJ(int,1),0,31,
+ "Enter the penalty time");
+
+NVGENS (ccch_penalty_val_nv,ccch_penalty_val,ccch_configuration,CCCH_OFFSET_PENALTY);
+
+NOPREFIX (ccch_penalty_val_no,ccch_penalty_val_nv,ccch_penalty_eol);
+
+KEYWORD (ccch_penalty,ccch_penalty_val_no,no_alt,"penalty",
+ "Penalty time during which the temporary offset is subracted from"
+ "reselection criterion",PRIV_CONF);
+
+/*
+ * offset temporary <0-7>
+ */
+
+EOLS (ccch_temp_eol,ccch_configuration,CCCH_OFFSET_TEMP);
+
+NUMBER (ccch_temp_val,ccch_temp_eol,no_alt,OBJ(int,1),0,7,
+ "Enter the reselect offset value");
+NVGENS (ccch_temp_val_nv,ccch_temp_val,ccch_configuration,CCCH_OFFSET_TEMP);
+
+NOPREFIX (ccch_temp_val_no,ccch_temp_val_nv,ccch_temp_eol);
+
+KEYWORD (ccch_temp,ccch_temp_val_no,ccch_penalty,"temporary",
+ "Offset subtracted from C2 reselection criterion",PRIV_CONF);
+
+
+/*
+ * offset cell-reselect <0-63>
+ */
+
+EOLS (cell_reselect_eol,ccch_configuration,CCCH_CELL_RESELECT);
+
+NUMBER (cell_reselect_val,cell_reselect_eol,no_alt,OBJ(int,1),0,63,
+ "Enter the reselect offset value");
+NVGENS (cell_reselect_val_nv,cell_reselect_val,ccch_configuration,CCCH_CELL_RESELECT);
+
+NOPREFIX (cell_reselect_val_no,cell_reselect_val_nv,cell_reselect_eol);
+
+KEYWORD(ccch_cell_reselect,cell_reselect_val_no,ccch_temp,"cell-reselect",
+ "Offset added to C2 reselection criterion",PRIV_CONF);
+
+/*
+ * offset
+ */
+
+KEYWORD (ccch_offset,ccch_cell_reselect,cell_bar_qfy,"offset",
+ "Offset added to the C2 reselection criterion",PRIV_CONF);
+
+
+/*
+ * spread-slot-trans <0-15>
+ */
+
+
+EOLS (spread_slot_eol,ccch_configuration,CCCH_SPREAD_SLOT);
+
+NUMBER (spread_slot_val,spread_slot_eol,no_alt,OBJ(int,1),0,15,
+ "Enter the number of slots");
+
+NVGENS (spread_slot_val_nv,spread_slot_val,ccch_configuration,CCCH_SPREAD_SLOT);
+
+NOPREFIX (spread_slot_val_no,spread_slot_val_nv,spread_slot_eol);
+
+KEYWORD (spread_slot,spread_slot_val_no,ccch_offset,"spread-slot-trans",
+ "Max number of random channel slots a MS must wait",PRIV_CONF);
+
+/*
+ * multi-frames <2-9>
+ */
+
+
+EOLS (mult_frame_eol,ccch_configuration,CCCH_MULT_FRAME);
+
+NUMBER (mult_frame_val,mult_frame_eol,no_alt,OBJ(int,1),2,9,
+ "Enter the number of frames");
+
+NVGENS (mult_frame_val_nv,mult_frame_val,ccch_configuration,CCCH_MULT_FRAME);
+
+NOPREFIX (mult_frame_val_no,mult_frame_val_nv,mult_frame_eol);
+
+KEYWORD (mult_frame,mult_frame_val_no,spread_slot,"multi-frames",
+ "Number of multiframes between two transmissions",PRIV_CONF);
+
+/*
+ * access-grant-blocks <0-7>
+ */
+
+
+EOLS (access_grant_eol,ccch_configuration,CCCH_ACCESS_GRANT);
+
+NUMBER (access_grant_val,access_grant_eol,no_alt,OBJ(int,1),0,7,
+ "Enter the number of frames");
+
+NVGENS (access_grant_val_nv,access_grant_val,ccch_configuration,CCCH_ACCESS_GRANT);
+
+NOPREFIX (access_grant_val_no,access_grant_val_nv,access_grant_eol);
+
+KEYWORD (ccch_access_grant,access_grant_val_no,mult_frame,"access-grant-blocks",
+ "Number of TDMA frames reserved for access grant channel",PRIV_CONF);
+
+/*
+ * ms-max-tx-power <0-33>
+ */
+
+
+EOLS (ccch_tx_pwr_eol,ccch_configuration,CCCH_MAX_TX_POWER);
+
+NUMBER (ccch_tx_pwr_val,ccch_tx_pwr_eol,no_alt,OBJ(int,1),0,33,
+ "For radiotype DCS1800 value is 0 to 30,for DCS1900 0 to 33");
+
+NVGENS (ccch_tx_pwr_val_nv,ccch_tx_pwr_val,ccch_configuration,CCCH_MAX_TX_POWER);
+
+NOPREFIX (ccch_tx_pwr_val_no,ccch_tx_pwr_val_nv,ccch_tx_pwr_eol);
+
+KEYWORD (ccch_tx_pwr,ccch_tx_pwr_val_no,ccch_access_grant,"ms-max-tx-power",
+ "Max transmit power level a MS can use on the cell",PRIV_CONF);
+
+
+/*
+ * max-retransmission
+ */
+
+EOLS (max_retrx_eol,ccch_configuration,CCCH_MAX_RETR);
+
+KEYWORD_OPTIONS(max_retrx_val,max_retrx_eol,no_alt,ccch_ret_options,OBJ(int,1),
+ PRIV_CONF,0);
+
+NVGENS (max_retrx_val_nv,max_retrx_val,ccch_configuration,CCCH_MAX_RETR);
+
+NOPREFIX (max_retrx_val_no,max_retrx_val_nv,max_retrx_eol);
+
+KEYWORD(cfg_ccch_options,max_retrx_val_no,ccch_tx_pwr,"max-retransmission",
+ "Max number of retransmission MS can attempt",PRIV_CONF);
+
+#undef ALTERNATE
+#define ALTERNATE cfg_ccch_options
diff --git a/data/mnet/GP10/Host/cli/include/cfg_ccch_exit.h b/data/mnet/GP10/Host/cli/include/cfg_ccch_exit.h
new file mode 100644
index 0000000..f48ca27
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/cfg_ccch_exit.h
@@ -0,0 +1,11 @@
+EOLS (gp10_cell_ccch_end_eol,exit_config_command,CMD_END);
+
+KEYWORD (gp10_cell_ccch_end,gp10_cell_ccch_end_eol,no_alt,"end",
+ "Exit gp10 ccch-config mode to exec mode",PRIV_CONF);
+
+EOLNS (gp10_cell_ccch_exit_eol,gp10_cell_sub_config_exit);
+KEYWORD (gp10_cell_ccch_exit, gp10_cell_ccch_exit_eol,gp10_cell_ccch_end, "exit",
+ "Exit gp10 ccch-config mode", PRIV_CONF);
+
+#undef ALTERNATE
+#define ALTERNATE gp10_cell_ccch_exit
diff --git a/data/mnet/GP10/Host/cli/include/cfg_cell_exit.h b/data/mnet/GP10/Host/cli/include/cfg_cell_exit.h
new file mode 100644
index 0000000..845eb90
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/cfg_cell_exit.h
@@ -0,0 +1,11 @@
+EOLS (gp10_cell_end_eol,exit_config_command,CMD_END);
+
+KEYWORD (gp10_cell_end,gp10_cell_end_eol,no_alt,"end",
+ "Exit gp10 config-cell mode to exec mode",PRIV_CONF);
+
+EOLNS (gp10_cell_exit_eol,gp10_sub_config_exit);
+KEYWORD (gp10_cell_exit, gp10_cell_exit_eol,gp10_cell_end, "exit",
+ "Exit gp10 config-cell mode", PRIV_CONF);
+
+#undef ALTERNATE
+#define ALTERNATE gp10_cell_exit
diff --git a/data/mnet/GP10/Host/cli/include/cfg_mspwr_ctrl.h b/data/mnet/GP10/Host/cli/include/cfg_mspwr_ctrl.h
new file mode 100644
index 0000000..650041e
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/cfg_mspwr_ctrl.h
@@ -0,0 +1,229 @@
+
+/*
+ * enum to identify handover command
+ */
+
+enum {
+ HANDOVER_N5,
+ HANDOVER_N6,
+ HANDOVER_P5,
+ HANDOVER_P6,
+ UPLINK,
+ DOWNLINK,
+ HANDOVER_AVERAGE,
+ HANDOVER_QUALITY,
+ HANDOVER_STRENGTH,
+ LOG_CONSOLE,
+ LOG_HOST,
+ LOG_FILE
+};
+
+static keyword_options link_options[] = {
+ {"uplink","Uplink received power/quality level",UPLINK},
+ {"downlink","Downlink received power/quality level",DOWNLINK},
+ {NULL,NULL,0}
+};
+
+static keyword_options handover_averages[] = {
+ {"N5","Total number of averages of signal quality before handover",HANDOVER_N5},
+ {"N6","Total number of averages of signal strength before handover",HANDOVER_N6},
+ {"P5","Total number of averages of signal quality lower than threshold",HANDOVER_P5},
+ {"P6","Total number of averages of signal strength lower than threshold",HANDOVER_P6},
+ {NULL,NULL,0}
+};
+
+
+/*
+ * logging file
+ */
+EOLS (log_file_eol,logging_option,LOG_FILE);
+
+KEYWORD (log_file,log_file_eol,no_alt,"file",
+ "Log to the file viperlog.dat",PRIV_CONF);
+
+/*
+ * logging <ip-address> [port-number]
+ */
+
+EOLS (log_ip_eol,logging_option,LOG_HOST);
+
+NUMBER (log_port,log_ip_eol,log_ip_eol,OBJ(int,1),1025,65535,
+ "Enter the port number");
+
+IPADDR (log_ip_addr,log_port,log_file,OBJ(paddr,1),
+ "Ip address of the host to send the log messages");
+
+/*
+ * logging console
+ */
+
+EOLS (log_cons_eol,logging_option,LOG_CONSOLE);
+
+KEYWORD (log_cons,log_cons_eol,log_ip_addr,"console",
+ "Log to the console",PRIV_CONF);
+
+NVGENNS (log_nv,log_cons,logging_option);
+
+/*
+ * logging
+ */
+
+KEYWORD (cfg_logging,log_nv,no_alt,"logging",
+ "Configure the logging option",PRIV_CONF);
+
+
+/*
+ * handover-control average {N5 | N6 | P5 | P6} <0-31>
+ */
+
+EOLS (hand_avg_eol,handover_control_commands,HANDOVER_AVERAGE);
+
+NUMBER (hand_avg_val,hand_avg_eol,no_alt,OBJ(int,2),0,31,
+ "Enter average value");
+
+NOPREFIX (hand_avg_val_no,hand_avg_val,hand_avg_eol);
+
+KEYWORD_OPTIONS(hand_avg_opt,hand_avg_val_no,no_alt,handover_averages,
+ OBJ(int,1),PRIV_CONF,0);
+
+NVGENS (hand_avg_val_nv,hand_avg_opt,handover_control_commands,HANDOVER_AVERAGE);
+
+KEYWORD (hand_ctrl_avg,hand_avg_val_nv,no_alt,"average",
+ "Averages to make handover decision",PRIV_CONF);
+
+/*
+ * handover-control {uplink|downlink} quality <0-7>}
+ */
+
+EOLS (hand_qty_eol,handover_control_commands,HANDOVER_QUALITY);
+
+NUMBER (hand_qty_val,hand_qty_eol,no_alt,OBJ(int,2),0,7,
+ "Enter quality level");
+
+NOPREFIX (hand_qty_val_no,hand_qty_val,hand_qty_eol);
+
+KEYWORD (hand_qty,hand_qty_val_no,no_alt,"quality",
+ "Quality level",PRIV_CONF);
+
+/*
+ * handover-control {uplink|downlink} strength <0-63>
+ */
+
+EOLS (hand_strgth_eol,handover_control_commands,HANDOVER_STRENGTH);
+
+NUMBER (hand_strgth_val,hand_strgth_eol,no_alt,OBJ(int,2),0,63,
+ "Enter power level");
+
+NOPREFIX (hand_strgth_val_no,hand_strgth_val,hand_strgth_eol);
+
+KEYWORD (hand_ctrl_strgth,hand_strgth_val_no,hand_qty,"strength",
+ "Strenth of the power",PRIV_CONF);
+
+/*
+ * handover-control {uplink|downlink}
+ */
+
+KEYWORD_OPTIONS (hand_ctrl_choice,hand_ctrl_strgth,no_alt,link_options,OBJ(int,1),
+ PRIV_CONF,0);
+
+NVGENS (hand_ctrl_choice_nv,hand_ctrl_choice,handover_control_commands,HANDOVER_STRENGTH);
+
+KEYWORD (hand_ctrl_thr,hand_ctrl_choice_nv,hand_ctrl_avg,"threshold",
+ "Threshold to trigger the GP10 to handover MS",PRIV_CONF);
+
+
+/*
+ * handover-control
+ */
+
+KEYWORD (cfg_hand_ctrl,hand_ctrl_thr,cfg_logging,"handover-control",
+ "Configure handover control parameters",PRIV_CONF);
+
+
+/*
+ * enum for power control command identification
+ */
+
+enum {
+ MAX_POWER_LEVEL,
+ UPLINK_TARGET,
+ SIGNAL_QUALITY,
+ SIGNAL_STRENGTH
+};
+
+/*
+ * ms-power-control max-tx-power <power-level>
+ */
+
+
+EOLS (max_tr_pwr_eol,mspower_commands,MAX_POWER_LEVEL);
+
+NUMBER (max_tr_pwr_val,max_tr_pwr_eol,no_alt,OBJ(int,1),0,33,
+ "Power level");
+NVGENS (max_tr_pwr_val_nv,max_tr_pwr_val,mspower_commands,MAX_POWER_LEVEL);
+
+NOPREFIX (max_tr_pwr_val_no,max_tr_pwr_val_nv,max_tr_pwr_eol);
+
+KEYWORD (max_tr_pwr,max_tr_pwr_val_no,no_alt,"max-tx-power",
+ "Maximum transmit power level allowed for each MS",PRIV_CONF);
+
+
+/*
+ * ms-power-control uplink-target <power-level>
+ */
+
+
+EOLS (uplink_tgt_eol,mspower_commands,UPLINK_TARGET);
+
+NUMBER (uplink_tgt_val,uplink_tgt_eol,no_alt,OBJ(int,1),0,63,
+ "Power level");
+
+NVGENS (uplink_tgt_val_nv,uplink_tgt_val,mspower_commands,UPLINK_TARGET);
+
+NOPREFIX (uplink_tgt_val_no,uplink_tgt_val_nv,uplink_tgt_eol);
+
+KEYWORD (uplink_tgt,uplink_tgt_val_no,max_tr_pwr,"uplink-target",
+ "Received power level GP10 attempts to maintain from each MS",PRIV_CONF);
+
+/*
+ * ms-power-control signal-quality-avg-window <value>
+ */
+
+
+EOLS (sig_qty_eol,mspower_commands,SIGNAL_QUALITY);
+
+NUMBER (sig_qty_val,sig_qty_eol,no_alt,OBJ(int,1),0,31,
+ "Period of computation");
+NVGENS (sig_qty_val_nv,sig_qty_val,mspower_commands,SIGNAL_QUALITY);
+
+NOPREFIX (sig_qty_val_no,sig_qty_val_nv,sig_qty_eol);
+
+KEYWORD (sig_qty,sig_qty_val_no,uplink_tgt,"signal-quality-avg-window",
+ "Computation of average of uplink received quality",PRIV_CONF);
+
+/*
+ * ms-power-control signal-strength-avg-window <value>
+ */
+
+
+EOLS (sig_strgth_eol,mspower_commands,SIGNAL_STRENGTH);
+
+NUMBER (sig_strgth_val,sig_strgth_eol,no_alt,OBJ(int,1),0,31,
+ "Period of computation");
+NVGENS (sig_strgth_val_nv,sig_strgth_val,mspower_commands,SIGNAL_STRENGTH);
+
+NOPREFIX (sig_strgth_val_no,sig_strgth_val_nv,sig_strgth_eol);
+
+KEYWORD (sig_strgth,sig_strgth_val_no,sig_qty,"signal-strength-avg-window",
+ "Computation of average of uplink received levels",PRIV_CONF);
+
+
+/*
+ * ms-power-control
+ */
+
+KEYWORD (cfg_pwr_ctrl,sig_strgth,cfg_hand_ctrl,"ms-power-control",
+ "Configure MS power control parameters",PRIV_CONF);
+
+#undef ALTERNATE
+#define ALTERNATE cfg_pwr_ctrl
diff --git a/data/mnet/GP10/Host/cli/include/cfg_proto_exit.h b/data/mnet/GP10/Host/cli/include/cfg_proto_exit.h
new file mode 100644
index 0000000..0d378ef
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/cfg_proto_exit.h
@@ -0,0 +1,11 @@
+EOLS (gp10_proto_end_eol,exit_config_command,CMD_END);
+
+KEYWORD (gp10_proto_end,gp10_proto_end_eol,no_alt,"end",
+ "Exit gp10 config-proto mode to exec mode",PRIV_CONF);
+
+EOLNS (gp10_proto_exit_eol,gp10_sub_config_exit);
+KEYWORD (gp10_proto_exit, gp10_proto_exit_eol,gp10_proto_end, "exit",
+ "Exit gp10 config-proto mode", PRIV_CONF);
+
+#undef ALTERNATE
+#define ALTERNATE gp10_proto_exit
diff --git a/data/mnet/GP10/Host/cli/include/cfg_sys_feat.h b/data/mnet/GP10/Host/cli/include/cfg_sys_feat.h
new file mode 100644
index 0000000..3529e16
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/cfg_sys_feat.h
@@ -0,0 +1,86 @@
+
+#define CIPHERING_ENABLE 1
+
+/*
+ * enum for command identification
+ */
+enum {
+ CELL_BARR_ENABLE,
+ SMS_CB_ENABLE,
+ AUTH_FREQ_VAL,
+ AUTH_CIPH_ENABLE
+};
+
+
+/*
+ * sys-feature cell-barring enable
+ */
+
+EOLS (cell_barr_eol,sysfeature_commands,CELL_BARR_ENABLE);
+
+KEYWORD (cell_barr_en,cell_barr_eol,no_alt,"enable",
+ "Enable the cell barring",PRIV_CONF);
+
+NVGENS (cell_barr_nv,cell_barr_en,sysfeature_commands,CELL_BARR_ENABLE);
+
+KEYWORD (cell_barr,cell_barr_nv,no_alt,"cell-barring",
+ "Enable cell barring feature",PRIV_CONF);
+
+/*
+ * sys-feature sms-cb enable
+ */
+
+EOLS (sms_cb_eol,sysfeature_commands,SMS_CB_ENABLE);
+
+KEYWORD (sms_cb_en,sms_cb_eol,no_alt,"enable",
+ "Enable the cell broadcast",PRIV_CONF);
+
+NVGENS (sms_cb_nv,sms_cb_en,sysfeature_commands,SMS_CB_ENABLE);
+
+KEYWORD (sms_cb,sms_cb_nv,cell_barr,"sms-cb",
+ "Enable SMS cell broadcast system on the cell",PRIV_CONF);
+
+/*
+ * sys-feature authentication-frequency <value>
+ */
+
+EOLS (auth_freq_eol,sysfeature_commands,AUTH_FREQ_VAL);
+
+NUMBER (auth_freq_val,auth_freq_eol,no_alt,OBJ(int,1),0,5,
+ "Enter the frequency");
+
+NVGENS (auth_freq_val_nv,auth_freq_val,sysfeature_commands,AUTH_FREQ_VAL);
+
+NOPREFIX (auth_freq_val_no,auth_freq_val_nv,auth_freq_eol);
+
+KEYWORD (auth_freq,auth_freq_val_no,sms_cb,"authentication-frequency",
+ "Frequency of mobile authentication",PRIV_CONF);
+
+
+/*
+ * sys-feature authentication-feature [ciphering] enable
+ */
+
+EOLS (auci_enable_eol,sysfeature_commands,AUTH_CIPH_ENABLE);
+
+KEYWORD (auci_enable,auci_enable_eol,no_alt,"enable",
+ "Enable the method",PRIV_CONF);
+
+KEYWORD_ID(sys_cipher,auci_enable,auci_enable,OBJ(int,1),CIPHERING_ENABLE,
+ "ciphering","Enable ciphering",PRIV_CONF);
+
+NVGENS (sys_authen_nv,sys_cipher,sysfeature_commands,AUTH_CIPH_ENABLE);
+
+KEYWORD(sys_authen,sys_authen_nv,auth_freq,"authentication-feature",
+ "Enable authentication ",PRIV_CONF);
+
+
+/*
+ * sys-feature
+ */
+
+KEYWORD (cfg_sys_feature,sys_authen,no_alt,"sys-feature",
+ "Configure system feature control parameters",PRIV_CONF);
+
+#undef ALTERNATE
+#define ALTERNATE cfg_sys_feature
diff --git a/data/mnet/GP10/Host/cli/include/cfg_sys_info.h b/data/mnet/GP10/Host/cli/include/cfg_sys_info.h
new file mode 100644
index 0000000..6ac560b
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/cfg_sys_info.h
@@ -0,0 +1,297 @@
+
+/*
+ * enum for command identification
+ */
+
+enum {
+ CONFIG_CDR_PASSWORD,
+ CONFIG_CDR_CLIENT_SSL_ENABLE,
+ CONF_SNMP_COMM,
+ SUB_CONFIG_PROTO,
+ SUB_CONFIG_ADJCELL,
+ SUB_CONFIG_CELL,
+ CONF_CUSTADDR,
+ CONF_CUSTINFO,
+ CONF_CUSTEMAIL,
+ CONF_CUSTPHONE,
+ CONF_CUSTNAME,
+ CONF_ASSET,
+ CONF_LOCATION,
+ CONF_GW_IPADDR,
+ CONF_SYS_IPADDR,
+ CONF_SYS_NAME
+};
+
+
+
+/*
+ * cdr password <string>
+ * no cdr password
+ */
+
+EOLS(config_cdr_password_eols, gp10_config_cdr_data, CONFIG_CDR_PASSWORD);
+
+STRING(config_cdr_password_val, config_cdr_password_eols, no_alt,
+ OBJ(string, 2), "Password");
+
+NVGENS (config_cdr_password_nv, config_cdr_password_val, gp10_config_cdr_data, CONFIG_CDR_PASSWORD);
+
+NOPREFIX(config_cdr_password_no, config_cdr_password_nv, config_cdr_password_eols);
+
+KEYWORD(config_cdr_password, config_cdr_password_no, no_alt,
+ "password", "Configure CDR Client password", PRIV_CONF);
+
+
+/*
+ * cdr client ssl enable
+ * no cdr client ssl enable
+ */
+
+EOLS(config_cdr_client_ssl_enable_eols, gp10_config_cdr_data, CONFIG_CDR_CLIENT_SSL_ENABLE);
+
+KEYWORD(config_cdr_client_ssl_enable, config_cdr_client_ssl_enable_eols, no_alt,
+ "enable", "Enable/Disable encryption between CDR Client & Server :NOTE: use no command to disable", PRIV_CONF);
+
+NVGENS (config_cdr_client_ssl_nv, config_cdr_client_ssl_enable, gp10_config_cdr_data, CONFIG_CDR_CLIENT_SSL_ENABLE);
+
+KEYWORD(config_cdr_client_ssl, config_cdr_client_ssl_nv, no_alt,
+ "ssl", "Configure CDR Client SSL data", PRIV_CONF);
+
+KEYWORD(config_cdr_client, config_cdr_client_ssl, config_cdr_password,
+ "client", "Configure CDR Client data", PRIV_CONF);
+
+
+/*
+ * cdr
+ */
+
+KEYWORD(config_cdr_data, config_cdr_client, no_alt,
+ "cdr", "Commands related to CDR Client configuration", PRIV_CONF);
+
+/**********************************************************/
+/* CDR Command Line Interface */
+/* END */
+/**********************************************************/
+
+
+/*
+ *[no] snmp community <read community> <write community>
+ */
+
+EOLS (cfg_snmp_comm_eol,system_configuration,CONF_SNMP_COMM);
+
+STRING (cfg_snmp_write,cfg_snmp_comm_eol,no_alt,OBJ(string,2),
+ "Enter the write community string");
+
+STRING (cfg_snmp_read,cfg_snmp_write,no_alt,OBJ(string,1),
+ "Enter the read community string");
+
+NOPREFIX (cfg_snmp_comm_no,cfg_snmp_read,cfg_snmp_comm_eol);
+
+NVGENS (cfg_snmp_comm_nv,cfg_snmp_comm_no,system_configuration,CONF_SNMP_COMM);
+
+KEYWORD (cfg_snmp_comm_key,cfg_snmp_comm_nv,no_alt,"community",
+ "Configure snmp community strings",PRIV_CONF);
+
+KEYWORD (cfg_snmp_comm,cfg_snmp_comm_key,config_cdr_data,"snmp",
+ "Configure snmp mibs",PRIV_CONF);
+
+
+
+/*
+ *config-proto
+ */
+
+EOLS (cfg_proto_param_eol,gp10_subconfig_cmds,SUB_CONFIG_PROTO);
+
+NVGENS (cfg_proto_param_nv,cfg_proto_param_eol,gp10_subconfig_cmds,SUB_CONFIG_PROTO);
+
+KEYWORD (cfg_proto_param,cfg_proto_param_nv,cfg_snmp_comm,"config-proto",
+ "Configure protocol management parameters",PRIV_CONF);
+
+/*
+ * config-adjcell
+ */
+
+EOLS (cfg_adjcell_param_eol,gp10_subconfig_cmds,SUB_CONFIG_ADJCELL);
+
+NUMBER (cfg_adjcell_num,cfg_adjcell_param_eol,no_alt,OBJ(int,1),1,16,
+ "Enter the adjacent cell number");
+
+NVGENS (cfg_adjcell_param_nv,cfg_adjcell_num,gp10_subconfig_cmds,SUB_CONFIG_ADJCELL);
+
+KEYWORD (cfg_adjcell_param,cfg_adjcell_param_nv,cfg_proto_param,"config-adjcell",
+ "Configure adjacent cell parameters",PRIV_CONF);
+
+/*
+ * config-cell
+ */
+
+EOLS (cfg_cell_param_eol,gp10_subconfig_cmds,SUB_CONFIG_CELL);
+
+NVGENS ( cfg_cell_param_nv,cfg_cell_param_eol,gp10_subconfig_cmds,SUB_CONFIG_CELL);
+
+KEYWORD (cfg_cell_param,cfg_cell_param_nv,cfg_adjcell_param,"config-cell",
+ "Configure cell parameters",PRIV_CONF);
+
+/*
+ * customer-address <address-string>
+ */
+
+EOLS (custaddr_eol,system_configuration,CONF_CUSTADDR);
+
+STRING (custaddr,custaddr_eol,no_alt,OBJ(string,1),
+ "GP10 customer address");
+NVGENS (custaddr_nv,custaddr,system_configuration,CONF_CUSTADDR);
+
+NOPREFIX (custaddr_no,custaddr_nv,custaddr_eol);
+
+KEYWORD (cfg_custaddr,custaddr_no,cfg_cell_param,"customer-address",
+ "Configure GP10 customer address.Changes will be effective only after GP10 reboot",PRIV_CONF);
+
+/*
+ * customer-info <info-string>
+ */
+
+EOLS (custinfo_eol,system_configuration,CONF_CUSTINFO);
+
+STRING (custinfo,custinfo_eol,no_alt,OBJ(string,1),
+ "GP10 customer information");
+NVGENS (custinfo_nv,custinfo,system_configuration,CONF_CUSTINFO);
+
+NOPREFIX (custinfo_no,custinfo_nv,custinfo_eol);
+
+KEYWORD (cfg_custinfo,custinfo_no,cfg_custaddr,"customer-info",
+ "Configure GP10 customer information.Changes will be effective only after GP10 reboot",PRIV_CONF);
+
+/*
+ * customer-email <email-id-string>
+ */
+
+EOLS (custemail_eol,system_configuration,CONF_CUSTEMAIL);
+
+STRING (custemail,custemail_eol,no_alt,OBJ(string,1),
+ "GP10 customer email id");
+NVGENS (custemail_nv,custemail,system_configuration,CONF_CUSTEMAIL);
+
+NOPREFIX (custemail_no,custemail_nv,custemail_eol);
+
+KEYWORD (cfg_custemail,custemail_no,cfg_custinfo,"customer-email",
+ "Configure GP10 customer email id.Changes will be effective only after GP10 reboot",PRIV_CONF);
+
+
+/*
+ * customer-phone <phone-number-string>
+ */
+
+EOLS (custphone_eol,system_configuration,CONF_CUSTPHONE);
+
+STRING (custphone,custphone_eol,no_alt,OBJ(string,1),
+ "Phone number of the GP10 customer");
+
+NVGENS (custphone_nv,custphone,system_configuration,CONF_CUSTPHONE);
+
+NOPREFIX (custphone_no,custphone_nv,custphone_eol);
+
+KEYWORD (cfg_custphone,custphone_no,cfg_custemail,"customer-phone",
+ "Configure GP10 customer phone number.Changes will be effective only after GP10 reboot",PRIV_CONF);
+
+
+/*
+ * customer-name <name-string>
+ */
+
+EOLS (custname_eol,system_configuration,CONF_CUSTNAME);
+
+STRING (custname,custname_eol,no_alt,OBJ(string,1),
+ "Customer name of the GP10 host");
+NVGENS (custname_nv,custname,system_configuration,CONF_CUSTNAME);
+
+NOPREFIX (custname_no,custname_nv,custname_eol);
+
+KEYWORD (cfg_custname,custname_no,cfg_custphone,"customer-name",
+ "Configure GP10 customer name.Changes will be effective only after GP10 reboot",PRIV_CONF);
+
+/*
+ * asset <asset-string>
+ */
+
+EOLS (asset_eol,system_configuration,CONF_ASSET);
+
+STRING (asset,asset_eol,no_alt,OBJ(string,1),
+ "Asset of the GP10 host");
+NVGENS (asset_nv,asset,system_configuration,CONF_ASSET);
+
+NOPREFIX (asset_no,asset_nv,asset_eol);
+
+KEYWORD (cfg_asset,asset_no,cfg_custname,"asset",
+ "Configure GP10 asset number.Changes will be effective only after GP10 reboot",PRIV_CONF);
+
+/*
+ *location <location-string>
+ */
+
+
+EOLS (location_eol,system_configuration,CONF_LOCATION);
+
+STRING (location,location_eol,no_alt,OBJ(string,1),
+ "Location of the GP10 host");
+NVGENS (location_nv,location,system_configuration,CONF_LOCATION);
+
+NOPREFIX (location_no,location_nv,location_eol);
+
+KEYWORD (cfg_location,location_no,cfg_asset,"location",
+ "Configure GP10 location.Changes will be effective only after GP10 reboot",PRIV_CONF);
+
+/*
+ * ip default-gateway <ip-address>
+ */
+
+EOLS (gw_ip_addr_eol,system_configuration,CONF_GW_IPADDR);
+
+IPADDR (gw_ip_addr,gw_ip_addr_eol,no_alt,OBJ(paddr,1),
+ "Ip address of the default gateway");
+
+NVGENS (gw_ip_addr_nv,gw_ip_addr,system_configuration,CONF_GW_IPADDR);
+
+NOPREFIX (gw_ip_addr_no,gw_ip_addr_nv,gw_ip_addr_eol);
+
+KEYWORD (default_gw,gw_ip_addr_no,no_alt,"default-gateway",
+ "Configure default IP gateway.Changes will be effective only after GP10 reboot",PRIV_CONF);
+
+/*
+ *ip address <ip-address> <subnet-mask>
+ */
+
+EOLS (ip_addr_eol,system_configuration,CONF_SYS_IPADDR);
+
+IPADDR_MASK(host_ip_addr,ip_addr_eol,no_alt,OBJ(paddr,1),OBJ(paddr,2),
+ "Enter IP Address and subnet mask of the GP10");
+NVGENS (host_ip_addr_nv,host_ip_addr,system_configuration,CONF_SYS_IPADDR);
+
+NOPREFIX (host_ip_addr_no,host_ip_addr_nv,ip_addr_eol);
+
+KEYWORD (cfg_ip_addr_key,host_ip_addr_no,default_gw,"address",
+ "Configure IP Address.Changes will be effective only after GP10 reboot",PRIV_CONF);
+
+KEYWORD (cfg_ip_addr,cfg_ip_addr_key,cfg_location,"ip",
+ "Configure IP Address.Changes will be effective only after GP10 reboot",PRIV_CONF);
+
+/*
+ * hostname <name>
+ */
+
+
+EOLS (sys_name_eol,system_configuration,CONF_SYS_NAME);
+
+STRING (sys_name,sys_name_eol,no_alt,OBJ(string,1),
+ "Name of the GP10 host");
+NVGENS (sys_name_nv,sys_name,system_configuration,CONF_SYS_NAME);
+
+NOPREFIX (sys_name_no,sys_name_nv,sys_name_eol);
+
+KEYWORD (cfg_sys_name,sys_name_no,cfg_ip_addr,"hostname",
+ "Configure GP10 host name.Changes will be effective only after GP10 reboot",PRIV_CONF);
+
+#undef ALTERNATE
+#define ALTERNATE cfg_sys_name
diff --git a/data/mnet/GP10/Host/cli/include/cfg_timers.h b/data/mnet/GP10/Host/cli/include/cfg_timers.h
new file mode 100644
index 0000000..6e55c4c
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/cfg_timers.h
@@ -0,0 +1,190 @@
+/*
+ * enum for command identification
+ */
+
+enum {
+ CCM_TIMER,
+ RMM_TIMER,
+ FACCH_TIMER,
+ SACCH_TIMER ,
+ SDCCH_TIMER
+};
+
+/*
+ * enum for various timers
+ */
+enum {
+ SDCCH_SAPI0_TIMER,
+ SDCCH_SAPI3_TIMER,
+ SACCH_SDCCH_TIMER,
+ TCH_SAPI0_TIMER,
+ SDCCH_SDCCH_TIMER,
+ RMM_IMM_ASSIGN,
+ RMM_HANDOVER,
+ RMM_PHY_INFO,
+ RMM_ASSIGN,
+ RMM_LOW_LAYER,
+ RMM_CH_ACTIVATION,
+ RMM_PAGING_MSG,
+ CCM_ALERT,
+ CCM_SETUP_SENT,
+ CCM_CALL_CONFIRM,
+ CCM_CONNECT_SENT,
+ CCM_DISCONNECT_SENT,
+ CCM_RELEASE_SENT
+};
+
+/*
+ * layer2 sdcch timers
+ */
+
+static keyword_options sdcch_timers [] = {
+ { "sapi-0-timer", "Sdcch service access point indicator 0 layer 2 timer",SDCCH_SAPI0_TIMER},
+ { "sapi-3-timer","Sdcch service access point indicator 3 layer 2 timer",SDCCH_SAPI3_TIMER},
+ { "sdcch-tch-timer","Stand-alone dedicated control channel timer",SDCCH_SDCCH_TIMER},
+ {NULL,NULL,0}
+};
+
+/*
+ * layer 2 sacch timers
+ */
+
+static keyword_options sacch_timers [] = {
+ { "tch-0-timer", "Traffic channel service access point indicator 0 timer",TCH_SAPI0_TIMER},
+ { "sdcch-timer","Stand-alone dedicated control channel timer",SACCH_SDCCH_TIMER},
+ {NULL,NULL,0}
+};
+
+
+
+/*
+ * layer 3 rmm timers
+ */
+
+static keyword_options layer3_rmm_timers [] = {
+ {"immediate-assignment","Timer for immediate assignment commands",RMM_IMM_ASSIGN},
+ { "handover-command","Timer for handover commands",RMM_HANDOVER},
+ { "physical-information","Timer for physical information commands",RMM_PHY_INFO},
+ {"assignment-command","Timer for the assignment commands",RMM_ASSIGN},
+ {"lower-layer-failure","Timer for lower layer failures",RMM_LOW_LAYER},
+ {"channel-activation","Timer for channel activation delays",RMM_CH_ACTIVATION},
+ {"paging-messages","Timer for paging messages",RMM_PAGING_MSG},
+ {NULL,NULL,0}
+};
+
+/*
+ * layer 3 ccm timers
+ */
+static keyword_options layer3_ccm_timers []= {
+ {"alerting-received","Alerting received timer",CCM_ALERT},
+ {"setup-sent","Setup sent timer",CCM_SETUP_SENT},
+ {"call-confirmed","Call confirmed received timer",CCM_CALL_CONFIRM},
+ {"connect-sent","Connect sent timer",CCM_CONNECT_SENT},
+ {"disconnect-sent","Disconnect sent timer",CCM_DISCONNECT_SENT},
+ {"release-sent","Release sent timer",CCM_RELEASE_SENT},
+ {NULL,NULL,0}
+};
+
+/*
+ *laye3-ccm {alerting-received| setup-sent | call-confirmed |connect-sent |
+ *disconnect-sent |release-sent} <timer-value>
+ */
+
+EOLS (ccm_timer_eol,timer_configuration,CCM_TIMER);
+
+NUMBER (ccm_timer_val,ccm_timer_eol,no_alt,OBJ(int,2),0,65535,"Enter timer value in 10ms units");
+
+NOPREFIX (ccm_timer_val_no,ccm_timer_val,ccm_timer_eol);
+
+KEYWORD_OPTIONS(ccm_timers,ccm_timer_val_no,no_alt,layer3_ccm_timers,OBJ(int,1),PRIV_CONF,0);
+
+NVGENS (ccm_timers_nv,ccm_timers,timer_configuration,CCM_TIMER);
+
+KEYWORD (layer3_ccm_timer,ccm_timers_nv,no_alt,"layer3-ccm",
+ "Configure layer 3 ccm timers",PRIV_CONF);
+
+
+/*
+ * layer3-rrm { immediate-assignment | handover-command | physical-information |
+ * assignment-command | lower-layer-failiure | channel-activation | paging-messages }
+ * <timer-value>
+ */
+
+EOLS (rmm_timer_eol,timer_configuration,RMM_TIMER);
+
+NUMBER (rmm_timer_val,rmm_timer_eol,no_alt,OBJ(int,2),0,65535,"Enter timer value in 10ms units");
+
+NOPREFIX (rmm_timer_val_no,rmm_timer_val,rmm_timer_eol);
+
+KEYWORD_OPTIONS(rmm_timers,rmm_timer_val_no,no_alt,layer3_rmm_timers,OBJ(int,1),PRIV_CONF,0);
+
+NVGENS (rmm_timers_nv,rmm_timers,timer_configuration,RMM_TIMER);
+
+KEYWORD (layer3_rmm_timer,rmm_timers_nv,layer3_ccm_timer,"layer3-rrm",
+ "Configure layer 3 rrm timers",PRIV_CONF);
+
+
+/*
+ *layer2-lapdm facch <timer-value>
+ */
+
+EOLS (facch_timer_eol,timer_configuration,FACCH_TIMER);
+
+NUMBER (facch_timer_val,facch_timer_eol,no_alt,OBJ(int,1),0,65535,"Enter timer value in 5ms units");
+
+NOPREFIX (facch_timer_val_no,facch_timer_val,facch_timer_eol);
+
+NVGENS (facch_timer_val_nv,facch_timer_val_no,timer_configuration,FACCH_TIMER);
+
+KEYWORD (cfg_facch_timer,facch_timer_val_nv,no_alt,"facch",
+ "Configure full rate traffic channel timers",PRIV_CONF);
+
+
+
+/*
+ *layer2-lapdm sacch { tch-sapi-0-timer | tch-sapi-3-timer | sdcch-timer } <timer-value>
+ */
+
+
+EOLS (sacch_timer_eol,timer_configuration,SACCH_TIMER);
+
+NUMBER (sacch_timer_val,sacch_timer_eol,no_alt,OBJ(int,2),0,65535,"Enter timer value in 5ms units");
+
+NOPREFIX (sacch_timer_val_no,sacch_timer_val,sacch_timer_eol);
+
+KEYWORD_OPTIONS(sacch_timer,sacch_timer_val_no,no_alt,sacch_timers,OBJ(int,1),PRIV_CONF,0);
+
+NVGENS (sacch_timer_nv,sacch_timer,timer_configuration,SACCH_TIMER);
+
+KEYWORD (cfg_sacch_timer,sacch_timer_nv,cfg_facch_timer,"sacch",
+ "Configure saach timers",PRIV_CONF);
+
+
+/*
+ *layer2-lapdm sdcch { sapi-0-timer | sapi-3-timer | sdcch-timer}
+ *<timer-value>
+ */
+
+EOLS (sdcch_timer_eol,timer_configuration,SDCCH_TIMER);
+
+NUMBER (sdcch_timer_val,sdcch_timer_eol,no_alt,OBJ(int,2),0,65535,"Enter timer value in 5ms units");
+
+NOPREFIX (sdcch_timer_val_no,sdcch_timer_val,sdcch_timer_eol);
+
+KEYWORD_OPTIONS(sdcch_timer,sdcch_timer_val_no,no_alt,sdcch_timers,OBJ(int,1),PRIV_CONF,0);
+
+NVGENS (sdcch_timer_nv,sdcch_timer,timer_configuration,SDCCH_TIMER);
+
+KEYWORD (cfg_sdcch_timer,sdcch_timer_nv,cfg_sacch_timer,"sdcch",
+ "Configure stand-alone dedicated control channel timer",PRIV_CONF);
+
+
+/*
+ *layer2-lapdm
+ */
+
+KEYWORD (cfg_proto_options,cfg_sdcch_timer,layer3_rmm_timer,"layer2-lapdm",
+ "Configure layer 2 LAPDm timers",PRIV_CONF);
+
+#undef ALTERNATE
+#define ALTERNATE cfg_proto_options
diff --git a/data/mnet/GP10/Host/cli/include/cfg_trx.h b/data/mnet/GP10/Host/cli/include/cfg_trx.h
new file mode 100644
index 0000000..80d1cef
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/cfg_trx.h
@@ -0,0 +1,144 @@
+/*
+ * enum for transceiver command identification
+ */
+enum {
+ TRX_RADIO_FREQUENCY,
+ TRX_POWER_REDUCTION,
+ TRX_CHANNEL_TABLE,
+ TRX_ADMIN_STATE,
+ TRX_ARFCN_NUMBER
+};
+
+/*
+ * enum for administrative state options
+ */
+enum {
+ STATE_LOCKED,
+ STATE_UNLOCKED,
+ STATE_SHUTDOWN
+};
+
+/*
+ * administrative state options
+ */
+
+static keyword_options admin_state_options[] = {
+ { "locked", "Cannot be accessed by mobile stations", STATE_LOCKED},
+ { "unlocked", "Can be accessed by mobile stations",STATE_UNLOCKED},
+ { "shutting-down","GP10 is in the process of becoming locked",STATE_SHUTDOWN},
+ {NULL,NULL,0}
+};
+
+/*
+ * radio-carrier radio-frequency <value>
+ */
+
+EOLS (rad_freq_eol,transceiver_parameters,TRX_RADIO_FREQUENCY);
+
+NUMBER (rad_freq_val,rad_freq_eol,no_alt,OBJ(int,1),0,65535,
+ "Enter the ARFCN number");
+
+NVGENS (rad_freq_val_nv,rad_freq_val,transceiver_parameters,TRX_RADIO_FREQUENCY);
+
+NOPREFIX (rad_freq_val_no,rad_freq_val_nv,rad_freq_eol);
+
+KEYWORD (trx_rad_freq,rad_freq_val_no,no_alt,"radio-frequency",
+ "ARFCN assigned to the transceiver",PRIV_CONF);
+
+/*
+ * radio-carrier transmit-power-reduction <value>
+ */
+
+EOLS (pwr_red_eol,transceiver_parameters,TRX_POWER_REDUCTION);
+
+NUMBER (pwr_red_val,pwr_red_eol,no_alt,OBJ(int,1),0,6,
+ "Enter the power value");
+NVGENS (pwr_red_val_nv,pwr_red_val,transceiver_parameters,TRX_POWER_REDUCTION);
+
+NOPREFIX (pwr_red_val_no,pwr_red_val_nv,pwr_red_eol);
+
+KEYWORD (trx_pwr_red,pwr_red_val_no,trx_rad_freq,"transmit-power-reduction",
+ "Max transmit power reduced from peak power",PRIV_CONF);
+
+/*
+ * radio-carrier
+ */
+KEYWORD (cfg_radio_carrier,trx_pwr_red,no_alt,"radio-carrier",
+ "Radio configuration parameters",PRIV_CONF);
+
+/*
+ * channel-table <time-slot> channel-combination TCH-FULL training-sequence USE-BCC
+ * administration-state {locked | unlocked | shutting-down}
+ */
+
+EOLS (trx_admin_state_eol,transceiver_parameters,TRX_CHANNEL_TABLE);
+
+KEYWORD_OPTIONS (admin_state_opt,trx_admin_state_eol,no_alt,admin_state_options,
+ OBJ(int,2),PRIV_CONF,0);
+
+KEYWORD (trx_admin_state,admin_state_opt,no_alt,"administrative-state",
+ "State in which to place channel",PRIV_CONF);
+
+NOPREFIX (trx_admin_state_no,trx_admin_state,trx_admin_state_eol);
+
+KEYWORD (seq_opt,trx_admin_state_no,no_alt,"USE-BCC",
+ "Use BTS color code",PRIV_CONF);
+
+KEYWORD (training_seq,seq_opt,no_alt,"training-sequence",
+ "Training sequence code (TSC) for the channel",PRIV_CONF);
+
+KEYWORD_ID(combn_opt_tch,training_seq,no_alt,OBJ(int,3),TCH_FULL,"TCH-FULL",
+ "Full rate traffic channel",PRIV_CONF);
+
+KEYWORD_ID(combn_opt_bcch,training_seq,no_alt,OBJ(int,3),BCCH_COMBINED,
+ "BCCH-COMBINED", "Common control channel",PRIV_CONF);
+
+IFELSE (chan_combn_chk,combn_opt_bcch,combn_opt_tch,
+ (((int) GETOBJ(udb,current1) == 0) && (GETOBJ(int,1) == 0)));
+
+KEYWORD (chan_combn,chan_combn_chk,no_alt,"channel-combination",
+ "Channel combination",PRIV_CONF);
+
+NUMBER (time_slot_trx,chan_combn,no_alt,OBJ(int,1),0,7,
+ "Enter the time slot");
+
+NVGENS (time_slot_trx_nv,time_slot_trx,transceiver_parameters,TRX_CHANNEL_TABLE);
+
+KEYWORD (channel_table,time_slot_trx_nv,cfg_radio_carrier,"channel-table",
+ "Channel configurations",PRIV_CONF);
+
+/*
+ *administrative-state {locked | unlocked | shutting-down}
+ */
+
+EOLS (admin_state_eol,transceiver_parameters,TRX_ADMIN_STATE);
+
+KEYWORD_OPTIONS (admin_state,admin_state_eol,no_alt,admin_state_options,
+ OBJ(int,1),PRIV_CONF,0);
+NVGENS (admin_state_nv,admin_state,transceiver_parameters,TRX_ADMIN_STATE);
+
+NOPREFIX (admin_state_no,admin_state_nv,admin_state_eol);
+
+KEYWORD (cfg_admin_state,admin_state_no,channel_table,"administrative-state",
+ "State in which to place GP10",PRIV_CONF);
+
+
+/*
+ * bts-cell-allocation <number>
+ */
+
+EOLS (arfcn_eol,transceiver_parameters,TRX_ARFCN_NUMBER);
+
+NUMBER (arfcn_val,arfcn_eol,no_alt,OBJ(int,1),0,1023,
+ "Enter the number");
+NVGENS (arfcn_val_nv,arfcn_val,transceiver_parameters,TRX_ARFCN_NUMBER);
+
+NOPREFIX (arfcn_val_no,arfcn_val_nv,arfcn_eol);
+
+KEYWORD (cfg_transceiver,arfcn_val_no,cfg_admin_state,"bts-cell-allocation",
+ "ARFCN allocated and assigned to the cell",PRIV_CONF);
+
+
+
+#undef ALTERNATE
+#define ALTERNATE cfg_transceiver
diff --git a/data/mnet/GP10/Host/cli/include/cfg_trx_exit.h b/data/mnet/GP10/Host/cli/include/cfg_trx_exit.h
new file mode 100644
index 0000000..7a83787
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/cfg_trx_exit.h
@@ -0,0 +1,11 @@
+EOLS (gp10_cell_trx_end_eol,exit_config_command,CMD_END);
+
+KEYWORD (gp10_cell_trx_end,gp10_cell_trx_end_eol,no_alt,"end",
+ "Exit gp10 config-trx mode to exec mode",PRIV_CONF);
+
+EOLNS (gp10_cell_trx_exit_eol,gp10_cell_sub_config_exit);
+KEYWORD (gp10_cell_trx_exit, gp10_cell_trx_exit_eol, gp10_cell_trx_end, "exit",
+ "Exit gp10 config-trx mode", PRIV_CONF);
+
+#undef ALTERNATE
+#define ALTERNATE gp10_cell_trx_exit
diff --git a/data/mnet/GP10/Host/cli/include/cfg_voip.h b/data/mnet/GP10/Host/cli/include/cfg_voip.h
new file mode 100644
index 0000000..79b9a4d
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/cfg_voip.h
@@ -0,0 +1,88 @@
+
+/*
+ * enum for command identification
+ */
+
+enum {
+ COUNTRY_CODE,
+ CALL_SIG_PORT_NUM,
+ GMC_IP_ADDR,
+ GMC_PORT_NUM
+};
+
+
+/*
+ *voip t35-country-code <country-code>
+ */
+
+EOLS (country_code_eol,voip_parameters,COUNTRY_CODE);
+
+NUMBER (country_code,country_code_eol,no_alt,OBJ(int,1),1,999,
+ "Enter country code");
+
+NVGENS (country_code_nv,country_code,voip_parameters,COUNTRY_CODE);
+
+NOPREFIX (country_code_no,country_code_nv,country_code_eol);
+
+KEYWORD (t35_country_code,country_code_no,no_alt,"t35-country-code",
+ "H.323 country code in decimal.Changes will be effective after the reboot of GP10",PRIV_CONF);
+
+
+/*
+ *voip call-signalling-port <port-num>
+ */
+
+EOLS (call_sig_port_eol,voip_parameters,CALL_SIG_PORT_NUM);
+
+NUMBER (call_sig_port_num,call_sig_port_eol,no_alt,OBJ(int,1),1,65536,
+ "Port number");
+
+NVGENS (call_sig_port_num_nv,call_sig_port_num,voip_parameters,CALL_SIG_PORT_NUM);
+
+NOPREFIX (call_sig_port_num_no,call_sig_port_num_nv,call_sig_port_eol);
+
+KEYWORD (call_sig_port,call_sig_port_num_no,t35_country_code,"call-signalling-port",
+ "Configure port used for call setup and tear down.Changes will be effective after the reboot of GP10",PRIV_CONF);
+
+/*
+ * voip gmc-ip-address <ip-address>
+ */
+
+EOLS (gmc_ip_addr_eol,voip_parameters,GMC_IP_ADDR);
+
+IPADDR (gmc_ip_addr,gmc_ip_addr_eol,no_alt,OBJ(paddr,1),"IP address of GMC");
+
+NVGENS (gmc_ip_addr_nv,gmc_ip_addr,voip_parameters,GMC_IP_ADDR);
+
+NOPREFIX (gmc_ip_addr_no,gmc_ip_addr_nv,gmc_ip_addr_eol);
+
+KEYWORD (gmc_ip,gmc_ip_addr_no,call_sig_port,"gmc-ip-address",
+ "Configure IP address of GMC.Changes will be effective after the reboot of GP10",PRIV_CONF);
+
+
+/*
+ * voip gmc-port <port-num>
+ */
+
+EOLS (gmc_port_eol,voip_parameters,GMC_PORT_NUM);
+
+NUMBER (gmc_port_num,gmc_port_eol,no_alt,OBJ(int,1),1,65536,
+ "Port number");
+
+NVGENS (gmc_port_num_nv,gmc_port_num,voip_parameters,GMC_PORT_NUM);
+
+NOPREFIX (gmc_port_num_no,gmc_port_num_nv,gmc_port_eol);
+
+
+KEYWORD (gmc_port,gmc_port_num_no,gmc_ip,"gmc-port",
+ "Port number on which the GMC is listening for GP10 traffic.Changes will be effective after the reboot of GP10",PRIV_CONF);
+
+/*
+ * voip
+ */
+
+KEYWORD (cfg_voip_parm,gmc_port,no_alt,"voip",
+ "Configure Voice Over IP Parameters",PRIV_CONF);
+
+#undef ALTERNATE
+#define ALTERNATE cfg_voip_parm
diff --git a/data/mnet/GP10/Host/cli/include/exec_debug_gp10.h b/data/mnet/GP10/Host/cli/include/exec_debug_gp10.h
new file mode 100644
index 0000000..55f0eb6
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/exec_debug_gp10.h
@@ -0,0 +1,212 @@
+#define DBG_LOG_CONTROL_TRACE_MASK 0x0008
+#define DBG_LOG_CALL_TRACE_MASK 0x0010
+#define DBG_LOG_INFORMATIONAL_MASK 0x0020
+#define DBG_LOG_WARNINGS_MASK 0x0040
+#define DBG_LOG_ERRORS_MASK 0x0080
+#define DBG_LOG_TIMESTAMP_MASK 0x0100
+#define DBG_LOG_ALL_TRACE_MASK 0x00f8
+
+
+/*
+ * Inverse masks
+ */
+#define DBG_LOG_CONTROL_TRACE_INVERSE_MASK 0xfff7
+#define DBG_LOG_CALL_TRACE_INVERSE_MASK 0xffef
+#define DBG_LOG_INFORMATIONAL_INVERSE_MASK 0xffdf
+#define DBG_LOG_WARNINGS_INVERSE_MASK 0xffbf
+#define DBG_LOG_ERRORS_INVERSE_MASK 0xff7f
+#define DBG_LOG_ALL_TRACE_INVERSE_MASK 0xff07
+
+
+/*
+ * Enum for Module Identification.
+ * Imported from gp10/Host/Common_to_host/Logging/VcModules.h
+ */
+
+enum {
+
+ DBG_CC_LAYER = 0, /* Value for DBG_CC_LAYER are from 0 to 24 */
+ DBG_CC_SESSION_LAYER = 1, /* CC Session sub layer */
+ DBG_CC_CALLLEG_LAYER = 2, /* CC Call Leg sub layer */
+ DBG_CC_CISS_LAYER = 3, /* CC CISS sub layer */
+ DBG_CC_HALFCALL_LAYER = 4, /* CC Half Call sub layer */
+ DBG_CC_HANDOVER_LAYER = 5, /* CC Handover sub layer */
+ DBG_CC_SMS_LAYER = 6, /* CM SMS sublayer */
+
+
+ DBG_CSU_LAYER = 25, /* Value for CSU_LAYER are from 25 to 49 */
+ DBG_CSU_LAYER_SPEECH = 26,
+ DBG_CSU_LAYER_DEBUG = 27,
+
+ DBG_DSP_LAYER = 50, /* Value for DSP_LAYER are from 50 to 74 */
+
+ DBG_H323_LAYER = 75, /* Value for H323_LAYER are from 75 to 99 */
+ DBG_H323_PROTOCOL_LAYER = 76,
+ DBG_H323_RTP_LAYER = 77,
+ DBG_VBLINK_LAYER = 80,
+
+ DBG_LOGGING_LAYER = 99, /* Logging layer just needs one */
+
+ DBG_JCC_LAYER = 100, /* Value for JCC_LAYER are from 100 to 124 */
+
+ DBG_CDR_LAYER = 110,
+
+ DBG_L1PROXY_LAYER = 125, /* Value for L1PROXY_LAYER are from 125 to 149 */
+
+ DBG_LAPDM_LAYER = 150, /* Value for LAPDM_LAYER are from 150 to 174 */
+
+ DBG_MM_LAYER = 175, /* Value for DBG_MM_LAYER are from 175 to 199 */
+ DBG_MM_MSG_LAYER = 176,
+ DBG_MM_TABLE_LAYER = 177,
+ DBG_MM_GENERAL_LAYER = 178,
+ DBG_MM_DETAIL_LAYER = 179,
+
+ DBG_RIL3_LAYER = 200, /* Value for RIL3_LAYER are from 200 to 224 */
+
+ DBG_RM_LAYER = 225, /* Value for RM_LAYER are from 225 to 249 */
+
+ DBG_LUDB_LAYER = 250, /* Value for LUDB_LAYER are from 250 to 274 */
+ DBG_LUDB_MSG_LAYER = 251,
+ DBG_LUDB_TABLE_LAYER = 252,
+ DBG_LUDB_GENERAL_LAYER = 253,
+ DBG_LUDB_DETAIL_LAYER = 254,
+
+ DBG_MAINT_COMM_HDLR = 275, /* Value for MAINT_COMM_HDLR are from 275 to 299 */
+ DBG_DIAG_TEST = 276,
+ DBG_DSP_DIAGS = 277,
+
+ DBG_PM_LAYER = 299, /* PM_LAYER needs only one module */
+ DBG_ALARM_LAYER = 300, /* Alarm layer 300 to 310 */
+ DBG_L3_MS_TRACE = 325,
+
+
+ DBG_RLC_MAC = 350, /* RLC_MAC LAYER */
+ DBG_RLC_MAC_MSG = 351,
+ DBG_RLC_MAC_MSG_DETAIL = 352,
+#if 0
+ /*
+ * The following were commented because
+ * they have been added later into the development
+ * and not present in GP1_5_13_BLD
+ */
+ DBG_RLC_MAC_INTF = 353,
+ DBG_RLC_MAC_RLC_LINK = 354,
+
+ DBG_GRR_LAYER = 400,
+ DBG_GRR_LAYER_INIT = 401,
+ DBG_GRR_LAYER_OAM = 402,
+ DBG_GRR_LAYER_DSP = 403,
+ DBG_GRR_LAYER_ALARM = 404,
+ DBG_GRR_LAYER_INTF = 405,
+ DBG_GRR_LAYER_PROC = 406,
+
+
+ DBG_BSSGP_LAYER = 425,
+ DBG_BSSGP_ENCODER_LAYER = 426,
+ DBG_BSSGP_DECODER_LAYER = 427,
+ DBG_BSSGP_NET_LAYER = 428,
+ DBG_BSSGP_UNITDATA_LAYER = 429,
+#endif
+ DBG_SSH_MODULE = 460,
+
+ MAX_VIPERCELL_MODULES = 500,
+ GP10_DEBUG_ALL =1000
+
+
+};
+
+/*
+ * gp10 debug options
+ */
+
+static keyword_options gp10_debug [] = {
+ {"cc_session_layer","Debug cc sesseion sub layer",DBG_CC_SESSION_LAYER},
+ {"cc_callleg_layer","Debug cc call leg sub layer",DBG_CC_CALLLEG_LAYER},
+ {"cc_ciss_layer","Debug cc CISS sub layer",DBG_CC_CISS_LAYER},
+ {"cc_halfcall_layer","Debug cc Half call sub layer",DBG_CC_HALFCALL_LAYER },
+ {"cc_handover_layer","Debug cc handover sub layer",DBG_CC_HANDOVER_LAYER},
+ {"cc_sms_layer","Debug cc SMS sub layer",DBG_CC_SMS_LAYER},
+ {"csu_layer_speech","Debug CSU layer speech",DBG_CSU_LAYER_SPEECH},
+ {"csu_layer_debug","Debug CSU layer",DBG_CSU_LAYER_DEBUG},
+ {"h323_protocol_layer","Debug H323 protocol layer",DBG_H323_PROTOCOL_LAYER},
+ {"h323_rtp_layer","Debug H323 rtp layer",DBG_H323_RTP_LAYER},
+ {"vblink_layer","Debug vblink layer",DBG_VBLINK_LAYER},
+ {"mm_msg_layer","Debug MM message layer",DBG_MM_MSG_LAYER},
+ {"mm_table_layer","Debug MM table layer",DBG_MM_TABLE_LAYER},
+ {"mm_general_layer","Debug MM general layer",DBG_MM_GENERAL_LAYER},
+ {"mm_detail_layer","Debug MM detail layer",DBG_MM_DETAIL_LAYER},
+ {"rlc_mac_msg","Debug RLC MAC messages",DBG_RLC_MAC_MSG},
+ {"rlc_mac_msg_detail","Debug RLC MAC message detail",DBG_RLC_MAC_MSG_DETAIL},
+#if 0
+ {"rlc_mac_intf","Debug RLC MAC interface",DBG_RLC_MAC_INTF},
+ {"rlc_mac_rlc_link","Debug RLC MAC link",DBG_RLC_MAC_RLC_LINK},
+ {"grr_layer_init","Debug GRR initialisation layer",DBG_GRR_LAYER_INIT},
+ {"grr_layer_oam","Debug GRR OAM layer",DBG_GRR_LAYER_OAM},
+ {"grr_layer_dsp","Debug GRR DSP layer",DBG_GRR_LAYER_DSP},
+ {"grr_layer_alarm","Debug GRR alarm layer",DBG_GRR_LAYER_ALARM},
+ {"grr_layer_intf","Debug GRR interface layer",DBG_GRR_LAYER_INTF},
+ {"grr_layer_proc","Debug GRR process",DBG_GRR_LAYER_PROC},
+#endif
+ {"ludb_msg_layer","Debug LUDB messages layer",DBG_LUDB_MSG_LAYER},
+ {"ludb_table_layer","Debug LUDB table layer",DBG_LUDB_TABLE_LAYER },
+ {"ludb_general_layer","Debug LUDB general layer",DBG_LUDB_GENERAL_LAYER },
+ {"ludb_detail_layer","Debug LUDB detail layer",DBG_LUDB_DETAIL_LAYER},
+#if 0
+ {"bssgp_encoder_layer","Debug BSSGP encoder layer",DBG_BSSGP_ENCODER_LAYER},
+ {"bssgp_decoder_layer","Debug BSSGP decoder layer",DBG_BSSGP_DECODER_LAYER},
+ {"bssgp_net_layer","Debug BSSGP network layer",DBG_BSSGP_NET_LAYER},
+ {"bssgp_unitdata_layer","Debug BSSGP unitdata layer",DBG_BSSGP_UNITDATA_LAYER},
+#endif
+ {"logging_layer","Debug loggin layer",DBG_LOGGING_LAYER},
+ {"jcc_layer","Debug jcc layer",DBG_JCC_LAYER },
+ {"cdr_layer","Debug cdr layer",DBG_CDR_LAYER },
+ {"l1proxy_layer","Debug L1 Proxy layer",DBG_L1PROXY_LAYER},
+ {"lapdm_layer","Debug lapdm layer",DBG_LAPDM_LAYER},
+ {"ril3_layer","Debug RIL3 layer",DBG_RIL3_LAYER},
+ {"rm_layer","Debug RM Layer",DBG_RM_LAYER},
+ {"maint_cmd_handler","Debug maintenance command handler",DBG_MAINT_COMM_HDLR},
+ {"diagnostic_test","Debug diagnostic tests",DBG_DIAG_TEST},
+ {"dsp_diags","Debug DSP diagnostics",DBG_DSP_DIAGS},
+ {"pm_layer","Debug performance management (PM) layer",DBG_PM_LAYER},
+ {"alarm_layer","Debug ALARM layer",DBG_ALARM_LAYER},
+ {"l3_ms_trace","Debug layer3 messages",DBG_L3_MS_TRACE},
+ {"all","Enable debugging for all",GP10_DEBUG_ALL},
+ {NULL,NULL,0}
+};
+
+enum {
+ DBG_FUNC_LOG,
+ DBG_CALL_LOG,
+ DBG_MSG_LOG,
+ DBG_WARN_LOG,
+ DBG_ERR_LOG,
+ DBG_ALL_LOG,
+ DBG_TIMESTAMP_LOG
+};
+
+
+static keyword_options gp10_debug_options [] = {
+ {"function","Function tracing required",DBG_FUNC_LOG},
+ {"call","Call tracing required",DBG_CALL_LOG},
+ {"message","Message tracing required",DBG_MSG_LOG},
+ {"warning","Log only warings",DBG_WARN_LOG},
+ {"error","Log only errors",DBG_ERR_LOG},
+ {"timestamp","Log with Timestamp",DBG_TIMESTAMP_LOG},
+ {"all","Turn on all log messages",DBG_ALL_LOG},
+ {NULL,NULL,0}
+};
+
+EOLNS (gp10_debug_eol,gp10_debug_command);
+pdecl(gp10_debug_opt);
+
+FUNC(gp10_debug_flag_func,gp10_debug_opt,set_gp10_debug_flag);
+
+KEYWORD_OPTIONS(gp10_debug_opt,gp10_debug_flag_func,gp10_debug_eol,gp10_debug_options,OBJ(int,2),
+ PRIV_CONF,0);
+
+KEYWORD_OPTIONS(exec_debug_gp10,gp10_debug_opt,no_alt,gp10_debug,OBJ(int,1),
+ PRIV_CONF,0);
+
+
+#undef ALTERNATE
+#define ALTERNATE exec_debug_gp10
diff --git a/data/mnet/GP10/Host/cli/include/exec_diag_cmd.h b/data/mnet/GP10/Host/cli/include/exec_diag_cmd.h
new file mode 100644
index 0000000..195b32a
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/exec_diag_cmd.h
@@ -0,0 +1,363 @@
+
+#define VERBOSE 0
+#define NO_VERBOSE 1
+#define TYPE_TEST_ALLMEM 3
+#define TYPE_INCR_MEM 4
+#define TYPE_ALL_MEM 7
+#define HALT_ON_ERROR 10
+
+enum {
+ DIAG_CFTEST_CMD,
+ DIAG_STOPDIAG_CMD,
+ DIAG_I2CLOOPBACK_CMD,
+ DIAG_I2CTEST_CMD,
+ DIAG_IFREPORT_CMD,
+ DIAG_MSREPORT_CMD,
+ DIAG_HPIMEMACCESS_CMD,
+ DIAG_HPIECHOTEST_CMD,
+ DIAG_HOREPORT_CMD,
+ DIAG_FPGATEST_CMD,
+ DIAG_DSPMEMTEST_CMD,
+ DIAG_DSPLOOPBACK_CMD,
+ DIAG_DSPEXTMEMTEST_CMD,
+ DIAG_DSPBBLBTEST_CMD,
+ DIAG_DLREPORT_CMD
+};
+
+
+enum {
+ TYPE_TEST_ALL = 0,
+ TYPE_WALK_ZERO,
+ TYPE_WALK_ONES,
+ TYPE_INCREMENT,
+ TYPE_INCR_COMP,
+ TYPE_RANDOM_PATTERN
+};
+
+
+enum {
+ TYPE_LOCAL_LOOP = 1,
+ TYPE_BASE_LOOP,
+ TYPE_IQ_LOOP,
+ TYPE_TCH_LOOP,
+ TYPE_TCHTOH_LOOP
+};
+
+
+enum {
+ TEST_DSP_1 = 1,
+ TEST_DSP_0,
+ TEST_DSP_ALL
+};
+
+
+static keyword_options verbose_options[] = {
+ { "verbose", "Display all error messages", VERBOSE},
+ { "no-verbose", "Display only final result", NO_VERBOSE},
+ {NULL,NULL,0}
+};
+
+
+
+static keyword_options extmemtest_type_options[] = {
+ { "0", "All", TYPE_TEST_ALL},
+ { "1", "Walk Zeroes", TYPE_WALK_ZERO},
+ { "2", "Walk Ones", TYPE_WALK_ONES},
+ { "3", "Increment", TYPE_INCREMENT},
+ { "4", "Increment and Complement", TYPE_INCR_COMP},
+ { "5", "Random pattern", TYPE_RANDOM_PATTERN},
+ {NULL,NULL,0}
+};
+
+
+static keyword_options loopback_type_options[] = {
+ { "1", "Create a local loopback", TYPE_LOCAL_LOOP},
+ { "2", "Create a baseband loopback", TYPE_BASE_LOOP},
+ { "3", "Create an IQ loopback", TYPE_IQ_LOOP},
+ { "4", "Create a TCH loopback", TYPE_TCH_LOOP},
+ { "5", "Creae a TCH-to-host loopback", TYPE_TCHTOH_LOOP},
+ {NULL,NULL,0}
+};
+
+
+static keyword_options memtest_type_options[] = {
+ { "1", "Walk Zeroes", TYPE_WALK_ZERO},
+ { "2", "Walk Ones", TYPE_WALK_ONES},
+ { "3", "All", TYPE_TEST_ALLMEM},
+ {NULL,NULL,0}
+};
+
+static keyword_options echotest_type_options[] = {
+ { "10", "Test dsp 0 only", TEST_DSP_0},
+ { "01", "Test dsp 1 only", TEST_DSP_1},
+ { "11", "Test both dsp 0 and 1", TEST_DSP_ALL},
+ {NULL,NULL,0}
+};
+
+static keyword_options memaccess_type_options[] = {
+ { "1", "Walk Zeroes", TYPE_WALK_ZERO},
+ { "2", "Walk Ones", TYPE_WALK_ONES},
+ { "4", "Incrmenting memory locations", TYPE_INCR_MEM},
+ { "7", "All", TYPE_ALL_MEM},
+ {NULL,NULL,0}
+};
+
+static keyword_options halt_on_error[] = {
+ { "haltonerror", "To stop the diagnostic on error", HALT_ON_ERROR},
+ {NULL,NULL,0}
+};
+
+
+EOLS (stopdiag_eol,diagnostic_cmds,DIAG_STOPDIAG_CMD);
+
+STRING (stopdiag_name,stopdiag_eol,no_alt,OBJ(string,1),
+ "Name of the diagnostic to stop");
+
+KEYWORD (diag_stopdiag,stopdiag_name,no_alt,"stopdiag",
+ "Stop a diagnostic test",PRIV_ROOT);
+
+
+EOLS (diag_i2cloopback_eol,diagnostic_cmds,DIAG_I2CLOOPBACK_CMD);
+
+KEYWORD_OPTIONS (diag_i2cloopback_halt,diag_i2cloopback_eol,diag_i2cloopback_eol,
+ halt_on_error,OBJ(int,4),PRIV_ROOT,0);
+
+KEYWORD_OPTIONS(i2cloopback_verb,diag_i2cloopback_halt,diag_i2cloopback_eol,verbose_options,
+ OBJ(int,3),PRIV_ROOT,0);
+
+NUMBER (diag_i2cloopback_durnum,i2cloopback_verb,no_alt,OBJ(int,2),
+ 0,255,"Number of seconds");
+
+KEYWORD (diag_i2cloopback_dur,diag_i2cloopback_durnum,diag_i2cloopback_eol,
+ "duration","Number of seconds to run the test",PRIV_ROOT);
+
+NUMBER (diag_i2cloopback_num,diag_i2cloopback_dur,no_alt,OBJ(int,1),
+ 0,65535,"Number of bytes");
+
+KEYWORD (diag_i2cloopback_nob,diag_i2cloopback_num,diag_i2cloopback_eol,
+ "number-of-bytes","Number of bytes to send in loopback",PRIV_ROOT);
+
+KEYWORD (diag_i2cloopback,diag_i2cloopback_nob,no_alt,"i2cloopback",
+ "To run i2cloopback diagnostic",PRIV_ROOT | PRIV_HIDDEN);
+
+
+
+EOLS (i2ctest_eol,diagnostic_cmds,DIAG_I2CTEST_CMD);
+
+KEYWORD (diag_i2ctest,i2ctest_eol,diag_i2cloopback,"i2ctest",
+ "To run the i2ctest diagnostic",PRIV_ROOT | PRIV_HIDDEN);
+
+
+EOLS (msreport_eol,diagnostic_cmds,DIAG_MSREPORT_CMD);
+
+NUMBER (msreport_duration,msreport_eol,msreport_eol,OBJ(int,3),0,255,
+ "Number of seconds to run");
+
+NUMBER (msreport_trx1_mask,msreport_duration,no_alt,OBJ(int,2),0,255,
+ "Mask ot time slots on the first transceiver");
+
+NUMBER (msreport_trx0_mask,msreport_trx1_mask,no_alt,OBJ(int,1),0,255,
+ "Mask ot time slots on the first transceiver");
+
+KEYWORD (diag_msreport,msreport_trx0_mask,diag_i2ctest,"msreport",
+ "To run the MS Report diagnostic",PRIV_ROOT);
+
+
+EOLS (ifreport_eol,diagnostic_cmds,DIAG_IFREPORT_CMD);
+
+NUMBER (ifreport_duration,ifreport_eol,ifreport_eol,OBJ(int,3),0,255,
+ "Number of seconds to run");
+
+NUMBER (ifreport_trx1_mask,ifreport_duration,no_alt,OBJ(int,2),0,255,
+ "Mask ot time slots on the first transceiver");
+
+NUMBER (ifreport_trx0_mask,ifreport_trx1_mask,no_alt,OBJ(int,1),0,255,
+ "Mask ot time slots on the first transceiver");
+
+KEYWORD (diag_ifreport,ifreport_trx0_mask,diag_msreport,"ifreport",
+ "To run the IF report diagnostic ",PRIV_ROOT);
+
+
+
+EOLS (hpimemaccess_eol,diagnostic_cmds,DIAG_HPIMEMACCESS_CMD);
+
+KEYWORD_OPTIONS(hpimemaccess_verb,hpimemaccess_eol,hpimemaccess_eol,verbose_options,
+ OBJ(int,3),PRIV_ROOT,0);
+
+KEYWORD_OPTIONS(hpimemaccess_type,hpimemaccess_verb,no_alt,memaccess_type_options,
+ OBJ(int,2),PRIV_ROOT,0);
+
+NUMBER (hpimemaccess_dsp,hpimemaccess_type,no_alt,OBJ(int,1),0,1,
+ "Transceiver to test");
+
+KEYWORD (diag_hpimemaccess,hpimemaccess_dsp,diag_ifreport,"hpimemoryaccess",
+ "Run a diagnostic against the transmit and receive memory used for HPI transfers on the CDC",PRIV_ROOT | PRIV_HIDDEN);
+
+
+
+EOLS (hpiechotest_eol,diagnostic_cmds,DIAG_HPIECHOTEST_CMD);
+
+KEYWORD_OPTIONS(hpiechotest_verb,hpiechotest_eol,hpiechotest_eol,verbose_options,
+ OBJ(int,5),PRIV_ROOT,0);
+
+NUMBER (hpiechotest_switch,hpiechotest_verb,no_alt,OBJ(int,4),0,255,
+ "0-permit dsp task switching, 1 or higher - prohibit dsp task switching");
+
+NUMBER (hpiechotest_num_ticks,hpiechotest_switch,no_alt,OBJ(int,3),1,255,
+ "Number of clock ticks to between each group of messages");
+
+NUMBER (hpiechotest_num_msg,hpiechotest_num_ticks,no_alt,OBJ(int,2),1,10,
+ "Number of messages to send in each burst");
+
+KEYWORD_OPTIONS(hpiechotest_combo,hpiechotest_num_msg,no_alt,echotest_type_options,
+ OBJ(int,1),PRIV_ROOT,0);
+
+KEYWORD (diag_hpiechotest,hpiechotest_combo,diag_hpimemaccess,"hpiechotest",
+ "Command to send test messages to the DSPs",PRIV_ROOT | PRIV_HIDDEN);
+
+
+
+EOLS (horeport_eol,diagnostic_cmds,DIAG_HOREPORT_CMD);
+
+NUMBER (horeport_duration,horeport_eol,horeport_eol,OBJ(int,3),0,255,
+ "Number of seconds to run");
+
+NUMBER (horeport_trx1_mask,horeport_duration,no_alt,OBJ(int,2),0,255,
+ "Mask ot time slots on the first transceiver");
+
+NUMBER (horeport_trx0_mask,horeport_trx1_mask,no_alt,OBJ(int,1),0,255,
+ "Mask ot time slots on the first transceiver");
+
+KEYWORD (diag_horeport,horeport_trx0_mask,diag_hpiechotest,"horeport",
+ "Test to determine whether handoff is required",PRIV_ROOT);
+
+
+
+
+
+
+EOLS (fpgatest_eol,diagnostic_cmds,DIAG_FPGATEST_CMD);
+
+KEYWORD_OPTIONS(fpgatest_verb,fpgatest_eol,fpgatest_eol,verbose_options,
+ OBJ(int,1),PRIV_ROOT,0);
+
+KEYWORD (diag_fpgatest,fpgatest_verb,diag_horeport,"fpgatest",
+ "Command to check FPGA 0 and FPGA 1 ",PRIV_ROOT | PRIV_HIDDEN);
+
+
+
+
+EOLS (dspmemtest_eol,diagnostic_cmds,DIAG_DSPMEMTEST_CMD);
+
+KEYWORD_OPTIONS(dspmemtest_verb,dspmemtest_eol,dspmemtest_eol,verbose_options,
+ OBJ(int,4),PRIV_ROOT,0);
+
+NUMBER (dspmemtest_duration,dspmemtest_verb,dspmemtest_eol,OBJ(int,3),0,255,
+ "Time to run the test");
+
+KEYWORD_OPTIONS(dspmemtest_type,dspmemtest_duration,no_alt,memtest_type_options,
+ OBJ(int,2),PRIV_ROOT,0);
+
+NUMBER (dspmemtest_dsp,dspmemtest_type,no_alt,OBJ(int,1),0,1,
+ "Transceiver to test");
+
+KEYWORD (diag_dspmemtest,dspmemtest_dsp,diag_fpgatest,"dspmemtest",
+ "Test both the data and external RAM ",PRIV_ROOT | PRIV_HIDDEN);
+
+
+
+
+
+EOLS (dsploopback_eol,diagnostic_cmds,DIAG_DSPLOOPBACK_CMD);
+
+NUMBER (dsploopback_duration,dsploopback_eol,dsploopback_eol,OBJ(int,3),0,255,
+ "Time to run the test");
+
+KEYWORD_OPTIONS(dsploopback_type,dsploopback_duration,no_alt,loopback_type_options,
+ OBJ(int,2),PRIV_ROOT,0);
+
+NUMBER (dsploopback_dsp,dsploopback_type,no_alt,OBJ(int,1),0,1,
+ "Transceiver to test");
+
+
+KEYWORD (diag_dsploopback,dsploopback_dsp,diag_dspmemtest,"dsploopback",
+ "Set loopbacks in the dsp ",PRIV_ROOT | PRIV_HIDDEN);
+
+
+
+
+EOLS (dspextmemtest_eol,diagnostic_cmds,DIAG_DSPEXTMEMTEST_CMD);
+
+KEYWORD_OPTIONS(dspextmemtest_verb,dspextmemtest_eol,dspextmemtest_eol,verbose_options,
+ OBJ(int,3),PRIV_ROOT,0);
+
+KEYWORD_OPTIONS(dspextmemtest_type,dspextmemtest_verb,no_alt,extmemtest_type_options,
+ OBJ(int,2),PRIV_ROOT,0);
+
+NUMBER (dspextmemtest_dsp,dspextmemtest_type,no_alt,OBJ(int,1),0,1,
+ "Transceiver to test");
+
+KEYWORD (diag_dspextmemtest,dspextmemtest_dsp,diag_dsploopback,"dspextmemtest",
+ "Start the dsp external memory test",PRIV_ROOT | PRIV_HIDDEN);
+
+
+
+EOLS (dspbblbtest_eol,diagnostic_cmds,DIAG_DSPBBLBTEST_CMD);
+
+KEYWORD_OPTIONS(dspbblbtest_verb,dspbblbtest_eol,dspbblbtest_eol,verbose_options,
+ OBJ(int,5),PRIV_ROOT,0);
+
+NUMBER (dspbblbtest_gain,dspbblbtest_verb,no_alt,OBJ(int,4),0,7,
+ "The gain shift");
+
+NUMBER (dspbblbtest_frequency,dspbblbtest_gain,no_alt,OBJ(int,3),0,7,
+ "Index of the frequency to be tested");
+
+NUMBER (dspbblbtest_destination,dspbblbtest_frequency,no_alt,OBJ(int,2),0,1,
+ "Destination transceiver");
+
+NUMBER (dspbblbtest_source,dspbblbtest_destination,no_alt,OBJ(int,1),0,1,
+ "Source transceiver");
+
+KEYWORD (diag_dspbblbtest,dspbblbtest_source,diag_dspextmemtest,"dspbblbtest",
+ "Start the DSP baseband loopback test",PRIV_ROOT | PRIV_HIDDEN);
+
+
+
+EOLS (dlreport_eol,diagnostic_cmds,DIAG_DLREPORT_CMD);
+
+NUMBER (dlreport_duration,dlreport_eol,dlreport_eol,OBJ(int,3),0,255,
+ "Number of seconds to run");
+
+NUMBER (dlreport_trx1_mask,dlreport_duration,no_alt,OBJ(int,2),0,255,
+ "Mask ot time slots on the first transceiver");
+
+NUMBER (dlreport_trx0_mask,dlreport_trx1_mask,no_alt,OBJ(int,1),0,255,
+ "Mask ot time slots on the first transceiver");
+
+KEYWORD (diag_dlreport,dlreport_trx0_mask,diag_dspbblbtest,"dlreport",
+ "Display the downlink power level and quality",PRIV_ROOT);
+
+
+
+
+EOLS (cftest_eol,diagnostic_cmds,DIAG_CFTEST_CMD);
+
+NUMBER (cftest_repeat,cftest_eol,cftest_eol,OBJ(int,1),1,255,
+ "Number of times to repeat");
+
+KEYWORD (diag_cftest,cftest_repeat,diag_dlreport,"cftest",
+ "Test the compact flash interface",PRIV_ROOT | PRIV_HIDDEN);
+
+
+KEYWORD(exec_diag, diag_cftest,diag_stopdiag,
+ "startdiag", "Run a diagnostic test", PRIV_ROOT);
+
+#undef ALTERNATE
+#define ALTERNATE exec_diag
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/cli/include/exec_module.h b/data/mnet/GP10/Host/cli/include/exec_module.h
new file mode 100644
index 0000000..58eae5f
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/exec_module.h
@@ -0,0 +1,192 @@
+/*
+ * enum for command identification
+ */
+
+enum {
+ MIB_FILE,
+ CDR_SWITCH,
+ CDR_STATUS,
+ CHECK_EEPROM,
+ WRITE_EEPROM,
+ READ_EEPROM,
+ MIB_IMPORT,
+ MIB_EXPORT,
+ SNMP_SET_MIB,
+ SNMP_GET_MIB,
+ MIB_TYPE_INT,
+ MIB_TYPE_STR,
+ SNMP_MIB_LKUP,
+};
+
+
+static keyword_options mib_options[] = {
+ {"import","Import a mib file.Enter the complete directory path",MIB_IMPORT},
+ {"export","Export a mib file.Enter the complete directory path",MIB_EXPORT},
+ {NULL,NULL,0}
+};
+
+static keyword_options mib_type[] = {
+ {"int","Integer type mib variable",MIB_TYPE_INT},
+ {"string","String type mib variable",MIB_TYPE_STR},
+ {NULL,NULL,0}
+};
+
+/*
+ * Clear voip call-stats
+ */
+EOLNS (exec_clear_eol,clearVoipCall);
+KEYWORD (exec_clear_voip_call_stats,exec_clear_eol,no_alt,
+ "call-stats","Clear voip call stats",PRIV_CONF);
+KEYWORD (exec_clear_chain_voip,exec_clear_voip_call_stats,no_alt,
+ "voip","Clear voip call stats",PRIV_CONF);
+
+/********/
+
+
+EOLS (snmp_lkup_eol,exec_module,SNMP_MIB_LKUP);
+
+STRING (snmp_mib_lkup_str,snmp_lkup_eol,no_alt,OBJ(string,1),
+ "Enter the mib tag");
+
+KEYWORD (snmp_mib_lkup,snmp_mib_lkup_str,no_alt,"lookup",
+ "Lookup a mib tag",PRIV_CONF);
+
+/*
+ *snmp mib set <tag> [<row>] { int | string }
+ */
+EOLS (mib_set_eol,exec_module,SNMP_SET_MIB);
+
+STRING (set_str_mib,mib_set_eol,no_alt,OBJ(string,2),
+ "Enter the string value of mib");
+
+NUMBER (set_int_mib,mib_set_eol,no_alt,OBJ(int,2),0,65535,
+ "Enter the integer value of mib");
+
+IFELSE (test_mib_type,set_int_mib,set_str_mib,(GETOBJ(int,1) == MIB_TYPE_INT));
+
+KEYWORD_OPTIONS (set_mib_type,test_mib_type,no_alt,mib_type,
+ OBJ(int,1),PRIV_CONF,0);
+
+NUMBER (set_mib_row,set_mib_type,set_mib_type,OBJ(int,3),0,255,
+ "Enter the index of the variable");
+
+STRING (set_mib_tag,set_mib_row,no_alt,OBJ(string,1),
+ "Enter the mib tag");
+
+KEYWORD (snmp_mib_set,set_mib_tag,snmp_mib_lkup,"set",
+ "Set value of a mib tag",PRIV_CONF);
+
+/*
+ *snmp mib get <tag> [<row>]
+ */
+EOLS (mib_get_eol,exec_module,SNMP_GET_MIB);
+
+NUMBER (get_mib_row,mib_get_eol,mib_get_eol,OBJ(int,2),0,255,
+ "Enter the index of the variable");
+
+STRING (get_mib_tag,get_mib_row,no_alt,OBJ(string,1),
+ "Enter the mib tag");
+
+KEYWORD (snmp_mib_get,get_mib_tag,snmp_mib_set,"get",
+ "Get value of a mib tag",PRIV_CONF);
+
+/*
+ * snmp mib {import | export} <filename>
+ */
+
+EOLS (mib_eol,exec_module,MIB_FILE);
+
+STRING (mib_file,mib_eol,no_alt,OBJ(string,1),
+ "Enter the mib file name with directory path");
+
+KEYWORD_OPTIONS (snmp_ex_or_im,mib_file,snmp_mib_get,mib_options,
+ OBJ(int,1),PRIV_CONF,0);
+
+/*
+ * snmp mib
+ */
+
+KEYWORD (snmp_mib,snmp_ex_or_im,no_alt,"mib",
+ "Mib Export/Import/Get/Set/Lookup operations",PRIV_CONF);
+
+/*
+ * snmp
+ */
+
+KEYWORD (snmp_mod,snmp_mib,no_alt,"snmp",
+ "Snmp module commands",PRIV_CONF);
+
+/*
+ *cdr switch-server <ip-address>
+ */
+
+EOLS (cdr_switch_eol,exec_module,CDR_SWITCH);
+
+IPADDR( cdr_ser_ip,cdr_switch_eol,no_alt,OBJ(paddr,1),
+ "Enter the ip address of cdr server");
+
+KEYWORD (cdr_switch,cdr_ser_ip,no_alt,"switch-server",
+ "Switch the CDR server",PRIV_CONF);
+
+
+/*
+ *cdr get-status
+ */
+
+EOLS (cdr_status_eol,exec_module,CDR_STATUS);
+
+KEYWORD (cdr_status,cdr_status_eol,cdr_switch,"get-status",
+ "Get status of cdr module",PRIV_CONF);
+
+
+
+/*
+ *cdr client
+ */
+
+KEYWORD (cdr_client_key,cdr_status,no_alt,"client",
+ "Cdr client exec commands",PRIV_CONF);
+
+KEYWORD (cdr_mod,cdr_client_key,snmp_mod,"cdr",
+ "Cdr module exec commands",PRIV_CONF);
+
+
+/*
+ * check-eeprom
+ */
+
+EOLS (check_eeprom_eol,exec_module,CHECK_EEPROM);
+
+KEYWORD (check_eeprom,check_eeprom_eol,snmp_mod,"check-eeprom",
+ "Read tx calibration tables from eeprom ",PRIV_CONF | PRIV_HIDDEN);
+
+
+/*
+ * write-eeprom
+ */
+
+EOLS (write_eeprom_eol,exec_module,WRITE_EEPROM);
+
+KEYWORD (write_eeprom,write_eeprom_eol,check_eeprom,"write-eeprom",
+ "Write tx calibration tables to eeprom on the RF board",PRIV_CONF | PRIV_HIDDEN);
+
+
+
+/*
+ * read-eeprom
+ */
+
+
+EOLS (read_eeprom,exec_module,READ_EEPROM);
+
+KEYWORD (exec_module,read_eeprom,write_eeprom,"read-eeprom",
+ "Read tx calibration tables from eeprom on the RF board",PRIV_CONF | PRIV_HIDDEN);
+
+#undef ALTERNATE
+#define ALTERNATE exec_module
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/cli/include/exec_show_conf.h b/data/mnet/GP10/Host/cli/include/exec_show_conf.h
new file mode 100644
index 0000000..4356509
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/exec_show_conf.h
@@ -0,0 +1,10 @@
+/******************************************************************
+ * show configuration -- OBSOLETE
+ *
+ */
+EOLNS (show_config_eol, show_configuration);
+KEYWORD (show_config, show_config_eol, no_alt,
+ "running-configuration", "Contents of Non-Volatile memory", PRIV_ROOT);
+
+#undef ALTERNATE
+#define ALTERNATE show_config
diff --git a/data/mnet/GP10/Host/cli/include/exec_show_mod.h b/data/mnet/GP10/Host/cli/include/exec_show_mod.h
new file mode 100644
index 0000000..820359b
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/include/exec_show_mod.h
@@ -0,0 +1,119 @@
+
+enum {
+ VERSION_OPT,
+ DEBUG_OPT,
+ CDR_DATA,
+ ALARM_STATISTICS,
+ VOIP_CALL_STATS,
+ VOIP_CALL_CNT,
+ VOIP_CALL_SHOW,
+ VOIP_ALL_CALL,
+};
+
+/*
+ * show version
+ */
+
+EOLS (show_ver_eol,show_commands,VERSION_OPT);
+
+KEYWORD (show_ver_opt,show_ver_eol,ALTERNATE,"version",
+ "Show version of GP10 software",PRIV_CONF);
+
+/*
+ * show debugging
+ */
+EOLS (show_debug_opt_eol,show_commands,DEBUG_OPT);
+
+KEYWORD (show_debug_opt,show_debug_opt_eol,show_ver_opt,"debugging",
+ "show debug options",PRIV_CONF | PRIV_HIDDEN);
+
+/*
+ * show client cdr data
+ */
+
+EOLS (cdr_data_eol,show_commands,CDR_DATA);
+
+
+KEYWORD (cdr_data,cdr_data_eol,no_alt,"data",
+ "Show details of CDR data",PRIV_CONF);
+
+KEYWORD (cdr_cli_data,cdr_data,no_alt,"client",
+ "Show cdr client details",PRIV_CONF);
+
+KEYWORD (show_cdr,cdr_cli_data,show_debug_opt,"cdr",
+ "Show cdr details",PRIV_CONF | PRIV_HIDDEN);
+
+
+
+/*
+ * show alarm statistics
+ */
+
+EOLS (alarm_stat_eol,show_commands,ALARM_STATISTICS);
+
+
+KEYWORD (alarm_stat,alarm_stat_eol,no_alt,"statistics",
+ "Show the statistics of alarm module",PRIV_CONF);
+
+/*
+ * show alarm
+ */
+
+KEYWORD (show_alarm,alarm_stat,show_cdr,"alarm",
+ "Show alarm module statistics",PRIV_CONF);
+
+
+/*
+ * show voip call-stats
+ */
+
+EOLS (voip_call_stats_eol,show_commands,VOIP_CALL_STATS);
+
+KEYWORD (voip_call_stats,voip_call_stats_eol,no_alt,"call-stats",
+ "Show the voip call statistics",PRIV_CONF);
+
+
+/*
+ * show voip call-counters
+ */
+
+EOLS (voip_call_cnt_eol,show_commands,VOIP_CALL_CNT);
+
+KEYWORD (voip_call_cnt,voip_call_cnt_eol,voip_call_stats,"call-counters",
+ "Show the voip call counters",PRIV_CONF);
+
+/*
+ * show voip call <ccb-value>
+ */
+
+/*
+ * show voip call <ccb-value>
+ */
+
+EOLS (voip_call_eol,show_commands,VOIP_CALL_SHOW);
+
+HEXNUM (voip_call_ccb,voip_call_eol,no_alt,OBJ(int,1),
+ "Enter the correct address of ccb");
+
+KEYWORD (voip_call,voip_call_ccb,voip_call_cnt,"calls",
+ "Show call having the call control block",PRIV_CONF);
+
+/*
+ * show voip all-calls
+ */
+
+EOLS (voip_all_eol,show_commands,VOIP_ALL_CALL);
+
+KEYWORD (voip_all,voip_all_eol,voip_call,"all-calls",
+ "Show all calls currently active",PRIV_CONF);
+
+
+KEYWORD (exec_show_mod,voip_all,show_alarm,"voip",
+ "Show voice over ip information",PRIV_CONF | PRIV_HIDDEN);
+
+#undef ALTERNATE
+#define ALTERNATE exec_show_mod
+
+
+
+
diff --git a/data/mnet/GP10/Host/cli/src/Makefile b/data/mnet/GP10/Host/cli/src/Makefile
new file mode 100644
index 0000000..4ecc752
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/src/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = cli
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\gp10cli.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/cli/src/adjcell_chain.c b/data/mnet/GP10/Host/cli/src/adjcell_chain.c
new file mode 100644
index 0000000..773bb35
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/src/adjcell_chain.c
@@ -0,0 +1,215 @@
+#include "parser_if.h"
+
+#include "oam_api.h"
+#include "mibtags.h"
+#include "MnetModuleId.h"
+
+/*
+ * Parse chains for adjacent cell configuration
+ */
+#define ALTERNATE NONE
+#include "../include/cfg_adjcell.h"
+LINK_POINT(cfg_adj_cell, ALTERNATE);
+#undef ALTERNATE
+
+
+static parser_extension_request cfg_bts_adjcell_init_table[] = {
+ { PARSE_ADD_CFG_GP10_ADJCELL, &pname(cfg_adj_cell) },
+ { PARSE_LIST_END, NULL }
+};
+
+/*
+ * Register the parser chain
+ */
+void cfg_bts_adjcell_parser_init (void)
+{
+
+ parser_add_command_list(cfg_bts_adjcell_init_table,"config");
+}
+
+
+void adjcell_nvgen (void)
+{
+ int cellnum;
+ AdjCell_ReselectionEntry res_entry;
+ AdjCell_HandoverEntry hand_entry;
+
+ for (cellnum = 0;cellnum < 16;cellnum ++) {
+ printf("\n\n config-adjcell %d",cellnum+1);
+ oam_getMibTblEntry(MIBT_adjCell_reselectionEntry,cellnum,&res_entry,
+ sizeof(AdjCell_ReselectionEntry));
+ oam_getMibTblEntry(MIBT_adjCell_handoverEntry,cellnum,&hand_entry,
+ sizeof(AdjCell_HandoverEntry));
+
+ if (hand_entry.adjCell_handoverCellID)
+ printf("\n\t handover selected");
+ else
+ printf("\n\t no handover selected");
+
+ if (hand_entry.adjCell_synchronized)
+ printf("\n\t handover synchronised");
+ else
+ printf("\n\t no handover synchronised");
+
+
+ printf("\n\t handover bcch-frequency %d handover-margin %d max-tx-power %d min-rx-level %d",
+ hand_entry.adjCell_bCCHFrequency,hand_entry.adjCell_hoMargin,
+ hand_entry.adjCell_msTxPwrMaxCell,hand_entry.adjCell_rxLevMinCell);
+
+ printf("\n\t handover cell-global-identity mcc %d",hand_entry.adjCell_mcc);
+ printf("\n\t handover cell-global-identity mnc %d",hand_entry.adjCell_mnc);
+ printf("\n\t handover cell-global-identity lac %d",hand_entry.adjCell_lac);
+ printf("\n\t handover cell-global-identity ci %d",hand_entry.adjCell_ci);
+
+ printf("\n\t handover bsic ncc %d",hand_entry.adjCell_ncc);
+ printf("\n\t handover bsic bcc %d",hand_entry.adjCell_cid);
+
+ printf("\n\t reselection bcch-frequency %d ",res_entry.adjCell_reselectionBCCHFrequency);
+ if (res_entry.adjCell_reselectionCellID)
+ printf("\n\t reselection selected");
+ else
+ printf("\n\t no reselection selected");
+ }
+}
+
+
+/*
+ * Configuration handler routine for adjacent cell parameters
+ */
+
+void adj_cell_parameters (parseinfo *csb)
+{
+ int cellnum;
+
+
+ cellnum = (int) GETOBJ(udb,current1);
+
+
+ switch (csb->which) {
+ case ADJ_CELL_RES_BCCH :
+ if (csb->sense) {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_reselectionBCCHFrequency,
+ cellnum - 1,GETOBJ(int,1));
+ } else {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_reselectionBCCHFrequency,
+ cellnum - 1,0);
+ }
+ break;
+
+ case ADJ_CELL_RES :
+ if (csb->sense) {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_reselectionCellID,
+ cellnum - 1,1);
+ } else {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_reselectionCellID,
+ cellnum - 1,0);
+ }
+ break;
+
+ case ADJ_CELL_CC_VALUE :
+ switch (GETOBJ(int,1)) {
+ case BSIC_NCC :
+ if (csb->sense) {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_ncc,
+ cellnum - 1,GETOBJ(int,2));
+ } else {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_ncc,
+ cellnum - 1,0);
+ }
+ break;
+ case BSIC_BCC :
+ if (csb->sense) {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_cid,
+ cellnum - 1,GETOBJ(int,2));
+ } else {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_cid,
+ cellnum - 1,0);
+ }
+ break;
+ }
+ break;
+ case ADJ_CELL_GI_VALUE :
+ if (csb->nvgen) {
+ return;
+ }
+ switch (GETOBJ(int,1)) {
+ case GI_MCC :
+ if (csb->sense) {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_mcc,
+ cellnum - 1,GETOBJ(int,2));
+ } else {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_mcc,
+ cellnum - 1,0);
+ }
+ break;
+ case GI_MNC :
+ if (csb->sense) {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_mnc,
+ cellnum - 1,GETOBJ(int,2));
+ } else {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_mnc,
+ cellnum - 1,0);
+ }
+ break;
+ case GI_LAC :
+ if (csb->sense) {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_lac,
+ cellnum - 1,GETOBJ(int,2));
+ } else {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_lac,
+ cellnum - 1,0);
+ }
+ break;
+ case GI_CI :
+ if (csb->sense) {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_ci,
+ cellnum - 1,GETOBJ(int,2));
+ } else {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_ci,
+ cellnum - 1,0);
+ }
+ break;
+ }
+ break;
+
+ case ADJ_CELL_BCCH :
+ if (csb->nvgen) {
+ return;
+ }
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_bCCHFrequency,
+ cellnum - 1,GETOBJ(int,1));
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_hoMargin,
+ cellnum - 1,GETOBJ(int,2));
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_msTxPwrMaxCell,
+ cellnum - 1,GETOBJ(int,3));
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_rxLevMinCell,
+ cellnum - 1,GETOBJ(int,4));
+ break;
+
+ case ADJ_CELL_SELECTION :
+ if (csb->nvgen) {
+ return;
+ }
+ switch (GETOBJ(int,1)) {
+ case CELL_SELECTED :
+ if (csb->sense) {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_handoverCellID,
+ cellnum - 1,GETOBJ(int,1));
+ } else {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_handoverCellID,
+ cellnum - 1,0);
+ }
+ break;
+ case CELL_SYNCHRONISED :
+ if (csb->sense) {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_synchronized,
+ cellnum - 1,GETOBJ(int,1));
+ } else {
+ oam_setTblEntryField(CLI_MODULE_ID,MIBT_adjCell_synchronized,
+ cellnum - 1,0);
+ }
+ break;
+ }
+ break;
+ }
+}
diff --git a/data/mnet/GP10/Host/cli/src/bts_basic_chain.c b/data/mnet/GP10/Host/cli/src/bts_basic_chain.c
new file mode 100644
index 0000000..46d00ad
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/src/bts_basic_chain.c
@@ -0,0 +1,230 @@
+#include "parser_if.h"
+
+#include "oam_api.h"
+#include "mibtags.h"
+#include "MnetModuleId.h"
+
+/*
+ * Parse chains for the cell subconfig mode
+ */
+
+#define ALTERNATE NONE
+#include "cfg_trx_exit.h"
+LINK_TRANS (configure_config_cell_trx_extend_here, ALTERNATE);
+NO_OR_DEFAULT (config_cell_trx_no, configure_config_cell_trx_extend_here,
+ PRIV_OPR | PRIV_NONVGEN);
+HELP (config_cell_trx, config_cell_trx_no,
+ "Configure cell transceiver configuration parameters:\n");
+#undef ALTERNATE
+
+/*
+ * Parse chains for the cell subconfig mode
+ */
+
+#define ALTERNATE NONE
+#include "cfg_bts_exit.h"
+LINK_TRANS (configure_config_cell_bts_extend_here, ALTERNATE);
+NO_OR_DEFAULT (config_cell_bts_no, configure_config_cell_bts_extend_here,
+ PRIV_OPR | PRIV_NONVGEN);
+HELP (config_cell_bts, config_cell_bts_no,
+ "Configure cell transceiver configuration parameters:\n");
+#undef ALTERNATE
+
+
+
+
+/*
+ * Parse chains for bts basic configuration
+ */
+#define ALTERNATE NONE
+#include "../include/cfg_bts_basic.h"
+LINK_POINT(cfg_bts_bas, ALTERNATE);
+#undef ALTERNATE
+
+
+static parser_extension_request cfg_bts_basic_init_table[] = {
+ { PARSE_ADD_CFG_GP10_CELL_BTS, &pname(cfg_bts_bas) },
+ { PARSE_LIST_END, NULL }
+};
+
+parser_mode *bts_basic;
+
+/*
+ * Register the parser chain
+ */
+void cfg_bts_basic_parser_init (void)
+{
+
+ parser_add_link_point(PARSE_ADD_CFG_GP10_CELL_TRX, "config-trx",
+ &pname(configure_config_cell_trx_extend_here));
+ parser_add_mode("config-trx", "config-trx",
+ "Configure Cell Transceiver Configuration Parameters", TRUE, TRUE, "configure",
+ NULL, NULL, &pname(config_cell_trx),NULL);
+
+ parser_add_link_point(PARSE_ADD_CFG_GP10_CELL_BTS, "bts-basic",
+ &pname(configure_config_cell_bts_extend_here));
+
+ bts_basic = parser_add_mode("bts-basic", "bts-basic",
+ "Configure Cell Bts Configuration Parameters", TRUE, TRUE, "configure",
+ NULL, NULL, &pname(config_cell_bts),NULL);
+ parser_add_command_list(cfg_bts_basic_init_table,"config");
+}
+
+/*
+ * Mib tags for global identity options
+ */
+static MibTag bts_bsic_tags[] = {MIB_bts_mcc,MIB_bts_mnc,MIB_bts_lac,MIB_bts_ci};
+
+static char *bts_gi_cli[] = {" mcc "," mnc "," lac "," ci "};
+
+/*
+ * failiure statements for global identity options
+ */
+
+static char *bsic_set_fail[] = {
+ "\n Configuration of bts mobile country code failed",
+ "\n Configuration of bts mobile network code failed",
+ "\n Configuration of bts location area code failed",
+ "\n Configuration of bts cell identifier failed"
+};
+
+static char *bts_admin_state[] = {
+ " locked ",
+ " unlocked ",
+ " shutdown "
+};
+
+
+void bts_gi_nvgen()
+{
+ long nvgen_int;
+ int i;
+
+ for (i=0;i<4;i++) {
+ oam_getMibIntVar(bts_bsic_tags[i],&nvgen_int);
+ printf("\n\t cell-global-identity %s %d",bts_gi_cli[i],nvgen_int);
+ }
+}
+
+
+/*
+ * bts basic command handler
+ */
+
+
+void bts_basic_parameters(parseinfo *csb)
+{
+ int i = 0; /* used for indexing permitted ncc */
+ long nvgen_int;
+ int intbuf[2] = {0,1};
+ int intnobuf[2] = {0,0};
+ PlmnPermittedEntry plmn_entry;
+
+ switch (csb->which) {
+ case BTS_RECV_LEVEL :
+ if (csb->nvgen) {
+ oam_getMibIntVar(MIB_rxLevAccessMin,&nvgen_int);
+ printf("\n\t %s %d",csb->nv_command,nvgen_int);
+ return;
+ }
+ SET_INT_MIB(MIB_rxLevAccessMin,GETOBJ(int,1),10,
+ "\nConfiguration of minimum receive level access failed");
+ break;
+ case BTS_LINK_TIMEOUT :
+ if (csb->nvgen) {
+ oam_getMibIntVar(MIB_radioLinkTimeout,&nvgen_int);
+ printf("\n\t %s %d",csb->nv_command,nvgen_int);
+ return;
+ }
+ SET_INT_MIB(MIB_radioLinkTimeout,GETOBJ(int,1),15,
+ "\nConfiguration of radio link timeout failed");
+ break;
+ case BTS_PER_NCC_ALL :
+ if (csb->nvgen) {
+ return;
+ }
+ if (csb->sense) {
+ for (i=0;i < 8;i++) {
+ oam_setMibTblEntry(CLI_MODULE_ID,MIBT_plmnPermittedEntry,i,intbuf,
+ sizeof(int) *2);
+ }
+ } else {
+ for (i=0;i < 8;i++) {
+ oam_setMibTblEntry(CLI_MODULE_ID,MIBT_plmnPermittedEntry,i,intnobuf,
+ sizeof(int) *2);
+ }
+ }
+ break;
+ case BTS_PER_NCC :
+ if (csb->nvgen) {
+ for (i=0;i < 8; i++) {
+ oam_getMibTblEntry(MIBT_plmnPermittedEntry,i,&plmn_entry,sizeof(PlmnPermittedEntry));
+ if (plmn_entry.plmnPermitted)
+ printf("\n\t plmn-permitted-ncc %d",i);
+ else
+ printf("\n\t no plmn-permitted-ncc %d",i);
+ }
+ return;
+ }
+ if (csb->sense) {
+ oam_setMibTblEntry(CLI_MODULE_ID,MIBT_plmnPermittedEntry,GETOBJ(int,1),intbuf,
+ sizeof(int) *2);
+ } else {
+ oam_setMibTblEntry(CLI_MODULE_ID,MIBT_plmnPermittedEntry,GETOBJ(int,1),intnobuf,
+ sizeof(int) *2);
+ }
+ break;
+ case BTS_PHY_VALUE :
+ if (csb->nvgen) {
+ oam_getMibIntVar(MIB_ny1,&nvgen_int);
+ printf("\n\t %s %d",csb->nv_command,nvgen_int);
+ return;
+ }
+ SET_INT_MIB(MIB_ny1,GETOBJ(int,1),3,
+ "\nConfiguration num of physical repetition failed");
+ break;
+ case BTS_RES_VALUE :
+ if (csb->nvgen) {
+ oam_getMibIntVar(MIB_cellReselectHysteresis,&nvgen_int);
+ printf("\n\t %s %d",csb->nv_command,nvgen_int);
+ return;
+ }
+ SET_INT_MIB(MIB_cellReselectHysteresis,GETOBJ(int,1),7,
+ "\nConfiguration cell reselect hysteresis failed");
+ break;
+ case BTS_CC_VALUE :
+ if (csb->nvgen) {
+ oam_getMibIntVar(MIB_bts_ncc,&nvgen_int);
+ printf("\n\t bsic ncc %d",nvgen_int);
+ oam_getMibIntVar(MIB_bts_cid,&nvgen_int);
+ printf("\n\t bsic bcc %d",nvgen_int);
+ return;
+ }
+ switch(GETOBJ(int,1)) {
+ case BSIC_NCC :
+ SET_INT_MIB(MIB_bts_ncc,GETOBJ(int,2),7,"\nConfiguration of network color code failed");
+ break;
+ case BSIC_BCC :
+ SET_INT_MIB(MIB_bts_cid,GETOBJ(int,2),7,
+ "\nConfiguration of base station color code failed");
+ break;
+ }
+ break;
+ case BTS_GI_VALUE :
+ if (csb->nvgen) {
+ bts_gi_nvgen ();
+ return;
+ }
+ SET_INT_MIB(bts_bsic_tags[GETOBJ(int,1)],GETOBJ(int,2),1,bsic_set_fail[GETOBJ(int,1)]);
+ break;
+ case BTS_ADMIN_STATE :
+ if (csb->nvgen) {
+ oam_getMibIntVar(MIB_bts_administrativeState,&nvgen_int);
+ printf("\n\t administrative-state %s",bts_admin_state[nvgen_int]);
+ return;
+ }
+ SET_INT_MIB(MIB_bts_administrativeState,GETOBJ(int,1),1,
+ "\nConfiguration of bts administrative state failed");
+ break;
+ }
+}
diff --git a/data/mnet/GP10/Host/cli/src/ccch_chain.c b/data/mnet/GP10/Host/cli/src/ccch_chain.c
new file mode 100644
index 0000000..3a27b0f
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/src/ccch_chain.c
@@ -0,0 +1,137 @@
+#include "parser_if.h"
+
+#include "oam_api.h"
+#include "mibtags.h"
+#include "MnetModuleId.h"
+
+
+/*
+ * Parse chains for system information configuration commands
+ */
+#define ALTERNATE NONE
+#include "../include/cfg_ccch.h"
+LINK_POINT(cfg_bts_ccch, ALTERNATE);
+#undef ALTERNATE
+
+/*
+ * Parse chains for the cell subconfig mode
+ */
+
+#define ALTERNATE NONE
+#include "cfg_ccch_exit.h"
+LINK_TRANS (configure_config_cell_ccch_extend_here, ALTERNATE);
+NO_OR_DEFAULT (config_cell_ccch_no, configure_config_cell_ccch_extend_here,
+ PRIV_OPR | PRIV_NONVGEN);
+HELP (config_cell_ccch, config_cell_ccch_no,
+ "Configure common control channel configuration parameters:\n");
+#undef ALTERNATE
+
+
+static parser_extension_request cfg_bts_ccch_init_table[] = {
+ { PARSE_ADD_CFG_GP10_CELL_CCCH, &pname(cfg_bts_ccch) },
+ { PARSE_LIST_END, NULL }
+};
+
+parser_mode *ccch_config;
+
+
+/*
+ * Register the parser chain
+ */
+void cfg_bts_ccch_parser_init (void)
+{
+ parser_add_link_point(PARSE_ADD_CFG_GP10_CELL_CCCH, "ccch-config",
+ &pname(configure_config_cell_ccch_extend_here));
+
+ ccch_config = parser_add_mode("ccch-config", "ccch-config",
+ "Configure Cell Ccch Configuration Parameters", TRUE, TRUE, "configure",NULL, NULL, &pname(config_cell_ccch),NULL);
+ parser_add_command_list(cfg_bts_ccch_init_table,"config");
+}
+
+
+
+/*
+ * CCCH Mib Tags
+ */
+
+/*
+ * The first ited needs to be replaced. At this point of time engr doesn't know this
+ */
+static MibTag ccch_mib_tags[] = {MIB_rm_nim_0_6,
+ MIB_rm_nim_0_5,MIB_rm_nim_0_4,
+ MIB_rm_nim_0_3,
+ MIB_numberOfSlotsSpreadTrans,
+ MIB_noOfMultiframesBetweenPaging,
+ MIB_noOfBlocksForAccessGrant,MIB_mSTxPwrMaxCCH,
+ MIB_maxNumberRetransmissions
+};
+
+
+/*
+ * Default values for mibs
+ */
+static int ccch_mib_def[] = {0,0,0,0,1,9,0,0,4};
+
+
+/*
+ * String for SNMP set failure information
+ */
+
+static char *ccch_set_fail[] = {
+ "\n Selection of cell bar qualify failed",
+ "\n Configuration of offset penaly failed",
+ "\n Configuration of offset temporary failed",
+ "\n Configuration of cell reselect failed",
+ "\n Configuration of max number of RACH slots failed",
+ "\n Configuration of number of multiframes failed",
+ "\n Configuration of number of frames for access grant channel failed",
+ "\n Configuration of max transmit power level failed",
+ "\n Configuration of max number of retransmission failed",
+};
+
+
+/*
+ * String for SNMP set failure information
+ */
+
+static char *ccch_show_fail[] = {
+ "\n Show configuration of cell bar qualify failed",
+ "\n Show Configuration of offset penaly failed",
+ "\n Show Configuration of offset temporary failed",
+ "\n Show Configuration of cell reselect failed",
+ "\n Show Configuration of max number of RACH slots failed",
+ "\n Show Configuration of number of multiframes failed",
+ "\n Show Configuration of number of frames for access grant channel failed",
+ "\n Show Configuration of max transmit power level failed",
+ "\n Show Configuration of max number of retransmission failed",
+};
+
+/*
+ * ccch command handler
+ */
+
+void ccch_configuration (parseinfo *csb)
+{
+ long nvgen_int;
+
+ if (csb->which == CCCH_CELL_BAR) {
+ if (csb->nvgen) {
+ oam_getMibIntVar(ccch_mib_tags[csb->which],&nvgen_int);
+ if (nvgen_int)
+ printf("\n\t %s enable",csb->nv_command);
+ else
+ printf("\n\t no %s enable",csb->nv_command);
+ return;
+ }
+
+ SET_INT_MIB(ccch_mib_tags[csb->which],csb->sense,0,ccch_set_fail[csb->which]);
+ } else {
+ if (csb->nvgen) {
+ oam_getMibIntVar(ccch_mib_tags[csb->which],&nvgen_int);
+ printf("\n\t %s %d",csb->nv_command,nvgen_int);
+ return;
+ }
+ SET_INT_MIB(ccch_mib_tags[csb->which],GETOBJ(int,1),ccch_mib_def[csb->which],
+ ccch_set_fail[csb->which]);
+ }
+}
diff --git a/data/mnet/GP10/Host/cli/src/diag_chain.c b/data/mnet/GP10/Host/cli/src/diag_chain.c
new file mode 100644
index 0000000..f45ecc3
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/src/diag_chain.c
@@ -0,0 +1,336 @@
+#include "parser_if.h"
+
+/*
+ * Include other api headers
+ */
+#include "Mch/MCHDefs.h"
+#include "oam_api.h"
+#include "mibtags.h"
+#include "MnetModuleId.h"
+
+/*
+ * Parse chains for Exec diagnostic commands
+ */
+#define ALTERNATE NONE
+#include "../include/exec_diag_cmd.h"
+LINK_POINT(exec_diag_commands, ALTERNATE);
+#undef ALTERNATE
+
+/*
+ * Parse chains for Exec show commands
+ */
+#define ALTERNATE NONE
+#include "../include/exec_show_mod.h"
+LINK_POINT(exec_show_mod_command, ALTERNATE);
+#undef ALTERNATE
+
+/*
+ * Parse chains for module specific Exec commands
+ */
+#define ALTERNATE NONE
+#include "../include/exec_module.h"
+LINK_POINT(exec_mod_cmds, ALTERNATE);
+#undef ALTERNATE
+
+/*
+ * Parse chains for module specific Exec commands
+ */
+#define ALTERNATE NONE
+#include "../include/exec_show_conf.h"
+LINK_POINT(exec_show_conf, ALTERNATE);
+#undef ALTERNATE
+
+
+/*
+ * Parse chains for module specific Exec commands
+ */
+#define ALTERNATE NONE
+#include "../include/exec_debug_gp10.h"
+LINK_POINT(exec_dbg_gp10, ALTERNATE);
+#undef ALTERNATE
+
+/*
+ * Parse chain registration array for Exec
+ */
+static parser_extension_request exec_diag_chain_init_table[] = {
+ { PARSE_ADD_EXEC_CMD, &pname(exec_diag_commands) },
+ { PARSE_ADD_SHOW_CMD, &pname(exec_show_mod_command)},
+ { PARSE_ADD_SHOW_CMD, &pname(exec_show_conf)},
+ { PARSE_ADD_EXEC_CMD, &pname(exec_mod_cmds) },
+ { PARSE_ADD_DEBUG_CMD,&pname(exec_dbg_gp10) },
+ { PARSE_ADD_CLEAR_CMD, &pname(exec_clear_chain_voip) },
+ { PARSE_LIST_END, NULL }
+};
+
+void show_configuration (parseinfo *csb)
+{
+ parseinfo *nvcsb;
+
+ nvcsb = get_csb("NV parser CSB");
+ if (csb == NULL) {
+ printf(nomemory);
+ return;
+ }
+ printf("\nBuilding configuration...");
+ nvcsb->nvgen = TRUE;
+ nvcsb->sense = TRUE;
+
+ nvcsb->priv = PRIV_MAX;
+ nvcsb->priv_set = 0xf;
+ nvcsb->mode = config_mode;
+ push_node(nvcsb, get_mode_nv(nvcsb));
+ parse_token(nvcsb);
+ free_csb(&nvcsb);
+ printf("\n");
+}
+
+
+
+
+void exec_diag_parser_init (void)
+{
+ parser_add_command_list(exec_diag_chain_init_table, "exec");
+}
+
+
+/*
+ * Global variables
+ */
+char cmd_line[MCH_MAX_COMMAND_LEN];
+
+void diagnostic_cmds (parseinfo *csb)
+{
+
+ switch (csb->which) {
+ case DIAG_CFTEST_CMD :
+ sprintf(cmd_line,"startdiag cftest %d",GETOBJ(int,1));
+ break;
+ case DIAG_STOPDIAG_CMD:
+ sprintf(cmd_line," stopdiag %s",GETOBJ(string,1));
+ break;
+ case DIAG_HPIMEMACCESS_CMD:
+ sprintf(cmd_line," startdiag hpimemoryaccess %d %d %d ",GETOBJ(int,1),GETOBJ(int,2),GETOBJ(int,3));
+ break;
+ case DIAG_HPIECHOTEST_CMD:
+ sprintf(cmd_line," startdiag hpiechotest %d %d %d %d %d",
+ GETOBJ(int,1),GETOBJ(int,2),GETOBJ(int,3),GETOBJ(int,4),GETOBJ(int,5));
+ break;
+ case DIAG_HOREPORT_CMD:
+ sprintf(cmd_line," startdiag horeport %x %x %d",GETOBJ(int,1),GETOBJ(int,2),GETOBJ(int,3));
+ break;
+ case DIAG_FPGATEST_CMD:
+ sprintf(cmd_line," startdiag fpgatest %d",GETOBJ(int,1));
+ break;
+ case DIAG_DSPMEMTEST_CMD:
+ sprintf(cmd_line," startdiag dspmemtest %d %d %d",GETOBJ(int,1),GETOBJ(int,2),GETOBJ(int,3));
+ break;
+ case DIAG_DSPLOOPBACK_CMD:
+ sprintf(cmd_line," startdiag dsploopback %d %d %d",GETOBJ(int,1),GETOBJ(int,2),GETOBJ(int,3));
+ break;
+ case DIAG_DSPEXTMEMTEST_CMD:
+ sprintf(cmd_line," startdiag dspextmemtest %d %d %d",
+ GETOBJ(int,1),GETOBJ(int,2),GETOBJ(int,3));
+ break;
+ case DIAG_DSPBBLBTEST_CMD:
+ sprintf(cmd_line," startdiag dspbblbtest %d %d %d %d %d",
+ GETOBJ(int,1),GETOBJ(int,2),GETOBJ(int,3),GETOBJ(int,4),GETOBJ(int,5));
+ break;
+ case DIAG_DLREPORT_CMD:
+ sprintf(cmd_line," startdiag dlreport %x %x %d",GETOBJ(int,1),GETOBJ(int,2),GETOBJ(int,3));
+ break;
+ case DIAG_IFREPORT_CMD:
+ sprintf(cmd_line," startdiag ifreport %x %x %d",GETOBJ(int,1),GETOBJ(int,2),GETOBJ(int,3));
+ break;
+ case DIAG_MSREPORT_CMD:
+ sprintf(cmd_line," startdiag msreport %x %x %d",GETOBJ(int,1),GETOBJ(int,2),GETOBJ(int,3));
+ break;
+ case DIAG_I2CTEST_CMD :
+ sprintf(cmd_line," startdiag i2ctest");
+ break;
+ case DIAG_I2CLOOPBACK_CMD :
+ sprintf(cmd_line,"startdiag i2cloopback numbytes %d duration %d %d %s",GETOBJ(int,1),
+ GETOBJ(int,2),GETOBJ(int,3),(GETOBJ(int,4)!=HALT_ON_ERROR)?"":"Haltonerror");
+ break;
+ }
+ /*
+ * call the MCH routine to handle the command
+ */
+ MaintCmd__FPc(cmd_line);
+}
+
+/*
+ * show command handler
+ */
+
+void show_commands (parseinfo *csb)
+{
+ switch (csb->which) {
+ case VERSION_OPT :
+ oam_getMibByteAry(MIB_viperCellSoftwareBuild,nvgen_string,CLI_MAX_STRING_LEN);
+ printf("\n %s\n",nvgen_string);
+ break;
+ case DEBUG_OPT :
+ ViperLogShowAllFilters();
+ break;
+ case CDR_DATA :
+ CdrDataPrint();
+ break;
+ case ALARM_STATISTICS :
+ AlarmPrintStatus();
+ break;
+ case VOIP_CALL_STATS :
+ VoipShowCallStats__Fv();
+ break;
+ case VOIP_CALL_CNT :
+ VoipShowCallCounters__Fv();
+ break;
+ case VOIP_CALL_SHOW :
+ VoipShowCall__FP19_CALL_CONTROL_BLOCK(GETOBJ(int,1));
+ break;
+ case VOIP_ALL_CALL:
+ VoipShowAllCalls__Fv();
+ break;
+ }
+}
+
+/*
+ * module specific exec command handler
+ */
+extern void VoipClearCallStats__Fv(void);
+void exec_module (parseinfo *csb)
+{
+ char cdr_ipaddr[16];
+ int tag;
+
+ switch (csb->which) {
+ case MIB_FILE :
+ switch (GETOBJ(int,1))
+ {
+ case MIB_IMPORT :
+ snmp_loadMib(GETOBJ(string,1));
+ break;
+ case MIB_EXPORT :
+ snmp_saveMib(GETOBJ(string,1));
+ break;
+ }
+ break;
+
+ case SNMP_SET_MIB :
+ if (tag = snmp_nameToTag(GETOBJ(string,1))) {
+ if (MTYPE_IS_TABLE(MIB_TYP(tag))) {
+ if (GETOBJ(int,1) == MIB_TYPE_INT) {
+ if (SnmpMibSet(GETOBJ(string,1),GETOBJ(int,3),GETOBJ(int,2)) != STATUS_OK )
+ printf(" Setting of mib %s failed",GETOBJ(string,1));
+ } else {
+ if (SnmpMibSet(GETOBJ(string,1),GETOBJ(int,3),GETOBJ(string,2)) != STATUS_OK)
+ printf(" Setting of mib %s failed",GETOBJ(string,1));
+ }
+ } else {
+ if (GETOBJ(int,1) == MIB_TYPE_INT) {
+ if (SnmpMibSet(GETOBJ(string,1),GETOBJ(int,2)) != STATUS_OK )
+ printf(" Setting of mib %s failed",GETOBJ(string,1));
+ } else {
+ if (SnmpMibSet(GETOBJ(string,1),GETOBJ(string,2)) != STATUS_OK)
+ printf(" Setting of mib %s failed",GETOBJ(string,1));
+ }
+ }
+ } else {
+ printf("Unable to locate MIB tag from supplied mib string '%s'\n", GETOBJ(string,1));
+ }
+ break;
+
+ case SNMP_GET_MIB :
+ SnmpMibGet(GETOBJ(string,1),GETOBJ(int,2));
+ break;
+ case SNMP_MIB_LKUP :
+ SnmpMibLookup(GETOBJ(string,1));
+ break;
+ case CDR_SWITCH :
+ address_string(GETOBJ(paddr,1)->ip_addr,cdr_ipaddr);
+ _cdrSwitchServer(cdr_ipaddr);
+ break;
+ case CDR_STATUS :
+ cdrGetStatus();
+ break;
+ case CHECK_EEPROM :
+ CheckEeprom__Fv();
+ break;
+ case WRITE_EEPROM :
+ WriteEeprom__Fv();
+ break;
+ case READ_EEPROM :
+ ReadEeprom__Fv();
+ break;
+ }
+}
+
+/*
+ * Mask for turning on debugs
+ */
+static int gp10_debug_mask[] = {DBG_LOG_CONTROL_TRACE_MASK ,
+ DBG_LOG_CALL_TRACE_MASK ,
+ DBG_LOG_INFORMATIONAL_MASK ,
+ DBG_LOG_WARNINGS_MASK ,
+ DBG_LOG_ERRORS_MASK,
+ DBG_LOG_ALL_TRACE_MASK,
+ DBG_LOG_TIMESTAMP_MASK
+};
+
+/*
+ * Mask for turning off debugs
+ */
+
+static int gp10_debug_inversemask[] = {DBG_LOG_CONTROL_TRACE_INVERSE_MASK ,
+ DBG_LOG_CALL_TRACE_INVERSE_MASK ,
+ DBG_LOG_INFORMATIONAL_INVERSE_MASK ,
+ DBG_LOG_WARNINGS_INVERSE_MASK ,
+ DBG_LOG_ERRORS_INVERSE_MASK,
+ DBG_LOG_ALL_TRACE_INVERSE_MASK
+};
+
+static int debug_option_flag = 0;
+
+void set_gp10_debug_flag (parseinfo *csb)
+{
+ if (csb->sense) {
+ debug_option_flag |= gp10_debug_mask[GETOBJ(int,2)];
+ } else {
+ debug_option_flag &= gp10_debug_inversemask[GETOBJ(int,2)];
+ }
+}
+
+/*
+ * Handler routine for debug commands
+ */
+extern int logging_dest;
+void gp10_debug_command( parseinfo *csb)
+{
+ char c;
+
+ if(GETOBJ(int,1)==GP10_DEBUG_ALL && csb->sense){
+ printf("This may severely impact network performance: Continue: [yes/no] ");
+ read(STD_IN,&c,1);
+ write(STD_OUT,"\n",1);
+ if(c!='y')
+ return;
+ }
+
+ if (debug_option_flag == 0) {
+ if (csb->sense) {
+
+ debug_option_flag = gp10_debug_mask[DBG_ALL_LOG];
+ } else {
+ debug_option_flag = gp10_debug_inversemask[DBG_ALL_LOG];
+ }
+ }
+
+
+ debug_option_flag |= logging_dest;
+ ViperLogSetModuleFilters(GETOBJ(int,1),debug_option_flag);
+ debug_option_flag = 0;
+}
+
+
+void clearVoipCall(parseinfo *csb){
+ VoipClearCallStats__Fv();
+}
diff --git a/data/mnet/GP10/Host/cli/src/proto_chain.c b/data/mnet/GP10/Host/cli/src/proto_chain.c
new file mode 100644
index 0000000..53b12f3
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/src/proto_chain.c
@@ -0,0 +1,150 @@
+#include "parser_if.h"
+
+#include "oam_api.h"
+#include "mibtags.h"
+#include "MnetModuleId.h"
+
+/*
+ * Parse chains for system information configuration commands
+ */
+#define ALTERNATE NONE
+#include "../include/cfg_timers.h"
+LINK_POINT(cfg_timer, ALTERNATE);
+#undef ALTERNATE
+
+#define ALTERNATE NONE
+#include "cfg_proto_exit.h"
+LINK_TRANS (configure_gp10_proto_extend_here, ALTERNATE);
+NO_OR_DEFAULT (gp10_proto_config_no, configure_gp10_proto_extend_here,
+ PRIV_OPR | PRIV_NONVGEN);
+HELP (gp10_proto_config, gp10_proto_config_no,
+ "Configure gp10 protocol configuration parameters:\n");
+#undef ALTERNATE
+
+static parser_extension_request cfg_proto_init_table[] = {
+ { PARSE_ADD_CFG_GP10_PROTO, &pname(cfg_timer) },
+ { PARSE_LIST_END, NULL }
+};
+
+parser_mode *config_proto;
+/*
+ * Register the parser chain
+ */
+void cfg_proto_parser_init (void)
+{
+ parser_add_link_point(PARSE_ADD_CFG_GP10_PROTO, "config-proto",
+ &pname(configure_gp10_proto_extend_here));
+ config_proto = parser_add_mode("config-proto", "config-proto",
+ "Configure Protocol Configuration Parameters", TRUE, TRUE, "configure",
+ NULL, NULL, &pname(gp10_proto_config),NULL);
+ parser_add_command_list(cfg_proto_init_table,"config");
+}
+
+
+
+/*
+ * Mib tags of the timer
+ */
+
+static MibTag timer_mib_tags[] = {MIB_sdcchSAPI0,MIB_sdcchSAPI3,MIB_sacchSDCCH,
+ MIB_sacchTCHSAPI0,MIB_sdcchTCHSAPI3,
+ MIB_t3101,MIB_t3103,MIB_t3105,MIB_t3107,MIB_t3109,
+ MIB_t3111,MIB_t3113,MIB_cc_alerting_T301,MIB_cc_setup_T303,
+ MIB_cc_call_confirmed_T310,MIB_cc_connect_T313,
+ MIB_cc_disconnect_T305,MIB_cc_release_T308
+};
+
+/*
+ * String for printing SNMP failiure to set the timer
+ */
+
+static char *time_set_fail_str[] = {
+ "\nConfiguration of Stand-alone dedicated control channel sapi0 timer failed",
+ "\nConfiguration of Stand-alone dedicated control channel sapi3 timer failed",
+ "\nConfiguration of Stand-alone dedicated control channel sdcch timer failed",
+ "\nConfiguration of sacch tracffic channel sapi0 timer failed",
+ "\nConfiguration of Stand-alone dedicated control channel tch sapi3 timer failed",
+ "\nConfiguration of immediate assignment timer failed",
+ "\nConfiguration of handover command timer failed",
+ "\nConfiguration of physical information timer failed",
+ "\nConfiguration of assignment command timer failed",
+ "\nConfiguration of lower layer failiure timer failed",
+ "\nConfiguration of channel activation delay timer failed",
+ "\nConfiguration of paging message timer failed",
+ "\nConfiguration of alerting received timer failed",
+ "\nConfiguration of setup sent timer failed",
+ "\nConfiguration of call confirmation received timer failed",
+ "\nConfiguration of connect sent timer failed",
+ "\nConfiguration of disconnect sent timer failed",
+ "\nConfiguration of release sent timer failed"
+};
+
+
+void rmm_timer_nvgen (parseinfo *csb)
+{
+ NVADDGEN_TIMER_MIB(MIB_t3101,"immediate-assignment");
+ NVADDGEN_TIMER_MIB(MIB_t3103,"handover-command");
+ NVADDGEN_TIMER_MIB(MIB_t3105,"physical-information");
+ NVADDGEN_TIMER_MIB(MIB_t3107,"assignment-command");
+ NVADDGEN_TIMER_MIB(MIB_t3109,"lower-layer-failure");
+ NVADDGEN_TIMER_MIB(MIB_t3111,"channel-activation");
+ NVADDGEN_TIMER_MIB(MIB_t3113,"paging-messages");
+}
+
+void ccm_timer_nvgen (parseinfo *csb)
+{
+ NVADDGEN_TIMER_MIB(MIB_cc_alerting_T301,"alerting-received");
+ NVADDGEN_TIMER_MIB(MIB_cc_setup_T303,"setup-sent");
+ NVADDGEN_TIMER_MIB(MIB_cc_call_confirmed_T310,"call-confirmed");
+ NVADDGEN_TIMER_MIB(MIB_cc_connect_T313,"connect-sent");
+ NVADDGEN_TIMER_MIB(MIB_cc_disconnect_T305,"disconnect-sent");
+ NVADDGEN_TIMER_MIB(MIB_cc_release_T308,"release-sent");
+}
+
+
+/*
+ * Timer confiuration routine
+ */
+
+void timer_configuration (parseinfo *csb)
+{
+ long nvgen_int;
+
+ switch (csb->which) {
+ case CCM_TIMER :
+ if (csb->nvgen) {
+ ccm_timer_nvgen(csb);
+ return;
+ }
+ SET_INT_MIB(timer_mib_tags[GETOBJ(int,1)],GETOBJ(int,2),0,time_set_fail_str[GETOBJ(int,1)]);
+ break;
+ case RMM_TIMER :
+ if (csb->nvgen) {
+ rmm_timer_nvgen(csb);
+ return;
+ }
+ SET_INT_MIB(timer_mib_tags[GETOBJ(int,1)],GETOBJ(int,2),0,time_set_fail_str[GETOBJ(int,1)]);
+ break;
+ case SACCH_TIMER :
+ NVADDGEN_TIMER_MIB(MIB_sacchTCHSAPI0,"tch-0-timer");
+ NVGEN_TIMER_MIB(MIB_sacchSDCCH,"sdcch-timer");
+ SET_INT_MIB(timer_mib_tags[GETOBJ(int,1)],GETOBJ(int,2),0,time_set_fail_str[GETOBJ(int,1)]);
+ break;
+ case SDCCH_TIMER :
+ NVADDGEN_TIMER_MIB(MIB_sdcchSAPI0,"sapi-0-timer");
+ NVADDGEN_TIMER_MIB(MIB_sdcchSAPI3,"sapi-3-timer");
+ NVGEN_TIMER_MIB(MIB_sdcchTCHSAPI3,"sdcch-tch-timer");
+ SET_INT_MIB(timer_mib_tags[GETOBJ(int,1)],GETOBJ(int,2),0,time_set_fail_str[GETOBJ(int,1)]);
+ break;
+ case FACCH_TIMER :
+ if (csb->nvgen) {
+ oam_getMibIntVar(MIB_facchTCHF,&nvgen_int);
+ printf("\n\t %s %d",csb->nv_command,nvgen_int);
+ return;
+ }
+
+ SET_INT_MIB(MIB_facchTCHF,GETOBJ(int,1),0,"\nConfiguration of TCH full rate timer failed");
+ break;
+ }
+}
+
diff --git a/data/mnet/GP10/Host/cli/src/sys_info_chain.c b/data/mnet/GP10/Host/cli/src/sys_info_chain.c
new file mode 100644
index 0000000..932c734
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/src/sys_info_chain.c
@@ -0,0 +1,871 @@
+#include "parser_if.h"
+
+#include "oam_api.h"
+#include "mibtags.h"
+#include "MnetModuleId.h"
+/*
+ * Parse chains for system information configuration commands
+ */
+#define ALTERNATE NONE
+#include "../include/cfg_sys_info.h"
+LINK_POINT(cfg_sys_info, ALTERNATE);
+#undef ALTERNATE
+
+/*
+ * Parse chains for voip configuration commands
+ */
+#define ALTERNATE NONE
+#include "../include/cfg_voip.h"
+LINK_POINT(cfg_voip, ALTERNATE);
+#undef ALTERNATE
+
+
+/*
+ * Parse chains for bts option commands
+ */
+#define ALTERNATE NONE
+#include "../include/cfg_bts_options.h"
+LINK_POINT(cfg_bts_option, ALTERNATE);
+#undef ALTERNATE
+
+/*
+ * Parse chains for bts option commands
+ */
+#define ALTERNATE NONE
+#include "../include/cfg_sys_feat.h"
+LINK_POINT(cfg_sys_feat, ALTERNATE);
+#undef ALTERNATE
+
+
+/*
+ * Parse chains for bts option commands
+ */
+#define ALTERNATE NONE
+#include "../include/cfg_mspwr_ctrl.h"
+LINK_POINT(cfg_mspwr_ctrl, ALTERNATE);
+#undef ALTERNATE
+
+/*
+ * Parse chains for the global subconfig mode
+ */
+
+#define ALTERNATE NONE
+#include "cfg_cell_exit.h"
+LINK_TRANS (configure_gp10_cell_extend_here, ALTERNATE);
+NO_OR_DEFAULT (gp10_cell_config_no, configure_gp10_cell_extend_here,
+ PRIV_OPR | PRIV_NONVGEN);
+HELP (gp10_cell_config, gp10_cell_config_no,
+ "Configure gp10 cell configuration parameters:\n");
+#undef ALTERNATE
+
+#define ALTERNATE NONE
+#include "cfg_adjcell_exit.h"
+LINK_TRANS (configure_gp10_adjcell_extend_here, ALTERNATE);
+NO_OR_DEFAULT (gp10_adjcell_config_no, configure_gp10_adjcell_extend_here,
+ PRIV_OPR | PRIV_NONVGEN);
+HELP (gp10_adjcell_config, gp10_adjcell_config_no,
+ "Configure gp10 adjacent cell configuration parameters:\n");
+#undef ALTERNATE
+
+/*
+ * Parse chain registration array for Exec
+ */
+static parser_extension_request cfg_sysinfo_init_table[] = {
+ { PARSE_ADD_CFG_TOP_CMD, &pname(cfg_sys_info) },
+ { PARSE_ADD_CFG_TOP_CMD, &pname(cfg_voip) },
+ { PARSE_ADD_CFG_GP10_CELL, &pname(cfg_bts_option) },
+ { PARSE_ADD_CFG_TOP_CMD, &pname(cfg_sys_feat) },
+ { PARSE_ADD_CFG_TOP_CMD, &pname(cfg_mspwr_ctrl) },
+ { PARSE_LIST_END, NULL }
+};
+
+static parser_mode *config_adjcell;
+static parser_mode *config_cell;
+extern parser_mode *config_proto;
+extern parser_mode *ccch_config;
+extern parser_mode *bts_basic;
+
+/* parser init routine */
+
+void gp10_subconfig_init (void)
+{
+ parser_add_link_point(PARSE_ADD_CFG_GP10_CELL, "config-cell",
+ &pname(configure_gp10_cell_extend_here));
+ config_cell = parser_add_mode("config-cell", "config-cell",
+ "Configure Cell Configuration Parameters", TRUE, TRUE, "configure",
+ NULL, NULL, &pname(gp10_cell_config),NULL);
+ parser_add_link_point(PARSE_ADD_CFG_GP10_ADJCELL, "config-adjcell",
+ &pname(configure_gp10_adjcell_extend_here));
+ config_adjcell = parser_add_mode("config-adjcell", "config-adjcell",
+ "Configure Adjacent Cell Configuration Parameters", TRUE, TRUE, "configure",
+ NULL, NULL, &pname(gp10_adjcell_config),NULL);
+}
+
+/*
+ * Register the parser chain
+ */
+void commands_init (void)
+{
+ gp10_subconfig_init();
+ parser_add_command_list(cfg_sysinfo_init_table,"config");
+ exec_diag_parser_init();
+ cfg_bts_basic_parser_init();
+ cfg_bts_ccch_parser_init();
+ cfg_bts_adjcell_parser_init ();
+ cfg_trx_parser_init();
+ cfg_proto_parser_init();
+}
+
+
+static void submode_nvgen (parseinfo *csb,parser_mode *mode)
+{
+ parseinfo *nvcsb;
+
+ nvcsb = get_csb("NV parser CSB");
+ if (csb == NULL) {
+ printf(nomemory);
+ return;
+ }
+ nvcsb->nvgen = TRUE;
+ nvcsb->sense = TRUE;
+ nvcsb->priv = PRIV_MAX;
+ nvcsb->priv_set = 0xf;
+ nvcsb->mode = mode;
+ push_node(nvcsb, get_mode_nv(nvcsb));
+ parse_token(nvcsb);
+ free_csb(&nvcsb);
+}
+
+/*
+ * sub config modes
+ */
+
+
+void gp10_subconfig_cmds (parseinfo *csb)
+{
+
+ switch (csb->which) {
+ case SUB_CONFIG_PROTO :
+ if (csb->nvgen) {
+ printf("\n\nconfig-proto");
+ submode_nvgen(csb,config_proto);
+ return;
+ }
+ set_mode_byname(&csb->mode, "config-proto", MODE_VERBOSE);
+ break;
+ case SUB_CONFIG_ADJCELL :
+ if (csb->nvgen) {
+ adjcell_nvgen ();
+ return;
+ }
+ SETOBJ(udb, current1) = (void *)GETOBJ(int,1);
+ set_mode_byname(&csb->mode, "config-adjcell", MODE_VERBOSE);
+ break;
+ case SUB_CONFIG_CELL :
+ if (csb->nvgen) {
+ submode_nvgen(csb,config_cell);
+ return;
+ }
+ set_mode_byname(&csb->mode, "config-cell", MODE_VERBOSE);
+ break;
+ }
+}
+
+/*
+ * cell sub config modes
+ */
+
+void gp10_cell_subconfig_cmds (parseinfo *csb)
+{
+ switch (csb->which) {
+ case CFG_CELL_CCCH :
+ if (csb->nvgen) {
+ printf("\n\n ccch-config");
+ submode_nvgen(csb,ccch_config);
+ return;
+ }
+ set_mode_byname(&csb->mode, "ccch-config", MODE_VERBOSE);
+ break;
+ case CFG_CELL_TRX :
+ if (csb->nvgen) {
+ trx_nvgen();
+ return;
+ }
+ SETOBJ(udb, current1) = (void *)GETOBJ(int,1);
+ set_mode_byname(&csb->mode, "config-trx", MODE_VERBOSE);
+ break;
+ case CFG_CELL_BTS :
+ if (csb->nvgen) {
+ printf("\n\n bts-basic");
+ submode_nvgen(csb,bts_basic);
+ return;
+ }
+ set_mode_byname(&csb->mode, "bts-basic", MODE_VERBOSE);
+ break;
+ }
+}
+
+
+char *
+address_hexstring (ulong address,char *buf)
+{
+ sprintf(buf, ":%02x%02x%02x%02x",
+ (address >> 24) & 0xff, (address >> 16) & 0xff,
+ (address >> 8) & 0xff, address & 0xff);
+
+ return buf;
+}
+
+/*
+ * System configuration commands
+ */
+void system_configuration (parseinfo *csb)
+{
+ long nvgen_int;
+ char ip_string[16];
+
+ switch (csb->which) {
+ case CONF_CUSTADDR :
+ NVGEN_STRING_MIB(MIB_viperCellCustomerAddress,
+ "\n Show configuration of vipercell customer address failed");
+
+ if (csb->sense) {
+ if (oam_setMibByteAry(CLI_MODULE_ID,MIB_viperCellCustomerAddress,
+ (unsigned char *)GETOBJ(string,1),strlen(GETOBJ(string,1))) != STATUS_OK) {
+ printf("\n Configuration of vipercell customer address failed");
+ }
+ } else {
+ if (oam_setMibByteAry(CLI_MODULE_ID,MIB_viperCellCustomerAddress,
+ (unsigned char *)" ",1) != STATUS_OK) {
+ printf("\n Configuration of vipercell customer address failed");
+ }
+ }
+ break;
+
+
+ case CONF_CUSTINFO :
+ NVGEN_STRING_MIB(MIB_viperCellCustomerInfo,
+ "\n Show Configuration of vipercell customer information failed");
+
+ if (csb->sense) {
+ if (oam_setMibByteAry(CLI_MODULE_ID,MIB_viperCellCustomerInfo,(unsigned char *)GETOBJ(string,1),
+ strlen(GETOBJ(string,1))) != STATUS_OK) {
+ printf("\n Configuration of vipercell customer information failed");
+ }
+ } else {
+ if (oam_setMibByteAry(CLI_MODULE_ID,MIB_viperCellCustomerInfo,(unsigned char *)" ",
+ 1) != STATUS_OK) {
+ printf("\n Configuration of vipercell customer information failed");
+ }
+ }
+ break;
+
+
+ case CONF_CUSTEMAIL :
+
+ NVGEN_STRING_MIB(MIB_viperCellCustomerEmail,
+ "\n Show Configuration of vipercell customer email failed");
+
+ if (csb->sense) {
+ if (oam_setMibByteAry(CLI_MODULE_ID,MIB_viperCellCustomerEmail,
+ (unsigned char *)GETOBJ(string,1),strlen(GETOBJ(string,1))) != STATUS_OK) {
+ printf("\n Configuration of vipercell customer email failed");
+ }
+ } else {
+ if (oam_setMibByteAry(CLI_MODULE_ID,MIB_viperCellCustomerEmail,(unsigned char *)" ",
+ 1) != STATUS_OK) {
+ printf("\n Configuration of vipercell customer email failed");
+ }
+ }
+ break;
+
+
+ case CONF_CUSTPHONE :
+
+ NVGEN_STRING_MIB(MIB_viperCellCustomerPhone,
+ "\n Show Configuration of vipercell customer phone failed");
+ if (csb->sense) {
+ if (oam_setMibByteAry(CLI_MODULE_ID,MIB_viperCellCustomerPhone,
+ (unsigned char *)GETOBJ(string,1),strlen(GETOBJ(string,1))) != STATUS_OK) {
+ printf("\n Configuration of vipercell customer phone failed");
+ }
+ } else {
+ if (oam_setMibByteAry(CLI_MODULE_ID,MIB_viperCellCustomerPhone,
+ (unsigned char *)" ",1) != STATUS_OK) {
+ printf("\n Configuration of vipercell customer phone failed");
+ }
+ }
+ break;
+
+
+ case CONF_CUSTNAME :
+ NVGEN_STRING_MIB(MIB_viperCellCustomerName,
+ "\n Show Configuration of vipercell customer name failed");
+ if (csb->sense) {
+ if (oam_setMibByteAry(CLI_MODULE_ID,MIB_viperCellCustomerName,(unsigned char *)GETOBJ(string,1),
+ strlen(GETOBJ(string,1))) != STATUS_OK) {
+ printf("\n Configuration of vipercell customer name failed");
+ }
+ } else {
+ if (oam_setMibByteAry(CLI_MODULE_ID,MIB_viperCellCustomerName,(unsigned char *)" ",
+ 1) != STATUS_OK) {
+ printf("\n Configuration of vipercell customer name failed");
+ }
+ }
+ break;
+
+
+ case CONF_ASSET :
+ NVGEN_STRING_MIB(MIB_viperCellAssetNumber,
+ "\n Show Configuration of vipercell asset number failed");
+
+ if (csb->sense) {
+ if (oam_setMibByteAry(CLI_MODULE_ID,MIB_viperCellAssetNumber,(unsigned char *)GETOBJ(string,1),
+ strlen(GETOBJ(string,1))) != STATUS_OK) {
+ printf("\n Configuration of vipercell asset number failed");
+ }
+ } else {
+ if (oam_setMibByteAry(CLI_MODULE_ID,MIB_viperCellAssetNumber,(unsigned char *)" ",
+ 1) != STATUS_OK) {
+ printf("\n Configuration of vipercell asset number failed");
+ }
+ }
+ break;
+ oam_getMibIntVar(MIB_viperCellDefGateway,&nvgen_int);
+ address_string(nvgen_int,ip_string);
+ printf("\n ip default-gateway %s",ip_string);;
+
+
+ case CONF_LOCATION :
+
+ NVGEN_STRING_MIB(MIB_viperCellLocation,
+ "\n Show Configuration of vipercell location failed");
+
+ if (csb->sense) {
+ if (oam_setMibByteAry(CLI_MODULE_ID,MIB_viperCellLocation,(unsigned char *)GETOBJ(string,1),
+ strlen(GETOBJ(string,1))) != STATUS_OK) {
+ printf("\n Configuration of vipercell location failed");
+ }
+ } else {
+ if (oam_setMibByteAry(CLI_MODULE_ID,MIB_viperCellLocation,(unsigned char *)" ",
+ 1) != STATUS_OK) {
+ printf("\n Configuration of vipercell location failed");
+ }
+ }
+ break;
+
+
+ case CONF_GW_IPADDR :
+ NVGEN_IP_MIB(MIB_viperCellDefGateway,
+ "\n Show Configuration of vipercell gateway ip address failed");
+ if (csb->sense) {
+ if ((oam_setMibIntVar(CLI_MODULE_ID,MIB_viperCellDefGateway,
+ GETOBJ(paddr,1)->ip_addr))!= STATUS_OK) {
+ printf("\n Configuration of vipercell gateway IP address failed");
+ }
+ } else {
+ if (oam_setMibIntVar(CLI_MODULE_ID,MIB_viperCellDefGateway,0)!= STATUS_OK) {
+ printf("\n Configuration of vipercell gateway IP address failed");
+ }
+ }
+ break;
+
+
+ case CONF_SYS_IPADDR :
+ if (csb->nvgen) {
+ sysIpAddrGet(nvgen_string);
+ printf("\n %s %s",csb->nv_command,nvgen_string);
+ return;
+ }
+ SET_INT_MIB(MIB_viperCellIPAddress,GETOBJ(paddr,1)->ip_addr,0,
+ "\n Configuration of vipercell IP address failed");
+ address_string(GETOBJ(paddr,1)->ip_addr,nvgen_string);
+ address_hexstring(GETOBJ(paddr,2)->ip_addr,ip_string);
+ strcat(nvgen_string,ip_string);
+ sysIpAddrSet(nvgen_string);
+ break;
+
+ case CONF_SYS_NAME :
+ NVGEN_STRING_MIB(MIB_viperCellName,
+ "\n Show Configuration of vipercell name failed");
+ if (csb->sense) {
+ if (oam_setMibByteAry(CLI_MODULE_ID,MIB_viperCellName,(unsigned char *)GETOBJ(string,1),
+ strlen(GETOBJ(string,1))) != STATUS_OK) {
+ printf("\n Configuration of vipercell name failed");
+ }
+ } else {
+ if (oam_setMibByteAry(CLI_MODULE_ID,MIB_viperCellName,(unsigned char *)" ",
+ 1) != STATUS_OK) {
+ printf("\n Configuration of vipercell name failed");
+ }
+ }
+ break;
+ case CONF_SNMP_COMM :
+ NVADDGEN_STRING_MIB(MIB_readCommunity,
+ "\n Show Configuration of vipercell snmp read community failed",TRUE,FALSE);
+ NVADDGEN_STRING_MIB(MIB_writeCommunity,
+ "\n Show Configuration of vipercell snmp write community failed",FALSE,TRUE);
+ if (csb->sense) {
+ oam_setMibByteAry(CLI_MODULE_ID,MIB_readCommunity,(unsigned char *) GETOBJ(string,1),
+ strlen(GETOBJ(string,1)));
+ oam_setMibByteAry(CLI_MODULE_ID,MIB_writeCommunity,(unsigned char *) GETOBJ(string,2),
+ strlen(GETOBJ(string,2)));
+ } else {
+ oam_setMibByteAry(CLI_MODULE_ID,MIB_readCommunity,(unsigned char *)" ",1);
+ oam_setMibByteAry(CLI_MODULE_ID,MIB_writeCommunity,(unsigned char *)" ",1);
+ }
+ }
+}
+
+
+
+/*
+ * voice over ip parameter configuration
+ */
+
+void voip_parameters (parseinfo *csb)
+{
+ switch (csb->which) {
+ case COUNTRY_CODE :
+ NVGEN_INT_MIB(MIB_h323_t35CountryCode,
+ "\n Show Configuration voice-over-ip country code failed")
+ SET_INT_MIB(MIB_h323_t35CountryCode,GETOBJ(int,1),181,
+ "\n Configuration voice-over-ip country code failed");
+ break;
+
+ case CALL_SIG_PORT_NUM :
+ NVGEN_INT_MIB(MIB_h323_Q931CallSignalingPort,
+ "\n Show Configuration voice-over-ip signalling port failed");
+ SET_INT_MIB(MIB_h323_Q931CallSignalingPort,GETOBJ(int,1),1720,
+ "\n Configuration voice-over-ip signalling port failed");
+ break;
+
+ case GMC_IP_ADDR :
+ NVGEN_IP_MIB(MIB_h323_GKIPAddress,
+ "\n Show Configuration gmc ip address failed");
+ SET_INT_MIB(MIB_h323_GKIPAddress,GETOBJ(paddr,1)->ip_addr,0,
+ "\n Configuration gmc ip address failed");
+ break;
+ case GMC_PORT_NUM :
+ NVGEN_INT_MIB(MIB_h323_GKPort,
+ "\n Show Configuration gmc port failed");
+ SET_INT_MIB(MIB_h323_GKPort,GETOBJ(int,1),1719,
+ "\n Configuration gmc port failed");
+ break;
+ }
+}
+
+void mspower_commands (parseinfo *csb)
+{
+ switch(csb->which) {
+ case MAX_POWER_LEVEL :
+ NVGEN_INT_MIB(MIB_msTxPwrMaxCellDef,
+ "\n Show Configuration of ms-power-control max ms tx power failed");
+
+ SET_INT_MIB(MIB_msTxPwrMaxCellDef,GETOBJ(int,1),30,
+ "\n Configuration of ms-power-control max ms tx power failed");
+ break;
+ case UPLINK_TARGET :
+ NVGEN_INT_MIB(MIB_pcLowerThresholdLevParamRxLevelUL,
+ "\n Show Configuration of ms-power-control uplink power control target failed");
+ SET_INT_MIB(MIB_pcLowerThresholdLevParamRxLevelUL,GETOBJ(int,1),30,
+ "\n Configuration of ms-power-control uplink power control target failed");
+ break;
+
+ case SIGNAL_QUALITY :
+ NVGEN_INT_MIB(MIB_pcAveragingQualHreqave,
+ "\n Show Configuration of ms-power-control signal-quality-avg-window failed");
+ SET_INT_MIB(MIB_pcAveragingQualHreqave,GETOBJ(int,1),4,
+ "\n Configuration of ms-power-control signal-quality-avg-window failed");
+ break;
+ case SIGNAL_STRENGTH :
+ NVGEN_INT_MIB(MIB_pcAveragingLevHreqave,
+ "\n Show Configuration of ms-power-control signal-strength-avg-window failed");
+ SET_INT_MIB(MIB_pcAveragingLevHreqave,GETOBJ(int,1),4,
+ "\n Configuration of ms-power-control signal-strength-avg-window failed");
+ break;
+ }
+}
+
+
+static MibTag bts_mib_tags[] = {MIB_allowIMSIAttachDetach,MIB_cellBarred,
+ MIB_dtxDownlink,MIB_rm_nim_1_0,MIB_emergencyCallRestricted};
+
+
+static char *bts_nv_str[] = {
+ " imsi-attach ",
+ " cell-barred ",
+ " downlink-dtx ",
+ " imsi-for-emergency ",
+ " restricted-emergency-call "
+};
+
+static char *bts_set_fail[] = {
+ "\n IMSI Attach enable/disable failed",
+ "\n Cell barred enable/disable failed",
+ "\n Downlink dex enable/disable failed",
+ "\n Imsi for emergency required enable/disable failed",
+ "\n Restricted emergency call enable/disable failed"
+
+};
+
+static char *bts_dtx_mode[] = {
+ " ms-may-use-dtx ",
+ " ms-shall-use-dtx ",
+ " ms-shall-not-use-dtx "
+};
+
+static void bts_options_nvgen (void)
+{
+ long nvgen_int;
+ int intbuf[2]= {0,0};
+ int index;
+
+ printf("\n\n config-cell");
+
+ for (index = 0;index < 5;index++) {
+ oam_getMibIntVar(bts_mib_tags[index],&nvgen_int);
+ if (nvgen_int) {
+ printf("\n\t bts-options %s enable",bts_nv_str[index]);
+ } else {
+ printf("\n\t no bts-options %s enable",bts_nv_str[index]);
+ }
+ }
+
+ oam_getMibIntVar(MIB_timerPeriodicUpdateMS,&nvgen_int);
+ printf("\n\t bts-options location-update-interval %d ",nvgen_int);
+
+ for (index=0;index<16;index++) {
+ oam_getMibTblEntry(MIBT_notAllowedAccessClassEntry,index,intbuf,sizeof(int)*2);
+ if (intbuf[1]) {
+ printf("\n\t bts-options ms-access-class-not-allowed %d",index);
+ } else {
+ printf("\n\t no bts-options ms-access-class-not-allowed %d",index);
+ }
+ }
+
+ oam_getMibIntVar(MIB_dtxUplink,&nvgen_int);
+ printf("\n\t bts-options dtx-mode %s",bts_dtx_mode[nvgen_int]);
+
+}
+
+
+void bts_options (parseinfo *csb)
+{
+ int intbuf[2] = {0,1};
+ int intnobuf[2] = {0,0};
+
+ switch (csb->which) {
+ case UPDATE_INTERVAL :
+ if (csb->nvgen) {
+ bts_options_nvgen ();
+ return;
+ }
+ SET_INT_MIB(MIB_timerPeriodicUpdateMS,GETOBJ(int,1),30,
+ "\n Configuration of update interval failed");
+ break;
+
+ case ACCESS_CLASS :
+ if (csb->nvgen) {
+ return;
+ }
+ if (csb->sense) {
+ oam_setMibTblEntry(CLI_MODULE_ID,MIBT_notAllowedAccessClassEntry,GETOBJ(int,1),intbuf,
+ sizeof(int) *2);
+ } else {
+ oam_setMibTblEntry(CLI_MODULE_ID,MIBT_notAllowedAccessClassEntry,GETOBJ(int,1),intnobuf,sizeof(int) *2);
+ }
+ break;
+
+ case DTX_MODE_OPTIONS :
+ NVGEN_INT_MIB(MIB_dtxUplink,
+ "\n Show Configuration of downlink dtx failed");
+ SET_INT_MIB(MIB_dtxUplink,GETOBJ(int,1),2,
+ "\n Configuration of downlink dtx failed");
+ break;
+ case ENABLE_OPTIONS :
+ SET_INT_MIB(bts_mib_tags[GETOBJ(int,1)],1,0,
+ bts_set_fail[GETOBJ(int,1)]);
+ break;
+ }
+}
+
+
+static void authentication_nvgen (parseinfo *csb)
+{
+ long nvgen_int1,nvgen_int2;
+ oam_getMibIntVar(MIB_mm_authenticationRequired,&nvgen_int1);
+ oam_getMibIntVar(MIB_mm_cipheringRequired,&nvgen_int2);
+
+ if (nvgen_int1 && nvgen_int2){
+ printf("\n %s ciphering enable",csb->nv_command);
+ return;
+ }
+
+ if (nvgen_int1) {
+ printf("\n %s enable",csb->nv_command);
+ return;
+ }
+
+ if (!nvgen_int1) {
+ printf("\n no %s ciphering enable",csb->nv_command);
+ }
+}
+
+
+/*
+ * system feature control parameters
+ */
+
+void sysfeature_commands (parseinfo *csb)
+{
+ switch (csb->which) {
+ case CELL_BARR_ENABLE :
+ NVGEN_BOOL_MIB(MIB_rm_nim_1_1,
+ "\n Show Configuration of cell barring failed");
+ SET_INT_MIB(MIB_rm_nim_1_1,csb->sense,0,
+ "\n Configuration of cell barring failed");
+ break;
+
+ case SMS_CB_ENABLE :
+ NVGEN_BOOL_MIB (MIB_rm_nim_0_1,
+ "\n Show Configuration of sms cb failed");
+ SET_INT_MIB(MIB_rm_nim_0_1,csb->sense,0,
+ "\n Configuration of sms cb failed");
+ break;
+
+ case AUTH_FREQ_VAL :
+ NVGEN_INT_MIB(MIB_rm_nim_0_7,
+ "\n Show Configuration of authenticaion frequency failed");
+ SET_INT_MIB(MIB_rm_nim_0_7,GETOBJ(int,1),1,
+ "\n Configuration of authenticaion frequency failed");
+ break;
+ case AUTH_CIPH_ENABLE :
+ if (csb->nvgen) {
+ authentication_nvgen(csb);
+ return;
+ }
+ SET_INT_MIB(MIB_mm_authenticationRequired,csb->sense,0,
+ "\n Configuration of authenticaion failed");
+ SET_INT_MIB(MIB_mm_cipheringRequired,GETOBJ(int,1),0,
+ "\n Configuration of ciphering failed");
+
+ break;
+ }
+}
+
+void gp10_config_cdr_data(parseinfo *csb)
+{
+
+ switch (csb->which){
+
+ case CONFIG_CDR_CLIENT_SSL_ENABLE:
+ NVGEN_BOOL_MIB(MIB_cdrClientSSLEnable,
+ "\nShow configuration of cdr client ssl enable failed");
+ SET_INT_MIB(MIB_cdrClientSSLEnable,csb->sense,0,
+ "\nConfiguration of cdr client ssl failed");
+ break;
+
+ case CONFIG_CDR_PASSWORD:
+ if (csb->nvgen) {
+ return;
+ }
+
+ if(csb->sense) {
+ if(SavePwdCdr((unsigned char *)GETOBJ(string, 2)) == 0) {
+ printf("\nConfiguration of CDR Client password failed\n");
+ }
+ } else {
+ if(SavePwdCdr("") == 0) {
+ printf("\nConfiguration of CDR Client password failed\n");
+ }
+ }
+ break;
+ default:
+ printf("\n Incorrect data");
+ break;
+ } /* END SWITCH */
+} /* gp10_config_cdr_data() */
+
+void handover_control_average_nv (parseinfo *csb)
+{
+ long nvgen_int;
+
+ oam_getMibIntVar(MIB_hoThresholdLevParamNx,&nvgen_int);
+ printf("\n %s N5 %d",csb->nv_command,nvgen_int);
+ oam_getMibIntVar(MIB_hoThresholdQualParamNx,&nvgen_int);
+ printf("\n %s N6 %d",csb->nv_command,nvgen_int);
+ oam_getMibIntVar(MIB_hoThresholdLevParamPx,&nvgen_int);
+ printf("\n %s P5 %d",csb->nv_command,nvgen_int);
+ oam_getMibIntVar(MIB_hoThresholdQualParamPx,&nvgen_int);
+ printf("\n %s P6 %d",csb->nv_command,nvgen_int);
+}
+
+static void handover_control_str_nv (parseinfo *csb)
+{
+ long nvgen_int;
+
+ oam_getMibIntVar(MIB_hoThresholdQualParamRxQualUL,&nvgen_int);
+ printf("\n %s uplink quality %d",csb->nv_command,nvgen_int);
+ oam_getMibIntVar(MIB_hoThresholdQualParamRxQualDL,&nvgen_int);
+ printf("\n %s downlink quality %d",csb->nv_command,nvgen_int);
+ oam_getMibIntVar(MIB_hoThresholdLevParamRxLevelUL,&nvgen_int);
+ printf("\n %s uplink strength %d",csb->nv_command,nvgen_int);
+ oam_getMibIntVar(MIB_hoThresholdLevParamRxLevelDL,&nvgen_int);
+ printf("\n %s downlink strength %d",csb->nv_command,nvgen_int);
+}
+
+void handover_control_commands (parseinfo *csb)
+{
+ switch (csb->which) {
+ case HANDOVER_AVERAGE :
+ if (csb->nvgen) {
+ handover_control_average_nv(csb);
+ return;
+ }
+ switch (GETOBJ(int,1)) {
+ case HANDOVER_N5 :
+ NVGEN_INT_MIB(MIB_hoThresholdLevParamNx,
+ "\n Show Configuration of N5 failed");
+ SET_INT_MIB(MIB_hoThresholdLevParamNx,GETOBJ(int,2),4,
+ "\n Configuration of N5 failed");
+ break;
+ case HANDOVER_N6 :
+ NVGEN_INT_MIB(MIB_hoThresholdQualParamNx,
+ "\n Show Configuration of N6 failed");
+ SET_INT_MIB(MIB_hoThresholdQualParamNx,GETOBJ(int,2),4,
+ "\n Configuration of N6 failed");
+ break;
+ case HANDOVER_P5 :
+ NVGEN_INT_MIB(MIB_hoThresholdLevParamPx,
+ "\n Show Configuration of P5 failed");
+ SET_INT_MIB(MIB_hoThresholdLevParamPx,GETOBJ(int,2),4,
+ "\n Configuration of P5 failed");
+ break;
+ case HANDOVER_P6 :
+ NVGEN_INT_MIB(MIB_hoThresholdQualParamPx,
+ "\n Show Configuration of P6 failed");
+ SET_INT_MIB(MIB_hoThresholdQualParamPx,GETOBJ(int,2),4,
+ "\n Configuration of P6 failed");
+ break;
+ }
+ break;
+
+ case HANDOVER_QUALITY :
+ switch (GETOBJ(int,1)) {
+ case UPLINK :
+ SET_INT_MIB(MIB_hoThresholdQualParamRxQualUL,GETOBJ(int,2),4,
+ "\n Configuration of uplink quality failed");
+ break;
+ case DOWNLINK :
+ SET_INT_MIB(MIB_hoThresholdQualParamRxQualDL,GETOBJ(int,2),4,
+ "\n Configuration of downlink quality failed");
+ break;
+ }
+ break;
+
+ case HANDOVER_STRENGTH :
+ if (csb->nvgen) {
+ handover_control_str_nv(csb);
+ return;
+ }
+ switch (GETOBJ(int,1)) {
+ case UPLINK :
+ SET_INT_MIB(MIB_hoThresholdLevParamRxLevelUL,GETOBJ(int,2),20,
+ "\n Configuration of uplink strength failed");
+ break;
+ case DOWNLINK :
+ SET_INT_MIB(MIB_hoThresholdLevParamRxLevelDL,GETOBJ(int,2),20,
+ "\n Configuration of downlink strength failed");
+ break;
+ }
+ }
+}
+
+
+#define LOG_DEST_CONSOLE 0x0001
+#define LOG_DEST_NETWORK 0x0002
+#define LOG_DEST_FILE 0x0004
+
+int logging_dest=LOG_DEST_CONSOLE;
+int log_port;
+long log_host;
+
+
+extern void ViperLogSetConsolePrintOptions__Fi(BOOL);
+void logging_option (parseinfo *csb)
+{
+ char log_ipaddr[16];
+
+ if (csb->nvgen) {
+
+ if(logging_dest==0){
+ printf("\nlogging not configured\n");
+ return;
+ }
+
+ if(logging_dest & LOG_DEST_CONSOLE){
+ printf("\nlogging console");
+ }
+ if(logging_dest & LOG_DEST_NETWORK){
+ if (log_host != 0) {
+ if (log_port != 0)
+ printf("\nlogging %s %d",address_string(log_host,log_ipaddr),log_port);
+ else
+ printf("\nlogging %s",address_string(log_host,log_ipaddr));
+ }
+ }
+ if(logging_dest & LOG_DEST_FILE){
+ printf("\nlogging file");
+ }
+
+ return;
+ }
+
+
+ if (!csb->sense) {
+ switch(logging_dest){
+ case LOG_DEST_CONSOLE:
+ logging_dest &= ~LOG_DEST_CONSOLE;
+ break;
+ case LOG_DEST_FILE:
+ logging_dest &= ~LOG_DEST_FILE;
+ break;
+ case LOG_DEST_NETWORK:
+ logging_dest &= ~LOG_DEST_NETWORK;
+ break;
+ }
+ return;
+ }
+
+ switch (csb->which) {
+ case LOG_CONSOLE :
+ logging_dest |= LOG_DEST_CONSOLE;
+ break;
+ case LOG_FILE :
+ logging_dest |= LOG_DEST_FILE;
+ break;
+ case LOG_HOST :
+ logging_dest |= LOG_DEST_NETWORK;
+ log_host = GETOBJ(paddr,1)->ip_addr;
+ address_string(GETOBJ(paddr,1)->ip_addr,log_ipaddr);
+ if (GETOBJ(int,1) != 0) {
+ log_port = GETOBJ(int,1);
+ ViperLogSetDestPort(GETOBJ(int,1));
+ }
+ ViperLogSetDestAddress(log_ipaddr);
+ break;
+ }
+}
+
+
+
+void gp10_sub_config_exit (parseinfo *csb)
+{
+ set_mode_byname(&csb->mode,"configure",MODE_VERBOSE);
+}
+
+void gp10_cell_sub_config_exit (parseinfo *csb)
+{
+ set_mode_byname(&csb->mode,"config-cell",MODE_VERBOSE);
+}
diff --git a/data/mnet/GP10/Host/cli/src/trx_chain.c b/data/mnet/GP10/Host/cli/src/trx_chain.c
new file mode 100644
index 0000000..241f0a3
--- /dev/null
+++ b/data/mnet/GP10/Host/cli/src/trx_chain.c
@@ -0,0 +1,167 @@
+#include "parser_if.h"
+
+#include "oam_api.h"
+#include "mibtags.h"
+#include "MnetModuleId.h"
+
+#define TCH_FULL 1
+#define BCCH_COMBINED 5
+#define USE_BCC 0
+
+/*
+ * Parse chains for transceiver configuration
+ */
+#define ALTERNATE NONE
+#include "../include/cfg_trx.h"
+LINK_POINT(cfg_trx, ALTERNATE);
+#undef ALTERNATE
+
+
+
+static parser_extension_request cfg_trx_init_table[] = {
+ { PARSE_ADD_CFG_GP10_CELL_TRX, &pname(cfg_trx) },
+ { PARSE_LIST_END, NULL }
+};
+
+/*
+ * Register the parser chain
+ */
+void cfg_trx_parser_init (void)
+{
+ parser_add_command_list(cfg_trx_init_table,"config");
+}
+
+static char *admin_state[] = {
+ " locked ",
+ " unlocked ",
+ " shutting-down "
+};
+void trx_nvgen ()
+{
+ long nvgen_int,channel;
+ CellAllocationEntry cell_entry;
+ CarrierFrequencyEntry freq_entry;
+ ChannelEntry chan_entry;
+
+ printf("\n\n transceiver 0");
+
+ oam_getMibTblEntry(MIBT_cellAllocationEntry,0,&cell_entry,sizeof(CellAllocationEntry));
+ printf("\n\t bts-cell-allocation %d",cell_entry.cellAllocation);
+
+ oam_getMibTblEntry(MIBT_carrierFrequency_0_Entry,0,&freq_entry,sizeof(CarrierFrequencyEntry));
+ printf("\n\t radio-carrier radio-frequency %d",freq_entry.carrierFrequency);
+
+ oam_getMibIntVar(MIB_txPwrMaxReduction_0,&nvgen_int);
+ printf("\n\t radio-carrier transmit-power-reduction %d",nvgen_int);
+
+ oam_getMibIntVar(MIB_basebandAdministrativeState_0,&nvgen_int);
+ printf("\n\t administrative-state %s",admin_state[nvgen_int]);
+
+ for (channel=0;channel < 8;channel++) {
+ oam_getMibTblEntry(MIBT_channel_0_Entry,channel,&chan_entry,sizeof(ChannelEntry));
+ printf("\n\t channel-table %d channel-combination %s training-sequence USE-BCC administrative-state %s",channel,
+ (chan_entry.channelCombination == BCCH_COMBINED)?"BCCH-COMBINED":"TCH-FULL",
+ admin_state[chan_entry.channelAdministrativeState]);
+ }
+ printf("\n\n transceiver 1");
+
+ oam_getMibTblEntry(MIBT_cellAllocationEntry,1,&cell_entry,sizeof(CellAllocationEntry));
+ printf("\n\t bts-cell-allocation %d",cell_entry.cellAllocation);
+
+ oam_getMibTblEntry(MIBT_carrierFrequency_1_Entry,0,&freq_entry,sizeof(CarrierFrequencyEntry));
+ printf("\n\t radio-carrier radio-frequency %d",freq_entry.carrierFrequency);
+
+ oam_getMibIntVar(MIB_txPwrMaxReduction_1,&nvgen_int);
+ printf("\n\t radio-carrier transmit-power-reduction %d",nvgen_int);
+
+ oam_getMibIntVar(MIB_basebandAdministrativeState_1,&nvgen_int);
+ printf("\n\t administrative-state %s",admin_state[nvgen_int]);
+
+ for (channel=0;channel < 8;channel++) {
+ oam_getMibTblEntry(MIBT_channel_1_Entry,channel,&chan_entry,sizeof(ChannelEntry));
+ printf("\n\t channel-table %d channel-combination TCH-FULL training-sequence USE-BCC adminstration-state %s",channel,admin_state[chan_entry.channelAdministrativeState]);
+ }
+}
+
+/*
+ * command handler for transceiver parameters
+ */
+void transceiver_parameters (parseinfo *csb)
+{
+ int ifnum;
+ int intbuf[7];
+
+ ifnum = (int) GETOBJ(udb,current1);
+
+ switch (csb->which) {
+ case TRX_RADIO_FREQUENCY :
+ intbuf[0] = 0;
+ if (csb->sense) {
+ intbuf[1] = GETOBJ(int,1);
+ } else {
+ intbuf[1] = 0;
+ }
+ if (ifnum == 0) {
+ oam_setMibTblEntry(CLI_MODULE_ID,MIBT_carrierFrequency_0_Entry,0,intbuf,
+ sizeof(int) *2);
+ } else {
+ oam_setMibTblEntry(CLI_MODULE_ID,MIBT_carrierFrequency_1_Entry,0,intbuf,
+ sizeof(int) *2);
+ }
+ break;
+
+ case TRX_POWER_REDUCTION :
+ if (ifnum == 0) {
+ SET_INT_MIB(MIB_txPwrMaxReduction_0,GETOBJ(int,1),0,
+ "\n Configuration of transmit power reduction failed");
+ } else {
+ SET_INT_MIB(MIB_txPwrMaxReduction_1,GETOBJ(int,1),0,
+ "\n Configuration of transmit power reduction failed");
+ }
+ break;
+
+ case TRX_CHANNEL_TABLE :
+ intbuf[0] = 0;
+ intbuf[1] = GETOBJ(int,1);
+ intbuf[2] = GETOBJ(int,3);
+ intbuf[3] = 0;
+ intbuf[4] = USE_BCC;
+ if (csb->sense) {
+ intbuf[5] = GETOBJ(int,2);
+ } else {
+ intbuf[5] = STATE_UNLOCKED;
+ }
+ intbuf[6] = 1;
+
+ if (ifnum == 0) {
+ oam_setMibTblEntry(CLI_MODULE_ID,MIBT_channel_0_Entry,GETOBJ(int,1),intbuf,
+ sizeof(int) * 7);
+ } else {
+ oam_setMibTblEntry(CLI_MODULE_ID,MIBT_channel_1_Entry,GETOBJ(int,1),intbuf,
+ sizeof(int) * 7);
+ }
+ break;
+
+ case TRX_ADMIN_STATE :
+ if (ifnum == 0) {
+ SET_INT_MIB( MIB_basebandAdministrativeState_0,GETOBJ(int,1),1,
+ "\n Configuration of Administrative state failed");
+ } else {
+ SET_INT_MIB( MIB_basebandAdministrativeState_1,GETOBJ(int,1),1,
+ "\n Configuration of Administrative state failed");
+ }
+ break;
+
+ case TRX_ARFCN_NUMBER :
+ intbuf[0] = 0;
+ if (csb->sense) {
+ intbuf[1] = GETOBJ(int,1);
+ } else {
+ intbuf[1] = 0;
+ }
+ oam_setMibTblEntry(CLI_MODULE_ID,MIBT_cellAllocationEntry,ifnum,intbuf,
+ sizeof(int) *2);
+ break;
+ }
+}
+
diff --git a/data/mnet/GP10/Host/depend.tcl b/data/mnet/GP10/Host/depend.tcl
new file mode 100644
index 0000000..ed16683
--- /dev/null
+++ b/data/mnet/GP10/Host/depend.tcl
@@ -0,0 +1,27 @@
+# depend.tcl - pattern substitution file for dependency lists
+#
+# modification history
+# -------------------------------------
+# Sept 19, 1999 Bhawani Initial Draft
+
+# DESCRIPTION
+# This file converts path names generated by the compiler back to Makefile
+# variables and appends the the variable $(OBJDIR)/ to the object being
+# created so that at compile time the object will get placed where we want
+# it.
+# OBJDIR and OBJSUF need to be defined in the Makefile
+#
+
+if {$argc != 1} {
+ error "usage : depend.tcl \$\(TGT_DIR\)"
+}
+set uppat [lindex $argv 0]
+#double backslashes
+regsub -all {\\} $uppat {\\\\} uppat2
+
+while {[gets stdin line] >= 0} {
+ regsub {^.*\.o} $line "\$\(OBJDIR\)/&" newline
+ regsub {\.o} $newline "\$\(OBJSUF\)" newline1
+ regsub -all $uppat2 $newline1 "\$\(TGT_DIR\)" newline2
+ puts stdout $newline2
+}
diff --git a/data/mnet/GP10/Host/gp10_Template/Makefile b/data/mnet/GP10/Host/gp10_Template/Makefile
new file mode 100644
index 0000000..c0525a0
--- /dev/null
+++ b/data/mnet/GP10/Host/gp10_Template/Makefile
@@ -0,0 +1,17 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ copy bin\*.out $(TOP_OF_VOB)\bin\*.out
+
diff --git a/data/mnet/GP10/Host/gp10_Template/include/gp10_template.h b/data/mnet/GP10/Host/gp10_Template/include/gp10_template.h
new file mode 100644
index 0000000..0b6d49b
--- /dev/null
+++ b/data/mnet/GP10/Host/gp10_Template/include/gp10_template.h
@@ -0,0 +1,33 @@
+/********************************************************************
+ *
+ * (c) Copyright Cisco 2000
+ * All Rights Reserved
+ *
+ ********************************************************************/
+
+/********************************************************************
+ *
+ * Version : 1.0
+ * Status : Under development
+ * File : gp10_template.h
+ * Author(s) : Lou Travaglione
+ * Create Date : 9/6/00
+ * Description : Demo header code for template directory.
+ *
+ ********************************************************************
+
+#ifndef _GP10_TEMPLATE_H_
+#define _GP10_TEMPLATE_H_
+
+/*************************************************************
+ *
+ * Module Name: Call_Hello_World
+ *
+ * Function: Demo function for template directory.
+ *
+ *************************************************************/
+
+void Call_Hello_World(void);
+
+
+#endif /* _GP10_TEMPLATE_H_ */ \ No newline at end of file
diff --git a/data/mnet/GP10/Host/gp10_Template/src/Makefile b/data/mnet/GP10/Host/gp10_Template/src/Makefile
new file mode 100644
index 0000000..fa83a10
--- /dev/null
+++ b/data/mnet/GP10/Host/gp10_Template/src/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = gp10_Template
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\$(THIS_APP_DIR).out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR = vxTemplate
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) .\bin\*.o
+ $(RM) .\bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/gp10_Template/src/gp10_template.c b/data/mnet/GP10/Host/gp10_Template/src/gp10_template.c
new file mode 100644
index 0000000..ecbf163
--- /dev/null
+++ b/data/mnet/GP10/Host/gp10_Template/src/gp10_template.c
@@ -0,0 +1,34 @@
+/* *******************************************************************
+ *
+ * (c) Copyright Cisco 2000
+ * All Rights Reserved
+ *
+ *********************************************************************/
+
+/*********************************************************************
+ *
+ * Version : 1.0
+ * Status : Under development
+ * File : gp10_template.c
+ * Author(s) : Lou Travaglione
+ * Create Date : 8/29/00
+ * Description : Demo source code for template directory.
+ *
+ *********************************************************************/
+
+#include <stdio.h>
+#include "include/vxTemplate/vxTemplateIF.h"
+
+/*************************************************************
+ *
+ * Module Name: Call_Hello_World
+ *
+ * Function: Demo function for template directory.
+ *
+ *************************************************************/
+
+void Call_Hello_World(void)
+{
+ Hello_World();
+}
+
diff --git a/data/mnet/GP10/Host/grr/Makefile b/data/mnet/GP10/Host/grr/Makefile
new file mode 100644
index 0000000..69aaecb
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/Makefile
@@ -0,0 +1,16 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src src_api src_init
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ $(CP) bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/grr/src/Makefile b/data/mnet/GP10/Host/grr/src/Makefile
new file mode 100644
index 0000000..b628614
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = grr
+THIS_DIRECTORY = Src
+MY_OUTPUT = $(OBJDIR)\grr.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/grr/src/grr_DspUtil.cpp b/data/mnet/GP10/Host/grr/src/grr_DspUtil.cpp
new file mode 100644
index 0000000..08e127a
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src/grr_DspUtil.cpp
@@ -0,0 +1,237 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_DSPUTIL_CPP__
+#define __GRR_DSPTTIL_CPP__
+
+#include "grr\grr_head.h"
+
+void grr_FirstRadioCtrl(void)
+{
+ int i;
+
+ DBG_FUNC("grr_FirstRadioCtrl", GRR_LAYER_DSP);
+ DBG_ENTER();
+
+ for (i=0;i<OAMgrr_MAX_TRXS;i++)
+ {
+ switch(OAMgrr_TRX_AMSTATE(i))
+ {
+ case unlocked:
+ grr_TuneTrxSynth(i,GRR_ON);
+ break;
+ case locked:
+ grr_SubmitAlarm(grr_TrxAmStateLockedAlarmCode[i]);
+ break;
+ case shuttingDown:
+ default:
+ DBG_WARNING("grr_FirstRadioCtrl: trx(%d) initialization failed due to improper amState(%d)\n",
+ i, OAMgrr_TRX_AMSTATE(i));
+ printf("grr_FirstRadioCtrl: trx(%d) initialization failed due to improper amState(%d)\n",
+ i, OAMgrr_TRX_AMSTATE(i));
+ if (OAMgrr_TRX_AMSTATE(i)==shuttingDown)
+ grr_SubmitAlarm(grr_TrxAmStateShuttingdownAlarmCode[i]);
+ else
+ grr_SubmitAlarm(grr_TrxAmStateInvalidAlarmCode[i]);
+
+ assert(0);
+ break;
+ }
+ }
+ DBG_LEAVE();
+}
+
+void grr_RadioCtrl(unsigned char pwr)
+{
+ int i;
+
+ DBG_FUNC("grr_RadioCtrl", GRR_LAYER_DSP);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_RadioCtrl: set radio power(%d)\n", pwr);
+
+ if (pwr>1)
+ {
+ DBG_WARNING("grr_RadioCtrl: invalid radio power setting(%d)\n", pwr);
+ DBG_LEAVE();
+ return;
+ }
+
+ for (i=0;i<OAMgrr_MAX_TRXS;i++)
+ {
+ grr_TuneTrxSynth(i,pwr);
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_TuneTrxSynth(unsigned char trx, unsigned char pwr)
+{
+ DBG_FUNC("grr_TuneTrxSynth", GRR_LAYER_DSP);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_TuneTrxSynth: set power(%d) for trx(%d)\n", pwr, trx);
+
+ //Apply sanitary check
+ if (trx>=OAMgrr_MAX_TRXS)
+ {
+ DBG_WARNING("grr_TuneTrxSynth: invalid trx(%d)\n", trx);
+ DBG_LEAVE();
+ }
+
+ grr_SendDspArfcn(trx, OAMgrr_BCCH_CARRIER_phTRX);
+
+ switch(trx)
+ {
+ case 0:
+ if (OAMgrr_BCCH_CARRIER_phTRX)
+ { //phTRX 1 as bcch carrier trx ie trx-es swapped scenario
+ grr_SendDspTuneSynth(0, 0, OAMgrr_HOPPING_CTRL, pwr, OAMgrr_ARFCN(0));
+ //phTRX, syth, Hopping, pwrSetting, trxPackage
+ } else
+ { //phTRX 0 as bcch carrier trx ie trx-es non-swapped scenario
+ grr_SendDspTuneSynth(1, 0, OAMgrr_HOPPING_CTRL, pwr, OAMgrr_ARFCN(0));
+ //phTRX, syth, Hopping, pwrSetting, trxPackage
+ grr_SendDspTuneSynth(1, 1, OAMgrr_HOPPING_CTRL, pwr, OAMgrr_ARFCN(0));
+ //phTRX, syth, Hopping, pwrSetting, trxPackage
+ }
+ break;
+ case 1:
+ if (OAMgrr_BCCH_CARRIER_phTRX)
+ { //phTRX 1 as bcch carrier trx ie trx-es swapped scenario
+ grr_SendDspTuneSynth(1, 0, OAMgrr_HOPPING_CTRL, pwr, OAMgrr_ARFCN(1));
+ //phTRX, syth, Hopping, pwrSetting, trxPackage
+ grr_SendDspTuneSynth(1, 1, OAMgrr_HOPPING_CTRL, pwr, OAMgrr_ARFCN(1));
+ //phTRX, syth, Hopping, pwrSetting, trxPackage
+ } else
+ { //phTRX 0 as bcch carrier trx ie trx-es non-swapped scenario
+ grr_SendDspTuneSynth(0, 0, OAMgrr_HOPPING_CTRL, pwr, OAMgrr_ARFCN(1));
+ //phTRX, syth, Hopping, pwrSetting, trxPackage
+ }
+ break;
+ }
+
+ DBG_LEAVE();
+}
+
+
+void grr_StartDspsWatch(void)
+{
+ unsigned char i;
+
+ DBG_FUNC("grr_StartDspsWatch", GRR_LAYER_DSP);
+ DBG_ENTER();
+
+ //Start keep-alive watch dogs
+ for (i=0;i<OAMgrr_MAX_TRXS;i++)
+ {
+ grr_InitDspWdog(i);
+ grr_StartDspWdog(i);
+ grr_SendDspPing(i);
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_InitDspWdog(unsigned char dsp)
+{
+ int i;
+ WDOG_ID timer_id;
+
+ DBG_FUNC("grr_InitDspWdog", GRR_LAYER_DSP);
+ DBG_ENTER();
+
+ //Create watch dog timer for the trx
+ if ( (timer_id=wdCreate()) == NULL )
+ {
+ grr_SubmitAlarm(EC_GRR_OS_CALL_WDCREATE_FAILED);
+ DBG_ERROR("grr_InitDspWdog:failed to create dsp(%d) watch dog timer\n", dsp);
+ printf("grr_InitDspWdog:failed to create dsp(%d) watch dog timer\n", dsp);
+ assert(0);
+ }
+ grr_TrxMgmt[dsp].wdog.timer_id = timer_id;
+ grr_TrxMgmt[dsp].wdog.time = OAMgrr_WDOG_TIME;
+ grr_TrxMgmt[dsp].wdog.state = false;
+
+ DBG_LEAVE();
+}
+
+
+//Start DSP watch dog
+void grr_StartDspWdog(unsigned char dsp)
+{
+ DBG_FUNC("grr_StartDspWdog", GRR_LAYER_DSP);
+ DBG_ENTER();
+
+ if ( ERROR == (wdStart(grr_TrxMgmt[dsp].wdog.timer_id,
+ OAMgrr_WDOG_TIME,(FUNCPTR)grr_ProcDspWdogExpired,
+ ((dsp<<8)|GRR_WDOG) ) ) )
+ {
+ grr_SubmitAlarm(EC_GRR_OS_CALL_WDSTART_FAILED);
+ DBG_ERROR("grr_StartDspWdog:failed to call wdstart for dsp(%d) wdog timerId(%x) errno(%d)\n",
+ dsp, grr_TrxMgmt[dsp].wdog.timer_id, errno);
+ printf("grr_StartDspWdog:failed to call wdstart for dsp(%d) wdog timerId(%x) errno(%d)\n",
+ dsp, grr_TrxMgmt[dsp].wdog.timer_id, errno);
+
+ assert(0);
+ }
+
+ DBG_LEAVE();
+}
+
+
+int grr_ProcDspWdogExpired(int param)
+{
+ STATUS ret;
+
+ DBG_FUNC("grr_ProcDspWdogExpired", GRR_LAYER_DSP);
+ DBG_ENTER();
+
+ grr_ItcRxGrrMsg_t msg;
+
+ msg.module_id = MODULE_GRR;
+ msg.primitive_type = GRR_DSP_WDOG_EXPIRED;
+ msg.trx = (unsigned char)(param>>8);
+ msg.timer_id = (unsigned char)(param);
+
+ //
+ if (STATUS_OK != (ret = msgQSend(grr_MsgQId, (char*)&msg, GRR_MAX_GRRMSG_LEN,
+ NO_WAIT, MSG_PRI_NORMAL) ) )
+ {
+ grr_SubmitAlarm(EC_GRR_OS_CALL_MSGQSEND_FAILED);
+ DBG_ERROR("grr_ProcDspWdogExpired: msgQSend failed Q(%x) ret(%d) errno(%d) dsp(%d) timer(%d)\n",
+ grr_MsgQId, ret, errno, (unsigned char)(param>>8), (unsigned char)(param));
+ printf("grr_ProcDspWdogExpired: msgQSend failed Q(%x) ret(%d) errno(%d) dsp(%d) timer(%d)\n",
+ grr_MsgQId, ret, errno, (unsigned char)(param>>8), (unsigned char)(param));
+ assert(0);
+ }
+
+ DBG_LEAVE();
+}
+
+//Acitvate the given trx and slot
+void grr_ActTrxSlot(unsigned char trx, unsigned char slot)
+{
+ DBG_FUNC("grr_ActTrxSlot", GRR_LAYER_DSP);
+ DBG_ENTER();
+
+ //safeguard only
+ if ( (trx>=OAMgrr_MAX_TRXS) || (slot>=8) )
+ {
+ DBG_WARNING("grr_ActTrxSlot: invalid time slot trx(%d) slot(%d)\n",
+ trx, slot);
+ } else
+ //Activate the given trx and slot
+ grr_SendDspSlotActivate(trx,slot);
+
+ DBG_LEAVE();
+}
+
+
+#endif //__GRR_DSPUTIL_CPP__
diff --git a/data/mnet/GP10/Host/grr/src/grr_GetOamMib.cpp b/data/mnet/GP10/Host/grr/src/grr_GetOamMib.cpp
new file mode 100644
index 0000000..becf205
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src/grr_GetOamMib.cpp
@@ -0,0 +1,592 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_GETOAMMIB_CPP__
+#define __GRR_GETOAMMIB_CPP__
+
+#include "grr\grr_head.h"
+
+void grr_GetOamBtsBasicPackage(void)
+{
+ int i;
+ STATUS ret;
+
+ DBG_FUNC("grr_GetOamBtsBasicPackage", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ //step 1: get the bts basic package structure first
+ ret = getMibStruct(MIB_btsBasicPackage, (unsigned char*)&grr_OamData.btsBasicPackage,
+ sizeof(BtsBasicPackage));
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamBtsBasicPackage: getMibStruct failed to get btsBasicPackage err(%d)\n", ret);
+ printf("grr_GetOamBtsBasicPackage: getMibStruct failed to get btsBasicPackage err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBSTRUCT_FAILED);
+ DBG_LEAVE();
+ assert(0);
+ }
+
+ // step 2: get the cell allocation table
+ ret = getMibTbl(MIBT_cellAllocationEntry, (void *) &cellAllocationTable,
+ sizeof(cellAllocationTable));
+
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamBtsBasicPackage: getMibTbl failed to get cell allocation table err(%d)\n", ret);
+ printf("grr_GetOamBtsBasicPackage: getMibTbl failed to get cell allocation table err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBTBL_FAILED);
+ DBG_LEAVE();
+ assert(0);
+ }
+
+ grr_OamData.btsBasicPackage.cellAllocationTable= (Table *) &cellAllocationTable;
+
+ //step 3: get plmnPermitted Table
+ ret = getMibTbl(MIBT_plmnPermittedEntry, (void *) &plmnPermittedTable,
+ sizeof(plmnPermittedTable));
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamBtsBasicPackage: getMibTbl failed to get plmnPermittedTable err(%d)\n", ret);
+ printf("grr_GetOamBtsBasicPackage: getMibTbl failed to get plmnPermittedTable err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBTBL_FAILED);
+ DBG_LEAVE();
+ assert(0);
+ }
+
+ grr_OamData.btsBasicPackage.plmnPermittedTable= (Table *) &plmnPermittedTable;
+
+ // Convert mcc to byte string
+ getByteAryByInt( grr_OamData.btsBasicPackage.bts_mcc,
+ (char*)&grr_OamData.btsBasicPackage.bts_mcc, 3);
+
+ // get mnc directly via oam api kevinlim 05/11/01
+ oam_getMnc((UINT8 *)&grr_OamData.btsBasicPackage.bts_mnc);
+
+ // Convert rach control parameters from GUI form to internal form
+ //
+
+ //maxNumberRetransmissions
+ i = grr_OamData.btsBasicPackage.maxNumberRetransmissions;
+ if (i==1) grr_OamData.btsBasicPackage.maxNumberRetransmissions=0;
+ else if (i==2) grr_OamData.btsBasicPackage.maxNumberRetransmissions=1;
+ else if (i==4) grr_OamData.btsBasicPackage.maxNumberRetransmissions=2;
+ else if (i==7) grr_OamData.btsBasicPackage.maxNumberRetransmissions=3;
+ else
+ {
+ DBG_WARNING("grr_GetOamBtsBasicPackage: invalid maxNumberRetransmissions(%d)\n",i);
+ grr_OamData.btsBasicPackage.maxNumberRetransmissions=3; //default to 3
+ }
+
+ //Tx Integer
+ grr_OamData.btsBasicPackage.numberOfSlotsSpreadTrans -= 3;
+
+ //noOfMultiframesBetweenPaging
+ grr_OamData.btsBasicPackage.noOfMultiframesBetweenPaging -= 2;
+
+ switch(OAMgrr_GSMDCS_INDICATOR)
+ {
+ case 0: //GSM900
+ if (OAMgrr_MS_TX_PWR_MAX_CCH <=39 && OAMgrr_MS_TX_PWR_MAX_CCH >=5)
+ {
+ i = OAMgrr_MS_TX_PWR_MAX_CCH/2;
+ OAMgrr_MS_TX_PWR_MAX_CCHa = 21 - i;
+ } else
+ {
+ DBG_WARNING("grr_GetOamBtsBasicPackage: radioSystem(%d) mSTxPwrMaxCch (%d)\n",
+ OAMgrr_GSMDCS_INDICATOR,
+ OAMgrr_MS_TX_PWR_MAX_CCH);
+ OAMgrr_MS_TX_PWR_MAX_CCHa = 7; //29dBm
+ }
+ break;
+
+ case 1: //DCS1800
+ if ( (OAMgrr_MS_TX_PWR_MAX_CCHa<=30) && (OAMgrr_MS_TX_PWR_MAX_CCHa>=0) )
+ {
+ i = OAMgrr_MS_TX_PWR_MAX_CCH/2;
+ //Not needed now
+ //if (OAMgrr_MS_PWR_OFFSET>=0 && OAMgrr_MS_PWR_OFFSET<=6)
+ //{
+ // OAMgrr_MS_PWR_OFFSETa = OAMgrr_MS_PWR_OFFSET/2;
+ //} else
+ // OAMgrr_MS_PWR_OFFSETa = 0;
+ OAMgrr_MS_TX_PWR_MAX_CCHa = 15 - i;
+ } else
+ {
+ DBG_WARNING("grr_GetOamBtsBasicPackage: radioSystem(%d) mSTxPwrMaxCch (%d)\n",
+ OAMgrr_GSMDCS_INDICATOR,
+ OAMgrr_MS_TX_PWR_MAX_CCHa);
+ OAMgrr_MS_TX_PWR_MAX_CCHa = 3; //24dBm
+ //Not needed now
+ //OAMgrr_MS_PWR_OFFSETa = 0;
+ }
+ break;
+
+ case 2: //PCS1900
+ if (OAMgrr_MS_TX_PWR_MAX_CCH == 32)
+ {
+ OAMgrr_MS_TX_PWR_MAX_CCHa = 31; //32dBm
+ } else if (OAMgrr_MS_TX_PWR_MAX_CCH == 33)
+ {
+ OAMgrr_MS_TX_PWR_MAX_CCHa = 31; //33dBm
+ } else if ((OAMgrr_MS_TX_PWR_MAX_CCHa<=30) && (OAMgrr_MS_TX_PWR_MAX_CCHa>=0))
+ {
+ i = OAMgrr_MS_TX_PWR_MAX_CCH/2;
+ OAMgrr_MS_TX_PWR_MAX_CCHa = 15 - i;
+ } else
+ {
+ DBG_WARNING("grr_GetOamBtsBasicPackage: radioSystem(%d) mSTxPwrMaxCch (%d)\n",
+ OAMgrr_GSMDCS_INDICATOR,
+ OAMgrr_MS_TX_PWR_MAX_CCH);
+ OAMgrr_MS_TX_PWR_MAX_CCH = 3; //24dBm
+ }
+ break;
+
+ default: //Assume a proper value but give debug information
+ DBG_WARNING("grr_GetOamBtsBasicPackage: radioSystem(%d) mSTxPwrMaxCch (%d)\n",
+ OAMgrr_GSMDCS_INDICATOR,
+ OAMgrr_MS_TX_PWR_MAX_CCH);
+ OAMgrr_MS_TX_PWR_MAX_CCHa = 7;
+ //Not needed now
+ //OAMgrr_MS_PWR_OFFSETa = 0;
+ break;
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_GetOamBtsOptionPackage(void)
+{
+ STATUS ret;
+
+ DBG_FUNC("grr_GetOamBtsOptionPackage", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ //step 1: get btsOptionsPackage structure first
+ ret = getMibStruct(MIB_btsOptionsPackage, (unsigned char*)&grr_OamData.btsOptionsPackage,
+ sizeof(BtsOptionsPackage));
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamBtsOptionPackage: getMibStruct failed to get btsOptionsPackage err(%d)\n", ret);
+ printf("grr_GetOamBtsOptionPackage: getMibStruct failed to get btsOptionsPackage err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBSTRUCT_FAILED);
+ DBG_LEAVE();
+ assert(0);
+ }
+
+ // step 2: get notAllowedAccessClassTable table
+ ret = getMibTbl(MIBT_notAllowedAccessClassEntry, (void *) &notAllowedAccessClassTable ,
+ sizeof(notAllowedAccessClassTable));
+
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamBtsOptionPackage: getMibTbl failed to get notAllowedAccessClassTable err(%d)\n", ret);
+ printf("grr_GetOamBtsOptionPackage: getMibTbl failed to get notAllowedAccessClassTable err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBTBL_FAILED);
+ DBG_LEAVE();
+ assert(0);
+ }
+
+ grr_OamData.btsOptionsPackage.notAllowedAccessClassTable= (Table *) &notAllowedAccessClassTable;
+
+ DBG_LEAVE();
+}
+
+void grr_GetOamBtsFirstTrxPackage(void)
+{
+ STATUS ret;
+
+ DBG_FUNC("grr_GetOamBtsFirstTrxPackage", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ //step 1: get transceiverPackage structure first
+ ret = getMibStruct(MIB_firstTransceiverPackage, (unsigned char*)&grr_OamData.transceiverPackage[0],
+ sizeof(FirstTransceiverPackage));
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamBtsFirstTrxPackage: getMibStruct failed to get firstTransceiverPackage err(%d)\n", ret);
+ printf("grr_GetOamBtsFirstTrxPackage: getMibStruct failed to get firstTransceiverPackage err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBSTRUCT_FAILED);
+ DBG_LEAVE();
+ assert(0);
+ }
+
+ // step 2: get Channel Table
+ ret = getMibTbl(MIBT_channel_0_Entry, (void *) &firstTrxPackageChannelTable ,
+ sizeof(firstTrxPackageChannelTable));
+
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamBtsFirstTrxPackage: getMibTbl failed to get firstTrxPackageChannelTable err(%d)\n", ret);
+ printf("grr_GetOamBtsFirstTrxPackage: getMibTbl failed to get firstTrxPackageChannelTable err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBTBL_FAILED);
+ DBG_LEAVE();
+ assert(0);
+ }
+
+ grr_OamData.transceiverPackage[0].channelTable= (Table *) &firstTrxPackageChannelTable;
+
+ DBG_LEAVE();
+
+}
+
+void grr_GetOamBtsSecondTrxPackage(void)
+{
+ STATUS ret;
+
+ DBG_FUNC("grr_GetOamBtsSecondTrxPackage", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ //step 1: get transceiverPackage structure first
+ ret = getMibStruct(MIB_secondTransceiverPackage, (unsigned char*)&grr_OamData.transceiverPackage[1],
+ sizeof(SecondTransceiverPackage));
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamBtsSecondTrxPackage: getMibStruct failed to get secondTransceiverPackage err(%d)\n", ret);
+ printf("grr_GetOamBtsSecondTrxPackage: getMibStruct failed to get secondTransceiverPackage err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBSTRUCT_FAILED);
+ DBG_LEAVE();
+ assert(0);
+ }
+
+ // step 2: get the Channel Table
+ ret = getMibTbl(MIBT_channel_1_Entry, (void *) &secondTrxPackageChannelTable ,
+ sizeof(secondTrxPackageChannelTable));
+
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamBtsSecondTrxPackage: getMibTbl failed to get secondTrxPackageChannelTable err(%d)\n", ret);
+ printf("grr_GetOamBtsSecondTrxPackage: getMibTbl failed to get secondTrxPackageChannelTable err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBTBL_FAILED);
+ DBG_LEAVE();
+ assert(0);
+ }
+
+ grr_OamData.transceiverPackage[1].channelTable= (Table *) &secondTrxPackageChannelTable;
+
+ DBG_LEAVE();
+
+}
+
+void grr_GetOamBtsFirstRadioCarrierPackage(void)
+{
+ STATUS ret;
+
+ DBG_FUNC("grr_GetOamBtsFirstRadioCarrierPackage", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ //step 1: get the 2nd Radio Carrier Package first
+ ret = getMibStruct(MIB_firstRadioCarrierPackage, (unsigned char*) &grr_OamData.radioCarrierPackage[0],
+ sizeof(FirstRadioCarrierPackage));
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamBtsFirstRadioCarrierPackage: getMibStruct failed to get firstRadioCarrierPackage err(%d)\n", ret);
+ printf("grr_GetOamBtsFirstRadioCarrierPackage: getMibStruct failed to get firstRadioCarrierPackage err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBSTRUCT_FAILED);
+ DBG_LEAVE();
+ assert(0);
+ }
+
+ //step 2: get the radio frequency list for the first carrier package
+ ret = getMibTbl(MIBT_carrierFrequency_0_Entry, (void *) &firstRadioCarrierPackageFrequencyListTable ,
+ sizeof(firstRadioCarrierPackageFrequencyListTable));
+
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamBtsFirstRadioCarrierPackage: getMibTbl failed to get firstRadioCarrierPackageFrequencyListTable err(%d)\n", ret);
+ printf("grr_GetOamBtsFirstRadioCarrierPackage: getMibTbl failed to get firstRadioCarrierPackageFrequencyListTable err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBTBL_FAILED);
+ DBG_LEAVE();
+ assert(0);
+ }
+
+ grr_OamData.radioCarrierPackage[0].carrierFrequencyList= (Table *) &firstRadioCarrierPackageFrequencyListTable;
+
+ DBG_LEAVE();
+
+}
+
+void grr_GetOamBtsSecondRadioCarrierPackage(void)
+{
+ STATUS ret;
+
+ DBG_FUNC("grr_GetOamBtsSecondRadioCarrierPackage", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ //step 1: get the 2nd Radio Carrier Package first
+ ret = getMibStruct(MIB_secondRadioCarrierPackage, (unsigned char*) &grr_OamData.radioCarrierPackage[1],
+ sizeof(SecondRadioCarrierPackage));
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamBtsSecondRadioCarrierPackage: getMibStruct failed to get secondRadioCarrierPackage err(%d)\n", ret);
+ printf("grr_GetOamBtsSecondRadioCarrierPackage: getMibStruct failed to get secondRadioCarrierPackage err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBSTRUCT_FAILED);
+ DBG_LEAVE();
+ assert(0);
+ }
+
+ //step 2: get the radio frequency list for the first carrier package
+ ret = getMibTbl(MIBT_carrierFrequency_1_Entry, (void *) &secondRadioCarrierPackageFrequencyListTable ,
+ sizeof(secondRadioCarrierPackageFrequencyListTable));
+
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamBtsSecondRadioCarrierPackage: getMibTbl failed to get secondRadioCarrierPackageFrequencyListTable err(%d)\n", ret);
+ printf("grr_GetOamBtsSecondRadioCarrierPackage: getMibTbl failed to get secondRadioCarrierPackageFrequencyListTable err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBTBL_FAILED);
+ DBG_LEAVE();
+ assert(0);
+ }
+
+ grr_OamData.radioCarrierPackage[1].carrierFrequencyList= (Table *) &secondRadioCarrierPackageFrequencyListTable;
+
+ DBG_LEAVE();
+}
+
+void grr_GetOamT31xxTimerStructure(void)
+{
+ STATUS ret;
+ int msPerTick;
+
+ DBG_FUNC("grr_GetOamT31xxTimerStructure", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ ret = getMibStruct(MIB_t31xxPackage, (unsigned char*)&grr_OamData.t31xx,
+ sizeof(T31xx));
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamT31xxTimerStructure: getMibStruct failed to get t31xx err(%d)\n", ret);
+ printf("grr_GetOamT31xxTimerStructure: getMibStruct failed to get t31xx err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBSTRUCT_FAILED);
+ DBG_LEAVE();
+ assert(0);
+ }
+
+ msPerTick = 1000/sysClkRateGet();
+ grr_OamData.t31xx.t3101 = (grr_OamData.t31xx.t3101*10)/msPerTick;
+ grr_OamData.t31xx.t3105 = (grr_OamData.t31xx.t3105*10)/msPerTick;
+ grr_OamData.t31xx.t3109 = (grr_OamData.t31xx.t3109*10)/msPerTick;
+ grr_OamData.t31xx.t3111 = (grr_OamData.t31xx.t3111*10)/msPerTick;
+
+ DBG_LEAVE();
+}
+
+void grr_GetOamAdjacentCellPackage(void)
+{
+ STATUS ret;
+ int i,j;
+
+ DBG_FUNC("grr_GetOamAdjacentCellPackage", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ //step 1: get adjacent cell Package first
+ ret = getMibStruct(MIB_adjacentCellPackage, (unsigned char*)&grr_OamData.adjacentCellPackage,
+ sizeof(AdjacentCellPackage));
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamAdjacentCellPackage: getMibStruct failed to get adjacentCellPackage err(%d)\n", ret);
+ printf("grr_GetOamAdjacentCellPackage: getMibStruct failed to get adjacentCellPackage err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBSTRUCT_FAILED);
+ DBG_LEAVE();
+ assert(0);
+ }
+
+ //step 2: get handover table list
+ ret = getMibTbl(MIBT_adjCell_handoverEntry, (void *) &adjCell_HandoverTable,
+ sizeof(adjCell_HandoverTable));
+
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamAdjacentCellPackage: getMibTbl failed to get adjCell_HandoverTable err(%d)\n", ret);
+ printf("grr_GetOamAdjacentCellPackage: getMibTbl failed to get adjCell_HandoverTable err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBTBL_FAILED);
+ DBG_LEAVE();
+ assert(0);
+ }
+
+ grr_OamData.adjacentCellPackage.adjCell_handoverTable= (Table *) &adjCell_HandoverTable;
+
+ //Compress all empty rows in the handover adjacent cell table
+ i=0;
+ while (i<OAMgrr_HO_ADJCELL_NO_MAX)
+ {
+ if (OAMgrr_HO_ADJCELL_ID(i)==OAMgrr_HO_ADJCELL_ID_NULL)
+ {
+ for (j=i+1;j<OAMgrr_HO_ADJCELL_NO_MAX;j++)
+ {
+ if (OAMgrr_HO_ADJCELL_ID(j) != OAMgrr_HO_ADJCELL_ID_NULL)
+ {
+ memcpy(&adjCell_HandoverTable[i], &adjCell_HandoverTable[j],
+ sizeof(AdjCell_HandoverEntry));
+ adjCell_HandoverTable[i].adjCell_handoverIndex=i;
+ memset(&adjCell_HandoverTable[j],0,sizeof(AdjCell_HandoverEntry));
+ adjCell_HandoverTable[j].adjCell_handoverIndex=j;
+ break;
+ }
+ }
+ }
+ i++;
+ }
+
+ //step 3: get reslection table list
+ ret = getMibTbl(MIBT_adjCell_reselectionEntry, (void *) &adjCell_ReselectionTable,
+ sizeof(adjCell_ReselectionTable));
+
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamAdjacentCellPackage: getMibTbl failed to get adjCell_ReselectionTable err(%d)\n", ret);
+ printf("grr_GetOamAdjacentCellPackage: getMibTbl failed to get adjCell_ReselectionTable err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBTBL_FAILED);
+ DBG_LEAVE();
+ assert(0);
+ }
+
+ grr_OamData.adjacentCellPackage.adjCell_reselectionTable= (Table *) &adjCell_ReselectionTable;
+
+ //Compress all empty rows in the reselection adjacent cell table
+ i=0;
+ while (i<OAMgrr_RESEL_ADJCELL_NO_MAX)
+ {
+ if (OAMgrr_RESEL_ADJCELL_ID(i)==OAMgrr_RESEL_ADJCELL_ID_NULL)
+ {
+ for (j=i+1;j<OAMgrr_RESEL_ADJCELL_NO_MAX;j++)
+ {
+ if (OAMgrr_RESEL_ADJCELL_ID(j) != OAMgrr_RESEL_ADJCELL_ID_NULL)
+ {
+ memcpy(&adjCell_ReselectionTable[i],&adjCell_ReselectionTable[j],
+ sizeof(AdjCell_ReselectionEntry));
+ adjCell_ReselectionTable[i].adjCell_reselectionIndex = i;
+ memset(&adjCell_ReselectionTable[j],0,sizeof(AdjCell_ReselectionEntry));
+ adjCell_ReselectionTable[j].adjCell_reselectionIndex = j;
+ break;
+ }
+ }
+ }
+ i++;
+ }
+
+ DBG_LEAVE();
+}
+
+
+void grr_GetOamHandoverControlPackage(void)
+{
+ STATUS ret;
+
+ DBG_FUNC("grr_GetOamHandoverControlPackage", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ ret = getMibStruct(MIB_handoverControlPackage, (unsigned char*)&grr_OamData.handoverControlPackage,
+ sizeof(HandoverControlPackage));
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamHandoverControlPackage: getMibStruct failed to get handoverControlPackage err(%d)\n", ret);
+ printf("grr_GetOamHandoverControlPackage: getMibStruct failed to get handoverControlPackage err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBSTRUCT_FAILED);
+ DBG_LEAVE();
+ assert(0);
+ }
+
+ DBG_LEAVE();
+
+}
+
+void grr_GetOamPowerControlPackage(void)
+{
+ STATUS ret;
+
+ DBG_FUNC("grr_GetOamPowerControlPackage", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ ret = getMibStruct(MIB_powerControlPackage, (unsigned char*)&grr_OamData.powerControlPackage,
+ sizeof(PowerControlPackage));
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamPowerControlPackage: getMibStruct failed to get powerControlPackage err(%d)\n", ret);
+ printf("grr_GetOamPowerControlPackage: getMibStruct failed to get powerControlPackage err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBSTRUCT_FAILED);
+ DBG_LEAVE();
+ assert(0);
+ }
+
+ DBG_LEAVE();
+
+}
+
+//Get standard GSM MIB data
+void grr_GetOamGsmData(void)
+{
+ DBG_FUNC("grr_GetOamGsmData", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ // Initialize Table area
+ GRR_MEMSET(&cellAllocationTable, sizeof(cellAllocationTable));
+ GRR_MEMSET(&plmnPermittedTable, sizeof(plmnPermittedTable));
+ GRR_MEMSET(&notAllowedAccessClassTable, sizeof(notAllowedAccessClassTable));
+ GRR_MEMSET(&firstTrxPackageChannelTable, sizeof(firstTrxPackageChannelTable));
+ GRR_MEMSET(&secondTrxPackageChannelTable, sizeof(secondTrxPackageChannelTable));
+
+ GRR_MEMSET(&firstRadioCarrierPackageFrequencyListTable, sizeof(firstRadioCarrierPackageFrequencyListTable));
+ GRR_MEMSET(&secondRadioCarrierPackageFrequencyListTable, sizeof(secondRadioCarrierPackageFrequencyListTable));
+ GRR_MEMSET(&adjCell_HandoverTable, sizeof(adjCell_HandoverTable));
+ GRR_MEMSET(&adjCell_ReselectionTable, sizeof(adjCell_ReselectionTable));
+
+ GRR_MEMSET(&adjCell_HandoverTable_t,sizeof(adjCell_HandoverTable));
+ grr_OamData.adjacentCellPackage_t.adjCell_handoverTable = (Table *) &adjCell_HandoverTable_t;
+
+ grr_GetOamBtsBasicPackage();
+ grr_GetOamBtsOptionPackage();
+ grr_GetOamBtsFirstTrxPackage();
+ grr_GetOamBtsSecondTrxPackage();
+ grr_GetOamBtsFirstRadioCarrierPackage();
+ grr_GetOamBtsSecondRadioCarrierPackage();
+ grr_GetOamT31xxTimerStructure();
+ grr_GetOamAdjacentCellPackage();
+ grr_GetOamHandoverControlPackage();
+ grr_GetOamPowerControlPackage();
+
+ DBG_LEAVE();
+}
+
+void grr_GetOamRrmData(void)
+{
+ STATUS ret;
+
+ DBG_FUNC("grr_GetOamRrmData", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ ret = getMibStruct(MIB_resourceConfigData, (unsigned char*)&grr_OamData.grrConfigData,
+ sizeof(ResourceConfigData));
+
+ if (ret != STATUS_OK)
+ {
+ DBG_ERROR("grr_GetOamRrmData: getMibStruct failed to get oam rrm data, err(%d)\n",ret);
+ printf("grr_GetOamRrmData: getMibStruct failed to get oam rrm data, err(%d)\n",ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_GETMIBSTRUCT_FAILED);
+ assert(0);
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_GetOamData(void)
+{
+ DBG_FUNC("grr_GetOamData", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ GRR_MEMSET(&grr_OamData, sizeof(grr_OamData));
+
+ //Get OAM data
+ grr_GetOamGsmData();
+ grr_GetOamRrmData();
+
+ DBG_LEAVE();
+}
+
+#endif //__GRR_GETOAMMIB_CPP__
+
diff --git a/data/mnet/GP10/Host/grr/src/grr_OamUtil.cpp b/data/mnet/GP10/Host/grr/src/grr_OamUtil.cpp
new file mode 100644
index 0000000..49cd82f
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src/grr_OamUtil.cpp
@@ -0,0 +1,358 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_OAMUTIL_CPP__
+#define __GRR_OAMUTIL_CPP__
+
+#include "grr\grr_head.h"
+
+void grr_RegOamTrap(void)
+{
+ STATUS ret;
+
+ DBG_FUNC("grr_RegOamTrap", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ //Reset any trap setting to get a clean start
+ if ( STATUS_OK != (ret=oam_unsetTrapByModule(MODULE_GRR)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: unsetTrapByModule failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: unsetTrapByModule failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_UNSETTRAPBYMODULE_FAILED);
+ assert(0);
+ }
+
+ //Regsiter to trap BtsBasicPackage
+ if ( STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_btsBasicPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap btsBasicPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap btsBasicPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap BtsOptionsPackage
+ if ( STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_btsOptionsPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap BtsOptionsPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap BtsOptionsPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap first TransceiverPackages
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_firstTransceiverPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap firstTransceiverPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap firstTransceiverPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap second TransceiverPackages
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_secondTransceiverPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap secondTransceiverPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap secondTransceiverPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap first RadioCarrierPackages
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_firstRadioCarrierPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap firstRadioCarrierPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap firstRadioCarrierPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap second RadioCarrierPackages
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_secondRadioCarrierPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap secondRadioCarrierPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap secondRadioCarrierPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Regsiter to trap T31xx timers
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_t31xxPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap t31xxPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap t31xxPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap AdjacentCellPackage
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_adjacentCellPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap adjacentCellPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap adjacentCellPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap HandoverControlPackage
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_handoverControlPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap HandoverControlPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap HandoverControlPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap hoAveragingAdjCellPackage
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_hoAveragingAdjCellPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap hoAveragingAdjCellPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap hoAveragingAdjCellPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap hoAveragingDistPackage
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_hoAveragingDistPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap hoAveragingDistPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap hoAveragingDistPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap hoAveragingQualPackage
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_hoAveragingLevPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap hoAveragingLevPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap hoAveragingLevPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_hoAveragingQualPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap hoAveragingQualPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap hoAveragingQualPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap hoThresholdDistPackage
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_hoThresholdDistPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap hoThresholdDistPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap hoThresholdDistPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap hoThresholdInterfacePackage
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_hoThresholdInterfacePackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap hoThresholdInterfacePackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap hoThresholdInterfacePackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap hoThresholdLevPackage
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_hoThresholdLevPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap hoThresholdLevPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap hoThresholdLevPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap hoThresholdQualPackage
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_hoThresholdQualPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap hoThresholdQualPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap hoThresholdQualPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap interferenceAveragingPackage
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_interferenceAveragingPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap interferenceAveragingPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap interferenceAveragingPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap PowerControlPackage
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_powerControlPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap powerControlPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap powerControlPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap pcAveragingLevPackage
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_pcAveragingLevPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap pcAveragingLevPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap pcAveragingLevPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap pcAveragingQualPackage
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_pcAveragingQualPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap pcAveragingQualPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap pcAveragingQualPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap pcLowerThresholdLevPackage
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_pcLowerThresholdLevPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap pcLowerThresholdLevPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap pcLowerThresholdLevPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap pcLowerThresholdQualPackage
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_pcLowerThresholdQualPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap pcLowerThresholdQualPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap pcLowerThresholdQualPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap pcUpperThresholdLevPackage
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_pcUpperThresholdLevPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap pcUpperThresholdLevPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap pcUpperThresholdLevPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap pcUpperThresholdQualPackage
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_pcUpperThresholdQualPackage)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap pcUpperThresholdQualPackage failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap pcUpperThresholdQualPackage failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ //Register to trap ResourceConfigData
+ if (STATUS_OK != (ret=oam_setTrap(MODULE_GRR, grr_MsgQId, MIB_resourceConfigData)) )
+ {
+ DBG_ERROR("grr_RegOamTrap: oam_setTrap resourceConfigData failed err(%d)\n", ret);
+ printf("grr_RegOamTrap: oam_setTrap resourceConfigData failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTRAP_FAILED);
+ assert(0);
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_FixOamData(void)
+{
+ unsigned char i,j;
+
+ DBG_FUNC("grr_FixOamData", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ //Complete the half-done lock intent
+ if ( OAMgrr_BTS_AMSTATE != unlocked ||
+ OAMgrr_TRX_AMSTATE(0) != unlocked ||
+ OAMgrr_CHN_AMSTATE(0,0) != unlocked )
+ {
+ //Lock the whole Bts
+ if (OAMgrr_BTS_AMSTATE != locked)
+ grr_SetOamBtsAmState(locked);
+
+ for (i=0;i<OAMgrr_MAX_TRXS;i++)
+ {
+ if (OAMgrr_TRX_AMSTATE(i) != locked)
+ grr_SetOamTrxAmState(i,locked);
+
+ for (j=0;j<8;j++)
+ {
+ if (OAMgrr_CHN_AMSTATE(i,j) != locked)
+ grr_SetOamTrxSlotAmState(i,j,locked);
+ }
+ }
+ } else
+ {
+ for (i=0;i<OAMgrr_MAX_TRXS;i++)
+ {
+ //Lock the whole trx res if needed
+ if (OAMgrr_TRX_AMSTATE(i) != unlocked)
+ {
+ if (OAMgrr_TRX_AMSTATE(i) != locked)
+ grr_SetOamTrxAmState(i,locked);
+
+ for (j=0;j<8;j++)
+ {
+ if (OAMgrr_CHN_AMSTATE(i,j) != locked)
+ grr_SetOamTrxSlotAmState(i,j,locked);
+ }
+ } else
+ {
+ //TRX is unlocked, handle slots admin states
+ for (j=0;j<8;j++)
+ {
+ if (OAMgrr_CHN_AMSTATE(i,j) != unlocked)
+ {
+ if (OAMgrr_CHN_AMSTATE(i,j) != locked)
+ grr_SetOamTrxSlotAmState(i,j,locked);
+ }
+ }
+ }
+ }
+ }
+
+ DBG_LEAVE();
+}
+
+unsigned char grr_GetOamTotalAvailableHoNCells(void)
+{
+ unsigned char i, count;
+ count=0;
+
+ for (i=0;i<OAMgrr_HO_ADJCELL_NO_MAX;i++)
+ if (OAMgrr_HO_ADJCELL_ID_t(i)!=OAMgrr_HO_ADJCELL_ID_NULL)
+ count++;
+
+ return count;
+}
+
+void grr_OverloadedCellBarOff(void)
+{
+ DBG_FUNC("grr_OverloadedCellBarOff", GRR_LAYER_INTF);
+ DBG_ENTER();
+
+ if ( (OAMgrr_BTS_AMSTATE==unlocked) &&
+ (OAMgrr_TRX_AMSTATE(0)==unlocked) &&
+ (OAMgrr_CHN_AMSTATE(0,0)==unlocked) )
+ {
+ grr_PassOamMsSystemInformation2(0,GRR_L1SI_TYPE_2,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation3(0,GRR_L1SI_TYPE_3,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation4(0,GRR_L1SI_TYPE_4,OAMgrr_RA_CELL_BARRED_STATE);
+ }
+
+ DBG_LEAVE();
+}
+
+#endif //__GRR_OAMUTIL_CPP__
+
diff --git a/data/mnet/GP10/Host/grr/src/grr_PassOamMib.cpp b/data/mnet/GP10/Host/grr/src/grr_PassOamMib.cpp
new file mode 100644
index 0000000..5272c34
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src/grr_PassOamMib.cpp
@@ -0,0 +1,753 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_PASSOAMMIB_CPP__
+#define __GRR_PASSOAMMIB_CPP__
+
+#include "grr\grr_head.h"
+
+void grr_PassOamDspBtsPackage(unsigned char trx)
+{
+ int len;
+ unsigned char buf[GRR_MAX_L1MSG_LEN];
+
+ DBG_FUNC("grr_PassOamDspBtsPackage", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ //skip the len of 4 bytes in the beginning
+ len = 4;
+ buf[len++] = GRR_L1MG_OAMMGMT;
+ buf[len++] = GRR_L1MT_BTSPACKAGE_MSB;
+ buf[len++] = GRR_L1MT_BTSPACKAGE_LSB;
+ buf[len++] = trx;
+
+ //Parameters contained in this message
+ buf[len++] = OAMgrr_RADIO_LINK_TIMEOUT;
+ buf[len++] = OAMgrr_BS_PA_MFRMS;
+
+ buf[len] = 0;
+ if ( ((int)OAMgrr_MS_UPLINK_DTX_STATE==1) ||
+ ((int)OAMgrr_MS_UPLINK_DTX_STATE==0) )
+ buf[len] |= 1; //DTX ul ON
+
+ if ( trx && OAMgrr_MS_DNLINK_DTX_STATE)
+ buf[len] |= 2; //DTX dl ON
+
+ len++;
+
+ //store len in little endian
+ buf[0] = (unsigned char) len;
+ buf[1] = (unsigned char) (len>>8);
+ buf[2] = (unsigned char) (len>>16);
+ buf[3] = (unsigned char) (len>>24);
+
+ //dump the message for debugging if needed
+ if (grr_DbgDump) DBG_HEXDUMP( (unsigned char*)buf, len );
+
+ sendDsp(buf, len);
+
+ DBG_LEAVE();
+}
+
+void grr_PassOamDspPwrCtrl(unsigned char trx)
+{
+ int len;
+ unsigned char buf[GRR_MAX_L1MSG_LEN];
+
+ DBG_FUNC("grr_PassOamDspPwrCtrl", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ PowerControlPackage_t *pcPktPtr = &grr_OamData.powerControlPackage;
+
+ len = 4;
+
+ buf[len++] = GRR_L1MG_OAMMGMT;
+ buf[len++] = GRR_L1MT_DPCCFG_MSB;
+ buf[len++] = GRR_L1MT_DPCCFG_LSB;
+ buf[len++] = trx;
+
+ //the size for the signal sample buffer used for averaging power
+ //level[1-32]. one sample at every 480 ms (1 frame) (Hreqave)
+ buf[len++] = pcPktPtr->pcAveragingLev->hreqave;
+
+ //the size for the signal sample buffer used for averaging quality
+ //samples [1-32]. one sample at every 480 ms (1 frame) (hreqave)
+ buf[len++] = pcPktPtr->pcAveragingQual->hreqave;
+
+ //Threshold for activating uplink dynamic power control
+ buf[len++] = pcPktPtr->pcLowerThresholdLevParam->rxLevelUL;
+
+ //store length in little endian
+ buf[0] = (unsigned char) len;
+ buf[1] = (unsigned char) (len>>8);
+ buf[2] = (unsigned char) (len>>16);
+ buf[3] = (unsigned char) (len>>24);
+
+ //dump the message for debugging if needed
+ if (grr_DbgDump) DBG_HEXDUMP( (unsigned char*)buf, len );
+
+ sendDsp(buf, len);
+
+ DBG_LEAVE();
+
+}
+
+void grr_PassOamDspHoServCell(unsigned char trx)
+{
+ int len, tmp;
+ unsigned char buf[GRR_MAX_L1MSG_LEN];
+
+ DBG_FUNC("grr_PassOamDspHoServCell", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ HandoverControlPackage_t *hoPktPtr = &grr_OamData.handoverControlPackage;
+
+ len = 4;
+
+ //Msg discriminator and type
+ buf[len++] = GRR_L1MG_OAMMGMT;
+ buf[len++] = GRR_L1MT_HOSCELLCFG_LSB;
+ buf[len++] = GRR_L1MT_HOSCELLCFG_LSB;
+
+ buf[len++] = trx;
+
+ //Power parameters
+ //
+
+ //Rxlev threshold on the uplink for handover process to commence (-103 ~ -73)
+ tmp = hoPktPtr->hoThresholdLevParam->rxLevelUL;
+ buf[len++] = (unsigned char) tmp;
+
+ //Rxlev threshold on the downlink for handover process to commence (-103 ~ -73)
+ tmp = hoPktPtr->hoThresholdLevParam->rxLevelDL;
+ buf[len++] = (unsigned char) tmp;
+
+ //The number of averages (out of total averages) that have to be upper or lower
+ //than the threshold, before making a handover decision (P5).
+ buf[len++] = hoPktPtr->hoThresholdLevParam->px;
+
+ //The number of averages that have to be taken into account, when making a
+ //handover decision (N5).
+ buf[len++] = hoPktPtr->hoThresholdLevParam->nx;
+
+ //Quality parameters
+ //
+
+ //uplink
+ tmp = hoPktPtr->hoThresholdQualParam->rxQualUL;
+ buf[len++] = (unsigned char) tmp;
+
+ //downlink
+ tmp = hoPktPtr->hoThresholdQualParam->rxQualDL;
+ buf[len++] = (unsigned char) tmp;
+
+ buf[len++] = (unsigned char) hoPktPtr->hoThresholdQualParam->px;
+ buf[len++] = (unsigned char) hoPktPtr->hoThresholdQualParam->nx;
+
+ //Handover Margin Default
+ buf[len++] = (unsigned char) hoPktPtr->hoMarginDef;
+
+ //Maximum mobile transmission power default
+ buf[len++] = (unsigned char) hoPktPtr->mxTxPwrMaxCellDef;
+
+ //Minimum mobile receive power default
+ buf[len++] = (unsigned char) hoPktPtr->rxLevMinCellDef;
+
+ //store length in little endian
+ buf[0] = (unsigned char) len;
+ buf[1] = (unsigned char) (len>>8);
+ buf[2] = (unsigned char) (len>>16);
+ buf[3] = (unsigned char) (len>>24);
+
+ //dump the message for debugging if needed
+ if (grr_DbgDump) DBG_HEXDUMP( (unsigned char*)buf, len );
+
+ sendDsp(buf, len);
+
+ DBG_LEAVE();
+}
+
+void grr_PassOamDspHoNeighCell(unsigned char trx, unsigned char cell, unsigned char nocells)
+{
+ int len, tmp;
+ unsigned char buf[GRR_MAX_L1MSG_LEN];
+
+ DBG_FUNC("grr_PassOamDspHoNeighCell", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ if (OAMgrr_HO_ADJCELL_ID_t(cell)==OAMgrr_HO_ADJCELL_ID_NULL) {DBG_LEAVE(); return;}
+
+ //point to the correct index;
+ AdjCell_HandoverEntry *entry
+ = (AdjCell_HandoverEntry *) grr_OamData.adjacentCellPackage_t.adjCell_handoverTable;
+ entry += cell;
+
+ len = 4;
+
+ //Encode DSP message
+ buf[len++] = GRR_L1MG_OAMMGMT;
+ buf[len++] = GRR_L1MT_HONCELLCFG_MSB;
+ buf[len++] = GRR_L1MT_HONCELLCFG_LSB;
+ buf[len++] = trx;
+ buf[len++] = cell;
+ buf[len++] = nocells;
+
+ //ARFCN
+ tmp = entry->adjCell_bCCHFrequency;
+ buf[len++] = (unsigned char) (tmp >>8);
+ buf[len++] = (unsigned char) tmp;
+
+ //BSIC
+ buf[len++] = (unsigned char) ((unsigned char) entry->adjCell_ncc << 3 |
+ (unsigned char) entry->adjCell_cid);
+ //Handover margin
+ buf[len++] = (unsigned char) entry->adjCell_hoMargin;
+
+ //Maximum Mobile Transmit Power for Neighbour Cell
+ tmp = entry->adjCell_msTxPwrMaxCell;
+ buf[len++] = (unsigned char) tmp;
+
+ //Minimum Mobile receive Power for Neighbour Cell
+ tmp = entry->adjCell_rxLevMinCell;
+ buf[len++] = (unsigned char) tmp;
+
+ //store length in little endian
+ buf[0] = (unsigned char) len;
+ buf[1] = (unsigned char) (len>>8);
+ buf[2] = (unsigned char) (len>>16);
+ buf[3] = (unsigned char) (len>>24);
+
+ //dump the message for debugging if needed
+ if (grr_DbgDump) DBG_HEXDUMP( (unsigned char*)buf, len );
+
+ sendDsp(buf, len);
+
+ DBG_LEAVE();
+}
+
+void grr_PassOamDspPwrRedStep(unsigned char trx)
+{
+ int len;
+ unsigned char buf[GRR_MAX_L1MSG_LEN];
+
+ DBG_FUNC("grr_PassOamDspPwrRedStep", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ if (trx >= OAMgrr_MAX_TRXS)
+ {
+ DBG_WARNING("grr_PassOamDspPwrRedStep: invalid trx(%d)\n", trx);
+ return;
+ }
+
+ len = 4;
+ buf[len++] = GRR_L1MG_OAMMGMT;
+ buf[len++] = GRR_L1MT_TXPWMAXRDCTCFG_MSB;
+ buf[len++] = GRR_L1MT_TXPWMAXRDCTCFG_LSB;
+ buf[len++] = trx;
+
+ buf[len++] = (unsigned char)
+ (grr_OamData.radioCarrierPackage[OAMgrr_TRX_RC(trx)].txPwrMaxReduction);
+
+ //store length in little endian
+ buf[0] = (unsigned char) len;
+ buf[1] = (unsigned char) (len>>8);
+ buf[2] = (unsigned char) (len>>16);
+ buf[3] = (unsigned char) (len>>24);
+
+ //dump the message for debugging if needed
+ if (grr_DbgDump) DBG_HEXDUMP( (unsigned char*)buf, len );
+
+ sendDsp(buf, len);
+
+ DBG_LEAVE();
+}
+
+void grr_PassOamMsSystemInformation2(
+ unsigned char trx,
+ unsigned char SI,
+ T_CNI_RIL3_CELL_BARRED_ACCESS barState
+ )
+{
+ int len;
+ unsigned char buf[GRR_MAX_L1MSG_LEN];
+ T_CNI_RIL3_RESULT ret;
+ T_CNI_LAPDM_L3MessageUnit l3_data;
+
+ DBG_FUNC("grr_PassOamMsSystemInformation2", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ //Zap rm_UmMsg 0-clean first
+ GRR_MEMSET(&grr_Msg, sizeof(T_CNI_RIL3RRM_MSG));
+
+ //Populate SI2 for use by RRM encoder
+ grr_PopulateSi2(barState);
+ GRR_MEMCPY(&grr_Msg, &grr_Si2, sizeof(T_CNI_RIL3RRM_MSG_SYSTEM_INFO_TYPE2));
+
+ //Call RR message encoding functionality
+ ret = CNI_RIL3RRM_Encode(&grr_Msg, &l3_data);
+
+ //check the encoding result before sending the message
+ switch (ret)
+ {
+ case CNI_RIL3_RESULT_SUCCESS:
+ //Wrap the encoded SI in PH_DATA_REQ and pass to DSP
+ len = 4;
+ buf[len++] = GRR_L1MG_COMCHAN;
+ buf[len++] = GRR_L1MT_BCCHINFO_MSB;
+ buf[len++] = GRR_L1MT_BCCHINFO_LSB;
+ buf[len++] = trx;
+ buf[len++] = GRR_L1CH_BCCH_MSB;
+ buf[len++] = GRR_L1CH_BCCH_LSB;
+ buf[len++] = SI;
+ buf[len++] = l3_data.msgLength;
+ GRR_MEMCPY(&buf[len], l3_data.buffer, l3_data.msgLength);
+ len = len + l3_data.msgLength;
+ buf[len++] = 1; //Start time==immediate
+ buf[len++] = 0;
+ buf[len++] = 0;
+
+ //store len in little endian
+ buf[0] = (unsigned char) len;
+ buf[1] = (unsigned char) (len>>8);
+ buf[2] = (unsigned char) (len>>16);
+ buf[3] = (unsigned char) (len>>24);
+
+ //dump the message for debugging if needed
+ if (grr_DbgDump) DBG_HEXDUMP( (unsigned char*)buf, len );
+
+ sendDsp(buf, len);
+
+ break;
+
+ default:
+ DBG_ERROR("grr_PassOamMsSystemInformation2: rrm encoder failed err(%d)\n", ret);
+ printf("grr_PassOamMsSystemInformation2: rrm encoder failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_RIL3_CALL_RRM_ENCODER_FAILED);
+ assert(0);
+ break;
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_PassOamMsSystemInformation3(
+ unsigned char trx,
+ unsigned char SI,
+ T_CNI_RIL3_CELL_BARRED_ACCESS barState
+ )
+{
+ int len;
+ unsigned char buf[GRR_MAX_L1MSG_LEN];
+ T_CNI_RIL3_RESULT ret;
+ T_CNI_LAPDM_L3MessageUnit l3_data;
+
+ DBG_FUNC("grr_PassOamMsSystemInformation3", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ //Zap rm_UmMsg 0-clean first
+ GRR_MEMSET(&grr_Msg, sizeof(T_CNI_RIL3RRM_MSG));
+
+ //Populate SI3 for use by RRM encoder
+ grr_PopulateSi3(barState);
+ GRR_MEMCPY(&grr_Msg, &grr_Si3, sizeof(T_CNI_RIL3RRM_MSG_SYSTEM_INFO_TYPE3));
+
+ //Call RR message encoding functionality
+ ret = CNI_RIL3RRM_Encode(&grr_Msg, &l3_data);
+
+ //check the encoding result before sending the message
+ switch (ret)
+ {
+ case CNI_RIL3_RESULT_SUCCESS:
+ //Wrap the encoded SI in PH_DATA_REQ and pass to DSP
+ len = 4;
+ buf[len++] = GRR_L1MG_COMCHAN;
+ buf[len++] = GRR_L1MT_BCCHINFO_MSB;
+ buf[len++] = GRR_L1MT_BCCHINFO_LSB;
+ buf[len++] = trx;
+ buf[len++] = GRR_L1CH_BCCH_MSB;
+ buf[len++] = GRR_L1CH_BCCH_LSB;
+ buf[len++] = SI;
+ buf[len++] = l3_data.msgLength;
+ GRR_MEMCPY(&buf[len], l3_data.buffer, l3_data.msgLength);
+ len = len + l3_data.msgLength;
+ buf[len++] = 1; //Start time==immediate
+ buf[len++] = 0;
+ buf[len++] = 0;
+
+ //store len in little endian
+ buf[0] = (unsigned char) len;
+ buf[1] = (unsigned char) (len>>8);
+ buf[2] = (unsigned char) (len>>16);
+ buf[3] = (unsigned char) (len>>24);
+
+ //dump the message for debugging if needed
+ if (grr_DbgDump) DBG_HEXDUMP( (unsigned char*)buf, len );
+
+ sendDsp(buf, len);
+
+ break;
+
+ default:
+ DBG_ERROR("grr_PassOamMsSystemInformation3: rrm encoder failed err(%d)\n", ret);
+ printf("grr_PassOamMsSystemInformation3: rrm encoder failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_RIL3_CALL_RRM_ENCODER_FAILED);
+ assert(0);
+ break;
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_PassOamMsSystemInformation4(
+ unsigned char trx,
+ unsigned char SI,
+ T_CNI_RIL3_CELL_BARRED_ACCESS barState
+ )
+{
+ int len;
+ unsigned char buf[GRR_MAX_L1MSG_LEN];
+ T_CNI_RIL3_RESULT ret;
+ T_CNI_LAPDM_L3MessageUnit l3_data;
+
+ DBG_FUNC("grr_PassOamMsSystemInformation4", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ //Zap rm_UmMsg 0-clean first
+ GRR_MEMSET(&grr_Msg, sizeof(T_CNI_RIL3RRM_MSG));
+
+ //Populate SI4 for use by RRM encoder
+ grr_PopulateSi4(barState);
+ GRR_MEMCPY(&grr_Msg, &grr_Si4, sizeof(T_CNI_RIL3RRM_MSG_SYSTEM_INFO_TYPE4));
+
+ //Call RR message encoding functionality
+ ret = CNI_RIL3RRM_Encode(&grr_Msg, &l3_data);
+
+ //check the encoding result before sending the message
+ switch (ret)
+ {
+ case CNI_RIL3_RESULT_SUCCESS:
+ //Wrap the encoded SI in PH_DATA_REQ and pass to DSP
+ len = 4;
+ buf[len++] = GRR_L1MG_COMCHAN;
+ buf[len++] = GRR_L1MT_BCCHINFO_MSB;
+ buf[len++] = GRR_L1MT_BCCHINFO_LSB;
+ buf[len++] = trx;
+ buf[len++] = GRR_L1CH_BCCH_MSB;
+ buf[len++] = GRR_L1CH_BCCH_LSB;
+ buf[len++] = SI;
+ buf[len++] = l3_data.msgLength;
+ GRR_MEMCPY(&buf[len], l3_data.buffer, l3_data.msgLength);
+ len = len + l3_data.msgLength;
+ buf[len++] = 1; //Start time==immediate
+ buf[len++] = 0;
+ buf[len++] = 0;
+
+ //store len in little endian
+ buf[0] = (unsigned char) len;
+ buf[1] = (unsigned char) (len>>8);
+ buf[2] = (unsigned char) (len>>16);
+ buf[3] = (unsigned char) (len>>24);
+
+ //dump the message for debugging if needed
+ if (grr_DbgDump) DBG_HEXDUMP( (unsigned char*)buf, len );
+
+ sendDsp(buf, len);
+
+ break;
+
+ default:
+ DBG_ERROR("grr_PassOamMsSystemInformation4: rrm encoder failed err(%d)\n", ret);
+ printf("grr_PassOamMsSystemInformation4: rrm encoder failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_RIL3_CALL_RRM_ENCODER_FAILED);
+ assert(0);
+ break;
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_PassOamMsSystemInformation5(
+ unsigned char trx,
+ unsigned char SI,
+ T_CNI_RIL3_CELL_BARRED_ACCESS barState
+ )
+{
+ int i,j,len;
+ unsigned char buf[GRR_MAX_L1MSG_LEN];
+ T_CNI_RIL3_RESULT ret;
+ T_CNI_LAPDM_L3MessageUnit l3_data;
+
+ DBG_FUNC("grr_PassOamMsSystemInformation5", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ //Zap rm_UmMsg 0-clean first
+ GRR_MEMSET(&grr_Msg, sizeof(T_CNI_RIL3RRM_MSG));
+
+ //Populate SI5 for use by RRM encoder
+ grr_PopulateSi5();
+ GRR_MEMCPY(&grr_Msg, &grr_Si5, sizeof(T_CNI_RIL3RRM_MSG_SYSTEM_INFO_TYPE5));
+
+ //Call RR message encoding functionality
+ ret = CNI_RIL3RRM_Encode(&grr_Msg, &l3_data);
+
+ //RIL3 will reoder the frequencies during encoding. Get the resulted f.list
+ GRR_MEMCPY(&grr_Si5, &grr_Msg, sizeof(T_CNI_RIL3RRM_MSG_SYSTEM_INFO_TYPE5));
+
+ //Construct internal adjacent ho cell tables in terms of the resulted order
+ for (i=0;i<grr_Si5.bcchFreqList.numRFfreq;i++)
+ {
+ memset(&adjCell_HandoverTable_t[i],0, sizeof(AdjCell_HandoverEntry));
+
+ for (j=0;j<grr_Si5.bcchFreqList.numRFfreq;j++)
+ {
+
+ if (grr_Si5.bcchFreqList.arfcn[i]==OAMgrr_HO_ADJCELL_BCCH_ARFCN(j))
+ break;
+ }
+
+ //printf("GRR@===f(i#=%d, o#=%d, total=%d), freq=%d\n", i,j,
+ // grr_Si5.bcchFreqList.numRFfreq,
+ // grr_Si5.bcchFreqList.arfcn[i]);
+
+ if (j<grr_Si5.bcchFreqList.numRFfreq)
+ {
+ //Put this adjacent-cell configuration in its right place
+ memcpy(&adjCell_HandoverTable_t[i], &adjCell_HandoverTable[j], sizeof(AdjCell_HandoverEntry));
+
+ //printf("GRR@===f(#=%d, total=%d), freq=%d, id=%d\n", i,
+ // grr_Si5.bcchFreqList.numRFfreq,
+ // OAMgrr_HO_ADJCELL_BCCH_ARFCN_t(i),
+ // OAMgrr_HO_ADJCELL_ID_t(i));
+
+ } else
+ {
+ DBG_WARNING("grr_PassOamMsSystemInformation5: alien freq found after RIL3 encoding\n");
+ }
+
+ }
+
+ //check the encoding result before sending the message
+ switch (ret)
+ {
+ case CNI_RIL3_RESULT_SUCCESS:
+ //Wrap the encoded SI in SACCH FILLING sent to L1
+ len = 4;
+ buf[len++] = GRR_L1MG_TRXMGMT;
+ buf[len++] = GRR_L1MT_SACCHFILL_MSB;
+ buf[len++] = GRR_L1MT_SACCHFILL_LSB;
+ buf[len++] = trx;
+ buf[len++] = SI;
+ buf[len++] = l3_data.msgLength;
+ GRR_MEMCPY(&buf[len], l3_data.buffer, l3_data.msgLength);
+ len = len + l3_data.msgLength;
+ buf[len++] = 1; //Start time==immediate
+ buf[len++] = 0;
+ buf[len++] = 0;
+
+ //store len in little endian
+ buf[0] = (unsigned char) len;
+ buf[1] = (unsigned char) (len>>8);
+ buf[2] = (unsigned char) (len>>16);
+ buf[3] = (unsigned char) (len>>24);
+
+ //dump the message for debugging if needed
+ if (grr_DbgDump) DBG_HEXDUMP( (unsigned char*)buf, len );
+
+ sendDsp(buf, len);
+
+ break;
+
+ default:
+ DBG_ERROR("grr_PassOamMsSystemInformation5: rrm encoder failed err(%d)\n", ret);
+ printf("grr_PassOamMsSystemInformation5: rrm encoder failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_RIL3_CALL_RRM_ENCODER_FAILED);
+ assert(0);
+ break;
+ }
+}
+
+void grr_PassOamMsSystemInformation6(
+ unsigned char trx,
+ unsigned char SI,
+ T_CNI_RIL3_CELL_BARRED_ACCESS barState
+ )
+{
+ int i,j,len;
+ unsigned char buf[GRR_MAX_L1MSG_LEN];
+ T_CNI_RIL3_RESULT ret;
+ T_CNI_LAPDM_L3MessageUnit l3_data;
+
+ DBG_FUNC("grr_PassOamMsSystemInformation6", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ //Zap rm_UmMsg 0-clean first
+ GRR_MEMSET(&grr_Msg, sizeof(T_CNI_RIL3RRM_MSG));
+
+ //Populate SI6 for use by RRM encoder
+ grr_PopulateSi6();
+ GRR_MEMCPY(&grr_Msg, &grr_Si6, sizeof(T_CNI_RIL3RRM_MSG_SYSTEM_INFO_TYPE6));
+
+ //Call RR message encoding functionality
+ ret = CNI_RIL3RRM_Encode(&grr_Msg, &l3_data);
+
+ //check the encoding result before sending the message
+ switch (ret)
+ {
+ case CNI_RIL3_RESULT_SUCCESS:
+ //Wrap the encoded SI in SACCH FILLING sent to L1
+ len = 4;
+ buf[len++] = GRR_L1MG_TRXMGMT;
+ buf[len++] = GRR_L1MT_SACCHFILL_MSB;
+ buf[len++] = GRR_L1MT_SACCHFILL_LSB;
+ buf[len++] = trx;
+ buf[len++] = SI;
+ buf[len++] = l3_data.msgLength;
+ GRR_MEMCPY(&buf[len], l3_data.buffer, l3_data.msgLength);
+ len = len + l3_data.msgLength;
+ buf[len++] = 1; //Start time==immediate
+ buf[len++] = 0;
+ buf[len++] = 0;
+
+ //store len in little endian
+ buf[0] = (unsigned char) len;
+ buf[1] = (unsigned char) (len>>8);
+ buf[2] = (unsigned char) (len>>16);
+ buf[3] = (unsigned char) (len>>24);
+
+ //dump the message for debugging if needed
+ if (grr_DbgDump) DBG_HEXDUMP( (unsigned char*)buf, len );
+
+ sendDsp(buf, len);
+
+ break;
+
+ default:
+ DBG_ERROR("grr_PassOamMsSystemInformation6: rrm encoder failed err(%d)\n", ret);
+ printf("grr_PassOamMsSystemInformation6: rrm encoder failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_RIL3_CALL_RRM_ENCODER_FAILED);
+ assert(0);
+ break;
+ }
+}
+
+void grr_PassOamMsSystemInformation13(
+ unsigned char trx,
+ unsigned char SI,
+ T_CNI_RIL3_CELL_BARRED_ACCESS barState
+ )
+{
+ int i,j,len;
+ unsigned char buf[GRR_MAX_L1MSG_LEN];
+ T_CNI_RIL3_RESULT ret;
+ T_CNI_LAPDM_L3MessageUnit l3_data;
+
+ if (!OAMgrr_GPRS_FEATURE_SETTING) return;
+
+ DBG_FUNC("grr_PassOamMsSystemInformation13", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ //Zap rm_UmMsg 0-clean first
+ GRR_MEMSET(&grr_Msg, sizeof(T_CNI_RIL3RRM_MSG));
+
+ //Populate SI6 for use by RRM encoder
+ grr_PopulateSi13();
+ GRR_MEMCPY(&grr_Msg, &grr_Si13, sizeof(T_CNI_RIL3RRM_MSG_SYSTEM_INFO_TYPE13));
+
+ //Call RR message encoding functionality
+ ret = CNI_RIL3RRM_Encode(&grr_Msg, &l3_data);
+
+ //check the encoding result before sending the message
+ switch (ret)
+ {
+ case CNI_RIL3_RESULT_SUCCESS:
+ //Wrap the encoded SI in SACCH FILLING sent to L1
+ len = 4;
+ buf[len++] = GRR_L1MG_COMCHAN;
+ buf[len++] = GRR_L1MT_BCCHINFO_MSB;
+ buf[len++] = GRR_L1MT_BCCHINFO_LSB;
+ buf[len++] = trx;
+ buf[len++] = GRR_L1CH_BCCH_MSB;
+ buf[len++] = GRR_L1CH_BCCH_LSB;
+ buf[len++] = SI;
+ buf[len++] = l3_data.msgLength;
+ GRR_MEMCPY(&buf[len], l3_data.buffer, l3_data.msgLength);
+ len = len + l3_data.msgLength;
+
+ buf[len++] = 1; //Start time==immediate
+ buf[len++] = 0;
+ buf[len++] = 0;
+
+ //store len in little endian
+ buf[0] = (unsigned char) len;
+ buf[1] = (unsigned char) (len>>8);
+ buf[2] = (unsigned char) (len>>16);
+ buf[3] = (unsigned char) (len>>24);
+
+ //dump the message for debugging if needed
+ if (grr_DbgDump) DBG_HEXDUMP( (unsigned char*)buf, len );
+
+ sendDsp(buf, len);
+
+ break;
+
+ default:
+ DBG_ERROR("grr_PassOamMsSystemInformation13: rrm encoder failed err(%d)\n", ret);
+ printf("grr_PassOamMsSystemInformation13: rrm encoder failed err(%d)\n", ret);
+ grr_SubmitAlarm(EC_GRR_RIL3_CALL_RRM_ENCODER_FAILED);
+ assert(0);
+ break;
+ }
+}
+
+void grr_PassOamMsParams(unsigned char trx)
+{
+ DBG_FUNC("grr_PassOamMsParams", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ grr_PassOamMsSystemInformation2(trx,GRR_L1SI_TYPE_2,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation3(trx,GRR_L1SI_TYPE_3,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation4(trx,GRR_L1SI_TYPE_4,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation5(trx,GRR_L1SI_TYPE_5,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation6(trx,GRR_L1SI_TYPE_6,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation13(trx,GRR_L1SI_TYPE_13,OAMgrr_RA_CELL_BARRED_STATE);
+
+ DBG_LEAVE();
+}
+
+void grr_PassOamDspParams(unsigned char trx)
+{
+ unsigned char i, nocells;
+
+ DBG_FUNC("grr_PassOamDspParams", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ nocells=grr_GetOamTotalAvailableHoNCells();
+ for (i=0;i<OAMgrr_HO_ADJCELL_NO_MAX;i++)
+ grr_PassOamDspHoNeighCell(trx,i,nocells);
+
+ grr_PassOamDspPwrCtrl(trx);
+ grr_PassOamDspHoServCell(trx);
+ grr_PassOamDspPwrRedStep(trx);
+ grr_PassOamDspBtsPackage(trx);
+
+ DBG_LEAVE();
+}
+
+void grr_PassOamParams(unsigned char trx)
+{
+ DBG_FUNC("grr_PassOamParams", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ grr_PassOamMsParams(trx);
+ grr_PassOamDspParams(trx);
+
+ DBG_LEAVE();
+}
+
+#endif //__GRR_PASSOAMMIB_CPP__
diff --git a/data/mnet/GP10/Host/grr/src/grr_ProcDspMsg.cpp b/data/mnet/GP10/Host/grr/src/grr_ProcDspMsg.cpp
new file mode 100644
index 0000000..cde8fb3
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src/grr_ProcDspMsg.cpp
@@ -0,0 +1,202 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_PROCDSPMSG_CPP__
+#define __GRR_PROCDSPMSG_CPP__
+
+#include "grr\grr_head.h"
+
+void grr_ProcDspMsg(void)
+{
+ JC_STATUS jcRet;
+ unsigned char trx, slot;
+ int msgType;
+
+ DBG_FUNC("grr_ProcDspMsg", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ if (!grr_ProcDspValidateMsg(&msgType)) {DBG_LEAVE();return;}
+
+ switch(msgType)
+ {
+ case GRR_L1MT_PINGACK:
+ //Got keep-alive rsp
+ //
+ grr_ProcDspPingAck();
+
+ break;
+
+ case GRR_L1MT_SLOTACTIVACK:
+ //Got slot act ack
+ //
+ trx = grr_pItcRxDspMsg->buffer[3];
+ slot= grr_pItcRxDspMsg->buffer[4];
+
+ //Play sanitary check
+ if ( (trx>=OAMgrr_MAX_TRXS) || (slot>=8) )
+ {
+ DBG_WARNING("grr_ProcDspMsg: slot Act ack to invalid trx(%d) slot(%d)\n",
+ trx, slot);
+ printf("grr_ProcDspMsg: slot act ack to invalid trx(%d) slot(%d)\n",
+ trx, slot);
+ }
+ else
+ {
+ //trx-slot op state shall stay as disabled during its configuration change
+ if (OAMgrr_CHN_OPSTATE(trx,slot)==opStateEnabled)
+ DBG_WARNING("grr_ProcDspMsg: opState should be disabled for trx(%d) slot(%d)\n",
+ trx, slot);
+ else
+ {
+ OAMgrr_CHN_OPSTATEa(trx,slot) = opStateEnabled;
+ grr_SetOamTrxSlotOpState(trx,slot,opStateEnabled);
+ }
+
+ //Notify RLC and RRM of the trx-slot channel comb change
+ //grr_SendTrxSlotChanComb(MODULE_GRR, rlcMsgQId, trx,slot,OAMgrr_TRX_SLOT_COMB(trx,slot));
+ DBG_TRACE("grr_ProcDspMsg:inform RLC_MAC of current opState (%d) for (trx=%d,slot=%d)\n",
+ opStateEnabled, trx, slot);
+
+ if (JC_OK != (jcRet=RlcMacTSOpState(trx, slot, opStateEnabled)))
+ {
+ DBG_ERROR("grr_ProcDspMsg: RlcMacTSOpState(1) error (trx=%d,slot=%d,state=%d,ret=%d)\n",
+ trx,slot,opStateEnabled,jcRet);
+ assert(0);
+ }
+
+ DBG_TRACE("grr_ProcDspMsg:inform RLC_MAC of slot config (%d) used for (trx=%d,slot=%d)\n",
+ OAMgrr_TRX_SLOT_COMB(trx,slot), trx, slot);
+
+ if (JC_OK != (jcRet=RlcMacConfigureTS(trx, slot, OAMgrr_TRX_SLOT_COMB(trx,slot))) )
+ {
+ DBG_ERROR("grr_ProcDspMsg: RlcMacConfigureTS(1) error (trx=%d, slot=%d, config=%d, ret=%d)\n",
+ trx, slot, OAMgrr_TRX_SLOT_COMB(trx,slot), jcRet);
+ assert(0);
+ }
+
+ grr_SendTrxSlotChanComb(MODULE_GRR, rm_MsgQId, trx,slot,OAMgrr_TRX_SLOT_COMB(trx,slot));
+ }
+
+ break;
+
+ case GRR_L1MT_SLOTACTIVNACK:
+ //Got slot act nack
+ //
+ trx = grr_pItcRxDspMsg->buffer[3];
+ slot= grr_pItcRxDspMsg->buffer[4];
+
+ //Play sanitary check
+ if ( (trx>=OAMgrr_MAX_TRXS) || (slot>=8) )
+ {
+ DBG_WARNING("grr_ProcDspMsg: slot act nack to invalid trx(%d) slot(%d)\n",
+ trx, slot);
+ printf("grr_ProcDspMsg: slot act nack to invalid trx(%d) slot(%d)\n",
+ trx, slot);
+ }
+ else
+ {
+ //Raise an alarm for this negative acknowledgment
+ grr_SubmitAlarm(grr_TrxSlotActNackAlarmCode[trx][slot]);
+
+ //trx-slot op state shall stay as disabled during its configuration change
+ if (OAMgrr_CHN_OPSTATE(trx,slot)==opStateEnabled)
+ {
+ DBG_WARNING("grr_ProcDspMsg: opState should be disabled for trx(%d) slot(%d)\n",
+ trx, slot);
+ OAMgrr_CHN_OPSTATEa(trx,slot) = opStateDisabled;
+ grr_SetOamTrxSlotOpState(trx,slot,opStateDisabled);
+ }
+
+ //Notify RLC and RRM of the trx-slot channel comb change
+ //grr_SendTrxSlotChanComb(MODULE_GRR, rlcMsgQId, trx,slot,OAMgrr_TRX_SLOT_COMB(trx,slot));
+ DBG_TRACE("grr_ProcDspMsg:inform RLC_MAC of current opState (%d) for (trx=%d,slot=%d)\n",
+ opStateDisabled, trx, slot);
+
+ if (JC_OK != (jcRet=RlcMacTSOpState(trx, slot, opStateDisabled)))
+ {
+ DBG_ERROR("grr_ProcDspMsg: RlcMacTSOpState(2) error (trx=%d,slot=%d,state=%d,ret=%d)\n",
+ trx,slot,opStateDisabled,jcRet);
+ assert(0);
+ }
+
+ DBG_TRACE("grr_ProcDspMsg:inform RLC_MAC of slot config (%d) used for (trx=%d,slot=%d)\n",
+ OAMgrr_TRX_SLOT_COMB(trx,slot), trx, slot);
+
+ if (JC_OK != (jcRet=RlcMacConfigureTS(trx, slot, OAMgrr_TRX_SLOT_COMB(trx,slot))) )
+ {
+ DBG_ERROR("grr_ProcDspMsg: RlcMacConfigureTS(2) error (trx=%d, slot=%d, config=%d, ret=%d)\n",
+ trx, slot, OAMgrr_TRX_SLOT_COMB(trx,slot), jcRet);
+ assert(0);
+ }
+
+ grr_SendTrxSlotChanComb(MODULE_GRR, rm_MsgQId, trx,slot,OAMgrr_TRX_SLOT_COMB(trx,slot));
+ }
+ break;
+ }
+
+ DBG_LEAVE();
+}
+
+bool grr_ProcDspValidateMsg(int *msgType)
+{
+
+ DBG_FUNC("grr_ValidateDspMsg", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ //Validate the DSP message is expected:
+ //
+
+ //Check if received response to keep-alive inquiry
+ if (GRR_L1MSGCMP(GRR_L1MG_TRXMGMT,GRR_L1MT_PINGACK_MSB,GRR_L1MT_PINGACK_LSB))
+ *msgType = GRR_L1MT_PINGACK;
+ else if (GRR_L1MSGCMP(GRR_L1MG_TRXMGMT,GRR_L1MT_SLOTACTIVACK_MSB,GRR_L1MT_SLOTACTIVACK_LSB))
+ *msgType = GRR_L1MT_SLOTACTIVACK;
+ else if (GRR_L1MSGCMP(GRR_L1MG_TRXMGMT,GRR_L1MT_SLOTACTIVNACK_MSB,GRR_L1MT_SLOTACTIVNACK_LSB))
+ *msgType = GRR_L1MT_SLOTACTIVNACK;
+ else
+ *msgType = 0;
+
+ DBG_LEAVE();
+ return ((*msgType)?true:false);
+}
+void grr_ProcDspPingAck(void)
+{
+ unsigned char trx;
+
+ DBG_FUNC("grr_ProcDspPingAck", GRR_LAYER_DSP);
+ DBG_ENTER();
+
+ trx = grr_pItcRxDspMsg->buffer[3];
+
+ //Check if DSP is still ticking or not
+ if (grr_pItcRxDspMsg->buffer[4]==grr_TrxMgmt[trx].tdma1 &&
+ grr_pItcRxDspMsg->buffer[5]==grr_TrxMgmt[trx].tdma2 &&
+ grr_pItcRxDspMsg->buffer[6]==grr_TrxMgmt[trx].tdma3 &&
+ grr_pItcRxDspMsg->buffer[7]==grr_TrxMgmt[trx].tdma4 )
+ {
+ //Not ticking any more, raise a critical alarm
+ DBG_ERROR("grr_ProcDspPingAck: dsp(%d) stop ticking\n", trx);
+ printf("grr_ProcDspPingAck: dsp(%d) stop ticking\n", trx);
+ grr_SubmitAlarm(grr_DspNotTickingAnyMore[trx]);
+ assert(0);
+ } else
+ {
+ //Still ticking fine right now
+ grr_TrxMgmt[trx].alive = true;
+ grr_TrxMgmt[trx].tdma1 = grr_pItcRxDspMsg->buffer[4];
+ grr_TrxMgmt[trx].tdma2 = grr_pItcRxDspMsg->buffer[5];
+ grr_TrxMgmt[trx].tdma3 = grr_pItcRxDspMsg->buffer[6];
+ grr_TrxMgmt[trx].tdma4 = grr_pItcRxDspMsg->buffer[7];
+ }
+
+ DBG_LEAVE();
+}
+
+#endif //__GRR_PROCDSPMSG_CPP__
+
diff --git a/data/mnet/GP10/Host/grr/src/grr_ProcGrrMsg.cpp b/data/mnet/GP10/Host/grr/src/grr_ProcGrrMsg.cpp
new file mode 100644
index 0000000..f8f73f9
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src/grr_ProcGrrMsg.cpp
@@ -0,0 +1,68 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_PROCGRRMSG_CPP__
+#define __GRR_PROCGRRMSG_CPP__
+
+#include "grr\grr_head.h"
+
+
+void grr_ProcGrrMsg(void)
+{
+ unsigned char trx;
+
+ DBG_FUNC("grr_ProcGrrMsg", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ if (!grr_ProcGrrValidateMsg()) return;
+
+ trx = grr_pItcRxGrrMsg->trx;
+
+ //Check if trx is still alive
+ if (grr_TrxMgmt[trx].alive)
+ {
+ //trx is still alive. Ping it!
+ grr_TrxMgmt[trx].alive = false;
+ grr_SendDspPing(trx);
+ grr_StartDspWdog(trx);
+ } else
+ {
+ //trx not responding, raise an alarm and abort this task!
+ grr_SubmitAlarm(grr_DspNotResponding[trx]);
+ DBG_ERROR("grr_ProcGrrMsg: dsp(%d) not responding\n", trx);
+ printf("grr_ProcGrrMsg: dsp(%d) not responding\n", trx);
+ assert(0);
+ }
+ DBG_LEAVE();
+}
+
+bool grr_ProcGrrValidateMsg(void)
+{
+ bool ret;
+
+ DBG_FUNC("grr_ProcGrrValidateMsg", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ ret = true;
+
+ if ( (grr_pItcRxGrrMsg->trx>=OAMgrr_MAX_TRXS)||
+ (grr_pItcRxGrrMsg->timer_id != GRR_WDOG) )
+ {
+ DBG_WARNING("grr_ProcGrrValidateMsg: invalid trx(%d) or wdog id(%x)\n",
+ grr_pItcRxGrrMsg->trx,
+ grr_pItcRxGrrMsg->timer_id);
+ ret = false;
+ }
+
+ DBG_LEAVE();
+ return ret;
+}
+
+#endif //__GRR_PROCGRRMSG_CPP__
+
diff --git a/data/mnet/GP10/Host/grr/src/grr_ProcOamMsg.cpp b/data/mnet/GP10/Host/grr/src/grr_ProcOamMsg.cpp
new file mode 100644
index 0000000..fc05fee
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src/grr_ProcOamMsg.cpp
@@ -0,0 +1,991 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_PROCOAMMSG_CPP__
+#define __GRR_PROCOAMMSG_CPP__
+
+#include "grr\grr_head.h"
+
+void grr_ProcOamMsg(void)
+{
+ DBG_FUNC("grr_ProcOamMsg", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ //Process in terms of message type
+ switch (grr_pItcRxOamMsg->msgType)
+ {
+ case MT_TRAP:
+ //Got a trapped param change notification
+ //
+
+ //Block unauthorized change attempts
+ if (!grr_ProcOamValidateMsg()) return;
+
+ switch (MIB_TBL(grr_pItcRxOamMsg->mibTag))
+ {
+ case MTBL_btsBasicPackage:
+ grr_ProcOamBtsBasicPackage();
+ break;
+ case MTBL_btsOptionsPackage:
+ grr_ProcOamBtsOptionsPackage();
+ break;
+ case MTBL_firstTransceiverPackage:
+ grr_ProcOamTransceiverPackage(0);
+ break;
+ case MTBL_secondTransceiverPackage:
+ grr_ProcOamTransceiverPackage(1);
+ break;
+ case MTBL_firstRadioCarrierPackage:
+ grr_ProcOamRadioCarrierPackage(0, grr_pItcRxOamMsg->mibTag);
+ break;
+ case MTBL_secondRadioCarrierPackage:
+ grr_ProcOamRadioCarrierPackage(1, grr_pItcRxOamMsg->mibTag);
+ break;
+ case MTBL_t31xx:
+ grr_ProcOamT31xxPackage();
+ break;
+ case MTBL_adjacentCellPackage:
+ grr_ProcOamAdjacentCellPackage();
+ break;
+ case MTBL_handoverControlPackage:
+ case MTBL_hoAveragingAdjCellParam:
+ case MTBL_hoAveragingDistParam:
+ case MTBL_hoAveragingLevParam:
+ case MTBL_hoAveragingQualParam:
+ case MTBL_hoThresholdDistParam:
+ case MTBL_hoThresholdInterfaceParam:
+ case MTBL_hoThresholdLevParam:
+ case MTBL_hoThresholdQualParam:
+ case MTBL_interferenceAveragingParam:
+ grr_ProcOamHandoverControlPackage();
+ break;
+ case MTBL_powerControlPackage:
+ case MTBL_pcAveragingLev:
+ case MTBL_pcAveragingQual:
+ case MTBL_pcLowerThresholdLevParam:
+ case MTBL_pcLowerThresholdQualParam:
+ case MTBL_pcUpperThresholdLevParam:
+ case MTBL_pcUpperThresholdQualParam:
+ grr_ProcOamPowerControlPackage();
+ break;
+ case MTBL_resourceConfigData:
+ grr_ProcOamResourceConfigData();
+ break;
+ default:
+ //Received unknown OAM mib table MIB_TBL(tag)
+ DBG_WARNING("grr_ProcOamMsg: unknown OAM table(%d)\n",MIB_TBL(grr_pItcRxOamMsg->mibTag));
+ break;
+ }
+ break;
+
+ default:
+ //Received unrecognized message type
+ DBG_WARNING("grr_ProcOamMsg: unknown OAM msg type(%d)\n", grr_pItcRxOamMsg->msgType);
+ break;
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamBtsBasicPackage(void)
+{
+ unsigned char i;
+
+ DBG_FUNC("grr_ProcOamBtsBasicPackage", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_ProcOamBtsBasicPackage: changed mib param tag(%x)\n",
+ grr_pItcRxOamMsg->mibTag);
+
+ //Retrieve BtsBasicPackage
+ OAMgrr_BTS_OPSTATEold = OAMgrr_BTS_OPSTATE;
+ OAMgrr_BTS_AMSTATEold = OAMgrr_BTS_AMSTATE;
+ grr_GetOamBtsBasicPackage();
+
+ //Check if BTS operational state is changed or not
+ if (grr_pItcRxOamMsg->mibTag==MIB_bts_operationalState)
+ {
+ grr_ProcOamBtsOpStateChange();
+ return;
+ }
+
+ //Check if got BTS administrative state changed notifica
+ if (grr_pItcRxOamMsg->mibTag==MIB_bts_administrativeState)
+ {
+ grr_ProcOamBtsAmStateChange();
+ return;
+ }
+
+ //Blindly update DSPs with new parameters
+ i = 0;
+ while (i<OAMgrr_MAX_TRXS)
+ {
+ //Update both DSPs and MS
+ grr_PassOamMsSystemInformation2(i,GRR_L1SI_TYPE_2,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation3(i,GRR_L1SI_TYPE_3,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation4(i,GRR_L1SI_TYPE_4,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation5(i,GRR_L1SI_TYPE_5,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation6(i,GRR_L1SI_TYPE_6,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation13(i,GRR_L1SI_TYPE_13,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamDspBtsPackage(i);
+ grr_SendDspTrxConfig(i);
+
+ i++;
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamBtsOpStateChange(void)
+{
+ int i;
+ JC_STATUS jcRet;
+
+ DBG_FUNC("grr_ProcOamBtsOpStateChange", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ DBG_TRACE("TRACE@grr_ProcOamBtsOpStateChange: new btsOpState(%d) old btsOpState(%d)\n",
+ grr_pItcRxOamMsg->val.varVal, OAMgrr_BTS_OPSTATEold);
+
+ switch(grr_pItcRxOamMsg->val.varVal)
+ {
+ case opStateEnabled:
+ //Turn on radio
+ if (!grr_IsBtsAmTypeBlocked()) grr_RadioCtrl(GRR_ON);
+
+ DBG_TRACE("grr_ProcOamBtsOpStateChange: inform RLC_MAC of bts opState enabled\n");
+
+ if (JC_OK != (jcRet=RlcMacGPOpState(opStateEnabled)))
+ DBG_ERROR("grr_ProcOamBtsOpStateChange: RlcMacGPOpState() err(%d)\n", jcRet);
+
+ break;
+
+ case opStateDisabled:
+ //Turn off radio
+ grr_RadioCtrl(GRR_OFF);
+
+ DBG_TRACE("grr_ProcOamBtsOpStateChange: inform RLC_MAC of bts opState disabled\n");
+
+ if (JC_OK != (jcRet=RlcMacGPOpState(opStateDisabled)))
+ DBG_ERROR("grr_ProcOamBtsOpStateChange: RlcMacGPOpState() err(%d)\n", jcRet);
+
+ break;
+
+ default:
+ DBG_ERROR("grr_ProcOamBtsOpStateChange: invalid new btsOpState Value(%d) old btsOpState\n",
+ grr_pItcRxOamMsg->val.varVal, OAMgrr_BTS_OPSTATEold);
+ printf("grr_ProcOamBtsOpStateChange: invalid new btsOpState Value(%d) old btsOpState\n",
+ grr_pItcRxOamMsg->val.varVal, OAMgrr_BTS_OPSTATEold);
+ assert(0);
+ break;
+ }
+
+ OAMgrr_BTS_OPSTATEa = (EnableDisable_t) grr_pItcRxOamMsg->val.varVal;
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamBtsAmStateChange(void)
+{
+ DBG_FUNC("grr_ProcOamBtsAmStateChange", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_ProcOamBtsAmStateChange: get new btsAmState(%d) oldBtsAmState(%d)\n",
+ grr_pItcRxOamMsg->val.varVal, OAMgrr_BTS_AMSTATEold);
+
+ //In terms of amState change notif
+ switch(grr_pItcRxOamMsg->val.varVal)
+ {
+ case locked:
+ grr_ProcOamBtsAmStateLocked();
+ break;
+
+ case unlocked:
+ grr_ProcOamBtsAmStateUnlocked();
+ break;
+
+ case shuttingDown:
+ grr_ProcOamBtsAmStateShuttingdown();
+ break;
+
+ default:
+ DBG_ERROR("grr_ProcOamBtsAmStateChange: invalid new btsAmState(%d) old btsAmState(%d)\n",
+ grr_pItcRxOamMsg->val.varVal, OAMgrr_BTS_AMSTATEold);
+ printf("grr_ProcOamBtsAmStateChange: invalid new btsAmState(%d) old btsAmState(%d)\n",
+ grr_pItcRxOamMsg->val.varVal, OAMgrr_BTS_AMSTATEold);
+ assert(0);
+ break;
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamBtsAmStateLocked(void)
+{
+ unsigned char i;
+
+ DBG_FUNC("grr_ProcOamBtsAmStateLocked", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_ProcOamBtsAmStateLocked: btsAmState goes locked\n");
+
+ //Report informational alarm
+ grr_SubmitAlarm(EC_GRR_BTS_LOCKED);
+
+ //Lock all TRXes in existence
+ for (i=0; i<OAMgrr_MAX_TRXS; i++ )
+ {
+ //Check if ith TRX is existent
+ grr_SetOamTrxAmState(i,locked);
+ grr_ProcOamTrxAmStateLocked(i);
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamTrxAmStateLocked(unsigned char trx)
+{
+ unsigned char i;
+
+ DBG_FUNC("grr_ProcOamTrxAmStateLocked", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_ProcOamTrxAmStateLocked: trx(%d) amState goes locked\n", trx);
+
+ //Check if trx existent
+ if (trx>=OAMgrr_MAX_TRXS)
+ {
+ DBG_WARNING("grr_ProcOamTrxAmStateLocked: invalid trx(%d)\n",trx);
+ return;
+ }
+
+ //Report informational alarm
+ grr_SubmitAlarm(grr_TrxAmStateLockedAlarmCode[trx]);
+
+ //Turn off radio trans
+ grr_TuneTrxSynth(trx,0);
+
+ //lock all TSs
+ for (i=0;i<8;i++)
+ {
+ grr_SetOamTrxSlotAmState(trx,i,locked);
+ grr_ProcOamTrxSlotAmStateLocked(trx,i);
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamTrxSlotAmStateLocked(unsigned char trx, unsigned char slot)
+{
+ JC_STATUS jcRet;
+
+ DBG_FUNC("grr_ProcOamTrxSlotAmStateLocked", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_ProcOamTrxSlotAmStateLocked: trx(%d) Ts(%d) amState goes locked\n", trx,slot);
+
+ //Check if trx & slot existent
+ if ( (trx>=OAMgrr_MAX_TRXS)||(slot>=8) )
+ {
+ DBG_WARNING("grr_ProcOamTrxSlotAmStateLocked: invalid trx(%d) slot(%d)\n",trx,slot);
+ return;
+ }
+
+ //Report informational alarm
+ grr_SubmitAlarm(grr_TrxSlotAmStateLockedAlarmCode[trx][slot]);
+
+ //Send lock request to RLC, RRM
+ //grr_SendTrxSlotLockReq(MODULE_GRR, rlcMsgQId, trx, slot);
+ if (JC_OK != (jcRet=RlcMacTSAdminState(trx,slot,locked)))
+ {
+ DBG_ERROR("grr_ProcOamTrxSlotAmStateLocked: RlcMacTSAdminState error (state=%d), ret=%d)(%d)\n",
+ locked,jcRet);
+ assert(0);
+ }
+ grr_SendTrxSlotLockReq(MODULE_GRR, grr_MsgQId, trx, slot);
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamBtsAmStateUnlocked(void)
+{
+ unsigned char i;
+
+ DBG_FUNC("grr_ProcOamBtsAmStateUnlocked", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_ProcOamBtsAmStateUnlocked: btsAmState goes unlocked\n");
+
+ //Report informational alarm
+ grr_SubmitAlarm(EC_GRR_BTS_UNLOCKED);
+
+ //Unlock all TRXes in existence
+ for (i=0; i<OAMgrr_MAX_TRXS; i++ )
+ {
+ //Check if ith TRX is existent
+ grr_SetOamTrxAmState(i,unlocked);
+ grr_ProcOamTrxAmStateUnlocked(i);
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamTrxAmStateUnlocked(unsigned char trx)
+{
+ unsigned char i;
+
+ DBG_FUNC("grr_ProcOamTrxAmStateUnlocked", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_ProcOamTrxAmStateUnlocked: trx(%d) amState goes unlocked\n", trx);
+
+ //Check if trx existent
+ if (trx>=OAMgrr_MAX_TRXS)
+ {
+ DBG_WARNING("grr_ProcOamTrxAmStateUnlocked: invalid trx(%d)\n",trx);
+ return;
+ }
+
+ //Report informational alarm
+ grr_SubmitAlarm(grr_TrxAmStateUnlockedAlarmCode[trx]);
+
+ //unlock all TSs
+ for (i=0;i<8;i++)
+ {
+ grr_SetOamTrxSlotAmState(trx,i,unlocked);
+ grr_ProcOamTrxSlotAmStateUnlocked(trx,i);
+ }
+
+ //Turn on radio transmission if should be
+ if (OAMgrr_BTS_OPSTATE==opStateEnabled) grr_TuneTrxSynth(trx,1);
+
+ DBG_LEAVE();
+}
+
+
+void grr_ProcOamTrxSlotAmStateUnlocked(unsigned char trx, unsigned char slot)
+{
+ JC_STATUS jcRet;
+
+ DBG_FUNC("grr_ProcOamTrxSlotAmStateUnlocked", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_ProcOamTrxSlotAmStateUnlocked: trx(%d) Ts(%d) amState goes unlocked\n", trx,slot);
+
+ //Check if trx & slot existent
+ if ( (trx>=OAMgrr_MAX_TRXS)||(slot>=8) )
+ {
+ DBG_WARNING("grr_ProcOamTrxSlotAmStateUnlocked: invalid trx(%d) or slot(%d)\n",trx,slot);
+ return;
+ }
+
+ //Report informational alarm
+ grr_SubmitAlarm(grr_TrxSlotAmStateUnlockedAlarmCode[trx][slot]);
+
+ //Send unlock request to RLC, RRM
+ //grr_SendTrxSlotUnlockReq(MODULE_GRR, rlcMsgQId, trx, slot);
+ //grr_SendTrxSlotUnlockReq(MODULE_GRR, rm_MsgQId, trx, slot);
+ if (JC_OK != (jcRet=RlcMacTSAdminState(trx,slot,unlocked)))
+ {
+ DBG_ERROR("grr_ProcOamTrxSlotAmStateUnlocked: RlcMacTSAdminState error (state=%d, ret=%d)\n",
+ unlocked,jcRet);
+ assert(0);
+ }
+
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamBtsAmStateShuttingdown(void)
+{
+ unsigned char i;
+
+ DBG_FUNC("grr_ProcOamBtsAmStateShuttingdown", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_ProcOamBtsAmStateShuttingdown: btsAmState being shuttingdown\n");
+
+ //Report informational alarm
+ grr_SubmitAlarm(EC_GRR_BTS_SHUTTINGDOWN);
+
+ //Shutdown all TRXes in existence
+ for (i=0; i<OAMgrr_MAX_TRXS; i++ )
+ {
+ //Check if ith TRX is existent
+ grr_SetOamTrxAmState(i,shuttingDown);
+ grr_ProcOamTrxAmStateShuttingdown(i);
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamTrxAmStateShuttingdown(unsigned char trx)
+{
+ unsigned char i;
+
+ DBG_FUNC("grr_ProcOamTrxAmStateShuttingdown", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_ProcOamTrxAmStateShuttingdown: trx(%d) amState being shutdown\n", trx);
+
+ //Check if trx existent
+ if (trx>=OAMgrr_MAX_TRXS)
+ {
+ DBG_WARNING("grr_ProcOamTrxAmStateShuttingdown: invalid trx(%d)\n",trx);
+ return;
+ }
+
+ //Report informational alarm
+ grr_SubmitAlarm(grr_TrxAmStateShuttingdownAlarmCode[trx]);
+
+ //Shutdown all TSs
+ for (i=0;i<8;i++)
+ {
+ grr_SetOamTrxSlotAmState(trx,i,shuttingDown);
+ grr_ProcOamTrxSlotAmStateShuttingdown(trx,i);
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamTrxSlotAmStateShuttingdown(unsigned char trx, unsigned char slot)
+{
+ JC_STATUS jcRet;
+
+ DBG_FUNC("grr_ProcOamTrxSlotAmStateShuttingdown", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_ProcOamTrxSlotAmStateShuttingdown: trx(%d) slot(%d) amState being shutdown\n", trx,slot);
+
+ //Check if trx & slot existent
+ if ( (trx>=OAMgrr_MAX_TRXS)||(slot>=8) )
+ {
+ DBG_WARNING("grr_ProcOamTrxSlotAmStateShuttingdown: invalid trx(%d) slot(%d)\n",trx,slot);
+ return;
+ }
+
+ //Report informational alarm
+ grr_SubmitAlarm(grr_TrxSlotAmStateShuttingdownAlarmCode[trx][slot]);
+
+ //Send shutdown request to RLC, RRM
+ //grr_SendTrxSlotShutdownReq(MODULE_GRR, rlcMsgQId, trx, slot);
+ if (JC_OK != (jcRet=RlcMacTSAdminState(trx,slot,shuttingDown)))
+ {
+ DBG_ERROR("grr_ProcOamTrxSlotAmStateLocked: RlcMacTSAdminState error (state=%d, ret=%d)\n",
+ shuttingDown,jcRet);
+ assert(0);
+ }
+
+ grr_SendTrxSlotShutdownReq(MODULE_GRR, rm_MsgQId, trx, slot);
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamBtsOptionsPackage(void)
+{
+ unsigned char i;
+
+ DBG_FUNC("grr_ProcOamBtsOptionsPackage", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_ProcOamBtsOptionsPackage: changed mib param tag(%x)\n",
+ grr_pItcRxOamMsg->mibTag);
+
+ //Retrieve BtsOptionPackage
+ grr_GetOamBtsOptionPackage();
+
+ //Blindly update DSPs with new parameters
+ i = 0;
+ while (i<OAMgrr_MAX_TRXS)
+ {
+ //Update both DSPs and MS
+ grr_PassOamMsSystemInformation2(i,GRR_L1SI_TYPE_2,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation3(i,GRR_L1SI_TYPE_3,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation4(i,GRR_L1SI_TYPE_4,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation5(i,GRR_L1SI_TYPE_5,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation6(i,GRR_L1SI_TYPE_6,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation13(i,GRR_L1SI_TYPE_13,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamDspBtsPackage(i);
+ i++;
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamTransceiverPackage(unsigned char trx)
+{
+ unsigned char i, slot;
+ JC_STATUS jcRet;
+
+ DBG_FUNC("grr_ProcOamTransceiverPackage", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_ProcOamTransceiverPackage: trx(%d) changed mib param tag(%x)\n",
+ trx, grr_pItcRxOamMsg->mibTag);
+
+ if (trx>=OAMgrr_MAX_TRXS)
+ {
+ DBG_WARNING("grr_ProcOamTransceiverPackage: changed mib param tag(%d) but invalid trx(%d)\n",
+ grr_pItcRxOamMsg->mibTag, trx);
+ return;
+ }
+
+ //Retrieve changed bts transceiver package
+ if (trx == 0)
+ {
+ OAMgrr_TRX0_AMSTATEold = OAMgrr_TRX_AMSTATE(0);
+ OAMgrr_TRX0SLOT0_AMSTATEold = OAMgrr_TRX_SLOT_AMSTATE(0,0);
+ grr_GetOamBtsFirstTrxPackage();
+ } else
+ grr_GetOamBtsSecondTrxPackage();
+
+ switch(grr_pItcRxOamMsg->mibTag)
+ {
+ case MIB_basebandAdministrativeState_0:
+ //Notify of Trx-0 amState change
+ //
+ grr_ProcOamTrx0AmStateChange();
+ break;
+
+ case MIB_basebandAdministrativeState_1:
+ //Notify of other trxs adminState change
+ //
+ switch(grr_pItcRxOamMsg->val.varVal)
+ {
+ case locked:
+ grr_ProcOamTrxAmStateLocked(1);
+ break;
+
+ case unlocked:
+ grr_ProcOamTrxAmStateUnlocked(1);
+ break;
+
+ case shuttingDown:
+ grr_ProcOamTrxAmStateShuttingdown(1);
+ break;
+
+ default:
+ DBG_WARNING("grr_ProcOamTransceiverPackage:trx1,invalid amStateValue:%d\n",
+ grr_pItcRxOamMsg->mibTag);
+ break;
+ }
+ break;
+
+ case MIBT_channelAdministrativeState_0:
+ case MIBT_channelAdministrativeState_1:
+ //Got trx slot amState change notif
+ //
+ slot = grr_pItcRxOamMsg->val.varTbl.idx;
+
+ if ((trx>=OAMgrr_MAX_TRXS) || (slot>=8))
+ {
+ DBG_WARNING("grr_ProcOamTransceiverPackage: amState changed for invalid trx(%d) slot(%d)\n",
+ trx, slot);
+ return;
+ }
+
+ if ( (trx==0) && (slot==0) ) grr_ProcOamTrx0Slot0AmStateChange();
+ else
+ {
+ switch(grr_pItcRxOamMsg->val.varTbl.value)
+ {
+ case locked:
+ grr_ProcOamTrxSlotAmStateLocked(trx, slot);
+ break;
+ case unlocked:
+ grr_ProcOamTrxSlotAmStateUnlocked(trx, slot);
+ break;
+ case shuttingDown:
+ grr_ProcOamTrxSlotAmStateShuttingdown(trx, slot);
+ break;
+ default:
+ DBG_WARNING("grr_ProcOamTransceiverPackage:trx(%d) slot(%d) invalid amState(%d)\n",
+ trx,slot,grr_pItcRxOamMsg->val.varTbl.value);
+ break;
+ }
+ }
+ break;
+
+ case MIBT_channelCombination_0:
+ case MIBT_channelCombination_1:
+ //Change trx slot channel combination
+ //
+ unsigned char slot;
+
+ slot = grr_pItcRxOamMsg->val.varTbl.idx;
+
+ //trx-slot is change qualified earlier, thus going ahead to realize the change
+ OAMgrr_CHN_OPSTATEa(trx,slot) = opStateDisabled;
+ grr_SetOamTrxSlotOpState(trx,slot,opStateDisabled);
+
+ if (JC_OK != (jcRet=RlcMacTSOpState(trx, slot, opStateDisabled)))
+ {
+ DBG_ERROR("grr_ProcOamTransceiverPackage: RlcMacTSOpState error (trx=%d,slot=%d,state=%d,ret=%d)\n",
+ trx,slot,opStateDisabled,jcRet);
+ }
+
+ grr_SendDspSlotActivate(trx, slot);
+
+ break;
+
+ default:
+ //Handle other trapped notification here
+ DBG_WARNING("grr_ProcOamTransceiverPackage: change for mib param tag(%d) unsupported\n",
+ grr_pItcRxOamMsg->val.varVal);
+
+ break;
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamTrx0AmStateChange(void)
+{
+ DBG_FUNC("grr_ProcOamTrx0AmStateChange", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_ProcOamTrx0AmStateChange: new amState(%d) old amState(%d)\n",
+ grr_pItcRxOamMsg->val.varVal, OAMgrr_TRX0_AMSTATEold);
+
+ if ( (grr_pItcRxOamMsg->val.varVal==locked) ||
+ (grr_pItcRxOamMsg->val.varVal==unlocked) ||
+ (grr_pItcRxOamMsg->val.varVal==shuttingDown) )
+ {
+ grr_SetOamBtsAmState((AdministrativeState_t)(grr_pItcRxOamMsg->val.varVal));
+ grr_ProcOamBtsAmStateChange();
+ } else
+ {
+ DBG_ERROR("grr_ProcOamTrx0AmStateChange: invalid new amState(%d) old amState(%d)\n",
+ grr_pItcRxOamMsg->val.varVal,OAMgrr_TRX0_AMSTATEold);
+ printf("grr_ProcOamTrx0AmStateChange: invalid new amState(%d) old amState(%d)\n",
+ grr_pItcRxOamMsg->val.varVal,OAMgrr_TRX0_AMSTATEold);
+ assert(0);
+ }
+
+ OAMgrr_TRX0_AMSTATEold = grr_pItcRxOamMsg->val.varVal;
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamTrx0Slot0AmStateChange(void)
+{
+ DBG_FUNC("grr_ProcOamTrx0Slot0AmStateChange", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_ProcOamTrx0Slot0AmStateChange: new amState(%d) old amState(%d)\n",
+ grr_pItcRxOamMsg->val.varTbl.value, OAMgrr_TRX0SLOT0_AMSTATEold);
+
+ if ( (grr_pItcRxOamMsg->val.varTbl.value==locked) ||
+ (grr_pItcRxOamMsg->val.varTbl.value==unlocked) ||
+ (grr_pItcRxOamMsg->val.varTbl.value==shuttingDown) )
+ {
+ grr_SetOamBtsAmState((AdministrativeState_t)(grr_pItcRxOamMsg->val.varTbl.value));
+ } else
+ {
+ DBG_WARNING("grr_ProcOamTrx0Slot0AmStateChange: invalid new amState(%d), old amState(%d)\n",
+ grr_pItcRxOamMsg->val.varTbl.value,OAMgrr_TRX0_AMSTATEold);
+ printf("grr_ProcOamTrx0Slot0AmStateChange: invalid new amState(%d), old amState(%d)\n",
+ grr_pItcRxOamMsg->val.varTbl.value,OAMgrr_TRX0_AMSTATEold);
+ assert(0);
+ }
+
+ switch(grr_pItcRxOamMsg->val.varTbl.value)
+ {
+ case locked:
+ grr_ProcOamBtsAmStateLocked();
+ break;
+
+ case unlocked:
+ grr_ProcOamBtsAmStateUnlocked();
+ break;
+
+ case shuttingDown:
+ grr_ProcOamBtsAmStateShuttingdown();
+ break;
+ }
+
+ OAMgrr_TRX0SLOT0_AMSTATEold = grr_pItcRxOamMsg->val.varTbl.value;
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamRadioCarrierPackage(unsigned char rc, MibTag tag)
+{
+ unsigned char pwr,trx;
+
+ DBG_FUNC("grr_ProcOamRadioCarrierPackage", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_ProcOamRadioCarrierPackage: radio carrier(%d), changed mib param tag(%d)\n",
+ rc, tag);
+
+ if(rc>=OAMgrr_MAX_TRXS)
+ {
+ DBG_WARNING("ProcOamRadioCarrierPackage: received invalid rc(%d)\n", rc);
+ return;
+ }
+
+ //Retrieve rc package
+ if (rc==0) grr_GetOamBtsFirstRadioCarrierPackage();
+ else grr_GetOamBtsSecondRadioCarrierPackage();
+
+ if (OAMgrr_TRX_RC(0) == rc) trx = 0;
+ else trx = 1;
+
+ switch (tag)
+ {
+ case MIBT_carrierFrequency_0:
+ case MIBT_carrierFrequency_1:
+ //Update DSP with new frequencies
+ //
+ if (grr_IsBtsAmTypeBlocked()||grr_IsBtsOpTypeBlocked()) pwr = 0;
+ else pwr = 1;
+
+ grr_TuneTrxSynth(trx, pwr);
+
+ break;
+
+ case MIB_txPwrMaxReduction_0:
+ case MIB_txPwrMaxReduction_1:
+ //radio carriers' Power reduction changed
+ //
+ grr_PassOamDspPwrRedStep(trx);
+
+ break;
+
+ default:
+ // do nothing for now.
+ DBG_WARNING("grr_ProcOamRadioCarrierPackage: received invalid mib param tag(%d)\n",tag);
+ break;
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamT31xxPackage(void)
+{
+ DBG_FUNC("grr_ProcOamT31xxPackage", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_ProcOamT31xxPackage: do nothing but retrieve the new setting\n");
+
+ grr_GetOamT31xxTimerStructure();
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamAdjacentCellPackage(void)
+{
+ unsigned char i,j,ncellNo;
+
+ DBG_FUNC("grr_ProcOamAdjacentCellPackage", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ switch(MIB_ITM(grr_pItcRxOamMsg->mibTag))
+ {
+ case LEAF_adjCell_reselectionTable:
+ DBG_TRACE("grr_ProcOamAdjacentCellPackage: reselction table updated\n");
+ grr_PassOamMsSystemInformation2(0,GRR_L1SI_TYPE_2,OAMgrr_RA_CELL_BARRED_STATE);
+ break;
+
+ case LEAF_adjCell_handoverTable:
+ DBG_TRACE("grr_ProcOamAdjacentCellPackage: handover table updated\n");
+ i = 0;
+ while ( i<OAMgrr_MAX_TRXS )
+ {
+ //Pass updated information to both mobile and DSP
+ grr_PassOamMsSystemInformation5(i,GRR_L1SI_TYPE_5,OAMgrr_RA_CELL_BARRED_STATE);
+
+ ncellNo=grr_GetOamTotalAvailableHoNCells();
+ for (j=0;j<OAMgrr_HO_ADJCELL_NO_MAX;j++)
+ grr_PassOamDspHoNeighCell(i,j,ncellNo);
+ i++;
+ }
+ break;
+
+ default:
+ //Received unrecognized message tag
+ DBG_WARNING("grr_ProcOamAdjacentCellPackage: unexpected OAM mib Table tag(%x)\n",
+ MIB_ITM(grr_pItcRxOamMsg->mibTag) );
+ break;
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamHandoverControlPackage(void)
+{
+ int i;
+
+ DBG_FUNC("grr_ProcOamHandoverControlPackage", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ //Retrive changed ho ctrl package
+ grr_GetOamHandoverControlPackage();
+
+ //Update DSP with new HandoverControlPackage
+ i = 0;
+ while ( i<OAMgrr_MAX_TRXS )
+ {
+ //Pass updated info to DSPs
+ grr_PassOamDspHoServCell(i);
+ i++;
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_ProcOamPowerControlPackage(void)
+{
+ int i;
+
+ DBG_FUNC("grr_ProcOamPowerControlPackage", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ //Retrive changed pwr ctrl pkg
+ grr_GetOamPowerControlPackage();
+
+ //Update DSP with new power control package
+ i = 0;
+ while ( i<OAMgrr_MAX_TRXS )
+ {
+ grr_PassOamDspPwrCtrl(i);
+ i++;
+ }
+
+ DBG_LEAVE();
+}
+
+
+void grr_ProcOamResourceConfigData(void)
+{
+ int i;
+ int opState;
+
+ DBG_FUNC("grr_ProcOamResourceConfigData", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ //Retrive Rrm data
+ opState = OAMgrr_CB_FEATURE_SETTING;
+ grr_GetOamRrmData();
+
+ //Process mib rrm config change
+ switch (grr_pItcRxOamMsg->mibTag)
+ {
+ case MIB_rm_nim_0_1:
+ //CB feature control
+ //
+ if (grr_pItcRxOamMsg->val.varVal>1)
+ {
+ DBG_WARNING("grr_ProcOamResourceConfigData: invalid cb config val(%d)\n",
+ grr_pItcRxOamMsg->val.varVal);
+ printf("grr_ProcOamResourceConfigData: invalid cb config val(%d)\n",
+ grr_pItcRxOamMsg->val.varVal);
+ assert(0);
+
+ } else
+ {
+ grr_PassOamMsSystemInformation4(0,GRR_L1SI_TYPE_4,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_SendCbCfgSetting(MODULE_GRR, rm_MsgQId);
+ }
+
+ break;
+
+ case MIB_rm_nim_0_3: //Cell Reselect Offset
+ case MIB_rm_nim_0_4: //Temporary Offset
+ case MIB_rm_nim_0_5: //Penalty Offset
+ case MIB_rm_nim_0_6: //Cell Bar Qualify
+ //case MIB_rm_nim_0_7: //auth/cipher feature control
+ //Update mobile with the new config params
+ //
+ grr_PassOamMsSystemInformation3(0, GRR_L1SI_TYPE_3,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation4(0, GRR_L1SI_TYPE_4,OAMgrr_RA_CELL_BARRED_STATE);
+
+ break;
+
+ case MIB_rm_nim_1_1:
+ //Overloaded cell barring. FS needed
+ //
+
+ break;
+
+ grr_PassOamMsSystemInformation2(0,GRR_L1SI_TYPE_2,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation3(0,GRR_L1SI_TYPE_3,OAMgrr_RA_CELL_BARRED_STATE);
+ grr_PassOamMsSystemInformation4(0,GRR_L1SI_TYPE_4,OAMgrr_RA_CELL_BARRED_STATE);
+
+ break;
+
+ default:
+ DBG_WARNING("grr_ProcOamResourceConfigData: invalid changed mib param tag(%d)\n",
+ grr_pItcRxOamMsg->mibTag);
+ break;
+ }
+
+ DBG_LEAVE();
+}
+
+bool grr_ProcOamValidateMsg(void)
+{
+ bool ret;
+ unsigned char trx;
+
+ DBG_FUNC("grr_ProcOamValidateMsg", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ ret = true;
+
+ switch (grr_pItcRxOamMsg->mibTag)
+ {
+ case MIBT_channelCombination_0:
+ case MIBT_channelCombination_1:
+
+ //Attempt to change trx0 slot0 channel comb
+ //
+
+ if ( (grr_pItcRxOamMsg->val.varTbl.idx==0) &&
+ (grr_pItcRxOamMsg->mibTag==MIBT_channelCombination_0) )
+ {
+ //Not allowed to change trx0slot0's channel combination
+ DBG_WARNING("grr_ProcOamValidateMsg: apply chan comb(%d) to trx(0) slot(0)\n",
+ OAMgrr_TRX_SLOT_COMB(0,0));
+ printf("grr_ProcOamValidateMsg: apply chan comb(%d) to trx(0) slot(0)\n",
+ OAMgrr_TRX_SLOT_COMB(0,0));
+ grr_SubmitAlarm(grr_TrxSlotChanCombChangeAlarmCode[0][0]);
+ ret = false;
+ } else
+ {
+ //Before change channel slot combination, the trx-slot must be locked
+ //
+ if (grr_pItcRxOamMsg->mibTag==MIBT_channelCombination_0) trx = 0;
+ else trx = 1;
+
+ if (OAMgrr_CHN_AMSTATE(trx,grr_pItcRxOamMsg->val.varTbl.idx) != locked)
+ {
+ //GP Manager shall block this change unless amState is locked
+ //
+ DBG_WARNING("grr_ProcOamValidateMsg: lock trx(%d) slot(%d) before change chan comb\n",
+ trx, grr_pItcRxOamMsg->val.varTbl.idx);
+ printf("grr_ProcOamValidateMsg: lock trx(%d) slot(%d) before change chan comb\n",
+ trx, grr_pItcRxOamMsg->val.varTbl.idx);
+ ret = false;
+ }
+ }
+
+ break;
+
+ default:
+ break;
+ }
+
+ DBG_LEAVE();
+ return ret;
+}
+
+#endif //__GRR_PROCOAMMSG_CPP__
+
diff --git a/data/mnet/GP10/Host/grr/src/grr_ProcRlcMsg.cpp b/data/mnet/GP10/Host/grr/src/grr_ProcRlcMsg.cpp
new file mode 100644
index 0000000..8cc0b03
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src/grr_ProcRlcMsg.cpp
@@ -0,0 +1,140 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_PROCRLCMSG_CPP__
+#define __GRR_PROCRLCMSG_CPP__
+
+#include "grr\grr_head.h"
+
+void grr_ProcRlcMsg(void)
+{
+ unsigned char trx, slot;
+
+ DBG_FUNC("grr_ProcRlcMsg", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ trx = grr_pItcRxRlcMsg->trx; slot = grr_pItcRxRlcMsg->slot;
+
+ DBG_TRACE("grr_ProcRlcMsg: received Rlc msg(%d) for trx(%d) slot(%d)\n",
+ grr_pItcRxRlcMsg->message_type, trx, slot);
+
+ //Validate received RRM message
+ if (!grr_ProcRlcValidateMsg()) {DBG_LEAVE(); return;}
+
+ //Only expecting trx slot shutdown ack
+ switch (grr_pItcRxRlcMsg->message_type)
+ {
+ case GRR_TRX_SLOT_SHUTDOWN_ACK:
+ //Received trx slot shutdown ack
+ //
+ grr_ProcRlcTrxSlotShutdownAck(trx,slot);
+
+ break;
+
+ default:
+ break;
+ }
+
+ DBG_LEAVE();
+}
+
+bool grr_ProcRlcValidateMsg(void)
+{
+ unsigned char trx, slot;
+
+ DBG_FUNC("grr_ProcRlcRlcValidateMsg", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ //Validate the received RLC message before processing it
+ //
+
+ //Right now only expecting trx slot shutdown acknowledgement
+ if (grr_pItcRxRlcMsg->message_type != GRR_TRX_SLOT_SHUTDOWN_ACK)
+ {
+ DBG_LEAVE();
+ return false;
+ }
+
+ //Apply sanitary check
+ trx = grr_pItcRxRlcMsg->trx; slot = grr_pItcRxRlcMsg->slot;
+
+ if ( (trx>=OAMgrr_MAX_TRXS) || (slot>=8) )
+ {
+ DBG_WARNING("grr_ProcRlcValidateMsg: recved slot shutdown ack for invalid trx(%d) slot(%d)\n",
+ trx, slot);
+ DBG_LEAVE();
+ return false;
+ }
+
+ //Check if the (trx,slot) already left pending on shutdown ack now
+ //
+ if (OAMgrr_TRX_SLOT_AMSTATE(trx,slot) != shuttingDown) {DBG_LEAVE();return false;}
+
+ //Check if the shutdown ack makes sense to current chancomb
+ //
+ if (OAMgrr_TRX_SLOT_COMB(trx,slot)!=OAMgrr_TRX_SLOT_COMB_13)
+ {
+ DBG_WARNING("grr_ProcRlcValidateMsg: received trx(%d) slot(%d) shutdown ack chanComb(%d) n.a.\n",
+ trx, slot, OAMgrr_TRX_SLOT_COMB(trx,slot));
+ printf("grr_ProcRlcValidateMsg: received trx(%d) slot(%d) shutdown ack chanComb(%d) n.a.\n",
+ trx, slot, OAMgrr_TRX_SLOT_COMB(trx,slot));
+
+ DBG_LEAVE();
+ return false;
+ }
+
+ DBG_LEAVE();
+ return true;
+}
+
+void grr_ProcRlcTrxSlotShutdownAck(unsigned char trx, unsigned char slot)
+{
+ DBG_FUNC("grr_ProcRlcTrxSlotShutdownAck", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ //Apply sanitary check
+ if ( (trx>=OAMgrr_MAX_TRXS)||(slot>=8))
+ {
+ DBG_WARNING("grr_ProcRlcTrxSlotShutdownAck: invalid trx(%d) or slot(%d)\n",
+ trx, slot);
+ DBG_LEAVE();
+ return;
+ }
+
+ OAMgrr_CHN_AMSTATEa(trx, slot) = locked;
+ grr_SetOamTrxSlotAmState(trx,slot,locked);
+ grr_SubmitAlarm(grr_TrxSlotAmStateLockedAlarmCode[trx][slot]);
+
+ if (OAMgrr_TRX_AMSTATE(trx)==shuttingDown)
+ grr_ProcRlcTryShutdownTrx(trx);
+
+ DBG_LEAVE();
+}
+
+void grr_ProcRlcTryShutdownTrx(unsigned char trx)
+{
+ DBG_FUNC("grr_ProcRlcTryShutdownTrx", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ grr_ProcUtilTryShutdownTrx(trx);
+
+ DBG_LEAVE();
+}
+
+void grr_ProcRlcTryShutdownBts(void)
+{
+ DBG_FUNC("grr_ProcRlcTryShutdownBts", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ grr_ProcUtilTryShutdownBts();
+
+ DBG_LEAVE();
+}
+
+#endif //__GRR_PROCRLCMSG_CPP__
diff --git a/data/mnet/GP10/Host/grr/src/grr_ProcRrmMsg.cpp b/data/mnet/GP10/Host/grr/src/grr_ProcRrmMsg.cpp
new file mode 100644
index 0000000..f444efb
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src/grr_ProcRrmMsg.cpp
@@ -0,0 +1,142 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_PROCRRMMSG_CPP__
+#define __GRR_PROCRRMMSG_CPP__
+
+#include "grr\grr_head.h"
+
+void grr_ProcRrmMsg(void)
+{
+ unsigned char trx, slot;
+
+ DBG_FUNC("grr_ProcRrmMsg", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ trx = grr_pItcRxRrmMsg->trx; slot = grr_pItcRxRrmMsg->slot;
+
+ DBG_TRACE("grr_ProcRrmMsg: received Rrm msg(%d) trx(%d) slot(%d)\n",
+ grr_pItcRxRrmMsg->message_type, trx, slot);
+
+ //Validate received RRM message
+ if (!grr_ProcRrmValidateMsg()) {DBG_LEAVE(); return;}
+
+ //Only expecting individual slot shutting down acknowledge
+ switch (grr_pItcRxRrmMsg->message_type)
+ {
+ case GRR_TRX_SLOT_SHUTDOWN_ACK:
+ //Received trx slot shutdown ack
+ //
+ grr_ProcRrmTrxSlotShutdownAck(trx,slot);
+
+ break;
+
+ default:
+ break;
+ }
+
+ DBG_LEAVE();
+}
+
+bool grr_ProcRrmValidateMsg(void)
+{
+ unsigned char trx, slot;
+
+ DBG_FUNC("grr_ProcRrmValidateMsg", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+
+ //Validate the RRM message is expected:
+ //
+
+ //Right now only expecting TS shuttingdow acknowledgement
+ if (grr_pItcRxRrmMsg->message_type != GRR_TRX_SLOT_SHUTDOWN_ACK)
+ {
+ DBG_LEAVE();
+ return false;
+ }
+
+ trx = grr_pItcRxRrmMsg->trx; slot = grr_pItcRxRrmMsg->slot;
+
+ if ( (trx>=OAMgrr_MAX_TRXS) || (slot>=8) )
+ {
+ DBG_WARNING("grr_ProcRrmValidateMsg: recved slot shutdown ack for invalid trx(%d) slot(%d)\n",
+ trx, slot);
+ DBG_LEAVE();
+ return false;
+ }
+
+ //Check if (trx,slot) is still pending on shutdown ack
+ //
+ if (OAMgrr_TRX_SLOT_AMSTATE(trx,slot) != shuttingDown) {DBG_LEAVE(); return false;}
+
+ //Check if (trx,slot) is configured for circuit-switched use
+ //
+ if ( (OAMgrr_TRX_SLOT_COMB(trx,slot)!=OAMgrr_TRX_SLOT_COMB_5) &&
+ (OAMgrr_TRX_SLOT_COMB(trx,slot)!=OAMgrr_TRX_SLOT_COMB_1) )
+ {
+ DBG_WARNING("grr_ProcRrmValidateMsg: recved trx(%d) slot(%d) shutdown ack chanComb(%d) n.a.\n",
+ trx, slot, OAMgrr_TRX_SLOT_COMB(trx,slot));
+ printf("grr_ProcRrmValidateMsg: recved trx(%d) slot(%d) shutdown ack chanComb(%d) n.a.\n",
+ trx, slot, OAMgrr_TRX_SLOT_COMB(trx,slot));
+ DBG_LEAVE();
+ return false;
+ }
+
+ DBG_LEAVE();
+ return true;
+}
+
+
+void grr_ProcRrmTrxSlotShutdownAck(unsigned char trx, unsigned char slot)
+{
+ DBG_FUNC("grr_ProcRrmTrxSlotShutdownAck", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ //Apply sanitary check
+ if ( (trx>=OAMgrr_MAX_TRXS)||(slot>=8))
+ {
+ DBG_WARNING("grr_ProcRrmTrxSlotShutdownAck: invalid trx(%d) or slot(%d)\n",
+ trx, slot);
+ DBG_LEAVE();
+ return;
+ }
+
+ OAMgrr_CHN_AMSTATEa(trx, slot) = locked;
+ grr_SetOamTrxSlotAmState(trx,slot,locked);
+ grr_SubmitAlarm(grr_TrxSlotAmStateLockedAlarmCode[trx][slot]);
+
+ if (OAMgrr_TRX_AMSTATE(trx)==shuttingDown)
+ grr_ProcRrmTryShutdownTrx(trx);
+
+ DBG_LEAVE();
+}
+
+void grr_ProcRrmTryShutdownTrx(unsigned char trx)
+{
+ DBG_FUNC("grr_ProcRrmTryShutdownTrx", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ grr_ProcUtilTryShutdownTrx(trx);
+
+ DBG_LEAVE();
+}
+
+void grr_ProcRrmTryShutdownBts(void)
+{
+ DBG_FUNC("grr_ProcRrmTryShutdownBts", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ grr_ProcUtilTryShutdownBts();
+
+ DBG_LEAVE();
+}
+
+#endif //__GRR_PROCRRMMSG_CPP__
+
diff --git a/data/mnet/GP10/Host/grr/src/grr_ProcUtil.cpp b/data/mnet/GP10/Host/grr/src/grr_ProcUtil.cpp
new file mode 100644
index 0000000..7cfb944
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src/grr_ProcUtil.cpp
@@ -0,0 +1,105 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_PROCUTIL_CPP__
+#define __GRR_PROCUTIL_CPP__
+
+#include "grr\grr_head.h"
+
+void grr_ProcUtilTryShutdownTrx(unsigned char trx)
+{
+ unsigned char i;
+
+ DBG_FUNC("grr_ProcUtilTryShutdownTrx", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ //Apply sanitary check
+ if (trx>=OAMgrr_MAX_TRXS)
+ {
+ DBG_WARNING("grr_ProcUtilTryShutdownTrx: invalid trx(%d)\n", trx);
+ } else
+ {
+ //Scan through all its slots to see if all of them locked or not
+ for (i=0;i<8;i++)
+ {
+ if ( OAMgrr_CHN_AMSTATE(trx, i) == shuttingDown) break;
+ else
+ {
+ if (OAMgrr_CHN_AMSTATE(trx,i) != locked)
+ {
+ DBG_WARNING("grr_ProcUtilTryShutdownTrx: amState(%d) impossible for trx(%d) slot(%d)\n",
+ OAMgrr_CHN_AMSTATE(trx,i),trx,i);
+ OAMgrr_CHN_AMSTATEa(trx,i) = locked;
+ grr_SetOamTrxSlotAmState(trx,i,locked);
+ grr_SubmitAlarm(grr_TrxSlotAmStateLockedAlarmCode[trx][i]);
+ }
+ }
+ }
+
+ if (i>=8)
+ {
+ //Lock the whole trx
+ //
+ OAMgrr_TRX_AMSTATEa(trx) = locked;
+ grr_SubmitAlarm(grr_TrxAmStateLockedAlarmCode[trx]);
+ grr_TuneTrxSynth(trx,0);
+
+ if (OAMgrr_BTS_AMSTATE==shuttingDown)
+ grr_ProcRlcTryShutdownBts();
+ }
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_ProcUtilTryShutdownBts(void)
+{
+ int i,j;
+
+ DBG_FUNC("grr_ProcUtilTryShutdownBts", GRR_LAYER_PROC);
+ DBG_ENTER();
+
+ //Scan through all TRXs to see if all of them locked or not
+ for (i=0;i<OAMgrr_MAX_TRXS;i++)
+ {
+ if (OAMgrr_TRX_AMSTATE(i)==shuttingDown) break;
+ else
+ {
+ if (OAMgrr_TRX_AMSTATE(i) != locked)
+ {
+ DBG_WARNING("grr_ProcUtilTryShutdownBts: trx(%d) amState(%d) impossible\n",
+ i, OAMgrr_TRX_AMSTATE(i));
+ OAMgrr_TRX_AMSTATEa(i) = locked;
+ grr_SetOamTrxAmState(i,locked);
+ grr_SubmitAlarm(grr_TrxAmStateLockedAlarmCode[i]);
+ for (j=0;j<8;j++)
+ {
+ if (OAMgrr_CHN_AMSTATE(i,j) != locked)
+ {
+ OAMgrr_CHN_AMSTATEa(i,j) = locked;
+ grr_SetOamTrxSlotAmState(i,j,locked);
+ grr_SubmitAlarm(grr_TrxSlotAmStateLockedAlarmCode[i][j]);
+ }
+ }
+ }
+ }
+ }
+
+ if (i>=OAMgrr_MAX_TRXS)
+ {
+ //Lock BTS
+ OAMgrr_BTS_AMSTATEa = locked;
+ grr_SetOamBtsAmState(locked);
+ grr_SubmitAlarm(EC_GRR_BTS_LOCKED);
+ }
+
+ DBG_LEAVE();
+}
+
+#endif //__GRR_PROCUTIL_CPP__
diff --git a/data/mnet/GP10/Host/grr/src/grr_RadioCtrl.cpp b/data/mnet/GP10/Host/grr/src/grr_RadioCtrl.cpp
new file mode 100644
index 0000000..9d9b63b
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src/grr_RadioCtrl.cpp
@@ -0,0 +1,722 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __GRR_RADIOCTRL_CPP__
+#define __GRR_RADIOCTRL_CPP__
+
+#include "dsp/dsptypes.h"
+#include "dsp/dsphmsg.h"
+#include "grr/grr_head.h"
+
+extern int l1pTrxSwapState; /* 1/0 - swap/don't swap trx-dsp mapping */
+extern "C" int DS1780_getCdcTemp(void);
+extern "C" STATUS I2Cwrite(unsigned char*, unsigned char, unsigned char, int);
+extern "C" STATUS I2Cread(unsigned char*, unsigned char, unsigned char, int);
+extern "C" void I2Coperation(int);
+
+#define MONITOR_INTERVAL 60 // in seconds
+
+#define ON 1
+#define OFF 0
+
+/* Added to support ConfigTxPwrValues in l1Proxy.cpp */
+#define PWR_TABLE_ADDR 0x00
+#define TX_STEP_TABLE_SIZE 36
+#define TX_FREQ_SWEEP_SIZE 15
+#define RX_GAIN_CHAR_SIZE 6
+#define END_MARKER_SIZE 1
+#define END_MARKER_VALUE 0x2b
+
+#define PWR_TABLE_SIZE (2*TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + RX_GAIN_CHAR_SIZE + END_MARKER_SIZE)
+
+#define EEPROM_STATUS_OK 0
+#define EEPROM_STATUS_UPDATE 1
+#define EEPROM_STATUS_REPORT_ERROR 2
+
+int grrPowerValsConfigured = 0;
+
+/*****************************************************************************
+ *
+ * Module Name: pwrtempadjust
+ *
+ * Purpose: Query system temperature, determine Tx DAC offset due to
+ * temperature and send the offset to both DSPs
+ *
+ *****************************************************************************/
+#define CLIP_VALUE 75
+
+/* globals for all functions */
+
+int lowTempStart = 10;
+float lowTempSlope = 0.99;
+int highTempStart = 44;
+float highTempSlope = 1.02;
+int lowestTempRead;
+int highestTempRead;
+int deltaDAC = 0;
+int PwrAdjDiag=0;
+int gEnablePwrTempAdjust=1;
+
+void InitializeTempAdjust(int interval)
+{
+ DBG_FUNC("InitializeTempAdjust",GRR_LAYER_DSP);
+ DBG_ENTER();
+
+ int temperatureValue;
+
+ temperatureValue=DS1780_getCdcTemp();
+ lowestTempRead=temperatureValue;
+ highestTempRead=temperatureValue;
+
+ DBG_TRACE("Power Temperature Adjust Active with interval time of %d\n",interval);
+ DBG_TRACE(" Low temp start point:%d Low temp slope:%f\n",lowTempStart,lowTempSlope);
+ DBG_TRACE(" High temp start point:%d High temp slope:%f\n",highTempStart,highTempSlope);
+
+ DBG_LEAVE();
+}
+
+
+void pwrtempadjust ( )
+{
+ int temperatureValue;
+ int deltaDAC;
+ unsigned char buffer[40];
+
+ DBG_FUNC("pwrtempadjust",GRR_LAYER_DSP);
+ DBG_ENTER();
+ temperatureValue=DS1780_getCdcTemp();
+
+ /*
+ * If temperature compensation is enabled and measured temperature is within legal range...
+ */
+ if ( gEnablePwrTempAdjust && CLIP_VALUE>temperatureValue )
+ {
+ if (temperatureValue>highestTempRead)
+ highestTempRead=temperatureValue;
+
+ if (temperatureValue<lowestTempRead)
+ lowestTempRead=temperatureValue;
+
+ if (PwrAdjDiag>=2) {
+ DBG_TRACE(" pwrtempadjust: Temperature is %d\n",temperatureValue);
+ }
+
+ deltaDAC = 0;
+ if (temperatureValue>highTempStart) {
+ deltaDAC = (int)(highTempSlope*(float)(temperatureValue-highTempStart));
+ if (PwrAdjDiag>=1) {
+ DBG_TRACE(" pwrtempadjust: High temperature is %d, Adjustment is %d\n", temperatureValue, deltaDAC);
+ }
+ } else if (temperatureValue<lowTempStart) {
+ deltaDAC = (int)(lowTempSlope*(float)(temperatureValue-lowTempStart));
+ if (PwrAdjDiag>=1) {
+ DBG_TRACE(" pwrtempadjust: Low temperature is %d, Adjustment is %d\n", temperatureValue, deltaDAC);
+ }
+ }
+
+ /*-- Send Temp Compensation message to DSP 0 --*/
+ buffer[0] = TRX_MANAGE_MSG; /* function type */
+ buffer[1] = TEMPERATURE_COMPENSATION>>8;
+ buffer[2] = TEMPERATURE_COMPENSATION;
+ buffer[3] = 0;
+ buffer[4] = deltaDAC & 0xff; /* DAC offset due to temperature */
+ api_SendMsgFromRmToL1(5, buffer);
+
+ /*-- Send Temp Compensation message to DSP 1 --*/
+ buffer[3] = 1;
+ api_SendMsgFromRmToL1(5, buffer);
+
+ if (PwrAdjDiag>=2) {
+ DBG_TRACE(" pwrtempadjust: out of control loop\n");
+ }
+ }
+ else if ( gEnablePwrTempAdjust )
+ {
+ if (PwrAdjDiag>=1) {
+ DBG_ERROR(" pwrtempadjust: TEMPERATURE OUT OF RANGE: %d\n",temperatureValue);
+ }
+ }
+ else
+ {
+ if (PwrAdjDiag>=2) {
+ DBG_TRACE(" pwrtempadjust: Temperature compensation is disabled (gEnablePwrTempAdjust=0)\n");
+ }
+ }
+
+ DBG_LEAVE();
+}
+
+/*****************************************************************************
+ *
+ * Module Name: pwrtempadjustPrintStats
+ *
+ *****************************************************************************/
+int pwrtempadjustPrintStats(void)
+{
+ printf(" pwrtempadjust: lowest temp, highest temp, current deltaDAC: %d, %d, %d\n",
+ lowestTempRead, highestTempRead, deltaDAC);
+}
+
+/*****************************************************************************
+ *
+ * Module Name: EnablePwrTempAdjust
+ *
+ *****************************************************************************/
+void EnablePwrTempAdjust(void)
+{
+ gEnablePwrTempAdjust = 1;
+ printf(" Temperature Compensation is now Enabled\n");
+}
+
+/*****************************************************************************
+ *
+ * Module Name: DisablePwrTempAdjust
+ *
+ *****************************************************************************/
+void DisablePwrTempAdjust(void)
+{
+ unsigned char buffer[40];
+
+ gEnablePwrTempAdjust = 0;
+
+ /*-- Send Temp Compensation message to DSP 0 --*/
+ buffer[0] = TRX_MANAGE_MSG; /* function type */
+ buffer[1] = TEMPERATURE_COMPENSATION>>8;
+ buffer[2] = TEMPERATURE_COMPENSATION;
+ buffer[3] = 0; /* trx 0 */
+ buffer[4] = 0; /* DAC offset due to temperature */
+ api_SendMsgFromRmToL1(5, buffer);
+
+ /*-- Send Temp Compensation message to DSP 1 --*/
+ buffer[3] = 1; /* trx 1 */
+ api_SendMsgFromRmToL1(5, buffer);
+
+ printf(" Temperature Compensation is now Disabled\n");
+}
+
+
+/*****************************************************************************
+ *
+ * Module Name: grr_RadioMonitor
+ *
+ *****************************************************************************/
+void grr_RadioMonitor()
+{
+ RMDBG_ENTER(("ENTER@rm_RadioMonitor()",GRR_LAYER_DSP));
+
+ int interval = sysClkRateGet() * MONITOR_INTERVAL;
+
+ InitializeTempAdjust(interval);
+
+ grrMonTaskObj.JCTaskEnterLoop();
+
+ /* spin here until some power values have been configured */
+ while (grrPowerValsConfigured <= 1)
+ {
+ taskDelay(10);
+ }
+
+ while (1)
+ {
+ taskDelay(interval);
+
+ pwrtempadjust();
+ }
+
+ grrMonTaskObj.JCTaskNormExit();
+
+}
+
+
+/*****************************************************************************
+ *
+ * Module Name: ConfigTxPwrValues
+ *
+ * Purpose: Handler for the Request to Configure Radio Tx Pwr Values msg.
+ * It reads the Power Tables for both Tx's and sends them to the
+ * associated DSP.
+ *
+ *****************************************************************************/
+void ConfigTxPwrValues(unsigned char trx)
+{
+ STATUS I2CStatus;
+ unsigned char pwrCalTable[PWR_TABLE_SIZE];
+ unsigned char *pwrcal_ptr = &pwrCalTable[0];
+ unsigned char radioEEpromDevAddr = 0x53;
+ UINT8 MsgLen = 0;
+ int i;
+ unsigned short length;
+ unsigned char buffer[40];
+
+ DBG_FUNC("ConfigTxPwrValues",GRR_LAYER_DSP);
+ DBG_ENTER();
+
+ I2Coperation(ON);
+ I2CStatus = I2Cread(pwrcal_ptr, radioEEpromDevAddr, (unsigned char)PWR_TABLE_ADDR, (int)PWR_TABLE_SIZE);
+ I2Coperation(OFF);
+
+ if ( I2CStatus != OK )
+ {
+ DBG_ERROR( "Error in I2Cread() from ConfigTxPwrValues()\n" );
+ }
+ else
+ {
+ /*
+ * Construct a temporary packed calibration table for the appropriate DSP. Start with the
+ * appropriate 36-byte step table, followed by the appropriate 15-byte frequency sweep,
+ * followed by the 6-byte rx gain table. These sub-tables will be sent to the DSP below.
+ */
+ if((!l1pTrxSwapState && trx == 0) || (l1pTrxSwapState && trx == 1))
+ {
+ /*
+ * Construct packed calibration table for hopping radio on DSP A
+ */
+ for ( i=0; i<RX_GAIN_CHAR_SIZE ; i++ ) // move Rx gain table to follow step and sweep tables
+ {
+ pwrCalTable[TX_STEP_TABLE_SIZE + TX_FREQ_SWEEP_SIZE + i]
+ = pwrCalTable[2*TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + i];
+ }
+
+ }
+ else
+ {
+ /*
+ * Construct packed calibration table for non-hopping radio on DSP B
+ */
+ for ( i=0; i<TX_STEP_TABLE_SIZE ; i++ ) // move step table to beginning
+ {
+ pwrCalTable[i] = pwrCalTable[TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + i];
+ }
+ for ( i=0; i<TX_FREQ_SWEEP_SIZE ; i++ ) // move sweep table to follow step table
+ {
+ pwrCalTable[TX_STEP_TABLE_SIZE + i] = pwrCalTable[TX_STEP_TABLE_SIZE + TX_FREQ_SWEEP_SIZE + i];
+ }
+ for ( i=0; i<RX_GAIN_CHAR_SIZE ; i++ ) // move Rx gain table to follow sweep table
+ {
+ pwrCalTable[TX_STEP_TABLE_SIZE + TX_FREQ_SWEEP_SIZE + i]
+ = pwrCalTable[2*TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + i];
+ }
+ }
+ /*
+ * Send Tx Pwr Step Table to this DSP
+ */
+ length = 0;
+ buffer[length++] = TRX_MANAGE_MSG; /* function type */
+ buffer[length++] = RADIO_TX_PWR_CHAR_CONFIG>>8;
+ buffer[length++] = RADIO_TX_PWR_CHAR_CONFIG;
+ buffer[length++] = trx;
+ for(i=0; i<TX_STEP_TABLE_SIZE; i++)
+ {
+ buffer[length++] = pwrCalTable[i];
+ }
+ api_SendMsgFromRmToL1(length, buffer);
+
+ /*
+ * Send Tx Offset vs. Frequency Table to this DSP
+ */
+ length = 0;
+ buffer[length++] = TRX_MANAGE_MSG; /* function type */
+ buffer[length++] = TX_PWR_OFFSETS_CONFIG>>8;
+ buffer[length++] = TX_PWR_OFFSETS_CONFIG;
+ buffer[length++] = trx;
+ for(i=0; i<TX_FREQ_SWEEP_SIZE; i++)
+ {
+ buffer[length++] = pwrCalTable[TX_STEP_TABLE_SIZE + i];
+ }
+ api_SendMsgFromRmToL1(length, buffer);
+
+ /*
+ * Send Tx Offset vs. Frequency Table to this DSP
+ */
+ length = 0;
+ buffer[length++] = TRX_MANAGE_MSG; /* function type */
+ buffer[length++] = RADIO_GAIN_CHAR_CONFIG>>8;
+ buffer[length++] = RADIO_GAIN_CHAR_CONFIG;
+ buffer[length++] = trx;
+ for(i=0; i<RX_GAIN_CHAR_SIZE; i++)
+ {
+ buffer[length++] = pwrCalTable[TX_STEP_TABLE_SIZE + TX_FREQ_SWEEP_SIZE + i];
+ }
+
+ api_SendMsgFromRmToL1(length, buffer);
+ }
+
+ grrPowerValsConfigured++;
+
+ DBG_LEAVE();
+}
+
+
+/*****************************************************************************
+ *
+ * Module Name: ReadEeprom
+ *
+ * Purpose: Read Tx calibration tables and uplink amp characteristics from
+ * EEPROM on the RF board
+ *
+ *****************************************************************************/
+STATUS ReadEeprom(void)
+{
+ STATUS I2CStatus;
+ unsigned char PwrCalTable[PWR_TABLE_SIZE];
+ unsigned char *pwrcal_ptr = &PwrCalTable[0]; // pointless?
+ unsigned char radioEEpromDevAddr = 0x53;
+ UINT8 MsgLen = 0;
+ int i, j = 0;
+
+ DBG_FUNC("ReadEeprom",GRR_LAYER_DSP);
+ DBG_ENTER();
+
+ I2Coperation(ON);
+ I2CStatus = I2Cread(pwrcal_ptr, radioEEpromDevAddr, (unsigned char)PWR_TABLE_ADDR, (int)PWR_TABLE_SIZE);
+ I2Coperation(OFF);
+
+ printf("After EEPROM read, I2CStatus = %d\n", I2CStatus);
+ for ( i=0; i<PWR_TABLE_SIZE; i++ )
+ {
+ printf("%02x ", PwrCalTable[i]);
+ if ( i%10 == 9 )
+ {
+ printf("\n");
+ }
+ }
+ printf("\n");
+ DBG_LEAVE();
+}
+
+
+/*****************************************************************************
+ *
+ * Module Name: WriteEeprom
+ *
+ * Purpose: Write Tx calibration tables and uplink amp characteristics to
+ * EEPROM on the RF board
+ *
+ *****************************************************************************/
+STATUS WriteEeprom(void)
+{
+ STATUS I2CStatus;
+ unsigned char radioEEpromDevAddr = 0x53;
+ UINT8 MsgLen = 0;
+ int i, k;
+ FILE *fp;
+ int pwrCalTable[PWR_TABLE_SIZE];
+ UINT8 usByte;
+
+ DBG_FUNC("WriteEeprom",GRR_LAYER_DSP);
+ DBG_ENTER();
+
+ if ( fp = fopen("PowerCalTable.txt", "r") )
+ {
+
+ /*
+ * Read in 1 table of DAC values vs. Static Power Level (step)
+ * Note: this assumes TX_STEP_TABLE_SIZE is 36, format 9 across
+ */
+ for ( i=0; i<4; i++ )
+ {
+ k=9*i;
+ fscanf(fp, "%x %x %x %x %x %x %x %x %x",
+ pwrCalTable + k,
+ pwrCalTable + k + 1,
+ pwrCalTable + k + 2,
+ pwrCalTable + k + 3,
+ pwrCalTable + k + 4,
+ pwrCalTable + k + 5,
+ pwrCalTable + k + 6,
+ pwrCalTable + k + 7,
+ pwrCalTable + k + 8 );
+ }
+ /*
+ * Read in 2 tables of DAC values vs. Static Power Level (sweep)
+ * Note: this assumes TX_FREQ_SWEEP_SIZE is 15, format 15 across
+ */
+ for ( i=0; i<2; i++ )
+ {
+ k=15*i;
+ fscanf(fp, "%x %x %x %x %x %x %x %x %x %x %x %x %x %x %x",
+ pwrCalTable + TX_STEP_TABLE_SIZE + k,
+ pwrCalTable + TX_STEP_TABLE_SIZE + k + 1,
+ pwrCalTable + TX_STEP_TABLE_SIZE + k + 2,
+ pwrCalTable + TX_STEP_TABLE_SIZE + k + 3,
+ pwrCalTable + TX_STEP_TABLE_SIZE + k + 4,
+ pwrCalTable + TX_STEP_TABLE_SIZE + k + 5,
+ pwrCalTable + TX_STEP_TABLE_SIZE + k + 6,
+ pwrCalTable + TX_STEP_TABLE_SIZE + k + 7,
+ pwrCalTable + TX_STEP_TABLE_SIZE + k + 8,
+ pwrCalTable + TX_STEP_TABLE_SIZE + k + 9,
+ pwrCalTable + TX_STEP_TABLE_SIZE + k + 10,
+ pwrCalTable + TX_STEP_TABLE_SIZE + k + 11,
+ pwrCalTable + TX_STEP_TABLE_SIZE + k + 12,
+ pwrCalTable + TX_STEP_TABLE_SIZE + k + 13,
+ pwrCalTable + TX_STEP_TABLE_SIZE + k + 14 );
+ }
+ /*
+ * Read in 2nd table of DAC values vs. Static Power Level (step)
+ * Note: this assumes TX_STEP_TABLE_SIZE is 36, format 9 across
+ */
+ for ( i=0; i<4; i++ )
+ {
+ k=9*i;
+ fscanf(fp, "%x %x %x %x %x %x %x %x %x",
+ pwrCalTable + TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + k,
+ pwrCalTable + TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + k + 1,
+ pwrCalTable + TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + k + 2,
+ pwrCalTable + TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + k + 3,
+ pwrCalTable + TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + k + 4,
+ pwrCalTable + TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + k + 5,
+ pwrCalTable + TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + k + 6,
+ pwrCalTable + TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + k + 7,
+ pwrCalTable + TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + k + 8 );
+ }
+ /*
+ * Read in Amplifier Gain Characteristic
+ * Note: this assumes RX_GAIN_CHAR_SIZE is 6
+ */
+ fscanf(fp, "%x %x %x %x %x %x",
+ pwrCalTable + 2*TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE,
+ pwrCalTable + 2*TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + 1,
+ pwrCalTable + 2*TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + 2,
+ pwrCalTable + 2*TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + 3,
+ pwrCalTable + 2*TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + 4,
+ pwrCalTable + 2*TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + 5 );
+
+ fclose(fp);
+
+ /*
+ * Append marker byte(s)
+ */
+ for ( i=0; i<END_MARKER_SIZE; i++ )
+ {
+ pwrCalTable[2*TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + RX_GAIN_CHAR_SIZE + i] = END_MARKER_VALUE;
+ }
+
+ I2Coperation(ON);
+ /* EEPROM on radio board needs to be fed 1 byte at a time */
+ for ( i=0; i<PWR_TABLE_SIZE; i++ )
+ {
+ usByte = (UINT8)pwrCalTable[i];
+ printf("%02x ", usByte);
+ if ( i%10 == 9 )
+ {
+ printf("\n");
+ }
+ I2CStatus = I2Cwrite(&usByte, radioEEpromDevAddr, (unsigned char)i, 1);
+ taskDelay(2); /* Limit how fast the EEPROM gets the bytes */
+ }
+ I2Coperation(OFF);
+ printf("\nAfter EEPROM write, I2CStatus = %d\n", I2CStatus);
+ }
+ else
+ {
+ printf("\nError: Could not open PowerCalTable.txt\n");
+ }
+
+ DBG_LEAVE();
+}
+
+
+
+/*****************************************************************************
+ *
+ * Module Name: CheckEeprom
+ *
+ * Purpose: Read Tx calibration tables form EEPROM. If marker byte(s) missing,
+ * then (1) set output status to generate alarm, (2) construct table
+ * in Rel 1.5+ format by duplicating step table and appending uplink
+ * amplifier characteristics and marker, and (3) write table back
+ * to EEPROM.
+ *
+ * NOTE: The EEPROM update portion of CheckEeprom is intended to catch up
+ * pre-FCS GP10s and pre-Rel-1.5 GP10s to the EEPROM convention used
+ * in Release 1.5 and beyond. If more parameters are added to EEPROM
+ * in the future, then CheckEeprom is an ideal place to add updating
+ * code for the new format.
+ *
+ * Pre-FCS Format:
+ * 36-byte step table, two 15-byte sweep tables
+ *
+ * Pre-Rel-1.5 Format:
+ * 36-byte step table, two 15-byte sweep tables,
+ * 6-byte rx gain table, 1-byte marker
+ *
+ * Rel-1.5+ Format:
+ * one 36-byte step table, two 15-byte sweep tables,
+ * another 36-byte step table, 6-byte rx gain table, 1-byte marker
+ *
+ *****************************************************************************/
+STATUS CheckEeprom(void)
+{
+ STATUS I2CStatus;
+ unsigned char pwrCalTable[PWR_TABLE_SIZE];
+ unsigned char *pwrcal_ptr = &pwrCalTable[0]; // pointless?
+ unsigned char radioEEpromDevAddr = 0x53;
+ UINT8 usByte;
+ int i;
+ long ais;
+ int foundMarkerNewFormat;
+ int foundMarkerOldFormat;
+ int writeToEeprom = FALSE;
+ int appendUplinkInfo = FALSE;
+ STATUS returnValue;
+ /*--- Uplink amp characteristics for 900, 1800, 1900 as of 8/21/00 ---*/
+ UINT8 gainChar[3][RX_GAIN_CHAR_SIZE] = {
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+ {0x0d, 0x80, 0x01, 0x90, 0x02, 0x80},
+ {0x0f, 0x0f, 0x00, 0xd0, 0x01, 0x80} };
+ char aisname[3][9] = { {"GSM-900"}, {"DCS-1800"}, {"PCS-1900"} };
+ UINT8 defaultCalTable[PWR_TABLE_SIZE] = {
+ 0xd0,0xc8,0x54,0x43,0x37,0x22,0x32,0x22,0x23,
+ 0x23,0x33,0x24,0x34,0x43,0x55,0x44,0x54,0x54,
+ 0x44,0x34,0x33,0x42,0x33,0x23,0x32,0xc2,0x22,
+ 0x12,0x22,0x22,0x22,0x22,0x22,0x32,0x43,0x72,
+ 6, 6, 6, 7, 5, 5, 2, 0, 0, 2, 7, 9, 6, 5, 4,
+ 5, 5, 5, 5, 5, 3, 0, 0, 0, 0, 5, 7, 9, 3, 2,
+ 0xd0,0xc8,0x54,0x43,0x37,0x22,0x32,0x22,0x23,
+ 0x23,0x33,0x24,0x34,0x43,0x55,0x44,0x54,0x54,
+ 0x44,0x34,0x33,0x42,0x33,0x23,0x32,0xc2,0x22,
+ 0x12,0x22,0x22,0x22,0x22,0x22,0x32,0x43,0x72,
+ 0x0d,0x80,0x01,0x90,0x02,0x80,0x2b };
+
+ DBG_FUNC("CheckEeprom",RM_LAYER);
+ DBG_ENTER();
+
+ /*--------------------------------------------------------------------------
+ * Read power cal table from EEPROM
+ *--------------------------------------------------------------------------*/
+ I2Coperation(ON);
+ I2CStatus = I2Cread(pwrcal_ptr, radioEEpromDevAddr, (unsigned char)PWR_TABLE_ADDR, (int)PWR_TABLE_SIZE);
+ I2Coperation(OFF);
+ printf("After EEPROM read, I2CStatus = %d\n", I2CStatus);
+
+ /*--------------------------------------------------------------------------
+ * Check whether marker byte(s) are already in EEPROM at end of table in
+ * Release 1.5+ Format and also whether marker byte(s) are present at
+ * location used by earlier formats.
+ *--------------------------------------------------------------------------*/
+ foundMarkerNewFormat = TRUE;
+ foundMarkerOldFormat = TRUE;
+ for ( i=0; i<END_MARKER_SIZE; i++ )
+ {
+ if ( pwrCalTable[TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + RX_GAIN_CHAR_SIZE + i] != END_MARKER_VALUE )
+ {
+ foundMarkerOldFormat = FALSE;
+ }
+ }
+ for ( i=0; i<END_MARKER_SIZE; i++ )
+ {
+ if ( pwrCalTable[2*TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + RX_GAIN_CHAR_SIZE + i] != END_MARKER_VALUE )
+ {
+ foundMarkerNewFormat = FALSE;
+ }
+ }
+
+ /*--------------------------------------------------------------------------
+ * Check first two values of first step table. Both must be larger than
+ * 0x40 and in order of decreasing value (or equal). If not, copy default
+ * table and set flags to look up AIS, write to EEPROM and send alarm.
+ *--------------------------------------------------------------------------*/
+ if ( pwrCalTable[0]>0x40 && pwrCalTable[1]>0x40 && pwrCalTable[0]>=pwrCalTable[1] )
+ {
+ returnValue = EEPROM_STATUS_OK;
+ }
+ else
+ {
+ for ( i=0; i<PWR_TABLE_SIZE; i++ )
+ {
+ pwrCalTable[i] = defaultCalTable[i];
+ }
+ appendUplinkInfo = TRUE;
+ writeToEeprom = TRUE;
+ returnValue = EEPROM_STATUS_REPORT_ERROR;
+ }
+
+ /*--------------------------------------------------------------------------
+ * If marker is correct for Release 1.5+ and not for earlier format, then
+ * no action is required. Otherwise, update EEPROM format by duplicating
+ * the step table. For details, see format description in function header.
+ * NOTE: If markers are present for both formats, the GP could have been
+ * loaded with Release 1.5+, then reverted to an earlier release. In this
+ * case, we still need to update EEPROM.
+ *--------------------------------------------------------------------------*/
+ if ( returnValue==EEPROM_STATUS_OK && (!foundMarkerNewFormat || foundMarkerOldFormat) )
+ {
+ appendUplinkInfo = TRUE;
+ writeToEeprom = TRUE;
+ returnValue = EEPROM_STATUS_UPDATE;
+ /*--------------------------------------------------------------------------
+ * Duplicate existing step table to produce one for each Tx path
+ *--------------------------------------------------------------------------*/
+ for ( i=0; i<TX_STEP_TABLE_SIZE; i++ )
+ {
+ pwrCalTable[TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + i] = pwrCalTable[i];
+ }
+ }
+
+ /*--------------------------------------------------------------------------
+ * If indicated, look up Air Interface Std (AIS) in MIB and append table
+ *--------------------------------------------------------------------------*/
+ if ( appendUplinkInfo )
+ {
+ oam_getMibIntVar(MIB_gsmdcsIndicator, &ais);
+ if ( ais < 0 )
+ {
+ returnValue = EEPROM_STATUS_REPORT_ERROR;
+ printf("Error: MIB contains AIS=%d. Should be 0-2. Defaulting to 1 (DCS1800).\n", ais);
+ ais = 1;
+ }
+ else if ( ais > 2 )
+ {
+ returnValue = EEPROM_STATUS_REPORT_ERROR;
+ printf("Error: MIB contains AIS=%d. Should be 0-2. Defaulting to 1 (DCS1800).\n", ais);
+ ais = 1;
+ }
+ printf("Updating EEPROM for %s system\n", aisname[ais]);
+
+ /*--------------------------------------------------------------------------
+ * Append uplink amplifier information specific to AIS, plus marker byte(s)
+ *--------------------------------------------------------------------------*/
+ for ( i=0; i<RX_GAIN_CHAR_SIZE; i++ )
+ {
+ pwrCalTable[2*TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + i] = gainChar[ais][i];
+ }
+ for ( i=0; i<END_MARKER_SIZE; i++ )
+ {
+ pwrCalTable[2*TX_STEP_TABLE_SIZE + 2*TX_FREQ_SWEEP_SIZE + RX_GAIN_CHAR_SIZE + i] = END_MARKER_VALUE;
+ }
+ }
+
+ /*--------------------------------------------------------------------------
+ * If indicated, write power cal table to EEPROM and report values to shell
+ *--------------------------------------------------------------------------*/
+ if ( writeToEeprom )
+ {
+ I2Coperation(ON);
+ /*--EEPROM on radio board needs to be fed 1 byte at a time--*/
+ for ( i=0; i<PWR_TABLE_SIZE; i++ )
+ {
+ usByte = (UINT8)pwrCalTable[i];
+ printf("%02x ", usByte);
+ if ( i%10 == 9 )
+ {
+ printf("\n");
+ }
+ I2CStatus = I2Cwrite(&usByte, radioEEpromDevAddr, (unsigned char)i, 1);
+ taskDelay(2); /* Limit how fast the EEPROM gets the bytes */
+ }
+ I2Coperation(OFF);
+ printf("\nAfter EEPROM write, I2CStatus = %d\n", I2CStatus);
+ }
+ DBG_LEAVE();
+
+ return(returnValue);
+}
+
+
+
+#endif /* __GRR_RADIOCTRL_CPP__ */
diff --git a/data/mnet/GP10/Host/grr/src/grr_SendDspMsg.cpp b/data/mnet/GP10/Host/grr/src/grr_SendDspMsg.cpp
new file mode 100644
index 0000000..45c2bb8
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src/grr_SendDspMsg.cpp
@@ -0,0 +1,259 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_SENDDSPMSG_CPP__
+#define __GRR_SENDDSPMSG_CPP__
+
+#include "grr\grr_head.h"
+
+void grr_SendDspSynInf(unsigned char trx)
+{
+ int len;
+ unsigned char buf[GRR_MAX_L1MSG_LEN];
+
+ DBG_FUNC("grr_SendDspSynInf", GRR_LAYER_DSP);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_SendDspSynInf: for trx(%d)\n", trx);
+
+
+ //Fill Synchronization Information
+ len = 4;
+ buf[len++] = GRR_L1MG_TRXMGMT;
+ buf[len++] = GRR_L1MT_SYNCH_MSB;
+ buf[len++] = GRR_L1MT_SYNCH_LSB;
+ buf[len++] = trx;
+ buf[len++] = 0;
+ buf[len++] = 0;
+ buf[len++] = 0;
+ buf[len++] = 0;
+
+ //store len in little endian
+ buf[0] = (unsigned char)len;
+ buf[1] = (unsigned char)(len>>8);
+ buf[2] = (unsigned char)(len>>16);
+ buf[3] = (unsigned char)(len>>24);
+
+ //dump the message for debug if needed
+ if (grr_DbgDump) DBG_HEXDUMP( (unsigned char*)buf, len );
+
+ sendDsp(buf, len);
+
+ DBG_LEAVE();
+}
+
+void grr_SendDspArfcn(unsigned char trx, int swap)
+{
+ int len;
+ unsigned char buf[GRR_MAX_L1MSG_LEN];
+ unsigned short arfcn;
+
+ DBG_FUNC("grr_SendDspArfcn", GRR_LAYER_DSP);
+ DBG_ENTER();
+
+ //apply sanitary check
+ if (trx>=OAMgrr_MAX_TRXS)
+ {
+ DBG_WARNING("grr_SendDspArfcn: invalid trx(%d)\n", trx);
+ DBG_LEAVE();
+ return;
+ }
+
+ switch(trx)
+ {
+ case 0:
+ arfcn = OAMgrr_ARFCN(0);
+ break;
+ case 1:
+ arfcn = OAMgrr_ARFCN(1);
+ break;
+ }
+
+ DBG_TRACE("grr_SendDspArfcn: send arfn(%d) to trx(%d) swap(%d)\n",
+ arfcn, trx, swap);
+
+ //Send arfcn via TUNE SYNTH message
+ len = 4;
+ buf[len++] = GRR_L1MG_TRXMGMT;
+ buf[len++] = GRR_L1MT_ARFCN_MSB;
+ buf[len++] = GRR_L1MT_ARFCN_LSB;
+ buf[len++] = trx;
+ buf[len++] = (unsigned char)(arfcn>>8);
+ buf[len++] = (unsigned char)(arfcn);
+ //store len in little endian
+ buf[0] = (unsigned char)len;
+ buf[1] = (unsigned char)(len>>8);
+ buf[2] = (unsigned char)(len>>16);
+ buf[3] = (unsigned char)(len>>24);
+
+ //dump the message for debug if needed
+ if (grr_DbgDump) DBG_HEXDUMP( (unsigned char*)buf, len );
+
+ sendDsp(buf, len);
+
+ DBG_LEAVE();
+}
+
+//Send ping message to dsp
+void grr_SendDspPing(int dsp)
+{
+ int len;
+ unsigned char buf[GRR_MAX_L1MSG_LEN];
+
+ DBG_FUNC("grr_SendDspPing", GRR_LAYER_DSP);
+ DBG_ENTER();
+
+ //Form ping message
+ len = 4;
+ buf[len++] = GRR_L1MG_TRXMGMT;
+ buf[len++] = GRR_L1MT_PING_MSB;
+ buf[len++] = GRR_L1MT_PING_LSB;
+ buf[len++] = (unsigned char)dsp;
+
+ //store len in little endian
+ buf[0] = (unsigned char)len;
+ buf[1] = (unsigned char)(len>>8);
+ buf[2] = (unsigned char)(len>>16);
+ buf[3] = (unsigned char)(len>>24);
+
+ //dump the message for debug if needed
+ if (grr_DbgDump) DBG_HEXDUMP( (unsigned char*)buf, len );
+
+ sendDsp(buf, len);
+
+ DBG_LEAVE();
+}
+
+void grr_SendDspSlotActivate(unsigned char trx, unsigned char slot)
+{
+ int len;
+ unsigned char buf[GRR_MAX_L1MSG_LEN];
+
+ DBG_FUNC("grr_SendDspSlotActivate", GRR_LAYER_DSP);
+ DBG_ENTER();
+
+ //ATTN:
+ //slot's bit 8-5 i.e. 5 MSB bits must be masked by caller of this
+ //function. Caller is also responsibile for validity of SLOT COMB
+ //value associated with this slot. This function just passes COMB
+ //to DSP without guard check of the input values' validity.
+
+ len = 4;
+ buf[len++] = GRR_L1MG_TRXMGMT; //0x10
+ buf[len++] = GRR_L1MT_SLOTACTIV_MSB; //0x17
+ buf[len++] = GRR_L1MT_SLOTACTIV_LSB; //0x00
+ buf[len++] = trx;
+ buf[len++] = slot;
+ buf[len++] = OAMgrr_TRX_SLOT_COMB(trx,slot);
+
+ if ( (OAMgrr_TRX_SLOT_COMB(trx,slot) != OAMgrr_SLOT_COMB_1) &&
+ (OAMgrr_TRX_SLOT_COMB(trx,slot) != OAMgrr_SLOT_COMB_5) &&
+ (OAMgrr_TRX_SLOT_COMB(trx,slot) != OAMgrr_SLOT_COMB_13) )
+ {
+ DBG_ERROR("grr_SendDspSlotActivate: invalid config (%d) for (trx=%d,slot=%d)\n",
+ OAMgrr_TRX_SLOT_COMB(trx,slot), trx, slot);
+ printf("grr_SendDspSlotActivate: invalid config (%d) for (trx=%d,slot=%d)\n",
+ OAMgrr_TRX_SLOT_COMB(trx,slot), trx, slot);
+
+ assert(0);
+ }
+
+ //store len in little endian
+ buf[0] = (unsigned char) len;
+ buf[1] = (unsigned char) (len>>8);
+ buf[2] = (unsigned char) (len>>16);
+ buf[3] = (unsigned char) (len>>24);
+
+ //dump the message for debug if needed
+ if (grr_DbgDump) DBG_HEXDUMP( (unsigned char*)buf, len );
+
+ sendDsp(buf, len);
+
+ DBG_LEAVE();
+}
+
+void grr_SendDspTrxConfig(unsigned char trx)
+{
+ int len;
+ unsigned char buf[GRR_MAX_L1MSG_LEN];
+
+ DBG_FUNC("grr_SendDspTrxConfig", GRR_LAYER_DSP);
+ DBG_ENTER();
+
+ //skip the len of 4 bytes in the beginning
+ len = 4;
+ buf[len++] = GRR_L1MG_TRXMGMT; //0x10
+ buf[len++] = GRR_L1MT_TRXCONFIG_MSB; //0x15
+ buf[len++] = GRR_L1MT_TRXCONFIG_LSB; //0x00
+ buf[len++] = trx;
+ buf[len++] = OAMgrr_AIRINTERFACE;
+ buf[len++] = OAMgrr_POCKETBTS_BSIC;
+ buf[len++] = OAMgrr_NETWORKIFCONFIG; //0x00
+
+ //skip unused fields
+ len += 14;
+ buf[len++] = (unsigned char) OAMgrr_IQ_SWAP;
+
+ //store len in little endian
+ buf[0] = (unsigned char) len;
+ buf[1] = (unsigned char) (len>>8);
+ buf[2] = (unsigned char) (len>>16);
+ buf[3] = (unsigned char) (len>>24);
+
+ //dump the message for debug if needed
+ if (grr_DbgDump) DBG_HEXDUMP( (unsigned char*)buf, len );
+
+ sendDsp(buf, len);
+
+ DBG_LEAVE();
+}
+
+void grr_SendDspTuneSynth( unsigned char phTrx, unsigned char synth, unsigned char hopping,
+ unsigned char state, unsigned short arfcn)
+{
+ int len;
+ unsigned char buf[GRR_MAX_L1MSG_LEN];
+ unsigned short setting;
+
+ DBG_FUNC("grr_SendDspTuneSynth", GRR_LAYER_DSP);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_SendDspTuneSynth: swapInd=%d, hopping=%d, tuneSetting:(%d,%d,%d,%d)\n",
+ OAMgrr_BCCH_CARRIER_phTRX, hopping, phTrx, synth, state, arfcn);
+
+ //Fill TUNE SYNTH message's header portion
+ len = 4;
+ buf[len++] = GRR_L1MG_TRXMGMT;
+ buf[len++] = GRR_L1MT_TUNESYNTH_MSB;
+ buf[len++] = GRR_L1MT_TUNESYNTH_LSB;
+ buf[len++] = 0; //Always sent to BCCH DSP
+
+ setting = 0;
+ setting = ( OAMgrr_phTRX_SELECT(phTrx) | OAMgrr_phTRX_SYNTH_SELECT(synth) |
+ OAMgrr_phTRX_HOPPING(hopping) | OAMgrr_phTRX_PWR_SELECT(state) |
+ (0x3FF&arfcn) );
+
+ buf[len++] = (unsigned char)(setting>>8);
+ buf[len++] = (unsigned char)(setting);
+
+ //store len in little endian
+ buf[0] = (unsigned char)len;
+ buf[1] = (unsigned char)(len>>8);
+ buf[2] = (unsigned char)(len>>16);
+ buf[3] = (unsigned char)(len>>24);
+
+ //dump the message for debug if needed
+ if (grr_DbgDump) DBG_HEXDUMP( (unsigned char*)buf, len );
+
+ sendDsp(buf, len);
+
+ DBG_LEAVE();
+}
+
+#endif //__GRR_SENDDSPMSG_CPP__
diff --git a/data/mnet/GP10/Host/grr/src/grr_SetOamMib.cpp b/data/mnet/GP10/Host/grr/src/grr_SetOamMib.cpp
new file mode 100644
index 0000000..8ebbb0c
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src/grr_SetOamMib.cpp
@@ -0,0 +1,234 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_SETOAMMIB_CPP__
+#define __GRR_SETOAMMIB_CPP__
+
+#include "grr\grr_head.h"
+
+void grr_SetOamBtsAmState(AdministrativeState state)
+{
+ DBG_FUNC("grr_SetOamBtsAmState", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_SetOamBtsAmState: state(%d)\n", state);
+
+ OAMgrr_BTS_AMSTATEa = state;
+
+ if (STATUS_OK !=
+ oam_setMibIntVar(MODULE_GRR,MIB_bts_administrativeState, state) )
+ {
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETMIBINTVAR_FAILED);
+ DBG_ERROR("grr_SetOamBtsAmState: oam_setMibIntVar failed for setting bts amState(%d)\n",
+ state);
+ printf("grr_SetOamBtsAmState: oam_setMibIntVar failed for setting bts amState(%d)\n",
+ state);
+ assert(0);
+ }
+ DBG_LEAVE();
+}
+
+void grr_SetOamTrxAmState(unsigned char trx, AdministrativeState state)
+{
+ MibTag tag;
+
+ DBG_FUNC("grr_SetOamTrxAmState", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_SetOamTrxAmState: set trx(%d) amState(%d)\n", trx, state);
+
+ //Check if the requested trx existent
+ if (trx>=OAMgrr_MAX_TRXS)
+ {
+ DBG_WARNING("grr_SetOamTrxAmState: setting amState(%d) for invalid trx(%d)\n", state,trx);
+ DBG_LEAVE();
+ return;
+ }
+
+ OAMgrr_TRX_AMSTATEa(trx) = state;
+
+ if (trx==0) tag = MIB_basebandAdministrativeState_0;
+ else tag = MIB_basebandAdministrativeState_1;
+
+ if ( STATUS_OK!=oam_setMibIntVar(MODULE_GRR, tag, state) )
+ {
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETMIBINTVAR_FAILED);
+ DBG_ERROR("grr_SetOamTrxAmState: oam_setMibIntVar failed for setting trx(%d) amState(%d)\n",
+ trx, state);
+ printf("grr_SetOamTrxAmState: failed in calling oam_setMibIntVar for trx(%d) amState(%d)\n",
+ trx, state);
+ assert(0);
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_SetOamTrxSlotAmState(unsigned char trx, unsigned char slot, AdministrativeState state)
+{
+ MibTag tag;
+ STATUS sta;
+
+ DBG_FUNC("grr_SetOamTrxSlotAmState", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_SetOamTrxSlotAmState: set trx(%d) slot(%d) amState(%d)\n", trx, slot, state);
+
+ //Check if (trx,slot) existent
+ if ( (trx>=OAMgrr_MAX_TRXS) || (slot>=8) )
+ {
+ DBG_WARNING("grr_SetOamTrxSlotAmState: set amState(%d) for invalid trx(%d) slot(%d)\n",
+ state, trx, slot);
+ DBG_LEAVE();
+ return;
+ }
+
+ if (trx==0) tag=MIBT_channelAdministrativeState_0;
+ else tag=MIBT_channelAdministrativeState_1;
+
+ OAMgrr_CHN_AMSTATEa(trx,slot) = state;
+
+ if ( STATUS_OK!= (sta=oam_setTblEntryField(MODULE_GRR,tag,slot,state)) )
+ {
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETMIBINTVAR_FAILED);
+ DBG_ERROR("grr_SetOamTrxSlotAmState: oam_setMibIntVar failed for setting trx(%d) slot(%d) amState(%d) retErr(%d)\n",
+ trx, slot, state,sta);
+ printf("grr_SetOamTrxSlotAmState: oam_setMibIntVar failed for setting trx(%d) slot(%d) amState(%d) retErr(%d)\n",
+ trx, slot, state,sta);
+ assert(0);
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_SetOamTrxOpState(unsigned char trx, EnableDisable state)
+{
+ MibTag tag;
+
+ DBG_FUNC("grr_SetOamTrxOpState", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_SetOamTrxOpState: set trx(%d) opState(%d)\n",
+ trx, state);
+
+ //Check if the requested trx existent
+ if (trx>=OAMgrr_MAX_TRXS)
+ {
+ DBG_WARNING("grr_SetOamTrxOpState: setting opState(%d) for invalid trx(%d)\n", state,trx);
+ DBG_LEAVE();
+ return;
+ }
+
+ OAMgrr_TRX_OPSTATEa(trx) = state;
+
+ if (trx==0) tag=MIB_basebandOperationalState_0;
+ else tag=MIB_basebandOperationalState_1;
+
+ if ( STATUS_OK!=oam_setMibIntVar(MODULE_GRR, tag, state) )
+ {
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETMIBINTVAR_FAILED);
+ DBG_ERROR("grr_SetOamTrxOpState: oam_setMibIntVar failed for setting trx(%d) opState(%d)\n",
+ trx, state);
+ printf("grr_SetOamTrxOpState: oam_setMibIntVar failed for setting trx(%d) opState(%d)\n",
+ trx, state);
+ assert(0);
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_SetOamAllTrxSlotOpState(unsigned char trx, EnableDisable state)
+{
+ unsigned char i;
+
+ DBG_FUNC("grr_SetOamAllTrxSlotOpState", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_SetOamAllTrxSlotOpState: set trx(%d) all slots opState(%d)\n",
+ trx, state);
+
+ //Check if the requested trx existent
+ if (trx>=OAMgrr_MAX_TRXS)
+ {
+ DBG_WARNING("grr_SetOamAllTrxSlotOpState: setting opState(%d) for invalid trx(%d)\n",
+ state,trx);
+ DBG_LEAVE();
+ return;
+ }
+
+ for (i=0;i<8;i++)
+ grr_SetOamTrxSlotOpState(trx,i,state);
+
+ DBG_LEAVE();
+
+}
+
+void grr_SetOamTrxSlotOpState(unsigned char trx, unsigned char slot, EnableDisable state)
+{
+ MibTag tag;
+ STATUS sta;
+
+ DBG_FUNC("grr_SetOamTrxSlotOpState", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_SetOamTrxSlotOpState: set trx(%d) slot(%d) opState(%d)\n",
+ trx, slot, state);
+
+ OAMgrr_TRX_SLOT_OPSTATEa(trx,slot) = state;
+
+ if (trx==0) tag = MIBT_channelOperationalState_0;
+ else tag = MIBT_channelOperationalState_1;
+
+ if ( STATUS_OK!= (sta=oam_setTblEntryField(MODULE_GRR, tag, slot, state)) )
+ {
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETTBLENTRYFIELD_FAILED);
+ printf("grr_SetOamTrxSlotOpState: oam_setMibIntVar failed for setting trx(%d) slot(%d) opState(%d) retErr(%d)\n",
+ trx, slot, state,sta);
+ DBG_ERROR("grr_SetOamTrxSlotOpState: oam_setMibIntVar failed for setting trx(%d) slot(%d) opState(%d) retErr(%d)\n",
+ trx, slot, state,sta);
+ assert(0);
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_SetOamTrxRcOpState(unsigned char trx, EnableDisable state)
+{
+ unsigned char rc;
+ MibTag tag;
+
+ DBG_FUNC("grr_SetOamTrxRcOpState", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ rc = OAMgrr_TRX_RC(trx);
+
+ DBG_TRACE("grr_SetOamTrxRcOpState: set trx(%d) rc(%d) opState(%d)\n",
+ trx, rc, state);
+
+ OAMgrr_RC_OPSTATEa(rc) = state;
+
+ if (rc==0) tag=MIB_carrier_operationalState_0;
+ else tag=MIB_carrier_operationalState_1;
+
+ if ( STATUS_OK!=oam_setMibIntVar(MODULE_GRR, tag, state) )
+ {
+ grr_SubmitAlarm(EC_GRR_OAM_CALL_SETMIBINTVAR_FAILED);
+ printf("grr_SetOamTrxRcOpState: oam_setMibIntVar failed for setting trx(%d) rc(%d) opState(%d)\n",
+ trx, rc, state);
+ DBG_ERROR("grr_SetOamTrxRcOpState: oam_setMibIntVar failed for setting trx(%d) rc(%d) opState(%d)\n",
+ trx, rc, state);
+ assert(0);
+ }
+
+ DBG_LEAVE();
+
+}
+
+#endif //__GRR_SETOAMMIB_CPP__
+
+
diff --git a/data/mnet/GP10/Host/grr/src/grr_SysInfo.cpp b/data/mnet/GP10/Host/grr/src/grr_SysInfo.cpp
new file mode 100644
index 0000000..ef9612b
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src/grr_SysInfo.cpp
@@ -0,0 +1,369 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_SYSINFO_CPP__
+#define __GRR_SYSINFO_CPP__
+
+#include "grr\grr_head.h"
+
+void grr_PopulateSi2(T_CNI_RIL3_CELL_BARRED_ACCESS barState)
+{
+ unsigned char i, idx;
+
+ DBG_FUNC("grr_PopulateSi2", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_PopulateSi2: update SI2 with barState setting(%d)\n", barState);
+
+ //ZAP grr_Si2 to have a good clean-up
+ memset(&grr_Si2, 0, sizeof(grr_Si2_t));
+
+ //HEADER: PD,MT,SI
+ grr_Si2.header.protocol_descriminator = CNI_RIL3_PD_RRM;
+ grr_Si2.header.si_ti = 0;
+ grr_Si2.header.message_type = CNI_RIL3RRM_MSGID_SYSTEM_INFORMATION_2;
+
+ //IE: Bcch Frequency List
+ grr_Si2.bcchFreqList.ie_present = true;
+ grr_Si2.bcchFreqList.extInd = CNI_RIL3_EXT_IND_BA_COMPLETE;
+ grr_Si2.bcchFreqList.baInd = CNI_RIL3_EXT_IND_BA_COMPLETE;
+ idx=0;
+ for (i=0;i<OAMgrr_RESEL_ADJCELL_NO_MAX;i++)
+ {
+ if (OAMgrr_RESEL_ADJCELL_ID(i) != OAMgrr_RESEL_ADJCELL_ID_NULL)
+ grr_Si2.bcchFreqList.arfcn[idx++] = OAMgrr_RESEL_ADJCELL_BCCH_ARFCN(i);
+ }
+ grr_Si2.bcchFreqList.numRFfreq = idx;
+ grr_Si2.bcchFreqList.format = CNI_RIL3_SelectFrequencyListFormat(
+ grr_Si2.bcchFreqList.arfcn,idx);
+
+ //IE: Ncc Permitted
+ grr_Si2.nccPermitted.ie_present = true;
+ for (i=0;i<OAMgrr_NCC_PERMITTED_MAX;i++)
+ grr_Si2.nccPermitted.nccPermitted[i] = OAMgrr_NCC_PERMITTED(i);
+
+ //IE: Rach Control
+ grr_Si2.rachControl.ie_present = true;
+ grr_Si2.rachControl.maxRetrans = OAMgrr_RA_RETRY_MAX; //3: 7 times
+ grr_Si2.rachControl.txInt = OAMgrr_RA_TX_INTEGER; //0: wait 3 slots
+ grr_Si2.rachControl.cellBarredAccess = barState; //OAMgrr_RA_CELL_BARRED_STATE;
+ grr_Si2.rachControl.reestablish = OAMgrr_RA_REST_ALLOWED_STATE; //1: not allowed
+ grr_Si2.rachControl.emergencyCall = OAMgrr_RA_EC_ALLOWED_STATE; //1: not allowed
+ for (i=0;i<16;i++)
+ grr_Si2.rachControl.accessClass[i]=OAMgrr_RA_AC_ALLOWED_STATE(i); //1:not allowed
+
+} //grr_PopulateSi2()
+
+
+void grr_PopulateSi3(T_CNI_RIL3_CELL_BARRED_ACCESS barState)
+{
+ unsigned char i;
+
+ DBG_FUNC("grr_PopulateSi3", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_grr_PopulateSi3: update SI3 with barState setting(%d)\n", barState);
+
+ //ZAP grr_Si3 to have a good clean-up
+ memset(&grr_Si3, 0, sizeof(grr_Si3_t));
+
+ //HEADER: PD,MT,SI
+ grr_Si3.header.protocol_descriminator = CNI_RIL3_PD_RRM;
+ grr_Si3.header.si_ti = 0;
+ grr_Si3.header.message_type = CNI_RIL3RRM_MSGID_SYSTEM_INFORMATION_3;
+
+
+ //IE: Cell ID
+ grr_Si3.cellId.ie_present = true;
+ grr_Si3.cellId.value = OAMgrr_CELLID; //0x0001
+
+ //IE: Location Area Identification
+ grr_Si3.locationId.ie_present = true;
+ grr_Si3.locationId.mcc[0] = OAMgrr_MCC(0); //0
+ grr_Si3.locationId.mcc[1] = OAMgrr_MCC(1); //0
+ grr_Si3.locationId.mcc[2] = OAMgrr_MCC(2); //1
+ grr_Si3.locationId.mnc[0] = OAMgrr_MNC(0); //0
+ grr_Si3.locationId.mnc[1] = OAMgrr_MNC(1); //1
+ grr_Si3.locationId.mnc[2] = OAMgrr_MNC(2); //1 kevinlim 05/11/01
+ grr_Si3.locationId.lac = OAMgrr_LAC; //1
+
+ //IE: Control Channel Description
+ grr_Si3.controlChannelDescription.ie_present = true;
+ grr_Si3.controlChannelDescription.att = OAMgrr_ATT_STATE;
+ grr_Si3.controlChannelDescription.bsAgBlksRes = OAMgrr_BS_AG_BLK_RES;
+ grr_Si3.controlChannelDescription.bsPaMfrms = OAMgrr_BS_PA_MFRMS;
+ grr_Si3.controlChannelDescription.ccchConf = OAMgrr_CCCH_CONF;
+ grr_Si3.controlChannelDescription.T3212 = OAMgrr_T3212;
+
+ //IE: Cell Options on BCCH
+ grr_Si3.cellOptions.ie_present = true;
+ grr_Si3.cellOptions.channelType = CNI_RIL3_CELL_OPTIONS_BCCH; //1
+ grr_Si3.cellOptions.pwrc = CNI_RIL3_PWRC_NOT_SET; //0:no hopping
+ grr_Si3.cellOptions.radioLinkTimeout = OAMgrr_RADIO_LINK_TIMEOUT; //3
+ grr_Si3.cellOptions.bcchDtx = OAMgrr_MS_UPLINK_DTX_STATEa; //2
+
+ //IE: Cell Reselection Parameters
+ grr_Si3.cellSelectionParam.ie_present = true;
+ grr_Si3.cellSelectionParam.cellReselectHysteresis = OAMgrr_CELL_RESEL_HYSTERESIS; //2
+ grr_Si3.cellSelectionParam.msTxpwrMaxCCH = OAMgrr_MS_TX_PWR_MAX_CCH; //0
+ grr_Si3.cellSelectionParam.rxlevAccessMin = OAMgrr_MS_RELEV_ACCESS_MIN; //6
+ grr_Si3.cellSelectionParam.neci = CNI_RIL3_NECI_NOT_SUPPORTED; //0
+ grr_Si3.cellSelectionParam.acs = CNI_RIL3_ACS_USE_SI4_RESET_OCTETS; //0
+
+ //IE: Rach Control
+ grr_Si3.rachControl.ie_present = true;
+ grr_Si3.rachControl.maxRetrans = OAMgrr_RA_RETRY_MAX; //3: 7 times
+ grr_Si3.rachControl.txInt = OAMgrr_RA_TX_INTEGER; //0: wait 3 slots
+ grr_Si3.rachControl.cellBarredAccess = barState; //OAMgrr_RA_CELL_BARRED_STATE;
+ grr_Si3.rachControl.reestablish = OAMgrr_RA_REST_ALLOWED_STATE; //1: not allowed
+ grr_Si3.rachControl.emergencyCall = OAMgrr_RA_EC_ALLOWED_STATE; //1: not allowed
+ for (i=0;i<16;i++)
+ grr_Si3.rachControl.accessClass[i] = OAMgrr_RA_AC_ALLOWED_STATE(i); //1:not allowed
+
+ //IE: SI3 Rest Octets
+ grr_Si3.si3RestOctets.ie_present = true;
+ grr_Si3.si3RestOctets.pi = CNI_RIL3_SELECTION_PARAMETER_PRESENT; //1
+ grr_Si3.si3RestOctets.cbq = OAMgrr_CELL_BAR_QUALIFY; //Cell Bar Qualify
+ grr_Si3.si3RestOctets.cellReselectOffset = OAMgrr_CELL_RESELECT_OFFSET;
+ grr_Si3.si3RestOctets.temporaryOffset = OAMgrr_TEMP_OFFEST;
+ grr_Si3.si3RestOctets.penaltyTime = OAMgrr_PENALTY_TIME; //20s
+ grr_Si3.si3RestOctets.poi = CNI_RIL3_POWER_OFFSET_NOT_PRESENTE;
+ grr_Si3.si3RestOctets.powerOffset = 0; //Not applicable
+ grr_Si3.si3RestOctets.si2ter = CNI_RIL3_SI_2TER_NOT_PRESENT;
+ grr_Si3.si3RestOctets.ecsi = CNI_RIL3_EARLY_CLASSMARK_SENDING_FORBIDDEN;
+ grr_Si3.si3RestOctets.wi = CNI_RIL3_WHERE_NOT_PRESENT;
+ grr_Si3.si3RestOctets.where = 0; //Not applicable
+
+ //G2
+ if (OAMgrr_GPRS_FEATURE_SETTING)
+ {
+ grr_Si3.si3RestOctets.gprs_indicator.indicator_present = true;
+ grr_Si3.si3RestOctets.gprs_indicator.ra_color = OAMgrr_GPRS_RA_COLOR;
+ grr_Si3.si3RestOctets.gprs_indicator.si13_position = OAMgrr_SI13_POS;
+ } else
+ grr_Si3.si3RestOctets.gprs_indicator.indicator_present = false;
+
+} //grr_PopulateSi3()
+
+
+void grr_PopulateSi4(T_CNI_RIL3_CELL_BARRED_ACCESS barState)
+{
+ unsigned char i;
+
+ DBG_FUNC("grr_PopulateSi4", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_grr_PopulateSi4: update SI4 with barState setting(%d)\n", barState);
+
+ //ZAP grr_Si4 to have a good clean-up
+ memset(&grr_Si4, 0, sizeof(grr_Si4_t));
+
+ //HEADER: PD,MT,SI
+ grr_Si4.header.protocol_descriminator = CNI_RIL3_PD_RRM;
+ grr_Si4.header.si_ti = 0;
+ grr_Si4.header.message_type = CNI_RIL3RRM_MSGID_SYSTEM_INFORMATION_4;
+
+ //IE: Location Area Identification
+ grr_Si4.locationId.ie_present = true;
+ grr_Si4.locationId.mcc[0] = OAMgrr_MCC(0); //0
+ grr_Si4.locationId.mcc[1] = OAMgrr_MCC(1); //0
+ grr_Si4.locationId.mcc[2] = OAMgrr_MCC(2); //1
+ grr_Si4.locationId.mnc[0] = OAMgrr_MNC(0); //0
+ grr_Si4.locationId.mnc[1] = OAMgrr_MNC(1); //1
+ grr_Si4.locationId.mnc[2] = OAMgrr_MNC(2); //1
+ grr_Si4.locationId.lac = OAMgrr_LAC; //1
+
+ //IE: Cell Reselection Parameters
+ grr_Si4.cellSelectionParam.ie_present = true;
+ grr_Si4.cellSelectionParam.cellReselectHysteresis = OAMgrr_CELL_RESEL_HYSTERESIS; //2
+ grr_Si4.cellSelectionParam.msTxpwrMaxCCH = OAMgrr_MS_TX_PWR_MAX_CCH; //0
+ grr_Si4.cellSelectionParam.rxlevAccessMin = OAMgrr_MS_RELEV_ACCESS_MIN; //6
+ grr_Si4.cellSelectionParam.neci = CNI_RIL3_NECI_NOT_SUPPORTED; //0
+ grr_Si4.cellSelectionParam.acs = CNI_RIL3_ACS_USE_SI4_RESET_OCTETS; //0
+
+ //IE: Rach Control
+ grr_Si4.rachControl.ie_present = true;
+ grr_Si4.rachControl.maxRetrans = OAMgrr_RA_RETRY_MAX; //3: 7 times
+ grr_Si4.rachControl.txInt = OAMgrr_RA_TX_INTEGER; //0: wait 3 slots
+ grr_Si4.rachControl.cellBarredAccess = barState; //OAMgrr_RA_CELL_BARRED_STATE;
+ grr_Si4.rachControl.reestablish = OAMgrr_RA_REST_ALLOWED_STATE; //1: not allowed
+ grr_Si4.rachControl.emergencyCall = OAMgrr_RA_EC_ALLOWED_STATE; //1: not allowed
+ for (i=0;i<16;i++)
+ grr_Si4.rachControl.accessClass[i]=OAMgrr_RA_AC_ALLOWED_STATE(i); //1:not allowed
+
+ //IE(optional):CBCH channel description
+ if (OAMgrr_CB_FEATURE_SETTING)
+ {
+ grr_Si4.cbchChannelDescription.ie_present = true;
+ grr_Si4.cbchChannelDescription.hopping = false;
+ grr_Si4.cbchChannelDescription.channelType = CNI_RIL3_SDCCH_ACCH_4orCBCH;
+ grr_Si4.cbchChannelDescription.subChannelNumber = 2;
+ grr_Si4.cbchChannelDescription.TN = OAMgrr_CBCH_TRX_SLOT;
+ grr_Si4.cbchChannelDescription.TSC = OAMgrr_POCKETBTS_TSC;
+ grr_Si4.cbchChannelDescription.arfcn = OAMgrr_ARFCN(OAMgrr_CBCH_TRX);
+ }
+
+ //IE: SI4 Rest Octets
+ grr_Si4.si4RestOctets.ie_present = true;
+ grr_Si4.si4RestOctets.pi = CNI_RIL3_SELECTION_PARAMETER_PRESENT; //1
+ grr_Si4.si4RestOctets.cbq = OAMgrr_CELL_BAR_QUALIFY; //default 0
+ grr_Si4.si4RestOctets.cellReselectOffset = OAMgrr_CELL_RESELECT_OFFSET;
+ grr_Si4.si4RestOctets.temporaryOffset = OAMgrr_TEMP_OFFEST;
+ grr_Si4.si4RestOctets.penaltyTime = OAMgrr_PENALTY_TIME; //20s
+ grr_Si4.si4RestOctets.poi = CNI_RIL3_POWER_OFFSET_NOT_PRESENTE;
+ grr_Si4.si4RestOctets.powerOffset = 0; //Not applicable
+
+ //G2
+ if (OAMgrr_GPRS_FEATURE_SETTING)
+ {
+ grr_Si4.si4RestOctets.gprs_indicator.indicator_present = true;
+ grr_Si4.si4RestOctets.gprs_indicator.ra_color = OAMgrr_GPRS_RA_COLOR;
+ grr_Si4.si4RestOctets.gprs_indicator.si13_position = OAMgrr_SI13_POS;
+ } else
+ grr_Si4.si4RestOctets.gprs_indicator.indicator_present = false;
+
+} //grr_PopulateSi4()
+
+
+
+void grr_PopulateSi5(void)
+{
+ unsigned char idx,i;
+
+ DBG_FUNC("grr_PopulateSi5", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_grr_PopulateSi5: Update SI5\n");
+
+ //ZAP grr_Si5 to have a good clean-up
+ memset(&grr_Si5, 0, sizeof(grr_Si5_t));
+
+ //HEADER: PD,MT,SI
+ grr_Si5.header.protocol_descriminator = CNI_RIL3_PD_RRM;
+ grr_Si5.header.si_ti = 0;
+ grr_Si5.header.message_type = CNI_RIL3RRM_MSGID_SYSTEM_INFORMATION_5;
+
+ //IE: Bcch Frequency List
+ grr_Si5.bcchFreqList.ie_present = true;
+ grr_Si5.bcchFreqList.extInd = CNI_RIL3_EXT_IND_BA_COMPLETE;
+ grr_Si5.bcchFreqList.baInd = CNI_RIL3_EXT_IND_BA_COMPLETE;
+
+ idx=0;
+ for (i=0;i<OAMgrr_HO_ADJCELL_NO_MAX;i++)
+ {
+ if (OAMgrr_HO_ADJCELL_ID(i) != OAMgrr_HO_ADJCELL_ID_NULL)
+ grr_Si5.bcchFreqList.arfcn[idx++] = OAMgrr_HO_ADJCELL_BCCH_ARFCN(i);
+ }
+
+ grr_Si5.bcchFreqList.numRFfreq = idx;
+ grr_Si5.bcchFreqList.format = CNI_RIL3_SelectFrequencyListFormat(
+ grr_Si5.bcchFreqList.arfcn,idx);
+} //grr_PopulateSi5()
+
+
+void grr_PopulateSi6(void)
+{
+ unsigned char i;
+
+ DBG_FUNC("grr_PopulateSi6", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_grr_PopulateSi6: Update SI6\n");
+
+ //ZAP grr_Si6 to have a good clean-up
+ memset(&grr_Si6, 0, sizeof(grr_Si6_t));
+
+ //HEADER: PD,MT,SI
+ grr_Si6.header.protocol_descriminator = CNI_RIL3_PD_RRM;
+ grr_Si6.header.si_ti = 0;
+ grr_Si6.header.message_type = CNI_RIL3RRM_MSGID_SYSTEM_INFORMATION_6;
+
+ //IE: Cell ID
+ grr_Si6.cellId.ie_present = true;
+ grr_Si6.cellId.value = OAMgrr_CELLID; //0x0001
+
+ //IE: Location Area Identification
+ grr_Si6.locationId.ie_present = true;
+ grr_Si6.locationId.mcc[0] = OAMgrr_MCC(0); //0
+ grr_Si6.locationId.mcc[1] = OAMgrr_MCC(1); //0
+ grr_Si6.locationId.mcc[2] = OAMgrr_MCC(2); //1
+ grr_Si6.locationId.mnc[0] = OAMgrr_MNC(0); //0
+ grr_Si6.locationId.mnc[1] = OAMgrr_MNC(1); //1
+ grr_Si6.locationId.mnc[2] = OAMgrr_MNC(2); //1
+ grr_Si6.locationId.lac = OAMgrr_LAC; //1
+
+ //IE: Cell Options on BCCH
+ grr_Si6.cellOptions.ie_present = true;
+ grr_Si6.cellOptions.channelType = CNI_RIL3_CELL_OPTIONS_SACCH; //1
+ grr_Si6.cellOptions.pwrc = CNI_RIL3_PWRC_NOT_SET; //0:no hopping
+ grr_Si6.cellOptions.radioLinkTimeout = OAMgrr_RADIO_LINK_TIMEOUT; //3
+ grr_Si6.cellOptions.sacchDtx = OAMgrr_MS_UPLINK_DTX_STATE;
+
+ //IE: Ncc Permitted
+ grr_Si6.nccPermitted.ie_present = true;
+ for (i=0;i<OAMgrr_NCC_PERMITTED_MAX;i++)
+ grr_Si6.nccPermitted.nccPermitted[i] = OAMgrr_NCC_PERMITTED(i);
+
+} //grr_PopulateSi6()
+
+void grr_PopulateSi13(void)
+{
+ DBG_FUNC("grr_PopulateSi13", GRR_LAYER_OAM);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_grr_PopulateSi13: update SI13\n");
+
+ //ZAP grr_Si13 to have a good clean-up
+ memset(&grr_Si13, 0, sizeof(grr_Si13_t));
+
+ //HEADER: PD,MT,SI
+ grr_Si13.header.protocol_descriminator = CNI_RIL3_PD_RRM;
+ grr_Si13.header.si_ti = 0;
+ grr_Si13.header.message_type = CNI_RIL3RRM_MSGID_SYSTEM_INFORMATION_13;
+
+ //IE: SI13 Rest Octets
+ grr_Si13.si13RestOctets.ie_present = true;
+ grr_Si13.si13RestOctets.bcch_change_mark = OAMgrr_BCCH_CHANGE_MARK; //0-4
+ grr_Si13.si13RestOctets.si_change_field = OAMgrr_SI_CHANGE_FIELD; //0-15
+
+ grr_Si13.si13RestOctets.flag_sm = false;
+ grr_Si13.si13RestOctets.si13_change_mark = 0;
+ grr_Si13.si13RestOctets.gprs_ms_allocation.ie_present = false;
+
+ grr_Si13.si13RestOctets.flag_pbcch = false;
+ grr_Si13.si13RestOctets.without_pbcch.rac = OAMgrr_GPRS_RAC;
+ grr_Si13.si13RestOctets.without_pbcch.spgc_ccch_sup = false;
+ grr_Si13.si13RestOctets.without_pbcch.priority_access_thr = 6; // priority 1-4
+ grr_Si13.si13RestOctets.without_pbcch.network_control_order = 1;
+ grr_Si13.si13RestOctets.without_pbcch.gprs_cell_options.ie_present = true;
+ grr_Si13.si13RestOctets.without_pbcch.gprs_cell_options.nmo = OAMgrr_GPRS_NMO;
+
+ grr_Si13.si13RestOctets.without_pbcch.gprs_cell_options.t3168 = OAMgrr_GPRS_T3168;
+ grr_Si13.si13RestOctets.without_pbcch.gprs_cell_options.t3192 = OAMgrr_GPRS_T3192;
+ grr_Si13.si13RestOctets.without_pbcch.gprs_cell_options.drx_timer_max = OAMgrr_GPRS_DRX_TIMER_MAX;
+ grr_Si13.si13RestOctets.without_pbcch.gprs_cell_options.access_burst_type = OAMgrr_GPRS_ACCESS_BURST_TYPE;
+
+ grr_Si13.si13RestOctets.without_pbcch.gprs_cell_options.control_ack_type = OAMgrr_GPRS_CONTROL_ACK_TYPE;
+ grr_Si13.si13RestOctets.without_pbcch.gprs_cell_options.bs_cv_max = OAMgrr_GPRS_BS_CV_MAX;
+ grr_Si13.si13RestOctets.without_pbcch.gprs_cell_options.pan_dec = OAMgrr_GPRS_PAN_DEC;
+ grr_Si13.si13RestOctets.without_pbcch.gprs_cell_options.pan_inc = OAMgrr_GPRS_PAN_INC;
+ grr_Si13.si13RestOctets.without_pbcch.gprs_cell_options.pan_max = OAMgrr_GPRS_PAN_MAX;
+
+ grr_Si13.si13RestOctets.without_pbcch.gprs_power_control_parameters.alpha = OAMgrr_GPRS_ALPHA;
+ grr_Si13.si13RestOctets.without_pbcch.gprs_power_control_parameters.t_avg_w = OAMgrr_GPRS_T_AVG_W;
+ grr_Si13.si13RestOctets.without_pbcch.gprs_power_control_parameters.t_avg_t = OAMgrr_GPRS_T_AVG_T;
+ grr_Si13.si13RestOctets.without_pbcch.gprs_power_control_parameters.pc_meas_chan = OAMgrr_GPRS_PC_MEAS_CHAN;
+ grr_Si13.si13RestOctets.without_pbcch.gprs_power_control_parameters.n_avg_i = OAMgrr_GPRS_N_AVG_I;
+
+ DBG_LEAVE();
+
+} //grr_PopulateSi13()
+
+#endif //__GRR_SYSINFO_CPP__
+
diff --git a/data/mnet/GP10/Host/grr/src/grr_Task.cpp b/data/mnet/GP10/Host/grr/src/grr_Task.cpp
new file mode 100644
index 0000000..0933fe7
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src/grr_Task.cpp
@@ -0,0 +1,212 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_TASK_CPP__
+#define __GRR_TASK_CPP__
+
+#include "grr\grr_head.h"
+
+void grr_CreateQ(void)
+{
+ DBG_FUNC("grr_CreateQ", GRR_LAYER);
+ DBG_ENTER();
+
+ //Create message queue for GRR module
+ grr_MsgQId = msgQCreate (
+ GRR_MAX_RXMSGS, //Max # of messages
+ sizeof(grr_ItcRxMsg_t), //Max length of msg
+ MSG_Q_PRIORITY //Priority-type que
+ );
+
+ if( grr_MsgQId == NULL )
+ {
+ printf("grr_CreateQ: failed to create GRR Queue, errno (%d)\n", errno);
+ DBG_ERROR("grr_CreateQ: failed to create GRR Queue, errno (%d)\n", errno);
+ grr_SubmitAlarm(EC_GRR_OS_CALL_MSGQCREATE_FAILED);
+ DBG_LEAVE();
+ assert( (grr_MsgQId!=NULL) );
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_Main( void )
+{
+ DBG_FUNC("grr_Main", GRR_LAYER);
+ DBG_ENTER();
+
+ //mainLoop
+ grr_StartDspsWatch();
+ grrTaskObj.JCTaskEnterLoop();
+ //ViperTaskEnterLoop();
+
+ //InitGRR
+ grr_Init();
+ printf("grr_Main: GRR finished initialization\n");
+
+ while(true)
+ {
+ int length;
+
+ //Confirm GRR is staying in its main-loop
+ DBG_TRACE("grr_Main: staying in mainloop\n");
+
+ // Retrieve a message from Q.
+ if ((length = msgQReceive(grr_MsgQId,(char*)&grr_ItcRxMsg, GRR_MAX_RXQMSG_LENGTH, WAIT_FOREVER))
+ == ERROR )
+ {
+ //failed to receive message. VxWorks error. Skip this msg!
+ grr_SubmitAlarm(EC_GRR_OS_CALL_MSGQRECEIVE_FAILED);
+ DBG_ERROR("grr_Main: failed to read VxWorks GRR Queue err(%d)\n", errno);
+ printf("grr_Main: failed to read VxWorks GRR msg Queue err(%d)", errno);
+ assert(0);
+ } else
+ {
+ //Good receive! If needed dump out for debug purpose
+ if (grr_DbgDump) DBG_HEXDUMP(( unsigned char *)&grr_ItcRxMsg, length);
+
+ //Handle the message in terms of origin, apply sanitory check!
+ grr_ItcRxOrigin = grr_ItcRxMsg.module_id;
+
+ //Go in terms of origin
+ switch (grr_ItcRxOrigin)
+ {
+ case MODULE_GRR:
+ //Received GRR messages
+ grr_pItcRxGrrMsg=(grr_ItcRxGrrMsg_t *)&grr_ItcRxMsg.itcRxGrrMsg;
+
+ //If needed output the fact RM got a RM message for trace
+ DBG_TRACE("GRR<=GRR@grr_Main: primitive(%d) message(%x)\n",
+ grr_pItcRxGrrMsg->primitive_type,
+ grr_pItcRxGrrMsg->message_type);
+
+ //Process watch-dog timer expiry here
+ if (grr_pItcRxGrrMsg->primitive_type==GRR_DSP_WDOG_EXPIRED)
+ grr_ProcGrrMsg();
+ else
+ DBG_WARNING("GRR<=GRR: unexpected msg (%d) msg(0x%x)\n",
+ grr_pItcRxGrrMsg->message_type);
+ break;
+
+ case MODULE_L1:
+ //Received L1 messages
+ grr_pItcRxDspMsg=(grr_ItcRxDspMsg_t *)&grr_ItcRxMsg.itcRxDspMsg;
+
+ //If needed output trace for debugging purpose
+ DBG_TRACE("GRR<=L1@grr_Main: received DSP MSG msg(%x,%x,%x) src(%x,%x,%x)\n",
+ grr_pItcRxDspMsg->buffer[0],
+ grr_pItcRxDspMsg->buffer[1],
+ grr_pItcRxDspMsg->buffer[2],
+ grr_pItcRxDspMsg->buffer[3],
+ grr_pItcRxDspMsg->buffer[4],
+ grr_pItcRxDspMsg->buffer[5]);
+
+ grr_ProcDspMsg();
+
+ break;
+
+ case MODULE_OAM:
+ //Received OAM messages
+ grr_pItcRxOamMsg = (grr_ItcRxOamMsg_t *)&grr_ItcRxMsg;
+
+ //If needed output trace for debugging purpose
+ DBG_TRACE("GRR<=OAM@grr_Main: received OAM MSG msgTyp(%d) Tag(%x) valTyp(%d) val(%d)\n",
+ grr_pItcRxOamMsg->msgType,
+ grr_pItcRxOamMsg->mibTag,
+ grr_pItcRxOamMsg->valType,
+ grr_pItcRxOamMsg->val.varVal);
+
+ //
+ grr_ProcOamMsg();
+
+ break;
+
+ case MODULE_RM:
+ //Received RRM messages
+ grr_pItcRxRrmMsg = (grr_ItcRxRrmMsg_t *)&grr_ItcRxMsg;
+
+ //If needed output trace for debugging purpose
+ DBG_TRACE("GRR<=RRM@grr_Main: received RRM MSG msgTyp(%d) trx(%d) slot(%d)\n",
+ grr_pItcRxRrmMsg->message_type,
+ grr_pItcRxRrmMsg->trx,
+ grr_pItcRxRrmMsg->slot);
+ //
+ grr_ProcRrmMsg();
+ break;
+
+ case MODULE_RLCMAC:
+ //Received RLC messages
+ grr_pItcRxRlcMsg = (grr_ItcRxRlcMsg_t *)&grr_ItcRxMsg;
+
+ //If needed output trace for debugging purpose
+ DBG_TRACE("GRR<=RRM@grr_Main: received RRM MSG msgTyp(%d) trx(%d) slot(%d)\n",
+ grr_pItcRxRlcMsg->message_type,
+ grr_pItcRxRlcMsg->trx,
+ grr_pItcRxRlcMsg->slot);
+ //
+ grr_ProcRlcMsg();
+ break;
+
+ default:
+ //Received unexpected messages
+ DBG_WARNING("GRR<=???@grr_Main:received msg from invalid moduleID (%d)\n",
+ grr_ItcRxOrigin);
+ break;
+
+ } //switch()
+
+ } //else
+
+ } //while()
+
+} //grr_Main()
+
+int SysCommand_GRR(T_SYS_CMD action)
+{
+ int tid;
+
+ switch(action)
+ {
+ case SYS_SHUTDOWN:
+ printf("[GRR] Received system shutdown notification\n");
+ break;
+
+ case SYS_START:
+ printf("[GRR] Received task start notification\n");
+ grr_CreateQ();
+ tid = grrTaskObj.JCTaskSpawn(
+ GRR_TASK_PRIORITY,
+ GRR_TASK_OPTION,
+ GRR_TASK_STACK_SIZE,
+ (FUNCPTR)grr_Main,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ MODULE_GRR, JC_CRITICAL_TASK);
+
+ grrMonTaskObj.JCTaskSpawn(
+ GRR_MONITOR_TASK_PRIORITY,
+ GRR_MONITOR_TASK_OPTION,
+ GRR_MONITOR_TASK_STACK_SIZE,
+ (FUNCPTR)grr_RadioMonitor,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ MODULE_GRR, JC_CRITICAL_TASK) ;
+ break;
+
+ case SYS_REBOOT:
+ printf("[GRR] Reboot ready.\n");
+ break;
+
+ default:
+ printf("[GRR] Received unknown system command\n");
+ }
+
+ return 0;
+}
+
+#endif //__GRR_TASK_CPP__
+
diff --git a/data/mnet/GP10/Host/grr/src/grr_TestUtil.cpp b/data/mnet/GP10/Host/grr/src/grr_TestUtil.cpp
new file mode 100644
index 0000000..48f5305
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src/grr_TestUtil.cpp
@@ -0,0 +1,1087 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_TESTUTIL_CPP__
+#define __GRR_TESTUTIL_CPP__
+
+#include "grr\grr_head.h"
+
+//Print read-out gsm mib data
+void grr_PrintGsmOamData(int selection)
+{
+ if (selection==0)
+ {
+ grr_PrintIntBtsBasicPackage();
+ grr_PrintIntBtsCellAllocationTable();
+ grr_PrintIntBtsBcchConfigurationPackage();
+ grr_PrintIntBtsOptionsPackage();
+ grr_PrintIntFirstTransceiverPackage();
+ grr_PrintIntSecondTransceiverPackage();
+ grr_PrintIntFirstTrxRadioCarrierPackage();
+ grr_PrintIntSecondTrxRadioCarrierPackage();
+ grr_PrintIntAdjacentCellHandoverPackage();
+ grr_PrintIntAdjacentCellReselectPackage();
+ grr_PrintIntT31xxPackage();
+ } else
+ {
+ grr_PrintBtsBasicPackage(&grr_OamData.btsBasicPackage);
+ grr_PrintBtsOptionsPackage(&grr_OamData.btsOptionsPackage);
+ grr_PrintFirstTransceiverPackage(&grr_OamData.transceiverPackage[0]);
+ grr_PrintSecondTransceiverPackage(&grr_OamData.transceiverPackage[1]);
+ grr_PrintFirstRadioCarrierPackage(&grr_OamData.radioCarrierPackage[0]);
+ grr_PrintSecondRadioCarrierPackage(&grr_OamData.radioCarrierPackage[1]);
+ grr_PrintT31xx(&grr_OamData.t31xx);
+ grr_PrintAdjacentCellPackage(&grr_OamData.adjacentCellPackage);
+ }
+
+ grr_PrintHandoverControlPackage(&grr_OamData.handoverControlPackage);
+ grr_PrintPowerControlPackage(&grr_OamData.powerControlPackage);
+ grr_PrintIntGrrConfigData();
+}
+
+void grr_PrintCellAllocationTable(Table *tbl)
+{
+ int i;
+ CellAllocationEntry *entry = (CellAllocationEntry *) tbl;
+ printf("%s\t%s", "Index", "Cell Allociation");
+
+ for (i = 0; i< CellAllocationTableLimit; i++)
+ {
+
+ printf("%d\t\t%d", i+1, (entry+i)->cellAllocation);
+ }
+}
+
+void grr_PrintPlmnPermittedTable(Table *tbl)
+{
+ int i;
+ PlmnPermittedEntry *entry = (PlmnPermittedEntry *) tbl;
+ printf("%s\t%s", "Index", "Plmn Permitted");
+
+ for (i = 0; i< PlmnPermittedTableLimit; i++)
+ {
+
+ printf("%d\t\t%d", i+1, (entry+i)->plmnPermitted);
+ }
+}
+
+void grr_PrintNotAllowedAccessClassTable(Table *tbl)
+{
+ int i;
+ NotAllowedAccessClassEntry *entry = (NotAllowedAccessClassEntry *) tbl;
+ printf("%s\t%s", "Index", "Not Allowed Access Class");
+
+ for (i = 0; i< NotAllowedAccessClassTableLimit ; i++)
+ {
+
+ printf("%d\t\t%d", i+1, (entry+i)->notAllowedAccessClass);
+ }
+}
+
+void grr_PrintChannelTable(Table *tbl)
+{
+ int i;
+ ChannelEntry *entry = (ChannelEntry *) tbl;
+ printf("%s,%s,%s,%s,%s,%s,%s", "Idx", "ID", "Comb", "fusage", "tch", "a.state", "o.state");
+
+ for (i = 0; i<ChannelTableLimit ; i++)
+ {
+
+ printf("%d,%d,%d,%d,%d,%d,%d", i+1, (entry+i)->channelID,
+ (entry+i)->channelCombination,
+ (entry+i)->channelFrequencyUsage,
+ (entry+i)->channelTsc,
+ (entry+i)->channelAdministrativeState,
+ (entry+i)->channelOperationalState);
+ }
+}
+
+void grr_PrintCarrierFrequencyTable(Table *tbl)
+{
+ int i;
+ CarrierFrequencyEntry *entry = (CarrierFrequencyEntry *) tbl;
+ printf("%s\t%s", "Index", "Carrier Frequency");
+
+ for (i = 0; i< CarrierFrequencyTableLimit; i++)
+ {
+
+ printf("%d\t\t%d", i+1, (entry+i)->carrierFrequency);
+ }
+}
+
+void grr_PrintAdjCellHandoverTable(Table *tbl)
+{
+ int i;
+ AdjCell_HandoverEntry *entry = (AdjCell_HandoverEntry *) tbl;
+ printf("%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s", "Idx", "ID", "mcc", "mnc", "lac", "ci", "bcch",
+ "ncc", "cid", "sync", "hoPl", "hoM", "msTx", "rxLev");
+
+ for (i = 0; i< HandoverTableLimit; i++)
+ {
+
+ printf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",
+ i+1,
+ (entry+i)->adjCell_handoverCellID,
+ (entry+i)->adjCell_mcc,
+ (entry+i)->adjCell_mnc,
+ (entry+i)->adjCell_lac,
+ (entry+i)->adjCell_ci,
+ (entry+i)->adjCell_bCCHFrequency,
+ (entry+i)->adjCell_ncc,
+ (entry+i)->adjCell_cid,
+ (entry+i)->adjCell_synchronized,
+ (entry+i)->adjCell_hoPriorityLevel,
+ (entry+i)->adjCell_hoMargin,
+ (entry+i)->adjCell_msTxPwrMaxCell,
+ (entry+i)->adjCell_rxLevMinCell);
+ }
+}
+
+void grr_PrintAdjCellReselectionTable(Table *tbl)
+{
+ int i;
+ AdjCell_ReselectionEntry *entry = (AdjCell_ReselectionEntry *) tbl;
+ printf("%s\t%s\t%s", "Index", "ID", "Reselection BCCH Frequency");
+
+ for (i = 0; i< ReselectionTableLimit; i++)
+ {
+
+ printf("%d\t\t%d\t\t%d", i+1, (entry+i)->adjCell_reselectionCellID,
+ (entry+i)->adjCell_reselectionBCCHFrequency);
+ }
+}
+
+
+void grr_PrintBtsBasicPackage(BtsBasicPackage *btsBasicPackage)
+{
+ printf("\nBts Bacic Package");
+
+ char *cp;
+
+ printf("bts_ncc= %d", btsBasicPackage->bts_ncc);
+ printf("bts_cid= %d", btsBasicPackage->bts_cid);
+ printf("btsID= %d", btsBasicPackage->btsID);
+
+ grr_PrintCellAllocationTable(btsBasicPackage->cellAllocationTable);
+
+ printf("gsmdcsIndicator= %d", btsBasicPackage->gsmdcsIndicator);
+ cp = (char *) &btsBasicPackage->bts_mcc;
+ printf("bts_mcc= %d%d%d", cp[0], cp[1], cp[2]);
+ cp = (char *) &btsBasicPackage->bts_mnc;
+ printf("bts_mnc= %d%d%x", cp[0], cp[1], cp[2]); // kevinlim 05/11/01
+
+ printf("bts_lac= %d", btsBasicPackage->bts_lac);
+ printf("bts_ci= %d", btsBasicPackage->bts_ci);
+ printf("cellReselectHysteresis= %d", btsBasicPackage->cellReselectHysteresis);
+ printf("ny1= %d", btsBasicPackage->ny1);
+
+ grr_PrintPlmnPermittedTable (btsBasicPackage->plmnPermittedTable);
+
+ printf("radioLinkTimeout= %d", btsBasicPackage->radioLinkTimeout);
+ printf("relatedTranscoder= %d", btsBasicPackage->relatedTranscoder);
+ printf("rxLevAccessMin= %d", btsBasicPackage->rxLevAccessMin);
+ printf("bts_administrativeState= %d", btsBasicPackage->bts_administrativeState);
+
+ printf("bts_alarmStatus= %d", btsBasicPackage->bts_alarmStatus);
+ printf("bts_operationalState= %d", btsBasicPackage->bts_operationalState);
+ printf("maxNumberRetransmissions= %d", btsBasicPackage->maxNumberRetransmissions);
+ printf("mSTxPwrMaxCCH= %d", btsBasicPackage->mSTxPwrMaxCCH);
+ printf("numberOfSlotsSpreadTrans= %d", btsBasicPackage->numberOfSlotsSpreadTrans);
+ printf("noOfBlocksForAccessGrant= %d", btsBasicPackage->noOfBlocksForAccessGrant);
+ printf("noOfMultiframesBetweenPaging= %d",btsBasicPackage->noOfMultiframesBetweenPaging);
+
+}
+
+
+void grr_PrintBtsOptionsPackage(BtsOptionsPackage *btsOptionsPackage)
+{
+ printf("\nBts Optioons Package");
+
+ printf("allowIMSIAttachDetach= %d", btsOptionsPackage->allowIMSIAttachDetach);
+ printf("callReestablishmentAllowed= %d", btsOptionsPackage->callReestablishmentAllowed);
+ printf("cellBarred= %d", btsOptionsPackage->cellBarred);
+ printf("dtxDownlink= %d", btsOptionsPackage->dtxDownlink);
+ printf("dtxUplink= %d", btsOptionsPackage->dtxUplink);
+ printf("emergencyCallRestricted= %d", btsOptionsPackage->emergencyCallRestricted);
+
+ grr_PrintNotAllowedAccessClassTable(btsOptionsPackage->notAllowedAccessClassTable);
+
+ printf("timerPeriodicUpdateMS= %d", btsOptionsPackage->timerPeriodicUpdateMS);
+ printf("maxQueueLength= %d", btsOptionsPackage->maxQueueLength);
+ printf("msPriorityUsedInQueueing= %d", btsOptionsPackage->msPriorityUsedInQueueing);
+ printf("timeLimitCall= %d", btsOptionsPackage->timeLimitCall);
+ printf("timeLimitHandover= %d", btsOptionsPackage->timeLimitHandover);
+}
+
+void grr_PrintTransceiverPackage(TransceiverPackage *transceiverPackage)
+{
+
+ printf("basebandTransceiverID= %d", transceiverPackage->basebandTransceiverID);
+
+ printf("relatedRadioCarrier= %d", transceiverPackage->relatedRadioCarrier);
+ printf("basebandAdministrativeState= %d", transceiverPackage->basebandAdministrativeState);
+ printf("basebandAlarmStatus= %d", transceiverPackage->basebandAlarmStatus);
+ printf("basebandOperationalState= %d", transceiverPackage->basebandOperationalState);
+
+ grr_PrintChannelTable(transceiverPackage->channelTable);
+}
+
+void grr_PrintFirstTransceiverPackage(FirstTransceiverPackage *firstTransceiverPackage)
+{
+
+ printf("\nFirst Transceiver Package");
+ grr_PrintTransceiverPackage(firstTransceiverPackage);
+}
+
+void grr_PrintSecondTransceiverPackage(SecondTransceiverPackage *secondTransceiverPackage)
+{
+
+ printf("\nSecond Transceiver Package");
+ grr_PrintTransceiverPackage(secondTransceiverPackage);
+}
+
+void grr_PrintRadioCarrierPackage(RadioCarrierPackage *radioCarrierPackage)
+{
+
+ grr_PrintCarrierFrequencyTable(radioCarrierPackage->carrierFrequencyList);
+
+ printf("powerClass= %d", radioCarrierPackage->powerClass);
+ printf("radioCarrierID= %d", radioCarrierPackage->radioCarrierID);
+ printf("txPwrMaxReduction= %d", radioCarrierPackage->txPwrMaxReduction);
+ printf("carrier_administrativeState= %d", radioCarrierPackage->carrier_administrativeState);
+ printf("carrier_alarmStatus= %d", radioCarrierPackage->carrier_alarmStatus);
+ printf("carrier_operationalState= %d", radioCarrierPackage->carrier_operationalState);
+
+}
+
+void grr_PrintFirstRadioCarrierPackage(FirstRadioCarrierPackage *firstRadioCarrierPackage)
+{
+
+ printf("\nFirst Radio Carrier Package");
+ grr_PrintRadioCarrierPackage(firstRadioCarrierPackage);
+}
+
+void grr_PrintSecondRadioCarrierPackage(SecondRadioCarrierPackage *secondRadioCarrierPackage)
+{
+
+ printf("\nSecond Radio Carrier Package");
+ grr_PrintRadioCarrierPackage(secondRadioCarrierPackage);
+}
+
+
+void grr_PrintT31xx(T31xx *t31xx)
+{
+
+ printf("\nT31xx Timers");
+
+ printf("t3101= %d", t31xx->t3101);
+ printf("t3103= %d", t31xx->t3103);
+ printf("t3105= %d", t31xx->t3105);
+ printf("t3107= %d", t31xx->t3107);
+ printf("t3109= %d", t31xx->t3109);
+ printf("t3111= %d", t31xx->t3111);
+ printf("t3113= %d", t31xx->t3113);
+
+}
+
+void grr_PrintAdjacentCellPackage(AdjacentCellPackage *adjacentCellPackage)
+{
+ printf("\nAdjacent Cell Package");
+
+ grr_PrintAdjCellHandoverTable(adjacentCellPackage->adjCell_handoverTable);
+ grr_PrintAdjCellReselectionTable(adjacentCellPackage->adjCell_reselectionTable);
+}
+
+
+void grr_PrintHandoverControlPackage(HandoverControlPackage *handoverControlPackage)
+{
+ printf("\nHandover Control Package");
+
+ printf("handoverControlID= %d",handoverControlPackage->handoverControlID);
+ printf("enableOptHandoverProcessing= %d",handoverControlPackage->enableOptHandoverProcessing);
+
+ printf("%x:%x", handoverControlPackage->hoAveragingAdjCellParam, &mnetMib.hoAveragingAdjCellParam);
+
+ printf("hoAveragingAdjCellParamHreqave= %d",handoverControlPackage->hoAveragingAdjCellParam->hreqave);
+ printf("hoAveragingAdjCellParamHreqt= %d",handoverControlPackage->hoAveragingAdjCellParam->hreqt);
+ printf("hoAveragingAdjCellParamWeighting= %d",handoverControlPackage->hoAveragingAdjCellParam->weighting);
+
+ printf("hoAveragingDistParamHreqave= %d",handoverControlPackage->hoAveragingDistParam->hreqave);
+ printf("hoAveragingDistParamHreqt= %d",handoverControlPackage->hoAveragingDistParam->hreqt);
+
+ printf("hoAveragingLevParamHreqave= %d",handoverControlPackage->hoAveragingLevParam->hreqave);
+ printf("hoAveragingLevParamHreqt= %d",handoverControlPackage->hoAveragingLevParam->hreqt);
+ printf("hoAveragingLevParamWeighting= %d",handoverControlPackage->hoAveragingLevParam->weighting);
+
+ printf("hoAveragingQualParamHreqave= %d",handoverControlPackage->hoAveragingQualParam->hreqave);
+ printf("hoAveragingQualParamHreqt= %d",handoverControlPackage->hoAveragingQualParam->hreqt);
+ printf("hoAveragingQualParamWeighting= %d",handoverControlPackage->hoAveragingQualParam->weighting);
+
+ printf("hoMarginDef= %d",handoverControlPackage->hoMarginDef);
+
+ printf("hoThresholdDistParamTimeadv= %d",handoverControlPackage->hoThresholdDistParam->timeadv);
+ printf("hoThresholdDistParamP8= %d",handoverControlPackage->hoThresholdDistParam->p8);
+ printf("hoThresholdDistParamN8= %d",handoverControlPackage->hoThresholdDistParam->n8);
+
+ printf("hoThresholdInterfaceParamRxLevelUL= %d",handoverControlPackage->hoThresholdInterfaceParam->rxLevelUL);
+ printf("hoThresholdInterfaceParamRxLevelDL= %d",handoverControlPackage->hoThresholdInterfaceParam->rxLevelDL);
+ printf("hoThresholdInterfaceParamPx= %d",handoverControlPackage->hoThresholdInterfaceParam->px);
+ printf("hoThresholdInterfaceParamNx= %d",handoverControlPackage->hoThresholdInterfaceParam->nx);
+
+ printf("hoThresholdLevParamRxLevelUL= %d",handoverControlPackage->hoThresholdLevParam->rxLevelUL);
+ printf("hoThresholdLevParamRxLevelDL= %d",handoverControlPackage->hoThresholdLevParam->rxLevelDL);
+ printf("hoThresholdLevParamPx= %d",handoverControlPackage->hoThresholdLevParam->px);
+ printf("hoThresholdLevParamNx= %d",handoverControlPackage->hoThresholdLevParam->nx);
+
+ printf("hoThresholdQualParamRxQualUL= %d",handoverControlPackage->hoThresholdQualParam->rxQualUL);
+ printf("hoThresholdQualParamRxQualDL= %d",handoverControlPackage->hoThresholdQualParam->rxQualDL);
+ printf("hoThresholdQualParamPx= %d",handoverControlPackage->hoThresholdQualParam->px);
+ printf("hoThresholdQualParamNx= %d",handoverControlPackage->hoThresholdQualParam->nx);
+
+ printf("interferenceAveragingParamAveragingPeriod= %d",handoverControlPackage->interferenceAveragingParam->interferenceAveragingParamAveragingPeriod);
+ printf("interferenceAveragingParamThresholdBoundary0= %d",handoverControlPackage->interferenceAveragingParam->interferenceAveragingParamThresholdBoundary0);
+ printf("interferenceAveragingParamThresholdBoundary1= %d",handoverControlPackage->interferenceAveragingParam->interferenceAveragingParamThresholdBoundary1);
+ printf("interferenceAveragingParamThresholdBoundary2= %d",handoverControlPackage->interferenceAveragingParam->interferenceAveragingParamThresholdBoundary2);
+ printf("interferenceAveragingParamThresholdBoundary3= %d",handoverControlPackage->interferenceAveragingParam->interferenceAveragingParamThresholdBoundary3);
+ printf("interferenceAveragingParamThresholdBoundary4= %d",handoverControlPackage->interferenceAveragingParam->interferenceAveragingParamThresholdBoundary4);
+ printf("interferenceAveragingParamThresholdBoundary5= %d",handoverControlPackage->interferenceAveragingParam->interferenceAveragingParamThresholdBoundary5);
+
+ printf("msTxPwrMaxCellDef= %d",handoverControlPackage->mxTxPwrMaxCellDef);
+ printf("rxLevMinCellDef= %d",handoverControlPackage->rxLevMinCellDef);
+}
+
+void grr_PrintPowerControlPackage(PowerControlPackage *powerControlPackage)
+{
+ printf("\nPower Control Package");
+
+ printf("pcAveragingLevHreqave= %d",powerControlPackage->pcAveragingLev->hreqave);
+ printf("pcAveragingLevHreqt= %d",powerControlPackage->pcAveragingLev->hreqt);
+ printf("pcAveragingLevWeighting= %d",powerControlPackage->pcAveragingLev->weighting);
+
+ printf("pcAveragingQualHreqave= %d",powerControlPackage->pcAveragingQual->hreqave);
+ printf("pcAveragingQualHreqt= %d",powerControlPackage->pcAveragingQual->hreqt);
+ printf("pcAveragingQualWeighting= %d",powerControlPackage->pcAveragingQual->weighting);
+
+ printf("pcLowerThresholdLevParamRxLevelUL= %d",powerControlPackage->pcLowerThresholdLevParam->rxLevelUL);
+ printf("pcLowerThresholdLevParamRxLevelDL= %d",powerControlPackage->pcLowerThresholdLevParam->rxLevelDL);
+ printf("pcLowerThresholdLevParamPx= %d",powerControlPackage->pcLowerThresholdLevParam->px);
+ printf("pcLowerThresholdLevParamNx= %d",powerControlPackage->pcLowerThresholdLevParam->nx);
+
+ printf("pcLowerThresholdQualParamRxQualUL= %d",powerControlPackage->pcLowerThresholdQualParam->rxQualUL);
+ printf("pcLowerThresholdQualParamRxQualDL= %d",powerControlPackage->pcLowerThresholdQualParam->rxQualDL);
+ printf("pcLowerThresholdQualParamPx= %d",powerControlPackage->pcLowerThresholdQualParam->px);
+ printf("pcLowerThresholdQualParamNx= %d",powerControlPackage->pcLowerThresholdQualParam->nx);
+
+ printf("pcUpperThresholdLevParamRxLevelUL= %d",powerControlPackage->pcUpperThresholdLevParam->rxLevelUL);
+ printf("pcUpperThresholdLevParamRxLevelDL= %d",powerControlPackage->pcUpperThresholdLevParam->rxLevelDL);
+ printf("pcUpperThresholdLevParamPx= %d",powerControlPackage->pcUpperThresholdLevParam->px);
+ printf("pcUpperThresholdLevParamNx= %d",powerControlPackage->pcUpperThresholdLevParam->nx);
+
+ printf("pcUpperThresholdQualParamRxQualUL= %d",powerControlPackage->pcUpperThresholdQualParam->rxQualUL);
+ printf("pcUpperThresholdQualParamRxQualDL= %d",powerControlPackage->pcUpperThresholdQualParam->rxQualDL);
+ printf("pcUpperThresholdQualParamPx= %d",powerControlPackage->pcUpperThresholdQualParam->px);
+ printf("pcUpperThresholdQualParamNx= %d",powerControlPackage->pcUpperThresholdQualParam->nx);
+ printf("powerControlInterval= %d",powerControlPackage->powerControlInterval);
+ printf("powerIncrStepSize= %d",powerControlPackage->powerIncrStepSize);
+ printf("powerRedStepSize= %d",powerControlPackage->powerRedStepSize);
+}
+
+void grr_PrintIntBtsBasicPackage(void)
+{
+ //Administrative states
+ printf("Bts Administrative State(%d,%d) Operational State(%d,%d)\n",
+ OAMgrr_BTS_AMSTATE,
+ grr_OamData.btsBasicPackage.bts_administrativeState,
+ OAMgrr_BTS_OPSTATE,
+ grr_OamData.btsBasicPackage.bts_operationalState
+ );
+
+ printf("Base Station Identity Code: BSIC(%x,%x) NCC(%d,%d) BCC(%d,%d)\n",
+ OAMgrr_POCKETBTS_BSIC,
+ ((unsigned char)(grr_OamData.btsBasicPackage.bts_ncc<<3)|
+ (unsigned char)(grr_OamData.btsBasicPackage.bts_cid)),
+ OAMgrr_NCC,
+ ((unsigned char)(grr_OamData.btsBasicPackage.bts_ncc)),
+ OAMgrr_BCC,
+ ((unsigned char)(grr_OamData.btsBasicPackage.bts_cid))
+ );
+
+ printf("Global Cell ID: MCC(%d,%d,%d)(%d,%d,%d) MNC(%d,%d)(%d,%d) LAC(%x,%x) CI ie btsId (%d,%d)\n",
+ OAMgrr_MCC(0), OAMgrr_MCC(1), OAMgrr_MCC(2),
+ ((unsigned char*)&(grr_OamData.btsBasicPackage.bts_mcc))[0],
+ ((unsigned char*)&(grr_OamData.btsBasicPackage.bts_mcc))[1],
+ ((unsigned char*)&(grr_OamData.btsBasicPackage.bts_mcc))[2],
+ OAMgrr_MNC(0), OAMgrr_MNC(1),
+ ((unsigned char*)&(grr_OamData.btsBasicPackage.bts_mnc))[0],
+ ((unsigned char*)&(grr_OamData.btsBasicPackage.bts_mnc))[1],
+ OAMgrr_LAC,
+ ((short)(grr_OamData.btsBasicPackage.bts_lac)),
+ OAMgrr_CELLID,
+ ((unsigned int)(grr_OamData.btsBasicPackage.btsID))
+ );
+
+ printf("Cell Reselect Hysteresis in 2dB step: (%d, %d)\n",
+ OAMgrr_CELL_RESEL_HYSTERESIS,
+ ((unsigned char)(grr_OamData.btsBasicPackage.cellReselectHysteresis))
+ );
+
+ printf("Max Number of Repetitions of Physical Info.(ny1):(%d, %d)\n",
+ OAMgrr_NY1,
+ ((unsigned char)(grr_OamData.btsBasicPackage.ny1))
+ );
+
+
+ printf("Radio Indicator: (%d, %d)\n",
+ OAMgrr_GSMDCS_INDICATOR,
+ grr_OamData.btsBasicPackage.gsmdcsIndicator
+ );
+
+ printf("NccPermitted Setting 0th(%d,%d) 1st(%d,%d) 2nd(%d,%d) 3rd(%d,%d) 4th(%d,%d) 5th(%d,%d) 6th(%d,%d) 7th(%d,%d)\n",
+ OAMgrr_NCC_PERMITTED(0),
+ (((PlmnPermittedEntry*)(grr_OamData.btsBasicPackage.plmnPermittedTable))[0].
+ plmnPermitted),
+ OAMgrr_NCC_PERMITTED(1),
+ (((PlmnPermittedEntry*)(grr_OamData.btsBasicPackage.plmnPermittedTable))[1].
+ plmnPermitted),
+ OAMgrr_NCC_PERMITTED(2),
+ (((PlmnPermittedEntry*)(grr_OamData.btsBasicPackage.plmnPermittedTable))[2].
+ plmnPermitted),
+ OAMgrr_NCC_PERMITTED(3),
+ (((PlmnPermittedEntry*)(grr_OamData.btsBasicPackage.plmnPermittedTable))[3].
+ plmnPermitted),
+ OAMgrr_NCC_PERMITTED(4),
+ (((PlmnPermittedEntry*)(grr_OamData.btsBasicPackage.plmnPermittedTable))[4].
+ plmnPermitted),
+ OAMgrr_NCC_PERMITTED(5),
+ (((PlmnPermittedEntry*)(grr_OamData.btsBasicPackage.plmnPermittedTable))[5].
+ plmnPermitted),
+ OAMgrr_NCC_PERMITTED(6),
+ (((PlmnPermittedEntry*)(grr_OamData.btsBasicPackage.plmnPermittedTable))[6].
+ plmnPermitted),
+ OAMgrr_NCC_PERMITTED(7),
+ (((PlmnPermittedEntry*)(grr_OamData.btsBasicPackage.plmnPermittedTable))[7].
+ plmnPermitted)
+ );
+
+ printf("Radio Link Timeout in 4 SACCH frame unit:(%d,%d)\n",
+ OAMgrr_RADIO_LINK_TIMEOUT,
+ ((unsigned char)(grr_OamData.btsBasicPackage.radioLinkTimeout))
+ );
+
+ printf("Minimum Receive Level Access:(%d, %d)\n",
+ OAMgrr_MS_RELEV_ACCESS_MIN,
+ ((unsigned char)(grr_OamData.btsBasicPackage.rxLevAccessMin))
+ );
+
+}
+
+void grr_PrintIntBtsBcchConfigurationPackage(void)
+{
+
+ printf("Max Number Retransmission(1 2 4 7) on RACH:(%d, %d)\n",
+ OAMgrr_RA_RETRY_MAX,
+ ((unsigned char)(grr_OamData.btsBasicPackage.maxNumberRetransmissions))
+ );
+
+ printf("MS Tx Power Max CCCH:(%d, %d)\n",
+ OAMgrr_MS_TX_PWR_MAX_CCH,
+ ((unsigned char)(grr_OamData.btsBasicPackage.mSTxPwrMaxCCH))
+ );
+
+ printf("No. of Blocks for Access Grant:(%d, %d)\n",
+ OAMgrr_BS_AG_BLK_RES,
+ ((unsigned char)(grr_OamData.btsBasicPackage.noOfBlocksForAccessGrant))
+ );
+
+
+ printf("No. of Multi-frames Between Paging:(%d, %d)\n",
+ OAMgrr_BS_PA_MFRMS,
+ ((unsigned char)(grr_OamData.btsBasicPackage.noOfMultiframesBetweenPaging))
+ );
+
+ printf("No. of Slots Spread Trans (Tx Integer):(%d, %d)\n",
+ OAMgrr_RA_TX_INTEGER,
+ ((unsigned char)(grr_OamData.btsBasicPackage.numberOfSlotsSpreadTrans))
+ );
+
+ printf("Cell Reselect Offset:(%d, %d)\n",
+ OAMgrr_CELL_RESELECT_OFFSET,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_nim[0][3]))
+ );
+
+ printf("Temporary Offset:(%d, %d)\n",
+ OAMgrr_TEMP_OFFEST,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_nim[0][4]))
+ );
+
+ printf("Penalty Offset:(%d, %d)\n",
+ OAMgrr_PENALTY_TIME,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_nim[0][5]))
+ );
+
+ printf("Cell Bar Qualify:(%d, %d)\n",
+ OAMgrr_CELL_BAR_QUALIFY,
+ grr_OamData.grrConfigData.rm_nim[0][6]
+ );
+}
+
+void grr_PrintIntBtsCellAllocationTable(void)
+{
+ printf("1st ARFCN in cell allocation table:(%d,%d)\n",
+ OAMgrr_CA_ARFCN(0),
+ (((CellAllocationEntry*)(grr_OamData.btsBasicPackage.cellAllocationTable))[0].cellAllocation)
+ );
+ printf("2nd ARFCN in cell allocation table:(%d,%d)\n",
+ OAMgrr_CA_ARFCN(1),
+ (((CellAllocationEntry*)(grr_OamData.btsBasicPackage.cellAllocationTable))[1].cellAllocation)
+ );
+ printf("3rd ARFCN in cell allocation table:(%d,%d)\n",
+ OAMgrr_CA_ARFCN(2),
+ (((CellAllocationEntry*)(grr_OamData.btsBasicPackage.cellAllocationTable))[2].cellAllocation)
+ );
+}
+
+void grr_PrintIntBtsOptionsPackage(void)
+{
+ printf("Use IMSI attach/detach procedure? Setting(%d, %d)\n",
+ OAMgrr_ATT_STATE,
+ ((T_CNI_RIL3_ATT)(grr_OamData.btsOptionsPackage.allowIMSIAttachDetach))
+ );
+
+ printf("Cell Barred? (%d, %d) overLoadBarring(%d,%d) currentBarringState(%d)\n",
+ OAMgrr_RA_CELL_BARRED_STATE,
+ ((T_CNI_RIL3_CELL_BARRED_ACCESS)(grr_OamData.btsOptionsPackage.cellBarred)),
+ OAMgrr_OVERLOAD_CELLBAR
+ );
+
+ printf("Restablishment Allowed? (%d, %d)\n",
+ OAMgrr_RA_REST_ALLOWED_STATE,
+ ((T_CNI_RIL3_REESTABLISHMENT_ALLOWED)
+ (grr_OamData.btsOptionsPackage.callReestablishmentAllowed))
+ );
+
+ printf("Downlink DTX is available in the BTS(downlink)? (%d, %d)\n",
+ OAMgrr_MS_DNLINK_DTX_STATE,
+ ((int)(grr_OamData.btsOptionsPackage.dtxDownlink))
+ );
+
+ printf("Discontinuous Transmission (DTX) mode to be used by the Mobile Stations(uplink): (%d, %d)\n",
+ OAMgrr_MS_UPLINK_DTX_STATE,
+ ((T_CNI_RIL3_DTX_BCCH)(grr_OamData.btsOptionsPackage.dtxUplink))
+ );
+
+ printf("Is IMSI required for Emergency calls? (%d, %d)\n",
+ OAMgrr_IMSI_REQUIRED_FOR_EC,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_nim[1][0]))
+ );
+
+ printf("Emergency calls restricted to MSs belonging to access classes from 11 to 15? (%d, %d)\n",
+ OAMgrr_RA_EC_ALLOWED_STATE,
+ ((T_CNI_RIL3_EMERGENCY_CALL_ALLOWED)
+ (grr_OamData.btsOptionsPackage.emergencyCallRestricted))
+ );
+
+ printf("MS Access Classes not allowed to access the cell: c0(%d,%d) c1(%d,%d) c2(%d,%d) c3(%d,%d) c4(%d,%d)\n",
+ OAMgrr_RA_AC_ALLOWED_STATE(0),
+ ((unsigned char)(((NotAllowedAccessClassEntry*)
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[0].notAllowedAccessClass)),
+ OAMgrr_RA_AC_ALLOWED_STATE(1),
+ ((unsigned char)(((NotAllowedAccessClassEntry*)
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[1].notAllowedAccessClass)),
+ OAMgrr_RA_AC_ALLOWED_STATE(2),
+ ((unsigned char)(((NotAllowedAccessClassEntry*)
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[2].notAllowedAccessClass)),
+ OAMgrr_RA_AC_ALLOWED_STATE(3),
+ ((unsigned char)(((NotAllowedAccessClassEntry*)
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[3].notAllowedAccessClass)),
+ OAMgrr_RA_AC_ALLOWED_STATE(4),
+ ((unsigned char)(((NotAllowedAccessClassEntry*)
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[4].notAllowedAccessClass))
+ );
+
+ printf("MS Access Classes not allowed to access the cell: c5(%d,%d) c6(%d,%d) c7(%d,%d) c8(%d,%d) c9(%d,%d)\n",
+ OAMgrr_RA_AC_ALLOWED_STATE(5),
+ ((unsigned char)(((NotAllowedAccessClassEntry*)
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[5].notAllowedAccessClass)),
+ OAMgrr_RA_AC_ALLOWED_STATE(6),
+ ((unsigned char)(((NotAllowedAccessClassEntry*)
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[6].notAllowedAccessClass)),
+ OAMgrr_RA_AC_ALLOWED_STATE(7),
+ ((unsigned char)(((NotAllowedAccessClassEntry*)
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[7].notAllowedAccessClass)),
+ OAMgrr_RA_AC_ALLOWED_STATE(8),
+ ((unsigned char)(((NotAllowedAccessClassEntry*)
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[8].notAllowedAccessClass)),
+ OAMgrr_RA_AC_ALLOWED_STATE(9),
+ ((unsigned char)(((NotAllowedAccessClassEntry*)
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[9].notAllowedAccessClass))
+ );
+
+ printf("MS Access Classes not allowed to access the cell: c10(%d,%d) c11(%d,%d) c12(%d,%d) c13(%d,%d) c14(%d,%d) c15(%d,%d)\n",
+ OAMgrr_RA_AC_ALLOWED_STATE(10),
+ ((unsigned char)(((NotAllowedAccessClassEntry*)
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[10].notAllowedAccessClass)),
+ OAMgrr_RA_AC_ALLOWED_STATE(11),
+ ((unsigned char)(((NotAllowedAccessClassEntry*)
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[11].notAllowedAccessClass)),
+ OAMgrr_RA_AC_ALLOWED_STATE(12),
+ ((unsigned char)(((NotAllowedAccessClassEntry*)
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[12].notAllowedAccessClass)),
+ OAMgrr_RA_AC_ALLOWED_STATE(13),
+ ((unsigned char)(((NotAllowedAccessClassEntry*)
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[13].notAllowedAccessClass)),
+ OAMgrr_RA_AC_ALLOWED_STATE(14),
+ ((unsigned char)(((NotAllowedAccessClassEntry*)
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[14].notAllowedAccessClass)),
+ OAMgrr_RA_AC_ALLOWED_STATE(15),
+ ((unsigned char)(((NotAllowedAccessClassEntry*)
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[15].notAllowedAccessClass))
+ );
+
+ printf("Periodic Location Update Interval (T3212 Deci Hours): (%d, %d)\n",
+ OAMgrr_T3212,
+ ((unsigned char)(grr_OamData.btsOptionsPackage.timerPeriodicUpdateMS))
+ );
+
+}
+
+void grr_PrintIntFirstTransceiverPackage(void)
+{
+ int i;
+
+ //Trx 0 Administrative state
+ printf("Transceriver 0 Administrative State: (%d,%d)\n",
+ OAMgrr_TRX_AMSTATE(0),
+ grr_OamData.transceiverPackage[0].basebandAdministrativeState
+ );
+
+ //Trx 0 Operational state
+ printf("Transceiver 0 Operational State: (%d,%d)\n",
+ OAMgrr_TRX_OPSTATE(0),
+ grr_OamData.transceiverPackage[0].basebandOperationalState
+ );
+
+ for (i=0;i<8;i++)
+ {
+ printf("Transceiver 0 TS-%d States: i, Admin State(%d,%d) Opera State(%d,%d) Chan Combination(%d,%d) TSC(%d,%d)\n",
+ OAMgrr_CHN_AMSTATE(0,i),
+ ((ChannelEntry*)
+ (grr_OamData.transceiverPackage[0].channelTable))[i].channelAdministrativeState,
+ OAMgrr_CHN_OPSTATE(0,i),
+ ((EnableDisable)(((ChannelEntry*)
+ (grr_OamData.transceiverPackage[0].channelTable))[i].channelOperationalState)),
+ OAMgrr_TRX_SLOT_COMB(0,i),
+ ((unsigned char)(((ChannelEntry*)
+ (grr_OamData.transceiverPackage[0].channelTable))[i].channelCombination)),
+ OAMgrr_TRX_SLOT_TSC(0,i),
+ ((unsigned char)(((ChannelEntry*)
+ (grr_OamData.transceiverPackage[0].channelTable))[i].channelTsc))
+ );
+ }
+}
+
+void grr_PrintIntSecondTransceiverPackage(void)
+{
+ int i;
+
+ //Trx 0 Administrative state
+ printf("Transceriver 1 Administrative State: (%d,%d)\n",
+ OAMgrr_TRX_AMSTATE(1),
+ grr_OamData.transceiverPackage[1].basebandAdministrativeState
+ );
+
+ //Trx 0 Operational state
+ printf("Transceiver 1 Operational State: (%d,%d)\n",
+ OAMgrr_TRX_OPSTATE(1),
+ grr_OamData.transceiverPackage[1].basebandOperationalState
+ );
+
+ for (i=0;i<8;i++)
+ {
+ printf("Transceiver 1 TS-%d States: i, Admin State(%d,%d) Opera State(%d,%d) Chan Combination(%d,%d) TSC(%d,%d)\n",
+ OAMgrr_CHN_AMSTATE(1,i),
+ ((ChannelEntry*)
+ (grr_OamData.transceiverPackage[1].channelTable))[i].channelAdministrativeState,
+ OAMgrr_CHN_OPSTATE(1,i),
+ ((EnableDisable)(((ChannelEntry*)
+ (grr_OamData.transceiverPackage[1].channelTable))[i].channelOperationalState)),
+ OAMgrr_TRX_SLOT_COMB(1,i),
+ ((unsigned char)(((ChannelEntry*)
+ (grr_OamData.transceiverPackage[1].channelTable))[i].channelCombination)),
+ OAMgrr_TRX_SLOT_TSC(1,i),
+ ((unsigned char)(((ChannelEntry*)
+ (grr_OamData.transceiverPackage[1].channelTable))[i].channelTsc))
+ );
+ }
+}
+
+void grr_PrintIntT31xxPackage(void)
+{
+ printf("Immediate Assignment(T3101): (%d,%d)\n",
+ OAMgrr_T3101, grr_OamData.t31xx.t3101
+ );
+ printf("Handover Command(T3103): (%d,%d)\n",
+ OAMgrr_T3103, grr_OamData.t31xx.t3103
+ );
+ printf("physical Information(T3105): (%d,%d)\n",
+ OAMgrr_T3105, grr_OamData.t31xx.t3105
+ );
+ printf("Assignment Command(T3107): (%d,%d)\n",
+ OAMgrr_T3107, grr_OamData.t31xx.t3107
+ );
+ printf("lower layer failure(T3109): (%d,%d)\n",
+ OAMgrr_T3109, grr_OamData.t31xx.t3109
+ );
+ printf("Channel Activation Delay(T3111): (%d,%d)\n",
+ OAMgrr_T3111, grr_OamData.t31xx.t3111
+ );
+ printf("Paging Messages(T3113): (%d,%d)\n",
+ OAMgrr_T3111, grr_OamData.t31xx.t3113);
+}
+
+void grr_PrintIntFirstTrxRadioCarrierPackage(void)
+{
+ printf("Trx-0 Radio Carrier Configuration: pwrClass(%d,%d) rc(%d,%d) MaxTxPwrReduction(%d,%d)\n",
+ OAMgrr_TRX_RC_NO(0),
+ ((unsigned short)(grr_OamData.radioCarrierPackage[grr_OamData.transceiverPackage[0].relatedRadioCarrier].
+ radioCarrierID)),
+ OAMgrr_TRX_RC_MAXPWR_CUT(0),
+ ((unsigned short)(grr_OamData.radioCarrierPackage[grr_OamData.transceiverPackage[0].relatedRadioCarrier].
+ txPwrMaxReduction)),
+ OAMgrr_TRX_RC_ARFCN(0,0),
+ ((unsigned short)(((CarrierFrequencyEntry*)
+ (grr_OamData.radioCarrierPackage[grr_OamData.transceiverPackage[0].relatedRadioCarrier].
+ carrierFrequencyList))[0].carrierFrequency))
+ );
+}
+
+void grr_PrintIntSecondTrxRadioCarrierPackage(void)
+{
+ printf("Trx 1 First Radio Carrier Configuration: pwrClass(%d,%d) rc #(%d,%d) MaxTxPwrReduction(%d,%d) Freq(%d,%d)\n",
+ OAMgrr_TRX_RC_PWR_CLASS(1),
+ ((unsigned short)(grr_OamData.radioCarrierPackage[
+ grr_OamData.transceiverPackage[1].relatedRadioCarrier].powerClass)),
+ OAMgrr_TRX_RC_NO(1),
+ ((unsigned short)(grr_OamData.radioCarrierPackage[
+ grr_OamData.transceiverPackage[1].relatedRadioCarrier].radioCarrierID)),
+ OAMgrr_TRX_RC_MAXPWR_CUT(1),
+ ((unsigned short)(grr_OamData.radioCarrierPackage[
+ grr_OamData.transceiverPackage[1].relatedRadioCarrier].txPwrMaxReduction)),
+ OAMgrr_TRX_RC_ARFCN(1,0),
+ ((unsigned short)(((CarrierFrequencyEntry*)(grr_OamData.radioCarrierPackage[
+ grr_OamData.transceiverPackage[1].relatedRadioCarrier
+ ].carrierFrequencyList))[0].carrierFrequency))
+ );
+}
+
+
+void grr_PrintIntAdjacentCellHandoverPackage(void)
+{
+ int i;
+ for (i=0;i<16;i++)
+ {
+ printf("Adjacent Cell Handover Package from MIB %d-th adjacent cell data: selected(%d,%d) networkId(%d,%d) cellId(%d,%d)\n",
+ i,
+ OAMgrr_HO_ADJCELL_ID(i),
+ ((unsigned int)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_handoverCellID)),
+ OAMgrr_NCELL_NETWORKID(i),
+ ((short)((((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_handoverCellID))>>16),
+ OAMgrr_NCELL_CELLID(i),
+ ((short)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_handoverCellID))
+ );
+ printf("mcc(%d,%d,%d) mnc(%d,%d,%x) lac(%d,%d) ci(%d,%d) freq(%d,%d) ncc(%d,%d) bcc(%d,%d) margin(%d,%d) maxTxPwr(%d,%d) minRxLev(%d,%d)\n",
+ OAMgrr_HO_ADJCELL_MCC(i,0),
+ ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_mcc))[0],
+ OAMgrr_HO_ADJCELL_MCC(i,1),
+ ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_mcc))[1],
+ OAMgrr_HO_ADJCELL_MCC(i,2),
+ ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_mcc))[2],
+ OAMgrr_HO_ADJCELL_MNC(i,0),
+ ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_mnc))[0],
+ OAMgrr_HO_ADJCELL_MNC(i,1),
+ ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_mnc))[1],
+ OAMgrr_HO_ADJCELL_MNC(i,2),
+ ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_mnc))[2],
+ OAMgrr_HO_ADJCELL_LAC(i),
+ ((short)((((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_lac))),
+ OAMgrr_HO_ADJCELL_CI(i),
+ ((short)((((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_ci))),
+ OAMgrr_HO_ADJCELL_BCCH_ARFCN(i),
+ ((short)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_bCCHFrequency)),
+ OAMgrr_HO_ADJCELL_NCC(i),
+ ((short)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_ncc)),
+ OAMgrr_HO_ADJCELL_BCC(i),
+ ((short)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_cid)),
+ OAMgrr_HO_ADJCELL_HO_MARGIN(i),
+ ((short)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_hoMargin)),
+ OAMgrr_HO_ADJCELL_MSTXPWR_MAX_CELL(i),
+ ((short)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_msTxPwrMaxCell)),
+ OAMgrr_HO_ADJCELL_RXLEV_MIN_CELL(i),
+ ((short)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_rxLevMinCell))
+ );
+
+ printf("Adjacent Cell Handover Package After Compression %d-th adjacent cell data: selected(%d,%d) networkId(%d,%d) cellId(%d,%d)\n",
+ i,
+ OAMgrr_HO_ADJCELL_ID_t(i),
+ ((unsigned int)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[i].adjCell_handoverCellID)),
+ OAMgrr_NCELL_NETWORKID_t(i),
+ ((short)((((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[i].adjCell_handoverCellID))>>16),
+ OAMgrr_NCELL_CELLID_t(i),
+ ((short)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[i].adjCell_handoverCellID))
+ );
+ printf("mcc(%d,%d,%d) mnc(%d,%d,%x) lac(%d,%d) ci(%d,%d) freq(%d,%d) ncc(%d,%d) bcc(%d,%d) margin(%d,%d) maxTxPwr(%d,%d) minRxLev(%d,%d)\n",
+ OAMgrr_HO_ADJCELL_MCC_t(i,0),
+ ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[i].adjCell_mcc))[0],
+ OAMgrr_HO_ADJCELL_MCC_t(i,1),
+ ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[i].adjCell_mcc))[1],
+ OAMgrr_HO_ADJCELL_MCC_t(i,2),
+ ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[i].adjCell_mcc))[2],
+ OAMgrr_HO_ADJCELL_MNC_t(i,0),
+ ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[i].adjCell_mnc))[0],
+ OAMgrr_HO_ADJCELL_MNC_t(i,1),
+ ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[i].adjCell_mnc))[1],
+ OAMgrr_HO_ADJCELL_MNC_t(i,2),
+ ((unsigned char*)&(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[i].adjCell_mnc))[2],
+ OAMgrr_HO_ADJCELL_LAC_t(i),
+ ((short)((((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[i].adjCell_lac))),
+ OAMgrr_HO_ADJCELL_CI_t(i),
+ ((short)((((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[i].adjCell_ci))),
+ OAMgrr_HO_ADJCELL_BCCH_ARFCN_t(i),
+ ((short)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[i].adjCell_bCCHFrequency)),
+ OAMgrr_HO_ADJCELL_NCC(i),
+ ((short)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[i].adjCell_ncc)),
+ OAMgrr_HO_ADJCELL_BCC_t(i),
+ ((short)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[i].adjCell_cid)),
+ OAMgrr_HO_ADJCELL_HO_MARGIN_t(i),
+ ((short)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[i].adjCell_hoMargin)),
+ OAMgrr_HO_ADJCELL_MSTXPWR_MAX_CELL_t(i),
+ ((short)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[i].adjCell_msTxPwrMaxCell)),
+ OAMgrr_HO_ADJCELL_RXLEV_MIN_CELL_t(i),
+ ((short)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[i].adjCell_rxLevMinCell))
+ );
+
+ }
+}
+
+void grr_PrintIntAdjacentCellReselectPackage(void)
+{
+ int i;
+ for (i=0;i<16;i++)
+ {
+ printf("Adjacent Cell Reselect Package from MIB %d-th adjacent cell data: selected(%d,%d) freq(%d,%d) cellId(%d,%d)\n",
+ i,
+ OAMgrr_RESEL_ADJCELL_ID(i),
+ ((unsigned int)(((AdjCell_ReselectionEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_reselectionTable))[i].adjCell_reselectionCellID)),
+ OAMgrr_RESEL_ADJCELL_BCCH_ARFCN(i),
+ ((short)(((AdjCell_ReselectionEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_reselectionTable))[i].adjCell_reselectionBCCHFrequency))
+ );
+ }
+}
+
+void grr_PrintIntGrrConfigData(void)
+{
+ int i,j;
+
+ printf("Grr Module Configuration Package MIB parameters:\n");
+
+ printf("OAMgrr_T3L01: %x, %x\n",
+ OAMgrr_T3L01,
+ ((int)(grr_OamData.grrConfigData.rm_t3L01))
+ );
+ //0xFF
+ printf("OAMgrr_BS_CC_CHANS: %x, %x\n",
+ OAMgrr_BS_CC_CHANS,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_bsCcChans))
+ );
+ //0x01
+ printf("OAMgrr_BSCCCHSDCCH_COMB: %x, %x\n",
+ OAMgrr_BSCCCHSDCCH_COMB,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_bsCcchSdcchComb)));
+ //0x01
+ printf("OAMgrr_AIRINTERFACE: %x, %x\n",
+ OAMgrr_AIRINTERFACE,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_airInterface)));
+ //0x02
+ printf("OAMgrr_POCKETBTS_TSC: %x, %x\n",
+ OAMgrr_POCKETBTS_TSC,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_viperCellTsc)));
+ //0x05
+ printf("OAMgrr_SLOTS_PER_TRX: %x, %x\n",
+ OAMgrr_SLOTS_PER_TRX,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_maxSlotPerTrx)));
+ //0x08
+ printf("OAMgrr_MAX_TRXS: %x, %x\n",
+ OAMgrr_MAX_TRXS,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_maxTrxs)));
+ //0x02
+ printf("OAMgrr_MAX_TCHFS: %x, %x\n",
+ OAMgrr_MAX_TCHFS,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_maxTchfs)));
+ //0x0f
+ printf("OAMgrr_MAX_SDCCH4S: %x, %x\n",
+ OAMgrr_MAX_SDCCH4S,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_maxSdcch4s)));
+ //0x04
+ printf("OAMgrr_TRX_ONOFF_MAP: %x, %x\n",
+ OAMgrr_TRX_ONOFF_MAP,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_trxOnOffMap)));
+ //0x01
+ printf("OAMgrr_NETWORKIFCONFIG: %x, %x\n",
+ OAMgrr_NETWORKIFCONFIG,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_networkIfConfig)));
+ //0x00
+ printf("OAMgrr_BCCH_TRX: %x, %x\n",
+ OAMgrr_BCCH_TRX,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_bcchTrx)));
+ //0x00
+ printf("OAMgrr_PREALPHA_TRX: %x, %x\n",
+ OAMgrr_PREALPHA_TRX,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_preAlphaTrx)));
+ //0x00
+ printf("OAMgrr_CCCH_SDCCH_COMB: %x, %x\n",
+ OAMgrr_CCCH_SDCCH_COMB,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_ccchBcchComb)));
+ //0x01
+ printf("OAMgrr_CCCH_CONF: %x, %x\n",
+ OAMgrr_CCCH_CONF,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_ccchConf)));
+ //0x01
+ //FS:T_CNI_RIL3_CCCH_CONF:CNI_RIL3_CCCH_CONF_ONE_CCCH_COMBINED_SDCCHS=1
+ for (i=0;i<2;i++)
+ for (j=0;j<8;j++)
+ {
+ printf("OAMgrr_NIM(%d,%d): %x, %x\n", i,j,
+ OAMgrr_NIM(i,j),
+ ((unsigned char)(grr_OamData.grrConfigData.rm_nim[i][j])));
+ //rm_nim[2][8]: all elements<-0xFF
+ }
+
+ printf("OAMgrr_IQ_SWAP: %d, %d\n", OAMgrr_IQ_SWAP, grr_OamData.grr_IQSwap);
+
+}
+
+void grr_SetDbgDump(void)
+{
+grr_DbgDump=1;
+}
+
+void grr_ResetDbgDump(void)
+{
+grr_DbgDump=0;
+}
+
+void grr_SetGprsCtrl(void)
+{
+grr_GprsCtrl=1;
+grr_PassOamMsParams(0);
+grr_PassOamMsParams(1);
+}
+
+void grr_ResetGprsCtrl(void)
+{
+grr_GprsCtrl=0;
+grr_PassOamMsParams(0);
+grr_PassOamMsParams(1);
+}
+
+void grr_GprsSetting(void)
+{
+printf ("OAMgrr_GPRS_RA_COLOR = (%d)\n", OAMgrr_GPRS_RA_COLOR ); //0
+printf ("OAMgrr_SI13_POS = (%d)\n", OAMgrr_SI13_POS ); //0
+printf ("OAMgrr_GPRS_NETWORK_MODE = (%d)\n", OAMgrr_GPRS_NETWORK_MODE ); //1
+printf ("OAMgrr_CBCH_TRX_SLOT = (%d)\n", OAMgrr_CBCH_TRX_SLOT ); //0
+printf ("OAMgrr_CBCH_TRX = (%d)\n", OAMgrr_CBCH_TRX ); //0
+printf ("OAMgrr_BCCH_CHANGE_MARK = (%d)\n", OAMgrr_BCCH_CHANGE_MARK ); //0
+printf ("OAMgrr_SI_CHANGE_FIELD = (%d)\n", OAMgrr_SI_CHANGE_FIELD ); //0
+printf ("OAMgrr_GPRS_RAC = (%d)\n", OAMgrr_GPRS_RAC ); //1
+printf ("OAMgrr_GPRS_NMO = (%d)\n", OAMgrr_GPRS_NMO ); //1
+printf ("OAMgrr_GPRS_T3168 = (%d)\n", OAMgrr_GPRS_T3168 ); //4
+printf ("OAMgrr_GPRS_T3192 = (%d)\n", OAMgrr_GPRS_T3192 ); //7
+printf ("OAMgrr_GPRS_DRX_TIMER_MAX = (%d)\n", OAMgrr_GPRS_DRX_TIMER_MAX ); //7
+printf ("OAMgrr_GPRS_ACCESS_BURST_TYPE = (%d)\n", OAMgrr_GPRS_ACCESS_BURST_TYPE ); //0
+printf ("OAMgrr_GPRS_CONTROL_ACK_TYPE = (%d)\n", OAMgrr_GPRS_CONTROL_ACK_TYPE ); //0
+printf ("OAMgrr_GPRS_BS_CV_MAX = (%d)\n", OAMgrr_GPRS_BS_CV_MAX ); //7
+printf ("OAMgrr_GPRS_PAN_DEC = (%d)\n", OAMgrr_GPRS_PAN_DEC ); //1
+printf ("OAMgrr_GPRS_PAN_INC = (%d)\n", OAMgrr_GPRS_PAN_INC ); //1
+printf ("OAMgrr_GPRS_PAN_MAX = (%d)\n", OAMgrr_GPRS_PAN_MAX ); //4
+printf ("OAMgrr_GPRS_ALPHA = (%d)\n", OAMgrr_GPRS_ALPHA ); //10
+printf ("OAMgrr_GPRS_T_AVG_W = (%d)\n", OAMgrr_GPRS_T_AVG_W ); //15
+printf ("OAMgrr_GPRS_T_AVG_T = (%d)\n", OAMgrr_GPRS_T_AVG_T ); //5
+printf ("OAMgrr_GPRS_PC_MEAS_CHAN = (%d)\n", OAMgrr_GPRS_PC_MEAS_CHAN ); //1
+printf ("OAMgrr_GPRS_N_AVG_I = (%d)\n", OAMgrr_GPRS_N_AVG_I ); //4
+}
+
+void grr_SetTrxSlotCombination(int trx, int slot, int comb)
+{
+
+MibTag tag;
+
+printf("current valid channel combinations\n");
+printf("1-TCH/F + FACCH/F + SACCH/F\n");
+printf("2-TCH/H(0,1) + FACCH/H(0,1) + SACCH/H(0,1)n");
+printf("3-TCH/H(0,0) + FACCH/H(0,1) + SACCH/H(0,1) + TCH/H(1,1)n");
+printf("4-FCCH + SCH + BCCH + CCCHn");
+printf("5-FCCH + SCH + BCCH + CCCH + SDCCH/4(0..3) + SACCH/C4(0..3)n");
+printf("6-BCCH + CCCHn");
+printf("7-combination 5 with CBCH as 05.02 Note 1n");
+printf("8-combination 3 with CBCH as 05.02 Note 1n");
+printf("11-combination XI for GPRSn");
+printf("12-combination XII for GPRSn");
+printf("13-combination XIII for GPRS\n");
+
+OAMgrr_TRX_SLOT_COMBa(trx,slot)= (ChannelCombination_t) comb;
+
+if (trx==0) tag = MIBT_channelCombination_0;
+else tag = MIBT_channelCombination_1;
+
+if ( STATUS_OK!=oam_setTblEntryField(MODULE_GRR, tag, slot, (ChannelCombination)comb) )
+{
+ printf("grr_SetTrxSlotCombination: oam_setTblEntryField failed for setting trx(%d) slot(%d) comb(%d)\n",
+ trx, slot, comb);
+} else
+ grr_SendDspSlotActivate( (unsigned char) trx, (unsigned char) slot);
+}
+
+#endif // __GRR_TESTUTIL_CPP__
diff --git a/data/mnet/GP10/Host/grr/src/grr_init.cpp b/data/mnet/GP10/Host/grr/src/grr_init.cpp
new file mode 100644
index 0000000..41e41f1
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src/grr_init.cpp
@@ -0,0 +1,550 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_INIT_CPP__
+#define __GRR_INIT_CPP__
+
+#include "grr\grr_head.h"
+
+int grr_InitWatchTimerExpired(int trx)
+{
+ DBG_FUNC("grr_InitWatchTimerExpired", GRR_LAYER_INIT);
+ DBG_ENTER();
+
+ DBG_ERROR("grr_InitWatchTimerExpired: DSP(%d) failed to respond during initialization\n", trx);
+ printf("grr_InitWatchTimerExpired: DSP(%d) failed to respond during initialization\n", trx);
+
+ grr_SubmitAlarm(grr_DspInitWatchTimerExpiredAlarmCode[trx]);
+
+ DBG_LEAVE();
+ assert(0);
+
+}
+
+void grr_InitWatchTimerStop(unsigned char trx)
+{
+ DBG_FUNC("grr_InitWatchTimerStop", GRR_LAYER_INIT);
+ DBG_ENTER();
+
+ wdCancel(grr_TrxMgmt[trx].wdog.timer_id);
+
+ DBG_LEAVE();
+}
+
+void grr_InitWatchTimerStart(int trx)
+{
+ WDOG_ID timer_id;
+
+ DBG_FUNC("grr_InitWatchTimerStart", GRR_LAYER_INIT);
+ DBG_ENTER();
+
+ //Create watchdog to monitir init
+ if ( (timer_id=wdCreate()) == NULL )
+ {
+ grr_SubmitAlarm(EC_GRR_OS_CALL_WDCREATE_FAILED);
+ DBG_ERROR("grr_InitWatchTimerStart:failed to create initWatchTimer for trx(%d)\n", trx);
+ printf("grr_InitWatchTimerStart:failed to create initWatchTimer for trx(%d)\n", trx);
+ assert(0);
+ }
+
+ if ( ERROR == (wdStart(timer_id, GRR_INIT_WATCH_TIME,(FUNCPTR)grr_InitWatchTimerExpired,
+ trx)) )
+ {
+ grr_SubmitAlarm(EC_GRR_OS_CALL_WDSTART_FAILED);
+ DBG_ERROR("grr_InitWatchTimerStart:failed to call wdstart for trx(%d) initWatchTimer\n", trx);
+ printf("grr_InitWatchTimerStart:failed to call wdstart for trx(%d) initWatchTimer\n", trx);
+ assert(0);
+ }
+
+ grr_TrxMgmt[trx].wdog.timer_id = timer_id;
+
+ DBG_LEAVE();
+}
+
+bool grr_InitDspOver(unsigned char trx)
+{
+
+ //Check if DSP initialization done
+ return ( (grr_TrxMgmt[trx].state==GRR_TRXMGMT_S3_TRXCONFIG_END) ? true:false);
+
+}
+
+void grr_InitDspMsgProc(unsigned char trx)
+{
+ unsigned char slot;
+
+ DBG_FUNC("grr_InitDspMsgProc", GRR_LAYER_INIT);
+ DBG_ENTER();
+
+ //Process in terms of trx state
+ slot = grr_pItcRxDspMsg->buffer[4];
+
+ switch ( grr_TrxMgmt[trx].state )
+ {
+ case GRR_TRXMGMT_S0_BOOTSTRAP_IND:
+ //
+ //Waiting for dsp bootstrap indication
+ if (!GRR_L1MSGCMP(GRR_L1MG_TRXMGMT,GRR_L1MT_BOOTSTRAPCNF_MSB,GRR_L1MT_BOOTSTRAPCNF_LSB))
+ {
+ //Got unexpected message
+ DBG_WARNING("grr_InitDspMsgProc: expecting DspBootstrapInd but recved msg(%d,%d,%d,%d)\n",
+ grr_pItcRxDspMsg->buffer[0],
+ grr_pItcRxDspMsg->buffer[1],
+ grr_pItcRxDspMsg->buffer[2],
+ grr_pItcRxDspMsg->buffer[3]);
+ return;
+ }
+
+ //Process the received msg
+ grr_SendDspTrxConfig(trx);
+ ConfigTxPwrValues(trx);
+ grr_SetOamTrxOpState(trx,opStateDisabled);
+ grr_SetOamAllTrxSlotOpState(trx, opStateDisabled);
+ grr_TrxMgmt[trx].state=GRR_TRXMGMT_S1_TRXCONFIG_ACK;
+ break;
+
+ case GRR_TRXMGMT_S1_TRXCONFIG_ACK:
+ //
+ //Waiting for trx config ack
+ if (!GRR_L1MSGCMP(GRR_L1MG_TRXMGMT,GRR_L1MT_TRXCONFIGACK_MSB,
+ GRR_L1MT_TRXCONFIGACK_LSB))
+ {
+ //Got unexpected message
+ DBG_WARNING("grr_InitDspMsgProc: expecting trxConigAck but recved msg(%d,%d,%d,%d)\n",
+ grr_pItcRxDspMsg->buffer[0],
+ grr_pItcRxDspMsg->buffer[1],
+ grr_pItcRxDspMsg->buffer[2],
+ grr_pItcRxDspMsg->buffer[3]);
+ return;
+ }
+
+ //Trx config acked, then go init its TSs
+ grr_SetOamTrxOpState(trx, opStateEnabled);
+ grr_TrxMgmt[trx].state=GRR_TRXMGMT_S2_SLOTACTIV_ACK;
+ grr_TrxMgmt[trx].slot=0;
+ grr_ActTrxSlot(trx,grr_TrxMgmt[trx].slot);
+ break;
+
+ case GRR_TRXMGMT_S2_SLOTACTIV_ACK:
+ //
+ //Apply sanitory Check here
+ if ( (grr_pItcRxDspMsg->buffer[4] != grr_TrxMgmt[trx].slot) ||
+ (grr_pItcRxDspMsg->buffer[4] >= 8) )
+ {
+ DBG_WARNING("grr_InitDspMsgProc: expecting trx(%d) slotAck for slot(%d) not slot(%d)\n",
+ trx, grr_TrxMgmt[trx].slot, grr_pItcRxDspMsg->buffer[4]);
+ return;
+ }
+
+ //check if got the expected msg
+ if (GRR_L1MSGCMP(GRR_L1MG_TRXMGMT,GRR_L1MT_SLOTACTIVACK_MSB,
+ GRR_L1MT_SLOTACTIVACK_LSB))
+ {
+ DBG_TRACE("grr_InitDspMsgProc: slotAct ack to trx(%d) slot(%d)\n",
+ grr_pItcRxDspMsg->buffer[3],
+ grr_pItcRxDspMsg->buffer[4]);
+
+ //Got positive ack, (trx,slot) goes into enabled state
+ grr_SetOamTrxSlotOpState(trx,grr_pItcRxDspMsg->buffer[4],opStateEnabled);
+
+
+ } else if (GRR_L1MSGCMP(GRR_L1MG_TRXMGMT,GRR_L1MT_SLOTACTIVNACK_MSB,
+ GRR_L1MT_SLOTACTIVNACK_LSB))
+ {
+ DBG_WARNING("grr_InitDspMsgProc: slotAct nack to trx(%d) slot(%d)\n",
+ grr_pItcRxDspMsg->buffer[3],
+ grr_pItcRxDspMsg->buffer[4]);
+
+ //Got negative ack, (trx,slot) goes into disabled state
+ grr_SubmitAlarm(grr_TrxSlotActNackAlarmCode[trx][slot]);
+ grr_SetOamTrxSlotOpState(trx, grr_pItcRxDspMsg->buffer[4], opStateDisabled);
+
+ } else
+ {
+ //Got unexpected message
+ DBG_WARNING("grr_InitDspMsgProc: expecting slotAck/Nack to trx(%d) slot(%d) but recved msg(%d,%d,%d,%d)\n",
+ trx,
+ grr_TrxMgmt[trx].slot,
+ grr_pItcRxDspMsg->buffer[0],
+ grr_pItcRxDspMsg->buffer[1],
+ grr_pItcRxDspMsg->buffer[2],
+ grr_pItcRxDspMsg->buffer[3]);
+ return;
+ }
+
+ //Check if all TSs of trx are initialized
+ if (grr_pItcRxDspMsg->buffer[4]==7)
+ {
+ grr_TrxMgmt[trx].state = GRR_TRXMGMT_S3_TRXCONFIG_END;
+ }
+ else
+ {
+ //Activate next time slot of this trx
+ grr_TrxMgmt[trx].slot++;
+ grr_ActTrxSlot(trx, grr_TrxMgmt[trx].slot);
+ }
+ break;
+
+ case GRR_TRXMGMT_S3_TRXCONFIG_END:
+ default:
+ //Unrecognized trx state
+ DBG_WARNING("grr_InitDspMsgProc: invalid state(%d) for trx(%d)\n",
+ grr_TrxMgmt[trx].state, trx);
+ break;
+ }
+}
+
+void grr_InitTrxMgmtData(unsigned char trx)
+{
+ DBG_FUNC("grr_InitTrxMgmtData", GRR_LAYER_INIT);
+ DBG_ENTER();
+
+ grr_TrxMgmt[trx].state = 0;
+ grr_TrxMgmt[trx].slot = 0;
+ grr_TrxMgmt[trx].tdma1 = 0;
+ grr_TrxMgmt[trx].tdma2 = 0;
+ grr_TrxMgmt[trx].tdma3 = 0;
+ grr_TrxMgmt[trx].tdma4 = 0;
+ grr_TrxMgmt[trx].done = false;
+ grr_TrxMgmt[trx].alive = true;
+
+ DBG_LEAVE();
+}
+
+//Initialize trx package
+void grr_InitOamTrxPkg(unsigned char trx)
+{
+ int length;
+
+ DBG_FUNC("grr_InitOamTrxPkg", GRR_LAYER_INIT);
+ DBG_ENTER();
+
+ //Reset operational state of all TRX-owned resources
+ grr_SetOamTrxOpState(trx, opStateDisabled);
+ grr_SetOamAllTrxSlotOpState(trx, opStateDisabled);
+ grr_SetOamTrxRcOpState(trx, opStateDisabled);
+
+ //Starting initializing trx and set its SM state to S0
+ DBG_TRACE("GRR starting the initialization of trx(%d)\n", trx);
+ printf("GRR starting the initialization of trx(%d)\n", trx);
+
+ //Initialize trx init management data
+ grr_InitTrxMgmtData(trx);
+
+ //Start init watch timer
+ grr_InitWatchTimerStart(trx);
+
+ //Configure trx and wait for its ack
+ grr_SendDspTrxConfig(trx);
+ ConfigTxPwrValues(trx);
+ grr_TrxMgmt[trx].state=GRR_TRXMGMT_S1_TRXCONFIG_ACK;
+
+ //Init Loop
+ while (true)
+ {
+ // Retrieve a message from Q
+ if ( (length = msgQReceive(grr_MsgQId,(char*)&grr_ItcRxMsg, sizeof(grr_ItcRxMsg_t), WAIT_FOREVER))
+ == ERROR )
+ {
+ //failed in calling vxWorks receive call. Underlying issue. Abort the task!
+ grr_SubmitAlarm(EC_GRR_OS_CALL_MSGQRECEIVE_FAILED);
+ DBG_ERROR("grr_InitOamTrxPkg(%d): failed to read VxWorks GRR Queue.\n",trx);
+ printf("grr_InitOamTrxPkg(%d): failed to read VxWorks GRR msg Queue\n",trx);
+ DBG_LEAVE();
+ assert(0);
+ } else
+ {
+ //Good receive! If needed dump out for debug purpose
+ if (grr_DbgDump) DBG_HEXDUMP(( unsigned char *)&grr_ItcRxMsg, length);
+
+ //Handle the message in terms of its origin, do sanitory check too!
+ grr_ItcRxOrigin = grr_ItcRxMsg.module_id;
+
+ if (grr_ItcRxOrigin == MODULE_L1)
+ {
+ //Received L1 message
+ grr_pItcRxDspMsg=(grr_ItcRxDspMsg_t *)&grr_ItcRxMsg.itcRxDspMsg;
+
+ //If needed, output trace for debugging purpose
+ DBG_TRACE("grr_InitOamTrxPkg(%d): received L1 MSG(%x,%x,%x) SRC(%x,%x,%x)\n",
+ trx,
+ grr_pItcRxDspMsg->buffer[0],
+ grr_pItcRxDspMsg->buffer[1],
+ grr_pItcRxDspMsg->buffer[2],
+ grr_pItcRxDspMsg->buffer[3],
+ grr_pItcRxDspMsg->buffer[4],
+ grr_pItcRxDspMsg->buffer[5]);
+
+ //Carry on DSP init
+ grr_InitDspMsgProc(trx);
+
+ if ( grr_InitDspOver(trx) ) break;
+
+ } else
+ {
+ DBG_WARNING("grr_InitOamTrxPkg(%d): unexpected module origin(%d)\n",
+ trx, grr_ItcRxOrigin);
+ }
+ }
+ }
+
+ grr_InitWatchTimerStop(trx);
+
+ DBG_TRACE("GRR finished the initialization of trx(%d)\n", trx);
+ printf("GRR finished the initialization of trx(%d)\n", trx);
+
+ DBG_LEAVE();
+}
+
+void grr_InitDsp(void)
+{
+ int length;
+
+ DBG_FUNC("grr_InitDsp", GRR_LAYER_INIT);
+ DBG_ENTER();
+
+ DBG_TRACE("GRR starting DSP initializatoin (swap=%d)\n",
+ OAMgrr_TRX_SWAP_SETTING);
+ printf("GRR starting DSP initializatoin (swap=%d)\n",
+ OAMgrr_TRX_SWAP_SETTING);
+
+ if (OAMgrr_TRX_SWAP_SETTING==1) //Swap two TRXs
+ l1pTrxSwap(0,1);
+
+ grr_InitWaitForDspsUpSignal();
+
+ //Decide if I-Q swap needed
+ OAMgrr_IQ_SWAP = drfIQSwapGet();
+
+ //3a. FreqHopDsp0Value = drfFreqHopGet(0) -- This function returns a True/False value
+ //3b. FreqHopDsp1Value = drfFreqHopGet(1) -- This function returns a True/False value
+ //Decide if hopping cable. If not, turn off the hopping feature. Assumed not capable now.
+ OAMgrr_HOPPING_CTRLa = 0;
+
+ //Init all trxs one by one
+ for (int i=0;i<OAMgrr_MAX_TRXS;i++)
+ {
+ grr_InitOamTrxPkg(i);
+ grr_PassOamParams(i);
+ grr_SendDspSynInf(i);
+ }
+
+ DBG_TRACE("GRR finished DSP initializatoin (swap=%d)\n",
+ OAMgrr_TRX_SWAP_SETTING);
+ printf("GRR finished DSP initializatoin (swap=%d)\n",
+ OAMgrr_TRX_SWAP_SETTING);
+
+ DBG_LEAVE();
+}
+
+void grr_InitWaitForRlcRrmGoAck(void)
+{
+ int length;
+
+ DBG_FUNC("grr_InitWaitForRlcRrmGoAck", GRR_LAYER_INIT);
+ DBG_ENTER();
+
+ bool waitForRlcGoAck=true;
+ bool waitForRrmGoAck=true;
+
+ while(waitForRlcGoAck||waitForRrmGoAck)
+ {
+ int length;
+
+ // Retrieve a message from Q
+ if ( (length = msgQReceive(grr_MsgQId,(char*)&grr_ItcRxMsg, sizeof(grr_ItcRxMsg_t), WAIT_FOREVER))
+ == ERROR )
+ {
+ //failed in calling vxWorks msgQReceive(). Abort the task!
+ grr_SubmitAlarm(EC_GRR_OS_CALL_MSGQRECEIVE_FAILED);
+ DBG_ERROR("grr_InitWaitForRlcRrmGoAck: failed to read VxWorks GRR Queue.\n");
+ printf("grr_InitWaitForRlcRrmGoAck: failed to read VxWorks GRR msg Queue\n");
+ DBG_LEAVE();
+ assert(0);
+ } else
+ {
+ //Good receive! If needed dump for debug purpose
+ if (grr_DbgDump) DBG_HEXDUMP((unsigned char*)&grr_ItcRxMsg, length);
+
+ //Handle the message in terms of its origin, do sanitory check too!
+ grr_ItcRxOrigin = grr_ItcRxMsg.module_id;
+
+ if (grr_ItcRxOrigin == MODULE_RLCMAC)
+ {
+ grr_pItcRxRlcMsg=(grr_ItcRxRlcMsg_t *)&grr_ItcRxMsg.itcRxRlcMsg;
+
+ //If needed, output trace for debugging purpose
+ DBG_TRACE("grr_InitWaitForRlcRrmGoAck: received a RLC msg (%d)\n",
+ grr_pItcRxRlcMsg->message_type);
+ if (grr_pItcRxRlcMsg->message_type == GRR_READY_TO_GO_ACK)
+ waitForRlcGoAck = false;
+
+ } else if (grr_ItcRxOrigin == MODULE_RM)
+ {
+ grr_pItcRxRrmMsg=(grr_ItcRxRrmMsg_t *)&grr_ItcRxMsg.itcRxRrmMsg;
+ DBG_TRACE("grr_InitWaitForRlcRrmGoAck: received a RRM msg (%d)\n",
+ grr_pItcRxRrmMsg->message_type);
+
+ if (grr_pItcRxRrmMsg->message_type == GRR_READY_TO_GO_ACK)
+ waitForRrmGoAck = false;
+ } else
+ {
+ DBG_WARNING("grr_InitWaitForRlcRrmGoAck: unexpected module origin(%d)\n",
+ grr_ItcRxOrigin);
+ }
+ }
+ }
+ DBG_LEAVE();
+}
+
+void grr_InitOam(void)
+{
+ DBG_FUNC("grr_InitOam", GRR_LAYER_INIT);
+ DBG_ENTER();
+
+ memset(&grr_OamData, 0, sizeof(grr_OamData));
+
+ grr_GetOamData();
+ grr_FixOamData();
+ grr_RegOamTrap();
+
+ DBG_LEAVE();
+}
+
+bool grr_GotAllDspsUpSignals(char *dsp)
+{
+ int i;
+
+ DBG_FUNC("grr_GotAllDspsUpSignals", GRR_LAYER_INIT);
+ DBG_ENTER();
+
+ for (i=0;i<OAMgrr_MAX_TRXS;i++)
+ if (!dsp[i]) break;
+
+ DBG_LEAVE();
+ return ((i>=OAMgrr_MAX_TRXS)?true:false);
+}
+
+void grr_InitWaitForDspsUpSignal(void)
+{
+ int length;
+ char dsp[OAMgrr_MAX_TRXS];
+
+ DBG_FUNC("grr_InitWaitForDspsUpSignal", GRR_LAYER_INIT);
+ DBG_ENTER();
+
+ memset(dsp, 0, OAMgrr_MAX_TRXS);
+
+ while(!grr_GotAllDspsUpSignals(dsp))
+ {
+ int length;
+
+ // Retrieve a message from Q
+ if ( (length = msgQReceive(grr_MsgQId,(char*)&grr_ItcRxMsg, sizeof(grr_ItcRxMsg_t), WAIT_FOREVER))
+ == ERROR )
+ {
+ //failed in calling vxWorks msgQReceive(). Abort the task!
+ grr_SubmitAlarm(EC_GRR_OS_CALL_MSGQRECEIVE_FAILED);
+ DBG_ERROR("grr_InitWaitForDspsUpSignal: failed to read VxWorks GRR Queue.\n");
+ printf("grr_InitWaitForDspsUpSignal: failed to read VxWorks GRR msg Queue\n");
+ DBG_LEAVE();
+ assert(0);
+ } else
+ {
+ //Good receive! If needed dump for debug purpose
+ if (grr_DbgDump) DBG_HEXDUMP((unsigned char*)&grr_ItcRxMsg, length);
+
+ //Handle the message in terms of its origin, do sanitory check too!
+ grr_ItcRxOrigin = grr_ItcRxMsg.module_id;
+
+ if (grr_ItcRxOrigin != MODULE_L1)
+ {
+ DBG_WARNING("grr_InitWaitForDspsUpSignal: unexpected module origin(%d)\n",
+ grr_ItcRxOrigin);
+ } else
+ {
+ grr_pItcRxDspMsg=(grr_ItcRxDspMsg_t *)&grr_ItcRxMsg.itcRxDspMsg;
+
+ //If needed, output trace for debugging purpose
+ DBG_TRACE("grr_InitWaitForDspsUpSignal: recv DSP msg(%x,%x,%x)) src(%x,%x,%x)\n",
+ grr_pItcRxDspMsg->buffer[0],
+ grr_pItcRxDspMsg->buffer[1],
+ grr_pItcRxDspMsg->buffer[2],
+ grr_pItcRxDspMsg->buffer[3],
+ grr_pItcRxDspMsg->buffer[4],
+ grr_pItcRxDspMsg->buffer[5]);
+
+ if (GRR_L1MSGCMP(GRR_L1MG_TRXMGMT,GRR_L1MT_BOOTSTRAPCNF_MSB,GRR_L1MT_BOOTSTRAPCNF_LSB))
+ {
+ if ( (grr_pItcRxDspMsg->buffer[3]<OAMgrr_MAX_TRXS) && !(dsp[grr_pItcRxDspMsg->buffer[3]]))
+ {
+ dsp[grr_pItcRxDspMsg->buffer[3]] = 1;
+ grr_DspCiphCap = grr_pItcRxDspMsg->buffer[4];
+
+ } else
+ DBG_WARNING("grr_InitWaitForDspsUpSignal:dsp(%d) and its bootstrap status(%d)\n",
+ grr_pItcRxDspMsg->buffer[3], dsp[grr_pItcRxDspMsg->buffer[3]]);
+ } else
+ {
+ DBG_WARNING("grr_InitWaitForDspsUpSignal: unexpected msg(%x,%x,%x) src(%x,%x,%x)\n",
+ grr_pItcRxDspMsg->buffer[0],
+ grr_pItcRxDspMsg->buffer[1],
+ grr_pItcRxDspMsg->buffer[2],
+ grr_pItcRxDspMsg->buffer[3],
+ grr_pItcRxDspMsg->buffer[4],
+ grr_pItcRxDspMsg->buffer[5]);
+ }
+
+ }
+ }
+ }
+ DBG_LEAVE();
+}
+
+void grr_Init(void)
+{
+ JC_STATUS jcRet;
+ unsigned char i;
+
+ DBG_FUNC("grr_Init", GRR_LAYER_INIT);
+ DBG_ENTER();
+
+ //Starting initialization.
+
+ //Block other GP modules
+ grr_SubmitAlarm(EC_GRR_BOOTING_UP);
+
+ grr_InitOam();
+ grr_InitDsp();
+
+ //Signify to allow RRM and RLC go
+ //grr_SendReadyToGoReq(MODULE_GRR, rlcMsgQId);
+ if (JC_OK != (jcRet=RlcMacGrrReadyToGo()) )
+ {
+ DBG_ERROR("grr_Init: RlcMacGrrReadyToGo ret code(%d)\n", jcRet);
+ assert(0);
+ }
+
+ grr_SendReadyToGoReq(MODULE_GRR, rm_MsgQId);
+
+ //Wait for RRM & RLC go cnf
+ grr_InitWaitForRlcRrmGoAck();
+
+ //Turn on radio if needed
+ grr_FirstRadioCtrl();
+
+ //Unblock other GP modules
+ grr_SubmitAlarm(EC_NOERROR);
+
+ //Initialization is done.
+
+ DBG_LEAVE();
+}
+
+#endif //__GRR_INIT_CPP__
diff --git a/data/mnet/GP10/Host/grr/src_api/Makefile b/data/mnet/GP10/Host/grr/src_api/Makefile
new file mode 100644
index 0000000..bdf7bd7
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src_api/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = grr
+THIS_DIRECTORY = Src_api
+MY_OUTPUT = $(OBJDIR)\grr_api.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/grr/src_api/grr_intf.cpp b/data/mnet/GP10/Host/grr/src_api/grr_intf.cpp
new file mode 100644
index 0000000..838e4f3
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src_api/grr_intf.cpp
@@ -0,0 +1,508 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+
+#ifndef __GRR_INTF_CPP_
+#define __GRR_INTF_CPP__
+
+#include "grr\grr_head.h"
+
+//Administrative & operational state & chan config related inquiries
+//
+AdministrativeState grr_GetBtsAmState(void)
+{
+ return(OAMgrr_BTS_AMSTATE);
+}
+
+AdministrativeState grr_GetTrxAmState(int trx)
+{
+ return(OAMgrr_TRX_AMSTATE(trx));
+}
+
+AdministrativeState grr_GetTrxSlotAmState(int trx, int slot)
+{
+ return(OAMgrr_TRX_SLOT_AMSTATE(trx,slot));
+}
+
+EnableDisable grr_GetBtsOpState(void)
+{
+ return(OAMgrr_BTS_OPSTATE);
+}
+
+EnableDisable grr_GetTrxOpState(int trx)
+{
+ return(OAMgrr_TRX_OPSTATE(trx));
+}
+
+EnableDisable grr_GetTrxSlotOpState(int trx, int slot)
+{
+ return(OAMgrr_TRX_SLOT_OPSTATE(trx,slot));
+}
+
+bool grr_IsPccchExisting(int *trx, int* slot, int* comb)
+{
+ bool ret;
+ unsigned char i, j;
+
+ *trx = *slot = 0;
+ *comb = OAMgrr_TRX_SLOT_COMB(0,0);
+ ret=false;
+
+ for (i=0;i<OAMgrr_MAX_TRXS;i++)
+ for (j=0;j<8;j++)
+ {
+ if ( (OAMgrr_TRX_SLOT_COMB(i,j)==OAMgrr_SLOT_COMB_11) ||
+ (OAMgrr_TRX_SLOT_COMB(i,j)==OAMgrr_SLOT_COMB_12) )
+ {
+ *trx = i; *slot = j;
+ *comb = OAMgrr_TRX_SLOT_COMB(i,j);
+ ret = true;
+ break;
+ }
+ }
+
+ return ret;
+}
+
+int grr_GetTrxSlotChanComb(int trx, int slot)
+{
+ return(OAMgrr_TRX_SLOT_CHANCOMB(trx,slot));
+}
+
+int grr_GetTrxSlotTsc(int trx, int slot)
+{
+ return(OAMgrr_TRX_SLOT_TSC(trx,slot));
+}
+
+int grr_GetTrxSlotArfcn(int trx, int slot)
+{
+ return(OAMgrr_TRX_SLOT_ARFCN(trx,slot));
+}
+
+int grr_getBtsGprsNetworkMode(void)
+{
+ return (OAMgrr_GPRS_NETWORK_MODE);
+}
+
+bool grr_IsBtsAmTypeBlocked(void)
+{
+ return ( (OAMgrr_BTS_AMSTATE != unlocked) ||
+ (OAMgrr_TRX_AMSTATE(0) != unlocked) ||
+ (OAMgrr_TRX_SLOT_AMSTATE(0,0) != unlocked) );
+
+}
+
+bool grr_IsBtsOpTypeBlocked(void)
+{
+ return (OAMgrr_BTS_OPSTATE!=opStateEnabled);
+}
+
+bool grr_IsBtsBlocked(void)
+{
+ return(grr_IsBtsAmTypeBlocked()||grr_IsBtsOpTypeBlocked());
+}
+
+bool grr_IsBtsGprsFeatureActive(void)
+{
+ return (OAMgrr_GPRS_FEATURE_SETTING);
+}
+
+bool grr_IsBtsCbFeatureActive(void)
+{
+ return (OAMgrr_CB_FEATURE_SETTING);
+}
+
+
+//Update application modules i.e. RLC, RRM with current setting
+//
+void grr_SendTrxSlotChanComb(int src_module, MSG_Q_ID dst_q, int trx, int slot, int chanComb)
+{
+ DBG_FUNC("grr_SendTrxSlotChanComb", GRR_LAYER_INTF);
+ DBG_ENTER();
+
+ grr_SendMsg(src_module, dst_q, GRR_TRX_SLOT_CHANCOMB, trx, slot, chanComb);
+
+ DBG_TRACE("grr_SendTrxSlotChanComb: src(%d) dst(%p) trx(%d) slot(%d) msg(%d) chanComb(%d)\n",
+ src_module, dst_q, trx, slot, GRR_TRX_SLOT_CHANCOMB, chanComb);
+}
+
+void grr_SendGprsFeatureSetting(int src_module, MSG_Q_ID dst_q)
+{
+ STATUS ret;
+ grr_ItcMsg_t msg;
+
+ DBG_FUNC("grr_SendGprsFeatureSetting", GRR_LAYER_INTF);
+ DBG_ENTER();
+
+ grr_SendMsg(src_module, dst_q, GRR_GPRS_FEATURE_CONTROL,0,0,OAMgrr_GPRS_FEATURE_SETTING);
+
+ DBG_TRACE("grr_SendGprsFeatureSetting: src(%d) dst(%p) setting(%d)\n",
+ src_module, dst_q, OAMgrr_GPRS_FEATURE_SETTING);
+
+ DBG_LEAVE();
+}
+
+
+void grr_SendCbFeatureSetting(int src_module, MSG_Q_ID dst_q)
+{
+ STATUS ret;
+ grr_ItcMsg_t msg;
+
+ DBG_FUNC("grr_SendCbFeatureSetting", GRR_LAYER_INTF);
+ DBG_ENTER();
+
+ grr_SendMsg(src_module, dst_q, GRR_CB_FEATURE_CONTROL, 0, 0, OAMgrr_CB_FEATURE_SETTING);
+
+ DBG_TRACE("grr_SendCbFeatureSetting: src(%d) dst(%p) setting(%d)\n",
+ src_module, dst_q, OAMgrr_CB_FEATURE_SETTING);
+
+ DBG_LEAVE();
+}
+
+void grr_SendReadyToGoReq(int src_module, MSG_Q_ID dst_q)
+{
+ STATUS ret;
+ grr_ItcMsg_t msg;
+
+ DBG_FUNC("grr_SendReadyToGoReq", GRR_LAYER_INTF);
+ DBG_ENTER();
+
+ grr_SendMsg(src_module, dst_q, GRR_READY_TO_GO_REQ, 0, 0, 0);
+
+ DBG_TRACE("grr_SendReadyToGoReq: src(%d) dst(%p)\n", src_module, dst_q);
+
+ DBG_LEAVE();
+
+}
+
+void grr_SendReadyToGoAck(int src_module, MSG_Q_ID dst_q)
+{
+ STATUS ret;
+ grr_ItcMsg_t msg;
+
+ DBG_FUNC("grr_SendReadyToGoAck", GRR_LAYER_INTF);
+ DBG_ENTER();
+
+ grr_SendMsg(src_module, dst_q, GRR_READY_TO_GO_ACK, 0, 0, 0);
+
+ DBG_TRACE("grr_SendReadyToGoAck: src(%d) dst(%p)\n", src_module, dst_q);
+
+ DBG_LEAVE();
+}
+
+//Administrative State related operations: requests and acknowledgements
+//
+//void grr_SendBtsLockReq (int src_module, MSG_Q_ID dst_q);
+//void grr_SendBtsUnlockReq (int src_module, MSG_Q_ID dst_q);
+//void grr_SendBtsShutdownReq (int src_module, MSG_Q_ID dst_q);
+//void grr_SendBtsLockAck (int src_module, MSG_Q_ID dst_q);
+//void grr_SendBtsUnlockAck (int src_module, MSG_Q_ID dst_q);
+//void grr_SendBtsShutdownAck (int src_module, MSG_Q_ID dst_q);
+
+//void grr_SendTrxLockReq (int src_module, MSG_Q_ID dst_q, int trx);
+//void grr_SendTrxUnlockReq (int src_module, MSG_Q_ID dst_q, int trx);
+//void grr_SendTrxShutdownReq (int src_module, MSG_Q_ID dst_q, int trx);
+//void grr_SendTrxLockAck (int src_module, MSG_Q_ID dst_q, int trx);
+//void grr_SendTrxUnlockAck (int src_module, MSG_Q_ID dst_q, int trx);
+//void grr_SendTrxShutdownAck (int src_module, MSG_Q_ID dst_q, int trx);
+
+void grr_SendTrxSlotLockReq (int src_module, MSG_Q_ID dst_q, int trx, int slot)
+{
+ STATUS ret;
+ grr_ItcMsg_t msg;
+
+ DBG_FUNC("grr_SendTrxSlotLockReq", GRR_LAYER_INTF);
+ DBG_ENTER();
+
+ grr_SendMsg(src_module, dst_q, GRR_TRX_SLOT_LOCK_REQ, trx, slot, 0);
+
+ DBG_TRACE("grr_SendTrxSlotLockReq: src(%d) dst(%d) trx(%d) slot(%d) msg(%d)\n",
+ src_module, dst_q, trx, slot, GRR_TRX_SLOT_LOCK_REQ);
+
+ DBG_LEAVE();
+}
+
+void grr_SendTrxSlotShutdownReq(int src_module, MSG_Q_ID dst_q, int trx, int slot)
+{
+ STATUS ret;
+ grr_ItcMsg_t msg;
+
+ DBG_FUNC("grr_SendTrxSlotShutdownReq", GRR_LAYER_INTF);
+ DBG_ENTER();
+
+ grr_SendMsg(src_module, dst_q, GRR_TRX_SLOT_SHUTDOWN_REQ, trx, slot, 0);
+
+ DBG_TRACE("grr_SendTrxSlotShutdownReq: src(%d) dst(%d) trx(%d) slot(%d) msg(%d)\n",
+ src_module, dst_q, trx, slot, GRR_TRX_SLOT_SHUTDOWN_REQ);
+
+ DBG_LEAVE();
+}
+
+void grr_SendTrxSlotLockAck(int src_module, MSG_Q_ID dst_q, int trx, int slot)
+{
+ STATUS ret;
+ grr_ItcMsg_t msg;
+
+ DBG_FUNC("grr_SendTrxSlotLockAck", GRR_LAYER_INTF);
+ DBG_ENTER();
+
+ grr_SendMsg(src_module, dst_q, GRR_TRX_SLOT_LOCK_ACK, trx, slot, 0);
+
+ DBG_TRACE("grr_SendTrxSlotLockAck: src(%d) dst(%d) trx(%d) slot(%d) msg(%d)\n",
+ src_module, dst_q, trx, slot, GRR_TRX_SLOT_LOCK_ACK);
+
+ DBG_LEAVE();
+}
+
+void grr_SendTrxSlotShutdownAck (int src_module, MSG_Q_ID dst_q, int trx, int slot)
+{
+ STATUS ret;
+ grr_ItcMsg_t msg;
+
+ DBG_FUNC("grr_SendTrxSlotShutdownAck", GRR_LAYER_INTF);
+ DBG_ENTER();
+
+ grr_SendMsg(src_module, dst_q, GRR_TRX_SLOT_SHUTDOWN_ACK, trx, slot, 0);
+
+ DBG_TRACE("grr_SendTrxSlotShutdownAck: src(%d) dst(%d) trx(%d) slot(%d) msg(%d)\n",
+ src_module, dst_q, trx, slot, GRR_TRX_SLOT_SHUTDOWN_ACK);
+
+ DBG_LEAVE();
+
+}
+
+//void grr_SendTrxSlotUnlockAck(int src_module, MSG_Q_ID dst_q, int trx, int slot);
+//void grr_SendTrxSlotUnlockReq(int src_module, MSG_Q_ID dst_q, int trx, int slot);
+
+void grr_SendCbCfgSetting(int src_module, MSG_Q_ID dst_q)
+{
+ DBG_FUNC("grr_SendCbCfgSetting", GRR_LAYER_INTF);
+ DBG_ENTER();
+
+ grr_SendMsg(src_module, dst_q, GRR_CB_FEATURE_CONTROL, 0, 0, OAMgrr_CB_FEATURE_SETTING);
+
+ DBG_TRACE("grr_SendCbCfgSetting: src(%d) dst(%d) msg(%d) setting(%d)\n",
+ src_module, dst_q, GRR_CB_FEATURE_CONTROL, OAMgrr_CB_FEATURE_SETTING);
+
+ DBG_LEAVE();
+}
+
+
+//Messaging related to radio resource scheduling
+//
+//void grr_ReportRadioResUsage (int src_module, MSG_Q_ID dst_q);
+//void grr_GetRadioResRelCandiate (int *trx, int *slot);
+
+//void grr_OverloadedCellBarOff(void)
+//{
+// DBG_FUNC("grr_OverloadedCellBarOff", GRR_LAYER_INTF);
+// DBG_ENTER();
+
+// if ( (OAMgrr_BTS_AMSTATE==unlocked) &&
+// (OAMgrr_TRX_AMSTATE(0)==unlocked) &&
+// (OAMgrr_CHN_AMSTATE(0,0)==unlocked) )
+// {
+// grr_PassOamMsSystemInformation2(0,GRR_L1SI_TYPE_2,OAMgrr_RA_CELL_BARRED_STATE);
+// grr_PassOamMsSystemInformation3(0,GRR_L1SI_TYPE_3,OAMgrr_RA_CELL_BARRED_STATE);
+// grr_PassOamMsSystemInformation4(0,GRR_L1SI_TYPE_4,OAMgrr_RA_CELL_BARRED_STATE);
+// }
+//
+// DBG_LEAVE();
+//}
+
+T_CNI_RIL3_ACCESS_TECHNOLOGY_TYPE grr_GetRadioAccessTechnology(void)
+{
+ T_CNI_RIL3_ACCESS_TECHNOLOGY_TYPE sys = CNI_RIL3_ACCESS_TECHNOLOGY_TYPE_UNKNOWN;
+
+ DBG_FUNC("grr_GetRadioAccessTechnology", GRR_LAYER_INTF);
+ DBG_ENTER();
+
+ switch(OAMgrr_GSMDCS_INDICATOR)
+ {
+ case gsm: //0
+ sys = CNI_RIL3_ACCESS_TECHNOLOGY_TYPE_GSM_P;
+ break;
+ case extendedgsm: //1
+ sys = CNI_RIL3_ACCESS_TECHNOLOGY_TYPE_GSM_E;
+ break;
+ case dcs: //2
+ sys = CNI_RIL3_ACCESS_TECHNOLOGY_TYPE_GSM_1800;
+ break;
+ case pcs1900: //3
+ sys = CNI_RIL3_ACCESS_TECHNOLOGY_TYPE_GSM_1900;
+ break;
+ //case gsmr: //4
+ // sys = CNI_RIL3_ACCESS_TECHNOLOGY_TYPE_GSM_R;
+ // break;
+ }
+ DBG_LEAVE();
+ return sys;
+}
+
+
+short grr_DecideCipherAlgo(
+ T_CNI_RIL3_IE_CIPHER_MODE_SETTING *setting,
+ T_CNI_RIL3_IE_MS_CLASSMARK_2 *classmark2)
+{
+ short algo = 0;
+
+ DBG_FUNC("grr_DecideCipherAlgo", GRR_LAYER_INTF);
+ DBG_ENTER();
+
+ setting->ciphering = CNI_RIl3_CIPHER_START_CIPHERING;
+
+ DBG_TRACE("grr_DecideCipherAlgo: dspCiphCap(%x)\n", grr_DspCiphCap);
+
+ if ( !classmark2->a51 && GRR_DSPA51(grr_DspCiphCap) )
+ {
+ algo = 1;
+ setting->algorithm = CNI_RIL3_CIPHER_ALGORITHM_A51;
+ } else if (classmark2->a52 && GRR_DSPA52(grr_DspCiphCap) )
+ {
+ algo = 2;
+ setting->algorithm = CNI_RIL3_CIPHER_ALGORITHM_A52;
+ } else
+ {
+ algo = 0;
+ setting->ciphering =CNI_RIl3_CIPHER_NO_CIPHERING;
+ }
+
+ DBG_LEAVE();
+ return (algo);
+}
+
+//GRR always call this func to submit alarms
+void grr_SubmitAlarm(Alarm_errorCode_t code)
+{
+ STATUS ret;
+ JC_STATUS jcRet;
+
+ DBG_FUNC("grr_SubmitAlarm", GRR_LAYER_ALARM);
+ DBG_ENTER();
+
+ DBG_TRACE("grr_SubmitAlarm: submit alarm code(%d)\n", code);
+
+ if (code != EC_NOERROR)
+ {
+ if (JC_OK!=alarm_raise(MODULE_GRR, MIB_errorCode_GRR, code))
+ {
+ //This is very critical, should abort GRR task here !
+ DBG_ERROR("grr_SubmitAlarm: alarm_raise failed to raise alarm(%d)\n", code);
+ printf("grr_SubmitAlarm: alarm_raise failed to raise alarm(%d)\n", code);
+ assert(0);
+ }
+ } else
+ {
+ if (JC_OK!=alarm_clear(MODULE_GRR, MIB_errorCode_GRR, code))
+ {
+ //This is very critical, should abort GRR task here <TBD>!!!
+ DBG_ERROR("grr_SubmitAlarm: alarm_clear failed to clear an alarm\n");
+ printf("grr_SubmitAlarm: alarm_clear failed to clear an alarm\n");
+ assert(0);
+ }
+ }
+
+ //Remember it if it is a critical alarm
+ if (code < EC_GRR_INFO_BASE)
+ {
+ //btsOpState goes disabled for a critical alarm
+ if (code == EC_NOERROR)
+ {
+ if (OAMgrr_BTS_OPSTATE == opStateDisabled)
+ {
+ DBG_TRACE("grr_SubmitAlarm: inform RLC_MAC of bts op enabled (op %d, alarm %d)\n",
+ OAMgrr_BTS_OPSTATE, code);
+ if (JC_OK != (jcRet=RlcMacGPOpState(opStateEnabled)))
+ DBG_ERROR("grr_SubmitAlarm: RlcMacGPOpState() err(%d)\n", jcRet);
+ }
+ OAMgrr_BTS_OPSTATEa = opStateEnabled;
+ } else
+ {
+ if (OAMgrr_BTS_OPSTATE == opStateEnabled)
+ {
+ DBG_TRACE("grr_SubmitAlarm: inform RLC_MAC of bts op disabled (op %d, alarm %d)\n",
+ OAMgrr_BTS_OPSTATE, code);
+ if (JC_OK != (jcRet=RlcMacGPOpState(opStateDisabled)))
+ DBG_ERROR("grr_SubmitAlarm: RlcMacGPOpState() err(%d)\n", jcRet);
+ }
+ OAMgrr_BTS_OPSTATEa = opStateDisabled;
+ }
+ }
+
+ DBG_LEAVE();
+}
+
+void grr_SendMsg(int src_module, MSG_Q_ID dst_q, grr_MessageType_t msgType,
+ int trx, int slot, int ctrl)
+{
+ STATUS ret;
+ grr_ItcMsg_t msg;
+
+
+ DBG_FUNC("grr_SendMsg", GRR_LAYER_INTF);
+ DBG_ENTER();
+
+ msg.module_id = (unsigned char) src_module;
+ msg.message_type = msgType;
+ msg.trx = (unsigned char) trx;
+ msg.slot = (unsigned char) slot;
+ msg.feat_ctrl = (unsigned char) ctrl;
+
+ //
+ if (STATUS_OK != (ret = msgQSend(dst_q, (char*)&msg,
+ sizeof(grr_ItcMsg_t), NO_WAIT, MSG_PRI_NORMAL) ) )
+ {
+ grr_SubmitAlarm(EC_GRR_OS_CALL_MSGQSEND_FAILED);
+ DBG_ERROR(" grr_SendMsg: msgQSend failed Q(%x) ret(%d) errno(%d)\n",
+ dst_q, ret, errno);
+ printf(" grr_SendMsg: msgQSend failed Q(%x) ret(%d) errno(%d)\n",
+ dst_q, ret, errno);
+ assert(0);
+ }
+
+ DBG_LEAVE();
+
+}
+
+void grr_SendMsgFromL1ToGrr(unsigned short length, unsigned char* buf)
+{
+ STATUS ret;
+ grr_ItcMsg_t msg;
+
+ DBG_FUNC("grr_SendMsgFromL1ToGrr", GRR_LAYER_INTF);
+ DBG_ENTER();
+
+ //Check if buf[3] i.e. trx and length valid
+ if ( (buf[3]>=OAMgrr_MAX_TRXS) || (length<4) )
+ {
+ DBG_WARNING("grr_SendMsgFromL1ToGrr: invalid trx(%d) or length(%d)\n",
+ buf[3], length);
+ return;
+ }
+
+ msg.module_id = MODULE_L1;
+ memcpy(msg.buffer, buf, length);
+
+ if (grr_DbgDump) DBG_HEXDUMP(buf, length);
+
+ if (STATUS_OK != (ret = msgQSend(grr_MsgQId, (char*) &msg, sizeof(grr_ItcMsg_t),
+ WAIT_FOREVER, MSG_PRI_NORMAL) ) )
+ {
+ grr_SubmitAlarm(EC_GRR_OS_CALL_MSGQSEND_FAILED);
+ DBG_ERROR("grr_SendMsgFromL1ToGrr: msgQSend failed, Queue(%p) ret(%d) errno(%d)\n",
+ grr_MsgQId, ret, errno);
+ printf("grr_SendMsgFromL1ToGrr: msgQSend failed, Queue(%p) ret(%d) errno(%d)\n",
+ grr_MsgQId, ret, errno);
+ assert(0);
+ }
+
+ DBG_LEAVE();
+}
+
+#endif //__GRR_INTF_CPP__
+
diff --git a/data/mnet/GP10/Host/grr/src_init/Makefile b/data/mnet/GP10/Host/grr/src_init/Makefile
new file mode 100644
index 0000000..2733b91
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src_init/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = grr
+THIS_DIRECTORY = Src_init
+MY_OUTPUT = $(OBJDIR)\grr_init.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/grr/src_init/grr_glob.cpp b/data/mnet/GP10/Host/grr/src_init/grr_glob.cpp
new file mode 100644
index 0000000..63432e8
--- /dev/null
+++ b/data/mnet/GP10/Host/grr/src_init/grr_glob.cpp
@@ -0,0 +1,206 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __GRR_GLOB_CPP__
+#define __GRR_GLOB_CPP__
+
+#include "grr\grr_head.h"
+
+//G2TEST
+int grr_DbgDump=0;
+int grr_GprsCtrl=0;
+
+JCTask grrTaskObj("grrTask");
+JCTask grrMonTaskObj("grrMonTask");
+
+unsigned char grr_DspCiphCap=0;
+
+grr_OamData_t grr_OamData;
+grr_TrxMgmt_t grr_TrxMgmt[OAMgrr_MAX_TRXS];
+MSG_Q_ID grr_MsgQId;
+Alarm_errorCode_t grr_CurAlarm;
+
+unsigned char grr_ItcRxOrigin;
+grr_ItcRxMsg_t grr_ItcRxMsg;
+
+grr_ItcRxDspMsg_t *grr_pItcRxDspMsg;
+grr_ItcRxRlcMsg_t *grr_pItcRxRlcMsg;
+grr_ItcRxGrrMsg_t *grr_pItcRxGrrMsg;
+grr_ItcRxOamMsg_t *grr_pItcRxOamMsg;
+grr_ItcRxRrmMsg_t *grr_pItcRxRrmMsg;
+
+T_CNI_RIL3RRM_MSG grr_Msg;
+
+grr_Si2_t grr_Si2;
+grr_Si3_t grr_Si3;
+grr_Si4_t grr_Si4;
+grr_Si5_t grr_Si5;
+grr_Si6_t grr_Si6;
+grr_Si13_t grr_Si13;
+
+
+//OAM tables definitions
+//
+const unsigned short grr_phTrxSelectBit[2]= {0x0000,0x4000}; //b14
+const unsigned short grr_phTrxSynthSelectBit[2] = {0x0000,0x8000}; //b15
+const unsigned short grr_phTrxHoppingSelectBit[2] = {0x0000,0x2000}; //b13
+const unsigned short grr_phTrxPwrSelectBit[2] = {0x0000,0x1000}; //b12
+
+//Tables in Basic Package
+CellAllocationEntry cellAllocationTable[CellAllocationTableLimit];
+PlmnPermittedEntry plmnPermittedTable[PlmnPermittedTableLimit];
+
+//Table in Option Package
+NotAllowedAccessClassEntry notAllowedAccessClassTable[NotAllowedAccessClassTableLimit];
+
+//Table in TRX packages
+ChannelEntry firstTrxPackageChannelTable[ChannelTableLimit];
+ChannelEntry secondTrxPackageChannelTable[ChannelTableLimit];
+
+CarrierFrequencyEntry firstRadioCarrierPackageFrequencyListTable[CarrierFrequencyTableLimit];
+CarrierFrequencyEntry secondRadioCarrierPackageFrequencyListTable[CarrierFrequencyTableLimit];
+
+//Tables in AdjCell Packages
+AdjCell_HandoverEntry adjCell_HandoverTable[HandoverTableLimit];
+AdjCell_HandoverEntry adjCell_HandoverTable_t[HandoverTableLimit];
+AdjCell_ReselectionEntry adjCell_ReselectionTable[ReselectionTableLimit];
+
+//A complete list of GRR-raised alarms from reference
+
+//Section I: critical alarms
+
+//EC_GRR_BOOTING_UP
+
+//EC_GRR_OS_CALL_WDCREATE_FAILED
+//EC_GRR_OS_CALL_WDSTART_FAILED
+//EC_GRR_OS_CALL_MSGQCREATE_FAILED
+//EC_GRR_OS_CALL_MSGQRECEIVE_FAILED
+//EC_GRR_OS_CALL_MSGQSEND_FAILED
+
+//EC_GRR_OAM_CALL_SETMIBINTVAR_FAILED
+//EC_GRR_OAM_CALL_SETTBLENTRYFIELD_FAILED
+//EC_GRR_OAM_CALL_GETMIBSTRUCT_FAILED
+//EC_GRR_OAM_CALL_GETMIBTBL_FAILED
+//EC_GRR_OAM_CALL_UNSETTRAPBYMODULE_FAILED
+//EC_GRR_OAM_CALL_SETTRAP_FAILED
+
+//EC_GRR_RIL3_CALL_RRM_ENCODER_FAILED
+
+//EC_GRR_BTS_LOCKED
+//EC_GRR_BTS_UNLOCKED
+//EC_GRR_BTS_SHUTTINGDOWN
+//EC_GRR_MIB_INVALID_CB_CONFIG
+
+const Alarm_errorCode_t
+ grr_DspNotResponding[OAMgrr_MAX_TRXS]
+ = {EC_GRR_DSP_1_NOT_RESPONDING, EC_GRR_DSP_2_NOT_RESPONDING};
+
+const Alarm_errorCode_t
+ grr_DspNotTickingAnyMore[OAMgrr_MAX_TRXS]
+ = {EC_GRR_DSP_1_NOT_TICKING, EC_GRR_DSP_2_NOT_TICKING};
+
+const Alarm_errorCode_t
+ grr_DspInitWatchTimerExpiredAlarmCode[OAMgrr_MAX_TRXS]
+ = {EC_GRR_DSP_1_INIT_WATCH_TIMER_EXPIRED, EC_GRR_DSP_2_INIT_WATCH_TIMER_EXPIRED};
+
+const Alarm_errorCode_t
+ grr_TrxSlotActNackAlarmCode[OAMgrr_MAX_TRXS][8]
+ = { {EC_GRR_TRX_1_SLOT_1_ACT_NACK, EC_GRR_TRX_1_SLOT_2_ACT_NACK,
+ EC_GRR_TRX_1_SLOT_3_ACT_NACK, EC_GRR_TRX_1_SLOT_4_ACT_NACK,
+ EC_GRR_TRX_1_SLOT_5_ACT_NACK, EC_GRR_TRX_1_SLOT_6_ACT_NACK,
+ EC_GRR_TRX_1_SLOT_7_ACT_NACK, EC_GRR_TRX_1_SLOT_8_ACT_NACK
+ },
+
+ {EC_GRR_TRX_2_SLOT_1_ACT_NACK, EC_GRR_TRX_2_SLOT_2_ACT_NACK,
+ EC_GRR_TRX_2_SLOT_3_ACT_NACK, EC_GRR_TRX_2_SLOT_4_ACT_NACK,
+ EC_GRR_TRX_2_SLOT_5_ACT_NACK, EC_GRR_TRX_2_SLOT_6_ACT_NACK,
+ EC_GRR_TRX_2_SLOT_7_ACT_NACK, EC_GRR_TRX_2_SLOT_8_ACT_NACK
+ }
+ };
+
+
+//Section II: Informational Alarms
+
+//Informational alarms related to trx slot channel combination change
+const Alarm_errorCode_t
+ grr_TrxSlotChanCombChangeAlarmCode[OAMgrr_MAX_TRXS][8]
+ = { {EC_GRR_TRX_1_SLOT_1_CHANCOMB_CHANGED, EC_GRR_TRX_1_SLOT_2_CHANCOMB_CHANGED,
+ EC_GRR_TRX_1_SLOT_3_CHANCOMB_CHANGED, EC_GRR_TRX_1_SLOT_4_CHANCOMB_CHANGED,
+ EC_GRR_TRX_1_SLOT_5_CHANCOMB_CHANGED, EC_GRR_TRX_1_SLOT_6_CHANCOMB_CHANGED,
+ EC_GRR_TRX_1_SLOT_7_CHANCOMB_CHANGED, EC_GRR_TRX_1_SLOT_8_CHANCOMB_CHANGED
+ },
+
+ {EC_GRR_TRX_2_SLOT_1_CHANCOMB_CHANGED, EC_GRR_TRX_2_SLOT_2_CHANCOMB_CHANGED,
+ EC_GRR_TRX_2_SLOT_3_CHANCOMB_CHANGED, EC_GRR_TRX_2_SLOT_4_CHANCOMB_CHANGED,
+ EC_GRR_TRX_2_SLOT_5_CHANCOMB_CHANGED, EC_GRR_TRX_2_SLOT_6_CHANCOMB_CHANGED,
+ EC_GRR_TRX_2_SLOT_7_CHANCOMB_CHANGED, EC_GRR_TRX_2_SLOT_8_CHANCOMB_CHANGED
+ }
+ };
+
+
+//Informational alarm related to administrative state operations of radio resoureces
+const Alarm_errorCode_t
+ grr_TrxAmStateLockedAlarmCode[OAMgrr_MAX_TRXS]
+ = {EC_GRR_TRX_1_LOCKED,EC_GRR_TRX_2_LOCKED};
+
+const Alarm_errorCode_t
+ grr_TrxAmStateUnlockedAlarmCode[OAMgrr_MAX_TRXS]
+ = {EC_GRR_TRX_1_UNLOCKED,EC_GRR_TRX_2_UNLOCKED};
+
+const Alarm_errorCode_t
+ grr_TrxAmStateShuttingdownAlarmCode[OAMgrr_MAX_TRXS]
+ = {EC_GRR_TRX_1_SHUTTINGDOWN,EC_GRR_TRX_2_SHUTTINGDOWN};
+
+const Alarm_errorCode_t
+ grr_TrxAmStateInvalidAlarmCode[OAMgrr_MAX_TRXS]
+ = {EC_GRR_TRX_1_AMSTATE_INVALID,EC_GRR_TRX_2_AMSTATE_INVALID};
+
+const Alarm_errorCode_t
+ grr_TrxSlotAmStateLockedAlarmCode[OAMgrr_MAX_TRXS][8]
+ = {
+ {EC_GRR_TRX_1_SLOT_1_LOCKED, EC_GRR_TRX_1_SLOT_2_LOCKED,
+ EC_GRR_TRX_1_SLOT_3_LOCKED, EC_GRR_TRX_1_SLOT_4_LOCKED,
+ EC_GRR_TRX_1_SLOT_5_LOCKED, EC_GRR_TRX_1_SLOT_6_LOCKED,
+ EC_GRR_TRX_1_SLOT_7_LOCKED, EC_GRR_TRX_1_SLOT_8_LOCKED},
+
+ {EC_GRR_TRX_2_SLOT_1_LOCKED, EC_GRR_TRX_2_SLOT_2_LOCKED,
+ EC_GRR_TRX_2_SLOT_3_LOCKED, EC_GRR_TRX_2_SLOT_4_LOCKED,
+ EC_GRR_TRX_2_SLOT_5_LOCKED, EC_GRR_TRX_2_SLOT_6_LOCKED,
+ EC_GRR_TRX_2_SLOT_7_LOCKED, EC_GRR_TRX_2_SLOT_8_LOCKED}
+ };
+
+const Alarm_errorCode_t
+ grr_TrxSlotAmStateUnlockedAlarmCode[OAMgrr_MAX_TRXS][8]
+ = {
+ {EC_GRR_TRX_1_SLOT_1_UNLOCKED, EC_GRR_TRX_1_SLOT_2_UNLOCKED,
+ EC_GRR_TRX_1_SLOT_3_UNLOCKED, EC_GRR_TRX_1_SLOT_4_UNLOCKED,
+ EC_GRR_TRX_1_SLOT_5_UNLOCKED, EC_GRR_TRX_1_SLOT_6_UNLOCKED,
+ EC_GRR_TRX_1_SLOT_7_UNLOCKED, EC_GRR_TRX_1_SLOT_8_UNLOCKED},
+
+ {EC_GRR_TRX_2_SLOT_1_UNLOCKED, EC_GRR_TRX_2_SLOT_2_UNLOCKED,
+ EC_GRR_TRX_2_SLOT_3_UNLOCKED, EC_GRR_TRX_2_SLOT_4_UNLOCKED,
+ EC_GRR_TRX_2_SLOT_5_UNLOCKED, EC_GRR_TRX_2_SLOT_6_UNLOCKED,
+ EC_GRR_TRX_2_SLOT_7_UNLOCKED, EC_GRR_TRX_2_SLOT_8_UNLOCKED}
+ };
+
+const Alarm_errorCode_t
+ grr_TrxSlotAmStateShuttingdownAlarmCode[OAMgrr_MAX_TRXS][8]
+ = {
+ {EC_GRR_TRX_1_SLOT_1_SHUTTINGDOWN, EC_GRR_TRX_1_SLOT_2_SHUTTINGDOWN,
+ EC_GRR_TRX_1_SLOT_3_SHUTTINGDOWN, EC_GRR_TRX_1_SLOT_4_SHUTTINGDOWN,
+ EC_GRR_TRX_1_SLOT_5_SHUTTINGDOWN, EC_GRR_TRX_1_SLOT_6_SHUTTINGDOWN,
+ EC_GRR_TRX_1_SLOT_7_SHUTTINGDOWN, EC_GRR_TRX_1_SLOT_8_SHUTTINGDOWN},
+
+ {EC_GRR_TRX_2_SLOT_1_SHUTTINGDOWN, EC_GRR_TRX_2_SLOT_2_SHUTTINGDOWN,
+ EC_GRR_TRX_2_SLOT_3_SHUTTINGDOWN, EC_GRR_TRX_2_SLOT_4_SHUTTINGDOWN,
+ EC_GRR_TRX_2_SLOT_5_SHUTTINGDOWN, EC_GRR_TRX_2_SLOT_6_SHUTTINGDOWN,
+ EC_GRR_TRX_2_SLOT_7_SHUTTINGDOWN, EC_GRR_TRX_2_SLOT_8_SHUTTINGDOWN}
+ };
+
+
+#endif //__GRR_GLOB_CPP__
diff --git a/data/mnet/GP10/Host/gslink/Makefile b/data/mnet/GP10/Host/gslink/Makefile
new file mode 100644
index 0000000..c0525a0
--- /dev/null
+++ b/data/mnet/GP10/Host/gslink/Makefile
@@ -0,0 +1,17 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ copy bin\*.out $(TOP_OF_VOB)\bin\*.out
+
diff --git a/data/mnet/GP10/Host/gslink/include/gslink.h b/data/mnet/GP10/Host/gslink/include/gslink.h
new file mode 100644
index 0000000..8a69a25
--- /dev/null
+++ b/data/mnet/GP10/Host/gslink/include/gslink.h
@@ -0,0 +1,78 @@
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : gslink.h *
+ * *
+ * Description : The GSLink subsystem [Link between GP-10 & the GS] *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |01/25/01 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+#ifndef GSLINK_HDR_INCLUDE
+#define GSLINK_HDR_INCLUDE
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <vxworks.h>
+#include <string.h>
+#include <assert.h>
+#include "ril3/ie_cell_id.h"
+#include "ril3/ie_location_area_id.h"
+#include "ril3/ril3_gmm_msg.h"
+#include "AlarmCode.h"
+#include "logging/vcmodules.h"
+#include "logging/vclogging.h"
+#include "gplink/gplink_prot.h"
+
+/* common for all platforms */
+#include "Os/JCModule.h"
+#include "Os/JCTask.h"
+
+/* common for GS */
+#include "GP10OsTune.h"
+#include "GP10MsgTypes.h"
+#include "MnetModuleId.h"
+
+
+#define GSLINK_MAX_IP_STRLEN 32
+
+typedef enum {
+
+ GSLINK_LINK_CONNECTED,
+ GSLINK_LINK_DOWN
+
+} GSLINK_LINK_EVENT;
+
+
+
+typedef struct {
+ T_CNI_RIL3_IE_CELL_ID cell_id;
+ T_CNI_RIL3_IE_LOCATION_AREA_ID location_area_id;
+ T_CNI_RIL3_IE_ROUTING_AREA_ID routing_area_id;
+ char gs_addr_str[GSLINK_MAX_IP_STRLEN];
+ BOOL connected;
+ BOOL registered;
+ int client_socket;
+} GSLINK_CONFIGURATION;
+
+/*
+ * gslink_initialize_client
+ */
+BOOL gslink_initialize_client(void);
+void gslink_client_task(void);
+BOOL gslink_register_client(void);
+BOOL gslink_is_ack(UINT8 *rx_buff,int len);
+void gslink_retry_connect(void);
+BOOL gslink_is_socket_disconnected(int test_socket);
+void gslink_set_oam_trap(GSLINK_LINK_EVENT event);
+char *gslink_util_get_event_str(GPLINK_EVENT event);
+
+#endif /* #ifndef GSLINK_HDR_INCLUDE */ \ No newline at end of file
diff --git a/data/mnet/GP10/Host/gslink/src/Makefile b/data/mnet/GP10/Host/gslink/src/Makefile
new file mode 100644
index 0000000..99aa8e5
--- /dev/null
+++ b/data/mnet/GP10/Host/gslink/src/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = gslink
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\$(THIS_APP_DIR).out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) .\bin\*.o
+ $(RM) .\bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/gslink/src/gslink.cpp b/data/mnet/GP10/Host/gslink/src/gslink.cpp
new file mode 100644
index 0000000..2796595
--- /dev/null
+++ b/data/mnet/GP10/Host/gslink/src/gslink.cpp
@@ -0,0 +1,814 @@
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : gslink.cpp *
+ * *
+ * Description : The GPLink subsystem [Link between GP-10 & the GS] *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |01/25/01 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <vxworks.h>
+#include <sockLib.h>
+#include <inetLib.h>
+#include <stdioLib.h>
+#include <strLib.h>
+#include <hostLib.h>
+#include <ioLib.h>
+#include <tasklib.h>
+#include <time.h>
+#include <string.h>
+#include <assert.h>
+#include <syslib.h>
+#include "ril3/ie_cell_id.h"
+#include "ril3/ie_location_area_id.h"
+#include "ril3/ril3_gmm_msg.h"
+#include "gslink.h"
+#include "oam_api.h"
+#include "AlarmCode.h"
+#include "logging/vcmodules.h"
+#include "logging/vclogging.h"
+#include "bssgp/bssgp_net.h"
+#include "bssgp/bssgp_api.h"
+#include "gplink/gplink_prot.h"
+
+/* common for all platforms */
+#include "Os/JCModule.h"
+#include "Os/JCTask.h"
+
+/* common for GS */
+#include "GP10OsTune.h"
+#include "GP10MsgTypes.h"
+#include "MnetModuleId.h"
+
+
+
+#define GSLINK_RETRY_CONNECT_TIME 5
+
+static GSLINK_CONFIGURATION gslink_config;
+static BOOL gslink_initialized = FALSE,gslink_continue_processing = TRUE;
+static char gprs_server_ip_addr[64];
+static BOOL gslink_use_non_oam_gs_addr=FALSE;
+JCTask *g_gslink_task;
+
+
+
+extern "C"
+gslink_set_gs_address(char *gs_addr)
+{
+ strcpy(gprs_server_ip_addr,gs_addr);
+ printf("Set the GS IP address to %s successfully\n",gprs_server_ip_addr);
+ gslink_use_non_oam_gs_addr=TRUE;
+ return (0);
+}
+
+extern "C"
+gslink_show_status()
+{
+ if (gslink_initialized) {
+ printf("GSLink has been initialized\n");
+ }
+ else {
+ printf("GSLink has NOT been initialized\n");
+ return(0);
+ }
+
+ if (gslink_config.connected) {
+ printf("GSLink is connected to %s\n",gslink_config.gs_addr_str);
+ }
+ else {
+ printf("GSLink is NOT connected \n");
+ }
+ if (gslink_config.registered) {
+ printf("\n------------------------------------------------------------------------------\n");
+ printf("GSLink is REGISTERED with GS at IP Address %s with following details:-\n",gslink_config.gs_addr_str);
+ printf("Cell ID : %d\n",gslink_config.cell_id.value);
+ printf("Location Area ID : MCC %d%d%d, MNC %d%d%x, LAC %d\n",
+ gslink_config.location_area_id.mcc[0],
+ gslink_config.location_area_id.mcc[1],
+ gslink_config.location_area_id.mcc[2],
+ gslink_config.location_area_id.mnc[0],
+ gslink_config.location_area_id.mnc[1],
+ gslink_config.location_area_id.mnc[2],
+ gslink_config.location_area_id.lac);
+ printf("Routing Area ID : MCC %d%d%d, MNC %d%d%x, LAC %d, RAC %d\n",
+ gslink_config.routing_area_id.mcc[0],
+ gslink_config.routing_area_id.mcc[1],
+ gslink_config.routing_area_id.mcc[2],
+ gslink_config.routing_area_id.mnc[0],
+ gslink_config.routing_area_id.mnc[1],
+ gslink_config.routing_area_id.mnc[2],
+ gslink_config.routing_area_id.lac,
+ gslink_config.routing_area_id.rac);
+ printf("\n------------------------------------------------------------------------------\n");
+ }
+ else {
+ printf("GSLink is NOT REGISTERED \n");
+ }
+
+}
+
+
+
+
+
+/*
+ * gslink_initialize_client
+ */
+BOOL
+gslink_initialize_client()
+{
+ DBG_FUNC("gslink_initialize_client",GSLINK_LAYER);
+ DBG_ENTER();
+ BOOL status = FALSE;
+ int ret_val;
+ struct sockaddr_in local_addr;
+ long int oam_retval;
+ int keep_alive_on= 1;
+ UINT8 mcc[3],mnc[3], gs_ip_octets[4];
+
+ if (gslink_initialized) {
+ printf("GPLink already initialized\n");
+ DBG_LEAVE();
+ return (status);
+ }
+
+ memset(&gslink_config,0,sizeof(gslink_config));
+ /*
+ * Retrieve all the required registration parameters from the MIB
+ */
+ /* GS IP address */
+ oam_retval = 0;
+ if (oam_getMibIntVar(MIB_gprsServerIpAddress, (long int*)&oam_retval) != STATUS_OK) {
+ printf("Unable to get GS's IP Address from OAM!!\n");
+ DBG_LEAVE();
+ return (status);
+ }
+ else {
+ gs_ip_octets[0] = (oam_retval >> 24) & 0x000000ff;
+ gs_ip_octets[1] = (oam_retval >> 16) & 0x000000ff;
+ gs_ip_octets[2] = (oam_retval >> 8) & 0x000000ff;
+ gs_ip_octets[3] = (oam_retval) & 0x000000ff;
+
+ sprintf(gslink_config.gs_addr_str,"%d.%d.%d.%d\n",gs_ip_octets[0],gs_ip_octets[1],
+ gs_ip_octets[2],gs_ip_octets[3]);
+ if (gslink_use_non_oam_gs_addr)
+ strcpy(gslink_config.gs_addr_str,gprs_server_ip_addr);
+
+ printf("GS's IP Address value %s\n",gslink_config.gs_addr_str);
+ }
+
+
+
+
+ /* Cell ID */
+ oam_retval = 0;
+ if (oam_getMibIntVar(MIB_btsID, (long int*)&oam_retval) != STATUS_OK) {
+ printf("Unable to get GP-10 Cell ID from OAM!!\n");
+ DBG_LEAVE();
+ return (status);
+ }
+ else {
+ printf("GP-10 Cell ID OAM value %ld\n",oam_retval);
+ gslink_config.cell_id.value = oam_retval;
+ }
+
+ /* Mobile Country Code */
+ if (oam_getMibIntVar(MIB_bts_mcc, (long int *)&oam_retval) != STATUS_OK) {
+ printf("Unable to get GP-10 MCC from OAM!!\n");
+ DBG_LEAVE();
+ return (status);
+ }
+ else {
+ if (oam_getByteAryByInt(oam_retval, (char*) mcc, 3) != STATUS_OK) {
+ printf("Unable to convert GP-10 MCC from OAM!!\n");
+ DBG_LEAVE();
+ return (status);
+ }
+ else {
+ printf("GP-10 MCC OAM value %d:%d:%d\n",mcc[0],mcc[1],mcc[2]);
+ gslink_config.location_area_id.mcc[0] = mcc[0];
+ gslink_config.location_area_id.mcc[1] = mcc[1];
+ gslink_config.location_area_id.mcc[2] = mcc[2];
+ }
+ }
+
+ /* Mobile Network Code */
+ if (oam_getMnc(mnc) != STATUS_OK) {
+ printf("Unable to get GP-10 MNC from OAM!!\n");
+ DBG_LEAVE();
+ return (status);
+ }
+ else {
+ printf("GP-10 MNC OAM value %d:%d:%x\n",mnc[0],mnc[1],mnc[2]);
+ gslink_config.location_area_id.mnc[0] = mnc[0];
+ gslink_config.location_area_id.mnc[1] = mnc[1];
+ gslink_config.location_area_id.mnc[2] = mnc[2];
+ }
+
+
+ /* Location Area Code */
+ oam_retval = 0;
+ if (oam_getMibIntVar(MIB_bts_lac, (long int*)&oam_retval) != STATUS_OK) {
+ printf("Unable to get GP-10 LAC from OAM!!\n");
+ DBG_LEAVE();
+ return (status);
+ }
+ else {
+ gslink_config.location_area_id.lac = (UINT16)oam_retval;
+ printf("GP-10 LAC OAM value %ld\n",oam_retval);
+ }
+
+ /* Routing Area Code */
+ oam_retval = 0;
+ if (oam_getMibIntVar(MIB_gprsRac, (long int*)&oam_retval) != STATUS_OK) {
+ printf("Unable to get GP-10 RAC from OAM!!\n");
+ DBG_LEAVE();
+ return (status);
+ }
+ else {
+ memcpy(gslink_config.routing_area_id.mcc,gslink_config.location_area_id.mcc,3);
+ memcpy(gslink_config.routing_area_id.mnc,gslink_config.location_area_id.mnc,3);
+ gslink_config.routing_area_id.lac = gslink_config.location_area_id.lac;
+ gslink_config.routing_area_id.rac = oam_retval;
+ printf("GP-10 RAC OAM value %ld\n",gslink_config.routing_area_id.rac);
+ }
+
+
+ gslink_config.client_socket = socket (AF_INET, SOCK_STREAM, 0);
+
+ if (gslink_config.client_socket == ERROR) {
+ printf("Could not open socket for GPLink, error %d\n",errno);
+ DBG_LEAVE();
+ return (status);
+ }
+
+ memset(&local_addr,0,sizeof(local_addr));
+ local_addr.sin_addr.s_addr = INADDR_ANY;
+ local_addr.sin_family = AF_INET;
+ local_addr.sin_port = htons(0);
+
+ ret_val = bind(gslink_config.client_socket,(struct sockaddr *)&local_addr,sizeof(struct sockaddr_in));
+ if (ret_val == ERROR) {
+ printf("Could not bind socket to GPLink TCP Port, error %d\n",errno);
+ close(gslink_config.client_socket);
+ DBG_LEAVE();
+ return (status);
+ }
+
+ /*
+ * Enable KeepAlive on this socket/connection
+ */
+ setsockopt(gslink_config.client_socket, SOL_SOCKET, SO_KEEPALIVE, (char *)&keep_alive_on, sizeof(keep_alive_on));
+
+
+ /*
+ * Spawn client task here
+ */
+ gslink_initialized = TRUE;
+
+ g_gslink_task = new JCTask("GSLink");
+
+ ret_val = g_gslink_task->JCTaskSpawn(GSLINK_TASK_PRIORITY,
+ GSLINK_TASK_OPTION,
+ GSLINK_TASK_STACK_SIZE,
+ (FUNCPTR)gslink_client_task,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ MODULE_GSLINK, JC_CRITICAL_TASK);
+ if (ret_val == JC_ERROR){
+ printf("[GSLink] JCTaskSpawn returned error.\n");
+ close(gslink_config.client_socket);
+ memset(&gslink_config,0,sizeof(gslink_config));
+ gslink_initialized = FALSE;
+ DBG_LEAVE();
+ return (status);
+ }
+ else {
+ printf("GSLink module initialized\n");
+ status = TRUE;
+ gslink_initialized = TRUE;
+ }
+
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+
+/*
+ * gslink_client_task
+ */
+void
+gslink_client_task()
+{
+ DBG_FUNC("gslink_client_task",GSLINK_LAYER);
+ DBG_ENTER();
+ int ret_status,count;
+ UINT8 rx_buff[1024];
+ BOOL status;
+ struct sockaddr_in gs_addr;
+
+ ret_status = ERROR;
+
+ memset(&gs_addr,0,sizeof(gs_addr));
+ gs_addr.sin_addr.s_addr = inet_addr(gslink_config.gs_addr_str);
+ gs_addr.sin_family = AF_INET;
+ gs_addr.sin_port = htons(GPLINK_TCP_PORT);
+
+ g_gslink_task->JCTaskEnterLoop();
+
+ ret_status = connect(gslink_config.client_socket,(struct sockaddr *)&gs_addr,sizeof(struct sockaddr_in));
+ if (ret_status == ERROR) {
+ DBG_WARNING("Could not connect socket to GS GPLink Port %s:%d, error %d\n",
+ gslink_config.gs_addr_str,GPLINK_TCP_PORT,errno);
+ gslink_retry_connect();
+ }
+
+ gslink_config.connected = TRUE;
+
+
+
+
+
+ while(gslink_continue_processing) {
+ status = gslink_register_client();
+ if (!status) {
+ DBG_WARNING("Cannot register GP-10 with GS!!\n");
+ if ((errno == ECONNRESET) || (errno == ENOTCONN) || (errno == ECONNABORTED)) {
+ DBG_WARNING("Connection to GS lost, error %d!\n");
+ gslink_config.connected = FALSE;
+ gslink_set_oam_trap(GSLINK_LINK_DOWN);
+ gslink_retry_connect();
+ gslink_config.connected = TRUE;
+ }
+ else {
+ DBG_WARNING("This GP-10 is not permitted for registering on this GS, please change configuration, %d!\n",errno);
+ close(gslink_config.client_socket);
+ memset(&gslink_config,0,sizeof(gslink_config));
+ gslink_initialized = FALSE;
+ DBG_LEAVE();
+ return;
+ }
+ }
+ else {
+ wait_for_something:
+ memset(rx_buff,0,1024);
+ ret_status = recv(gslink_config.client_socket,(char*)rx_buff,1024,0);
+ if (ret_status == ERROR) {
+ gslink_config.connected = FALSE;
+ DBG_WARNING("GSLink: recv error - errno %#x!\n", errno);
+ DBG_WARNING("Connection to GS lost, error %d!\n");
+ gslink_set_oam_trap(GSLINK_LINK_DOWN);
+ gslink_retry_connect();
+ gslink_config.connected = TRUE;
+ }
+ else {
+ if (!gslink_is_ack(rx_buff,ret_status)) {
+ DBG_TRACE("Re-registered with GS successfully\n");
+ /* Hate to do this, but....*/
+ if (gslink_continue_processing) goto wait_for_something;
+ }
+ else {
+ DBG_WARNING("This GP-10 is not permitted for registering on this GS, please change configuration!\n");
+ close(gslink_config.client_socket);
+ memset(&gslink_config,0,sizeof(gslink_config));
+ gslink_initialized = FALSE;
+ DBG_LEAVE();
+ return;
+ }
+ }
+ }
+ } /* End of while loop */
+
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * The GPLink protocol has the following format:-
+ *
+ * 8 7 6 5 4 3 2 1
+ * +-----------------------------------------------*
+ * * Msg Length (in network order) * octets 1,2
+ * +-----------------------+-----------------------*
+ * * GPLink message type * octet 3
+ * +-----------------------+-----------------------*
+ * * Reqd IE types, length & value * octet 4-n
+ * +-----------------------------------------------*
+ *
+ * All the messages are of fixed length. The messages are defined
+ * as follows:-
+ *
+ * Registration Request :
+ * Mandatory IEs : Cell ID, Location Area ID, Routing Area ID
+ * Optional IEs : None
+ *
+ * 8 7 6 5 4 3 2 1
+ * +-----------------------------------------------*
+ * * Msg Length = (in network order) * octets 1,2
+ * +-----------------------+-----------------------*
+ * * GPLink message type = 1 (Registration Req) * octet 3
+ * +-----------------------+-----------------------*
+ * * IE Type = 1 (Cell ID) * octet 4
+ * +-----------------------------------------------*
+ * * Cell ID Value (in network order) * octets 5,6
+ * +-----------------------------------------------*
+ * * IE Type = 2 (Location Area ID) * octet 7
+ * +-----------------------------------------------*
+ * * Location Area ID MCC octet 1 * octet 8
+ * +-----------------------------------------------*
+ * * Location Area ID MCC octet 2 * octet 9
+ * +-----------------------------------------------*
+ * * Location Area ID MCC octet 3 * octet 10
+ * +-----------------------------------------------*
+ * * Location Area ID MNC octet 1 * octet 11
+ * +-----------------------------------------------*
+ * * Location Area ID MNC octet 2 * octet 12
+ * +-----------------------------------------------*
+ * * Location Area ID MNC octet 3 * octet 13
+ * +-----------------------------------------------*
+ * * Location Area ID LAC (in network order) * octets 14,15
+ * +-----------------------------------------------*
+ * * IE Type = 3 (Routing Area ID) * octet 16
+ * +-----------------------------------------------*
+ * * Routing Area ID MCC octet 1 * octet 17
+ * +-----------------------------------------------*
+ * * Routing Area ID MCC octet 2 * octet 18
+ * +-----------------------------------------------*
+ * * Routing Area ID MCC octet 3 * octet 19
+ * +-----------------------------------------------*
+ * * Routing Area ID MNC octet 1 * octet 20
+ * +-----------------------------------------------*
+ * * Routing Area ID MNC octet 2 * octet 21
+ * +-----------------------------------------------*
+ * * Routing Area ID MNC octet 3 * octet 22
+ * +-----------------------------------------------*
+ * * Routing Area ID LAC (in network order) * octets 23,24
+ * +-----------------------------------------------*
+ * * Routing Area ID RAC * octet 25
+ * +-----------------------------------------------*
+ *
+ *
+ * Registration Confirm :
+ * Mandatory IEs : None
+ * Optional IEs : None
+ *
+ * Registration Reject :
+ * Mandatory IEs : Cause
+ * Optional IEs : None
+ *
+ * Registration Update Request :
+ * Mandatory IEs : Cell ID, Location Area ID, Routing Area ID
+ * Optional IEs : None
+ *
+ *
+ */
+
+/*
+ * gslink_register_client
+ */
+BOOL
+gslink_register_client()
+{
+ DBG_FUNC("gslink_register_client",GSLINK_LAYER);
+ DBG_ENTER();
+ BOOL status = FALSE;
+ UINT8 tx_buff[1024],rx_buff[1024];
+ int index=0,ret_status;
+ UINT8 *ie_type,*byte_ptr;
+ UINT16 *shorty, *msg_len;
+
+ msg_len = (UINT16*)&tx_buff[index];
+ index += sizeof(UINT16);
+
+ byte_ptr = &tx_buff[index];
+ *byte_ptr = GPLINK_MSG_TYPE_REG_REQ;
+ index++;
+
+ /* Set the Cell ID IE type & the value */
+ ie_type = &tx_buff[index];
+ *ie_type = GPLINK_IE_CELL_ID;
+ index++;
+
+ shorty = (UINT16*)&tx_buff[index];
+ index += sizeof(UINT16);
+ *shorty = htons(gslink_config.cell_id.value);
+
+
+ /* Set the Location Area ID IE type & the value */
+ ie_type = &tx_buff[index];
+ *ie_type = GPLINK_IE_LOCATION_AREA_ID;
+ index++;
+
+ /* The MCC octets */
+ tx_buff[index++] = gslink_config.location_area_id.mcc[0];
+ tx_buff[index++] = gslink_config.location_area_id.mcc[1];
+ tx_buff[index++] = gslink_config.location_area_id.mcc[2];
+
+ /* The MNC octets */
+ tx_buff[index++] = gslink_config.location_area_id.mnc[0];
+ tx_buff[index++] = gslink_config.location_area_id.mnc[1];
+ tx_buff[index++] = gslink_config.location_area_id.mnc[2];
+
+ /* The LAC */
+ shorty = (UINT16*)&tx_buff[index];
+ index += sizeof(UINT16);
+ *shorty = htons(gslink_config.location_area_id.lac);
+
+
+ /* Set the Routing Area ID IE type & the value */
+ ie_type = &tx_buff[index];
+ *ie_type = GPLINK_IE_ROUTING_AREA_ID;
+ index++;
+
+ /* The MCC octets */
+ tx_buff[index++] = gslink_config.routing_area_id.mcc[0];
+ tx_buff[index++] = gslink_config.routing_area_id.mcc[1];
+ tx_buff[index++] = gslink_config.routing_area_id.mcc[2];
+
+ /* The MNC octets */
+ tx_buff[index++] = gslink_config.routing_area_id.mnc[0];
+ tx_buff[index++] = gslink_config.routing_area_id.mnc[1];
+ tx_buff[index++] = gslink_config.routing_area_id.mnc[2];
+
+ /* The LAC */
+ shorty = (UINT16*)&tx_buff[index];
+ index += sizeof(UINT16);
+ *shorty = htons(gslink_config.routing_area_id.lac);
+
+ /* The RAC */
+ tx_buff[index] = gslink_config.routing_area_id.rac;
+ index++;
+
+ /* Now finally set the msg length */
+ *msg_len = htons(index);
+
+
+ ret_status = send(gslink_config.client_socket,(char*)tx_buff,index,0);
+ if (ret_status == ERROR) {
+ printf("Error sending message on socket %d; error %d\n",gslink_config.client_socket,errno);
+ DBG_LEAVE();
+ return(status);
+ }
+ DBG_TRACE("Sent REGISTRATION REQUEST msg of %d bytes\n",index);
+
+ memset(rx_buff,0,1024);
+
+ ret_status = recv(gslink_config.client_socket,(char*)rx_buff,1024,0);
+ if (ret_status == ERROR) {
+ printf("Error receiving message on socket %d; error %d\n",gslink_config.client_socket,errno);
+ DBG_LEAVE();
+ return(status);
+ }
+
+ status = gslink_is_ack(rx_buff,ret_status);
+
+ if (status) {
+ gslink_set_oam_trap(GSLINK_LINK_CONNECTED);
+ }
+
+ DBG_LEAVE();
+ return(status);
+}
+
+
+/*
+ * gslink_is_ack
+ */
+BOOL
+gslink_is_ack(UINT8 *rx_buff,int len)
+{
+ DBG_FUNC("gslink_is_ack",GSLINK_LAYER);
+ DBG_ENTER();
+ int index = 0;
+ UINT16 *shorty;
+
+
+ /* Now check the ack */
+ shorty = (UINT16 *)rx_buff;
+ index += 2;
+
+ switch(rx_buff[index]) {
+ case GPLINK_MSG_TYPE_REG_CNF: {
+ DBG_TRACE("Received Registration Confirm from GS!\n");
+ gslink_config.registered = TRUE;
+ DBG_LEAVE();
+ return(TRUE);
+ }
+ break;
+ case GPLINK_MSG_TYPE_REG_REJ: {
+ DBG_TRACE("Received Registration Reject from GS, code %d!\n");
+ errno=0;
+ DBG_LEAVE();
+ return(FALSE);
+ }
+ break;
+ default:{
+ DBG_WARNING("Received Unknown response from GS!\n");
+ errno=0;
+ DBG_LEAVE();
+ return(FALSE);
+ }
+ break;
+ }
+ DBG_LEAVE();
+ return (FALSE);
+}
+
+
+
+
+
+/*
+ * gslink_retry_connect
+ */
+void
+gslink_retry_connect()
+{
+ DBG_FUNC("gslink_retry_connect",GSLINK_LAYER);
+ DBG_ENTER();
+ int ret_val;
+ struct sockaddr_in local_addr,gs_addr;
+ BOOL connected_to_gs = FALSE;
+ int keep_alive_on= 1;
+
+ while(!connected_to_gs) {
+
+ close(gslink_config.client_socket);
+
+ gslink_config.client_socket = socket (AF_INET, SOCK_STREAM, 0);
+
+ if (gslink_config.client_socket == ERROR) {
+ DBG_ERROR("Could not open socket for GPLink, error %d\n",errno);
+ DBG_LEAVE();
+ return ;
+ }
+
+ memset(&local_addr,0,sizeof(local_addr));
+ local_addr.sin_addr.s_addr = INADDR_ANY;
+ local_addr.sin_family = AF_INET;
+ local_addr.sin_port = htons(0);
+
+ ret_val = bind(gslink_config.client_socket,(struct sockaddr *)&local_addr,sizeof(struct sockaddr_in));
+ if (ret_val == ERROR) {
+ DBG_ERROR("Could not bind socket to GPLink TCP Port, error %d, GSLink cannot continue\n",errno);
+ close(gslink_config.client_socket);
+ DBG_LEAVE();
+ return;
+ }
+
+ memset(&gs_addr,0,sizeof(gs_addr));
+ gs_addr.sin_addr.s_addr = inet_addr(gslink_config.gs_addr_str);
+ gs_addr.sin_family = AF_INET;
+ gs_addr.sin_port = htons(GPLINK_TCP_PORT);
+
+ setsockopt(gslink_config.client_socket, SOL_SOCKET, SO_KEEPALIVE, (char *)&keep_alive_on, sizeof(keep_alive_on));
+
+
+ DBG_TRACE("Retrying connection to GS GPLink Port %s:%d\n",gslink_config.gs_addr_str,GPLINK_TCP_PORT);
+
+ ret_val = connect(gslink_config.client_socket,(struct sockaddr *)&gs_addr,sizeof(struct sockaddr_in));
+ if (ret_val == ERROR) {
+ DBG_ERROR("Could not connect socket to GS GPLink Port %s:%d, error %d; will retry in 5 seconds\n",
+ gslink_config.gs_addr_str,GPLINK_TCP_PORT,errno);
+ taskDelay(sysClkRateGet()*GSLINK_RETRY_CONNECT_TIME); /* ? */
+ }
+ else {
+ DBG_TRACE("Connected to GS GPLink Port %s:%d\n",gslink_config.gs_addr_str,GPLINK_TCP_PORT);
+ connected_to_gs = TRUE;
+ }
+
+ }
+
+ gslink_config.connected = TRUE;
+
+ DBG_LEAVE();
+}
+
+
+
+
+/*
+ * gslink_is_socket_disconnected
+ */
+BOOL
+gslink_is_socket_disconnected(int test_socket)
+{
+ DBG_FUNC("gslink_is_socket_disconnected",GSLINK_LAYER);
+ DBG_ENTER();
+
+ int ret_status;
+ BOOL status = FALSE;
+ int bytes_available=0,ioctl_status;
+
+ ioctl_status = ioctl(test_socket,FIONREAD,(int)&bytes_available);
+ if ( (ret_status!=ERROR) && (bytes_available==0)) {
+ status = TRUE;
+ }
+ DBG_LEAVE();
+ return(status);
+}
+
+
+
+/*
+ * gslink_set_oam_trap
+ */
+void
+gslink_set_oam_trap(GSLINK_LINK_EVENT event)
+{
+ DBG_FUNC("gslink_set_oam_trap",GSLINK_LAYER);
+ DBG_ENTER();
+
+ switch(event) {
+ case GSLINK_LINK_CONNECTED: {
+ bssgp_net_add_bvci(gslink_config.gs_addr_str,gslink_config.cell_id,gslink_config.routing_area_id.rac);
+ }
+ break;
+ case GSLINK_LINK_DOWN: {
+ }
+ break;
+ default: {
+ }
+ break;
+
+ }
+ DBG_LEAVE();
+}
+
+
+
+
+/*
+ * SysCommand_GSLink
+ */
+int
+SysCommand_GSLink(T_SYS_CMD action)
+{
+ int tid;
+
+ switch(action){
+
+ case SYS_SHUTDOWN:
+ printf("[GSLink] Received system shutdown notification\n");
+ break;
+
+ case SYS_START: {
+ printf("[GSLink] Received task start notification\n");
+ if (!gslink_initialize_client()) {
+ printf("Unable to initialize GSLink task\n");
+ }
+ else {
+ printf("Initialized GSLink task successfully\n");
+ }
+ }
+ break;
+
+ case SYS_REBOOT:
+ printf("[GSLink] Reboot ready.\n");
+ close(gslink_config.client_socket);
+ memset(&gslink_config,0,sizeof(gslink_config));
+ gslink_initialized = FALSE;
+ break;
+
+ default:
+ printf("[GSLink] Unknown system command received\n");
+ }
+ return 0;
+}
+
+
+
+/*
+ * gslink_util_get_event_str
+ */
+char *
+gslink_util_get_event_str(GPLINK_EVENT event)
+{
+ static char *gslink_event_str[]={
+ "GP-10 Registered",
+ "GP-10 Disconnected",
+ "GP-10 Updated Registration Information"
+ };
+ if (event < GPLINK_MAX_EVENTS) {
+ return (gslink_event_str[event]);
+ }
+ else {
+ return "Unknown Event";
+ }
+}
+
diff --git a/data/mnet/GP10/Host/jcc/Makefile b/data/mnet/GP10/Host/jcc/Makefile
new file mode 100644
index 0000000..a5965f0
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/Makefile
@@ -0,0 +1,16 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src src_api jvc_api
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ $(CP) bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/jcc/docs/LUDB.doc b/data/mnet/GP10/Host/jcc/docs/LUDB.doc
new file mode 100644
index 0000000..38c6f00
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/docs/LUDB.doc
Binary files differ
diff --git a/data/mnet/GP10/Host/jcc/include/JCC_ED.h b/data/mnet/GP10/Host/jcc/include/JCC_ED.h
new file mode 100644
index 0000000..541aa96
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/include/JCC_ED.h
@@ -0,0 +1,53 @@
+#ifndef JCC_ED_H
+#define JCC_ED_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCC_ED.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : message and ie interface among Application (Layer 3)
+// modules.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+#include "ril3/ril3_cc_msg.h"
+#include "ril3/ril3_sms_cp.h"
+#include "ril3/ril3_mm_msg.h"
+#include "ril3/ril3_rrm_msg.h"
+#include "ril3/ril3_common.h"
+#include "ril3/ril3_result.h"
+
+#include "lapdm/lapdm_l3intf.h"
+
+extern void CNI_RIL3_ZAPMSG(void *, int length);
+
+extern T_CNI_RIL3_RESULT
+JCC_RIL3CC_Decode(
+ bool isSoftMob,
+ T_CNI_LAPDM_L3MessageUnit *, T_CNI_RIL3CC_MSG *
+);
+
+extern T_CNI_RIL3_RESULT
+JCC_RIL3SMS_Decode (bool isSoftMob, T_CNI_LAPDM_L3MessageUnit *l3MsgUnit,
+ T_CNI_RIL3SMS_CP_MSG *smsMsg );
+
+extern T_CNI_RIL3_RESULT
+JCC_RIL3MM_Decode(
+ bool isSoftMob,
+ T_CNI_LAPDM_L3MessageUnit *, T_CNI_RIL3MM_MSG *
+);
+
+#endif // JCC_ED_H
diff --git a/data/mnet/GP10/Host/jcc/include/LUDBOamMsgProc.h b/data/mnet/GP10/Host/jcc/include/LUDBOamMsgProc.h
new file mode 100644
index 0000000..3daaf21
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/include/LUDBOamMsgProc.h
@@ -0,0 +1,31 @@
+#ifndef LUDBOamMsgProc_H
+#define LUDBOamMsgProc_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : LUDBOamMsgProc.h
+// Author(s) : Kevin Lim
+// Create Date : 09-09-99
+// Description : Ludb module OAM msg handler header
+//
+// *******************************************************************
+
+// *******************************************************************
+// function prototypes
+// *******************************************************************
+
+void ludbHandleOpStChanged(INT32 value);
+void ludbHandleAuthFreqChanged(INT32 value);
+void LUDB_OAM_MsgProc(TrapMsg *trapMsg);
+
+
+#endif // LUDBOamMsgProc_H
diff --git a/data/mnet/GP10/Host/jcc/include/LUDBTimerProc.h b/data/mnet/GP10/Host/jcc/include/LUDBTimerProc.h
new file mode 100644
index 0000000..fc3fc50
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/include/LUDBTimerProc.h
@@ -0,0 +1,28 @@
+#ifndef LudbTimerProc_H
+#define LudbTimerProc_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : LudbTimerProc.h
+// Author(s) : Kevin Lim
+// Create Date : 07-26-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// function prototypes
+// *******************************************************************
+
+void LudbTimerMsgProc(LudbMsgStruct *inMsg);
+
+#endif // LudbTimerProc_H
diff --git a/data/mnet/GP10/Host/jcc/include/LUDBVoipMsgProc.h b/data/mnet/GP10/Host/jcc/include/LUDBVoipMsgProc.h
new file mode 100644
index 0000000..2155921
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/include/LUDBVoipMsgProc.h
@@ -0,0 +1,40 @@
+#ifndef LUDBVoipMsgProc_H
+#define LUDBVoipMsgProc_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : LUDBVoipMsgProc.h
+// Author(s) : Kevin Lim
+// Create Date : 07-31-99
+// Description : Local User Database
+//
+// *******************************************************************
+
+#include "JCC/Ludbapi.h"
+
+bool sendMobileRegReq( T_CNI_RIL3_IE_MOBILE_ID& mobileId, short mmId, short ludbId, short fSec);
+bool sendMobileUnRegReq( T_CNI_RIL3_IE_MOBILE_ID& mobileId, short mmId, short ludbId);
+bool sendMobileSecInfoReq( T_CNI_RIL3_IE_MOBILE_ID& mobileId, short mmId, short ludbId, short fReg);
+void LUDB_VBLINK_RCFMsgProc(LudbMsgStruct *inMsg);
+void LUDB_VBLINK_RRJMsgProc(LudbMsgStruct *inMsg);
+void LUDB_VBLINK_UCFMsgProc(LudbMsgStruct *inMsg);
+void LUDB_VBLINK_URJMsgProc(LudbMsgStruct *inMsg);
+void LUDB_VBLINK_SPIMsgProc(LudbMsgStruct *inMsg);
+void LUDB_VBLINK_SRSMsgProc(LudbMsgStruct *inMsg);
+void LUDB_VBLINK_URQMsgProc(LudbMsgStruct *inMsg);
+void LUDB_VBLINK_MsgProc(LudbMsgStruct *inMsg);
+
+
+#endif // LUDBVoipMsgProc_H
+
+
+
diff --git a/data/mnet/GP10/Host/jcc/include/LudbHashTbl.h b/data/mnet/GP10/Host/jcc/include/LudbHashTbl.h
new file mode 100644
index 0000000..741494d
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/include/LudbHashTbl.h
@@ -0,0 +1,48 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* File : LudbHashTbl.h */
+/* Author(s) : Kevin S. Lim */
+/* Create Date : 03-25-01 copied from GsHashTbl.h */
+/* Description : supports only IMSI(15) or TMSI(4) key */
+/* */
+/*********************************************************************/
+
+#ifndef H_LUDB_HASH_TBL
+#define H_LUDB_HASH_TBL
+
+#include "LudbLinkedList.h"
+
+#define LUDB_DEFAULT_HASH_TBL_LEN 97
+
+class LudbHashTbl
+{
+private:
+ LudbLinkedList *table;
+ int list_len;
+ int key_len;
+
+public:
+ LudbHashTbl();
+ LudbHashTbl(int l_len, int k_len);
+ ~LudbHashTbl();
+
+ int GetListLen() { return list_len; }
+ int GetKeyLen() { return key_len; }
+ virtual int GetHashInd(const void *key);
+ virtual LudbLinkedListItem *find(const void *key, int& hash_ind);
+ virtual LudbLinkedListItem *find(const int value, int& hash_ind);
+ virtual int add(void *key, const int value);
+ virtual int remove(void *key);
+ virtual int remove(int value);
+ virtual void print();
+};
+
+#endif
+
diff --git a/data/mnet/GP10/Host/jcc/include/LudbLinkedList.h b/data/mnet/GP10/Host/jcc/include/LudbLinkedList.h
new file mode 100644
index 0000000..64e2961
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/include/LudbLinkedList.h
@@ -0,0 +1,72 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2001 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* File : LudbLinkedList.h */
+/* Author(s) : Kevin S. Lim */
+/* Create Date : 03-25-01 copy from GsLinkedList.h */
+/* Description : A generic linked list made for hash table entries */
+/* by adding new items to the tail */
+/* It can have two kind of keys: IMSI or TMSI */
+/* IMSI will have 15 bytes characters as digit values */
+/* TMSI will have 32 bit values - unsigned long */
+/* */
+/* Initially we will only use IMSI hash table. */
+/* */
+/*********************************************************************/
+
+#ifndef H_LUDB_LINKED_LIST
+#define H_LUDB_LINKED_LIST
+
+#define LUDB_MAX_LIST_KEY_LEN 20
+#define LUDB_MAX_IMSI_KEY_LEN 15
+#define LUDB_MAX_TMSI_KEY_LEN 4
+
+class LudbLinkedListItem {
+public:
+ LudbLinkedListItem *prev;
+ LudbLinkedListItem *next;
+ int key_len;
+ unsigned char ckey[LUDB_MAX_LIST_KEY_LEN];
+ unsigned long lkey;
+ int value; // value to store, usually other table index
+
+ LudbLinkedListItem();
+ LudbLinkedListItem(const int len, void *key, const int value);
+ ~LudbLinkedListItem();
+ virtual int same_keys(const void *key);
+ virtual void print();
+};
+
+class LudbLinkedList
+{
+private:
+ LudbLinkedListItem *head;
+ LudbLinkedListItem *tail;
+ int num_items;
+ int key_len;
+
+public:
+ LudbLinkedList();
+ LudbLinkedList(int len);
+ ~LudbLinkedList();
+
+ void SetKeyLength(int len);
+ int GetKeyLength() { return key_len; }
+ int GetNumItems() { return num_items; }
+ virtual LudbLinkedListItem *find(const void *key);
+ virtual LudbLinkedListItem *find(const int value);
+ virtual int add(void *key, const int value);
+ virtual int remove(LudbLinkedListItem *item);
+ virtual int remove(void *key);
+ virtual int remove(int value);
+ virtual void print();
+};
+
+#endif
+
diff --git a/data/mnet/GP10/Host/jcc/jvc_api/JCCbcCb.cpp b/data/mnet/GP10/Host/jcc/jvc_api/JCCbcCb.cpp
new file mode 100644
index 0000000..db8eebe
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/jvc_api/JCCbcCb.cpp
@@ -0,0 +1,377 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+#ifndef JCCbcCb_CPP
+#define JCCbcCb_CPP
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+#include "logging\vclogging.h"
+#include "JCC/viperchannel.h"
+#include "JCC/JCCbcCb.h"
+
+
+extern MSG_Q_ID rm_MsgQId;
+
+bool JcMsgRcvBySmscbc(InterRxCbcCbMsg_t *msg)
+{
+ InterTxCbcCbMsg_t ack;
+ int size;
+
+ DBG_FUNC("JcMsgRcvBySMSCBC", RM_LAYER);
+ // DBG_ENTER();
+
+ size = 12 + msg->msgData.size;
+
+ switch (msg->msgType)
+ {
+ JcVipercellId_t origVcId; // origination ViperCell Id
+ UINT32 origVcAddress; // origination ViperCell IP address
+ JcModuleId_t origModuleId; // origination Module Id
+ JcSubId_t origSubId; // optional origination Sub Id
+
+ JcVipercellId_t destVcId; // destination ViperCell Id
+ UINT32 destVcAddress; // destination ViperCell IP address
+ JcModuleId_t destModuleId; // destination Module Id
+ JcSubId_t destSubId; // optional destination Sub Id
+
+ case INTER_SMSCBC_CB_START:
+ case INTER_SMSCBC_CB_STOP:
+ //Calculate the size of the received SMSCBC message
+ size = 12 + msg->msgData.size;
+
+ //Output indication that a SMSCBC message arrived at ViperCell
+ DBG_TRACE("Received SMSCBC message: msgType=%d\n",msg->msgType);
+ DBG_HEXDUMP((unsigned char*)&msg->msgData, size);
+ //Send back acknowledgement to this msg
+ if (msg->msgType==INTER_SMSCBC_CB_START)
+ ack.msgType = INTER_SMSCBC_CB_START_ACK;
+ else if (msg->msgType==INTER_SMSCBC_CB_STOP)
+ ack.msgType = INTER_SMSCBC_CB_STOP_ACK;
+ ack.origVcId = msg->destVcId;
+ ack.origVcAddress = msg->destVcAddress;
+ ack.origModuleId = msg->destModuleId;
+ ack.origSubId = msg->destSubId;
+ ack.destVcId = msg->origVcId;
+ ack.destVcAddress = msg->origVcAddress;
+ ack.destModuleId = msg->origModuleId;
+ ack.destSubId = msg->origSubId;
+ JcMsgSendToSmscbc(&ack);
+ break;
+
+ default:
+ //Output warning that a wrong message is being delivered to RM module
+ DBG_WARNING("WARNING@JcMsgRcvBySmscbc: unsupported SMSCBC msgType=%d\n",
+ msg->msgType);
+ return (false);
+ break;
+ }
+
+ // pass up message to module RM
+ if (ERROR == msgQSend( rm_MsgQId,
+ (char *)&msg->msgData,
+ size,
+ NO_WAIT,
+ MSG_PRI_NORMAL
+ ) )
+ {
+ DBG_ERROR("ERROR@JcMsgRcvBySmscbc: failed in msgQSend, errno=%d\n ",errno);
+ return (false);
+ }
+ else
+ {
+ //DBG_TRACE("INFO@JcMsgRcvBySmscbc: Sent Message from CBC to VC: msgType=%d\n",
+ // msg->msgType);
+ return (true);
+ }
+}
+
+bool
+JcMsgSendToSmscbc(InterTxCbcCbMsg_t *msg)
+{
+ BOOL retVal;
+
+ if ((retVal = ViperChannelSendMessage((unsigned char *)msg,
+ sizeof(struct InterTxCbcCbMsg_t),
+ msg->destVcAddress
+ ))
+ == TRUE)
+ {
+ return(true);
+ }
+ else
+ {
+ return(false);
+ }
+
+}
+
+
+//test command used for pre-CB index verstion
+//void intg_JcSendCbCmd(unsigned char cmdCode,
+// unsigned short msgCode,
+// unsigned short updateNo)
+//{
+// unsigned short hdr12;
+// InterRxCbcCbMsg_t msg;
+// unsigned char buffer[88];
+//
+// switch(cmdCode)
+// {
+// case 0: //Stop sending cur CB message
+// msg.destModuleId = MODULE_SMSCBC;
+// msg.msgType = INTER_SMSCBC_CB_STOP;
+// msg.msgData.module_id = MODULE_SMSCBC;
+// msg.msgData.message_type = INTER_SMSCBC_CB_STOP;
+// msg.msgData.size = 0;
+// msg.msgData.message_id = msgCode;/*Danny, 6/29*/
+// break;
+//
+// default: //Send test CB message to DSP
+// msg.destModuleId = MODULE_SMSCBC;
+// msg.msgType = INTER_SMSCBC_CB_STOP;
+// msg.msgData.module_id = MODULE_SMSCBC;
+// msg.msgData.message_type = INTER_SMSCBC_CB_START;
+//
+// msg.msgData.module_id = MODULE_SMSCBC;
+// msg.msgData.message_type = INTER_SMSCBC_CB_START;
+// memset((char *)buffer, 0, 88);
+// hdr12=0;
+// hdr12 = (00<<14)|(msgCode<<4)|(updateNo);//00xxxxxxxxYYYY; x is msgCode, Y is Update#
+// //Serial Number:cell wide immediate display
+// buffer[0] = (unsigned char)(hdr12>>8);
+// buffer[1] = (unsigned char)(hdr12);
+// //Message Identifier: 1 assumed
+// buffer[2] = 0;
+// buffer[3] = 1;
+// //Data coding scheme: default alphabet, English
+// buffer[4] = 0x01;
+// //Page parameter: page 1 of 3
+// buffer[5] = 0x13;
+// //contents: JetCell, Cool!
+// buffer[6] = 0xca;
+// buffer[7] = 0x32;
+// buffer[8] = 0x7d;
+// buffer[9] = 0x58;
+// buffer[10] = 0x66;
+// buffer[11] = 0xb3;
+// buffer[12] = 0x59;
+// buffer[13] = 0xc3;
+// buffer[14] = 0xf7;
+// buffer[15] = 0x9b;
+// buffer[16] = 0x1d;
+// buffer[17] = 0x02;
+// buffer[18] = 0x81;
+//
+// //Generate page 1 of 3
+// buffer[5] = 0x13;
+// buffer[19] = 0x62;
+// memcpy((unsigned char*)&msg.msgData.data[0], buffer, 88);
+//
+// //Generate page 2 of 3
+// buffer[5] = 0x23;
+// buffer[19] = 0x64;
+// memcpy((unsigned char*)&msg.msgData.data[88], buffer, 88);
+//
+// //Generate page 3 of 3
+// buffer[5] = 0x33;
+// buffer[19] = 0x66;
+// memcpy((unsigned char*)&msg.msgData.data[176], buffer, 88);
+//
+// //size of this CB msg
+// msg.msgData.size = 264;
+// break;
+// }
+//
+// //Send a test CB message to RM
+// if (!JcMsgRcvBySmscbc(&msg))
+// printf("FAILED in calling intg_JcSendCbCmd: cmdCode=%d, msgCode=%d, upNo=%d\n",
+// cmdCode, msgCode, updateNo);
+// else
+// printf("SUCCESS in calling intg_JcSendCbCmd: cmdCode=%d, msgCode=%d, upNo=%d\n",
+// cmdCode, msgCode, updateNo);
+//}
+//#endif
+
+//Test command for CB index version
+//message id = 1 assumed.
+void intg_JcSendCbCmd(unsigned char cmdCode,
+ unsigned short msgCode,
+ unsigned short updateNo)
+{
+ unsigned short hdr12;
+ InterRxCbcCbMsg_t msg;
+ unsigned char buffer[88];
+
+ switch(cmdCode)
+ {
+ case 0: //Stop sending cur CB message
+ msg.destModuleId = MODULE_SMSCBC;
+ msg.msgType = INTER_SMSCBC_CB_STOP;
+
+ msg.msgData.module_id = MODULE_SMSCBC;
+ msg.msgData.message_type = INTER_SMSCBC_CB_STOP;
+ msg.msgData.size = 0;
+ msg.msgData.message_id = 1; //Danny, 6/29
+ break;
+
+ default: //Send test CB message to DSP
+ msg.destModuleId = MODULE_SMSCBC;
+ msg.msgType = INTER_SMSCBC_CB_START;
+
+ msg.msgData.module_id = MODULE_SMSCBC;
+ msg.msgData.message_type = INTER_SMSCBC_CB_START;
+ msg.msgData.message_id = 1;
+ memset((char *)buffer, 0, 88);
+ hdr12=0;
+ hdr12 = (00<<14)|(msgCode<<4)|(updateNo);//00xxxxxxxxYYYY; x is msgCode, Y is Update#
+ //Serial Number:cell wide immediate display
+ buffer[0] = (unsigned char)(hdr12>>8);
+ buffer[1] = (unsigned char)(hdr12);
+ //Message Identifier: 1 assumed
+ buffer[2] = 0;
+ buffer[3] = cmdCode;
+ //Data coding scheme: default alphabet, English
+ buffer[4] = 0x01;
+ //Page parameter: page 1 of 3
+ buffer[5] = 0x13;
+ //contents: JetCell, Cool!
+ buffer[6] = 0xca;
+ buffer[7] = 0x32;
+ buffer[8] = 0x7d;
+ buffer[9] = 0x58;
+ buffer[10] = 0x66;
+ buffer[11] = 0xb3;
+ buffer[12] = 0x59;
+ buffer[13] = 0xc3;
+ buffer[14] = 0xf7;
+ buffer[15] = 0x9b;
+ buffer[16] = 0x1d;
+ buffer[17] = 0x02;
+ buffer[18] = 0x81;
+
+ //Generate page 1 of 3
+ buffer[5] = 0x13;
+ buffer[19] = 0x62;
+ memcpy((unsigned char*)&msg.msgData.data[0], buffer, 88);
+
+ //Generate page 2 of 3
+ buffer[5] = 0x23;
+ buffer[19] = 0x64;
+ memcpy((unsigned char*)&msg.msgData.data[88], buffer, 88);
+
+ //Generate page 3 of 3
+ buffer[5] = 0x33;
+ buffer[19] = 0x66;
+ memcpy((unsigned char*)&msg.msgData.data[176], buffer, 88);
+
+ //size of this CB msg
+ msg.msgData.size = 264;
+ break;
+ }
+
+ //Send a test CB message to RM
+ if (!JcMsgRcvBySmscbc(&msg))
+ printf("FAILED in calling intg_JcSendCbCmd: cmdCode=%d, msgCode=%d, upNo=%d\n",
+ cmdCode, msgCode, updateNo);
+ else
+ printf("SUCCESS in calling intg_JcSendCbCmd: cmdCode=%d, msgCode=%d, upNo=%d\n",
+ cmdCode, msgCode, updateNo);
+}
+
+//PR 1323, Testing SMSCBC
+//message id =0 assumed, msgCode = 0x2aa
+void intg_JcSendCbcIndex(unsigned char cmdCode,
+ unsigned short msgCode,
+ unsigned short updateNo)
+{
+ unsigned short hdr12;
+ InterRxCbcCbMsg_t msg;
+ unsigned char buffer[88];
+
+ switch(cmdCode)
+ {
+ case 0: //Stop sending cur CB message
+ msg.destModuleId = MODULE_SMSCBC;
+ msg.msgType = INTER_SMSCBC_CB_STOP;
+
+ msg.msgData.module_id = MODULE_SMSCBC;
+ msg.msgData.message_type = INTER_SMSCBC_CB_STOP;
+ msg.msgData.size = 0;
+ msg.msgData.message_id = 0;/*Danny, 6/29*/
+ break;
+
+ default: //Send test CB message to DSP
+ msg.destModuleId = MODULE_SMSCBC;
+ msg.msgType = INTER_SMSCBC_CB_START;
+
+ msg.msgData.module_id = MODULE_SMSCBC;
+ msg.msgData.message_type = INTER_SMSCBC_CB_START;
+ msg.msgData.message_id = 0;
+
+
+ memset((char *)buffer, 0, 88);
+ hdr12=0;
+ hdr12 = (00<<14)|(msgCode<<4)|(updateNo);//001010101010YYYY; x is msgCode, Y is Update#
+ //Message Identifier: 0 assumed
+ buffer[2] = 0;
+ buffer[3] = 0;
+ //Data coding scheme: default alphabet, English
+ buffer[4] = 0x01;
+ //Page parameter: page 1 of 1
+ buffer[5] = 0x11;
+
+ //contents: 20 CISSOM/A CA/A2 SF --- EI1<cr><lf>20<SP>CISSOM<cr><lf>A<sp>CA<cr><lf>A2<SP>SF<cr><lf>
+ buffer[6] = 0xc5;
+ buffer[7] = 0x64;
+ buffer[8] = 0xac;
+ buffer[9] = 0xa1;
+ buffer[10] = 0x90;
+ buffer[11] = 0xc1;
+ buffer[12] = 0x40;
+ buffer[13] = 0xc3;
+
+ buffer[14] = 0xe4;
+ buffer[15] = 0x74;
+ buffer[16] = 0xfa;
+ buffer[17] = 0x6c;
+ buffer[18] = 0x2a;
+ buffer[19] = 0x82;
+
+ buffer[20] = 0xa0;
+ buffer[21] = 0x61;
+ buffer[22] = 0xb0;
+ buffer[23] = 0xa1;
+ buffer[24] = 0x0a;
+ buffer[25] = 0xca;
+ buffer[26] = 0x40;
+ buffer[27] = 0x53;
+ buffer[28] = 0x63;
+ buffer[29] = 0x43;
+ buffer[30] = 0x01;
+ buffer[31] = 0x00;
+ buffer[32] = 0x00;
+ memcpy((unsigned char*)&msg.msgData.data[0], buffer, 88);
+
+ //size of this CB msg
+ msg.msgData.size = 88;
+ break;
+ }
+
+ //Send a test CB message to RM
+ if (!JcMsgRcvBySmscbc(&msg))
+ printf("FAILED in calling intg_JcSendCbcIndex: cmdCode=%d, msgCode=%d, upNo=%d\n",
+ cmdCode, msgCode, updateNo);
+ else
+ printf("SUCCESS in calling intg_JcSendCbcIndex: cmdCode=%d, msgCode=%d, upNo=%d\n",
+ cmdCode, msgCode, updateNo);
+}
+
+#endif // JCCbcCb_CPP
+
+
diff --git a/data/mnet/GP10/Host/jcc/jvc_api/JcVctoVc.cpp b/data/mnet/GP10/Host/jcc/jvc_api/JcVctoVc.cpp
new file mode 100644
index 0000000..d0424c0
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/jvc_api/JcVctoVc.cpp
@@ -0,0 +1,213 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JcVcToVc.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 05-01-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+#include "cc/CCInt.h"
+
+#include "JCC/JcVcToVc.h"
+#include "JCC/viperchannel.h"
+#include "JCC/JCCbcCb.h"
+
+#include "logging/VCLOGGING.h"
+
+#include "rm/rm_ccintf.h"
+
+#include "cc/CCUtil.h"
+
+#include "cc/CCSessionHandler.h"
+
+#include "JCC/JCCUtil.h"
+
+#include "cc/CCConfig.h"
+
+
+bool JcMsgRcvByCC (InterVcMsg_t *);
+bool JcMsgRcvByRM (InterVcMsg_t *);
+
+
+bool JcMsgRcvByCC (InterVcMsg_t *msg)
+{
+ DBG_FUNC ("JcMsgRcvByCC", CC_LAYER);
+ DBG_ENTER();
+
+ MSG_Q_ID qId ;
+ VcCcMsg_t intMsg ;
+
+ unsigned buffSize;
+ char * buffer ;
+
+ bool retVal = true;
+
+ if (msg->origModuleId == MODULE_MM)
+ { // MM->remote CC
+ buffSize = sizeof msg->msgData.postHoMobEventData.intraL3Msg ; // IntraL3Msg_t
+ buffer = (char *)&msg->msgData.postHoMobEventData.intraL3Msg;
+ }
+ else
+ { // CC->remote CC
+ buffSize = sizeof intMsg ;
+ buffer = (char *)&intMsg ;
+
+ intMsg.module_id = MODULE_EXT_VC;
+ intMsg.vcToVcMsg = *msg ;
+ }
+
+ switch (msg->msgType)
+ {
+ case INTER_VC_CC_PERFORM_HANDOVER:
+ {
+ qId = ccMsgQId;
+ break;
+ }
+
+ case INTER_VC_CC_POST_HANDOVER_DATA_EVENT:
+ default:
+ {
+ if ( (msg->destSubId >= CC_MAX_CC_CALLS_DEF_VAL) ||
+ (msg->origVcAddress == 0) )
+ return true;
+
+ qId = ccSession[msg->destSubId].msgQId;
+ break;
+ }
+ }
+
+ // send the message.
+ if (ERROR == msgQSend (qId ,
+ buffer ,
+ buffSize ,
+ NO_WAIT ,
+ MSG_PRI_NORMAL ) )
+ {
+ DBG_ERROR("EXT VC->CC Error : msgQSend (QID = %p) error\n ",
+ (int)qId);
+ retVal = false;
+ }
+ else
+ {
+ DBG_TRACE("EXT VC->CC Log: Sent Message to CC, (Msg Type = %d)\n",
+ msg->msgType);
+ retVal = true;
+ }
+
+ DBG_LEAVE();
+ return (retVal);
+}
+
+
+bool JcMsgRcvByRM(InterVcMsg_t *msg)
+{
+ DBG_FUNC("JcMsgRcvByRM", CC_LAYER);
+ DBG_ENTER();
+
+ IntraL3Msg_t *rrOutMsg;
+
+ switch (msg->msgType) {
+
+ case INTER_VC_CC_POST_HANDOVER_DATA_EVENT:
+ {
+
+ if ((!ccSession[msg->destSubId].free) &&
+ ((ccSession[msg->destSubId].sessionHandler->handoverSession)
+ == (ccSession[msg->destSubId].sessionHandler->targetHandoverSession)))
+ {
+ rrOutMsg = &msg->msgData.postHoMobEventData.intraL3Msg;
+ DBG_LEAVE();
+ return(sendRR(rrOutMsg->primitive_type,
+ rrOutMsg->message_type,
+ ccSession[msg->destSubId].sessionHandler->entryId,
+ rrOutMsg));
+ }
+ else
+ {
+ DBG_WARNING("EXT VC CC->RM Warning : Unexpected/Late Handover (Msg. Type=%d), (Session Id=%d)\n ",
+ msg->msgType,
+ msg->destSubId);
+ }
+ break;
+
+ }
+ default:
+ DBG_ERROR("EXT VC CC->RM Error : Unexpected Handover (Msg. Type=%d), (Session Id=%d)\n ",
+ msg->msgType,
+ msg->destSubId);
+ }
+
+ DBG_LEAVE();
+ return(false);
+}
+
+
+void RecvViperChannelMessage(unsigned char *Packet,int DataSize, UINT32 RemoteAddress)
+{
+ DBG_FUNC("RecvViperChannelMessage", CC_LAYER);
+ DBG_ENTER();
+
+ InterVcMsg_t *msg = (InterVcMsg_t *) Packet;
+
+ DBG_HEXDUMP(Packet, DataSize);
+
+ switch(msg->destModuleId)
+ {
+ case MODULE_CC:
+ JcMsgRcvByCC (msg);
+ break;
+
+ case MODULE_RM:
+ if (msg->origModuleId == MODULE_CC)
+ JcMsgRcvByRM (msg);
+ else
+ JcMsgRcvBySmscbc ((InterRxCbcCbMsg_t*)Packet);
+ break;
+
+ default:
+ DBG_ERROR ("Inter-Vipercell message received for unexpected (module = %d)\n",
+ msg->destModuleId);
+ break;
+ }
+
+ DBG_LEAVE();
+}
+
+
+bool JcMsgSendToVipercell(InterVcMsg_t *msg)
+{
+ DBG_FUNC("JcMsgSendToVipercell", CC_LAYER);
+ DBG_ENTER();
+
+ BOOL retVal;
+
+ if ((retVal = ViperChannelSendMessage((unsigned char *) msg,
+ sizeof(struct InterVcMsg_t),
+ msg->destVcAddress
+ ))
+ == TRUE)
+ {
+ DBG_LEAVE();
+ return(true);
+ }
+ else
+ {
+ DBG_LEAVE();
+ return(false);
+ }
+
+}
+
diff --git a/data/mnet/GP10/Host/jcc/jvc_api/Makefile b/data/mnet/GP10/Host/jcc/jvc_api/Makefile
new file mode 100644
index 0000000..fd7d369
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/jvc_api/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = jcc
+THIS_DIRECTORY = jvc_api
+MY_OUTPUT = $(OBJDIR)\jvc.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/jcc/jvc_api/viperchannel.cpp b/data/mnet/GP10/Host/jcc/jvc_api/viperchannel.cpp
new file mode 100644
index 0000000..146792a
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/jvc_api/viperchannel.cpp
@@ -0,0 +1,247 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco Systems Inc. 2000
+// All Rights Reserved
+//
+// *******************************************************************
+/* *
+ * File : ViperChannel.cpp *
+ * *
+ * Description : The library functions for Inter-ViperCell signalling transport*
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |06/8/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+
+/*
+ * VxWorks and ANSI C Headers
+ */
+
+#include "assert.h"
+#include "vxworks.h"
+#include "msgqlib.h"
+#include "sockLib.h"
+#include "inetLib.h"
+#include "stdioLib.h"
+#include "strLib.h"
+#include "hostLib.h"
+#include "ioLib.h"
+#include "tasklib.h"
+#include "time.h"
+#include "string.h"
+
+#include "Os/JCTask.h"
+#include "Os/JCModule.h"
+#include "GP10OsTune.h"
+#include "JCC/viperchannel.h"
+#include "MnetModuleId.h"
+
+JCTask ViperChannelTaskObj("ViperChannel");
+
+
+ViperChannelConfiguration_t ViperChannelConfig;
+static ipAddrBuff[INET_ADDR_LEN];
+
+/*
+ * SysCommand_VChan
+ */
+int SysCommand_VChan(T_SYS_CMD action)
+{
+ int tid;
+ switch(action){
+ case SYS_SHUTDOWN:
+ printf("[ViperChannel] Received system shutdown notification\n");
+ break;
+ case SYS_START:
+ printf("[ViperChannel] Received task start notification\n");
+ InitializeViperChannel(TRUE);
+ break;
+ case SYS_REBOOT:
+ printf("[ViperChannel] Reboot ready.\n");
+ break;
+
+ default:
+ printf("[ViperChannel] Unknown system command received\n");
+ }
+ return 0;
+}
+
+/*
+ * InitializeViperChannel
+ */
+void InitializeViperChannel(BOOL SpawnTask)
+{
+ memset(&ViperChannelConfig,0,sizeof(ViperChannelConfiguration_t));
+
+ ViperChannelConfig.Initialized = FALSE;
+
+
+ /* create client's socket */
+
+ if ((ViperChannelConfig.SignalSocket = socket (AF_INET, SOCK_DGRAM, 0)) == ERROR)
+ {
+ perror ("socket");
+ printf("Could not create UDP socket !!\n");
+ return;
+ }
+ else
+ {
+ int AddressSize=0;
+ AddressSize = sizeof(ViperChannelConfig.LocalAddress);
+
+ memset(&ViperChannelConfig.LocalAddress,0,AddressSize);
+ ViperChannelConfig.LocalAddress.sin_family = AF_INET;
+ ViperChannelConfig.LocalAddress.sin_port = htons (VIPERCHANNEL_PORT_NUMBER);
+ ViperChannelConfig.LocalAddress.sin_addr.s_addr = INADDR_ANY;
+
+ if (bind (ViperChannelConfig.SignalSocket,(struct sockaddr *)&ViperChannelConfig.LocalAddress,AddressSize) == ERROR) {
+ perror("bind");
+ printf("Could not bind ViperChannel to local port!!\n");
+ return;
+ }
+ else {
+ ViperChannelConfig.Initialized = TRUE;
+ if (SpawnTask)
+ {
+ if(ViperChannelTaskObj.JCTaskSpawn(
+ VPCHAN_TASK_PRIORITY,
+ VPCHAN_TASK_OPTION,
+ VPCHAN_TASK_STACK_SIZE,
+ (FUNCPTR)ViperChannel,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ MODULE_EXT_VC, JC_CRITICAL_TASK) == ERROR)
+ {
+ printf("Unable to spawn ViperChannel task!!\n");
+ return;
+ }
+ }
+
+
+ }
+
+
+
+ }
+}
+
+
+
+/*
+ * ViperChannel
+ */
+VOID ViperChannel()
+{
+ struct sockaddr_in FromAddress;
+ int AddrSize;
+ static unsigned char Buffer[8000];
+ int Status;
+
+ if (!ViperChannelConfig.Initialized) {
+ printf("Unable to start ViperChannel task since it is not initialized properly\n");
+ return;
+ }
+
+ ViperChannelTaskObj.JCTaskEnterLoop();
+ while(TRUE) {
+ AddrSize = sizeof(FromAddress);
+ memset(&FromAddress,0,AddrSize);
+ memset(Buffer,0,8000);
+ Status = recvfrom
+ (
+ ViperChannelConfig.SignalSocket,
+ (char *)Buffer,
+ 8000,
+ 0,
+ (struct sockaddr *)&FromAddress,
+ &AddrSize
+ );
+ if (Status == ERROR) {
+ printf("Error receiving packet on ViperChannel!!\n");
+ return;
+ }
+ else {
+ ViperChannelPacketHeader_t *PacketHeader;
+ PacketHeader = (ViperChannelPacketHeader_t *)Buffer;
+ if ( (PacketHeader->Magic != VIPERCHANNEL_MAGIC_VALUE) ||
+ (Status < (PacketHeader->DataSize+ sizeof(ViperChannelPacketHeader_t))) )
+ {
+ printf("Invalid packet received on ViperChannel");
+ }
+ else {
+
+#ifdef DEBUG
+ inet_ntoa_b(FromAddress.sin_addr,ipAddrBuff);
+ printf("Received ViperChannel message from ip %s of length %d bytes\n",ipAddrBuff,PacketHeader->DataSize);
+#endif
+ RecvViperChannelMessage(&Buffer[sizeof(ViperChannelPacketHeader_t)],
+ PacketHeader->DataSize,(UINT32)FromAddress.sin_addr.s_addr);
+ }
+
+ }
+ }
+ ViperChannelTaskObj.JCTaskNormExit();
+}
+
+
+
+
+
+/*
+ * ViperChannelSendMessage
+ */
+BOOL
+ViperChannelSendMessage(unsigned char *Packet, int DataSize, UINT32 RemoteAddress)
+{
+ int Status;
+ struct sockaddr_in DestAddress;
+ static char Buffer[8000];
+ ViperChannelPacketHeader_t *PacketHeader;
+ int AddrSize,TotalLen;
+ BOOL RetStatus;
+
+ memset(Buffer,0,8000);
+
+ PacketHeader = (ViperChannelPacketHeader_t *)Buffer;
+ PacketHeader->Magic = VIPERCHANNEL_MAGIC_VALUE;
+ PacketHeader->DataSize = DataSize;
+
+ AddrSize = sizeof(struct sockaddr_in);
+
+ memset(&DestAddress,0,AddrSize);
+
+ DestAddress.sin_family = AF_INET;
+ DestAddress.sin_port = htons(VIPERCHANNEL_PORT_NUMBER);
+ DestAddress.sin_addr.s_addr = RemoteAddress;
+
+ memcpy(&Buffer[sizeof(ViperChannelPacketHeader_t)],Packet,DataSize);
+
+ TotalLen = sizeof(ViperChannelPacketHeader_t) + DataSize;
+#ifdef DEBUG
+ inet_ntoa_b(DestAddress.sin_addr,ipAddrBuff);
+ printf("Sending ViperChannel message to ip %s of length %d bytes\n",ipAddrBuff,PacketHeader->DataSize);
+#endif
+
+ Status = sendto(ViperChannelConfig.SignalSocket,(char *)PacketHeader,TotalLen,0,(struct sockaddr *)&DestAddress,AddrSize);
+ if (Status != ERROR) {
+ RetStatus = TRUE;
+ }
+ else {
+ RetStatus = FALSE;
+ }
+ return(RetStatus);
+}
+
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/jcc/src/JCC_ED.cpp b/data/mnet/GP10/Host/jcc/src/JCC_ED.cpp
new file mode 100644
index 0000000..095839d
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/src/JCC_ED.cpp
@@ -0,0 +1,397 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCC_ED.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : message and ie interface among Application (Layer 3)
+// modules.
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include <vxworks.h>
+#include <stdio.h>
+
+#include "JCC_ED.h"
+#include "lapdm/lapdm_l3intf.h"
+#include "lapdm/lapdm_config.h"
+#include "RIL3/ril3irt.h"
+#include "CC/CCconfig.h"
+
+// *******************************************************************
+// Local function prototypes
+// *******************************************************************
+T_CNI_RIL3_RESULT JCC_RIL3CC_DecodeAlerting (T_CNI_RIL3CC_MSG_ALERTING &);
+T_CNI_RIL3_RESULT JCC_RIL3CC_DecodeCallConfirmed(T_CNI_RIL3CC_MSG_CALL_CONFIRMED &);
+T_CNI_RIL3_RESULT JCC_RIL3CC_DecodeConnect (T_CNI_RIL3CC_MSG_CONNECT &);
+T_CNI_RIL3_RESULT JCC_RIL3CC_DecodeConnectAck (T_CNI_RIL3CC_MSG_CONNECT_ACK &);
+T_CNI_RIL3_RESULT JCC_RIL3CC_DecodeSetup (T_CNI_RIL3CC_MSG_SETUP &);
+T_CNI_RIL3_RESULT JCC_RIL3CC_DecodeDisconnect (T_CNI_RIL3CC_MSG_DISCONNECT &);
+T_CNI_RIL3_RESULT JCC_RIL3CC_DecodeRelease (T_CNI_RIL3CC_MSG_RELEASE &);
+T_CNI_RIL3_RESULT JCC_RIL3SMS_DecodeCpData (T_CNI_RIL3SMS_MSG_CP_DATA &);
+T_CNI_RIL3_RESULT JCC_RIL3SMS_DecodeCpAck (T_CNI_RIL3SMS_MSG_CP_ACK &);
+T_CNI_RIL3_RESULT JCC_RIL3SMS_DecodeCpError (T_CNI_RIL3SMS_MSG_CP_ERROR &);
+T_CNI_RIL3_RESULT JCC_RIL3CC_DecodeReleaseComplete (T_CNI_RIL3CC_MSG_RELEASE_COMPLETE &);
+T_CNI_RIL3_RESULT JCC_RIL3MM_DecodeLocationUpdateRequest(T_CNI_RIL3MM_MSG_LOCATION_UPDATE_REQUEST &);
+T_CNI_RIL3_RESULT JCC_RIL3MM_DecodeCMServiceRequest (T_CNI_RIL3MM_MSG_CM_SERVICE_REQUEST &);
+
+
+T_CNI_RIL3_IE_MOBILE_ID testIMSI[CC_MAX_CC_CALLS_DEF_VAL];
+
+short testIMSIindex;
+
+short origSoftMobDialedNumIndex;
+
+T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER testDialedNum[CC_MAX_CC_CALLS_DEF_VAL];
+
+T_CNI_IRT_ID softMobEntryId[CC_MAX_CC_CALLS_DEF_VAL]
+= {200, 201, 202, 203, 204, 205, 206};
+
+T_CNI_LAPDM_OID softMobLapdmOid[CC_MAX_CC_CALLS_DEF_VAL]
+= {200, 201, 202, 203, 204, 205, 206};
+
+int termSoftMobIndex = 1,
+ origSoftMobIndex = 0;
+
+// The only message that needs any data right now is the Called Party Number
+
+
+T_CNI_RIL3_RESULT JCC_RIL3CC_DecodeAlerting(
+ T_CNI_RIL3CC_MSG_ALERTING &alerting
+ )
+{
+ return CNI_RIL3_RESULT_SUCCESS;
+}
+
+T_CNI_RIL3_RESULT JCC_RIL3CC_DecodeCallConfirmed(
+ T_CNI_RIL3CC_MSG_CALL_CONFIRMED &callConfirmed
+ ) {
+ return CNI_RIL3_RESULT_SUCCESS;
+}
+
+T_CNI_RIL3_RESULT JCC_RIL3CC_DecodeConnect(
+ T_CNI_RIL3CC_MSG_CONNECT &connect
+ ) {
+ return CNI_RIL3_RESULT_SUCCESS;
+}
+
+T_CNI_RIL3_RESULT JCC_RIL3CC_DecodeConnectAck(
+ T_CNI_RIL3CC_MSG_CONNECT_ACK &connectAck
+ ) {
+ return CNI_RIL3_RESULT_SUCCESS;
+}
+
+T_CNI_RIL3_RESULT JCC_RIL3CC_DecodeSetup(
+ T_CNI_RIL3CC_MSG_SETUP &setup
+ ) {
+
+ setup.calledBCD = testDialedNum[origSoftMobDialedNumIndex];
+
+ return CNI_RIL3_RESULT_SUCCESS;
+}
+
+T_CNI_RIL3_RESULT JCC_RIL3CC_DecodeDisconnect(
+ T_CNI_RIL3CC_MSG_DISCONNECT &disconnect
+ ) {
+ return CNI_RIL3_RESULT_SUCCESS;
+}
+
+T_CNI_RIL3_RESULT JCC_RIL3CC_DecodeRelease(
+ T_CNI_RIL3CC_MSG_RELEASE &release
+ ) {
+ return CNI_RIL3_RESULT_SUCCESS;
+}
+
+T_CNI_RIL3_RESULT JCC_RIL3CC_DecodeReleaseComplete(
+ T_CNI_RIL3CC_MSG_RELEASE_COMPLETE &releaseComplete
+ ) {
+ return CNI_RIL3_RESULT_SUCCESS;
+}
+
+T_CNI_RIL3_RESULT JCC_RIL3MM_DecodeLocationUpdateRequest(
+ T_CNI_RIL3MM_MSG_LOCATION_UPDATE_REQUEST &locationUpdateRequest
+ ) {
+ // mandatory IEs
+
+ //T_CNI_RIL3_IE_LOCATION_UPDATE_TYPE
+ locationUpdateRequest.locationUpdateType.locationUpdateType = CNI_RIL3_LOCATION_UPDATE_TYPE_NORMAL;
+
+ // 10.5.3.5
+ // T_CNI_RIL3_IE_CIPHER_KEY
+ locationUpdateRequest.cipherKey.keySeq = CNI_RIL3_NO_KEY_AVAILABLE;
+
+ // 10.5.1.2
+ // T_CNI_RIL3_IE_LOCATION_AREA_ID
+ locationUpdateRequest.locationId.mcc[0] = 2 ;
+ locationUpdateRequest.locationId.mcc[1] = 1 ;
+ locationUpdateRequest.locationId.mcc[2] = 2 ;
+
+ locationUpdateRequest.locationId.mnc[0] = 1;
+ locationUpdateRequest.locationId.mnc[1] = 3;
+
+ locationUpdateRequest.locationId.lac = 5 ;
+
+ // 10.5.1.3
+ // T_CNI_RIL3_IE_MS_CLASSMARK_1
+ locationUpdateRequest.classmark1.revLevel = CNI_RIL3_REV_LEVEL_PHASE1;
+ locationUpdateRequest.classmark1.esInd = CNI_RIL3_EARLY_CLASSMARK_SENDING_NOT_IMPLEMENTED;
+ locationUpdateRequest.classmark1.a51 = CNI_RIL3_A51_AVAILABLE;
+ locationUpdateRequest.classmark1.rfPowerCap = CNI_RIL3_GSM_CLASS_1;
+
+ // 10.5.1.5
+ // T_CNI_RIL3_IE_MOBILE_ID
+ locationUpdateRequest.mobileId = testIMSI[testIMSIindex];
+
+ // 10.5.1.4
+
+ return CNI_RIL3_RESULT_SUCCESS;
+}
+
+T_CNI_RIL3_RESULT JCC_RIL3MM_DecodeCMServiceRequest(
+ T_CNI_RIL3MM_MSG_CM_SERVICE_REQUEST &cmServiceRequest
+ ) {
+ // mandatory IEs
+
+ // T_CNI_RIL3_IE_CM_SERVICE_TYPE
+ cmServiceRequest.cmServiceType.serviceType =
+ CNI_RIL3_CM_SERVICE_TYPE_MO_CALL_OR_PACKET_MODE;
+ // 10.5.3.3
+
+ // T_CNI_RIL3_IE_CIPHER_KEY
+ cmServiceRequest.cipherKey.keySeq = CNI_RIL3_NO_KEY_AVAILABLE;
+ // 10.5.1.2
+
+ // T_CNI_RIL3_IE_MS_CLASSMARK_2
+ cmServiceRequest.classmark2.revLevel = CNI_RIL3_REV_LEVEL_PHASE1;
+ cmServiceRequest.classmark2.esInd = CNI_RIL3_EARLY_CLASSMARK_SENDING_NOT_IMPLEMENTED;
+ cmServiceRequest.classmark2.a51 = CNI_RIL3_A51_AVAILABLE;
+ cmServiceRequest.classmark2.rfPowerCap = CNI_RIL3_GSM_CLASS_1;
+ cmServiceRequest.classmark2.psCap = CNI_RIL3_PS_CAPABILITY_NOT_PRESENT;
+ cmServiceRequest.classmark2.ssScreening = CNI_RIL3_SS_SCREENING_PHASE1_DEFAULT;
+ cmServiceRequest.classmark2.smCap = CNI_RIL3_SM_MT_PTP_NOT_SUPPORTED;
+ cmServiceRequest.classmark2.fcFreqCap = CNI_RIL3_GSM_EXTENTION_BAND_G1_NOT_SUPPORTED;
+ cmServiceRequest.classmark2.classmark3 = CNI_RIL3_CLASSMARK3_INFO_NOTAVAILABLE;
+
+ /* Classmark3 not available
+ cmServiceRequest.classmark2.cmsp = 0;
+ cmServiceRequest.classmark2.a53 = 0;
+ cmServiceRequest.classmark2.a52 = 0;
+ */
+ // 10.5.1.6
+
+ // T_CNI_RIL3_IE_MOBILE_ID
+ cmServiceRequest.mobileId = testIMSI[testIMSIindex];
+ // 10.5.1.4
+
+ return CNI_RIL3_RESULT_SUCCESS;
+}
+
+
+// SMS-PP CP-messages
+T_CNI_RIL3_RESULT JCC_RIL3SMS_DecodeCpData (T_CNI_RIL3SMS_MSG_CP_DATA &cp_data )
+{
+ return CNI_RIL3_RESULT_SUCCESS;
+}
+
+
+T_CNI_RIL3_RESULT JCC_RIL3SMS_DecodeCpAck (T_CNI_RIL3SMS_MSG_CP_ACK &cp_ack )
+{
+ return CNI_RIL3_RESULT_SUCCESS;
+}
+
+
+T_CNI_RIL3_RESULT JCC_RIL3SMS_DecodeCpError (T_CNI_RIL3SMS_MSG_CP_ERROR &cp_error)
+{
+ return CNI_RIL3_RESULT_SUCCESS;
+}
+
+
+T_CNI_RIL3_RESULT
+JCC_RIL3CC_Decode(
+ bool isSoftMob,
+ T_CNI_LAPDM_L3MessageUnit *l3MsgUnit, T_CNI_RIL3CC_MSG *ccMsg)
+{
+ if (isSoftMob == false)
+ return (CNI_RIL3CC_Decode(l3MsgUnit,ccMsg));
+
+ unsigned char *buffer = l3MsgUnit->buffer;
+ int length = l3MsgUnit->msgLength;
+
+ if (length < 2) return CNI_RIL3_INCORRECT_LENGTH;
+
+ // zap the output ccMsg
+ CNI_RIL3_ZAPMSG(ccMsg, sizeof(T_CNI_RIL3CC_MSG));
+
+ // get skip indicator
+ ccMsg->header.si_ti =
+ (T_CNI_RIL3_SI_TI) (buffer[0] >> 4);
+
+ // get message type
+ ccMsg->header.message_type =
+ (T_CNI_RIL3_MESSAGE_TYPE) (buffer[1] & 0x3f);
+
+ switch (ccMsg->header.message_type)
+ {
+ case CNI_RIL3CC_MSGID_ALERTING:
+ return JCC_RIL3CC_DecodeAlerting(
+ ccMsg->alerting
+ );
+ case CNI_RIL3CC_MSGID_CALL_CONFIRMED:
+ return JCC_RIL3CC_DecodeCallConfirmed(
+ ccMsg->callConfirmed
+ );
+ case CNI_RIL3CC_MSGID_CONNECT:
+ return JCC_RIL3CC_DecodeConnect(
+ ccMsg->connect
+ );
+ case CNI_RIL3CC_MSGID_CONNECT_ACKNOWLEDGE:
+ return JCC_RIL3CC_DecodeConnectAck(
+ ccMsg->connectAck
+ );
+ case CNI_RIL3CC_MSGID_EMERGENCY_SETUP:
+ return CNI_RIL3_RESULT_SUCCESS;
+ case CNI_RIL3CC_MSGID_SETUP:
+ return JCC_RIL3CC_DecodeSetup(
+ ccMsg->setup
+ );
+ case CNI_RIL3CC_MSGID_MODIFY:
+ case CNI_RIL3CC_MSGID_MODIFY_COMPLETE:
+ case CNI_RIL3CC_MSGID_MODIFY_REJECT:
+ return CNI_RIL3_RESULT_SUCCESS;
+ case CNI_RIL3CC_MSGID_DISCONNECT:
+ return JCC_RIL3CC_DecodeDisconnect(
+ ccMsg->disconnect
+ );
+ case CNI_RIL3CC_MSGID_RELEASE:
+ return JCC_RIL3CC_DecodeRelease(
+ ccMsg->release
+ );
+ case CNI_RIL3CC_MSGID_RELEASE_COMPLETE:
+ return JCC_RIL3CC_DecodeReleaseComplete(
+ ccMsg->releaseComplete
+ );
+ case CNI_RIL3CC_MSGID_CONGESTION_CONTROL:
+ case CNI_RIL3CC_MSGID_NOTIFY:
+ case CNI_RIL3CC_MSGID_STATUS:
+ case CNI_RIL3CC_MSGID_STATUS_ENQUIRY:
+ default:
+ return CNI_RIL3_UNKNOWN_MESSAGE_TYPE;
+ }
+ return CNI_RIL3_RESULT_SUCCESS;
+}
+
+
+T_CNI_RIL3_RESULT
+JCC_RIL3MM_Decode(
+ bool isSoftMob,
+ T_CNI_LAPDM_L3MessageUnit *l3MsgUnit, T_CNI_RIL3MM_MSG *mmMsg)
+{
+ if (isSoftMob == false)
+ return (CNI_RIL3MM_Decode(l3MsgUnit,mmMsg));
+
+ unsigned char *buffer = l3MsgUnit->buffer;
+ int length = l3MsgUnit->msgLength;
+
+ if (length < 2) return CNI_RIL3_INCORRECT_LENGTH;
+
+ // zap the output mmMsg
+ CNI_RIL3_ZAPMSG(mmMsg, sizeof(T_CNI_RIL3MM_MSG));
+
+ // get message type
+ mmMsg->header.message_type =
+ (T_CNI_RIL3_MESSAGE_TYPE) (buffer[1] & 0x3f);
+
+ switch (mmMsg->header.message_type)
+ {
+ case CNI_RIL3MM_MSGID_IMSI_DETACH_INDICATION:
+ case CNI_RIL3MM_MSGID_LOCATION_UPDATING_REQUEST:
+ return JCC_RIL3MM_DecodeLocationUpdateRequest(
+ mmMsg->locationUpdateRequest
+ );
+ case CNI_RIL3MM_MSGID_AUTHENTICATION_RESPONSE:
+ case CNI_RIL3MM_MSGID_IDENTITY_RESPONSE:
+ case CNI_RIL3MM_MSGID_TMSI_REALLOCATION_COMPLETE:
+ return CNI_RIL3_RESULT_SUCCESS;
+
+ case CNI_RIL3MM_MSGID_CM_SERVICE_ABORT:
+ return CNI_RIL3_RESULT_SUCCESS;
+
+ case CNI_RIL3MM_MSGID_CM_SERVICE_REQUEST:
+ return JCC_RIL3MM_DecodeCMServiceRequest(
+ mmMsg->cmServiceRequest
+ );
+ case CNI_RIL3MM_MSGID_CM_REESTABLISHMENT_REQUEST:
+ case CNI_RIL3MM_MSGID_MM_NULL:
+ default:
+ return CNI_RIL3_UNKNOWN_MESSAGE_TYPE;
+ }
+ return CNI_RIL3_RESULT_SUCCESS;
+}
+
+
+T_CNI_RIL3_RESULT JCC_RIL3SMS_Decode (bool isSoftMob,
+ T_CNI_LAPDM_L3MessageUnit *l3MsgUnit,
+ T_CNI_RIL3SMS_CP_MSG *smsMsg )
+{
+ T_CNI_RIL3_RESULT retVal;
+
+ if (isSoftMob == false)
+ {
+ retVal = CNI_RIL3SMS_CP_Decode (l3MsgUnit, smsMsg); //Real Mode
+ }
+ else
+ {
+ // Test mode
+ unsigned char *buffer = l3MsgUnit->buffer ;
+ int length = l3MsgUnit->msgLength;
+
+ if (length < 2)
+ retVal = CNI_RIL3_INCORRECT_LENGTH;
+ else
+ {
+ // zap the output ccMsg
+ CNI_RIL3_ZAPMSG (smsMsg, sizeof(T_CNI_RIL3SMS_CP_MSG));
+
+ // get skip indicator
+ smsMsg->header.si_ti = (T_CNI_RIL3_SI_TI) (buffer[0] >> 4);
+
+ // get message type
+ smsMsg->header.message_type = (T_CNI_RIL3_CP_MESSAGE_TYPE) (buffer[1] & 0x3f);
+
+ switch (smsMsg->header.message_type)
+ {
+ case CNI_RIL3SMS_MSGID_CP_DATA :
+ retVal = JCC_RIL3SMS_DecodeCpData (smsMsg->cp_data );
+ break;
+
+ case CNI_RIL3SMS_MSGID_CP_ACK :
+ retVal = JCC_RIL3SMS_DecodeCpAck (smsMsg->cp_ack );
+ break;
+
+ case CNI_RIL3SMS_MSGID_CP_ERROR:
+ retVal = JCC_RIL3SMS_DecodeCpError (smsMsg->cp_error);
+ break;
+
+ default:
+ retVal = CNI_RIL3_UNKNOWN_MESSAGE_TYPE;
+ break;
+ }
+ }
+ }
+
+ return (retVal);
+}
+
+
diff --git a/data/mnet/GP10/Host/jcc/src/LUDBMmMsgProc.cpp b/data/mnet/GP10/Host/jcc/src/LUDBMmMsgProc.cpp
new file mode 100644
index 0000000..b973902
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/src/LUDBMmMsgProc.cpp
@@ -0,0 +1,470 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : LUDBMmMsgProc.cpp
+// Author(s) : Kevin S. Lim
+// Create Date : 07-31-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "stdLib.h"
+#include "vxWorks.h"
+#include "taskLib.h"
+#include "usrLib.h"
+#include "errnoLib.h"
+#include "string.h"
+
+// from common vob
+#include "subsc/SubscInfoType.h"
+#include "subsc/SubscInfoUtil.h"
+
+#include "LOGGING/vcmodules.h"
+#include "LOGGING/vclogging.h"
+
+// included L3 Message header for messages from other Layer 3 modules
+#include "JCC/JCCL3Msg.h"
+
+#include "JCC/JCCUtil.h"
+#include "JCC/JCCTimer.h"
+#include "JCC/LUDB.h"
+#include "JCC/LUDBapi.h"
+#include "JCC/LUDBConfig.h"
+
+#include "JCC/LUDBMmMsgProc.h"
+#include "LUDBVoipMsgProc.h"
+
+// Global variable for Message Queue
+extern MSG_Q_ID mmMsgQId;
+extern LUDB gLUDB;
+extern short ludb_auth_required;
+
+// ****************************************************************************
+bool sendLudbRspToMM(LudbMsgStruct *rsp)
+{
+ DBG_FUNC("sendLudbRspToMM", LUDB_LAYER);
+ DBG_ENTER();
+
+ rsp->module_id = MODULE_LUDB;
+ STATUS stat = msgQSend(mmMsgQId, (char *) rsp,
+ sizeof(LudbMsgStruct),
+ NO_WAIT, MSG_PRI_NORMAL);
+ if(stat == ERROR){
+ DBG_ERROR("msgQSend Error\n");
+ DBG_LEAVE();
+ return false;
+ }
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+bool sendMobileRelReqToMM(short mmId)
+{
+ DBG_FUNC("sendMobileRelReqToMM", LUDB_LAYER);
+ DBG_ENTER();
+
+ LudbMsgStruct LudbResponse;
+ LudbResponse.msg_type = LUDB_MM_REL_REQ;
+ LudbResponse.mm_id = mmId;
+
+ bool status = sendLudbRspToMM(&LudbResponse);
+ if(!status) {
+ DBG_ERROR("LudbRespsonse send unsuccessful\n");
+ DBG_LEAVE();
+ return false;
+ }
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+bool sendMobileRegCnfToMM(short mmId, short ludbId, short forceAuth)
+{
+ DBG_FUNC("sendMobileRegCnfToMM", LUDB_LAYER);
+ DBG_ENTER();
+
+ gLUDB.update(ludbId, LUDBEntry::ACTIVE);
+
+ LudbMsgStruct LudbResponse;
+ LudbResponse.msg_type = LUDB_MM_REG_CNF;
+ LudbResponse.mm_id = mmId;
+ LudbResponse.ludb_id = ludbId;
+ LudbResponse.forceAuth = forceAuth;
+
+ bool status = sendLudbRspToMM(&LudbResponse);
+ if(!status) {
+ DBG_ERROR("LudbRespsonse send unsuccessful\n");
+ DBG_LEAVE();
+ return false;
+ }
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+bool sendEmergRspToMM(short mmId, short ludbId)
+{
+ DBG_FUNC("sendEmergRspToMM", LUDB_LAYER);
+ DBG_ENTER();
+
+ gLUDB.update(ludbId, LUDBEntry::EMERGENCY);
+
+ LudbMsgStruct LudbResponse;
+ LudbResponse.msg_type = LUDB_MM_EMERG_RSP;
+ LudbResponse.mm_id = mmId;
+ LudbResponse.ludb_id = ludbId;
+
+ bool status = sendLudbRspToMM(&LudbResponse);
+ if(!status) {
+ DBG_ERROR("LudbRespsonse send unsuccessful\n");
+ DBG_LEAVE();
+ return false;
+ }
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+bool sendRemEmergRspToMM(short mmId)
+{
+ DBG_FUNC("sendRemEmergRspToMM", LUDB_LAYER);
+ DBG_ENTER();
+
+ LudbMsgStruct LudbResponse;
+ LudbResponse.msg_type = LUDB_MM_REM_EMERG_CNF;
+ LudbResponse.mm_id = mmId;
+
+ bool status = sendLudbRspToMM(&LudbResponse);
+ if(!status) {
+ DBG_ERROR("LudbRespsonse send unsuccessful\n");
+ DBG_LEAVE();
+ return false;
+ }
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+bool sendMobileSecRspToMM(short mmId, short ludbId)
+{
+ DBG_FUNC("sendMobileSecRspToMM", LUDB_LAYER);
+ DBG_ENTER();
+
+ gLUDB.update(ludbId, LUDBEntry::ACTIVE);
+
+ LudbMsgStruct LudbResponse;
+ LudbResponse.msg_type = LUDB_MM_SEC_RSP;
+ LudbResponse.mm_id = mmId;
+ LudbResponse.ludb_id = ludbId;
+
+ bool status = sendLudbRspToMM(&LudbResponse);
+ if(!status) {
+ DBG_ERROR("LudbRespsonse send unsuccessful\n");
+ DBG_LEAVE();
+ return false;
+ }
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+bool sendMobileRegRejToMM(short mmId, T_CNI_RIL3_REJECT_CAUSE_VALUE cause)
+{
+ DBG_FUNC("sendMobileRegRejToMM", LUDB_LAYER);
+ DBG_ENTER();
+
+ LudbMsgStruct LudbResponse;
+ LudbResponse.msg_type = LUDB_MM_REG_REJ;
+ LudbResponse.mm_id = mmId;
+ LudbResponse.cause = cause;
+
+ bool status = sendLudbRspToMM(&LudbResponse);
+ if(!status) {
+ DBG_ERROR("LudbRespsonse send unsuccessful\n");
+ DBG_LEAVE();
+ return false;
+ }
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+bool sendMobileUnRegCnfToMM(short mmId)
+{
+ DBG_FUNC("sendMobileUnRegCnfToMM", LUDB_LAYER);
+ DBG_ENTER();
+
+ LudbMsgStruct LudbResponse;
+ LudbResponse.msg_type = LUDB_MM_UNREG_CNF;
+ LudbResponse.mm_id = mmId;
+
+ bool status = sendLudbRspToMM(&LudbResponse);
+ if(!status) {
+ DBG_ERROR("LudbRespsonse send unsuccessful\n");
+ DBG_LEAVE();
+ return false;
+ }
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+bool sendMobileUnRegRejToMM(short mmId)
+{
+ DBG_FUNC("sendMobileUnRegRejToMM", LUDB_LAYER);
+ DBG_ENTER();
+
+ LudbMsgStruct LudbResponse;
+ LudbResponse.msg_type = LUDB_MM_UNREG_REJ;
+ LudbResponse.mm_id = mmId;
+
+ bool status = sendLudbRspToMM(&LudbResponse);
+ if(!status) {
+ DBG_ERROR("LudbRespsonse send unsuccessful\n");
+ DBG_LEAVE();
+ return false;
+ }
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+void LUDB_MM_EmergReqProc(T_CNI_RIL3_IE_MOBILE_ID& mobile_id, short mmId)
+{
+ DBG_FUNC("LUDB_MM_RegReqProc", LUDB_LAYER);
+ DBG_ENTER();
+
+ short ludb_id = gLUDB.registerUser(mobile_id);
+ if(ludb_id != -1){
+ T_SUBSC_INFO subsc;
+ char msisdn[MAX_NUM_SUBSC_ISDN];
+ char imsi[MAX_NUM_SUBSC_IMSI];
+ int i, len;
+
+ subscInfoInitialize(&subsc);
+ switch(mobile_id.mobileIdType){
+ case CNI_RIL3_IMSI:
+ len = (mobile_id.numDigits > MAX_NUM_SUBSC_IMSI)?
+ MAX_NUM_SUBSC_IMSI:mobile_id.numDigits;
+ for(i=0; i<len; i++)
+ imsi[i] = mobile_id.digits[i] + '0';
+ imsi[i] = '\0';
+ subscSetIMSI(&subsc, imsi);
+ case CNI_RIL3_IMEI:
+ case CNI_RIL3_IMEISV:
+ len = (mobile_id.numDigits > MAX_NUM_SUBSC_ISDN)?
+ MAX_NUM_SUBSC_ISDN:mobile_id.numDigits;
+ for(i=0; i<len; i++)
+ msisdn[i] = mobile_id.digits[i] + '0';
+ msisdn[i] = '\0';
+ break;
+ default:
+ DBG_ERROR("unsupported mobile id for EmergencyReq %d\n",
+ mobile_id.mobileIdType);
+ msisdn[0] = '\0';
+ }
+ subscSetMSISDN(&subsc, msisdn);
+ subscSetUserInfo(&subsc, "ViperCell");
+ ludbSetSubscInfoExists(ludb_id, true);
+ gLUDB.update(ludb_id, subsc);
+
+ bool status = sendEmergRspToMM(mmId, ludb_id);
+ if(!status){
+ ludbEntryInit(ludb_id);
+ }
+ }
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void LUDB_MM_RemEmergReqProc(short mmId, short ludb_id)
+{
+ DBG_FUNC("LUDB_MM_RemEmergReqProc", LUDB_LAYER);
+ DBG_ENTER();
+
+ if(ludb_id != -1){
+ LUDBEntry::LUDBState state = gLUDB.getState(ludb_id);
+ if(state == LUDBEntry::EMERGENCY){
+ ludbEntryInit(ludb_id);
+ }
+ else{
+ DBG_ERROR("ludb entry not expecting REM_EMERG_REQ %d\n", ludb_id);
+ }
+ }
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void LUDB_MM_RegReqProc(T_CNI_RIL3_IE_MOBILE_ID& mobile_id, short mmId)
+{
+ DBG_FUNC("LUDB_MM_RegReqProc", LUDB_LAYER);
+ DBG_ENTER();
+ short ludb_id = gLUDB.getEntry(mobile_id);
+
+ if(ludb_id == JCC_ERROR){ // mobile doesn't exist in LUDB
+ ludb_id = gLUDB.registerUser(mobile_id);
+ if(ludb_id != JCC_ERROR){
+ bool status = sendMobileRegReq(mobile_id, mmId, ludb_id, ludb_auth_required);
+ if(!status){
+ ludbEntryInit(ludb_id);
+ sendMobileRegRejToMM(mmId, CNI_RIL3_REJECT_NETWORK_FAILURE);
+ }
+ }
+ else{
+ DBG_ERROR("registerUser failed\n");
+ sendMobileRegRejToMM(mmId, CNI_RIL3_REJECT_CONGESTION);
+ }
+ }
+ else{ // mobile exists in LUDB
+ LUDBEntry::LUDBState state = gLUDB.getState(ludb_id);
+// if(state == LUDBEntry::ACTIVE){
+// sendMobileRegCnfToMM(mmId, ludb_id);
+// }
+// else if((state == LUDBEntry::INACTIVE)||
+// (state == LUDBEntry::LUUNREGISTRJ)){
+ if((state == LUDBEntry::ACTIVE)||
+ (state == LUDBEntry::UNREGREQ) ||
+ (state == LUDBEntry::INACTIVE)){
+ bool status = sendMobileRegReq(mobile_id, mmId, ludb_id, ludb_auth_required);
+ if(!status){
+ ludbEntryInit(ludb_id);
+ sendMobileRegRejToMM(mmId, CNI_RIL3_REJECT_NETWORK_FAILURE);
+ }
+ }
+ else{
+ DBG_ERROR("Ignored: LUDB entry %d was waiting for Network response.\n", ludb_id);
+ sendMobileRelReqToMM(mmId);
+ }
+ }
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void LUDB_MM_UnRegReqProc(T_CNI_RIL3_IE_MOBILE_ID& mobile_id, short mmId)
+{
+ DBG_FUNC("LUDB_MM_UnRegReqProc", LUDB_LAYER);
+ DBG_ENTER();
+ short ludb_id = gLUDB.getEntry(mobile_id);
+
+ if(ludb_id != JCC_ERROR){ // mobile exists in LUDB
+ LUDBEntry::LUDBState state = gLUDB.getState(ludb_id);
+
+ if((state == LUDBEntry::UNREGREQ) ||
+ (state == LUDBEntry::INACTIVE)) {
+ sendMobileUnRegRejToMM(mmId);
+ }
+ else{
+ ludbStartPurgeTimer(ludb_id);
+ gLUDB.update(ludb_id, LUDBEntry::INACTIVE);
+ bool status = sendMobileUnRegCnfToMM(mmId);
+ if(!status) {
+ DBG_ERROR("UnRegistration Confirm send to MM failed\n");
+ }
+
+ // VOIP_MOBILE_HANDLE mobile_handle = gLUDB.getMobileHandle(ludb_id);
+ // DBG_TRACE("Unregister mobile handle %d\n", (int)mobile_handle);
+ // bool status = sendMobileUnRegReq(mobile_handle, mmId, ludb_id);
+ // if(!status){
+ // sendMobileUnRegRejToMM(mmId);
+ // }
+ }
+ }
+ else{ // mobile doesn't exist in LUDB
+ DBG_ERROR("Received IMSI Detach but Mobile not in LUDB\n");
+ sendMobileUnRegRejToMM(mmId);
+ }
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void LUDB_MM_SecReqProc(short mm_id, short ludb_id)
+{
+ DBG_FUNC("LUDB_MM_SecReqProc", LUDB_LAYER);
+ DBG_ENTER();
+
+ T_CNI_RIL3_IE_MOBILE_ID mobile_id = ludbGetMobileId(ludb_id);
+ ludbSetMMId(ludb_id, mm_id);
+
+ bool status = sendMobileSecInfoReq(mobile_id, mm_id, ludb_id, 0);
+ if(!status) {
+ DBG_ERROR("Security Request send to VB failed\n");
+ }
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void LUDB_MM_CipherSetProc(short mm_id, short ludb_id, short algo)
+{
+ DBG_FUNC("LUDB_MM_CipherSetProc", LUDB_LAYER);
+ DBG_ENTER();
+
+ ludbSetCipherAlgo(ludb_id, algo);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void LUDB_MM_MsgProc(LudbMsgStruct *inMsg)
+{
+ DBG_FUNC("LUDB_MM_MsgProc", LUDB_LAYER);
+ DBG_ENTER();
+ short mmId = inMsg->mm_id;
+ T_CNI_RIL3_IE_MOBILE_ID mobile_id;
+
+ switch(inMsg->msg_type)
+ {
+ case LUDB_MM_REG_REQ:
+ DBG_TRACE("LUDB_MM_REG_REQ Received mmId %d\n", mmId);
+ mobile_id = inMsg->mobile_id;
+ LUDB_MM_RegReqProc(mobile_id, mmId);
+ break;
+
+ case LUDB_MM_UNREG_REQ:
+ DBG_TRACE("LUDB_MM_UNREG_REQ Received mmId %d\n", mmId);
+ mobile_id = inMsg->mobile_id;
+ LUDB_MM_UnRegReqProc(mobile_id, mmId);
+ break;
+
+ case LUDB_MM_SEC_REQ:
+ DBG_TRACE("LUDB_MM_SEC_REQ Received mmId %d\n", mmId);
+ LUDB_MM_SecReqProc(mmId, inMsg->ludb_id);
+ break;
+
+ case LUDB_MM_EMERG_REQ:
+ DBG_TRACE("LUDB_MM_EMERG_REQ Received mmId %d\n", mmId);
+ mobile_id = inMsg->mobile_id;
+ LUDB_MM_EmergReqProc(mobile_id, mmId);
+ break;
+
+ case LUDB_MM_REM_EMERG_REQ:
+ DBG_TRACE("LUDB_MM_REM_EMERG_REQ Received mmId %d\n", mmId);
+ LUDB_MM_RemEmergReqProc(mmId, inMsg->ludb_id);
+ break;
+
+ case LUDB_MM_CIPHER_SET:
+ DBG_TRACE("LUDB_MM_CIPHER_SET Received ludbId %d\n", inMsg->ludb_id);
+ LUDB_MM_CipherSetProc(mmId, inMsg->ludb_id, inMsg->algo);
+ break;
+
+
+
+ default:
+ DBG_ERROR("Ludb Error:Unexpected message type %d\n", inMsg->msg_type);
+ }
+ DBG_LEAVE();
+}
+
diff --git a/data/mnet/GP10/Host/jcc/src/LUDBOamMsgProc.cpp b/data/mnet/GP10/Host/jcc/src/LUDBOamMsgProc.cpp
new file mode 100644
index 0000000..adcec7d
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/src/LUDBOamMsgProc.cpp
@@ -0,0 +1,88 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : LudbOamMsgProc.cpp
+// Author(s) : Kevin Lim
+// Create Date : 09-09-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "stdio.h"
+#include "string.h"
+#include "LOGGING/vcmodules.h"
+#include "LOGGING/vclogging.h"
+#include "oam_api.h"
+
+// Ludb Message Constants
+#include "LudbOamMsgProc.h"
+#include "JCC/LudbApi.h"
+
+// OAM Config Data
+
+// Global variable for Message Queue
+extern MSG_Q_ID ludbMsgQId;
+
+
+// ****************************************************************************
+void ludbHandleOpStChanged(INT32 value)
+{
+ DBG_FUNC("ludbHandleOpStChange", LUDB_LAYER);
+ DBG_ENTER();
+ if(value){
+ }
+ else{
+ ludbDataInit();
+ }
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void ludbHandleAuthFreqChanged(INT32 value)
+{
+ DBG_FUNC("ludbHandleAuthFreqChange", LUDB_LAYER);
+ DBG_ENTER();
+ ludbSetAuthFreq((int)value);
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void LUDB_OAM_MsgProc(TrapMsg *trapMsg)
+{
+ DBG_FUNC("LUDB_OAM_MsgProc", LUDB_LAYER);
+ DBG_ENTER();
+
+ if(trapMsg->valType != VT_VALUE){
+ DBG_ERROR("Unexpected valType from OAM trap message: %d\n", trapMsg->valType);
+ DBG_LEAVE();
+ return;
+ }
+
+ switch(trapMsg->mibTag)
+ {
+ case MIB_bts_operationalState:
+ DBG_TRACE("ludbOpStatus MIB Trap received : %d\n", trapMsg->val.varVal);
+ ludbHandleOpStChanged(trapMsg->val.varVal);
+ break;
+ case MIB_rm_nim_0_7:
+ DBG_TRACE("ludbOpStatus MIB Trap received : %d\n", trapMsg->val.varVal);
+ ludbHandleAuthFreqChanged(trapMsg->val.varVal);
+ break;
+
+ default:
+ DBG_ERROR("Unexpected mib tag %d\n", trapMsg->mibTag);
+ }
+ DBG_LEAVE();
+}
diff --git a/data/mnet/GP10/Host/jcc/src/LUDBTask.cpp b/data/mnet/GP10/Host/jcc/src/LUDBTask.cpp
new file mode 100644
index 0000000..6dee184
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/src/LUDBTask.cpp
@@ -0,0 +1,207 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : LUDBTask.cpp
+// Author(s) : Kevin S. Lim
+// Create Date : 04-27-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "stdLib.h"
+#include "vxWorks.h"
+#include "taskLib.h"
+#include "usrLib.h"
+#include "errnoLib.h"
+#include "string.h"
+
+#include "Os/JCTask.h"
+#include "Os/JCModule.h"
+#include "GP10OsTune.h"
+#include "LOGGING//vcmodules.h"
+#include "LOGGING/vclogging.h"
+#include "oam_api.h"
+
+// included L3 Message header for messages from other Layer 3 modules
+#include "JCC/JCCL3Msg.h"
+
+#include "JCC/JCCUtil.h"
+#include "JCC/JCCTimer.h"
+
+#include "JCC/Ludb.h"
+#include "JCC/LUDBConfig.h"
+#include "JCC/LUDBApi.h"
+#include "JCC/LUDBMmMsgProc.h"
+
+#include "LUDBVoipMsgProc.h"
+#include "LUDBOamMsgProc.h"
+#include "LUDBTimerProc.h"
+#include "LudbHashTbl.h"
+
+extern LudbHashTbl *ludbImsiHash;
+
+extern MSG_Q_ID ludbMsgQId;
+JCTask ludbTaskObj("LUDBTask");
+
+// function forward declaration
+int ludbTaskMain();
+void ludbTaskInit();
+
+
+// ****************************************************************************
+int SysCommand_Ludb(T_SYS_CMD action)
+{
+ int tid;
+
+ switch(action){
+ case SYS_SHUTDOWN:
+ printf("[LUDB] Received system shutdown notification\n");
+ ludbDataPrint();
+ break;
+ case SYS_START:
+ printf("[LUDB] Received task start notification\n");
+ ludbTaskInit();
+ tid = ludbTaskObj.JCTaskSpawn(
+ LUDB_TASK_PRIORITY,
+ LUDB_TASK_OPTION,
+ LUDB_TASK_STACK_SIZE,
+ (FUNCPTR)ludbTaskMain,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ MODULE_LUDB, JC_CRITICAL_TASK);
+ break;
+ case SYS_REBOOT:
+ delete ludbImsiHash;
+ printf("[LUDB] Reboot ready.\n");
+ break;
+ default:
+ printf("[LUDB] Unknown system command received\n");
+ }
+ return 0;
+}
+
+// *******************************************************************
+void ludbCfgRead()
+{
+ INT_32_T oam_freq;
+ DBG_FUNC("ludbCfgRead", MM_LAYER);
+ DBG_ENTER();
+
+ STATUS ret;
+
+ if(ret = oam_getMibIntVar(MIB_rm_nim_0_7, &oam_freq)){
+ DBG_ERROR("Failed to initialize auth_freq with OAM:%d\n", ret);
+ DBG_ERROR("Initialized with hard coded default values.\n");
+ }
+ else{
+ ludbHandleAuthFreqChanged(oam_freq);
+ }
+ DBG_LEAVE();
+}
+
+// *******************************************************************
+void ludbSetOAMTraps()
+{
+ DBG_FUNC("ludbSetOAMTraps", LUDB_LAYER);
+ DBG_ENTER();
+ STATUS oamStatus;
+
+ if((oamStatus = oam_setTrap(MODULE_LUDB, ludbMsgQId, MIB_bts_operationalState))
+ != STATUS_OK){
+ DBG_ERROR("oam_setTrap failed (stauts=%d) on MIB_bts_operationalState\n", oamStatus);
+ }
+ if((oamStatus = oam_setTrap(MODULE_LUDB, ludbMsgQId, MIB_rm_nim_0_7))
+ != STATUS_OK){
+ DBG_ERROR("oam_setTrap failed (stauts=%d) on MIB_rm_nim_0_7\n", oamStatus);
+ }
+ DBG_LEAVE();
+}
+
+// *******************************************************************
+void ludbTaskInit()
+{
+ DBG_FUNC("ludbTaskInit", LUDB_LAYER);
+ DBG_ENTER();
+
+ ludbCfgRead();
+
+ ludbDataInit();
+
+ ludbImsiHash = new LudbHashTbl(LUDB_IMSI_HASH_NUM_BUCKET, LUDB_MAX_IMSI_KEY_LEN);
+
+ // create message queue
+ ludbMsgQId = msgQCreate(LUDB_MAX_INCOMING_MSG,
+ LUDB_MAX_MSG_LENGTH,
+ MSG_Q_FIFO);
+
+ if(ludbMsgQId == NULL){
+ DBG_ERROR("Fatal Error on msgQCreate : %d\n", errnoGet());
+ return;
+ }
+
+ ludbSetOAMTraps();
+
+ DBG_LEAVE();
+}
+
+// *******************************************************************
+int ludbTaskMain()
+{
+ DBG_FUNC("ludbTaskMain", LUDB_LAYER);
+ DBG_ENTER();
+
+ char inMsg[LUDB_MAX_MSG_LENGTH];
+
+ ludbTaskObj.JCTaskEnterLoop();
+
+ while(true)
+ {
+ if(msgQReceive( ludbMsgQId, inMsg,
+ LUDB_MAX_MSG_LENGTH,
+ WAIT_FOREVER)
+ == ERROR)
+ {
+ DBG_ERROR("Fatal Error on msgQReceive : %d\n", errnoGet());
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ switch(inMsg[0]){
+ case MODULE_MM:
+ LUDB_MM_MsgProc((LudbMsgStruct *)inMsg);
+ break;
+
+ case MODULE_H323:
+ LUDB_VBLINK_MsgProc((LudbMsgStruct *)inMsg);
+ break;
+
+ case MODULE_OAM:
+ LUDB_OAM_MsgProc((TrapMsg *)inMsg);
+ break;
+
+ case MODULE_LUDB:
+ LudbTimerMsgProc((LudbMsgStruct *)inMsg);
+ break;
+
+ default:
+ DBG_ERROR("Message from unexpected Module: %d\n", inMsg[0]);
+ DBG_LEAVE();
+ return ERROR;
+ }
+ }
+ ludbTaskObj.JCTaskNormExit();
+ DBG_LEAVE();
+ return 0;
+}
+
diff --git a/data/mnet/GP10/Host/jcc/src/LUDBTimerProc.cpp b/data/mnet/GP10/Host/jcc/src/LUDBTimerProc.cpp
new file mode 100644
index 0000000..fff946c
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/src/LUDBTimerProc.cpp
@@ -0,0 +1,84 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : LudbTimerProc.cpp
+// Author(s) : Kevin Lim
+// Create Date : 07-26-99
+// Description :
+//
+// *******************************************************************
+
+// #define DEBUG_MM_HANDOVER
+// #define DEBUG_MM_HANDOVER_EFR
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "taskLib.h"
+#include "stdLib.h"
+#include "string.h"
+#include "LOGGING/vcmodules.h"
+#include "LOGGING/vclogging.h"
+#include "oam_api.h"
+
+// included L3 Message header for messages from other Layer 3 modules (CC, RR)
+#include "JCC/JCCL3Msg.h"
+
+#include "JCC/JCCUtil.h"
+#include "JCC/JCCTimer.h"
+
+// MM Message Constants
+#include "JCC/LUDB.h"
+#include "JCC/LUDBApi.h"
+#include "JCC/LUDBMMMsgProc.h"
+#include "LUDBVoipMsgProc.h"
+
+extern LUDB gLUDB;
+
+// ****************************************************************************
+void LudbTimerMsgProc(LudbMsgStruct *inMsg)
+{
+ DBG_FUNC("LUDB_Timer_MsgProc", LUDB_LAYER);
+ DBG_ENTER();
+
+ short ludb_id = inMsg->ludb_id;
+ short mmId = ludbGetMMId(ludb_id);
+ bool status;
+ switch(inMsg->msg_type)
+ {
+ case LUDB_VBREQ_TIMEOUT:
+ DBG_TRACE("ludb %d vb request timeout\n", ludb_id);
+ status = sendMobileRegRejToMM(mmId, CNI_RIL3_REJECT_NETWORK_FAILURE);
+ if(!status) {
+ DBG_ERROR("Registration Reject send to MM failed\n");
+ }
+ if(gLUDB.getState(ludb_id) == LUDBEntry::SECREQ)
+ gLUDB.update(ludb_id, LUDBEntry::ACTIVE);
+ else
+ ludbEntryInit(ludb_id);
+ break;
+ case LUDB_PURGE_TIMEOUT:
+ DBG_TRACE("ludb %d purge timeout\n", ludb_id);
+
+ T_CNI_RIL3_IE_MOBILE_ID mobile_id = ludbGetMobileId(ludb_id);
+ status = sendMobileUnRegReq(mobile_id, mmId, ludb_id);
+ if(!status){
+ DBG_ERROR("UnRegistration Request send to VB failed\n");
+ }
+ // ludbEntryInit(ludb_id);
+ break;
+ default:
+ DBG_TRACE("Unknown message received from Timer, Msg Type: %d\n", inMsg->msg_type);
+ }
+ DBG_LEAVE();
+}
+
diff --git a/data/mnet/GP10/Host/jcc/src/LUDBVoipMsgProc.cpp b/data/mnet/GP10/Host/jcc/src/LUDBVoipMsgProc.cpp
new file mode 100644
index 0000000..270f438
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/src/LUDBVoipMsgProc.cpp
@@ -0,0 +1,714 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : LUDBVoipMsgProc.cpp
+// Author(s) : Kevin S. Lim
+// Create Date : 07-31-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "stdLib.h"
+#include "vxWorks.h"
+#include "taskLib.h"
+#include "sysLib.h"
+#include "usrLib.h"
+#include "errnoLib.h"
+#include "string.h"
+
+#include "LOGGING/vcmodules.h"
+#include "LOGGING/vclogging.h"
+
+// included L3 Message header for messages from other Layer 3 modules
+#include "JCC/JCCL3Msg.h"
+
+#include "JCC/JCCUtil.h"
+#include "JCC/JCCTimer.h"
+
+#include "JCC/LUDB.h"
+#include "JCC/LUDBConfig.h"
+#include "JCC/LUDBApi.h"
+#include "JCC/LUDBMMMsgProc.h"
+
+#include "LUDBVoipMsgProc.h"
+
+#include "voip/vblink.h"
+#include "cc/cc_util_ext.h"
+
+extern LUDB gLUDB;
+extern short ludb_auth_required;
+
+extern void ludbMakeDefaultSubscMsg(char *msg, short *size);
+
+bool ludbRunRegTest = false;
+T_CNI_RIL3_IE_MOBILE_ID ludbRunRegTestMob;
+WDOG_ID ludbRunRegTestWID;
+int ludbRunRegTestTick;
+
+bool ludbAutoLog = false;
+
+bool ludb_auth_testmode = false;
+char ludb_auth_testcksn = 0;
+T_AUTH_TRIPLET cipher_testtriplet;
+
+// ****************************************************************************
+// StartAuthMode sets test mode for Authentication testing.
+// ****************************************************************************
+int StartAuthMode(int cksn, unsigned char lsb)
+{
+ int i;
+ if(ludb_auth_testmode){
+ printf("[LUDB] Test Authentication Mode already turned on.\n");
+ return -1;
+ }
+ else{
+ ludb_auth_testmode = 1;
+ ludb_auth_required = 1;
+ if(cksn >= 7)
+ printf(" CKSN value should be smaller than 7\n");
+ else
+ ludb_auth_testcksn = cksn;
+
+ for(i=0; i<SEC_RAND_LEN; i++) cipher_testtriplet.RAND[i] = 0xFF;
+ cipher_testtriplet.RAND[SEC_RAND_LEN-1] = lsb;
+
+ printf("\n[LUDB] Test Authentication Mode is now turned on.\n");
+ printf("(Mobile Location Update will initiate authentication without VB auth.)\n\n");
+ printf("StartAuthMode(cksn=%d, Random LSB=0x%x)\n", cksn, lsb);
+ printf("Random is set to: 0x");
+ for(i=0; i<SEC_RAND_LEN; i++) printf("%02x", cipher_testtriplet.RAND[i]);
+ printf("\n");
+ return 0;
+ }
+}
+
+// ****************************************************************************
+int StopAuthMode()
+{
+ if(!ludb_auth_testmode){
+ printf("[LUDB] Test Authentication Mode already turned off.\n");
+ return -1;
+ }
+ else{
+ ludb_auth_testmode = 0;
+ ludb_auth_required = 0;
+ printf("[LUDB] Test Authentication Mode is now turned off.\n");
+ printf(" (Mobile Location Update will work normal.)\n");
+ return 0;
+ }
+}
+
+// ****************************************************************************
+void ludbSendRegTest()
+{
+ if(!ludbRunRegTest) return;
+
+ short ludbId = ludbGetEntryByMobileId(ludbRunRegTestMob);
+
+ bool status;
+ if(ludbId > -1){
+ printf("\n[LUDB] Sending UnReg Request.\n");
+ status = VBLinkUnregisterMobile(ludbRunRegTestMob);
+ if(!status) {
+ printf("UnRegistration API call unsuccessful\n");
+ }
+ else{
+ printf("ludb %d ->VBLink MobileUnRegRequest\n", ludbId);
+ ludbStartVBReqTimer(ludbId);
+ gLUDB.update(ludbId, LUDBEntry::UNREGREQ);
+ }
+ }
+ else{
+ ludbId = gLUDB.registerUser(ludbRunRegTestMob);
+ printf("\n[LUDB] Sending Reg Request.\n");
+ status = VBLinkRegisterMobile(ludbRunRegTestMob);
+ if(!status) {
+ printf("Registration API call unsuccessful\n");
+ }
+ else{
+ printf("ludb %d ->VBLink MobileRegRequest\n", ludbId);
+ ludbStartVBReqTimer(ludbId);
+ gLUDB.update(ludbId, LUDBEntry::REGREQ);
+ }
+ }
+
+ if(ludbRunRegTest){
+ if(wdStart(ludbRunRegTestWID, ludbRunRegTestTick,
+ (FUNCPTR)ludbSendRegTest, ludbId)){
+ printf("[LUDB] wdStart Error!\n");
+ }
+ }
+
+}
+
+// ****************************************************************************
+int ludbRegTestStart(char *imsi, int interval)
+{
+ if(imsi == 0){
+ printf("usage: ludbRegTestStart(char *imsi, int interval) - interval in seconds\n");
+ return -1;
+ }
+ if(interval == 0){
+ printf("usage: ludbRegTestStart(char *imsi, int interval) - interval in seconds\n");
+ return -1;
+ }
+ if(ludbRunRegTest){
+ printf("[LUDB] RegTest already started.\n");
+ return -1;
+ }
+ else{
+ printf("[LUDB] RegTest is now started.\n");
+ printf("[LUDB] IMSI: %s\n", imsi);
+ printf("[LUDB] every %d seconds\n", interval);
+ int len = strlen(imsi);
+
+ ludbRunRegTestMob.mobileIdType = CNI_RIL3_IMSI;
+ ludbRunRegTestMob.ie_present = true;
+ ludbRunRegTestMob.numDigits = len;
+ for(int i=0; i<len; i++){
+ ludbRunRegTestMob.digits[i] = imsi[i] - '0';
+ }
+ ludbRunRegTest = true;
+ ludbRunRegTestWID = wdCreate();
+ ludbRunRegTestTick = interval * sysClkRateGet();
+ ludbSendRegTest();
+ return 0;
+ }
+}
+
+// ****************************************************************************
+int ludbRegTestStop()
+{
+ if(!ludbRunRegTest){
+ printf("[LUDB] RegTest already stopped.\n");
+ return -1;
+ }
+ else{
+ printf("[LUDB] RegTest is now stopped.\n");
+ ludbRunRegTest = false;
+
+ return 0;
+ }
+}
+
+// ****************************************************************************
+// message sent to vblink
+// RRQ
+// URQ
+// SRQ
+// ****************************************************************************
+bool sendMobileRegReq( T_CNI_RIL3_IE_MOBILE_ID& mobileId, short mmId, short ludbId, short fSec)
+{
+ DBG_FUNC("sendMobileRegReq", LUDB_LAYER);
+ DBG_ENTER();
+
+ ludbStopPurgeTimer(ludbId); // stop purge timer if it was running
+
+ ludbSetMMId(ludbId, mmId);
+
+ bool status = VBLinkRegisterMobile(mobileId);
+ if(!status) {
+ DBG_ERROR("Registration API call unsuccessful\n");
+ DBG_LEAVE();
+ return false;
+ }
+ else{
+ DBG_TRACE("ludb %d ->VBLink MobileRegRequest\n", ludbId);
+ ludbStartVBReqTimer(ludbId);
+ if(fSec)
+ gLUDB.update(ludbId, LUDBEntry::REGTHENSEC);
+ else
+ gLUDB.update(ludbId, LUDBEntry::REGREQ);
+ }
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+bool sendMobileUnRegReq( T_CNI_RIL3_IE_MOBILE_ID& mobileId, short mmId, short ludbId)
+{
+ DBG_FUNC("sendMobileUnRegReq", LUDB_LAYER);
+ DBG_ENTER();
+
+ bool status = VBLinkUnregisterMobile(mobileId);
+ if(!status) {
+ DBG_ERROR("UnRegistration API call unsuccessful\n");
+ DBG_LEAVE();
+ return false;
+ }
+ else{
+ DBG_TRACE("ludb %d ->VBLink MobileUnRegRequest\n", ludbId);
+ ludbStartVBReqTimer(ludbId);
+ gLUDB.update(ludbId, LUDBEntry::UNREGREQ);
+ }
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+bool sendMobileSecInfoReq( T_CNI_RIL3_IE_MOBILE_ID& mobileId, short mmId, short ludbId, short fReg)
+{
+ DBG_FUNC("sendMobileSecInfoReq", LUDB_LAYER);
+ DBG_ENTER();
+
+ ludbSetMMId(ludbId, mmId);
+
+ bool status = VBLinkSecurityRequest(mobileId);
+ if(!status) {
+ DBG_ERROR("Security Info Req API call unsuccessful\n");
+ DBG_LEAVE();
+ return false;
+ }
+ else{
+ DBG_TRACE("ludb %d ->VBLink SecurityInfoRequest\n", ludbId);
+ ludbStartVBReqTimer(ludbId);
+ if(fReg)
+ gLUDB.update(ludbId, LUDBEntry::SECINREG);
+ else
+ gLUDB.update(ludbId, LUDBEntry::SECREQ);
+ }
+
+ DBG_LEAVE();
+ return true;
+}
+
+// *******************************************************************
+// message received from vblink
+// RCF
+// RRJ
+// UCF
+// URJ
+// SPI
+// SRS
+// URQ
+// *******************************************************************
+void LUDB_VBLINK_RCFMsgProc(LudbMsgStruct *inMsg)
+{
+ DBG_FUNC("LUDB_VBLINK_RCFMsgProc", LUDB_LAYER);
+ DBG_ENTER();
+
+ short ludb_id = ludbGetEntryByMobileId(inMsg->mobile_id);
+ if(ludb_id == -1){
+ DBG_ERROR("Received RCF on entry that can't be found by mobile_id\n");
+ DBG_LEAVE();
+ return;
+ }
+
+ DBG_TRACE("ludb %d registration confirmed\n", ludb_id);
+ ludbStopVBReqTimer(ludb_id);
+
+ if(ludbRunRegTest){
+ printf("[LUDB] Registration Confirm Received.\n");
+ gLUDB.update(ludb_id, LUDBEntry::ACTIVE);
+ return;
+ }
+
+/* shmin 08/20 changed mcpla: this funtion to Profile function
+
+ short mmId = ludbGetMMId(ludb_id);
+ if(mmId == -1){
+ DBG_ERROR("Received RCF on entry that has no mm_id set\n");
+ DBG_LEAVE();
+ return;
+ }
+
+ LUDBEntry::LUDBState state = gLUDB.getState(ludb_id);
+ bool status;
+ if(state == LUDBEntry::REGREQ){
+ status = sendMobileRegCnfToMM(mmId, ludb_id, 0);
+ if(!status) {
+ DBG_ERROR("Registration Confirm send to MM failed\n");
+ }
+ }
+ else if(state == LUDBEntry::REGTHENSEC){
+ if(ludb_auth_testmode){
+ DBG_TRACE("auth_testmode encountered. bypass sec req to VB.\n");
+ status = sendMobileRegCnfToMM(mmId, ludb_id, 0);
+ DBG_LEAVE();
+ return;
+ }
+
+ short ret = ludbCheckAuthCount(ludb_id);
+ if(ret == 0){ // okay to use the cureent security key
+ DBG_TRACE("Reuse Security Key for ludb %d\n", ludb_id);
+ status = sendMobileRegCnfToMM(mmId, ludb_id, 0);
+ if(!status) {
+ DBG_ERROR("Registration Confirm send to MM failed\n");
+ }
+ }
+ else if(ret == 1){ // get a new set
+ DBG_TRACE("Get a new Security Key for ludb %d\n", ludb_id);
+ status = sendMobileSecInfoReq(inMsg->mobile_id, mmId, ludb_id, 1);
+ if(!status) {
+ DBG_ERROR("SecReq after RegCnf to VB failed\n");
+ }
+ }
+ else if(ret == -1){
+ DBG_ERROR("possible error: ludb_id out of bound\n");
+ }
+ }
+ else{
+ DBG_ERROR("unknown state in RegCnf: %d\n", state);
+ }
+*/
+ DBG_LEAVE();
+}
+
+// *******************************************************************
+void LUDB_VBLINK_RRJMsgProc(LudbMsgStruct *inMsg)
+{
+ DBG_FUNC("LUDB_VBLINK_RRJMsgProc", LUDB_LAYER);
+ DBG_ENTER();
+
+ short ludb_id = ludbGetEntryByMobileId(inMsg->mobile_id);
+ if(ludb_id == -1){
+ DBG_ERROR("Received RRJ on entry that can't be found by mobile_id\n");
+ DBG_LEAVE();
+ return;
+ }
+
+ DBG_TRACE("ludb %d registration rejected by VBLINK\n", ludb_id);
+ ludbStopVBReqTimer(ludb_id);
+
+ if(ludbRunRegTest){
+ printf("[LUDB] Registration Reject Received. ludb_id %d\n", ludb_id);
+ ludbEntryInit(ludb_id);
+ return;
+ }
+
+ short mmId = ludbGetMMId(ludb_id);
+ if(mmId == -1){
+ DBG_ERROR("Received RRJ on entry that has no mm_id set\n");
+ DBG_LEAVE();
+ return;
+ }
+ bool status = sendMobileRegRejToMM(mmId, CNI_RIL3_REJECT_NATIONAL_ROAMING_NOT_ALLOWED);
+ if(!status) {
+ DBG_ERROR("Registration Reject send to MM failed\n");
+ }
+
+ ludbEntryInit(ludb_id);
+ DBG_LEAVE();
+}
+
+// *******************************************************************
+void LUDB_VBLINK_UCFMsgProc(LudbMsgStruct *inMsg)
+{
+ DBG_FUNC("LUDB_VBLINK_UCFMsgProc", LUDB_LAYER);
+ DBG_ENTER();
+
+ short ludb_id = ludbGetEntryByMobileId(inMsg->mobile_id);
+ if(ludb_id == -1){
+ DBG_ERROR("Received UCF on entry that can't be found by mobile_id\n");
+ DBG_LEAVE();
+ return;
+ }
+
+ DBG_TRACE("ludb %d unregistration confirmed\n", ludb_id);
+ ludbStopVBReqTimer(ludb_id);
+
+// VOIP_MOBILE_HANDLE mobile_handle = VOIP_NULL_MOBILE_HANDLE;
+// gLUDB.update(ludb_id, mobile_handle);
+// ludbStartPurgeTimer(ludb_id);
+// gLUDB.update(ludb_id, LUDBEntry::INACTIVE);
+
+// short mmId = ludbGetMMId(ludb_id);
+// bool status = sendMobileUnRegCnfToMM(mmId);
+// if(!status) {
+// DBG_ERROR("UnRegistration Confirm send to MM failed\n");
+// }
+
+ ludbEntryInit(ludb_id);
+ DBG_LEAVE();
+}
+
+// *******************************************************************
+void LUDB_VBLINK_URJMsgProc(LudbMsgStruct *inMsg)
+{
+ DBG_FUNC("LUDB_VBLINK_URJMsgProc", LUDB_LAYER);
+ DBG_ENTER();
+
+ short ludb_id = ludbGetEntryByMobileId(inMsg->mobile_id);
+ if(ludb_id == -1){
+ DBG_ERROR("Received URJ on entry that can't be found by mobile_id\n");
+ DBG_LEAVE();
+ return;
+ }
+
+ DBG_TRACE("ludb %d unregistration rejected by VBLINK\n", ludb_id);
+ ludbStopVBReqTimer(ludb_id);
+
+ short mmId = ludbGetMMId(ludb_id);
+
+ bool status = sendMobileUnRegRejToMM(mmId);
+ if(!status) {
+ DBG_ERROR("UnRegistration Reject send to MM failed\n");
+ }
+
+ ludbEntryInit(ludb_id);
+ DBG_LEAVE();
+}
+
+// *******************************************************************
+void LUDB_VBLINK_SPIMsgProc(LudbMsgStruct *inMsg)
+{
+ DBG_FUNC("LUDB_VBLINK_PRSMsgProc", LUDB_LAYER);
+ DBG_ENTER();
+
+ short ludb_id = ludbGetEntryByMobileId(inMsg->mobile_id);
+ if(ludb_id == -1){
+ DBG_ERROR("Received SPI on entry that can't be found by mobile_id\n");
+ ludb_id = gLUDB.registerUser(inMsg->mobile_id);
+ if(ludb_id < 0){
+ DBG_LEAVE();
+ return;
+ }
+ ludbStopVBReqTimer(ludb_id);
+ gLUDB.update(ludb_id, LUDBEntry::ACTIVE);
+ }
+
+ DBG_TRACE("ludb %d user profile received\n", ludb_id);
+
+ short size = (short)inMsg->vb_msg_size;
+ char vb_msg[400];
+ char *msg;
+
+ if(size > VB_MAX_MSG_LENGTH){
+ DBG_ERROR("Profile from ViperBase is too large\n");
+ DBG_LEAVE();
+ return;
+ }
+ else if(size == 0) {
+ msg = vb_msg;
+ ludbMakeDefaultSubscMsg(msg, &size);
+ }
+ else{
+ msg = inMsg->vb_msg;
+ }
+
+ short ret = ludbSetDecodeSubscInfo(ludb_id, (unsigned char *)msg, size);
+ if(ret){
+ DBG_ERROR("ludbSetDecodeSubscInfo returned Error\n");
+ printSubscMsg((unsigned char *)msg, size);
+ }
+ else{
+ ludbSetSubscInfoExists(ludb_id, true);
+ }
+ short mmId = ludbGetMMId(ludb_id);
+ if(mmId == -1){
+ DBG_ERROR("Received RCF on entry that has no mm_id set\n");
+ DBG_LEAVE();
+ return;
+ }
+
+// shmin 08/20 mcpla function change the RegCnfToMM message to here
+
+ LUDBEntry::LUDBState state = gLUDB.getState(ludb_id);
+ bool status;
+ if(state == LUDBEntry::REGREQ){
+ status = sendMobileRegCnfToMM(mmId, ludb_id, 0);
+ if(!status) {
+ DBG_ERROR("Registration Confirm send to MM failed\n");
+ }
+ }
+ else if(state == LUDBEntry::REGTHENSEC){
+ if(ludb_auth_testmode){
+ DBG_TRACE("auth_testmode encountered. bypass sec req to VB.\n");
+ status = sendMobileRegCnfToMM(mmId, ludb_id, 0);
+ DBG_LEAVE();
+ return;
+ }
+
+ short ret = ludbCheckAuthCount(ludb_id);
+ if(ret == 0){ // okay to use the cureent security key
+ DBG_TRACE("Reuse Security Key for ludb %d\n", ludb_id);
+ status = sendMobileRegCnfToMM(mmId, ludb_id, 0);
+ if(!status) {
+ DBG_ERROR("Registration Confirm send to MM failed\n");
+ }
+ }
+ else if(ret == 1){ // get a new set
+ DBG_TRACE("Get a new Security Key for ludb %d\n", ludb_id);
+ status = sendMobileSecInfoReq(inMsg->mobile_id, mmId, ludb_id, 1);
+ if(!status) {
+ DBG_ERROR("SecReq after RegCnf to VB failed\n");
+ }
+ }
+ else if(ret == -1){
+ DBG_ERROR("possible error: ludb_id out of bound\n");
+ }
+ }
+ else{
+ DBG_ERROR("unknown state in RegCnf: %d\n", state);
+ }
+
+ DBG_LEAVE();
+}
+
+// *******************************************************************
+void LUDB_VBLINK_SRSMsgProc(LudbMsgStruct *inMsg)
+{
+ short AuC_failure = 0;
+
+ DBG_FUNC("LUDB_VBLINK_SRSMsgProc", LUDB_LAYER);
+ DBG_ENTER();
+
+ short ludb_id = ludbGetEntryByMobileId(inMsg->mobile_id);
+ if(ludb_id == -1){
+ DBG_ERROR("Received SRS on entry that can't be found by mobile_id\n");
+ DBG_LEAVE();
+ return;
+ }
+
+ DBG_TRACE("ludb %d security info received\n", ludb_id);
+ ludbStopVBReqTimer(ludb_id);
+
+ if(inMsg->vb_msg_size == 1){
+ T_AUTH_TRIPLET triplet;
+ memcpy((char *)&triplet, inMsg->vb_msg, sizeof(T_AUTH_TRIPLET));
+ gLUDB.update(ludb_id, triplet);
+ }
+ else{
+ AuC_failure = 1;
+ DBG_TRACE("!!!!zero SRS!!!!\n");
+ }
+
+ short mmId = ludbGetMMId(ludb_id);
+ if(mmId == -1){
+ DBG_ERROR("No mmId in ludb entry for SRS\n");
+ DBG_LEAVE();
+ return;
+ }
+
+ LUDBEntry::LUDBState state = gLUDB.getState(ludb_id);
+ bool status;
+ if(state == LUDBEntry::SECINREG){
+ if(AuC_failure){
+ status = sendMobileRegRejToMM(mmId, CNI_RIL3_REJECT_NETWORK_FAILURE);
+ if(!status) {
+ DBG_ERROR("Registration Reject send to MM failed\n");
+ }
+ status = sendMobileUnRegReq(inMsg->mobile_id, mmId, ludb_id);
+ if(!status){
+ DBG_ERROR("UnRegistration Request send to VB failed\n");
+ }
+ }
+ else{
+ status = sendMobileRegCnfToMM(mmId, ludb_id, 1);
+ if(!status) {
+ DBG_ERROR("Registration Confirm send to MM failed\n");
+ }
+ }
+ }
+ else if(state == LUDBEntry::SECREQ){
+ status = sendMobileSecRspToMM(mmId, ludb_id);
+ if(!status) {
+ DBG_ERROR("Security Info Response send to MM failed\n");
+ }
+ }
+ else{
+ DBG_ERROR("unknown state in SRS\n");
+ }
+ DBG_LEAVE();
+}
+
+// *******************************************************************
+void LUDB_VBLINK_URQMsgProc(LudbMsgStruct *inMsg)
+{
+ DBG_FUNC("LUDB_VBLINK_URQMsgProc", LUDB_LAYER);
+ DBG_ENTER();
+
+ short ludb_id = ludbGetEntryByMobileId(inMsg->mobile_id);
+ if(ludb_id == -1){
+ DBG_ERROR("Received URQ on entry that can't be found by mobile_id\n");
+ DBG_LEAVE();
+ return;
+ }
+
+ // <Igal: 04-10-01>
+ // Notify affected CC Sessions
+ CcNotifyPurge (ludb_id);
+ DBG_TRACE("ludb %d unregistered by VBLINK request\n", ludb_id);
+ ludbEntryInit(ludb_id);
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+// ****************************************************************************
+int ludbAutoLogStart()
+{
+ if(ludbAutoLog){
+ printf("[LUDB] AutoLog already started.\n");
+ return -1;
+ }
+ else{
+ printf("[LUDB] AutoLog is now started.\n");
+ ludbAutoLog = true;
+ return 0;
+ }
+}
+
+// ****************************************************************************
+int ludbAutoLogStop()
+{
+ if(!ludbAutoLog){
+ printf("[LUDB] AutoLog already stopped.\n");
+ return -1;
+ }
+ else{
+ printf("[LUDB] AutoLog is now stopped.\n");
+ ludbAutoLog = false;
+ return 0;
+ }
+}
+
+// *******************************************************************
+void LUDB_VBLINK_MsgProc(LudbMsgStruct *inMsg)
+{
+ DBG_FUNC("LUDB_VBLINK_MsgProc", LUDB_LAYER);
+ DBG_ENTER();
+ // force mobile_id type fields
+ inMsg->mobile_id.ie_present = 1;
+ inMsg->mobile_id.mobileIdType = CNI_RIL3_IMSI;
+ switch(inMsg->msg_type){
+ case VOIP_LUDB_REG_CNF:
+ LUDB_VBLINK_RCFMsgProc(inMsg);
+ break;
+ case VOIP_LUDB_REG_REJ:
+ LUDB_VBLINK_RRJMsgProc(inMsg);
+ break;
+ case VOIP_LUDB_UNREG_CNF:
+ LUDB_VBLINK_UCFMsgProc(inMsg);
+ break;
+ case VOIP_LUDB_UNREG_REJ:
+ LUDB_VBLINK_URJMsgProc(inMsg);
+ break;
+ case VOIP_LUDB_SPI_IND:
+ LUDB_VBLINK_SPIMsgProc(inMsg);
+ break;
+ case VOIP_LUDB_SEC_RSP:
+ LUDB_VBLINK_SRSMsgProc(inMsg);
+ break;
+ case VOIP_LUDB_UNREG_REQ:
+ LUDB_VBLINK_URQMsgProc(inMsg);
+ break;
+ default:
+ DBG_ERROR("Received unknown message type from VOIP: %d\n",
+ inMsg->msg_type);
+ }
+ if((ludbRunRegTest)||(ludbAutoLog)) ludbDataPrint();
+ DBG_LEAVE();
+}
+
diff --git a/data/mnet/GP10/Host/jcc/src/Makefile b/data/mnet/GP10/Host/jcc/src/Makefile
new file mode 100644
index 0000000..50a370e
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/src/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = jcc
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\$(THIS_APP_DIR).out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/jcc/src_api/JCCLog.cpp b/data/mnet/GP10/Host/jcc/src_api/JCCLog.cpp
new file mode 100644
index 0000000..d8ccb84
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/src_api/JCCLog.cpp
@@ -0,0 +1,107 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCCLog.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 10-19-98
+// Description : implementation for - JCCLog
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "JCC/JCCLog.h"
+#include "vxWorks.h"
+#include "logLib.h"
+#include "time.h"
+#include "string.h"
+
+int __JCCLog(const char *logText)
+{
+ struct tm currTime;
+
+ time_t timeInSecs = time(NULL);
+
+ char outText[161];
+
+ // Initialize to an empty string
+ outText[0] = '\0';
+
+ strcat(outText, "T::%d:%d:%d: ");
+
+ strcat(outText, logText);
+
+ localtime_r(&timeInSecs, &currTime);
+
+ logMsg(outText, currTime.tm_hour, currTime.tm_min, currTime.tm_sec, 0, 0, 0);
+}
+
+int __JCCLog1(const char *logText, int arg1)
+{
+ struct tm currTime;
+
+ time_t timeInSecs = time(NULL);
+
+ char outText[161];
+
+ // Initialize to an empty string
+ outText[0] = '\0';
+
+ strcat(outText, "T::%d:%d:%d: ");
+
+ strcat(outText, logText);
+
+ localtime_r(&timeInSecs, &currTime);
+
+ logMsg(outText, currTime.tm_hour, currTime.tm_min, currTime.tm_sec, arg1, 0, 0);
+}
+
+int __JCCLog2(const char *logText, int arg1, int arg2)
+{
+ struct tm currTime;
+
+ time_t timeInSecs = time(NULL);
+
+ char outText[161];
+
+ // Initialize to an empty string
+ outText[0] = '\0';
+
+ strcat(outText, "T::%d:%d:%d: ");
+
+ strcat(outText, logText);
+
+ localtime_r(&timeInSecs, &currTime);
+
+ logMsg(outText, currTime.tm_hour, currTime.tm_min, currTime.tm_sec, arg1, arg2, 0);
+}
+
+int __JCCLog3(const char *logText, int arg1, int arg2, int arg3)
+{
+ struct tm currTime;
+
+ time_t timeInSecs = time(NULL);
+
+ char outText[161];
+
+ // Initialize to an empty string
+ outText[0] = '\0';
+
+ strcat(outText, "T::%d:%d:%d: ");
+
+ strcat(outText, logText);
+
+ localtime_r(&timeInSecs, &currTime);
+
+ logMsg(outText, currTime.tm_hour, currTime.tm_min, currTime.tm_sec, arg1, arg2, arg3);
+}
diff --git a/data/mnet/GP10/Host/jcc/src_api/JCCTimer.cpp b/data/mnet/GP10/Host/jcc/src_api/JCCTimer.cpp
new file mode 100644
index 0000000..546a2d8
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/src_api/JCCTimer.cpp
@@ -0,0 +1,95 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCCTimer.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 10-19-98
+// Description : interface specification for - JCCTimer
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "JCC/JCCTimer.h"
+
+#include "JCC/JCCLog.h"
+
+void JCCTimer::cancelTimer()
+{
+ if (timerSet_ == true)
+ {
+ wdCancel(timerId_);
+ timerSet_ = false;
+ }
+}
+
+JCCTimer::~JCCTimer()
+{
+ wdDelete(timerId_);
+}
+
+JCCTimer::JCCTimer( FUNCPTR fPtr,
+ int timerData )
+ :timerData_(timerData),
+ funcPtr_(fPtr),
+ timerSet_(false)
+{
+
+ if ((timerId_ = wdCreate()) == NULL)
+ {
+ // Handle Operating System Resource Allocation Error
+ JCCLog("JCC Error - Operating System Resource Allocation Error:\n");
+ JCCLog(" - WatchDog Timer could not be created.\n");
+ }
+}
+
+JCCTimer::JCCTimer( FUNCPTR fPtr)
+ :timerData_(-1),
+ funcPtr_(fPtr),
+ timerSet_(false)
+{
+
+ if ((timerId_ = wdCreate()) == NULL)
+ {
+ // Handle Operating System Resource Allocation Error
+ JCCLog("JCC Error - Operating System Resource Allocation Error:\n");
+ JCCLog(" - WatchDog Timer could not be created.\n");
+ }
+}
+
+void JCCTimer::setTimer(int howLong)
+{
+ if (timerSet_ == true)
+ {
+ cancelTimer();
+ }
+
+ wdStart(timerId_, howLong, funcPtr_, timerData_);
+ timerSet_ = true;
+
+}
+
+void JCCTimer::setTimer(int howLong, int timerData)
+{
+ if (timerSet_ == true)
+ {
+ cancelTimer();
+ }
+
+ timerData_ = timerData;
+ wdStart(timerId_, howLong, funcPtr_, timerData_);
+ timerSet_ = true;
+
+}
+
+
diff --git a/data/mnet/GP10/Host/jcc/src_api/JCCUtil.cpp b/data/mnet/GP10/Host/jcc/src_api/JCCUtil.cpp
new file mode 100644
index 0000000..2d82112
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/src_api/JCCUtil.cpp
@@ -0,0 +1,97 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : JCCUtil.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include <stdio.h>
+
+// included MD and IRT headers
+#include "JCC/JCCUtil.h"
+#include "JCC/JCCEvent.h"
+#include "JCC/JCCState.h"
+
+// Utility functions
+
+int
+operator==(const T_CNI_L3_ID& lhs, const T_CNI_L3_ID& rhs) {
+
+ return ( (lhs.msgq_id == rhs.msgq_id) &&
+ (lhs.sub_id == lhs.sub_id) );
+}
+
+
+
+// Mobile Id comparison. -gz
+int
+operator==(const T_CNI_RIL3_IE_MOBILE_ID& lhs,
+ const T_CNI_RIL3_IE_MOBILE_ID& rhs)
+{
+
+ if ( ( lhs.ie_present && rhs.ie_present) &&
+ lhs.mobileIdType == rhs.mobileIdType )
+ {
+ if (lhs.mobileIdType == CNI_RIL3_TMSI)
+ {
+ return (lhs.tmsi == rhs.tmsi);
+ }
+ else
+ {
+ if (lhs.numDigits == rhs.numDigits)
+ {
+ for (short i = 0; i< lhs.numDigits; i++)
+ {
+ if(lhs.digits[i] != rhs.digits[i])
+ return false;
+ }
+ return true;
+ }
+ }
+ }
+
+
+ return false;
+}
+
+
+// add print mobile Id. -gz
+
+void printMobileId(const T_CNI_RIL3_IE_MOBILE_ID& mobileId)
+{
+ if (mobileId.mobileIdType == CNI_RIL3_TMSI)
+ {
+ printf("TMSI ");
+ }
+ else if (mobileId.mobileIdType == CNI_RIL3_IMSI)
+ {
+ for (short i = 0; i< mobileId.numDigits; i++)
+ {
+ printf("%d", mobileId.digits[i]);
+ }
+ }
+ else
+ printf("Unknown ID Type %d",mobileId.mobileIdType);
+}
+
+
+T_CNI_RIL3_PROTOCOL_DISCRIMINATOR extractPd (const T_CNI_LAPDM_L3MessageUnit *msInMsg)
+{
+ return ((T_CNI_RIL3_PROTOCOL_DISCRIMINATOR)(msInMsg->buffer[0] & 0x0f));
+}
+
diff --git a/data/mnet/GP10/Host/jcc/src_api/LUDBInstance.cpp b/data/mnet/GP10/Host/jcc/src_api/LUDBInstance.cpp
new file mode 100644
index 0000000..22baed9
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/src_api/LUDBInstance.cpp
@@ -0,0 +1,774 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : LUDBInstance.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : Local User Database.
+//
+// Modified History:
+// merge mmcc-h323 with integration. -03/04/99
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// from common vob
+#include "subsc/SubscInfoType.h"
+#include "subsc/SubscInfoUtil.h"
+
+#include "JCC/LUDB.h"
+#include "JCC/LUDBConfig.h"
+#include "JCC/JCCL3Msg.h"
+#include "JCC/JCCUtil.h"
+#include "JCC/LUDBApi.h"
+
+#include "LudbHashTbl.h"
+
+#include "semLib.h"
+#include "stdioLib.h"
+#include "sysLib.h"
+
+#include "LOGGING/vcmodules.h"
+#include "LOGGING/vclogging.h"
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+// *******************************************************************
+// Constant Definitions
+// *******************************************************************
+extern int ludb_purge_timer_sec;
+
+extern LUDB gLUDB;
+extern short ludb_auth_required;
+extern short ludb_auth_freq;
+bool srs_debug_mode = false;
+
+extern LudbHashTbl *ludbImsiHash;
+
+//*****************************************************************************
+LUDBEntry::LUDBEntry()
+{
+ ludbSemId = semMCreate(SEM_Q_PRIORITY | SEM_INVERSION_SAFE);
+ VBReqTimer = new JCCTimer((FUNCPTR)ludbVBReqTimeout);
+ PurgeTimer = new JCCTimer((FUNCPTR)ludbPurgeTimeout);
+ init();
+}
+
+
+//*****************************************************************************
+void LUDBEntry::init()
+{
+ // take the semaphore
+ semTake(ludbSemId, WAIT_FOREVER);
+ mobileId.mobileIdType = CNI_RIL3_NO_MOBILE_ID;
+ classmarkType = NULL_CLASSMARK;
+ free = true;
+ state = IDLE;
+ mobileHandle = NULL;
+ mm_id = -1;
+ subsc_exist = false;
+ stopVBReqTimer();
+ stopPurgeTimer();
+ auth_reuse_count = 0;
+ sec_exist = false;
+ cur_cksn = 0x07;
+ cur_algo = 0;
+
+ // Now let go of the semaphores.
+ semGive(ludbSemId);
+}
+
+
+//*****************************************************************************
+void LUDBEntry::isFree (bool free)
+{
+ semTake(ludbSemId, WAIT_FOREVER);
+ LUDBEntry::free = free;
+ semGive(ludbSemId);
+}
+
+//*****************************************************************************
+void LUDBEntry::setSubscExist (bool flag)
+{
+ semTake(ludbSemId, WAIT_FOREVER);
+ LUDBEntry::subsc_exist = flag;
+ semGive(ludbSemId);
+}
+
+//*****************************************************************************
+void LUDBEntry::setSecExist (bool flag)
+{
+ semTake(ludbSemId, WAIT_FOREVER);
+ LUDBEntry::sec_exist = flag;
+ semGive(ludbSemId);
+}
+
+//*****************************************************************************
+char *LUDBEntry::getStateString()
+{
+ switch(state){
+ case IDLE: return("IDLE ");
+ case REGREQ: return("WAIT4REG ");
+ case REGTHENSEC: return("WAIT4REG* ");
+ case SECREQ: return("WAIT4SEC ");
+ case SECINREG: return("WAIT4SEC* ");
+ case ACTIVE: return("ACTIVE ");
+ case UNREGREQ: return("WAIT4UNREG");
+ case INACTIVE: return("INACTIVE ");
+ case UNREGRJT: return("UNREG_REJ ");
+ case EMERGENCY: return("EMERGENCY ");
+ default: return("UNKNOWN ");
+ }
+}
+
+//*****************************************************************************
+void LUDBEntry::startVBReqTimer(int sec, short ludb_id)
+{
+ int tick = sec * sysClkRateGet();
+ VBReqTimer->setTimer(tick, (int)ludb_id);
+}
+
+//*****************************************************************************
+void LUDBEntry::stopVBReqTimer()
+{
+ VBReqTimer->cancelTimer();
+}
+
+//*****************************************************************************
+void LUDBEntry::startPurgeTimer(int sec, short ludb_id)
+{
+ int tick = sec * sysClkRateGet();
+ PurgeTimer->setTimer(tick, (int)ludb_id);
+}
+
+//*****************************************************************************
+void LUDBEntry::stopPurgeTimer()
+{
+ PurgeTimer->cancelTimer();
+}
+
+//*****************************************************************************
+T_AUTH_TRIPLET* LUDBEntry::curTripletPtr()
+{
+ if(secExist()){
+ return &sec_info;
+ }
+ else{
+ return 0; // error
+ }
+}
+
+//*****************************************************************************
+// LUDB
+//*****************************************************************************
+LUDB::LUDB()
+{
+ semId = semMCreate(SEM_Q_PRIORITY | SEM_INVERSION_SAFE);
+ init();
+}
+
+
+//*****************************************************************************
+void LUDB::init()
+{
+ for(int i=0; i< LUDB_MAX_NUM_ENTRY; i++) {
+ if(!entries[i].isFree()){
+ int bucket_id;
+ if(ludbImsiHash->find(i, bucket_id)) ludbImsiHash->remove(i);
+ }
+ entries[i].init();
+ }
+}
+
+
+//*****************************************************************************
+// clean up entry - klim 3/29/99
+void LUDB::init(const short index)
+{
+ if(inRange(index)){
+ entries[index].init();
+ int bucket_id;
+ if(ludbImsiHash->find(index, bucket_id)) ludbImsiHash->remove(index);
+ }
+}
+
+
+//*****************************************************************************
+short LUDB::entryAlloc()
+{
+ semTake(semId, WAIT_FOREVER);
+
+ for(short i=0; i< LUDB_MAX_NUM_ENTRY;i++)
+ {
+ if (entries[i].isFree() == true)
+ {
+ entries[i].isFree(false);
+ semGive(semId);
+ return i;
+ }
+ }
+ semGive(semId);
+ return JCC_ERROR;
+}
+
+
+//*****************************************************************************
+void LUDB::entryDealloc(short i)
+{
+ if(inRange(i)){
+ semTake(semId, WAIT_FOREVER);
+ entries[i].init();
+ semGive(semId);
+ }
+}
+
+
+//*****************************************************************************
+bool LUDB::startVBReqTimer(short i)
+{
+ if(inRange(i)){
+ entries[i].startVBReqTimer(VB_REQ_TIMER_SEC, i);
+ return true;
+ }
+ else{
+ return false;
+ }
+}
+
+//*****************************************************************************
+bool LUDB::stopVBReqTimer(short i)
+{
+ if(inRange(i)){
+ entries[i].stopVBReqTimer();
+ return true;
+ }
+ else{
+ return false;
+ }
+}
+
+//*****************************************************************************
+bool LUDB::startPurgeTimer(short i)
+{
+ if(inRange(i)){
+ entries[i].startPurgeTimer(ludb_purge_timer_sec, i);
+ return true;
+ }
+ else{
+ return false;
+ }
+}
+
+//*****************************************************************************
+bool LUDB::stopPurgeTimer(short i)
+{
+ if(inRange(i)){
+ entries[i].stopPurgeTimer();
+ return true;
+ }
+ else{
+ return false;
+ }
+}
+
+//*****************************************************************************
+void LUDB::setMMId(const short i, short mmId)
+{
+ if(inRange(i)){
+ entries[i].mm_id = mmId;
+ }
+}
+
+//*****************************************************************************
+short LUDB::getMMId(const short i)
+{
+ if(inRange(i)){
+ return(entries[i].mm_id);
+ }
+ else{
+ return -1;
+ }
+}
+
+//*****************************************************************************
+// Print LUDB Data
+void LUDB::print()
+{
+ printf(" [ID] IMSI STATE Voip Number\n");
+ for(short i=0; i<LUDB_MAX_NUM_ENTRY;i++)
+ {
+ if (entries[i].isFree())
+ {
+ // printf("LUDB Entry %d is free.\n", i);
+ }
+ else
+ {
+ printf(" [%2d] ", i);
+ printMobileId(entries[i].mobileId);
+ printf(" %s", entries[i].getStateString());
+ printf(" %08x ", entries[i].mobileHandle);
+ ludbPrintIsdn(i);
+ printf("\n");
+ }
+ }
+
+}
+
+//*****************************************************************************
+// Register user
+short LUDB::registerUser(T_CNI_RIL3_IE_MOBILE_ID mobileId)
+{
+ short i = JCC_ERROR;
+
+ if ( (i = entryAlloc()) != JCC_ERROR)
+ {
+ // take the semaphore
+ semTake(semId, WAIT_FOREVER);
+ entries[i].mobileId = mobileId;
+ semGive(semId);
+
+ ludbImsiHash->add(mobileId.digits, i);
+ }
+
+ return i;
+}
+
+
+//*****************************************************************************
+//get LUDB index for given IMSI
+short LUDB::getEntry (T_CNI_RIL3_IE_MOBILE_ID mobileId)
+{
+ short index = JCC_ERROR;
+
+ int bucket_id;
+ LudbLinkedListItem *item = ludbImsiHash->find(mobileId.digits, bucket_id);
+ if(item)
+ index = item->value;
+
+ return index;
+}
+
+
+//*****************************************************************************
+void LUDB::update (short index, LUDBEntry::LUDBState state)
+{
+ DBG_FUNC("LUDB::update(state)", LUDB_LAYER);
+ DBG_ENTER();
+
+ // index range check and state check.
+ if ((state >= LUDBEntry::IDLE)&&(state <= LUDBEntry::MAXLUDBSTATE)
+ &&(inRange(index)))
+ entries[index].state = state;
+ else
+ DBG_ERROR("invalid state %d or invalid index %d\n", state, index);
+
+ DBG_LEAVE();
+}
+
+//*****************************************************************************
+void LUDB::update (short index, VOIP_MOBILE_HANDLE mobileHandle)
+{
+ DBG_FUNC("LUDB::update(voip_handle)", LUDB_LAYER);
+ DBG_ENTER();
+
+ if(inRange(index))
+ {
+ // check if ludb is free
+ if(entries[index].isFree())
+ DBG_ERROR("ludb entry is Free, index %d\n", index);
+ else
+ entries[index].mobileHandle = mobileHandle;
+ }
+ else
+ DBG_ERROR("ludb entry invalid index %d\n", index);
+
+ DBG_LEAVE();
+}
+
+//*****************************************************************************
+short LUDB::update (short index, T_SUBSC_INFO info)
+{
+ DBG_FUNC("LUDB::update(subsc_info)", LUDB_LAYER);
+ DBG_ENTER();
+
+ if(inRange(index))
+ {
+ // check if ludb is free
+ if(entries[index].isFree()){
+ DBG_ERROR("ludb entry is Free, index %d\n", index);
+ DBG_LEAVE();
+ return 1;
+ }
+ else{
+ entries[index].subsc_info = info;
+ DBG_LEAVE();
+ return 0;
+ }
+ }
+ else{
+ DBG_ERROR("ludb entry invalid index %d\n", index);
+ DBG_LEAVE();
+ return 1;
+ }
+}
+
+//*****************************************************************************
+void LUDB::printSRS(short index)
+{
+ int i;
+ if(!inRange(index)) return;
+
+ printf("SRS_DEBUG---------------------------------------------------\n");
+ printf("RAND: ");
+ for(i=0; i<SEC_RAND_LEN; i++) printf("%02X ", entries[index].sec_info.RAND[i]);
+ printf("\n");
+ printf("SRES: ");
+ for(i=0; i<SEC_SRES_LEN; i++) printf("%02X ", entries[index].sec_info.SRES[i]);
+ printf("\n");
+ printf("KC: ");
+ for(i=0; i<SEC_KC_LEN; i++) printf("%02X ", entries[index].sec_info.Kc[i]);
+ printf("\n");
+ printf("------------------------------------------------------------\n");
+}
+
+//*****************************************************************************
+short LUDB::update (short index, T_AUTH_TRIPLET info)
+{
+ DBG_FUNC("LUDB::update(sec_info)", LUDB_LAYER);
+ DBG_ENTER();
+
+ if(inRange(index)){
+ if(entries[index].isFree()){ // check if ludb is free
+ DBG_ERROR("ludb entry is Free, index %d\n", index);
+ DBG_LEAVE();
+ return 1;
+ }
+ else{
+ setSecExist(index, true);
+ incCKSN(index);
+ entries[index].sec_info = info;
+ entries[index].auth_reuse_count = 0;
+ if(srs_debug_mode) ludbPrintSRS(index);
+ DBG_LEAVE();
+ return 0;
+ }
+ }
+ else{
+ DBG_ERROR("ludb entry invalid index %d\n", index);
+ DBG_LEAVE();
+ return 1;
+ }
+}
+
+//*****************************************************************************
+LUDBEntry::LUDBState LUDB::getState(const short index)
+{
+ if(inRange(index))
+ return entries[index].state;
+ else
+ return LUDBEntry::IDLE;
+}
+
+//*****************************************************************************
+bool LUDB::isFree(const short index)
+{
+ if(inRange(index))
+ return entries[index].isFree();
+ else
+ return false;
+}
+
+//*****************************************************************************
+bool LUDB::getSubscExist(short index)
+{
+ if(inRange(index))
+ return entries[index].subscExist();
+ else
+ return false;
+}
+
+//*****************************************************************************
+void LUDB::setSubscExist(short index, bool flag)
+{
+ if(inRange(index))
+ entries[index].setSubscExist(flag);
+}
+
+//*****************************************************************************
+bool LUDB::getSecExist(short index)
+{
+ if(inRange(index))
+ return entries[index].secExist();
+ else
+ return false;
+}
+
+//*****************************************************************************
+void LUDB::setSecExist(short index, bool flag)
+{
+ if(inRange(index))
+ entries[index].setSecExist(flag);
+}
+
+//*****************************************************************************
+short LUDB::checkAuthCount(const short index)
+{
+ short count;
+
+ DBG_FUNC("LUDB::checkAuthCount(index)", LUDB_LAYER);
+ DBG_ENTER();
+
+ if(inRange(index)){
+ if(!ludbGetSecInfoExists(index)){
+ DBG_TRACE("no sec info exist\n");
+ DBG_LEAVE();
+ return 1;
+ }
+
+ if(++entries[index].auth_reuse_count >= ludb_auth_freq){
+ DBG_TRACE("Hit ludb_auth_freq! resetting ludb_auth_count to 0\n");
+ DBG_LEAVE();
+ return 1; // need to fetch new set
+ }
+ }
+ else{
+ DBG_LEAVE();
+ return -1;
+ }
+
+ DBG_TRACE("auth_reuse_count [%d]: %d\n", index, entries[index].auth_reuse_count);
+ DBG_LEAVE();
+ return 0; // okay to use current key
+}
+
+//*****************************************************************************
+T_AUTH_TRIPLET* LUDB::curTripletPtr(short index)
+{
+ if(inRange(index)){
+ return entries[index].curTripletPtr();
+ }
+ else
+ return 0;
+}
+
+//*****************************************************************************
+short LUDB::curAlgo(short i)
+{
+ if(inRange(i)){
+ return entries[i].cur_algo;
+ }
+ else
+ return -1;
+}
+
+//*****************************************************************************
+void LUDB::setAlgo(short i, short algo)
+{
+ DBG_FUNC("LUDB::setAlgo", LUDB_LAYER);
+ DBG_ENTER();
+ if(inRange(i)){
+ if(!entries[i].isFree()){
+ DBG_TRACE("setting ludb %d algo to %d\n", i, algo);
+ entries[i].cur_algo = algo;
+ }
+ }
+ DBG_LEAVE();
+}
+
+//*****************************************************************************
+char LUDB::curCKSN(short index)
+{
+ if(inRange(index)){
+ return entries[index].cur_cksn;
+ }
+ else
+ return (char)0x07;
+}
+
+//*****************************************************************************
+char LUDB::incCKSN(short index)
+{
+ if(inRange(index)){
+ entries[index].cur_cksn = (entries[index].cur_cksn + 1) % 7;
+ return entries[index].cur_cksn;
+ }
+ else
+ return (char)0x07;
+}
+
+//*****************************************************************************
+VOIP_MOBILE_HANDLE LUDB::getMobileHandle (const short index)
+{
+ DBG_FUNC("LUDB::getMobileHandle", LUDB_LAYER);
+ DBG_ENTER();
+ VOIP_MOBILE_HANDLE retVal = VOIP_NULL_MOBILE_HANDLE;
+
+ if(inRange(index))
+ {
+ //check if ludb is free
+ if(entries[index].isFree())
+ DBG_ERROR("ludb entry is Free, index %d\n", index);
+ else
+ retVal = entries[index].mobileHandle;
+ }
+ else
+ DBG_ERROR("ludb entry invalid index %d\n", index);
+
+ DBG_LEAVE();
+ return retVal;
+}
+
+
+
+//*****************************************************************************
+bool LUDB::authTerm(const short index,
+ const T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER& cpn)
+{
+ // For now, don't have to check anything, no profile yet.
+ if(inRange(index)){
+ if (!isFree(index)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+//*****************************************************************************
+bool LUDB::authOrig(const short index,
+ const T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER& cpn)
+{
+ // For now, don't have to check anything, no profile yet.
+ if(inRange(index)){
+ if(!isFree(index)){
+ return true;
+ }
+ }
+ return false;
+}
+
+//*****************************************************************************
+// Stage 2 LUDB changes needed for Orig and Term Calls - Begin
+T_CNI_RIL3_IE_MOBILE_ID
+LUDB::getMobileId (const short index)
+{
+ T_CNI_RIL3_IE_MOBILE_ID retval;
+
+ retval.mobileIdType = CNI_RIL3_NO_MOBILE_ID;
+
+ if(inRange(index)&&(!entries[index].isFree()))
+ {
+ return (entries[index].mobileId);
+ }
+
+ return (retval);
+
+}
+// Stage 2 LUDB changes needed for Orig and Term Calls - End
+
+//*****************************************************************************
+bool LUDB::inRange(short index)
+{
+ if((index >= 0)&&(index < LUDB_MAX_NUM_ENTRY)){
+ return true;
+ }
+ else{
+ return false;
+ }
+}
+
+//*****************************************************************************
+T_SUBSC_INFO* LUDB::getSubscInfoPtr(const short index)
+{
+ if(inRange(index))
+ return(&entries[index].subsc_info);
+ else{
+ printf("LUDB::getSubscInfoPtr - index out of bound\n");
+ return 0;
+ }
+}
+
+//*****************************************************************************
+T_SUBSC_IE_MOBILE_ID_IMSI* LUDB::getMobileIdPtr(const short index)
+{
+ T_SUBSC_INFO *info = getSubscInfoPtr(index);
+ if(info != 0) return(&info->imsi);
+ else return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_ISDN* LUDB::getMSISDNPtr(const short index)
+{
+ T_SUBSC_INFO *info = getSubscInfoPtr(index);
+ if(info != 0) return(&info->msisdn);
+ else return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_PROVISION_BS* LUDB::getProvBSPtr(const short index)
+{
+ T_SUBSC_INFO *info = getSubscInfoPtr(index);
+ if(info != 0) return(&info->prov_bs);
+ else return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_PROVISION_TS* LUDB::getProvTSPtr(const short index)
+{
+ T_SUBSC_INFO *info = getSubscInfoPtr(index);
+ if(info != 0) return(&info->prov_ts);
+ else return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_PROVISION_SS* LUDB::getProvSSPtr(const short index)
+{
+ T_SUBSC_INFO *info = getSubscInfoPtr(index);
+ if(info != 0) return(&info->prov_ss);
+ else return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_SUBSC_STATUS* LUDB::getSubscStatusPtr(const short index)
+{
+ T_SUBSC_INFO *info = getSubscInfoPtr(index);
+ if(info != 0) return(&info->status);
+ else return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_ODB_DATA* LUDB::getODBDataPtr(const short index)
+{
+ T_SUBSC_INFO *info = getSubscInfoPtr(index);
+ if(info != 0) return(&info->odb_data);
+ else return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_SS_INFO_LIST* LUDB::getSSInfoListPtr(const short index)
+{
+ T_SUBSC_INFO *info = getSubscInfoPtr(index);
+ if(info != 0) return(&info->ss_info_list);
+ else return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_USER_INFO* LUDB::getUserInfoPtr(const short index)
+{
+ T_SUBSC_INFO *info = getSubscInfoPtr(index);
+ if(info != 0) return(&info->user);
+ else return 0;
+}
+
diff --git a/data/mnet/GP10/Host/jcc/src_api/LudbHashTbl.cpp b/data/mnet/GP10/Host/jcc/src_api/LudbHashTbl.cpp
new file mode 100644
index 0000000..21ec466
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/src_api/LudbHashTbl.cpp
@@ -0,0 +1,135 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* File : LudbHashTbl.cpp */
+/* Author(s) : Kevin S. Lim */
+/* Create Date : 03-25-01 copied from GsHashTbl.cpp */
+/* Description : supports only IMSI(15) or TMSI(4) key */
+/* */
+/*********************************************************************/
+
+#include "string.h"
+#include "stdio.h"
+
+#include "LudbHashTbl.h"
+
+int ludb_hash_tbl_debug = 0;
+
+LudbHashTbl::LudbHashTbl()
+{
+ list_len = LUDB_DEFAULT_HASH_TBL_LEN;
+ table = new LudbLinkedList[list_len];
+ key_len = LUDB_MAX_IMSI_KEY_LEN;
+ for(int i=0; i<list_len; i++){
+ table[i].SetKeyLength(key_len);
+ }
+
+ if(ludb_hash_tbl_debug)
+ printf("Hash created with length %d\n", list_len);
+}
+
+LudbHashTbl::LudbHashTbl(int l_len, int k_len)
+{
+ list_len = l_len;
+ table = new LudbLinkedList[list_len];
+ if((k_len == LUDB_MAX_IMSI_KEY_LEN)||(k_len == LUDB_MAX_TMSI_KEY_LEN)){
+ key_len = k_len;
+ for(int i=0; i<list_len; i++){
+ table[i].SetKeyLength(key_len);
+ }
+ }
+ else{
+ printf("LudbHashTbl::LudbHashTbl unsupported key len encountered %d\n",k_len);
+ }
+
+ if(ludb_hash_tbl_debug)
+ printf("Hash created with length %d\n", list_len);
+}
+
+LudbHashTbl::~LudbHashTbl()
+{
+
+}
+
+int LudbHashTbl::GetHashInd(const void *key)
+{
+ unsigned long temp = 0;
+ int i;
+
+ for(i=0; i<key_len; i++) temp += ((unsigned char *)key)[i];
+
+ if(ludb_hash_tbl_debug)
+ printf("LudbHashTbl::HashInd returns %d\n", temp % list_len);
+
+ return (temp % list_len);
+}
+
+LudbLinkedListItem *LudbHashTbl::find(const void *key, int& hash_ind)
+{
+ hash_ind = GetHashInd(key);
+ return (table[hash_ind].find(key));
+}
+
+LudbLinkedListItem *LudbHashTbl::find(const int value, int& hash_ind)
+{
+ LudbLinkedListItem *item;
+ for(int i=0; i<list_len; i++){
+ item = table[i].find(value);
+ if(item != NULL){
+ hash_ind = i;
+ return item;
+ }
+ }
+ hash_ind = -1;
+ return NULL;
+}
+
+int LudbHashTbl::add(void *key, const int value)
+{
+ int hash_ind = GetHashInd(key);
+ if(table[hash_ind].find(value) != NULL){
+ printf("LudbHashTbl::add() value %d already exists\n", value);
+ return -1;
+ }
+ return (table[hash_ind].add(key, value));
+}
+
+int LudbHashTbl::remove(void *key)
+{
+ int hash_ind = GetHashInd(key);
+ if(table[hash_ind].find(key) != NULL){
+ return (table[hash_ind].remove(key));
+ }
+ else{
+ printf("LudbHashTbl::remove() key 0x%08x doesn't exist\n", key);
+ return -1;
+ }
+}
+
+int LudbHashTbl::remove(int value)
+{
+ int hash_ind;
+ LudbLinkedListItem *item = find(value, hash_ind);
+ if(item != NULL)
+ return (table[hash_ind].remove(value));
+ else{
+ printf("LudbHashTbl::remove() value %d doesn't exist\n", value);
+ return -1;
+ }
+}
+
+void LudbHashTbl::print()
+{
+ for(int i=0; i<list_len; i++){
+ if(table[i].GetNumItems() > 0){
+ printf("bucket [%03d] \n", i);
+ table[i].print();
+ }
+ }
+}
diff --git a/data/mnet/GP10/Host/jcc/src_api/LudbLinkedList.cpp b/data/mnet/GP10/Host/jcc/src_api/LudbLinkedList.cpp
new file mode 100644
index 0000000..b6d5f47
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/src_api/LudbLinkedList.cpp
@@ -0,0 +1,230 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2001 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************/
+/* */
+/* File : LudbLinkedList.cpp */
+/* Author(s) : Kevin S. Lim */
+/* Create Date : 03-25-01 copied from GsLinkedList.cpp */
+/* Description : A generic linked list made for hash table entries */
+/* by adding new items to the tail */
+/* It can have two kind of keys: IMSI or TMSI */
+/* IMSI will have 15 bytes characters as digit values */
+/* TMSI will have 32 bit values - unsigned long */
+/* */
+/*********************************************************************/
+
+#include "string.h"
+#include "stdio.h"
+
+#include "LudbLinkedList.h"
+
+int ludb_linked_list_debug = 0;
+
+/*********************************************************************/
+LudbLinkedListItem::LudbLinkedListItem()
+{
+ prev = NULL;
+ next = NULL;
+ key_len = LUDB_MAX_IMSI_KEY_LEN;
+}
+
+LudbLinkedListItem::LudbLinkedListItem(const int len, void *key, const int value)
+{
+ prev = NULL;
+ next = NULL;
+
+ if(len == LUDB_MAX_IMSI_KEY_LEN){
+ key_len = len;
+ for(int i=0; i<LUDB_MAX_IMSI_KEY_LEN; i++){
+ ckey[i] = ((unsigned char *)key)[i];
+ }
+ }
+ else if(len == LUDB_MAX_TMSI_KEY_LEN){
+ key_len = LUDB_MAX_TMSI_KEY_LEN;
+ lkey = *(unsigned long *)key;
+ }
+ else{
+ printf("LudbLinkedListItem::LudbLinkedListItem() unsupported hash key length encountered %d\n", len);
+ }
+ this->value = value;
+}
+
+LudbLinkedListItem::~LudbLinkedListItem()
+{
+
+}
+
+int LudbLinkedListItem::same_keys(const void *key)
+{
+ if(key_len == LUDB_MAX_TMSI_KEY_LEN){
+ return(lkey == *(unsigned long *)key);
+ }
+ else{
+ for(int i=0; i<key_len; i++){
+ if(ckey[i] != ((unsigned char *)key)[i])
+ return 0;
+ }
+ return 1;
+ }
+}
+
+void LudbLinkedListItem::print()
+{
+ if(key_len == LUDB_MAX_TMSI_KEY_LEN){
+ printf("key: 0x%08x value: %03d\n", lkey, value);
+ }
+ else{
+ printf("key: ");
+ for(int i=0; i<key_len; i++){
+ printf("%d", ckey[i]);
+ }
+ printf(" value: %03d\n", value);
+ }
+}
+
+/*********************************************************************/
+LudbLinkedList::LudbLinkedList()
+{
+ head = NULL;
+ tail = NULL;
+ num_items = 0;
+ key_len = LUDB_MAX_LIST_KEY_LEN;
+
+ if(ludb_linked_list_debug)
+ printf("Hash list created\n");
+}
+
+LudbLinkedList::LudbLinkedList(int len)
+{
+ head = NULL;
+ tail = NULL;
+ num_items = 0;
+ key_len = len;
+
+ if(ludb_linked_list_debug)
+ printf("Hash list created\n");
+}
+
+LudbLinkedList::~LudbLinkedList()
+{
+
+}
+
+void LudbLinkedList::SetKeyLength(int len)
+{
+ key_len = len;
+}
+
+LudbLinkedListItem *LudbLinkedList::find(const void *key)
+{
+ LudbLinkedListItem *item;
+
+ item = head;
+ while(item != NULL){
+ if(item->same_keys(key)){
+ return item;
+ }
+ else{
+ item = item->next;
+ }
+ }
+ return NULL;
+}
+
+LudbLinkedListItem *LudbLinkedList::find(const int value)
+{
+ LudbLinkedListItem *item;
+
+ item = head;
+ while(item != NULL){
+ if(item->value == value){
+ return item;
+ }
+ else{
+ item = item->next;
+ }
+ }
+ return NULL;
+}
+
+int LudbLinkedList::add(void *key, const int value)
+{
+ LudbLinkedListItem *temp = tail;
+
+ if(head == NULL){ // first one
+ head = tail = new LudbLinkedListItem(key_len, key, value);
+ }
+ else{
+ temp->next = new LudbLinkedListItem(key_len, key, value);
+ tail = tail->next;
+ tail->prev = temp;
+ }
+ num_items++;
+ return 0;
+}
+
+int LudbLinkedList::remove(LudbLinkedListItem *item)
+{
+ if(item == tail){
+ if(item == head){ // tail and head
+ head = NULL;
+ tail = NULL;
+ }
+ else{ // tail, not head
+ tail = tail->prev;
+ tail->next = NULL;
+ }
+ }
+ else{
+ if(item == head){ // not tail, but head
+ head = head->next;
+ head->prev = NULL;
+ }
+ else{ // not tail, not head
+ item->prev->next = item->next;
+ item->next->prev = item->prev;
+ }
+ }
+
+ delete item;
+ num_items--;
+ return 0;
+}
+
+int LudbLinkedList::remove(void *key)
+{
+ LudbLinkedListItem *item = find(key);
+ if(item == NULL) return -1;
+ else remove(item);
+ return 0;
+}
+
+int LudbLinkedList::remove(int value)
+{
+ LudbLinkedListItem *item = find(value);
+ if(item == NULL) return -1;
+ else remove(item);
+ return 0;
+}
+
+void LudbLinkedList::print()
+{
+ if(head == NULL){
+ printf("EMPTY\n");
+ return;
+ }
+
+ LudbLinkedListItem *item = head;
+ printf("--------------------------------------------------------------\n");
+ while(item != NULL){
+ printf(" ");
+ item->print();
+ item = item->next;
+ }
+ printf("--------------------------------------------------------------\n");
+}
diff --git a/data/mnet/GP10/Host/jcc/src_api/Makefile b/data/mnet/GP10/Host/jcc/src_api/Makefile
new file mode 100644
index 0000000..48f33f5
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/src_api/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = jcc
+THIS_DIRECTORY = src_api
+MY_OUTPUT = $(OBJDIR)\jcc_api.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/jcc/src_api/SubscInfoTest.cpp b/data/mnet/GP10/Host/jcc/src_api/SubscInfoTest.cpp
new file mode 100644
index 0000000..ee072b5
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/src_api/SubscInfoTest.cpp
@@ -0,0 +1,187 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : SubscInfoTest.cpp
+// Author(s) : Kevin Lim
+// Create Date : 06-16-99
+// Description : subscriber information structure and en/decoding function
+// for messages
+//
+// *******************************************************************
+#include "stdio.h"
+#include "string.h"
+
+// from common vob
+#include "subsc/SubscInfoType.h"
+#include "subsc/SubscInfoUtil.h"
+
+#include "JCC/LUDBapi.h"
+
+void ludbMakeDefaultSubscMsg(char *msg, short *size)
+{
+ T_SUBSC_INFO test_info;
+ short ret;
+
+ test_info.imsi.num_digit = 15;
+ test_info.imsi.imsi[0] = 0;
+ test_info.imsi.imsi[1] = 0;
+ test_info.imsi.imsi[2] = 1;
+ test_info.imsi.imsi[3] = 0;
+ test_info.imsi.imsi[4] = 1;
+ test_info.imsi.imsi[5] = 1;
+ test_info.imsi.imsi[6] = 2;
+ test_info.imsi.imsi[7] = 3;
+ test_info.imsi.imsi[8] = 4;
+ test_info.imsi.imsi[9] = 5;
+ test_info.imsi.imsi[10] = 6;
+ test_info.imsi.imsi[11] = 7;
+ test_info.imsi.imsi[12] = 8;
+ test_info.imsi.imsi[13] = 9;
+ test_info.imsi.imsi[14] = 0;
+ test_info.msisdn.num_digit = 13;
+ test_info.msisdn.digits[0] = 0;
+ test_info.msisdn.digits[1] = 0;
+ test_info.msisdn.digits[2] = 1;
+ test_info.msisdn.digits[3] = 6;
+ test_info.msisdn.digits[4] = 5;
+ test_info.msisdn.digits[5] = 0;
+ test_info.msisdn.digits[6] = 3;
+ test_info.msisdn.digits[7] = 3;
+ test_info.msisdn.digits[8] = 0;
+ test_info.msisdn.digits[9] = 2;
+ test_info.msisdn.digits[10] = 8;
+ test_info.msisdn.digits[11] = 9;
+ test_info.msisdn.digits[12] = 0;
+ test_info.prov_bs.num_srv = 1;
+ test_info.prov_bs.bs_code[0] = DATA_CDA_9600BPS;
+ test_info.prov_ts.num_srv = 3;
+ test_info.prov_ts.ts_code[0] = TELEPHONY_SERVICES;
+ test_info.prov_ts.ts_code[1] = EMERGENCY_CALLS;
+ test_info.prov_ts.ts_code[2] = SMS_MT_PP;
+ test_info.prov_ss.num_srv = 4;
+ test_info.prov_ss.ss_code[0] = SUPP_SERV_CLIP;
+ test_info.prov_ss.ss_code[1] = SUPP_SERV_COLP;
+ test_info.prov_ss.ss_code[2] = SUPP_SERV_CFU;
+ test_info.prov_ss.ss_code[3] = SUPP_SERV_CW;
+ test_info.status.status = SUBSC_STATUS_ODBARRING;
+ test_info.odb_data.odb_general.all_og_barred=false;
+ test_info.odb_data.odb_general.intrn_og_barred=false;
+ test_info.odb_data.odb_general.intrn_og_not_hplmn_barred=false;
+ test_info.odb_data.odb_general.premium_info_og_barred=false;
+ test_info.odb_data.odb_general.premium_enter_og_barred=false;
+ test_info.odb_data.odb_general.ss_access_barred=true;
+ test_info.odb_data.odb_general.intrz_og_barred=false;
+ test_info.odb_data.odb_general.intrz_og_not_hplmn_barred=false;
+ test_info.odb_data.odb_general.intrz_intrn_og_not_hplmn_barred=false;
+ test_info.odb_data.odb_general.all_ect_barred=false;
+ test_info.odb_data.odb_general.chargeable_ect_barred=false;
+ test_info.odb_data.odb_general.intrn_ect_barred=false;
+ test_info.odb_data.odb_general.intrz_ect_barred=false;
+ test_info.odb_data.odb_general.double_chargeable_ect_barred=false;
+ test_info.odb_data.odb_general.multiple_ect_barred=true;
+ test_info.odb_data.odb_plmn.plmn_specific_type1=false;
+ test_info.odb_data.odb_plmn.plmn_specific_type2=true;
+ test_info.odb_data.odb_plmn.plmn_specific_type3=false;
+ test_info.odb_data.odb_plmn.plmn_specific_type4=false;
+ test_info.ss_info_list.num_ss_info = 3;
+ test_info.ss_info_list.ss_info_forw[0].ss_code = SUPP_SERV_ALL_FWD;
+ test_info.ss_info_list.ss_info_forw[0].num_feature = 1;
+ test_info.ss_info_list.ss_info_forw[0].list[0].basic_service.service_type = BEARER_SERVICE_TYPE;
+ test_info.ss_info_list.ss_info_forw[0].list[0].basic_service.ex_bs_code[0] = DATA_CDA_9600BPS;
+ test_info.ss_info_list.ss_info_forw[0].list[0].basic_service.ex_bs_code[1] = 0; // reserved byte filler
+ test_info.ss_info_list.ss_info_forw[0].list[0].basic_service.ex_bs_code[2] = 0;
+ test_info.ss_info_list.ss_info_forw[0].list[0].basic_service.ex_bs_code[3] = 0;
+ test_info.ss_info_list.ss_info_forw[0].list[0].basic_service.ex_bs_code[4] = 0;
+ test_info.ss_info_list.ss_info_forw[0].list[0].ss_status.ss_status_A = 1;
+ test_info.ss_info_list.ss_info_forw[0].list[0].ss_status.ss_status_R = 0;
+ test_info.ss_info_list.ss_info_forw[0].list[0].ss_status.ss_status_P = 0;
+ test_info.ss_info_list.ss_info_forw[0].list[0].ss_status.ss_status_Q = 0;
+ test_info.ss_info_list.ss_info_forw[0].list[0].forw_to_num.num_digit = 13;
+ test_info.ss_info_list.ss_info_forw[0].list[0].forw_to_num.digits[0] = 0;
+ test_info.ss_info_list.ss_info_forw[0].list[0].forw_to_num.digits[1] = 0;
+ test_info.ss_info_list.ss_info_forw[0].list[0].forw_to_num.digits[2] = 1;
+ test_info.ss_info_list.ss_info_forw[0].list[0].forw_to_num.digits[3] = 5;
+ test_info.ss_info_list.ss_info_forw[0].list[0].forw_to_num.digits[4] = 1;
+ test_info.ss_info_list.ss_info_forw[0].list[0].forw_to_num.digits[5] = 0;
+ test_info.ss_info_list.ss_info_forw[0].list[0].forw_to_num.digits[6] = 5;
+ test_info.ss_info_list.ss_info_forw[0].list[0].forw_to_num.digits[7] = 7;
+ test_info.ss_info_list.ss_info_forw[0].list[0].forw_to_num.digits[8] = 4;
+ test_info.ss_info_list.ss_info_forw[0].list[0].forw_to_num.digits[9] = 0;
+ test_info.ss_info_list.ss_info_forw[0].list[0].forw_to_num.digits[10] = 4;
+ test_info.ss_info_list.ss_info_forw[0].list[0].forw_to_num.digits[11] = 3;
+ test_info.ss_info_list.ss_info_forw[0].list[0].forw_to_num.digits[12] = 6;
+ test_info.ss_info_list.ss_info_forw[0].list[0].forw_options.notify_forw_party = NOTIFICATION_TO_FORWARDING;
+ test_info.ss_info_list.ss_info_forw[0].list[0].forw_options.notify_calling_party = NOTIFICATION_TO_CALLING;
+ test_info.ss_info_list.ss_info_forw[0].list[0].forw_options.forw_reason = NO_REPLY;
+ test_info.ss_info_list.ss_info_bar[0].ss_code = SUPP_SERV_BAOC;
+ test_info.ss_info_list.ss_info_bar[0].num_feature = 1;
+ test_info.ss_info_list.ss_info_bar[0].list[0].basic_service.service_type = TELE_SERVICE_TYPE;
+ test_info.ss_info_list.ss_info_bar[0].list[0].basic_service.ex_ts_code[0] = TELEPHONY_SERVICES;
+ test_info.ss_info_list.ss_info_bar[0].list[0].basic_service.ex_ts_code[1] = 0; // reserved byte filler
+ test_info.ss_info_list.ss_info_bar[0].list[0].basic_service.ex_ts_code[2] = 0;
+ test_info.ss_info_list.ss_info_bar[0].list[0].basic_service.ex_ts_code[3] = 0;
+ test_info.ss_info_list.ss_info_bar[0].list[0].basic_service.ex_ts_code[4] = 0;
+ test_info.ss_info_list.ss_info_bar[0].list[0].ss_status.ss_status_A = 1;
+ test_info.ss_info_list.ss_info_bar[0].list[0].ss_status.ss_status_R = 0;
+ test_info.ss_info_list.ss_info_bar[0].list[0].ss_status.ss_status_P = 0;
+ test_info.ss_info_list.ss_info_bar[0].list[0].ss_status.ss_status_Q = 0;
+ test_info.ss_info_list.ss_info_data[0].ss_code = SUPP_SERV_CW;
+ test_info.ss_info_list.ss_info_data[0].ss_status.ss_status_A = 1;
+ test_info.ss_info_list.ss_info_data[0].ss_status.ss_status_R = 0;
+ test_info.ss_info_list.ss_info_data[0].ss_status.ss_status_P = 1;
+ test_info.ss_info_list.ss_info_data[0].ss_status.ss_status_Q = 0;
+ test_info.user.len = 5;
+ test_info.user.name[0] = 'K';
+ test_info.user.name[1] = 'e';
+ test_info.user.name[2] = 'v';
+ test_info.user.name[3] = 'i';
+ test_info.user.name[4] = 'n';
+
+ ret = EncodeSubscInfo((unsigned char *)msg, size, &test_info);
+ printf("Encoder return val: %d, msg size return: %d\n", ret, *size);
+
+ printSubscMsg((unsigned char *)msg, *size);
+
+ ret = DecodeSubscInfo((unsigned char *)msg, *size, &test_info);
+ printf("Decoder return val: %d\n", ret);
+
+ subscPrintInfo(&test_info);
+}
+
+short subscTest1()
+{
+ T_SUBSC_INFO subsc;
+ char msg[200] = {
+ 1, 51, 49, 48, 49, 55, 48, 49, 48, 55,
+ 50, 55, 57, 52, 56, 56, 2, 4, 50, 50,
+ 48, 57, 5, 0, 6, 0, 7, 9, 17, 18,
+ 19, 33, 41, 42, 43, 65, 66, 8, 0, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 10, 4,
+ 1, 33, 1, 1, 0, 0, 0, 0, 0, 1,
+ 2, 0, 3, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1, 41, 0, 1,
+ 42, 0, 1, 43, 0, 11, 13, 32, 77,111,
+ 116,111,114,111,108, 97, 32, 45, 32, 49,
+ };
+
+ return DecodeSubscInfo((unsigned char *)msg, 110, &subsc);
+}
+
+void ludbPrintSubscInfoSize()
+{
+ printf("sizeof(T_SUBSC_INFO) : %d\n", sizeof(T_SUBSC_INFO));
+}
+
+void ludbPrintLudbMsgSize()
+{
+ printf("sizeof(LudbMsgStruct) : %d\n", sizeof(LudbMsgStruct));
+}
diff --git a/data/mnet/GP10/Host/jcc/src_api/ludbapi.cpp b/data/mnet/GP10/Host/jcc/src_api/ludbapi.cpp
new file mode 100644
index 0000000..463c940
--- /dev/null
+++ b/data/mnet/GP10/Host/jcc/src_api/ludbapi.cpp
@@ -0,0 +1,949 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : LUDBapi.cpp
+// Author(s) : Kevin Lim
+// Create Date : 08-10-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// included L3 Message header for messages from other Layer 3 modules (CC, RR)
+
+// from common vob
+#include "subsc/SubscInfoType.h"
+#include "subsc/SubscInfoUtil.h"
+
+#include "MnetModuleId.h"
+#include "JCC/LUDB.h"
+#include "JCC/LUDBapi.h"
+#include "LUDBVoipMsgProc.h"
+#include "LudbHashTbl.h"
+
+#include "LOGGING/vcmodules.h"
+#include "LOGGING/vclogging.h"
+
+
+// global variables
+int ludb_purge_timer_sec = 1;
+MSG_Q_ID ludbMsgQId;
+LUDB gLUDB;
+short ludb_auth_required = 0;
+short ludb_auth_freq = 1;
+LudbHashTbl *ludbImsiHash;
+
+// ****************************************************************************
+void ludbSetPurgeTimer(int sec)
+{
+ if(sec == 0){
+ printf("usage: ludbSetPurgeTimer(seconds)\n");
+ printf("current: %d\n", ludb_purge_timer_sec);
+ }
+ else{
+ ludb_purge_timer_sec = sec;
+ }
+}
+
+// ****************************************************************************
+void ludbSetAuthRequired(int flag)
+{
+ if(ludb_auth_required != flag){
+ ludb_auth_required = flag;
+ printf("ludb_auth_required is now set to %d\n", ludb_auth_required);
+ }
+ else{
+ printf("ludb_auth_required is already set to %d\n", ludb_auth_required);
+ }
+}
+
+// ****************************************************************************
+void ludbSetAuthFreq(int freq)
+{
+ if(freq == 0){
+ printf("usage: ludbSetAuthFreq(freq)\n");
+ printf("freq : 1..5\n");
+ printf("current: %d\n", ludb_auth_freq);
+ }
+ else{
+ ludb_auth_freq = freq;
+ }
+}
+
+// ****************************************************************************
+int ludbVBReqTimeout(int ludb_id)
+{
+ DBG_FUNC("ludbVBReqTimeout", LUDB_LAYER);
+ DBG_ENTER();
+ DBG_TRACE("VBReq Timeout on entry: %d\n", ludb_id);
+
+ LudbMsgStruct timeout;
+
+ timeout.module_id = MODULE_LUDB;
+ timeout.msg_type = LUDB_VBREQ_TIMEOUT;
+ timeout.ludb_id = ludb_id;
+ if (ERROR == msgQSend( ludbMsgQId,
+ (char *) &timeout,
+ sizeof(LudbMsgStruct),
+ NO_WAIT, // important, timer handler shouldn't wait
+ MSG_PRI_NORMAL
+ ))
+ {
+ DBG_ERROR("ludbVBReqTimeout msgQSend (QID=%d) error\n", (int)ludbMsgQId);
+ }
+ DBG_LEAVE();
+ return 0;
+}
+
+// ****************************************************************************
+bool ludbStartVBReqTimer(short ludb_id)
+{
+ return gLUDB.startVBReqTimer(ludb_id);
+}
+
+// ****************************************************************************
+bool ludbStopVBReqTimer(short ludb_id)
+{
+ return gLUDB.stopVBReqTimer(ludb_id);
+}
+
+// ****************************************************************************
+int ludbPurgeTimeout(int ludb_id)
+{
+ DBG_FUNC("ludbPurgeTimeout", LUDB_LAYER);
+ DBG_ENTER();
+ DBG_TRACE("Purge Timeout on entry: %d\n", ludb_id);
+
+ LudbMsgStruct timeout;
+
+ timeout.module_id = MODULE_LUDB;
+ timeout.msg_type = LUDB_PURGE_TIMEOUT;
+ timeout.ludb_id = ludb_id;
+ if (ERROR == msgQSend( ludbMsgQId,
+ (char *) &timeout,
+ sizeof(LudbMsgStruct),
+ NO_WAIT, // important, timer handler shouldn't wait
+ MSG_PRI_NORMAL
+ ))
+ {
+ DBG_ERROR("ludbPurgeTimeout msgQSend (QID=%d) error\n", (int)ludbMsgQId);
+ }
+ DBG_LEAVE();
+ return 0;
+}
+
+// ****************************************************************************
+bool ludbStartPurgeTimer(short ludb_id)
+{
+ return gLUDB.startPurgeTimer(ludb_id);
+}
+
+// ****************************************************************************
+bool ludbStopPurgeTimer(short ludb_id)
+{
+ return gLUDB.stopPurgeTimer(ludb_id);
+}
+
+// ****************************************************************************
+char *getLudbMsgTypeString(LudbMsgType msg_type)
+{
+ switch(msg_type){
+ case LUDB_MM_REG_REQ: return("Registration Request"); break;
+ case LUDB_MM_UNREG_REQ: return("UnRegistration Request"); break;
+ case LUDB_MM_SEC_REQ: return("SecurityInfo Request"); break;
+ case LUDB_MM_REG_CNF: return("Registration Confirm"); break;
+ case LUDB_MM_REG_REJ: return("Registration Reject"); break;
+ case LUDB_MM_UNREG_CNF: return("UnRegistration Confirm"); break;
+ case LUDB_MM_UNREG_REJ: return("UnRegistration Reject"); break;
+ case LUDB_MM_SEC_RSP: return("Security Response"); break;
+
+ case VOIP_LUDB_REG_CNF: return("Registration Confirm"); break;
+ case VOIP_LUDB_REG_REJ: return("Registration Reject"); break;
+ case VOIP_LUDB_UNREG_CNF: return("UnRegistration Confirm"); break;
+ case VOIP_LUDB_UNREG_REJ: return("UnRegistration Reject"); break;
+ case VOIP_LUDB_SPI_IND: return("Subscriber Profile"); break;
+ case VOIP_LUDB_SEC_RSP: return("SecurityInfo Response"); break;
+
+ case VOIP_LUDB_UNREG_REQ: return("UnRegistration Request"); break;
+ default: return("Unknown"); break;
+ }
+}
+
+// ****************************************************************************
+bool ludbProfileUpdate(T_CNI_RIL3_IE_MOBILE_ID mobile_id, short len, char *buf)
+{
+ DBG_FUNC("ludbProfileUpdate", LUDB_LAYER);
+ DBG_ENTER();
+
+ MSG_Q_ID qid = ludbMsgQId;
+ LudbMsgStruct ludbInMsg;
+ ludbInMsg.module_id = MODULE_H323;
+ ludbInMsg.mobile_id = mobile_id;
+ ludbInMsg.msg_type = VOIP_LUDB_SPI_IND;
+
+ if(len <= VB_MAX_MSG_LENGTH){
+ ludbInMsg.vb_msg_size = len;
+ for(int i=0; i<len; i++)
+ ludbInMsg.vb_msg[i] = buf[i];
+ }
+ else{
+ DBG_ERROR("msg size bigger than %d\n", VB_MAX_MSG_LENGTH);
+ DBG_LEAVE();
+ return (false);
+ }
+
+ STATUS stat = msgQSend( qid, (char *) &ludbInMsg,
+ sizeof(LudbMsgStruct),
+ NO_WAIT, MSG_PRI_NORMAL );
+ if(stat == ERROR){
+ DBG_ERROR("msgQSend error\n");
+ DBG_LEAVE();
+ return (false);
+ }
+ else {
+ DBG_TRACE("Voip->Ludb MsgHandler MsgType: %s\n",
+ getLudbMsgTypeString(ludbInMsg.msg_type));
+ DBG_LEAVE();
+ return (true);
+ }
+}
+
+// ****************************************************************************
+bool ludbSRSUpdate(T_CNI_RIL3_IE_MOBILE_ID mobile_id, short num, T_AUTH_TRIPLET *triplet)
+{
+ DBG_FUNC("ludbSRSUpdate", LUDB_LAYER);
+ DBG_ENTER();
+
+ MSG_Q_ID qid = ludbMsgQId;
+ LudbMsgStruct ludbInMsg;
+ ludbInMsg.module_id = MODULE_H323;
+ ludbInMsg.mobile_id = mobile_id;
+ ludbInMsg.msg_type = VOIP_LUDB_SEC_RSP;
+
+ if(num == 1){
+ ludbInMsg.vb_msg_size = 1;
+ memcpy(ludbInMsg.vb_msg, triplet, sizeof(T_AUTH_TRIPLET));
+ }
+ else{
+ ludbInMsg.vb_msg_size = 0;
+ }
+
+ STATUS stat = msgQSend( qid, (char *) &ludbInMsg,
+ sizeof(LudbMsgStruct),
+ NO_WAIT, MSG_PRI_NORMAL );
+ if(stat == ERROR){
+ DBG_ERROR("msgQSend error\n");
+ DBG_LEAVE();
+ return (false);
+ }
+ else {
+ DBG_TRACE("Voip->Ludb MsgHandler MsgType: %s\n",
+ getLudbMsgTypeString(ludbInMsg.msg_type));
+ DBG_LEAVE();
+ return (true);
+ }
+}
+
+// ****************************************************************************
+bool LudbVBLinkMessageHandler(VBLINK_MOBILE_REG_EVENT event,
+ T_CNI_RIL3_IE_MOBILE_ID mobile_id)
+{
+ DBG_FUNC("LudbVBLinkMessageHandler", LUDB_LAYER);
+ DBG_ENTER();
+
+ MSG_Q_ID qid = ludbMsgQId;
+ LudbMsgStruct ludbInMsg;
+
+ ludbInMsg.module_id = MODULE_H323;
+ ludbInMsg.mobile_id = mobile_id;
+
+ switch (event) {
+ case VBLINK_MOBILE_REG_EVENT_RECV_URQ:
+ ludbInMsg.msg_type = VOIP_LUDB_UNREG_REQ;
+ break;
+
+ case VBLINK_MOBILE_REG_EVENT_RECV_RCF:
+ ludbInMsg.msg_type = VOIP_LUDB_REG_CNF;
+ break;
+
+ case VBLINK_MOBILE_REG_EVENT_RECV_RRJ:
+ ludbInMsg.msg_type = VOIP_LUDB_REG_REJ;
+ break;
+
+ case VBLINK_MOBILE_REG_EVENT_RECV_UCF:
+ ludbInMsg.msg_type = VOIP_LUDB_UNREG_CNF;
+ break;
+
+ case VBLINK_MOBILE_REG_EVENT_RECV_URJ:
+ ludbInMsg.msg_type = VOIP_LUDB_UNREG_REJ;
+ break;
+
+ default:
+ DBG_ERROR("Unexpected RegEvent Type : %d\n", event);
+ DBG_LEAVE();
+ return (false);
+ }
+
+ // send the message.
+ STATUS stat = msgQSend( qid, (char *) &ludbInMsg,
+ sizeof(LudbMsgStruct),
+ NO_WAIT, MSG_PRI_NORMAL );
+ if(stat == ERROR){
+ DBG_ERROR("msgQSend error\n");
+ DBG_LEAVE();
+ return (false);
+ }
+ else {
+ DBG_TRACE("Voip->Ludb MsgHandler MsgType: %s\n",
+ getLudbMsgTypeString(ludbInMsg.msg_type));
+ DBG_LEAVE();
+ return (true);
+ }
+}
+
+
+//*****************************************************************************
+//support legcy functions.
+//*****************************************************************************
+bool ludbGetSubscInfoExists(short index)
+{
+ return gLUDB.getSubscExist(index);
+}
+
+
+//*****************************************************************************
+void ludbSetSubscInfoExists(short index, bool flag)
+{
+ gLUDB.setSubscExist(index, flag);
+}
+
+
+//*****************************************************************************
+bool ludbGetSecInfoExists(short index)
+{
+ return gLUDB.getSecExist(index);
+}
+
+
+//*****************************************************************************
+void ludbSetSecInfoExists(short index, bool flag)
+{
+ gLUDB.setSecExist(index, flag);
+}
+
+
+//*****************************************************************************
+short ludbCheckAuthCount(short index)
+{
+ gLUDB.checkAuthCount(index);
+}
+
+//*****************************************************************************
+T_AUTH_TRIPLET *ludbCurTriplet(short index)
+{
+ return gLUDB.curTripletPtr(index);
+}
+
+//*****************************************************************************
+char ludbCKSN(short index)
+{
+ return gLUDB.curCKSN(index);
+}
+
+//*****************************************************************************
+char ludbIncCKSN(short index)
+{
+ return gLUDB.incCKSN(index);
+}
+
+//*****************************************************************************
+short ludbCountBeingUsed()
+{
+ short count=0;
+ for(int i=0; i<LUDB_MAX_NUM_ENTRY; i++){
+ if(!gLUDB.isFree(i)) count++;
+ }
+ return count;
+}
+
+//*****************************************************************************
+short ludbPercentBeingUsed()
+{
+ return (ludbCountBeingUsed() * 100)/LUDB_MAX_NUM_ENTRY;
+}
+
+//*****************************************************************************
+void ludbDataPrint()
+{
+ printf("LUDB Data *********************************************************\n");
+ printf(" %d out of %d entries (%d percent) is being used.\n",
+ ludbCountBeingUsed(), LUDB_MAX_NUM_ENTRY, ludbPercentBeingUsed());
+ gLUDB.print();
+ printf("*******************************************************************\n");
+}
+
+//*****************************************************************************
+void ludbHashPrint()
+{
+ printf("LUDB Hash *********************************************************\n");
+ ludbImsiHash->print();
+ printf("*******************************************************************\n");
+}
+
+//*****************************************************************************
+void ludbDataInit()
+{
+ gLUDB.init();
+}
+
+
+//*****************************************************************************
+void ludbEntryInit(const short index) // clean up entry - klim 3/29/99
+{
+ DBG_FUNC("ludbEntryInit", LUDB_LAYER);
+ DBG_ENTER();
+ gLUDB.init(index);
+ DBG_TRACE("entry %d initialized\n", index);
+ DBG_LEAVE();
+}
+
+//*****************************************************************************
+void ludbSetMMId(const short index, short mmId)
+{
+ DBG_FUNC("ludbSetMMId", LUDB_LAYER);
+ DBG_ENTER();
+ gLUDB.setMMId(index, mmId);
+ DBG_LEAVE();
+}
+
+//*****************************************************************************
+short ludbGetMMId(const short index)
+{
+ DBG_FUNC("ludbSetMMId", LUDB_LAYER);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return(gLUDB.getMMId(index));
+}
+
+//*****************************************************************************
+T_CNI_RIL3_IE_MOBILE_ID ludbGetMobileId(short index)
+{
+ return gLUDB.getMobileId(index);
+}
+
+//*****************************************************************************
+short ludbGetEntryByMobileId(T_CNI_RIL3_IE_MOBILE_ID id)
+{
+ return gLUDB.getEntry(id);
+}
+
+//*****************************************************************************
+T_SUBSC_INFO* ludbGetSubscInfoPtr(const short index)
+{
+ if(ludbGetSubscInfoExists(index))
+ return gLUDB.getSubscInfoPtr(index);
+ else
+ return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_MOBILE_ID_IMSI* ludbGetMobileIdPtr(const short index)
+{
+ if(ludbGetSubscInfoExists(index))
+ return gLUDB.getMobileIdPtr(index);
+ else
+ return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_ISDN* ludbGetMSISDNPtr(const short index)
+{
+ if(ludbGetSubscInfoExists(index))
+ return gLUDB.getMSISDNPtr(index);
+ else
+ return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_PROVISION_BS* ludbGetProvBSPtr(const short index)
+{
+ if(ludbGetSubscInfoExists(index))
+ return gLUDB.getProvBSPtr(index);
+ else
+ return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_PROVISION_TS* ludbGetProvTSPtr(const short index)
+{
+ if(ludbGetSubscInfoExists(index))
+ return gLUDB.getProvTSPtr(index);
+ else
+ return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_PROVISION_SS* ludbGetProvSSPtr(const short index)
+{
+ if(ludbGetSubscInfoExists(index))
+ return gLUDB.getProvSSPtr(index);
+ else
+ return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_SUBSC_STATUS* ludbGetSubscStatusPtr(const short index)
+{
+ if(ludbGetSubscInfoExists(index))
+ return gLUDB.getSubscStatusPtr(index);
+ else
+ return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_ODB_DATA* ludbGetODBDataPtr(const short index)
+{
+ if(ludbGetSubscInfoExists(index))
+ return gLUDB.getODBDataPtr(index);
+ else
+ return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_SS_INFO_LIST* ludbGetSSInfoListPtr(const short index)
+{
+ if(ludbGetSubscInfoExists(index))
+ return gLUDB.getSSInfoListPtr(index);
+ else
+ return 0;
+}
+
+//*****************************************************************************
+T_SUBSC_IE_USER_INFO* ludbGetUserInfoPtr(const short index)
+{
+ if(ludbGetSubscInfoExists(index))
+ return gLUDB.getUserInfoPtr(index);
+ else
+ return 0;
+}
+
+//*****************************************************************************
+//*****************************************************************************
+bool ludbIsProvSMS_MT(const short index)
+{
+ T_SUBSC_INFO* ss = ludbGetSubscInfoPtr(index);
+ return(subscProvSMS_MT_PP(ss));
+}
+
+//*****************************************************************************
+bool ludbIsProvSMS_MO(const short index)
+{
+ T_SUBSC_INFO* ss = ludbGetSubscInfoPtr(index);
+ return(subscProvSMS_MO_PP(ss));
+}
+
+//*****************************************************************************
+bool ludbIsProvCLIP(const short index)
+{
+ T_SUBSC_INFO* ss = ludbGetSubscInfoPtr(index);
+ return(subscIsProvCLIP(ss));
+}
+
+//*****************************************************************************
+bool ludbIsProvCLIR(const short index)
+{
+ T_SUBSC_INFO* ss = ludbGetSubscInfoPtr(index);
+ return(subscIsProvCLIR(ss));
+}
+
+//*****************************************************************************
+// shmin
+
+int ludbGetCLIROption(const short index, T_SS_SUBSC_CLIR_OPTION *option, bool *isProvCLIR)
+{
+ T_SUBSC_INFO* ss = ludbGetSubscInfoPtr(index);
+ if(subscIsProvCLIR(ss) == 0){
+ *isProvCLIR = 1;
+ return 0;
+ }
+ else{
+ *isProvCLIR = 0;
+ return(subscGetCLIROption(ss,option));
+ }
+}
+
+void testludbGetCLIROption(const short index)
+{
+int ret;
+T_SS_SUBSC_CLIR_OPTION *option;
+bool *isProvCLIR;
+
+ ret = ludbGetCLIROption(index, option, isProvCLIR);
+ printf("LUDB return %d ludbGetCLIROption index %d, isProvCLIR %d, option %d", ret, index, *isProvCLIR, *option);
+}
+
+//*****************************************************************************
+bool ludbIsProvCOLP(const short index)
+{
+ T_SUBSC_INFO* ss = ludbGetSubscInfoPtr(index);
+ return(subscIsProvCOLP(ss));
+}
+
+//*****************************************************************************
+bool ludbIsProvCOLR(const short index)
+{
+ T_SUBSC_INFO* ss = ludbGetSubscInfoPtr(index);
+ return(subscIsProvCOLR(ss));
+}
+
+//*****************************************************************************
+bool ludbIsProvCFU(const short index)
+{
+ T_SUBSC_INFO* ss = ludbGetSubscInfoPtr(index);
+ return(subscIsProvCFU(ss));
+}
+
+//*****************************************************************************
+bool ludbIsProvCFB(const short index)
+{
+ T_SUBSC_INFO* ss = ludbGetSubscInfoPtr(index);
+ return(subscIsProvCFB(ss));
+}
+
+//*****************************************************************************
+bool ludbIsProvCFNRY(const short index)
+{
+ T_SUBSC_INFO* ss = ludbGetSubscInfoPtr(index);
+ return(subscIsProvCFNRY(ss));
+}
+
+//*****************************************************************************
+bool ludbIsProvCFNRC(const short index)
+{
+ T_SUBSC_INFO* ss = ludbGetSubscInfoPtr(index);
+ return(subscIsProvCFNRC(ss));
+}
+
+//*****************************************************************************
+bool ludbIsProvECT(const short index)
+{
+ T_SUBSC_INFO* ss = ludbGetSubscInfoPtr(index);
+ return(subscIsProvECT(ss));
+}
+
+//*****************************************************************************
+bool ludbIsProvCW(const short index)
+{
+ T_SUBSC_INFO* ss = ludbGetSubscInfoPtr(index);
+ return(subscIsProvCW(ss));
+}
+
+//*****************************************************************************
+bool ludbIsProvHOLD(const short index)
+{
+ T_SUBSC_INFO* ss = ludbGetSubscInfoPtr(index);
+ return(subscIsProvHOLD(ss));
+}
+
+//*****************************************************************************
+bool ludbIsProvMPTY(const short index)
+{
+ T_SUBSC_INFO* ss = ludbGetSubscInfoPtr(index);
+ return(subscIsProvMPTY(ss));
+}
+
+//*****************************************************************************
+bool ludbIsProvBAOC(const short index)
+{
+ T_SUBSC_INFO* ss = ludbGetSubscInfoPtr(index);
+ return(subscIsProvBAOC(ss));
+}
+
+//*****************************************************************************
+bool ludbIsProvBOIC(const short index)
+{
+ T_SUBSC_INFO* ss = ludbGetSubscInfoPtr(index);
+ return(subscIsProvBOIC(ss));
+}
+
+//*****************************************************************************
+bool ludbIsProvBOICE(const short index)
+{
+ T_SUBSC_INFO* ss = ludbGetSubscInfoPtr(index);
+ return(subscIsProvBOICE(ss));
+}
+
+//*****************************************************************************
+bool ludbIsProvBAIC(const short index)
+{
+ T_SUBSC_INFO* ss = ludbGetSubscInfoPtr(index);
+ return(subscIsProvBAIC(ss));
+}
+
+//*****************************************************************************
+bool ludbIsActiveCFU(const short index)
+{
+ T_SUBSC_IE_SS_INFO_LIST *info_list = ludbGetSSInfoListPtr(index);
+ return(subscIsActiveCF(info_list, SUPP_SERV_CFU));
+}
+
+//*****************************************************************************
+bool ludbIsActiveCFB(const short index)
+{
+ T_SUBSC_IE_SS_INFO_LIST *info_list = ludbGetSSInfoListPtr(index);
+ return(subscIsActiveCF(info_list, SUPP_SERV_CFB));
+}
+
+//*****************************************************************************
+bool ludbIsActiveCFNRY(const short index)
+{
+ T_SUBSC_IE_SS_INFO_LIST *info_list = ludbGetSSInfoListPtr(index);
+ return(subscIsActiveCF(info_list, SUPP_SERV_CFNRY));
+}
+
+//*****************************************************************************
+int ludbGetTimerCFNRY(const short index)
+{
+ T_SUBSC_IE_SS_INFO_LIST *info_list = ludbGetSSInfoListPtr(index);
+ return(subscGetTimerCFNRY(info_list));
+}
+
+//*****************************************************************************
+bool ludbIsActiveCFNRC(const short index)
+{
+ T_SUBSC_IE_SS_INFO_LIST *info_list = ludbGetSSInfoListPtr(index);
+ return(subscIsActiveCF(info_list, SUPP_SERV_CFNRC));
+}
+
+//*****************************************************************************
+bool ludbIsActiveCW(const short index)
+{
+ T_SUBSC_IE_SS_INFO_LIST *info_list = ludbGetSSInfoListPtr(index);
+ return(subscIsActiveCW(info_list));
+}
+
+//*****************************************************************************
+// prints
+//*****************************************************************************
+void ludbPrintSubscInfo(const short index)
+{
+ subscPrintInfo(ludbGetSubscInfoPtr(index));
+}
+
+//*****************************************************************************
+void ludbPrintImsi(const short index)
+{
+ subscPrintImsi(ludbGetMobileIdPtr(index));
+}
+
+//*****************************************************************************
+void ludbPrintIsdn(const short index)
+{
+ subscPrintIsdn(ludbGetMSISDNPtr(index));
+}
+
+//*****************************************************************************
+void ludbPrintProvBS(const short index)
+{
+ subscPrintProvBS(ludbGetProvBSPtr(index));
+}
+
+//*****************************************************************************
+void ludbPrintProvTS(const short index)
+{
+ subscPrintProvTS(ludbGetProvTSPtr(index));
+}
+
+//*****************************************************************************
+void ludbPrintProvSS(const short index)
+{
+ subscPrintProvSS(ludbGetProvSSPtr(index));
+}
+
+//*****************************************************************************
+void ludbPrintSubscStatus(const short index)
+{
+ subscPrintSubscStatus(ludbGetSubscStatusPtr(index));
+}
+
+//*****************************************************************************
+void ludbPrintODBData(const short index)
+{
+ subscPrintODBData(ludbGetODBDataPtr(index));
+}
+
+//*****************************************************************************
+void ludbPrintSSInfoList(const short index)
+{
+ subscPrintSSInfoList(ludbGetSSInfoListPtr(index));
+}
+
+//*****************************************************************************
+void ludbPrintUserInfo(const short index)
+{
+ subscPrintUserInfo(ludbGetUserInfoPtr(index));
+}
+
+//*****************************************************************************
+void ludbPrintSRS(const short index)
+{
+ gLUDB.printSRS(index);
+}
+
+//*****************************************************************************
+//*****************************************************************************
+short ludbSetDecodeSubscInfo(const short index, unsigned char *msg, short size)
+{
+ T_SUBSC_INFO subsc;
+ short ret;
+
+ ret = DecodeSubscInfo(msg, size, &subsc);
+ if(ret)
+ return ret;
+ else
+ return gLUDB.update(index, subsc);
+}
+
+//*****************************************************************************
+// VOIP support
+//*****************************************************************************
+bool ludbGetMobileNumber(const short ludbId, char *num)
+{
+ if(num == 0) return false;
+
+ T_SUBSC_IE_ISDN* msisdn;
+ msisdn = ludbGetMSISDNPtr(ludbId);
+ if(msisdn == 0) return false;
+ if(msisdn->num_digit > MAX_NUM_SUBSC_ISDN) return false;
+ for(int i=0; i<msisdn->num_digit; i++)
+ num[i] = msisdn->digits[i];
+ num[i] = '\0';
+ return true;
+}
+
+//*****************************************************************************
+bool ludbGetMobileName(const short ludbId, char *name)
+{
+ if(name == 0) return false;
+
+ T_SUBSC_IE_USER_INFO* user;
+ user = ludbGetUserInfoPtr(ludbId);
+ if(user == 0) return false;
+ if(user->len > MAX_NUM_USER_INFO) return false;
+ for(int i=0; i<user->len; i++)
+ name[i] = user->name[i];
+ name[i] = '\0';
+ return true;
+}
+
+//*****************************************************************************
+bool isSameISDN(T_SUBSC_IE_ISDN *isdn, char *num)
+{
+ if(isdn->num_digit == 0) return false;
+ if(isdn->num_digit != strlen(num)) return false;
+ for(int i=0; i<isdn->num_digit; i++){
+ if(isdn->digits[i] != num[i])
+ return false;
+ }
+ return true;
+}
+
+//*****************************************************************************
+bool ludbIsMobileRegistered(char *num, short *ludbId)
+{
+ T_SUBSC_IE_ISDN* isdn;
+ DBG_FUNC("ludbIsMobileRegistered", LUDB_LAYER);
+ DBG_ENTER();
+ for(int i=0; i<LUDB_MAX_NUM_ENTRY; i++){
+ if((isdn = ludbGetMSISDNPtr(i)) != 0){
+ if(isSameISDN(isdn, num)){
+ *ludbId = i;
+ DBG_TRACE("Found Mobile %s in LUDB [%d]\n", num, i);
+ DBG_LEAVE();
+ return true;
+ }
+ }
+ }
+ DBG_WARNING("Mobile %s not registered in LUDB\n", num);
+ DBG_LEAVE();
+ return false;
+}
+
+//*****************************************************************************
+VOIP_MOBILE_HANDLE ludbGetVoipMobileHandle(const short ludbId)
+{
+// printf("[ludbGetVoipMobileHandle] Voip Mobile Handle is no longer supported\n");
+ return 0;
+}
+
+
+//*****************************************************************************
+void ludbSetCipherAlgo(short index, short algo)
+{
+ gLUDB.setAlgo(index, algo);
+}
+
+//*****************************************************************************
+short ludbGetCipherAlgo(short index, IntraL3CipherModeCommand_t *cmd)
+{
+ DBG_FUNC("ludbGetCipherAlgo", LUDB_LAYER);
+ DBG_ENTER();
+ short algo = gLUDB.curAlgo(index);
+ if(algo == -1){
+ DBG_ERROR("index out of range %d\n", index);
+ DBG_LEAVE();
+ return -1;
+ }
+ if(cmd == 0){
+ DBG_ERROR("null pointer for cmd field\n");
+ DBG_LEAVE();
+ return -1;
+ }
+
+ if(algo == 0){
+ cmd->cmd.cipherModeSetting.ciphering = CNI_RIl3_CIPHER_NO_CIPHERING;
+ for(int i=0; i<SEC_KC_LEN; i++) cmd->Kc[i] = 0xFF;
+ DBG_LEAVE();
+ return 0;
+ }
+ else if(algo == 1){
+ cmd->cmd.cipherModeSetting.ciphering = CNI_RIl3_CIPHER_START_CIPHERING;
+ cmd->cmd.cipherModeSetting.algorithm = CNI_RIL3_CIPHER_ALGORITHM_A51;
+ }
+ else if(algo == 2){
+ cmd->cmd.cipherModeSetting.ciphering = CNI_RIl3_CIPHER_START_CIPHERING;
+ cmd->cmd.cipherModeSetting.algorithm = CNI_RIL3_CIPHER_ALGORITHM_A52;
+ }
+ else{
+ DBG_ERROR("ludb %d, cipher mode was not set previously\n");
+ cmd->cmd.cipherModeSetting.ciphering = CNI_RIl3_CIPHER_NO_CIPHERING;
+ }
+ DBG_TRACE("ludb %d, cipherModeSetting.ciphering: %d\n", index, cmd->cmd.cipherModeSetting.ciphering);
+ DBG_TRACE("ludb %d, cipherModeSetting.algorithm: %d\n", index, cmd->cmd.cipherModeSetting.algorithm);
+
+ T_AUTH_TRIPLET *triplet = ludbCurTriplet(index);
+ if(triplet == 0){
+ DBG_ERROR("triplet returned 0 in CipherModeCmd for ludb %d\n", index);
+ DBG_LEAVE();
+ return -1;
+ }
+ else{
+ for(int i=0; i<SEC_KC_LEN; i++)
+ cmd->Kc[i] = triplet->Kc[i];
+ }
+
+ DBG_LEAVE();
+ return 0;
+}
+
diff --git a/data/mnet/GP10/Host/l1proxy/Makefile b/data/mnet/GP10/Host/l1proxy/Makefile
new file mode 100644
index 0000000..7be0a36
--- /dev/null
+++ b/data/mnet/GP10/Host/l1proxy/Makefile
@@ -0,0 +1,16 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= Src_init src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ $(CP) bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/l1proxy/Src_init/Makefile b/data/mnet/GP10/Host/l1proxy/Src_init/Makefile
new file mode 100644
index 0000000..a703007
--- /dev/null
+++ b/data/mnet/GP10/Host/l1proxy/Src_init/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = l1proxy
+THIS_DIRECTORY = Src_init
+MY_OUTPUT = $(OBJDIR)\l1proxy_init.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/l1proxy/Src_init/l1proxy_init.cpp b/data/mnet/GP10/Host/l1proxy/Src_init/l1proxy_init.cpp
new file mode 100644
index 0000000..7789f1d
--- /dev/null
+++ b/data/mnet/GP10/Host/l1proxy/Src_init/l1proxy_init.cpp
@@ -0,0 +1,64 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+#include "vxWorks.h"
+#include "memLib.h"
+#include "string.h"
+#include "intLib.h"
+#include "logLib.h"
+#include "taskLib.h"
+#include "msgQLib.h"
+#include "vxLib.h"
+#include "errnoLib.h"
+#include "stdio.h"
+#include "dsp\dsptypes.h"
+#include "dsp\dsphmsg.h"
+
+// L1 Interface Message Queue for receiving messages from outside
+MSG_Q_ID msgDspDn[2];
+
+int l1pTrxSwapState = FALSE;
+
+
+/*
+ * sendDsp is the layer 1 API for the upper layers. It just copies
+ * the message to a downstream message queue for later processing
+ * by the downstream message task.
+ */
+
+void sendDsp
+ (
+ unsigned char *buffer,
+ int len
+ )
+{
+ STATUS status;
+ unsigned char port;
+
+ port = (((msgStruc*)buffer)->trx) & 0x1; /* message for this port(dsp) */
+
+ status = msgQSend(msgDspDn[port], (char *) buffer, len, WAIT_FOREVER, MSG_PRI_NORMAL);
+ if (status == ERROR)
+ {
+ printf("L1 proxy cannot queue a message for DSP %d\n",port);
+ }
+}
+
+
+/*******************************************************************************
+l1pTrxSwap
+
+Swaps trx - dsp mapping
+*/
+
+STATUS l1pTrxSwap(UCHAR trxA, UCHAR trxB)
+{
+ l1pTrxSwapState = !l1pTrxSwapState;
+ return OK;
+}
+
+
diff --git a/data/mnet/GP10/Host/l1proxy/include/cc_user.dat b/data/mnet/GP10/Host/l1proxy/include/cc_user.dat
new file mode 100644
index 0000000..50a92eb
--- /dev/null
+++ b/data/mnet/GP10/Host/l1proxy/include/cc_user.dat
Binary files differ
diff --git a/data/mnet/GP10/Host/l1proxy/include/foo.h b/data/mnet/GP10/Host/l1proxy/include/foo.h
new file mode 100644
index 0000000..645fb7e
--- /dev/null
+++ b/data/mnet/GP10/Host/l1proxy/include/foo.h
@@ -0,0 +1,17 @@
+/*
+ * The foo struct is the interface to PCI as defined by sysFooPci.c
+ */
+
+struct foo
+{
+ int pciBus; /* the pci bus number */
+ int pciDevice; /* the pci device number */
+ int pciFunc; /* the pci function number */
+ char irq; /* the pci irq */
+ FUNCPTR intRoutine; /* interrupt routine */
+ struct
+ {
+ UINT32 pciBAR; /* pci base address register */
+ UINT32 pciBARSize; /* pci bar address size */
+ } bar[5];
+};
diff --git a/data/mnet/GP10/Host/l1proxy/src/Makefile b/data/mnet/GP10/Host/l1proxy/src/Makefile
new file mode 100644
index 0000000..19066f1
--- /dev/null
+++ b/data/mnet/GP10/Host/l1proxy/src/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = l1proxy
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\$(THIS_APP_DIR).out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/l1proxy/src/l1MsMsgProc.cpp b/data/mnet/GP10/Host/l1proxy/src/l1MsMsgProc.cpp
new file mode 100644
index 0000000..bd359ca
--- /dev/null
+++ b/data/mnet/GP10/Host/l1proxy/src/l1MsMsgProc.cpp
@@ -0,0 +1,780 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/*
+ * The code in this file implement a vxWorks layer 1 interface
+ * to a TI CX6 DSP over the DSP's HPI interface. The message
+ * structure over the interface is defined by JetCell. The basic
+ * buffer consists of four bytes giving the number of blocks "n"
+ * followed by "n" 64 byte blocks or messages. The first four
+ * bytes of each message or block represent "len", or the
+ * the length of the message block, minus an 8 byte header.
+ *
+ * Downstream messaging is initiated by calling the vxWorks API
+ * sendDsp(void *msg, int len). sendDsp, executing in the thread
+ * of the caller, will do a buffer copy to a vxWorks queue and exit
+ * A vxWorks task, taskDspDn, blocks on this queue, awakening to
+ * perform the actual blocking and transmission to to the DSP over
+ * HPI.
+ *
+ * Upstream messaging is initiated by the DSP issuing an interrupt
+ * to vxWorks. The interrupt is handled by the routine fooInt, which
+ * will "give" the semaphore semDspUp. A vxWorks task, taskDspUp,
+ * blocks on this semaphore. The HPI buffer is transferred and unblocked
+ * by this task. Notice that all buffer processing is done at task level.
+ * All vxWorks artifacts, queues, tasks, interrupt routines, semaphores,
+ * are intialialized by initL1. The DSP is initialized by initDSP. The
+ * go routine is used to enable interrupts and start the DSP in
+ * HPI boot mode.
+ */
+
+#include <vxWorks.h>
+#include <time.h>
+#include <timers.h>
+#include "stdlib.h"
+#include "memLib.h"
+#include "string.h"
+#include "intLib.h"
+#include "logLib.h"
+#include "taskLib.h"
+#include "msgQLib.h"
+#include "vxLib.h"
+#include "errnoLib.h"
+#include "stdio.h"
+#include <semLib.h>
+
+#include "tickLib.h"
+#include "dsp/dsptypes.h"
+#include "dsp/dsphmsg.h"
+#include "l1proxy/l1proxy.h"
+#include "MCH/MCHIntf.h"
+#include "logging/vcmodules.h"
+#include "logging/vclogging.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+void hpi2dsp(void *buffer, unsigned int addr, int nBytes);
+
+extern void SetUpForDSPTestBootupMsg(void);
+extern int WaitForDSPTestBootupMsg(void);
+
+extern int snmp_getValue (int);
+extern int snmp_nameToTag (char *);
+
+#ifdef __cplusplus
+}
+#endif
+
+void dspExtMemTestRsp (unsigned char*);
+void dspToneMeasureRsp (unsigned char*);
+void dspDump (char *p, int len, l1ProxyLogType);
+void sendDsp (unsigned char *buffer, int len);
+void sendIdentityReq (unsigned char trx, unsigned char timeSlot);
+
+void clearMobileMeas (UINT8 trx);
+void showMobileMeas (UINT8 trx);
+INT32 procUlTchFrame (UINT8 *tchMsg);
+
+SEM_ID dspLoadSem;
+int numBootUpMsgs = 0;
+
+MSG_Q_ID dspPwrUpMsgQID;
+int dspPwrUpCallerType;
+int dspPwrUpCallerMsgType;
+
+/*
+* enable error and diagnostic message print to console
+*/
+int g_l1proxyErrorPrint = 0;
+int g_l1proxyDiagPrint = 0;
+int g_l1proxyShellDisplay = 0;
+int g_l1proxyPowerControlMsgPrint = 0;
+int g_l1proxySacchMeasReportFromDL = 0;
+
+int g_l1proxyTchFrameMissDisplay = 0;
+
+int g_l1proxyFacchTest = 0;
+
+extern int l1pTrxSwapState; /* 1/0 - swap/don't swap trx-dsp mapping */
+
+DbgOutput l1proxyDbg;
+
+typedef struct
+{
+ int sdcchRcvd[8];
+ int sacchRcvd[8];
+ int rachRcvd;
+ int facchRcvd;
+ int tchRcvd;
+} ulMsMsgStruc;
+
+ulMsMsgStruc ulMsMsgLog[2][8] = {0};
+
+typedef struct
+{
+ unsigned long badSdcchBits[8];
+ unsigned long totalSdcchBits[8];
+ unsigned long badSdcchFrames[8];
+ unsigned long totalSdcchFrames[8];
+
+ unsigned long badBits;
+ unsigned long totalBits;
+ unsigned long badFrames;
+ unsigned long totalFrames;
+
+ unsigned short pdchChannel;
+
+} ulMsMearsStruc;
+
+ulMsMearsStruc ulMsMearsLog[2][8] = {0};
+
+typedef enum
+{
+ ILLEGAL_MSG = 0,
+ SACCH = 1,
+ RACH = 2,
+ FACCH = 3,
+ SDCCH4 = 4,
+ SACCH4 = 5,
+ SDCCH8 = 6,
+ SACCH8 = 7,
+ TCH = 8,
+ RTS_MSG = 9
+} ulMsMsgType;
+
+int ulMobileMessagePreProc(unsigned char *msgBuf)
+{
+ l1proxyDbg.Enter();
+ unsigned char TRX;
+ unsigned char timeSlot;
+ unsigned char subCh;
+ unsigned char reportMode;
+ unsigned char *payload;
+ unsigned char cbits;
+ unsigned char function;
+ unsigned short msgType;
+ unsigned int t1, t2, t3, frameNum, hpiTxFrameNumber;
+ msgDiscriminator msgDes;
+ unsigned short count;
+
+ signed int iSample, qSample;
+ /*
+ * Message to Layer2 is set enable as default
+ */
+ unsigned char sendMsg2L2;
+ short i;
+ ulMsMsgType msMsg;
+
+ TRX = msgBuf[7];
+ function = msgBuf[4];
+ msgType = msgBuf[5]<<8 | msgBuf[6];
+ timeSlot = msgBuf[8] & 7;
+ subCh = (msgBuf[8] >> 3) & 3;
+ reportMode = msgBuf[9];
+ payload = & msgBuf[10];
+
+ sendMsg2L2 = 1;
+ msMsg = ILLEGAL_MSG;
+
+ switch(function)
+ {
+ case TRX_MANAGE_MSG:
+
+ switch(msgType)
+ {
+ case REQ_CONFIG_RADIO_TX_PWR:
+ printf("REQ_CONFIG_RADIO_TX_PWR Received From TRX: %d \n", TRX);
+ sendMsg2L2 = 0;
+ break;
+
+ case RADIO_TX_PWR_CHAR_CONFIG_ACK:
+ printf("RADIO_TX_PWR_CHAR_CONFIG_ACK Received \n");
+ sendMsg2L2 = 0;
+ break;
+
+ case TX_PWR_OFFSETS_CONFIG_ACK:
+ printf("TX_PWR_OFFSETS_CONFIG_ACK Received \n");
+ sendMsg2L2 = 0;
+ break;
+
+ case RADIO_GAIN_CHAR_CONFIG_ACK:
+ printf("RADIO_GAIN_CHAR_CONFIG_ACK Received \n");
+ sendMsg2L2 = 0;
+ break;
+
+ default:
+ break;
+ } /* switch(msgType) */
+ break;
+
+ case DIAGNOSTIC_MSG:
+
+ switch(msgType)
+ {
+ case ERROR_REPORT: /* Error Messages */
+
+ if(reportMode == UNAUTHORIZED_MSG_SIZE)
+ {
+ l1proxyDbg.Error("Trx%1d Ts%1d Host Message Size Out of Bounds \n",
+ TRX, timeSlot);
+ }
+ else if(reportMode == UNKNOWN_MSG_DISCRIMINATOR)
+ {
+ l1proxyDbg.Error("Trx%1d Ts%1d Unknown Message Discriminator(0x%x) \n",
+ TRX, timeSlot, payload[4]);
+ }
+ else if(reportMode == 0x20)
+ {
+ l1proxyDbg.Error("Trx%1d Ts%1d Illegal TRX Number(%d) \n",
+ TRX, timeSlot, payload[0]);
+ }
+ else if(reportMode == UNKNOWN_CMD)
+ {
+ l1proxyDbg.Error("Trx%1d Ts%1d Unknown Message Type(0x%04X) \n",
+ TRX, timeSlot, payload[0] <<8 | msgBuf[11]);
+ }
+ else
+ {
+ l1proxyDbg.Error("Trx%1d Ts%1d Function=DspDiag, msgType=ErrorReport, ReportMode=%d \n",
+ TRX, timeSlot, reportMode);
+ }
+
+ /*
+ * display GSM frame number for all error messages
+ */
+ if(g_l1proxyDiagPrint)
+ {
+ hpiTxFrameNumber = (int) (msgBuf[60] | msgBuf[61]<<8 | msgBuf[62]<<16 | msgBuf[63]<<24);
+ l1proxyDbg.Trace("GSM Frame Number: 0x%08X \n", hpiTxFrameNumber);
+ }
+ break; // End of ErrorReport catagory fo DSP diagnostic messsages
+
+ case MPH_DSP_DIAG_REPORT_RSP: /* Diagnostic Message */
+
+ switch(reportMode)
+ {
+ case MS_REPORT:
+ DiagSendMsg((char *)msgBuf, HPI_MSG_SIZE, DIAG_MS_REPORT);
+ unsigned long cumErrs, cumBits, cumFrameErrs, cumFrames;
+
+ cumErrs = (unsigned long)(msgBuf[10])<<24 |
+ (unsigned long)(msgBuf[11])<<16 |
+ (unsigned long)(msgBuf[12])<< 8 |
+ (unsigned long)(msgBuf[13]);
+ cumBits = (unsigned long)(msgBuf[14])<<24 |
+ (unsigned long)(msgBuf[15])<<16 |
+ (unsigned long)(msgBuf[16])<< 8 |
+ (unsigned long)(msgBuf[17]);
+ cumFrameErrs= (unsigned long)(msgBuf[26])<< 8 |
+ (unsigned long)(msgBuf[27]);
+ cumFrames = (unsigned long)(msgBuf[28])<< 8 |
+ (unsigned long)(msgBuf[29]);
+
+ if(TRX == 0 && timeSlot == 0)
+ {
+ ulMsMearsLog[TRX][timeSlot].badSdcchBits[subCh] += cumErrs;
+ ulMsMearsLog[TRX][timeSlot].totalSdcchBits[subCh] += cumBits;
+ ulMsMearsLog[TRX][timeSlot].badSdcchFrames[subCh] += cumFrameErrs;
+ ulMsMearsLog[TRX][timeSlot].totalSdcchFrames[subCh] += cumFrames;
+ }
+ else
+ {
+ ulMsMearsLog[TRX][timeSlot].badBits += cumErrs;
+ ulMsMearsLog[TRX][timeSlot].totalBits += cumBits;
+ ulMsMearsLog[TRX][timeSlot].badFrames += cumFrameErrs;
+ ulMsMearsLog[TRX][timeSlot].totalFrames += cumFrames;
+
+ ulMsMearsLog[TRX][timeSlot].pdchChannel = 0;
+
+ if ( ((unsigned long)(msgBuf[24]) == 0xff) &&
+ ((unsigned long)(msgBuf[25]) == 0xff) )
+ {
+ ulMsMearsLog[TRX][timeSlot].pdchChannel = 1;
+ }
+
+ if(ulMsMearsLog[TRX][timeSlot].totalBits > 0xFFF00000)
+ {
+ if(g_l1proxyDiagPrint)
+ {
+ showMobileMeas(TRX);
+ }
+ clearMobileMeas(TRX);
+ }
+ }
+ break;
+
+ case GPRS_MS_REPORT:
+ DiagSendMsg((char *)msgBuf, HPI_MSG_SIZE, DIAG_GPRS_MS_REPORT);
+ break;
+
+ case DC_OFFSET_REPORT:
+ {
+ short offsetI[13], offsetQ[13], i;
+ for ( i=0; i<13; i++ )
+ {
+ offsetI[i] = (short) ( (unsigned short)(payload[4*i])<<8 |
+ (unsigned short)(payload[4*i+1]) );
+ offsetQ[i] = (short) ( (unsigned short)(payload[4*i+2])<<8 |
+ (unsigned short)(payload[4*i+3]) );
+ }
+
+ l1proxyDbg.Trace("Trx%1d DC Offsets (%d,%d) (%d,%d) (%d,%d) (%d,%d) (%d,%d)"
+ " (%d,%d) (%d,%d) (%d,%d) (%d,%d) (%d,%d) (%d,%d) (%d,%d) (%d,%d) \n", TRX,
+ offsetI[0], offsetQ[0], offsetI[1], offsetQ[1], offsetI[2], offsetQ[2],
+ offsetI[3], offsetQ[3], offsetI[4], offsetQ[4], offsetI[5], offsetQ[5],
+ offsetI[6], offsetQ[6], offsetI[7], offsetQ[7], offsetI[8], offsetQ[8],
+ offsetI[9], offsetQ[9],offsetI[10],offsetQ[10],offsetI[11],offsetQ[11],
+ offsetI[12],offsetQ[12]);
+ }
+ break;
+
+ case POWER_CONTROL_REPORT:
+ if(g_l1proxyPowerControlMsgPrint)
+ {
+ short cmdPwr, rxlev, smPwr, gain, ta;
+
+ cmdPwr = (short) (msgBuf[10]);
+ rxlev = (short) ( (unsigned short)(msgBuf[11])<<8 |
+ (unsigned short)(msgBuf[12]) );
+ ta = (short) (msgBuf[13]);
+ smPwr = (short) ( (unsigned short)(msgBuf[14])<<8 |
+ (unsigned short)(msgBuf[15]) );
+ gain = (short) ( (unsigned short)(msgBuf[16])<<8 |
+ (unsigned short)(msgBuf[17]) );
+
+ l1proxyDbg.Trace( "Trx%1d Ts%1d Sub%1d RXLEV%3d CmdPwr %02d SmPwr %02d"
+ " Gain %03d TA%2d \n",
+ TRX, timeSlot, subCh, rxlev, cmdPwr, smPwr, gain, ta);
+ }
+ break;
+
+ case INVALID_TIMING_ADV:
+ if(g_l1proxyDiagPrint)
+ {
+ l1proxyDbg.Trace("Trx%1d Ts%1d TCH Invalid TA (%d) \n",
+ TRX, timeSlot, msgBuf[10]);
+ }
+ break;
+
+ case HO_PN_REPORT:
+ DiagSendMsg((char *)msgBuf, HPI_MSG_SIZE, DIAG_HO_PN_REPORT);
+ break;
+
+ case HO_CAND_REPORT:
+ DiagSendMsg((char *)msgBuf, HPI_MSG_SIZE, DIAG_HO_CAND_REPORT);
+ break;
+
+ case IF_REPORT:
+ DiagSendMsg((char *)msgBuf, HPI_MSG_SIZE, DIAG_IF_REPORT);
+ break;
+
+ case DL_MEAS_REPORT:
+ DiagSendMsg((char *)msgBuf, HPI_MSG_SIZE, DIAG_DL_REPORT);
+ break;
+
+
+ case HYPERFRAME_ROLLOVER:
+ if ( g_l1proxyShellDisplay )
+ l1proxyDbg.Trace("\nHyperframe rolled over at system time: %d \n", time);
+ break;
+
+ case SPEECH_UNDERFLOW:
+ if ( g_l1proxyTchFrameMissDisplay )
+ {
+ t1 = (short) ( (unsigned short)(payload[0])<<8 |
+ (unsigned short)(payload[1]) );
+ t2 = payload[2];
+ t3 = payload[3];
+ count = (short) ( (unsigned short)(payload[4])<<8 |
+ (unsigned short)(payload[5]) );
+
+ l1proxyDbg.Trace("Trx%1d Ts%1d DL TCH speech frame underflow %d times in SF "
+ "ending T1=%d T2=%d T3=%d \n", TRX, timeSlot, count, t1, t2, t3);
+ }
+ break;
+
+ case SPEECH_OVERFLOW:
+ if ( g_l1proxyTchFrameMissDisplay )
+ {
+ t1 = (short) ( (unsigned short)(payload[0])<<8 |
+ (unsigned short)(payload[1]) );
+ t2 = payload[2];
+ t3 = payload[3];
+ count = (short) ( (unsigned short)(payload[4])<<8 |
+ (unsigned short)(payload[5]) );
+
+ l1proxyDbg.Trace("Trx%1d Ts%1d DL TCH speech frame overflow %d times in SF "
+ "ending T1=%d T2=%d T3=%d \n", TRX, timeSlot, count, t1, t2, t3);
+ }
+ break;
+
+ case SPEECH_OUT_OF_SEQ:
+ if ( g_l1proxyTchFrameMissDisplay )
+ {
+ t1 = (short) ( (unsigned short)(payload[0])<<8 |
+ (unsigned short)(payload[1]) );
+ t2 = payload[2];
+ t3 = payload[3];
+ count = (short) ( (unsigned short)(payload[4])<<8 |
+ (unsigned short)(payload[5]) );
+
+ l1proxyDbg.Trace("Trx%1d Ts%1d DL TCH Out Of Sequence %d times in SF "
+ "ending T1=%d T2=%d T3=%d \n", TRX, timeSlot, count, t1, t2, t3);
+ }
+ break;
+
+ default:
+ if ( g_l1proxyDiagPrint )
+ {
+ l1proxyDbg.Trace("Trx%1d Ts%1d Function=DspDiag, msgType=DiagReport, ReportMode=%d \n",
+ TRX, timeSlot, reportMode);
+ dspDump((char *) & msgBuf[0], msgBuf[0]+4, L1PROXY_LOG_TRACE);
+ /*
+ * display GSM frame number for unspecified diag report messages
+ */
+ hpiTxFrameNumber = (int) (msgBuf[60] | msgBuf[61]<<8 | msgBuf[62]<<16 | msgBuf[63]<<24);
+ l1proxyDbg.Trace("GSM Frame Number: 0x%08X\n", hpiTxFrameNumber);
+ }
+ break;
+ }
+ break; // End of DiagReport catagory of DSP diagnostic messsages
+
+ /*----------------------------------------------------------------------
+ * Loopback Modes
+ *---------------------------------------------------------------------*/
+ case MPH_DSP_SET_LOOPBACK_MODE_RSP:
+ l1proxyDbg.Trace("Set LoopBack Response -- TRX: %d: Loopback Type: %x\n", TRX, msgBuf[8]);
+ break;
+
+ /*----------------------------------------------------------------------
+ * Burst Capture and Idle Frame Capture (combine later)
+ *---------------------------------------------------------------------*/
+ case MPH_DSP_DIAG_IDLE_FRAME_LOG_RSP:
+ case MPH_DSP_DIAG_BURST_CAPTURE_RSP:
+ /*--- Print Burst Capture always, but Idle Frame only if Diag Print on ---*/
+ if( (msgType == MPH_DSP_DIAG_BURST_CAPTURE_RSP) || g_l1proxyDiagPrint )
+ {
+ if ( msgBuf[11] ==0 )
+ {
+ if ( msgType == MPH_DSP_DIAG_IDLE_FRAME_LOG_RSP )
+ {
+ l1proxyDbg.Trace("DSP Idle Frame Log -- Trx%1d Ts%1d \n", TRX,timeSlot);
+ }
+ else
+ {
+ l1proxyDbg.Trace("DSP Burst Capture -- Trx%1d Ts%1d \n", TRX,timeSlot);
+ }
+ }
+
+ char buf[DSPBUFFERMAX];
+ int curPtr = 0;
+
+ curPtr += sprintf(buf+curPtr, "Block: %d\n", msgBuf[11]);
+
+ curPtr += sprintf(buf+curPtr, "I: ");
+ for(i=0; i<12; i++) /* note: 12 = SAMPLES_PER_CAPTURE_MSG */
+ {
+ iSample = msgBuf[12+i*4] | msgBuf[13+i*4]<<8;
+ curPtr += sprintf(buf+curPtr, "0x%04X ",iSample);
+ }
+ curPtr += sprintf(buf+curPtr, "\n");
+
+ curPtr += sprintf(buf+curPtr, "Q: ");
+ for(i=0; i<12; i++)
+ {
+ qSample = msgBuf[14+i*4] | msgBuf[15+i*4]<<8;
+ curPtr += sprintf(buf+curPtr, "0x%04X ", qSample);
+ }
+ curPtr += sprintf(buf+curPtr, " \n");
+
+ l1proxyDbg.Trace(buf);
+ }
+ break;
+
+ case MPH_DSP_DIAG_ECHO_MSG_RSP:
+ DiagSendMsg((char *)msgBuf, HPI_MSG_SIZE, DIAG_DSP_ECHO_MSG);
+ break;
+
+ case MPH_DSP_EXT_MEM_CHECK_RSP:
+ DiagSendMsg((char*)msgBuf, HPI_MSG_SIZE, DSP_EXTMEM_TEST_RSP);
+ break;
+
+ case MPH_DSP_EXT_MEM_ERROR_RSP:
+ DiagSendMsg((char*)msgBuf, HPI_MSG_SIZE, DSP_EXTMEM_ERROR_RSP);
+ break;
+
+ case MPH_DSP_GENERATE_TONE_RSP:
+ DiagSendMsg((char*)msgBuf, HPI_MSG_SIZE, DSP_TONE_GENERATE_RSP);
+ break;
+
+ case MPH_DSP_MEASURE_TONE_RSP:
+ DiagSendMsg((char*)msgBuf, HPI_MSG_SIZE, DSP_TONE_MEASURE_RSP);
+ break;
+
+ case MPH_DSP_PWR_UP_UNSOL_RSP:
+ numBootUpMsgs++;
+ if ( numBootUpMsgs == 2 )
+ {
+ semGive (dspLoadSem);
+ numBootUpMsgs = 0;
+ }
+ break;
+
+ default:
+ l1proxyDbg.Trace("Trx%1d Function=DspDiag, msgType=%d \n", TRX, msgType);
+ dspDump((char *) & msgBuf[0], msgBuf[0]+4, L1PROXY_LOG_TRACE);
+ /*
+ * display GSM frame number for unspecified diag messages
+ */
+ if(g_l1proxyDiagPrint)
+ {
+ hpiTxFrameNumber = (int) (msgBuf[60] | msgBuf[61]<<8 | msgBuf[62]<<16 | msgBuf[63]<<24);
+ l1proxyDbg.Trace("GSM Frame Number: 0x%08X \n", hpiTxFrameNumber);
+ }
+ break;
+ } /* switch(msgType) */
+ sendMsg2L2 = 0; // don't send Diagnostic Message to up layer
+
+ break; // End of Diagnostic message
+
+ case TRAFFIC_MSG:
+ switch(msgType)
+ {
+ case UP_LINK_TCH:
+ //case UP_LINK_TCH: //0x3000
+ msMsg = TCH;
+ /*
+ * loopback ac l1 proxy
+ msgBuf[5] = DONW_LINK_TCH>>8;
+ msgBuf[6] = DONW_LINK_TCH;
+ sendDsp(msgBuf,msgBuf[0]+4);
+ */
+ procUlTchFrame(msgBuf);
+ break;
+ } /* switch(msgType) */
+ sendMsg2L2 = 0; // don't send Diagnostic Message to up layer
+ break;
+
+ default:
+ switch(msgType)
+ {
+ case PH_DATA_IND: // PH-DATA-IND
+ cbits = (msgBuf[8] & 0xf8) >> 3;
+
+ if(cbits == 1)
+ {
+ /*
+ * TCH Full Rate
+ */
+ if((msgBuf[10] & 0xC0) != 0x40)
+ {
+ msMsg = FACCH;
+
+ }
+ else
+ {
+ msMsg = SACCH;
+
+ /* If a measurement report, do not send it upper layer */
+ if ( ( msgBuf[17] & 0x7f ) == 0x15 )
+ sendMsg2L2 = 0;
+ }
+ subCh = 0;
+
+ }
+ else if(cbits <4)
+ {
+ /*
+ * TCH Half Rate
+ */
+ if((msgBuf[10] & 0xC0) != 0x40)
+ msMsg = FACCH;
+ else
+ {
+ msMsg = SACCH;
+ /* If a measurement report, do not send it upper layer */
+ if ( ( msgBuf[17] & 0x7f ) == 0x15 )
+ sendMsg2L2 = 0;
+ }
+ subCh = cbits & 1;
+ }
+ else if(cbits <8)
+ {
+ if((msgBuf[10] & 0xC0) == 0x40)
+ {
+ msMsg = SACCH4;
+ /* If a measurement report, do not send it upper layer */
+ if ( ( msgBuf[17] & 0x7f ) == 0x15 )
+ sendMsg2L2 = 0;
+ }
+ else
+ msMsg = SDCCH4;
+
+ subCh = cbits & 3;
+ }
+ else if(cbits < 16)
+ {
+ if((msgBuf[10] & 0xC0) != 0x40)
+ msMsg = SDCCH8;
+ else
+ {
+ /* If a measurement report, do not send it upper layer */
+ if ( ( msgBuf[17] & 0x7f ) == 0x15 )
+ sendMsg2L2 = 0;
+
+ msMsg = SACCH8;
+ }
+ subCh = cbits & 7;
+ }
+
+ if(g_l1proxyFacchTest && (msgBuf[13] == 0x03) && ((msgBuf[14] & 0x1F) == 0x19) && (msgBuf[15] == 0x01))
+ {
+ sendMsg2L2 = 0;
+ //sendIdentityReq(TRX, timeSlot);
+ }
+
+ if(msgBuf[13] == 0 && msgBuf[14] == 0) sendMsg2L2 = 0;
+ if(msgBuf[13] == 1 && msgBuf[14] == 3 && msgBuf[15] == 1) sendMsg2L2 = 0;
+ if(sendMsg2L2)
+ {
+ l1proxyDbg.Trace("DSP To LAPDm -> PH-DATA-IND:\n %02x %02x %02x %02x %02x %02x %02x %02x "
+ "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x \n",
+ msgBuf[13],msgBuf[14],msgBuf[15],msgBuf[16],msgBuf[17],msgBuf[18],msgBuf[19],msgBuf[20],
+ msgBuf[21],msgBuf[22],msgBuf[23],msgBuf[24],msgBuf[25],msgBuf[26],msgBuf[27],msgBuf[28],
+ msgBuf[29],msgBuf[30],msgBuf[31],msgBuf[32],msgBuf[33]);
+ }
+ break;
+
+ case PH_RACH_IND:
+ l1proxyDbg.Trace("DSP To LAPDm -> RACH: %02x %02x %02x %02x %02x %02x \n",
+ msgBuf[11],msgBuf[12],msgBuf[13],msgBuf[14],msgBuf[15],msgBuf[16]);
+
+ msMsg = RACH;
+ break;
+
+ case PH_READY2SEND_IND:
+ if(function == RR_MANAGE_MSG)
+ l1proxyDbg.Trace("DSP To LAPDm -> RTS on Trx%d Ts%d \n", TRX, timeSlot);
+ else if(function == PDCH_MANAGE_MSG)
+ {
+ l1proxyDbg.Trace("DSP To RLC/MAC -> RTS on Trx%d Ts%d SubCh%d RdyBuf%d \n", TRX, timeSlot, subCh, msgBuf[11]);
+ }
+ else
+ {
+ l1proxyDbg.Trace("DSP To RRM -> RTS on Trx%d Ts%d SubCh%d RdyBuf%d \n", TRX, timeSlot, subCh, msgBuf[11]);
+ }
+ msMsg = RTS_MSG;
+ break;
+
+ case 0x2000: //BootStrap
+ l1proxyDbg.Trace("DSP To RRM -> Bootstrap Completed \n");
+ break;
+
+ case DCH_RF_LINK_LOST_IND: //Radio Link Failed
+ l1proxyDbg.Warning("DSP To RRM -> Radio Link Failed on Trx%d Ts%d \n", TRX, timeSlot);
+ break;
+
+ default:
+ break;
+ } /* switch(msgType) */
+ if(g_l1proxyDiagPrint && sendMsg2L2)
+ {
+
+ hpiTxFrameNumber = (int) (msgBuf[60] | msgBuf[61]<<8 | msgBuf[62]<<16 | msgBuf[63]<<24);
+ t1 = hpiTxFrameNumber / 1326;
+ t2 = hpiTxFrameNumber % 26;
+ t3 = hpiTxFrameNumber % 51;
+
+ l1proxyDbg.Trace("SysTick: %08x; FN = 0x%08X; T1 = %d; T2 = %d ; T3 = %d \n",
+ tickGet(),
+ hpiTxFrameNumber,
+ t1, t2, t3);
+ }
+ break;
+ } /* end of switch(function) */
+
+
+ switch( msMsg )
+ {
+ case TCH:
+ ulMsMsgLog[TRX][timeSlot].tchRcvd++;
+ break;
+
+ case SDCCH4:
+ case SDCCH8:
+ ulMsMsgLog[TRX][timeSlot].sdcchRcvd[subCh]++;
+ break;
+
+ case SACCH:
+ case SACCH4:
+ case SACCH8:
+ ulMsMsgLog[TRX][timeSlot].sacchRcvd[subCh]++;
+ break;
+
+ case RACH:
+ ulMsMsgLog[TRX][timeSlot].rachRcvd++;
+ break;
+
+ case FACCH:
+
+ ulMsMsgLog[TRX][timeSlot].facchRcvd++;
+ break;
+
+ default:
+ break;
+ }
+ l1proxyDbg.Leave();
+ return(sendMsg2L2);
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: SetUpForDSPTestBootupMsg
+**
+** PURPOSE: Executes DSP Configuration modules.
+**
+** INPUT PARAMETERS: N/A
+**
+** RETURN VALUE(S): N/A
+**
+**----------------------------------------------------------------------------*/
+
+void SetUpForDSPTestBootupMsg(void)
+{
+ initDsp(0);
+ initDsp(1);
+ initInt();
+}
+
+
+/*----------------------------------------------------------------------------**
+**
+** METHOD NAME: WaitForDSPTestBootupMsg
+**
+** PURPOSE: Wait DSP Prod Test Bootup Message.
+**
+** INPUT PARAMETERS: N/A
+**
+** RETURN VALUE(S): N/A
+**
+**----------------------------------------------------------------------------*/
+
+int WaitForDSPTestBootupMsg(void)
+{
+ STATUS result;
+
+ taskDelay(300);
+
+ go(0);
+ go(1);
+
+ result = semTake (dspLoadSem, WAIT_FOREVER);
+
+ return(result);
+}
diff --git a/data/mnet/GP10/Host/l1proxy/src/l1diags.cpp b/data/mnet/GP10/Host/l1proxy/src/l1diags.cpp
new file mode 100644
index 0000000..90f7f5a
--- /dev/null
+++ b/data/mnet/GP10/Host/l1proxy/src/l1diags.cpp
@@ -0,0 +1,960 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/*
+ * The code in this file implement a vxWorks layer 1 interface
+ * to a TI CX6 DSP over the DSP's HPI interface. The message
+ * structure over the interface is defined by JetCell. The basic
+ * buffer consists of four bytes giving the number of blocks "n"
+ * followed by "n" 64 byte blocks or messages. The first four
+ * bytes of each message or block represent "len", or the
+ * the length of the message block, minus an 8 byte header.
+ *
+ * Downstream messaging is initiated by calling the vxWorks API
+ * sendDsp(void *msg, int len). sendDsp, executing in the thread
+ * of the caller, will do a buffer copy to a vxWorks queue and exit
+ * A vxWorks task, taskDspDn, blocks on this queue, awakening to
+ * perform the actual blocking and transmission to to the DSP over
+ * HPI.
+ *
+ * Upstream messaging is initiated by the DSP issuing an interrupt
+ * to vxWorks. The interrupt is handled by the routine fooInt, which
+ * will "give" the semaphore semDspUp. A vxWorks task, taskDspUp,
+ * blocks on this semaphore. The HPI buffer is transferred and unblocked
+ * by this task. Notice that all buffer processing is done at task level.
+ * All vxWorks artifacts, queues, tasks, interrupt routines, semaphores,
+ * are intialialized by initL1. The DSP is initialized by initDSP. The
+ * go routine is used to enable interrupts and start the DSP in
+ * HPI boot mode.
+ */
+
+#include "vxWorks.h"
+#include "memLib.h"
+#include "string.h"
+#include "intLib.h"
+#include "logLib.h"
+#include "taskLib.h"
+#include "msgQLib.h"
+#include "vxLib.h"
+#include "errnoLib.h"
+#include "stdio.h"
+#include "logging/vclogging.h"
+
+#include "dsp/dsptypes.h"
+#include "dsp/dsphmsg.h"
+
+//#include "foo.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+void hpi2dsp
+ (
+ void *buffer,
+ unsigned int addr,
+ int nBytes
+ );
+#ifdef __cplusplus
+}
+#endif
+
+
+
+
+typedef struct
+{
+ int sdcchRcvd[8];
+ int sacchRcvd[8];
+ int rachRcvd;
+ int facchRcvd;
+ int tchRcvd;
+} ulMsMsgStruc;
+
+extern ulMsMsgStruc ulMsMsgLog[2][8];
+
+
+
+
+typedef struct
+{
+ unsigned long badSdcchBits[8];
+ unsigned long totalSdcchBits[8];
+ unsigned long badSdcchFrames[8];
+ unsigned long totalSdcchFrames[8];
+
+ unsigned long badBits;
+ unsigned long totalBits;
+ unsigned long badFrames;
+ unsigned long totalFrames;
+
+ unsigned short pdchChannel;
+
+} ulMsMearsStruc;
+
+extern ulMsMearsStruc ulMsMearsLog[2][8];
+
+extern DbgOutput l1proxyDbg;
+
+void api_SendMsgFromRmToL1 (
+ unsigned short length,
+ unsigned char *msg
+ );
+
+
+void SendFacchMsg(unsigned char timeSlot)
+{
+ unsigned short length;
+ unsigned char i;
+ unsigned char UA_buffer[]= {
+ 0x02,0x00,0x01,0x00,0x08,0x00,0x00,
+ 0x01,0x73,0x49,0x05,0x08,0x70,0x00,
+ 0xf1,0x10,0xff,0xfe,0x20,0x08,0x29,
+ 0x43,0x03,0x75,0x47,0x00,0x24,0xff,
+ 0x2b,0x2b
+ };
+ UA_buffer[4] |= timeSlot;
+ l1proxyDbg.Trace("Send A Facch -> Dsp ....\n");
+ for(i=0;i<1;i++)
+ {
+ api_SendMsgFromRmToL1(30, UA_buffer);
+ }
+
+}
+
+void intg_SendChanActivation( unsigned char chan);
+void intg_SendChanDeActivation( unsigned char chan);
+
+
+void t_sendDlFacchMsg(void)
+{
+ unsigned char TN;
+
+ while(1)
+ {
+ for(TN=1; TN < 7; TN++)
+ {
+ taskDelay(100);
+ l1proxyDbg.Trace("Activate Channel(TN): %d\n", TN);
+ //intg_SendChanActivation(2);
+
+ l1proxyDbg.Trace("Send a Facch on TimeSlot: %d \n", TN);
+ SendFacchMsg(2);
+
+ l1proxyDbg.Trace("DeActivate Channel(TN): %d\n", TN);
+ //intg_SendChanActivation(2);
+
+ }
+ }
+}
+
+/* taskSpawn("FacchTest, 100, 0, 1024,t_sendDlFacchMsg,0, 0, 0, 0, 0, 0, 0, 0, 0, 0); */
+void testFacch(void)
+{
+ taskSpawn(
+ "facchTest", // Task name
+ 50, // priority
+ 0, // option word
+ 1024*32, // stack size
+ (FUNCPTR)t_sendDlFacchMsg, // entry function pointer
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ );
+}
+
+void l1test_SendDnFacchMsg(void)
+{
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+/* buffer[length++] = 40;
+ buffer[length++] = 0;
+ buffer[length++] = 0;
+ buffer[length++] = 0;
+*/
+ buffer[length++] = 0x02;
+ buffer[length++] = 0x00;
+ buffer[length++] = 0x01;
+ buffer[length++] = 0;
+ buffer[length++] = 0x09; //FACCH CHN NUMBER hi byte
+ buffer[length++] = 0x00; //FACCH CHN NUMBER lo byte
+ buffer[length++] = 0x00; //Main signaling
+
+ memset(&buffer[length], 0x2b, 23);
+
+ while(1)
+ {
+ taskDelay(1);
+
+ /* Send PH_DATA_REQ to L1 */
+ api_SendMsgFromRmToL1(30, buffer);
+
+ }
+}
+
+void loopbackDsp(unsigned char trx, unsigned char loopbackType)
+{
+ unsigned short length=0;
+ unsigned char buffer[40];
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_SET_LOOPBACK_MODE_REQ>>8;
+ buffer[length++] = MPH_DSP_SET_LOOPBACK_MODE_REQ;
+ buffer[length++] = trx;
+ buffer[length++] = loopbackType;
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void sendSyncCmdToDsp(unsigned char trx)
+{
+ unsigned short length=0;
+ unsigned char buffer[40];
+
+ buffer[length++] = TRX_MANAGE_MSG; /* function type */
+ buffer[length++] = SYNCH>>8;
+ buffer[length++] = SYNCH;
+ buffer[length++] = trx;
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+
+void sendPAGMsgToDsp(unsigned char trx, unsigned char pagingGroup, unsigned char repeats)
+{
+ unsigned short length = 0x1e;
+ unsigned char buffer[0x1e] = { 0x02, 0x00, 0x01, 0x00, 0x90, 0x1c, 0x20, 0x2d, 0x06, 0x3f, 0x03, 0x09,
+ 0xa3, 0x14, 0xe0, 0x24, 0x0f, 0x00, 0x00, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
+ 0x2b, 0x2b, 0x2b, 0x2b, 0x2b};
+
+ buffer[5] = pagingGroup;
+
+ while(repeats--)
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+
+void rachThresh(UINT8 rachThresh)
+{
+
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+ buffer[length++] = TRX_MANAGE_MSG; /* function type */
+ buffer[length++] = SET_RACH_SNR_THRESHOLD>>8;
+ buffer[length++] = SET_RACH_SNR_THRESHOLD;
+ buffer[length++] = 0;
+ buffer[length++] = rachThresh;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+ buffer[length++] = TRX_MANAGE_MSG; /* function type */
+ buffer[length++] = SET_RACH_SNR_THRESHOLD>>8;
+ buffer[length++] = SET_RACH_SNR_THRESHOLD;
+ buffer[length++] = 1;
+ buffer[length++] = rachThresh;
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void msReport(unsigned char trx, unsigned char tsMask)
+{
+ unsigned short length=0;
+ unsigned char buffer[40];
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = trx;
+ buffer[length++] = MS_REPORT;
+ buffer[length++] = tsMask;
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void gprsMsReport(unsigned char trx, unsigned char tsMask)
+{
+ unsigned short length=0;
+ unsigned char buffer[40];
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = trx;
+ buffer[length++] = GPRS_MS_REPORT;
+ buffer[length++] = tsMask;
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void dcchReport(unsigned char trx, unsigned char tsMask)
+{
+ unsigned short length=0;
+ unsigned char buffer[40];
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = trx;
+ buffer[length++] = MS_REPORT;
+ buffer[length++] = tsMask;
+ buffer[length++] = 1; /* report on FACCH and SDCCH only */
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void hoReport(unsigned char trx, unsigned char tsMask)
+{
+ unsigned short length=0;
+ unsigned char buffer[40];
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = trx;
+ buffer[length++] = HO_REPORT;
+ buffer[length++] = tsMask;
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void dlMeasReport(unsigned char trx, unsigned char tsMask)
+{
+ unsigned short length=0;
+ unsigned char buffer[40];
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = trx;
+ buffer[length++] = DL_MEAS_REPORT;
+ buffer[length++] = tsMask;
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void dcOffsetReport(unsigned char trx, unsigned char state, unsigned char tsMask)
+{
+ unsigned short length=0;
+ unsigned char buffer[40];
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_REPORT_REQ;
+ buffer[length++] = trx;
+ buffer[length++] = DC_OFFSET_REPORT;
+ buffer[length++] = state; /* 0=disable; 1=enable */
+ buffer[length++] = tsMask; /* TS to observe in DC offset calc */
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void agcDbrTarget(unsigned int val)
+{
+ unsigned short length=0;
+ unsigned char buffer[40];
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_SET_AGC_DBR_TARGET>>8;
+ buffer[length++] = MPH_DSP_DIAG_SET_AGC_DBR_TARGET;
+ buffer[length++] = 0; /* trx 0 */
+ buffer[length++] = (val >> 8) & 0xff;
+ buffer[length++] = val;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_SET_AGC_DBR_TARGET>>8;
+ buffer[length++] = MPH_DSP_DIAG_SET_AGC_DBR_TARGET;
+ buffer[length++] = 1; /* trx 1 */
+ buffer[length++] = (val >> 8) & 0xff;
+ buffer[length++] = val;
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void tchMaskingThresh(unsigned char berThresh, unsigned int metricThresh)
+{
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = 0x22; /* temporary, and it's */
+ buffer[length++] = 0xee; /* hard coded into tch.c */
+ buffer[length++] = 0; /* trx 0 */
+ buffer[length++] = berThresh;
+ buffer[length++] = (metricThresh >> 8) & 0xff;
+ buffer[length++] = metricThresh;
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = 0x22; /* temporary, and it's */
+ buffer[length++] = 0xee; /* hard coded into tch.c */
+ buffer[length++] = 1; /* trx 1 */
+ buffer[length++] = berThresh;
+ buffer[length++] = (metricThresh >> 8) & 0xff;
+ buffer[length++] = metricThresh;
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void capture(unsigned char trx, unsigned char timeSlot)
+{
+ unsigned short length=0;
+ unsigned char buffer[40];
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_BURST_CAPTURE_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_BURST_CAPTURE_REQ;
+ buffer[length++] = trx;
+ buffer[length++] = timeSlot;
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void disableRadioLinkLost(void)
+{
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_RADIO_LINK_LOST>>8;
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_RADIO_LINK_LOST;
+ buffer[length++] = 0;
+ buffer[length++] = 0; /* 0 = disable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_RADIO_LINK_LOST>>8;
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_RADIO_LINK_LOST;
+ buffer[length++] = 1;
+ buffer[length++] = 0; /* 0 = disable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void enableRadioLinkLost(void)
+{
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_RADIO_LINK_LOST>>8;
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_RADIO_LINK_LOST;
+ buffer[length++] = 0;
+ buffer[length++] = 1; /* 1 = enable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_RADIO_LINK_LOST>>8;
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_RADIO_LINK_LOST;
+ buffer[length++] = 1;
+ buffer[length++] = 1; /* 1 = enable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void disableGprsRateTransition(void)
+{
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_GPRS_RATE_TRAN>>8;
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_GPRS_RATE_TRAN;
+ buffer[length++] = 0;
+ buffer[length++] = 0; /* 0 = disable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_GPRS_RATE_TRAN>>8;
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_GPRS_RATE_TRAN;
+ buffer[length++] = 1;
+ buffer[length++] = 0; /* 0 = disable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void enableGprsRateTransition(void)
+{
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_GPRS_RATE_TRAN>>8;
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_GPRS_RATE_TRAN;
+ buffer[length++] = 0;
+ buffer[length++] = 1; /* 1 = enable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_GPRS_RATE_TRAN>>8;
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_GPRS_RATE_TRAN;
+ buffer[length++] = 1;
+ buffer[length++] = 1; /* 1 = enable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void disableAgc(void)
+{
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_AGC>>8;
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_AGC;
+ buffer[length++] = 0;
+ buffer[length++] = 0; /* 0 = disable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_AGC>>8;
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_AGC;
+ buffer[length++] = 1;
+ buffer[length++] = 0; /* 0 = disable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void enableAgc(void)
+{
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_AGC>>8;
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_AGC;
+ buffer[length++] = 0;
+ buffer[length++] = 1; /* 1 = enable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_AGC>>8;
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_AGC;
+ buffer[length++] = 1;
+ buffer[length++] = 1; /* 1 = enable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void disablePowerControl(void)
+{
+
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_POWER_CONTROL>>8;
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_POWER_CONTROL;
+ buffer[length++] = 0;
+ buffer[length++] = 0; /* 0 = disable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_POWER_CONTROL>>8;
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_POWER_CONTROL;
+ buffer[length++] = 1;
+ buffer[length++] = 0; /* 0 = disable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void enablePowerControl(void)
+{
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_POWER_CONTROL>>8;
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_POWER_CONTROL;
+ buffer[length++] = 0;
+ buffer[length++] = 1; /* 1 = enable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_POWER_CONTROL>>8;
+ buffer[length++] = MPH_DSP_DIAG_SWITCH_POWER_CONTROL;
+ buffer[length++] = 1;
+ buffer[length++] = 1; /* 1 = enable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void disableIdleFrameCapture(void)
+{
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_IDLE_FRAME_LOG_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_IDLE_FRAME_LOG_REQ;
+ buffer[length++] = 0;
+ buffer[length++] = 0; /* 0 = disable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_IDLE_FRAME_LOG_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_IDLE_FRAME_LOG_REQ;
+ buffer[length++] = 1;
+ buffer[length++] = 0; /* 0 = disable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void enableIdleFrameCapture(void)
+{
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_IDLE_FRAME_LOG_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_IDLE_FRAME_LOG_REQ;
+ buffer[length++] = 0;
+ buffer[length++] = 1; /* 1 = enable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_IDLE_FRAME_LOG_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_IDLE_FRAME_LOG_REQ;
+ buffer[length++] = 1;
+ buffer[length++] = 1; /* 1 = enable */
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+typedef unsigned char uchar;
+
+void dspEcho(uchar size, uchar c0, uchar c1, uchar c2, uchar c3, uchar c4,
+ uchar c5, uchar c6, uchar c7, uchar c8 )
+{
+ unsigned short length=0;
+ unsigned char buffer[40];
+ unsigned char i;
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_ECHO_MSG_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_ECHO_MSG_REQ;
+ buffer[length++] = 0;
+ buffer[length++] = size; /* 1st byte in response = LSB of msgSize */
+ buffer[length++] = 0; /* 2nd byte in response = 2nd byte of msgSize */
+ buffer[length++] = 0; /* 3rd byte in response = 3rd byte of msgSize */
+ buffer[length++] = 0; /* 4th byte in response = 4th byte of msgSize */
+ buffer[length++] = c0; /* 5th byte in response = function */
+ buffer[length++] = c1; /* 6th byte in response = msgType high byte */
+ buffer[length++] = c2; /* 7th byte in response = msgType low byte */
+ buffer[length++] = c3; /* 8th byte in response = trx */
+ buffer[length++] = c4; /* 9th byte in response = start of payload */
+ buffer[length++] = c5;
+ buffer[length++] = c6;
+ buffer[length++] = c7;
+ buffer[length++] = c8;
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void sendDspDmaAdj(unsigned char trx, char offset)
+{
+ unsigned short length=0;
+ unsigned char buffer[40];
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_DL_DMA_ADJ>>8;
+ buffer[length++] = MPH_DSP_DIAG_DL_DMA_ADJ;
+ buffer[length++] = trx;
+ buffer[length++] = offset; /* */
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void chkDspQueue(unsigned char trx)
+{
+ unsigned short length=0;
+ unsigned char buffer[40];
+
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_CHK_QUEUE_REQ>>8;
+ buffer[length++] = MPH_DSP_DIAG_CHK_QUEUE_REQ;
+ buffer[length++] = trx;
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+void dummyBurstMode(unsigned char trx, unsigned char dummyBurstMode)
+{
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_SET_DUMMY_BURST_MODE>>8;
+ buffer[length++] = MPH_DSP_DIAG_SET_DUMMY_BURST_MODE;
+ buffer[length++] = trx;
+ buffer[length++] = dummyBurstMode;
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+
+void sendTBFAct(int trx, int timeSlot, int CS_SEL,
+ int usfCodeRateTestFlag, unsigned long usfTsMap)
+{
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+ buffer[length++] = DIAGNOSTIC_MSG; /* function type */
+ buffer[length++] = MPH_DSP_DIAG_TBF_ACT>>8;
+ buffer[length++] = MPH_DSP_DIAG_TBF_ACT;
+ buffer[length++] = trx;
+ buffer[length++] = timeSlot & 0x7;
+ buffer[length++] = CS_SEL & 3;
+ buffer[length++] = usfCodeRateTestFlag;
+ buffer[length++] = (unsigned char) (usfTsMap >> 24);
+ buffer[length++] = (unsigned char) (usfTsMap >> 16);
+ buffer[length++] = (unsigned char) (usfTsMap >> 8);
+ buffer[length++] = (unsigned char) usfTsMap;
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+
+void dspTestDlPdtch(int trx, int timeSlot, int CS_SEL)
+{
+ unsigned short length;
+ unsigned char buffer[40];
+
+ length = 0;
+
+ buffer[length++] = PDCH_MANAGE_MSG;
+ buffer[length++] = PH_PDTCH_REQ >> 8;
+ buffer[length++] = PH_PDTCH_REQ;
+ buffer[length++] = trx;
+ buffer[length++] = timeSlot & 7; /* channel */
+ buffer[length++] = 0;
+ buffer[length++] = 0; /* stub tag */
+ buffer[length++] = 0; /* stub for NB=0, AB=1 */
+ buffer[length++] = CS_SEL & 3; /* CS-1 code rate = 0 */
+ buffer[length++] = 0x0d; /* MAC header, if 0x00 then it's data, else control */
+ buffer[length++] = 0x01; /* tfi=0 */
+ buffer[length++] = 0x56;
+ buffer[length++] = 0x32;
+ buffer[length++] = 0x78;
+ buffer[length++] = 0x99;
+ api_SendMsgFromRmToL1(30, buffer);
+
+}
+
+
+unsigned char tx_buf[]={
+0x02, 0x00, 0x01, 0x00, 0x0c, 0x00, 0x00, 0x03, 0x10, 0x0d, 0x05, 0x18,
+0x01, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
+0x2b, 0x2b};
+
+extern int g_l1proxyFacchTest;
+
+void sendIdentityReq(unsigned char trx, unsigned char timeSlot, int numMsg, int delay)
+{
+ unsigned short i, length=0;
+ unsigned char buffer[40];
+
+ for(i=0 ; i<24; i++)
+ {
+ buffer[length++] = tx_buf[i];
+ }
+ buffer[3] = trx;
+ buffer[4] = timeSlot | 0x08;
+
+ g_l1proxyFacchTest = 1;
+
+ while(numMsg--)
+ {
+
+ api_SendMsgFromRmToL1(length, buffer);
+ taskDelay(delay);
+ }
+ taskDelay(delay);
+ g_l1proxyFacchTest = 0;
+}
+
+
+// extern unsigned int msg2DspDropped;
+
+void showMobileMessage(UINT8 trx)
+{
+ int i,j,k, timeSlot, subCh;
+
+// printf("Message sent to DSP dropped: %d \n\n", msg2DspDropped);
+ printf ("Uplink MS messages on trx(%d):\n", trx);
+
+ for(timeSlot=0; timeSlot<8; timeSlot++)
+ {
+ printf ("TimeSlot[%d]: SDCCH/SACCH:", timeSlot);
+ for(subCh=0; subCh<4; subCh++)
+ {
+ printf ("%d/", ulMsMsgLog[trx][timeSlot].sdcchRcvd[subCh]);
+ printf ("%d ", ulMsMsgLog[trx][timeSlot].sacchRcvd[subCh]);
+ }
+ printf ("RACH: %d ", ulMsMsgLog[trx][timeSlot].rachRcvd);
+ printf ("TCH: %d ", ulMsMsgLog[trx][timeSlot].tchRcvd);
+ printf ("FACCH: %d\n" , ulMsMsgLog[trx][timeSlot].facchRcvd);
+ }
+}
+
+void clearMobileMessage(UINT8 trx)
+{
+// msg2DspDropped = 0;
+// printf("Message sent to DSP dropped: %d \n\n", msg2DspDropped);
+
+ memset(& ulMsMsgLog[trx], 0, 8*sizeof(ulMsMsgStruc));
+ showMobileMessage(trx);
+}
+
+
+
+
+
+void showMobileMeas(UINT8 trx)
+{
+
+ int i,j,k, timeSlot, subCh;
+
+// printf("Message sent to DSP dropped: %d \n\n", msg2DspDropped);
+ printf ("Uplink MS Measurement on trx(%d):\n", trx);
+
+ for(timeSlot=0; timeSlot<8; timeSlot++)
+ {
+ if(trx == 0 && timeSlot == 0)
+ {
+ for(subCh=0; subCh<4; subCh++)
+ {
+ printf ("SDCCH SubCh[%d]\n", subCh);
+ if(ulMsMearsLog[trx][timeSlot].totalSdcchBits[subCh])
+ {
+ printf ("Error Bits: %10d ", ulMsMearsLog[trx][timeSlot].badSdcchBits[subCh]);
+ printf ("Total Bits: %10d ",ulMsMearsLog[trx][timeSlot].totalSdcchBits[subCh]);
+ if(ulMsMearsLog[trx][timeSlot].totalSdcchFrames[subCh])
+ printf ("BER: %6f\n ", 100*(float)ulMsMearsLog[trx][timeSlot].badSdcchBits[subCh]/
+ (float)ulMsMearsLog[trx][timeSlot].totalSdcchBits[subCh]);
+ }
+
+ if(ulMsMearsLog[trx][timeSlot].totalSdcchFrames[subCh])
+ {
+ printf ("Error Frames:%10d ",ulMsMearsLog[trx][timeSlot].badSdcchFrames[subCh]);
+ printf ("Total Frames:%10d ",ulMsMearsLog[trx][timeSlot].totalSdcchFrames[subCh]);
+
+ printf ("FER: %6f\n",100*(float)ulMsMearsLog[trx][timeSlot].badSdcchFrames[subCh]/
+ (float)ulMsMearsLog[trx][timeSlot].totalSdcchFrames[subCh]);
+ }
+ }
+ }
+ else
+ {
+ if( ulMsMearsLog[trx][timeSlot].pdchChannel)
+ {
+ printf ("PDCH TimeSlot[%d]\n", timeSlot);
+
+ if(ulMsMearsLog[trx][timeSlot].totalFrames)
+ {
+ printf ("Error RLC Blocks:%10d ",ulMsMearsLog[trx][timeSlot].badFrames);
+ printf ("Total RLC Blocks:%10d ",ulMsMearsLog[trx][timeSlot].totalFrames);
+
+ printf ("BLER: %6f\n", 100*(float)ulMsMearsLog[trx][timeSlot].badFrames/
+ (float)ulMsMearsLog[trx][timeSlot].totalFrames);
+ }
+ }
+ else
+ {
+ printf ("TCH TimeSlot[%d]\n", timeSlot);
+
+ if(ulMsMearsLog[trx][timeSlot].totalBits)
+ {
+ printf ("Error Bits: %10d ",ulMsMearsLog[trx][timeSlot].badBits);
+ printf ("Total Bits: %10d ",ulMsMearsLog[trx][timeSlot].totalBits);
+ if(ulMsMearsLog[trx][timeSlot].totalFrames)
+ printf ("BER: %6f\n ", 100*(float)ulMsMearsLog[trx][timeSlot].badBits/
+ (float)ulMsMearsLog[trx][timeSlot].totalBits);
+ }
+
+ if(ulMsMearsLog[trx][timeSlot].totalFrames)
+ {
+ printf ("Error Frames:%10d ",ulMsMearsLog[trx][timeSlot].badFrames);
+ printf ("Total Frames:%10d ",ulMsMearsLog[trx][timeSlot].totalFrames);
+
+ printf ("FER: %6f\n", 100*(float)ulMsMearsLog[trx][timeSlot].badFrames/
+ (float)ulMsMearsLog[trx][timeSlot].totalFrames);
+ }
+ }
+ }
+ }
+}
+
+void clearMobileMeas(UINT8 trx)
+{
+ memset(& ulMsMearsLog[trx], 0, 8*sizeof(ulMsMearsStruc));
+}
+
+
+/*****************************************************************************
+ *
+ * Module Name: TriggerDspMsg
+ *
+ * Purpose: Sends a message to the DSP so that the Request to Configure Msg
+ * is sent from the DSP.
+ *
+ *****************************************************************************/
+
+void sendTrxCalReq(UINT8 trx)
+{
+ unsigned short length=0;
+ unsigned char buffer[40];
+
+ buffer[length++] = TRX_MANAGE_MSG; /* function type */
+ buffer[length++] = REQ_CONFIG_RADIO_TX_PWR>>8;
+ buffer[length++] = REQ_CONFIG_RADIO_TX_PWR;
+ buffer[length++] = trx;
+
+ api_SendMsgFromRmToL1(length, buffer);
+}
+
+
+
diff --git a/data/mnet/GP10/Host/l1proxy/src/l1proxy.cpp b/data/mnet/GP10/Host/l1proxy/src/l1proxy.cpp
new file mode 100644
index 0000000..16889ac
--- /dev/null
+++ b/data/mnet/GP10/Host/l1proxy/src/l1proxy.cpp
@@ -0,0 +1,976 @@
+/******************************************************************
+
+ (c) Copyright Cisco 2000
+ All Rights Reserved
+
+******************************************************************/
+
+/*
+ * The code in this file implement a vxWorks layer 1 interface
+ * to a TI CX6 DSP over the DSP's HPI interface. The message
+ * structure over the interface is defined by JetCell. The basic
+ * buffer consists of four bytes giving the number of blocks "n"
+ * followed by "n" 64 byte blocks or messages. The first four
+ * bytes of each message or block represent "len", or the
+ * the length of the message block, minus an 8 byte header.
+ *
+ * Downstream messaging is initiated by calling the vxWorks API
+ * sendDsp(void *msg, int len). sendDsp, executing in the thread
+ * of the caller, will do a buffer copy to a vxWorks queue and exit
+ * A vxWorks task, taskDspDn, blocks on this queue, awakening to
+ * perform the actual blocking and transmission to to the DSP over
+ * HPI.
+ *
+ * Upstream messaging is initiated by the DSP issuing an interrupt
+ * to vxWorks. The interrupt is handled by the routine fooInt, which
+ * will "give" the semaphore semDspUp. A vxWorks task, taskDspUp,
+ * blocks on this semaphore. The HPI buffer is transferred and unblocked
+ * by this task. Notice that all buffer processing is done at task level.
+ * All vxWorks artifacts, queues, tasks, interrupt routines, semaphores,
+ * are intialialized by initL1. The DSP is initialized by initDSP. The
+ * go routine is used to enable interrupts and start the DSP in
+ * HPI boot mode.
+ */
+
+#include "vxWorks.h"
+#include "memLib.h"
+#include "string.h"
+#include "intLib.h"
+#include "logLib.h"
+#include "taskLib.h"
+#include "msgQLib.h"
+#include "vxLib.h"
+#include "errnoLib.h"
+#include "stdio.h"
+#include "cdcim.h"
+#include "iv.h"
+#include "l1proxy/l1proxy.h"
+#include "dsp/dsptypes.h"
+#include "dsp/dsphmsg.h"
+#include "MnetModuleId.h"
+#include "logging/vclogging.h"
+#include "cdcUtils/cdcUtils.h"
+#include "Os/JCTask.h"
+#include "Os/JCModule.h"
+#include "GP10OsTune.h"
+#include "grr/grr_intf.h"
+#include "Rlc_Mac/RlcMacIntf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+void hpi2dsp (unsigned int port, void *buffer, unsigned int addr, int nBytes);
+void dsp2hpi (unsigned int port, unsigned int addr, void *buffer, int nBytes);
+#include "l1proxy/l1proxyhpi.h"
+#ifdef __cplusplus
+}
+#endif
+
+//#define STAND_ALONE
+#undef STAND_ALONE
+
+/* layer-2 API for DSP-payload delivery */
+extern void CNI_LAPDM_Ph_Callback(
+ int length,
+ unsigned char *msg_unit
+ );
+
+/* layer-3 API for DSP-payload delivery */
+#ifndef STAND_ALONE
+extern void api_SendMsgFromL1ToRm(unsigned short, unsigned char*);
+#endif
+
+
+extern int g_l1proxyDiagPrint;
+extern DbgOutput l1proxyDbg;
+
+/* end: integration */
+
+
+SEM_ID semDspUp; /* upstream semaphore */
+unsigned char dspMsgUpRdy[NUM_DSPS];
+
+extern MSG_Q_ID msgDspDn[NUM_DSPS]; /* downstream message queue */
+
+int taskDspUpId; /* upstream task id */
+int taskDspDnId[NUM_DSPS]; /* downstream task id */
+JCTask taskDspUpObj("L1TaskUp");
+JCTask *taskDspDnObjs[NUM_DSPS];
+
+extern int l1pTrxSwapState; /* 1/0 - swap/don't swap trx-dsp mapping */
+
+static char singleModeSet = FALSE;
+static unsigned int singleModePort = 0;
+
+int g_l1proxyPrintAllDspMsg = 0;
+
+static const unsigned int hpiBase[NUM_DSPS] = {PORT0_BASE_ADDR, PORT1_BASE_ADDR};
+#define HPIC_OFFSET 0x0
+#define HPIA_OFFSET 0x8
+#define HPID_OFFSET 0xC
+#define HPIS_OFFSET 0x4
+
+/******************************************************************************/
+/* */
+/* SWAP4BYTE() - Swap the order of bytes in a long. */
+/* */
+/******************************************************************************/
+void swap4byte(unsigned long *addr)
+
+{
+ unsigned long *value = addr;
+ unsigned long temp1, temp2, temp3, temp4;
+
+ temp1 = (*value) & 0xFF;
+ temp2 = (*value >> 8) & 0xFF;
+ temp3 = (*value >> 16) & 0xFF;
+ temp4 = (*value >> 24) & 0xFF;
+
+ *value = (temp1 << 24) | (temp2 << 16) | (temp3 << 8) | temp4;
+}
+
+void swap4(void *addr, int n)
+
+{
+ int i;
+ unsigned long *p = (unsigned long *) addr;
+ for (i = 0; i < n/4; i++)
+ {
+ swap4byte(&p[i]);
+ }
+}
+
+/******************************************************************************/
+/* */
+/* SWAP2BYTE() - Swap the order of bytes in a short. */
+/* */
+/******************************************************************************/
+void swap2byte(unsigned short *addr)
+{
+ unsigned short *value = addr;
+ unsigned short temp1,temp2;
+
+ temp1 = temp2 = *value;
+ *value = ((temp2 & 0xFF) << 8) | ((temp1 >> 8) & 0xFF);
+}
+
+/*
+ * hpi2dspD is a layer 1 utility routine, transferring a 32-bit word
+ * from the vxWorks host to the DSP.
+ */
+
+void hpi2dspD
+ (
+ unsigned int port,
+ unsigned int addr,
+ unsigned int data
+ )
+ {
+ HPIA(port) = addr;
+ int lock;
+
+ lock = intLock();
+ *(unsigned int *)HPID(port) = data;
+ intUnlock(lock);
+ }
+
+/*
+ * dsp2hpiD is a layer 1 utility routine, transferring a 32-bit word
+ * from the DSP to the vxWorks host.
+ */
+
+unsigned int dsp2hpiD
+ (
+ unsigned int port,
+ unsigned int addr
+ )
+ {
+ unsigned int data;
+ HPIA(port) = addr;
+ int lock;
+
+ lock = intLock();
+ data = *(unsigned int *)HPID(port);
+ intUnlock(lock);
+
+ return data;
+ }
+
+/*
+ * hpi2dsp is a layer 1 utility routine, transferring nBytes bytes
+ * from the vxWorks host to the DSP.
+ */
+
+void hpi2dsp
+ (
+ unsigned int port,
+ void *buffer,
+ unsigned int addr,
+ int nBytes
+ )
+ {
+ unsigned int *bufferWord = (unsigned int *) buffer;
+ int n;
+ volatile unsigned int* hpisAddr = (unsigned int*)(hpiBase[port] + HPIS_OFFSET);
+ int lock;
+
+ lock = intLock();
+ *(volatile unsigned int*)(hpiBase[port] + HPIA_OFFSET) = addr;
+ for (n = 0; n < nBytes; n += 4)
+ {
+ *hpisAddr = *bufferWord++;
+ }
+ intUnlock(lock);
+ }
+
+/*
+ * hpi2dsp_swap is a layer 1 utility routine, transferring nBytes bytes
+ * from the vxWorks host to the DSP. It uses inline assembly to swap bytes.
+ */
+
+void hpi2dsp_swap
+ (
+ unsigned int port,
+ void *buffer,
+ unsigned int addr,
+ int nBytes
+ )
+ {
+ unsigned int *bufferWord = (unsigned int *) buffer;
+ int n;
+ volatile unsigned int* hpisAddr = (unsigned int*)(hpiBase[port] + HPIS_OFFSET);
+ int lock;
+
+ lock = intLock();
+ *(volatile unsigned int*)(hpiBase[port] + HPIA_OFFSET) = addr;
+ for (n = 0; n < nBytes; n += 4)
+ {
+ __asm__ ("stwbrx %0, %1, %2" : : "r" (*bufferWord++), "r" (0), "r" (hpisAddr));
+ }
+ intUnlock(lock);
+ }
+
+/*
+ * dsp2hpi is a layer 1 utility routine, transferring nBytes bytes
+ * from the DSP to the vxWorks host.
+ */
+
+void dsp2hpi
+ (
+ unsigned int port,
+ unsigned int addr,
+ void *buffer,
+ int nBytes
+ )
+ {
+ unsigned int *bufferWord = (unsigned int *) buffer;
+ int n;
+ volatile unsigned int* hpisAddr = (unsigned int *)(hpiBase[port] + HPIS_OFFSET);
+ int lock;
+
+ lock = intLock();
+ *(volatile unsigned int*)(hpiBase[port] + HPIA_OFFSET) = addr;
+ for (n = 0; n < nBytes; n += 4)
+ {
+ *bufferWord++ = *hpisAddr;
+ }
+ intUnlock(lock);
+ }
+
+/*
+ * dsp2hpi_swap is a layer 1 utility routine, transferring nBytes bytes
+ * from the DSP to the vxWorks host. It uses inline assembly to swap bytes.
+ */
+
+void dsp2hpi_swap
+ (
+ unsigned int port,
+ unsigned int addr,
+ void *buffer,
+ int nBytes
+ )
+ {
+ unsigned int *bufferWord = (unsigned int *) buffer;
+ int n;
+ volatile unsigned int* hpisAddr = (unsigned int *)(hpiBase[port] + HPIS_OFFSET);
+ int lock;
+
+ lock = intLock();
+ *(volatile unsigned int*)(hpiBase[port] + HPIA_OFFSET) = addr;
+ for (n = 0; n < nBytes; n += 4)
+ {
+ *bufferWord = *(unsigned int *)hpisAddr;
+ __asm__ ("stwbrx %0, %1, %2" : : "r" (*bufferWord), "r" (0), "r" (bufferWord));
+ bufferWord++;
+ }
+ intUnlock(lock);
+ }
+
+/*
+ * hpiInt handles the DSP interrupt. After acknowledging the interrupt,
+ * it gives the upstream semaphore.
+ */
+
+void hpiInt ( unsigned int port )
+{
+ STATUS status;
+
+ unsigned int hpic = HPIC(port);
+
+#ifdef STAND_ALONE
+ l1proxyDbg.Trace("got interrupt port %d->%08x %08x!\n", port, hpic, hpic & 0x00040004);
+#endif
+ if ((hpic & 0x00040004) == 0) return;
+ HPIC(port) = 0x00040004;
+#ifdef STAND_ALONE
+ l1proxyDbg.Trace("reset interrupt port %d->%08x!\n", port, HPIC(port));
+#endif
+ dspMsgUpRdy[port] = 1;
+ if ((status = semGive(semDspUp)) != OK)
+ {
+ l1proxyDbg.Error("semGive returns ERROR.%d\n", errno);
+ }
+ return;
+ }
+
+/*
+ * dspDump prints a buffer.
+ */
+
+void dspDump(char *p, int len, l1ProxyLogType logType)
+{
+ char buf[DSPBUFFERMAX];
+ int n;
+ int curPtr = 0;
+ for (n = 0; n < len; n++)
+ {
+ if (n==0)
+ {
+ curPtr += sprintf(buf+curPtr, "%08x: ", (unsigned int) &p[n]);
+ }
+ else if (!(n % 16))
+ {
+ curPtr += sprintf(buf+curPtr, "\n%08x: ", (unsigned int) &p[n]);
+ }
+ curPtr += sprintf (buf+curPtr, "%02x ", p[n] & 0xff);
+ }
+ sprintf(buf+curPtr, "\n");
+
+ switch (logType)
+ {
+ case L1PROXY_LOG_ERROR :
+ l1proxyDbg.Error(buf);
+ break;
+ case L1PROXY_LOG_WARNING :
+ l1proxyDbg.Warning(buf);
+ break;
+ case L1PROXY_LOG_TRACE :
+ l1proxyDbg.Trace(buf);
+ break;
+ }
+}
+
+
+
+void l1ProxyMemDump(char *p, int len)
+{
+ char buf[DSPBUFFERMAX];
+ int n;
+ int curPtr = 0;
+
+ curPtr += sprintf(buf+curPtr, "\n%08x: \n", (unsigned int) &p[n]);
+ len += len%4;
+
+ for (n = 0; n <len/4; n++)
+ {
+ if(!(n%4))
+ {
+ curPtr += sprintf(buf+curPtr, "\n");
+ }
+ curPtr += sprintf(buf+curPtr, "%02x %02x %02x %02x ",
+ p[4*n+3], p[4*n+2], p[4*n+1], p[4*n]);
+ }
+ curPtr += sprintf(buf+curPtr, "\n");
+ l1proxyDbg.Trace(buf);
+}
+
+/*
+ * taskDspDn is the downstream handler task. It blocks on a downstream
+ * message queue. Upon awakening, it will do a buffer copy from the
+ * message queue to a temporary buffer. Messages will be concatenated
+ * int the temporary buffer until the DSP is ready to accept the buffer,
+ * when the buffer will be transferred to the DSP over HPI.
+ */
+
+void taskDspDn ( unsigned int port )
+{
+ STATUS status;
+ char dspBuffer[DSPBUFFERMAX];
+ int i, nbuff, dspNum;
+ int numMsgs;
+ msgStruc* pMsg;
+ UINT waitCnt;
+
+ taskDspDnObjs[port]->JCTaskEnterLoop(); /* entering loop, klim 3-2-00 */
+ for (;;)
+ {
+ /* get messages from the queue */
+ numMsgs = 0;
+ pMsg = (msgStruc*)dspBuffer;
+ do
+ {
+ status = msgQReceive(msgDspDn[port], (char*)pMsg, DSPMSGLENMAX, WAIT_FOREVER);
+
+ if (status == ERROR)
+ {
+ l1proxyDbg.Error("\nL1proxy -> msgQReceive returns ERROR\n");
+ }
+ /*
+ * DSP expects TRX number equal "0"
+ */
+ pMsg->trx = 0;
+
+ numMsgs++; /* increament no. of messages */
+ pMsg++; /* point to next message in the buffer */
+
+ } while (msgQNumMsgs(msgDspDn[port]) && (numMsgs < DSPMSGMAX));
+
+/* // for information only
+ {
+ int i=msgQNumMsgs(msgDspDn[port]);
+ if(i>0) logMsg("L1PROXY-DN: INFO remaining messages in the msg queue = %d\n",i,0,0,0,0,0);
+ }
+*/
+ dspNum = port ^ (l1pTrxSwapState & 1);
+ if (singleModeSet)
+ {
+ if (port != 0)
+ continue;
+ else
+ dspNum = singleModePort;
+ }
+
+ /* Send messages to dsp */
+
+ /* wait till dsp is ready */
+ waitCnt = DSP_TIMEOUT; /* 2 ms. time out */
+ do
+ { /* wait till dsp is ready or time out */
+ dsp2hpi(dspNum, DSPDNBUFFER, &nbuff, 0x4); /* check no. of unread msgs */
+ waitCnt--;
+ }
+ while ((nbuff != 0) && (waitCnt != 0));
+
+ /* if dsp is still not ready poll dsp at lower rate */
+ if (nbuff != 0)
+ { /* dsp is not ready */
+ l1proxyDbg.Warning("L1proxy -> DSP %d not ready for messages\n", dspNum);
+ while (nbuff != 0)
+ { /* wait till dsp is ready */
+ dsp2hpi(dspNum, DSPDNBUFFER, &nbuff, 0x4);
+ taskDelay(2); /* let lower prioroty task run */
+ }
+ l1proxyDbg.Warning("L1proxy -> DSP %d became ready for messages\n", dspNum);
+ }
+
+ /* write the messages */
+
+ hpi2dsp_swap(dspNum, dspBuffer, DSPDNBUFFER+4, numMsgs * DSPMSGLENMAX);
+ /* write the number of messages */
+ hpi2dsp(dspNum, &numMsgs, DSPDNBUFFER, 4);
+
+#ifdef STAND_ALONE
+ l1proxyDbg.Trace("Send to Dsp %d:\n",dspNum);
+ dspDump(dspBuffer,16, L1PROXY_LOG_TRACE);
+#endif
+
+ if (g_l1proxyDiagPrint &&
+ (
+ ((((msgStruc*)dspBuffer)->typeHiByte << 8) |
+ ((msgStruc*)dspBuffer)->typeLoByte
+ ) != DONW_LINK_TCH
+ )
+ )
+ {
+ l1proxyDbg.Trace("Send to Dsp %d (%d Messages):\n", dspNum, numMsgs);
+ for(i=0; i<numMsgs; i++)
+ dspDump(&dspBuffer[DSPMSGLENMAX*i], dspBuffer[DSPMSGLENMAX*i]+4,
+ L1PROXY_LOG_TRACE);
+ }
+
+ /*
+ l1proxyDbg.Trace("sending %d messages\n", n);
+ */
+
+ } /* for (;;) */
+ taskDspDnObjs[port]->JCTaskNormExit();
+}
+
+
+/*
+ * taskDspUp is the upstream handler task. It blocks on a semaphore
+ * Upon awakening, it will do a buffer copy from the HPI buffer to a
+ * temporary buffer, unblocking messages.
+ */
+
+void taskDspUp ( void )
+{
+ STATUS status;
+ unsigned char buffer[DSPMSGLENMAX];
+ msgStruc* pMsg; /* received message */
+ UINT msgDisc; /* messsage discriminator */
+ unsigned int offset; /* offset into DSPUPBUFFER */
+ UINT n, nbuff, len;
+ int i;
+#ifndef STAND_ALONE
+ int sendMsMsgToL2L3;
+#endif
+ unsigned int port;
+
+ taskDspUpObj.JCTaskEnterLoop(); /* entering loop, klim 3-2-00 */
+ for (;;)
+ {
+ if ((status = semTake(semDspUp, WAIT_FOREVER)) != OK)
+ {
+ l1proxyDbg.Error("\nL1proxy -> semTake on semDspUp returns ERROR\n");
+ }
+
+ for (port = 0; port < 2; port++)
+ {
+ if (dspMsgUpRdy[port] == 0)
+ continue;
+ dspMsgUpRdy[port] = 0;
+
+ if (!singleModeSet || (port == singleModePort))
+ {
+
+ /* read number of messages available */
+ dsp2hpi(port, DSPUPBUFFER, &nbuff, 0x4);
+ if (nbuff > DSPMSGMAX)
+ {
+ l1proxyDbg.Warning("\nL1proxy -> illegal Number of Messages from DSP: %d\n",nbuff);
+ nbuff = 8;
+ }
+
+ /* read all messages */
+ for (n = 0, offset = DSPUPBUFFER+4; n < nbuff; n++, offset+=DSPMSGLENMAX)
+ {
+ /* read the messege size */
+ dsp2hpi_swap(port, offset, buffer, DSPHEADERLEN);
+ len = buffer[DSPLENOFFSET];
+ if (len > (DSPMSGLENMAX - DSPHEADERLEN))
+ {
+ l1proxyDbg.Warning("\n\nL1proxy -> illegal Size of Message from DSP: %d\n" ,len);
+ len = DSPMSGLENMAX - DSPHEADERLEN;
+ }
+
+ if(!g_l1proxyDiagPrint)
+ {
+ /* read a message into the buffer according actual message length*/
+ dsp2hpi_swap(port, offset+DSPHEADERLEN, buffer+DSPHEADERLEN, len);
+ }
+ else
+ {
+ /* read a message into the buffer includes GSM frame number at the end of the DSP message */
+ dsp2hpi_swap(port, offset+DSPHEADERLEN, buffer+DSPHEADERLEN, DSPMSGLENMAX - DSPHEADERLEN);
+ }
+
+ if(g_l1proxyPrintAllDspMsg)
+ {
+ l1proxyDbg.Trace("From Dsp %d (%d Messages):\n", port, nbuff);
+ for(i=0; i<nbuff; i++)
+ dspDump((char *)&buffer[DSPMSGLENMAX*i], buffer[DSPMSGLENMAX*i]+4,L1PROXY_LOG_TRACE);
+ }
+
+#ifdef STAND_ALONE
+ l1proxyDbg.Trace("Rececived from Dsp %d:\n",port);
+ dspDump((char *)buffer, 8, L1PROXY_LOG_TRACE);
+#endif
+ pMsg = (msgStruc*) buffer; /* received message */
+
+ /* build trx field of the message */
+ pMsg->trx &= 0x0F;
+ if (!singleModeSet)
+ pMsg->trx |= (port ^ (l1pTrxSwapState & 1));
+
+#ifdef STAND_ALONE
+ l1proxyDbg.Trace("Mesasge for Upper Layers:\n");
+ dspDump((char *)buffer, 8, L1PROXY_LOG_TRACE);
+#endif
+ /*
+ * check if message is need to send to up layer
+ */
+#ifndef STAND_ALONE
+ sendMsMsgToL2L3 = ulMobileMessagePreProc(buffer);
+#endif
+
+#ifndef STAND_ALONE
+
+ /*
+ * logging received MS messages
+ */
+ if (sendMsMsgToL2L3)
+ {
+ /* call the appropriate API to send the message */
+ msgDisc = pMsg->function;
+ if (msgDisc == RR_MANAGE_MSG)
+ {
+
+ CNI_LAPDM_Ph_Callback(len + DSPHEADERLEN, buffer);
+
+ }
+ else if ((msgDisc == CCCH_MANAGE_MSG) || (msgDisc == DCCH_MANAGE_MSG))
+ {
+
+ // api_SendMsgFromL1ToRm(*(unsigned short *)buffer, (unsigned char *)&buffer[4]);
+
+ api_SendMsgFromL1ToRm(len, (unsigned char *)&buffer[DSPHEADERLEN]);
+
+ if (g_l1proxyDiagPrint)
+ {
+ l1proxyDbg.Trace("From DSP To RRM");
+ dspDump((char *)&buffer[0], buffer[0]+4, L1PROXY_LOG_TRACE);
+ }
+
+ }
+ else if (msgDisc == TRX_MANAGE_MSG)
+ {
+
+ grr_SendMsgFromL1ToGrr(len, &buffer[DSPHEADERLEN]);
+ if (g_l1proxyDiagPrint)
+ {
+ l1proxyDbg.Trace("From DSP To RRM");
+ dspDump((char *)&buffer[0], buffer[0]+4, L1PROXY_LOG_TRACE);
+ }
+
+ }
+ else if (msgDisc == PDCH_MANAGE_MSG)
+ {
+
+ RlcMacL1MsgInd(&buffer[DSPHEADERLEN], len);
+ if (g_l1proxyDiagPrint)
+ {
+ l1proxyDbg.Trace("From DSP To RLC/MAC");
+ dspDump((char *)&buffer[0], buffer[0]+4, L1PROXY_LOG_TRACE);
+ }
+
+ }
+ } /* if (sendMsMsgToL2L3) */
+#endif
+ } /* for (n = 0, offset */
+ } /* if (!singleModeSet */
+ /* clear 'Number of Messages' field to inform dsp messages are read */
+ nbuff = 0;
+ hpi2dsp(port, &nbuff, DSPUPBUFFER, 4);
+ } /* for (port */
+
+ } /* for (;;) */
+ taskDspUpObj.JCTaskNormExit();
+}
+
+
+/*
+ * initDsp intializes the DSP hardware
+ */
+
+void initDsp
+ (
+ unsigned int port
+ )
+ {
+/*
+ unsigned int resetBit = (port == 0) ? 0x00000800 : 0x00000400;
+ AUX_PORT = ~resetBit;
+ taskDelay(1);
+ AUX_PORT = 0xffffffff;
+*/
+ HPIC(port) = 0x00000000;
+ hpi2dspD(port, 0x1800000, 0x00003020);
+ hpi2dspD(port, 0x1800008, 0x00000040);
+ hpi2dspD(port, 0x1800004, 0x20E30322);
+ hpi2dspD(port, 0x1800010, 0x00000040);
+ hpi2dspD(port, 0x1800014, 0x00000040);
+ hpi2dspD(port, 0x1800018, 0x07116000);
+ hpi2dspD(port, 0x180001c, 0x00000410);
+ }
+
+/*
+ * initL1 intializes the layer 1 interrupt routine, semaphores,
+ * tasks and message queues.
+ */
+
+void initL1
+ (
+ void
+ )
+{
+ unsigned int i;
+
+ semDspUp = semBCreate(SEM_Q_FIFO, SEM_EMPTY);
+ if (semDspUp == NULL)
+ {
+ logMsg("ERROR cannot create semDspUp\n",0,0,0,0,0,0);
+ }
+
+ dspLoadSem = semBCreate (SEM_Q_FIFO, SEM_EMPTY);
+ if (dspLoadSem == NULL)
+ {
+ logMsg("ERROR cannot create dspLoadSem\n",0,0,0,0,0,0);
+ }
+
+ for (i = 0; i < NUM_DSPS; i++)
+ {
+ msgDspDn[i] = msgQCreate(DN_Q_SIZE, DSPMSGLENMAX, MSG_Q_FIFO);
+ if (msgDspDn == NULL)
+ {
+ logMsg("ERROR cannot create msgDspDn No. %d\n",i,0,0,0,0,0);
+ }
+ }
+#ifdef STAND_ALONE
+ taskDspUpId = taskSpawn(UPNAME, TASKUPPRIORITY, 0, TASKUPSTK,
+ (FUNCPTR) taskDspUp,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+#else
+ taskDspUpId = taskDspUpObj.JCTaskSpawn(
+ L1UP_TASK_PRIORITY, L1UP_TASK_OPTION, L1UP_TASK_STACK_SIZE,
+ (FUNCPTR) taskDspUp,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ MODULE_L1,JC_CRITICAL_TASK);
+#endif
+ if (taskDspUpId == ERROR)
+ {
+ logMsg("ERROR cannot create taskDspUp\n",0,0,0,0,0,0);
+ }
+ for (i = 0; i < NUM_DSPS; i++)
+ {
+#ifdef STAND_ALONE
+ taskDspDnId[i] = taskSpawn(DNNAME, TASKDNPRIORITY, 0, TASKDNSTK,
+ (FUNCPTR) taskDspDn,
+ i, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+#else
+ char taskName[30];
+ sprintf(taskName, "L1TaskDn%d", i);
+ taskDspDnObjs[i] = new JCTask(taskName);
+ taskDspDnId[i] = taskDspDnObjs[i]->JCTaskSpawn(
+ L1DN_TASK_PRIORITY, L1DN_TASK_OPTION, L1DN_TASK_STACK_SIZE,
+ (FUNCPTR) taskDspDn,
+ i, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ MODULE_L1,JC_CRITICAL_TASK);
+#endif
+ if (taskDspDnId[i] == ERROR)
+ {
+ logMsg("ERROR cannot create taskDspDn No. %d\n",i,0,0,0,0,0);
+ }
+ }
+
+ /*
+ * Setup a DbgOutput object for logging.
+ */
+ l1proxyDbg.Func("l1proxy Logging",L1PROXY_LAYER);
+}
+
+/*
+ * go enables DSP interrupts and releases the DSP from the HPI boot
+ * reset state.
+ */
+
+void go
+ (
+ unsigned int port
+ )
+ {
+ int nbuff = 0;
+ hpi2dsp(port, &nbuff, DSPUPBUFFER, 4);
+ HPIC(port) |= 0x00020002;
+ }
+
+void initInt(void)
+ {
+ intConnect((VOIDFUNCPTR*)IV_IRQ1, (VOIDFUNCPTR)hpiInt, 0);
+ intConnect((VOIDFUNCPTR*)IV_IRQ2, (VOIDFUNCPTR)hpiInt, 1);
+ intEnable(IVEC_TO_INUM(IV_IRQ1));
+ intEnable(IVEC_TO_INUM(IV_IRQ2));
+ }
+
+void xdump(unsigned int host, unsigned int p, unsigned int count)
+{
+ unsigned int n, m, addr;
+ char buf[DSPBUFFERMAX];
+ int curPtr = 0;
+
+ for(n = 0; n < count; n++)
+ {
+ addr = p + 4 * n;
+ m = dsp2hpiD(host, addr);
+ curPtr += sprintf(buf+curPtr, "%08x->%08x\n", addr, m);
+ }
+ l1proxyDbg.Trace(buf);
+}
+
+void zdump(unsigned int host, unsigned int p, unsigned int count)
+{
+ unsigned int n, addr, *data;
+ char buf[DSPBUFFERMAX];
+ int curPtr = 0;
+
+ data = (unsigned int*)malloc(4*count);
+ dsp2hpi(host, p, data, 4*count);
+ for(n = 0; n < count; n++)
+ {
+ addr = p + 4 * n;
+ curPtr += sprintf(buf+curPtr, "%08x->%08x\n", addr, data[n]);
+ }
+ l1proxyDbg.Trace(buf);
+ free(data);
+}
+
+void xtest(unsigned int host, unsigned int p, unsigned int count)
+{
+ unsigned int n, m, addr;
+ char buf[DSPBUFFERMAX];
+ int curPtr = 0;
+
+ for(n = 0; n < count; n++)
+ {
+ addr = p + 4 * n;
+ hpi2dspD(host, addr, addr);
+ }
+ for(n = 0; n < count; n++)
+ {
+ addr = p + 4 * n;
+ m = dsp2hpiD(host, addr);
+ if (m != addr)
+ {
+ curPtr += sprintf(buf+curPtr, "%08x->%08x\n", addr, m);
+ }
+ }
+ l1proxyDbg.Trace(buf);
+}
+
+void ytest(unsigned int host, unsigned int p, unsigned int count)
+{
+ unsigned int n, *q, addr;
+ char buf[DSPBUFFERMAX];
+ int curPtr = 0;
+
+ q = (unsigned int*)malloc(4 * count);
+ for(n = 0; n < count; n++)
+ {
+ q[n] = p + 4 * n;
+ }
+ hpi2dsp(host, q, p, 4 * count);
+ dsp2hpi(host, p, q, 4 * count);
+ for(n = 0; n < count; n++)
+ {
+ addr = p + 4 * n;
+ if (q[n] != addr)
+ {
+ curPtr += sprintf(buf+curPtr, "%08x->%08x\n", addr, q[n]);
+ }
+ }
+ l1proxyDbg.Trace(buf);
+}
+
+
+/***********************************************************/
+/* The new root task spawns l1 up/down tasks. */
+/* In that case, we want to maintain to do some pre- */
+/* procedures and post-procedures */
+/* These functions replace L1Init procedures yet called */
+/* only when using new script that brings up the root task */
+/* 4-14-99 KLim */
+/***********************************************************/
+void L1_PreInit(void)
+{
+ unsigned int port;
+
+ dspLoadSem = semBCreate (SEM_Q_FIFO, SEM_EMPTY);
+ if (dspLoadSem == NULL)
+ {
+ logMsg("ERROR cannot create dspLoadSem\n",0,0,0,0,0,0);
+ }
+
+ semDspUp = semBCreate(SEM_Q_FIFO, SEM_EMPTY);
+ if (semDspUp == NULL)
+ {
+ logMsg("ERROR cannot create semDspUp\n",0,0,0,0,0,0);
+ }
+
+ for (port = 0; port < NUM_DSPS; port++)
+ {
+ msgDspDn[port] = msgQCreate(DN_Q_SIZE, DSPMSGLENMAX, MSG_Q_FIFO);
+ if (msgDspDn == NULL)
+ {
+ logMsg("ERROR cannot create msgDspDn No. %d\n",port,0,0,0,0,0);
+ }
+ }
+}
+
+void L1_PostInit(void)
+{
+
+}
+
+
+/*******************************************************************************
+l1pSingleModeStart
+
+Starts running l1proxy in single dsp mode.
+The parameter specifies which dsp to communicate with.
+
+*/
+int l1pSingleModeStart
+(
+ unsigned char port
+)
+{
+ if (port < NUM_DSPS)
+ {
+ singleModeSet = TRUE;
+ singleModePort = port;
+ return OK;
+ }
+ return ERROR;
+}
+
+
+/*******************************************************************************
+l1pSingleModeStop
+
+Stops l1proxy from running in single dsp mode.
+*/
+
+void l1pSingleModeStop()
+{
+ singleModeSet = FALSE;
+}
+
+
+
+/*******************************************************************************
+SysCommand_L1Proxy
+*/
+
+int SysCommand_L1Proxy (T_SYS_CMD action)
+{
+ switch(action)
+ {
+ case SYS_SHUTDOWN:
+ l1proxyDbg.Trace("[L1Proxy] shutdown notification received\n");
+ break;
+
+ case SYS_START:
+ initL1();
+ break;
+
+ default:
+ l1proxyDbg.Trace("[L1Proxy] Unknown system command received\n");
+
+ }
+ return 0;
+}
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/l1proxy/test/env.bat b/data/mnet/GP10/Host/l1proxy/test/env.bat
new file mode 100644
index 0000000..197351c
--- /dev/null
+++ b/data/mnet/GP10/Host/l1proxy/test/env.bat
@@ -0,0 +1,4 @@
+set WIND_BASE=c:\Tornado86
+set WIND_HOST_TYPE=x86-win32
+set PATH=%WIND_BASE%\host\x86-win32\bin;%PATH%
+set GCC_EXEC_PREFIX=%WIND_BASE%\host\x86-win32\lib\gcc\lib\
diff --git a/data/mnet/GP10/Host/l1proxy/test/ld b/data/mnet/GP10/Host/l1proxy/test/ld
new file mode 100644
index 0000000..e9e0314
--- /dev/null
+++ b/data/mnet/GP10/Host/l1proxy/test/ld
@@ -0,0 +1,6 @@
+ld < test.o
+ld < hpitest2.o
+ld < msg1.o
+initL1
+initDsp
+hpi2dsp(&cx6,0,0x3800)
diff --git a/data/mnet/GP10/Host/l1proxy/test/loop b/data/mnet/GP10/Host/l1proxy/test/loop
new file mode 100644
index 0000000..7b2184e
--- /dev/null
+++ b/data/mnet/GP10/Host/l1proxy/test/loop
@@ -0,0 +1,8 @@
+ld < test.o
+ld < hpitest2.o
+ld < msg1.o
+initL1
+initDsp
+hpi2dsp(&cx6,0,0x3800)
+go
+period 1,sendDsp,&msg1,20
diff --git a/data/mnet/GP10/Host/l1proxy/test/msg0.c b/data/mnet/GP10/Host/l1proxy/test/msg0.c
new file mode 100644
index 0000000..34e0990
--- /dev/null
+++ b/data/mnet/GP10/Host/l1proxy/test/msg0.c
@@ -0,0 +1,18 @@
+char msg0[] = {
+0x34,
+0x12,
+0x00,
+0x00,
+0x20,
+0x00,
+0x00,
+0x00,
+0x20,
+0x00,
+0x02,
+0x00,
+0x00,
+0x02,
+0x00,
+0x00,
+};
diff --git a/data/mnet/GP10/Host/l1proxy/test/msg1.c b/data/mnet/GP10/Host/l1proxy/test/msg1.c
new file mode 100644
index 0000000..16f361f
--- /dev/null
+++ b/data/mnet/GP10/Host/l1proxy/test/msg1.c
@@ -0,0 +1,22 @@
+char msg1[] = {
+0x10,
+0x00,
+0x00,
+0x00,
+0x00,
+0x01,
+0x02,
+0x03,
+0x04,
+0x05,
+0x06,
+0x07,
+0x08,
+0x09,
+0x0a,
+0x0b,
+0x0c,
+0x0d,
+0x0e,
+0x0f,
+};
diff --git a/data/mnet/GP10/Host/l1proxy/test/start b/data/mnet/GP10/Host/l1proxy/test/start
new file mode 100644
index 0000000..0e9795d
--- /dev/null
+++ b/data/mnet/GP10/Host/l1proxy/test/start
@@ -0,0 +1,4 @@
+ld < test.o
+ld < msg1.o
+initL1
+newInitDsp
diff --git a/data/mnet/GP10/Host/logging/Makefile b/data/mnet/GP10/Host/logging/Makefile
new file mode 100644
index 0000000..22705b3
--- /dev/null
+++ b/data/mnet/GP10/Host/logging/Makefile
@@ -0,0 +1,16 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ $(CP) bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/logging/doc/logging.doc b/data/mnet/GP10/Host/logging/doc/logging.doc
new file mode 100644
index 0000000..415d4a8
--- /dev/null
+++ b/data/mnet/GP10/Host/logging/doc/logging.doc
Binary files differ
diff --git a/data/mnet/GP10/Host/logging/src/Makefile b/data/mnet/GP10/Host/logging/src/Makefile
new file mode 100644
index 0000000..72c0bc7
--- /dev/null
+++ b/data/mnet/GP10/Host/logging/src/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = logging
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\$(THIS_APP_DIR).out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR = logging
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) .\bin\*.o
+ $(RM) .\bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/logging/src/logtask.cpp b/data/mnet/GP10/Host/logging/src/logtask.cpp
new file mode 100644
index 0000000..b1bfcc1
--- /dev/null
+++ b/data/mnet/GP10/Host/logging/src/logtask.cpp
@@ -0,0 +1,104 @@
+/****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : logtask.cpp *
+ * *
+ * Description : Logging task *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |11/11/00 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+
+
+#include <stdio.h>
+#include <string.h>
+#include <hostlib.h>
+
+/* common for all */
+#include "Os/JCModule.h"
+#include "Os/JCTask.h"
+#include "Os/JCMsgQueue.h"
+
+/* common for GS */
+#include "GP10OsTune.h"
+#include "MnetModuleId.h"
+
+#include "logging/vclogging.h"
+
+
+
+/*
+ * instance of sm task
+ */
+JCTask gLogTask("Logging");
+
+
+int
+SysCommand_Log(T_SYS_CMD action)
+{
+ int tid;
+ JC_STATUS stat;
+
+ switch(action){
+ case SYS_SHUTDOWN:
+ printf("[LogTask] Received system shutdown notification\n");
+ break;
+ case SYS_START:
+ printf("[LogTask] Received task start notification\n");
+ init_log_task();
+ stat = gLogTask.JCTaskSpawn(LOG_TASK_PRIORITY,
+ LOG_TASK_OPTION,
+ LOG_TASK_STACK_SIZE,
+ (FUNCPTR)viper_log,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ MODULE_LOG,
+ JC_NON_CRITICAL_TASK);
+ if(stat == JC_ERROR){
+ printf("[LogTask] JCTaskSpawn returned error.\n");
+ }
+ else{
+ printf("[LogTask] task spawned (tid=0x%x) \n", gLogTask.GetTaskId());
+ ViperLogSetModuleFilters(1000,0);
+ }
+ break;
+ case SYS_REBOOT:
+ printf("[LogTask] Reboot ready.\n");
+ break;
+
+ default:
+ printf("[LogTask] Unknown system command received\n");
+ }
+ return 0;
+}
+
+
+/*
+ * GetViperCellIpAddress
+ * NOTE: This is left over from the old logger in GP10. This should not be
+ * here!!!!!!
+ */
+char *GetViperCellIpAddress()
+{
+ static char DirtyBuffer[MAX_BUFF_LENGTH],InterfaceName[MAX_BUFF_LENGTH];
+ int Status;
+
+ memset(DirtyBuffer,0,MAX_BUFF_LENGTH);
+ memset(InterfaceName,0,MAX_BUFF_LENGTH);
+
+ strcpy(InterfaceName,VIPERCELL_ETHERNET_INTERFACE);
+ Status = ifAddrGet(InterfaceName,DirtyBuffer);
+ if (Status == ERROR)
+ {
+ printf("Error retrieving interface %s's IP address!\n",InterfaceName);
+ return "";
+ }
+ return(DirtyBuffer);
+
+}
diff --git a/data/mnet/GP10/Host/mib.dat b/data/mnet/GP10/Host/mib.dat
new file mode 100644
index 0000000..3317764
--- /dev/null
+++ b/data/mnet/GP10/Host/mib.dat
Binary files differ
diff --git a/data/mnet/GP10/Host/mib.txt b/data/mnet/GP10/Host/mib.txt
new file mode 100644
index 0000000..65e31e7
--- /dev/null
+++ b/data/mnet/GP10/Host/mib.txt
@@ -0,0 +1,941 @@
+MIB_bts_ncc.0="0"
+MIB_bts_cid.0="0"
+MIB_btsID.0="1"
+MIBT_cellAllocation.0="0"
+MIBT_cellAllocation.1="1"
+MIBT_cellAllocation.2="0"
+MIBT_cellAllocation.3="0"
+MIBT_cellAllocation.4="0"
+MIBT_cellAllocation.5="0"
+MIBT_cellAllocation.6="0"
+MIBT_cellAllocation.7="0"
+MIBT_cellAllocation.8="0"
+MIBT_cellAllocation.9="0"
+MIBT_cellAllocation.10="0"
+MIBT_cellAllocation.11="0"
+MIBT_cellAllocation.12="0"
+MIBT_cellAllocation.13="0"
+MIBT_cellAllocation.14="0"
+MIBT_cellAllocation.15="0"
+MIBT_cellAllocation.16="0"
+MIBT_cellAllocation.17="0"
+MIBT_cellAllocation.18="0"
+MIBT_cellAllocation.19="0"
+MIBT_cellAllocation.20="0"
+MIBT_cellAllocation.21="0"
+MIBT_cellAllocation.22="0"
+MIBT_cellAllocation.23="0"
+MIBT_cellAllocation.24="0"
+MIBT_cellAllocation.25="0"
+MIBT_cellAllocation.26="0"
+MIBT_cellAllocation.27="0"
+MIBT_cellAllocation.28="0"
+MIBT_cellAllocation.29="0"
+MIBT_cellAllocation.30="0"
+MIBT_cellAllocation.31="0"
+MIB_gsmdcsIndicator.0="1"
+MIB_bts_mcc.0="1"
+MIB_bts_mnc.0="1"
+MIB_bts_lac.0="1"
+MIB_bts_ci.0="1"
+MIB_cellReselectHysteresis.0="7"
+MIB_ny1.0="3"
+MIBT_plmnPermitted.0="1"
+MIBT_plmnPermitted.1="1"
+MIBT_plmnPermitted.2="1"
+MIBT_plmnPermitted.3="1"
+MIBT_plmnPermitted.4="1"
+MIBT_plmnPermitted.5="1"
+MIBT_plmnPermitted.6="1"
+MIBT_plmnPermitted.7="1"
+MIBT_plmnPermitted.8="0"
+MIBT_plmnPermitted.9="0"
+MIBT_plmnPermitted.10="0"
+MIBT_plmnPermitted.11="0"
+MIBT_plmnPermitted.12="0"
+MIBT_plmnPermitted.13="0"
+MIBT_plmnPermitted.14="0"
+MIBT_plmnPermitted.15="0"
+MIB_radioLinkTimeout.0="15"
+MIB_relatedTranscoder.0="0"
+MIB_rxLevAccessMin.0="10"
+MIB_bts_administrativeState.0="0"
+MIB_bts_alarmStatus.0="0"
+MIB_bts_operationalState.0="0"
+MIB_maxNumberRetransmissions.0="4"
+MIB_mSTxPwrMaxCCH.0="0"
+MIB_numberOfSlotsSpreadTrans.0="12"
+MIB_noOfBlocksForAccessGrant.0="0"
+MIB_noOfMultiframesBetweenPaging.0="9"
+MIB_allowIMSIAttachDetach.0="1"
+MIB_callReestablishmentAllowed.0="1"
+MIB_cellBarred.0="0"
+MIB_dtxDownlink.0="0"
+MIB_dtxUplink.0="2"
+MIB_emergencyCallRestricted.0="0"
+MIBT_notAllowedAccessClass.0="0"
+MIBT_notAllowedAccessClass.1="0"
+MIBT_notAllowedAccessClass.2="0"
+MIBT_notAllowedAccessClass.3="0"
+MIBT_notAllowedAccessClass.4="0"
+MIBT_notAllowedAccessClass.5="0"
+MIBT_notAllowedAccessClass.6="0"
+MIBT_notAllowedAccessClass.7="0"
+MIBT_notAllowedAccessClass.8="0"
+MIBT_notAllowedAccessClass.9="0"
+MIBT_notAllowedAccessClass.10="0"
+MIBT_notAllowedAccessClass.11="0"
+MIBT_notAllowedAccessClass.12="0"
+MIBT_notAllowedAccessClass.13="0"
+MIBT_notAllowedAccessClass.14="0"
+MIBT_notAllowedAccessClass.15="0"
+MIB_timerPeriodicUpdateMS.0="30"
+MIB_maxQueueLength.0="0"
+MIB_msPriorityUsedInQueueing.0="0"
+MIB_timeLimitCall.0="0"
+MIB_timeLimitHandover.0="0"
+MIB_basebandTransceiverID_0.0="0"
+MIB_relatedRadioCarrier_0.0="0"
+MIB_basebandAdministrativeState_0.0="0"
+MIB_basebandAlarmStatus_0.0="0"
+MIB_basebandOperationalState_0.0="1"
+MIBT_channelID_0.0="0"
+MIBT_channelID_0.1="1"
+MIBT_channelID_0.2="2"
+MIBT_channelID_0.3="3"
+MIBT_channelID_0.4="4"
+MIBT_channelID_0.5="5"
+MIBT_channelID_0.6="6"
+MIBT_channelID_0.7="7"
+MIBT_channelCombination_0.0="5"
+MIBT_channelCombination_0.1="1"
+MIBT_channelCombination_0.2="1"
+MIBT_channelCombination_0.3="1"
+MIBT_channelCombination_0.4="1"
+MIBT_channelCombination_0.5="1"
+MIBT_channelCombination_0.6="1"
+MIBT_channelCombination_0.7="1"
+MIBT_channelFrequencyUsage_0.0="0"
+MIBT_channelFrequencyUsage_0.1="0"
+MIBT_channelFrequencyUsage_0.2="0"
+MIBT_channelFrequencyUsage_0.3="0"
+MIBT_channelFrequencyUsage_0.4="0"
+MIBT_channelFrequencyUsage_0.5="0"
+MIBT_channelFrequencyUsage_0.6="0"
+MIBT_channelFrequencyUsage_0.7="0"
+MIBT_channelTsc_0.0="0"
+MIBT_channelTsc_0.1="0"
+MIBT_channelTsc_0.2="0"
+MIBT_channelTsc_0.3="0"
+MIBT_channelTsc_0.4="0"
+MIBT_channelTsc_0.5="0"
+MIBT_channelTsc_0.6="0"
+MIBT_channelTsc_0.7="0"
+MIBT_channelAdministrativeState_0.0="0"
+MIBT_channelAdministrativeState_0.1="0"
+MIBT_channelAdministrativeState_0.2="0"
+MIBT_channelAdministrativeState_0.3="0"
+MIBT_channelAdministrativeState_0.4="0"
+MIBT_channelAdministrativeState_0.5="0"
+MIBT_channelAdministrativeState_0.6="0"
+MIBT_channelAdministrativeState_0.7="0"
+MIBT_channelOperationalState_0.0="1"
+MIBT_channelOperationalState_0.1="1"
+MIBT_channelOperationalState_0.2="1"
+MIBT_channelOperationalState_0.3="1"
+MIBT_channelOperationalState_0.4="1"
+MIBT_channelOperationalState_0.5="1"
+MIBT_channelOperationalState_0.6="1"
+MIBT_channelOperationalState_0.7="1"
+MIB_basebandTransceiverID_1.0="1"
+MIB_relatedRadioCarrier_1.0="1"
+MIB_basebandAdministrativeState_1.0="0"
+MIB_basebandAlarmStatus_1.0="0"
+MIB_basebandOperationalState_1.0="1"
+MIBT_channelID_1.0="0"
+MIBT_channelID_1.1="1"
+MIBT_channelID_1.2="2"
+MIBT_channelID_1.3="3"
+MIBT_channelID_1.4="4"
+MIBT_channelID_1.5="5"
+MIBT_channelID_1.6="6"
+MIBT_channelID_1.7="7"
+MIBT_channelCombination_1.0="1"
+MIBT_channelCombination_1.1="1"
+MIBT_channelCombination_1.2="1"
+MIBT_channelCombination_1.3="1"
+MIBT_channelCombination_1.4="1"
+MIBT_channelCombination_1.5="1"
+MIBT_channelCombination_1.6="1"
+MIBT_channelCombination_1.7="1"
+MIBT_channelFrequencyUsage_1.0="0"
+MIBT_channelFrequencyUsage_1.1="0"
+MIBT_channelFrequencyUsage_1.2="0"
+MIBT_channelFrequencyUsage_1.3="0"
+MIBT_channelFrequencyUsage_1.4="0"
+MIBT_channelFrequencyUsage_1.5="0"
+MIBT_channelFrequencyUsage_1.6="0"
+MIBT_channelFrequencyUsage_1.7="0"
+MIBT_channelTsc_1.0="0"
+MIBT_channelTsc_1.1="0"
+MIBT_channelTsc_1.2="0"
+MIBT_channelTsc_1.3="0"
+MIBT_channelTsc_1.4="0"
+MIBT_channelTsc_1.5="0"
+MIBT_channelTsc_1.6="0"
+MIBT_channelTsc_1.7="0"
+MIBT_channelAdministrativeState_1.0="0"
+MIBT_channelAdministrativeState_1.1="0"
+MIBT_channelAdministrativeState_1.2="0"
+MIBT_channelAdministrativeState_1.3="0"
+MIBT_channelAdministrativeState_1.4="0"
+MIBT_channelAdministrativeState_1.5="0"
+MIBT_channelAdministrativeState_1.6="0"
+MIBT_channelAdministrativeState_1.7="0"
+MIBT_channelOperationalState_1.0="1"
+MIBT_channelOperationalState_1.1="1"
+MIBT_channelOperationalState_1.2="1"
+MIBT_channelOperationalState_1.3="1"
+MIBT_channelOperationalState_1.4="1"
+MIBT_channelOperationalState_1.5="1"
+MIBT_channelOperationalState_1.6="1"
+MIBT_channelOperationalState_1.7="1"
+MIBT_carrierFrequency_0.0="0"
+MIBT_carrierFrequency_0.1="0"
+MIBT_carrierFrequency_0.2="0"
+MIBT_carrierFrequency_0.3="0"
+MIBT_carrierFrequency_0.4="0"
+MIBT_carrierFrequency_0.5="0"
+MIBT_carrierFrequency_0.6="0"
+MIBT_carrierFrequency_0.7="0"
+MIBT_carrierFrequency_0.8="0"
+MIBT_carrierFrequency_0.9="0"
+MIBT_carrierFrequency_0.10="0"
+MIBT_carrierFrequency_0.11="0"
+MIBT_carrierFrequency_0.12="0"
+MIBT_carrierFrequency_0.13="0"
+MIBT_carrierFrequency_0.14="0"
+MIBT_carrierFrequency_0.15="0"
+MIB_powerClass_0.0="2"
+MIB_radioCarrierID_0.0="0"
+MIB_txPwrMaxReduction_0.0="0"
+MIB_carrier_administrativeState_0.0="1"
+MIB_carrier_alarmStatus_0.0="0"
+MIB_carrier_operationalState_0.0="0"
+MIBT_carrierFrequency_1.0="1"
+MIBT_carrierFrequency_1.1="0"
+MIBT_carrierFrequency_1.2="0"
+MIBT_carrierFrequency_1.3="0"
+MIBT_carrierFrequency_1.4="0"
+MIBT_carrierFrequency_1.5="0"
+MIBT_carrierFrequency_1.6="0"
+MIBT_carrierFrequency_1.7="0"
+MIBT_carrierFrequency_1.8="0"
+MIBT_carrierFrequency_1.9="0"
+MIBT_carrierFrequency_1.10="0"
+MIBT_carrierFrequency_1.11="0"
+MIBT_carrierFrequency_1.12="0"
+MIBT_carrierFrequency_1.13="0"
+MIBT_carrierFrequency_1.14="0"
+MIBT_carrierFrequency_1.15="0"
+MIB_powerClass_1.0="2"
+MIB_radioCarrierID_1.0="1"
+MIB_txPwrMaxReduction_1.0="0"
+MIB_carrier_administrativeState_1.0="1"
+MIB_carrier_alarmStatus_1.0="0"
+MIB_carrier_operationalState_1.0="0"
+MIB_sdcchSAPI0.0="103"
+MIB_facchTCHF.0="77"
+MIB_facchTCHH.0="77"
+MIB_sacchTCHSAPI0.0="448"
+MIB_sacchSDCCH.0="448"
+MIB_sdcchSAPI3.0="103"
+MIB_sdcchTCHSAPI3.0="103"
+MIB_t3101.0="767"
+MIB_t3103.0="0"
+MIB_t3105.0="1023"
+MIB_t3107.0="0"
+MIB_t3109.0="511"
+MIB_t3111.0="767"
+MIB_t3113.0="1800"
+MIBT_adjCell_handoverCellID.0="0"
+MIBT_adjCell_handoverCellID.1="0"
+MIBT_adjCell_handoverCellID.2="0"
+MIBT_adjCell_handoverCellID.3="0"
+MIBT_adjCell_handoverCellID.4="0"
+MIBT_adjCell_handoverCellID.5="0"
+MIBT_adjCell_handoverCellID.6="0"
+MIBT_adjCell_handoverCellID.7="0"
+MIBT_adjCell_handoverCellID.8="0"
+MIBT_adjCell_handoverCellID.9="0"
+MIBT_adjCell_handoverCellID.10="0"
+MIBT_adjCell_handoverCellID.11="0"
+MIBT_adjCell_handoverCellID.12="0"
+MIBT_adjCell_handoverCellID.13="0"
+MIBT_adjCell_handoverCellID.14="0"
+MIBT_adjCell_handoverCellID.15="0"
+MIBT_adjCell_mcc.0="0"
+MIBT_adjCell_mcc.1="0"
+MIBT_adjCell_mcc.2="0"
+MIBT_adjCell_mcc.3="0"
+MIBT_adjCell_mcc.4="0"
+MIBT_adjCell_mcc.5="0"
+MIBT_adjCell_mcc.6="0"
+MIBT_adjCell_mcc.7="0"
+MIBT_adjCell_mcc.8="0"
+MIBT_adjCell_mcc.9="0"
+MIBT_adjCell_mcc.10="0"
+MIBT_adjCell_mcc.11="0"
+MIBT_adjCell_mcc.12="0"
+MIBT_adjCell_mcc.13="0"
+MIBT_adjCell_mcc.14="0"
+MIBT_adjCell_mcc.15="0"
+MIBT_adjCell_mnc.0="0"
+MIBT_adjCell_mnc.1="0"
+MIBT_adjCell_mnc.2="0"
+MIBT_adjCell_mnc.3="0"
+MIBT_adjCell_mnc.4="0"
+MIBT_adjCell_mnc.5="0"
+MIBT_adjCell_mnc.6="0"
+MIBT_adjCell_mnc.7="0"
+MIBT_adjCell_mnc.8="0"
+MIBT_adjCell_mnc.9="0"
+MIBT_adjCell_mnc.10="0"
+MIBT_adjCell_mnc.11="0"
+MIBT_adjCell_mnc.12="0"
+MIBT_adjCell_mnc.13="0"
+MIBT_adjCell_mnc.14="0"
+MIBT_adjCell_mnc.15="0"
+MIBT_adjCell_lac.0="0"
+MIBT_adjCell_lac.1="0"
+MIBT_adjCell_lac.2="0"
+MIBT_adjCell_lac.3="0"
+MIBT_adjCell_lac.4="0"
+MIBT_adjCell_lac.5="0"
+MIBT_adjCell_lac.6="0"
+MIBT_adjCell_lac.7="0"
+MIBT_adjCell_lac.8="0"
+MIBT_adjCell_lac.9="0"
+MIBT_adjCell_lac.10="0"
+MIBT_adjCell_lac.11="0"
+MIBT_adjCell_lac.12="0"
+MIBT_adjCell_lac.13="0"
+MIBT_adjCell_lac.14="0"
+MIBT_adjCell_lac.15="0"
+MIBT_adjCell_ci.0="0"
+MIBT_adjCell_ci.1="0"
+MIBT_adjCell_ci.2="0"
+MIBT_adjCell_ci.3="0"
+MIBT_adjCell_ci.4="0"
+MIBT_adjCell_ci.5="0"
+MIBT_adjCell_ci.6="0"
+MIBT_adjCell_ci.7="0"
+MIBT_adjCell_ci.8="0"
+MIBT_adjCell_ci.9="0"
+MIBT_adjCell_ci.10="0"
+MIBT_adjCell_ci.11="0"
+MIBT_adjCell_ci.12="0"
+MIBT_adjCell_ci.13="0"
+MIBT_adjCell_ci.14="0"
+MIBT_adjCell_ci.15="0"
+MIBT_adjCell_bCCHFrequency.0="0"
+MIBT_adjCell_bCCHFrequency.1="0"
+MIBT_adjCell_bCCHFrequency.2="0"
+MIBT_adjCell_bCCHFrequency.3="0"
+MIBT_adjCell_bCCHFrequency.4="0"
+MIBT_adjCell_bCCHFrequency.5="0"
+MIBT_adjCell_bCCHFrequency.6="0"
+MIBT_adjCell_bCCHFrequency.7="0"
+MIBT_adjCell_bCCHFrequency.8="0"
+MIBT_adjCell_bCCHFrequency.9="0"
+MIBT_adjCell_bCCHFrequency.10="0"
+MIBT_adjCell_bCCHFrequency.11="0"
+MIBT_adjCell_bCCHFrequency.12="0"
+MIBT_adjCell_bCCHFrequency.13="0"
+MIBT_adjCell_bCCHFrequency.14="0"
+MIBT_adjCell_bCCHFrequency.15="0"
+MIBT_adjCell_ncc.0="0"
+MIBT_adjCell_ncc.1="0"
+MIBT_adjCell_ncc.2="0"
+MIBT_adjCell_ncc.3="0"
+MIBT_adjCell_ncc.4="0"
+MIBT_adjCell_ncc.5="0"
+MIBT_adjCell_ncc.6="0"
+MIBT_adjCell_ncc.7="0"
+MIBT_adjCell_ncc.8="0"
+MIBT_adjCell_ncc.9="0"
+MIBT_adjCell_ncc.10="0"
+MIBT_adjCell_ncc.11="0"
+MIBT_adjCell_ncc.12="0"
+MIBT_adjCell_ncc.13="0"
+MIBT_adjCell_ncc.14="0"
+MIBT_adjCell_ncc.15="0"
+MIBT_adjCell_cid.0="0"
+MIBT_adjCell_cid.1="0"
+MIBT_adjCell_cid.2="0"
+MIBT_adjCell_cid.3="0"
+MIBT_adjCell_cid.4="0"
+MIBT_adjCell_cid.5="0"
+MIBT_adjCell_cid.6="0"
+MIBT_adjCell_cid.7="0"
+MIBT_adjCell_cid.8="0"
+MIBT_adjCell_cid.9="0"
+MIBT_adjCell_cid.10="0"
+MIBT_adjCell_cid.11="0"
+MIBT_adjCell_cid.12="0"
+MIBT_adjCell_cid.13="0"
+MIBT_adjCell_cid.14="0"
+MIBT_adjCell_cid.15="0"
+MIBT_adjCell_synchronized.0="0"
+MIBT_adjCell_synchronized.1="0"
+MIBT_adjCell_synchronized.2="0"
+MIBT_adjCell_synchronized.3="0"
+MIBT_adjCell_synchronized.4="0"
+MIBT_adjCell_synchronized.5="0"
+MIBT_adjCell_synchronized.6="0"
+MIBT_adjCell_synchronized.7="0"
+MIBT_adjCell_synchronized.8="0"
+MIBT_adjCell_synchronized.9="0"
+MIBT_adjCell_synchronized.10="0"
+MIBT_adjCell_synchronized.11="0"
+MIBT_adjCell_synchronized.12="0"
+MIBT_adjCell_synchronized.13="0"
+MIBT_adjCell_synchronized.14="0"
+MIBT_adjCell_synchronized.15="0"
+MIBT_adjCell_hoPriorityLevel.0="0"
+MIBT_adjCell_hoPriorityLevel.1="0"
+MIBT_adjCell_hoPriorityLevel.2="0"
+MIBT_adjCell_hoPriorityLevel.3="0"
+MIBT_adjCell_hoPriorityLevel.4="0"
+MIBT_adjCell_hoPriorityLevel.5="0"
+MIBT_adjCell_hoPriorityLevel.6="0"
+MIBT_adjCell_hoPriorityLevel.7="0"
+MIBT_adjCell_hoPriorityLevel.8="0"
+MIBT_adjCell_hoPriorityLevel.9="0"
+MIBT_adjCell_hoPriorityLevel.10="0"
+MIBT_adjCell_hoPriorityLevel.11="0"
+MIBT_adjCell_hoPriorityLevel.12="0"
+MIBT_adjCell_hoPriorityLevel.13="0"
+MIBT_adjCell_hoPriorityLevel.14="0"
+MIBT_adjCell_hoPriorityLevel.15="0"
+MIBT_adjCell_hoMargin.0="0"
+MIBT_adjCell_hoMargin.1="0"
+MIBT_adjCell_hoMargin.2="0"
+MIBT_adjCell_hoMargin.3="0"
+MIBT_adjCell_hoMargin.4="0"
+MIBT_adjCell_hoMargin.5="0"
+MIBT_adjCell_hoMargin.6="0"
+MIBT_adjCell_hoMargin.7="0"
+MIBT_adjCell_hoMargin.8="0"
+MIBT_adjCell_hoMargin.9="0"
+MIBT_adjCell_hoMargin.10="0"
+MIBT_adjCell_hoMargin.11="0"
+MIBT_adjCell_hoMargin.12="0"
+MIBT_adjCell_hoMargin.13="0"
+MIBT_adjCell_hoMargin.14="0"
+MIBT_adjCell_hoMargin.15="0"
+MIBT_adjCell_msTxPwrMaxCell.0="0"
+MIBT_adjCell_msTxPwrMaxCell.1="0"
+MIBT_adjCell_msTxPwrMaxCell.2="0"
+MIBT_adjCell_msTxPwrMaxCell.3="0"
+MIBT_adjCell_msTxPwrMaxCell.4="0"
+MIBT_adjCell_msTxPwrMaxCell.5="0"
+MIBT_adjCell_msTxPwrMaxCell.6="0"
+MIBT_adjCell_msTxPwrMaxCell.7="0"
+MIBT_adjCell_msTxPwrMaxCell.8="0"
+MIBT_adjCell_msTxPwrMaxCell.9="0"
+MIBT_adjCell_msTxPwrMaxCell.10="0"
+MIBT_adjCell_msTxPwrMaxCell.11="0"
+MIBT_adjCell_msTxPwrMaxCell.12="0"
+MIBT_adjCell_msTxPwrMaxCell.13="0"
+MIBT_adjCell_msTxPwrMaxCell.14="0"
+MIBT_adjCell_msTxPwrMaxCell.15="0"
+MIBT_adjCell_rxLevMinCell.0="0"
+MIBT_adjCell_rxLevMinCell.1="0"
+MIBT_adjCell_rxLevMinCell.2="0"
+MIBT_adjCell_rxLevMinCell.3="0"
+MIBT_adjCell_rxLevMinCell.4="0"
+MIBT_adjCell_rxLevMinCell.5="0"
+MIBT_adjCell_rxLevMinCell.6="0"
+MIBT_adjCell_rxLevMinCell.7="0"
+MIBT_adjCell_rxLevMinCell.8="0"
+MIBT_adjCell_rxLevMinCell.9="0"
+MIBT_adjCell_rxLevMinCell.10="0"
+MIBT_adjCell_rxLevMinCell.11="0"
+MIBT_adjCell_rxLevMinCell.12="0"
+MIBT_adjCell_rxLevMinCell.13="0"
+MIBT_adjCell_rxLevMinCell.14="0"
+MIBT_adjCell_rxLevMinCell.15="0"
+MIBT_adjCell_reselectionCellID.0="0"
+MIBT_adjCell_reselectionCellID.1="0"
+MIBT_adjCell_reselectionCellID.2="0"
+MIBT_adjCell_reselectionCellID.3="0"
+MIBT_adjCell_reselectionCellID.4="0"
+MIBT_adjCell_reselectionCellID.5="0"
+MIBT_adjCell_reselectionCellID.6="0"
+MIBT_adjCell_reselectionCellID.7="0"
+MIBT_adjCell_reselectionCellID.8="0"
+MIBT_adjCell_reselectionCellID.9="0"
+MIBT_adjCell_reselectionCellID.10="0"
+MIBT_adjCell_reselectionCellID.11="0"
+MIBT_adjCell_reselectionCellID.12="0"
+MIBT_adjCell_reselectionCellID.13="0"
+MIBT_adjCell_reselectionCellID.14="0"
+MIBT_adjCell_reselectionCellID.15="0"
+MIBT_adjCell_reselectionBCCHFrequency.0="0"
+MIBT_adjCell_reselectionBCCHFrequency.1="0"
+MIBT_adjCell_reselectionBCCHFrequency.2="0"
+MIBT_adjCell_reselectionBCCHFrequency.3="0"
+MIBT_adjCell_reselectionBCCHFrequency.4="0"
+MIBT_adjCell_reselectionBCCHFrequency.5="0"
+MIBT_adjCell_reselectionBCCHFrequency.6="0"
+MIBT_adjCell_reselectionBCCHFrequency.7="0"
+MIBT_adjCell_reselectionBCCHFrequency.8="0"
+MIBT_adjCell_reselectionBCCHFrequency.9="0"
+MIBT_adjCell_reselectionBCCHFrequency.10="0"
+MIBT_adjCell_reselectionBCCHFrequency.11="0"
+MIBT_adjCell_reselectionBCCHFrequency.12="0"
+MIBT_adjCell_reselectionBCCHFrequency.13="0"
+MIBT_adjCell_reselectionBCCHFrequency.14="0"
+MIBT_adjCell_reselectionBCCHFrequency.15="0"
+MIB_frequencyHoppingSystemID.0="0"
+MIB_hoppingSequenceNumber.0="0"
+MIBT_mobileAllocation.0="-1"
+MIBT_mobileAllocation.1="0"
+MIBT_mobileAllocation.2="0"
+MIBT_mobileAllocation.3="0"
+MIBT_mobileAllocation.4="0"
+MIBT_mobileAllocation.5="0"
+MIBT_mobileAllocation.6="0"
+MIBT_mobileAllocation.7="0"
+MIBT_mobileAllocation.8="0"
+MIBT_mobileAllocation.9="0"
+MIBT_mobileAllocation.10="0"
+MIBT_mobileAllocation.11="0"
+MIBT_mobileAllocation.12="0"
+MIBT_mobileAllocation.13="0"
+MIBT_mobileAllocation.14="0"
+MIBT_mobileAllocation.15="0"
+MIB_handoverControlID.0="0"
+MIB_enableOptHandoverProcessing.0="0"
+MIB_hoAveragingAdjCellParamHreqave.0="8"
+MIB_hoAveragingAdjCellParamHreqt.0="0"
+MIB_hoAveragingAdjCellParamWeighting.0="2"
+MIB_hoAveragingDistParamHreqave.0="0"
+MIB_hoAveragingDistParamHreqt.0="0"
+MIB_hoAveragingLevParamHreqave.0="8"
+MIB_hoAveragingLevParamHreqt.0="0"
+MIB_hoAveragingLevParamWeighting.0="2"
+MIB_hoAveragingQualParamHreqave.0="8"
+MIB_hoAveragingQualParamHreqt.0="0"
+MIB_hoAveragingQualParamWeighting.0="2"
+MIB_hoMarginDef.0="0"
+MIB_hoThresholdDistParamTimeadv.0="0"
+MIB_hoThresholdDistParamP8.0="0"
+MIB_hoThresholdDistParamN8.0="0"
+MIB_hoThresholdInterfaceParamRxLevelUL.0="0"
+MIB_hoThresholdInterfaceParamRxLevelDL.0="0"
+MIB_hoThresholdInterfaceParamPx.0="0"
+MIB_hoThresholdInterfaceParamNx.0="0"
+MIB_hoThresholdLevParamRxLevelUL.0="20"
+MIB_hoThresholdLevParamRxLevelDL.0="20"
+MIB_hoThresholdLevParamPx.0="4"
+MIB_hoThresholdLevParamNx.0="4"
+MIB_hoThresholdQualParamRxQualUL.0="4"
+MIB_hoThresholdQualParamRxQualDL.0="4"
+MIB_hoThresholdQualParamPx.0="4"
+MIB_hoThresholdQualParamNx.0="4"
+MIB_interferenceAveragingParamAveragingPeriod.0="0"
+MIB_interferenceAveragingParamThresholdBoundary0.0="0"
+MIB_interferenceAveragingParamThresholdBoundary1.0="0"
+MIB_interferenceAveragingParamThresholdBoundary2.0="0"
+MIB_interferenceAveragingParamThresholdBoundary3.0="0"
+MIB_interferenceAveragingParamThresholdBoundary4.0="0"
+MIB_interferenceAveragingParamThresholdBoundary5.0="0"
+MIB_msTxPwrMaxCellDef.0="30"
+MIB_rxLevMinCellDef.0="1"
+MIB_pcAveragingLevHreqave.0="4"
+MIB_pcAveragingLevHreqt.0="0"
+MIB_pcAveragingLevWeighting.0="1"
+MIB_pcAveragingQualHreqave.0="4"
+MIB_pcAveragingQualHreqt.0="0"
+MIB_pcAveragingQualWeighting.0="1"
+MIB_pcLowerThresholdLevParamRxLevelUL.0="30"
+MIB_pcLowerThresholdLevParamRxLevelDL.0="0"
+MIB_pcLowerThresholdLevParamPx.0="1"
+MIB_pcLowerThresholdLevParamNx.0="1"
+MIB_pcLowerThresholdQualParamRxQualUL.0="0"
+MIB_pcLowerThresholdQualParamRxQualDL.0="0"
+MIB_pcLowerThresholdQualParamPx.0="1"
+MIB_pcLowerThresholdQualParamNx.0="1"
+MIB_pcUpperThresholdLevParamRxLevelUL.0="0"
+MIB_pcUpperThresholdLevParamRxLevelDL.0="0"
+MIB_pcUpperThresholdLevParamPx.0="1"
+MIB_pcUpperThresholdLevParamNx.0="1"
+MIB_pcUpperThresholdQualParamRxQualUL.0="0"
+MIB_pcUpperThresholdQualParamRxQualDL.0="0"
+MIB_pcUpperThresholdQualParamPx.0="1"
+MIB_pcUpperThresholdQualParamNx.0="1"
+MIB_powerControlInterval.0="0"
+MIB_powerIncrStepSize.0="0"
+MIB_powerRedStepSize.0="0"
+MIB_meanPCHAGCHQueueLength.0="109"
+MIB_attTransOfPagingMessagesThePCH.0="0"
+MIB_unsuccTransOfPagingMessagesThePCH.0="0"
+MIB_attImmediateAssingProcs.0="0"
+MIB_succImmediateAssingProcs.0="0"
+MIBT_attImmediateAssingProcsValue.0="0"
+MIBT_attImmediateAssingProcsValue.1="0"
+MIBT_attImmediateAssingProcsValue.2="0"
+MIBT_attImmediateAssingProcsValue.3="0"
+MIBT_attImmediateAssingProcsValue.4="0"
+MIBT_attImmediateAssingProcsValue.5="0"
+MIBT_attImmediateAssingProcsValue.6="0"
+MIBT_attImmediateAssingProcsValue.7="0"
+MIBT_attImmediateAssingProcsValue.8="0"
+MIBT_attImmediateAssingProcsValue.9="0"
+MIBT_attImmediateAssingProcsValue.10="0"
+MIBT_attImmediateAssingProcsValue.11="0"
+MIBT_attImmediateAssingProcsValue.12="0"
+MIBT_attImmediateAssingProcsValue.13="0"
+MIBT_attImmediateAssingProcsValue.14="0"
+MIBT_attImmediateAssingProcsValue.15="0"
+MIBT_succImmediateAssingProcsValue.0="0"
+MIBT_succImmediateAssingProcsValue.1="0"
+MIBT_succImmediateAssingProcsValue.2="0"
+MIBT_succImmediateAssingProcsValue.3="0"
+MIBT_succImmediateAssingProcsValue.4="0"
+MIBT_succImmediateAssingProcsValue.5="0"
+MIBT_succImmediateAssingProcsValue.6="0"
+MIBT_succImmediateAssingProcsValue.7="0"
+MIBT_succImmediateAssingProcsValue.8="0"
+MIBT_succImmediateAssingProcsValue.9="0"
+MIBT_succImmediateAssingProcsValue.10="0"
+MIBT_succImmediateAssingProcsValue.11="0"
+MIBT_succImmediateAssingProcsValue.12="0"
+MIBT_succImmediateAssingProcsValue.13="0"
+MIBT_succImmediateAssingProcsValue.14="0"
+MIBT_succImmediateAssingProcsValue.15="0"
+MIB_nbrOfPagesDiscardedFromPCHQueue.0="0"
+MIB_meanDurationOfSuccPagingProcs.0="0"
+MIB_nbrOfAvailableTCHs.0="0"
+MIB_meanNbrOfBusyTCHs.0="0"
+MIB_maxNbrOfBusyTCHs.0="0"
+MIB_meanNbrOfIdleTCHsPerInterferenceBand.0="0"
+MIB_attTCHSeizures.0="0"
+MIB_succTCHSeizures.0="0"
+MIB_attTCHSeizuresMeetingTCHBlockedState.0="0"
+MIB_allAvailableTCHAllocatedTime.0="43885"
+MIB_meanTCHBusyTime.0="0"
+MIB_meanTCHQueueLength.0="0"
+MIB_nbrOfLostRadioLinksTCH.0="0"
+MIB_nbrOfAvailableSDCCHs.0="0"
+MIB_meanNbrOfBusySDCCHs.0="0"
+MIB_maxNbrOfBusySDCCHs.0="0"
+MIB_attSDCCHSeizuresMeetingSDCCHBlockedState.0="0"
+MIB_allAvailableSDCCHAllocatedTime.0="43888"
+MIB_meanSDCCHQueueLength.0="0"
+MIB_nbrOfLostRadioLinksSDCCH.0="0"
+MIB_relativeTimeDLPowerControlAtMax.0="0"
+MIB_relativeTimeULPowerControlAtMax.0="0"
+MIB_nbrOfClassMarkUpdates.0="0"
+MIB_attMobileOriginatingCalls.0="0"
+MIB_succMobileOriginatingCalls.0="0"
+MIB_ansMobileOriginatingCalls.0="0"
+MIB_attMobileTerminatingCalls.0="0"
+MIB_succMobileTerminatingCalls.0="0"
+MIB_ansMobileTerminatingCalls.0="0"
+MIB_attMobileEmergencyCalls.0="0"
+MIB_succMobileEmergencyCalls.0="0"
+MIB_ansMobileEmergencyCalls.0="0"
+MIB_attCipheringModeControlProcs.0="0"
+MIB_succCipheringModeControlProcs.0="0"
+MIB_attInterrogationOfHLRsForRouting.0="0"
+MIB_succInterrogationOfHLRsMSRNObtained.0="0"
+MIB_succInterrogationOfHLRsCallForwarding.0="0"
+MIB_attOpForMobileOriginatingPointToPointSMs.0="0"
+MIB_succOpForMobileOriginatingPointToPointSMs.0="0"
+MIB_attOpForMobileTerminatingPointToPointSMs.0="0"
+MIB_succOpForMobileTerminatingPointToPointSMs.0="0"
+MIB_meanTimeToCallSetupService.0="0"
+MIB_meanTimeToLocationUpdateService.0="0"
+MIB_transSubIdentifiedWithIMSI.0="0"
+MIB_imsiDetachProcs.0="0"
+MIB_imsiAttachProcs.0="0"
+MIB_attIncomingInterMSCHDOs.0="0"
+MIB_succIncomingInterMSCHDOs.0="0"
+MIB_attOutgoingInterMSCHDOs.0="0"
+MIB_succOutgoingInterMSCHDOs.0="0"
+MIBT_externalHDOsPerCauseValue.0="0"
+MIBT_externalHDOsPerCauseValue.1="0"
+MIBT_externalHDOsPerCauseValue.2="0"
+MIBT_externalHDOsPerCauseValue.3="0"
+MIBT_externalHDOsPerCauseValue.4="0"
+MIBT_externalHDOsPerCauseValue.5="0"
+MIBT_externalHDOsPerCauseValue.6="0"
+MIBT_externalHDOsPerCauseValue.7="0"
+MIBT_externalHDOsPerCauseValue.8="0"
+MIBT_externalHDOsPerCauseValue.9="0"
+MIBT_externalHDOsPerCauseValue.10="0"
+MIBT_externalHDOsPerCauseValue.11="0"
+MIBT_externalHDOsPerCauseValue.12="0"
+MIBT_externalHDOsPerCauseValue.13="0"
+MIBT_externalHDOsPerCauseValue.14="0"
+MIBT_externalHDOsPerCauseValue.15="0"
+MIB_unsuccExternHDOsWithReconnectionPerMSC.0="0"
+MIB_unsuccExternHDOsWithLossOfConnectionPerMSC.0="0"
+MIB_cc_max_L3_msgs.0="32"
+MIB_cc_l3_msg_q_priority.0="10"
+MIB_cc_task_priority.0="100"
+MIB_cc_task_stack_size.0="10000"
+MIB_cc_mm_conn_est_T999.0="2000"
+MIB_cc_alerting_T301.0="18000"
+MIB_cc_setup_T303.0="2000"
+MIB_cc_call_confirmed_T310.0="2000"
+MIB_cc_connect_T313.0="2000"
+MIB_cc_disconnect_T305.0="3000"
+MIB_cc_release_T308.0="2000"
+MIB_cc_safety_timer.0="1000"
+MIB_cc_max_calls.0="15"
+MIB_mm_max_mm_connections.0="19"
+MIB_mm_max_L3_msgs.0="32"
+MIB_task_priority.0="100"
+MIB_task_stack_size.0="20000"
+MIB_mm_paging_t3113.0="3000"
+MIB_mm_authenticationRequired.0="0"
+MIB_mm_cipheringRequired.0="0"
+MIB_mm_IMEICheckRequired.0="0"
+MIB_rm_t3L01.0="511"
+MIB_rm_bsCcChans.0="1"
+MIB_rm_bsCcchSdcchComb.0="1"
+MIB_rm_sysInfoOnOffMap.0="62"
+MIB_rm_airInterface.0="2"
+MIB_rm_viperCellTsc.0="5"
+MIB_rm_maxSlotPerTrx.0="8"
+MIB_rm_maxTrxs.0="2"
+MIB_rm_maxTchfs.0="15"
+MIB_rm_maxSdcch4s.0="4"
+MIB_rm_trxOnOffMap.0="3"
+MIB_rm_networkIfConfig.0="0"
+MIB_rm_bcchTrx.0="0"
+MIB_rm_preAlphaTrx.0="0"
+MIB_rm_ccchBcchComb.0="1"
+MIB_rm_ccchConf.0="1"
+MIB_rm_nim_0_0.0="0"
+MIB_rm_nim_0_1.0="0"
+MIB_rm_nim_0_2.0="0"
+MIB_rm_nim_0_3.0="0"
+MIB_rm_nim_0_4.0="0"
+MIB_rm_nim_0_5.0="0"
+MIB_rm_nim_0_6.0="0"
+MIB_rm_nim_0_7.0="1"
+MIB_rm_nim_1_0.0="0"
+MIB_rm_nim_1_1.0="0"
+MIB_rm_nim_1_2.0="0"
+MIB_rm_nim_1_3.0="0"
+MIB_rm_nim_1_4.0="0"
+MIB_rm_nim_1_5.0="0"
+MIB_rm_nim_1_6.0="0"
+MIB_rm_nim_1_7.0="0"
+MIB_rm_trxSynthSetting_0_0.0="0"
+MIB_rm_trxSynthSetting_0_1.0="0"
+MIB_rm_trxSynthSetting_0_2.0="0"
+MIB_rm_trxSynthSetting_0_3.0="0"
+MIB_rm_trxSynthSetting_1_0.0="0"
+MIB_rm_trxSynthSetting_1_1.0="0"
+MIB_rm_trxSynthSetting_1_2.0="0"
+MIB_rm_trxSynthSetting_1_3.0="0"
+MIB_rm_trxFpgaDelay_0_0.0="0"
+MIB_rm_trxFpgaDelay_0_1.0="0"
+MIB_rm_trxFpgaDelay_1_0.0="0"
+MIB_rm_trxFpgaDelay_1_1.0="0"
+MIB_rm_SGainCtrlSetting_0_0.0="656"
+MIB_rm_SGainCtrlSetting_0_1.0="128"
+MIB_rm_SGainCtrlSetting_1_0.0="656"
+MIB_rm_SGainCtrlSetting_1_1.0="128"
+MIB_rm_synchChanInfo.0="0"
+MIB_oamAlternateMibFileName.0="/ata/vipercall/mib/default.txt"
+MIB_mibAccessControlFlag.0="1"
+MIBT_trapType.0="2"
+MIBT_trapType.1="2"
+MIBT_trapType.2="2"
+MIBT_trapType.3="2"
+MIBT_trapType.4="2"
+MIBT_trapType.5="2"
+MIBT_trapType.6="2"
+MIBT_trapType.7="2"
+MIBT_trapIpAddress.0="0.0.0.0"
+MIBT_trapIpAddress.1="0.0.0.0"
+MIBT_trapIpAddress.2="0.0.0.0"
+MIBT_trapIpAddress.3="0.0.0.0"
+MIBT_trapIpAddress.4="0.0.0.0"
+MIBT_trapIpAddress.5="0.0.0.0"
+MIBT_trapIpAddress.6="0.0.0.0"
+MIBT_trapIpAddress.7="0.0.0.0"
+MIBT_trapPort.0="162"
+MIBT_trapPort.1="162"
+MIBT_trapPort.2="162"
+MIBT_trapPort.3="162"
+MIBT_trapPort.4="162"
+MIBT_trapPort.5="162"
+MIBT_trapPort.6="162"
+MIBT_trapPort.7="162"
+MIBT_trapCommunity.0="public"
+MIBT_trapCommunity.1="public"
+MIBT_trapCommunity.2="public"
+MIBT_trapCommunity.3="public"
+MIBT_trapCommunity.4="public"
+MIBT_trapCommunity.5="public"
+MIBT_trapCommunity.6="public"
+MIBT_trapCommunity.7="public"
+MIB_h323_GKPort.0="1719"
+MIB_h323_Q931ResponseTimeOut.0="151"
+MIB_h323_Q931ConnectTimeOut.0="0"
+MIB_h323_Q931CallSignalingPort.0="1720"
+MIB_h323_t35CountryCode.0="181"
+MIB_h323_rasRequestTimeout.0="30"
+MIB_h323_viperbaseHeartbeatTimeout.0="360"
+MIB_monitorReceiverPLL_LockDetectStatus.0="0"
+MIB_referenceFrequencyPLL_LockDetectStatus.0="1"
+MIB_transceiver_1_PLL_LockDetectStatus.0="1"
+MIB_transceiver_2A_PLL_LockDetectStatus.0="1"
+MIB_transceiver_2B_PLL_LockDetectStatus.0="1"
+MIB_intermediateFrequency_LockDetectStatus.0="1"
+MIB_trxSerialNumber.0="0000"
+MIB_trxSoftwareVersion.0="D1.0"
+MIB_trxLoopBackMode.0="0"
+MIB_arfcnRssiControlMode.0="0"
+MIB_clockRecoveryControlMode.0="0"
+MIB_clockCardType.0="86"
+MIB_clockCardSoftwareVersion.0="1.6"
+MIB_clockCardStatus.0="0"
+MIB_clockCardCrystalUpTime.0="30846784"
+MIB_clockCardDAC.0="86"
+MIB_gpsCardType.0="32974088"
+MIB_gpsCardSoftwareVersion.0=""
+MIB_gpsCardStatus.0="0"
+MIB_gpsPosition.0=""
+MIB_gpsTime.0=""
+MIB_utcTime.0=""
+MIB_clockStatusFrequencyError.0="0"
+MIB_clockStatusDACVoltage.0="32970192"
+MIB_gpsAntennaStatus.0="0"
+MIB_gpsSatelliteStatus.0="0"
+MIB_powerCardType.0="32969664"
+MIB_powerCardStatus.0="32969400"
+MIB_powerOn.0="0"
+MIB_powerSupplyType.0="0"
+MIB_powerSupplyStatus.0="0"
+MIB_cdcBoardSerialNumber.0="0000000"
+MIB_cdcBoardMACAddress.0="00D02B00009B"
+MIB_apaEnable.0="0"
+MIB_apaScanFrequencyLowBound.0="0"
+MIB_apaScanFrequencyHighBound.0="0"
+MIB_apaMaxPowerSetting.0="0"
+MIB_apaMinRSSIThresholdForNeighborId.0="32969136"
+MIB_apaScanRate.0="32968872"
+MIB_apaHysteresisForBCCHPower.0="0"
+MIB_viperCellName.0="Cisco GP10 Name"
+MIB_viperCellLocation.0="Customer Site"
+MIB_viperCellSerialNumber.0="0"
+MIB_viperCellAssetNumber.0="0"
+MIB_viperCellCustomerName.0="Customer"
+MIB_viperCellCustomerAddress.0="Customer Address"
+MIB_viperCellCustomerPhone.0="0"
+MIB_viperCellCustomerEmail.0="customer@customer.com"
+MIB_viperCellCustomerInfo.0="Put your command here."
+MIB_gprsServerIpAddress.0="0"
+MIB_gprsRac.0="0"
+MIB_enableGprs.0="0"
+MIB_gprsOperationalStatus.0="0"
+MIB_nmo.0="0"
+MIB_t3168.0="0"
+MIB_t3192.0="0"
+MIB_drxTimerMax.0="0"
+MIB_accessBurstType.0="0"
+MIB_controlAckType.0="0"
+MIB_bsCvMax.0="0"
+MIB_panDec.0="0"
+MIB_panInc.0="0"
+MIB_panMax.0="0"
+MIB_gprsMsTxpwrMaxCch.0="0"
+MIB_gprsRexLevAccessMin.0="0"
+MIB_gprsReselectOffset.0="0"
+MIB_priorityClass.0="0"
+MIB_lsaId.0="0"
+MIB_hcsThreshold.0="0"
+MIB_gprsTemporaryOffset.0="0"
+MIB_gprsPenaltyTime.0="0"
+MIB_gprsCellReselectHysterisis.0="0"
+MIB_gprsRaReselectHysterisis.0="0"
+MIB_c32Qual.0="0"
+MIB_c31Hysterisis.0="0"
+MIB_alpha.0="0"
+MIB_pB.0="0"
+MIB_networkControlOrder.0="0"
+MIBT_ncFrequency.0="0"
+MIBT_ncFrequency.1="0"
+MIBT_ncFrequency.2="0"
+MIBT_ncFrequency.3="0"
+MIBT_ncFrequency.4="0"
+MIBT_ncFrequency.5="0"
+MIBT_ncFrequency.6="0"
+MIBT_ncFrequency.7="0"
+MIBT_ncFrequency.8="0"
+MIBT_ncFrequency.9="0"
+MIBT_ncFrequency.10="0"
+MIBT_ncFrequency.11="0"
+MIBT_ncFrequency.12="0"
+MIBT_ncFrequency.13="0"
+MIBT_ncFrequency.14="0"
+MIBT_ncFrequency.15="0"
+MIB_ncReportingPeriodI.0="0"
+MIB_ncReportingPeriodT.0="0"
+MIB_extMeasurementOrder.0="0"
+MIB_extReportingPeriod.0="0"
+MIB_extReportingType.0="0"
+MIB_intFrequency.0="0"
+MIB_nccPermitted.0="0"
+MIB_pcMeasChan.0="0"
+MIB_tavgW.0="0"
+MIB_tavgT.0="0"
+MIB_navgI.0="0"
+MIB_gprsMsTargetPower.0="0"
+MIB_spgcCcchSup.0="0"
+MIB_t3169.0="0"
+MIB_t3191.0="0"
+MIB_t3193.0="0"
+MIB_t3195.0="0"
+MIB_blockTimer.0="0"
+MIB_resetTimer.0="0"
+MIB_suspendTimer.0="0"
+MIB_resumeTimer.0="0"
+MIB_capUpdateTimer.0="0"
+MIB_blockRetries.0="0"
+MIB_unBlockRetries.0="0"
+MIB_resetRetries.0="0"
+MIB_suspendRetries.0="0"
+MIB_resumeRetries.0="0"
+MIB_raCapUpdateRetries.0="0"
+MIB_timeInterval.0="0"
+MIB_networkPort.0="0"
+MIB_flushReqRecvd.0="0"
+MIB_pagingReqRecvd.0="0"
+MIB_meanPsInterArrivalTime.0="0"
+MIB_availablePdch.0="0"
+MIB_meanAvailablePdch.0="0"
+MIB_maxAvailablePdch.0="0"
+MIB_minAvailablePdch.0="0"
+MIB_meanOccupiedPdch.0="0"
+MIB_maxOccupiedPdch.0="0"
+MIB_minOccupiedPdch.0="0"
+MIB_availablePdchAllocTime.0="0"
+MIB_packetPagingMessages.0="0"
+MIB_pagchQueueLength.0="0"
+MIB_pagesDiscardedFromPpch.0="0"
+MIB_assignmentRequest.0="0"
+MIB_succAssignmentProc.0="0"
+MIB_succPdtchSeizures.0="0"
+MIB_meanPacketQueueLength.0="0"
+MIB_serviceChanges.0="0"
+MIB_cdrClientSSLEnable.0="0"
diff --git a/data/mnet/GP10/Host/mm/Makefile b/data/mnet/GP10/Host/mm/Makefile
new file mode 100644
index 0000000..292e5e1
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/Makefile
@@ -0,0 +1,16 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS=src src_api src_init
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ $(CP) bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/mm/include/MMBssgpMsgProc.h b/data/mnet/GP10/Host/mm/include/MMBssgpMsgProc.h
new file mode 100644
index 0000000..50eb3e6
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/include/MMBssgpMsgProc.h
@@ -0,0 +1,30 @@
+#ifndef MMBssgpMsgProc_H
+#define MMBssgpMsgProc_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMBssgpMsgProc.h
+// Author(s) :
+// Create Date : 12-18-2000
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// function prototypes
+// *******************************************************************
+
+extern void MM_Bssgp_MsgProc(BSSGP_API_MSG *msg);
+extern void MM_Bssgp_SendLuAccept(short mmId);
+
+
+#endif // MMBssgpMsgProc_H
diff --git a/data/mnet/GP10/Host/mm/include/MMCcMsgProc.h b/data/mnet/GP10/Host/mm/include/MMCcMsgProc.h
new file mode 100644
index 0000000..282880c
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/include/MMCcMsgProc.h
@@ -0,0 +1,42 @@
+#ifndef MMCcMsgProc_H
+#define MMCcMsgProc_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMCcMsgProc.h
+// Author(s) : Kevin Lim
+// Create Date : 07-26-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// function prototypes
+// *******************************************************************
+
+
+void sendPageReqToRRM(short mmId);
+void MMPageReqCleanUp(short mmId);
+
+void MM_CC_PageReqProc(IntraL3Msg_t *ccInMsg);
+
+void MM_CC_HOReqProc(IntraL3Msg_t *ccInMsg);
+
+void MM_CC_MMEstabReqProc(IntraL3Msg_t *ccInMsg);
+
+void MM_CC_MMRelReqProc(IntraL3Msg_t *ccInMsg);
+
+void MM_CC_MsgProc(IntraL3Msg_t *ccInMsg);
+
+short sendLocUpInPageReq(T_CNI_RIL3_IE_MOBILE_ID mobileId, short mmId);
+
+#endif // MMCcMsgProc_H
diff --git a/data/mnet/GP10/Host/mm/include/MMLudbMsgProc.h b/data/mnet/GP10/Host/mm/include/MMLudbMsgProc.h
new file mode 100644
index 0000000..b4d61a3
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/include/MMLudbMsgProc.h
@@ -0,0 +1,45 @@
+#ifndef MMLudbMsgProc_H
+#define MMLudbMsgProc_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMLudbMsgProc.h
+// Author(s) : Kevin Lim
+// Create Date : 07-26-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// function prototypes
+// *******************************************************************
+
+#include "JCC/LudbApi.h"
+
+bool sendMMRequestToLudb(LudbMsgStruct *request);
+bool sendCipherCmdRecordToLudb(short mmId, short algo);
+bool sendMobileSecInfoReqToLudb(short mmId, short ludbId);
+bool sendMobileRegReqToLudb( T_CNI_RIL3_IE_MOBILE_ID& mobileId, short mmId);
+bool sendMobileUnRegReqToLudb( T_CNI_RIL3_IE_MOBILE_ID& mobileId, short mmId);
+bool sendInsertEmergencyToLudb(short mmId);
+bool sendRemoveEmergencyToLudb(short mmId);
+void MM_Ludb_SecRspProc(short mmId, short ludbId);
+void MM_Ludb_RegCnfProc(short mmId, short ludbId, short forceAuth);
+void MMProceedLocUpdateAuth(short mmId, short ludbId, short forceAuth);
+void MMProceedLocUpdateCipher(short mmId, short ludbId);
+void MMProceedLocUpdateRegCnf(short mmId, short ludbId);
+void MM_Ludb_RegRejProc(short mmId, T_CNI_RIL3_REJECT_CAUSE_VALUE cause);
+void MM_Ludb_UnRegCnfProc(short mmId);
+void MM_Ludb_UnRegRejProc(short mmId);
+void MM_Ludb_MsgProc(LudbMsgStruct *LudbInMsg);
+
+#endif // MMLudbMsgProc_H
diff --git a/data/mnet/GP10/Host/mm/include/MMMdMsgProc.h b/data/mnet/GP10/Host/mm/include/MMMdMsgProc.h
new file mode 100644
index 0000000..6c053f5
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/include/MMMdMsgProc.h
@@ -0,0 +1,103 @@
+#ifndef MMMdMsgProc_H
+#define MMMdMsgProc_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMMdMsgProc.h
+// Author(s) : Kevin Lim
+// Create Date : 07-26-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// function prototypes
+// *******************************************************************
+
+
+// test approval support functions
+int taHoldSdcchOn();
+int taHoldSdcchOff();
+
+int StartCipherMode(int start, int algo, unsigned char lsb);
+int StopCipherMode();
+
+
+short initNewConn( T_CNI_IRT_ID entryId,
+ T_CNI_LAPDM_OID oid,
+ T_CNI_LAPDM_SAPI sapi,
+ MMProcedureType_t procType);
+
+void sendLocationUpdateAccept( T_CNI_LAPDM_OID oid,
+ T_CNI_LAPDM_SAPI sapi,
+ T_CNI_IRT_ID entryId,
+ const T_CNI_RIL3_IE_MOBILE_ID& mobileId);
+
+void sendLocationUpdateReject( T_CNI_LAPDM_OID oid,
+ T_CNI_LAPDM_SAPI sapi ,
+ T_CNI_IRT_ID entryId,
+ T_CNI_RIL3_REJECT_CAUSE_VALUE cause);
+
+void sendIdentityRequest(short mmId);
+
+void sendAuthReqToMobile(short mmId, short ludbId);
+
+void sendAuthRejToMobile(short mmId);
+
+short sendMobileRegister(short mmId);
+
+short sendLocUpInCMServReq( T_CNI_RIL3_IE_MOBILE_ID mobileId,
+ short mmId);
+
+short sendMobileUnRegister( T_CNI_RIL3_IE_MOBILE_ID &mobileId,
+ const T_CNI_RIL3MD_CCMM_MSG *msInMsg);
+
+void processLocationUpdate(T_CNI_RIL3_IE_MOBILE_ID& mobileId,
+ const T_CNI_RIL3MD_CCMM_MSG * msInMsg,
+ T_CNI_RIL3_IE_CIPHER_KEY *keySeq);
+
+void MM_MD_LocUpdateReqProc(
+ T_CNI_RIL3MM_MSG_LOCATION_UPDATE_REQUEST *locUpdReq,
+ T_CNI_RIL3MD_CCMM_MSG *msInMsg);
+
+void MM_MD_IdentityRespProc(
+ T_CNI_RIL3MM_MSG_IDENTITY_RESPONSE *identityResponse,
+ T_CNI_RIL3MD_CCMM_MSG *msInMsg);
+
+bool sendRRCipherModeCmd(short mmId, MMProcedureType_t proc);
+bool sendCMServiceAccept(short mmId);
+bool sendCMServiceReqToCC(short mmId);
+
+void MM_MD_CMServiceReqProc(
+ T_CNI_RIL3MM_MSG_CM_SERVICE_REQUEST *cmServReq,
+ T_CNI_RIL3MD_CCMM_MSG *msInMsg);
+void MM_MD_CMServiceReqEmergencyProc(
+ T_CNI_RIL3MM_MSG_CM_SERVICE_REQUEST *cmServReq,
+ T_CNI_RIL3MD_CCMM_MSG *msInMsg);
+void MM_ProceedEmergencyIMSI(short mmId);
+void MM_MD_CMServiceReqNormalProc(
+ T_CNI_RIL3MM_MSG_CM_SERVICE_REQUEST *cmServReq,
+ T_CNI_RIL3MD_CCMM_MSG *msInMsg);
+
+void MMCMServiceCleanUp(short mmId);
+void MMProceedCMServiceReqAuth(short mmId);
+void MMProceedCMServiceReqCipher(short mmId);
+void MMProceedCMServiceReqAccept(short mmId);
+
+void MM_MD_IMSIDetachIndProc(
+ T_CNI_RIL3MM_MSG_IMSI_DETACH_INDICATION *imsiDetachInd,
+ T_CNI_RIL3MD_CCMM_MSG *msInMsg);
+
+void MM_MD_MsgProc(T_CNI_RIL3MD_CCMM_MSG *msInMsg);
+
+
+#endif // MMMdMsgProc_H
diff --git a/data/mnet/GP10/Host/mm/include/MMOamMsgProc.h b/data/mnet/GP10/Host/mm/include/MMOamMsgProc.h
new file mode 100644
index 0000000..4aa2dc2
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/include/MMOamMsgProc.h
@@ -0,0 +1,30 @@
+#ifndef MMOamMsgProc_H
+#define MMOamMsgProc_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMUtil.h
+// Author(s) : Kevin Lim
+// Create Date : 05-25-99
+// Description : MM module utilities
+//
+// *******************************************************************
+
+// *******************************************************************
+// function prototypes
+// *******************************************************************
+
+void mmHandleOpStChanged(INT32 value);
+void MM_OAM_MsgProc(TrapMsg *trapMsg);
+
+
+#endif // MMOamMsgProc_H
diff --git a/data/mnet/GP10/Host/mm/include/MMPmProc.h b/data/mnet/GP10/Host/mm/include/MMPmProc.h
new file mode 100644
index 0000000..82f4b89
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/include/MMPmProc.h
@@ -0,0 +1,38 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMPmProc.h
+// Author(s) : Kevin Lim
+// Create Date : 07-27-99
+// Description :
+//
+// *******************************************************************
+
+#ifndef MMPmProc_H
+#define MMPmProc_H
+
+// *******************************************************************
+// function prototypes
+// *******************************************************************
+
+void mmIncAttTrnPaging();
+void mmIncUnsuccTrnPaging();
+void mmUpdMeanSuccPaging(int val);
+void mmIncAttMOCalls();
+void mmIncAttMOEmergencyCalls();
+void mmIncAttCipher();
+void mmIncSuccCipher();
+void mmUpdMeanLocUpTime(int val);
+void mmIncTrnSubIdIMSI();
+void mmIncIMSIDetach();
+void mmIncIMSIAttach();
+
+#endif // MMPmProc_H
diff --git a/data/mnet/GP10/Host/mm/include/MMRmMsgProc.h b/data/mnet/GP10/Host/mm/include/MMRmMsgProc.h
new file mode 100644
index 0000000..3b3d2c8
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/include/MMRmMsgProc.h
@@ -0,0 +1,48 @@
+#ifndef MMRmMsgProc_H
+#define MMRmMsgProc_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMRmMsgProc.h
+// Author(s) : Kevin Lim
+// Create Date : 07-26-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// function prototypes
+// *******************************************************************
+
+
+void MM_RM_RRPageRspProc(IntraL3Msg_t *rrInMsg);
+
+void MMRRPageRspCleanUp(short mmId);
+void MMProceedRRPageRspAuth(short mmId);
+void MMProceedRRPageRspCipher(short mmId);
+void MMProceedRRPageRspToCC(short mmId);
+void MMProceedRRPageRspToVBLINK(short mmId);
+
+void MM_RM_RRHOAckProc(IntraL3Msg_t *rrInMsg);
+
+void MM_RM_RREstabCnfProc(IntraL3Msg_t *rrInMsg);
+
+void MM_RM_RRHONackProc(IntraL3Msg_t *rrInMsg);
+
+void MM_RM_RREstabRejProc(IntraL3Msg_t *rrInMsg);
+
+void MM_RM_RRRelIndProc(IntraL3Msg_t *rrInMsg);
+
+void MM_RM_MsgProc(IntraL3Msg_t *rrInMsg);
+
+
+#endif // MMRmMsgProc_H
diff --git a/data/mnet/GP10/Host/mm/include/MMSendMsg.h b/data/mnet/GP10/Host/mm/include/MMSendMsg.h
new file mode 100644
index 0000000..a008801
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/include/MMSendMsg.h
@@ -0,0 +1,50 @@
+#ifndef MMSendMsg_H
+#define MMSendMsg_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMSendMsg.h
+// Author(s) : Kevin Lim
+// Create Date : 07-26-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// function prototypes
+// *******************************************************************
+
+
+void buildMSMsgCommon();
+
+T_CNI_RIL3_RESULT sendMSMsg(T_CNI_LAPDM_OID oid,
+ T_CNI_LAPDM_SAPI sapi);
+
+void sendIntRRMsg( T_CNI_IRT_ID entryId,
+ IntraL3PrimitiveType_t prim,
+ IntraL3MsgType_t msgType);
+
+void sendIntRRDataMsg( T_CNI_IRT_ID entryId,
+ IntraL3PrimitiveType_t prim,
+ IntraL3MsgType_t msgType,
+ IntraL3MsgData_t l3_data);
+
+void sendIntCCMsg( short mmId,
+ IntraL3PrimitiveType_t prim,
+ IntraL3MsgType_t msgType);
+
+void bounceIntCCMsg(MSG_Q_ID msgQforCC,
+ IntraL3PrimitiveType_t prim,
+ IntraL3MsgType_t msgType);
+
+
+#endif // MMSendMsg_H
diff --git a/data/mnet/GP10/Host/mm/include/MMSysCmdProc.h b/data/mnet/GP10/Host/mm/include/MMSysCmdProc.h
new file mode 100644
index 0000000..16af83f
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/include/MMSysCmdProc.h
@@ -0,0 +1,33 @@
+#ifndef MMSysCmdProc_H
+#define MMSysCmdProc_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMSysCmdProc.h
+// Author(s) : Kevin Lim
+// Create Date : 07-26-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// function prototypes
+// *******************************************************************
+
+
+int SysCommand_MM(T_SYS_CMD action);
+
+MSG_Q_ID createMMMsgQ();
+
+
+
+#endif // MMSysCmdProc_H
diff --git a/data/mnet/GP10/Host/mm/include/MMTask.h b/data/mnet/GP10/Host/mm/include/MMTask.h
new file mode 100644
index 0000000..1d51e6e
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/include/MMTask.h
@@ -0,0 +1,30 @@
+#ifndef MMTask_H
+#define MMTask_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMTask.h
+// Author(s) : Kevin Lim
+// Create Date : 07-26-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// function prototypes
+// *******************************************************************
+
+void mmInitialize();
+void mmConnDataInit();
+
+
+#endif // MMTask_H
diff --git a/data/mnet/GP10/Host/mm/include/MMTimerProc.h b/data/mnet/GP10/Host/mm/include/MMTimerProc.h
new file mode 100644
index 0000000..450e167
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/include/MMTimerProc.h
@@ -0,0 +1,39 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMTimerProc.h
+// Author(s) : Kevin Lim
+// Create Date : 07-26-99
+// Description :
+//
+// *******************************************************************
+#ifndef MMTimerProc_H
+#define MMTimerProc_H
+
+extern MobilityConfigData mmCfg;
+
+// *******************************************************************
+// constant declarations
+// *******************************************************************
+
+const int mmPAGE_REQUEST = 1;
+const int mmAUTH_REQUEST = 2;
+const int mmMAX_PG_REQUEST = 2;
+const int mmIDENT_REQUEST = 3;
+const int mmPAGE_CC_REQUEST = 4;
+
+// *******************************************************************
+// function prototypes
+// *******************************************************************
+
+void MM_TIMER_MsgProc(IntraL3Msg_t *mmInMsg);
+
+#endif // MMTimerProc_H
diff --git a/data/mnet/GP10/Host/mm/include/MMTypes.h b/data/mnet/GP10/Host/mm/include/MMTypes.h
new file mode 100644
index 0000000..b9f3c53
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/include/MMTypes.h
@@ -0,0 +1,129 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMTypes.h
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description : message and ie interface among Application (Layer 3)
+// modules.
+//
+// *******************************************************************
+#ifndef MMTypes_H
+#define MMTypes_H
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// included L3 Message header for messages from other Layer 3 modules (CC, RR)
+#include "JCC/JCCL3Msg.h"
+
+// included MD and IRT headers for messages from MS
+#include "ril3/ril3md.h"
+
+// include Timer defs
+#include "jcc/JCCTimer.h"
+
+// include BSSGP defs
+#include "bssgp/bssgp_api.h"
+
+// *******************************************************************
+// forward declarations.
+// *******************************************************************
+
+//typedefs
+
+// Data Structures needed inside the MM Module
+
+typedef enum {
+
+ MM_PROC_NULL = 0,
+
+ MM_PROC_LUDB = 1,
+ MM_PROC_MOB_ORIG = 2,
+ MM_PROC_MOB_TERM = 3
+
+} MMProcedureType_t;
+
+typedef enum {
+
+ // COMMON
+ MM_START = 0,
+ MM_CLEAR_REQ,
+ MM_CONN_EST,
+ MM_EMERGENCY,
+
+ // Ciphering Authentication
+ MM_CIPHER_CMD,
+ MM_AUTH_LOCUP,
+ MM_AUTH_ORIG,
+ MM_AUTH_TERM,
+
+ // LUDB OPERATION
+ MM_WAIT4REG,
+ MM_WAIT4UNREG,
+ MM_WAIT4SPI,
+
+ // MOB_ORIG
+
+ // MOB_TERM
+ MM_PAGE_REQ,
+ MM_HAND_REQ,
+
+} MMState_t;
+
+typedef struct {
+ MMProcedureType_t procType;
+ MMState_t mmState;
+} MMProcedureData_t;
+
+typedef struct {
+ T_CNI_LAPDM_OID oid;
+ T_CNI_LAPDM_SAPI sapi;
+ T_CNI_IRT_ID entryId;
+ MMProcedureData_t procData;
+ IntraL3PageRequest_t pageReq;
+ T_CNI_RIL3MM_MSG_CM_SERVICE_REQUEST cmServReq;
+ T_CNI_RIL3RRM_MSG_PAGING_RESPONSE pageRsp;
+ MSG_Q_ID ccQId; // added for handover request/resp
+
+ bool free;
+
+ JCCTimer *pageTimer;
+ JCCTimer *pageCCTimer;
+ JCCTimer *authTimer;
+ JCCTimer *identTimer;
+ T_CNI_RIL3_IE_MOBILE_ID mobileId; // add mobile Id . -gz
+ short ludbId; // add ludbaId index. -gz
+ short emerg_ludb;
+ short mmId2;
+ char lup_cksn;
+ unsigned long pagingTick;
+ unsigned long locupTick;
+ T_CNI_RIL3_CAUSE_VALUE cause;
+
+ //SMS <xxu:06-01-00> Begin
+ int hoConn;
+ //SMS <xxu:06-01-00> End
+
+ int pageRetries; // Count the number of page re-tries, max = 3.
+ unsigned long vblinkReqId; // VBLINK Page request ID shmin 08/02/01
+
+ //GPRS combined location update Begin
+ bool gsInitiated;
+ BSSGP_BVCI bvci;
+ //GPRS combined location update End
+
+ } MMEntry_t;
+
+#endif // MMTypes_H
+
+
diff --git a/data/mnet/GP10/Host/mm/include/MMUtil.h b/data/mnet/GP10/Host/mm/include/MMUtil.h
new file mode 100644
index 0000000..9d043cb
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/include/MMUtil.h
@@ -0,0 +1,53 @@
+#ifndef MMUtil_H
+#define MMUtil_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMUtil.h
+// Author(s) : Kevin Lim
+// Create Date : 05-25-99
+// Description : MM module utilities
+//
+// *******************************************************************
+
+// *******************************************************************
+// function prototypes
+// *******************************************************************
+
+#include "ril3/ril3_common.h"
+
+void mmConnDataInit(void);
+void irtMMDataInit(void);
+short MM_FindIrtMMId(T_CNI_IRT_ID entryId);
+void mmDataInit(void);
+void entryPrint(MMEntry_t &mmEntry);
+void entryInit(MMEntry_t &mmEntry);
+short checkExistingEntry(const T_CNI_IRT_ID newEntryId);
+short getEntry(const T_CNI_RIL3_IE_MOBILE_ID &mobId);
+short getEntry(const short ludbId);
+short getMobileId(short mmId, T_CNI_RIL3_IE_MOBILE_ID &mobId);
+T_CNI_RIL3_IE_MOBILE_ID getMobileId(short mmId);
+short getMMId(const short ludbId);
+short entryAlloc();
+void entryDealloc(short i);
+
+void mmDataPrint(int number);
+char *getMMEntryState(short mmId);
+char *getMMProcStateString(MMProcedureType_t proc_type);
+char *getMMStateString(MMState_t state);
+char *getMMPrimStr(IntraL3PrimitiveType_t prim);
+char *getMMMsgTypeStr(IntraL3MsgType_t msgType);
+char *getRIL3MMTypeStr(T_CNI_RIL3_MESSAGE_TYPE msgType);
+char *getMMRejectCauseStr(T_CNI_RIL3_REJECT_CAUSE_VALUE cause);
+void mmBlank();
+
+#endif // MMUtil_H
diff --git a/data/mnet/GP10/Host/mm/include/MMVblinkMsgProc.h b/data/mnet/GP10/Host/mm/include/MMVblinkMsgProc.h
new file mode 100644
index 0000000..78e2ee3
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/include/MMVblinkMsgProc.h
@@ -0,0 +1,28 @@
+#ifndef MMVblinkMsgProc_H
+#define MMVblinkMsgProc_H
+
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMVBLINKMsgProc.h
+// Author(s) : Shawn Min
+// Create Date : 08-02-01
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// function prototypes
+// *******************************************************************
+
+void MM_VBLINK_MsgProc(VblinkMsg_t *vbInMsg);
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/mm/src/MMBssgpMsgProc.cpp b/data/mnet/GP10/Host/mm/src/MMBssgpMsgProc.cpp
new file mode 100644
index 0000000..5e6c8e8
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/src/MMBssgpMsgProc.cpp
@@ -0,0 +1,170 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMBssgpMsgProc.cpp
+// Author(s) :
+// Create Date : 12-18-2000
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "taskLib.h"
+#include "stdLib.h"
+#include "string.h"
+#include "tickLib.h"
+#include "LOGGING/vcmodules.h"
+#include "LOGGING/vclogging.h"
+#include "oam_api.h"
+#include "JCC/JCCUtil.h"
+#include "ril3/ril3_common.h"
+#include "JCC/LUDBapi.h"
+// included MD and IRT headers for messages from MS
+#if defined(_NO_ED) || defined(_SOFT_MOB)
+ #include "JCC/JCC_ED.h"
+#else
+ #define JCC_RIL3MM_Decode CNI_RIL3MM_Decode
+#endif
+
+// MM Message Constants
+#include "MMTypes.h"
+#include "MM/MMInt.h"
+#include "MMUtil.h"
+#include "MMMdMsgProc.h"
+#include "MMSendMsg.h"
+#include "MMPmProc.h"
+#include "MMLudbMsgProc.h"
+#include "MMRmMsgProc.h"
+
+// Global Variable for current MM Connections
+extern MMEntry_t mmEntries[];
+extern T_CNI_RIL3_IE_LOCATION_AREA_ID mmCfgLocId;
+
+
+char bssgpOutMsg[2048];
+
+
+// ****************************************************************************
+void MM_Bssgp_LocUpdateReqProc(BSSGP_LOCATION_UPDATE_MSG *locUpdReq)
+{
+ DBG_FUNC("MM_Bssgp_LocUpdateReqProc", MM_LAYER);
+ DBG_ENTER();
+
+ short mmId;
+
+ mmIncIMSIAttach(); // PM report
+ if (locUpdReq->imsi.mobileIdType != CNI_RIL3_IMSI)
+ {
+ DBG_ERROR("MM_Bssgp_LocUpdateReqProc: invalid mobileIdType %d\n ",
+ locUpdReq->imsi.mobileIdType);
+
+ DBG_LEAVE();
+ return;
+ }
+
+ if ( (mmId = entryAlloc()) == JCC_ERROR )
+ {
+ DBG_ERROR("MM_Bssgp_LocUpdateReqProc: entryAlloc Failed\n ");
+
+ DBG_LEAVE();
+ return;
+ }
+
+ mmEntries[mmId].procData.procType = MM_PROC_LUDB;
+ mmEntries[mmId].gsInitiated = TRUE;
+ mmEntries[mmId].bvci = locUpdReq->bvci.bvci;
+ mmEntries[mmId].mobileId = locUpdReq ->imsi;
+
+ mmIncTrnSubIdIMSI(); // PM report
+ sendMobileRegister(mmId);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_Bssgp_MsgProc(BSSGP_API_MSG *msg)
+{
+ DBG_FUNC("MM_Bssgp_MsgProc", MM_LAYER);
+ DBG_ENTER();
+
+ switch(msg->msg_type)
+ {
+ case BSSGP_API_MSG_LOCATION_UPDATE:
+ MM_Bssgp_LocUpdateReqProc(&msg->msg.location_update);
+ break;
+
+ default:
+ DBG_ERROR("Only BSSGP_API_MSG_LOCATION_UPDATE expected. Bad msg type: %d\n",
+ msg->msg_type);
+ }
+
+
+ DBG_LEAVE();
+}
+
+void MM_Bssgp_SendLuAccept(short mmId)
+{
+ BSSGP_API_MSG msg;
+ BSSGP_LOCATION_UPDATE_ACK_MSG &locationUpdateAck = msg.msg.location_update_ack;
+ locationUpdateAck.imsi = mmEntries[mmId].mobileId;
+ locationUpdateAck.location_area.ie_present = true;
+ locationUpdateAck.location_area.mcc[0] = mmCfgLocId.mcc[0];
+ locationUpdateAck.location_area.mcc[1] = mmCfgLocId.mcc[1];
+ locationUpdateAck.location_area.mcc[2] = mmCfgLocId.mcc[2];
+ locationUpdateAck.location_area.mnc[0] = mmCfgLocId.mnc[0];
+ locationUpdateAck.location_area.mnc[1] = mmCfgLocId.mnc[1];
+ locationUpdateAck.location_area.mnc[2] = mmCfgLocId.mnc[2];
+
+ locationUpdateAck.location_area.lac = mmCfgLocId.lac;
+
+#ifdef NOT_YET
+ bssgp_api_send_msg(msg);
+#endif
+}
+
+// ****************************************************************************
+int gmm_bssgp_msg_callback(BSSGP_API_MSG bssgpMsg)
+{
+ DBG_FUNC("gmm_bssgp_msg_callback", MM_LAYER);
+ DBG_ENTER();
+
+ if (bssgpMsg.msg_type != BSSGP_API_MSG_LOCATION_UPDATE)
+ {
+ DBG_ERROR("Only BSSGP_API_MSG_LOCATION_UPDATE expected. Bad msg type: %d\n",
+ bssgpMsg.msg_type);
+ DBG_LEAVE();
+ return 0;
+ }
+
+ bssgpOutMsg[0] = MODULE_BSSGP;
+ memcpy(&bssgpOutMsg[1], &bssgpMsg, sizeof(bssgpMsg));
+
+ // forward it to mm msg queue
+ if (ERROR == msgQSend(mmMsgQId,
+ (char *) bssgpOutMsg,
+ sizeof(BSSGP_API_MSG),
+ NO_WAIT, MSG_PRI_NORMAL)
+ )
+ {
+ DBG_ERROR("gmm_bssgp_msg_callback msgQSend (QID=%d) error\n", (int)mmMsgQId);
+ return 0;
+ }
+
+
+ DBG_LEAVE();
+ return TRUE;
+}
+
+
+
diff --git a/data/mnet/GP10/Host/mm/src/MMCcMsgProc.cpp b/data/mnet/GP10/Host/mm/src/MMCcMsgProc.cpp
new file mode 100644
index 0000000..8bd1805
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/src/MMCcMsgProc.cpp
@@ -0,0 +1,349 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMCcMsgProc.cpp
+// Author(s) : Kevin Lim
+// Create Date : 07-26-99
+// Description :
+//
+// *******************************************************************
+
+// #define DEBUG_MM_HANDOVER
+// #define DEBUG_MM_HANDOVER_EFR
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "taskLib.h"
+#include "stdLib.h"
+#include "string.h"
+#include "tickLib.h"
+
+#include "LOGGING/vcmodules.h"
+#include "LOGGING/vclogging.h"
+#include "oam_api.h"
+
+// included L3 Message header for messages from other Layer 3 modules (CC, RR)
+#include "JCC/JCCL3Msg.h"
+
+#include "JCC/JCCUtil.h"
+#include "JCC/LUDBApi.h"
+
+// MM Message Constants
+#include "MMTypes.h"
+#include "MM/MMInt.h"
+#include "MMUtil.h"
+#include "MMSendMsg.h"
+#include "MMCcMsgProc.h"
+#include "MMPmProc.h"
+#include "MMLudbMsgProc.h"
+#include "MMTimerProc.h"
+#include "MMRmMsgProc.h"
+
+// OAM Config Data
+extern MobilityConfigData mmCfg;
+extern Boolean mmOpStatus;
+
+// Global Variable for current MM Connections
+extern MMEntry_t mmEntries[];
+
+extern IntraL3Msg_t mmToRROutMsg; // msg buffer - internal modules
+
+
+// ****************************************************************************
+void sendPageReqToRRM(short mmId)
+{
+ DBG_FUNC("sendPageReqToRRM", MM_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("sending PageReq for mmId: %d(new)\n", mmId);
+ mmEntries[mmId].procData.procType = MM_PROC_MOB_TERM;
+ mmEntries[mmId].procData.mmState = MM_PAGE_REQ;
+
+ // Setup page timer
+// mmEntries[mmId].pageTimer->setTimer(mmCfg.mm_paging_t3113);
+// mmEntries[mmId].pagingTick = tickGet();
+
+ // No entry Id in the IRT table assigned yet.
+ mmToRROutMsg.l3_data.pageReq = mmEntries[mmId].pageReq;
+ sendIntRRMsg(CNI_IRT_NULL_ID, INTRA_L3_RR_EST_REQ, INTRA_L3_RR_PAGE_REQ);
+
+ mmIncAttTrnPaging(); // PM report
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+// important! mmId should be valid at this point
+void MMPageReqCleanUp(short mmId)
+{
+ DBG_FUNC("MMPageReqCleanUp", MM_LAYER);
+ DBG_ENTER();
+ bounceIntCCMsg(mmEntries[mmId].ccQId,
+ INTRA_L3_MM_EST_REJ, INTRA_L3_RR_PAGE_REQ);
+ entryDealloc(mmId);
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+// Note: For sendLocUpInPageReq, mmId will be referenced for PageReq
+
+short sendLocUpInPageReq(T_CNI_RIL3_IE_MOBILE_ID mobileId, short mmId)
+{
+ DBG_FUNC("sendLocUpInPageReq", MM_LAYER);
+ DBG_ENTER();
+ mmEntries[mmId].mmId2 = -1;
+ mmEntries[mmId].procData.procType = MM_PROC_MOB_TERM;
+ mmEntries[mmId].procData.mmState = MM_WAIT4REG;
+ mmEntries[mmId].mobileId = mobileId;
+ mmEntries[mmId].lup_cksn = 0x07;
+ if(sendMobileRegReqToLudb(mobileId, mmId)){
+ DBG_TRACE("LocUpInPageReq sent to Ludb successful for MM Id %d\n", mmId);
+ DBG_LEAVE();
+ return 0;
+ }
+ else{
+ DBG_ERROR("LocUpInPageReq send failed for MM Id %d\n", mmId);
+ MMPageReqCleanUp(mmId);
+ DBG_LEAVE();
+ return -1;
+ }
+}
+
+// ****************************************************************************
+// Terminating Call
+// Create a new MM entry.
+// Request to RR to Page the terminating mobile.
+// ****************************************************************************
+/*
+void MM_CC_PageReqProc(IntraL3Msg_t *ccInMsg)
+{
+ DBG_FUNC("MM_CC_PageReqProc", MM_LAYER);
+ DBG_ENTER();
+ // The connection entry for MM
+ short mmId;
+ short existInLudb = 0;
+
+ // check if mobile is registered with LUDB.
+ short ludbId = ludbGetEntryByMobileId(ccInMsg->l3_data.pageReq.imsi);
+ if( ludbId != JCC_ERROR){ // found in LUDB
+ existInLudb = 1;
+ }
+
+ if(!mmOpStatus){
+ DBG_WARNING("[MM] terminating call ignored due to BTS operational status\n");
+ bounceIntCCMsg(ccInMsg->l3_data.pageReq.qid,
+ INTRA_L3_MM_EST_REJ, INTRA_L3_RR_PAGE_REQ);
+ DBG_LEAVE();
+ return;
+ }
+
+ if ( (mmId = entryAlloc()) == JCC_ERROR )
+ {
+ DBG_ERROR("entryAlloc Failed\n ");
+ // Internal no resources action - send est rej.
+ // No entry Id in the IRT table assigned yet. Echo back the Page Req.
+ bounceIntCCMsg(ccInMsg->l3_data.pageReq.qid,
+ INTRA_L3_MM_EST_REJ, INTRA_L3_RR_PAGE_REQ);
+ DBG_LEAVE();
+ return;
+ }
+
+ mmEntries[mmId].pageReq = ccInMsg ->l3_data.pageReq;
+ mmEntries[mmId].ccQId = ccInMsg->l3_data.pageReq.qid;
+
+ if(!existInLudb){
+ sendLocUpInPageReq(ccInMsg->l3_data.pageReq.imsi, mmId);
+ DBG_LEAVE();
+ return;
+ }
+ else
+ mmEntries[mmId].ludbId = ludbId;
+
+ sendPageReqToRRM(mmId);
+
+ DBG_LEAVE();
+}
+*/
+void MM_CC_PageReqProc(IntraL3Msg_t *ccInMsg)
+{
+ DBG_FUNC("MM_CC_PageReqProc", MM_LAYER);
+ DBG_ENTER();
+
+ short mmId;
+
+ if ((mmId = getEntry(ccInMsg->l3_data.pageReq.imsi)) == JCC_ERROR)
+ {
+ // Cleanup action - May need manual
+ // send the clear request to the RRM -
+ // PROBLEM
+ //sendIntRRMsg (rrInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ //
+
+ bounceIntCCMsg(ccInMsg->l3_data.pageReq.qid,
+ INTRA_L3_MM_EST_REJ, INTRA_L3_RR_PAGE_REQ);
+
+ DBG_WARNING("Unexpected/Late CC Page Req!!!n")
+ DBG_HEXDUMP(ccInMsg->l3_data.pageReq.imsi.digits, 8);
+ DBG_LEAVE();
+ return;
+ }
+
+ mmEntries[mmId].pageTimer->cancelTimer();
+
+ mmEntries[mmId].pageReq = ccInMsg->l3_data.pageReq;
+ mmEntries[mmId].ccQId = ccInMsg->l3_data.pageReq.qid;
+
+ MMProceedRRPageRspToCC(mmId);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+// Handover Target Call
+// Create a new MM entry.
+// Request to RR for Handover request.
+// ****************************************************************************
+void MM_CC_HOReqProc(IntraL3Msg_t *ccInMsg)
+{
+ DBG_FUNC("MM_CC_HOReqProc", MM_LAYER);
+ DBG_ENTER();
+ // The connection entry for MM
+ short mmId;
+
+ if(!mmOpStatus){
+ DBG_WARNING("[MM] handover call ignored due to BTS operational status\n");
+ bounceIntCCMsg(ccInMsg->l3_data.handReq.qid,
+ INTRA_L3_MM_EST_REJ, INTRA_L3_RR_HANDOVER_REQ);
+ DBG_LEAVE();
+ return;
+ }
+
+ if ( (mmId = entryAlloc()) == JCC_ERROR )
+ {
+ DBG_ERROR("entryAlloc Failed\n ");
+ // Internal no resources action - send est rej.
+ // No entry Id in the IRT table assigned yet. Echo back the Page Req.
+ bounceIntCCMsg(ccInMsg->l3_data.handReq.qid,
+ INTRA_L3_MM_EST_REJ, INTRA_L3_RR_HANDOVER_REQ);
+ DBG_LEAVE();
+ return;
+ }
+
+ mmEntries[mmId].ccQId = ccInMsg ->l3_data.handReq.qid;
+ mmEntries[mmId].procData.procType = MM_PROC_MOB_TERM;
+ mmEntries[mmId].procData.mmState = MM_HAND_REQ;
+
+ mmToRROutMsg.l3_data = ccInMsg->l3_data;
+ // replace union qid with mmId which we need when response comes back.
+ mmToRROutMsg.l3_data.handReq.mmId = mmId;
+
+#ifdef DEBUG_MM_HANDOVER_EFR
+ printf("[MM] Recv Handover Req from CC - speech version: %d\n",
+ mmToRROutMsg.l3_data.handReq.channelType.speechChann.version);
+#endif
+
+ // No entry Id in the IRT table assigned yet.
+ sendIntRRMsg(CNI_IRT_NULL_ID, INTRA_L3_RR_EST_REQ, INTRA_L3_RR_HANDOVER_REQ);
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+// For mobile termination call, or handover target
+// ****************************************************************************
+void MM_CC_MMEstabReqProc(IntraL3Msg_t *ccInMsg)
+{
+ DBG_FUNC("MM_CC_MMEstabReqProc", MM_LAYER);
+ DBG_ENTER();
+ switch(ccInMsg->message_type){
+ case INTRA_L3_MM_LOCATE_MS:
+ DBG_TRACE("Page Request Received.\n");
+ MM_CC_PageReqProc(ccInMsg);
+ break;
+ case INTRA_L3_RR_HANDOVER_REQ:
+ DBG_TRACE("HandOver Request Received.\n");
+ MM_CC_HOReqProc(ccInMsg);
+ break;
+ default:
+ DBG_ERROR("Unexpected Msg. from CC, Msg Type: %d\n",
+ ccInMsg->message_type);
+ }
+ DBG_LEAVE();
+}
+
+
+// ****************************************************************************
+void MM_CC_MMRelReqProc(IntraL3Msg_t *ccInMsg)
+{
+ DBG_FUNC("MM_CC_MMRelReqProc", MM_LAYER);
+ DBG_ENTER();
+ T_CNI_L3_ID irtMMId;
+ // The connection entry for MM
+ short mmId;
+
+ if ((irtMMId = CNI_RIL3_IRT_Get_MM_Id(ccInMsg->entry_id)) == CNI_NULL_L3_ID ) {
+ DBG_ERROR("IRT Table Problem, entry_id: %d\n", ccInMsg->entry_id);
+ DBG_WARNING("Release Request from CC aborted\n");
+ DBG_LEAVE();
+ return;
+ }
+ else
+ {
+ mmId = irtMMId.sub_id;
+
+ // Check validity of the MM Id.
+ if ((mmId < 0) || (mmId >= mmCfg.mm_max_mm_connections))
+ {
+ DBG_WARNING("Unexpected/Late CCRelReq, entry_id: %d\n", ccInMsg->entry_id);
+ DBG_LEAVE();
+ return;
+ }
+
+ // Now send the clear request to the RRM -
+ sendIntRRMsg (ccInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ }
+
+ if(mmEntries[mmId].procData.procType == MM_PROC_MOB_ORIG){
+ if(mmEntries[mmId].emerg_ludb){
+ sendRemoveEmergencyToLudb(mmId);
+ }
+ }
+ // Deallocate the MM entry
+ entryDealloc(mmId);
+ DBG_LEAVE();
+}
+
+
+// ****************************************************************************
+void MM_CC_MsgProc(IntraL3Msg_t *ccInMsg)
+{
+ DBG_FUNC("MM_CC_MsgProc", MM_LAYER);
+ DBG_ENTER();
+
+ switch (ccInMsg->primitive_type)
+ {
+ case INTRA_L3_MM_EST_REQ:
+ DBG_TRACE("Received CC->MM - Estab Request\n");
+ MM_CC_MMEstabReqProc(ccInMsg);
+ break;
+
+ case INTRA_L3_MM_REL_REQ:
+ DBG_TRACE("Received CC->MM - Release Request, entry_id: %d\n",
+ ccInMsg->entry_id);
+ MM_CC_MMRelReqProc(ccInMsg);
+ break;
+
+ default:
+ DBG_ERROR("Unexpected Msg Primitive from CC: %d\n",
+ ccInMsg->primitive_type);
+ }
+ DBG_LEAVE();
+}
diff --git a/data/mnet/GP10/Host/mm/src/MMConfig.cpp b/data/mnet/GP10/Host/mm/src/MMConfig.cpp
new file mode 100644
index 0000000..776bc02
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/src/MMConfig.cpp
@@ -0,0 +1,314 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMConfig.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "oam_api.h"
+#include "LOGGING/vcmodules.h"
+#include "LOGGING/vclogging.h"
+#include "MnetModuleId.h"
+#include "ril3/ie_location_area_id.h"
+#include "MM/mmConfig.h"
+
+#include "sysLib.h"
+
+// Global variable
+extern MSG_Q_ID mmMsgQId;
+extern MobilityConfigData mmCfg;
+extern T_CNI_RIL3_IE_LOCATION_AREA_ID mmCfgLocId;
+extern short ludb_auth_required;
+extern int mmCfgIMSIrequired;
+
+void mmConfigPrint()
+{
+ DBG_FUNC("MMConfigPrint", MM_LAYER);
+ DBG_ENTER();
+ DBG_TRACE(" MM OAM Config Data ---------------------------------------------------------\n");
+ DBG_TRACE("mm_max_mm_connections \t\t:%d\n",mmCfg.mm_max_mm_connections);
+ DBG_TRACE("mm_paging_t3113 \t\t\t:%d\n",mmCfg.mm_paging_t3113);
+ DBG_TRACE("authenticationRequired \t:%d\n",ludb_auth_required);
+ DBG_TRACE("mm_cipheringRequired \t\t:%d\n",mmCfg.mm_cipheringRequired);
+ DBG_TRACE("mm_IMEICheckRequired \t\t:%d\n",mmCfg.mm_IMEICheckRequired);
+ DBG_TRACE("mcc \t\t:%x%x%x\n",mmCfgLocId.mcc[0], mmCfgLocId.mcc[1], mmCfgLocId.mcc[2]);
+ DBG_TRACE("mnc \t\t:%x%x\n",mmCfgLocId.mnc[0], mmCfgLocId.mnc[1],mmCfgLocId.mnc[2] );
+ DBG_TRACE("lac \t\t:%d\n",mmCfgLocId.lac);
+ DBG_TRACE("-----------------------------------------------------------------------------\n");
+ printf(" MM OAM Config Data ---------------------------------------------------------\n");
+ printf("mm_max_mm_connections \t\t:%d\n",mmCfg.mm_max_mm_connections);
+ printf("mm_paging_t3113 \t\t\t:%d\n",mmCfg.mm_paging_t3113);
+ printf("authenticationRequired \t:%d\n",ludb_auth_required);
+ printf("mm_cipheringRequired \t\t:%d\n",mmCfg.mm_cipheringRequired);
+ printf("mm_IMEICheckRequired \t\t:%d\n",mmCfg.mm_IMEICheckRequired);
+ printf("mcc \t\t:%x%x%x\n",mmCfgLocId.mcc[0], mmCfgLocId.mcc[1], mmCfgLocId.mcc[2]);
+ printf("mnc \t\t:%x%x\n",mmCfgLocId.mnc[0], mmCfgLocId.mnc[1],mmCfgLocId.mnc[2]);
+ printf("lac \t\t:%d\n",mmCfgLocId.lac);
+ printf("-----------------------------------------------------------------------------\n");
+ DBG_LEAVE();
+}
+
+void mmCfgSetIMSIRequired(INT_32_T val)
+{
+ mmCfgIMSIrequired = (int)val;
+}
+
+void mmCfgSetMaxMMConnections(INT_32_T val)
+{
+ mmCfg.mm_max_mm_connections = val;
+}
+
+void mmCfgSetPagingT3113(INT_32_T val)
+{
+ mmCfg.mm_paging_t3113 = (val * sysClkRateGet()) / 100; // convert 10ms to tick
+}
+
+void mmCfgSetAuthenticationRequired(INT_32_T val)
+{
+ ludb_auth_required = (short)val;
+}
+
+void mmCfgSetCipheringRequired(INT_32_T val)
+{
+ mmCfg.mm_cipheringRequired = (Boolean_t)val;
+}
+
+void mmCfgSetIMEICheckRequired(INT_32_T val)
+{
+ mmCfg.mm_IMEICheckRequired = (Boolean_t)val;
+}
+
+void mmConvertMCC(INT_32_T oam_mcc)
+{
+ DBG_FUNC("mmConvertMCC", MM_LAYER);
+ DBG_ENTER();
+ STATUS ret = getByteAryByInt(oam_mcc, mmCfgLocId.mcc, 3);
+ if(ret != STATUS_OK){
+ DBG_ERROR("getByteAryByInt returned err :%d\n", ret);
+ DBG_ERROR("MCC restored with default values.\n");
+ mmCfgLocId.mcc[0] = MM_DEFAULT_BTS_MCC[0];
+ mmCfgLocId.mcc[1] = MM_DEFAULT_BTS_MCC[1];
+ mmCfgLocId.mcc[2] = MM_DEFAULT_BTS_MCC[2];
+ }
+ DBG_LEAVE();
+}
+
+void mmConvertMNC(INT_32_T oam_mnc)
+{
+ DBG_FUNC("mmConvertMNC", MM_LAYER);
+ DBG_ENTER();
+// STATUS ret = getByteAryByInt(oam_mnc, mmCfgLocId.mnc, 2);
+
+ STATUS ret = oam_getMnc((unsigned char *)mmCfgLocId.mnc);
+ if(ret != STATUS_OK){
+ DBG_ERROR("getByteAryByInt returned err :%d\n", ret);
+ DBG_ERROR("MNC restored with default values.\n");
+ mmCfgLocId.mnc[0] = MM_DEFAULT_BTS_MNC[0];
+ mmCfgLocId.mnc[1] = MM_DEFAULT_BTS_MNC[1];
+ mmCfgLocId.mnc[2] = MM_DEFAULT_BTS_MNC[2];
+ }
+ DBG_LEAVE();
+}
+
+void mmConvertLAC(INT_32_T oam_lac)
+{
+ DBG_FUNC("mmConvertLAC", MM_LAYER);
+ DBG_ENTER();
+ if(oam_lac > 0xFFFF){
+ DBG_ERROR("oam_lac value too big\n");
+ DBG_ERROR("LAC restored with default values.\n");
+ mmCfgLocId.lac = MM_DEFAULT_BTS_LAC;
+ }
+ else{
+ mmCfgLocId.lac = oam_lac;
+ }
+ DBG_LEAVE();
+}
+
+void mmSetOAMTraps()
+{
+ DBG_FUNC("mmSetOAMTraps", MM_LAYER);
+ DBG_ENTER();
+ STATUS oamStatus;
+
+/*
+ if((oamStatus = oam_setTrap(MODULE_MM, mmMsgQId, MIB_mm_max_mm_connections))
+ != STATUS_OK){
+ DBG_ERROR("oam_setTrap failed (stauts=%d) on MIB_mm_max_mm_connections\n", oamStatus);
+ }
+*/
+ if((oamStatus = oam_setTrap(MODULE_MM, mmMsgQId, MIB_t3113))
+ != STATUS_OK){
+ DBG_ERROR("oam_setTrap failed (stauts=%d) on MIB_t3113\n", oamStatus);
+ }
+ if((oamStatus = oam_setTrap(MODULE_MM, mmMsgQId, MIB_mm_authenticationRequired))
+ != STATUS_OK){
+ DBG_ERROR("oam_setTrap failed (stauts=%d) on MIB_mm_authenticationRequired\n", oamStatus);
+ }
+ if((oamStatus = oam_setTrap(MODULE_MM, mmMsgQId, MIB_mm_cipheringRequired))
+ != STATUS_OK){
+ DBG_ERROR("oam_setTrap failed (stauts=%d) on MIB_mm_cipheringRequired\n", oamStatus);
+ }
+ if((oamStatus = oam_setTrap(MODULE_MM, mmMsgQId, MIB_mm_IMEICheckRequired))
+ != STATUS_OK){
+ DBG_ERROR("oam_setTrap failed (stauts=%d) on MIB_mm_IMEICheckRequired\n", oamStatus);
+ }
+ if((oamStatus = oam_setTrap(MODULE_MM, mmMsgQId, MIB_rm_nim_1_0))
+ != STATUS_OK){
+ DBG_ERROR("oam_setTrap failed (stauts=%d) on MIB_rm_nim_1_0\n", oamStatus);
+ }
+ if((oamStatus = oam_setTrap(MODULE_MM, mmMsgQId, MIB_bts_mcc))
+ != STATUS_OK){
+ DBG_ERROR("oam_setTrap failed (stauts=%d) on MIB_mm_mcc\n", oamStatus);
+ }
+ if((oamStatus = oam_setTrap(MODULE_MM, mmMsgQId, MIB_bts_mnc))
+ != STATUS_OK){
+ DBG_ERROR("oam_setTrap failed (stauts=%d) on MIB_mm_mnc\n", oamStatus);
+ }
+ if((oamStatus = oam_setTrap(MODULE_MM, mmMsgQId, MIB_bts_lac))
+ != STATUS_OK){
+ DBG_ERROR("oam_setTrap failed (stauts=%d) on MIB_bts_lac\n", oamStatus);
+ }
+ if((oamStatus = oam_setTrap(MODULE_MM, mmMsgQId, MIB_bts_operationalState))
+ != STATUS_OK){
+ DBG_ERROR("oam_setTrap failed (stauts=%d) on MIB_bts_operationalState\n", oamStatus);
+ }
+ DBG_LEAVE();
+}
+
+void mmCfgRead()
+{
+ INT_32_T oam_t3113, oam_auth, oam_ciph, oam_imei;
+ INT_32_T oam_mcc, oam_mnc, oam_lac;
+ INT_32_T oam_imsi_required;
+ DBG_FUNC("mmCfgRead", MM_LAYER);
+ DBG_ENTER();
+
+ STATUS ret;
+
+ mmCfgSetMaxMMConnections(MM_DEFAULT_MAX_MM_CONNECTION);
+
+ if(ret = oam_getMibIntVar(MIB_t3113, &oam_t3113)){
+ DBG_ERROR("Failed to initialize mm_paging_t3113 with OAM:%d\n", ret);
+ DBG_ERROR("Initialized with hard coded default values.\n");
+ mmCfgSetPagingT3113(MM_DEFAULT_PAGING_T3113);
+ }
+ else{
+ mmCfgSetPagingT3113(oam_t3113);
+ }
+
+ if(ret = oam_getMibIntVar(MIB_mm_authenticationRequired, &oam_auth)){
+ DBG_ERROR("Failed to initialize mm_authenticationRequired with OAM:%d\n", ret);
+ DBG_ERROR("Initialized with hard coded default values.\n");
+ mmCfgSetAuthenticationRequired(MM_DEFAULT_AUTHENTICATION_REQUIRED);
+ }
+ else{
+ mmCfgSetAuthenticationRequired(oam_auth);
+ }
+
+ if(ret = oam_getMibIntVar(MIB_mm_cipheringRequired, &oam_ciph)){
+ DBG_ERROR("Failed to initialize mm_cipheringRequired with OAM:%d\n", ret);
+ DBG_ERROR("Initialized with hard coded default values.\n");
+ mmCfgSetCipheringRequired(MM_DEFAULT_CIPHERING_REQUIRED);
+ }
+ else{
+ mmCfgSetCipheringRequired(oam_ciph);
+ }
+
+ if(ret = oam_getMibIntVar(MIB_mm_IMEICheckRequired, &oam_imei)){
+ DBG_ERROR("Failed to initialize mm_IMEICheckRequired with OAM:%d\n", ret);
+ DBG_ERROR("Initialized with hard coded default values.\n");
+ mmCfgSetIMEICheckRequired(MM_DEFAULT_IMEI_CHECK_REQUIRED);
+ }
+ else{
+ mmCfgSetIMEICheckRequired(oam_imei);
+ }
+
+ if(ret = oam_getMibIntVar(MIB_rm_nim_1_0, &oam_imsi_required)){
+ DBG_ERROR("Failed to initialize mm_IMSIRequired with OAM:%d\n", ret);
+ DBG_ERROR("Initialized with hard coded default values.\n");
+ mmCfgSetIMSIRequired(0);
+ }
+ else{
+ mmCfgSetIMSIRequired(oam_imsi_required);
+ }
+
+ DBG_TRACE("mm_max_mm_connections \t\t:%d\n",mmCfg.mm_max_mm_connections);
+ DBG_TRACE("mm_paging_t3113 \t\t\t:%d\n",mmCfg.mm_paging_t3113);
+ DBG_TRACE("authenticationRequired \t:%d\n",ludb_auth_required);
+ DBG_TRACE("mm_cipheringRequired \t\t:%d\n",mmCfg.mm_cipheringRequired);
+ DBG_TRACE("mm_IMEICheckRequired \t\t:%d\n",mmCfg.mm_IMEICheckRequired);
+
+ if(ret = getMibIntVar(MIB_bts_mcc, &oam_mcc)){
+ DBG_ERROR("Failed to initialize mcc value with OAM:%d\n", ret);
+ DBG_ERROR("Initialized with hard coded default values.\n");
+ mmCfgLocId.mcc[0] = MM_DEFAULT_BTS_MCC[0];
+ mmCfgLocId.mcc[1] = MM_DEFAULT_BTS_MCC[1];
+ mmCfgLocId.mcc[2] = MM_DEFAULT_BTS_MCC[2];
+ }
+ else {
+ mmConvertMCC(oam_mcc);
+ DBG_TRACE("Reading mcc from OAM completed\n");
+ }
+ DBG_TRACE("mcc \t\t:%x%x%x\n",mmCfgLocId.mcc[0], mmCfgLocId.mcc[1], mmCfgLocId.mcc[2]);
+
+// if(ret = getMibIntVar(MIB_bts_mnc, &oam_mnc)){
+ if(ret = oam_getMnc((unsigned char *)mmCfgLocId.mnc)){
+ DBG_ERROR("Failed to initialize mnc value with OAM:%d\n", ret);
+ DBG_ERROR("Initialized with hard coded default values.\n");
+ mmCfgLocId.mnc[0] = MM_DEFAULT_BTS_MNC[0];
+ mmCfgLocId.mnc[1] = MM_DEFAULT_BTS_MNC[1];
+ mmCfgLocId.mnc[2] = MM_DEFAULT_BTS_MNC[2];
+ }
+ else {
+ mmConvertMNC(oam_mnc);
+ DBG_TRACE("Reading mnc from OAM completed\n");
+ }
+ DBG_TRACE("mnc \t\t:%x%x\n",mmCfgLocId.mnc[0], mmCfgLocId.mnc[1], mmCfgLocId.mnc[2]);
+
+ if(ret = getMibIntVar(MIB_bts_lac, &oam_lac)){
+ DBG_ERROR("Failed to initialize lac value with OAM:%d\n", ret);
+ DBG_ERROR("Initialized with hard coded default values.\n");
+ mmCfgLocId.lac = MM_DEFAULT_BTS_LAC;
+ }
+ else {
+ mmConvertLAC(oam_lac);
+ DBG_TRACE("Reading lac from OAM completed\n");
+ }
+ DBG_TRACE("lac \t\t:%d\n",mmCfgLocId.lac);
+
+ mmSetOAMTraps();
+
+ DBG_LEAVE();
+}
+
+bool mmIsAuthenticationRequired()
+{
+ return((bool)ludb_auth_required);
+}
+
+bool mmIsCipheringRequired()
+{
+ return((bool)mmCfg.mm_cipheringRequired);
+}
+
+bool mmIsIMEICheckRequired()
+{
+ return((bool)mmCfg.mm_IMEICheckRequired);
+}
+
diff --git a/data/mnet/GP10/Host/mm/src/MMLudbMsgProc.cpp b/data/mnet/GP10/Host/mm/src/MMLudbMsgProc.cpp
new file mode 100644
index 0000000..789e8ab
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/src/MMLudbMsgProc.cpp
@@ -0,0 +1,518 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMLudbMsgProc.cpp
+// Author(s) : Kevin Lim
+// Create Date : 08-09-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+#include "taskLib.h"
+#include "tickLib.h"
+
+#include "LOGGING/vclogging.h"
+#include "LOGGING/vcmodules.h"
+
+#include "ril3/ril3_common.h"
+
+#include "JCC/LUDBConfig.h"
+#include "JCC/LUDBMmMsgProc.h"
+
+#include "MMTypes.h"
+#include "MMUtil.h"
+#include "MMMdMsgProc.h"
+#include "MMCCMsgProc.h"
+#include "MMSendMsg.h"
+#include "MMLudbMsgProc.h"
+#include "MMPmProc.h"
+#include "MMRmMsgProc.h"
+#include "MMBssgpMsgProc.h"
+
+
+// Global Variable for current MM Connections
+extern MMEntry_t mmEntries[];
+extern MSG_Q_ID ludbMsgQId;
+extern short ludb_auth_required;
+
+// ****************************************************************************
+bool sendMMRequestToLudb(LudbMsgStruct *request)
+{
+ DBG_FUNC("mmSendMessageToLudb", MM_LAYER);
+ DBG_ENTER();
+
+ request->module_id = MODULE_MM;
+ STATUS stat = msgQSend(ludbMsgQId, (char *) request,
+ sizeof(LudbMsgStruct),
+ NO_WAIT, MSG_PRI_NORMAL);
+ if(stat == ERROR){
+ DBG_ERROR("msgQSend Error\n");
+ DBG_LEAVE();
+ return false;
+ }
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+bool sendCipherCmdRecordToLudb(short mmId, short algo)
+{
+ DBG_FUNC("sendCipherCmdRecordToLudb", MM_LAYER);
+ DBG_ENTER();
+
+ LudbMsgStruct LudbRequest;
+ LudbRequest.msg_type = LUDB_MM_CIPHER_SET;
+ LudbRequest.mm_id = mmId;
+ LudbRequest.ludb_id = mmEntries[mmId].ludbId;
+ LudbRequest.algo = algo;
+
+ bool status = sendMMRequestToLudb(&LudbRequest);
+ if(!status) {
+ DBG_ERROR("Security Info Request send unsuccessful\n");
+ DBG_LEAVE();
+ return false;
+ }
+
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+bool sendMobileSecInfoReqToLudb(short mmId, short ludbId)
+{
+ DBG_FUNC("sendMobileSecInfoReqToLudb", MM_LAYER);
+ DBG_ENTER();
+
+ LudbMsgStruct LudbRequest;
+ LudbRequest.msg_type = LUDB_MM_SEC_REQ;
+ LudbRequest.mm_id = mmId;
+ LudbRequest.ludb_id = ludbId;
+
+ bool status = sendMMRequestToLudb(&LudbRequest);
+ if(!status) {
+ DBG_ERROR("Security Info Request send unsuccessful\n");
+ DBG_LEAVE();
+ return false;
+ }
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+bool sendMobileRegReqToLudb( T_CNI_RIL3_IE_MOBILE_ID& mobileId, short mmId)
+{
+ DBG_FUNC("sendMobileRegReqToLudb", MM_LAYER);
+ DBG_ENTER();
+
+ LudbMsgStruct LudbRequest;
+ LudbRequest.msg_type = LUDB_MM_REG_REQ;
+ LudbRequest.mobile_id = mobileId;
+ LudbRequest.mm_id = mmId;
+
+ bool status = sendMMRequestToLudb(&LudbRequest);
+ if(!status) {
+ DBG_ERROR("Registration send unsuccessful\n");
+ DBG_LEAVE();
+ return false;
+ }
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+bool sendMobileUnRegReqToLudb( T_CNI_RIL3_IE_MOBILE_ID& mobileId, short mmId)
+{
+ DBG_FUNC("sendMobileUnRegReqToLudb", MM_LAYER);
+ DBG_ENTER();
+
+ LudbMsgStruct LudbRequest;
+ LudbRequest.msg_type = LUDB_MM_UNREG_REQ;
+ LudbRequest.mobile_id = mobileId;
+ LudbRequest.mm_id = mmId;
+
+ bool status = sendMMRequestToLudb(&LudbRequest);
+ if(!status) {
+ DBG_ERROR("UnRegistration send unsuccessful\n");
+ DBG_LEAVE();
+ return false;
+ }
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+bool sendInsertEmergencyToLudb(short mmId)
+{
+ DBG_FUNC("sendInsertEmergencyToLudb", MM_LAYER);
+ DBG_ENTER();
+
+ LudbMsgStruct LudbRequest;
+ LudbRequest.msg_type = LUDB_MM_EMERG_REQ;
+ LudbRequest.mobile_id = mmEntries[mmId].mobileId;
+ LudbRequest.mm_id = mmId;
+
+ bool status = sendMMRequestToLudb(&LudbRequest);
+ if(!status) {
+ DBG_ERROR("UnRegistration send unsuccessful\n");
+ DBG_LEAVE();
+ return false;
+ }
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+bool sendRemoveEmergencyToLudb(short mmId)
+{
+ DBG_FUNC("sendRemoveEmergencyToLudb", MM_LAYER);
+ DBG_ENTER();
+
+ LudbMsgStruct LudbRequest;
+ LudbRequest.msg_type = LUDB_MM_REM_EMERG_REQ;
+ LudbRequest.mm_id = mmId;
+ LudbRequest.ludb_id = mmEntries[mmId].ludbId;
+
+ bool status = sendMMRequestToLudb(&LudbRequest);
+ if(!status) {
+ DBG_ERROR("UnRegistration send unsuccessful\n");
+ DBG_LEAVE();
+ return false;
+ }
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+void MM_Ludb_EmergRspProc(short mmId, short ludbId)
+{
+ DBG_FUNC("MM_Ludb_EmergRspProc", MM_LAYER);
+ DBG_ENTER();
+ if(mmEntries[mmId].procData.procType == MM_PROC_MOB_ORIG){
+ if(mmEntries[mmId].procData.mmState == MM_EMERGENCY){
+ mmEntries[mmId].ludbId = ludbId;
+ mmEntries[mmId].emerg_ludb = 1;
+ MMProceedCMServiceReqAccept(mmId);
+ DBG_LEAVE();
+ return;
+ }
+ }
+
+ DBG_ERROR("Invalid procData.procType(%d) on LUDB EmergRsp\n",
+ mmEntries[mmId].procData.procType);
+ DBG_ERROR("Or Invalid procData.mmState(%d) on LUDB EmergRsp\n",
+ mmEntries[mmId].procData.mmState);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_Ludb_RelReqProc(short mmId)
+{
+ DBG_FUNC("MM_Ludb_RelReqProc", MM_LAYER);
+ DBG_ENTER();
+
+ sendIntRRMsg (mmEntries[mmId].entryId, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ entryDealloc(mmId);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_Ludb_CipherSetProc(short mmId, short ludbId, short algo)
+{
+ DBG_FUNC("MM_Ludb_CipherSetProc", MM_LAYER);
+ DBG_ENTER();
+
+ ludbSetCipherAlgo(ludbId, algo);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_Ludb_SecRspProc(short mmId, short ludbId)
+{
+ DBG_FUNC("MM_Ludb_SecRspProc", MM_LAYER);
+ DBG_ENTER();
+ switch(mmEntries[mmId].procData.procType){
+ case MM_PROC_MOB_ORIG:
+ mmEntries[mmId].procData.mmState = MM_AUTH_ORIG;
+ sendAuthReqToMobile(mmId, ludbId);
+ break;
+
+ case MM_PROC_MOB_TERM:
+ mmEntries[mmId].procData.mmState = MM_AUTH_TERM;
+ sendAuthReqToMobile(mmId, ludbId);
+ break;
+
+ default:
+ DBG_ERROR("Invalid procData.procType(%d) on LUDB SecRsp\n",
+ mmEntries[mmId].procData.procType);
+ }
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_Ludb_RegCnfProc(short mmId, short ludbId, short forceAuth)
+{
+ DBG_FUNC("MM_Ludb_RegCnfProc", MM_LAYER);
+ DBG_ENTER();
+ if(mmEntries[mmId].procData.mmState == MM_WAIT4REG)
+ {
+ switch(mmEntries[mmId].procData.procType){
+ case MM_PROC_LUDB:
+ // if it is initiated from the gs, send location update accept
+ if (mmEntries[mmId].gsInitiated)
+ {
+ MM_Bssgp_SendLuAccept(mmId);
+ }
+ else
+ {
+ MMProceedLocUpdateAuth(mmId, ludbId, forceAuth);
+ }
+ break;
+
+ case MM_PROC_MOB_ORIG:
+ mmEntries[mmId].ludbId = ludbId;
+ MMProceedCMServiceReqAuth(mmId);
+ break;
+
+ case MM_PROC_MOB_TERM:
+ mmEntries[mmId].ludbId = ludbId;
+ MMProceedRRPageRspAuth(mmId); // shmin 08/02/01
+ // sendPageReqToRRM(mmId);
+ break;
+
+ default:
+ DBG_ERROR("Invalid procData.procType(%d) on LUDB RegCnf\n",
+ mmEntries[mmId].procData.procType);
+ }
+ }
+ else
+ {
+ DBG_TRACE("Mobile is not waiting for RCF, MM ID: %d state %d\n",
+ mmId, mmEntries[mmId].procData.mmState);
+ }
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MMProceedLocUpdateAuth(short mmId, short ludbId, short forceAuth)
+{
+ DBG_FUNC("MMProceedLocUpdateAuth", MM_LAYER);
+ DBG_ENTER();
+
+ if(ludb_auth_required){
+ mmEntries[mmId].procData.mmState = MM_AUTH_LOCUP;
+ if(forceAuth){
+ DBG_TRACE("mobile returned cksn %d, ludbcksn %d still use new key\n",
+ mmEntries[mmId].lup_cksn,
+ ludbCKSN(ludbId));
+ sendAuthReqToMobile(mmId, ludbId);
+ }
+ else{
+ if(mmEntries[mmId].lup_cksn == ludbCKSN(ludbId)){
+ DBG_TRACE("Skip Auth for mmId: %d\n", mmId);
+ MMProceedLocUpdateCipher(mmId, ludbId);
+ }
+ else{
+ DBG_TRACE("mobile returned cksn %d, differ from ludbcksn %d\n",
+ mmEntries[mmId].lup_cksn,
+ ludbCKSN(ludbId));
+ sendAuthReqToMobile(mmId, ludbId);
+ }
+ }
+ }
+ else{
+ MMProceedLocUpdateCipher(mmId, ludbId);
+ }
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MMProceedLocUpdateCipher(short mmId, short ludbId)
+{
+ MMProceedLocUpdateRegCnf(mmId, ludbId);
+}
+
+// ****************************************************************************
+void MMProceedLocUpdateRegCnf(short mmId, short ludbId)
+{
+ DBG_FUNC("MMProceedLocUpdateRegCnf", MM_LAYER);
+ DBG_ENTER();
+ unsigned long tick = tickGet();
+// printf("LocationUpdate start tick %d\n", mmEntries[mmId].locupTick);
+// printf("LocationUpdate end tick %d\n", tick);
+ tick = tick - mmEntries[mmId].locupTick;
+ mmUpdMeanLocUpTime(tick);
+
+ sendLocationUpdateAccept(mmEntries[mmId].oid,
+ mmEntries[mmId].sapi,
+ mmEntries[mmId].entryId,
+ getMobileId(mmId));
+ entryDealloc(mmId);
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_Ludb_RegRejProc(short mmId, T_CNI_RIL3_REJECT_CAUSE_VALUE cause)
+{
+ DBG_FUNC("MM_Ludb_RegRejProc", MM_LAYER);
+ DBG_ENTER();
+ switch(mmEntries[mmId].procData.procType){
+ case MM_PROC_LUDB:
+ if(mmEntries[mmId].procData.mmState == MM_WAIT4REG){
+ sendLocationUpdateReject(mmEntries[mmId].oid,
+ mmEntries[mmId].sapi,
+ mmEntries[mmId].entryId,
+ cause);
+ entryDealloc(mmId);
+ DBG_LEAVE();
+ return;
+ }
+ break;
+
+ case MM_PROC_MOB_ORIG:
+ if(mmEntries[mmId].procData.mmState == MM_AUTH_ORIG){
+ MMCMServiceCleanUp(mmId);
+ DBG_LEAVE();
+ return;
+ }
+ break;
+
+ case MM_PROC_MOB_TERM:
+ if(mmEntries[mmId].procData.mmState == MM_AUTH_TERM){
+ MMPageReqCleanUp(mmId);
+ DBG_LEAVE();
+ return;
+ }
+ break;
+
+ default:
+ DBG_ERROR("Invalid procData.procType(%d) on LUDB RegRej\n",
+ mmEntries[mmId].procData.procType);
+ }
+
+ DBG_TRACE("Mobile is not waiting for RRJ, MM ID: %d proc %s state %s \n", mmId,
+ getMMProcStateString(mmEntries[mmId].procData.procType),
+ getMMStateString(mmEntries[mmId].procData.mmState));
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_Ludb_UnRegCnfProc(short mmId)
+{
+ DBG_FUNC("MM_Ludb_UnRegCnfProc", MM_LAYER);
+ DBG_ENTER();
+ if(mmEntries[mmId].procData.mmState == MM_WAIT4UNREG)
+ {
+ if(mmEntries[mmId].mmId2 != JCC_ERROR){
+ short mmId2 = mmEntries[mmId].mmId2;
+ mmEntries[mmId2].cause = CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING;
+ sendIntCCMsg (mmId2, INTRA_L3_MM_REL_IND, INTRA_L3_NULL_MSG);
+ entryDealloc(mmId2);
+ }
+
+ sendIntRRMsg (mmEntries[mmId].entryId, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ entryDealloc(mmId);
+ }
+ else
+ {
+ DBG_TRACE("Mobile is not waiting for UCF, MM ID: %d state %d\n",
+ mmId, mmEntries[mmId].procData.mmState);
+ }
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_Ludb_UnRegRejProc(short mmId)
+{
+ DBG_FUNC("MM_Ludb_UnRegRejProc", MM_LAYER);
+ DBG_ENTER();
+ if(mmEntries[mmId].procData.mmState == MM_WAIT4UNREG)
+ {
+ if(mmEntries[mmId].mmId2 != JCC_ERROR){
+ sendIntCCMsg (mmEntries[mmId].mmId2, INTRA_L3_MM_REL_IND, INTRA_L3_NULL_MSG);
+ entryDealloc(mmEntries[mmId].mmId2);
+ }
+
+ sendIntRRMsg (mmEntries[mmId].entryId, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ entryDealloc(mmId);
+ }
+ else
+ {
+ DBG_TRACE("Mobile is not waiting for URJ, MM ID: %d state %d\n",
+ mmId, mmEntries[mmId].procData.mmState);
+ }
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_Ludb_MsgProc(LudbMsgStruct *LudbInMsg)
+{
+ DBG_FUNC("MM_Ludb_MsgProc", MM_LAYER);
+ DBG_ENTER();
+ // The connection entry for MM
+ short mmId;
+
+ mmId = LudbInMsg->mm_id;
+
+ switch(LudbInMsg->msg_type)
+ {
+ case LUDB_MM_REL_REQ:
+ DBG_TRACE("LUDB_MM_REL_REQ Received mmId %d\n", mmId);
+ MM_Ludb_RelReqProc(mmId);
+ break;
+
+ case LUDB_MM_REG_CNF:
+ DBG_TRACE("LUDB_MM_REG_CNF Received mmId %d\n", mmId);
+ MM_Ludb_RegCnfProc(mmId, LudbInMsg->ludb_id, LudbInMsg->forceAuth);
+ break;
+
+ case LUDB_MM_REG_REJ:
+ DBG_TRACE("LUDB_MM_REG_REJ Received mmId %d\n", mmId);
+ MM_Ludb_RegRejProc(mmId, LudbInMsg->cause);
+ break;
+
+ case LUDB_MM_UNREG_CNF:
+ DBG_TRACE("LUDB_MM_UNREG_CNF Received mmId %d\n", mmId);
+ MM_Ludb_UnRegCnfProc(mmId);
+ break;
+
+ case LUDB_MM_UNREG_REJ:
+ DBG_TRACE("LUDB_MM_UNREG_REJ Received mmId %d\n", mmId);
+ MM_Ludb_UnRegRejProc(mmId);
+ break;
+
+ case LUDB_MM_SEC_RSP:
+ DBG_TRACE("LUDB_MM_SEC_RSP Received mmId %d\n", mmId);
+ MM_Ludb_SecRspProc(mmId, LudbInMsg->ludb_id);
+ break;
+
+ case LUDB_MM_EMERG_RSP:
+ DBG_TRACE("LUDB_MM_EMERG_RSP Received mmId %d\n", mmId);
+ MM_Ludb_EmergRspProc(mmId, LudbInMsg->ludb_id);
+ break;
+
+ case LUDB_MM_CIPHER_SET:
+ DBG_TRACE("LUDB_MM_SEC_RSP Received mmId %d\n", mmId);
+ MM_Ludb_CipherSetProc(mmId, LudbInMsg->ludb_id, LudbInMsg->algo);
+ break;
+
+
+ default:
+ DBG_ERROR("Unexpected message type %d for Ludb\n", LudbInMsg->msg_type);
+ }
+ DBG_LEAVE();
+}
+
diff --git a/data/mnet/GP10/Host/mm/src/MMMdMsgProc.cpp b/data/mnet/GP10/Host/mm/src/MMMdMsgProc.cpp
new file mode 100644
index 0000000..982a07d
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/src/MMMdMsgProc.cpp
@@ -0,0 +1,1399 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMMdMsgProc.cpp
+// Author(s) : Kevin Lim
+// Create Date : 07-26-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "taskLib.h"
+#include "stdLib.h"
+#include "string.h"
+#include "tickLib.h"
+#include "LOGGING/vcmodules.h"
+#include "LOGGING/vclogging.h"
+#include "oam_api.h"
+#include "JCC/JCCUtil.h"
+#include "ril3/ril3_common.h"
+#include "JCC/LUDBapi.h"
+// included MD and IRT headers for messages from MS
+#if defined(_NO_ED) || defined(_SOFT_MOB)
+ #include "JCC/JCC_ED.h"
+#else
+ #define JCC_RIL3MM_Decode CNI_RIL3MM_Decode
+#endif
+#include "grr/grr_intf.h"
+
+// MM Message Constants
+#include "MMTypes.h"
+#include "MM/MMInt.h"
+#include "MMUtil.h"
+#include "MMMdMsgProc.h"
+#include "MMSendMsg.h"
+#include "MMPmProc.h"
+#include "MMLudbMsgProc.h"
+#include "MMRmMsgProc.h"
+
+// Global Variable for current MM Connections
+extern MMEntry_t mmEntries[];
+
+// OAM Config Data
+extern MobilityConfigData mmCfg;
+int mmCfgT3260 = 5 * 60;
+extern int mmCfgIMSIrequired;
+
+extern T_CNI_RIL3_IE_LOCATION_AREA_ID mmCfgLocId;
+extern Boolean mmOpStatus;
+
+extern T_CNI_RIL3MM_MSG mmToMSOutMsg; // MM output message buffer
+extern IntraL3Msg_t mmToCCOutMsg; // msg buffer - internal modules
+
+int ta_HoldSdcch = 0;
+
+int cipher_testmode = 0;
+T_CNI_RIL3_IE_CIPHER_MODE_SETTING cipher_testsetting;
+extern T_AUTH_TRIPLET cipher_testtriplet;
+extern bool ludb_auth_testmode;
+extern char ludb_auth_testcksn;
+extern short ludb_auth_required;
+
+extern short rm_DecideCipherAlgo(
+ T_CNI_RIL3_IE_CIPHER_MODE_SETTING *setting,
+ T_CNI_RIL3_IE_MS_CLASSMARK_2 *classmark2);
+
+
+// ****************************************************************************
+int taHoldSdcchOn()
+{
+ if(ta_HoldSdcch){
+ printf("[MM] HoldSdcch Mode already turned on.\n");
+ return -1;
+ }
+ else{
+ ta_HoldSdcch = 1;
+ printf("[MM] HoldSdcch Mode is now turned on.\n");
+ printf(" (Mobile Location Update will not be responded.)\n");
+ return 0;
+ }
+}
+
+// ****************************************************************************
+int taHoldSdcchOff()
+{
+ if(!ta_HoldSdcch){
+ printf("[MM] HoldSdcch Mode already turned off.\n");
+ return -1;
+ }
+ else{
+ ta_HoldSdcch = 0;
+ printf("[MM] HoldSdcch Mode is now turned off.\n");
+ printf(" (Mobile Location Update will be responded normally.)\n");
+ return 0;
+ }
+}
+
+// ****************************************************************************
+// StartCipherMode sets test mode for DSP testing. It triggers Ciphering on MO
+// ****************************************************************************
+int StartCipherMode(int start, int algo, unsigned char lsb)
+{
+ int i;
+ if(cipher_testmode){
+ printf("[MM] Test Cipher Mode already turned on.\n");
+ return -1;
+ }
+ else{
+ mmCfg.mm_cipheringRequired = (Boolean_t)1;
+
+ cipher_testmode = 1;
+ cipher_testsetting.ie_present = 1;
+ switch(start){
+ case 0:
+ cipher_testsetting.ciphering = CNI_RIl3_CIPHER_NO_CIPHERING;
+ break;
+ case 1:
+ cipher_testsetting.ciphering = CNI_RIl3_CIPHER_START_CIPHERING;
+ break;
+ default:
+ cipher_testsetting.ciphering = CNI_RIl3_CIPHER_NO_CIPHERING;
+ printf("Unsupported start indicator: %d\n", start);
+ }
+ switch(algo){
+ case 0:
+ cipher_testsetting.algorithm = CNI_RIL3_CIPHER_ALGORITHM_A51;
+ break;
+ case 1:
+ cipher_testsetting.algorithm = CNI_RIL3_CIPHER_ALGORITHM_A52;
+ break;
+ default:
+ cipher_testsetting.algorithm = CNI_RIL3_CIPHER_ALGORITHM_A51;
+ printf("Unsupported algorithm: %d\n", algo);
+ }
+ for(i=0; i<SEC_KC_LEN; i++) cipher_testtriplet.Kc[i] = 0xFF;
+ cipher_testtriplet.Kc[SEC_KC_LEN-1] = lsb;
+
+ printf("[MM] Test Cipher Mode is now turned on.\n");
+ printf(" (Mobile Origination will initiate ciphering.)\n\n");
+ printf("StartCipherMode(start=%d, algo=%d, LSB=0x%x)\n", start, algo, lsb);
+ printf(" start - 0:no cipher, 1:cipher\n");
+ printf(" algo - 0:A5/1, 1:A5/2\n");
+ printf(" ciphering key(Kc) is set to : 0x");
+ for(i=0; i<SEC_KC_LEN; i++) printf("%02x", cipher_testtriplet.Kc[i]);
+ printf("\n");
+ return 0;
+ }
+}
+
+// ****************************************************************************
+int StopCipherMode()
+{
+ if(!cipher_testmode){
+ printf("[MM] Test Cipher Mode already turned off.\n");
+ return -1;
+ }
+ else{
+ mmCfg.mm_cipheringRequired = (Boolean_t)0;
+
+ cipher_testmode = 0;
+ printf("[MM] Test Cipher Mode is now turned off.\n");
+ printf(" (Mobile Origination will work without ciphering.)\n");
+ return 0;
+ }
+}
+
+// ****************************************************************************
+short initNewConn( T_CNI_IRT_ID entryId,
+ T_CNI_LAPDM_OID oid,
+ T_CNI_LAPDM_SAPI sapi,
+ MMProcedureType_t procType)
+{
+ DBG_FUNC("initNewConn", MM_LAYER);
+ DBG_ENTER();
+ short newEntry;
+
+ // Connection Initialization -
+ // New MS RR Connection that needs an MM/CC level service
+ if ( (newEntry = entryAlloc()) == JCC_ERROR )
+ {
+ // No Connections left.
+ DBG_LEAVE();
+ return JCC_ERROR;
+ }
+
+ mmEntries[newEntry].entryId = entryId;
+ mmEntries[newEntry].oid = oid;
+ mmEntries[newEntry].sapi = sapi;
+
+ mmEntries[newEntry].procData.procType = procType;
+
+ T_CNI_L3_ID newId;
+ newId.msgq_id = mmMsgQId;
+ newId.sub_id = (unsigned short) newEntry;
+ if (!(CNI_RIL3_IRT_Set_MM_Id(entryId, newId)))
+ {
+ DBG_ERROR("IRT Table problem \n ");
+ // Cleanup action ?? - Release all resources
+ // Release MM Entry
+ entryDealloc(newEntry);
+ DBG_LEAVE();
+ return JCC_ERROR;
+ }
+
+ DBG_LEAVE();
+ return newEntry;
+}
+
+
+// ****************************************************************************
+// TO MOBILE
+// ****************************************************************************
+void sendLocationUpdateAccept( T_CNI_LAPDM_OID oid,
+ T_CNI_LAPDM_SAPI sapi,
+ T_CNI_IRT_ID entryId,
+ const T_CNI_RIL3_IE_MOBILE_ID& mobileId)
+{
+ // encode RIL3 message to send to the MS
+ buildMSMsgCommon ();
+
+ T_CNI_RIL3MM_MSG_LOCATION_UPDATE_ACCEPT
+ *locUpdAccept = &mmToMSOutMsg.locationUpdateAccept ; // Loc Upd portion
+ locUpdAccept->header.message_type = CNI_RIL3MM_MSGID_LOCATION_UPDATING_ACCEPT;
+
+ // Build IE portion ---------------------------------------------
+ // Only Mandatory IE needed is LAI
+
+ locUpdAccept->locationId.ie_present = true;
+
+ locUpdAccept->locationId.mcc[0] = mmCfgLocId.mcc[0];
+ locUpdAccept->locationId.mcc[1] = mmCfgLocId.mcc[1];
+ locUpdAccept->locationId.mcc[2] = mmCfgLocId.mcc[2];
+ locUpdAccept->locationId.mnc[0] = mmCfgLocId.mnc[0];
+ locUpdAccept->locationId.mnc[1] = mmCfgLocId.mnc[1];
+ locUpdAccept->locationId.mnc[2] = mmCfgLocId.mnc[2]; //formerly 0xf
+
+ //printf("MNC go from 2-3 digits MNC[%x%x%x]\n",
+ // locUpdAccept->locationId.mnc[0],
+ // locUpdAccept->locationId.mnc[1],
+ // locUpdAccept->locationId.mnc[2]);
+
+ locUpdAccept->locationId.lac = mmCfgLocId.lac;
+
+ // Return IMSI to force the stored TMSI in the SIM is deleted.
+ // The MS should then register with its IMSI.
+ // Do this only if the MS sent a TMSI.
+ // The following is needed only until we complete real registrations
+ // with the Gatekeeper - in a couple of weeks!!
+ locUpdAccept->mobileId.ie_present = true;
+ locUpdAccept->mobileId = mobileId;
+
+ mmIncTrnSubIdIMSI(); // PM report
+
+ if(ta_HoldSdcch) return;
+
+ // Even if the result is not success,
+ // we still send release req. below. no check needed.
+ sendMSMsg(oid, sapi);
+
+ // Now send the clear request to the RRM -
+ // How do we make sure that LAPDm sends the Loc Upd Accept first?
+
+ sendIntRRMsg (entryId, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+
+
+}
+
+// ****************************************************************************
+void sendLocationUpdateReject( T_CNI_LAPDM_OID oid,
+ T_CNI_LAPDM_SAPI sapi ,
+ T_CNI_IRT_ID entryId,
+ T_CNI_RIL3_REJECT_CAUSE_VALUE cause)
+{
+ DBG_FUNC("sendLocationUpdateReject", MM_LAYER);
+ DBG_ENTER();
+
+ // encode RIL3 message to send to the MS
+ buildMSMsgCommon ();
+
+ T_CNI_RIL3MM_MSG_LOCATION_UPDATE_REJECT
+ *locationUpdateReject = &mmToMSOutMsg.locationUpdateReject ; // Loc Upd portion
+ locationUpdateReject->header.message_type = CNI_RIL3MM_MSGID_LOCATION_UPDATING_REJECT;
+ locationUpdateReject->rejectCause.ie_present = true;
+ locationUpdateReject->rejectCause.causeValue = cause;
+ sendMSMsg(oid,sapi);
+ DBG_TRACE("Reject Cause: %s\n", getMMRejectCauseStr(cause));
+ // moved from INTRA_L3_MM_RAS_RRJ for consistency - klim 4/22/99
+ // Stage 2.5 fix - Clear message sent with the wrong entry id.
+ sendIntRRMsg (entryId, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void sendIdentityRequest(short mmId)
+{
+ // encode RIL3 message to send to the MS
+ buildMSMsgCommon ();
+
+ T_CNI_RIL3MM_MSG_IDENTITY_REQUEST
+ *identityRequest = &mmToMSOutMsg.identityRequest ;
+ identityRequest->header.message_type = CNI_RIL3MM_MSGID_IDENTITY_REQUEST;
+ // Build IE portion
+ identityRequest->identityType.ie_present = true;
+ identityRequest->identityType.identityType = CNI_RIL3_IDENTITY_TYPE_IMSI;
+ mmEntries[mmId].identTimer->setTimer(mmCfgT3260);
+ sendMSMsg(mmEntries[mmId].oid, mmEntries[mmId].sapi);
+}
+
+// ****************************************************************************
+void sendMMStatusToMobile( T_CNI_LAPDM_OID oid,
+ T_CNI_LAPDM_SAPI sapi,
+ T_CNI_RIL3_REJECT_CAUSE_VALUE cause)
+{
+ // encode RIL3 message to send to the MS
+ buildMSMsgCommon ();
+
+ T_CNI_RIL3MM_MSG_MM_STATUS *mmStatus = &mmToMSOutMsg.mmStatus;
+ mmStatus->header.message_type = CNI_RIL3MM_MSGID_MM_STATUS;
+ // Build IE portion
+ mmStatus->rejectCause.ie_present = true;
+ mmStatus->rejectCause.causeValue = cause;
+ sendMSMsg(oid, sapi);
+}
+
+
+// ****************************************************************************
+void sendAuthReqToMobile(short mmId, short ludbId)
+{
+ DBG_FUNC("sendAuthReqToMobile", MM_LAYER);
+ DBG_ENTER();
+
+ // encode RIL3 message to send to the MS
+ buildMSMsgCommon ();
+
+ T_CNI_RIL3MM_MSG_AUTHENTICATION_REQUEST
+ *authReq = &mmToMSOutMsg.authRequest ;
+ authReq->header.message_type = CNI_RIL3MM_MSGID_AUTHENTICATION_REQUEST;
+
+ T_AUTH_TRIPLET *triplet = ludbCurTriplet(ludbId);
+ if(triplet == 0){
+ DBG_ERROR("zero triplet returned\n");
+ // clean up here.
+ DBG_LEAVE();
+ return;
+ }
+
+ if(ludb_auth_testmode)
+ authReq->cipherKey.keySeq = ludb_auth_testcksn;
+ else{
+ authReq->cipherKey.keySeq = ludbCKSN(ludbId);
+ }
+
+ if(ludb_auth_testmode){
+ for(int i=0; i<SEC_RAND_LEN; i++)
+ authReq->authRand.value[i] = cipher_testtriplet.RAND[i];
+ }
+ else{
+ for(int i=0; i<SEC_RAND_LEN; i++)
+ authReq->authRand.value[i] = triplet->RAND[i];
+ }
+
+ authReq->cipherKey.ie_present = true;
+ authReq->authRand.ie_present = true;
+
+ DBG_TRACE("KeySeq: 0x%02x\n", authReq->cipherKey.keySeq);
+
+ mmEntries[mmId].ludbId = ludbId; // response reference
+ mmEntries[mmId].authTimer->setTimer(mmCfgT3260);
+
+ sendMSMsg(mmEntries[mmId].oid, mmEntries[mmId].sapi);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void sendAuthRejToMobile(short mmId)
+{
+ DBG_FUNC("sendAuthRejToMobile", MM_LAYER);
+ DBG_ENTER();
+
+ // encode RIL3 message to send to the MS
+ buildMSMsgCommon ();
+
+ T_CNI_RIL3MM_MSG_AUTHENTICATION_REJECT
+ *authReq = &mmToMSOutMsg.authReject ;
+ authReq->header.message_type = CNI_RIL3MM_MSGID_AUTHENTICATION_REJECT;
+
+ sendMSMsg(mmEntries[mmId].oid, mmEntries[mmId].sapi);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void sendCMServRej( T_CNI_LAPDM_OID oid,
+ T_CNI_LAPDM_SAPI sapi ,
+ T_CNI_IRT_ID entryId,
+ T_CNI_RIL3_REJECT_CAUSE_VALUE cause)
+{
+ DBG_FUNC("sendCMServRej", MM_LAYER);
+ DBG_ENTER();
+
+ // encode RIL3 message to send to the MS
+ buildMSMsgCommon ();
+
+ T_CNI_RIL3MM_MSG_CM_SERVICE_REJECT
+ *cmServiceReject = &mmToMSOutMsg.cmServiceReject;
+ cmServiceReject->header.message_type = CNI_RIL3MM_MSGID_CM_SERVICE_REJECT;
+ cmServiceReject->rejectCause.ie_present = true;
+ cmServiceReject->rejectCause.causeValue = cause;
+ sendMSMsg(oid,sapi);
+ DBG_TRACE("Reject Cause: %s\n", getMMRejectCauseStr(cause));
+ sendIntRRMsg (entryId, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+// TO VBLINK
+// ****************************************************************************
+// Note: For sendMobileRegister, mmId will be referenced for CNF/REJ
+
+short sendMobileRegister(short mmId)
+{
+ DBG_FUNC("sendMobileRegister", MM_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("LOCUP keySeq: 0x%X, for mmId %d\n", mmEntries[mmId].lup_cksn, mmId);
+
+ mmEntries[mmId].mmId2 = -1;
+ mmEntries[mmId].procData.mmState = MM_WAIT4REG;
+ mmEntries[mmId].locupTick = tickGet();
+ if(sendMobileRegReqToLudb(mmEntries[mmId].mobileId, mmId)){
+ DBG_TRACE("MobileRegReq sent to Ludb successful for MM Id %d\n", mmId);
+ DBG_LEAVE();
+ return 0;
+ }
+ else{
+ DBG_ERROR("MobileRegReq send failed for MM Id %d\n", mmId);
+ sendIntRRMsg ( mmEntries[mmId].entryId, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ entryDealloc(mmId);
+ DBG_LEAVE();
+ return -1;
+ }
+}
+
+// ****************************************************************************
+// Note: For sendLocUpInCMServReq, mmId will be referenced for CMServiceRequestAccept
+
+short sendLocUpInCMServReq( T_CNI_RIL3_IE_MOBILE_ID mobileId,
+ short mmId)
+{
+ DBG_FUNC("sendLocUpInCMServReq", MM_LAYER);
+ DBG_ENTER();
+ mmEntries[mmId].mmId2 = -1;
+ mmEntries[mmId].procData.procType = MM_PROC_MOB_ORIG;
+ mmEntries[mmId].procData.mmState = MM_WAIT4REG;
+ mmEntries[mmId].mobileId = mobileId;
+ mmEntries[mmId].lup_cksn = 0x07;
+ if(sendMobileRegReqToLudb(mobileId, mmId)){
+ DBG_TRACE("LocUpInCMServReq sent to Ludb successful for MM Id %d\n", mmId);
+ DBG_LEAVE();
+ return 0;
+ }
+ else{
+ DBG_ERROR("LocUpInCMServReq send failed for MM Id %d\n", mmId);
+ sendIntRRMsg ( mmEntries[mmId].entryId, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ entryDealloc(mmId);
+ DBG_LEAVE();
+ return -1;
+ }
+}
+
+// ****************************************************************************
+// Note: For sendMobileUnRegister, mmId will also be referenced for UCF/REJ
+
+short sendMobileUnRegister( T_CNI_RIL3_IE_MOBILE_ID &mobileId,
+ const T_CNI_RIL3MD_CCMM_MSG *msInMsg)
+{
+ DBG_FUNC("sendMobileUnRegister", MM_LAYER);
+ DBG_ENTER();
+
+ short mmId = entryAlloc();
+ if(mmId != JCC_ERROR) {
+ mmEntries[mmId].mobileId = mobileId;
+ mmEntries[mmId].oid = msInMsg->lapdm_oid;
+ mmEntries[mmId].sapi = msInMsg->sapi;
+ mmEntries[mmId].mmId2 = checkExistingEntry(msInMsg->entry_id);
+ mmEntries[mmId].entryId = msInMsg->entry_id;
+ mmEntries[mmId].procData.procType = MM_PROC_LUDB;
+ mmEntries[mmId].procData.mmState = MM_WAIT4UNREG;
+ if(sendMobileUnRegReqToLudb(mobileId, mmId)) {
+ DBG_TRACE("MobileUnRegReq sent to Ludb successful for MM Id %d\n", mmId);
+ DBG_LEAVE();
+ return 0;
+ }
+ else {
+ DBG_TRACE("MobileUnRegReq send failed for MM Id %d\n", mmId);
+ sendIntRRMsg ( msInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ entryDealloc(mmId);
+ DBG_LEAVE();
+ return -1;
+ }
+ }
+ else {
+ DBG_ERROR("entryAlloc failed. sendMobileUnRegister aborted.\n");
+ sendIntRRMsg ( msInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ DBG_LEAVE();
+ return -1;
+ }
+}
+
+// ****************************************************************************
+// Location Update Request from Mobile
+//
+void MM_MD_LocUpdateReqProc(
+ T_CNI_RIL3MM_MSG_LOCATION_UPDATE_REQUEST *locUpdReq,
+ T_CNI_RIL3MD_CCMM_MSG *msInMsg)
+{
+ DBG_FUNC("MM_MD_LocUpdateReqProc", MM_LAYER);
+ DBG_ENTER();
+/*
+ printf("[CLASSMARK1] A5/1 Availability (0-avail, 1-not) :%d\n",
+ locUpdReq->classmark1.a51);
+*/
+ if(!mmOpStatus){
+ printf("[MM] LU req. ignored due to BTS operational status\n");
+ DBG_WARNING("[MM] LU req. ignored due to BTS operational status\n");
+ sendIntRRMsg (msInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ DBG_LEAVE();
+ return;
+ }
+
+ short mmId = initNewConn( msInMsg->entry_id, msInMsg->lapdm_oid,
+ msInMsg->sapi, MM_PROC_LUDB);
+ if(mmId != JCC_ERROR){
+ mmEntries[mmId].mobileId = locUpdReq->mobileId;
+ mmEntries[mmId].lup_cksn = locUpdReq->cipherKey.keySeq;
+ DBG_TRACE("Mobile sent keySeq: 0x%X\n", locUpdReq->cipherKey.keySeq);
+
+ switch(locUpdReq->mobileId.mobileIdType){ // check mobile id type
+ case CNI_RIL3_TMSI: // ask for IMSI
+ sendIdentityRequest(mmId);
+ return;
+ case CNI_RIL3_IMSI:
+ mmIncTrnSubIdIMSI(); // PM report
+ sendMobileRegister(mmId);
+ return;
+ case CNI_RIL3_IMEI:
+ case CNI_RIL3_IMEISV:
+
+ default:
+ DBG_ERROR("unsupported type of mobile id encountered %d\n",
+ locUpdReq->mobileId.mobileIdType);
+ }
+ }
+ else{
+ DBG_ERROR("entryAlloc failed. LocUpdateReq aborted.\n");
+ sendIntRRMsg (msInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ DBG_LEAVE();
+ }
+}
+
+// ****************************************************************************
+void MM_MD_IdentityRespProc(
+ T_CNI_RIL3MM_MSG_IDENTITY_RESPONSE *identityResponse,
+ T_CNI_RIL3MD_CCMM_MSG *msInMsg)
+{
+ DBG_FUNC("MM_MD_IdentityRespProc", MM_LAYER);
+ DBG_ENTER();
+ short mmId = MM_FindIrtMMId(msInMsg->entry_id);
+ if(mmId < 0){
+ DBG_ERROR("unexpected identity response from entry %d\n", msInMsg->entry_id);
+ sendIntRRMsg (msInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ }
+ else{
+ mmEntries[mmId].mobileId = identityResponse->mobileId;
+ mmEntries[mmId].identTimer->cancelTimer();
+ switch(mmEntries[mmId].procData.procType){
+ case MM_PROC_LUDB:
+ if(identityResponse->mobileId.mobileIdType == CNI_RIL3_IMSI){
+ mmIncTrnSubIdIMSI(); // PM report
+ sendMobileRegister(mmId);
+ }
+ else{
+ DBG_ERROR("unsupported type of mobile id encountered %d\n",
+ identityResponse->mobileId.mobileIdType);
+ sendIntRRMsg (msInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ entryDealloc(mmId);
+ }
+ break;
+ case MM_PROC_MOB_ORIG:
+ if(mmEntries[mmId].procData.mmState == MM_EMERGENCY){
+ mmEntries[mmId].cmServReq.mobileId = identityResponse->mobileId;
+ MM_ProceedEmergencyIMSI(mmId);
+ }
+ else{
+ DBG_ERROR("IdentityResp when mm state %d\n",
+ mmEntries[mmId].procData.mmState);
+ sendIntRRMsg (msInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ entryDealloc(mmId);
+ }
+ break;
+ default:
+ DBG_ERROR("unexpected identity response in proc state %d\n",
+ mmEntries[mmId].procData.procType);
+ }
+ }
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+// TO RRM
+// ****************************************************************************
+bool sendRRCipherModeCmd(short mmId, MMProcedureType_t proc)
+{
+ DBG_FUNC("sendRRCipherModeCmd", MM_LAYER);
+ DBG_ENTER();
+ IntraL3MsgData_t l3_data;
+ T_CNI_RIL3_IE_MS_CLASSMARK_2 classmark2;
+
+ switch(proc){
+ case MM_PROC_MOB_ORIG:
+ classmark2 = mmEntries[mmId].cmServReq.classmark2;
+ break;
+ case MM_PROC_MOB_TERM:
+ classmark2 = mmEntries[mmId].pageRsp.classmark2;
+ break;
+ default:
+ DBG_ERROR("Unknown procType(%d) on sendRRCipherModeCmd\n", proc);
+ }
+ if(cipher_testmode){
+ switch(cipher_testsetting.algorithm){
+ case CNI_RIL3_CIPHER_ALGORITHM_A51:
+ if(classmark2.a51){
+ printf("[MM] ERROR! Setting ciphering mode: Mobile does not support A5/1\n");
+ }
+ break;
+ case CNI_RIL3_CIPHER_ALGORITHM_A52:
+ if(!classmark2.a52){
+ printf("[MM] ERROR! Setting ciphering mode: Mobile does not support A5/2\n");
+ }
+ break;
+ case CNI_RIL3_CIPHER_ALGORITHM_A53:
+ if(!classmark2.a53){
+ printf("[MM] ERROR! Setting ciphering mode: Mobile does not support A5/3\n");
+ }
+ break;
+ default:
+ printf("[MM] ERROR! Test ciphering algorithm hasn't been set yet!\n");
+ }
+ printf("[MM] CLASSMARK2 A5/1 Availability (0-avail, 1-not) :%d\n", classmark2.a51);
+ printf("[MM] CLASSMARK2 A5/2 Availability (0-not, 1-avail) :%d\n", classmark2.a52);
+ printf("[MM] CLASSMARK2 A5/3 Availability (0-not, 1-avail) :%d\n", classmark2.a53);
+
+ l3_data.cipherCmd.cmd.cipherModeSetting = cipher_testsetting;
+ for(int i=0; i<SEC_KC_LEN; i++)
+ l3_data.cipherCmd.Kc[i] = cipher_testtriplet.Kc[i];
+ }
+ else{
+ // set real ciphermode setting
+ DBG_TRACE("[MM] CLASSMARK2 (0-avail, 1-not): CallType(%d) A51(%d) A52(%d) A53(%d)\n",
+ proc, classmark2.a51, classmark2.a52, classmark2.a53);
+
+ short algo_choice = 0;
+ // algo_choice = rm_DecideCipherAlgo(&l3_data.cipherCmd.cmd.cipherModeSetting, &classmark2);
+ algo_choice = grr_DecideCipherAlgo(&l3_data.cipherCmd.cmd.cipherModeSetting, &classmark2);
+ DBG_TRACE("MM set ciphermode: algo_choice(%d) ciphering(%d) algo(%d)\n",
+ algo_choice,
+ l3_data.cipherCmd.cmd.cipherModeSetting.ciphering,
+ l3_data.cipherCmd.cmd.cipherModeSetting.algorithm
+ );
+
+ //l3_data.cipherCmd.cmd.cipherModeSetting.ciphering = CNI_RIl3_CIPHER_START_CIPHERING;
+ //if(!classmark2.a52){
+ // if(classmark2.a51){
+ // DBG_ERROR("A5/2, A5/1 both not available on mobile\n");
+ // l3_data.cipherCmd.cmd.cipherModeSetting.ciphering = CNI_RIl3_CIPHER_NO_CIPHERING;
+ // algo_choice = 0;
+ // }
+ // else{
+ // DBG_TRACE("set ciphermode: A5/1\n");
+ // l3_data.cipherCmd.cmd.cipherModeSetting.algorithm = CNI_RIL3_CIPHER_ALGORITHM_A51;
+ // algo_choice = 1;
+ // }
+ //}
+ //else{
+ // DBG_TRACE("set ciphermode: A5/2\n");
+ // l3_data.cipherCmd.cmd.cipherModeSetting.algorithm = CNI_RIL3_CIPHER_ALGORITHM_A52;
+ // algo_choice = 2;
+ //}
+ short ludbId = mmEntries[mmId].ludbId;
+
+ // keep cipher modes in ludb record
+ sendCipherCmdRecordToLudb(mmId, algo_choice);
+
+ T_AUTH_TRIPLET *triplet = ludbCurTriplet(ludbId);
+ if(triplet == 0){
+ DBG_ERROR("triplet returned 0 in CipherModeCmd for ludb %d\n", ludbId);
+ // clean up here
+ DBG_LEAVE();
+ return false;
+ }
+ else{
+ for(int i=0; i<SEC_KC_LEN; i++)
+ l3_data.cipherCmd.Kc[i] = triplet->Kc[i];
+ }
+ }
+ l3_data.cipherCmd.cmd.cipherModeSetting.ie_present = 1;
+
+ l3_data.cipherCmd.cmd.cipherResponse.ie_present = 1;
+ l3_data.cipherCmd.cmd.cipherResponse.cipherResponse = CNI_RIL3_IMEISV_NOT_INCLUDED;
+
+ // Change state to MM_CIPHER_CMD
+ mmEntries[mmId].procData.procType = proc;
+ mmEntries[mmId].procData.mmState = MM_CIPHER_CMD;
+ mmEntries[mmId].authTimer->setTimer(mmCfgT3260);
+ sendIntRRDataMsg (mmEntries[mmId].entryId, INTRA_L3_DATA, INTRA_L3_RR_CIPHER_COMMAND, l3_data);
+ mmIncAttCipher(); // PM report
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+// TO MOBILE, again
+// ****************************************************************************
+bool sendCMServiceAccept(short mmId)
+{
+ DBG_FUNC("sendCMServiceAccept", MM_LAYER);
+ DBG_ENTER();
+
+ if(mmId == JCC_ERROR){
+ DBG_ERROR("mmId Error in sendCMServiceAccept\n");
+ DBG_LEAVE();
+ return false;
+ }
+ T_CNI_LAPDM_OID oid = mmEntries[mmId].oid;
+ T_CNI_LAPDM_SAPI sapi = mmEntries[mmId].sapi;
+ T_CNI_IRT_ID entryId = mmEntries[mmId].entryId;
+
+ // encode RIL3 message to send to the MS
+ buildMSMsgCommon ();
+
+ T_CNI_RIL3MM_MSG_CM_SERVICE_ACCEPT *cmServAccept
+ = &mmToMSOutMsg.cmServiceAccept;
+
+ cmServAccept->header.message_type = CNI_RIL3MM_MSGID_CM_SERVICE_ACCEPT;
+
+ // Build IE portion begin
+ // No Mandatory IEs needed
+ // Build IE portion done
+
+ T_CNI_RIL3_RESULT result;
+ if ( (result = sendMSMsg(oid, sapi)) != CNI_RIL3_RESULT_SUCCESS )
+ {
+ // Problem
+ // send the clear request to the RRM -
+ DBG_ERROR("Problem sending MS msg for Entry Id %d\n", entryId);
+ sendIntRRMsg (entryId, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ entryDealloc(mmId);
+ DBG_LEAVE();
+ return false;
+ }
+ DBG_TRACE("CMServiceAccept sent to mobile for MM Id %d\n", mmId);
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+// TO CC
+// ****************************************************************************
+bool sendCMServiceReqToCC(short mmId)
+{
+ DBG_FUNC("sendCMServiceReqToCC", MM_LAYER);
+ DBG_ENTER();
+
+ // Change state from MM_START state.
+ mmEntries[mmId].procData.procType = MM_PROC_MOB_ORIG;
+ mmEntries[mmId].procData.mmState = MM_CONN_EST;
+
+ // Send the whole service request message to CC
+ mmToCCOutMsg.l3_data.servReq = mmEntries[mmId].cmServReq;
+
+ // Send the establishment indication to the CC
+ sendIntCCMsg(mmId, INTRA_L3_MM_EST_IND, INTRA_L3_NULL_MSG);
+
+ DBG_LEAVE();
+ return true;
+}
+
+// ****************************************************************************
+void MM_MD_CMServiceAbortProc(
+ T_CNI_RIL3MM_MSG_CM_SERVICE_ABORT *cmServAbort,
+ T_CNI_RIL3MD_CCMM_MSG *msInMsg)
+{
+ DBG_FUNC("MM_MD_CMServiceAbortProc", MM_LAYER);
+ DBG_ENTER();
+ short mmId = checkExistingEntry(msInMsg->entry_id);
+ if(mmId == JCC_ERROR){
+ DBG_WARNING("No existing mmEntry associated with CMServiceAbort entryId %d\n",
+ msInMsg->entry_id);
+ DBG_LEAVE();
+ return;
+ }
+ DBG_TRACE("CMServiceAbort for mmId %d\n", mmId);
+ //entryPrint(mmEntries[mmId]);
+
+ if(mmEntries[mmId].procData.procType != MM_PROC_MOB_ORIG){
+ DBG_WARNING("CM Abort NOT from Originating Mobile! Msg Ignored.\n");
+ DBG_LEAVE();
+ return;
+ }
+ else{ // check for emergency call, in case we need to remove temporary emergency profile from ludb
+ if(mmEntries[mmId].emerg_ludb){
+ sendRemoveEmergencyToLudb(mmId);
+ }
+ }
+
+ if(mmEntries[mmId].procData.mmState == MM_CONN_EST){
+ DBG_TRACE("send abort message to CC\n");
+ sendIntCCMsg(mmId, INTRA_L3_MM_REL_IND, INTRA_L3_NULL_MSG);
+ }
+ DBG_TRACE("send abort message to RR\n");
+ sendIntRRMsg (msInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ entryDealloc(mmId);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+// For mobile origniating call,
+void MM_MD_CMServiceReqProc(
+ T_CNI_RIL3MM_MSG_CM_SERVICE_REQUEST *cmServReq,
+ T_CNI_RIL3MD_CCMM_MSG *msInMsg)
+{
+ DBG_FUNC("MM_MD_CMServiceReqProc", MM_LAYER);
+ DBG_ENTER();
+ if(!mmOpStatus){
+ printf("[MM] originating call ignored due to BTS operational status\n");
+ DBG_WARNING("[MM] originating call ignored due to BTS operational status\n");
+ sendIntRRMsg (msInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ DBG_LEAVE();
+ return;
+ }
+
+ if(cmServReq->cmServiceType.serviceType == CNI_RIL3_CM_SERVICE_TYPE_EMERGENCY_CALL){
+ MM_MD_CMServiceReqEmergencyProc(cmServReq, msInMsg);
+ }
+ else{
+ MM_MD_CMServiceReqNormalProc(cmServReq, msInMsg);
+ }
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_MD_CMServiceReqEmergencyProc(
+ T_CNI_RIL3MM_MSG_CM_SERVICE_REQUEST *cmServReq,
+ T_CNI_RIL3MD_CCMM_MSG *msInMsg)
+{
+ DBG_FUNC("MM_MD_CMServiceReqEmergencyProc", MM_LAYER);
+ DBG_ENTER();
+ DBG_TRACE("Emergency Call received\n");
+
+ mmIncAttMOEmergencyCalls();
+ short mmId;
+ if((mmId = checkExistingEntry(msInMsg->entry_id)) != JCC_ERROR) {
+ DBG_ERROR("EMERGENCY CMServiceRequest came with existing entry_id %d\n",
+ msInMsg->entry_id);
+ DBG_LEAVE();
+ return;
+ }
+
+ if ((mmId = initNewConn( msInMsg->entry_id, msInMsg->lapdm_oid,
+ msInMsg->sapi, MM_PROC_MOB_ORIG))
+ == JCC_ERROR)
+ {
+ DBG_ERROR("Problem creating NewConn for Entry Id %d\n", msInMsg->entry_id);
+ sendIntRRMsg (msInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ DBG_LEAVE();
+ return;
+ }
+
+ mmEntries[mmId].cmServReq = *cmServReq; // copy cmServiceRequest
+ mmEntries[mmId].procData.mmState = MM_EMERGENCY;
+ mmEntries[mmId].mobileId = cmServReq->mobileId;
+
+ switch(cmServReq->mobileId.mobileIdType){ // check mobile id type
+ case CNI_RIL3_TMSI: // ask for IMSI
+ sendIdentityRequest(mmId);
+ return;
+ case CNI_RIL3_IMSI:
+ MM_ProceedEmergencyIMSI(mmId);
+ return;
+ case CNI_RIL3_IMEI:
+ case CNI_RIL3_IMEISV:
+ if(mmCfgIMSIrequired)
+ MMCMServiceCleanUp(mmId);
+ else
+ sendInsertEmergencyToLudb(mmId);
+ return;
+ default:
+ DBG_ERROR("unsupported type of mobile id encountered %d\n",
+ cmServReq->mobileId.mobileIdType);
+ }
+}
+
+// ****************************************************************************
+void MM_ProceedEmergencyIMSI(short mmId)
+{
+ DBG_FUNC("MM_ProceedEmergencyIMSI", MM_LAYER);
+ DBG_ENTER();
+
+ short existInLudb = 0;
+
+ short ludbId = ludbGetEntryByMobileId(mmEntries[mmId].mobileId);
+ // check if mobile is registered with LUDB.
+ if( ludbId == JCC_ERROR){ // not found in LUDB
+ sendInsertEmergencyToLudb(mmId);
+ DBG_LEAVE();
+ return;
+ }
+ else
+ mmEntries[mmId].ludbId = ludbId;
+
+ MMProceedCMServiceReqAccept(mmId);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_MD_CMServiceReqNormalProc(
+ T_CNI_RIL3MM_MSG_CM_SERVICE_REQUEST *cmServReq,
+ T_CNI_RIL3MD_CCMM_MSG *msInMsg)
+{
+ DBG_FUNC("MM_MD_CMServiceReqNormalProc", MM_LAYER);
+ DBG_ENTER();
+
+ // The connection entry for MM
+ short mmId;
+ short existInLudb = 0;
+ short ludbId = ludbGetEntryByMobileId(cmServReq->mobileId);
+
+ if((mmId = checkExistingEntry(msInMsg->entry_id)) != JCC_ERROR)
+ {
+ //SMS <Igal:06-01-00> Begin
+ if (cmServReq->cmServiceType.serviceType == CNI_RIL3_CM_SERVICE_TYPE_SHORT_MESSAGE_SERVICE)
+ {
+ if(mmEntries[mmId].hoConn == false && ludbIsProvSMS_MO(ludbId) == false)
+ //SMS <Igal:06-01-00> End
+ {
+ sendCMServRej(msInMsg->lapdm_oid, msInMsg->sapi, msInMsg->entry_id,
+ CNI_RIL3_REJECT_REQUESTED_SERVICE_OPTION_NOT_SUBSCRIBED);
+ DBG_LEAVE();
+ return;
+ }
+
+ mmEntries[mmId].cmServReq = *cmServReq; // copy cmServiceRequest
+ MMProceedCMServiceReqAccept(mmId);
+ DBG_LEAVE();
+ return;
+ }
+ if(msInMsg->primitive_type == L23PT_DL_EST_IND){
+ // Drop the new service request message.
+ // This is probably a late SABM coming through
+ DBG_WARNING("Late SABM on CMSrvReq, entry_id %d\n", msInMsg->entry_id);
+ DBG_LEAVE();
+ return;
+ }
+ else if(msInMsg->primitive_type == L23PT_DL_DATA_IND){
+ DBG_TRACE("CMServiceReq in DL_DATA_IND, entry_id: %d\n", msInMsg->entry_id);
+ sendCMServiceAccept(mmId);
+ DBG_LEAVE();
+ return;
+ }
+ }
+
+ if ((mmId = initNewConn( msInMsg->entry_id, msInMsg->lapdm_oid,
+ msInMsg->sapi, MM_PROC_MOB_ORIG))
+ == JCC_ERROR)
+ {
+ DBG_ERROR("Problem creating NewConn for Entry Id %d\n", msInMsg->entry_id);
+ sendIntRRMsg (msInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ DBG_LEAVE();
+ return;
+ }
+
+ mmEntries[mmId].cmServReq = *cmServReq; // copy cmServiceRequest
+
+ if(ludbId == JCC_ERROR){ // not found in LUDB
+ sendLocUpInCMServReq(cmServReq->mobileId, mmId);
+ DBG_LEAVE();
+ return;
+ }
+ else
+ mmEntries[mmId].ludbId = ludbId;
+
+ MMProceedCMServiceReqAuth(mmId);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+// important! mmId should be valid at this point
+void MMCMServiceCleanUp(short mmId)
+{
+ DBG_FUNC("MMCMServiceCleanUp", MM_LAYER);
+ DBG_ENTER();
+ sendIntRRMsg(mmEntries[mmId].entryId, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ entryDealloc(mmId);
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MMProceedCMServiceReqAuth(short mmId)
+{
+ DBG_FUNC("MMProceedCMServiceReqAuth", MM_LAYER);
+ DBG_ENTER();
+
+ short ludb_id = mmEntries[mmId].ludbId;
+ if(mmEntries[mmId].cmServReq.cmServiceType.serviceType
+ == CNI_RIL3_CM_SERVICE_TYPE_SHORT_MESSAGE_SERVICE){
+ // check profile
+ if(!ludbIsProvSMS_MO(ludb_id)){
+ sendCMServRej(mmEntries[mmId].oid, mmEntries[mmId].sapi, mmEntries[mmId].entryId,
+ CNI_RIL3_REJECT_REQUESTED_SERVICE_OPTION_NOT_SUBSCRIBED);
+ DBG_LEAVE();
+ return;
+ }
+ }
+ if(ludb_auth_required){
+ // authentication
+ DBG_TRACE("Authentication mmEntry[%d]\n", mmId);
+ mmEntries[mmId].procData.mmState = MM_AUTH_ORIG;
+ short ret = ludbCheckAuthCount(ludb_id);
+ if(ret == 0){ // okay to use the cureent security key
+ DBG_TRACE("Reuse Security Key for ludb %d\n", ludb_id);
+
+ if(mmEntries[mmId].cmServReq.cipherKey.keySeq == ludbCKSN(ludb_id)){
+ DBG_TRACE("Skip Auth for mmId: %d\n", mmId);
+ MMProceedCMServiceReqCipher(mmId);
+ }
+ else{
+ DBG_TRACE("mobile returned cksn %d, differ from ludbcksn %d\n",
+ mmEntries[mmId].cmServReq.cipherKey.keySeq,
+ ludbCKSN(ludb_id));
+ sendAuthReqToMobile(mmId, ludb_id);
+ }
+ }
+ else if(ret == 1){ // get a new set
+ DBG_TRACE("Get a new Security Key for mmId %d\n", mmId);
+ bool status = sendMobileSecInfoReqToLudb(mmId, ludb_id);
+ if(!status) {
+ DBG_ERROR("SecInfoReq to LUDB failed\n");
+ }
+ }
+ else if(ret == -1){
+ DBG_ERROR("possible error: ludb_id out of bound\n");
+ }
+ DBG_LEAVE();
+ return;
+ }
+
+ MMProceedCMServiceReqCipher(mmId);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MMProceedCMServiceReqCipher(short mmId)
+{
+ DBG_FUNC("MMProceedCMServiceReqCipher", MM_LAYER);
+ DBG_ENTER();
+
+ sendCipherCmdRecordToLudb(mmId, 0); // reset CipherCmdRecord in LUDB
+
+ if(mmCfg.mm_cipheringRequired){
+ // ciphering
+ DBG_TRACE("Ciphering mmEntry[%d]\n", mmId);
+ if(!sendRRCipherModeCmd(mmId, MM_PROC_MOB_ORIG)){
+
+ // error, clear the entry here.
+ }
+ DBG_LEAVE();
+ return;
+ }
+
+ MMProceedCMServiceReqAccept(mmId);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MMProceedCMServiceReqAccept(short mmId)
+{
+ DBG_FUNC("MMProceedCMServiceReqAccept", MM_LAYER);
+ DBG_ENTER();
+
+ if(sendCMServiceAccept(mmId)){
+ sendCMServiceReqToCC(mmId);
+ }
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_MD_IMSIDetachIndProc(
+ T_CNI_RIL3MM_MSG_IMSI_DETACH_INDICATION *imsiDetachInd,
+ T_CNI_RIL3MD_CCMM_MSG *msInMsg)
+{
+ DBG_FUNC("MM_MD_IMSIDetachIndProc", MM_LAYER);
+ DBG_ENTER();
+
+ if(!mmOpStatus){
+ printf("[MM] IMSI Detach ignored due to BTS operational status\n");
+ DBG_WARNING("[MM] IMSI Detach ignored due to BTS operational status\n");
+ sendIntRRMsg (msInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ DBG_LEAVE();
+ return;
+ }
+
+ if (imsiDetachInd->mobileId.ie_present)
+ {
+ if (imsiDetachInd->mobileId.mobileIdType == CNI_RIL3_IMSI)
+ {
+ T_CNI_RIL3_IE_MOBILE_ID mobileId = imsiDetachInd->mobileId;
+ sendMobileUnRegister(mobileId, msInMsg);
+ }
+ else
+ {
+ DBG_ERROR("A non-IMSI Mobile Id. is received for IMSI detach.\n");
+ }
+ }
+ else
+ {
+ // mobile Id doesn't exist.
+ DBG_ERROR("Mobile ID is not present for IMSI detach\n");
+ }
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+bool MM_IsSRESCorrect(short ludbId, T_CNI_RIL3_IE_AUTHENTICATION_PARAM_SRES *authSres)
+{
+ DBG_FUNC("MM_IsSRESCorrect", MM_LAYER);
+ DBG_ENTER();
+
+ if(ludbId == -1){
+ DBG_ERROR("IsSRESCorrect: invalid ludbId: %d\n", ludbId);
+ DBG_LEAVE();
+ return false;
+ }
+ T_AUTH_TRIPLET *triplet = ludbCurTriplet(ludbId);
+ if(triplet == 0){
+ DBG_ERROR("IsSRESCorrect: no triplet returned for ludbId: %d\n", ludbId);
+ DBG_LEAVE();
+ return false;
+ }
+ else{
+ bool same = true;
+ for(int i=0; i<SEC_SRES_LEN; i++){
+ if(((char *)&authSres->value)[i] != triplet->SRES[i]){
+ DBG_TRACE("IsSRESECorrect: SRES Mismatch!\n");
+ DBG_TRACE("LUDB MS\n");
+ for(int j=0; j<SEC_SRES_LEN; j++)
+ DBG_TRACE(" %02x %02x", ((char *)&authSres->value)[j],
+ triplet->SRES[j]);
+ same = false;
+ break;
+ }
+ }
+ DBG_LEAVE();
+ return same;
+ }
+}
+
+// ****************************************************************************
+void MM_MD_AuthRespProc(
+ T_CNI_RIL3MM_MSG_AUTHENTICATION_RESPONSE *authResponse,
+ T_CNI_RIL3MD_CCMM_MSG *msInMsg)
+{
+ DBG_FUNC("MM_MD_AuthRespProc", MM_LAYER);
+ DBG_ENTER();
+ short mmId, ludbId;
+ T_CNI_L3_ID irtMMId;
+
+ DBG_TRACE("received response: 0x%x\n", authResponse->authSres.value);
+ DBG_TRACE("\n");
+
+ if((irtMMId = CNI_RIL3_IRT_Get_MM_Id(msInMsg->entry_id)) == CNI_NULL_L3_ID){
+ DBG_ERROR("IRT Table Problem, entry_id: %d\n", msInMsg->entry_id);
+ DBG_LEAVE();
+ return;
+ }
+ else{
+ mmId = irtMMId.sub_id;
+
+ // Check validity of the MM Id.
+ if ((mmId < 0) || (mmId >= mmCfg.mm_max_mm_connections)){
+ DBG_WARNING("invalid mmId in irtTable for entryId: %d\n", msInMsg->entry_id);
+ DBG_LEAVE();
+ return;
+ }
+ }
+ mmEntries[mmId].authTimer->cancelTimer();
+ ludbId = mmEntries[mmId].ludbId;
+ // comparison with actual SRES value here.
+ bool same = MM_IsSRESCorrect(ludbId, &authResponse->authSres);
+ if(!same){
+ T_CNI_RIL3_IE_MOBILE_ID mobileId = mmEntries[mmId].mobileId;
+ sendAuthRejToMobile(mmId); // send AuthRej
+
+ if(mmEntries[mmId].procData.mmState == MM_AUTH_LOCUP){ // need to cleanup registration
+ mmEntries[mmId].procData.mmState = MM_WAIT4UNREG;
+ if(sendMobileUnRegReqToLudb(mobileId, mmId)) {
+ DBG_TRACE("MobileUnRegReq sent to Ludb successful for MM Id %d\n", mmId);
+ }
+ }
+
+ DBG_LEAVE();
+ return;
+ }
+
+ switch(mmEntries[mmId].procData.mmState){
+ case MM_AUTH_LOCUP:
+ MMProceedLocUpdateCipher(mmId, ludbId);
+ break;
+ case MM_AUTH_ORIG:
+ MMProceedCMServiceReqCipher(mmId);
+ break;
+ case MM_AUTH_TERM:
+ MMProceedRRPageRspCipher(mmId);
+ break;
+ default:
+ DBG_ERROR("unknown mm state in AuthRespProc %d\n",
+ mmEntries[mmId].procData.mmState);
+ }
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_MD_MMStatusProc(
+ T_CNI_RIL3MM_MSG_MM_STATUS *mmStatus,
+ T_CNI_RIL3MD_CCMM_MSG *msInMsg)
+{
+ DBG_FUNC("MM_MD_MMStatusProc", MM_LAYER);
+ DBG_ENTER();
+ short mmId = checkExistingEntry(msInMsg->entry_id);
+ if(mmId == JCC_ERROR){
+ DBG_WARNING("No existing mmEntry associated with MMStatus entryId %d\n",
+ msInMsg->entry_id);
+ DBG_LEAVE();
+ return;
+ }
+ DBG_TRACE("MMStatus for mmId %d\n", mmId);
+ if(mmStatus->rejectCause.ie_present)
+ DBG_TRACE("Received rejectCause 0x%x\n", mmStatus->rejectCause.causeValue);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_MD_MsgProc(T_CNI_RIL3MD_CCMM_MSG *msInMsg)
+{
+ DBG_FUNC("MM_MD_MsgProc", MM_LAYER);
+ DBG_ENTER();
+ if ((msInMsg->primitive_type != L23PT_DL_EST_IND)
+ &&(msInMsg->primitive_type != L23PT_DL_DATA_IND))
+ {
+ DBG_ERROR("Only EstInd or DataInd expected. Bad Primitive: %d\n",
+ msInMsg->primitive_type);
+ DBG_LEAVE();
+ return;
+ }
+
+ PostL3RecvMsLog(msInMsg->lapdm_oid, msInMsg->sapi, &msInMsg->l3_data);
+
+ // Decode the MS message.
+ T_CNI_RIL3MM_MSG msDecodedMsg; // MM message buffer
+
+
+ // call the Decoder function to decode the message
+ T_CNI_RIL3_RESULT result =
+ JCC_RIL3MM_Decode
+ (
+#ifdef _NO_ED
+ TRUE,
+#else
+ #ifdef _SOFT_MOB
+ !((msInMsg->lapdm_oid) < softMobLapdmOid[0]),
+ #endif
+#endif
+ &msInMsg->l3_data, // input encoded layer-3 msg
+ &msDecodedMsg // output decoded message
+ );
+
+ // check the encoding result before sending the message
+ if( result != CNI_RIL3_RESULT_SUCCESS)
+ {
+ // decoding error. Something wrong with the message. Switch on
+ // the return code to handle different types of error
+ switch(result)
+ {
+ case CNI_RIL3_MANDATORY_IE_MISSING:
+ // missing mandatory IE(s). This is a protocol violation from
+ // the peer layer-3 entity
+ sendMMStatusToMobile(msInMsg->lapdm_oid, msInMsg->sapi,
+ CNI_RIL3_REJECT_INVALID_MANDATORY_INFORMATION);
+ break;
+
+ case CNI_RIL3_INCORRECT_LENGTH:
+ // message length error.
+ break;
+
+ case CNI_RIL3_UNKNOWN_MESSAGE_TYPE:
+ sendMMStatusToMobile(msInMsg->lapdm_oid, msInMsg->sapi,
+ CNI_RIL3_REJECT_MESSAGE_TYPE_NON_EXISTENT);
+ break;
+
+ default:
+ break;
+ }
+
+ // the received message can not be decoded properly. handle the
+ // situation according to the state of the layer-3 entity.
+ DBG_ERROR("Decoding MS Message Problem. \n ");
+ // Protocol Error Action??
+ DBG_LEAVE();
+ return;
+ }
+
+ // decoded layer-3 message correctly.
+ // switch on the message type
+
+ switch(msDecodedMsg.header.message_type)
+ {
+ case CNI_RIL3MM_MSGID_LOCATION_UPDATING_REQUEST:
+ DBG_TRACE("Received MD msg - Location Update Request\n");
+ mmIncIMSIAttach(); // PM report
+ MM_MD_LocUpdateReqProc(&msDecodedMsg.locationUpdateRequest, msInMsg);
+ break;
+
+ case CNI_RIL3MM_MSGID_CM_SERVICE_REQUEST:
+ DBG_TRACE("Received MD msg - CM Service Request\n");
+ mmIncAttMOCalls(); // PM report
+ mmIncTrnSubIdIMSI(); // PM report
+ MM_MD_CMServiceReqProc(&msDecodedMsg.cmServiceRequest, msInMsg);
+ break;
+
+ // add IMSI detach. -gz
+ case CNI_RIL3MM_MSGID_IMSI_DETACH_INDICATION:
+ DBG_TRACE("Received MD msg - IMSI Detach Indication\n");
+ mmIncTrnSubIdIMSI(); // PM report
+ mmIncIMSIDetach(); // PM report
+ MM_MD_IMSIDetachIndProc(&msDecodedMsg.imsiDetachInd, msInMsg);
+ break;
+
+ // add indentity response. -gz
+ case CNI_RIL3MM_MSGID_IDENTITY_RESPONSE:
+ DBG_TRACE("Received MD msg - Identity Response\n");
+ MM_MD_IdentityRespProc(&msDecodedMsg.identityResponse, msInMsg);
+ break;
+
+ case CNI_RIL3MM_MSGID_AUTHENTICATION_RESPONSE:
+ DBG_TRACE("Received MD msg - Authentication Response\n");
+ MM_MD_AuthRespProc(&msDecodedMsg.authResponse, msInMsg);
+ break;
+
+ case CNI_RIL3MM_MSGID_CM_SERVICE_ABORT:
+ DBG_TRACE("Received MD msg - CM Service Abort\n");
+ MM_MD_CMServiceAbortProc(&msDecodedMsg.cmServiceAbort, msInMsg);
+ break;
+
+ case CNI_RIL3MM_MSGID_MM_STATUS:
+ DBG_TRACE("Received MD msg - MM Status\n");
+ MM_MD_MMStatusProc(&msDecodedMsg.mmStatus, msInMsg);
+ break;
+
+ default:
+ // log error
+ DBG_ERROR("Unexpected Message from MD, Msg Type: %d\n",
+ msDecodedMsg.header.message_type);
+ // Protocol Error Action ??
+ }
+ DBG_LEAVE();
+}
+
+
+
diff --git a/data/mnet/GP10/Host/mm/src/MMOamMsgProc.cpp b/data/mnet/GP10/Host/mm/src/MMOamMsgProc.cpp
new file mode 100644
index 0000000..f0cc42d
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/src/MMOamMsgProc.cpp
@@ -0,0 +1,142 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMOamMsgProc.cpp
+// Author(s) : Kevin Lim
+// Create Date : 07-23-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "taskLib.h"
+#include "stdLib.h"
+#include "string.h"
+#include "LOGGING/vcmodules.h"
+#include "LOGGING/vclogging.h"
+#include "oam_api.h"
+#include "ril3/ie_location_area_id.h"
+
+// MM Message Constants
+#include "MM/MMConfig.h"
+#include "MMTypes.h"
+#include "MM/MMInt.h"
+#include "MMUtil.h"
+#include "MMOamMsgProc.h"
+
+// OAM Config Data
+extern MobilityConfigData mmCfg;
+extern T_CNI_RIL3_IE_LOCATION_AREA_ID mmCfgLocId;
+extern int mmOpStatus;
+
+// Global variable for Message Queue
+extern MSG_Q_ID mmMsgQId;
+
+
+// ****************************************************************************
+void mmHandleOpStChanged(INT32 value)
+{
+ DBG_FUNC("mmHandleOpStChange", MM_LAYER);
+ DBG_ENTER();
+ if(mmOpStatus == 1){
+ if(value){
+ }
+ else{
+ // deactivate MM
+ mmOpStatus = 0;
+ mmDataInit();
+ }
+ }
+ else{
+ if(value){
+ // activate MM
+ mmOpStatus = 1;
+ }
+ else{
+ }
+ }
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_OAM_MsgProc(TrapMsg *trapMsg)
+{
+ DBG_FUNC("MM_OAM_MsgProc", MM_LAYER);
+ DBG_ENTER();
+
+ if(trapMsg->valType != VT_VALUE){
+ DBG_ERROR("Unexpected valType from OAM trap message: %d\n", trapMsg->valType);
+ DBG_LEAVE();
+ return;
+ }
+
+ switch(trapMsg->mibTag)
+ {
+/*
+ case MIB_mm_max_mm_connections:
+ DBG_TRACE("mm_max_mm_connections MIB Trap received\n");
+ mmCfgSetMaxMMConnections(trapMsg->val.varVal);
+ break;
+*/
+
+ case MIB_t3113:
+ DBG_TRACE("t3113 MIB Trap received\n");
+ mmCfgSetPagingT3113(trapMsg->val.varVal);
+ break;
+
+ case MIB_mm_authenticationRequired:
+ DBG_TRACE("mm_authentication_required MIB Trap received\n");
+ mmCfgSetAuthenticationRequired(trapMsg->val.varVal);
+ break;
+
+ case MIB_mm_cipheringRequired:
+ DBG_TRACE("mm_ciphering_required MIB Trap received\n");
+ mmCfgSetCipheringRequired(trapMsg->val.varVal);
+ break;
+
+ case MIB_mm_IMEICheckRequired:
+ DBG_TRACE("mm_imei_check_required MIB Trap received\n");
+ mmCfgSetIMEICheckRequired(trapMsg->val.varVal);
+ break;
+
+ case MIB_rm_nim_1_0:
+ DBG_TRACE("mm_imsi_requried MIB Trap received\n");
+ mmCfgSetIMSIRequired(trapMsg->val.varVal);
+ break;
+
+ case MIB_bts_mcc:
+ DBG_TRACE("mm_bts_mcc MIB Trap received\n");
+ mmConvertMCC(trapMsg->val.varVal);
+ break;
+
+ case MIB_bts_mnc:
+ DBG_TRACE("mm_bts_mnc MIB Trap received\n");
+ mmConvertMNC(trapMsg->val.varVal);
+ break;
+
+ case MIB_bts_lac:
+ DBG_TRACE("mm_bts_lac MIB Trap received\n");
+ mmConvertLAC(trapMsg->val.varVal);
+ break;
+
+ case MIB_bts_operationalState:
+ DBG_TRACE("mmOpStatus MIB Trap received\n");
+ mmHandleOpStChanged(trapMsg->val.varVal);
+ break;
+
+ default:
+ DBG_ERROR("Unexpected mib tag %d\n", trapMsg->mibTag);
+ }
+ DBG_LEAVE();
+}
diff --git a/data/mnet/GP10/Host/mm/src/MMPmProc.cpp b/data/mnet/GP10/Host/mm/src/MMPmProc.cpp
new file mode 100644
index 0000000..5c7326e
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/src/MMPmProc.cpp
@@ -0,0 +1,108 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMPmProc.cpp
+// Author(s) : Kevin Lim
+// Create Date : 07-27-99
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// function prototypes
+// *******************************************************************
+
+#include "stdio.h"
+#include "defs.h"
+#include "oam_api.h"
+#include "PM/pm_class.h"
+#include "MMPmProc.h"
+
+bool DEBUG_MM_PMSET = false;
+
+void mmIncAttTrnPaging()
+{
+ if(DEBUG_MM_PMSET)
+ printf("[MM] PM report added attTransOfPagingMessagesThePCH\n");
+ PM_CellMeasurement.attTransOfPagingMessagesThePCH.increment();
+}
+
+void mmIncUnsuccTrnPaging()
+{
+ if(DEBUG_MM_PMSET)
+ printf("[MM] PM report added unsuccTransOfPagingMessagesThePCH\n");
+ PM_CellMeasurement.unsuccTransOfPagingMessagesThePCH.increment();
+}
+
+void mmUpdMeanSuccPaging(int val)
+{
+ if(DEBUG_MM_PMSET)
+ printf("[MM] PM report updated meanDurationOfSuccPagingProcs\n");
+ PM_CellMeasurement.meanDurationOfSuccPagingProcs.addRecord(val);
+}
+
+void mmIncAttMOCalls()
+{
+ if(DEBUG_MM_PMSET)
+ printf("[MM] PM report added attMobileOriginatingCalls\n");
+ PM_CCMeasurement.attMobileOriginatingCalls.increment();
+}
+
+void mmIncAttMOEmergencyCalls()
+{
+ if(DEBUG_MM_PMSET)
+ printf("[MM] PM report added attMobileOriginatingEmergencyCalls\n");
+ PM_CCMeasurement.attMobileEmergencyCalls.increment();
+}
+
+void mmIncAttCipher()
+{
+ if(DEBUG_MM_PMSET)
+ printf("[MM] PM report added attCipheringModeControlProcs\n");
+ PM_CCMeasurement.attCipheringModeControlProcs.increment();
+}
+
+void mmIncSuccCipher()
+{
+ if(DEBUG_MM_PMSET)
+ printf("[MM] PM report added succCipheringModeControlProcs\n");
+ PM_CCMeasurement.succCipheringModeControlProcs.increment();
+}
+
+void mmUpdMeanLocUpTime(int val)
+{
+ if(DEBUG_MM_PMSET)
+ printf("[MM] PM report updated meanTimeToLocationUpdateService\n");
+ PM_CCMeasurement.meanTimeToLocationUpdateService.addRecord(val);
+}
+
+void mmIncTrnSubIdIMSI()
+{
+ if(DEBUG_MM_PMSET)
+ printf("[MM] PM report added transSubIdentifiedWithIMSI\n");
+ PM_CCMeasurement.transSubIdentifiedWithIMSI.increment();
+}
+
+void mmIncIMSIDetach()
+{
+ if(DEBUG_MM_PMSET)
+ printf("[MM] PM report added imsiDetachProcs\n");
+ PM_CCMeasurement.imsiDetachProcs.increment();
+}
+
+void mmIncIMSIAttach()
+{
+ if(DEBUG_MM_PMSET)
+ printf("[MM] PM report added imsiAttachProcs\n");
+ PM_CCMeasurement.imsiAttachProcs.increment();
+}
+
+
diff --git a/data/mnet/GP10/Host/mm/src/MMRmMsgProc.cpp b/data/mnet/GP10/Host/mm/src/MMRmMsgProc.cpp
new file mode 100644
index 0000000..5e00049
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/src/MMRmMsgProc.cpp
@@ -0,0 +1,615 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMRmMsgProc.cpp
+// Author(s) : Kevin Lim
+// Create Date : 07-26-99
+// Description :
+//
+// *******************************************************************
+
+// #define DEBUG_MM_HANDOVER
+// #define DEBUG_MM_HANDOVER_EFR
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "taskLib.h"
+#include "stdLib.h"
+#include "string.h"
+#include "tickLib.h"
+#include "LOGGING/vcmodules.h"
+#include "LOGGING/vclogging.h"
+#include "oam_api.h"
+
+#include "JCC/JCCUtil.h"
+#include "JCC/ludbApi.h"
+#include "ril3/ril3_common.h"
+
+// MM Message Constants
+#include "MMTypes.h"
+#include "MM/MMInt.h"
+#include "MMUtil.h"
+#include "MMRmMsgProc.h"
+#include "MMSendMsg.h"
+#include "MMMdMsgProc.h"
+#include "MMLudbMsgProc.h"
+#include "MMPmProc.h"
+#include "MMCcMsgProc.h"
+
+// Global Variable for current MM Connections
+extern MMEntry_t mmEntries[];
+
+// OAM Config Data
+extern MobilityConfigData mmCfg;
+extern short ludb_auth_required;
+extern int mmCfgCipherMT;
+
+extern T_CNI_RIL3MM_MSG mmToMSOutMsg; // MM output message buffer
+extern IntraL3Msg_t mmToCCOutMsg; // msg buffer - internal modules
+
+
+// ****************************************************************************
+// important! mmId should be valid at this point
+void MMRRPageRspCleanUp(short mmId)
+{
+ DBG_FUNC("MMRRPageRspCleanUp", MM_LAYER);
+ DBG_ENTER();
+ sendIntCCMsg(mmId, INTRA_L3_MM_EST_REJ, INTRA_L3_RR_PAGE_REQ);
+ entryDealloc(mmId);
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MMProceedRRPageRspAuth(short mmId)
+{
+ DBG_FUNC("MMProceedRRPageRspAuth", MM_LAYER);
+ DBG_ENTER();
+
+ if(ludb_auth_required){
+ // authentication
+ DBG_TRACE("Authentication mmEntry[%d]\n", mmId);
+ mmEntries[mmId].procData.mmState = MM_AUTH_TERM;
+ short ludb_id = mmEntries[mmId].ludbId;
+ short ret = ludbCheckAuthCount(ludb_id);
+ if(ret == 0){ // okay to use the cureent security key
+ DBG_TRACE("Reuse Security Key for ludb %d\n", ludb_id);
+
+ if(mmEntries[mmId].pageRsp.cipherKey.keySeq == ludbCKSN(ludb_id)){
+ DBG_TRACE("Skip Auth for mmId: %d\n", mmId);
+ MMProceedRRPageRspCipher(mmId);
+ }
+ else{
+ DBG_TRACE("mobile returned cksn %d, differ from ludbcksn %d\n",
+ mmEntries[mmId].pageRsp.cipherKey.keySeq,
+ ludbCKSN(ludb_id));
+ sendAuthReqToMobile(mmId, ludb_id);
+ }
+ }
+ else if(ret == 1){ // get a new set
+ DBG_TRACE("Get a new Security Key for mmId %d\n", mmId);
+ bool status = sendMobileSecInfoReqToLudb(mmId, ludb_id);
+ if(!status) {
+ DBG_ERROR("SecInfoReq to LUDB failed\n");
+ }
+ }
+ else if(ret == -1){
+ DBG_ERROR("possible error: ludb_id out of bound\n");
+ }
+ DBG_LEAVE();
+ return;
+ }
+
+ MMProceedRRPageRspCipher(mmId);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MMProceedRRPageRspCipher(short mmId)
+{
+ DBG_FUNC("MMProceedRRPageRspCipher", MM_LAYER);
+ DBG_ENTER();
+
+ sendCipherCmdRecordToLudb(mmId, 0); // reset CipherCmdRecord in LUDB
+
+ if(mmCfg.mm_cipheringRequired){
+ // ciphering
+ DBG_TRACE("Ciphering mmEntry[%d]\n", mmId);
+ if(!sendRRCipherModeCmd(mmId, MM_PROC_MOB_TERM)){
+
+ // error, clear the entry here.
+
+ }
+ DBG_LEAVE();
+ return;
+ }
+
+// MMProceedRRPageRspToCC(mmId);
+ MMProceedRRPageRspToVBLINK(mmId);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+
+void MMProceedRRPageRspToVBLINK(short mmId)
+{
+ DBG_FUNC("MMProceedRRPageRspToVBLINK", MM_LAYER);
+ DBG_ENTER();
+
+ short existInLudb = 0;
+ NonStdRasMessagePageResponse_t mmToVBLINKOutMsg;
+
+ if ((mmId < 0) || (mmId >= mmCfg.mm_max_mm_connections)){
+ DBG_ERROR("Invalid mmId %d, sendIntCCMsg aborted\n", mmId);
+ DBG_LEAVE();
+ return;
+ }
+
+ mmToVBLINKOutMsg.req_id = mmEntries[mmId].vblinkReqId;
+ mmToVBLINKOutMsg.need_profile = 0;
+
+ mmEntries[mmId].pageTimer->setTimer(mmCfg.mm_paging_t3113);
+ mmEntries[mmId].pagingTick = tickGet();
+
+ DBG_TRACE("PageResponse to VBLINK reqId(%x) need_p(%x)\n",
+ mmToVBLINKOutMsg.req_id,mmToVBLINKOutMsg.need_profile);
+
+ VBLinkPageResponse(&mmToVBLINKOutMsg);
+
+// mmEntries[mmId].procData.mmState = MM_CONN_EST;
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MMProceedRRPageRspToCC(short mmId)
+{
+ DBG_FUNC("MMProceedRRPageRspToCC", MM_LAYER);
+ DBG_ENTER();
+ DBG_TRACE("PageRspToCC mm_id = %d, ludb_id = %d",mmId, mmEntries[mmId].ludbId);
+ mmToCCOutMsg.l3_data.pageRsp = mmEntries[mmId].pageRsp;
+ sendIntCCMsg(mmId, INTRA_L3_MM_EST_CNF, INTRA_L3_RR_PAGE_RSP);
+ mmEntries[mmId].procData.mmState = MM_CONN_EST;
+ DBG_LEAVE();
+}
+
+
+// ****************************************************************************
+// For mobile termination call,
+// Find MM entry that requested RR connection.
+// Pass RR establish confirm to CC for the terminating mobile.
+// ****************************************************************************
+void MM_RM_RRPageRspProc(IntraL3Msg_t *rrInMsg)
+{
+ DBG_FUNC("MM_RM_RRPageRspProc", MM_LAYER);
+ DBG_ENTER();
+
+ // The connection entry for MM
+ short mmId;
+ short existInLudb = 0;
+
+ short ludbId = ludbGetEntryByMobileId(rrInMsg->l3_data.pageRsp.mobileId);
+
+ if( ludbId != JCC_ERROR){ // found in LUDB
+ existInLudb = 1;
+ }
+
+ if ((mmId = getEntry(rrInMsg->l3_data.pageRsp.mobileId)) == JCC_ERROR)
+ {
+ // Cleanup action - May need manual
+ // Problem
+ // send the clear request to the RRM -
+ sendIntRRMsg (rrInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+
+ DBG_WARNING("Unexpected/Late RREstabCnf, entry_id: %d\n", rrInMsg->entry_id);
+ DBG_LEAVE();
+ return;
+ }
+
+ DBG_TRACE("PageRsp for mmId: %d\n", mmId);
+
+ mmEntries[mmId].pageCCTimer->cancelTimer();
+ mmEntries[mmId].entryId = rrInMsg->entry_id;
+ mmEntries[mmId].pageRetries = 0;
+
+ unsigned long tick = tickGet();
+// printf("Paging start tick %d\n", mmEntries[mmId].pagingTick);
+// printf("Paging end tick %d\n", tick);
+ tick = tick - mmEntries[mmId].pagingTick;
+ mmUpdMeanSuccPaging(tick);
+
+ T_CNI_RIL3_IRT_ENTRY irtEntry;
+ irtEntry.entry_id = rrInMsg->entry_id;
+
+ if ( (CNI_RIL3_IRT_Get_Entry_by_Entry_ID(&irtEntry)) == false )
+ {
+ DBG_ERROR("IRT Table Problem, entry_id: %d\n", rrInMsg->entry_id);
+
+ // Cleanup action - May need manual
+ // Problem
+ // attempt to send the clear request to the RRM -
+ sendIntRRMsg (rrInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+
+ // send est rej.
+ getMobileId(mmId, mmToCCOutMsg.l3_data.pageReq.imsi);
+
+ MMRRPageRspCleanUp(mmId);
+ DBG_LEAVE();
+ return;
+ }
+
+ mmEntries[mmId].oid = irtEntry.lapdm_oid;
+ mmEntries[mmId].sapi = SAPI_MAIN;
+
+ T_CNI_L3_ID newId;
+ newId.msgq_id = mmMsgQId;
+ newId.sub_id = (unsigned short) mmId;
+ if (!(CNI_RIL3_IRT_Set_MM_Id(rrInMsg->entry_id, newId)))
+ {
+ DBG_ERROR("IRT Table Problem, entry_id: %d\n", rrInMsg->entry_id);
+
+ // Problem
+ // attempt to send the clear request to the RRM -
+ sendIntRRMsg (rrInMsg->entry_id,
+ INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ // send est rej.
+ getMobileId(mmId, mmToCCOutMsg.l3_data.pageReq.imsi);
+
+ MMRRPageRspCleanUp(mmId);
+ DBG_LEAVE();
+ return;
+ }
+
+ mmEntries[mmId].pageRsp = rrInMsg->l3_data.pageRsp;
+
+ if(!existInLudb){
+ sendLocUpInPageReq(rrInMsg->l3_data.pageRsp.mobileId, mmId);
+ DBG_ERROR("ludb not found on Page request\n ");
+ DBG_LEAVE();
+ return;
+ }
+ else
+ mmEntries[mmId].ludbId = ludbId;
+
+ MMProceedRRPageRspAuth(mmId);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+// For handover target
+// Find MM entry that requested RR connection.
+// Pass RR handover ack to CC for the target mobile.
+// ****************************************************************************
+void MM_RM_RRHOAckProc(IntraL3Msg_t *rrInMsg)
+{
+ DBG_FUNC("MM_RM_RRHOAckProc", MM_LAYER);
+ DBG_ENTER();
+
+ // The connection entry for MM
+ short mmId = rrInMsg->l3_data.handReqAck.mmId;
+
+ if ((mmId < 0) || (mmId >= mmCfg.mm_max_mm_connections))
+ {
+ // send the clear request to the RRM -
+ sendIntRRMsg (rrInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+
+ DBG_ERROR("RR->MM Error : Bad mmId in HOAck %d\n", mmId);
+ DBG_LEAVE();
+ return;
+ }
+
+ mmEntries[mmId].entryId = rrInMsg->entry_id;
+
+ T_CNI_RIL3_IRT_ENTRY irtEntry;
+ irtEntry.entry_id = rrInMsg->entry_id;
+
+ if((CNI_RIL3_IRT_Get_Entry_by_Entry_ID(&irtEntry)) == false)
+ {
+ DBG_ERROR("IRT Table Problem, entry_id: %d\n", rrInMsg->entry_id);
+
+ // attempt to send the clear request to the RRM -
+ sendIntRRMsg (rrInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+
+ // send handover rej.
+ sendIntCCMsg(mmId, INTRA_L3_MM_EST_REJ, INTRA_L3_RR_HANDOVER_REQ);
+ entryDealloc(mmId);
+
+ DBG_LEAVE();
+ return;
+ }
+
+ mmEntries[mmId].oid = irtEntry.lapdm_oid;
+ mmEntries[mmId].sapi = SAPI_MAIN;
+
+ T_CNI_L3_ID newId;
+ newId.msgq_id = mmMsgQId;
+ newId.sub_id = (unsigned short) mmId;
+ if(!(CNI_RIL3_IRT_Set_MM_Id(rrInMsg->entry_id, newId)))
+ {
+ DBG_ERROR("IRT Table Problem, entry_id: %d\n", rrInMsg->entry_id);
+
+ // attempt to send the clear request to the RRM -
+ sendIntRRMsg (rrInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+
+ // send handover rej.
+ sendIntCCMsg(mmId, INTRA_L3_MM_EST_REJ, INTRA_L3_RR_HANDOVER_REQ);
+ entryDealloc(mmId);
+
+ DBG_LEAVE();
+ return;
+ }
+
+ mmToCCOutMsg.l3_data = rrInMsg->l3_data;
+#ifdef DEBUG_MM_HANDOVER
+ printf("Recv Handover Command(in handReqAck) from RM: size %d\n",
+ rrInMsg->l3_data.handReqAck.handCmd.msgLength);
+ for(int i=0; i<rrInMsg->l3_data.handReqAck.handCmd.msgLength; i++){
+ printf(" %x", rrInMsg->l3_data.handReqAck.handCmd.buffer[i]);
+ }
+ printf("\n");
+ printf("Pass Handover Command(in handReqAck) to CC: size %d\n",
+ mmToCCOutMsg.l3_data.handReqAck.handCmd.msgLength);
+ for(int j=0; j<mmToCCOutMsg.l3_data.handReqAck.handCmd.msgLength; j++){
+ printf(" %x", mmToCCOutMsg.l3_data.handReqAck.handCmd.buffer[j]);
+ }
+ printf("\n");
+#endif
+
+ sendIntCCMsg(mmId, INTRA_L3_MM_EST_CNF, INTRA_L3_RR_HANDOVER_REQ_ACK);
+
+ mmEntries[mmId].procData.mmState = MM_CONN_EST;
+
+ //SMS <xxu:06-01-00> Begin
+ mmEntries[mmId].hoConn = true;
+ //SMS <xxu:06-01-00> End
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+// For mobile termination call, or handover target,
+// ****************************************************************************
+void MM_RM_RREstabCnfProc(IntraL3Msg_t *rrInMsg)
+{
+ DBG_FUNC("MM_RM_RREstabCnfProc", MM_LAYER);
+ DBG_ENTER();
+ switch(rrInMsg->message_type){
+ case INTRA_L3_RR_PAGE_RSP:
+ DBG_TRACE("Page Response Received.\n");
+ MM_RM_RRPageRspProc(rrInMsg);
+ break;
+ case INTRA_L3_RR_HANDOVER_REQ_ACK:
+ DBG_TRACE("HandOver Ack Received.\n");
+ MM_RM_RRHOAckProc(rrInMsg);
+ break;
+ default:
+ // Cleanup action - May need manual
+ // Problem
+ // send the clear request to the RRM -
+ sendIntRRMsg (rrInMsg->entry_id, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ DBG_ERROR("Unexpected Msg. from RR, Msg Type: %d\n",
+ rrInMsg->message_type);
+ }
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+// For handover target
+// Find MM entry that requested RR connection.
+// Pass RR handover nack to CC for the target mobile.
+// ****************************************************************************
+void MM_RM_RRHONackProc(IntraL3Msg_t *rrInMsg)
+{
+ DBG_FUNC("MM_RM_RRHONackProc", MM_LAYER);
+ DBG_ENTER();
+
+ short mmId = rrInMsg->l3_data.handReqNack.mmId;
+
+ if ((mmId < 0) || (mmId >= mmCfg.mm_max_mm_connections))
+ {
+ DBG_ERROR("RR->MM Error : Bad mmId in HONack %d\n", mmId);
+ DBG_LEAVE();
+ return;
+ }
+
+ mmToCCOutMsg.l3_data = rrInMsg->l3_data;
+
+ sendIntCCMsg(mmId, INTRA_L3_MM_EST_REJ, INTRA_L3_RR_HANDOVER_REQ_NACK);
+ entryDealloc(mmId);
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_RM_RREstabRejProc(IntraL3Msg_t *rrInMsg)
+{
+ DBG_FUNC("MM_RM_RREstabRejProc", MM_LAYER);
+ DBG_ENTER();
+ switch(rrInMsg->message_type){
+ case INTRA_L3_RR_HANDOVER_REQ_NACK:
+ DBG_TRACE("HandOver Nack Received.\n");
+ MM_RM_RRHONackProc(rrInMsg);
+ break;
+ default:
+ DBG_ERROR("Unexpected Msg. from RR, Msg Type: %d\n",
+ rrInMsg->message_type);
+ }
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_RM_RRRelIndProc(IntraL3Msg_t *rrInMsg)
+{
+ DBG_FUNC("MM_RM_RRRelIndProc", MM_LAYER);
+ DBG_ENTER();
+ T_CNI_L3_ID irtMMId;
+ // The connection entry for MM
+ short mmId;
+
+ if ( (irtMMId = CNI_RIL3_IRT_Get_MM_Id(rrInMsg->entry_id) )
+ == CNI_NULL_L3_ID )
+ {
+ // During Termination setup, entry id is null
+ // What can be done? - major error
+ // Only manual intervention
+ DBG_ERROR("IRT Table Problem, entry_id: %d\n", rrInMsg->entry_id);
+ DBG_LEAVE();
+ return;
+ }
+ else
+ {
+ mmId = irtMMId.sub_id;
+
+ // Check validity of the MM Id.
+ if ((mmId < 0) || (mmId >= mmCfg.mm_max_mm_connections))
+ {
+ DBG_TRACE("Unexpected/Late RRRelInd, entry_id: %d\n", rrInMsg->entry_id);
+ DBG_LEAVE();
+ return;
+ }
+ }
+
+ // Now send the Release Indication to the CC -
+ if(mmEntries[mmId].procData.procType != MM_PROC_LUDB){
+ mmEntries[mmId].cause = rrInMsg->cause;
+ sendIntCCMsg (mmId, INTRA_L3_MM_REL_IND, INTRA_L3_NULL_MSG);
+ }
+
+ if(mmEntries[mmId].procData.procType == MM_PROC_MOB_ORIG){
+ if(mmEntries[mmId].emerg_ludb){
+ sendRemoveEmergencyToLudb(mmId);
+ }
+ }
+
+ // Deallocate the MM entry
+ entryDealloc(mmId);
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_RM_CipherModeCmpProc(IntraL3Msg_t *rrInMsg)
+{
+ DBG_FUNC("MM_RM_CipherModeCmpProc", MM_LAYER);
+ DBG_ENTER();
+ T_CNI_L3_ID irtMMId;
+ // The connection entry for MM
+ short mmId;
+
+ if ( (irtMMId = CNI_RIL3_IRT_Get_MM_Id(rrInMsg->entry_id) )
+ == CNI_NULL_L3_ID )
+ {
+ // During Termination setup, entry id is null
+ // What can be done? - major error
+ // Only manual intervention
+ DBG_ERROR("IRT Table Problem, entry_id: %d\n", rrInMsg->entry_id);
+ DBG_LEAVE();
+ return;
+ }
+ else
+ {
+ mmId = irtMMId.sub_id;
+
+ // Check validity of the MM Id.
+ if ((mmId < 0) || (mmId >= mmCfg.mm_max_mm_connections))
+ {
+ DBG_WARNING("wrong entry_id for CipherModeCmp: %d\n", rrInMsg->entry_id);
+ DBG_LEAVE();
+ return;
+ }
+ }
+
+ // check if expecting this
+ if(mmEntries[mmId].procData.mmState == MM_CIPHER_CMD){
+ mmEntries[mmId].authTimer->cancelTimer();
+ mmIncSuccCipher(); // PM report
+ switch(mmEntries[mmId].procData.procType){
+ case MM_PROC_MOB_ORIG:
+ sendCMServiceReqToCC(mmId);
+ break;
+ case MM_PROC_MOB_TERM:
+ MMProceedRRPageRspToVBLINK(mmId);
+ // MMProceedRRPageRspToCC(mmId);
+ break;
+ default:
+ DBG_ERROR("unknown mm proc state in CipherModeComplete %d\n",
+ mmEntries[mmId].procData.procType);
+ }
+ }
+ else{
+ DBG_ERROR("MM entry %d not expecting CipherModeComplete message\n", mmId);
+ }
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_RM_L3DataProc(IntraL3Msg_t *rrInMsg)
+{
+ DBG_FUNC("MM_RM_L3DataProc", MM_LAYER);
+ DBG_ENTER();
+ switch(rrInMsg->message_type){
+ case INTRA_L3_RR_CIPHER_COMPLETE:
+ DBG_TRACE("Received RR->MM - CIPHER_COMPLETE, entry_id: %d\n",
+ rrInMsg->entry_id);
+ MM_RM_CipherModeCmpProc(rrInMsg);
+ break;
+ default:
+ DBG_ERROR("Unexpected Msg Type from RR: %d\n",
+ rrInMsg->message_type);
+
+ }
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void MM_RM_MsgProc(IntraL3Msg_t *rrInMsg)
+{
+ DBG_FUNC("MM_RM_MsgProc", MM_LAYER);
+ DBG_ENTER();
+
+ switch (rrInMsg->primitive_type)
+ {
+ case INTRA_L3_RR_EST_CNF:
+ DBG_TRACE("Received RR->MM - Estab Confirm, entry_id: %d\n",
+ rrInMsg->entry_id);
+ MM_RM_RREstabCnfProc(rrInMsg);
+ break;
+
+ case INTRA_L3_RR_EST_REJ:
+ DBG_TRACE("Received RR->MM - Estab Reject, entry_id: %d\n",
+ rrInMsg->entry_id);
+ MM_RM_RREstabRejProc(rrInMsg);
+ break;
+
+ case INTRA_L3_RR_REL_CNF:
+ DBG_TRACE("Received RR->MM - Release Confirm, entry_id: %d\n",
+ rrInMsg->entry_id);
+ break;
+
+ case INTRA_L3_RR_REL_IND:
+ DBG_TRACE("Received RR->MM - Release Indication, entry_id: %d\n",
+ rrInMsg->entry_id);
+ MM_RM_RRRelIndProc(rrInMsg);
+ break;
+
+ case INTRA_L3_DATA:
+ MM_RM_L3DataProc(rrInMsg);
+ break;
+
+ default:
+ DBG_ERROR("Unexpected Msg Primitive from RR: %d\n",
+ rrInMsg->primitive_type);
+ }
+ DBG_LEAVE();
+}
diff --git a/data/mnet/GP10/Host/mm/src/MMSendMsg.cpp b/data/mnet/GP10/Host/mm/src/MMSendMsg.cpp
new file mode 100644
index 0000000..6e3cb92
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/src/MMSendMsg.cpp
@@ -0,0 +1,269 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMSendMsg.cpp
+// Author(s) : Kevin Lim
+// Create Date : 07-26-99
+// Description :
+//
+// *******************************************************************
+
+// #define DEBUG_MM_HANDOVER
+// #define DEBUG_MM_HANDOVER_EFR
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+//#define DISABLE_MD_DOWN_MSG
+
+#include "taskLib.h"
+#include "stdLib.h"
+#include "string.h"
+#include "LOGGING/vcmodules.h"
+#include "LOGGING/vclogging.h"
+#include "oam_api.h"
+
+// included L3 Message header for messages from other Layer 3 modules (CC, RR)
+#include "JCC/JCCL3Msg.h"
+
+#include "JCC/JCCUtil.h"
+
+#include "ril3/ril3_common.h"
+
+// MM Message Constants
+#include "MMTypes.h"
+#include "MM/MMInt.h"
+#include "MMUtil.h"
+#include "MMCcMsgProc.h"
+
+T_CNI_RIL3MM_MSG mmToMSOutMsg; // MM output message buffer
+IntraL3Msg_t mmToCCOutMsg; // msg buffer - internal modules
+IntraL3Msg_t mmToRROutMsg; // msg buffer - internal modules
+
+// Need to include RR Message Queue
+#ifndef _NO_RRM
+extern MSG_Q_ID rm_MsgQId;
+#endif
+
+// OAM Config Data
+extern MobilityConfigData mmCfg;
+
+// Global Variable for current MM Connections
+extern MMEntry_t mmEntries[];
+
+
+// ****************************************************************************
+void buildMSMsgCommon()
+{
+ // But, before we start populating the message content,
+ // zap it clean first.
+ CNI_RIL3_ZAPMSG(&mmToMSOutMsg, sizeof(T_CNI_RIL3MM_MSG));
+
+ // header portion --------------------------------------------------
+ mmToMSOutMsg.header.protocol_descriminator = CNI_RIL3_PD_MM;
+ mmToMSOutMsg.header.si_ti = 0;
+}
+
+// ****************************************************************************
+T_CNI_RIL3_RESULT sendMSMsg(T_CNI_LAPDM_OID oid,
+ T_CNI_LAPDM_SAPI sapi)
+{
+ DBG_FUNC("sendMSMsg", MM_LAYER);
+ DBG_ENTER();
+ T_CNI_LAPDM_L3MessageUnit msEncodedMsg;
+
+ // call the Encoder function to encode the message
+ T_CNI_RIL3_RESULT
+ result = CNI_RIL3MM_Encode( &mmToMSOutMsg, // input message definition
+ &msEncodedMsg // encoded layer-3 message
+ );
+
+ // check the encoding result before sending the message
+ if (result == CNI_RIL3_RESULT_SUCCESS) {
+#ifdef DISABLE_MD_DOWN_MSG
+ return result;
+#endif
+
+ // encoding successful, send the message to LAPDm for delivery
+ #ifdef _SOFT_MOB
+ if (oid < softMobLapdmOid[0])
+ #endif
+ PostL3SendMsLog(oid, sapi, &msEncodedMsg);
+ CNI_LAPDM_Dl_Data_Request( oid,
+ sapi,
+ // CT_FACCH_F, CT_SDCCH,
+ &msEncodedMsg);
+
+ DBG_TRACE("Sent Message to LAPDm, Msg Type: %s\n",
+ getRIL3MMTypeStr(mmToMSOutMsg.header.message_type));
+ }
+ else {
+ DBG_ERROR("Encoding MS Message Problem. %d \n ", result);
+ }
+
+ DBG_LEAVE();
+ return result;
+}
+
+// ****************************************************************************
+void sendIntRRMsg ( T_CNI_IRT_ID entryId,
+ IntraL3PrimitiveType_t prim,
+ IntraL3MsgType_t msgType)
+{
+ DBG_FUNC("sendIntRRMsg", MM_LAYER);
+ DBG_ENTER();
+ #ifndef _NO_RRM
+
+ mmToRROutMsg.module_id = MODULE_MM;
+ mmToRROutMsg.primitive_type = prim;
+ mmToRROutMsg.message_type = msgType;
+
+ mmToRROutMsg.entry_id = entryId;
+
+ // send the message.
+
+ #ifdef _SOFT_MOB
+ if ((entryId < softMobEntryId[0]) ||
+ (entryId > softMobEntryId[CC_MAX_CC_CALLS - 1]))
+ #endif
+ if (ERROR == msgQSend( rm_MsgQId,
+ (char *) &mmToRROutMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT,
+ MSG_PRI_NORMAL
+ )) {
+ DBG_ERROR("sendIntRRMsg msgQSend (QID=%d) error\n ", (int)rm_MsgQId);
+ }
+ else {
+ DBG_TRACE("Sent msg to RR, Prim: %s, Msg: %s\n",
+ getMMPrimStr(prim), getMMMsgTypeStr(msgType));
+ }
+
+ #endif
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void sendIntRRDataMsg ( T_CNI_IRT_ID entryId,
+ IntraL3PrimitiveType_t prim,
+ IntraL3MsgType_t msgType,
+ IntraL3MsgData_t l3_data)
+{
+ DBG_FUNC("sendIntRRDataMsg", MM_LAYER);
+ DBG_ENTER();
+
+ mmToRROutMsg.module_id = MODULE_MM;
+ mmToRROutMsg.primitive_type = prim;
+ mmToRROutMsg.message_type = msgType;
+ mmToRROutMsg.l3_data = l3_data;
+
+ mmToRROutMsg.entry_id = entryId;
+
+ // send the message.
+ if (ERROR == msgQSend( rm_MsgQId,
+ (char *) &mmToRROutMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT,
+ MSG_PRI_NORMAL
+ )) {
+ DBG_ERROR("sendIntRRMsg msgQSend (QID=%d) error\n ", (int)rm_MsgQId);
+ }
+ else {
+ DBG_TRACE("Sent msg to RR, Prim: %s, Msg: %s\n",
+ getMMPrimStr(prim), getMMMsgTypeStr(msgType));
+ }
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void sendIntCCMsg ( short mmId,
+ IntraL3PrimitiveType_t prim,
+ IntraL3MsgType_t msgType)
+{
+ DBG_FUNC("sendIntCCMsg", MM_LAYER);
+ DBG_ENTER();
+
+ MSG_Q_ID msgQforCC;
+ if ((mmId < 0) || (mmId >= mmCfg.mm_max_mm_connections)){
+ DBG_ERROR("Invalid mmId %d, sendIntCCMsg aborted\n", mmId);
+ DBG_LEAVE();
+ return;
+ }
+ else if(mmEntries[mmId].procData.procType == MM_PROC_MOB_TERM){
+ msgQforCC = mmEntries[mmId].ccQId;
+ }
+ else{
+ T_CNI_L3_ID ccId = CNI_RIL3_IRT_Get_CC_Id(mmEntries[mmId].entryId);
+ msgQforCC = ccId.msgq_id;
+ }
+ mmToCCOutMsg.module_id = MODULE_MM;
+ mmToCCOutMsg.primitive_type = prim;
+ mmToCCOutMsg.message_type = msgType;
+ mmToCCOutMsg.cause = mmEntries[mmId].cause;
+
+ mmToCCOutMsg.entry_id = mmEntries[mmId].entryId;
+ if((prim == INTRA_L3_MM_EST_REJ)&&(msgType == INTRA_L3_RR_PAGE_REQ))
+ mmToCCOutMsg.l3_data.pageReq = mmEntries[mmId].pageReq;
+
+ // send the message.
+ #ifndef _NO_CC
+ if (ERROR == msgQSend( msgQforCC,
+ (char *) &mmToCCOutMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT,
+ MSG_PRI_NORMAL
+ )) {
+ DBG_ERROR("sendIntCCMsg msgQSend (QID=%d) error\n ", (int)msgQforCC);
+ }
+ else {
+ DBG_TRACE("Sent msg to CC, Prim: %s, Msg: %s\n",
+ getMMPrimStr(prim), getMMMsgTypeStr(msgType));
+ DBG_TRACE(" mmId: %d, mmState: %s\n", mmId, getMMEntryState(mmId));
+ DBG_TRACE(" msgQforCC: %x\n", msgQforCC);
+ }
+
+ #endif
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+void bounceIntCCMsg ( MSG_Q_ID msgQforCC,
+ IntraL3PrimitiveType_t prim,
+ IntraL3MsgType_t msgType)
+{
+ DBG_FUNC("bounceIntCCMsg", MM_LAYER);
+ DBG_ENTER();
+
+ mmToCCOutMsg.module_id = MODULE_MM;
+ mmToCCOutMsg.primitive_type = prim;
+ mmToCCOutMsg.message_type = msgType;
+ mmToCCOutMsg.entry_id = -1;
+
+ // send the message to CC using given message queue.
+ #ifndef _NO_CC
+ if (ERROR == msgQSend( msgQforCC,
+ (char *) &mmToCCOutMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT,
+ MSG_PRI_NORMAL
+ )) {
+ DBG_ERROR("bounceIntCCMsg msgQSend (QID=%d) error\n ", (int)msgQforCC);
+ }
+ else {
+ DBG_TRACE("Sent msg to CC, Prim: %s, Msg: %s\n",
+ getMMPrimStr(prim), getMMMsgTypeStr(msgType));
+ }
+
+ #endif
+ DBG_LEAVE();
+}
diff --git a/data/mnet/GP10/Host/mm/src/MMSysCmdProc.cpp b/data/mnet/GP10/Host/mm/src/MMSysCmdProc.cpp
new file mode 100644
index 0000000..f805c4a
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/src/MMSysCmdProc.cpp
@@ -0,0 +1,107 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMSysCmdProc.cpp
+// Author(s) : Kevin Lim
+// Create Date : 07-26-99
+// Description :
+//
+// *******************************************************************
+
+// #define DEBUG_MM_HANDOVER
+// #define DEBUG_MM_HANDOVER_EFR
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "taskLib.h"
+#include "stdLib.h"
+#include "string.h"
+#include "LOGGING/vcmodules.h"
+#include "LOGGING/vclogging.h"
+
+#include "oam_api.h"
+#include "Os/JCTask.h"
+#include "Os/JCModule.h"
+#include "GP10OsTune.h"
+
+// MM Message Constants
+#include "MM/MMConfig.h"
+#include "MMTypes.h"
+#include "MM/MMInt.h"
+#include "MMUtil.h"
+#include "MMSysCmdProc.h"
+#include "MMTask.h"
+
+
+
+
+extern int mmMain();
+extern JCTask mmTaskObj;
+
+// forward declarations
+MSG_Q_ID createMMMsgQ();
+
+// ****************************************************************************
+int SysCommand_MM(T_SYS_CMD action)
+{
+ int tid;
+ int number = 20;
+ switch(action){
+ case SYS_SHUTDOWN:
+ printf("[MM] Received system shutdown notification\n");
+ mmDataPrint(number);
+ break;
+ case SYS_START:
+ printf("[MM] Received task start notification\n");
+ createMMMsgQ();
+ mmInitialize();
+ tid = mmTaskObj.JCTaskSpawn(
+ MM_TASK_PRIORITY,
+ MM_TASK_OPTION,
+ MM_TASK_STACK_SIZE,
+ (FUNCPTR)mmMain,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ MODULE_MM, JC_CRITICAL_TASK);
+ break;
+ case SYS_REBOOT:
+ printf("[MM] Reboot ready.\n");
+ break;
+
+ default:
+ printf("[MM] Unknown system command received\n");
+ }
+ return 0;
+}
+
+// ****************************************************************************
+MSG_Q_ID createMMMsgQ()
+{
+ // create message queue and put the message queue ID in a global
+ // variable so that all the Layer-3 Interface API functions can send
+ // message to this queue
+
+ DBG_FUNC("createMMMsgQ", MM_LAYER);
+ DBG_ENTER();
+
+ mmMsgQId = msgQCreate( MM_MAX_L3_MSGS, // max number of messages
+ MM_MAX_MSG_LENGTH, // size of each message
+ MSG_Q_FIFO // option for msg queue
+ );
+ if(mmMsgQId == NULL){
+ DBG_ERROR("msgQCreate error\n");
+ }
+ DBG_LEAVE();
+
+ return(mmMsgQId);
+}
+
diff --git a/data/mnet/GP10/Host/mm/src/MMTask.cpp b/data/mnet/GP10/Host/mm/src/MMTask.cpp
new file mode 100644
index 0000000..cb85894
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/src/MMTask.cpp
@@ -0,0 +1,321 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMTask.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "taskLib.h"
+#include "stdLib.h"
+#include "string.h"
+#include "LOGGING/vcmodules.h"
+#include "LOGGING/vclogging.h"
+#include "oam_api.h"
+#include "Os/JCTask.h"
+
+// included L3 Message header for messages from other Layer 3 modules (CC, RR)
+#include "JCC/JCCL3Msg.h"
+
+#include "JCC/JCCUtil.h"
+#include "JCC/JCCTimer.h"
+#include "JCC/LudbMMMsgProc.h"
+
+#include "ril3/ril3_common.h"
+
+// MM Message Constants
+#include "MM/MMConfig.h"
+#include "MMTypes.h"
+#include "MM/MMInt.h"
+#include "MMUtil.h"
+#include "MMCcMsgProc.h"
+#include "MMMdMsgProc.h"
+#include "MMOamMsgProc.h"
+#include "MMRmMsgProc.h"
+#include "MMSysCmdProc.h"
+#include "MMTimerProc.h"
+#include "MMSendMsg.h"
+#include "MMLudbMsgProc.h"
+#include "MMVblinkMsgProc.h"
+#include "MMBssgpMsgProc.h"
+
+// OAM Config Data
+extern MobilityConfigData mmCfg;
+
+// Global Variable for current MM Connections
+extern MMEntry_t mmEntries[];
+
+// Global variable for Message Queue
+extern MSG_Q_ID mmMsgQId;
+
+// Used by RRM to create IRT entries.
+extern T_CNI_L3_ID mm_id;
+
+JCTask mmTaskObj("MMTask");
+
+// ****************************************************************************
+int MMPageTimeout(int timerData)
+{
+ DBG_FUNC("MMPageTimeout", MM_LAYER);
+ DBG_ENTER();
+ //
+ // The timerData parameter is of 4 bytes long
+ //
+ // When timer is fired and this function is called by the System Clock ISR,
+ // the timerData is passed back.
+
+ // format a timer expiration message and send to the CC/MM task that
+ // is using the timer.
+
+ IntraL3Msg_t timeoutMsg;
+
+ timeoutMsg.module_id = MODULE_MM;
+ timeoutMsg.entry_id = timerData;
+
+ timeoutMsg.message_type = INTRA_L3_TIMEOUT_MSG;
+ ((char *)&timeoutMsg.l3_data)[0] = 1; // 1 for page
+
+ // send the message. Since this is invoked by the System Clock ISR,
+ // we do NOT want to wait for the message delivery.
+ // Return it right away if cannot send on the message queue.
+ if (ERROR == msgQSend( mmMsgQId,
+ (char *) &timeoutMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT, // this is called by ISR, don't wait
+ MSG_PRI_NORMAL
+ ))
+ {
+ DBG_ERROR("Page Timer Expiry msgQSend (QID=%d) error\n", (int)mmMsgQId);
+ }
+
+ DBG_LEAVE();
+ return 0;
+}
+
+// ****************************************************************************
+// shmin
+int MMPageCCTimeout(int timerData)
+{
+ DBG_FUNC("MMPageCCTimeout", MM_LAYER);
+ DBG_ENTER();
+
+ IntraL3Msg_t timeoutMsg;
+
+ timeoutMsg.module_id = MODULE_MM;
+ timeoutMsg.entry_id = timerData;
+ timeoutMsg.message_type = INTRA_L3_TIMEOUT_MSG;
+
+ ((char *)&timeoutMsg.l3_data)[0] = 4;
+
+ if (ERROR == msgQSend( mmMsgQId,
+ (char *) &timeoutMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT, // this is called by ISR, don't wait
+ MSG_PRI_NORMAL
+ ))
+ {
+ DBG_ERROR("Page CC Timer Expiry msgQSend (QID=%d) error\n", (int)mmMsgQId);
+ }
+
+ DBG_LEAVE();
+ return 0;
+}
+
+// ****************************************************************************
+int MMAuthTimeout(int timerData)
+{
+ DBG_FUNC("MMAuthTimeout", MM_LAYER);
+ DBG_ENTER();
+
+ IntraL3Msg_t timeoutMsg;
+
+ timeoutMsg.module_id = MODULE_MM;
+ timeoutMsg.entry_id = timerData;
+
+ timeoutMsg.message_type = INTRA_L3_TIMEOUT_MSG;
+ ((char *)&timeoutMsg.l3_data)[0] = 2; // 2 for auth
+
+ if (ERROR == msgQSend( mmMsgQId,
+ (char *) &timeoutMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT, // this is called by ISR, don't wait
+ MSG_PRI_NORMAL
+ ))
+ {
+ DBG_ERROR("Auth Timer Expiry msgQSend (QID=%d) error\n", (int)mmMsgQId);
+ }
+
+ DBG_LEAVE();
+ return 0;
+}
+
+// ****************************************************************************
+int MMIdentTimeout(int timerData)
+{
+ DBG_FUNC("MMIdentTimeout", MM_LAYER);
+ DBG_ENTER();
+
+ IntraL3Msg_t timeoutMsg;
+
+ timeoutMsg.module_id = MODULE_MM;
+ timeoutMsg.entry_id = timerData;
+
+ timeoutMsg.message_type = INTRA_L3_TIMEOUT_MSG;
+ ((char *)&timeoutMsg.l3_data)[0] = 3; // 3 for identity request
+
+ if (ERROR == msgQSend( mmMsgQId,
+ (char *) &timeoutMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT, // this is called by ISR, don't wait
+ MSG_PRI_NORMAL
+ ))
+ {
+ DBG_ERROR("Ident Timer Expiry msgQSend (QID=%d) error\n", (int)mmMsgQId);
+ }
+
+ DBG_LEAVE();
+ return 0;
+}
+
+// ****************************************************************************
+int MMMultiPgTimeout(int timerData)
+{
+ DBG_FUNC("MMAuthTimeout", MM_LAYER);
+ DBG_ENTER();
+
+ IntraL3Msg_t timeoutMsg;
+
+ timeoutMsg.module_id = MODULE_MM;
+ timeoutMsg.entry_id = timerData;
+
+ timeoutMsg.message_type = INTRA_L3_TIMEOUT_MSG;
+ ((char *)&timeoutMsg.l3_data)[0] = 3; // 3 for multiple page
+
+ if (ERROR == msgQSend( mmMsgQId,
+ (char *) &timeoutMsg,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT, // this is called by ISR, don't wait
+ MSG_PRI_NORMAL
+ ))
+ {
+ DBG_ERROR("Auth Timer Expiry msgQSend (QID=%d) error\n", (int)mmMsgQId);
+ }
+
+ DBG_LEAVE();
+ return 0;
+}
+
+// ****************************************************************************
+// Data Structure Initialization
+void mmInitialize()
+{
+ short i;
+
+ mmCfgRead();
+
+ for(i=0; i< mmCfg.mm_max_mm_connections;i++)
+ {
+ mmEntries[i].pageTimer = new JCCTimer( (FUNCPTR)MMPageTimeout, i );
+ mmEntries[i].authTimer = new JCCTimer( (FUNCPTR)MMAuthTimeout, i );
+ mmEntries[i].pageRetries = 0;
+ mmEntries[i].identTimer = new JCCTimer( (FUNCPTR)MMIdentTimeout, i);
+ mmEntries[i].pageCCTimer = new JCCTimer( (FUNCPTR)MMPageCCTimeout, i); //shmin
+
+ entryInit(mmEntries[i]);
+ }
+
+ //Initialize for RRM to enter into IRT
+ mm_id.msgq_id = mmMsgQId;
+ mm_id.sub_id = (unsigned short)mmCfg.mm_max_mm_connections;
+}
+
+
+// ****************************************************************************
+// entry function for the MM Module (VxWorks Task)
+int mmMain()
+{
+
+ DBG_FUNC("mmMain", MM_LAYER);
+ DBG_ENTER();
+
+ // local message queue buffer
+ char MsgBuf[MM_MAX_MSG_LENGTH];
+
+ // enter infinite loop to wait for message and process message from MS
+ // or other layer-3 modules
+
+ mmTaskObj.JCTaskEnterLoop();
+
+ while(true)
+ {
+ //
+ if(msgQReceive(mmMsgQId, MsgBuf, MM_MAX_MSG_LENGTH, WAIT_FOREVER)==ERROR)
+ {
+ // failed to receive message. VxWorks error. Abort the task.
+ DBG_ERROR("msgQReceive error\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ // action based on the sending module
+ //
+ switch (MsgBuf[0]) {
+ case T_CNI_MD_ID:
+ MM_MD_MsgProc((T_CNI_RIL3MD_CCMM_MSG *)MsgBuf);
+ break;
+
+ case MODULE_RM:
+ MM_RM_MsgProc((IntraL3Msg_t *)MsgBuf);
+ break;
+
+ case MODULE_CC:
+ MM_CC_MsgProc((IntraL3Msg_t *)MsgBuf);
+ break;
+
+ case MODULE_MM:
+ MM_TIMER_MsgProc((IntraL3Msg_t *)MsgBuf);
+ break;
+
+ case MODULE_LUDB:
+ MM_Ludb_MsgProc((LudbMsgStruct *)MsgBuf);
+ break;
+
+ case MODULE_OAM:
+ MM_OAM_MsgProc((TrapMsg *)MsgBuf);
+ break;
+
+ case MODULE_VBLINK: // shmin
+ MM_VBLINK_MsgProc((VblinkMsg_t *)MsgBuf);
+ break;
+
+ case MODULE_BSSGP:
+ MM_Bssgp_MsgProc((BSSGP_API_MSG *)MsgBuf);
+ break;
+
+ default:
+ DBG_ERROR("MM Error: Message from unexpected Module: %d\n", MsgBuf[0]);
+ DBG_LEAVE();
+ return ERROR;
+ }
+ }
+ mmTaskObj.JCTaskNormExit();
+ DBG_LEAVE();
+ return 0;
+}
+
+
+
diff --git a/data/mnet/GP10/Host/mm/src/MMTimerProc.cpp b/data/mnet/GP10/Host/mm/src/MMTimerProc.cpp
new file mode 100644
index 0000000..3ed6960
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/src/MMTimerProc.cpp
@@ -0,0 +1,128 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMTimerProc.cpp
+// Author(s) : Kevin Lim
+// Create Date : 07-26-99
+// Description :
+//
+// *******************************************************************
+
+// #define DEBUG_MM_HANDOVER
+// #define DEBUG_MM_HANDOVER_EFR
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "taskLib.h"
+#include "stdLib.h"
+#include "string.h"
+#include "LOGGING/vcmodules.h"
+#include "LOGGING/vclogging.h"
+#include "oam_api.h"
+
+// included L3 Message header for messages from other Layer 3 modules (CC, RR)
+#include "JCC/JCCL3Msg.h"
+
+#include "JCC/JCCUtil.h"
+#include "JCC/JCCTimer.h"
+
+// MM Message Constants
+#include "MMTypes.h"
+#include "MM/MMInt.h"
+#include "MMUtil.h"
+#include "MMSendMsg.h"
+#include "MMTimerProc.h"
+#include "MMPmProc.h"
+#include "MMCcMsgProc.h"
+
+#include "RIL3/ie_rrm_common.h"
+extern int rm_IsChanAvailable(T_CNI_RIL3_CHANNEL_TYPE channel_type);
+extern MMEntry_t mmEntries[];
+extern IntraL3Msg_t mmToCCOutMsg; // msg buffer - internal modules
+
+// ****************************************************************************
+void MM_TIMER_MsgProc(IntraL3Msg_t *mmInMsg)
+{
+ DBG_FUNC("MM_TIMER_MsgProc", MM_LAYER);
+ DBG_ENTER();
+
+ // Only timeout message expected
+ if ( mmInMsg->message_type != INTRA_L3_TIMEOUT_MSG)
+ {
+ DBG_TRACE("Unknown message received from Timer, Msg Type: %d\n",
+ mmInMsg->message_type);
+ DBG_LEAVE();
+ return;
+ };
+
+ short mmId = mmInMsg->entry_id; // this entry id contains mm id
+
+ DBG_TRACE("Timeout received for mmId: %d\n", mmId);
+
+ switch(((char *)&mmInMsg->l3_data)[0])
+ {
+ case mmPAGE_REQUEST:
+/* shmin 08/02/01 No paging retries instead by GMC retry
+
+ mmEntries[mmId].pageRetries++;
+ DBG_TRACE("\nPage Re-Try #%d\n", mmEntries[mmId].pageRetries);
+ if ( mmEntries[mmId].pageRetries < mmMAX_PG_REQUEST )
+ {
+ mmEntries[mmId].pageTimer->setTimer(mmCfg.mm_paging_t3113);
+ sendPageReqToRRM(mmId);
+ }
+ else // # pages have been sent.....terminate the call attempt
+ {
+
+ if(rm_IsChanAvailable(CNI_RIL3_TCH_ACCH_FULL))
+ mmEntries[mmId].cause = CNI_RIL3_CAUSE_NO_USER_RESPONDING;
+ else
+ mmEntries[mmId].cause = CNI_RIL3_CAUSE_NO_CIRCUIT_OR_CHANNEL_AVAILABLE;
+*/
+// mmEntries[mmId].pageTimer->cancelTimer();
+ mmEntries[mmId].pageRetries = 0;
+// mmEntries[mmId].pageCCTimer->cancelTimer();
+
+// sendIntCCMsg(mmId, INTRA_L3_MM_EST_REJ, INTRA_L3_RR_PAGE_REQ);
+// mmIncUnsuccTrnPaging();
+
+ sendIntRRMsg (mmEntries[mmId].entryId, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+
+ entryDealloc(mmId);
+ // }
+
+ break;
+
+ case mmIDENT_REQUEST:
+ case mmAUTH_REQUEST:
+
+ if (mmEntries[mmId].entryId != (T_CNI_IRT_ID) JCC_UNDEFINED)
+ sendIntRRMsg (mmEntries[mmId].entryId, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ entryDealloc(mmId);
+
+ break;
+
+ case mmPAGE_CC_REQUEST: // shmin 08/02/01
+
+// mmEntries[mmId].pageCCTimer->cancelTimer();
+
+// sendIntRRMsg (mmEntries[mmId].entryId, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+
+ entryDealloc(mmId);
+
+ break;
+ }
+
+ DBG_LEAVE();
+}
+
diff --git a/data/mnet/GP10/Host/mm/src/MMUtil.cpp b/data/mnet/GP10/Host/mm/src/MMUtil.cpp
new file mode 100644
index 0000000..494fe5b
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/src/MMUtil.cpp
@@ -0,0 +1,487 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMUtil.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// included L3 Message header for messages from other Layer 3 modules (CC, RR)
+#include "JCC/JCCL3Msg.h"
+#include "JCC/JCCUtil.h"
+#include "RIL3/ril3irt_db.h"
+#include "JCC/LUDBInstance.h"
+#include "JCC/LUDBConfig.h"
+#include "LOGGING/vcmodules.h"
+#include "LOGGING/vclogging.h"
+#include "oam_api.h"
+
+// MM Message Constants
+#include "MMSendMsg.h"
+#include "MMTypes.h"
+#include "MM/MMConfig.h"
+#include "MMUtil.h"
+
+#include "stdio.h"
+
+// included MD and IRT headers for messages from MS
+#include "ril3/ril3_common.h"
+#include "ril3/ril3md.h"
+
+// included LAPDm header for downlink messages
+#include "lapdm/lapdm_l3intf.h"
+
+// OAM Config Data
+extern MobilityConfigData mmCfg;
+
+// Global Variable for current MM Connections
+extern MMEntry_t mmEntries[];
+
+// Used by RRM to create IRT entries.
+extern T_CNI_L3_ID mm_id;
+
+// IRT table database
+extern CNI_RIL3IRT_DB CNI_IRT_database;
+
+// ****************************************************************************
+// Stage 2.5 This cleanup functionality actually belongs to an audit process.
+void mmConnDataInit(void)
+{
+ short i;
+ for(i=0; i< mmCfg.mm_max_mm_connections;i++) {
+ // Stage 2.5 - We should have a way of cleaning signaling channels from RRM!!
+ if (!(mmEntries[i].free)) {
+ sendIntRRMsg (mmEntries[i].entryId, INTRA_L3_RR_REL_REQ, INTRA_L3_NULL_MSG);
+ }
+
+ entryInit(mmEntries[i]);
+ }
+}
+
+// ****************************************************************************
+void irtMMDataInit(void)
+{
+ short i;
+ for(i=0; i< 25 ; i++) {
+ CNI_IRT_database.m_entry[i].mm_id = mm_id;
+ }
+}
+
+// ****************************************************************************
+short MM_FindIrtMMId(T_CNI_IRT_ID entry_id)
+{
+ DBG_FUNC("MM_FindIrtMMId", MM_LAYER);
+ DBG_ENTER();
+ T_CNI_L3_ID irtMMId;
+ short mmId;
+
+ if((irtMMId = CNI_RIL3_IRT_Get_MM_Id(entry_id)) == CNI_NULL_L3_ID){
+ DBG_ERROR("IRT Table Problem, entry_id: %d\n", entry_id);
+ DBG_LEAVE();
+ return -1;
+ }
+ else{
+ mmId = irtMMId.sub_id;
+
+ // Check validity of the MM Id.
+ if ((mmId < 0) || (mmId >= mmCfg.mm_max_mm_connections)){
+ DBG_WARNING("invalid mmId in irtTable for entryId: %d\n", entry_id);
+ DBG_LEAVE();
+ return -2;
+ }
+ }
+ DBG_LEAVE();
+ return mmId;
+}
+
+// ****************************************************************************
+void mmDataInit(void)
+{
+ mmConnDataInit();
+ irtMMDataInit();
+}
+
+// ****************************************************************************
+void entryInit(MMEntry_t &mmEntry)
+{
+ DBG_FUNC("entryInit", MM_LAYER);
+ DBG_ENTER();
+ mmEntry.oid = CNI_LAPDM_NULL_OID;
+
+ // Always initialize the MM Id back to an unused value
+ if (mmEntry.entryId != (T_CNI_IRT_ID) JCC_UNDEFINED)
+ {
+ if (!(CNI_RIL3_IRT_Set_MM_Id(mmEntry.entryId, mm_id)))
+ {
+ // DBG_ERROR("IRT Table problem\n");
+ }
+ }
+
+ mmEntry.entryId = (T_CNI_IRT_ID) JCC_UNDEFINED;
+ mmEntry.procData.procType = MM_PROC_NULL;
+ mmEntry.procData.mmState = MM_START;
+ mmEntry.free = true;
+ mmEntry.pageTimer->cancelTimer();
+ mmEntry.authTimer->cancelTimer();
+ mmEntry.identTimer->cancelTimer();
+ mmEntry.pageRetries = 0;
+ mmEntry.ludbId = JCC_ERROR;
+ mmEntry.mmId2 = JCC_ERROR;
+ mmEntry.pageReq.imsi.mobileIdType = CNI_RIL3_NO_MOBILE_ID;
+ mmEntry.lup_cksn = 0x07;
+ mmEntry.emerg_ludb = 0;
+ mmEntry.pagingTick = 0;
+ mmEntry.locupTick = 0;
+ mmEntry.cause = CNI_RIL3_CAUSE_NORMAL_UNSPECIFIED;
+
+ //SMS <xxu:06-01-00> Begin
+ mmEntry.hoConn = false;
+ //SMS <xxu:06-01-00> End
+ mmEntry.gsInitiated = false;
+
+ DBG_LEAVE();
+}
+
+// ****************************************************************************
+// Stage 2 changes needed for Orig and Term Calls - Begin
+short checkExistingEntry(const T_CNI_IRT_ID newEntryId)
+{
+ short i;
+ for(i=0; i< mmCfg.mm_max_mm_connections;i++) {
+ if (mmEntries[i].free == false) {
+ if ( mmEntries[i].entryId == newEntryId ) {
+ return i;
+ }
+ }
+ }
+ return JCC_ERROR;
+}
+// Stage 2 changes needed for Orig and Term Calls - End
+// ****************************************************************************
+
+short getEntry(const T_CNI_RIL3_IE_MOBILE_ID &mobId)
+{
+ for(short i=0; i< mmCfg.mm_max_mm_connections;i++) {
+ if (mmEntries[i].free == false &&
+ // mmEntries[i].procData.procType == MM_PROC_MOB_TERM &&
+ // mmEntries[i].procData.mmState == MM_PAGE_REQ &&
+ // Stage 2.5 changes needed for Orig and Term Calls - Begin
+ mmEntries[i].pageReq.imsi == mobId)
+ {
+ return i;
+ }
+ // Stage 2.5 changes needed for Orig and Term Calls - End
+ }
+
+ return JCC_ERROR;
+}
+
+// ****************************************************************************
+// add overload function for getEntry. -gz
+short getEntry(const short ludbId)
+{
+ for(short i=0; i< mmCfg.mm_max_mm_connections;i++) {
+ if (mmEntries[i].free == false && mmEntries[i].ludbId == ludbId) {
+ return i;
+ }
+ }
+
+ return JCC_ERROR;
+}
+
+// ****************************************************************************
+short getMobileId(short mmId, T_CNI_RIL3_IE_MOBILE_ID &mobId)
+{
+
+ mobId = mmEntries[mmId].pageReq.imsi;
+ return JCC_SUCCESS;
+}
+
+
+// ****************************************************************************
+// add overload function for getMobileId. -gz
+T_CNI_RIL3_IE_MOBILE_ID getMobileId(short mmId)
+{
+ if ((mmId >= 0) && (mmId < mmCfg.mm_max_mm_connections)) {
+ return mmEntries[mmId].mobileId;
+ }
+ else {
+ T_CNI_RIL3_IE_MOBILE_ID mobileId;
+ mobileId.mobileIdType = CNI_RIL3_NO_MOBILE_ID;
+ return mobileId;
+ }
+}
+
+
+// ****************************************************************************
+// get MM Id from LUDB Id. -gz
+short getMMId(const short ludbId)
+{
+ for(int i=0; i<mmCfg.mm_max_mm_connections; i++) {
+ if (mmEntries[i].ludbId == ludbId)
+ return i;
+ }
+
+ return JCC_ERROR;
+}
+
+
+// ****************************************************************************
+short entryAlloc()
+{
+ DBG_FUNC("entryAlloc", MM_LAYER);
+ DBG_ENTER();
+ short i;
+ for(i=0; i< mmCfg.mm_max_mm_connections;i++) {
+ if (mmEntries[i].free == true) {
+ mmEntries[i].free = false;
+
+ //SMS <xxu:06-01-00> Begin
+ mmEntries[i].hoConn = false;
+ //SMS <xxu:06-01-00> End
+
+ DBG_TRACE("Entry Alloc %d\n", i);
+ DBG_LEAVE();
+ return i;
+ }
+ }
+
+ DBG_WARNING("Entry Alloc Failed \n");
+ DBG_LEAVE();
+ return JCC_ERROR;
+}
+
+// ****************************************************************************
+void entryDealloc(short i)
+{
+ DBG_FUNC("entryDealloc", MM_LAYER);
+ DBG_ENTER();
+ DBG_TRACE("Entry Dealloc %d\n", i);
+ entryInit(mmEntries[i]);
+ DBG_LEAVE();
+}
+
+// Print Data.
+// ****************************************************************************
+void entryPrint(MMEntry_t &mmEntry)
+{
+ printf(" %02d %02d %s %s %2d %02d\n",
+ mmEntry.oid,
+ mmEntry.entryId,
+ getMMProcStateString(mmEntry.procData.procType),
+ getMMStateString(mmEntry.procData.mmState),
+ mmEntry.free,
+ mmEntry.ludbId);
+}
+
+// ****************************************************************************
+
+void mmDataPrint(int number)
+{
+ short i;
+ if(number == 0) number = 20;
+ printf("*******************************************************************\n");
+ printf(" [ID] oid eid ProcType State Free LUDB\n");
+ for(i=0; i< number;i++) {
+ printf(" [%02d] ", i);
+ entryPrint(mmEntries[i]);
+ }
+}
+
+// ****************************************************************************
+char *getMMEntryState(short mmId)
+{
+ if((mmId >= 0)&&(mmId < mmCfg.mm_max_mm_connections)){
+ return(getMMStateString(mmEntries[mmId].procData.mmState));
+ }
+ else{
+ return("BAD mmId");
+ }
+}
+
+// ****************************************************************************
+char *getMMProcStateString(MMProcedureType_t proc_type)
+{
+ switch(proc_type){
+ case MM_PROC_NULL: return("NULL ");
+ case MM_PROC_LUDB: return("LOC_UPDATE");
+ case MM_PROC_MOB_ORIG: return("MOB_ORIG ");
+ case MM_PROC_MOB_TERM: return("MOB_TERM ");
+ default: return("UNKNOWN ");
+ }
+}
+
+// ****************************************************************************
+char *getMMStateString(MMState_t state)
+{
+ switch(state){
+ case MM_START: return("IDLE ");
+ case MM_CLEAR_REQ: return("CLEAR_REQ ");
+ case MM_CONN_EST: return("CONN_EST ");
+ case MM_EMERGENCY: return("EMERGENCY ");
+ case MM_CIPHER_CMD: return("CIPHERING ");
+ case MM_AUTH_LOCUP: return("AUTH_LOCUP");
+ case MM_AUTH_ORIG: return("AUTH_ORIG ");
+ case MM_AUTH_TERM: return("AUTH_TERM ");
+ case MM_WAIT4REG: return("WAIT4REG ");
+ case MM_WAIT4UNREG: return("WAIT4UNREG");
+ case MM_WAIT4SPI: return("WAIT4SPI ");
+ case MM_PAGE_REQ: return("PAGE_REQ ");
+ case MM_HAND_REQ: return("HAND_REQ ");
+ default: return("UNKNOWN ");
+ }
+}
+
+// ****************************************************************************
+char *getMMPrimStr(IntraL3PrimitiveType_t prim)
+{
+ switch(prim){
+ case INTRA_L3_DATA: return("L3Data ");
+ case INTRA_L3_RR_EST_REQ: return("RREstReq");
+ case INTRA_L3_RR_REL_REQ: return("RRRelReq");
+ case INTRA_L3_RR_REL_CNF: return("RRRelCnf");
+ case INTRA_L3_RR_EST_CNF: return("RREstCnf");
+ case INTRA_L3_RR_REL_IND: return("RRRelInd");
+ case INTRA_L3_RR_EST_REJ: return("RREstRej");
+ case INTRA_L3_MM_EST_IND: return("MMEstInd");
+ case INTRA_L3_MM_EST_REQ: return("MMEstReq");
+ case INTRA_L3_MM_EST_CNF: return("MMEstCnf");
+ case INTRA_L3_MM_EST_REJ: return("MMEstRej");
+ case INTRA_L3_MM_REL_REQ: return("MMRelReq");
+ case INTRA_L3_MM_REL_IND: return("MMRelInd");
+ default: return("Unknown");
+ }
+}
+
+// ****************************************************************************
+char *getMMMsgTypeStr(IntraL3MsgType_t msgType)
+{
+ switch(msgType){
+ case INTRA_L3_RR_PAGE_REQ: return("PageReq");
+ case INTRA_L3_RR_PAGE_RSP: return("PageRsp");
+ case INTRA_L3_RR_HANDOVER_REQ: return("HandReq");
+ case INTRA_L3_RR_HANDOVER_REQ_ACK: return("HandAck");
+ case INTRA_L3_RR_HANDOVER_REQ_NACK: return("HandNak");
+ case INTRA_L3_RR_CIPHER_COMMAND: return("CiphCmd");
+ case INTRA_L3_RR_CIPHER_COMPLETE: return("CiphCmp");
+ case INTRA_L3_MM_LOCATE_MS: return("PageReq");
+ case INTRA_L3_NULL_MSG: return("Null ");
+ default: return("Unknown");
+ }
+}
+
+// ****************************************************************************
+char *getRIL3MMTypeStr(T_CNI_RIL3_MESSAGE_TYPE msgType)
+{
+ switch(msgType){
+ case CNI_RIL3MM_MSGID_IMSI_DETACH_INDICATION : return("IMSI_DETACH");
+ case CNI_RIL3MM_MSGID_LOCATION_UPDATING_ACCEPT : return("LOC_UP_ACPT");
+ case CNI_RIL3MM_MSGID_LOCATION_UPDATING_REJECT : return("LOC_UP_RJT ");
+ case CNI_RIL3MM_MSGID_LOCATION_UPDATING_REQUEST : return("LOC_UP_REQ ");
+
+ // RIL3MM Security messages:
+ case CNI_RIL3MM_MSGID_AUTHENTICATION_REJECT : return("AUTH_REJ ");
+ case CNI_RIL3MM_MSGID_AUTHENTICATION_REQUEST : return("AUTH_REQ ");
+ case CNI_RIL3MM_MSGID_AUTHENTICATION_RESPONSE : return("AUTH_RESP ");
+ case CNI_RIL3MM_MSGID_IDENTITY_REQUEST : return("IDENT_REQ ");
+ case CNI_RIL3MM_MSGID_IDENTITY_RESPONSE : return("IDENT_RESP ");
+ case CNI_RIL3MM_MSGID_TMSI_REALLOCATION_COMMAND : return("TMSI_RE_CMD");
+ case CNI_RIL3MM_MSGID_TMSI_REALLOCATION_COMPLETE: return("TMSI_RE_COM");
+
+ // R IL3MM Connection management messages:
+ case CNI_RIL3MM_MSGID_CM_SERVICE_ACCEPT : return("CM_SVC_ACPT");
+ case CNI_RIL3MM_MSGID_CM_SERVICE_REJECT : return("CM_SVC_REJ ");
+ case CNI_RIL3MM_MSGID_CM_SERVICE_ABORT : return("CM_SVC_ABRT");
+ case CNI_RIL3MM_MSGID_CM_SERVICE_REQUEST : return("CM_SVC_REQ ");
+ case CNI_RIL3MM_MSGID_CM_SERVICE_PROMPT : return("CM_SVC_PROM");
+ case CNI_RIL3MM_MSGID_CM_REESTABLISHMENT_REQUEST: return("CM_RE_ESTAB");
+ case CNI_RIL3MM_MSGID_ABORT : return("ABORT ");
+
+ // R IL3MM Miscellaneous messages:
+ case CNI_RIL3MM_MSGID_MM_NULL : return("NULL ");
+ case CNI_RIL3MM_MSGID_MM_STATUS : return("STATUS ");
+ case CNI_RIL3MM_MSGID_MM_INFORMATION : return("INFORMATION");
+ default: return("Unknown");
+ }
+}
+
+// ****************************************************************************
+char *getMMRejectCauseStr(T_CNI_RIL3_REJECT_CAUSE_VALUE cause)
+{
+ switch(cause){
+ case CNI_RIL3_REJECT_IMSI_UNKNOWN_IN_HLR :
+ return("IMSI_UNKNOWN_IN_HLR");
+ case CNI_RIL3_REJECT_ILLEGAL_MS :
+ return("ILLEGAL_MS");
+ case CNI_RIL3_REJECT_IMSI_UNKNOWN_IN_VLR :
+ return("IMSI_UNKNOWN_IN_VLR");
+ case CNI_RIL3_REJECT_IMEI_NOT_ACCEPTED :
+ return("IMEI_NOT_ACCEPTED");
+ case CNI_RIL3_REJECT_ILLEGAL_ME :
+ return("ILLEGAL_ME");
+ case CNI_RIL3_REJECT_PLMN_NOT_ALLOWED :
+ return("PLMN_NOT_ALLOWED");
+ case CNI_RIL3_REJECT_LOCATION_AREA_NOT_ALLOWED :
+ return("LOCATION_AREA_NOT_ALLOWED");
+ case CNI_RIL3_REJECT_NATIONAL_ROAMING_NOT_ALLOWED :
+ return("NATIONAL_ROAMING_NOT_ALLOWED");
+ case CNI_RIL3_REJECT_NETWORK_FAILURE :
+ return("NETWORK_FAILURE");
+ case CNI_RIL3_REJECT_CONGESTION :
+ return("CONGESTION");
+ case CNI_RIL3_REJECT_SERVICE_OPTION_NOT_SUPPORTED :
+ return("SERVICE_OPTION_NOT_SUPPORTED");
+ case CNI_RIL3_REJECT_REQUESTED_SERVICE_OPTION_NOT_SUBSCRIBED :
+ return("REQUESTED_SERVICE_OPTION_NOT_SUBSCRIBED");
+ case CNI_RIL3_REJECT_SERVICE_OPTION_TEMPORARILY_OUT_OF_ORDER :
+ return("SERVICE_OPTION_TEMPORARILY_OUT_OF_ORDER");
+ case CNI_RIL3_REJECT_CALL_CANNOT_BE_IDENTIFIED :
+ return("CALL_CANNOT_BE_IDENTIFIED");
+ case CNI_RIL3_REJECT_SEMANTICALLY_INCORRECT_MESSAGE :
+ return("SEMANTICALLY_INCORRECT_MESSAGE");
+ case CNI_RIL3_REJECT_INVALID_MANDATORY_INFORMATION :
+ return("INVALID_MANDATORY_INFORMATION");
+ case CNI_RIL3_REJECT_MESSAGE_TYPE_NON_EXISTENT :
+ return("MESSAGE_TYPE_NON_EXISTENT");
+ case CNI_RIL3_REJECT_MESSAGE_TYPE_NOT_COMPATIBLE :
+ return("MESSAGE_TYPE_NOT_COMPATIBLE");
+ case CNI_RIL3_REJECT_INFORMATION_ELEMENT_NON_EXISTENT :
+ return("INFORMATION_ELEMENT_NON_EXISTENT");
+ case CNI_RIL3_REJECT_CONDITIONAL_IE_ERROR :
+ return("CONDITIONAL_IE_ERROR");
+ case CNI_RIL3_REJECT_MESSAGE_NOT_COMPATIBLE :
+ return("MESSAGE_NOT_COMPATIBLE");
+ case CNI_RIL3_REJECT_PROTOCOL_ERROR_UNSPECIFIED :
+ return("PROTOCOL_ERROR_UNSPECIFIED");
+ default: return("Unknown");
+ }
+}
+
+// ****************************************************************************
+// print separator on log
+void mmBlank()
+{
+
+ DBG_FUNC("mmBlank", MM_LAYER);
+ DBG_ENTER();
+ DBG_TRACE("--------------------------------------------------------");
+ printf("--------------------------------------------------------\n");
+ DBG_LEAVE();
+}
+
+
+
diff --git a/data/mnet/GP10/Host/mm/src/MMVBLinkMsgProc.cpp b/data/mnet/GP10/Host/mm/src/MMVBLinkMsgProc.cpp
new file mode 100644
index 0000000..ce04589
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/src/MMVBLinkMsgProc.cpp
@@ -0,0 +1,160 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2001
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 2.1
+// Status : Under development
+// File : MMVBLinkMsgProc.cpp
+// Author(s) : Shawn Min
+// Create Date : 08-02-2001
+// Description :
+//
+// *******************************************************************
+
+// #define DEBUG_MM_HANDOVER
+// #define DEBUG_MM_HANDOVER_EFR
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+#include "taskLib.h"
+#include "stdLib.h"
+#include "string.h"
+#include "tickLib.h"
+
+#include "LOGGING/vcmodules.h"
+#include "LOGGING/vclogging.h"
+#include "oam_api.h"
+
+#include "JCC/JCCL3Msg.h"
+#include "JCC/JCCUtil.h"
+#include "JCC/ludbApi.h"
+
+// MM Message Constants
+#include "MMTypes.h"
+#include "MM/MMInt.h"
+#include "MMUtil.h"
+#include "MMSendMsg.h"
+#include "MMCcMsgProc.h"
+#include "MMPmProc.h"
+#include "MMLudbMsgProc.h"
+#include "MMTimerProc.h"
+#include "MMRmMsgProc.h"
+
+// Global Variable for current MM Connections
+
+extern MMEntry_t mmEntries[];
+extern Boolean mmOpStatus;
+
+// Global variable for Message Queue
+extern MSG_Q_ID mmMsgQId;
+
+
+void MM_VBLINK_PageRequestProc(VblinkMsg_t *vbInMsg)
+{
+ DBG_FUNC("MM_VBLINK_PageReqProc", MM_LAYER);
+ DBG_ENTER();
+
+ short mmId;
+
+ if(!mmOpStatus){
+ DBG_WARNING("[MM] page request Id(%x) ignored due to disabled btsOpState\n", vbInMsg ->message_data.pageReq.req_id);
+ DBG_LEAVE();
+ return;
+ }
+
+ if ((mmId = getEntry(vbInMsg->message_data.pageReq.imsi)) != JCC_ERROR)
+ {
+ if (mmEntries[mmId].entryId != (T_CNI_IRT_ID) JCC_UNDEFINED)
+ {
+
+ if(mmEntries[mmId].vblinkReqId != vbInMsg ->message_data.pageReq.req_id)
+ {
+ DBG_TRACE(" Received another Page Request Id (%x) (%x)\n",
+ mmEntries[mmId].vblinkReqId, vbInMsg ->message_data.pageReq.req_id);
+ return;
+ }
+
+ if(mmEntries[mmId].procData.mmState == MM_CONN_EST)
+ {
+ DBG_TRACE(" Received Page Request State MM_CONN_EST\n");
+ return;
+ }
+
+ mmEntries[mmId].pageTimer->cancelTimer();
+ MMProceedRRPageRspToVBLINK(mmId);
+
+ DBG_TRACE("Already Save Page Response entry_id: %d\n", mmEntries[mmId].entryId);
+
+ }else
+ {
+
+ mmEntries[mmId].pageReq.imsi = vbInMsg ->message_data.pageReq.imsi;
+ mmEntries[mmId].vblinkReqId = vbInMsg ->message_data.pageReq.req_id;
+ // mmEntries[mmId].ccQId = vbInMsg->message_data.pageReq.channel_needed;
+ mmEntries[mmId].pageCCTimer->cancelTimer();
+ mmEntries[mmId].pageCCTimer->setTimer((sysClkRateGet() * (int)vbInMsg->message_data.pageReq.paging_timeout)/1000);
+
+ DBG_TRACE("PageRequest from VBLINK reqId(%x) Timer(%d, %d)\n",
+ vbInMsg ->message_data.pageReq.req_id,vbInMsg->message_data.pageReq.paging_timeout,
+ (sysClkRateGet() * (int)vbInMsg->message_data.pageReq.paging_timeout)/1000);
+
+ sendPageReqToRRM(mmId);
+ }
+
+ DBG_LEAVE();
+ return;
+
+ }
+
+
+ if ( (mmId = entryAlloc()) == JCC_ERROR )
+ {
+
+ DBG_ERROR("entryAlloc Failed req_id (%x)\n ",vbInMsg ->message_data.pageReq.req_id );
+ // Internal no resources action - send est rej.
+ // No entry Id in the IRT table assigned yet. Echo back the Page Req.
+ DBG_LEAVE();
+ return;
+ }
+
+ mmEntries[mmId].pageReq.imsi = vbInMsg ->message_data.pageReq.imsi;
+ mmEntries[mmId].vblinkReqId = vbInMsg ->message_data.pageReq.req_id;
+// mmEntries[mmId].ccQId = vbInMsg->message_data.pageReq.channel_needed;
+ mmEntries[mmId].pageCCTimer->setTimer((sysClkRateGet() * (int)vbInMsg->message_data.pageReq.paging_timeout)/1000);
+
+ DBG_TRACE("PageRequest from VBLINK reqId(%x) Timer(%d,%d)\n",
+ vbInMsg ->message_data.pageReq.req_id,vbInMsg->message_data.pageReq.paging_timeout,
+ (sysClkRateGet() * (int)vbInMsg->message_data.pageReq.paging_timeout)/1000);
+
+ sendPageReqToRRM(mmId);
+
+ DBG_LEAVE();
+
+}
+
+void MM_VBLINK_MsgProc(VblinkMsg_t *vbInMsg)
+{
+ DBG_FUNC("MM_VBLINK_MsgProc", MM_LAYER);
+ DBG_ENTER();
+
+ switch (vbInMsg->message_type)
+ {
+ case VBLINK_RR_PAGE_REQ:
+
+ MM_VBLINK_PageRequestProc(vbInMsg);
+ break;
+
+ default:
+ DBG_ERROR("Unexpected Msg type from VBLINK: %d\n",
+ vbInMsg->message_type);
+ }
+ DBG_LEAVE();
+}
+
diff --git a/data/mnet/GP10/Host/mm/src/Makefile b/data/mnet/GP10/Host/mm/src/Makefile
new file mode 100644
index 0000000..3c324fe
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/src/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = mm
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\mmm.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/mm/src_api/MMapiH323.cpp b/data/mnet/GP10/Host/mm/src_api/MMapiH323.cpp
new file mode 100644
index 0000000..8ddfe4e
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/src_api/MMapiH323.cpp
@@ -0,0 +1,52 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMapiH323.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 02-01-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+// included L3 Message header for messages from other Layer 3 modules (CC, RR)
+#include "oam_api.h"
+#include "ril3/ie_location_area_id.h"
+#include "MM/MMInt.h"
+#include "MM/MMConfig.h"
+#include "MMTypes.h"
+
+
+// OAM configuration table defined in vipermib.h as
+// INTEGER mm_max_mm_connections;
+// INTEGER mm_max_L3_msgs;
+// INTEGER mm_L3_msg_Q_priority;
+// INTEGER task_priority;
+// INTEGER task_stack_size;
+// INTEGER mm_paging_t3113;
+// Boolean mm_authenticationRequired;
+// Boolean mm_cipheringRequired;
+// Boolean mm_IMEICheckRequired;
+
+MobilityConfigData mmCfg;
+T_CNI_RIL3_IE_LOCATION_AREA_ID mmCfgLocId;
+int mmOpStatus = 1;
+int mmCfgCipherMO = 0;
+int mmCfgCipherMT = 0;
+int mmCfgIMSIrequired = 0;
+
+// Global Variable for current MM Connections
+MMEntry_t mmEntries[MM_MAXNUM_ENTRY];
+
+
diff --git a/data/mnet/GP10/Host/mm/src_api/Makefile b/data/mnet/GP10/Host/mm/src_api/Makefile
new file mode 100644
index 0000000..ef25024
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/src_api/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = mm
+THIS_DIRECTORY = src_api
+MY_OUTPUT = $(OBJDIR)\mmm_api.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/mm/src_init/MMinit.cpp b/data/mnet/GP10/Host/mm/src_init/MMinit.cpp
new file mode 100644
index 0000000..04912f3
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/src_init/MMinit.cpp
@@ -0,0 +1,32 @@
+// *******************************************************************
+//
+// (c) Copyright Cisco 2000
+// All Rights Reserved
+//
+// *******************************************************************
+
+// *******************************************************************
+//
+// Version : 1.0
+// Status : Under development
+// File : MMTask.cpp
+// Author(s) : Bhava Nelakanti
+// Create Date : 11-01-98
+// Description :
+//
+// *******************************************************************
+
+// *******************************************************************
+// Include Files.
+// *******************************************************************
+
+
+#include "ril3/ril3md.h"
+
+
+// Global variable for Message Queue
+MSG_Q_ID mmMsgQId;
+
+// Used by RRM to create IRT entries.
+T_CNI_L3_ID mm_id;
+
diff --git a/data/mnet/GP10/Host/mm/src_init/Makefile b/data/mnet/GP10/Host/mm/src_init/Makefile
new file mode 100644
index 0000000..cd8e2ed
--- /dev/null
+++ b/data/mnet/GP10/Host/mm/src_init/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = mm
+THIS_DIRECTORY = src_init
+MY_OUTPUT = $(OBJDIR)\mmm_init.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/rm/Docs/CallFlowPreAlphaV0.2.ppt b/data/mnet/GP10/Host/rm/Docs/CallFlowPreAlphaV0.2.ppt
new file mode 100644
index 0000000..dc245e8
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Docs/CallFlowPreAlphaV0.2.ppt
Binary files differ
diff --git a/data/mnet/GP10/Host/rm/Docs/ModuleRMV01.rtf b/data/mnet/GP10/Host/rm/Docs/ModuleRMV01.rtf
new file mode 100644
index 0000000..327dfd9
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Docs/ModuleRMV01.rtf
@@ -0,0 +1,4508 @@
+{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
+{\f2\fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f3\froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}{\f4\froman\fcharset0\fprq2{\*\panose 00000000000000000000}Times{\*\falt Times New Roman};}
+{\f5\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Helvetica{\*\falt Arial};}{\f6\fmodern\fcharset0\fprq1{\*\panose 00000000000000000000}Courier{\*\falt Courier New};}
+{\f7\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Geneva{\*\falt Arial};}{\f8\froman\fcharset0\fprq2{\*\panose 00000000000000000000}Tms Rmn;}{\f9\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Helv;}
+{\f10\froman\fcharset0\fprq2{\*\panose 00000000000000000000}MS Serif;}{\f11\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}MS Sans Serif;}{\f12\froman\fcharset0\fprq2{\*\panose 00000000000000000000}New York;}
+{\f13\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}System;}{\f14\fnil\fcharset2\fprq2{\*\panose 05000000000000000000}Wingdings;}{\f15\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Tahoma;}
+{\f16\fmodern\fcharset2\fprq1{\*\panose 00000000000000000000}MS LineDraw;}{\f17\fmodern\fcharset0\fprq0{\*\panose 00000000000000000000}elite;}{\f18\fmodern\fcharset0\fprq0{\*\panose 00000000000000000000}cubicPS;}
+{\f19\froman\fcharset0\fprq2{\*\panose 00000000000000000000}CG Times (WN);}{\f20\fnil\fcharset2\fprq2{\*\panose 00000000000000000000}Marlett;}{\f21\fswiss\fcharset0\fprq2{\*\panose 020b0504020203020204}News Gothic MT;}
+{\f22\fscript\fcharset0\fprq2{\*\panose 03010101010101010101}Lucida Handwriting;}{\f23\fswiss\fcharset0\fprq2{\*\panose 020b0602030504090204}Lucida Sans;}{\f24\fswiss\fcharset0\fprq2{\*\panose 020b0602030504020204}Lucida Sans Unicode;}
+{\f25\froman\fcharset0\fprq2{\*\panose 02040602050305030304}Book Antiqua;}{\f26\fswiss\fcharset0\fprq2{\*\panose 020b0502020202020204}Century Gothic;}{\f27\fmodern\fcharset0\fprq1{\*\panose 02010509020102010303}OCR A Extended;}
+{\f28\froman\fcharset0\fprq2{\*\panose 02040603050505030304}Calisto MT;}{\f29\fswiss\fcharset0\fprq2{\*\panose 020b0306030101010103}Abadi MT Condensed Light;}{\f30\fswiss\fcharset0\fprq2{\*\panose 020e0705020206020404}Copperplate Gothic Bold;}
+{\f31\fswiss\fcharset0\fprq2{\*\panose 020e0507020206020404}Copperplate Gothic Light;}{\f32\fmodern\fcharset0\fprq1{\*\panose 020b0609040504020204}Lucida Console;}{\f33\fswiss\fcharset0\fprq2{\*\panose 020f0704030504030204}Arial Rounded MT Bold;}
+{\f34\froman\fcharset0\fprq2{\*\panose 02040604050505020304}Century Schoolbook;}{\f35\fdecor\fcharset0\fprq2{\*\panose 04020705040a02060702}Algerian;}{\f36\fdecor\fcharset0\fprq2{\*\panose 04030b070d0b02020403}Braggadocio;}
+{\f37\fswiss\fcharset0\fprq2{\*\panose 020b0903060703020204}Britannic Bold;}{\f38\fscript\fcharset0\fprq2{\*\panose 03060802040406070304}Brush Script MT;}{\f39\fdecor\fcharset0\fprq2{\*\panose 04020805060202030203}Colonna MT;}
+{\f40\fdecor\fcharset0\fprq2{\*\panose 04020505020e03040504}Desdemona;}{\f41\froman\fcharset0\fprq2{\*\panose 0204060206030a020304}Footlight MT Light;}{\f42\fdecor\fcharset0\fprq2{\*\panose 040307050d0c02020703}Kino MT;}
+{\f43\froman\fcharset0\fprq2{\*\panose 020a0a07050505020404}Wide Latin;}{\f44\fscript\fcharset0\fprq2{\*\panose 03020802060602070202}Matura MT Script Capitals;}{\f45\fdecor\fcharset0\fprq2{\*\panose 040506030a0602020202}Playbill;}
+{\f46\fscript\fcharset238\fprq2{\*\panose 03010101010201010101}Monotype Corsiva;}{\f47\fswiss\fcharset0\fprq2{\*\panose 020e0602030304020304}Albertus Medium;}{\f48\fswiss\fcharset0\fprq2{\*\panose 020e0802040304020204}Albertus Extra Bold;}
+{\f49\fswiss\fcharset0\fprq2{\*\panose 020b0603020204030204}Antique Olive;}{\f50\fswiss\fcharset0\fprq2{\*\panose 020b0502050508020304}CG Omega;}{\f51\froman\fcharset0\fprq2{\*\panose 02020603050405020304}CG Times;}
+{\f52\froman\fcharset0\fprq2{\*\panose 02040706040705040204}Clarendon Condensed;}{\f53\fscript\fcharset238\fprq2{\*\panose 03030502040406070605}Coronet;}{\f54\froman\fcharset0\fprq2{\*\panose 02020404030301010803}Garamond;}
+{\f55\fmodern\fcharset0\fprq1{\*\panose 020b0409020202030204}Letter Gothic;}{\f56\fscript\fcharset0\fprq2{\*\panose 03020702040402020504}Marigold;}{\f57\fswiss\fcharset0\fprq2{\*\panose 020b0603020202030204}Univers;}
+{\f58\fswiss\fcharset0\fprq2{\*\panose 020b0606020202060204}Univers Condensed;}{\f59\froman\fcharset0\fprq2{\*\panose 00050102010706020507}Map Symbols;}{\f60\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana;}
+{\f61\fscript\fcharset0\fprq2{\*\panose 030f0702030302020204}Comic Sans MS;}{\f62\fswiss\fcharset0\fprq2{\*\panose 020b0506020202030204}Arial Narrow;}{\f63\fswiss\fcharset0\fprq2{\*\panose 020b0a04020102020204}Arial Black;}
+{\f64\froman\fcharset0\fprq2{\*\panose 02050604050505020204}Bookman Old Style;}{\f65\fnil\fcharset2\fprq2{\*\panose 01010601010101010101}Monotype Sorts;}{\f66\fswiss\fcharset0\fprq2{\*\panose 020b0706040902060204}Haettenschweiler;}
+{\f67\fswiss\fcharset0\fprq2{\*\panose 020b0806030902050204}Impact;}{\f68\froman\fcharset2\fprq2{\*\panose 05050102010706020507}Bookshelf Symbol 3;}{\f69\fnil\fcharset2\fprq2{\*\panose 05000000000000000000}MS Outlook;}
+{\f70\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Albertus (W1);}{\f71\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Albertus Xb (W1);}{\f72\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Antique Olv (W1);}
+{\f73\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}CG Omega (W1);}{\f74\froman\fcharset0\fprq2{\*\panose 00000000000000000000}CG Times (W1);}{\f75\froman\fcharset0\fprq2{\*\panose 00000000000000000000}Clarendon Cd (W1);}
+{\f76\fscript\fcharset0\fprq2{\*\panose 00000000000000000000}Coronet (W1);}{\f77\fmodern\fcharset0\fprq1{\*\panose 00000000000000000000}Courier (W1);}{\f78\froman\fcharset0\fprq2{\*\panose 00000000000000000000}Garmond (W1);}
+{\f79\fmodern\fcharset0\fprq1{\*\panose 00000000000000000000}Letter Gothic (W1);}{\f80\fmodern\fcharset0\fprq1{\*\panose 00000000000000000000}LinePrinter;}{\f81\fscript\fcharset0\fprq2{\*\panose 00000000000000000000}Marigold (W1);}
+{\f82\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Univers (W1);}{\f83\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Univers Cd (W1);}{\f84\fnil\fcharset0\fprq1{\*\panose 00000000000000000000}Small Fonts;}
+{\f175\fswiss\fcharset238\fprq2 Tahoma CE;}{\f176\fswiss\fcharset204\fprq2 Tahoma Cyr;}{\f178\fswiss\fcharset161\fprq2 Tahoma Greek;}{\f179\fswiss\fcharset162\fprq2 Tahoma Tur;}{\f180\fswiss\fcharset186\fprq2 Tahoma Baltic;}
+{\f229\fswiss\fcharset238\fprq2 Lucida Sans Unicode CE;}{\f230\fswiss\fcharset204\fprq2 Lucida Sans Unicode Cyr;}{\f232\fswiss\fcharset161\fprq2 Lucida Sans Unicode Greek;}{\f233\fswiss\fcharset162\fprq2 Lucida Sans Unicode Tur;}
+{\f277\fmodern\fcharset238\fprq1 Lucida Console CE;}{\f278\fmodern\fcharset204\fprq1 Lucida Console Cyr;}{\f280\fmodern\fcharset161\fprq1 Lucida Console Greek;}{\f281\fmodern\fcharset162\fprq1 Lucida Console Tur;}
+{\f367\fswiss\fcharset238\fprq2 Albertus Medium CE;}{\f368\fswiss\fcharset204\fprq2 Albertus Medium Cyr;}{\f371\fswiss\fcharset162\fprq2 Albertus Medium Tur;}{\f372\fswiss\fcharset186\fprq2 Albertus Medium Baltic;}
+{\f373\fswiss\fcharset238\fprq2 Albertus Extra Bold CE;}{\f374\fswiss\fcharset204\fprq2 Albertus Extra Bold Cyr;}{\f377\fswiss\fcharset162\fprq2 Albertus Extra Bold Tur;}{\f378\fswiss\fcharset186\fprq2 Albertus Extra Bold Baltic;}
+{\f379\fswiss\fcharset238\fprq2 Antique Olive CE;}{\f380\fswiss\fcharset204\fprq2 Antique Olive Cyr;}{\f383\fswiss\fcharset162\fprq2 Antique Olive Tur;}{\f384\fswiss\fcharset186\fprq2 Antique Olive Baltic;}{\f385\fswiss\fcharset238\fprq2 CG Omega CE;}
+{\f386\fswiss\fcharset204\fprq2 CG Omega Cyr;}{\f389\fswiss\fcharset162\fprq2 CG Omega Tur;}{\f390\fswiss\fcharset186\fprq2 CG Omega Baltic;}{\f391\froman\fcharset238\fprq2 CG Times CE;}{\f392\froman\fcharset204\fprq2 CG Times Cyr;}
+{\f395\froman\fcharset162\fprq2 CG Times Tur;}{\f396\froman\fcharset186\fprq2 CG Times Baltic;}{\f397\froman\fcharset238\fprq2 Clarendon Condensed CE;}{\f398\froman\fcharset204\fprq2 Clarendon Condensed Cyr;}
+{\f401\froman\fcharset162\fprq2 Clarendon Condensed Tur;}{\f402\froman\fcharset186\fprq2 Clarendon Condensed Baltic;}{\f409\froman\fcharset238\fprq2 Garamond CE;}{\f410\froman\fcharset204\fprq2 Garamond Cyr;}
+{\f412\froman\fcharset161\fprq2 Garamond Greek;}{\f413\froman\fcharset162\fprq2 Garamond Tur;}{\f414\froman\fcharset186\fprq2 Garamond Baltic;}{\f415\fmodern\fcharset238\fprq1 Letter Gothic CE;}{\f416\fmodern\fcharset204\fprq1 Letter Gothic Cyr;}
+{\f419\fmodern\fcharset162\fprq1 Letter Gothic Tur;}{\f420\fmodern\fcharset186\fprq1 Letter Gothic Baltic;}{\f421\fscript\fcharset238\fprq2 Marigold CE;}{\f425\fscript\fcharset162\fprq2 Marigold Tur;}{\f427\fswiss\fcharset238\fprq2 Univers CE;}
+{\f428\fswiss\fcharset204\fprq2 Univers Cyr;}{\f431\fswiss\fcharset162\fprq2 Univers Tur;}{\f432\fswiss\fcharset186\fprq2 Univers Baltic;}{\f433\fswiss\fcharset238\fprq2 Univers Condensed CE;}{\f434\fswiss\fcharset204\fprq2 Univers Condensed Cyr;}
+{\f437\fswiss\fcharset162\fprq2 Univers Condensed Tur;}{\f438\fswiss\fcharset186\fprq2 Univers Condensed Baltic;}{\f457\fswiss\fcharset238\fprq2 Arial Narrow CE;}{\f458\fswiss\fcharset204\fprq2 Arial Narrow Cyr;}
+{\f460\fswiss\fcharset161\fprq2 Arial Narrow Greek;}{\f461\fswiss\fcharset162\fprq2 Arial Narrow Tur;}{\f462\fswiss\fcharset186\fprq2 Arial Narrow Baltic;}{\f463\fswiss\fcharset238\fprq2 Arial Black CE;}{\f464\fswiss\fcharset204\fprq2 Arial Black Cyr;}
+{\f466\fswiss\fcharset161\fprq2 Arial Black Greek;}{\f467\fswiss\fcharset162\fprq2 Arial Black Tur;}{\f468\fswiss\fcharset186\fprq2 Arial Black Baltic;}{\f469\froman\fcharset238\fprq2 Bookman Old Style CE;}
+{\f470\froman\fcharset204\fprq2 Bookman Old Style Cyr;}{\f472\froman\fcharset161\fprq2 Bookman Old Style Greek;}{\f473\froman\fcharset162\fprq2 Bookman Old Style Tur;}{\f474\froman\fcharset186\fprq2 Bookman Old Style Baltic;}
+{\f487\fswiss\fcharset238\fprq2 Impact CE;}{\f488\fswiss\fcharset204\fprq2 Impact Cyr;}{\f490\fswiss\fcharset161\fprq2 Impact Greek;}{\f491\fswiss\fcharset162\fprq2 Impact Tur;}{\f492\fswiss\fcharset186\fprq2 Impact Baltic;}}{\colortbl;\red0\green0\blue0;
+\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;
+\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid \snext0 Normal;}{\s1\sb240\sa60\keepn\widctlpar\brdrt\brdrs\brdrw15\brsp20 \brdrb
+\brdrs\brdrw15\brsp20 \ls1\adjustright \b\fs28\lang2057\kerning28\cgrid \sbasedon0 \snext0 heading 1;}{\s2\sb240\sa60\keepn\widctlpar\ls1\ilvl1\adjustright \b\lang2057\cgrid \sbasedon0 \snext0 heading 2;}{
+\s3\sb240\sa60\keepn\widctlpar\ls1\ilvl2\adjustright \b\fs20\lang2057\cgrid \sbasedon0 \snext0 heading 3;}{\s4\sb240\sa60\keepn\widctlpar\ls1\ilvl3\adjustright \b\fs20\lang2057\cgrid \sbasedon0 \snext0 heading 4;}{
+\s5\sb240\sa60\widctlpar\ls1\ilvl4\adjustright \fs22\lang2057\cgrid \sbasedon0 \snext0 heading 5;}{\s6\sb240\sa60\widctlpar\ls1\ilvl5\adjustright \i\f1\fs22\lang2057\cgrid \sbasedon0 \snext0 heading 6;}{\s7\sb240\sa60\widctlpar\ls1\ilvl6\adjustright
+\f1\fs20\lang2057\cgrid \sbasedon0 \snext0 heading 7;}{\s8\sb240\sa60\widctlpar\ls1\ilvl7\adjustright \i\f1\fs20\lang2057\cgrid \sbasedon0 \snext0 heading 8;}{\s9\sb240\sa60\widctlpar\ls1\ilvl8\adjustright \b\i\f1\fs18\lang2057\cgrid \sbasedon0 \snext0
+heading 9;}{\*\cs10 \additive Default Paragraph Font;}{\s15\widctlpar\tx-720\hyphpar0\adjustright \f4\fs20\cgrid \snext15 Word4095Null;}{\*\cs16 \additive \f4\fs20\lang1033 \sbasedon10 Default Para;}{\s17\sb60\sa60\widctlpar
+\tqc\tx4320\tqr\tx8640\adjustright \fs20\lang2057\cgrid \sbasedon0 \snext17 footer;}{\s18\sb60\sa60\widctlpar\tqc\tx4320\tqr\tx8640\adjustright \fs20\lang2057\cgrid \sbasedon0 \snext18 header;}{\*\cs19 \additive \f6\fs24\lang1033 \sbasedon10 B&M Border;}{
+\s20\sl480\slmult1\widctlpar\tqdec\tx360\hyphpar0\adjustright \f6\cgrid \snext20 Timesheet;}{\*\cs21 \additive \sbasedon10 Lit Index;}{\*\cs22 \additive \sbasedon10 Envelope;}{\s23\sl360\slmult1\widctlpar\tx-720\hyphpar0\adjustright \f6\cgrid \snext23
+Memo;}{\*\cs24 \additive \f6\fs24\lang1033 \sbasedon10 Letterhead;}{\*\cs25 \additive \f6\fs24\lang1033 \sbasedon10 Discontinue;}{\*\cs26 \additive \sbasedon10 Pleading;}{\s27\sl300\slmult1\widctlpar\tqc\tx4680\hyphpar0\adjustright \f1\fs16\cgrid
+\snext27 B&M Memo;}{\s28\sb120\sa120\widctlpar\adjustright \b\caps\fs20\lang2057\cgrid \sbasedon0 \snext0 \sautoupd toc 1;}{\s29\li200\widctlpar\adjustright \scaps\fs20\lang2057\cgrid \sbasedon0 \snext0 \sautoupd toc 2;}{\s30\li400\widctlpar\adjustright
+\i\fs20\lang2057\cgrid \sbasedon0 \snext0 \sautoupd toc 3;}{\s31\li600\widctlpar\adjustright \fs18\lang2057\cgrid \sbasedon0 \snext0 \sautoupd toc 4;}{\s32\li800\widctlpar\adjustright \fs18\lang2057\cgrid \sbasedon0 \snext0 \sautoupd toc 5;}{
+\s33\li1000\widctlpar\adjustright \fs18\lang2057\cgrid \sbasedon0 \snext0 \sautoupd toc 6;}{\s34\li1200\widctlpar\adjustright \fs18\lang2057\cgrid \sbasedon0 \snext0 \sautoupd toc 7;}{\s35\li1400\widctlpar\adjustright \fs18\lang2057\cgrid
+\sbasedon0 \snext0 \sautoupd toc 8;}{\s36\li1600\widctlpar\adjustright \fs18\lang2057\cgrid \sbasedon0 \snext0 \sautoupd toc 9;}{\s37\fi-240\li240\sb60\sa60\widctlpar\tqr\tx4154\adjustright \fs18\lang2057\cgrid \sbasedon0 \snext0 \sautoupd index 1;}{
+\s38\fi-240\li480\sb60\sa60\widctlpar\tqr\tx4154\adjustright \fs18\lang2057\cgrid \sbasedon0 \snext0 \sautoupd index 2;}{\s39\sb60\sa60\widctlpar\tx9000\tqr\tx9360\adjustright \f6\fs20\lang2057\cgrid \sbasedon0 \snext0 toa heading;}{
+\s40\sb60\sa60\widctlpar\adjustright \b\fs20\lang2057\cgrid \sbasedon0 \snext0 caption;}{\*\cs41 \additive _Equation Caption;}{\s42\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid \sbasedon0 \snext42 footnote text;}{\*\cs43 \additive \super
+\sbasedon10 footnote reference;}{\*\cs44 \additive \sbasedon10 page number;}{\s45\fi-240\li720\sb60\sa60\widctlpar\tqr\tx4154\adjustright \fs18\lang2057\cgrid \sbasedon0 \snext0 \sautoupd index 3;}{\s46\fi-240\li960\sb60\sa60\widctlpar
+\tqr\tx4154\adjustright \fs18\lang2057\cgrid \sbasedon0 \snext0 \sautoupd index 4;}{\s47\fi-240\li1200\sb60\sa60\widctlpar\tqr\tx4154\adjustright \fs18\lang2057\cgrid \sbasedon0 \snext0 \sautoupd index 5;}{\s48\fi-240\li1440\sb60\sa60\widctlpar
+\tqr\tx4154\adjustright \fs18\lang2057\cgrid \sbasedon0 \snext0 \sautoupd index 6;}{\s49\fi-240\li1680\sb60\sa60\widctlpar\tqr\tx4154\adjustright \fs18\lang2057\cgrid \sbasedon0 \snext0 \sautoupd index 7;}{\s50\fi-240\li1920\sb60\sa60\widctlpar
+\tqr\tx4154\adjustright \fs18\lang2057\cgrid \sbasedon0 \snext0 \sautoupd index 8;}{\s51\fi-240\li2160\sb60\sa60\widctlpar\tqr\tx4154\adjustright \fs18\lang2057\cgrid \sbasedon0 \snext0 \sautoupd index 9;}{\s52\qc\sb240\sa120\widctlpar\box
+\brdrsh\brdrdb\brdrw15 \tqr\tx4154\adjustright \b\f1\fs22\lang2057\cgrid \sbasedon0 \snext37 index heading;}{\*\cs53 \additive \fs16 \sbasedon10 annotation reference;}{\s54\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid \sbasedon0 \snext54
+annotation text;}{\s55\sb60\sa60\widctlpar\pnrnot1\adjustright \i\fs20\ul\cf6\lang2057\cgrid \sbasedon0 \snext55 Body Text;}{\s56\sb60\sa60\widctlpar\adjustright \i\fs20\lang2057\cgrid \sbasedon0 \snext56 Body Text 2;}{\*\cs57 \additive \ul\cf2
+\sbasedon10 Hyperlink;}{\s58\fi-400\li400\widctlpar\adjustright \scaps\fs20\lang2057\cgrid \sbasedon0 \snext0 table of figures;}{\*\cs59 \additive \ul\cf12 \sbasedon10 FollowedHyperlink;}{\s60\sb60\sa60\widctlpar\adjustright \i\fs20\ul\lang2057\cgrid
+\sbasedon0 \snext60 Body Text 3;}{\s61\li540\sb60\sa60\widctlpar\adjustright \i\fs20\ul\lang2057\cgrid \sbasedon0 \snext61 Body Text Indent 2;}{\s62\qj\li540\sb60\sa60\widctlpar\adjustright \i\fs20\ul\lang2057\cgrid \sbasedon0 \snext62
+Body Text Indent 3;}{\s63\qc\li1440\ri1109\sb480\sa60\widctlpar\box\brdrdb\brdrw30\brsp20 \tx5040\adjustright \shading10000 \b\f1\fs48\lang2057\cgrid \sbasedon0 \snext63 Block Text;}{\s64\sb60\sa60\widctlpar\adjustright \cbpat9 \f15\fs20\lang2057\cgrid
+\sbasedon0 \snext64 Document Map;}{\*\cs65 \additive \b \sbasedon10 Strong;}{\*\cs66 \additive \i \sbasedon10 Emphasis;}}{\*\listtable{\list\listtemplateid-1{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelold\levelspace144\levelindent0
+{\leveltext\'02\'00.;}{\levelnumbers\'01;}\s1}{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelold\levelspace144\levelindent0{\leveltext\'03\'00.\'01;}{\levelnumbers\'01\'03;}\s2}{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1
+\levelold\levelspace144\levelindent0{\leveltext\'05\'00.\'01.\'02;}{\levelnumbers\'01\'03\'05;}\s3}{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelold\levelspace144\levelindent0{\leveltext\'07\'00.\'01.\'02.\'03;}{\levelnumbers
+\'01\'03\'05\'07;}\s4}{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelold\levelspace144\levelindent0{\leveltext\'09\'00.\'01.\'02.\'03.\'04;}{\levelnumbers\'01\'03\'05\'07\'09;}\s5}{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1
+\levelold\levelspace144\levelindent0{\leveltext\'0b\'00.\'01.\'02.\'03.\'04.\'05;}{\levelnumbers\'01\'03\'05\'07\'09\'0b;}\s6}{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelold\levelspace144\levelindent0{\leveltext
+\'0d\'00.\'01.\'02.\'03.\'04.\'05.\'06;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d;}\s7}{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelold\levelspace144\levelindent0{\leveltext\'0f\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07;}{\levelnumbers
+\'01\'03\'05\'07\'09\'0b\'0d\'0f;}\s8}{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelold\levelspace144\levelindent0{\leveltext\'11\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07.\'08;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d\'0f\'11;}\s9}
+{\listname ;}\listid-5}{\list\listtemplateid-1\listsimple{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\'01*;}{\levelnumbers;}}{\listname ;}\listid-2}{\list\listtemplateid67698703\listsimple{\listlevel
+\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid15471781}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0
+\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid62921821}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0
+\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid210698406}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1
+\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid241447689}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0
+\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid273828814}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0
+{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid283998363}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid296183848}{\list\listtemplateid67698693\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3929 ?;}{\levelnumbers;}\f14\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid325134463}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid326716340}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid361440515}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid445197422}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid485055982}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid487481280}{\list\listtemplateid67698703\listsimple{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid527448271}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers
+;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid543565147}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0
+\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid547492102}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360
+\jclisttab\tx360 }{\listname ;}\listid556354303}{\list\listtemplateid67698699\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\'01\u-3880 ?;}{\levelnumbers;}\f14\fbias0 \fi-360\li360\jclisttab\tx360
+}{\listname ;}\listid574970712}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname
+;}\listid578055973}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid580263876
+}{\list\listtemplateid67698703\listsimple{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid630400793}{\list\listtemplateid67698689
+\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid634145445}{\list\listtemplateid67698689\listsimple
+{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid637682566}{\list\listtemplateid67698689\listsimple{\listlevel
+\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid648898465}{\list\listtemplateid-1826095098\listsimple{\listlevel\levelnfc0
+\leveljc0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent283{\leveltext\'02\'00.;}{\levelnumbers\'01;}\fi-283\li1003 }{\listname ;}\listid658731854}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0
+\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid661663139}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1
+\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid668795718}{\list\listtemplateid67698703\listsimple{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0
+\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid676541764}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid682829892}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid688718073}{\list\listtemplateid1382460216{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\'00;}{\levelnumbers
+\'01;}\fi936\li360\jclisttab\tx1656 }{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'03\'00-\'01;}{\levelnumbers\'01\'03;}\fi864\li792\jclisttab\tx2016 }{\listlevel\levelnfc0\leveljc0\levelfollow0
+\levelstartat1\levelspace0\levelindent0{\leveltext\'05\'00-\'01-\'02;}{\levelnumbers\'01\'03\'05;}\fi1368\li1224\jclisttab\tx3312 }{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'07\'00-\'01-\'02-\'03;}{\levelnumbers\'01\'03\'05\'07;}\fi-648\li1728\jclisttab\tx1728 }{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'09\'00-\'01-\'02-\'03-\'04;}{\levelnumbers\'01\'03\'05\'07\'09;}
+\fi-792\li2232\jclisttab\tx2232 }{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'0c\'00.\'01.\'02.\'03.\'04.\'05.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b;}\fi-936\li2736\jclisttab\tx2736 }{\listlevel
+\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'0e\'00.\'01.\'02.\'03.\'04.\'05.\'06.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d;}\fi-1080\li3240\jclisttab\tx3240 }{\listlevel\levelnfc0\leveljc0\levelfollow0
+\levelstartat1\levelspace0\levelindent0{\leveltext\'10\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d\'0f;}\fi-1224\li3744\jclisttab\tx3960 }{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0
+\levelindent0{\leveltext\'12\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07.\'08.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d\'0f\'11;}\fi-1440\li4320\jclisttab\tx4320 }{\listname ;}\listid698160299}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23
+\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid720597341}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0
+\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid724991898}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0
+\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid737287469}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1
+\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid750393811}{\list\listtemplateid67698703\listsimple{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0
+\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid753429916}{\list\listtemplateid-249416644\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3983 ?;}{\levelnumbers;}\f14\fs16\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid756054473}{\list\listtemplateid67698703\listsimple{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid762528902}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers
+;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid803548876}{\list\listtemplateid67698699\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3880 ?;}{\levelnumbers;}\f14\fbias0
+\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid808087581}{\list\listtemplateid67698693\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f14\fbias0 \fi-360\li360
+\jclisttab\tx360 }{\listname ;}\listid815953957}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }
+{\listname ;}\listid821390011}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname
+;}\listid835651964}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid861437148
+}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid863250880}
+{\list\listtemplateid500721196{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\'00;}{\levelnumbers\'01;}\fi-432\li432\jclisttab\tx432 }{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0
+\levelindent0{\leveltext\'03\'00.\'01;}{\levelnumbers\'01\'03;}\fi-576\li576\jclisttab\tx576 }{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'05\'00.\'01.\'02;}{\levelnumbers\'01\'03\'05;}\fi-720\li720
+\jclisttab\tx720 }{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'07\'00.\'01.\'02.\'03;}{\levelnumbers\'01\'03\'05\'07;}\fi-864\li864\jclisttab\tx864 }{\listlevel\levelnfc0\leveljc0\levelfollow0
+\levelstartat1\levelspace0\levelindent0{\leveltext\'09\'00.\'01.\'02.\'03.\'04;}{\levelnumbers\'01\'03\'05\'07\'09;}\fi-1008\li1008\jclisttab\tx1008 }{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'0b\'00.\'01.\'02.\'03.\'04.\'05;}{\levelnumbers\'01\'03\'05\'07\'09\'0b;}\fi-1152\li1152\jclisttab\tx1152 }{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'0d\'00.\'01.\'02.\'03.\'04.\'05.\'06;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d;}\fi-1296\li1296\jclisttab\tx1296 }{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'0f\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d\'0f;}\fi-1440\li1440\jclisttab\tx1440 }{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'11\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07.\'08;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d\'0f\'11;}\fi-1584\li1584\jclisttab\tx1584 }{\listname ;}\listid863327551}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0
+\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid864289667}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1
+\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid873349574}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0
+\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid913782311}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0
+{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid944077847}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid977685371}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1013999608}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1026054755}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1043360863}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1054768167}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1062755366}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1071344639}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1075738273}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1118912057}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1121270000}{\list\listtemplateid67698699\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3880 ?;}{\levelnumbers;}\f14\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1142190456}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1161198732}{\list\listtemplateid67698703\listsimple{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1194416140}{\list\listtemplateid67698699\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3880 ?;}{\levelnumbers;}\f14\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1194735173}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1245529338}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1285967081}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1308127679}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1320816205}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1325620645}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1328628986}{\list\listtemplateid67698703\listsimple{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1346785873}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1360162540}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1368094668}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1371876853}{\list\listtemplateid67698699\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3880 ?;}{\levelnumbers;}\f14\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1382897517}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1407418107}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1423407589}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1423409080}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1465848190}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1499417366}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1534616004}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1551919662}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1641495640}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1650283949}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1653287557}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1662200708}{\list\listtemplateid67698703\listsimple{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1665433118}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1673726400}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1707219634}{\list\listtemplateid67698703\listsimple{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1712070705}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1720545875}{\list\listtemplateid67698725{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\'00;}{\levelnumbers
+\'01;}\fi-432\li432\jclisttab\tx432 }{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'03\'00.\'01;}{\levelnumbers\'01\'03;}\fi-576\li576\jclisttab\tx576 }{\listlevel\levelnfc0\leveljc0\levelfollow0
+\levelstartat1\levelspace0\levelindent0{\leveltext\'05\'00.\'01.\'02;}{\levelnumbers\'01\'03\'05;}\fi-720\li720\jclisttab\tx720 }{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'07\'00.\'01.\'02.\'03;}{\levelnumbers\'01\'03\'05\'07;}\fi-864\li864\jclisttab\tx864 }{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'09\'00.\'01.\'02.\'03.\'04;}{\levelnumbers\'01\'03\'05\'07\'09;}
+\fi-1008\li1008\jclisttab\tx1008 }{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'0b\'00.\'01.\'02.\'03.\'04.\'05;}{\levelnumbers\'01\'03\'05\'07\'09\'0b;}\fi-1152\li1152\jclisttab\tx1152 }{\listlevel
+\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'0d\'00.\'01.\'02.\'03.\'04.\'05.\'06;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d;}\fi-1296\li1296\jclisttab\tx1296 }{\listlevel\levelnfc0\leveljc0\levelfollow0
+\levelstartat1\levelspace0\levelindent0{\leveltext\'0f\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d\'0f;}\fi-1440\li1440\jclisttab\tx1440 }{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0
+\levelindent0{\leveltext\'11\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07.\'08;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d\'0f\'11;}\fi-1584\li1584\jclisttab\tx1584 }{\listname ;}\listid1729843793}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23
+\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1761104069}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0
+\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1784496761}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0
+\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1795563694}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1
+\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1802723562}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0
+\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1824009765}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0
+{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1843735382}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1853183433}{\list\listtemplateid67698693\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3929 ?;}{\levelnumbers;}\f14\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1876918139}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1883706338}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1920748241}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1932467451}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1937591531}{\list\listtemplateid67698693\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3929 ?;}{\levelnumbers;}\f14\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1952004834}{\list\listtemplateid67698705\listsimple{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'02\'00);}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1962761534}{\list\listtemplateid67698693\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3929 ?;}{\levelnumbers;}\f14\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1992563179}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1996685746}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid2009282495}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid2028142822}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid2080401054}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid2101481477}}{\*\listoverridetable{\listoverride\listid-5\listoverridecount0\ls1}{\listoverride\listid658731854\listoverridecount0\ls2}
+{\listoverride\listid658731854\listoverridecount1{\lfolevel\listoverrideformat{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent283{\leveltext\'02\'00.;}{\levelnumbers\'01;}\fi-283\li1003 }}\ls3}
+{\listoverride\listid658731854\listoverridecount1{\lfolevel\listoverrideformat{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent283{\leveltext\'02\'00.;}{\levelnumbers\'01;}\fi-283\li1003 }}\ls4}
+{\listoverride\listid658731854\listoverridecount1{\lfolevel\listoverrideformat{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent283{\leveltext\'02\'00.;}{\levelnumbers\'01;}\fi-283\li1003 }}\ls5}
+{\listoverride\listid658731854\listoverridecount1{\lfolevel\listoverrideformat{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent283{\leveltext\'02\'00.;}{\levelnumbers\'01;}\fi-283\li1003 }}\ls6}
+{\listoverride\listid-2\listoverridecount1{\lfolevel\listoverrideformat{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent283{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-283\li1003 }}\ls7}
+{\listoverride\listid1853183433\listoverridecount0\ls8}{\listoverride\listid944077847\listoverridecount0\ls9}{\listoverride\listid1423407589\listoverridecount0\ls10}{\listoverride\listid630400793\listoverridecount0\ls11}{\listoverride\listid580263876
+\listoverridecount0\ls12}{\listoverride\listid1712070705\listoverridecount0\ls13}{\listoverride\listid634145445\listoverridecount0\ls14}{\listoverride\listid1346785873\listoverridecount0\ls15}{\listoverride\listid1346785873\listoverridecount0\ls16}
+{\listoverride\listid15471781\listoverridecount0\ls17}{\listoverride\listid688718073\listoverridecount0\ls18}{\listoverride\listid756054473\listoverridecount0\ls19}{\listoverride\listid210698406\listoverridecount0\ls20}{\listoverride\listid1121270000
+\listoverridecount0\ls21}{\listoverride\listid527448271\listoverridecount0\ls22}{\listoverride\listid1784496761\listoverridecount0\ls23}{\listoverride\listid1360162540\listoverridecount0\ls24}{\listoverride\listid1499417366\listoverridecount0\ls25}
+{\listoverride\listid1371876853\listoverridecount0\ls26}{\listoverride\listid1118912057\listoverridecount0\ls27}{\listoverride\listid1407418107\listoverridecount0\ls28}{\listoverride\listid547492102\listoverridecount0\ls29}{\listoverride\listid913782311
+\listoverridecount0\ls30}{\listoverride\listid720597341\listoverridecount0\ls31}{\listoverride\listid1423409080\listoverridecount0\ls32}{\listoverride\listid283998363\listoverridecount0\ls33}{\listoverride\listid682829892\listoverridecount0\ls34}
+{\listoverride\listid1653287557\listoverridecount0\ls35}{\listoverride\listid1673726400\listoverridecount0\ls36}{\listoverride\listid1161198732\listoverridecount0\ls37}{\listoverride\listid1824009765\listoverridecount0\ls38}{\listoverride\listid668795718
+\listoverridecount0\ls39}{\listoverride\listid808087581\listoverridecount0\ls40}{\listoverride\listid1382897517\listoverridecount0\ls41}{\listoverride\listid1142190456\listoverridecount0\ls42}{\listoverride\listid1194735173\listoverridecount0\ls43}
+{\listoverride\listid737287469\listoverridecount0\ls44}{\listoverride\listid1952004834\listoverridecount0\ls45}{\listoverride\listid815953957\listoverridecount0\ls46}{\listoverride\listid1992563179\listoverridecount0\ls47}{\listoverride\listid1876918139
+\listoverridecount0\ls48}{\listoverride\listid325134463\listoverridecount0\ls49}{\listoverride\listid1054768167\listoverridecount0\ls50}{\listoverride\listid1551919662\listoverridecount0\ls51}{\listoverride\listid977685371\listoverridecount0\ls52}
+{\listoverride\listid1920748241\listoverridecount0\ls53}{\listoverride\listid2101481477\listoverridecount0\ls54}{\listoverride\listid861437148\listoverridecount0\ls55}{\listoverride\listid1662200708\listoverridecount0\ls56}{\listoverride\listid648898465
+\listoverridecount0\ls57}{\listoverride\listid1641495640\listoverridecount0\ls58}{\listoverride\listid2080401054\listoverridecount0\ls59}{\listoverride\listid361440515\listoverridecount0\ls60}{\listoverride\listid487481280\listoverridecount0\ls61}
+{\listoverride\listid578055973\listoverridecount0\ls62}{\listoverride\listid724991898\listoverridecount0\ls63}{\listoverride\listid1729843793\listoverridecount0\ls64}{\listoverride\listid698160299\listoverridecount0\ls65}{\listoverride\listid296183848
+\listoverridecount0\ls66}{\listoverride\listid864289667\listoverridecount0\ls67}{\listoverride\listid1962761534\listoverridecount0\ls68}{\listoverride\listid1465848190\listoverridecount0\ls69}{\listoverride\listid1308127679\listoverridecount0\ls70}
+{\listoverride\listid241447689\listoverridecount0\ls71}{\listoverride\listid326716340\listoverridecount0\ls72}{\listoverride\listid863327551\listoverridecount0\ls73}{\listoverride\listid863327551\listoverridecount9{\lfolevel\listoverridestartat
+\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel
+\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}\ls74}{\listoverride\listid863250880\listoverridecount0\ls75}{\listoverride\listid1937591531\listoverridecount0\ls76}
+{\listoverride\listid661663139\listoverridecount0\ls77}{\listoverride\listid863327551\listoverridecount9{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel
+\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat
+\levelstartat1}\ls78}{\listoverride\listid1761104069\listoverridecount0\ls79}{\listoverride\listid863327551\listoverridecount9{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat
+\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel
+\listoverridestartat\levelstartat1}\ls80}{\listoverride\listid637682566\listoverridecount0\ls81}{\listoverride\listid821390011\listoverridecount0\ls82}{\listoverride\listid1245529338\listoverridecount0\ls83}{\listoverride\listid1707219634
+\listoverridecount0\ls84}{\listoverride\listid543565147\listoverridecount0\ls85}{\listoverride\listid1013999608\listoverridecount0\ls86}{\listoverride\listid835651964\listoverridecount0\ls87}{\listoverride\listid445197422\listoverridecount0\ls88}
+{\listoverride\listid873349574\listoverridecount0\ls89}{\listoverride\listid2028142822\listoverridecount0\ls90}{\listoverride\listid556354303\listoverridecount0\ls91}{\listoverride\listid1720545875\listoverridecount0\ls92}{\listoverride\listid1026054755
+\listoverridecount0\ls93}{\listoverride\listid1043360863\listoverridecount0\ls94}{\listoverride\listid1325620645\listoverridecount0\ls95}{\listoverride\listid1328628986\listoverridecount0\ls96}{\listoverride\listid2009282495\listoverridecount0\ls97}
+{\listoverride\listid1802723562\listoverridecount0\ls98}{\listoverride\listid1062755366\listoverridecount0\ls99}{\listoverride\listid1883706338\listoverridecount0\ls100}{\listoverride\listid676541764\listoverridecount0\ls101}
+{\listoverride\listid1075738273\listoverridecount0\ls102}{\listoverride\listid1368094668\listoverridecount0\ls103}{\listoverride\listid753429916\listoverridecount0\ls104}{\listoverride\listid1071344639\listoverridecount0\ls105}
+{\listoverride\listid1795563694\listoverridecount0\ls106}{\listoverride\listid1843735382\listoverridecount0\ls107}{\listoverride\listid1320816205\listoverridecount0\ls108}{\listoverride\listid803548876\listoverridecount0\ls109}
+{\listoverride\listid1534616004\listoverridecount0\ls110}{\listoverride\listid1932467451\listoverridecount0\ls111}{\listoverride\listid1996685746\listoverridecount0\ls112}{\listoverride\listid750393811\listoverridecount0\ls113}
+{\listoverride\listid1650283949\listoverridecount0\ls114}{\listoverride\listid485055982\listoverridecount0\ls115}{\listoverride\listid1285967081\listoverridecount0\ls116}{\listoverride\listid273828814\listoverridecount0\ls117}
+{\listoverride\listid1194416140\listoverridecount0\ls118}{\listoverride\listid62921821\listoverridecount0\ls119}{\listoverride\listid1665433118\listoverridecount0\ls120}{\listoverride\listid574970712\listoverridecount0\ls121}}{\*\revtbl {Unknown;}{Preferred Customer;}}{\info
+{\title PocketBTS Software Architecture Specification}{\subject Software Architecture}{\author Sheausong Yang}{\keywords PocketBTS, Software, Architecture, Traditional, GSM}{\operator Preferred Customer}{\creatim\yr1998\mo10\dy7\hr10\min39}
+{\revtim\yr1998\mo10\dy8\hr10\min52}{\printim\yr1998\mo10\dy6\hr16\min45}{\version24}{\edmins318}{\nofpages29}{\nofwords7681}{\nofchars43783}{\*\company JetCell Inc.}{\nofcharsws53768}{\vern89}}{\*\userprops {\propname Owner}\proptype30{\staticval
+Sheausong Yang}}\margl1080\margr1080\margt4421 \deftab360\widowctrl\ftnbj\aenddoc\hyphhotz950\aftnnar\notabind\wraptrsp\nocolbal\transmf\lytprtmet\hyphcaps0\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot \fet0{\*\ftnsep \pard\plain
+\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\f6 \chftnsep }{
+\par }}{\*\aftnsep \pard\plain \sb60\sa60\sl-20\slmult0\widctlpar\adjustright \fs20\lang2057\cgrid {\f6
+\par }}{\*\aftnsepc \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\f6 }{
+\par }}{\*\aftncn \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\f6 }{
+\par }}\sectd \psz1\sbknone\linex0\headery706\footery788\endnhere\titlepg\sectdefaultcl {\footer \pard\plain \sb240\sa60\nowidctlpar\box\brdrs\brdrw15\brsp20 \adjustright \fs20\lang2057\cgrid {
+The master copy of this document is stored in electronic format as POCKET~1.DOC. Therefore any hard or soft copy version used for distribution should be considered as an uncontrolled copy, reference should be made to Pocket Wireless, Inc. to obtain the l
+atest version. This version was printed on }{\field{\*\fldinst {date \\@ "d"}}{\fldrslt {\lang1024 8}}}{ }{\field{\*\fldinst {date \\@ "MMMM"}}{\fldrslt {\lang1024 October}}}{ }{\field{\*\fldinst {date \\@ "yyyy"}}{\fldrslt {\lang1024 1998}}}{.
+\par }\pard\plain \s17\sb240\sa60\nowidctlpar\box\brdrs\brdrw15\brsp20 \tqc\tx4320\tqc\tx5400\tqr\tx8640\tqr\tx9720\adjustright \fs20\lang2057\cgrid {
+Any modifications to this document will be marked with a vertical bar in the margin. Added text is indicated with a double underline, deleted text with a strikethrough}{\b\f7
+\par }}{\headerf \pard\plain \s18\qr\sb60\sa60\nowidctlpar\tqc\tx4320\tqr\tx8640\tqr\tx9720\adjustright \fs20\lang2057\cgrid {{\*\shppict{\pict{\*\picprop\shplid1026{\sp{\sn shapeType}{\sv 75}}{\sp{\sn fFlipH}{\sv 0}}
+{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fillColor}{\sv 268435473}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}}\picscalex384\picscaley380\piccropl0\piccropr0\piccropt0\piccropb0
+\picw1693\pich1074\picwgoal960\pichgoal609\pngblip\bliptag212867686{\*\blipuid 0cb01a6611f70f54a2b408decc78c103}89504e470d0a1a0a0000000d49484452000000c80000007f08030000009d497d610000000467414d410000b1889598f4a600000300504c54450000002626264b
+4b4b7171710f0f0f3535355a5a5a808080c0c0c04c4c4c969696e2e2e21d1d1d696969b3b3b3ffffff1800000000000000000000008000000000008000000000
+0080000000000000000000000000000000000000001e433a5c444f574e4c4f41445c5765622050616765735c4a657443656c6c5c000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000f6a657463656c6c6c6f676f2e4a50710500a0e82448008886470000d0e61990d243005cb84600000040
+00f0860ac12880f7bf04435981000000007d92f7bf0000400000000000d8344700d8344700c0ed410000000000d4344700d434470000004000f0860ac12880f7
+bf04435981000000007d92f7bf8abd410001000000f8626d503cb64600010000000000000038b646002013e0190000400075e462000100000038e3620010fa00
+5075e4620038e26200010000000000000038e26200baf9005038e2620075e46200010000000000000075e462007a03075038e2620075e4620077e3620074e562
+00007067004ce262000300000074e36200280000004a5045472c204a5045472046696c7465722c20433a5c50726f6772616d2046696c65735c436f6d6d6f6e20
+46696c65735c4d6963726f736f6674205368617265645c47727068666c745c4a504547494d33322e464c542c206a70670033776d660000d0e61990d243005cb8
+460000004000f0860ac12880f7bf04435981000000007d92f7bf0000400000000000d8344700d8344700c0ed410000000000d4344700d434478bb81bc6000000
+097048597300002e2500002e2601d38b282e0000096349444154789ced5ced8eac3a0e6c6e564a24ffe0fddf768190d8653b21e99d0674b59973663a7cba2897
+ed04e8cffa2f699fa70d302d7db7dbdb80244ae92b282f0392f646df4079159003031d50a6f77d11908c81dbdcdeaf01526050fe45b3acbc054845902a317352
+79059024bd4af8d70c296f0042ec55e203cd29e579209a0860641ccad340ce689b9809f369ccc19e05925603c1fd3070a82781a45541484a2cc46b2f0ff62010
+16b412baab95aba33d07c43158472fb5ba7bb887807051c58613da0d1cd1657e7c0a884b06a94f165dfb884f00413dab5211ac77f8691df47e2052e3a4ec241d
+00106aaf96bc1d88bac02e25b0567b6103c9cd40125cf26a33494752c6435239dbd34050cefbef10436e116cb559857dab9156ee0482ee1fc267f9c8b684e0d4
+2a1c7c31c63d06048d0b8881c1442d091bba4aff19202220b5611c2d78a31243884990f70081ab1a3a284e5abc4a92ede7657703113e45b1c7464122a54e1201
+840092586e000227bea4a3b8972a4e6c1559aecc5d40d0a2311c9f88763b41592ae60e20ca3d06dc8a7d8b3c77921cd5b5bf07a232da201f5b4baa81c4096165
+a9482029caf6ade9b283038a711c9f6a2e56f72016acbf049014c14dbf0111713f3c5d6c59edb460d33bfe118e95bd4b32f23f01d9e834fb41669be06317890a
+b92e30e16d6d2033e229200c1079ca51a1e7668de7da8005b2976c8e46e048338cc4c67ee5b4e3098481b0f1d5f6ad545e96adb6f4ba7fe35a2d20c2013a3862
+c83f4059c04bbfd5ca7575b4dd1e9019d76a02614f6838d6310ea93e13b87e5954de1017c2e9d20d8c5087902524f4f8ed73c1a272ba3840d82b36d1fdc3a8d5
+d5483ba5079b1bb27e4f73e5ca0e23f47751abc3488790220328628e16434559af0500a1a40ef36bd72ae67940a2aa68051eda1c2c48144901d18c288d2438cf
+df30929415b52d15029463a6442cf89a8ca45946d25e8a7db61f5b86f534d22ab2000219440620ef499aa0bed8954622ae8cc9df491c7fe5e2d7917a24d762c2
+2522a3f619a141d772ac2d501a388ee39e86387b2fb682825257a2d08ce8ae53c63780782e5e917481e4e6785621044d0799e01242cb8949ceebdb403e17388a
+ad8d755168c47ad682f61238513a358e14a1e5a29bd70f30d21946a43623b1ba163958a3a863558dabe356e9fc2380a8ee58f86df291b7e932d2f62cf42b33bc
+a80ec50b140582a00b8d94151d1c3b257d20a4caa4b32d560722008763567839a682198f386932dd81a885b925998dbe62248004001316f30b0f7981119ad608
+2c4a165bca131672bfdc123362b51eb427555c0674c1ac4431a391648c76e41f0db4f302accc88c181e358f1d19bdc2ed3a7326a91e92210d043d4d038b1c8a5
+0d20e786e407adaa718e5aad4aa6d217c4dea67b19b5e492e46ed7e6ad30e2681d0bf44a898b238f4c50142413a2a3118c50da42b19df6ad2e23360fb1449244
+24fc6a1fc2336e8f112599aba8d530b00764801111b444a51270bdec634d72f863378f588dc8056242552eee31426e206a30b2e06ae299c9c5c9ec731ae96575
+69778f1147c231294ad003eb42b0555589731a1999ad4d3d2094bc9291b39c507ac5bbd4158223020a4cad75a59111205db1371951032a39700a795e48ba4f30
+a97c42239f31d7ea33e217f191cb12ae0b796d3c9e22d8fe333615b5a63532ca8806c662876b27edd2756e776a7801469446ae32fbb71a31b3288e6be11024f7
+fa4080020cce578c8cb956341a316277c3af4924fdc97aea44ad64a35617484c915d61c526771b488851472d37dbc0418d46386ae50aa63faf05c8d6766b31d2
+1857c15ce989a6efc576b6a1cb889dd78283b581e80b008c58137980c8eee59496e74fc84345a4401530bd49ec6e35d801a235e25d6b3d50873c1279e0588333
+f51921644449db406b5292ba51cb01220721266af1435b30f9a028505d09449dd18c47c434a9d8a7eb5ad4c888705fed6c3a55035dc944ad0f744fd73ae291be
+7076106b90ec73da762bcd087d4c0bcc48bdf498c7912db5de2bfad766de4bd64409e5446e47f67951aa930fae8e53525060ab2039d94333321271141659ec6e
+de2b57ddac88f9eec2d971363aee3ce4f09d1ad5078c704f7b850716991cb77c42ae87396a459c541177ac3c4646261a1b404e5bd7720fd10112c4f52eca9607
+59f253a7e73deb8500a7268819f1ec603f1f00e26d938a6b79d3288b4e880dc0b9fd87406911bb7d8d08597773ae371f995b15bb4f0964441398d4c6b8324c68
+04925f8f1367f251ac390d756ff40842aa601a273114986e8b1195c43b0f2815e6ec166bd5886b60b0bee5a69c6a2ae2528c9c45a33a914d7ced6b955a58cf49
+6cd201a936507bfde55e320524a0ee1a8c44277f3758c12d75c659d7fade8e5bda2ec845fda40515620ec4ca7215c4cea2b1cc57a5de2b33fbc43be70fb75e39
+d61f69444e62379c7f1bbf1212727edc06ed9ffcdc7cbd4592f6a72152fe89f9da94aef7bcd61f3484576cf4c77f3cef636839ff9074bd3ab992b8cfbbfef629
+5336ca03c28f90a51a84cbbf10445856cd84885f30a280d47336925d79e0046babfd3e899590dc4e71486a60f5f740aa873473519075d50139dfede1896e5596
+d505cce18d8c74e7ad963c1db70d69e58d053580f46a1a5e4bbfd7483df9dc43a69fa46c87bf64b1ddc148769099c7973f7298a83f6868896baddf01910e3085
+04678c085140f794cacf19115e30f3e46ff01931c2a9ede76f2bc8734e205171d9e3407efeb5d8e1a1f26671eb3511744dc677a2d77acb1b3df5127a6345bf2d
+521e821143526663bd03083c583efc6a92bcdce474e4b2f52e20f086eee8cb62f9dacb22113b754939c74def21b23123afefc123a818aca4932539eab8edcd50
+768aeb84a26ec45716b4c8e509ee7c57b7167a7dff5af8aeaf50b4d4c6c9091cffc6b7a7e5c56d3b582e877b03110fc6edefb38b4bea3c9cb594013a2a5a9728
+daabee072213647e592486e59f0dd0f66babe4c152af5342d9e3df307042e1cb9d85b0124b42da0c1f6de67818887e7bd79acb18fceac43fea83df8b629c07a4
+21bad2195ff4bd287b43a339cc7a2c91f8fcb26faad95b8f127216531fc683dfe664edd4caa931aa9139b03dfefd5a4e85ae0baa74e155477bf41bcf9c66725f
+491f57077b12c8ca371e5449a8291938d2c340b06a5142af2b460ef434101c401aff1a85f10620eab5779d4b460ff2062035d73b3970f810ef0062aa965918af
+01526f414c640e6caf01220b7c9a52476e2f0222ef70cd7fbdf7ab80f02daef95ddf05a490f2c58e6f03b27e85627d21906fdbff81bcadfd178588ca302d19cd040000000049454e44ae426082}}{\nonshppict{\pict\picscalex384\picscaley379\piccropl0\piccropr0\piccropt0\piccropb0
+\picw1693\pich1074\picwgoal960\pichgoal609\wmetafile8\bliptag212867686\blipupi300{\*\blipuid 0cb01a6611f70f54a2b408decc78c103}010009000003fc3200000000da32000000000400000003010800050000000b0200000000050000000c027f00c8000400000007010400da320000430f2000cc00
+00007f00c800000000007f00c8000000000028000000c80000007f000000010008000000000038630000252e0000262e00008e0000008e000000000000001e00
+0000380000004000000074000000750000007d000000d0000000d4000000f800000000000100000018000000280000004000f000400000004600c0004700d400
+4700d80047000000620038006200750062000000660000008000000081000000bf00000100000003000007037a004304bf00c10a86006a0f00000f0f0f000019
+e0009019e6001d1d1d001320000043202c006a202c0046206e00262626008028c1004a2e6f002e3233004734d4004734d80035353500e23850005c3a43000040
+00000041ed00594304006f435c00654374000043d2005c4441006946200000473400204745002c47450072475c00004824004d494700504a0000504a2000654a
+5c004b4b4b00544c46004c4c4c004f4c4e00574f44006150200045504a00815943005a5a5a00b85c0000505c3a004d5c73006d6172000062e2000062e3000062
+e40072636900626557007365670073656c0064657200726574000067700061685300666870006c694600696969006c6c6500656c69005c6c6c00506d62006f6d
+6d00676f6c00676f720005715000717171006f736f00e574000063746500207466005c746c00e47550006d773300927d0000f780280080808000008159004786
+88000a86f000f7927d0096969600e8a00000b3b3b30046b6380046b63c0046b85c0041bd8a0000bff70004bff700c0c0c00028c10a0043d2900034d4000034d8
+000062e24c00e2e2e20062e3770062e4750019e6d00041edc00086f00000bff78000bff7920000f9ba0000fa1000ffffff008d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d837d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d837d7d7d837d
+7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d83
+7d7d7d7d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+7d7d7d7d837d7d7d7d7d7d837d7d7d7d837d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d7d7d7d7d837d7d837d7d837d7d7d7d837d7d7d837d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d837d7d7d7d7d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d837d7d7d7d837d837d7d837d7d7d7d7d7d7d7d837d7d7d7d7d837d7d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d837d837d7d7d837d7d7d7d7d7d7d7d7d7d837d7d837d7d7d7d83
+7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d837d7d7d
+7d7d7d837d7d7d7d7d7d837d7d837d7d7d838d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d837d7d837d7d837d7d7d7d837d7d7d837d
+7d7d7d7d7d7d837d7d837d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d7d7d7d7d7d
+837d7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d837d837d7d7d837d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d7d
+7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d
+7d7d7d7d7d7d837d7d7d7d837d837d837d7d837d7d837d837d7d7d7d7d7d7d7d7d7d7d837d7d837d7d7d7d837d7d7d837d7d837d7d7d7d7d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d7d7d7d7d837d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d837d7d7d837d7d7d7d7d7d837d837d
+7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d7d837d7d7d7d7d837d7d7d837d7d7d7d7d7d7d837d837d7d7d7d7d7d7d7d7d
+837d7d7d7d7d7d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d837d7d7d7d837d837d7d837d838d837d7d837d7d837d837d7d7d7d7d7d7d837d7d837d7d7d7d7d7d
+7d837d7d837d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d7d837d837d7d6f6f65283e280000283e28656f657d7d7d7d837d7d7d7d7d7d
+7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d837d7d837d7d7d837d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d837d7d7d652800000000000000000000000000000000002865
+6f7d7d837d837d7d7d7d7d837d7d7d7d837d7d837d7d837d7d837d7d7d7d7d7d837d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d837d7d6f280000000000000000000000000000
+0000000000000000000065657d7d837d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d837d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d837d7d7d837d7d65000000000000000000
+0000000000000000000000000000000000000000286f7d7d7d7d837d7d837d837d7d837d7d837d7d837d7d7d7d7d7d7d837d7d7d7d7d837d7d7d7d837d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d7d7d837d6f000000
+000000000000000000000000000000000000000000000000000000000000657d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d837d7d7d7d7d7d7d7d7d
+7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d837d7d
+837d6f2800000000000000000000000000000000000000000000000000000000000000000000007d837d7d837d7d7d7d7d7d7d837d7d837d7d7d7d7d7d7d7d7d
+7d837d7d837d7d7d7d837d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d
+837d837d7d7d7d7d7d6500000000000000000000000000000000000000000000000000000000000000000000000000657d837d7d7d837d837d837d7d7d7d7d7d
+7d837d7d837d837d7d7d7d7d7d7d837d7d7d7d837d7d837d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d7d7d7d7d7d7d7d7d7d7d837d6500000000000000000000000000000000000000000000000000000000000000000000000000006f7d7d7d7d7d7d7d7d
+7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d837d7d7d837d0000000000000000000000000000000000000000000000000000000000000000000000000000000028
+837d7d837d7d7d7d7d837d7d7d7d7d837d7d837d7d7d7d837d7d7d837d7d7d7d7d7d837d7d837d7d837d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d7d7d837d7d28000000000000000000000000000000000000000000000000000000000000000000
+00000000000000007d837d7d7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d837d7d7d7d7d7d650000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000657d7d7d837d7d7d837d7d7d7d7d7d837d7d837d7d7d7d7d7d837d7d837d7d7d837d7d7d7d837d7d837d7d7d837d7d83
+7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d837d7d837d7d7d7d837d7d6500000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000657d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d837d7d7d7d
+7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d7d7d7d836f000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000657d7d7d7d837d7d837d7d7d7d7d837d7d837d7d7d7d7d7d837d7d7d7d837d7d
+837d7d7d7d7d7d837d7d837d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d837d7d837d836f0000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000007d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d
+7d7d7d837d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d838d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d837d7d7d7d7d
+7d7d28000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d7d7d7d7d837d7d837d7d7d7d7d7d
+7d837d7d7d7d7d7d7d837d7d7d7d837d7d837d7d7d7d837d7d837d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d83
+7d7d7d7d7d7d7d837d650000000000000000000000000000000000000000000000000000286565656f656565286528000000000000000000006f837d7d7d7d7d
+7d7d7d7d7d7d837d7d7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d7d7d7d7d7d837d837d7d7d00000000000000000000000000000000000000000000000065657d7d837d7d837d837d837d7d7d7d7d656528000000
+00657d837d7d837d7d837d837d7d7d7d837d7d7d7d7d7d7d7d7d837d837d7d7d7d837d837d7d7d837d7d837d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d7d7d7d7d6500000000000000000000000000000000000000000000657d7d7d837d7d7d837d7d7d7d7d7d7d7d
+7d7d837d7d7d652800287d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d837d7d7d837d7d7d7d7d7d7d837d7d7d7d7d837d7d7d7d7d7d7d7d837d838d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d7d00000000000000000000000000000000000000000028657d7d837d7d7d7d7d7d
+7d837d7d7d837d7d837d7d837d7d837d65657d837d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d
+7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d8d8d8d8d8d8d8d8d8d8d8d8d8d837d7d7d7d837d7d83650000000000000000000000000000000000000000287d7d7d
+7d7d7d7d7d837d7d7d7d7d837d7d7d7d7d7d7d7d7d837d7d7d7d7d7d837d837d7d837d7d837d7d7d7d837d837d837d837d837d7d7d7d7d7d7d837d837d837d7d
+837d7d7d7d7d837d7d8d8d8d8d8d6f6f6f6f6f6f6f6f7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d6f6f006f00000000000000
+6f6f7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d6f6f006f00006f006f6f6f7d8d8d8d8d8d7d7d7d7d7d7d7d7d7d0000000000000000000000000000000000
+000000287d83837d837d7d837d7d7d7d837d7d7d7d7d837d7d7d7d836f6f65006500280000002865657d7d7d7d7d7d7d7d7d6f657d657d657d657d6f7d837d7d
+836f657d657d657d657d657d837d7d7d7d8d8d8d8d6f00000000000000000000006f6f7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d6f0000000000
+0000000000000000000000006f7d8d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000000000006f8d8d8d8d7d837d7d837d7d836f000000000000000000
+00000000000000000000287d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d837d65000000000000000000000000000000656f7d7d837d837d000000000000
+00000000657d7d7d7d28000000000000000000657d7d7d7d838d8d8d8d7d00000000000000000000000000006f7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d
+00000000000000000000000000000000000000000000006f7d8d8d8d8d8d8d8d7d6f0000000000000000000000000000006f8d8d8d8d7d7d837d7d7d837d2800
+0000000000000000000000000000000000007d7d7d7d7d7d7d837d7d837d7d7d7d837d7d7d7d837d6f0000000000000000000000000000000000000000657d7d
+7d7d00000000000000000000657d7d837d00000000000000000000657d7d7d7d7d8d8d8d8d6f000000000000000000000000000000006f8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d7d6f000000000000000000000000000000000000000000000000007d8d8d8d8d8d8d8d6f00000000000000000000000000000000008d8d8d8d837d
+7d7d7d7d7d7d00000000000000000000000000000000000000657d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d837d7d2800000000000000000000000000000000
+0000000000657d7d7d7d000000000000000000006f837d7d7d280000000000000000006f837d7d837d8d8d8d8d7d00000000000000000000000000000000006f
+8d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000000000000000000000000000000000007d8d8d8d8d8d8d6f00000000000000000000000000000000
+00007d8d8d8d7d7d837d7d837d6f000000000000000000000000000000000000287d7d7d837d7d7d7d7d7d7d7d837d7d7d7d837d7d7d00000000000000000000
+000000000000000000000000006f837d7d8300000000000000000000657d7d7d8300000000000000000000657d7d7d7d7d8d8d8d8d6f00000000000000000000
+00000000000000007d8d8d8d8d8d8d8d8d8d8d6f000000000000000000000000000000000000000000000000000000006f8d8d8d8d8d8d6f0000000000000000
+000000000000000000008d8d8d8d7d7d7d7d7d7d7d6500000000000000000000000000000000000065837d7d7d7d7d7d837d7d837d7d7d837d7d7d7d7d280000
+000000000000000000000000000000000000000000667d7d7d7d28000000000000000000657d7d837d280000000000000000006f837d7d7d838d8d8d8d6f0000
+00000000000000000000000000000000008d8d8d8d8d8d8d8d8d7d00000000000000000000000000000000000000000000000000000000006f8d8d8d8d8d7d00
+0000000000000000000000000000000000007d8d8d8d7d837d7d7d837d000000000000000000000000000000000000287d7d837d7d837d7d7d7d7d7d7d7d7d7d
+7d7d7d7d650000000000000000000000000000000000000000000000000b837d7d83000000000000000000006f837d7d8300000000000000000000657d837d7d
+7d8d8d8d8d6f000000000000000000000000000000000000006f8d8d8d8d8d8d8d7d000000000000000000000000000000000000000000000000000000000000
+6f8d8d8d8d8d6f000000000000000000000000000000000000007d8d8d8d837d7d7d7d7d65000000000000000000000000000000000000657d7d7d7d7d7d7d7d
+837d7d837d7d837d7d7d836f000000000000000000000028656f7d7d7d7d656f652800000028837d837d28000000000000000000657d7d7d7d28000000000000
+0000006f837d7d7d838d8d8d8d7d00000000000000000000000000000000000000008d8d8d8d8d8d8d6f00000000000000000000000000000000006f6f6f6f00
+6f000000000000006f8d8d8d8d8d6f000000000000000000000000006f006f6f6f006f8d8d8d7d7d7d7d837d650000000000000000000000000000000000007d
+837d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d2800000000000000000000657d7d837d7d837d837d837d6f6500287d7d7d7d3e0000000000000000006f837d7d
+7d3e000000000000000000657d7d7d7d7d8d8d8d8d6f00000000000000000000000000000000000000007d8d8d8d8d8d6f00000000000000000000000000006f
+7d8d8d8d8d8d8d8d8d7d7d6f000000006f7d8d8d8d8d6f0000000000000000000000006f7d8d8d8d7d7d8d8d8d8d7d837d7d7d7d650000000000000000000000
+000000000000287d7d7d837d7d7d7d7d837d7d7d837d7d7d7d7d6500000000000000000000657d837d7d7d7d7d7d7d7d7d7d837d7d657d7d7d7d280000000000
+000000006f7d7d837d280000000000000000006f837d7d7d838d8d8d8d7d6f7d7d7d6f0000000000000000000000000000006f8d8d8d8d8d6f00000000000000
+00000000006f7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f6f006f8d8d8d8d8d6f0000000000000000000000008d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d8300000000
+0000000000000000000000000000657d837d7d7d7d7d837d7d7d837d7d7d837d837d65000000000000000000657d7d7d7d7d837d7d837d7d837d7d7d7d7d837d
+837d6500000000000000000065837d7d7d65000000000000000000657d837d7d7d8d8d8d8d8d8d8d8d8d8d7d6f000000000000000000000000006f8d8d8d8d7d
+0000000000000000000000006f7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d6f8d8d8d8d8d0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d837d
+7d837d7d280000000000000000000000000000000000657d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d280000000000000000007d837d7d7d7d7d7d7d7d7d7d
+7d7d7d7d837d7d7d7d7d280000000000000000007d7d7d7d83000000000000000000007d7d7d7d7d838d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000
+0000008d8d8d8d6f0000000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d6f00000000000000000000006f8d8d8d8d8d
+8d8d8d8d8d8d7d7d7d7d7d6f0000000000000000000000000000000000007d7d837d7d7d7d7d837d7d837d7d837d7d7d7d7d000000000000000000657d7d837d
+7d837d7d7d837d837d7d837d7d7d7d7d7d7d6500000000000000000065837d7d7d6500000000000000000065837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d6f0000
+000000000000000000006f8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d00000000000000000000
+00007d8d8d8d8d8d8d8d8d8d8d8d7d837d7d836f000000000000000000000000000000000000837d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d7d000000000000
+0000006f7d837d7d7d837d837d7d837d837d7d837d7d7d837d83280000000000000000007d7d7d7d83280000000000000000007d7d7d837d7d8d8d8d8d8d8d8d
+8d8d8d8d8d6f000000000000000000000000008d8d8d8d0000000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d0000
+000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d6f0000000000000000000000000000000000287d7d837d7d7d7d7d7d837d7d837d7d837d7d
+7d6500000000000000000000000000000000002800280028002800652865657d7d7d3e00000000000000000065837d7d7d6500000000000000000065837d7d7d
+838d8d8d8d8d8d8d8d8d8d8d8d6f0000000000000000000000006f8d8d8d7d0000000000000000000000008d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d6f00000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d837d7d837d650000000000000000000000000000000000657d7d7d7d837d7d837d7d
+7d7d7d7d7d7d7d7d836f00000000000000000000000000000000000000000000000000000000007d7d83280000000000000000007d7d7d7d8328000000000000
+0000007d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d7d000000000000000000000000008d8d8d7d00000000000000000000006f7d6f7d7d7d7d7d7d7d7d7d7d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d0000000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d6500000000000000000000000000000000006f837d
+7d7d7d7d7d7d7d7d7d7d7d837d7d837d7d6500000000000000000000000000000000000000000000000000000000007d7d7d650000000000000000007d7d837d
+7d3e00000000000000000065837d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d000000000000000000000000008d8d8d7d0000000000000000000000000000000000
+000000000000000000000000000000006f008d8d8d8d6f00000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d65000000000000000000000000
+0000000000657d7d837d7d837d7d837d7d837d7d7d7d7d7d83650000000000000000000000000000000000000000000000000000000000837d7d280000000000
+000000007d7d7d7d83280000000000000000007d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d000000000000000000000000008d8d8d6f000000000000000000
+00000000000000000000000000000000000000000000000000007d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d6500000000
+000000000000000000000000006f837d7d7d7d7d7d7d7d837d7d7d7d837d7d7d7d7d00000000000000000000000000000000000000000000000000000000287d
+7d7d650000000000000000007d837d7d7d650000000000000000007d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d6f00
+000000000000000000000000000000000000000000000000000000000000000000008d8d8d8d0000000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d837d
+7d7d83280000000000000000000000000000000000657d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d6500000000000000000000000000000000000000000000
+000000000000287d837d280000000000000000007d7d7d7d83280000000000000000007d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d00000000000000000000
+0000008d8d8d7d00000000000000000000000000000000000000000000000000000000000000000000007d8d8d8d6f00000000000000000000007d8d8d8d8d8d
+8d8d8d8d8d8d7d7d837d7d2800000000000000000000000000000000006f837d837d7d7d7d7d7d7d837d837d7d837d7d7d7d0000000000000000006f6f656f65
+65656f6565000000000000000000657d7d7d650000000000000000007d7d837d7d650000000000000000007d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d0000
+000000000000000000006f8d8d8d6f00000000000000000000000000000000000000000000000000000000000000000000008d8d8d8d6f000000000000000000
+00006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d836500000000000000000000000000000000006f7d7d7d7d837d7d837d7d7d7d7d7d7d7d7d837d7d000000000000
+00000065837d837d837d837d7d650000000000000000657d837d28000000000000000000837d7d7d83280000000000000000007d837d7d7d7d8d8d8d8d8d8d8d
+8d8d8d8d8d8d000000000000000000000000008d8d8d6f00000000000000000000000000000000000000000000000000000000000000000000007d8d8d8d6f00
+000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d28000000000000000000000000000000000065837d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d
+7d7d650000000000000000287d7d7d7d7d7d7d7d83280000000000000000657d837d650000000000000000007d7d837d7d3e0000000000000000007d7d7d7d7d
+838d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d7d000000000000000000000000000000000000000000000000000000000000000000
+006f8d8d8d8d6f00000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d836500000000000000000000000000000000006f7d7d837d7d837d7d837d
+7d837d7d7d7d837d7d836f0000000000000000007d7d837d7d7d7d837d0000000000000000007d7d7d7d280000000000000000007d7d7d7d8328000000000000
+000000837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d0000000000000000000000006f8d8d8d8d0000000000000000000000007d6f6f6f6f6f6f6f6f6f6f0000
+000000000000000000008d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d837d837d7d650000000000000000000000000000000000657d7d
+7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d83280000000000000000657d7d7d7d7d837d6f0000000000000000287d837d7d3e0000000000000000007d7d837d
+7d650000000000000000007d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d00000000000000000000006f8d8d8d8d8d
+8d8d8d8d8d8d6f000000000000000000006f8d8d8d8d6f00000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d65000000000000000000000000
+0000000000657d837d7d837d7d837d7d837d7d7d7d7d7d837d7d7d65000000000000000000657d837d7d7d6500000000000000000065837d7d83280000000000
+00000000837d7d7d83280000000000000000007d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d000000000000000000000000008d8d8d8d6f0000000000000000
+0000008d8d8d8d8d8d8d8d8d8d8d6f000000000000000000006f8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d837d7d836f00000000
+00000000000000000000000000657d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d837d28000000000000000000006f656f65000000000000000000287d7d7d
+7d7d650000000000000000007d7d7d7d7d3e0000000000000000007d7d7d7d7d838d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d7d
+00000000000000000000007d8d8d8d8d8d8d8d8d8d7d00000000000000000000007d8d8d8d8d6f00000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d7d7d
+7d7d7d65000000000000000000000000000000000028837d7d7d7d837d7d7d7d7d837d7d7d7d837d7d7d7d7d7d00000000000000000000000000000000000000
+0000000065837d7d837d28000000000000000000837d837d8328000000000000000000837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d00000000000000000000
+00006f8d8d8d8d7d00000000000000000000006f8d8d8d8d8d8d8d8d8d7d00000000000000000000008d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d
+8d8d8d8d8d8d7d837d7d837d0000000000000000000000000000000000007d7d837d7d7d7d837d837d7d7d837d7d7d7d7d837d7d836500000000000000000000
+0000000000000000000000657d7d7d7d7d7d650000000000000000007d7d7d7d7d650000000000000000007d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d0000
+000000000000000000006f7d8d8d8d8d6f00000000000000000000007d8d8d8d8d8d8d8d8d6f000000000000000000006f8d8d8d8d8d6f000000000000000000
+00006f8d8d8d8d8d7d8d8d8d8d8d7d7d7d7d7d7d0000000000000000000000000000000000007d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d6528
+000000000000000000000000000000000000287d837d7d7d7d7d280000000000000000007d7d837d7d280000000000000000007d7d837d7d7d8d8d8d8d8d8d8d
+8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d8d7d0000000000000000000000007d8d8d8d8d8d8d6f00000000000000000000007d7d6f6f6f6f6f00
+000000000000000000006f6f6f6f6f6f6f7d8d8d8d8d7d837d7d837d280000000000000000000000000000000000657d7d7d7d7d7d7d7d7d837d7d7d7d7d7d83
+7d7d837d7d837d7d6500000000000000000000000000000000657d837d7d837d7d7d3e0000000000000000007d7d7d7d7d3e0000000000000000007d7d7d7d83
+7d8d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d8d8d6f0000000000000000000000006f7d8d8d7d0000000000000000000000006f
+8d7d00000000000000000000000000000000000000000000006f8d8d8d8d7d7d7d7d7d7d650000000000000000000000000000000000657d837d7d837d7d837d
+7d7d837d837d7d7d7d7d7d7d7d7d7d7d7d65280000000000000000000000002865837d7d7d7d7d7d7d7d28000000000000000000837d7d837d28000000000000
+000000837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d7d000000000000000000000000008d8d8d8d8d8d8d00000000000000000000000000000000000000000000
+000000000000007d8d7d00000000000000000000000000000000000000000000006f8d8d8d8d7d837d7d837d650000000000000000000000000000000000287d
+7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d837d7d837d7d7d7d656565002800282865657d7d7d7d7d7d837d837d7d83000000000000000000007d7d7d7d
+83000000000000000000007d7d7d7d7d838d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d8d8d8d7d00000000000000000000000000
+00000000000000000000000000006f8d8d7d00000000000000000000000000000000000000000000006f8d8d8d8d7d7d7d7d7d7d650000000000000000000000
+000000000000006f7d7d7d7d7d837d7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d837d7d837d7d7d7d7d7d7d280000000000
+00000000837d7d7d7d280000000000000000007d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d8d8d8d8d6f00000000
+000000000000000000000000000000000000000000007d8d8d8d00000000000000000000000000000000000000000000006f8d8d8d8d7d837d7d7d837d000000
+0000000000000000000000000000006f837d837d7d7d7d837d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d837d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d83
+7d7d3e0000000000000000007d7d837d7d3e0000000000000000007d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d000000000000000000000000008d8d8d8d8d
+8d8d8d8d7d0000000000000000000000000000000000000000000000008d8d8d8d7d00000000000000000000000000000000000000000000006f8d8d8d8d837d
+7d7d837d7d280000000000000000000000000000000000287d7d7d7d837d7d7d7d7d7d7d7d7d837d7d837d7d7d7d837d7d837d7d7d7d7d837d837d7d837d7d83
+7d7d7d837d7d7d7d7d7d280000000000000000007d7d7d7d7d28000000000000000000837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d7d00000000000000000000
+00006f8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000000000000000000000006f7d8d8d8d8d8d00000000000000000000000000000000000000000000
+00008d8d8d8d7d7d7d7d7d7d7d650000000000000000000000000000000000006f837d7d7d7d7d7d837d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d
+7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d83000000000000000000007d837d7d83280000000000000000007d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d0000
+000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d6f0000000000000000000000000000000000006f7d8d8d8d8d8d8d0000000000000000000000000000
+000000000000000000008d8d8d8d7d837d7d7d7d836f000000000000000000000000000000000000287d837d7d7d7d837d7d7d7d7d7d7d7d837d7d837d7d837d
+7d7d837d7d7d7d7d7d7d7d7d837d7d7d7d837d7d7d7d7d7d7d7d000000000000000000007d7d7d7d7d000000000000000000007d837d7d7d7d8d8d8d8d8d8d8d
+8d8d8d8d8d6f000000000000000000000000008d8d8d8d8d8d8d8d8d8d8d8d8d8d6f6f000000000000000000000000006f7d8d8d8d8d8d8d8d8d6f0000000000
+0000000000000000000000000000000000007d8d8d8d7d7d837d7d7d7d7d280000000000000000000000000000000000006f837d7d7d7d7d7d7d837d7d837d7d
+7d7d7d7d7d7d7d7d837d7d7d837d7d837d7d7d7d7d7d7d837d7d7d7d837d7d837d7d000000000000000000007d7d7d837d000000000000000000007d7d7d7d7d
+838d8d8d8d8d8d8d8d8d8d8d8d6f0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d6f6f6f006f006f6f6f8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d837d7d7d837d7d8365000000000000000000000000000000000000007d837d7d837d
+7d7d7d7d7d7d7d837d7d837d7d837d7d7d7d7d7d7d7d7d7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d00000000000000000000837d7d7d7d00000000000000
+0000007d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d0000000000000000000000000000000000
+0000287d7d7d7d7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d837d7d7d7d7d7d7d837d837d7d7d7d837d7d000000000000000000007d7d7d83
+7d000000000000000000007d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d6f0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d837d7d7d650000000000000000
+00000000000000000000006f7d837d7d7d7d7d7d7d7d7d837d7d7d837d7d7d7d837d7d7d837d837d6f28657d7d7d837d7d7d7d7d837d7d7d7d7d000000000000
+000000007d7d7d7d65000000000000000000007d837d7d837d8d8d8d8d8d8d8d8d8d8d8d8d6f000000000000000000000000008d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d8365
+0000000000000000000000000000000000000000657d7d7d7d837d7d837d7d7d7d837d7d7d837d7d7d7d7d7d7d7d6f650000657d837d7d7d7d837d7d7d7d7d83
+7d7d000000000000000000007d7d7d837d00000000000000000000657d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d6f0000000000000000000000006f8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d837d
+7d7d7d7d837d7d7d280000000000000000000000000000000000000000657d837d7d7d7d7d7d837d7d7d7d7d7d7d7d7d837d837d7d650000000065837d7d7d7d
+7d7d7d837d7d7d7d7d65000000000000000000007d7d7d7d65000000000000000000007d837d7d7d838d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000
+00006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d
+8d8d8d8d8d8d7d7d7d7d837d7d7d7d836500000000000000000000000000000000000000000028657d7d7d837d7d7d7d7d7d7d837d837d837d7d6f2800000000
+00007d7d837d7d7d837d7d7d7d7d7d837d650000000000000000000065837d836f00000000000000000000657d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d6f0000
+00000000000000000000008d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f000000000000000000
+00006f8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d837d7d7d7d2800000000000000000000000000000000000000000000656f7d7d7d837d837d837d7d7d7d656f
+28000000000000000028837d7d7d7d7d7d7d837d7d7d7d7d7d65000000000000000000007d7d7d7d65000000000000000000007d7d7d7d837d8d8d8d8d8d8d8d
+8d8d8d8d8d6f0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f00
+000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d7d836500000000000000000000000000000000000000000000000000006f656f65
+6f656f6528000000000000000000000000657d7d7d7d837d7d7d7d7d7d7d837d7d65652800000000000000006f837d7d65652800000000000000006f837d7d7d
+7d8d8d8d8d8d8d8d8d8d8d8d8d000000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d837d7d7d7d837d7d837d7d7d65000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000007d837d7d7d7d7d837d837d7d7d7d7d837d7d7d7d656f6528280028657d7d837d7d7d7d656f6528
+280028657d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d6f000000000000000000000000008d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d6f6f0000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d7d7d7d7d28000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000007d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d837d837d837d7d7d7d837d7d
+7d7d7d7d7d837d837d7d657d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d6f0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d6f6f00000000006f8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d7d837d7d837d836500000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000287d7d837d7d7d837d7d7d7d837d7d7d7d837d7d7d7d7d7d
+7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d838d8d8d8d8d8d8d8d8d8d8d7d6f0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d6f00006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d837d7d7d7d
+7d7d7d7d6f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000065837d7d7d7d7d7d7d7d837d7d7d7d83
+7d7d7d7d7d7d837d7d7d7d7d7d837d7d7d837d837d7d7d7d837d7d7d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d7d6f6f6f6f6f6f6f6f6f6f6f6f6f8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d8d8d8d8d8d8d8d8d8d8d8d7d83
+7d7d7d7d7d837d7d7d837d7d83650000000000000000000000000000000000000000000000000000000000000000000000000000000000007d7d7d837d7d837d
+7d837d7d7d837d7d7d7d7d837d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d7d7d837d7d7d7d7d7d7d7d7d7d7d7d650000000000000000000000000000000000000000000000000000000000000000000000000000000000
+7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d837d7d7d7d7d837d7d837d7d7d7d7d7d7d837d7d7d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d837d7d7d837d7d7d280000000000000000000000000000000000000000000000000000000000000000
+00000000000000287d837d7d837d7d837d7d7d7d837d7d7d7d7d837d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d837d7d7d7d837d7d7d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d837d7d7d7d7d7d650000000000000000000000000000000000000000000000
+0000000000000000000000000000006f837d7d7d7d7d7d7d7d7d837d7d7d837d7d7d7d7d7d837d7d837d7d7d7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d7d7d837d7d7d650000000000000000000000000000
+0000000000000000000000000000000000000000000000657d7d7d837d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d837d7d7d7d
+837d838d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d837d7d7d7d837d836f2800000000
+000000000000000000000000000000000000000000000000000000000000287d837d7d7d7d7d837d7d7d7d837d7d7d837d7d7d837d7d7d7d837d7d7d7d7d837d
+7d7d7d7d7d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d7d7d7d
+7d7d837d650000000000000000000000000000000000000000000000000000000000000000286f837d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d
+7d7d837d7d7d7d7d7d837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d7d837d837d837d7d7d7d7d837d6528000000000000000000000000000000000000000000000000000000657d7d837d7d7d7d7d837d7d837d837d7d7d7d7d7d
+837d7d837d7d7d7d7d7d7d7d7d7d7d837d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d837d7d7d7d837d652800000000000000000000000000000000000000000000286f7d7d7d7d7d7d837d7d7d7d7d7d7d
+7d7d7d7d837d7d7d7d7d7d7d7d7d837d7d837d7d837d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d7d7d7d7d7d837d7d65650028000000000000000000000000002865657d7d837d7d837d7d7d
+7d7d7d7d7d837d7d7d7d837d7d7d837d7d837d7d837d7d7d7d7d7d7d7d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d7d837d7d7d837d837d7d7d656f656565656565656f7d7d7d7d837d
+837d7d7d7d7d7d837d7d837d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d837d837d7d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d837d7d7d7d7d7d7d7d7d7d7d7d837d7d837d7d83
+7d837d7d7d837d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d837d7d837d7d7d7d837d837d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d837d7d837d7d7d7d
+7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d837d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d837d
+7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d837d7d7d837d837d837d7d7d7d7d7d7d7d7d837d7d7d7d7d837d7d837d7d7d7d7d7d7d837d837d837d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d7d7d7d7d837d7d837d7d7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d837d7d7d837d7d7d7d7d7d7d7d7d837d7d837d7d7d
+7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d7d7d837d7d7d7d7d837d7d7d837d7d7d7d7d7d7d7d837d7d7d7d837d
+7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d837d7d7d837d7d7d7d837d7d837d7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d837d7d837d
+7d7d7d7d837d7d7d837d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d837d7d
+837d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d837d7d7d7d7d7d7d7d7d837d7d837d7d7d
+7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d8d7d7d7d837d7d837d7d
+7d7d7d7d7d7d7d7d837d7d7d7d7d837d7d837d7d7d7d837d837d7d837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d
+8d7d7d7d7d7d7d7d837d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d838d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d7d837d7d7d837d7d7d7d7d7d7d837d7d837d7d7d7d7d7d837d7d837d7d7d7d7d7d837d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d837d837d7d7d7d7d837d7d837d7d7d7d7d837d7d837d837d7d7d7d7d7d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d837d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d837d7d7d7d837d7d
+7d7d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d
+7d7d837d7d7d7d837d837d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d837d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d0400000007010100030000000000}}}{\b\fs28
+
+\par }}{\footerf \pard\plain \s17\qj\sb60\sa60\nowidctlpar\brdrt\brdrs\brdrw15\brsp20 \brdrl\brdrs\brdrw15\brsp20 \brdrb\brdrs\brdrw15 \brdrr\brdrs\brdrw15\brsp20 \tqc\tx4320\tqr\tx8640\adjustright \fs20\lang2057\cgrid {\f7\fs16
+This work constitutes an unpublished work under the copyright laws. It is submitted in confidence and contains proprietary and confidential information. The contents of this document may not be reproduc
+ed, transmitted or used without express written authority. The copyright and the foregoing restriction on reproduction, transmission and use extend to all media in which the information may be embodied.
+\par }\pard \s17\qc\sb60\sa60\nowidctlpar\brdrt\brdrs\brdrw15\brsp20 \brdrl\brdrs\brdrw15\brsp20 \brdrb\brdrs\brdrw15 \brdrr\brdrs\brdrw15\brsp20 \tqc\tx4320\tqr\tx8640\adjustright {\i Copyright}{\i\f3 \'20}{\i\f3 {\field{\*\fldinst SYMBOL 227 \\f "Symbol"
+ \\s 10}{\fldrslt\f3\fs20}}}{\i 1997-98 JetCell, Inc. All rights reserved
+\par }{\i\f1 All information is subject to change without notice}{\f1
+\par }}{\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}
+{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8
+\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \s63\qc\li1440\ri1080\widctlpar\brdrt\brdrdb\brdrw30\brsp20 \brdrl\brdrdb\brdrw30 \brdrb\brdrdb\brdrw30\brsp20
+\brdrr\brdrdb\brdrw30 \tx5040\tx9000\adjustright \shading10000 \b\f1\fs48\lang2057\cgrid {PocketBTS Software Design Specification: Module RM
+\par }\pard\plain \li1440\ri1109\widctlpar\tx4140\outlinelevel0\adjustright \fs20\lang2057\cgrid {\i\fs28 Document Number:\tab }{\fs28 PBTS-SW-DS-RR-RC0000}{\i\fs28
+\par }\pard \li1440\ri1109\widctlpar\tx4140\adjustright {\i\fs28
+\par Version:\tab }{\fs28 0.}{\fs28\revised\revauth1\revdttm1714044015 1}{\deleted\fs28\revauthdel1\revdttmdel1714044015 0}{\i\fs28
+\par
+\par }\pard \li1440\ri1109\widctlpar\brdrb\brdrs\brdrw30\brsp240 \tx4140\tx9900\adjustright {\i\fs28 Revision Date:\tab }{\field{\*\fldinst {\fs28 TIME \\@ "dddd, dd MMMM yyyy" }}{\fldrslt {\fs28\lang1024 Thursday, 08 October 1998}}}{\i\fs28
+\par }\pard \widctlpar\brdrt\brdrs\brdrw15\brsp20 \brdrb\brdrs\brdrw15\brsp20 \adjustright \shading10000 {\sect }\sectd \marglsxn1440\margrsxn1440\margtsxn1440\psz1\pgnrestart\linex0\headery1440\footery630\sectdefaultcl {\footer \pard\plain
+\s17\sb60\sa60\widctlpar\tqc\tx4320\tqr\tx8640\adjustright \fs20\lang2057\cgrid {
+\par }}{\*\pnseclvl1\pnucrm\pnstart1 {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1 {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1 {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1 {\pntxta .}}{\*\pnseclvl5\pndec\pnstart1 {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1
+{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1 {\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1 {\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \widctlpar\brdrt\brdrs\brdrw15\brsp20 \brdrb
+\brdrs\brdrw15\brsp20 \outlinelevel0\adjustright \shading10000 \fs20\lang2057\cgrid {\b\fs28 Revision History
+\par }\pard \widctlpar\adjustright {
+\par }\trowd \trgaph108\trbrdrt\brdrs\brdrw15 \trbrdrl\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrh\brdrs\brdrw15 \trbrdrv\brdrs\brdrw15 \clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrdb\brdrw15 \clbrdrr
+\brdrs\brdrw15 \cltxlrtb \cellx1170\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrdb\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb \cellx3198\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrdb\brdrw15 \clbrdrr
+\brdrs\brdrw15 \cltxlrtb \cellx7650\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrdb\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb \cellx9270\pard \qc\widctlpar\intbl\adjustright {\b Version\cell }\pard\plain
+\s2\keepn\widctlpar\intbl\outlinelevel1\adjustright \b\lang2057\cgrid {{\*\bkmkstart _Toc428728098}{\*\bkmkstart _Toc429806407}{\*\bkmkstart _Toc429807404}{\*\bkmkstart _Toc432248044}Date{\*\bkmkend _Toc428728098}{\*\bkmkend _Toc429806407}
+{\*\bkmkend _Toc429807404}{\*\bkmkend _Toc432248044}\cell }\pard\plain \widctlpar\intbl\adjustright \fs20\lang2057\cgrid {\b Comments/Remarks\cell }\pard\plain \s2\keepn\widctlpar\intbl\outlinelevel1\adjustright \b\lang2057\cgrid {
+{\*\bkmkstart _Toc428728099}{\*\bkmkstart _Toc429806408}{\*\bkmkstart _Toc429807405}{\*\bkmkstart _Toc432248045}Modified By{\*\bkmkend _Toc428728099}{\*\bkmkend _Toc429806408}{\*\bkmkend _Toc429807405}{\*\bkmkend _Toc432248045}\cell }\pard\plain
+\widctlpar\intbl\adjustright \fs20\lang2057\cgrid {\b \row }\trowd \trgaph108\trrh450\trbrdrt\brdrs\brdrw15 \trbrdrl\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrh\brdrs\brdrw15 \trbrdrv\brdrs\brdrw15 \clvertalt\clbrdrl
+\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb \cellx1170\clvertalt\clbrdrl\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb \cellx3198\clvertalt\clbrdrl\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb \cellx7650\clvertalt\clbrdrl\brdrs\brdrw15 \clbrdrr
+\brdrs\brdrw15 \cltxlrtb \cellx9270\pard \qc\widctlpar\intbl\adjustright {0.0\cell }\pard \widctlpar\intbl\adjustright {October 5, 1998\cell }\pard\plain \s15\widctlpar\intbl\adjustright \f4\fs20\cgrid {\f0\lang2057 Creation\cell }\pard\plain
+\widctlpar\intbl\adjustright \fs20\lang2057\cgrid {Xiaode Xu\cell }\pard \widctlpar\intbl\adjustright {\row }\trowd \trgaph108\trbrdrt\brdrs\brdrw15 \trbrdrl\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrh\brdrs\brdrw15 \trbrdrv
+\brdrs\brdrw15 \clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb \cellx1170\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb
+\cellx3198\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb \cellx7650\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb \cellx9270
+\pard \qc\widctlpar\intbl\adjustright {\revised\revauth1\revdttm1714044015 0.1}{\cell }\pard \widctlpar\intbl\adjustright {\revised\revauth1\revdttm1714044015 October 7, 1998}{\cell }\pard \qj\widctlpar\intbl\adjustright {
+\revised\revauth1\revdttm1714044015 Added and modified as per Ian}{\revised\revauth1\revdttm1714044018 \rquote s comments}{\revised\revauth1\revdttm1714044019 as well as discussion of Ian\rquote s comments via}{\revised\revauth1\revdttm1714044018
+ conference call between Bhava, JoAnne and Xiaode}{\revised\revauth1\revdttm1714044020 . Please note two Appendices have been added.}{ \cell }\pard \widctlpar\intbl\adjustright {\revised\revauth1\revdttm1714044019 Xiaode}{\cell }\pard
+\widctlpar\intbl\adjustright {\row }\trowd \trgaph108\trbrdrt\brdrs\brdrw15 \trbrdrl\brdrs\brdrw15 \trbrdrb\brdrs\brdrw15 \trbrdrr\brdrs\brdrw15 \trbrdrh\brdrs\brdrw15 \trbrdrv\brdrs\brdrw15 \clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb
+\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb \cellx1170\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb \cellx3198\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb
+\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb \cellx7650\clvertalt\clbrdrt\brdrs\brdrw15 \clbrdrl\brdrs\brdrw15 \clbrdrb\brdrs\brdrw15 \clbrdrr\brdrs\brdrw15 \cltxlrtb \cellx9270\pard \qc\widctlpar\intbl\adjustright {0.2\cell }\pard
+\widctlpar\intbl\adjustright {\cell }\pard \qj\widctlpar\intbl\adjustright {Add Ian\rquote s another two emails as Appendix C and correct the order of SDCCH channels where SMS-CB rides over air in terms of Ian\rquote s email comments.\cell }\pard
+\widctlpar\intbl\adjustright {Xiaode\cell }\pard \widctlpar\intbl\adjustright {\row }\pard \qc\widctlpar\tx720\tx1260\tx1440\adjustright {\f5\fs60\expnd0\expndtw-2
+\par }\pard \widctlpar\tx720\tx1260\tx1440\adjustright {\f5\fs24\expnd0\expndtw-2
+\par \sect }\sectd \marglsxn1440\margrsxn2160\margtsxn990\psz1\pgnrestart\linex0\headery990\footery496\sectdefaultcl {\header \pard\plain \s18\qc\sb60\sa60\widctlpar\tqc\tx4320\tqr\tx8640\adjustright \fs20\lang2057\cgrid {\lang1024
+{\shp{\*\shpinst\shpleft7717\shptop-23\shpright8633\shpbottom443\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz0\shplid2049{\sp{\sn shapeType}{\sv 75}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn pib}{\sv
+{\pict\picscalex57\picscaley100\piccropl0\piccropr0\piccropt0\piccropb0\picw2833\pich822\picwgoal1606\pichgoal466\pngblip\bliptag-765742159{\*\blipuid d25bb3b16ccc7a045386ed43243ab77f}
+89504e470d0a1a0a0000000d49484452000000c80000007f08030000009d497d610000000467414d410000b1889598f4a600000300504c54450000002626264b
+4b4b7171710f0f0f3535355a5a5a808080c0c0c04c4c4c969696e2e2e21d1d1d696969b3b3b3ffffff1800000000000000000000008000000000008000000000
+0080000000000000000000000000000000000000001e433a5c444f574e4c4f41445c5765622050616765735c4a657443656c6c5c000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000f6a657463656c6c6c6f676f2e4a50710500a0e82448008886470000d0e61990d243005cb84600000040
+00f0860ac12880f7bf04435981000000007d92f7bf0000400000000000d8344700d8344700c0ed410000000000d4344700d434470000004000f0860ac12880f7
+bf04435981000000007d92f7bf8abd410001000000f8626d503cb64600010000000000000038b646002013e0190000400075e462000100000038e3620010fa00
+5075e4620038e26200010000000000000038e26200baf9005038e2620075e46200010000000000000075e462007a03075038e2620075e4620077e3620074e562
+00007067004ce262000300000074e36200280000004a5045472c204a5045472046696c7465722c20433a5c50726f6772616d2046696c65735c436f6d6d6f6e20
+46696c65735c4d6963726f736f6674205368617265645c47727068666c745c4a504547494d33322e464c542c206a70670033776d660000d0e61990d243005cb8
+460000004000f0860ac12880f7bf04435981000000007d92f7bf0000400000000000d8344700d8344700c0ed410000000000d4344700d434478bb81bc6000000
+097048597300001b9400003c5b017d7512ae0000096749444154789ced5c4bb2a4380c84f0c28ed082b9ffd566d91719c0d8524ab2313555404c8c5ff77b65be
+4a5229c9066a5afe236d7ada00d3d267bbbd0d48a2943e82f23220696bf409945701d931d00ee5f2be2f02923170bbb6f76b801418947fd15556de02a4224895
+986b5279059024bd4af8d71552de0084d8abc407baa694e7816822809171284f0339a26d6226cca731077b16485a0c04f7c3c0a19e049216052129b110af3d3d
+d8834058d04ae8ae56ce8ef61c10c7601dbdd4eaeee11e02c245151b4e68377044a7f9f129202e19a43e5974ed233e0104f5ac4a45b0dee1a775d0fb81488d93
+b293740040a8bd5af27620ea02bb94c05aed850d2437034970c9abcd241d49190f49e5684f0341396fbf430cb945b0d56615f6ad465ab91308ba7f08d33cc936
+87e0d42a1c7c31c63d06048d0b8881c1442d091bba4aff19202220b561ec2d78a31243884990f70081ab1a3a280e5abc4a92ede7657703113e45b1c7464122a5
+4e1201840092586e0002273ea5a3b8972a4e6c1559aecc5d40d0a2311c5344bb9da02c15730710e51e036ec5be459e3b498eeadadf0351196d908fb525d540e2
+84b0b25424901465fbd474d9c101c5388ea99a8bd53d8805eb2f01244570d34f4044dc0f4f175b563b2dd8f48e7f846365ef928cfc2b202b9d663fc86c17f8d8
+44a242ae0b4c785b1bc815f1141006883ce5a8d073b3c6736dc002d94a36472370a42b8cc4c67ee5b4e3098481b0f1d5f6b5549ee7b5b6f4badf71ad1610e100
+1d1c31e41fa02ce0a55f6be5ba3ada6e0fc815d76a02614f6838d63e0ea93e13b87e9955de1017c2e9d20d8c5087903924f4f8f573c1a272ba3840d82a36d1fd
+62d4ea6aa49dd283cd0d59bf87b972658711fa5ed4ea30d221a4c8008a98bdc55051d66b014028a9c3fcdab58a791e90a82a5a818756070b1245524034234a23
+09cef31d4692b2a2b6b9428072cc9488055f9391749591b49562d3fa63cbb09e465a4516402083c800e43d4913d417bbd248c49531f93b89e32f5cfc3a528fe4
+5a4cb84464d43e2334e85a8eb5054a03c77edcc31067efd9565050ea4a149a11dd75caf80610cfc52b922e90dc1ccf2a84a0e920135c42683931c9797d1bc874
+82a3d8da58178546ac67cd682f8113a543e348115a2eba79fd00239d61446a3312ab6b9183358a3a56d5b83a6e95ce1f014475c7c26f938fbc4d9791b667a15f
+99e14575285ea02810049d68a4ace8e0d828e9032155261d6db63a100138ecb3c2f33e15cc78c44993e90e442dcc2dc96cf4112301240098b0989f79c80b8cd0
+658dc0a264b1a53c6121f7cb2d312356eb417b52c5654017cc4a145734928cd18efca381765c8085193138701c2b3e7a93db65fa54462d325d04027a881a1a27
+16b9b401e4d890fca05535ce51ab55c954fa82d8db744fa3965c92dceddabc15461cad63815e297171e491098a826442743482114a5b28b6d3bed565c4e62196
+489288845f6d4378c6ed31a2247316b51a06f6800c30228296a85402ae977dac49767fece611ab11b9404ca8cac53d46c80d440d46665c4d3c33393b99fd9a46
+7a595ddadd63c491704c8a12f4c0ba106c5555e2358d8cccd6a61e104a5ec9c8594e28bde29deb0ac1110105a6d63ad3c80890aed89b8ca801951c38853c2f24
+dd2798547e4123d3986bf519f18bf8c86509d785bc36ee4f11acff199b8a5a973532ca8806c662876b27edd2756e776a7806469446ce32fba71a31b3288e6be1
+1024f7fa4080020cce678c8cb956341a316277c3af4924fdc97aea44ad64a35617484c915d61c126771b488851472d37dbc0418d46386ae50aa63faf05c89676
+6b31d21857c15ce981a6efc576b6a1cb889dd78283b581e80b008c58137980c8eee59496c74fc84345a4401530bd49ec6e35d801a235e25d6b3d50873c1279e0
+588333f51921644449db406b5292ba51cb01220721266af1435b30f9a028505d09449dd18c47c434a9d8a7eb5ad4c888705fed683a55035dc944ad09ba876bed
+f1485f383b883548b6396dbb95668426d30233522f3de671644badf78afea599f7923551423990db917d5e94eae483abe3941414d82a484eb6d08c8c441c8545
+16bb9bf7ca55372b62bebb70749c8df63b0f397ca746f50123dcc35ee1814526fb2d9f90eb618e5a112755c41d2b8f919189c60690c3d6a5dc4374800471bd8b
+b2e541e6fcd4e971cf7a26c0a90962463c3bd8cf078078dba4e25ade34caac136203706e7f11282d62b7af1121eb6ecef5e62373ab62f729818c680213b6bf71
+65b8a011487e3d4e9cc947b1e630d4bdd12308a982699cc45060ba2d465412ef3ca05498b35b2c5523ae81c1fa969b72aaa9884b3172148dea4436f1b5af556a
+613d26b14907a4da40edf5977bc9149080ba6b30129dfcdd6005b7d4196759ea7b3b6e693b2317f59316548839102bcb55103b8ac6325f957aafcc6c13ef9c3f
+dc7a655fbfa7113989dd70fe75fc4a48c8f1711db44ff9b9f97a8b246d4f43a4fc13f3b5295def79ad2f3484576cf4c77f3cef636839fe9074bd3ab992b8cfbb
+fef6295336ca03c28f90a51a84cbbf10445856cd84885f30a280d47336925d79e0046babed3e899590dc4e71486a60f57d20d5439ab928c8ba6a879ceff6f044
+b72acbea02e6f04646baf356739e8e5b87b4f2c6821a407a350dafa5df6ba49efcda43a65352b6c35fb2d8ee60243bc895c79727394cd41f34b4c4b5d6ef8048
+07b88404678c085140f790cacf19115e70e5c9dfe033628453dbcfdf5690e7bc8044c5658f03f9f9d7628787ca9bc5add744d03519df895ecb2d6ff4d44be88d
+15fd364b7908460c49998de50e20f060f9f0ab49f27293d391cb96bb80c01bbaa32f8be56b2f8b44ecd425e51c37bd87c8c68cbcbe078fa062b0924e96e4a8e3
+b63743d929ce138aba115f59d0229727b8f35ddd5ae8f5fd6be6bbbe42d1521b072770fc1bdf9e9617b7ed60b91cee0d443c18b7bfcf2e2ea9f370d65c06e8a8
+685da268afba1f884c90f9659118e63f2ba0f5d75ac983a55ea784b2c7bf61e080c2973b0b61219684b4193edaccf13010fdf6ae359731f8d5897fd407bf17c5
+380f484374a533bee87b51b686467398f55822f1f965df54b3b51e25e42ca63e8c07bfcdc9daa9955363542373607bfcfbb59c0a5d1754e9c4abf6f6e8379e39
+cde4be923ece0ef62490856f3ca89250533270a4878160d5a2845e578c1ce86920388034fe350ae30d40d46bef3a978c1ee40d406aae7772e0f021de01c4542d
+5761bc0648bd05712173607b0d1059e0d32575e4f62220f20ed7f5aff77e1510bec5757dd7770129a47cb0e3db802c1fa1585e08e4d3f63f90b7b57f00a959d681f2c2c8aa0000000049454e44ae426082}}}}{\shprslt\par\pard
+\widctlpar\pvpara\posx7716\posnegy-24\absh466\absw916\dxfrtext180\dfrmtxtx180\dfrmtxty0\adjustright {\pict\picscalex57\picscaley100\piccropl0\piccropr0\piccropt0\piccropb0
+\picw2833\pich822\picwgoal1606\pichgoal466\wmetafile8\bliptag-765742159\blipupi227{\*\blipuid d25bb3b16ccc7a045386ed43243ab77f}010009000003fc3200000000da32000000000400000003010800050000000b0200000000050000000c027f00c8000400000007010400da320000430f2000cc00
+00007f00c800000000007f00c8000000000028000000c80000007f000000010008000000000038630000941b00005b3c00008e0000008e000000000000001e00
+0000380000004000000074000000750000007d000000d0000000d4000000f800000000000100000018000000280000004000f000400000004600c0004700d400
+4700d80047000000620038006200750062000000660000008000000081000000bf00000100000003000007037a004304bf00c10a86006a0f00000f0f0f000019
+e0009019e6001d1d1d001320000043202c006a202c0046206e00262626008028c1004a2e6f002e3233004734d4004734d80035353500e23850005c3a43000040
+00000041ed00594304006f435c00654374000043d2005c4441006946200000473400204745002c47450072475c00004824004d494700504a0000504a2000654a
+5c004b4b4b00544c46004c4c4c004f4c4e00574f44006150200045504a00815943005a5a5a00b85c0000505c3a004d5c73006d6172000062e2000062e3000062
+e40072636900626557007365670073656c0064657200726574000067700061685300666870006c694600696969006c6c6500656c69005c6c6c00506d62006f6d
+6d00676f6c00676f720005715000717171006f736f00e574000063746500207466005c746c00e47550006d773300927d0000f780280080808000008159004786
+88000a86f000f7927d0096969600e8a00000b3b3b30046b6380046b63c0046b85c0041bd8a0000bff70004bff700c0c0c00028c10a0043d2900034d4000034d8
+000062e24c00e2e2e20062e3770062e4750019e6d00041edc00086f00000bff78000bff7920000f9ba0000fa1000ffffff008d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d837d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d837d7d7d837d
+7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d83
+7d7d7d7d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+7d7d7d7d837d7d7d7d7d7d837d7d7d7d837d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d7d7d7d7d837d7d837d7d837d7d7d7d837d7d7d837d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d837d7d7d7d7d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d837d7d7d7d837d837d7d837d7d7d7d7d7d7d7d837d7d7d7d7d837d7d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d837d837d7d7d837d7d7d7d7d7d7d7d7d7d837d7d837d7d7d7d83
+7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d837d7d7d
+7d7d7d837d7d7d7d7d7d837d7d837d7d7d838d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d837d7d837d7d837d7d7d7d837d7d7d837d
+7d7d7d7d7d7d837d7d837d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d7d7d7d7d7d
+837d7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d837d837d7d7d837d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d7d
+7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d
+7d7d7d7d7d7d837d7d7d7d837d837d837d7d837d7d837d837d7d7d7d7d7d7d7d7d7d7d837d7d837d7d7d7d837d7d7d837d7d837d7d7d7d7d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d7d7d7d7d837d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d837d7d7d837d7d7d7d7d7d837d837d
+7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d7d837d7d7d7d7d837d7d7d837d7d7d7d7d7d7d837d837d7d7d7d7d7d7d7d7d
+837d7d7d7d7d7d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d837d7d7d7d837d837d7d837d838d837d7d837d7d837d837d7d7d7d7d7d7d837d7d837d7d7d7d7d7d
+7d837d7d837d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d7d837d837d7d6f6f65283e280000283e28656f657d7d7d7d837d7d7d7d7d7d
+7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d837d7d837d7d7d837d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d837d7d7d652800000000000000000000000000000000002865
+6f7d7d837d837d7d7d7d7d837d7d7d7d837d7d837d7d837d7d837d7d7d7d7d7d837d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d837d7d6f280000000000000000000000000000
+0000000000000000000065657d7d837d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d837d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d837d7d7d837d7d65000000000000000000
+0000000000000000000000000000000000000000286f7d7d7d7d837d7d837d837d7d837d7d837d7d837d7d7d7d7d7d7d837d7d7d7d7d837d7d7d7d837d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d7d7d837d6f000000
+000000000000000000000000000000000000000000000000000000000000657d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d837d7d7d7d7d7d7d7d7d
+7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d837d7d
+837d6f2800000000000000000000000000000000000000000000000000000000000000000000007d837d7d837d7d7d7d7d7d7d837d7d837d7d7d7d7d7d7d7d7d
+7d837d7d837d7d7d7d837d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d
+837d837d7d7d7d7d7d6500000000000000000000000000000000000000000000000000000000000000000000000000657d837d7d7d837d837d837d7d7d7d7d7d
+7d837d7d837d837d7d7d7d7d7d7d837d7d7d7d837d7d837d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d7d7d7d7d7d7d7d7d7d7d837d6500000000000000000000000000000000000000000000000000000000000000000000000000006f7d7d7d7d7d7d7d7d
+7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d837d7d7d837d0000000000000000000000000000000000000000000000000000000000000000000000000000000028
+837d7d837d7d7d7d7d837d7d7d7d7d837d7d837d7d7d7d837d7d7d837d7d7d7d7d7d837d7d837d7d837d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d7d7d837d7d28000000000000000000000000000000000000000000000000000000000000000000
+00000000000000007d837d7d7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d837d7d7d7d7d7d650000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000657d7d7d837d7d7d837d7d7d7d7d7d837d7d837d7d7d7d7d7d837d7d837d7d7d837d7d7d7d837d7d837d7d7d837d7d83
+7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d837d7d837d7d7d7d837d7d6500000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000657d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d837d7d7d7d
+7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d7d7d7d836f000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000657d7d7d7d837d7d837d7d7d7d7d837d7d837d7d7d7d7d7d837d7d7d7d837d7d
+837d7d7d7d7d7d837d7d837d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d837d7d837d836f0000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000007d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d
+7d7d7d837d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d838d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d837d7d7d7d7d
+7d7d28000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d7d7d7d7d837d7d837d7d7d7d7d7d
+7d837d7d7d7d7d7d7d837d7d7d7d837d7d837d7d7d7d837d7d837d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d83
+7d7d7d7d7d7d7d837d650000000000000000000000000000000000000000000000000000286565656f656565286528000000000000000000006f837d7d7d7d7d
+7d7d7d7d7d7d837d7d7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d7d7d7d7d7d837d837d7d7d00000000000000000000000000000000000000000000000065657d7d837d7d837d837d837d7d7d7d7d656528000000
+00657d837d7d837d7d837d837d7d7d7d837d7d7d7d7d7d7d7d7d837d837d7d7d7d837d837d7d7d837d7d837d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d7d7d7d7d6500000000000000000000000000000000000000000000657d7d7d837d7d7d837d7d7d7d7d7d7d7d
+7d7d837d7d7d652800287d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d837d7d7d837d7d7d7d7d7d7d837d7d7d7d7d837d7d7d7d7d7d7d7d837d838d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d7d00000000000000000000000000000000000000000028657d7d837d7d7d7d7d7d
+7d837d7d7d837d7d837d7d837d7d837d65657d837d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d
+7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d8d8d8d8d8d8d8d8d8d8d8d8d8d837d7d7d7d837d7d83650000000000000000000000000000000000000000287d7d7d
+7d7d7d7d7d837d7d7d7d7d837d7d7d7d7d7d7d7d7d837d7d7d7d7d7d837d837d7d837d7d837d7d7d7d837d837d837d837d837d7d7d7d7d7d7d837d837d837d7d
+837d7d7d7d7d837d7d8d8d8d8d8d6f6f6f6f6f6f6f6f7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d6f6f006f00000000000000
+6f6f7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d6f6f006f00006f006f6f6f7d8d8d8d8d8d7d7d7d7d7d7d7d7d7d0000000000000000000000000000000000
+000000287d83837d837d7d837d7d7d7d837d7d7d7d7d837d7d7d7d836f6f65006500280000002865657d7d7d7d7d7d7d7d7d6f657d657d657d657d6f7d837d7d
+836f657d657d657d657d657d837d7d7d7d8d8d8d8d6f00000000000000000000006f6f7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d6f0000000000
+0000000000000000000000006f7d8d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000000000006f8d8d8d8d7d837d7d837d7d836f000000000000000000
+00000000000000000000287d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d837d65000000000000000000000000000000656f7d7d837d837d000000000000
+00000000657d7d7d7d28000000000000000000657d7d7d7d838d8d8d8d7d00000000000000000000000000006f7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d
+00000000000000000000000000000000000000000000006f7d8d8d8d8d8d8d8d7d6f0000000000000000000000000000006f8d8d8d8d7d7d837d7d7d837d2800
+0000000000000000000000000000000000007d7d7d7d7d7d7d837d7d837d7d7d7d837d7d7d7d837d6f0000000000000000000000000000000000000000657d7d
+7d7d00000000000000000000657d7d837d00000000000000000000657d7d7d7d7d8d8d8d8d6f000000000000000000000000000000006f8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d7d6f000000000000000000000000000000000000000000000000007d8d8d8d8d8d8d8d6f00000000000000000000000000000000008d8d8d8d837d
+7d7d7d7d7d7d00000000000000000000000000000000000000657d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d837d7d2800000000000000000000000000000000
+0000000000657d7d7d7d000000000000000000006f837d7d7d280000000000000000006f837d7d837d8d8d8d8d7d00000000000000000000000000000000006f
+8d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000000000000000000000000000000000007d8d8d8d8d8d8d6f00000000000000000000000000000000
+00007d8d8d8d7d7d837d7d837d6f000000000000000000000000000000000000287d7d7d837d7d7d7d7d7d7d7d837d7d7d7d837d7d7d00000000000000000000
+000000000000000000000000006f837d7d8300000000000000000000657d7d7d8300000000000000000000657d7d7d7d7d8d8d8d8d6f00000000000000000000
+00000000000000007d8d8d8d8d8d8d8d8d8d8d6f000000000000000000000000000000000000000000000000000000006f8d8d8d8d8d8d6f0000000000000000
+000000000000000000008d8d8d8d7d7d7d7d7d7d7d6500000000000000000000000000000000000065837d7d7d7d7d7d837d7d837d7d7d837d7d7d7d7d280000
+000000000000000000000000000000000000000000687d7d7d7d28000000000000000000657d7d837d280000000000000000006f837d7d7d838d8d8d8d6f0000
+00000000000000000000000000000000008d8d8d8d8d8d8d8d8d7d00000000000000000000000000000000000000000000000000000000006f8d8d8d8d8d7d00
+0000000000000000000000000000000000007d8d8d8d7d837d7d7d837d000000000000000000000000000000000000287d7d837d7d837d7d7d7d7d7d7d7d7d7d
+7d7d7d7d650000000000000000000000000000000000000000000000000b837d7d83000000000000000000006f837d7d8300000000000000000000657d837d7d
+7d8d8d8d8d6f000000000000000000000000000000000000006f8d8d8d8d8d8d8d7d000000000000000000000000000000000000000000000000000000000000
+6f8d8d8d8d8d6f000000000000000000000000000000000000007d8d8d8d837d7d7d7d7d65000000000000000000000000000000000000657d7d7d7d7d7d7d7d
+837d7d837d7d837d7d7d836f000000000000000000000028656f7d7d7d7d656f652800000028837d837d28000000000000000000657d7d7d7d28000000000000
+0000006f837d7d7d838d8d8d8d7d00000000000000000000000000000000000000008d8d8d8d8d8d8d6f00000000000000000000000000000000006f6f6f6f00
+6f000000000000006f8d8d8d8d8d6f000000000000000000000000006f006f6f6f006f8d8d8d7d7d7d7d837d650000000000000000000000000000000000007d
+837d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d2800000000000000000000657d7d837d7d837d837d837d6f6500287d7d7d7d3e0000000000000000006f837d7d
+7d3e000000000000000000657d7d7d7d7d8d8d8d8d6f00000000000000000000000000000000000000007d8d8d8d8d8d6f00000000000000000000000000006f
+7d8d8d8d8d8d8d8d8d7d7d6f000000006f7d8d8d8d8d6f0000000000000000000000006f7d8d8d8d7d7d8d8d8d8d7d837d7d7d7d650000000000000000000000
+000000000000287d7d7d837d7d7d7d7d837d7d7d837d7d7d7d7d6500000000000000000000657d837d7d7d7d7d7d7d7d7d7d837d7d657d7d7d7d280000000000
+000000006f7d7d837d280000000000000000006f837d7d7d838d8d8d8d7d6f7d7d7d6f0000000000000000000000000000006f8d8d8d8d8d6f00000000000000
+00000000006f7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f6f006f8d8d8d8d8d6f0000000000000000000000008d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d8300000000
+0000000000000000000000000000657d837d7d7d7d7d837d7d7d837d7d7d837d837d65000000000000000000657d7d7d7d7d837d7d837d7d837d7d7d7d7d837d
+837d6500000000000000000065837d7d7d65000000000000000000657d837d7d7d8d8d8d8d8d8d8d8d8d8d7d6f000000000000000000000000006f8d8d8d8d7d
+0000000000000000000000006f7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d6f8d8d8d8d8d0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d837d
+7d837d7d280000000000000000000000000000000000657d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d280000000000000000007d837d7d7d7d7d7d7d7d7d7d
+7d7d7d7d837d7d7d7d7d280000000000000000007d7d7d7d83000000000000000000007d7d7d7d7d838d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000
+0000008d8d8d8d6f0000000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d6f00000000000000000000006f8d8d8d8d8d
+8d8d8d8d8d8d7d7d7d7d7d6f0000000000000000000000000000000000007d7d837d7d7d7d7d837d7d837d7d837d7d7d7d7d000000000000000000657d7d837d
+7d837d7d7d837d837d7d837d7d7d7d7d7d7d6500000000000000000065837d7d7d6500000000000000000065837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d6f0000
+000000000000000000006f8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d00000000000000000000
+00007d8d8d8d8d8d8d8d8d8d8d8d7d837d7d836f000000000000000000000000000000000000837d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d7d000000000000
+0000006f7d837d7d7d837d837d7d837d837d7d837d7d7d837d83280000000000000000007d7d7d7d83280000000000000000007d7d7d837d7d8d8d8d8d8d8d8d
+8d8d8d8d8d6f000000000000000000000000008d8d8d8d0000000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d0000
+000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d6f0000000000000000000000000000000000287d7d837d7d7d7d7d7d837d7d837d7d837d7d
+7d6500000000000000000000000000000000002800280028002800652865657d7d7d3e00000000000000000065837d7d7d6500000000000000000065837d7d7d
+838d8d8d8d8d8d8d8d8d8d8d8d6f0000000000000000000000006f8d8d8d7d0000000000000000000000008d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d6f00000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d837d7d837d650000000000000000000000000000000000657d7d7d7d837d7d837d7d
+7d7d7d7d7d7d7d7d836f00000000000000000000000000000000000000000000000000000000007d7d83280000000000000000007d7d7d7d8328000000000000
+0000007d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d7d000000000000000000000000008d8d8d7d00000000000000000000006f7d6f7d7d7d7d7d7d7d7d7d7d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d0000000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d6500000000000000000000000000000000006f837d
+7d7d7d7d7d7d7d7d7d7d7d837d7d837d7d6500000000000000000000000000000000000000000000000000000000007d7d7d650000000000000000007d7d837d
+7d3e00000000000000000065837d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d000000000000000000000000008d8d8d7d0000000000000000000000000000000000
+000000000000000000000000000000006f008d8d8d8d6f00000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d65000000000000000000000000
+0000000000657d7d837d7d837d7d837d7d837d7d7d7d7d7d83650000000000000000000000000000000000000000000000000000000000837d7d280000000000
+000000007d7d7d7d83280000000000000000007d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d000000000000000000000000008d8d8d6f000000000000000000
+00000000000000000000000000000000000000000000000000007d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d6500000000
+000000000000000000000000006f837d7d7d7d7d7d7d7d837d7d7d7d837d7d7d7d7d00000000000000000000000000000000000000000000000000000000287d
+7d7d650000000000000000007d837d7d7d650000000000000000007d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d6f00
+000000000000000000000000000000000000000000000000000000000000000000008d8d8d8d0000000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d837d
+7d7d83280000000000000000000000000000000000657d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d6500000000000000000000000000000000000000000000
+000000000000287d837d280000000000000000007d7d7d7d83280000000000000000007d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d00000000000000000000
+0000008d8d8d7d00000000000000000000000000000000000000000000000000000000000000000000007d8d8d8d6f00000000000000000000007d8d8d8d8d8d
+8d8d8d8d8d8d7d7d837d7d2800000000000000000000000000000000006f837d837d7d7d7d7d7d7d837d837d7d837d7d7d7d0000000000000000006f6f656f65
+65656f6565000000000000000000657d7d7d650000000000000000007d7d837d7d650000000000000000007d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d0000
+000000000000000000006f8d8d8d6f00000000000000000000000000000000000000000000000000000000000000000000008d8d8d8d6f000000000000000000
+00006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d836500000000000000000000000000000000006f7d7d7d7d837d7d837d7d7d7d7d7d7d7d7d837d7d000000000000
+00000065837d837d837d837d7d650000000000000000657d837d28000000000000000000837d7d7d83280000000000000000007d837d7d7d7d8d8d8d8d8d8d8d
+8d8d8d8d8d8d000000000000000000000000008d8d8d6f00000000000000000000000000000000000000000000000000000000000000000000007d8d8d8d6f00
+000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d28000000000000000000000000000000000065837d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d
+7d7d650000000000000000287d7d7d7d7d7d7d7d83280000000000000000657d837d650000000000000000007d7d837d7d3e0000000000000000007d7d7d7d7d
+838d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d7d000000000000000000000000000000000000000000000000000000000000000000
+006f8d8d8d8d6f00000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d836500000000000000000000000000000000006f7d7d837d7d837d7d837d
+7d837d7d7d7d837d7d836f0000000000000000007d7d837d7d7d7d837d0000000000000000007d7d7d7d280000000000000000007d7d7d7d8328000000000000
+000000837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d0000000000000000000000006f8d8d8d8d0000000000000000000000007d6f6f6f6f6f6f6f6f6f6f0000
+000000000000000000008d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d837d837d7d650000000000000000000000000000000000657d7d
+7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d83280000000000000000657d7d7d7d7d837d6f0000000000000000287d837d7d3e0000000000000000007d7d837d
+7d650000000000000000007d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d00000000000000000000006f8d8d8d8d8d
+8d8d8d8d8d8d6f000000000000000000006f8d8d8d8d6f00000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d65000000000000000000000000
+0000000000657d837d7d837d7d837d7d837d7d7d7d7d7d837d7d7d65000000000000000000657d837d7d7d6500000000000000000065837d7d83280000000000
+00000000837d7d7d83280000000000000000007d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d000000000000000000000000008d8d8d8d6f0000000000000000
+0000008d8d8d8d8d8d8d8d8d8d8d6f000000000000000000006f8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d837d7d836f00000000
+00000000000000000000000000657d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d837d28000000000000000000006f656f65000000000000000000287d7d7d
+7d7d650000000000000000007d7d7d7d7d3e0000000000000000007d7d7d7d7d838d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d7d
+00000000000000000000007d8d8d8d8d8d8d8d8d8d7d00000000000000000000007d8d8d8d8d6f00000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d7d7d
+7d7d7d65000000000000000000000000000000000028837d7d7d7d837d7d7d7d7d837d7d7d7d837d7d7d7d7d7d00000000000000000000000000000000000000
+0000000065837d7d837d28000000000000000000837d837d8328000000000000000000837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d00000000000000000000
+00006f8d8d8d8d7d00000000000000000000006f8d8d8d8d8d8d8d8d8d7d00000000000000000000008d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d
+8d8d8d8d8d8d7d837d7d837d0000000000000000000000000000000000007d7d837d7d7d7d837d837d7d7d837d7d7d7d7d837d7d836500000000000000000000
+0000000000000000000000657d7d7d7d7d7d650000000000000000007d7d7d7d7d650000000000000000007d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d0000
+000000000000000000006f7d8d8d8d8d6f00000000000000000000007d8d8d8d8d8d8d8d8d6f000000000000000000006f8d8d8d8d8d6f000000000000000000
+00006f8d8d8d8d8d7d8d8d8d8d8d7d7d7d7d7d7d0000000000000000000000000000000000007d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d6528
+000000000000000000000000000000000000287d837d7d7d7d7d280000000000000000007d7d837d7d280000000000000000007d7d837d7d7d8d8d8d8d8d8d8d
+8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d8d7d0000000000000000000000007d8d8d8d8d8d8d6f00000000000000000000007d7d6f6f6f6f6f00
+000000000000000000006f6f6f6f6f6f6f7d8d8d8d8d7d837d7d837d280000000000000000000000000000000000657d7d7d7d7d7d7d7d7d837d7d7d7d7d7d83
+7d7d837d7d837d7d6500000000000000000000000000000000657d837d7d837d7d7d3e0000000000000000007d7d7d7d7d3e0000000000000000007d7d7d7d83
+7d8d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d8d8d6f0000000000000000000000006f7d8d8d7d0000000000000000000000006f
+8d7d00000000000000000000000000000000000000000000006f8d8d8d8d7d7d7d7d7d7d650000000000000000000000000000000000657d837d7d837d7d837d
+7d7d837d837d7d7d7d7d7d7d7d7d7d7d7d65280000000000000000000000002865837d7d7d7d7d7d7d7d28000000000000000000837d7d837d28000000000000
+000000837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d7d000000000000000000000000008d8d8d8d8d8d8d00000000000000000000000000000000000000000000
+000000000000007d8d7d00000000000000000000000000000000000000000000006f8d8d8d8d7d837d7d837d650000000000000000000000000000000000287d
+7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d837d7d837d7d7d7d656565002800282865657d7d7d7d7d7d837d837d7d83000000000000000000007d7d7d7d
+83000000000000000000007d7d7d7d7d838d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d8d8d8d7d00000000000000000000000000
+00000000000000000000000000006f8d8d7d00000000000000000000000000000000000000000000006f8d8d8d8d7d7d7d7d7d7d650000000000000000000000
+000000000000006f7d7d7d7d7d837d7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d837d7d837d7d7d7d7d7d7d280000000000
+00000000837d7d7d7d280000000000000000007d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d8d8d8d8d6f00000000
+000000000000000000000000000000000000000000007d8d8d8d00000000000000000000000000000000000000000000006f8d8d8d8d7d837d7d7d837d000000
+0000000000000000000000000000006f837d837d7d7d7d837d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d837d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d83
+7d7d3e0000000000000000007d7d837d7d3e0000000000000000007d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d000000000000000000000000008d8d8d8d8d
+8d8d8d8d7d0000000000000000000000000000000000000000000000008d8d8d8d7d00000000000000000000000000000000000000000000006f8d8d8d8d837d
+7d7d837d7d280000000000000000000000000000000000287d7d7d7d837d7d7d7d7d7d7d7d7d837d7d837d7d7d7d837d7d837d7d7d7d7d837d837d7d837d7d83
+7d7d7d837d7d7d7d7d7d280000000000000000007d7d7d7d7d28000000000000000000837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d7d00000000000000000000
+00006f8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000000000000000000000006f7d8d8d8d8d8d00000000000000000000000000000000000000000000
+00008d8d8d8d7d7d7d7d7d7d7d650000000000000000000000000000000000006f837d7d7d7d7d7d837d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d
+7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d83000000000000000000007d837d7d83280000000000000000007d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d0000
+000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d6f0000000000000000000000000000000000006f7d8d8d8d8d8d8d0000000000000000000000000000
+000000000000000000008d8d8d8d7d837d7d7d7d836f000000000000000000000000000000000000287d837d7d7d7d837d7d7d7d7d7d7d7d837d7d837d7d837d
+7d7d837d7d7d7d7d7d7d7d7d837d7d7d7d837d7d7d7d7d7d7d7d000000000000000000007d7d7d7d7d000000000000000000007d837d7d7d7d8d8d8d8d8d8d8d
+8d8d8d8d8d6f000000000000000000000000008d8d8d8d8d8d8d8d8d8d8d8d8d8d6f6f000000000000000000000000006f7d8d8d8d8d8d8d8d8d6f0000000000
+0000000000000000000000000000000000007d8d8d8d7d7d837d7d7d7d7d280000000000000000000000000000000000006f837d7d7d7d7d7d7d837d7d837d7d
+7d7d7d7d7d7d7d7d837d7d7d837d7d837d7d7d7d7d7d7d837d7d7d7d837d7d837d7d000000000000000000007d7d7d837d000000000000000000007d7d7d7d7d
+838d8d8d8d8d8d8d8d8d8d8d8d6f0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d6f6f6f006f006f6f6f8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d837d7d7d837d7d8365000000000000000000000000000000000000007d837d7d837d
+7d7d7d7d7d7d7d837d7d837d7d837d7d7d7d7d7d7d7d7d7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d00000000000000000000837d7d7d7d00000000000000
+0000007d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d0000000000000000000000000000000000
+0000287d7d7d7d7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d837d7d7d7d7d7d7d837d837d7d7d7d837d7d000000000000000000007d7d7d83
+7d000000000000000000007d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d6f0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d837d7d7d650000000000000000
+00000000000000000000006f7d837d7d7d7d7d7d7d7d7d837d7d7d837d7d7d7d837d7d7d837d837d6f28657d7d7d837d7d7d7d7d837d7d7d7d7d000000000000
+000000007d7d7d7d65000000000000000000007d837d7d837d8d8d8d8d8d8d8d8d8d8d8d8d6f000000000000000000000000008d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d8365
+0000000000000000000000000000000000000000657d7d7d7d837d7d837d7d7d7d837d7d7d837d7d7d7d7d7d7d7d6f650000657d837d7d7d7d837d7d7d7d7d83
+7d7d000000000000000000007d7d7d837d00000000000000000000657d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d6f0000000000000000000000006f8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d837d
+7d7d7d7d837d7d7d280000000000000000000000000000000000000000657d837d7d7d7d7d7d837d7d7d7d7d7d7d7d7d837d837d7d650000000065837d7d7d7d
+7d7d7d837d7d7d7d7d65000000000000000000007d7d7d7d65000000000000000000007d837d7d7d838d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000
+00006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d
+8d8d8d8d8d8d7d7d7d7d837d7d7d7d836500000000000000000000000000000000000000000028657d7d7d837d7d7d7d7d7d7d837d837d837d7d6f2800000000
+00007d7d837d7d7d837d7d7d7d7d7d837d650000000000000000000065837d836f00000000000000000000657d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d6f0000
+00000000000000000000008d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f000000000000000000
+00006f8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d837d7d7d7d2800000000000000000000000000000000000000000000656f7d7d7d837d837d837d7d7d7d656f
+28000000000000000028837d7d7d7d7d7d7d837d7d7d7d7d7d65000000000000000000007d7d7d7d65000000000000000000007d7d7d7d837d8d8d8d8d8d8d8d
+8d8d8d8d8d6f0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f00
+000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d7d836500000000000000000000000000000000000000000000000000006f656f65
+6f656f6528000000000000000000000000657d7d7d7d837d7d7d7d7d7d7d837d7d65652800000000000000006f837d7d65652800000000000000006f837d7d7d
+7d8d8d8d8d8d8d8d8d8d8d8d8d000000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d837d7d7d7d837d7d837d7d7d65000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000007d837d7d7d7d7d837d837d7d7d7d7d837d7d7d7d656f6528280028657d7d837d7d7d7d656f6528
+280028657d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d6f000000000000000000000000008d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d6f6f0000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d7d7d7d7d28000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000007d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d837d837d837d7d7d7d837d7d
+7d7d7d7d7d837d837d7d657d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d6f0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d6f6f00000000006f8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d7d837d7d837d836500000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000287d7d837d7d7d837d7d7d7d837d7d7d7d837d7d7d7d7d7d
+7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d838d8d8d8d8d8d8d8d8d8d8d7d6f0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d6f00006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d837d7d7d7d
+7d7d7d7d6f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000065837d7d7d7d7d7d7d7d837d7d7d7d83
+7d7d7d7d7d7d837d7d7d7d7d7d837d7d7d837d837d7d7d7d837d7d7d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d7d6f6f6f6f6f6f6f6f6f6f6f6f6f8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d8d8d8d8d8d8d8d8d8d8d8d7d83
+7d7d7d7d7d837d7d7d837d7d83650000000000000000000000000000000000000000000000000000000000000000000000000000000000007d7d7d837d7d837d
+7d837d7d7d837d7d7d7d7d837d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d7d7d837d7d7d7d7d7d7d7d7d7d7d7d650000000000000000000000000000000000000000000000000000000000000000000000000000000000
+7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d837d7d7d7d7d837d7d837d7d7d7d7d7d7d837d7d7d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d837d7d7d837d7d7d280000000000000000000000000000000000000000000000000000000000000000
+00000000000000287d837d7d837d7d837d7d7d7d837d7d7d7d7d837d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d837d7d7d7d837d7d7d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d837d7d7d7d7d7d650000000000000000000000000000000000000000000000
+0000000000000000000000000000006f837d7d7d7d7d7d7d7d7d837d7d7d837d7d7d7d7d7d837d7d837d7d7d7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d7d7d837d7d7d650000000000000000000000000000
+0000000000000000000000000000000000000000000000657d7d7d837d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d837d7d7d7d
+837d838d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d837d7d7d7d837d836f2800000000
+000000000000000000000000000000000000000000000000000000000000287d837d7d7d7d7d837d7d7d7d837d7d7d837d7d7d837d7d7d7d837d7d7d7d7d837d
+7d7d7d7d7d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d7d7d7d
+7d7d837d650000000000000000000000000000000000000000000000000000000000000000286f837d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d
+7d7d837d7d7d7d7d7d837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d7d837d837d837d7d7d7d7d837d6528000000000000000000000000000000000000000000000000000000657d7d837d7d7d7d7d837d7d837d837d7d7d7d7d7d
+837d7d837d7d7d7d7d7d7d7d7d7d7d837d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d837d7d7d7d837d652800000000000000000000000000000000000000000000286f7d7d7d7d7d7d837d7d7d7d7d7d7d
+7d7d7d7d837d7d7d7d7d7d7d7d7d837d7d837d7d837d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d7d7d7d7d7d837d7d65650028000000000000000000000000002865657d7d837d7d837d7d7d
+7d7d7d7d7d837d7d7d7d837d7d7d837d7d837d7d837d7d7d7d7d7d7d7d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d7d837d7d7d837d837d7d7d656f656565656565656f7d7d7d7d837d
+837d7d7d7d7d7d837d7d837d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d837d837d7d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d837d7d7d7d7d7d7d7d7d7d7d7d837d7d837d7d83
+7d837d7d7d837d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d837d7d837d7d7d7d837d837d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d837d7d837d7d7d7d
+7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d837d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d837d
+7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d837d7d7d837d837d837d7d7d7d7d7d7d7d7d837d7d7d7d7d837d7d837d7d7d7d7d7d7d837d837d837d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d7d7d7d7d837d7d837d7d7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d837d7d7d837d7d7d7d7d7d7d7d7d837d7d837d7d7d
+7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d7d7d837d7d7d7d7d837d7d7d837d7d7d7d7d7d7d7d837d7d7d7d837d
+7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d837d7d7d837d7d7d7d837d7d837d7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d837d7d837d
+7d7d7d7d837d7d7d837d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d837d7d
+837d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d837d7d7d7d7d7d7d7d7d837d7d837d7d7d
+7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d8d7d7d7d837d7d837d7d
+7d7d7d7d7d7d7d7d837d7d7d7d7d837d7d837d7d7d7d837d837d7d837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d
+8d7d7d7d7d7d7d7d837d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d838d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d7d837d7d7d837d7d7d7d7d7d7d837d7d837d7d7d7d7d7d837d7d837d7d7d7d7d7d837d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d837d837d7d7d7d7d837d7d837d7d7d7d7d837d7d837d837d7d7d7d7d7d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d837d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d837d7d7d7d837d7d
+7d7d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d
+7d7d837d7d7d7d837d837d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d837d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d0400000007010100030000000000}\par}}}{
+\b\f1\lang1033 PocketBTS Software Design Specification: Module RM
+\par }\pard \s18\sb60\sa60\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\b\f1\lang1033
+\par }\pard \s18\qc\sb60\sa60\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\b\i\f1\lang1033
+\par }}{\footer \pard\plain \s17\sb60\sa60\widctlpar\tqc\tx4680\tqr\tx9270\tqr\tx9720\adjustright \fs20\lang2057\cgrid {\b\f1
+\par }\pard \s17\sb60\sa60\widctlpar\tqc\tx4680\tx5940\tx7200\tx8460\tx8550\tqr\tx9270\tqr\tx9720\adjustright {\b\f1 PocketBTS Software Design}{\tab Page }{\field{\*\fldinst {\cs44 PAGE }}{\fldrslt {\cs44\lang1024 3}}}{\cs44 {\*\bkmkstart _Toc406834718}
+{\*\bkmkstart _Toc406838556}{\*\bkmkstart _Toc412979105} (of }{\field{\*\fldinst {\cs44 NUMPAGES \\* MERGEFORMAT }}{\fldrslt {\cs44\lang1024 1}}}{\cs44 )\tab \tab Version: 0.0
+\par }\pard \s17\qc\sb60\sa60\widctlpar\tqc\tx4320\tqc\tx5400\tqr\tx8640\tqr\tx9720\adjustright {\b\f1\fs16 JetCell, Inc. Proprietary and Confidential
+\par }\pard \s17\qc\sb60\sa60\widctlpar\tqc\tx4320\tqc\tx5220\tqr\tx8640\adjustright {\i\fs16 Copyright}{\i\f3\fs16 \'20\'e3}{\i\fs16 1997-98 JetCell, Inc. All rights reserved}{{\*\bkmkend _Toc406834718}{\*\bkmkend _Toc406838556}{\*\bkmkend _Toc412979105}
+
+\par }}{\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}
+{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8
+\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \qc\widctlpar\brdrt\brdrs\brdrw15\brsp40 \brdrb\brdrs\brdrw15\brsp20 \outlinelevel0\adjustright \shading10000
+\fs20\lang2057\cgrid {\b\fs28 Table of Contents
+\par }\pard\plain \s29\li200\widctlpar\tqr\tldot\tx9350\adjustright \scaps\fs20\lang2057\cgrid {\b\f5\expnd0\expndtw-2
+\par }\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\b\scaps\f5\expnd0\expndtw-2 REVISION HISTORY
+\par LIST OF FIGURES
+\par LIST OF TABLES}{\field\fldedit{\*\fldinst {\b\f5\expnd0\expndtw-2 TOC \\o "1-3" }}{\fldrslt {\lang1024
+\par }\pard\plain \s28\sb120\sa120\widctlpar\tx400\tqr\tldot\tx8630\adjustright \b\caps\fs20\lang2057\cgrid {\i\f1\lang1024 1.}{\lang1024 \tab }{\i\f1\lang1024 Introduction}{\lang1024 \tab }{\field{\*\fldinst {\lang1024 PAGEREF _Toc432248046 \\h }{\lang1024
+{\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f00630034003300320032003400380030003400360000000000000000000000000000}}}{\fldrslt {\lang1024 1}}}{\lang1024
+\par }\pard\plain \s29\li200\widctlpar\tx800\tqr\tldot\tx8630\adjustright \scaps\fs20\lang2057\cgrid {\i\f1\lang1024 1.1}{\lang1024 \tab }{\i\f1\lang1024 Scope}{\lang1024 \tab }{\field{\*\fldinst {\lang1024 PAGEREF _Toc432248047 \\h }{\lang1024 {\*\datafield
+08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f00630034003300320032003400380030003400370000000000000000000000000000}}}{\fldrslt {\lang1024 1}}}{\lang1024
+\par }{\i\f1\cf1\lang1024 1.2}{\lang1024 \tab }{\i\f1\cf1\lang1024 References}{\lang1024 \tab }{\field{\*\fldinst {\lang1024 PAGEREF _Toc432248048 \\h }{\lang1024 {\*\datafield
+08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f00630034003300320032003400380030003400380000000000000000000000000000}}}{\fldrslt {\lang1024 1}}}{\lang1024
+\par }{\i\f1\lang1024 1.3}{\lang1024 \tab }{\i\f1\lang1024 Abbreviations}{\lang1024 \tab }{\field{\*\fldinst {\lang1024 PAGEREF _Toc432248049 \\h }{\lang1024 {\*\datafield
+08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f00630034003300320032003400380030003400390000000000000000000000000000}}}{\fldrslt {\lang1024 2}}}{\lang1024
+\par }{\i\f1\lang1024 1.4}{\lang1024 \tab }{\i\f1\lang1024 Organization}{\lang1024 \tab }{\field{\*\fldinst {\lang1024 PAGEREF _Toc432248050 \\h }{\lang1024 {\*\datafield
+08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f00630034003300320032003400380030003500300000000000000000000000000000}}}{\fldrslt {\lang1024 2}}}{\lang1024
+\par }\pard\plain \s28\sb120\sa120\widctlpar\tx400\tqr\tldot\tx8630\adjustright \b\caps\fs20\lang2057\cgrid {\i\lang1024 2.}{\lang1024 \tab }{\i\lang1024 General Design}{\lang1024 \tab }{\field{\*\fldinst {\lang1024 PAGEREF _Toc432248051 \\h }{\lang1024
+{\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f00630034003300320032003400380030003500310000000000000000000000000000}}}{\fldrslt {\lang1024 4}}}{\lang1024
+\par }\pard\plain \s29\li200\widctlpar\tx800\tqr\tldot\tx8630\adjustright \scaps\fs20\lang2057\cgrid {\i\f1\lang1024 2.1}{\lang1024 \tab }{\i\f1\lang1024 Context Diagram}{\lang1024 \tab }{\field{\*\fldinst {\lang1024 PAGEREF _Toc432248052 \\h }{\lang1024
+{\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f00630034003300320032003400380030003500320000000000000000000000000000}}}{\fldrslt {\lang1024 4}}}{\lang1024
+\par }{\i\f1\lang1024 2.2}{\lang1024 \tab }{\i\f1\lang1024 State Machine}{\lang1024 \tab }{\field{\*\fldinst {\lang1024 PAGEREF _Toc432248053 \\h }{\lang1024 {\*\datafield
+08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f00630034003300320032003400380030003500330000000000000000000000000000}}}{\fldrslt {\lang1024 5}}}{\lang1024
+\par }{\i\f1\lang1024 2.3}{\lang1024 \tab }{\i\f1\lang1024 High-Level Decomposition}{\lang1024 \tab }{\field{\*\fldinst {\lang1024 PAGEREF _Toc432248054 \\h }{\lang1024 {\*\datafield
+08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f00630034003300320032003400380030003500340000000000000000000000000000}}}{\fldrslt {\lang1024 7}}}{\lang1024
+\par }{\i\f1\lang1024 2.4}{\lang1024 \tab }{\i\f1\lang1024 Core Data Structures}{\lang1024 \tab }{\field{\*\fldinst {\lang1024 PAGEREF _Toc432248055 \\h }{\lang1024 {\*\datafield
+08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f00630034003300320032003400380030003500350000000000000000000000000000}}}{\fldrslt {\lang1024 11}}}{\lang1024
+\par }{\i\f1\lang1024 2.5}{\lang1024 \tab }{\i\f1\lang1024 Module Architecture}{\lang1024 \tab }{\field{\*\fldinst {\lang1024 PAGEREF _Toc432248056 \\h }{\lang1024 {\*\datafield
+08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f00630034003300320032003400380030003500360000000000000000000000000000}}}{\fldrslt {\lang1024 12}}}{\lang1024
+\par }\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid }}\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\caps\f5\expnd0\expndtw-2
+\par }\pard\plain \s15\widctlpar\adjustright \f4\fs20\cgrid {\caps\f5\expnd0\expndtw-2\lang2057 \page
+\par }\pard\plain \qc\widctlpar\brdrt\brdrs\brdrw15\brsp20 \brdrb\brdrs\brdrw15\brsp20 \outlinelevel0\adjustright \shading10000 \fs20\lang2057\cgrid {\b\fs28 List of Figures}{
+\par }\pard\plain \s58\fi-400\li400\widctlpar\tqr\tldot\tx9350\adjustright \scaps\fs20\lang2057\cgrid {
+\par }\pard \s58\fi-400\li400\widctlpar\tqr\tldot\tx8630\adjustright {\field\fldedit{\*\fldinst {\scaps0 TOC \\c "Figure" }}{\fldrslt {\lang1024 Figure 2\_1 Module RM Context Diagram\tab }{\field{\*\fldinst {\lang1024 PAGEREF _Toc432248113 \\h }{\lang1024
+{\*\datafield 08d0c9ea79f9bace118c8200aa004ba90b02000000080000000e0000005f0054006f00630034003300320032003400380031003100330000000000000000000000000000}}}{\fldrslt {\lang1024 4}}}{\lang1024
+\par }}}\pard\plain \s58\fi-400\li400\widctlpar\tqr\tldot\tx8630\adjustright \scaps\fs20\lang2057\cgrid {\field\fldedit{\*\fldinst {\scaps0 TOC \\c "Figure" }}{\fldrslt {\lang1024 Figure 2\_2 Module RM State Transition Diagram\tab 6
+\par }{\field\fldedit{\*\fldinst {\scaps0 TOC \\c "Figure" }}{\fldrslt {\lang1024 Figure 2\_3 Module RM Module Architecture\tab 13
+\par }\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+\par }}}\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+\par }\pard \widctlpar\adjustright }}\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\scaps \page }{
+\par }\pard \qc\widctlpar\brdrt\brdrs\brdrw15\brsp20 \brdrb\brdrs\brdrw15\brsp20 \outlinelevel0\adjustright \shading10000 {\b\fs28 List of Tables}{
+\par }\pard \widctlpar\adjustright {
+\par }\pard\plain \s58\fi-400\li400\widctlpar\tqr\tldot\tx8630\adjustright \scaps\fs20\lang2057\cgrid {\field\fldedit{\*\fldinst {\b\scaps0 TOC \\c "Table" }}{\fldrslt {\lang1024
+\par }\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+\par \sect }\sectd \marglsxn1440\margrsxn2160\margtsxn990\psz1\pgnrestart\linex0\headery990\footery496\sectdefaultcl {\header \pard\plain \s18\qc\sb60\sa60\widctlpar\tqc\tx4320\tqr\tx8640\adjustright \fs20\lang2057\cgrid {\lang1024
+{\shp{\*\shpinst\shpleft7717\shptop-23\shpright8633\shpbottom443\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz1\shplid2050{\sp{\sn shapeType}{\sv 75}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn pib}{\sv
+{\pict\picscalex57\picscaley100\piccropl0\piccropr0\piccropt0\piccropb0\picw2833\pich822\picwgoal1606\pichgoal466\pngblip\bliptag-765742159{\*\blipuid d25bb3b16ccc7a045386ed43243ab77f}
+89504e470d0a1a0a0000000d49484452000000c80000007f08030000009d497d610000000467414d410000b1889598f4a600000300504c54450000002626264b
+4b4b7171710f0f0f3535355a5a5a808080c0c0c04c4c4c969696e2e2e21d1d1d696969b3b3b3ffffff1800000000000000000000008000000000008000000000
+0080000000000000000000000000000000000000001e433a5c444f574e4c4f41445c5765622050616765735c4a657443656c6c5c000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000f6a657463656c6c6c6f676f2e4a50710500a0e82448008886470000d0e61990d243005cb84600000040
+00f0860ac12880f7bf04435981000000007d92f7bf0000400000000000d8344700d8344700c0ed410000000000d4344700d434470000004000f0860ac12880f7
+bf04435981000000007d92f7bf8abd410001000000f8626d503cb64600010000000000000038b646002013e0190000400075e462000100000038e3620010fa00
+5075e4620038e26200010000000000000038e26200baf9005038e2620075e46200010000000000000075e462007a03075038e2620075e4620077e3620074e562
+00007067004ce262000300000074e36200280000004a5045472c204a5045472046696c7465722c20433a5c50726f6772616d2046696c65735c436f6d6d6f6e20
+46696c65735c4d6963726f736f6674205368617265645c47727068666c745c4a504547494d33322e464c542c206a70670033776d660000d0e61990d243005cb8
+460000004000f0860ac12880f7bf04435981000000007d92f7bf0000400000000000d8344700d8344700c0ed410000000000d4344700d434478bb81bc6000000
+097048597300001b9400003c5b017d7512ae0000096749444154789ced5c4bb2a4380c84f0c28ed082b9ffd566d91719c0d8524ab2313555404c8c5ff77b65be
+4a5229c9066a5afe236d7ada00d3d267bbbd0d48a2943e82f23220696bf409945701d931d00ee5f2be2f02923170bbb6f76b801418947fd15556de02a4224895
+986b5279059024bd4af8d71552de0084d8abc407baa694e7816822809171284f0339a26d6226cca731077b16485a0c04f7c3c0a19e049216052129b110af3d3d
+d8834058d04ae8ae56ce8ef61c10c7601dbdd4eaeee11e02c245151b4e68377044a7f9f129202e19a43e5974ed233e0104f5ac4a45b0dee1a775d0fb81488d93
+b293740040a8bd5af27620ea02bb94c05aed850d2437034970c9abcd241d49190f49e5684f0341396fbf430cb945b0d56615f6ad465ab91308ba7f08d33cc936
+87e0d42a1c7c31c63d06048d0b8881c1442d091bba4aff19202220b561ec2d78a31243884990f70081ab1a3a280e5abc4a92ede7657703113e45b1c7464122a5
+4e1201840092586e0002273ea5a3b8972a4e6c1559aecc5d40d0a2311c5344bb9da02c15730710e51e036ec5be459e3b498eeadadf0351196d908fb525d540e2
+84b0b25424901465fbd474d9c101c5388ea99a8bd53d8805eb2f01244570d34f4044dc0f4f175b563b2dd8f48e7f846365ef928cfc2b202b9d663fc86c17f8d8
+44a242ae0b4c785b1bc815f1141006883ce5a8d073b3c6736dc002d94a36472370a42b8cc4c67ee5b4e3098481b0f1d5f6b5549ee7b5b6f4badf71ad1610e100
+1d1c31e41fa02ce0a55f6be5ba3ada6e0fc815d76a02614f6838d63e0ea93e13b87e9955de1017c2e9d20d8c5087903924f4f8f573c1a272ba3840d82a36d1fd
+62d4ea6aa49dd283cd0d59bf87b972658711fa5ed4ea30d221a4c8008a98bdc55051d66b014028a9c3fcdab58a791e90a82a5a818756070b1245524034234a23
+09cef31d4692b2a2b6b9428072cc9488055f9391749591b49562d3fa63cbb09e465a4516402083c800e43d4913d417bbd248c49531f93b89e32f5cfc3a528fe4
+5a4cb84464d43e2334e85a8eb5054a03c77edcc31067efd9565050ea4a149a11dd75caf80610cfc52b922e90dc1ccf2a84a0e920135c42683931c9797d1bc874
+82a3d8da58178546ac67cd682f8113a543e348115a2eba79fd00239d61446a3312ab6b9183358a3a56d5b83a6e95ce1f014475c7c26f938fbc4d9791b667a15f
+99e14575285ea02810049d68a4ace8e0d828e9032155261d6db63a100138ecb3c2f33e15cc78c44993e90e442dcc2dc96cf4112301240098b0989f79c80b8cd0
+658dc0a264b1a53c6121f7cb2d312356eb417b52c5654017cc4a145734928cd18efca381765c8085193138701c2b3e7a93db65fa54462d325d04027a881a1a27
+16b9b401e4d890fca05535ce51ab55c954fa82d8db744fa3965c92dceddabc15461cad63815e297171e491098a826442743482114a5b28b6d3bed565c4e62196
+489288845f6d4378c6ed31a2247316b51a06f6800c30228296a85402ae977dac49767fece611ab11b9404ca8cac53d46c80d440d46665c4d3c33393b99fd9a46
+7a595ddadd63c491704c8a12f4c0ba106c5555e2358d8cccd6a61e104a5ec9c8594e28bde29deb0ac1110105a6d63ad3c80890aed89b8ca801951c38853c2f24
+dd2798547e4123d3986bf519f18bf8c86509d785bc36ee4f11acff199b8a5a973532ca8806c662876b27edd2756e776a7806469446ce32fba71a31b3288e6be1
+1024f7fa4080020cce678c8cb956341a316277c3af4924fdc97aea44ad64a35617484c915d61c126771b488851472d37dbc0418d46386ae50aa63faf05c89676
+6b31d21857c15ce981a6efc576b6a1cb889dd78283b581e80b008c58137980c8eee59496c74fc84345a4401530bd49ec6e35d801a235e25d6b3d50873c1279e0
+588333f51921644449db406b5292ba51cb01220721266af1435b30f9a028505d09449dd18c47c434a9d8a7eb5ad4c888705fed683a55035dc944ad09ba876bed
+f1485f383b883548b6396dbb95668426d30233522f3de671644badf78afea599f7923551423990db917d5e94eae483abe3941414d82a484eb6d08c8c441c8545
+16bb9bf7ca55372b62bebb70749c8df63b0f397ca746f50123dcc35ee1814526fb2d9f90eb618e5a112755c41d2b8f919189c60690c3d6a5dc4374800471bd8b
+b2e541e6fcd4e971cf7a26c0a90962463c3bd8cf078078dba4e25ade34caac136203706e7f11282d62b7af1121eb6ecef5e62373ab62f729818c680213b6bf71
+65b8a011487e3d4e9cc947b1e630d4bdd12308a982699cc45060ba2d465412ef3ca05498b35b2c5523ae81c1fa969b72aaa9884b3172148dea4436f1b5af556a
+613d26b14907a4da40edf5977bc9149080ba6b30129dfcdd6005b7d4196759ea7b3b6e693b2317f59316548839102bcb55103b8ac6325f957aafcc6c13ef9c3f
+dc7a655fbfa7113989dd70fe75fc4a48c8f1711db44ff9b9f97a8b246d4f43a4fc13f3b5295def79ad2f3484576cf4c77f3cef636839fe9074bd3ab992b8cfbb
+fef6295336ca03c28f90a51a84cbbf10445856cd84885f30a280d47336925d79e0046babed3e899590dc4e71486a60f57d20d5439ab928c8ba6a879ceff6f044
+b72acbea02e6f04646baf356739e8e5b87b4f2c6821a407a350dafa5df6ba49efcda43a65352b6c35fb2d8ee60243bc895c79727394cd41f34b4c4b5d6ef8048
+07b88404678c085140f790cacf19115e70e5c9dfe033628453dbcfdf5690e7bc8044c5658f03f9f9d7628787ca9bc5add744d03519df895ecb2d6ff4d44be88d
+15fd364b7908460c49998de50e20f060f9f0ab49f27293d391cb96bb80c01bbaa32f8be56b2f8b44ecd425e51c37bd87c8c68cbcbe078fa062b0924e96e4a8e3
+b63743d929ce138aba115f59d0229727b8f35ddd5ae8f5fd6be6bbbe42d1521b072770fc1bdf9e9617b7ed60b91cee0d443c18b7bfcf2e2ea9f370d65c06e8a8
+685da268afba1f884c90f9659118e63f2ba0f5d75ac983a55ea784b2c7bf61e080c2973b0b61219684b4193edaccf13010fdf6ae359731f8d5897fd407bf17c5
+380f484374a533bee87b51b686467398f55822f1f965df54b3b51e25e42ca63e8c07bfcdc9daa9955363542373607bfcfbb59c0a5d1754e9c4abf6f6e8379e39
+cde4be923ece0ef62490856f3ca89250533270a4878160d5a2845e578c1ce86920388034fe350ae30d40d46bef3a978c1ee40d406aae7772e0f021de01c4542d
+5761bc0648bd05712173607b0d1059e0d32575e4f62220f20ed7f5aff77e1510bec5757dd7770129a47cb0e3db802c1fa1585e08e4d3f63f90b7b57f00a959d681f2c2c8aa0000000049454e44ae426082}}}}{\shprslt\par\pard
+\widctlpar\pvpara\posx7716\posnegy-24\absh466\absw916\dxfrtext180\dfrmtxtx180\dfrmtxty0\adjustright {\pict\picscalex57\picscaley100\piccropl0\piccropr0\piccropt0\piccropb0
+\picw2833\pich822\picwgoal1606\pichgoal466\wmetafile8\bliptag-765742159\blipupi227{\*\blipuid d25bb3b16ccc7a045386ed43243ab77f}010009000003fc3200000000da32000000000400000003010800050000000b0200000000050000000c027f00c8000400000007010400da320000430f2000cc00
+00007f00c800000000007f00c8000000000028000000c80000007f000000010008000000000038630000941b00005b3c00008e0000008e000000000000001e00
+0000380000004000000074000000750000007d000000d0000000d4000000f800000000000100000018000000280000004000f000400000004600c0004700d400
+4700d80047000000620038006200750062000000660000008000000081000000bf00000100000003000007037a004304bf00c10a86006a0f00000f0f0f000019
+e0009019e6001d1d1d001320000043202c006a202c0046206e00262626008028c1004a2e6f002e3233004734d4004734d80035353500e23850005c3a43000040
+00000041ed00594304006f435c00654374000043d2005c4441006946200000473400204745002c47450072475c00004824004d494700504a0000504a2000654a
+5c004b4b4b00544c46004c4c4c004f4c4e00574f44006150200045504a00815943005a5a5a00b85c0000505c3a004d5c73006d6172000062e2000062e3000062
+e40072636900626557007365670073656c0064657200726574000067700061685300666870006c694600696969006c6c6500656c69005c6c6c00506d62006f6d
+6d00676f6c00676f720005715000717171006f736f00e574000063746500207466005c746c00e47550006d773300927d0000f780280080808000008159004786
+88000a86f000f7927d0096969600e8a00000b3b3b30046b6380046b63c0046b85c0041bd8a0000bff70004bff700c0c0c00028c10a0043d2900034d4000034d8
+000062e24c00e2e2e20062e3770062e4750019e6d00041edc00086f00000bff78000bff7920000f9ba0000fa1000ffffff008d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d837d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d837d7d7d837d
+7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d83
+7d7d7d7d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+7d7d7d7d837d7d7d7d7d7d837d7d7d7d837d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d7d7d7d7d837d7d837d7d837d7d7d7d837d7d7d837d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d837d7d7d7d7d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d837d7d7d7d837d837d7d837d7d7d7d7d7d7d7d837d7d7d7d7d837d7d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d837d837d7d7d837d7d7d7d7d7d7d7d7d7d837d7d837d7d7d7d83
+7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d837d7d7d
+7d7d7d837d7d7d7d7d7d837d7d837d7d7d838d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d837d7d837d7d837d7d7d7d837d7d7d837d
+7d7d7d7d7d7d837d7d837d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d7d7d7d7d7d
+837d7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d837d837d7d7d837d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d7d
+7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d
+7d7d7d7d7d7d837d7d7d7d837d837d837d7d837d7d837d837d7d7d7d7d7d7d7d7d7d7d837d7d837d7d7d7d837d7d7d837d7d837d7d7d7d7d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d7d7d7d7d837d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d837d7d7d837d7d7d7d7d7d837d837d
+7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d7d837d7d7d7d7d837d7d7d837d7d7d7d7d7d7d837d837d7d7d7d7d7d7d7d7d
+837d7d7d7d7d7d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d837d7d7d7d837d837d7d837d838d837d7d837d7d837d837d7d7d7d7d7d7d837d7d837d7d7d7d7d7d
+7d837d7d837d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d7d837d837d7d6f6f65283e280000283e28656f657d7d7d7d837d7d7d7d7d7d
+7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d837d7d837d7d7d837d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d837d7d7d652800000000000000000000000000000000002865
+6f7d7d837d837d7d7d7d7d837d7d7d7d837d7d837d7d837d7d837d7d7d7d7d7d837d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d837d7d6f280000000000000000000000000000
+0000000000000000000065657d7d837d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d837d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d837d7d7d837d7d65000000000000000000
+0000000000000000000000000000000000000000286f7d7d7d7d837d7d837d837d7d837d7d837d7d837d7d7d7d7d7d7d837d7d7d7d7d837d7d7d7d837d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d7d7d837d6f000000
+000000000000000000000000000000000000000000000000000000000000657d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d837d7d7d7d7d7d7d7d7d
+7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d837d7d
+837d6f2800000000000000000000000000000000000000000000000000000000000000000000007d837d7d837d7d7d7d7d7d7d837d7d837d7d7d7d7d7d7d7d7d
+7d837d7d837d7d7d7d837d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d
+837d837d7d7d7d7d7d6500000000000000000000000000000000000000000000000000000000000000000000000000657d837d7d7d837d837d837d7d7d7d7d7d
+7d837d7d837d837d7d7d7d7d7d7d837d7d7d7d837d7d837d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d7d7d7d7d7d7d7d7d7d7d837d6500000000000000000000000000000000000000000000000000000000000000000000000000006f7d7d7d7d7d7d7d7d
+7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d837d7d7d837d0000000000000000000000000000000000000000000000000000000000000000000000000000000028
+837d7d837d7d7d7d7d837d7d7d7d7d837d7d837d7d7d7d837d7d7d837d7d7d7d7d7d837d7d837d7d837d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d7d7d837d7d28000000000000000000000000000000000000000000000000000000000000000000
+00000000000000007d837d7d7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d837d7d7d7d7d7d650000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000657d7d7d837d7d7d837d7d7d7d7d7d837d7d837d7d7d7d7d7d837d7d837d7d7d837d7d7d7d837d7d837d7d7d837d7d83
+7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d837d7d837d7d7d7d837d7d6500000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000657d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d837d7d7d7d
+7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d7d7d7d836f000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000657d7d7d7d837d7d837d7d7d7d7d837d7d837d7d7d7d7d7d837d7d7d7d837d7d
+837d7d7d7d7d7d837d7d837d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d837d7d837d836f0000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000007d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d
+7d7d7d837d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d838d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d837d7d7d7d7d
+7d7d28000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d7d7d7d7d837d7d837d7d7d7d7d7d
+7d837d7d7d7d7d7d7d837d7d7d7d837d7d837d7d7d7d837d7d837d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d83
+7d7d7d7d7d7d7d837d650000000000000000000000000000000000000000000000000000286565656f656565286528000000000000000000006f837d7d7d7d7d
+7d7d7d7d7d7d837d7d7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d7d7d7d7d7d837d837d7d7d00000000000000000000000000000000000000000000000065657d7d837d7d837d837d837d7d7d7d7d656528000000
+00657d837d7d837d7d837d837d7d7d7d837d7d7d7d7d7d7d7d7d837d837d7d7d7d837d837d7d7d837d7d837d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d7d7d7d7d6500000000000000000000000000000000000000000000657d7d7d837d7d7d837d7d7d7d7d7d7d7d
+7d7d837d7d7d652800287d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d837d7d7d837d7d7d7d7d7d7d837d7d7d7d7d837d7d7d7d7d7d7d7d837d838d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d7d00000000000000000000000000000000000000000028657d7d837d7d7d7d7d7d
+7d837d7d7d837d7d837d7d837d7d837d65657d837d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d
+7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d8d8d8d8d8d8d8d8d8d8d8d8d8d837d7d7d7d837d7d83650000000000000000000000000000000000000000287d7d7d
+7d7d7d7d7d837d7d7d7d7d837d7d7d7d7d7d7d7d7d837d7d7d7d7d7d837d837d7d837d7d837d7d7d7d837d837d837d837d837d7d7d7d7d7d7d837d837d837d7d
+837d7d7d7d7d837d7d8d8d8d8d8d6f6f6f6f6f6f6f6f7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d6f6f006f00000000000000
+6f6f7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d6f6f006f00006f006f6f6f7d8d8d8d8d8d7d7d7d7d7d7d7d7d7d0000000000000000000000000000000000
+000000287d83837d837d7d837d7d7d7d837d7d7d7d7d837d7d7d7d836f6f65006500280000002865657d7d7d7d7d7d7d7d7d6f657d657d657d657d6f7d837d7d
+836f657d657d657d657d657d837d7d7d7d8d8d8d8d6f00000000000000000000006f6f7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d6f0000000000
+0000000000000000000000006f7d8d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000000000006f8d8d8d8d7d837d7d837d7d836f000000000000000000
+00000000000000000000287d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d837d65000000000000000000000000000000656f7d7d837d837d000000000000
+00000000657d7d7d7d28000000000000000000657d7d7d7d838d8d8d8d7d00000000000000000000000000006f7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d
+00000000000000000000000000000000000000000000006f7d8d8d8d8d8d8d8d7d6f0000000000000000000000000000006f8d8d8d8d7d7d837d7d7d837d2800
+0000000000000000000000000000000000007d7d7d7d7d7d7d837d7d837d7d7d7d837d7d7d7d837d6f0000000000000000000000000000000000000000657d7d
+7d7d00000000000000000000657d7d837d00000000000000000000657d7d7d7d7d8d8d8d8d6f000000000000000000000000000000006f8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d7d6f000000000000000000000000000000000000000000000000007d8d8d8d8d8d8d8d6f00000000000000000000000000000000008d8d8d8d837d
+7d7d7d7d7d7d00000000000000000000000000000000000000657d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d837d7d2800000000000000000000000000000000
+0000000000657d7d7d7d000000000000000000006f837d7d7d280000000000000000006f837d7d837d8d8d8d8d7d00000000000000000000000000000000006f
+8d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000000000000000000000000000000000007d8d8d8d8d8d8d6f00000000000000000000000000000000
+00007d8d8d8d7d7d837d7d837d6f000000000000000000000000000000000000287d7d7d837d7d7d7d7d7d7d7d837d7d7d7d837d7d7d00000000000000000000
+000000000000000000000000006f837d7d8300000000000000000000657d7d7d8300000000000000000000657d7d7d7d7d8d8d8d8d6f00000000000000000000
+00000000000000007d8d8d8d8d8d8d8d8d8d8d6f000000000000000000000000000000000000000000000000000000006f8d8d8d8d8d8d6f0000000000000000
+000000000000000000008d8d8d8d7d7d7d7d7d7d7d6500000000000000000000000000000000000065837d7d7d7d7d7d837d7d837d7d7d837d7d7d7d7d280000
+000000000000000000000000000000000000000000687d7d7d7d28000000000000000000657d7d837d280000000000000000006f837d7d7d838d8d8d8d6f0000
+00000000000000000000000000000000008d8d8d8d8d8d8d8d8d7d00000000000000000000000000000000000000000000000000000000006f8d8d8d8d8d7d00
+0000000000000000000000000000000000007d8d8d8d7d837d7d7d837d000000000000000000000000000000000000287d7d837d7d837d7d7d7d7d7d7d7d7d7d
+7d7d7d7d650000000000000000000000000000000000000000000000000b837d7d83000000000000000000006f837d7d8300000000000000000000657d837d7d
+7d8d8d8d8d6f000000000000000000000000000000000000006f8d8d8d8d8d8d8d7d000000000000000000000000000000000000000000000000000000000000
+6f8d8d8d8d8d6f000000000000000000000000000000000000007d8d8d8d837d7d7d7d7d65000000000000000000000000000000000000657d7d7d7d7d7d7d7d
+837d7d837d7d837d7d7d836f000000000000000000000028656f7d7d7d7d656f652800000028837d837d28000000000000000000657d7d7d7d28000000000000
+0000006f837d7d7d838d8d8d8d7d00000000000000000000000000000000000000008d8d8d8d8d8d8d6f00000000000000000000000000000000006f6f6f6f00
+6f000000000000006f8d8d8d8d8d6f000000000000000000000000006f006f6f6f006f8d8d8d7d7d7d7d837d650000000000000000000000000000000000007d
+837d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d2800000000000000000000657d7d837d7d837d837d837d6f6500287d7d7d7d3e0000000000000000006f837d7d
+7d3e000000000000000000657d7d7d7d7d8d8d8d8d6f00000000000000000000000000000000000000007d8d8d8d8d8d6f00000000000000000000000000006f
+7d8d8d8d8d8d8d8d8d7d7d6f000000006f7d8d8d8d8d6f0000000000000000000000006f7d8d8d8d7d7d8d8d8d8d7d837d7d7d7d650000000000000000000000
+000000000000287d7d7d837d7d7d7d7d837d7d7d837d7d7d7d7d6500000000000000000000657d837d7d7d7d7d7d7d7d7d7d837d7d657d7d7d7d280000000000
+000000006f7d7d837d280000000000000000006f837d7d7d838d8d8d8d7d6f7d7d7d6f0000000000000000000000000000006f8d8d8d8d8d6f00000000000000
+00000000006f7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f6f006f8d8d8d8d8d6f0000000000000000000000008d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d8300000000
+0000000000000000000000000000657d837d7d7d7d7d837d7d7d837d7d7d837d837d65000000000000000000657d7d7d7d7d837d7d837d7d837d7d7d7d7d837d
+837d6500000000000000000065837d7d7d65000000000000000000657d837d7d7d8d8d8d8d8d8d8d8d8d8d7d6f000000000000000000000000006f8d8d8d8d7d
+0000000000000000000000006f7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d6f8d8d8d8d8d0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d837d
+7d837d7d280000000000000000000000000000000000657d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d280000000000000000007d837d7d7d7d7d7d7d7d7d7d
+7d7d7d7d837d7d7d7d7d280000000000000000007d7d7d7d83000000000000000000007d7d7d7d7d838d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000
+0000008d8d8d8d6f0000000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d6f00000000000000000000006f8d8d8d8d8d
+8d8d8d8d8d8d7d7d7d7d7d6f0000000000000000000000000000000000007d7d837d7d7d7d7d837d7d837d7d837d7d7d7d7d000000000000000000657d7d837d
+7d837d7d7d837d837d7d837d7d7d7d7d7d7d6500000000000000000065837d7d7d6500000000000000000065837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d6f0000
+000000000000000000006f8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d00000000000000000000
+00007d8d8d8d8d8d8d8d8d8d8d8d7d837d7d836f000000000000000000000000000000000000837d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d7d000000000000
+0000006f7d837d7d7d837d837d7d837d837d7d837d7d7d837d83280000000000000000007d7d7d7d83280000000000000000007d7d7d837d7d8d8d8d8d8d8d8d
+8d8d8d8d8d6f000000000000000000000000008d8d8d8d0000000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d0000
+000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d6f0000000000000000000000000000000000287d7d837d7d7d7d7d7d837d7d837d7d837d7d
+7d6500000000000000000000000000000000002800280028002800652865657d7d7d3e00000000000000000065837d7d7d6500000000000000000065837d7d7d
+838d8d8d8d8d8d8d8d8d8d8d8d6f0000000000000000000000006f8d8d8d7d0000000000000000000000008d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d6f00000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d837d7d837d650000000000000000000000000000000000657d7d7d7d837d7d837d7d
+7d7d7d7d7d7d7d7d836f00000000000000000000000000000000000000000000000000000000007d7d83280000000000000000007d7d7d7d8328000000000000
+0000007d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d7d000000000000000000000000008d8d8d7d00000000000000000000006f7d6f7d7d7d7d7d7d7d7d7d7d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d0000000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d6500000000000000000000000000000000006f837d
+7d7d7d7d7d7d7d7d7d7d7d837d7d837d7d6500000000000000000000000000000000000000000000000000000000007d7d7d650000000000000000007d7d837d
+7d3e00000000000000000065837d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d000000000000000000000000008d8d8d7d0000000000000000000000000000000000
+000000000000000000000000000000006f008d8d8d8d6f00000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d65000000000000000000000000
+0000000000657d7d837d7d837d7d837d7d837d7d7d7d7d7d83650000000000000000000000000000000000000000000000000000000000837d7d280000000000
+000000007d7d7d7d83280000000000000000007d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d000000000000000000000000008d8d8d6f000000000000000000
+00000000000000000000000000000000000000000000000000007d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d6500000000
+000000000000000000000000006f837d7d7d7d7d7d7d7d837d7d7d7d837d7d7d7d7d00000000000000000000000000000000000000000000000000000000287d
+7d7d650000000000000000007d837d7d7d650000000000000000007d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d6f00
+000000000000000000000000000000000000000000000000000000000000000000008d8d8d8d0000000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d837d
+7d7d83280000000000000000000000000000000000657d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d6500000000000000000000000000000000000000000000
+000000000000287d837d280000000000000000007d7d7d7d83280000000000000000007d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d00000000000000000000
+0000008d8d8d7d00000000000000000000000000000000000000000000000000000000000000000000007d8d8d8d6f00000000000000000000007d8d8d8d8d8d
+8d8d8d8d8d8d7d7d837d7d2800000000000000000000000000000000006f837d837d7d7d7d7d7d7d837d837d7d837d7d7d7d0000000000000000006f6f656f65
+65656f6565000000000000000000657d7d7d650000000000000000007d7d837d7d650000000000000000007d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d0000
+000000000000000000006f8d8d8d6f00000000000000000000000000000000000000000000000000000000000000000000008d8d8d8d6f000000000000000000
+00006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d836500000000000000000000000000000000006f7d7d7d7d837d7d837d7d7d7d7d7d7d7d7d837d7d000000000000
+00000065837d837d837d837d7d650000000000000000657d837d28000000000000000000837d7d7d83280000000000000000007d837d7d7d7d8d8d8d8d8d8d8d
+8d8d8d8d8d8d000000000000000000000000008d8d8d6f00000000000000000000000000000000000000000000000000000000000000000000007d8d8d8d6f00
+000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d28000000000000000000000000000000000065837d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d
+7d7d650000000000000000287d7d7d7d7d7d7d7d83280000000000000000657d837d650000000000000000007d7d837d7d3e0000000000000000007d7d7d7d7d
+838d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d7d000000000000000000000000000000000000000000000000000000000000000000
+006f8d8d8d8d6f00000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d836500000000000000000000000000000000006f7d7d837d7d837d7d837d
+7d837d7d7d7d837d7d836f0000000000000000007d7d837d7d7d7d837d0000000000000000007d7d7d7d280000000000000000007d7d7d7d8328000000000000
+000000837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d0000000000000000000000006f8d8d8d8d0000000000000000000000007d6f6f6f6f6f6f6f6f6f6f0000
+000000000000000000008d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d837d837d7d650000000000000000000000000000000000657d7d
+7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d83280000000000000000657d7d7d7d7d837d6f0000000000000000287d837d7d3e0000000000000000007d7d837d
+7d650000000000000000007d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d00000000000000000000006f8d8d8d8d8d
+8d8d8d8d8d8d6f000000000000000000006f8d8d8d8d6f00000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d65000000000000000000000000
+0000000000657d837d7d837d7d837d7d837d7d7d7d7d7d837d7d7d65000000000000000000657d837d7d7d6500000000000000000065837d7d83280000000000
+00000000837d7d7d83280000000000000000007d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d000000000000000000000000008d8d8d8d6f0000000000000000
+0000008d8d8d8d8d8d8d8d8d8d8d6f000000000000000000006f8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d837d7d836f00000000
+00000000000000000000000000657d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d837d28000000000000000000006f656f65000000000000000000287d7d7d
+7d7d650000000000000000007d7d7d7d7d3e0000000000000000007d7d7d7d7d838d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d7d
+00000000000000000000007d8d8d8d8d8d8d8d8d8d7d00000000000000000000007d8d8d8d8d6f00000000000000000000007d8d8d8d8d8d8d8d8d8d8d8d7d7d
+7d7d7d65000000000000000000000000000000000028837d7d7d7d837d7d7d7d7d837d7d7d7d837d7d7d7d7d7d00000000000000000000000000000000000000
+0000000065837d7d837d28000000000000000000837d837d8328000000000000000000837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d00000000000000000000
+00006f8d8d8d8d7d00000000000000000000006f8d8d8d8d8d8d8d8d8d7d00000000000000000000008d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d
+8d8d8d8d8d8d7d837d7d837d0000000000000000000000000000000000007d7d837d7d7d7d837d837d7d7d837d7d7d7d7d837d7d836500000000000000000000
+0000000000000000000000657d7d7d7d7d7d650000000000000000007d7d7d7d7d650000000000000000007d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d0000
+000000000000000000006f7d8d8d8d8d6f00000000000000000000007d8d8d8d8d8d8d8d8d6f000000000000000000006f8d8d8d8d8d6f000000000000000000
+00006f8d8d8d8d8d7d8d8d8d8d8d7d7d7d7d7d7d0000000000000000000000000000000000007d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d6528
+000000000000000000000000000000000000287d837d7d7d7d7d280000000000000000007d7d837d7d280000000000000000007d7d837d7d7d8d8d8d8d8d8d8d
+8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d8d7d0000000000000000000000007d8d8d8d8d8d8d6f00000000000000000000007d7d6f6f6f6f6f00
+000000000000000000006f6f6f6f6f6f6f7d8d8d8d8d7d837d7d837d280000000000000000000000000000000000657d7d7d7d7d7d7d7d7d837d7d7d7d7d7d83
+7d7d837d7d837d7d6500000000000000000000000000000000657d837d7d837d7d7d3e0000000000000000007d7d7d7d7d3e0000000000000000007d7d7d7d83
+7d8d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d8d8d6f0000000000000000000000006f7d8d8d7d0000000000000000000000006f
+8d7d00000000000000000000000000000000000000000000006f8d8d8d8d7d7d7d7d7d7d650000000000000000000000000000000000657d837d7d837d7d837d
+7d7d837d837d7d7d7d7d7d7d7d7d7d7d7d65280000000000000000000000002865837d7d7d7d7d7d7d7d28000000000000000000837d7d837d28000000000000
+000000837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d7d000000000000000000000000008d8d8d8d8d8d8d00000000000000000000000000000000000000000000
+000000000000007d8d7d00000000000000000000000000000000000000000000006f8d8d8d8d7d837d7d837d650000000000000000000000000000000000287d
+7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d837d7d837d7d7d7d656565002800282865657d7d7d7d7d7d837d837d7d83000000000000000000007d7d7d7d
+83000000000000000000007d7d7d7d7d838d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d8d8d8d7d00000000000000000000000000
+00000000000000000000000000006f8d8d7d00000000000000000000000000000000000000000000006f8d8d8d8d7d7d7d7d7d7d650000000000000000000000
+000000000000006f7d7d7d7d7d837d7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d837d7d837d7d7d7d7d7d7d280000000000
+00000000837d7d7d7d280000000000000000007d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d8d8d8d8d6f00000000
+000000000000000000000000000000000000000000007d8d8d8d00000000000000000000000000000000000000000000006f8d8d8d8d7d837d7d7d837d000000
+0000000000000000000000000000006f837d837d7d7d7d837d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d837d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d83
+7d7d3e0000000000000000007d7d837d7d3e0000000000000000007d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d000000000000000000000000008d8d8d8d8d
+8d8d8d8d7d0000000000000000000000000000000000000000000000008d8d8d8d7d00000000000000000000000000000000000000000000006f8d8d8d8d837d
+7d7d837d7d280000000000000000000000000000000000287d7d7d7d837d7d7d7d7d7d7d7d7d837d7d837d7d7d7d837d7d837d7d7d7d7d837d837d7d837d7d83
+7d7d7d837d7d7d7d7d7d280000000000000000007d7d7d7d7d28000000000000000000837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d7d00000000000000000000
+00006f8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000000000000000000000006f7d8d8d8d8d8d00000000000000000000000000000000000000000000
+00008d8d8d8d7d7d7d7d7d7d7d650000000000000000000000000000000000006f837d7d7d7d7d7d837d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d
+7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d83000000000000000000007d837d7d83280000000000000000007d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d7d0000
+000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d6f0000000000000000000000000000000000006f7d8d8d8d8d8d8d0000000000000000000000000000
+000000000000000000008d8d8d8d7d837d7d7d7d836f000000000000000000000000000000000000287d837d7d7d7d837d7d7d7d7d7d7d7d837d7d837d7d837d
+7d7d837d7d7d7d7d7d7d7d7d837d7d7d7d837d7d7d7d7d7d7d7d000000000000000000007d7d7d7d7d000000000000000000007d837d7d7d7d8d8d8d8d8d8d8d
+8d8d8d8d8d6f000000000000000000000000008d8d8d8d8d8d8d8d8d8d8d8d8d8d6f6f000000000000000000000000006f7d8d8d8d8d8d8d8d8d6f0000000000
+0000000000000000000000000000000000007d8d8d8d7d7d837d7d7d7d7d280000000000000000000000000000000000006f837d7d7d7d7d7d7d837d7d837d7d
+7d7d7d7d7d7d7d7d837d7d7d837d7d837d7d7d7d7d7d7d837d7d7d7d837d7d837d7d000000000000000000007d7d7d837d000000000000000000007d7d7d7d7d
+838d8d8d8d8d8d8d8d8d8d8d8d6f0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d6f6f6f006f006f6f6f8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d837d7d7d837d7d8365000000000000000000000000000000000000007d837d7d837d
+7d7d7d7d7d7d7d837d7d837d7d837d7d7d7d7d7d7d7d7d7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d00000000000000000000837d7d7d7d00000000000000
+0000007d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d7d0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d0000000000000000000000000000000000
+0000287d7d7d7d7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d837d7d7d7d7d7d7d837d837d7d7d7d837d7d000000000000000000007d7d7d83
+7d000000000000000000007d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d6f0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d837d7d7d650000000000000000
+00000000000000000000006f7d837d7d7d7d7d7d7d7d7d837d7d7d837d7d7d7d837d7d7d837d837d6f28657d7d7d837d7d7d7d7d837d7d7d7d7d000000000000
+000000007d7d7d7d65000000000000000000007d837d7d837d8d8d8d8d8d8d8d8d8d8d8d8d6f000000000000000000000000008d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d8365
+0000000000000000000000000000000000000000657d7d7d7d837d7d837d7d7d7d837d7d7d837d7d7d7d7d7d7d7d6f650000657d837d7d7d7d837d7d7d7d7d83
+7d7d000000000000000000007d7d7d837d00000000000000000000657d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d6f0000000000000000000000006f8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d837d
+7d7d7d7d837d7d7d280000000000000000000000000000000000000000657d837d7d7d7d7d7d837d7d7d7d7d7d7d7d7d837d837d7d650000000065837d7d7d7d
+7d7d7d837d7d7d7d7d65000000000000000000007d7d7d7d65000000000000000000007d837d7d7d838d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000
+00006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d
+8d8d8d8d8d8d7d7d7d7d837d7d7d7d836500000000000000000000000000000000000000000028657d7d7d837d7d7d7d7d7d7d837d837d837d7d6f2800000000
+00007d7d837d7d7d837d7d7d7d7d7d837d650000000000000000000065837d836f00000000000000000000657d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d6f0000
+00000000000000000000008d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f000000000000000000
+00006f8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d837d7d7d7d2800000000000000000000000000000000000000000000656f7d7d7d837d837d837d7d7d7d656f
+28000000000000000028837d7d7d7d7d7d7d837d7d7d7d7d7d65000000000000000000007d7d7d7d65000000000000000000007d7d7d7d837d8d8d8d8d8d8d8d
+8d8d8d8d8d6f0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d6f00
+000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d7d7d836500000000000000000000000000000000000000000000000000006f656f65
+6f656f6528000000000000000000000000657d7d7d7d837d7d7d7d7d7d7d837d7d65652800000000000000006f837d7d65652800000000000000006f837d7d7d
+7d8d8d8d8d8d8d8d8d8d8d8d8d000000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d6f00000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d837d7d7d7d837d7d837d7d7d65000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000007d837d7d7d7d7d837d837d7d7d7d7d837d7d7d7d656f6528280028657d7d837d7d7d7d656f6528
+280028657d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d6f000000000000000000000000008d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d6f6f0000000000000000006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d7d7d7d7d28000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000007d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d837d837d837d7d7d7d837d7d
+7d7d7d7d7d837d837d7d657d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d6f0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d6f6f00000000006f8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d7d837d7d837d836500000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000287d7d837d7d7d837d7d7d7d837d7d7d7d837d7d7d7d7d7d
+7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d838d8d8d8d8d8d8d8d8d8d8d7d6f0000000000000000000000006f8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d6f00006f8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d837d7d7d7d
+7d7d7d7d6f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000065837d7d7d7d7d7d7d7d837d7d7d7d83
+7d7d7d7d7d7d837d7d7d7d7d7d837d7d7d837d837d7d7d7d837d7d7d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d7d6f6f6f6f6f6f6f6f6f6f6f6f6f8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d8d8d8d8d8d8d8d8d8d8d8d7d83
+7d7d7d7d7d837d7d7d837d7d83650000000000000000000000000000000000000000000000000000000000000000000000000000000000007d7d7d837d7d837d
+7d837d7d7d837d7d7d7d7d837d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d7d7d837d7d7d7d7d7d7d7d7d7d7d7d650000000000000000000000000000000000000000000000000000000000000000000000000000000000
+7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d837d7d7d7d7d837d7d837d7d7d7d7d7d7d837d7d7d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d837d7d7d837d7d7d280000000000000000000000000000000000000000000000000000000000000000
+00000000000000287d837d7d837d7d837d7d7d7d837d7d7d7d7d837d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d837d7d7d7d837d7d7d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d837d7d7d7d7d7d650000000000000000000000000000000000000000000000
+0000000000000000000000000000006f837d7d7d7d7d7d7d7d7d837d7d7d837d7d7d7d7d7d837d7d837d7d7d7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d7d7d837d7d7d650000000000000000000000000000
+0000000000000000000000000000000000000000000000657d7d7d837d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d837d7d7d7d
+837d838d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d837d7d7d7d837d836f2800000000
+000000000000000000000000000000000000000000000000000000000000287d837d7d7d7d7d837d7d7d7d837d7d7d837d7d7d837d7d7d7d837d7d7d7d7d837d
+7d7d7d7d7d837d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d7d7d7d
+7d7d837d650000000000000000000000000000000000000000000000000000000000000000286f837d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d
+7d7d837d7d7d7d7d7d837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d7d837d837d837d7d7d7d7d837d6528000000000000000000000000000000000000000000000000000000657d7d837d7d7d7d7d837d7d837d837d7d7d7d7d7d
+837d7d837d7d7d7d7d7d7d7d7d7d7d837d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d837d7d7d7d837d652800000000000000000000000000000000000000000000286f7d7d7d7d7d7d837d7d7d7d7d7d7d
+7d7d7d7d837d7d7d7d7d7d7d7d7d837d7d837d7d837d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d7d7d7d7d7d7d837d7d65650028000000000000000000000000002865657d7d837d7d837d7d7d
+7d7d7d7d7d837d7d7d7d837d7d7d837d7d837d7d837d7d7d7d7d7d7d7d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d7d837d7d7d837d837d7d7d656f656565656565656f7d7d7d7d837d
+837d7d7d7d7d7d837d7d837d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d837d837d7d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d837d7d7d7d7d7d7d7d7d7d7d7d837d7d837d7d83
+7d837d7d7d837d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d837d7d837d7d7d7d837d837d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d837d7d837d7d7d7d
+7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d837d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d837d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d837d
+7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d837d7d7d837d837d837d7d7d7d7d7d7d7d7d837d7d7d7d7d837d7d837d7d7d7d7d7d7d837d837d837d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d7d7d7d7d837d7d837d7d7d7d837d7d837d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d837d7d7d7d837d7d7d837d7d7d7d7d7d7d7d7d837d7d837d7d7d
+7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d7d7d837d7d7d7d7d837d7d7d837d7d7d7d7d7d7d7d837d7d7d7d837d
+7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d837d7d7d837d7d7d7d837d7d837d7d7d837d7d7d7d837d7d7d7d7d7d7d7d7d837d7d837d
+7d7d7d7d837d7d7d837d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d7d837d7d7d7d7d837d7d
+837d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d837d7d7d7d7d7d7d7d7d837d7d837d7d7d
+7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d8d7d7d7d837d7d837d7d
+7d7d7d7d7d7d7d7d837d7d7d7d7d837d7d837d7d7d7d837d837d7d837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d
+8d7d7d7d7d7d7d7d837d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d838d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d7d837d7d7d837d7d7d7d7d7d7d837d7d837d7d7d7d7d7d837d7d837d7d7d7d7d7d837d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d837d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d837d837d7d7d7d7d837d7d837d7d7d7d7d837d7d837d837d7d7d7d7d7d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d837d7d7d7d7d7d7d7d7d837d7d7d7d7d7d7d7d7d7d837d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d7d837d7d7d7d837d7d
+7d7d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d7d
+7d7d837d7d7d7d837d837d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d7d7d837d7d7d7d7d7d7d7d7d7d7d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d837d7d837d7d7d837d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d7d7d7d7d837d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d837d7d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d7d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d
+8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d0400000007010100030000000000}\par}}}{
+\b\f1\lang1033 PocketBTS Software Design Specification: Module RM
+\par }\pard \s18\sb60\sa60\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\b\f1\lang1033
+\par }\pard \s18\qc\sb60\sa60\widctlpar\tqc\tx4320\tqr\tx8640\adjustright {\b\i\f1\lang1033
+\par }}{\footer \pard\plain \s17\sb60\sa60\widctlpar\tqc\tx4680\tqr\tx9270\tqr\tx9720\adjustright \fs20\lang2057\cgrid {\b\f1
+\par }\pard \s17\sb60\sa60\widctlpar\tqc\tx4680\tx5940\tx7200\tx8460\tx8550\tqr\tx9270\tqr\tx9720\adjustright {\b\f1 PocketBTS Software Design}{\tab Page }{\field{\*\fldinst {\cs44 PAGE }}{\fldrslt {\cs44\lang1024 12}}}{\cs44 (of }{\field{\*\fldinst {\cs44
+ NUMPAGES \\* MERGEFORMAT }}{\fldrslt {\cs44\lang1024 1}}}{\cs44 )\tab \tab Version: 0.0
+\par }\pard \s17\qc\sb60\sa60\widctlpar\tqc\tx4320\tqc\tx5400\tqr\tx8640\tqr\tx9720\adjustright {\b\f1\fs16 JetCell, Inc. Proprietary and Confidential
+\par }\pard \s17\qc\sb60\sa60\widctlpar\tqc\tx4320\tqc\tx5220\tqr\tx8640\adjustright {\i\fs16 Copyright}{\i\f3\fs16 \'20\'e3}{\i\fs16 1997-98 JetCell, Inc. All rights reserved.}{
+\par }}{\listtext\pard\plain\s1 \scaps\fs28\lang2057\kerning28\cgrid \hich\af0\dbch\af0\loch\f0 1.\tab}\pard\plain \s1\sb240\sa60\keepn\widctlpar\brdrt\brdrs\brdrw15\brsp20 \brdrb\brdrs\brdrw15\brsp20 \ls1\outlinelevel0\adjustright
+\b\fs28\lang2057\kerning28\cgrid }}\pard\plain \s1\sb240\sa60\keepn\widctlpar\brdrt\brdrs\brdrw15\brsp20 \brdrb\brdrs\brdrw15\brsp20 \ls1\outlinelevel0\adjustright \b\fs28\lang2057\kerning28\cgrid {{\*\bkmkstart _Toc432248046}Introduction
+{\*\bkmkend _Toc432248046}
+\par {\listtext\pard\plain\s2 \b\i\f1\lang2057\cgrid \hich\af1\dbch\af0\loch\f1 1.1\tab}}\pard\plain \s2\sb240\sa60\keepn\widctlpar\ls1\ilvl1\outlinelevel1\adjustright \b\lang2057\cgrid {\i\f1 Scope
+\par }\pard\plain \s55\qj\sa60\widctlpar\tqr\tldot\tx9350\adjustright \i\fs20\ul\cf6\lang2057\cgrid {\i0\ulnone\cf1 With reference to [1]\emdash Figure 10/PocketBTS Software Architecture, module RM is planned to cover the following functions}{
+\cs43\i0\ulnone\cf1\super {\field{\*\fldinst SYMBOL 167 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}{\footnote \pard\plain \s42\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\cs43\fs16\super {\field{\*\fldinst SYMBOL 167 \\f "Symbol" \\s 8}{\fldrslt
+\f3\fs16}}}{\fs16 RIL3-RR Encoder/Decoder will be combined with RIL3-MM Encoder/Decoder and RIL3-CC Encoder/Decoder to form an independent module. Thus it is not listed here.}}}{\i0\ulnone\cf1 :
+\par {\pntext\pard\plain\s55 \f3\fs20\cf1\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \s55\qj\fi-90\li90\sa60\widctlpar\jclisttab\tx0\tx540\tqr\tldot\tx9350{\*\pn \pnlvlblt\ilvl0\ls91\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}
+\ls91\adjustright {\i0\ulnone\cf1 SMS-CB
+\par {\pntext\pard\plain\s55 \f3\fs20\cf1\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \s55\qj\fi-90\li90\sa60\widctlpar\jclisttab\tx0\tx540\tqr\tldot\tx9350{\*\pn \pnlvlblt\ilvl0\ls91\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}
+\ls91\adjustright {\i0\ulnone\cf1 Frequency Hopping Control
+\par {\pntext\pard\plain\s55 \f3\fs20\cf1\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \s55\qj\fi-90\li90\sa60\widctlpar\jclisttab\tx0\tx540\tqr\tldot\tx9350{\*\pn \pnlvlblt\ilvl0\ls91\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}
+\ls91\adjustright {\i0\ulnone\cf1 BTS Power Control
+\par {\pntext\pard\plain\s55 \f3\fs20\cf1\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \s55\qj\fi-90\li90\sa60\widctlpar\jclisttab\tx0\tx540\tqr\tldot\tx9350{\*\pn \pnlvlblt\ilvl0\ls91\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}
+\ls91\adjustright {\i0\ulnone\cf1 B TS Measurement Report
+\par {\pntext\pard\plain\s55 \f3\fs20\cf1\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \s55\qj\fi-90\li90\sa60\widctlpar\jclisttab\tx0\tx540\tqr\tldot\tx9350{\*\pn \pnlvlblt\ilvl0\ls91\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}
+\ls91\adjustright {\i0\ulnone\cf1 MS Power Control
+\par {\pntext\pard\plain\s55 \f3\fs20\cf1\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \s55\qj\fi-90\li90\sa60\widctlpar\jclisttab\tx0\tx540\tqr\tldot\tx9350{\*\pn \pnlvlblt\ilvl0\ls91\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}
+\ls91\adjustright {\i0\ulnone\cf1 Timing Advance
+\par {\pntext\pard\plain\s55 \f3\fs20\cf1\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \s55\qj\fi-90\li90\sa60\widctlpar\jclisttab\tx0\tx540\tqr\tldot\tx9350{\*\pn \pnlvlblt\ilvl0\ls91\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}
+\ls91\adjustright {\i0\ulnone\cf1 RRM (RR)
+\par }\pard \s55\qj\sb60\sa60\widctlpar\tqr\tldot\tx9350\adjustright {\i0\ulnone\cf1 In fact, most of these functions will ride over module RR and PocketBTS\rquote relevant DSP part. The interface between RR and this DSP part is assumed to be over the RTOS
+\rquote inter-task communication mechanism. For some sp
+ecial case, RR may command, by operating relevant registers, some hardware components of either transmission path, receiving path or both. But this kind of direct access to hardware components should be avoided in principle.
+\par }\pard \s55\qj\widctlpar\tqr\tldot\tx9350\adjustright {\i0\fs16\ulnone\cf1
+\par }\pard \s55\qj\fi-450\li450\widctlpar\tqr\tldot\tx9350\adjustright {\b\ulnone\cf1 TBD Note}{\ulnone\cf1 : Reviewers please
+\par }\pard \s55\qj\fi900\widctlpar\tqr\tldot\tx9350\adjustright {\ulnone\cf1 1. Advise on the above-stated relationship between RR and the DSP functioning body.
+\par }\pard \s55\qj\fi1080\widctlpar\tqr\tldot\tx9350\pnrnot1\adjustright {\ulnone\cf1\revised\revauth1\revdttm1714043934 Bhava }{\ulnone\cf1\revised\revauth1\revdttm1714043935 judges only those}{\ulnone\cf1\revised\revauth1\revdttm1714043937
+ MPH interface messages}{\ulnone\cf1\revised\revauth1\revdttm1714043935 specified in [11]}{\ulnone\cf1\revised\revauth1\revdttm1714043937 \emdash }{\ulnone\cf1\revised\revauth1\revdttm1714043935 Frontier }{\ulnone\cf1\revised\revauth1\revdttm1714043937
+Design Doc.}{\ulnone\cf1\revised\revauth1\revdttm1714043934
+\par }\pard \s55\qj\fi900\widctlpar\tqr\tldot\tx9350\adjustright {\ulnone\cf1 2. Evaluate if there are any problems about the functional grouping considered for RR
+\par }\pard \s55\qj\fi634\li446\widctlpar\tqr\tldot\tx9350\pnrnot1\adjustright {\cf1\revised\revauth1\revdttm1714043933\crauth1\crdate1714043935 Bhava agrees upon the above-mentioned bulleted }{\cf1\revised\revauth1\revdttm1714043934\crauth1\crdate1714043935
+functional }{\cf1\revised\revauth1\revdttm1714043933\crauth1\crdate1714043935 grouping.
+\par }\pard \s55\qj\fi-403\li446\widctlpar\tqr\tldot\tx9350\adjustright {\i0\fs16\cf1
+\par }\pard \s55\qj\sb60\sa60\widctlpar\tqr\tldot\tx9350\adjustright {\i0\ulnone\cf1
+Module RR is supposed to accommodate all the radio resource management responsibilities riding over the traditional GSM BTS and BSC, but for PocketBTS Pre-Alpha Release, module RR is onl
+y capable of performing the RRM function. In compliance to the PocketBTS system development plan, the above functions constituting the RR module will be roll out phase by phase. This design specification focuses on the RRM function and the rest of the fun
+ctions will be either simply ignored or dummied wherever they should be present. From message-processing point of view, messages landed at module RR but not related to the RRM function will not be processed.
+\par }\pard \s55\qj\widctlpar\tqr\tldot\tx9350\adjustright {\i0\fs16\ulnone\cf1
+\par }\pard \s55\qj\sb60\sa60\widctlpar\tqr\tldot\tx9350\adjustright {\i0\cf1 In summary, RR Capability for PocketBTS Pre-Alpha Release:
+\par {\pntext\pard\plain\s55 \f3\fs20\cf1\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \s55\qj\fi-360\li360\sb60\sa60\widctlpar\jclisttab\tx360\tqr\tldot\tx9350{\*\pn \pnlvlblt\ilvl0\ls93\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}
+\ls93\adjustright {\i0\ulnone\cf1 RRM funtion
+\par }\pard \s55\qj\sb60\sa60\widctlpar\tqr\tldot\tx9350\adjustright {For the rest of this document, RR and RRM are functionally exchangeable for all their appearances unless an explicit distinction between them is noted.
+\par
+\par }{\f1
+\par {\listtext\pard\plain\s2 \b\i\f1\lang2057\cgrid \hich\af1\dbch\af0\loch\f1 1.2\tab}}\pard\plain \s2\sb240\sa60\keepn\widctlpar\ls1\ilvl1\outlinelevel1\adjustright \b\lang2057\cgrid {\i\f1 References
+\par }\pard\plain \qj\sb60\widctlpar\tx1350\adjustright \fs20\lang2057\cgrid {\cf1 [1] JetCell\tab : PocketBTS Software Architecture Specification V1.0 (Release Candidate), 9/6/1998
+\par }\pard \qj\sb60\widctlpar\tx1260\tx1350\tqr\tldot\tx9350\adjustright {\cf1 [2] CNI\tab \tab : GSM LAPDm Protocol Module API User Reference Manual, Rev. 1.0, 8/15/1998
+\par }\pard \qj\sb60\widctlpar\tx1350\tqr\tldot\tx9350\adjustright {\cf1 [3] ETSI\tab : GSM 04.07 Phase 2 (Layer 3 General Aspects)
+\par [4] ETSI\tab : GSM 04.04 (Layer 1 General)
+\par [5] ETSI\tab : GSM 08.58 Phase 2 (BTS-BSC Layer 3 I/F)
+\par [6] ETSI\tab : GSM 08.08 Phase 2 (BSS-MSC Layer 3 I/F)
+\par [7] ETSI\tab : GSM 04.08 Phase 2 (GSM Um I/F Messages)
+\par [8] ETSI\tab : GSM 03.09 Phase 2 (GSM Handover Procedures)
+\par [9] JetCell\tab : AirCore V1.0, 9/04/1998
+\par [10] JetCell\tab : PocketBTS Pre-Alpha Release Call Processing Flows V0.}{\cf1\revised\revauth1\revdttm1714043973 1}{\deleted\cf1\revauthdel1\revdttmdel1714043973 0}{\cf1 , 9/27/1998
+\par }\pard \qj\widctlpar\tx1350\tqr\tldot\tx9350\pnrnot1\adjustright {\cf1\revised\revauth1\revdttm1714043936 [11] Fronitier\tab : JetCell PocketBTS Physical Layer (L1) Software Interface Specification V0.1, 8/10/98
+\par }\pard \qj\widctlpar\tx1350\tqr\tldot\tx9350\adjustright {\cf1
+\par {\*\bkmkstart _Toc432248049}{\listtext\pard\plain\s2 \b\i\f1\lang2057\cgrid \hich\af1\dbch\af0\loch\f1 1.3\tab}}\pard\plain \s2\sb120\sa60\keepn\widctlpar\ls1\ilvl1\outlinelevel1\adjustright \b\lang2057\cgrid {\i\f1 Abbreviations{\*\bkmkend _Toc432248049}
+
+\par }\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {The following abbreviations and definitions apply to this document:
+\par }\pard \sb40\widctlpar\adjustright {API\tab \tab \tab Application Programming Interface
+\par HO\tab \tab \tab HandOver
+\par I/F\tab \tab \tab InterFace
+\par }\pard\plain \s15\sb60\widctlpar\adjustright \f4\fs20\cgrid {\f0\lang2057 IRT\tab \tab \tab Internal Routing Table
+\par L1\tab \tab \tab Layer 1 which may be exchangeable with the DSP Interface Driver module
+\par L2\tab \tab \tab Layer 2 which may be exchangeable with the LAPDm module
+\par LAPDm \tab Link Access Procedure\emdash D Channel for mobile
+\par LUP\tab \tab Location Updating Procedure
+\par MCSM\tab \tab Mobile Call State Machine
+\par MD\tab \tab \tab Message Delivery
+\par MOC\tab \tab Mobile Orginating Call procedure
+\par MTC\tab \tab Mobile Terminating Call procedure
+\par OACSU\tab \tab Off-Air Call Set Up
+\par }\pard\plain \sb40\widctlpar\adjustright \fs20\lang2057\cgrid {RM\tab \tab \tab Radio resource Management
+\par RR\tab \tab \tab Radio Resource
+\par RRM\tab \tab Radio Resource Management
+\par RSL\tab \tab Radio Signalling Link
+\par SAP\tab \tab Service Access Point
+\par SM\tab \tab \tab State Machine
+\par }\pard\plain \s15\sb40\widctlpar\adjustright \f4\fs20\cgrid {\f0\lang2057 STD\tab \tab State Transition Diagram
+\par TBD\tab \tab To Be Determined
+\par }{\i\f0\lang2057
+\par Note: The GSM 01.04 may be referred to for those abbreviations not listed above}{\f0\lang2057 .
+\par {\*\bkmkstart _Toc432248050}{\listtext\pard\plain\s2 \b\i\f1\lang2057\cgrid \hich\af1\dbch\af0\loch\f1 1.4\tab}}\pard\plain \s2\sb240\sa60\keepn\widctlpar\ls1\ilvl1\outlinelevel1\adjustright \b\lang2057\cgrid {\i\f1 Organization{\*\bkmkend _Toc432248050}
+
+\par }\pard\plain \sb60\widctlpar\tx1350\tqr\tldot\tx8640\adjustright \fs20\lang2057\cgrid {The rest of this document is organised into the following four sections:
+\par {\pntext\pard\plain\f3\fs20\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li360\sb60\widctlpar\jclisttab\tx360\tx1350\tqr\tldot\tx8640{\*\pn \pnlvlblt\ilvl0\ls94\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls94\adjustright
+{Section 2: General Design
+\par {\pntext\pard\plain\f3\fs20\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li360\sb60\widctlpar\jclisttab\tx360\tx1350\tqr\tldot\tx8640{\*\pn \pnlvlblt\ilvl0\ls94\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls94\adjustright
+{Section 3: External Interfaces
+\par {\pntext\pard\plain\f3\fs20\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li360\sb60\widctlpar\jclisttab\tx360\tx1350\tqr\tldot\tx8640{\*\pn \pnlvlblt\ilvl0\ls94\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls94\adjustright
+{Section 4: Detailed Design-Data Section
+\par {\pntext\pard\plain\f3\fs20\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li360\sb60\widctlpar\jclisttab\tx360\tx1350\tqr\tldot\tx8640{\*\pn \pnlvlblt\ilvl0\ls94\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls94\adjustright
+{Section 5: Detailed Design-Logic Section
+\par }\pard \sb60\widctlpar\tx1350\tqr\tldot\tx8640\adjustright {
+\par {\listtext\pard\plain\s1 \b\i\fs28\lang2057\kerning28\cgrid \hich\af0\dbch\af0\loch\f0 2.\tab}}\pard\plain \s1\sb240\sa60\keepn\widctlpar\brdrt\brdrs\brdrw15\brsp20 \brdrb\brdrs\brdrw15\brsp20 \ls1\outlinelevel0\adjustright
+\b\fs28\lang2057\kerning28\cgrid {\i \page {\*\bkmkstart _Toc432248051}General Design{\*\bkmkend _Toc432248051}
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {This section develops the design points for module RR in high-level aspect, which is covered under the following five subsections:
+\par {\pntext\pard\plain\f3\fs20\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \qj\fi-360\li360\sb60\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls95\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls95\adjustright {Context Diagram
+
+\par {\pntext\pard\plain\f3\fs20\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \qj\fi-360\li360\sb60\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls95\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls95\adjustright {State Machine
+\par {\pntext\pard\plain\f3\fs20\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \qj\fi-360\li360\sb60\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls95\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls95\adjustright {
+High-Level Decomposition
+\par {\pntext\pard\plain\f3\fs20\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \qj\fi-360\li360\sb60\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls95\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls95\adjustright {Module Architecture
+
+\par {\pntext\pard\plain\f3\fs20\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \qj\fi-360\li360\sb60\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls95\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls95\adjustright {
+Global Data/Functions
+\par }\pard \qj\widctlpar\adjustright {
+\par {\*\bkmkstart _Toc432248052}{\listtext\pard\plain\s2 \b\i\f1\lang2057\cgrid \hich\af1\dbch\af0\loch\f1 2.1\tab}}\pard\plain \s2\sb120\sa60\keepn\widctlpar\ls1\ilvl1\outlinelevel1\adjustright \b\lang2057\cgrid {\i\f1 Context Diagram
+{\*\bkmkend _Toc432248052}
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+PocketBTS can not exactly match to a particular functional entity defined in GSM system infrastructure. Thus it is not necessary to force PocketBTS to comply with any protocol architecture model specified for any particular GSM functional entity. But noti
+ng the fact that the whole GSM protocol stack composed of Layer 1, Layer 2 and Layer 3 elements is needed to be built into the PocketBTS, it would be natural to derive the protocol architecture for use by PocketBTS of the one suggested for mobile side.
+
+\par The protocol architecture chosen for PocketBTS is based on [3]\emdash GSM 04.07/Figure 5.1 and [4]\emdash GSM 04.04/Figure 2.1 with a RIL3 Message Delivery (MD) functionality intentionally introduced in [1]\emdash
+P ocketBTS Software Architecture in order to lessen interlayer signalling redundancy existing with [3]\emdash G SM 04.07 specification.
+\par With reference to [1]\emdash Figure 6 and 10/PocketBTS Software Architecture, Figure 2-1 below depicts the data context diagram of the RR module.
+\par }\pard\plain \s15\sb60\sa60\widctlpar\adjustright \f4\fs20\cgrid {\lang1024 {\shp{\*\shpinst\shpleft3570\shptop2620\shpright4245\shpbottom2916\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz3\shplid1028
+{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn lTxid}{\sv 65536}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1028}}
+{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt
+\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16 MPH I/F}{\fs16\lang1033
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8195\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16 MPH I/F}{\fs16\lang1033
+\par }}\dpx3570\dpy2620\dpxsize675\dpysize296\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft2100\shptop2149\shpright2655\shpbottom2446\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz5\shplid1029{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 131072}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1029}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid { }{
+\fs16\lang1033 ED I/F
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8197\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid { }{\fs16\lang1033 ED I/F
+\par }}\dpx2100\dpy2149\dpxsize555\dpysize297\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft2430\shptop1090\shpright3105\shpbottom1386\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz1\shplid1030{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 196608}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1030}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16
+ RM I/F}{\fs16\lang1033
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8193\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16 RM I/F}{\fs16\lang1033
+\par }}\dpx2430\dpy1090\dpxsize675\dpysize296\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shpgrp{\*\shpinst\shpleft2807\shptop1569\shpright4207\shpbottom2321\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz59\shplid1031{\sp{\sn groupLeft}{\sv 8762}}{\sp{\sn groupTop}{\sv 8518}}{\sp{\sn groupRight}{\sv 10162}}
+{\sp{\sn groupBottom}{\sv 9128}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn rotation}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shp{\*\shpinst\shplid1032{\sp{\sn relLeft}{\sv 9060}}{\sp{\sn relTop}{\sv 8620}}{\sp{\sn relRight}{\sv 9611}}
+{\sp{\sn relBottom}{\sv 8785}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 262144}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}
+{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\shptxt \pard\plain
+\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 Frequency}{
+\par }}}}{\shp{\*\shpinst\shplid1033{\sp{\sn relLeft}{\sv 8911}}{\sp{\sn relTop}{\sv 8757}}{\sp{\sn relRight}{\sv 9774}}{\sp{\sn relBottom}{\sv 8922}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fLockText}{\sv 0}}
+{\sp{\sn lTxid}{\sv 327680}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}
+{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+\fs12\cf16\cgrid0 Hopping Control}{
+\par }}}}{\shp{\*\shpinst\shplid1034{\sp{\sn relLeft}{\sv 8764}}{\sp{\sn relTop}{\sv 8553}}{\sp{\sn relRight}{\sv 10162}}{\sp{\sn relBottom}{\sv 9128}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fLockText}{\sv 0}}
+{\sp{\sn fillColor}{\sv 16751001}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fLine}{\sv 0}}}}{\shp{\*\shpinst\shplid1035{\sp{\sn relLeft}{\sv 8762}}{\sp{\sn relTop}{\sv 8518}}{\sp{\sn relRight}{\sv 10104}}{\sp{\sn relBottom}{\sv 9098}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fLockText}{\sv 0}}{\sp{\sn fillColor}{\sv 16772300}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn lineColor}{\sv 13382451}}{\sp{\sn lineWidth}{\sv 6350}}{\sp{\sn fLine}{\sv 1}}}}
+{\shp{\*\shpinst\shplid1036{\sp{\sn relLeft}{\sv 8965}}{\sp{\sn relTop}{\sv 8643}}{\sp{\sn relRight}{\sv 10038}}{\sp{\sn relBottom}{\sv 8898}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fLockText}{\sv 0}}
+{\sp{\sn lTxid}{\sv 393216}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}
+{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+Module RM}{\lang1033
+\par }}}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8251\dppolygon\dppolycount4\dpptx0\dppty0\dpptx1400\dppty0\dpptx1400\dppty752\dpptx0\dppty752\dpx2807\dpy1569\dpxsize1400\dpysize752
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft6012\shptop2782\shpright6426\shpbottom2986\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz58\shplid1037{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 458752}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 Control}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8250\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 Control}{
+\par }}\dpx6012\dpy2782\dpxsize414\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft6035\shptop2613\shpright6404\shpbottom2817\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz57\shplid1038{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 524288}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 TRAU}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8249\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 TRAU}{
+\par }}\dpx6035\dpy2613\dpxsize369\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft5844\shptop2610\shpright6534\shpbottom3085\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz56\shplid1039{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn fillColor}{\sv 16772300}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn lineColor}{\sv 13382451}}{\sp{\sn lineWidth}{\sv 6350}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8248
+\dpellipse\dpx5844\dpy2610\dpxsize690\dpysize475\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr204\dpfillbgcg236\dpfillbgcb255\dpfillpat1\dplinew10\dplinecor51\dplinecog51\dplinecob204}}}
+{\shp{\*\shpinst\shpleft5891\shptop2653\shpright6592\shpbottom3140\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz55\shplid1040{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn fillColor}{\sv 16751001}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8247\dpellipse\dpx5891\dpy2653\dpxsize701\dpysize487
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr153\dpfillbgcg153\dpfillbgcb255\dpfillpat1\dplinehollow}}}{\shp{\*\shpinst\shpleft6063\shptop2903\shpright6477\shpbottom3107\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz54\shplid1041
+{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 589824}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}
+{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain
+\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 Control}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8246\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 Control}{
+\par }}\dpx6063\dpy2903\dpxsize414\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft6086\shptop2735\shpright6455\shpbottom2939\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz53\shplid1042{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 655360}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 TRAU}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8245\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 TRAU}{
+\par }}\dpx6086\dpy2735\dpxsize369\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft6837\shptop2508\shpright7251\shpbottom2712\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz52\shplid1043{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 720896}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 Control}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8244\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 Control}{
+\par }}\dpx6837\dpy2508\dpxsize414\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft6770\shptop2357\shpright7330\shpbottom2561\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz51\shplid1044{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 786432}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 MS Power}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8243\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 MS Power}{
+\par }}\dpx6770\dpy2357\dpxsize560\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft6669\shptop2317\shpright7359\shpbottom2792\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz50\shplid1045{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn fillColor}{\sv 16772300}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn lineColor}{\sv 13382451}}{\sp{\sn lineWidth}{\sv 6350}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8242
+\dpellipse\dpx6669\dpy2317\dpxsize690\dpysize475\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr204\dpfillbgcg236\dpfillbgcb255\dpfillpat1\dplinew10\dplinecor51\dplinecog51\dplinecob204}}}
+{\shp{\*\shpinst\shpleft6716\shptop2360\shpright7417\shpbottom2846\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz49\shplid1046{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn fillColor}{\sv 16751001}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8241\dpellipse\dpx6716\dpy2360\dpxsize701\dpysize486
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr153\dpfillbgcg153\dpfillbgcb255\dpfillpat1\dplinehollow}}}{\shp{\*\shpinst\shpleft6888\shptop2610\shpright7302\shpbottom2814\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz48\shplid1047
+{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 851968}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}
+{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain
+\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 Control}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8240\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 Control}{
+\par }}\dpx6888\dpy2610\dpxsize414\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft6821\shptop2441\shpright7381\shpbottom2645\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz47\shplid1048{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 917504}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 MS Power}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8239\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 MS Power}{
+\par }}\dpx6821\dpy2441\dpxsize560\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft5667\shptop2073\shpright6081\shpbottom2277\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz46\shplid1049{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 983040}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 Control}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8238\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 Control}{
+\par }}\dpx5667\dpy2073\dpxsize414\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft5578\shptop1904\shpright6183\shpbottom2108\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz45\shplid1050{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 1048576}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 BTS Power}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8237\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 BTS Power}{
+\par }}\dpx5578\dpy1904\dpxsize605\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft5499\shptop1882\shpright6189\shpbottom2357\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz44\shplid1051{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn fillColor}{\sv 16772300}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn lineColor}{\sv 13382451}}{\sp{\sn lineWidth}{\sv 6350}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8236
+\dpellipse\dpx5499\dpy1882\dpxsize690\dpysize475\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr204\dpfillbgcg236\dpfillbgcb255\dpfillpat1\dplinew10\dplinecor51\dplinecog51\dplinecob204}}}
+{\shp{\*\shpinst\shpleft5546\shptop1925\shpright6247\shpbottom2412\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz43\shplid1052{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn fillColor}{\sv 16751001}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8235\dpellipse\dpx5546\dpy1925\dpxsize701\dpysize487
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr153\dpfillbgcg153\dpfillbgcb255\dpfillpat1\dplinehollow}}}{\shp{\*\shpinst\shpleft5718\shptop2176\shpright6132\shpbottom2379\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz42\shplid1053
+{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 1114112}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}
+{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain
+\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 Control}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8234\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 Control}{
+\par }}\dpx5718\dpy2176\dpxsize414\dpysize203\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft5629\shptop2008\shpright6234\shpbottom2212\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz41\shplid1054{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 1179648}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 BTS Power}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8233\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 BTS Power}{
+\par }}\dpx5629\dpy2008\dpxsize605\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft6704\shptop1131\shpright7172\shpbottom1334\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz40\shplid1055{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 1245184}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 Advance}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8232\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 Advance}{
+\par }}\dpx6704\dpy1131\dpxsize468\dpysize203\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft6742\shptop963\shpright7143\shpbottom1166\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz39\shplid1056{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 1310720}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 Timing}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8231\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 Timing}{
+\par }}\dpx6742\dpy963\dpxsize401\dpysize203\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft6564\shptop939\shpright7254\shpbottom1414\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz38\shplid1057{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn fillColor}{\sv 16772300}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn lineColor}{\sv 13382451}}{\sp{\sn lineWidth}{\sv 6350}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8230
+\dpellipse\dpx6564\dpy939\dpxsize690\dpysize475\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr204\dpfillbgcg236\dpfillbgcb255\dpfillpat1\dplinew10\dplinecor51\dplinecog51\dplinecob204}}}
+{\shp{\*\shpinst\shpleft6611\shptop982\shpright7312\shpbottom1470\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz37\shplid1058{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn fillColor}{\sv 16751001}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8229\dpellipse\dpx6611\dpy982\dpxsize701\dpysize488
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr153\dpfillbgcg153\dpfillbgcb255\dpfillpat1\dplinehollow}}}{\shp{\*\shpinst\shpleft6755\shptop1234\shpright7223\shpbottom1438\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz36\shplid1059
+{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 1376256}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}
+{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain
+\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 Advance}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8228\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 Advance}{
+\par }}\dpx6755\dpy1234\dpxsize468\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft6793\shptop1065\shpright7194\shpbottom1269\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz35\shplid1060{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 1441792}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 Timing}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8227\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 Timing}{
+\par }}\dpx6793\dpy1065\dpxsize401\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft6730\shptop1723\shpright7593\shpbottom1927\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz34\shplid1061{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 1507328}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 Hopping Control}{
+
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8226\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 Hopping Control}{
+\par }}\dpx6730\dpy1723\dpxsize863\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft6880\shptop1553\shpright7431\shpbottom1756\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz33\shplid1062{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 1572864}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 Frequency}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8225\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 Frequency}{
+\par }}\dpx6880\dpy1553\dpxsize551\dpysize203\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft6617\shptop1587\shpright7689\shpbottom2062\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz32\shplid1063{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn fillColor}{\sv 16772300}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn lineColor}{\sv 13382451}}{\sp{\sn lineWidth}{\sv 6350}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8224
+\dpellipse\dpx6617\dpy1587\dpxsize1072\dpysize475\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr204\dpfillbgcg236\dpfillbgcb255\dpfillpat1\dplinew10\dplinecor51\dplinecog51\dplinecob204}}}
+{\shp{\*\shpinst\shpleft6634\shptop1612\shpright7717\shpbottom2099\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz31\shplid1064{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn fillColor}{\sv 16751001}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8223\dpellipse\dpx6634\dpy1612\dpxsize1083\dpysize487
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr153\dpfillbgcg153\dpfillbgcb255\dpfillpat1\dplinehollow}}}{\shp{\*\shpinst\shpleft6781\shptop1864\shpright7644\shpbottom2067\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz30\shplid1065
+{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 1638400}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}
+{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain
+\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 Hopping Control}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8222\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 Hopping Control}{
+\par }}\dpx6781\dpy1864\dpxsize863\dpysize203\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft6930\shptop1694\shpright7481\shpbottom1898\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz29\shplid1066{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 1703936}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 Frequency}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8221\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 Frequency}{
+\par }}\dpx6930\dpy1694\dpxsize551\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft5825\shptop1327\shpright6201\shpbottom1530\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz28\shplid1067{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 1769472}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 Report}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8220\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 Report}{
+\par }}\dpx5825\dpy1327\dpxsize376\dpysize203\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft5665\shptop1176\shpright6375\shpbottom1380\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz27\shplid1068{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 1835008}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 Measurement}{
+
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8219\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 Measurement}{
+\par }}\dpx5665\dpy1176\dpxsize710\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft5876\shptop1025\shpright6143\shpbottom1229\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz26\shplid1069{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 1900544}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 BTS}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8218\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf1\cgrid0 BTS}{
+\par }}\dpx5876\dpy1025\dpxsize267\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft5649\shptop1024\shpright6339\shpbottom1593\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz25\shplid1070{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn fillColor}{\sv 16772300}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn lineColor}{\sv 13382451}}{\sp{\sn lineWidth}{\sv 6350}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8217
+\dpellipse\dpx5649\dpy1024\dpxsize690\dpysize569\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr204\dpfillbgcg236\dpfillbgcb255\dpfillpat1\dplinew10\dplinecor51\dplinecog51\dplinecob204}}}
+{\shp{\*\shpinst\shpleft5681\shptop1012\shpright6382\shpbottom1593\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz24\shplid1071{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn fillColor}{\sv 16751001}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8216\dpellipse\dpx5681\dpy1012\dpxsize701\dpysize581
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr153\dpfillbgcg153\dpfillbgcb255\dpfillpat1\dplinehollow}}}{\shp{\*\shpinst\shpleft5876\shptop1392\shpright6252\shpbottom1596\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz23\shplid1072
+{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 1966080}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}
+{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain
+\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 Report}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8215\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 Report}{
+\par }}\dpx5876\dpy1392\dpxsize376\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft5716\shptop1223\shpright6426\shpbottom1427\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz22\shplid1073{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 2031616}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 Measurement}{
+
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8214\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 Measurement}{
+\par }}\dpx5716\dpy1223\dpxsize710\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft5926\shptop1054\shpright6193\shpbottom1258\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz21\shplid1074{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fLockText}{\sv 0}}{\sp{\sn lTxid}{\sv 2097152}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn WrapText}{\sv 2}}{\sp{\sn fSelectText}{\sv 1}}{\sp{\sn fRotateText}{\sv 1}}
+{\sp{\sn fFitShapeToText}{\sv 1}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 BTS}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8213\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs12\cf16\cgrid0 BTS}{
+\par }}\dpx5926\dpy1054\dpxsize267\dpysize204\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinehollow}}}
+{\shp{\*\shpinst\shpleft4245\shptop1756\shpright5250\shpbottom1939\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz20\shplid1075{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn geoRight}{\sv 1245}}{\sp{\sn geoBottom}{\sv 238}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;10;(0,195);(66,179);(133,163);(255,165);(377,167);(570,238);(735,210);(900,182);(1157,38)
+;(1245,0)}}{\sp{\sn pSegmentInfo}{\sv 2;9;16384;44288;8193;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}
+{\sp{\sn lineDashing}{\sv 2}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn lineEndCapStyle}{\sv 2}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8212\dppolygon\dppolycount53
+\dpptx0\dppty149\dpptx21\dppty145\dpptx40\dppty140\dpptx63\dppty136\dpptx87\dppty133\dpptx111\dppty130\dpptx140\dppty128\dpptx170\dppty126\dpptx188\dppty126\dpptx206\dppty126\dpptx216\dppty127\dpptx225\dppty127\dpptx245\dppty129\dpptx267\dppty131
+\dpptx290\dppty135\dpptx312\dppty139\dpptx336\dppty144\dpptx386\dppty152\dpptx412\dppty156\dpptx438\dppty160\dpptx465\dppty162\dpptx491\dppty165\dpptx503\dppty165\dpptx516\dppty166\dpptx529\dppty166\dpptx542\dppty165\dpptx555\dppty165\dpptx567\dppty164
+\dpptx580\dppty162\dpptx593\dppty161\dpptx606\dppty158\dpptx619\dppty156\dpptx632\dppty152\dpptx647\dppty149\dpptx660\dppty145\dpptx674\dppty141\dpptx689\dppty136\dpptx703\dppty131\dpptx733\dppty120\dpptx762\dppty108\dpptx793\dppty96\dpptx822\dppty83
+\dpptx851\dppty71\dpptx878\dppty58\dpptx904\dppty46\dpptx928\dppty35\dpptx950\dppty24\dpptx961\dppty19\dpptx971\dppty15\dpptx981\dppty10\dpptx989\dppty6\dpptx997\dppty3\dpptx1003\dppty0\dpx4245\dpy1756\dpxsize1005\dpysize183
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5220\shptop705\shpright7920\shpbottom3343\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz19\shplid1076{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lineColor}{\sv 13382451}}{\sp{\sn lineWidth}{\sv 15875}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8211\dpellipse\dpx5220\dpy705\dpxsize2700\dpysize2638
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew25\dplinecor51\dplinecog51\dplinecob204}}}
+{\shp{\*\shpinst\shpleft1710\shptop2163\shpright2955\shpbottom2914\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz18\shplid1077{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 1}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}{\sp{\sn lineStartArrowhead}{\sv 1}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}
+{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8210\dpline\dpptx1245\dppty0\dpptx0\dppty751\dpx1710\dpy2163\dpxsize1245\dpysize751\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft3504\shptop975\shpright3519\shpbottom1564\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz17\shplid1078{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}{\sp{\sn lineStartArrowhead}{\sv 1}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}
+{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8209\dpline\dpptx15\dppty0\dpptx0\dppty589\dpx3504\dpy975\dpxsize15\dpysize589\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft1920\shptop853\shpright2928\shpbottom1741\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz16\shplid1079{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}{\sp{\sn lineStartArrowhead}{\sv 1}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}
+{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8208\dpline\dpptx0\dppty0\dpptx1008\dppty888\dpx1920\dpy853\dpxsize1008\dpysize888\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2748\shptop2260\shpright3135\shpbottom2958\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz15\shplid1080{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 1}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8207
+\dpline\dpptx387\dppty0\dpptx0\dppty698\dpx2748\dpy2260\dpxsize387\dpysize698\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft3852\shptop2275\shpright4467\shpbottom2916\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz14\shplid1081{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}{\sp{\sn lineStartArrowhead}{\sv 1}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}
+{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8206\dpline\dpptx0\dppty0\dpptx615\dppty641\dpx3852\dpy2275\dpxsize615\dpysize641\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft1935\shptop1919\shpright2799\shpbottom1919\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz13\shplid1082{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}{\sp{\sn lineStartArrowhead}{\sv 1}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}
+{\sp{\sn lidRegroup}{\sv 16}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8205\dpline\dpptx0\dppty0\dpptx864\dppty0\dpx1935\dpy1919\dpxsize864\dpysize0\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft615\shptop2892\shpright1905\shpbottom3513\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz12\shplid1083{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 2162688}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+\fs16 RIL3\endash RR Encoder/Decoder}{\fs16\lang1033
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8204\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16 RIL3\endash RR Encoder/Decoder}{\fs16\lang1033
+\par }}\dpx615\dpy2892\dpxsize1290\dpysize621\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft624\shptop1536\shpright1920\shpbottom2289\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz11\shplid1084{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 2228224}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+\fs16 Mobility Management (MM+HO)}{\fs16\lang1033
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8203\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16 Mobility Management (MM+HO)}{\fs16\lang1033
+\par }}\dpx624\dpy1536\dpxsize1296\dpysize753\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft624\shptop439\shpright1920\shpbottom1000\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz10\shplid1085{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 2293760}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+\fs16 Call Control (CC+CRSS)}{\fs16\lang1033
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8202\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16 Call Control (CC+CRSS)}{\fs16\lang1033
+\par }}\dpx624\dpy439\dpxsize1296\dpysize561\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2928\shptop439\shpright4164\shpbottom978\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz9\shplid1086{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 2359296}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+\fs16 SNMP MIB Controller}{\fs16\lang1033
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8201\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16 SNMP MIB Controller}{\fs16\lang1033
+\par }}\dpx2928\dpy439\dpxsize1236\dpysize539\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft3756\shptop2928\shpright4932\shpbottom3490\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz8\shplid1087{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 2424832}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+\fs16 DSP Interface Driver Module}{\fs16\lang1033
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8200\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16 DSP Interface Driver Module}{\fs16\lang1033
+\par }}\dpx3756\dpy2928\dpxsize1176\dpysize562\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2223\shptop2958\shpright3393\shpbottom3516\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz7\shplid1088{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 2490368}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+\fs16 RIL3 Message Delivery}{\fs16\lang1033
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8199\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16 RIL3 Message Delivery}{\fs16\lang1033
+\par }}\dpx2223\dpy2958\dpxsize1170\dpysize558\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5910\shptop343\shpright7260\shpbottom787\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz6\shplid1089{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 2555904}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}{\sp{\sn fillFocus}{\sv 100}}
+{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\b RM expansion }{\b\lang1033
+
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8198\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\b RM expansion }{\b\lang1033
+\par }}\dpx5910\dpy343\dpxsize1350\dpysize444\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft3555\shptop1108\shpright4230\shpbottom1404\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz2\shplid1090{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 2621440}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1090}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16
+ OAM I/F}{\fs16\lang1033
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8194\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16 OAM I/F}{\fs16\lang1033
+\par }}\dpx3555\dpy1108\dpxsize675\dpysize296\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}}{\f0\lang1024
+\par
+\par
+\par
+\par }{\lang1024 {\shp{\*\shpinst\shpleft2100\shptop206\shpright2775\shpbottom502\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz0\shplid1091{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 2686976}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1091}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16
+ RM I/F}{\fs16\lang1033
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8192\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16 RM I/F}{\fs16\lang1033
+\par }}\dpx2100\dpy206\dpxsize675\dpysize296\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}}{\f0\lang1024
+\par
+\par
+\par }{\lang1024 {\shp{\*\shpinst\shpleft2325\shptop100\shpright2880\shpbottom396\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz4\shplid1092{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 2752512}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1092}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 16}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid { }{
+\fs16\lang1033 DL I/F
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8196\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid { }{\fs16\lang1033 DL I/F
+\par }}\dpx2325\dpy100\dpxsize555\dpysize296\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}}{\f0\lang1024
+\par
+\par }\pard\plain \s40\qc\widctlpar\adjustright \b\fs20\lang2057\cgrid {
+\par }\pard \s40\qc\sb60\sa60\widctlpar\adjustright {
+\par {\*\bkmkstart _Toc432248113}Figure }{\field{\*\fldinst { STYLEREF 1 \\s }}{\fldrslt {\lang1024 2}}}{\_}{\field{\*\fldinst { SEQ Figure \\* ARABIC \\s 1 }}{\fldrslt {\lang1024 1}}}{ Module RM Context Diagram{\*\bkmkend _Toc432248113}
+\par }\pard\plain \s15\widctlpar\adjustright \f4\fs20\cgrid {\f0\lang2057
+\par }\pard\plain \qj\fi-900\li900\sb60\sa60\widctlpar\pnrnot1\adjustright \fs20\lang2057\cgrid {\b\i TBD Note:}{\i Reviewers please help check if there is any un
+necessary function or something missing from this figure. For example, is there any interaction between RM and GPS as well as RM and CSU?
+\par }\pard \li990\sb60\sa60\widctlpar\pnrnot1\adjustright {\ul\revised\revauth1\revdttm1714043944 Ian advised that RR layer not be linked with the GPS system. Refer to Ian\rquote s comment 1, Appendix A.}{\ul\revised\revauth1\revdttm1714043943
+\par }\pard \sb60\sa60\widctlpar\adjustright {\ul Description of data flows related to module RM with reference to Figure 2-1:
+\par }\pard \qj\fi-1080\li1080\sb60\sa60\widctlpar\adjustright {OAM I/F\tab Definition of the interface between module RM and the SNMP MIB Controller module. The SNMP MIB Controller module is to define this I/F and thus bears its ownership.
+\par }\pard \qj\li1080\sb60\sa60\widctlpar\adjustright {OAM I/F is composed of da
+ta flows i.e. messages, message-passing mechanism as well as data structures used to carry these data flows over the RM-OA&M border. This holds true for all the I/Fs described in this subsection and will not be repeated any more in the description of thes
+e I/Fs.
+\par }\pard \qj\fi-1080\li1080\sb60\sa60\widctlpar\adjustright {RM I/F\tab \tab
+Definition of the interface between module RM and the Mobility Management module as well as the Call Control module. This I/F will be defined in this document and thus module RM owns this I/F.
+\par ED I/F\tab \tab Definition of the interface between modu
+le RM and the RIL3-RR Encoder/Decoder module. The latter module is to define and own this I/F. In fact, the RIL3-RR Encoder/Decoder module is to be an element of a functional bundle of modules RIL3 Encoder/Decoder, RIL3-MM Encoder/Decoder and RIL3-CC Enc
+oder/Decoder. The bundle may be named module RIL3 Encoder/Decoder.
+\par DL I/F\tab \tab Definition of the interface between module RM and the RIL3 Message Delivery module. This I/F is to inherit all the APIs provided in [2]\emdash GSM LAPDm Module API User Reference Manual and
+ furthermore introduce APIs associated with access to the IRT table.}{\i
+\par }\pard\plain \s42\qj\fi-1080\li1080\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {MPH I/F\tab \tab
+Definition of the interface between module RM and the DSP Interface Driver module. The DSP Interface Driver module is to give the definition of this I/F and thus bears the ownership of this I/F.
+\par }\pard \s42\qj\li1080\sb60\sa60\widctlpar\adjustright {Firstly, MPH I/F should conform to [5]\emdash BTS-BSC Layer 3 I/F and [6]\emdash
+BSS-MSC Layer 3 I/F to pass all the related messages received from the Host Interface Driver Module at the TI DSP side up to RM via the MPH-prefixed primitives defined in [4]\emdash
+Layer 1 General. Secondly, relevant messages used to command hardware components may be passed to the DSP Interface Driver module which in turn effects them through operation on related hardware components.
+\par }\pard \s42\qj\fi-990\li2070\sb60\sa60\widctlpar\adjustright {\b\i TBD Note:}{\i Reviewers please give you comment on the messages used to command or arm hardware components}{. }{\i Alternatively, another module may be added for this purpose if needed.
+
+\par {\*\bkmkstart _Toc432248053}{\listtext\pard\plain\s2 \b\i\f1\lang2057\cgrid \hich\af1\dbch\af0\loch\f1 2.2\tab}}\pard\plain \s2\sb240\sa60\keepn\widctlpar\ls1\ilvl1\outlinelevel1\adjustright \b\lang2057\cgrid {\i\f1 State Machine{\*\bkmkend _Toc432248053}
+
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {State Machine(SM) is used to describe the dynamic behaviour of module RM. The SM for RM is derived out of [1]\emdash PocketBTS Software Architecture, [7]\emdash
+GSM 04.08/RR Signalling Procedures, [8]\emdash GSM 03.09 Handover Procedures, [9]\emdash GSM 11.23/Handover Test Cases and [10]\emdash
+AireCore/Handover Signalling. The resulted STD description of the SM shown as in Figure 2-2 but the following points are assumed for this SM:
+\par }\pard \qj\fi-360\li360\sb60\sa60\widctlpar\adjustright {{\field{\*\fldinst SYMBOL 183 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}}{\tab RM establishes an air connection as per logical/functional c
+hannel basis. That is, the connection associated with one channel is independent of that of another. Thus all the air connections are equally and independently handled in the RM module. Handover functionality is assumed to be resident inside the Mobiliby
+Management module according to [1]\emdash PocketBTS Software Architecture.
+\par {\pntext\pard\plain\f3\fs20\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \qj\fi-360\li360\sb60\sa60\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls109\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls109\adjustright {
+Only non-synchronized cell case handover is supported. Other cases may be considered for later PocketBTS Releases. It depends.
+\par }\pard \qj\sb60\sa60\widctlpar\adjustright {\lang1024 {\shp{\*\shpinst\shpleft7725\shptop3704\shpright7830\shpbottom7754\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz150\shplid1093
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 1}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}
+{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}
+{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8342\dpline\dpptx0\dppty0\dpptx105\dppty4050\dpx7725\dpy3704\dpxsize105\dpysize4050\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft7230\shptop3719\shpright7230\shpbottom4709\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz149\shplid1094{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}
+{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}
+{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8341\dpline\dpptx0\dppty0\dpptx0\dppty990
+\dpx7230\dpy3719\dpxsize0\dpysize990\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft5605\shptop3179\shpright6690\shpbottom3449\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz148\shplid1095
+{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn rotation}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 91440}}{\sp{\sn dyTextTop}{\sv 45720}}{\sp{\sn dxTextRight}{\sv 91440}}{\sp{\sn dyTextBottom}{\sv 45720}}
+{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 1085}}{\sp{\sn geoBottom}{\sv 270}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;10
+;(1085,0);(744,11);(403,22);(245,60);(87,98);(0,190);(140,225);(280,260);(682,265);(1085,270)}}{\sp{\sn pSegmentInfo}{\sv 2;9;16384;44288;8193;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}
+{\sp{\sn fillType}{\sv 0}}{\sp{\sn fillColor}{\sv 16777215}}{\sp{\sn fillOpacity}{\sv 65536}}{\sp{\sn fillBackColor}{\sv 16777215}}{\sp{\sn fillBackOpacity}{\sv 65536}}{\sp{\sn fillCrMod}{\sv 536870912}}{\sp{\sn fillBlipFlags}{\sv 0}}
+{\sp{\sn fillWidth}{\sv 0}}{\sp{\sn fillHeight}{\sv 0}}{\sp{\sn fillAngle}{\sv 0}}{\sp{\sn fillFocus}{\sv 0}}{\sp{\sn fillToLeft}{\sv 0}}{\sp{\sn fillToTop}{\sv 0}}{\sp{\sn fillToRight}{\sv 0}}{\sp{\sn fillToBottom}{\sv 0}}{\sp{\sn fillRectLeft}{\sv 0}}
+{\sp{\sn fillRectTop}{\sv 0}}{\sp{\sn fillRectRight}{\sv 0}}{\sp{\sn fillRectBottom}{\sv 0}}{\sp{\sn fillDztype}{\sv 0}}{\sp{\sn fillShadePreset}{\sv 0}}{\sp{\sn fillOriginX}{\sv 0}}
+{\sp{\sn fillOriginY}{\sv 0}}{\sp{\sn fillShapeOriginX}{\sv 0}}{\sp{\sn fillShapeOriginY}{\sv 0}}{\sp{\sn fillShadeType}{\sv 1073741827}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fHitTestFill}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fillUseRect}{\sv 0}}
+{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}{\sp{\sn lineFillWidth}{\sv 0}}
+{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}{\sp{\sn lineWidth}{\sv 9525}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn lineEndCapStyle}{\sv 2}}
+{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}
+{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}
+{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}
+{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn c3DSpecularAmt}{\sv 0}}{\sp{\sn c3DDiffuseAmt}{\sv 65536}}{\sp{\sn c3DShininess}{\sv 5}}
+{\sp{\sn c3DEdgeThickness}{\sv 12700}}{\sp{\sn c3DExtrudeForward}{\sv 0}}{\sp{\sn c3DExtrudeBackward}{\sv 457200}}{\sp{\sn c3DExtrudePlane}{\sv 0}}{\sp{\sn c3DExtrusionColor}{\sv 268435703}}{\sp{\sn c3DCrMod}{\sv 536870912}}
+{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn c3DYRotationAngle}{\sv 0}}{\sp{\sn c3DXRotationAngle}{\sv 0}}{\sp{\sn c3DRotationAxisX}{\sv 100}}
+{\sp{\sn c3DRotationAxisY}{\sv 0}}{\sp{\sn c3DRotationAxisZ}{\sv 0}}{\sp{\sn c3DRotationAngle}{\sv 0}}{\sp{\sn c3DRotationCenterX}{\sv 0}}{\sp{\sn c3DRotationCenterY}{\sv 0}}{\sp{\sn c3DRotationCenterZ}{\sv 0}}
+{\sp{\sn c3DRenderMode}{\sv 0}}{\sp{\sn c3DTolerance}{\sv 30000}}{\sp{\sn c3DXViewpoint}{\sv 1250000}}{\sp{\sn c3DYViewpoint}{\sv -1250000}}{\sp{\sn c3DZViewpoint}{\sv 9000000}}{\sp{\sn c3DOriginX}{\sv 32768}}
+{\sp{\sn c3DOriginY}{\sv -32768}}{\sp{\sn c3DSkewAngle}{\sv -8847360}}{\sp{\sn c3DSkewAmount}{\sv 50}}{\sp{\sn c3DAmbientIntensity}{\sv 20000}}{\sp{\sn c3DKeyX}{\sv 50000}}{\sp{\sn c3DKeyY}{\sv 0}}{\sp{\sn c3DKeyZ}{\sv 10000}}
+{\sp{\sn c3DKeyIntensity}{\sv 38000}}{\sp{\sn c3DFillX}{\sv -50000}}{\sp{\sn c3DFillY}{\sv 0}}{\sp{\sn c3DFillZ}{\sv 10000}}{\sp{\sn c3DFillIntensity}{\sv 38000}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}
+{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}
+{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}
+{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8340\dppolygon\dppolycount44\dpptx1083\dppty0\dpptx957\dppty4\dpptx832\dppty9
+\dpptx710\dppty14\dpptx653\dppty16\dpptx595\dppty20\dpptx542\dppty23\dpptx490\dppty27\dpptx441\dppty32\dpptx394\dppty36\dpptx352\dppty41\dpptx312\dppty47\dpptx276\dppty53\dpptx245\dppty60\dpptx215\dppty67\dpptx189\dppty76\dpptx165\dppty86\dpptx142\dppty96
+\dpptx122\dppty108\dpptx106\dppty119\dpptx92\dppty131\dpptx82\dppty143\dpptx73\dppty155\dpptx69\dppty167\dpptx71\dppty178\dpptx75\dppty189\dpptx85\dppty199\dpptx99\dppty209\dpptx116\dppty217\dpptx141\dppty224\dpptx170\dppty230\dpptx205\dppty236
+\dpptx245\dppty241\dpptx290\dppty245\dpptx340\dppty249\dpptx394\dppty252\dpptx451\dppty255\dpptx514\dppty258\dpptx578\dppty260\dpptx644\dppty262\dpptx713\dppty264\dpptx786\dppty265\dpptx932\dppty267\dpptx1083\dppty269
+\dpx5605\dpy3179\dpxsize1085\dpysize270\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft1830\shptop3029\shpright5085\shpbottom3494\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz147\shplid1096{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 91440}}{\sp{\sn dyTextTop}{\sv 45720}}{\sp{\sn dxTextRight}{\sv 91440}}{\sp{\sn dyTextBottom}{\sv 45720}}{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}
+{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}
+{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 3315}}{\sp{\sn geoBottom}{\sv 495}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;10;(0,450);(596,452);(1193,455);(1680,450);(2167,445);(2653,495);(2925,420)
+;(3197,345);(3250,70);(3315,0)}}{\sp{\sn pSegmentInfo}{\sv 2;9;16384;44288;8193;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fillType}{\sv 0}}{\sp{\sn fillColor}{\sv 16777215}}{\sp{\sn fillOpacity}{\sv 65536}}
+{\sp{\sn fillBackColor}{\sv 16777215}}{\sp{\sn fillBackOpacity}{\sv 65536}}{\sp{\sn fillCrMod}{\sv 536870912}}{\sp{\sn fillBlipFlags}{\sv 0}}{\sp{\sn fillWidth}{\sv 0}}{\sp{\sn fillHeight}{\sv 0}}{\sp{\sn fillAngle}{\sv 0}}
+{\sp{\sn fillFocus}{\sv 0}}{\sp{\sn fillToLeft}{\sv 0}}{\sp{\sn fillToTop}{\sv 0}}{\sp{\sn fillToRight}{\sv 0}}{\sp{\sn fillToBottom}{\sv 0}}{\sp{\sn fillRectLeft}{\sv 0}}
+{\sp{\sn fillRectTop}{\sv 0}}{\sp{\sn fillRectRight}{\sv 0}}{\sp{\sn fillRectBottom}{\sv 0}}{\sp{\sn fillDztype}{\sv 0}}{\sp{\sn fillShadePreset}{\sv 0}}{\sp{\sn fillOriginX}{\sv 0}}
+{\sp{\sn fillOriginY}{\sv 0}}{\sp{\sn fillShapeOriginX}{\sv 0}}{\sp{\sn fillShapeOriginY}{\sv 0}}{\sp{\sn fillShadeType}{\sv 1073741827}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fHitTestFill}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fillUseRect}{\sv 0}}
+{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}{\sp{\sn lineFillWidth}{\sv 0}}
+{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}{\sp{\sn lineWidth}{\sv 9525}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}
+{\sp{\sn lineStartArrowhead}{\sv 1}}{\sp{\sn lineEndCapStyle}{\sv 2}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}
+{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}
+{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}
+{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn c3DSpecularAmt}{\sv 0}}
+{\sp{\sn c3DDiffuseAmt}{\sv 65536}}{\sp{\sn c3DShininess}{\sv 5}}{\sp{\sn c3DEdgeThickness}{\sv 12700}}{\sp{\sn c3DExtrudeForward}{\sv 0}}{\sp{\sn c3DExtrudeBackward}{\sv 457200}}{\sp{\sn c3DExtrudePlane}{\sv 0}}
+{\sp{\sn c3DExtrusionColor}{\sv 268435703}}{\sp{\sn c3DCrMod}{\sv 536870912}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn c3DYRotationAngle}{\sv 0}}
+{\sp{\sn c3DXRotationAngle}{\sv 0}}{\sp{\sn c3DRotationAxisX}{\sv 100}}{\sp{\sn c3DRotationAxisY}{\sv 0}}{\sp{\sn c3DRotationAxisZ}{\sv 0}}{\sp{\sn c3DRotationAngle}{\sv 0}}{\sp{\sn c3DRotationCenterX}{\sv 0}}
+{\sp{\sn c3DRotationCenterY}{\sv 0}}{\sp{\sn c3DRotationCenterZ}{\sv 0}}{\sp{\sn c3DRenderMode}{\sv 0}}{\sp{\sn c3DTolerance}{\sv 30000}}{\sp{\sn c3DXViewpoint}{\sv 1250000}}{\sp{\sn c3DYViewpoint}{\sv -1250000}}
+{\sp{\sn c3DZViewpoint}{\sv 9000000}}{\sp{\sn c3DOriginX}{\sv 32768}}{\sp{\sn c3DOriginY}{\sv -32768}}{\sp{\sn c3DSkewAngle}{\sv -8847360}}{\sp{\sn c3DSkewAmount}{\sv 50}}{\sp{\sn c3DAmbientIntensity}{\sv 20000}}
+{\sp{\sn c3DKeyX}{\sv 50000}}{\sp{\sn c3DKeyY}{\sv 0}}{\sp{\sn c3DKeyZ}{\sv 10000}}{\sp{\sn c3DKeyIntensity}{\sv 38000}}{\sp{\sn c3DFillX}{\sv -50000}}{\sp{\sn c3DFillY}{\sv 0}}{\sp{\sn c3DFillZ}{\sv 10000}}{\sp{\sn c3DFillIntensity}{\sv 38000}}
+{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}{\sp{\sn spcoa}{\sv 0}}
+{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}
+{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8339\dppolygon\dppolycount43\dpptx0\dppty422\dpptx438\dppty424\dpptx864\dppty424\dpptx1073\dppty424\dpptx1271\dppty424\dpptx1469\dppty424
+\dpptx1651\dppty422\dpptx1740\dppty422\dpptx1828\dppty423\dpptx2005\dppty426\dpptx2177\dppty429\dpptx2260\dppty431\dpptx2338\dppty432\dpptx2416\dppty433\dpptx2495\dppty432\dpptx2563\dppty431\dpptx2635\dppty427\dpptx2697\dppty422\dpptx2760\dppty415
+\dpptx2817\dppty406\dpptx2870\dppty394\dpptx2896\dppty386\dpptx2916\dppty379\dpptx2943\dppty369\dpptx2963\dppty360\dpptx2979\dppty349\dpptx3000\dppty337\dpptx3036\dppty312\dpptx3067\dppty285\dpptx3094\dppty256\dpptx3119\dppty225\dpptx3140\dppty195
+\dpptx3162\dppty164\dpptx3176\dppty134\dpptx3192\dppty106\dpptx3208\dppty80\dpptx3219\dppty54\dpptx3224\dppty43\dpptx3234\dppty33\dpptx3239\dppty23\dpptx3244\dppty14\dpptx3250\dppty7\dpptx3255\dppty0\dpx1830\dpy3029\dpxsize3255\dpysize465
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5490\shptop454\shpright6720\shpbottom899\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz146\shplid1097{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 91440}}{\sp{\sn dyTextTop}{\sv 45720}}{\sp{\sn dxTextRight}{\sv 91440}}{\sp{\sn dyTextBottom}{\sv 45720}}{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}
+{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}
+{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 1425}}{\sp{\sn geoBottom}{\sv 445}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;10;(0,25);(466,12);(933,0);(1140,55);(1347,110);(1425,290);(1245,355)
+;(1065,420);(562,432);(60,445)}}{\sp{\sn pSegmentInfo}{\sv 2;9;16384;44288;8193;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fillType}{\sv 0}}{\sp{\sn fillColor}{\sv 16777215}}{\sp{\sn fillOpacity}{\sv 65536}}
+{\sp{\sn fillBackColor}{\sv 16777215}}{\sp{\sn fillBackOpacity}{\sv 65536}}{\sp{\sn fillCrMod}{\sv 536870912}}{\sp{\sn fillBlipFlags}{\sv 0}}{\sp{\sn fillWidth}{\sv 0}}{\sp{\sn fillHeight}{\sv 0}}{\sp{\sn fillAngle}{\sv 0}}
+{\sp{\sn fillFocus}{\sv 0}}{\sp{\sn fillToLeft}{\sv 0}}{\sp{\sn fillToTop}{\sv 0}}{\sp{\sn fillToRight}{\sv 0}}{\sp{\sn fillToBottom}{\sv 0}}{\sp{\sn fillRectLeft}{\sv 0}}
+{\sp{\sn fillRectTop}{\sv 0}}{\sp{\sn fillRectRight}{\sv 0}}{\sp{\sn fillRectBottom}{\sv 0}}{\sp{\sn fillDztype}{\sv 0}}{\sp{\sn fillShadePreset}{\sv 0}}{\sp{\sn fillOriginX}{\sv 0}}
+{\sp{\sn fillOriginY}{\sv 0}}{\sp{\sn fillShapeOriginX}{\sv 0}}{\sp{\sn fillShapeOriginY}{\sv 0}}{\sp{\sn fillShadeType}{\sv 1073741827}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fHitTestFill}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fillUseRect}{\sv 0}}
+{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}{\sp{\sn lineFillWidth}{\sv 0}}
+{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}{\sp{\sn lineWidth}{\sv 9525}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn lineEndCapStyle}{\sv 2}}
+{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}
+{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}
+{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}
+{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn c3DSpecularAmt}{\sv 0}}{\sp{\sn c3DDiffuseAmt}{\sv 65536}}{\sp{\sn c3DShininess}{\sv 5}}
+{\sp{\sn c3DEdgeThickness}{\sv 12700}}{\sp{\sn c3DExtrudeForward}{\sv 0}}{\sp{\sn c3DExtrudeBackward}{\sv 457200}}{\sp{\sn c3DExtrudePlane}{\sv 0}}{\sp{\sn c3DExtrusionColor}{\sv 268435703}}{\sp{\sn c3DCrMod}{\sv 536870912}}
+{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn c3DYRotationAngle}{\sv 0}}{\sp{\sn c3DXRotationAngle}{\sv 0}}{\sp{\sn c3DRotationAxisX}{\sv 100}}
+{\sp{\sn c3DRotationAxisY}{\sv 0}}{\sp{\sn c3DRotationAxisZ}{\sv 0}}{\sp{\sn c3DRotationAngle}{\sv 0}}{\sp{\sn c3DRotationCenterX}{\sv 0}}{\sp{\sn c3DRotationCenterY}{\sv 0}}{\sp{\sn c3DRotationCenterZ}{\sv 0}}
+{\sp{\sn c3DRenderMode}{\sv 0}}{\sp{\sn c3DTolerance}{\sv 30000}}{\sp{\sn c3DXViewpoint}{\sv 1250000}}{\sp{\sn c3DYViewpoint}{\sv -1250000}}{\sp{\sn c3DZViewpoint}{\sv 9000000}}{\sp{\sn c3DOriginX}{\sv 32768}}
+{\sp{\sn c3DOriginY}{\sv -32768}}{\sp{\sn c3DSkewAngle}{\sv -8847360}}{\sp{\sn c3DSkewAmount}{\sv 50}}{\sp{\sn c3DAmbientIntensity}{\sv 20000}}{\sp{\sn c3DKeyX}{\sv 50000}}{\sp{\sn c3DKeyY}{\sv 0}}{\sp{\sn c3DKeyZ}{\sv 10000}}
+{\sp{\sn c3DKeyIntensity}{\sv 38000}}{\sp{\sn c3DFillX}{\sv -50000}}{\sp{\sn c3DFillY}{\sv 0}}{\sp{\sn c3DFillZ}{\sv 10000}}{\sp{\sn c3DFillIntensity}{\sv 38000}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}
+{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}
+{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}
+{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8338\dppolygon\dppolycount45\dpptx0\dppty25\dpptx149\dppty21\dpptx297\dppty16
+\dpptx441\dppty14\dpptx510\dppty14\dpptx575\dppty14\dpptx640\dppty16\dpptx701\dppty18\dpptx758\dppty21\dpptx811\dppty25\dpptx862\dppty31\dpptx907\dppty37\dpptx949\dppty46\dpptx984\dppty55\dpptx1000\dppty61\dpptx1015\dppty66\dpptx1045\dppty80
+\dpptx1070\dppty98\dpptx1094\dppty115\dpptx1113\dppty135\dpptx1132\dppty157\dpptx1145\dppty178\dpptx1153\dppty201\dpptx1159\dppty223\dpptx1161\dppty245\dpptx1157\dppty267\dpptx1151\dppty288\dpptx1139\dppty307\dpptx1122\dppty325\dpptx1102\dppty340
+\dpptx1075\dppty354\dpptx1043\dppty365\dpptx1004\dppty376\dpptx961\dppty385\dpptx909\dppty394\dpptx856\dppty401\dpptx797\dppty408\dpptx734\dppty414\dpptx667\dppty419\dpptx596\dppty423\dpptx523\dppty427\dpptx449\dppty431\dpptx372\dppty434\dpptx212\dppty439
+\dpptx51\dppty444\dpx5490\dpy454\dpxsize1230\dpysize445\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5580\shptop4694\shpright7215\shpbottom4694\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz145\shplid1098{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}
+{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}
+{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}
+{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8337\dpline\dpptx1635\dppty0\dpptx0\dppty0\dpx5580\dpy4694\dpxsize1635\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft1320\shptop824\shpright4560\shpbottom1679\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz144\shplid1099{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 91440}}{\sp{\sn dyTextTop}{\sv 45720}}{\sp{\sn dxTextRight}{\sv 91440}}{\sp{\sn dyTextBottom}{\sv 45720}}{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}
+{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}
+{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 3240}}{\sp{\sn geoBottom}{\sv 855}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;7;(0,630);(75,742);(150,855);(690,750);(1230,645);(2235,322);(3240,0)}}
+{\sp{\sn pSegmentInfo}{\sv 2;7;16384;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fillType}{\sv 0}}{\sp{\sn fillColor}{\sv 16777215}}{\sp{\sn fillOpacity}{\sv 65536}}{\sp{\sn fillBackColor}{\sv 16777215}}
+{\sp{\sn fillBackOpacity}{\sv 65536}}{\sp{\sn fillCrMod}{\sv 536870912}}{\sp{\sn fillBlipFlags}{\sv 0}}{\sp{\sn fillWidth}{\sv 0}}{\sp{\sn fillHeight}{\sv 0}}{\sp{\sn fillAngle}{\sv 0}}{\sp{\sn fillFocus}{\sv 0}}{\sp{\sn fillToLeft}{\sv 0}}
+{\sp{\sn fillToTop}{\sv 0}}{\sp{\sn fillToRight}{\sv 0}}{\sp{\sn fillToBottom}{\sv 0}}{\sp{\sn fillRectLeft}{\sv 0}}{\sp{\sn fillRectTop}{\sv 0}}{\sp{\sn fillRectRight}{\sv 0}}
+{\sp{\sn fillRectBottom}{\sv 0}}{\sp{\sn fillDztype}{\sv 0}}{\sp{\sn fillShadePreset}{\sv 0}}{\sp{\sn fillOriginX}{\sv 0}}{\sp{\sn fillOriginY}{\sv 0}}{\sp{\sn fillShapeOriginX}{\sv 0}}
+{\sp{\sn fillShapeOriginY}{\sv 0}}{\sp{\sn fillShadeType}{\sv 1073741827}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fHitTestFill}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fillUseRect}{\sv 0}}{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}
+{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}{\sp{\sn lineFillWidth}{\sv 0}}{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}
+{\sp{\sn lineWidth}{\sv 9525}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}{\sp{\sn lineStartArrowhead}{\sv 1}}{\sp{\sn lineEndCapStyle}{\sv 2}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}
+{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}
+{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}
+{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn c3DSpecularAmt}{\sv 0}}{\sp{\sn c3DDiffuseAmt}{\sv 65536}}{\sp{\sn c3DShininess}{\sv 5}}{\sp{\sn c3DEdgeThickness}{\sv 12700}}{\sp{\sn c3DExtrudeForward}{\sv 0}}
+{\sp{\sn c3DExtrudeBackward}{\sv 457200}}{\sp{\sn c3DExtrudePlane}{\sv 0}}{\sp{\sn c3DExtrusionColor}{\sv 268435703}}{\sp{\sn c3DCrMod}{\sv 536870912}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}
+{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn c3DYRotationAngle}{\sv 0}}{\sp{\sn c3DXRotationAngle}{\sv 0}}{\sp{\sn c3DRotationAxisX}{\sv 100}}{\sp{\sn c3DRotationAxisY}{\sv 0}}{\sp{\sn c3DRotationAxisZ}{\sv 0}}
+{\sp{\sn c3DRotationAngle}{\sv 0}}{\sp{\sn c3DRotationCenterX}{\sv 0}}{\sp{\sn c3DRotationCenterY}{\sv 0}}{\sp{\sn c3DRotationCenterZ}{\sv 0}}{\sp{\sn c3DRenderMode}{\sv 0}}{\sp{\sn c3DTolerance}{\sv 30000}}
+{\sp{\sn c3DXViewpoint}{\sv 1250000}}{\sp{\sn c3DYViewpoint}{\sv -1250000}}{\sp{\sn c3DZViewpoint}{\sv 9000000}}{\sp{\sn c3DOriginX}{\sv 32768}}{\sp{\sn c3DOriginY}{\sv -32768}}{\sp{\sn c3DSkewAngle}{\sv -8847360}}
+{\sp{\sn c3DSkewAmount}{\sv 50}}{\sp{\sn c3DAmbientIntensity}{\sv 20000}}{\sp{\sn c3DKeyX}{\sv 50000}}{\sp{\sn c3DKeyY}{\sv 0}}{\sp{\sn c3DKeyZ}{\sv 10000}}{\sp{\sn c3DKeyIntensity}{\sv 38000}}{\sp{\sn c3DFillX}{\sv -50000}}
+{\sp{\sn c3DFillY}{\sv 0}}{\sp{\sn c3DFillZ}{\sv 10000}}{\sp{\sn c3DFillIntensity}{\sv 38000}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}
+{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}
+{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}
+{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8336\dppolygon\dppolycount29\dpptx0\dppty629\dpptx31\dppty670\dpptx62\dppty710
+\dpptx83\dppty728\dpptx109\dppty744\dpptx135\dppty758\dpptx171\dppty770\dpptx207\dppty780\dpptx254\dppty787\dpptx306\dppty791\dpptx363\dppty791\dpptx430\dppty787\dpptx508\dppty778\dpptx596\dppty766\dpptx689\dppty750\dpptx798\dppty728\dpptx912\dppty700
+\dpptx1037\dppty669\dpptx1177\dppty633\dpptx1317\dppty594\dpptx1467\dppty551\dpptx1628\dppty505\dpptx1788\dppty456\dpptx1960\dppty405\dpptx2136\dppty350\dpptx2312\dppty295\dpptx2494\dppty238\dpptx2862\dppty120\dpptx3240\dppty0
+\dpx1320\dpy824\dpxsize3240\dpysize855\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft1290\shptop1004\shpright4680\shpbottom3119\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz143\shplid1100{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 91440}}{\sp{\sn dyTextTop}{\sv 45720}}{\sp{\sn dxTextRight}{\sv 91440}}{\sp{\sn dyTextBottom}{\sv 45720}}{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}
+{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}
+{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 3390}}{\sp{\sn geoBottom}{\sv 2115}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;7;(0,2115);(32,1721);(65,1328);(630,975);(1195,622);(2292,311);(3390,0)}}
+{\sp{\sn pSegmentInfo}{\sv 2;7;16384;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fillType}{\sv 0}}{\sp{\sn fillColor}{\sv 16777215}}{\sp{\sn fillOpacity}{\sv 65536}}{\sp{\sn fillBackColor}{\sv 16777215}}
+{\sp{\sn fillBackOpacity}{\sv 65536}}{\sp{\sn fillCrMod}{\sv 536870912}}{\sp{\sn fillBlipFlags}{\sv 0}}{\sp{\sn fillWidth}{\sv 0}}{\sp{\sn fillHeight}{\sv 0}}{\sp{\sn fillAngle}{\sv 0}}{\sp{\sn fillFocus}{\sv 0}}{\sp{\sn fillToLeft}{\sv 0}}
+{\sp{\sn fillToTop}{\sv 0}}{\sp{\sn fillToRight}{\sv 0}}{\sp{\sn fillToBottom}{\sv 0}}{\sp{\sn fillRectLeft}{\sv 0}}{\sp{\sn fillRectTop}{\sv 0}}{\sp{\sn fillRectRight}{\sv 0}}
+{\sp{\sn fillRectBottom}{\sv 0}}{\sp{\sn fillDztype}{\sv 0}}{\sp{\sn fillShadePreset}{\sv 0}}{\sp{\sn fillOriginX}{\sv 0}}{\sp{\sn fillOriginY}{\sv 0}}{\sp{\sn fillShapeOriginX}{\sv 0}}
+{\sp{\sn fillShapeOriginY}{\sv 0}}{\sp{\sn fillShadeType}{\sv 1073741827}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fHitTestFill}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fillUseRect}{\sv 0}}{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}
+{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}{\sp{\sn lineFillWidth}{\sv 0}}{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}
+{\sp{\sn lineWidth}{\sv 9525}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn lineEndCapStyle}{\sv 2}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}
+{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}
+{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}
+{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn c3DSpecularAmt}{\sv 0}}{\sp{\sn c3DDiffuseAmt}{\sv 65536}}{\sp{\sn c3DShininess}{\sv 5}}{\sp{\sn c3DEdgeThickness}{\sv 12700}}{\sp{\sn c3DExtrudeForward}{\sv 0}}
+{\sp{\sn c3DExtrudeBackward}{\sv 457200}}{\sp{\sn c3DExtrudePlane}{\sv 0}}{\sp{\sn c3DExtrusionColor}{\sv 268435703}}{\sp{\sn c3DCrMod}{\sv 536870912}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}
+{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn c3DYRotationAngle}{\sv 0}}{\sp{\sn c3DXRotationAngle}{\sv 0}}{\sp{\sn c3DRotationAxisX}{\sv 100}}{\sp{\sn c3DRotationAxisY}{\sv 0}}{\sp{\sn c3DRotationAxisZ}{\sv 0}}
+{\sp{\sn c3DRotationAngle}{\sv 0}}{\sp{\sn c3DRotationCenterX}{\sv 0}}{\sp{\sn c3DRotationCenterY}{\sv 0}}{\sp{\sn c3DRotationCenterZ}{\sv 0}}{\sp{\sn c3DRenderMode}{\sv 0}}{\sp{\sn c3DTolerance}{\sv 30000}}
+{\sp{\sn c3DXViewpoint}{\sv 1250000}}{\sp{\sn c3DYViewpoint}{\sv -1250000}}{\sp{\sn c3DZViewpoint}{\sv 9000000}}{\sp{\sn c3DOriginX}{\sv 32768}}{\sp{\sn c3DOriginY}{\sv -32768}}{\sp{\sn c3DSkewAngle}{\sv -8847360}}
+{\sp{\sn c3DSkewAmount}{\sv 50}}{\sp{\sn c3DAmbientIntensity}{\sv 20000}}{\sp{\sn c3DKeyX}{\sv 50000}}{\sp{\sn c3DKeyY}{\sv 0}}{\sp{\sn c3DKeyZ}{\sv 10000}}{\sp{\sn c3DKeyIntensity}{\sv 38000}}{\sp{\sn c3DFillX}{\sv -50000}}
+{\sp{\sn c3DFillY}{\sv 0}}{\sp{\sn c3DFillZ}{\sv 10000}}{\sp{\sn c3DFillIntensity}{\sv 38000}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}
+{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}
+{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}
+{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8335\dppolygon\dppolycount27\dpptx0\dppty2115\dpptx11\dppty1966
+\dpptx33\dppty1821\dpptx65\dppty1672\dpptx87\dppty1601\dpptx114\dppty1530\dpptx152\dppty1459\dpptx190\dppty1387\dpptx239\dppty1316\dpptx298\dppty1245\dpptx363\dppty1178\dpptx439\dppty1110\dpptx532\dppty1042\dpptx629\dppty975\dpptx743\dppty910
+\dpptx862\dppty846\dpptx998\dppty782\dpptx1144\dppty717\dpptx1296\dppty656\dpptx1459\dppty592\dpptx1633\dppty531\dpptx1806\dppty474\dpptx1991\dppty413\dpptx2180\dppty352\dpptx2571\dppty233\dpptx2978\dppty118\dpptx3390\dppty0
+\dpx1290\dpy1004\dpxsize3390\dpysize2115\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft4269\shptop9466\shpright4509\shpbottom10241\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz142\shplid1101{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 91440}}{\sp{\sn dyTextTop}{\sv 45720}}{\sp{\sn dxTextRight}{\sv 91440}}{\sp{\sn dyTextBottom}{\sv 45720}}{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}
+{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}
+{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 240}}{\sp{\sn geoBottom}{\sv 765}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;7;(240,0);(237,86);(235,173);(195,300);(155,427);(32,688);(0,765)}}
+{\sp{\sn pSegmentInfo}{\sv 2;7;16384;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fillType}{\sv 0}}{\sp{\sn fillColor}{\sv 16777215}}{\sp{\sn fillOpacity}{\sv 65536}}{\sp{\sn fillBackColor}{\sv 16777215}}
+{\sp{\sn fillBackOpacity}{\sv 65536}}{\sp{\sn fillCrMod}{\sv 536870912}}{\sp{\sn fillBlipFlags}{\sv 0}}{\sp{\sn fillWidth}{\sv 0}}{\sp{\sn fillHeight}{\sv 0}}{\sp{\sn fillAngle}{\sv 0}}{\sp{\sn fillFocus}{\sv 0}}{\sp{\sn fillToLeft}{\sv 0}}
+{\sp{\sn fillToTop}{\sv 0}}{\sp{\sn fillToRight}{\sv 0}}{\sp{\sn fillToBottom}{\sv 0}}{\sp{\sn fillRectLeft}{\sv 0}}{\sp{\sn fillRectTop}{\sv 0}}{\sp{\sn fillRectRight}{\sv 0}}
+{\sp{\sn fillRectBottom}{\sv 0}}{\sp{\sn fillDztype}{\sv 0}}{\sp{\sn fillShadePreset}{\sv 0}}{\sp{\sn fillOriginX}{\sv 0}}{\sp{\sn fillOriginY}{\sv 0}}{\sp{\sn fillShapeOriginX}{\sv 0}}
+{\sp{\sn fillShapeOriginY}{\sv 0}}{\sp{\sn fillShadeType}{\sv 1073741827}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fHitTestFill}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fillUseRect}{\sv 0}}{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}
+{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}{\sp{\sn lineFillWidth}{\sv 0}}{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}
+{\sp{\sn lineWidth}{\sv 9525}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn lineEndCapStyle}{\sv 2}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}
+{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}
+{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}
+{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn c3DSpecularAmt}{\sv 0}}{\sp{\sn c3DDiffuseAmt}{\sv 65536}}{\sp{\sn c3DShininess}{\sv 5}}{\sp{\sn c3DEdgeThickness}{\sv 12700}}{\sp{\sn c3DExtrudeForward}{\sv 0}}
+{\sp{\sn c3DExtrudeBackward}{\sv 457200}}{\sp{\sn c3DExtrudePlane}{\sv 0}}{\sp{\sn c3DExtrusionColor}{\sv 268435703}}{\sp{\sn c3DCrMod}{\sv 536870912}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}
+{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn c3DYRotationAngle}{\sv 0}}{\sp{\sn c3DXRotationAngle}{\sv 0}}{\sp{\sn c3DRotationAxisX}{\sv 100}}{\sp{\sn c3DRotationAxisY}{\sv 0}}{\sp{\sn c3DRotationAxisZ}{\sv 0}}
+{\sp{\sn c3DRotationAngle}{\sv 0}}{\sp{\sn c3DRotationCenterX}{\sv 0}}{\sp{\sn c3DRotationCenterY}{\sv 0}}{\sp{\sn c3DRotationCenterZ}{\sv 0}}{\sp{\sn c3DRenderMode}{\sv 0}}{\sp{\sn c3DTolerance}{\sv 30000}}
+{\sp{\sn c3DXViewpoint}{\sv 1250000}}{\sp{\sn c3DYViewpoint}{\sv -1250000}}{\sp{\sn c3DZViewpoint}{\sv 9000000}}{\sp{\sn c3DOriginX}{\sv 32768}}{\sp{\sn c3DOriginY}{\sv -32768}}{\sp{\sn c3DSkewAngle}{\sv -8847360}}
+{\sp{\sn c3DSkewAmount}{\sv 50}}{\sp{\sn c3DAmbientIntensity}{\sv 20000}}{\sp{\sn c3DKeyX}{\sv 50000}}{\sp{\sn c3DKeyY}{\sv 0}}{\sp{\sn c3DKeyZ}{\sv 10000}}{\sp{\sn c3DKeyIntensity}{\sv 38000}}{\sp{\sn c3DFillX}{\sv -50000}}
+{\sp{\sn c3DFillY}{\sv 0}}{\sp{\sn c3DFillZ}{\sv 10000}}{\sp{\sn c3DFillIntensity}{\sv 38000}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}
+{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}
+{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}
+{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8334\dppolygon\dppolycount35\dpptx239\dppty0\dpptx238\dppty32\dpptx236\dppty66
+\dpptx234\dppty100\dpptx232\dppty118\dpptx230\dppty137\dpptx228\dppty155\dpptx225\dppty173\dpptx222\dppty193\dpptx218\dppty215\dpptx213\dppty236\dpptx207\dppty258\dpptx201\dppty281\dpptx194\dppty304\dpptx190\dppty316\dpptx186\dppty330\dpptx181\dppty343
+\dpptx176\dppty358\dpptx164\dppty388\dpptx152\dppty420\dpptx138\dppty454\dpptx124\dppty488\dpptx109\dppty524\dpptx94\dppty558\dpptx79\dppty592\dpptx65\dppty625\dpptx51\dppty655\dpptx38\dppty686\dpptx26\dppty712\dpptx21\dppty725\dpptx16\dppty737
+\dpptx11\dppty748\dpptx7\dppty758\dpptx3\dppty766\dpptx0\dppty774\dpx4269\dpy9466\dpxsize240\dpysize775\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft3969\shptop9481\shpright4284\shpbottom10210\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz141\shplid1102{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 91440}}{\sp{\sn dyTextTop}{\sv 45720}}{\sp{\sn dxTextRight}{\sv 91440}}{\sp{\sn dyTextBottom}{\sv 45720}}{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}
+{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}
+{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 315}}{\sp{\sn geoBottom}{\sv 720}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;7;(0,720);(11,630);(23,540);(75,420);(127,300);(221,150);(315,0)}}
+{\sp{\sn pSegmentInfo}{\sv 2;7;16384;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fillType}{\sv 0}}{\sp{\sn fillColor}{\sv 16777215}}{\sp{\sn fillOpacity}{\sv 65536}}{\sp{\sn fillBackColor}{\sv 16777215}}
+{\sp{\sn fillBackOpacity}{\sv 65536}}{\sp{\sn fillCrMod}{\sv 536870912}}{\sp{\sn fillBlipFlags}{\sv 0}}{\sp{\sn fillWidth}{\sv 0}}{\sp{\sn fillHeight}{\sv 0}}{\sp{\sn fillAngle}{\sv 0}}{\sp{\sn fillFocus}{\sv 0}}{\sp{\sn fillToLeft}{\sv 0}}
+{\sp{\sn fillToTop}{\sv 0}}{\sp{\sn fillToRight}{\sv 0}}{\sp{\sn fillToBottom}{\sv 0}}{\sp{\sn fillRectLeft}{\sv 0}}{\sp{\sn fillRectTop}{\sv 0}}{\sp{\sn fillRectRight}{\sv 0}}
+{\sp{\sn fillRectBottom}{\sv 0}}{\sp{\sn fillDztype}{\sv 0}}{\sp{\sn fillShadePreset}{\sv 0}}{\sp{\sn fillOriginX}{\sv 0}}{\sp{\sn fillOriginY}{\sv 0}}{\sp{\sn fillShapeOriginX}{\sv 0}}
+{\sp{\sn fillShapeOriginY}{\sv 0}}{\sp{\sn fillShadeType}{\sv 1073741827}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fHitTestFill}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fillUseRect}{\sv 0}}{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}
+{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}{\sp{\sn lineFillWidth}{\sv 0}}{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}
+{\sp{\sn lineWidth}{\sv 9525}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn lineEndCapStyle}{\sv 2}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}
+{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}
+{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}
+{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn c3DSpecularAmt}{\sv 0}}{\sp{\sn c3DDiffuseAmt}{\sv 65536}}{\sp{\sn c3DShininess}{\sv 5}}{\sp{\sn c3DEdgeThickness}{\sv 12700}}{\sp{\sn c3DExtrudeForward}{\sv 0}}
+{\sp{\sn c3DExtrudeBackward}{\sv 457200}}{\sp{\sn c3DExtrudePlane}{\sv 0}}{\sp{\sn c3DExtrusionColor}{\sv 268435703}}{\sp{\sn c3DCrMod}{\sv 536870912}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}
+{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn c3DYRotationAngle}{\sv 0}}{\sp{\sn c3DXRotationAngle}{\sv 0}}{\sp{\sn c3DRotationAxisX}{\sv 100}}{\sp{\sn c3DRotationAxisY}{\sv 0}}{\sp{\sn c3DRotationAxisZ}{\sv 0}}
+{\sp{\sn c3DRotationAngle}{\sv 0}}{\sp{\sn c3DRotationCenterX}{\sv 0}}{\sp{\sn c3DRotationCenterY}{\sv 0}}{\sp{\sn c3DRotationCenterZ}{\sv 0}}{\sp{\sn c3DRenderMode}{\sv 0}}{\sp{\sn c3DTolerance}{\sv 30000}}
+{\sp{\sn c3DXViewpoint}{\sv 1250000}}{\sp{\sn c3DYViewpoint}{\sv -1250000}}{\sp{\sn c3DZViewpoint}{\sv 9000000}}{\sp{\sn c3DOriginX}{\sv 32768}}{\sp{\sn c3DOriginY}{\sv -32768}}{\sp{\sn c3DSkewAngle}{\sv -8847360}}
+{\sp{\sn c3DSkewAmount}{\sv 50}}{\sp{\sn c3DAmbientIntensity}{\sv 20000}}{\sp{\sn c3DKeyX}{\sv 50000}}{\sp{\sn c3DKeyY}{\sv 0}}{\sp{\sn c3DKeyZ}{\sv 10000}}{\sp{\sn c3DKeyIntensity}{\sv 38000}}{\sp{\sn c3DFillX}{\sv -50000}}
+{\sp{\sn c3DFillY}{\sv 0}}{\sp{\sn c3DFillZ}{\sv 10000}}{\sp{\sn c3DFillIntensity}{\sv 38000}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}
+{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}
+{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}
+{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8333\dppolygon\dppolycount25\dpptx0\dppty728\dpptx4\dppty694\dpptx9\dppty659
+\dpptx15\dppty624\dpptx22\dppty588\dpptx26\dppty569\dpptx31\dppty550\dpptx36\dppty531\dpptx43\dppty511\dpptx49\dppty490\dpptx57\dppty469\dpptx66\dppty447\dpptx75\dppty424\dpptx85\dppty401\dpptx96\dppty378\dpptx108\dppty353\dpptx121\dppty329
+\dpptx134\dppty304\dpptx149\dppty276\dpptx163\dppty251\dpptx178\dppty224\dpptx211\dppty169\dpptx244\dppty113\dpptx279\dppty57\dpptx314\dppty0\dpx3969\dpy9481\dpxsize315\dpysize729
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shpgrp{\*\shpinst\shpleft5844\shptop10848\shpright6234\shpbottom11023\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz140\shplid1103{\sp{\sn groupLeft}{\sv 7230}}{\sp{\sn groupTop}{\sv 12735}}{\sp{\sn groupRight}{\sv 7620}}
+{\sp{\sn groupBottom}{\sv 12908}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn rotation}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shp{\*\shpinst\shplid1104{\sp{\sn relLeft}{\sv 7305}}{\sp{\sn relTop}{\sv 12735}}{\sp{\sn relRight}{\sv 7620}}
+{\sp{\sn relBottom}{\sv 12878}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1105{\sp{\sn relLeft}{\sv 7275}}{\sp{\sn relTop}{\sv 12750}}{\sp{\sn relRight}{\sv 7590}}{\sp{\sn relBottom}{\sv 12893}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1106{\sp{\sn relLeft}{\sv 7230}}{\sp{\sn relTop}{\sv 12765}}{\sp{\sn relRight}{\sv 7545}}{\sp{\sn relBottom}{\sv 12908}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8332\dppolygon\dppolycount4\dpptx0\dppty0\dpptx390\dppty0\dpptx390\dppty175\dpptx0\dppty175\dpx5844\dpy10848\dpxsize390\dpysize175
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5814\shptop10259\shpright8094\shpbottom11108\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz139\shplid1107{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 2818048}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1107}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \s27\widctlpar\adjustright \f1\fs16\cgrid {\f0\ul Legend:
+
+\par }{\f0 Subscript \ldblquote i\rdblquote : Inbound to RM
+\par }\pard \s27\fi-990\li990\widctlpar\adjustright {\f0 Subscript \ldblquote o\rdblquote : Outboud from RM
+\par : Multiple copies
+\par }\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+\par
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8331\dptxbx{\dptxbxtext\pard\plain \s27\widctlpar\adjustright \f1\fs16\cgrid {\f0\ul Legend:
+\par }{\f0 Subscript \ldblquote i\rdblquote : Inbound to RM
+\par }\pard \s27\fi-990\li990\widctlpar\adjustright {\f0 Subscript \ldblquote o\rdblquote : Outboud from RM
+\par : Multiple copies
+\par }\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+\par
+\par }}\dpx5814\dpy10259\dpxsize2280\dpysize849\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft5559\shptop-212\shpright5844\shpbottom41\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz137\shplid1108{\sp{\sn shapeType}{\sv 120}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 2883584}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1108}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fillColor}{\sv 16751001}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}
+{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain
+\qc\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 A
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8329\dptxbx{\dptxbxtext\pard\plain \qc\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 A
+\par }}\dpx5559\dpy-212\dpxsize285\dpysize253\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr153\dpfillbgcg153\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft999\shptop9479\shpright1284\shpbottom9734\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz136\shplid1109{\sp{\sn shapeType}{\sv 120}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 2949120}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1109}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fillColor}{\sv 16751001}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}
+{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain
+\qc\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 A
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8328\dptxbx{\dptxbxtext\pard\plain \qc\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 A
+\par }}\dpx999\dpy9479\dpxsize285\dpysize255\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr153\dpfillbgcg153\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft6114\shptop7637\shpright6399\shpbottom7891\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz135\shplid1110{\sp{\sn shapeType}{\sv 120}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 3014656}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1110}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fillColor}{\sv 16751001}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}
+{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain
+\qc\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 B
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8327\dptxbx{\dptxbxtext\pard\plain \qc\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 B
+\par }}\dpx6114\dpy7637\dpxsize285\dpysize254\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr153\dpfillbgcg153\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft324\shptop6113\shpright609\shpbottom6367\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz134\shplid1111{\sp{\sn shapeType}{\sv 120}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 3080192}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1111}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fillColor}{\sv 16751001}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}
+{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain
+\qc\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 B
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8326\dptxbx{\dptxbxtext\pard\plain \qc\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 B
+\par }}\dpx324\dpy6113\dpxsize285\dpysize254\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr153\dpfillbgcg153\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft624\shptop6243\shpright939\shpbottom6243\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz133\shplid1112{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}
+{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}
+{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8325\dpline\dpptx0\dppty0\dpptx315\dppty0\dpx624\dpy6243\dpxsize315\dpysize0
+\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft3489\shptop5064\shpright6189\shpbottom5720\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz132\shplid1113
+{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn rotation}{\sv 0}}{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 2025}}
+{\sp{\sn geoBottom}{\sv 535}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;7;(0,25);(558,12);(1117,0);(1455,85);(1793,170);(1909,352);(2025,535)}}{\sp{\sn pSegmentInfo}{\sv 2;7;16384;44288;8193;44288;8193;44032;32768}}
+{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}{\sp{\sn lineFillWidth}{\sv 0}}
+{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}{\sp{\sn lineWidth}{\sv 9525}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn lineEndCapStyle}{\sv 2}}
+{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}{\sp{\sn shadowHighlight}{\sv 13355979}}
+{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}{\sp{\sn shadowSecondOffsetY}{\sv 0}}
+{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}{\sp{\sn shadowPerspectiveY}{\sv 0}}
+{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}
+{\sp{\sn dxyCalloutGap}{\sv 76200}}{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}
+{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8324\dppolygon\dppolycount29\dpptx0\dppty31\dpptx276\dppty26\dpptx553\dppty21\dpptx687\dppty20\dpptx821\dppty18\dpptx951\dppty20\dpptx1080\dppty22
+\dpptx1205\dppty26\dpptx1327\dppty31\dpptx1439\dppty38\dpptx1551\dppty47\dpptx1659\dppty58\dpptx1759\dppty70\dpptx1853\dppty86\dpptx1940\dppty104\dpptx2021\dppty125\dpptx2095\dppty148\dpptx2164\dppty174\dpptx2225\dppty202\dpptx2285\dppty233
+\dpptx2337\dppty265\dpptx2384\dppty299\dpptx2432\dppty334\dpptx2471\dppty372\dpptx2509\dppty410\dpptx2544\dppty449\dpptx2579\dppty489\dpptx2640\dppty571\dpptx2700\dppty655\dpx3489\dpy5064\dpxsize2700\dpysize656
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5274\shptop4574\shpright5559\shpbottom4827\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz131\shplid1114{\sp{\sn shapeType}{\sv 120}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 3145728}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1114}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fillColor}{\sv 16751001}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}
+{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain
+\qc\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 B
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8323\dptxbx{\dptxbxtext\pard\plain \qc\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 B
+\par }}\dpx5274\dpy4574\dpxsize285\dpysize253\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr153\dpfillbgcg153\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft6114\shptop8877\shpright6984\shpbottom9407\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz130\shplid1115{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 3211264}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1115}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \s27\widctlpar\adjustright \f1\fs16\cgrid {\f0 HO_COMi
+\par HO_COMo
+\par }\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8322\dptxbx{\dptxbxtext\pard\plain \s27\widctlpar\adjustright \f1\fs16\cgrid {\f0 HO_COMi
+\par HO_COMo
+\par }\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+\par }}\dpx6114\dpy8877\dpxsize870\dpysize530\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft5259\shptop7753\shpright7824\shpbottom8965\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz129\shplid1116{\sp{\sn shapeType}{\sv 19}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 1}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineStartArrowhead}{\sv 1}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8321\dppolygon\dppolycount33\dpptx0\dppty0\dpptx131\dppty2\dpptx263\dppty6\dpptx390\dppty14\dpptx517\dppty25\dpptx640\dppty39\dpptx763\dppty54
+\dpptx882\dppty74\dpptx997\dppty95\dpptx1112\dppty120\dpptx1223\dppty147\dpptx1330\dppty176\dpptx1432\dppty207\dpptx1535\dppty240\dpptx1633\dppty277\dpptx1724\dppty314\dpptx1814\dppty355\dpptx1900\dppty398\dpptx1978\dppty442\dpptx2056\dppty487
+\dpptx2126\dppty535\dpptx2196\dppty584\dpptx2257\dppty634\dpptx2311\dppty686\dpptx2364\dppty741\dpptx2409\dppty795\dpptx2450\dppty851\dpptx2483\dppty910\dpptx2512\dppty968\dpptx2536\dppty1028\dpptx2553\dppty1088\dpptx2561\dppty1150\dpptx2565\dppty1212
+\dpx5259\dpy7753\dpxsize2565\dpysize1212\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2584\shptop9764\shpright3279\shpbottom10817\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz128\shplid1117{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 1475}}
+{\sp{\sn geoBottom}{\sv 768}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;7;(1475,735);(982,751);(490,768);(245,645);(0,522);(2,261);(5,0)}}{\sp{\sn pSegmentInfo}{\sv 2;7;16384;44288;8193;44288;8193;44032;32768}}
+{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}{\sp{\sn lineFillWidth}{\sv 0}}
+{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}{\sp{\sn lineWidth}{\sv 9525}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}
+{\sp{\sn lineEndCapStyle}{\sv 2}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}
+{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}
+{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}
+{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}
+{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}
+{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8320\dppolygon\dppolycount27\dpptx695\dppty1006\dpptx608\dppty1015\dpptx523\dppty1019\dpptx439\dppty1021\dpptx401\dppty1019\dpptx361\dppty1016
+\dpptx324\dppty1009\dpptx288\dppty1002\dpptx253\dppty991\dpptx222\dppty975\dpptx191\dppty958\dpptx164\dppty936\dpptx139\dppty912\dpptx115\dppty883\dpptx96\dppty849\dpptx78\dppty812\dpptx62\dppty771\dpptx49\dppty724\dpptx38\dppty676\dpptx29\dppty624
+\dpptx21\dppty569\dpptx16\dppty513\dpptx11\dppty454\dpptx7\dppty392\dpptx3\dppty265\dpptx2\dppty133\dpptx2\dppty0\dpx2584\dpy9764\dpxsize695\dpysize1053
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2979\shptop7171\shpright3669\shpbottom9239\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz127\shplid1118{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 645}}
+{\sp{\sn geoBottom}{\sv 1432}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;7;(15,0);(7,484);(0,968);(105,1200);(210,1432);(427,1413);(645,1395)}}{\sp{\sn pSegmentInfo}{\sv 2;7;16384;44288;8193;44288;8193;44032;32768}}
+{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}{\sp{\sn lineFillWidth}{\sv 0}}
+{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}{\sp{\sn lineWidth}{\sv 9525}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}
+{\sp{\sn lineEndCapStyle}{\sv 2}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}
+{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}
+{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}
+{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}
+{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}
+{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8319\dppolygon\dppolycount27\dpptx16\dppty0\dpptx13\dppty261\dpptx12\dppty520\dpptx13\dppty768\dpptx15\dppty887\dpptx19\dppty1002\dpptx25\dppty1115
+\dpptx31\dppty1220\dpptx39\dppty1320\dpptx48\dppty1417\dpptx61\dppty1505\dpptx76\dppty1589\dpptx93\dppty1664\dpptx112\dppty1730\dpptx135\dppty1791\dpptx160\dppty1840\dpptx187\dppty1883\dpptx217\dppty1919\dpptx248\dppty1952\dpptx282\dppty1976
+\dpptx318\dppty1996\dpptx355\dppty2009\dpptx394\dppty2019\dpptx434\dppty2025\dpptx517\dppty2025\dpptx601\dppty2022\dpptx689\dppty2012\dpx2979\dpy7171\dpxsize690\dpysize2068
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2604\shptop6123\shpright2994\shpbottom7213\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz126\shplid1119{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 375}}
+{\sp{\sn geoBottom}{\sv 880}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;7;(0,10);(96,5);(193,0);(255,145);(317,290);(355,757);(375,880)}}{\sp{\sn pSegmentInfo}{\sv 2;7;16384;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}
+{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}
+{\sp{\sn lineFillWidth}{\sv 0}}{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}{\sp{\sn lineWidth}{\sv 9525}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}{\sp{\sn lineStartArrowhead}{\sv 1}}
+{\sp{\sn lineEndCapStyle}{\sv 2}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}
+{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}
+{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}
+{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}
+{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}
+{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8318\dppolygon\dppolycount35\dpptx0\dppty12\dpptx37\dppty10\dpptx74\dppty10\dpptx110\dppty16\dpptx129\dppty21\dpptx146\dppty26\dpptx162\dppty35
+\dpptx179\dppty47\dpptx194\dppty61\dpptx210\dppty77\dpptx225\dppty98\dpptx239\dppty120\dpptx252\dppty149\dpptx264\dppty180\dpptx270\dppty197\dpptx277\dppty218\dpptx282\dppty240\dpptx288\dppty264\dpptx298\dppty317\dpptx308\dppty377\dpptx317\dppty440
+\dpptx327\dppty505\dpptx335\dppty576\dpptx343\dppty645\dpptx350\dppty713\dpptx358\dppty782\dpptx364\dppty846\dpptx370\dppty907\dpptx375\dppty962\dpptx378\dppty988\dpptx380\dppty1013\dpptx383\dppty1036\dpptx385\dppty1055\dpptx387\dppty1073
+\dpptx389\dppty1089\dpx2604\dpy6123\dpxsize390\dpysize1090\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5979\shptop2509\shpright7464\shpbottom2939\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz125\shplid1120{\sp{\sn shapeType}{\sv 19}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8317\dppolygon\dppolycount33\dpptx0\dppty0
+\dpptx76\dppty1\dpptx152\dppty2\dpptx226\dppty5\dpptx299\dppty9\dpptx371\dppty14\dpptx442\dppty19\dpptx511\dppty26\dpptx577\dppty34\dpptx644\dppty43\dpptx708\dppty52\dpptx770\dppty63\dpptx829\dppty74\dpptx889\dppty85\dpptx946\dppty98\dpptx998\dppty111
+\dpptx1050\dppty126\dpptx1100\dppty141\dpptx1145\dppty157\dpptx1190\dppty173\dpptx1231\dppty190\dpptx1271\dppty207\dpptx1307\dppty225\dpptx1338\dppty244\dpptx1369\dppty263\dpptx1395\dppty282\dpptx1418\dppty302\dpptx1437\dppty323\dpptx1454\dppty343
+\dpptx1468\dppty365\dpptx1478\dppty386\dpptx1483\dppty408\dpptx1485\dppty430\dpx5979\dpy2509\dpxsize1485\dpysize430\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}
+}}{\shp{\*\shpinst\shpleft6663\shptop2906\shpright8067\shpbottom3741\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz124\shplid1121{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 3276800}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1121}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}
+{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \qc\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 S4
+
+\par Traffic
+\par }\pard\plain \s27\widctlpar\adjustright \f1\fs16\cgrid {\f0 Chn Activated
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8316\dptxbx{\dptxbxtext\pard\plain \qc\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 S4
+\par Traffic
+\par }\pard\plain \s27\widctlpar\adjustright \f1\fs16\cgrid {\f0 Chn Activated
+\par }}\dpx6663\dpy2906\dpxsize1404\dpysize835\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft6762\shptop2881\shpright8161\shpbottom3723\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz123\shplid1122{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}
+{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8315\dpellipse
+\dpx6762\dpy2881\dpxsize1399\dpysize842\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft6853\shptop2864\shpright8229\shpbottom3723\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz122\shplid1123{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}
+{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8314\dpellipse
+\dpx6853\dpy2864\dpxsize1376\dpysize859\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft3084\shptop9780\shpright3954\shpbottom10201\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz119\shplid1124{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 3342336}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1124}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \s27\qr\widctlpar\adjustright \f1\fs16\cgrid {\f0 HO_FAILi,
+
+\par HO_FAILo
+\par }\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8311\dptxbx{\dptxbxtext\pard\plain \s27\qr\widctlpar\adjustright \f1\fs16\cgrid {\f0 HO_FAILi,
+\par HO_FAILo
+\par }\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+\par }}\dpx3084\dpy9780\dpxsize870\dpysize421\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft4539\shptop9514\shpright5409\shpbottom9908\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz118\shplid1125{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 3407872}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1125}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \s27\widctlpar\adjustright \f1\fs16\cgrid {\f0 HO_CMDi
+\par HO_CMDo
+\par }\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8310\dptxbx{\dptxbxtext\pard\plain \s27\widctlpar\adjustright \f1\fs16\cgrid {\f0 HO_CMDi
+\par HO_CMDo
+\par }\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+\par }}\dpx4539\dpy9514\dpxsize870\dpysize394\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shpgrp{\*\shpinst\shpleft3282\shptop10187\shpright4923\shpbottom11230\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz117\shplid1126{\sp{\sn groupLeft}{\sv 2928}}{\sp{\sn groupTop}{\sv 8601}}{\sp{\sn groupRight}{\sv 4734}}
+{\sp{\sn groupBottom}{\sv 9267}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn rotation}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shp{\*\shpinst\shplid1127{\sp{\sn relLeft}{\sv 3147}}{\sp{\sn relTop}{\sv 8601}}{\sp{\sn relRight}{\sv 4734}}
+{\sp{\sn relBottom}{\sv 9254}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}
+{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 17}}}}{\shp{\*\shpinst\shplid1128{\sp{\sn relLeft}{\sv 3043}}{\sp{\sn relTop}{\sv 8622}}
+{\sp{\sn relRight}{\sv 4656}}{\sp{\sn relBottom}{\sv 9254}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}
+{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}
+{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 17}}}}{\shp{\*\shpinst\shplid1129{\sp{\sn relLeft}{\sv 2928}}{\sp{\sn relTop}{\sv 8662}}
+{\sp{\sn relRight}{\sv 4547}}{\sp{\sn relBottom}{\sv 9267}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn lTxid}{\sv 3473408}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}
+{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1129}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}
+{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}
+{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 17}}{\shptxt \pard\plain \qc\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 S11
+\par Traffic Chn Suspending}{\lang1033
+\par }}}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8309\dppolygon\dppolycount4\dpptx0\dppty0\dpptx1641\dppty0\dpptx1641\dppty1043\dpptx0\dppty1043\dpx3282\dpy10187\dpxsize1641\dpysize1043
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shpgrp{\*\shpinst\shpleft3642\shptop8573\shpright5238\shpbottom9481\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz112\shplid1130{\sp{\sn groupLeft}{\sv 5829}}{\sp{\sn groupTop}{\sv 12765}}{\sp{\sn groupRight}{\sv 6870}}
+{\sp{\sn groupBottom}{\sv 13086}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn rotation}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shp{\*\shpinst\shplid1131{\sp{\sn relLeft}{\sv 5955}}{\sp{\sn relTop}{\sv 12765}}{\sp{\sn relRight}{\sv 6870}}
+{\sp{\sn relBottom}{\sv 13080}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}
+{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1132{\sp{\sn relLeft}{\sv 5895}}{\sp{\sn relTop}{\sv 12795}}
+{\sp{\sn relRight}{\sv 6825}}{\sp{\sn relBottom}{\sv 13080}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}
+{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}
+{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1133{\sp{\sn relLeft}{\sv 5829}}{\sp{\sn relTop}{\sv 12813}}
+{\sp{\sn relRight}{\sv 6762}}{\sp{\sn relBottom}{\sv 13086}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn lTxid}{\sv 3538944}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}
+{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1133}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}
+{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}
+{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\shptxt \pard\plain \s27\qc\widctlpar\adjustright \f1\fs16\cgrid {\f0 S10
+\par Traffic Mode Established
+\par }}}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8304\dppolygon\dppolycount4\dpptx0\dppty0\dpptx1596\dppty0\dpptx1596\dppty908\dpptx0\dppty908\dpx3642\dpy8573\dpxsize1596\dpysize908
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft6294\shptop6696\shpright7794\shpbottom7357\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz111\shplid1134{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 3604480}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1134}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \qj\widctlpar\adjustright \fs20\lang2057\cgrid {
+\fs16\lang1033 MOD MODIFY
+\par }\pard\plain \s27\widctlpar\adjustright \f1\fs16\cgrid {\f0 NAKi || |TIME_OUTi, ERR_LOGo
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8303\dptxbx{\dptxbxtext\pard\plain \qj\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 MOD MODIFY
+\par }\pard\plain \s27\widctlpar\adjustright \f1\fs16\cgrid {\f0 NAKi || |TIME_OUTi, ERR_LOGo
+\par }}\dpx6294\dpy6696\dpxsize1500\dpysize661\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft6264\shptop6509\shpright6264\shpbottom7638\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz110\shplid1135{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}
+{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8302\dpline\dpptx0\dppty0\dpptx0\dppty1129
+\dpx6264\dpy6509\dpxsize0\dpysize1129\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft3714\shptop5099\shpright4974\shpbottom5671\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz104\shplid1136
+{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn lTxid}{\sv 3670016}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1136}}
+{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt
+\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 RES ASSIGNi,
+\par MOD MODIFYo
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8296\dptxbx{\dptxbxtext\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 RES ASSIGNi,
+\par MOD MODIFYo
+\par }}\dpx3714\dpy5099\dpxsize1260\dpysize572\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shpgrp{\*\shpinst\shpleft5478\shptop5590\shpright7179\shpbottom6507\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz103\shplid1137{\sp{\sn groupLeft}{\sv 5829}}{\sp{\sn groupTop}{\sv 12765}}{\sp{\sn groupRight}{\sv 6870}}
+{\sp{\sn groupBottom}{\sv 13086}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn rotation}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shp{\*\shpinst\shplid1138{\sp{\sn relLeft}{\sv 5955}}{\sp{\sn relTop}{\sv 12765}}{\sp{\sn relRight}{\sv 6870}}
+{\sp{\sn relBottom}{\sv 13080}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}
+{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1139{\sp{\sn relLeft}{\sv 5895}}{\sp{\sn relTop}{\sv 12795}}
+{\sp{\sn relRight}{\sv 6825}}{\sp{\sn relBottom}{\sv 13080}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}
+{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}
+{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1140{\sp{\sn relLeft}{\sv 5829}}{\sp{\sn relTop}{\sv 12813}}
+{\sp{\sn relRight}{\sv 6762}}{\sp{\sn relBottom}{\sv 13086}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn lTxid}{\sv 3735552}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}
+{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1140}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}
+{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}
+{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\shptxt \pard\plain \s27\qc\widctlpar\adjustright \f1\fs16\cgrid {\f0 S6
+\par Activating Traffic Mode
+\par }}}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8295\dppolygon\dppolycount4\dpptx0\dppty0\dpptx1701\dppty0\dpptx1701\dppty917\dpptx0\dppty917\dpx5478\dpy5590\dpxsize1701\dpysize917
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft1149\shptop8598\shpright1149\shpbottom9493\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz102\shplid1141{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}
+{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8294\dpline\dpptx0\dppty0\dpptx0\dppty895
+\dpx1149\dpy8598\dpxsize0\dpysize895\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft1179\shptop8752\shpright2334\shpbottom9167\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz101\shplid1142
+{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn lTxid}{\sv 3801088}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1142}}
+{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt
+\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 RF CHN ACKi ||
+\par TIME_OUTi,
+\par
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8293\dptxbx{\dptxbxtext\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 RF CHN ACKi ||
+\par TIME_OUTi,
+\par
+\par }}\dpx1179\dpy8752\dpxsize1155\dpysize415\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shpgrp{\*\shpinst\shpleft288\shptop7660\shpright2364\shpbottom8573\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz100\shplid1143{\sp{\sn groupLeft}{\sv 5829}}{\sp{\sn groupTop}{\sv 12765}}{\sp{\sn groupRight}{\sv 6870}}
+{\sp{\sn groupBottom}{\sv 13086}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn rotation}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shp{\*\shpinst\shplid1144{\sp{\sn relLeft}{\sv 5955}}{\sp{\sn relTop}{\sv 12765}}{\sp{\sn relRight}{\sv 6870}}
+{\sp{\sn relBottom}{\sv 13080}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}
+{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1145{\sp{\sn relLeft}{\sv 5895}}{\sp{\sn relTop}{\sv 12795}}
+{\sp{\sn relRight}{\sv 6825}}{\sp{\sn relBottom}{\sv 13080}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}
+{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}
+{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1146{\sp{\sn relLeft}{\sv 5829}}{\sp{\sn relTop}{\sv 12813}}
+{\sp{\sn relRight}{\sv 6762}}{\sp{\sn relBottom}{\sv 13086}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn lTxid}{\sv 3866624}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}
+{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1146}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}
+{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}
+{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\shptxt \pard\plain \s27\qc\widctlpar\adjustright \f1\fs16\cgrid {\f0 S9
+\par Deactivating Sig/Traffic Chn
+\par }}}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8292\dppolygon\dppolycount4\dpptx0\dppty0\dpptx2076\dppty0\dpptx2076\dppty913\dpptx0\dppty913\dpx288\dpy7660\dpxsize2076\dpysize913
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft1779\shptop5091\shpright2199\shpbottom5777\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz99\shplid1147{\sp{\sn shapeType}{\sv 19}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8291\dppolygon\dppolycount33\dpptx0\dppty0
+\dpptx22\dppty1\dpptx43\dppty3\dpptx64\dppty8\dpptx85\dppty14\dpptx105\dppty22\dpptx125\dppty31\dpptx144\dppty42\dpptx163\dppty54\dpptx182\dppty68\dpptx200\dppty83\dpptx218\dppty100\dpptx235\dppty117\dpptx251\dppty136\dpptx267\dppty157\dpptx282\dppty178
+\dpptx297\dppty201\dpptx311\dppty225\dpptx324\dppty250\dpptx337\dppty276\dpptx348\dppty303\dpptx360\dppty330\dpptx370\dppty359\dpptx378\dppty389\dpptx387\dppty419\dpptx394\dppty450\dpptx401\dppty482\dpptx407\dppty515\dpptx411\dppty548\dpptx415\dppty582
+\dpptx418\dppty616\dpptx419\dppty651\dpptx420\dppty686\dpx1779\dpy5091\dpxsize420\dpysize686\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shpgrp{\*\shpinst\shpleft933\shptop5659\shpright2649\shpbottom6606\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz98\shplid1148{\sp{\sn groupLeft}{\sv 5829}}{\sp{\sn groupTop}{\sv 12765}}{\sp{\sn groupRight}{\sv 6870}}
+{\sp{\sn groupBottom}{\sv 13086}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn rotation}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shp{\*\shpinst\shplid1149{\sp{\sn relLeft}{\sv 5955}}{\sp{\sn relTop}{\sv 12765}}{\sp{\sn relRight}{\sv 6870}}
+{\sp{\sn relBottom}{\sv 13080}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}
+{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1150{\sp{\sn relLeft}{\sv 5895}}{\sp{\sn relTop}{\sv 12795}}
+{\sp{\sn relRight}{\sv 6825}}{\sp{\sn relBottom}{\sv 13080}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}
+{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}
+{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1151{\sp{\sn relLeft}{\sv 5829}}{\sp{\sn relTop}{\sv 12813}}
+{\sp{\sn relRight}{\sv 6762}}{\sp{\sn relBottom}{\sv 13086}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 3}}{\sp{\sn lTxid}{\sv 3932160}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}
+{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1151}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}
+{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}
+{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\shptxt \pard\plain \s27\qc\widctlpar\adjustright \f1\fs16\cgrid {\f0 S7
+\par Releasing Sig/Traffic Chn
+\par }}}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8290\dppolygon\dppolycount4\dpptx0\dppty0\dpptx1716\dppty0\dpptx1716\dppty947\dpptx0\dppty947\dpx933\dpy5659\dpxsize1716\dpysize947
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2193\shptop4776\shpright3409\shpbottom5514\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz97\shplid1152{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 3997696}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1152}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}
+{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \s27\qc\widctlpar\adjustright \f1\fs16\cgrid {\f0 S5
+\par Sig. Mode Established
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8289\dptxbx{\dptxbxtext\pard\plain \s27\qc\widctlpar\adjustright \f1\fs16\cgrid {\f0 S5
+\par Sig. Mode Established
+\par }}\dpx2193\dpy4776\dpxsize1216\dpysize738\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2288\shptop4742\shpright3455\shpbottom5498\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz96\shplid1153{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}
+{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8288\dpellipse
+\dpx2288\dpy4742\dpxsize1167\dpysize756\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2373\shptop4721\shpright3504\shpbottom5498\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz95\shplid1154{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}
+{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8287\dpellipse
+\dpx2373\dpy4721\dpxsize1131\dpysize777\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft624\shptop4658\shpright1899\shpbottom5306\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz94\shplid1155{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 4063232}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1155}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {
+\fs16\lang1033 RR_REL_REQi,
+\par CHN RELEASEo,
+\par SACCH DE_ACTo
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8286\dptxbx{\dptxbxtext\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 RR_REL_REQi,
+\par CHN RELEASEo,
+\par SACCH DE_ACTo
+\par }}\dpx624\dpy4658\dpxsize1275\dpysize648\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft3264\shptop8035\shpright4389\shpbottom8441\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz93\shplid1156{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 4128768}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1156}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \s27\qr\widctlpar\adjustright \f1\fs16\cgrid {\f0
+CHN MOD MODIFY ACKi,
+\par }\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8285\dptxbx{\dptxbxtext\pard\plain \s27\qr\widctlpar\adjustright \f1\fs16\cgrid {\f0 CHN MOD MODIFY ACKi,
+\par }\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+\par }}\dpx3264\dpy8035\dpxsize1125\dpysize406\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft5049\shptop-53\shpright5544\shpbottom353\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz91\shplid1157{\sp{\sn shapeType}{\sv 19}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8283\dppolygon\dppolycount33\dpptx0\dppty0
+\dpptx25\dppty1\dpptx51\dppty2\dpptx75\dppty5\dpptx100\dppty8\dpptx124\dppty13\dpptx147\dppty18\dpptx170\dppty25\dpptx192\dppty32\dpptx215\dppty40\dpptx236\dppty49\dpptx257\dppty59\dpptx276\dppty70\dpptx296\dppty81\dpptx315\dppty93\dpptx333\dppty105
+\dpptx350\dppty119\dpptx367\dppty133\dpptx382\dppty148\dpptx397\dppty163\dpptx410\dppty179\dpptx424\dppty196\dpptx436\dppty212\dpptx446\dppty230\dpptx456\dppty248\dpptx465\dppty266\dpptx473\dppty285\dpptx479\dppty305\dpptx485\dppty324\dpptx489\dppty344
+\dpptx493\dppty364\dpptx494\dppty385\dpptx495\dppty406\dpx5049\dpy-53\dpxsize495\dpysize406\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft4906\shptop1104\shpright5049\shpbottom2137\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz90\shplid1158{\sp{\sn shapeType}{\sv 19}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 1}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8282\dppolygon\dppolycount33\dpptx0\dppty0
+\dpptx7\dppty2\dpptx15\dppty5\dpptx22\dppty12\dpptx29\dppty21\dpptx36\dppty33\dpptx43\dppty46\dpptx49\dppty63\dpptx56\dppty81\dpptx62\dppty102\dpptx68\dppty126\dpptx74\dppty150\dpptx80\dppty177\dpptx86\dppty205\dpptx91\dppty236\dpptx96\dppty268
+\dpptx101\dppty302\dpptx106\dppty339\dpptx110\dppty377\dpptx115\dppty415\dpptx119\dppty456\dpptx122\dppty498\dpptx126\dppty540\dpptx129\dppty585\dpptx132\dppty631\dpptx134\dppty678\dpptx137\dppty726\dpptx138\dppty775\dpptx140\dppty825\dpptx141\dppty876
+\dpptx142\dppty927\dpptx143\dppty980\dpptx143\dppty1033\dpx4906\dpy1104\dpxsize143\dpysize1033\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2679\shptop3852\shpright3684\shpbottom4145\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz89\shplid1159{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 4194304}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1159}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+DL_EST_INDi
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8281\dptxbx{\dptxbxtext\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 DL_EST_INDi
+\par }}\dpx2679\dpy3852\dpxsize1005\dpysize293\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft1809\shptop3633\shpright2844\shpbottom4753\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz88\shplid1160{\sp{\sn shapeType}{\sv 19}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8280\dppolygon\dppolycount33\dpptx0\dppty0
+\dpptx53\dppty2\dpptx106\dppty5\dpptx157\dppty13\dpptx209\dppty23\dpptx258\dppty36\dpptx308\dppty50\dpptx356\dppty68\dpptx402\dppty88\dpptx449\dppty111\dpptx493\dppty136\dpptx537\dppty163\dpptx578\dppty192\dpptx619\dppty222\dpptx659\dppty256
+\dpptx696\dppty290\dpptx732\dppty328\dpptx767\dppty367\dpptx798\dppty409\dpptx830\dppty450\dpptx858\dppty495\dpptx886\dppty539\dpptx911\dppty586\dpptx932\dppty634\dpptx954\dppty685\dpptx972\dppty735\dpptx989\dppty787\dpptx1002\dppty840\dpptx1013\dppty894
+\dpptx1023\dppty950\dpptx1030\dppty1005\dpptx1033\dppty1063\dpptx1035\dppty1120\dpx1809\dpy3633\dpxsize1035\dpysize1120
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft1473\shptop2429\shpright2433\shpbottom2860\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz87\shplid1161{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 4259840}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1161}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+TIME_OUTi ,
+\par ERR_LOGo
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8279\dptxbx{\dptxbxtext\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 TIME_OUTi ,
+\par ERR_LOGo
+\par }}\dpx1473\dpy2429\dpxsize960\dpysize431\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft558\shptop3137\shpright1679\shpbottom3925\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz86\shplid1162{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 4325376}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1162}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}
+{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \s27\qc\widctlpar\adjustright \f1\fs16\cgrid {\f0 S3
+\par Sig. Chn
+\par Activated
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8278\dptxbx{\dptxbxtext\pard\plain \s27\qc\widctlpar\adjustright \f1\fs16\cgrid {\f0 S3
+\par Sig. Chn
+\par Activated
+\par }}\dpx558\dpy3137\dpxsize1121\dpysize788\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft637\shptop3113\shpright1755\shpbottom3907\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz85\shplid1163{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}
+{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8277\dpellipse
+\dpx637\dpy3113\dpxsize1118\dpysize794\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft709\shptop3084\shpright1824\shpbottom3892\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz84\shplid1164{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}
+{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8276\dpellipse
+\dpx709\dpy3084\dpxsize1115\dpysize808\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft1899\shptop-226\shpright3024\shpbottom268\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz83\shplid1165{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 1320}}{\sp{\sn geoBottom}{\sv 345}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;13
+;(0,0);(105,51);(210,103);(300,135);(390,167);(393,180);(540,195);(687,210);(1055,200);(1185,225);(1315,250);(1298,328);(1320,345)}}{\sp{\sn pSegmentInfo}{\sv 2;11;16384;44288;8193;44288;8193;44288
+;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}{\sp{\sn lineFillWidth}{\sv 0}}
+{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn lineEndCapStyle}{\sv 2}}
+{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}{\sp{\sn shadowHighlight}{\sv 13355979}}
+{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}{\sp{\sn shadowSecondOffsetY}{\sv 0}}
+{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}{\sp{\sn shadowPerspectiveY}{\sv 0}}
+{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn c3DSpecularAmt}{\sv 0}}{\sp{\sn c3DDiffuseAmt}{\sv 65536}}{\sp{\sn c3DShininess}{\sv 5}}
+{\sp{\sn c3DEdgeThickness}{\sv 12700}}{\sp{\sn c3DExtrudeForward}{\sv 0}}{\sp{\sn c3DExtrudeBackward}{\sv 457200}}{\sp{\sn c3DExtrudePlane}{\sv 0}}{\sp{\sn c3DExtrusionColor}{\sv 268435703}}{\sp{\sn c3DCrMod}{\sv 536870912}}
+{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn c3DYRotationAngle}{\sv 0}}{\sp{\sn c3DXRotationAngle}{\sv 0}}{\sp{\sn c3DRotationAxisX}{\sv 100}}
+{\sp{\sn c3DRotationAxisY}{\sv 0}}{\sp{\sn c3DRotationAxisZ}{\sv 0}}{\sp{\sn c3DRotationAngle}{\sv 0}}{\sp{\sn c3DRotationCenterX}{\sv 0}}{\sp{\sn c3DRotationCenterY}{\sv 0}}{\sp{\sn c3DRotationCenterZ}{\sv 0}}
+{\sp{\sn c3DRenderMode}{\sv 0}}{\sp{\sn c3DTolerance}{\sv 30000}}{\sp{\sn c3DXViewpoint}{\sv 1250000}}{\sp{\sn c3DYViewpoint}{\sv -1250000}}{\sp{\sn c3DZViewpoint}{\sv 9000000}}{\sp{\sn c3DOriginX}{\sv 32768}}
+{\sp{\sn c3DOriginY}{\sv -32768}}{\sp{\sn c3DSkewAngle}{\sv -8847360}}{\sp{\sn c3DSkewAmount}{\sv 50}}{\sp{\sn c3DAmbientIntensity}{\sv 20000}}{\sp{\sn c3DKeyX}{\sv 50000}}{\sp{\sn c3DKeyY}{\sv 0}}{\sp{\sn c3DKeyZ}{\sv 10000}}
+{\sp{\sn c3DKeyIntensity}{\sv 38000}}{\sp{\sn c3DFillX}{\sv -50000}}{\sp{\sn c3DFillY}{\sv 0}}{\sp{\sn c3DFillZ}{\sv 10000}}{\sp{\sn c3DFillIntensity}{\sv 38000}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}
+{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}
+{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}
+{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8275\dppolygon\dppolycount46\dpptx0\dppty0\dpptx66\dppty54\dpptx101\dppty80
+\dpptx133\dppty107\dpptx164\dppty132\dpptx196\dppty153\dpptx227\dppty175\dpptx256\dppty193\dpptx280\dppty209\dpptx303\dppty223\dpptx320\dppty235\dpptx340\dppty245\dpptx360\dppty253\dpptx385\dppty262\dpptx401\dppty266\dpptx418\dppty271\dpptx437\dppty275
+\dpptx459\dppty278\dpptx484\dppty282\dpptx515\dppty285\dpptx547\dppty286\dpptx583\dppty289\dpptx621\dppty291\dpptx659\dppty292\dpptx740\dppty294\dpptx819\dppty298\dpptx858\dppty299\dpptx895\dppty302\dpptx929\dppty306\dpptx960\dppty309\dpptx986\dppty315
+\dpptx1010\dppty321\dpptx1030\dppty329\dpptx1046\dppty338\dpptx1060\dppty348\dpptx1071\dppty359\dpptx1082\dppty372\dpptx1089\dppty385\dpptx1102\dppty411\dpptx1109\dppty437\dpptx1112\dppty450\dpptx1114\dppty461\dpptx1116\dppty470\dpptx1120\dppty480
+\dpptx1122\dppty487\dpptx1125\dppty493\dpx1899\dpy-226\dpxsize1125\dpysize494\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft1314\shptop671\shpright2454\shpbottom1078\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz82\shplid1166{\sp{\sn shapeType}{\sv 19}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 1}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8274\dppolygon\dppolycount33\dpptx0\dppty0
+\dpptx58\dppty1\dpptx117\dppty2\dpptx173\dppty5\dpptx230\dppty8\dpptx285\dppty13\dpptx339\dppty18\dpptx392\dppty25\dpptx443\dppty32\dpptx494\dppty40\dpptx544\dppty49\dpptx591\dppty59\dpptx637\dppty70\dpptx682\dppty81\dpptx726\dppty93\dpptx766\dppty105
+\dpptx806\dppty119\dpptx844\dppty133\dpptx879\dppty148\dpptx914\dppty163\dpptx945\dppty180\dpptx976\dppty196\dpptx1003\dppty213\dpptx1027\dppty231\dpptx1051\dppty249\dpptx1071\dppty267\dpptx1089\dppty286\dpptx1104\dppty305\dpptx1116\dppty325
+\dpptx1127\dppty345\dpptx1135\dppty365\dpptx1138\dppty386\dpptx1140\dppty407\dpx1314\dpy671\dpxsize1140\dpysize407\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft1209\shptop542\shpright2454\shpbottom982\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz81\shplid1167{\sp{\sn shapeType}{\sv 19}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8273\dppolygon\dppolycount33\dpptx0\dppty0
+\dpptx64\dppty1\dpptx127\dppty2\dpptx189\dppty5\dpptx251\dppty9\dpptx311\dppty14\dpptx371\dppty20\dpptx428\dppty27\dpptx484\dppty34\dpptx540\dppty44\dpptx594\dppty54\dpptx645\dppty64\dpptx695\dppty75\dpptx745\dppty87\dpptx793\dppty101\dpptx837\dppty114
+\dpptx880\dppty129\dpptx922\dppty144\dpptx960\dppty161\dpptx998\dppty177\dpptx1032\dppty194\dpptx1066\dppty212\dpptx1096\dppty230\dpptx1121\dppty249\dpptx1147\dppty269\dpptx1169\dppty289\dpptx1189\dppty309\dpptx1205\dppty330\dpptx1219\dppty351
+\dpptx1231\dppty373\dpptx1239\dppty395\dpptx1243\dppty417\dpptx1245\dppty440\dpx1209\dpy542\dpxsize1245\dpysize440\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft483\shptop885\shpright1341\shpbottom1678\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz80\shplid1168{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 4390912}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1168}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}
+{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \s27\qc\widctlpar\adjustright \f1\fs16\cgrid {\f0 S12
+\par RM Down
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8272\dptxbx{\dptxbxtext\pard\plain \s27\qc\widctlpar\adjustright \f1\fs16\cgrid {\f0 S12
+\par RM Down
+\par }}\dpx483\dpy885\dpxsize858\dpysize793\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5169\shptop1136\shpright5342\shpbottom2176\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz79\shplid1169{\sp{\sn shapeType}{\sv 19}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8271\dppolygon\dppolycount33\dpptx0\dppty0
+\dpptx9\dppty2\dpptx18\dppty5\dpptx26\dppty12\dpptx35\dppty22\dpptx43\dppty33\dpptx51\dppty47\dpptx60\dppty63\dpptx67\dppty82\dpptx75\dppty103\dpptx82\dppty126\dpptx90\dppty151\dpptx97\dppty178\dpptx104\dppty206\dpptx110\dppty238\dpptx116\dppty270
+\dpptx122\dppty304\dpptx128\dppty341\dpptx133\dppty379\dpptx139\dppty418\dpptx143\dppty459\dpptx148\dppty501\dpptx152\dppty544\dpptx156\dppty589\dpptx159\dppty636\dpptx162\dppty682\dpptx165\dppty731\dpptx167\dppty780\dpptx169\dppty830\dpptx171\dppty882
+\dpptx172\dppty933\dpptx173\dppty987\dpptx173\dppty1040\dpx5169\dpy1136\dpxsize173\dpysize1040\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft4338\shptop2236\shpright5809\shpbottom3029\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz78\shplid1170{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 4456448}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1170}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}
+{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \s27\qc\widctlpar\adjustright \f1\fs16\cgrid {\f0 S2
+\par Activating Sig/Traffic Chn
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8270\dptxbx{\dptxbxtext\pard\plain \s27\qc\widctlpar\adjustright \f1\fs16\cgrid {\f0 S2
+\par Activating Sig/Traffic Chn
+\par }}\dpx4338\dpy2236\dpxsize1471\dpysize793\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft4442\shptop2184\shpright5874\shpbottom3012\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz77\shplid1171{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}
+{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8269\dpellipse
+\dpx4442\dpy2184\dpxsize1432\dpysize828\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft4537\shptop2165\shpright5979\shpbottom2967\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz76\shplid1172{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}
+{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8268\dpellipse
+\dpx4537\dpy2165\dpxsize1442\dpysize802\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft3519\shptop584\shpright4569\shpbottom649\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz75\shplid1173{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}
+{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8267\dpline\dpptx0\dppty0\dpptx1050\dppty65
+\dpx3519\dpy584\dpxsize1050\dpysize65\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft2448\shptop264\shpright3516\shpbottom1013\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz74\shplid1174
+{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn lTxid}{\sv 4521984}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1174}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}
+{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \qc\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 S0
+
+\par Initializing RM
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8266\dptxbx{\dptxbxtext\pard\plain \qc\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 S0
+\par Initializing RM
+\par }}\dpx2448\dpy264\dpxsize1068\dpysize749\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft4548\shptop323\shpright5601\shpbottom1129\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz73\shplid1175{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 4587520}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1175}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}
+{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \qc\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 S1
+
+\par RM Running
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8265\dptxbx{\dptxbxtext\pard\plain \qc\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 S1
+\par RM Running
+\par }}\dpx4548\dpy323\dpxsize1053\dpysize806\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2409\shptop-234\shpright2784\shpbottom60\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz72\shplid1176{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 4653056}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1176}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+INITi
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8264\dptxbx{\dptxbxtext\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 INITi
+\par }}\dpx2409\dpy-234\dpxsize375\dpysize294\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft3639\shptop345\shpright4374\shpbottom661\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz71\shplid1177{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 4718592}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1177}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+INIT_OKo
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8263\dptxbx{\dptxbxtext\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 INIT_OKo
+\par }}\dpx3639\dpy345\dpxsize735\dpysize316\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft6699\shptop525\shpright7824\shpbottom819\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz70\shplid1178{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 4784128}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1178}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+PAGEi, PAGEo
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8262\dptxbx{\dptxbxtext\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 PAGEi, PAGEo
+\par }}\dpx6699\dpy525\dpxsize1125\dpysize294\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft5319\shptop1273\shpright6879\shpbottom1782\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz69\shplid1179{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 4849664}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1179}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+CHN_REQi||HO_REQi CHN_ACTo
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8261\dptxbx{\dptxbxtext\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 CHN_REQi||HO_REQi CHN_ACTo
+\par }}\dpx5319\dpy1273\dpxsize1560\dpysize509\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft1089\shptop110\shpright1914\shpbottom618\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz68\shplid1180{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 4915200}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1180}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \s27\widctlpar\adjustright \f1\fs16\cgrid {\f0 ERR_RPTo,
+
+\par }\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 INIT_KOo
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8260\dptxbx{\dptxbxtext\pard\plain \s27\widctlpar\adjustright \f1\fs16\cgrid {\f0 ERR_RPTo,
+\par }\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 INIT_KOo
+\par }}\dpx1089\dpy110\dpxsize825\dpysize508\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft1884\shptop-427\shpright2027\shpbottom-69\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz67\shplid1181{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 4980736}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1181}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs24\lang1033
+{\field{\*\fldinst SYMBOL 183 \\f "Symbol" \\s 12}{\fldrslt\f3\fs24}}}{\fs24\lang1033
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8259\dptxbx{\dptxbxtext\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs24\lang1033 {\field{\*\fldinst SYMBOL 183 \\f "Symbol" \\s 12}{\fldrslt\f3\fs24}}}{\fs24\lang1033
+\par }}\dpx1884\dpy-427\dpxsize143\dpysize358\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft2754\shptop2981\shpright4014\shpbottom3434\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz66\shplid1182{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 5046272}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1182}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \qc\widctlpar\adjustright \fs20\lang2057\cgrid {
+\fs16\lang1033 CHN_ACT_ACKi,
+\par IMM_ASSIGNo
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8258\dptxbx{\dptxbxtext\pard\plain \qc\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 CHN_ACT_ACKi,
+\par IMM_ASSIGNo
+\par }}\dpx2754\dpy2981\dpxsize1260\dpysize453\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft3579\shptop1352\shpright4884\shpbottom2118\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz65\shplid1183{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 5111808}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1183}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {
+\fs16\lang1033 TIME_OUTi || CHN_ACT_NAKi,
+\par ERR_LOGo
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8257\dptxbx{\dptxbxtext\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 TIME_OUTi || CHN_ACT_NAKi,
+\par ERR_LOGo
+\par }}\dpx3579\dpy1352\dpxsize1305\dpysize766\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft1644\shptop1052\shpright2049\shpbottom1346\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz64\shplid1184{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 5177344}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1184}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+INITi
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8256\dptxbx{\dptxbxtext\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 INITi
+\par }}\dpx1644\dpy1052\dpxsize405\dpysize294\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft6024\shptop2244\shpright7284\shpbottom2496\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz63\shplid1185{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 5242880}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1185}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+CHN_ACT_ACKi
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8255\dptxbx{\dptxbxtext\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 CHN_ACT_ACKi
+\par }}\dpx6024\dpy2244\dpxsize1260\dpysize252\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft5064\shptop3444\shpright6504\shpbottom3862\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz62\shplid1186{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 5308416}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1186}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {
+\fs16\lang1033 HO_ACCESSi,
+\par PHYSICAL_INFOo
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8254\dptxbx{\dptxbxtext\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 HO_ACCESSi,
+\par PHYSICAL_INFOo
+\par }}\dpx5064\dpy3444\dpxsize1440\dpysize418\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft5484\shptop4101\shpright7149\shpbottom4758\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz61\shplid1187{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 5373952}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1187}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \s27\qr\widctlpar\adjustright \f1\fs16\cgrid {\f0
+TIME_OUTi, ||
+\par HO_FAILi, HO_FAILo,
+\par }\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 CHN RELEASEo
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8253\dptxbx{\dptxbxtext\pard\plain \s27\qr\widctlpar\adjustright \f1\fs16\cgrid {\f0 TIME_OUTi, ||
+\par HO_FAILi, HO_FAILo,
+\par }\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 CHN RELEASEo
+\par }}\dpx5484\dpy4101\dpxsize1665\dpysize657\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}}{
+\par }\pard \sb60\sa60\widctlpar\adjustright {
+\par }\pard \qj\sb60\sa60\widctlpar\adjustright {
+\par }{\lang1024 {\shp{\*\shpinst\shpleft2184\shptop165\shpright2754\shpbottom361\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz60\shplid1188{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 5439488}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1188}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {
+\fs16\lang1033 RESETi
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8252\dptxbx{\dptxbxtext\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 RESETi
+\par }}\dpx2184\dpy165\dpxsize570\dpysize196\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}}{
+\par
+\par
+\par }\pard\plain \s42\qj\fi-1080\li1080\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par }{\lang1024 {\shp{\*\shpinst\shpleft3729\shptop5\shpright5319\shpbottom428\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz109\shplid1189{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 5505024}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1189}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {
+\fs16\lang1033 MOD MODIFY ACKi,
+\par CHN MOD MODIFYo
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8301\dptxbx{\dptxbxtext\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 MOD MODIFY ACKi,
+\par CHN MOD MODIFYo
+\par }}\dpx3729\dpy5\dpxsize1590\dpysize423\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}}{
+\par }{\lang1024 {\shp{\*\shpinst\shpleft2445\shptop269\shpright2685\shpbottom644\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz152\shplid1190{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 240}}{\sp{\sn geoBottom}{\sv 375}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;7
+;(0,0);(62,6);(125,12);(165,75);(205,138);(222,256);(240,375)}}{\sp{\sn pSegmentInfo}{\sv 2;7;16384;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}
+{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}{\sp{\sn lineFillWidth}{\sv 0}}{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}
+{\sp{\sn lineWidth}{\sv 9525}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}{\sp{\sn lineStartArrowhead}{\sv 1}}{\sp{\sn lineEndCapStyle}{\sv 2}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}
+{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}
+{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}
+{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}
+{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}
+{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}{\sp{\sn dyWrapDistBottom}{\sv 0}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8344\dppolygon\dppolycount27\dpptx0\dppty0\dpptx23\dppty2\dpptx46\dppty5\dpptx69\dppty10\dpptx79\dppty13
+\dpptx90\dppty16\dpptx101\dppty20\dpptx111\dppty25\dpptx121\dppty31\dpptx131\dppty38\dpptx140\dppty45\dpptx148\dppty54\dpptx157\dppty64\dpptx164\dppty75\dpptx172\dppty88\dpptx178\dppty101\dpptx185\dppty116\dpptx190\dppty131\dpptx196\dppty148
+\dpptx201\dppty166\dpptx205\dppty184\dpptx210\dppty203\dpptx214\dppty223\dpptx218\dppty244\dpptx225\dppty286\dpptx232\dppty329\dpptx239\dppty374\dpx2445\dpy269\dpxsize240\dpysize375
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5109\shptop17\shpright5484\shpbottom683\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz108\shplid1191{\sp{\sn shapeType}{\sv 19}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8300\dppolygon\dppolycount33\dpptx0\dppty0
+\dpptx19\dppty1\dpptx38\dppty3\dpptx57\dppty7\dpptx76\dppty14\dpptx94\dppty21\dpptx112\dppty30\dpptx129\dppty40\dpptx146\dppty52\dpptx163\dppty66\dpptx179\dppty81\dpptx194\dppty97\dpptx209\dppty114\dpptx224\dppty132\dpptx239\dppty152\dpptx252\dppty173
+\dpptx265\dppty195\dpptx278\dppty218\dpptx289\dppty243\dpptx301\dppty267\dpptx311\dppty294\dpptx321\dppty321\dpptx330\dppty348\dpptx338\dppty377\dpptx346\dppty407\dpptx352\dppty437\dpptx358\dppty468\dpptx363\dppty500\dpptx367\dppty532\dpptx371\dppty565
+\dpptx373\dppty598\dpptx374\dppty632\dpptx375\dppty666\dpx5109\dpy17\dpxsize375\dpysize666\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}}{
+\par }{\lang1024 {\shp{\*\shpinst\shpleft1419\shptop329\shpright2634\shpbottom1186\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz92\shplid1192{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 5570560}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1192}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \qj\widctlpar\adjustright \fs20\lang2057\cgrid {
+\fs16\lang1033 DL_REL_INDi ||
+\par DL_REL_CONi ||
+\par TIME_OUTi,
+\par RF CHN RELo
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8284\dptxbx{\dptxbxtext\pard\plain \qj\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 DL_REL_INDi ||
+\par DL_REL_CONi ||
+\par TIME_OUTi,
+\par RF CHN RELo
+\par }}\dpx1419\dpy329\dpxsize1215\dpysize857\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft1314\shptop128\shpright1457\shpbottom1313\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz120\shplid1193{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 75}}{\sp{\sn geoBottom}{\sv 900}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;7
+;(75,0);(58,60);(42,120);(30,270);(18,420);(5,795);(0,900)}}{\sp{\sn pSegmentInfo}{\sv 2;7;16384;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}{\sp{\sn lineCrMod}{\sv 536870912}}
+{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}{\sp{\sn lineFillWidth}{\sv 0}}{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}{\sp{\sn lineMiterLimit}{\sv 524288}}
+{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn lineEndCapStyle}{\sv 2}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}
+{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}
+{\sp{\sn shadowSecondOffsetX}{\sv 0}}{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}
+{\sp{\sn shadowPerspectiveX}{\sv 0}}{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}
+{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn c3DSpecularAmt}{\sv 0}}{\sp{\sn c3DDiffuseAmt}{\sv 65536}}{\sp{\sn c3DShininess}{\sv 5}}{\sp{\sn c3DEdgeThickness}{\sv 12700}}{\sp{\sn c3DExtrudeForward}{\sv 0}}
+{\sp{\sn c3DExtrudeBackward}{\sv 457200}}{\sp{\sn c3DExtrudePlane}{\sv 0}}{\sp{\sn c3DExtrusionColor}{\sv 268435703}}{\sp{\sn c3DCrMod}{\sv 536870912}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}
+{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn c3DYRotationAngle}{\sv 0}}{\sp{\sn c3DXRotationAngle}{\sv 0}}{\sp{\sn c3DRotationAxisX}{\sv 100}}{\sp{\sn c3DRotationAxisY}{\sv 0}}{\sp{\sn c3DRotationAxisZ}{\sv 0}}
+{\sp{\sn c3DRotationAngle}{\sv 0}}{\sp{\sn c3DRotationCenterX}{\sv 0}}{\sp{\sn c3DRotationCenterY}{\sv 0}}{\sp{\sn c3DRotationCenterZ}{\sv 0}}{\sp{\sn c3DRenderMode}{\sv 0}}{\sp{\sn c3DTolerance}{\sv 30000}}
+{\sp{\sn c3DXViewpoint}{\sv 1250000}}{\sp{\sn c3DYViewpoint}{\sv -1250000}}{\sp{\sn c3DZViewpoint}{\sv 9000000}}{\sp{\sn c3DOriginX}{\sv 32768}}{\sp{\sn c3DOriginY}{\sv -32768}}{\sp{\sn c3DSkewAngle}{\sv -8847360}}
+{\sp{\sn c3DSkewAmount}{\sv 50}}{\sp{\sn c3DAmbientIntensity}{\sv 20000}}{\sp{\sn c3DKeyX}{\sv 50000}}{\sp{\sn c3DKeyY}{\sv 0}}{\sp{\sn c3DKeyZ}{\sv 10000}}{\sp{\sn c3DKeyIntensity}{\sv 38000}}{\sp{\sn c3DFillX}{\sv -50000}}
+{\sp{\sn c3DFillY}{\sv 0}}{\sp{\sn c3DFillZ}{\sv 10000}}{\sp{\sn c3DFillIntensity}{\sv 38000}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}
+{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}
+{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}
+{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8312\dppolygon\dppolycount28\dpptx141\dppty0\dpptx130\dppty30\dpptx118\dppty61
+\dpptx107\dppty95\dpptx95\dppty133\dpptx84\dppty176\dpptx80\dppty201\dpptx74\dppty228\dpptx71\dppty255\dpptx65\dppty286\dpptx61\dppty319\dpptx57\dppty354\dpptx51\dppty395\dpptx48\dppty442\dpptx44\dppty492\dpptx40\dppty548\dpptx34\dppty607\dpptx31\dppty668
+\dpptx23\dppty790\dpptx19\dppty853\dpptx15\dppty912\dpptx13\dppty969\dpptx10\dppty1024\dpptx8\dppty1073\dpptx4\dppty1117\dpptx2\dppty1153\dpptx0\dppty1169\dpptx0\dppty1184\dpx1314\dpy128\dpxsize143\dpysize1185
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2580\shptop269\shpright2685\shpbottom3344\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz151\shplid1194{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 1}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}
+{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8343\dpline\dpptx105\dppty0\dpptx0\dppty3075
+\dpx2580\dpy269\dpxsize105\dpysize3075\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft4515\shptop310\shpright5954\shpbottom1125\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz106\shplid1195
+{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}
+{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8298\dpellipse\dpx4515\dpy310\dpxsize1439\dpysize815
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft4608\shptop269\shpright6024\shpbottom1125\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz105\shplid1196{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}
+{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8297\dpellipse
+\dpx4608\dpy269\dpxsize1416\dpysize856\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}}{
+\par }{\lang1024 {\shp{\*\shpinst\shpleft3024\shptop11\shpright4299\shpbottom778\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz115\shplid1197{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 5636096}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1197}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \s27\widctlpar\adjustright \f1\fs16\cgrid {\f0
+RR_REL_REQi || RSL_BREAKi;
+\par CHN RELEASEo,
+\par }\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 SACCH DE_ACTo
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8307\dptxbx{\dptxbxtext\pard\plain \s27\widctlpar\adjustright \f1\fs16\cgrid {\f0 RR_REL_REQi || RSL_BREAKi;
+\par CHN RELEASEo,
+\par }\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 SACCH DE_ACTo
+\par }}\dpx3024\dpy11\dpxsize1275\dpysize767\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft4413\shptop1\shpright5857\shpbottom782\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz107\shplid1198{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 5701632}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1198}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}
+{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \s27\qc\widctlpar\adjustright \f1\fs16\cgrid {\f0 S8
+\par Traffic Mode Activated
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8299\dptxbx{\dptxbxtext\pard\plain \s27\qc\widctlpar\adjustright \f1\fs16\cgrid {\f0 S8
+\par Traffic Mode Activated
+\par }}\dpx4413\dpy1\dpxsize1444\dpysize781\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}}{
+\par
+\par }{\lang1024 {\shp{\*\shpinst\shpleft4399\shptop71\shpright5044\shpbottom1107\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz113\shplid1199{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 1100}}{\sp{\sn geoBottom}{\sv 675}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;13
+;(1100,0);(962,82);(825,165);(695,210);(565,255);(427,238);(320,270);(213,302);(100,338);(50,405);(0,472);(10,573);(20,675)}}{\sp{\sn pSegmentInfo}{\sv 2;11;16384;44288;8193;44288;8193;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}
+{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}{\sp{\sn lineFillWidth}{\sv 0}}
+{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn lineEndCapStyle}{\sv 2}}
+{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}{\sp{\sn shadowHighlight}{\sv 13355979}}
+{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}{\sp{\sn shadowSecondOffsetY}{\sv 0}}
+{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}{\sp{\sn shadowPerspectiveY}{\sv 0}}
+{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn c3DSpecularAmt}{\sv 0}}{\sp{\sn c3DDiffuseAmt}{\sv 65536}}{\sp{\sn c3DShininess}{\sv 5}}
+{\sp{\sn c3DEdgeThickness}{\sv 12700}}{\sp{\sn c3DExtrudeForward}{\sv 0}}{\sp{\sn c3DExtrudeBackward}{\sv 457200}}{\sp{\sn c3DExtrudePlane}{\sv 0}}{\sp{\sn c3DExtrusionColor}{\sv 268435703}}{\sp{\sn c3DCrMod}{\sv 536870912}}
+{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}{\sp{\sn c3DYRotationAngle}{\sv 0}}{\sp{\sn c3DXRotationAngle}{\sv 0}}{\sp{\sn c3DRotationAxisX}{\sv 100}}
+{\sp{\sn c3DRotationAxisY}{\sv 0}}{\sp{\sn c3DRotationAxisZ}{\sv 0}}{\sp{\sn c3DRotationAngle}{\sv 0}}{\sp{\sn c3DRotationCenterX}{\sv 0}}{\sp{\sn c3DRotationCenterY}{\sv 0}}{\sp{\sn c3DRotationCenterZ}{\sv 0}}
+{\sp{\sn c3DRenderMode}{\sv 0}}{\sp{\sn c3DTolerance}{\sv 30000}}{\sp{\sn c3DXViewpoint}{\sv 1250000}}{\sp{\sn c3DYViewpoint}{\sv -1250000}}{\sp{\sn c3DZViewpoint}{\sv 9000000}}{\sp{\sn c3DOriginX}{\sv 32768}}
+{\sp{\sn c3DOriginY}{\sv -32768}}{\sp{\sn c3DSkewAngle}{\sv -8847360}}{\sp{\sn c3DSkewAmount}{\sv 50}}{\sp{\sn c3DAmbientIntensity}{\sv 20000}}{\sp{\sn c3DKeyX}{\sv 50000}}{\sp{\sn c3DKeyY}{\sv 0}}{\sp{\sn c3DKeyZ}{\sv 10000}}
+{\sp{\sn c3DKeyIntensity}{\sv 38000}}{\sp{\sn c3DFillX}{\sv -50000}}{\sp{\sn c3DFillY}{\sv 0}}{\sp{\sn c3DFillZ}{\sv 10000}}{\sp{\sn c3DFillIntensity}{\sv 38000}}{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}
+{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}
+{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}
+{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8305\dppolygon\dppolycount33\dpptx644\dppty0\dpptx584\dppty95\dpptx554\dppty140
+\dpptx524\dppty183\dpptx494\dppty224\dpptx466\dppty261\dpptx436\dppty293\dpptx408\dppty322\dpptx393\dppty333\dpptx379\dppty344\dpptx364\dppty351\dpptx350\dppty358\dpptx321\dppty368\dpptx292\dppty376\dpptx264\dppty381\dpptx237\dppty390\dpptx212\dppty399
+\dpptx199\dppty407\dpptx188\dppty414\dpptx140\dppty453\dpptx118\dppty474\dpptx96\dppty497\dpptx75\dppty523\dpptx58\dppty553\dpptx41\dppty583\dpptx29\dppty620\dpptx19\dppty662\dpptx13\dppty706\dpptx9\dppty755\dpptx7\dppty807\dpptx7\dppty863\dpptx8\dppty918
+\dpptx11\dppty1034\dpx4399\dpy71\dpxsize645\dpysize1036\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5169\shptop343\shpright6099\shpbottom783\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz114\shplid1200{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 5767168}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1200}}{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}
+{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt \pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {
+\fs16\lang1033 TIME OUTi,
+\par ERR_LOGo
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8306\dptxbx{\dptxbxtext\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 TIME OUTi,
+\par ERR_LOGo
+\par }}\dpx5169\dpy343\dpxsize930\dpysize440\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}
+{\shp{\*\shpinst\shpleft5109\shptop249\shpright6114\shpbottom249\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz116\shplid1201{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 1}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn f3D}{\sv 0}}{\sp{\sn fc3DMetallic}{\sv 0}}{\sp{\sn fc3DUseExtrusionColor}{\sv 0}}{\sp{\sn fc3DLightFace}{\sv 1}}
+{\sp{\sn fc3DConstrainRotation}{\sv 1}}{\sp{\sn fc3DRotationCenterAuto}{\sv 0}}{\sp{\sn fc3DParallel}{\sv 1}}{\sp{\sn fc3DKeyHarsh}{\sv 1}}{\sp{\sn fc3DFillHarsh}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8308\dpline\dpptx1005\dppty0\dpptx0\dppty0
+\dpx5109\dpy249\dpxsize1005\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft5114\shptop66\shpright5114\shpbottom276\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz138\shplid1202
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}
+{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}
+{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8330\dpline\dpptx0\dppty0\dpptx0\dppty210\dpx5114\dpy66\dpxsize0\dpysize210\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}}{
+\par
+\par
+\par
+\par
+\par
+\par }\pard\plain \s40\qc\sb60\sa60\widctlpar\adjustright \b\fs20\lang2057\cgrid {\lang1024 {\shp{\*\shpinst\shpleft1209\shptop131\shpright2544\shpbottom721\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz121\shplid1203
+{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn lTxid}{\sv 5832704}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1203}}
+{\sp{\sn fillType}{\sv 7}}{\sp{\sn fillBackColor}{\sv 268436208}}{\sp{\sn fillFocus}{\sv 100}}{\sp{\sn fillShadeType}{\sv 1073741835}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fillShape}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn lidRegroup}{\sv 34}}{\shptxt
+\pard\plain \s27\qr\widctlpar\adjustright \f1\fs16\cgrid {\f0 HO_COMi
+\par DL_REL_REQo
+\par SACCH DE_ACTo
+\par }\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8313\dptxbx{\dptxbxtext\pard\plain \s27\qr\widctlpar\adjustright \f1\fs16\cgrid {\f0 HO_COMi
+\par DL_REL_REQo
+\par SACCH DE_ACTo
+\par }\pard\plain \qr\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033
+\par }}\dpx1209\dpy131\dpxsize1335\dpysize590\dpfillfgcr240\dpfillfgcg2\dpfillfgcb0\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat8\dplinehollow}}}}{
+\par
+\par
+\par
+\par
+\par Figure }{\field{\*\fldinst { STYLEREF 1 \\s }}{\fldrslt {\lang1024 2}}}{\_2 Module RM State Transition Diagram
+\par }\pard\plain \qj\fi-900\li1260\sb60\sa60\widctlpar\pnrnot1\adjustright \fs20\lang2057\cgrid {\b\i\revised\revauth1\revdttm1714043723\crauth1\crdate1714043728 TBD Note: }{\i\revised\revauth1\revdttm1714043723\crauth1\crdate1714043728
+Since phase-2 MS are required to support three of the four handover cases, i.e. excluding the Pseudo-sync case, it means that PocketBTS in support of one of the three handover cases can work functionally }{
+\i\revised\revauth1\revdttm1714043727\crauth1\crdate1714043728 if a }{\i\revised\revauth1\revdttm1714043723\crauth1\crdate1714043728 handover is required. Reviewers please confirm whether PocketBTS needs to support }{
+\i\revised\revauth1\revdttm1714043728\crauth1\crdate1714043728 three or all of the four handover cases.}{\i\revised\revauth1\revdttm1714043928 Linked to Ian\rquote s comment 1, Appendix A.
+\par {\pntext\pard\plain\f3\fs20\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \qj\fi-360\li360\sb60\sa60\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls107\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls107\adjustright {
+OACSU is not supported. This assumption is in compliance with [1]\emdash PocketBTS Software Architecture. In other words, during the RR Immediate Assignment Procedure stage, SDCCH4 will be assigned to LUP and TCH/F to both MOC and MTC.
+\par }\pard \qj\fi-990\li990\sb60\sa60\widctlpar\adjustright {\b\i\revised\revauth1\revdttm1714043923\crauth1\crdate1714043923 TBD Note:}{\i\revised\revauth1\revdttm1714043923 It is assumed that the follow-on feature will be totally handled by the MM module.}
+{\i\revised\revauth1\revdttm1714043924 It is actually not made visible in Figure 2-2. }{\i\revised\revauth1\revdttm1714043718\crauth1\crdate1714043923 If an MS sent a MM message enclosing a follow-on }{
+\i\revised\revauth1\revdttm1714043721\crauth1\crdate1714043923 request}{\i\revised\revauth1\revdttm1714043718\crauth1\crdate1714043923 , the MM module will not indicate a }{\i\revised\revauth1\revdttm1714043721\crauth1\crdate1714043923 corresponding }{
+\i\revised\revauth1\revdttm1714043718\crauth1\crdate1714043923 follow-on}{\i\revised\revauth1\revdttm1714043721\crauth1\crdate1714043923 indication}{\i\revised\revauth1\revdttm1714043718\crauth1\crdate1714043923 to the established MM connection a}{
+\i\revised\revauth1\revdttm1714043721\crauth1\crdate1714043923 nd hence should not send RR_REL_REQ to the RM module, refer to}{\i\revised\revauth1\revdttm1714043722\crauth1\crdate1714043923 the}{
+\i\revised\revauth1\revdttm1714043721\crauth1\crdate1714043923 S5 state.}{\i\revised\revauth1\revdttm1714043925 Link}{\i\revised\revauth1\revdttm1714043927 ed}{\i\revised\revauth1\revdttm1714043925 to Ian}{\i\revised\revauth1\revdttm1714043927 \rquote
+s comment 4, Appendix A.}{\i\revised\revauth1\revdttm1714043950
+\par }\pard \qj\fi-990\li990\sb60\sa60\widctlpar\pnrnot1\adjustright {\b\i\revised\revauth1\revdttm1714043950\crauth1\crdate1714043971 TBD Note:}{\i\revised\revauth1\revdttm1714043950
+ Regarding Figure 2-2, Bhava suggested that the STD be separated into two SMs, one containing S1, S2 and S12, the other embodying the rest. }{\i\revised\revauth1\revdttm1714043952 The former SM handles }{\i\revised\revauth1\revdttm1714043953
+non-air-through }{\i\revised\revauth1\revdttm1714043952 message}{\i\revised\revauth1\revdttm1714043953 s }{\i\revised\revauth1\revdttm1714043954 like TRX configuration, Slot Activate, etc, the other deals
+ with Um messages. It is also realised that two task-structure may be used in the RM module. One goes with one SM. }{\i\revised\revauth1\revdttm1714043957 Some performance improvement is considered such as the Um-message related SM may}{
+\i\revised\revauth1\revdttm1714043963 }{\i\revised\revauth1\revdttm1714043957 proceed with the assumption that the other SM will succeed in doing BTS-internal mode change.}{\i\revised\revauth1\revdttm1714043961 }{\i\revised\revauth1\revdttm1714043968
+
+\par }\pard \qj\li990\sb60\sa60\widctlpar\pnrnot1\adjustright {\i\revised\revauth1\revdttm1714043968 Action}{\i\revised\revauth1\revdttm1714043969 s}{\i\revised\revauth1\revdttm1714043968 : }{\i\revised\revauth1\revdttm1714043961
+The RM control flow will be driven in terms of }{\i\revised\revauth1\revdttm1714043962 the }{\i\revised\revauth1\revdttm1714043961 two}{\i\revised\revauth1\revdttm1714043962 -}{\i\revised\revauth1\revdttm1714043961
+SM framework as implied in Code 2-1 with attention put to reduce the interaction between the two SMs.}{\i\revised\revauth1\revdttm1714043963 The one-task running choice will be }{\i\revised\revauth1\revdttm1714043968 selected as sugges
+ted in [1]-PocketBTS Software Architecture for the PocketBTS Pre-Alpha Release but }{\i\revised\revauth1\revdttm1714043969 the RM design will be made adaptable to this possible two-task structure also considering Ian}{
+\i\revised\revauth1\revdttm1714043970 \rquote s comment 11, Appendix A.}{\i\revised\revauth1\revdttm1714043717\crauth1\crdate1714043923
+\par }\pard \qj\widctlpar\adjustright {
+\par {\*\bkmkstart _Toc432248054}{\listtext\pard\plain\s2 \b\i\f1\lang2057\cgrid \hich\af1\dbch\af0\loch\f1 2.3\tab}}\pard\plain \s2\sa60\keepn\widctlpar\ls1\ilvl1\outlinelevel1\adjustright \b\lang2057\cgrid {\i\f1 High-Level Decomposition
+{\*\bkmkend _Toc432248054}
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+This design adopts the state-centred logic organisation to decompose the RM module to a series of sub-modules. The following sub-modules are thus fallen off the STD shown in Figure 2-2 naturally.
+\par With reference to the STD depicted in Figure 2-2:
+\par }{\ul Sub-module: RM_IntializingRM
+\par }\pard\plain \s56\qj\li1080\sb60\sa60\widctlpar\tx1080\adjustright \i\fs20\lang2057\cgrid {\i0 This sub-module corresponds to the S0 Initialising RM state.
+\par This sub-module retrieves the TRX/Time-Slot channel configuration data from the SNMP MIB Controller and then accordingly commands the DSP hardware via MPH I/F into th
+is channel configuration. Broadcast information on BCCH i.e. SYSTEM INFORMATION messages used is part of the configuration data retrieved from the SNMP MIB Controller.
+\par This sub-module usually comes to play at the very beginning each time RM module is started or re-restarted. But it may function half way once RM is notified of any change in the channel configuration.
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\ul Sub-module: RM_RMRunning
+\par }\pard \qj\li1080\sb60\sa60\widctlpar\adjustright {This sub-module corresponds to the S1 RM Running state.
+\par }\pard\plain \s56\qj\li1080\sb60\sa60\widctlpar\adjustright \i\fs20\lang2057\cgrid {\i0 This sub-module groups all the processing logic of the messag
+es arriving at the S1 RM Running state. The messages consist of OA&M Reset (RESETi), MM Page Request (PAGEi), MM Handover Request (HO_REQi) and mobile Channel Request (CHN_REQi).
+\par The processing logic will result in sending of relevant messages to other modules such as LAPDm, MM, DSP Interface Driver as well as the OA&M module for report of some error situations encountered during of the RM operation.
+\par Any time the OA&M function may send a reset command (RESETi) to module RM. RESETi is captured first by this sub-module which then disables itself and enters the S13 RM Down state.
+\par For each PAGEi arriving at the S1 RM Running state, sub-module RM_RMRunning
+sends down a page request (PAGEo) via DL_UNIT_DATA_REQ and at the same time remember the association between the paged mobile exactly IMSI and the assigned MCSM. MCSM is sent over from MM as parameter of PAGEi.
+\par For any channel request (CHN_REQi) received from mobiles, RM_RMRunning assigns and activates either a SDCCH/4 channel (for LUP) or a TCH/F channel (for MOC and MTC).
+\par }\pard \s56\qj\fi-990\li2070\sb60\sa60\widctlpar\adjustright {\b TDB Note}{: I assume that GSM Specification not allow assignment of a TCH/F to a mobile for LUP purpose. Reviewers please correct me or confirm my understanding.}{
+\revised\revauth1\revdttm1714043972
+\par }\pard \s56\qj\fi-990\li2070\sb60\sa60\widctlpar\pnrnot1\adjustright {\b\revised\revauth1\revdttm1714043972 TBD Note}{\revised\revauth1\revdttm1714043972\crauth1\crdate1714043972 :}{\revised\revauth1\revdttm1714043972 With reference to [}{
+\revised\revauth1\revdttm1714043977 10]\emdash PocketBTS PreAlpha Call Processing Flows, }{\revised\revauth1\revdttm1714043972 Bhava is concerned that }{\revised\revauth1\revdttm1714043977
+Page Request issued from CM may not be good to carry MCSM. In fact, it is possible that}{\revised\revauth1\revdttm1714043978 a }{\revised\revauth1\revdttm1714043977 page reques}{\revised\revauth1\revdttm1714043978 t}{\revised\revauth1\revdttm1714043977
+ may not advance}{\revised\revauth1\revdttm1714043979 into a MTC finally if the called mobile is not reachable at this moment. Thus, so-early assignment of }{\revised\revauth1\revdttm1714043980 a }{\revised\revauth1\revdttm1714043979 MCSM }{
+\revised\revauth1\revdttm1714043980 may get rid of other reachable mobiles}{\revised\revauth1\revdttm1714043982 \rquote chance to receive their terminated calls.}{\revised\revauth1\revdttm1714043983 Thanks for the good point. If we are not to do this}{
+\revised\revauth1\revdttm1714043985 now}{\revised\revauth1\revdttm1714043983 , it should be covered in future releases.}{\revised\revauth1\revdttm1714043982 }{
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\ul Sub-module: RM_ActivatingSigTrafficCh
+\par }\pard \qj\li1080\sb60\sa60\widctlpar\adjustright {This sub-module corresponds to the S2 Activating Sig/Traffic Chn state.
+\par }\pard\plain \s56\qj\li1080\sb60\sa60\widctlpar\adjustright \i\fs20\lang2057\cgrid {\i0 This sub-module processes the messages arriving at the S2 Activating Sig/Traffic Chn state and sends out relevant messages t
+o other relevant modules if needed. There are three possible messages coming to the S2 Activating Sig./Traffic Chn state. They are either positive or negative acknowledgements to the channel activation requests triggered by either channel requests from mo
+biles or handover requests from MM.
+\par The S2 Activating Sig/Traffic Chn state is air-link specific, each air-link corresponding to its own S2 state. If a negative acknowledgement received or no acknowledgement within a certain period, the establishment of the
+ concerned air-link is terminated and its state machine leaves S2 for the S1 RM Running state.
+\par If a positive acknowledgement is received , the state machine switches to either S3 Sig Chn Activated state or S4 Traffic Chn Activated state, which depends on why the air-link establishment is triggered, for handover or the others.
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\ul Sub-module: RM_SigChnActivated
+\par }\pard \qj\li1080\sb60\sa60\widctlpar\adjustright {This sub-module corresponds to the S3 Sig Chn Activated state.
+\par }\pard\plain \s56\qj\li1080\sb60\sa60\widctlpar\adjustright \i\fs20\lang2057\cgrid {\i0 This sub-module monitors the arrival of DL_EST_INDi from module LAPDm and then changes t
+he SM state to the S6 Sig Mode Established state. The DL_EST_INDi is triggered by a corresponding SABM frame received at the LAPDm module and indicates the successful establishment of an acknowledged-mode L2 link. If there is no such a DL_EST_INDi coming
+within a certain time, the SM will return to S1 RM Running state.
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\ul Sub-module: RM_TrafficChnActivated
+\par }\pard \qj\li1080\sb60\sa60\widctlpar\adjustright {This sub-module corresponds to the S4 Traffic Chn Activated state.
+\par }\pard\plain \s56\qj\li1080\sb60\sa60\widctlpar\adjustright \i\fs20\lang2057\cgrid {\i0 This sub-module processes all the incoming messages to the S4 state. It responds to the H
+andover Access (HO_ACCESSi) messages from mobile with Physical Information messages (PH_INFOi) and waits for either Handover Failure message (HO_FAILi) from MM or Handover Complete message (HO_COMi) from mobile. If neither HO_FAILi nor HO COMi received wi
+thin a certain time, the air-link establishment for the handover is terminated and the SM returns to the S1 RM Running state.
+\par }\pard \s56\qj\fi-1080\li2160\sb60\sa60\widctlpar\adjustright {\b TBD Note}{:}{\i0 }{Reviewers please comment if monitoring and handling the DL_EST_INDi originated from DL_RESUME_REQ at mobile make any sense. This message is not shown in Figure 2-2.
+
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\ul Sub-module: RM_SigModeEstablished
+\par }\pard \qj\li1080\sb60\sa60\widctlpar\adjustright {This sub-module corresponds to the S5 Sig Mode Established state.
+\par }\pard\plain \s56\qj\li1080\sb60\sa60\widctlpar\adjustright \i\fs20\lang2057\cgrid {\i0 Entrance to the S5 state indicates the establishment of a reliable functional channel between the RM and its mob
+ile peer. The functional channel could be either main signalling channel (SAPI=0) i.e. SDCCH or FACCH or associated channel i.e. SACCH (SAPI=3). Sub-module RM_SigModeEstablished attends any arrival of messages coming to the S5 state and process them app
+ropriately.
+\par For a LUP call or a supplementary call, the SM will leave the S5 state after the call finishes and start to release the air-link. For a MOC or MTC call, the SM may advance further to establish a traffic mode after receiving a Resource Assign (R
+ES ASSIGNi) from module CM.
+\par }\pard \s56\qj\fi-990\li2070\sb60\sa60\widctlpar\pnrnot1\adjustright {\b TBD Note}{: Reviewers please check if the carry-over of the RES ASSIGNi from CM to RM needs the relay of module MM. This may be already out of the RM\rquote
+s scope. I just raise it up for your attention if needed.}{\revised\revauth1\revdttm1714043986 Bhava agrees that the MM module should not be in the picture of processing of a Resource Assign message.}{\deleted\revauthdel1\revdttmdel1714043986 }{
+\deleted\revauthdel1\revdttmdel1714043987
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\ul Sub-module: RM_ActivatingTrafficMode
+\par }\pard \qj\li1080\sb60\sa60\widctlpar\adjustright {This sub-module corresponds to the S6 ActivatingTrafficMode state.
+\par }\pard\plain \s56\qj\li1080\sb60\sa60\widctlpar\adjustright \i\fs20\lang2057\cgrid {\i0
+The SM enters this state after receiving a Resource Assign message (RES ASSIGNi) and sending a corresponding command to L1. Sub-module RM_ActivatingTrafficMode expects to receive either a positive or negative response to the command previously sent down t
+o L1. For either of the two responses or nothing received within a certain period, this sub-module will drive the SM transition to the S8 Traffic Mode Activated state or the S7 Releasing Sig/Traffic Chn as illustrated in Figure 2-2.
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\ul Sub-module: RM_ReleasingSigTrafficChn
+\par }\pard \qj\li1080\sb60\sa60\widctlpar\adjustright {This sub-module corresponds to the S7 Releasing Sig/Traffic Chn state.
+\par }\pard\plain \s56\qj\li1080\sb60\sa60\widctlpar\adjustright \i\fs20\lang2057\cgrid {\i0 At the S7 state, the SM waits for a DL_REL_INDi or DL_REL_CONi from the LAPDm module. The DL_REL_INDi is originated from a corresponding DISC frame
+ sent up from mobile but the DL_REL_CONi is locally originated in the LADPm module. After receiving either of the DL_REL_INDi and DL_REL_CONi or neither of them within a certain period, RM_ReleasingSigTrafficChn issues a RF Channel Release command (RF CHN
+ RELo) to L1 to free the previously-commanded hardware state and switches the SM to the S9 Deactivate Sig/Traffic Chn state.
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\ul Sub-module: RM_TrafficModeActivated
+\par }\pard \qj\li1080\sb60\sa60\widctlpar\adjustright {This sub-module corresponds to the S8 Traffic Mode Activated state.
+\par }\pard\plain \s56\qj\li1080\sb60\sa60\widctlpar\adjustright \i\fs20\lang2057\cgrid {\i0 The SM waits for the mobile\rquote
+s acknowledgement to the Channel Mode Modify command sent over to it previously. If a positive acknowledgement got, the SM enters the S10 Traffic Mode Established state and the concerned air-link has been successfully adjusted from the signalling only mod
+e
+ to the speech full rate version 1 mode. If no acknowledgement received in a certain time, the SM is to start the release of the physical/logical channel by entering to the S7 Releasing Sig/Traffic Chn state. RM_TrafficModeActivated embodies all the relev
+ant processing logic stated here.
+\par }\pard \s56\qj\fi-900\li1980\sb60\sa60\widctlpar\adjustright {\b TBD Note:}{\i0 }{Reviewers please check if the \ldblquote speech full rate version 1\rdblquote is the correct choice for the time being.
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\ul Sub-module: RM_DeactivatingSigTrafficChn
+\par }\pard \qj\li1080\sb60\sa60\widctlpar\adjustright {This sub-module corresponds to the S9 Deactivating Sig/Traffic Chn state.
+\par }\pard\plain \s56\qj\li1080\sb60\sa60\widctlpar\adjustright \i\fs20\lang2057\cgrid {\i0
+RM_DeactivatingSigTrafficChn waits for the confirmation on the RF Channel Release command sent down to L1 at the S7 Releasing Sig/Traffic Chn state. Then associated the air-link is freed and returned to the free air-link pool for use by subsequent air-
+link requests. If no acknowledgement is received, the air-link is still freed and returned but it may be marked as such for monitoring purpose.
+\par }\pard \s56\qj\fi-990\li2070\sb60\sa60\widctlpar\adjustright {\b TBD Note}{: Reviewers please advise if this time-out case should be report to the OA&M, or just count these time-out happening and report after the count reaches a threshold configured.
+
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\ul Sub-module: RM_TrafficModeEstablished
+\par }\pard \qj\li1080\sb60\sa60\widctlpar\adjustright {This sub-module corresponds to the S10 Traffic Mode Established state.
+\par }\pard\plain \s56\qj\li1080\sb60\sa60\widctlpar\adjustright \i\fs20\lang2057\cgrid {\i0 RM_TrafficModeEstablished processes all the events signalled to the S10 su
+ch as release equest (RR_REL_REQi), handover command (HO_CMDi) as well as RSL break (RSL_BREAKi). The sub-module also changes the state of the SM accordingly.
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\ul Sub-module: RM_TrafficChnSuspending
+\par }\pard \qj\li1080\sb60\sa60\widctlpar\adjustright {This sub-module corresponds to the S11 Traffic Chn Suspending state.
+\par }\pard\plain \s56\qj\li1080\sb60\sa60\widctlpar\adjustright \i\fs20\lang2057\cgrid {\i0 RM_TrafficChnSuspending is expecting to receive either a Hanover Failure message (HO_FAILi) or a Handover Complete message (HO_COMi), both from mobile.
+\par If a HO_FAILi received from Mobile, the SM will return to the S10 Traffic Mode Established state and at the same time report the HO_FAILi message from mobile to MM or CM.
+\par }\pard \s56\qj\fi-990\li2070\sb60\sa60\widctlpar\adjustright {\b TBD Note:}{ Reviewers please give your opinion on where the RM module should send HO_FAILi message, MM or CM, in the case of the PocketBTS system.
+\par }{\b TBD Note}{: Similar to the descriptio
+n of Sub-module: RM_TrafficChnActivated, does the DL_EST_INDi triggered by DL_RESUME_REQi at Mobile side make sense to the RM design. The handling of the DL_EST_INDi is not considered in the RM module for the time being.
+\par }\pard \s56\qj\li1080\sb60\sa60\widctlpar\adjustright {\i0 If a HO_COMi message received from
+Mobile, the suspending physical/logical channel will be be relesed. RM_TrafficChnSuspending does a local release of the L2 link by issuing a DL_REL_REQi to the LAPDm module and at the same deactivate the SACCH.
+\par }\pard \s56\qj\fi-990\li2070\sb60\sa60\widctlpar\adjustright {\b TBD Note: }{Reviewers please advise if the sta
+te could directly be switched to the S9 Deactivating Sig/Traffic Chn state without deactivating the SACCH functional channel and entering the S7 Releasing Sig/Traffic Chn state.
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\ul Sub-module: RM_RMDown
+\par }\pard \qj\li1080\sb60\sa60\widctlpar\adjustright {This sub-module corresponds to the S12 RM RM Down state.
+\par }\pard\plain \s56\qj\li1080\sb60\sa60\widctlpar\adjustright \i\fs20\lang2057\cgrid {\i0
+At the R12 state, the RM module is out of service in the aspect of call processing. But RM is still capable of communicating with the OA&M and acts as required by the latter. For example, the OA&M may request the RM to upload data for problem analysis or
+pull back the RM module into service mode by sending an initialising command (INITi) to module RM.
+\par RM_RMDown contains all the relevant processing logic required when the SM is staying at the S12 RM Down state.
+\par }\pard \s56\qj\sb60\sa60\widctlpar\adjustright {\i0 In addition to the above sub-modules, the following sub-modules are strategically introduced:
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\ul Sub-module: RM_Main
+\par }\pard\plain \s56\qj\li1080\sb60\sa60\widctlpar\adjustright \i\fs20\lang2057\cgrid {\i0 This sub-module is planned to be the only entry to the RM module. All messages directed to RM will land at this sub-module. In particular, thi
+s sub-module filters the commands sent over from the OA&M and put them into immediate effect if needed. For a message related to a specific air-link, RM_Main will dispatch the message to the SM corresponding to this specific air-link for further processin
+g. Before dispatching the message out, RM_Main calls the message decoding functionality to decode the message first.
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\ul Sub-module: RM_Send
+\par }\pard\plain \s56\qj\li1080\sb60\sa60\widctlpar\adjustright \i\fs20\lang2057\cgrid {\i0 This sub-module specialises in formatting message as required by the used RTOS i.e. VxWorks and then sends the message out by calling the RTOS\rquote
+ proper ITC mechanism. Therefore, RM_Send is to be the only exit from the RM module.
+\par }\pard \s56\qj\fi-540\li1620\sb60\sa60\widctlpar\adjustright {Note: Collectively, RM_Main and RM_Send form the single-entry-single-exit flow structure and at the same time are good for helping hide RTOS-specific aspect from other sub-modules
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\ul Sub-module: RM_Lib
+\par }\pard\plain \s56\qj\li1080\sb60\sa60\widctlpar\adjustright \i\fs20\lang2057\cgrid {\i0 This sub-module is expected to accommodate those functions common for two or more sub-modules introduced above.
+\par }\pard \s56\qj\fi-990\li2070\sb60\sa60\widctlpar\adjustright {\b TBD Note}{: Similarly, a global library module may be introduced to contain basic functions which are system-wide needed.
+\par {\*\bkmkstart _Toc432248055}{\listtext\pard\plain\s2 \b\i\f1\lang2057\cgrid \hich\af1\dbch\af0\loch\f1 2.4\tab}}\pard\plain \s2\sb240\sa60\keepn\widctlpar\ls1\ilvl1\outlinelevel1\adjustright \b\lang2057\cgrid {\i\f1 Core Data Structures
+{\*\bkmkend _Toc432248055}
+\par }\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {The Core Data Structures are intended to group the following types of core data respectively:
+\par {\pntext\pard\plain\f3\fs20\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li360\sb60\sa60\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls113\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls113\adjustright {
+Configuration data of both TRX-level and Slot-level.
+\par }\pard \qj\li360\sb60\sa60\widctlpar\adjustright {The data will be download
+ed from the OA&M each time the PocketBTS is powered on and kept until it is powered off. Each time the RM module is initialised, either triggered by PocketBTS power on or commanded by the OA&M, relevant MPH commanding messages are formed based on these c
+onfiguration data and then passed down to L1 to initialise both TRXs and the Slots. The TRXs and Slots are one by one initialised.
+\par With reference to [1]\emdash PocketBTS Software Architecture, it is assumed that TS0 of TRX-0 is configured as Channel Combination Type V i.e. FCCH+SCH+BCCH+CCCH+SDCCH/4 (0\'853) + SACCH (0\'85
+3). The rest of 15 slots are all configured as Channel Combination Type I i.e. TCH/F + FACCH/F + SACCH/F.
+\par The design of Core Data Structures is to centralise/hide the configuration data in one data structure to reduce the impact of the change in TRX/Slot configuration on other parts of the RM module.
+\par {\pntext\pard\plain\f3\fs20\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li360\sb60\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls114\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls114\adjustright {
+BCCH System Information
+\par }\pard \qj\li360\sb60\sa60\widctlpar\adjustright {Store the SYSTEM INFORMATION TYPE messages currently in use. It is assumed that only SYSTEM INFORMATION TYPE 1-6 excluding their possible \ldblquote bis\rdblquote or \ldblquote ter\rdblquote
+ addition be needed for PocketBTS.
+\par }{\b\i TBD Note:}{\i Reviewers please advise if my understanding is correct.
+\par {\pntext\pard\plain\f3\fs20\revised\lang2057\revauth1\revdttm1714043700\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li360\sb60\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls119\pnrnot1\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}
+\ls119\pnrnot1\adjustright {\revised\revauth1\revdttm1714043700 SMS-CB Data
+\par }\pard \qj\li360\sb60\widctlpar\pnrnot1\adjustright {\revised\revauth1\revdttm1714043700 SMS-CB is to replace the }{2nd}{\revised\revauth1\revdttm1714043701 }{\revised\revauth1\revdttm1714043700 SDCCH/4 }{\revised\revauth1\revdttm1714043701
+on the beacon TS carrying BCCH bursts}{ or the 2}{\super nd}{ SDCCH/8 on a chosen SDCCH/8 signalling TS}{\revised\revauth1\revdttm1714043701 . A independent data structure for buffering SMS-CB data is needed.}{\revised\revauth1\revdttm1714043702
+ SMS-CB data will be passed down by calling DL_UNIT_DATA_REQ}{.
+\par }{\revised\revauth1\revdttm1714043702
+\par }{\b\i\revised\revauth1\revdttm1714043702\crauth1\crdate1714043928 TBD Note:}{\i\revised\revauth1\revdttm1714043702\crauth1\crdate1714043928 Reviewers please confirm that
+\par {\pntext\pard\plain\i\fs20\revised\lang2057\revauth1\revdttm1714043703\crauth1\crdate1714043928\cgrid \hich\af0\dbch\af0\loch\f0 1.\tab}}\pard \qj\fi-90\li1440\sb60\widctlpar\jclisttab\tx1440{\*\pn \pnlvlbody\ilvl0\ls120\pnrnot1
+\pndec\pnstart1\pnindent360\pnhang{\pntxta .}}\ls120\pnrnot1\adjustright {\i\revised\revauth1\revdttm1714043703\crauth1\crdate1714043928 SMS-CB is predestined to be on the 3}{\i\revised\super\revauth1\revdttm1714043703\crauth1\crdate1714043928 rd}{
+\i\revised\revauth1\revdttm1714043703\crauth1\crdate1714043928 SDCCH/4 only}{\i\crauth1\crdate1714043928
+\par }\pard \qj\li1800\sb60\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\adjustright {\i Ian confirms that SMS-CB data ride over air via 2}{\i\super nd}{\i SDCCH/4 or SDCCH/8. Thanks. Linked to Ian\rquote s Comment 12, Appendix C.}{
+\i\revised\revauth1\revdttm1714043703\crauth1\crdate1714043928
+\par {\pntext\pard\plain\i\fs20\revised\lang2057\revauth1\revdttm1714043703\crauth1\crdate1714043928\cgrid \hich\af0\dbch\af0\loch\f0 2.\tab}}\pard \qj\fi-90\li1440\sb60\widctlpar\jclisttab\tx1440{\*\pn \pnlvlbody\ilvl0\ls120\pnrnot1
+\pndec\pnstart1\pnindent360\pnhang{\pntxta .}}\ls120\pnrnot1\adjustright {\i\revised\revauth1\revdttm1714043703\crauth1\crdate1714043928 SMS-CB data }{\i\revised\revauth1\revdttm1714043704\crauth1\crdate1714043928 has to be}{
+\i\revised\revauth1\revdttm1714043703\crauth1\crdate1714043928 passed down via LAPDm. If not, which way is better ?}{\i\revised\revauth1\revdttm1714043701\crauth1\crdate1714043928
+\par }\pard \li360\sb60\widctlpar\pnrnot1\adjustright {\revised\revauth1\revdttm1714043700
+\par {\pntext\pard\plain\f3\fs20\revised\lang2057\revauth1\revdttm1714043705\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li360\sb60\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls111\pnrnot1\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}
+\ls111\pnrnot1\adjustright {\revised\revauth1\revdttm1714043705 HO }{\revised\revauth1\revdttm1714043712 R}{\revised\revauth1\revdttm1714043705 equests
+\par }\pard \qj\li360\sb60\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot1\pndec }\pnrnot1\adjustright {\revised\revauth1\revdttm1714043705 A }{\revised\revauth1\revdttm1714043911 message }{\revised\revauth1\revdttm1714043705 queue}{
+\revised\revauth1\revdttm1714043911 may be specifically created for buffering handover requests sent over from module MM if needed. An inefficient alternative is }{\revised\revauth1\revdttm1714043916
+mix handover requests with other messages coming to RM.}{\revised\revauth1\revdttm1714043929
+\par Linked to Ian\rquote s comment 6, Appendix A.}{\revised\revauth1\revdttm1714043916
+\par
+\par }\pard \qj\fi-900\li1260\sb60\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot1\pndec }\pnrnot1\adjustright {\b\i\revised\revauth1\revdttm1714043916\crauth1\crdate1714043920 TBD}{\b\i\revised\revauth1\revdttm1714043920\crauth1\crdate1714043920 Note}{
+\b\i\revised\revauth1\revdttm1714043916\crauth1\crdate1714043920 :}{\i\revised\revauth1\revdttm1714043916\crauth1\crdate1714043919 Reviewers please evaluate if this makes sense for PocketBTS and later}{
+\i\revised\revauth1\revdttm1714043917\crauth1\crdate1714043919 more powerful BTS products planned}{\i\revised\revauth1\revdttm1714043918\crauth1\crdate1714043919 for the future. Any way the}{
+\i\revised\revauth1\revdttm1714043919\crauth1\crdate1714043919 current}{\i\revised\revauth1\revdttm1714043918\crauth1\crdate1714043919 RM }{\i\revised\revauth1\revdttm1714043919\crauth1\crdate1714043919 design will }{
+\i\revised\revauth1\revdttm1714043918\crauth1\crdate1714043919 take its possible impact on }{\i\revised\revauth1\revdttm1714043919\crauth1\crdate1714043919 RM architecture into consideration just for possible optimisation in the future.}{
+\i\revised\revauth1\revdttm1714043929
+\par }{\i\revised\revauth1\revdttm1714043911\crauth1\crdate1714043919
+\par {\pntext\pard\plain\f3\fs20\revised\lang2057\revauth1\revdttm1714043712\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li360\sb60\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls111\pnrnot1\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}
+\ls111\pnrnot1\adjustright {\revised\revauth1\revdttm1714043712 Page Requests
+\par }\pard \qj\li360\sb60\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\adjustright {\revised\revauth1\revdttm1714043712 Page requests received from MM will be }{\revised\revauth1\revdttm1714043907 grouped }{\revised\revauth1\revdttm1714043908
+in module RM }{\revised\revauth1\revdttm1714043712 in terms of their page group separately. Once}{\revised\revauth1\revdttm1714043713 RM receives }{\revised\revauth1\revdttm1714043712 a }{\revised\revauth1\revdttm1714043908 MPH_PAGCH_READY_TO_SEND}{
+\revised\revauth1\revdttm1714043713 indication}{\revised\revauth1\revdttm1714043908 }{\revised\revauth1\revdttm1714043909 for a specific page group }{\revised\revauth1\revdttm1714043908 from the DSP}{\revised\revauth1\revdttm1714043713
+, RM will choose the right page message}{\revised\revauth1\revdttm1714043911 type}{\revised\revauth1\revdttm1714043713 to group as many }{\revised\revauth1\revdttm1714043714 page requests }{\revised\revauth1\revdttm1714043713 as poss}{
+\revised\revauth1\revdttm1714043714 ible of each page group and pass down to L1 in order to increase the paging capacity.}{\revised\revauth1\revdttm1714043930 Linked to Ian\rquote s}{\revised\revauth1\revdttm1714043931 and Jan\rquote s}{
+\revised\revauth1\revdttm1714043930 email, Appendix B.
+\par }\pard \qj\li360\sb60\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot1\pndec }\pnrnot1\adjustright {\revised\revauth1\revdttm1714043930
+\par }{\revised\revauth1\revdttm1714043909 TBD: Reviewers please confirm that a parameter in MPH_PAGCH_READY_TO_SEND is needed to }{\revised\revauth1\revdttm1714043910 \ldblquote }{\revised\revauth1\revdttm1714043909 express}{
+\revised\revauth1\revdttm1714043910 \rdblquote all the page groups currently ready for }{\revised\revauth1\revdttm1714043911 \ldblquote digesting\rdblquote page messages.}{\revised\revauth1\revdttm1714043930 }{\revised\revauth1\revdttm1714043713
+
+\par }\pard \li360\sb60\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot1\pndec }\pnrnot1\adjustright {\revised\revauth1\revdttm1714043707
+\par {\pntext\pard\plain\f3\fs20\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li360\sb60\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls111\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls111
+\ls111\pnrauth1\pnrdate1714043561\pnrstart0\pnrxst1\pnrxst0\pnrxst183\pnrxst240\pnrstop4\pnrstart1\pnrrgb0\pnrrgb0\pnrrgb0\pnrrgb0\pnrrgb0\pnrrgb0\pnrrgb0\pnrrgb0\pnrrgb0\pnrstop9\pnrstart2\pnrnfc23\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0
+\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc1\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrstop18\pnrstart3\pnrpnbr1\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0
+\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrstop36\adjustright {SDCCH/4 dedicated channels
+\par }\pard \qj\li360\sa60\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\adjustright {An array of p
+roper structure type is used to organise all the SDCCH/4 channels, each containing two logical/functional channels i.e. DCCH and SACCH. The description of each SDCCH/4 channel contains its resident TRX and TS as well as its associated Channel Combination
+ Type. A flag is used in the description of the SDCCH/4 channel to indicate if the SDCCH/4 is currently engaged in a call.
+\par }\pard \qj\fi-360\li360\sb120\sa60\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\adjustright {\tab Each SDCCH/4 is tagged with a quality rating which is referred to when a new SDCCH/4 channel is requested. The RM module may choose
+a good-quality SDCCH/4 for this request in terms of the rating value.
+\par }\pard \qj\fi-1260\li1260\sb120\sa60\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\adjustright {\tab }{\b\i TBD Note:}{\i
+ Reviewers please advise if the rating consideration for a SDCCH/4 make any sense since this type of channel is not used to carry speech data so far.
+\par {\pntext\pard\plain\f3\fs20\revised\lang2057\revauth1\revdttm1714043561\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li360\sb60\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls111\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}
+\ls111\adjustright {\revised\revauth1\revdttm1714043561 SDCCH/8 dedicated channels}{\revised\revauth1\revdttm1714043562
+\par }\pard \qj\li360\sb60\widctlpar\adjustright {\revised\revauth1\revdttm1714043562 In addition to those SDCCH/4 associated with the beacon TS carrying }{\revised\revauth1\revdttm1714043563 BCCH burst}{\revised\revauth1\revdttm1714043564 s}{
+\revised\revauth1\revdttm1714043563 , one of the left}{\revised\revauth1\revdttm1714043564 15}{\revised\revauth1\revdttm1714043563 TSes may }{\revised\revauth1\revdttm1714043564
+be converted forth and back between TCH/F and 8 SDCCH/8 channels if needed. An array of }{\revised\revauth1\revdttm1714043561 proper structure type is }{\revised\revauth1\revdttm1714043566 thus introduced }{\revised\revauth1\revdttm1714043561
+to organise al
+l the SDCCH/8 channels, each containing two logical/functional channels i.e. DCCH and SACCH. The description of each SDCCH/8 channel contains its resident TRX and TS as well as its associated Channel Combination Type. A flag is used in the description o
+f the SDCCH/8 channel to indicate if the SDCCH/8 is currently engaged in a call.
+\par }\pard \qj\li360\sb120\sa60\widctlpar\adjustright {\revised\revauth1\revdttm1714043561 Each SDCCH/8 is tagged with a quality rating which is referred to when a new SDCCH/8 channel is requested. The RM module may choose a good-quality SDCCH/}{
+\revised\revauth1\revdttm1714043567 8}{\revised\revauth1\revdttm1714043561 for this request in terms of the rating value.
+\par }\pard \qj\fi-900\li1260\sb120\widctlpar\adjustright {\b\i\revised\revauth1\revdttm1714043561 TBD Note:}{\b\i\revised\revauth1\revdttm1714043567
+\par {\pntext\pard\plain\i\fs20\revised\lang2057\revauth1\revdttm1714043561\cgrid \hich\af0\dbch\af0\loch\f0 1.\tab}}\pard \qj\fi-360\li763\widctlpar\jclisttab\tx763{\*\pn \pnlvlbody\ilvl0\ls118\pnrnot1\pndec\pnstart1\pnindent360\pnhang{\pntxta .}}
+\ls118\pnrnot1\adjustright {\i\revised\revauth1\revdttm1714043561 Reviewers please advise if the rating consideration for a SDCCH/}{\i\revised\revauth1\revdttm1714043562 8}{\i\revised\revauth1\revdttm1714043561
+ make any sense since this type of channel is not used to carry speech data so far.}{\i\revised\revauth1\revdttm1714043595
+\par }\pard \qj\li403\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot1\pndec }\pnrnot1\adjustright {\i\revised\revauth1\revdttm1714043571
+\par {\pntext\pard\plain\i\fs20\revised\lang2057\revauth1\revdttm1714043576\cgrid \hich\af0\dbch\af0\loch\f0 2.\tab}}\pard \qj\fi-360\li763\widctlpar\jclisttab\tx763{\*\pn \pnlvlbody\ilvl0\ls118\pnrnot1\pndec\pnstart1\pnindent360\pnhang{\pntxta .}}
+\ls118\pnrnot1\adjustright {\i\revised\revauth1\revdttm1714043576 The SDCCH-type channels are }{\i\revised\revauth1\revdttm1714043577 planned }{\i\revised\revauth1\revdttm1714043576 only for non-speech calls, in PocketBTS case for LUP, CISS}{
+\i\revised\revauth1\revdttm1714043578 }{\i\revised\revauth1\revdttm1714043700 and SMS }{\i\revised\revauth1\revdttm1714043578 calls. }{\i\revised\revauth1\revdttm1714043579 In particular, if a corporate }{\i\revised\revauth1\revdttm1714043584 PocketBTS }
+{\i\revised\revauth1\revdttm1714043579 system considered,}{\i\revised\revauth1\revdttm1714043584 everyday close to starting of office time, lots of LUPs could be expected at parking lots or entrance to an office building
+, a PocketBTS cell nearby could be thus crowded. In this case, some people may proceed to make }{\i\revised\revauth1\revdttm1714043588 or receive }{\i\revised\revauth1\revdttm1714043584
+a call after their LUP. In one word, it would be nice to let everyone camped on a PocketBTS cell and hence capable of calling or being called.}{\i\revised\revauth1\revdttm1714043592
+\par }\pard \qj\li403\widctlpar\pnrnot1\adjustright {\i\revised\revauth1\revdttm1714043592
+\par }\pard \qj\li720\widctlpar\pnrnot1\adjustright {\i\revised\revauth1\revdttm1714043592 Another scenario requesting for high SDCCH capacity may be any kind of corporate gatherings }{\i\revised\revauth1\revdttm1714043595 at c}{
+\i\revised\revauth1\revdttm1714043594 onference rooms, }{\i\revised\revauth1\revdttm1714043592 cafeteria, etc.}{\i\revised\revauth1\revdttm1714043591
+\par }\pard \qj\li403\widctlpar\pnrnot1\adjustright {\i\revised\revauth1\revdttm1714043591
+\par }\pard \qj\li720\widctlpar\pnrnot1\adjustright {\i\revised\revauth1\revdttm1714043596 Except such kinds of extremities}{\i\revised\revauth1\revdttm1714043597 resulted from }{\i\revised\revauth1\revdttm1714043598 the }{
+\i\revised\revauth1\revdttm1714043591 office-opening}{\i\revised\revauth1\revdttm1714043592 time and the gatherings, }{\i\revised\revauth1\revdttm1714043623 we may not need so many SDCCH channels. But for }{\i\revised\revauth1\revdttm1714043624 the }{
+\i\revised\revauth1\revdttm1714043623 normal case}{\i\revised\revauth1\revdttm1714043624 , }{\i\revised\revauth1\revdttm1714043592 what is the relationship model or typical }{\i\revised\revauth1\revdttm1714043599 ratio }{
+\i\revised\revauth1\revdttm1714043592 values }{\i\revised\revauth1\revdttm1714043599 between }{\i\revised\revauth1\revdttm1714043590 the number of SDCCH channels and the number of simultaneous calls}{\i\revised\revauth1\revdttm1714043599
+ that these SDCCH channels can co}{\i\revised\revauth1\revdttm1714043600 mfortably}{\i\revised\revauth1\revdttm1714043599 serve.}{\i\revised\revauth1\revdttm1714043600 Reviewers please }{\i\revised\revauth1\revdttm1714043621 instruct me in this aspect.
+
+\par
+\par In balancing between the extreme and normal operation cases, an algorithm may be designed to }{\i\revised\revauth1\revdttm1714043635 decide the timing of }{\i\revised\revauth1\revdttm1714043621 conversion of the us}{\i\revised\revauth1\revdttm1714043637
+age}{\i\revised\revauth1\revdttm1714043621 of}{\i\revised\revauth1\revdttm1714043636 a}{\i\revised\revauth1\revdttm1714043621 TS between TCH/F }{\i\revised\revauth1\revdttm1714043635 (type 1) }{\i\revised\revauth1\revdttm1714043621 and SDCCH/8 }{
+\i\revised\revauth1\revdttm1714043635 (type 7)}{\i\revised\revauth1\revdttm1714043637 . The control of the conversion can be considered as configurable from the OA&M}{\i\revised\revauth1\revdttm1714043638
+ but it may not be proper for the OA&M to decide the conversion timing.}{\i\revised\revauth1\revdttm1714043639 Reviewers please give your valuable comment on this.
+\par
+\par }\pard \qj\li720\widctlpar\adjustright {\i\revised\revauth1\revdttm1714043639 Another point in support of SDCCH/8 configuration is}{\i\revised\revauth1\revdttm1714043640 that}{\i\revised\revauth1\revdttm1714043639 more traffic channels }{
+\i\revised\revauth1\revdttm1714043640 will be in service once TCH/H is allowed in the future}{\i\revised\revauth1\revdttm1714043641 .}{\i\deleted\revauthdel1\revdttmdel1714043640
+\par }\pard \qj\li720\widctlpar\pnrnot1\adjustright {\i\revised\revauth1\revdttm1714043931
+\par Linked to Ian\rquote s comment 2, Appendix A.}{\revised\revauth1\revdttm1714043931
+\par }\pard \sb60\widctlpar\pnrnot1\adjustright {\revised\revauth1\revdttm1714043641
+\par {\pntext\pard\plain\f3\fs20\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li360\sb60\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls111\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls111
+\ls111\pnrauth1\pnrdate1714043561\pnrstart0\pnrxst1\pnrxst0\pnrxst183\pnrxst240\pnrstop4\pnrstart1\pnrrgb0\pnrrgb0\pnrrgb0\pnrrgb0\pnrrgb0\pnrrgb0\pnrrgb0\pnrrgb0\pnrrgb0\pnrstop9\pnrstart2\pnrnfc23\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0
+\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc2\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrstop18\pnrstart3\pnrpnbr2\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0
+\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrstop36\adjustright {TCH/F dedicated channels
+\par }\pard \qj\li360\sa60\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\adjustright {Similar to the SDCCH dedicated channel case, an array of proper structure type is used to organise all the TCH/F channels, each con
+taining two logical/functional channels i.e. FCCH and SACCH. The description of each TCH/F channel contains its resident TRX and TS. A flag is used in the description of the TCH/F channel to indicate if the TCH/F is currently engaged ready for assignment
+.
+\par Each TCH/F channel is associated with a quality rating which is calculated out based on the Idle Messages received from L1. RM may refer to this rating field of all the TCH/Fs to decide a good-quality one for assignment.
+\par }\pard \qj\li360\sb120\sa60\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\adjustright {\i Note: For PocketBTS Pre-Alpha Release, RM will not refer to the rating field for TCH/F assignment.
+\par }\pard \sa60\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\adjustright {
+\par }\pard \qj\fi-1260\li1260\sa60\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\adjustright {\tab }{\b\i TBD Note:}{\i
+ Messages such as configuration data for TRX/Slot, SYSTEM INFORMATION TYPE may be encoded at the OA&M since they are rarely changed. Even a chang
+e is needed, the change should be also reflected in the OA&M MIB. Thus it is good for the OA&M to call the ED function to encode these messages. But for PocketBTS Pre-Alpha Release, module RM will take care of the message encoding jobs. Moreover, RM may n
+ot really retrieve any of these messages/message data from the OA&M if the OA&M is not such capable then. SYSTEM INFORMATION TYPE messages will be passed down to L1 via MPH Primitive.
+\par }\pard \li1260\sa60\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\adjustright {\i Reviewers please advise if this consideration is feasible or preferred.}{\i\deleted\revauthdel1\revdttmdel1714043699
+\par {\pntext\pard\plain\f3\fs20\revised\lang2057\revauth1\revdttm1714043642\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li360\sb60\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls111\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}
+\ls111\adjustright {\revised\revauth1\revdttm1714043642 TCH/H dedicated channels
+\par }\pard \qj\li360\sb60\widctlpar\pnrnot1\adjustright {\revised\revauth1\revdttm1714043642 From architectural point of view, management of dedicated channels (i.e. }{\revised\revauth1\revdttm1714043648
+bi-directional channels) are structured in sense of data management in terms of air-link types i.e. SDCCH/4, SDCCH/8, TCH/F and TCH/H.}{\revised\revauth1\revdttm1714043649 This separation resul
+ts in scalability in dealing with addition of new air-link types such as
+\par }{\revised\revauth1\revdttm1714043693 the above-mentioned SDCCH/8 and the TCH/H being discussed here.}{\revised\revauth1\revdttm1714043642
+\par }\pard \li360\sb60\widctlpar\pnrnot1\adjustright {\revised\revauth1\revdttm1714043650
+\par }\pard \qj\li360\sb60\widctlpar\adjustright {\revised\revauth1\revdttm1714043694 Sim}{\revised\revauth1\revdttm1714043650 ilar to TCH/F, an array of proper structure type is used to}{\revised\revauth1\revdttm1714043642 organise all the TCH/}{
+\revised\revauth1\revdttm1714043651 H}{\revised\revauth1\revdttm1714043642 channels}{\revised\revauth1\revdttm1714043651 in pair}{\revised\revauth1\revdttm1714043642 , each containin
+g two functional channels i.e. FCCH and SACCH. The description of each TCH/}{\revised\revauth1\revdttm1714043694 H }{\revised\revauth1\revdttm1714043695 is}{\revised\revauth1\revdttm1714043694
+ paired, to facilitate its conversion to a TCH/F whenever needed, }{\revised\revauth1\revdttm1714043695 and includes}{\revised\revauth1\revdttm1714043642 its resident TRX and TS. A flag is used in the description of the TCH/}{
+\revised\revauth1\revdttm1714043695 H}{\revised\revauth1\revdttm1714043642 channel to indicate if the TCH/}{\revised\revauth1\revdttm1714043696 H}{\revised\revauth1\revdttm1714043642 is currently engaged ready for assignment.}{
+\revised\revauth1\revdttm1714043696 }{\revised\revauth1\revdttm1714043642 Each TCH/}{\revised\revauth1\revdttm1714043696 H}{\revised\revauth1\revdttm1714043642
+ channel is associated with a quality rating which is calculated out based on the Idle Messages received from L1. RM may refer to this rating field of all the TCH/}{\revised\revauth1\revdttm1714043696 H}{\revised\revauth1\revdttm1714043642 s to
+decide a good-quality one for assignment.
+\par }\pard \qj\li360\sb120\sa60\widctlpar\pnrnot1\adjustright {\i\revised\revauth1\revdttm1714043642 Note: For PocketBTS Pre-Alpha Release, RM will not refer to the rating field for TCH/}{\i\revised\revauth1\revdttm1714043696 H}{
+\i\revised\revauth1\revdttm1714043642 assignment..}{\revised\revauth1\revdttm1714043641
+\par {\pntext\pard\plain\f3\fs20\lang2057\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li360\sb120\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls116\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls116\adjustright {Air-link management
+
+\par }\pard \qj\li360\sb120\widctlpar\adjustright {For each bi-directional air-link, thus excluding BCCH, RACH, PCH and AGCH, no matter wheth
+er it is currently engaged or not, a data structure is defined to hold all the information related to it. Each bi-directional air-link is linked to its own unique SM. Thus the data structure associated with a bi-directional air-link is also treated the S
+M\rquote s context. When a bi-directional air link is assigned to a mobile, relevant data such as LAPDmOIDs for both its DCCH and its SACCH functional channels, the SM\rquote
+s current state, as well as the MCSM allocated are all recorded in this data structure. In one word, this data structure is to centralise all the data items associated with an air-link/its corresponding SM.
+\par }\pard \qj\sb120\widctlpar\pnrnot1\adjustright {In general, RM prefers to take any processing overhead such as searching for the unassigned best-quality TCH/F and updating these data structures
+. This preference is actually based on the fact that there is only 15 elements at maximum in each of these data structures and thus it may not be necessary to split these elements further into several data structures. Similarly, no sorting of these data s
+tructures will not be considered meaningful since it takes time and may not reduce search time attractively.
+\par }\pard\plain \s2\qj\sb240\sa60\keepn\widctlpar\outlinelevel1\pnrnot1\adjustright \b\lang2057\cgrid {\i\fs20\revised\revauth1\revdttm1714043715 {\*\bkmkstart _Toc432248056}Note: }{\b0\i\fs20\revised\revauth1\revdttm1714043715\crauth1\crdate1714043921 The}{
+\b0\i\fs20\revised\revauth1\revdttm1714043716\crauth1\crdate1714043921 data structures }{\b0\i\fs20\revised\revauth1\revdttm1714043921 introduced in the aspect of high-level design}{\b0\i\fs20\revised\revauth1\revdttm1714043716\crauth1\crdate1714043921
+ in this sub-section is from a forward-looking perspective. }{\b0\i\fs20\revised\revauth1\revdttm1714043922 They will not be implemented in the Pre-Alpha Release.
+\par {\listtext\pard\plain\s2 \b\i\f1\lang2057\cgrid \hich\af1\dbch\af0\loch\f1 2.5\tab}}\pard \s2\sb240\sa60\keepn\widctlpar\ls1\ilvl1\outlinelevel1\adjustright {\i\f1 Module Architecture{\*\bkmkend _Toc432248056}
+\par }\pard\plain \qj\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {RM is intended to be running as one task. The number of air-links established simultaneously is 19 at maximum. They proceed concurrently, each identified uniquely by it
+s associated SM context data structure described in Section 2.4. Only one FIFO message queue is assumed for the RM task to hold all the inbound messages addressed to the RM module. No rationale is seen to have several message queues if there is only RM ta
+sk in operation.
+\par TBD Note: Reviewers please evaluate according to your experience in both design perspective and VxWorks characteristics whether one RM task/one message queue design is enough to attend all the inbound message flux.
+\par Figure 2-3 depicts RM\rquote s module architecture. It describes the RM\rquote s physical partitioning of functionality, interaction with external modules/functions as well as the processing dependency inside the RM\rquote s sub-modules.
+\par It is assumed that sub-module RM_Lib be called wherever it is needed, thus no calling flows drawn between RM_Lib and any other RM sub-modules.
+\par Attention has been paid to reduce the coupling between module RM and module ED and the IRT functionality. This will be met as much as possible in the detailed design part of this document.
+\par \page
+\par }{\lang1024 {\shp{\*\shpinst\shpleft4005\shptop-135\shpright8695\shpbottom471\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz157\shplid1204{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 5898240}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn hspNext}{\sv 1204}}{\sp{\sn lineDashing}{\sv 2}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright
+\fs20\lang2057\cgrid {L1, MD, MM, MCSM, OA&M}{\revised\revauth1\revdttm1714043988 , CM}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8349\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {L1, MD, MM, MCSM, OA&M}{\revised\revauth1\revdttm1714043988 , CM}{
+\par }}\dpx4005\dpy-135\dpxsize4690\dpysize606\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft775\shptop10096\shpright2245\shpbottom10339\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz261\shplid1205{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 5963776}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1205}}
+{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\i\fs16 Calling relationship
+\par }{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8453\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\i\fs16 Calling relationship
+\par }{
+\par }}\dpx775\dpy10096\dpxsize1470\dpysize243\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor255\dplinecog255\dplinecob255}}}
+{\shp{\*\shpinst\shpleft240\shptop10243\shpright735\shpbottom10243\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz260\shplid1206{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 1}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8452\dpline\dpptx495\dppty0\dpptx0\dppty0
+\dpx240\dpy10243\dpxsize495\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft790\shptop9796\shpright2800\shpbottom10099\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz259\shplid1207
+{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn lTxid}{\sv 6029312}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1207}}
+{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\i\fs16 Major data interactions
+\par }{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8451\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\i\fs16 Major data interactions
+\par }{
+\par }}\dpx790\dpy9796\dpxsize2010\dpysize303\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor255\dplinecog255\dplinecob255}}}
+{\shp{\*\shpinst\shpleft310\shptop6082\shpright1975\shpbottom6685\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz258\shplid1208{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 6094848}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1208}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+RM_Lib
+\par
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8450\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {RM_Lib
+\par
+\par }}\dpx310\dpy6082\dpxsize1665\dpysize603\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft1560\shptop7454\shpright1560\shpbottom7904\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz257\shplid1209{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}
+{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}
+{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8449\dpline\dpptx0\dppty0\dpptx0\dppty450\dpx1560\dpy7454\dpxsize0\dpysize450
+\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft2220\shptop8099\shpright4800\shpbottom8099\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz256\shplid1210
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}
+{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineStartArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8448\dpline\dpptx0\dppty0\dpptx2580\dppty0\dpx2220\dpy8099\dpxsize2580\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft915\shptop7890\shpright2210\shpbottom8301\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz255\shplid1211{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 6160384}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1211}}
+{\sp{\sn lineDashing}{\sv 2}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\lang1033 IRT Table
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8447\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\lang1033 IRT Table
+\par }}\dpx915\dpy7890\dpxsize1295\dpysize411\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft3145\shptop9299\shpright4405\shpbottom9999\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz254\shplid1212{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 1260}}
+{\sp{\sn geoBottom}{\sv 700}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;13;(1260,0);(1233,71);(1207,143);(1120,180);(1033,217);(880,200);(740,220);(600,240);(403,220);(280,300);(157,380);(47,633);(0,700)}}{\sp{\sn pSegmentInfo}{\sv 2;11
+;16384;44288;8193;44288;8193;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}
+{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}{\sp{\sn lineFillWidth}{\sv 0}}{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}
+{\sp{\sn lineWidth}{\sv 15875}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn lineEndCapStyle}{\sv 2}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}
+{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}
+{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}
+{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}
+{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}
+{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8446\dppolygon\dppolycount43\dpptx1260\dppty0\dpptx1238\dppty53\dpptx1226\dppty78
+\dpptx1212\dppty102\dpptx1193\dppty125\dpptx1173\dppty146\dpptx1149\dppty164\dpptx1119\dppty179\dpptx1103\dppty186\dpptx1083\dppty190\dpptx1042\dppty198\dpptx998\dppty203\dpptx950\dppty206\dpptx899\dppty207\dpptx845\dppty209\dpptx792\dppty214
+\dpptx740\dppty220\dpptx685\dppty225\dpptx625\dppty230\dpptx564\dppty233\dpptx504\dppty237\dpptx444\dppty244\dpptx413\dppty250\dpptx385\dppty256\dpptx357\dppty264\dpptx329\dppty273\dpptx304\dppty286\dpptx280\dppty299\dpptx258\dppty316\dpptx234\dppty337
+\dpptx214\dppty361\dpptx192\dppty386\dpptx169\dppty414\dpptx149\dppty444\dpptx111\dppty504\dpptx93\dppty534\dpptx77\dppty564\dpptx60\dppty592\dpptx46\dppty619\dpptx32\dppty644\dpptx20\dppty665\dpptx10\dppty684\dpptx0\dppty699
+\dpx3145\dpy9299\dpxsize1260\dpysize700\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2640\shptop10005\shpright3575\shpbottom10416\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz253\shplid1213{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 6225920}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1213}}
+{\sp{\sn lineDashing}{\sv 2}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \s42\qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\lang1033 OA&M
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8445\dptxbx{\dptxbxtext\pard\plain \s42\qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\lang1033 OA&M
+\par }}\dpx2640\dpy10005\dpxsize935\dpysize411\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft4385\shptop8384\shpright4905\shpbottom8784\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz252\shplid1214{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 520}}
+{\sp{\sn geoBottom}{\sv 400}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;10;(520,0);(485,66);(450,133);(380,160);(310,187);(163,120);(100,160);(37,200);(17,360);(0,400)}}{\sp{\sn pSegmentInfo}{\sv 2;9;16384;44288
+;8193;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}
+{\sp{\sn lineFillWidth}{\sv 0}}{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}
+{\sp{\sn lineEndCapStyle}{\sv 2}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}
+{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}
+{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}
+{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}
+{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}
+{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8444\dppolygon\dppolycount45\dpptx519\dppty0\dpptx506\dppty25\dpptx493\dppty49\dpptx478\dppty72\dpptx463\dppty94\dpptx445\dppty115\dpptx436\dppty124
+\dpptx426\dppty132\dpptx415\dppty140\dpptx404\dppty147\dpptx392\dppty154\dpptx379\dppty159\dpptx365\dppty163\dpptx350\dppty166\dpptx333\dppty166\dpptx315\dppty165\dpptx296\dppty163\dpptx277\dppty161\dpptx237\dppty155\dpptx217\dppty152\dpptx198\dppty149
+\dpptx179\dppty147\dpptx161\dppty147\dpptx143\dppty147\dpptx127\dppty149\dpptx112\dppty153\dpptx100\dppty159\dpptx94\dppty163\dpptx88\dppty168\dpptx78\dppty180\dpptx68\dppty193\dpptx60\dppty208\dpptx52\dppty225\dpptx45\dppty243\dpptx38\dppty260
+\dpptx32\dppty279\dpptx27\dppty298\dpptx22\dppty316\dpptx17\dppty334\dpptx14\dppty350\dpptx10\dppty365\dpptx7\dppty379\dpptx3\dppty390\dpptx2\dppty395\dpptx0\dppty399\dpx4385\dpy8384\dpxsize520\dpysize400
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft4865\shptop8399\shpright5165\shpbottom8819\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz251\shplid1215{\sp{\sn shapeType}{\sv 19}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}
+{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8443\dppolygon\dppolycount33\dpptx0\dppty0\dpptx15\dppty1\dpptx31\dppty2\dpptx46\dppty5\dpptx60\dppty9\dpptx75\dppty13\dpptx89\dppty19
+\dpptx103\dppty26\dpptx117\dppty33\dpptx130\dppty42\dpptx143\dppty51\dpptx156\dppty61\dpptx168\dppty72\dpptx180\dppty83\dpptx191\dppty96\dpptx202\dppty109\dpptx212\dppty123\dpptx222\dppty138\dpptx231\dppty153\dpptx240\dppty169\dpptx249\dppty185
+\dpptx257\dppty202\dpptx264\dppty220\dpptx270\dppty238\dpptx276\dppty257\dpptx282\dppty276\dpptx287\dppty295\dpptx290\dppty315\dpptx294\dppty335\dpptx297\dppty356\dpptx299\dppty377\dpptx300\dppty398\dpptx300\dppty420\dpx4865\dpy8399\dpxsize300\dpysize420
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shpgrp{\*\shpinst\shpleft4280\shptop8679\shpright4505\shpbottom9294\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz250\shplid1216{\sp{\sn groupLeft}{\sv 6255}}{\sp{\sn groupTop}{\sv 11400}}{\sp{\sn groupRight}{\sv 6480}}
+{\sp{\sn groupBottom}{\sv 12015}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn rotation}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}{\shp{\*\shpinst\shplid1217{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11520}}{\sp{\sn relRight}{\sv 6480}}
+{\sp{\sn relBottom}{\sv 12015}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1218{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11805}}
+{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11805}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1219{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11715}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11715}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1220{\sp{\sn relLeft}{\sv 6480}}{\sp{\sn relTop}{\sv 11400}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11550}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 1}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1221{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11400}}{\sp{\sn relRight}{\sv 6255}}{\sp{\sn relBottom}{\sv 11550}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 1}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1222{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11625}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11625}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1223{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11905}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11905}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8442\dppolygon\dppolycount4
+\dpptx0\dppty0\dpptx225\dppty0\dpptx225\dppty615\dpptx0\dppty615\dpx4280\dpy8679\dpxsize225\dpysize615\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft4285\shptop9299\shpright4845\shpbottom10039\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz246\shplid1224{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 560}}
+{\sp{\sn geoBottom}{\sv 740}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;10;(560,0);(490,98);(420,197);(340,260);(260,323);(137,300);(80,380);(23,460);(13,683);(0,740)}}{\sp{\sn pSegmentInfo}{\sv 2;9;16384;44288
+;8193;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}
+{\sp{\sn lineFillWidth}{\sv 0}}{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}
+{\sp{\sn lineEndCapStyle}{\sv 2}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}
+{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}
+{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}
+{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}
+{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}
+{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8438\dppolygon\dppolycount35\dpptx559\dppty0\dpptx506\dppty73\dpptx480\dppty109\dpptx453\dppty143\dpptx426\dppty175\dpptx398\dppty206
+\dpptx369\dppty234\dpptx340\dppty259\dpptx324\dppty270\dpptx308\dppty279\dpptx291\dppty287\dpptx273\dppty294\dpptx237\dppty304\dpptx202\dppty313\dpptx166\dppty323\dpptx150\dppty329\dpptx134\dppty336\dpptx118\dppty345\dpptx104\dppty354\dpptx91\dppty366
+\dpptx80\dppty380\dpptx70\dppty397\dpptx61\dppty416\dpptx53\dppty438\dpptx46\dppty462\dpptx39\dppty487\dpptx33\dppty514\dpptx23\dppty568\dpptx16\dppty622\dpptx13\dppty646\dpptx10\dppty670\dpptx7\dppty691\dpptx4\dppty710\dpptx3\dppty726\dpptx0\dppty739
+\dpx4285\dpy9299\dpxsize560\dpysize740\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft6980\shptop10025\shpright7915\shpbottom10436\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz243\shplid1225{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 6291456}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1225}}
+{\sp{\sn lineDashing}{\sv 2}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \s42\qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\lang1033 MCSM
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8435\dptxbx{\dptxbxtext\pard\plain \s42\qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\lang1033 MCSM
+\par }}\dpx6980\dpy10025\dpxsize935\dpysize411\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft6100\shptop10045\shpright6735\shpbottom10456\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz242\shplid1226{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 6356992}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1226}}
+{\sp{\sn lineDashing}{\sv 2}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \s42\qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\lang1033 MM
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8434\dptxbx{\dptxbxtext\pard\plain \s42\qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\lang1033 MM
+\par }}\dpx6100\dpy10045\dpxsize635\dpysize411\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft4840\shptop10025\shpright5815\shpbottom10456\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz241\shplid1227{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 6422528}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1227}}
+{\sp{\sn lineDashing}{\sv 2}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \s42\qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\lang1033 LAPDm
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8433\dptxbx{\dptxbxtext\pard\plain \s42\qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\lang1033 LAPDm
+\par }}\dpx4840\dpy10025\dpxsize975\dpysize431\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft3940\shptop10045\shpright4575\shpbottom10456\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz240\shplid1228{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 6488064}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1228}}
+{\sp{\sn lineDashing}{\sv 2}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \s42\qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\lang1033 L1
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8432\dptxbx{\dptxbxtext\pard\plain \s42\qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\lang1033 L1
+\par }}\dpx3940\dpy10045\dpxsize635\dpysize411\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shpgrp{\*\shpinst\shpleft4740\shptop8679\shpright4965\shpbottom9294\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz236\shplid1229{\sp{\sn groupLeft}{\sv 6255}}{\sp{\sn groupTop}{\sv 11400}}{\sp{\sn groupRight}{\sv 6480}}
+{\sp{\sn groupBottom}{\sv 12015}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn rotation}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}{\shp{\*\shpinst\shplid1230{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11520}}{\sp{\sn relRight}{\sv 6480}}
+{\sp{\sn relBottom}{\sv 12015}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 39}}}}{\shp{\*\shpinst\shplid1231{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11805}}
+{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11805}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 39}}}}{\shp{\*\shpinst\shplid1232{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11715}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11715}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 39}}}}
+{\shp{\*\shpinst\shplid1233{\sp{\sn relLeft}{\sv 6480}}{\sp{\sn relTop}{\sv 11400}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11550}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 1}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 39}}}}
+{\shp{\*\shpinst\shplid1234{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11400}}{\sp{\sn relRight}{\sv 6255}}{\sp{\sn relBottom}{\sv 11550}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 1}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 39}}}}
+{\shp{\*\shpinst\shplid1235{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11625}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11625}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1236{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11905}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11905}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8428\dppolygon\dppolycount4
+\dpptx0\dppty0\dpptx225\dppty0\dpptx225\dppty615\dpptx0\dppty615\dpx4740\dpy8679\dpxsize225\dpysize615\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2470\shptop434\shpright2470\shpbottom674\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz235\shplid1237{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}
+{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8427\dpline\dpptx0\dppty0\dpptx0\dppty240
+\dpx2470\dpy434\dpxsize0\dpysize240\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft2050\shptop454\shpright2050\shpbottom694\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz234\shplid1238
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}
+{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}
+{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8426\dpline\dpptx0\dppty0\dpptx0\dppty240\dpx2050\dpy454\dpxsize0\dpysize240\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft9125\shptop1889\shpright9125\shpbottom8114\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz233\shplid1239{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 1}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}
+{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8425\dpline\dpptx0\dppty0\dpptx0\dppty6225
+\dpx9125\dpy1889\dpxsize0\dpysize6225\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft8590\shptop5108\shpright8845\shpbottom5108\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz232\shplid1240
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}
+{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8424\dpline\dpptx0\dppty0\dpptx255\dppty0\dpx8590\dpy5108\dpxsize255\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft8590\shptop4268\shpright8845\shpbottom4268\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz231\shplid1241{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8423\dpline\dpptx0\dppty0\dpptx255\dppty0
+\dpx8590\dpy4268\dpxsize255\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft105\shptop2819\shpright105\shpbottom4999\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz230\shplid1242
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}
+{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}
+{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8422\dpline\dpptx0\dppty0\dpptx0\dppty2180\dpx105\dpy2819\dpxsize0\dpysize2180\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft1570\shptop7454\shpright8825\shpbottom7454\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz229\shplid1243{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}
+{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8421\dpline\dpptx0\dppty0\dpptx7255\dppty0
+\dpx1570\dpy7454\dpxsize7255\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft8830\shptop3404\shpright8830\shpbottom7469\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz228\shplid1244
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}
+{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8420\dpline\dpptx0\dppty0\dpptx0\dppty4065\dpx8830\dpy3404\dpxsize0\dpysize4065\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5485\shptop3389\shpright5485\shpbottom7469\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz227\shplid1245{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}
+{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}
+{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8419\dpline\dpptx0\dppty0\dpptx0\dppty4080
+\dpx5485\dpy3389\dpxsize0\dpysize4080\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft8595\shptop6843\shpright8850\shpbottom6843\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz226\shplid1246
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}
+{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8418\dpline\dpptx0\dppty0\dpptx255\dppty0\dpx8595\dpy6843\dpxsize255\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft8575\shptop5943\shpright8830\shpbottom5943\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz225\shplid1247{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8417\dpline\dpptx0\dppty0\dpptx255\dppty0
+\dpx8575\dpy5943\dpxsize255\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft5245\shptop6918\shpright5500\shpbottom6918\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz224\shplid1248
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}
+{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8416\dpline\dpptx0\dppty0\dpptx255\dppty0\dpx5245\dpy6918\dpxsize255\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft8590\shptop3408\shpright8845\shpbottom3408\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz223\shplid1249{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8415\dpline\dpptx0\dppty0\dpptx255\dppty0
+\dpx8590\dpy3408\dpxsize255\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft5245\shptop5988\shpright5500\shpbottom5988\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz222\shplid1250
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}
+{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8414\dpline\dpptx0\dppty0\dpptx255\dppty0\dpx5245\dpy5988\dpxsize255\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5245\shptop5103\shpright5500\shpbottom5103\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz221\shplid1251{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8413\dpline\dpptx0\dppty0\dpptx255\dppty0
+\dpx5245\dpy5103\dpxsize255\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft5245\shptop4263\shpright5500\shpbottom4263\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz220\shplid1252
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}
+{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8412\dpline\dpptx0\dppty0\dpptx255\dppty0\dpx5245\dpy4263\dpxsize255\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5245\shptop3378\shpright5500\shpbottom3378\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz219\shplid1253{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8411\dpline\dpptx0\dppty0\dpptx255\dppty0
+\dpx5245\dpy3378\dpxsize255\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft2065\shptop5103\shpright2320\shpbottom5103\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz218\shplid1254
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}
+{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8410\dpline\dpptx0\dppty0\dpptx255\dppty0\dpx2065\dpy5103\dpxsize255\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2065\shptop4248\shpright2320\shpbottom4248\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz217\shplid1255{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8409\dpline\dpptx0\dppty0\dpptx255\dppty0
+\dpx2065\dpy4248\dpxsize255\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft2065\shptop3408\shpright2320\shpbottom3408\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz216\shplid1256
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}
+{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8408\dpline\dpptx0\dppty0\dpptx255\dppty0\dpx2065\dpy3408\dpxsize255\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2320\shptop3404\shpright2320\shpbottom7469\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz215\shplid1257{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}
+{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}
+{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8407\dpline\dpptx0\dppty0\dpptx0\dppty4065
+\dpx2320\dpy3404\dpxsize0\dpysize4065\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft5680\shptop6903\shpright5965\shpbottom6903\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz214\shplid1258
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}
+{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8406\dpline\dpptx0\dppty0\dpptx285\dppty0\dpx5680\dpy6903\dpxsize285\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5680\shptop5988\shpright5965\shpbottom5988\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz213\shplid1259{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8405\dpline\dpptx0\dppty0\dpptx285\dppty0
+\dpx5680\dpy5988\dpxsize285\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft5680\shptop5088\shpright5965\shpbottom5088\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz212\shplid1260
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}
+{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8404\dpline\dpptx0\dppty0\dpptx285\dppty0\dpx5680\dpy5088\dpxsize285\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5680\shptop4248\shpright5965\shpbottom4248\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz211\shplid1261{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8403\dpline\dpptx0\dppty0\dpptx285\dppty0
+\dpx5680\dpy4248\dpxsize285\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft5665\shptop3393\shpright5950\shpbottom3393\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz210\shplid1262
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}
+{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8402\dpline\dpptx0\dppty0\dpptx285\dppty0\dpx5665\dpy3393\dpxsize285\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5665\shptop2831\shpright5665\shpbottom6913\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz209\shplid1263{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8401\dpline\dpptx0\dppty0\dpptx0\dppty4082
+\dpx5665\dpy2831\dpxsize0\dpysize4082\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft2425\shptop6903\shpright2710\shpbottom6903\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz208\shplid1264
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}
+{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8400\dpline\dpptx0\dppty0\dpptx285\dppty0\dpx2425\dpy6903\dpxsize285\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2425\shptop5988\shpright2710\shpbottom5988\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz207\shplid1265{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8399\dpline\dpptx0\dppty0\dpptx285\dppty0
+\dpx2425\dpy5988\dpxsize285\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft2425\shptop5088\shpright2710\shpbottom5088\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz206\shplid1266
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}
+{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8398\dpline\dpptx0\dppty0\dpptx285\dppty0\dpx2425\dpy5088\dpxsize285\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2425\shptop4248\shpright2710\shpbottom4248\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz205\shplid1267{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8397\dpline\dpptx0\dppty0\dpptx285\dppty0
+\dpx2425\dpy4248\dpxsize285\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft2410\shptop3393\shpright2695\shpbottom3393\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz204\shplid1268
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}
+{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8396\dpline\dpptx0\dppty0\dpptx285\dppty0\dpx2410\dpy3393\dpxsize285\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft115\shptop4998\shpright400\shpbottom4998\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz203\shplid1269{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8395\dpline\dpptx0\dppty0\dpptx285\dppty0
+\dpx115\dpy4998\dpxsize285\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft115\shptop4218\shpright400\shpbottom4218\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz202\shplid1270
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}
+{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8394\dpline\dpptx0\dppty0\dpptx285\dppty0\dpx115\dpy4218\dpxsize285\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5950\shptop6562\shpright8575\shpbottom7165\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz201\shplid1271{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 6553600}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1271}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+RM_TrafficChnSuspending
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8393\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {RM_TrafficChnSuspending
+\par }}\dpx5950\dpy6562\dpxsize2625\dpysize603\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5950\shptop5662\shpright8560\shpbottom6265\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz200\shplid1272{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 6619136}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1272}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+RM_DeactivatingSigTrafficChn
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8392\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {RM_DeactivatingSigTrafficChn
+\par }}\dpx5950\dpy5662\dpxsize2610\dpysize603\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5950\shptop4807\shpright8575\shpbottom5410\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz199\shplid1273{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 6684672}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1273}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+\lang1033 RM_TrafficModeEstablished
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8391\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\lang1033 RM_TrafficModeEstablished
+\par }}\dpx5950\dpy4807\dpxsize2625\dpysize603\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5950\shptop3982\shpright8575\shpbottom4585\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz198\shplid1274{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 6750208}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1274}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+RM_ReleasingSigTrafficChn
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8390\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {RM_ReleasingSigTrafficChn
+\par }}\dpx5950\dpy3982\dpxsize2625\dpysize603\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5935\shptop3112\shpright8575\shpbottom3715\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz197\shplid1275{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 6815744}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1275}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+RM_TrafficModeActivated
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8389\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {RM_TrafficModeActivated
+\par }}\dpx5935\dpy3112\dpxsize2640\dpysize603\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2710\shptop6562\shpright5245\shpbottom7165\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz196\shplid1276{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 6881280}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1276}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+RM_ActivatingTrafficMode
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8388\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {RM_ActivatingTrafficMode
+\par }}\dpx2710\dpy6562\dpxsize2535\dpysize603\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2710\shptop5677\shpright5245\shpbottom6280\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz195\shplid1277{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 6946816}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1277}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+RM_SigModeEstablished
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8387\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {RM_SigModeEstablished
+\par }}\dpx2710\dpy5677\dpxsize2535\dpysize603\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2710\shptop4807\shpright5245\shpbottom5410\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz194\shplid1278{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 7012352}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1278}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+RM_TrafficChnActivated
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8386\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {RM_TrafficChnActivated
+\par }}\dpx2710\dpy4807\dpxsize2535\dpysize603\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2695\shptop3967\shpright5230\shpbottom4570\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz193\shplid1279{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 7077888}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1279}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+RM_SigChnActivated
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8385\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {RM_SigChnActivated
+\par }}\dpx2695\dpy3967\dpxsize2535\dpysize603\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2695\shptop3127\shpright5230\shpbottom3730\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz192\shplid1280{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 7143424}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1280}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+ RM_ActivatingSigTrafficChn
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8384\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid { RM_ActivatingSigTrafficChn
+\par }}\dpx2695\dpy3127\dpxsize2535\dpysize603\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft385\shptop4747\shpright2050\shpbottom5350\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz191\shplid1281{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 7208960}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1281}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+RM_RMDown
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8383\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {RM_RMDown
+\par }}\dpx385\dpy4747\dpxsize1665\dpysize603\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft385\shptop3907\shpright2050\shpbottom4510\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz190\shplid1282{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 7274496}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1282}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+RM_RMRunning
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8382\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {RM_RMRunning
+\par }}\dpx385\dpy3907\dpxsize1665\dpysize603\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft6255\shptop1950\shpright7335\shpbottom2368\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz189\shplid1283{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 7340032}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1283}}
+{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 Encode RM Messages
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8381\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 Encode RM Messages
+\par }}\dpx6255\dpy1950\dpxsize1080\dpysize418\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor255\dplinecog255\dplinecob255}}}
+{\shp{\*\shpinst\shpleft4305\shptop1665\shpright5805\shpbottom2128\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz188\shplid1284{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 7405568}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1284}}
+{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\lang1033 ED for GSM Um
+\par ED for GSM Abis
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8380\dptxbx{\dptxbxtext\pard\plain \widctlpar\adjustright \fs20\lang2057\cgrid {\lang1033 ED for GSM Um
+\par ED for GSM Abis
+\par }}\dpx4305\dpy1665\dpxsize1500\dpysize463\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor255\dplinecog255\dplinecob255}}}
+{\shp{\*\shpinst\shpleft4020\shptop1455\shpright6015\shpbottom2346\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz187\shplid1285{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 7471104}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1285}}
+{\sp{\sn lineDashing}{\sv 2}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \s42\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8379\dptxbx{\dptxbxtext\pard\plain \s42\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {
+\par }}\dpx4020\dpy1455\dpxsize1995\dpysize891\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft1545\shptop524\shpright1950\shpbottom1649\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz186\shplid1286{\sp{\sn shapeType}{\sv 19}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}
+{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8378\dppolygon\dppolycount33\dpptx0\dppty0\dpptx21\dppty2\dpptx41\dppty5\dpptx62\dppty13\dpptx82\dppty23\dpptx101\dppty36\dpptx121\dppty50
+\dpptx139\dppty68\dpptx157\dppty88\dpptx176\dppty112\dpptx193\dppty137\dpptx210\dppty164\dpptx226\dppty193\dpptx242\dppty223\dpptx258\dppty257\dpptx272\dppty292\dpptx286\dppty329\dpptx300\dppty369\dpptx312\dppty410\dpptx325\dppty452\dpptx336\dppty497
+\dpptx347\dppty542\dpptx356\dppty589\dpptx365\dppty637\dpptx373\dppty688\dpptx380\dppty738\dpptx387\dppty790\dpptx392\dppty844\dpptx397\dppty898\dpptx400\dppty954\dpptx403\dppty1010\dpptx404\dppty1067\dpptx405\dppty1125
+\dpx1545\dpy524\dpxsize405\dpysize1125\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft1950\shptop434\shpright2145\shpbottom674\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz185\shplid1287{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}
+{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8377\dprect\dpx1950\dpy434\dpxsize195\dpysize240
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2790\shptop149\shpright4020\shpbottom589\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz184\shplid1288{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 1230}}
+{\sp{\sn geoBottom}{\sv 440}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;13;(0,420);(182,430);(365,440);(465,405);(565,370);(535,270);(600,210);(665,150);(750,80);(855,45);(960,10);(1095,5);(1230,0)}}{\sp{\sn pSegmentInfo}{\sv 2;11
+;16384;44288;8193;44288;8193;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}
+{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}{\sp{\sn lineFillWidth}{\sv 0}}{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}
+{\sp{\sn lineWidth}{\sv 15875}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}{\sp{\sn lineStartArrowhead}{\sv 1}}{\sp{\sn lineEndCapStyle}{\sv 2}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}
+{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}
+{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}
+{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}
+{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}
+{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8376\dppolygon\dppolycount43\dpptx0\dppty419\dpptx67\dppty422\dpptx136\dppty426
+\dpptx201\dppty428\dpptx262\dppty429\dpptx321\dppty427\dpptx348\dppty425\dpptx376\dppty422\dpptx400\dppty420\dpptx423\dppty415\dpptx445\dppty410\dpptx464\dppty404\dpptx482\dppty397\dpptx496\dppty388\dpptx510\dppty378\dpptx520\dppty367\dpptx527\dppty356
+\dpptx535\dppty343\dpptx545\dppty316\dpptx555\dppty289\dpptx567\dppty260\dpptx581\dppty234\dpptx588\dppty222\dpptx600\dppty210\dpptx626\dppty187\dpptx653\dppty164\dpptx681\dppty141\dpptx712\dppty118\dpptx746\dppty96\dpptx779\dppty77\dpptx797\dppty68
+\dpptx817\dppty60\dpptx834\dppty52\dpptx854\dppty45\dpptx874\dppty39\dpptx895\dppty33\dpptx939\dppty24\dpptx984\dppty17\dpptx1029\dppty11\dpptx1078\dppty7\dpptx1128\dppty4\dpptx1179\dppty2\dpptx1228\dppty0\dpx2790\dpy149\dpxsize1230\dpysize440
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2670\shptop434\shpright2670\shpbottom674\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz183\shplid1289{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}
+{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8375\dpline\dpptx0\dppty0\dpptx0\dppty240
+\dpx2670\dpy434\dpxsize0\dpysize240\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft2565\shptop434\shpright2565\shpbottom674\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz182\shplid1290
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}
+{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}
+{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8374\dpline\dpptx0\dppty0\dpptx0\dppty240\dpx2565\dpy434\dpxsize0\dpysize240\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2370\shptop449\shpright2370\shpbottom689\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz181\shplid1291{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}
+{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8373\dpline\dpptx0\dppty0\dpptx0\dppty240
+\dpx2370\dpy449\dpxsize0\dpysize240\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft2250\shptop434\shpright2250\shpbottom674\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz180\shplid1292
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}
+{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}
+{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8372\dpline\dpptx0\dppty0\dpptx0\dppty240\dpx2250\dpy434\dpxsize0\dpysize240\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2790\shptop674\shpright2880\shpbottom674\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz179\shplid1293{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}
+{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8371\dpline\dpptx0\dppty0\dpptx90\dppty0
+\dpx2790\dpy674\dpxsize90\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft2775\shptop434\shpright2880\shpbottom434\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz178\shplid1294
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}
+{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}
+{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8370\dpline\dpptx0\dppty0\dpptx105\dppty0\dpx2775\dpy434\dpxsize105\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2145\shptop434\shpright2775\shpbottom674\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz177\shplid1295{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}
+{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8369\dprect\dpx2145\dpy434\dpxsize630\dpysize240
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft1815\shptop-38\shpright3030\shpbottom407\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz176\shplid1296{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 7536640}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1296}}
+{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \s27\qc\widctlpar\adjustright \f1\fs16\cgrid {\f0 RM Inboud }{Message Queue
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8368\dptxbx{\dptxbxtext\pard\plain \s27\qc\widctlpar\adjustright \f1\fs16\cgrid {\f0 RM Inboud }{Message Queue
+\par }}\dpx1815\dpy-38\dpxsize1215\dpysize445\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor255\dplinecog255\dplinecob255}}}
+{\shp{\*\shpinst\shpleft805\shptop9466\shpright2815\shpbottom9769\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz175\shplid1297{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 7602176}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1297}}
+{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\i\fs16 RM sub-modules/functions
+\par }{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8367\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\i\fs16 RM sub-modules/functions
+\par }{
+\par }}\dpx805\dpy9466\dpxsize2010\dpysize303\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor255\dplinecog255\dplinecob255}}}
+{\shp{\*\shpinst\shpleft250\shptop9121\shpright1210\shpbottom9410\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz174\shplid1298{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 7667712}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1298}}
+{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\i\fs16 Dashed block:}{
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8366\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\i\fs16 Dashed block:}{
+\par }}\dpx250\dpy9121\dpxsize960\dpysize289\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor255\dplinecog255\dplinecob255}}}
+{\shp{\*\shpinst\shpleft240\shptop9943\shpright735\shpbottom9943\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz173\shplid1299{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 1}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8365
+\dpline\dpptx495\dppty0\dpptx0\dppty0\dpx240\dpy9943\dpxsize495\dpysize0\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft1230\shptop9121\shpright3180\shpbottom9373\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz172\shplid1300{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 7733248}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1300}}
+{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \s56\sb60\sa60\widctlpar\adjustright \i\fs20\lang2057\cgrid {\i0\fs16 Non-RM modules/functions
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8364\dptxbx{\dptxbxtext\pard\plain \s56\sb60\sa60\widctlpar\adjustright \i\fs20\lang2057\cgrid {\i0\fs16 Non-RM modules/functions
+\par }}\dpx1230\dpy9121\dpxsize1950\dpysize252\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor255\dplinecog255\dplinecob255}}}
+{\shp{\*\shpinst\shpleft255\shptop9441\shpright720\shpbottom9734\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz171\shplid1301{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8363\dprect\dpx255\dpy9441\dpxsize465\dpysize293
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft250\shptop8729\shpright1060\shpbottom9042\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz170\shplid1302{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 7798784}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1302}}
+{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\ul Legend:
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8362\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\ul Legend:
+\par }}\dpx250\dpy8729\dpxsize810\dpysize313\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor255\dplinecog255\dplinecob255}}}
+{\shp{\*\shpinst\shpleft2280\shptop1900\shpright4020\shpbottom1900\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz169\shplid1303{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8361\dpline\dpptx0\dppty0\dpptx1740\dppty0
+\dpx2280\dpy1900\dpxsize1740\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft6260\shptop8108\shpright9140\shpbottom8108\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz168\shplid1304
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 1}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}
+{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8360\dpline\dpptx2880\dppty0\dpptx0\dppty0\dpx6260\dpy8108\dpxsize2880\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2410\shptop2831\shpright2410\shpbottom6913\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz167\shplid1305{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 1}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8359\dpline\dpptx0\dppty0\dpptx0\dppty4082
+\dpx2410\dpy2831\dpxsize0\dpysize4082\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft6035\shptop1901\shpright9120\shpbottom1901\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz166\shplid1306
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 1}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineStartArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}
+{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8358\dpline\dpptx3085\dppty0\dpptx0\dppty0\dpx6035\dpy1901\dpxsize3085\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5485\shptop7464\shpright5485\shpbottom7863\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz164\shplid1307{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8356\dpline\dpptx0\dppty0\dpptx0\dppty399
+\dpx5485\dpy7464\dpxsize0\dpysize399\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft4800\shptop7863\shpright6240\shpbottom8391\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz163\shplid1308
+{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn lTxid}{\sv 7864320}}{\sp{\sn hspNext}{\sv 1308}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid { RM_Send
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8355\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid { RM_Send
+\par }}\dpx4800\dpy7863\dpxsize1440\dpysize528\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft115\shptop3423\shpright400\shpbottom3423\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz162\shplid1309{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8354\dpline\dpptx0\dppty0\dpptx285\dppty0
+\dpx115\dpy3423\dpxsize285\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft130\shptop2817\shpright5680\shpbottom2817\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz161\shplid1310
+{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}
+{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8353\dpline\dpptx0\dppty0\dpptx5550\dppty0\dpx130\dpy2817\dpxsize5550\dpysize0\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft1560\shptop2174\shpright1560\shpbottom2822\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz160\shplid1311{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8352\dpline\dpptx0\dppty0\dpptx0\dppty648
+\dpx1560\dpy2174\dpxsize0\dpysize648\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}{\shp{\*\shpinst\shpleft400\shptop3127\shpright2065\shpbottom3730\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz159\shplid1312
+{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn lTxid}{\sv 7929856}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}
+{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1312}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid { RM_InitialisingRM
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8351\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid { RM_InitialisingRM
+\par }}\dpx400\dpy3127\dpxsize1665\dpysize603\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft2685\shptop1395\shpright3765\shpbottom1813\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz158\shplid1313{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 7995392}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1313}}
+{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 Decode RM Messages
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8350\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 Decode RM Messages
+\par }}\dpx2685\dpy1395\dpxsize1080\dpysize418\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor255\dplinecog255\dplinecob255}}}
+{\shp{\*\shpinst\shpleft840\shptop1646\shpright2280\shpbottom2174\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz156\shplid1314{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 8060928}}{\sp{\sn hspNext}{\sv 1314}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid { RM_Main
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8348\dptxbx{\dptxbxtext\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid { RM_Main
+\par }}\dpx840\dpy1646\dpxsize1440\dpysize528\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft1610\shptop2215\shpright3230\shpbottom2678\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz155\shplid1315{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 8126464}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1315}}
+{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 Dispatch RM messages to proper sub-modules
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8347\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 Dispatch RM messages to proper sub-modules
+\par }}\dpx1610\dpy2215\dpxsize1620\dpysize463\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor255\dplinecog255\dplinecob255}}}
+{\shp{\*\shpinst\shpleft2727\shptop7482\shpright4122\shpbottom8082\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz154\shplid1316{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 8192000}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1316}}
+{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 Retrieve destination IDs of RM outbound messages
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8346\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16\lang1033 Retrieve destination IDs of RM outbound messages
+\par }}\dpx2727\dpy7482\dpxsize1395\dpysize600\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor255\dplinecog255\dplinecob255}}}}{
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par
+\par }{\lang1024 {\shp{\*\shpinst\shpleft297\shptop177\shpright1572\shpbottom657\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz153\shplid1317{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 8257536}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1317}}
+{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16 Update relevant IRT data entries
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8345\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16 Update relevant IRT data entries
+\par }}\dpx297\dpy177\dpxsize1275\dpysize480\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor255\dplinecog255\dplinecob255}}}}{
+\par
+\par
+\par }{\lang1024 {\shp{\*\shpinst\shpleft6657\shptop327\shpright8052\shpbottom927\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz165\shplid1318{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 8323072}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1318}}
+{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lidRegroup}{\sv 1}}{\shptxt \pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16 RM associated Outbound Message Queues
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8357\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\fs16 RM associated Outbound Message Queues
+\par }}\dpx6657\dpy327\dpxsize1395\dpysize600\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor255\dplinecog255\dplinecob255}}}
+{\shp{\*\shpinst\shpleft6142\shptop104\shpright6457\shpbottom464\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz263\shplid1319{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn geoRight}{\sv 495}}{\sp{\sn geoBottom}{\sv 390}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;10;(23,0);(11,35);(0,70);(68,90);(136,110);(361,70);(428,120);(495,170);(484,280);(473,390)}}{\sp{\sn pSegmentInfo}{\sv 2;9
+;16384;44288;8193;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8455
+\dppolygon\dppolycount47\dpptx15\dppty0\dpptx12\dppty12\dpptx10\dppty24\dpptx9\dppty36\dpptx9\dppty42\dpptx10\dppty47\dpptx11\dppty52\dpptx13\dppty57\dpptx16\dppty62\dpptx20\dppty66\dpptx24\dppty71\dpptx29\dppty76\dpptx36\dppty79\dpptx43\dppty83
+\dpptx48\dppty85\dpptx52\dppty86\dpptx58\dppty87\dpptx64\dppty88\dpptx76\dppty88\dpptx91\dppty89\dpptx107\dppty88\dpptx123\dppty88\dpptx140\dppty87\dpptx158\dppty87\dpptx175\dppty87\dpptx192\dppty87\dpptx209\dppty88\dpptx224\dppty90\dpptx239\dppty92
+\dpptx251\dppty97\dpptx257\dppty100\dpptx263\dppty103\dpptx268\dppty106\dpptx272\dppty111\dpptx279\dppty120\dpptx285\dppty130\dpptx291\dppty142\dpptx295\dppty155\dpptx299\dppty168\dpptx302\dppty183\dpptx304\dppty198\dpptx305\dppty214\dpptx305\dppty231
+\dpptx306\dppty248\dpptx305\dppty284\dpptx303\dppty321\dpptx300\dppty359\dpx6142\dpy104\dpxsize315\dpysize360\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5835\shptop104\shpright6060\shpbottom484\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz245\shplid1320{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 360}}
+{\sp{\sn geoBottom}{\sv 380}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;10;(0,0);(23,40);(47,80);(100,100);(153,120);(280,73);(320,120);(360,167);(350,273);(340,380)}}{\sp{\sn pSegmentInfo}{\sv 2;9;16384;44288;8193
+;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}{\sp{\sn lineCrMod}{\sv 536870912}}
+{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}{\sp{\sn lineFillWidth}{\sv 0}}{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}
+{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn lineEndCapStyle}{\sv 2}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}
+{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}
+{\sp{\sn shadowSecondOffsetX}{\sv 0}}{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}
+{\sp{\sn shadowPerspectiveX}{\sv 0}}{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}
+{\sp{\sn dxyCalloutGap}{\sv 76200}}{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}
+{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8437\dppolygon\dppolycount39\dpptx0\dppty0\dpptx6\dppty15\dpptx11\dppty30\dpptx18\dppty44\dpptx24\dppty57\dpptx32\dppty70\dpptx41\dppty81
+\dpptx46\dppty86\dpptx51\dppty91\dpptx56\dppty95\dpptx63\dppty100\dpptx69\dppty103\dpptx77\dppty105\dpptx85\dppty105\dpptx94\dppty105\dpptx104\dppty104\dpptx114\dppty103\dpptx134\dppty100\dpptx144\dppty98\dpptx154\dppty98\dpptx164\dppty98
+\dpptx172\dppty100\dpptx181\dppty102\dpptx188\dppty106\dpptx194\dppty112\dpptx199\dppty120\dpptx204\dppty130\dpptx208\dppty140\dpptx210\dppty152\dpptx213\dppty165\dpptx214\dppty179\dpptx216\dppty195\dpptx217\dppty210\dpptx218\dppty227\dpptx218\dppty244
+\dpptx218\dppty263\dpptx216\dppty300\dpptx214\dppty339\dpptx212\dppty379\dpx5835\dpy104\dpxsize225\dpysize380\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5280\shptop104\shpright5355\shpbottom524\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz264\shplid1321{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn geoRight}{\sv 75}}{\sp{\sn geoBottom}{\sv 420}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;7;(75,0);(51,32);(27,65);(15,135);(3,205);(1,312);(0,420)}}{\sp{\sn pSegmentInfo}{\sv 2;7;16384;44288;8193
+;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8456\dppolygon\dppolycount27
+\dpptx74\dppty0\dpptx65\dppty12\dpptx56\dppty25\dpptx48\dppty38\dpptx44\dppty46\dpptx40\dppty53\dpptx36\dppty61\dpptx33\dppty70\dpptx29\dppty79\dpptx26\dppty89\dpptx23\dppty99\dpptx20\dppty110\dpptx17\dppty122\dpptx15\dppty134\dpptx13\dppty148
+\dpptx11\dppty163\dpptx9\dppty177\dpptx8\dppty194\dpptx6\dppty210\dpptx5\dppty226\dpptx4\dppty245\dpptx3\dppty263\dpptx3\dppty281\dpptx2\dppty300\dpptx1\dppty339\dpptx0\dppty379\dpptx0\dppty419\dpx5280\dpy104\dpxsize75\dpysize420
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5625\shptop119\shpright5645\shpbottom519\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz244\shplid1322{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 20}}
+{\sp{\sn geoBottom}{\sv 400}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;4;(0,0);(8,166);(17,333);(20,400)}}{\sp{\sn pSegmentInfo}{\sv 2;5;16384;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}
+{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}{\sp{\sn lineFillWidth}{\sv 0}}
+{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn lineEndCapStyle}{\sv 2}}
+{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}{\sp{\sn shadowHighlight}{\sv 13355979}}
+{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}{\sp{\sn shadowSecondOffsetY}{\sv 0}}
+{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}{\sp{\sn shadowPerspectiveY}{\sv 0}}
+{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}
+{\sp{\sn dxyCalloutGap}{\sv 76200}}{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}
+{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8436\dppolygon\dppolycount16\dpptx0\dppty0\dpptx3\dppty62\dpptx6\dppty123\dpptx7\dppty152\dpptx9\dppty182\dpptx10\dppty209\dpptx11\dppty237
+\dpptx13\dppty262\dpptx14\dppty287\dpptx15\dppty310\dpptx16\dppty332\dpptx17\dppty351\dpptx18\dppty369\dpptx18\dppty385\dpptx19\dppty392\dpptx19\dppty399\dpx5625\dpy119\dpxsize20\dpysize400
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}}{
+\par }{\lang1024 {\shpgrp{\*\shpinst\shpleft6350\shptop4\shpright6575\shpbottom619\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz262\shplid1323{\sp{\sn groupLeft}{\sv 6255}}{\sp{\sn groupTop}{\sv 11400}}{\sp{\sn groupRight}{\sv 6480}}
+{\sp{\sn groupBottom}{\sv 12015}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn rotation}{\sv 0}}{\sp{\sn lidRegroup}{\sv 0}}{\shp{\*\shpinst\shplid1324{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11520}}{\sp{\sn relRight}{\sv 6480}}
+{\sp{\sn relBottom}{\sv 12015}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn lineDashing}{\sv 8}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1325{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11805}}
+{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11805}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 8}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1326{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11715}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11715}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 8}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1327{\sp{\sn relLeft}{\sv 6480}}{\sp{\sn relTop}{\sv 11400}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11550}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 1}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 8}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1328{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11400}}{\sp{\sn relRight}{\sv 6255}}{\sp{\sn relBottom}{\sv 11550}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 1}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 8}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1329{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11625}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11625}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 8}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1330{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11905}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11905}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 8}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8454\dppolygon\dppolycount4
+\dpptx0\dppty0\dpptx225\dppty0\dpptx225\dppty615\dpptx0\dppty615\dpx6350\dpy4\dpxsize225\dpysize615\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shpgrp{\*\shpinst\shpleft5520\shptop39\shpright5745\shpbottom654\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz238\shplid1331{\sp{\sn groupLeft}{\sv 6255}}{\sp{\sn groupTop}{\sv 11400}}{\sp{\sn groupRight}{\sv 6480}}
+{\sp{\sn groupBottom}{\sv 12015}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn rotation}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}{\shp{\*\shpinst\shplid1332{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11520}}{\sp{\sn relRight}{\sv 6480}}
+{\sp{\sn relBottom}{\sv 12015}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1333{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11805}}
+{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11805}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1334{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11715}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11715}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1335{\sp{\sn relLeft}{\sv 6480}}{\sp{\sn relTop}{\sv 11400}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11550}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 1}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1336{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11400}}{\sp{\sn relRight}{\sv 6255}}{\sp{\sn relBottom}{\sv 11550}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 1}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1337{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11625}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11625}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1338{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11905}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11905}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8430\dppolygon\dppolycount4
+\dpptx0\dppty0\dpptx225\dppty0\dpptx225\dppty615\dpptx0\dppty615\dpx5520\dpy39\dpxsize225\dpysize615\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shpgrp{\*\shpinst\shpleft5945\shptop34\shpright6170\shpbottom649\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz239\shplid1339{\sp{\sn groupLeft}{\sv 6255}}{\sp{\sn groupTop}{\sv 11400}}{\sp{\sn groupRight}{\sv 6480}}
+{\sp{\sn groupBottom}{\sv 12015}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn rotation}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}{\shp{\*\shpinst\shplid1340{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11520}}{\sp{\sn relRight}{\sv 6480}}
+{\sp{\sn relBottom}{\sv 12015}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn lineDashing}{\sv 8}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1341{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11805}}
+{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11805}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 8}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1342{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11715}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11715}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 8}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1343{\sp{\sn relLeft}{\sv 6480}}{\sp{\sn relTop}{\sv 11400}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11550}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 1}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 8}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1344{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11400}}{\sp{\sn relRight}{\sv 6255}}{\sp{\sn relBottom}{\sv 11550}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 1}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 8}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1345{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11625}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11625}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 8}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1346{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11905}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11905}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 8}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8431\dppolygon\dppolycount4
+\dpptx0\dppty0\dpptx225\dppty0\dpptx225\dppty615\dpptx0\dppty615\dpx5945\dpy34\dpxsize225\dpysize615\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}
+{\shpgrp{\*\shpinst\shpleft5165\shptop39\shpright5390\shpbottom654\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz237\shplid1347{\sp{\sn groupLeft}{\sv 6255}}{\sp{\sn groupTop}{\sv 11400}}{\sp{\sn groupRight}{\sv 6480}}
+{\sp{\sn groupBottom}{\sv 12015}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn rotation}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}{\shp{\*\shpinst\shplid1348{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11520}}{\sp{\sn relRight}{\sv 6480}}
+{\sp{\sn relBottom}{\sv 12015}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1349{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11805}}
+{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11805}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}
+{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}{\shp{\*\shpinst\shplid1350{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11715}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11715}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1351{\sp{\sn relLeft}{\sv 6480}}{\sp{\sn relTop}{\sv 11400}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11550}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 1}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1352{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11400}}{\sp{\sn relRight}{\sv 6255}}{\sp{\sn relBottom}{\sv 11550}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 1}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1353{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11625}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11625}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}
+{\shp{\*\shpinst\shplid1354{\sp{\sn relLeft}{\sv 6255}}{\sp{\sn relTop}{\sv 11905}}{\sp{\sn relRight}{\sv 6480}}{\sp{\sn relBottom}{\sv 11905}}{\sp{\sn fRelFlipH}{\sv 0}}
+{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 20}}{\sp{\sn fAutoTextMargin}{\sv 0}}{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}
+{\sp{\sn shapePath}{\sv 4}}{\sp{\sn fFillOK}{\sv 0}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineDashing}{\sv 6}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn fShadow}{\sv 0}}
+{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8429\dppolygon\dppolycount4
+\dpptx0\dppty0\dpptx225\dppty0\dpptx225\dppty615\dpptx0\dppty615\dpx5165\dpy39\dpxsize225\dpysize615\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}}{
+\par }{\lang1024 {\shp{\*\shpinst\shpleft6465\shptop254\shpright8445\shpbottom974\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz266\shplid1355{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn geoRight}{\sv 1980}}{\sp{\sn geoBottom}{\sv 720}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;10;(0,0);(47,51);(95,102);(360,135);(625,168);(1320,98);(1590,195);(1860,292);(1915,630);(1980,720)}}{\sp{\sn pSegmentInfo}{\sv 2;9
+;16384;44288;8193;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn fArrowheadsOK}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8458
+\dppolygon\dppolycount48\dpptx0\dppty0\dpptx19\dppty20\dpptx38\dppty38\dpptx67\dppty56\dpptx98\dppty74\dpptx120\dppty83\dpptx143\dppty91\dpptx168\dppty99\dpptx200\dppty107\dpptx234\dppty114\dpptx272\dppty121\dpptx314\dppty128\dpptx361\dppty135
+\dpptx415\dppty139\dpptx478\dppty143\dpptx548\dppty144\dpptx627\dppty145\dpptx706\dppty144\dpptx795\dppty143\dpptx973\dppty141\dpptx1061\dppty141\dpptx1150\dppty142\dpptx1239\dppty145\dpptx1321\dppty150\dpptx1397\dppty157\dpptx1470\dppty166
+\dpptx1533\dppty179\dpptx1590\dppty195\dpptx1616\dppty205\dpptx1638\dppty215\dpptx1660\dppty228\dpptx1682\dppty242\dpptx1720\dppty272\dpptx1755\dppty305\dpptx1787\dppty341\dpptx1815\dppty379\dpptx1841\dppty419\dpptx1863\dppty460\dpptx1882\dppty500
+\dpptx1898\dppty539\dpptx1913\dppty577\dpptx1929\dppty613\dpptx1942\dppty645\dpptx1955\dppty675\dpptx1961\dppty688\dpptx1967\dppty699\dpptx1974\dppty710\dpptx1980\dppty719\dpx6465\dpy254\dpxsize1980\dpysize720
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft6035\shptop294\shpright7425\shpbottom1019\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz249\shplid1356{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 1060}}
+{\sp{\sn geoBottom}{\sv 740}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;10;(0,0);(91,98);(183,197);(320,240);(457,283);(697,177);(820,260);(943,343);(1001,541);(1060,740)}}{\sp{\sn pSegmentInfo}{\sv 2;9;16384;44288
+;8193;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}
+{\sp{\sn lineFillWidth}{\sv 0}}{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}
+{\sp{\sn lineEndCapStyle}{\sv 2}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}
+{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}
+{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}
+{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}
+{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}
+{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8441\dppolygon\dppolycount38\dpptx0\dppty0\dpptx45\dppty36\dpptx92\dppty72\dpptx138\dppty106\dpptx186\dppty138\dpptx240\dppty167\dpptx296\dppty194
+\dpptx355\dppty216\dpptx387\dppty226\dpptx421\dppty234\dpptx456\dppty241\dpptx494\dppty245\dpptx534\dppty245\dpptx576\dppty244\dpptx618\dppty241\dpptx662\dppty238\dpptx754\dppty229\dpptx799\dppty226\dpptx843\dppty224\dpptx888\dppty222\dpptx930\dppty222
+\dpptx969\dppty226\dpptx1007\dppty232\dpptx1043\dppty241\dpptx1074\dppty254\dpptx1103\dppty270\dpptx1130\dppty290\dpptx1157\dppty311\dpptx1182\dppty334\dpptx1204\dppty360\dpptx1223\dppty387\dpptx1243\dppty416\dpptx1263\dppty447\dpptx1281\dppty478
+\dpptx1297\dppty511\dpptx1330\dppty580\dpptx1359\dppty651\dpptx1387\dppty724\dpx6035\dpy294\dpxsize1390\dpysize725\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5615\shptop269\shpright6390\shpbottom1059\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz248\shplid1357{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 580}}
+{\sp{\sn geoBottom}{\sv 760}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;10;(0,0);(60,105);(120,210);(200,280);(280,350);(417,340);(480,420);(543,500);(563,707);(580,760)}}{\sp{\sn pSegmentInfo}{\sv 2;9;16384
+;44288;8193;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}{\sp{\sn lineCrMod}{\sv 536870912}}{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}
+{\sp{\sn lineFillWidth}{\sv 0}}{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}
+{\sp{\sn lineEndCapStyle}{\sv 2}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}
+{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}{\sp{\sn shadowSecondOffsetX}{\sv 0}}
+{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}{\sp{\sn shadowPerspectiveX}{\sv 0}}
+{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}{\sp{\sn dxyCalloutGap}{\sv 76200}}
+{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}
+{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}
+{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8440\dppolygon\dppolycount35\dpptx0\dppty0\dpptx60\dppty81\dpptx92\dppty121\dpptx124\dppty159\dpptx156\dppty194\dpptx191\dppty230\dpptx228\dppty262
+\dpptx267\dppty291\dpptx287\dppty304\dpptx310\dppty315\dpptx334\dppty323\dpptx358\dppty333\dpptx409\dppty346\dpptx462\dppty359\dpptx513\dppty373\dpptx538\dppty380\dpptx561\dppty388\dpptx584\dppty398\dpptx604\dppty409\dpptx624\dppty421\dpptx640\dppty437
+\dpptx655\dppty454\dpptx668\dppty473\dpptx681\dppty496\dpptx693\dppty519\dpptx704\dppty544\dpptx714\dppty570\dpptx731\dppty623\dpptx744\dppty675\dpptx750\dppty701\dpptx755\dppty723\dpptx760\dppty743\dpptx766\dppty761\dpptx770\dppty778\dpptx774\dppty789
+\dpx5615\dpy269\dpxsize775\dpysize790\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}
+{\shp{\*\shpinst\shpleft5235\shptop299\shpright5358\shpbottom1019\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz247\shplid1358{\sp{\sn shapeType}{\sv 0}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn rotation}{\sv 0}}{\sp{\sn WrapText}{\sv 0}}{\sp{\sn anchorText}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn cdirFont}{\sv 0}}{\sp{\sn fAutoTextMargin}{\sv 0}}
+{\sp{\sn fRotateText}{\sv 0}}{\sp{\sn fFitShapeToText}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\sp{\sn pictureDblCrMod}{\sv 268435700}}{\sp{\sn pictureFillCrMod}{\sv 536870912}}{\sp{\sn pictureLineCrMod}{\sv 536870912}}{\sp{\sn geoRight}{\sv 123}}
+{\sp{\sn geoBottom}{\sv 720}}{\sp{\sn shapePath}{\sv 4}}{\sp{\sn pVerticies}{\sv 8;10;(50,0);(25,55);(0,110);(10,200);(20,290);(97,453);(110,540);(123,627);(90,693);(90,720)}}{\sp{\sn pSegmentInfo}{\sv 2;9;16384;44288;8193
+;44288;8193;44288;8193;44032;32768}}{\sp{\sn fFillOK}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn lineColor}{\sv 0}}{\sp{\sn lineOpacity}{\sv 65536}}{\sp{\sn lineCrMod}{\sv 536870912}}
+{\sp{\sn lineType}{\sv 0}}{\sp{\sn lineFillBlipFlags}{\sv 0}}{\sp{\sn lineFillWidth}{\sv 0}}{\sp{\sn lineFillHeight}{\sv 0}}{\sp{\sn lineFillDztype}{\sv 0}}{\sp{\sn lineWidth}{\sv 15875}}
+{\sp{\sn lineMiterLimit}{\sv 524288}}{\sp{\sn lineStyle}{\sv 0}}{\sp{\sn lineDashing}{\sv 0}}{\sp{\sn lineEndArrowhead}{\sv 1}}{\sp{\sn lineEndCapStyle}{\sv 2}}{\sp{\sn fArrowheadsOK}{\sv 1}}{\sp{\sn fHitTestLine}{\sv 1}}{\sp{\sn lineFillShape}{\sv 1}}
+{\sp{\sn shadowType}{\sv 0}}{\sp{\sn shadowColor}{\sv 8421504}}{\sp{\sn shadowHighlight}{\sv 13355979}}{\sp{\sn shadowCrMod}{\sv 536870912}}{\sp{\sn shadowOpacity}{\sv 65536}}{\sp{\sn shadowOffsetX}{\sv 25400}}{\sp{\sn shadowOffsetY}{\sv 25400}}
+{\sp{\sn shadowSecondOffsetX}{\sv 0}}{\sp{\sn shadowSecondOffsetY}{\sv 0}}{\sp{\sn shadowScaleXToX}{\sv 65536}}{\sp{\sn shadowScaleYToX}{\sv 0}}{\sp{\sn shadowScaleXToY}{\sv 0}}{\sp{\sn shadowScaleYToY}{\sv 65536}}
+{\sp{\sn shadowPerspectiveX}{\sv 0}}{\sp{\sn shadowPerspectiveY}{\sv 0}}{\sp{\sn shadowWeight}{\sv 256}}{\sp{\sn shadowOriginX}{\sv 0}}{\sp{\sn shadowOriginY}{\sv 0}}{\sp{\sn fShadow}{\sv 0}}{\sp{\sn fshadowObscured}{\sv 0}}{\sp{\sn bWMode}{\sv 1}}
+{\sp{\sn dxyCalloutGap}{\sv 76200}}{\sp{\sn spcoa}{\sv 0}}{\sp{\sn spcod}{\sv 3}}{\sp{\sn dxyCalloutDropSpecified}{\sv 114300}}{\sp{\sn dxyCalloutLengthSpecified}{\sv 0}}
+{\sp{\sn fCalloutMinusX}{\sv 0}}{\sp{\sn fCalloutMinusY}{\sv 0}}{\sp{\sn fCalloutDropAuto}{\sv 0}}{\sp{\sn fCalloutLengthSpecified}{\sv 0}}{\sp{\sn dxWrapDistLeft}{\sv 114300}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dxWrapDistRight}{\sv 114300}}
+{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn lidRegroup}{\sv 1}}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8439\dppolygon\dppolycount60\dpptx50\dppty0\dpptx40\dppty21\dpptx36\dppty31\dpptx31\dppty41\dpptx27\dppty53\dpptx24\dppty63\dpptx20\dppty75
+\dpptx17\dppty86\dpptx14\dppty99\dpptx12\dppty112\dpptx10\dppty124\dpptx8\dppty138\dpptx8\dppty152\dpptx8\dppty167\dpptx8\dppty183\dpptx9\dppty191\dpptx10\dppty199\dpptx11\dppty209\dpptx12\dppty217\dpptx14\dppty227\dpptx17\dppty236\dpptx19\dppty247
+\dpptx22\dppty257\dpptx25\dppty267\dpptx28\dppty278\dpptx31\dppty289\dpptx35\dppty301\dpptx42\dppty324\dpptx50\dppty347\dpptx58\dppty371\dpptx67\dppty394\dpptx75\dppty417\dpptx82\dppty440\dpptx90\dppty462\dpptx93\dppty473\dpptx96\dppty484\dpptx99\dppty493
+\dpptx102\dppty503\dpptx104\dppty513\dpptx106\dppty522\dpptx108\dppty531\dpptx109\dppty539\dpptx110\dppty547\dpptx111\dppty555\dpptx112\dppty563\dpptx112\dppty571\dpptx112\dppty578\dpptx112\dppty586\dpptx111\dppty600\dpptx110\dppty614\dpptx108\dppty628
+\dpptx106\dppty641\dpptx104\dppty652\dpptx99\dppty674\dpptx97\dppty683\dpptx94\dppty692\dpptx92\dppty700\dpptx91\dppty707\dpptx90\dppty713\dpptx89\dppty719\dpx5235\dpy299\dpxsize123\dpysize720
+\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew25\dplinecor0\dplinecog0\dplinecob0}}}}{
+\par
+\par }{\lang1024 {\shp{\*\shpinst\shpleft8135\shptop260\shpright8935\shpbottom671\shpfhdr0\shpbxcolumn\shpbypara\shpwr3\shpwrk0\shpfblwtxt0\shpz265\shplid1359{\sp{\sn shapeType}{\sv 3}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}
+{\sp{\sn lTxid}{\sv 8388608}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn hspNext}{\sv 1359}}{\sp{\sn lineDashing}{\sv 2}}{\sp{\sn fLine}{\sv 1}}{\shptxt \pard\plain
+\qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\revised\lang1033\revauth1\revdttm1714043994 CM}{\lang1033
+\par }}}{\shprslt{\*\do\dobxcolumn\dobypara\dodhgt8457\dptxbx{\dptxbxtext\pard\plain \qc\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\revised\lang1033\revauth1\revdttm1714043994 CM}{\lang1033
+\par }}\dpx8135\dpy260\dpxsize800\dpysize411\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat1\dplinew15\dplinecor0\dplinecog0\dplinecob0}}}}{
+\par
+\par }\pard\plain \s40\qc\sb60\sa60\widctlpar\adjustright \b\fs20\lang2057\cgrid {
+\par }\pard \s40\qc\sb60\sa60\widctlpar\pnrnot1\adjustright {Figure }{\field{\*\fldinst { STYLEREF 1 \\s }}{\fldrslt {\lang1024 2}}}{\_3 Module RM Module Architecture}{\revised\revauth1\revdttm1714043995
+\par }\pard\plain \sb60\sa60\widctlpar\pnrnot1\adjustright \fs20\lang2057\cgrid {\revised\revauth1\revdttm1714043995 Note: Bhava suggests the addition of the CM as }{\revised\revauth1\revdttm1714044012 message source and destination in Figure 2-3 to be }{
+\revised\revauth1\revdttm1714044013 c}{\revised\revauth1\revdttm1714044012 ompat}{\revised\revauth1\revdttm1714044013 i}{\revised\revauth1\revdttm1714044012 ble with }{\revised\revauth1\revdttm1714044014 newly-added }{\revised\revauth1\revdttm1714044013
+TBD on page }{\revised\revauth1\revdttm1714044014 13}{\revised\revauth1\revdttm1714044015 .}{
+\par }\pard\plain \s2\sb240\sa60\keepn\widctlpar\outlinelevel1\adjustright \b\lang2057\cgrid {\b0\fs20 {\*\bkmkstart _Toc432248057}The control structure accompanying Figure 2-3 is described in C as follows:{\*\bkmkend _Toc432248057}
+\par }\pard\plain \sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {void RM_Main(void)
+\par \{
+\par }\pard \sa60\widctlpar\adjustright {\tab OS_ITCM sg_T \tab *}{\b pRmRxMsg; /* }{point to a message received directly from VxWork queue}{\b */
+\par \tab }{While (1)
+\par }{\b \tab \{
+\par }\pard \fi360\li360\sa60\widctlpar\adjustright {Read a message into}{\b pRmRxMsg }{from the RM\rquote s VxWorks queue;
+\par If (Decoding needed)
+\par \tab Decode the received pRmRxMsg;
+\par If (Decoding OK)
+\par \{
+\par }\pard \fi360\li720\sa60\widctlpar\adjustright {switch (RM_State)
+\par \{
+\par case NOT_INITIALISED:
+\par }\pard \fi360\li360\sa60\widctlpar\adjustright {\tab \tab RM_InitialisingRM( );
+\par \tab \tab break;
+\par }\pard \fi360\li720\sa60\widctlpar\adjustright {case RM_DOWN:
+\par }\pard \fi360\li360\sa60\widctlpar\adjustright {\tab \tab RM_RMDown( );
+\par \tab \tab break;
+\par }\pard \fi360\li720\sa60\widctlpar\adjustright {case RM_RUNNING:
+\par }\pard \fi360\li360\sa60\widctlpar\adjustright {\tab \tab If (Received message is PAGEi||RESETi||CHN_REQi||HO_REQi)
+\par \tab \tab \tab RM_RMRunning( );
+\par \tab \tab else
+\par \tab \tab \tab (RM_SmContxt[AirLinkID].SmState)();
+\par \tab \tab break;
+\par }\pard \sa60\widctlpar\adjustright {\tab \tab \tab default:
+\par \tab \tab \tab \tab __LOG_FUNC_(RM_TASK_ID, \ldblquote Received non-relevant message:%d\rdblquote , pRmRxMsg);
+\par \tab \tab \tab \tab break;
+\par \tab \tab \tab \} /* End of switch (RM_State) */\tab
+\par \tab \tab \} /* End of if (Decoding OK) */
+\par \tab \tab Release memory occupied by the received message;
+\par }\pard \fi360\sa60\widctlpar\adjustright {\} /* End of while(1) */
+\par }\pard \sa60\widctlpar\adjustright {\} /* End of RM_Main() */
+\par }\pard\plain \s42\sb60\sa60\widctlpar\adjustright \fs20\lang2057\cgrid {\revised\revauth1\revdttm1714044021 \page }{\b\fs28\revised\revauth1\revdttm1714044021\crauth1\crdate1714044023 Appendix A: Ian}{
+\b\fs28\revised\revauth1\revdttm1714044022\crauth1\crdate1714044023 \rquote s Comments and Discussion Minutes
+\par }\pard \s42\widctlpar\pnrnot1\adjustright {\i From: \tab Ian Sayers[SMTP:isayers@netcomuk.co.uk]
+\par Sent: \tab Wednesday, October 07, 1998 7:31 AM
+\par To: \tab Bhava Nelakanti; Xiaode Xu; Sheausong Yang
+\par }\pard \s42\widctlpar\adjustright {\i
+\par }\pard \s42\widctlpar\pnrnot1\adjustright {\i Cc: \tab Jan Long; JoAnne Miller
+\par Subject: \tab RE: CallFlow V0.1 and RRM design
+\par }{\revised\revauth1\revdttm1714044044
+\par Conference call discussion occurred on 10/7/98 afternoon between : Bhava, Jo Anne an Xiaode. Recorder: Xiaode}{
+\par }\pard \s42\qj\widctlpar\pnrnot1\adjustright {Just a few comments on the Call Flows and the process in general. You may have already considered these issues but just in case.
+\par
+\par }\pard \s42\qj\fi-180\li180\widctlpar\pnrnot1\adjustright {1. Although for Pre-Alpha we will not support synchronised handover it willbe a requirement in the Alpha/Beta time frame. In
+ which case we need to make sure we do nothing that will make it difficult to support Synchronised handover in the very near future. The RR layer should not be concerned with the GPS system, that needs to be taken care of by the OAM system - at least tha
+t is my recollection and current feeling.
+\par }\pard \s42\qj\widctlpar\pnrnot1\adjustright {\revised\revauth1\revdttm1714044046
+\par Minutes: }{\revised\revauth1\revdttm1714044048 Two }{\revised\revauth1\revdttm1714044049 issues are highlighted for further investigation:
+\par - }{\revised\revauth1\revdttm1714044046 Tailor GSM handover signalling flows to fit into PocketBTS}{\revised\revauth1\revdttm1714044047 \rquote s need.
+\par }\pard \s42\qj\fi-180\li180\widctlpar\pnrnot1\adjustright {\revised\revauth1\revdttm1714044049 - }{\revised\revauth1\revdttm1714044047 Decide }{\revised\revauth1\revdttm1714044048 which of the GSM-specified handover-related synchronisation need to be
+supported by PocketBTS.}{\revised\revauth1\revdttm1714044047
+\par }\pard \s42\qj\widctlpar\pnrnot1\adjustright {\revised\revauth1\revdttm1714044050 But currently, the team will focus on design and implementation of [10]\emdash PreAlpha Release Call Flows.
+\par }{
+\par }\pard \s42\qj\fi-180\li180\widctlpar\pnrnot1\adjustright {2. As we are only going to support the SDCCH/4 (I think) option we need to consider implementation of Very Early Assignment (VEA)
+to a TCH/F, this can help with the signalling load and allow more calls to complete. It can also be a nightmare to get right. At 15 TCHs we should be OK, using SDCCH/4 at a normal traffic load, however in high traffic (i.e. Private networks) this may no
+t
+ be sufficient. We therefore need to consider two solutions: Allow dynamic reconfiguration to SDCCH/8 usage or VEA. I think with VEA we can smoothly rollover to this configuration as SDCCH/4s become loaded. However it does mean that we need to support a
+ SigTypeCHN on a physical Traffic Channel and not only the BCCH/SDCCH/4.
+\par }\pard \s42\qj\widctlpar\pnrnot1\adjustright {
+\par }\pard \s42\qj\li180\widctlpar\pnrnot1\adjustright {One other item that has burnt me in the past is the problem of excessive RACHs that cause premature overload of the SDCCH channels. I am not sure how to handle this cleanly as it usu
+ally involves fine tuning the BCCH parameters, good L1 decoding and the ability to respond to a RACH quickly preventing a mobile from "flooding" the BTS. This may be easier in our situation as there is no Abis or BSC to slow things down. Any thoughts?}{
+\revised\revauth1\revdttm1714044051
+\par
+\par }\pard \s42\qj\fi-810\li990\widctlpar\pnrnot1\adjustright {\revised\revauth1\revdttm1714044051 Minutes: }{\revised\revauth1\revdttm1714044052 Relevant design points have been added to address this comment.}{\revised\revauth1\revdttm1714044053
+ Please refer to Section 2.4 for details.}{\revised\revauth1\revdttm1714044051 }{
+\par }\pard \s42\qj\widctlpar\pnrnot1\adjustright {
+\par }\pard \s42\qj\fi-180\li180\widctlpar\pnrnot1\adjustright {3. Any timers that are introduced into the state machines also need to be included in the MIB, if they are specific to the JetCell BTS. I s
+eem to recall that there are a few additional timers that need to be created as a "design option".
+\par }\pard \s42\qj\fi-810\li810\widctlpar\pnrnot1\adjustright {\revised\revauth1\revdttm1714044054 Minutes: The additional timers have been realised but need further input from Ian. }{\revised\revauth1\revdttm1714044055 Hope Sheausong can advises, too. }{
+\revised\revauth1\revdttm1714044054 Randy will}{\revised\revauth1\revdttm1714044056 also}{\revised\revauth1\revdttm1714044054 be consulted for this comment }{
+\par }\pard \s42\qj\fi-180\li180\widctlpar\pnrnot1\adjustright {
+4. In state S5, especially for a LUP, there is a "follow on proceed" (section 10.5.3.7 of 04.08) field that allows the MM layer to retain the radio resources. I assume we can handle this and will not release the LUP "call" before checking this sta
+tus bit. This is a Phase 2 option that was not part of Phase 1. OK, not strictly RR :-)
+\par }\pard \s42\qj\fi-720\li720\widctlpar\pnrnot1\adjustright {\revised\revauth1\revdttm1714044056 Minutes: Bhava agrees that this is totally MM\rquote s responsibility. One point has been added in Section 2.2 to explain }{
+\revised\revauth1\revdttm1714044058 this, too.}{\revised\revauth1\revdttm1714044056
+\par }\pard \s42\qj\widctlpar\pnrnot1\adjustright {
+\par }\pard \s42\qj\fi-180\li180\widctlpar\pnrnot1\adjustright {5. In S8 the Version 1 codec is fine, however we will need to support all the codecs in the Beta time frame, especially EFR.
+\par }\pard \s42\qj\fi-810\li810\widctlpar\adjustright {\revised\revauth1\revdttm1714044059 Minutes: We are not clear about }{\revised\revauth1\revdttm1714044060 this comment.}{\revised\revauth1\revdttm1714044061
+ Does it mean that S8 needs to be further split into several states to distinguish an air link}{\revised\revauth1\revdttm1714044062 \rquote s qualit}{\revised\revauth1\revdttm1714044063 ies?}{\revised\revauth1\revdttm1714044062 }{
+\revised\revauth1\revdttm1714044060 Need further more explanation from Ian.
+\par }\pard \s42\qj\widctlpar\pnrnot1\adjustright {
+\par 6. How do we handle queuing of messages in handover cases?}{\revised\revauth1\revdttm1714044063
+\par Minutes: Relevant design points in Section 2.3 have been added to cover this comment.}{
+\par
+\par }\pard \s42\qj\fi-180\li180\widctlpar\pnrnot1\adjustright {
+7. Handover will be very different in the Private PocketBTS domain since we do not have an MSC or Anchor MSC concept. In order to spread the load we cannot afford to anchor a call to a particular PocketBTS as this would quickly overwhelm the software. T
+herefore we need to think of some means of
+\par }\pard \s42\qj\li180\widctlpar\pnrnot1\adjustright {
+providing all the necessary Call State data to the target/new BTS when a handover is necessary. This helps deal with the signalling issues, however we also have some problems with the transport. In this case howe
+ver it will be upto the DSP to deal with the despatch and receipt of Voice/Data frames.}{\revised\revauth1\revdttm1714044064
+\par }\pard \s42\qj\fi-810\li990\widctlpar\pnrnot1\adjustright {\revised\revauth1\revdttm1714044064 Minutes: Refer to minutes of comment 1, call/message flows working for }{\revised\revauth1\revdttm1714044067 Private }{\revised\revauth1\revdttm1714044064
+PocketBTS domain should be developed.}{
+\par }\pard \s42\qj\widctlpar\pnrnot1\adjustright {
+\par }\pard \s42\qj\fi-180\li180\widctlpar\pnrnot1\adjustright {8. Some of the Bis and Ter System Information messages we will need to support when going to GSM 900. The ones we will never support are - plan to support the rest:
+\par }\pard \s42\qj\widctlpar\pnrnot1\adjustright {
+\par }\pard \s42\qj\li180\widctlpar\pnrnot1\adjustright { Type 6 - I think it is only used for MS supporting Group Services.
+\par Type 10 - and derivatives, only used by MSs supporting Group Services.
+\par Type 11 - and derivatives, only used by MSs supporting Group Services.
+\par Type 12 - and derivatives, only used by MSs supporting Group Services.
+\par
+\par We do not plan to support any Group Call services, so anything to do with these services can be dropped. They tend to say only for VGCS or VGBS in the specs. However we will need to support Type 13, 14 and 15 which are used by GPRS.}{
+\revised\revauth1\revdttm1714044065
+\par }\pard \s42\qj\fi-810\li990\widctlpar\pnrnot1\adjustright {\revised\revauth1\revdttm1714044065 Minutes: Investigation needed for future releases. }{\revised\revauth1\revdttm1714044066 }{\revised\revauth1\revdttm1714044069 Type 1-6 without \ldblquote bis
+\rdblquote and \ldblquote ter\rdblquote ones are still assumed for the PreAlpha Release if this consideration is feasible. Please give further comments if }{\revised\revauth1\revdttm1714044070 needed.}{
+\par }\pard \s42\qj\widctlpar\pnrnot1\adjustright {
+\par }\pard \s42\qj\fi-270\li270\widctlpar\pnrnot1\adjustright {9. Not strictly RR again, however we need to be able to send a "canned" MM information message, similar to that suggested for the System Information Messages. The MM Information
+ message is used to convey the name of the network to the Mobile station. This could be useful if an operator wishes to use a different MNC for the Private Network, this way we could associate a name with the network e.g. JetCell Network.
+\par }\pard \s42\qj\fi-810\li810\widctlpar\pnrnot1\adjustright {\revised\revauth1\revdttm1714044070 Minutes: Since MS comes to picture here, we are not sure how this scenario work}{\revised\revauth1\revdttm1714044071 s}{\revised\revauth1\revdttm1714044070
+ in general. }{\revised\revauth1\revdttm1714044071 Probably we are using old suites of GSM Specs. The RM, MM, CM }{\revised\revauth1\revdttm1714044073 will consider this comment in order to make them capable in this sense i.e. pass canned messages.}{
+\revised\revauth1\revdttm1714044074 Need clarification from Ian, too.}{\revised\revauth1\revdttm1714044070
+\par }\pard \s42\qj\widctlpar\pnrnot1\adjustright {
+\par }\pard \s42\qj\fi-270\li270\widctlpar\pnrnot1\adjustright {
+10. When allocating Timeslots we also need to make sure that we can allocate multiple slots to an MS in order to support HSCSD/GPRS. So there should be no hard coded assumptions that an MS will only ever be allocated 1 TCH. The allocation
+ should be based on the Service Request and Classmark of the MS.
+\par }\pard \s42\qj\widctlpar\pnrnot1\adjustright {\revised\revauth1\revdttm1714044075 Minutes: Thanks for this good point. RM, MM and CM should be}{\revised\revauth1\revdttm1714044077 designed}{\revised\revauth1\revdttm1714044075 adaptable as such.
+\par }{
+\par }\pard \s42\qj\fi-270\li270\widctlpar\pnrnot1\adjustright {11. Finally... In order to help network operators with deploying/managing the network they like to
+ have as many pieces of measurement data as possible, this usually means beyond that defined in the 12.04 spec. This could include internal information like, for example, number of times the PIC has been reset on the RF card. This may be a little premat
+u
+re at this stage however we need to keep in mind that we will have to support not only the standard GSM measurements, but also some of our own. So if you see something that might be a useful metric for debugging a network then we need some way of capturi
+n
+g that information in our MIB for access by the Network manager. I think Nokia have the ability to generate about 500 different measurements, beyond the normal data. This also means we have to be able to sensibly group the measurements so they do not ov
+e
+rwhelm the operator, for example, things could be related to Hardware, Software, Radio, operations, call processing, handover etc etc. We must be able to support the majority of 12.04 messages before we release, some may not be relevant to us but operato
+rs will want to see most of them.}{\revised\revauth1\revdttm1714044078
+\par Minutes: Need seriously considered later.}{
+\par }\pard \s42\qj\widctlpar\pnrnot1\adjustright {
+\par That's it for now.
+\par
+\par Ian
+\par
+\par }{\revised\revauth1\revdttm1714044079 \page }{\b\fs28\revised\revauth1\revdttm1714044079\crauth1\crdate1714044079 Appendix B: }{\b\fs28\revised\revauth1\revdttm1714044079 Ian and Jan\rquote s Email Comment}{\b\fs28\crauth1\crdate1714044079
+\par }{From: \tab Jan Long
+\par Sent: \tab Tuesday, October 06, 1998 2:11 PM
+\par To: \tab Winfield Huang; Xiaode Xu; 'sheausongyang@cypress-network.com'; 'bnelakanti@home.com'
+\par Subject: \tab FW: Paging and queuing, and bursts and all that
+\par
+\par FYI.
+\par
+\par This is Ian's take on the question. I guess Bhava and Sheausong can help sort this out and then we can get back to Jim Mar.
+\par
+\par Sheausong \endash don't forget we are not completely Abis free, since we still plan to deploy Adaptis.
+\par
+\par Regards,
+\par
+\par Jan
+\par
+\par -----Original Message-----
+\par From:\tab Ian Sayers [SMTP:isayers@netcomuk.co.uk]
+\par Sent:\tab Tuesday, October 06, 1998 2:08 PM
+\par To:\tab Jan Long
+\par Subject:\tab RE: Paging and queuing, and bursts and all that
+\par
+\par This was all discussed in a Frontier meeting and with Sheausong I think, some time ago. The plan I recall was to queue the Pages until just before they are due to be sent and then group those
+that could be, before despatch. The debate was where the queuing would be done, at L3 or at L1. I cannot remember what the decision was at the time. But L3 is probably the best point as pages can be grouped at this point. The delay in going to L1 is n
+egligible since we have no ABis to get in the way. In this case the pages can go straight through once they arrive at the L1 stack and do not need to be queued twice.
+\par There is a big difference between the iwv units and what we are doing. In that the BSC an
+d BTS are integrated into one unit therefore we can more accurately time the page to the radio interface. Whereas the iwv BSC was remote from the BTS and could not queue the page messages very well. We have an advantage in that respect. Anyway as we on
+ly have 4 signalling links we may not be able to support a high calling rate.
+\par I think you need to get Sheausong and Bhava involved in this discussion.
+\par Ian
+\par -----Original Message-----
+\par From:\tab Jan Long [mailto:jlong@JetCell.com]
+\par Sent:\tab 06 October 1998 09:36 PM
+\par To:\tab 'isayers@netcomuk.co.uk'
+\par Subject:\tab Paging and queuing, and bursts and all that
+\par
+\par
+\par Ian,
+\par
+\par Jim Mar, Winfield, Xiaode, and Chetan were deep into a discussion last night that reminded me of a problem that iWV faced. Please shed some light on this if you can.
+\par 1.\tab Jim is doing the BSP from PowerPC to DSP package right now.
+\par 2.\tab He is trying to take into account all the messaging types, and how he needs to treat them.
+\par 3.\tab The issue of "Paging" came up.
+\par 4.\tab It is not clear if the right way to send the Page is:
+\par a.\tab Immediately as received
+\par b.\tab Assign Pages top priority (cannot be pre-empted)
+\par c.\tab Wait for other Pages to fill the queue
+\par d.\tab ????
+\par 5.\tab What about "Paging Groups". How does this work, and should this be handled differerently?
+\par
+\par I seem to remember something about iWV having trouble because the "paging" messages were not getting out in time and was backing up, or MS would not be happy or something like that?
+\par Please let me know what you think, and if you want, just copy winfield (whuang), or Xiaode (xxu) on this.
+\par - j
+\par \page }{\b\fs24\revised\revauth1\revdttm-2044050776\crauth1\crdate-2044050776 Appendix C Ian\rquote s Email Comments}{\b\fs24\revised\revauth1\revdttm-2044050776
+\par }{\b\fs24\crauth1\crdate-2044050776
+\par }\pard \s42\qj\widctlpar\adjustright {From: \tab Ian Sayers[SMTP:isayers@netcomuk.co.uk]
+\par Sent: \tab Thursday, October 08, 1998 8:51 AM
+\par To: \tab Bhava Nelakanti; Sheausong Yang; Xiaode Xu
+\par Cc: \tab JoAnne Miller; Jan Long
+\par Subject: \tab RE: Discussion on Ian's comments
+\par
+\par The review seems to have addressed all my issues. However I see that some further explanation is needed on my more "cryptic" comments, sorry about that they seemed OK at the time but on re-reading they perhaps need more clarification. I will only pick ou
+t the points indicated for further clarification.
+\par
+\par {\pntext\pard\plain\s42 \f14\fs20\lang2057\cgrid \loch\af14\dbch\af0\hich\f14 \'d8\tab}}\pard \s42\qj\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls121\pnrnot0\pnf14\pnindent360\pnhang{\pntxtb \'d8}}\ls121\adjustright {
+3. Any timers that are introduced into the state machines also need to be included in the MIB, if they are specific to the JetCell BTS. I seem to recall that there are a few additional timers that need to be created as a "design option".
+\par }\pard \s42\qj\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\adjustright {
+\par Some of the timers needed by the RR, MM and CM processing are defined in the GSM specs and will already be part of the GSM MIB, we just have to use them. However there are some timers (or other OAM data) that are not de
+fined by the GSM specs and need to be provided to prevent failures from causing problems, other timers (or OAM data) are needed to implement options that are "left to the manufacturer". One of the manufacturer options is how we detect loss of the radio i
+n
+terface, usually known as the "SACCH leaky bucket". The majority of schemes for detecting loss of the radio are based on the loss of SACCH from a mobile that is in dedicated mode. I am not sure how we have decided to implement this feature? The other t
+i
+mers, for instance, are a Paging Repeat Timer and Number of times to repeat a Page. We also need to support things like the 9th TSC to deal with some mobile stations as defined in 09.94. This issue involves both the MIB, RR/MM/CM and perhaps H.323 layers
+.
+ If we can develop a standard way of adding new items to the MIB then this will make the whole process easier and avoid problems with MIB entries not be available to the layers that need to use the field as we release new software loads. I think I am ad
+vocating that we try and provide the correct methods at the early stage rather than later, when it may be too late :-)
+\par
+\par {\pntext\pard\plain\s42 \f14\fs20\lang2057\cgrid \loch\af14\dbch\af0\hich\f14 \'d8\tab}}\pard \s42\qj\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls121\pnrnot0\pnf14\pnindent360\pnhang{\pntxtb \'d8}}\ls121\adjustright {
+5. In S8 the Version 1 codec is fine, however we will need to support all the codecs in the > Beta time frame, especially EFR.
+\par }\pard \s42\qj\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\adjustright {
+\par This c
+omment was really a flag to indicate that the Version 1 Codec was OK for now, however we will need to support the other codecs as well, hence the software needs to be adaptable to accommodate new codecs as we need them and new codecs developed by ETSI.
+
+\par
+\par {\pntext\pard\plain\s42 \f14\fs20\lang2057\cgrid \loch\af14\dbch\af0\hich\f14 \'d8\tab}}\pard \s42\qj\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls121\pnrnot0\pnf14\pnindent360\pnhang{\pntxtb \'d8}}\ls121\adjustright {
+9. Not strictly RR again, however we need to be able to send a "canned" MM information message, similar to that suggested for the System Information Messages. The MM Information message is used to convey the name of the network to the Mobile station. Thi
+s could be useful if an operator wishes to use a different MNC for the Private Network, this way we could associate a name with the network e.g. JetCell Network.
+\par }\pard \s42\qj\widctlpar{\*\pn \pnlvlcont\ilvl0\ls0\pnrnot0\pndec }\adjustright {
+\par The MM information message can be found in 04.08 V5.4.1, in sections 4.3.6 and 9.2.15a. The
+message can be sent at any time that an RR connections is established. The recommended time is just after the CM_Service_Accept or Authentication Request has been sent, otherwise it could be sent at any time. If it is sent to a Mobile that does not supp
+o
+rt the message we will get an MM-Status back with cause 97. Of course this can be ignored. The message structure is very simple and could be canned in the MIB for sending to the MS. It could also be used to help debug the system by using a mobile that c
+an identify the mobile is receiving, of course we could use Cell Broadcast.
+\par
+\par
+\par {\pntext\pard\plain\s42 \f14\fs20\lang2057\cgrid \loch\af14\dbch\af0\hich\f14 \'d8\tab}}\pard \s42\qj\fi-360\li360\widctlpar\jclisttab\tx360{\*\pn \pnlvlblt\ilvl0\ls121\pnrnot0\pnf14\pnindent360\pnhang{\pntxtb \'d8}}\ls121\adjustright {12.
+\par }\pard \s42\qj\widctlpar\adjustright {Cell broadcast does steal some of the SDCCH time, however there are two options for the CBCH channel in that the BTS can now send a Basic CBCH and an Extended CBCH that oc
+cupies the remaining time. It used to be that the Basic Cell Broadcast only occupied 1/2 of the capacity, now there can be two CBCH messages. This second Extended message is an option. I think this is described in 05.02 (section 6.5.4), 03.41 and 04.12
+. The CBCH usually replaces SDCCH number 2 in both the SDCCH/4 and SDCCH/8 configurations.
+\par
+\par Hope these help expand on my comments, if not please let me know.
+\par
+\par Regards
+\par Ian
+\par
+\par From: \tab Ian Sayers[SMTP:isayers@netcomuk.co.uk]
+\par Sent: \tab Thursday, October 08, 1998 10:18 AM
+\par To: \tab Sheausong Yang; Bhava Nelakanti; Xiaode Xu
+\par Cc: \tab JoAnne Miller; Jan Long
+\par Subject: \tab Some additional observations
+\par
+\par Hi
+\par
+\par Some more things to think about :-)
+\par
+\par 1. When we implement Channel Mode Modify (04.08 s3.4.6) we should put in an extra timer in to protect the network should the CMM Ack not be returned.
+\par
+\par 2. In section 04.08 s9.1.2. the Classmark Enquiry should not be sent to a Phase 1 Mobile Station.
+\par
+\par 3. Will the MS Classmark be store at the RR level (useful for the future of the PocketBTS) or will it only be accessible at the other levels?
+\par
+\par Regards
+\par Ian
+\par }} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/rm/Docs/Q931cause.doc b/data/mnet/GP10/Host/rm/Docs/Q931cause.doc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Docs/Q931cause.doc
diff --git a/data/mnet/GP10/Host/rm/Makefile b/data/mnet/GP10/Host/rm/Makefile
new file mode 100644
index 0000000..69aaecb
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Makefile
@@ -0,0 +1,16 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src src_api src_init
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ $(CP) bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/rm/Shell.log_981210 b/data/mnet/GP10/Host/rm/Shell.log_981210
new file mode 100644
index 0000000..b965921
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Shell.log_981210
@@ -0,0 +1,1080 @@
+
+ ///// ///// ///// ///// ///// |
+ ///// ///// ///// ///// ///// |
+ ///// ///// ///// ///// ///// |
+ ///// ///// ///// ///// ///// |
+ ////// ////// ////// ////// ////// |
+ ////// ////// ////// ////// ////// | T O R N A D O
+ ///// ///// ///// ///// ///// |
+ ///// ///// ///// ///// ///// |
+ ///// ///// ///// ///// ///// | Development System
+ //// //// //// //// //// |
+ //// //// //// //// //// |
+ //// //// //// //// //// | Host Based Shell
+ //// //// //// //// //// |
+ //// //// //// //// //// |
+ /// /// /// /// /// | Version 1.0.1
+ /// /// /// /// /// |
+ // // // // // |
+ // // // // // |
+ // // // // // |
+ // // // // // |
+
+ Copyright Wind River Systems, Inc., 1995-1997
+
+C++ Constructors/Destructors Strategy is AUTOMATIC
+
+->
+->
+-> cd "../../pre-alpha"
+value = 0 = 0x0
+-> pwd
+//Astro/Archive/Workdirs/Integration/pre-alpha
+value = 0 = 0x0
+-> i
+ NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY
+---------- ------------ -------- --- ---------- -------- -------- ------- -----
+tLogTask _logTask 3fce8fc 0 PEND 167ddb 3fce868 0 0
+tExcTask _excTask 3fd1214 0 PEND 167ddb 3fd1184 0 0
+tShell _shell 3fa7704 1 PEND 11583c 3fa73e4 0 0
+tWdbTask 0x14e294 3fa88ac 3 READY 167a0d 3fa879c 0 0
+lapdm_phserlapdm_phserv 3f569c8 10 PEND 167ddb 3f56930 0 0
+lapdm_dlserlapdm_dlserv 3f8c2e8 10 PEND 167ddb 3f8c16c 0 0
+mmMain mmMain(void) 3e90bd0 10 PEND 167ddb 3e907f4 0 0
+tNetTask _netTask 3fc9664 50 READY 12a047 3fc95fc 0 0
+L1TaskUp taskDspUp(vo 3e7a950 100 PEND 11583c 3e7a8bc 0 0
+L1TaskDn taskDspDn(vo 3e727a8 100 PEND 167ddb 3e722e4 0 0
+rmTask rm_Main(void 3e93798 100 PEND 167ddb 3e93704 0 0
+value = 0 = 0x0
+-> <kill
+td lapdm_phserver
+value = 0 = 0x0
+td lapdm_dlserver
+value = 0 = 0x0
+td mmMain
+value = 0 = 0x0
+td rmTask
+value = 0 = 0x0
+td L1TaskUp
+value = 0 = 0x0
+td L1TaskDn
+value = 0 = 0x0
+
+unld "l1proxy_init.out"
+value = 0 = 0x0
+unld "lapdm_init.out"
+value = 0 = 0x0
+unld "mmm_init.out"
+value = 0 = 0x0
+unld "ccm_init.out"
+value = 0 = 0x0
+unld "rm_init.out"
+value = 0 = 0x0
+unld "lapdm_api.out"
+value = 0 = 0x0
+unld "rm_api.out"
+value = 0 = 0x0
+unld "l1proxy.out"
+value = 0 = 0x0
+unld "lapdm.out"
+value = 0 = 0x0
+unld "ril3.out"
+value = 0 = 0x0
+unld "jcc.out"
+value = 0 = 0x0
+unld "mmm.out"
+value = 0 = 0x0
+unld "ccm.out"
+value = 0 = 0x0
+unld "rm.out"
+value = 0 = 0x0
+
+i
+ NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY
+---------- ------------ -------- --- ---------- -------- -------- ------- -----
+tLogTask _logTask 3fce8fc 0 PEND 167ddb 3fce868 0 0
+tExcTask _excTask 3fd1214 0 PEND 167ddb 3fd1184 0 0
+tShell _shell 3fa7704 1 PEND 11583c 3fa73e4 0 0
+tWdbTask 0x14e294 3fa88ac 3 READY 167a0d 3fa879c 0 0
+tNetTask _netTask 3fc9664 50 READY 12a047 3fc95fc 0 0
+value = 0 = 0x0
+
+-> i
+ NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY
+---------- ------------ -------- --- ---------- -------- -------- ------- -----
+tLogTask _logTask 3fce8fc 0 PEND 167ddb 3fce868 0 0
+tExcTask _excTask 3fd1214 0 PEND 167ddb 3fd1184 0 0
+tShell _shell 3fa7704 1 PEND 11583c 3fa73e4 0 0
+tWdbTask 0x14e294 3fa88ac 3 READY 167a0d 3fa879c 0 0
+tNetTask _netTask 3fc9664 50 READY 12a047 3fc95fc 0 0
+value = 0 = 0x0
+-> <integ
+#
+# load all the module-init files (with global variables)
+#
+ld < K:/Workdirs/integration/l1proxy/I80486/l1proxy_init.out
+value = 15658280 = 0xeeed28
+ld < K:/Workdirs/integration/lapdm/I80486/lapdm_init.out
+value = 15633672 = 0xee8d08
+ld < K:/Workdirs/integration/mm/I80486/mmm_init.out
+value = 15649024 = 0xeec900
+ld < K:/Workdirs/integration/cc/I80486/ccm_init.out
+value = 15649640 = 0xeecb68
+ld < K:/Workdirs/integration/rm/I80486/rm_init.out
+value = 15722680 = 0xefe8b8
+
+#
+# load all the module-api files (used by other modules)
+#
+ld < K:/Workdirs/integration/lapdm/I80486/lapdm_api.out
+value = 15723296 = 0xefeb20
+ld < K:/Workdirs/integration/rm/I80486/rm_api.out
+value = 15723912 = 0xefed88
+
+#
+# load all the core module files next
+#
+ld < K:/Workdirs/integration/l1proxy/I80486/l1proxy.out
+value = 15749128 = 0xf05008
+ld < K:/Workdirs/integration/lapdm/I80486/lapdm.out
+value = 3209032 = 0x30f748
+ld < K:/Workdirs/integration/ril3/I80486/ril3.out
+value = 3209648 = 0x30f9b0
+ld < K:/Workdirs/integration/jcc/I80486/jcc.out
+value = 15638536 = 0xeea008
+ld < K:/Workdirs/integration/mm/I80486/mmm.out
+value = 15904096 = 0xf2ad60
+ld < K:/Workdirs/integration/cc/I80486/ccm.out
+value = 15639152 = 0xeea270
+ld < K:/Workdirs/integration/rm/I80486/rm.out
+value = 15639768 = 0xeea4d8
+
+
+#
+# Initialization of all modules
+#
+CNI_LAPDM_Initialization
+value = 65598164 = 0x3e8f2d4
+#cni_testInit
+
+#create a lapdm instance channel type 0, trx 0, channel num 1, link 1
+#CNI_LAPDM_Create_Instance(0, 0 , 0x2000, 0)
+#CNI_LAPDM_Create_Instance(0, 0 , 0x2800, 0)
+#CNI_LAPDM_Create_Instance(0, 0 , 0x3000, 0)
+#CNI_LAPDM_Create_Instance(0, 0 , 0x3800, 0)
+
+
+#L3 register a lapdm instance oid 0, sapi 0, layer3_id 10, and a call back function
+#CNI_LAPDM_Instance_Registration(0, 0, 0x20, cni_l3CallBack)
+#CNI_LAPDM_Instance_Registration(1, 0, 0x28, cni_l3CallBack)
+#CNI_LAPDM_Instance_Registration(2, 0, 0x30, cni_l3CallBack)
+#CNI_LAPDM_Instance_Registration(3, 0, 0x38, cni_l3CallBack)
+
+# Start MM Task and print its data
+mmInit
+value = 65493384 = 0x3e75988
+mmDataPrint
+MM Entry: -1, -1, 0, 0, 1
+MM Entry: -1, -1, 0, 0, 1
+MM Entry: -1, -1, 0, 0, 1
+MM Entry: -1, -1, 0, 0, 1
+MM Entry: -1, -1, 0, 0, 1
+MM Entry: -1, -1, 0, 0, 1
+MM Entry: -1, -1, 0, 0, 1
+MM Entry: -1, -1, 0, 0, 1
+MM Entry: -1, -1, 0, 0, 1
+MM Entry: -1, -1, 0, 0, 1
+value = 27 = 0x1b
+
+
+# Start RRM Task
+rm_Task
+ENTER-rm_Go
+ENTER-rm_Main
+ENTER-rm_InitAll
+ENTER-sys_Init
+ENTER-sys_CreateMsgQs
+value = 66539400 = 0x3f74f88
+ENTER-sys_StartTasks
+ENTER-rm_WaitForL1Bootstrap: Entering...
+ENTER-rm_WaitForL1Rsp
+
+#
+initL1
+value = 65390344 = 0x3e5c708
+newInitDsp
+value = 589833 = 0x90009
+#hpi2dsp(&cx6,0,0x3800)
+newGo
+value = -4260864 = 0xffbefc00
+
+#
+i
+ NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY
+---------- ------------ -------- --- ---------- -------- -------- ------- -----
+tLogTask _logTask 3fce8fc 0 PEND 167ddb 3fce868 0 0
+tExcTask _excTask 3fd1214 0 PEND 167ddb 3fd1184 0 0
+tShell _shell 3fa7704 1 PEND 11583c 3fa73e4 0 0
+tWdbTask 0x14e294 3fa88ac 3 READY 167a0d 3fa879c 0 0
+lapdm_phserlapdm_phserv 3f569c8 10 PEND 167ddb 3f56930 0 0
+lapdm_dlserlapdm_dlserv 3e7a950 10 PEND 167ddb 3e7a7d4 0 0
+mmMain mmMain(void) 3e75988 10 PEND 167ddb 3e755ac 0 0
+tNetTask _netTask 3fc9664 50 READY 12a047 3fc95fc 0 0
+L1TaskUp taskDspUp(vo 3e648b0 100 PEND 11583c 3e6481c 0 0
+L1TaskDn taskDspDn(vo 3e5c708 100 PEND 167ddb 3e5c244 0 0
+rmTask rm_Main(void 3f74f88 100 PEND 167ddb 3f74eb8 0 0
+value = 0 = 0x0
+
+-> From DSP
+03e64844: 10 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ENTER-rm_RetrvConfigFromOam
+ENTER-rm_PopulateSI2
+ENTER-rm_PopulateSI3
+ENTER-rm_PopulateSI4
+ENTER-rm_PopulateSI5
+ENTER-rm_PopulateSI6
+ENTER-rm_InitRm
+ENTER-rm_InitLAPDm
+CNI_LAPDM_Create_Instance: channelType 4, trx 0, channel 32768, link 32
+T_CNI_LAPDM_Channel::Assign , oid 0, gsmChannelType 4
+CNI_LAPDM_Instance_Registration: oid 0, sapi, 0, layer3_id 0, p_callback_function 5901c4
+CNI_LAPDM_Create_Instance: channelType 7, trx 0, channel 34816, link 32
+T_CNI_LAPDM_Channel::Assign , oid 1, gsmChannelType 7
+CNI_LAPDM_Instance_Registration: oid 1, sapi, 0, layer3_id 0, p_callback_function 5901c4
+CNI_LAPDM_Create_Instance: channelType 2, trx 0, channel 2560, link 0
+T_CNI_LAPDM_Channel::Assign , oid 2, gsmChannelType 2
+CNI_LAPDM_Create_Instance: channelType 1, trx 0, channel 2560, link 64
+T_CNI_LAPDM_Channel::Assign , oid 3, gsmChannelType 1
+CNI_LAPDM_Instance_Registration: oid 2, sapi, 0, layer3_id 0, p_callback_function 5901c4
+CNI_LAPDM_Instance_Registration: oid 3, sapi, 0, layer3_id 0, p_callback_function 5901c4
+CNI_LAPDM_Instance_Registration: oid 3, sapi, 3, layer3_id 0, p_callback_function 5901c4
+CNI_LAPDM_Create_Instance: channelType 2, trx 0, channel 3072, link 0
+T_CNI_LAPDM_Channel::Assign , oid 4, gsmChannelType 2
+CNI_LAPDM_Create_Instance: channelType 1, trx 0, channel 3072, link 64
+T_CNI_LAPDM_Channel::Assign , oid 5, gsmChannelType 1
+CNI_LAPDM_Instance_Registration: oid 4, sapi, 0, layer3_id 0, p_callback_function 5901c4
+CNI_LAPDM_Instance_Registration: oid 5, sapi, 0, layer3_id 0, p_callback_function 5901c4
+CNI_LAPDM_Instance_Registration: oid 5, sapi, 3, layer3_id 0, p_callback_function 5901c4
+CNI_LAPDM_Create_Instance: channelType 0, trx 0, channel 8192, link 0
+T_CNI_LAPDM_Channel::Assign , oid 6, gsmChannelType 0
+CNI_LAPDM_Create_Instance: channelType 1, trx 0, channel 8192, link 64
+T_CNI_LAPDM_Channel::Assign , oid 7, gsmChannelType 1
+CNI_LAPDM_Instance_Registration: oid 6, sapi, 0, layer3_id 0, p_callback_function 5901c4
+CNI_LAPDM_Instance_Registration: oid 6, sapi, 3, layer3_id 0, p_callback_function 5901c4
+CNI_LAPDM_Instance_Registration: oid 7, sapi, 0, layer3_id 0, p_callback_function 5901c4
+CNI_LAPDM_Create_Instance: channelType 0, trx 0, channel 10240, link 0
+T_CNI_LAPDM_Channel::Assign , oid 8, gsmChannelType 0
+CNI_LAPDM_Create_Instance: channelType 1, trx 0, channel 10240, link 64
+T_CNI_LAPDM_Channel::Assign , oid 9, gsmChannelType 1
+CNI_LAPDM_Instance_Registration: oid 8, sapi, 0, layer3_id 0, p_callback_function 5901c4
+CNI_LAPDM_Instance_Registration: oid 8, sapi, 3, layer3_id 0, p_callback_function 5901c4
+CNI_LAPDM_Instance_Registration: oid 9, sapi, 0, layer3_id 0, p_callback_function 5901c4
+CNI_LAPDM_Create_Instance: channelType 0, trx 0, channel 12288, link 0
+T_CNI_LAPDM_Channel::Assign , oid 10, gsmChannelType 0
+CNI_LAPDM_Create_Instance: channelType 1, trx 0, channel 12288, link 64
+T_CNI_LAPDM_Channel::Assign , oid 11, gsmChannelType 1
+CNI_LAPDM_Instance_Registration: oid 10, sapi, 0, layer3_id 0, p_callback_function 5901c4
+CNI_LAPDM_Instance_Registration: oid 10, sapi, 3, layer3_id 0, p_callback_function 5901c4
+CNI_LAPDM_Instance_Registration: oid 11, sapi, 0, layer3_id 0, p_callback_function 5901c4
+CNI_LAPDM_Create_Instance: channelType 0, trx 0, channel 14336, link 0
+T_CNI_LAPDM_Channel::Assign , oid 12, gsmChannelType 0
+CNI_LAPDM_Create_Instance: channelType 1, trx 0, channel 14336, link 64
+T_CNI_LAPDM_Channel::Assign , oid 13, gsmChannelType 1
+CNI_LAPDM_Instance_Registration: oid 12, sapi, 0, layer3_id 0, p_callback_function 5901c4
+CNI_LAPDM_Instance_Registration: oid 12, sapi, 3, layer3_id 0, p_callback_function 5901c4
+CNI_LAPDM_Instance_Registration: oid 13, sapi, 0, layer3_id 0, p_callback_function 5901c4
+ENTER-rm_InitIRT
+0th TCHF entryId data: iEntryId=2 ,entryId=1
+1th TCHF entryId data: iEntryId=4 ,entryId=3
+0th SDCCH4 entryId data: iEntryId=0,entryId=5
+1th SDCCH4 entryId data: iEntryId=1,entryId=7
+2th SDCCH4 entryId data: iEntryId=2,entryId=9
+3th SDCCH4 entryId data: iEntryId=3,entryId=11
+ENTER-rm_InitL1
+ENTER-rm_ConfigTrx
+ENTER-rm_SendTrxConfigToTrx: Entering...
+ENTER-rm_WaitForL1Rsp
+send to dsp:
+03e5c298: 07 00 00 00 10 15 00 00 02 2d 00 ee ee ee ee ee
+03e5c2a8: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c2b8: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c2c8: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+sending 1 messages
+From DSP
+03e64844: 10 16 00 00 78 07 00 02 00 00 00 00 ff fe ff ff
+ENTER-rm_SendSlotActivateToTrx: Entering...
+ENTER-rm_WaitForSlotActivateRsp: Entering...
+ENTER-rm_WaitForL1Rsp
+send to dsp:
+03e5c298: 06 00 00 00 10 17 00 00 00 05 00 ee ee ee ee ee
+03e5c2a8: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c2b8: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c2c8: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+sending 1 messages
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 20 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 28 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 30 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 38 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 20 00 40
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 28 00 40
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 30 00 40
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 38 00 40
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 80 00 20
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 88 00 20
+
+CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x0,channel=0x9000,link=0x20)
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x0, channel 0x9000, link 0x20
+07 00 00 00 02 01 00 00 90 00 20
+
+CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x0,channel=0x9000,link=0x20)
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x0, channel 0x9000, link 0x20
+07 00 00 00 02 01 00 00 90 00 20
+
+From DSP
+03e64844: 10 18 00 00 00 00 00 00 00 00 00 00 ff fe ff ff
+ENTER-rm_SendSlotActivateToTrx: Entering...
+ENTER-rm_WaitForSlotActivateRsp: Entering...
+ENTER-rm_WaitForL1Rsp
+send to dsp:
+03e5c298: 06 00 00 00 10 17 00 00 02 01 00 ee ee ee ee ee
+03e5c2a8: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c2b8: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c2c8: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+sending 1 messages
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 0a 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 0a 00 40
+
+From DSP
+03e64844: 10 18 00 00 02 00 00 00 01 00 00 00 00 00 00 00
+ENTER-rm_SendSlotActivateToTrx: Entering...
+ENTER-rm_WaitForSlotActivateRsp: Entering...
+ENTER-rm_WaitForL1Rsp
+send to dsp:
+03e5c298: 06 00 00 00 10 17 00 00 04 01 00 ee ee ee ee ee
+03e5c2a8: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c2b8: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c2c8: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+sending 1 messages
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 0c 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 0c 00 40
+
+From DSP
+03e64844: 10 18 00 00 04 00 00 00 bc d5 00 80 ff fe ff ff
+SLOT ACTIVATION FINISHED
+ENTER-rm_SendSetUGainToTrx: Entering...
+ENTER-rm_SendSetDGainToTrx: Entering...
+ENTER-rm_SendTuneSynthToTrx: Entering...
+ENTER-rm_SendConfigFpgaDelayToTrx: Entering...
+CONFIG TRX/SLOTS FINISHED
+TRACE-rm_InitL1: bcchTrx=0, i=0
+End of rm_SendSynchInfoToBcchTrx()
+ENTER-rm_SendAllSystemInfosToBcchTrx
+ENTER-rm_SendSystemInfo2ToBcchTrx
+ENTER-rm_SendSystemInfo3ToBcchTrx
+ENTER-rm_SendSystemInfo4ToBcchTrx
+End of rm_SendAllSystemInfosToBcchTrx, bcchTrx=0
+ENTER-rm_SendSacchFillingToTrx
+ENTER-rm_SendSacchFillingToTrx
+End of rm_SendSacchFillingSI5 and SI6
+STAY in RM_MAIN while(1) loop
+send to dsp:
+03e5c298: 05 00 00 00 10 10 00 00 00 01 00 ee ee ee ee ee
+03e5c2a8: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c2b8: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c2c8: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+03e5c2d8: 05 00 00 00 10 11 00 00 00 01 00 ee ee ee ee ee
+03e5c2e8: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c2f8: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c308: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+03e5c318: 07 00 00 00 10 12 00 00 00 00 00 ee ee ee ee ee
+03e5c328: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c338: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c348: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+03e5c358: 07 00 00 00 10 12 00 00 01 00 00 ee ee ee ee ee
+03e5c368: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c378: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c388: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+03e5c398: 07 00 00 00 10 12 00 00 02 00 00 ee ee ee ee ee
+03e5c3a8: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c3b8: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c3c8: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+03e5c3d8: 07 00 00 00 10 12 00 00 03 00 00 ee ee ee ee ee
+03e5c3e8: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c3f8: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c408: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+03e5c418: 08 00 00 00 10 14 00 00 00 00 00 00 ee ee ee ee
+03e5c428: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c438: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+03e5c448: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+03e5c458: 22 00 00 00 0c 00 11 00 80 00 02 17 59 06 1a 8e
+03e5c468: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 21
+03e5c478: 01 04 00 01 00 00 ee ee ee ee ee ee ee ee ee ee
+03e5c488: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+03e5c498: 22 00 00 00 0c 00 11 00 80 00 03 17 49 06 1b 00
+03e5c4a8: 01 00 f1 10 00 02 41 01 00 23 07 00 01 04 00 2b
+03e5c4b8: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+03e5c4c8: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+03e5c4d8: 22 00 00 00 0c 00 11 00 80 00 04 17 31 06 1c 00
+03e5c4e8: f1 10 00 02 07 00 01 04 00 2b 2b 2b 2b 2b 2b 2b
+03e5c4f8: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+03e5c508: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+03e5c518: 1b 00 00 00 10 00 1a 00 05 12 06 1d 8e 00 00 00
+03e5c528: 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 2b
+03e5c538: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+03e5c548: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+03e5c558: 1b 00 00 00 10 00 1a 00 06 12 06 1e 00 01 00 f1
+03e5c568: 10 00 02 23 21 2b 2b 2b 2b 2b 2b 2b 01 00 00 2b
+03e5c578: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+03e5c588: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+sending 12 messages
+
+->
+->
+-> CNI_LAPDM_Ph_Callback received PH-RANDOM-ACCESS-IND, length 17
+0d 00 00 00 02 02 00 00 88 00 20 19 21 f5 00 00
+00
+
+RIL3MD ==> RRM
+RIL3_MD Dump RRM Message ------------BEGIN
+ Module_ID = 1
+ l3_id = 65442488
+ entry_id = 0
+ lapdm_oid = 1
+ primitive_type = 10
+ sapi = 0
+ channel_type = 7
+ error_cause = 0
+ unserved_data_after_release = 0
+ l3_data.msgLength = 8
+l3data hex dump
+19 21 f5 00 00 00 2b 2b
+
+RIL3_MD Dump RRM Message ------------END
+RM_MAIN:MD prim=0x010a,entryID=0,sapi=0, OId=1
+ENTER-rm_Despatch
+Entering rm_DlRaInd=0x010a
+ENTER-rm_DlRaInd
+TRACK-rm_DlRaInd: neci=0,cos=0,ref=25
+ENTER-rm_ChanReq
+ENTER-rm_AllocateSmCtxt
+TRACK-rm_AllocSmCtxt: Assigned SDCCH4 = 0
+ENTER-rm_SendChanActivation
+STAY in RM_MAIN while(1) loop
+send to dsp:
+03e5c298: 19 00 00 00 08 00 21 00 20 00 00 00 03 01 00 01
+03e5c2a8: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b
+03e5c2b8: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+03e5c2c8: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+sending 1 messages
+From DSP
+03e64844: 08 00 22 00 20 00 24 4e 21 f5 00 00 00 2b 2b 2b
+ENTER-rm_GetIrtEntryId
+TRACK-rm_GetIrtEntryId: Idx=0, entryId=5
+Rx L1 primitive= 0x0001,entryID=5
+ENTER-rm_Despatch
+ENTER-rm_S2ActivatingSigTrafficChan
+ENTER-rm_SendImmAssign
+RM_SENDIMMASSIGN: l3_data.length=23
+ENTER-rm_StartTimer: entry ID=5, timer ID=0
+STAY in RM_MAIN while(1) loop
+send to dsp:
+03e5c298: 1e 00 00 00 02 00 01 00 90 00 20 2d 06 3f 03 20
+03e5c2a8: a2 95 19 21 f5 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b
+03e5c2b8: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+03e5c2c8: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+sending 1 messages
+CNI_LAPDM_Ph_Callback received PH-DATA-IND, length 36
+20 00 00 00 02 00 02 00 20 00 00 21 f5 01 3f 49
+05 08 70 32 f4 03 ff fe 20 08 29 43 03 75 47 00
+24 01 2b 2b
+
+T_CNI_LAPDM_Frame_Decoder::
+ frame format is 1 frame type is 4, frame control type is 1
+ 01 3f 49 05 08 70 32 f4 03 ff fe 20 08 29 43 03 75 47 00 24 01 2b 2b
+RIL3MD ==> RRM
+RIL3_MD Dump RRM Message ------------BEGIN
+ Module_ID = 1
+ l3_id = 65442488
+ entry_id = 5
+ lapdm_oid = 6
+ primitive_type = 1
+ sapi = 0
+ channel_type = 0
+ error_cause = 0
+ unserved_data_after_release = 0
+ l3_data.msgLength = 18
+l3data hex dump
+05 08 70 32 f4 03 ff fe 20 08 29 43 03 75 47 00
+24 01
+
+CNI_LAPDM_Ph_Callback received PH-DATA-IND, length RIL3_MD Dump RRM Message ------------EN
+D
+RIL3MD ==> MM
+RIL3_MD Dump CCMM Message ------------BEGIN
+ Module_ID = 1
+ l3_id = 65534800
+ entry_id = 5
+ lapdm_oid = 6
+ primitive_type = 1
+ sapi = 0
+ l3_data.msgLength = 18
+l3data hex dump
+05 08 70 32 f4 03 ff fe 20 08 29 43 03 75 47 00
+24 01
+
+RIL3_MD Dump CCMM Message ------------END
+CNI_LAPDM_Ph_Data_Request send a frame, length=23
+03 73 49 05 08 70 32 f4 03 ff fe 20 08 29 43 03
+75 47 00 24 MM Log: Received Message from MD, Msg Type: 081
+ MM Log: Sent Message to LAPDm, Msg Type: 2b2
+2bMM Log: Sent Message to RR, Prim. Type, Msg Type: 11
+
+0
+36
+20 00 00 00 02 00 02 00 20 00 00 21 f5 01 3f 49
+05 08 70 32 f4 03 ff fe 20 08 29 43 03 75 47 00
+24 01 2b 2b
+
+T_CNI_LAPDM_Frame_Decoder::
+ frame format is 1 frame type is 4, frame control type is 1
+ 01 3f 49 05 08 70 32 f4 03 ff fe 20 08 29 43 03 75 47 00 24 01 2b 2b
+RIL3MD ==> RRM
+RIL3_MD Dump RRM Message ------------BEGIN
+ Module_ID = 1
+ l3_id = 65442488
+ entry_id = 5
+ lapdm_oid = 6
+ primitive_type = 11
+ sapi = 0
+ channel_type = 0
+ error_cause = 14
+ unserved_data_after_release = 0
+ l3_data.msgLength = 0
+l3data hex dump
+
+RIL3_MD Dump RRM Message ------------END
+Set timer for 60000, timeout in 10000
+CNI_LAPDM_Ph_Data_Request send a frame, length=23
+03 00 1d 05 02 00 f1 10 00 02 2b 2b 2b 2b 2b 2b
+2b 2b 2b 2b 2b 2b 2b
+
+RM_MAIN:MD prim=0x0101,entryID=5,sapi=0, OId=6
+ENTER-rm_Despatch
+ENTER-rm_S3SigChanActivated
+ENTER-rm_StopTimer: entryID=5, timerID=0
+ENTER--rm_ProcClassMarkIE: entryID=5
+LUP===========: PD=5,MT=
+LUP:Type IE: present=1,forBit=0,type=0
+LUP:CipherKey IE: present=1,keySeq=7
+LUP:LAI IE---------------------------
+LUP:Classmark1 IE: present=1,revLevel=1,esInd=0,a51=0,rfPowerCap=66538760
+LUP:MobileID IE---------------------------
+STAY in RM_MAIN while(1) loop
+RM_MAIN:MM prim=0x030b,entryID=5
+ENTER-rm_Despatch
+ENTER-rm_S5SigModeEstablished
+ENTER-rm_SendChanRelease:entryId=5
+rm_SendChanRelease: mOId=6,entryId=5,sapi=0
+ENTER-rm_SendDeactivateSacch
+ENTER-rm_StartTimer: entry ID=5, timer ID=2
+STAY in RM_MAIN while(1) loop
+RM_MAIN:MD prim=0x010b,entryID=5,sapi=0, OId=6
+ENTER-rm_Despatch
+ENTER-rm_S7ReleasingSigTrafficChan
+ERROR-rm_S7SigChanActivated: LAPDm message:11
+STAY in RM_MAIN while(1) loop
+send to dsp:
+03e5c298: 1e 00 00 00 02 00 01 00 20 00 00 03 73 49 05 08
+03e5c2a8: 70 32 f4 03 ff fe 20 08 29 43 03 75 47 00 24 01
+03e5c2b8: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+03e5c2c8: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+03e5c2d8: 1e 00 00 00 02 00 01 00 20 00 00 03 00 1d 05 02
+03e5c2e8: 00 f1 10 00 02 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b
+03e5c2f8: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+03e5c308: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+03e5c318: 06 00 00 00 08 00 25 00 20 00 00 03 00 1d 05 02
+03e5c328: 00 f1 10 00 02 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b
+03e5c338: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+03e5c348: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+sending 3 messages
+CNI_LAPDM_Ph_Callback received PH-RANDOM-ACCESS-IND, length 17
+0d 00 00 00 02 02 00 00 88 00 20 0d 2c 41 00 00
+00
+
+RIL3MD ==> RRM
+RIL3_MD Dump RRM Message ------------BEGIN
+ Module_ID = 1
+ l3_id = 65442488
+ entry_id = 0
+ lapdm_oid = 1
+ primitive_type = 10
+ sapi = 0
+ channel_type = 7
+ error_cause = 0
+ unserved_data_after_release = 0
+ l3_data.msgLength = 8
+l3data hex dump
+0d 2c 41 00 00 00 08 70
+
+RIL3_MD Dump RRM Message ------------END
+CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x0,channel=0x0,link=0x20)
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x0, channel 0x0, link 0x20
+07 00 00 00 02 03 00 00 00 00 20
+
+RM_MAIN:MD prim=0x010a,entryID=0,sapi=0, OId=1
+ENTER-rm_Despatch
+Entering rm_DlRaInd=0x010a
+ENTER-rm_DlRaInd
+TRACK-rm_DlRaInd: neci=0,cos=0,ref=13
+ENTER-rm_ChanReq
+ENTER-rm_AllocateSmCtxt
+TRACK-rm_AllocSmCtxt: Assigned SDCCH4 = 1
+ENTER-rm_SendChanActivation
+STAY in RM_MAIN while(1) loop
+send to dsp:
+03e5c298: 19 00 00 00 08 00 21 00 28 00 00 00 03 01 00 01
+03e5c2a8: 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b
+03e5c2b8: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+03e5c2c8: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+sending 1 messages
+From DSP
+03e64844: 08 00 22 00 28 00 2d 6e 2c 41 00 00 00 08 70 32
+ENTER-rm_GetIrtEntryId
+TRACK-rm_GetIrtEntryId: Idx=1, entryId=7
+Rx L1 primitive= 0x0001,entryID=7
+ENTER-rm_Despatch
+ENTER-rm_S2ActivatingSigTrafficChan
+ENTER-rm_SendImmAssign
+RM_SENDIMMASSIGN: l3_data.length=23
+ENTER-rm_StartTimer: entry ID=7, timer ID=0
+STAY in RM_MAIN while(1) loop
+send to dsp:
+03e5c298: 1e 00 00 00 02 00 01 00 90 01 20 2d 06 3f 03 28
+03e5c2a8: a2 95 0d 2c 41 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b
+03e5c2b8: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+03e5c2c8: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+sending 1 messages
+CNI_LAPDM_Ph_Callback received PH-DATA-IND, length 36
+20 00 00 00 02 00 02 00 28 00 00 2c 41 01 3f 49
+05 08 78 32 f4 03 ff fe 20 08 29 43 03 75 47 00
+24 01 2b 2b
+
+T_CNI_LAPDM_Frame_Decoder::
+ frame format is 1 frame type is 4, frame control type is 1
+ 01 3f 49 05 08 78 32 f4 03 ff fe 20 08 29 43 03 75 47 00 24 01 2b 2b
+RIL3MD ==> RRM
+RIL3_MD Dump RRM Message ------------BEGIN
+ Module_ID = 1
+ l3_id = 65442488
+ entry_id = 7
+ lapdm_oid = 8
+ primitive_type = 1
+ sapi = 0
+ channel_type = 0
+ error_cause = 0
+ unserved_data_after_release = 0
+ l3_data.msgLength = 18
+l3data hex dump
+05 08 78 32 f4 03 ff fe 20 08 29 43 03 75 47 00
+24 01
+
+RIL3_MD Dump RRM Message ------------END
+RIL3MD ==> MM
+RIL3_MD Dump CCMM Message ------------BEGIN
+ Module_ID = 1
+ l3_id = 65534800
+ entry_id = 7
+ lapdm_oid = 8
+ primitive_type = 1
+ sapi = 0
+ l3_data.msgLength = 18
+l3data hex dump
+05 08 78 32 f4 03 ff fe 20 08 29 43 03 75 47 00
+24 01
+
+RIL3_MD Dump CCMM Message ------------END
+MM Log: Received Message from MD, Msg Type: 8
+MM Log: Sent Message to LAPDm, Msg Type: 2
+MM Log: Sent Message to RR, Prim. Type, Msg Type: 11 0
+CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x0,channel=0x0,link=0x20)
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x0, channel 0x0, link 0x20
+07 00 00 00 02 03 00 00 00 00 20
+
+RM_MAIN:MD prim=0x0101,entryID=7,sapi=0, OId=8
+ENTER-rm_Despatch
+ENTER-rm_S3SigChanActivated
+ENTER-rm_StopTimer: entryID=7, timerID=0
+ENTER--rm_ProcClassMarkIE: entryID=7
+LUP===========: PD=5,MT=
+LUP:Type IE: present=1,forBit=1,type=0
+LUP:CipherKey IE: present=1,keySeq=7
+LUP:LAI IE---------------------------
+LUP:Classmark1 IE: present=1,revLevel=1,esInd=0,a51=0,rfPowerCap=66538760
+LUP:MobileID IE---------------------------
+STAY in RM_MAIN while(1) loop
+RM_MAIN:MM prim=0x030b,entryID=7
+ENTER-rm_Despatch
+ENTER-rm_S5SigModeEstablished
+ENTER-rm_SendChanRelease:entryId=7
+rm_SendChanRelease: mOId=8,entryId=7,sapi=0
+ENTER-rm_SendDeactivateSacch
+ENTER-rm_StartTimer: entry ID=7, timer ID=2
+STAY in RM_MAIN while(1) loop
+send to dsp:
+03e5c298: 06 00 00 00 08 00 25 00 28 00 20 2d 06 3f 03 28
+03e5c2a8: a2 95 0d 2c 41 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b
+03e5c2b8: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+03e5c2c8: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+sending 1 messages
+CNI_LAPDM_Ph_Callback received PH-RANDOM-ACCESS-IND, length 17
+0d 00 00 00 02 02 00 00 88 00 20 1c 42 4e 00 00
+00
+
+RIL3MD ==> RRM
+RIL3_MD Dump RRM Message ------------BEGIN
+ Module_ID = 1
+ l3_id = 65442488
+ entry_id = 0
+ lapdm_oid = 1
+ primitive_type = 10
+ sapi = 0
+ channel_type = 7
+ error_cause = 0
+ unserved_data_after_release = 0
+ l3_data.msgLength = 8
+l3data hex dump
+1c 42 4e 00 00 00 08 78
+
+RIL3_MD Dump RRM Message ------------END
+CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x0,channel=0x0,link=0x20)
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x0, channel 0x0, link 0x20
+07 00 00 00 02 03 00 00 00 00 20
+
+RM_MAIN:MD prim=0x010a,entryID=0,sapi=0, OId=1
+ENTER-rm_Despatch
+Entering rm_DlRaInd=0x010a
+ENTER-rm_DlRaInd
+TRACK-rm_DlRaInd: neci=0,cos=0,ref=28
+ENTER-rm_ChanReq
+ENTER-rm_AllocateSmCtxt
+TRACK-rm_AllocSmCtxt: Assigned SDCCH4 = 2
+ENTER-rm_SendChanActivation
+STAY in RM_MAIN while(1) loop
+send to dsp:
+03e5c298: 19 00 00 00 08 00 21 00 30 00 00 00 03 01 00 01
+03e5c2a8: 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b
+03e5c2b8: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+03e5c2c8: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+sending 1 messages
+From DSP
+03e64844: 08 00 22 00 30 00 45 4c 42 4e 00 00 00 08 78 32
+ENTER-rm_GetIrtEntryId
+TRACK-rm_GetIrtEntryId: Idx=2, entryId=9
+Rx L1 primitive= 0x0001,entryID=9
+ENTER-rm_Despatch
+ENTER-rm_S2ActivatingSigTrafficChan
+ENTER-rm_SendImmAssign
+RM_SENDIMMASSIGN: l3_data.length=23
+ENTER-rm_StartTimer: entry ID=9, timer ID=0
+STAY in RM_MAIN while(1) loop
+send to dsp:
+03e5c298: 1e 00 00 00 02 00 01 00 90 02 20 2d 06 3f 03 30
+03e5c2a8: a2 95 1c 42 4e 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b
+03e5c2b8: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+03e5c2c8: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+sending 1 messages
+CNI_LAPDM_Ph_Callback received PH-DATA-IND, length 36
+20 00 00 00 02 00 02 00 30 00 00 42 4e 01 3f 49
+05 08 70 32 f4 03 ff fe 20 08 29 43 03 75 47 00
+24 01 2b 2b
+
+T_CNI_LAPDM_Frame_Decoder::
+ frame format is 1 frame type is 4, frame control type is 1
+ 01 3f 49 05 08 70 32 f4 03 ff fe 20 08 29 43 03 75 47 00 24 01 2b 2b
+RIL3MD ==> RRM
+RIL3_MD Dump RRM Message ------------BEGIN
+ Module_ID = 1
+ l3_id = 65442488
+ entry_id = 9
+ lapdm_oid = 10
+ primitive_type = 1
+ sapi = 0
+ channel_type = 0
+ error_cause = 0
+ unserved_data_after_release = 0
+ l3_data.msgLength = 18
+l3data hex dump
+05 08 70 32 f4 03 ff fe 20 08 29 43 03 75 47 00
+24 01
+
+RIL3_MD Dump RRM Message ------------END
+RIL3MD ==> MM
+RIL3_MD Dump CCMM Message ------------BEGIN
+ Module_ID = 1
+ l3_id = 65534800
+ entry_id = 9
+ lapdm_oid = 10
+ primitive_type = 1
+ sapi = 0
+ l3_data.msgLength = 18
+l3data hex dump
+05 08 70 32 f4 03 ff fe 20 08 29 43 03 75 47 00
+24 01
+
+RIL3_MD Dump CCMM Message ------------END
+MM Log: Received Message from MD, Msg Type: 8
+MM Log: Sent Message to LAPDm, Msg Type: 2
+MM Log: Sent Message to RR, Prim. Type, Msg Type: 11 0
+CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x0,channel=0x0,link=0x20)
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x0, channel 0x0, link 0x20
+07 00 00 00 02 03 00 00 00 00 20
+
+RM_MAIN:MD prim=0x0101,entryID=9,sapi=0, OId=10
+ENTER-rm_Despatch
+ENTER-rm_S3SigChanActivated
+ENTER-rm_StopTimer: entryID=9, timerID=0
+ENTER--rm_ProcClassMarkIE: entryID=9
+LUP===========: PD=5,MT=
+LUP:Type IE: present=1,forBit=0,type=0
+LUP:CipherKey IE: present=1,keySeq=7
+LUP:LAI IE---------------------------
+LUP:Classmark1 IE: present=1,revLevel=1,esInd=0,a51=0,rfPowerCap=66538760
+LUP:MobileID IE---------------------------
+STAY in RM_MAIN while(1) loop
+RM_MAIN:MM prim=0x030b,entryID=9
+ENTER-rm_Despatch
+ENTER-rm_S5SigModeEstablished
+ENTER-rm_SendChanRelease:entryId=9
+rm_SendChanRelease: mOId=10,entryId=9,sapi=0
+ENTER-rm_SendDeactivateSacch
+ENTER-rm_StartTimer: entry ID=9, timer ID=2
+STAY in RM_MAIN while(1) loop
+send to dsp:
+03e5c298: 06 00 00 00 08 00 25 00 30 00 20 2d 06 3f 03 30
+03e5c2a8: a2 95 1c 42 4e 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b
+03e5c2b8: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+03e5c2c8: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+sending 1 messages
+CNI_LAPDM_Ph_Callback received PH-DATA-IND, length 36
+20 00 00 00 02 00 02 00 30 00 00 42 4e 01 3f 49
+05 08 70 32 f4 03 ff fe 20 08 29 43 03 75 47 00
+24 01 2b 2b
+
+T_CNI_LAPDM_Frame_Decoder::
+ frame format is 1 frame type is 4, frame control type is 1
+ 01 3f 49 05 08 70 32 f4 03 ff fe 20 08 29 43 03 75 47 00 24 01 2b 2b
+RIL3MD ==> RRM
+RIL3_MD Dump RRM Message ------------BEGIN
+ Module_ID = 1
+ l3_id = 65442488
+ entry_id = 9
+ lapdm_oid = 10
+ primitive_type = 11
+ sapi = 0
+ channel_type = 0
+ error_cause = 14
+ unserved_data_after_release = 0
+ l3_data.msgLength = 0
+l3data hex dump
+
+RIL3_MD Dump RRM Message ------------END
+CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x0,channel=0x0,link=0x20)
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x0, channel 0x0, link 0x20
+07 00 00 00 02 03 00 00 00 00 20
+
+RM_MAIN:MD prim=0x010b,entryID=9,sapi=0, OId=10
+ENTER-rm_Despatch
+ENTER-rm_S7ReleasingSigTrafficChan
+ERROR-rm_S7SigChanActivated: LAPDm message:11
+STAY in RM_MAIN while(1) loop
+CNI_LAPDM_Ph_Callback received PH-DATA-IND, length 36
+20 00 00 00 02 00 02 00 30 00 00 42 4e 01 3f 49
+05 08 70 32 f4 03 ff fe 20 08 29 43 03 75 47 00
+24 01 2b 2b
+
+T_CNI_LAPDM_Frame_Decoder::
+ frame format is 1 frame type is 4, frame control type is 1
+ 01 3f 49 05 08 70 32 f4 03 ff fe 20 08 29 43 03 75 47 00 24 01 2b 2b
+RIL3MD ==> RRM
+RIL3_MD Dump RRM Message ------------BEGIN
+ Module_ID = 1
+ l3_id = 65442488
+ entry_id = 9
+ lapdm_oid = 10
+ primitive_type = 11
+ sapi = 0
+ channel_type = 0
+ error_cause = 14
+ unserved_data_after_release = 0
+ l3_data.msgLength = 0
+l3data hex dump
+
+RIL3_MD Dump RRM Message ------------END
+CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x0,channel=0x0,link=0x20)
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x0, channel 0x0, link 0x20
+07 00 00 00 02 03 00 00 00 00 20
+
+RM_MAIN:MD prim=0x010b,entryID=9,sapi=0, OId=10
+ENTER-rm_Despatch
+ENTER-rm_S7ReleasingSigTrafficChan
+ERROR-rm_S7SigChanActivated: LAPDm message:11
+STAY in RM_MAIN while(1) loop
+CNI_LAPDM_Ph_Callback received PH-DATA-IND, length 36
+20 00 00 00 02 00 02 00 30 00 00 42 4e 01 3f 49
+05 08 70 32 f4 03 ff fe 20 08 29 43 03 75 47 00
+24 01 2b 2b
+
+T_CNI_LAPDM_Frame_Decoder::
+ frame format is 1 frame type is 4, frame control type is 1
+ 01 3f 49 05 08 70 32 f4 03 ff fe 20 08 29 43 03 75 47 00 24 01 2b 2b
+RIL3MD ==> RRM
+RIL3_MD Dump RRM Message ------------BEGIN
+ Module_ID = 1
+ l3_id = 65442488
+ entry_id = 9
+ lapdm_oid = 10
+ primitive_type = 11
+ sapi = 0
+ channel_type = 0
+ error_cause = 14
+ unserved_data_after_release = 0
+ l3_data.msgLength = 0
+l3data hex dump
+
+RIL3_MD Dump RRM Message ------------END
+CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x0,channel=0x0,link=0x20)
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x0, channel 0x0, link 0x20
+07 00 00 00 02 03 00 00 00 00 20
+
+RM_MAIN:MD prim=0x010b,entryID=9,sapi=0, OId=10
+ENTER-rm_Despatch
+ENTER-rm_S7ReleasingSigTrafficChan
+ERROR-rm_S7SigChanActivated: LAPDm message:11
+STAY in RM_MAIN while(1) loop
+CNI_LAPDM_Ph_Callback received PH-DATA-IND, length 36
+20 00 00 00 02 00 02 00 30 00 00 42 4e 01 3f 49
+05 08 70 32 f4 03 ff fe 20 08 29 43 03 75 47 00
+24 01 2b 2b
+
+T_CNI_LAPDM_Frame_Decoder::
+ frame format is 1 frame type is 4, frame control type is 1
+ 01 3f 49 05 08 70 32 f4 03 ff fe 20 08 29 43 03 75 47 00 24 01 2b 2b
+RIL3MD ==> RRM
+RIL3_MD Dump RRM Message ------------BEGIN
+ Module_ID = 1
+ l3_id = 65442488
+ entry_id = 9
+ lapdm_oid = 10
+ primitive_type = 11
+ sapi = 0
+ channel_type = 0
+ error_cause = 14
+ unserved_data_after_release = 0
+ l3_data.msgLength = 0
+l3data hex dump
+
+RIL3_MD Dump RRM Message ------------END
+CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x0,channel=0x0,link=0x20)
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x0, channel 0x0, link 0x20
+07 00 00 00 02 03 00 00 00 00 20
+
+RM_MAIN:MD prim=0x010b,entryID=9,sapi=0, OId=10
+ENTER-rm_Despatch
+ENTER-rm_S7ReleasingSigTrafficChan
+ERROR-rm_S7SigChanActivated: LAPDm message:11
+STAY in RM_MAIN while(1) loop
+CNI_LAPDM_Ph_Callback received PH-RANDOM-ACCESS-IND, length 17
+0d 00 00 00 02 02 00 00 88 00 20 03 50 85 00 00
+00
+
+RIL3MD ==> RRM
+RIL3_MD Dump RRM Message ------------BEGIN
+ Module_ID = 1
+ l3_id = 65442488
+ entry_id = 0
+ lapdm_oid = 1
+ primitive_type = 10
+ sapi = 0
+ channel_type = 7
+ error_cause = 0
+ unserved_data_after_release = 0
+ l3_data.msgLength = 8
+l3data hex dump
+03 50 85 00 00 00 08 70
+
+RIL3_MD Dump RRM Message ------------END
+CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x0,channel=0x0,link=0x20)
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x0, channel 0x0, link 0x20
+07 00 00 00 02 03 00 00 00 00 20
+
+RM_MAIN:MD prim=0x010a,entryID=0,sapi=0, OId=1
+ENTER-rm_Despatch
+Entering rm_DlRaInd=0x010a
+ENTER-rm_DlRaInd
+TRACK-rm_DlRaInd: neci=0,cos=0,ref=3
+ENTER-rm_ChanReq
+ENTER-rm_AllocateSmCtxt
+TRACK-rm_AllocSmCtxt: Assigned SDCCH4 = 3
+ENTER-rm_SendChanActivation
+STAY in RM_MAIN while(1) loop
+send to dsp:
+03e5c298: 19 00 00 00 08 00 21 00 38 00 00 00 03 01 00 01
+03e5c2a8: 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b
+03e5c2b8: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+03e5c2c8: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+sending 1 messages
+From DSP
+03e64844: 08 00 22 00 38 00 52 74 50 85 00 00 00 08 70 32
+ENTER-rm_GetIrtEntryId
+TRACK-rm_GetIrtEntryId: Idx=3, entryId=11
+Rx L1 primitive= 0x0001,entryID=11
+ENTER-rm_Despatch
+ENTER-rm_S2ActivatingSigTrafficChan
+ENTER-rm_SendImmAssign
+RM_SENDIMMASSIGN: l3_data.length=23
+ENTER-rm_StartTimer: entry ID=11, timer ID=0
+STAY in RM_MAIN while(1) loop
+send to dsp:
+03e5c298: 1e 00 00 00 02 00 01 00 90 00 20 2d 06 3f 03 38
+03e5c2a8: a2 95 03 50 85 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b
+03e5c2b8: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+03e5c2c8: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+sending 1 messages
+Rx RM primitive= 0x0003, entryID=11, timerId=0
+ENTER-rm_Despatch
+ENTER-rm_S3SigChanActivated
+rm_S3SigChanActivated: Timer Expiry for entryID=11
+ENTER-rm_SendRfChanRelease
+STAY in RM_MAIN while(1) loop
+send to dsp:
+03e5c298: 06 00 00 00 08 00 2e 00 38 00 20 2d 06 3f 03 38
+03e5c2a8: a2 95 03 50 85 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b
+03e5c2b8: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+03e5c2c8: ee ee ee ee ee ee ee ee ee ee ee ee ac 2e 16 00
+sending 1 messages
+
diff --git a/data/mnet/GP10/Host/rm/Src/Makefile b/data/mnet/GP10/Host/rm/Src/Makefile
new file mode 100644
index 0000000..93cb0f8
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = rm
+THIS_DIRECTORY = Src
+MY_OUTPUT = $(OBJDIR)\rm.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/rm/Src/cmdlogact b/data/mnet/GP10/Host/rm/Src/cmdlogact
new file mode 100644
index 0000000..e83f68a
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/cmdlogact
@@ -0,0 +1,5 @@
+
+DIAG:LOG:NAME L3L
+
+DIAG:LOG:STAT:ACT
+
diff --git a/data/mnet/GP10/Host/rm/Src/intg_CellCfg.cpp b/data/mnet/GP10/Host/rm/Src/intg_CellCfg.cpp
new file mode 100644
index 0000000..8929fd8
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/intg_CellCfg.cpp
@@ -0,0 +1,45 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __INTG_CELLCFG_CPP__
+#define __INTG_CELLCFG_CPP__
+
+#include "rm/rm_head.h"
+
+void intg_CellCfg(s16 arfcn, s16 narfcn, u8 bsic, u8 accessClass, u8 mnc1, u8 mnc2)
+{
+ ((CarrierFrequencyEntry*)
+ (grr_OamData.radioCarrierPackage[
+ grr_OamData.transceiverPackage[0].relatedRadioCarrier
+ ].carrierFrequencyList))[0].carrierFrequency = arfcn;
+// ((CarrierFrequencyEntry*)
+// (grr_OamData.radioCarrierPackage[
+// grr_OamData.transceiverPackage[1].relatedRadioCarrier
+// ].carrierFrequencyList))[0].carrierFrequency = arfcn;
+ ((CellAllocationEntry*)
+ (grr_OamData.btsBasicPackage.cellAllocationTable))[0].cellAllocation = arfcn;
+ ((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[
+ 0].adjCell_bCCHFrequency = narfcn; //1st neig-cell in ho-adj cell list
+ ((AdjCell_ReselectionEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_reselectionTable))[0
+ ].adjCell_reselectionBCCHFrequency = narfcn;
+ grr_OamData.btsBasicPackage.bts_ncc = (bsic>>3)&0x00000007;
+ grr_OamData.btsBasicPackage.bts_cid = bsic&0x00000007;
+ for (int i=0;i<16;i++)
+ ((NotAllowedAccessClassEntry*)
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[
+ i].notAllowedAccessClass = 1; //1:not allowed
+ ((NotAllowedAccessClassEntry*)
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[
+ accessClass].notAllowedAccessClass = 0; //0: allowed
+ ((unsigned char*)&(grr_OamData.btsBasicPackage.bts_mnc))[0]=mnc1;
+ ((unsigned char*)&(grr_OamData.btsBasicPackage.bts_mnc))[1]=mnc2;
+} /* intg_CellCfg() */
+
+#endif /*__INTG_CELLCFG_CPP__*/
diff --git a/data/mnet/GP10/Host/rm/Src/intg_ClearRmChans.cpp b/data/mnet/GP10/Host/rm/Src/intg_ClearRmChans.cpp
new file mode 100644
index 0000000..9868fb4
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/intg_ClearRmChans.cpp
@@ -0,0 +1,68 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __INTG_CLEARRMCHANS_CPP__
+#define __INTG_CLEARRMCHANS_CPP__
+
+#include "rm/rm_head.h"
+
+void intg_ClearRmChans(void)
+{
+ u8 i;
+
+ for (i=0; i<15; i++)
+ {
+ rm_PhyChanTchf[i].state = RM_PHYCHAN_FREE;
+ rm_PhyChanTchf[i].pMSmCtxt->state = RM_S1RM_RUNNING;
+ rm_PhyChanTchf[i].pASmCtxt->state = RM_S1RM_RUNNING;
+ wdCancel(rm_PhyChanTchf[i].T3101.id);
+ wdCancel(rm_PhyChanTchf[i].T3109.id);
+ wdCancel(rm_PhyChanTchf[i].T3111.id);
+ wdCancel(rm_PhyChanTchf[i].T3L01.id);
+ }
+
+ for (i=0; i<4; i++)
+ {
+ rm_PhyChanSdcch4[i].state = RM_PHYCHAN_FREE;
+ rm_PhyChanSdcch4[i].pMSmCtxt->state = RM_S1RM_RUNNING;
+ rm_PhyChanSdcch4[i].pASmCtxt->state = RM_S1RM_RUNNING;
+ wdCancel(rm_PhyChanSdcch4[i].T3101.id);
+ wdCancel(rm_PhyChanSdcch4[i].T3109.id);
+ wdCancel(rm_PhyChanSdcch4[i].T3111.id);
+ wdCancel(rm_PhyChanSdcch4[i].T3L01.id);
+ }
+
+ /* Print TCHF channel description data */
+ printf("========TCHF ALLOCATION STATUS========\n");
+ for (i=0; i<15; i++)
+ {
+ printf("TCH/F-%d: state=%d,chan=%02x, mEntryId=%d,mSMstate=%d\n",
+ i,
+ rm_PhyChanTchf[i].state,
+ rm_PhyChanTchf[i].chanNumberMSB,
+ rm_PhyChanTchf[i].pMSmCtxt->entryId,
+ rm_PhyChanTchf[i].pMSmCtxt->state
+ );
+ }
+
+ /* Print SDCCH4 channel description data */
+ printf("\n========SDCCH ALLOCATION STATUS========\n");
+ for (i=0; i<4; i++)
+ {
+ printf("SDCCH4-%d: state=%d, chan=%02x, mEntryId=%d,mSMstate=%d\n",
+ i,
+ rm_PhyChanSdcch4[i].state,
+ rm_PhyChanSdcch4[i].chanNumberMSB,
+ rm_PhyChanSdcch4[i].pMSmCtxt->entryId,
+ rm_PhyChanSdcch4[i].pMSmCtxt->state
+ );
+ }
+}
+
+#endif /* __INTG_CLEARRMCHANS_CPP__ */
+
diff --git a/data/mnet/GP10/Host/rm/Src/intg_SendAsyncHoReqToDsp.cpp b/data/mnet/GP10/Host/rm/Src/intg_SendAsyncHoReqToDsp.cpp
new file mode 100644
index 0000000..f320916
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/intg_SendAsyncHoReqToDsp.cpp
@@ -0,0 +1,37 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __INTG_SENDASYNCHOREQUESTTODSP_CPP__
+#define __INTG_SENDASYNCHOREQUESTTODSP_CPP__
+
+//HOADDED
+#include "rm/rm_head.h"
+
+void intg_SendAsyncHoRequestToDsp( u8 trx, u8 chan);
+
+void intg_SendAsyncHoRequestToDsp( u8 trx, u8 chan)
+{
+ rm_ItcTxMsg_t msgToL1;
+ u16 length;
+ u8 i;
+
+ RDEBUG__(("ENTER-rm_SendHoRequestToDsp\n"));
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_DEDMGMT;
+ msgToL1.buffer[length++] = RM_L1MT_AYSNCHO_REQ_MSB;
+ msgToL1.buffer[length++] = RM_L1MT_AYSNCHO_REQ_LSB;
+ msgToL1.buffer[length++] = trx;
+ msgToL1.buffer[length++] = (0x08|chan); // chan is TCH/F assumed only
+ msgToL1.buffer[length++] = 0;
+ msgToL1.msgLength = length;
+
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+
+}
+
+#endif /*__INTG_SENDASYNCHOREQUESTTODSP_CPP__*/
diff --git a/data/mnet/GP10/Host/rm/Src/intg_SendCbCmd.cpp b/data/mnet/GP10/Host/rm/Src/intg_SendCbCmd.cpp
new file mode 100644
index 0000000..5b9174c
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/intg_SendCbCmd.cpp
@@ -0,0 +1,77 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __INTG_SENDCBCMD_CPP__
+#define __INTG_SENDCBCMD_CPP__
+
+#include "rm/rm_head.h"
+
+void intg_SendCbCmd(u8 cmdCode, u16 msgCode, u16 updateNo)
+{
+ rm_ItcRxVbMsg_t msg;
+ int length;
+ unsigned short hdr12,hdr34;
+ unsigned char hdr5,hdr6;
+
+ switch(cmdCode)
+ {
+ case 1: //Send test CB message to DSP
+ memset((s8 *)&msg, 0, 110); //sizeof(rm_ItcRxVbMsg_t));
+ hdr12=0;hdr34=0;hdr5=0;hdr6=0;
+ msg.module_id = MODULE_SMSCBC;
+ msg.message_type = INTER_SMSCBC_CB_START;
+ msg.size = 88; //one page
+ hdr12 = (00<<14)|(msgCode<<4)|(updateNo);
+ length = 0;
+ //Serial Number:cell wide immediate display
+ msg.data[length++] = (u8)(hdr12>>8);
+ msg.data[length++] = (u8)(hdr12);
+ //Message Identifier: 1 assumed
+ msg.data[length++] = 0;
+ msg.data[length++] = 1;
+ //Data coding scheme: default alphabet, English
+ msg.data[length++] = 0x01;
+ //Page parameter: 0x11, one page only
+ msg.data[length++] = 0x11;
+ //contents: Go JetCell!
+ msg.data[length++] = 0xc7;
+ msg.data[length++] = 0x37;
+ msg.data[length++] = 0x48;
+ msg.data[length++] = 0x59;
+ msg.data[length++] = 0xa6;
+ msg.data[length++] = 0x0f;
+ msg.data[length++] = 0xd9;
+ msg.data[length++] = 0xec;
+ msg.data[length++] = 0x10;
+ msg.data[length++] = 0x08;
+ msg.data[length++] = 0x04;
+ msg.data[length++] = 0x02;
+ msg.data[length++] = 0x81;
+ break;
+
+ case 0: //Stop sending cur CB message
+ msg.module_id = MODULE_SMSCBC;
+ msg.message_type = INTER_SMSCBC_CB_STOP;
+ msg.size = 0;
+ break;
+ }
+ if (cmdCode<2)
+ {
+ //Send a test CB message to RM
+ if (ERROR==msgQSend(rm_MsgQId, (s8 *)&msg, RM_MAX_TXQMSG_LENGTH,
+ NO_WAIT, MSG_PRI_NORMAL) )
+ printf("ERROR@intg_SendCbCmd: msgQSend errno:%d\n", errno);
+ } else
+ {
+ printf("usage@intg_SendCbCmd: cmdCode: 0-stop CB, 1-broad test CB\n");
+ }
+
+}
+
+#endif //__INTG_SENDCBCMD_CPP__
+
diff --git a/data/mnet/GP10/Host/rm/Src/intg_SendChanActivation.cpp b/data/mnet/GP10/Host/rm/Src/intg_SendChanActivation.cpp
new file mode 100644
index 0000000..0380e1f
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/intg_SendChanActivation.cpp
@@ -0,0 +1,61 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __INTG_SENDCHANACTIVATION_CPP__
+#define __INTG_SENDCHANACTIVATION_CPP__
+
+#include "rm/rm_head.h"
+
+void intg_SendChanActivation( u8 trx,u8 chan);
+
+void intg_SendChanActivation( u8 trx, u8 chan)
+{
+ rm_ItcTxMsg_t msgToL1;
+ u16 length;
+ u8 i;
+
+ RDEBUG__(("ENTER-rm_SendChanActivation\n"));
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_DEDMGMT;
+ msgToL1.buffer[length++] = RM_L1MT_CHANACTIV_MSB;
+ msgToL1.buffer[length++] = RM_L1MT_CHANACTIV_LSB;
+ msgToL1.buffer[length++] = trx;
+ msgToL1.buffer[length++] = (0x08|chan);
+ msgToL1.buffer[length++] = 0;
+ msgToL1.buffer[length++] = RM_L1ACTTYPE_IMMASS;
+
+ //PR1248 Begin
+ msgToL1.buffer[length] = 0; // DTX ul&dl OFF
+
+ //PR1381 BEGIN
+ if ( ((int)OAMrm_MS_UPLINK_DTX_STATE==1) ||
+ ((int)OAMrm_MS_UPLINK_DTX_STATE==0) )
+ msgToL1.buffer[length] |= 1; //DTX ul ON
+ //PR1381 END
+
+// PR1319
+// if (!trx && OAMrm_MS_DNLINK_DTX_STATE)
+ if (trx && OAMrm_MS_DNLINK_DTX_STATE)
+ msgToL1.buffer[length] |= 2; //DTX dl ON
+ length++;
+ //PR1248 End
+
+ msgToL1.buffer[length++] = RM_L1DATATTR_SPEECH;
+ msgToL1.buffer[length++] = RM_L1RATTYPE_TCHF;
+ msgToL1.buffer[length++] = 1; //RM_L1CODALGO_NORES;
+ msgToL1.buffer[length++] = RM_L1CIPHTYPE_NCIPH;
+ for (i=0;i<RM_L1CIPHKEY_LEN;i++)
+ msgToL1.buffer[length++] = 0;
+
+ msgToL1.msgLength = length;
+
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+
+}
+
+#endif /*__INTG_SENDCHANACTIVATION_CPP__*/
diff --git a/data/mnet/GP10/Host/rm/Src/intg_SendChanDeActivation.cpp b/data/mnet/GP10/Host/rm/Src/intg_SendChanDeActivation.cpp
new file mode 100644
index 0000000..8d72ba8
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/intg_SendChanDeActivation.cpp
@@ -0,0 +1,32 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __INTG_SENDCHANDEACTIVATION_CPP__
+#define __INTG_SENDCHANDEACTIVATION_CPP__
+
+#include "rm\rm_head.h"
+
+void intg_SendChanDeActivation( u8 trx, u8 chan)
+{
+ rm_ItcTxMsg_t msgToL1;
+ u16 length;
+
+ RDEBUG__(("ENTER-rm_SendChanDeActivation\n"));
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_DEDMGMT;
+ msgToL1.buffer[length++] = RM_L1MT_RFCHANREL_MSB;
+ msgToL1.buffer[length++] = RM_L1MT_RFCHANREL_LSB;
+ msgToL1.buffer[length++] = trx;
+ msgToL1.buffer[length++] = (0x08|chan);
+ msgToL1.buffer[length++] = 0;
+ msgToL1.msgLength = length;
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+
+}
+
+#endif /*__INTG_SENDCHANDEACTIVATION_CPP__*/
diff --git a/data/mnet/GP10/Host/rm/Src/intg_SendDisc.cpp b/data/mnet/GP10/Host/rm/Src/intg_SendDisc.cpp
new file mode 100644
index 0000000..502ec95
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/intg_SendDisc.cpp
@@ -0,0 +1,44 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __INTG_SENDDISCTOLAPDM_CPP__
+#define __INTG_SENDDISCTOLAPDM_CPP__
+
+#include "lapdm\lapdm_l1intf.h"
+
+void intg_SendDiscToLapdm(void)
+{
+ int intg_DiscLen = 14;
+ unsigned char intg_DiscData[14] =
+ {
+ 0x0A, // length = 10
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x02, //1-1. Protocol Descriminator
+ 0x00, //1-2. Message Type MSB byte
+ 0x02, //1-3. Message Type LSB byte
+ 0x00, //1-4. Trx
+ 0x20, //1-5. Channel Number MSB byte
+ 0x00, //1-6. Channel Number LSB byte
+ 0x00, //1-7. Link Identifier: main DCCH
+// 0x0B, //1-8. T1 and T3 hi part
+// 0x14, //1-9. T3 low par and T2
+// 0x02, //2-10. length of L2 information
+ 0x03, //2-11. L2 frame Addr.
+ 0X43, //2-12. L2 frame DISC
+ 0x01 //2-13. L2 frame length
+ };
+
+ CNI_LAPDM_Ph_Callback(
+ intg_DiscLen,
+ intg_DiscData
+ );
+}
+
+#endif /* #define __INTG_SENDDISCTOLAPDM_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/intg_SendPhConnIndToLapdm.cpp b/data/mnet/GP10/Host/rm/Src/intg_SendPhConnIndToLapdm.cpp
new file mode 100644
index 0000000..c128954
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/intg_SendPhConnIndToLapdm.cpp
@@ -0,0 +1,112 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __INTG_SENDPHCONNINDTOLAPDM_CPP__
+#define __INTG_SENDPHCONNINDTOLAPDM_CPP__
+
+#include "rm/rm_head.h"
+#include "lapdm/lapdm_l1intf.h"
+
+#define NUM_SDCCH4S 4
+#define NUM_TCHFS 2
+#define TRX_IDX 7
+#define CHN_MSB 8
+#define CHN_LSB 9
+#define LNK_IDX 10
+
+void intg_SendPhConnIndToLapdm(void);
+
+void intg_SendPhConnIndToLapdm(void)
+{
+ int i;
+ int intg_PhConnIndLen = 11;
+ unsigned char intg_PhConnIndData[11] =
+ {
+ 0x10,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x02, //1. L2 PD
+ 0x01, //2. L2 MT: PH_CONN_IND MSB
+ 0x00, //3. L2 MT: PH_CONN_IND LSB
+ 0x00, //4. Trx
+ 0x00, //5. Channel Number MSB byte
+ 0x00, //6. Channel Number LSB byte
+ 0x00, //7. Link Identifier
+ };
+
+ /*
+ ** Send PH_CONN_IND for RACH
+ */
+ intg_PhConnIndData[TRX_IDX] = 0;
+ intg_PhConnIndData[CHN_MSB] = rm_PhyChanBCcch[RM_RACH_IDX].chanNumberMSB;
+ intg_PhConnIndData[CHN_LSB] = rm_PhyChanBCcch[RM_RACH_IDX].chanNumberLSB;
+ intg_PhConnIndData[LNK_IDX] = RM_L1LINK_VOID;
+
+ CNI_LAPDM_Ph_Callback(
+ intg_PhConnIndLen,
+ intg_PhConnIndData
+ );
+ /*
+ ** Send PH_CONN_IND for all the FACCH and SACCH channels
+ */
+ for (i=0;i<NUM_TCHFS;i++)
+ {
+ /* PH_CONN_IND for FACCH */
+ intg_PhConnIndData[TRX_IDX] = rm_PhyChanTchf[i].trxNumber;
+ intg_PhConnIndData[CHN_MSB] = rm_PhyChanTchf[i].chanNumberMSB;
+ intg_PhConnIndData[CHN_LSB] = rm_PhyChanTchf[i].chanNumberLSB;
+ intg_PhConnIndData[LNK_IDX] = RM_L1LINK_MAIN;
+
+ CNI_LAPDM_Ph_Callback(
+ intg_PhConnIndLen,
+ intg_PhConnIndData
+ );
+
+ /* PH_CONN_IND for SACCH */
+ intg_PhConnIndData[TRX_IDX] = rm_PhyChanTchf[i].trxNumber;
+ intg_PhConnIndData[CHN_MSB] = rm_PhyChanTchf[i].chanNumberMSB;
+ intg_PhConnIndData[CHN_LSB] = rm_PhyChanTchf[i].chanNumberLSB;
+ intg_PhConnIndData[LNK_IDX] = RM_L1LINK_ACCH;
+
+ CNI_LAPDM_Ph_Callback(
+ intg_PhConnIndLen,
+ intg_PhConnIndData
+ );
+ }
+
+ /*
+ ** Send PH_CONN_IND for all the SDCCH4 and SACCH channels
+ */
+ for (i=0;i<NUM_SDCCH4S;i++)
+ {
+ /* PH_CONN_IND for SDCCH4 */
+ intg_PhConnIndData[TRX_IDX] = rm_PhyChanSdcch4[i].trxNumber;
+ intg_PhConnIndData[CHN_MSB] = rm_PhyChanSdcch4[i].chanNumberMSB;
+ intg_PhConnIndData[CHN_LSB] = rm_PhyChanSdcch4[i].chanNumberLSB;
+ intg_PhConnIndData[LNK_IDX] = RM_L1LINK_MAIN;
+
+ CNI_LAPDM_Ph_Callback(
+ intg_PhConnIndLen,
+ intg_PhConnIndData
+ );
+
+ /* PH_CONN_IND for SACCH */
+ intg_PhConnIndData[TRX_IDX] = rm_PhyChanSdcch4[i].trxNumber;
+ intg_PhConnIndData[CHN_MSB] = rm_PhyChanSdcch4[i].chanNumberMSB;
+ intg_PhConnIndData[CHN_LSB] = rm_PhyChanSdcch4[i].chanNumberLSB;
+ intg_PhConnIndData[LNK_IDX] = RM_L1LINK_ACCH;
+
+ CNI_LAPDM_Ph_Callback(
+ intg_PhConnIndLen,
+ intg_PhConnIndData
+ );
+ }
+}
+
+#endif /* __INTG_SENDPHRAINDTOLAPDM_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/intg_SendPhRaIndToLapdm.cpp b/data/mnet/GP10/Host/rm/Src/intg_SendPhRaIndToLapdm.cpp
new file mode 100644
index 0000000..9c83eca
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/intg_SendPhRaIndToLapdm.cpp
@@ -0,0 +1,48 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __INTG_SENDPHRAINDTOLAPDM_CPP__
+#define __INTG_SENDPHRAINDTOLAPDM_CPP__
+
+#include "lapdm\lapdm_l1intf.h"
+void intg_SendPhRaIndToLapdm(void);
+
+void intg_SendPhRaIndToLapdm(void)
+{
+ int intg_PhRaIndLen = 19;
+ unsigned char intg_PhRaIndData[19] =
+ {
+ 0x10,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x02, //1. Protocol Descriminator
+ 0x02, //2. Message Type MSB byte
+ 0x00, //3. Message Type LSB byte
+ 0x00, //4. Trx
+ 0x88, //5. Channel Number MSB byte
+ 0x00, //6. Channel Number LSB byte
+ 0x20, //7. Link Identifier: N.A case
+ //0x04, //8. CCCH block on which RA received
+ 0x0D, //9 Ref #: estCause=LUP, random no=13. NECI=0
+ 0x0B, //10. T1 and T3 hi part
+ 0x14, //11. T3 low par and T2
+ 0x00, //12. Access delay
+ 0x00, //13. SNIR byte 1 (MSB)
+ 0x00, //14. SNIR byte 2
+ 0x00, //15. SNIR byte 3
+ 0x00 //16. SNIR byte 4 (LSB)
+ };
+
+ CNI_LAPDM_Ph_Callback(
+ intg_PhRaIndLen,
+ intg_PhRaIndData
+ );
+}
+
+#endif /* __INTG_SENDPHRAINDTOLAPDM_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/intg_SendPhyInfo.cpp b/data/mnet/GP10/Host/rm/Src/intg_SendPhyInfo.cpp
new file mode 100644
index 0000000..8d0b7db
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/intg_SendPhyInfo.cpp
@@ -0,0 +1,34 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+
+#ifndef __INTG_SENDPHYINFO_CPP__
+#define __INTG_SENDPHYINFO_CPP__
+
+//HOADDED
+//!!! TCH/F assumed
+#include "rm/rm_head.h"
+
+void intg_SendPhyInfo(u16 chan)
+{
+ T_CNI_IRT_ID entryId;
+ rm_L3Data_t l3_data;
+
+ l3_data.buffer[0] = (u8)RM_PD;
+ l3_data.buffer[1] = (u8)CNI_RIL3RRM_MSGID_PHYSICAL_INFORMATION;
+ l3_data.buffer[2] = rm_pSmCtxt->pPhyChan->hoTa;
+ l3_data.msgLength = 3;
+
+ if (!rm_TrxSlotToEntryId(chan, &entryId))
+ EDEBUG__(("intg_SendPhyInfo: Failed to convert chan=%x to entryId\n",chan));
+
+ //Send out l3_data via DL_UNIT_DATA_REQ
+ CNI_LAPDM_Dl_Unit_Data_Request(rm_SmCtxt[entryId].mOId, 0, L2T_NORMAL_HEADER, &l3_data);
+
+}
+#endif /*__INTG_SENDPHYINFO_CPP__*/
diff --git a/data/mnet/GP10/Host/rm/Src/intg_SendRrRelReqToRm.cpp b/data/mnet/GP10/Host/rm/Src/intg_SendRrRelReqToRm.cpp
new file mode 100644
index 0000000..9993777
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/intg_SendRrRelReqToRm.cpp
@@ -0,0 +1,50 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __INTG_SENDRRRELREQ_CPP__
+#define __INTG_SENDTCHRELREQTORM_CPP__
+
+#include "rm\rm_head.h"
+//#include "stdio.h"
+//#include "vxWorks.h"
+//#include "msgQlib.h"
+//#include "jcc\sys_const.h"
+//#include "JCCJCCL3Msg.h"
+//#include "rm\rm_data.h"
+//#include "debug.h"
+
+extern MSG_Q_ID rm_MsgQId;
+
+void intg_SendTchRelReqToRm(void);
+
+void intg_SendTchRelReqToRm(void)
+{
+ u8 i;
+ STATUS result;
+ IntraL3Msg_t msg;
+
+ msg.module_id = MODULE_MM;
+ msg.primitive_type = INTRA_L3_RR_REL_REQ;
+
+ for (i=0;i<15;i++)
+ {
+ msg.entry_id = (i<<1)+1;
+ result = msgQSend(
+ rm_MsgQId,
+ (char *) &msg,
+ sizeof(IntraL3Msg_t),
+ NO_WAIT,
+ MSG_PRI_NORMAL
+ );
+ if ( result==ERROR )
+ EDEBUG__(("ERROR-intg_SentRrRelReqToRm: VxWorks sending error:%d\n",
+ errno));
+ }
+}
+
+#endif /* __INTG_SENDTCHRELREQTORM_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/intg_SendSabmLup.cpp b/data/mnet/GP10/Host/rm/Src/intg_SendSabmLup.cpp
new file mode 100644
index 0000000..dd6a4a9
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/intg_SendSabmLup.cpp
@@ -0,0 +1,63 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __INTG_SENDSABMLUP_CPP__
+#define __INTG_SENDSABMLUPTOLAPDM_CPP__
+
+#include "lapdm\lapdm_l1intf.h"
+void intg_SendSabmLupToLapdm(void);
+
+void intg_SendSabmLupToLapdm(void)
+{
+ int intg_SabmLupLen = 34;
+ unsigned char intg_SabmLupData[34] =
+ {
+ 0x1C, // length = 28
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x02, //1-1. Protocol Descriminator
+ 0x00, //1-2. Message Type MSB byte
+ 0x02, //1-3. Message Type LSB byte
+ 0x00, //1-4. Trx
+ 0x20, //1-5. Channel Number MSB byte
+ 0x00, //1-6. Channel Number LSB byte
+ 0x00, //1-7. Link Identifier: main DCCH
+ 0x0B, //1-8. T1 and T3 hi part
+ 0x14, //1-9. T3 low par and T2
+// 0x15, //2-10. length of L3 information
+ 0x03, //2-11. command
+ 0x3f, //2-12. poll bit 1
+ 0x49, //2-13. length:=18, See 04.06/3.6
+ 0x05, //3-14. SI=0, Protocol Descriminator=5
+ 0x08, //3-15. SD=0, Message Type=8
+ 0x70, //3-16. No CKSN, normal LUP
+ 0x00, //3-17. LAI: MCC1,MCC2
+ 0xF1, //3-18. LAI: MCC3
+ 0x10, //3-19. LAI: NNC1, MNC2
+ 0x00, //3-20. LAI: LAI 1
+ 0x01, //3-21. LAI: LAI 2
+ 0x2C, //3-22. Classmark 1: Rev=01(Ph2), ES=0(No ES IND), A5/1=0, RF Pow=011 (Class3)
+ 0x08, //3-23. Mobile Identity IE length
+ 0x09, //3-24. Digit 1=1. Odd, IMSI
+ 0x10, //3-25. digit 2, digit 3
+ 0x10, //3-26. digit 4, digit 5
+ 0x00, //3-27. digit 6, digit 7
+ 0x00, //3-28. digit 8, digit 9
+ 0x00, //3-29. digit 10, digit 11
+ 0x00, //3-30. digit 12, digit 13
+ 0x10 //3-31. digit 14, digit 15
+ };
+
+ CNI_LAPDM_Ph_Callback(
+ intg_SabmLupLen,
+ intg_SabmLupData
+ );
+}
+
+#endif /* #define __INTG_SENDSABMLUPTOLAPDM_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/intg_SetDlSG.cpp b/data/mnet/GP10/Host/rm/Src/intg_SetDlSG.cpp
new file mode 100644
index 0000000..df9d653
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/intg_SetDlSG.cpp
@@ -0,0 +1,36 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __INTG_SETDLSG_CPP__
+#define __INTG_SETDLSG_CPP__
+
+#include "rm\rm_head.h"
+
+void intg_SetDlSG(u8 trx, u16 gain)
+{
+ rm_ItcTxMsg_t msgToL1; /* Store an encoded message sent to L1 */
+ u16 length; /* Length of the message to send to L1 */
+
+ /* Encode SET Uplink GAIN message for TRX */
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_TRXMGMT; //0x10
+ msgToL1.buffer[length++] = RM_L1MT_SETDGAIN_MSB; //0x11
+ msgToL1.buffer[length++] = RM_L1MT_SETDGAIN_LSB; //0x00
+ msgToL1.buffer[length++] = trx;
+ msgToL1.buffer[length++] = (u8)((gain>>8)&0x00FF);
+ msgToL1.buffer[length++] = (u8)(gain&0x00FF);
+
+
+ msgToL1.msgLength = length;
+
+ /* Send TRX CONFIGure to L1 */
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer); /* TBD: Provided by L1 */
+
+} /* intg_SetDlSG() */
+
+#endif /* __INTG_SETDLSG_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/intg_SetGsmCodec.cpp b/data/mnet/GP10/Host/rm/Src/intg_SetGsmCodec.cpp
new file mode 100644
index 0000000..e0a1b5a
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/intg_SetGsmCodec.cpp
@@ -0,0 +1,35 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __INTG_SETGSMCODEC_CPP__
+#define __INTG_SETGSMCODEC_CPP__
+
+#include "rm\rm_head.h"
+
+void intg_SetGsmCodec(u8 codec)
+{
+oam_gsmCodec = codec; //0x01-FR, 0x21-EFR, 0x41-superEFR
+} /* intg_SetGsmCodec() */
+
+void intg_TuneC1C2(u8 reselOffset, u8 tempOffset, u8 penaltyTime)
+{
+ printf("1st param--CellReselectOffset: 0-126 dB, 2dB steps; 0=0dB, 1=2dB...\n");
+ printf("2nd param--TemporaryOffset: 0-60 dB,10dB steps; 0=0dB, 1=10dB,...,7=infinity\n");
+ printf("3rd param--PenaltyTime: 0-30 20sec steps???, 31 meaning differently\n");
+// oam_CellReselectOffset=reselOffset;
+// oam_TemporaryOffset=tempOffset;
+// oam_PenaltyTime=penaltyTime;
+ OAMrm_CELL_RESELECT_OFFSETa=reselOffset;
+ OAMrm_TEMP_OFFESTa=tempOffset;
+ OAMrm_PENALTY_TIMEa=penaltyTime;
+ rm_SendSystemInfo3ToBcchTrx(0,3,OAMrm_RA_CELL_BARRED_STATE);
+ rm_SendSystemInfo4ToBcchTrx(0,4,OAMrm_RA_CELL_BARRED_STATE);
+}
+
+
+#endif /*__INTG_SETGSMCODEC_CPP__*/
diff --git a/data/mnet/GP10/Host/rm/Src/intg_SetUlSG.cpp b/data/mnet/GP10/Host/rm/Src/intg_SetUlSG.cpp
new file mode 100644
index 0000000..308737a
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/intg_SetUlSG.cpp
@@ -0,0 +1,37 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __INTG_SETULSG_CPP__
+#define __INTG_SETULSG_CPP__
+
+#include "rm\rm_head.h"
+
+void intg_SetUlSG(u8 trx, u16 gain)
+{
+ rm_ItcTxMsg_t msgToL1; /* Store an encoded message sent to L1 */
+ u16 length; /* Length of the message to send to L1 */
+
+ /* It's caller's responsiblity to make sure trx valid */
+
+ /* Encode SET Uplink GAIN message for TRX */
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_TRXMGMT; //0x10
+ msgToL1.buffer[length++] = RM_L1MT_SETUGAIN_MSB; //0x10
+ msgToL1.buffer[length++] = RM_L1MT_SETUGAIN_LSB; //0x00
+ msgToL1.buffer[length++] = trx;
+ msgToL1.buffer[length++] = (u8)((gain>>8)&0x00FF);
+ msgToL1.buffer[length++] = (u8)(gain&0x00FF);
+
+ msgToL1.msgLength = length;
+
+ /* Send TRX CONFIGure to L1 */
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer); /* TBD: Provided by L1 */
+
+} /* intg_SetUlSG() */
+
+#endif /*__INTG_SETULSG_CPP__*/
diff --git a/data/mnet/GP10/Host/rm/Src/intg_ShowRmChans.cpp b/data/mnet/GP10/Host/rm/Src/intg_ShowRmChans.cpp
new file mode 100644
index 0000000..69040e6
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/intg_ShowRmChans.cpp
@@ -0,0 +1,55 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __INTG_SHOWRMCHANS_CPP__
+#define __INTG_SHOWRMCHANS_CPP__
+
+#include "rm\rm_head.h"
+
+void intg_ShowRmChans(void)
+{
+ u8 i;
+
+ /* Print Cell Bar status */
+ printf("======== CELL BARRED STATUS ==========\n");
+ printf("Overload CellBar Ctrl=%d, MIB Barred Setting=%d, Current Barred Control status=%d\n",
+ OAMrm_OVERLOAD_CELLBAR,
+ OAMrm_RA_CELL_BARRED_STATE, rm_VcIsBarred);
+
+
+ /* Print TCHF channel description data */
+ printf("========TCHF ALLOCATION STATUS========\n");
+ for (i=0; i<15; i++)
+ {
+ printf("TCH/F-%d: state=%d,chan=%02x, mEntryId=%d, mSMstate=%d, amState=%d\n",
+ i,
+ rm_PhyChanTchf[i].state,
+ rm_PhyChanTchf[i].chanNumberMSB,
+ rm_PhyChanTchf[i].pMSmCtxt->mEntryId,
+ rm_PhyChanTchf[i].pMSmCtxt->state,
+ rm_PhyChanTchf[i].amState
+ );
+ }
+
+ /* Print SDCCH4 channel description data */
+ printf("\n========SDCCH ALLOCATION STATUS========\n");
+ for (i=0; i<4; i++)
+ {
+ printf("SDCCH4-%d: state=%d, chan=%02x, mEntryId=%d, mSMstate=%d, amState=%d\n",
+ i,
+ rm_PhyChanSdcch4[i].state,
+ rm_PhyChanSdcch4[i].chanNumberMSB,
+ rm_PhyChanSdcch4[i].pMSmCtxt->mEntryId,
+ rm_PhyChanSdcch4[i].pMSmCtxt->state,
+ rm_PhyChanSdcch4[i].amState
+ );
+ }
+}
+
+#endif /* __INTG_SHOWRMCHANS_CPP__ */
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_AllocSmCtxt.cpp b/data/mnet/GP10/Host/rm/Src/rm_AllocSmCtxt.cpp
new file mode 100644
index 0000000..e6a2bf4
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_AllocSmCtxt.cpp
@@ -0,0 +1,172 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_ALLOCSMCTXT_CPP__
+#define __RM_ALLOCSMCTXT_CPP__
+
+#include "rm\rm_head.h"
+
+static u8 tch_pos=0;
+
+rm_SmCtxt_t *rm_AllocSmCtxt(u8 chanType)
+{
+ u8 i, iChan, quality;
+ rm_SmCtxt_t *pSmCtxt;
+ static u8 sdcch4_pos=0;
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_AllocateSmCtxt\n"));
+
+ //Check if the system locked/shutting down
+ if (OAMrm_BTS_AMSTATE==locked ||
+ OAMrm_BTS_AMSTATE==shuttingDown ||
+ OAMrm_TRX_AMSTATE(0)==locked ||
+ OAMrm_TRX_AMSTATE(0)==shuttingDown ||
+ OAMrm_CHN_AMSTATE(0,0)==locked ||
+ OAMrm_CHN_AMSTATE(0,0)==shuttingDown )
+ {
+ IDEBUG__(("WARNING@rm_AllocSmCtxt:system blocked/shutting down(%d,%d,%d),chnType=%d\n",
+ OAMrm_BTS_AMSTATE, OAMrm_TRX_AMSTATE(0),OAMrm_CHN_AMSTATE(0,0),chanType));
+ return RM_SMCTXT_NULL;
+ }
+
+ //Proceed to allocate the best channel if there is!
+ quality = 0; iChan = 0xFF; pSmCtxt = RM_SMCTXT_NULL;
+
+ switch(chanType)
+ {
+ case RM_PHYCHAN_TCHF_S:
+ //Find the best-quality channel to allocate
+ for (i=0; i<OAMrm_MAX_TCHFS; i++)
+ {
+ //Check if the concerned radio TS is blocked/shutting down
+ if (rm_PhyChanTchf[tch_pos].amState == unlocked &&
+ rm_PhyChanTchf[tch_pos].opState == opStateEnabled &&
+ rm_PhyChanTchf[tch_pos].usable == RM_PHYCHAN_USABLE &&
+ rm_PhyChanTchf[tch_pos].state == RM_PHYCHAN_FREE )
+
+ {
+ if (rm_PhyChanTchf[tch_pos].quality > quality)
+ {
+ iChan = tch_pos;
+ quality = rm_PhyChanTchf[tch_pos].quality;
+ }
+ }
+ tch_pos++;
+ if (tch_pos>=OAMrm_MAX_TCHFS) tch_pos=0;
+ }
+
+ if ( iChan != 0xFF )
+ {
+ //Got expected TCH/F channel
+ rm_PhyChanTchf[iChan].state = RM_PHYCHAN_ASSIGNED;
+ pSmCtxt = rm_PhyChanTchf[iChan].pMSmCtxt;
+
+ //DSPADDED
+ tch_pos = iChan+1;
+ if (tch_pos>=OAMrm_MAX_TCHFS) tch_pos=0;
+
+ //PMADDED:attTCHSeizuresMeetingTCHBlockedState,attTCHSeizures
+ // meanNbrOfIdleTCHsPerInterferenceBand
+ rm_NoOfIdleTchf--;
+ rm_PhyChanTchf[iChan].chanBusy = RM_FALSE;
+ //PM_CellMeasurement.attTCHSeizures.increment();
+ PM_CellMeasurement.meanNbrOfIdleTCHsPerInterferenceBand.addRecord(rm_NoOfIdleTchf);
+ }
+ //else
+ //{
+ // rm_AllAvailableTchf.allocated = RM_TRUE;
+ // rm_AllAvailableTchf.startTime = tickGet();
+ // //PM_CellMeasurement.attTCHSeizuresMeetingTCHBlockedState.increment();
+ //}
+
+ break;
+
+ case RM_PHYCHAN_SDCCH4:
+ //Find the best-quality channel to allocate
+
+ for (i=0; i<OAMrm_MAX_SDCCH4S; i++)
+ {
+ if (rm_PhyChanSdcch4[sdcch4_pos].amState == unlocked &&
+ rm_PhyChanSdcch4[sdcch4_pos].opState == opStateEnabled &&
+ rm_PhyChanSdcch4[sdcch4_pos].usable == RM_PHYCHAN_USABLE &&
+ rm_PhyChanSdcch4[sdcch4_pos].state == RM_PHYCHAN_FREE )
+ {
+ if (rm_PhyChanSdcch4[sdcch4_pos].quality > quality)
+ {
+ iChan = sdcch4_pos;
+ quality = rm_PhyChanSdcch4[sdcch4_pos].quality;
+ }
+ }
+ sdcch4_pos++;
+ if (sdcch4_pos>=OAMrm_MAX_SDCCH4S) sdcch4_pos=0;
+ }
+
+ if ( iChan != 0xFF )
+ {
+ //Got expected SDCCH4 channel
+ rm_PhyChanSdcch4[iChan].state = RM_PHYCHAN_ASSIGNED;
+ pSmCtxt = rm_PhyChanSdcch4[iChan].pMSmCtxt;
+ //DSPADDED
+ sdcch4_pos = iChan+1;
+ if (sdcch4_pos>=OAMrm_MAX_SDCCH4S) sdcch4_pos=0;
+
+ //PMADDED:attSDCCHSeizuresMeetingSDCCHBlockedState
+ rm_PhyChanSdcch4[iChan].chanBusy = RM_FALSE;
+ }
+ //else
+ //{
+ // rm_AllAvailableSdcch4.allocated = RM_TRUE;
+ // rm_AllAvailableSdcch4.startTime = tickGet();
+ // PM_CellMeasurement.attSDCCHSeizuresMeetingSDCCHBlockedState.increment();
+ //}
+
+ break;
+
+ default:
+ EDEBUG__(("ERROR-rm_AllocSmCtxt: unsupported chan type:%d\n",
+ chanType));
+ break;
+
+ } //End of switch()
+
+ return (pSmCtxt);
+
+} //End of rm_AllocSmCtxt()
+
+void intg_SetNextAssignment(u8 trx, u8 slot)
+{
+ u8 i, chan;
+
+ chan = 0x08|slot;
+
+ for (i=0; i<OAMrm_MAX_TCHFS; i++)
+ {
+ if ( rm_PhyChanTchf[i].trxNumber == trx &&
+ rm_PhyChanTchf[i].chanNumberMSB == chan )
+ {
+ tch_pos = i;
+ if ( rm_PhyChanTchf[tch_pos].usable != RM_PHYCHAN_USABLE ||
+ rm_PhyChanTchf[tch_pos].state != RM_PHYCHAN_FREE ||
+ rm_PhyChanTchf[tch_pos].amState != unlocked ||
+ rm_PhyChanTchf[tch_pos].opState != opStateEnabled )
+
+ {
+ printf("TCHF chan (%d,%d) blocked or in use now usable=%d,state=%d\n",
+ trx, slot,rm_PhyChanTchf[tch_pos].usable,
+ rm_PhyChanTchf[tch_pos].state );
+ } else
+ {
+ printf("TCHF Chan (%d,%d) will be assigned to next TCHF chan req\n",
+ trx, slot);
+ }
+ }
+ }
+}
+
+#endif //__RM_ALLOCSMCTXT_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_ChanReq.cpp b/data/mnet/GP10/Host/rm/Src/rm_ChanReq.cpp
new file mode 100644
index 0000000..43d8ed5
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_ChanReq.cpp
@@ -0,0 +1,302 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+
+#ifndef __RM_CHANREQ_CPP__
+#define __RM_CHANREQ_CPP__
+
+#include "rm\rm_head.h"
+extern int ta_HoldFacch;
+
+void rm_ChanReq( rm_ChanReq_t *pChanReq )
+{
+ rm_SmCtxt_t *pSmCtxt;
+ rm_PhyChanActDesc_t actDesc;
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_ChanReq\n"));
+
+ //PMADDED:attImmediateAssingProcs,attImmediateAssingProcsPerCauseTable
+ PM_CellMeasurement.attImmediateAssingProcs.increment();
+ PM_CellMeasurement.attImmediateAssingProcsPerCauseTable.increment(pChanReq->estCause);
+
+ //Check if the system locked/shutting down
+ if (OAMrm_BTS_AMSTATE==locked ||
+ OAMrm_BTS_AMSTATE==shuttingDown ||
+ OAMrm_TRX_AMSTATE(0)==locked ||
+ OAMrm_TRX_AMSTATE(0)==shuttingDown ||
+ OAMrm_CHN_AMSTATE(0,0)==locked ||
+ OAMrm_CHN_AMSTATE(0,0)==shuttingDown )
+ {
+ PDEBUG__(("INFO@rm_ChanReq: System blocked/shutting down(%d,%d,%d),cause=%d\n",
+ OAMrm_BTS_AMSTATE, OAMrm_TRX_AMSTATE(0),OAMrm_CHN_AMSTATE(0,0),
+ pChanReq->estCause));
+
+ //GP2
+ //if (!rm_VcIsBarred)
+ //{
+ // rm_VcIsBarred = RM_TRUE;
+ // rm_SendSystemInfo2ToBcchTrx(0,2,CNI_RIL3_CELL_BARRED_ACCESS);
+ // rm_SendSystemInfo3ToBcchTrx(0,3,CNI_RIL3_CELL_BARRED_ACCESS);
+ // rm_SendSystemInfo4ToBcchTrx(0,4,CNI_RIL3_CELL_BARRED_ACCESS);
+ //}
+
+ return;
+ }
+
+ pSmCtxt = RM_SMCTXT_NULL;
+ switch(pChanReq->estCause)
+ {
+ case RM_CHANREQ_COS_LUP: //0x00
+ //LUP call: allocate currently best SDCCH/4
+ pSmCtxt = rm_AllocSmCtxt(RM_PHYCHAN_SDCCH4);
+ //pSmCtxt = rm_AllocSmCtxt(RM_PHYCHAN_TCHF_S);
+
+ //PM Added:
+ if (RM_SMCTXT_NULL == rm_PreAllocSmCtxt(RM_PHYCHAN_SDCCH4) )
+ {
+ if (!rm_AllAvailableSdcch4.allocated)
+ {
+ rm_AllAvailableSdcch4.allocated = RM_TRUE;
+ PM_CellMeasurement.allAvailableSDCCHAllocatedTime.start();
+
+ //rm_AllAvailableSdcch4.startTime = tickGet();
+ }
+ }
+
+ if (pSmCtxt == RM_SMCTXT_NULL)
+ PM_CellMeasurement.attSDCCHSeizuresMeetingSDCCHBlockedState.increment();
+
+ break;
+
+ case RM_CHANREQ_COS_EMC: //0xA0
+ case RM_CHANREQ_COS_MTC: //0x80
+ case RM_CHANREQ_COS_MOC: //0xE0
+ //MOC&MTC call: Allocate the best TCH/F channel
+ pSmCtxt = rm_AllocSmCtxt(RM_PHYCHAN_TCHF_S);
+
+ if (RM_SMCTXT_NULL == rm_PreAllocSmCtxt(RM_PHYCHAN_TCHF_S) )
+ {
+ //PM Added:
+ if (!rm_AllAvailableTchf.allocated)
+ {
+ rm_AllAvailableTchf.allocated = RM_TRUE;
+ PM_CellMeasurement.allAvailableTCHAllocatedTime.start();
+
+ //rm_AllAvailableTchf.startTime = tickGet();
+ }
+ }
+
+ if (pSmCtxt == RM_SMCTXT_NULL)
+ {
+ PDEBUG__(("INFO@rm_ChanReq: No tchf available and temp. bar this cell\n"));
+
+ PM_CellMeasurement.attTCHSeizuresMeetingTCHBlockedState.increment();
+
+ //Modify SI2-4 and update DSP,MS as well as MIB for display in ViperWatch
+ //OAMrm_RA_CELL_BARRED_STATEa = (Boolean)CNI_RIL3_CELL_BARRED_ACCESS;
+ //if (STATUS_OK!=
+ // oam_setMibIntVar(MODULE_RM, MIB_cellBarred, OAMrm_RA_CELL_BARRED_STATEa) )
+ //{
+ // EDEBUG__(("ERROR@rm_ChanReq: OAM set cellBarred failed, state=%d\n",
+ // OAMrm_RA_CELL_BARRED_STATEa));
+ //}
+ if (OAMrm_OVERLOAD_CELLBAR)
+ {
+ //Cell is temporarily barred, not reflected in MIB thus
+ rm_VcIsBarred = RM_TRUE;
+ rm_SendSystemInfo2ToBcchTrx(0,2,CNI_RIL3_CELL_BARRED_ACCESS);
+ rm_SendSystemInfo3ToBcchTrx(0,3,CNI_RIL3_CELL_BARRED_ACCESS);
+ rm_SendSystemInfo4ToBcchTrx(0,4,CNI_RIL3_CELL_BARRED_ACCESS);
+ } else
+ {
+ if (rm_VcIsBarred)
+ {
+ rm_VcIsBarred = RM_FALSE;
+ rm_SendSystemInfo2ToBcchTrx(0,2,OAMrm_RA_CELL_BARRED_STATE);
+ rm_SendSystemInfo3ToBcchTrx(0,3,OAMrm_RA_CELL_BARRED_STATE);
+ rm_SendSystemInfo4ToBcchTrx(0,4,OAMrm_RA_CELL_BARRED_STATE);
+ }
+ }
+ }
+ break;
+
+ default:
+ //TBD: Process other est causes later
+ EDEBUG__(( "ERROR-rm_ChanReq: unsupported est cause:%d\n",pChanReq->estCause ));
+ return;
+
+ } //End of switch()
+
+ if (pSmCtxt == RM_SMCTXT_NULL)
+ {
+ PDEBUG__(("INFO@rm_ChanReq: all channels happen to be in use now\n"));
+ rm_SendImmAssignRej((int)pChanReq->estCause);
+ }else
+ {
+ //Activate the allocated channel for this channel request
+ actDesc.actType = RM_L1ACTTYPE_IMMASS; //Activation type
+
+ //PR1248 Begin
+ actDesc.dtxCtrl = 0; //DTX ul&dl both OFF
+
+ //PR1381 BEGIN
+ if ( ((int)OAMrm_MS_UPLINK_DTX_STATE==1) ||
+ ((int)OAMrm_MS_UPLINK_DTX_STATE==0) )
+ actDesc.dtxCtrl |= 1; //DTX: ul ON
+ //PR1381 END
+
+ //PR1319
+ //if ( !(pSmCtxt->pPhyChan->trxNumber) && OAMrm_MS_DNLINK_DTX_STATE )
+ if ( (pSmCtxt->pPhyChan->trxNumber) && OAMrm_MS_DNLINK_DTX_STATE )
+ actDesc.dtxCtrl |= 2; //DTX: dl ON
+ //PR1248 End
+
+ actDesc.datAttr = RM_L1DATATTR_SIGNALING; //Chan mode: byte 2
+ //actDesc.datAttr = RM_L1DATATTR_SPEECH; //Speech mode
+ switch(pChanReq->estCause)
+ {
+ case RM_CHANREQ_COS_LUP:
+ actDesc.ratType = RM_L1RATTYPE_SDCCH; //Channel mode:byte 3
+ //actDesc.ratType = RM_L1RATTYPE_TCHF; //Channel mode:byte 3
+ break;
+
+ case RM_CHANREQ_COS_MOC:
+ actDesc.ratType = RM_L1RATTYPE_TCHF; //Channel mode:byte 3
+ //actDesc.ratType = RM_L1RATTYPE_SDCCH; //Channel mode:byte 3
+ break;
+
+ case RM_CHANREQ_COS_EMC: //0xA0
+ case RM_CHANREQ_COS_MTC:
+ actDesc.ratType = RM_L1RATTYPE_TCHF; //Channel mode:byte 3
+ //actDesc.ratType = RM_L1RATTYPE_SDCCH; //Channel mode:byte 3
+ break;
+ }
+
+ actDesc.codAlgo = RM_L1CODALGO_NORES;
+ actDesc.ciphSet = RM_L1CIPHTYPE_NCIPH;
+ RM_MEMSET(&actDesc.ciphKey, RM_L1CIPHKEY_LEN);
+ actDesc.bsPower = RM_L1BSPOWER_PREALPHA;
+ actDesc.msPower = RM_L1MSPOWER_PREALPHA;
+ actDesc.taValue = rm_pItcRxMdMsg->l3_data.buffer[3];
+ actDesc.UIC = 0;
+
+ rm_SendChanActivation(pSmCtxt->pPhyChan,&actDesc);
+
+ //Save Channel Request info for use by Imm Assign
+ pSmCtxt->isForHo = RM_FALSE; //Tell hoReq from normal chanReq
+
+ pSmCtxt->callType = (u8)(pChanReq->estCause);
+ RM_MEMCPY( pSmCtxt->pPhyChan->savChanReq,
+ rm_pItcRxMdMsg->l3_data.buffer, RM_SAVCHANREQ_LEN );
+
+ //PMADDED:
+ pSmCtxt->pPhyChan->estCause = (u8)pChanReq->estCause;
+
+ //Adjust State Machine state accordingly
+ pSmCtxt->state = RM_S2ACTIVATING_SIGTRAFFIC_CHAN;
+ }
+
+} //End rm_ChanReq()
+
+
+void rm_SendImmAssignRej(int cause)
+{
+ int i;
+ u16 length; //Length of a msg sent to L1
+ rm_EdRet_t rrEdRet; //Return code from RR decode
+ rm_L3Data_t l3_data; //Encoded Paging Req Type 1
+ rm_ItcTxMsg_t msgToL1; //Send PH_DATA_REQ msg to L1
+ T_CNI_RIL3RRM_MSG_IMMEDIATE_ASSIGNMENT_REJECT
+ *pUmImmAssignRej; //Data for encoding PageReq1
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_SendImmAssignRej\n"));
+
+ //Choose Imm Assign message structure
+ pUmImmAssignRej =
+ (T_CNI_RIL3RRM_MSG_IMMEDIATE_ASSIGNMENT_REJECT *)&(rm_UmMsg.immediateAssignmentReject);
+
+
+ //Populate the contents so that encoder knows what to encode but
+ //before we start populating the message content, zap it clean
+ //first.
+
+ RM_MEMSET( &rm_UmMsg, sizeof(rm_UmMsg_t) );
+
+ //Header--PD,MT,SI
+ pUmImmAssignRej->header.protocol_descriminator = RM_PD;
+ pUmImmAssignRej->header.si_ti = RM_SI;
+ pUmImmAssignRej->header.message_type = CNI_RIL3RRM_MSGID_IMMEDIATE_ASSIGNMENT_REJECT;
+
+ //IE--Page Mode
+ pUmImmAssignRej->pageMode.ie_present = RM_TRUE;
+ pUmImmAssignRej->pageMode.pm = CNI_RIL3_PAGING_SAME_AS_BEFORE;
+
+ //IE--Channel Description
+ for (i=0;i<4;i++)
+ {
+ pUmImmAssignRej->reqReference[i].ie_present = RM_TRUE;
+ pUmImmAssignRej->reqReference[i].randomAccessInfo = rm_pItcRxMdMsg->l3_data.buffer[0];
+ pUmImmAssignRej->reqReference[i].T1 = (rm_pItcRxMdMsg->l3_data.buffer[1]>>3) & 0x1F;
+ pUmImmAssignRej->reqReference[i].T2 = (rm_pItcRxMdMsg->l3_data.buffer[2] ) & 0x1F;
+ pUmImmAssignRej->reqReference[i].T3 = (((rm_pItcRxMdMsg->l3_data.buffer[1]<<3) & 0x38)|
+ ((rm_pItcRxMdMsg->l3_data.buffer[2]>>5) & 0x07) );
+
+ pUmImmAssignRej->waitIndication[i].ie_present = RM_TRUE;
+ pUmImmAssignRej->waitIndication[i].T3122 = 4; //sec
+ }
+
+ //Call RR message encoding functionality
+ rrEdRet = CNI_RIL3RRM_Encode( &rm_UmMsg, &l3_data);
+
+ //check the encoding result before sending the message
+ switch (rrEdRet)
+ {
+ case RM_RRED_SUCCESS:
+
+ //Wrap the encoded Paging message in PH_DATA_REQ
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_LNKMGMT;
+ msgToL1.buffer[length++] = RM_L1MT_PHDATAREQ_MSB;
+ msgToL1.buffer[length++] = RM_L1MT_PHDATAREQ_LSB;
+ msgToL1.buffer[length++] = OAMrm_BCCH_TRX;
+ msgToL1.buffer[length++] = RM_L1AGCH_CHANNUMBER_MSB;
+ msgToL1.buffer[length++] = 28;
+ msgToL1.buffer[length++] = RM_L1LINK_VOID;
+
+ RM_MEMCPY(&msgToL1.buffer[length], l3_data.buffer, l3_data.msgLength);
+ msgToL1.msgLength = length + l3_data.msgLength;
+
+ //Send PH_DATA_REQ to L1
+ PostL3SendMsLog( &l3_data );
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+ PDEBUG__(("========rm_SendImmAssignRej: (cause=%x, randomInfo=%x, TA=%d, T1-3(%x,%x)\n",
+ cause,
+ rm_pItcRxMdMsg->l3_data.buffer[0],
+ rm_pItcRxMdMsg->l3_data.buffer[3],
+ rm_pItcRxMdMsg->l3_data.buffer[1],
+ rm_pItcRxMdMsg->l3_data.buffer[2]
+ ));
+
+ //PMADDED:succImmediateAssingProcs,succImmediateAssingProcsPerCauseTable
+ //PM_CellMeasurement.succImmediateAssingProcs.increment();
+ //PM_CellMeasurement.succImmediateAssingProcsPerCauseTable.increment(pPhyChan->estCause);
+
+ break;
+
+ default:
+ //Um message encoding failed
+ EDEBUG__(("ERROR-rm_SendImmAssignRej: Um encode error:%d\n", rrEdRet ));
+ break;
+
+ } //End of switch(rrEdRet)
+
+} //End of rm_SendImmAssignRej()
+
+#endif //__RM_CHANREQ_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_ConfigTrxSlots.cpp b/data/mnet/GP10/Host/rm/Src/rm_ConfigTrxSlots.cpp
new file mode 100644
index 0000000..32c11c5
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_ConfigTrxSlots.cpp
@@ -0,0 +1,83 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_CONFIGTRXSLOTS_CPP__
+#define __RM_CONFIGTRXSLOTS_CPP__
+
+#include "rm\rm_head.h"
+
+//void sys_init(void); /* TEST: rml1 intg */
+
+u8 rm_ConfigTrxSlots( u8 trx )
+{
+ u8 i; /* loop-control variable */
+ u8 isBcchTrx; /* tell if trx is carrying BCCH channel */
+
+ isBcchTrx = RM_FALSE;
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_ConfigTrx\n" ));
+
+ /*TEST: RM-L1 Integration */
+ //sys_Init();
+
+
+ /* Wait L1 bootstrap confirmation */
+ //rm_WaitForL1Bootstrap();
+
+ /* It's caller's responsibility to make sure trx is valid */
+
+ /* First: Send TRX CONFIGure and wait for response */
+
+ /*
+ ** TBD: Winfield May allow several retries of TRX Configure for
+ ** real operation later
+ */
+
+ rm_SendTrxConfigToTrx(trx);
+ rm_WaitForL1Rsp(trx,RM_L1MG_TRXMGMT, RM_L1MT_TRXCONFIGACK_MSB,
+ RM_L1MT_TRXCONFIGACK_LSB );
+printf("WATCH:rm_ConfigTrxSlot--got rsp to TrxConfig\n");
+
+ /* Second: Send SLOT ACTIVate and wait for response */
+ i=0;
+ while ( i < OAMrm_SLOTS_PER_TRX )
+ {
+ /* TBD: send nothing to a slot if unused */
+ if ( OAMrm_TRX_SLOT_COMB(trx,i) != OAMrm_SLOT_UNUSED )
+ {
+ /* Send SlotActvate and wait for rsp */
+ rm_SendSlotActivateToTrx(trx,i);
+ rm_WaitForSlotActivateRsp(trx,i);
+
+ /* Check if the slot is carrying BCCH */
+ if ( OAMrm_TRX_SLOT_COMB(trx,i) == OAMrm_SLOT_BEACON )
+ isBcchTrx = RM_TRUE;
+ }
+ i++;
+ }
+
+PDEBUG__(("SLOT ACTIVATION FINISHED\n"));
+ /*
+ ** Third: Send the following commands but order TBD with DSP guys:
+ ** (1) SET Uplink GAIN (2) SET Downlink GAIN (3) TUNE SYNTHesizer
+ ** (4) CONFIGure FPGA DELAY.No response is seeked for the four L1
+ ** commands.
+ */
+ //rm_SendSetUGainToTrx(trx);
+ //rm_SendSetDGainToTrx(trx);
+ //rm_SendTuneSynthToTrx(trx);
+ //rm_SendConfigFpgaDelayToTrx(trx);
+
+PDEBUG__(("CONFIG TRX/SLOTS FINISHED\n"));
+
+ return (isBcchTrx);
+
+} /* End of rm_ConfigTrxSlots() */
+
+#endif /* __RM_CONFIGTRXSLOTS_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_DlRaInd.cpp b/data/mnet/GP10/Host/rm/Src/rm_DlRaInd.cpp
new file mode 100644
index 0000000..fac1fa0
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_DlRaInd.cpp
@@ -0,0 +1,85 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+
+#ifndef __RM_DLRAIND_CPP__
+#define __RM_DLRAIND_CPP__
+
+#include "rm\rm_head.h"
+#include "rlc_mac\RlcMacIntf.h"
+
+void rm_DlRaInd( void )
+{
+ //rm_ChanReq_t chanReq;
+ T_CNI_RIL3RRM_MSG_CHANNEL_REQUEST chanReq;
+ rm_EdRet_t raEdRet;
+ JC_STATUS ret;
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_DlRaInd\n" ));
+
+ //CT_CHN if ( rm_pItcRxMdMsg->channel_type != CT_RACH )
+ if ( rm_pItcRxMdMsg->entry_id != rm_RachEntryId )
+ {
+ //TBD: Received is not Channel Request msg
+ EDEBUG__(( "ERROR-rm_DlRaInd: expected RA on RACH not on:\n",
+ rm_pItcRxMdMsg->entry_id ));
+ //CT_CHN rm_pItcRxMdMsg->channel_type ));
+ return;
+ }
+
+ //Call RA decoder to decode channel request message
+ chanReq.neci = CNI_RIL3_NECI_NOT_SUPPORTED; //TBD:Sheausong
+ raEdRet = CNI_RIL3RRM_DecodeChannelRequest (
+ rm_pItcRxMdMsg->l3_data.buffer,
+ &chanReq );
+
+ PDEBUG__(("TRACK-rm_DlRaInd: neci=%d,cos=%d,ref=%d\n",
+ chanReq.neci,chanReq.estCause,chanReq.randomReference));
+
+ //T_CNI_RIL3_NECI neci;
+ //neci has to be passed in for correct decoding,
+ //T_CNI_RIL3_ESTABLISH_CAUSE estCause;
+ //char randomReference;
+
+ switch (raEdRet)
+ {
+ case RM_RAED_SUCCESS:
+ //G2
+ if (rm_IsGprsChanReq(chanReq.estCause))
+ {
+ if (JC_OK != (ret=RlcMacRmMdMsgInd(rm_pItcRxMdMsg)) )
+ {
+ IDEBUG__(("WARNING@rm_DlRaInd: API RlcMacRmMdMsgInd failed ret(%d)\n",ret));
+ }
+ } else
+ rm_ChanReq(&chanReq);
+ break;
+
+ default:
+ //RA-decoding failed
+ EDEBUG__(("ERROR@rm_DlRaInd:RA decode failed\n"));
+ break;
+
+ } //End of switch()
+
+} //End of rm_DlRaInd()
+
+//G2
+bool rm_IsGprsChanReq(T_CNI_RIL3_ESTABLISH_CAUSE cause)
+{
+ if ( (cause == CNI_RIL3_EST_CALL_ONE_PHASE_PACKET_ACCESS) ||
+ (cause == CNI_RIL3_EST_CALL_SINGLE_BLOCK_PACKET_ACCESS) )
+ return true;
+ else
+ return false;
+}
+
+#endif //__RM_DLRAIND_CPP__
+
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_EntryIdTestPrint.cpp b/data/mnet/GP10/Host/rm/Src/rm_EntryIdTestPrint.cpp
new file mode 100644
index 0000000..bd89676
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_EntryIdTestPrint.cpp
@@ -0,0 +1,46 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_ENTRYIDTESTPRINT_CPP__
+#define __RM_ENTRYIDTESTPRINT_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_EntryIdTestPrint(u8 tchfIdx, u8 sdcch4Idx)
+{
+ u8 i, iEntryId;
+
+ /* Print TCHF channel idx-entryId mapping */
+ for (i=0; i<tchfIdx; i++)
+ {
+ iEntryId = RM_TCHF_ENTRYIDX(rm_PhyChanTchf[i].trxNumber,
+ rm_PhyChanTchf[i].chanNumberMSB );
+
+ PDEBUG__(("%dth TCHF entryId data: iEntryId=%d ,entryId=%d\n",
+ i,
+ iEntryId,
+ rm_TchfEntryId[iEntryId]
+ ));
+ }
+
+ /* Print SDCCH4 channel idx-entryId mapping */
+ for (i=0; i<sdcch4Idx; i++)
+ {
+ iEntryId = RM_SDCCH4_ENTRYIDX(rm_PhyChanSdcch4[i].trxNumber,
+ rm_PhyChanSdcch4[i].chanNumberMSB );
+
+ PDEBUG__(("%dth SDCCH4 entryId data: iEntryId=%d,entryId=%d\n",
+ i,
+ iEntryId,
+ rm_Sdcch4EntryId[iEntryId]
+ ));
+ }
+
+} /* End of rm_EntryIdTestPrint() */
+
+#endif /* __RM_ENTRYIDTESTPRINT_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_GetImsiMod100.cpp b/data/mnet/GP10/Host/rm/Src/rm_GetImsiMod100.cpp
new file mode 100644
index 0000000..23e627b
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_GetImsiMod100.cpp
@@ -0,0 +1,27 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_GETIMSIMOD1000_CPP__
+#define __RM_GETIMSIMOD1000_CPP__
+
+#include "rm\rm_head.h"
+
+u16 rm_GetImsiMod1000(rm_IeImsi_t *pImsi)
+{
+
+ RDEBUG__(("ENTER-rm_GetImsiMod1000\n"));
+
+ return (
+ ( pImsi->digits[pImsi->numDigits-1] & 0x0f ) +
+ ( pImsi->digits[pImsi->numDigits-2] & 0x0f ) *10 +
+ ( pImsi->digits[pImsi->numDigits-3] & 0x0f ) *100
+ );
+
+} /* End of rm_GetImsiMod1000() */
+
+#endif /* __RM_GETIMSIMOD1000_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_GetIrtEntryId.cpp b/data/mnet/GP10/Host/rm/Src/rm_GetIrtEntryId.cpp
new file mode 100644
index 0000000..7465db8
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_GetIrtEntryId.cpp
@@ -0,0 +1,56 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_GETIRTENTRYID_CPP__
+#define __RM_GETIRTENTRYID_CPP__
+
+#include "rm\rm_head.h"
+
+rm_IrtEntryId_t rm_GetIrtEntryId( rm_ItcRxL1Msg_t * pL1Msg )
+{
+ u8 idx,trx,chan;
+ rm_IrtEntryId_t entry_id;
+
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_GetIrtEntryId\n"));
+
+ /*
+ ** Solve for entry id in terms of message origin
+ ** Please note CHANNE REQ, MM PAGE REQ have been
+ ** processed before calling this function.
+ */
+
+ trx = pL1Msg->l3_data.buffer[3];
+ chan = pL1Msg->l3_data.buffer[4];
+
+ entry_id = CNI_IRT_NULL_ID;
+
+ if ( pL1Msg->l3_data.buffer[0] != RM_L1MG_DEDMGMT )
+ EDEBUG__(("ERROR-rm_GetIrtEntryId: not DEDMGMT group\n"));
+
+ else if ( RM_ISTCHF(chan) )
+ {
+ idx = RM_TCHF_ENTRYIDX(trx, chan);
+ entry_id = rm_TchfEntryId[idx];
+ }
+ else if ( RM_ISSDCCH4(chan) )
+ {
+ idx = RM_SDCCH4_ENTRYIDX(trx,chan);
+ entry_id = rm_Sdcch4EntryId[idx];
+PDEBUG__(("TRACK-rm_GetIrtEntryId: Idx=%d, entryId=%d\n",idx,entry_id));
+
+ }
+ else
+ PDEBUG__(("UNKNOWN-rm_GetIrtEntryId: chan type:%d",chan));
+
+ return (entry_id);
+
+} /* End of rm_GetIrtEntryId() */
+
+#endif /* __RM_GETIRTENTRYID_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_HoReq.cpp b/data/mnet/GP10/Host/rm/Src/rm_HoReq.cpp
new file mode 100644
index 0000000..0f58d5e
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_HoReq.cpp
@@ -0,0 +1,225 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_HOREQ_CPP__
+#define __RM_HOREQ_CPP__
+
+//HOADDED
+//!!! TCH/F assumed
+#include "rm\rm_head.h"
+
+void rm_HoReq(void)
+{
+ rm_SmCtxt_t *pSmCtxt;
+ rm_PhyChanActDesc_t actDesc;
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_HoReq\n"));
+
+ //Check if the system locked/shutting down
+ if (OAMrm_BTS_AMSTATE==locked ||
+ OAMrm_BTS_AMSTATE==shuttingDown ||
+ OAMrm_TRX_AMSTATE(0)==locked ||
+ OAMrm_TRX_AMSTATE(0)==shuttingDown ||
+ OAMrm_CHN_AMSTATE(0,0)==locked ||
+ OAMrm_CHN_AMSTATE(0,0)==shuttingDown )
+ {
+ PDEBUG__(("INFO@rm_HoReq: System blocked/shutting down(%d,%d,%d) \n",
+ OAMrm_BTS_AMSTATE, OAMrm_TRX_AMSTATE(0),OAMrm_CHN_AMSTATE(0,0)));
+
+ if (!rm_VcIsBarred)
+ {
+ rm_VcIsBarred = RM_TRUE;
+ rm_SendSystemInfo2ToBcchTrx(0,2,CNI_RIL3_CELL_BARRED_ACCESS);
+ rm_SendSystemInfo3ToBcchTrx(0,3,CNI_RIL3_CELL_BARRED_ACCESS);
+ rm_SendSystemInfo4ToBcchTrx(0,4,CNI_RIL3_CELL_BARRED_ACCESS);
+ }
+
+ return;
+ }
+
+ //Request for a TCH/F and activate it
+ pSmCtxt = RM_SMCTXT_NULL;
+ switch(rm_pItcRxMmMsg->l3_data.handReq.channelType.bearerType)
+ {
+ case BEARER_SPEECH:
+ //Handover on-going speech. Allocate current-best TCH/F
+ pSmCtxt = rm_AllocSmCtxt(RM_PHYCHAN_TCHF_S);
+
+ if ( RM_SMCTXT_NULL==rm_PreAllocSmCtxt(RM_PHYCHAN_TCHF_S) )
+ {
+ //PM Added:
+ if (!rm_AllAvailableTchf.allocated)
+ {
+ rm_AllAvailableTchf.allocated = RM_TRUE;
+ PM_CellMeasurement.allAvailableTCHAllocatedTime.start();
+
+ //rm_AllAvailableTchf.startTime = tickGet();
+ }
+ }
+
+ //Wirte current used speech version into HO Target Channel structure to solve mismatched speech versions
+ //for Calll Hold after HO
+ if (pSmCtxt == RM_SMCTXT_NULL)
+ {
+ PDEBUG__(("INFO@rm_HoReq: No tchf available and temp. bar this cell\n"));
+ //Modify SI2-4 and update DSP,MS as well as MIB for display in ViperWatch
+ //OAMrm_RA_CELL_BARRED_STATEa = (Boolean) CNI_RIL3_CELL_BARRED_ACCESS;
+ //if (STATUS_OK!=
+ // oam_setMibIntVar(MODULE_RM, MIB_cellBarred, OAMrm_RA_CELL_BARRED_STATEa) )
+ //{
+ // EDEBUG__(("ERROR@rm_HoReq: OAM set cellBarred failed, state=%d\n",
+ // OAMrm_RA_CELL_BARRED_STATEa));
+ //}
+
+ PM_CellMeasurement.attTCHSeizuresMeetingTCHBlockedState.increment();
+
+ if (OAMrm_OVERLOAD_CELLBAR)
+ {
+ //Cell is temporarily barred, not reflected in OAM GUI
+ rm_VcIsBarred = RM_TRUE;
+ rm_SendSystemInfo2ToBcchTrx(0,2,CNI_RIL3_CELL_BARRED_ACCESS);
+ rm_SendSystemInfo3ToBcchTrx(0,3,CNI_RIL3_CELL_BARRED_ACCESS);
+ rm_SendSystemInfo4ToBcchTrx(0,4,CNI_RIL3_CELL_BARRED_ACCESS);
+ } else
+ {
+ if (rm_VcIsBarred)
+ {
+ rm_VcIsBarred = RM_FALSE;
+ rm_SendSystemInfo2ToBcchTrx(0,2,OAMrm_RA_CELL_BARRED_STATE);
+ rm_SendSystemInfo3ToBcchTrx(0,3,OAMrm_RA_CELL_BARRED_STATE);
+ rm_SendSystemInfo4ToBcchTrx(0,4,OAMrm_RA_CELL_BARRED_STATE);
+ }
+ }
+ }
+// else
+// {
+// pSmCtxt->spchVer = (u8)(rm_pItcRxCcMsg->l3_data.handReq.channelType.speechChann.version);
+// PDEBUG__(("INFO@rm_HoReq: assigned spch version(loc %d, cc %d, u8cc %d) entryId %d\n",
+// pSmCtxt->spchVer,
+// rm_pItcRxCcMsg->l3_data.handReq.channelType.speechChann.version,
+// (u8)(rm_pItcRxCcMsg->l3_data.handReq.channelType.speechChann.version),
+// pSmCtxt->mEntryId));
+// }
+ break;
+
+ case BEARER_DATA:
+ case BEARER_SIGNALING:
+ default:
+ //Unexpected channel type in received Handover Request
+ EDEBUG__(("ERROR-rm_HoReq: unsupported chanType:%d\n",
+ rm_pItcRxMmMsg->l3_data.channAssignCmd.channelType.bearerType));
+ return;
+ }
+
+ //Valid channel type i.e. TCH/F speech. Check if any free TCH/F found
+ if ( pSmCtxt == RM_SMCTXT_NULL )
+ {
+ rm_SendHoReqNAck(rm_pItcRxMmMsg->l3_data.handReq.mmId);
+ EDEBUG__(("ERROR-rm_HoReq: No Physical Channel available right now\n"));
+ } else
+ {
+ //Got a free physical channel for this handover request
+
+ rm_ItcTxMsg_t msgToL1;
+ u16 length;
+
+ pSmCtxt->codAlgo = rm_BeaerCapVerToChanMode(rm_pItcRxMmMsg->l3_data.handReq.channelType.speechChann.version);
+
+ pSmCtxt->spchVer = (u8)(rm_pItcRxMmMsg->l3_data.handReq.channelType.speechChann.version);
+
+ PDEBUG__(("INFO@rm_HoReq: assigned spch version(loc %d, cc %d, u8cc %d) entryId %d\n",
+ pSmCtxt->spchVer,
+ rm_pItcRxMmMsg->l3_data.handReq.channelType.speechChann.version,
+ (u8)(rm_pItcRxMmMsg->l3_data.handReq.channelType.speechChann.version),
+ pSmCtxt->mEntryId));
+
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_DEDMGMT;
+ msgToL1.buffer[length++] = RM_L1MT_CHANACTIV_MSB;
+ msgToL1.buffer[length++] = RM_L1MT_CHANACTIV_LSB;
+ msgToL1.buffer[length++] = pSmCtxt->pPhyChan->trxNumber;
+ msgToL1.buffer[length++] = pSmCtxt->pPhyChan->chanNumberMSB;
+ msgToL1.buffer[length++] = pSmCtxt->pPhyChan->chanNumberLSB;
+
+ msgToL1.buffer[length++] = RM_L1ACTTYPE_ASYNC_HO; //actType
+
+ //PR1248 Begin
+ msgToL1.buffer[length] = 0; // DTX ul&dl OFF
+
+ //PR1381 BEGIN
+ if ( ((int)OAMrm_MS_UPLINK_DTX_STATE==1) ||
+ ((int)OAMrm_MS_UPLINK_DTX_STATE==0) )
+ msgToL1.buffer[length] |= 1; //DTX ul ON
+ //PR1381 END
+
+ //PR1319
+ //if ( !(pSmCtxt->pPhyChan->trxNumber) && OAMrm_MS_DNLINK_DTX_STATE )
+ if ( (pSmCtxt->pPhyChan->trxNumber) && OAMrm_MS_DNLINK_DTX_STATE )
+ msgToL1.buffer[length] |= 2; //DTX dl ON
+ length++;
+ //PR1248 End
+
+ msgToL1.buffer[length++] = RM_L1DATATTR_SPEECH; //datAttr
+ msgToL1.buffer[length++] = RM_L1RATTYPE_TCHF; //ratType
+// msgToL1.buffer[length++] = RM_L1CODALGO_GSMV1; //codAlgo
+//EFRAdded
+ msgToL1.buffer[length++] = pSmCtxt->codAlgo;
+
+ //msgToL1.buffer[length++] = RM_L1CIPHTYPE_NCIPH; //ciphSet
+ //RM_MEMSET(&msgToL1.buffer[length], RM_L1CIPHKEY_LEN); //ciphKey
+ //length = length + RM_L1CIPHKEY_LEN - 1; //TEMP Adjustment
+
+ //Ciphering
+ IntraL3CipherModeCommand_t *p;
+ p =(IntraL3CipherModeCommand_t *) &(rm_pItcRxMmMsg->l3_data.handReq.cipherCmd);
+ PDEBUG__(("INFO@rm_HandReq: ciphData(%d, set%d,algo%d),ciphResp(%d,imeisv%d)\n",
+ p->cmd.cipherModeSetting.ie_present,
+ p->cmd.cipherModeSetting.ciphering,
+ p->cmd.cipherModeSetting.algorithm,
+ p->cmd.cipherResponse.ie_present,
+ p->cmd.cipherResponse.cipherResponse));
+
+ int len,i;
+ len = length;
+ if (p->cmd.cipherModeSetting.ciphering == CNI_RIl3_CIPHER_START_CIPHERING)
+ {
+ //Order algorithm to be used for the ciphering
+ msgToL1.buffer[len++] = ((u8)p->cmd.cipherModeSetting.algorithm) + 2;
+ //Pass down the ciphering key
+ for (i=0;i<8;i++)
+ msgToL1.buffer[len++] = p->Kc[i];
+ } else
+ {
+ msgToL1.buffer[len++] = 1; //No ciphering applied
+ }
+ length = length + RM_L1CIPHKEY_LEN;
+
+ msgToL1.buffer[length++] = rm_pItcRxMmMsg->l3_data.handReq.mmId; //hoRef
+ msgToL1.buffer[length++] = 0; //bsPower
+ msgToL1.buffer[length++] = OAMrm_MS_TX_PWR_MAX_CCH; //MS init TX pwr
+ msgToL1.buffer[length++] = 0; //TA
+ msgToL1.buffer[length++] = 0; //UIC
+ msgToL1.msgLength = length;
+
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+
+ //Save handover reference and adjust state machine state
+ pSmCtxt->isForHo = RM_TRUE;
+ pSmCtxt->pPhyChan->ny1 = 0; //Reset retry counter of sending Physical info msg
+ pSmCtxt->pPhyChan->hoRef = rm_pItcRxMmMsg->l3_data.handReq.mmId;
+ pSmCtxt->state = RM_S2ACTIVATING_SIGTRAFFIC_CHAN;
+
+ //PMADDED:attTCHSeizures
+ PM_CellMeasurement.attTCHSeizures.increment();
+
+ }
+
+} /* End rm_HoReq() */
+
+#endif /* __RM_HOREQ_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_InitAll.cpp b/data/mnet/GP10/Host/rm/Src/rm_InitAll.cpp
new file mode 100644
index 0000000..07a0afa
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_InitAll.cpp
@@ -0,0 +1,694 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_INITALL_CPP__
+#define __RM_INITALL_CPP__
+
+#include "rm\rm_head.h"
+
+STATUS l1pTrxSwap( u8 trxA, u8 trxB);
+
+extern "C" {
+ int drfIQSwapGet(void);
+}
+
+//Completely init RM
+void rm_InitAll(void)
+{
+ int i;
+
+ //Monitoring entrance to a func
+ RDEBUG__(("ENTER@rm_InitAll\n"));
+
+ //Reset RM internal sts
+ rm_DspCiphCap = 0;
+ rm_OpState = EC_NOERROR;
+ rm_AmState00 = unlocked;
+ rm_VcIsBarred = RM_FALSE;
+ rm_CellBarred = CNI_RIL3_CELL_NOT_BARRED;
+ rm_AllAvailableTchf.allocated = RM_FALSE;
+ rm_AllAvailableSdcch4.allocated = RM_FALSE;
+
+ //CBCH assumed on SDCCH4/2
+ rm_ChanCbchActive=RM_FALSE;
+ rm_pCbchChan=&rm_PhyChanSdcch4[2];
+
+ //GP2
+ //
+ OAMrm_CBCH_OPSTATE = false;
+
+ rm_LiveSglCfg = RM_TRUE;
+ rm_NoOfBusySdcch4=0; //Cur Busy SDCCH
+ rm_NoOfUsableTchf=0; //No tchf usable
+ rm_nbrOfAvailableSDCCHs=0; //No sdcch4 usable
+ rm_NoOfBusyTchf=0; //Cur Busy TCH/F
+ rm_NoOfIdleTchf=0; //Cur Idle TCH/F
+ rm_maxNbrOfBusyTCHs=0;
+ rm_maxNbrOfBusySDCCHs=0;
+
+ //sys_Init(); //Create rm msgQ
+
+ //GP2
+ //rm_RetrvConfigFromOam(); //Retrv OAM data
+ //if (OAMrm_BCCH_CARRIER_phTRX==1) //Swap two TRXes
+ // l1pTrxSwap(0,1);
+ //rm_SetRmOpState(EC_BOOTING_UP); //RM booting up!
+ rm_WaitForGrrReadyToGo();
+ //rm_OamRegTrapVars();
+
+ //Start initialize all the RM resources from now!
+ rm_InitRm(); //Init RM itself
+ rm_InitLAPDm(); //Create L2 OIDs
+ rm_InitIRT(); //Create entryID
+ csu_Init(); //Init CSU table
+
+ //GP2
+ //for (i=0;i<OAMrm_MAX_TRXS;i++)
+ //{
+ // rm_InitRcPkg(i); //Initialize RC0
+ // rm_InitTrxPkg(i); //Initialize trx
+ // rm_InitTrxWDog(i); //Init trx twdog
+ //}
+ grr_SendReadyToGoAck(MODULE_RM, grr_MsgQId);
+ rm_InitCb();
+}
+void rm_WaitForGrrReadyToGo(void)
+{
+ int result, waitGrr;
+
+ RDEBUG__(("ENTER@rm_WaitForGrrReadyToGo\n"));
+
+ waitGrr=true;
+
+ while(waitGrr)
+ {
+ //Read a msg from queue or pend on arrival of message
+ result = rm_msgQReceive(rm_MsgQId, (s8 *)&rm_ItcRxMsg,
+ sizeof(rm_ItcRxMsg_t), WAIT_FOREVER);
+ if (result==ERROR)
+ { //Error in reading VxWork msg queue. Ignore msg!
+ rm_SetRmOpState(EC_RM_OS_CALL_MSGQRECEIVE_FAILED);
+ EDEBUG__(("ERROR@rm_WaitForGrrReadyToGo:VxWorks Q read err:%d\n",errno));
+ assert(0);
+ }
+
+ rm_pItcRxGrrMsg = (rm_ItcRxGrrMsg_t*) &rm_ItcRxMsg;
+
+ if ( (rm_pItcRxGrrMsg->module_id==MODULE_GRR) &&
+ (rm_pItcRxGrrMsg->message_type==GRR_READY_TO_GO_REQ) )
+ waitGrr=false;
+ else
+ {
+ if (rm_DbgDump) BYDUMP__(( (u8*)&rm_ItcRxMsg, result));
+ }
+ }
+}
+
+//GP2
+#if 0
+
+//Start trx watchdog timer
+void rm_InitTrxWDog(u8 trx)
+{
+ WDOG_ID timerId;
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_InitTrxWDog\n"));
+
+ //Initialize watch dog timer for trx
+ if ( (timerId=wdCreate()) == NULL )
+ {
+ rm_SetRmOpState(EC_RM_OS_CALL_WDCREATE_FAILED);
+ EDEBUG__(("ERROR-rm_InitTrxWDog: wdCreate error()\n"));
+ } else
+ {
+ rm_TrxMgmt[trx].TWDOG.id = timerId;
+ rm_TrxMgmt[trx].TWDOG.time = OAMrm_TWDOG;
+ rm_TrxMgmt[trx].TWDOG.state = RM_FALSE;
+ //rm_StartTimer(trx, RM_TWDOG);
+ }
+}
+
+
+//Initialize rc package
+void rm_InitRcPkg(u8 rc)
+{
+ //Monitoring entrance to a func
+ RDEBUG__(("ENTER-rm_InitRcPkg\n"));
+ rm_SetRcOpState(rc, opStateDisabled);
+}
+
+//Initialize trx package
+void rm_InitTrxPkg(u8 trx)
+{
+ //Monitoring entrance to a func
+ RDEBUG__(("ENTER-rm_InitTrxPkg\n"));
+
+ //Disable trx and its channels
+ rm_SetTrxOpState(trx, opStateDisabled);
+ rm_SetAllTrxChnOpState(trx, opStateDisabled);
+
+ //Initialize trx management data
+ RM_MEMSET(&rm_TrxMgmt[trx],sizeof(rm_TrxMgmt_t));
+ rm_TrxMgmt[trx].done = RM_FALSE;
+ rm_TrxMgmt[trx].slot = 0;
+ rm_TrxMgmt[trx].tdma1 = 0xff;
+ rm_TrxMgmt[trx].tdma2 = 0xff;
+ rm_TrxMgmt[trx].tdma3 = 0xff;
+ rm_TrxMgmt[trx].tdma4 = 0xff;
+ rm_TrxMgmt[trx].alive = RM_TRUE;
+ rm_TrxMgmt[trx].state = RM_TRXMGMT_S0_BOOTSTRAP_IND;
+
+ //RM does not go until it gets DSP Bootstrap signal
+}
+
+//Set operational state of one channel under trx
+void rm_SetOneTrxChnOpState(u8 trx,u8 slot,EnableDisable state)
+{
+ MibTag tag;
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_SetOneTrxChnOpState\n"));
+
+ OAMrm_CHN_OPSTATEa(trx,slot) = state;
+ if (trx==0) tag = MIBT_channelOperationalState_0;
+ else tag = MIBT_channelOperationalState_1;
+ if (STATUS_OK!=oam_setTblEntryField(MODULE_RM,tag,slot,state))
+ {
+ rm_SetRmOpState(EC_RM_OAM_CALL_SETTBLENTRYFIELD_FAILED);
+ EDEBUG__(("ERROR@rm_SetOneTrxChnOpState:OAM failed(%d,%d,%x,%d)\n",
+ trx,slot,tag,state));
+ }
+}
+
+//Set operational state of all channels under trx
+void rm_SetAllTrxChnOpState(u8 trx,EnableDisable state)
+{
+ int i;
+
+ //Monitoring entrance to a func
+ RDEBUG__(("ENTER-rm_SetAllTrxChnOpState\n"));
+
+ for (i=0;i<8;i++)
+ rm_SetOneTrxChnOpState(trx,i,state);
+}
+
+//Set trx operational state as required
+void rm_SetTrxOpState(u8 trx, EnableDisable state)
+{
+ MibTag tag;
+
+ OAMrm_TRX_OPSTATE(trx) = state;
+
+ if (trx==0)
+ tag=MIB_basebandOperationalState_0;
+ else
+ tag=MIB_basebandOperationalState_1;
+ if (STATUS_OK!=oam_setMibIntVar(MODULE_RM, tag, state))
+ {
+ rm_SetRmOpState(EC_RM_OAM_CALL_SETMIBINTVAR_FAILED);
+ EDEBUG__(("ERROR@rm_SetTrxOpState:OAM failed (%d,%x,%d)\n",
+ trx,tag,state));
+ }
+}
+
+//Set rc operational state as required
+void rm_SetRcOpState(u8 rc, EnableDisable state)
+{
+ MibTag tag;
+
+ OAMrm_RC_OPSTATE(rc) = state;
+
+ if (rc==0)
+ tag=MIB_carrier_operationalState_0;
+ else
+ tag=MIB_carrier_operationalState_1;
+ if (STATUS_OK!=oam_setMibIntVar(MODULE_RM, tag, state))
+ {
+ rm_SetRmOpState(EC_RM_OAM_CALL_SETMIBINTVAR_FAILED);
+ EDEBUG__(("ERROR@rm_SetRcOpState:OAM failed (%d,%x,%d)\n",
+ rc,tag,state));
+ }
+}
+
+//Process L1 trx mgmt message
+void rm_ProcTrxMgmtMsg(u8 trx)
+{
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER@rm_ProcTrxMgmtMsg\n"));
+
+ //Process in terms of trx state
+ switch ( rm_TrxMgmt[trx].state )
+ {
+ case RM_TRXMGMT_S0_BOOTSTRAP_IND:
+ //Await dsp bootstrap signal
+ if (!RM_L1MSGCMP(RM_L1MG_TRXMGMT,RM_L1MT_BOOTSTRAPCNF_MSB,RM_L1MT_BOOTSTRAPCNF_LSB))
+ { //Got unexpected message
+ IDEBUG__(("WARNING@rm_ProcTrxMgmtMsg:exp bootInd not(%d,%d,%d,%d)\n",
+ rm_pItcRxL1Msg->l3_data.buffer[0],
+ rm_pItcRxL1Msg->l3_data.buffer[1],
+ rm_pItcRxL1Msg->l3_data.buffer[2],
+ rm_pItcRxL1Msg->l3_data.buffer[3]));
+ return;
+ }
+
+ rm_DspCiphCap = rm_pItcRxL1Msg->l3_data.buffer[4];
+
+ rm_StartTimer(trx, RM_TWDOG);
+
+ //Auto-detection of RF board
+ //1. AisValue = drfTypeGet( ) -- Chetan: please tell us the return values (e.g., 0=GSM900, 1=DCS1800, 2=PCS1900?)
+ //This is done in OAM already.
+
+ //2. IQSwapValue = drfIQSwapGet( ) (the 4th character is capital i) -- This function returns a True/False value
+ //Decide if I-Q swap needed
+ OAMrm_I_Q_SWAP = drfIQSwapGet();
+
+ //3a. FreqHopDsp0Value = drfFreqHopGet(0) -- This function returns a True/False value
+ //3b. FreqHopDsp1Value = drfFreqHopGet(1) -- This function returns a True/False value
+ //Decide if hopping cable. If not, turn off the hopping feature. Assumed not capable now.
+ OAMrm_HOPPING_CTRLa = 0;
+
+ //Got expected message i.e. bootstrap, config trx
+ rm_SendTrxConfigToTrx(trx);
+ rm_TrxMgmt[trx].state=RM_TRXMGMT_S1_TRXCONFIG_ACK;
+ ConfigTxPwrValues(trx);
+ break;
+
+ case RM_TRXMGMT_S1_TRXCONFIG_ACK:
+ //Wait for trx configure ack forever. No nack defined !
+ if (!RM_L1MSGCMP(RM_L1MG_TRXMGMT,RM_L1MT_TRXCONFIGACK_MSB,
+ RM_L1MT_TRXCONFIGACK_LSB))
+ { //Got unexpected message
+ IDEBUG__(("WARNING@rm_ProcTrxMgmtMsg:exp trxAck not(%d,%d,%d,%d)\n",
+ rm_pItcRxL1Msg->l3_data.buffer[0],
+ rm_pItcRxL1Msg->l3_data.buffer[1],
+ rm_pItcRxL1Msg->l3_data.buffer[2],
+ rm_pItcRxL1Msg->l3_data.buffer[3]));
+ return;
+ }
+
+ //Init trx mgmt structure and start init its TSs!
+ rm_TrxMgmt[trx].state=RM_TRXMGMT_S2_SLOTACTIV_ACK;
+ rm_TrxMgmt[trx].slot=0; //start slot act from ts0
+ rm_ActTimeSlot(trx,0); //Activat 1st slot of trx
+ break;
+
+ case RM_TRXMGMT_S2_SLOTACTIV_ACK:
+ //Apply sanitory Check here
+ if (rm_pItcRxL1Msg->l3_data.buffer[4] != rm_TrxMgmt[trx].slot ||
+ rm_pItcRxL1Msg->l3_data.buffer[4] >= OAMrm_SLOTS_PER_TRX )
+ {
+ EDEBUG__(("ERROR@rm_ProcTrxMgmtMsg: encounter mess-up (%d,%d)\n",
+ rm_TrxMgmt[trx].slot,rm_pItcRxL1Msg->l3_data.buffer[4]));
+ return;
+ }
+
+ //Wait for slot activati ack
+ if (RM_L1MSGCMP(RM_L1MG_TRXMGMT,RM_L1MT_SLOTACTIVACK_MSB,
+ RM_L1MT_SLOTACTIVACK_LSB))
+ {
+ PDEBUG__(("INFO@rm_ProcTrxMgmtMsg:slotAct ack to(%d,%d)\n",
+ rm_pItcRxL1Msg->l3_data.buffer[3],
+ rm_pItcRxL1Msg->l3_data.buffer[4]));
+
+ //Got positive ack, (trx,slot) goes into enabled state
+ rm_SetOneTrxChnOpState(trx,rm_pItcRxL1Msg->l3_data.buffer[4],opStateEnabled);
+ rm_ProcSlotActRsp(trx,rm_pItcRxL1Msg->l3_data.buffer[4],RM_PHYCHAN_USABLE);
+
+ } else if (RM_L1MSGCMP(RM_L1MG_TRXMGMT,RM_L1MT_SLOTACTIVNACK_MSB,
+ RM_L1MT_SLOTACTIVNACK_LSB))
+ {
+ IDEBUG__(("INFO-rm_ProcTrxMgmtMsg:slotAct nack to(%d,%d)\n",
+ rm_pItcRxL1Msg->l3_data.buffer[3],
+ rm_pItcRxL1Msg->l3_data.buffer[4]));
+
+ //Got negative ack, (trx,slot) goes into disabled state
+ rm_SetOneTrxChnOpState(trx, rm_pItcRxL1Msg->l3_data.buffer[4],opStateDisabled);
+ rm_ProcSlotActRsp(trx,rm_pItcRxL1Msg->l3_data.buffer[4],RM_PHYCHAN_UNUSABLE);
+
+ } else
+ {
+ //Got unexpected message
+ IDEBUG__(("WARNING@rm_ProcTrxMgmtMsg:exp tsAck not(%d,%d,%d,%d)\n",
+ rm_pItcRxL1Msg->l3_data.buffer[0],
+ rm_pItcRxL1Msg->l3_data.buffer[1],
+ rm_pItcRxL1Msg->l3_data.buffer[2],
+ rm_pItcRxL1Msg->l3_data.buffer[3]));
+ return;
+ }
+
+ //Check if all time slots of this trxs are initialized or not!
+ if (rm_pItcRxL1Msg->l3_data.buffer[4] == OAMrm_SLOTS_PER_TRX-1)
+ {
+ rm_PassOpParamsToTrx(trx);
+ rm_TrxMgmt[trx].done =RM_TRUE;
+ rm_TrxMgmt[trx].state=RM_TRXMGMT_S3_TRXCONFIG_END;
+
+ //Now trx goes into enabled state if it is needed
+ if (!trx && (OAMrm_CHN_OPSTATE(trx,0)==opStateDisabled) )
+ rm_SetTrxOpState(trx,opStateDisabled);
+ else
+ rm_SetTrxOpState(trx,opStateEnabled);
+ } else
+ {
+ //Activate next time slot of this trx
+ rm_TrxMgmt[trx].slot++;
+ rm_ActTimeSlot(trx,rm_TrxMgmt[trx].slot);
+ }
+ break;
+
+ case RM_TRXMGMT_S3_TRXCONFIG_END:
+ //trx is in normal op. state
+ break;
+
+ default:
+ //Unrecognized trx state
+ IDEBUG__(("WARNING@rm_ProcTrxMgmtMsg: invalid trx SM state=%d\n",
+ rm_TrxMgmt[trx].state));
+ break;
+ }
+}
+
+//Process L1 ack & nack message to slot activ
+u8 rm_ProcSlotActRsp(u8 trx,u8 slot,u8 ackVal)
+{
+ int j;
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER@rm_ProcSlotActRsp\n"));
+
+ //Got an expected ts Ack
+ switch(OAMrm_TRX_SLOT_COMB(trx,slot))
+ {
+ case OAMrm_SLOT_COMB_1:
+ if (ackVal==RM_PHYCHAN_USABLE)
+ {
+ //PMADDED:nbrOfAvailableTCHs
+ if (OAMrm_CHN_AMSTATE(trx,slot) != locked)
+ {
+ rm_NoOfUsableTchf++;
+
+ PM_CellMeasurement.nbrOfAvailableTCHs.setValue(rm_NoOfUsableTchf);
+ //PM_CellMeasurement.nbrOfAvailableTCHs.increment();
+ }
+ }
+
+ //Enable func channels
+ rm_EnDisableRmTchf(trx,slot,ackVal);
+
+ break;
+
+ case OAMrm_SLOT_COMB_5:
+ //Sanitory check
+ if ( trx || slot )
+ {
+ rm_SetRmOpState(EC_RM_CHAN_COMB_5_MISPLACED);
+ //comb 5 should only appear on trx=0 and slot=0 in the design of RM
+ EDEBUG__(("ERROR@rm_ProcSlotActRsp: chan comb 5 comes on (%d,%d)\n",
+ trx,slot));
+ return (RM_TRUE);
+ }
+
+ //Now PCH ready to go !
+
+ rm_PhyChanBCcch[RM_PCH_IDX].usable = ackVal;
+ if (ackVal==RM_PHYCHAN_USABLE)
+ {
+ rm_PhyChanBCcch[RM_PCH_IDX].trxNo = trx;
+ rm_PhyChanBCcch[RM_PCH_IDX].slotNo = slot;
+ rm_PhyChanBCcch[RM_PCH_IDX].state = RM_PHYCHAN_FREE;
+ }
+
+ //Make 4 sdcch4 channels usable
+ for (j=0;j<OAMrm_MAX_SDCCH4S;j++)
+ {
+ rm_PhyChanSdcch4[j].usable=ackVal;
+
+ if (ackVal==RM_PHYCHAN_USABLE && (OAMrm_CHN_AMSTATE(trx,slot) != locked) )
+ {
+ //PMADDED:nbrOfAvailableSDCCHs
+
+ if (++rm_nbrOfAvailableSDCCHs>4)
+ printf("RR INFO@rm_ProcSlotActRsp: nbrOfAvailableSDCCHs %d\n",
+ rm_nbrOfAvailableSDCCHs);
+ else
+ PM_CellMeasurement.nbrOfAvailableSDCCHs.setValue(rm_nbrOfAvailableSDCCHs);
+ //PM_CellMeasurement.nbrOfAvailableSDCCHs.increment();
+ }
+ }
+ break;
+
+ default:
+ //Unsupported channel combination
+ rm_SetRmOpState(EC_RM_CHAN_COMB_UNSUPPORTED);
+ IDEBUG__(("WARNING@rm_ProcSlotActRsp:unsupported channel comb '%d'\n",
+ OAMrm_TRX_SLOT_COMB(trx,slot) ));
+ break;
+ }
+}
+
+//Mark the tchf chan in rm as usable
+u8 rm_EnDisableRmTchf(u8 trx, u8 slot, u8 ackVal)
+{
+ int i;
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER@rm_EnDisableRmTchf\n"));
+
+ for (i=0;i<OAMrm_MAX_TCHFS;i++)
+ {
+ if (rm_PhyChanTchf[i].trxNumber==trx &&
+ (rm_PhyChanTchf[i].chanNumberMSB&0x07)==slot)
+ {
+ //found corresponding rm tchf channel
+ rm_PhyChanTchf[i].usable = ackVal;
+ break;
+ }
+ }
+
+ if (i>=OAMrm_MAX_TCHFS)
+ {
+ //trx-slot pair not valid
+ EDEBUG__(("ERROR@rm_EnDisableRmTchf:no tchf linked to(%d,%d)\n",
+ trx,slot));
+ }
+
+ return RM_TRUE;
+}
+
+//Acitvate the given trx and slot
+void rm_ActTimeSlot(u8 trx,u8 slot)
+{
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_ActTimeSlot\n"));
+
+ //safeguard only
+ if (trx>=OAMrm_MAX_TRXS||slot>=8)
+ {
+ IDEBUG__(("WARNING@rm_ActTimeSlot: invalid trx=%d,slot=%d\n",
+ trx,slot));
+ return;
+ }
+
+ //Activate the given trx and slot
+ rm_SendSlotActivateToTrx(trx,slot);
+}
+
+//Pass trx all needed parameters
+void rm_PassOpParamsToTrx(u8 trx)
+{
+ u8 i, ncellNo;
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_PassOpParamsToTrx '%d'\n",trx));
+
+ //Pass system information messages
+ rm_SendAllSystemInfosToBcchTrx(trx);
+ rm_SendSacchFillingSI5(trx, RM_L1SYSINFO_TYPE_5);
+ rm_SendSacchFillingSI6(trx, RM_L1SYSINFO_TYPE_6);
+ rm_OamSendPcToDsp(trx);
+ rm_OamSendHoSCellToDsp(trx);
+ ncellNo=rm_OamGetTotalAvailableHoNCells();
+
+ for (i=0;i<OAMrm_HO_ADJCELL_NO_MAX;i++)
+ rm_OamSendHoNCellToDsp(trx,i,ncellNo);
+
+ rm_OamSendPwrRedStepToDsp(trx);
+ rm_SendSynchInfoToBcchTrx(trx);
+ rm_SendBtsPackageToTrx(trx);
+}
+
+void rm_SendBtsPackageToTrx(u8 trx)
+{
+ s16 length; //Length of the message to send to L1
+ rm_ItcTxMsg_t msgToL1; //Store an encoded message sent to L1
+ s16 tmp;
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER@rm_SendBtsPackageToTrx: Entering...\n" ));
+
+ //clear the memory first
+ memset(&msgToL1, 0, sizeof(rm_ItcTxMsg_t));
+ length = 0;
+
+ //Encode BtsPackage message
+ msgToL1.buffer[length++] = (unsigned char ) OAM_MANAGE_MSG; // message discriminator
+ msgToL1.buffer[length++] = (unsigned char ) (OAM_BTS_PACKAGE >>8); // high byte of msg type
+ msgToL1.buffer[length++] = (unsigned char ) OAM_BTS_PACKAGE; // low byte of msg type
+ msgToL1.buffer[length++] = trx; // trx number
+
+ //Parameters contained in this message
+ msgToL1.buffer[length++] = OAMrm_RADIO_LINK_TIMEOUT;
+
+ //PR1219
+ msgToL1.buffer[length++] = OAMrm_BS_PA_MFRMS;
+
+ //PR1381 BEGIN
+ if ( ((int)OAMrm_MS_UPLINK_DTX_STATE==1) ||
+ ((int)OAMrm_MS_UPLINK_DTX_STATE==0) )
+ msgToL1.buffer[length] |= 1; //DTX ul ON
+ //PR1381 END
+
+ if (trx && OAMrm_MS_DNLINK_DTX_STATE)
+ msgToL1.buffer[length] |= 2; //DTX dl ON
+ length++;
+
+ msgToL1.msgLength = length;
+
+ //Hex Dump the message if __TDUMP__ defined
+ //TDUMP__((TXMSG__, msgToL1.buffer, length));
+
+ //Send message to DSP
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+
+} //rm_SendBtsPackageToTrx()
+
+
+//Set all rm channels from a trx to given state
+void rm_SetAllRmTrxChnOpState(u8 trx, u8 state )
+{
+ int i,j;
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_SetAllRmTrxChnOpState '%d'\n",trx));
+
+ //Change usable state of any of all tchf channels of trx
+ for (i=0; i<8; i++)
+ for (j=0; j<OAMrm_MAX_TCHFS; j++)
+ { //Scan through all tchf channel table
+ if (rm_PhyChanTchf[j].trxNumber==trx &&
+ (rm_PhyChanTchf[j].chanNumberMSB&0x07)==i)
+ { //Found one rm channel belong to trx
+ if (rm_PhyChanTchf[i].usable!=state &&
+ state==RM_PHYCHAN_UNUSABLE)
+ {
+ rm_PhyChanTchf[i].usable==state;
+ rm_NoOfUsableTchf--;
+ }
+ break;
+ }
+ }
+
+ //Change usable state of any of all sdcch4 channels of trx
+ if (!trx)
+ {
+ for (i=0;i<4;i++)
+ rm_PhyChanSdcch4[i].usable==state;
+ }
+}
+
+#endif //#if 0
+//GP2
+
+//Process trx watchdog expiry
+void rm_ProcTrxWDogExp(u8 trx)
+{
+ int oneTrx,i;
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_ProcTrxWDogExp\n"));
+
+ //Check if trx is still alive
+ if (rm_TrxMgmt[trx].alive)
+ {
+ //trx is still alive. Ping it!
+ rm_TrxMgmt[trx].alive = RM_FALSE;
+ rm_SendPingToTrx(trx);
+ rm_StartTimer(trx,RM_TWDOG);
+ return;
+ } else
+ {
+ //trx not responding, raise an alarm!
+ rm_SetRmOpState(rm_DspNotResponding[trx]);
+ EDEBUG__(("ERROR@rm_ProcTrxWDog: trx '%d' not responding\n",trx));
+ }
+
+ return;
+
+ //Autorecovery logic from trx failed to be laid here in the future
+}
+
+//Set RM's internal and OAM operation state
+void rm_SetRmOpState(Alarm_errorCode_t code)
+{ //0 opStateEnabled, otherwise report an alarm
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_SetRmOpState\n"));
+
+ PDEBUG__(("INFO@rm_SetRmOpState: alarmCode=%d\n",code));
+
+ if (code != EC_NOERROR)
+ {
+ if (JC_OK!=alarm_raise(MODULE_RM, MIB_errorCode_RM, code))
+ {
+ //This is very critical, should abort RM task here <TBD>!!!
+ EDEBUG__(("ERROR@rm_SetRmOpState: \"alarm_raise(%d, %d)\" failed\n",
+ MODULE_RM,code));
+ }
+ } else {
+ if (JC_OK!=alarm_clear(MODULE_RM, MIB_errorCode_RM, EC_NOERROR))
+ {
+ //This is very critical, should abort RM task here <TBD>!!!
+ EDEBUG__(("ERROR@rm_SetRmOpState: \"alarm_clear(%d, %d)\" failed\n",
+ MODULE_RM,code));
+ }
+ }
+
+ //Track own alarm
+ rm_OpState = code;
+
+ if (code < EC_RM_INFO_BASE)
+ {
+ //Sync with btsOpState which goes disabled for a critical code
+ OAMrm_BTS_OPSTATE = opStateDisabled;
+ }
+}
+
+//Send ping message to trx
+void rm_SendPingToTrx(u8 trx)
+{
+ u16 length; //length of sent message
+ rm_ItcTxMsg_t msgToL1; //holder of sent message
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_SendPingToTrx '%d'\n",trx));
+
+ //Form ping message
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_TRXMGMT;
+ msgToL1.buffer[length++] = RM_L1MT_PING_MSB;
+ msgToL1.buffer[length++] = RM_L1MT_PING_LSB;
+ msgToL1.buffer[length++] = trx;
+
+ msgToL1.msgLength = length;
+
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+}
+
+#endif //__RM_INITALL_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_InitIrt.cpp b/data/mnet/GP10/Host/rm/Src/rm_InitIrt.cpp
new file mode 100644
index 0000000..122f81d
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_InitIrt.cpp
@@ -0,0 +1,199 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_INITIRT_CPP__
+#define __RM_INITIRT_CPP__
+
+#include "rm\rm_head.h"
+
+
+void rm_InitIRT( void )
+{
+ u8 i; /* For loop-control or index to array element */
+ u8 iEntryId; /* Index to entryID arrays containing SM Ctxt */
+ rm_IrtEntryId_t mEntryId; /* IRT Entry id returned fr. IRT registration */
+ rm_IrtEntryId_t aEntryId; /* IRT Entry id returned fr. IRT registration */
+ rm_LapdmOId_t mOId,aOId; /* Return from LAPDm-instance create function */
+
+ /* TEST USE */
+ u8 noOfTchfs = 7;
+ u8 noOfSdcch4s = 4;
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_InitIRT\n"));
+
+ /* TBD: Shausong */
+ // CNI_RIL3_IRT_Init(); moved to startup script integ.
+ /*
+ ** Registering an IRT entry for RACH LAPDmOID. <TBD>: Same as rm_InitLAPDm,
+ ** no need to register entry for BCCH, PCH, and AGCH channels. In fact, no
+ ** LAPDmOIDs have been generated for them by rm_InitLAPDm().
+ */
+
+ mEntryId = CNI_RIL3_IRT_Register (
+ rm_PhyChanBCcch[RM_RACH_IDX].mOId, rm_id, mm_id, cc_id
+ );
+
+ /* Check if registration successful */
+ if ( mEntryId == CNI_IRT_NULL_ID )
+ EDEBUG__(( "ERROR-rm_InitIRT: RACH IRT registration failed\n" ));
+ else
+ rm_RachEntryId = mEntryId;
+
+ /*
+ ** Registering an IRT entry for each TCH/F LAPDmOID
+ */
+ for (i=0;i<OAMrm_MAX_TCHFS;i++)
+// for (i=0;i<noOfTchfs;i++)
+ {
+ /*
+ ** Create entry id for MAIN signaling channel LAPDmOID
+ */
+ mEntryId = CNI_RIL3_IRT_Register (
+ rm_PhyChanTchf[i].mOId, rm_id, mm_id, cc_id );
+
+ /* Check if registration successful */
+ if ( mEntryId == CNI_IRT_NULL_ID )
+ EDEBUG__(("ERROR-rm_InitIRT: TCH/F FACCH LAPDmOID IRT registration failed\n"));
+ else
+ {
+ /* TCH/F-FACCH LAPDmOID IRT registration success */
+ rm_SmCtxt[mEntryId].pPhyChan = &rm_PhyChanTchf[i];
+ rm_SmCtxt[mEntryId].state = RM_S1RM_RUNNING;
+ rm_SmCtxt[mEntryId].smType = RM_MAIN_SM;
+ rm_SmCtxt[mEntryId].chanType = RM_CTFACCH_F;
+ rm_SmCtxt[mEntryId].mOId = rm_PhyChanTchf[i].mOId;
+ rm_SmCtxt[mEntryId].aOId = rm_PhyChanTchf[i].aOId;
+
+ rm_PhyChanTchf[i].pMSmCtxt = &rm_SmCtxt[mEntryId];
+
+ iEntryId = RM_TCHF_ENTRYIDX( rm_PhyChanTchf[i].trxNumber,
+ rm_PhyChanTchf[i].chanNumberMSB );
+ rm_TchfEntryId[iEntryId] = mEntryId;
+
+ //printf("rm_InitIrt: TCHFm-%d: iEntryId=%d, mEntryId=%d, mOId=%d\n",
+ // i, iEntryId, mEntryId, rm_PhyChanTchf[i].mOId);
+ }
+
+ /*
+ ** Create entry id for ACCH signaling channel LAPDmOID
+ */
+ aEntryId = CNI_RIL3_IRT_Register (
+ rm_PhyChanTchf[i].aOId, rm_id, mm_id, cc_id );
+
+// printf("rm_InitIrt: TCH/F=%d,aOId=%d\n",i,rm_PhyChanTchf[i].aOId);
+
+ /* Check if registration successful */
+ if ( aEntryId == CNI_IRT_NULL_ID )
+ EDEBUG__(("ERROR-rm_InitIRT: TCH/F SACCH LAPDmOID IRT registration failed\n"));
+ else
+ {
+ /* TCH/F-SACCH LAPDmOID IRT registration success */
+ rm_SmCtxt[aEntryId].pPhyChan = &rm_PhyChanTchf[i];
+ rm_SmCtxt[aEntryId].state = RM_S1RM_RUNNING;
+ rm_SmCtxt[aEntryId].smType = RM_ACCH_SM;
+ rm_SmCtxt[aEntryId].chanType = RM_CTSACCH;
+ rm_SmCtxt[aEntryId].mOId = rm_PhyChanTchf[i].mOId;
+ rm_SmCtxt[aEntryId].aOId = rm_PhyChanTchf[i].aOId;
+
+ rm_PhyChanTchf[i].pASmCtxt = &rm_SmCtxt[aEntryId];
+ }
+
+ /* Main/Acch SM remember each other */
+ rm_SmCtxt[mEntryId].mEntryId = mEntryId;
+ rm_SmCtxt[mEntryId].aEntryId = aEntryId;
+
+ rm_SmCtxt[aEntryId].mEntryId = mEntryId;
+ rm_SmCtxt[aEntryId].aEntryId = aEntryId;
+
+ rm_PhyChanTchf[i].mEntryId = mEntryId;
+ rm_PhyChanTchf[i].aEntryId = aEntryId;
+
+ } /* End of for-i loop: TCHF */
+
+ /*
+ ** Registering an IRT entry for each SDCCH/4 LAPDmOID
+ */
+
+ for (i=0;i<OAMrm_MAX_SDCCH4S;i++)
+// for (i=0;i<noOfSdcch4s;i++)
+ {
+ /*
+ ** Create entry id for MAIN signaling channel LAPDmOID
+ */
+ mEntryId = CNI_RIL3_IRT_Register (
+ rm_PhyChanSdcch4[i].mOId, rm_id, mm_id, cc_id );
+
+// printf("rm_InitIrt: SDCCH=%d,mOId=%d\n",i,rm_PhyChanSdcch4[i].mOId);
+
+ /* Check if registration successful */
+ if ( mEntryId == CNI_IRT_NULL_ID )
+ EDEBUG__(("ERROR-rm_InitIRT: SDCCH4 SDCCH LAPDmOID IRT registration failed\n"));
+ else
+ {
+ /* SDCCH4-SDCCH LAPDmOID IRT registration success */
+ rm_SmCtxt[mEntryId].pPhyChan = &rm_PhyChanSdcch4[i];
+ rm_SmCtxt[mEntryId].state = RM_S1RM_RUNNING;
+ rm_SmCtxt[mEntryId].smType = RM_MAIN_SM;
+ rm_SmCtxt[mEntryId].chanType = RM_CTSDCCH;
+ rm_SmCtxt[mEntryId].mOId = rm_PhyChanSdcch4[i].mOId;
+ rm_SmCtxt[mEntryId].aOId = rm_PhyChanSdcch4[i].aOId;
+
+ rm_PhyChanSdcch4[i].pMSmCtxt = &rm_SmCtxt[mEntryId];
+ rm_PhyChanSdcch4[i].pMSmCtxt->state = RM_S1RM_RUNNING;
+
+ iEntryId = RM_SDCCH4_ENTRYIDX( rm_PhyChanSdcch4[i].trxNumber,
+ rm_PhyChanSdcch4[i].chanNumberMSB );
+ rm_Sdcch4EntryId[iEntryId] = mEntryId;
+ }
+
+ /*
+ ** Create entry id for ACCH signaling channel LAPDmOID
+ */
+ aEntryId = CNI_RIL3_IRT_Register (
+ rm_PhyChanSdcch4[i].aOId, rm_id, mm_id, cc_id
+ );
+// printf("rm_InitIrt: SDCCH=%d,aOId=%d\n",i,rm_PhyChanSdcch4[i].aOId);
+
+ /* Check if registration successful */
+ if ( aEntryId == CNI_IRT_NULL_ID )
+ EDEBUG__(("ERROR-rm_InitIRT: SDCCH4 SACCH LAPDmOID IRT registration failed\n"));
+ else
+ {
+ /* SDCCH4-SACCH LAPDmOID IRT registration success */
+ rm_SmCtxt[aEntryId].pPhyChan = &rm_PhyChanSdcch4[i];
+ rm_SmCtxt[aEntryId].state = RM_S1RM_RUNNING;
+ rm_SmCtxt[aEntryId].smType = RM_ACCH_SM;
+ rm_SmCtxt[aEntryId].chanType = RM_CTSACCH;
+ rm_SmCtxt[aEntryId].mOId = rm_PhyChanSdcch4[i].mOId;
+ rm_SmCtxt[aEntryId].aOId = rm_PhyChanSdcch4[i].aOId;
+
+ rm_PhyChanSdcch4[i].pASmCtxt = &rm_SmCtxt[aEntryId];
+ rm_PhyChanSdcch4[i].pASmCtxt->state = RM_S1RM_RUNNING;
+
+ }
+
+ /* Main/Acch SM remember each other */
+ rm_SmCtxt[mEntryId].mEntryId = mEntryId;
+ rm_SmCtxt[mEntryId].aEntryId = aEntryId;
+
+ rm_SmCtxt[aEntryId].mEntryId = mEntryId;
+ rm_SmCtxt[aEntryId].aEntryId = aEntryId;
+
+ rm_PhyChanSdcch4[i].mEntryId = mEntryId;
+ rm_PhyChanSdcch4[i].aEntryId = aEntryId;
+
+ } /* End of for-i loop: SDCCH4 */
+
+ /* TEST PRINT */
+ // rm_InitIrtTestPrint(2,4);
+ // rm_EntryIdTestPrint(2,4);
+
+} /* End of rm_InitIRT() */
+
+#endif /* __RM_INITIRT_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_InitIrtTestPrint.cpp b/data/mnet/GP10/Host/rm/Src/rm_InitIrtTestPrint.cpp
new file mode 100644
index 0000000..e267b59
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_InitIrtTestPrint.cpp
@@ -0,0 +1,188 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_INITIRTTESTPRINT_CPP__
+#define __RM_INITIRTTESTPRINT_CPP__
+
+
+#include "rm\rm_head.h"
+
+void rm_InitIrtTestPrint(u8 tchfIdx, u8 sdcch4Idx)
+{
+ u8 i;
+ rm_SmCtxt_t *pMSmCtxt, *pASmCtxt;
+ rm_PhyChanDesc_t *pPhyChan;
+
+ /* Print TCHF channel description data */
+ for (i=0; i<tchfIdx; i++)
+ {
+ DDEBUG__ (("%dth TCHF Chan Descrption: entryIDs and SmCtxtAddrs\n",i));
+
+ DDEBUG__ (("mEntryId=0x%08x, aEntryId=0x%08x, mSmCtxt=0x%08x,aSmCtxt=0x%08x,trx=%x,chan=%x\n",
+ rm_PhyChanTchf[i].mEntryId,
+ rm_PhyChanTchf[i].aEntryId,
+ rm_PhyChanTchf[i].pMSmCtxt,
+ rm_PhyChanTchf[i].pASmCtxt,
+ rm_PhyChanTchf[i].trxNumber,
+ rm_PhyChanTchf[i].chanNumberMSB
+
+ ));
+ DDEBUG__(("Output data from rm_SmCtxt[]::%dth\n", i));
+ pMSmCtxt = &rm_SmCtxt[rm_PhyChanTchf[i].mEntryId];
+ pASmCtxt = &rm_SmCtxt[rm_PhyChanTchf[i].aEntryId];
+ pPhyChan = pMSmCtxt->pPhyChan;
+ DDEBUG__(("mSmCtxt=0x%08x,aSmCtxt=0x%08x,pPhyChan=0x%08x,&phyChan[i]=0x%08x\n",
+ pMSmCtxt, pASmCtxt, pPhyChan, &rm_PhyChanTchf[i]));
+ DDEBUG__(("mSm.state=%d, mSm.smType=%d,mSm.mOId=0x%08x,mSm.aOId=0x%08x\n",
+ pMSmCtxt->state,
+ pMSmCtxt->smType,
+ pMSmCtxt->mOId,
+ pMSmCtxt->aOId
+ ));
+ DDEBUG__(("aSm.state=%d, aSm.smType=%d,aSm.mOId=0x%08x,aSm.aOId=0x%08x\n",
+ pASmCtxt->state,
+ pASmCtxt->smType,
+ pASmCtxt->mOId,
+ pASmCtxt->aOId
+ ));
+
+ DDEBUG__ (("%dth TCHF Chan Descrption with SmCtxt.pPhyChan\n",i));
+
+ DDEBUG__ (("usable=0x%02x, state=0x%02x, chanType=0x%02x, subChanNo=0x%02x\n",
+ pPhyChan->usable,
+ pPhyChan->state,
+ pPhyChan->chanType,
+ pPhyChan->subChanNumber
+ ));
+ DDEBUG__ (("trx=0x%02x,chanNumber=0x%04x,chanNumberMSB=0x%02x,chanNumberLSB=0x%02x\n",
+ pPhyChan->trxNumber,
+ pPhyChan->chanNumber,
+ pPhyChan->chanNumberMSB,
+ pPhyChan->chanNumberLSB
+ ));
+ DDEBUG__ (("TSC=0x%02x,rslCount=0x%02x,quality=%d\n",
+ pPhyChan->TSC,
+ pPhyChan->rslCount,
+ pPhyChan->quality
+ ));
+ DDEBUG__ (("T3101.id=0x%08x,T3101.time=%d, T3101.state=%d\n",
+ pPhyChan->T3101.id,
+ pPhyChan->T3101.time,
+ pPhyChan->T3101.state
+ ));
+ DDEBUG__ (("T3111.id=0x%08x,T3111.time=%d, T3111.state=%d\n",
+ pPhyChan->T3111.id,
+ pPhyChan->T3111.time,
+ pPhyChan->T3111.state
+ ));
+ DDEBUG__ (("T3109.id=0x%08x,T3109.time=%d, T3109.state=%d\n",
+ pPhyChan->T3109.id,
+ pPhyChan->T3109.time,
+ pPhyChan->T3109.state
+ ));
+ }
+
+ /* Print SDCCH4 channel description data */
+ for (i=0; i<sdcch4Idx; i++)
+ {
+ DDEBUG__ (("%dth SDCCH4 Chan Descrption: entryIDs and SmCtxtAddrs\n",i));
+
+ DDEBUG__ (("mEntryId=0x%08x, aEntryId=0x%08x, mSmCtxt=0x%08x,aSmCtxt=0x%08x,trx=%x,chan=%x\n",
+ rm_PhyChanSdcch4[i].mEntryId,
+ rm_PhyChanSdcch4[i].aEntryId,
+ rm_PhyChanSdcch4[i].pMSmCtxt,
+ rm_PhyChanSdcch4[i].pASmCtxt,
+ rm_PhyChanSdcch4[i].trxNumber,
+ rm_PhyChanSdcch4[i].chanNumberMSB
+
+ ));
+ DDEBUG__(("Output data from rm_SmCtxt[]::%dth\n", i));
+ pMSmCtxt = &rm_SmCtxt[rm_PhyChanSdcch4[i].mEntryId];
+ pASmCtxt = &rm_SmCtxt[rm_PhyChanSdcch4[i].aEntryId];
+ pPhyChan = pMSmCtxt->pPhyChan;
+ DDEBUG__(("mSmCtxt=0x%08x,aSmCtxt=0x%08x,pPhyChan=0x%08x,&phyChan[i]=0x%08x\n",
+ pMSmCtxt, pASmCtxt, pPhyChan, &rm_PhyChanSdcch4[i]));
+ DDEBUG__(("mSm.state=%d, mSm.smType=%d,mSm.mOId=0x%08x,mSm.aOId=0x%08x\n",
+ pMSmCtxt->state,
+ pMSmCtxt->smType,
+ pMSmCtxt->mOId,
+ pMSmCtxt->aOId
+ ));
+ DDEBUG__(("aSm.state=%d, aSm.smType=%d,aSm.mOId=0x%08x,aSm.aOId=0x%08x\n",
+ pASmCtxt->state,
+ pASmCtxt->smType,
+ pASmCtxt->mOId,
+ pASmCtxt->aOId
+ ));
+
+ DDEBUG__ (("%dth SDCCH4 Chan Descrption with SmCtxt.pPhyChan\n",i));
+
+ DDEBUG__ (("usable=0x%02x, state=0x%02x, chanType=0x%02x, subChanNo=0x%02x\n",
+ pPhyChan->usable,
+ pPhyChan->state,
+ pPhyChan->chanType,
+ pPhyChan->subChanNumber
+ ));
+ DDEBUG__ (("trx=0x%02x,chanNumber=0x%04x,chanNumberMSB=0x%02x,chanNumberLSB=0x%02x\n",
+ pPhyChan->trxNumber,
+ pPhyChan->chanNumber,
+ pPhyChan->chanNumberMSB,
+ pPhyChan->chanNumberLSB
+ ));
+ DDEBUG__ (("TSC=0x%02x,rslCount=0x%02x,quality=%d\n",
+ pPhyChan->TSC,
+ pPhyChan->rslCount,
+ pPhyChan->quality
+ ));
+ DDEBUG__ (("T3101.id=0x%08x,T3101.time=%d, T3101.state=%d\n",
+ pPhyChan->T3101.id,
+ pPhyChan->T3101.time,
+ pPhyChan->T3101.state
+ ));
+ DDEBUG__ (("T3111.id=0x%08x,T3111.time=%d, T3111.state=%d\n",
+ pPhyChan->T3111.id,
+ pPhyChan->T3111.time,
+ pPhyChan->T3111.state
+ ));
+ DDEBUG__ (("T3109.id=0x%08x,T3109.time=%d, T3109.state=%d\n",
+ pPhyChan->T3109.id,
+ pPhyChan->T3109.time,
+ pPhyChan->T3109.state
+ ));
+ }
+
+} /* End of rm_InitIrtTestPrint() */
+
+void rm_PrintTchEntryId(u8 noOfTchfs,u8 noOfSdcch4s)
+{
+ u8 i,trx,slot,idx;
+ T_CNI_IRT_ID entryId;
+ printf("TCHF MAPPING TABLE btw TRX/SLOT and entryID\n");
+ for (i=0;i<noOfTchfs;i++)
+ {
+ if (i<7)
+ {
+ trx=0; slot=i;
+ idx=RM_TCHF_ENTRYIDX(trx, slot);
+ entryId = rm_TchfEntryId[idx];
+ } else
+ {
+ trx=1; slot=i-7;
+ idx=RM_TCHF_ENTRYIDX(trx, slot);
+ entryId = rm_TchfEntryId[idx];
+ }
+ printf("%dth TCHF: index=%d, entryId=%d\n",i,idx,entryId);
+ }
+ printf("SDCCH4 MAPPING TABLE btw TRX/SLOT and entryID\n");
+
+ for (i=0;i<noOfSdcch4s;i++)
+ printf("%dth SDCCH4: index=%d, entryId=%d\n",i,i,rm_Sdcch4EntryId[i]);
+}
+
+
+#endif /* __RM_INITIRTTESTPRINT_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_InitLAPDm.cpp b/data/mnet/GP10/Host/rm/Src/rm_InitLAPDm.cpp
new file mode 100644
index 0000000..0376ca8
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_InitLAPDm.cpp
@@ -0,0 +1,223 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_INITLAPDM_CPP__
+#define __RM_INITLAPDM_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_InitLAPDm(void)
+{
+ u8 i; /* Used for loop-control and array index */
+ bool ret;
+ T_CNI_LAPDM_L3_ID l3_id=0; /* This variable created for CNI API only */
+ rm_LapdmOId_t mOId,aOId; /* Return from LAPDm-instance creat func */
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_InitLAPDm\n" ));
+
+ /*
+ ** Creat a LAPDm instance for each fuctional channel and furnish the RM
+ ** internal data organization accordingly. <TBD> : PCH, AGCH, BCCH msgs
+ ** will by-pass LAPDm, thus no need to create relevant instances.
+ */
+
+ /* Create LAPDm instance for BCCH function channel */
+ mOId = CNI_LAPDM_Create_Instance(
+ CT_BCCH,
+ rm_PhyChanBCcch[RM_BCCH_IDX].trxNumber,
+ rm_PhyChanBCcch[RM_BCCH_IDX].chanNumber,
+ RM_L1LINK_VOID /*TBD*/
+ );
+ if (mOId == CNI_LAPDM_NULL_OID)
+ /* Failed to create BCCH LAPDm instance */
+ EDEBUG__(("ERROR-rm_InitLAPDm: Failed to create BCCH LAPDm instance\n"));
+ else
+ {
+ rm_PhyChanBCcch[RM_BCCH_IDX].mOId = mOId;
+
+ /* Register this RACH instance for SAPI0 and SAPI3 */
+ ret = CNI_LAPDM_Instance_Registration (
+ mOId,
+ RM_SAPI0,
+ l3_id,
+ CNI_RIL3MD_L3CallBack
+ );
+ if (ret==RM_FALSE)
+ EDEBUG__(("ERROR-rm_InitLAPDm: Failed to registrater BCCH instance\n"));
+ }
+
+ /* Create LAPDm instance for RACH function channel */
+ mOId = CNI_LAPDM_Create_Instance(
+ CT_RACH,
+ rm_PhyChanBCcch[RM_RACH_IDX].trxNumber,
+ rm_PhyChanBCcch[RM_RACH_IDX].chanNumber,
+ RM_L1LINK_VOID /*TBD*/
+ );
+ if (mOId == CNI_LAPDM_NULL_OID)
+ /* Failed to create RACH LAPDm instance */
+ EDEBUG__(("ERROR-rm_InitLAPDm: Failed to create RACH LAPDm instance\n"));
+ else
+ {
+ rm_PhyChanBCcch[RM_RACH_IDX].mOId = mOId;
+
+ /* Register this RACH instance for SAPI0 and SAPI3 */
+ ret = CNI_LAPDM_Instance_Registration (
+ mOId,
+ RM_SAPI0,
+ l3_id,
+ CNI_RIL3MD_L3CallBack
+ );
+ if (ret==RM_FALSE)
+ EDEBUG__(("ERROR-rm_InitLAPDm: Failed to registrater RACH instance\n"));
+ }
+
+
+ /* Create LAPDm instance for TCH/F FACCH & SACCH function channels */
+ for (i=0;i<OAMrm_MAX_TCHFS;i++)
+ {
+// if (rm_PhyChanTchf[i].usable == RM_PHYCHAN_USABLE)
+ {
+ mOId = CNI_LAPDM_Create_Instance(
+ CT_FACCH_F,
+ rm_PhyChanTchf[i].trxNumber,
+ rm_PhyChanTchf[i].chanNumber,
+ RM_L1LINK_MAIN
+ );
+
+ aOId = CNI_LAPDM_Create_Instance(
+ CT_SACCH,
+ rm_PhyChanTchf[i].trxNumber,
+ rm_PhyChanTchf[i].chanNumber,
+ RM_L1LINK_ACCH
+ );
+
+ if ( mOId==CNI_LAPDM_NULL_OID || aOId==CNI_LAPDM_NULL_OID )
+ /* Failed to create TCH/F FACCH or SACCH LAPDm instance */
+ EDEBUG__(("ERROR-rm_InitLAPDm: Failed to create TCH/F LAPDm instance:%d\n",i));
+ else
+ {
+ /* Register FACCH instance for SAPI0 only */
+ ret = CNI_LAPDM_Instance_Registration (
+ mOId,
+ RM_SAPI0,
+ l3_id,
+ CNI_RIL3MD_L3CallBack
+ );
+
+ if (ret==RM_FALSE)
+ EDEBUG__(("ERROR-rm_InitLAPDm: Failed to registrater %d-th FACCH instance\n",
+ i));
+
+ /* Register TCHF/SACCH instance for SAPI0 and SAPI3 */
+ ret = CNI_LAPDM_Instance_Registration (
+ aOId,
+ RM_SAPI0,
+ l3_id,
+ CNI_RIL3MD_L3CallBack
+ );
+
+ if (ret==RM_FALSE)
+ EDEBUG__(("ERROR-rm_InitLAPDm: Failed to registrater %d-th TCHF/SACCH instance\n"));
+
+ /* Register TCHF/SACCH instance for SAPI0 and SAPI3 */
+ ret = CNI_LAPDM_Instance_Registration (
+ aOId,
+ RM_SAPI3,
+ l3_id,
+ CNI_RIL3MD_L3CallBack
+ );
+
+ if (ret==RM_FALSE)
+ EDEBUG__(("ERROR-rm_InitLAPDm: Failed to registrater %d-th TCHF/SACCH instance\n"));
+
+ /* Inter-relate relevant data */
+ rm_PhyChanTchf[i].mOId = mOId;
+ rm_PhyChanTchf[i].aOId = aOId;
+
+//printf("rm_InitLAPDm: mOId[%d]=%d, mOId=%d\n",i, rm_PhyChanTchf[i].mOId,mOId);
+//printf("rm_InitLAPDm: aOId[%d]=%d, aOId=%d\n",i, rm_PhyChanTchf[i].aOId,aOId);
+
+ }
+
+ } /* End of outer if-statement */
+
+
+ } /* End of i-for-loop: TCH/F */
+
+ /* Create LAPDm instance for SDCCH/4 SDCCH & SACCH func channels */
+ for (i=0;i<OAMrm_MAX_SDCCH4S;i++)
+ {
+// if (rm_PhyChanSdcch4[i].usable == RM_PHYCHAN_USABLE)
+ {
+ mOId = CNI_LAPDM_Create_Instance(
+ CT_SDCCH,
+ rm_PhyChanSdcch4[i].trxNumber,
+ rm_PhyChanSdcch4[i].chanNumber,
+ RM_L1LINK_MAIN
+ );
+
+ aOId = CNI_LAPDM_Create_Instance(
+ CT_SACCH,
+ rm_PhyChanSdcch4[i].trxNumber,
+ rm_PhyChanSdcch4[i].chanNumber,
+ RM_L1LINK_ACCH
+ );
+
+ if ( mOId==CNI_LAPDM_NULL_OID || aOId==CNI_LAPDM_NULL_OID )
+ /* Failed to create TCH/F FACCH or SACCH LAPDm instance */
+ EDEBUG__(("ERROR-rm_InitLAPDm: Failed to create SDCCH4 LAPDm instance:%d\n",i));
+ else
+ {
+ /* Register SDCCH4 instance for SAPI0 and SAPI3 */
+ ret = CNI_LAPDM_Instance_Registration (
+ mOId,
+ RM_SAPI0,
+ l3_id,
+ CNI_RIL3MD_L3CallBack
+ );
+
+ if (ret==RM_FALSE)
+ EDEBUG__(("ERROR-rm_InitLAPDm: Failed to registrater %d-th SDCCH4 instance\n"));
+
+ ret = CNI_LAPDM_Instance_Registration (
+ mOId,
+ RM_SAPI3,
+ l3_id,
+ CNI_RIL3MD_L3CallBack
+ );
+
+ if (ret==RM_FALSE)
+ EDEBUG__(("ERROR-rm_InitLAPDm: Failed to registrater %d-th SDCCH4 instance\n"));
+
+ /* Register SDCCH4/SACHH instance for SAPI0 only */
+ ret = CNI_LAPDM_Instance_Registration (
+ aOId,
+ RM_SAPI0,
+ l3_id,
+ CNI_RIL3MD_L3CallBack
+ );
+
+ if (ret==RM_FALSE)
+ EDEBUG__(("ERROR-rm_InitLAPDm: Failed to registrater %d-th SDCCH4/SACCH instance\n",
+ i));
+ /* Inter-relate relevant data */
+ rm_PhyChanSdcch4[i].mOId = mOId;
+ rm_PhyChanSdcch4[i].aOId = aOId;
+ }
+
+ } /* End of outer if-statement */
+
+ } /* End of for-i loop: SDCCH4 */
+
+ /* TEST ONLY */
+rm_InitLAPDmTestPrint(2,4);
+
+} /* End of rm_InitLAPDm() */
+
+#endif /* __RM_INITLAPDM_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_InitLAPDmTestPrint.cpp b/data/mnet/GP10/Host/rm/Src/rm_InitLAPDmTestPrint.cpp
new file mode 100644
index 0000000..a3c255d
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_InitLAPDmTestPrint.cpp
@@ -0,0 +1,54 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_INITLAPDMTESTPRINT_CPP__
+#define __RM_INITLAPDMTESTPRINT_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_InitLAPDmTestPrint(u8 tchfIdx, u8 sdcch4Idx)
+{
+ u8 i;
+
+ /* Print TCHF channel description data */
+ for (i=0; i<tchfIdx; i++)
+ {
+ DDEBUG__ (("%dth TCHF Chan Descrption\n",i));
+
+ DDEBUG__ (("mOId=0x%08x, aOId=0x%08x\n",
+ rm_PhyChanTchf[i].mOId,
+ rm_PhyChanTchf[i].aOId
+ ));
+ }
+
+ /* Print SDCCH4 channel description data */
+ for (i=0; i<sdcch4Idx; i++)
+ {
+ DDEBUG__ (("%dth SDCCH4 Chan Descrption\n",i));
+ DDEBUG__ (("mOId=0x%08x, aOId=0x%08x\n",
+ rm_PhyChanSdcch4[i].mOId,
+ rm_PhyChanSdcch4[i].aOId
+ ));
+
+ }
+
+ DDEBUG__ (("BCCH Chan Descrption\n"));
+ DDEBUG__ (("mOId=0x%08x, aOId=0x%08x\n",
+ rm_PhyChanBCcch[RM_BCCH_IDX].mOId,
+ rm_PhyChanBCcch[RM_BCCH_IDX].aOId
+ ));
+
+ DDEBUG__ (("RACH Chan Descrption\n"));
+ DDEBUG__ (("mOId=0x%08x, aOId=0x%08x\n",
+ rm_PhyChanBCcch[RM_RACH_IDX].mOId,
+ rm_PhyChanBCcch[RM_RACH_IDX].aOId
+ ));
+
+} /* End of rm_InitLAPDmTestPrint() */
+
+#endif /* __RM_INITLAPDMTESTPRINT_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_InitRmTestPrint.cpp b/data/mnet/GP10/Host/rm/Src/rm_InitRmTestPrint.cpp
new file mode 100644
index 0000000..d777397
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_InitRmTestPrint.cpp
@@ -0,0 +1,138 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_INITRMTESTPRINT_CPP__
+#define __RM_INITRMTESTPRINT_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_InitRmTestPrint(u8 tchfIdx,u8 sdcch4Idx)
+{
+ u8 i;
+
+ /* Print TCHF channel description data */
+ for (i=0; i<tchfIdx; i++)
+ {
+ DDEBUG__ (("%dth TCHF Chan Descrption\n",i));
+
+ DDEBUG__ (("usable=0x%02x, state=0x%02x, chanType=0x%02x, subChanNo=0x%02x\n",
+ rm_PhyChanTchf[i].usable,
+ rm_PhyChanTchf[i].state,
+ rm_PhyChanTchf[i].chanType,
+ rm_PhyChanTchf[i].subChanNumber
+ ));
+ DDEBUG__ (("trx=0x%02x,chanNumber=0x%04x,chanNumberMSB=0x%02x,chanNumberLSB=0x%02x\n",
+ rm_PhyChanTchf[i].trxNumber,
+ rm_PhyChanTchf[i].chanNumber,
+ rm_PhyChanTchf[i].chanNumberMSB,
+ rm_PhyChanTchf[i].chanNumberLSB
+ ));
+ DDEBUG__ (("TSC=0x%02x,rslCount=0x%02x,quality=%d\n",
+ rm_PhyChanTchf[i].TSC,
+ rm_PhyChanTchf[i].rslCount,
+ rm_PhyChanTchf[i].quality
+ ));
+ DDEBUG__ (("T3101.id=0x%08x,T3101.time=%d, T3101.state=%d\n",
+ rm_PhyChanTchf[i].T3101.id,
+ rm_PhyChanTchf[i].T3101.time,
+ rm_PhyChanTchf[i].T3101.state
+ ));
+ DDEBUG__ (("T3111.id=0x%08x,T3111.time=%d, T3111.state=%d\n",
+ rm_PhyChanTchf[i].T3111.id,
+ rm_PhyChanTchf[i].T3111.time,
+ rm_PhyChanTchf[i].T3111.state
+ ));
+ DDEBUG__ (("T3111.id=0x%08x,T3111.time=%d, T3109.state=%d\n",
+ rm_PhyChanTchf[i].T3109.id,
+ rm_PhyChanTchf[i].T3109.time,
+ rm_PhyChanTchf[i].T3109.state
+ ));
+ DDEBUG__ (("T3111.id=0x%08x,T3L01.time=%d, T3L01.state=%d\n",
+ rm_PhyChanTchf[i].T3L01.id,
+ rm_PhyChanTchf[i].T3L01.time,
+ rm_PhyChanTchf[i].T3L01.state
+ ));
+ }
+
+ /* Print SDCCH4 channel description data */
+ for (i=0; i<sdcch4Idx; i++)
+ {
+ DDEBUG__ (("%dth SDCCH4 Chan Descrption\n",i));
+ DDEBUG__ (("usable=0x%02x, state=0x%02x, chanType=0x%02x, subChanNo=0x%02x\n",
+ rm_PhyChanSdcch4[i].usable,
+ rm_PhyChanSdcch4[i].state,
+ rm_PhyChanSdcch4[i].chanType,
+ rm_PhyChanSdcch4[i].subChanNumber
+ ));
+ DDEBUG__ (("trx=0x%02x,chanNumber=0x%04x,chanNumberMSB=0x%02x,chanNumberLSB=0x%02x\n",
+ rm_PhyChanSdcch4[i].trxNumber,
+ rm_PhyChanSdcch4[i].chanNumber,
+ rm_PhyChanSdcch4[i].chanNumberMSB,
+ rm_PhyChanSdcch4[i].chanNumberLSB
+ ));
+ DDEBUG__ (("TSC=0x%02x,rslCount=0x%02x,quality=%d\n",
+ rm_PhyChanSdcch4[i].TSC,
+ rm_PhyChanSdcch4[i].rslCount,
+ rm_PhyChanSdcch4[i].quality
+ ));
+ DDEBUG__ (("T3101.id=0x%08x,T3101.time=%d, T3101.state=%d\n",
+ rm_PhyChanSdcch4[i].T3101.id,
+ rm_PhyChanSdcch4[i].T3101.time,
+ rm_PhyChanSdcch4[i].T3101.state
+ ));
+ DDEBUG__ (("T3111.id=0x%08x,T3111.time=%d, T3111.state=%d\n",
+ rm_PhyChanSdcch4[i].T3111.id,
+ rm_PhyChanSdcch4[i].T3111.time,
+ rm_PhyChanSdcch4[i].T3111.state
+ ));
+ DDEBUG__ (("T3111.id=0x%08x,T3111.time=%d, T3109.state=%d\n",
+ rm_PhyChanSdcch4[i].T3109.id,
+ rm_PhyChanSdcch4[i].T3109.time,
+ rm_PhyChanSdcch4[i].T3109.state
+ ));
+ DDEBUG__ (("T3111.id=0x%08x,T3L01.time=%d, T3L01.state=%d\n",
+ rm_PhyChanSdcch4[i].T3L01.id,
+ rm_PhyChanSdcch4[i].T3L01.time,
+ rm_PhyChanSdcch4[i].T3L01.state
+ ));
+ }
+
+ DDEBUG__ (("BCCH Chan Descrption\n",i));
+ DDEBUG__ (("trx=0x%02x,chanNumber=0x%04x,chanNumberMSB=0x%02x,chanNumberLSB=0x%02x\n",
+ rm_PhyChanBCcch[RM_BCCH_IDX].trxNumber,
+ rm_PhyChanBCcch[RM_BCCH_IDX].chanNumber,
+ rm_PhyChanBCcch[RM_BCCH_IDX].chanNumberMSB,
+ rm_PhyChanBCcch[RM_BCCH_IDX].chanNumberLSB
+ ));
+
+ DDEBUG__ (("RACH Chan Descrption\n",i));
+ DDEBUG__ (("trx=0x%02x,chanNumber=0x%04x,chanNumberMSB=0x%02x,chanNumberLSB=0x%02x\n",
+ rm_PhyChanBCcch[RM_RACH_IDX].trxNumber,
+ rm_PhyChanBCcch[RM_RACH_IDX].chanNumber,
+ rm_PhyChanBCcch[RM_RACH_IDX].chanNumberMSB,
+ rm_PhyChanBCcch[RM_RACH_IDX].chanNumberLSB
+ ));
+ DDEBUG__ (("RACH Chan Descrption\n",i));
+ DDEBUG__ (("trx=0x%02x,chanNumber=0x%04x,chanNumberMSB=0x%02x,chanNumberLSB=0x%02x\n",
+ rm_PhyChanBCcch[RM_PCH_IDX].trxNumber,
+ rm_PhyChanBCcch[RM_PCH_IDX].chanNumber,
+ rm_PhyChanBCcch[RM_PCH_IDX].chanNumberMSB,
+ rm_PhyChanBCcch[RM_PCH_IDX].chanNumberLSB
+ ));
+
+ DDEBUG__ (("AGCH Chan Descrption\n",i));
+ DDEBUG__ (("trx=0x%02x,chanNumber=0x%04x,chanNumberMSB=0x%02x,chanNumberLSB=0x%02x\n",
+ rm_PhyChanBCcch[RM_AGCH_IDX].trxNumber,
+ rm_PhyChanBCcch[RM_AGCH_IDX].chanNumber,
+ rm_PhyChanBCcch[RM_AGCH_IDX].chanNumberMSB,
+ rm_PhyChanBCcch[RM_AGCH_IDX].chanNumberLSB
+ ));
+}
+
+#endif /* __RM_INITRMTESTPRINT_CPP__ */
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_MdlErrRptCauseRel.cpp b/data/mnet/GP10/Host/rm/Src/rm_MdlErrRptCauseRel.cpp
new file mode 100644
index 0000000..8fe76a0
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_MdlErrRptCauseRel.cpp
@@ -0,0 +1,85 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_MDLERRRPTCAUSEREL_CPP__
+#define __RM_MDLERRRPTCAUSEREL_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_MdlErrRptCauseRel(void)
+{
+ rm_LapdmOId_t lapdmOId;
+
+ RDEBUG__(("ENTER-rm_MdlErrRptCauseRel: cause=%d\n", rm_pItcRxMdMsg->error_cause));
+
+ if (rm_pSmCtxt->smType==RM_MAIN_SM)
+ {
+ //SMS-SAPI3-Begin
+
+ //lapdmOId = rm_pSmCtxt->mOId;
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ //rm_SendRrRelInd(RM_MDLERR,rm_ItcRxEntryId);
+ //rm_SendDlRelReq(lapdmOId, RM_SAPI0, RM_LOCAL_RELEASE);
+
+ //Cut off trx/slot <--> hrtp connection
+ //if (rm_pSmCtxt->state == RM_S10TRAFFICMODE_ESTABLISHED)
+ //{
+ // u8 trx, slot;
+ // trx = rm_pSmCtxt->pPhyChan->trxNumber;
+ // slot = (rm_pSmCtxt->pPhyChan->chanNumberMSB) & 0x07;
+
+ // int ret1;
+ // ret1 = clrConnectionByTrxSlot(trx, slot);
+ // if (ret1<0)
+ // {
+ // EDEBUG__(("ERROR-rm_S10TrafficModeEstablished:
+ // Clear TN-hrtp conn failed:trx=%d/slot=%d\n",
+ // trx, slot));
+ // return;
+ // }
+ //}
+
+ //if (rm_pSmCtxt->sapi != RM_SAPI0)
+ // rm_SendDlRelReq(lapdmOId, rm_pSmCtxt->sapi,RM_LOCAL_RELEASE);
+
+ //rm_SendDlRelReq(rm_pSmCtxt->mOId, RM_SAPI3, RM_LOCAL_RELEASE);
+ //rm_SendDlRelReq(rm_pSmCtxt->aOId, RM_SAPI3, RM_LOCAL_RELEASE);
+
+ //rm_SmCtxt_t *pASmCtxt;
+ //pASmCtxt = rm_pSmCtxt->pChan->pASmCtxt;
+ //pASmCtxt->state = RM_S1RM_RUNNING;
+
+ //SMS-SAPI3-End
+
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3109);
+
+ rm_pSmCtxt->relCause = CNI_RIL3_CAUSE_DESTINATION_OUT_OF_ORDER;
+ //CNI_RIL3_CAUSE_TEMPORARY_FAILURE; //41
+ //Adjust SM state to S7
+ rm_pSmCtxt->state = RM_S7RELEASING_SIGTRAFFICCHAN;
+ rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_RELEASING;
+ }
+ else
+ {
+ //SMS-SAPI3-Begin
+
+ IDEBUG__(("WARNING@rm_MdlErrRptCauseRel:MDL for aEntryId %d\n",
+ rm_ItcRxEntryId));
+
+ //lapdmOId = rm_pSmCtxt->aOId;
+
+ //rm_SendRrRelInd(RM_MDLERR, rm_ItcRxEntryId);
+ //rm_SendDlRelReq(lapdmOId, RM_SAPI3, RM_LOCAL_RELEASE);
+
+ //SMS-SAPI3-End
+
+ rm_pSmCtxt->state = RM_S1RM_RUNNING;
+ }
+}
+
+#endif //__RM_MDLERRRPTCAUSEREL_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_OamGetGsmData.cpp b/data/mnet/GP10/Host/rm/Src/rm_OamGetGsmData.cpp
new file mode 100644
index 0000000..9379c09
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_OamGetGsmData.cpp
@@ -0,0 +1,908 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_OAMGETRMGSMDATA_CPP__
+#define __RM_OAMGETRMGSMDATA_CPP__
+
+//GP2
+#if 0
+
+#include "rm/rm_head.h"
+#include "oam_api.h"
+#include "stdarg.h"
+
+void DBGPRN(char * format, ...)
+{
+#ifdef DEBUG
+ va_list marker;
+
+ va_start( marker, format ); /* Initialize variable arguments. */
+ vprintf(format, marker);
+ printf("\n");
+ va_end( marker ); /* Reset variable arguments. */
+#endif
+ return;
+
+}
+
+// Static Table of OAM Table
+
+// Tables in Basic Package
+extern CellAllocationEntry cellAllocationTable[CellAllocationTableLimit];
+extern PlmnPermittedEntry plmnPermittedTable[PlmnPermittedTableLimit];
+
+// Table in Option Package
+extern NotAllowedAccessClassEntry notAllowedAccessClassTable[NotAllowedAccessClassTableLimit];
+
+// Table in TRX packages
+extern ChannelEntry firstTrxPackageChannelTable[ChannelTableLimit];
+extern ChannelEntry secondTrxPackageChannelTable[ChannelTableLimit];
+
+extern CarrierFrequencyEntry firstRadioCarrierPackageFrequencyListTable[CarrierFrequencyTableLimit];
+extern CarrierFrequencyEntry secondRadioCarrierPackageFrequencyListTable[CarrierFrequencyTableLimit];
+
+// Tables in Adjacent Cell Package
+extern AdjCell_HandoverEntry adjCell_HandoverTable[HandoverTableLimit];
+
+//PR1223 Begin
+extern AdjCell_HandoverEntry adjCell_HandoverTable[HandoverTableLimit];
+//PR1223 End
+extern AdjCell_ReselectionEntry adjCell_ReselectionTable[ReselectionTableLimit];
+
+
+STATUS rm_OamGetBtsBasicPackage(void)
+{
+ STATUS ret;
+
+ RDEBUG__(("ENTER-rm_OamGetBtsBasicPackage\n"));
+
+ // step 1: get the bts basic package structure first
+ ret = getMibStruct(MIB_btsBasicPackage, (u8*)&rm_OamData.btsBasicPackage,
+ sizeof(BtsBasicPackage));
+ if (ret != STATUS_OK)
+ {
+ EDEBUG__(("ERROR-rm_OamGetBtsBasicPackage: btsBasicPackage = %d\n", ret));
+ return ret;
+ }
+
+ // step 2: get the cell allocation table
+ ret = getMibTbl(MIBT_cellAllocationEntry, (void *) &cellAllocationTable,
+ sizeof(cellAllocationTable));
+
+ if (ret != STATUS_OK)
+ {
+ EDEBUG__(("ERROR-rm_OamGetBtsBasicPackage: cellAllocationTable = %d\n",ret));
+ return ret;
+ }
+
+ // we need to do this since it would be rewritten in step 1.
+
+ rm_OamData.btsBasicPackage.cellAllocationTable= (Table *) &cellAllocationTable;
+
+ // step 3: get plmnPermitted Table
+ ret = getMibTbl(MIBT_plmnPermittedEntry, (void *) &plmnPermittedTable , sizeof(plmnPermittedTable));
+
+ if (ret != STATUS_OK)
+ {
+ EDEBUG__(("ERROR-rm_OamGetBtsBasicPackage: plmnPermittedTable = %d\n",ret));
+ return ret;
+ }
+
+ // and finally do this
+ rm_OamData.btsBasicPackage.plmnPermittedTable= (Table *) &plmnPermittedTable;
+
+ // Convert mcc to byte string
+ getByteAryByInt(rm_OamData.btsBasicPackage.bts_mcc,
+ (char *) &rm_OamData.btsBasicPackage.bts_mcc,
+ 3);
+
+ // Convert mnc to byte string
+ getByteAryByInt(rm_OamData.btsBasicPackage.bts_mnc,
+ (char *) &rm_OamData.btsBasicPackage.bts_mnc,
+ 3);
+ // Convert txInteger from GUI to RM internal value
+ int temp;
+ temp = rm_OamData.btsBasicPackage.maxNumberRetransmissions;
+ if (temp==1)
+ rm_OamData.btsBasicPackage.maxNumberRetransmissions=0;
+ else if (temp==2)
+ rm_OamData.btsBasicPackage.maxNumberRetransmissions=1;
+ else if (temp==4)
+ rm_OamData.btsBasicPackage.maxNumberRetransmissions=2;
+ else if (temp==7)
+ rm_OamData.btsBasicPackage.maxNumberRetransmissions=3;
+ else
+ EDEBUG__(("ERROR@rm_OamGetBtsBasicPackage:invalid NoOfReTrans=%d\n",
+ rm_OamData.btsBasicPackage.maxNumberRetransmissions));
+
+ rm_OamData.btsBasicPackage.numberOfSlotsSpreadTrans -= 3; //Tx Integer:12
+
+ rm_OamData.btsBasicPackage.noOfMultiframesBetweenPaging -= 2; //3
+
+#ifdef DEBUG
+ EDEBUG__(("UT-rm_rm_OamGetBtsBasicPackage: BTS Basic Package retrieved successfully\n"));
+#endif
+
+ //PR1101:
+
+ int i;
+
+ switch(OAMrm_GSMDCS_INDICATOR)
+ {
+ case 0: //GSM900
+ if (OAMrm_MS_TX_PWR_MAX_CCHa <=39 && OAMrm_MS_TX_PWR_MAX_CCHa >=5)
+ {
+ i = OAMrm_MS_TX_PWR_MAX_CCHa/2;
+ OAMrm_MS_TX_PWR_MAX_CCHa = 21 - i;
+ } else
+ {
+ EDEBUG__(("ERROR@rm_rm_OamGetBtsBasicPackage: (radio system %d, mSTxPwrMaxCch %d)\n",
+ OAMrm_GSMDCS_INDICATOR,
+ OAMrm_MS_TX_PWR_MAX_CCHa));
+ OAMrm_MS_TX_PWR_MAX_CCHa = 7; //29dBm
+ }
+ break;
+
+ case 1: //DCS1800
+ if (OAMrm_MS_TX_PWR_MAX_CCHa <=30 && OAMrm_MS_TX_PWR_MAX_CCHa >=0)
+ {
+ i = OAMrm_MS_TX_PWR_MAX_CCHa/2;
+ //Not needed now
+ //if (OAMrm_MS_PWR_OFFSET>=0 && OAMrm_MS_PWR_OFFSETa<=6)
+ //{
+ // OAMrm_MS_PWR_OFFSETa = OAMrm_MS_PWR_OFFSETa/2;
+ //} else
+ // OAMrm_MS_PWR_OFFSETa = 0;
+ OAMrm_MS_TX_PWR_MAX_CCHa = 15 - i;
+ } else
+ {
+ EDEBUG__(("ERROR@rm_rm_OamGetBtsBasicPackage: (radio system %d, mSTxPwrMaxCch %d)\n",
+ OAMrm_GSMDCS_INDICATOR,
+ OAMrm_MS_TX_PWR_MAX_CCHa));
+ OAMrm_MS_TX_PWR_MAX_CCHa = 3; //24dBm
+ //Not needed now
+ //OAMrm_MS_PWR_OFFSETa = 0;
+ }
+ break;
+
+ case 2: //PCS1900
+ if (OAMrm_MS_TX_PWR_MAX_CCHa == 32)
+ {
+ OAMrm_MS_TX_PWR_MAX_CCHa = 31; //32dBm
+ } else if (OAMrm_MS_TX_PWR_MAX_CCHa == 33)
+ {
+ OAMrm_MS_TX_PWR_MAX_CCHa = 31; //33dBm
+ } else if (OAMrm_MS_TX_PWR_MAX_CCHa <=30 && OAMrm_MS_TX_PWR_MAX_CCHa >=0)
+ {
+ i = OAMrm_MS_TX_PWR_MAX_CCHa/2;
+ OAMrm_MS_TX_PWR_MAX_CCHa = 15 - i;
+ } else
+ {
+ EDEBUG__(("ERROR@rm_rm_OamGetBtsBasicPackage: (radio system %d, mSTxPwrMaxCch %d)\n",
+ OAMrm_GSMDCS_INDICATOR,
+ OAMrm_MS_TX_PWR_MAX_CCHa));
+ OAMrm_MS_TX_PWR_MAX_CCHa = 3; //24dBm
+ }
+ break;
+
+ default: //Assume a proper value but give debug information
+ EDEBUG__(("ERROR@rm_rm_OamGetBtsBasicPackage: (radio system %d, mSTxPwrMaxCch %d)\n",
+ OAMrm_GSMDCS_INDICATOR,
+ OAMrm_MS_TX_PWR_MAX_CCHa));
+ OAMrm_MS_TX_PWR_MAX_CCHa = 7;
+ //Not needed now
+ //OAMrm_MS_PWR_OFFSETa = 0;
+ break;
+ }
+
+ return STATUS_OK;
+}
+
+STATUS rm_OamGetBtsOptionPackage(void)
+{
+ STATUS ret;
+
+ ret = getMibStruct(MIB_btsOptionsPackage, (u8*)&rm_OamData.btsOptionsPackage,
+ sizeof(BtsOptionsPackage));
+ if (ret != STATUS_OK)
+ {
+ EDEBUG__(("ERROR-rm_OamGetBtsOptionPackage: btsOptionsPackage = %d\n",ret));
+ return ret;
+ }
+
+ // step 2: get the cell allocation table
+ ret = getMibTbl(MIBT_notAllowedAccessClassEntry, (void *) &notAllowedAccessClassTable ,
+ sizeof(notAllowedAccessClassTable));
+
+ if (ret != STATUS_OK)
+ {
+ EDEBUG__(("ERROR-rm_OamGetBtsOptionPackage: notAllowedAccessClassTable = %d\n",ret));
+ return ret;
+ }
+
+ // And finally do this
+ rm_OamData.btsOptionsPackage.notAllowedAccessClassTable= (Table *) &notAllowedAccessClassTable;
+
+#ifdef DEBUG
+ EDEBUG__(("UT-rm_rm_OamGetBtsBasicPackage: BTS Basic Options retrieved successfully\n"));
+#endif
+
+ return STATUS_OK;
+}
+
+
+
+STATUS rm_OamGetBtsFirstTrxPackage(void)
+{
+ STATUS ret;
+
+ ret = getMibStruct(MIB_firstTransceiverPackage, (u8*)&rm_OamData.transceiverPackage[0],
+ sizeof(FirstTransceiverPackage));
+ if (ret != STATUS_OK)
+ {
+ EDEBUG__(("ERROR-rm_OamGetBtsFirstTrxPackage: firstTransceiverPackage = %d\n",ret));
+ return ret;
+ }
+
+ // step 2: get the cell allocation table
+ ret = getMibTbl(MIBT_channel_0_Entry, (void *) &firstTrxPackageChannelTable ,
+ sizeof(firstTrxPackageChannelTable));
+
+ if (ret != STATUS_OK)
+ {
+ EDEBUG__(("ERROR-rm_OamGetBtsFirstTrxPackage: firstTrxPackageChannelTable = %d\n",ret));
+ return ret;
+ }
+
+ // And finally do this
+ rm_OamData.transceiverPackage[0].channelTable= (Table *) &firstTrxPackageChannelTable;
+
+#ifdef DEBUG
+ EDEBUG__(("UT-rm_OamGetBtsFirstTrxPackage: BTS 1st TRX package retrieved successfully\n"));
+#endif
+
+ return STATUS_OK;
+}
+
+
+STATUS rm_OamGetBtsSecondTrxPackage(void)
+{
+ STATUS ret;
+
+ // step 1: get the 2nd TRX Package first
+ ret = getMibStruct(MIB_secondTransceiverPackage, (u8*)&rm_OamData.transceiverPackage[1],
+ sizeof(SecondTransceiverPackage));
+ if (ret != STATUS_OK)
+ {
+ EDEBUG__(("ERROR-rm_OamGetBtsSecondTrxPackage: secondTransceiverPackage = %d\n",ret));
+ return ret;
+ }
+
+ // step 2: get the cell allocation table
+ ret = getMibTbl(MIBT_channel_1_Entry, (void *) &secondTrxPackageChannelTable ,
+ sizeof(secondTrxPackageChannelTable));
+
+ if (ret != STATUS_OK)
+ {
+ EDEBUG__(("ERROR-rm_OamGetBtsSecondTrxPackage: secondTrxPackageChannelTable = %d\n",ret));
+ return ret;
+ }
+
+ // And finally do this
+ rm_OamData.transceiverPackage[1].channelTable= (Table *) &secondTrxPackageChannelTable;
+
+#ifdef DEBUG
+ EDEBUG__(("UT-rm_OamGetBtsSecondTrxPackage: BTS 2nd TRX package retrieved successfully\n"));
+#endif
+
+ return STATUS_OK;
+}
+
+
+
+STATUS rm_OamGetBtsFirstRadioCarrierPackage(void)
+{
+ STATUS ret;
+
+ // step 1: get the 2nd Radio Carrier Package first
+ ret = getMibStruct(MIB_firstRadioCarrierPackage, (u8*) &rm_OamData.radioCarrierPackage[0],
+ sizeof(FirstRadioCarrierPackage));
+ if (ret != STATUS_OK)
+ {
+ EDEBUG__(("ERROR-rm_OamGetRmGsmData: firstRadioCarrierPackage = %d\n",ret));
+ return ret;
+ }
+
+ // step 2: get the radio frequency list for the first carrier package
+ ret = getMibTbl(MIBT_carrierFrequency_0_Entry, (void *) &firstRadioCarrierPackageFrequencyListTable ,
+ sizeof(firstRadioCarrierPackageFrequencyListTable));
+
+ if (ret != STATUS_OK)
+ {
+ EDEBUG__(("ERROR-rm_OamGetBtsFirstTrxPackage: firstRadioCarrierPackageFrequencyListTable = %d\n",ret));
+ return ret;
+ }
+
+ // And finally do this
+ rm_OamData.radioCarrierPackage[0].carrierFrequencyList= (Table *) &firstRadioCarrierPackageFrequencyListTable;
+
+#ifdef DEBUG
+ EDEBUG__(("UT-rm_OamGetBtsFirstTrxPackage: 1st radio carrier package retrieved successfully\n"));
+#endif
+
+ return STATUS_OK;
+}
+
+
+STATUS rm_OamGetBtsSecondRadioCarrierPackage(void)
+{
+ STATUS ret;
+
+ // step 1: get the 2nd Radio Carrier Package first
+ ret = getMibStruct(MIB_secondRadioCarrierPackage, (u8*) &rm_OamData.radioCarrierPackage[1],
+ sizeof(SecondRadioCarrierPackage));
+ if (ret != STATUS_OK)
+ {
+ EDEBUG__(("ERROR-rm_OamGetRmGsmData: secondRadioCarrierPackage = %d\n",ret));
+ return ret;
+ }
+
+ // step 2: get the radio frequency list for the first carrier package
+ ret = getMibTbl(MIBT_carrierFrequency_1_Entry, (void *) &secondRadioCarrierPackageFrequencyListTable ,
+ sizeof(secondRadioCarrierPackageFrequencyListTable));
+
+ if (ret != STATUS_OK)
+ {
+ EDEBUG__(("ERROR-rm_OamGetBtsFirstTrxPackage: secondRadioCarrierPackageFrequencyListTable = %d\n",ret));
+ return ret;
+ }
+
+ // And finally do this
+ rm_OamData.radioCarrierPackage[1].carrierFrequencyList= (Table *) &secondRadioCarrierPackageFrequencyListTable;
+
+#ifdef DEBUG
+ EDEBUG__(("UT-rm_OamGetBtsFirstTrxPackage: 2nd radio carrier package retrieved successfully\n"));
+#endif
+
+ return STATUS_OK;
+}
+
+
+STATUS rm_OamGetT31xxTimerStructure(void)
+{
+ STATUS ret;
+
+ ret = getMibStruct(MIB_t31xxPackage, (u8*)&rm_OamData.t31xx,
+ sizeof(T31xx));
+ if (ret != STATUS_OK)
+ {
+ EDEBUG__(("ERROR-rm_OamGetT31xxTimerStructure: t31xx = %d\n",ret));
+ return ret;
+ }
+
+#ifdef DEBUG
+ EDEBUG__(("UT-rm_OamGetT31xxTimerStructure: T31xx timer structure retrieved successfully\n"));
+#endif
+
+ return STATUS_OK;
+}
+
+STATUS rm_adjacentCellPackage(void)
+{
+ STATUS ret;
+ int i,j;
+
+ // step 1: get adjacent cell Package first
+ ret = getMibStruct(MIB_adjacentCellPackage, (u8*)&rm_OamData.adjacentCellPackage,
+ sizeof(AdjacentCellPackage));
+ if (ret != STATUS_OK)
+ {
+ EDEBUG__(("ERROR-rm_adjacentCellPackage: adjacentCellPackage = %d\n",ret));
+ return ret;
+ }
+
+ // step 2: get handover table list
+ ret = getMibTbl(MIBT_adjCell_handoverEntry, (void *) &adjCell_HandoverTable,
+ sizeof(adjCell_HandoverTable));
+
+ if (ret != STATUS_OK)
+ {
+ EDEBUG__(("ERROR-rm_adjacentCellPackage: adjCell_HandoverTable = %d\n",ret));
+ return ret;
+ }
+
+ // And
+ rm_OamData.adjacentCellPackage.adjCell_handoverTable= (Table *) &adjCell_HandoverTable;
+ //Compress the HandoverTable to remove any empty cell rows
+ i=0;
+ while (i<OAMrm_HO_ADJCELL_NO_MAX)
+ {
+ if (OAMrm_HO_ADJCELL_ID(i)==OAMrm_HO_ADJCELL_ID_NULL)
+ {
+ for (j=i+1;j<OAMrm_HO_ADJCELL_NO_MAX;j++)
+ {
+ if (OAMrm_HO_ADJCELL_ID(j) != OAMrm_HO_ADJCELL_ID_NULL)
+ {
+ memcpy(&adjCell_HandoverTable[i],&adjCell_HandoverTable[j],
+ sizeof(AdjCell_HandoverEntry));
+ adjCell_HandoverTable[i].adjCell_handoverIndex=i;
+ memset(&adjCell_HandoverTable[j],0,sizeof(AdjCell_HandoverEntry));
+ adjCell_HandoverTable[j].adjCell_handoverIndex=j;
+ break;
+ }
+ }
+ }
+ i++;
+ }
+
+ // step 3: get handover table list
+ ret = getMibTbl(MIBT_adjCell_reselectionEntry, (void *) &adjCell_ReselectionTable,
+ sizeof(adjCell_ReselectionTable));
+
+ if (ret != STATUS_OK)
+ {
+ EDEBUG__(("ERROR-rm_adjacentCellPackage: adjCell_ReselectionTable = %d\n",ret));
+ return ret;
+ }
+
+ // And finally do this
+ rm_OamData.adjacentCellPackage.adjCell_reselectionTable= (Table *) &adjCell_ReselectionTable;
+ i=0;
+ while (i<OAMrm_RESEL_ADJCELL_NO_MAX)
+ {
+ if (OAMrm_RESEL_ADJCELL_ID(i)==OAMrm_RESEL_ADJCELL_ID_NULL)
+ {
+ for (j=i+1;j<OAMrm_RESEL_ADJCELL_NO_MAX;j++)
+ {
+ if (OAMrm_RESEL_ADJCELL_ID(j) != OAMrm_RESEL_ADJCELL_ID_NULL)
+ {
+ memcpy(&adjCell_ReselectionTable[i],&adjCell_ReselectionTable[j],
+ sizeof(AdjCell_ReselectionEntry));
+ adjCell_ReselectionTable[i].adjCell_reselectionIndex = i;
+ memset(&adjCell_ReselectionTable[j],0,sizeof(AdjCell_ReselectionEntry));
+ adjCell_ReselectionTable[j].adjCell_reselectionIndex = j;
+ break;
+ }
+ }
+ }
+ i++;
+ }
+#ifdef DEBUG
+ EDEBUG__(("UT-rm_OamGetBtsFirstTrxPackage: adjacent cell package retrieved successfully\n"));
+#endif
+
+ return STATUS_OK;
+}
+
+STATUS rm_handoverControlPackage(void)
+{
+ STATUS ret;
+
+ ret = getMibStruct(MIB_handoverControlPackage, (u8*)&rm_OamData.handoverControlPackage,
+ sizeof(HandoverControlPackage));
+ if (ret != STATUS_OK)
+ {
+ EDEBUG__(("ERROR-rm_handoverControlPackage: handoverControlPackage = %d\n",ret));
+ return ret;
+ }
+
+#ifdef DEBUG
+ EDEBUG__(("UT-rm_handoverControlPackage: handover control package retrieved successfully\n"));
+#endif
+
+ return STATUS_OK;
+}
+
+
+STATUS rm_powerControlPackage(void)
+{
+ STATUS ret;
+
+
+ ret = getMibStruct(MIB_powerControlPackage, (u8*)&rm_OamData.powerControlPackage,
+ sizeof(PowerControlPackage));
+ if (ret != STATUS_OK)
+ {
+ EDEBUG__(("ERROR-rm_powerControlPackage: powerControlPackage = %d\n",ret));
+ return ret;
+ }
+
+#ifdef DEBUG
+ EDEBUG__(("UT-rm_powerControlPackage: power control package retrieved successfully\n"));
+#endif
+
+ return STATUS_OK;
+}
+
+
+void DBG_Print_cellAllocationTable(Table *tbl)
+{
+ int i;
+ CellAllocationEntry *entry = (CellAllocationEntry *) tbl;
+ DBGPRN("%s\t%s", "Index", "Cell Allociation");
+
+ for (i = 0; i< CellAllocationTableLimit; i++)
+ {
+
+ DBGPRN("%d\t\t%d", i+1, (entry+i)->cellAllocation);
+ }
+}
+
+void DBG_Print_plmnPermittedTable(Table *tbl)
+{
+ int i;
+ PlmnPermittedEntry *entry = (PlmnPermittedEntry *) tbl;
+ DBGPRN("%s\t%s", "Index", "Plmn Permitted");
+
+ for (i = 0; i< PlmnPermittedTableLimit; i++)
+ {
+
+ DBGPRN("%d\t\t%d", i+1, (entry+i)->plmnPermitted);
+ }
+}
+
+void DBG_Print_notAllowedAccessClassTable(Table *tbl)
+{
+ int i;
+ NotAllowedAccessClassEntry *entry = (NotAllowedAccessClassEntry *) tbl;
+ DBGPRN("%s\t%s", "Index", "Not Allowed Access Class");
+
+ for (i = 0; i< NotAllowedAccessClassTableLimit ; i++)
+ {
+
+ DBGPRN("%d\t\t%d", i+1, (entry+i)->notAllowedAccessClass);
+ }
+}
+
+void DBG_Print_channelTable(Table *tbl)
+{
+ int i;
+ ChannelEntry *entry = (ChannelEntry *) tbl;
+ DBGPRN("%s,%s,%s,%s,%s,%s,%s", "Idx", "ID", "Comb", "fusage", "tch", "a.state", "o.state");
+
+ for (i = 0; i<ChannelTableLimit ; i++)
+ {
+
+ DBGPRN("%d,%d,%d,%d,%d,%d,%d", i+1, (entry+i)->channelID,
+ (entry+i)->channelCombination,
+ (entry+i)->channelFrequencyUsage,
+ (entry+i)->channelTsc,
+ (entry+i)->channelAdministrativeState,
+ (entry+i)->channelOperationalState);
+ }
+}
+
+void DBG_Print_carrierFrequencyTable(Table *tbl)
+{
+ int i;
+ CarrierFrequencyEntry *entry = (CarrierFrequencyEntry *) tbl;
+ DBGPRN("%s\t%s", "Index", "Carrier Frequency");
+
+ for (i = 0; i< CarrierFrequencyTableLimit; i++)
+ {
+
+ DBGPRN("%d\t\t%d", i+1, (entry+i)->carrierFrequency);
+ }
+}
+
+void DBG_Print_adjCell_handoverTable(Table *tbl)
+{
+ int i;
+ AdjCell_HandoverEntry *entry = (AdjCell_HandoverEntry *) tbl;
+ DBGPRN("%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s", "Idx", "ID", "mcc", "mnc", "lac", "ci", "bcch",
+ "ncc", "cid", "sync", "hoPl", "hoM", "msTx", "rxLev");
+
+ for (i = 0; i< HandoverTableLimit; i++)
+ {
+
+ DBGPRN("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",
+ i+1,
+ (entry+i)->adjCell_handoverCellID,
+ (entry+i)->adjCell_mcc,
+ (entry+i)->adjCell_mnc,
+ (entry+i)->adjCell_lac,
+ (entry+i)->adjCell_ci,
+ (entry+i)->adjCell_bCCHFrequency,
+ (entry+i)->adjCell_ncc,
+ (entry+i)->adjCell_cid,
+ (entry+i)->adjCell_synchronized,
+ (entry+i)->adjCell_hoPriorityLevel,
+ (entry+i)->adjCell_hoMargin,
+ (entry+i)->adjCell_msTxPwrMaxCell,
+ (entry+i)->adjCell_rxLevMinCell);
+ }
+}
+
+void DBG_Print_adjCell_reselectionTable(Table *tbl)
+{
+ int i;
+ AdjCell_ReselectionEntry *entry = (AdjCell_ReselectionEntry *) tbl;
+ DBGPRN("%s\t%s\t%s", "Index", "ID", "Reselection BCCH Frequency");
+
+ for (i = 0; i< ReselectionTableLimit; i++)
+ {
+
+ DBGPRN("%d\t\t%d\t\t%d", i+1, (entry+i)->adjCell_reselectionCellID,
+ (entry+i)->adjCell_reselectionBCCHFrequency);
+ }
+}
+
+
+void rm_print_btsBasicPackage(BtsBasicPackage *btsBasicPackage)
+{
+ DBGPRN("\nBts Bacic Package");
+
+ char *cp;
+
+ DBGPRN("bts_ncc= %d", btsBasicPackage->bts_ncc);
+ DBGPRN("bts_cid= %d", btsBasicPackage->bts_cid);
+ DBGPRN("btsID= %d", btsBasicPackage->btsID);
+
+ DBG_Print_cellAllocationTable(btsBasicPackage->cellAllocationTable);
+
+ DBGPRN("gsmdcsIndicator= %d", btsBasicPackage->gsmdcsIndicator);
+ cp = (char *) &btsBasicPackage->bts_mcc;
+ DBGPRN("bts_mcc= %d%d%d", cp[0], cp[1], cp[2]);
+ cp = (char *) &btsBasicPackage->bts_mnc;
+ DBGPRN("bts_mnc= %d%d", cp[0],cp[1],cp[2]);
+
+ DBGPRN("bts_lac= %d", btsBasicPackage->bts_lac);
+ DBGPRN("bts_ci= %d", btsBasicPackage->bts_ci);
+ DBGPRN("cellReselectHysteresis= %d", btsBasicPackage->cellReselectHysteresis);
+ DBGPRN("ny1= %d", btsBasicPackage->ny1);
+
+ DBG_Print_plmnPermittedTable (btsBasicPackage->plmnPermittedTable);
+
+ DBGPRN("radioLinkTimeout= %d", btsBasicPackage->radioLinkTimeout);
+ DBGPRN("relatedTranscoder= %d", btsBasicPackage->relatedTranscoder);
+ DBGPRN("rxLevAccessMin= %d", btsBasicPackage->rxLevAccessMin);
+ DBGPRN("bts_administrativeState= %d", btsBasicPackage->bts_administrativeState);
+ DBGPRN("bts_alarmStatus= %d", btsBasicPackage->bts_alarmStatus);
+ DBGPRN("bts_operationalState= %d", btsBasicPackage->bts_operationalState);
+ DBGPRN("maxNumberRetransmissions= %d", btsBasicPackage->maxNumberRetransmissions);
+ DBGPRN("mSTxPwrMaxCCH= %d", btsBasicPackage->mSTxPwrMaxCCH);
+ DBGPRN("numberOfSlotsSpreadTrans= %d", btsBasicPackage->numberOfSlotsSpreadTrans);
+ DBGPRN("noOfBlocksForAccessGrant= %d", btsBasicPackage->noOfBlocksForAccessGrant);
+ DBGPRN("noOfMultiframesBetweenPaging= %d",btsBasicPackage->noOfMultiframesBetweenPaging);
+
+}
+
+
+void rm_print_btsOptionsPackage(BtsOptionsPackage *btsOptionsPackage)
+{
+ DBGPRN("\nBts Optioons Package");
+
+ DBGPRN("allowIMSIAttachDetach= %d", btsOptionsPackage->allowIMSIAttachDetach);
+ DBGPRN("callReestablishmentAllowed= %d", btsOptionsPackage->callReestablishmentAllowed);
+ DBGPRN("cellBarred= %d", btsOptionsPackage->cellBarred);
+ DBGPRN("dtxDownlink= %d", btsOptionsPackage->dtxDownlink);
+ DBGPRN("dtxUplink= %d", btsOptionsPackage->dtxUplink);
+ DBGPRN("emergencyCallRestricted= %d", btsOptionsPackage->emergencyCallRestricted);
+
+ DBG_Print_notAllowedAccessClassTable(btsOptionsPackage->notAllowedAccessClassTable);
+
+ DBGPRN("timerPeriodicUpdateMS= %d", btsOptionsPackage->timerPeriodicUpdateMS);
+ DBGPRN("maxQueueLength= %d", btsOptionsPackage->maxQueueLength);
+ DBGPRN("msPriorityUsedInQueueing= %d", btsOptionsPackage->msPriorityUsedInQueueing);
+ DBGPRN("timeLimitCall= %d", btsOptionsPackage->timeLimitCall);
+ DBGPRN("timeLimitHandover= %d", btsOptionsPackage->timeLimitHandover);
+}
+
+void rm_print_transceiverPackage(TransceiverPackage *transceiverPackage)
+{
+
+ DBGPRN("basebandTransceiverID= %d", transceiverPackage->basebandTransceiverID);
+
+ DBGPRN("relatedRadioCarrier= %d", transceiverPackage->relatedRadioCarrier);
+ DBGPRN("basebandAdministrativeState= %d", transceiverPackage->basebandAdministrativeState);
+ DBGPRN("basebandAlarmStatus= %d", transceiverPackage->basebandAlarmStatus);
+ DBGPRN("basebandOperationalState= %d", transceiverPackage->basebandOperationalState);
+
+ DBG_Print_channelTable(transceiverPackage->channelTable);
+}
+
+void rm_print_firstTransceiverPackage(FirstTransceiverPackage *firstTransceiverPackage)
+{
+
+ DBGPRN("\nFirst Transceiver Package");
+ rm_print_transceiverPackage(firstTransceiverPackage);
+}
+
+void rm_print_secondTransceiverPackage(SecondTransceiverPackage *secondTransceiverPackage)
+{
+
+ DBGPRN("\nSecond Transceiver Package");
+ rm_print_transceiverPackage(secondTransceiverPackage);
+}
+
+void rm_print_radioCarrierPackage(RadioCarrierPackage *radioCarrierPackage)
+{
+
+ DBG_Print_carrierFrequencyTable(radioCarrierPackage->carrierFrequencyList);
+
+ DBGPRN("powerClass= %d", radioCarrierPackage->powerClass);
+ DBGPRN("radioCarrierID= %d", radioCarrierPackage->radioCarrierID);
+ DBGPRN("txPwrMaxReduction= %d", radioCarrierPackage->txPwrMaxReduction);
+ DBGPRN("carrier_administrativeState= %d", radioCarrierPackage->carrier_administrativeState);
+ DBGPRN("carrier_alarmStatus= %d", radioCarrierPackage->carrier_alarmStatus);
+ DBGPRN("carrier_operationalState= %d", radioCarrierPackage->carrier_operationalState);
+
+}
+
+void rm_print_firstRadioCarrierPackage(FirstRadioCarrierPackage *firstRadioCarrierPackage)
+{
+
+ DBGPRN("\nFirst Radio Carrier Package");
+ rm_print_radioCarrierPackage(firstRadioCarrierPackage);
+}
+
+void rm_print_secondRadioCarrierPackage(SecondRadioCarrierPackage *secondRadioCarrierPackage)
+{
+
+ DBGPRN("\nSecond Radio Carrier Package");
+ rm_print_radioCarrierPackage(secondRadioCarrierPackage);
+}
+
+
+void rm_print_t31xx(T31xx *t31xx)
+{
+
+ DBGPRN("\nT31xx Timers");
+
+ DBGPRN("t3101= %d", t31xx->t3101);
+ DBGPRN("t3103= %d", t31xx->t3103);
+ DBGPRN("t3105= %d", t31xx->t3105);
+ DBGPRN("t3107= %d", t31xx->t3107);
+ DBGPRN("t3109= %d", t31xx->t3109);
+ DBGPRN("t3111= %d", t31xx->t3111);
+ DBGPRN("t3113= %d", t31xx->t3113);
+
+}
+
+void rm_print_adjacentCellPackage(AdjacentCellPackage *adjacentCellPackage)
+{
+ DBGPRN("\nAdjacent Cell Package");
+
+ DBG_Print_adjCell_handoverTable(adjacentCellPackage->adjCell_handoverTable);
+ DBG_Print_adjCell_reselectionTable(adjacentCellPackage->adjCell_reselectionTable);
+}
+
+
+
+void rm_print_handoverControlPackage(HandoverControlPackage *handoverControlPackage)
+{
+ DBGPRN("\nHandover Control Package");
+
+ DBGPRN("handoverControlID= %d", handoverControlPackage->handoverControlID);
+ DBGPRN("enableOptHandoverProcessing= %d", handoverControlPackage->enableOptHandoverProcessing);
+
+ DBGPRN("%x:%x", handoverControlPackage->hoAveragingAdjCellParam, &mnetMib.hoAveragingAdjCellParam);
+
+ DBGPRN("hoAveragingAdjCellParamHreqave= %d", handoverControlPackage->hoAveragingAdjCellParam->hreqave);
+ DBGPRN("hoAveragingAdjCellParamHreqt= %d", handoverControlPackage->hoAveragingAdjCellParam->hreqt);
+ DBGPRN("hoAveragingAdjCellParamWeighting= %d", handoverControlPackage->hoAveragingAdjCellParam->weighting);
+
+ DBGPRN("hoAveragingDistParamHreqave= %d", handoverControlPackage->hoAveragingDistParam->hreqave);
+ DBGPRN("hoAveragingDistParamHreqt= %d", handoverControlPackage->hoAveragingDistParam->hreqt);
+
+ DBGPRN("hoAveragingLevParamHreqave= %d", handoverControlPackage->hoAveragingLevParam->hreqave);
+ DBGPRN("hoAveragingLevParamHreqt= %d", handoverControlPackage->hoAveragingLevParam->hreqt);
+ DBGPRN("hoAveragingLevParamWeighting= %d", handoverControlPackage->hoAveragingLevParam->weighting);
+
+ DBGPRN("hoAveragingQualParamHreqave= %d", handoverControlPackage->hoAveragingQualParam->hreqave);
+ DBGPRN("hoAveragingQualParamHreqt= %d", handoverControlPackage->hoAveragingQualParam->hreqt);
+ DBGPRN("hoAveragingQualParamWeighting= %d", handoverControlPackage->hoAveragingQualParam->weighting);
+
+ DBGPRN("hoMarginDef= %d", handoverControlPackage->hoMarginDef);
+
+ DBGPRN("hoThresholdDistParamTimeadv= %d", handoverControlPackage->hoThresholdDistParam->timeadv);
+ DBGPRN("hoThresholdDistParamP8= %d", handoverControlPackage->hoThresholdDistParam->p8);
+ DBGPRN("hoThresholdDistParamN8= %d", handoverControlPackage->hoThresholdDistParam->n8);
+
+ DBGPRN("hoThresholdInterfaceParamRxLevelUL= %d", handoverControlPackage->hoThresholdInterfaceParam->rxLevelUL);
+ DBGPRN("hoThresholdInterfaceParamRxLevelDL= %d", handoverControlPackage->hoThresholdInterfaceParam->rxLevelDL);
+ DBGPRN("hoThresholdInterfaceParamPx= %d", handoverControlPackage->hoThresholdInterfaceParam->px);
+ DBGPRN("hoThresholdInterfaceParamNx= %d", handoverControlPackage->hoThresholdInterfaceParam->nx);
+
+ DBGPRN("hoThresholdLevParamRxLevelUL= %d", handoverControlPackage->hoThresholdLevParam->rxLevelUL);
+ DBGPRN("hoThresholdLevParamRxLevelDL= %d", handoverControlPackage->hoThresholdLevParam->rxLevelDL);
+ DBGPRN("hoThresholdLevParamPx= %d", handoverControlPackage->hoThresholdLevParam->px);
+ DBGPRN("hoThresholdLevParamNx= %d", handoverControlPackage->hoThresholdLevParam->nx);
+
+ DBGPRN("hoThresholdQualParamRxQualUL= %d", handoverControlPackage->hoThresholdQualParam->rxQualUL);
+ DBGPRN("hoThresholdQualParamRxQualDL= %d", handoverControlPackage->hoThresholdQualParam->rxQualDL);
+ DBGPRN("hoThresholdQualParamPx= %d", handoverControlPackage->hoThresholdQualParam->px);
+ DBGPRN("hoThresholdQualParamNx= %d", handoverControlPackage->hoThresholdQualParam->nx);
+
+ DBGPRN("interferenceAveragingParamAveragingPeriod= %d", handoverControlPackage->interferenceAveragingParam->interferenceAveragingParamAveragingPeriod);
+ DBGPRN("interferenceAveragingParamThresholdBoundary0= %d", handoverControlPackage->interferenceAveragingParam->interferenceAveragingParamThresholdBoundary0);
+ DBGPRN("interferenceAveragingParamThresholdBoundary1= %d", handoverControlPackage->interferenceAveragingParam->interferenceAveragingParamThresholdBoundary1);
+ DBGPRN("interferenceAveragingParamThresholdBoundary2= %d", handoverControlPackage->interferenceAveragingParam->interferenceAveragingParamThresholdBoundary2);
+ DBGPRN("interferenceAveragingParamThresholdBoundary3= %d", handoverControlPackage->interferenceAveragingParam->interferenceAveragingParamThresholdBoundary3);
+ DBGPRN("interferenceAveragingParamThresholdBoundary4= %d", handoverControlPackage->interferenceAveragingParam->interferenceAveragingParamThresholdBoundary4);
+ DBGPRN("interferenceAveragingParamThresholdBoundary5= %d", handoverControlPackage->interferenceAveragingParam->interferenceAveragingParamThresholdBoundary5);
+
+ DBGPRN("msTxPwrMaxCellDef= %d", handoverControlPackage->mxTxPwrMaxCellDef);
+ DBGPRN("rxLevMinCellDef= %d", handoverControlPackage->rxLevMinCellDef);
+
+}
+
+void rm_print_powerControlPackage(PowerControlPackage *powerControlPackage)
+{
+ DBGPRN("\nPower Control Package");
+
+ DBGPRN("pcAveragingLevHreqave= %d", powerControlPackage->pcAveragingLev->hreqave);
+ DBGPRN("pcAveragingLevHreqt= %d", powerControlPackage->pcAveragingLev->hreqt);
+ DBGPRN("pcAveragingLevWeighting= %d", powerControlPackage->pcAveragingLev->weighting);
+
+ DBGPRN("pcAveragingQualHreqave= %d", powerControlPackage->pcAveragingQual->hreqave);
+ DBGPRN("pcAveragingQualHreqt= %d", powerControlPackage->pcAveragingQual->hreqt);
+ DBGPRN("pcAveragingQualWeighting= %d", powerControlPackage->pcAveragingQual->weighting);
+
+ DBGPRN("pcLowerThresholdLevParamRxLevelUL= %d", powerControlPackage->pcLowerThresholdLevParam->rxLevelUL);
+ DBGPRN("pcLowerThresholdLevParamRxLevelDL= %d", powerControlPackage->pcLowerThresholdLevParam->rxLevelDL);
+ DBGPRN("pcLowerThresholdLevParamPx= %d", powerControlPackage->pcLowerThresholdLevParam->px);
+ DBGPRN("pcLowerThresholdLevParamNx= %d", powerControlPackage->pcLowerThresholdLevParam->nx);
+
+ DBGPRN("pcLowerThresholdQualParamRxQualUL= %d", powerControlPackage->pcLowerThresholdQualParam->rxQualUL);
+ DBGPRN("pcLowerThresholdQualParamRxQualDL= %d", powerControlPackage->pcLowerThresholdQualParam->rxQualDL);
+ DBGPRN("pcLowerThresholdQualParamPx= %d", powerControlPackage->pcLowerThresholdQualParam->px);
+ DBGPRN("pcLowerThresholdQualParamNx= %d", powerControlPackage->pcLowerThresholdQualParam->nx);
+
+ DBGPRN("pcUpperThresholdLevParamRxLevelUL= %d", powerControlPackage->pcUpperThresholdLevParam->rxLevelUL);
+ DBGPRN("pcUpperThresholdLevParamRxLevelDL= %d", powerControlPackage->pcUpperThresholdLevParam->rxLevelDL);
+ DBGPRN("pcUpperThresholdLevParamPx= %d", powerControlPackage->pcUpperThresholdLevParam->px);
+ DBGPRN("pcUpperThresholdLevParamNx= %d", powerControlPackage->pcUpperThresholdLevParam->nx);
+
+ DBGPRN("pcUpperThresholdQualParamRxQualUL= %d", powerControlPackage->pcUpperThresholdQualParam->rxQualUL);
+ DBGPRN("pcUpperThresholdQualParamRxQualDL= %d", powerControlPackage->pcUpperThresholdQualParam->rxQualDL);
+ DBGPRN("pcUpperThresholdQualParamPx= %d", powerControlPackage->pcUpperThresholdQualParam->px);
+ DBGPRN("pcUpperThresholdQualParamNx= %d", powerControlPackage->pcUpperThresholdQualParam->nx);
+ DBGPRN("powerControlInterval= %d", powerControlPackage->powerControlInterval);
+ DBGPRN("powerIncrStepSize= %d", powerControlPackage->powerIncrStepSize);
+ DBGPRN("powerRedStepSize= %d", powerControlPackage->powerRedStepSize);
+}
+
+
+// print the retrieved value and this is used for debug only
+void rm_printOamGsmData(void)
+{
+ rm_print_btsBasicPackage(&rm_OamData.btsBasicPackage);
+ rm_print_btsOptionsPackage(&rm_OamData.btsOptionsPackage);
+ rm_print_firstTransceiverPackage(&rm_OamData.transceiverPackage[0]);
+ rm_print_secondTransceiverPackage(&rm_OamData.transceiverPackage[1]);
+ rm_print_firstRadioCarrierPackage(&rm_OamData.radioCarrierPackage[0]);
+ rm_print_secondRadioCarrierPackage(&rm_OamData.radioCarrierPackage[1]);
+ rm_print_t31xx(&rm_OamData.t31xx);
+ rm_print_adjacentCellPackage(&rm_OamData.adjacentCellPackage);
+ rm_print_handoverControlPackage(&rm_OamData.handoverControlPackage);
+ rm_print_powerControlPackage(&rm_OamData.powerControlPackage);
+
+}
+
+
+// retrieve all the GSM MIB data
+void rm_OamGetGsmData(void)
+{
+ rm_OamGetBtsBasicPackage();
+ rm_OamGetBtsOptionPackage();
+ rm_OamGetBtsFirstTrxPackage();
+ rm_OamGetBtsSecondTrxPackage();
+ rm_OamGetBtsFirstRadioCarrierPackage();
+ rm_OamGetBtsSecondRadioCarrierPackage();
+ rm_OamGetT31xxTimerStructure();
+ rm_adjacentCellPackage();
+ rm_handoverControlPackage();
+ rm_powerControlPackage();
+// rm_printOamGsmData();
+}
+
+//GP2
+#endif //#if 0
+
+#endif /* __RM_OAMGETRMGSMDATA_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_OamGetRmConfigData.cpp b/data/mnet/GP10/Host/rm/Src/rm_OamGetRmConfigData.cpp
new file mode 100644
index 0000000..9156de6
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_OamGetRmConfigData.cpp
@@ -0,0 +1,33 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_OAMGETRMCONFIGDATA_CPP__
+#define __RM_OAMGETRMCONFIGDATA_CPP__
+
+//GP2
+#if 0
+
+#include "rm\rm_head.h"
+
+void rm_OamGetRmConfigData(void)
+{
+ STATUS ret;
+
+ RDEBUG__(("ENTER-rm_OamGetRmConfigData\n"));
+ ret = getMibStruct(MIB_resourceConfigData, (u8*)&rm_OamData.rmConfigData,
+ sizeof(ResourceConfigData));
+ if (ret != STATUS_OK)
+ EDEBUG__(("ERROR-rm_OamGetRmConfigData: getMibVarAdr error=%d\n",ret));
+
+// rm_TestPrintOamRmConfigData();
+}
+
+//GP2
+#endif //#if 0
+
+#endif /* __RM_OAMGETRMCONFIGDATA_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_OamRegTrapVars.cpp b/data/mnet/GP10/Host/rm/Src/rm_OamRegTrapVars.cpp
new file mode 100644
index 0000000..bc2b4b1
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_OamRegTrapVars.cpp
@@ -0,0 +1,2028 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_OAMREGTRAPVARS_CPP__
+#define __RM_OAMREGTRAPVARS_CPP__
+
+#include "rm\rm_head.h"
+
+const Alarm_errorCode_t
+ rm_DspNotResponding[OAMrm_MAX_TRXS]
+ = { EC_RM_DSP_0_NOT_RESPONDING, EC_RM_DSP_1_NOT_RESPONDING};
+const Alarm_errorCode_t
+ rm_DspNotTickingAnyMore[OAMrm_MAX_TRXS]
+ = {EC_RM_DSP_0_NOT_TICKING, EC_RM_DSP_1_NOT_TICKING};
+const Alarm_errorCode_t
+ rm_TrxRadioOff[OAMrm_MAX_TRXS]
+ = { EC_RM_TRX_0_RADIO_OFF, EC_RM_TRX_1_RADIO_OFF};
+const Alarm_errorCode_t
+ rm_TrxAdminLockedAlarmCode[OAMrm_MAX_TRXS]
+ = {EC_RM_TRX_1_LOCKED,EC_RM_TRX_2_LOCKED};
+
+const Alarm_errorCode_t
+ rm_TrxAdminUnlockedAlarmCode[OAMrm_MAX_TRXS]
+ = {EC_RM_TRX_1_UNLOCKED,EC_RM_TRX_2_UNLOCKED};
+
+const Alarm_errorCode_t
+ rm_TrxAdminShuttingDownAlarmCode[OAMrm_MAX_TRXS]
+ = {EC_RM_TRX_1_SHUTTINGDOWN,EC_RM_TRX_2_SHUTTINGDOWN};
+
+const Alarm_errorCode_t
+ rm_TrxSlotAdminLockedAlarmCode[OAMrm_MAX_TRXS][OAMrm_SLOTS_PER_TRX]
+ = {
+ {EC_RM_TRX_1_SLOT_1_LOCKED, EC_RM_TRX_1_SLOT_2_LOCKED,
+ EC_RM_TRX_1_SLOT_3_LOCKED, EC_RM_TRX_1_SLOT_4_LOCKED,
+ EC_RM_TRX_1_SLOT_5_LOCKED, EC_RM_TRX_1_SLOT_6_LOCKED,
+ EC_RM_TRX_1_SLOT_7_LOCKED, EC_RM_TRX_1_SLOT_8_LOCKED},
+
+ {EC_RM_TRX_2_SLOT_1_LOCKED, EC_RM_TRX_2_SLOT_2_LOCKED,
+ EC_RM_TRX_2_SLOT_3_LOCKED, EC_RM_TRX_2_SLOT_4_LOCKED,
+ EC_RM_TRX_2_SLOT_5_LOCKED, EC_RM_TRX_2_SLOT_6_LOCKED,
+ EC_RM_TRX_2_SLOT_7_LOCKED, EC_RM_TRX_2_SLOT_8_LOCKED}
+ };
+
+const Alarm_errorCode_t
+ rm_TrxSlotAdminUnlockedAlarmCode[OAMrm_MAX_TRXS][OAMrm_SLOTS_PER_TRX]
+ = {
+ {EC_RM_TRX_1_SLOT_1_UNLOCKED, EC_RM_TRX_1_SLOT_2_UNLOCKED,
+ EC_RM_TRX_1_SLOT_3_UNLOCKED, EC_RM_TRX_1_SLOT_4_UNLOCKED,
+ EC_RM_TRX_1_SLOT_5_UNLOCKED, EC_RM_TRX_1_SLOT_6_UNLOCKED,
+ EC_RM_TRX_1_SLOT_7_UNLOCKED, EC_RM_TRX_1_SLOT_8_UNLOCKED},
+
+ {EC_RM_TRX_2_SLOT_1_UNLOCKED, EC_RM_TRX_2_SLOT_2_UNLOCKED,
+ EC_RM_TRX_2_SLOT_3_UNLOCKED, EC_RM_TRX_2_SLOT_4_UNLOCKED,
+ EC_RM_TRX_2_SLOT_5_UNLOCKED, EC_RM_TRX_2_SLOT_6_UNLOCKED,
+ EC_RM_TRX_2_SLOT_7_UNLOCKED, EC_RM_TRX_2_SLOT_8_UNLOCKED}
+ };
+
+const Alarm_errorCode_t
+ rm_TrxSlotAdminShuttingDownAlarmCode[OAMrm_MAX_TRXS][OAMrm_SLOTS_PER_TRX]
+ = {
+ {EC_RM_TRX_1_SLOT_1_SHUTTINGDOWN, EC_RM_TRX_1_SLOT_2_SHUTTINGDOWN,
+ EC_RM_TRX_1_SLOT_3_SHUTTINGDOWN, EC_RM_TRX_1_SLOT_4_SHUTTINGDOWN,
+ EC_RM_TRX_1_SLOT_5_SHUTTINGDOWN, EC_RM_TRX_1_SLOT_6_SHUTTINGDOWN,
+ EC_RM_TRX_1_SLOT_7_SHUTTINGDOWN, EC_RM_TRX_1_SLOT_8_SHUTTINGDOWN},
+
+ {EC_RM_TRX_2_SLOT_1_SHUTTINGDOWN, EC_RM_TRX_2_SLOT_2_SHUTTINGDOWN,
+ EC_RM_TRX_2_SLOT_3_SHUTTINGDOWN, EC_RM_TRX_2_SLOT_4_SHUTTINGDOWN,
+ EC_RM_TRX_2_SLOT_5_SHUTTINGDOWN, EC_RM_TRX_2_SLOT_6_SHUTTINGDOWN,
+ EC_RM_TRX_2_SLOT_7_SHUTTINGDOWN, EC_RM_TRX_2_SLOT_8_SHUTTINGDOWN}
+ };
+
+//GP2
+#if 0
+void rm_OamProcTrapRadioCarrierPackage(u8 rcno, MibTag tag)
+{
+ // Monitoring function entrance
+ RDEBUG__(("ENTER-rm_OamProcTrapRadioCarrierPackage\n"));
+
+ // Read out OAM data
+ if (rcno == 0)
+ {
+ rm_OamGetBtsFirstRadioCarrierPackage();
+
+ } else {
+ rm_OamGetBtsSecondRadioCarrierPackage();
+ }
+
+ switch (tag)
+ {
+ case MIBT_carrierFrequency_0:
+ case MIBT_carrierFrequency_1:
+ if (OAMrm_BTS_OPSTATE==opStateEnabled)
+ {
+ //Tune to new freqs
+ //PR1074
+ if (OAMrm_BTS_AMSTATE != locked && OAMrm_TRX_AMSTATE(0) != locked &&
+ OAMrm_CHN_AMSTATE(0,0) != locked)
+ {
+ rm_SendTuneSynthToTrx(0,1);
+ if (OAMrm_TRX_AMSTATE(1)!= locked)
+ rm_SendTuneSynthToTrx(1,1);
+ }
+ }
+ break;
+ case MIB_txPwrMaxReduction_0:
+ if (OAMrm_TRX_RC(0) == rcno)
+ {
+ rm_OamSendPwrRedStepToDsp(0);
+ } else {
+ rm_OamSendPwrRedStepToDsp(1);
+ }
+ break;
+ case MIB_txPwrMaxReduction_1:
+ if (OAMrm_TRX_RC(0) == rcno)
+ {
+ rm_OamSendPwrRedStepToDsp(0);
+ } else {
+ rm_OamSendPwrRedStepToDsp(1);
+ }
+ break;
+ default:
+ // do nothing for now.
+ IDEBUG__(("No message was sent to DSP"));
+ break;
+ }
+}
+void rm_OamRegTrapVars(void)
+{
+ // Monitoring function entrance
+ RDEBUG__(("ENTER-rm_OamRegTrapVars\n"));
+
+ // Reset any trap setting to get a clean start
+ if (STATUS_OK != oam_unsetTrapByModule(MODULE_RM))
+ EDEBUG__(("ERROR-rm_OamRegTrapVars: OAM API failed @unsetTrapByModule\n"));
+
+ //GP2
+ return;
+
+ // Regsiter to trap BtsBasicPackage
+ if (STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_btsBasicPackage))
+ EDEBUG__(("ERROR-rm_OamRegTrapVars: OAM API failed @oam_setTrap/MIB_btsBasicPackage\n"));
+
+ // Register to trap BtsOptionsPackage
+ if (STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_btsOptionsPackage))
+ EDEBUG__(("ERROR-rm_OamRegTrapVars: OAM API failed @oam_setTrap/MIB_btsOptionsPackage\n"));
+
+ // Register to trap two TransceiverPackages
+ if (STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_firstTransceiverPackage))
+ EDEBUG__(("ERROR-rm_OamRegTrapVars: OAM API failed @oam_setTrap/MIB_firstTransceiverPackage\n"));
+ if (STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_secondTransceiverPackage))
+ EDEBUG__(("ERROR-rm_OamRegTrapVars: OAM API failed @oam_setTrap/MIB_secondTransceiverPackage\n"));
+
+ // Register to trap two RadioCarrierPackages
+ if (STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_firstRadioCarrierPackage))
+ EDEBUG__(("ERROR-rm_OamRegTrapVars: OAM API failed @oam_setTrap/MIB_firstRadioCarrierPackage\n"));
+ if (STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_secondRadioCarrierPackage))
+ EDEBUG__(("ERROR-rm_OamRegTrapVars: OAM API failed @oam_setTrap/MIB_secondRadioCarrierPackage\n"));
+
+ // Regsiter to trap T31xx timers
+ if (STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_t31xxPackage))
+ EDEBUG__(("ERROR-rm_OamRegTrapVars: OAM API failed @oam_setTrap/MIB_t31xxPackage\n"));
+
+ // Register to trap AdjacentCellPackage
+ if (STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_adjacentCellPackage))
+ EDEBUG__(("ERROR-rm_OamRegTrapVars: OAM API failed @oam_setTrap/MIB_adjacentCellPackage\n"));
+
+ // Register to trap HandoverControlPackage
+ if (STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_handoverControlPackage))
+ EDEBUG__(("ERROR-rm_OamRegTrapVars: OAM API failed @oam_setTrap/MIB_handoverControlPackage\n"));
+
+ if ( STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_hoAveragingAdjCellPackage)
+ || STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_hoAveragingDistPackage)
+ || STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_hoAveragingLevPackage)
+ || STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_hoAveragingQualPackage)
+ || STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_hoThresholdDistPackage)
+ || STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_hoThresholdInterfacePackage)
+ || STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_hoThresholdLevPackage)
+ || STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_hoThresholdQualPackage)
+ || STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_interferenceAveragingPackage))
+ EDEBUG__(("ERROR-rm_OamRegTrapVars: OAM API failed @oam_setTrap/Nested sturcture of handoverControlPackage\n"));
+
+ // Register to trap PowerControlPackage
+ if (STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_powerControlPackage))
+ EDEBUG__(("ERROR-rm_OamRegTrapVars: OAM API failed @oam_setTrap/MIB_powerControlPackage\n"));
+
+ if ( STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_pcAveragingLevPackage)
+ || STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_pcAveragingQualPackage)
+ || STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_pcLowerThresholdLevPackage)
+ || STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_pcLowerThresholdQualPackage)
+ || STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_pcUpperThresholdLevPackage)
+ || STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_pcUpperThresholdQualPackage))
+ EDEBUG__(("ERROR-rm_OamRegTrapVars: OAM API failed @oam_setTrap/Nested sturcture of Power Control Package\n"));
+
+
+
+ // Register to trap ResourceConfigData
+ if (STATUS_OK != oam_setTrap(MODULE_RM, rm_MsgQId, MIB_resourceConfigData))
+ EDEBUG__(("ERROR-rm_OamRegTrapVars: OAM API failed @oam_setTrap/MIB_resourceConfigData\n"));
+}
+
+void rm_OamGetTrapVars(void)
+{
+ // Monitoring function entrance
+ RDEBUG__(("ENTER-rm_OamGetTrapVars\n"));
+
+ //Process in terms of message type
+ switch ( rm_pItcRxOamMsg->msgType )
+ {
+ case MT_TRAP:
+ //Got a trap notification
+ switch (MIB_TBL(rm_pItcRxOamMsg->mibTag))
+ {
+ case MTBL_btsBasicPackage: //0
+ rm_OamProcTrapBtsBasicPackage();
+ break;
+ case MTBL_btsOptionsPackage: //1
+ rm_OamProcTrapBtsOptionsPackage();
+ break;
+ case MTBL_firstTransceiverPackage: //2
+ rm_OamProcTrapTransceiverPackage(0);
+ break;
+ case MTBL_secondTransceiverPackage: //3
+ rm_OamProcTrapTransceiverPackage(1);
+ break;
+ case MTBL_firstRadioCarrierPackage: //4
+ rm_OamProcTrapRadioCarrierPackage(0, rm_pItcRxOamMsg->mibTag);
+ break;
+ case MTBL_secondRadioCarrierPackage: //5
+ rm_OamProcTrapRadioCarrierPackage(1, rm_pItcRxOamMsg->mibTag);
+ break;
+ case MTBL_t31xx: //8
+ rm_OamProcTrapT31xx();
+ break;
+ case MTBL_adjacentCellPackage: //9
+ rm_OamProcAdjacentCellPackage();
+ break;
+ case MTBL_handoverControlPackage: //11
+ case MTBL_hoAveragingAdjCellParam: //12
+ case MTBL_hoAveragingDistParam: //13
+ case MTBL_hoAveragingLevParam: //14
+ case MTBL_hoAveragingQualParam: //15
+ case MTBL_hoThresholdDistParam: //16
+ case MTBL_hoThresholdInterfaceParam: //17
+ case MTBL_hoThresholdLevParam: //18
+ case MTBL_hoThresholdQualParam: //19
+ case MTBL_interferenceAveragingParam: //20
+ rm_OamProcHandoverControlPackage();
+ break;
+ case MTBL_powerControlPackage: //21
+ case MTBL_pcAveragingLev: //22
+ case MTBL_pcAveragingQual: //23
+ case MTBL_pcLowerThresholdLevParam: //24
+ case MTBL_pcLowerThresholdQualParam: //25
+ case MTBL_pcUpperThresholdLevParam: //26
+ case MTBL_pcUpperThresholdQualParam: //27
+ rm_OamProcPowerControlPackage();
+ break;
+ case MTBL_resourceConfigData: //32
+ rm_OamProcResourceConfigData();
+ break;
+ default: //??
+ //Received unrecognized message type
+ EDEBUG__(( "ERROR-rm_OamGetTrapVars: unexpected OAM table:%d\n",
+ MIB_TBL(rm_pItcRxOamMsg->mibTag) ));
+ break;
+ }
+ break;
+
+ default:
+ //Received unrecognized message type
+ EDEBUG__(( "ERROR-rm_OamGetTrapVars: unexpected OAM msg type:%d\n",
+ rm_pItcRxOamMsg->msgType ));
+ break;
+ }
+}
+
+void rm_OamProcTrapBtsBasicPackage(void)
+{
+ u8 i,j;
+ EnableDisable opState;
+
+ opState = OAMrm_BTS_OPSTATE;
+
+ //Monitoring function entrance
+ RDEBUG__(("ENTER-rm_OamProcTrapBtsBasicPackage\n"));
+
+ // Retrieve BtsBasicPackage
+ if ( STATUS_OK != rm_OamGetBtsBasicPackage() )
+ {
+ //Received unrecognized message tag
+ EDEBUG__(( "ERROR-rm_OamProcTrapBtsBasicPackage:failed@rm_OamGetBtsBasicPackage()\n"));
+ return;
+ }
+
+ //Check if BTS operational state is changed or not
+ if (rm_pItcRxOamMsg->mibTag==MIB_bts_operationalState)
+ {
+ rm_ProcBtsOpStateChange();
+ return;
+ }
+
+ //Check if got BTS administrative state changed notifica
+ if (rm_pItcRxOamMsg->mibTag==MIB_bts_administrativeState)
+ {
+ rm_ProcBtsAdminStateChange();
+ return;
+ }
+
+ //Blindly update trx-es
+ i = 0;
+ while (i<OAMrm_MAX_TRXS)
+ {
+ if (rm_TrxMgmt[i].state==RM_TRXMGMT_S3_TRXCONFIG_END)
+ { //trx i is operating right now and update it!
+ rm_SendSacchFillingSI5(i, RM_L1SYSINFO_TYPE_5);
+ rm_SendSacchFillingSI6(i, RM_L1SYSINFO_TYPE_6);
+ rm_SendTrxConfigToTrx(i);
+
+ //PR1039
+ rm_SendBtsPackageToTrx(i);
+ if (i==0) //Assume bcch trx, pass SI
+ {
+ if (OAMrm_OVERLOAD_CELLBAR && rm_VcIsBarred)
+ {
+ rm_SendSystemInfo3ToBcchTrx(0,3,CNI_RIL3_CELL_BARRED_ACCESS);
+ rm_SendSystemInfo4ToBcchTrx(0,4,CNI_RIL3_CELL_BARRED_ACCESS);
+ rm_SendSystemInfo2ToBcchTrx(0,2,CNI_RIL3_CELL_BARRED_ACCESS);
+ } else
+ {
+ rm_VcIsBarred = RM_FALSE;
+ rm_SendAllSystemInfosToBcchTrx(i);
+ }
+ }
+ }
+ i++;
+ }
+
+ return;
+
+#if 0
+ switch (rm_pItcRxOamMsg->mibTag)
+ {
+ case MIB_bts_ncc:
+ case MIB_bts_cid:
+ case MIB_btsID:
+ case MIB_cellAllocationTable:
+ case MIBT_cellAllocationEntry:
+ case MIBT_cellAllocationIndex:
+ case MIBT_cellAllocation:
+ case MIB_gsmdcsIndicator:
+ case MIB_bts_mcc:
+ case MIB_bts_mnc:
+ case MIB_bts_lac:
+ case MIB_bts_ci:
+ case MIB_cellReselectHysteresis:
+ case MIB_ny1:
+ case MIB_plmnPermittedTable:
+ case MIBT_plmnPermittedEntry:
+ case MIBT_plmnPermittedIndex:
+ case MIBT_plmnPermitted:
+ case MIB_radioLinkTimeout:
+ case MIB_relatedTranscoder:
+ case MIB_rxLevAccessMin:
+ case MIB_bts_administrativeState:
+ case MIB_bts_alarmStatus:
+ case MIB_bts_operationalState:
+ case MIB_maxNumberRetransmissions:
+ case MIB_mSTxPwrMaxCCH:
+ case MIB_numberOfSlotsSpreadTrans:
+ case MIB_noOfBlocksForAccessGrant:
+ case MIB_noOfMultiframesBetweenPaging:
+ default:
+ //Received unrecognized message tag
+ EDEBUG__(("ERROR-rm_OamProcTrapBtsBasicPackage: unexpected OAM mib tag:%x\n",
+ rm_pItcRxOamMsg->mibTag));
+ break;
+ }
+#endif
+
+}
+
+
+void rm_OamProcTrapBtsOptionsPackage(void)
+{
+ u8 i;
+
+ // Monitoring function entrance
+ RDEBUG__(("ENTER-rm_OamProcTrapBtsOptionsPackage\n"));
+
+ // Retrieve OamGetBtsOptionPackage
+ if ( STATUS_OK != rm_OamGetBtsOptionPackage() )
+ {
+ // Received unrecognized message tag
+ EDEBUG__(( "ERROR-rm_OamProcTrapBtsOptionsPackage: failed@rm_OamGetBtsOptionPackage()\n"));
+ return;
+ }
+
+ // Update each trx here
+ i = 0;
+ while (i<OAMrm_MAX_TRXS)
+ {
+ if (rm_TrxMgmt[i].state==RM_TRXMGMT_S3_TRXCONFIG_END)
+ { //trx i is operating right now and update it!
+ rm_SendSacchFillingSI5(i, RM_L1SYSINFO_TYPE_5);
+ rm_SendSacchFillingSI6(i, RM_L1SYSINFO_TYPE_6);
+ //rm_SendTrxConfigToTrx(i);
+
+ //PR1381
+ rm_SendBtsPackageToTrx(i);
+
+ if (i==0) //Assume bcch trx, pass SI
+ {
+ if (OAMrm_OVERLOAD_CELLBAR && rm_VcIsBarred)
+ {
+ rm_SendSystemInfo3ToBcchTrx(0,3,CNI_RIL3_CELL_BARRED_ACCESS);
+ rm_SendSystemInfo4ToBcchTrx(0,4,CNI_RIL3_CELL_BARRED_ACCESS);
+ rm_SendSystemInfo2ToBcchTrx(0,2,CNI_RIL3_CELL_BARRED_ACCESS);
+ } else
+ {
+ rm_VcIsBarred = RM_FALSE;
+ rm_SendAllSystemInfosToBcchTrx(i);
+ }
+ }
+ }
+ i++;
+ }
+
+ return;
+
+#if 0
+ switch (rm_pItcRxOamMsg->mibTag)
+ {
+ case MIB_allowIMSIAttachDetach:
+ case MIB_callReestablishmentAllowed:
+ case MIB_cellBarred:
+ case MIB_dtxDownlink:
+ case MIB_dtxUplink:
+ case MIB_emergencyCallRestricted:
+ case MIB_notAllowedAccessClassTable:
+ case MIBT_notAllowedAccessClassEntry:
+ case MIBT_notAllowedAccessClassIndex:
+ case MIBT_notAllowedAccessClass:
+ case MIB_timerPeriodicUpdateMS:
+ case MIB_maxQueueLength:
+ case MIB_msPriorityUsedInQueueing:
+ case MIB_timeLimitCall:
+ case MIB_timeLimitHandover:
+ default:
+ // Received unrecognized message tag
+ EDEBUG__(( "ERROR-rm_OamProcTrapBtsOptionsPackage: unexpected OAM mib tag:%x\n",
+ rm_pItcRxOamMsg->mibTag ));
+ break;
+ }
+
+#endif
+
+}
+
+void rm_OamProcTrapT31xx(void)
+{
+ u8 i;
+
+ // Monitoring function entrance
+ RDEBUG__(("ENTER-rm_OamProcTrapT31xx\n"));
+
+ if ( STATUS_OK != rm_OamGetT31xxTimerStructure() )
+ {
+ // Received unrecognized message tag
+ EDEBUG__(( "ERROR-rm_OamProcTrapT31xx: failed@rm_OamGetT31xxTimerStructure()\n"));
+ return;
+ }
+ /* PR1256 <convert from tick number to 10ms > begin*/
+ int tickNumPerSec = sysClkRateGet ();
+
+ rm_OamData.t31xx.t3101 = ( rm_OamData.t31xx.t3101 * 10 ) / tickNumPerSec ;
+
+ rm_OamData.t31xx.t3105 = ( rm_OamData.t31xx.t3105 * 10 ) / tickNumPerSec ;
+
+ rm_OamData.t31xx.t3109 = ( rm_OamData.t31xx.t3109 * 10 ) / tickNumPerSec ;
+
+ rm_OamData.t31xx.t3111 = ( rm_OamData.t31xx.t3111 * 10 ) / tickNumPerSec ;
+
+ rm_TestPrintOamRmStdGsmData();
+ /* PR1256 <convert from tick number to 10ms > end*/
+
+ // Update timer values accordingly
+ for (i=0;i<OAMrm_MAX_TCHFS;i++)
+ {
+ rm_PhyChanTchf[i].T3101.time = OAMrm_T3101;
+ rm_PhyChanTchf[i].T3105.time = OAMrm_T3105;
+ rm_PhyChanTchf[i].T3109.time = OAMrm_T3109;
+ rm_PhyChanTchf[i].T3111.time = OAMrm_T3111;
+ }
+ for (i=0;i<OAMrm_MAX_SDCCH4S;i++)
+ {
+ rm_PhyChanSdcch4[i].T3101.time = OAMrm_T3101;
+ rm_PhyChanSdcch4[i].T3105.time = OAMrm_T3105;
+ rm_PhyChanSdcch4[i].T3109.time = OAMrm_T3109;
+ rm_PhyChanSdcch4[i].T3111.time = OAMrm_T3111;
+ }
+
+}
+
+void rm_OamProcAdjacentCellPackage(void)
+{
+ u8 i,j,ncellNo;
+
+ // Monitoring function entrance
+ RDEBUG__(("ENTER-rm_OamProcAdjacentCellPackage\n"));
+
+ // Read out OAM data
+ if ( STATUS_OK != rm_adjacentCellPackage() )
+ {
+ // Received unrecognized message tag
+ EDEBUG__(( "ERROR-rm_OamProcAdjacentCellPackage: failed@rm_adjacentCellPackage()\n"));
+ return;
+ }
+
+ switch(MIB_ITM(rm_pItcRxOamMsg->mibTag))
+ {
+ case LEAF_adjCell_reselectionTable:
+ if (rm_TrxMgmt[0].state==RM_TRXMGMT_S3_TRXCONFIG_END)
+ {
+ //Assume trx 0 is bcch trx here
+ if (OAMrm_OVERLOAD_CELLBAR && rm_VcIsBarred)
+ {
+ rm_SendSystemInfo2ToBcchTrx(0,2,CNI_RIL3_CELL_BARRED_ACCESS);
+ } else
+ {
+ rm_VcIsBarred = RM_FALSE;
+ rm_SendSystemInfo2ToBcchTrx(0,RM_L1SYSINFO_TYPE_2,OAMrm_RA_CELL_BARRED_STATE);
+ }
+ }
+ break;
+ case LEAF_adjCell_handoverTable:
+ i = 0;
+ while ( i<OAMrm_MAX_TRXS )
+ {
+ // Pass updated information to both mobile and DSP
+ if (rm_TrxMgmt[i].state==RM_TRXMGMT_S3_TRXCONFIG_END)
+ {
+ rm_SendSacchFillingSI5(i, RM_L1SYSINFO_TYPE_5);
+ ncellNo=rm_OamGetTotalAvailableHoNCells();
+ for (j=0;j<OAMrm_HO_ADJCELL_NO_MAX;j++)
+ rm_OamSendHoNCellToDsp(i,j,ncellNo);
+ }
+ i++;
+ }
+ break;
+ default:
+ // Received unrecognized message tag
+ EDEBUG__(( "ERROR-rm_OamProcAdjacentCellPackage: unexpected OAM mib Table tag:%x\n",
+ MIB_ITM(rm_pItcRxOamMsg->mibTag) ));
+ break;
+
+ }
+}
+
+void rm_OamProcHandoverControlPackage(void)
+{
+ int i;
+
+ // Monitoring function entrance
+ RDEBUG__(("ENTER-rm_OamProcHandoverControlPackage\n"));
+
+ // Read out OAM data
+ if ( STATUS_OK != rm_handoverControlPackage() )
+ {
+ // Received unrecognized message tag
+ EDEBUG__(( "ERROR-rm_OamProcHandoverControlPackage: failed@rm_handoverControlPackage()\n"));
+ return;
+ }
+
+ // Update DSP with new HandoverControlPackage
+ i = 0;
+ while ( i<OAMrm_MAX_TRXS )
+ {
+ // Pass updated information to both mobile and DSP
+ if (rm_TrxMgmt[i].state==RM_TRXMGMT_S3_TRXCONFIG_END)
+ rm_OamSendHoSCellToDsp(i);
+ i++;
+ }
+}
+
+void rm_OamProcPowerControlPackage(void)
+{
+ int i;
+
+ // Monitoring function entrance
+ RDEBUG__(("ENTER-rm_OamProcPowerControlPackage\n"));
+
+ // Read out OAM data
+ if ( STATUS_OK != rm_powerControlPackage() )
+ {
+ // Received unrecognized message tag
+ EDEBUG__(( "ERROR-rm_OamProcPowerControlPackage: failed@rm_powerControlPackage()\n"));
+ return;
+ }
+
+ // Update DSP with new power control package
+ i = 0;
+ while ( i<OAMrm_MAX_TRXS )
+ {
+ // Pass updated information to both mobile and DSP
+ if (rm_TrxMgmt[i].state==RM_TRXMGMT_S3_TRXCONFIG_END)
+ rm_OamSendPcToDsp(i);
+ i++;
+ }
+}
+
+void rm_OamProcResourceConfigData(void)
+{
+ int i;
+ int opState;
+
+ // Monitoring function entrance
+ RDEBUG__(("ENTER-rm_OamProcResourceConfigData\n"));
+
+ opState = OAMrm_CBCH_OPSTATE;
+
+ // Read out OAM data
+ rm_OamGetRmConfigData();
+
+ switch (rm_pItcRxOamMsg->mibTag)
+ {
+ case MIB_rm_nim_0_1:
+ //OAMrm_CBCH_OPSTATE=rm_pItcRxOamMsg->val.varVal;
+ switch(OAMrm_CBCH_OPSTATE)
+ {
+ case 0: //Disable CBCH channel
+ if (!rm_ChanCbchActive)
+ PDEBUG__(("INFO@rm_OamProcResourceConfigData: rel CBCH but it's not ON\n"));
+ rm_ChanCbchActive = RM_FALSE;
+ rm_SendRfChanRelease(rm_pCbchChan);
+ if (OAMrm_OVERLOAD_CELLBAR && rm_VcIsBarred)
+ {
+ rm_SendSystemInfo4ToBcchTrx(0, RM_L1SYSINFO_TYPE_4,CNI_RIL3_CELL_BARRED_ACCESS);
+ } else
+ {
+ rm_VcIsBarred = RM_FALSE;
+ rm_SendSystemInfo4ToBcchTrx(0, RM_L1SYSINFO_TYPE_4,OAMrm_RA_CELL_BARRED_STATE);
+ }
+ break;
+ case 1: //Enable CBCH Channel
+ if (rm_ChanCbchActive)
+ PDEBUG__(("INFO@rm_OamProcResourceConfigData: turn on a already on cbch\n"));
+ if (rm_pCbchChan->usable == RM_PHYCHAN_UNUSABLE)
+ {
+ IDEBUG__(("WARNIG@rm_OamProcResourceConfigData: SDCCH(2) unusable: st=%d\n",
+ rm_pCbchChan->usable));
+ return;
+ }
+
+ //block any SDCCH attempt also activate CBCH
+ rm_ChanCbchActive = RM_FALSE;
+ rm_pCbchChan->usable = RM_PHYCHAN_USABLE;
+ if (rm_pCbchChan->state == RM_PHYCHAN_FREE)
+ {
+ rm_pCbchChan->usable = RM_PHYCHAN_CBCH_USABLE;
+ if ( rm_pCbchChan->pMSmCtxt->state != RM_S1RM_RUNNING ||
+ rm_pCbchChan->pASmCtxt->state != RM_S1RM_RUNNING)
+ {
+ IDEBUG__(("WARNING@rm_OamProcResourceConfigData:invalid chan state(%d,%d,%d)\n",
+ rm_pCbchChan,rm_pCbchChan->pMSmCtxt->state,
+ rm_pCbchChan->pASmCtxt->state));
+ rm_pCbchChan->pMSmCtxt->state = RM_S1RM_RUNNING;
+ rm_pCbchChan->pASmCtxt->state = RM_S1RM_RUNNING;
+ }
+ rm_ActivateCbchChan();
+ }
+ break;
+ default:
+ IDEBUG__(("WARNING@rm_OamProcResourceConfigData: invalid cbchOpState=%d\n",
+ OAMrm_CBCH_OPSTATE));
+ OAMrm_CBCH_OPSTATE = opState;
+ break;
+ }
+ break;
+
+ case MIB_rm_nim_0_3:
+ case MIB_rm_nim_0_4:
+ case MIB_rm_nim_0_5:
+ case MIB_rm_nim_0_6:
+ if (OAMrm_OVERLOAD_CELLBAR && rm_VcIsBarred)
+ {
+ rm_SendSystemInfo3ToBcchTrx(0,3,CNI_RIL3_CELL_BARRED_ACCESS);
+ rm_SendSystemInfo4ToBcchTrx(0,4,CNI_RIL3_CELL_BARRED_ACCESS);
+ } else
+ {
+ rm_VcIsBarred = RM_FALSE;
+ rm_SendSystemInfo3ToBcchTrx(0,3,OAMrm_RA_CELL_BARRED_STATE);
+ rm_SendSystemInfo4ToBcchTrx(0,4,OAMrm_RA_CELL_BARRED_STATE);
+ }
+ break;
+
+ //case MIB_rm_nim_0_7: auth/cipher feature control
+ case MIB_rm_nim_1_1:
+ rm_VcIsBarred = RM_FALSE;
+ rm_SendSystemInfo2ToBcchTrx(0,2,OAMrm_RA_CELL_BARRED_STATE);
+ rm_SendSystemInfo3ToBcchTrx(0,3,OAMrm_RA_CELL_BARRED_STATE);
+ rm_SendSystemInfo4ToBcchTrx(0,4,OAMrm_RA_CELL_BARRED_STATE);
+ break;
+
+ default:
+ IDEBUG__(("WARNING@rm_OamProcResourceConfigData: invalid MIB var change occuring=%d\n",
+ rm_pItcRxOamMsg->mibTag));
+ break;
+ }
+
+ return;
+
+#if 0
+ //Update the system accordingly
+ switch(rm_pItcRxOamMsg->mibTag)
+ {
+ case MIB_rm_SGainCtrlSetting_0_0:
+ case MIB_rm_SGainCtrlSetting_0_1:
+ case MIB_rm_SGainCtrlSetting_1_0:
+ case MIB_rm_SGainCtrlSetting_1_1:
+ i = 0;
+ while ( i<OAMrm_MAX_TRXS )
+ {
+ // Pass updated information to both mobile and DSP
+ if (rm_TrxMgmt[i].state==RM_TRXMGMT_S3_TRXCONFIG_END)
+ {
+ rm_SendSetDGainToTrx(i);
+ rm_SendSetUGainToTrx(i);
+ }
+ i++;
+ }
+ break;
+ default:
+ break;
+ }
+
+#endif
+
+}
+
+void rm_OamProcTrapTransceiverPackage(u8 trx)
+{
+ u8 i,inUse;
+
+ // Monitoring function entrance
+ RDEBUG__(("ENTER@rm_OamProcTrapTransceiverPackage\n"));
+ PDEBUG__(("INFO@rm_OamProcTrapTransceiverPackage: trap notif for trx=%d\n", trx));
+
+ // Read the whole Transceiver package if any of them changed
+ if (trx == 0)
+ {
+ if (STATUS_OK != rm_OamGetBtsFirstTrxPackage() )
+ EDEBUG__(("ERROR@rm_OamProcTrapTransceiverPackage: error in reading trx0 data\n"));
+ }
+ else
+ {
+ if (STATUS_OK != rm_OamGetBtsSecondTrxPackage() )
+ EDEBUG__(("ERROR@rm_OamProcTrapTransceiverPackage: error in reading trx1 data\n"));
+ }
+
+ switch(rm_pItcRxOamMsg->mibTag)
+ {
+ case MIB_basebandAdministrativeState_0:
+ //Got TRX0 adminState change notification
+ switch(rm_pItcRxOamMsg->val.varVal)
+ {
+ case locked:
+ //Treat this as BTS amState locked
+ rm_SetBtsAdminState(locked);
+ rm_ProcBtsAdminStateLocked();
+ break;
+
+ case unlocked:
+ //Only unlock trx0
+ rm_SetBtsAdminState(unlocked);
+ rm_ProcBtsAdminStateUnlocked();
+ //rm_ProcTrxAdminStateUnlocked(0);
+ break;
+
+ case shuttingDown:
+ //Treat this as BTS amState shuttingdown
+ rm_SetBtsAdminState(shuttingDown);
+ rm_ProcBtsAdminStateShuttingDown();
+ break;
+
+ default:
+ IDEBUG__(("WARNING@rm_OamProcTrapTransceiverPackage:trx0,invalid amStateValue:%d\n",
+ rm_pItcRxOamMsg->val.varVal));
+ break;
+ }
+ break;
+
+ case MIB_basebandAdministrativeState_1:
+ //Got TRX1 adminState change notification
+ switch(rm_pItcRxOamMsg->val.varVal)
+ {
+ case locked:
+ rm_ProcTrxAdminStateLocked(1);
+ break;
+ case unlocked:
+ rm_ProcTrxAdminStateUnlocked(1);
+ break;
+ case shuttingDown:
+ rm_ProcTrxAdminStateShuttingDown(1, &inUse);
+ break;
+ default:
+ IDEBUG__(("WARNING@rm_OamProcTrapTransceiverPackage:trx1,invalid amStateValue:%d\n",
+ rm_pItcRxOamMsg->val.varVal));
+ break;
+ }
+ break;
+ case MIBT_channelAdministrativeState_0:
+ //Got TRX0 TS adminState change notificat
+ switch(rm_pItcRxOamMsg->val.varTbl.value)
+ {
+ case locked:
+ if (!rm_pItcRxOamMsg->val.varTbl.idx)
+ {
+ PDEBUG__(("LOCK Physical Channel (0,0): chnIdx=%d\n",
+ rm_pItcRxOamMsg->val.varTbl.idx));
+ OAMrm_BTS_AMSTATE = locked;
+ rm_SetBtsAdminState(locked);
+ rm_ProcBtsAdminStateLocked();
+ } else
+ rm_ProcTrxSlotAdminStateLocked(0, rm_pItcRxOamMsg->val.varTbl.idx);
+ break;
+ case unlocked:
+ if (!rm_pItcRxOamMsg->val.varTbl.idx)
+ {
+ PDEBUG__(("UNLOCK Physical Channel (0,0)\n",
+ rm_pItcRxOamMsg->val.varTbl.idx));
+ OAMrm_BTS_AMSTATE = unlocked;
+ rm_SetBtsAdminState(unlocked);
+ rm_ProcBtsAdminStateUnlocked();
+ } else
+ rm_ProcTrxSlotAdminStateUnlocked(0, rm_pItcRxOamMsg->val.varTbl.idx);
+ break;
+ case shuttingDown:
+ if (!rm_pItcRxOamMsg->val.varTbl.idx)
+ {
+ PDEBUG__(("SHUTTING DOWN Physical Channel (0,0)\n",
+ rm_pItcRxOamMsg->val.varTbl.idx));
+ OAMrm_BTS_AMSTATE = shuttingDown;
+ rm_SetBtsAdminState(shuttingDown);
+ rm_ProcBtsAdminStateShuttingDown();
+ } else
+ rm_ProcTrxSlotAdminStateShuttingDown(0, rm_pItcRxOamMsg->val.varTbl.idx,&inUse);
+ break;
+ default:
+ IDEBUG__(("WARNING@rm_OamProcTrapTransceiverPackage:(0,%d),invalid amStateValue:%d\n",
+ rm_pItcRxOamMsg->val.varTbl.idx,rm_pItcRxOamMsg->val.varTbl.value));
+ break;
+
+ }
+ break;
+
+ case MIBT_channelAdministrativeState_1:
+ //Got TRX0 TS adminState change notification
+ switch(rm_pItcRxOamMsg->val.varTbl.value)
+ {
+ case locked:
+ rm_ProcTrxSlotAdminStateLocked(1, rm_pItcRxOamMsg->val.varTbl.idx);
+ break;
+ case unlocked:
+ rm_ProcTrxSlotAdminStateUnlocked(1, rm_pItcRxOamMsg->val.varTbl.idx);
+ break;
+ case shuttingDown:
+ rm_ProcTrxSlotAdminStateShuttingDown(1, rm_pItcRxOamMsg->val.varTbl.idx,&inUse);
+ break;
+ default:
+ IDEBUG__(("WARNING@rm_OamProcTrapTransceiverPackage:(1,%d),invalid amStateValue:%d\n",
+ rm_pItcRxOamMsg->val.varTbl.idx,rm_pItcRxOamMsg->val.varTbl.value));
+ break;
+
+ }
+ break;
+
+ default:
+ //Handle other trapped notification here
+ break;
+ }
+}
+
+void rm_ProcBtsOpStateChange(void)
+{
+ int i;
+
+ PDEBUG__(("INFO@rm_ProcBtsOpStateChange:opState=%d\n",
+ rm_pItcRxOamMsg->val.varVal));
+
+ switch(rm_pItcRxOamMsg->val.varVal)
+ {
+ case opStateEnabled:
+ //Turn on RF transmission if needed
+ if ( OAMrm_BTS_AMSTATE == locked ||
+ OAMrm_TRX_AMSTATE(0) == locked ||
+ OAMrm_CHN_AMSTATE(0,0) == locked )
+ break;
+
+ for (i=0;i<OAMrm_MAX_TRXS;i++)
+ {
+ //PR1074
+ if ( ((OAMrm_TRX_ONOFF_MAP)&(1<<i)) &&
+ (OAMrm_TRX_AMSTATE(i) != locked) )
+ rm_SendTuneSynthToTrx(i,1);
+ }
+ break;
+
+ case opStateDisabled:
+ //Turn off RF transmission
+ for (i=0;i<OAMrm_MAX_TRXS;i++)
+ {
+ if ( (OAMrm_TRX_ONOFF_MAP)&(1<<i) )
+ rm_SendTuneSynthToTrx(i,0);
+ }
+ break;
+ default:
+ EDEBUG__(("ERROR@rm_ProcBtsOpStateChange:invalid opStateValue:%d\n",
+ rm_pItcRxOamMsg->val.varVal));
+ //Block RM itself in this case <TBD>
+ OAMrm_BTS_OPSTATE = opStateDisabled;
+ break;
+ }
+}
+
+void rm_ProcBtsAdminStateChange(void)
+{
+ PDEBUG__(("INFO@rm_ProcBtsAdminStateChange\n"));
+
+ //In terms of amState change notif
+ switch(rm_pItcRxOamMsg->val.varVal)
+ {
+ case locked:
+ rm_ProcBtsAdminStateLocked();
+ break;
+
+ case unlocked:
+ rm_ProcBtsAdminStateUnlocked();
+ break;
+
+ case shuttingDown:
+ rm_ProcBtsAdminStateShuttingDown();
+ break;
+
+ default:
+ IDEBUG__(("WARNING@rm_ProcBtsAdminStateChange:invalid amState:%d\n",
+ rm_pItcRxOamMsg->val.varVal));
+ break;
+ }
+}
+
+void rm_ProcBtsAdminStateLocked(void)
+{
+ u8 i;
+
+ PDEBUG__(("INFO@rm_ProcBtsAdminStateLocked()\n"));
+
+ //Report informational alarm
+ rm_SetRmOpState(EC_RM_BTS_LOCKED);
+
+ //Lock all TRXes in existence
+ for (i=0; i<OAMrm_MAX_TRXS; i++ )
+ {
+ //Check if ith TRX is existent
+ if ( (OAMrm_TRX_ONOFF_MAP)&(1<<i) )
+ {
+ rm_SetTrxAdminState(i,locked);
+ rm_ProcTrxAdminStateLocked(i);
+ }
+ }
+}
+
+void rm_ProcTrxAdminStateLocked(u8 trx)
+{
+ u8 i;
+
+ PDEBUG__(("INFO@rm_ProcTrxAdminStateLocked: trx=%d\n", trx));
+
+ //Check if the requested trx existent
+ if ( !( (OAMrm_TRX_ONOFF_MAP)&(1<<trx) ) || (trx>=OAMrm_MAX_TRXS) )
+ {
+ IDEBUG__(("WARNING@rm_ProcTrxAdminStateLocked: invalid trx=%d\n",trx));
+ return;
+ }
+
+ //Report informational alarm
+ rm_SetRmOpState(rm_TrxAdminLockedAlarmCode[trx]);
+
+ //Turn off RF transmission
+ rm_SendTuneSynthToTrx(trx,0);
+
+ //Deactivate all channels on trx
+ for (i=0;i<OAMrm_SLOTS_PER_TRX;i++)
+ {
+ rm_SetTrxSlotAdminState(trx,i,locked);
+ rm_ProcTrxSlotAdminStateLocked(trx,i);
+ }
+}
+
+void rm_ProcTrxSlotAdminStateLocked(u8 trx, u8 slot)
+{
+ PDEBUG__(("INFO@rm_ProcTrxSlotAdminStateLocked:(%d,%d)\n",trx, slot));
+
+ //Check if (trx,slot) existent
+ if ( !( (OAMrm_TRX_ONOFF_MAP)&(1<<trx) ) || (trx>=OAMrm_MAX_TRXS) ||
+ slot>=OAMrm_SLOTS_PER_TRX )
+ {
+ IDEBUG__(("WARNING@rm_ProcTrxSlotAdminStateLocked: invalid (%d,%d)\n",
+ trx,slot));
+ return;
+ }
+
+ //Report informational alarm
+ rm_SetRmOpState(rm_TrxSlotAdminLockedAlarmCode[trx][slot]);
+
+ //Lock func channels on (trx,slot)
+ rm_LockedAllTrxSlotChans(trx,slot);
+
+ //Check if no TCHF or SDCCH4 channels available
+
+ if (RM_SMCTXT_NULL == rm_PreAllocSmCtxt(RM_PHYCHAN_SDCCH4) )
+ {
+ if (!rm_AllAvailableSdcch4.allocated)
+ {
+ rm_AllAvailableSdcch4.allocated = RM_TRUE;
+ PM_CellMeasurement.allAvailableSDCCHAllocatedTime.start();
+
+ //rm_AllAvailableSdcch4.startTime = tickGet();
+ }
+ }
+
+ if (RM_SMCTXT_NULL == rm_PreAllocSmCtxt(RM_PHYCHAN_TCHF_S) )
+ {
+ if (!rm_AllAvailableTchf.allocated)
+ {
+ rm_AllAvailableTchf.allocated = RM_TRUE;
+ PM_CellMeasurement.allAvailableTCHAllocatedTime.start();
+
+ //rm_AllAvailableTchf.startTime = tickGet();
+ }
+ }
+
+ //Turn off RF transmission if need
+ if (!trx && !slot)
+ {
+ rm_SendTuneSynthToTrx(trx,0);
+ //if (rm_AmState00 != shuttingDown)
+ // rm_CellBarred = OAMrm_RA_CELL_BARRED_STATE;
+ //rm_AmState00 = locked;
+ }
+}
+
+void rm_ProcBtsAdminStateUnlocked(void)
+{
+ u8 i;
+
+ PDEBUG__(("INFO@rm_ProcBtsAdminStateUnlocked\n"));
+
+ //Report informational alarm
+ rm_SetRmOpState(EC_RM_BTS_UNLOCKED);
+
+ //Lock all TRXes in existence
+ for (i=0; i<OAMrm_MAX_TRXS; i++ )
+ {
+ //Check if ith TRX is existent
+ if ( (OAMrm_TRX_ONOFF_MAP)&(1<<i) )
+ {
+ rm_ProcTrxAdminStateUnlocked(i);
+ rm_SetTrxAdminState(i,unlocked);
+ }
+ }
+
+}
+
+void rm_ProcTrxAdminStateUnlocked(u8 trx)
+{
+ u8 i;
+
+ PDEBUG__(("INFO@rm_ProcTrxAdminStateUnlocked:trx=%d\n",trx));
+
+ //Check if the requested trx existent
+ if ( !( (OAMrm_TRX_ONOFF_MAP)&(1<<trx) ) || (trx>=OAMrm_MAX_TRXS))
+ {
+ IDEBUG__(("WARNING@rm_ProcTrxAdminStateUnlocked: invalid trx=%d\n",trx));
+ return;
+ }
+
+ //Report informational alarm
+ rm_SetRmOpState(rm_TrxAdminUnlockedAlarmCode[trx]);
+
+ //Unlock all channels on trx
+ for (i=0;i<OAMrm_SLOTS_PER_TRX;i++)
+ {
+ rm_ProcTrxSlotAdminStateUnlocked(trx,i);
+ rm_SetTrxSlotAdminState(trx,i,unlocked);
+ }
+
+ //Turn on RF transmission
+ rm_SendTuneSynthToTrx(trx,1);
+}
+
+
+void rm_ProcTrxSlotAdminStateUnlocked(u8 trx, u8 slot)
+{
+
+ PDEBUG__(("INFO@rm_ProcTrxSlotAdminStateUnlocked:(%d,%d)\n",trx,slot));
+
+ //Check if (trx,slot) existent
+ if ( !( (OAMrm_TRX_ONOFF_MAP)&(1<<trx) ) || (trx>=OAMrm_MAX_TRXS) ||
+ slot>=OAMrm_SLOTS_PER_TRX )
+ {
+ IDEBUG__(("WARNING@rm_ProcTrxSlotAdminStateUnlocked: invalid (%d,%d)\n",
+ trx,slot));
+ return;
+ }
+
+ //Report informational alarm
+ rm_SetRmOpState(rm_TrxSlotAdminUnlockedAlarmCode[trx][slot]);
+
+ //Unlock all channels under trx/slot
+ rm_UnlockedAllTrxSlotChans(trx, slot);
+
+ //Turn on RF transmission if needed
+ if (trx || slot)
+ {
+ //rm_AmState00 = unlocked;
+ //OAMrm_RA_CELL_BARRED_STATEa = (Boolean) rm_CellBarred;
+ //rm_SendSystemInfo2ToBcchTrx(0,2,OAMrm_RA_CELL_BARRED_STATE);
+ //rm_SendSystemInfo3ToBcchTrx(0,3,OAMrm_RA_CELL_BARRED_STATE);
+ //rm_SendSystemInfo4ToBcchTrx(0,4,OAMrm_RA_CELL_BARRED_STATE);
+ rm_SendTuneSynthToTrx(trx,1);
+ }
+}
+
+
+void rm_UnlockedAllTrxSlotChans(u8 trx, u8 slot)
+{
+ int i;
+
+ PDEBUG__(("INFO@rm_UnlockedAllTrxSlotChans:(%d,%d)\n",trx,slot));
+
+ //Check if (trx,slot) existent
+ if ( !( (OAMrm_TRX_ONOFF_MAP)&(1<<trx) ) || (trx>=OAMrm_MAX_TRXS) ||
+ slot>=OAMrm_SLOTS_PER_TRX )
+ {
+ IDEBUG__(("WARNING@rm_UnlockedAllTrxSlotChans: invalid (%d,%d)\n",
+ trx,slot));
+ return;
+ }
+
+ int onBar,newFreeChan;
+ onBar = 0; newFreeChan = 0;
+
+ if (trx || slot)
+ {
+ //scan through tchf table to excerise the adminState change
+ for (i=0;i<OAMrm_MAX_TCHFS;i++)
+ {
+ if (trx==rm_PhyChanTchf[i].trxNo &&
+ slot==rm_PhyChanTchf[i].slotNo)
+ {
+ if ( rm_PhyChanTchf[i].usable == RM_PHYCHAN_USABLE &&
+ rm_PhyChanTchf[i].amState != unlocked )
+ {
+ rm_NoOfUsableTchf++;
+ PM_CellMeasurement.nbrOfAvailableTCHs.setValue(rm_NoOfUsableTchf);
+ //PM_CellMeasurement.nbrOfAvailableTCHs.increment();
+ }
+
+ rm_PhyChanTchf[i].amState = unlocked;
+
+ if (rm_PhyChanTchf[i].state == RM_PHYCHAN_FREE)
+ {
+ rm_PhyChanTchf[i].state = RM_PHYCHAN_FREE;
+ rm_PhyChanTchf[i].pMSmCtxt->state = RM_S1RM_RUNNING;
+ rm_PhyChanTchf[i].pASmCtxt->state = RM_S1RM_RUNNING;
+ //onBar = 1;
+ if (rm_PhyChanTchf[i].usable == RM_PHYCHAN_USABLE)
+ {
+ onBar = 1;
+ newFreeChan = 1;
+ }
+ }
+
+ }
+ }
+
+ if (onBar)
+ {
+ rm_SendSystemInfo2ToBcchTrx(0,2,OAMrm_RA_CELL_BARRED_STATE);
+ rm_SendSystemInfo3ToBcchTrx(0,3,OAMrm_RA_CELL_BARRED_STATE);
+ rm_SendSystemInfo4ToBcchTrx(0,4,OAMrm_RA_CELL_BARRED_STATE);
+ rm_VcIsBarred = RM_FALSE;
+ }
+
+ if (newFreeChan && rm_AllAvailableTchf.allocated)
+ {
+ rm_AllAvailableTchf.allocated = RM_FALSE;
+ PM_CellMeasurement.allAvailableTCHAllocatedTime.stop();
+
+ //time = tickGet() - rm_AllAvailableTchf.startTime;
+ //PM_CellMeasurement.allAvailableTCHAllocatedTime.increment(time);
+ }
+
+ } else
+ {
+ //trx==0&&slot==0; the TS is carrying BCCH and CCCH channels
+
+ //Update PCH channel's amState
+ rm_PhyChanBCcch[RM_PCH_IDX].amState = unlocked;
+
+ //Update SDCCH4 channels' amState
+ for (i=0;i<OAMrm_MAX_SDCCH4S;i++)
+ {
+ if ( rm_PhyChanSdcch4[i].usable == RM_PHYCHAN_USABLE &&
+ rm_PhyChanSdcch4[i].amState != unlocked )
+ {
+ if (++rm_nbrOfAvailableSDCCHs>4)
+ printf("RM INFO@rm_UnlockedAllTrxSlotChans: nbrOfAvailableSDCCHs %d\n",
+ rm_nbrOfAvailableSDCCHs);
+ else
+ PM_CellMeasurement.nbrOfAvailableSDCCHs.setValue(rm_nbrOfAvailableSDCCHs);
+
+ //PM_CellMeasurement.nbrOfAvailableSDCCHs.increment();
+ }
+
+ rm_PhyChanSdcch4[i].amState = unlocked;
+
+ if (rm_PhyChanSdcch4[i].state == RM_PHYCHAN_FREE)
+ {
+ rm_PhyChanSdcch4[i].state = RM_PHYCHAN_FREE;
+ rm_PhyChanSdcch4[i].pMSmCtxt->state = RM_S1RM_RUNNING;
+ rm_PhyChanSdcch4[i].pASmCtxt->state = RM_S1RM_RUNNING;
+ if (rm_PhyChanSdcch4[i].usable == RM_PHYCHAN_USABLE)
+ newFreeChan = 1;
+ }
+ }
+
+ if (newFreeChan && rm_AllAvailableSdcch4.allocated)
+ {
+ rm_AllAvailableSdcch4.allocated = RM_FALSE;
+ PM_CellMeasurement.allAvailableSDCCHAllocatedTime.stop();
+
+ //time = tickGet() - rm_AllAvailableSdcch4.startTime;
+ //PM_CellMeasurement.allAvailableSDCCHAllocatedTime.increment(time);
+ }
+
+ }
+}
+
+void rm_ProcBtsAdminStateShuttingDown(void)
+{
+ u8 i, childInUse,t_childInUse;
+
+ PDEBUG__(("INFO@rm_ProcBtsAdminStateShuttingDown()\n"));
+
+ //report BTS is being shutted down now
+ rm_SetRmOpState(EC_RM_BTS_SHUTTINGDOWN);
+
+ //Lock all TRXes in existence
+ childInUse = 0;
+ for (i=0; i<OAMrm_MAX_TRXS; i++ )
+ {
+ //Check if ith TRX is existent
+ if ( (OAMrm_TRX_ONOFF_MAP)&(1<<i) )
+ {
+ t_childInUse = 0;
+ rm_SetTrxAdminState(i,shuttingDown);
+ rm_ProcTrxAdminStateShuttingDown(i,&t_childInUse);
+ if (t_childInUse) childInUse = 1;
+ }
+ }
+
+ //Check if all existing trxes are in locked state or not
+ if (!childInUse)
+ {
+ //BTS goes to locked state
+ rm_SetBtsAdminState(locked);
+
+ //BTS goes to locked state
+ rm_SetRmOpState(EC_RM_BTS_LOCKED);
+ }
+}
+
+void rm_ProcTrxAdminStateShuttingDown(u8 trx, u8 *inUse)
+{
+ u8 i, j, childInUse, t_childInUse;
+
+
+ PDEBUG__(("INFO@rm_ProcTrxAdminStateShuttingDown: trx=%d\n", trx));
+
+ *inUse = 0;
+
+ //Check if the requested trx existent
+ if ( !( (OAMrm_TRX_ONOFF_MAP)&(1<<trx) ) || (trx>=OAMrm_MAX_TRXS) )
+ {
+ IDEBUG__(("WARNING@rm_ProcTrxAdminStateShuttingDown: invalid trx=%d\n",
+ trx));
+ return;
+ }
+
+ //Report informational alarm
+ rm_SetRmOpState(rm_TrxAdminShuttingDownAlarmCode[trx]);
+
+ //Mark all active channels as shuttingDown
+ childInUse = 0;
+
+ for (i=0;i<OAMrm_SLOTS_PER_TRX;i++)
+ {
+ t_childInUse = 0;
+ rm_SetTrxSlotAdminState(trx,i,shuttingDown);
+ rm_ProcTrxSlotAdminStateShuttingDown(trx,i,&t_childInUse);
+ if (t_childInUse) childInUse = 1;
+ }
+
+ //If there is any active channel on this trx
+ if (childInUse)
+ {
+ *inUse = 1;
+ //if (!trx)
+ //{
+ // if (OAMrm_CHN_AMSTATE(0,0) != shuttingDown)
+ // {
+ // //Change it to shuttingDown state for consistence
+ // rm_SetTrxSlotAdminState(0,0,shuttingDown);
+ // }
+ //}
+ }else
+ {
+ //Trx goes to locked state
+ rm_SetTrxAdminState(trx, locked);
+
+ //Report informational alarm
+ rm_SetRmOpState(rm_TrxAdminLockedAlarmCode[trx]);
+
+ //Turn off RF transmission
+ rm_SendTuneSynthToTrx(trx,0);
+ }
+}
+
+
+void rm_ProcTrxSlotAdminStateShuttingDown(u8 trx, u8 slot, u8 *inUse)
+{
+ u8 childInUse;
+
+ PDEBUG__(("INFO@rm_ProcTrxSlotAdminStateShuttingDown()\n"));
+
+ *inUse = 0;
+
+ //Check if (trx,slot) existent
+ if ( !( (OAMrm_TRX_ONOFF_MAP)&(1<<trx) ) || (trx>=OAMrm_MAX_TRXS) ||
+ slot>=OAMrm_SLOTS_PER_TRX )
+ {
+ IDEBUG__(("WARNING@rm_ProcTrxSlotAdminStateShuttingDown:invalid (%d,%d)\n",
+ trx,slot));
+ return;
+ }
+
+ //Report informational alarm
+ rm_SetRmOpState(rm_TrxSlotAdminShuttingDownAlarmCode[trx][slot]);
+
+ //Mark all trx-slot channels in use as shuttingDown
+ childInUse = 0;
+ rm_ShuttingDownAllTrxSlotChans(trx, slot, &childInUse);
+
+ //Check if no TCHF or SDCCH4 channels available
+
+ if (RM_SMCTXT_NULL == rm_PreAllocSmCtxt(RM_PHYCHAN_SDCCH4) )
+ {
+ if (!rm_AllAvailableSdcch4.allocated)
+ {
+ rm_AllAvailableSdcch4.allocated = RM_TRUE;
+ PM_CellMeasurement.allAvailableSDCCHAllocatedTime.start();
+
+ //rm_AllAvailableSdcch4.startTime = tickGet();
+ }
+ }
+
+ if (RM_SMCTXT_NULL == rm_PreAllocSmCtxt(RM_PHYCHAN_TCHF_S) )
+ {
+ if (!rm_AllAvailableTchf.allocated)
+ {
+ rm_AllAvailableTchf.allocated = RM_TRUE;
+ PM_CellMeasurement.allAvailableTCHAllocatedTime.start();
+
+ //rm_AllAvailableTchf.startTime = tickGet();
+ }
+ }
+
+ if (childInUse) *inUse = 1;
+ else
+ {
+ //(trx,slot) goes to locked state
+ rm_SetTrxSlotAdminState(trx, slot,locked);
+
+ //Report informational alarm
+ rm_SetRmOpState(rm_TrxSlotAdminLockedAlarmCode[trx][slot]);
+
+ //Turn off RF transmission if needed
+ //if (!trx && !slot)
+ // rm_SendTuneSynthToTrx(trx,0);
+ }
+
+ if (!trx && !slot)
+ {
+ //Bar this cell to drive out all roaming mobiles in this cell
+ //<TBD>MIB cellBarred indicator will not reflect this barring
+ //if (*inUse)
+ // rm_AmState00 = shuttingDown;
+ //else
+ // rm_AmState00 = locked;
+ //rm_CellBarred = OAMrm_RA_CELL_BARRED_STATE; //Remember MIB val
+ //OAMrm_RA_CELL_BARRED_STATEa = (Boolean)CNI_RIL3_CELL_BARRED_ACCESS;
+ rm_SendSystemInfo2ToBcchTrx(0,2,CNI_RIL3_CELL_BARRED_ACCESS);
+ rm_SendSystemInfo3ToBcchTrx(0,3,CNI_RIL3_CELL_BARRED_ACCESS);
+ rm_SendSystemInfo4ToBcchTrx(0,4,CNI_RIL3_CELL_BARRED_ACCESS);
+ rm_VcIsBarred = RM_TRUE;
+ }
+}
+
+
+void rm_SetBtsAdminState(AdministrativeState state)
+{
+ PDEBUG__(("INFO@rm_SetBtsAdminState:state=%d\n",state));
+ OAMrm_BTS_AMSTATE = state;
+ if (STATUS_OK!=
+ oam_setMibIntVar(MODULE_RM,MIB_bts_administrativeState, state) )
+ {
+ EDEBUG__(("ERROR@rm_SetBtsAdminState: OAM setMibIntVar failed, state=%d\n",
+ state));
+ }
+}
+
+void rm_SetTrxAdminState(u8 trx, AdministrativeState state)
+{
+ MibTag tag;
+
+ PDEBUG__(("INFO@rm_SetTrxAdminState:trx=%d, state=%d\n", trx, state));
+
+ //Check if the requested trx existent
+ if ( !( (OAMrm_TRX_ONOFF_MAP)&(1<<trx) ) || (trx>=OAMrm_MAX_TRXS) )
+ {
+ IDEBUG__(("WARNING@rm_SetTrxAdminState: invalid trx=%d\n", trx));
+ return;
+ }
+
+ OAMrm_TRX_AMSTATE(trx) = state;
+ if (trx==0) tag = MIB_basebandAdministrativeState_0;
+ else tag = MIB_basebandAdministrativeState_1;
+
+ if (STATUS_OK!=oam_setMibIntVar(MODULE_RM, tag, state) )
+ {
+ EDEBUG__(("ERROR@rm_SetTrxAdminState:OAM setMibIntVar failed(%x,%d)\n",
+ trx, state));
+ }
+}
+
+void rm_SetTrxSlotAdminState(u8 trx, u8 slot, AdministrativeState state)
+{
+ MibTag tag;
+
+ PDEBUG__(("INFO@rm_SetTrxSlotAdminState:(%d,%d,%d)\n",trx, slot,state));
+
+ //Check if (trx,slot) existent
+ if ( !( (OAMrm_TRX_ONOFF_MAP)&(1<<trx) ) || (trx>=OAMrm_MAX_TRXS) ||
+ slot>=OAMrm_SLOTS_PER_TRX )
+ {
+ IDEBUG__(("WARNING@rm_SetTrxSlotAdminState: invalid (%d,%d,%d)\n",
+ trx,slot,state));
+ return;
+ }
+
+ if (trx==0) tag=MIBT_channelAdministrativeState_0;
+ else tag=MIBT_channelAdministrativeState_1;
+
+ OAMrm_CHN_AMSTATEa(trx,slot) = state;
+ if (STATUS_OK!=oam_setTblEntryField(MODULE_RM,tag,slot,state))
+ {
+ EDEBUG__(("ERROR@rm_SetTrxSlotAdminState: OAM setTblEntryField failed (%d,%d,%d)\n",
+ trx, slot, state));
+ }
+}
+
+void rm_TestPrintAmStateData(void)
+{
+ int i;
+
+ printf("OAMrm_RA_CELL_BARRED_STATE:%d,%d\n",
+ OAMrm_RA_CELL_BARRED_STATE,
+ (((T_CNI_RIL3_CELL_BARRED_ACCESS)(rm_OamData.btsOptionsPackage.cellBarred)))
+ );
+
+ printf("OAMrm_RA_CELL_BARRED_STATEa:%d,%d\n",
+ OAMrm_RA_CELL_BARRED_STATE,
+ rm_OamData.btsOptionsPackage.cellBarred
+ );
+
+ printf("OAMrm_BTS_AMSTATE(%d,%d),OAMrm_TRX0_AMSTATE(%d,%d),OAMrm_CHN00_AMSTATE(%d,%d)\n",
+ OAMrm_BTS_AMSTATE,rm_OamData.btsBasicPackage.bts_administrativeState,
+ OAMrm_TRX_AMSTATE(0),rm_OamData.transceiverPackage[0].basebandAdministrativeState,
+ OAMrm_CHN_AMSTATE(0,0), ((AdministrativeState)(((ChannelEntry*)
+ (rm_OamData.transceiverPackage[0].channelTable))[0].channelAdministrativeState))
+ );
+
+ for (i=0;i<OAMrm_MAX_TCHFS;i++)
+ {
+ printf("%dth TCH(%d,%d): phyState %d, amState %d, MSmState %d, ASmState %d\n",
+ i,
+ rm_PhyChanTchf[i].trxNo,
+ rm_PhyChanTchf[i].slotNo,
+ rm_PhyChanTchf[i].state,
+ rm_PhyChanTchf[i].amState,
+ rm_PhyChanTchf[i].pMSmCtxt->state,
+ rm_PhyChanTchf[i].pASmCtxt->state
+ );
+ }
+
+ printf("PCH(%d,%d): phyState %d, amState %d\n",
+ rm_PhyChanBCcch[RM_PCH_IDX].trxNo,
+ rm_PhyChanBCcch[RM_PCH_IDX].slotNo,
+ rm_PhyChanBCcch[RM_PCH_IDX].state,
+ rm_PhyChanBCcch[RM_PCH_IDX].amState
+ );
+
+ for (i=0;i<OAMrm_MAX_SDCCH4S;i++)
+ {
+ printf("%dth SDCCH4(%d,%d): phyState %d, amState %d, MSmState %d, ASmState %d\n",
+ i,
+ rm_PhyChanSdcch4[i].trxNo,
+ rm_PhyChanSdcch4[i].slotNo,
+ rm_PhyChanSdcch4[i].state,
+ rm_PhyChanSdcch4[i].amState,
+ rm_PhyChanSdcch4[i].pMSmCtxt->state,
+ rm_PhyChanSdcch4[i].pASmCtxt->state
+ );
+ }
+}
+
+void rm_SetTrxSlotOpState(u8 trx, u8 slot, EnableDisable state)
+{
+ MibTag tag;
+
+ PDEBUG__(("INFO@rm_SetTrxSlotOpState:(%d,%d,%d)\n",trx, slot,state));
+
+ //Check if (trx,slot) existent
+ if ( !( (OAMrm_TRX_ONOFF_MAP)&(1<<trx) ) || (trx>=OAMrm_MAX_TRXS) ||
+ slot>=OAMrm_SLOTS_PER_TRX )
+ {
+ IDEBUG__(("WARNING@rm_SetTrxSlotOpState: invalid (%d,%d,%d)\n",
+ trx,slot,state));
+ return;
+ }
+
+ if (trx==0) tag=MIBT_channelOperationalState_0;
+ else tag=MIBT_channelOperationalState_1;
+
+ OAMrm_CHN_OPSTATEa(trx,slot) = state;
+
+ if (STATUS_OK!=oam_setTblEntryField(MODULE_RM,tag,slot,state))
+ {
+ EDEBUG__(("ERROR@rm_SetTrxSlotOpState: OAM setTblEntryField failed (%d,%d,%d)\n",
+ trx, slot, state));
+ }
+}
+
+
+//GP2
+#endif //#if 0
+
+void rm_ProcGrrMsgs(void)
+{
+ PDEBUG__(("ENTER@rm_ProcGrrMsgs()....\n"));
+
+ if (!rm_ValidateGrrMsgs()) return;
+
+ switch(rm_pItcRxGrrMsg->message_type)
+ {
+ case GRR_CB_FEATURE_CONTROL:
+ rm_ProcCbSettingChange();
+ break;
+
+ case GRR_TRX_SLOT_CHANCOMB:
+ rm_ProcTrxSlotCombChange();
+ break;
+
+ case GRR_TRX_SLOT_LOCK_REQ:
+ rm_ProcTrxSlotLockReq();
+ break;
+
+ case GRR_TRX_SLOT_SHUTDOWN_REQ:
+ rm_ProcTrxSlotShutdownReq();
+ break;
+ }
+}
+
+void rm_ProcCbSettingChange(void)
+{
+ PDEBUG__(("ENTER@rm_ProcCbSettingChange: setting(%d)\n", rm_pItcRxGrrMsg->feat_ctrl));
+
+ //CB feature setting changed
+ OAMrm_CBCH_OPSTATE = rm_pItcRxGrrMsg->feat_ctrl;
+ switch(OAMrm_CBCH_OPSTATE)
+ {
+ case 0: //Disable CBCH channel
+ if (!rm_ChanCbchActive)
+ PDEBUG__(("INFO@rm_OamProcResourceConfigData: rel CBCH but it's not ON\n"));
+
+ rm_ChanCbchActive = false;
+ rm_SendRfChanRelease(rm_pCbchChan);
+ break;
+
+ case 1: //Enable CBCH Channel
+ if (rm_ChanCbchActive)
+ PDEBUG__(("INFO@rm_OamProcResourceConfigData: turn on a already on cbch\n"));
+
+ rm_ChanCbchActive = false;
+ if ( (rm_pCbchChan->usable == RM_PHYCHAN_UNUSABLE) ||
+ (OAMrm_CHN_OPSTATE(rm_pCbchChan->trxNo, rm_pCbchChan->slotNo)==opStateDisabled) )
+ {
+ IDEBUG__(("WARNIG@rm_OamProcResourceConfigData: CBCH usable(%d) trx(%d) slot(%d) amState(%d)\n",
+ rm_pCbchChan->usable, rm_pCbchChan->trxNo, rm_pCbchChan->slotNo,
+ OAMrm_CHN_AMSTATE(rm_pCbchChan->trxNo, rm_pCbchChan->slotNo) ));
+ } else
+ {
+ //block any SDCCH attempt also activate CBCH
+ rm_pCbchChan->usable = RM_PHYCHAN_USABLE;
+ if (rm_pCbchChan->state == RM_PHYCHAN_FREE)
+ {
+ rm_pCbchChan->usable = RM_PHYCHAN_CBCH_USABLE;
+ if ( (rm_pCbchChan->pMSmCtxt->state != RM_S1RM_RUNNING) ||
+ (rm_pCbchChan->pASmCtxt->state != RM_S1RM_RUNNING) )
+ {
+ IDEBUG__(("WARNING@rm_OamProcResourceConfigData:invalid chan state(%d,%d,%d)\n",
+ rm_pCbchChan,rm_pCbchChan->pMSmCtxt->state,
+ rm_pCbchChan->pASmCtxt->state));
+ rm_pCbchChan->pMSmCtxt->state = RM_S1RM_RUNNING;
+ rm_pCbchChan->pASmCtxt->state = RM_S1RM_RUNNING;
+ }
+ rm_ActivateCbchChan();
+ }
+ }
+ break;
+ default:
+ IDEBUG__(("WARNING@rm_OamProcResourceConfigData: invalid cbchOpState=%d\n",
+ rm_pItcRxGrrMsg->feat_ctrl));
+ return;
+ }
+}
+
+bool rm_ValidateGrrMsgs(void)
+{
+ unsigned char trx, slot, ret;
+
+ ret=true;
+
+ switch(rm_pItcRxGrrMsg->message_type)
+ {
+ case GRR_CB_FEATURE_CONTROL:
+ case GRR_TRX_SLOT_LOCK_REQ:
+ case GRR_TRX_SLOT_SHUTDOWN_REQ:
+ break;
+
+ case GRR_TRX_SLOT_CHANCOMB:
+ if ((!rm_pItcRxGrrMsg->trx)&&(!rm_pItcRxGrrMsg->slot))
+ {
+ IDEBUG__(("WARNING@rm_ValidateGrrMsgs: changed to chanComb(%d) for trx0 slot0\n",
+ rm_pItcRxGrrMsg->chan_comb));
+ printf("WARNING@rm_ValidateGrrMsgs: changed to chanComb(%d) for trx0 slot0\n",
+ rm_pItcRxGrrMsg->chan_comb);
+ ret=false;
+ }
+ break;
+
+ default:
+ ret=false;
+ break;
+ }
+
+ return ret;
+}
+
+void rm_ProcTrxSlotCombChange(void)
+{
+ unsigned char trx, slot, comb, i;
+
+ trx = rm_pItcRxGrrMsg->trx; slot = rm_pItcRxGrrMsg->slot;
+ comb = rm_pItcRxGrrMsg->chan_comb;
+
+ PDEBUG__(("ENTER@rm_ProcTrxSlotCombChange: trx(%d) slot(%d) comb(%d)\n", trx,slot,comb));
+
+ if ( (trx>=OAMrm_MAX_TRXS) || (slot>=8) ) return;
+
+ for (i=0;i<OAMrm_MAX_TCHFS;i++)
+ {
+ if ( (trx==rm_PhyChanTchf[i].trxNo) &&
+ (slot==rm_PhyChanTchf[i].slotNo) )
+ {
+
+ switch(comb)
+ {
+ case OAMrm_SLOT_COMB_1:
+ if ( (rm_PhyChanTchf[i].usable==RM_PHYCHAN_UNUSABLE) &&
+ (OAMrm_CHN_AMSTATE(trx,slot)!=locked) &&
+ (OAMrm_CHN_OPSTATE(trx,slot)!=opStateDisabled) )
+ {
+ ++rm_NoOfUsableTchf;
+ PM_CellMeasurement.nbrOfAvailableTCHs.setValue(rm_NoOfUsableTchf);
+ }
+ rm_PhyChanTchf[i].usable = RM_PHYCHAN_USABLE;
+
+ break;
+
+ //GPRS
+ case OAMrm_SLOT_COMB_13:
+ if ( (rm_PhyChanTchf[i].usable==RM_PHYCHAN_USABLE) &&
+ (OAMrm_CHN_AMSTATE(trx,slot)!=locked) &&
+ (OAMrm_CHN_OPSTATE(trx,slot)!=opStateDisabled) )
+ {
+ if (--rm_NoOfUsableTchf >= 0)
+ PM_CellMeasurement.nbrOfAvailableTCHs.setValue(rm_NoOfUsableTchf);
+ else
+ rm_NoOfUsableTchf = 0;
+ }
+ rm_PhyChanTchf[i].usable = RM_PHYCHAN_UNUSABLE;
+
+ break;
+
+ default:
+ IDEBUG__(("WARNING@rm_ProcTrxSlotCombChange: unexpected comb(%d) for trx(%d) slot(%d)\n",
+ comb, trx, slot));
+ break;
+ }
+ break;
+ }
+ }
+
+ if (i>=OAMrm_MAX_TCHFS)
+ {
+ IDEBUG__(("WARNING@rm_ProcTrxSlotCombChange: trx(%d) slot(%d) not in tchf chan table\n",
+ trx, slot));
+ }
+
+}
+
+void rm_ProcTrxSlotLockReq(void)
+{
+ u8 trx, slot, i;
+
+ PDEBUG__(("ENTER@rm_ProcTrxSlotLockReq()...\n"));
+
+ PDEBUG__(("INFO@rm_ProcTrxSlotAdminStateLocked:(%d,%d)\n",trx, slot));
+
+ trx = rm_pItcRxGrrMsg->trx; slot = rm_pItcRxGrrMsg->slot;
+
+ //Check if (trx,slot) existent
+ if ( !( (OAMrm_TRX_ONOFF_MAP)&(1<<trx) ) || (trx>=OAMrm_MAX_TRXS) ||
+ (slot>=OAMrm_SLOTS_PER_TRX) )
+ {
+ IDEBUG__(("WARNING@rm_ProcTrxSlotAdminStateLocked: invalid (%d,%d)\n",
+ trx,slot));
+ return;
+ }
+
+ //Lock channs
+ if (trx||slot)
+ {
+ //Search for the time slot
+ for (i=0;i<OAMrm_MAX_TCHFS;i++)
+ {
+ if ( (trx==rm_PhyChanTchf[i].trxNo) &&
+ (slot==rm_PhyChanTchf[i].slotNo) )
+ {
+ if ( (rm_PhyChanTchf[i].usable==RM_PHYCHAN_USABLE) &&
+ (rm_PhyChanTchf[i].amState!=locked) )
+ {
+ if (--rm_NoOfUsableTchf<0) rm_NoOfUsableTchf = 0;
+ PM_CellMeasurement.nbrOfAvailableTCHs.setValue(rm_NoOfUsableTchf);
+ }
+
+ rm_PhyChanTchf[i].amState = locked;
+ rm_LockedOneChan(&rm_PhyChanTchf[i]);
+ }
+ }
+ } else
+ {
+ //trx=slot=0, beacon time slot
+
+ //Update PCH channel's amState
+ rm_PhyChanBCcch[RM_PCH_IDX].amState = locked;
+
+ //Update SDCCH4 channels' amState
+ for (i=0;i<OAMrm_MAX_SDCCH4S;i++)
+ {
+ if ( (rm_PhyChanSdcch4[i].usable==RM_PHYCHAN_USABLE) &&
+ (rm_PhyChanSdcch4[i].amState!=locked) )
+ {
+ if (--rm_nbrOfAvailableSDCCHs < 0) rm_nbrOfAvailableSDCCHs = 0;
+ PM_CellMeasurement.nbrOfAvailableSDCCHs.setValue(rm_nbrOfAvailableSDCCHs);
+ }
+ rm_PhyChanSdcch4[i].amState = locked;
+ rm_LockedOneChan(&rm_PhyChanSdcch4[i]);
+ }
+ }
+}
+
+void rm_ProcTrxSlotShutdownReq(void)
+{
+ u8 childInUse,trx,slot;
+
+ PDEBUG__(("INFO@rm_ProcTrxSlotAdminStateShuttingDown()\n"));
+
+ trx = rm_pItcRxGrrMsg->trx;
+ slot = rm_pItcRxGrrMsg->slot;
+
+ //Check if (trx,slot) existent
+ if ( !( (OAMrm_TRX_ONOFF_MAP)&(1<<trx) ) || (trx>=OAMrm_MAX_TRXS) ||
+ slot>=OAMrm_SLOTS_PER_TRX )
+ {
+ IDEBUG__(("WARNING@rm_ProcTrxSlotAdminStateShuttingDown:invalid (%d,%d)\n",
+ trx,slot));
+ return;
+ }
+
+ //Mark all trx-slot channels in use as shuttingDown
+ childInUse = 0;
+ rm_ShuttingDownAllTrxSlotChans(trx, slot, &childInUse);
+
+ if (!childInUse)
+ grr_SendTrxSlotShutdownAck(MODULE_RM, grr_MsgQId, trx, slot);
+}
+
+void rm_LockedAllTrxSlotChans(u8 trx, u8 slot)
+{
+ u8 i;
+
+ //Check if (trx,slot) existent
+ if ( !( (OAMrm_TRX_ONOFF_MAP)&(1<<trx) ) || (trx>=OAMrm_MAX_TRXS) ||
+ slot>=OAMrm_SLOTS_PER_TRX )
+ {
+ IDEBUG__(("WARNING@rm_LockedAllTrxSlotChans: invalid (%d,%d)\n",
+ trx,slot));
+ return;
+ }
+
+
+ if (trx || slot)
+ {
+ //scan through tchf table to excerise the adminState change
+ for (i=0;i<OAMrm_MAX_TCHFS;i++)
+ {
+ if (trx==rm_PhyChanTchf[i].trxNo &&
+ slot==rm_PhyChanTchf[i].slotNo)
+ {
+ if ( rm_PhyChanTchf[i].usable == RM_PHYCHAN_USABLE &&
+ rm_PhyChanTchf[i].amState != locked )
+ {
+ if (--rm_NoOfUsableTchf >= 0)
+ PM_CellMeasurement.nbrOfAvailableTCHs.setValue(rm_NoOfUsableTchf);
+ else
+ rm_NoOfUsableTchf = 0;
+ }
+
+ rm_PhyChanTchf[i].amState = locked;
+ rm_LockedOneChan(&rm_PhyChanTchf[i]);
+ }
+ }
+
+ } else
+ {
+ //trx==0&&slot==0; the TS is carrying BCCH and CCCH channels
+
+ //Update PCH channel's amState
+ rm_PhyChanBCcch[RM_PCH_IDX].amState = locked;
+
+ //Update SDCCH4 channels' amState
+ for (i=0;i<OAMrm_MAX_SDCCH4S;i++)
+ {
+ if ( rm_PhyChanSdcch4[i].usable == RM_PHYCHAN_USABLE &&
+ rm_PhyChanSdcch4[i].amState != locked )
+ {
+ if (--rm_nbrOfAvailableSDCCHs >= 0)
+ PM_CellMeasurement.nbrOfAvailableSDCCHs.setValue(rm_nbrOfAvailableSDCCHs);
+ else
+ rm_nbrOfAvailableSDCCHs = 0;
+ }
+
+ rm_PhyChanSdcch4[i].amState = locked;
+ rm_LockedOneChan(&rm_PhyChanSdcch4[i]);
+ }
+ }
+}
+
+void rm_LockedOneChan(rm_PhyChanDesc_t *pChan)
+{
+ rm_SmCtxt_t *pMSmCtxt, *pASmCtxt;
+
+ pMSmCtxt = pChan->pMSmCtxt;
+ pASmCtxt = pChan->pASmCtxt;
+
+ //Deactivate this channel if needed
+ if (pMSmCtxt->state != RM_S1RM_RUNNING)
+ {
+ rm_SendDlRelReq(pMSmCtxt->mOId,RM_SAPI0,RM_LOCAL_RELEASE);
+ pMSmCtxt->relCause = CNI_RIL3_CAUSE_RESOURCES_UNAVAILABLE_UNSPECIFIED;
+ rm_SendRrRelInd(RM_LOCKED,pMSmCtxt->mEntryId);
+
+ //SMS-SAPI3-Begin
+
+ //if (pMSmCtxt->sapi != RM_SAPI0)
+ // rm_SendDlRelReq(pMSmCtxt->mOId, pMSmCtxt->sapi,
+ // RM_LOCAL_RELEASE);
+
+ rm_SendDlRelReq(pMSmCtxt->mOId, RM_SAPI3, RM_LOCAL_RELEASE);
+ rm_SendDlRelReq(pMSmCtxt->aOId, RM_SAPI3, RM_LOCAL_RELEASE);
+
+ //SMS-SAPI3-End
+ }
+
+ if (pASmCtxt->state != RM_S1RM_RUNNING)
+ {
+ //SMS-SAPI3-Begin
+ rm_SendDlRelReq(pASmCtxt->aOId,RM_SAPI3,RM_LOCAL_RELEASE);
+
+ //if (pASmCtxt->sapi != RM_SAPI0)
+ // rm_SendDlRelReq(pASmCtxt->aOId, pASmCtxt->sapi,
+ // RM_LOCAL_RELEASE);
+ //rm_SendRrRelInd(RM_LOCKED, pASmCtxt->aEntryId);
+ //SMS-SAPI3-End
+ }
+
+ pMSmCtxt->state = RM_S1RM_RUNNING;
+ pASmCtxt->state = RM_S1RM_RUNNING;
+ pChan->state = RM_PHYCHAN_FREE;
+ rm_SendRfChanRelease(pChan);
+}
+
+void rm_ShuttingDownAllTrxSlotChans(u8 trx, u8 slot, u8 *inUse)
+{
+ u8 i;
+
+ PDEBUG__(("INFO@rm_ShuttingDownAllTrxSlotChans:(%d,%d,%d)\n",
+ trx,slot,*inUse));
+
+ *inUse = 0;
+
+ //Check if (trx,slot) existent
+ if ( !( (OAMrm_TRX_ONOFF_MAP)&(1<<trx) ) || (trx>=OAMrm_MAX_TRXS) ||
+ slot>=OAMrm_SLOTS_PER_TRX )
+ {
+ IDEBUG__(("WARNING@rm_ShuttingDownAllTrxSlotChans: invalid (%d,%d)\n",
+ trx,slot));
+ return;
+ }
+
+ //Scan through in terms of channel combination right now only 2
+ if (trx || slot)
+ {
+ //scan through tchf table to excerise the adminState change
+ for (i=0;i<OAMrm_MAX_TCHFS;i++)
+ {
+ if (trx==rm_PhyChanTchf[i].trxNo &&
+ slot==rm_PhyChanTchf[i].slotNo)
+ {
+ if (rm_PhyChanTchf[i].state != RM_PHYCHAN_FREE)
+ {
+ //This time slot is now in use for a call
+ rm_PhyChanTchf[i].amState = shuttingDown;
+ (*inUse)++;
+ } else
+ {
+ if ( (rm_PhyChanTchf[i].usable==RM_PHYCHAN_USABLE) &&
+ (OAMrm_CHN_AMSTATE(trx,slot)!=locked) &&
+ (OAMrm_CHN_OPSTATE(trx,slot)!=opStateDisabled) )
+
+ {
+ if (--rm_NoOfUsableTchf < 0) rm_NoOfUsableTchf = 0;
+ PM_CellMeasurement.nbrOfAvailableTCHs.setValue(rm_NoOfUsableTchf);
+ }
+
+ rm_PhyChanTchf[i].pMSmCtxt->state = RM_S1RM_RUNNING;
+ rm_PhyChanTchf[i].pASmCtxt->state = RM_S1RM_RUNNING;
+ rm_PhyChanTchf[i].amState = locked;
+ }
+ }
+ }
+
+ //Sanitory check
+ if ( (*inUse) > 1)
+ {
+ IDEBUG__(("WARNING@ rm_ShuttingDownAllTrxSlotChans:(%d,%d,used %d)\n",
+ trx, slot, *inUse));
+ }
+ } else
+ {
+ //trx=slot=0, beacon time slot
+
+ //Update PCH channel's amState
+ rm_PhyChanBCcch[RM_PCH_IDX].amState = locked; //block paging
+
+ //Update SDCCH4 channels' amState
+ for (i=0;i<OAMrm_MAX_SDCCH4S;i++)
+ {
+ if (rm_PhyChanSdcch4[i].state != RM_PHYCHAN_FREE)
+ {
+ //This time slot is currently use for call
+ rm_PhyChanSdcch4[i].amState = shuttingDown;
+ (*inUse)++;
+ } else
+ {
+ rm_PhyChanSdcch4[i].pMSmCtxt->state = RM_S1RM_RUNNING;
+ rm_PhyChanSdcch4[i].pASmCtxt->state = RM_S1RM_RUNNING;
+ rm_PhyChanSdcch4[i].amState = locked;
+
+ if (--rm_nbrOfAvailableSDCCHs<0) rm_nbrOfAvailableSDCCHs=0;
+ PM_CellMeasurement.nbrOfAvailableSDCCHs.setValue(rm_nbrOfAvailableSDCCHs);
+ }
+ }
+ }
+}
+
+
+#endif //__RM_OAMREGTRAPVARS_CPP__
+
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_OamSendHoNCellToDsp.cpp b/data/mnet/GP10/Host/rm/Src/rm_OamSendHoNCellToDsp.cpp
new file mode 100644
index 0000000..3cc4474
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_OamSendHoNCellToDsp.cpp
@@ -0,0 +1,119 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_OAMSENDHONCELLTODSP_CPP__
+#define __RM_OAMSENDHONCELLTODSP_CPP__
+
+//GP2
+#if 0
+
+#include <stdio.h>
+#include "rm\rm_head.h"
+
+u8 rm_OamGetTotalAvailableHoNCells(void)
+{
+ u8 i,count;
+ count=0;
+ //PR1223 Begin: add suffix "t" only
+ for (i=0;i<OAMrm_HO_ADJCELL_NO_MAX;i++)
+ if (OAMrm_HO_ADJCELL_ID_t(i)!=OAMrm_HO_ADJCELL_ID_NULL)
+ count++;
+ return count;
+}
+void rm_OamSendHoNCellToDsp(u8 trxNo, u8 nCellIdx, u8 totalNCells)
+{
+ s16 length; /* Length of the message to send to L1 */
+ rm_ItcTxMsg_t msgToL1; /* Store an encoded message sent to L1 */
+ s16 tmp;
+
+ if (OAMrm_HO_ADJCELL_ID_t(nCellIdx)==OAMrm_HO_ADJCELL_ID_NULL) return;
+
+ AdjCell_HandoverEntry *entry
+ = (AdjCell_HandoverEntry *) rm_OamData.adjacentCellPackage_t.adjCell_handoverTable;
+
+ // point to the correct index;
+ entry += nCellIdx;
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_OamSendHoNCellToDsp: Entering...\n" ));
+
+
+ /* clear the memory first */
+ memset(&msgToL1, 0, sizeof(rm_ItcTxMsg_t));
+ length = 0;
+
+ /* Encode TRX CONFIGure message */
+ msgToL1.buffer[length++] = (unsigned char ) OAM_MANAGE_MSG; // message discriminator
+ msgToL1.buffer[length++] = (unsigned char ) (OAM_HO_NCELL_CONFIG >>8); // high byte
+ msgToL1.buffer[length++] = (unsigned char ) OAM_HO_NCELL_CONFIG; // message type Low byte 0x5000,
+ msgToL1.buffer[length++] = trxNo;
+ msgToL1.buffer[length++] = nCellIdx;
+ msgToL1.buffer[length++] = totalNCells;
+
+ /* ARFCN */
+ tmp = entry->adjCell_bCCHFrequency;
+
+ msgToL1.buffer[length++] = (unsigned char) (tmp >>8);
+ msgToL1.buffer[length++] = (unsigned char) tmp;
+
+
+
+ /* Base station identity code is generated by three bit of ncc and 3 bit
+ * bit of bcc
+ */
+
+ msgToL1.buffer[length++] = (unsigned char) ((unsigned char) entry->adjCell_ncc << 3 |
+ (unsigned char) entry->adjCell_cid);
+
+ /* Handover margin */
+
+ msgToL1.buffer[length++] = (unsigned char) entry->adjCell_hoMargin;
+
+ /* Maximum Mobile Transmit Power for Neighbour Cell */
+ tmp = entry->adjCell_msTxPwrMaxCell;
+ // msgToL1.buffer[length++] = (unsigned char) (tmp >>8);
+ msgToL1.buffer[length++] = (unsigned char) tmp;
+
+
+
+ /* Minimum Mobile receive Power for Neighbour Cell */
+ tmp = entry->adjCell_rxLevMinCell;
+ // msgToL1.buffer[length++] = (unsigned char) (tmp >>8);
+ msgToL1.buffer[length++] = (unsigned char) tmp;
+
+
+ msgToL1.msgLength = length;
+
+ /* Hex Dump the message if __TDUMP__ defined */
+ TDUMP__((TXMSG__, msgToL1.buffer, length));
+
+ /* Finally send message to DSP */
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+
+} /* rm_OamSendHoNCellToDsp() */
+
+
+/* send Hand over Neighbouring Cell Configuration parameter for all the
+ * available cells of all TRX
+ */
+
+void rm_OamSendHoAllNCellToDsp()
+{
+ int i, j;
+ u8 ncellNo;
+ ncellNo=rm_OamGetTotalAvailableHoNCells();
+ for (i = 0; i < TOTAL_AVAILABLE_TRX; i++)
+ for (j=0; j <TOTAL_AVAILABLE_CELL; j++)
+ rm_OamSendHoNCellToDsp(i,j,ncellNo);
+}
+
+//GP2
+#endif //#if 0
+
+#endif /* __RM_OAMSENDHONCELLTODSP_CPP__*/
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_OamSendHoSCellToDsp.cpp b/data/mnet/GP10/Host/rm/Src/rm_OamSendHoSCellToDsp.cpp
new file mode 100644
index 0000000..0495651
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_OamSendHoSCellToDsp.cpp
@@ -0,0 +1,137 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_OAMSENDHOSCELLTODSP_CPP__
+#define __RM_OAMSENDHOSCELLTODSP_CPP__
+
+//GP2
+#if 0
+
+#include <stdio.h>
+#include "rm\rm_head.h"
+
+void rm_OamSendHoSCellToDsp(s8 trxNo)
+{
+ s16 length; /* Length of the message to send to L1 */
+ rm_ItcTxMsg_t msgToL1; /* Store an encoded message sent to L1 */
+ s16 tmp;
+ HandoverControlPackage_t *hoPktPtr = &rm_OamData.handoverControlPackage;
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_OamSendHoSCellToDsp.cpp: Entering...\n" ));
+
+
+ /* clear the memory first */
+ memset(&msgToL1, 0, sizeof(rm_ItcTxMsg_t));
+ length = 0;
+
+ /* Encode TRX CONFIGure message */
+ msgToL1.buffer[length++] = (unsigned char ) OAM_MANAGE_MSG; // message discriminator
+ msgToL1.buffer[length++] = (unsigned char ) (OAM_HO_SCELL_CONFIG >>8); // high byte
+ msgToL1.buffer[length++] = (unsigned char ) OAM_HO_SCELL_CONFIG; // message type Low byte
+ msgToL1.buffer[length++] = trxNo;
+
+
+ /* RXLEV threshold on the uplink for handover process to commence. Typical
+ * range -103 to -73 dBm.
+ */
+
+ tmp = hoPktPtr->hoThresholdLevParam->rxLevelUL;
+ // msgToL1.buffer[length++] = (unsigned char) (tmp >>8);
+ msgToL1.buffer[length++] = (unsigned char) tmp;
+
+
+
+ /* RXLEV threshold on the downlink for handover process to commence.
+ * Typical range -103 to -73 dBm.
+ */
+
+ tmp = hoPktPtr->hoThresholdLevParam->rxLevelDL;
+ // msgToL1.buffer[length++] = (unsigned char) (tmp >>8); //0x5D
+ msgToL1.buffer[length++] = (unsigned char) tmp;
+
+ /* The number of averages (out of total averages) that have to be upper/lower than
+ * the threshold, before making a handover decision (P5).
+ */
+
+ msgToL1.buffer[length++] = hoPktPtr->hoThresholdLevParam->px;
+
+
+ /* The number of averages that have to be taken into account, when making a
+ * handover decision (N5).
+ */
+
+ msgToL1.buffer[length++] = hoPktPtr->hoThresholdLevParam->nx;
+
+ /****************** Quality Parameters **************************/
+
+ /* RXLEV threshold on the uplink for handover process to commence. Typical
+ * range -103 to -73 dBm.
+ */
+
+ tmp = hoPktPtr->hoThresholdQualParam->rxQualUL;
+ // msgToL1.buffer[length++] = (unsigned char) (tmp >>8);
+ msgToL1.buffer[length++] = (unsigned char) tmp;
+
+
+
+ /* RXLEV threshold on the downlink for handover process to commence.
+ * Typical range -103 to -73 dBm.
+ */
+
+ tmp = hoPktPtr->hoThresholdQualParam->rxQualDL;
+ // msgToL1.buffer[length++] = (unsigned char) (tmp >>8); //0x5D
+ msgToL1.buffer[length++] = (unsigned char) tmp;
+
+ /* The number of averages (out of total averages) that have to be upper/lower than
+ * the threshold, before making a handover decision (P5).
+ */
+
+ msgToL1.buffer[length++] = (unsigned char) hoPktPtr->hoThresholdQualParam->px;
+
+
+ /* The number of averages that have to be taken into account, when making a
+ * handover decision (N5).
+ */
+
+ msgToL1.buffer[length++] = (unsigned char) hoPktPtr->hoThresholdQualParam->nx;
+
+
+ /* Handover Margin Default
+ */
+
+ msgToL1.buffer[length++] = (unsigned char) hoPktPtr->hoMarginDef;
+
+ /* The following three parameters are added on Aug 6, 1999 -- Bhawani */
+
+ /* Maximum Mobil Transmit Power (Default)
+ */
+
+ msgToL1.buffer[length++] = (unsigned char) hoPktPtr->mxTxPwrMaxCellDef;
+
+
+ /* Minimum Mobile Receive Power (Default)
+ */
+
+ msgToL1.buffer[length++] = (unsigned char) hoPktPtr->rxLevMinCellDef;
+
+ msgToL1.msgLength = length;
+
+ /* Hex Dump the message if __TDUMP__ defined */
+// TDUMP__((TXMSG__, msgToL1.buffer, length));
+
+ /* Finally send message to DSP */
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+
+} /* rm_OamSendHoSCellToDsp() */
+
+//GP2
+#endif //#if 0
+
+#endif /* __RM_OAMSENDHOSCELLTODSP_CPP__*/
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_OamSendPcToDsp.cpp b/data/mnet/GP10/Host/rm/Src/rm_OamSendPcToDsp.cpp
new file mode 100644
index 0000000..f997de8
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_OamSendPcToDsp.cpp
@@ -0,0 +1,80 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_OAMSENDPCTODSP_CPP__
+#define __RM_OAMSENDPCTODSP_CPP__
+
+//GP2
+#if 0
+
+#include <stdio.h>
+#include "rm\rm_head.h"
+
+void rm_OamSendPcToDsp(s8 trxNo)
+{
+ s16 length; /* Length of the message to send to L1 */
+ rm_ItcTxMsg_t msgToL1; /* Store an encoded message sent to L1 */
+ s16 tmp;
+ PowerControlPackage_t *pcPktPtr = &rm_OamData.powerControlPackage;
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_OamSendPcToDsp: Entering...\n" ));
+
+
+ /* clear the memory first */
+ memset(&msgToL1, 0, sizeof(rm_ItcTxMsg_t));
+ length = 0;
+
+ /* Encode TRX CONFIGure message */
+ msgToL1.buffer[length++] = (unsigned char ) OAM_MANAGE_MSG; // message discriminator
+ msgToL1.buffer[length++] = (unsigned char ) (OAM_DPC_CONFIG >>8); // high byte
+ msgToL1.buffer[length++] = (unsigned char ) OAM_DPC_CONFIG; // message type Low byte 0x5000,
+ msgToL1.buffer[length++] = trxNo; //0x00
+
+
+ /*
+ ** the size for the signal sample buffer used for averaging power
+ ** level[1-32]. one sample at every 480 ms (1 frame)
+ */
+
+ /* Averaging Buffer Size For Signal Strength (Hreqave) */
+ msgToL1.buffer[length++] = pcPktPtr->pcAveragingLev->hreqave;
+
+ /*
+ ** the size for the signal sample buffer used for averaging
+ ** quality samples [1-32]. one sample at every 480 ms (1 frame)
+ */
+
+ /* Averaging Buffer Size For Signal Quality (Hreqave) */
+ msgToL1.buffer[length++] = pcPktPtr->pcAveragingQual->hreqave;
+
+
+ /*
+ ** Threshold for activating uplink dynamic power control
+ ** Note: the following variable is reused
+ */
+ /*
+ * Need to Verify Which Value to USE, Using current One pass compiling
+ */
+ msgToL1.buffer[length++] = pcPktPtr->pcLowerThresholdLevParam->rxLevelUL;
+
+ msgToL1.msgLength = length;
+
+ /* Hex Dump the message if __TDUMP__ defined */
+ TDUMP__((TXMSG__, msgToL1.buffer, length));
+
+ /* Finally send message to DSP */
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+
+} /* rm_OamSendPcToDsp() */
+
+//GP2
+#endif //#if 0
+
+#endif /* __RM_OAMSENDPCTODSP_CPP__*/
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_OamSendPwrRedStepToDsp.cpp b/data/mnet/GP10/Host/rm/Src/rm_OamSendPwrRedStepToDsp.cpp
new file mode 100644
index 0000000..c0cd062
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_OamSendPwrRedStepToDsp.cpp
@@ -0,0 +1,70 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_OAMSENDPWRREDSTEPTODSP_CPP__
+#define __RM_OAMSENDPWRREDSTEPTODSP_CPP__
+
+//GP2
+#if 0
+
+#include <stdio.h>
+#include "rm\rm_head.h"
+
+#define OAM_TXPWR_MAX_RDCT_CONFIG 0x5006
+#define OAM_TXPWR_MAX_RDCT_CONFIG_ACK 0x5007
+
+void rm_OamSendPwrRedStepToDsp(u8 trxNo)
+{
+ s16 length; /* Length of the message to send to L1 */
+ rm_ItcTxMsg_t msgToL1; /* Store an encoded message sent to L1 */
+ static char fname[] = "rm_OamSendPwrRedStepToDsp";
+
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-%s Entering...\n", fname ));
+
+
+ /* clear the memory first */
+ memset(&msgToL1, 0, sizeof(rm_ItcTxMsg_t));
+ length = 0;
+
+ /* Encode TRX CONFIGure message */
+ msgToL1.buffer[length++] = (unsigned char ) OAM_MANAGE_MSG; // message discriminator
+ msgToL1.buffer[length++] = (unsigned char ) (OAM_TXPWR_MAX_RDCT_CONFIG >>8); // high byte
+ msgToL1.buffer[length++] = (unsigned char ) OAM_TXPWR_MAX_RDCT_CONFIG; // message type Low byte
+ msgToL1.buffer[length++] = trxNo;
+
+
+
+ /* Transmit Power Maximum Reduction setps
+ */
+ if (trxNo == 0 || trxNo == 1)
+ {
+ msgToL1.buffer[length++] = (unsigned char) rm_OamData.radioCarrierPackage[OAMrm_TRX_RC(trxNo)].txPwrMaxReduction;
+ } else {
+ EDEBUG__(("%s:Invalid TRX number passed (%d)\n", fname, trxNo));
+ return;
+ }
+
+
+
+ msgToL1.msgLength = length;
+
+ /* Hex Dump the message if __TDUMP__ defined */
+ // TDUMP__((TXMSG__, msgToL1.buffer, length));
+
+ /* Finally send message to DSP */
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+
+} /* rm_OamSendHoSCellToDsp() */
+
+//GP2
+#endif //#if 0
+
+#endif /* __RM_OAMSENDPWRREDSTEPTODSP_CPP__*/
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_PopulateSI2.cpp b/data/mnet/GP10/Host/rm/Src/rm_PopulateSI2.cpp
new file mode 100644
index 0000000..28a48ac
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_PopulateSI2.cpp
@@ -0,0 +1,60 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_POPULATESI2_CPP__
+#define __RM_POPULATESI2_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_PopulateSI2(T_CNI_RIL3_CELL_BARRED_ACCESS barState)
+{
+ u8 i,idx;
+
+ RDEBUG__(("ENTER-rm_PopulateSI2\n"));
+
+ //ZAP rm_UmSI2 to have a good clean-up
+ memset(&rm_UmSI2, 0, sizeof(rm_UmSI2_t));
+
+ //HEADER: PD,MT,SI
+ rm_UmSI2.header.protocol_descriminator = RM_PD;
+ rm_UmSI2.header.si_ti = RM_SI;
+ rm_UmSI2.header.message_type = RM_SI2;
+
+ //IE: Bcch Frequency List
+ rm_UmSI2.bcchFreqList.ie_present = RM_TRUE;
+ rm_UmSI2.bcchFreqList.extInd = RM_EXTIND_0;
+ rm_UmSI2.bcchFreqList.baInd = RM_BA_WHOLE;
+ //rm_UmSI2.bcchFreqList.format = RM_FRMT_VARBITMAP;
+ idx=0;
+ for (i=0;i<OAMrm_RESEL_ADJCELL_NO_MAX;i++)
+ {
+ if (OAMrm_RESEL_ADJCELL_ID(i) != OAMrm_RESEL_ADJCELL_ID_NULL)
+ rm_UmSI2.bcchFreqList.arfcn[idx++] = OAMrm_RESEL_ADJCELL_BCCH_ARFCN(i);
+ }
+ rm_UmSI2.bcchFreqList.numRFfreq = idx;
+ rm_UmSI2.bcchFreqList.format = CNI_RIL3_SelectFrequencyListFormat(
+ rm_UmSI2.bcchFreqList.arfcn,idx);
+
+ //IE: Ncc Permitted
+ rm_UmSI2.nccPermitted.ie_present = RM_TRUE;
+ for (i=0;i<OAMrm_NCC_PERMITTED_MAX;i++)
+ rm_UmSI2.nccPermitted.nccPermitted[i] = OAMrm_NCC_PERMITTED(i);
+
+ //IE: Rach Control
+ rm_UmSI2.rachControl.ie_present = RM_TRUE;
+ rm_UmSI2.rachControl.maxRetrans = OAMrm_RA_RETRY_MAX; //3: 7 times
+ rm_UmSI2.rachControl.txInt = OAMrm_RA_TX_INTEGER; //0: wait 3 slots
+ rm_UmSI2.rachControl.cellBarredAccess = barState; //OAMrm_RA_CELL_BARRED_STATE;
+ rm_UmSI2.rachControl.reestablish = OAMrm_RA_REST_ALLOWED_STATE; //1: not allowed
+ rm_UmSI2.rachControl.emergencyCall = OAMrm_RA_EC_ALLOWED_STATE; //1: not allowed
+ for (i=0;i<16;i++)
+ rm_UmSI2.rachControl.accessClass[i]=OAMrm_RA_AC_ALLOWED_STATE(i); //1:not allowed
+
+} //rm_PopulateSI2()
+
+#endif /__RM_POPULATESI2_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_PopulateSI3.cpp b/data/mnet/GP10/Host/rm/Src/rm_PopulateSI3.cpp
new file mode 100644
index 0000000..29069d6
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_PopulateSI3.cpp
@@ -0,0 +1,92 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+
+#ifndef __RM_POPULATESI3_CPP__
+#define __RM_POPULATESI3_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_PopulateSI3(T_CNI_RIL3_CELL_BARRED_ACCESS barState)
+{
+ u8 i;
+
+ RDEBUG__(("ENTER-rm_PopulateSI3\n"));
+
+ //ZAP rm_UmSI3 to have a good clean-up
+ memset(&rm_UmSI3, 0, sizeof(rm_UmSI3_t));
+
+ //HEADER: PD,MT,SI
+ rm_UmSI3.header.protocol_descriminator = RM_PD;
+ rm_UmSI3.header.si_ti = RM_SI;
+ rm_UmSI3.header.message_type = RM_SI3;
+
+ //IE: Cell ID
+ rm_UmSI3.cellId.ie_present = RM_TRUE;
+ rm_UmSI3.cellId.value = OAMrm_CELLID; //0x0001
+
+ //IE: Location Area Identification
+ rm_UmSI3.locationId.ie_present = RM_TRUE;
+ rm_UmSI3.locationId.mcc[0] = OAMrm_MCC(0); //0
+ rm_UmSI3.locationId.mcc[1] = OAMrm_MCC(1); //0
+ rm_UmSI3.locationId.mcc[2] = OAMrm_MCC(2); //1
+ rm_UmSI3.locationId.mnc[0] = OAMrm_MNC(0); //0
+ rm_UmSI3.locationId.mnc[1] = OAMrm_MNC(1); //1
+ rm_UmSI3.locationId.mnc[2] = OAMrm_MNC(2); //1
+ rm_UmSI3.locationId.lac = OAMrm_LAC; //1
+
+ //IE: Control Channel Description
+ rm_UmSI3.controlChannelDescription.ie_present = RM_TRUE;
+ rm_UmSI3.controlChannelDescription.att = OAMrm_ATT_STATE;
+ rm_UmSI3.controlChannelDescription.bsAgBlksRes = OAMrm_BS_AG_BLK_RES;
+ rm_UmSI3.controlChannelDescription.bsPaMfrms = OAMrm_BS_PA_MFRMS;
+ rm_UmSI3.controlChannelDescription.ccchConf = OAMrm_CCCH_CONF;
+ rm_UmSI3.controlChannelDescription.T3212 = OAMrm_T3212;
+
+ //IE: Cell Options on BCCH
+ rm_UmSI3.cellOptions.ie_present = RM_TRUE;
+ rm_UmSI3.cellOptions.channelType = CNI_RIL3_CELL_OPTIONS_BCCH; //1
+ rm_UmSI3.cellOptions.pwrc = CNI_RIL3_PWRC_NOT_SET; //0:no hopping
+ rm_UmSI3.cellOptions.radioLinkTimeout = OAMrm_RADIO_LINK_TIMEOUT; //3
+ rm_UmSI3.cellOptions.bcchDtx = OAMrm_MS_UPLINK_DTX_STATEa; //2
+
+ //IE: Cell Reselection Parameters
+ rm_UmSI3.cellSelectionParam.ie_present = RM_TRUE;
+ rm_UmSI3.cellSelectionParam.cellReselectHysteresis = OAMrm_CELL_RESEL_HYSTERESIS; //2
+ rm_UmSI3.cellSelectionParam.msTxpwrMaxCCH = OAMrm_MS_TX_PWR_MAX_CCH; //0
+ rm_UmSI3.cellSelectionParam.rxlevAccessMin = OAMrm_MS_RELEV_ACCESS_MIN; //6
+ rm_UmSI3.cellSelectionParam.neci = CNI_RIL3_NECI_NOT_SUPPORTED; //0
+ rm_UmSI3.cellSelectionParam.acs = CNI_RIL3_ACS_USE_SI4_RESET_OCTETS; //0
+
+ //IE: Rach Control
+ rm_UmSI3.rachControl.ie_present = RM_TRUE;
+ rm_UmSI3.rachControl.maxRetrans = OAMrm_RA_RETRY_MAX; //3: 7 times
+ rm_UmSI3.rachControl.txInt = OAMrm_RA_TX_INTEGER; //0: wait 3 slots
+ rm_UmSI3.rachControl.cellBarredAccess = barState; //OAMrm_RA_CELL_BARRED_STATE;
+ rm_UmSI3.rachControl.reestablish = OAMrm_RA_REST_ALLOWED_STATE; //1: not allowed
+ rm_UmSI3.rachControl.emergencyCall = OAMrm_RA_EC_ALLOWED_STATE; //1: not allowed
+ for (i=0;i<16;i++)
+ rm_UmSI3.rachControl.accessClass[i]=OAMrm_RA_AC_ALLOWED_STATE(i);//1:not allowed
+
+ //IE: SI3 Rest Octets
+ rm_UmSI3.si3RestOctets.ie_present = RM_TRUE;
+ rm_UmSI3.si3RestOctets.pi = CNI_RIL3_SELECTION_PARAMETER_PRESENT; //1
+ rm_UmSI3.si3RestOctets.cbq = OAMrm_CELL_BAR_QUALIFY; //Cell Bar Qualify
+ rm_UmSI3.si3RestOctets.cellReselectOffset = OAMrm_CELL_RESELECT_OFFSET;
+ rm_UmSI3.si3RestOctets.temporaryOffset = OAMrm_TEMP_OFFEST;
+ rm_UmSI3.si3RestOctets.penaltyTime = OAMrm_PENALTY_TIME; //20s
+ rm_UmSI3.si3RestOctets.poi = CNI_RIL3_POWER_OFFSET_NOT_PRESENTE;
+ rm_UmSI3.si3RestOctets.powerOffset = 0; //Not applicable
+ rm_UmSI3.si3RestOctets.si2ter = CNI_RIL3_SI_2TER_NOT_PRESENT;
+ rm_UmSI3.si3RestOctets.ecsi = CNI_RIL3_EARLY_CLASSMARK_SENDING_FORBIDDEN;
+ rm_UmSI3.si3RestOctets.wi = CNI_RIL3_WHERE_NOT_PRESENT;
+ rm_UmSI3.si3RestOctets.where = 0; //Not applicable
+
+} /* rm_PopulateSI3() */
+
+#endif /* __RM_POPULATESI3_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_PopulateSI4.cpp b/data/mnet/GP10/Host/rm/Src/rm_PopulateSI4.cpp
new file mode 100644
index 0000000..567b505
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_PopulateSI4.cpp
@@ -0,0 +1,89 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+
+#ifndef __RM_POPULATESI4_CPP__
+#define __RM_POPULATESI4_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_PopulateSI4(T_CNI_RIL3_CELL_BARRED_ACCESS barState)
+{
+ u8 i;
+
+ RDEBUG__(("ENTER-rm_PopulateSI4\n"));
+
+ //ZAP rm_UmSI4 to have a good clean-up
+ memset(&rm_UmSI4, 0, sizeof(rm_UmSI4_t));
+
+ //HEADER: PD,MT,SI
+ rm_UmSI4.header.protocol_descriminator = RM_PD;
+ rm_UmSI4.header.si_ti = RM_SI;
+ rm_UmSI4.header.message_type = RM_SI4;
+
+ //IE: Location Area Identification
+ rm_UmSI4.locationId.ie_present = RM_TRUE;
+ rm_UmSI4.locationId.mcc[0] = OAMrm_MCC(0); //0
+ rm_UmSI4.locationId.mcc[1] = OAMrm_MCC(1); //0
+ rm_UmSI4.locationId.mcc[2] = OAMrm_MCC(2); //1
+ rm_UmSI4.locationId.mnc[0] = OAMrm_MNC(0); //0
+ rm_UmSI4.locationId.mnc[1] = OAMrm_MNC(1); //1
+ rm_UmSI4.locationId.mnc[2] = OAMrm_MNC(2); //1
+
+ //printf("==========3-digit MNC[%x%x%x]\n",
+ // rm_UmSI4.locationId.mnc[0],
+ // rm_UmSI4.locationId.mnc[1],
+ // rm_UmSI4.locationId.mnc[2]
+ // );
+
+ rm_UmSI4.locationId.lac = OAMrm_LAC; //1
+
+ //IE: Cell Reselection Parameters
+ rm_UmSI4.cellSelectionParam.ie_present = RM_TRUE;
+ rm_UmSI4.cellSelectionParam.cellReselectHysteresis = OAMrm_CELL_RESEL_HYSTERESIS; //2
+ rm_UmSI4.cellSelectionParam.msTxpwrMaxCCH = OAMrm_MS_TX_PWR_MAX_CCH; //0
+ rm_UmSI4.cellSelectionParam.rxlevAccessMin = OAMrm_MS_RELEV_ACCESS_MIN; //6
+ rm_UmSI4.cellSelectionParam.neci = CNI_RIL3_NECI_NOT_SUPPORTED; //0
+ rm_UmSI4.cellSelectionParam.acs = CNI_RIL3_ACS_USE_SI4_RESET_OCTETS; //0
+
+ //IE: Rach Control
+ rm_UmSI4.rachControl.ie_present = RM_TRUE;
+ rm_UmSI4.rachControl.maxRetrans = OAMrm_RA_RETRY_MAX; //3: 7 times
+ rm_UmSI4.rachControl.txInt = OAMrm_RA_TX_INTEGER; //0: wait 3 slots
+ rm_UmSI4.rachControl.cellBarredAccess = barState; //OAMrm_RA_CELL_BARRED_STATE;
+ rm_UmSI4.rachControl.reestablish = OAMrm_RA_REST_ALLOWED_STATE; //1: not allowed
+ rm_UmSI4.rachControl.emergencyCall = OAMrm_RA_EC_ALLOWED_STATE; //1: not allowed
+ for (i=0;i<16;i++)
+ rm_UmSI4.rachControl.accessClass[i]=OAMrm_RA_AC_ALLOWED_STATE(i);//1:not allowed
+
+ //IE(optional): CBCH channel description
+ if (OAMrm_CBCH_OPSTATE)
+ {
+ rm_UmSI4.cbchChannelDescription.ie_present = RM_TRUE;
+ rm_UmSI4.cbchChannelDescription.hopping = RM_FALSE;
+ rm_UmSI4.cbchChannelDescription.channelType = rm_pCbchChan->chanType;
+ rm_UmSI4.cbchChannelDescription.subChannelNumber = rm_pCbchChan->subChanNumber;
+ rm_UmSI4.cbchChannelDescription.TN = (rm_pCbchChan->chanNumberMSB)&RM_U8_0X07;
+ rm_UmSI4.cbchChannelDescription.TSC = OAMrm_BTS_TSC; //pPhyChan->TSC;
+ rm_UmSI4.cbchChannelDescription.arfcn = OAMrm_ARFCN(rm_pCbchChan->trxNumber);
+ }
+
+ //IE: SI4 Rest Octets
+ rm_UmSI4.si4RestOctets.ie_present = RM_TRUE;
+ rm_UmSI4.si4RestOctets.pi = CNI_RIL3_SELECTION_PARAMETER_PRESENT; //1
+ rm_UmSI4.si4RestOctets.cbq = OAMrm_CELL_BAR_QUALIFY; //default 0
+ rm_UmSI4.si4RestOctets.cellReselectOffset = OAMrm_CELL_RESELECT_OFFSET;
+ rm_UmSI4.si4RestOctets.temporaryOffset = OAMrm_TEMP_OFFEST;
+ rm_UmSI4.si4RestOctets.penaltyTime = OAMrm_PENALTY_TIME; //20s
+ rm_UmSI4.si4RestOctets.poi = CNI_RIL3_POWER_OFFSET_NOT_PRESENTE;
+ rm_UmSI4.si4RestOctets.powerOffset = 0; //Not applicable
+
+
+} /* rm_PopulateSI4() */
+
+#endif /* __RM_POPULATESI4_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_PopulateSI5.cpp b/data/mnet/GP10/Host/rm/Src/rm_PopulateSI5.cpp
new file mode 100644
index 0000000..c90603c
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_PopulateSI5.cpp
@@ -0,0 +1,46 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_POPULATESI5_CPP__
+#define __RM_POPULATESI5_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_PopulateSI5(void)
+{
+ u8 idx,i;
+
+ RDEBUG__(("ENTER-rm_PopulateSI5\n"));
+
+ //ZAP rm_UmSI5 to have a good clean-up
+ memset(&rm_UmSI5, 0, sizeof(rm_UmSI5_t));
+
+ //HEADER: PD,MT,SI */
+ rm_UmSI5.header.protocol_descriminator = RM_PD;
+ rm_UmSI5.header.si_ti = RM_SI;
+ rm_UmSI5.header.message_type = RM_SI5;
+
+ //IE: Bcch Frequency List
+ rm_UmSI5.bcchFreqList.ie_present = RM_TRUE;
+ rm_UmSI5.bcchFreqList.extInd = RM_EXTIND_0;
+ rm_UmSI5.bcchFreqList.baInd = RM_BA_WHOLE;
+ //rm_UmSI5.bcchFreqList.format = RM_FRMT_VARBITMAP;
+
+ idx=0;
+ for (i=0;i<OAMrm_HO_ADJCELL_NO_MAX;i++)
+ {
+ if (OAMrm_HO_ADJCELL_ID(i) != OAMrm_HO_ADJCELL_ID_NULL)
+ rm_UmSI5.bcchFreqList.arfcn[idx++] = OAMrm_HO_ADJCELL_BCCH_ARFCN(i);
+ }
+ rm_UmSI5.bcchFreqList.numRFfreq = idx;
+ rm_UmSI5.bcchFreqList.format = CNI_RIL3_SelectFrequencyListFormat(
+ rm_UmSI5.bcchFreqList.arfcn,idx);
+
+} /* rm_PopulateSI5() */
+
+#endif /* __RM_POPULATESI5_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_PopulateSI6.cpp b/data/mnet/GP10/Host/rm/Src/rm_PopulateSI6.cpp
new file mode 100644
index 0000000..3ec8e43
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_PopulateSI6.cpp
@@ -0,0 +1,58 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_POPULATESI6_CPP__
+#define __RM_POPULATESI6_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_PopulateSI6(void)
+{
+ u8 i;
+
+ RDEBUG__(("ENTER-rm_PopulateSI6\n"));
+
+ //ZAP rm_UmSI6 to have a good clean-up
+ memset(&rm_UmSI6, 0, sizeof(rm_UmSI6_t));
+
+ //HEADER: PD,MT,SI
+ rm_UmSI6.header.protocol_descriminator = RM_PD;
+ rm_UmSI6.header.si_ti = RM_SI;
+ rm_UmSI6.header.message_type = RM_SI6;
+
+ //IE: Cell ID
+ rm_UmSI6.cellId.ie_present = RM_TRUE;
+ rm_UmSI6.cellId.value = OAMrm_CELLID; //0x0001
+
+ //IE: Location Area Identification
+ rm_UmSI6.locationId.ie_present = RM_TRUE;
+ rm_UmSI6.locationId.mcc[0] = OAMrm_MCC(0); //0
+ rm_UmSI6.locationId.mcc[1] = OAMrm_MCC(1); //0
+ rm_UmSI6.locationId.mcc[2] = OAMrm_MCC(2); //1
+ rm_UmSI6.locationId.mnc[0] = OAMrm_MNC(0); //0
+ rm_UmSI6.locationId.mnc[1] = OAMrm_MNC(1); //1
+ rm_UmSI6.locationId.mnc[2] = OAMrm_MNC(2); //1
+ rm_UmSI6.locationId.lac = OAMrm_LAC; //1
+
+ //IE: Cell Options on BCCH
+ rm_UmSI6.cellOptions.ie_present = RM_TRUE;
+ rm_UmSI6.cellOptions.channelType = CNI_RIL3_CELL_OPTIONS_SACCH; //1
+ rm_UmSI6.cellOptions.pwrc = CNI_RIL3_PWRC_NOT_SET; //0:no hopping
+ rm_UmSI6.cellOptions.radioLinkTimeout = OAMrm_RADIO_LINK_TIMEOUT; //3
+// rm_UmSI6.cellOptions.sacchDtx = CNI_RIL3_DTX_SHALL_NOT_TCHF_TCHH; //2
+ rm_UmSI6.cellOptions.sacchDtx = OAMrm_MS_UPLINK_DTX_STATE;
+
+
+ //IE: Ncc Permitted
+ rm_UmSI6.nccPermitted.ie_present = RM_TRUE;
+ for (i=0;i<OAMrm_NCC_PERMITTED_MAX;i++)
+ rm_UmSI6.nccPermitted.nccPermitted[i] = OAMrm_NCC_PERMITTED(i);
+
+} /* rm_PopulateSI6() */
+
+#endif /* __RM_POPULATESI6_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_ProcClassMarkIE.cpp b/data/mnet/GP10/Host/rm/Src/rm_ProcClassMarkIE.cpp
new file mode 100644
index 0000000..93be8a5
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_ProcClassMarkIE.cpp
@@ -0,0 +1,72 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_PROCCLASSMARKIE_CPP__
+#define __RM_PROCCLASSMARKIE_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_ProcClassMarkIE(void)
+{
+ rm_EdRet_t umEdRet;
+ T_CNI_RIL3MM_MSG mmMsg;
+ T_CNI_RIL3RRM_MSG rmMsg;
+
+ RDEBUG__(("ENTER--rm_ProcClassMarkIE: entryID=%d\n",
+ rm_ItcRxEntryId));
+
+ //Decode messages in terms of msgType of l3_data
+
+ switch (rm_pItcRxMdMsg->l3_data.buffer[0] & 0x0F)
+ {
+ case RM_PD:
+ //Decode Paging Response message
+ //umEdRet = CNI_RIL3RRM_Decode(
+ // &(rm_pItcRxMdMsg->l3_data),
+ // &rmMsg
+ // );
+ //switch (umEdRet)
+ //{
+ //case RM_UMED_SUCCESS:
+ // break;
+
+ //default:
+ //Um-decoding failed
+ //EDEBUG__(("ERROR-rm_ProcClassMarkIE: Um decode err:%d\n", umEdRet));
+ // break;
+ //}
+
+ break;
+
+ case MM_PD:
+ //umEdRet = CNI_RIL3MM_Decode(
+ // &(rm_pItcRxMdMsg->l3_data),
+ // &mmMsg
+ // );
+ //switch (umEdRet)
+ //{
+ //case RM_UMED_SUCCESS:
+ //rm_UmMmMsgTestPrint(&mmMsg);
+ // break;
+
+ //default:
+ //Um-decoding failed
+ //EDEBUG__(("ERROR-rm_ProcClassMarkIE: Um decode err:%d\n",
+ // umEdRet));
+ // break;
+ //}
+
+ break;
+
+ default:
+ EDEBUG__(("ERROR-rm_ProcClassMarkIE: errno=%d\n", errno));
+ break;
+ }
+} //rm_ProcClassMarkIE()
+
+#endif //__RM_PROCCLASSMARKIE_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_ProcMeasRes.cpp b/data/mnet/GP10/Host/rm/Src/rm_ProcMeasRes.cpp
new file mode 100644
index 0000000..4d3549f
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_ProcMeasRes.cpp
@@ -0,0 +1,40 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_PROCMEASRES_CPP__
+#define __RM_PROCMEASRES_CPP__
+
+#include "rm\rm_head.h"
+
+u8 rm_ProcMeasRes( void )
+{
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_ProcMeasRes\n"));
+
+ if (rm_pItcRxL1Msg->l3_data.buffer[RM_SACCHBAD_POS]==RM_TRUE)
+ {
+ if (++rm_pSmCtxt->pPhyChan->rslCount > RM_RSLCOUNT_BOUND)
+ {
+ rm_pSmCtxt->pPhyChan->rslCount = 0;
+ return RM_RSLIND;
+ }
+ }
+ else
+ {
+ rm_pSmCtxt->pPhyChan->rslCount = 0;
+ /*
+ ** TBD: process measurement data to decide if HO needed.
+ ** If HO needed, send a HO indication message to MM
+ */
+ }
+
+ return RM_LINKED;
+
+} /* Enf of rm_ProcMeasRes() */
+
+#endif /* __RM_PROCMEASRES_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_RetrvConfigFromOam.cpp b/data/mnet/GP10/Host/rm/Src/rm_RetrvConfigFromOam.cpp
new file mode 100644
index 0000000..be1d383
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_RetrvConfigFromOam.cpp
@@ -0,0 +1,105 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_RETRVCONFIGFROMOAM_CPP__
+#define __RM_RETRVCONFIGFROMOAM_CPP__
+
+//GP2
+#if 0
+
+#include "rm\rm_head.h"
+
+
+// Static Table of OAM Table
+
+// Tables in Basic Package
+CellAllocationEntry cellAllocationTable[CellAllocationTableLimit];
+PlmnPermittedEntry plmnPermittedTable[PlmnPermittedTableLimit];
+
+// Table in Option Package
+NotAllowedAccessClassEntry notAllowedAccessClassTable[NotAllowedAccessClassTableLimit];
+
+// Table in TRX packages
+ChannelEntry firstTrxPackageChannelTable[ChannelTableLimit];
+ChannelEntry secondTrxPackageChannelTable[ChannelTableLimit];
+
+CarrierFrequencyEntry firstRadioCarrierPackageFrequencyListTable[CarrierFrequencyTableLimit];
+CarrierFrequencyEntry secondRadioCarrierPackageFrequencyListTable[CarrierFrequencyTableLimit];
+
+// Tables in Adjacent Cell Package
+AdjCell_HandoverEntry adjCell_HandoverTable[HandoverTableLimit];
+//PR1223 Begin
+AdjCell_HandoverEntry adjCell_HandoverTable_t[HandoverTableLimit];
+//PR1223 End
+AdjCell_ReselectionEntry adjCell_ReselectionTable[ReselectionTableLimit];
+
+
+void rm_RetrvConfigFromOam(void)
+{
+ RDEBUG__(("ENTER-rm_RetrvConfigFromOam\n"));
+
+
+ RM_MEMSET(&rm_OamData, sizeof(rm_OamData));
+
+ // Initialize Table area
+ RM_MEMSET(&cellAllocationTable, sizeof(cellAllocationTable));
+ RM_MEMSET(&plmnPermittedTable, sizeof(plmnPermittedTable));
+ RM_MEMSET(&notAllowedAccessClassTable, sizeof(notAllowedAccessClassTable));
+ RM_MEMSET(&firstTrxPackageChannelTable, sizeof(firstTrxPackageChannelTable));
+ RM_MEMSET(&secondTrxPackageChannelTable, sizeof(secondTrxPackageChannelTable));
+
+ RM_MEMSET(&firstRadioCarrierPackageFrequencyListTable, sizeof(firstRadioCarrierPackageFrequencyListTable));
+ RM_MEMSET(&secondRadioCarrierPackageFrequencyListTable, sizeof(secondRadioCarrierPackageFrequencyListTable));
+ RM_MEMSET(&adjCell_HandoverTable, sizeof(adjCell_HandoverTable));
+ RM_MEMSET(&adjCell_ReselectionTable, sizeof(adjCell_ReselectionTable));
+
+
+ //PR1223 Begin
+ RM_MEMSET(&adjCell_HandoverTable_t,sizeof(adjCell_HandoverTable));
+ rm_OamData.adjacentCellPackage_t.adjCell_handoverTable = (Table *) &adjCell_HandoverTable_t;
+ //PR1223 End
+
+ /* This is not needed since it will be done later stage
+
+ // Do appropriate memory mapping
+ rm_OamData.btsBasicPackage.cellAllocationTable->data = (char *) cellAllocationTable;
+ rm_OamData.btsBasicPackage.plmnPermittedTable->data = (char *) plmnPermittedTable;
+ rm_OamData.btsOptionsPackage.notAllowedAccessClassTable->data = (char *) notAllowedAccessClassTable;
+
+ rm_OamData.transceiverPackage[0].channelTable->data = (char *) firstTrxPackageChannelTable;
+ rm_OamData.transceiverPackage[1].channelTable->data = (char *) secondTrxPackageChannelTable;
+
+ rm_OamData.radioCarrierPackage[0].carrierFrequencyList->data = (char *) firstRadioCarrierPackageFrequencyListTable;
+ rm_OamData.radioCarrierPackage[1].carrierFrequencyList->data = (char *) secondRadioCarrierPackageFrequencyListTable;
+
+ rm_OamData.adjacentCellPackage.adjCell_handoverTable->data = (char *) adjCell_HandoverTable;
+ rm_OamData.adjacentCellPackage.adjCell_reselectionTable->data = (char *) adjCell_ReselectionTable;
+
+ */
+
+ //Standard MIB data
+ rm_OamGetGsmData();
+
+ //RM-specific data
+ rm_OamGetRmConfigData();
+
+ //Generate tuneSynthSetting values
+ oam_TrxTuneSynthSetting[0][0] = OAMrm_TRX0_SYNTH_A | (OAMrm_ARFCN(0)&0x3FF);
+ oam_TrxTuneSynthSetting[1][0] = OAMrm_TRX1_SYNTH_A | (OAMrm_ARFCN(1)&0x3FF);
+ oam_TrxTuneSynthSetting[1][1] = OAMrm_TRX1_SYNTH_B | (OAMrm_ARFCN(1)&0x3FF);
+
+ //Register OAM vars
+ rm_OamRegTrapVars();
+
+
+} /* End of rm_RetrvConfigFromOam() */
+
+//GP2
+#endif //#if 0
+
+#endif /* __RM_RETRVCONFIGFROMOAM_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_RrEstReq.cpp b/data/mnet/GP10/Host/rm/Src/rm_RrEstReq.cpp
new file mode 100644
index 0000000..420b309
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_RrEstReq.cpp
@@ -0,0 +1,52 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_RRESTREQ_CPP__
+#define __RM_RRESTREQ_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_RrEstReq(void)
+{
+ //Monitoring entrance to a func
+ RDEBUG__(("ENTER@rm_RrEstReq\n"));
+
+ switch(rm_pItcRxMmMsg->message_type)
+ {
+ case MM_PAGE_REQ:
+ //Block any terminating call initiation if needed
+ if (rm_PhyChanBCcch[RM_PCH_IDX].amState!=unlocked)
+ {
+ PDEBUG__(("INFO@rm_RrEstReq:PCH-resident TS blocked or shutting down now\n"));
+ return;
+ }
+ //Only PagingReqType1 now!
+ rm_SendPagingRequestType1();
+ break;
+
+ case INTRA_L3_RR_HANDOVER_REQ:
+ //Block any terminating call initiation if needed
+ if (rm_PhyChanBCcch[RM_PCH_IDX].amState!=unlocked)
+ {
+ PDEBUG__(("INFO@rm_RrEstReq:PCH-resident TS blocked or shutting down now\n"));
+ //Send back Ho NAck to this Handover Req immediately!
+ rm_SendHoReqNAck(rm_pItcRxMmMsg->l3_data.handReq.mmId);
+ return;
+ }
+ rm_HoReq();
+ break;
+
+ default:
+ UDEBUG__(("UNKNOWN@rm_RrEstReq: message type:%d\n", rm_pItcRxMmMsg->message_type));
+ break;
+
+ } //End of switch()
+
+} //End rm_RrEstReq()
+
+#endif //__RM_RRESTREQ_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_RslReleasel.cpp b/data/mnet/GP10/Host/rm/Src/rm_RslReleasel.cpp
new file mode 100644
index 0000000..f190ea5
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_RslReleasel.cpp
@@ -0,0 +1,393 @@
+
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_RSLRELEASE_CPP__
+#define __RM_RSLRELEASE_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_RslRelease(void)
+{
+ rm_LapdmOId_t lapdmOId;
+
+ RDEBUG__(("ENTER-rm_RslRelease\n"));
+
+ if (rm_pSmCtxt->smType==RM_MAIN_SM)
+ {
+ //SMS-SAPI3-Begin
+
+ //lapdmOId = rm_pSmCtxt->mOId;
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ //rm_SendRrRelInd(RM_MDLERR,rm_ItcRxEntryId);
+ //rm_SendDlRelReq(lapdmOId, RM_SAPI0,RM_LOCAL_RELEASE);
+
+ //if (rm_pSmCtxt->sapi != RM_SAPI0)
+ // rm_SendDlRelReq(lapdmOId, rm_pSmCtxt->sapi,RM_LOCAL_RELEASE);
+
+ //rm_SendDlRelReq(rm_pSmCtxt->mOId, RM_SAPI3, RM_LOCAL_RELEASE);
+ //rm_SendDlRelReq(rm_pSmCtxt->aOId, RM_SAPI3, RM_LOCAL_RELEASE);
+
+ //rm_SmCtxt_t *pASmCtxt;
+ //pASmCtxt = rm_pSmCtxt->pChan->pASmCtxt;
+ //pASmCtxt->state = RM_S1RM_RUNNING;
+
+ //SMS-SAPI3-End
+
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3109);
+
+ rm_pSmCtxt->relCause = CNI_RIL3_CAUSE_DESTINATION_OUT_OF_ORDER;
+ //CNI_RIL3_CAUSE_TEMPORARY_FAILURE; //41
+
+ //Adjust SM state to S7
+ rm_pSmCtxt->state = RM_S7RELEASING_SIGTRAFFICCHAN;
+ rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_RELEASING;
+ }
+ else
+ {
+ //SMS-SAPI3-Begin
+
+ //This case should not happen
+ IDEBUG__(("WARNING@rm_RslRelease: RSL for aEntryId %d\n",
+ rm_ItcRxEntryId));
+
+ //lapdmOId = rm_pSmCtxt->aOId;
+
+ //rm_SendRrRelInd(RM_MDLERR,rm_ItcRxEntryId);
+ //rm_SendDlRelReq(lapdmOId, RM_SAPI0,RM_LOCAL_RELEASE);
+ //SMS-SAPI3_End
+
+ rm_pSmCtxt->state = RM_S1RM_RUNNING;
+ }
+
+}
+
+
+//PR1104
+T_CNI_RIL3_RESULT rm_MsgAnalyze(void)
+{
+ T_CNI_RIL3_RESULT rrEdRet;
+
+ PDEBUG__(("ENTER@rm_MsgAnalyze()\n"));
+
+ rrEdRet = CNI_RIL3RRM_Decode(&(rm_pItcRxMdMsg->l3_data),&rm_UmMsg);
+
+ switch(rrEdRet)
+ {
+ case CNI_RIL3_NON_RRM_MESSAGE:
+ //ignore this message. Maybe an MD-mux problem
+ IDEBUG__(("WARNING@rm_MsgAnalyze: got a non-RM msg(%d,%d) on entryId(%d) at st(%d)\n",
+ rm_UmMsg.header.protocol_descriminator,
+ rm_UmMsg.header.message_type,
+ rm_ItcRxEntryId,
+ rm_pSmCtxt->state));
+ break;
+
+ case CNI_RIL3_UNKNOWN_MESSAGE_TYPE:
+ //Send a RR STATUS message to MS
+ rm_SendRrStatus(CNI_RIL3_RR_MESSAGE_TYPE_NON_EXISTENT);
+ break;
+
+ case CNI_RIL3_MANDATORY_IE_MISSING:
+ case CNI_RIL3_NON_SEMANTICAL_MANDATORY_IE_ERROR:
+ //Releasing the call if not in releasing yet
+ rm_ProcRrRelease(CNI_RIL3_CAUSE_DESTINATION_OUT_OF_ORDER);
+ break;
+
+ case CNI_RIL3_NON_IMPERATIVE_MESSAGE_PART_ERROR:
+ case CNI_RIL3_RESULT_SUCCESS:
+ if ( rm_UmMsg.header.message_type == CNI_RIL3RRM_MSGID_RR_STATUS)
+ {
+ IDEBUG__(("WARNING@rm_MsgAnalyze: got RR STATUS cause(pres %d, val %d) on entryId(%d) at st(%d)\n",
+ rm_UmMsg.rrStatus.rrCause.ie_present,
+ rm_UmMsg.rrStatus.rrCause.causeValue,
+ rm_ItcRxEntryId,
+ rm_pSmCtxt->state));
+ return (CNI_RIL3_NON_IMPERATIVE_MESSAGE_PART_ERROR); //reuse to skip processing in calling part
+ }
+
+ return (CNI_RIL3_RESULT_SUCCESS);
+ break;
+
+ default:
+ break;
+
+ }
+
+ return (rrEdRet);
+
+}
+
+void rm_SendRrStatus(T_CNI_RIL3_RR_CAUSE_VALUE cause)
+{
+ rm_EdRet_t rrEdRet;
+ rm_L3Data_t l3_data;
+ T_CNI_RIL3RRM_MSG_RR_STATUS *pUmRrStatus;
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER@rm_SendRrStatus\n"));
+
+
+ //Select Rr Status message from the union
+ pUmRrStatus = (T_CNI_RIL3RRM_MSG_RR_STATUS *) &(rm_UmMsg.rrStatus);
+
+ // Populate message elements to encode
+ RM_MEMSET( &rm_UmMsg, sizeof(rm_UmMsg_t) );
+
+ //Header--PD,MT,SI
+ pUmRrStatus->header.protocol_descriminator = RM_PD;
+ pUmRrStatus->header.si_ti = RM_SI;
+ pUmRrStatus->header.message_type = CNI_RIL3RRM_MSGID_RR_STATUS;
+
+ //IE--Channel Description
+ pUmRrStatus->rrCause.ie_present = RM_TRUE;
+ pUmRrStatus->rrCause.causeValue = cause;
+
+ //Call RR message encoding functionality
+ rrEdRet = CNI_RIL3RRM_Encode( &rm_UmMsg, &l3_data);
+
+ //Check the encoding result before sending the message
+ switch (rrEdRet)
+ {
+ case RM_RRED_SUCCESS:
+ //Wrap the encoded Paging message in DL_DATA_REQ
+ PostL3SendMsLog(rm_pSmCtxt->mOId,rm_pSmCtxt->sapi,&l3_data );
+ rm_SendDlDataReq(rm_pSmCtxt->mOId,rm_pSmCtxt->sapi,&l3_data );
+
+ break;
+
+ default:
+ //Um message encoding failed
+ EDEBUG__(("ERROR@rm_SendRrStatus: Um encode error:%d\n", rrEdRet ));
+ break;
+
+ } //End of switch(rrEdRet)
+
+} //rm_SendRrStatus()
+
+void rm_ProcRrRelease(T_CNI_RIL3_CAUSE_VALUE cause)
+{
+ int time;
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER@rm_StartRrRelease()\n"));
+
+ //Release the RF channel as well as associated SMs
+ PDEBUG__(("INFO@rm_ProcRrRelease: (module %d, entryId %d, mSt %d, prim %d, msg %d)\n",
+ rm_ItcRxOrigin,
+ rm_ItcRxEntryId,
+ rm_pSmCtxt->state,
+ rm_ItcRxPrimType,
+ rm_ItcRxMsgType));
+
+ switch(rm_pSmCtxt->state)
+ {
+ case RM_S2ACTIVATING_SIGTRAFFIC_CHAN:
+ IDEBUG__(("INFO@rm_ProcRrRelease: (module %d, entryId %d, mSt %d, prim %d, msg %d)\n",
+ rm_ItcRxOrigin,
+ rm_ItcRxEntryId,
+ rm_pSmCtxt->state,
+ rm_ItcRxPrimType,
+ rm_ItcRxMsgType));
+
+ //Got a negative Ack to Channel Activation
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ rm_SendRfChanRelease(rm_pSmCtxt->pPhyChan);
+
+ //Check if Channel Activation is caused by Ho or Chan request
+ if (rm_pSmCtxt->isForHo==RM_TRUE)
+ {
+ //If it's Handover Request caused, send HoReqAck back to MM
+ rm_SendHoReqNAck(rm_pSmCtxt->pPhyChan->hoRef);
+ }
+
+ //SMS-SAPI3-Begin
+ //For benefit of LAPDm's internal cleanup
+ rm_SendDlRelReq(rm_pSmCtxt->mOId,RM_SAPI0,RM_LOCAL_RELEASE);
+ rm_SendDlRelReq(rm_pSmCtxt->mOId,RM_SAPI3,RM_LOCAL_RELEASE);
+ rm_SendDlRelReq(rm_pSmCtxt->aOId,RM_SAPI3,RM_LOCAL_RELEASE);
+
+ //SMS-SAPI3-End
+ //Reset relevant RM channel resources
+ rm_pSmCtxt->state = RM_S1RM_RUNNING;
+ rm_SmCtxt[rm_pSmCtxt->aEntryId].state = RM_S1RM_RUNNING;
+ rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_FREE;
+
+ break;
+
+ case RM_S7RELEASING_SIGTRAFFICCHAN:
+ //Move to S9 and clean S7 watch timers
+ rm_StopTimer(rm_ItcRxEntryId, RM_T3109);
+ rm_StopTimer(rm_ItcRxEntryId, RM_T3L02);
+
+ rm_SendRrRelInd(RM_MDLERR, rm_pSmCtxt->mEntryId);
+
+ case RM_S3SIGCHAN_ACTIVATED:
+ //Release the RF channel as well as associated SMs
+ IDEBUG__(("INFO@rm_ProcRrRelease: (module %d, entryId %d, mSt %d, prim %d, msg %d)\n",
+ rm_ItcRxOrigin,
+ rm_ItcRxEntryId,
+ rm_pSmCtxt->state,
+ rm_ItcRxPrimType,
+ rm_ItcRxMsgType));
+
+ rm_StopTimer( rm_ItcRxEntryId, RM_T3101 );
+ rm_StartTimer( rm_ItcRxEntryId, RM_T3111 );
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ rm_SendRfChanRelease(rm_pSmCtxt->pPhyChan);
+
+ rm_pSmCtxt->relCause = cause;
+
+ rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_RELEASING;
+ rm_pSmCtxt->pPhyChan->T3101.state = RM_FALSE;
+ rm_pSmCtxt->state = RM_S9DEACTIVATING_SIGTRAFFICCHAN;
+ rm_SmCtxt[rm_pSmCtxt->aEntryId].state = RM_S1RM_RUNNING;
+ break;
+
+ case RM_S4TRAFFICCHAN_ACTIVATED:
+ IDEBUG__(("INFO@rm_ProcRrRelease: (module %d, entryId %d, mSt %d, prim %d, msg %d)\n",
+ rm_ItcRxOrigin,
+ rm_ItcRxEntryId,
+ rm_pSmCtxt->state,
+ rm_ItcRxPrimType,
+ rm_ItcRxMsgType));
+
+ if (rm_pSmCtxt->waitHoComplt == RM_TRUE)
+ //ext-HO <xxu:06-25-01>
+ rm_SendHoFailure(0x01,-1); //Radio Interface Failure
+
+ rm_StopTimer( rm_ItcRxEntryId, RM_T3105 );
+ rm_StartTimer( rm_ItcRxEntryId, RM_T3111 );
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ rm_SendRfChanRelease(rm_pSmCtxt->pPhyChan);
+
+ rm_pSmCtxt->relCause = cause;
+
+ rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_RELEASING;
+ rm_pSmCtxt->pPhyChan->T3105.state = RM_FALSE;
+ rm_pSmCtxt->state = RM_S9DEACTIVATING_SIGTRAFFICCHAN;
+ rm_SmCtxt[rm_pSmCtxt->aEntryId].state = RM_S1RM_RUNNING;
+ break;
+
+ case RM_S5SIGMODE_ESTABLISHED:
+ //Release RF resource
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ rm_SendChanRelease(rm_ItcRxEntryId);
+
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3109);
+
+ rm_pSmCtxt->relCause = cause;
+
+ //Adjust SM state to S7
+ rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_RELEASING;
+ rm_pSmCtxt->state = RM_S7RELEASING_SIGTRAFFICCHAN;
+
+ //PM Added:
+ rm_pSmCtxt->pPhyChan->chanBusy = RM_FALSE;
+
+ if (rm_pSmCtxt->pPhyChan->chanType==RM_PHYCHAN_SDCCH4)
+ {
+ if (--rm_NoOfBusySdcch4 >= 0)
+ PM_CellMeasurement.meanNbrOfBusySDCCHs.addRecord(rm_NoOfBusySdcch4);
+ else
+ rm_NoOfBusySdcch4 = 0;
+
+ if (--rm_maxNbrOfBusySDCCHs >= 0)
+ PM_CellMeasurement.maxNbrOfBusySDCCHs.setValue(rm_maxNbrOfBusySDCCHs); // decrement();
+ //PM_CellMeasurement.maxNbrOfBusySDCCHs.addRecord(rm_maxNbrOfBusySDCCHs); // decrement();
+ else
+ rm_maxNbrOfBusySDCCHs = 0;
+ }
+
+ break;
+
+ case RM_S6ACTIVATING_TRAFFICMODE:
+ case RM_S8TRAFFICMODE_ACTIVATED:
+ IDEBUG__(("INFO@rm_ProcRrRelease: (module %d, entryId %d, mSt %d, prim %d, msg %d)\n",
+ rm_ItcRxOrigin,
+ rm_ItcRxEntryId,
+ rm_pSmCtxt->state,
+ rm_ItcRxPrimType,
+ rm_ItcRxMsgType));
+
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ rm_SendChanRelease(rm_ItcRxEntryId);
+
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3109);
+
+ rm_pSmCtxt->relCause = cause;
+
+ //Adjust SM state to S7
+ rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_RELEASING;
+ rm_pSmCtxt->state = RM_S7RELEASING_SIGTRAFFICCHAN;
+ break;
+
+ case RM_S10TRAFFICMODE_ESTABLISHED:
+ case RM_S11TRAFFICCHAN_SUSPENDING:
+
+ rm_SendChanRelease(rm_ItcRxEntryId);
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3109);
+
+ rm_pSmCtxt->relCause = cause;
+
+ //Adjust SM state to S7
+ rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_RELEASING;
+ rm_pSmCtxt->state = RM_S7RELEASING_SIGTRAFFICCHAN;
+
+ //PM: maxNbrOfBusyTCHs, meanNbrOfBusyTCHs
+
+ if (--rm_NoOfBusyTchf >= 0)
+ PM_CellMeasurement.meanNbrOfBusyTCHs.addRecord(rm_NoOfBusyTchf);
+ else
+ rm_NoOfBusyTchf = 0;
+
+ time = tickGet() - rm_pSmCtxt->pPhyChan->startTime;
+ PM_CellMeasurement.meanTCHBusyTime.addRecord(time);
+
+ rm_pSmCtxt->pPhyChan->startTime=tickGet();
+
+ if (--rm_maxNbrOfBusyTCHs >= 0)
+ PM_CellMeasurement.maxNbrOfBusyTCHs.setValue(rm_maxNbrOfBusyTCHs); //decrement();
+ else
+ rm_maxNbrOfBusyTCHs = 0;
+
+ rm_pSmCtxt->pPhyChan->chanBusy = RM_FALSE;
+
+ break;
+
+ case RM_S9DEACTIVATING_SIGTRAFFICCHAN:
+ IDEBUG__(("INFO@rm_ProcRrRelease: (module %d, entryId %d, mSt %d, prim %d, msg %d)\n",
+ rm_ItcRxOrigin,
+ rm_ItcRxEntryId,
+ rm_pSmCtxt->state,
+ rm_ItcRxPrimType,
+ rm_ItcRxMsgType));
+
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ rm_SendRfChanRelease(rm_pSmCtxt->pPhyChan);
+ break;
+
+ default:
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ rm_SendRfChanRelease(rm_pSmCtxt->pPhyChan);
+
+ IDEBUG__(("INFO@rm_ProcRrRelease: (module %d, entryId %d, mSt %d, prim %d, msg %d)\n",
+ rm_ItcRxOrigin,
+ rm_ItcRxEntryId,
+ rm_pSmCtxt->state,
+ rm_ItcRxPrimType,
+ rm_ItcRxMsgType));
+ break;
+
+ }
+
+} //rm_ProcRrRelease()
+
+#endif //__RM_RSLRELEASE_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_S0Null.cpp b/data/mnet/GP10/Host/rm/Src/rm_S0Null.cpp
new file mode 100644
index 0000000..8a98a4e
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_S0Null.cpp
@@ -0,0 +1,22 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_S0NULL_CPP__
+#define __RM_S0NULL_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_S0Null( void )
+{
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_S0Null\n"));
+
+ TDEBUG__(("TRACE-rm_S0Null carries no logic\n"));
+}
+
+#endif /* __RM_S0NULL_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_S10TrafficModeEstablished.cpp b/data/mnet/GP10/Host/rm/Src/rm_S10TrafficModeEstablished.cpp
new file mode 100644
index 0000000..50f872a
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_S10TrafficModeEstablished.cpp
@@ -0,0 +1,216 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __RM_S10TRAFFICMODEESTABLISHED_CPP__
+#define __RM_S10TRAFFICMODEESTABLISHED_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_S10TrafficModeEstablished(void)
+{
+ u8 ret;
+ int time;
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER@rm_S10TrafficModeEstablished\n"));
+
+ //In this design, RM does not watch any MEAS RPTS. Thus not deciding RSL here
+
+ switch(rm_ItcRxOrigin)
+ {
+ case MODULE_L1:
+ //HOADDED
+ if ( rm_pItcRxL1Msg->l3_data.buffer[0]==RM_L1MG_DEDMGMT &&
+ rm_pItcRxL1Msg->l3_data.buffer[1]==RM_L1MT_ASYNCHO_REQUIRED_MSB &&
+ rm_pItcRxL1Msg->l3_data.buffer[2]==RM_L1MT_ASYNCHO_REQUIRED_LSB )
+ {
+ //Received Async Handover Required Indication from DSP & pass to CC
+ rm_SendAsyncHoRequired();
+ } else
+ {
+ rm_ProcL1ModeAckNAck();
+ }
+ break;
+
+ case MODULE_MD:
+ //MDLRrrRpt processing centralized somewhere else
+ //Handle DL_DATA_IND w CHN MODE MODIFY ACK inside
+
+ if ( rm_pItcRxMdMsg->primitive_type == DL_REL_IND )
+ {
+
+ if (rm_pSmCtxt->smType==RM_MAIN_SM)
+ {
+ rm_ProcRrRelease(CNI_RIL3_CAUSE_NORMAL_UNSPECIFIED);
+ return;
+ //SMS-SAPI3-Begin
+ //lapdmOId = rm_pSmCtxt->mOId;
+ // rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ //rm_SendRrRelInd(RM_MDLERR,rm_ItcRxEntryId);
+
+ //CT_CHN rm_SendDlRelReq(lapdmOId, RM_SAPI0,
+ // rm_pSmCtxt->chanType,RM_LOCAL_RELEASE);
+ //rm_SendDlRelReq(rm_pSmCtxt->mOId, RM_SAPI0, RM_LOCAL_RELEASE);
+
+ //if (rm_pSmCtxt->sapi != RM_SAPI0)
+ // //CT_CHN rm_SendDlRelReq(lapdmOId, rm_pSmCtxt->sapi,
+ // // rm_pSmCtxt->chanType,RM_LOCAL_RELEASE);
+ // rm_SendDlRelReq(lapdmOId, rm_pSmCtxt->sapi,RM_LOCAL_RELEASE);
+
+ //The following is for safety-guard purpose, thus may be redundancy
+ //rm_SendDlRelReq(rm_pSmCtxt->mOId, RM_SAPI3, RM_LOCAL_RELEASE);
+ //rm_SendDlRelReq(rm_pSmCtxt->aOId, RM_SAPI3, RM_LOCAL_RELEASE);
+
+ //rm_SmCtxt_t *pASmCtxt;
+ //pASmCtxt = rm_pSmCtxt->pPhyChan->pASmCtxt;
+ //pASmCtxt->state = RM_S1RM_RUNNING;
+
+ //SMS-SAPI3-End
+
+ //rm_StartTimer(rm_ItcRxEntryId, RM_T3109);
+
+ //rm_pSmCtxt->relCause = CNI_RIL3_CAUSE_NORMAL_UNSPECIFIED;
+ // //CNI_RIL3_CAUSE_DESTINATION_OUT_OF_ORDER;
+ // //CNI_RIL3_CAUSE_TEMPORARY_FAILURE;
+
+ // Adjust SM state to S7
+ //rm_pSmCtxt->state = RM_S7RELEASING_SIGTRAFFICCHAN;
+ //rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_RELEASING;
+
+ //SMS-SAPI3-Begin
+ }
+ //} else
+ //{
+ //lapdmOId = rm_pSmCtxt->aOId;
+
+ //SMS-SAPI3-Begin
+
+ //rm_SendRrRelInd(RM_MDLERR,rm_ItcRxEntryId);
+ //CT_CHN rm_SendDlRelReq(lapdmOId, RM_SAPI0,
+ // rm_pSmCtxt->chanType,RM_LOCAL_RELEASE);
+ //rm_SendDlRelReq(lapdmOId, RM_SAPI3, RM_LOCAL_RELEASE);
+
+ //SMS-SAPI3-End
+
+ //rm_pSmCtxt->state = RM_S1RM_RUNNING;
+ //}
+
+ //SMS-SAPI3-End
+
+ } else if (rm_pItcRxMdMsg->primitive_type == DL_DATA_IND)
+ {
+ rm_ProcMsModeModifyAckNack();
+
+ } else
+ {
+ EDEBUG__(("ERROR@rm_S10TrafficModeEstablished: unexp L2/prim:%d\n",
+ rm_pItcRxMdMsg->primitive_type));
+ }
+ break;
+
+ case MODULE_MM:
+ //Handle RR_REL_REQ on both main & acch signaling
+ if ( rm_pItcRxMmMsg->primitive_type == RR_REL_REQ )
+ {
+ //SMS-SAPI3-Begin
+ //Check if entryId is linked to main or acch SM */
+ if (rm_SmCtxt[rm_ItcRxEntryId].smType != RM_MAIN_SM)
+ {
+ //RR_REL_REQ linked to acch SM. Main SM not affected
+ IDEBUG__(("WARNING@rm_S10TrafficModeEstablished: MM msgType %d for aEntryId %d\n",
+ rm_pItcRxMmMsg->message_type,
+ rm_ItcRxEntryId));
+
+ // rm_SendRrRelInd(RM_MDLERR, rm_pSmCtxt->aEntryId);
+ // //CT_CHN rm_SendDlRelReq(rm_pSmCtxt->aOId, RM_SAPI0,RM_CTSACCH,RM_NORMAL);
+ // rm_SendDlRelReq(rm_pSmCtxt->aOId, RM_SAPI0,RM_NORMAL);
+
+ // if (rm_pSmCtxt->sapi != RM_SAPI0)
+ // //CT_CHN rm_SendDlRelReq(rm_pSmCtxt->aOId, rm_pSmCtxt->sapi,
+ // // RM_CTSACCH,RM_LOCAL_RELEASE);
+ // rm_SendDlRelReq(rm_pSmCtxt->aOId, rm_pSmCtxt->sapi,RM_LOCAL_RELEASE);
+ } else
+ {
+ //EntryId linked to main SM. Release everything
+ //May need to handle a little bit more here later
+ //rm_SendRrRelInd(RM_MDLERR, rm_pSmCtxt->aEntryId);
+
+ rm_SendChanRelease(rm_ItcRxEntryId);
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3109);
+
+ rm_pSmCtxt->relCause = CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING;
+
+ //Adjust SM state to S7
+ rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_RELEASING;
+ rm_pSmCtxt->state = RM_S7RELEASING_SIGTRAFFICCHAN;
+
+ //PM: maxNbrOfBusyTCHs, meanNbrOfBusyTCHs
+
+ if (--rm_NoOfBusyTchf >= 0)
+ PM_CellMeasurement.meanNbrOfBusyTCHs.addRecord(rm_NoOfBusyTchf);
+ else
+ rm_NoOfBusyTchf = 0;
+
+ time = tickGet() - rm_pSmCtxt->pPhyChan->startTime;
+ PM_CellMeasurement.meanTCHBusyTime.addRecord(time);
+
+ rm_pSmCtxt->pPhyChan->startTime=tickGet();
+
+ if (--rm_maxNbrOfBusyTCHs >= 0)
+ PM_CellMeasurement.maxNbrOfBusyTCHs.setValue(rm_maxNbrOfBusyTCHs); //decrement();
+ //PM_CellMeasurement.maxNbrOfBusyTCHs.addRecord(rm_maxNbrOfBusyTCHs); //decrement();
+ else
+ rm_maxNbrOfBusyTCHs = 0;
+
+ rm_pSmCtxt->pPhyChan->chanBusy = RM_FALSE;
+ }
+
+ } else
+ //Unexpected message from MM
+ IDEBUG__(("WARNING@rm_S10TrafficModeEstablished:MM msgType:%d\n",
+ rm_pItcRxMmMsg->message_type));
+ break;
+
+ case MODULE_CC:
+ //Process a message received from CC
+ switch (rm_pItcRxCcMsg->message_type)
+ {
+ case INTRA_L3_RR_CHANN_ASSIGN_CMD:
+ rm_ProcChanAssignCmd();
+ break;
+ case INTRA_L3_RR_HANDOVER_COMMAND:
+ //Send HO Command to MS and advance SM state
+ rm_SendHandoverCommand();
+ rm_pSmCtxt->state = RM_S11TRAFFICCHAN_SUSPENDING;
+ break;
+ //case INTRA_L3_CM_CONN_CMD:
+ default:
+ IDEBUG__(("WARNING@rm_S10TrafficModeEstablished: invalid CC msgType=%d\n",
+ rm_pItcRxCcMsg->message_type));
+ break;
+ }
+ break;
+
+ case MODULE_RM:
+ //Handle T3L01 exp here!
+ rm_ProcT3L01Expiry();
+ break;
+
+ default:
+ //Unexpected message orgination
+ IDEBUG__(("WARNING@rm_S10TrafficModeEstablished:wrong msg origination:%d\n",
+ rm_ItcRxOrigin));
+ break;
+
+ } //End of switch()
+
+} //End of rm_S10TrafficModeEstablished()
+
+#endif //__RM_S10TRAFFICMODEESTABLISHED_CPP__
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_S11TrafficChanSuspendig.cpp b/data/mnet/GP10/Host/rm/Src/rm_S11TrafficChanSuspendig.cpp
new file mode 100644
index 0000000..6095f64
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_S11TrafficChanSuspendig.cpp
@@ -0,0 +1,212 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_S11TRAFFICCHANSUSPENDING_CPP__
+#define __RM_S11TRAFFICCHANSUSPENDING_CPP__
+
+//HOADDED
+#include "rm\rm_head.h"
+
+void rm_S11TrafficChanSuspending(void)
+{
+ rm_EdRet_t rrEdRet; //Return code from RR decode
+
+ RDEBUG__(("ENTER-rm_S11TrafficChanSuspending\n"));
+
+ switch(rm_ItcRxOrigin)
+ {
+ case MODULE_MM:
+ //SMS-SAPI3-Begin
+
+ //Got a message from MM:
+ //If it is RR_REL_REQ. In terms of entryId, it could be linked to either
+ //main signaling or associated signaling.
+
+ if (rm_SmCtxt[rm_ItcRxEntryId].smType != RM_MAIN_SM)
+ {
+ //RR_REL_REQ linked to acch SM. Main SM not affected
+ IDEBUG__(("WARNING@rm_S11TrafficChanSuspending: MM msgType %d for aEntryId %d\n",
+ rm_pItcRxMmMsg->message_type,
+ rm_ItcRxEntryId));
+ return;
+ }
+
+ if ( rm_pItcRxMmMsg->primitive_type == RR_REL_REQ )
+ {
+ // Release caused by HO SUCCESS
+ if (rm_pItcRxMmMsg->message_type == INTRA_L3_RR_HANDOVER_COMPLETE)
+ {
+ //HOADDED
+ //HO SUCCESS. Do local release of old connection and change both SM's
+ //and phyChan's state
+ PDEBUG__(("rm@S11TrafficChanSuspending: HO SUCCESS\n"));
+ rm_ProcRrRelease(CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING);
+ //if (rm_SmCtxt[rm_ItcRxEntryId].smType != RM_MAIN_SM)
+ // EDEBUG__(("ERROR@rm_S11TrafficChanSuspending:HO going on SACCH\n"));
+ //rm_RslRelease();
+ return;
+ }
+
+ // Release not caused by HO SUCCESS. Check if entryId is linked to
+ // main or acch SM
+ if (rm_SmCtxt[rm_ItcRxEntryId].smType != RM_MAIN_SM)
+ {
+ //RR_REL_REQ linked to acch SM. Main SM not affected
+ IDEBUG__(("WARNING@rm_S11TrafficChanSuspending:RrRelReq on acch SM '%d'\n",
+ rm_ItcRxEntryId));
+
+// if (rm_pSmCtxt->sapi != RM_SAPI0)
+//CT_CHN rm_SendDlRelReq(rm_pSmCtxt->aOId, rm_pSmCtxt->sapi,
+// RM_CTSACCH,RM_LOCAL_RELEASE);
+// rm_SendDlRelReq(rm_pSmCtxt->aOId, rm_pSmCtxt->sapi,RM_LOCAL_RELEASE);
+//
+//CT_CHN rm_SendDlRelReq(rm_pSmCtxt->aOId, RM_SAPI0,RM_CTSACCH,RM_NORMAL);
+// rm_SendDlRelReq(rm_pSmCtxt->aOId, RM_SAPI3, RM_LOCAL_RELEASE);
+// rm_SendRrRelInd(RM_MDLERR, rm_pSmCtxt->aEntryId);
+ }
+ else
+ {
+ //EntryId linked to main SM. Release everything
+ //SMSADDED
+ //rm_SendRrRelInd(RM_MDLERR, rm_pSmCtxt->aEntryId);
+ rm_SendChanRelease(rm_ItcRxEntryId);
+
+ //Deactivate sacch to start RF channel release
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3109);
+
+ rm_pSmCtxt->relCause = CNI_RIL3_CAUSE_DESTINATION_OUT_OF_ORDER;
+ //CNI_RIL3_CAUSE_NORMAL_UNSPECIFIED;
+
+ //Adjust SM state to S7
+ rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_RELEASING;
+ rm_pSmCtxt->state = RM_S7RELEASING_SIGTRAFFICCHAN;
+ /*PR1247 begin*/
+ //PM: maxNbrOfBusyTCHs, meanNbrOfBusyTCHs
+
+ if (--rm_NoOfBusyTchf >= 0)
+ PM_CellMeasurement.meanNbrOfBusyTCHs.addRecord(rm_NoOfBusyTchf);
+ else
+ rm_NoOfBusyTchf = 0;
+
+ int time = tickGet() - rm_pSmCtxt->pPhyChan->startTime;
+ PM_CellMeasurement.meanTCHBusyTime.addRecord(time);
+
+ rm_pSmCtxt->pPhyChan->startTime=tickGet();
+
+ if (--rm_maxNbrOfBusyTCHs >= 0)
+ PM_CellMeasurement.maxNbrOfBusyTCHs.setValue(rm_maxNbrOfBusyTCHs); //decrement();
+ //PM_CellMeasurement.maxNbrOfBusyTCHs.addRecord(rm_maxNbrOfBusyTCHs); //decrement();
+ else
+ rm_maxNbrOfBusyTCHs = 0;
+
+ rm_pSmCtxt->pPhyChan->chanBusy = RM_FALSE;
+ /*PR1247 end*/
+ }
+ } else if (rm_pItcRxMmMsg->message_type == INTRA_L3_RR_HANDOVER_FAILURE)
+ {
+ //HO FAILURE. Stay with current connection
+ //Currently neither MM nor CC will pass this FAILURE to RM module.
+ EDEBUG__(("ERROR-rm_S11TrafficChanSuspending: got HO FAILURE from MM\n"));
+ rm_pSmCtxt->state = RM_S10TRAFFICMODE_ESTABLISHED;
+
+ } else
+ //Unexpected message from MM
+ UDEBUG__(("UNKNOWN-rm_S11TrafficChanSuspending:MM msgType:%d\n",
+ rm_pItcRxMmMsg->message_type));
+ break;
+
+ case MODULE_MD:
+ //Check if received HO FAILURE from MS. And pass this possible HO FAILURE to
+ //CC directly.
+ if ( rm_pItcRxMdMsg->primitive_type == DL_REL_IND )
+ {
+ if (rm_pSmCtxt->smType==RM_MAIN_SM)
+ {
+ rm_ProcRrRelease(CNI_RIL3_CAUSE_NORMAL_UNSPECIFIED);
+ return;
+
+ //SMS-SAPI3-Begin
+ //rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ //rm_SendDlRelReq(lapdmOId, RM_SAPI0, RM_LOCAL_RELEASE);
+
+ //The following is for safety-guard purpose, thus may be redundancy
+ //rm_SendDlRelReq(rm_pSmCtxt->mOId, RM_SAPI3, RM_LOCAL_RELEASE);
+ //rm_SendDlRelReq(rm_pSmCtxt->aOId, RM_SAPI3, RM_LOCAL_RELEASE);
+
+ //rm_StartTimer(rm_ItcRxEntryId, RM_T3109);
+
+ //rm_pSmCtxt->relCause = CNI_RIL3_CAUSE_DESTINATION_OUT_OF_ORDER;
+ //CNI_RIL3_CAUSE_TEMPORARY_FAILURE;
+
+ // Adjust SM state to S7
+ //rm_pSmCtxt->state = RM_S7RELEASING_SIGTRAFFICCHAN;
+ //rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_RELEASING;
+
+ }
+
+ } else if (rm_pItcRxMdMsg->primitive_type == DL_DATA_IND)
+ {
+ //Decode the received l3_data to see if it's expected HO FAILURE message
+ //PR1104
+ //rrEdRet = CNI_RIL3RRM_Decode( &(rm_pItcRxMdMsg->l3_data),&rm_UmMsg );
+ rrEdRet = rm_MsgAnalyze();
+
+ if ( rrEdRet != RM_RRED_SUCCESS )
+ {
+ EDEBUG__(("ERROR-rm_S11TrafficChanSuspending:Failed decode L2/l3 msg\n"));
+ return;
+ }
+
+ //Decoding successful. Further check if it's expected HO FAILURE message
+ if ( rm_UmMsg.header.protocol_descriminator != RM_PD ||
+ rm_UmMsg.header.message_type != CNI_RIL3RRM_MSGID_HANDOVER_FAILURE )
+ {
+ EDEBUG__(("ERROR-rm_S11TrafficChanSuspending:unexpected msg:PD=%d;MT=%x",
+ rm_UmMsg.header.protocol_descriminator,
+ rm_UmMsg.header.message_type ));
+ rm_SendRrStatus(CNI_RIL3_RR_MESSAGE_TYPE_NOT_COMPATIBLE);
+ return;
+ }
+
+ //PR: gathering handover failure causes rather than normal event
+ if ( (!rm_UmMsg.handoverFailure.rrCause.ie_present) ||
+ (rm_UmMsg.handoverFailure.rrCause.causeValue != CNI_RIL3_RR_NORMAL_EVENT) )
+ {
+ IDEBUG__(("WARNING@rm_S11TrafficChanSuspending: ho failed on (ie_present %d, cause %d)\n",
+ rm_UmMsg.handoverFailure.rrCause.ie_present,
+ rm_UmMsg.handoverFailure.rrCause.causeValue));
+ }
+
+ //Got HO FAILURE message from mobile
+ //No timer monitoring if RM needs go back to S10 while it is staying @S11
+ //thus no action seen here to stop any running timer.
+ //Send HO FAILURE message to CC and continue with the current RF Channel.
+ rm_SendHoFailure(0x0A,-1); //Radio Interface failure, revert to old channel
+ rm_pSmCtxt->state = RM_S10TRAFFICMODE_ESTABLISHED;
+
+ } else
+ {
+ EDEBUG__(("ERROR-rm_S11TrafficChanSuspending: unexpected L2/primitive:%d\n",
+ rm_pItcRxMdMsg->primitive_type));
+
+ }
+
+ break;
+
+ default:
+ //Processing of RSL(L1) and MDL_ERR_RPT(L2) have been extracted out of
+ //here and centralized in one place. Thus, they should not appear here.
+ UDEBUG__(("rm_S11TrafficChanSuspending: unexpected msg origination:%d\n",
+ rm_ItcRxOrigin));
+ break;
+
+ } //End of switch()
+}
+
+#endif //_RM_S11TRAFFICCHANSUSPENDING_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_S1RmRunning.cpp b/data/mnet/GP10/Host/rm/Src/rm_S1RmRunning.cpp
new file mode 100644
index 0000000..440c930
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_S1RmRunning.cpp
@@ -0,0 +1,233 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+
+#ifndef __RM_S1RMRUNNING_CPP__
+#define __RM_S1RMRUNNING_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_S1RmRunning( void )
+{
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER@rm_S1RmRunning\n"));
+ switch(rm_ItcRxOrigin)
+ {
+ case MODULE_L1:
+ // Got a message from L1, process it if it is for CBCH
+ if (rm_pItcRxL1Msg->l3_data.buffer[0]==RM_L1MG_DEDMGMT)
+ {
+ // Check if having got Ack to the Channel Activation sent earlier
+ if (rm_pItcRxL1Msg->l3_data.buffer[1]==RM_L1MT_CHANACTIVACK_MSB &&
+ rm_pItcRxL1Msg->l3_data.buffer[2]==RM_L1MT_CHANACTIVACK_LSB )
+ {
+ //Got a positive ack to the Channel Activation
+
+ //SMS-SAPI3-Begin
+ //Call LAPDm local release to clean up the channel for safety only
+ //rm_SendDlRelReq(rm_pSmCtxt->mOId,rm_pSmCtxt->sapi,RM_LOCAL_RELEASE);
+
+ rm_SendDlRelReq(rm_pSmCtxt->mOId,RM_SAPI0,RM_LOCAL_RELEASE);
+ rm_SendDlRelReq(rm_pSmCtxt->mOId,RM_SAPI3,RM_LOCAL_RELEASE);
+ rm_SendDlRelReq(rm_pSmCtxt->aOId,RM_SAPI3,RM_LOCAL_RELEASE);
+
+ //SMS-SAPI3-End
+
+ //Further check if this Ack is expected
+ if (rm_pItcRxL1Msg->l3_data.buffer[3]!=rm_pCbchChan->trxNumber ||
+ rm_pItcRxL1Msg->l3_data.buffer[4]!=rm_pCbchChan->chanNumberMSB ||
+ rm_pItcRxL1Msg->l3_data.buffer[5]!=rm_pCbchChan->chanNumberLSB )
+ {
+ //IDEBUG__(("WARNING@rm_S1RmRunning: ack to unexpect chan (%d,%d,%d)\n",
+ // rm_pItcRxL1Msg->l3_data.buffer[3],
+ // rm_pItcRxL1Msg->l3_data.buffer[4],
+ // rm_pItcRxL1Msg->l3_data.buffer[5]));
+
+ return;
+ }
+
+ //It is an expected ack msg
+ if (rm_pCbchChan->usable==RM_PHYCHAN_CBCH_USABLE)
+ {
+ rm_BroadcastNilCbMsg();
+ rm_ChanCbchActive = RM_TRUE;
+ //GP2
+ //rm_SendSystemInfo4ToBcchTrx(0, RM_L1SYSINFO_TYPE_4,OAMrm_RA_CELL_BARRED_STATE);
+ }
+ }
+ // Check if having got NAck to the Channel Activation msg sent earlier
+ else if ( rm_pItcRxL1Msg->l3_data.buffer[1]==RM_L1MT_CHANACTIVNACK_MSB &&
+ rm_pItcRxL1Msg->l3_data.buffer[2]==RM_L1MT_CHANACTIVNACK_LSB )
+ {
+ //Got a negative Ack to Channel Activation sent out eariler
+
+ //SMS-SAPI3-Begin
+
+ //Call LAPDm local release to clean up the channel for safety only
+ //rm_SendDlRelReq(rm_pSmCtxt->mOId,rm_pSmCtxt->sapi,RM_LOCAL_RELEASE);
+
+ rm_SendDlRelReq(rm_pSmCtxt->mOId,RM_SAPI0,RM_LOCAL_RELEASE);
+ rm_SendDlRelReq(rm_pSmCtxt->mOId,RM_SAPI3,RM_LOCAL_RELEASE);
+ rm_SendDlRelReq(rm_pSmCtxt->aOId,RM_SAPI3,RM_LOCAL_RELEASE);
+
+ //SMS-SAPI3-End
+
+ //Further check if this NAck is expected
+ if (rm_pItcRxL1Msg->l3_data.buffer[3]!=rm_pCbchChan->trxNumber ||
+ rm_pItcRxL1Msg->l3_data.buffer[4]!=rm_pCbchChan->chanNumberMSB ||
+ rm_pItcRxL1Msg->l3_data.buffer[5]!=rm_pCbchChan->chanNumberLSB )
+ {
+ IDEBUG__(("WARNING@rm_S1RmRunning: nack to unexpect chan (%d,%d,%d)\n",
+ rm_pItcRxL1Msg->l3_data.buffer[3],
+ rm_pItcRxL1Msg->l3_data.buffer[4],
+ rm_pItcRxL1Msg->l3_data.buffer[5]));
+ return;
+ }
+
+ //It is an expected nack msg
+ IDEBUG__(("WARNING@rm_S1RmRunning: got expected nack (%d,%d,%d)\n",
+ rm_pItcRxL1Msg->l3_data.buffer[3],
+ rm_pItcRxL1Msg->l3_data.buffer[4],
+ rm_pItcRxL1Msg->l3_data.buffer[5]));
+ }
+ // Check if got RF channel release acknowledgment
+ else if(rm_pItcRxL1Msg->l3_data.buffer[1]==RM_L1MT_RFCHANRELACK_MSB &&
+ rm_pItcRxL1Msg->l3_data.buffer[2]==RM_L1MT_RFCHANRELACK_LSB )
+ {
+ // Further check if the RF channel release coming for CBCH channel
+ if (rm_pItcRxL1Msg->l3_data.buffer[3]!=rm_pCbchChan->trxNumber ||
+ rm_pItcRxL1Msg->l3_data.buffer[4]!=rm_pCbchChan->chanNumberMSB ||
+ rm_pItcRxL1Msg->l3_data.buffer[5]!=rm_pCbchChan->chanNumberLSB )
+ {
+ //IDEBUG__(("WARNING@rm_S1RmRunning: rf ack to unexpect chan(%d,%d,%d)\n",
+ // rm_pItcRxL1Msg->l3_data.buffer[3],
+ // rm_pItcRxL1Msg->l3_data.buffer[4],
+ // rm_pItcRxL1Msg->l3_data.buffer[5]));
+ return;
+ }
+
+ // Got expected RF chan release ack, return CBCH to SDCCH for normal use
+ if (rm_pCbchChan->usable != RM_PHYCHAN_UNUSABLE)
+ rm_pCbchChan->usable = RM_PHYCHAN_USABLE;
+ }
+ // Check if got CBCH ready to send message
+ else if(rm_pItcRxL1Msg->l3_data.buffer[1]==RM_L1MT_CBCHRTS_MSB &&
+ rm_pItcRxL1Msg->l3_data.buffer[2]==RM_L1MT_CBCHRTS_LSB )
+ {
+ // Further check if the RTS message is coming for CBCH channel
+ if (rm_pItcRxL1Msg->l3_data.buffer[3]!=rm_pCbchChan->trxNumber ||
+ rm_pItcRxL1Msg->l3_data.buffer[4]!=rm_pCbchChan->chanNumberMSB ||
+ rm_pItcRxL1Msg->l3_data.buffer[5]!=rm_pCbchChan->chanNumberLSB )
+
+ //rm_pItcRxL1Msg->l3_data.buffer[4]!=RM_L1CBCH_CHANNUMBER_MSB ||
+ //rm_pItcRxL1Msg->l3_data.buffer[5]!=RM_L1CBCH_CHANNUMBER_MSB )
+ {
+ IDEBUG__(("WARNING@rm_S1RmRunning: rts not for cbch(%d,%d,%d)\n",
+ rm_pItcRxL1Msg->l3_data.buffer[3],
+ rm_pItcRxL1Msg->l3_data.buffer[4],
+ rm_pItcRxL1Msg->l3_data.buffer[5]));
+ return;
+ }
+ //PR 1323 Shedule message broadcast
+ if ( !OAMrm_CBCH_OPSTATE )
+ {
+ IDEBUG__(("CBC is not turn on\n"));
+ return;
+ }
+
+ //Really got an RTS for CBCH channel, pass down another page if there is
+ //if (rm_SmscbcMsg.morPage && rm_SmscbcMsg.totPage>1)
+ //{
+ // rm_BroadcastNewCbMsg(rm_SmscbcMsg.curPage);
+ // if ((++rm_SmscbcMsg.curPage)>rm_SmscbcMsg.totPage)
+ // rm_SmscbcMsg.curPage = 1;
+ //} else
+ // PDEBUG__(("INFO@rm_S1RmRunning: useless cbch RTS. more=%d,tPage=%d\n",
+ // rm_SmscbcMsg.morPage, rm_SmscbcMsg.totPage));
+ //}
+
+ u8 BroadCast_over = 0;
+ u8 oldCurPage = rm_CbMsgTable.curMsg;
+ do{
+ u8 totPage = rm_CbMsgTable.table[rm_CbMsgTable.curMsg].totPage;
+
+ if( rm_CbMsgTable.table[rm_CbMsgTable.curMsg].state == 1 ) //active
+ {
+ if( rm_CbMsgTable.table[rm_CbMsgTable.curMsg].curPageInCurMsg < totPage )//more page
+ {
+ rm_BroadcastNewCbMsg( rm_CbMsgTable.curMsg );
+ rm_CbMsgTable.table[rm_CbMsgTable.curMsg].curPageInCurMsg++;
+ BroadCast_over = 1;
+ }
+ //one page or last page
+ else if( totPage != 0 &&
+ rm_CbMsgTable.table[rm_CbMsgTable.curMsg].curPageInCurMsg == totPage)
+ {
+ rm_BroadcastNewCbMsg( rm_CbMsgTable.curMsg );
+ BroadCast_over = 1;
+ rm_CbMsgTable.table[rm_CbMsgTable.curMsg].curPageInCurMsg = 1;
+ ++rm_CbMsgTable.curMsg;
+ if(rm_CbMsgTable.curMsg == SmsCbc_TableRow_MAX)
+ rm_CbMsgTable.curMsg = 0;
+ }
+
+ else if(totPage == 0 )//null message
+ {
+ rm_CbMsgTable.table[rm_CbMsgTable.curMsg].state = -1;
+ ++rm_CbMsgTable.curMsg;
+ if(rm_CbMsgTable.curMsg == SmsCbc_TableRow_MAX)
+ rm_CbMsgTable.curMsg = 0;
+ }
+ }
+ else//inactive
+ {
+ ++rm_CbMsgTable.curMsg;
+ if(rm_CbMsgTable.curMsg == SmsCbc_TableRow_MAX)
+ rm_CbMsgTable.curMsg = 0;
+ }
+
+ if (rm_CbMsgTable.curMsg==oldCurPage && BroadCast_over ==0)
+ {
+ rm_BroadcastNilCbMsg();
+ BroadCast_over = 1;
+ }
+ }while(BroadCast_over == 0);
+ }
+ //PR 1323 End
+
+ // Got a message of unexpected message type landed at this SM state
+ else
+ IDEBUG__(("WARNING@rm_S2ActivatingSigTrafficChan: unexpect L1 MT(%d,%d,%d)\n",
+ rm_pItcRxL1Msg->l3_data.buffer[0],
+ rm_pItcRxL1Msg->l3_data.buffer[1],
+ rm_pItcRxL1Msg->l3_data.buffer[2]));
+ }
+
+ // Got a message of unexpected message group landed at this SM state
+ else
+ IDEBUG__(("WARNING@rm_S1RmRunning: unexpect L1 MG(%d,%d,%d)\n",
+ rm_pItcRxL1Msg->l3_data.buffer[0],
+ rm_pItcRxL1Msg->l3_data.buffer[1],
+ rm_pItcRxL1Msg->l3_data.buffer[2]));
+ break;
+
+ default:
+ //SMS-SAPI3-Begin
+
+ //Unexpected message orgination
+ //IDEBUG__(("WARNING@rm_S1RmRunning: wrong msg origination:%d\n",
+ // rm_ItcRxOrigin));
+
+ //SMS-SAPI3-End
+
+ break;
+
+ } //End of switch()
+}
+
+#endif //__RM_S1RMRUNNING_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_S2ActivatingSigTrafficChan.cpp b/data/mnet/GP10/Host/rm/Src/rm_S2ActivatingSigTrafficChan.cpp
new file mode 100644
index 0000000..08bf103
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_S2ActivatingSigTrafficChan.cpp
@@ -0,0 +1,147 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __RM_S2ACTIVATINGSIGTRAFFICCHAN_CPP__
+#define __RM_S2ACTIVATINGSIGTRAFFICCHAN_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_S2ActivatingSigTrafficChan( void )
+{
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_S2ActivatingSigTrafficChan\n"));
+
+ if (rm_pSmCtxt->smType != RM_MAIN_SM)
+ {
+ //Channel Activation always associated with main SM
+ EDEBUG__(("ERROR-rm_S2ActivatingSigTrafficChan: not main SM\n"));
+ return;
+ }
+
+ switch(rm_ItcRxOrigin)
+ {
+ case MODULE_L1:
+ //Get a MPH_INFO_INF message. Analyze and process it
+ if ( rm_pItcRxL1Msg->l3_data.buffer[0]==RM_L1MG_DEDMGMT )
+ {
+ //Check if having got Channel Act. Ack or Nack
+ if ( rm_pItcRxL1Msg->l3_data.buffer[1]==RM_L1MT_CHANACTIVACK_MSB &&
+ rm_pItcRxL1Msg->l3_data.buffer[2]==RM_L1MT_CHANACTIVACK_LSB )
+ {
+ //Got a positive ack to Channel Activation
+
+ if (rm_pItcRxL1Msg->l3_data.buffer[8] != 0)
+ {
+ IDEBUG__(("WARNING@rm_S2Act..: received warning(%d) to chan act on entryId(%d)\n",
+ rm_pItcRxL1Msg->l3_data.buffer[8], rm_ItcRxEntryId));
+ }
+
+ //SMS-SAPI3-Begin
+ //Call LAPDm local release to clean up the channel in case
+ //rm_SendDlRelReq(rm_pSmCtxt->mOId,rm_pSmCtxt->sapi,RM_LOCAL_RELEASE);
+
+ rm_SendDlRelReq(rm_pSmCtxt->mOId,RM_SAPI0,RM_LOCAL_RELEASE);
+ rm_SendDlRelReq(rm_pSmCtxt->mOId,RM_SAPI3,RM_LOCAL_RELEASE);
+ rm_SendDlRelReq(rm_pSmCtxt->aOId,RM_SAPI3,RM_LOCAL_RELEASE);
+
+ //SMS-SAPI3-End
+
+ //Further check if Channel Activation is caused by Channel Request
+ //from Mobile or Handover Request from MM
+ if (rm_pSmCtxt->isForHo==RM_FALSE)
+ {
+ //Related to Channel Request from Mobile
+ rm_SendImmAssign(rm_pSmCtxt->pPhyChan);
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3101);
+ rm_pSmCtxt->state = RM_S3SIGCHAN_ACTIVATED;
+ } else
+ {
+ //HOADDED
+ //Related to Handover Request from MM
+ //Send back Handover Request Ack to MM
+ if (rm_SendHoReqAck())
+ {
+ rm_pSmCtxt->waitHoComplt = RM_FALSE;
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3101);
+ rm_pSmCtxt->state = RM_S4TRAFFICCHAN_ACTIVATED;
+ }
+ else
+ {
+ //Failed in sending back Handover Request Ack and release
+ //radio resource
+ EDEBUG__(("ERROR@rm_S2ActivatingSigTrafficChan: failed in rm_SendHoReqAck\n"));
+
+ rm_SendHoReqNAck(rm_pSmCtxt->pPhyChan->hoRef);
+
+ //rm_RslRelease(); //This contains unecessary info, may mod.
+ rm_pSmCtxt->state = RM_S1RM_RUNNING;
+ rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_FREE;
+ rm_SendRfChanRelease(rm_pSmCtxt->pPhyChan);
+ }
+ }
+ }
+ else if ( rm_pItcRxL1Msg->l3_data.buffer[1]==RM_L1MT_CHANACTIVNACK_MSB &&
+ rm_pItcRxL1Msg->l3_data.buffer[2]==RM_L1MT_CHANACTIVNACK_LSB )
+ {
+ //Got a negative Ack to Channel Activation
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ rm_SendRfChanRelease(rm_pSmCtxt->pPhyChan);
+
+ IDEBUG__(("WARNING@rm_S2ActivatingSigTrafficChan: nack to act chan(%d,%d,%d)\n",
+ rm_pItcRxL1Msg->l3_data.buffer[3],
+ rm_pItcRxL1Msg->l3_data.buffer[4],
+ rm_pItcRxL1Msg->l3_data.buffer[5]));
+
+ //Further check if Channel Activation is caused by Channel Request
+ //from Mobile or Handover Request from MM
+ if (rm_pSmCtxt->isForHo==RM_TRUE)
+ {
+ //If it's Handover Request caused, send HoReqAck back to MM
+ rm_SendHoReqNAck(rm_pSmCtxt->pPhyChan->hoRef);
+ }
+
+ //SMS-SAPI3-Begin
+
+ //For benefit of LAPDm's internal cleanup
+ rm_SendDlRelReq(rm_pSmCtxt->mOId,RM_SAPI0,RM_LOCAL_RELEASE);
+ rm_SendDlRelReq(rm_pSmCtxt->mOId,RM_SAPI3,RM_LOCAL_RELEASE);
+ rm_SendDlRelReq(rm_pSmCtxt->aOId,RM_SAPI3,RM_LOCAL_RELEASE);
+
+ //SMS-SAPI3-End
+
+ //Reset relevant RM channel resources
+ rm_pSmCtxt->state = RM_S1RM_RUNNING;
+ rm_SmCtxt[rm_pSmCtxt->aEntryId].state = RM_S1RM_RUNNING;
+ rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_FREE;
+
+ //Report this negative ack to Channel Activation
+ EDEBUG__(("ERROR-rm_S2ActivatingSigTrafficChan:NACK received\n"));
+ //EDUMP__(( MAREA__, rm_pItcRxL1Msg->l3_data.buffer,
+ // rm_pItcRxL1Msg->l3_data.msgLength ));
+ }
+ else
+ EDEBUG__(("ERROR-rm_S2ActivatingSigTrafficChan:L1 MsgType:%d,%d\n",
+ rm_pItcRxL1Msg->l3_data.buffer[1],
+ rm_pItcRxL1Msg->l3_data.buffer[2] ));
+ }
+ else
+ EDEBUG__(("ERROR@rm_S2ActivatingSigTrafficChan:L1 MsgGroup:%d\n",
+ rm_pItcRxL1Msg->l3_data.buffer[0]));
+ break;
+
+ default:
+ //TBD: Unexpected message orgination
+ UDEBUG__(("ERROR@rm_S2ActivatingSigTrafficChan:wrong msg origination:%d\n",
+ rm_ItcRxOrigin));
+ break;
+
+ } //End of switch()
+
+} //End of rm_S2ActivatingSigTrafficChan()
+
+#endif //__RM_S2ACTIVATINGSIGTRAFFICCHAN_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_S3SigChanActivated.cpp b/data/mnet/GP10/Host/rm/Src/rm_S3SigChanActivated.cpp
new file mode 100644
index 0000000..31d9e6b
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_S3SigChanActivated.cpp
@@ -0,0 +1,142 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+
+#ifndef __RM_S3SIGCHANACTIVATED_CPP__
+#define __RM_S3SIGCHANACTIVATED_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_S3SigChanActivated(void)
+{
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_S3SigChanActivated\n"));
+
+ if (rm_pSmCtxt->smType != RM_MAIN_SM)
+ {
+ //Channel Activation always associated with main SM
+ EDEBUG__(("ERROR-rm_S3SigChanActivated: not main SM\n"));
+ return;
+ }
+
+ switch(rm_ItcRxOrigin)
+ {
+ case MODULE_MD:
+ //Check if received DL_REL_CNF sent before ImmAssignmmt
+ if (rm_pItcRxMdMsg->primitive_type == L23PT_DL_REL_CONF)
+ return;
+ if (rm_pItcRxMdMsg->primitive_type == DL_EST_IND)
+ {
+ //Received DL_EST_IND:Stop T3101 and go new ST
+ rm_StopTimer( rm_ItcRxEntryId, RM_T3101 );
+ rm_pSmCtxt->sapi = rm_pItcRxMdMsg->sapi;
+ rm_pSmCtxt->state = RM_S5SIGMODE_ESTABLISHED;
+
+ //rm_ProcClassMarkIE();
+
+ switch(rm_pSmCtxt->callType)
+ {
+ case RM_CHANREQ_COS_LUP: //RM_CALLTYPE_LUP:
+
+ //PMADDED:meanNbrOfBusySDCCHs,maxNbrOfBusySDCCHs
+
+ rm_pSmCtxt->pPhyChan->chanBusy=RM_TRUE;
+
+ rm_NoOfBusySdcch4++;
+ rm_maxNbrOfBusySDCCHs++;
+ PM_CellMeasurement.meanNbrOfBusySDCCHs.addRecord(rm_NoOfBusySdcch4);
+ PM_CellMeasurement.maxNbrOfBusySDCCHs.setValue(rm_maxNbrOfBusySDCCHs); //increment();
+ //PM_CellMeasurement.maxNbrOfBusySDCCHs.addRecord(rm_maxNbrOfBusySDCCHs); //increment();
+
+ break;
+ case RM_CHANREQ_COS_EMC: //RM_CALLTYPE_EMC:
+ case RM_CHANREQ_COS_MOC: //RM_CALLTYPE_MOC:
+ case RM_CHANREQ_COS_MTC: //RM_CALLTYPE_MTC:
+
+ if (rm_pSmCtxt->callType==RM_CHANREQ_COS_MTC)
+ rm_SendPagingRsp();
+
+ //PMADDED:meanNbrOfBusyTCHs,maxNbrOfBusyTCHs,meanTCHBusyTime,
+ // succTCHSeizures
+
+ rm_pSmCtxt->pPhyChan->chanBusy=RM_TRUE;
+
+ //rm_NoOfBusyTchf++;
+ //PM_CellMeasurement.meanNbrOfBusyTCHs.addRecord(rm_NoOfBusyTchf);
+ //PM_CellMeasurement.maxNbrOfBusyTCHs.increment();
+ //PM_CellMeasurement.succTCHSeizures.increment();
+ //rm_pSmCtxt->pPhyChan->startTime=tickGet();
+ break;
+
+ default:
+ UDEBUG__(("UNKNOWN-rm_S3SigChanActivated:wrong call type:%d\n",
+ rm_pSmCtxt->callType));
+ break;
+ }
+ }
+ else
+ EDEBUG__(("ERROR-rm_S3SigChanActivated: wrong LAPDm message:%d\n",
+ rm_pItcRxMdMsg->primitive_type));
+
+ break;
+
+ case MODULE_RM:
+ PDEBUG__(("rm_S3SigChanActivated: Timer Expiry for entryID=%d\n", rm_ItcRxEntryId));
+
+ if ( rm_pItcRxRmMsg->primitive_type != RM_TIMER_IND ||
+ rm_pSmCtxt->pPhyChan->T3101.state == RM_FALSE ||
+ rm_pItcRxRmMsg->timerId != RM_T3101 )
+ {
+ EDEBUG__(("ERROR-rm_S3ReleasingSigTrafficChan: prim:%d,timer:%d, sta:%d\n",
+ rm_pItcRxRmMsg->primitive_type,
+ rm_pItcRxRmMsg->timerId,
+ rm_pSmCtxt->pPhyChan->T3101.state ));
+ return;
+ }
+
+
+ // No rsp to Imm Assignment. Release resources
+ switch(rm_pSmCtxt->callType)
+ {
+ //FFS:
+ //RM goes ahead to release RF channel. But before a release
+ //command reaching L1 and put into effect, a DL_EST_IND may
+ //come to RR if T3101 time is not properly set.
+ case RM_CALLTYPE_LUP:
+ case RM_CALLTYPE_MOC:
+ case RM_CALLTYPE_MTC:
+ //Release the RF channel as well as associated SMs
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ rm_SendRfChanRelease(rm_pSmCtxt->pPhyChan);
+ rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_RELEASING;
+ rm_pSmCtxt->pPhyChan->T3101.state = RM_FALSE;
+ rm_pSmCtxt->state = RM_S9DEACTIVATING_SIGTRAFFICCHAN;
+ rm_SmCtxt[rm_pSmCtxt->aEntryId].state = RM_S1RM_RUNNING;
+ break;
+
+ default:
+ UDEBUG__(("UNKNOWN-rm_S3SigChanActivated:wrong call type:%d\n",
+ rm_pSmCtxt->callType));
+ break;
+
+ } //End of switch()
+
+ break;
+
+ default:
+ //Unexpected message origin at this SM state
+ EDEBUG__(("ERROR-rm_S3SigChanActivated: unexpected message origin:%d\n",
+ rm_ItcRxOrigin));
+ break;
+
+ } //End of switch()
+
+} //End of rm_S3SigChanActivated()
+
+#endif //__RM_S3SIGCHANACTIVATED_CPP__
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_S4TrafficChanActivated.cpp b/data/mnet/GP10/Host/rm/Src/rm_S4TrafficChanActivated.cpp
new file mode 100644
index 0000000..c165542
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_S4TrafficChanActivated.cpp
@@ -0,0 +1,203 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+
+#ifndef __RM_S4TRAFFICCHANACTIVATED_CPP__
+#define __RM_S4TRAFFICCHANACTIVATED_CPP__
+
+//HOADDED
+#include "rm\rm_head.h"
+
+void rm_S4TrafficChanActivated(void)
+{
+ rm_EdRet_t rrEdRet; //Return code from RR decode
+ rm_L3Data_t l3_data; //Store encoded to Physical Information message
+
+ // Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_S4TrafficChanActivated\n"));
+
+ if (rm_pSmCtxt->smType != RM_MAIN_SM ||
+ rm_pSmCtxt->isForHo == RM_FALSE )
+ {
+ EDEBUG__(("ERROR-rm_S4TrafficChanActivated: SMtype=%d,isForHo=%d\n",
+ rm_pSmCtxt->smType, rm_pSmCtxt->isForHo));
+ return;
+ }
+
+ switch(rm_ItcRxOrigin)
+ {
+ case MODULE_MD:
+ //Check if got valid Handover Access from Mobile
+ if ( rm_ItcRxPrim == DLm_OTHRA_IND )
+ {
+ //Check if this RA is as expected by RM
+ if (rm_pItcRxMdMsg->sapi != RM_SAPI0 ||
+ rm_pItcRxMdMsg->l3_data.buffer[0] != rm_pSmCtxt->pPhyChan->hoRef)
+ {
+ EDEBUG__(("ERROR-rm_S4TrafficChanActivated: RmRef=%d,MdRef=%d\n",
+ rm_pSmCtxt->pPhyChan->hoRef,
+ rm_pItcRxMdMsg->l3_data.buffer[0]));
+ return;
+ }
+
+ rm_StopTimer(rm_ItcRxEntryId, RM_T3101);
+
+ //Got an expected RA from Mobile on allocated channel. Save relevant
+ //data for future use
+ rm_pSmCtxt->sapi = rm_pItcRxMdMsg->sapi;
+ rm_pSmCtxt->pPhyChan->hoTa = (u8)rm_pItcRxMdMsg->l3_data.buffer[3];
+
+
+ //Got Handover Access from Mobile, send out Physical Information
+ //Encode Physical Information message
+ l3_data.buffer[0] = (u8)RM_PD;
+ l3_data.buffer[1] = (u8)CNI_RIL3RRM_MSGID_PHYSICAL_INFORMATION;
+ l3_data.buffer[2] = rm_pSmCtxt->pPhyChan->hoTa;
+ l3_data.msgLength = 3;
+
+ //Send out l3_data via DL_UNIT_DATA_REQ
+ //Send four Physical Information together for TEST purpose
+ //CNI_LAPDM_Dl_Unit_Data_Request( rm_pSmCtxt->mOId,rm_pSmCtxt->sapi,
+ // L2T_NORMAL_HEADER, &l3_data);
+ //CNI_LAPDM_Dl_Unit_Data_Request( rm_pSmCtxt->mOId,rm_pSmCtxt->sapi,
+ // L2T_NORMAL_HEADER, &l3_data);
+ //CNI_LAPDM_Dl_Unit_Data_Request( rm_pSmCtxt->mOId,rm_pSmCtxt->sapi,
+ // L2T_NORMAL_HEADER, &l3_data);
+ CNI_LAPDM_Dl_Unit_Data_Request( rm_pSmCtxt->mOId,rm_pSmCtxt->sapi,
+ L2T_NORMAL_HEADER, &l3_data);
+ //Reset ny1 and start timer to monitor arrival of right decoded msg
+ //on the handed-over channel
+ rm_pSmCtxt->pPhyChan->ny1 = 0;
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3105);
+ } else
+ {
+ //Check if received Handover Complete message from Mobile
+ switch(rm_pItcRxMdMsg->primitive_type)
+ {
+ case DL_EST_IND:
+ rm_pSmCtxt->pPhyChan->ny1 = OAMrm_NY1;
+ rm_StopTimer(rm_ItcRxEntryId, RM_T3105);
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3105);
+ return;
+ case L23PT_DL_DATA_IND:
+ //Decode received message carried up in DL_EST_IND
+ //PR1104
+ //rrEdRet = CNI_RIL3RRM_Decode( &(rm_pItcRxMdMsg->l3_data),&rm_UmMsg );
+ rrEdRet = rm_MsgAnalyze();
+
+ if ( rrEdRet != RM_RRED_SUCCESS )
+ {
+ EDEBUG__(("ERROR-rm_S4TrafficChanActivated: l3_data decoded KO\n"));
+ return;
+ }
+
+ //Successfully decode L3 data carried in DL_EST_IND
+ if ( rm_UmMsg.header.protocol_descriminator!=RM_PD ||
+ rm_UmMsg.header.message_type!=CNI_RIL3RRM_MSGID_HANDOVER_COMPLETE )
+ {
+ EDEBUG__(("ERROR-rm_S4TrafficChanActivated:unexped msg PD:%d;MT:%d\n",
+ rm_UmMsg.header.protocol_descriminator,
+ rm_UmMsg.header.message_type ));
+ //PR1104
+ rm_SendRrStatus(CNI_RIL3_RR_MESSAGE_TYPE_NOT_COMPATIBLE);
+ return;
+ }
+
+ //Got Handover Complete message from Mobile, i.e. Mobile has successfully
+ //moved to new frequency/cell
+ RDEBUG__(("HANDOVER SUCCESS!!!-rm_S4TrafficChanActivated\n"));
+ rm_StopTimer(rm_ItcRxEntryId, RM_T3105);
+ rm_SendHoComplete();
+ rm_pSmCtxt->state = RM_S10TRAFFICMODE_ESTABLISHED;
+
+ //PM: succTCHSeizures, maxNbrOfBusyTCHs, meanNbrOfBusyTCHs
+
+ PM_CellMeasurement.succTCHSeizures.increment();
+ rm_maxNbrOfBusyTCHs++;
+ PM_CellMeasurement.maxNbrOfBusyTCHs.setValue(rm_maxNbrOfBusyTCHs);
+
+ //PM_CellMeasurement.maxNbrOfBusyTCHs.addRecord(rm_maxNbrOfBusyTCHs);
+ rm_NoOfBusyTchf++;
+ PM_CellMeasurement.meanNbrOfBusyTCHs.addRecord(rm_NoOfBusyTchf);
+
+ rm_pSmCtxt->pPhyChan->startTime=tickGet();
+
+ rm_pSmCtxt->pPhyChan->chanBusy = RM_TRUE;
+
+ break;
+
+ default:
+ PDEBUG__(("TRACE@rm_S4TrafficChanActivated:unexpected L2/primitive:%d\n",
+ rm_pItcRxMdMsg->primitive_type));
+ return;
+ }
+ }
+ break;
+
+ case MODULE_RM:
+ PDEBUG__(("rm_S4TrafficChanActivated: Timer Expiry for entryID=%d\n",
+ rm_ItcRxEntryId));
+
+ if ( rm_pItcRxRmMsg->primitive_type != RM_TIMER_IND ||
+ rm_pSmCtxt->pPhyChan->T3105.state == RM_FALSE ||
+ rm_pItcRxRmMsg->timerId != RM_T3105 ||
+ rm_pItcRxRmMsg->timerId != RM_T3101 )
+ {
+ EDEBUG__(("ERROR-rm_S4TrafficChanActivated: prim:%d,timer:%d, sta:%d\n",
+ rm_pItcRxRmMsg->primitive_type,
+ rm_pItcRxRmMsg->timerId,
+ rm_pSmCtxt->pPhyChan->T3105.state ));
+ return;
+ }
+
+
+ // Check if need to send more Physical Information or fail the HO effort
+ if ( (rm_pSmCtxt->pPhyChan->ny1 < OAMrm_NY1) &&
+ (rm_pItcRxRmMsg->timerId != RM_T3101 ) )
+ {
+ //T3105 expired but not got Handover Complete message, resend Physical
+ //Information message
+ l3_data.buffer[0] = (u8)RM_PD;
+ l3_data.buffer[1] = (u8)CNI_RIL3RRM_MSGID_PHYSICAL_INFORMATION;
+ l3_data.buffer[2] = rm_pSmCtxt->pPhyChan->hoTa;
+ l3_data.msgLength = 3;
+
+ //Send out l3_data via DL_UNIT_DATA_REQ
+ CNI_LAPDM_Dl_Unit_Data_Request( rm_pSmCtxt->mOId,rm_pSmCtxt->sapi,
+ L2T_NORMAL_HEADER, &l3_data);
+ //Increment ny1 and restart timer T3105
+ rm_pSmCtxt->pPhyChan->ny1++;
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3105);
+ } else
+ {
+ //Already finished retry of all ny1 times in sending Physical Info.
+ //Send Handover Failure message to CC and release RM resources
+ rm_pSmCtxt->waitHoComplt = RM_FALSE;
+
+ //ext-HO <xxu:06-25-01>
+ rm_SendHoFailure(0x01,-1); //Radio Interface Failure
+
+ //rm_RslRelease();
+ rm_StopTimer(rm_ItcRxEntryId, RM_T3105);
+ rm_ProcRrRelease(CNI_RIL3_CAUSE_DESTINATION_OUT_OF_ORDER);
+ }
+
+ break;
+
+ default:
+ //Unexpected message origin at this SM state
+ EDEBUG__(("ERROR-rm_S4TrafficChanActivated:unexpected message origin:%d\n",
+ rm_ItcRxOrigin));
+ break;
+
+ } //End of switch()
+
+}
+
+#endif //__RM_S4TRAFFICCHANACTIVATED_CPP__
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_S4TrafficChanActivated.cpp.old b/data/mnet/GP10/Host/rm/Src/rm_S4TrafficChanActivated.cpp.old
new file mode 100644
index 0000000..2e9e313
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_S4TrafficChanActivated.cpp.old
@@ -0,0 +1,158 @@
+#ifndef __RM_S4TRAFFICCHANACTIVATED_CPP__
+#define __RM_S4TRAFFICCHANACTIVATED_CPP__
+
+
+//HOADDED
+#include "rm\rm_head.h"
+
+void rm_S4TrafficChanActivated(void)
+{
+ rm_EdRet_t rrEdRet; //Return code from RR decode
+ rm_L3Data_t l3_data; //Store encoded to Physical Information message
+
+ // Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_S4TrafficChanActivated\n"));
+
+ if (rm_pSmCtxt->smType != RM_MAIN_SM ||
+ rm_pSmCtxt->isForHo == RM_FALSE )
+ {
+ EDEBUG__(("ERROR-rm_S4TrafficChanActivated: SMtype=%d,isForHo=%d\n",
+ rm_pSmCtxt->smType, rm_pSmCtxt->isForHo));
+ return;
+ }
+
+ switch(rm_ItcRxOrigin)
+ {
+ case MODULE_MD:
+ //Check if got valid Handover Access from Mobile
+ if ( rm_ItcRxPrim == DLm_OTHRA_IND )
+ {
+ //Check if this RA is as expected by RM
+ if (rm_pItcRxMdMsg->sapi != RM_SAPI0 ||
+ rm_pItcRxMdMsg->l3_data.buffer[0] != rm_pSmCtxt->pPhyChan->hoRef)
+ {
+ EDEBUG__(("ERROR-rm_S4TrafficChanActivated: RmRef=%d,MdRef=%d\n",
+ rm_pSmCtxt->pPhyChan->hoRef,
+ rm_pItcRxMdMsg->l3_data.buffer[0]));
+ return;
+ }
+
+ //Got an expected RA from Mobile on allocated channel. Save relevant
+ //data for future use
+ rm_pSmCtxt->sapi = rm_pItcRxMdMsg->sapi;
+ rm_pSmCtxt->pPhyChan->hoTa = (u8)rm_pItcRxMdMsg->l3_data.buffer[3];
+
+
+ //Got Handover Access from Mobile, send out Physical Information
+ //Encode Physical Information message
+ l3_data.buffer[0] = (u8)RM_PD;
+ l3_data.buffer[1] = (u8)CNI_RIL3RRM_MSGID_PHYSICAL_INFORMATION;
+ l3_data.buffer[2] = rm_pSmCtxt->pPhyChan->hoTa;
+ l3_data.msgLength = 3;
+
+ //Send out l3_data via DL_UNIT_DATA_REQ
+//Send four Physical Information together for TEST purpose
+ CNI_LAPDM_Dl_Unit_Data_Request( rm_pSmCtxt->mOId,rm_pSmCtxt->sapi,
+ L2T_NORMAL_HEADER, &l3_data);
+ CNI_LAPDM_Dl_Unit_Data_Request( rm_pSmCtxt->mOId,rm_pSmCtxt->sapi,
+ L2T_NORMAL_HEADER, &l3_data);
+ CNI_LAPDM_Dl_Unit_Data_Request( rm_pSmCtxt->mOId,rm_pSmCtxt->sapi,
+ L2T_NORMAL_HEADER, &l3_data);
+ CNI_LAPDM_Dl_Unit_Data_Request( rm_pSmCtxt->mOId,rm_pSmCtxt->sapi,
+ L2T_NORMAL_HEADER, &l3_data);
+ //Reset ny1 and start timer to monitor arrival of right decoded msg
+ //on the handed-over channel
+ rm_pSmCtxt->pPhyChan->ny1 = 0;
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3105);
+ } else
+ {
+ //Check if received Handover Complete message from Mobile
+ if (rm_pItcRxMdMsg->primitive_type != DL_EST_IND)
+ {
+ //Should only receive DL_EST_IND here
+ EDEBUG__(("ERROR-rm_S4TrafficChanActivated:unexpected L2/primitive:%d\n",
+ rm_pItcRxMdMsg->primitive_type));
+ return;
+ } else
+ {
+ //Decode received message carried up in DL_EST_IND
+ rrEdRet = CNI_RIL3RRM_Decode( &(rm_pItcRxMdMsg->l3_data),&rm_UmMsg );
+ if ( rrEdRet != RM_RRED_SUCCESS )
+ {
+ EDEBUG__(("ERROR-rm_S4TrafficChanActivated: l3_data decoded KO\n"));
+ return;
+ }
+
+ //Successfully decode L3 data carried in DL_EST_IND
+ if ( rm_UmMsg.header.protocol_descriminator!=RM_PD ||
+ rm_UmMsg.header.message_type!=CNI_RIL3RRM_MSGID_HANDOVER_COMPLETE )
+ {
+ EDEBUG__(("ERROR-rm_S4TrafficChanActivated:unexped msg PD:%d;MT:%d\n",
+ rm_UmMsg.header.protocol_descriminator,
+ rm_UmMsg.header.message_type ));
+ return;
+ }
+
+ //Got Handover Complete message from Mobile, i.e. Mobile has successfully
+ //moved to new frequency/cell
+ RDEBUG__(("HANDOVER SUCCESS!!!-rm_S4TrafficChanActivated\n"));
+ rm_StopTimer(rm_ItcRxEntryId, RM_T3105);
+ rm_SendHoComplete();
+ rm_pSmCtxt->state = RM_S10TRAFFICMODE_ESTABLISHED;
+ }
+ }
+ break;
+
+ case MODULE_RM:
+ PDEBUG__(("rm_S4TrafficChanActivated: Timer Expiry for entryID=%d\n",
+ rm_ItcRxEntryId));
+
+ if ( rm_pItcRxRmMsg->primitive_type != RM_TIMER_IND ||
+ rm_pSmCtxt->pPhyChan->T3105.state == RM_FALSE ||
+ rm_pItcRxRmMsg->timerId != RM_T3105 )
+ {
+ EDEBUG__(("ERROR-rm_S4TrafficChanActivated: prim:%d,timer:%d, sta:%d\n",
+ rm_pItcRxRmMsg->primitive_type,
+ rm_pItcRxRmMsg->timerId,
+ rm_pSmCtxt->pPhyChan->T3101.state ));
+ return;
+ }
+
+ // Check if need to send more Physical Information or fail the HO effort
+ if (rm_pSmCtxt->pPhyChan->ny1 < OAMrm_NY1)
+ {
+ //T3105 expired but not got Handover Complete message, resend Physical
+ //Information message
+ l3_data.buffer[0] = (u8)RM_PD;
+ l3_data.buffer[1] = (u8)CNI_RIL3RRM_MSGID_PHYSICAL_INFORMATION;
+ l3_data.buffer[2] = rm_pSmCtxt->pPhyChan->hoTa;
+ l3_data.msgLength = 3;
+
+ //Send out l3_data via DL_UNIT_DATA_REQ
+ CNI_LAPDM_Dl_Unit_Data_Request( rm_pSmCtxt->mOId,rm_pSmCtxt->sapi,
+ L2T_NORMAL_HEADER, &l3_data);
+ //Increment ny1 and restart timer T3105
+ rm_pSmCtxt->pPhyChan->ny1++;
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3105);
+ } else
+ {
+ //Already finished retry of all ny1 times in sending Physical Info.
+ //Send Handover Failure message to CC and release RM resources
+ rm_SendHoFailure();
+ rm_RslRelease();
+ }
+
+ break;
+
+ default:
+ /* Unexpected message origin at this SM state */
+ EDEBUG__(("ERROR-rm_S4TrafficChanActivated:unexpected message origin:%d\n",
+ rm_ItcRxOrigin));
+ break;
+
+ } /* End of switch() */
+
+}
+
+#endif /*__RM_S4TRAFFICCHANACTIVATED_CPP__*/
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_S5SigModeEstablished.cpp b/data/mnet/GP10/Host/rm/Src/rm_S5SigModeEstablished.cpp
new file mode 100644
index 0000000..e14b157
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_S5SigModeEstablished.cpp
@@ -0,0 +1,527 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __RM_S5SIGMODEESTABLISHED_CPP__
+#define __RM_S5SIGMODEESTABLISHED_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_S5SigModeEstablished( void )
+{
+ u8 ret;
+ rm_LapdmOId_t lapdmOId;
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_S5SigModeEstablished\n"));
+
+ // TBD:
+ // Now at dedicated mode, RM monitors all the Measurement Result msgs
+ // from L1. L1 sends up this message even a bad receive encounered on
+ // the SACCH. This message is used to judge if RSL occurs.
+
+ switch(rm_ItcRxOrigin)
+ {
+ case MODULE_L1:
+ // Check if gotot a Measurement Result msg on SACCH from L1
+ if ( rm_pItcRxL1Msg->l3_data.buffer[0]==RM_L1MG_DEDMGMT &&
+ rm_pItcRxL1Msg->l3_data.buffer[1]==RM_L1MT_MEASRES_MSB &&
+ rm_pItcRxL1Msg->l3_data.buffer[2]==RM_L1MT_MEASRES_LSB )
+ {
+ //SMS-SAPI3-Begin
+
+ // Got it. Process Measurement Result message. Also report
+ // Radio Signaling Link (RSL) broken if judged as such
+ //ret = rm_ProcMeasRes();
+ //switch (ret)
+ //{
+ //case RM_RSLIND:
+ // // Radio Signaling Link loss detected
+ // rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ // if (rm_pSmCtxt->smType==RM_MAIN_SM)
+ // lapdmOId = rm_pSmCtxt->mOId;
+ // else
+ // lapdmOId = rm_pSmCtxt->aOId;
+ //
+ // //CT_CHN rm_SendDlRelReq(lapdmOId, RM_SAPI0,
+ // // rm_pSmCtxt->chanType,RM_LOCAL_RELEASE);
+ // rm_SendDlRelReq(lapdmOId, RM_SAPI0, RM_LOCAL_RELEASE);
+ //
+ // if (rm_pSmCtxt->sapi != RM_SAPI0)
+ // //CT_CHN rm_SendDlRelReq(lapdmOId, rm_pSmCtxt->sapi,
+ // // rm_pSmCtxt->chanType,RM_LOCAL_RELEASE);
+ // rm_SendDlRelReq(lapdmOId, rm_pSmCtxt->sapi,RM_LOCAL_RELEASE);
+ //
+ // rm_SendRrRelInd(RM_RSLIND, rm_ItcRxEntryId);
+ // rm_StartTimer(rm_ItcRxEntryId, RM_T3109);
+ //
+ // // Adjust SM state to S7
+ // rm_pSmCtxt->state = RM_S7RELEASING_SIGTRAFFICCHAN;
+ // rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_RELEASING;
+ //
+ // break;
+ //
+ //default:
+ // // TBD: Unsupported results including HO needed. But
+ // // HO may not make sense for this case since no talk.
+ //
+ // UDEBUG__(("UNKNOWN-rm_S5SigModeEstablished:unsupported result:%d\n",
+ // ret));
+ // break;
+ //}
+
+ //Unexpected L1 message
+ UDEBUG__(("WARNING@rm_S5SigModeEstablished:unexpected L1 msg(%d,%d,%d)\n",
+ rm_pItcRxL1Msg->l3_data.buffer[0],
+ rm_pItcRxL1Msg->l3_data.buffer[1],
+ rm_pItcRxL1Msg->l3_data.buffer[2]));
+
+ //SMS-SAPI3-End
+
+ } else
+ // Got an unexpected message from L1
+ EDEBUG__(( "ERROR-rm_S5SigModeEstablished:L1 msg: PD:%x;MT:%x,%x\n",
+ rm_pItcRxL1Msg->l3_data.buffer[0],
+ rm_pItcRxL1Msg->l3_data.buffer[1],
+ rm_pItcRxL1Msg->l3_data.buffer[2] ));
+ break;
+
+ case MODULE_MD:
+ //SMS-SAPI3-Begin
+
+ //Receive MDL error report
+ //if ( rm_pItcRxMdMsg->primitive_type == MDL_ERR_RPT ||
+ // rm_pItcRxMdMsg->primitive_type == DL_REL_IND )
+ //{
+
+ if ( rm_pItcRxMdMsg->primitive_type == DL_REL_IND )
+ {
+ //SMS-SAPI3-End
+
+ if (rm_pSmCtxt->smType==RM_MAIN_SM)
+ {
+ //SMS-SAPI3-Begin
+
+ //lapdmOId = rm_pSmCtxt->mOId;
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ //rm_SendRrRelInd(RM_MDLERR,rm_ItcRxEntryId);
+ rm_SendDlRelReq(rm_pSmCtxt->mOId, RM_SAPI3, RM_LOCAL_RELEASE);
+ rm_SendDlRelReq(rm_pSmCtxt->aOId, RM_SAPI3, RM_LOCAL_RELEASE);
+
+
+ //CT_CHN rm_SendDlRelReq(lapdmOId, RM_SAPI0,
+ // rm_pSmCtxt->chanType,RM_LOCAL_RELEASE);
+ //rm_SendDlRelReq(lapdmOId, RM_SAPI0, RM_LOCAL_RELEASE);
+
+ //if (rm_pSmCtxt->sapi != RM_SAPI0)
+ // //CT_CHN rm_SendDlRelReq(lapdmOId, rm_pSmCtxt->sapi,
+ // // rm_pSmCtxt->chanType,RM_LOCAL_RELEASE);
+ // rm_SendDlRelReq(lapdmOId, rm_pSmCtxt->sapi,RM_LOCAL_RELEASE);
+
+ //The following is for safety-guard purpose, thus may be redundancy
+ //rm_SendDlRelReq(rm_pSmCtxt->mOId, RM_SAPI3, RM_LOCAL_RELEASE);
+ //rm_SendDlRelReq(rm_pSmCtxt->aOId, RM_SAPI3, RM_LOCAL_RELEASE);
+
+ //rm_SmCtxt_t *pASmCtxt;
+ //pASmCtxt = rm_pSmCtxt->pPhyChan->pASmCtxt;
+ //pASmCtxt->state = RM_S1RM_RUNNING;
+
+ //SMS-SAPI3-End
+
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3109);
+
+ rm_pSmCtxt->relCause = CNI_RIL3_CAUSE_NORMAL_UNSPECIFIED;
+ //CNI_RIL3_CAUSE_DESTINATION_OUT_OF_ORDER;
+ //CNI_RIL3_CAUSE_TEMPORARY_FAILURE;
+
+ // Adjust SM state to S7
+ rm_pSmCtxt->state = RM_S7RELEASING_SIGTRAFFICCHAN;
+ rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_RELEASING;
+
+ //SMS-SAPI3-Begin
+ }
+ //} else
+ //{
+ //lapdmOId = rm_pSmCtxt->aOId;
+
+ //SMS-SAPI3-Begin
+
+ //rm_SendRrRelInd(RM_MDLERR,rm_ItcRxEntryId);
+ //CT_CHN rm_SendDlRelReq(lapdmOId, RM_SAPI0,
+ // rm_pSmCtxt->chanType,RM_LOCAL_RELEASE);
+ //rm_SendDlRelReq(lapdmOId, RM_SAPI3, RM_LOCAL_RELEASE);
+
+ //SMS-SAPI3-End
+
+ //rm_pSmCtxt->state = RM_S1RM_RUNNING;
+ //}
+ //SMS-SAPI3-End
+
+ } else if ( rm_pItcRxMdMsg->primitive_type == DL_DATA_IND)
+ {
+ rm_ProcMsCiphModeCmplt();
+ } else
+ //Unexpected L2 Message received
+ IDEBUG__(("WARNING@rm_S5SigModeEstablished: unexpect L2 msg (%d, %d %d, %d, %d)\n",
+ rm_pItcRxMdMsg->primitive_type,
+ rm_pItcRxMdMsg->lapdm_oid,
+ rm_pItcRxMdMsg->sapi,
+ rm_pItcRxMdMsg->rel_mode,
+ rm_pItcRxMdMsg->est_mode,
+ rm_pItcRxMdMsg->error_cause));
+ break;
+
+ case MODULE_CC:
+ // Got a message from CC. Only accept a Channel Assign Command
+ if (rm_pItcRxCcMsg->message_type==INTRA_L3_RR_CHANN_ASSIGN_CMD)
+ {
+ rm_pSmCtxt->spchVer = 0xFF; //Invalid speech version
+ rm_ProcChanAssignCmd();
+
+ //PMADDED:attTCHSeizures
+ PM_CellMeasurement.attTCHSeizures.increment();
+ }
+ break;
+
+ case MODULE_MM:
+ if ( rm_pItcRxMmMsg->primitive_type == RR_REL_REQ )
+ {
+ //Release RF resource in terms of MM command
+ rm_SendChanRelease(rm_ItcRxEntryId);
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3109);
+
+ rm_pSmCtxt->relCause = CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING; //16
+
+ //Adjust SM state to S7
+ rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_RELEASING;
+ rm_pSmCtxt->state = RM_S7RELEASING_SIGTRAFFICCHAN;
+
+ //PM Added:
+ rm_pSmCtxt->pPhyChan->chanBusy = RM_FALSE;
+
+ if ( rm_pSmCtxt->pPhyChan->chanType==RM_PHYCHAN_SDCCH4)
+ {
+ if (--rm_NoOfBusySdcch4 >= 0)
+ PM_CellMeasurement.meanNbrOfBusySDCCHs.addRecord(rm_NoOfBusySdcch4);
+ else
+ rm_NoOfBusySdcch4 = 0;
+
+ if (--rm_maxNbrOfBusySDCCHs >= 0)
+ PM_CellMeasurement.maxNbrOfBusySDCCHs.setValue(rm_maxNbrOfBusySDCCHs); // decrement();
+ //PM_CellMeasurement.maxNbrOfBusySDCCHs.addRecord(rm_maxNbrOfBusySDCCHs); // decrement();
+ else
+ rm_maxNbrOfBusySDCCHs = 0;
+ }
+ }
+ else if (rm_pItcRxMmMsg->message_type == INTRA_L3_RR_CIPHER_COMMAND)
+ {
+ //Initiate Ciphering from MM layer: command both DSP and MS !
+ rm_SendCiphModeCmd(rm_pSmCtxt);
+ rm_SendEncryptCmdToTrx(rm_pSmCtxt);
+ }
+ else
+ //Unexpected message from MM
+ EDEBUG__(("ERROR@rm_S5SigModeEstablished:MM msgType:%d\n",
+ rm_pItcRxMmMsg->message_type));
+ break;
+
+ default:
+ //Unexpected message orgination
+ EDEBUG__(("ERROR-rm_S5SigModeEstablished:wrong msg origination:%d\n",
+ rm_ItcRxOrigin));
+ break;
+
+ } // End of switch()
+}
+
+u8 rm_BeaerCapVerToChanMode(T_CNI_RIL3_SPEECH_VERSION ver)
+{
+ u8 mode;
+
+ if (ver==0) mode = 1;
+ else if (ver==2) mode = 0x21;
+ else if (ver==1) mode = 0x41;
+ else
+ {
+ EDEBUG__(("ERROR@rm_BeaerCapVerToChanMode: bearerCap '%d'\n", ver));
+ return 1;
+ }
+
+ PDEBUG__(("INFO@rm_BeaerCapVerToChanMode: BearerCap '%d'<-->Mode '%x'\n", ver, mode));
+ return mode;
+}
+
+void rm_ProcChanAssignCmd(void)
+{
+ rm_PhyChanActDesc_t actDesc;
+
+ PDEBUG__(("INFO@rm_ProcChanAssignCmd: entryId=%d,callLeg=%d\n",
+ rm_ItcRxEntryId, rm_pItcRxCcMsg->primitive_type));
+
+ //if ( rm_pSmCtxt->spchVer ==
+ // (u8)(rm_pItcRxCcMsg->l3_data.channAssignCmd.channelType.speechChann.version))
+ //{
+ // //Commanded speech version is the same as before, ack it!
+ // rm_pSmCtxt->callIdx = (u8)rm_pItcRxCcMsg->primitive_type;
+ // rm_SendChanAssignComplete();
+ // return;
+ //}
+
+ if ( rm_pSmCtxt->smType != RM_MAIN_SM )
+ {
+ EDEBUG__(("ERROR@rm_ProcChanAssignCmd: ChannAssign KO\n"));
+ return;
+ }
+
+ //Check what channel type is assigned from CC
+ switch( rm_pItcRxCcMsg->l3_data.channAssignCmd.channelType.bearerType)
+ {
+ case BEARER_SPEECH:
+ //Update both DSP and MS with the commanded speech algo version
+ //ChnAssign
+ rm_pSmCtxt->callIdx = (unsigned char)rm_pItcRxCcMsg->primitive_type;
+ rm_pSmCtxt->spchVer = (u8)(rm_pItcRxCcMsg->l3_data.channAssignCmd.channelType.speechChann.version);
+
+ //EFRAdded
+ rm_pSmCtxt->codAlgo = rm_BeaerCapVerToChanMode(rm_pItcRxCcMsg->l3_data.channAssignCmd.channelType.speechChann.version);
+
+ //PR1248 Begin
+ actDesc.dtxCtrl = 0; //DTX ul&dl both OFF
+
+ //PR1381 BEGIN
+ if ( ((int)OAMrm_MS_UPLINK_DTX_STATE==1) ||
+ ((int)OAMrm_MS_UPLINK_DTX_STATE==0) )
+ actDesc.dtxCtrl |= 1; //DTX: ul ON
+ //PR1381 END
+
+ //PR1319
+ //if ( !(rm_pSmCtxt->pPhyChan->trxNumber) && OAMrm_MS_DNLINK_DTX_STATE )
+ if ( (rm_pSmCtxt->pPhyChan->trxNumber) && OAMrm_MS_DNLINK_DTX_STATE )
+ actDesc.dtxCtrl |= 2; //DTX: dl ON
+ //PR1248 End
+
+ actDesc.datAttr = RM_L1DATATTR_SPEECH; //Channel mode:byte 2
+ actDesc.ratType = RM_L1RATTYPE_TCHF; //Channel mode:byte 3
+ //actDesc.codAlgo = RM_L1CODALGO_GSMV1; //Channel mode:byte 4
+ //actDesc.codAlgo = OAMrm_GSMCODEC; //Channel mode:byte 4
+
+ //EFRAdded
+ actDesc.codAlgo = rm_pSmCtxt->codAlgo;
+ rm_SendModeModify(rm_pSmCtxt->pPhyChan,&actDesc);
+
+ //Change SM state to S6 Activating Traffic mode
+ rm_pSmCtxt->state = RM_S6ACTIVATING_TRAFFICMODE;
+ break;
+
+ case BEARER_DATA:
+ case BEARER_SIGNALING:
+ default:
+ //Unexpected channel type in the ChannAssignCmd
+ EDEBUG__(("ERROR@rm_ProcChanAssignCmd: unsupported bearerType:%d\n",
+ rm_pItcRxMmMsg->l3_data.channAssignCmd.channelType.bearerType));
+ break;
+ }
+}
+
+void rm_SendCiphModeCmd(rm_SmCtxt_t *pSmCtxt )
+{
+ rm_EdRet_t rrEdRet; //Return code from RR decode
+ rm_L3Data_t l3_data; //Encoded Paging Req Type 1
+ T_CNI_RIL3RRM_MSG_CIPHER_MODE_COMMAND *pUmCiphModeCmd, *p;
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER@rm_SendCiphModeCmd\n"));
+
+l3_data.msgLength = 0;
+l3_data.buffer[0]=0;
+l3_data.buffer[1]=0;
+l3_data.buffer[2]=0;
+
+ //Ciphering can happen on any channel and SAPIs
+
+ //Choose Cipher Mode Command
+ pUmCiphModeCmd = (T_CNI_RIL3RRM_MSG_CIPHER_MODE_COMMAND *) &(rm_UmMsg.cipherModeCommand);
+ p = (T_CNI_RIL3RRM_MSG_CIPHER_MODE_COMMAND *)&(rm_pItcRxMmMsg->l3_data.cipherCmd.cmd);
+
+ //Populate the contents so that encoder knows what to encode but
+ //before we start populating the message content, zap it clean
+ //first.
+ RM_MEMSET( &rm_UmMsg, sizeof(rm_UmMsg_t) );
+
+ //Header--PD,MT,SI
+ pUmCiphModeCmd->header.protocol_descriminator = RM_PD;
+ pUmCiphModeCmd->header.si_ti = RM_SI;
+ pUmCiphModeCmd->header.message_type = CNI_RIL3RRM_MSGID_CIPHERING_MODE_COMMAND;
+
+ //IE--CipherModeSetting
+ pUmCiphModeCmd->cipherModeSetting.ie_present = p->cipherModeSetting.ie_present;
+ pUmCiphModeCmd->cipherModeSetting.ciphering = p->cipherModeSetting.ciphering;
+ pUmCiphModeCmd->cipherModeSetting.algorithm = p->cipherModeSetting.algorithm;
+
+ //IE--cipherResponse
+ pUmCiphModeCmd->cipherResponse.ie_present = p->cipherResponse.ie_present;
+ pUmCiphModeCmd->cipherResponse.cipherResponse = p->cipherResponse.cipherResponse;
+
+ PDEBUG__(("INFO@rm_SendCiphModeCmd:ciphDataUm(%d, set%d,algo%d),ciphRespUm(%d,imeisv%d)\n",
+ pUmCiphModeCmd->cipherModeSetting.ie_present,
+ pUmCiphModeCmd->cipherModeSetting.ciphering,
+ pUmCiphModeCmd->cipherModeSetting.algorithm,
+ pUmCiphModeCmd->cipherResponse.ie_present,
+ pUmCiphModeCmd->cipherResponse.cipherResponse));
+
+ PDEBUG__(("INFO@rm_SendCiphModeCmd:ciphData(%d, set%d,algo%d),ciphResp(%d,imeisv%d)\n",
+ p->cipherModeSetting.ie_present,
+ p->cipherModeSetting.ciphering,
+ p->cipherModeSetting.algorithm,
+ p->cipherResponse.ie_present,
+ p->cipherResponse.cipherResponse));
+
+ //Call RR message encoding functionality
+ rrEdRet = CNI_RIL3RRM_Encode(&rm_UmMsg, &l3_data);
+
+ PDEBUG__(("INFO@rm_SendCiphModeCmd:l3_data.buffer(%d,%x,%x,%x)\n",
+ l3_data.msgLength,
+ l3_data.buffer[0],
+ l3_data.buffer[1],
+ l3_data.buffer[2]));
+
+ //check the encoding result before sending the message
+ switch (rrEdRet)
+ {
+ case RM_RRED_SUCCESS:
+ //Wrap the encoded Paging message in DL_DATA_REQ
+ rm_SendDlDataReq(pSmCtxt->mOId, pSmCtxt->sapi, &l3_data);
+ PostL3SendMsLog(pSmCtxt->mOId, pSmCtxt->sapi, &l3_data);
+ break;
+
+ default:
+ //Um message encoding failed
+ EDEBUG__(("ERROR@rm_SendCiphModeCmd: Um encode error:%d\n", rrEdRet ));
+ break;
+ }
+}
+
+void rm_SendEncryptCmdToTrx(rm_SmCtxt_t *pSmCtxt )
+{
+ int i;
+ rm_ItcTxMsg_t msgToL1;
+ u16 length;
+ IntraL3CipherModeCommand_t *p;
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER@rm_SendEncryptCmdToTrx\n"));
+
+ p =(IntraL3CipherModeCommand_t *) &(rm_pItcRxMmMsg->l3_data.cipherCmd);
+ PDEBUG__(("INFO@rm_SendEncryptCmdToTrx:ciphData(%d, set%d,algo%d),ciphResp(%d,imeisv%d)\n",
+ p->cmd.cipherModeSetting.ie_present,
+ p->cmd.cipherModeSetting.ciphering,
+ p->cmd.cipherModeSetting.algorithm,
+ p->cmd.cipherResponse.ie_present,
+ p->cmd.cipherResponse.cipherResponse));
+
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_DEDMGMT;
+ msgToL1.buffer[length++] = RM_L1MT_ENCRYPTION_MSB;
+ msgToL1.buffer[length++] = RM_L1MT_ENCRYPTION_LSB;
+ msgToL1.buffer[length++] = pSmCtxt->pPhyChan->trxNumber;
+ msgToL1.buffer[length++] = pSmCtxt->pPhyChan->chanNumberMSB;
+ msgToL1.buffer[length++] = pSmCtxt->pPhyChan->chanNumberLSB;
+
+ //Indicate link identifier to which ciphering is applied
+ if (pSmCtxt->sapi==RM_SAPI0)
+ msgToL1.buffer[length++] = 0x00; //main signaling
+ else if (pSmCtxt->sapi==RM_SAPI3)
+ msgToL1.buffer[length++] = 0x40; //asso signaling
+ else
+ {
+ msgToL1.buffer[length++] = 0x00; //main signaling
+ EDEBUG__(("ERROR@rm_SendEncryptCmdToTrx: invalid sapi '%d'\n",
+ pSmCtxt->sapi));
+ }
+
+ //Ciphering
+ if (p->cmd.cipherModeSetting.ciphering == CNI_RIl3_CIPHER_START_CIPHERING)
+ {
+ //Order algorithm to be used for the ciphering
+ msgToL1.buffer[length++] = ((u8)p->cmd.cipherModeSetting.algorithm) + 2;
+ //Pass down the ciphering key
+ for (i=0;i<8;i++)
+ msgToL1.buffer[length++] = p->Kc[i];
+ } else
+ {
+ msgToL1.buffer[length++] = 1; //No ciphering applied
+ IDEBUG__(("INFO@rm_SendEncryptCmdToTrx:OFF ciphering on (%d,%d,%d,%d)\n",
+ pSmCtxt->pPhyChan->trxNumber,
+ pSmCtxt->pPhyChan->chanNumberMSB,
+ pSmCtxt->pPhyChan->chanNumberLSB,
+ p->cmd.cipherModeSetting.ciphering));
+ }
+ //db_BDump(0,msgToL1.buffer,23);
+ msgToL1.msgLength = length;
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+}
+
+void rm_ProcMsCiphModeCmplt(void)
+{
+ int i;
+ rm_ItcTxL3Msg_t msgToMm;//Send inter MM-Rm siganling
+ T_CNI_RIL3RRM_MSG_CIPHER_MODE_COMPLETE * pUmCiphCmplt;
+ rm_EdRet_t rrEdRet;
+
+
+ //Monitoring entry to a function
+ RDEBUG__(("ENTER@rm_ProcMsCiphModeCmplt\n"));
+
+ //Decode this L3 message received to see if it is CHN MODE MODIFY ACK
+ //PR1104 RR STATUS MESSAGE
+ //rrEdRet = CNI_RIL3RRM_Decode( &(rm_pItcRxMdMsg->l3_data), &rm_UmMsg );
+ rrEdRet = rm_MsgAnalyze();
+
+ if ( rrEdRet != RM_RRED_SUCCESS )
+ {
+ EDEBUG__(("ERROR@rm_ProcMsCiphModeCmplt: L2/l3_data decoded KO\n"));
+ return;
+ }
+
+ //Decoding successful. Further check if got expected message
+ if ( rm_UmMsg.header.protocol_descriminator != RM_PD ||
+ rm_UmMsg.header.message_type != CNI_RIL3RRM_MSGID_CIPHERING_MODE_COMPLETE )
+ {
+ IDEBUG__(("INFO@rm_ProcMsCiphModeCmplt:unexpected msg PD:%d;MT:%d",
+ rm_UmMsg.header.protocol_descriminator,
+ rm_UmMsg.header.message_type ));
+ rm_SendRrStatus(CNI_RIL3_RR_MESSAGE_TYPE_NOT_COMPATIBLE);
+ return;
+ }
+
+ // Got expected msg i.e. Ciphering Mode Complete,
+ pUmCiphCmplt = (T_CNI_RIL3RRM_MSG_CIPHER_MODE_COMPLETE *) &(rm_UmMsg.cipherModeComplete);
+ msgToMm.module_id = MODULE_RM;
+ msgToMm.entry_id = rm_ItcRxEntryId;
+ msgToMm.primitive_type = INTRA_L3_DATA;
+ msgToMm.message_type = INTRA_L3_RR_CIPHER_COMPLETE;
+ msgToMm.l3_data.cipherCmplt.cmp.imeisv.ie_present = pUmCiphCmplt->imeisv.ie_present;
+ if (pUmCiphCmplt->imeisv.ie_present)
+ {
+ msgToMm.l3_data.cipherCmplt.cmp.imeisv.mobileIdType = pUmCiphCmplt->imeisv.mobileIdType;
+ msgToMm.l3_data.cipherCmplt.cmp.imeisv.numDigits = pUmCiphCmplt->imeisv.numDigits;
+ for (i=0;i<16;i++)
+ msgToMm.l3_data.cipherCmplt.cmp.imeisv.digits[i]=pUmCiphCmplt->imeisv.digits[i];
+ IDEBUG__(("INFO@rm_ProcMsCiphModeCmplt:mobileIdType:%d, numDigits: %d, digits %d%d\n",
+ pUmCiphCmplt->imeisv.mobileIdType,
+ pUmCiphCmplt->imeisv.numDigits,
+ pUmCiphCmplt->imeisv.digits[0],
+ pUmCiphCmplt->imeisv.digits[1]));
+ }
+
+ //Send the complete MM Paging Response message out
+ api_SendMsgFromRmToMm( sizeof(rm_ItcTxL3Msg_t), (u8*) &msgToMm);
+}
+
+#endif //__RM_S5SIGMODEESTABLISHED_CPP__
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_S6ActivatingTrafficMode.cpp b/data/mnet/GP10/Host/rm/Src/rm_S6ActivatingTrafficMode.cpp
new file mode 100644
index 0000000..22d3567
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_S6ActivatingTrafficMode.cpp
@@ -0,0 +1,95 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __RM_S6ACTIVATINGTRAFFICMODE_CPP__
+#define __RM_S6ACTIVATINGTRAFFICMODE_CPP__
+
+
+#include "rm\rm_head.h"
+
+void rm_S6ActivatingTrafficMode(void)
+{
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER@rm_S6ActivatingTrafficMode\n"));
+
+ if (rm_pSmCtxt->smType != RM_MAIN_SM)
+ {
+ //Mode Modify always associated with main SM
+ EDEBUG__(("ERROR@rm_S6ActivatingTrafficMode: not main SM\n"));
+ return;
+ }
+
+ switch(rm_ItcRxOrigin)
+ {
+ case MODULE_L1:
+ //Handle Mode Modify Ack or NAck
+ rm_ProcL1ModeAckNAck();
+ break;
+ default:
+ //Unexpected message orgination
+ IDEBUG__(("WARNING@rm_S9ActivatingTrafficMode:wrong msg origination:%d\n",
+ rm_ItcRxOrigin));
+ break;
+
+ } //End of switch()
+
+} //End of rm_S6ActivatingTrafficMode()
+
+
+void rm_ProcL1ModeAckNAck(void)
+{
+ PDEBUG__(("INFO@rm_ProcL1ModeAckNAck:smType=%d, smState=%d\n",
+ rm_pSmCtxt->smType, rm_pSmCtxt->state));
+
+ if ( rm_pItcRxL1Msg->l3_data.buffer[0]==RM_L1MG_DEDMGMT )
+ {
+ //Check if having got Mode Modify Ack or NAck message from L1
+ if ( rm_pItcRxL1Msg->l3_data.buffer[1]==RM_L1MT_MODEMODIFYACK_MSB &&
+ rm_pItcRxL1Msg->l3_data.buffer[2]==RM_L1MT_MODEMODIFYACK_LSB )
+ {
+ //Get a positive ack from DSP
+ rm_SendChanModeModify(rm_pSmCtxt);
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3L01 );
+ rm_pSmCtxt->state = RM_S8TRAFFICMODE_ACTIVATED;
+ }
+ else if ( rm_pItcRxL1Msg->l3_data.buffer[1]==RM_L1MT_MODEMODIFYNACK_MSB &&
+ rm_pItcRxL1Msg->l3_data.buffer[2]==RM_L1MT_MODEMODIFYNACK_LSB )
+ {
+ //Get a negative ack from DSP
+ EDEBUG__(("ERROR@rm_ProcL1ModeAckNAck:NACK received\n"));
+ EDUMP__((MAREA__, rm_pItcRxL1Msg->l3_data.buffer,
+ rm_pItcRxL1Msg->l3_data.msgLength ));
+ //Release the call since this DSP ts is not functioning right now
+ rm_SendChanRelease(rm_ItcRxEntryId);
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3109);
+
+ //Adjust SM state to S7
+ rm_pSmCtxt->relCause = CNI_RIL3_CAUSE_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE;
+ rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_RELEASING;
+ rm_pSmCtxt->state = RM_S7RELEASING_SIGTRAFFICCHAN;
+ } else
+ {
+ IDEBUG__(("WARNING@rm_ProcL1ModeAckNAck: sm(%d,%d), l1 msgType:%d,%d\n",
+ rm_pSmCtxt->smType,
+ rm_pSmCtxt->state,
+ rm_pItcRxL1Msg->l3_data.buffer[1],
+ rm_pItcRxL1Msg->l3_data.buffer[2] ));
+ }
+ } else
+ {
+ //Got an unexpected message from L1
+ IDEBUG__(("WARNING@rm_ProcL1ModeAckNAck: sm(%d,%d), l1 msgGroup:%d\n",
+ rm_pSmCtxt->smType,
+ rm_pSmCtxt->state,
+ rm_pItcRxL1Msg->l3_data.buffer[0]));
+ }
+}
+
+#endif /* __RM_S6ACTIVATINGTRAFFICMODE_CPP__ */
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_S7ReleasingSigTrafficChan.cpp b/data/mnet/GP10/Host/rm/Src/rm_S7ReleasingSigTrafficChan.cpp
new file mode 100644
index 0000000..33a4fb6
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_S7ReleasingSigTrafficChan.cpp
@@ -0,0 +1,134 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __RM_S7RELEASINGSIGTRAFFICCHAN_CPP__
+#define __RM_S7RELEASINGSIGTRAFFICCHAN_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_S7ReleasingSigTrafficChan(void)
+{
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER@rm_S7ReleasingSigTrafficChan\n"));
+
+ if ( rm_pSmCtxt->smType != RM_MAIN_SM ||
+ rm_pItcRxMdMsg->sapi == RM_SAPI3 )
+ {
+ //At state S7: Only main signaling i.e. main SM will be attended
+ IDEBUG__(( "WARNING@rm_S7ReleasingSigTrafficChan: smType %d, sapi %d\n",
+ rm_pSmCtxt->smType, rm_pItcRxMdMsg->sapi ));
+ return;
+ }
+
+ switch(rm_ItcRxOrigin)
+ {
+ case MODULE_MD:
+ //Expecting DL_REL_IND in normal signaling procedure but abnormal
+ //situations are handled too.
+ if (rm_pItcRxMdMsg->primitive_type == DL_REL_IND)
+ {
+ //May carry up l3 data but make nonsense
+ rm_StopTimer( rm_ItcRxEntryId, RM_T3109 );
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3L02);
+
+ //SMS-SAPI3-Begin
+
+ //rm_pSmCtxt->relCause = CNI_RIL3_CAUSE_TEMPORARY_FAILURE;
+ rm_SendRrRelInd(RM_MDLERR, rm_pSmCtxt->mEntryId);
+
+ rm_SendDlRelReq(rm_pSmCtxt->mOId, RM_SAPI0, RM_LOCAL_RELEASE);
+ rm_SendDlRelReq(rm_pSmCtxt->mOId, RM_SAPI3, RM_LOCAL_RELEASE);
+ rm_SendDlRelReq(rm_pSmCtxt->aOId, RM_SAPI3, RM_LOCAL_RELEASE);
+
+ rm_SmCtxt_t *pASmCtxt;
+ pASmCtxt = rm_pSmCtxt->pPhyChan->pASmCtxt;
+ pASmCtxt->state = RM_S1RM_RUNNING;
+
+ //SMS-SAPI3-End
+ }
+ //
+ //else
+ // IDEBUG__(("WARNING@rm_S7ReleasingSigTrafficChan: LAPDm message:%d\n",
+ // rm_pItcRxMdMsg->primitive_type));
+
+ break;
+
+ case MODULE_RM:
+ // Standard T3109 and internal T3L02 will be watched
+ if ( rm_pItcRxRmMsg->primitive_type != RM_TIMER_IND )
+ {
+ IDEBUG__(("WARNING@rm_S7ReleasingSigTrafficChan: prim:%d,timerId=%d\n",
+ rm_pItcRxRmMsg->primitive_type,rm_pItcRxRmMsg->timerId ));
+ return;
+ }
+ //PDEBUG__(("rm_S7ReleasingSigTrafficChan: Timer Handling, timerId=%d\n",
+ // rm_pItcRxRmMsg->timerId));
+ switch (rm_pItcRxRmMsg->timerId)
+ {
+ case RM_T3L02:
+ rm_StartTimer( rm_ItcRxEntryId, RM_T3111 );
+ rm_SendRfChanRelease(rm_pSmCtxt->pPhyChan);
+
+ //SMS-SAPI3-Begin
+ //rm_SendRrRelCnf();
+ //SMS-SAPI3-End
+
+ rm_pSmCtxt->state = RM_S9DEACTIVATING_SIGTRAFFICCHAN;
+ break;
+
+ case RM_T3109:
+
+ //SMS-SAPI3-Begin
+
+ rm_SendRrRelInd(RM_MDLERR, rm_pSmCtxt->mEntryId);
+
+ rm_SendDlRelReq(rm_pSmCtxt->mOId, RM_SAPI0, RM_LOCAL_RELEASE);
+ rm_SendDlRelReq(rm_pSmCtxt->mOId, RM_SAPI3, RM_LOCAL_RELEASE);
+ rm_SendDlRelReq(rm_pSmCtxt->aOId, RM_SAPI3, RM_LOCAL_RELEASE);
+
+ rm_SmCtxt_t *pASmCtxt;
+ pASmCtxt = rm_pSmCtxt->pPhyChan->pASmCtxt;
+ pASmCtxt->state = RM_S1RM_RUNNING;
+
+ //Release RF channel and SM goes to a new state S9
+ //rm_SendDlRelReq(rm_pSmCtxt->mOId,RM_SAPI0,RM_LOCAL_RELEASE);
+
+ //if (rm_pSmCtxt->sapi != RM_SAPI0)
+ // rm_SendDlRelReq(rm_pSmCtxt->mOId, rm_pSmCtxt->sapi,RM_LOCAL_RELEASE);
+
+ //SMS-SAPI3-End
+
+ rm_SendRfChanRelease(rm_pSmCtxt->pPhyChan);
+ rm_StartTimer( rm_ItcRxEntryId, RM_T3111 );
+
+ //SMS-SAPI3-Begin
+ //rm_SendRrRelCnf();
+ //SMS-SAPI3-End
+
+ rm_pSmCtxt->state = RM_S9DEACTIVATING_SIGTRAFFICCHAN;
+ break;
+
+ default:
+ IDEBUG__(("WARNING@rm_S7ReleasingSigTrafficChan: wrong timer expiry:%d\n",
+ rm_pItcRxRmMsg->timerId));
+ break;
+ }
+ break;
+
+ default:
+ //Unexpected message origin at this SM state
+ IDEBUG__(("WARNING@rm_S7ReleasingSigTrafficChan: unexpected message origin:%d\n",
+ rm_ItcRxOrigin));
+ break;
+
+ } //End of switch()
+
+} //End of rm_S7ReleasingSigTrafficChan()
+
+#endif //__RM_S7RELEASINGSIGTRAFFICCHAN_CPP__
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_S8TrafficModeActivated.cpp b/data/mnet/GP10/Host/rm/Src/rm_S8TrafficModeActivated.cpp
new file mode 100644
index 0000000..290f5b1
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_S8TrafficModeActivated.cpp
@@ -0,0 +1,271 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __RM_S8TRAFFICMODEACTIVATED_CPP__
+#define __RM_S8TRAFFICMODEACTIVATED_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_S8TrafficModeActivated(void)
+{
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER@rm_S8TrafficModeActivated\n"));
+
+ if (rm_pSmCtxt->smType != RM_MAIN_SM)
+ {
+ //Mode Modify only occurs on main DCCH assumed
+ EDEBUG__(("ERROR@rm_S8TrafficModeActivated: not main SM\n"));
+ return;
+ }
+
+ switch(rm_ItcRxOrigin)
+ {
+ case MODULE_MD:
+ //Handle DL_DATA_IND w CHN MODE MODIFY ACK inside
+ if (rm_pItcRxMdMsg->primitive_type != DL_DATA_IND)
+ EDEBUG__(("ERROR@rm_S8TrafficModeActivated: unexp. L2/prim:%d\n",
+ rm_pItcRxMdMsg->primitive_type));
+ else
+ {
+ rm_ProcMsModeModifyAckNack();
+ }
+ break;
+
+ case MODULE_RM:
+ //Handle T3L01 exp here!
+ rm_pSmCtxt->relCause =
+ CNI_RIL3_CAUSE_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE;
+ rm_ProcT3L01Expiry();
+ break;
+
+ case MODULE_MM:
+ if ( rm_pItcRxMmMsg->primitive_type == RR_REL_REQ )
+ {
+ //Release RF resource in terms of MM command
+ rm_SendChanRelease(rm_ItcRxEntryId);
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3109);
+
+ //Adjust SM state to S7
+ rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_RELEASING;
+ rm_pSmCtxt->state = RM_S7RELEASING_SIGTRAFFICCHAN;
+ } else
+ //Unexpected message from MM
+ IDEBUG__(("WARNING@rm_S8TrafficModeActivated:MM msgType:%d\n",
+ rm_pItcRxMmMsg->message_type));
+ break;
+ default:
+ //Unexpected message origin at this SM state
+ IDEBUG__(("WARNING@rm_S8TrafficModeActivated:unexpected message origin:%d\n",
+ rm_ItcRxOrigin));
+ break;
+
+ } //End switch()
+
+} //End of rm_S8TrafficModeActivated()
+
+
+void rm_ProcMsModeModifyAckNack(void)
+{
+ int time;
+
+ rm_EdRet_t rrEdRet;
+
+ PDEBUG__(("INFO@rm_ProcMsModeModifyAckNack:callInfo(%d,%d)\n",
+ rm_ItcRxEntryId, rm_pSmCtxt->callIdx));
+
+ //Decode this L3 message received to see if it is CHN MODE MODIFY ACK
+ //PR1104 RR STATUS MESSAGE
+ //rrEdRet = CNI_RIL3RRM_Decode( &(rm_pItcRxMdMsg->l3_data),&rm_UmMsg );
+ rrEdRet = rm_MsgAnalyze();
+
+ if ( rrEdRet != RM_RRED_SUCCESS )
+ {
+ EDEBUG__(("ERROR@rm_S8TrafficModeActivated: L2/l3_data decoded KO\n"));
+ return;
+ }
+
+ //PDEBUG__(("INFO@rm_ProcMsModeModifyAckNack: ret %d ........................\n", rrEdRet ));
+
+ //PDEBUG__(("....Header: md %x, msgType %x\n",
+ // rm_UmMsg.header.protocol_descriminator,
+ // rm_UmMsg.header.message_type));
+
+ //PDEBUG__(("....ChanDescription: (ie_pre %d, hop %d, chnTyp %d, tn %d, sub %d, tsc %x, freq %d\n",
+ // rm_UmMsg.channelModeModifyAck.channelDescription.ie_present,
+ // rm_UmMsg.channelModeModifyAck.channelDescription.hopping,
+ // rm_UmMsg.channelModeModifyAck.channelDescription.channelType,
+ // rm_UmMsg.channelModeModifyAck.channelDescription.subChannelNumber,
+ // rm_UmMsg.channelModeModifyAck.channelDescription.TN,
+ // rm_UmMsg.channelModeModifyAck.channelDescription.TSC,
+ // rm_UmMsg.channelModeModifyAck.channelDescription.arfcn));
+
+ //PDEBUG__(("....ChanMode: (pre %d, value %d\n",
+ // rm_UmMsg.channelModeModifyAck.channelMode.ie_present,
+ // rm_UmMsg.channelModeModifyAck.channelMode.value));
+
+ //Decoding successful. Further check if
+ if ( rm_UmMsg.header.protocol_descriminator != RM_PD ||
+ rm_UmMsg.header.message_type != RM_CHANNEL_MODE_MODIFY_ACK )
+ {
+ EDEBUG__(("ERROR-rm_S8TrafficModeActivated:unexpected msg PD:%d;MT:%d",
+ rm_UmMsg.header.protocol_descriminator,
+ rm_UmMsg.header.message_type ));
+ rm_SendRrStatus(CNI_RIL3_RR_MESSAGE_TYPE_NOT_COMPATIBLE);
+ return;
+ }
+
+ //Got expected msg i.e. Channel Mode Modify Acknowlegement, move to S10
+
+ rm_StopTimer(rm_ItcRxEntryId, RM_T3L01);
+
+ if (rm_pSmCtxt->codAlgo == rm_UmMsg.channelModeModifyAck.channelMode.value)
+ {
+ rm_SendChanAssignComplete();
+ if (rm_pSmCtxt->state != RM_S10TRAFFICMODE_ESTABLISHED)
+ {
+ //PM: succTCHSeizures, maxNbrOfBusyTCHs, meanNbrOfBusyTCHs
+
+ PM_CellMeasurement.succTCHSeizures.increment();
+ rm_maxNbrOfBusyTCHs++;
+ PM_CellMeasurement.maxNbrOfBusyTCHs.setValue(rm_maxNbrOfBusyTCHs); //increment();
+ //PM_CellMeasurement.maxNbrOfBusyTCHs.addRecord(rm_maxNbrOfBusyTCHs); //increment();
+
+ rm_NoOfBusyTchf++;
+ PM_CellMeasurement.meanNbrOfBusyTCHs.addRecord(rm_NoOfBusyTchf);
+
+ rm_pSmCtxt->pPhyChan->startTime=tickGet();
+
+ rm_pSmCtxt->state = RM_S10TRAFFICMODE_ESTABLISHED;
+ }
+ }
+ else
+ {
+ PDEBUG__(("INFO@rm_S8TrafficModeActivated: unsupport mode(cur %d, req %d), entryId '%d'\n",
+ rm_UmMsg.channelModeModifyAck.channelMode.value,
+ rm_pSmCtxt->codAlgo,
+ rm_ItcRxEntryId));
+
+ //SMS-SAPI3-Begin
+
+ //Get a negative ack from MS, release the call !
+
+ rm_SendChanRelease(rm_ItcRxEntryId);
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3109);
+
+ rm_pSmCtxt->relCause =
+ CNI_RIL3_CAUSE_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE;
+
+ //Adjust SM state to S7
+ rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_RELEASING;
+ rm_pSmCtxt->state = RM_S7RELEASING_SIGTRAFFICCHAN;
+
+ if (rm_pSmCtxt->state == RM_S10TRAFFICMODE_ESTABLISHED)
+ {
+ //PM: maxNbrOfBusyTCHs, meanNbrOfBusyTCHs
+
+ if (--rm_NoOfBusyTchf >= 0)
+ PM_CellMeasurement.meanNbrOfBusyTCHs.addRecord(rm_NoOfBusyTchf);
+ else
+ rm_NoOfBusyTchf = 0;
+
+ time = tickGet() - rm_pSmCtxt->pPhyChan->startTime;
+ PM_CellMeasurement.meanTCHBusyTime.addRecord(time);
+
+ rm_pSmCtxt->pPhyChan->startTime=tickGet();
+
+ if (--rm_maxNbrOfBusyTCHs >= 0)
+ PM_CellMeasurement.maxNbrOfBusyTCHs.setValue(rm_maxNbrOfBusyTCHs); //decrement();
+ //PM_CellMeasurement.maxNbrOfBusyTCHs.addRecord(rm_maxNbrOfBusyTCHs); //decrement();
+ else
+ rm_maxNbrOfBusyTCHs = 0;
+
+ rm_pSmCtxt->pPhyChan->chanBusy = RM_FALSE;
+ }
+ //rm_RslRelease();
+
+ //SMS-SAPI3-End
+
+ }
+}
+
+
+void rm_ProcT3L01Expiry(void)
+{
+ int time;
+
+ PDEBUG__(("INFO@rm_ProcT3L01Expiry: smInfo(%d,%d),callIdx(%d,%d)\n",
+ rm_pSmCtxt->smType, rm_pSmCtxt->state, rm_ItcRxEntryId,
+ rm_pSmCtxt->callIdx));
+
+ if ( rm_pItcRxRmMsg->primitive_type == RM_TIMER_IND ||
+ rm_pItcRxRmMsg->timerId != RM_T3L01 ||
+ rm_pSmCtxt->pPhyChan->T3L01.state == RM_FALSE )
+ {
+ EDEBUG__(("ERROR@rm_S8ReleasingSigTrafficChan: prim:%d,timer:%d, sta:%d\n",
+ rm_pItcRxRmMsg->primitive_type,
+ rm_pItcRxRmMsg->timerId,
+ rm_pSmCtxt->pPhyChan->T3L01.state ));
+ return;
+ }
+
+ //SMS-SAPI3-Begin
+
+ // No rsp to Channel Mode Modify from Mobile
+ rm_SendChanRelease(rm_ItcRxEntryId);
+ rm_SendDeactivateSacch(rm_pSmCtxt->pPhyChan);
+ //CT_CHN rm_SendDlRelReq(rm_pSmCtxt->mOId, RM_SAPI0,
+ // rm_pSmCtxt->chanType,RM_LOCAL_RELEASE);
+ //rm_SendDlRelReq(rm_pSmCtxt->mOId, RM_SAPI0, RM_LOCAL_RELEASE);
+
+ //if (rm_pSmCtxt->sapi != RM_SAPI0)
+ //CT_CHN rm_SendDlRelReq(rm_pSmCtxt->mOId, rm_pSmCtxt->sapi,
+ // rm_pSmCtxt->chanType,RM_LOCAL_RELEASE);
+ // rm_SendDlRelReq(rm_pSmCtxt->mOId, rm_pSmCtxt->sapi, RM_LOCAL_RELEASE);
+
+ // Send RR_REL_IND to MM
+ //rm_SendRrRelInd( RM_RSLIND, rm_ItcRxEntryId );
+
+ //SMS-SAPI3-End
+
+ rm_StartTimer(rm_ItcRxEntryId, RM_T3109);
+
+ rm_pSmCtxt->relCause = CNI_RIL3_CAUSE_DESTINATION_OUT_OF_ORDER; //no rsp from MS
+
+ //Adjust SM state to S7
+ rm_pSmCtxt->state = RM_S7RELEASING_SIGTRAFFICCHAN;
+ rm_pSmCtxt->pPhyChan->state = RM_PHYCHAN_RELEASING;
+
+ if (rm_pSmCtxt->state == RM_S10TRAFFICMODE_ESTABLISHED)
+ {
+ //PM: maxNbrOfBusyTCHs, meanNbrOfBusyTCHs
+
+ if (--rm_NoOfBusyTchf >= 0)
+ PM_CellMeasurement.meanNbrOfBusyTCHs.addRecord(rm_NoOfBusyTchf);
+ else
+ rm_NoOfBusyTchf = 0;
+
+ time = tickGet() - rm_pSmCtxt->pPhyChan->startTime;
+ PM_CellMeasurement.meanTCHBusyTime.addRecord(time);
+
+ rm_pSmCtxt->pPhyChan->startTime=tickGet();
+
+ if (--rm_maxNbrOfBusyTCHs >= 0)
+ PM_CellMeasurement.maxNbrOfBusyTCHs.setValue(rm_maxNbrOfBusyTCHs); //decrement();
+ //PM_CellMeasurement.maxNbrOfBusyTCHs.addRecord(rm_maxNbrOfBusyTCHs); //decrement();
+ else
+ rm_maxNbrOfBusyTCHs = 0;
+
+ rm_pSmCtxt->pPhyChan->chanBusy = RM_FALSE;
+ }
+}
+
+#endif // __RM_S8TRAFFICMODEACTIVATED_CPP__
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_S9DeactivatingSigTrafficChan.cpp b/data/mnet/GP10/Host/rm/Src/rm_S9DeactivatingSigTrafficChan.cpp
new file mode 100644
index 0000000..984eb17
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_S9DeactivatingSigTrafficChan.cpp
@@ -0,0 +1,420 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_S9DEACTIVATINGSIGTRAFFICCHAN_CPP__
+#define __RM_S9DEACTIVATINGSIGTRAFFICCHAN_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_S9DeactivatingSigTrafficChan(void)
+{
+ int time;
+ rm_PhyChanDesc_t *pPhyChan;
+
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_S9DeactivatingSigTrafficChan\n"));
+
+ if (rm_pSmCtxt->smType != RM_MAIN_SM)
+ {
+ //Channel Activation always associated with main SM
+ IDEBUG__(("WARNING@rm_S9DeactivatingSigTrafficChan:not main SM\n"));
+ return;
+ }
+
+ switch(rm_ItcRxOrigin)
+ {
+ case MODULE_L1:
+ //Get a MPH_INFO_INF message. Analyze and process it
+ if ( rm_pItcRxL1Msg->l3_data.buffer[0]!=RM_L1MG_DEDMGMT ||
+ rm_pItcRxL1Msg->l3_data.buffer[1]!=RM_L1MT_RFCHANRELACK_MSB ||
+ rm_pItcRxL1Msg->l3_data.buffer[2]!=RM_L1MT_RFCHANRELACK_LSB )
+ {
+ //Got unexpected message from L1
+ IDEBUG__(("WARNING@rm_S9DeactivatingSigTrafficChan:L1 msg PD:%x;MT:%x,%x\n",
+ rm_pItcRxL1Msg->l3_data.buffer[0],rm_pItcRxL1Msg->l3_data.buffer[1],
+ rm_pItcRxL1Msg->l3_data.buffer[2] ));
+ return;
+ }
+
+ break;
+
+ case MODULE_RM:
+ //Currently T3111 expiry messages comes here
+ //PDEBUG__(("rm_S9DeactivatingSigTrafficChan: Timer Handling, timerId=%d\n",
+ //rm_pItcRxRmMsg->timerId));
+
+ if ( rm_pItcRxRmMsg->primitive_type != RM_TIMER_IND ||
+ rm_pSmCtxt->pPhyChan->T3111.state == RM_FALSE ||
+ rm_pItcRxRmMsg->timerId != RM_T3111 )
+ {
+ IDEBUG__(("WARNING@rm_S9DeactivatingSigTrafficChan: prim:%d,timer sta=%d\n",
+ rm_pItcRxRmMsg->primitive_type,rm_pSmCtxt->pPhyChan->T3111.state ));
+ return;
+ }
+ break;
+
+ default:
+ //TBD: Unexpected message orgination
+ //IDEBUG__(("WARNING@rm_S9DeactivatingSigTrafficChan:wrong msg origination:%d\n",
+ // rm_ItcRxOrigin));
+
+ return;
+ break;
+
+ } //End of switch()
+
+ //Free radio resources and cancel timers
+ pPhyChan = rm_pSmCtxt->pPhyChan;
+ pPhyChan->state = RM_PHYCHAN_FREE;
+ pPhyChan->rslCount = 0;
+ pPhyChan->chanBusy = RM_FALSE;
+ pPhyChan->T3101.state = RM_FALSE;
+ pPhyChan->T3111.state = RM_FALSE;
+ pPhyChan->T3109.state = RM_FALSE;
+ rm_StopTimer( rm_ItcRxEntryId, RM_T3109 );
+ rm_StopTimer( rm_ItcRxEntryId, RM_T3111 );
+ rm_StopTimer( rm_ItcRxEntryId, RM_T3101 );
+ pPhyChan->pMSmCtxt->state = RM_S1RM_RUNNING;
+ pPhyChan->pASmCtxt->state = RM_S1RM_RUNNING;
+
+ //Activate CBCH if its activation is pending on release of SDCCH/4 (2)
+ if ( (pPhyChan==rm_pCbchChan)&&(pPhyChan->usable==RM_PHYCHAN_USABLE)&&
+ (OAMrm_CBCH_OPSTATE) )
+ {
+ rm_pCbchChan->usable = RM_PHYCHAN_CBCH_USABLE; //block SDCCH any attempt now
+ if (rm_ChanCbchActive)
+ IDEBUG__(("WARNIG@rm_OamProcResourceConfigData: cbch is already on \n"));
+
+ rm_ChanCbchActive = RM_FALSE;
+ rm_ActivateCbchChan();
+ }
+
+ if (pPhyChan->chanType==RM_PHYCHAN_TCHF_S) rm_PostTchfRelHandler(pPhyChan);
+ else if (pPhyChan->chanType==RM_PHYCHAN_SDCCH4) rm_PostSdcch4RelHandler(pPhyChan);
+ else EDEBUG__(("ERROR@rm_S9DeactivatingSigTrafficChan:chanType=%d\n",pPhyChan->chanType));
+
+} // End of rm_S9DeactivatingSigTrafficChan()
+
+//GP2
+#if 0
+void rm_LockParentTrxSlotIfNeeded(int trx, int slot)
+{
+ int i;
+
+ PDEBUG__(("INFO@rm_LockParentTrxSlotIfNeeded: (%d,%d)\n", trx, slot));
+
+ //Check if (trx, slot) existent
+ if ( !( (OAMrm_TRX_ONOFF_MAP)&(1<<trx) ) || (trx>=OAMrm_MAX_TRXS) ||
+ slot>=OAMrm_SLOTS_PER_TRX )
+ {
+ IDEBUG__(("WARNING@rm_LockParentTrxSlotIfNeeded: invalid (%d,%d)\n",
+ trx,slot));
+ return;
+ }
+
+ //Check if the TS is shutting-down pending now
+ if (OAMrm_CHN_AMSTATE(trx,slot)==shuttingDown)
+ {
+ //Lock this (trx,slot) if all its resident channels are locked
+ if (trx||slot)
+ {
+ //(trx,slot) carries only one functional channel ie tch-f
+ //Fire an information alarm on MIB for ViperWatch watching
+ PDEBUG__(("INFO@rm_LockParentTrxSlotIfNeeded:(%d,%d) shuttingDown->locked\n",
+ trx, slot));
+
+ rm_SetTrxSlotAdminStateIfNeeded(trx,slot,locked);
+ rm_LockParentTrxIfNeeded(trx);
+
+ } else
+ {
+ //(trx,slot) carrying BCCH and CCCH, equal to lock the BTS
+
+ for (i=0;i<OAMrm_MAX_SDCCH4S;i++)
+ {
+ if (rm_PhyChanSdcch4[i].amState==shuttingDown)
+ break;
+ else
+ rm_PhyChanSdcch4[i].amState==locked;
+ }
+ if (i>=OAMrm_MAX_SDCCH4S)
+ {
+ rm_SetTrxSlotAdminStateIfNeeded(trx,slot,locked);
+
+ PDEBUG__(("INFO@rm_LockParentTrxSlotIfNeeded:(%d,%d) shuttingDown->locked\n",
+ trx, slot));
+
+ rm_LockParentTrxIfNeeded(trx);
+
+ //if (OAMrm_TRX_AMSTATE(trx)==shuttingDown)
+ // {
+ // //(trx,slot) carries only one functional channel ie tch-f
+ // //Fire an information alarm on MIB for ViperWatch watching
+ // PDEBUG__(("INFO@rm_LockParentTrxSlotIfNeeded:(%d,%d) shuttingDown->locked\n",
+ // trx, slot));
+ // rm_LockParentTrxIfNeeded(trx);
+ //}
+ //else
+ //{
+ // if (OAMrm_BTS_AMSTATE == shuttingDown)
+ // {
+ // //All (trx=0,slot=0) resident channels are already locked,
+ // //This is equivalent to locking the whole BTS, thus do it!
+ // PDEBUG__(("INFO@rm_LockParentTrxSlotIfNeeded:(%d,%d) ie whole VC shuttingDown->locked\n",
+ // trx, slot));
+ // rm_SetBtsAdminStateIfNeeded(locked);
+ // rm_ProcBtsAdminStateLocked();
+ // }
+ //}
+ }
+ }
+ }
+}
+
+void rm_LockParentTrxIfNeeded(int trx)
+{
+ PDEBUG__(("INFO@rm_LockParentTrxIfNeeded: trx=%d\n",trx));
+
+ //Check if trx is existent or not
+ if ( !( (OAMrm_TRX_ONOFF_MAP)&(1<<trx) ) || (trx>=OAMrm_MAX_TRXS))
+ {
+ IDEBUG__(("WARNING@rm_LockParentTrxIfNeeded: invalid trx=%d\n",
+ trx));
+ return;
+ }
+
+ if (OAMrm_TRX_AMSTATE(trx)==shuttingDown)
+ {
+ //Lock this trx if all the channels are already locked now
+ int i;
+
+ for (i=0;i<OAMrm_SLOTS_PER_TRX;i++)
+ {
+ if (OAMrm_CHN_AMSTATE(trx, i)==shuttingDown)
+ break;
+ else
+ {
+ rm_SetTrxSlotAdminStateIfNeeded(trx,i,locked);
+ }
+ }
+
+ if (i>=OAMrm_SLOTS_PER_TRX)
+ {
+ rm_SetTrxAdminStateIfNeeded(trx,locked);
+
+ //All trx-resident time slots already locked now,lock trx
+ //Fire an information alarm on MIB for ViperWatch watching
+ PDEBUG__(("INFO@rm_LockParentTrxIfNeeded: trx '%d' shuttingDown->locked\n",
+ trx));
+ rm_LockParentBtsIfNeeded();
+ }
+ }
+}
+
+void rm_LockParentBtsIfNeeded(void)
+{
+ PDEBUG__(("INFO@rm_LockParentBtsIfNeeded\n"));
+
+ //Check if BTS is shutting down pending first
+ if (OAMrm_BTS_AMSTATE==shuttingDown)
+ {
+ //Lock BTS if all its trxes are already locked
+ int i;
+ for (i=0; i<OAMrm_MAX_TRXS; i++ )
+ {
+ //Check if ith TRX is existent
+ if ( (OAMrm_TRX_ONOFF_MAP)&(1<<i) )
+ {
+ if (OAMrm_TRX_AMSTATE(i)==shuttingDown)
+ break;
+ else
+ {
+ rm_SetTrxAdminStateIfNeeded(i,locked);
+ }
+ }
+ }
+ if (i>=OAMrm_MAX_TRXS)
+ {
+ //all trxes have been locked, thus locking BTS
+ rm_SetBtsAdminStateIfNeeded(locked);
+ rm_SendTuneSynthToTrx(0,0);
+ rm_SendTuneSynthToTrx(1,0);
+ }
+ }
+}
+
+void rm_SetTrxSlotAdminStateIfNeeded(int trx, int slot, AdministrativeState state)
+{
+ PDEBUG__(("INFO@rm_SetTrxSlotAdminStateIfNeeded: (%d,%d,%d)\n", trx,slot,state));
+
+ if (OAMrm_CHN_AMSTATE(trx,slot) != state)
+ {
+ switch(state)
+ {
+ case locked:
+ rm_SetRmOpState(rm_TrxSlotAdminLockedAlarmCode[trx][slot]);
+ break;
+ case unlocked:
+ rm_SetRmOpState(rm_TrxSlotAdminUnlockedAlarmCode[trx][slot]);
+ break;
+ case shuttingDown:
+ rm_SetRmOpState(rm_TrxSlotAdminShuttingDownAlarmCode[trx][slot]);
+ break;
+ default:
+ IDEBUG__(("WARNING@rm_SetTrxSlotAdminStateIfNeeded: (%d,%d,%d)\n", trx,slot,state));
+ break;
+ }
+ }
+ OAMrm_CHN_AMSTATEa(trx, slot) = state;
+ rm_SetTrxSlotAdminState(trx, slot, state);
+}
+
+void rm_SetBtsAdminStateIfNeeded(AdministrativeState state)
+{
+ PDEBUG__(("INFO@rm_SetBtsAdminStateIfNeeded: state=%d\n",state));
+
+ if ( OAMrm_BTS_AMSTATE != state )
+ {
+ if (state == locked)
+ rm_SetRmOpState(EC_RM_BTS_LOCKED);
+ else if (state == unlocked)
+ rm_SetRmOpState(EC_RM_BTS_UNLOCKED);
+ else if (state == shuttingDown)
+ rm_SetRmOpState(EC_RM_BTS_SHUTTINGDOWN);
+ else
+ IDEBUG__(("WARNING@rm_SetBtsAdminStateIfNeeded: invalid state=%d\n",state));
+ }
+ OAMrm_BTS_AMSTATE = state;
+ rm_SetBtsAdminState(state);
+}
+
+void rm_SetTrxAdminStateIfNeeded(int trx, AdministrativeState state)
+{
+ int i;
+
+ PDEBUG__(("INFO@rm_SetTrxAdminStateIfNeeded: trx=%d, state=%d\n",trx,state));
+ if (OAMrm_TRX_AMSTATE(trx) != state)
+ {
+ switch(state)
+ {
+ case locked:
+ rm_SetRmOpState(rm_TrxAdminLockedAlarmCode[trx]);
+ break;
+ case unlocked:
+ rm_SetRmOpState(rm_TrxAdminUnlockedAlarmCode[trx]);
+ break;
+ case shuttingDown:
+ rm_SetRmOpState(rm_TrxAdminShuttingDownAlarmCode[trx]);
+ break;
+ default:
+ IDEBUG__(("WARNING@rm_SetTrxAdminStateIfNeeded: trx=%d, invalid state=%d\n",
+ trx, state));
+ break;
+ }
+ }
+ OAMrm_TRX_AMSTATE(i)=locked;
+ rm_SetTrxAdminState(i,locked);
+}
+#endif //#if 0
+
+
+//GP2
+void rm_PostTchfRelHandler(rm_PhyChanDesc_t *pPhyChan)
+{
+ unsigned char trx, slot;
+
+ trx = pPhyChan->trxNo; slot = pPhyChan->slotNo;
+
+ switch(pPhyChan->amState)
+ {
+ case shuttingDown:
+ pPhyChan->amState = locked;
+ if (trx||slot)
+ {
+ if (--rm_NoOfUsableTchf < 0) rm_NoOfUsableTchf = 0;
+ PM_CellMeasurement.nbrOfAvailableTCHs.setValue(rm_NoOfUsableTchf);
+
+ grr_SendTrxSlotShutdownAck(MODULE_RM, grr_MsgQId, trx, slot);
+ }
+
+ break;
+
+ case unlocked:
+ rm_NoOfIdleTchf++;
+ PM_CellMeasurement.meanNbrOfIdleTCHsPerInterferenceBand.addRecord(rm_NoOfIdleTchf);
+ if (rm_AllAvailableTchf.allocated)
+ {
+ rm_AllAvailableTchf.allocated = RM_FALSE;
+ PM_CellMeasurement.allAvailableTCHAllocatedTime.stop();
+ }
+
+ //Unbar the cell if needed
+ grr_OverloadedCellBarOff();
+
+ break;
+
+ case locked:
+ break;
+
+ default:
+ IDEBUG__(("WARNING@rm_PostTchfRelHandler: invalid amState(%d) for trx(%d)slot(%d)\n",
+ pPhyChan->amState, trx, slot));
+ break;
+ }
+}
+
+//GP2
+void rm_PostSdcch4RelHandler(rm_PhyChanDesc_t *pPhyChan)
+{
+ unsigned char trx, slot, i;
+
+ trx = pPhyChan->trxNo; slot = pPhyChan->slotNo;
+
+ switch(pPhyChan->amState)
+ {
+ case shuttingDown:
+ if (--rm_nbrOfAvailableSDCCHs < 0) rm_nbrOfAvailableSDCCHs = 0;
+ PM_CellMeasurement.nbrOfAvailableSDCCHs.setValue(rm_nbrOfAvailableSDCCHs);
+
+ //Check if the TS is shutting-down pending now
+ if (OAMrm_CHN_AMSTATE(trx,slot) == shuttingDown)
+ {
+ //
+ for (i=0;i<OAMrm_MAX_SDCCH4S;i++)
+ {
+ if (rm_PhyChanSdcch4[i].amState==shuttingDown) break;
+ else rm_PhyChanSdcch4[i].amState==locked;
+ }
+
+ if (i>=OAMrm_MAX_SDCCH4S)
+ grr_SendTrxSlotShutdownAck(MODULE_RM, grr_MsgQId, trx, slot);
+ }
+
+ break;
+
+ case unlocked:
+ if (rm_AllAvailableSdcch4.allocated)
+ {
+ rm_AllAvailableSdcch4.allocated = RM_FALSE;
+ PM_CellMeasurement.allAvailableSDCCHAllocatedTime.stop();
+ }
+
+ break;
+
+ case locked:
+ break;
+
+ default:
+ IDEBUG__(("WARNING@rm_PostSdcch4RelHandler: invalid amState(%d) for trx(%d)slot(%d)chan(%d)\n",
+ pPhyChan->amState, trx, slot, pPhyChan->subChanNumber));
+ break;
+ }
+}
+
+#endif //__RM_S9DEACTIVATINGSIGTRAFFICCHAN_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendAllSystemInfosToBcchTrx.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendAllSystemInfosToBcchTrx.cpp
new file mode 100644
index 0000000..b91ce39
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendAllSystemInfosToBcchTrx.cpp
@@ -0,0 +1,26 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __RM_SENDALLSYSTEMINFOSTOBCCHTRX_CPP__
+#define __RM_SENDALLSYSTEMINFOSTOBCCHTRX_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendAllSystemInfosToBcchTrx( u8 trx)
+{
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_SendAllSystemInfosToBcchTrx\n"));
+
+ // TEST: System information 1 is not needed now
+ rm_SendSystemInfo2ToBcchTrx(trx,RM_L1SYSINFO_TYPE_2,OAMrm_RA_CELL_BARRED_STATE);
+ rm_SendSystemInfo3ToBcchTrx(trx,RM_L1SYSINFO_TYPE_3,OAMrm_RA_CELL_BARRED_STATE);
+ rm_SendSystemInfo4ToBcchTrx(trx,RM_L1SYSINFO_TYPE_4,OAMrm_RA_CELL_BARRED_STATE);
+
+} /* End of rm_SendAllSystemIinfosToBcchTrx() */
+
+#endif /* __RM_SENDALLSYSTEMINFOSTOBCCHTRX_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendAsyncHoRequired.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendAsyncHoRequired.cpp
new file mode 100644
index 0000000..849689d
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendAsyncHoRequired.cpp
@@ -0,0 +1,84 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __RM_SENDASYNCHOREQUIRED_CPP__
+#define __RM_SENDASYNCHOREQUIRED_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendAsyncHoRequired(void)
+{
+ rm_ItcTxL3Msg_t msgToCc; /* Send inter CC-RM siganling */
+ T_CNI_L3_ID ccId;
+ IntraL3HandoverRequired_t* pCcHoRequired;
+
+ /* Monitoring entrance to a function */
+ DBG_FUNC("rm_SendAsyncHoRequired", RM_LAYER);
+ DBG_ENTER();
+
+ /* TBD: may contain SAPI later if requested */
+ msgToCc.module_id = MODULE_RM;
+ msgToCc.entry_id = rm_ItcRxEntryId;
+ msgToCc.primitive_type = INTRA_L3_DATA;
+ msgToCc.message_type = INTRA_L3_RR_HANDOVER_REQUIRED;
+
+ //Send Handover Required message to CC if CC QId found
+ ccId = CNI_RIL3_IRT_Get_CC_Id(rm_ItcRxEntryId);
+ if ( ccId.msgq_id == CNI_NULL_L3_ID.msgq_id &&
+ ccId.sub_id == CNI_NULL_L3_ID.sub_id )
+ EDEBUG__(("ERROR-rm_SendAsyncHoRequired: null CC QId\n"));
+ else
+ {
+ //Found CC QId, send Handed-over candidates to CC
+ pCcHoRequired = (IntraL3HandoverRequired_t*)&(msgToCc.l3_data.handReqd);
+ pCcHoRequired->hoCause = rm_pItcRxL1Msg->l3_data.buffer[7];
+ pCcHoRequired->numCandidates = rm_pItcRxL1Msg->l3_data.buffer[8];
+
+ DBG_TRACE("TRACE-rm_SendAsyncHoRequired: hoCause %x numCand %d\n",
+ pCcHoRequired->hoCause, pCcHoRequired->numCandidates);
+//HOADDED
+//TEST DATA here
+//<taiyu:05-18-01> Changed to Global Cell ID
+ int j;
+ int mccInteger;
+ int mncInteger;
+ for (int i=0;i<pCcHoRequired->numCandidates;i++)
+ {
+ j = rm_pItcRxL1Msg->l3_data.buffer[9+(i<<1)];
+ pCcHoRequired->candGlobalCellId[i].candGlobalCellId.ci_disc = 0; // Whole cell global Id;
+
+ mccInteger = OAMrm_NCELL_MCC(j);
+ pCcHoRequired->candGlobalCellId[i].candGlobalCellId.mcc[0] = (mccInteger / 100) % 10;
+ pCcHoRequired->candGlobalCellId[i].candGlobalCellId.mcc[1] = (mccInteger / 10) % 10;
+ pCcHoRequired->candGlobalCellId[i].candGlobalCellId.mcc[2] = mccInteger % 10;
+
+ mncInteger = OAMrm_NCELL_MNC(j);
+ pCcHoRequired->candGlobalCellId[i].candGlobalCellId.mnc[0] = (mncInteger / 10) % 10;
+ pCcHoRequired->candGlobalCellId[i].candGlobalCellId.mnc[1] = mncInteger % 10;
+ pCcHoRequired->candGlobalCellId[i].candGlobalCellId.mnc[2] = 0xf;
+
+ pCcHoRequired->candGlobalCellId[i].candGlobalCellId.lac = OAMrm_NCELL_LAC(j);
+ pCcHoRequired->candGlobalCellId[i].candGlobalCellId.ci = OAMrm_NCELL_CI(j);
+
+ pCcHoRequired->candGlobalCellId[i].candIsExternal = OAMrm_NCELL_ISEXTERNAL(j);
+ pCcHoRequired->candGlobalCellId[i].candIsTried = 0;
+
+ DBG_TRACE("TRACE-rm_SendAsyncHoRequired: Cand MCC %x%x%x MNC %x%x%x Lac %d Ci %d IsExtern %d IsTried %d\n",
+ pCcHoRequired->candGlobalCellId[i].candGlobalCellId.mcc[0], pCcHoRequired->candGlobalCellId[i].candGlobalCellId.mcc[1], pCcHoRequired->candGlobalCellId[i].candGlobalCellId.mcc[2],
+ pCcHoRequired->candGlobalCellId[i].candGlobalCellId.mnc[0], pCcHoRequired->candGlobalCellId[i].candGlobalCellId.mnc[1], pCcHoRequired->candGlobalCellId[i].candGlobalCellId.mnc[2],
+ pCcHoRequired->candGlobalCellId[i].candGlobalCellId.lac, pCcHoRequired->candGlobalCellId[i].candGlobalCellId.ci, pCcHoRequired->candGlobalCellId[i].candIsExternal,
+ pCcHoRequired->candGlobalCellId[i].candIsTried);
+ }
+
+ api_SendMsgFromRmToCc(ccId.msgq_id, sizeof(rm_ItcTxL3Msg_t), (u8*)&msgToCc );
+ }
+
+} /* End of rm_SendAsyncHoRequired() */
+
+#endif /* __RM_SENDASYNCHOREQUIRED_CPP__ */
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendChanActivation.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendChanActivation.cpp
new file mode 100644
index 0000000..2391c20
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendChanActivation.cpp
@@ -0,0 +1,58 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __RM_SENDCHANACTIVATION_CPP__
+#define __RM_SENDCHANACTIVATION_CPP__
+
+
+#include "rm\rm_head.h"
+
+void rm_SendChanActivation( rm_PhyChanDesc_t *pPhyChan,
+ rm_PhyChanActDesc_t *pActDesc )
+{
+ rm_ItcTxMsg_t msgToL1;
+ u16 length;
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_SendChanActivation\n"));
+
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_DEDMGMT;
+ msgToL1.buffer[length++] = RM_L1MT_CHANACTIV_MSB;
+ msgToL1.buffer[length++] = RM_L1MT_CHANACTIV_LSB;
+ msgToL1.buffer[length++] = pPhyChan->trxNumber;
+ msgToL1.buffer[length++] = pPhyChan->chanNumberMSB;
+ msgToL1.buffer[length++] = pPhyChan->chanNumberLSB;
+ msgToL1.buffer[length++] = pActDesc->actType;
+ msgToL1.buffer[length++] = pActDesc->dtxCtrl;
+ msgToL1.buffer[length++] = pActDesc->datAttr;
+ msgToL1.buffer[length++] = pActDesc->ratType;
+ msgToL1.buffer[length++] = pActDesc->codAlgo;
+ msgToL1.buffer[length++] = pActDesc->ciphSet;
+ RM_MEMCPY(&msgToL1.buffer[length], pActDesc->ciphKey, RM_L1CIPHKEY_LEN);
+ length = length + RM_L1CIPHKEY_LEN;
+ msgToL1.buffer[length++] = pActDesc->bsPower;
+
+
+// NewlyAdded
+// msgToL1.buffer[length++] = pActDesc->msPower;
+ msgToL1.buffer[length++] = rm_pItcRxMdMsg->l3_data.buffer[4]; //MS pwr on Rach
+
+ msgToL1.buffer[length++] = pActDesc->taValue;
+
+//NewlyAdded
+ msgToL1.buffer[length++] = OAMrm_MS_TX_PWR_MAX_CCH; //MS init TX pwr
+
+ msgToL1.buffer[length++] = pActDesc->UIC; /* TBD: may use memcpy later */
+ msgToL1.msgLength = length;
+
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+
+} /* End of rm_SendChanActivation() */
+
+#endif /* __RM_SENDCHANACTIVATION_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendChanAssignComplete.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendChanAssignComplete.cpp
new file mode 100644
index 0000000..8c4ca1f
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendChanAssignComplete.cpp
@@ -0,0 +1,40 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __RM_SENDCHANASSIGNCOMPLETE_CPP__
+#define __RM_SENDCHANASSIGNCOMPLETE_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendChanAssignComplete(void)
+{
+ rm_ItcTxL3Msg_t msgToCc; /* Send inter MM-Rm siganling */
+ T_CNI_L3_ID ccId;
+
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_SendChanAssignComplete\n"));
+
+ /* TBD: may contain SAPI later if requested */
+ msgToCc.module_id = MODULE_RM;
+ msgToCc.entry_id = rm_ItcRxEntryId;
+ msgToCc.primitive_type = (IntraL3PrimitiveType_t)rm_pSmCtxt->callIdx; //INTRA_L3_DATA;
+ msgToCc.message_type = INTRA_L3_RR_CHANN_ASSIGN_COM;
+
+ /* Send the complete MM Paging Response message out */
+ ccId = CNI_RIL3_IRT_Get_CC_Id(rm_ItcRxEntryId);
+ if ( ccId.msgq_id == CNI_NULL_L3_ID.msgq_id &&
+ ccId.sub_id == CNI_NULL_L3_ID.sub_id )
+ EDEBUG__(("ERROR-rm_SendChanAssignComplete: null CC QId\n"));
+ else
+ api_SendMsgFromRmToCc(ccId.msgq_id, sizeof(rm_ItcTxL3Msg_t), (u8*)&msgToCc );
+
+} /* End of rm_SendChanAssignComplete() */
+
+#endif /* __RM_SENDCHANASSIGNCOMPLETE_CPP__ */
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendChanModeModify.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendChanModeModify.cpp
new file mode 100644
index 0000000..5d227a2
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendChanModeModify.cpp
@@ -0,0 +1,96 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __RM_SENDCHANMODEMODIFY_CPP__
+#define __RM_SENDCHANMODEMODIFY_CPP__
+
+#include "rm\rm_head.h"
+
+
+void rm_SendChanModeModify(rm_SmCtxt_t *pSmCtxt )
+{
+ rm_EdRet_t rrEdRet; /* Return code from RR decode */
+ rm_L3Data_t l3_data; /* Encoded Paging Req Type 1 */
+ rm_UmChanModeModify_t *pUmChanModeModify; /* Data for encoding PageReq1 */
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_SendChanModeModify\n"));
+
+ /* Check if make sense to send this message to MS */
+ if ( pSmCtxt->smType != RM_MAIN_SM ||
+ pSmCtxt->sapi != RM_SAPI0 ||
+ pSmCtxt->chanType != RM_CTFACCH_F )
+ {
+ EDEBUG__(( "ERROR-rm_SendChanModeModify:smType:%d, sapi:%d, chan:%d\n",
+ pSmCtxt->smType, pSmCtxt->sapi,pSmCtxt->chanType ));
+ return;
+ }
+
+ /* Choose Imm Assign message structure */
+ pUmChanModeModify = (rm_UmChanModeModify_t *) &(rm_UmMsg.channelModeModify);
+
+ /*
+ ** Populate the contents so that encoder knows what to encode but
+ ** before we start populating the message content, zap it clean
+ ** first.
+ */
+ RM_MEMSET( &rm_UmMsg, sizeof(rm_UmMsg_t) );
+
+ /* Header--PD,MT,SI */
+ pUmChanModeModify->header.protocol_descriminator = RM_PD;
+ pUmChanModeModify->header.si_ti = RM_SI;
+ pUmChanModeModify->header.message_type = RM_CHANNEL_MODE_MODIFY;
+
+ /* IE--Channel Description */
+ pUmChanModeModify->channelDescription.ie_present = RM_TRUE;
+ pUmChanModeModify->channelDescription.hopping = RM_FALSE;
+ pUmChanModeModify->channelDescription.channelType = pSmCtxt->pPhyChan->chanType;
+ pUmChanModeModify->channelDescription.subChannelNumber =
+ pSmCtxt->pPhyChan->subChanNumber;
+ pUmChanModeModify->channelDescription.TN = (pSmCtxt->pPhyChan->chanNumberMSB)&RM_U8_0X07;
+ pUmChanModeModify->channelDescription.TSC = OAMrm_BTS_TSC; //rm_pSmCtxt->pPhyChan->TSC;
+ pUmChanModeModify->channelDescription.arfcn = OAMrm_ARFCN(pSmCtxt->pPhyChan->trxNumber);
+
+
+ /* IE--Channel Mode */
+ pUmChanModeModify->channelMode.ie_present = RM_TRUE;
+// pUmChanModeModify->channelMode.value = RM_CHANMODESP_VER1;
+// pUmChanModeModify->channelMode.value = (T_CNI_RIL3_CHANNEL_MODE_VALUE)OAMrm_GSMCODEC;
+
+ //EFRAdded
+ pUmChanModeModify->channelMode.value = (T_CNI_RIL3_CHANNEL_MODE_VALUE)pSmCtxt->codAlgo;
+
+ /* TBD : Add other IE here if needed */
+
+ /*
+ ** Call RR message encoding functionality
+ */
+ rrEdRet = CNI_RIL3RRM_Encode( &rm_UmMsg, &l3_data);
+
+ /* check the encoding result before sending the message */
+ switch (rrEdRet)
+ {
+ case RM_RRED_SUCCESS:
+ /* Wrap the encoded Paging message in DL_DATA_REQ */
+//C_CHN rm_SendDlDataReq ( pSmCtxt->mOId,pSmCtxt->sapi,RM_CTFACCH_F,&l3_data );
+ PostL3SendMsLog( pSmCtxt->mOId,pSmCtxt->sapi,&l3_data );
+ rm_SendDlDataReq ( pSmCtxt->mOId,pSmCtxt->sapi,&l3_data );
+
+ break;
+
+ default:
+ /* Um message encoding failed */
+ EDEBUG__(("ERROR-rm_SendChanModeModify: Um encode error:%d\n", rrEdRet ));
+ break;
+
+ } /* End of switch(rrEdRet) */
+
+} /* End of rm_SendChanModeModify() */
+
+#endif /* __RM_SENDCHANMODEMODIFY_CPP__ */
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendChanRelease.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendChanRelease.cpp
new file mode 100644
index 0000000..244c3b6
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendChanRelease.cpp
@@ -0,0 +1,83 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDCHANRELEASE_CPP__
+#define __RM_SENDCHANRELEASE_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendChanRelease(rm_IrtEntryId_t entryId)
+{
+ rm_EdRet_t rrEdRet; /* Return code from RR decode */
+ rm_L3Data_t l3_data; /* Encoded Paging Req Type 1 */
+ rm_UmChanRel_t *pUmChanRel; /* Data for encoding ChanRel */
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_SendChanRelease:entryId=%d\n",entryId));
+
+ if (rm_SmCtxt[entryId].smType != RM_MAIN_SM)
+ {
+ EDEBUG__(("ERROR-rm_SendChanRelease: entryId not for main SM\n"));
+ return;
+ }
+
+ /* Choose Chan Release message structure */
+ pUmChanRel = (rm_UmChanRel_t *) &(rm_UmMsg.channelRelease);
+
+ /*
+ ** Populate the contents so that encoder knows what to encode but
+ ** before we start populating the message content, zap it clean
+ ** first.
+ */
+ RM_MEMSET( &rm_UmMsg, sizeof(rm_UmMsg_t) );
+
+ /* Header--PD,MT,SI */
+ pUmChanRel->header.protocol_descriminator = RM_PD;
+ pUmChanRel->header.si_ti = RM_SI;
+ pUmChanRel->header.message_type = CNI_RIL3RRM_MSGID_CHANNEL_RELEASE;
+//RM_CHANNEL_RELEASE;
+
+ /* IE--RR Cause */
+ pUmChanRel->rrCause.ie_present = RM_TRUE;
+ pUmChanRel->rrCause.causeValue = RM_NORMAL_EVENT;
+
+ /* TBD : Add other IEs later like BA, Group Key */
+
+ /*
+ ** Call RR message encoding functionality
+ */
+ rrEdRet = CNI_RIL3RRM_Encode( &rm_UmMsg, &l3_data);
+
+ /* check the encoding result before sending the message */
+ switch (rrEdRet)
+ {
+ case RM_RRED_SUCCESS:
+ /* Send out the message through DL_DATA_REQ */
+PDEBUG__(("rm_SendChanRelease: mOId=%d,entryId=%d,sapi=%d\n",
+ rm_SmCtxt[entryId].mOId, entryId, rm_SmCtxt[entryId].sapi));
+TDUMP__((MAREA__,(u8*)&(l3_data), 20));
+
+//CT_CHN rm_SendDlDataReq ( rm_SmCtxt[entryId].mOId, rm_SmCtxt[entryId].sapi,
+// rm_SmCtxt[entryId].chanType,&l3_data );
+ PostL3SendMsLog( rm_SmCtxt[entryId].mOId, rm_SmCtxt[entryId].sapi,&l3_data );
+ rm_SendDlDataReq ( rm_SmCtxt[entryId].mOId, rm_SmCtxt[entryId].sapi,&l3_data );
+
+ break;
+
+ default:
+ /* Um message encoding failed */
+ EDEBUG__(("ERROR-rm_SendChanRelease: Um encode error:%d\n", rrEdRet ));
+ break;
+
+ } /* End of switch(rrEdRet) */
+
+} /* End of rm_SendChanRelease() */
+
+#endif /* __RM_SENDCHANRELEASE_CPP__ */
+
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendConfigFpgaToTrx.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendConfigFpgaToTrx.cpp
new file mode 100644
index 0000000..990fb69
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendConfigFpgaToTrx.cpp
@@ -0,0 +1,47 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDCONFIGFPGADELAYTOTRX_CPP__
+#define __RM_SENDCONFIGFPGADELAYTOTRX_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendConfigFpgaDelayToTrx(u8 trx)
+{
+ rm_ItcTxMsg_t msgToL1; /* Store an encoded message sent to L1 */
+ u16 length; /* Length of the message to send to L1 */
+
+ /* It's caller's responsiblity to make sure trx valid */
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_SendConfigFpgaDelayToTrx: Entering...\n" ));
+
+ /* Encode CONFIGure FPGA DELAY message to TRX */
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_TRXMGMT; //0x10
+ msgToL1.buffer[length++] = RM_L1MT_CONFIGFPGADELAY_MSB; //0x14
+ msgToL1.buffer[length++] = RM_L1MT_CONFIGFPGADELAY_LSB; //0x00
+ msgToL1.buffer[length++] = trx;
+ msgToL1.buffer[length++] = OAMrm_TRX_ULFPGADELAY_MSB(trx);
+ msgToL1.buffer[length++] = OAMrm_TRX_ULFPGADELAY_LSB(trx);
+ msgToL1.buffer[length++] = OAMrm_TRX_DLFPGADELAY_MSB(trx);
+ msgToL1.buffer[length++] = OAMrm_TRX_DLFPGADELAY_LSB(trx);
+
+//PDEBUG__(("%d-th FPGA:%d,%d,%d,%d\n",
+// OAMrm_TRX_ULFPGADELAY_MSB(trx),
+// OAMrm_TRX_ULFPGADELAY_LSB(trx),
+// OAMrm_TRX_DLFPGADELAY_MSB(trx),
+// OAMrm_TRX_DLFPGADELAY_LSB(trx) ));
+
+ msgToL1.msgLength = length;
+
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer); /* TBD: Provided by L1 */
+
+} /* rm_SendConfigFpgaDelayToTrx() */
+
+#endif /* __RM_SENDCONFIGFPGADELAYTOTRX_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendDeactivateSacch.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendDeactivateSacch.cpp
new file mode 100644
index 0000000..d822bd6
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendDeactivateSacch.cpp
@@ -0,0 +1,36 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDDEACTIVATESACCH_CPP__
+#define __RM_SENDDEACTIVATESACCH_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendDeactivateSacch(rm_PhyChanDesc_t *pPhyChan)
+{
+ rm_ItcTxMsg_t msgToL1;
+ u16 length;
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_SendDeactivateSacch\n"));
+
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_DEDMGMT;
+ msgToL1.buffer[length++] = RM_L1MT_DEACTIVSACCH_MSB;
+ msgToL1.buffer[length++] = RM_L1MT_DEACTIVSACCH_LSB;
+ msgToL1.buffer[length++] = pPhyChan->trxNumber;
+ msgToL1.buffer[length++] = pPhyChan->chanNumberMSB;
+ msgToL1.buffer[length++] = pPhyChan->chanNumberLSB;
+ msgToL1.msgLength = length;
+
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+}
+
+#endif /* __RM_SENDDEACTIVATESACCH_CPP__ */
+
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendHandoverCommand.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendHandoverCommand.cpp
new file mode 100644
index 0000000..dea0c8e
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendHandoverCommand.cpp
@@ -0,0 +1,37 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDHANDOVERCOMMAND_CPP__
+#define __RM_SENDHANDOVERCOMMAND_CPP__
+
+//HOADDED
+#include "rm\rm_head.h"
+
+void rm_SendHandoverCommand(void)
+{
+ RDEBUG__(("ENTER-rm_SendHandoverCommand\n"));
+
+ /* Check if make sense to send this message to MS */
+ if ( rm_pSmCtxt->smType != RM_MAIN_SM ||
+ rm_pSmCtxt->sapi != RM_SAPI0 ||
+ rm_pSmCtxt->chanType != RM_CTFACCH_F )
+ {
+ EDEBUG__(( "ERROR-rm_SendHandoverCommand:smType:%d, sapi:%d, chan:%d\n",
+ rm_pSmCtxt->smType, rm_pSmCtxt->sapi,rm_pSmCtxt->chanType ));
+ return;
+ }
+
+ //Send Handover Command through DL_DATA_REQ
+TDUMP__((MAREA__,(unsigned char *)&(rm_pItcRxCcMsg->l3_data.handCmd.handCmd),40));
+
+ PostL3SendMsLog( rm_pSmCtxt->mOId,rm_pSmCtxt->sapi,&(rm_pItcRxCcMsg->l3_data.handCmd.handCmd) );
+ rm_SendDlDataReq(rm_pSmCtxt->mOId,rm_pSmCtxt->sapi,&(rm_pItcRxCcMsg->l3_data.handCmd.handCmd));
+}
+
+#endif /*__RM_SENDHANDOVERCOMMAND_CPP__*/
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendHoComplete.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendHoComplete.cpp
new file mode 100644
index 0000000..7605915
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendHoComplete.cpp
@@ -0,0 +1,43 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDHOCOMPLETE_CPP__
+#define __RM_SENDHOCOMPLETE_CPP__
+
+//HOADDED
+
+#include "rm\rm_head.h"
+
+void rm_SendHoComplete(void)
+{
+ rm_ItcTxL3Msg_t msgToCc; //Send message to CC
+ T_CNI_L3_ID ccId;
+
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_SendHoComplete\n"));
+
+ //Prepare Handover Complete message to CC
+ //TBD:may contain SAPI later if requested
+ msgToCc.module_id = MODULE_RM;
+ msgToCc.entry_id = rm_ItcRxEntryId;
+ msgToCc.primitive_type = INTRA_L3_DATA;
+ msgToCc.message_type = INTRA_L3_RR_HANDOVER_COMPLETE;
+
+ //Send Handover Complete message to CC
+ ccId = CNI_RIL3_IRT_Get_CC_Id(rm_ItcRxEntryId);
+ if ( ccId.msgq_id == CNI_NULL_L3_ID.msgq_id &&
+ ccId.sub_id == CNI_NULL_L3_ID.sub_id )
+ EDEBUG__(("ERROR-rm_SendHoComplete: null CC QId\n"));
+ else
+ api_SendMsgFromRmToCc(ccId.msgq_id, sizeof(rm_ItcTxL3Msg_t), (u8*)&msgToCc );
+
+} /* End of rm_SendHoComplete() */
+
+#endif /* __RM_SENDHOCOMPLETE_CPP__ */
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendHoFailure.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendHoFailure.cpp
new file mode 100644
index 0000000..0e39fe4
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendHoFailure.cpp
@@ -0,0 +1,42 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDHOFAILURE_CPP__
+#define __RM_SENDHOFAILURE_CPP__
+
+//HOADDED
+#include "rm\rm_head.h"
+
+//ext-HO <xxu:06-25-01>added cause parameter
+void rm_SendHoFailure(int cause, int rrCause)
+{
+ rm_ItcTxL3Msg_t msgToCc; //Hold msg to CC
+ T_CNI_L3_ID ccId; //Refer to CCQID
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_SendHoFailure\n"));
+
+ //TBD: may contain SAPI later if requested
+ msgToCc.module_id = MODULE_RM;
+ msgToCc.entry_id = rm_ItcRxEntryId;
+ msgToCc.primitive_type = INTRA_L3_DATA;
+ msgToCc.message_type = INTRA_L3_RR_HANDOVER_FAILURE;
+ msgToCc.l3_data.handFail.cause = cause;
+ msgToCc.l3_data.handFail.rrCause = rrCause;
+
+ //Refer to relevant CC task Queue ID by entryID
+ ccId = CNI_RIL3_IRT_Get_CC_Id(rm_ItcRxEntryId);
+ if ( ccId.msgq_id == CNI_NULL_L3_ID.msgq_id &&
+ ccId.sub_id == CNI_NULL_L3_ID.sub_id )
+ EDEBUG__(("ERROR-rm_SendHoFailure: null CC Task QId\n"));
+ else
+ api_SendMsgFromRmToCc(ccId.msgq_id, sizeof(rm_ItcTxL3Msg_t), (u8*)&msgToCc );
+
+} /* End of rm_SendHoFailure() */
+
+#endif /* __RM_SENDHOFAILURE_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendHoReqAck.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendHoReqAck.cpp
new file mode 100644
index 0000000..049e895
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendHoReqAck.cpp
@@ -0,0 +1,111 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDHOREQACK_CPP__
+#define __RM_SENDHOREQACK_CPP__
+
+//HOADDED
+
+#include "rm\rm_head.h"
+
+u8 rm_SendHoReqAck(void)
+{
+ rm_EdRet_t rrEdRet;
+ rm_ItcTxL3Msg_t msgToMm; //Message to send to MM
+ rm_PhyChanDesc_t *pPhyChan; //Description of physical channel
+ IntraL3HandoverRequestAck_t *pMmHoCmd; //Message carried in msgToMm
+ T_CNI_RIL3RRM_MSG_HANDOVER_COMMAND *pUmHoCmd; //air Handover Command
+ rm_L3Data_t l3_data; //Store encoded Handover Command message
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_SendHoReqAck\n"));
+
+ //Initialize pointers and memeory used properly first
+ RM_MEMSET( &rm_UmMsg, sizeof(rm_UmMsg_t) );
+ pMmHoCmd = (IntraL3HandoverRequestAck_t *)&(msgToMm.l3_data.handReqAck);
+ pUmHoCmd = (T_CNI_RIL3RRM_MSG_HANDOVER_COMMAND *)&(rm_UmMsg.handoverCommand);
+ pPhyChan = rm_pSmCtxt->pPhyChan; //Pointing to corresponding physical chan.
+
+ //Encode MM Handover Req Ack message header
+ msgToMm.module_id = MODULE_RM;
+ msgToMm.entry_id = rm_ItcRxEntryId;
+ msgToMm.primitive_type = RR_EST_CNF;
+ msgToMm.message_type = INTRA_L3_RR_HANDOVER_REQ_ACK;
+
+ //Encode MM Handover Req Ack message body: hoRef
+ pMmHoCmd->mmId = rm_pSmCtxt->pPhyChan->hoRef;
+
+ //Encode MM Handover Req Ack message body: Handover Command
+ //Install IEs: header part
+ pUmHoCmd->header.protocol_descriminator = RM_PD;
+ pUmHoCmd->header.si_ti = RM_SI;
+ pUmHoCmd->header.message_type = CNI_RIL3RRM_MSGID_HANDOVER_COMMAND;
+
+ //Install IE: Cell Description
+ pUmHoCmd->cellDescription.ie_present = RM_TRUE;
+ pUmHoCmd->cellDescription.arfcn = OAMrm_BCCH_ARFCN;
+ pUmHoCmd->cellDescription.ncc = OAMrm_NCC;
+ pUmHoCmd->cellDescription.bcc = OAMrm_BCC;
+
+ //Install IE: First Channel Description, after time
+ pUmHoCmd->firstChannelDescription.ie_present = RM_TRUE;
+ pUmHoCmd->firstChannelDescription.hopping = RM_FALSE;
+ pUmHoCmd->firstChannelDescription.channelType = pPhyChan->chanType;
+ pUmHoCmd->firstChannelDescription.subChannelNumber = pPhyChan->subChanNumber;
+ pUmHoCmd->firstChannelDescription.TN = (pPhyChan->chanNumberMSB)&RM_U8_0X07;
+ pUmHoCmd->firstChannelDescription.TSC = OAMrm_BTS_TSC; //pPhyChan->TSC;
+ pUmHoCmd->firstChannelDescription.arfcn = OAMrm_ARFCN(pPhyChan->trxNumber);
+
+ //Install IE: Handover Reference
+ pUmHoCmd->handoverReference.ie_present = RM_TRUE;
+ pUmHoCmd->handoverReference.handoverReference = pPhyChan->hoRef;
+
+ //Install IE: Power Command and Access Type
+ //HOADDED
+ //acs and power level may not be fixed in the future
+ pUmHoCmd->powerCommandAndAccess.ie_present = RM_TRUE;
+ pUmHoCmd->powerCommandAndAccess.acs = CNI_RIL3_SENDING_HANDOVER_ACCESS_MANDATORY;
+ pUmHoCmd->powerCommandAndAccess.powerLevel = OAMrm_MS_TX_PWR_MAX_CCH;
+
+ //Optional IE: Synchronization Indication
+ pUmHoCmd->syncIndication.ie_present = RM_TRUE;
+ pUmHoCmd->syncIndication.nci = CNI_RIL3_OUT_OF_RANGE_TIMING_ADVANCE_IGNORED;
+ pUmHoCmd->syncIndication.rot = CNI_RIL3_MOBILE_TIME_DIFFERENCE_SHALL_NOT_INCLUDED;
+ pUmHoCmd->syncIndication.si = CNI_RIL3_SI_NON_SYNCHRONIZED;
+
+ //All optional and conditional IEs ignored at this time. Note that the rm_UmMsg
+ //already reset to 0 at the beginning, thus no such IEs should be encoded even
+ //no RM_FALSE assigned to their ie_present field.
+
+ //Call RR message encoding functionality
+ rrEdRet = CNI_RIL3RRM_Encode(&rm_UmMsg, &l3_data);
+
+ //check if encoding of the message successful or not
+ switch (rrEdRet)
+ {
+ case RM_RRED_SUCCESS:
+ //Send out the message to MM
+ RM_MEMCPY((u8*)&(msgToMm.l3_data.handReqAck.handCmd),(u8*)&l3_data,
+ sizeof(rm_L3Data_t));
+ //TDUMP__((MAREA__,(unsigned char *)&(msgToMm.l3_data.handCmd.handCmd),40));
+ api_SendMsgFromRmToMm(sizeof(rm_ItcTxL3Msg_t), (u8*)&msgToMm);
+ break;
+
+ default:
+ //Encoding failed
+ EDEBUG__(("ERROR-rm_SendHoReqAck: RIL3-RR encode error:%d\n",
+ rrEdRet ));
+ return RM_FALSE;
+
+ } //End of switch(rrEdRet)
+
+ return RM_TRUE;
+
+} //End of rm_SendHoReqAck()
+
+#endif //__RM_SENDHOREQACK_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendHoReqNAck.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendHoReqNAck.cpp
new file mode 100644
index 0000000..8c3ce78
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendHoReqNAck.cpp
@@ -0,0 +1,35 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDHOREQNACK_CPP__
+#define __RM_SENDHOREQNACK_CPP__
+
+//HOADDED
+#include "rm\rm_head.h"
+
+void rm_SendHoReqNAck(u8 ref)
+{
+ rm_ItcTxL3Msg_t msgToMm; //Send RM->MM message
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_SendHoReqNAck\n"));
+
+ //Prepare HoReqNAck MM message to send
+ msgToMm.module_id = MODULE_RM;
+ msgToMm.entry_id = CNI_IRT_NULL_ID;
+ msgToMm.primitive_type = INTRA_L3_RR_EST_REJ;
+ msgToMm.message_type = INTRA_L3_RR_HANDOVER_REQ_NACK;
+ msgToMm.l3_data.handReqNack.cause = JC_FAILURE_RADIO_RESOURCE_UNAVAILABLE;
+ msgToMm.l3_data.handReqNack.mmId = ref; //rm_pSmCtxt->pPhyChan->hoRef;
+
+ //Send out the HoReqNAck messag to MM
+ api_SendMsgFromRmToMm(sizeof(rm_ItcTxL3Msg_t), (u8*)&msgToMm);
+
+} /* End of rm_SendHoReqNAck() */
+
+#endif /* __RM_SENDHOREQNACK_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendImmAssign.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendImmAssign.cpp
new file mode 100644
index 0000000..1a54e76
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendImmAssign.cpp
@@ -0,0 +1,143 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __RM_SENDIMMASSIGN_CPP__
+#define __RM_SENDIMMASSIGN_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendImmAssign(rm_PhyChanDesc_t *pPhyChan )
+{
+ static u8 agch_block=0; //Paging group got from IMSI
+ u16 length; //Length of a msg sent to L1
+ rm_EdRet_t rrEdRet; //Return code from RR decode
+ rm_L3Data_t l3_data; //Encoded Paging Req Type 1
+ rm_ItcTxMsg_t msgToL1; //Send PH_DATA_REQ msg to L1
+ rm_UmImmAssign_t *pUmImmAssign; //Data for encoding PageReq1
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_SendImmAssign\n"));
+
+ //Choose Imm Assign message structure
+ pUmImmAssign = (rm_UmImmAssign_t *) &(rm_UmMsg.immediateAssignment);
+
+
+ //Populate the contents so that encoder knows what to encode but
+ //before we start populating the message content, zap it clean
+ //first.
+
+ RM_MEMSET( &rm_UmMsg, sizeof(rm_UmMsg_t) );
+
+ //Header--PD,MT,SI
+ pUmImmAssign->header.protocol_descriminator = RM_PD;
+ pUmImmAssign->header.si_ti = RM_SI;
+ pUmImmAssign->header.message_type = RM_IMMEDIATE_ASSIGNMENT;
+
+ //IE--Page Mode
+ pUmImmAssign->pageMode.ie_present = RM_TRUE;
+
+ //PR1261 Begin
+ pUmImmAssign->pageMode.pm = CNI_RIL3_PAGING_SAME_AS_BEFORE;
+ //pUmImmAssign->pageMode.pm = CNI_RIL3_PAGING_REORGANIZATION;
+ //PR1261 End
+
+ //IE--Channel Description
+ pUmImmAssign->channelDescription.ie_present = RM_TRUE;
+ pUmImmAssign->channelDescription.hopping = RM_FALSE;
+ pUmImmAssign->channelDescription.channelType = pPhyChan->chanType;
+ pUmImmAssign->channelDescription.subChannelNumber = pPhyChan->subChanNumber;
+ pUmImmAssign->channelDescription.TN = (pPhyChan->chanNumberMSB)&RM_U8_0X07;
+ pUmImmAssign->channelDescription.TSC = OAMrm_BTS_TSC; //pPhyChan->TSC;
+ pUmImmAssign->channelDescription.arfcn = OAMrm_ARFCN(pPhyChan->trxNumber);
+
+ //IE--Request Reference
+ pUmImmAssign->reqReference.ie_present = RM_TRUE;
+ pUmImmAssign->reqReference.randomAccessInfo = pPhyChan->savChanReq[0];
+ pUmImmAssign->reqReference.T1 = (pPhyChan->savChanReq[1]>>3) & 0x1F;
+ pUmImmAssign->reqReference.T2 = (pPhyChan->savChanReq[2] ) & 0x1F;
+ pUmImmAssign->reqReference.T3 = (((pPhyChan->savChanReq[1]<<3) & 0x38) |
+ ((pPhyChan->savChanReq[2]>>5) & 0x07) );
+ //IE--TA
+ pUmImmAssign->timingAdvance.ie_present = RM_TRUE;
+ pUmImmAssign->timingAdvance.value = pPhyChan->savChanReq[3];
+
+ //IE--Mobile Allocation
+ pUmImmAssign->mobileAllocation.ie_present = RM_TRUE;
+ pUmImmAssign->mobileAllocation.numRFfreq = 0;
+
+ //IE--Starting Time
+ pUmImmAssign->startingTime.ie_present = RM_FALSE; //StartingTime_TBD;
+
+ //IE--IA Rest Octets
+ pUmImmAssign->iaRestOctets.ie_present = RM_TRUE;
+ pUmImmAssign->iaRestOctets.p = RM_P_NOT_PRESENT;
+
+
+ //Call RR message encoding functionality
+
+ rrEdRet = CNI_RIL3RRM_Encode( &rm_UmMsg, &l3_data);
+
+ //check the encoding result before sending the message
+ switch (rrEdRet)
+ {
+ case RM_RRED_SUCCESS:
+
+ //Wrap the encoded Paging message in PH_DATA_REQ
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_LNKMGMT;
+ msgToL1.buffer[length++] = RM_L1MT_PHDATAREQ_MSB;
+ msgToL1.buffer[length++] = RM_L1MT_PHDATAREQ_LSB;
+ msgToL1.buffer[length++] = OAMrm_BCCH_TRX;
+ msgToL1.buffer[length++] = RM_L1AGCH_CHANNUMBER_MSB;
+
+ //PR1261 Begin
+ //msgToL1.buffer[length++] = 0x3F & agch_block++;
+ msgToL1.buffer[length++] = 28;
+ //PR1261 End
+
+ msgToL1.buffer[length++] = RM_L1LINK_VOID;
+
+ RM_MEMCPY(&msgToL1.buffer[length], l3_data.buffer, l3_data.msgLength);
+
+ msgToL1.msgLength = length + l3_data.msgLength;
+
+ //Send PH_DATA_REQ to L1
+ PostL3SendMsLog( &l3_data );
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+ PDEBUG__(("========rm_SendImmAssign: TA=%d\n", pPhyChan->savChanReq[3]));
+
+ //PR1261 Begin
+ //Adjust agch_block index
+ //switch (OAMrm_BSCCCHSDCCH_COMB)
+ //{
+ //case RM_TRUE:
+ // if ( agch_block>8 ) agch_block = 0;
+ // break;
+
+ //case RM_FALSE:
+ // if ( agch_block>8 ) agch_block = 0;
+ // break;
+ //}
+ //PR1261 End
+
+ //PMADDED:succImmediateAssingProcs,succImmediateAssingProcsPerCauseTable
+ PM_CellMeasurement.succImmediateAssingProcs.increment();
+ PM_CellMeasurement.succImmediateAssingProcsPerCauseTable.increment(pPhyChan->estCause);
+
+ break;
+
+ default:
+ //Um message encoding failed
+ EDEBUG__(("ERROR-rm_SendImmAssign: Um encode error:%d\n", rrEdRet ));
+ break;
+
+ } //End of switch(rrEdRet)
+
+} //End of rm_SendImmAssign()
+
+#endif //__RM_SENDIMMASSIGN_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendModeModify.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendModeModify.cpp
new file mode 100644
index 0000000..d75aaa8
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendModeModify.cpp
@@ -0,0 +1,41 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __RM_SENDMODEMODIFY_CPP__
+#define __RM_SENDMODEMODIFY_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendModeModify( rm_PhyChanDesc_t *pPhyChan,
+ rm_PhyChanActDesc_t *pActDesc )
+{
+ rm_ItcTxMsg_t msgToL1;
+ u16 length;
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_SendModeModify\n"));
+
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_DEDMGMT;
+ msgToL1.buffer[length++] = RM_L1MT_MODEMODIFY_MSB;
+ msgToL1.buffer[length++] = RM_L1MT_MODEMODIFY_LSB;
+ msgToL1.buffer[length++] = pPhyChan->trxNumber;
+ msgToL1.buffer[length++] = pPhyChan->chanNumberMSB;
+ msgToL1.buffer[length++] = pPhyChan->chanNumberLSB;
+ msgToL1.buffer[length++] = 0; //This is a dummy byte for avoiding change in DSP s/w
+ msgToL1.buffer[length++] = pActDesc->dtxCtrl;
+ msgToL1.buffer[length++] = pActDesc->datAttr;
+ msgToL1.buffer[length++] = pActDesc->ratType;
+ msgToL1.buffer[length++] = pActDesc->codAlgo;
+ msgToL1.msgLength = length;
+
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+}
+
+#endif /* End of rm_SendModeModify() */
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendPagingRequestType1.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendPagingRequestType1.cpp
new file mode 100644
index 0000000..e9f39b4
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendPagingRequestType1.cpp
@@ -0,0 +1,135 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __RM_SENDPAGINGREQUESTTYPE1_CPP__
+#define __RM_SENDPAGINGREQUESTTYPE1_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendPagingRequestType1(void)
+{
+ u8 pagingGroup; /* Paging group got from IMSI */
+ u16 length; /* Length of a msg sent to L1 */
+ rm_EdRet_t rrEdRet; /* Return code from RR decode */
+ rm_L3Data_t l3_data; /* Encoded Paging Req Type 1 */
+ rm_ItcTxMsg_t msgToL1; /* Send PH_DATA_REQ msg to L1 */
+ rm_MmPaging_t *pMmPaging; /* Paging message got from MM */
+ rm_UmPageType1_t *pUmPaging; /* Data for encoding PageReq1 */
+ u16 len_save;
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_SendPagingRequestType1\n"));
+
+ /* TBD:MM paging format */
+ pMmPaging = (rm_MmPaging_t *) &(rm_pItcRxMmMsg->l3_data.pageReq);
+ pUmPaging = (rm_UmPageType1_t *) &(rm_UmMsg.pagingRequestType1);
+
+ /*
+ ** Populate the contents so that encoder knows what to encode but
+ ** before we start populating the message content, zap it clean
+ ** first.
+ */
+ RM_MEMSET( &rm_UmMsg, sizeof(rm_UmMsg_t) );
+
+ /* Header--PD,MT,SI */
+ pUmPaging->header.protocol_descriminator = RM_PD;
+ pUmPaging->header.si_ti = RM_SI;
+ pUmPaging->header.message_type = RM_PAGING_REQUEST_TYPE_1;
+
+ /* IE--Page Mode */
+ pUmPaging->pageMode.ie_present = RM_TRUE;
+ pUmPaging->pageMode.pm = RM_NORMAL_PAGING;
+
+ /* IE--Page Channel Needed */
+ pUmPaging->channelNeeded.ie_present = RM_TRUE;
+ pUmPaging->channelNeeded.numChannels = 1;
+ pUmPaging->channelNeeded.channelNeeded[0] = CNI_RIL3_CHANNEL_NEEDED_ANY_CHANNEL;
+ //RM_CHANNEEDED_TCHF;
+
+ /* IE--Mobile Identity */
+ pUmPaging->mobileId1.ie_present = RM_TRUE;
+ pUmPaging->mobileId1.mobileIdType = pMmPaging->imsi.mobileIdType;
+ pUmPaging->mobileId1.numDigits = pMmPaging->imsi.numDigits;
+ RM_MEMCPY( pUmPaging->mobileId1.digits, pMmPaging->imsi.digits,
+ pMmPaging->imsi.numDigits );
+
+ //G2
+ pUmPaging->mobileId2.ie_present = RM_FALSE;
+
+ // Bhava Nelakanti - Mandatory IE missing Fix
+ /* IE--P1 Rest Octets */
+ pUmPaging->p1RestOctets.ie_present = RM_TRUE;
+ pUmPaging->p1RestOctets.nchi = CNI_RIL3_REDUCED_NCH_MONITERING_NOT_USED;
+
+ //G2
+ //NLN(PCH) field
+ pUmPaging->p1RestOctets.flag_nln = RM_FALSE;
+ pUmPaging->p1RestOctets.nln = 0;
+ pUmPaging->p1RestOctets.nln_status = 0;
+
+ //Priority_1 field
+ pUmPaging->p1RestOctets.flag_p1 = RM_FALSE;
+ pUmPaging->p1RestOctets.priority_1 = 0;
+
+ //Priority_2 field
+ pUmPaging->p1RestOctets.flag_p2 = RM_FALSE;
+ pUmPaging->p1RestOctets.priority_2 = 0;
+
+ //group call not supported, encoding will be marked as false
+
+ //packet_page_indication (1 or 2) should be set to true is it's packet paging procedure.
+ //It should be set to false, if it is paging procedure for RR connection establishment.
+ pUmPaging->p1RestOctets.packet_page_indication_1 = (rm_ItcRxOrigin==MODULE_BSSGP)?RM_TRUE:RM_FALSE;
+ pUmPaging->p1RestOctets.packet_page_indication_2 = RM_FALSE;
+
+ /*
+ ** Call RR message encoding functionality
+ */
+ rrEdRet = CNI_RIL3RRM_Encode( &rm_UmMsg, &l3_data);
+
+ /* check the encoding result before sending the message */
+ switch (rrEdRet)
+ {
+ case RM_RRED_SUCCESS:
+
+ /* Wrap the encoded Paging message in PH_DATA_REQ */
+ pagingGroup = rm_SolvePagingGroup(&(pMmPaging->imsi));
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_LNKMGMT;
+ msgToL1.buffer[length++] = RM_L1MT_PHDATAREQ_MSB;
+ msgToL1.buffer[length++] = RM_L1MT_PHDATAREQ_LSB;
+ msgToL1.buffer[length++] = OAMrm_BCCH_TRX;
+ msgToL1.buffer[length++] = RM_L1PCH_CHANNUMBER_MSB;
+//len_save = length;
+ msgToL1.buffer[length++] = pagingGroup;
+ msgToL1.buffer[length++] = RM_L1LINK_VOID;
+ RM_MEMCPY(&msgToL1.buffer[length], l3_data.buffer, l3_data.msgLength);
+ msgToL1.msgLength = length + l3_data.msgLength;
+
+ /* Send PH_DATA_REQ to L1 */
+//msgToL1.buffer[len_save] = 0;
+// api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+//msgToL1.buffer[len_save] = 1;
+// api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+//msgToL1.buffer[len_save] = 2;
+ PostL3SendMsLog ( &l3_data );
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+
+ break;
+
+ default:
+ /* Encoding failed */
+ EDEBUG__(("ERROR-rm_SendPagingRequestType1: RIL3-RR encode error:%d\n",
+ rrEdRet ));
+ break;
+
+ } /* End of switch(rrEdRet) */
+
+} /* End of rm_SendPagingRequestType1() */
+
+#endif /* __RM_SENDPAGINGREQUESTTYPE1_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendPagingRsp.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendPagingRsp.cpp
new file mode 100644
index 0000000..51797ec
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendPagingRsp.cpp
@@ -0,0 +1,86 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __RM_SENDPAGINGRSP_CPP__
+#define __RM_SENDPAGINGRSP_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendPagingRsp(void)
+{
+ rm_EdRet_t rrEdRet; //Return code from RR decode
+ rm_ItcTxL3Msg_t msgToMm; //Send inter MM-Rm siganling
+ rm_MmPagingRsp_t *pMmPagingRsp; //Paging message got from MM
+ rm_UmPagingRsp_t *pUmPagingRsp; //Data for encoding PageReq1
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_SendPagingRsp\n"));
+
+ //Decode the DL_EST_IND-carried data i.e.Um Paging Rsp message
+ //PR1104
+ //rrEdRet = CNI_RIL3RRM_Decode(&(rm_pItcRxMdMsg->l3_data),&rm_UmMsg);
+ rrEdRet = rm_MsgAnalyze();
+
+ if ( rrEdRet != RM_RRED_SUCCESS )
+ {
+ EDEBUG__(("ERROR@rm_SendPagingRsp:LAPDm l3_data decoded failed\n"));
+ return;
+ }
+
+ //Decoding successful. Further check if it's expected message
+ if ( rm_UmMsg.header.protocol_descriminator != RM_PD ||
+ rm_UmMsg.header.message_type != RM_PAGING_RESPONSE )
+ {
+ IDEBUG__(("WARNING@rm_SendPagingRsp: RR msg PD:%d;MT:%d",
+ rm_UmMsg.header.protocol_descriminator,
+ rm_UmMsg.header.message_type ));
+ //PR1104
+ rm_SendRrStatus(CNI_RIL3_RR_MESSAGE_TYPE_NOT_COMPATIBLE);
+ return;
+ }
+
+ pUmPagingRsp = (rm_UmPagingRsp_t *) &(rm_UmMsg.pagingResponse);
+
+ //Encode MM Paging Response message
+ msgToMm.module_id = MODULE_RM;
+ msgToMm.entry_id = rm_ItcRxEntryId;
+ msgToMm.primitive_type = RR_EST_CNF;
+ msgToMm.message_type = MM_PAGE_RSP;
+
+ pMmPagingRsp = (rm_MmPagingRsp_t *) &(msgToMm.l3_data.pageRsp);
+
+ //CC needs the whole paging rsp from LAPDm
+ RM_MEMCPY( pMmPagingRsp, pUmPagingRsp, sizeof(rm_UmPagingRsp_t) );
+
+ //Furnish the Paging Rsp message with required IEs data
+ pMmPagingRsp->mobileId.ie_present = pUmPagingRsp->mobileId.ie_present;
+ pMmPagingRsp->mobileId.mobileIdType = pUmPagingRsp->mobileId.mobileIdType;
+ pMmPagingRsp->mobileId.numDigits = pUmPagingRsp->mobileId.numDigits;
+
+ switch(pUmPagingRsp->mobileId.mobileIdType)
+ {
+ case RM_IMSI:
+ RM_MEMCPY( pMmPagingRsp->mobileId.digits,pUmPagingRsp->mobileId.digits,
+ pUmPagingRsp->mobileId.numDigits );
+ break;
+
+ default:
+ //Right now only handle IMSI, later may handle TMSI
+ IDEBUG__(( "WARNING@rm_SendPagingRsp: unexpected mobile Id:%d\n",
+ pUmPagingRsp->mobileId.mobileIdType ));
+ return;
+ break;
+
+ } //End of switch()
+
+ //Send the complete MM Paging Response message out
+ api_SendMsgFromRmToMm( sizeof(rm_ItcTxL3Msg_t), (u8*) &msgToMm);
+
+} //End of rm_SendPagingRsp()
+
+#endif //__RM_SENDPAGINGRSP_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendRfChanRelease.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendRfChanRelease.cpp
new file mode 100644
index 0000000..7200aeb
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendRfChanRelease.cpp
@@ -0,0 +1,35 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDRFCHANRELEASE_CPP__
+#define __RM_SENDRFCHANRELEASE_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendRfChanRelease(rm_PhyChanDesc_t *pPhyChan)
+{
+ rm_ItcTxMsg_t msgToL1;
+ u16 length;
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_SendRfChanRelease\n"));
+
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_DEDMGMT;
+ msgToL1.buffer[length++] = RM_L1MT_RFCHANREL_MSB;
+ msgToL1.buffer[length++] = RM_L1MT_RFCHANREL_LSB;
+ msgToL1.buffer[length++] = pPhyChan->trxNumber;
+ msgToL1.buffer[length++] = pPhyChan->chanNumberMSB;
+ msgToL1.buffer[length++] = pPhyChan->chanNumberLSB;
+ msgToL1.msgLength = length;
+
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+
+} /* End of rm_SendRfChanRelease() */
+
+#endif /* __RM_SENDRFCHANRELEASE_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendRrRelCnf.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendRrRelCnf.cpp
new file mode 100644
index 0000000..e892498
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendRrRelCnf.cpp
@@ -0,0 +1,31 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDRRRELCNF_CPP__
+#define __RM_SENDRRRELCNF_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendRrRelCnf( void )
+{
+ rm_ItcTxL3Msg_t msgToMm; //Send inter MM-Rm siganling
+
+ //Monitoring entrance to a function
+ //RDEBUG__(("ENTER-rm_SendRrRelCnf\n"));
+ PDEBUG__(("ENTER@rm_SendRrRelCnf:entryId=%d\n",rm_ItcRxEntryId));
+
+ //Encode RR_REL_IND and send to MM. TBD: Include cause or not
+ msgToMm.module_id = MODULE_RM;
+ msgToMm.entry_id = rm_ItcRxEntryId;
+ msgToMm.primitive_type = RR_REL_CNF;
+
+ //Send the complete MM Paging Response message out
+ api_SendMsgFromRmToMm( sizeof(rm_ItcTxL3Msg_t), (u8*) &msgToMm);
+}
+
+#endif //__RM_SENDRRRELCNF_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendRrRelInd.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendRrRelInd.cpp
new file mode 100644
index 0000000..08271b8
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendRrRelInd.cpp
@@ -0,0 +1,32 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDRRRELIND_CPP__
+#define __RM_SENDRRRELIND_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendRrRelInd(u8 cause, rm_IrtEntryId_t entryId)
+{
+ rm_ItcTxL3Msg_t msgToMm;
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER@rm_SendRrRelInd\n"));
+
+ //Encode RR_REL_IND and send to MM. TBD: Include cause or not
+ msgToMm.module_id = MODULE_RM;
+ msgToMm.entry_id = entryId;
+ msgToMm.primitive_type = RR_REL_IND;
+
+ msgToMm.cause = rm_pSmCtxt->relCause;
+
+ //Send the complete MM Paging Response message out
+ api_SendMsgFromRmToMm( sizeof(rm_ItcTxL3Msg_t), (u8*) &msgToMm);
+}
+
+#endif //__RM_SENDRRRELCNF_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendSacchFillingSI5.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendSacchFillingSI5.cpp
new file mode 100644
index 0000000..a9fa663
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendSacchFillingSI5.cpp
@@ -0,0 +1,119 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __RM_SENDSACCHFILLINGSI5_CPP__
+#define __RM_SENDSACCHFILLINGSI5_CPP__
+
+#include "rm\rm_head.h"
+
+extern AdjCell_HandoverEntry adjCell_HandoverTable[HandoverTableLimit];
+extern AdjCell_HandoverEntry adjCell_HandoverTable_t[HandoverTableLimit];
+
+void rm_SendSacchFillingSI5(u8 trx, u8 SI)
+{
+ int i,j;
+ u16 length; // Length of a msg sent to L1
+ rm_EdRet_t rrEdRet; // Return code from RR decode
+ rm_L3Data_t l3_data; // Encoded SI Type 5
+ rm_ItcTxMsg_t msgToL1; // Send BCCH INFORMATION msg to L1
+
+ //Monitoring entrance to a function
+ RDEBUG__(("ENTER-rm_SendSacchFillingToTrx\n"));
+
+ //Zap rm_UmMsg 0-clean first
+ RM_MEMSET( &rm_UmMsg, sizeof(rm_UmMsg_t) );
+
+ //Populate SI2 for use by RRM encoder
+ rm_PopulateSI5();
+ RM_MEMCPY( &rm_UmMsg, &rm_UmSI5, sizeof(rm_UmSI5_t));
+
+ //Call RR message encoding functionality
+
+
+ rrEdRet = CNI_RIL3RRM_Encode( &rm_UmMsg, &l3_data);
+
+
+ //PR1223 Begin
+
+ //RIL3 will reoder the frequencies during encoding. Get the resulted f.list
+ RM_MEMCPY(&rm_UmSI5, &rm_UmMsg, sizeof(rm_UmSI5_t));
+
+ //Construct internal adjacent ho cell tables in terms of the resulted order
+ for (i=0;i<rm_UmSI5.bcchFreqList.numRFfreq;i++)
+ {
+ memset(&adjCell_HandoverTable_t[i],0,
+ sizeof(AdjCell_HandoverEntry));
+
+ for (j=0;j<rm_UmSI5.bcchFreqList.numRFfreq;j++)
+ {
+
+ if (rm_UmSI5.bcchFreqList.arfcn[i]==OAMrm_HO_ADJCELL_BCCH_ARFCN(j))
+ break;
+ }
+
+ //printf("RM@===f(i#=%d, o#=%d, total=%d), freq=%d\n", i,j,
+ // rm_UmSI5.bcchFreqList.numRFfreq,
+ // rm_UmSI5.bcchFreqList.arfcn[i]);
+
+ if (j<rm_UmSI5.bcchFreqList.numRFfreq)
+ {
+ //Put this adjacent-cell configuration in its right place
+ memcpy(&adjCell_HandoverTable_t[i],
+ &adjCell_HandoverTable[j],
+ sizeof(AdjCell_HandoverEntry));
+
+ //printf("RM@===f(#=%d, total=%d), freq=%d, id=%d\n", i,
+ // rm_UmSI5.bcchFreqList.numRFfreq,
+ // OAMrm_HO_ADJCELL_BCCH_ARFCN_t(i),
+ // OAMrm_HO_ADJCELL_ID_t(i));
+
+ } else
+ {
+ EDEBUG__(("ERROR@rm_PopulateSI5:alien freq after RIL3 encoding\n"));
+ }
+
+ }
+
+ //PR1223 End
+
+ //check the encoding result before sending the message
+ switch (rrEdRet)
+ {
+ case RM_RRED_SUCCESS:
+
+ //Wrap the encoded SI in SACCH FILLING sent to L1
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_TRXMGMT;
+ msgToL1.buffer[length++] = RM_L1MT_SACCHFILL_MSB;
+ msgToL1.buffer[length++] = RM_L1MT_SACCHFILL_LSB;
+ msgToL1.buffer[length++] = trx;
+ msgToL1.buffer[length++] = SI;
+ msgToL1.buffer[length++] = l3_data.msgLength;
+ RM_MEMCPY(&msgToL1.buffer[length], l3_data.buffer, l3_data.msgLength);
+ length = length + l3_data.msgLength;
+ msgToL1.buffer[length++] = 1; //Start time==immediate
+ msgToL1.buffer[length++] = 0;
+ msgToL1.buffer[length++] = 0;
+ msgToL1.msgLength = length;
+
+ //Send SACCH FILLING TO L1
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+
+ break;
+
+ default:
+ //Encoding failed
+ EDEBUG__(("ERROR-rm_SendSacchFillingSI5: RIL3-RR encode error:%d\n",
+ rrEdRet ));
+ break;
+
+ } //End of switch(rrEdRet)
+
+} //End of rm_SendSacchFillingSI5()
+
+#endif //__RM_SENDSACCHFILLINGSI5_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendSacchFillingSI6.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendSacchFillingSI6.cpp
new file mode 100644
index 0000000..06d6f11
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendSacchFillingSI6.cpp
@@ -0,0 +1,73 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+*/
+#ifndef __RM_SENDSACCHFILLINGSI6_CPP__
+#define __RM_SENDSACCHFILLINGSI6_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendSacchFillingSI6(u8 trx, u8 SI)
+{
+ u16 length; /* Length of a msg sent to L1 */
+ rm_EdRet_t rrEdRet; /* Return code from RR decode */
+ rm_L3Data_t l3_data; /* Encoded SI Type 5 */
+ rm_ItcTxMsg_t msgToL1; /* Send BCCH INFORMATION msg to L1 */
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_SendSacchFillingToTrx\n"));
+
+ /* Zap rm_UmMsg 0-clean first */
+ RM_MEMSET( &rm_UmMsg, sizeof(rm_UmMsg_t) );
+
+ /* Populate SI2 for use by RRM encoder */
+ rm_PopulateSI6();
+ RM_MEMCPY( &rm_UmMsg, &rm_UmSI6, sizeof(rm_UmSI6_t));
+
+ /* Call RR message encoding functionality */
+ rrEdRet = CNI_RIL3RRM_Encode( &rm_UmMsg, &l3_data);
+
+ /* check the encoding result before sending the message */
+ switch (rrEdRet)
+ {
+ case RM_RRED_SUCCESS:
+
+//printf("rm_SendSacchFillingSI6: SYSINFO6 length=%d\n", l3_data.msgLength);
+//for (int i=0;i<l3_data.msgLength;i++)
+//printf("%02x ", l3_data.buffer[i]);
+//printf("\n");
+ /* Wrap the encoded SI in SACCH FILLING sent to L1 */
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_TRXMGMT;
+ msgToL1.buffer[length++] = RM_L1MT_SACCHFILL_MSB;
+ msgToL1.buffer[length++] = RM_L1MT_SACCHFILL_LSB;
+ msgToL1.buffer[length++] = trx;
+ msgToL1.buffer[length++] = SI;
+ msgToL1.buffer[length++] = l3_data.msgLength;
+ RM_MEMCPY(&msgToL1.buffer[length], l3_data.buffer, l3_data.msgLength);
+ length = length + l3_data.msgLength;
+ msgToL1.buffer[length++] = 1; //Start time==immediate
+ msgToL1.buffer[length++] = 0;
+ msgToL1.buffer[length++] = 0;
+ msgToL1.msgLength = length;
+
+ /* Send SACCH FILLING TO L1 */
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+
+ break;
+
+ default:
+ /* Encoding failed */
+ EDEBUG__(("ERROR-rm_SendSacchFillingSI6: RIL3-RR encode error:%d\n",
+ rrEdRet ));
+ break;
+
+ } /* End of switch(rrEdRet) */
+
+} /* End of rm_SendSacchFillingSI6() */
+
+#endif /* __RM_SENDSACCHFILLINGSI6_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendSetDGainToTrx.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendSetDGainToTrx.cpp
new file mode 100644
index 0000000..50a50f1
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendSetDGainToTrx.cpp
@@ -0,0 +1,40 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDSETDGAINTOTRX_CPP__
+#define __RM_SENDSETDGAINTOTRX_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendSetDGainToTrx(u8 trx)
+{
+ rm_ItcTxMsg_t msgToL1; /* Store an encoded message sent to L1 */
+ u16 length; /* Length of the message to send to L1 */
+
+ /* It's caller's responsiblity to make sure trx valid */
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_SendSetDGainToTrx: Entering...\n" ));
+
+ /* Encode SET Uplink GAIN message for TRX */
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_TRXMGMT; //0x10
+ msgToL1.buffer[length++] = RM_L1MT_SETDGAIN_MSB; //0x11
+ msgToL1.buffer[length++] = RM_L1MT_SETDGAIN_LSB; //0x00
+ msgToL1.buffer[length++] = trx;
+ msgToL1.buffer[length++] = (u8)((OAMrm_DOWNLINK_SGAINCTRL_SETTING(trx))>>8); //0x00
+ msgToL1.buffer[length++] = (u8)(OAMrm_DOWNLINK_SGAINCTRL_SETTING(trx)); //0x00
+
+ msgToL1.msgLength = length;
+
+ /* Send TRX CONFIGure to L1 */
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer); /* TBD: Provided by L1 */
+
+} /* rm_SendSetDGainToTrx() */
+
+#endif /* __RM_SENDSETDGAINTOTRX_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendSetUGainToTrx.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendSetUGainToTrx.cpp
new file mode 100644
index 0000000..c61996f
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendSetUGainToTrx.cpp
@@ -0,0 +1,39 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDSETUGAINTOTRX_CPP__
+#define __RM_SENDSETUGAINTOTRX_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendSetUGainToTrx(u8 trx)
+{
+ rm_ItcTxMsg_t msgToL1; /* Store an encoded message sent to L1 */
+ u16 length; /* Length of the message to send to L1 */
+
+ /* It's caller's responsiblity to make sure trx valid */
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_SendSetUGainToTrx: Entering...\n" ));
+
+ /* Encode SET Uplink GAIN message for TRX */
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_TRXMGMT; //0x10
+ msgToL1.buffer[length++] = RM_L1MT_SETUGAIN_MSB; //0x10
+ msgToL1.buffer[length++] = RM_L1MT_SETUGAIN_LSB; //0x00
+ msgToL1.buffer[length++] = trx;
+ msgToL1.buffer[length++] = (u8)((OAMrm_UPLINK_SGAINCTRL_SETTING(trx))>>8); //0x00
+ msgToL1.buffer[length++] = (u8)(OAMrm_UPLINK_SGAINCTRL_SETTING(trx)); //0x00
+ msgToL1.msgLength = length;
+
+ /* Send TRX CONFIGure to L1 */
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer); /* TBD: Provided by L1 */
+
+} /* rm_SendSetUGainToTrx() */
+
+#endif /* __RM_SENDSETUGAINTOTRX_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendSlotActivateToTrx.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendSlotActivateToTrx.cpp
new file mode 100644
index 0000000..618751e
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendSlotActivateToTrx.cpp
@@ -0,0 +1,76 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDSLOTACTIVATETOTRX_CPP__
+#define __RM_SENDSLOTACTIVATETOTRX_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendSlotActivateToTrx(u8 trx, u8 slot)
+{
+ u16 length; /* Length of the L1 Slot Activate msg */
+ rm_ItcTxMsg_t msgToL1; /* Store an encoded message sent to L1 */
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_SendSlotActivateToTrx: Entering...\n" ));
+
+ /* ATTN:
+ ** ====
+ ** slot's bit 8-5 i.e. 5 MSB bits must be masked by caller of this
+ ** function. Caller is also responsibile for validity of SLOT COMB
+ ** value associated with this slot. This function just passes COMB
+ ** it gets to L1
+ */
+
+ /* Encode Slot Activate message */
+
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_TRXMGMT; //0x10
+ msgToL1.buffer[length++] = RM_L1MT_SLOTACTIV_MSB; //0x17
+ msgToL1.buffer[length++] = RM_L1MT_SLOTACTIV_LSB; //0x00
+ msgToL1.buffer[length++] = trx;
+ msgToL1.buffer[length++] = slot;
+ msgToL1.buffer[length++] = OAMrm_TRX_SLOT_COMB(trx,slot);
+
+ msgToL1.msgLength = length;
+
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer); /* TBD: Provided by L1 */
+
+} /* End of rm_SendSlotActivateToSlot() */
+
+void intg_SendSlotActivateToTrx(u8 trx, u8 slot, u8 comb)
+{
+ u16 length; /* Length of the L1 Slot Activate msg */
+ rm_ItcTxMsg_t msgToL1; /* Store an encoded message sent to L1 */
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-intg_SendSlotActivateToTrx: Entering...\n" ));
+
+ /* ATTN:
+ ** ====
+ ** slot's bit 8-5 i.e. 5 MSB bits must be masked by caller of this
+ ** function. Caller is also responsibile for validity of SLOT COMB
+ ** value associated with this slot. This function just passes COMB
+ ** it gets to L1
+ */
+
+ /* Encode Slot Activate message */
+
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_TRXMGMT; //0x10
+ msgToL1.buffer[length++] = RM_L1MT_SLOTACTIV_MSB; //0x17
+ msgToL1.buffer[length++] = RM_L1MT_SLOTACTIV_LSB; //0x00
+ msgToL1.buffer[length++] = trx;
+ msgToL1.buffer[length++] = slot;
+ msgToL1.buffer[length++] = comb; //OAMrm_TRX_SLOT_COMB(trx,slot);
+
+ msgToL1.msgLength = length;
+
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer); /* TBD: Provided by L1 */
+}
+#endif /* __RM_SENDSLOTACTIVATETOTRX_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendSynchInfoToBcchTrx.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendSynchInfoToBcchTrx.cpp
new file mode 100644
index 0000000..ef28ce1
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendSynchInfoToBcchTrx.cpp
@@ -0,0 +1,42 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDSYNCHINFOTOBCCHTRX_CPP__
+#define __RM_SENDSYNCHINFOTOBCCHTRX_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendSynchInfoToBcchTrx( u8 trx)
+{
+ u16 length; /* Length of the L1 Slot Activate msg */
+ rm_ItcTxMsg_t msgToL1; /* Store an encoded message sent to L1 */
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_SendSynchInfoToBcchTrx\n"));
+
+ /* Encode SYNCH INFO message */
+
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_TRXMGMT; //0x10
+ msgToL1.buffer[length++] = RM_L1MT_SYNCH_MSB; //0x00
+ msgToL1.buffer[length++] = RM_L1MT_SYNCH_LSB; //0x1D
+ msgToL1.buffer[length++] = trx;
+ msgToL1.buffer[length++] = 0; //TBD: OAMrm_SYNCHINFO(0), MSBbyte
+ msgToL1.buffer[length++] = 0; //TBD: OAMrm_SYNCHINFO(1)
+ msgToL1.buffer[length++] = 0; //TBD: OAMrm_SYNCHINFO(2)
+ msgToL1.buffer[length++] = 0; //TBD: OAMrm_SYNCHINFO(3), LSBbyte
+
+ msgToL1.msgLength = length;
+
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+
+} /* End of rm_SendSynchInfoToBcchTrx() */
+
+#endif /* __RM_SENDSYNCHINFOTOBCCHTRX_CPP__ */
+
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendSystemInfo2ToBcchTrx.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendSystemInfo2ToBcchTrx.cpp
new file mode 100644
index 0000000..1ddd8f9
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendSystemInfo2ToBcchTrx.cpp
@@ -0,0 +1,71 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDSYSTEMINFO2TOBCCHTRX_CPP__
+#define __RM_SENDSYSTEMINFO2TOBCCHTRX_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendSystemInfo2ToBcchTrx(u8 trx, u8 SI, T_CNI_RIL3_CELL_BARRED_ACCESS barState)
+{
+ u16 length; /* Length of a msg sent to L1 */
+ rm_EdRet_t rrEdRet; /* Return code from RR decode */
+ rm_L3Data_t l3_data; /* Encoded SI Type 2 */
+ rm_ItcTxMsg_t msgToL1; /* Send BCCH INFORMATION msg to L1 */
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_SendSystemInfo2ToBcchTrx\n"));
+
+ /* Zap rm_UmMsg 0-clean first */
+ RM_MEMSET( &rm_UmMsg, sizeof(rm_UmMsg_t) );
+
+ /* Populate SI2 for use by RRM encoder */
+ rm_PopulateSI2(barState);
+ RM_MEMCPY( &rm_UmMsg, &rm_UmSI2, sizeof(rm_UmSI2_t));
+
+ /* Call RR message encoding functionality */
+ rrEdRet = CNI_RIL3RRM_Encode( &rm_UmMsg, &l3_data);
+
+ /* check the encoding result before sending the message */
+ switch (rrEdRet)
+ {
+ case RM_RRED_SUCCESS:
+
+ /* Wrap the encoded SI in PH_DATA_REQ */
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_COMCHAN;
+ msgToL1.buffer[length++] = RM_L1MT_BCCHINFO_MSB;
+ msgToL1.buffer[length++] = RM_L1MT_BCCHINFO_LSB;
+ msgToL1.buffer[length++] = trx;
+ msgToL1.buffer[length++] = RM_L1BCCH_CHANNUMBER_MSB;
+ msgToL1.buffer[length++] = RM_L1BCCH_CHANNUMBER_LSB;
+ msgToL1.buffer[length++] = SI;
+ msgToL1.buffer[length++] = l3_data.msgLength;
+ RM_MEMCPY(&msgToL1.buffer[length], l3_data.buffer, l3_data.msgLength);
+ length = length + l3_data.msgLength;
+ msgToL1.buffer[length++] = 1; //Start time==immediate
+ msgToL1.buffer[length++] = 0;
+ msgToL1.buffer[length++] = 0;
+ msgToL1.msgLength = length;
+
+ /* Send BCCH INFORMATION TO L1 */
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+
+ break;
+
+ default:
+ /* Encoding failed */
+ EDEBUG__(("ERROR-rm_SendSystemInfo2ToBcchTrx: RIL3-RR encode error:%d\n",
+ rrEdRet ));
+ break;
+
+ } /* End of switch(rrEdRet) */
+
+} /* End of rm_SendSystemInfo2ToBcchTrx() */
+
+#endif /* __RM_SENDSYSTEMINFO2TOBCCHTRX_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendSystemInfo3ToBcchTrx.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendSystemInfo3ToBcchTrx.cpp
new file mode 100644
index 0000000..95c8c3c
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendSystemInfo3ToBcchTrx.cpp
@@ -0,0 +1,71 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDSYSTEMINFO3TOBCCHTRX_CPP__
+#define __RM_SENDSYSTEMINFO3TOBCCHTRX_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendSystemInfo3ToBcchTrx(u8 trx, u8 SI, T_CNI_RIL3_CELL_BARRED_ACCESS barState)
+{
+ u16 length; /* Length of a msg sent to L1 */
+ rm_EdRet_t rrEdRet; /* Return code from RR decode */
+ rm_L3Data_t l3_data; /* Encoded SI Type 3 */
+ rm_ItcTxMsg_t msgToL1; /* Send BCCH INFORMATION msg to L1 */
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_SendSystemInfo3ToBcchTrx\n"));
+
+ /* Zap rm_UmMsg 0-clean first */
+ RM_MEMSET( &rm_UmMsg, sizeof(rm_UmMsg_t) );
+
+ /* Populate SI3 for use by RRM encoder */
+ rm_PopulateSI3(barState);
+ RM_MEMCPY( &rm_UmMsg, &rm_UmSI3, sizeof(rm_UmSI3_t));
+
+ /* Call RR message encoding functionality */
+ rrEdRet = CNI_RIL3RRM_Encode( &rm_UmMsg, &l3_data);
+
+ /* check the encoding result before sending the message */
+ switch (rrEdRet)
+ {
+ case RM_RRED_SUCCESS:
+
+ /* Wrap the encoded SI in PH_DATA_REQ */
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_COMCHAN;
+ msgToL1.buffer[length++] = RM_L1MT_BCCHINFO_MSB;
+ msgToL1.buffer[length++] = RM_L1MT_BCCHINFO_LSB;
+ msgToL1.buffer[length++] = trx;
+ msgToL1.buffer[length++] = RM_L1BCCH_CHANNUMBER_MSB;
+ msgToL1.buffer[length++] = RM_L1BCCH_CHANNUMBER_LSB;
+ msgToL1.buffer[length++] = SI;
+ msgToL1.buffer[length++] = l3_data.msgLength;
+ RM_MEMCPY(&msgToL1.buffer[length], l3_data.buffer, l3_data.msgLength);
+ length = length + l3_data.msgLength;
+ msgToL1.buffer[length++] = 1; //Start time==immediate
+ msgToL1.buffer[length++] = 0;
+ msgToL1.buffer[length++] = 0;
+ msgToL1.msgLength = length;
+
+ /* Send BCCH INFORMATION TO L1 */
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+
+ break;
+
+ default:
+ /* Encoding failed */
+ EDEBUG__(("ERROR-rm_SendSystemInfo3ToBcchTrx: RIL3-RR encode error:%d\n",
+ rrEdRet ));
+ break;
+
+ } /* End of switch(rrEdRet) */
+
+} /* End of rm_SendSystemInfo3ToBcchTrx() */
+
+#endif /* __RM_SENDSYSTEMINFO3TOBCCHTRX_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendSystemInfo4ToBcchTrx.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendSystemInfo4ToBcchTrx.cpp
new file mode 100644
index 0000000..63ed38d
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendSystemInfo4ToBcchTrx.cpp
@@ -0,0 +1,71 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDSYSTEMINFO4TOBCCHTRX_CPP__
+#define __RM_SENDSYSTEMINFO4TOBCCHTRX_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendSystemInfo4ToBcchTrx(u8 trx, u8 SI, T_CNI_RIL3_CELL_BARRED_ACCESS barState)
+{
+ u16 length; /* Length of a msg sent to L1 */
+ rm_EdRet_t rrEdRet; /* Return code from RR decode */
+ rm_L3Data_t l3_data; /* Encoded SI Type 4 */
+ rm_ItcTxMsg_t msgToL1; /* Send BCCH INFORMATION msg to L1 */
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_SendSystemInfo4ToBcchTrx\n"));
+
+ /* Zap rm_UmMsg 0-clean first */
+ RM_MEMSET( &rm_UmMsg, sizeof(rm_UmMsg_t) );
+
+ /* Populate SI4 for use by RRM encoder */
+ rm_PopulateSI4(barState);
+ RM_MEMCPY( &rm_UmMsg, &rm_UmSI4, sizeof(rm_UmSI4_t));
+
+ /* Call RR message encoding functionality */
+ rrEdRet = CNI_RIL3RRM_Encode( &rm_UmMsg, &l3_data);
+
+ /* check the encoding result before sending the message */
+ switch (rrEdRet)
+ {
+ case RM_RRED_SUCCESS:
+
+ /* Wrap the encoded SI in PH_DATA_REQ */
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_COMCHAN;
+ msgToL1.buffer[length++] = RM_L1MT_BCCHINFO_MSB;
+ msgToL1.buffer[length++] = RM_L1MT_BCCHINFO_LSB;
+ msgToL1.buffer[length++] = trx;
+ msgToL1.buffer[length++] = RM_L1BCCH_CHANNUMBER_MSB;
+ msgToL1.buffer[length++] = RM_L1BCCH_CHANNUMBER_LSB;
+ msgToL1.buffer[length++] = SI;
+ msgToL1.buffer[length++] = l3_data.msgLength;
+ RM_MEMCPY(&msgToL1.buffer[length], l3_data.buffer, l3_data.msgLength);
+ length = length + l3_data.msgLength;
+ msgToL1.buffer[length++] = 1; //Start time==immediate
+ msgToL1.buffer[length++] = 0;
+ msgToL1.buffer[length++] = 0;
+ msgToL1.msgLength = length;
+
+ /* Send BCCH INFORMATION TO L1 */
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+
+ break;
+
+ default:
+ /* Encoding failed */
+ EDEBUG__(("ERROR-rm_SendSystemInfo4ToBcchTrx: RIL3-RR encode error:%d\n",
+ rrEdRet ));
+ break;
+
+ } /* End of switch(rrEdRet) */
+
+} /* End of rm_SendSystemInfo4ToBcchTrx() */
+
+#endif /* __RM_SENDSYSTEMINFO4TOBCCHTRX_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendTrxConfigToTrx.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendTrxConfigToTrx.cpp
new file mode 100644
index 0000000..4d8f9f2
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendTrxConfigToTrx.cpp
@@ -0,0 +1,44 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDTRXCONFIGTOTRX_CPP__
+#define __RM_SENDTRXCONFIGTOTRX_CPP__
+
+#include "rm\rm_head.h"
+
+
+void rm_SendTrxConfigToTrx(u8 trx)
+{
+ u16 length; /* Length of the message to send to L1 */
+ rm_ItcTxMsg_t msgToL1; /* Store an encoded message sent to L1 */
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_SendTrxConfigToTrx: Entering...\n" ));
+
+ /* Encode TRX CONFIGure message */
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_TRXMGMT; //0x10
+ msgToL1.buffer[length++] = RM_L1MT_TRXCONFIG_MSB; //0x15
+ msgToL1.buffer[length++] = RM_L1MT_TRXCONFIG_LSB; //0x00
+ msgToL1.buffer[length++] = trx; //OAMrm_PREALPHA_TRX;
+ msgToL1.buffer[length++] = OAMrm_AIRINTERFACE; //0x02
+ msgToL1.buffer[length++] = OAMrm_BTS_BSIC; //0x5D
+ msgToL1.buffer[length++] = OAMrm_NETWORKIFCONFIG; //0x00
+
+ //Skip those not in-use fields
+ length += 14;
+ msgToL1.buffer[length++] = (u8) OAMrm_I_Q_SWAP; //0:non-swap, 1:swap
+
+ msgToL1.msgLength = length + 14;
+
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer); /* TBD: Provided by L1 */
+
+} /* rm_SendTrxConfigToTrx() */
+
+#endif /* __RM_SENDTRXCONFIGTOTRX_CPP__ */
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SendTuneSynthToTrx.cpp b/data/mnet/GP10/Host/rm/Src/rm_SendTuneSynthToTrx.cpp
new file mode 100644
index 0000000..e0ac503
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SendTuneSynthToTrx.cpp
@@ -0,0 +1,141 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SENDTUNESYNTHTOTRX_CPP__
+#define __RM_SENDTUNESYNTHTOTRX_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_SendTuneSynthToTrx(u8 trx,u8 pwr)
+{
+ static u8 m_pwr[2]={0,0};
+
+ //Check if tune make sense
+ //if (m_pwr[trx] == pwr)
+ //{
+ // PDEBUG__(("INFO@rm_SendTuneSynthToTrx: nothing changed, thus fruitless tune(%d,%d)\n",
+ // trx,pwr));
+ // return;
+ //}
+
+ //Go ahead to tuen and rememebr the current pwr state
+ m_pwr[trx] = pwr;
+
+ //G2TEST
+
+ //Monitoring entrance to a function
+ //RDEBUG__(("ENTER-rm_SendTuneSynthToTrx: Entering...\n" ));
+
+ //Tune physical TRX syntheseizer according to configuration data
+ //PDEBUG__(("INFO@rm_SendTuneSynthToTrx: tune trx synth: (%d,%d)\n",trx,pwr));
+
+ // if (rm_TrxMgmt[trx].state==RM_TRXMGMT_SNULL ||
+ // rm_TrxMgmt[trx].state==RM_TRXMGMT_S0_BOOTSTRAP_IND)
+ // return;
+
+ rm_SendArfcnToTrx(trx, OAMrm_BCCH_CARRIER_phTRX);
+
+ switch(trx)
+ {
+ case 0:
+ if (OAMrm_BCCH_CARRIER_phTRX)
+ { //phTRX 1 as bcch carrier trx ie trx-es swapped scenario
+ rm_TuneSynth(0, 0, OAMrm_HOPPING_CTRL, pwr, OAMrm_ARFCN(0));
+ //phTRX, syth, Hopping, pwrSetting, trxPackage
+ } else
+ { //phTRX 0 as bcch carrier trx ie trx-es non-swapped scenario
+ rm_TuneSynth(1, 0, OAMrm_HOPPING_CTRL, pwr, OAMrm_ARFCN(0));
+ //phTRX, syth, Hopping, pwrSetting, trxPackage
+ rm_TuneSynth(1, 1, OAMrm_HOPPING_CTRL, pwr, OAMrm_ARFCN(0));
+ //phTRX, syth, Hopping, pwrSetting, trxPackage
+ }
+ break;
+ case 1:
+ if (OAMrm_BCCH_CARRIER_phTRX)
+ { //phTRX 1 as bcch carrier trx ie trx-es swapped scenario
+ rm_TuneSynth(1, 0, OAMrm_HOPPING_CTRL, pwr, OAMrm_ARFCN(1));
+ //phTRX, syth, Hopping, pwrSetting, trxPackage
+ rm_TuneSynth(1, 1, OAMrm_HOPPING_CTRL, pwr, OAMrm_ARFCN(1));
+ //phTRX, syth, Hopping, pwrSetting, trxPackage
+ } else
+ { //phTRX 0 as bcch carrier trx ie trx-es non-swapped scenario
+ rm_TuneSynth(0, 0, OAMrm_HOPPING_CTRL, pwr, OAMrm_ARFCN(1));
+ //phTRX, syth, Hopping, pwrSetting, trxPackage
+ }
+ break;
+
+ default:
+ EDEBUG__(("WARNING@rm_SendTuneSynthToTrx: invalid trx=%d\n",trx));
+ break;
+ }
+}
+
+
+void rm_TuneSynth(u8 phTrx, u8 synth, u8 hopping, u8 state, u16 arfcn)
+{
+ rm_ItcTxMsg_t msgToL1;
+ u16 length,setting;
+
+ //G2TEST
+ //PDEBUG__(("INFO@rm_TuneSynth: swapInd=%d, hopping=%d, tuneSetting:(%d,%d,%d,%d)\n",
+ // OAMrm_BCCH_CARRIER_phTRX, hopping, phTrx, synth, state, arfcn));
+ printf("INFO@rm_TuneSynth: swapInd=%d, hopping=%d, tuneSetting:(%d,%d,%d,%d)\n",
+ OAMrm_BCCH_CARRIER_phTRX, hopping, phTrx, synth, state, arfcn);
+
+ //Fill TUNE SYNTH message's header portion
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_TRXMGMT; //0x10
+ msgToL1.buffer[length++] = RM_L1MT_TUNESYNTH_MSB; //0x12
+ msgToL1.buffer[length++] = RM_L1MT_TUNESYNTH_LSB; //0x00
+ msgToL1.buffer[length++] = 0; //Always sent ot BCCH DSP
+
+ setting = 0;
+ setting = ( OAMrm_phTRX_SELECT(phTrx) | OAMrm_phTRX_SYNTH_SELECT(synth) |
+ OAMrm_phTRX_HOPPING(hopping) | OAMrm_phTRX_PWR_SELECT(state) |
+ (0x3FF&arfcn) );
+
+ msgToL1.buffer[length++] = (unsigned char)(setting>>8);
+ msgToL1.buffer[length++] = (unsigned char)(setting);
+ msgToL1.msgLength = length;
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+}
+
+void rm_SendArfcnToTrx(u8 trx, int swap)
+{
+ rm_ItcTxMsg_t msgToL1;
+ u16 length,arfcn;
+
+ switch(trx)
+ {
+ case 0:
+ arfcn = OAMrm_ARFCN(0);
+ break;
+ case 1:
+ arfcn = OAMrm_ARFCN(1);
+ break;
+
+ default:
+ return;
+ }
+
+ PDEBUG__(("INFO@rm_SendArfcnToTrx: trx=%d, swap=%d, arfcn=%d\n",
+ trx, swap, arfcn));
+
+ //Fill TUNE SYNTH message's header portion
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_TRXMGMT; //0x10
+ msgToL1.buffer[length++] = RM_L1MT_ARFCN_MSB; //0x29
+ msgToL1.buffer[length++] = RM_L1MT_ARFCN_LSB; //0x00
+ msgToL1.buffer[length++] = trx;
+ msgToL1.buffer[length++] = (u8)(arfcn>>8);
+ msgToL1.buffer[length++] = (u8)(arfcn);
+ msgToL1.msgLength = length;
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+}
+
+#endif //__RM_SENDTUNESYNTHTOTRX_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SolvePagingGroup.cpp b/data/mnet/GP10/Host/rm/Src/rm_SolvePagingGroup.cpp
new file mode 100644
index 0000000..a7dfd42
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SolvePagingGroup.cpp
@@ -0,0 +1,32 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SOLVEPAGINGGROUP_CPP__
+#define __RM_SOLVEPAGINGGROUP_CPP__
+
+#include "rm\rm_head.h"
+
+u8 rm_SolvePagingGroup(rm_IeMobileId_t *pMobileId)
+{
+ u8 N,pageGroup, NDivBsPaMfrms;
+ u16 imsiMod1000;
+
+ imsiMod1000 = rm_GetImsiMod1000(pMobileId);
+
+ N = (u8) (3-OAMrm_BS_AG_BLK_RES)*(OAMrm_BS_PA_MFRMS+2);
+ NDivBsPaMfrms = (u8) N/(OAMrm_BS_PA_MFRMS+2);
+ pageGroup = (u8) (imsiMod1000%(u8)(OAMrm_BS_CC_CHANS*N)) % N;
+
+ return (pageGroup);
+
+// *pPaging51MF = (u8) (pageGroup / NDivBsPaMfrms);
+// *pPagingBIdx = (u8) (pageGroup % NDivBsPaMfrms);
+
+} /* rm_SolvePagingGroup() */
+
+#endif /* __RM_SOLVEPAGINGGROUP_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_StartTimer.cpp b/data/mnet/GP10/Host/rm/Src/rm_StartTimer.cpp
new file mode 100644
index 0000000..414ea3e
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_StartTimer.cpp
@@ -0,0 +1,107 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_STARTTIMER_CPP__
+#define __RM_STARTTIMER_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_StartTimer( rm_IrtEntryId_t entryId, u8 timer )
+{
+ STATUS ret;
+ WDOG_ID id;
+ int delay;
+ int param;
+ u8 *pState, ignore;
+ rm_PhyChanDesc_t *pPhyChan;
+
+ //Monitoring entrance to a function
+ //RDEBUG__(("ENTER-rm_StartTimer: entry ID=%d, timer ID=%d\n",
+ // entryId, timer));
+
+ if ( rm_SmCtxt[entryId].smType!=RM_MAIN_SM && timer!=RM_TWDOG )
+ {
+ IDEBUG__(("ERROR@rm_StartTimer:smType=%d, timer=%d\n",
+ rm_SmCtxt[entryId].smType,timer));
+ return;
+ }
+
+ pPhyChan = rm_SmCtxt[entryId].pPhyChan;
+
+ ignore = RM_FALSE;
+
+ switch (timer)
+ {
+ case RM_T3101:
+ id = pPhyChan->T3101.id;
+ delay = pPhyChan->T3101.time;
+ pState = &(pPhyChan->T3101.state);
+ param = (entryId<<8)|RM_T3101;
+ break;
+
+ case RM_T3111:
+ id = pPhyChan->T3111.id;
+ delay = pPhyChan->T3111.time;
+ pState = &(pPhyChan->T3111.state);
+ param = (entryId<<8)|RM_T3111;
+ break;
+
+ case RM_T3109:
+ id = pPhyChan->T3109.id;
+ delay = pPhyChan->T3109.time;
+ pState = &(pPhyChan->T3109.state);
+ param = (entryId<<8)|RM_T3109;
+ break;
+
+ case RM_T3L01:
+ id = pPhyChan->T3L01.id;
+ delay = pPhyChan->T3L01.time;
+ pState = &(pPhyChan->T3L01.state);
+ param = (entryId<<8)|RM_T3L01;
+ break;
+
+ case RM_T3L02:
+ id = pPhyChan->T3L02.id;
+ delay = pPhyChan->T3L02.time;
+ pState = &(pPhyChan->T3L02.state);
+ param = (entryId<<8)|RM_T3L02;
+ break;
+
+ case RM_T3105:
+ id = pPhyChan->T3105.id;
+ delay = pPhyChan->T3105.time;
+ pState = &(pPhyChan->T3105.state);
+ param = (entryId<<8)|RM_T3105;
+ break;
+
+ case RM_TWDOG:
+ id = rm_TrxMgmt[entryId].TWDOG.id;
+ delay = rm_TrxMgmt[entryId].TWDOG.time;
+ pState = &(rm_TrxMgmt[entryId].TWDOG.state);
+ param = (entryId<<8)|RM_TWDOG;
+ break;
+
+ default:
+ IDEBUG__(("ERROR@rm_StartTimer: unsupported timer:%d\n",timer ));
+ ignore = RM_TRUE;
+ break;
+ }
+
+ if ( !ignore )
+ {
+ ret = wdStart ( id, delay, (FUNCPTR)rm_TimerExpired, param );
+ if ( ret==ERROR )
+ EDEBUG__(("ERROR@rm_StartTimer: wdStart errno:%d\n", errno));
+ else
+ *pState = RM_TRUE;
+ }
+
+} //End of rm_StartTimer()
+
+#endif //__RM_STARTTIMER_CPP__
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_StopTimer.cpp b/data/mnet/GP10/Host/rm/Src/rm_StopTimer.cpp
new file mode 100644
index 0000000..197aedd
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_StopTimer.cpp
@@ -0,0 +1,91 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_STOPTIMER_CPP__
+#define __RM_STOPTIMER_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_StopTimer( rm_IrtEntryId_t entryId, u8 timer )
+{
+ STATUS ret;
+ WDOG_ID id;
+ u8 *pState, ignore;
+ rm_PhyChanDesc_t *pPhyChan;
+
+ //Monitoring entrance to a function
+ //RDEBUG__(("ENTER-rm_StopTimer: entryID=%d, timerID=%d\n",
+ // entryId, timer));
+
+ if ( rm_SmCtxt[entryId].smType != RM_MAIN_SM )
+ {
+ IDEBUG__(("ERROR@rm_StopTimer:smType is not main SM\n"));
+ return;
+ }
+
+ pPhyChan = rm_SmCtxt[entryId].pPhyChan;
+
+ ignore = RM_FALSE;
+
+ switch (timer)
+ {
+ case RM_T3101:
+ id = pPhyChan->T3101.id;
+ pState = &(pPhyChan->T3101.state);
+ break;
+
+ case RM_T3111:
+ id = pPhyChan->T3111.id;
+ pState = &(pPhyChan->T3111.state);
+ break;
+
+ case RM_T3109:
+ id = pPhyChan->T3109.id;
+ pState = &(pPhyChan->T3109.state);
+ break;
+
+ case RM_T3L01:
+ id = pPhyChan->T3L01.id;
+ pState = &(pPhyChan->T3L01.state);
+ break;
+
+ case RM_T3L02:
+ id = pPhyChan->T3L02.id;
+ pState = &(pPhyChan->T3L02.state);
+ break;
+
+ case RM_T3105:
+ id = pPhyChan->T3105.id;
+ pState = &(pPhyChan->T3105.state);
+ break;
+
+ case RM_TWDOG:
+ id = rm_TrxMgmt[entryId].TWDOG.id;
+ pState = &(rm_TrxMgmt[entryId].TWDOG.state);
+ break;
+
+ default:
+ IDEBUG__(("ERROR@rm_StopTimer: unsupported timer:%d\n",timer ));
+ ignore = RM_TRUE;
+ break;
+ }
+
+ if ( !ignore )
+ {
+ ret = wdCancel ( id );
+ if ( ret==ERROR )
+ EDEBUG__(("ERROR@rm_StopTimer: wdCancel errno:%d\n", errno));
+ else
+ *pState = RM_FALSE;
+ }
+
+} //End of rm_StopTimer()
+
+#endif //__RM_STOPTIMER_CPP__
+
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_SysCmd.cpp b/data/mnet/GP10/Host/rm/Src/rm_SysCmd.cpp
new file mode 100644
index 0000000..4707728
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_SysCmd.cpp
@@ -0,0 +1,50 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SYSCMD_CPP__
+#define __RM_SYSCMD_CPP__
+
+#include "rm\rm_head.h"
+#include "Os\JCModule.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "cdcUtils/drfInterface.h"
+
+#ifdef __cplusplus
+}
+#endif
+
+
+int SysCommand_RM (T_SYS_CMD action)
+{
+ switch(action)
+ {
+ case SYS_SHUTDOWN:
+ printf("[RM] shutdown notification received\n");
+ break;
+ case SYS_START:
+ printf("[RM] Received task start notification\n");
+ sys_Init();
+ rm_Task();
+ break;
+ case SYS_REBOOT:
+ printf("[RM] Reboot: Turning off RF power\n");
+ /* Turn off RF power */
+ drfFpgaTxPwrDisable(0); /* take away power control from dsp */
+ drfFpgaTxPwrDisable(1); /* take away power control from dsp */
+ drfTxPwrSet(0,0); /* turn off power */
+ drfTxPwrSet(1,0); /* turn off power */
+ break;
+ }
+ return 0;
+}
+
+#endif /* __RM_SYSCMD_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_Task.cpp b/data/mnet/GP10/Host/rm/Src/rm_Task.cpp
new file mode 100644
index 0000000..cf01fa1
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_Task.cpp
@@ -0,0 +1,38 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_TASK_CPP__
+#define __RM_TASK_CPP__
+
+#include "rm\rm_head.h"
+#include "Os\JCTask.h"
+#include "GP10OsTune.h"
+
+extern JCTask rmTaskObj;
+
+void rm_Task( void )
+{
+ RDEBUG__(("ENTER-rmTask starting...\n"));
+
+ // Create rmTask
+ if( ERROR == rmTaskObj.JCTaskSpawn(
+ RM_TASK_PRIORITY, // Priority
+ RM_TASK_OPTION, // Option word
+ RM_TASK_STACK_SIZE, // Stack size
+ (FUNCPTR)rm_Main, // Task entry
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ MODULE_RM, JC_CRITICAL_TASK // Parameters
+ ) )
+ {
+ // Error occuring in creating rmTask, report the error and return.
+ EDEBUG__(("ERROR-rm_Task: VxWorks TaskSpawn failed, err:%d\n", errno));
+ }
+
+}
+
+#endif /* __RM_TASK_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_TestPrintOamRmConfigData.cpp b/data/mnet/GP10/Host/rm/Src/rm_TestPrintOamRmConfigData.cpp
new file mode 100644
index 0000000..e6a2d5a
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_TestPrintOamRmConfigData.cpp
@@ -0,0 +1,149 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+//#ifndef __RM_TESTPRINTOAMRMCONFIGDATA_CPP__
+//#define __RM_TESTPRINTOAMRMCONFIGDATA_CPP__
+
+#include "rm\rm_head.h"
+
+
+void rm_TestPrintOamRmConfigData(void)
+{
+int i,j;
+
+printf("OAMrm_T3L01: %x, %x\n",
+ OAMrm_T3L01,
+ ((int)(grr_OamData.grrConfigData.rm_t3L01)));
+ //0xFF
+printf("OAMrm_BS_CC_CHANS: %x, %x\n",
+ OAMrm_BS_CC_CHANS,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_bsCcChans)));
+ //0x01
+printf("OAMrm_BSCCCHSDCCH_COMB: %x, %x\n",
+ OAMrm_BSCCCHSDCCH_COMB,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_bsCcchSdcchComb)));
+ //0x01
+printf("OAMrm_SYSINFO_ONOFF_MAP: %x, %x\n",
+ OAMrm_SYSINFO_ONOFF_MAP,
+ ((unsigned short)(grr_OamData.grrConfigData.rm_sysInfoOnOffMap)));
+ //0x3E
+printf("OAMrm_AIRINTERFACE: %x, %x\n",
+ OAMrm_AIRINTERFACE,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_airInterface)));
+ //0x02
+printf("OAMrm_BTS_TSC: %x, %x\n",
+ OAMrm_BTS_TSC,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_viperCellTsc)));
+ //0x05
+printf("OAMrm_SLOTS_PER_TRX: %x, %x\n",
+ OAMrm_SLOTS_PER_TRX,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_maxSlotPerTrx)));
+ //0x08
+printf("OAMrm_MAX_TRXS: %x, %x\n",
+ OAMrm_MAX_TRXS,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_maxTrxs)));
+ //0x02
+printf("OAMrm_MAX_TCHFS: %x, %x\n",
+ OAMrm_MAX_TCHFS,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_maxTchfs)));
+ //0x0f
+printf("OAMrm_MAX_SDCCH4S: %x, %x\n",
+ OAMrm_MAX_SDCCH4S,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_maxSdcch4s)));
+ //0x04
+printf("OAMrm_TRX_ONOFF_MAP: %x, %x\n",
+ OAMrm_TRX_ONOFF_MAP,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_trxOnOffMap)));
+ //0x01
+printf("OAMrm_NETWORKIFCONFIG: %x, %x\n",
+ OAMrm_NETWORKIFCONFIG,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_networkIfConfig)));
+ //0x00
+printf("OAMrm_BCCH_TRX: %x, %x\n",
+ OAMrm_BCCH_TRX,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_bcchTrx)));
+ //0x00
+printf("OAMrm_PREALPHA_TRX: %x, %x\n",
+ OAMrm_PREALPHA_TRX,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_preAlphaTrx)));
+ //0x00
+printf("OAMrm_CCCH_SDCCH_COMB: %x, %x\n",
+ OAMrm_CCCH_SDCCH_COMB,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_ccchBcchComb)));
+ //0x01
+printf("OAMrm_CCCH_CONF: %x, %x\n",
+ OAMrm_CCCH_CONF,
+ ((unsigned char)(grr_OamData.grrConfigData.rm_ccchConf)));
+ //0x01
+ //FS:T_CNI_RIL3_CCCH_CONF:CNI_RIL3_CCCH_CONF_ONE_CCCH_COMBINED_SDCCHS=1
+for (i=0;i<2;i++)
+for (j=0;j<8;j++)
+{
+printf("OAMrm_NIM(%d,%d): %x, %x\n", i,j,
+ OAMrm_NIM(i,j),
+ ((unsigned char)(grr_OamData.grrConfigData.rm_nim[i][j])));
+ //rm_nim[2][8]: all elements<-0xFF
+}
+
+for (i=0;i<2;i++)
+for (j=0;j<4;j++)
+{
+//printf("OAMrm_TRX_SYNTH_SELECT(%d,%d): %x, %x\n",i,j,
+// OAMrm_TRX_SYNTH_SELECT(i,j),
+// ((unsigned char)(j)));
+// //N.A. Y: ULSYNTH_A/B(0/1), DLSYNTH_A/B(2/3)
+printf("OAMrm_TRX_SYNTH_SETTINGMSB(%d,%d): %x, %x\n",i,j,
+ OAMrm_TRX_SYNTH_SETTINGMSB(i,j),
+ ((unsigned char)(grr_OamData.grrConfigData.rm_trxSynthSetting[i][j]>>8)));
+ //rm_trxSynthSetting[2][4] all elements<-0x00
+printf("OAMrm_TRX_SYNTH_SETTINGLSB(%d,%d): %x, %x\n",i,j,
+ OAMrm_TRX_SYNTH_SETTINGLSB(i,j),
+ ((unsigned char)(grr_OamData.grrConfigData.rm_trxSynthSetting[i][j])));
+ //defined above
+}
+
+for (i=0;i<2;i++)
+{
+printf("OAMrm_TRX_ULFPGADELAY_MSB(%d): %x, %x\n",i,
+ OAMrm_TRX_ULFPGADELAY_MSB(i),
+ ((unsigned char)(grr_OamData.grrConfigData.rm_trxFpgaDelay[i][0]>>8)));
+ //rm_trxFpgaDelay[2][2] all elements<-0x00
+printf("OAMrm_TRX_ULFPGADELAY_LSB(%d): %x, %x\n",i,
+ OAMrm_TRX_ULFPGADELAY_LSB(i),
+ ((unsigned char)(grr_OamData.grrConfigData.rm_trxFpgaDelay[i][0])));
+ //defined above
+//printf("OAMrm_TRX_DLFPGADELAY_MSB(%d): %x, %x\n",i,
+// OAMrm_TRX_DLFPGADELAY_MSB(i),
+// ((unsigned char)(grr_OamData.grrConfigData.rm_trxFpgaDelay[i][1]>>8)));
+ //defined above
+//printf(OAMrm_TRX_DLFPGADELAY_MSB(%d): %x, %x\n",i,
+// OAMrm_TRX_DLFPGADELAY_MSB(i),
+// ((unsigned char)(grr_OamData.grrConfigData.rm_trxFpgaDelay[i][1])));
+// //defined above
+}
+
+for (i=0;i<2;i++)
+{
+printf("OAMrm_UPLINK_SGAINCTRL_SETTING(%d): %x, %x\n",i,
+ OAMrm_UPLINK_SGAINCTRL_SETTING(i),
+ ((unsigned short)(grr_OamData.grrConfigData.rm_SGainCtrlSetting[i][0])));
+ //rm_SGainCtrlSetting[2][2]:[X][0]<-0x380
+printf("OAMrm_DOWNLINK_SGAINCTRL_SETTING(%d): %x, %x\n",i,
+ OAMrm_DOWNLINK_SGAINCTRL_SETTING(i),
+ ((unsigned char)(grr_OamData.grrConfigData.rm_SGainCtrlSetting[i][1])));
+ //rm_SGainCtrlSetting[2][2]:[X][1]<-0xC0
+}
+
+printf("OAMrm_SYNCH_CHANINFO: %x, %x\n",
+ OAMrm_SYNCH_CHANINFO,
+ ((int)(grr_OamData.grrConfigData.rm_synchChanInfo)));
+ //0x00
+}
+
+//#endif /* __RM_TESTPRINTOAMRMCONFIGDATA_CPP__ */
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_TestPrintOamRmStdGsmData.cpp b/data/mnet/GP10/Host/rm/Src/rm_TestPrintOamRmStdGsmData.cpp
new file mode 100644
index 0000000..5d3a2c9
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_TestPrintOamRmStdGsmData.cpp
@@ -0,0 +1,370 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_TESTPRINTOAMRMSTDGSMDATA_CPP__
+#define __RM_TESTPRINTOAMRMSTDGSMDATA_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_TestPrintOamRmStdGsmData(void)
+{
+int i,j;
+
+/* PR1256 <convert from tick number to 10ms > begin*/
+
+printf("grr_OamData.t31xx.t3101 = %d---%d\n",OAMrm_T3101,grr_OamData.t31xx.t3101);
+printf("grr_OamData.t31xx.t3105 = %d---%d\n",OAMrm_T3105,grr_OamData.t31xx.t3105);
+printf("grr_OamData.t31xx.t3109 = %d---%d\n",OAMrm_T3109,grr_OamData.t31xx.t3109);
+printf("grr_OamData.t31xx.t3111 = %d---%d\n",OAMrm_T3111,grr_OamData.t31xx.t3111);
+
+/* PR1256 <convert from tick number to 10ms > end*/
+
+for (i=0;i<2;i++)
+printf("OAMrm_NARFCN(%d):%d,%d\n",
+ i,
+ OAMrm_NARFCN(i),
+ ((signed short)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_bCCHFrequency))
+ );
+ //561: neighboring cell frequency for monitoring for handover purpose
+
+printf("OAMrm_NY1:%d,%d\n",
+ OAMrm_NY1,
+ ((unsigned char)(grr_OamData.btsBasicPackage.ny1))
+ );
+ //3
+printf("OAMrm_BCCH_ARFCN:%d,%d\n",
+ OAMrm_BCCH_ARFCN,
+ (((CellAllocationEntry*)
+ (grr_OamData.btsBasicPackage.cellAllocationTable))[0].cellAllocation)
+ );
+ //661:1st element of cellAllocation table is BCCH ARFCN, oam_BcchArfcn
+
+printf("OAMrm_NCC:%d,%d\n",
+ OAMrm_NCC,
+ ((unsigned char)(grr_OamData.btsBasicPackage.bts_ncc))
+ );
+ //5:oam_Ncc, bts_ncc may be combined with
+printf("OAMrm_BCC:%d,%d\n",
+ OAMrm_BCC,
+ ((unsigned char)(grr_OamData.btsBasicPackage.bts_cid))
+ );
+ //5:oam_Bcc
+printf("OAMrm_MS_TX_PWR_MAX_CCH:%d,%d\n",
+ OAMrm_MS_TX_PWR_MAX_CCH,
+ ((unsigned char)(grr_OamData.btsBasicPackage.mSTxPwrMaxCCH))
+ );
+ //0:30dBm, previous value is 11 i.e. 8dBm, oam_MsTxPwrMax
+printf("OAMrm_MS_RELEV_ACCESS_MIN:%d,%d\n",
+ OAMrm_MS_RELEV_ACCESS_MIN,
+ ((unsigned char)(grr_OamData.btsBasicPackage.rxLevAccessMin))
+ );
+ //6: 104dBm
+printf("OAMrm_BTS_BSIC:%d,%d\n",
+ OAMrm_BTS_BSIC,
+ ((unsigned char)(grr_OamData.btsBasicPackage.bts_ncc<<3)|
+ (unsigned char)(grr_OamData.btsBasicPackage.bts_cid))
+ );
+ //0x2d: oam_BTSBsic
+printf("OAMrm_BS_AG_BLK_RES:%d,%d\n",
+ OAMrm_BS_AG_BLK_RES,
+ ((unsigned char)(grr_OamData.btsBasicPackage.noOfBlocksForAccessGrant))
+ );
+ //0:oam_bsAgBlkRes
+printf("OAMrm_BS_PA_MFRMS:%d,%d\n",
+ OAMrm_BS_PA_MFRMS,
+ ((unsigned char)(grr_OamData.btsBasicPackage.noOfMultiframesBetweenPaging))
+ );
+ //1:oam_bsPaMfrms
+printf("OAMrm_T3212:%d,%d\n",
+ OAMrm_T3212,
+ ((unsigned char)(grr_OamData.btsOptionsPackage.timerPeriodicUpdateMS))
+ );
+ //0:no periodic LUP needed, oam_T3212
+for (i=0;i<3;i++)
+printf("OAMrm_MCC(%d): %d,%d\n",
+ i,
+ OAMrm_MCC(i),
+ ((unsigned char*)&(grr_OamData.btsBasicPackage.bts_mcc))[i]
+ );
+ //001: bts_mcc is an integer which will be converted to char string, oam_Mcc
+for (i=0;i<2;i++)
+printf("OAMrm_MNC(%d):%d,%d,",
+ i,
+ OAMrm_MNC(i),
+ ((unsigned char*)&(grr_OamData.btsBasicPackage.bts_mnc))[i]
+ );
+if(((unsigned char *)&(grr_OamData.btsBasicPackage.bts_mnc))[2] == 0x0F)
+ printf("F\n");
+else
+ printf("%d\n",
+ ((unsigned char*)&(grr_OamData.btsBasicPackage.bts_mnc))[2]
+ );
+ //01: bts_mnc is an integer which will be converted to char string, oam_Mnc
+printf("OAMrm_LAC:%x,%x\n",
+ OAMrm_LAC,
+ ((short)(grr_OamData.btsBasicPackage.bts_lac))
+ );
+ //1:oam_Lac[X]
+printf("OAMrm_T3105:%x,%x\n",
+ OAMrm_T3105,
+ ((int)(grr_OamData.t31xx.t3105))
+ );
+ //2:16.6 by 2 ms
+printf("OAMrm_T3101:%x,%x\n",
+ OAMrm_T3101,
+ ((int)(grr_OamData.t31xx.t3101))
+ );
+ //0x2FF:oam_T3101
+printf("OAMrm_T3109:%x,%x\n",
+ OAMrm_T3109,
+ ((int)(grr_OamData.t31xx.t3109))
+ );
+ //0x1FF:oam_T3109
+printf("OAMrm_T3111:%x,%x\n",
+ OAMrm_T3111,
+ ((int)(grr_OamData.t31xx.t3111))
+ );
+ //0x2FF:oam_T3111
+for(j=0;j<8;j++)
+printf("OAMrm_TRX_SLOT_COMB(0,%d):%d,%d\n",
+ j,
+ OAMrm_TRX_SLOT_COMB(0,j),
+ ((unsigned char)(((ChannelEntry*)
+ (grr_OamData.transceiverPackage[0].channelTable))[j].channelCombination))
+ );
+ //5 for (X,Y)=(0,0), 1 for other (X,Y) pairs
+for(j=0;j<8;j++)
+printf("OAMrm_TRX_SLOT_COMB(1,%d):%d,%d\n",
+ j,
+ OAMrm_TRX_SLOT_COMB(1,j),
+ ((unsigned char)(((ChannelEntry*)
+ (grr_OamData.transceiverPackage[1].channelTable))[j].channelCombination))
+ );
+
+for (i=0;i<2;i++)
+printf("OAMrm_ARFCN(%d):%d,%d,%d\n",
+ i,
+ OAMrm_ARFCN(i),
+ grr_OamData.transceiverPackage[i].relatedRadioCarrier,
+ ((unsigned short)(((CarrierFrequencyEntry*)(grr_OamData.radioCarrierPackage[
+ grr_OamData.transceiverPackage[i].relatedRadioCarrier
+ ].carrierFrequencyList))[0].carrierFrequency))
+ );
+ //661 for X=0; 561 for X=1, X:0-1
+for (i=0;i<3;i++)
+printf("OAMrm_HO_ADJCELL_BCCH_ARFCNv(%d):%d,%d\n",
+ i,
+ OAMrm_HO_ADJCELL_BCCH_ARFCN(i),
+ ((short)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_bCCHFrequency))
+ );
+ //561 for X=0,761 for X=1, 0 for other X values
+for (i=0;i<3;i++)
+printf("OAMrm_HO_ADJCELL_BCCH_ARFCNi(%d):%d,%d\n",
+ i,
+ OAMrm_HO_ADJCELL_BCCH_ARFCN_t(i),
+ ((short)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[i].adjCell_bCCHFrequency))
+ );
+
+for (i=0;i<4;i++)
+printf("OAMrm_HO_ADJCELL_IDv(%d):%d,%d\n",
+ i,
+ OAMrm_HO_ADJCELL_ID(i),
+ ((unsigned int)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_handoverTable))[i].adjCell_handoverCellID))
+ );
+
+//PR1223 Begin
+for (i=0;i<4;i++)
+printf("OAMrm_HO_ADJCELL_IDi(%d):%d,%d\n",
+ i,
+ OAMrm_HO_ADJCELL_ID_t(i),
+ ((unsigned int)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[i].adjCell_handoverCellID))
+ );
+//PR1223 End
+
+
+for (i=0;i<3;i++)
+printf("OAMrm_RESEL_ADJCELL_BCCH_ARFCN(%d):%d,%d\n",
+ i,
+ OAMrm_RESEL_ADJCELL_BCCH_ARFCN(i),
+ ((unsigned int)(((AdjCell_ReselectionEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_reselectionTable))[i].adjCell_reselectionBCCHFrequency))
+ );
+ //561 for X=0,761 for X=1, 0 for other X values
+for (i=0;i<3;i++)
+printf("OAMrm_RESEL_ADJCELL_ID(%d):%d,%d\n",
+ i,
+ OAMrm_RESEL_ADJCELL_ID(i),
+ ((unsigned int)(((AdjCell_ReselectionEntry*)
+ (grr_OamData.adjacentCellPackage.adjCell_reselectionTable))[i].adjCell_reselectionCellID))
+ );
+ //2 for X=0, 3 for X=1, 0xFFFFFFFF for other X values
+printf("OAMrm_RA_RETRY_MAX:%d,%d\n",
+ OAMrm_RA_RETRY_MAX,
+ ((unsigned char)(grr_OamData.btsBasicPackage.maxNumberRetransmissions))
+ );
+ //3:retry 7 times
+printf("OAMrm_RA_TX_INTEGER:%d,%d\n",
+ OAMrm_RA_TX_INTEGER,
+ ((unsigned char)(grr_OamData.btsBasicPackage.numberOfSlotsSpreadTrans))
+ );
+ //7:spread 10 time slots
+printf("OAMrm_RA_CELL_BARRED_STATE:%d,%d\n",
+ OAMrm_RA_CELL_BARRED_STATE,
+ ((T_CNI_RIL3_CELL_BARRED_ACCESS)(grr_OamData.btsOptionsPackage.cellBarred))
+ );
+ //0:not barred
+printf("OAMrm_ATT_STATE:%d,%d\n",
+ OAMrm_ATT_STATE,
+ ((T_CNI_RIL3_ATT)(grr_OamData.btsOptionsPackage.allowIMSIAttachDetach))
+ );
+ //1:ie CNI_RIL3_ATT_IMSI_ATACH_DETACH_ALLOWED,oam_att
+printf("OAMrm_RA_REST_ALLOWED_STATE:%d,%d\n",
+ OAMrm_RA_REST_ALLOWED_STATE,
+ ((T_CNI_RIL3_REESTABLISHMENT_ALLOWED)
+ (grr_OamData.btsOptionsPackage.callReestablishmentAllowed))
+ );
+ //1:not allowed
+printf("OAMrm_RA_EC_ALLOWED_STATE:%d,%d\n",
+ OAMrm_RA_EC_ALLOWED_STATE,
+ ((T_CNI_RIL3_EMERGENCY_CALL_ALLOWED)
+ (grr_OamData.btsOptionsPackage.emergencyCallRestricted))
+ );
+ //1:only allowed to special class mobiles
+for (i=0;i<16;i++)
+printf("OAMrm_RA_AC_ALLOWED_STATE(%d):%d,%d\n",
+ i,
+ OAMrm_RA_AC_ALLOWED_STATE(i),
+ ((unsigned char)(((NotAllowedAccessClassEntry*)
+ (grr_OamData.btsOptionsPackage.notAllowedAccessClassTable))[i].notAllowedAccessClass))
+ );
+ //1:barred
+for (i=0;i<8;i++)
+printf("OAMrm_NCC_PERMITTED(%d):%d,%d\n",
+ i,
+ OAMrm_NCC_PERMITTED(i),
+ (((PlmnPermittedEntry*)(grr_OamData.btsBasicPackage.plmnPermittedTable))[i].
+ plmnPermitted)
+ );
+ //1 for X=5, 0 for other X values, X:0-7
+printf("OAMrm_CELLID:%x,%x\n",
+ OAMrm_CELLID,
+ ((unsigned int)(grr_OamData.btsBasicPackage.btsID))
+ );
+ //0x0001: hi-byte network ID, lo-byte cell ID
+
+printf("OAMrm_RADIO_LINK_TIMEOUT:%d,%d\n",
+ OAMrm_RADIO_LINK_TIMEOUT,
+ ((unsigned char)(grr_OamData.btsBasicPackage.radioLinkTimeout))
+ );
+ //3: ie 16
+printf("OAMrm_MS_UPLINK_DTX_STATE:%d,%d\n",
+ OAMrm_MS_UPLINK_DTX_STATE,
+ ((T_CNI_RIL3_DTX_BCCH)(grr_OamData.btsOptionsPackage.dtxUplink))
+ );
+
+printf("OAMrm_MS_DNLINK_DTX_STATE:%d,%d\n",
+ OAMrm_MS_DNLINK_DTX_STATE,
+ ((int)(grr_OamData.btsOptionsPackage.dtxDownlink))
+ );
+
+ //2:uplink DTX not allowed for MS
+printf("OAMrm_CELL_RESEL_HYSTERESIS:%d,%d\n",
+ OAMrm_CELL_RESEL_HYSTERESIS,
+ ((unsigned char)(grr_OamData.btsBasicPackage.cellReselectHysteresis))
+ );
+ //2:4 dBm
+
+printf("OAMrm_NCELL_NETWORKID(0):%d, %d\n",
+ OAMrm_NCELL_NETWORKID(0),
+ ((short)((((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[0].adjCell_handoverCellID))>>16)
+ );
+ //2 for X=0, 3 for X=1, 0xFFFFFFFF for other X values, X:0-31
+printf("OAMrm_NCELL_CELLID(1):%d,%d\n",
+ OAMrm_NCELL_CELLID(1),
+ ((short)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[1].adjCell_handoverCellID))
+ );
+ //2 for X=0, 3 for X=1, 0xFFFFFFFF for other X values, X:0-31
+printf("OAMrm_NCELL_CELLID(2):%d,%d\n",
+ OAMrm_NCELL_CELLID(2),
+ ((short)(((AdjCell_HandoverEntry*)
+ (grr_OamData.adjacentCellPackage_t.adjCell_handoverTable))[2].adjCell_handoverCellID))
+ );
+ //2 for X=0, 3 for X=1, 0xFFFFFFFF for other X values, X:0-31
+
+
+//Bts Admin and Op States
+printf ("BTS AM & OP STATE: am(%d, %d) op(%d, %d)\n",
+ OAMrm_BTS_AMSTATE,
+ grr_OamData.btsBasicPackage.bts_administrativeState,
+ OAMrm_BTS_OPSTATE,
+ grr_OamData.btsBasicPackage.bts_operationalState);
+
+//First TRX Admin and Op States
+printf ("First TRX AM & OP STATE: am(%d, %d) op(%d, %d)\n",
+ OAMrm_TRX_AMSTATE(0),
+ grr_OamData.transceiverPackage[0].basebandAdministrativeState,
+ OAMrm_TRX_OPSTATE(0),
+ grr_OamData.transceiverPackage[0].basebandOperationalState);
+
+for (i=0;i<8;i++)
+{
+printf ("First TRX TS(%d) AM & OP STATE: am(%d, %d) op(%d, %d)\n",
+ i,
+ OAMrm_CHN_AMSTATE(0,i),
+ ((ChannelEntry*)
+ (grr_OamData.transceiverPackage[0].channelTable))[i].channelAdministrativeState,
+ OAMrm_CHN_OPSTATE(0,i),
+ ((EnableDisable)(((ChannelEntry*)
+ (grr_OamData.transceiverPackage[0].channelTable))[i].channelOperationalState)) );
+}
+
+//Second TRX Admin and Op States
+printf ("Second TRX AM & OP STATE: am(%d, %d) op(%d, %d)\n",
+ OAMrm_TRX_AMSTATE(1),
+ grr_OamData.transceiverPackage[1].basebandAdministrativeState,
+ OAMrm_TRX_OPSTATE(1),
+ grr_OamData.transceiverPackage[1].basebandOperationalState);
+
+for (i=0;i<8;i++)
+{
+printf ("Second TRX TS(%d) AM & OP STATE: am(%d, %d) op(%d, %d)\n",
+ i,
+ OAMrm_CHN_AMSTATE(1,i),
+ ((ChannelEntry*)
+ (grr_OamData.transceiverPackage[1].channelTable))[i].channelAdministrativeState,
+ OAMrm_CHN_OPSTATE(1,i),
+ ((EnableDisable)(((ChannelEntry*)
+ (grr_OamData.transceiverPackage[1].channelTable))[i].channelOperationalState)) );
+}
+
+printf("Overload Cell Ctrl=%d, MIB Barred Setting=%d, Current Barred Control status=%d\n",
+ OAMrm_OVERLOAD_CELLBAR,
+ OAMrm_RA_CELL_BARRED_STATE, rm_VcIsBarred);
+
+}
+
+void intg_SetOverloadCellbarOption(int option)
+{
+ printf("Current Overload Cellbar Option Setting: %d\n", OAMrm_OVERLOAD_CELLBAR);
+ OAMrm_OVERLOAD_CELLBAR = option;
+ printf("New Overload Cellbar Option Setting: %d\n", OAMrm_OVERLOAD_CELLBAR);
+
+ rm_VcIsBarred = RM_FALSE;
+ rm_SendSystemInfo2ToBcchTrx(0,2,OAMrm_RA_CELL_BARRED_STATE);
+ rm_SendSystemInfo3ToBcchTrx(0,3,OAMrm_RA_CELL_BARRED_STATE);
+ rm_SendSystemInfo4ToBcchTrx(0,4,OAMrm_RA_CELL_BARRED_STATE);
+}
+
+#endif /*__RM_TESTPRINTOAMRMSTDGSMDATA_CPP__*/
diff --git a/data/mnet/GP10/Host/rm/Src/rm_TimerExpired.cpp b/data/mnet/GP10/Host/rm/Src/rm_TimerExpired.cpp
new file mode 100644
index 0000000..4595f1e
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_TimerExpired.cpp
@@ -0,0 +1,41 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_TIMEREXPIRED_CPP__
+#define __RM_TIMEREXPIRED_CPP__
+
+#include "rm\rm_head.h"
+
+int rm_TimerExpired( int param)
+{
+ STATUS ret;
+
+ /*
+ ** "param" is of four bytes which stores the entryId of a SM. When
+ ** a timer expires, the "param" is used to distinguish from ons SM
+ ** another.
+ */
+
+ rm_ItcRxRmMsg_t timerMsg;
+
+ timerMsg.module_id = MODULE_RM;
+ timerMsg.primitive_type = RM_TIMER_IND;
+ timerMsg.entry_id = (u8)( (param>>8) & 0x000000FF );
+ timerMsg.timerId = (u8)( param & 0x000000FF );
+
+ /* Send a Timer Expiry Indication to RM inbound message queue */
+ ret = msgQSend( rm_MsgQId, (s8 *) &timerMsg, RM_MAX_TXQMSG_LENGTH,
+ NO_WAIT, MSG_PRI_NORMAL );
+
+ if (ret == ERROR)
+ EDEBUG__(("ERROR-rm_TimerExpired: msgQSend errno:%d\n", errno));
+
+ return 0;
+}
+
+#endif /* __RM_TIMEREXPIRED_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_UmMmMsgTestPrint.cpp b/data/mnet/GP10/Host/rm/Src/rm_UmMmMsgTestPrint.cpp
new file mode 100644
index 0000000..5edb2de
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_UmMmMsgTestPrint.cpp
@@ -0,0 +1,64 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_UMMMMSGTESTPRINT_CPP__
+#define __RM_UMMMMSGTESTPRINT_CPP__
+
+#include "rm\rm_head.h"
+
+#include "ril3\ie_location_area_id.h"
+#include "ril3\ie_classmark_1.h"
+#include "ril3\ie_mobile_id.h"
+#include "ril3\ril3_mm_msg.h"
+
+void rm_UmMmMsgTestPrint( T_CNI_RIL3MM_MSG *pMsg )
+{
+ T_CNI_RIL3MM_MSG_LOCATION_UPDATE_REQUEST *pLUP;
+
+ switch (pMsg->header.message_type)
+ {
+ case CNI_RIL3MM_MSGID_LOCATION_UPDATING_REQUEST:
+ pLUP = (T_CNI_RIL3MM_MSG_LOCATION_UPDATE_REQUEST*)
+ &(pMsg->locationUpdateRequest);
+
+ /* Output the received LUP message */
+ PDEBUG__(("LUP===========: PD=%d,MT=%\n",
+ pLUP->header.protocol_descriminator,
+ pLUP->header.message_type
+ ));
+ PDEBUG__(("LUP:Type IE: present=%d,forBit=%d,type=%d\n",
+ pLUP->locationUpdateType.ie_present,
+ pLUP->locationUpdateType.forBit,
+ pLUP->locationUpdateType.locationUpdateType
+ ));
+ PDEBUG__(("LUP:CipherKey IE: present=%d,keySeq=%d\n",
+ pLUP->cipherKey.ie_present,
+ pLUP->cipherKey.keySeq
+ ));
+ PDEBUG__(("LUP:LAI IE---------------------------\n"));
+ TDUMP__((MAREA__,(u8*) &(pLUP->locationId),(u16)
+ sizeof(T_CNI_RIL3_IE_LOCATION_AREA_ID) ));
+ PDEBUG__(("LUP:Classmark1 IE: present=%d,revLevel=%d,esInd=%d,a51=%d,rfPowerCap=%d\n",
+ pLUP->classmark1.ie_present,
+ pLUP->classmark1.revLevel,
+ pLUP->classmark1.a51,
+ pLUP->classmark1.rfPowerCap
+ ));
+ PDEBUG__(("LUP:MobileID IE---------------------------\n"));
+ TDUMP__((MAREA__,(u8*) &(pLUP->mobileId),(u16)
+ sizeof(T_CNI_RIL3_IE_MOBILE_ID) ));
+ break;
+
+ default:
+ PDEBUG__(("rm_UmMmMsgTestPrint: unsupport msgtype=%d\n",
+ pMsg->header.message_type));
+ break;
+ }
+}
+
+#endif /* __RM_UMMMMSGTESTPRINT_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_WaitForL1Bootstrap.cpp b/data/mnet/GP10/Host/rm/Src/rm_WaitForL1Bootstrap.cpp
new file mode 100644
index 0000000..76623ee
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_WaitForL1Bootstrap.cpp
@@ -0,0 +1,38 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_WAITFORL1BOOTSTRAP_CPP__
+#define __RM_WAITFORL1BOOTSTRAP_CPP__
+
+#include "rm\rm_head.h"
+
+
+void rm_WaitForL1Bootstrap(void)
+{
+ /* Monitoring entrance to a function */
+ RDEBUG__(( "ENTER-rm_WaitForL1Bootstrap: Entering...\n" ));
+
+ /* Wait until all configured TRXs bootstraped */
+ rm_BootstrapCnf = 0;
+
+ while ( rm_BootstrapCnf != OAMrm_TRX_ONOFF_MAP )
+ {
+ /* Read until get the expected message from L1 */
+ rm_WaitForL1Rsp( RM_L1TRX_NULL, RM_L1MG_TRXMGMT,
+ RM_L1MT_BOOTSTRAPCNF_MSB, RM_L1MT_BOOTSTRAPCNF_LSB );
+
+ /* Received a TRX bootstrap confirmation */
+ rm_BootstrapCnf |= RM_BOOTSTRAPCNF(rm_pItcRxL1Msg->l3_data.buffer[3]);
+
+ RDEBUG__(("TRACE:rm_WaitForL1Bootstrap: got bootstrap cnf from trx:%d\n",
+ rm_pItcRxL1Msg->l3_data.buffer[3]));
+ } /* End of while() */
+
+} /* End of rm_WaitForL1Bootstrap() */
+
+#endif /* __RM_WAITFORL1BOOTSTRAP_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_WaitForL1Rsp.cpp b/data/mnet/GP10/Host/rm/Src/rm_WaitForL1Rsp.cpp
new file mode 100644
index 0000000..a725ef1
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_WaitForL1Rsp.cpp
@@ -0,0 +1,76 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_WAITFORL1RSP_CPP__
+#define __RM_WAITFORL1RSP_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_WaitForL1Rsp(u8 trx, u8 msgGroup, u8 msgTypeMSB, u8 msgTypeLSB)
+{
+ s16 ret; /* Return code from calling a underlying fun */
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_WaitForL1Rsp\n"));
+
+ /* Expected response to the message */
+ TDEBUG__(("TRACE-rm_WaitForL1Rsp:Expected msg:TRX=%x,MG=%x,MT_Hi=%x,MT_Lo=%x\n",
+ trx, msgGroup, msgTypeMSB, msgTypeLSB));
+
+ /* TBD: Wait forever unless got the expected rsp */
+
+ while (1)
+ {
+ ret = rm_msgQReceive(rm_MsgQId,(s8 *)&rm_ItcRxMsg,
+ RM_MAX_RXQMSG_LEN, WAIT_FOREVER );
+ if ( ret==ERROR )
+ {
+ /* Error in reading VxWorks message queue */
+ EDEBUG__(("ERROR-rm_WaitForL1Rsp: VxWorks Queue read error:%d\n",
+ errno ));
+ }
+ else if ( rm_ItcRxMsg.module_id == MODULE_L1 )
+ {
+ rm_pItcRxL1Msg = (rm_ItcRxL1Msg_t *) &rm_ItcRxMsg;
+
+ /* Got a message from L1. Check if it's expected response */
+ if ( rm_pItcRxL1Msg->l3_data.msgLength >= RM_L1MIN_MSG_LEN &&
+ rm_pItcRxL1Msg->l3_data.buffer[0] == msgGroup )
+ {
+ if ( (rm_pItcRxL1Msg->l3_data.buffer[1]==msgTypeMSB &&
+ rm_pItcRxL1Msg->l3_data.buffer[2]==msgTypeLSB ) ||
+ (msgTypeMSB==RM_L1MT_NULL_MSB &&
+ msgTypeLSB==RM_L1MT_NULL_LSB ) )
+ {
+ if ( trx==RM_L1TRX_NULL ||
+ rm_pItcRxL1Msg->l3_data.buffer[3]==trx )
+
+ /* Got the expected response! */
+ return;
+ }
+ }
+ else
+ {
+ /*=TBD=*/
+ /* Received unexpected stuff from L1. Try next read */
+ UDEBUG__(("UNKNOWN-rm_WaitForL1Rsp: got unexpected L1-msg while awaiting rsp\n" ));
+ UDUMP__((MAREA__,(u8*)&rm_ItcRxMsg, sizeof(rm_ItcRxMsg_t) ));
+ }
+ }
+ else
+ {
+ /* Received messages from non-L1 origin. Try next read */
+ UDEBUG__(("UNKNOWN-rm_WaitForL1Rsp: got a non-L1 msg while waiting for a rsp\n" ));
+ UDUMP__((MAREA__, (u8*)&rm_ItcRxMsg, sizeof(rm_ItcRxMsg_t) ));
+ }
+
+ } /* End of while() */
+
+} /* End of rm_WaitForL1Rsp() */
+
+#endif /* __RM_WAITFORL1RSP_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_WaitForSlotActivateRsp.cpp b/data/mnet/GP10/Host/rm/Src/rm_WaitForSlotActivateRsp.cpp
new file mode 100644
index 0000000..dd82680
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_WaitForSlotActivateRsp.cpp
@@ -0,0 +1,71 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_WAITFORSLOTACTIVATERSP_CPP__
+#define __RM_WAITFORSLOTACTIVATERSP_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_WaitForSlotActivateRsp(u8 trx, u8 slot)
+{
+ u8 gotRsp; /* If the rsp is for the expected slot */
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_WaitForSlotActivateRsp: Entering...\n" ));
+
+ gotRsp = RM_FALSE;
+
+ while ( !gotRsp )
+ {
+ /* Read until get a TRX-Management group msg from trx */
+ rm_WaitForL1Rsp(trx, RM_L1MG_TRXMGMT,RM_L1MT_NULL_MSB,RM_L1MT_NULL_LSB);
+
+ /*
+ ** Make sure if the rsp is for SlotActivate sent earlier
+ ** Received response is stored in rm_RxMsgBuf. Caller is
+ ** to make sure bit 8-5 (5 MSB bits) of slot is 0
+ */
+
+ if ( (rm_pItcRxL1Msg->l3_data.buffer[4]&RM_U8_0X07) == slot)
+ {
+
+ /* Now further check if rsp is for SlotActivate sent earlier */
+ if ( rm_pItcRxL1Msg->l3_data.buffer[1]==RM_L1MT_SLOTACTIVACK_MSB &&
+ rm_pItcRxL1Msg->l3_data.buffer[2]==RM_L1MT_SLOTACTIVACK_LSB )
+ {
+ /* Yes, it's rsp wanted and also positive one */
+ gotRsp = RM_TRUE;
+ TDEBUG__(("TRACE-rm_WaitForSlotActivateRsp: got an ACK for %d\n",slot));
+ }
+ else if ( rm_pItcRxL1Msg->l3_data.buffer[1]==RM_L1MT_SLOTACTIVNACK_MSB &&
+ rm_pItcRxL1Msg->l3_data.buffer[2]==RM_L1MT_SLOTACTIVNACK_LSB )
+ {
+ /* Got a negative ack, dump message out, then hanging up */
+ EDEBUG__(("ERROR-rm_WaitForSlotActivateRsp: got a NAK for TRX:%d,SLOT:%d\n",
+ trx,slot));
+ EDUMP__((MAREA__,(u8 *)&rm_ItcRxMsg,sizeof(rm_ItcRxMsg_t) ));
+ /*
+ ** TBD: Hangup here. This may only work for PreAlpha release
+ */
+ while(1);
+ } else
+ /* Got an unexpected message */
+ UDEBUG__(("UNKNOWN-rm_WaitForSlotActivateRsp:got non-related message!\n"));
+
+ }
+ else
+ {
+ UDEBUG__(("UNKNOWN-rm_WaitForSlotActivateRsp:got got a message from wrong slot:%d\n",
+ slot ));
+ } /* End of if-statement */
+
+ } /* End of while (!gotRsp) */
+
+} /* End of rm_WaitForSlotActivateRsp() */
+
+#endif /* __RM_WAITFORSLOTACTIVATERSP_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_despatch.cpp b/data/mnet/GP10/Host/rm/Src/rm_despatch.cpp
new file mode 100644
index 0000000..6c8b800
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_despatch.cpp
@@ -0,0 +1,124 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_DESPATCH_CPP__
+#define __RM_DESPATCH_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_Despatch( void )
+{
+ //Monitor entrance to this func
+ RDEBUG__(("ENTER-rm_Despatch\n"));
+
+ //Check if watchdog timer expired
+ //if (rm_ItcRxOrigin==MODULE_OAM && rm_pItcRxRmMsg->timerId==RM_TWDOG)
+ //{ //Watchdog expired, entryId=trx
+ // rm_ProcTrxWDogExp(rm_ItcRxEntryId);
+ // return;
+ //}
+
+ //BTS not in service now
+ //if ( !OAMrm_BTS_OPSTATE )
+ // {
+ // IDEBUG__(("INFO@rm_Despatch:Bts is not in service right now\n"));
+ // return;
+ //}
+
+ //Go by msg primitive
+ switch ( rm_ItcRxPrim )
+ {
+ case RRm_EST_REQ:case RRg_EST_REQ:
+ if (!OAMrm_TRX_OPSTATE(0)) //Assume trx0 always the bcchTrx here
+ { //bcch trx not in service now, this should already filter out
+ IDEBUG__(("WARNING@rm_Despatch: TRX 1 not operating now!\n"));
+ return;
+ }
+ rm_RrEstReq();
+ break;
+
+ case DLm_RA_IND:
+ if (!OAMrm_TRX_OPSTATE(0)) //Assume trx0 always the bcchTrx here
+ {
+ //bcch trx not in service now, this should already filter out
+ IDEBUG__(("WARNING@rm_Despatch: TRX 1 not operating now!\n"));
+ return;
+ }
+ rm_DlRaInd();
+ break;
+
+ default:
+ //Despatch message to a proper SM action
+ if ( rm_ItcRxEntryId != CNI_IRT_NULL_ID )
+ {
+ rm_pSmCtxt=&rm_SmCtxt[rm_ItcRxEntryId];
+
+ //Check if trx is operating
+ if (!OAMrm_TRX_OPSTATE(rm_pSmCtxt->pPhyChan->trxNumber))
+ {
+ //trx not in service now
+ IDEBUG__(("WARNING@rm_Despatch: trx%d not in service\n",
+ rm_pSmCtxt->pPhyChan->trxNumber));
+ return;
+ }
+
+ if ( (rm_pSmCtxt == RM_SMCTXT_NULL) ||
+ (rm_pSmCtxt->smType != RM_MAIN_SM) )
+ {
+ //RM doesnt handle any message assoc with SACCH any more
+ IDEBUG__(("WARNING@rm_Despatch: recv msg not for mSM (smType %d, pSmCtxt %p)\n",
+ rm_pSmCtxt->smType, rm_pSmCtxt));
+ return;
+ }
+
+ //Act accordingly in terms of SM state
+ if ( (MODULE_MD==rm_ItcRxOrigin) &&
+ (rm_pItcRxMdMsg->primitive_type==MDL_ERR_RPT))
+ {
+ //rm_MdlErrRptCauseRel();
+ rm_ProcRrRelease(CNI_RIL3_CAUSE_DESTINATION_OUT_OF_ORDER);
+ }
+ else if ( (MODULE_L1==rm_ItcRxOrigin) &&
+ (rm_pItcRxL1Msg->l3_data.buffer[0]==RM_L1MG_DEDMGMT) &&
+ (rm_pItcRxL1Msg->l3_data.buffer[1]==RM_L1MT_RSL_MSB) &&
+ (rm_pItcRxL1Msg->l3_data.buffer[2]==RM_L1MT_RSL_LSB) )
+ {
+ //rm_RslRelease();
+ rm_ProcRrRelease(CNI_RIL3_CAUSE_DESTINATION_OUT_OF_ORDER);
+
+ //PMADDED:nbrOfLostRadioLinksTCH,nbrOfLostRadioLinksSDCCH
+ if (rm_pSmCtxt->pPhyChan->chanBusy)
+ {
+ if (rm_pSmCtxt->pPhyChan->chanType==RM_PHYCHAN_TCHF_S)
+ PM_CellMeasurement.nbrOfLostRadioLinksTCH.increment();
+ else if (rm_pSmCtxt->pPhyChan->chanType==RM_PHYCHAN_SDCCH4)
+ PM_CellMeasurement.nbrOfLostRadioLinksSDCCH.increment();
+ else
+ EDEBUG__(("ERROR@rm_despatch:chanType=%d\n",
+ rm_pSmCtxt->pPhyChan->chanType));
+ }
+ } else if ( (MODULE_MM==rm_ItcRxOrigin) &&
+ (rm_pItcRxMmMsg->primitive_type== RR_REL_REQ) )
+ {
+ rm_ProcRrRelease(CNI_RIL3_CAUSE_NORMAL_CALL_CLEARING);
+ }
+ else
+ (*rm_SmAction[rm_pSmCtxt->state])();
+ }
+ else
+ IDEBUG__(("ERROR@rm_Despatch: null entry Id encountered (module %d, prim %d)\n",
+ (u8)(rm_ItcRxPrim>>8), (u8)(rm_ItcRxPrim)));
+
+ break;
+
+ } //switch()
+
+} //rm_Despatch()
+
+#endif //__RM_DESPATCH_CPP__
+
diff --git a/data/mnet/GP10/Host/rm/Src/rm_glob.cpp b/data/mnet/GP10/Host/rm/Src/rm_glob.cpp
new file mode 100644
index 0000000..98698eb
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_glob.cpp
@@ -0,0 +1,98 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_GLOB_CPP__
+#define __RM_GLOB_CPP__
+
+#include "rm\rm_head.h"
+
+char __DEBUGVAR__;
+char __RDEBUG__ =1;
+char __EDEBUG__ =1;
+char __DDEBUG__ =1;
+char __UDEBUG__ =0;
+char __PDEBUG__ =1;
+char __TDEBUG__ =0;
+char __BDUMP__ =0;
+char __EDUMP__ =0;
+char __TDUMP__ =0;
+char __UDUMP__ =0;
+
+rm_UmSI2_t rm_UmSI2;
+rm_UmSI3_t rm_UmSI3;
+rm_UmSI4_t rm_UmSI4;
+rm_UmSI5_t rm_UmSI5;
+rm_UmSI6_t rm_UmSI6;
+
+
+rm_UmMsg_t rm_UmMsg;
+rm_SmCtxt_t *rm_pSmCtxt;
+
+T_CNI_IRT_ID rm_RachEntryId;
+//T_CNI_L3_ID rm_id, cc_id;
+
+rm_SmAction_t * rm_SmAction []=
+{
+ rm_S0Null, /* S0: TBD */
+ rm_S1RmRunning, /* S1: TBD */
+ rm_S2ActivatingSigTrafficChan, /* S2 */
+ rm_S3SigChanActivated, /* S3 */
+ rm_S4TrafficChanActivated, /* S4 */
+ rm_S5SigModeEstablished, /* S5 */
+ rm_S6ActivatingTrafficMode, /* S6 */
+ rm_S7ReleasingSigTrafficChan, /* S7 */
+ rm_S8TrafficModeActivated, /* S8 */
+ rm_S9DeactivatingSigTrafficChan, /* S9 */
+ rm_S10TrafficModeEstablished, /* S10 */
+ rm_S11TrafficChanSuspending /* S11 */
+};
+
+u8 rm_ItcRxOrigin;
+rm_IrtEntryId_t rm_ItcRxEntryId;
+u8 rm_BootstrapCnf;
+u16 rm_ItcRxPrim;
+
+int rm_ItcRxPrimType;
+int rm_ItcRxMsgType;
+
+u8 rm_AgchGroup[]={0,1,2,3,4,5,6,7,8};
+rm_ItcRxMsg_t rm_ItcRxMsg;
+rm_SmscbcMsg_t rm_SmscbcMsg;
+
+//MSG_Q_ID rm_MsgQId; /* TBD: used in sys_init.cpp*/
+rm_ItcRxMdMsg_t *rm_pItcRxMdMsg;
+rm_ItcRxL1Msg_t *rm_pItcRxL1Msg;
+rm_ItcRxMmMsg_t *rm_pItcRxMmMsg;
+rm_ItcRxBgMsg_t *rm_pItcRxBgMsg;
+rm_ItcRxCcMsg_t *rm_pItcRxCcMsg;
+rm_ItcRxRmMsg_t *rm_pItcRxRmMsg;
+rm_ItcRxOamMsg_t *rm_pItcRxOamMsg;
+rm_ItcRxVbMsg_t *rm_pItcRxVbMsg;
+rm_PhyChanBCcch_t rm_PhyChanBCcch;
+
+//rm_PhyChanTchf_t rm_PhyChanTchf; //Move to rm_init
+//rm_PhyChanSdcch4_t rm_PhyChanSdcch4; //Move to rm_init
+
+//The following has been moved to src_init
+//rm_SmCtxts_t rm_SmCtxt;
+//rm_IrtEntryId_t rm_TchfEntryId[15]; //TBD:RM_L1MAX_TCHFS];
+//rm_IrtEntryId_t rm_Sdcch4EntryId[4]; //TBDRM_L1MAX_SDCCH4S];
+
+
+//PR 1323 SMSCBC Added
+rm_PhyChanDesc_t *rm_pCbchChan;
+u8 rm_ChanCbchActive;
+msg_TableHdr_t rm_CbMsgTable;
+
+//GP2
+//
+int rm_CbchOpState;
+int rm_DbgDump=1;
+rm_ItcRxGrrMsg_t *rm_pItcRxGrrMsg;
+
+#endif /* __RM_GLOB_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_initL1.cpp b/data/mnet/GP10/Host/rm/Src/rm_initL1.cpp
new file mode 100644
index 0000000..6b5a7cf
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_initL1.cpp
@@ -0,0 +1,121 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_INITL1_CPP__
+#define __RM_INITL1_CPP__
+
+//GP2
+#if 0
+
+#include "rm\rm_head.h"
+
+void rm_InitL1(void)
+{
+ u8 isBcchTrx; /* The TRX carrying BCCH chan. */
+ u8 i; /* Loop-control and trx number */
+
+ /* Monitoring entrance to a function */
+ RDEBUG__(("ENTER-rm_InitL1\n" ));
+
+ /*=TBD=*/
+ /*
+ ** The whole L1 configuration is done in four steps:
+ ** =================================================
+ ** Step 1:Configures each individual TRX as per the command sequence
+ ** Step 2:Passes SYNCHRONIZATION INFORMATION message to the BCCH TRX
+ ** Step 3:Passes all required SYSTEM INFORMATION messages toTRX/BCCH
+ ** Step 4:Passes SACCH FILLING message to each individual TRX in use
+
+ **
+ ** Configuration of an individual TRX is achieved by sending L1 the
+ ** following DSP-command sequence:
+ ** ===============================
+ ** (1)TRX CONFIGURE (2)SLOT ACTIVATE (3)SET UPLINK GAIN
+ ** (4)SET DOWNLINK GAIN (5)TUNE SYNTHESIZER (6)CONFIGURE FPGA DELAY
+ **
+ */
+
+ /* Step 1: One by one configure all usable TRXs */
+ i = 0; oam_BcchTrx = RM_L1TRX_NULL;
+ while ( i < OAMrm_MAX_TRXS )
+ {
+ /* if i-th TRX present, configure it */
+ if ( (OAMrm_TRX_ONOFF_MAP)&(1<<i) )
+ {
+
+ isBcchTrx = rm_ConfigTrxSlots(i);
+
+ /* ret=TRUE means i is BcchTrx */
+ if (isBcchTrx) oam_BcchTrx = i;
+
+PDEBUG__(("TRACE-rm_InitL1: i=%d, noTrx=%d, trxMap=%d, curTrx=%d, bcchTrx=%d, i=%d\n",
+ i,OAMrm_MAX_TRXS, OAMrm_TRX_ONOFF_MAP, ( (OAMrm_TRX_ONOFF_MAP)&(1<<i) ), oam_BcchTrx,i));
+
+ }
+ i++;
+ } /* End of while() */
+
+// Comment for TEST
+// PDEBUG__(("End of rm_ConfigTrxSlots, bcchTrx=%d\n", bcchTrx));
+
+// /* Step 2: Pass SYNCHRONIZATION INFORMATION to the BCCH TRX */
+// rm_SendSynchInfoToBcchTrx(bcchTrx);
+// rm_WaitForL1Rsp(bcchTrx, RM_L1MG_TRXMGMT, RM_L1MT_SYNCHACK_MSB,
+// RM_L1MT_SYNCHACK_LSB);
+
+//PDEBUG__(("End of rm_SendSynchInfoToBcchTrx()\n"));
+
+ /* Step 3: Pass all SYSTEM INFOs to the BCCH TRX */
+ if ( oam_BcchTrx != RM_L1TRX_NULL )
+ rm_SendAllSystemInfosToBcchTrx(oam_BcchTrx);
+ else
+ EDEBUG__(("ERROR-rm_InitL1: No TRX appointed carrying BCCH\n"));
+
+PDEBUG__(("End of rm_SendAllSystemInfosToBcchTrx, oam_BcchTrx=%d\n",oam_BcchTrx));
+
+ /* Step 4: Pass SACCH filling message to all TRX */
+ i = 0;
+ while ( i < OAMrm_MAX_TRXS )
+ {
+ /* Pass SACCH FILLing to present TRX */
+ if ( (OAMrm_TRX_ONOFF_MAP)&(1<<i) )
+ {
+ rm_SendSacchFillingSI5(i, RM_L1SYSINFO_TYPE_5);
+ rm_SendSacchFillingSI6(i, RM_L1SYSINFO_TYPE_6);
+ }
+ i++;
+
+ } /* End of while() */
+
+PDEBUG__(("End of rm_SendSacchFillingSI5 and SI6\n"));
+
+/* Step 2: Pass SYNCHRONIZATION INFORMATION to the BCCH TRX */
+//rm_SendSynchInfoToBcchTrx(bcchTrx); //TBD: Send one for each TRX later
+//rm_WaitForL1Rsp(bcchTrx, RM_L1MG_TRXMGMT, RM_L1MT_SYNCHACK_MSB,
+// RM_L1MT_SYNCHACK_LSB);
+
+ i = 0;
+ while ( i < OAMrm_MAX_TRXS )
+ {
+ /* Let DSP go by sending Sync Info */
+ if ( (OAMrm_TRX_ONOFF_MAP)&(1<<i) )
+ {
+ rm_SendSynchInfoToBcchTrx(i);
+ }
+ i++;
+
+ } /* End of while() */
+
+ PDEBUG__(("End of rm_SendSynchInfoToBcchTrx()\n"));
+
+} /* End of rm_InitL1() */
+
+//GP2
+#endif //#if 0
+
+#endif /* __RM_INITL1_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_initRm.cpp b/data/mnet/GP10/Host/rm/Src/rm_initRm.cpp
new file mode 100644
index 0000000..131d1c2
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_initRm.cpp
@@ -0,0 +1,339 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_INITRM_CPP__
+#define __RM_INITRM_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_InitRm(void)
+{
+ u8 i,j,k; //Used as loop-control or for array index
+ u8 tchfIdx; //Index to TCH/F-type channel pool element
+ u8 sdcch4Idx; //Index to SDCCH/4 type chan. pool element
+ WDOG_ID timerId; //Used to store timerID ret. from wdCreate
+
+ i=j=k=0; tchfIdx=0; sdcch4Idx=0;
+
+ //Monitoring entrance to a func
+ RDEBUG__(("ENTER@rm_InitRm\n"));
+
+ //Clear control and dedicated channel pools clean first
+ RM_MEMSET( (u8 *)rm_PhyChanTchf, sizeof(rm_PhyChanTchf_t) );
+ RM_MEMSET( (u8 *)rm_PhyChanSdcch4, sizeof(rm_PhyChanSdcch4_t) );
+ RM_MEMSET( (u8 *)rm_PhyChanBCcch, sizeof(rm_PhyChanBCcch_t) );
+
+ //Initialize RM mgmt structs in terms of OAM configuration data
+ for (i=0; i<OAMrm_MAX_TRXS; i++ )
+ {
+ //Check if ith TRX is existent
+ if ( (OAMrm_TRX_ONOFF_MAP)&(1<<i) )
+ {
+ for (j = 0; j<OAMrm_SLOTS_PER_TRX; j++)
+ {
+ switch( OAMrm_TRX_SLOT_COMB(i,j) )
+ {
+ //case OAMrm_SLOT_COMB_1:
+ default:
+ //Establish TCH/F physcial channel pool
+ //G2
+ rm_PhyChanTchf[tchfIdx].usable = RM_PHYCHAN_USABLE;
+ rm_PhyChanTchf[tchfIdx].state = RM_PHYCHAN_FREE;
+ rm_PhyChanTchf[tchfIdx].chanType = RM_PHYCHAN_TCHF_S;
+ rm_PhyChanTchf[tchfIdx].subChanNumber = 0;
+ rm_PhyChanTchf[tchfIdx].trxNumber = (0x01&i);
+ rm_PhyChanTchf[tchfIdx].chanNumber = (0x08|j)<<8;
+ rm_PhyChanTchf[tchfIdx].chanNumberMSB = (0x08|j);
+ rm_PhyChanTchf[tchfIdx].chanNumberLSB = 0;
+ rm_PhyChanTchf[tchfIdx].TSC = OAMrm_BTS_TSC;
+ rm_PhyChanTchf[tchfIdx].rslCount = 0;
+
+ if ( (timerId = wdCreate()) == NULL )
+ {
+ rm_SetRmOpState(EC_RM_OS_CALL_WDCREATE_FAILED);
+ EDEBUG__(("rm_InitRm: error from calling wdCreate() for tchf T3101\n"));
+ }
+ rm_PhyChanTchf[tchfIdx].T3101.id = timerId;
+ rm_PhyChanTchf[tchfIdx].T3101.time = OAMrm_T3101;
+ rm_PhyChanTchf[tchfIdx].T3101.state = RM_FALSE;
+
+ if ( (timerId = wdCreate()) == NULL )
+ {
+ rm_SetRmOpState(EC_RM_OS_CALL_WDCREATE_FAILED);
+ EDEBUG__(("rm_InitRm: error from calling wdCreate() for tchf T3111\n"));
+ }
+ rm_PhyChanTchf[tchfIdx].T3111.id = timerId;
+ rm_PhyChanTchf[tchfIdx].T3111.time = OAMrm_T3111;
+ rm_PhyChanTchf[tchfIdx].T3111.state = RM_FALSE;
+
+ if ( (timerId = wdCreate()) == NULL )
+ {
+ rm_SetRmOpState(EC_RM_OS_CALL_WDCREATE_FAILED);
+ EDEBUG__(("rm_InitRm: error from calling wdCreate() for tchf T3109\n"));
+ }
+ rm_PhyChanTchf[tchfIdx].T3109.id = timerId;
+ rm_PhyChanTchf[tchfIdx].T3109.time = OAMrm_T3109;
+ rm_PhyChanTchf[tchfIdx].T3109.state = RM_FALSE;
+
+ //HOADDED
+ if ( (timerId = wdCreate()) == NULL )
+ {
+ rm_SetRmOpState(EC_RM_OS_CALL_WDCREATE_FAILED);
+ EDEBUG__(("rm_InitRm: error from calling wdCreate() for tchf T3105\n"));
+ }
+ rm_PhyChanTchf[tchfIdx].T3105.id = timerId;
+ rm_PhyChanTchf[tchfIdx].T3105.time = OAMrm_T3105;
+ rm_PhyChanTchf[tchfIdx].T3105.state = RM_FALSE;
+
+ if ( (timerId = wdCreate()) == NULL )
+ {
+ rm_SetRmOpState(EC_RM_OS_CALL_WDCREATE_FAILED);
+ EDEBUG__(("rm_InitRm: error from calling wdCreate() for tchf T3L01\n"));
+ }
+ rm_PhyChanTchf[tchfIdx].T3L01.id = timerId;
+ rm_PhyChanTchf[tchfIdx].T3L01.time = OAMrm_T3L01;
+ rm_PhyChanTchf[tchfIdx].T3L01.state = RM_FALSE;
+
+ if ( (timerId = wdCreate()) == NULL )
+ {
+ rm_SetRmOpState(EC_RM_OS_CALL_WDCREATE_FAILED);
+ EDEBUG__(("rm_InitRm: error from calling wdCreate() for tchf T3L02\n"));
+ }
+ rm_PhyChanTchf[tchfIdx].T3L02.id = timerId;
+ rm_PhyChanTchf[tchfIdx].T3L02.time = OAMrm_T3L02;
+ rm_PhyChanTchf[tchfIdx].T3L02.state = RM_FALSE;
+
+ if (tchfIdx>=OAMrm_MAX_TCHFS)
+ {
+ //Make sure no more than wanted comb1 configuration
+ rm_SetRmOpState(EC_RM_TOO_MANY_CHAN_COMB_1_DETECTED);
+ EDEBUG__(("ERROR@rm_InitRm(): tchfIdx=%d, maxAllowed=%d\n",
+ tchfIdx, OAMrm_MAX_TCHFS));
+ }
+
+ //Init PhyChanTchf's opState and amState from mib data
+
+
+ if ( OAMrm_TRX_SLOT_COMB(i,j) == OAMrm_SLOT_COMB_1 )
+ rm_PhyChanTchf[tchfIdx].amState = OAMrm_CHN_AMSTATE(i,j);
+ else
+ {
+ printf("{\nRM<-MIB: non-TCH combination used for (trx=%d, slot=%d, comb=%d)\n}\n",
+ i, j, OAMrm_TRX_SLOT_COMB(i,j));
+ rm_PhyChanTchf[tchfIdx].amState = locked;
+ }
+
+ rm_PhyChanTchf[tchfIdx].opState = OAMrm_CHN_OPSTATE(i,j);
+ rm_PhyChanTchf[tchfIdx].chanIdx = tchfIdx;
+ rm_PhyChanTchf[tchfIdx].trxNo = i;
+ rm_PhyChanTchf[tchfIdx].slotNo = j;
+
+ // DDEBUG__(("%dth TCHF T3101.id=0x%08x, T3111.id=0x%08x, T3109.id=0x%08x, T3L01.id=0x%08x\n",
+ // tchfIdx,
+ // rm_PhyChanTchf[tchfIdx].T3101.id,
+ // rm_PhyChanTchf[tchfIdx].T3111.id,
+ // rm_PhyChanTchf[tchfIdx].T3109.id,
+ // rm_PhyChanTchf[tchfIdx].T3L01.id
+ // ));
+
+ //GP2
+ if ( (rm_PhyChanTchf[tchfIdx].opState==opStateEnabled)&&
+ (rm_PhyChanTchf[tchfIdx].amState!=locked) )
+ {
+ //PM counter:nbrOfAvailableTCHs
+ rm_NoOfUsableTchf++;
+ PM_CellMeasurement.nbrOfAvailableTCHs.setValue(rm_NoOfUsableTchf);
+ }
+
+ rm_PhyChanTchf[tchfIdx++].quality = RM_PHYCHAN_QUALITY_PREALPHA;
+
+ break;
+
+ case OAMrm_SLOT_COMB_5:
+ //Come across conflict in slot combination
+ if ( sdcch4Idx > 0 )
+ EDEBUG__(("ERROR@rm_InitRm: BCCH Configuration conflict\n"));
+
+ //Establish BCCH & CCCH physical channel pools
+
+ //BCCH Channel
+ rm_PhyChanBCcch[RM_BCCH_IDX].trxNumber = (0x01&i);
+ rm_PhyChanBCcch[RM_BCCH_IDX].chanNumber = (0x80|j)<<8;
+ rm_PhyChanBCcch[RM_BCCH_IDX].chanNumberMSB = (0x80|j);
+ rm_PhyChanBCcch[RM_BCCH_IDX].chanNumberLSB = 0;
+
+ //RACH Channel
+ rm_PhyChanBCcch[RM_RACH_IDX].trxNumber = (0x01&i);
+ rm_PhyChanBCcch[RM_RACH_IDX].chanNumber = (0x88|j)<<8;
+ rm_PhyChanBCcch[RM_RACH_IDX].chanNumberMSB = (0x88|j);
+ rm_PhyChanBCcch[RM_RACH_IDX].chanNumberLSB = 0;
+
+ //PAGE Channel
+ rm_PhyChanBCcch[RM_PCH_IDX].trxNumber = (0x01&i);
+ rm_PhyChanBCcch[RM_PCH_IDX].chanNumber = (0x90|j)<<8;
+ rm_PhyChanBCcch[RM_PCH_IDX].chanNumberMSB = (0x90|j);
+ rm_PhyChanBCcch[RM_PCH_IDX].chanNumberLSB = 0;
+ rm_PhyChanBCcch[RM_PCH_IDX].amState = OAMrm_CHN_AMSTATE(i,j);
+ rm_PhyChanBCcch[RM_PCH_IDX].usable = RM_PHYCHAN_USABLE;
+ rm_PhyChanBCcch[RM_PCH_IDX].state = RM_PHYCHAN_FREE;
+
+
+ //AGCH Channel
+ rm_PhyChanBCcch[RM_AGCH_IDX].trxNumber = (0x01&i);
+ rm_PhyChanBCcch[RM_AGCH_IDX].chanNumber = (0x90|j)<<8;
+ rm_PhyChanBCcch[RM_AGCH_IDX].chanNumberMSB = (0x90|j);
+ rm_PhyChanBCcch[RM_AGCH_IDX].chanNumberLSB = 0;
+
+ //Establish SDCCH/4 physcial channel pool
+ for (k=0; k<OAMrm_MAX_SDCCH4S; k++)
+ {
+ //GP2
+ rm_PhyChanSdcch4[sdcch4Idx].usable = RM_PHYCHAN_USABLE;
+
+ rm_PhyChanSdcch4[sdcch4Idx].state = RM_PHYCHAN_FREE;
+ rm_PhyChanSdcch4[sdcch4Idx].chanType = RM_PHYCHAN_SDCCH4;
+
+ rm_PhyChanSdcch4[sdcch4Idx].subChanNumber = k;
+ rm_PhyChanSdcch4[sdcch4Idx].trxNumber = (0x01&i);
+ rm_PhyChanSdcch4[sdcch4Idx].chanNumber = ((0x20|(k<<3))|j)<<8;
+ rm_PhyChanSdcch4[sdcch4Idx].chanNumberMSB = (0x20|(k<<3))|j;
+ rm_PhyChanSdcch4[sdcch4Idx].chanNumberLSB = 0;
+ rm_PhyChanSdcch4[sdcch4Idx].TSC = OAMrm_BTS_TSC;
+ rm_PhyChanSdcch4[tchfIdx].rslCount = 0;
+
+ if ( (timerId = wdCreate()) == NULL )
+ {
+ rm_SetRmOpState(EC_RM_OS_CALL_WDCREATE_FAILED);
+ EDEBUG__(("rm_InitRm: error from calling wdCreate() for sdcch4 T3101\n"));
+ }
+ rm_PhyChanSdcch4[sdcch4Idx].T3101.id = timerId;
+ rm_PhyChanSdcch4[sdcch4Idx].T3101.time = OAMrm_T3101;
+ rm_PhyChanSdcch4[sdcch4Idx].T3101.state = RM_FALSE;
+
+ if ( (timerId = wdCreate()) == NULL )
+ {
+ rm_SetRmOpState(EC_RM_OS_CALL_WDCREATE_FAILED);
+ EDEBUG__(("rm_InitRm: error from calling wdCreate() for sdcch4 T3111\n"));
+ }
+ rm_PhyChanSdcch4[sdcch4Idx].T3111.id = timerId;
+ rm_PhyChanSdcch4[sdcch4Idx].T3111.time = OAMrm_T3111;
+ rm_PhyChanSdcch4[sdcch4Idx].T3111.state = RM_FALSE;
+
+ if ( (timerId = wdCreate()) == NULL )
+ {
+ rm_SetRmOpState(EC_RM_OS_CALL_WDCREATE_FAILED);
+ EDEBUG__(("rm_InitRm: error from calling wdCreate() for sdcch4 T3109\n"));
+ }
+ rm_PhyChanSdcch4[sdcch4Idx].T3109.id = timerId;
+ rm_PhyChanSdcch4[sdcch4Idx].T3109.time = OAMrm_T3109;
+ rm_PhyChanSdcch4[sdcch4Idx].T3109.state = RM_FALSE;
+
+ //HOADDED
+ if ( (timerId = wdCreate()) == NULL )
+ {
+ rm_SetRmOpState(EC_RM_OS_CALL_WDCREATE_FAILED);
+ EDEBUG__(("rm_InitRm: error from calling wdCreate() for sdcch4 T3105\n"));
+ }
+ rm_PhyChanSdcch4[sdcch4Idx].T3105.id = timerId;
+ rm_PhyChanSdcch4[sdcch4Idx].T3105.time = OAMrm_T3105;
+ rm_PhyChanSdcch4[sdcch4Idx].T3105.state = RM_FALSE;
+
+ if ( (timerId = wdCreate()) == NULL )
+ {
+ rm_SetRmOpState(EC_RM_OS_CALL_WDCREATE_FAILED);
+ EDEBUG__(("rm_InitRm: error from calling wdCreate() for sdcch4 T3L01\n"));
+ }
+ rm_PhyChanSdcch4[sdcch4Idx].T3L01.id = timerId;
+ rm_PhyChanSdcch4[sdcch4Idx].T3L01.time = OAMrm_T3L01;
+ rm_PhyChanSdcch4[sdcch4Idx].T3L01.state = RM_FALSE;
+
+ if ( (timerId = wdCreate()) == NULL )
+ {
+ rm_SetRmOpState(EC_RM_OS_CALL_WDCREATE_FAILED);
+ EDEBUG__(("rm_InitRm: error from calling wdCreate() for sdcch4 T3L02\n"));
+ }
+ rm_PhyChanSdcch4[sdcch4Idx].T3L02.id = timerId;
+ rm_PhyChanSdcch4[sdcch4Idx].T3L02.time = OAMrm_T3L02;
+ rm_PhyChanSdcch4[sdcch4Idx].T3L02.state = RM_FALSE;
+
+ //Make sure MIB config is proper
+ if (sdcch4Idx>=OAMrm_MAX_SDCCH4S)
+ {
+ //Something wrong in MIB configuration data
+ rm_SetRmOpState(EC_RM_TWO_CHAN_COMB_5_EXIST);
+ EDEBUG__(("ERROR@rm_InitRm(): sdcch4Idx=%d,maxAllowed=%d\n",
+ sdcch4Idx,OAMrm_MAX_SDCCH4S));
+ }
+
+ //Init PhyChanTchf's opState and amState from mib conf data
+ rm_PhyChanSdcch4[sdcch4Idx].amState = OAMrm_CHN_AMSTATE(i,j);
+ rm_PhyChanSdcch4[sdcch4Idx].opState = OAMrm_CHN_OPSTATE(i,j);
+ rm_PhyChanSdcch4[sdcch4Idx].chanIdx = sdcch4Idx;
+ rm_PhyChanSdcch4[sdcch4Idx].trxNo = i;
+ rm_PhyChanSdcch4[sdcch4Idx].slotNo = j;
+
+ // DDEBUG__(("%dth SDCCH4 T3101.id=0x%08x, T3111.id=0x%08x, T3109.id=0x%08x, T3L01.id=0x%08x\n",
+ // sdcch4Idx,
+ // rm_PhyChanSdcch4[sdcch4Idx].T3101.id,
+ // rm_PhyChanSdcch4[sdcch4Idx].T3111.id,
+ // rm_PhyChanSdcch4[sdcch4Idx].T3109.id,
+ // rm_PhyChanSdcch4[sdcch4Idx].T3L01.id
+ // ));
+
+ //GP2
+ if ( (rm_PhyChanSdcch4[sdcch4Idx].amState!=locked)&&
+ (rm_PhyChanSdcch4[sdcch4Idx].opState==opStateEnabled) )
+ {
+ //PM counter:nbrOfAvailableSDCCHs
+ if (++rm_nbrOfAvailableSDCCHs>4)
+ {
+ rm_nbrOfAvailableSDCCHs = 4;
+ printf("INFO@rm_InitRm: nbrOfAvailableSDCCHs %d\n",rm_nbrOfAvailableSDCCHs);
+ }
+ PM_CellMeasurement.nbrOfAvailableSDCCHs.setValue(rm_nbrOfAvailableSDCCHs);
+
+ }
+
+ rm_PhyChanSdcch4[sdcch4Idx++].quality = RM_PHYCHAN_QUALITY_PREALPHA;
+ }
+
+ break;
+
+ //default:
+ //Unsupported slot combination configuration
+ //GP2
+ //rm_SetRmOpState(EC_RM_CHAN_COMB_UNSUPPORTED);
+ // UDEBUG__(("UNKNOWN@rm_InitRm: unsupported slot comb:%d", OAMrm_TRX_SLOT_COMB(i,j) ));
+ // break;
+
+ } //End of switch()
+
+ } //End of for-j loop
+
+ } //End of if-statement
+
+ } //End of for-i loop
+
+ //Test setting for PreAlpha Release integration
+ //rm_PhyChanTchf[0].usable = RM_PHYCHAN_UNUSABLE;
+ //rm_PhyChanTchf[1].usable = RM_PHYCHAN_UNUSABLE;
+
+ //Output for integration test
+ //rm_InitRmTestPrint(tchfIdx,sdcch4Idx);
+
+ //PR 1323, Init rm CB msg table, SMSCBC
+ for (i=0;i<SmsCbc_TableRow_MAX;i++)
+ {
+ rm_CbMsgTable.table[i].state = 0;
+ rm_CbMsgTable.table[i].curPageInCurMsg = 1;
+ }
+ rm_CbMsgTable.curMsg = 0;
+
+} //End of rm_InitRm()
+
+#endif //__RM_INITRM_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_main.cpp b/data/mnet/GP10/Host/rm/Src/rm_main.cpp
new file mode 100644
index 0000000..22bc3cf
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_main.cpp
@@ -0,0 +1,601 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_MAIN_CPP__
+#define __RM_MAIN_CPP__
+
+#include "rm\rm_head.h"
+#include "Os\JCTask.h"
+
+void rm_VcToVbUpNotification(void);
+
+JCTask rmTaskObj("rmTask");
+
+void rm_Main( void )
+{
+ int i;
+ int result; //Result from calling a func
+ u8 trx;
+
+ //Monitoring entry to RM moule
+ //RDEBUG__(("ENTER-rm_Main()\n"));
+ RMDBG_ENTER(("ENTER@rm_Main()",RM_LAYER));
+
+ //GP2
+ // Let root task know that RM has entered its process loop.
+ //ViperTaskEnterLoop();
+ rmTaskObj.JCTaskEnterLoop();
+
+ //InitRMsef
+ rm_InitAll();
+ printf("RM finished initialization\n");
+
+ //MainLoop
+ while(RM_TRUE)
+ {
+ //Confirm RM is now staying in its main-loop
+ PDEBUG__(("RM_MAIN: staying in WHILE-LOOP\n"));
+
+ //Read a msg from queue or pend on arrival of message
+ result = rm_msgQReceive(rm_MsgQId, (s8 *)&rm_ItcRxMsg,
+ sizeof(rm_ItcRxMsg_t), WAIT_FOREVER);
+ if (result==ERROR)
+ { //Error in reading VxWork msg queue. Ignore msg!
+ rm_SetRmOpState(EC_RM_OS_CALL_MSGQRECEIVE_FAILED);
+ EDEBUG__(("ERROR@rm_Main:VxWorks Q read err:%d\n",errno));
+ goto L1;
+ }
+
+ //Good receive! Dump it if needed,result=length
+ //BDUMP__((RXMSG__, (u8 *)&rm_ItcRxMsg, result));
+
+ //Handle the message in terms of origin, apply sanitory check!
+ rm_ItcRxOrigin = rm_ItcRxMsg.module_id;
+ if (rm_ItcRxOrigin>=MNET_MAX_MODULE_IDS) //PR1512
+ {
+ IDEBUG__(("WARNING@rm_Main(): invalid moduleID=%d\n", rm_ItcRxOrigin));
+ goto L1;
+ }
+
+ switch(rm_ItcRxOrigin)
+ {
+ //GP2
+ case MODULE_GRR:
+ //Received GRR message, cast it to GRR msg struct and process it
+ rm_pItcRxGrrMsg = (rm_ItcRxGrrMsg_t *)&rm_ItcRxMsg;
+
+ //If needed output the fact RM got an OAM message for trace
+ PDEBUG__(("RM<==GRR@rm_Main: msgTyp(%d) trx(%d) slot(%d) ctrl(%d)\n",
+ rm_pItcRxGrrMsg->message_type,
+ rm_pItcRxGrrMsg->trx,
+ rm_pItcRxGrrMsg->slot,
+ rm_pItcRxGrrMsg->feat_ctrl));
+
+ rm_ProcGrrMsgs();
+
+ goto L1;
+
+ case MODULE_OAM:
+ //GP2
+ goto L1;
+
+ //Received OAM message, cast it to OAMmsg struct and process it
+ rm_pItcRxOamMsg = (rm_ItcRxOamMsg_t *)&rm_ItcRxMsg;
+ rm_OamGetTrapVars();
+
+ //If needed output the fact RM got an OAM message for trace
+ PDEBUG__(("RM<==OAM@rm_Main: msgTyp=%d,Tag=0x%x,valTyp=%d, val=%d\n",
+ rm_pItcRxOamMsg->msgType,
+ rm_pItcRxOamMsg->mibTag,
+ rm_pItcRxOamMsg->valType,
+ rm_pItcRxOamMsg->val.varVal));
+ goto L1;
+
+ case MODULE_L1:
+ //Received L1 message,cast it to L1msg struct and process
+ rm_pItcRxL1Msg=(rm_ItcRxL1Msg_t *)&rm_ItcRxMsg.itcRxMdMsg;
+
+ //If needed output the fact RM got a L1 message for trace
+ PDEBUG__(("RM<==L1@rm_Main:MSG=(%x,%x,%x),SRC(%x,%x,%x)\n",
+ rm_pItcRxL1Msg->l3_data.buffer[0],
+ rm_pItcRxL1Msg->l3_data.buffer[1],
+ rm_pItcRxL1Msg->l3_data.buffer[2],
+ rm_pItcRxL1Msg->l3_data.buffer[3],
+ rm_pItcRxL1Msg->l3_data.buffer[4],
+ rm_pItcRxL1Msg->l3_data.buffer[6]));
+
+ trx = rm_pItcRxL1Msg->l3_data.buffer[3];
+ //Apply sanitory check!
+ if (trx>=OAMrm_MAX_TRXS)
+ {
+ IDEBUG__(("WARNING@rm_Main(): invalid trx=%d\n", trx));
+ goto L1;
+ }
+
+ rm_TrxMgmt[trx].alive = RM_TRUE; //dsp still alive
+
+ //Process the message from the alive trx
+ switch(rm_pItcRxL1Msg->l3_data.buffer[0])
+ {
+ case RM_L1MG_DEDMGMT:
+ //Received message is for dedicated link mgmt
+ rm_ItcRxPrim = (rm_pItcRxL1Msg->module_id<<8) |
+ (rm_pItcRxL1Msg->primitive_type);
+ rm_ItcRxEntryId = rm_GetIrtEntryId(rm_pItcRxL1Msg);
+ if (rm_ItcRxEntryId==CNI_IRT_NULL_ID)
+ {
+ //the received message not linked to a valid entry ID
+ //Check if it's RTS for PAGCH
+ if (rm_pItcRxL1Msg->l3_data.buffer[4]!=0x90)
+ {
+ rm_SetRmOpState(EC_RM_RECV_CORRUPTED_DSP_MSG);
+ IDEBUG__(("WARNING@rm_Main: Null entry ID for L1 msg\n"));
+ }
+ goto L1;
+ }
+ rm_ItcRxPrimType = rm_pItcRxL1Msg->l3_data.buffer[0]; //MD
+ rm_ItcRxMsgType = (u32)( (rm_pItcRxL1Msg->l3_data.buffer[1]<<8) |
+ rm_pItcRxL1Msg->l3_data.buffer[2] );
+ break;
+
+ case RM_L1MG_TRXMGMT:
+ //GP2
+ goto L1;
+
+ //Received message is for trx management
+
+ //Got PONG message for keep-alive watching
+ if (RM_L1MSGCMP(RM_L1MG_TRXMGMT,RM_L1MT_PINGACK_MSB,
+ RM_L1MT_PINGACK_LSB))
+ {
+ //Make sure DSP is still ticking now
+ rm_MakeSureDspIsTicking();
+ goto L1;
+ }
+
+ //Message for other TRX managment purpose
+ if (rm_LiveSglCfg)
+ {
+ //period of VC reboot
+ rm_ProcTrxMgmtMsg(trx);
+
+ //Check if configuration finished or not
+ for (i=0;i<OAMrm_MAX_TRXS;i++)
+ {
+ if ( ((OAMrm_TRX_ONOFF_MAP)&(1<<i)) && (!rm_TrxMgmt[i].done) )
+ break;
+ }
+
+ if (i>=OAMrm_MAX_TRXS)
+ {
+ //Done with initialization of DSPs, decide on/off RF
+ rm_TurnOnRadioIfNeeded();
+
+ //Block OnTheFly config
+ rm_LiveSglCfg = RM_FALSE;
+
+ //Activate CBCHchannel
+ rm_ChanCbchActive=RM_FALSE;
+ if ( OAMrm_CBCH_OPSTATE )
+ {
+ if (rm_pCbchChan->usable != RM_PHYCHAN_USABLE )
+ {
+ //SDCCH4 ie CBCH is not usable
+ rm_SetRmOpState(EC_RM_CBCH_UNUSABLE);
+ IDEBUG__(("WARNING@rm_Main:no tchf available\n"));
+ } else
+ {
+ rm_pCbchChan->usable = RM_PHYCHAN_CBCH_USABLE;
+ rm_ActivateCbchChan();
+ }
+ }
+ rm_SetRmOpState(EC_NOERROR);
+ PDEBUG__(("INFO@rm_Main:RM INIT DONE!!!\n"));
+ //add VCup notification to VB,SMSCBC, 6/29
+ rm_VcToVbUpNotification();
+ }
+ }
+ //else
+ //Add logic here for on-the-fly configuration in the future
+ goto L1;
+
+ default:
+ //Received unexpected L1 message
+ PDEBUG__(("INFO@rm_Main: unexpected L11 msg md=%x\n",
+ rm_pItcRxL1Msg->l3_data.buffer[0]));
+ goto L1;
+ } // inner switch()
+ break;
+
+ case MODULE_RM:
+ //Received RM message,cast it to RMmsg struct and process
+ rm_pItcRxRmMsg=(rm_ItcRxRmMsg_t *)&rm_ItcRxMsg.itcRxRmMsg;
+ rm_ItcRxPrim =(rm_pItcRxRmMsg->module_id<<8 ) |
+ (rm_pItcRxRmMsg->primitive_type ) ;
+
+ rm_ItcRxEntryId = rm_pItcRxRmMsg->entry_id;
+
+ //Process watch-dog timer expiry here
+ if (rm_pItcRxRmMsg->timerId==RM_TWDOG)
+ { //Watchdog expired, entryId=trx
+ PDEBUG__(("TRACE@rm_Main: DSP watch dog expired\n"));
+ rm_ProcTrxWDogExp(rm_ItcRxEntryId);
+ goto L1;
+ }
+
+ //If needed output the fact RM got a RM message for trace
+ PDEBUG__(("RM<==RM@rm_Main:prim=%d,entryID=%d,timerId=%d\n",
+ rm_pItcRxRmMsg->primitive_type,
+ rm_ItcRxEntryId,
+ rm_pItcRxRmMsg->timerId));
+
+ rm_ItcRxPrimType = rm_pItcRxRmMsg->primitive_type; //primitive type
+ rm_ItcRxMsgType = (u32)rm_pItcRxRmMsg->timerId; //timer expired
+
+ break;
+
+ default:
+ //Block call signaling if bts disabled
+ if (OAMrm_BTS_OPSTATE==opStateDisabled)
+ { //RM is out of service due to external or internal constraint
+ PDEBUG__(("INFO@rm_Main: BTS out of service now, rmEcCode=%d\n",
+ rm_OpState));
+ goto L1;
+ }
+
+ //RM is now operational and go ahead to process received message
+ switch(rm_ItcRxOrigin)
+ {
+ case MODULE_MD:
+ //Received MD message,cast it to MDmsg struct and process
+ rm_pItcRxMdMsg=(rm_ItcRxMdMsg_t *)&(rm_ItcRxMsg.itcRxMdMsg);
+ rm_ItcRxPrim =(rm_pItcRxMdMsg->module_id<<8 ) |
+ (rm_pItcRxMdMsg->primitive_type ) ;
+ rm_ItcRxEntryId=rm_pItcRxMdMsg->entry_id;
+ rm_SmCtxt[rm_ItcRxEntryId].sapi=rm_pItcRxMdMsg->sapi;
+
+ //If needed output the fact RM got a L1 message for trace
+ PDEBUG__(("RM<==MD@rm_Main:prim=%d, entryID=%d\n",
+ rm_pItcRxMdMsg->primitive_type,rm_ItcRxEntryId));
+
+ //Distinguish RA between RACH and TCH
+ if (rm_ItcRxEntryId!=rm_RachEntryId &&
+ rm_pItcRxMdMsg->primitive_type==L23PT_DL_RANDOM_ACCESS_IND)
+ rm_ItcRxPrim = DLm_OTHRA_IND;
+
+ // Not displaying L23PT_DL_EST_IND primatives here because they
+ // are displayed later by MM and CC. Had to make an exception for
+ // paging response because neither MM or CC display it.
+ if (rm_pItcRxMdMsg->primitive_type == L23PT_DL_DATA_IND)
+ PostL3RecvMsLog(rm_pItcRxMdMsg->lapdm_oid, rm_pItcRxMdMsg->sapi,
+ &rm_pItcRxMdMsg->l3_data);
+ else if ((rm_pItcRxMdMsg->primitive_type == L23PT_DL_EST_IND) &&
+ (rm_pItcRxMdMsg->l3_data.buffer[1] ==
+ CNI_RIL3RRM_MSGID_PAGING_RESPONSE))
+ PostL3RecvMsLog(rm_pItcRxMdMsg->lapdm_oid, rm_pItcRxMdMsg->sapi,
+ &rm_pItcRxMdMsg->l3_data);
+ else if (rm_pItcRxMdMsg->primitive_type == L23PT_DL_RANDOM_ACCESS_IND)
+ PostL3RandomAccess(&rm_pItcRxMdMsg->l3_data);
+
+ rm_ItcRxPrimType = rm_pItcRxMdMsg->primitive_type; //primitive type
+ rm_ItcRxMsgType = 0; //not applicable
+
+ break;
+
+ case MODULE_MM:
+ //Received MM message,cast it to MMmsg struct and process
+ rm_pItcRxMmMsg=(rm_ItcRxMmMsg_t *)&rm_ItcRxMsg.itcRxMmMsg;
+ rm_ItcRxPrim =(rm_pItcRxMmMsg->module_id<<8 ) |
+ (rm_pItcRxMmMsg->primitive_type ) ;
+ rm_ItcRxEntryId = rm_pItcRxMmMsg->entry_id;
+ //If needed output the fact RM got a L1 message
+ PDEBUG__(("RM<==MM@rm_Main:prim=%d,msgType=%d,entryID=%d\n",
+ rm_pItcRxMmMsg->primitive_type,
+ rm_pItcRxMmMsg->message_type,
+ rm_ItcRxEntryId));
+
+ rm_ItcRxPrimType = rm_pItcRxMmMsg->primitive_type; //primitive type
+ rm_ItcRxMsgType = rm_pItcRxMmMsg->message_type; //message type
+
+ break;
+
+ case MODULE_BSSGP:
+ //Received BSSGP message, cast it to BSSGP msg struct and process
+ rm_pItcRxBgMsg=(rm_ItcRxBgMsg_t *)&rm_ItcRxMsg.itcRxBgMsg;
+ rm_ItcRxPrim =(rm_pItcRxBgMsg->module_id<<8 ) |
+ (rm_pItcRxBgMsg->primitive_type ) ;
+ rm_ItcRxEntryId = rm_pItcRxBgMsg->entry_id;
+
+ //If needed output the fact RM got a L1 message
+ PDEBUG__(("RM<==BSSGP@rm_Main:prim=%d,msgType=%d,entryID=%d\n",
+ rm_pItcRxBgMsg->primitive_type,
+ rm_pItcRxBgMsg->message_type,
+ rm_ItcRxEntryId));
+
+ rm_ItcRxPrimType = rm_pItcRxBgMsg->primitive_type; //primitive type
+ rm_ItcRxMsgType = rm_pItcRxBgMsg->message_type; //message type
+
+ break;
+
+ case MODULE_CC:
+ //Received CC message,cast it to CCmsg struct and process
+ rm_pItcRxCcMsg=(rm_ItcRxCcMsg_t *)&rm_ItcRxMsg.itcRxCcMsg;
+ rm_ItcRxPrim =(rm_pItcRxCcMsg->module_id<<8 ) |
+ (rm_pItcRxCcMsg->primitive_type ) ;
+ rm_ItcRxEntryId = rm_pItcRxCcMsg->entry_id;
+ //If needed output the fact RM got a L1 message
+ PDEBUG__(("RM<==CC@rm_Main:prim=%d,msgType=%d,entryID=%d\n",
+ rm_pItcRxCcMsg->primitive_type,
+ rm_pItcRxCcMsg->message_type,
+ rm_ItcRxEntryId));
+
+ rm_ItcRxPrimType = rm_pItcRxCcMsg->primitive_type; //primitive type
+ rm_ItcRxMsgType = rm_pItcRxCcMsg->message_type; //message type
+
+ break;
+
+ case MODULE_SMSCBC:
+ //Received CB message,cast it to CBmsg struct and process
+ rm_pItcRxVbMsg=(rm_ItcRxVbMsg_t *)&rm_ItcRxMsg.itcRxVbMsg;
+ //If needed output the fact RM got a CB message for trace
+
+ PDEBUG__(("RM<==CB@rm_Main: got CB msg, msgTyp=%d,size=%d\n",
+ rm_pItcRxVbMsg->message_type,
+ rm_pItcRxVbMsg->size));
+
+ // Check if CBCH is on
+ if (!rm_ChanCbchActive)
+ {
+ //SMSCBTBD: CBCH is not active. Add alarm report here later !
+ IDEBUG__(("WARNING@rm_Main: CBCH is inactive, retry later!\n"));
+ goto L1;
+
+ }
+ rm_ProcSmscbcMsg();
+
+ rm_ItcRxPrimType = 0; //not applicable
+ rm_ItcRxMsgType = rm_pItcRxVbMsg->message_type; //message type
+
+ goto L1;
+
+ break;
+
+ default:
+ //Received msg is from unexpected source. Ignore it!
+ PDEBUG__(("INFO@rm_Main:unexpected msg origin=%d\n",
+ rm_ItcRxMsg.module_id));
+ goto L1;
+
+ } //inner switch(rm_ItcRxOrigin)
+
+ break;
+
+ } //outer switch(rm_ItcRxOrigin)
+
+ //Handle it!
+ rm_Despatch();
+
+ L1: continue;
+
+ } //while(RM_TRUE)
+
+ rmTaskObj.JCTaskNormExit();
+} //rm_Main()
+
+//extern int ta_HoldSdcch;
+//int ta_HoldFacch = 0;
+//int taHoldFacchOn(void);
+//int taHoldFacchOff(void);
+
+//int taHoldFacchOn(void)
+//{
+// ta_HoldSdcch = 1;
+// ta_HoldFacch = 1;
+// printf("[RM] HoldFacch Mode is now turned on.\n");
+//}
+
+//int taHoldFacchOff(void)
+//{
+// ta_HoldSdcch = 0;
+// ta_HoldFacch = 0;
+// printf("[RM] HoldFacch Mode is now turned off.\n");
+//}
+
+void rm_TurnOnRadioIfNeeded(void)
+{
+//G2
+return;
+#if 0
+
+ int i,j;
+
+ PDEBUG__(("INFO@rm_TurnOnRadioIfNeeded()\n"));
+
+ //Check if there is any usable traffic channels
+ if (!rm_NoOfUsableTchf)
+ {
+ //No tchfs available,nonsense!
+ rm_SetRmOpState(EC_RM_NOTCHFS_USABLE);
+ IDEBUG__(("WARNING@rm_Main:no tchf available\n"));
+ }
+
+ //Check if pic unit is working properly
+ //put here later!
+
+ //Logic for safety check to solve any inconsistency
+ if ( OAMrm_BTS_AMSTATE != unlocked ||
+ OAMrm_TRX_AMSTATE(0) != unlocked ||
+ OAMrm_CHN_AMSTATE(0,0) != unlocked )
+ {
+ rm_SetBtsAdminState(locked);
+ rm_ProcBtsAdminStateLocked();
+ } else
+ {
+ //Bts is unlocked, handle TRX admin states
+ for (i=0;i<OAMrm_MAX_TRXS;i++)
+ {
+ if (OAMrm_TRX_AMSTATE(i)!=unlocked)
+ {
+ rm_SetTrxAdminState(i,locked);
+ rm_ProcTrxAdminStateLocked(i);
+ } else
+ {
+ //TRX is unlocked, handle TS admin states
+ for (j=0;j<OAMrm_SLOTS_PER_TRX;j++)
+ {
+ if (OAMrm_CHN_AMSTATE(i,j) != unlocked)
+ {
+ rm_SetTrxSlotAdminState(i,j,locked);
+ rm_ProcTrxSlotAdminStateLocked(i,j);
+ }
+ }
+ }
+ }
+ }
+
+ //Turn on TRX power if needed
+ for (i=0;i<OAMrm_MAX_TRXS;i++)
+ {
+ if (OAMrm_TRX_AMSTATE(i)==unlocked &&
+ OAMrm_TRX_OPSTATE(i)==opStateEnabled)
+ {
+ //Turn on TRX radio transmission
+ rm_SendTuneSynthToTrx(i,1);
+ } else
+ {
+ //No tchfs available,nonsense!
+ rm_SetRmOpState(rm_TrxRadioOff[i]);
+ IDEBUG__(("WARNING@rm_TurnOnRadioIfNeeded:trx '%d' radio off\n", i));
+ }
+ }
+
+ for (i=0;i<OAMrm_MAX_TRXS;i++)
+ {
+ if (OAMrm_TRX_OPSTATE(i) == opStateEnabled)
+ break;
+ }
+ if (i>=OAMrm_MAX_TRXS)
+ {
+ //No trx is enabled,block whole VC
+ rm_SetRmOpState(EC_RM_NO_TRX_ENABLED);
+ IDEBUG__(("WARNING@rm_TurnOnRadioIfNeeded:no trx is enabled\n"));
+ }
+#endif //#if 0
+}
+
+void rm_MakeSureDspIsTicking(void)
+{
+
+//G2
+#if 0
+ u8 trx;
+
+ trx = rm_pItcRxL1Msg->l3_data.buffer[3];
+
+ //Check if DSP is still ticking or not
+ if (rm_pItcRxL1Msg->l3_data.buffer[4]==rm_TrxMgmt[trx].tdma1 &&
+ rm_pItcRxL1Msg->l3_data.buffer[5]==rm_TrxMgmt[trx].tdma2 &&
+ rm_pItcRxL1Msg->l3_data.buffer[6]==rm_TrxMgmt[trx].tdma3 &&
+ rm_pItcRxL1Msg->l3_data.buffer[7]==rm_TrxMgmt[trx].tdma4 )
+ {
+ //Not ticking any more, raise a critical alarm
+ rm_SetRmOpState(rm_DspNotTickingAnyMore[trx]);
+ } else
+ {
+ //Still ticking fine right now
+ rm_TrxMgmt[trx].tdma1 = rm_pItcRxL1Msg->l3_data.buffer[4];
+ rm_TrxMgmt[trx].tdma2 = rm_pItcRxL1Msg->l3_data.buffer[5];
+ rm_TrxMgmt[trx].tdma3 = rm_pItcRxL1Msg->l3_data.buffer[6];
+ rm_TrxMgmt[trx].tdma4 = rm_pItcRxL1Msg->l3_data.buffer[7];
+ }
+#endif //#if 0
+}
+
+//PR 1323 SMSCBC, shedule message, 6/29
+bool JcMsgSendToSmscbc(InterTxCbcCbMsg_t *msg);
+
+void rm_VcToVbUpNotification(void)
+{
+ InterTxCbcCbMsg_t vcUp;
+ long int vbIpAddress, vcIpAddress;
+
+ RMDBG_ENTER(("rm_VcToVbUpNotification", RM_LAYER));
+ // DBG_ENTER();
+
+ if (STATUS_OK!=oam_getMibIntVar(MIB_h323_GKIPAddress, &vbIpAddress))
+ {
+ EDEBUG__(("RM_MAIN: VB IP address not available\n"));
+ return;
+ }
+
+ vcIpAddress = inet_addr(GetViperCellIpAddress());
+
+ vcUp.msgType = INTER_SMSCBC_VC_UP;
+
+ //vcUp.origVcId = (short) vcId;
+ vcUp.origVcAddress = vcIpAddress;
+ vcUp.origModuleId = MODULE_RM;
+ vcUp.origSubId = 0;
+
+ //vcUp.destVcId = 0;
+ vcUp.destVcAddress = vbIpAddress;
+ vcUp.destModuleId = MODULE_SMSCBC;
+ vcUp.destSubId = 0;
+ vcUp.message_id = 0;
+ JcMsgSendToSmscbc(&vcUp);
+}
+
+void rm_InitCb(void)
+{
+ PDEBUG__(("ENTER@rm_InitCb(): cb control setting=(%d)\n", OAMrm_CBCH_OPSTATE));
+
+ OAMrm_CBCH_OPSTATE = OAMrm_CB_FEATURE_SETTING;
+ if ( (OAMrm_CBCH_OPSTATE) && (rm_pCbchChan->usable==RM_PHYCHAN_USABLE) )
+ {
+ rm_pCbchChan->usable = RM_PHYCHAN_CBCH_USABLE;
+ rm_ActivateCbchChan();
+ rm_WaitForCbchChanActAck();
+ }
+
+ rm_ChanCbchActive = true;
+ rm_BroadcastNilCbMsg();
+ rm_VcToVbUpNotification();
+}
+
+void rm_WaitForCbchChanActAck(void)
+{
+ int waitAck, result;
+
+ PDEBUG__(("ENTER@rm_WaitForCbchChanActAck: cb control setting=(%d)\n", OAMrm_CBCH_OPSTATE));
+
+ waitAck=true;
+
+ while(waitAck)
+ {
+ //Read a msg from queue or pend on arrival of message
+ if (ERROR == (result=rm_msgQReceive(rm_MsgQId, (s8 *)&rm_ItcRxMsg,
+ sizeof(rm_ItcRxMsg_t), WAIT_FOREVER)))
+ {
+ //Error in reading VxWork msg queue. Ignore msg!
+ rm_SetRmOpState(EC_RM_OS_CALL_MSGQRECEIVE_FAILED);
+ EDEBUG__(("ERROR@rm_WaitForCbchChanActAck:VxWorks Q. read errno(%d)\n", errno));
+ printf("ERROR@rm_WaitForCbchChanActAck:VxWorks Q. read errno(%d)\n", errno);
+ assert(0);
+ }
+
+ rm_pItcRxL1Msg = (rm_ItcRxL1Msg_t*) &rm_ItcRxMsg;
+
+ if ( (rm_pItcRxL1Msg->module_id==MODULE_L1) &&
+ (RM_L1MSGCMP(RM_L1MG_DEDMGMT,RM_L1MT_CHANACTIVACK_MSB,RM_L1MT_CHANACTIVACK_LSB)) )
+ waitAck=false;
+ else
+ if (rm_DbgDump) BYDUMP__(( (u8*)&rm_ItcRxMsg, result));
+ }
+}
+
+#endif //__RM_MAIN_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_msgQReceive.cpp b/data/mnet/GP10/Host/rm/Src/rm_msgQReceive.cpp
new file mode 100644
index 0000000..1518df5
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_msgQReceive.cpp
@@ -0,0 +1,24 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_MSGQRECEIVE_CPP__
+#define __RM_MSGQRECEIVE_CPP__
+
+#include "rm\rm_head.h"
+
+int rm_msgQReceive(MSG_Q_ID QId, s8 *pRxMsg, unsigned int len, int flag)
+{
+ int result;
+ T_CNI_RIL3MD_RRM_MSG *pRmMsg;
+
+ result = msgQReceive(QId, pRxMsg, len, flag);
+
+ return result;
+}
+
+#endif /* __RM_MSGQRECEIVE_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src/rm_oamif.cpp b/data/mnet/GP10/Host/rm/Src/rm_oamif.cpp
new file mode 100644
index 0000000..01d6fdd
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_oamif.cpp
@@ -0,0 +1,65 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+ #ifndef __RM_OAMIF_CPP__
+ #define __RM_OAMIF_CPP__
+
+ #include "rm\rm_head.h"
+
+ //MODNEED
+ //rm_OamData_t rm_OamData; moved to sys_init.cpp
+ //JcVipercellId_t oam_AdjacentCellId[32]=
+ // { {0,1},{0,2},
+ // {0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ // {0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},
+ // {0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}
+ // }; //Retrieve in terms of index co-referred by both DSP & RRM
+
+ u8 oam_CellReselectOffset=0;
+ u8 oam_TemporaryOffset=0;
+ u8 oam_PenaltyTime=0;
+
+ u8 oam_gsmCodec = 1; //0x01-FR, 0x21-EFR, 0x41-superEFR
+ u8 oam_BcchTrx=0;
+ u16 oam_TrxTuneSynthSetting[2][2];
+
+ //AlarmAdded
+ int rm_OpState;
+ int rm_NoOfUsableTchf;
+ int rm_nbrOfAvailableSDCCHs;
+ int rm_nbrOfAvailableSDCCH8s;
+ #define TOTAL_AVAIL_SDCCHs rm_nbrOfAvailableSDCCHs + rm_nbrOfAvailableSDCCH8s
+ int rm_maxNbrOfBusyTCHs;
+ int rm_maxNbrOfBusySDCCHs;
+ int rm_maxNbrOfBusySDCCH8s;
+ #define TOTAL_MAX_BUSY_SDCCHs rm_maxNbrOfBusySDCCHs + rm_maxNbrOfBusySDCCH8s
+ rm_TrxMgmt_t rm_TrxMgmt[OAMrm_MAX_TRXS];
+ int rm_LiveSglCfg=RM_FALSE;
+
+ //AMADDED
+ T_CNI_RIL3_CELL_BARRED_ACCESS rm_CellBarred;
+ AdministrativeState rm_AmState00;
+ int rm_VcIsBarred;
+
+ //PMADDED
+ int rm_NoOfBusySdcch4;
+ int rm_NoOfBusySdcch8;
+ #define NUM_BUSY_SDCCHs rm_NoOfBusySdcch4 + rm_NoOfBusySdcch8
+ int rm_NoOfBusyTchf;
+ int rm_NoOfIdleTchf;
+ rm_AllChanAvailable_t rm_AllAvailableTchf;
+ rm_AllChanAvailable_t rm_AllAvailableSdcch4;
+ rm_AllChanAvailable_t rm_AllAvailableSdcch8;
+
+ //SMSCBAdded
+ u16 oam_phTrxSelectBit[2]= {0x0000,0x4000}; //b14
+ u16 oam_phTrxSynthSelectBit[2] = {0x0000,0x8000}; //b15
+ u16 oam_phTrxHoppingSelectBit[2] = {0x0000,0x2000}; //b13
+ u16 oam_phTrxPwrSelectBit[2] = {0x0000,0x1000}; //b12
+
+ #endif //__RM_OAMIF_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src/rm_smscb.cpp b/data/mnet/GP10/Host/rm/Src/rm_smscb.cpp
new file mode 100644
index 0000000..1336dd6
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src/rm_smscb.cpp
@@ -0,0 +1,249 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_SMSCB_CPP__
+#define __RM_SMSCB_CPP__
+
+#include "rm\rm_head.h"
+
+void rm_ProcSmscbcMsg(void)
+{
+ u16 size;
+
+ //Block CBCH broadcast if needed
+ if (rm_pCbchChan->amState!=unlocked)
+ {
+ //Stop CBCH by sending a NULL
+ IDEBUG__(("WARNING@rm_ProcSmscbcMsg: CBCH amState=%d\n",rm_pCbchChan->amState));
+ rm_SmscbcMsg.morPage=RM_FALSE;
+ rm_BroadcastNilCbMsg();
+ return;
+ }
+
+ size = rm_pItcRxVbMsg->size;
+
+ switch (rm_pItcRxVbMsg->message_type)
+ {
+ case INTER_SMSCBC_CB_START: //add message
+
+ // If received CB proper or reject!
+ if (size > INTER_CBC_CB_MAX_DAT_LEN)
+ {
+ IDEBUG__(("WARNING@rm_ProcSmscbcMsg: invalid CB msg size: %d\n",
+ rm_pItcRxVbMsg->size));
+ return;
+ }
+ // instant message,6/29
+ // memcpy(&rm_SmscbcMsg.data, rm_pItcRxVbMsg->data, size);
+ //rm_SmscbcMsg.totPage = size/88;
+ // if (size%88) rm_SmscbcMsg.totPage++;
+ // rm_SmscbcMsg.curPage = 1; //Cur CB msg page to send
+
+ //Broadcast the first page of a new cb msg
+ //rm_BroadcastNewCbMsg(rm_SmscbcMsg.curPage);
+ //if ((++rm_SmscbcMsg.curPage)>rm_SmscbcMsg.totPage)
+ rm_SmscbcMsg.curPage = 1;
+ //if (rm_SmscbcMsg.totPage>1)
+ // rm_SmscbcMsg.morPage = RM_TRUE;
+ //else
+ // rm_SmscbcMsg.morPage = RM_FALSE;
+
+ //PR 1323,shedule message, add/delete message to table
+ int match,i;
+ match=0;
+ i=0;
+ while(i<SmsCbc_TableRow_MAX && rm_CbMsgTable.table[i].state != 0)
+ {
+ if(rm_pItcRxVbMsg->message_id == rm_CbMsgTable.table[i].msgId)//msg exist
+ {
+ match=1;
+ memcpy(rm_CbMsgTable.table[i].msg, rm_pItcRxVbMsg->data, size);
+ rm_CbMsgTable.table[i].state = 1;
+ rm_CbMsgTable.table[i].size = size;
+ rm_CbMsgTable.table[i].totPage = rm_CbMsgTable.table[i].size/88;
+ if (rm_CbMsgTable.table[i].size % 88)
+ rm_CbMsgTable.table[i].totPage++;
+ rm_CbMsgTable.table[i].curPageInCurMsg=1;
+
+ break;
+ }
+ ++i;
+ }
+
+ if(match == 0 && i< SmsCbc_TableRow_MAX )//msg not exist or table empty
+ {
+
+ rm_CbMsgTable.table[i].state = 1;
+ memcpy(rm_CbMsgTable.table[i].msg, rm_pItcRxVbMsg->data, size);
+ rm_CbMsgTable.table[i].msgId = rm_pItcRxVbMsg->message_id;
+ rm_CbMsgTable.table[i].size = size;
+ rm_CbMsgTable.table[i].totPage = rm_CbMsgTable.table[i].size/88;
+ if (rm_CbMsgTable.table[i].size % 88)
+ rm_CbMsgTable.table[i].totPage++;
+ rm_CbMsgTable.table[i].curPageInCurMsg=1;
+
+ }
+ else if(match == 0 && i >= SmsCbc_TableRow_MAX )
+ {
+ IDEBUG__(("WARNING@rm_ProcSmscbcMsg: Table overflow"));
+ }
+ break;
+
+ case INTER_SMSCBC_CB_STOP://delete message
+ for(i = 0; i< SmsCbc_TableRow_MAX && rm_CbMsgTable.table[i].state != 0; ++i)
+ {
+ if(rm_pItcRxVbMsg->message_id == rm_CbMsgTable.table[i].msgId)
+ {
+ rm_CbMsgTable.table[i].state = -1;
+ break;
+ }
+
+ }
+ if(i >= SmsCbc_TableRow_MAX || rm_CbMsgTable.table[i].state == 0)
+ {
+ IDEBUG__(("WARNING@rm_ProcSmscbcMsg: invalid msgType=%d\n",
+ rm_pItcRxVbMsg->message_type));
+ }
+ break;
+ //PR 1323 end
+
+ default:
+ IDEBUG__(("WARNING@rm_ProcSmscbcMsg: invalid msgType=%d\n",
+ rm_pItcRxVbMsg->message_type));
+ break;
+ }
+}
+
+void rm_BroadcastNewCbMsg(u8 page)
+{
+ rm_PassDownBlock(0, 0x20, page, RM_FALSE); //Pass down 1st block
+ rm_PassDownBlock(1, 0x20, page, RM_FALSE); //Pass down 2nd block
+ rm_PassDownBlock(2, 0x20, page, RM_FALSE); //Pass down 3rd block
+ rm_PassDownBlock(3, 0x30, page, RM_FALSE); //Pass down 4th block
+}
+
+void rm_BroadcastNilCbMsg(void)
+{
+ rm_PassDownBlock(0, 0x20, 0, RM_TRUE); //Pass down 1st block
+ rm_PassDownBlock(1, 0x20, 0, RM_TRUE); //Pass down 2nd block
+ rm_PassDownBlock(2, 0x20, 0, RM_TRUE); //Pass down 3rd block
+ rm_PassDownBlock(3, 0x30, 0, RM_TRUE); //Pass down 4th block
+}
+
+void rm_PassDownBlock(u8 blockSeq, u8 blockType, u8 curMsg, u8 nullFlag)
+{
+
+ int length,i,j,k;
+ u8 buffer[60];
+
+ curMsg = rm_CbMsgTable.curMsg;
+ PDEBUG__(("INFO@rm_PassDownBlock: CB block (seq=%d,type=%d,curMsg=%d,curPage=%d,flg=%d)\n",
+ blockSeq, blockType, rm_CbMsgTable.curMsg,
+ rm_CbMsgTable.table[curMsg].curPageInCurMsg,
+ nullFlag));
+
+ //Pass down one SMS-CB block to L1Proxy
+ length = 4;
+ buffer[length++] = RM_L1MG_LNKMGMT;
+ buffer[length++] = RM_L1MT_PHDATAREQ_MSB;
+ buffer[length++] = RM_L1MT_PHDATAREQ_LSB;
+ buffer[length++] = 0; //alwasys to trx 0
+ buffer[length++] = RM_L1CBCH_CHANNUMBER_MSB; //CBCH:0xa0
+ buffer[length++] = 0;
+ buffer[length++] = blockSeq; //block sequence
+ //memset(&buffer[length], 0, 23);
+ if (nullFlag)
+ {
+ buffer[length++] = blockType|0x0F;
+ memset(&buffer[length], 0x2b, 22);
+ } else
+ {
+ buffer[length++] = blockType|blockSeq;
+ //PR 1323
+ memcpy(&buffer[length], &(rm_CbMsgTable.table[curMsg].msg[
+ (rm_CbMsgTable.table[curMsg].curPageInCurMsg-1)*88 + blockSeq*22]), 22);
+
+ //memcpy(&buffer[length], &(rm_SmscbcMsg.data[(page-1)*88+blockSeq*22]), 22);
+ }
+
+ //Fill length to the 1st four bytes in little endian format
+ length = length + 22;
+ buffer[0] = (unsigned char)length;
+ buffer[1] = (unsigned char)(length>>8);
+ buffer[2] = (unsigned char)(length>>16);
+ buffer[3] = (unsigned char)(length>>24);
+
+ //calling l1proxy func
+ sendDsp(buffer, length);
+}
+
+void rm_ActivateCbchChan(void)
+{
+ rm_ItcTxMsg_t msgToL1;
+ u16 length;
+
+ PDEBUG__(("INFO@rm_ActivateCbchChan: activate CBCH channel\n"));
+
+ //Reset rm_SmscbcMsg ctrl struct
+ rm_SmscbcMsg.totPage = 0;
+ rm_SmscbcMsg.curPage = 0;
+ rm_SmscbcMsg.morPage = RM_FALSE;
+
+ length = 0;
+ msgToL1.buffer[length++] = RM_L1MG_DEDMGMT;
+ msgToL1.buffer[length++] = RM_L1MT_CHANACTIV_MSB;
+ msgToL1.buffer[length++] = RM_L1MT_CHANACTIV_LSB;
+ msgToL1.buffer[length++] = rm_pCbchChan->trxNumber;
+ msgToL1.buffer[length++] = rm_pCbchChan->chanNumberMSB;
+ msgToL1.buffer[length++] = rm_pCbchChan->chanNumberLSB;
+ msgToL1.buffer[length++] = RM_L1ACTTYPE_CBCH; //actType
+ msgToL1.buffer[length++] = RM_L1DTXCTRL_D0U0; //dtxCtrl
+ msgToL1.buffer[length++] = RM_L1DATATTR_SIGNALING; //datAttr
+ msgToL1.buffer[length++] = RM_L1RATTYPE_SDCCH; //ratType
+ msgToL1.buffer[length++] = RM_L1CODALGO_NORES; //no algo
+ msgToL1.buffer[length++] = RM_L1CIPHTYPE_NCIPH; //ciphSet
+ RM_MEMSET(&msgToL1.buffer[length], RM_L1CIPHKEY_LEN); //ciphKey
+ length = length + RM_L1CIPHKEY_LEN - 1; //TEMP Adjustment
+ msgToL1.buffer[length++] = 0;
+ msgToL1.buffer[length++] = 0;
+ msgToL1.buffer[length++] = 0;
+ msgToL1.buffer[length++] = 0;
+ msgToL1.buffer[length++] = 0;
+ msgToL1.msgLength = length;
+
+ api_SendMsgFromRmToL1(msgToL1.msgLength, msgToL1.buffer);
+}
+
+//PR 1323
+intg_ShowCbTable(void)
+{
+ printf ("========= Listing Items in CB Table (Current Msg %d)=========\n",
+ rm_CbMsgTable.curMsg);
+
+ for (int i=0;i<SmsCbc_TableRow_MAX;i++)
+ {
+ if (rm_CbMsgTable.table[i].state==1)
+ printf("%d-Active: msgId(%d,%d), msgSize=%d, totPage=%d, curPage=%d\n",
+ rm_CbMsgTable.table[i].state,
+ rm_CbMsgTable.table[i].msgId,
+ rm_CbMsgTable.table[i].msg[3],
+ rm_CbMsgTable.table[i].size,
+ rm_CbMsgTable.table[i].totPage,
+ rm_CbMsgTable.table[i].curPageInCurMsg);
+ else if (rm_CbMsgTable.table[i].state== -1 )
+ printf("%d-InActive: msgId(%d,%d), msgSize=%d, totPage=%d, curPage=%d\n",
+ rm_CbMsgTable.table[i].state,
+ rm_CbMsgTable.table[i].msgId,
+ rm_CbMsgTable.table[i].msg[3],
+ rm_CbMsgTable.table[i].size,
+ rm_CbMsgTable.table[i].totPage,
+ rm_CbMsgTable.table[i].curPageInCurMsg);
+ }
+}
+
+#endif //__RM_SMSCB_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src_api/Makefile b/data/mnet/GP10/Host/rm/Src_api/Makefile
new file mode 100644
index 0000000..03513ca
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src_api/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = rm
+THIS_DIRECTORY = Src_api
+MY_OUTPUT = $(OBJDIR)\rm_api.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/rm/Src_api/api_SendMsgFromRmToCc.cpp b/data/mnet/GP10/Host/rm/Src_api/api_SendMsgFromRmToCc.cpp
new file mode 100644
index 0000000..2e7c90a
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src_api/api_SendMsgFromRmToCc.cpp
@@ -0,0 +1,48 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+ */
+
+#ifndef __API_SENDMSGFROMRMTOCC_CPP__
+#define __API_SENDMSGFROMRMTOCC_CPP__
+
+#include "rm\rm_head.h"
+
+void api_SendMsgFromRmToCc (
+ MSG_Q_ID QId,
+ unsigned short length,
+ unsigned char *msg
+ )
+{
+ STATUS result;
+
+// TDUMP__(( TXMSG__, (unsigned char *)msg,length ));
+
+ result = msgQSend(
+ QId,
+ (char *) msg,
+ length,
+ NO_WAIT,
+ MSG_PRI_NORMAL
+ );
+
+ if ( result==ERROR )
+ EDEBUG__(("ERROR-api_SendMsgFromRmToMm:VxWorks sending error:%d\n",
+ errno));
+
+rm_ItcTxL3Msg_t *pCcMsg;
+pCcMsg = (rm_ItcTxL3Msg_t *)msg;
+
+PDEBUG__(("RM sends MSG to CC: ccQId:%d, moduleID:%d, entryId:%d, prim:%d,msgType:%d\n",
+ QId,
+ pCcMsg->module_id,
+ pCcMsg->entry_id,
+ pCcMsg->primitive_type,
+ pCcMsg->message_type));
+}
+
+#endif /* __API_SENDMSGFROMRMTOCC_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src_api/api_SendMsgFromRmToMm.cpp b/data/mnet/GP10/Host/rm/Src_api/api_SendMsgFromRmToMm.cpp
new file mode 100644
index 0000000..4c44910
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src_api/api_SendMsgFromRmToMm.cpp
@@ -0,0 +1,46 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+ */
+
+#ifndef __API_SENDMSGFROMRMTOMM_CPP__
+#define __API_SENDMSGFROMRMTOMM_CPP__
+
+#include "rm\rm_head.h"
+
+void api_SendMsgFromRmToMm (
+ unsigned short length,
+ unsigned char *msg
+ )
+{
+ STATUS result;
+
+// TDUMP__(( TXMSG__, (unsigned char *)msg,length ));
+
+ result = msgQSend(
+ mmMsgQId,
+ (char *) msg,
+ length,
+ NO_WAIT,
+ MSG_PRI_NORMAL
+ );
+
+ if ( result==ERROR )
+ EDEBUG__(("ERROR-api_SendMsgFromRmToMm:VxWorks sending error:%d\n",
+ errno));
+
+rm_ItcTxL3Msg_t *pMmMsg;
+pMmMsg = (rm_ItcTxL3Msg_t *)msg;
+
+PDEBUG__(("RM sends MSG to MM: moduleID:%d, entryId:%d, prim:%d,msgType:%d\n",
+ pMmMsg->module_id,
+ pMmMsg->entry_id,
+ pMmMsg->primitive_type,
+ pMmMsg->message_type));
+}
+
+#endif /* __API_SENDMSGFROMRMTOMM_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src_api/l1rm_intf.cpp b/data/mnet/GP10/Host/rm/Src_api/l1rm_intf.cpp
new file mode 100644
index 0000000..38fc6da
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src_api/l1rm_intf.cpp
@@ -0,0 +1,115 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+ */
+
+#ifndef __L1RM_INTF_CPP__
+#define __L1RM_INTF_CPP__
+
+#include "rm\rml1_intf.h"
+
+void sendDsp ( unsigned char *buffer, int len );
+
+void api_SendMsgFromL1ToRm(unsigned short length, unsigned char* msg)
+{
+ STATUS result;
+ rml1_Msg_t l1ToRmMsg;
+
+ //Safeguard only <TBD>
+ if (msg[3]>=2 || length<4)
+ { //Received invalid L1 message, ignore it !
+ EDEBUG__(("ERROR@api_SendMsgFromL1ToRm: L1 msg err (%d,%d)\n",
+ msg[3],length));
+ return;
+ }
+
+ l1ToRmMsg.module_id = MODULE_L1;
+ l1ToRmMsg.primitive_type = MPH_INFO_IND;
+ l1ToRmMsg.l3_data.msgLength = length;
+ memcpy(l1ToRmMsg.l3_data.buffer, msg, length);
+
+// TDUMP__(( RXMSG__, (unsigned char *)&l1ToRmMsg,
+// (sizeof(rml1_Msg_t)-L1RM_MAXMSG_LEN+length) ));
+
+ result = msgQSend(
+ rm_MsgQId,
+ (char *) &l1ToRmMsg,
+ (sizeof(rml1_Msg_t)-L1RM_MAXMSG_LEN + length),
+ NO_WAIT,
+ MSG_PRI_NORMAL
+ );
+ if ( result==ERROR )
+ printf("ERROR-api_SendMsgFromL1ToRm: VxWorks sending error:%d\n",
+ errno);
+
+}
+
+void api_SendMsgFromRmToL1 (
+ unsigned short length,
+ unsigned char *msg
+ )
+
+{
+ STATUS result;
+
+ typedef struct {
+ unsigned char module_id;
+ unsigned char primitive_type;
+ struct {
+ int msgLength;
+ unsigned char buffer[L1RM_MAXMSG_LEN];
+ } l3_data;
+ } rmToL1Msg_t;
+
+ rmToL1Msg_t rmToL1Msg;
+
+// rmToL1Msg.module_id = MODULE_RM;
+// rmToL1Msg.primitive_type = MPH_INFO_REQ;
+
+// Byte-by-byte assignment to guarantee little-endian format
+// rmToL1Msg.l3_data.msgLength = (int) length;
+ unsigned char *pDes;
+ int len;
+ pDes = (unsigned char*) &(rmToL1Msg.l3_data.msgLength);
+ len = (int) length;
+ *pDes++ = (unsigned char) len;
+ *pDes++ = (unsigned char) (len>>8);
+ *pDes++ = (unsigned char) (len>>16);
+ *pDes = (unsigned char) (len>>24);
+
+ memcpy(rmToL1Msg.l3_data.buffer, msg, length);
+
+// TDUMP__(( TXMSG__, (unsigned char *) &rmToL1Msg,
+// (sizeof(rmToL1Msg_t)-L1RM_MAXMSG_LEN+length) ));
+//
+// result = msgQSend(
+// l1_MsgQId,
+// (char *) &rmToL1Msg,
+// (sizeof(rmToL1Msg_t)-L1RM_MAXMSG_LEN+length),
+// NO_WAIT,
+// MSG_PRI_NORMAL
+// );
+//
+// result = msgQSend(
+// l1_MsgQId,
+// (char *) &(rmToL1Msg.l3_data),
+// (length + 4),
+// NO_WAIT,
+// MSG_PRI_NORMAL
+// );
+
+// TDUMP__(( TXMSG__, (unsigned char *) &(rmToL1Msg.l3_data),(length+4)));
+
+ sendDsp((unsigned char*)&(rmToL1Msg.l3_data), (length+4));
+
+// if ( result==ERROR )
+// EDEBUG__(("ERROR-api_SendMsgFromRmToL1: VxWorks sending error:%d\n",
+// errno));
+
+}
+
+#endif /* __L1RM_INTF_CPP__ */
diff --git a/data/mnet/GP10/Host/rm/Src_api/rm_EntryIdVsTrxSlot.cpp b/data/mnet/GP10/Host/rm/Src_api/rm_EntryIdVsTrxSlot.cpp
new file mode 100644
index 0000000..809f368
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src_api/rm_EntryIdVsTrxSlot.cpp
@@ -0,0 +1,296 @@
+/*
+*******************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+******************************************************************
+ */
+
+#ifndef __RM_ENTRYIDVSTRXSLOT_CPP__
+#define __RM_ENTRYIDVSTRXSLOT_CPP__
+
+#include "rm\rm_head.h"
+
+u8 rm_EntryIdToTrxSlot(T_CNI_IRT_ID entryId, u16 *gsmHandler)
+{
+ u8 trx, slot;
+
+
+// if (rm_SmCtxt[entryId].pPhyChan->usable != RM_PHYCHAN_USABLE)
+// {
+// EDEBUG__(("ERROR-rm_EntryIdToTchTrxSlot:entryId=%d related chan unusable\n",
+// entryId));
+// return RM_FALSE;
+// } else
+ if (rm_SmCtxt[entryId].pPhyChan->chanType == RM_PHYCHAN_TCHF_S)
+ {
+ trx = rm_SmCtxt[entryId].pPhyChan->trxNumber;
+ slot = (rm_SmCtxt[entryId].pPhyChan->chanNumberMSB)&0x07;
+
+ if ( trx>2 || (trx==0&&slot==0) || slot>7 )
+ {
+ EDEBUG__(("ERROR-rm_EntryIdToTchTrxSlot:
+ entryId=%d not related to a usable chan\n", entryId));
+ return RM_FALSE;
+ }
+ *gsmHandler = (u16)((trx<<8)|slot);
+ } else
+ {
+ EDEBUG__(("ERROR-rm_EntryIdToTchTrxSlot: entryId=%d is not TCH/F\n",
+ entryId));
+ return RM_FALSE;
+ }
+
+ return RM_TRUE;
+}
+
+u8 rm_TrxSlotToEntryId(u16 gsmHandler, T_CNI_IRT_ID *entryId)
+{
+ u8 trx, slot, idx;
+
+ trx = (u8)(gsmHandler>>8);
+ slot = (u8)(gsmHandler);
+
+ //TCHF chan assumed here
+ idx = RM_TCHF_ENTRYIDX(trx, slot);
+ *entryId = rm_TchfEntryId[idx];
+
+ if (*entryId==0)
+ printf("{\nRM WARNING!!!\n: failed to get entryId for (trx=%d,slot=%d,gsmhandler=%x,index=%d)\n}\n",
+ trx,slot,gsmHandler,idx);
+
+ return RM_TRUE;
+}
+
+u8 rm_CodecMatch(u16 gsmHandler, u8 codec)
+{
+ u8 spchVer;
+
+ T_CNI_IRT_ID entryId;
+
+ rm_TrxSlotToEntryId(gsmHandler, &entryId);
+
+ if (rm_SmCtxt[entryId].smType != RM_MAIN_SM)
+ {
+ //Speech frame is always associated main SM
+ EDEBUG__(("ERROR@rm_CodecMatch: entryId '%d' is not assoc with main SM\n",
+ entryId));
+ return RM_FALSE;
+ }
+
+ //Convert codec to internal speech codec value
+ codec = 0xF0&codec;
+ spchVer = 0xff;
+
+ if (codec == 0xD0)
+ spchVer = 1;
+ else if (codec == 0xC0)
+ spchVer = 0x21;
+ else
+ {
+ //Speech frame is always associated main SM
+ EDEBUG__(("ERROR@rm_CodecMatch: invalid codec value '%d'\n", codec));
+ return RM_FALSE;
+ }
+
+ if (rm_SmCtxt[entryId].codAlgo != spchVer)
+ {
+ IDEBUG__(("WARNING@rm_CodecMatch: codec mismatch (dsp %x, rm %d) (entryId %d, port %x)\n",
+ codec, rm_SmCtxt[entryId].codAlgo, entryId, gsmHandler));
+ return RM_FALSE;
+ }
+
+ return RM_TRUE;
+}
+
+//Check if given trx blocked
+u8 rm_TrxIsNotBlocked(u8 trx)
+{
+ return ((u8)(OAMrm_TRX_AMSTATE(trx)));
+}
+
+
+T_CNI_LAPDM_OID rm_GetOid (T_CNI_IRT_ID entryId, T_CNI_LAPDM_SAPI sapi)
+{
+ PDEBUG__(("INFO@rm_GetOid: entryId %d, sapi %d, mEntryId %d, aEntryId %d, chanType %d\n",
+ entryId, sapi, rm_SmCtxt[entryId].mEntryId, rm_SmCtxt[entryId].aEntryId,
+ rm_SmCtxt[entryId].chanType));
+
+ switch(sapi)
+ {
+ case RM_SAPI0:
+ if ( entryId==rm_SmCtxt[entryId].mEntryId )
+ return (rm_SmCtxt[entryId].mOId);
+ break;
+
+ case RM_SAPI3:
+ if (entryId==rm_SmCtxt[entryId].mEntryId)
+ {
+ if (rm_SmCtxt[entryId].chanType==RM_CTFACCH_F)
+ return (rm_SmCtxt[entryId].aOId);
+ else if (rm_SmCtxt[entryId].chanType==RM_PHYCHAN_SDCCH4)
+ return (rm_SmCtxt[entryId].mOId);
+ else
+ return CNI_LAPDM_NULL_OID;
+ }
+ break;
+ }
+
+ return CNI_LAPDM_NULL_OID;
+}
+
+T_CNI_IRT_ID rm_GetSacchEntryId (T_CNI_IRT_ID entryId)
+{
+ if (entryId==rm_SmCtxt[entryId].mEntryId)
+ return (rm_SmCtxt[entryId].aEntryId);
+ else
+ return CNI_IRT_NULL_ID;
+}
+
+int rm_IsChanAvailable(T_CNI_RIL3_CHANNEL_TYPE chan)
+{
+ switch(chan)
+ {
+ case CNI_RIL3_TCH_ACCH_FULL:
+ if (RM_SMCTXT_NULL==rm_PreAllocSmCtxt(RM_PHYCHAN_TCHF_S))
+ return RM_FALSE;
+ break;
+
+ case CNI_RIL3_SDCCH_ACCH_4orCBCH:
+ if (RM_SMCTXT_NULL==rm_PreAllocSmCtxt(RM_PHYCHAN_SDCCH4))
+ return RM_FALSE;
+ break;
+
+ case CNI_RIL3_SDCCH_ACCH_8orCBCH:
+ default:
+ IDEBUG__(("WARNING@rm_IsChanAvailable: chanType requested %d\n",
+ chan));
+ return RM_FALSE;
+ }
+
+ return RM_TRUE;
+}
+
+rm_SmCtxt_t *rm_PreAllocSmCtxt(u8 chanType)
+{
+ int i;
+
+ switch (chanType)
+ {
+ case RM_PHYCHAN_TCHF_S:
+
+ for (i=0; i<OAMrm_MAX_TCHFS; i++)
+ {
+ //Check if the concerned radio TS is blocked/shutting down
+ if ( rm_PhyChanTchf[i].amState == unlocked &&
+ rm_PhyChanTchf[i].opState == opStateEnabled &&
+ rm_PhyChanTchf[i].usable == RM_PHYCHAN_USABLE &&
+ rm_PhyChanTchf[i].state == RM_PHYCHAN_FREE )
+ break;
+ }
+
+ if ( i >= OAMrm_MAX_TCHFS )
+ return RM_SMCTXT_NULL;
+ else
+ return rm_PhyChanTchf[i].pMSmCtxt;
+
+ break;
+
+ case RM_PHYCHAN_SDCCH4:
+
+ for (i=0; i<OAMrm_MAX_SDCCH4S; i++)
+ {
+ if ( rm_PhyChanSdcch4[i].amState == unlocked &&
+ rm_PhyChanSdcch4[i].opState == opStateEnabled &&
+ rm_PhyChanSdcch4[i].usable == RM_PHYCHAN_USABLE &&
+ rm_PhyChanSdcch4[i].state == RM_PHYCHAN_FREE )
+ break;
+ }
+
+ if ( i >= OAMrm_MAX_SDCCH4S )
+ return RM_SMCTXT_NULL;
+ else
+ return rm_PhyChanSdcch4[i].pMSmCtxt;
+
+ break;
+
+ default:
+
+ EDEBUG__(( "ERROR-rm_PreAllocSmCtxt: unsupported chan type:%d\n",
+ chanType ));
+
+ return RM_SMCTXT_NULL;
+
+ break;
+
+ }
+}
+
+
+short rm_DecideCipherAlgo(
+ T_CNI_RIL3_IE_CIPHER_MODE_SETTING *setting,
+ T_CNI_RIL3_IE_MS_CLASSMARK_2 *classmark2)
+{
+ short algo = 0;
+ setting->ciphering = CNI_RIl3_CIPHER_START_CIPHERING;
+
+ PDEBUG__(("INFO@rm_DecideCipherAlgodspCiphCap(%x)\n", rm_DspCiphCap));
+
+ if ( !classmark2->a51 && RM_DSPA51(rm_DspCiphCap) )
+ {
+ algo = 1;
+ setting->algorithm = CNI_RIL3_CIPHER_ALGORITHM_A51;
+ } else if (classmark2->a52 && RM_DSPA52(rm_DspCiphCap) )
+ {
+ algo = 2;
+ setting->algorithm = CNI_RIL3_CIPHER_ALGORITHM_A52;
+ } else
+ {
+ algo = 0;
+ setting->ciphering =CNI_RIl3_CIPHER_NO_CIPHERING;
+ }
+
+ return (algo);
+}
+
+BOOL rm_bssgp_msg_callback(BSSGP_API_MSG msg)
+{
+ IntraL3Msg_t msgOut;
+
+ if (msg.msg_type != BSSGP_API_MSG_PAGING_PS)
+ {
+ IDEBUG__(("WARNING@rm_bssgp_msg_callback: unexpected msgType(%d)\n", msg.msg_type));
+ return false;
+ }
+
+ msgOut.module_id = MODULE_BSSGP;
+ msgOut.primitive_type = INTRA_L3_RR_EST_REQ;
+ msgOut.message_type = INTRA_L3_RR_PAGE_REQ;
+ msgOut.entry_id = CNI_IRT_NULL_ID;
+
+ msgOut.l3_data.pageReq.imsi.numDigits = msg.msg.paging_ps.imsi.numDigits;
+ memcpy(msgOut.l3_data.pageReq.imsi.digits, msg.msg.paging_ps.imsi.digits,
+ msg.msg.paging_ps.imsi.numDigits);
+
+ //send the message.
+ if (ERROR == msgQSend( rm_MsgQId,
+ (char *) &msgOut,
+ sizeof(struct IntraL3Msg_t),
+ NO_WAIT,
+ MSG_PRI_NORMAL
+ ))
+ {
+ EDEBUG__(("ERROR@ rm_bssgp_msg_callback: msgQSend (QID=%d) errno(%d)\n ",
+ (int)rm_MsgQId, errno));
+ assert(0);
+ } else
+ {
+ PDEBUG__(("TRACE@rm_bssgp_msg_callback: (prim=%d) (msgType=%d)\n",
+ msgOut.primitive_type, msgOut.message_type));
+ }
+
+ return true;
+}
+
+#endif //__RM_ENTRYIDVSTRXSLOT_CPP__
diff --git a/data/mnet/GP10/Host/rm/Src_init/Makefile b/data/mnet/GP10/Host/rm/Src_init/Makefile
new file mode 100644
index 0000000..0ef3fee
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src_init/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = rm
+THIS_DIRECTORY = Src_init
+MY_OUTPUT = $(OBJDIR)\rm_init.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/rm/Src_init/debug.cpp b/data/mnet/GP10/Host/rm/Src_init/debug.cpp
new file mode 100644
index 0000000..60809c6
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src_init/debug.cpp
@@ -0,0 +1,76 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#include "rm\debug.h"
+
+void db_BDump(unsigned char type, unsigned char *pBuf, unsigned short len)
+{
+ unsigned short i, j, row, last_row, wrongType;
+ const char *rxTitle[] = { "<===L1:", "<===MD:", "<===RM:","<===MM:","<===CC"};
+ const char *txTitle[] = { "L1===>:", "MD===>:", "RM===>:","MM===>:","CC===>"};
+
+ /*
+ ** Assume first byte of *pBuf is module ID which is used to access the two
+ ** string arrays defined above.
+ */
+
+ wrongType = 0;
+
+ switch(type)
+ {
+ case
+ MAREA__:
+ printf("DUMP---\n");
+ break;
+
+ case RXMSG__:
+ printf("%s\n", rxTitle[*pBuf]);
+ break;
+
+ case TXMSG__:
+ printf("%s\n", txTitle[*pBuf]);
+ break;
+ default:
+ printf(" WRONG TYPE fed into db_BDump\n" );
+ wrongType = 1;
+ break;
+
+ } /* End of switch() */
+
+ if ( !wrongType )
+ {
+ /*
+ ** Count how many rows to print and if there
+ ** a non-full row
+ */
+
+ row = len/ROW_LEN; last_row = len%ROW_LEN;
+
+ /* Print all full rows */
+ if ( row )
+ {
+ for ( i=0; i<row; i++ )
+ {
+ for ( j=0;j<ROW_LEN;j++ )
+ printf("0x%02x ",*pBuf++);
+ printf("\n");
+ }
+ }
+
+ /* Print last row if any */
+ if ( last_row )
+ {
+ for ( i=0; i<last_row; i++)
+ printf("0x%02x ", *pBuf++);
+
+ printf("\n");
+ }
+ }
+
+} /* End of db_BDump() */
+
diff --git a/data/mnet/GP10/Host/rm/Src_init/sys_init.cpp b/data/mnet/GP10/Host/rm/Src_init/sys_init.cpp
new file mode 100644
index 0000000..e8e8a8f
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/Src_init/sys_init.cpp
@@ -0,0 +1,111 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __SYS_INIT_CPP__
+#define __SYS_INIT_CPP__
+
+#include <vxWorks.h>
+#include <msgQLib.h>
+
+#include "rm\sys_init.h"
+
+//DBGADDED
+#include "logging\vclogging.h"
+
+#include "rm\rm_itcmsg.h"
+#include "rm\rm_data.h"
+#include "rm\rm_oamif.h"
+#include "rm\debug.h"
+
+
+//DBGADDED
+DbgOutput rm_Dbg;
+
+T_CNI_L3_ID rm_id;
+MSG_Q_ID rm_MsgQId;
+rm_SmCtxts_t rm_SmCtxt;
+rm_IrtEntryId_t rm_TchfEntryId[16]; //TBD:RM_L1MAX_TCHFS];
+rm_IrtEntryId_t rm_Sdcch4EntryId[5]; //TBDRM_L1MAX_SDCCH4S];
+rm_OamData_t rm_OamData;
+
+rm_PhyChanTchf_t rm_PhyChanTchf;
+rm_PhyChanSdcch4_t rm_PhyChanSdcch4;
+
+unsigned char rm_DspCiphCap;
+
+void sys_Init(void)
+{
+ //Monitoring entrance to a function
+ //RDEBUG__(("ENTER-sys_Init\n"));
+
+ sys_CreateMsgQs();
+ sys_StartTasks();
+
+} //End of sys_Init()
+
+void sys_StartTasks(void)
+{
+ //Monitoring entrance to a function
+ //RDEBUG__(("ENTER-sys_StartTasks\n"));
+
+ //Start OAM task
+ //TBD
+
+ //Start LAPDm task
+ //TBD: ToGo signal is self-contained and following a task start.
+ // e.g. LAPDm initialization function will follow start of LAPDm
+ // task: CNI_LAPDm_Initialization();
+
+ //Start MD task
+ //TBD
+
+ //Start CC task
+ //TBD
+
+ //Start MM task
+ //TBD
+
+ //Start RM task
+ //TBD
+
+ //Start L1IF task
+ //TBD
+
+} //End of sys_StartTasks()
+
+void sys_CreateMsgQs(void)
+{
+ //Monitoring entrance to a function
+ //RDEBUG__(("ENTER-sys_CreateMsgQs\n"));
+
+ //Create message queue for RM module
+ rm_MsgQId = msgQCreate (
+ RM_MAX_RXMSGS, //Max # of messages
+ sizeof(rm_ItcRxMsg_t), //Max length of msg
+ MSG_Q_PRIORITY //Priority-type que
+ );
+
+ if( rm_MsgQId == NULL )
+ //EDEBUG__(("ERROR-sys_init:RM message queue creation failed\n"));
+ printf("ERROR-sys_init:RM message queue creation failed\n");
+ else
+ {
+ //Generate L3 ID for RM for use by rm_InitIRT()
+ //TDEBUG__(("TRACK-sys_Init: RM incoming message Q created ! \n"));
+ rm_id.msgq_id = rm_MsgQId;
+ rm_id.sub_id = RM_L3_SUBID;
+ }
+
+ //Create message queue for MM module
+ //TBD
+ //Create message queue for CC module
+ //TBD
+
+} //End of sys_CreateMsgQs()
+
+#endif //__SYS_INIT_CPP__
diff --git a/data/mnet/GP10/Host/rm/include/api_SendMsgFromRmToMm.h b/data/mnet/GP10/Host/rm/include/api_SendMsgFromRmToMm.h
new file mode 100644
index 0000000..4d5adf3
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/include/api_SendMsgFromRmToMm.h
@@ -0,0 +1,17 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __API_SENDMSGFROMRMTOMM_H__
+#define __API_SENDMSGFROMRMTOMM_H__
+
+void api_SendMsgFromRmToMm (
+ unsigned short length,
+ unsigned char *msg
+ );
+
+#endif /* __API_SENDMSGFROMRMTOMM_H__ */
diff --git a/data/mnet/GP10/Host/rm/include/cc_user.dat b/data/mnet/GP10/Host/rm/include/cc_user.dat
new file mode 100644
index 0000000..50a92eb
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/include/cc_user.dat
Binary files differ
diff --git a/data/mnet/GP10/Host/rm/include/debug.new.h b/data/mnet/GP10/Host/rm/include/debug.new.h
new file mode 100644
index 0000000..3b2e90e
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/include/debug.new.h
@@ -0,0 +1,78 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __DEBUG_H__
+#define __DEBUG_H__
+
+#include "stdio.h"
+
+#define ROW_LEN 10
+
+/*
+** MARCO definitions for dubug purpose
+*/
+
+#define MAREA__ 0
+#define RXMSG__ 1
+#define TXMSG__ 2
+
+
+#define RDEBUG__(X) if (__RDEBUG__) \
+ printf X; \
+ else \
+ __DEBUGVAR__ = 0
+
+#define EDEBUG__(X) if (__EDEBUG__) \
+ printf X; \
+ else \
+ __DEBUGVAR__ = 0
+
+#define DDEBUG__(X) if (__DDEBUG__) \
+ printf X; \
+ else \
+ __DEBUGVAR__ = 0
+
+#define UDEBUG__(X) if (__UDEBUG__) \
+ printf X; \
+ else \
+ __DEBUGVAR__ = 0
+
+#define PDEBUG__(X) if (__PDEBUG__) \
+ printf X; \
+ else \
+ __DEBUGVAR__ = 0
+
+#define TDEBUG__(X) if (__TDEBUG__) \
+ printf X; \
+ else \
+ __DEBUGVAR__ = 0
+
+#define BDUMP__(X) if (__BDUMP__) \
+ db_BDump X; \
+ else \
+ __DEBUGVAR__ = 0
+
+#define EDUMP__(X) if (__EDUMP__) \
+ db_BDump X; \
+ else \
+ __DEBUGVAR__ = 0
+
+#define UDUMP__(X) if (__UDUMP__) \
+ db_BDump X; \
+ else \
+ __DEBUGVAR__ = 0
+
+#define TDUMP__(X) if (__TDUMP__) \
+ db_BDump X; \
+ else \
+ __DEBEGVAR__ = 0
+
+void db_BDump ( unsigned char, unsigned char *, unsigned short );
+
+#endif /* __DEBUG_H__ */
+
diff --git a/data/mnet/GP10/Host/rm/include/rm_l1msg.h b/data/mnet/GP10/Host/rm/include/rm_l1msg.h
new file mode 100644
index 0000000..471a01b
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/include/rm_l1msg.h
@@ -0,0 +1,132 @@
+/*
+********************************************************************
+**
+** (c) Copyright Cisco 2000
+** All Rights Reserved
+**
+*********************************************************************
+*/
+#ifndef __RM_L1MSG_H__
+#define __RM_L1MSG_H__
+
+#include "rm/rm_const.h"
+//#include "rm/rm_types.h"
+
+
+typedef struct {
+ u8 msgGroup;
+ u8 filler;
+ u16 msgType;
+
+} rm_L1TxMsgHeader_t;
+
+typedef struct {
+ rm_L1TxMsgHeader_t header;
+ u8 trxNumber;
+ u8 airIfStd;
+ u8 bsic;
+} rm_L1TrxConfig_t;
+
+typedef struct {
+ rm_L1TxMsgHeader_t header;
+ u8 trxNumber;
+ u8 slotNumber;
+ u8 chanComb;
+} rm_L1SlotActiv_t;
+
+typedef struct {
+ rm_L1TxMsgHeader_t header;
+ u8 trxNumber;
+ u8 sysInfoType;
+ u8 l3Info[RM_L1MAX_SYSINFO_LEN];
+} rm_L1SacchFill_t;
+
+typedef struct {
+ rm_L1TxMsgHeader_t header;
+ u8 trxNumber;
+ u8 uplinkSGainCtrlSetting;
+} rm_L1SetUGain_t;
+
+typedef struct {
+ rm_L1TxMsgHeader_t header;
+ u16 trxNumber;
+ u8 downlinkSGainCtrlSetting;
+} rm_L1SetDGain_t;
+
+typedef struct {
+ rm_L1TxMsgHeader_t header;
+ u16 trxNumber;
+ u8 synthSelect;
+ u8 synchSettingMSB;
+ u8 synchSettingLSB;
+} rm_L1TuneSynth_t;
+
+typedef struct {
+ rm_L1TxMsgHeader_t header;
+ u16 trxNumber;
+ u8 ulFpgaDelayMSB;
+ u8 ulFpgaDelayLSB;
+ u8 dlFpgaDelayMSB;
+ u8 dlFpgaDelayLSB;
+} rm_L1ConfigFpgaDelay_t;
+
+typedef struct {
+ rm_L1TxMsgHeader_t header;
+ u8 trxNumber;
+ u8 absoluteFrameNo[RM_L1SYNCH_CHANINFO_LEN];
+} rm_L1Synch_t;
+
+typedef struct {
+ rm_L1TxMsgHeader_t header;
+ u8 trxNumber;
+ u8 chanNumberMSB;
+ u8 chanNumberLSB;
+} rm_L1BcchInfo_t;
+
+typedef union
+{
+ rm_L1TxMsgHeader_t header;
+ rm_L1TrxConfig_t rm_L1TrxConfig;
+ rm_L1SlotActiv_t rm_L1SlotActiv;
+ rm_L1SacchFill_t rm_L1SacchFill;
+ rm_L1SetUGain_t rm_L1SetUGain;
+ rm_L1SetDGain_t rm_L1SetDGain;
+ rm_L1TuneSynth_t rm_L1TuneSynth;
+ rm_L1ConfigFpgaDelay_t rm_L1ConfigFpgaDelay;
+ rm_L1Synch_t rm_L1Synch;
+ rm_L1BcchInfo_t rm_L1BcchInfo;
+} rm_L1TxMsg_t;
+
+#if 0
+typedef union //TBD
+{
+ rm_L1RxMsgHeader_t header;
+ rm_L1TrxConfigAck_t rm_L1TrxConfigAck; <TBD>
+ rm_L1SlotActivAck_t rm_L1SlotActivAck; <TBD>
+ rm_L1SlotActivNAck_t rm_L1SlotActivNAck; <TBD>
+ rm_L1SynchAck_t rm_L1SynchAck; <TBD>
+
+} rm_L1RxMsg_t
+
+#endif
+
+typedef struct {
+ u16 msgLength;
+ u8 buffer[RM_L1MAX_SYSINFO_LEN];
+} rm_L1SysInfo_t;
+
+typedef struct {
+ u8 synthSelect; /* UL Synth A/B, DL Synth A/B */
+ u8 synthSettingMSB;
+ u8 synthSettingLSB;
+ u8 filler;
+} rm_L1TrxSynthSetting_t;
+
+typedef struct {
+ u8 ulFpgaDelayMSB;
+ u8 ulFpgaDelayLSB;
+ u8 dlFpgaDelayMSB;
+ u8 dlFpgaDelayLSB;
+} rm_L1TrxFpgaDelay_t;
+
+#endif /* __RM_L1MSG_H__ */
diff --git a/data/mnet/GP10/Host/rm/test/Makefile b/data/mnet/GP10/Host/rm/test/Makefile
new file mode 100644
index 0000000..cb33389
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/test/Makefile
@@ -0,0 +1,16 @@
+# Makefile - makefile skeleton for test.c
+#
+# Copyright (C) 1996 Wind River Systems, Inc.
+#
+# This file was generated via the Tornado Project Facility.
+#
+
+CPU = I80486
+TOOL = gnu
+ROOT = K:\workdirs\integration
+#RRM=K:\Workdirs\integration\Rm
+#ADDED_C++FLAGS = -g -I$(RRM)\include -I$(ROOT)
+include K:\workdirs\xiaode\integration\rm\build\defs.bsp
+include K:\workdirs\xiaode\integration\rm\build\make.$(CPU)$(TOOL)
+include K:\workdirs\xiaode\integration\rm\build\defs.$(WIND_HOST_TYPE)
+include K:\workdirs\xiaode\integration\rm\build\rules.bsp
diff --git a/data/mnet/GP10/Host/rm/test/ctdt.c b/data/mnet/GP10/Host/rm/test/ctdt.c
new file mode 100644
index 0000000..f0f4ad0
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/test/ctdt.c
@@ -0,0 +1,22 @@
+/* ctors and dtors arrays -- to be used by runtime system */
+/* to call static constructors and destructors */
+/* */
+/* NOTE: Use a C compiler to compile this file. If you */
+/* are using GNU C++, be sure to use compile this */
+/* file using GNU C and the -traditional flag. */
+
+typedef void (*VOIDFUNCPTR) (); /* ptr to function returning void */
+
+
+extern VOIDFUNCPTR _ctors[];
+VOIDFUNCPTR _ctors[] =
+ {
+ 0
+ };
+
+
+extern VOIDFUNCPTR _dtors[];
+VOIDFUNCPTR _dtors[] =
+ {
+ 0
+ };
diff --git a/data/mnet/GP10/Host/rm/test/defs.bsp b/data/mnet/GP10/Host/rm/test/defs.bsp
new file mode 100644
index 0000000..ea3be86
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/test/defs.bsp
@@ -0,0 +1,143 @@
+# defs.bsp - bsp default makefile definitions
+#
+# Copyright 1984-1997, Wind River Systems, Inc.
+#
+# modification history
+# --------------------
+# 02g,20jan97,yp added -P to CFLAGS_AS to suppress "#line" directives
+# 02f,06dec97,yp moved soft-float back to CFLAGS
+# 02e,02jan97,dat added DOC_FLAGS, EXTRA_DOC_FLAGS
+# 02d,17dec96,yp moved soft-float to OPTIM macros so drvs get built without it
+# 02c,04oct96,yp added .cxx sufix
+# 02b,31oct96,yp added definition for GCC_EXEC_PREFIX. added TCL def.
+# added CFLAGS_AS. redid CFLAGS and C++FLAGS for new build
+# 02a,31oct96,kkk fixed typo in C++FLAGS line.
+# 01z,21jun96,dat added -traditional to COMPILE_SYMTBL (#6517),
+# added copyright
+# 01y,01apr96,srh added Rogue Wave multithread defns.
+# 01x,13nov95,jeh added CF define, changed CXX define to $(CC).
+# 01w,13nov95,jeh renamed C++ define to be CXX.
+# 01v,11nov95,jeh fixed typo in C++FLAGS define (missing $ in $(C++_COMPILER))
+# 01u,07nov95,p_m Removed previous change
+# 01t,04nov95,p_m Added sysSerial to DOC_FILES
+# 01s,01nov95,yp Added rules for C++ support
+# 01r,24oct95,dat recovered CONFIG_ALL and changed CC_INCLUDE, moved LIB_EXTRA
+# 01q,20jun95,yp removed -pedatic flag. added machros for bin tool names
+# 01p,15jun95,yp removed defintions for CPU and TOOL.
+# 01o,01jun95,yp derived from make.defaults
+#
+# DESCRIPTION
+# This file is included into bsp makefiles to define the default makefile
+# definitions. After the include the Makefile may customize the definitions
+# found here to suit the circumstance.
+#
+# Redefinitions of make variables earlier than the include of this file will
+# have no affect.
+#
+
+.SUFFIXES: .cpp .out .cxx
+
+## exe target is the cannonical starting point.
+
+default : exe
+
+## TARGET_DIR still used for backward compatibility
+
+BSP_NAME = $(TARGET_DIR)
+
+## default flags
+
+CFLAGS = $(CC_ARCH_SPEC) $(CC_COMPILER) $(CC_OPTIM) $(CC_WARNINGS) \
+ $(CC_INCLUDE) $(CC_DEFINES) $(ADDED_CFLAGS) \
+ $(CC_SOFT_FLOAT)
+
+C++FLAGS = $(CC_ARCH_SPEC) $(C++_COMPILER) $(CC_OPTIM) $(C++_WARNINGS) \
+ $(CC_INCLUDE) $(CC_DEFINES) $(ADDED_C++FLAGS) \
+ $(CC_SOFT_FLOAT)
+
+CASFLAGS = -E $(CC_INCLUDE) $(CC_DEFINES)
+# We now call the compiler driver to precrocess and assemble .s file
+CFLAGS_AS = $(CC_ARCH_SPEC) $(CC_COMPILER) $(CC_OPTIM) $(CC_INCLUDE) \
+ $(CC_DEFINES) $(ADDED_CFLAGS) -P -x assembler-with-cpp
+CC_WARNINGS = $(CC_WARNINGS_ALL)
+CC_OPTIM = $(CC_OPTIM_TARGET)
+CC_INCLUDE = -I$(UP)/h $(INCLUDE_CC) $(EXTRA_INCLUDE) \
+ -I. -I$(CONFIG_ALL) -I$(TGT_DIR)/h -I$(TGT_DIR)/src/config \
+ -I$(TGT_DIR)/src/drv
+CC_DEFINES = -DCPU=$(CPU) $(DEFINE_CC) $(EXTRA_DEFINE)
+
+# Current cpp compiler generates symbols with $ signs. Need -traditional
+# to accept such names as valid symbols. - dat, 6/96 (SPR #6517)
+COMPILE_SYMTBL = $(CC) -c $(CFLAGS)
+
+
+## only customize things below this point
+
+RELEASE = vxWorks vxWorks.st bootrom.hex
+
+## toolchain flags
+
+CC_WARNINGS_ALL = -Wall
+CC_WARNINGS_NONE=
+C++_WARNINGS = $(CC_WARNINGS_NONE)
+
+# We now define GCC_EXEC_PREFIX so that we can call the compiler with
+# the -B flag suggesting where support tools may be found. Previously
+# we required the user to set GCC_EXEC_PREFIX as an environment variable
+
+
+GCC_EXEC_PREFIX=$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/
+
+CC_OPTIM_DRIVER =
+CC_OPTIM_NORMAL = -O -fstrength-reduce -fcombine-regs
+CC_OPTIM_TARGET = -O -fvolatile
+
+CC_COMPILER = -nostdinc
+#CC_COMPILER = -ansi -pedantic -nostdinc
+
+# RW_MULTI_THREAD and _REENTRANT required for WFC
+C++_COMPILER = -ansi -nostdinc -DRW_MULTI_THREAD -D_REENTRANT
+
+## toolchain binaries
+
+AR = ar
+AS = as
+CC = cc
+CF = CC
+CXX = $(CC)
+LD = ld
+MUNCH = munch
+NM = nm
+RANLIB = ranlib
+CPP = cpp
+TCL = wtxtcl
+
+## bsp flags
+
+LD_LOW_FLAGS = -Ttext $(RAM_LOW_ADRS)
+LD_HIGH_FLAGS = -Ttext $(RAM_HIGH_ADRS)
+RES_LOW_FLAGS = -Ttext $(ROM_TEXT_ADRS) -Tdata $(RAM_LOW_ADRS)
+RES_HIGH_FLAGS = -Ttext $(ROM_TEXT_ADRS) -Tdata $(RAM_HIGH_ADRS)
+
+ROM_ENTRY = _romInit
+SYS_ENTRY = _sysInit
+USR_ENTRY = _usrInit
+
+LDFLAGS = -X -N
+LD_PARTIAL_FLAGS= -X -r
+
+MACH_DEP = sysALib.o sysLib.o $(MACH_EXTRA) $(ADDED_MODULES)
+
+## libraries
+
+LIBS = $(LIB_EXTRA) $(TGT_DIR)/lib/lib$(CPU)$(TOOL)vx.a
+
+## documentation files
+
+DOC_FILES = sysLib tyCoDrv
+DOC_FLAGS = -DDOC -DINCLUDE_SCSI -DINCLUDE_SHOW_ROUTINES \
+ $(EXTRA_DOC_FLAGS)
+
+EXTRACT_BIN_NAME = aoutToBin
+BINXSYM_NAME = xsym
+BINHEX_NAME = hex
diff --git a/data/mnet/GP10/Host/rm/test/defs.x86-win32 b/data/mnet/GP10/Host/rm/test/defs.x86-win32
new file mode 100644
index 0000000..27bae89
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/test/defs.x86-win32
@@ -0,0 +1,71 @@
+# defs.x86-win32 - Host specific default definitions
+#
+# modification history
+# --------------------
+# 01m,21jan97,j_k Fixed DIRCHAR to be result of a macro.
+# 01l,17aug96,yp Added definition of LIBDIR and BSPBUILD_TCL and DIRCHAR
+# 01k,18aug96,ms use deflate to compress bootROM images
+# 01j,06jun96,dat SPR 6141, proper use of TGT_DIR
+# 01i,18apr96,dat
+# +yp added MKPREP
+# 01h,06mar96,dat removed makeVersion
+# 01g,13nov95,p_m added DEMO_DIR.
+# 01f,03nov95,yp Made CPP arch specific .s.o targets don't get generate
+# 01g,24oct95,dat recovered CONFIG_ALL
+# 01f,31jul95,jmb changed 'rm' to 'vxrm' and added CC_DEBUG
+# 01e,28jul95,sks removed 'echo' and replaced with '@rem' for 'true'
+# 01d,25jul95,jmb added VX_CPU_FAMILY for romsize and vxsize
+# 01c,14jul95,yp added definition for VXSIZEPROG
+# 01b,19jun95,yp allowed arch. specific tools to be inherited from
+# make.$(CPU)$(TOOL)
+# 01a,01jun95,yp created
+#
+# DESCRIPTION
+# This file contains default definitions, and flags used in building targets
+# that are host specific to win32.
+#
+
+DIRCHAR = $(subst x,\,x)
+
+## directories
+
+BIN_DIR = $(WIND_BASE)\host\$(WIND_HOST_TYPE)\bin
+TGT_DIR = $(WIND_BASE)\target
+CONFIG_ALL = $(TGT_DIR)\config\all
+DEMO_DIR = $(TGT_DIR)\lib\obj$(CPU)$(TOOL)test
+LIBDIR = $(TGT_DIR)\lib\$(LIBDIRNAME)
+
+## tools
+
+EXTRACT_BIN = $(BIN_DIR)\$(EXTRACT_BIN_NAME)
+BINXSYM = $(BIN_DIR)\$(BINXSYM_NAME)
+BINHEX = $(BIN_DIR)\$(BINHEX_NAME)
+COMPRESS = $(BIN_DIR)\deflate
+ROMSIZEPROG = $(BIN_DIR)\romsize $(VX_CPU_FAMILY)
+VXSIZEPROG = $(BIN_DIR)\vxsize $(VX_CPU_FAMILY)
+MKSYMTBL = $(BIN_DIR)\makeSymTbl $(VX_CPU_FAMILY)
+BINTOASM = $(BIN_DIR)\binToAsm
+LDOUT_SYMS = @rem
+LDOUT_CONV = @rem
+LDOUT_HOST = @rem
+MV_BIN = @rem
+RM = vxrm
+CP = copy
+CPP = $(BIN_DIR)\cpp$(VX_CPU_FAMILY)
+ASM_P1 = type
+ASM_P2 = type
+MKPREP = $(BIN_DIR)\mkprep
+TARGET =
+BSPBUILD_TCL = $(BIN_DIR)\bspBuild.tcl
+
+## files
+
+USRCONFIG = $(CONFIG_ALL)\usrConfig.c
+BOOTCONFIG = $(CONFIG_ALL)\bootConfig.c
+BOOTINIT = $(CONFIG_ALL)\bootInit.c
+DATASEGPAD = $(CONFIG_ALL)\dataSegPad.c
+CONFIG_ALL_H = $(CONFIG_ALL)\configAll.h
+
+## miscellaneous
+
+CFLAGS += $(CC_DEBUG)
diff --git a/data/mnet/GP10/Host/rm/test/integ b/data/mnet/GP10/Host/rm/test/integ
new file mode 100644
index 0000000..493ba9a
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/test/integ
@@ -0,0 +1,35 @@
+ld < K:/Workdirs/integration/rm.back/I80486/l2l3.out
+ld < K:/Workdirs/integration/lapdm/I80486/test.o
+ld < K:/Workdirs/integration/jcc/I80486/jcc.out
+ld < K:/Workdirs/integration/mm/I80486/mmm.out
+
+CNI_LAPDM_Initialization
+cni_testInit
+
+#create a lapdm instance channel type 0, trx 0, channel num 1, link 1
+#CNI_LAPDM_Create_Instance(0, 0 , 0x2000, 0)
+#CNI_LAPDM_Create_Instance(0, 0 , 0x2800, 0)
+#CNI_LAPDM_Create_Instance(0, 0 , 0x3000, 0)
+#CNI_LAPDM_Create_Instance(0, 0 , 0x3800, 0)
+
+
+#L3 register a lapdm instance oid 0, sapi 0, layer3_id 10, and a call back function
+#CNI_LAPDM_Instance_Registration(0, 0, 0x20, cni_l3CallBack)
+#CNI_LAPDM_Instance_Registration(1, 0, 0x28, cni_l3CallBack)
+#CNI_LAPDM_Instance_Registration(2, 0, 0x30, cni_l3CallBack)
+#CNI_LAPDM_Instance_Registration(3, 0, 0x38, cni_l3CallBack)
+
+# Start MM Task and print its data
+mmInit
+mmDataPrint
+
+
+# Start RRM Task
+taskSpawn("rmTask",20, 0, 10000,rm_Main)
+
+#
+#initL1
+#newInitDsp
+#hpi2dsp(&cx6,0,0x3800)
+#newGo
+
diff --git a/data/mnet/GP10/Host/rm/test/kill b/data/mnet/GP10/Host/rm/test/kill
new file mode 100644
index 0000000..2596f6e
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/test/kill
@@ -0,0 +1,6 @@
+td mmMain
+td rmTask
+td lapdm_phserver
+td lapdm_dlserver
+i
+
diff --git a/data/mnet/GP10/Host/rm/test/make.I80486gnu b/data/mnet/GP10/Host/rm/test/make.I80486gnu
new file mode 100644
index 0000000..2abf06a
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/test/make.I80486gnu
@@ -0,0 +1,48 @@
+# make.I80486gnu - GNU compilation tools definitions for I80486
+#
+# modification history
+# --------------------
+# 01l,04oct96,yp Added -B option so compiler driver doesn't need EXEC_PREFIX,
+# added CC_ARCH_SPEC for machine specific flags
+# 01k,01nov95,yp Added NM definition for C++
+# 01j,21jun95,yp change definitions for BIN tools used in bsp build
+# 01i,19jun95,srh made C++ compiler name specific to cfront.
+# 01h,18jun95,srh added more C++ support.
+# 01g,28may95,srh workaround gmake problem with "C++=..."
+# 01f,25may95,jcf new environment variables
+# 01e,23may95,srh add C++ support
+# 01d,26apr94,hdn added -O flag.
+# 01c,08dec93,hdn added EXTRACT_BIN, BINXSYM, BINHEX.
+# 01b,17nov93,hdn added -fno-defer-pop flag.
+# 01a,09jun93,hdn written
+#
+# DESCRIPTION
+# This file contains I80486 specific definitions and flags for the GNU
+# software generation tools (compiler, assembler, linker etc.).
+#*/
+
+
+CPU=I80486
+TOOL=gnu
+
+CC_OPTIM_DRIVER = -fvolatile -nostdlib -fno-builtin -fno-defer-pop
+CC_OPTIM_NORMAL = -O -nostdlib -fno-builtin -fno-defer-pop
+CC_OPTIM_TARGET = -O -fvolatile -nostdlib -fno-builtin -fno-defer-pop
+CC_ARCH_SPEC = -m486
+
+AR=ar386
+AS=as386
+CC=cc386 -B$(GCC_EXEC_PREFIX)
+CF=CC386 -B$(GCC_EXEC_PREFIX)
+LD=ld386
+RANLIB=ranlib386
+NM=nm386
+
+EXTRACT_BIN_NAME = aoutToBinDec
+BINXSYM_NAME = xsymDec
+BINHEX_NAME = hexDec
+
+TOOLENV=386
+VX_CPU_FAMILY=386
+
+# end of make.I80486gnu
diff --git a/data/mnet/GP10/Host/rm/test/redirect b/data/mnet/GP10/Host/rm/test/redirect
new file mode 100644
index 0000000..a8cb5a7
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/test/redirect
@@ -0,0 +1,4 @@
+vf0=open("/vio/0", 2, 0)
+ioGlobalStdSet(0, vf0)
+ioGlobalStdSet(1, vf0)
+ioGlobalStdSet(2, vf0)
diff --git a/data/mnet/GP10/Host/rm/test/rules.bsp b/data/mnet/GP10/Host/rm/test/rules.bsp
new file mode 100644
index 0000000..6083567
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/test/rules.bsp
@@ -0,0 +1,582 @@
+# rules.bsp - makefile target rules for BSP
+#
+# modification history
+# --------------------
+# 01v,04mar97,tpr changed bootrom_res_res_high.hex by bootrom_res_high.hex
+# (SPR 8095)
+# 01u,13dec96,map Remove symTbl.c in target rule `clean' [SPR# 2637]
+# 01t,09dec96,tpr Added rule to remove ctdt.c for the 'clean' target.
+# 01s,04oct96,yp Added rules for building files with cxx extentions
+# 01r,23oct96,yp redid treatment of .s files so we don't create tmp
+# 01q,26sep96,dat removed edit 01k, was harming sparc & 960 BSPs. (SPR 7238)
+# 01p,19sep96,tpr merge PPC to tor1_0_1 release.
+# 01o,29aug96,ms removed "-f -b 15" after $(COMPRESS).
+# 01n,22aug96,map added romInit.o dependency to romInit_res* rules to fix
+# SPR# 7063
+# 01m,25jul96,tam replaced mips specific rom resident targets by ppc ones.
+# 01l,23jul96,kkk fixed build rules for romInit_res*.o for.
+# 01k,22jul96,tam added $(BOOT_EXTRA) where it was missing.
+# 01j,04apr96,srh added munching.
+# 01i,08mar96,yp added -P in implicite .s.o rule.
+# 01h,06mar96,dat new rules for version.o
+# 01g,13nov95,jeh restored .cpp.o implicit rule
+# 01f,08nov95,jeh removed .cpp.o implicit rule
+# 01e,01nov95,p_m added LIB to rom_res build command
+# 01d,01nov95,yp added implicit rules for C++
+# 01c,30oct95,dat added targets vxWorks.res_rom_nosym and
+# vxWorks.res_rom_nosym_mips
+# 01b,27jun95,kkk added VXSIZE.
+# 01a,12jun95,yp created from makeTarget2 v03d.
+#
+# DESCRIPTION
+# This file contains rules used in building targets.
+#
+# VARIABLES
+# The following variables must be defined (or not, as appropriate):
+#
+# ROM_SIZE number of bytes of ROM space as in config.h
+# LOCAL_MEM_SIZE target RAM size as in config.h
+# BINHEX binary->hex file conversion program
+# HEX_FLAGS BINHEX program options
+# LD_LOW_FLAGS ld(1) options for code in low memory
+# LD_HIGH_FLAGS ld options for code in high memory
+# LD_PARTIAL_FLAGS ld flags for linking partially complete objects
+# LDDEPS host-specific dependencies prerequisite to linking
+# LDOUT_CONV hpToBsd, coffToBsd, gswab, /bin/cat, etc.
+# COMPILE_SYMTBL hide flags needed to get compiler to swallow symTbl.c
+# ROM_ENTRY rom entry point (typically &romInit)
+# SYS_ENTRY system entry point (typically &sysInit)
+# USR_ENTRY compressed system entry point (typically &usrInit)
+#
+# The following variables are optionally defined:
+#
+# LDFLAGS standard ld flags for vxWorks & ROMs.
+# ROM_LDFLAGS ld flags specific to ROM image
+# MACH_EXTRA extra modules for all boot/vxWorks images
+# BOOT_EXTRA extra modules for compressed images only
+# RELEASE images made as part of WRS release step
+#
+# CONSTANTS
+# CPU cpu type
+#*/
+
+
+################################################################################
+#
+# meta build targets
+#
+
+## make will default to "exe"
+
+exe : vxWorks
+
+release : $(RELEASE)
+
+clean :
+ - $(RM) *.o
+ - $(RM) vxWorks*
+ - $(RM) bootrom*
+ - $(RM) ctdt.c
+ - $(RM) symTbl.c
+ - $(RM) depend.$(TARGET_DIR)
+
+.s.o :
+ @ $(RM) $@
+ $(CC) $(CFLAGS_AS) -c -o $@ $<
+
+.c.o :
+ @ $(RM) $@
+ $(CC) $(CFLAGS) -c $<
+
+# rule for munchless C++ compiles
+.cpp.o :
+ @ $(RM) $@
+ $(CXX) $(C++FLAGS) -c $<
+
+.cxx.o :
+ @ $(RM) $@
+ $(CXX) $(C++FLAGS) -c $<
+
+# C++ compile and munch
+.cpp.out :
+ @ $(RM) $@
+ $(CXX) $(C++FLAGS) -c $<
+ @ $(RM) $@ ctdt.c
+ $(NM) $*.o | munch > ctdt.c
+ $(MAKE) CC_COMPILER="-traditional" ctdt.o
+ $(LD) $(LD_PARTIAL_FLAGS) -o $@ $*.o ctdt.o
+ @ $(RM) ctdt.c ctdt.o
+
+.cxx.out :
+ @ $(RM) $@
+ $(CXX) $(C++FLAGS) -c $<
+ @ $(RM) $@ ctdt.c
+ $(NM) $*.o | munch > ctdt.c
+ $(MAKE) CC_COMPILER="-traditional" ctdt.o
+ $(LD) $(LD_PARTIAL_FLAGS) -o $@ $*.o ctdt.o
+ @ $(RM) ctdt.c ctdt.o
+
+
+################################################################################
+#
+# machine dependent targets
+
+romInit_res.o: depend.$(BSP_NAME) romInit.s romInit.o
+ - @ $(RM) $@
+ $(CC) $(CFLAGS_AS) -DROM_RESIDENT -c -o $@ romInit.s
+
+romInit_res_low.o: depend.$(BSP_NAME) romInit.s romInit.o
+ - @ $(RM) $@
+ $(CC) $(CFLAGS_AS) -DROM_RESIDENT \
+ -DRAM_DST_ADRS=0x$(RAM_LOW_ADRS) -c -o $@ romInit.s
+
+romInit_res_high.o: depend.$(BSP_NAME) romInit.s romInit.o
+ - @ $(RM) $@
+ $(CC) $(CFLAGS_AS) -DROM_RESIDENT \
+ -DRAM_DST_ADRS=0x$(RAM_HIGH_ADRS) -c -o $@ romInit.s
+
+usrConfig.o : depend.$(BSP_NAME) $(USRCONFIG)
+ - @ $(RM) $@
+ $(CC) -c $(CFLAGS) $(USRCONFIG) -o $@
+
+usrConfig_st.o : depend.$(BSP_NAME) $(USRCONFIG) usrConfig.o
+ - @ $(RM) $@
+ $(CP) $(USRCONFIG) usrConfig_st.c
+ $(CC) -c $(CFLAGS) -DSTANDALONE usrConfig_st.c
+ - @ $(RM) usrConfig_st.c
+
+bootConfig.o : depend.$(BSP_NAME) $(BOOTCONFIG)
+ - @ $(RM) $@
+ $(CC) -c $(CFLAGS) $(BOOTCONFIG)
+
+bootInit.o : depend.$(BSP_NAME) $(BOOTINIT)
+ - @ $(RM) $@
+ $(CC) -c $(CFLAGS) $(BOOTINIT)
+
+bootInit_res.o : depend.$(BSP_NAME) $(BOOTINIT) bootInit.o
+ - @ $(RM) $@
+ $(CP) $(BOOTINIT) bootInit_res.c
+ $(CC) -c $(CFLAGS) -DROM_RESIDENT bootInit_res.c
+ - @ $(RM) bootInit_res.c
+
+bootInit_res_low.o : depend.$(BSP_NAME) $(BOOTINIT)
+ - @ $(RM) $@
+ $(CP) $(BOOTINIT) bootInit_res_low.c
+ $(CC) -c $(CFLAGS) -DROM_RESIDENT \
+ -DRAM_DST_ADRS=0x$(RAM_LOW_ADRS) bootInit_res_low.c
+ - @ $(RM) bootInit_res_low.c
+
+bootInit_res_high.o : depend.$(BSP_NAME) $(BOOTINIT)
+ - @ $(RM) $@
+ $(CP) $(BOOTINIT) bootInit_res_high.c
+ $(CC) -c $(CFLAGS) -DROM_RESIDENT \
+ -DRAM_DST_ADRS=0x$(RAM_HIGH_ADRS) bootInit_res_high.c
+ - @ $(RM) bootInit_res_high.c
+
+bootInit_uncmp.o : depend.$(BSP_NAME) $(BOOTINIT) bootInit.o
+ - @ $(RM) $@
+ $(CP) $(BOOTINIT) bootInit_uncmp.c
+ $(CC) -c $(CFLAGS) -DUNCOMPRESS bootInit_uncmp.c
+ - @ $(RM) bootInit_uncmp.c
+
+bootInit_st.o : depend.$(BSP_NAME) $(BOOTINIT) bootInit.o
+ - @ $(RM) $@
+ $(CP) $(BOOTINIT) bootInit_st.c
+ $(CC) -c $(CFLAGS) -DRAM_DST_ADRS=0x$(RAM_LOW_ADRS) bootInit_st.c
+ - @ $(RM) bootInit_st.c
+
+
+bootInit_uncmp_res.o : depend.$(BSP_NAME) $(BOOTINIT) bootInit.o
+ - @ $(RM) $@
+ $(CP) $(BOOTINIT) bootInit_uncmp_res.c
+ $(CC) -c $(CFLAGS) -DROM_RESIDENT -DUNCOMPRESS bootInit_uncmp_res.c
+ - @ $(RM) bootInit_uncmp_res.c
+
+dataSegPad.o: depend.$(BSP_NAME) $(DATASEGPAD) $(CONFIG_ALL_H) config.h
+ - @ $(RM) $@
+ $(CC) -c $(CFLAGS) $(DATASEGPAD) -o $@
+
+################################## vxWorks #####################################
+#
+# vxWorks - normal vxWorks system
+# vxWorks.sym - symbol table of vxWorks
+
+vxWorks vxWorks.sym : depend.$(BSP_NAME) usrConfig.o dataSegPad.o \
+ $(MACH_DEP) $(LDDEPS) $(LIBS)
+ - @ $(RM) vxWorks vxWorks.sym
+ - @ $(RM) version.o
+ - @ $(RM) vxWorks.tmp ctdt.c ctdt.o
+ $(CC) -c $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
+ $(LD) $(LDFLAGS) $(LD_PARTIAL_FLAGS) \
+ -o vxWorks.tmp $(MACH_DEP) usrConfig.o version.o $(LIBS)
+ $(NM) vxWorks.tmp | $(MUNCH) >ctdt.c
+ $(MAKE) CC_COMPILER="-traditional" ctdt.o
+ $(LD) $(LDFLAGS) -e $(SYS_ENTRY) $(LD_LOW_FLAGS) \
+ -o vxWorks dataSegPad.o vxWorks.tmp ctdt.o
+ - @ $(RM) vxWorks.tmp
+ $(LDOUT_HOST) vxWorks
+ $(LDOUT_CONV) vxWorks
+ $(BINXSYM) < vxWorks > vxWorks.sym
+ $(LDOUT_SYMS) vxWorks.sym
+ $(VXSIZEPROG) -v $(RAM_HIGH_ADRS) $(RAM_LOW_ADRS) vxWorks
+
+# vxWorks_rom - rommable version of VxWorks (without standalone symbol table)
+# This is typically used when making an application in ROM that doesn't
+# include the shell and the symbol table. Since these applications are
+# usually smaller, this version doesn't use ROM compression.
+
+vxWorks_rom : depend.$(BSP_NAME) bootInit_uncmp.o romInit.o \
+ dataSegPad.o usrConfig.o $(MACH_DEP) $(LDDEPS) $(LIBS)
+ - @ $(RM) $@
+ - @ $(RM) $(IMI)
+ - @ $(RM) $(IBR)
+ - @ $(RM) version.o
+ - @ $(RM) ctmp.o ctdt.c ctdt.o
+ $(CC) -c $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
+ $(LD) $(LDFLAGS) $(LD_PARTIAL_FLAGS) \
+ -o ctmp.o usrConfig.o \
+ $(MACH_DEP) version.o $(LIBS)
+ $(NM) ctmp.o | $(MUNCH) > ctdt.c
+ $(MAKE) CC_COMPILER="-traditional" ctdt.o
+ $(LD) $(LDFLAGS) -e $(ROM_ENTRY) $(LD_LOW_FLAGS) \
+ -o $@ romInit.o bootInit_uncmp.o dataSegPad.o \
+ ctmp.o ctdt.o
+ - @ $(RM) ctmp.o
+ $(LDOUT_HOST) $@
+ $(ROMSIZEPROG) -b $(ROM_SIZE) $@
+ $(LDOUT_CONV) $@
+
+vxWorks_rom.hex : depend.$(BSP_NAME) vxWorks_rom $(IMI)
+ - @ $(RM) $@
+ $(BINHEX) $(HEX_FLAGS) $(SECT_SPEC)vxWorks_rom$(TXT_OFFSET) \
+ $(IMI_SPEC)$(IMI)$(IMI_OFFSET) > $@$(MAP_EXT)
+ -@ $(MV_BIN)
+
+# vxWorks.st - standalone VxWorks with symbol table linked in
+# This builds a VxWorks image that contains the symbol table linked in,
+# instead of loading it over the network.
+
+vxWorks.st : depend.$(BSP_NAME) usrConfig_st.o dataSegPad.o \
+ $(MACH_DEP) $(LDDEPS) $(LIBS)
+ - @ $(RM) $@
+ - @ $(RM) symTbl.c
+ - @ $(RM) symTbl.o
+ - @ $(RM) tmp.o
+ - @ $(RM) tmp.2
+ - @ $(RM) version.o
+ - @ $(RM) ctdt.c ctdt.o
+ $(CC) -c $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
+ $(LD) -o tmp.o $(LD_PARTIAL_FLAGS) dataSegPad.o $(MACH_DEP) \
+ usrConfig_st.o version.o $(LIBS)
+ $(NM) tmp.o | $(MUNCH) >ctdt.c
+ $(MAKE) CC_COMPILER="-traditional" ctdt.o
+ $(CP) tmp.o tmp.2
+ $(LDOUT_SYMS) tmp.o
+ $(MKSYMTBL) tmp.o > symTbl.c
+ $(COMPILE_SYMTBL) symTbl.c
+ $(LD) $(LDFLAGS) -e $(SYS_ENTRY) $(LD_LOW_FLAGS) \
+ -o $@ tmp.2 symTbl.o ctdt.o
+ $(LDOUT_SYMS) $@
+ $(LDOUT_CONV) $@
+ $(VXSIZEPROG) -v $(RAM_HIGH_ADRS) $(RAM_LOW_ADRS) vxWorks.st
+ - @ $(RM) tmp.?
+
+# vxWorks.st_rom - rommable standalone version using ROM compression
+# This builds a standalone VxWorks image that can be put in ROM.
+# It includes a linked in symbol table so that a complete VxWorks with
+# shell and symbol table can be put in ROM. Since these systems tend to
+# be larger, ROM compression is used.
+# Note: this uses larger EEPROMs, the user is advised to check the
+# macros for ROM sizes and offsets for compatibility.
+
+vxWorks.st.Z.s : depend.$(BSP_NAME) usrConfig_st.o dataSegPad.o \
+ $(MACH_DEP) $(LDDEPS) $(LIBS)
+ - @ $(RM) $@
+ - @ $(RM) tmp.o
+ - @ $(RM) tmp.1
+ - @ $(RM) tmp.2
+ - @ $(RM) tmp.Z
+ - @ $(RM) symTbl.c
+ - @ $(RM) symTbl.o
+ - @ $(RM) version.o
+ - @ $(RM) ctdt.c ctdt.o
+ $(CC) -c $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
+ $(LD) -o tmp.1 $(LD_PARTIAL_FLAGS) dataSegPad.o $(MACH_DEP) \
+ usrConfig_st.o version.o $(LIBS)
+ $(NM) tmp.1 | $(MUNCH) >ctdt.c
+ $(MAKE) CC_COMPILER="-traditional" ctdt.o
+ $(CP) tmp.1 tmp.o
+ $(LDOUT_SYMS) tmp.o
+ $(MKSYMTBL) tmp.o >symTbl.c
+ $(COMPILE_SYMTBL) symTbl.c
+ $(LD) -o tmp.2 $(LDFLAGS) $(ROM_LDFLAGS) -e $(SYS_ENTRY) \
+ $(LD_LOW_FLAGS) tmp.1 symTbl.o ctdt.o
+ $(LDOUT_HOST) tmp.2
+ $(LDOUT_CONV) tmp.2
+ $(EXTRACT_BIN) < tmp.2 | $(COMPRESS) >tmp.Z
+ $(BINTOASM) tmp.Z > $@
+ - @ $(RM) tmp.?
+
+vxWorks.st_rom : depend.$(BSP_NAME) bootInit_st.o romInit.o \
+ vxWorks.st.Z.o $(LDDEPS) $(LIBS) $(BOOT_EXTRA)
+ - @ $(RM) $(IMI)
+ - @ $(RM) $(IBR)
+ - @ $(RM) version.o
+ $(CC) -c $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
+ $(LD) $(LDFLAGS) -e $(ROM_ENTRY) $(LD_HIGH_FLAGS) \
+ -o $@ romInit.o bootInit_st.o version.o $(BOOT_EXTRA) \
+ $(LIBS) vxWorks.st.Z.o
+ $(ROMSIZEPROG) -b $(ROM_SIZE) $@
+ $(LDOUT_CONV) $@
+
+vxWorks.st_rom.hex : depend.$(BSP_NAME) vxWorks.st_rom $(IMI)
+ - @ $(RM) $@
+ $(BINHEX) $(HEX_FLAGS) $(SECT_SPEC)vxWorks.st_rom$(TXT_OFFSET) \
+ $(IMI_SPEC)$(IMI)$(IMI_OFFSET) > $@$(MAP_EXT)
+ -@ $(MV_BIN)
+
+# vxWorks.res_rom - rommable standalone version without compression
+# This builds a standalone VxWorks image that can be put in ROM.
+# It includes a linked in symbol table so that a complete VxWorks with
+# shell and symbol table can be put in ROM. Only the data segment
+# of this ROM image is copied into RAM.
+
+vxWorks.res_rom: depend.$(BSP_NAME) bootInit_res.o romInit_res.o \
+ usrConfig_st.o $(MACH_DEP) $(LDDEPS) $(LIBS)
+ - @ $(RM) $@ tmp.o
+ - @ $(RM) tmp.1
+ - @ $(RM) symTbl.c
+ - @ $(RM) symTbl.o
+ - @ $(RM) $(IMI)
+ - @ $(RM) $(IBR)
+ - @ $(RM) version.o
+ - @ $(RM) ctdt.c ctdt.o
+ $(CC) -c $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
+ $(LD) -o tmp.o $(LD_PARTIAL_FLAGS) \
+ $(MACH_DEP) usrConfig_st.o version.o $(LIBS)
+ $(NM) tmp.o | $(MUNCH) >ctdt.c
+ $(MAKE) CC_COMPILER="-traditional" ctdt.o
+ $(CP) tmp.o tmp.1
+ $(LDOUT_SYMS) tmp.1
+ $(MKSYMTBL) tmp.1 > symTbl.c
+ $(COMPILE_SYMTBL) symTbl.c
+ $(LD) -o $@ $(LDFLAGS) $(ROM_LDFLAGS) -e $(ROM_ENTRY) \
+ $(RES_LOW_FLAGS) romInit_res.o bootInit_res.o symTbl.o \
+ tmp.o $(LIBS) ctdt.o
+ $(LDOUT_HOST) $@
+ $(ROMSIZEPROG) -b $(ROM_SIZE) $@
+ $(LDOUT_CONV) $@
+ - @ $(RM) tmp.?
+
+vxWorks.res_rom_res_low: depend.$(BSP_NAME) bootInit_res_low.o \
+ romInit_res_low.o usrConfig_st.o $(MACH_DEP) $(LDDEPS) $(LIBS)
+ - @ $(RM) $@
+ - @ $(RM) tmp.o
+ - @ $(RM) tmp.1
+ - @ $(RM) symTbl.c
+ - @ $(RM) symTbl.o
+ - @ $(RM) $(IMI)
+ - @ $(RM) $(IBR)
+ - @ $(RM) version.o
+ - @ $(RM) ctdt.c ctdt.o
+ $(CC) -c $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
+ $(LD) -o tmp.o $(LD_PARTIAL_FLAGS) \
+ $(MACH_DEP) usrConfig_st.o version.o $(LIBS)
+ $(NM) tmp.o | $(MUNCH) >ctdt.c
+ $(MAKE) CC_COMPILER="-traditional" ctdt.o
+ $(CP) tmp.o tmp.1
+ $(LDOUT_SYMS) tmp.1
+ $(MKSYMTBL) tmp.1 > symTbl.c
+ $(COMPILE_SYMTBL) symTbl.c
+ $(LD) -o $@ $(LDFLAGS) $(ROM_LDFLAGS) -e $(ROM_ENTRY) \
+ $(RES_LOW_FLAGS) romInit_res_low.o bootInit_res_low.o \
+ symTbl.o tmp.o ctdt.o
+ $(LDOUT_HOST) $@
+ $(ROMSIZEPROG) -b $(ROM_SIZE) $@
+ $(LDOUT_CONV) $@
+ - @ $(RM) tmp.?
+
+vxWorks.res_rom.hex: depend.$(BSP_NAME) vxWorks.res_rom $(IMI)
+ - @ $(RM) $@
+ $(BINHEX) $(HEX_FLAGS) vxWorks.res_rom$(TXT_OFFSET) \
+ $(IMI_SPEC)$(IMI)$(IMI_OFFSET) > $@$(MAP_EXT)
+ -@ $(MV_BIN)
+
+vxWorks.res_rom_res_low.hex: depend.$(BSP_NAME) vxWorks.res_rom_res_low $(IMI)
+ - @ $(RM) $@
+ $(BINHEX) $(HEX_FLAGS) vxWorks.res_rom_res_low$(TXT_OFFSET) \
+ $(IMI_SPEC)$(IMI)$(IMI_OFFSET) > $@$(MAP_EXT)
+ -@ $(MV_BIN)
+
+# vxWorks.res_rom_nosym - rommable standalone version without symbol table
+# This builds a standalone VxWorks image that can be put in ROM.
+# There is no symbol table. Only the data segment
+# of this ROM image is copied into RAM.
+
+vxWorks.res_rom_nosym: depend.$(BSP_NAME) bootInit_res.o romInit_res.o \
+ usrConfig.o $(MACH_DEP) $(LDDEPS) $(LIBS)
+ - @ $(RM) $@ tmp.o
+ - @ $(RM) tmp.1
+ - @ $(RM) symTbl.c
+ - @ $(RM) symTbl.o
+ - @ $(RM) $(IMI)
+ - @ $(RM) $(IBR)
+ - @ $(RM) version.o
+ - @ $(RM) ctmp.o ctdt.c ctdt.o
+ $(CC) -c $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
+ $(LD) -o ctmp.o $(LDFLAGS) $(LD_PARTIAL_FLAGS) usrConfig.o \
+ $(MACH_DEP) version.o $(LIBS)
+ $(NM) ctmp.o | $(MUNCH) ctmp.o >ctdt.c
+ $(MAKE) CC_COMPILER="-traditional" ctdt.o
+ $(LD) -o $@ $(LDFLAGS) $(ROM_LDFLAGS) -e $(ROM_ENTRY) \
+ $(RES_LOW_FLAGS) romInit_res.o bootInit_res.o \
+ ctmp.o ctdt.o
+ - @ $(RM) ctmp.o
+ $(LDOUT_HOST) $@
+ $(ROMSIZEPROG) -b $(ROM_SIZE) $@
+ $(LDOUT_CONV) $@
+
+vxWorks.res_rom_nosym.hex: depend.$(BSP_NAME) vxWorks.res_rom_nosym $(IMI)
+ - @ $(RM) $@
+ $(BINHEX) $(HEX_FLAGS) vxWorks.res_rom_nosym$(TXT_OFFSET) \
+ $(IMI_SPEC)$(IMI)$(IMI_OFFSET) > $@$(MAP_EXT)
+ -@ $(MV_BIN)
+
+vxWorks.res_rom_nosym_res_low: depend.$(BSP_NAME) bootInit_res_low.o \
+ romInit_res_low.o usrConfig.o $(MACH_DEP) $(LDDEPS) $(LIBS)
+ - @ $(RM) $@
+ - @ $(RM) tmp.o
+ - @ $(RM) tmp.1
+ - @ $(RM) symTbl.c
+ - @ $(RM) symTbl.o
+ - @ $(RM) $(IMI)
+ - @ $(RM) $(IBR)
+ - @ $(RM) version.o
+ - @ $(RM) ctmp.o ctdt.c ctdt.o
+ $(CC) -c $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
+ $(LD) -o ctmp.o $(LDFLAGS) $(LD_PARTIAL_FLAGS) usrConfig.o \
+ $(MACH_DEP) version.o $(LIBS)
+ $(NM) ctmp.o | $(MUNCH) >ctdt.c
+ $(MAKE) CC_COMPILER="-traditional" ctdt.o
+ $(LD) -o $@ $(LDFLAGS) $(ROM_LDFLAGS) -e $(ROM_ENTRY) \
+ $(RES_LOW_FLAGS) romInit_res_low.o bootInit_res_low.o \
+ ctmp.o ctdt.o
+ - @ $(RM) ctmp.o
+ $(ROMSIZEPROG) -b $(ROM_SIZE) $@
+ $(LDOUT_CONV) $@
+ - @ $(RM) tmp.?
+
+vxWorks.res_rom_nosym_res_low.hex: depend.$(BSP_NAME) \
+ vxWorks.res_rom_nosym_res_low $(IMI)
+ - @ $(RM) $@
+ $(BINHEX) $(HEX_FLAGS) vxWorks.res_rom_nosym_res_low$(TXT_OFFSET) \
+ $(IMI_SPEC)$(IMI)$(IMI_OFFSET) > $@$(MAP_EXT)
+ -@ $(MV_BIN)
+
+################################# bootrom ######################################
+#
+# bootrom - compressed bootrom object module
+# bootrom.hex - compressed bootrom hex format
+# bootrom_uncmp - noncompressed bootrom object module
+# bootrom_uncmp.hex - noncompressed bootrom hex format
+#
+# Bootroms do not normally contain static C++ objects. Therefore, the
+# rules below do not contain steps to munch VxWorks. If you add static
+# objects to your bootrom configuration, you will need to munch your
+# bootrom image. See the rules for the vxWorks image, above, for an example.
+#
+
+bootrom.Z.s : depend.$(BSP_NAME) bootConfig.o $(MACH_DEP) $(LDDEPS) \
+ $(LIBS)
+ - @ $(RM) $@
+ - @ $(RM) tmp.o
+ - @ $(RM) tmp.Z
+ - @ $(RM) version.o
+ $(CC) -c $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
+ $(LD) -o tmp.o $(LDFLAGS) $(ROM_LDFLAGS) -e $(USR_ENTRY) \
+ $(LD_HIGH_FLAGS) bootConfig.o version.o $(MACH_DEP) $(LIBS)
+ $(LDOUT_HOST) tmp.o
+ $(EXTRACT_BIN) < tmp.o | $(COMPRESS) > tmp.Z
+ $(BINTOASM) tmp.Z >bootrom.Z.s
+ - @ $(RM) tmp.o
+ - @ $(RM) tmp.Z
+
+bootrom : depend.$(BSP_NAME) bootInit.o romInit.o bootrom.Z.o \
+ $(LDDEPS) $(LIBS) $(BOOT_EXTRA)
+ - @ $(RM) $@
+ - @ $(RM) $(IMI)
+ - @ $(RM) $(IBR)
+ - @ $(RM) version.o
+ $(CC) -c $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
+ $(LD) $(LDFLAGS) -e $(ROM_ENTRY) $(LD_LOW_FLAGS) \
+ -o $@ romInit.o bootInit.o version.o $(BOOT_EXTRA) \
+ $(LIBS) bootrom.Z.o
+ $(ROMSIZEPROG) -b $(ROM_SIZE) $@
+ $(LDOUT_CONV) $@
+
+bootrom_uncmp : depend.$(BSP_NAME) bootInit_uncmp.o romInit.o \
+ bootConfig.o $(MACH_DEP) $(LDDEPS) $(LIBS)
+ - @ $(RM) $@
+ - @ $(RM) $(IMI)
+ - @ $(RM) $(IBR)
+ - @ $(RM) version.o
+ $(CC) -c $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
+ $(LD) $(LDFLAGS) $(ROM_LDFLAGS) -e $(ROM_ENTRY) $(LD_HIGH_FLAGS) \
+ -o $@ romInit.o bootInit_uncmp.o version.o bootConfig.o \
+ $(MACH_DEP) $(LIBS)
+ $(ROMSIZEPROG) -b $(ROM_SIZE) $@
+ $(LDOUT_CONV) $@
+
+bootrom_res : depend.$(BSP_NAME) bootInit_res.o romInit_res.o \
+ bootConfig.o $(MACH_DEP) $(LDDEPS) $(LIBS)
+ - @ $(RM) $@
+ - @ $(RM) $(IMI)
+ - @ $(RM) $(IBR)
+ - @ $(RM) version.o
+ $(CC) -c $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
+ $(LD) $(LDFLAGS) $(ROM_LDFLAGS) -e $(ROM_ENTRY) \
+ $(RES_HIGH_FLAGS) -o $@ romInit_res.o bootInit_res.o \
+ version.o bootConfig.o $(MACH_DEP) $(LIBS)
+ $(ROMSIZEPROG) -b $(ROM_SIZE) $@
+ $(LDOUT_CONV) $@
+
+bootrom_res_high : depend.$(BSP_NAME) bootInit_res_high.o \
+ romInit_res_high.o bootConfig.o $(MACH_DEP) \
+ $(LDDEPS) $(LIBS)
+ - @ $(RM) $@
+ - @ $(RM) $(IMI)
+ - @ $(RM) $(IBR)
+ - @ $(RM) version.o
+ $(CC) -c $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
+ $(LD) $(LDFLAGS) $(ROM_LDFLAGS) -e $(ROM_ENTRY) \
+ $(RES_HIGH_FLAGS) -o $@ romInit_res_high.o \
+ bootInit_res_high.o version.o bootConfig.o $(MACH_DEP) $(LIBS)
+ $(ROMSIZEPROG) -b $(ROM_SIZE) $@
+ $(LDOUT_CONV) $@
+
+bootrom.hex : depend.$(BSP_NAME) bootrom $(IMI)
+ - @ $(RM) $@
+ $(BINHEX) $(HEX_FLAGS) $(SECT_SPEC)bootrom$(TXT_OFFSET) \
+ $(IMI_SPEC)$(IMI)$(IMI_OFFSET) > $@$(MAP_EXT)
+ -@ $(MV_BIN)
+
+imi : $(IBR)
+ $(LD) -o $@ -Ttext $(IMI_TEXT_ADRS) -Tdata $(IMI_DATA_ADRS) $(IBR)
+
+bootrom_uncmp.hex : depend.$(BSP_NAME) bootrom_uncmp $(IMI)
+ - @ $(RM) $@
+ $(BINHEX) $(HEX_FLAGS) $(SECT_SPEC)bootrom_uncmp$(TXT_OFFSET) \
+ $(IMI_SPEC)$(IMI)$(IMI_OFFSET) > $@$(MAP_EXT)
+ -@ $(MV_BIN)
+
+bootrom_res.hex : depend.$(BSP_NAME) bootrom_res $(IMI)
+ - @ $(RM) $@
+ $(BINHEX) $(HEX_FLAGS) bootrom_res$(TXT_OFFSET) \
+ $(IMI_SPEC)$(IMI)$(IMI_OFFSET) > $@$(MAP_EXT)
+ -@ $(MV_BIN)
+
+bootrom_res_high.hex : depend.$(BSP_NAME) bootrom_res_high $(IMI)
+ - @ $(RM) $@
+ $(BINHEX) $(HEX_FLAGS) bootrom_res_high$(TXT_OFFSET) \
+ $(IMI_SPEC)$(IMI)$(IMI_OFFSET) > $@$(MAP_EXT)
+ -@ $(MV_BIN)
diff --git a/data/mnet/GP10/Host/rm/test/sysinfo.log b/data/mnet/GP10/Host/rm/test/sysinfo.log
new file mode 100644
index 0000000..e0900af
--- /dev/null
+++ b/data/mnet/GP10/Host/rm/test/sysinfo.log
@@ -0,0 +1,1230 @@
+
+ ///// ///// ///// ///// ///// |
+ ///// ///// ///// ///// ///// |
+ ///// ///// ///// ///// ///// |
+ ///// ///// ///// ///// ///// |
+ ////// ////// ////// ////// ////// |
+ ////// ////// ////// ////// ////// | T O R N A D O
+ ///// ///// ///// ///// ///// |
+ ///// ///// ///// ///// ///// |
+ ///// ///// ///// ///// ///// | Development System
+ //// //// //// //// //// |
+ //// //// //// //// //// |
+ //// //// //// //// //// | Host Based Shell
+ //// //// //// //// //// |
+ //// //// //// //// //// |
+ /// /// /// /// /// | Version 1.0.1
+ /// /// /// /// /// |
+ // // // // // |
+ // // // // // |
+ // // // // // |
+ // // // // // |
+
+ Copyright Wind River Systems, Inc., 1995-1997
+
+C++ Constructors/Destructors Strategy is AUTOMATIC
+
+-> reboot
+Rebooting...
+Waiting to attach to target agent............
+
+ ///// ///// ///// ///// ///// |
+ ///// ///// ///// ///// ///// |
+ ///// ///// ///// ///// ///// |
+ ///// ///// ///// ///// ///// |
+ ////// ////// ////// ////// ////// |
+ ////// ////// ////// ////// ////// | T O R N A D O
+ ///// ///// ///// ///// ///// |
+ ///// ///// ///// ///// ///// |
+ ///// ///// ///// ///// ///// | Development System
+ //// //// //// //// //// |
+ //// //// //// //// //// |
+ //// //// //// //// //// | Host Based Shell
+ //// //// //// //// //// |
+ //// //// //// //// //// |
+ /// /// /// /// /// | Version 1.0.1
+ /// /// /// /// /// |
+ // // // // // |
+ // // // // // |
+ // // // // // |
+ // // // // // |
+
+ Copyright Wind River Systems, Inc., 1995-1997
+
+C++ Constructors/Destructors Strategy is AUTOMATIC
+
+-> pwd
+K:/Workdirs/Integration/RIL3/src
+value = 0 = 0x0
+-> cd "../../pre-alpha"
+value = 0 = 0x0
+->
+->
+-> i
+ NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY
+---------- ------------ -------- --- ---------- -------- -------- ------- -----
+tLogTask _logTask 1fc08fc 0 PEND 167bdb 1fc0868 0 0
+tExcTask _excTask 1fc3214 0 PEND 167bdb 1fc3184 0 0
+tShell _shell 1f99740 1 PEND 11582c 1f99420 0 0
+tWdbTask 0x14e284 1f9a8e8 3 READY 16780d 1f9a7d8 0 0
+tNetTask _netTask 1fbb664 50 READY 12a037 1fbb5fc 0 0
+value = 0 = 0x0
+-> pwd
+K:/Workdirs/Integration/pre-alpha
+value = 0 = 0x0
+-> <redirect
+vf0=open("/vio/0", 2, 0)
+new symbol "vf0" added to symbol table.
+vf0 = 0x3956fc: value = 6 = 0x6
+ioGlobalStdSet(0, vf0)
+value = 0 = 0x0
+ioGlobalStdSet(1, vf0)
+value = 1 = 0x1
+ioGlobalStdSet(2, vf0)
+value = 2 = 0x2
+-> <integ
+#
+# load all the module-init files (with global variables)
+#
+ld < K:/Workdirs/integration/l1proxy/I80486/l1proxy_init.out
+value = 27848716 = 0x1a8f00c
+ld < K:/Workdirs/integration/lapdm/I80486/lapdm_init.out
+value = 27849328 = 0x1a8f270
+ld < K:/Workdirs/integration/mm/I80486/mmm_init.out
+value = 27849940 = 0x1a8f4d4
+ld < K:/Workdirs/integration/cc/I80486/ccm_init.out
+value = 27850552 = 0x1a8f738
+ld < K:/Workdirs/integration/rm/I80486/rm_init.out
+value = 27851164 = 0x1a8f99c
+
+#
+# load all the module-api files (used by other modules)
+#
+ld < K:/Workdirs/integration/lapdm/I80486/lapdm_api.out
+value = 27851776 = 0x1a8fc00
+ld < K:/Workdirs/integration/rm/I80486/rm_api.out
+value = 12192372 = 0xba0a74
+
+#
+# load all the core module files next
+#
+ld < K:/Workdirs/integration/l1proxy/I80486/l1proxy.out
+value = 12192984 = 0xba0cd8
+ld < K:/Workdirs/integration/lapdm/I80486/lapdm.out
+value = 12193596 = 0xba0f3c
+ld < K:/Workdirs/integration/ril3/I80486/ril3.out
+value = 12233552 = 0xbaab50
+ld < K:/Workdirs/integration/jcc/I80486/jcc.out
+value = 12234164 = 0xbaadb4
+ld < K:/Workdirs/integration/mm/I80486/mmm.out
+value = 12234776 = 0xbab018
+ld < K:/Workdirs/integration/cc/I80486/ccm.out
+value = 12239856 = 0xbac3f0
+ld < K:/Workdirs/integration/rm/I80486/rm.out
+value = 12257972 = 0xbb0ab4
+
+
+#
+# Initialization of all modules
+#
+CNI_LAPDM_Initialization
+value = 33050968 = 0x1f85158
+#cni_testInit
+
+#create a lapdm instance channel type 0, trx 0, channel num 1, link 1
+#CNI_LAPDM_Create_Instance(0, 0 , 0x2000, 0)
+#CNI_LAPDM_Create_Instance(0, 0 , 0x2800, 0)
+#CNI_LAPDM_Create_Instance(0, 0 , 0x3000, 0)
+#CNI_LAPDM_Create_Instance(0, 0 , 0x3800, 0)
+
+
+#L3 register a lapdm instance oid 0, sapi 0, layer3_id 10, and a call back function
+#CNI_LAPDM_Instance_Registration(0, 0, 0x20, cni_l3CallBack)
+#CNI_LAPDM_Instance_Registration(1, 0, 0x28, cni_l3CallBack)
+#CNI_LAPDM_Instance_Registration(2, 0, 0x30, cni_l3CallBack)
+#CNI_LAPDM_Instance_Registration(3, 0, 0x38, cni_l3CallBack)
+
+# Start MM Task and print its data
+mmInit
+value = 33029640 = 0x1f7fe08
+mmDataPrint
+MM Entry: -1, -1, 0, 0, 0
+MM Entry: 0, 0, 0, 0, 0
+MM Entry: 0, 1, 33050944, 65535, 255
+MM Entry: 0, 0, 0, 0, 0
+MM Entry: 0, 0, 0, 0, 1
+MM Entry: -1, -1, 0, 0, 0
+MM Entry: 0, 0, 0, 0, 0
+MM Entry: 0, 1, 33050816, 65535, 255
+MM Entry: 0, 0, 0, 0, 0
+MM Entry: 0, 0, 0, 0, 1
+value = 25 = 0x19
+
+
+# Start RRM Task
+rm_Task
+ENTER-rm_Go
+ENTER-rm_Main
+ENTER-rm_InitAll
+ENTER-sys_Init
+ENTER-sys_CreateMsgQs
+ENTER-sys_StartTasks
+ENTER-rm_WaitForL1Bootstrap: Entering...
+ENTER-rm_WaitForL1Rsp
+value = 33040848 = 0x1f829d0
+
+#
+initL1
+value = 32771356 = 0x1f40d1c
+newInitDsp
+value = 589833 = 0x90009
+#hpi2dsp(&cx6,0,0x3800)
+newGo
+value = -125829120 = 0xf8800000
+
+-> From DSP
+01f48e58: 10 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ENTER-rm_RetrvConfigFromOam
+ENTER-rm_PopulateSI2
+ENTER-rm_PopulateSI3
+ENTER-rm_PopulateSI4
+ENTER-rm_PopulateSI5
+ENTER-rm_PopulateSI6
+ENTER-rm_InitRm
+ENTER-rm_InitLAPDm
+CNI_LAPDM_Create_Instance: channelType 4, trx 0, channel 32768, link 32
+T_CNI_LAPDM_Channel::Assign , oid 0, gsmChannelType
+CNI_LAPDM_Instance_Registration: oid 0, sapi, 0, layer3_id 0, p_callback_function 368dbc
+CNI_LAPDM_Create_Instance: channelType 7, trx 0, channel 34816, link CNI_LAPDM_Find_LAPDM_
+OID: LAPDm OID not found (trx=0x320
+,channel=0xT_CNI_LAPDM_Channel::Assign , oid 20001,link=0x, gsmChannelType
+0CNI_LAPDM_Instance_Registration: oid )
+1CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x, sapi, 00, channel 0x, layer3_id 20000, l
+ink 0x, p_callback_function 0368dbc
+
+0CNI_LAPDM_Create_Instance: channelType 72 , trx 000, channel 25600, link 00
+0T_CNI_LAPDM_Channel::Assign , oid 02 , gsmChannelType
+0CNI_LAPDM_Create_Instance: channelType 21 , trx 003, channel 25600, lin0k 640
+0T_CNI_LAPDM_Channel::Assign , oid 320, gsmChannelType
+ CNI_LAPDM_Instance_Registration: oid 020, sapi, 00, layer3_id 00 , p_callback_function
+368dbc
+
+CNI_LAPDM_Instance_Registration: oid 3, sapi, 0, layer3_id 0, p_callback_function 368dbc
+CNI_LAPDM_Instance_Registration: oid 3, sapi, 3, layer3_id 0, p_callback_function 368dbc
+CNI_LAPDM_Create_Instance: channelType 2, trx 0, channel 3072, link 0
+T_CNI_LAPDM_Channel::Assign , oid 4, gsmChannelType
+CNI_LAPDM_Create_Instance: channelType 1, trx 0, channel CNI_LAPDM_Find_LAPDM_OID: LAPDm O
+ID not found (trx=0x30720, link ,channel=0x642800
+,link=0xT_CNI_LAPDM_Channel::Assign , oid 05)
+, gsmChannelType
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0xCNI_LAPDM_Instance_Registration: oid 04, ch
+annel 0x, sapi, 28000, link 0x, layer3_id 00
+, p_callback_function 0368dbc7
+ CNI_LAPDM_Instance_Registration: oid 050, sapi, 00, layer3_id 00 , p_callback_function 0
+368dbc0
+ CNI_LAPDM_Instance_Registration: oid 052, sapi, 30, layer3_id 30 , p_callback_function 0
+368db0c
+0CNI_LAPDM_Create_Instance: channelType 00 , trx 280 , channel 081920, link 00
+0T_CNI_LAPDM_Channel::Assign , oid 6
+, gsmChannelType
+
+CNI_LAPDM_Create_Instance: channelType CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=
+0x10, trx ,channel=0x03000, channel ,link=0x81920, link )
+64CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x
+0T_CNI_LAPDM_Channel::Assign , oid , channel 0x73000, gsmChannelType
+, link 0xCNI_LAPDM_Instance_Registration: oid 06
+, sapi, 007, layer3_id 00, p_callback_function 0368dbc
+0CNI_LAPDM_Instance_Registration: oid 06 , sapi, 030, layer3_id 00, p_callback_function 2
+368dbc
+0CNI_LAPDM_Instance_Registration: oid 37 , sapi, 000, layer3_id 00, p_callback_function 0
+368dbc
+30CNI_LAPDM_Create_Instance: channelType 00, trx 00 , channel 0102400, link 0
+
+
+T_CNI_LAPDM_Channel::Assign , oid CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x80,
+ gsmChannelType
+,channel=0xCNI_LAPDM_Create_Instance: channelType 38001,link=0x, trx 00)
+, channel CNI_LAPDM_Ph_Callback lapdm oid is null, trx10240 0x, link 064, channel 0x
+3800T_CNI_LAPDM_Channel::Assign , oid , link 0x90, gsmChannelType
+
+CNI_LAPDM_Instance_Registration: oid 087, sapi, 00, layer3_id 00 , p_callback_function 03
+68dbc0
+ CNI_LAPDM_Instance_Registration: oid 080, sapi, 30, layer3_id 20 , p_callback_function 0
+368dbc3
+ CNI_LAPDM_Instance_Registration: oid 090, sapi, 00, layer3_id 00 , p_callback_function 3
+8368dbc
+0CNI_LAPDM_Create_Instance: channelType 00 , trx 000, channel 12288
+, link
+0CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not fo
+und (trx=0xT_CNI_LAPDM_Channel::Assign , oid 010,channel=0x, gsmChannelType
+3000CNI_LAPDM_Create_Instance: channelType ,link=0x10, trx )
+0CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x, channel 012288, channel 0x, link 300064,
+ link 0x
+0T_CNI_LAPDM_Channel::Assign , oid
+110, gsmChannelType
+7CNI_LAPDM_Instance_Registration: oid 100, sapi, 00 , layer3_id 000, p_callback_function
+ 368dbc0
+0CNI_LAPDM_Instance_Registration: oid 100, sapi, 23 , layer3_id 003, p_callback_function
+ 368dbc0
+0CNI_LAPDM_Instance_R egistration: oid 0110, sapi, 030, layer3_id 00, p_callback_functio
+n 0368dbc
+0CNI_LAPDM_Create_Instance: channelType 00 , trx
+0
+, channel CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x143360, link ,channel=0x038
+00
+,link=0xT_CNI_LAPDM_Channel::Assign , oid 012)
+, gsmChannelType
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0xCNI_LAPDM_Create_Instance: channelType 01,
+channel 0x, trx 38000, link 0x, channel 014336
+, link 0647
+ T_CNI_LAPDM_Channel::Assign , oid 0130, gsmChannelType
+ CNI_LAPDM_Instanc0e_Registration: oid 012 , sapi, 000, layer3_id 00, p_callback_function
+ 2368dbc
+0CNI_LAPDM_Instance_Registration: oid 312 , sapi, 030, layer3_id 00, p_callback_function
+0368dbc
+38CNI_LAPDM_Instance_Registration: oid 130, sapi, 00 , layer3_id 000, p_callback_function
+ 368dbc
+
+
+ENTER-rm_InitIRT
+ENTER-rm_InitL1
+ENTER-rm_ConfigTrx
+ENTER-rm_SendTrxConfigToTrx: Entering...
+ENTER-rm_WaitForL1Rsp
+send to dsp:
+01f408ac: 07 00 00 00 10 15 00 00 02 00 00 ee ee ee ee ee
+01f408bc: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f408cc: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f408dc: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+sending 1 messages
+From DSP
+01f48e58: 10 16 00 00 3a 01 01 00 40 00 00 00 07 00 00 00
+ENTER-rm_SendSlotActivateToTrx: Entering...
+ENTER-rm_WaitForSlotActivateRsp: Entering...
+ENTER-rm_WaitForL1Rsp
+send to dsp:
+01f408ac: 06 00 00 00 10 17 00 00 00 05 00 ee ee ee ee ee
+01f408bc: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f408cc: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f408dc: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+sending 1 messages
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 20 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 28 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 30 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 38 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 20 00 40
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 28 00 40
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 30 00 40
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 38 00 40
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 80 00 20
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 88 00 20
+
+CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x0,channel=0x9000,link=0x20)
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x0, channel 0x9000, link 0x20
+07 00 00 00 02 01 00 00 90 00 20
+
+CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x0,channel=0x9000,link=0x20)
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x0, channel 0x9000, link 0x20
+07 00 00 00 02 01 00 00 90 00 20
+
+From DSP
+01f48e58: 10 18 00 00 00 01 01 00 40 00 00 00 05 00 00 00
+ENTER-rm_SendSlotActivateToTrx: Entering...
+ENTER-rm_WaitForSlotActivateRsp: Entering...
+send to dsp:ENTER-rm_WaitForL1Rsp
+
+01f408ac: 06 00 00 00 10 17 00 00 02 01 00 ee ee ee ee ee
+01f408bc: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f408cc: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f408dc: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+sending 1 messages
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 0a 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 0a 00 40
+
+From DSP
+01f48e58: 10 18 00 00 02 01 01 00 47 00 00 00 07 00 00 00
+ENTER-rm_SendSlotActivateToTrx: Entering...
+ENTER-rm_WaitForSlotActivateRsp: Entering...
+ENTER-rm_WaitForL1Rsp
+send to dsp:
+01f408ac: 06 00 00 00 10 17 00 00 04 01 00 ee ee ee ee ee
+01f408bc: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f408cc: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f408dc: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+sending 1 messages
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 0c 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 0c 00 40
+
+From DSP
+01f48e58: 10 18 00 00 04 d8 00 02 02 00 00 00 80 00 00 00
+SLOT ACTIVATION FINISHED
+ENTER-rm_SendSetUGainToTrx: Entering...
+ENTER-rm_SendSetDGainToTrx: Entering...
+ENTER-rm_SendTuneSynthToTrx: Entering...
+ENTER-rm_SendConfigFpgaDelayToTrx: Entering...
+CONFIG TRX/SLOTS FINISHED
+End of rm_SendSynchInfoToBcchTrx()
+ENTER-rm_SendAllSystemInfosToBcchTrx
+ENTER-rm_SendSystemInfo2ToBcchTrx
+ENTER-rm_SendSystemInfo3ToBcchTrx
+send to dsp:ENTER-rm_SendSystemInfo4ToBcchTrx
+
+End of rm_SendAllSystemInfosToBcchTrx, bcchTrx=001f408ac
+: ENTER-rm_SendSacchFillingToTrx
+0ENTER-rm_SendSacchFillingToTrx
+5End of rm_SendSacchFillingSI5 and SI6
+ STAY in RM_MAIN while(1) loop
+00 00 00 10 10 00 00 00 01 00 ee ee ee ee ee
+01f408bc: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f408cc: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f408dc: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f408ec: 05 00 00 00 10 11 00 00 00 01 00 ee ee ee ee ee
+01f408fc: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f4090c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f4091c: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f4092c: 07 00 00 00 10 12 00 00 00 00 00 ee ee ee ee ee
+01f4093c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f4094c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f4095c: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f4096c: 07 00 00 00 10 12 00 00 01 00 00 ee ee ee ee ee
+01f4097c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f4098c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f4099c: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f409ac: 07 00 00 00 10 12 00 00 02 00 00 ee ee ee ee ee
+01f409bc: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f409cc: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f409dc: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f409ec: 07 00 00 00 10 12 00 00 03 00 00 ee ee ee ee ee
+01f409fc: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f40a0c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f40a1c: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f40a2c: 08 00 00 00 10 14 00 00 00 00 00 00 ee ee ee ee
+01f40a3c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f40a4c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f40a5c: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f40a6c: 22 00 00 00 0c 00 11 00 80 00 02 17 16 06 1a 8e
+01f40a7c: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01
+01f40a8c: 01 04 08 01 00 00 ee ee ee ee ee ee ee ee ee ee
+01f40a9c: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+sending 8 messages
+
+->
+-> <kill
+td lapdm_phserver
+value = 0 = 0x0
+td lapdm_dlserver
+value = 0 = 0x0
+td mmMain
+value = 0 = 0x0
+td rmTask
+value = 0 = 0x0
+td tDspUp
+undefined symbol: tDspUp
+-> i
+ NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY
+---------- ------------ -------- --- ---------- -------- -------- ------- -----
+tLogTask _logTask 1fc08fc 0 PEND 167bdb 1fc0868 0 0
+tExcTask _excTask 1fc3214 0 PEND 167bdb 1fc3184 0 0
+tShell _shell 1f99740 1 PEND 11582c 1f99420 0 0
+tWdbTask 0x14e284 1f9a8e8 3 READY 16780d 1f9a7d8 0 0
+tNetTask _netTask 1fbb664 50 READY 12a037 1fbb5fc 0 0
+L1TaskDn taskDspDn(vo 1f40d1c 100 PEND 167bdb 1f4085c 0 0
+L1TaskUp taskDspUp(vo 1f48ec4 100 PEND 11582c 1f48e30 0 0
+value = 0 = 0x0
+-> td L1TaskDn
+value = 0 = 0x0
+-> td L1TaskUp
+value = 0 = 0x0
+-> <integ
+#
+# load all the module-init files (with global variables)
+#
+ld < K:/Workdirs/integration/l1proxy/I80486/l1proxy_init.out
+value = 27848716 = 0x1a8f00c
+ld < K:/Workdirs/integration/lapdm/I80486/lapdm_init.out
+value = 27849328 = 0x1a8f270
+ld < K:/Workdirs/integration/mm/I80486/mmm_init.out
+value = 27849940 = 0x1a8f4d4
+ld < K:/Workdirs/integration/cc/I80486/ccm_init.out
+value = 27850552 = 0x1a8f738
+ld < K:/Workdirs/integration/rm/I80486/rm_init.out
+value = 27851164 = 0x1a8f99c
+
+#
+# load all the module-api files (used by other modules)
+#
+ld < K:/Workdirs/integration/lapdm/I80486/lapdm_api.out
+value = 27851776 = 0x1a8fc00
+ld < K:/Workdirs/integration/rm/I80486/rm_api.out
+value = 12192372 = 0xba0a74
+
+#
+# load all the core module files next
+#
+ld < K:/Workdirs/integration/l1proxy/I80486/l1proxy.out
+value = 12192984 = 0xba0cd8
+ld < K:/Workdirs/integration/lapdm/I80486/lapdm.out
+value = 12193596 = 0xba0f3c
+ld < K:/Workdirs/integration/ril3/I80486/ril3.out
+value = 12233552 = 0xbaab50
+ld < K:/Workdirs/integration/jcc/I80486/jcc.out
+value = 12234164 = 0xbaadb4
+ld < K:/Workdirs/integration/mm/I80486/mmm.out
+value = 32045856 = 0x1e8fb20
+ld < K:/Workdirs/integration/cc/I80486/ccm.out
+value = 32046468 = 0x1e8fd84
+ld < K:/Workdirs/integration/rm/I80486/rm.out
+value = 12251360 = 0xbaf0e0
+
+
+#
+# Initialization of all modules
+#
+CNI_LAPDM_Initialization
+value = 33065660 = 0x1f88abc
+#cni_testInit
+
+#create a lapdm instance channel type 0, trx 0, channel num 1, link 1
+#CNI_LAPDM_Create_Instance(0, 0 , 0x2000, 0)
+#CNI_LAPDM_Create_Instance(0, 0 , 0x2800, 0)
+#CNI_LAPDM_Create_Instance(0, 0 , 0x3000, 0)
+#CNI_LAPDM_Create_Instance(0, 0 , 0x3800, 0)
+
+
+#L3 register a lapdm instance oid 0, sapi 0, layer3_id 10, and a call back function
+#CNI_LAPDM_Instance_Registration(0, 0, 0x20, cni_l3CallBack)
+#CNI_LAPDM_Instance_Registration(1, 0, 0x28, cni_l3CallBack)
+#CNI_LAPDM_Instance_Registration(2, 0, 0x30, cni_l3CallBack)
+#CNI_LAPDM_Instance_Registration(3, 0, 0x38, cni_l3CallBack)
+
+# Start MM Task and print its data
+mmInit
+value = 32763220 = 0x1f3ed54
+mmDataPrint
+MM Entry: -1, -1, 0, 0, 0
+MM Entry: 0, 0, 0, 0, 0
+MM Entry: 0, 1, 32784524, 65535, 255
+MM Entry: 0, 0, 0, 0, 0
+MM Entry: 0, 0, 0, 0, 1
+MM Entry: -1, -1, 0, 0, 0
+MM Entry: 0, 0, 0, 0, 0
+MM Entry: 0, 1, 32784396, 65535, 255
+MM Entry: 0, 0, 0, 0, 0
+MM Entry: 0, 0, 0, 0, 1
+value = 25 = 0x19
+
+
+# Start RRM Task
+rm_Task
+ENTER-rm_Go
+ENTER-rm_Main
+ENTER-rm_InitAll
+ENTER-sys_Init
+ENTER-sys_CreateMsgQs
+ENTER-sys_StartTasks
+ENTER-rm_WaitForL1Bootstrap: Entering...
+ENTER-rm_WaitForL1Rsp
+value = 32774428 = 0x1f4191c
+
+#
+initL1
+value = 32657804 = 0x1f2518c
+newInitDsp
+value = 589833 = 0x90009
+#hpi2dsp(&cx6,0,0x3800)
+newGo
+value = -125829120 = 0xf8800000
+
+-> From DSP
+01f2d2c8: 10 20 00 00 20 00 00 01 01 00 00 00 00 00 01 01
+ENTER-rm_RetrvConfigFromOam
+ENTER-rm_PopulateSI2
+ENTER-rm_PopulateSI3
+ENTER-rm_PopulateSI4
+ENTER-rm_PopulateSI5
+ENTER-rm_PopulateSI6
+ENTER-rm_InitRm
+ENTER-rm_InitLAPDm
+CNI_LAPDM_Create_Instance: channelType 4, trx 0, channel 32768, link 32
+T_CNI_LAPDM_Channel::Assign , oid 0, gsmChannelType
+CNI_LAPDM_Instance_Registration: oid 0, sapi, 0, layer3_id 0, p_callback_function 368dbc
+CNI_LAPDM_Create_Instance: channelType 7, trx 0, channel 34816, link CNI_LAPDM_Find_LAPDM_
+OID: LAPDm OID not found (trx=0x320
+,channel=0xT_CNI_LAPDM_Channel::Assign , oid 20001,link=0x, gsmChannelType
+0CNI_LAPDM_Instance_Registration: oid )
+1CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x, sapi, 00, channel 0x, layer3_id 20000, l
+ink 0x, p_callback_function 0368dbc
+
+0CNI_LAPDM_Create_Instance: channelType 72 , trx 000, channel 25600, link 00
+0T_CNI_LAPDM_Channel::Assign , oid 02 , gsmChannelType
+0CNI_LAPDM_Create_Instance: channelType 21 , trx 003, channel 25600, lin0k 640
+0T_CNI_LAPDM_Channel::Assign , oid 320, gsmChannelType
+ CNI_LAPDM_Instance_Registration: oid 020, sapi, 00, layer3_id 00 , p_callback_function
+368dbc
+
+CNI_LAPDM_Instance_Registration: oid 3, sapi, 0, layer3_id 0, p_callback_function 368dbc
+CNI_LAPDM_Instance_Registration: oid 3, sapi, 3, layer3_id 0, p_callback_function 368dbc
+CNI_LAPDM_Create_Instance: channelType 2, trx 0, channel 3072, link 0
+T_CNI_LAPDM_Channel::Assign , oid 4, gsmChannelType
+CNI_LAPDM_Create_Instance: channelType 1, trx 0, channel CNI_LAPDM_Find_LAPDM_OID: LAPDm O
+ID not found (trx=0x30720, link ,channel=0x642800
+,link=0xT_CNI_LAPDM_Channel::Assign , oid 05)
+, gsmChannelType
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0xCNI_LAPDM_Instance_Registration: oid 04, ch
+annel 0x, sapi, 28000, link 0x, layer3_id 00
+, p_callback_function 0368dbc7
+ CNI_LAPDM_Instance_Registration: oid 050, sapi, 00, layer3_id 00 , p_callback_function 0
+368dbc0
+ CNI_LAPDM_Instance_Registration: oid 052, sapi, 30, layer3_id 30 , p_callback_function 0
+368db0c
+0CNI_LAPDM_Create_Instance: channelType 00 , trx 280 , channel 081920, link 00
+0T_CNI_LAPDM_Channel::Assign , oid 6
+, gsmChannelType
+
+CNI_LAPDM_Create_Instance: channelType CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=
+0x10, trx ,channel=0x03000, channel ,link=0x81920, link )
+64CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x
+0T_CNI_LAPDM_Channel::Assign , oid , channel 0x73000, gsmChannelType
+, link 0xCNI_LAPDM_Instance_Registration: oid 06
+, sapi, 007, layer3_id 00, p_callback_function 0368dbc
+0CNI_LAPDM_Instance_Registration: oid 06 , sapi, 030, layer3_id 00, p_callback_function 2
+368dbc
+0CNI_LAPDM_Instance_Registration: oid 37 , sapi, 000, layer3_id 00, p_callback_function 0
+368dbc
+30CNI_LAPDM_Create_Instance: channelType 00, trx 00 , channel 0102400, link 0
+
+
+T_CNI_LAPDM_Channel::Assign , oid CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x80,
+ gsmChannelType
+,channel=0xCNI_LAPDM_Create_Instance: channelType 38001,link=0x, trx 00)
+, channel CNI_LAPDM_Ph_Callback lapdm oid is null, trx10240 0x, link 064, channel 0x
+3800T_CNI_LAPDM_Channel::Assign , oid , link 0x90, gsmChannelType
+
+CNI_LAPDM_Instance_Registration: oid 087, sapi, 00, layer3_id 00 , p_callback_function 03
+68dbc0
+ CNI_LAPDM_Instance_Registration: oid 080, sapi, 30, layer3_id 20 , p_callback_function 0
+368dbc3
+ CNI_LAPDM_Instance_Registration: oid 090, sapi, 00, layer3_id 00 , p_callback_function 3
+8368dbc
+0CNI_LAPDM_Create_Instance: channelType 00 , trx 000, channel 12288
+, link
+0CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not fo
+und (trx=0xT_CNI_LAPDM_Channel::Assign , oid 010,channel=0x, gsmChannelType
+3000CNI_LAPDM_Create_Instance: channelType ,link=0x10, trx )
+0CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x, channel 012288, channel 0x, link 300064,
+ link 0x
+0T_CNI_LAPDM_Channel::Assign , oid
+110, gsmChannelType
+7CNI_LAPDM_Instance_Registration: oid 100, sapi, 00 , layer3_id 000, p_callback_function
+ 368dbc0
+0CNI_LAPDM_Instance_Registration: oid 100, sapi, 23 , layer3_id 003, p_callback_function
+ 368dbc0
+0CNI_LAPDM_Instance_R egistration: oid 0110, sapi, 030, layer3_id 00, p_callback_functio
+n 0368dbc
+0CNI_LAPDM_Create_Instance: channelType 00 , trx
+0
+, channel CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x143360, link ,channel=0x038
+00
+,link=0xT_CNI_LAPDM_Channel::Assign , oid 012)
+, gsmChannelType
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0xCNI_LAPDM_Create_Instance: channelType 01,
+channel 0x, trx 38000, link 0x, channel 014336
+, link 0647
+ T_CNI_LAPDM_Channel::Assign , oid 0130, gsmChannelType
+ CNI_LAPDM_Instanc0e_Registration: oid 012 , sapi, 000, layer3_id 00, p_callback_function
+ 2368dbc
+0CNI_LAPDM_Instance_Registration: oid 312 , sapi, 030, layer3_id 00, p_callback_function
+0368dbc
+38CNI_LAPDM_Instance_Registration: oid 130, sapi, 00 , layer3_id 000, p_callback_function
+ 368dbc
+
+
+ENTER-rm_InitIRT
+ENTER-rm_InitL1
+ENTER-rm_ConfigTrx
+ENTER-rm_SendTrxConfigToTrx: Entering...
+ENTER-rm_WaitForL1Rsp
+send to dsp:
+01f24d1c: 07 00 00 00 10 15 00 00 02 00 00 ee ee ee ee ee
+01f24d2c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24d3c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24d4c: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+sending 1 messages
+From DSP
+01f2d2c8: 10 16 00 00 00 00 00 00 f4 cc 00 02 01 00 00 00
+ENTER-rm_SendSlotActivateToTrx: Entering...
+ENTER-rm_WaitForSlotActivateRsp: Entering...
+ENTER-rm_WaitForL1Rsp
+send to dsp:
+01f24d1c: 06 00 00 00 10 17 00 00 00 05 00 ee ee ee ee ee
+01f24d2c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24d3c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24d4c: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+sending 1 messages
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 20 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 28 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 30 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 38 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 20 00 40
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 28 00 40
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 30 00 40
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 38 00 40
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 80 00 20
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 88 00 20
+
+CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x0,channel=0x9000,link=0x20)
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x0, channel 0x9000, link 0x20
+07 00 00 00 02 01 00 00 90 00 20
+
+CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x0,channel=0x9000,link=0x20)
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x0, channel 0x9000, link 0x20
+07 00 00 00 02 01 00 00 90 00 20
+
+From DSP
+01f2d2c8: 10 18 00 00 00 01 01 00 40 00 00 00 07 00 00 00
+ENTER-rm_SendSlotActivateToTrx: Entering...
+ENTER-rm_WaitForSlotActivateRsp: Entering...
+send to dsp:ENTER-rm_WaitForL1Rsp
+
+01f24d1c: 06 00 00 00 10 17 00 00 02 01 00 ee ee ee ee ee
+01f24d2c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24d3c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24d4c: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+sending 1 messages
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 0a 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 0a 00 40
+
+From DSP
+01f2d2c8: 10 18 00 00 02 f6 bf 01 bc cb 00 02 00 00 00 00
+ENTER-rm_SendSlotActivateToTrx: Entering...
+ENTER-rm_WaitForSlotActivateRsp: Entering...
+ENTER-rm_WaitForL1Rsp
+send to dsp:
+01f24d1c: 06 00 00 00 10 17 00 00 04 01 00 ee ee ee ee ee
+01f24d2c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24d3c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24d4c: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+sending 1 messages
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 0c 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 0c 00 40
+
+From DSP
+01f2d2c8: 10 18 00 00 04 00 00 00 47 00 00 00 00 00 00 00
+SLOT ACTIVATION FINISHED
+ENTER-rm_SendSetUGainToTrx: Entering...
+ENTER-rm_SendSetDGainToTrx: Entering...
+ENTER-rm_SendTuneSynthToTrx: Entering...
+ENTER-rm_SendConfigFpgaDelayToTrx: Entering...
+CONFIG TRX/SLOTS FINISHED
+End of rm_SendSynchInfoToBcchTrx()
+ENTER-rm_SendAllSystemInfosToBcchTrx
+ENTER-rm_SendSystemInfo2ToBcchTrx
+ENTER-rm_SendSystemInfo3ToBcchTrx
+send to dsp:ENTER-rm_SendSystemInfo4ToBcchTrx
+
+End of rm_SendAllSystemInfosToBcchTrx, bcchTrx=001f24d1c
+: ENTER-rm_SendSacchFillingToTrx
+0ENTER-rm_SendSacchFillingToTrx
+5End of rm_SendSacchFillingSI5 and SI6
+ STAY in RM_MAIN while(1) loop
+00 00 00 10 10 00 00 00 01 00 ee ee ee ee ee
+01f24d2c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24d3c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24d4c: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f24d5c: 05 00 00 00 10 11 00 00 00 01 00 ee ee ee ee ee
+01f24d6c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24d7c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24d8c: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f24d9c: 07 00 00 00 10 12 00 00 00 00 00 ee ee ee ee ee
+01f24dac: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24dbc: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24dcc: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f24ddc: 07 00 00 00 10 12 00 00 01 00 00 ee ee ee ee ee
+01f24dec: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24dfc: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24e0c: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f24e1c: 07 00 00 00 10 12 00 00 02 00 00 ee ee ee ee ee
+01f24e2c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24e3c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24e4c: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f24e5c: 07 00 00 00 10 12 00 00 03 00 00 ee ee ee ee ee
+01f24e6c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24e7c: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24e8c: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f24e9c: 08 00 00 00 10 14 00 00 00 00 00 00 ee ee ee ee
+01f24eac: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24ebc: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f24ecc: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f24edc: 22 00 00 00 0c 00 11 00 80 00 02 17 16 06 1a 8e
+01f24eec: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01
+01f24efc: 01 04 08 01 00 00 ee ee ee ee ee ee ee ee ee ee
+01f24f0c: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+sending 8 messages
+
+->
+->
+-> <kil
+can't open input 'kil'
+ errno = 0x2
+-> <kill
+td lapdm_phserver
+value = 0 = 0x0
+td lapdm_dlserver
+value = 0 = 0x0
+td mmMain
+value = 0 = 0x0
+td rmTask
+value = 0 = 0x0
+td tDspUp
+undefined symbol: tDspUp
+-> i
+ NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY
+---------- ------------ -------- --- ---------- -------- -------- ------- -----
+tLogTask _logTask 1fc08fc 0 PEND 167bdb 1fc0868 0 0
+tExcTask _excTask 1fc3214 0 PEND 167bdb 1fc3184 0 0
+tShell _shell 1f99740 1 PEND 11582c 1f99420 0 0
+tWdbTask 0x14e284 1f9a8e8 3 READY 16780d 1f9a7d8 0 0
+tNetTask _netTask 1fbb664 50 READY 12a037 1fbb5fc 0 0
+L1TaskDn taskDspDn(vo 1f2518c 100 PEND 167bdb 1f24ccc 0 0
+L1TaskUp taskDspUp(vo 1f2d334 100 PEND 167bdb 1f2d1ac 0 0
+value = 0 = 0x0
+-> <kill
+td lapdm_phserver
+Task not found.
+value = -1 = 0xffffffff
+td lapdm_dlserver
+Task not found.
+value = -1 = 0xffffffff
+td mmMain
+Cannot kill a task which is safe from deletion
+value = -1 = 0xffffffff
+td rmTask
+undefined symbol: rmTask
+-> i
+ NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY
+---------- ------------ -------- --- ---------- -------- -------- ------- -----
+tLogTask _logTask 1fc08fc 0 PEND 167bdb 1fc0868 0 0
+tExcTask _excTask 1fc3214 0 PEND 167bdb 1fc3184 0 0
+tShell _shell 1f99740 1 PEND 11582c 1f99420 0 0
+tWdbTask 0x14e284 1f9a8e8 3 READY 16780d 1f9a7d8 0 0
+tNetTask _netTask 1fbb664 50 READY 12a037 1fbb5fc 0 0
+L1TaskDn taskDspDn(vo 1f2518c 100 PEND 167bdb 1f24ccc 0 0
+L1TaskUp taskDspUp(vo 1f2d334 100 PEND 167bdb 1f2d1ac 0 0
+value = 0 = 0x0
+-> td L1TaskDn
+value = 0 = 0x0
+-> td L1TaskUp
+value = 0 = 0x0
+-> pwd
+K:/Workdirs/Integration/pre-alpha
+value = 0 = 0x0
+-> <integ
+#
+# load all the module-init files (with global variables)
+#
+ld < K:/Workdirs/integration/l1proxy/I80486/l1proxy_init.out
+value = 27848716 = 0x1a8f00c
+ld < K:/Workdirs/integration/lapdm/I80486/lapdm_init.out
+value = 27849328 = 0x1a8f270
+ld < K:/Workdirs/integration/mm/I80486/mmm_init.out
+value = 27849940 = 0x1a8f4d4
+ld < K:/Workdirs/integration/cc/I80486/ccm_init.out
+value = 27850552 = 0x1a8f738
+ld < K:/Workdirs/integration/rm/I80486/rm_init.out
+value = 27851164 = 0x1a8f99c
+
+#
+# load all the module-api files (used by other modules)
+#
+ld < K:/Workdirs/integration/lapdm/I80486/lapdm_api.out
+value = 13237656 = 0xc9fd98
+ld < K:/Workdirs/integration/rm/I80486/rm_api.out
+value = 12192372 = 0xba0a74
+
+#
+# load all the core module files next
+#
+ld < K:/Workdirs/integration/l1proxy/I80486/l1proxy.out
+value = 12192984 = 0xba0cd8
+ld < K:/Workdirs/integration/lapdm/I80486/lapdm.out
+value = 32045232 = 0x1e8f8b0
+ld < K:/Workdirs/integration/ril3/I80486/ril3.out
+value = 12233552 = 0xbaab50
+ld < K:/Workdirs/integration/jcc/I80486/jcc.out
+value = 12234164 = 0xbaadb4
+ld < K:/Workdirs/integration/mm/I80486/mmm.out
+value = 32045856 = 0x1e8fb20
+ld < K:/Workdirs/integration/cc/I80486/ccm.out
+value = 32046468 = 0x1e8fd84
+ld < K:/Workdirs/integration/rm/I80486/rm.out
+value = 27851776 = 0x1a8fc00
+
+
+#
+# Initialization of all modules
+#
+CNI_LAPDM_Initialization
+value = 32756824 = 0x1f3d458
+#cni_testInit
+
+#create a lapdm instance channel type 0, trx 0, channel num 1, link 1
+#CNI_LAPDM_Create_Instance(0, 0 , 0x2000, 0)
+#CNI_LAPDM_Create_Instance(0, 0 , 0x2800, 0)
+#CNI_LAPDM_Create_Instance(0, 0 , 0x3000, 0)
+#CNI_LAPDM_Create_Instance(0, 0 , 0x3800, 0)
+
+
+#L3 register a lapdm instance oid 0, sapi 0, layer3_id 10, and a call back function
+#CNI_LAPDM_Instance_Registration(0, 0, 0x20, cni_l3CallBack)
+#CNI_LAPDM_Instance_Registration(1, 0, 0x28, cni_l3CallBack)
+#CNI_LAPDM_Instance_Registration(2, 0, 0x30, cni_l3CallBack)
+#CNI_LAPDM_Instance_Registration(3, 0, 0x38, cni_l3CallBack)
+
+# Start MM Task and print its data
+mmInit
+value = 32690596 = 0x1f2d1a4
+mmDataPrint
+MM Entry: -1, -1, 0, 0, 0
+MM Entry: 0, 0, 0, 0, 0
+MM Entry: 0, 1, 32747104, 65535, 255
+MM Entry: 0, 0, 0, 0, 0
+MM Entry: 0, 0, 0, 0, 1
+MM Entry: -1, -1, 0, 0, 0
+MM Entry: 0, 0, 0, 0, 0
+MM Entry: 0, 1, 32746976, 65535, 255
+MM Entry: 0, 0, 0, 0, 0
+MM Entry: 0, 0, 0, 0, 1
+value = 25 = 0x19
+
+
+# Start RRM Task
+rm_Task
+ENTER-rm_Go
+ENTER-rm_Main
+ENTER-rm_InitAll
+ENTER-sys_Init
+ENTER-sys_CreateMsgQs
+ENTER-sys_StartTasks
+ENTER-rm_WaitForL1Bootstrap: Entering...
+ENTER-rm_WaitForL1Rsp
+value = 32928164 = 0x1f671a4
+
+#
+initL1
+value = 32587556 = 0x1f13f24
+newInitDsp
+value = 589833 = 0x90009
+#hpi2dsp(&cx6,0,0x3800)
+newGo
+value = -125829120 = 0xf8800000
+
+-> From DSP
+01f1c060: 10 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ENTER-rm_RetrvConfigFromOam
+ENTER-rm_PopulateSI2
+ENTER-rm_PopulateSI3
+ENTER-rm_PopulateSI4
+ENTER-rm_PopulateSI5
+ENTER-rm_PopulateSI6
+ENTER-rm_InitRm
+ENTER-rm_InitLAPDm
+CNI_LAPDM_Create_Instance: channelType 4, trx 0, channel 32768, link 32
+T_CNI_LAPDM_Channel::Assign , oid 0, gsmChannelType
+CNI_LAPDM_Instance_Registration: oid 0, sapi, 0, layer3_id 0, p_callback_function 368dbc
+CNI_LAPDM_Create_Instance: channelType 7, trx 0, channel 34816, link 32
+T_CNI_LAPDM_Channel::Assign , oid 1, gsmChannelType
+CNI_LAPDM_Instance_Registration: oid 1, sapi, 0, layer3_id 0, p_callback_function 368dbc
+CNI_LAPDM_Create_Instance: channelType 2, trx 0, channel 2560, link 0
+T_CNI_LAPDM_Channel::Assign , oid 2, gsmChannelType
+CNI_LAPDM_Create_Instance: channelType 1, trx 0, channel 2560, link 64
+T_CNI_LAPDM_Channel::Assign , oid 3, gsmChannelType
+CNI_LAPDM_Instance_Registration: oid 2, sapi, 0, layer3_id 0, p_callback_function 368dbc
+CNI_LAPDM_Instance_Registration: oid CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x
+30, sapi, ,channel=0x02000, layer3_id ,link=0x00, p_callback_function )
+368dbcCNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x
+0CNI_LAPDM_Instance_Registration: oid , channel 0x32000, sapi, , link 0x30, layer3_id
+00, p_callback_function 7368dbc
+0CNI_LAPDM_Create_Instance: channelType 02 , trx 000, channel 30720, link 00
+0T_CNI_LAPDM_Channel::Assign , oid 24 , gsmChannelType
+0CNI_LAPDM_Create_Instance: channelType 31 , trx 000, channel 30720, 0link 6420
+ T_CNI_LAPDM_Channel::Assign , oid 050, gsmChannelType
+ CNI_LAPDM_Instance_Registration: oid 040, sapi, 0
+, layer3_id
+0, p_callback_function 368dbc
+CNI_LAPDM_Instance_Registration: oid 5, sapi, 0, layer3_id 0, p_callback_function 368dbc
+CNI_LAPDM_Instance_Registration: oid 5, sapi, 3, layer3_id 0, p_callback_function 368dbc
+CNI_LAPDM_Create_Instance: channelType 0, trx 0, channel 8192, link 0
+T_CNI_LAPDM_Channel::Assign , oid 6, gsmChannelType
+CNI_LAPDM_Create_Instance: channelType 1, trx 0, channel CNI_LAPDM_Find_LAPDM_OID: LAPDm O
+ID not found (trx=0x81920, link ,channel=0x642800
+,link=0xT_CNI_LAPDM_Channel::Assign , oid 07)
+, gsmChannelType
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0xCNI_LAPDM_Instance_Registration: oid 06, ch
+annel 0x, sapi, 28000, link 0x, layer3_id 00
+, p_callback_function 0368dbc7
+ CNI_LAPDM_Instance_Registration: oid 060, sapi, 30, layer3_id 00 , p_callback_function 0
+368dbc0
+ CNI_LAPDM_Instance_Registration: oid 072, sapi, 00, layer3_id 30 , p_callback_function 0
+368db0c
+0CNI_LAPDM_Create_Instance: channelType 00 , trx 280 , channel 0102400, link 00
+0T_CNI_LAPDM_Channel::Assign , oid 8
+, gsmChannelType
+
+CNI_LAPDM_Create_Instance: channelType CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=
+0x10, trx ,channel=0x03000, channel ,link=0x102400, link )
+64CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x
+0T_CNI_LAPDM_Channel::Assign , oid , channel 0x93000, gsmChannelType
+, link 0xCNI_LAPDM_Instance_Registration: oid 08
+, sapi, 007, layer3_id 00, p_callback_function 0368db c0
+0CNI_LAPDM_Instance_Registration: oid 80, sapi, 03 , layer3_id 002, p_callback_function
+368dbc0
+3CNI_LAPDM_Instance_Registration: oid 90, sapi, 00 , layer3_id 000, p_callback_function
+368dbc30
+ CNI_LAPDM_Create_Instance: channelType 000, trx 00, channel 012288 , link
+0
+
+CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0xT_CNI_LAPDM_Channel::Assign , oid 010
+,channel=0x, gsmChannelType
+3800CNI_LAPDM_Create_Instance: channelType ,link=0x10, trx )
+0CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x, ch0annel , channel 0x122883800, link , l
+ink 0x640
+
+T_CNI_LAPDM_Channel::Assign , oid 0117, gsmChannelType
+ CNI_LAPDM_Instance_Registration: oid 0100, sapi, 00, layer3_id 00 , p_callback_function
+0368dbc0
+ CNI_LAPDM_Instance_Registration: oid 0102, sapi, 30, layer3_id 30 , p_callback_function
+0368dbc0
+ CNI_LAPDM_Instance_Registration: oid 0110, sapi, 038, layer3_id 00, p_callback_function
+ 0368dbc
+0CNI_LAPDM_Create_Instance: channelType 00 , trx
+0
+, channel CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (t14336rx=0x, link 00,channel=0x
+3800T_CNI_LAPDM_Channel::Assign , oid ,link=0x120, gsmChannelType
+)
+CNI_LAPDM_Create_Instance: channelType CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x10,
+trx , channel 0x03800, channel , link 0x143360, link
+640
+7T_CNI_LAPDM_Channel::Assign , oid 130, gsmChannelType
+0CNI_LAPDM_Instance_Registration: oid 120, sapi, 00 , layer3_id 000, p_callback_function
+ 368dbc0
+2CNI_LAPDM_Instance_Registration: oid 120, sapi, 33 , layer3_id 000, p_callback_function
+ 368dbc0
+0CNI_LAPDM_ Instance_Registration: oid 3813 , sapi, 000, layer3_id 00, p_callback_functio
+n 0368dbc
+
+ENTER-rm_InitIRT
+
+ENTER-rm_InitL1
+ENTER-rm_ConfigTrx
+ENTER-rm_SendTrxConfigToTrx: Entering...
+ENTER-rm_WaitForL1Rsp
+send to dsp:
+01f13ab4: 07 00 00 00 10 15 00 00 02 00 00 ee ee ee ee ee
+01f13ac4: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13ad4: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13ae4: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+sending 1 messages
+From DSP
+01f1c060: 10 16 00 00 3a 01 01 00 40 00 00 00 07 00 00 00
+ENTER-rm_SendSlotActivateToTrx: Entering...
+ENTER-rm_WaitForSlotActivateRsp: Entering...
+ENTER-rm_WaitForL1Rsp
+send to dsp:
+01f13ab4: 06 00 00 00 10 17 00 00 00 05 00 ee ee ee ee ee
+01f13ac4: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13ad4: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13ae4: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+sending 1 messages
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 20 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 28 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 30 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 38 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 20 00 40
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 28 00 40
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 30 00 40
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 38 00 40
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 80 00 20
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 88 00 20
+
+CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x0,channel=0x9000,link=0x20)
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x0, channel 0x9000, link 0x20
+07 00 00 00 02 01 00 00 90 00 20
+
+CNI_LAPDM_Find_LAPDM_OID: LAPDm OID not found (trx=0x0,channel=0x9000,link=0x20)
+CNI_LAPDM_Ph_Callback lapdm oid is null, trx 0x0, channel 0x9000, link 0x20
+07 00 00 00 02 01 00 00 90 00 20
+
+From DSP
+01f1c060: 10 18 00 00 00 01 01 00 40 00 00 00 03 00 00 00
+ENTER-rm_SendSlotActivateToTrx: Entering...
+ENTER-rm_WaitForSlotActivateRsp: Entering...
+ENTER-rm_WaitForL1Rsp
+send to dsp:
+01f13ab4: 06 00 00 00 10 17 00 00 02 01 00 ee ee ee ee ee
+01f13ac4: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13ad4: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13ae4: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+sending 1 messages
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 0a 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 0a 00 40
+
+From DSP
+01f1c060: 10 18 00 00 02 00 00 00 06 00 00 00 04 06 00 00
+ENTER-rm_SendSlotActivateToTrx: Entering...
+ENTER-rm_WaitForSlotActivateRsp: Entering...
+ENTER-rm_WaitForL1Rsp
+send to dsp:
+01f13ab4: 06 00 00 00 10 17 00 00 04 01 00 ee ee ee ee ee
+01f13ac4: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13ad4: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13ae4: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+sending 1 messages
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 0c 00 00
+
+CNI_LAPDM_Ph_Callback received PH-CONNECT-IND, length 11
+07 00 00 00 02 01 00 00 0c 00 40
+
+From DSP
+01f1c060: 10 18 00 00 04 f6 bf 01 04 cc 00 02 00 00 00 00
+SLOT ACTIVATION FINISHED
+ENTER-rm_SendSetUGainToTrx: Entering...
+ENTER-rm_SendSetDGainToTrx: Entering...
+ENTER-rm_SendTuneSynthToTrx: Entering...
+ENTER-rm_SendConfigFpgaDelayToTrx: Entering...
+CONFIG TRX/SLOTS FINISHED
+End of rm_SendSynchInfoToBcchTrx()
+ENTER-rm_SendAllSystemInfosToBcchTrx
+ENTER-rm_SendSystemInfo2ToBcchTrx
+ENTER-rm_SendSystemInfo3ToBcchTrx
+ENTER-rm_SendSystemInfo4ToBcchTrx
+End of rm_SendAllSystemInfosToBcchTrx, bcchTrx=0
+ENTER-rm_SendSacchFillingToTrx
+ENTER-rm_SendSacchFillingToTrx
+End of rm_SendSacchFillingSI5 and SI6
+send to dsp:STAY in RM_MAIN while(1) loop
+
+01f13ab4: 05 00 00 00 10 10 00 00 00 01 00 ee ee ee ee ee
+01f13ac4: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13ad4: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13ae4: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f13af4: 05 00 00 00 10 11 00 00 00 01 00 ee ee ee ee ee
+01f13b04: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13b14: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13b24: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f13b34: 07 00 00 00 10 12 00 00 00 00 00 ee ee ee ee ee
+01f13b44: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13b54: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13b64: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f13b74: 07 00 00 00 10 12 00 00 01 00 00 ee ee ee ee ee
+01f13b84: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13b94: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13ba4: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f13bb4: 07 00 00 00 10 12 00 00 02 00 00 ee ee ee ee ee
+01f13bc4: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13bd4: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13be4: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f13bf4: 07 00 00 00 10 12 00 00 03 00 00 ee ee ee ee ee
+01f13c04: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13c14: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13c24: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f13c34: 08 00 00 00 10 14 00 00 00 00 00 00 ee ee ee ee
+01f13c44: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13c54: ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee
+01f13c64: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+
+
+01f13c74: 22 00 00 00 0c 00 11 00 80 00 02 17 16 06 1a 8e
+01f13c84: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01
+01f13c94: 01 04 08 01 00 00 ee ee ee ee ee ee ee ee ee ee
+01f13ca4: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f13cb4: 22 00 00 00 0c 00 11 00 80 00 03 17 12 06 1b 00
+01f13cc4: 01 13 f0 71 00 01 01 02 00 23 07 00 01 04 00 2b
+01f13cd4: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+01f13ce4: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f13cf4: 22 00 00 00 0c 00 11 00 80 00 04 17 0c 06 1c 13
+01f13d04: f0 71 00 01 07 00 01 06 00 2b 2b 2b 2b 2b 2b 2b
+01f13d14: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+01f13d24: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f13d34: 1b 00 00 00 10 00 1a 00 05 12 06 1d 8e 00 00 00
+01f13d44: 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 2b
+01f13d54: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+01f13d64: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+01f13d74: 1b 00 00 00 10 00 1a 00 06 12 06 1e 00 01 13 f0
+01f13d84: 71 00 01 23 01 2b 2b 2b 2b 2b 2b 2b 01 00 00 2b
+01f13d94: 2b 2b 2b 01 00 00 ee ee ee ee ee ee ee ee ee ee
+01f13da4: ee ee ee ee ee ee ee ee ee ee ee ee ac 2c 16 00
+sending 12 messages
+
diff --git a/data/mnet/GP10/Host/snmp/Asn1/vipercell.mib b/data/mnet/GP10/Host/snmp/Asn1/vipercell.mib
new file mode 100644
index 0000000..45c6a35
--- /dev/null
+++ b/data/mnet/GP10/Host/snmp/Asn1/vipercell.mib
@@ -0,0 +1,8370 @@
+ CISCO-GP10-MIB
+
+-- Title CISCO MNET GP10 MIB version 1.0
+-- Note JetCell has been acquired by Cisco, so the organization is Cisco,
+-- but we still use JetCell's org-number
+
+-- Necessary Wind Riverism's to make the mib compiler work properly
+
+--FORCE-INCLUDE <mib.h>
+--FORCE-INCLUDE <snmpdefs.h>
+--FORCE-INCLUDE "mibhand.h"
+--FORCE-INCLUDE "mibleaf.h"
+--FORCE-INCLUDE "mibtags.h"
+
+--DEFAULT get-function-async _snmp_getMethod
+--DEFAULT next-function-async _snmp_nextMethod
+--DEFAULT set-function-async _snmp_setMethod
+--DEFAULT test-function-async _snmp_testMethod
+--DEFAULT cookie MIB_%n
+
+ DEFINITIONS ::= BEGIN
+
+IMPORTS
+ MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, IpAddress
+ FROM SNMPv2-SMI
+ DisplayString
+ FROM RFC1213-MIB
+ enterprises, Gauge
+ FROM RFC1155-SMI
+ ;
+
+jetcell MODULE-IDENTITY
+ LAST-UPDATED "9904010000Z"
+ ORGANIZATION "JetCell, Inc."
+ CONTACT-INFO
+ " Technical Support
+ Postal: JetCell, Inc.
+ 173 Constitution Drive
+ Menlo Park, CA 94025
+ USA
+
+ Tel: +1 650 330 2800
+ Fax: +1 650 330 1390
+
+ Email: support@jetcell.com"
+ DESCRIPTION
+ "This is the MIB definition for the JetCell ViperCell
+ wireless base station. This includes leafs for the GSM,
+ H.323, configuration and other MIB variables."
+ ::= {enterprises 3583}
+
+-- Textual Conventions used in the GSM SMI
+-- The following define the type of data that is represented in the MIB.
+
+-- TBCD-STRING ::= OCTET STRING
+
+AbsoluteRFChannelNo ::= INTEGER (0..1023)
+AveragingNumber ::= INTEGER (0..31)
+CauseCode ::= INTEGER
+CellIdentity ::= INTEGER (0..65535)
+CellReselectHysteresis ::= INTEGER (0..7)
+ChannelID ::= INTEGER (0..7)
+ClassNumber ::= INTEGER (0..15)
+FrequencyUsage ::= INTEGER
+GSMGeneralObjectID ::= INTEGER
+HoMargin ::= INTEGER (0..24) -- db
+HoPriorityLevel ::= INTEGER (0..7)
+HoppingSequenceNumber ::= INTEGER (0..63)
+L2Timer ::= INTEGER
+L3Timer ::= INTEGER
+HandoverTimer ::= INTEGER
+LocationAreaCode ::= INTEGER (0..65535)
+MaxQueueLength ::= INTEGER (0..100)
+MobileCountryCode ::=
+ -- mobile country code: 3 digit in decimal which is saved in INTEGER variable in
+ -- BCD format
+ -- B[12..31]: 0(don't care)
+ -- B[8..11]: 1st digit(most significant digit), valid range 0 ~ 9
+ -- B[4..7]: 2nd digit, valid range 0 ~ 9
+ -- B[0..3]: 3rd digit(least significant digit), valid range 0 ~ 9
+ INTEGER
+
+MobileNetworkCode ::=
+ -- mobile network code: 2 or 3 digit in decimal which is saved in INTEGER variable
+ -- in BCD format except last digit which may have 0xf
+ -- B[12..31]: 0(don't care)
+ -- B[8..11]: 1st digit(most significant digit), valid range 0 ~ 9
+ -- B[4..7]: 2nd digit, valid range 0 ~ 9
+ -- B[0..3]: 3rd digit(least significant digit), valid range 0 ~ 9 or 0xf
+ -- if last digit has 0xf, then MNC is 2 digit, else if it has 0 ~ 9 then MNC is
+ -- 3 digit.
+ INTEGER
+
+MSRangeMax ::= INTEGER
+NetworkColourCode ::= INTEGER (0..7)
+NoOfBlocksForAccessGrant ::= INTEGER (0..7)
+NoOfMultiframesBetweenPaging ::= INTEGER (2..9)
+Ny1 ::= INTEGER (0..7)
+PlmnPermitted ::= INTEGER
+PowerControlInterval ::= INTEGER (0..31)
+PowerIncrStepSize ::= INTEGER (0..2)
+PowerRedStepSize ::= INTEGER (0..1)
+QueueTimeLimit ::= INTEGER
+RadioLinkTimeout ::= INTEGER (0..15)
+RxLev ::= INTEGER (0..63)
+RxQual ::= INTEGER (0..7)
+TimerPeriodicUpdateMS ::= INTEGER (0..255)
+Tsc ::= INTEGER
+TxInteger ::= INTEGER (0..15)
+TxPower ::= INTEGER
+TxPwrMaxReduction ::= INTEGER (0..6)
+Weighting ::= INTEGER (0..3)
+
+Si13Position ::= INTEGER (0..1)
+CbchTrxSlot ::= INTEGER (0..7)
+CbchTrx ::= INTEGER (0..1)
+BcchChangeMark ::= INTEGER (0..3)
+SiChangeField ::= INTEGER (0..15)
+
+
+
+-- DisplayString ::= OCTET STRING (SIZE(0..255))
+-- Complex variables:
+-- Average ::= INTEGER
+-- Deviation ::= INTEGER
+-- Minimum ::= INTEGER
+-- Maximum ::= INTEGER
+--
+-- The following textual conventions limit the value to particular items.
+-- This is very much like the C "typedef enum" construct.
+--
+
+AdministrativeState ::= INTEGER { locked(0), unlocked(1), shuttingDown(2) }
+AlarmStatus ::= INTEGER { underRepair(0), critical(1), major(2),
+ minor(3), alarmOutstanding(4) }
+Boolean ::= INTEGER { false(0), true(1) }
+ChannelCombination ::= INTEGER { tCHFull(0), -- TCH/F + FACCH/F + SACCH/F
+ tCHHalf(1), -- TCH/H(0,1) + FACCH/H(0,1) + SACCH/H(0,1)
+ tCHHalf2(2), -- TCH/H(0,0) + FACCH/H(0,1) + SACCH/H(0,1) + TCH/H(1,1)
+ sDCCH(3), -- SDCCH/8(0 ..7) + SACCH/C8(0 .. 7)
+ mainBCCH(4), -- FCCH + SCH + BCCH + CCCH
+ bCCHCombined(5), -- FCCH + SCH + BCCH + CCCH + SDCCH/4(0...3) + SACCH/C4(0...3)
+ cCH(6), -- BCCH + CCCH
+ bCCHwithCBCH(7), -- combination 5 with CBCH as 05.02 Note 1
+ sDCCHwithCBCH(8) -- combination 3 with CBCH as 05.02 Note 1
+ }
+
+DtxUplink ::= INTEGER { msMayUseDTx(0), msShallUseDTx(1),
+ msShallNotUseDTx(2) }
+EnableHoType ::= INTEGER { enablePwrBudget(0),
+ enableMSDistanceProcess (1) }
+EnableDisable ::= INTEGER { disable(0), enable(1) }
+GsmdcsIndicator ::= INTEGER { gsm(0), dcs(1), pcs1900(2)}
+LoopBackControlCode ::= INTEGER { disable(0), enable(1) }
+MaxRetrans ::= INTEGER { one(1), two(2), four(4), seven(7) }
+OperationalState ::= INTEGER { disabled(0), enabled(1) }
+OamCommand ::= INTEGER {
+ none (0), -- No OAM activity
+ reloadMib (1), -- Load MIB from the default MIB file.
+ flushMib (2), -- Save MIB to the default MIB file.
+ loadMibFromAltFile (4), -- Load MIB from an alternate MIB file.
+ saveMibToAltFile (8), -- Save MIB to the alternate MIB file.
+ saveMibMinDelay (16), -- Save MIB to the disk as soon as possible. It may incuur excessive number of FILE I/O if the changes are fequentnt
+ saveMibMinFileIo (32), -- Save MIB with some delay, but less Filo I/O. Multiple changes may be handled with one File I/O
+ reboot (64), -- Reboot the node immidiately.
+ delayedReboot (128) -- Reboot the node in 30 second time.
+ }
+OamCommandExecutionStatus ::= INTEGER { none (0),
+ inProgress (1), -- OAM Command is in progress.
+ sucessful (2), -- Last OAM command was completed successfully
+ failed (3) -- Last OAM command execution failed. Check oamCommandLastError to get text description of the error
+ }
+
+PowerClass ::= INTEGER {
+ m1 (1), -- (0.2W - GSM 900)
+ m3 (2), -- (0.1W - DCS 1800)
+ m2 (3) -- (0.2W - PCS 1900)
+ }
+SnmpTrapType ::= INTEGER {
+ snmpv1Trap (1),
+ snmpv2Trap (2)
+ }
+--SnmpTrigger ::= INTEGER {
+-- none (0),
+-- when-item-1-changes (1),
+-- when-item-2-changes (2),
+-- when-item-1-or-2-changes (3),
+-- when-item-1-exceeds-item-2 (4),
+-- once-when-item-1-changes (5),
+-- once-when-item-2-changes (6),
+-- once-when-item-1-or-2-changes (7),
+-- once-when-item-1-exceeds-item-2 (8)
+-- }
+
+PowerStatus ::= INTEGER { power-off(0), power-on(1) }
+PowerSupplyType ::= INTEGER { basic(0), ups(1) }
+RecoveryMode ::= INTEGER { disable(0), enable(1), now(2) }
+
+gp10Mib OBJECT IDENTIFIER ::= { jetcell 1 }
+gmcMib OBJECT IDENTIFIER ::= { jetcell 2 }
+viperAccessMib OBJECT IDENTIFIER ::= { jetcell 3 }
+
+gp10GsmMib OBJECT IDENTIFIER ::= { gp10Mib 1 }
+gp10H323Mib OBJECT IDENTIFIER ::= { gp10Mib 2 }
+gp10ConfigMib OBJECT IDENTIFIER ::= { gp10Mib 3 }
+gp10SpecificMib OBJECT IDENTIFIER ::= { gp10Mib 4 }
+gp10MgmtInfoMib OBJECT IDENTIFIER ::= { gp10Mib 5 }
+gp10ErrorInfoMib OBJECT IDENTIFIER ::= { gp10Mib 6 }
+gp10GprsMib OBJECT IDENTIFIER ::= { gp10Mib 7 } -- Sandeep
+gp10CdrMib OBJECT IDENTIFIER ::= { gp10Mib 8 }
+handoverTimerMib OBJECT IDENTIFIER ::= { gp10Mib 9 }
+gp10ServiceStatusMib OBJECT IDENTIFIER ::= { gp10Mib 10 }
+
+--
+-- gp10 MIB
+--
+-- The Gp10 MIB is organized into 3 sub-leafs. The first contains
+-- a consolidation of information based on the CMIP/CMISE GSM definitions
+-- in the GSM 12.xx specifications. The second leaf contains information
+-- from the public H.323 MIB definitions. The third contains configuration
+-- parameters and data that is required for the Gp10 to initialize.
+--
+-- Initially, only the gp10GsmMib and the gp10ConfigMib leafs
+-- of the MIB are defined. As the H.323 specifications are formalized
+-- the H.323 values will be added. Note: Initialization parameters for
+-- the H.323 stack are stored in a leaf under gp10ConfifMib.
+--
+--
+-- The gp10GsmMib is largest and most complex part of the MIB that
+-- is currently defined. It is broken into several leafs as follows:
+--
+-- 1: btsBasicPackage Basic Parameters (primarily RM)
+-- 2: btsOptionsPackage More params (wider interest)
+-- 3: firstTransceiverPackage All the per-transceiver parms
+-- 4: secondTransceiverPackage Exact duplicate for 2nd trx.
+-- 5: firstRadioCarrierPackage The radio carrier information.
+-- 6: secondRadioCarrierPackage Exact duplicate for 2nd trx.
+-- 7: btsTimerPackage General timers used.
+-- 8: adjacentCellPackage Adj Cell Handover & Reselection
+-- 9: frequencyHoppingPackage Frequency Hopping params
+-- 10: handoverControlPackage Handover control params
+-- 11: powerControlPackage Power control params
+-- 12: cellMeasurmentPackage Performance measurment data
+-- 13: callControlMeasurmentPackatge More performance data.
+--
+
+btsBasicPackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "The bts MOC represents the GSM functional element Base
+-- Transceiver Station. An instance of this MOC is associated
+-- by containment with a particular bssFunction instance and a
+-- particular btsSiteManager instance. Multiple instances of
+-- this MOC may be contained within a btsSiteManager instance.
+-- The attributes within the package btsBasicPackage describe
+-- the basic properties of a BTS that are not related to the
+-- Common Control Channels.
+--
+-- The attributes bsIdentityCode and cellGlobalIdentity can be
+-- modified by the M-SET command only when the administrative
+-- state of the bts is locked.
+--
+-- All values of the administrative, operational, and usage
+-- states are supported. The availabilityStatus qualifies in
+-- more details the operationalState while the controlStatus
+-- provides information to support the test management. The
+-- M-SET command changing the administrative state shall not
+-- change any other attributes.
+--
+-- The administrative states for the BTS have the following
+-- meanings: In the shutting down state, no new traffic is
+-- allowed through the BTS. In this state, the BTS is barred
+-- (message sent to MS) and no incoming handovers are allowed.
+-- If all traffic is cleared, the BTS changes to the locked
+-- state. In the locked state, all calls through the BTS are
+-- disconnected. The BSC should clear all calls with cause set
+-- to 'O and M intervention'. No new traffic is possible on the
+-- BTS and no incoming handovers are allowed. In the unlocked
+-- state, new traffic is allowed through the BTS and incoming
+-- handovers are allowed. The locked administrative state stops
+-- normal operations of the resource (not, for example,
+-- operations for test purposes)."
+ ::= {gp10GsmMib 1}
+
+ bts-ncc OBJECT-TYPE
+ SYNTAX NetworkColourCode
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute contains the Base Station Identity Code (BSIC),
+ which is transmitted on the SCH and used for identifying a BTS.
+ The BSIC consists of the Network Colour Code (NCC) and the Base
+ Station Colour Code (BCC). Refer to Specification GSM 04.08."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsBasicPackage 1}
+
+ bts-cid OBJECT-TYPE
+ SYNTAX CellIdentity
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Mobile Network Code"
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsBasicPackage 2}
+
+ btsID OBJECT-TYPE
+ SYNTAX GSMGeneralObjectID
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute names a bts object. Its value is an
+ integral number, which must be unique within the
+ superior btsSiteManager."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsBasicPackage 3}
+
+ cellAllocationTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF CellAllocationEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This entry is required to define a table of values."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsBasicPackage 4}
+
+ cellAllocationEntry OBJECT-TYPE
+ SYNTAX CellAllocationEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This attribute defines the set of radio frequencies
+ allocated and available to a cell. The first element
+ sets the BCCH frequency."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ INDEX {cellAllocationIndex}
+ --DEFAULT cookie MIBT_%n
+ ::= {cellAllocationTable 1}
+
+ CellAllocationEntry ::= SEQUENCE {
+ cellAllocationIndex INTEGER,
+ cellAllocation AbsoluteRFChannelNo
+ }
+
+ cellAllocationIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..31)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Index to the Cell Allocation table."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {cellAllocationEntry 1}
+
+ cellAllocation OBJECT-TYPE
+ SYNTAX AbsoluteRFChannelNo
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute contains a radio frequency that is allocated
+ and available to this cell."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {cellAllocationEntry 2}
+
+ gsmdcsIndicator OBJECT-TYPE
+ SYNTAX GsmdcsIndicator
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute indicates the type (GSM or DCS 1800) of
+ the cell. The value may be used to interpret or check
+ other attribute values."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsBasicPackage 5}
+
+ bts-mcc OBJECT-TYPE
+ SYNTAX MobileCountryCode
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute contains the Cell Identification (CI) and
+ the Location Area of the cell. A Location Area is unique
+ within a GSM PLMN; a Cell Identification is unique within
+ a location area. For further details see Spec GSM 03.03.
+
+ MobileCountryCode
+
+ Note: 3 digit in decimal which is saved in INTEGER variable in BCD format
+ B[12..31]: 0(don't care)
+ B[8..11]: 1st digit(most significant digit), valid range 0 ~ 9
+ B[4..7]: 2nd digit, valid range 0 ~ 9
+ B[0..3]: 3rd digit(least significant digit), valid range 0 ~ 9
+ "
+ REFERENCE
+ "Owner Module: RRM + CC + MM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsBasicPackage 6}
+
+ bts-mnc OBJECT-TYPE
+ SYNTAX MobileNetworkCode
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Mobile Network Code
+
+ Note: 2 or 3 digit in decimal which is saved in INTEGER variable in BCD format except last digit which may have 0xf
+ B[12..31]: 0(don't care)
+ B[8..11]: 1st digit(most significant digit), valid range 0 ~ 9
+ B[4..7]: 2nd digit, valid range 0 ~ 9
+ B[0..3]: 3rd digit(least significant digit), valid range 0 ~ 9 or 0xf
+ if last digit has 0xf, then MNC is 2 digit, else if it has 0 ~ 9 then MNC is 3 digit.
+ "
+ REFERENCE
+ "Owner Module: RRM + CC + MM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsBasicPackage 7}
+
+ bts-lac OBJECT-TYPE
+ SYNTAX LocationAreaCode
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Location Area Code"
+ REFERENCE
+ "Owner Module: RRM + CC + MM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsBasicPackage 8}
+
+ bts-ci OBJECT-TYPE
+ SYNTAX CellIdentity
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Cell Identity Code"
+ REFERENCE
+ "Owner Module: RRM + CC + MM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsBasicPackage 9}
+
+ cellReselectHysteresis OBJECT-TYPE
+ SYNTAX CellReselectHysteresis
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The cell-reselect-hysteresis attribute indicates the
+ value of the receiver RF power level hysteresis required
+ for cell reselection. Refer to Specification GSM 05.08.
+
+ This parameter has a range of 0 to 14 dB with a step size
+ of 2 dB and is coded as an integer in the range 0 to 7
+ representing the number of the 2 dB steps."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsBasicPackage 10}
+
+ ny1 OBJECT-TYPE
+ SYNTAX Ny1
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The ny1 attribute indicates the maximum number of
+ repetitions of the PHYSICAL INFORMATION message on the
+ radio interface (GSM 04.08). This message is sent by the
+ BTS to the MS during a handover procedure between two not
+ synchronized cells, in order to establish a physical channel
+ connection on the new cell."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsBasicPackage 11}
+
+ plmnPermittedTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF PlmnPermittedEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This attribute contains the values of the Network Colour
+ Code (NCC) for an accessing MS. Refer to Specification
+ GSM 05.08 (NCC_PERMITTED)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsBasicPackage 12}
+
+ plmnPermittedEntry OBJECT-TYPE
+ SYNTAX PlmnPermittedEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This entry is required to define a table of values."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ INDEX {plmnPermittedIndex}
+ --DEFAULT cookie MIBT_%n
+ ::= {plmnPermittedTable 1}
+
+ PlmnPermittedEntry ::= SEQUENCE {
+ plmnPermittedIndex INTEGER,
+ plmnPermitted PlmnPermitted
+ }
+
+ plmnPermittedIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Index to the Plmn Permitted table."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {plmnPermittedEntry 1}
+
+ plmnPermitted OBJECT-TYPE
+ SYNTAX PlmnPermitted
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute contains the values of the Network Colour
+ Code (NCC) for an accessing MS. Refer to Specification
+ GSM 05.08 (NCC_PERMITTED)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {plmnPermittedEntry 2}
+
+ radioLinkTimeout OBJECT-TYPE
+ SYNTAX RadioLinkTimeout
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The radioLinkTimeout attribute is used to indicate the
+ maximum value of the radio link counter needed to detect
+ a radio link failure. This value is used by the MS
+ procedure and may also be used for the BSS procedure.
+ See Specification GSM 05.08 for more information. This
+ attribute corresponds to the radio sub-system link control
+ parameter RADIO_LINK_TIMEOUT.
+
+ The radio-link-time-out parameter has a range from 4 to
+ 64 SACCH blocks with a step size of 4 SACCH blocks."
+ REFERENCE
+ "Owner Module: L1 module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ DEFVAL
+ {4}
+ ::= {btsBasicPackage 13}
+
+ relatedTranscoder OBJECT-TYPE
+ SYNTAX GSMGeneralObjectID
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The relatedTranscoder indicates the instance(s) of
+ the transcoder object (if any) that are related to
+ a bts for purposes of TRAU O&M messages as specified
+ in GSM 08.60 and GSM 12.21."
+ REFERENCE
+ "Owner Module: L1 module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsBasicPackage 14}
+
+ rxLevAccessMin OBJECT-TYPE
+ SYNTAX RxLev
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The rxLevAccessMin attribute is used to indicate the
+ minimum receive level at the MS required for access
+ to the system. See Specification GSM 05.08
+ (RXLEV_ACCESS_MIN). This parameter is used in order
+ to evaluate the path loss criterion parameter (C1)
+ of a cell (GSM 05.08). The value is an integer in
+ the range 0 to 63 (GSM 05.08)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsBasicPackage 15}
+
+ bts-administrativeState OBJECT-TYPE
+ SYNTAX AdministrativeState
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The semantics of the administrativeState attribute type are
+ specified in Recommendation X.731 and the syntax is defined
+ in Recommendation X.721.
+
+ This attribute has a value of locked(0), unlocked(1),
+ shuttingDown(2)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: immediatly"
+ ::= {btsBasicPackage 16}
+
+ bts-alarmStatus OBJECT-TYPE
+ SYNTAX AlarmStatus
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The semantics and syntax of the alarmStatus attribute type
+ are specified in Recommendation M.3100.
+
+ This attribute has a value of underRepair(0), critical(1),
+ major(2), minor(3), alarmOutstanding(4)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediatly"
+ ::= {btsBasicPackage 17}
+
+ bts-operationalState OBJECT-TYPE
+ SYNTAX OperationalState
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The semantics of the operationalState attribute type is
+ specified in Recommendation X.731. A specification of the
+ syntax is found in Recommendation X.721.
+
+ This attribute has a value of disabled(0), enabled(1)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediatly"
+ ::= {btsBasicPackage 18}
+
+-- Bts CCCH Configuration Package
+-- This package was consolidated with the BtsBasicPackage to
+-- reduce the number of packages and hence the number of callbacks
+-- in the SNMP manager.
+--
+-- btsCCCHConfigurationPackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "The package btsCCCHConfigurationPackage defines the
+-- properties of the Common Control Channels of the BTS.
+-- All attribute values are broadcast to the Mobile Stations
+-- within the SYS INFO messages. Some of these may also be
+-- used by the BSS; e.g. to identify overload on the CCCH."
+--
+ maxNumberRetransmissions OBJECT-TYPE
+ SYNTAX MaxRetrans
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The value of the attribute is the maximum number of
+ retransmissions a MS may perform on the RACH. The
+ possible values are 1, 2, 4 and 7. Refer to
+ Specification GSM 05.08 (MAX_RETRAN)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsBasicPackage 19}
+
+ mSTxPwrMaxCCH OBJECT-TYPE
+ SYNTAX TxPower
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The mSTxPwrMaxCCH attribute is used to indicate the
+ maximum transmit power level a MS may use when accessing
+ the cell until commanded otherwise. See Specification
+ GSM 05.08 (MS_TXPWR_MAX_CCH). This parameter is also
+ used in order to evaluate the path loss criterion
+ parameter (C1) of a cell. See Specification GSM 05.08."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsBasicPackage 20}
+
+ numberOfSlotsSpreadTrans OBJECT-TYPE
+ SYNTAX TxInteger
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The numberOfSlotsSpreadTrans attribute (TX Integer) is
+ used to represent the maximum number of RACH slots a MS
+ must wait, after an unsuccessful random access attempt,
+ before a new random access. The MS draws a random number
+ between 0 and the value of this parameter, in order to
+ decide when to start the new access. Hence this parameter
+ allows the access retransmissions be spread over a fixed
+ number of RACH slots.
+
+ The value is coded as an integer in the range 0 to 15; the
+ corresponding numbers of slots used to spread transmission
+ (3 to 50) is indicated in Specification GSM 04.08."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsBasicPackage 21}
+
+ noOfBlocksForAccessGrant OBJECT-TYPE
+ SYNTAX NoOfBlocksForAccessGrant
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute specifies the number of TDMA frames
+ reserved for the Access Grant channel during a period
+ of 51 TDMA frames (a multiframe). For details refer to
+ Specification GSM 05.02."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsBasicPackage 22}
+
+ noOfMultiframesBetweenPaging OBJECT-TYPE
+ SYNTAX NoOfMultiframesBetweenPaging
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This value denotes the number of multiframes (51 frames)
+ between two transmissions of the same paging message to
+ mobiles of the same paging group."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsBasicPackage 23}
+
+
+
+btsOptionsPackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "The package btsOptionsPackage defines the
+-- properties of the Common Control Channels of the BTS.
+-- All attribute values are broadcast to the Mobile Stations
+-- within the SYS INFO messages. Some of these may also be
+-- used by the BSS; e.g. to identify overload on the CCCH."
+ ::= {gp10GsmMib 2}
+
+ allowIMSIAttachDetach OBJECT-TYPE
+ SYNTAX Boolean
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute controls whether the IMSI attach/detach
+ procedure is used in the cell. The value true means that
+ IMSI attach/detach is used. Ref. GSM 04.08."
+ REFERENCE
+ "Owner Module: RRM + MM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsOptionsPackage 1}
+
+ callReestablishmentAllowed OBJECT-TYPE
+ SYNTAX Boolean
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute indicates whether call re-establishment
+ is allowed in the cell. A value of TRUE means that it
+ is allowed, a value of FALSE means not allowed."
+ REFERENCE
+ "Owner Module: RRM + CC module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsOptionsPackage 2}
+
+ cellBarred OBJECT-TYPE
+ SYNTAX Boolean
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Cell Identity Code"
+ REFERENCE
+ "Owner Module: RRM + CC + MM module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {btsOptionsPackage 3}
+
+ dtxDownlink OBJECT-TYPE
+ SYNTAX Boolean
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Availability of downlink DTX is an implementation option.
+ Its availability in a system is indicated by this attribute.
+ If available, use of the downlink DTX is controlled by the
+ MSC (see GSM 04.08). The boolean values of the dtxDownlink
+ attribute are as follows:
+
+ true = downlink DTX is available in the BTS
+ false = downlink DTX is not available in the BTS"
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsOptionsPackage 4}
+
+ dtxUplink OBJECT-TYPE
+ SYNTAX DtxUplink
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute specifies the Discontinuous Transmission
+ (DTX) mode to be used by the Mobile Stations. The
+ implementation of DTX for the uplink is compulsory
+ in the Mobile Station and the Base Station System.
+ However, its actual use is under control of the operator.
+ GSM 04.08 allows for three availability options to be
+ broadcast to the MS. The information as to whether a MS
+ can use uplink DTX is transmitted in the Cell Options of
+ the SYSINFO3 message. The alternatives are the following:
+
+ - Uplink DTX is on in the BTS and usage is under the
+ control of the MS
+ (MS may use DTX)
+ - Uplink DTX is on in the BTS and all MSs must use it.
+ (MS shall use DTX)
+ - Uplink DTX is off in the BTS.
+ (MS shall not use DTX)"
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsOptionsPackage 5}
+
+ emergencyCallRestricted OBJECT-TYPE
+ SYNTAX Boolean
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The attribute determines whether emergency calls are
+ allowed to all MSs or restricted to MSs belonging to
+ access classes in the range 11 to 15. The value true
+ indicates that emergency calls are restricted.
+
+ The special access class ten (10) is used to carry the
+ value on the Air Interface. See Specification 04.08."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsOptionsPackage 6}
+
+ notAllowedAccessClassTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF NotAllowedAccessClassEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "The attribute determines whether emergency calls are
+ allowed to all MSs or restricted to MSs belonging to
+ access classes in the range 11 to 15. The value true
+ indicates that emergency calls are restricted.
+
+ The special access class ten (10) is used to carry the
+ value on the Air Interface. See Specification 04.08."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsOptionsPackage 7}
+
+ notAllowedAccessClassEntry OBJECT-TYPE
+ SYNTAX NotAllowedAccessClassEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This entry is required to define a table of values."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ INDEX {notAllowedAccessClassIndex}
+ --DEFAULT cookie MIBT_%n
+ ::= {notAllowedAccessClassTable 1}
+
+ NotAllowedAccessClassEntry ::= SEQUENCE {
+ notAllowedAccessClassIndex INTEGER,
+ notAllowedAccessClass ClassNumber
+ }
+
+ notAllowedAccessClassIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Index to the not allowed access classes table."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {notAllowedAccessClassEntry 1}
+
+ notAllowedAccessClass OBJECT-TYPE
+ SYNTAX ClassNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute contains a list of MS Access Classes, which
+ are not allowed to access the cell. It should be noted that
+ the access class number ten (10) does not exist as a normal
+ access class; it is used to restrict emergency calls (see
+ also attribute emergencyCallRestricted). For further details
+ refer to Specification 04.08."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {notAllowedAccessClassEntry 2}
+
+ timerPeriodicUpdateMS OBJECT-TYPE
+ SYNTAX TimerPeriodicUpdateMS
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This specifies the interval for the MS periodic location
+ updates. The interval is measured in decihours; the range
+ is 0 to 255 decihours (25.5 hours). The value zero indicates
+ that the MS should not perform any periodic location updates."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsOptionsPackage 8}
+
+-- BTS Queueing Package
+-- This package was consolidated with the BtsOptionsPackage to
+-- reduce the number of packages and hence the number of callbacks
+-- in the SNMP manager.
+--
+-- btsQueueingPackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "The attributes in the package btsQueuingPackage are
+-- parameters used in handling call and handover queues
+-- relevant to the BTS."
+
+ maxQueueLength OBJECT-TYPE
+ SYNTAX MaxQueueLength
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The attribute specifies the maximum length of queues in
+ the BTS. The queue elements are call and handover attempts
+ waiting for a TCH to be released in that BTS; the value is
+ a percentage of the total number of working TCHs in the BTS.
+
+ - value 0: no queuing used.
+ - value 100: maximum queue length is equal to the
+ total number of enabled TCHs."
+ REFERENCE
+ "Owner Module: MM + CC module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsOptionsPackage 9}
+
+ msPriorityUsedInQueueing OBJECT-TYPE
+ SYNTAX Boolean
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute specifies whether call priority in
+ ASSIGNMENT REQUEST message (or HANDOVER REQUEST message
+ in ho) from MSC is taken into account in queue handling."
+ REFERENCE
+ "Owner Module: MM + CC module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsOptionsPackage 10}
+
+ timeLimitCall OBJECT-TYPE
+ SYNTAX QueueTimeLimit
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This is the maximum time a call attempt may wait for a
+ traffic channel to be available (GSM 08.08 T11). The unit
+ of measure is seconds. The value zero indicates that no
+ call queuing is used in the BTS.
+
+ The value of this attribute is in seconds."
+ REFERENCE
+ "Owner Module: MM + CC module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsOptionsPackage 11}
+
+ timeLimitHandover OBJECT-TYPE
+ SYNTAX QueueTimeLimit
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This is the maximum time a handover attempt may wait for
+ a traffic channel to be available (GSM 08.08 Tqho). The
+ unit of measure is seconds. The value zero indicates that
+ no handover queuing is used in the BTS.
+
+ The value of this attribute is in seconds."
+ REFERENCE
+ "Owner Module: MM + CC module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {btsOptionsPackage 12}
+
+
+firstTransceiverPackage OBJECT IDENTIFIER
+--
+-- Tranceiver Package
+--
+-- There are several packages of data that need to be duplicated based
+-- on the fact that there are 2 radios in the Gp10. Thus, we have
+-- consolidated all of the data parameters that have to do with the
+-- two transceivers into the following package. This includes the Baseband
+-- tranceiver package, and the channel package.
+--
+-- Baseband Transceiver Package
+--
+-- basebandTransceiverPackage-0 OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "The basebandTransceiver managed object class represents
+-- functions common to eight (8) channels which are mapped
+-- through the radio resource onto radio timeslots. The
+-- underlying functionality to be managed includes speech
+-- rate adaptation, channel encoding and decoding, and frame
+-- building.
+--
+-- This definition covers what may be described as the baseband
+-- aspects of transmission in the GSM and DCS 1800 base station
+-- systems. This functionality is related to the radio carrier
+-- aspects by means of the relatedRadioCarrier and the channel
+-- definitions (see radioCarrier and channel managed object
+-- classes). This package provides the basic set of attributes
+-- for identification and relationship management."
+ ::= {gp10GsmMib 3}
+
+ basebandTransceiverID-0 OBJECT-TYPE
+ SYNTAX GSMGeneralObjectID
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute names a baseband Transceiver."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: immediatly"
+ ::= {firstTransceiverPackage 1}
+
+ relatedRadioCarrier-0 OBJECT-TYPE
+ SYNTAX GSMGeneralObjectID
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute identifies the instance of a radioCarrier
+ object which represents the RF aspects related to a
+ basebandTransceiver, if any. This attribute will take the
+ value 'NULL' when the basebandTransceiver object instance
+ has no direct relationship with any one radioCarrier object
+ instance (i.e. the timeslots handled by a basebandTransceiver
+ are possibly spread over several radioCarrier object
+ instances). "
+ ::= {firstTransceiverPackage 2}
+
+ basebandAdministrativeState-0 OBJECT-TYPE
+ SYNTAX AdministrativeState
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The semantics of the administrativeState attribute type are
+ specified in Recommendation X.731 and the syntax is defined
+ in Recommendation X.721.
+
+ This attribute has a value of locked(0), unlocked(1),
+ shuttingDown(2)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: immediatly"
+ ::= {firstTransceiverPackage 3}
+
+ basebandAlarmStatus-0 OBJECT-TYPE
+ SYNTAX AlarmStatus
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The semantics and syntax of the alarmStatus attribute type
+ are specified in Recommendation M.3100.
+
+ This attribute has a value of underRepair(0), critical(1),
+ major(2), minor(3), alarmOutstanding(4)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediatly"
+ ::= {firstTransceiverPackage 4}
+
+
+ basebandOperationalState-0 OBJECT-TYPE
+ SYNTAX OperationalState
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The semantics of the operationalState attribute type is
+ specified in Recommendation X.731. A specification of the
+ syntax is found in Recommendation X.721.
+
+ This attribute has a value of disabled(0), enabled(1)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediatly"
+ ::= {firstTransceiverPackage 5}
+
+-- Gp10 Channel Package
+--
+-- Note: There are 2 trx's on a viper cell, each with 8 channels.
+-- Thus, this table was folded into the First and Second transceiver
+-- data tables.
+--
+--
+-- channelPackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "The channel object class represents the manageable
+-- properties of a time slot. See Specification GSM 05.02
+-- for details. This package provides attributes for
+-- identification and management of the properties of the
+-- channel. A channel may or may not use frequency hopping.
+-- The usage of frequency hopping is indicated by the
+-- attribute frequencyUsage.
+--
+-- The administrative states of the channel object have the
+-- following meanings: When a channel is locked it will
+-- immediately stop transmitting or receiving any information
+-- in the time slot. If the channel is a control channel, all
+-- calls in the BTS may be affected. When a channel is unlocked,
+-- it is able to accept traffic. When a channel is shutting down,
+-- no new traffic is allowed, no inbound handovers are accepted.
+-- In this state, clearing of existing traffic results in
+-- transition to locked state. The locked administrative state
+-- stops normal operations of the resource (not, for example,
+-- operations for test purposes)."
+-- ::= {gp10GsmMib 10}
+
+ channel-0-Table OBJECT-TYPE
+ SYNTAX SEQUENCE OF Channel-0-Entry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This entry is required to define a table of values."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {firstTransceiverPackage 6}
+
+ channel-0-Entry OBJECT-TYPE
+ SYNTAX Channel-0-Entry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This attribute defines the set of radio frequencies
+ allocated and available to a cell. The first element
+ sets the BCCH frequency."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ INDEX {channelIndex-0}
+ --DEFAULT cookie MIBT_%n
+ ::= {channel-0-Table 1}
+
+ Channel-0-Entry ::= SEQUENCE {
+ channelIndex-0 INTEGER,
+ channelID-0 ChannelID,
+ channelCombination-0 ChannelCombination,
+ channelFrequencyUsage-0 FrequencyUsage,
+ channelTsc-0 Tsc,
+ channelAdministrativeState-0 AdministrativeState,
+ channelOperationalState-0 OperationalState
+ }
+
+ channelIndex-0 OBJECT-TYPE
+ SYNTAX INTEGER (0..7)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This attribute is used as the index to this table. It
+ is a sequential number between 0 and 15."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {channel-0-Entry 1}
+
+ channelID-0 OBJECT-TYPE
+ SYNTAX ChannelID
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute is used for naming channel object
+ instances, and corresponds to the channel's time
+ slot number."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: on restart"
+ ::= {channel-0-Entry 2}
+
+ channelCombination-0 OBJECT-TYPE
+ SYNTAX ChannelCombination
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute defines the logical channel combination
+ mapped onto the physical channel (time slot). For details
+ Refer to Specification GSM 05.02.
+
+ The following are the permitted ways, as defined by
+ GSM 04.03, in which channels can be combined onto basic
+ physical channels (numbers appearing in parenthesis after
+ channel designations indicate sub-channel numbers; channels
+ and sub-channels need not necessarily be assigned) :
+
+ i) TCH/F + FACCH/F + SACCH/F
+ ii) TCH/H(0,1) + FACCH/H(0,1) + SACCH/H(0,1)
+ iii) TCH/H(0,0) + FACCH/H(0,1) + SACCH/H(0,1) + TCH/H(1,1)
+ iv) FCCH + SCH + BCCH + CCCH
+ v) FCCH + SCH + BCCH + CCCH + SDCCH/4(0...3) + SACCH/C4(0...3)
+ vi) BCCH + CCCH
+ vii) SDCCH/8(0 ..7) + SACCH/C8(0 .. 7)
+ where CCCH = PCH + RACH + AGCH
+
+ Note 1: Where the SMSCB is supported, the CBCH replaces
+ SDCCH number 2 in cases v) and vii) above.
+ Note 2: A combined CCCH/SDCCH allocation (case v) above)
+ may only be used when no other CCCH channel is
+ allocated.
+
+ *********************************************************************
+ WARNING: Currently(Ver 1.5, 2.0 and 3.0) the only valid value of
+ Channel Combination of row 1 is BCCHCombined(5).
+ The only valid value of rest rows(row 2 to row 8) are TCHFull(0).
+ *********************************************************************"
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager (only between combination I and V)
+ Effective-time: on restart"
+ ::= {channel-0-Entry 3}
+
+ channelFrequencyUsage-0 OBJECT-TYPE
+ SYNTAX FrequencyUsage
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute defines the frequencies used by a radio time
+ slot. If no frequency hopping is used, the attribute contains
+ an Absolute Radio Frequency Channel Number (ARFCN). If the
+ channel is configured to BCCH usage, the BCCH frequency is
+ set using the first value from the cellAllocation attribute
+ in the btsBasicPackage and the frequencyUsage attribute value
+ is ignored. If frequency hopping is used, the attribute
+ contains a reference to a frequencyHoppingSystem instance
+ plus the MAIO. ****"
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: on restart"
+ ::= {channel-0-Entry 4}
+
+ channelTsc-0 OBJECT-TYPE
+ SYNTAX Tsc
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute contains the Training Sequence Code (TSC)
+ of a radio channel. For control channels, TSC is always
+ equal to the BCC (Base Station Colour Code). For other
+ channels, there are no restrictions.
+
+ *********************************************************************
+ WARNING: Currently(Ver 1.5, 2.0 and 3.0) the only valid value of
+ this variable is 0(Use BCC).
+ *********************************************************************"
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {channel-0-Entry 5}
+
+ channelAdministrativeState-0 OBJECT-TYPE
+ SYNTAX AdministrativeState
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The semantics of the administrativeState attribute type are
+ specified in Recommendation X.731 and the syntax is defined
+ in Recommendation X.721.
+
+ This attribute has a value of locked(0), unlocked(1),
+ shuttingDown(2)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {channel-0-Entry 6}
+
+ channelOperationalState-0 OBJECT-TYPE
+ SYNTAX OperationalState
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The semantics of the operationalState attribute type is
+ specified in Recommendation X.731. A specification of the
+ syntax is found in Recommendation X.721.
+
+ This attribute has a value of disabled(0), enabled(1)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: on restart"
+ ::= {channel-0-Entry 7}
+
+secondTransceiverPackage OBJECT IDENTIFIER
+--
+-- Transceiver Package
+--
+-- There are several packages of data that need to be duplicated based
+-- on the fact that there are 2 radios in the Gp10. Thus, we have
+-- consolidated all of the data parameters that have to do with the
+-- two transceivers into the following package. This includes the Baseband
+-- Transceiver package, the radio carrier package and the channel package.
+--
+-- Baseband Transceiver Package
+--
+-- basebandTransceiverPackage-1 OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "The basebandTransceiver managed object class represents
+-- functions common to eight (8) channels which are mapped
+-- through the radio resource onto radio timeslots. The
+-- underlying functionality to be managed includes speech
+-- rate adaptation, channel encoding and decoding, and frame
+-- building.
+--
+-- This definition covers what may be described as the baseband
+-- aspects of transmission in the GSM and DCS 1800 base station
+-- systems. This functionality is related to the radio carrier
+-- aspects by means of the relatedRadioCarrier and the channel
+-- definitions (see radioCarrier and channel managed object
+-- classes). This package provides the basic set of attributes
+-- for identification and relationship management."
+ ::= {gp10GsmMib 4}
+
+ basebandTransceiverID-1 OBJECT-TYPE
+ SYNTAX GSMGeneralObjectID
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute names a baseband Transceiver."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: immediatly"
+ ::= {secondTransceiverPackage 1}
+
+ relatedRadioCarrier-1 OBJECT-TYPE
+ SYNTAX GSMGeneralObjectID
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute identifies the instance of a radioCarrier
+ object which represents the RF aspects related to a
+ basebandTransceiver, if any. This attribute will take the
+ value 'NULL' when the basebandTransceiver object instance
+ has no direct relationship with any one radioCarrier object
+ instance (i.e. the timeslots handled by a basebandTransceiver
+ are possibly spread over several radioCarrier object
+ instances). "
+ ::= {secondTransceiverPackage 2}
+
+ basebandAdministrativeState-1 OBJECT-TYPE
+ SYNTAX AdministrativeState
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The semantics of the administrativeState attribute type are
+ specified in Recommendation X.731 and the syntax is defined
+ in Recommendation X.721.
+
+ This attribute has a value of locked(0), unlocked(1),
+ shuttingDown(2)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: immediatly"
+ ::= {secondTransceiverPackage 3}
+
+ basebandAlarmStatus-1 OBJECT-TYPE
+ SYNTAX AlarmStatus
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The semantics and syntax of the alarmStatus attribute type
+ are specified in Recommendation M.3100.
+
+ This attribute has a value of underRepair(0), critical(1),
+ major(2), minor(3), alarmOutstanding(4)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediatly"
+ ::= {secondTransceiverPackage 4}
+
+
+ basebandOperationalState-1 OBJECT-TYPE
+ SYNTAX OperationalState
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The semantics of the operationalState attribute type is
+ specified in Recommendation X.731. A specification of the
+ syntax is found in Recommendation X.721.
+
+ This attribute has a value of disabled(0), enabled(1)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediatly"
+ ::= {secondTransceiverPackage 5}
+
+-- ViperCell Channel Package
+--
+-- Note: There are 2 trx's on a viper cell, each with 8 channels.
+-- Thus, this table was folded into the First and Second transceiver
+-- data tables.
+--
+--
+-- channelPackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "The channel object class represents the manageable
+-- properties of a time slot. See Specification GSM 05.02
+-- for details. This package provides attributes for
+-- identification and management of the properties of the
+-- channel. A channel may or may not use frequency hopping.
+-- The usage of frequency hopping is indicated by the
+-- attribute frequencyUsage.
+--
+-- The administrative states of the channel object have the
+-- following meanings: When a channel is locked it will
+-- immediately stop transmitting or receiving any information
+-- in the time slot. If the channel is a control channel, all
+-- calls in the BTS may be affected. When a channel is unlocked,
+-- it is able to accept traffic. When a channel is shutting down,
+-- no new traffic is allowed, no inbound handovers are accepted.
+-- In this state, clearing of existing traffic results in
+-- transition to locked state. The locked administrative state
+-- stops normal operations of the resource (not, for example,
+-- operations for test purposes)."
+-- ::= {gp10GsmMib 10}
+
+ channel-1-Table OBJECT-TYPE
+ SYNTAX SEQUENCE OF Channel-1-Entry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This entry is required to define a table of values."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {secondTransceiverPackage 6}
+
+ channel-1-Entry OBJECT-TYPE
+ SYNTAX Channel-1-Entry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This attribute defines the set of radio frequencies
+ allocated and available to a cell. The first element
+ sets the BCCH frequency."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ INDEX {channelIndex-1}
+ --DEFAULT cookie MIBT_%n
+ ::= {channel-1-Table 1}
+
+ Channel-1-Entry ::= SEQUENCE {
+ channelIndex-1 INTEGER,
+ channelID-1 ChannelID,
+ channelCombination-1 ChannelCombination,
+ channelFrequencyUsage-1 FrequencyUsage,
+ channelTsc-1 Tsc,
+ channelAdministrativeState-1 AdministrativeState,
+ channelOperationalState-1 OperationalState
+ }
+
+ channelIndex-1 OBJECT-TYPE
+ SYNTAX INTEGER (0..7)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This attribute is used as the index to this table. It
+ is a sequential number between 0 and 15."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {channel-1-Entry 1}
+
+ channelID-1 OBJECT-TYPE
+ SYNTAX ChannelID
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute is used for naming channel object
+ instances, and corresponds to the channel's time
+ slot number."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: on restart"
+ ::= {channel-1-Entry 2}
+
+ channelCombination-1 OBJECT-TYPE
+ SYNTAX ChannelCombination
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute defines the logical channel combination
+ mapped onto the physical channel (time slot). For details
+ Refer to Specification GSM 05.02.
+
+ The following are the permitted ways, as defined by
+ GSM 04.03, in which channels can be combined onto basic
+ physical channels (numbers appearing in parenthesis after
+ channel designations indicate sub-channel numbers; channels
+ and sub-channels need not necessarily be assigned) :
+
+ i) TCH/F + FACCH/F + SACCH/F
+ ii) TCH/H(0,1) + FACCH/H(0,1) + SACCH/H(0,1)
+ iii) TCH/H(0,0) + FACCH/H(0,1) + SACCH/H(0,1) + TCH/H(1,1)
+ iv) FCCH + SCH + BCCH + CCCH
+ v) FCCH + SCH + BCCH + CCCH + SDCCH/4(0...3) + SACCH/C4(0...3)
+ vi) BCCH + CCCH
+ vii) SDCCH/8(0 ..7) + SACCH/C8(0 .. 7)
+ where CCCH = PCH + RACH + AGCH
+
+ Note 1: Where the SMSCB is supported, the CBCH replaces
+ SDCCH number 2 in cases v) and vii) above.
+ Note 2: A combined CCCH/SDCCH allocation (case v) above)
+ may only be used when no other CCCH channel is
+ allocated.
+
+ *********************************************************************
+ WARNING: Currently(Ver 1.5, 2.0 and 3.0) the only valid value of
+ Channel Combination is TCHFull(0).
+ *********************************************************************"
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager (only between combination I and V)
+ Effective-time: on restart"
+ ::= {channel-1-Entry 3}
+
+ channelFrequencyUsage-1 OBJECT-TYPE
+ SYNTAX FrequencyUsage
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute defines the frequencies used by a radio time
+ slot. If no frequency hopping is used, the attribute contains
+ an Absolute Radio Frequency Channel Number (ARFCN). If the
+ channel is configured to BCCH usage, the BCCH frequency is
+ set using the first value from the cellAllocation attribute
+ in the btsBasicPackage and the frequencyUsage attribute value
+ is ignored. If frequency hopping is used, the attribute
+ contains a reference to a frequencyHoppingSystem instance
+ plus the MAIO. ****"
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: on restart"
+ ::= {channel-1-Entry 4}
+
+ channelTsc-1 OBJECT-TYPE
+ SYNTAX Tsc
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute contains the Training Sequence Code (TSC)
+ of a radio channel. For control channels, TSC is always
+ equal to the BCC (Base Station Colour Code). For other
+ channels, there are no restrictions.
+
+ *********************************************************************
+ WARNING: Currently(Ver 1.5, 2.0 and 3.0) the only valid value of
+ this variable is 0(Use BCC).
+ *********************************************************************"
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {channel-1-Entry 5}
+
+ channelAdministrativeState-1 OBJECT-TYPE
+ SYNTAX AdministrativeState
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The semantics of the administrativeState attribute type are
+ specified in Recommendation X.731 and the syntax is defined
+ in Recommendation X.721.
+
+ This attribute has a value of locked(0), unlocked(1),
+ shuttingDown(2)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {channel-1-Entry 6}
+
+ channelOperationalState-1 OBJECT-TYPE
+ SYNTAX OperationalState
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The semantics of the operationalState attribute type is
+ specified in Recommendation X.731. A specification of the
+ syntax is found in Recommendation X.721.
+
+ This attribute has a value of disabled(0), enabled(1)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: on restart"
+ ::= {channel-1-Entry 7}
+
+firstRadioCarrierPackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "The radioCarrier managed object class is a functional
+-- entity representing the manageable properties of a radio
+-- carrier. Together with the basebandTransceiver and channel
+-- MOCs, it is meant to accommodate various system architectures
+-- including fixed frequency, baseband hopping, and synthesized
+-- hopping systems.
+--
+-- This definition covers what may be described as the radio
+-- aspects of transmission in the GSM/DCS 1800 base station
+-- systems. This functionality is related to the baseband
+-- aspects by means of the associated channel definitions (see
+-- channel managed object class). This package provides the
+-- basic identification, control, and relationship attributes."
+ ::= {gp10GsmMib 5}
+
+ carrierFrequency-0-Table OBJECT-TYPE
+ SYNTAX SEQUENCE OF CarrierFrequency-0-Entry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This entry is required to define a table of values."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {firstRadioCarrierPackage 1}
+
+ carrierFrequency-0-Entry OBJECT-TYPE
+ SYNTAX CarrierFrequency-0-Entry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This attribute is used to assign a set of (possibly one)
+ constant radio frequencies to a radioCarrier object. In
+ a fixed frequency or baseband hopping system, the set
+ will contain only one single frequency. In case of a
+ synthesizer hopping system, the set will contain all
+ frequencies the carrier is allowed to use. This set of
+ radio frequencies must be included in the allowed radio
+ frequency values specified by the cellAllocation attribute
+ of the containing bts object instance."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ INDEX {carrierFrequencyIndex-0}
+ --DEFAULT cookie MIBT_%n
+ ::= {carrierFrequency-0-Table 1}
+
+ CarrierFrequency-0-Entry ::= SEQUENCE {
+ carrierFrequencyIndex-0 INTEGER,
+ carrierFrequency-0 AbsoluteRFChannelNo
+ }
+
+ carrierFrequencyIndex-0 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Index to the Carrier Frequency List."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {carrierFrequency-0-Entry 1}
+
+ carrierFrequency-0 OBJECT-TYPE
+ SYNTAX AbsoluteRFChannelNo
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute contains a radio frequency that is allocated
+ and available to this cell."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {carrierFrequency-0-Entry 2}
+
+ powerClass-0 OBJECT-TYPE
+ SYNTAX PowerClass
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute indicates the power class (max peak power)
+ of the transmitter. For further details refer to
+ Specification GSM 05.05."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {firstRadioCarrierPackage 2 }
+
+ radioCarrierID-0 OBJECT-TYPE
+ SYNTAX GSMGeneralObjectID
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute names a radioCarrier instance."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {firstRadioCarrierPackage 3}
+
+ txPwrMaxReduction-0 OBJECT-TYPE
+ SYNTAX TxPwrMaxReduction
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute specifies the number of 2 dB steps the
+ TX should be reduced from the maximum transmit power,
+ for tuning the cell coverage. The resulting attenuated
+ transmit power is the maximum nominal power Pn. See
+ Specifications GSM 05.05, GSM 05.08, and 08.58."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {firstRadioCarrierPackage 4}
+
+ carrier-administrativeState-0 OBJECT-TYPE
+ SYNTAX AdministrativeState
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The semantics of the administrativeState attribute type are
+ specified in Recommendation X.731 and the syntax is defined
+ in Recommendation X.721.
+
+ This attribute has a value of locked(0), unlocked(1),
+ shuttingDown(2)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {firstRadioCarrierPackage 5}
+
+ carrier-alarmStatus-0 OBJECT-TYPE
+ SYNTAX AlarmStatus
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The semantics and syntax of the alarmStatus attribute type
+ are specified in Recommendation M.3100.
+
+ This attribute has a value of underRepair(0), critical(1),
+ major(2), minor(3), alarmOutstanding(4)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately"
+ ::= {firstRadioCarrierPackage 6}
+
+ carrier-operationalState-0 OBJECT-TYPE
+ SYNTAX OperationalState
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The semantics of the operationalState attribute type is
+ specified in Recommendation X.731. A specification of the
+ syntax is found in Recommendation X.721.
+
+ This attribute has a value of disabled(0), enabled(1)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately"
+ ::= {firstRadioCarrierPackage 7}
+
+secondRadioCarrierPackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "The radioCarrier managed object class is a functional
+-- entity representing the manageable properties of a radio
+-- carrier. Together with the basebandTransceiver and channel
+-- MOCs, it is meant to accommodate various system architectures
+-- including fixed frequency, baseband hopping, and synthesized
+-- hopping systems.
+--
+-- This definition covers what may be described as the radio
+-- aspects of transmission in the GSM/DCS 1800 base station
+-- systems. This functionality is related to the baseband
+-- aspects by means of the associated channel definitions (see
+-- channel managed object class). This package provides the
+-- basic identification, control, and relationship attributes."
+ ::= {gp10GsmMib 6}
+
+ carrierFrequency-1-Table OBJECT-TYPE
+ SYNTAX SEQUENCE OF CarrierFrequency-1-Entry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This entry is required to define a table of values."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {secondRadioCarrierPackage 1}
+
+ carrierFrequency-1-Entry OBJECT-TYPE
+ SYNTAX CarrierFrequency-1-Entry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This attribute is used to assign a set of (possibly one)
+ constant radio frequencies to a radioCarrier object. In
+ a fixed frequency or baseband hopping system, the set
+ will contain only one single frequency. In case of a
+ synthesizer hopping system, the set will contain all
+ frequencies the carrier is allowed to use. This set of
+ radio frequencies must be included in the allowed radio
+ frequency values specified by the cellAllocation attribute
+ of the containing bts object instance."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ INDEX {carrierFrequencyIndex-1}
+ --DEFAULT cookie MIBT_%n
+ ::= {carrierFrequency-1-Table 1}
+
+ CarrierFrequency-1-Entry ::= SEQUENCE {
+ carrierFrequencyIndex-1 INTEGER,
+ carrierFrequency-1 AbsoluteRFChannelNo
+ }
+
+ carrierFrequencyIndex-1 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Index to the Carrier Frequency List."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {carrierFrequency-1-Entry 1}
+
+ carrierFrequency-1 OBJECT-TYPE
+ SYNTAX AbsoluteRFChannelNo
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute contains a radio frequency that is allocated
+ and available to this cell."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {carrierFrequency-1-Entry 2}
+
+ powerClass-1 OBJECT-TYPE
+ SYNTAX PowerClass
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute indicates the power class (max peak power)
+ of the transmitter. For further details refer to
+ Specification GSM 05.05."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {secondRadioCarrierPackage 2 }
+
+ radioCarrierID-1 OBJECT-TYPE
+ SYNTAX GSMGeneralObjectID
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute names a radioCarrier instance."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {secondRadioCarrierPackage 3 }
+
+ txPwrMaxReduction-1 OBJECT-TYPE
+ SYNTAX TxPwrMaxReduction
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute specifies the number of 2 dB steps the
+ TX should be reduced from the maximum transmit power,
+ for tuning the cell coverage. The resulting attenuated
+ transmit power is the maximum nominal power Pn. See
+ Specifications GSM 05.05, GSM 05.08, and 08.58."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {secondRadioCarrierPackage 4}
+
+ carrier-administrativeState-1 OBJECT-TYPE
+ SYNTAX AdministrativeState
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The semantics of the administrativeState attribute type are
+ specified in Recommendation X.731 and the syntax is defined
+ in Recommendation X.721.
+
+ This attribute has a value of locked(0), unlocked(1),
+ shuttingDown(2)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {secondRadioCarrierPackage 5}
+
+ carrier-alarmStatus-1 OBJECT-TYPE
+ SYNTAX AlarmStatus
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The semantics and syntax of the alarmStatus attribute type
+ are specified in Recommendation M.3100.
+
+ This attribute has a value of underRepair(0), critical(1),
+ major(2), minor(3), alarmOutstanding(4)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately"
+ ::= {secondRadioCarrierPackage 6}
+
+ carrier-operationalState-1 OBJECT-TYPE
+ SYNTAX OperationalState
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The semantics of the operationalState attribute type is
+ specified in Recommendation X.731. A specification of the
+ syntax is found in Recommendation X.721.
+
+ This attribute has a value of disabled(0), enabled(1)."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately"
+ ::= {secondRadioCarrierPackage 7}
+
+btsTimerPackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "This package contains a set of timers used on layers
+-- 2 and 3 of the air interface."
+ ::= {gp10GsmMib 7}
+
+ t200 OBJECT IDENTIFIER
+-- SYNTAX TimerStructure
+-- MAX-ACCESS not-accessible
+-- DESCRIPTION
+-- "This attribute contains values for the LapDm timer T200,
+-- to be used on the different control channels. See
+-- Specification GSM 04.06."
+-- REFERENCE
+-- "Owner Module: LAPDM module
+-- Mode-of-operation: set from manager
+-- Effective-time: on next new call"
+ ::= { btsTimerPackage 1 }
+
+ sdcchSAPI0 OBJECT-TYPE
+ SYNTAX L2Timer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "SDCCH, SAPI 0. Value is in 5 ms units."
+ REFERENCE
+ "Owner Module: LAPDM module
+ Mode-of-operation: set from manager
+ Effective-time: on next new call"
+ ::= {t200 1}
+
+ facchTCHF OBJECT-TYPE
+ SYNTAX L2Timer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "associated with a full rate TCH. Value is in 5 ms units."
+ REFERENCE
+ "Owner Module: LAPDM module
+ Mode-of-operation: set from manager
+ Effective-time: on next new call"
+ ::= {t200 2}
+
+ facchTCHH OBJECT-TYPE
+ SYNTAX L2Timer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Associated with a half rate TCH. Value is in 5 ms units."
+ REFERENCE
+ "Owner Module: LAPDM module
+ Mode-of-operation: set from manager
+ Effective-time: on next new call"
+ ::= {t200 3}
+
+ sacchTCHSAPI0 OBJECT-TYPE
+ SYNTAX L2Timer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "SACCH with TCH, SAPI 0. Value is in 5 ms units."
+ REFERENCE
+ "Owner Module: LAPDM module
+ Mode-of-operation: set from manager
+ Effective-time: on next new call"
+ ::= {t200 4}
+
+ sacchSDCCH OBJECT-TYPE
+ SYNTAX L2Timer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "SACCH with SDCCH. Value is in 5 ms units."
+ REFERENCE
+ "Owner Module: LAPDM module
+ Mode-of-operation: set from manager
+ Effective-time: on next new call"
+ ::= {t200 5}
+
+ sdcchSAPI3 OBJECT-TYPE
+ SYNTAX L2Timer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "SDCCH, SAPI 3. Value is in 5 ms units."
+ REFERENCE
+ "Owner Module: LAPDM module
+ Mode-of-operation: set from manager
+ Effective-time: on next new call"
+ ::= {t200 6}
+
+ sdcchTCHSAPI3 OBJECT-TYPE
+ SYNTAX L2Timer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "SDCCH with TCH, SAPI 3. Value is in 5 ms units."
+ REFERENCE
+ "Owner Module: LAPDM module
+ Mode-of-operation: set from manager
+ Effective-time: on next new call"
+ ::= {t200 7}
+
+ t31xx OBJECT IDENTIFIER
+-- SYNTAX TimerStructure
+-- MAX-ACCESS not-accessible
+-- DESCRIPTION
+-- "This attribute contains the values of the set of timers
+-- used on the air interface. See Specification GSM 04.08
+-- for more details."
+-- REFERENCE
+-- "Owner Module: RRM module, except t3113 for MM module
+-- Mode-of-operation: set from manager
+-- Effective-time: on next new call/paging"
+ ::= { btsTimerPackage 2 }
+
+ t3101 OBJECT-TYPE
+ SYNTAX L3Timer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "used with IMMEDIATE ASSIGNMENT. Value is in 10 ms units."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: on next new call/paging"
+ ::= {t31xx 1}
+
+ t3103 OBJECT-TYPE
+ SYNTAX L3Timer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "used with HANDOVER COMMAND. Value is in 10 ms units."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: on next new call/paging"
+ ::= {t31xx 2}
+
+ t3105 OBJECT-TYPE
+ SYNTAX L3Timer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "used with PHYSICAL INFORMATION. Value is in 10 ms units."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: on next new call/paging"
+ ::= {t31xx 3}
+
+ t3107 OBJECT-TYPE
+ SYNTAX L3Timer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "used with ASSIGNMENT COMMAND. Value is in 10 ms units."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: on next new call/paging"
+ ::= {t31xx 4}
+
+ t3109 OBJECT-TYPE
+ SYNTAX L3Timer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "used for lower layer failures. Value is in 10 ms units."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: on next new call/paging"
+ ::= {t31xx 5}
+
+ t3111 OBJECT-TYPE
+ SYNTAX L3Timer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "used for channel activation delay. Value is in 10 ms units."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: on next new call/paging"
+ ::= {t31xx 6}
+
+ t3113 OBJECT-TYPE
+ SYNTAX L3Timer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "used with PAGING messages. Value is in 10 ms units."
+ REFERENCE
+ "Owner Module: MM module
+ Mode-of-operation: set from manager
+ Effective-time: on next new call/paging"
+ ::= {t31xx 7}
+
+-- Adjacent Cell Handover Package
+-- Adjacent Cell Reselection Package
+
+adjacentCellPackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "The MOC adjacentCellHandOver, by means of this package,
+-- contains handover related, adjacent cell specific, parameters
+-- that are independent of any particular handover algorithm.
+--
+-- The MOC adjacentCellHandOver acts as a base class only.
+-- Instances of it are never created. A handover algorithm
+-- specific subclass, such as adjacentCellHandOverGSM0508 or a
+-- manufacturer specific subclass of adjacentCellHandOver must
+-- be instantiated for managing the parameters specific to that
+-- particular handover algorithm. The maximum number of adjacent
+-- cells that may be used for handover is 32."
+ ::= {gp10GsmMib 8}
+
+ adjCell-handoverTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF AdjCell-handoverEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This entry is required to define a table of values."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {adjacentCellPackage 1}
+
+ adjCell-handoverEntry OBJECT-TYPE
+ SYNTAX AdjCell-handoverEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This attribute defines the set of radio frequencies
+ allocated and available to a cell. The first element
+ sets the BCCH frequency."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ INDEX {adjCell-handoverIndex}
+ --DEFAULT cookie MIBT_%n
+ ::= {adjCell-handoverTable 1}
+
+ AdjCell-handoverEntry ::= SEQUENCE {
+ adjCell-handoverIndex INTEGER,
+ adjCell-handoverCellID GSMGeneralObjectID,
+ adjCell-mcc MobileCountryCode,
+ adjCell-mnc MobileNetworkCode,
+ adjCell-lac LocationAreaCode,
+ adjCell-ci CellIdentity,
+ adjCell-bCCHFrequency AbsoluteRFChannelNo,
+ adjCell-ncc NetworkColourCode,
+ adjCell-cid CellIdentity,
+ adjCell-synchronized Boolean,
+ adjCell-hoPriorityLevel HoPriorityLevel,
+ adjCell-hoMargin HoMargin,
+ adjCell-msTxPwrMaxCell TxPower,
+ adjCell-rxLevMinCell RxLev,
+ adjCell-isExternal Boolean
+ }
+
+ adjCell-handoverIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This attribute is used for naming adjacent cell objects,
+ i.e. instances of the classes adjacentCellHandOver and
+ adjacentCellReselection, as well as their subclasses."
+ REFERENCE
+ "Owner Module: HO-Signaling module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {adjCell-handoverEntry 1}
+
+ adjCell-handoverCellID OBJECT-TYPE
+ SYNTAX GSMGeneralObjectID
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute is used for naming adjacent cell objects,
+ i.e. instances of the classes adjacentCellHandOver and
+ adjacentCellReselection, as well as their subclasses."
+ REFERENCE
+ "Owner Module: HO-Signaling module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {adjCell-handoverEntry 2}
+
+ adjCell-mcc OBJECT-TYPE
+ SYNTAX MobileCountryCode
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute contains the Cell Identification (CI) and
+ the Location Area of the cell. A Location Area is unique
+ within a GSM PLMN; a Cell Identification is unique within
+ a location area. For further details see Spec GSM 03.03.
+
+ MobileCountryCode
+
+ Note: 3 digit in decimal which is saved in INTEGER variable in BCD format
+ B[12..31]: 0(don't care)
+ B[8..11]: 1st digit(most significant digit), valid range 0 ~ 9
+ B[4..7]: 2nd digit, valid range 0 ~ 9
+ B[0..3]: 3rd digit(least significant digit), valid range 0 ~ 9
+ "
+ REFERENCE
+ "Owner Module: HO-Signaling module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {adjCell-handoverEntry 3}
+
+ adjCell-mnc OBJECT-TYPE
+ SYNTAX MobileNetworkCode
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Mobile Network Code
+
+ Note: 2 or 3 digit in decimal which is saved in INTEGER variable in BCD format except last digit which may have 0xf
+ B[12..31]: 0(don't care)
+ B[8..11]: 1st digit(most significant digit), valid range 0 ~ 9
+ B[4..7]: 2nd digit, valid range 0 ~ 9
+ B[0..3]: 3rd digit(least significant digit), valid range 0 ~ 9 or 0xf
+ if last digit has 0xf, then MNC is 2 digit, else if it has 0 ~ 9 then MNC is 3 digit.
+ "
+ REFERENCE
+ "Owner Module: HO-Signaling module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {adjCell-handoverEntry 4}
+
+ adjCell-lac OBJECT-TYPE
+ SYNTAX LocationAreaCode
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Location Area Code"
+ REFERENCE
+ "Owner Module: HO-Signaling module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {adjCell-handoverEntry 5}
+
+ adjCell-ci OBJECT-TYPE
+ SYNTAX CellIdentity
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Cell Identity Code"
+ REFERENCE
+ "Owner Module: HO-Signaling module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {adjCell-handoverEntry 6}
+
+ adjCell-bCCHFrequency OBJECT-TYPE
+ SYNTAX AbsoluteRFChannelNo
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute contains the absolute radio frequency channel
+ number of the BCCH channel of adjacent cells. This information
+ is sent to the mobile station."
+ REFERENCE
+ "Owner Module: HO-Signaling module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {adjCell-handoverEntry 7}
+
+ adjCell-ncc OBJECT-TYPE
+ SYNTAX NetworkColourCode
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute contains the Base Station Identity Code (BSIC),
+ which is transmitted on the SCH and used for identifying a BTS.
+ The BSIC consists of the Network Colour Code (NCC) and the Base
+ Station Colour Code (BCC). Refer to Specification GSM 04.08."
+ REFERENCE
+ "Owner Module: HO-Signaling module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {adjCell-handoverEntry 8}
+
+ adjCell-cid OBJECT-TYPE
+ SYNTAX CellIdentity
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Mobile Network Code"
+ REFERENCE
+ "Owner Module: HO-Signaling module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {adjCell-handoverEntry 9}
+
+ adjCell-synchronized OBJECT-TYPE
+ SYNTAX Boolean
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute of the object class adjacentCellHandOver
+ indicates whether the adjacent cell is synchronized with the
+ origin cell. Refer to Specification GSM 05.08 (N_CELL_LIST).
+
+ *********************************************************************
+ WARNING: Currently(Ver 1.5, 2.0 and 3.0) the only valid value of
+ adjCell-synchronized is 0(false).
+ *********************************************************************"
+ REFERENCE
+ "Owner Module: HO-Signaling module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {adjCell-handoverEntry 10}
+
+ adjCell-hoPriorityLevel OBJECT-TYPE
+ SYNTAX HoPriorityLevel
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute defines the handover priority level for an
+ adjacent cell used for target cell evaluation in the handover
+ control process. Eight distinct priority levels exist."
+ REFERENCE
+ "Owner Module: HO-Signaling module
+ Mode-of-operation: set from manager
+ Effective-time: immediate"
+ ::= {adjCell-handoverEntry 11}
+
+ adjCell-hoMargin OBJECT-TYPE
+ SYNTAX HoMargin
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The value of this attribute is used as a threshold to prevent
+ repetative hand-over between adjacent cells, in case the
+ handover is caused by received signal level or the power
+ budget process. Refer to Annex A of Specification GSM 05.08
+ (HO_MARGIN (n))"
+ REFERENCE
+ "Owner Module: HO-Signaling module
+ Mode-of-operation: set from manager
+ Effective-time: immediate"
+ ::= {adjCell-handoverEntry 12}
+
+ adjCell-msTxPwrMaxCell OBJECT-TYPE
+ SYNTAX TxPower
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute specifies whether call priority is ASSIGNMENT
+ REQUEST message (or HANDOVER REQUEST message in ho) from MSC
+ is taken into account in queue handling"
+ REFERENCE
+ "Owner Module: HO-Signaling module
+ Mode-of-operation: set from manager
+ Effective-time: immediate"
+ ::= {adjCell-handoverEntry 13}
+
+ adjCell-rxLevMinCell OBJECT-TYPE
+ SYNTAX RxLev
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute holds the minimum received signal strength in
+ a cell, for a MS to be handed over to that cell. See Annex A
+ of Specification GSM 05.08 (RXLEV_MIN (n)). This is an
+ attribute of the object class adjacentCellHandOverGSM0508;
+ each adjacent cell may thus have a specific value."
+ REFERENCE
+ "Owner Module: HO-Signaling module
+ Mode-of-operation: set from manager
+ Effective-time: immediate"
+ ::= {adjCell-handoverEntry 14}
+
+
+ adjCell-isExternal OBJECT-TYPE
+ SYNTAX Boolean
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute specifies whether this row corresponds to an
+ external cell (outside this MNET)."
+ ::= {adjCell-handoverEntry 15}
+
+
+-- Adjacent Cell Reselection Package
+--
+-- To save on the Callback stubs in the SNMP manager, the Adjacent Cell
+-- Reselection Package has been folded togeather with the Adjacent Cell
+-- Handover Package.
+--
+-- adjacentCellReselectionPackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "Instances of adjacentCellReselection may be created for
+-- representing an adjacent cell a MS may use for reselection,
+-- only. To represent an adjacent cell to which handovers are
+-- allowed, another MOC must be used (see MOCs adjacentCellHandOver,
+-- adjacentCellHandOverGSM0508 and adjacentCellHandOverGSM0508AndReselection).
+-- The maximum number of adjacent cells that may be used for
+-- reselection is 32. This package contains the attributes
+-- necessary to identify the cell."
+
+ adjCell-reselectionTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF AdjCell-ReselectionEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This entry is required to define a table of values."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {adjacentCellPackage 2}
+
+ adjCell-reselectionEntry OBJECT-TYPE
+ SYNTAX AdjCell-ReselectionEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This attribute defines the set of radio frequencies
+ allocated and available to a cell. The first element
+ sets the BCCH frequency."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ INDEX {adjCell-reselectionIndex}
+ --DEFAULT cookie MIBT_%n
+ ::= {adjCell-reselectionTable 1}
+
+ AdjCell-ReselectionEntry ::= SEQUENCE {
+ adjCell-reselectionIndex INTEGER,
+ adjCell-reselectionCellID GSMGeneralObjectID,
+ adjCell-reselectionBCCHFrequency AbsoluteRFChannelNo
+ }
+
+ adjCell-reselectionIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..31)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This attribute is used as the index to this table. It
+ is a sequential number between 0 and 31."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {adjCell-reselectionEntry 1}
+
+ adjCell-reselectionCellID OBJECT-TYPE
+ SYNTAX GSMGeneralObjectID
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute is used for naming adjacent cell objects,
+ i.e. instances of the classes adjCell-HandOver and
+ adjCell-reselection, as well as their subclasses."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {adjCell-reselectionEntry 2}
+
+
+ adjCell-reselectionBCCHFrequency OBJECT-TYPE
+ SYNTAX AbsoluteRFChannelNo
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute contains the absolute radio frequency channel
+ number of the BCCH channel of adjacent cells. This information
+ is sent to the mobile station."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {adjCell-reselectionEntry 3}
+
+frequencyHoppingPackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "The frequencyHopping object class represents a set
+-- of radio frequency channels used in a specific frequency
+-- hopping sequence. An instance of frequencyHopping
+-- may be (and often is) shared by one or more channels.
+-- This package provides identification and the basic
+-- attributes for configuring the hopping system."
+ ::= {gp10GsmMib 9}
+
+ frequencyHoppingSystemID OBJECT-TYPE
+ SYNTAX GSMGeneralObjectID
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute names a frequencyHopping instance."
+ REFERENCE
+ "Owner Module: FH module
+ Mode-of-operation: set from manager
+ Effective-time: on restart"
+ ::= {frequencyHoppingPackage 1}
+
+ hoppingSequenceNumber OBJECT-TYPE
+ SYNTAX HoppingSequenceNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The Hopping Sequence Number (HSN) determines the order
+ in which the allocated frequencies are used. Refer to
+ Specification GSM 05.02."
+ REFERENCE
+ "Owner Module: FH module
+ Mode-of-operation: set from manager
+ Effective-time: on restart"
+ ::= {frequencyHoppingPackage 2}
+
+ mobileAllocationTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF MobileAllocationEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "The attribute mobileAllocation specifies the set of radio
+ frequencies (ARFCNs) allocated to all channels that belong
+ to the frequencyHopping instance that contains the
+ attribute. This set of radio frequencies must be included
+ in the allowed radio frequency values specified by the
+ cellAllocation attribute of the containing bts object
+ instance."
+ REFERENCE
+ "Owner Module: FH module
+ Mode-of-operation: set from manager
+ Effective-time: on restart"
+ ::= {frequencyHoppingPackage 3}
+
+ mobileAllocationEntry OBJECT-TYPE
+ SYNTAX MobileAllocationEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This entry is required to define a table of values."
+ REFERENCE
+ "Owner Module: FH module
+ Mode-of-operation: set from manager
+ Effective-time: on restart"
+ INDEX {mobileAllocationIndex}
+ --DEFAULT cookie MIBT_%n
+ ::= {mobileAllocationTable 1}
+
+ MobileAllocationEntry ::= SEQUENCE {
+ mobileAllocationIndex INTEGER,
+ mobileAllocation AbsoluteRFChannelNo
+ }
+
+ mobileAllocationIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Index to the Mobile Allocation table."
+ REFERENCE
+ "Owner Module: FH module
+ Mode-of-operation: set from manager
+ Effective-time: on restart"
+ ::= {mobileAllocationEntry 1}
+
+ mobileAllocation OBJECT-TYPE
+ SYNTAX AbsoluteRFChannelNo
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The attribute mobileAllocation specifies the set of radio
+ frequencies (ARFCNs) allocated to all channels that belong
+ to the frequencyHopping instance that contains the
+ attribute. This set of radio frequencies must be included
+ in the allowed radio frequency values specified by the
+ cellAllocation attribute of the containing bts object
+ instance."
+ REFERENCE
+ "Owner Module: FH module
+ Mode-of-operation: set from manager
+ Effective-time: on restart"
+ ::= {mobileAllocationEntry 2}
+
+handoverControlPackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "The object class handoverControlGSM0508, by means of this
+-- package, contains the parameters of the default handover
+-- algorithm defined in Annex A of Specification GSM 05.08.
+-- This class may be used, if the BSS supports the default
+-- handover algorithm."
+ ::= {gp10GsmMib 10}
+
+ handoverControlID OBJECT-TYPE
+ SYNTAX GSMGeneralObjectID
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute names an instance of the object class
+ handoverControl."
+ REFERENCE
+ "Owner Module: HO-signaling module
+ Mode-of-operation: set from manager
+ Effective-time: next restart"
+ ::= {handoverControlPackage 1}
+
+ enableOptHandoverProcessing OBJECT-TYPE
+ SYNTAX EnableHoType
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The attribute specifies the allowed optional handover
+ processing as specified in GSM 05.08 Annex A. The
+ following handover processing options exist:
+
+ - power budget
+ - MS distance."
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {handoverControlPackage 2}
+
+ hoAveragingAdjCellParam OBJECT IDENTIFIER
+-- SYNTAX SubStructure
+-- MAX-ACCESS not-accessible
+-- DESCRIPTION
+-- "This attribute contains averaging parameters used for
+-- averaging signal level measurements from adjacent cells
+-- (GSM 05.08 - RXLEV_NCELL(n)).
+--
+-- - The number of SACCH multiframes over which results are
+-- averaged, i.e. the window size (Hreqave in GSM 05.08).
+-- - The number of results sent in the 'handover required'
+-- message (Hreqt in GSM 05.08).
+-- - Weighting"
+-- REFERENCE
+-- "Owner Module: HO-algorithm module in L1
+-- Mode-of-operation: set from manager
+-- Effective-time: immediately"
+ ::= {handoverControlPackage 3}
+
+ hoAveragingAdjCellParamHreqave OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (Hreqave)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoAveragingAdjCellParam 1}
+
+ hoAveragingAdjCellParamHreqt OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (Hreqt)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoAveragingAdjCellParam 2}
+
+ hoAveragingAdjCellParamWeighting OBJECT-TYPE
+ SYNTAX Weighting
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Weighting value (0..3)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoAveragingAdjCellParam 3}
+
+ hoAveragingDistParam OBJECT IDENTIFIER
+-- SYNTAX SubStructure
+-- MAX-ACCESS not-accessible
+-- DESCRIPTION
+-- "The hoAveragingDistParam attribute contains averaging
+-- parameters used in the handover process, in case the
+-- handover cause is distance between the Mobile Station
+-- and the BTS. See Specification GSM 05.08.
+--
+-- - The number of SACCH multiframes over which results
+-- are averaged, i.e. the window size (Hreqave).
+-- - The number of results sent in the 'handover required'
+-- message (Hreqt). "
+-- REFERENCE
+-- "Owner Module: HO-algorithm module in L1
+-- Mode-of-operation: set from manager
+-- Effective-time: immediately"
+ ::= {handoverControlPackage 4}
+
+ hoAveragingDistParamHreqave OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (Hreqave)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoAveragingDistParam 1}
+
+ hoAveragingDistParamHreqt OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (Hreqt)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoAveragingDistParam 2}
+
+ hoAveragingLevParam OBJECT IDENTIFIER
+-- SYNTAX SubStructure
+-- MAX-ACCESS not-accessible
+-- DESCRIPTION
+-- "The hoAveragingLevParam attribute contains averaging
+-- parameters for the signal strength measurements.
+-- - The number of SACCH multiframes over which
+-- results are averaged, i.e. the window size
+-- (Hreqave in GSM 05.08).
+-- - The number of results sent in the 'handover
+-- required' message (Hreqt in GSM 05.08).
+-- - Weighting"
+-- REFERENCE
+-- "Owner Module: HO-algorithm module in L1
+-- Mode-of-operation: set from manager
+-- Effective-time: immediately"
+ ::= {handoverControlPackage 5}
+
+ hoAveragingLevParamHreqave OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (Hreqave)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoAveragingLevParam 1}
+
+ hoAveragingLevParamHreqt OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (Hreqt)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoAveragingLevParam 2}
+
+ hoAveragingLevParamWeighting OBJECT-TYPE
+ SYNTAX Weighting
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Weighting value (0..3)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoAveragingLevParam 3}
+
+ hoAveragingQualParam OBJECT IDENTIFIER
+-- SYNTAX SubStructure
+-- MAX-ACCESS not-accessible
+-- DESCRIPTION
+-- "The hoAveragingQualParam attribute contains averaging
+-- parameters for the signal quality measurements.
+-- - The number of SACCH multiframes over which
+-- results are averaged, i.e. the window size
+-- (Hreqave in GSM 05.08).
+-- - The number of results sent in the 'handover
+-- required' message (Hreqt in GSM 05.08).
+-- - Weighting"
+-- REFERENCE
+-- "Owner Module: HO-algorithm module in L1
+-- Mode-of-operation: set from manager
+-- Effective-time: immediately"
+ ::= {handoverControlPackage 6}
+
+ hoAveragingQualParamHreqave OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (Hreqave)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoAveragingQualParam 1}
+
+ hoAveragingQualParamHreqt OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (Hreqt)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoAveragingQualParam 2}
+
+ hoAveragingQualParamWeighting OBJECT-TYPE
+ SYNTAX Weighting
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Weighting value (0..3)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoAveragingQualParam 3}
+
+ hoMarginDef OBJECT-TYPE
+ SYNTAX HoMargin
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The value of this attribute is used as a threshold to
+ prevent repetitive hand-over between adjacent cells,
+ in case the handover is caused by received signal level
+ or the power budget process. Refer to Annex A of
+ Specification GSM 05.08 (HO_MARGIN (n))."
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ DEFVAL
+ {6}
+ ::= {handoverControlPackage 7}
+
+ hoThresholdDistParam OBJECT IDENTIFIER
+-- SYNTAX SubStructure
+-- MAX-ACCESS not-accessible
+-- DESCRIPTION
+-- "The hoThresholdDistParam attribute contains parameters
+-- used in the handover process, in case the handover cause
+-- is distance between the Mobile Station and the BTS. See
+-- Specification GSM 05.08.
+--
+-- - The number of distance measurements that have to
+-- be taken into account, when making a handover
+-- decision, reason distance overflow (N8).
+-- - The number of distances (out of total measurements)
+-- that have to be greater than the maximum distance,
+-- before making a handover decision (P8).
+-- - The maximum timing advance (or distance) between
+-- the BTS and the MS which can be expressed in units
+-- of timing advance or km.
+--
+-- Refer to Specification GSM 05.08 (MS_RANGE_MAX)."
+-- REFERENCE
+-- "Owner Module: HO-algorithm module in L1
+-- Mode-of-operation: set from manager
+-- Effective-time: immediately"
+ ::= {handoverControlPackage 8}
+
+ hoThresholdDistParamTimeadv OBJECT-TYPE
+ SYNTAX MSRangeMax
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Timing Advance. In units of km compatible with Phase 1."
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoThresholdDistParam 1}
+
+ hoThresholdDistParamP8 OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (P8)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoThresholdDistParam 2}
+
+ hoThresholdDistParamN8 OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (N8)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoThresholdDistParam 3}
+
+ hoThresholdInterfaceParam OBJECT IDENTIFIER
+-- SYNTAX SubStructure
+-- MAX-ACCESS not-accessible
+-- DESCRIPTION
+-- "The hoThresholdInterferenceParam attribute contains
+-- parameters for comparing the averaged uplink and downlink
+-- interference measurements. See Specification GSM 05.08.
+--
+-- - Threshold level for handover, reason interference
+-- (RXLEV_UL_IH).
+-- - Threshold level for handover, reason interference
+-- (RXLEV_DL_IH).
+-- - The number of averages that have to be taken into
+-- account, when making a handover decision (N7).
+-- - The number of averages (out of total averages) that
+-- have to be higher/lower than the threshold, before
+-- making a handover decision (P7)."
+-- REFERENCE
+-- "Owner Module: HO-algorithm module in L1
+-- Mode-of-operation: set from manager
+-- Effective-time: immediately"
+ ::= {handoverControlPackage 9}
+
+ hoThresholdInterfaceParamRxLevelUL OBJECT-TYPE
+ SYNTAX RxLev
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (rxLevelUL)."
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoThresholdInterfaceParam 1}
+
+ hoThresholdInterfaceParamRxLevelDL OBJECT-TYPE
+ SYNTAX RxLev
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (rxLevelDL)."
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoThresholdInterfaceParam 2}
+
+ hoThresholdInterfaceParamPx OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (Px)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoThresholdInterfaceParam 3}
+
+ hoThresholdInterfaceParamNx OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (Nx)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoThresholdInterfaceParam 4}
+
+ hoThresholdLevParam OBJECT IDENTIFIER
+-- SYNTAX SubStructure
+-- MAX-ACCESS not-accessible
+-- DESCRIPTION
+-- "The hoThresholdLevParam attribute contains parameters
+-- for comparing averaged uplink and downlink signal strength
+-- measurements. See Specification GSM 05.08.
+--
+-- - Threshold level for handover, reason uplink signal
+-- strength (L_RXLEV_UL_H).
+-- - Threshold level for handover, reason downlink signal
+-- strength (L_RXLEV_DL_H).
+-- - The number of averages that have to be taken into
+-- account, when making a handover decision (N5).
+-- - The number of averages (out of total averages) that
+-- have to be upper/lower than the threshold, before
+-- making a handover decision (P5)."
+-- REFERENCE
+-- "Owner Module: HO-algorithm module in L1
+-- Mode-of-operation: set from manager
+-- Effective-time: immediately"
+ ::= {handoverControlPackage 10}
+
+ hoThresholdLevParamRxLevelUL OBJECT-TYPE
+ SYNTAX RxLev
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (rxLevelUL)."
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoThresholdLevParam 1}
+
+ hoThresholdLevParamRxLevelDL OBJECT-TYPE
+ SYNTAX RxLev
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (rxLevelDL)."
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoThresholdLevParam 2}
+
+ hoThresholdLevParamPx OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (Px)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ DEFVAL
+ {6}
+ ::= {hoThresholdLevParam 3}
+
+ hoThresholdLevParamNx OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (Nx)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ DEFVAL
+ {8}
+ ::= {hoThresholdLevParam 4}
+
+ hoThresholdQualParam OBJECT IDENTIFIER
+-- SYNTAX SubStructure
+-- MAX-ACCESS not-accessible
+-- DESCRIPTION
+-- "The hoThresholdQualParam attribute contains parameters for
+-- comparing averaged uplink and downlink signal quality
+-- measurements. See Specification GSM 05.08.
+--
+-- - Threshold level for handover, reason uplink signal
+-- quality (L_RXQUAL_UL_H).
+-- - Threshold level for handover, reason downlink signal
+-- quality (L_RXQUAL_DL_H).
+-- - The number of averages that have to be taken into
+-- account, when making a handover decision (N6).
+-- - The number of averages (out of total averages) that
+-- have to be upper/lower than the threshold, before
+-- making a handover decision (P6)."
+ ::= {handoverControlPackage 11}
+
+ hoThresholdQualParamRxQualUL OBJECT-TYPE
+ SYNTAX RxQual
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (rxLevelUL)."
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoThresholdQualParam 1}
+
+ hoThresholdQualParamRxQualDL OBJECT-TYPE
+ SYNTAX RxQual
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (rxLevelDL)."
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {hoThresholdQualParam 2}
+
+ hoThresholdQualParamPx OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (Px)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ DEFVAL
+ {3}
+ ::= {hoThresholdQualParam 3}
+
+ hoThresholdQualParamNx OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (Nx)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ DEFVAL
+ {3}
+ ::= {hoThresholdQualParam 4}
+
+ interferenceAveragingParam OBJECT IDENTIFIER
+-- SYNTAX SubStructure
+-- MAX-ACCESS not-accessible
+-- DESCRIPTION
+-- "The interferenceAveragingParam attribute contains
+-- parameters used in averaging interference levels in
+-- the unallocated time slots. See Specification GSM 05.08
+-- for details.
+--
+-- - The number of SACCH multiframes over which the
+-- values are averaged (INTAVE).
+-- - Boundary limits of five interference bands for
+-- the unallocated time slots. Refer to Specification
+-- GSM 05.08 (O-X5). The BSS shall map the averaged
+-- interference level measurements into these five
+-- bands. The range of each boundary is -110...-47 dBm."
+-- REFERENCE
+-- "Owner Module: HO-algorithm module in L1
+-- Mode-of-operation: set from manager
+-- Effective-time: immediately"
+ ::= {handoverControlPackage 12}
+
+ interferenceAveragingParamAveragingPeriod OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (INTAVE). Interference averaging period
+ in number of SACCH nultiframe (INTAVE)."
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {interferenceAveragingParam 1}
+
+ interferenceAveragingParamThresholdBoundary0 OBJECT-TYPE
+ SYNTAX RxLev
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Interference Threshold Boundries."
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {interferenceAveragingParam 2}
+
+ interferenceAveragingParamThresholdBoundary1 OBJECT-TYPE
+ SYNTAX RxLev
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Refer to GSM 05.08 (rxLevelDL)."
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {interferenceAveragingParam 3}
+
+ interferenceAveragingParamThresholdBoundary2 OBJECT-TYPE
+ SYNTAX RxLev
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Interference Threshold Boundries."
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {interferenceAveragingParam 4}
+
+ interferenceAveragingParamThresholdBoundary3 OBJECT-TYPE
+ SYNTAX RxLev
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Interference Threshold Boundries."
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {interferenceAveragingParam 5}
+
+ interferenceAveragingParamThresholdBoundary4 OBJECT-TYPE
+ SYNTAX RxLev
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Interference Threshold Boundries."
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {interferenceAveragingParam 6}
+
+ interferenceAveragingParamThresholdBoundary5 OBJECT-TYPE
+ SYNTAX RxLev
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Interference Threshold Boundries."
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {interferenceAveragingParam 7}
+
+ msTxPwrMaxCellDef OBJECT-TYPE
+ SYNTAX TxPower
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The msTxPwrMaxCell attribute is used to indicate the
+ maximum power level a MS may use in an adjacent cell.
+ The msTxPwrMaxCellDef attribute is used to evaluate
+ handover to undefined adjacent cells. See Table 1 of
+ Annex A of Specification GSM 05.08 (MS_TXPWR_MAX (n))."
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {handoverControlPackage 13}
+
+ rxLevMinCellDef OBJECT-TYPE
+ SYNTAX RxLev
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The rxLevMinCellDef attribute holds the default value of
+ rxLevMinCell. It is used to evaluate handover to undefined
+ cells. See Annex A of Specification GSM 05.08 (RXLEV_MIN_DEF)"
+ REFERENCE
+ "Owner Module: HO-algorithm module in L1
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {handoverControlPackage 14}
+
+powerControlPackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "Manufacturers shall use the class powerControl as a
+-- base class for specifying actual object classes for
+-- management of parameters specific to their power
+-- control algorithm. The class powerControl cannot be
+-- instantiated. There are, at most, two instances of
+-- these actual instantiated subclasses per BTS, one to
+-- manage parameters used by the BSC and one to manage
+-- parameters used by the BTS. This package provides
+-- the attributes common to all subclasses. If BS power
+-- control is supported, it is assumed that the processing
+-- for MS and BS power control measurements are performed
+-- in the same place (BSC or BTS) and that the same set
+-- of parameters are used for both MS and BS power control
+-- algorithms."
+ ::= {gp10GsmMib 11}
+
+ pcAveragingLev OBJECT IDENTIFIER
+-- SYNTAX SubStructure
+-- MAX-ACCESS not-accessible
+-- DESCRIPTION
+-- "The pcAveragingLev attribute contains averaging parameters
+-- for the signal strength measurements. The values are used
+-- in the power control process.
+--
+-- - The number of SACCH multiframes over which results are
+-- averaged, i.e. the window size (Hreqave in GSM 05.08).
+-- - The number of results sent in the 'handover required'
+-- message (Hreqt in GSM 05.08).
+-- - Weighting"
+-- REFERENCE
+-- "Owner Module: L1 Power Control module
+-- Mode-of-operation: set from manager
+-- Effective-time: immediately"
+ ::= {powerControlPackage 1}
+
+ pcAveragingLevHreqave OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The number of SACCH multiframes over which results are
+ averaged, i.e. the window size (Hreqave in GSM 05.08)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ DEFVAL
+ {2}
+ ::= {pcAveragingLev 1}
+
+ pcAveragingLevHreqt OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The number of results sent in the 'handover required'
+ message (Hreqt in GSM 05.08)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcAveragingLev 2}
+
+ pcAveragingLevWeighting OBJECT-TYPE
+ SYNTAX Weighting
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Weighting value (0..3)"
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcAveragingLev 3}
+
+ pcAveragingQual OBJECT IDENTIFIER
+-- SYNTAX SubStructure
+-- MAX-ACCESS not-accessible
+-- DESCRIPTION
+-- "The pcAveragingQual attribute contains averaging parameters
+-- for the signal quality measurements. The values are used in
+-- the power control process.
+--
+-- - The number of SACCH multiframes over which results are
+-- averaged, i.e. the window size (Hreqave in GSM 05.08).
+-- - The number of results sent in the 'handover required'
+-- message (Hreqt in GSM 05.08).
+-- - Weighting"
+-- REFERENCE
+-- "Owner Module: L1 Power Control module
+-- Mode-of-operation: set from manager
+-- Effective-time: immediately"
+ ::= {powerControlPackage 2}
+
+ pcAveragingQualHreqave OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The number of SACCH multiframes over which results are
+ averaged, i.e. the window size (Hreqave in GSM 05.08)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ DEFVAL
+ {2}
+ ::= {pcAveragingQual 1}
+
+ pcAveragingQualHreqt OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The number of results sent in the 'handover required'
+ message (Hreqt in GSM 05.08)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcAveragingQual 2}
+
+ pcAveragingQualWeighting OBJECT-TYPE
+ SYNTAX Weighting
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Weighting value (0..3)"
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcAveragingQual 3}
+
+ pcLowerThresholdLevParam OBJECT IDENTIFIER
+-- SYNTAX SubStructure
+-- MAX-ACCESS not-accessible
+-- DESCRIPTION
+-- "The pcLowerThresholdLevParam attribute contains the lower
+-- thresholds for the uplink and downlink signal strength.
+-- The values are used in the power control process. See
+-- Specification GSM 05.08.
+--
+-- - Threshold level for uplink power increase
+-- (L_RXLEV_UL_P).
+-- - Threshold level for downlink power increase
+-- (L_RXLEV_DL_P).
+-- - The total number of averages that have to be taken
+-- into account before power increase decision (N1).
+-- - The number of averages (out of total averages) that
+-- have to be lower than the threshold, before making a
+-- power increase decision (P1)."
+-- REFERENCE
+-- "Owner Module: L1 Power Control module
+-- Mode-of-operation: set from manager
+-- Effective-time: immediately"
+ ::= {powerControlPackage 3}
+
+ pcLowerThresholdLevParamRxLevelUL OBJECT-TYPE
+ SYNTAX RxLev
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Threshold level for uplink power increase (L_RXLEV_UL_P)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcLowerThresholdLevParam 1}
+
+ pcLowerThresholdLevParamRxLevelDL OBJECT-TYPE
+ SYNTAX RxLev
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Threshold level for downlink power increase (L_RXLEV_DL_P)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcLowerThresholdLevParam 2}
+
+ pcLowerThresholdLevParamPx OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The number of averages (out of total averages) that
+ have to be lower than the threshold, before making a
+ power increase decision (P1)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcLowerThresholdLevParam 3}
+
+ pcLowerThresholdLevParamNx OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The total number of averages that have to be taken
+ into account before power increase decision (N1)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcLowerThresholdLevParam 4}
+
+ pcLowerThresholdQualParam OBJECT IDENTIFIER
+-- SYNTAX SubStructure
+-- MAX-ACCESS not-accessible
+-- DESCRIPTION
+-- "The pcLowerThresholdQualParam attribute contains the
+-- lower thresholds for the uplink and downlink signal
+-- quality. The values are used in the power control
+-- process. See Specification GSM 05.08.
+--
+-- - Threshold level for uplink power increase
+-- (L_RXQUAL_UL_P).
+-- - Threshold level for downlink power increase
+-- (L_RXQUAL_DL_P).
+-- - The total number of averages that have to be taken
+-- into account before power increase decision (N3).
+-- - The number of averages (out of total averages) that
+-- have to be lower than the threshold, before making a
+-- power increase decision (P3)."
+-- REFERENCE
+-- "Owner Module: L1 Power Control module
+-- Mode-of-operation: set from manager
+-- Effective-time: immediately"
+ ::= {powerControlPackage 4}
+
+ pcLowerThresholdQualParamRxQualUL OBJECT-TYPE
+ SYNTAX RxQual
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Threshold level for uplink power increase (L_RXQUAL_UL_P)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcLowerThresholdQualParam 1}
+
+ pcLowerThresholdQualParamRxQualDL OBJECT-TYPE
+ SYNTAX RxQual
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Threshold level for downlink power increase (L_RXQUAL_DL_P)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcLowerThresholdQualParam 2}
+
+ pcLowerThresholdQualParamPx OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The number of averages (out of total averages) that
+ have to be lower than the threshold, before making a
+ power increase decision (P3)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcLowerThresholdQualParam 3}
+
+ pcLowerThresholdQualParamNx OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The total number of averages that have to be taken
+ into account before power increase decision (N3)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcLowerThresholdQualParam 4}
+
+ pcUpperThresholdLevParam OBJECT IDENTIFIER
+-- SYNTAX SubStructure
+-- MAX-ACCESS not-accessible
+-- DESCRIPTION
+-- "The pcUpperThresholdLevParam attribute contains the upper
+-- thresholds for the uplink and downlink signal strength.
+-- The values are used in the power control process. See
+-- Specification GSM 05.08.
+--
+-- - Threshold level for uplink power reduction
+-- (U_RXLEV_UL_P).
+-- - Threshold level for downlink power reduction
+-- (U_RXLEV_DL_P).
+-- - The total number of averages that have to be taken
+-- into account before power reduction decision (N2).
+-- - The number of averages (out of total averages) that
+-- have to be lower than the threshold, before making
+-- a power reduction decision (P2)."
+-- REFERENCE
+-- "Owner Module: L1 Power Control module
+-- Mode-of-operation: set from manager
+-- Effective-time: immediately"
+ ::= {powerControlPackage 5}
+
+ pcUpperThresholdLevParamRxLevelUL OBJECT-TYPE
+ SYNTAX RxLev
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Threshold level for uplink power reduction (U_RXLEV_UL_P)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcUpperThresholdLevParam 1}
+
+ pcUpperThresholdLevParamRxLevelDL OBJECT-TYPE
+ SYNTAX RxLev
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Threshold level for downlink power reduction (U_RXLEV_DL_P)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcUpperThresholdLevParam 2}
+
+ pcUpperThresholdLevParamPx OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The number of averages (out of total averages) that
+ have to be lower than the threshold, before making a
+ power reduction decision (P2)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcUpperThresholdLevParam 3}
+
+ pcUpperThresholdLevParamNx OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The total number of averages that have to be taken
+ into account before power reduction decision (N2)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcUpperThresholdLevParam 4}
+
+
+ pcUpperThresholdQualParam OBJECT IDENTIFIER
+-- SYNTAX SubStructure
+-- MAX-ACCESS not-accessible
+-- DESCRIPTION
+-- "The pcUpperThresholdQualParam attribute contains the
+-- upper thresholds for the uplink and downlink signal
+-- quality. The values are used in the power control
+-- process. See Specification GSM 05.08.
+--
+-- - Threshold level for uplink power reduction
+-- (U_RXQUAL_UL_P).
+-- - Threshold level for downlink power reduction
+-- (U_RXQUAL_DL_P).
+-- - The total number of averages that have to be taken
+-- into account before power reduction decision (N4).
+-- - The number of averages (out of total averages) that
+-- have to be lower than the threshold, before making
+-- a power reduction decision (P4)."
+-- REFERENCE
+-- "Owner Module: L1 Power Control module
+-- Mode-of-operation: set from manager
+-- Effective-time: immediately"
+ ::= {powerControlPackage 6}
+
+ pcUpperThresholdQualParamRxQualUL OBJECT-TYPE
+ SYNTAX RxQual
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Threshold level for uplink power reduction (U_RXQUAL_UL_P)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcUpperThresholdQualParam 1}
+
+ pcUpperThresholdQualParamRxQualDL OBJECT-TYPE
+ SYNTAX RxQual
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Threshold level for downlink power reduction (U_RXQUAL_DL_P)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcUpperThresholdQualParam 2}
+
+ pcUpperThresholdQualParamPx OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The number of averages (out of total averages) that
+ have to be lower than the threshold, before making a
+ power reduction decision (P4)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcUpperThresholdQualParam 3}
+
+ pcUpperThresholdQualParamNx OBJECT-TYPE
+ SYNTAX AveragingNumber
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The total number of averages that have to be taken
+ into account before power reduction decision (N4)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {pcUpperThresholdQualParam 4}
+
+ powerControlInterval OBJECT-TYPE
+ SYNTAX PowerControlInterval
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The powerControlInterval attribute contains the minimum
+ interval between successive modifications of the RF power
+ level. Refer to the Specification GSM 05.08 (P_Con_INTERVAL).
+ The range is 0...30 seconds and the step size 0.96 seconds."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {powerControlPackage 7}
+
+ powerIncrStepSize OBJECT-TYPE
+ SYNTAX PowerIncrStepSize
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The powerIncrStepSize attribute defines the step size
+ used when increasing the MS transmit power. The step
+ size is 2, 4 or 6 dB. Refer to Specification GSM 05.08
+ (Pow_Incr_Step_Size)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {powerControlPackage 8}
+
+ powerRedStepSize OBJECT-TYPE
+ SYNTAX PowerRedStepSize
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The powerRedStepSize attribute defines the step size
+ used when reducing the MS transmit power. The step
+ size is 2 or 4 dB. Refer to Specification GSM 05.08
+ (Pow_Red_Step_Size)."
+ REFERENCE
+ "Owner Module: L1 Power Control module
+ Mode-of-operation: set from manager
+ Effective-time: immediately"
+ ::= {powerControlPackage 9}
+
+cellMeasurmentPackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "Measurements related to the BTS.
+-- CELL Measurement Function."
+ ::= {gp10GsmMib 12}
+
+ meanPCHAGCHQueueLength OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Mean PCH-AGCH queue length:
+
+ This measurement provides the arithmetic mean of the number
+ of all messages waiting for transmission on the PCH-AGCH.
+
+ This measurement is obtained by sampling at a pre-defined
+ interval (System designed), the PCH-AGCH queue length and
+ then taking the arithmetic mean (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 1}
+
+ attTransOfPagingMessagesThePCH OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Attempted Transmission of Paging Messages (the PCH):
+
+ This measurement provides the number of Paging messages
+ transmitted (these are counted as attempts).
+
+ This is value is updated upon transmission of 'PAGING
+ REQUEST' (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 2}
+
+
+ unsuccTransOfPagingMessagesThePCH OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Unsuccessful Transmission of Paging Messages (the PCH)
+
+ This measurement provides the number of unsuccessful
+ Paging requests.
+
+ This value is updated when a no 'PAGING RESPONSE' received for
+ the 'PAGING REQUEST', expiry of timer T3113 (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 3}
+
+ attImmediateAssingProcs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Attempted IMMEDIATE ASSIGNMENT Procedures:
+
+ This measurement provides the number of attempted immediate
+ assignment procedures.
+
+ This value is updated upon receipt of 'CHANNEL REQUIRED'
+ Message. Note, the establishment causes are: 'EMERGENCY
+ CALL', 'CALL RE-ESTABLISHMENT', 'ANSWER TO PAGING',
+ 'ORIGINATING CALL' , 'LOCATION UPDATING' and 'OTHER
+ PROCEDURES' as defined in (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 4}
+
+ succImmediateAssingProcs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Successful IMMEDIATE ASSIGNMENT Procedures:
+
+ This measurement provides the number of successful immediate
+ assignment procedures.
+
+ Transmission of 'IMMEDIATE ASSIGN COMMAND' Message. This
+ message contains either an 'IMMEDIATE ASSIGNMENT' Message
+ or an 'IMMEDIATE ASSIGNMENT EXTENDED' Message. If an
+ 'IMMEDIATE ASSIGNMENT EXTENDED' Message is transmitted,
+ the counter shall be incremented by two, because that
+ Message contains assignment information for two mobiles
+ (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 5}
+
+ attImmediateAssingProcsPerCauseTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF AttImmediateAssingProcsPerCauseEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This entry is required to define a table of values."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 6}
+
+ attImmediateAssingProcsPerCauseEntry OBJECT-TYPE
+ SYNTAX AttImmediateAssingProcsPerCauseEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "Attempted IMMEDIATE ASSIGNMENT Procedures, per cause:
+
+ This measurement provides the number of attempted immediate
+ assignment procedures, per cause.
+
+ Receipt of 'CHANNEL REQUIRED' Message. Note, the establishment
+ causes are: 'EMERGENCY CALL', 'CALL RE-ESTABLISHMENT',
+ 'ANSWER TO PAGING', 'ORIGINATING CALL' , 'LOCATION UPDATING'
+ and 'OTHER PROCEDURES' as defined in (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ INDEX {attImmediateAssingProcsCause}
+ --DEFAULT cookie MIBT_%n
+ ::= {attImmediateAssingProcsPerCauseTable 1}
+
+ AttImmediateAssingProcsPerCauseEntry ::= SEQUENCE {
+ attImmediateAssingProcsCause CauseCode,
+ attImmediateAssingProcsValue INTEGER
+ }
+
+ attImmediateAssingProcsCause OBJECT-TYPE
+ SYNTAX CauseCode
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Cause of the service rejection."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {attImmediateAssingProcsPerCauseEntry 1}
+
+ attImmediateAssingProcsValue OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Counter of the number of rejections for the service."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {attImmediateAssingProcsPerCauseEntry 2}
+
+ succImmediateAssingProcsPerCauseTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF SuccImmediateAssingProcsPerCauseEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This entry is required to define a table of values."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 7}
+
+ succImmediateAssingProcsPerCauseEntry OBJECT-TYPE
+ SYNTAX SuccImmediateAssingProcsPerCauseEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "Successful IMMEDIATE ASSIGNMENT Procedures, per cause:
+
+ This measurement provides the number of successful immediate
+ assignment procedures, per cause.
+
+ This value is updated upon transmission of 'IMMEDIATE ASSIGN
+ COMMAND' Message. This Message contains either an 'IMMEDIATE
+ ASSIGNMENT' Message or an 'IMMEDIATE ASSIGNMENT EXTENDED'
+ Message, per cause. Note, the establishment causes are:
+ 'EMERGENCY CALL', 'CALL RE-ESTABLISHMENT', 'ANSWER TO PAGING',
+ 'ORIGINATING CALL' , 'LOCATION UPDATING' and 'OTHER
+ PROCEDURES'. The 'IMMEDIATE ASSIGNMENT EXTENDED' Message
+ contains assignment information for two mobiles (GSM04.08[2]).
+ If the establishment cause is identical for the the two mobile
+ stations, the counter shall be incremented by two. Otherwise
+ the affected counters shall be incremented by one."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ INDEX {succImmediateAssingProcsCause}
+ --DEFAULT cookie MIBT_%n
+ ::= {succImmediateAssingProcsPerCauseTable 1}
+
+ SuccImmediateAssingProcsPerCauseEntry ::= SEQUENCE {
+ succImmediateAssingProcsCause CauseCode,
+ succImmediateAssingProcsValue INTEGER
+ }
+
+ succImmediateAssingProcsCause OBJECT-TYPE
+ SYNTAX CauseCode
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Cause of the service rejection."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {succImmediateAssingProcsPerCauseEntry 1}
+
+ succImmediateAssingProcsValue OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Counter of the number of rejections for the service."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {succImmediateAssingProcsPerCauseEntry 2}
+
+ nbrOfPagesDiscardedFromPCHQueue OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Number of Pages Discarded from the PCH Queue:
+
+ This measurement provides the number of Paging messages
+ which are discarded from the PCH queue before they could
+ be transmitted.
+
+ Pages can be discarded from the queues (assuming queuing
+ is in operation) for a number of reasons, including queue
+ overflow, priority insertion in the queue causing an overflow
+ and in-queue timer expiry (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 8}
+
+
+ meanDurationOfSuccPagingProcs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Mean duration of a successful Paging Procedure:
+
+ This measurement provides the arithmetic mean duration of a
+ successful Paging procedure, i.e. from transmission of the
+ page request towards the BSCs and receipt of a positive
+ response.
+
+ An accumulation is performed for the time taken by each
+ Paging procedure during the granularity period and an
+ arithmetic mean is taken from the observed values. The
+ measured time will be between Transmission of a 'PAGING
+ REQUEST' service request to Receipt of 'PAGING RESPONSE'
+ service confirmation (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 9}
+
+ nbrOfAvailableTCHs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Number of Available TCHs:
+
+ This measurement provides the number of TCHs which are
+ available for use (including those which are actually in use).
+
+ The guage will be incremented when the TCH becomes available
+ and decremented when it becomes unavailable. The TCH is
+ available when its administrative state is 'unlocked' or
+ 'shuttingdown' and the operational state is 'enabled', and
+ is unavailable when its administrative state changes to
+ 'locked' or operational state changes to 'disabled'. The
+ gauge value equals the number of TCHs with an administrative
+ state of 'unlocked' or 'shuttingdown' and an operational
+ state of 'enabled', (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 10}
+
+ meanNbrOfBusyTCHs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Mean number of busy TCHs:
+
+ This measurement provides the arithmetic mean of the number
+ of TCHs which are simultaneously in use.
+
+ This measurement is obtained by sampling at a pre-defined
+ interval (System designed), the number of TCHs which are
+ carrying traffic and then taking the arithmetic mean
+ (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 11}
+
+ maxNbrOfBusyTCHs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Maximum number of busy TCHs:
+
+ This measurement provides the highest recorded value for the
+ number of TCHs simultaneously in use.
+
+ This measurement is obtained by sampling at a pre-defined
+ interval (System designed), the number of TCHs which are
+ 'busy', and then taking the maximum of all such values at
+ the end of the granularity period. TCH is busy between an
+ 'ASSIGNMENT COMPLETE' Message and the complementary 'RELEASE'
+ Message, (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 12}
+
+ meanNbrOfIdleTCHsPerInterferenceBand OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Mean number of idle TCHs per interference band:
+
+ This measurement provides the arithmetic mean of the number
+ of idle TCHs per interference band. The TCH is said to be
+ idle if it can be allocated for a request. Idle TCHs are
+ allocated in five classes (GSM 05.01) depending on the
+ measured interference level.
+
+ This measurement is obtained by sampling at a pre-defined
+ interval (System designed), the number of idle TCHs per
+ interference band and then taking the arithmetic mean
+ (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 13}
+
+ attTCHSeizures OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Attempted TCH seizures:
+
+ This measurement provides the number of attempted TCH seizures
+
+ This value is updated upon transmission of 'ASSIGNMENT
+ COMMAND' Message to the MS, (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 14}
+
+ succTCHSeizures OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Successful TCH seizures:
+
+ This measurement provides the number of successful TCH
+ seizures.
+
+ This value is updated upon receipt of 'ASSIGNMENT COMPLETE'
+ Message from the MS, (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 15}
+
+ attTCHSeizuresMeetingTCHBlockedState OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Attempted TCH Seizures meeting an TCH blocked state:
+
+ This measurement provides the number of attempted TCH
+ seizures meeting all busy TCH state.
+
+ This value is updated upon receipt of 'SETUP' Message from
+ the MS meeting all TCH busy state (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 16}
+
+ allAvailableTCHAllocatedTime OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "All Available TCH Allocated Time:
+
+ This measurement provides the accumulated time during the
+ granularity period when all available TCHs were in use or
+ otherwise unavailable to be allocated.
+
+ Each time segment represents the elapsed time from the last
+ available TCH being allocated to the next occurrence of a
+ release of a TCH, so making it available for allocation.
+ The allocation event can be for any reason e.g. new call,
+ Handover and is represented by an 'ASSIGNMENT COMPLETE'
+ Message. These time segments are accumulated to give a
+ single total (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 17}
+
+ meanTCHBusyTime OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Mean TCH busy time:
+
+ This measurement provides the arithmetic mean of the busy
+ time for TCHs in a CELL, i.e. the time the channels have
+ been occupied.
+
+ This measurement is obtained by accumulating each TCHs busy
+ time. TCH is busy between an 'ASSIGNMENT COMPLETE' Message
+ and the complementary 'RELEASE' Message. All values are added
+ up and divided by the number of TCHs at the end of the
+ granularity period to obtain the arithmetic mean. (Further
+ information can be found in GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 18}
+
+ meanTCHQueueLength OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Mean TCH queue length:
+
+ This measurement provides the arithmetic mean of the number
+ of queued TCH assignment procedures.
+
+ This measurement is obtained by sampling at a pre-defined
+ interval (System designed), the TCH queue length and then
+ taking the arithmetic mean (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 19}
+
+ nbrOfLostRadioLinksTCH OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Number of lost Radio links while using a TCH:
+
+ This measurement provides the number of calls terminated due
+ to RF failure on the radio path.
+
+
+ A local end release due to a 'RADIO LINK FAILURE' experienced
+ by the BTS when using a TCH (GSM 05.08 [4])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 20}
+
+ nbrOfAvailableSDCCHs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Number of Available SDCCHs:
+
+ This measurement provides the number of SDCCHs which are
+ available to be used (including those actually in use).
+
+ The gauge will be incremented when the SDCCH becomes
+ available and decremented when it becomes unavailable. The
+ SDCCH is available when its administrative state is 'unlocked'
+ or 'shuttingdown' and the operational state is 'enabled', and
+ is unavailable when its administrative state changes to
+ 'locked' or operational state changes to 'disabled'. The
+ gauge value equals the number of SDCCHs with an administrative
+ state of 'unlocked' or 'shuttingdown' and an operational
+ state of 'enabled', (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 21}
+
+ meanNbrOfBusySDCCHs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Mean number of busy SDCCHs:
+
+ This measurement provides the arithmetic mean of the number
+ of SDCCHs which are simultaneously in use.
+
+ This measurement is obtained by sampling at a pre-defined
+ interval (System designed), the SDCCHs which are busy and
+ then taking the arithmetic mean (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 22}
+
+ maxNbrOfBusySDCCHs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Maximum number of busy SDCCHs:
+
+ This measurement provides the highest recorded value for
+ the number of SDCCHs simultaneously in use.
+
+ This measurement is obtained by sampling at a pre-defined
+ interval (System designed), the number of SDCCHs which are
+ 'busy', and then taking the maximum of all such values at
+ the end of the granularity period, (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 23}
+
+ attSDCCHSeizuresMeetingSDCCHBlockedState OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Attempted SDCCH Seizures meeting an SDCCH blocked state:
+
+ This measurement provides the number of attempted SDCCH
+ seizures meeting all busy SDCCH state.
+
+ This value is updated upon receipt of 'CHANNEL REQUEST'
+ Message from the MS sent on the RACH meeting all SDCCH
+ busy state (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 24}
+
+ allAvailableSDCCHAllocatedTime OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "All Available SDCCH Allocated Time:
+
+ This measurement provides the accumulated time during the
+ granularity period when all available SDCCHs are in use or
+ otherwise unavailable to be allocated.
+
+ This value is updated each time segment represents the
+ elapsed time from the last available SDCCH being allocated
+ to the next occurrence of a release of a SDCCH, so making
+ it available for allocation. The allocation event can be
+ for any reason e.g. new call, Handover, and is represented
+ by a SABM Message. These time segments are accumulated to
+ give a single total (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 25}
+
+ meanSDCCHQueueLength OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Mean SDCCH queue length:
+
+ This measurement provides the arithmetic mean of the number
+ of all messages waiting for transmission on the SDCCH.
+
+ This measurement is obtained by sampling at a pre-defined
+ interval (System designed), the SDCCH queue length and then
+ taking the arithmetic mean (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 26}
+
+ nbrOfLostRadioLinksSDCCH OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Number of lost Radio links while using an SDCCH:
+
+ This measurement provides the number of RF failure while
+ using the SDCCH.
+
+ A local end release, due to a 'RADIO LINK FAILURE',
+ experienced by the BTS when using an SDCCH (GSM 08.58 [6])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 27}
+
+ relativeTimeDLPowerControlAtMax OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Relative time downlink power control at maximum:
+
+ This measurement provides the time downlink power control
+ was running at maximum level for the busy TCHs over the
+ measured period, relative to the total TCH busy time.
+
+ Each time segment represents the elapsed time when
+ BS_TXPWR_MAX is at maximum for each busy TCH. These time
+ segments are accumulated to give a single total. From this
+ information a value is derived such that it reflects a
+ percentage of the total channel busy time, (GSM 05.08 [4])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 28}
+
+ relativeTimeULPowerControlAtMax OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Relative time uplink power control at maximum:
+
+ This measurement provides the time uplink power control
+ was running at maximum level for the seized TCHs over the
+ measured period, relative to the total TCH busy time.
+
+ Each time segment represents the elapsed time when
+ MS_TXPWR_MAX is at maximum for each busy TCH. These time
+ segments are accumulated to give a single total. From this
+ information a value is derived such that it reflects a
+ percentage of the total channel busy time, (GSM 05.08 [4])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 29}
+
+ succInternalHDOsIntraCell OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Successful Internal Handovers, intra-CELL:
+
+ This measurement provides the number of times a call moves
+ from the occupied channel of the CELL to another free channel
+ of the same CELL.
+
+ Transmission of 'HANDOVER PERFORMED' Message to the MSC
+ (GSM 08.08 [5])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 30}
+
+ unsuccInternalHDOsIntraCell OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Unsuccessful Internal Handovers, intra-CELL:
+
+ This measurement provides the number of unsuccessful intra
+ CELL Handovers, i.e. an attempt was made to move a call from
+ the occupied channel of the CELL to another free channel of
+ the same CELL.
+
+ This value is updated upon receipt of 'ASSIGNMENT FAILURE'
+ Message for the attempted handover (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: RRM module
+ Mode-of-operation: set from RRM
+ Effective-time: immediately according current measurement interval"
+ ::= {cellMeasurmentPackage 31}
+
+--
+-- The following 6 items are not needed for the Viper Cell BTS.
+--
+-- attIncomingInternalInterCellHDOs OBJECT-TYPE
+-- SYNTAX INTEGER
+-- MAX-ACCESS read-write
+-- STATUS current
+-- DESCRIPTION
+-- "Attempted incoming Internal inter CELL Handovers:
+--
+-- This measurement provides the number of attempted incoming
+-- Handovers into the observed CELL from the related adjacent
+-- CELLs controlled by the same BSC, further information can be
+-- found in GSM 04.08 [2], 08.08 [5] and 08.58 [6].
+--
+-- An occurrence of a BSC internal event, depending on Handover
+-- algorithm."
+-- REFERENCE
+-- "Owner Module: RRM module
+-- Mode-of-operation: set from RRM
+-- Effective-time: immediately according current measurement interval"
+-- ::= {cellMeasurmentPackage 32}
+--
+-- succIncomingInternalInterCellHDOs OBJECT-TYPE
+-- SYNTAX INTEGER
+-- MAX-ACCESS read-write
+-- STATUS current
+-- DESCRIPTION
+-- "Successful incoming Internal inter CELL Handovers:
+--
+-- This measurement provides the number of successful
+-- incoming Handovers into the observed CELL from the
+-- related adjacent CELLs controlled by the same BSC.
+--
+-- Transmission of a 'HANDOVER PERFORMED' Message to the
+-- MSC (GSM 08.08 [5])."
+-- REFERENCE
+-- "Owner Module: RRM module
+-- Mode-of-operation: set from RRM
+-- Effective-time: immediately according current measurement interval"
+-- ::= {cellMeasurmentPackage 33}
+--
+-- attOutgoingInternalInterCellHDOs OBJECT-TYPE
+-- SYNTAX INTEGER
+-- MAX-ACCESS read-write
+-- STATUS current
+-- DESCRIPTION
+-- "Attempted outgoing Internal inter CELL Handovers:
+--
+-- This measurement provides the number of attempted outgoing
+-- Handovers from the observed CELL to the related adjacent
+-- CELLs controlled by the same BSC.
+--
+-- Transmission of a 'HANDOVER COMMAND' Message (GSM 08.08 [5])."
+-- REFERENCE
+-- "Owner Module: RRM module
+-- Mode-of-operation: set from RRM
+-- Effective-time: immediately according current measurement interval"
+-- ::= {cellMeasurmentPackage 34}
+--
+-- succOutgoingInternalInterCellHDOs OBJECT-TYPE
+-- SYNTAX INTEGER
+-- MAX-ACCESS read-write
+-- STATUS current
+-- DESCRIPTION
+-- "Successful outgoing Internal inter CELL Handovers:
+--
+-- This measurement provides the number of successful outgoing
+-- Handovers from the observed CELL to the related adjacent
+-- CELLs controlled by the same BSC.
+--
+-- This value is updated upon transmission of a 'HANDOVER
+-- PERFORMED' Message to the MSC (GSM 08.08 [5])."
+-- REFERENCE
+-- "Owner Module: RRM module
+-- Mode-of-operation: set from RRM
+-- Effective-time: immediately according current measurement interval"
+-- ::= {cellMeasurmentPackage 35}
+--
+-- unsuccHDOsWithReconnection OBJECT-TYPE
+-- SYNTAX INTEGER
+-- MAX-ACCESS read-write
+-- STATUS current
+-- DESCRIPTION
+-- "Unsuccessful Internal Handovers with reconnection to old
+-- channels:
+--
+-- This measurement provides the number of unsuccessful
+-- Handovers (with reconnection to the original channels),
+-- for the observed CELL.
+--
+-- Receipt of 'HANDOVER FAILURE' Message received for the
+-- attempted handover (GSM 04.08 [2])."
+-- REFERENCE
+-- "Owner Module: RRM module
+-- Mode-of-operation: set from RRM
+-- Effective-time: immediately according current measurement interval"
+-- ::= {cellMeasurmentPackage 36}
+--
+-- unsuccHDOsWithLossOfConnection OBJECT-TYPE
+-- SYNTAX INTEGER
+-- MAX-ACCESS read-write
+-- STATUS current
+-- DESCRIPTION
+-- "Unsuccessful Internal Handovers with loss of connection:
+--
+-- This measurement provides the number of unsuccessful
+-- Handovers that end in loosing the speech channel, for the
+-- observed CELL.
+--
+-- Expiry of timer T3103 for Inter CELL Handovers and Expiry
+-- of timer T3107 for Intra CELL Handovers (GSM 04.08 [2])."
+-- REFERENCE
+-- "Owner Module: RRM module
+-- Mode-of-operation: set from RRM
+-- Effective-time: immediately according current measurement interval"
+-- ::= {cellMeasurmentPackage 37}
+--
+callControlMeasurmentPackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "Call Control (MSC) related measurments"
+ ::= {gp10GsmMib 13}
+
+ nbrOfClassMarkUpdates OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Number of class mark updates. This measurement provides
+ the number of classmark updates received from the BSS at
+ the MSC.
+
+ This value is updated upon receipt of 'CLASSMARK UPDATE'
+ Message (GSM 08.08 [5])."
+ REFERENCE
+ "Owner Module: CC module
+ Mode-of-operation: set from CC
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 1}
+
+ attMobileOriginatingCalls OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Attempted mobile originating calls. This measurement
+ provides the number of call attempts for mobile originating
+ traffic.
+
+ This value is updated upon receipt of 'CM_SERV_REQ' Message
+ from the originating MS, with service type set to originating
+ call establishment (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: CC module
+ Mode-of-operation: set from CC
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 2}
+
+ succMobileOriginatingCalls OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Successful mobile originating calls. This measurement
+ provides the number of successful calls for mobile
+ originating traffic.
+
+ This value is updated upon receipt of 'ASSIGNMENT COMPLETE'
+ Message from the originating MS, for the requested mobile
+ originating call (GSM 08.08 [5]). Note, the 'ALERTING'
+ Message from GSM 04.08 [2] is not used as the implementation
+ of it is optional."
+ REFERENCE
+ "Owner Module: CC module
+ Mode-of-operation: set from CC
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 3}
+
+ ansMobileOriginatingCalls OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Answered mobile originating calls. This measurement
+ provides the number of answered calls for mobile
+ originating traffic.
+
+ This value is updated upon receipt of 'CONNECT ACKNOWLEDGE'
+ Message from the originating MS, for the requested mobile
+ originating call (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: CC module
+ Mode-of-operation: set from CC
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 4}
+
+ attMobileTerminatingCalls OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Attempted mobile terminating calls. This measurement
+ provides the number of call attempts for mobile
+ terminating traffic.
+
+ This vvalue is updated upon transmission of 'SETUP'
+ Message to the called MS, for the requested mobile
+ terminating call (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: CC module
+ Mode-of-operation: set from CC
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 5}
+
+ succMobileTerminatingCalls OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Successful mobile terminating calls. This measurement
+ provides the number of successful calls for mobile
+ terminating traffic.
+
+ This value is updated upon receipt of 'ASSIGNMENT COMPLETE'
+ Message from the called MS, for the requested mobile
+ terminating call (GSM 08.08 [5]). Note, the 'ALERTING'
+ Message from GSM 04.08 [2] is not used as the implementation
+ of it is optional."
+ REFERENCE
+ "Owner Module: CC module
+ Mode-of-operation: set from CC
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 6}
+
+ ansMobileTerminatingCalls OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Answered mobile terminating calls. This measurement
+ provides the number of answered calls for mobile
+ terminating traffic.
+
+ This value is updated upon transmission of 'CONNECTION
+ ACKNOWLEDGE' Message to the called MS, for the requested
+ mobile terminating call (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: CC module
+ Mode-of-operation: set from CC
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 7}
+
+ attMobileEmergencyCalls OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Attempted Mobile Emergency calls. This measurement
+ provides the number of emergency call attempts.
+
+ This value is updated upon receipt of 'CM_SERV_REQ'
+ Message from the originating MS, with service indicator
+ set to emergency call (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: CC module
+ Mode-of-operation: set from CC
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 8}
+
+ succMobileEmergencyCalls OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Successful Mobile Emergency calls. This measurement provides
+ the number of successful emergency calls.
+
+ this value is updated upon receipt of 'ASSIGNMENT COMPLETE'
+ Message from the originating MS, for the requested emergency
+ call (GSM 08.08 [5]). Note, the 'ALERTING' Message from
+ GSM 04.08 [2] is not used as the implementation of it
+ is optional."
+ REFERENCE
+ "Owner Module: CC module
+ Mode-of-operation: set from CC
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 9}
+
+ ansMobileEmergencyCalls OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Answered Mobile Emergency calls. This measurement provides
+ the number of answered emergency calls.
+
+ This value is updated upon receipt of 'CONNECTION ACKNOWLEDGE'
+ Message from the originating MS, for the requested emergency
+ call (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: CC module
+ Mode-of-operation: set from CC
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 10}
+
+ attCipheringModeControlProcs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Attempted ciphering mode control procedures. This measurement
+ provides the number of ciphering mode control procedures
+ transmitted (these are counted as attempts).
+
+ This value is updated upon transmission of 'CIPHER MODE
+ COMMAND' (GSM 08.08 [5])."
+ REFERENCE
+ "Owner Module: CC module
+ Mode-of-operation: set from CC
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 11}
+
+ succCipheringModeControlProcs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Successful ciphering mode control procedures. This
+ measurement provides the number of successful ciphering
+ mode control procedures.
+
+ Receipt of 'CIPHER MODE COMPLETE' Message (GSM 08.08 [5])."
+ REFERENCE
+ "Owner Module: CC module
+ Mode-of-operation: set from CC
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 12}
+
+ attInterrogationOfHLRsForRouting OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Attempted interrogations of HLRs for routing. This
+ measurement provides the number of HLR interrogations
+ by the GMSC with the purpose of routing incoming calls
+ (these are counted as attempts).
+
+ This value is updated upon transmission of a
+ 'MAP_SEND_ROUTING_INFORMATION' service request
+ (GSM 09.02 [7])."
+ REFERENCE
+ "Owner Module: GUDB module
+ Mode-of-operation: set from GUDB
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 13}
+
+ succInterrogationOfHLRsMSRNObtained OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Successful interrogations of HLR (MSRN obtained). This
+ measurement provides the number of successful HLR
+ interrogations, where MSRN is obtained.
+
+ This value is updated upon receipt of
+ 'MAP_SEND_ROUTING_INFORMATION' service confirmation
+ containing a 'MSRN' parameter value (GSM 09.02 [7])."
+ REFERENCE
+ "Owner Module: GUDB module
+ Mode-of-operation: set from GUDB
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 14}
+
+ succInterrogationOfHLRsCallForwarding OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Successful interrogations of HLR (call Forwarding). This
+ measurement provides the number of successful HLR
+ interrogations, by the GMSC for call forwarding.
+
+ This value is updated upon receipt of
+ 'MAP_SEND_ROUTING_INFORMATION' service confirmation
+ containing a 'Forwarding Data' parameter value (GSM09.02[7])."
+ REFERENCE
+ "Owner Module: GUDB module
+ Mode-of-operation: set from GUDB
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 15}
+
+ attOpForMobileOriginatingPointToPointSMs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Attempted operations for mobile originating point to point SMs
+ This measurement provides the number of operations for
+ mobile originating point to point short messages (these are
+ counted as attempts).
+
+ This value is updated upon receipt of 'RP-DATA' Message
+ (GSM 04.11 [3])."
+ REFERENCE
+ "Owner Module: SMS module
+ Mode-of-operation: set from SMS
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 16}
+
+ succOpForMobileOriginatingPointToPointSMs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Successful operations for mobile originating point to
+ point SMs. This measurement provides the number of
+ successful operations for mobile originating point to
+ point short messages.
+
+ This value is updated upon transmission of 'RP-ACK'
+ Message (GSM 04.11 [3])."
+ REFERENCE
+ "Owner Module: SMS module
+ Mode-of-operation: set from SMS
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 17}
+
+ attOpForMobileTerminatingPointToPointSMs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Attempted operations for mobile terminating point to
+ point SMs. This measurement provides the number of
+ operations for mobile terminating point to point short
+ messages (these are counted as attempts).
+
+ This value is updated upon transmission of 'RP-DATA'
+ Message (GSM 04.11 [3])."
+ REFERENCE
+ "Owner Module: SMS module
+ Mode-of-operation: set from SMS
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 18}
+
+ succOpForMobileTerminatingPointToPointSMs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Successful operations for mobile terminating point to
+ point SMs. This measurement provides the number of
+ successful operations for mobile terminating point to
+ point short messages.
+
+ This value is updated upon receipt of 'RP-ACK' Message
+ (GSM 04.11 [3])."
+ REFERENCE
+ "Owner Module: SMS module
+ Mode-of-operation: set from SMS
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 19}
+
+ meanTimeToCallSetupService OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Mean time to provide the CALL SETUP service. This
+ measurement provides the arithmetic mean of the time
+ to provide the CALL SETUP service to a requesting MS.
+
+ This measurement is obtained by accumulating the time
+ intervals between 'SETUP' and the corresponding 'ASSIGNMENT
+ COMPLETE' messages over a granularity period using DER. This
+ end value of the time will then be divided by the number of
+ call set-ups observed in the granularity period to give the
+ arithmetic mean (GSM 04.08 [2], GSM 08.08 [5])."
+ REFERENCE
+ "Owner Module: CC module
+ Mode-of-operation: set from CC
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 20}
+
+
+ meanTimeToLocationUpdateService OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Mean time to provide the LOCATION UPDATING service. This
+ measurement provides the arithmetic mean of the time to
+ provide the LOCATION UPDATING service to an MS changing
+ Location area.
+
+ This measurement is obtained by accumulating the time
+ interval between 'LOCATION UPDATE REQUEST' and the
+ corresponding 'LOCATION UPDATING ACCEPT' Message over
+ a granularity period using DER. This end value of the
+ time will then be divided by number of Location Update
+ requests observed in the granularity period to give the
+ arithmetic mean (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: MM module
+ Mode-of-operation: set from MM
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 21}
+
+ transSubIdentifiedWithIMSI OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Transactions on the MM-layer where subscriber was identified
+ with IMSI. This measurement provides the number of
+ transactions on the MM-layer where the mobile subscriber
+ was identified with his IMSI.
+
+ This value is updated when any MM-layer transaction which
+ causes the MS to be identified with his IMSI (GSM 04.08 [2]),
+ i.e. CM_Re-establishment, CM_Service request, Identity
+ response, IMSI detach indication, Location updating accept,
+ Location updating request, TMSI re-allocation command."
+ REFERENCE
+ "Owner Module: MM module
+ Mode-of-operation: set from MM
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 22}
+
+ imsiDetachProcs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "IMSI detach procedures. This measurement provides the
+ number of IMSI procedures that involve a detach within
+ one MSC area, (see BSC Measurement Function for IMSI
+ attach procedures)
+
+ This value is updated upon receipt of 'IMSI DETACH
+ INDICATION' Message from the MS (GSM 04.08 [2])."
+ REFERENCE
+ "Owner Module: MM module
+ Mode-of-operation: set from MM
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 23}
+
+ imsiAttachProcs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "IMSI attach procedures. This measurement provides the
+ number of IMSI procedures that involve an attach within
+ one MSC area.
+
+ This value is updated upon receipt of 'LOCATION UPDATING
+ REQUEST' Message from the MS, indicating an IMSI attach,
+ (GSM 04.08 [2]) (see MSC Measurement Function for IMSI
+ detach procedures)."
+ REFERENCE
+ "Owner Module: MM module
+ Mode-of-operation: set from MM
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 24}
+
+ attIncomingInterMSCHDOs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Attempted incoming inter-MSC Handovers. This measurement
+ provides the number of attempted incoming Handovers into
+ the observed CELL from the related adjacent CELLs NOT
+ controlled by this MSC.
+
+ This value is updated upon receipt of a 'MAP_PERFORM_HANDOVER'
+ service indication with target CELL identity equal to the
+ observed CELL (GSM 09.02 [7])."
+ REFERENCE
+ "Owner Module: HO-signaling module
+ Mode-of-operation: set from HO-signaling
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 25}
+
+ succIncomingInterMSCHDOs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Successful incoming inter-MSC Handovers. This measurement
+ provides the number of successful incoming Handovers into
+ the observed CELL from the related adjacent CELLs NOT
+ controlled by this MSC.
+
+ This value is updated upon receipt of a 'MAP_SEND_END_SIGNAL'
+ service confirmation (GSM 09.02 [7])."
+ REFERENCE
+ "Owner Module: HO-signaling module
+ Mode-of-operation: set from HO-signaling
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 26}
+
+
+ attOutgoingInterMSCHDOs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Attempted outgoing inter-MSC Handovers. This measurement
+ provides the number of attempted outgoing Handovers from
+ the observed CELL to the related adjacent CELLs NOT
+ controlled by this MSC.
+
+ This value is updated upon transmission of a
+ 'MAP_PERFORM_HANDOVER' service request (GSM 09.02 [7])."
+ REFERENCE
+ "Owner Module: HO-signaling module
+ Mode-of-operation: set from HO-signaling
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 27}
+
+
+ succOutgoingInterMSCHDOs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Successful outgoing inter-MSC Handovers. This measurement
+ provides the number of successful outgoing Handovers from
+ the observed CELL to the related adjacent CELLs NOT
+ controlled by this MSC.
+
+ This value is updated upon transmission of
+ 'MAP_SEND_END_SIGNAL' service response (GSM 09.02 [7])."
+ REFERENCE
+ "Owner Module: HO-signaling module
+ Mode-of-operation: set from HO-signaling
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 28}
+
+ externalHDOsPerCauseTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF ExternalHDOsPerCauseEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This entry is required to define a table of values."
+ REFERENCE
+ "Owner Module: HO-signaling + CC module
+ Mode-of-operation: set from HO-signaling or CC-module
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 29}
+
+ externalHDOsPerCauseEntry OBJECT-TYPE
+ SYNTAX ExternalHDOsPerCauseEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "External Handovers per cause. This measurement provides
+ the number of attempted MSC controlled Handovers, per cause.
+
+ These values are updated upon receipt of a 'HANDOVER REQUIRED'
+ Message (GSM 08.08 [5])."
+ REFERENCE
+ "Owner Module: HO-signaling + CC module
+ Mode-of-operation: set from HO-signaling or CC-module
+ Effective-time: update immediately according to measurement interval"
+ INDEX {externalHDOsPerCauseCode}
+ --DEFAULT cookie MIBT_%n
+ ::= {externalHDOsPerCauseTable 1}
+
+ ExternalHDOsPerCauseEntry ::= SEQUENCE {
+ externalHDOsPerCauseCode CauseCode,
+ externalHDOsPerCauseValue INTEGER
+ }
+
+ externalHDOsPerCauseCode OBJECT-TYPE
+ SYNTAX CauseCode
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Cause of the external handover."
+ REFERENCE
+ "Owner Module: HO-signaling + CC module
+ Mode-of-operation: set from HO-signaling or CC-module
+ Effective-time: update immediately according to measurement interval"
+ ::= {externalHDOsPerCauseEntry 1}
+
+ externalHDOsPerCauseValue OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Counter of the number of external handovers for this cause."
+ REFERENCE
+ "Owner Module: HO-signaling + CC module
+ Mode-of-operation: set from HO-signaling or CC-module
+ Effective-time: update immediately according to measurement interval"
+ ::= {externalHDOsPerCauseEntry 2}
+
+ unsuccExternHDOsWithReconnectionPerMSC OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Unsuccessful External Handovers with reconnection to old
+ channels, per MSC. This measurement provides the number of
+ unsuccessful Handovers with reconnection to the original
+ channels (TCH & SDCCH), on a per MSC basis.
+
+ This value is updated upon receipt of: 'HANDOVER FAILURE'
+ Message for the attempted handover (GSM 08.08 [5]).
+
+ Note: the 'per MSC' would indicate a table, but in the
+ specs this is defined as a single value."
+ REFERENCE
+ "Owner Module: HO-signaling + CC module
+ Mode-of-operation: set from HO-signaling or CC-module
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 30}
+
+ unsuccExternHDOsWithLossOfConnectionPerMSC OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Unsuccessful External Handovers with loss of connection,
+ per MSC. This measurement provides the number of unsuccessful
+ Handovers, with loss of the call, on a per MSC basis.
+
+ This value is updated pon receipt of 'CLEAR REQUEST'
+ Message for the requested Handover (GSM 08.08 [5]).
+
+ Note: the 'per MSC' would indicate a table, but in the
+ specs this is defined as a single value."
+ REFERENCE
+ "Owner Module: HO-signaling + CC module
+ Mode-of-operation: set from HO-signaling or CC-module
+ Effective-time: update immediately according to measurement interval"
+ ::= {callControlMeasurmentPackage 31}
+
+--
+-- ViperCell H323 MIB informaiton
+--
+
+ h323-GKPort OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Gate Keeper's listning port"
+ DEFVAL
+ {1720}
+ ::= {gp10H323Mib 1}
+
+ h323-GKIPAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Gate Keeper's IP Address"
+ ::= {gp10H323Mib 2}
+
+ h323-Q931ResponseTimeOut OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Q931 Response Time Out"
+ DEFVAL
+ {100}
+ ::= {gp10H323Mib 3}
+
+ h323-Q931ConnectTimeOut OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Q931 Connect time out"
+ DEFVAL
+ {150}
+ ::= {gp10H323Mib 4}
+
+ h323-Q931CallSignalingPort OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Q931 Call Singaling Port"
+ DEFVAL
+ {500}
+ ::= {gp10H323Mib 5}
+
+ h323-t35CountryCode OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "t35 Country Code"
+ DEFVAL
+ {0}
+ ::= {gp10H323Mib 6}
+
+ h323-rasRequestTimeout OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "RAS Request Timeout"
+ DEFVAL
+ {0}
+ ::= {gp10H323Mib 7}
+
+ h323-viperbaseHeartbeatTimeout OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Viperbase Heartbeat Timeout"
+ DEFVAL
+ {0}
+ ::= {gp10H323Mib 8}
+
+--
+-- ViperCell Configuration Information
+--
+
+callConfigData OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "Call Control Configuration Data"
+ ::= {gp10ConfigMib 1}
+
+ cc-max-L3-msgs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Maximum number of silmultaneous messages"
+ DEFVAL
+ {32}
+ ::= {callConfigData 1}
+
+ cc-l3-msg-q-priority OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "VxWorks priority for the msg Q."
+ DEFVAL
+ {10}
+ ::= {callConfigData 2}
+
+ cc-task-priority OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Call Control Task Priority."
+ DEFVAL
+ {100}
+ ::= {callConfigData 3}
+
+ cc-task-stack-size OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Task stack size."
+ DEFVAL
+ {10000}
+ ::= {callConfigData 4}
+
+ cc-mm-conn-est-T999 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "MM Connection Established."
+ DEFVAL
+ {2000}
+ ::= {callConfigData 5}
+
+ cc-alerting-T301 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Alerting received Timer."
+ DEFVAL
+ {2000}
+ ::= {callConfigData 6}
+
+ cc-setup-T303 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Setup sent."
+ DEFVAL
+ {2000}
+ ::= {callConfigData 7}
+
+ cc-call-confirmed-T310 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Call Confirmed received Timer."
+ DEFVAL
+ {2000}
+ ::= {callConfigData 8}
+
+ cc-connect-T313 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Connect sent Timer."
+ DEFVAL
+ {2000}
+ ::= {callConfigData 9}
+
+ cc-disconnect-T305 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Disconnect sent Timer."
+ DEFVAL
+ {2000}
+ ::= {callConfigData 10}
+
+ cc-release-T308 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Release sent Timer."
+ DEFVAL
+ {2000}
+ ::= {callConfigData 11}
+
+ cc-safety-timer OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Call Task running too long."
+ DEFVAL
+ {1000}
+ ::= {callConfigData 12}
+
+ cc-max-calls OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Maximum # of Calls allowed."
+ DEFVAL
+ {7}
+ ::= {callConfigData 13}
+
+mobilityConfigData OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "Mobility Management Configuration Data"
+ ::= {gp10ConfigMib 2}
+
+ mm-max-mm-connections OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Maximum number of MM Connections allowed."
+ DEFVAL
+ {10}
+ ::= {mobilityConfigData 1}
+
+ mm-max-L3-msgs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Defines the size of VxWorks Message queue
+ The value of this parameter is system dependent"
+ DEFVAL
+ {32}
+ ::= {mobilityConfigData 2}
+
+ task-priority OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Mobility Management Task Priority."
+ DEFVAL
+ {100}
+ ::= {mobilityConfigData 3}
+
+ task-stack-size OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Task stack size."
+ DEFVAL
+ {20000}
+ ::= {mobilityConfigData 4}
+
+ mm-paging-t3113 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Paging Response Timer - Network"
+ DEFVAL
+ {3000}
+ ::= {mobilityConfigData 5}
+
+ mm-authenticationRequired OBJECT-TYPE
+ SYNTAX Boolean
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Authentication Required."
+ DEFVAL
+ {false}
+ ::= {mobilityConfigData 6}
+
+ mm-cipheringRequired OBJECT-TYPE
+ SYNTAX Boolean
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "CipheringRequired"
+ DEFVAL
+ {false}
+ ::= {mobilityConfigData 7}
+
+ mm-IMEICheckRequired OBJECT-TYPE
+ SYNTAX Boolean
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Mobility Confirmed received Timer."
+ DEFVAL
+ {false}
+ ::= {mobilityConfigData 8}
+
+resourceConfigData OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "Resource Management Configuration Data"
+ ::= {gp10ConfigMib 3}
+
+ rm-t3L01 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 1}
+
+ rm-bsCcChans OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 2}
+
+ rm-bsCcchSdcchComb OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 3}
+
+ rm-sysInfoOnOffMap OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 4}
+
+ rm-airInterface OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Radio system in use e.g. GSM900, DCS1800, PCS1900, etc."
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 5}
+
+ rm-viperCellTsc OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 6}
+
+ rm-maxSlotPerTrx OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 7}
+
+ rm-maxTrxs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 8}
+
+ rm-maxTchfs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 9}
+
+ rm-maxSdcch4s OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 10}
+
+ rm-trxOnOffMap OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 11}
+
+ rm-networkIfConfig OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 12}
+
+ rm-bcchTrx OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 13}
+
+ rm-preAlphaTrx OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 14}
+
+ rm-ccchBcchComb OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 15}
+
+ rm-ccchConf OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 16}
+--
+-- The following is actually a 2x8 array. That is 2 transmitters x 8 channels
+-- In the C code, this is defined as "int rm_nim[2][8]" which has an identical
+-- layout to the following:
+--
+ rm-nim-0-0 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "selection of physical beacon transceiver: normal or swap"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 17}
+
+ rm-nim-0-1 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "on-off control of cell broadcast short message feature"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 18}
+
+ rm-nim-0-2 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "on-off control of frequency hopping feature"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 19}
+
+ rm-nim-0-3 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "C2 parameter: cell reselection offset"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 20}
+
+ rm-nim-0-4 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "C2 parameter: temporary offset for cell reselection"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 21}
+
+ rm-nim-0-5 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "C2 parameter: penalty time for cell reselection"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 22}
+
+ rm-nim-0-6 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "cell bar qualify"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 23}
+
+ rm-nim-0-7 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "authentication frequency currently applied"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 24}
+
+ rm-nim-1-0 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "control if IMSI is required for an emergency call"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 25}
+
+ rm-nim-1-1 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "on-off control of overloaded cell barring feature"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 26}
+
+ rm-nim-1-2 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 27}
+
+ rm-nim-1-3 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 28}
+
+ rm-nim-1-4 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 29}
+
+ rm-nim-1-5 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 30}
+
+ rm-nim-1-6 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 31}
+
+ rm-nim-1-7 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 32}
+
+ rm-trxSynthSetting-0-0 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 33}
+
+ rm-trxSynthSetting-0-1 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 34}
+
+ rm-trxSynthSetting-0-2 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 35}
+
+ rm-trxSynthSetting-0-3 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 36}
+
+ rm-trxSynthSetting-1-0 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 37}
+
+ rm-trxSynthSetting-1-1 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 38}
+
+ rm-trxSynthSetting-1-2 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 39}
+
+ rm-trxSynthSetting-1-3 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 40}
+
+ rm-trxFpgaDelay-0-0 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 41}
+
+ rm-trxFpgaDelay-0-1 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 42}
+
+ rm-trxFpgaDelay-1-0 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 43}
+
+ rm-trxFpgaDelay-1-1 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 44}
+
+ rm-SGainCtrlSetting-0-0 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 45}
+
+ rm-SGainCtrlSetting-0-1 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 46}
+
+ rm-SGainCtrlSetting-1-0 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 47}
+
+ rm-SGainCtrlSetting-1-1 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 48}
+
+ rm-synchChanInfo OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Currently Unused"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 49}
+
+oamConfigData OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "OAM Configuration Data"
+ ::= {gp10ConfigMib 4}
+
+ oamCommand OBJECT-TYPE
+ SYNTAX OamCommand
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "OAM command to be executed at the SNMP agent."
+ DEFVAL
+ {0}
+ ::= {oamConfigData 1}
+
+ oamCommandExecutionStatus OBJECT-TYPE
+ SYNTAX OamCommandExecutionStatus
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Last OAM command execution status
+ inProgress (1), -- OAM Command is in progress.
+ sucessful (2), -- Last OAM command was completed successfully
+ failed (3) -- Last OAM command execution failed. Check oamCommandLastError to get text description of the error
+ "
+ DEFVAL
+ {0}
+ ::= {oamConfigData 2}
+
+ oamAlternateMibFileName OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "An Alternate MIB file name which can be
+ used to import and export MIB data. The default
+ file name is always fixed as $(MNET_BASE)/mib/mib.txt"
+ ::= {oamConfigData 3}
+
+ oamCommandLastError OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Text description of the last error occurred during the execution
+ of previous OAM command. This string is empty if there has not been
+ any error since the reboot of SNMP agent."
+ ::= {oamConfigData 4}
+
+ mibAccessControlFlag OBJECT-TYPE
+ SYNTAX Boolean
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Boolean flag to enable/disable access to MIB objects."
+ ::= {oamConfigData 5}
+
+
+maintenanceConfigData OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "Maintenance Configuration Data"
+ ::= {gp10ConfigMib 5}
+
+ maintenance-operation OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Trigger a maintenance operation"
+ ::= {maintenanceConfigData 1}
+
+ maintenance-response OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Response to the last operation"
+ ::= {maintenanceConfigData 2}
+
+
+gp10TrapConfigMib OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "Trap configuration information. The specifications of what to
+-- generate traps on and to whom they are sent to is defined as
+-- implementation specific. The handling of traps are different
+-- between the various versions of the SNMP protocol. Due to the
+-- lack of support for the full SNMPv2 standard by WindRiver, we
+-- generate a SNMPv1 TRAP PDU. The following information is used
+-- to generate these PDU's."
+ --DEFAULT cookie MIBT_%n
+ ::= {gp10ConfigMib 6}
+
+ trapFwdTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF TrapFwdEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This entry is required to define a table of values."
+ ::= {gp10TrapConfigMib 1}
+
+ trapFwdEntry OBJECT-TYPE
+ SYNTAX TrapFwdEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This attribute defines the set of trap config entries."
+ INDEX {trapFwdIndex}
+ ::= {trapFwdTable 1}
+
+ TrapFwdEntry ::= SEQUENCE {
+ trapFwdIndex INTEGER,
+ trapType SnmpTrapType, -- Type of trap SNMPv1 / SNMPv2.
+ trapIpAddress IpAddress, -- IP address of the Manager interesting in this trap
+ trapPort INTEGER, -- Manager's Trap Port.
+ trapCommunity DisplayString -- Community string to return to the manager.
+ }
+
+ trapFwdIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..4)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Index to the trap Config table."
+ ::= {trapFwdEntry 1}
+
+ trapType OBJECT-TYPE
+ SYNTAX SnmpTrapType
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This specifies the type of Trap to be used (NONE / SNMPv1 / SNMPv2)"
+ ::= {trapFwdEntry 2}
+
+ trapIpAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This contains the IpAddress of snmp mamager receiving trap"
+ ::= {trapFwdEntry 3}
+
+ trapPort OBJECT-TYPE
+ SYNTAX INTEGER (112..65535)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This specifies the trap port of the SNMP manager receiving trap."
+ ::= {trapFwdEntry 4}
+
+ trapCommunity OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This is the community string to use in the Trap."
+ ::= {trapFwdEntry 5}
+
+ sysTrapOid OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "The Object ID which identifies the notification type."
+ ::= {gp10TrapConfigMib 2}
+
+ gp10TrapEvents OBJECT IDENTIFIER ::= { gp10TrapConfigMib 3 }
+ gp10TrapEventsV2 OBJECT IDENTIFIER ::= {gp10TrapEvents 0}
+
+ trapCriticalAlarm NOTIFICATION-TYPE
+ OBJECTS {gp10ErrorInfoMib}
+ STATUS current
+ DESCRIPTION
+ "Critical Alarm Trap."
+ ::= {gp10TrapEventsV2 1}
+
+ trapMajorAlarm NOTIFICATION-TYPE
+ OBJECTS {gp10ErrorInfoMib}
+ STATUS current
+ DESCRIPTION
+ "Major Alarm Trap."
+ ::= {gp10TrapEventsV2 2}
+
+ trapMinorAlarm NOTIFICATION-TYPE
+ OBJECTS {gp10ErrorInfoMib}
+ STATUS current
+ DESCRIPTION
+ "Minor Alarm Trap."
+ ::= {gp10TrapEventsV2 3}
+
+ trapInformationAlarm NOTIFICATION-TYPE
+ OBJECTS {gp10ErrorInfoMib}
+ STATUS current
+ DESCRIPTION
+ "Information Alarm Trap."
+ ::= {gp10TrapEventsV2 4}
+
+
+ trapAlarmModuleName OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "The alarm module name."
+ ::= {gp10TrapConfigMib 4}
+
+ trapAlarmCode OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "The alarm code."
+ ::= {gp10TrapConfigMib 5}
+
+ trapAlarmDesc OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "The alarm description."
+ ::= {gp10TrapConfigMib 6}
+
+--
+-- ViperCell Configuration Information
+--
+
+dualTRXSCard OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "Dual TRX Status"
+ ::= {gp10SpecificMib 1}
+
+ monitorReceiverPLL-LockDetectStatus OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Lock Detect Status of the Monitor Receiver's PLL"
+ DEFVAL
+ {0}
+ ::= {dualTRXSCard 1}
+
+ referenceFrequencyPLL-LockDetectStatus OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Lock Detect Status of the Reference Frequency's PLL"
+ DEFVAL
+ {0}
+ ::= {dualTRXSCard 2}
+
+ transceiver-1-PLL-LockDetectStatus OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Lock Detect Status of the Transceiver #1 PLL"
+ DEFVAL
+ {0}
+ ::= {dualTRXSCard 3}
+
+ transceiver-2A-PLL-LockDetectStatus OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Lock Detect Status of the Transceiver #2A PLL"
+ DEFVAL
+ {0}
+ ::= {dualTRXSCard 4}
+
+ transceiver-2B-PLL-LockDetectStatus OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Lock Detect Status of the Transceiver #2B PLL"
+ DEFVAL
+ {0}
+ ::= {dualTRXSCard 5}
+
+ intermediateFrequency-LockDetectStatus OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Lock Detect Status of the Intermediate Frequency's PLL"
+ DEFVAL
+ {0}
+ ::= {dualTRXSCard 6}
+
+ trxSerialNumber OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Hardware Serial Number of the TRX Card"
+ ::= {dualTRXSCard 7}
+
+ trxSoftwareVersion OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Software Version Number of the TRX Card"
+ ::= {dualTRXSCard 8}
+
+ trxLoopBackMode OBJECT-TYPE
+ SYNTAX LoopBackControlCode
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Loop Back Mode"
+ DEFVAL
+ {0}
+ ::= {dualTRXSCard 9}
+
+arfcnRssiFunction OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "ARFCN RSSI function"
+ ::= {gp10SpecificMib 2}
+
+ arfcnRssiControlMode OBJECT-TYPE
+ SYNTAX EnableDisable
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "ARFCN/RSSI Function Control"
+ DEFVAL
+ {0}
+ ::= {arfcnRssiFunction 1}
+
+ clockRecoveryControlMode OBJECT-TYPE
+ SYNTAX RecoveryMode
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Clock Recovery Feature Control"
+ DEFVAL
+ {0}
+ ::= {arfcnRssiFunction 2}
+
+ arfcnRssiClockControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF ArfcnRssiClockControlEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This entry is required to define a table of values."
+ ::= {arfcnRssiFunction 3}
+
+ arfcnRssiClockControlEntry OBJECT-TYPE
+ SYNTAX ArfcnRssiClockControlEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This attribute defines the set of ."
+ INDEX {arfcnRssiClockControlIndex}
+ --DEFAULT cookie MIBT_%n
+ ::= {arfcnRssiClockControlTable 1}
+
+ ArfcnRssiClockControlEntry ::= SEQUENCE {
+ arfcnRssiClockControlIndex INTEGER,
+ arfcnRssiClockControlArfcn AbsoluteRFChannelNo,
+ arfcnRssiClockRecoveryMode EnableDisable
+ }
+
+ arfcnRssiClockControlIndex OBJECT-TYPE
+ SYNTAX INTEGER -- (0..63)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Index to the ARFCN/RSSI/ClockControl table."
+ ::= {arfcnRssiClockControlEntry 1}
+
+ arfcnRssiClockControlArfcn OBJECT-TYPE
+ SYNTAX AbsoluteRFChannelNo
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "RF Channel No"
+ ::= {arfcnRssiClockControlEntry 2}
+
+ arfcnRssiClockRecoveryMode OBJECT-TYPE
+ SYNTAX EnableDisable
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Clock Syncronization"
+ ::= {arfcnRssiClockControlEntry 3}
+
+clockCard OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "Clock Card"
+ ::= {gp10SpecificMib 3}
+
+ clockCardType OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Clock Card types"
+ DEFVAL
+ {0}
+ ::= {clockCard 1}
+
+ clockCardSoftwareVersion OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Software Version of the Clock Card"
+ ::= {clockCard 2}
+
+ clockCardStatus OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Clock Card Status - validity of clock output"
+ DEFVAL
+ {0}
+ ::= {clockCard 3}
+
+ clockCardCrystalUpTime OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Crystal Up-time of the Clock Card"
+ ::= {clockCard 4}
+
+ clockCardDAC OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Clock Card DAC value"
+ DEFVAL
+ {0}
+ ::= {clockCard 5}
+
+gpsCard OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "GPS Card"
+ ::= {gp10SpecificMib 4}
+
+ gpsCardType OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "GPS Card types"
+ DEFVAL
+ {0}
+ ::= {gpsCard 1}
+
+ gpsCardSoftwareVersion OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Software Version of the GPS Card"
+ ::= {gpsCard 2}
+
+ gpsCardStatus OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "GPS Card General Status"
+ DEFVAL
+ {0}
+ ::= {gpsCard 3}
+
+ gpsPosition OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Longitude and Latitude"
+ ::= {gpsCard 4}
+
+ gpsTime OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "GPS Time"
+ ::= {gpsCard 5}
+
+ utcTime OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "UTC Time"
+ ::= {gpsCard 6}
+
+ clockStatusFrequencyError OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Clock Status - Frequency Error"
+ ::= {gpsCard 7}
+
+ clockStatusDACVoltage OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Clock Status - DAC Voltage"
+ ::= {gpsCard 8}
+
+ gpsAntennaStatus OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Antenna Status"
+ ::= {gpsCard 9}
+
+ gpsSatelliteStatus OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Satellite Status"
+ ::= {gpsCard 10}
+
+powerCard OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "Power Card"
+ ::= {gp10SpecificMib 5}
+
+ powerCardType OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "powerCard types"
+ DEFVAL
+ {0}
+ ::= {powerCard 1}
+
+ powerCardStatus OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Power Card General Status"
+ DEFVAL
+ {0}
+ ::= {powerCard 2}
+
+ powerOn OBJECT-TYPE
+ SYNTAX PowerStatus
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Switch of the power Card (none-reversible action when turn-off)"
+ DEFVAL
+ {1}
+ ::= {powerCard 3}
+
+externalPowerSupply OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "External Power Supply"
+ ::= {gp10SpecificMib 6}
+
+ powerSupplyType OBJECT-TYPE
+ SYNTAX PowerSupplyType
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "External Power Supply type"
+ DEFVAL
+ {0}
+ ::= {externalPowerSupply 1}
+
+ powerSupplyStatus OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Power Supply General Status"
+ DEFVAL
+ {0}
+ ::= {externalPowerSupply 2}
+
+
+cdcBoard OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "CDC Board"
+ ::= {gp10SpecificMib 7}
+
+ cdcBoardSerialNumber OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "cdcBoard Serial Number"
+ ::= {cdcBoard 1}
+
+ cdcBoardMACAddress OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "CDC board MAC Address"
+ ::= {cdcBoard 2}
+
+automaticParameterAllocation OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "CDC Board"
+ ::= {gp10SpecificMib 8}
+
+ apaEnable OBJECT-TYPE
+ SYNTAX INTEGER { disable(0), enabled(1) }
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Feature Enable"
+ DEFVAL
+ {0}
+ ::= {automaticParameterAllocation 1}
+
+ apaScanFrequencyLowBound OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Low bound of the Feaquencies to be scaned"
+ DEFVAL
+ {0}
+ ::= {automaticParameterAllocation 2}
+
+ apaScanFrequencyHighBound OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "High bound of the Feaquencies to be scaned"
+ DEFVAL
+ {0}
+ ::= {automaticParameterAllocation 3}
+
+ apaMaxPowerSetting OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Max power setting for ViperCell"
+ DEFVAL
+ {0}
+ ::= {automaticParameterAllocation 4}
+
+ apaMinRSSIThresholdForNeighborId OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Minimum RSSI value below which the unit is not a neighbor"
+ DEFVAL
+ {0}
+ ::= {automaticParameterAllocation 5}
+
+ apaScanRate OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Scan Rate for checking RSSI value (in unit of TBD)"
+ DEFVAL
+ {0}
+ ::= {automaticParameterAllocation 6}
+
+ apaHysteresisForBCCHPower OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Hysteresis for change the power on the BCCH"
+ DEFVAL
+ {0}
+ ::= {automaticParameterAllocation 7}
+
+ apaInvalidFrequencyTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF ApaInvalidFrequencyEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This entry is required to define a table of values."
+ ::= {automaticParameterAllocation 8}
+
+ apaInvalidFrequencyEntry OBJECT-TYPE
+ SYNTAX ApaInvalidFrequencyEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This attribute defines the set of invalid frequencies within the scan frequency range."
+ INDEX {apaInvalidFrequencyIndex}
+ --DEFAULT cookie MIBT_%n
+ ::= {apaInvalidFrequencyTable 1}
+
+ ApaInvalidFrequencyEntry ::= SEQUENCE {
+ apaInvalidFrequencyIndex INTEGER,
+ apaInvalidFrequencyArfcn AbsoluteRFChannelNo
+ }
+
+ apaInvalidFrequencyIndex OBJECT-TYPE
+ SYNTAX INTEGER -- (0..63)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Index to the apa Invalid Frequency table."
+ ::= {apaInvalidFrequencyEntry 1}
+
+
+ apaInvalidFrequencyArfcn OBJECT-TYPE
+ SYNTAX AbsoluteRFChannelNo
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Index to the apa Invalid Frequency table."
+ ::= {apaInvalidFrequencyEntry 2}
+
+ apaClockSourceFrequencyTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF ApaClockSourceFrequencyEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This entry is required to define a table of values."
+ ::= {automaticParameterAllocation 9}
+
+ apaClockSourceFrequencyEntry OBJECT-TYPE
+ SYNTAX ApaClockSourceFrequencyEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This attribute defines the set of clock source frequencies."
+ INDEX {apaClockSourceFrequencyIndex}
+ --DEFAULT cookie MIBT_%n
+ ::= {apaClockSourceFrequencyTable 1}
+
+ ApaClockSourceFrequencyEntry ::= SEQUENCE {
+ apaClockSourceFrequencyIndex INTEGER,
+ apaClockSourceFrequencyArfcn AbsoluteRFChannelNo
+ }
+
+ apaClockSourceFrequencyIndex OBJECT-TYPE
+ SYNTAX INTEGER -- (0..63)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Index to the apa Invalid Frequency table."
+ ::= {apaClockSourceFrequencyEntry 1}
+
+ apaClockSourceFrequencyArfcn OBJECT-TYPE
+ SYNTAX AbsoluteRFChannelNo
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Apa Invalid Frequency."
+ ::= {apaClockSourceFrequencyEntry 2}
+
+-- gp10MgmtInfoMib OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "ViperCell General Management Information.
+-- In general, these values are not used in
+-- the actual operations of the ViperCell but
+-- they are useful bits of information to be
+-- stored for use by Management applications."
+-- ::= {gp10Mib 5}
+
+ viperCellName OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The name of the ViperCell"
+ ::= {gp10MgmtInfoMib 1}
+
+ viperCellIPAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "IP Address of the ViperCell"
+ ::= {gp10MgmtInfoMib 2}
+
+ viperCellDefGateway OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Default gateway of this network element."
+ ::= {gp10MgmtInfoMib 3}
+
+ viperCellLocation OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Location of the ViperCell"
+ ::= {gp10MgmtInfoMib 4}
+
+ viperCellSerialNumber OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Serial Number of the ViperCell"
+ ::= {gp10MgmtInfoMib 5}
+
+ viperCellAssetNumber OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Asset Number or other Customer tracking information"
+ ::= {gp10MgmtInfoMib 6}
+
+ viperCellSoftwareBuild OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Date upon which the ViperCell software was created"
+ ::= {gp10MgmtInfoMib 7}
+
+ viperCellCustomerName OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Name of the Customer who owns the ViperCell"
+ ::= {gp10MgmtInfoMib 8}
+
+ viperCellCustomerAddress OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Address of who Customer who owns the ViperCell"
+ ::= {gp10MgmtInfoMib 9}
+
+ viperCellCustomerPhone OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Phone Number of who Customer who owns the ViperCell"
+ ::= {gp10MgmtInfoMib 10}
+
+ viperCellCustomerEmail OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Email of who to Customer who owns the ViperCell"
+ ::= {gp10MgmtInfoMib 11}
+
+
+ viperCellCustomerInfo OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "For any general information the customer wishes to store"
+ ::= {gp10MgmtInfoMib 12}
+
+
+-- gp10ErrorInfoMib OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "ViperCell General Management Information.
+-- In general, these values are not used in
+-- the actual operations of the ViperCell but
+-- they are useful bits of information to be
+-- stored for use by Management applications."
+-- ::= {gp10Mib 6}
+
+ errorCode-L1 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Alarm Error Code for DSP Interface Driver Module"
+ ::= {gp10ErrorInfoMib 1}
+
+ errorCode-MD OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Alarm Error Code for RIL3 Message Delivery"
+ ::= {gp10ErrorInfoMib 2}
+
+ errorCode-RM OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Alarm Error Code for RR functional entity"
+ ::= {gp10ErrorInfoMib 3}
+
+ errorCode-MM OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Alarm Error Code for MM functional entity"
+ ::= {gp10ErrorInfoMib 4}
+
+ errorCode-CC OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Alarm Error Code for CC functional entity"
+ ::= {gp10ErrorInfoMib 5}
+
+ errorCode-L2 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Alarm Error Code for LAPDm functional entity"
+ ::= {gp10ErrorInfoMib 6}
+
+ errorCode-SMS OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Alarm Error Code for SMS functional entity"
+ ::= {gp10ErrorInfoMib 7}
+
+ errorCode-OAM OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Alarm Error Code for OAM functional entity"
+ ::= {gp10ErrorInfoMib 8}
+
+ errorCode-H323 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Alarm Error Code for H323 Stack and Application Layers"
+ ::= {gp10ErrorInfoMib 9}
+
+ errorCode-LUDB OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Alarm Error Code for Local User Database Module"
+ ::= {gp10ErrorInfoMib 10}
+
+ errorCode-EXT-LC OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Alarm Error Code for Generated by external GP10"
+ ::= {gp10ErrorInfoMib 11}
+
+ errorCode-LOG OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Alarm Error Code for System Logger"
+ ::= {gp10ErrorInfoMib 12}
+
+ errorCode-MCH OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Alarm Error Code for Maintenance Command Handler Module"
+ ::= {gp10ErrorInfoMib 13}
+
+ errorCode-ALARM OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Alarm Error Code for Local Alarm Module"
+ ::= {gp10ErrorInfoMib 14}
+
+ errorCode-SYSINIT OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Alarm Error Code for System Initialization Module"
+ ::= {gp10ErrorInfoMib 15}
+
+ errorCode-GRR OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Alarm Error Code for GRR Module"
+ ::= {gp10ErrorInfoMib 16}
+
+ errorCode-CDR OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Alarm Error Code for CDR Module"
+ ::= {gp10ErrorInfoMib 17}
+
+-- GP10 Enhancements to support GPRS Server (GS)
+--
+-- Gp10Gprs MIB
+--
+-- The Gp10 MIB is organized into 7 sub-leafs. This MIB file is a consolidation
+-- of information based on configuration and measurement parameters
+-- required for supporting GPRS Server (GS)
+
+-- The gp10gprsMib is broken into several leafs as follows:
+--
+-- 1: btsGsBasicPackage Basic Parameters (primarily RM)
+-- 2: btsGsInterfacePackage Interface parameters with GS.
+-- 3: btsGsMeasPackage Performance measurment data
+--
+
+btsGsBasicPackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "The GP10 needs to be aware of the GS, for sending Location Update
+-- Request and other data communication. For this it has to be aware of
+-- GS IP Address and Routing Area Code (RAC). Both this are configuration
+-- parameters that can be set by the user."
+ ::= {gp10GprsMib 1}
+
+ gprsServerIpAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute contains the GPRS Servers (GS) IP Address."
+ ::= {btsGsBasicPackage 1}
+
+ gprsRac OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Routing Area Code to indicate which RA this Gp10 belongs to."
+ ::= {btsGsBasicPackage 2}
+
+ enableGprs OBJECT-TYPE
+ SYNTAX EnableDisable
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute will be used by the operator to enable or diable
+ GPRS feature."
+ ::= {btsGsBasicPackage 3}
+
+ gprsOperationalStatus OBJECT-TYPE
+ SYNTAX OperationalState
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This attribute will be used by the operator to check the
+ operation status of GPRS Server."
+ ::= {btsGsBasicPackage 4}
+
+btsGsOptionPackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "The GP10 cell option parameters to support gprs."
+ ::= {gp10GprsMib 2}
+
+ nmo OBJECT-TYPE
+ SYNTAX INTEGER (0..3)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The maximum TX power level an MS may use
+ when accessing the system."
+ DEFVAL {1}
+ ::= {btsGsOptionPackage 1}
+
+ t3168 OBJECT-TYPE
+ SYNTAX INTEGER (0..7)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "TimeOut value for t3168, The timeout value is given as
+ the value plus one, in units of 500 msecs."
+ DEFVAL {4}
+ ::= {btsGsOptionPackage 2}
+
+ t3192 OBJECT-TYPE
+ SYNTAX INTEGER (0..7)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "TimeOut value for t3192, The timeout values are
+ 500, 1000, 1500, 0, 80, 120, 160, 200. In case of 0 msec
+ the timer is not started."
+ DEFVAL {3}
+ ::= {btsGsOptionPackage 3}
+
+ drxTimerMax OBJECT-TYPE
+ SYNTAX INTEGER (0..7)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The field is a binary representation of the parameter DRX_TIMER_MAX.
+ The parameter value is given as two taken to the power of the binary value
+ minus one (2^n - 1).
+ i.e. 0,1,2,4,8,16,32,64 secs"
+ DEFVAL {7}
+ ::= {btsGsOptionPackage 4}
+
+ accessBurstType OBJECT-TYPE
+ SYNTAX INTEGER (0..1)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Indicates if 8 or 11 bit access burst shall be used on
+ PRACH, PTCCH/U and in the PACKET CONTROL ACKNOWLEDGEMENT
+ message when the format is four access bursts.
+ 0 - 8 bit access burst shall be used
+ 1 - 11 bit access burst shall be used."
+ DEFVAL {0}
+ ::= {btsGsOptionPackage 5}
+
+
+ controlAckType OBJECT-TYPE
+ SYNTAX INTEGER (0..1)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Represents the default format of the PACKET CONTROL
+ ACKNOWLEDGEMENT message.
+ 0 - format is four access bursts
+ 1 - format is RLC/MAC control block."
+ DEFVAL {0}
+ ::= {btsGsOptionPackage 6}
+
+ bsCvMax OBJECT-TYPE
+ SYNTAX INTEGER (0..15)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Represents the parameter BS_CV_MAX.
+ The value BS_CV_MAX = 0 shall be interpreted as
+ value BS_CV_MAX=1 for claculation of T3198, T3200 and
+ N3104max Values."
+ DEFVAL {7}
+ ::= {btsGsOptionPackage 7}
+
+ panDec OBJECT-TYPE
+ SYNTAX INTEGER (0..7)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Represents the parameter PAN_DEC."
+ DEFVAL {1}
+ ::= {btsGsOptionPackage 8}
+
+ panInc OBJECT-TYPE
+ SYNTAX INTEGER (0..7)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Represents the parameter PAN_INC."
+ DEFVAL {1}
+ ::= {btsGsOptionPackage 9}
+
+ panMax OBJECT-TYPE
+ SYNTAX INTEGER (0..7)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Represents the maximum value allowed for counter
+ N3102.
+ 0 - 4
+ 1 - 8
+ 2 - 12
+ 3 - 16
+ 4 - 20
+ 5 - 24
+ 6 - 28
+ 7 - 32."
+ DEFVAL {4}
+ ::= {btsGsOptionPackage 10}
+
+ raColour OBJECT-TYPE
+ SYNTAX NetworkColourCode -- INTEGER (0..7)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "If the mobile station receives different
+ values of the RA COLOUR field in different cell,
+ the mobile station shall interpret the cell re-selection
+ information as if the two cells belong to different routing areas.."
+ DEFVAL {0}
+ ::= {btsGsOptionPackage 11}
+
+ si13Position OBJECT-TYPE
+ SYNTAX Si13Position -- INTEGER (0..1)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The SI13 POSITION indicates the minimum schedule for
+ where the SYSTEM INFORMATION TYPE 13 message is sent on BCCH."
+ DEFVAL {0}
+ ::= {btsGsOptionPackage 12}
+
+ cbchTrxSlot OBJECT-TYPE
+ SYNTAX CbchTrxSlot -- INTEGER (0..7)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This value indicates the Timeslot Number for TN field of
+ SI4 message."
+ DEFVAL {0}
+ ::= {btsGsOptionPackage 13}
+
+ cbchTrx OBJECT-TYPE
+ SYNTAX CbchTrx -- INTEGER (0..1)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This value means the logical number for carrier frequency.
+ The ARFCN field of SI4 message is coded as binary
+ representation of the absolute RF channel number by this value."
+ DEFVAL {0}
+ ::= {btsGsOptionPackage 14}
+
+ bcchChangeMark OBJECT-TYPE
+ SYNTAX BcchChangeMark -- INTEGER (0..3)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This value indicates the status of the information on BCCH.
+ This value shall be changed each time the information on BCCH,
+ except for the contents of the SI-13 message, is changed."
+ DEFVAL {0}
+ ::= {btsGsOptionPackage 15}
+
+ siChangeField OBJECT-TYPE
+ SYNTAX SiChangeField -- INTEGER (0..15)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This value means the representation of which information
+ was changed at the last indication in BCCH_CHANGE_MARK."
+ DEFVAL {0}
+ ::= {btsGsOptionPackage 16}
+
+
+btsGsInterfacePackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "The GP10 interface parameters to support gprs."
+ ::= {gp10GprsMib 3}
+
+rss OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "Radio SubSystem Link Control Params
+-- The parameters employed to control the radio links for GPRS"
+ ::= {btsGsInterfacePackage 1}
+
+ gprsMsTxpwrMaxCch OBJECT-TYPE
+ SYNTAX INTEGER (0..31)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The maximum TX power level an MS may use
+ when accessing the system."
+ DEFVAL
+ {30}
+ ::= {rss 1}
+
+ gprsRexLevAccessMin OBJECT-TYPE
+ SYNTAX INTEGER (0..63)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Minimum received signal level at the MS
+ required for access to the system.."
+ DEFVAL
+ {10}
+ ::= {rss 2}
+
+ gprsReselectOffset OBJECT-TYPE
+ SYNTAX INTEGER (0..31)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Applies an offset and hysteresis to the C32
+ re-selection criterion.
+ -52, -48,? -12, -10,? 12, 16, ?8."
+ DEFVAL
+ {0}
+ ::= {rss 3}
+
+ priorityClass OBJECT-TYPE
+ SYNTAX INTEGER (0..7)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The HCS Priority for the cells.
+ 0 Packet Access is not allowed in the cell.
+ 1 Spare, shall be interpreted as 0
+ 2 Spare, shall be interpreted as 0
+ 3 packet access is allowed for priority level 1
+ 4 packet access is allowed for priority level 1 to 2
+ 5 packet access is allowed for priority level 1 to 3
+ 6 packet access is allowed for priority level 1 to 4
+ 7 spare, shall be interpreted as 6"
+ DEFVAL {0}
+ ::= {rss 4}
+
+ lsaId OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "The LSA Identities for the cell"
+ ::= {rss 5}
+
+ hcsThreshold OBJECT-TYPE
+ SYNTAX INTEGER (0..31)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "HCS signal level threshold
+ -110, -108,? -48"
+ ::= {rss 6}
+
+ gprsTemporaryOffset OBJECT-TYPE
+ SYNTAX INTEGER (0..7)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Applies a negative offset
+ to C32 for the duration of PENALTY_TIME.
+ 0, 10,..., 60 dB, infinity"
+ ::= {rss 7}
+
+ gprsPenaltyTime OBJECT-TYPE
+ SYNTAX INTEGER (0..31)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Gives the duration for which
+ the temporary offset is applied.
+ 10, 20,..., 320 seconds"
+ ::= {rss 8}
+
+ gprsCellReselectHysteresis OBJECT-TYPE
+ SYNTAX INTEGER (0..7)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Additional hysteresis applied in Ready state
+ for cells in the same RA.
+ 0, 2,..., 14 dB"
+ DEFVAL
+ {4}
+ ::= {rss 9}
+
+ gprsRaReselectHysteresis OBJECT-TYPE
+ SYNTAX INTEGER (0..7)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Additional hysteresis applied for
+ cells in different RAs.
+ 0, 2,..., 14 dB"
+ DEFVAL
+ {4}
+ ::= {rss 10}
+
+ c32Qual OBJECT-TYPE
+ SYNTAX Boolean
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Flag indicating an exception rule for
+ GPRS_RESELECT_OFFSET."
+ ::= {rss 11}
+
+ c31Hysteresis OBJECT-TYPE
+ SYNTAX Boolean
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Flag indicating if hysteresis shall be applied to C31."
+ ::= {rss 12}
+
+ alpha OBJECT-TYPE
+ SYNTAX INTEGER (0..10)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This field is a binary representation of the paremeter for MS
+ output Power control in units of 0.1.
+ 0,0.1,...,1"
+ DEFVAL
+ {10}
+ ::= {rss 13}
+
+ pB OBJECT-TYPE
+ SYNTAX INTEGER (0..15)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Power reduction used by BTS on
+ PBCCH blocks, relatively to the output
+ power used on BCCH
+ 0, -2,..., -30 dB"
+ ::= {rss 14}
+
+ networkControlOrder OBJECT-TYPE
+ SYNTAX INTEGER (0..3)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Controls cell re-selection and measurement reporting
+ 0 NC0: MS controlled cell re-selection, no measurement reporting,
+ 1 NC1: MS controlled cell re-selection, MS sends measurement reports
+ 2 NC2: Network controlled cell re-selection, MS sends measurement reports
+ 3 Reserved for future use, interpreted as NC0 by mobile station."
+ DEFVAL {1}
+ ::= {rss 15}
+
+ ncFrequencyListTable OBJECT-TYPE -- need to revisit
+ SYNTAX SEQUENCE OF NcFrequencyListEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This entry is required to define a table of values.
+ Frequency list for cell re-selection
+ measurement reporting"
+ ::= {rss 16}
+
+ ncFrequencyListEntry OBJECT-TYPE
+ SYNTAX NcFrequencyListEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ DESCRIPTION
+ "This attribute defines the set of radio frequencies
+ available to a cell."
+ INDEX {ncFrequencyListIndex}
+ --DEFAULT cookie MIBT_%n
+ ::= {ncFrequencyListTable 1}
+
+ NcFrequencyListEntry ::= SEQUENCE {
+ ncFrequencyListIndex INTEGER (0..15),
+ ncFrequency AbsoluteRFChannelNo
+ }
+
+ ncFrequencyListIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..15)
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This attribute is used as the index to this table. It
+ is a sequential number between 0 and 15."
+ ::= {ncFrequencyListEntry 1}
+
+ ncFrequency OBJECT-TYPE
+ SYNTAX AbsoluteRFChannelNo
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This attribute contains the absolute radio frequency channel
+ number of the PBCCH channel of adjacent cells."
+ ::= {ncFrequencyListEntry 2}
+
+ ncReportingPeriodI OBJECT-TYPE
+ SYNTAX INTEGER (0..7)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Time period for measurement reporting
+ 0.48, 0.96, 1.92, ..., 61.44 seconds"
+ ::= {rss 17}
+
+ ncReportingPeriodT OBJECT-TYPE
+ SYNTAX INTEGER (0..7)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Time period for measurement reporting
+ 0.48, 0.96, 1.92, ..., 61.44 seconds"
+ ::= {rss 18}
+
+ extMeasurementOrder OBJECT-TYPE
+ SYNTAX INTEGER (0..3)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Controls extended measurement reporting."
+ ::= {rss 19}
+
+ extReportingPeriod OBJECT-TYPE
+ SYNTAX INTEGER (0..7)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Time period for measurement reporting
+ 60, 120, 240,..., 7680 seconds"
+ ::= {rss 20}
+
+ extReportingType OBJECT-TYPE
+ SYNTAX INTEGER (1..3)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Defines the type of extended measurement report."
+ ::= {rss 21}
+
+ intFrequency OBJECT-TYPE
+ SYNTAX INTEGER (0..31)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Frequency for which the MS shall include
+ interference measurements in extended
+ measurement report type 3."
+ ::= {rss 22}
+
+ nccPermitted OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Bit map of NCC part of BSIC for which
+ the MS shall report extended measurements."
+ ::= {rss 23}
+
+ pcMeasChan OBJECT-TYPE
+ SYNTAX INTEGER (0..1)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Flag that indicates whether the downlink
+ measurements for power control shall be made
+ on BCCH or PDCH.."
+ DEFVAL {1}
+ ::= {rss 24}
+
+ tavgW OBJECT-TYPE
+ SYNTAX INTEGER (0..25)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Signal level filter period for power control
+ in packet idle mode2(k/2)/ 6 multiframes,
+ k = 0,1,..., 25"
+ DEFVAL {15}
+ ::= {rss 25}
+
+ tavgT OBJECT-TYPE
+ SYNTAX INTEGER (0..25)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Signal level filter period for power control
+ in packet transfer mode2(k/2)/ 6 multiframes,
+ k = 0,1,..., 25"
+ DEFVAL {5}
+ ::= {rss 26}
+
+ navgI OBJECT-TYPE
+ SYNTAX INTEGER (0..15)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Interference signal level filter constant for
+ power control 2(k/2),
+ k = 0,1,..., 15"
+ DEFVAL {4}
+ ::= {rss 27}
+
+ gprsMsTargetPower OBJECT-TYPE
+ SYNTAX RxLev
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "open loop power control is employed, telling the
+ MS to assume a balanced link and adjust its transmitted
+ power to meet the desired target at the GP.
+ A target is send to the MS in the form of a power control
+ value, gamma, which is computed based on MS_GPRS_TARGET_POWER
+ using the formula in 05.08."
+ DEFVAL {30}
+ ::= {rss 28}
+
+ spgcCcchSup OBJECT-TYPE
+ SYNTAX Boolean
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "This field indicates the support of the parameter SPLIT_PG_CYCLE
+ on CCCH on the network side
+ 0 SPLIT_PG_CYCLE is not supported on CCCH in this cell
+ 1 SPLIT_PG_CYCLE is supported on CCCH in this cell."
+ ::= {rss 29}
+
+rlcMac OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "Radio Link Control Params
+-- The parameters employed to control the radio links for GPRS"
+ ::= {btsGsInterfacePackage 2}
+
+ t3169 OBJECT-TYPE
+ SYNTAX INTEGER (1..30)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Wait for Reuse of USF and TFI after the mobile station
+ uplink assignment is invalid.Defines when the current
+ uplink assignment is surely invalid on the mobile station
+ side so that the assigned USF(s) and TFI can be reused on
+ the uplink. During that period the corresponding USF(s) is
+ not broadcast. "
+ DEFVAL {5}
+ ::= {rlcMac 1}
+
+ t3191 OBJECT-TYPE
+ SYNTAX INTEGER (1..30)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Wait for reuse of TFI after sending of the last RLC Data
+ BlockDefines when the current assignment is surely invalid
+ on the mobile station side so that the TFI can be reused."
+ DEFVAL {5}
+ ::= {rlcMac 2}
+
+ t3193 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Wait for reuse of TFI after reception of the final Packet
+ Downlink Ack/Nack from the mobile station.Defines when
+ timer T3192 on the mobile station side has surely expired
+ so that the TFI can be reused."
+ DEFVAL
+ {5}
+ ::= {rlcMac 3}
+
+ t3195 OBJECT-TYPE
+ SYNTAX INTEGER (1..30)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Wait for reuse of TFI when there is no response from
+ the MS (radio failure or cell change)Defines when the
+ current assignment is surely invalid on the mobile
+ station side so that the TFI can be reused."
+ DEFVAL {5}
+ ::= {rlcMac 4}
+
+bssgp OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "Bssgp parameters."
+ ::= {btsGsInterfacePackage 3}
+
+ blockTimer OBJECT-TYPE
+ SYNTAX INTEGER (1..30)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Timer Value that guards the blocking or
+ unblocking procedures."
+ DEFVAL
+ {10}
+ ::= {bssgp 1}
+
+ resetTimer OBJECT-TYPE
+ SYNTAX INTEGER (1..120)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Timer Value that guards the reset
+ procedure."
+ DEFVAL
+ {60}
+ ::= {bssgp 2}
+
+ suspendTimer OBJECT-TYPE
+ SYNTAX INTEGER (1..10)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Timer Value that guards the suspend
+ procedure."
+ DEFVAL
+ {5}
+ ::= {bssgp 3}
+
+ resumeTimer OBJECT-TYPE
+ SYNTAX INTEGER (1..10)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Timer Value that guards the resume
+ procedure."
+ DEFVAL
+ {5}
+ ::= {bssgp 4}
+
+ capUpdateTimer OBJECT-TYPE
+ SYNTAX INTEGER (1..30)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Timer Value that guards the
+ RA_CAPABILITY_UPDATE procedure."
+ DEFVAL
+ {10}
+ ::= {bssgp 5}
+
+ blockRetries OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Number of BSSGP Virtual Connection
+ (BVC) Block Retries."
+ DEFVAL
+ {3}
+ ::= {bssgp 6}
+
+ unBlockRetries OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Number of BSSGP Virtual Connection
+ (BVC) UnBlock Retries."
+ DEFVAL
+ {3}
+ ::= {bssgp 7}
+
+ resetRetries OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Number of BSSGP Virtual Connection
+ (BVC) Reset Retries."
+ DEFVAL
+ {3}
+ ::= {bssgp 8}
+
+ suspendRetries OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Number of BSSGP Virtual Connection
+ (BVC) Suspend Retries."
+ DEFVAL
+ {3}
+ ::= {bssgp 9}
+
+ resumeRetries OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Number of BSSGP Virtual Connection
+ (BVC) Resume Retries."
+ DEFVAL
+ {3}
+ ::= {bssgp 10}
+
+ raCapUpdateRetries OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Number of BSSGP Virtual Connection
+ (BVC) RA-CAPABILITY-UPDATE Retries."
+ DEFVAL
+ {3}
+ ::= {bssgp 11}
+
+ timeInterval OBJECT-TYPE
+ SYNTAX INTEGER (5..6000)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Interval after Flow Control MS before
+ SGSN may use SGSN generated Bmax and R."
+ DEFVAL
+ {10}
+ ::= {bssgp 12}
+
+ networkPort OBJECT-TYPE
+ SYNTAX INTEGER (1024..65535)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Base UDP port for Network QOS levels."
+ DEFVAL {22240}
+ ::= {bssgp 13}
+
+
+btsGsMeasPackage OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "The GP10 measurement parameters to support gprs."
+ ::= {gp10GprsMib 4}
+
+ flushReqRecvd OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This measurement provides the total number of
+ flush request messages received from the SGSN to
+ flush the PDUs for a given cell"
+ ::= {btsGsMeasPackage 1}
+
+ pagingReqRecvd OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This measurement provides the total number of
+ PAGING messages received by the BSS from the SGSN"
+ ::= {btsGsMeasPackage 2}
+
+ meanPsInterArrivalTime OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This measurement provides the arithmetic mean of
+ the sum of time intervals between consecutive mobile
+ originating packet channel access request.
+ This measurement is obtained by accumulating the
+ time segments between receipt of consecutive
+ 'PACKET CHANNEL REQUEST' message with the establishment
+ cause being either one phase packet access or single
+ block packet access, on the PRACH and then taking the
+ arithmetic mean"
+ ::= {btsGsMeasPackage 3}
+
+ availablePdch OBJECT-TYPE
+ SYNTAX Gauge
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This measurement provides the current number
+ of PDCHs which are available to be used.
+ The gauge will be incremented when the PDCH becomes
+ available and decremented when it becomes unavailable"
+ ::= {btsGsMeasPackage 4}
+
+ meanAvailablePdch OBJECT-TYPE
+ SYNTAX Gauge
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This measurement provides the mean number of PDCHs that
+ are available to be used (including those actually in use)
+ over the measured period.
+ The gauge will be incremented when the PDCH becomes available
+ and decremented when it becomes unavailable"
+ ::= {btsGsMeasPackage 5}
+
+ maxAvailablePdch OBJECT-TYPE
+ SYNTAX Gauge
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This measurement provides the maximum number of PDCHs which
+ are available to be used (including those actually in use)
+ over the measured period.
+ The gauge will be incremented when the PDCH becomes available
+ and decremented when it becomes unavailable"
+ ::= {btsGsMeasPackage 6}
+
+ minAvailablePdch OBJECT-TYPE
+ SYNTAX Gauge
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This measurement provides the minimum number of PDCHs
+ which are available to be used (including those actually
+ in use) over the measured period
+ The gauge will be incremented when the PDCH becomes available
+ and decremented when it becomes unavailable"
+ ::= {btsGsMeasPackage 7}
+
+ meanOccupiedPdch OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This measurement provides the arithmetic mean number of
+ occupied PDCHs
+ This measurement is obtained by sampling the number of PDCHs
+ that are carrying packet traffic at a pre-defined interval
+ (System designed), and then taking the arithmetic mean."
+ ::= {btsGsMeasPackage 8}
+
+ maxOccupiedPdch OBJECT-TYPE
+ SYNTAX Gauge
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This measurement provides the highest recorded value
+ for the number occupied by PDCHs
+ This measurement is obtained by sampling at a pre-defined
+ interval (System designed), the maximum number of PDCHs
+ which are carrying packet traffic"
+ ::= {btsGsMeasPackage 9}
+
+ minOccupiedPdch OBJECT-TYPE
+ SYNTAX Gauge
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This measurement provides the lowest
+ recorded value for the number of occupied PDCHs
+ This measurement is obtained by sampling at a
+ pre-defined interval (System designed), the maximum
+ number of PDCHs which are carrying packet traffic"
+ ::= {btsGsMeasPackage 10}
+
+ availablePdchAllocTime OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This measurement gives the total amount of time
+ in the granularity period, where all PDCHs were allocated
+ This time is computed with starting time when the last PDCH is
+ assigned and the end time when a PDCH is first released"
+ ::= {btsGsMeasPackage 11}
+
+ packetPagingMessages OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This measurement provides the number of Packet Paging messages
+ transmitted over PCCCH (these are counted as attempts)"
+ ::= {btsGsMeasPackage 12}
+
+ pagchQueueLength OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This measurement provides the arithmetic mean of the number
+ of all messages waiting for transmission on the PPCH-PAGCH
+ sub channel on the PCCCH
+ This measurement is obtained by sampling at a pre-defined
+ interval (System designed), the PPCH-PAGCH queue length and
+ then taking the arithmetic mean"
+ ::= {btsGsMeasPackage 13}
+
+ pagesDiscardedFromPpch OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This measurement provides the number of Packet Paging messages
+ which are discarded from the PPCH queue before they could be
+ transmitted on PCCCH"
+ ::= {btsGsMeasPackage 14}
+
+ assignmentRequest OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This measurement provides the number of packet
+ channel assignment requests, per cause"
+ ::= {btsGsMeasPackage 15}
+
+ succAssignmentProc OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This measurement provides the number of
+ successful packet channel assignment procedures,
+ per cause
+ Note: A packet channel assignment is considered
+ successful when either the 'PACKET UPLINK ASSIGNMENT'
+ message or the 'IMMEDIATE ASSIGNMENT COMMAND'
+ message is sent"
+ ::= {btsGsMeasPackage 16}
+
+ succPdtchSeizures OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This measurement provides the number of successful
+ PDTCH seizures"
+ ::= {btsGsMeasPackage 17}
+
+ meanPacketQueueLength OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "This measurement provides the arithmetic mean of the
+ number of all messages waiting for transmission on the PDTC"
+ ::= {btsGsMeasPackage 18}
+
+ serviceChanges OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "With service upgrade and downgrade it is meant a switch
+ from the used coding scheme (CS1, CS2,...) to another one.
+ This measurement counts the number of these upgrades /
+ downgrades per cell"
+ ::= {btsGsMeasPackage 19}
+
+
+ cdrClientSSLEnable OBJECT-TYPE
+ SYNTAX Boolean
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Flag to turn on/off SSL encryption between GP10 and GMC for CDR delivery"
+ DEFVAL {0}
+ ::= {gp10CdrMib 1}
+
+
+ cdrLongCallTimer OBJECT-TYPE
+ SYNTAX INTEGER (1..30)
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Timer to trigger CDR generation for long calls.
+
+ Unit: 1 minute
+ "
+ DEFVAL {10}
+ ::= {gp10CdrMib 2}
+
+
+
+ t101 OBJECT-TYPE
+ SYNTAX HandoverTimer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "
+ This timer supervises the queuing time for a free channel at anchor GP10 but is not implemented yet.
+ UNIT: 10ms
+ Refer to GSM03.09
+ "
+ DEFVAL {200}
+ ::= { handoverTimerMib 1}
+
+
+ t102 OBJECT-TYPE
+ SYNTAX HandoverTimer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "
+ This timer supervises the time for handover completion for both inter-GP and external handover.
+ UNIT: 10ms
+ Refer to GSM03.09
+ "
+ DEFVAL {500}
+ ::= { handoverTimerMib 2}
+
+ t103 OBJECT-TYPE
+ SYNTAX HandoverTimer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "
+ Handover - waiting for Target Ho Complt (ANCH)
+ UNIT: 10ms
+ "
+ DEFVAL {2000}
+ ::= { handoverTimerMib 3}
+
+ t104 OBJECT-TYPE
+ SYNTAX HandoverTimer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "
+ Handover - waiting for Mobile Handover Complt (ANCH)
+ UNIT: 10ms
+ "
+ DEFVAL {2000}
+ ::= { handoverTimerMib 4}
+
+ t201 OBJECT-TYPE
+ SYNTAX HandoverTimer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "
+ This timer supervises the queuing time for a free channel at target GP10 but is not implemented yet
+ UNIT: 10ms
+ Refer to GSM03.09
+ "
+ DEFVAL {200}
+ ::= { handoverTimerMib 5}
+
+ t202 OBJECT-TYPE
+ SYNTAX HandoverTimer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "
+ Handover - waiting for Mobile Handover Complt btw BSSs under MSC-B
+ UNIT: 10ms
+ "
+ DEFVAL {500}
+ ::= { handoverTimerMib 6}
+
+ t204 OBJECT-TYPE
+ SYNTAX HandoverTimer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "
+ Handover - waiting for Mobile Handover Complt (TRG)
+ UNIT: 10ms
+ "
+ DEFVAL {2000}
+ ::= { handoverTimerMib 7}
+
+ t210 OBJECT-TYPE
+ SYNTAX HandoverTimer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "
+ This timer is used to supervise the time for establishing a circuit connection from PLMN to MNET
+ where the call is being handed over to MNET
+ UNIT:10ms
+ Refer to GSM03.09
+ "
+ DEFVAL {500}
+ ::= { handoverTimerMib 8}
+
+ t211 OBJECT-TYPE
+ SYNTAX HandoverTimer
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "
+ Handover - waiting for Mobile Handover Complt or Failure (TRG)
+ UNIT: 10ms
+ "
+ DEFVAL {2000}
+ ::= { handoverTimerMib 9}
+
+
+
+
+--
+-- GP10 Service Status MIB
+--
+
+ snmpServiceEnabled OBJECT-TYPE
+ SYNTAX OperationalState
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Indicates the status of SNMP service."
+ ::= { gp10ServiceStatusMib 1 }
+
+ httpServiceEnabled OBJECT-TYPE
+ SYNTAX OperationalState
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Indicates the status of HTTP service."
+ ::= { gp10ServiceStatusMib 2 }
+
+ telnetServiceEnabled OBJECT-TYPE
+ SYNTAX OperationalState
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Indicates the status of Telnet service."
+ ::= { gp10ServiceStatusMib 3 }
+
+ sshServiceEnabled OBJECT-TYPE
+ SYNTAX OperationalState
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Indicates the status of SSH service."
+ ::= { gp10ServiceStatusMib 4 }
+
+ ftpServiceEnabled OBJECT-TYPE
+ SYNTAX OperationalState
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Indicates the status of FTP service."
+ ::= { gp10ServiceStatusMib 5 }
+
+
+END
+
diff --git a/data/mnet/GP10/Host/snmp/Asn1/vipercfg.mib b/data/mnet/GP10/Host/snmp/Asn1/vipercfg.mib
new file mode 100644
index 0000000..147cf0e
--- /dev/null
+++ b/data/mnet/GP10/Host/snmp/Asn1/vipercfg.mib
@@ -0,0 +1,783 @@
+ JETCELL-VIPERCELL-MIB
+
+-- Title JetCell ViperCell MIB version 1.0
+
+-- Necessary Wind Riverism's to make the mib compiler work properly
+
+--FORCE-INCLUDE <mib.h>
+--FORCE-INCLUDE <snmpdefs.h>
+--FORCE-INCLUDE "mibhand.h"
+
+ DEFINITIONS ::= BEGIN
+
+IMPORTS
+ MODULE-IDENTITY, OBJECT-TYPE
+ FROM SNMPv2-SMI
+ enterprises
+ FROM RFC1155-SMI
+ ;
+
+jetcell MODULE-IDENTITY
+ LAST-UPDATED "9904010000Z"
+ ORGANIZATION "JetCell, Inc."
+ CONTACT-INFO
+ " Technical Support
+ Postal: JetCell, Inc.
+ 173 Constitution Drive
+ Menlo Park, CA 94025
+ USA
+
+ Tel: +1 650 330 2800
+ Fax: +1 650 330 ????
+
+ Email: support@jetcell.com"
+ DESCRIPTION
+ "This is the MIB definition for the JetCell ViperCell
+ wireless base station. This includes leafs for the GSM,
+ H.323, configuration and other MIB variables."
+ ::= {enterprises 3583}
+
+viperCellMib OBJECT IDENTIFIER ::= { jetcell 1 }
+viperCellGsmMib OBJECT IDENTIFIER ::= { viperCellMib 1 }
+viperCellH323Mib OBJECT IDENTIFIER ::= { viperCellMib 2 }
+viperCellConfigMib OBJECT IDENTIFIER ::= { viperCellMib 3 }
+
+Boolean ::= INTEGER { bfalse(0), btrue(1) }
+
+--
+-- ViperCell Configuration Information
+--
+
+callConfigData OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "Call Control Configuration Data"
+ ::= {viperCellConfigMib 1}
+
+ cc-max-L3-msgs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Maximum number of silmultaneous messages"
+ DEFVAL
+ {32}
+ ::= {callConfigData 1}
+
+ cc-l3-msg-q-priority OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "VxWorks priority for the msg Q."
+ DEFVAL
+ {10}
+ ::= {callConfigData 2}
+
+ cc-task-priority OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Call Control Task Priority."
+ DEFVAL
+ {100}
+ ::= {callConfigData 3}
+
+ cc-task-stack-size OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Task stack size."
+ DEFVAL
+ {10000}
+ ::= {callConfigData 4}
+
+ cc-mm-conn-est-T999 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "MM Connection Established."
+ DEFVAL
+ {2000}
+ ::= {callConfigData 5}
+
+ cc-alerting-T301 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Alerting received Timer."
+ DEFVAL
+ {2000}
+ ::= {callConfigData 6}
+
+ cc-setup-T303 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Setup sent."
+ DEFVAL
+ {2000}
+ ::= {callConfigData 7}
+
+ cc-call-confirmed-T310 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Call Confirmed received Timer."
+ DEFVAL
+ {2000}
+ ::= {callConfigData 8}
+
+ cc-connect-T313 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Connect sent Timer."
+ DEFVAL
+ {2000}
+ ::= {callConfigData 9}
+
+ cc-disconnect-T305 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Disconnect sent Timer."
+ DEFVAL
+ {2000}
+ ::= {callConfigData 10}
+
+ cc-release-T308 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Release sent Timer."
+ DEFVAL
+ {2000}
+ ::= {callConfigData 11}
+
+ cc-safety-timer OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Call Task running too long."
+ DEFVAL
+ {1000}
+ ::= {callConfigData 12}
+
+ cc-max-calls OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Maximum # of Calls allowed."
+ DEFVAL
+ {7}
+ ::= {callConfigData 13}
+
+mobilityConfigData OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "Mobility Management Configuration Data"
+ ::= {viperCellConfigMib 2}
+
+ mm-max-mm-connections OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Maximum number of MM Connections allowed."
+ DEFVAL
+ {10}
+ ::= {mobilityConfigData 1}
+
+ mm-max-L3-msgs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Defines the size of VxWorks Message queue
+ The value of this parameter is system dependent"
+ DEFVAL
+ {32}
+ ::= {mobilityConfigData 2}
+
+
+ mm-L3-msg-Q-priority OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "defines the priority of the VxWorks message queue"
+ DEFVAL
+ {10}
+ ::= {mobilityConfigData 3}
+
+ task-priority OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Mobility Management Task Priority."
+ DEFVAL
+ {100}
+ ::= {mobilityConfigData 4}
+
+ task-stack-size OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Task stack size."
+ DEFVAL
+ {20000}
+ ::= {mobilityConfigData 5}
+
+ mm-paging-t3113 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Paging Response Timer - Network"
+ DEFVAL
+ {3000}
+ ::= {mobilityConfigData 6}
+
+ mm-authenticationRequired OBJECT-TYPE
+ SYNTAX Boolean
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Authentication Required."
+ DEFVAL
+ {bfalse}
+ ::= {mobilityConfigData 7}
+
+ mm-cipheringRequired OBJECT-TYPE
+ SYNTAX Boolean
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "CipheringRequired"
+ DEFVAL
+ {bfalse}
+ ::= {mobilityConfigData 8}
+
+ mm-IMEICheckRequired OBJECT-TYPE
+ SYNTAX Boolean
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "Mobility Confirmed received Timer."
+ DEFVAL
+ {bfalse}
+ ::= {mobilityConfigData 9}
+
+resourceConfigData OBJECT IDENTIFIER
+-- DESCRIPTION
+-- "Resource Management Configuration Data"
+ ::= {viperCellConfigMib 3}
+
+ rm-t3L01 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm t3L01"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 1}
+
+ rm-bsCcChans OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm bsCcChans"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 2}
+
+ rm-bsCcchSdcchComb OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm bsCcchSdcchComb"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 3}
+
+ rm-sysInfoOnOffMap OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm sysInfoOnOffMap"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 4}
+
+ rm-airInterface OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm airInterface"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 5}
+
+ rm-viperCellTsc OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm viperCellTsc"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 6}
+
+ rm-maxSlotPerTrx OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm maxSlotPerTrx"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 7}
+
+ rm-maxTrxs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm maxTrxs"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 8}
+
+ rm-maxTchfs OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm maxTchfs"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 9}
+
+ rm-maxSdcch4s OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm maxSdcch4s"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 10}
+
+ rm-trxOnOffMap OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm trxOnOffMap"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 11}
+
+ rm-networkIfConfig OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm networkIfConfig"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 12}
+
+ rm-bcchTrx OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm bcchTrx"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 13}
+
+ rm-preAlphaTrx OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm preAlphaTrx"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 14}
+
+ rm-ccchBcchComb OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm ccchBcchComb"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 15}
+
+ rm-ccchConf OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm ccchConf"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 16}
+--
+-- The following is actually a 2x8 array. That is 2 transmitters x 8 channels
+-- In the C code, this is defined as "int rm_nim[2][8]" which has an identical
+-- layout to the following:
+--
+ rm-nim-0-0 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm nim-0-0"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 17}
+
+ rm-nim-0-1 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm nim-0-1"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 18}
+
+ rm-nim-0-2 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm nim-0-2"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 19}
+
+ rm-nim-0-3 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm nim-0-3"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 20}
+
+ rm-nim-0-4 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm nim-0-4"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 21}
+
+ rm-nim-0-5 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm nim-0-5"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 22}
+
+ rm-nim-0-6 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm nim-0-6"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 23}
+
+ rm-nim-0-7 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm nim-0-7"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 24}
+
+ rm-nim-1-0 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm nim-1-0"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 25}
+
+ rm-nim-1-1 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm nim-1-1"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 26}
+
+ rm-nim-1-2 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm nim-1-2"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 27}
+
+ rm-nim-1-3 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm nim-1-3"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 28}
+
+ rm-nim-1-4 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm nim-1-4"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 29}
+
+ rm-nim-1-5 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm nim-1-5"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 30}
+
+ rm-nim-1-6 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm nim-1-6"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 31}
+
+ rm-nim-1-7 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm nim-1-7"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 32}
+
+ rm-trxSynthSetting-0-0 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm trxSynthSetting-0-0"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 33}
+
+ rm-trxSynthSetting-0-1 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm trxSynthSetting-0-1"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 34}
+
+ rm-trxSynthSetting-0-2 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm trxSynthSetting-0-2"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 35}
+
+ rm-trxSynthSetting-0-3 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm trxSynthSetting-0-3"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 36}
+
+ rm-trxSynthSetting-1-0 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm trxSynthSetting-1-0"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 37}
+
+ rm-trxSynthSetting-1-1 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm trxSynthSetting-1-1"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 38}
+
+ rm-trxSynthSetting-1-2 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm trxSynthSetting-1-2"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 39}
+
+ rm-trxSynthSetting-1-3 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm trxSynthSetting-1-3"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 40}
+
+ rm-trxFpgaDelay-0-0 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm trxFpgaDelay-0-0 Trx 0 Uplink"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 41}
+
+ rm-trxFpgaDelay-0-1 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm trxFpgaDelay-0-1 Trx 0 Downlink"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 42}
+
+ rm-trxFpgaDelay-1-0 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm trxFpgaDelay-1-0 Trx 1 Uplink"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 43}
+
+ rm-trxFpgaDelay-1-1 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm trxFpgaDelay-1-1 Trx 1 Downlink"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 44}
+
+ rm-SGainCtrlSetting-0-0 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm SGainCtrlSetting-0-0 Trx 0 Uplink"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 45}
+
+ rm-SGainCtrlSetting-0-1 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm SGainCtrlSetting-0-1 Trx 0 Downlink"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 46}
+
+ rm-SGainCtrlSetting-1-0 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm SGainCtrlSetting-1-0 Trx 1 Uplink"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 47}
+
+ rm-SGainCtrlSetting-1-1 OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm SGainCtrlSetting-1-1 Trx 1 Downlink"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 48}
+
+ rm-synchChanInfo OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ DESCRIPTION
+ "rm synchChanInfo"
+ DEFVAL
+ {0}
+ ::= {resourceConfigData 49}
+
+
+END
diff --git a/data/mnet/GP10/Host/snmp/MIBS/10-1-2-103-mib.dat b/data/mnet/GP10/Host/snmp/MIBS/10-1-2-103-mib.dat
new file mode 100644
index 0000000..08aeb54
--- /dev/null
+++ b/data/mnet/GP10/Host/snmp/MIBS/10-1-2-103-mib.dat
Binary files differ
diff --git a/data/mnet/GP10/Host/snmp/MIBS/10-1-2-104-mib.dat b/data/mnet/GP10/Host/snmp/MIBS/10-1-2-104-mib.dat
new file mode 100644
index 0000000..946021c
--- /dev/null
+++ b/data/mnet/GP10/Host/snmp/MIBS/10-1-2-104-mib.dat
Binary files differ
diff --git a/data/mnet/GP10/Host/snmp/MIBS/10-1-2-106-mib.dat b/data/mnet/GP10/Host/snmp/MIBS/10-1-2-106-mib.dat
new file mode 100644
index 0000000..b0559d2
--- /dev/null
+++ b/data/mnet/GP10/Host/snmp/MIBS/10-1-2-106-mib.dat
Binary files differ
diff --git a/data/mnet/GP10/Host/snmp/Makefile b/data/mnet/GP10/Host/snmp/Makefile
new file mode 100644
index 0000000..be87864
--- /dev/null
+++ b/data/mnet/GP10/Host/snmp/Makefile
@@ -0,0 +1,18 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+CC_INCLUDE += -Isnmp\include
+
+copyall:
+ $(CP) bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/snmp/include/version.h b/data/mnet/GP10/Host/snmp/include/version.h
new file mode 100644
index 0000000..a045b45
--- /dev/null
+++ b/data/mnet/GP10/Host/snmp/include/version.h
@@ -0,0 +1,23 @@
+/********************************************************************
+*
+* FILE NAME: /GP10/Host/snmp/include/version.h
+*
+* DESCRIPTION: This file contains default version numbers for the
+* case where no version numbers are supplied from the make
+* command line.
+*
+* NOTES:
+*
+* (c) Copyright Cisco 2000
+* All Rights Reserved
+*
+********************************************************************
+*/
+#define VERSION_PREFIX "GP10 software version: "
+#define DATE_AND_TIME_PREFIX "<br>Build date & time: "
+#define BUILD_PREFIX "<br>Build ID: "
+#define CRYPTO_PREFIX "<br>Crypto Info: " /* 08/14/01 jayhong */
+#define VIPERCELL_EXTERNAL_VERSION_NO "UNKNOWN"
+#define VIPERCELL_INTERNAL_BUILD_ID "UNKNOWN"
+#define VIPERCELL_CRYPTO_INFO "UNKNOWN" /* 08/14/01 jayhong */
+/* end */
diff --git a/data/mnet/GP10/Host/snmp/snmp.dsp b/data/mnet/GP10/Host/snmp/snmp.dsp
new file mode 100644
index 0000000..dc98ff8
--- /dev/null
+++ b/data/mnet/GP10/Host/snmp/snmp.dsp
@@ -0,0 +1,188 @@
+# Microsoft Developer Studio Project File - Name="snmp" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=snmp - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "snmp.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "snmp.mak" CFG="snmp - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "snmp - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "snmp - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName "snmp"
+# PROP Scc_LocalPath "."
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "snmp - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ELSEIF "$(CFG)" == "snmp - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /X /I ".\include" /I "..\Common_To_Host\include" /I ".." /I "..\..\..\Common\include" /I "..\..\..\Common\Snmp\Include" /I "D:\Tornado86\target\h" /I "D:\Tornado86\target\h\snmp" /I "D:\snapshot\VxVmi860\vxVmi\target\h\snmp" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D CPU=I80486 /D "__VXWORKS__" /D "VXWORKS" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ENDIF
+
+# Begin Target
+
+# Name "snmp - Win32 Release"
+# Name "snmp - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\src\mib_init.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\testMib.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\vipertbl.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "/Common/Snmp/Src"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\Common\snmp\src\api_init.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\snmp\src\link_list.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\snmp\src\oam_api.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\snmp\src\snmp_fileio.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\snmp\src\snmp_trap.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\snmp\src\snmpLocalIoLib.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\snmp\src\table.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\snmp\src\vipermib.c
+# End Source File
+# End Group
+# Begin Group "/Common/Snmp/Include"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\Common\snmp\include\snmp_common.h
+# End Source File
+# End Group
+# Begin Group "/Common/Include"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\..\Common\include\oam_api.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\include\oam_trap.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\include\table.h
+# End Source File
+# End Group
+# Begin Group "/Common_to_host/Include"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\Common_To_Host\include\mibhand.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\include\mibleaf.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\include\mibtags.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\include\vipermib.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\Common_To_Host\include\vipertbl.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/data/mnet/GP10/Host/snmp/src/Makefile b/data/mnet/GP10/Host/snmp/src/Makefile
new file mode 100644
index 0000000..660534e
--- /dev/null
+++ b/data/mnet/GP10/Host/snmp/src/Makefile
@@ -0,0 +1,154 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+####################################################################
+#
+# FILE NAME: Makefile
+#
+# DESCRIPTION: This makefile calls the vxWorks makefile to build
+# vxWorks library along with JetCell snmp agent.
+#
+# COMPONENTS:
+#
+#
+# NOTES:
+#
+# (c) Copyright Cisco 2000 All Rights Reserved
+#
+# REVISION HISTORY
+#__________________________________________________________________
+#----------+--------+----------------------------------------------
+# Name | Date | Reason
+#----------+--------+----------------------------------------------
+# Bhawani |12/05/99| Initial Draft
+#----------+--------+----------------------------------------------
+####################################################################
+#/
+
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = snmp
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\snmp.out
+
+
+# Version related
+SNMPDIR = $(WIND_BASE)\target\src\snmpv1\agent
+VERSION_FILE_NAME = ..\..\version.txt
+
+# Library Related
+ASNMIB = ..\Asn1\vipercell.mib
+DSTMIB = $(SNMPDIR)\mnet.mib
+MIBTAG = $(HOST_COMMON_DIR)\include\mibtags.h
+
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR = $(THIS_APP_DIR)
+
+REPLACE_LIST=
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: library agent
+
+agent: version makeCommonObjs $(MY_OUTPUT) checkin
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY) REPLACE=$(REPLACE_LIST)
+endif
+
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+ @ echo Copying file $(ASNMIB) to $(DSTMIB)
+ @ $(CP) $(ASNMIB) $(DSTMIB)
+ $(MAKE) -C $(SNMPDIR) CPU=PPC860 TOOL=gnu VOBNAME=gp10 clean
+ -cleartool unco -rm $(VERSION_FILE_NAME)
+
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif
+
+
+# Create libPPC860
+library:
+ @ echo Copying file $(ASNMIB) to $(DSTMIB)
+ @ $(CP) $(ASNMIB) $(DSTMIB)
+ @ echo Copying file $(MIBTAG) to $(SNMPDIR)
+ @ $(CP) $(MIBTAG) $(SNMPDIR)
+ @ echo Building vxWorks Library
+ $(MAKE) -C $(SNMPDIR) CPU=PPC860 TOOL=gnu VOBNAME=gp10
+
+
+
+version:
+# Uncheckout the file first
+ifneq ($(BUILDID),)
+ifneq ($(VERSION),)
+ -cleartool co -res -nwarn -c "Building version $(VERSION) (build id $(BUILDID)) " $(VERSION_FILE_NAME)
+ @echo /******************************************************************** > $(VERSION_FILE_NAME)
+ @echo * >> $(VERSION_FILE_NAME)
+ @echo * FILE NAME: /ViperCell/version.txt >> $(VERSION_FILE_NAME)
+ @echo * >> $(VERSION_FILE_NAME)
+ @echo * DESCRIPTION: This file contains version numbers supplied from the >> $(VERSION_FILE_NAME)
+ @echo * make command line. >> $(VERSION_FILE_NAME)
+ @echo * >> $(VERSION_FILE_NAME)
+ @echo * NOTES: >> $(VERSION_FILE_NAME)
+ @echo * >> $(VERSION_FILE_NAME)
+ @echo * (C) Copyright 2000 Cisco Systems Inc., CA, USA >> $(VERSION_FILE_NAME)
+ @echo * http://www.cisco.com/ >> $(VERSION_FILE_NAME)
+ @echo * >> $(VERSION_FILE_NAME)
+ @echo * WARNING: This file is automatically generated by Makefile >> $(VERSION_FILE_NAME)
+ @echo * and any changes made to this file will be overwritten >> $(VERSION_FILE_NAME)
+ @echo * by the next build. >> $(VERSION_FILE_NAME)
+ @echo * >> $(VERSION_FILE_NAME)
+ @echo * Created by: $(USERNAME) >> $(VERSION_FILE_NAME)
+ @echo ******************************************************************** >> $(VERSION_FILE_NAME)
+ @echo */ >> $(VERSION_FILE_NAME)
+ @echo [VERSION] >> $(VERSION_FILE_NAME)
+ @echo $(VERSION) >> $(VERSION_FILE_NAME)
+ @echo [BUILDID] >> $(VERSION_FILE_NAME)
+ @echo $(BUILDID) >> $(VERSION_FILE_NAME)
+ @echo [TIME] >> $(VERSION_FILE_NAME)
+ @time /t >> $(VERSION_FILE_NAME)
+ @echo [DATE] >> $(VERSION_FILE_NAME)
+ @date /t >> $(VERSION_FILE_NAME)
+endif
+endif
+
+checkin:
+# ignore if checkin failure
+ -cleartool ci -nc -nwarn $(VERSION_FILE_NAME)
+
+testbuild:
+ -$(RM) .\bin\*.o*
+ -$(RM) ..\bin\*.o*
+ $(MAKE) agent EXTRA=-D_DEBUG
+
+
+
+ \ No newline at end of file
diff --git a/data/mnet/GP10/Host/snmp/src/mib_init.c b/data/mnet/GP10/Host/snmp/src/mib_init.c
new file mode 100644
index 0000000..1cf6055
--- /dev/null
+++ b/data/mnet/GP10/Host/snmp/src/mib_init.c
@@ -0,0 +1,58 @@
+/*********************************************************************/
+/* */
+/* (c) Copyright Cisco 2000 */
+/* All Rights Reserved */
+/* */
+/*********************************************************************/
+
+/*********************************************************************
+**
+** FILE NAME: mib_init.c
+**
+** DESCRIPTION: This file contains mib initialization routines
+**
+** COMPONENTS:
+**
+**
+** NOTES:
+**
+** REVISION HISTORY
+** __________________________________________________________________
+** ----------+--------+----------------------------------------------
+** Name | Date | Reason
+** ----------+--------+----------------------------------------------
+** Bhawani |02/28/01| Change to use unify mib change part
+** ----------+--------+----------------------------------------------
+**********************************************************************
+*/
+
+/*
+**********************************************************************
+** Include Files.
+**********************************************************************
+*/
+#include "oam_api.h"
+
+/* Add default initialization routine here */
+
+STATUS snmp_initDefaultMib()
+{
+ return STATUS_OK;
+}
+
+/* porduct specific post initialization mib routine */
+STATUS snmp_postLoadMibHandler()
+{
+ UINT32 value;
+ if (snmp_getValue(MIB_viperCellDefGateway) == 0)
+ {
+ value = snmp_getValue(MIB_h323_Q931ConnectTimeOut);
+
+ if ( value > 0x01000000)
+ {
+ snmp_setEntry(MIB_viperCellDefGateway, 0, (void *) value, 4);
+ snmp_setEntry(MIB_h323_Q931ConnectTimeOut, 0, (void *) 100, 4);
+ }
+ }
+ return STATUS_OK;
+}
diff --git a/data/mnet/GP10/Host/snmp/src/testMib.c b/data/mnet/GP10/Host/snmp/src/testMib.c
new file mode 100644
index 0000000..9b154c1
--- /dev/null
+++ b/data/mnet/GP10/Host/snmp/src/testMib.c
@@ -0,0 +1,301 @@
+#include <vxWorks.h>
+#include <mib.h>
+#include <snmpdefs.h>
+#include <snmpdLib.h>
+#include <ioLib.h>
+#include <fioLib.h>
+#include <taskLib.h>
+#include <sysLib.h>
+#include <stdio.h>
+
+#include "vipermib.h" /* Get the MIB definitions. */
+#include "vipertbl.h" /* Control Table definitions. */
+#include "version.h"
+
+/* forward declaration */
+extern void snmp_printPDU(SNMP_PKT_T *, char *);
+
+void snmp_testMethod(
+ OIDC_T lastmatch,
+ int compc,
+ OIDC_T *compl,
+ SNMP_PKT_T *pktp,
+ VB_T *vbp)
+{
+ extern Boolean mibInitialized;
+
+ int idx, tag, ttag, min, max, val;
+ Table *tbl;
+ MnetMibDataType *dtype;
+
+
+ /* Although I have never seen it happen, the varbind list may have
+ * multiple data items to process. Do them all.
+ */
+ for (snmpdGroupByGetprocAndInstance(pktp, vbp, compc, compl);
+ vbp; vbp = vbp->vb_link) {
+ tag = VB_TAG(vbp);
+ DMSG("test method", printf("snmp_testMethod: Processing varbind for item %s\n", snmp_tagName(tag)));
+
+ if (mibInitialized == False)
+ {
+ testproc_error(pktp, vbp, RESOURCE_UNAVAILABLE);
+ DMSG("test method", printf("snmp_getMethod: 1: MIB not initialized!!! Setting testproc_error(..., RESOURCE_UNAVAILABLE)\n"));
+ continue;
+ }
+ if (compc)
+ {
+ if (MTYPE_IS_SCALAR(VB_TYPE(vbp)))
+ {
+ /* compc != 0, Scalar entry ? */
+ if (*compl)
+ {
+ testproc_error(pktp, vbp, NO_SUCH_NAME); /* Yes, only single instances */
+ DMSG("test method", printf("snmp_testMethod: 2: setting testtproc_error(..., NO_SUCH_NAME)\n"));
+ continue; /* are in the MIB. */
+ }
+ }
+ else
+ {
+ /* compc != 0, Tabular entry ? */
+ idx = *compl;
+ ttag = MIB_ITEM(VB_TBL(vbp), VB_ITM(vbp)); /* Set the table pointer. */
+ tbl = (Table *)snmp_getValue(ttag); /* So that we can tell if */
+ if (!VALID_TABLE(tbl))
+ DMSG("test method", printf("WARNING!! Invalid table pointer!!\n"));
+ if (idx >= table_end(tbl))
+ { /* Is entry there? */
+ DMSG("test method", printf("snmp_testMethod: 3: Instance %d too big. Table has %d entries.\n", idx, table_end(tbl)));
+ testproc_error(pktp, vbp, NO_SUCH_NAME); /* nope. */
+ DMSG("test method", printf("snmp_testMethod: 4: Setting testproc_error(..., NO_SUCH_NAME)\n"));
+ continue;
+ }
+ }
+ }
+ else
+ { /* compc = 0 */
+ testproc_error(pktp, vbp, NO_SUCH_NAME);
+ DMSG("test method", printf("snmp_testMethod: 5: Setting testproc_error(..., NO_SUCH_NAME)\n"));
+ continue;
+ }
+ if (snmp_validTag(tag) == False)
+ {
+ testproc_error(pktp, vbp, NO_SUCH_NAME);
+ DMSG("test method", printf("snmp_testMethod: 6: Bad tag!!! Setting testproc_error(..., NON_SUCH_NAME)\n"));
+ continue;
+ }
+ val = VB_GET_INT32(vbp);
+
+ /* Find the type for this varbind. Later this will change to a
+ * more efficient lookup routine like a binary search.
+ */
+
+ if (!(dtype = (MnetMibDataType *)table_find(mnetMibDataTypeTable, snmp_findTag, (void *)&tag))) {
+ testproc_error(pktp, vbp, NO_SUCH_NAME);
+ DMSG("test method", printf("snmp_testMethod: 7: Unable to locate TypeData for '%s'!! Setting testproc_error(..., NON_SUCH_NAME)\n", snmp_tagName(tag)));
+ continue;
+ }
+
+ min = max = 0;
+ switch (dtype->type) {
+
+ /* ViperCell MIB Variables */
+ case TYPE_CauseCode:
+ case TYPE_FrequencyUsage:
+ case TYPE_GSMGeneralObjectID:
+ case TYPE_L2Timer:
+ case TYPE_L3Timer:
+ case TYPE_MSRangeMax:
+ case TYPE_PlmnPermitted:
+ case TYPE_QueueTimeLimit:
+ case TYPE_Tsc:
+ case TYPE_TxPower:
+ default:
+ break;
+ case TYPE_Ny1:
+ max = 7; break;
+ /* String data types. */
+ case TYPE_TBCD_STRING: /* STRING */
+ case TYPE_MobileCountryCode: /* STRING SIZE(2) */
+ case TYPE_MobileNetworkCode: /* STRING SIZE(1) */
+ break;
+ case TYPE_PowerRedStepSize: /* 0 - 1 */
+ case TYPE_Boolean:
+ case TYPE_EnableHoType:
+ case TYPE_OperationalState:
+ max = 1; break;
+ case TYPE_PowerIncrStepSize: /* 0 - 2 */
+ case TYPE_AdministrativeState:
+ case TYPE_DtxUplink:
+ case TYPE_GsmdcsIndicator:
+ max = 2; break;
+ case TYPE_Weighting: /* 0 - 3 */
+ max = 3; break;
+ case TYPE_AlarmStatus: /* 0 - 4 */
+ max = 4; break;
+ case TYPE_CellReselectHysteresis: /* 0 - 7 */
+ case TYPE_ChannelID:
+ case TYPE_HoPriorityLevel:
+ case TYPE_NetworkColourCode:
+ case TYPE_NoOfBlocksForAccessGrant:
+ case TYPE_RxQual:
+ max = 7; break;
+ case TYPE_ChannelCombination: /* 0 - 13 */
+ max = 13; break;
+ case TYPE_PowerClass: /* 1 - 3 CSCdv08311*/
+ min = 1; max = 3; break;
+ case TYPE_NoOfMultiframesBetweenPaging: /* 2 - 9 */
+ min = 2; max = 9; break;
+ case TYPE_ClassNumber: /* 0 - 15 */
+ case TYPE_RadioLinkTimeout:
+ case TYPE_TxInteger:
+ max = 15; break; /* fixing PR CSCdu33331 */
+ case TYPE_TxPwrMaxReduction:
+ max = 6; break;
+ case TYPE_HoMargin: /* 0 - 24 */
+ max = 24; break;
+ case TYPE_AveragingNumber: /* 0 - 31 */
+ case TYPE_PowerControlInterval:
+ max = 31; break;
+ case TYPE_HoppingSequenceNumber: /* 0 - 63 */
+ case TYPE_RxLev:
+ max = 63; break;
+ case TYPE_MaxQueueLength: /* 0 - 100 */
+ max = 100; break;
+ case TYPE_TimerPeriodicUpdateMS: /* 0 - 255 */
+ max = 255; break;
+ case TYPE_AbsoluteRFChannelNo: /* 0 - 1023 */
+ max = 1023; break;
+ case TYPE_CellIdentity: /* 0 - 65535 */
+ case TYPE_LocationAreaCode:
+ max = 65535; break;
+ case TYPE_MaxRetrans: /* 1, 2, 4, 7 */
+ if (! ( (val == 1) || (val == 2) || (val == 4) || (val == 7))) {
+ DMSG("test method", printf("snmp_testMethod: 8: Invalid value=%d, set={1, 2, 4, 7}. Setting testproc_error(..., WRONG_VALUE)\n", val));
+ testproc_error(pktp, vbp, WRONG_VALUE);
+ continue;
+ }
+ break;
+ case TYPE_Si13Position: /* 0 - 1 */
+ max = 1; break;
+ break;
+ case TYPE_CbchTrxSlot: /* 0 - 7 */
+ max = 7; break;
+ break;
+ case TYPE_CbchTrx: /* 0 - 1 */
+ max = 1; break;
+ break;
+ case TYPE_BcchChangeMark: /* 0 - 3 */
+ max = 3; break;
+ break;
+ case TYPE_SiChangeField: /* 0 - 15 */
+ max = 15; break;
+ break;
+ }
+ if (max && (! ((val >= min) && (val <= max)))) {
+ DMSG("test method", printf("snmp_testMethod: 8: Invalid value=%d, min=%d, max=%d Setting testproc_error(..., WRONG_VALUE)\n", val, min, max));
+ testproc_error(pktp, vbp, WRONG_VALUE);
+ continue;
+ }
+ /* add any other tests here */
+ /* if (ptr = table_find(validate_list, tag)); */
+ DMSG("test method", printf("snmp_testMethod: 9: Valid paramater. Setting testproc_good(...)\n"));
+
+ testproc_good(pktp, vbp);
+ }
+}
+
+int
+snmp_verifyMib()
+{
+ int i = -1;
+ int tag, addr, value;
+
+ while ((tag = mnetMibIndex[++i].tag)) {
+ addr = (int) snmp_getAddress(tag);
+ value = (int) snmp_getValue(tag);
+ DMSG("verify", printf("verifyMib(): '%s' base=0x%x addr=0x%x, *addr=0x%x, value=0x%x\n",
+ snmp_tagName(tag), (int) mnetMibIndex[i].addr, addr, *(int *)addr, value));
+ }
+ DMSG("verify", printf("verifyMib(): 'MIB_T200': base=0x%x, addr=0x%d, value=0x%x\n",
+ (int) &mnetMib.t200,
+ (int) &mnetMib.btsTimerPackage.t200,
+ (int) mnetMib.btsTimerPackage.t200));
+ DMSG("verify", printf("verifyMib(): 'MIB_T31XX': base=0x%x, addr=0x%d, value=0x%x\n",
+ (int) &mnetMib.t31xx,
+ (int) &mnetMib.btsTimerPackage.t31xx,
+ (int) mnetMib.btsTimerPackage.t31xx));
+
+ DMSG("verify", printf("verifyMib(): 'MIB_T31XX': base=0x%x, addr=0x%d, value=0x%x\n",
+ (int) &mnetMib.t31xx, (int) &mnetMib.btsTimerPackage.t31xx, (int) mnetMib.btsTimerPackage.t31xx));
+
+
+ DMSG("verify", printf("verifyMib(): 'MIB_hoAveragingAdjCellParam': base=0x%x, addr=0x%x. value=0x%x\n",
+ (int) &mnetMib.hoAveragingAdjCellParam,
+ (int) &mnetMib.handoverControlPackage.hoAveragingAdjCellParam,
+ (int) mnetMib.handoverControlPackage.hoAveragingAdjCellParam));
+ DMSG("verify", printf("verifyMib(): 'MIB_hoAveragingDistParam': base=0x%x, addr=0x%x. value=0x%x\n",
+ (int) &mnetMib.hoAveragingDistParam,
+ (int) &mnetMib.handoverControlPackage.hoAveragingDistParam,
+ (int) mnetMib.handoverControlPackage.hoAveragingDistParam));
+ DMSG("verify", printf("verifyMib(): 'MIB_hoAveragingLevParam': base=0x%x, addr=0x%x. value=0x%x\n",
+ (int) &mnetMib.hoAveragingLevParam,
+ (int) &mnetMib.handoverControlPackage.hoAveragingLevParam,
+ (int) mnetMib.handoverControlPackage.hoAveragingLevParam));
+ DMSG("verify", printf("verifyMib(): 'MIB_hoAveragingQualParam': base=0x%x, addr=0x%x. value=0x%x\n",
+ (int) &mnetMib.hoAveragingQualParam,
+ (int) &mnetMib.handoverControlPackage.hoAveragingQualParam,
+ (int) mnetMib.handoverControlPackage.hoAveragingQualParam));
+ DMSG("verify", printf("verifyMib(): 'MIB_hoThresholdDistParam': base=0x%x, addr=0x%x. value=0x%x\n",
+ (int) &mnetMib.hoThresholdDistParam,
+ (int) &mnetMib.handoverControlPackage.hoThresholdDistParam,
+ (int) mnetMib.handoverControlPackage.hoThresholdDistParam));
+ DMSG("verify", printf("verifyMib(): 'MIB_hoThresholdInterfaceParam': base=0x%x, addr=0x%x. value=0x%x\n",
+ (int) &mnetMib.hoThresholdInterfaceParam,
+ (int) &mnetMib.handoverControlPackage.hoThresholdInterfaceParam,
+ (int) mnetMib.handoverControlPackage.hoThresholdInterfaceParam));
+ DMSG("verify", printf("verifyMib(): 'MIB_hoThresholdLevParam': base=0x%x, addr=0x%x. value=0x%x\n",
+ (int) &mnetMib.hoThresholdLevParam,
+ (int) &mnetMib.handoverControlPackage.hoThresholdLevParam,
+ (int) mnetMib.handoverControlPackage.hoThresholdLevParam));
+ DMSG("verify", printf("verifyMib(): 'MIB_hoThresholdQualParam': base=0x%x, addr=0x%x. value=0x%x\n",
+ (int) &mnetMib.hoThresholdQualParam,
+ (int) &mnetMib.handoverControlPackage.hoThresholdQualParam,
+ (int) mnetMib.handoverControlPackage.hoThresholdQualParam));
+ DMSG("verify", printf("verifyMib(): 'MIB_interferenceAveragingParam': base=0x%x, addr=0x%x. value=0x%x\n",
+ (int) &mnetMib.interferenceAveragingParam,
+ (int) &mnetMib.handoverControlPackage.interferenceAveragingParam,
+ (int) mnetMib.handoverControlPackage.interferenceAveragingParam));
+
+ DMSG("verify", printf("verifyMib(): 'MIB_pcAveragingLev': base=0x%x, addr=0x%x. value=0x%x\n",
+ (int) &mnetMib.pcAveragingLev,
+ (int) &mnetMib.powerControlPackage.pcAveragingLev,
+ (int) mnetMib.powerControlPackage.pcAveragingLev));
+
+ DMSG("verify", printf("verifyMib(): 'MIB_pcAveragingQual': base=0x%x, addr=0x%x. value=0x%x\n",
+ (int) &mnetMib.pcAveragingQual,
+ (int) &mnetMib.powerControlPackage.pcAveragingQual,
+ (int) mnetMib.powerControlPackage.pcAveragingQual));
+
+ DMSG("verify", printf("verifyMib(): 'MIB_pcLowerThresholdLevParam': base=0x%x, addr=0x%x. value=0x%x\n",
+ (int) &mnetMib.pcLowerThresholdLevParam,
+ (int) &mnetMib.powerControlPackage.pcLowerThresholdLevParam,
+ (int) mnetMib.powerControlPackage.pcLowerThresholdLevParam));
+
+ DMSG("verify", printf("verifyMib(): 'MIB_pcLowerThresholdQualParam': base=0x%x, addr=0x%x. value=0x%x\n",
+ (int) &mnetMib.pcLowerThresholdQualParam,
+ (int) &mnetMib.powerControlPackage.pcLowerThresholdQualParam,
+ (int) mnetMib.powerControlPackage.pcLowerThresholdQualParam));
+
+ DMSG("verify", printf("verifyMib(): 'MIB_pcUpperThresholdLevParam': base=0x%x, addr=0x%x. value=0x%x\n",
+ (int) &mnetMib.pcUpperThresholdLevParam,
+ (int) &mnetMib.powerControlPackage.pcUpperThresholdLevParam,
+ (int) mnetMib.powerControlPackage.pcUpperThresholdLevParam));
+
+ DMSG("verify", printf("verifyMib(): 'MIB_pcUpperThresholdQualParam': base=0x%x, addr=0x%x. value=0x%x\n",
+ (int) &mnetMib.pcUpperThresholdQualParam,
+ (int) &mnetMib.powerControlPackage.pcUpperThresholdQualParam,
+ (int) mnetMib.powerControlPackage.pcUpperThresholdQualParam));
+
+ return 0;
+}
diff --git a/data/mnet/GP10/Host/snmp/src/vipertbl.c b/data/mnet/GP10/Host/snmp/src/vipertbl.c
new file mode 100644
index 0000000..fac1d89
--- /dev/null
+++ b/data/mnet/GP10/Host/snmp/src/vipertbl.c
@@ -0,0 +1,947 @@
+
+#include <mib.h>
+#include <snmpdefs.h>
+#include <snmpdLib.h>
+#include <ioLib.h>
+#include "mibhand.h"
+#include "vipermib.h" /* Get the MIB definitions. */
+#include "vipertbl.h" /* Control Table definitions. */
+
+Table *mnetMibDataTypeTable;
+int snmpRemoteIP;
+int snmpRemotePort;
+int snmpProxyIP = 0;
+
+MnetMib mnetMib;
+MnetMibIndex *mibFileIndex;
+MnetMibIndex mnetMibIndex[] = {
+ /* Basic package addresses. */
+ {MIB_btsBasicPackage, (void *)&mnetMib.btsBasicPackage,
+ sizeof(BtsBasicPackage), 0, 0 }, /* 0 */
+ {MIB_btsOptionsPackage, (void *)&mnetMib.btsOptionsPackage,
+ sizeof(BtsOptionsPackage), 0, 0 }, /* 1 */
+ {MIB_firstTransceiverPackage, (void *)&mnetMib.firstTransceiverPackage,
+ sizeof(FirstTransceiverPackage), 0, 0 }, /* 2 */
+ {MIB_secondTransceiverPackage, (void *)&mnetMib.secondTransceiverPackage,
+ sizeof(SecondTransceiverPackage), 0, 0 }, /* 3 */
+ {MIB_firstRadioCarrierPackage, (void *)&mnetMib.firstRadioCarrierPackage,
+ sizeof(FirstRadioCarrierPackage), 0, 0 }, /* 4 */
+ {MIB_secondRadioCarrierPackage, (void *)&mnetMib.secondRadioCarrierPackage,
+ sizeof(SecondRadioCarrierPackage), 0, 0 }, /* 5 */
+ {MIB_btsTimerPackage, (void *)&mnetMib.btsTimerPackage,
+ sizeof(BtsTimerPackage), 0, 0 }, /* 6 */
+ {MIB_t200, (void *)&mnetMib.t200,
+ sizeof(T200), 0, 0 }, /* 7 */
+ {MIB_t31xx, (void *)&mnetMib.t31xx,
+ sizeof(T31xx), 0, 0 }, /* 8 */
+ {MIB_adjacentCellPackage, (void *)&mnetMib.adjacentCellPackage,
+ sizeof(AdjacentCellPackage), 0, 0 }, /* 9 */
+ {MIB_frequencyHoppingPackage, (void *)&mnetMib.frequencyHoppingPackage,
+ sizeof(FrequencyHoppingPackage), 0, 0 }, /* 10 */
+ {MIB_handoverControlPackage, (void *)&mnetMib.handoverControlPackage,
+ sizeof(HandoverControlPackage), 0, 0 }, /* 11 */
+ {MIB_hoAveragingAdjCellParam, (void *)&mnetMib.hoAveragingAdjCellParam,
+ sizeof(HoAveragingAdjCellParam), 0, 0 }, /* 12 */
+ {MIB_hoAveragingDistParam, (void *)&mnetMib.hoAveragingDistParam,
+ sizeof(HoAveragingDistParam), 0, 0 }, /* 13 */
+ {MIB_hoAveragingLevParam, (void *)&mnetMib.hoAveragingLevParam,
+ sizeof(HoAveragingLevParam), 0, 0 }, /* 14 */
+ {MIB_hoAveragingQualParam, (void *)&mnetMib.hoAveragingQualParam,
+ sizeof(HoAveragingQualParam), 0, 0 }, /* 15 */
+ {MIB_hoThresholdDistParam, (void *)&mnetMib.hoThresholdDistParam,
+ sizeof(HoThresholdDistParam), 0, 0 }, /* 16 */
+ {MIB_hoThresholdInterfaceParam, (void *)&mnetMib.hoThresholdInterfaceParam,
+ sizeof(HoThresholdInterfaceParam), 0, 0 }, /* 17 */
+ {MIB_hoThresholdLevParam, (void *)&mnetMib.hoThresholdLevParam,
+ sizeof(HoThresholdLevParam), 0, 0 }, /* 18 */
+ {MIB_hoThresholdQualParam, (void *)&mnetMib.hoThresholdQualParam,
+ sizeof(HoThresholdQualParam), 0, 0 }, /* 19 */
+ {MIB_interferenceAveragingParam,(void *)&mnetMib.interferenceAveragingParam,
+ sizeof(InterferenceAveragingParam), 0, 0 }, /* 20 */
+ {MIB_powerControlPackage, (void *)&mnetMib.powerControlPackage,
+ sizeof(PowerControlPackage), 0, 0 }, /* 21 */
+ {MIB_pcAveragingLev, (void *)&mnetMib.pcAveragingLev,
+ sizeof(PcAveragingLev), 0, 0 }, /* 22 */
+ {MIB_pcAveragingQual, (void *)&mnetMib.pcAveragingQual,
+ sizeof(PcAveragingQual), 0, 0 }, /* 23 */
+ {MIB_pcLowerThresholdLevParam, (void *)&mnetMib.pcLowerThresholdLevParam,
+ sizeof(PcLowerThresholdLevParam), 0, 0 }, /* 24 */
+ {MIB_pcLowerThresholdQualParam, (void *)&mnetMib.pcLowerThresholdQualParam,
+ sizeof(PcLowerThresholdQualParam), 0, 0 }, /* 25 */
+ {MIB_pcUpperThresholdLevParam, (void *)&mnetMib.pcUpperThresholdLevParam,
+ sizeof(PcUpperThresholdLevParam), 0, 0 }, /* 26 */
+ {MIB_pcUpperThresholdQualParam, (void *)&mnetMib.pcUpperThresholdQualParam,
+ sizeof(PcUpperThresholdQualParam), 0, 0 }, /* 27 */
+ {MIB_cellMeasurmentPackage, (void *)&mnetMib.cellMeasurmentPackage,
+ sizeof(CellMeasurmentPackage), 0, 0 }, /* 28 */
+ {MIB_callControlMeasurmentPackage, (void *)&mnetMib.callControlMeasurmentPackage,
+ sizeof(CallControlMeasurmentPackage), 0, 0 },/* 29 */
+ {MIB_callConfigData, (void *)&mnetMib.callConfigData,
+ sizeof(CallConfigData), 0, 0 }, /* 30 */
+ {MIB_mobilityConfigData, (void *)&mnetMib.mobilityConfigData,
+ sizeof(MobilityConfigData), 0, 0 }, /* 31 */
+ {MIB_resourceConfigData, (void *)&mnetMib.resourceConfigData,
+ sizeof(ResourceConfigData), 0, 0 }, /* 32 */
+ {MIB_oamConfigData, (void *)&mnetMib.oamConfigData,
+ sizeof(OamConfigData), 0, 0 }, /* 33 */
+ {MIB_h323Data, (void *)&mnetMib.h323Data,
+ sizeof(H323Data), 0, 0 }, /* 34 */
+ {MIB_dualTRXSCard, (void *)&mnetMib.dualTRXSCard,
+ sizeof(DualTRXSCard), 0, 0 }, /* 35 */
+ {MIB_arfcnRssiFunction, (void *)&mnetMib.arfcnRssiFunction,
+ sizeof(ArfcnRssiFunction), 0, 0 }, /* 36 */
+ {MIB_clockCard, (void *)&mnetMib.clockCard,
+ sizeof(ClockCard), 0, 0 }, /* 37 */
+ {MIB_gpsCard, (void *)&mnetMib.gpsCard,
+ sizeof(GpsCard), 0, 0 }, /* 38 */
+ {MIB_powerCard, (void *)&mnetMib.powerCard,
+ sizeof(PowerCard), 0, 0 }, /* 39 */
+ {MIB_externalPowerSupply, (void *)&mnetMib.externalPowerSupply,
+ sizeof(ExternalPowerSupply), 0, 0 }, /* 40 */
+ {MIB_cdcBoard, (void *)&mnetMib.cdcBoard,
+ sizeof(CdcBoard), 0, 0 }, /* 41 */
+ {MIB_automaticParameterAllocation, (void *)&mnetMib.automaticParameterAllocation,
+ sizeof(AutomaticParameterAllocation), 0, 0 }, /* 42 */
+ {MIB_gp10MgmtInfoMib, (void *)&mnetMib.gp10MgmtInfoMib,
+ sizeof(Gp10MgmtInfoMib), 0, 0 }, /* 43 */
+ {MIB_maintenanceConfigData, (void *)&mnetMib.maintenanceConfigData,
+ sizeof(MaintenanceConfigData), 0, 0 }, /* 44 */
+ {MIB_gp10ErrorInfoMib, (void *)&mnetMib.gp10ErrorInfoMib,
+ sizeof(Gp10ErrorInfoMib), 0, 0 }, /* 45 */
+ {MIB_viperAccessMib, (void *)&mnetMib.viperAccessMib,
+ sizeof(ViperAccessMib), 0, 0 }, /* 46 */
+ {MIB_trapFwdData, (void *)&mnetMib.trapFwdData,
+ sizeof(TrapFwdData), 0, 0 }, /* 47 */
+
+ /* New Indexes to support Gs */
+ {MIB_btsGsBasicPackage, (void *)&mnetMib.btsGsBasicPackage,
+ sizeof(BtsGsBasicPackage), 0, 0 }, /* 48 */
+ {MIB_btsGsOptionPackage, (void *)&mnetMib.btsGsOptionPackage,
+ sizeof(BtsGsOptionPackage), 0, 0 }, /* 49 */
+ {MIB_rss, (void *)&mnetMib.rss,
+ sizeof(Rss), 0, 0 }, /* 50 */
+ {MIB_rlcMac, (void *)&mnetMib.rlcMac,
+ sizeof(RlcMac), 0, 0 }, /* 51 */
+ {MIB_bssgp, (void *)&mnetMib.bssgp,
+ sizeof(Bssgp), 0, 0 }, /* 52 */
+ {MIB_btsGsMeasPackage, (void *)&mnetMib.btsGsMeasPackage,
+ sizeof(BtsGsMeasPackage), 0, 0 }, /* 53 */
+
+ {MIB_gp10CdrMib, (void *) &mnetMib.gp10CdrMib,
+ sizeof(Gp10CdrMib), 0, 0 }, /* 54 */
+
+ {MIB_handoverTimerMib, (void *) &mnetMib.handoverTimerMib,
+ sizeof(HandoverTimerMib), 0, 0}, /* 55 */
+
+ {MIB_gp10ServiceStatusMib, (void *) &mnetMib.gp10ServiceStatusMib,
+ sizeof(Gp10ServiceStatusMib), 0, 0}, /* 56 */
+
+ {MIB_cellAllocationTable, 0, /* Start of Table */
+ sizeof(CellAllocationEntry), CellAllocationTableLimit, 0}, /* Descriptors. */
+ {MIB_plmnPermittedTable, 0,
+ sizeof(PlmnPermittedEntry), PlmnPermittedTableLimit, 0},
+ {MIB_notAllowedAccessClassTable, 0,
+ sizeof(NotAllowedAccessClassEntry), NotAllowedAccessClassTableLimit, 0},
+ {MIB_channel_0_Table, 0,
+ sizeof(ChannelEntry), ChannelTableLimit, 0},
+ {MIB_channel_1_Table, 0,
+ sizeof(ChannelEntry), ChannelTableLimit, 0},
+ {MIB_carrierFrequency_0_Table, 0,
+ sizeof(CarrierFrequencyEntry), CarrierFrequencyTableLimit, 0},
+ {MIB_carrierFrequency_1_Table, 0,
+ sizeof(CarrierFrequencyEntry), CarrierFrequencyTableLimit, 0},
+ {MIB_adjCell_handoverTable, 0,
+ sizeof(AdjCell_HandoverEntry), HandoverTableLimit, 0},
+ {MIB_adjCell_reselectionTable, 0,
+ sizeof(AdjCell_ReselectionEntry), ReselectionTableLimit, 0},
+ {MIB_mobileAllocationTable, 0,
+ sizeof(MobileAllocationEntry), MobileAllocationTableLimit, 0},
+ {MIB_attImmediateAssingProcsPerCauseTable, 0,
+ sizeof (AttImmediateAssingProcsPerCauseEntry), AttImmediateAssingProcsPerCauseTableLimit, 0},
+ {MIB_succImmediateAssingProcsPerCauseTable, 0,
+ sizeof (SuccImmediateAssingProcsPerCauseEntry), SuccImmediateAssingProcsPerCauseTableLimit, 0},
+ {MIB_externalHDOsPerCauseTable, 0,
+ sizeof (ExternalHDOsPerCauseEntry), ExternalHDOsPerCauseTableLimit, 0},
+ {MIB_arfcnRssiClockControlTable, 0,
+ sizeof(ArfcnRssiClockControlEntry), ArfcnRssiClockControlTableLimit, 0},
+ {MIB_apaInvalidFrequencyTable, 0,
+ sizeof(ApaInvalidFrequencyEntry), ApaInvalidFrequencyTableLimit, 0},
+ {MIB_apaClockSourceFrequencyTable, 0,
+ sizeof(ApaClockSourceFrequencyEntry), ApaClockSourceFrequencyTableLimit, 0},
+ {MIB_trapFwdTable, 0,
+ sizeof(TrapFwdEntry), TrapFwdTableLimit, 0},
+
+ /* New Tables to support Gs */
+ {MIB_ncFrequencyListTable, 0,
+ sizeof(NcFrequencyListEntry), NcFrequencyListTableLimit, 0},
+
+ /* String buffers. */
+ {MIB_oamAlternateMibFileName, 0, SIZE_DisplayString, 0, 0},
+ {MIB_oamCommandLastError, 0, SIZE_DisplayString, 0, 0},
+
+ {MIB_trxSerialNumber, 0, SIZE_DisplayString, 0, 0},
+ {MIB_trxSoftwareVersion, 0, SIZE_DisplayString, 0, 0},
+ {MIB_clockCardSoftwareVersion, 0, SIZE_DisplayString, 0, 0},
+ {MIB_clockCardCrystalUpTime, 0, SIZE_DisplayString, 0, 0},
+ {MIB_gpsCardSoftwareVersion, 0, SIZE_DisplayString, 0, 0},
+ {MIB_gpsPosition, 0, SIZE_DisplayString, 0, 0},
+ {MIB_gpsTime, 0, SIZE_DisplayString, 0, 0},
+ {MIB_utcTime, 0, SIZE_DisplayString, 0, 0},
+ {MIB_cdcBoardSerialNumber, 0, SIZE_DisplayString, 0, 0},
+ {MIB_cdcBoardMACAddress, 0, SIZE_DisplayString, 0, 0},
+ {MIB_viperCellName, 0, SIZE_DisplayString, 0, 0},
+ {MIB_viperCellLocation, 0, SIZE_DisplayString, 0, 0},
+ {MIB_viperCellSerialNumber, 0, SIZE_DisplayString, 0, 0},
+ {MIB_viperCellAssetNumber, 0, SIZE_DisplayString, 0, 0},
+ {MIB_viperCellSoftwareBuild, 0, SIZE_DisplayString, 0, 0},
+ {MIB_viperCellCustomerName, 0, SIZE_DisplayString, 0, 0},
+ {MIB_viperCellCustomerAddress, 0, SIZE_DisplayString, 0, 0},
+ {MIB_viperCellCustomerPhone, 0, SIZE_DisplayString, 0, 0},
+ {MIB_viperCellCustomerEmail, 0, SIZE_DisplayString, 0, 0},
+ {MIB_viperCellCustomerInfo, 0, SIZE_DisplayString, 0, 0},
+ {MIB_maintenance_operation, 0, SIZE_DisplayString, 0, 0},
+ {MIB_maintenance_response, 0, SIZE_DisplayString, 0, 0},
+ {MIB_readCommunity, 0, SIZE_DisplayString, 0, 0},
+ {MIB_writeCommunity, 0, SIZE_DisplayString, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+OidPrefix oidPrefix[] = {
+ {MIB_btsBasicPackage, "1.3.6.1.4.1.3583.1.1.1"}, /* 0 */
+ {MIB_btsOptionsPackage, "1.3.6.1.4.1.3583.1.1.2"}, /* 1 */
+ {MIB_firstTransceiverPackage, "1.3.6.1.4.1.3583.1.1.3"}, /* 2 */
+ {MIB_secondTransceiverPackage, "1.3.6.1.4.1.3583.1.1.4"}, /* 3 */
+ {MIB_firstRadioCarrierPackage, "1.3.6.1.4.1.3583.1.1.5"}, /* 4 */
+ {MIB_secondRadioCarrierPackage, "1.3.6.1.4.1.3583.1.1.6"}, /* 5 */
+ {MIB_btsTimerPackage, "1.3.6.1.4.1.3583.1.1.7"}, /* 6 */
+ {MIB_t200, "1.3.6.1.4.1.3583.1.1.7.1"}, /* 7 */
+ {MIB_t31xx, "1.3.6.1.4.1.3583.1.1.7.2"}, /* 8 */
+ {MIB_adjacentCellPackage, "1.3.6.1.4.1.3583.1.1.8"}, /* 9 */
+ {MIB_frequencyHoppingPackage, "1.3.6.1.4.1.3583.1.1.9"}, /* 10 */
+ {MIB_handoverControlPackage, "1.3.6.1.4.1.3583.1.1.10"}, /* 11 */
+ {MIB_hoAveragingAdjCellParam, "1.3.6.1.4.1.3583.1.1.10.3"}, /* 12 */
+ {MIB_hoAveragingDistParam, "1.3.6.1.4.1.3583.1.1.10.4"}, /* 13 */
+ {MIB_hoAveragingLevParam, "1.3.6.1.4.1.3583.1.1.10.5"}, /* 14 */
+ {MIB_hoAveragingQualParam, "1.3.6.1.4.1.3583.1.1.10.6"}, /* 15 */
+ {MIB_hoThresholdDistParam, "1.3.6.1.4.1.3583.1.1.10.8"}, /* 16 */
+ {MIB_hoThresholdInterfaceParam, "1.3.6.1.4.1.3583.1.1.10.9"}, /* 17 */
+ {MIB_hoThresholdLevParam, "1.3.6.1.4.1.3583.1.1.10.10"}, /* 18 */
+ {MIB_hoThresholdQualParam, "1.3.6.1.4.1.3583.1.1.10.11"}, /* 19 */
+ {MIB_interferenceAveragingParam, "1.3.6.1.4.1.3583.1.1.10.12"}, /* 20 */
+ {MIB_powerControlPackage, "1.3.6.1.4.1.3583.1.1.11" }, /* 21 */
+ {MIB_pcAveragingLev, "1.3.6.1.4.1.3583.1.1.11.1"}, /* 22 */
+ {MIB_pcAveragingQual, "1.3.6.1.4.1.3583.1.1.11.2"}, /* 23 */
+ {MIB_pcLowerThresholdLevParam, "1.3.6.1.4.1.3583.1.1.11.3"}, /* 24 */
+ {MIB_pcLowerThresholdQualParam, "1.3.6.1.4.1.3583.1.1.11.4"}, /* 25 */
+ {MIB_pcUpperThresholdLevParam, "1.3.6.1.4.1.3583.1.1.11.5"}, /* 26 */
+ {MIB_pcUpperThresholdQualParam, "1.3.6.1.4.1.3583.1.1.11.6"}, /* 27 */
+ {MIB_cellMeasurmentPackage, "1.3.6.1.4.1.3583.1.1.12"}, /* 28 */
+ {MIB_callControlMeasurmentPackage, "1.3.6.1.4.1.3583.1.1.13"}, /* 29 */
+ {MIB_callConfigData, "1.3.6.1.4.1.3583.1.3.1"}, /* 30 */
+ {MIB_mobilityConfigData, "1.3.6.1.4.1.3583.1.3.2"}, /* 31 */
+ {MIB_resourceConfigData, "1.3.6.1.4.1.3583.1.3.3"}, /* 32 */
+ {MIB_oamConfigData, "1.3.6.1.4.1.3583.1.3.4"}, /* 33 */
+ {MIB_h323Data, "1.3.6.1.4.1.3583.1.2"}, /* 34 */
+ {MIB_dualTRXSCard, "1.3.6.1.4.1.3583.1.4.1"}, /* 35 */
+ {MIB_arfcnRssiFunction, "1.3.6.1.4.1.3583.1.4.2"}, /* 36 */
+ {MIB_clockCard, "1.3.6.1.4.1.3583.1.4.3"}, /* 37 */
+ {MIB_gpsCard, "1.3.6.1.4.1.3583.1.4.4"}, /* 38 */
+ {MIB_powerCard, "1.3.6.1.4.1.3583.1.4.5"}, /* 39 */
+ {MIB_externalPowerSupply, "1.3.6.1.4.1.3583.1.4.6"}, /* 40 */
+ {MIB_cdcBoard, "1.3.6.1.4.1.3583.1.4.7"}, /* 41 */
+ {MIB_automaticParameterAllocation, "1.3.6.1.4.1.3583.1.4.8"}, /* 42 */
+ {MIB_gp10MgmtInfoMib, "1.3.6.1.4.1.3583.1.5"}, /* 43 */
+ {MIB_maintenanceConfigData, "1.3.6.1.4.1.3583.1.3.5"}, /* 44 */
+ {MIB_gp10ErrorInfoMib, "1.3.6.1.4.1.3583.1.6"}, /* 45 */
+ {MIB_viperAccessMib, "1.3.6.1.4.1.3583.3"}, /* 46 */
+ {MIB_trapFwdData, "1.3.6.1.4.1.3583.1.3.6"}, /* 47 */
+
+ /* New OIDs to support GS */
+ {MIB_btsGsBasicPackage, "1.3.6.1.4.1.3583.1.7.1"}, /* 48 */
+ {MIB_btsGsOptionPackage, "1.3.6.1.4.1.3583.1.7.2"}, /* 49 */
+ {MIB_rss, "1.3.6.1.4.1.3583.1.7.3.1"}, /* 50 */
+ {MIB_rlcMac, "1.3.6.1.4.1.3583.1.7.3.2"}, /* 51 */
+ {MIB_bssgp, "1.3.6.1.4.1.3583.1.7.3.3"}, /* 52 */
+ {MIB_btsGsMeasPackage, "1.3.6.1.4.1.3583.1.7.4"}, /* 53 */
+ {MIB_gp10CdrMib, "1.3.6.1.4.1.3583.1.8"}, /* 54 */
+ {MIB_handoverTimerMib, "1.3.6.1.4.1.3583.1.9"}, /* 55 */
+ {MIB_gp10ServiceStatusMib, "1.3.6.1.4.1.3583.1.10"}, /* 56 */
+
+ {0, 0}
+};
+
+#if 0
+Mib2Access mib2Access[] = {
+ {} /* 0 = System */
+ {} /* 1 = Interfaces */
+ {} /* 2 = At */
+ {} /* 3 = Ip */
+ {} /* 4 = Icmp */
+ {} /* 5 = Tcp */
+ {} /* 6 = Udp */
+ {} /* 7 = Egp */
+ {} /* 8 = Transmisison */
+ {} /* 9 = Snmp */
+ {0,0}
+}
+#endif
+
+/* WARNING!! At runtime, this table gets sorted to permit more efficient access. */
+
+MnetMibDataType mnetMibDataType[] = {
+ DTYPE (MIB_btsBasicPackage, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_bts_ncc, TYPE_NetworkColourCode, 0, 0),
+ DTYPE (MIB_bts_cid, TYPE_CellIdentity, 0, 0),
+ DTYPE (MIB_btsID, TYPE_GSMGeneralObjectID, 0, 0),
+ DTYPE (MIB_cellAllocationTable, TYPE_TablePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_cellAllocationEntry, TYPE_TableEntryPointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_cellAllocationIndex, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_cellAllocation, TYPE_AbsoluteRFChannelNo, 0, 0),
+ DTYPE (MIB_gsmdcsIndicator, TYPE_GsmdcsIndicator, 0, 0),
+ DTYPE (MIB_bts_mcc, TYPE_MobileCountryCode, 0, 0),
+ DTYPE (MIB_bts_mnc, TYPE_MobileNetworkCode, 0, 0),
+ DTYPE (MIB_bts_lac, TYPE_LocationAreaCode, 0, 0),
+ DTYPE (MIB_bts_ci, TYPE_CellIdentity, 0, 0),
+ DTYPE (MIB_cellReselectHysteresis, TYPE_CellReselectHysteresis, 7, 0),
+ DTYPE (MIB_ny1, TYPE_Ny1, 3, 0),
+ DTYPE (MIB_plmnPermittedTable, TYPE_TablePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_plmnPermittedEntry, TYPE_TableEntryPointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_plmnPermittedIndex, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_plmnPermitted, TYPE_PlmnPermitted, 0, 0),
+ DTYPE (MIB_radioLinkTimeout, TYPE_RadioLinkTimeout, 4, 0), /* aloha 15 */
+ DTYPE (MIB_relatedTranscoder, TYPE_GSMGeneralObjectID, 0, 0),
+ DTYPE (MIB_rxLevAccessMin, TYPE_RxLev, 10, 0),
+ DTYPE (MIB_bts_administrativeState, TYPE_AdministrativeState, 0, 0),
+ DTYPE (MIB_bts_alarmStatus, TYPE_AlarmStatus, 0, 0),
+ DTYPE (MIB_bts_operationalState, TYPE_OperationalState, 0, 0),
+ DTYPE (MIB_maxNumberRetransmissions, TYPE_MaxRetrans, 4, 0),
+ DTYPE (MIB_mSTxPwrMaxCCH, TYPE_TxPower, 0, 0),
+ DTYPE (MIB_numberOfSlotsSpreadTrans, TYPE_TxInteger, 12, 0),
+ DTYPE (MIB_noOfBlocksForAccessGrant, TYPE_NoOfBlocksForAccessGrant, 0, 0),
+ DTYPE (MIB_noOfMultiframesBetweenPaging, TYPE_NoOfMultiframesBetweenPaging, 9, 0),
+ DTYPE (MIB_btsOptionsPackage, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_allowIMSIAttachDetach, TYPE_Boolean, 1, 0),
+ DTYPE (MIB_callReestablishmentAllowed, TYPE_Boolean, 1, 0),
+ DTYPE (MIB_cellBarred, TYPE_Boolean, 0, 0),
+ DTYPE (MIB_dtxDownlink, TYPE_Boolean, 0, 0),
+ DTYPE (MIB_dtxUplink, TYPE_DtxUplink, 2, 0),
+ DTYPE (MIB_emergencyCallRestricted, TYPE_Boolean, 0, 0),
+ DTYPE (MIB_notAllowedAccessClassTable, TYPE_TablePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_notAllowedAccessClassEntry, TYPE_TableEntryPointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_notAllowedAccessClassIndex, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_notAllowedAccessClass, TYPE_ClassNumber, 0, 0),
+ DTYPE (MIB_timerPeriodicUpdateMS, TYPE_TimerPeriodicUpdateMS, 30, 0),
+ DTYPE (MIB_maxQueueLength, TYPE_MaxQueueLength, 0, 0),
+ DTYPE (MIB_msPriorityUsedInQueueing, TYPE_Boolean, 0, 0),
+ DTYPE (MIB_timeLimitCall, TYPE_QueueTimeLimit, 0, 0),
+ DTYPE (MIB_timeLimitHandover, TYPE_QueueTimeLimit, 0, 0),
+ DTYPE (MIB_firstTransceiverPackage, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_basebandTransceiverID_0, TYPE_GSMGeneralObjectID, 0, 0),
+ DTYPE (MIB_relatedRadioCarrier_0, TYPE_GSMGeneralObjectID, 0, 0),
+ DTYPE (MIB_basebandAdministrativeState_0, TYPE_AdministrativeState, 0, 0),
+ DTYPE (MIB_basebandAlarmStatus_0, TYPE_AlarmStatus, 0, 0),
+ DTYPE (MIB_basebandOperationalState_0, TYPE_OperationalState, 0, 0),
+ DTYPE (MIB_channel_0_Table, TYPE_TablePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_channel_0_Entry, TYPE_TableEntryPointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_channelIndex_0, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_channelID_0, TYPE_ChannelID, 0, 0),
+ DTYPE (MIBT_channelCombination_0, TYPE_ChannelCombination, 0, 0),
+ DTYPE (MIBT_channelFrequencyUsage_0, TYPE_FrequencyUsage, 0, 0),
+ DTYPE (MIBT_channelTsc_0, TYPE_Tsc, 0, 0),
+ DTYPE (MIBT_channelAdministrativeState_0, TYPE_AdministrativeState, 0, 0),
+ DTYPE (MIBT_channelOperationalState_0, TYPE_OperationalState, 0, 0),
+ DTYPE (MIB_secondTransceiverPackage, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_basebandTransceiverID_1, TYPE_GSMGeneralObjectID, 0, 0),
+ DTYPE (MIB_relatedRadioCarrier_1, TYPE_GSMGeneralObjectID, 0, 0),
+ DTYPE (MIB_basebandAdministrativeState_1, TYPE_AdministrativeState, 0, 0),
+ DTYPE (MIB_basebandAlarmStatus_1, TYPE_AlarmStatus, 0, 0),
+ DTYPE (MIB_basebandOperationalState_1, TYPE_OperationalState, 0, 0),
+ DTYPE (MIB_channel_1_Table, TYPE_TablePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_channel_1_Entry, TYPE_TableEntryPointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_channelIndex_1, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_channelID_1, TYPE_ChannelID, 0, 0),
+ DTYPE (MIBT_channelCombination_1, TYPE_ChannelCombination, 0, 0),
+ DTYPE (MIBT_channelFrequencyUsage_1, TYPE_FrequencyUsage, 0, 0),
+ DTYPE (MIBT_channelTsc_1, TYPE_Tsc, 0, 0),
+ DTYPE (MIBT_channelAdministrativeState_1, TYPE_AdministrativeState, 0, 0),
+ DTYPE (MIBT_channelOperationalState_1, TYPE_OperationalState, 0, 0),
+ DTYPE (MIB_firstRadioCarrierPackage, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_carrierFrequency_0_Table, TYPE_TablePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_carrierFrequency_0_Entry, TYPE_TableEntryPointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_carrierFrequencyIndex_0, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_carrierFrequency_0, TYPE_AbsoluteRFChannelNo, 0, 0),
+ DTYPE (MIB_powerClass_0, TYPE_PowerClass, 2, 0),
+ DTYPE (MIB_radioCarrierID_0, TYPE_GSMGeneralObjectID, 0, 0),
+ DTYPE (MIB_txPwrMaxReduction_0, TYPE_TxPwrMaxReduction, 0, 0),
+ DTYPE (MIB_carrier_administrativeState_0, TYPE_AdministrativeState, 0, 0),
+ DTYPE (MIB_carrier_alarmStatus_0, TYPE_AlarmStatus, 0, 0),
+ DTYPE (MIB_carrier_operationalState_0, TYPE_OperationalState, 0, 0),
+ DTYPE (MIB_secondRadioCarrierPackage, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_carrierFrequency_1_Table, TYPE_TablePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_carrierFrequency_1_Entry, TYPE_TableEntryPointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_carrierFrequencyIndex_1, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_carrierFrequency_1, TYPE_AbsoluteRFChannelNo, 0, 0),
+ DTYPE (MIB_powerClass_1, TYPE_PowerClass, 2, 0),
+ DTYPE (MIB_radioCarrierID_1, TYPE_GSMGeneralObjectID, 0, 0),
+ DTYPE (MIB_txPwrMaxReduction_1, TYPE_TxPwrMaxReduction, 0, 0),
+ DTYPE (MIB_carrier_administrativeState_1, TYPE_AdministrativeState, 0, 0),
+ DTYPE (MIB_carrier_alarmStatus_1, TYPE_AlarmStatus, 0, 0),
+ DTYPE (MIB_carrier_operationalState_1, TYPE_OperationalState, 0, 0),
+ DTYPE (MIB_btsTimerPackage, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_t200, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_sdcchSAPI0, TYPE_L2Timer, 103, 0),
+ DTYPE (MIB_facchTCHF, TYPE_L2Timer, 77, 0),
+ DTYPE (MIB_facchTCHH, TYPE_L2Timer, 77, 0),
+ DTYPE (MIB_sacchTCHSAPI0, TYPE_L2Timer, 448, 0),
+ DTYPE (MIB_sacchSDCCH, TYPE_L2Timer, 448, 0),
+ DTYPE (MIB_sdcchSAPI3, TYPE_L2Timer, 103, 0),
+ DTYPE (MIB_sdcchTCHSAPI3, TYPE_L2Timer, 103, 0),
+
+ DTYPE (MIB_handoverTimerMib, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_t101, TYPE_INTEGER, 200, 0),
+ DTYPE (MIB_t102, TYPE_INTEGER, 500, 0),
+ DTYPE (MIB_t103, TYPE_INTEGER, 2000, 0),
+ DTYPE (MIB_t104, TYPE_INTEGER, 2000, 0),
+ DTYPE (MIB_t201, TYPE_INTEGER, 200, 0),
+ DTYPE (MIB_t202, TYPE_INTEGER, 500, 0),
+ DTYPE (MIB_t204, TYPE_INTEGER, 2000, 0),
+ DTYPE (MIB_t210, TYPE_INTEGER, 500, 0),
+ DTYPE (MIB_t211, TYPE_INTEGER, 2000, 0),
+
+ DTYPE (MIB_gp10ServiceStatusMib, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_snmpServiceEnabled, TYPE_INTEGER, 1, 0),
+ DTYPE (MIB_httpServiceEnabled, TYPE_INTEGER, 1, 0),
+ DTYPE (MIB_telnetServiceEnabled, TYPE_INTEGER, 1, 0),
+ DTYPE (MIB_sshServiceEnabled, TYPE_INTEGER, 1, 0),
+ DTYPE (MIB_ftpServiceEnabled, TYPE_INTEGER, 1, 0),
+
+ DTYPE (MIB_t31xx, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_t3101, TYPE_L3Timer, 767, 0),
+ DTYPE (MIB_t3103, TYPE_L3Timer, 0, 0),
+ DTYPE (MIB_t3105, TYPE_L3Timer, 1023, 0),
+ DTYPE (MIB_t3107, TYPE_L3Timer, 0, 0),
+ DTYPE (MIB_t3109, TYPE_L3Timer, 511, 0),
+ DTYPE (MIB_t3111, TYPE_L3Timer, 767, 0),
+ DTYPE (MIB_t3113, TYPE_L3Timer, 1800, 0),
+ DTYPE (MIB_adjacentCellPackage, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_adjCell_handoverTable, TYPE_TablePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_adjCell_handoverEntry, TYPE_TableEntryPointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_adjCell_handoverIndex, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_adjCell_handoverCellID, TYPE_GSMGeneralObjectID, 0, 0),
+ DTYPE (MIBT_adjCell_mcc, TYPE_MobileCountryCode, 0, 0),
+ DTYPE (MIBT_adjCell_mnc, TYPE_MobileNetworkCode, 0, 0),
+ DTYPE (MIBT_adjCell_lac, TYPE_LocationAreaCode, 0, 0),
+ DTYPE (MIBT_adjCell_ci, TYPE_CellIdentity, 0, 0),
+ DTYPE (MIBT_adjCell_bCCHFrequency, TYPE_AbsoluteRFChannelNo, 0, 0),
+ DTYPE (MIBT_adjCell_ncc, TYPE_NetworkColourCode, 0, 0),
+ DTYPE (MIBT_adjCell_cid, TYPE_CellIdentity, 0, 0),
+ DTYPE (MIBT_adjCell_synchronized, TYPE_Boolean, 0, 0),
+ DTYPE (MIBT_adjCell_hoPriorityLevel, TYPE_HoPriorityLevel, 0, 0),
+ DTYPE (MIBT_adjCell_hoMargin, TYPE_HoMargin, 0, 0),
+ DTYPE (MIBT_adjCell_msTxPwrMaxCell, TYPE_TxPower, 0, 0),
+ DTYPE (MIBT_adjCell_rxLevMinCell, TYPE_RxLev, 0, 0),
+ DTYPE (MIBT_adjCell_isExternal, TYPE_Boolean, 0, 0),
+ DTYPE (MIB_adjCell_reselectionTable, TYPE_TablePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_adjCell_reselectionEntry, TYPE_TableEntryPointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_adjCell_reselectionIndex, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_adjCell_reselectionCellID, TYPE_GSMGeneralObjectID, 0, 0),
+ DTYPE (MIBT_adjCell_reselectionBCCHFrequency, TYPE_AbsoluteRFChannelNo, 0, 0),
+ DTYPE (MIB_frequencyHoppingPackage, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_frequencyHoppingSystemID, TYPE_GSMGeneralObjectID, 0, 0),
+ DTYPE (MIB_hoppingSequenceNumber, TYPE_HoppingSequenceNumber, 0, 0),
+ DTYPE (MIB_mobileAllocationTable, TYPE_TablePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_mobileAllocationEntry, TYPE_TableEntryPointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_mobileAllocationIndex, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_mobileAllocation, TYPE_AbsoluteRFChannelNo, 0, 0),
+ DTYPE (MIB_handoverControlPackage, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_handoverControlID, TYPE_GSMGeneralObjectID, 0, 0),
+ DTYPE (MIB_enableOptHandoverProcessing, TYPE_EnableHoType, 0, 0),
+ DTYPE (MIB_hoAveragingAdjCellParam, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_hoAveragingAdjCellParamHreqave, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_hoAveragingAdjCellParamHreqt, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_hoAveragingAdjCellParamWeighting, TYPE_Weighting, 0, 0),
+ DTYPE (MIB_hoAveragingDistParam, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_hoAveragingDistParamHreqave, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_hoAveragingDistParamHreqt, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_hoAveragingLevParam, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_hoAveragingLevParamHreqave, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_hoAveragingLevParamHreqt, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_hoAveragingLevParamWeighting, TYPE_Weighting, 0, 0),
+ DTYPE (MIB_hoAveragingQualParam, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_hoAveragingQualParamHreqave, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_hoAveragingQualParamHreqt, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_hoAveragingQualParamWeighting, TYPE_Weighting, 0, 0),
+ DTYPE (MIB_hoMarginDef, TYPE_HoMargin, 6, 0), /* aloha 0 */
+ DTYPE (MIB_hoThresholdDistParam, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_hoThresholdDistParamTimeadv, TYPE_MSRangeMax, 0, 0),
+ DTYPE (MIB_hoThresholdDistParamP8, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_hoThresholdDistParamN8, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_hoThresholdInterfaceParam, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_hoThresholdInterfaceParamRxLevelUL, TYPE_RxLev, 0, 0),
+ DTYPE (MIB_hoThresholdInterfaceParamRxLevelDL, TYPE_RxLev, 0, 0),
+ DTYPE (MIB_hoThresholdInterfaceParamPx, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_hoThresholdInterfaceParamNx, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_hoThresholdLevParam, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_hoThresholdLevParamRxLevelUL, TYPE_RxLev, 0, 0),
+ DTYPE (MIB_hoThresholdLevParamRxLevelDL, TYPE_RxLev, 0, 0),
+ DTYPE (MIB_hoThresholdLevParamPx, TYPE_AveragingNumber, 6, 0),
+ DTYPE (MIB_hoThresholdLevParamNx, TYPE_AveragingNumber, 8, 0),
+ DTYPE (MIB_hoThresholdQualParam, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_hoThresholdQualParamRxQualUL, TYPE_RxQual, 0, 0),
+ DTYPE (MIB_hoThresholdQualParamRxQualDL, TYPE_RxQual, 0, 0),
+ DTYPE (MIB_hoThresholdQualParamPx, TYPE_AveragingNumber, 3, 0),
+ DTYPE (MIB_hoThresholdQualParamNx, TYPE_AveragingNumber, 3, 0),
+ DTYPE (MIB_interferenceAveragingParam, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_interferenceAveragingParamAveragingPeriod, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_interferenceAveragingParamThresholdBoundary0, TYPE_RxLev, 0, 0),
+ DTYPE (MIB_interferenceAveragingParamThresholdBoundary1, TYPE_RxLev, 0, 0),
+ DTYPE (MIB_interferenceAveragingParamThresholdBoundary2, TYPE_RxLev, 0, 0),
+ DTYPE (MIB_interferenceAveragingParamThresholdBoundary3, TYPE_RxLev, 0, 0),
+ DTYPE (MIB_interferenceAveragingParamThresholdBoundary4, TYPE_RxLev, 0, 0),
+ DTYPE (MIB_interferenceAveragingParamThresholdBoundary5, TYPE_RxLev, 0, 0),
+ DTYPE (MIB_msTxPwrMaxCellDef, TYPE_TxPower, 0, 0),
+ DTYPE (MIB_rxLevMinCellDef, TYPE_RxLev, 0, 0),
+ DTYPE (MIB_powerControlPackage, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_pcAveragingLev, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_pcAveragingLevHreqave, TYPE_AveragingNumber, 2, 0),
+ DTYPE (MIB_pcAveragingLevHreqt, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_pcAveragingLevWeighting, TYPE_Weighting, 0, 0),
+ DTYPE (MIB_pcAveragingQual, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_pcAveragingQualHreqave, TYPE_AveragingNumber, 2, 0),
+ DTYPE (MIB_pcAveragingQualHreqt, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_pcAveragingQualWeighting, TYPE_Weighting, 0, 0),
+ DTYPE (MIB_pcLowerThresholdLevParam, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_pcLowerThresholdLevParamRxLevelUL, TYPE_RxLev, 0, 0),
+ DTYPE (MIB_pcLowerThresholdLevParamRxLevelDL, TYPE_RxLev, 0, 0),
+ DTYPE (MIB_pcLowerThresholdLevParamPx, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_pcLowerThresholdLevParamNx, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_pcLowerThresholdQualParam, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_pcLowerThresholdQualParamRxQualUL, TYPE_RxQual, 0, 0),
+ DTYPE (MIB_pcLowerThresholdQualParamRxQualDL, TYPE_RxQual, 0, 0),
+ DTYPE (MIB_pcLowerThresholdQualParamPx, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_pcLowerThresholdQualParamNx, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_pcUpperThresholdLevParam, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_pcUpperThresholdLevParamRxLevelUL, TYPE_RxLev, 0, 0),
+ DTYPE (MIB_pcUpperThresholdLevParamRxLevelDL, TYPE_RxLev, 0, 0),
+ DTYPE (MIB_pcUpperThresholdLevParamPx, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_pcUpperThresholdLevParamNx, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_pcUpperThresholdQualParam, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_pcUpperThresholdQualParamRxQualUL, TYPE_RxQual, 0, 0),
+ DTYPE (MIB_pcUpperThresholdQualParamRxQualDL, TYPE_RxQual, 0, 0),
+ DTYPE (MIB_pcUpperThresholdQualParamPx, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_pcUpperThresholdQualParamNx, TYPE_AveragingNumber, 0, 0),
+ DTYPE (MIB_powerControlInterval, TYPE_PowerControlInterval, 0, 0),
+ DTYPE (MIB_powerIncrStepSize, TYPE_PowerIncrStepSize, 0, 0),
+ DTYPE (MIB_powerRedStepSize, TYPE_PowerRedStepSize, 0, 0),
+ DTYPE (MIB_cellMeasurmentPackage, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_meanPCHAGCHQueueLength, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_attTransOfPagingMessagesThePCH, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_unsuccTransOfPagingMessagesThePCH, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_attImmediateAssingProcs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_succImmediateAssingProcs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_attImmediateAssingProcsPerCauseTable, TYPE_TablePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_attImmediateAssingProcsPerCauseEntry, TYPE_TableEntryPointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_attImmediateAssingProcsCause, TYPE_CauseCode, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_attImmediateAssingProcsValue, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_succImmediateAssingProcsPerCauseTable, TYPE_TablePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_succImmediateAssingProcsPerCauseEntry, TYPE_TableEntryPointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_succImmediateAssingProcsCause, TYPE_CauseCode, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_succImmediateAssingProcsValue, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_nbrOfPagesDiscardedFromPCHQueue, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_meanDurationOfSuccPagingProcs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_nbrOfAvailableTCHs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_meanNbrOfBusyTCHs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_maxNbrOfBusyTCHs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_meanNbrOfIdleTCHsPerInterferenceBand, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_attTCHSeizures, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_succTCHSeizures, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_attTCHSeizuresMeetingTCHBlockedState, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_allAvailableTCHAllocatedTime, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_meanTCHBusyTime, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_meanTCHQueueLength, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_nbrOfLostRadioLinksTCH, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_nbrOfAvailableSDCCHs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_meanNbrOfBusySDCCHs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_maxNbrOfBusySDCCHs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_attSDCCHSeizuresMeetingSDCCHBlockedState, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_allAvailableSDCCHAllocatedTime, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_meanSDCCHQueueLength, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_nbrOfLostRadioLinksSDCCH, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_relativeTimeDLPowerControlAtMax, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_relativeTimeULPowerControlAtMax, TYPE_INTEGER, 0, 0),
+#if THESE_ARE_NOT_USED_IN_VIPERCELL
+ DTYPE (MIB_succInternalHDOsIntraCell, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_unsuccInternalHDOsIntraCell, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_attIncomingInternalInterCellHDOs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_succIncomingInternalInterCellHDOs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_attOutgoingInternalInterCellHDOs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_succOutgoingInternalInterCellHDOs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_unsuccHDOsWithReconnection, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_unsuccHDOsWithLossOfConnection, TYPE_INTEGER, 0, 0),
+#endif
+ DTYPE (MIB_callControlMeasurmentPackage, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_nbrOfClassMarkUpdates, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_attMobileOriginatingCalls, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_succMobileOriginatingCalls, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_ansMobileOriginatingCalls, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_attMobileTerminatingCalls, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_succMobileTerminatingCalls, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_ansMobileTerminatingCalls, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_attMobileEmergencyCalls, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_succMobileEmergencyCalls, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_ansMobileEmergencyCalls, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_attCipheringModeControlProcs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_succCipheringModeControlProcs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_attInterrogationOfHLRsForRouting, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_succInterrogationOfHLRsMSRNObtained, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_succInterrogationOfHLRsCallForwarding, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_attOpForMobileOriginatingPointToPointSMs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_succOpForMobileOriginatingPointToPointSMs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_attOpForMobileTerminatingPointToPointSMs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_succOpForMobileTerminatingPointToPointSMs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_meanTimeToCallSetupService, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_meanTimeToLocationUpdateService, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_transSubIdentifiedWithIMSI, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_imsiDetachProcs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_imsiAttachProcs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_attIncomingInterMSCHDOs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_succIncomingInterMSCHDOs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_attOutgoingInterMSCHDOs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_succOutgoingInterMSCHDOs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_externalHDOsPerCauseTable, TYPE_TablePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_externalHDOsPerCauseEntry, TYPE_TableEntryPointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_externalHDOsPerCauseCode, TYPE_CauseCode, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_externalHDOsPerCauseValue, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_unsuccExternHDOsWithReconnectionPerMSC, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_unsuccExternHDOsWithLossOfConnectionPerMSC, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_callConfigData, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_cc_max_L3_msgs, TYPE_INTEGER, 32, 0),
+ DTYPE (MIB_cc_l3_msg_q_priority, TYPE_INTEGER, 10, 0),
+ DTYPE (MIB_cc_task_priority, TYPE_INTEGER, 100, 0),
+ DTYPE (MIB_cc_task_stack_size, TYPE_INTEGER, 10000, 0),
+ DTYPE (MIB_cc_mm_conn_est_T999, TYPE_INTEGER, 2000, 0),
+ DTYPE (MIB_cc_alerting_T301, TYPE_INTEGER, 2000, 0),
+ DTYPE (MIB_cc_setup_T303, TYPE_INTEGER, 2000, 0),
+ DTYPE (MIB_cc_call_confirmed_T310, TYPE_INTEGER, 2000, 0),
+ DTYPE (MIB_cc_connect_T313, TYPE_INTEGER, 2000, 0),
+ DTYPE (MIB_cc_disconnect_T305, TYPE_INTEGER, 2000, 0),
+ DTYPE (MIB_cc_release_T308, TYPE_INTEGER, 2000, 0),
+ DTYPE (MIB_cc_safety_timer, TYPE_INTEGER, 1000, 0),
+ DTYPE (MIB_cc_max_calls, TYPE_INTEGER, 7, 0),
+ DTYPE (MIB_mobilityConfigData, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_mm_max_mm_connections, TYPE_INTEGER, 10, 0),
+ DTYPE (MIB_mm_max_L3_msgs, TYPE_INTEGER, 32, 0),
+ DTYPE (MIB_task_priority, TYPE_INTEGER, 100, 0),
+ DTYPE (MIB_task_stack_size, TYPE_INTEGER, 20000, 0),
+ DTYPE (MIB_mm_paging_t3113, TYPE_INTEGER, 3000, 0),
+ DTYPE (MIB_mm_authenticationRequired, TYPE_Boolean, 0, 0),
+ DTYPE (MIB_mm_cipheringRequired, TYPE_Boolean, 0, 0),
+ DTYPE (MIB_mm_IMEICheckRequired, TYPE_Boolean, 0, 0),
+ DTYPE (MIB_resourceConfigData, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_rm_t3L01, TYPE_INTEGER, 0x1FF, 0),
+ DTYPE (MIB_rm_bsCcChans, TYPE_INTEGER, 0x01, 0),
+ DTYPE (MIB_rm_bsCcchSdcchComb, TYPE_INTEGER, 0x01, 0),
+ DTYPE (MIB_rm_sysInfoOnOffMap, TYPE_INTEGER, 0x3E, 0),
+ DTYPE (MIB_rm_airInterface, TYPE_INTEGER, 0x02, 0),
+ DTYPE (MIB_rm_viperCellTsc, TYPE_INTEGER, 0x05, 0),
+ DTYPE (MIB_rm_maxSlotPerTrx, TYPE_INTEGER, 0x08, 0),
+ DTYPE (MIB_rm_maxTrxs, TYPE_INTEGER, 0x02, 0),
+ DTYPE (MIB_rm_maxTchfs, TYPE_INTEGER, 0x0F, 0),
+ DTYPE (MIB_rm_maxSdcch4s, TYPE_INTEGER, 0x04, 0),
+ DTYPE (MIB_rm_trxOnOffMap, TYPE_INTEGER, 0x01, 0),
+ DTYPE (MIB_rm_networkIfConfig, TYPE_INTEGER, 0x00, 0),
+ DTYPE (MIB_rm_bcchTrx, TYPE_INTEGER, 0x00, 0),
+ DTYPE (MIB_rm_preAlphaTrx, TYPE_INTEGER, 0x00, 0),
+ DTYPE (MIB_rm_ccchBcchComb, TYPE_INTEGER, 0x01, 0),
+ DTYPE (MIB_rm_ccchConf, TYPE_INTEGER, 0x01, 0),
+ DTYPE (MIB_rm_nim_0_0, TYPE_INTEGER, 0xFF, 0),
+ DTYPE (MIB_rm_nim_0_1, TYPE_INTEGER, 0xFF, 0),
+ DTYPE (MIB_rm_nim_0_2, TYPE_INTEGER, 0xFF, 0),
+ DTYPE (MIB_rm_nim_0_3, TYPE_INTEGER, 0xFF, 0),
+ DTYPE (MIB_rm_nim_0_4, TYPE_INTEGER, 0xFF, 0),
+ DTYPE (MIB_rm_nim_0_5, TYPE_INTEGER, 0xFF, 0),
+ DTYPE (MIB_rm_nim_0_6, TYPE_INTEGER, 0xFF, 0),
+ DTYPE (MIB_rm_nim_0_7, TYPE_INTEGER, 0xFF, 0),
+ DTYPE (MIB_rm_nim_1_0, TYPE_INTEGER, 0xFF, 0),
+ DTYPE (MIB_rm_nim_1_1, TYPE_INTEGER, 0xFF, 0),
+ DTYPE (MIB_rm_nim_1_2, TYPE_INTEGER, 0xFF, 0),
+ DTYPE (MIB_rm_nim_1_3, TYPE_INTEGER, 0xFF, 0),
+ DTYPE (MIB_rm_nim_1_4, TYPE_INTEGER, 0xFF, 0),
+ DTYPE (MIB_rm_nim_1_5, TYPE_INTEGER, 0xFF, 0),
+ DTYPE (MIB_rm_nim_1_6, TYPE_INTEGER, 0xFF, 0),
+ DTYPE (MIB_rm_nim_1_7, TYPE_INTEGER, 0xFF, 0),
+ DTYPE (MIB_rm_trxSynthSetting_0_0, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_rm_trxSynthSetting_0_1, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_rm_trxSynthSetting_0_2, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_rm_trxSynthSetting_0_3, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_rm_trxSynthSetting_1_0, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_rm_trxSynthSetting_1_1, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_rm_trxSynthSetting_1_2, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_rm_trxSynthSetting_1_3, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_rm_trxFpgaDelay_0_0, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_rm_trxFpgaDelay_0_1, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_rm_trxFpgaDelay_1_0, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_rm_trxFpgaDelay_1_1, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_rm_SGainCtrlSetting_0_0, TYPE_INTEGER, 0x380, 0),
+ DTYPE (MIB_rm_SGainCtrlSetting_0_1, TYPE_INTEGER, 0xc0, 0),
+ DTYPE (MIB_rm_SGainCtrlSetting_1_0, TYPE_INTEGER, 0x380, 0),
+ DTYPE (MIB_rm_SGainCtrlSetting_1_1, TYPE_INTEGER, 0xc0, 0),
+ DTYPE (MIB_rm_synchChanInfo, TYPE_INTEGER, 0, 0),
+
+ DTYPE (MIB_oamConfigData, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_oamCommand, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_oamCommandExecutionStatus, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_oamAlternateMibFileName, TYPE_String, 0, 0),
+ DTYPE (MIB_oamCommandLastError, TYPE_String, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_mibAccessControlFlag, TYPE_INTEGER, 0, 0),
+
+ DTYPE (MIB_maintenance_operation, TYPE_String, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_maintenance_response, TYPE_String, 0, SAVE_ASCII_OMIT),
+
+ DTYPE (MIB_trapFwdData, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_trapFwdTable, TYPE_TablePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_trapFwdEntry, TYPE_TableEntryPointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_trapFwdIndex, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_trapType, TYPE_SnmpTrapType, 0, 0),
+ DTYPE (MIBT_trapIpAddress, TYPE_IpAddress, 0, 0),
+ DTYPE (MIBT_trapPort, TYPE_INTEGER, 162, 0),
+ DTYPE (MIBT_trapCommunity, TYPE_String, 0, 0),
+
+ DTYPE (MIB_h323Data, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_h323_GKPort, TYPE_INTEGER, 1720, 0),
+ DTYPE (MIB_h323_GKIPAddress, TYPE_IpAddress, 0, 0),
+ DTYPE (MIB_h323_Q931ResponseTimeOut, TYPE_INTEGER, 100, 0),
+ DTYPE (MIB_h323_Q931ConnectTimeOut, TYPE_INTEGER, 150, 0),
+ DTYPE (MIB_h323_Q931CallSignalingPort, TYPE_INTEGER, 500, 0),
+ DTYPE (MIB_h323_t35CountryCode, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_h323_rasRequestTimeout, TYPE_INTEGER, 20, 0),
+ DTYPE (MIB_h323_viperbaseHeartbeatTimeout, TYPE_INTEGER, 180, 0),
+
+ DTYPE (MIB_dualTRXSCard, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_monitorReceiverPLL_LockDetectStatus, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_referenceFrequencyPLL_LockDetectStatus, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_transceiver_1_PLL_LockDetectStatus, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_transceiver_2A_PLL_LockDetectStatus, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_transceiver_2B_PLL_LockDetectStatus, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_intermediateFrequency_LockDetectStatus, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_trxSerialNumber, TYPE_String, 0, 0),
+ DTYPE (MIB_trxSoftwareVersion, TYPE_String, 0, 0),
+ DTYPE (MIB_trxLoopBackMode, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_arfcnRssiFunction, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_arfcnRssiControlMode, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_clockRecoveryControlMode, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_arfcnRssiClockControlTable, TYPE_TablePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_arfcnRssiClockControlEntry, TYPE_TableEntryPointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_arfcnRssiClockControlIndex, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_arfcnRssiClockControlArfcn, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_arfcnRssiClockRecoveryMode, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_clockCard, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_clockCardType, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_clockCardSoftwareVersion, TYPE_String, 0, 0),
+ DTYPE (MIB_clockCardStatus, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_clockCardCrystalUpTime, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_clockCardDAC, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_gpsCard, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_gpsCardType, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_gpsCardSoftwareVersion, TYPE_String, 0, 0),
+ DTYPE (MIB_gpsCardStatus, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_gpsPosition, TYPE_String, 0, 0),
+ DTYPE (MIB_gpsTime, TYPE_String, 0, 0),
+ DTYPE (MIB_utcTime, TYPE_String, 0, 0),
+ DTYPE (MIB_clockStatusFrequencyError, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_clockStatusDACVoltage, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_gpsAntennaStatus, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_gpsSatelliteStatus, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_powerCard, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_powerCardType, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_powerCardStatus, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_powerOn, TYPE_INTEGER, 1, 0),
+ DTYPE (MIB_externalPowerSupply, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_powerSupplyType, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_powerSupplyStatus, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_cdcBoard, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_cdcBoardSerialNumber, TYPE_String, 0, 0),
+ DTYPE (MIB_cdcBoardMACAddress, TYPE_String, 0, 0),
+ DTYPE (MIB_automaticParameterAllocation, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_apaEnable, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_apaScanFrequencyLowBound, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_apaScanFrequencyHighBound, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_apaMaxPowerSetting, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_apaMinRSSIThresholdForNeighborId, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_apaScanRate, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_apaHysteresisForBCCHPower, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_apaInvalidFrequencyTable, TYPE_TablePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_apaInvalidFrequencyEntry, TYPE_TableEntryPointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_apaInvalidFrequencyIndex, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_apaInvalidFrequencyArfcn, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_apaClockSourceFrequencyTable, TYPE_TablePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_apaClockSourceFrequencyEntry, TYPE_TableEntryPointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_apaClockSourceFrequencyIndex, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_apaClockSourceFrequencyArfcn, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_gp10MgmtInfoMib, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_viperCellName, TYPE_String, 0, 0),
+ DTYPE (MIB_viperCellIPAddress, TYPE_IpAddress, 0, 0),
+ DTYPE (MIB_viperCellDefGateway, TYPE_IpAddress, 0, 0),
+ DTYPE (MIB_viperCellLocation, TYPE_String, 0, 0),
+ DTYPE (MIB_viperCellSerialNumber, TYPE_String, 0, 0),
+ DTYPE (MIB_viperCellAssetNumber, TYPE_String, 0, 0),
+ DTYPE (MIB_viperCellSoftwareBuild, TYPE_String, 0, 0),
+ DTYPE (MIB_viperCellCustomerName, TYPE_String, 0, 0),
+ DTYPE (MIB_viperCellCustomerAddress, TYPE_String, 0, 0),
+ DTYPE (MIB_viperCellCustomerPhone, TYPE_String, 0, 0),
+ DTYPE (MIB_viperCellCustomerEmail, TYPE_String, 0, 0),
+ DTYPE (MIB_viperCellCustomerInfo, TYPE_String, 0, 0),
+
+ DTYPE (MIB_readCommunity, TYPE_String, 0, 0),
+ DTYPE (MIB_writeCommunity, TYPE_String, 0, 0),
+
+
+ DTYPE (MIB_gp10ErrorInfoMib, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_errorCode_L1, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_errorCode_MD, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_errorCode_RM, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_errorCode_MM, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_errorCode_CC, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_errorCode_L2, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_errorCode_SMS, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_errorCode_OAM, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_errorCode_H323, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_errorCode_LUDB, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_errorCode_EXT_LC, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_errorCode_LOG, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_errorCode_MCH, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_errorCode_ALARM, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_errorCode_SYSINIT, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_errorCode_GRR, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_errorCode_CDR, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+
+ DTYPE (MIB_cdrClientSSLEnable, TYPE_INTEGER, 0, 0), /* disabled by default */
+ DTYPE (MIB_cdrLongCallTimer, TYPE_INTEGER, 10, 0), /* Default value is 15 mins */
+
+ /* New Data Types to Support Gs */
+ DTYPE (MIB_btsGsBasicPackage, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_gprsServerIpAddress, TYPE_IpAddress, 0, 0),
+ DTYPE (MIB_gprsRac, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_enableGprs, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_gprsOperationalStatus, TYPE_INTEGER, 0, 0),
+
+ DTYPE (MIB_btsGsOptionPackage, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_nmo, TYPE_INTEGER, 1, 0),
+ DTYPE (MIB_t3168, TYPE_INTEGER, 4, 0),
+ DTYPE (MIB_t3192, TYPE_INTEGER, 3, 0),
+ DTYPE (MIB_drxTimerMax, TYPE_INTEGER, 7, 0),
+ DTYPE (MIB_accessBurstType, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_controlAckType, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_bsCvMax, TYPE_INTEGER, 7, 0),
+ DTYPE (MIB_panDec, TYPE_INTEGER, 1, 0),
+ DTYPE (MIB_panInc, TYPE_INTEGER, 1, 0),
+ DTYPE (MIB_panMax, TYPE_INTEGER, 4, 0),
+ DTYPE (MIB_raColour, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_si13Position, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_cbchTrxSlot, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_cbchTrx, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_bcchChangeMark, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_siChangeField, TYPE_INTEGER, 0, 0),
+
+ DTYPE (MIB_rss, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_gprsMsTxpwrMaxCch, TYPE_INTEGER, 30, 0),
+ DTYPE (MIB_gprsRexLevAccessMin, TYPE_INTEGER, 10, 0),
+ DTYPE (MIB_gprsReselectOffset, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_priorityClass, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_lsaId, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_hcsThreshold, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_gprsTemporaryOffset, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_gprsPenaltyTime, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_gprsCellReselectHysteresis, TYPE_INTEGER, 4, 0),
+ DTYPE (MIB_gprsRaReselectHysteresis, TYPE_INTEGER, 4, 0),
+ DTYPE (MIB_c32Qual, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_c31Hysteresis, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_alpha, TYPE_INTEGER, 10, 0),
+ DTYPE (MIB_pB, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_networkControlOrder, TYPE_INTEGER, 1, 0),
+
+ DTYPE (MIB_ncFrequencyListTable, TYPE_TablePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_ncFrequencyListEntry, TYPE_TableEntryPointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_ncFrequencyListIndex, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIBT_ncFrequency, TYPE_INTEGER, 0, 0),
+
+ DTYPE (MIB_ncReportingPeriodI, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_ncReportingPeriodT, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_extMeasurementOrder, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_extReportingPeriod, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_extReportingType, TYPE_INTEGER, 1, 0),
+ DTYPE (MIB_intFrequency, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_nccPermitted, TYPE_INTEGER, 0, 0),
+ DTYPE (MIB_pcMeasChan, TYPE_INTEGER, 1, 0),
+ DTYPE (MIB_tavgW, TYPE_INTEGER, 15, 0),
+ DTYPE (MIB_tavgT, TYPE_INTEGER, 5, 0),
+ DTYPE (MIB_navgI, TYPE_INTEGER, 4, 0),
+ DTYPE (MIB_gprsMsTargetPower, TYPE_INTEGER, 30, 0),
+ DTYPE (MIB_spgcCcchSup, TYPE_INTEGER, 0, 0),
+
+ DTYPE (MIB_rlcMac, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_t3169, TYPE_INTEGER, 5, 0),
+ DTYPE (MIB_t3191, TYPE_INTEGER, 5, 0),
+ DTYPE (MIB_t3193, TYPE_INTEGER, 5, 0),
+ DTYPE (MIB_t3195, TYPE_INTEGER, 5, 0),
+
+ DTYPE (MIB_bssgp, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_blockTimer, TYPE_INTEGER, 10, 0),
+ DTYPE (MIB_resetTimer, TYPE_INTEGER, 60, 0),
+ DTYPE (MIB_suspendTimer, TYPE_INTEGER, 5, 0),
+ DTYPE (MIB_resumeTimer, TYPE_INTEGER, 5, 0),
+ DTYPE (MIB_capUpdateTimer, TYPE_INTEGER, 10, 0),
+ DTYPE (MIB_blockRetries, TYPE_INTEGER, 3, 0),
+ DTYPE (MIB_unBlockRetries, TYPE_INTEGER, 3, 0),
+ DTYPE (MIB_resetRetries, TYPE_INTEGER, 3, 0),
+ DTYPE (MIB_suspendRetries, TYPE_INTEGER, 3, 0),
+ DTYPE (MIB_resumeRetries, TYPE_INTEGER, 3, 0),
+ DTYPE (MIB_raCapUpdateRetries, TYPE_INTEGER, 3, 0),
+ DTYPE (MIB_timeInterval, TYPE_INTEGER, 10, 0),
+ DTYPE (MIB_networkPort, TYPE_INTEGER, 22240, 0),
+
+ DTYPE (MIB_btsGsMeasPackage, TYPE_StructurePointer, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_flushReqRecvd, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_pagingReqRecvd, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_meanPsInterArrivalTime, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_availablePdch, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_meanAvailablePdch, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_maxAvailablePdch, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_minAvailablePdch, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_meanOccupiedPdch, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_maxOccupiedPdch, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_minOccupiedPdch, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_availablePdchAllocTime, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_packetPagingMessages, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_pagchQueueLength, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+
+ DTYPE (MIB_pagesDiscardedFromPpch, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_assignmentRequest, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_succAssignmentProc, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_succPdtchSeizures, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_meanPacketQueueLength, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+ DTYPE (MIB_serviceChanges, TYPE_INTEGER, 0, SAVE_ASCII_OMIT),
+
+ DTYPE (0, 0, 0, 0)
+};
+
+/* platform specific object ids */
+OIDC_T enterpriseOid [] = {1, 3, 6, 1, 4, 1, 3583, 1, 3, 6, 3};
+OIDC_T sysTrapOid [] = { 1, 3, 6, 1, 4, 1, 3583, 1, 3, 6, 2 };
+OIDC_T snmpTrapEventOid[] = { 1, 3, 6, 1, 4, 1, 3583, 1, 3, 6, 3,0,0};
+OIDC_T errorCodeOamOid[] = { 1, 3, 6, 1, 4, 1, 3583, 1, 6, 0};
+
+OIDC_T trapAlarmModuleNameOid[] = { 1, 3, 6, 1, 4, 1, 3583, 1, 3, 6, 4};
+OIDC_T trapAlarmCodeOid[] = { 1, 3, 6, 1, 4, 1, 3583, 1, 3, 6, 5};
+OIDC_T trapAlarmDescOid[] = { 1, 3, 6, 1, 4, 1, 3583, 1, 3, 6, 6};
+
+int SIZE_enterpriseOid = sizeof enterpriseOid / sizeof enterpriseOid [0];
+int SIZE_sysTrapOid = sizeof sysTrapOid / sizeof sysTrapOid [0];
+int SIZE_snmpTrapEventOid = sizeof snmpTrapEventOid / sizeof snmpTrapEventOid [0];
+int SIZE_errorCodeOamOid = sizeof errorCodeOamOid / sizeof errorCodeOamOid [0];
+
+int SIZE_trapAlarmModuleNameOid = sizeof trapAlarmModuleNameOid / sizeof trapAlarmModuleNameOid[0];
+int SIZE_trapAlarmCodeOid = sizeof trapAlarmCodeOid / sizeof trapAlarmCodeOid[0];
+int SIZE_trapAlarmDescOid = sizeof trapAlarmDescOid / sizeof trapAlarmDescOid[0];
+
+
diff --git a/data/mnet/GP10/Host/snmp/test/Makefile b/data/mnet/GP10/Host/snmp/test/Makefile
new file mode 100644
index 0000000..8a3ce58
--- /dev/null
+++ b/data/mnet/GP10/Host/snmp/test/Makefile
@@ -0,0 +1,22 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+CC_INCLUDE += -I$(WIND_BASE)/target/h/snmp -DVXWORKS -DUT
+
+all: oam_test
+
+oam_test: $(MODULE_OBJS)
+ $(LD) -r -o $(OBJDIR)/$@.tmp $(MODULE_OBJS)
+ $(NM) $(OBJDIR)/$@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $(OBJDIR)/$@.out _ctdt.o $(OBJDIR)/$@.tmp
+ $(RM) _ctdt.c _ctdt.o $(OBJDIR)\$@.tmp \ No newline at end of file
diff --git a/data/mnet/GP10/Host/snmp/test/demoApp.c b/data/mnet/GP10/Host/snmp/test/demoApp.c
new file mode 100644
index 0000000..3cda994
--- /dev/null
+++ b/data/mnet/GP10/Host/snmp/test/demoApp.c
@@ -0,0 +1,176 @@
+#include <oam_api.h>
+#include <stdio.h>
+#define INCLUDE_MIB_CONTROL_TABLES
+#include <mibtags.h>
+#include "vipermib.h" /* Get the ViperCell MIB definitions. */
+#include "mibleaf.h"
+
+#include "msgQLib.h"
+#include "taskLib.h"
+#include "inetLib.h"
+
+/* defines */
+
+#define MY_TABLE_NAME MIB_resourceConfigData
+#define H323_TABLE_NAME MIB_h323Data
+
+#define MY_MODULE_ID 7
+#define MAX_MSGS 1000
+
+MSG_Q_ID myMsgQId;
+static int oamApiDemoTaskQuit = 1;
+
+oamAppDemo (void)
+{
+ int i, status;
+ INT_32_T tag;
+ TrapMsg myTrapMsg;
+ ResourceConfigData rrmStruct;
+
+ /* create a message queue to receive message from agent. If you already have one
+ * you can reuse the existing one.
+ */
+
+ if ((myMsgQId = msgQCreate (MAX_MSGS, sizeof(TrapMsg), MSG_Q_PRIORITY))
+ == NULL)
+ return (ERROR);
+
+ /* Your application may need to get the current value during
+ * initialization. If your application were rrm, you would do something like
+ * this
+ */
+
+ status = oam_getMibStruct(MY_TABLE_NAME,(char *) &rrmStruct, sizeof(rrmStruct));
+
+ if(status != STATUS_OK)
+ {
+ /* put here your error handling code */
+ }
+
+ /* Now you can consume the value*/
+
+ printf("value of rm_viperCellTsc = %d\n", rrmStruct.rm_viperCellTsc);
+
+ /* You can process other members of the sturct here */
+
+ /* You may also need to set the trap. The following for loop
+ * sets the trap for all the member of rrm structure
+ */
+
+ for ( i = 0; i < LEAF_rm_synchChanInfo; i++)
+ {
+ tag = MIB_resourceConfigData+i;
+ oam_setTrap(MY_MODULE_ID, myMsgQId, tag);
+ }
+
+ /* This is your typical message loop where you wait for incoming messages */
+
+ while(oamApiDemoTaskQuit)
+ {
+ int status;
+
+ /* get message from queue; if necessary wait for a maximum 1000 ticks */
+ status = msgQReceive(myMsgQId, (char *) &myTrapMsg, sizeof(TrapMsg), 1000);
+ if (status == ERROR)
+ {
+ if (errno == S_objLib_OBJ_TIMEOUT)
+
+ continue;
+ } else {
+
+ /* display message */
+ printf ("Trap message received\n");
+
+ if (myTrapMsg.valType == VT_VALUE)
+ {
+ printf ("The new value of Mib Variable for tag %d is %d\n",
+ myTrapMsg.mibTag, myTrapMsg.val.varVal);
+ } else {
+
+ printf ("The new address of Mib Variable for tag %d is %x\n",
+ myTrapMsg.mibTag, myTrapMsg.val.varAdr);
+ }
+ }
+ }
+
+ /*
+ * The application need to unsunscribe trap before exiting.
+ */
+ oam_unsetTrapByModule(MY_MODULE_ID);
+
+ /* you can also selectively unsubscribe a trap by unsetTrap() method */
+
+return OK;
+}
+
+/* to allow demo task exit type "quitOamApiDemoTask(0)" */
+
+quitOamApiDemoTask (int val)
+{
+ oamApiDemoTaskQuit = val;
+}
+
+/* spawns the demo task */
+oamDemoTask(void)
+{
+ taskSpawn("oamAppDemo", 150, VX_PRIVATE_ENV,10000, oamAppDemo, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+
+}
+
+
+printH323Mib()
+{
+ H323Data h323Struct;
+ struct in_addr iaddr;
+ int status = oam_getMibStruct(H323_TABLE_NAME, (char *) &h323Struct, sizeof(h323Struct));
+
+ if(status != STATUS_OK)
+ {
+ /* put here your error handling code */
+ printf("getMibStruct() failed\n");
+ }
+
+ iaddr.s_addr = h323Struct.GKIPAddress;
+ printf("Gate Keeper's port = %d\n", h323Struct.GKPort);
+ printf("Gate Keeper's IP Address = %s\n", inet_ntoa (iaddr));
+ printf("Q931 Call Signaling Port = %d\n", h323Struct.Q931CallSignalingPort);
+ printf("Q931 Connect Time Out = %d\n", h323Struct.Q931ConnectTimeOut);
+ printf("Q931 Response time Out = %d\n", h323Struct.Q931ResponseTimeOut);
+ printf("t35 Country Code = %d\n", h323Struct.t35CountryCode);
+}
+
+
+STATUS getRRM(int idx)
+{
+
+ INT_32_T mibValue;
+ int status;
+ INT_32_T tag = MIB_ITEM(MTBL_resourceConfigData, idx);
+
+ status = oam_getMibIntVar(tag, &mibValue);
+ if (status != STATUS_OK)
+ {
+ printf("getMibIntVar failed; status = %d\n", status);
+ } else {
+ printf ("The value of the variable is %d\n", mibValue);
+ }
+ return status;
+
+}
+
+STATUS setRRM(int idx, INT_32_T varval)
+{
+
+ int status;
+ INT_32_T tag = MIB_ITEM(MTBL_resourceConfigData, idx);
+
+ status = oam_setMibIntVar(SNMP_AGENT_MODULE_ID, tag, varval);
+ if (status != STATUS_OK)
+ {
+ printf("setMibIntVar failed; status = %d\n", status);
+ } else {
+ printf ("The value of the variable set to %d\n", varval);
+ }
+ return status;
+
+}
diff --git a/data/mnet/GP10/Host/socket/Makefile b/data/mnet/GP10/Host/socket/Makefile
new file mode 100644
index 0000000..992f018
--- /dev/null
+++ b/data/mnet/GP10/Host/socket/Makefile
@@ -0,0 +1,17 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS = src
+MODULEOUT = soc
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ $(CP) bin\$(MODULEOUT).out $(TOP_OF_VOB)\bin\$(MODULEOUT).out
diff --git a/data/mnet/GP10/Host/socket/src/Makefile b/data/mnet/GP10/Host/socket/src/Makefile
new file mode 100644
index 0000000..3ffb556
--- /dev/null
+++ b/data/mnet/GP10/Host/socket/src/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = socket
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\soc.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR = $(THIS_APP_DIR)
+
+REPLACE_LIST="src src_ssl"
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY) REPLACE=$(REPLACE_LIST)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ $(RM) ..\bin\*.o
+ $(RM) ..\bin\*.out
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) .\bin\*.o
+ $(RM) .\bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/sslc/Makefile b/data/mnet/GP10/Host/sslc/Makefile
new file mode 100644
index 0000000..5d88fde
--- /dev/null
+++ b/data/mnet/GP10/Host/sslc/Makefile
@@ -0,0 +1,19 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS = src
+SSLLIBDIR = Common\rsa\lib
+SSLLIBFILE = sslc_vxppc.out
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ $(CP) bin\*.out $(TOP_OF_VOB)\bin\*.out
+ $(CP) $(TOP_OF_VOB)\..\$(SSLLIBDIR)\$(SSLLIBFILE) $(TOP_OF_VOB)\bin\crypto\sslc_k9.out
diff --git a/data/mnet/GP10/Host/sslc/src/Makefile b/data/mnet/GP10/Host/sslc/src/Makefile
new file mode 100644
index 0000000..27959ac
--- /dev/null
+++ b/data/mnet/GP10/Host/sslc/src/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = sslc
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\$(THIS_APP_DIR).out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR = rsa
+
+REPLACE_LIST="src_stub"
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY) REPLACE=$(REPLACE_LIST)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ $(RM) ..\bin\*.o
+ $(RM) ..\bin\*.out
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) .\bin\*.o
+ $(RM) .\bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/subsc/Makefile b/data/mnet/GP10/Host/subsc/Makefile
new file mode 100644
index 0000000..22705b3
--- /dev/null
+++ b/data/mnet/GP10/Host/subsc/Makefile
@@ -0,0 +1,16 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ $(CP) bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/subsc/src/makefile b/data/mnet/GP10/Host/subsc/src/makefile
new file mode 100644
index 0000000..0f0f365
--- /dev/null
+++ b/data/mnet/GP10/Host/subsc/src/makefile
@@ -0,0 +1,51 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = subsc
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\$(THIS_APP_DIR).out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR = subsc
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ $(RM) ..\bin\*.o
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) .\bin\*.o
+ $(RM) .\bin\*.out
+endif
diff --git a/data/mnet/GP10/Host/version.txt b/data/mnet/GP10/Host/version.txt
new file mode 100644
index 0000000..ba1087d
--- /dev/null
+++ b/data/mnet/GP10/Host/version.txt
@@ -0,0 +1,27 @@
+/********************************************************************
+*
+* FILE NAME: /ViperCell/version.txt
+*
+* DESCRIPTION: This file contains version numbers supplied from the
+* make command line.
+*
+* NOTES:
+*
+* (C) Copyright 2000 Cisco Systems Inc., CA, USA
+* http://www.cisco.com/
+*
+* WARNING: This file is automatically generated by Makefile
+* and any changes made to this file will be overwritten
+* by the next build.
+*
+* Created by: rcunneen
+********************************************************************
+*/
+[VERSION]
+RELG3.0
+[BUILDID]
+CYPRUS_GP_003
+[TIME]
+ 3:59p
+[DATE]
+Wed 10/10/2001
diff --git a/data/mnet/GP10/Host/vipercell.cfg b/data/mnet/GP10/Host/vipercell.cfg
new file mode 100644
index 0000000..f5d717b
--- /dev/null
+++ b/data/mnet/GP10/Host/vipercell.cfg
@@ -0,0 +1,2 @@
+[inet_on_ethernet]
+0.0.0.0:ffffff00 \ No newline at end of file
diff --git a/data/mnet/GP10/Host/voip/include/ccb.h b/data/mnet/GP10/Host/voip/include/ccb.h
new file mode 100644
index 0000000..dff3815
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/include/ccb.h
@@ -0,0 +1,553 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : CCB.h *
+ * *
+ * Description : Hdr file containing data structure definitions for *
+ * the call control block *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+#ifndef CCB_HDR_INC
+#define CCB_HDR_INC
+
+/*
+ * VxWorks & ANSI C Headers
+ */
+#include <taskLib.h>
+#include <ioLib.h>
+
+/*
+ * RadVision Headers
+ */
+#include <cm.h>
+#include <mti.h>
+#include <seli.h>
+#include <pi.h>
+#include <stkutils.h>
+
+#include <sse.h>
+
+/*
+ * Application Headers
+ */
+#include "voip\voipapi.h"
+#include "rtptask.h"
+#include "logging\vcmodules.h"
+#include "logging\vclogging.h"
+
+
+
+
+/*
+ * Common Definitions
+ */
+#define H323TASK_MAGIC_VALUE 0x1234
+#define STATUS_SUCCESS 1
+#define STATUS_FAILURE !STATUS_SUCCESS
+#define MAX_VIPERCELL_ID_STR_LENGTH 128
+#define RAD_MAX_TIMERS 100
+#define MAX_DESTINATION_ADDRESS_SIZE 100
+#define MAX_VIPERCELL_NAME_STRING_LENGTH 128
+#define MAX_STACK_CONFIG_BUFFER_SIZE 8092
+#define MAX_IP_ADDRESS_STRING_LENGTH 32
+#define VOIP_MAX_CALLING_PARTY_ID_LENGTH 255
+#define VOIP_MAX_CALLED_PARTY_ID_LENGTH 255
+#define VOIP_MAX_DISPLAY_INFO_LENGTH 255
+#define VOIP_MAX_REMOTE_PARTY_ID_LENGTH 255
+#define VOIP_MAX_ISDN_NUMBER_LENGTH 255
+#define RTP_GSM_PAYLOAD_TYPE 3
+#define RTP_GSM_EFR_PAYLOAD_TYPE 20
+#define RTP_DYNAMIC_PAYLOAD_TYPE 96
+#define RTP_STARVOX_PAYLOAD_TYPE 100
+
+
+
+#ifndef PVOID
+typedef void * PVOID;
+#endif
+typedef int STATUS;
+typedef int H323_TASK_LOCK;
+
+
+/*
+
+/* CALL EVENTS */
+typedef enum {
+ H323_EVENT_RECV_CALL_OFFERING,
+ H323_EVENT_RECV_CC_CALL_RELEASE,
+ H323_EVENT_RECV_CC_ANSWER_CALL,
+ H323_EVENT_RECV_CC_CALL_SETUP,
+ H323_EVENT_RECV_CALL_PROCEEDING,
+ H323_EVENT_RECV_CALL_RINGBACK,
+ H323_EVENT_RECV_CALL_CONNECTED,
+ H323_EVENT_RECV_CALL_DISCONNECTED,
+ H323_EVENT_RECV_CALL_DEST_REJECTED,
+ H323_EVENT_RECV_CALL_IDLE,
+ H323_EVENT_RECV_REMOTE_CAPABILITIES,
+ H323_EVENT_RECV_H245_TRANSPORT_CONNECTED,
+ H323_EVENT_RECV_H245_CONNECTED,
+ H323_EVENT_RECV_CAPABILITIES_ACK,
+ H323_EVENT_RECV_CAPABILITIES_NAK,
+ H323_EVENT_RECV_CHANNEL_OFFERING,
+ H323_EVENT_RECV_IN_CHANNEL_CONNECTED,
+ H323_EVENT_RECV_OUT_CHANNEL_CONNECTED,
+ H323_EVENT_RECV_IN_CHANNEL_DISCONNECTED,
+ H323_EVENT_RECV_OUT_CHANNEL_DISCONNECTED,
+ H323_MAX_CALL_EVENTS
+} H323_CALL_EVENT;
+
+/* CALL STATES */
+typedef enum {
+ H323_CALL_STATE_SAME_STATE=-1,
+ H323_CALL_STATE_IDLE,
+ H323_CALL_STATE_WAIT_FOR_CC_ANSWER,
+ H323_CALL_STATE_WAIT_FOR_PROCEEDING,
+ H323_CALL_STATE_WAIT_FOR_CONNECTION,
+ H323_CALL_STATE_CALL_CONNECTED,
+ H323_CALL_STATE_WAIT_FOR_CAP_EXCHANGE_ACK,
+ H323_CALL_STATE_WAIT_FOR_CHANNELS_CONNECTION,
+ H323_CALL_STATE_CHANNELS_CONNECTED,
+ H323_MAX_CALL_STATES
+
+} H323_CALL_STATE;
+
+#define MAX_STATE_TRANSITION_HISTORY 10
+
+/*
+ * Q.850 Disconnect Cause Codes
+ */
+typedef enum {
+
+ Q850_CAUSE_UNALLOCATED_NUM = 1,
+ Q850_CAUSE_NO_ROUTE_TO_NET = 2,
+ Q850_CAUSE_NO_ROUTE_TO_DEST = 3,
+ Q850_CAUSE_SEND_SPECIAL_TONE = 4,
+ Q850_CAUSE_MISDIALED_TRUNK_PREFIX = 5,
+ Q850_CAUSE_CHANNEL_UNACCEPTABLE = 6,
+ Q850_CAUSE_CALL_AWARDED_IN_EST_CHANNEL = 7,
+ Q850_CAUSE_PREEMPTION = 8,
+ Q850_CAUSE_PREEMTION_CKT_RESVD = 9,
+ Q850_CAUSE_NORMAL_CLEARING = 16,
+ Q850_CAUSE_USER_BUSY = 17,
+ Q850_CAUSE_NO_USER_RESPONDING = 18,
+ Q850_CAUSE_NO_ANSWER = 19,
+ Q850_CAUSE_SUBS_ABSENT = 20,
+ Q850_CAUSE_CALL_REJECTED = 21,
+ Q850_CAUSE_NUM_CHANGED = 22,
+ Q850_CAUSE_NON_SELECTED_USER_CLEARING = 26,
+ Q850_CAUSE_DEST_OUT_OF_ORDER = 27,
+ Q850_CAUSE_INVALID_NUM_FORMAT = 28,
+ Q850_CAUSE_FACILITY_REJECTED = 29,
+ Q850_CAUSE_STATUS_ENQUIRY_RESPONSE = 30,
+ Q850_CAUSE_NORMAL_UNSPECIFIED = 31,
+ Q850_CAUSE_NO_CIRCUIT_AVAILABLE = 34,
+ Q850_CAUSE_NET_OUT_OF_ORDER = 38,
+ Q850_CAUSE_PFMC_OUT_OF_SERVICE = 39,
+ Q850_CAUSE_PFMC_OPERATIONAL = 40,
+ Q850_CAUSE_TEMP_FAILURE = 41,
+ Q850_CAUSE_SWITCH_CONGESTION = 42,
+ Q850_CAUSE_ACCESS_INFO_DISCARDED = 43,
+ Q850_CAUSE_REQUESTED_CKT_UNAVAILABLE = 44,
+ Q850_CAUSE_PRECEDENCE_CALL_BLOCKED = 46,
+ Q850_CAUSE_RESOURCE_UNAVAIL_UNSPECIFIED = 47,
+ Q850_CAUSE_QOS_UNAVAILABLE = 49,
+ Q850_CAUSE_REQ_FACILITY_NOT_SUBSCRIBED = 50,
+ Q850_CAUSE_CUG_OUTCALL_BARRED = 53,
+ Q850_CAUSE_CUG_INCALL_BARRED = 55,
+ Q850_CAUSE_BEARER_CAP_NOT_AUTH = 57,
+ Q850_CAUSE_BEARER_CAP_NOT_AVAIL = 58,
+ Q850_CAUSE_INCONSISTENCY_ACCESS_INFO = 62,
+ Q850_CAUSE_SERVICE_NOT_AVAILABLE = 63,
+ Q850_CAUSE_BEARER_CAP_NOT_IMPLEMENTED = 65,
+ Q850_CAUSE_CHANNEL_TYPE_NOT_IMPLEMENTED = 66,
+ Q850_CAUSE_REQ_FACILITY_NOT_IMPLEMENTED = 69,
+ Q850_CAUSE_RESTRICTED_CAP_AVAILABLE = 70,
+ Q850_CAUSE_SERVICE_NOT_IMPL_UNSPECIFIED = 79,
+ Q850_CAUSE_INVALID_CRV = 81,
+ Q850_CAUSE_IDENTIFIED_CHANNEL_NOT_EXIST = 82,
+ Q850_CAUSE_SUSPENDED_CALL_EXISTS = 83,
+ Q850_CAUSE_CALL_ID_IN_USE = 84,
+ Q850_CAUSE_NO_CALL_SUSPENDED = 85,
+ Q850_CAUSE_REQ_CALL_ID_CLEARED = 86,
+ Q850_CAUSE_USER_NOT_CUG_MEMBER = 87,
+ Q850_CAUSE_INCOMPATIBLE_DEST = 88,
+ Q850_CAUSE_NON_EXISTENT_CUG = 90,
+ Q850_CAUSE_INVALID_TRANSIT_NETWORK = 91,
+ Q850_CAUSE_INVALID_MSG = 95,
+ Q850_CAUSE_MANDATORY_IE_MISSING = 96,
+ Q850_CAUSE_MSG_TYPE_NON_EXISTENT = 97,
+ Q850_CAUSE_MSG_NOT_COMPAT_STATE_NOT_IMPL = 98,
+ Q850_CAUSE_IE_PARAM_NON_EXISTENT = 99,
+ Q850_CAUSE_INVALID_IE_CONTENTS = 100,
+ Q850_CAUSE_MSG_NOT_COMPAT_STATE = 101,
+ Q850_CAUSE_TIMER_EXPIRY_RECOVER = 102,
+ Q850_CAUSE_PARAM_NOT_IMPL_PASSED_ON = 103,
+ Q850_CAUSE_MSG_PARAM_UNRECOGNIZED_DISCARDED = 110,
+ Q850_CAUSE_PROTOCOL_ERROR_UNSPECIFIED = 111,
+ Q850_CAUSE_INTERWORKING_UNSPECIFIED = 127,
+ Q850_MAX_CAUSES = 128
+
+} Q850_DISCONNECT_CAUSE;
+
+
+
+/*
+ * Q.931 Progress Description Types
+ */
+typedef enum {
+
+ Q931_IE_PROGRESS_DESC_NOT_END_TO_END_ISDN = 0x01,
+ Q931_IE_PROGRESS_DESC_DEST_NOT_ISDN = 0x02,
+ Q931_IE_PROGRESS_DESC_ORIG_NOT_ISDN = 0x03,
+ Q931_IE_PROGRESS_DESC_RETURN_TO_ISDN = 0x04,
+ Q931_IE_PROGRESS_DESC_INTERWK_SVC_CHANGE = 0x05,
+ Q931_IE_PROGRESS_DESC_INBAND_INFO = 0x08
+
+} Q931_IE_PROGRESS_DESC;
+
+
+typedef enum {
+ H323_CALL_ORIGINATED,
+ H323_CALL_TERMINATED
+}H323_CALL_DIRECTION;
+
+
+typedef enum {
+ REMOTE_TERMINAL_GSM,
+ REMOTE_TERMINAL_NETMEETING,
+ REMOTE_TERMINAL_CISCO,
+ MAX_REMOTE_TERMINAL_TYPES
+}REMOTE_TERMINAL_TYPE;
+
+
+typedef void ( *pfnCommonCallBack )( PVOID );
+
+#define MAX_TIMERS_IN_ARRAY 10
+
+
+typedef struct _JCTIMER
+{
+ pfnCommonCallBack pfnCallBack;
+ PVOID pData;
+ BOOL bMultiple;
+ time_t tmInterval;
+ BOOL Used;
+ int Magic;
+}JCTIMER, *PJCTIMER;
+
+
+
+
+/*
+ * Number type
+ */
+typedef enum {
+
+ Q931_IE_CALL_PARTY_NO_TYPE_UNKNOWN = 0x00,
+ Q931_IE_CALL_PARTY_NO_TYPE_INTERNATIONAL = 0x01,
+ Q931_IE_CALL_PARTY_NO_TYPE_NATIONAL = 0x02,
+ Q931_IE_CALL_PARTY_NO_TYPE_NETWK_SPECIFIC = 0x03,
+ Q931_IE_CALL_PARTY_NO_TYPE_SUBS_NO = 0x04,
+ Q931_IE_CALL_PARTY_NO_TYPE_ABBR_NO = 0x06,
+ Q931_IE_CALL_PARTY_NO_TYPE_RESERVED = 0x07
+
+}Q931_IE_CALL_PARTY_NO_TYPE;
+
+
+/*
+ * Numbering plan
+ */
+typedef enum {
+
+ Q931_IE_CALL_PARTY_NO_PLAN_UNKNOWN = 0x00,
+ Q931_IE_CALL_PARTY_NO_PLAN_ISDN = 0x01,
+ Q931_IE_CALL_PARTY_NO_PLAN_DATA = 0x03,
+ Q931_IE_CALL_PARTY_NO_PLAN_TELEX = 0x04,
+ Q931_IE_CALL_PARTY_NO_PLAN_NATIONAL = 0x08,
+ Q931_IE_CALL_PARTY_NO_PLAN_PRIVATE = 0x09,
+ Q931_IE_CALL_PARTY_NO_PLAN_RESERVED = 0x0f
+
+} Q931_IE_CALL_PARTY_NO_PLAN;
+
+
+
+/*
+ * Presentation Indicator
+ */
+typedef enum {
+
+ Q931_IE_CALLING_PARTY_NO_PI_ALLOWED = 0x00,
+ Q931_IE_CALLING_PARTY_NO_PI_RESTRICTED = 0x01,
+ Q931_IE_CALLING_PARTY_NO_PI_NOT_AVAIL = 0x02,
+ Q931_IE_CALLING_PARTY_NO_PI_RESERVED = 0x03
+
+} Q931_IE_CALLING_PARTY_NO_PI;
+
+
+/*
+ * Screening Indicator
+ */
+typedef enum {
+
+ Q931_IE_CALLING_PARTY_NO_SI_UP_NOT_SCREENED = 0x00,
+ Q931_IE_CALLING_PARTY_NO_SI_UP_VERIFIED_PASSED = 0x01,
+ Q931_IE_CALLING_PARTY_NO_SI_UP_VERIFIED_FAILED = 0x02,
+ Q931_IE_CALLING_PARTY_NO_SI_NETWORK_PROVIDED = 0x03
+
+} Q931_IE_CALLING_PARTY_NO_SI;
+
+
+typedef struct {
+
+ UINT8 octet2_bit:1;
+ UINT8 presentation_indicator:2;
+ UINT8 reserved:3;
+ UINT8 screening_indicator:2;
+
+} Q931_MSG_IE_CALLING_PARTY_RES_INDICATORS,*PQ931_MSG_IE_CALLING_PARTY_RES_INDICATORS;
+
+
+
+
+
+
+typedef struct {
+ H323_CALL_STATE CallStates[MAX_STATE_TRANSITION_HISTORY];
+ H323_CALL_STATE NextCallStates[MAX_STATE_TRANSITION_HISTORY];
+ H323_CALL_EVENT CallEvents[MAX_STATE_TRANSITION_HISTORY];
+ int PairIndex;
+} STATE_TRANSITION_HISTORY;
+
+
+#define VOIP_NONSTD_TERMCAPS_CODEC_SUPPORTED 100
+#define VOIP_NONSTD_TERMCAPS_CODEC_NOT_SUPPORTED 0
+
+
+typedef struct {
+ int Magic;
+ int gsmFullRate;
+ int gsmEnhancedFullRate;
+} VOIP_NONSTD_TERMCAPS;
+
+
+typedef enum {
+ VOIP_CALL_CODEC_GSM_FR,
+ VOIP_CALL_CODEC_GSM_EFR
+} VOIP_CALL_SELECTED_CODEC;
+
+
+typedef struct {
+
+ unsigned long MobileDisconnects[Q850_MAX_CAUSES];
+ unsigned long VoipDisconnects[Q850_MAX_CAUSES];
+} VOIP_CALL_DISCONNECT_STATS;
+
+typedef struct {
+
+ unsigned long IncomingCallAttempts;
+ unsigned long IncomingCallsConnected;
+ unsigned long OutgoingCallAttempts;
+ unsigned long OutgoingCallsConnected;
+
+} VOIP_CALL_COMPLETION_STATS;
+
+typedef struct {
+
+ VOIP_CALL_COMPLETION_STATS CallCompletionStats;
+
+ VOIP_CALL_DISCONNECT_STATS CallDisconnectStats;
+
+} VOIP_CALL_STATISTICS;
+
+
+
+
+
+
+
+
+typedef struct _CALL_CONTROL_BLOCK{
+
+ HCALL LanCallHandle;
+ HSSECALL SuppCallHandle;
+ HPROTCONN TpktHandle;
+ BOOL ControlConnected;
+
+ unsigned short H323CRV;
+
+
+ H323_CALL_STATE H323CallState;
+ H323_CALL_STATE PreviousCallState;
+ H323_CALL_EVENT CurrentEvent;
+
+ LUDB_ID LudbId;
+
+ H323_CALL_DIRECTION CallDirection;
+ BOOL Q931Connected;
+
+ BOOL IsSuppCall;
+ BOOL CallTransferred;
+ short OldIndex;
+ BOOL InBandInfo;
+
+ BOOL LocalRelease;
+ short Index;
+
+ TXN_ID LastTxnId;
+
+ HJCRTPSESSION RtpHandle;
+ REMOTE_TERMINAL_TYPE RemoteType;
+ BOOL FastStart;
+ HCHAN OutChannelHandle;
+ HCHAN InChannelHandle;
+ HCHAN NonAudioChannelHandle;
+ BOOL InChannelConnected;
+ BOOL OutChannelConnected;
+ BOOL CanDropCall;
+
+ int CallingNumberType;
+ int CallingNumberingPlan;
+ int CalledNumberType;
+ int CalledNumberingPlan;
+ int CallingPartyPI;
+ int CallingPartySI;
+
+ BOOL CodecInfoSent;
+ BOOL GSMFullRateCapability;
+ BOOL GSMEnhancedFullRateCapability;
+ BOOL RemoteGSMFullRateCapability;
+ BOOL RemoteGSMEnhancedFullRateCapability;
+ VOIP_CALL_SELECTED_CODEC CodecUsed;
+
+ int remoteGsmFrTxIndex;
+ int remoteGsmFrRxIndex;
+ int remoteGsmEfrTxIndex;
+ int remoteGsmEfrRxIndex;
+
+ BOOL Used;
+ int Magic;
+ char MobileNumber[VOIP_MAX_ISDN_NUMBER_LENGTH];
+ char RemotePartyId[VOIP_MAX_REMOTE_PARTY_ID_LENGTH];
+ char TransferringPartyId[VOIP_MAX_REMOTE_PARTY_ID_LENGTH];
+ char DisplayInfo[VOIP_MAX_DISPLAY_INFO_LENGTH];
+ STATE_TRANSITION_HISTORY StateTransitionHistory;
+
+} CALL_CONTROL_BLOCK, *PCALL_CONTROL_BLOCK;
+
+
+
+typedef struct {
+ HAPP StackHandle;
+ HSSEAPP SuppStackHandle;
+ HSSAPP SuppAppHandle;
+
+
+ PRADPIPE pH323TaskInputPipe;
+ PRADPIPE pRtpInputPipe;
+ char szGatekeeperAddress[MAX_IP_ADDRESS_STRING_LENGTH];
+
+ int Magic;
+ int RtpTaskHandle;
+
+ HSTIMER hsTimer;
+
+ BOOL DefaultCodecGsmFullRate;
+
+
+ /*
+ * Statistics fields
+ */
+
+ VOIP_CALL_STATISTICS CallStats;
+
+ unsigned long GKPort;
+ unsigned long GKIPAddress;
+ unsigned long Q931ResponseTimeOut;
+ unsigned long Q931ConnectTimeOut;
+ unsigned long Q931CallSignalingPort;
+ unsigned long t35CountryCode;
+ unsigned char gkIpAddrOctets[4];
+
+} H323TASK_CONFIG,*PH323TASK_CONFIG;
+
+
+
+
+
+
+typedef STATUS (*SM_FUNCTION)(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+
+
+typedef struct {
+ SM_FUNCTION smFunc;
+ H323_CALL_STATE NextState;
+} H323_CALL_STATE_INFO, *PH323_CALL_STATE_INFO;
+
+typedef struct {
+ VOIP_API_MESSAGE VoipMsg;
+ BOOL Used;
+}API_MESSAGE,*PAPI_MESSAGE;
+
+
+#define MAX_CALLING_PARTY_ADDRESS_SIZE 64
+#define MAX_CALLED_PARTY_ADDRESS_SIZE 64
+
+typedef struct
+{
+ char pszCallingPartyId[MAX_CALLING_PARTY_ADDRESS_SIZE];
+
+ char pszCalledPartyId[MAX_CALLED_PARTY_ADDRESS_SIZE];
+
+} CALL_OFFERING_DETAILS, *PCALL_OFFERING_DETAILS;
+
+typedef struct
+{
+ BOOL GSMCodecCapability;
+
+ BOOL GSMFullRateCapability;
+
+ BOOL GSMEnhancedFullRateCapability;
+
+} REMOTE_CAPABILITIES_DETAILS, *PREMOTE_CAPABILITIES_DETAILS;
+
+
+#define WAIT_FOREVER_FOR_H323_EVENTS(); while(1) \
+{ \
+seliSelect(); \
+}
+
+#define WAIT_FOREVER_FOR_RTP_EVENTS(); WAIT_FOREVER_FOR_H323_EVENTS();
+
+
+
+
+void InitializeCallControlBlocks(void);
+void InitializeCCB(PCALL_CONTROL_BLOCK pCCB,short Index);
+
+
+
+
+
+PCALL_CONTROL_BLOCK GetCCBFromPool(void);
+void ReturnCCBToPool(PCALL_CONTROL_BLOCK pCCB);
+PCALL_CONTROL_BLOCK GetCCBByTpktHandle(HPROTCONN TpktHandle);
+
+void VoipDropAllCalls(void);
+
+void DumpStateTransitionHistory(PCALL_CONTROL_BLOCK pCCB);
+
+#endif /* #ifndef CCB_HDR_INC */ \ No newline at end of file
diff --git a/data/mnet/GP10/Host/voip/include/eventhandlers.h b/data/mnet/GP10/Host/voip/include/eventhandlers.h
new file mode 100644
index 0000000..138516a
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/include/eventhandlers.h
@@ -0,0 +1,246 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : EventHandlers.H *
+ * *
+ * Description : Hdr file containing data structure and function prototypes *
+ * definitions for the file EventHandlers.cpp *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+
+#ifndef EVENTHANDLERS_HDR_INC
+#define EVENTHANDLERS_HDR_INC
+
+#include <stdlib.h>
+#include <cm.h>
+
+
+
+
+/*
+ * Function Prototypes
+ */
+int CALLCONV NewCallHandler(
+ IN HAPP hApp,
+ IN HCALL hsCall,
+ OUT LPHAPPCALL lphaCall);
+int CALLCONV RASEventHandler(
+ IN HAPP hApp,
+ IN cmRegState regState,
+ IN cmRegEvent regEvent,
+ IN int regEventHandle);
+int CALLCONV EventCallStateChanged(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN UINT32 State,
+ IN UINT32 StateMode);
+int CALLCONV EventCallInfo(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN char* Display,
+ IN char* User,
+ IN int UserSize);
+int CALLCONV EventCallCapabilities(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN cmCapStruct* capabilities[]);
+int CALLCONV EventCallCapabilitiesExt(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN cmCapStruct*** capabilities[]);
+int CALLCONV EventCallNewChannel(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN HCHAN hsChan,
+ OUT LPHAPPCHAN lphaChan);
+int CALLCONV EventCallCapabilitiesResponse(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN UINT32 status);
+int CALLCONV EventCallMasterSlaveStatus(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN UINT32 status);
+int CALLCONV EventCallRoundTripDelay(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN INT32 delay);
+int CALLCONV EventCallUserInput(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN INT32 userInputId);
+int CALLCONV EventCallRequestMode(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN cmReqModeStatus status,
+ IN INT32 nodeId);
+int CALLCONV EventCallMiscStatus(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN cmMiscStatus status);
+int CALLCONV EventCallControlStateChanged(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN UINT32 State,
+ IN UINT32 StateMode);
+int CALLCONV EventCallMasterSlave(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN UINT32 terminalType,
+ IN UINT32 statusDeterminationNumber);
+int CALLCONV EventCallFacility(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN int handle,
+ OUT IN BOOL *proceed);
+int CALLCONV EventCallFastStartSetup(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN cmFastStartMessage *fsMessage);
+int CALLCONV suppEventForwardActivated(
+ IN HSSEAPPCALL hSSEaCall,
+ IN HSSECALL hSSECall
+ );
+int CALLCONV suppEventForwardDeactivated(
+ IN HSSEAPPCALL hSSEaCall,
+ IN HSSECALL hSSECall
+ );
+int CALLCONV suppEventCallReroute(
+ IN HSSEAPPCALL hSSEaCallPri,
+ IN HSSECALL hSSECallPri,
+ OUT HSSECALL *hSSECallSec);
+int CALLCONV suppEventCallTransfer(
+ IN HSSEAPPCALL hSSEaCallPri,
+ IN HSSECALL hSSECallPri,
+ OUT HSSECALL* hSSECallSec);
+int CALLCONV
+EventCallH450SupplementaryService(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN cmCallQ931MsgType msgType,
+ IN int nodeId,
+ IN int size);
+int CALLCONV EventChannelSetAddress(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN UINT32 ip,
+ IN UINT16 port);
+int CALLCONV EventChannelStateChanged(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN UINT32 State,
+ IN UINT32 StateMode);
+int CALLCONV EventChannelNewRate(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN UINT32 rate);
+int CALLCONV EventChannelMaxSkew(
+ IN HAPPCHAN haChan1,
+ IN HCHAN hsChan1,
+ IN HAPPCHAN haChan2,
+ IN HCHAN hsChan2,
+ IN UINT32 skew);
+int CALLCONV EventChannelParameters(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN char* channelName,
+ IN HAPPCHAN haChanSameSession,
+ IN HCHAN hsChanSameSession,
+ IN HAPPCHAN haChanAssociated,
+ IN HCHAN hsChanAssociated,
+ IN UINT32 rate);
+int CALLCONV EventChannelVideoFastUpdatePicture(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan);
+int CALLCONV EventChannelVideoFastUpdateGOB(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN int firstGOB,
+ IN int numberOfGOBs);
+int CALLCONV EventChannelVideoFastUpdateMB(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN int firstGOB,
+ IN int firstMB,
+ IN int numberOfMBs);
+int CALLCONV EventChannelHandle(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN int dataTypeHandle,
+ IN cmCapDataType dataType);
+int CALLCONV EventChannelRequestCloseStatus(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN cmRequestCloseStatus status);
+int CALLCONV EventChannelTSTO(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN INT8 isCommand,
+ IN INT8 tradeoffValue);
+int CALLCONV EventChannelMediaLoopStatus(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN cmMediaLoopStatus status);
+int CALLCONV EventChannelReplace(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN HAPPCHAN haReplacedChannel,
+ IN HCHAN hsReplacedChannel);
+int CALLCONV EventChannelFlowControlToZero(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan);
+int CALLCONV EventHookSend(
+ IN HPROTCONN hConn,
+ IN int nodeId,
+ IN BOOL error);
+int CALLCONV EventHookRecv(
+ IN HPROTCONN hConn,
+ IN int nodeId,
+ IN BOOL error);
+
+int CALLCONV EventChannelSetRTCPAddress(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN UINT32 ip,
+ IN UINT16 port );
+int CALLCONV EventChannelRTPDynamicPayloadType(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN INT8 dynamicPayloadType );
+int CALLCONV EventChannelGetRTCPAddress(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN UINT32* ip,
+ IN UINT16* port );
+
+BOOL CALLCONV
+EventHookSendTo(
+ IN HPROTCONN hConn,
+ IN int nodeId,
+ IN int nodeIdTo,
+ IN BOOL error
+ );
+
+BOOL CALLCONV EventHookRecvFrom(
+ IN HPROTCONN hConn,
+ IN int nodeId,
+ IN int nodeIdFrom,
+ IN BOOL multicast,
+ IN BOOL error
+ );
+
+#endif /* #ifndef EVENTHANDLERS_HDR_INC */
diff --git a/data/mnet/GP10/Host/voip/include/h323interface.h b/data/mnet/GP10/Host/voip/include/h323interface.h
new file mode 100644
index 0000000..be117e0
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/include/h323interface.h
@@ -0,0 +1,87 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : H323Interface.H *
+ * *
+ * Description : API Interface for the H323 task *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+#ifndef H323INTERFACE_HDR_INC
+#define H323INTERFACE_HDR_INC
+
+
+#define MOBILE_DISPLAY_INDEX_OFFSET 1
+#define MOBILE_DISPLAY_INDEX_WIDTH 8
+#define MOBILE_DISPLAY_MCB_OFFSET MOBILE_DISPLAY_INDEX_OFFSET+MOBILE_DISPLAY_INDEX_WIDTH
+#define MOBILE_DISPLAY_MCB_WIDTH 10
+#define MOBILE_DISPLAY_IMSI_OFFSET MOBILE_DISPLAY_MCB_OFFSET+MOBILE_DISPLAY_MCB_WIDTH
+#define MOBILE_DISPLAY_IMSI_WIDTH 17
+#define MOBILE_DISPLAY_STATE_OFFSET MOBILE_DISPLAY_IMSI_OFFSET+MOBILE_DISPLAY_IMSI_WIDTH
+#define MOBILE_DISPLAY_STATE_WIDTH 25
+#define MOBILE_DISPLAY_NUMBER_OFFSET MOBILE_DISPLAY_STATE_OFFSET+MOBILE_DISPLAY_STATE_WIDTH
+#define MOBILE_DISPLAY_NUMBER_WIDTH 15
+#define MOBILE_DISPLAY_LUDBID_OFFSET MOBILE_DISPLAY_NUMBER_OFFSET+MOBILE_DISPLAY_NUMBER_WIDTH
+#define MOBILE_DISPLAY_LUDBID_WIDTH 10
+#define MOBILE_DISPLAY_DISPLAY_LENGTH MOBILE_DISPLAY_LUDBID_OFFSET+MOBILE_DISPLAY_LUDBID_WIDTH+50
+
+#define CALL_DISPLAY_INDEX_OFFSET 1
+#define CALL_DISPLAY_INDEX_WIDTH 7
+#define CALL_DISPLAY_CCB_OFFSET CALL_DISPLAY_INDEX_OFFSET+CALL_DISPLAY_INDEX_WIDTH
+#define CALL_DISPLAY_CCB_WIDTH 10
+#define CALL_DISPLAY_CALLSTATE_OFFSET CALL_DISPLAY_CCB_OFFSET+CALL_DISPLAY_CCB_WIDTH
+#define CALL_DISPLAY_CALLSTATE_WIDTH 35
+#define CALL_DISPLAY_REMOTE_PARTY_OFFSET CALL_DISPLAY_CALLSTATE_OFFSET+CALL_DISPLAY_CALLSTATE_WIDTH
+#define CALL_DISPLAY_REMOTE_PARTY_WIDTH 20
+#define CALL_DISPLAY_RTP_HANDLE_OFFSET CALL_DISPLAY_REMOTE_PARTY_OFFSET+CALL_DISPLAY_REMOTE_PARTY_WIDTH
+#define CALL_DISPLAY_RTP_HANDLE_WIDTH 11
+#define CALL_DISPLAY_DISPLAY_LENGTH CALL_DISPLAY_RTP_HANDLE_OFFSET+CALL_DISPLAY_RTP_HANDLE_WIDTH+50
+
+#define ASCII_STAR_CHAR 42
+
+
+
+
+
+
+void H323MessageHandler(PVOIP_API_MESSAGE pMsg);
+HJCRTPSESSION H323CallGetRTPHandle(PCALL_CONTROL_BLOCK pCCB);
+void InterfaceCallSetup(PVOIP_API_MESSAGE pMsg);
+void InterfaceCallAnswer(PVOIP_API_MESSAGE pMsg);
+void InterfaceCallAlerting(PVOIP_API_MESSAGE pMsg);
+void InterfaceCallRelease(PVOIP_API_MESSAGE pMsg);
+void InterfaceShutdownH323Task(void);
+void InterfaceSendDtmf(PVOIP_API_MESSAGE pMsg);
+void InterfaceCallTransfer(PVOIP_API_MESSAGE pMsg);
+bool SendMessage(PRADPIPE pInputPipe,PVOIP_API_MESSAGE pMsg);
+bool SendMessageToRtp(PRADPIPE pInputPipe,RtpInputMessage_t *pMsg);
+
+void VoipShowAllCalls(void);
+void VoipShowCall(PCALL_CONTROL_BLOCK pCCB);
+
+#ifndef LOOPBACK_MODE
+int SysCommand_Voip(T_SYS_CMD action);
+#endif
+
+#ifdef LOOPBACK_MODE
+RTP_READ_STATUS RTPEventHandler( HJCRTPSESSION hRTP, VOIP_CALL_HANDLE CallHandle, TXN_ID TxnId);
+#endif
+void InterfaceCallProceeding(PVOIP_API_MESSAGE pMsg);
+
+void DisplayCallInfo(PCALL_CONTROL_BLOCK pCCB,int index,int displayIndex);
+
+
+#endif /* #ifndef H323INTERFACE_HDR_INC */ \ No newline at end of file
diff --git a/data/mnet/GP10/Host/voip/include/h323sm.h b/data/mnet/GP10/Host/voip/include/h323sm.h
new file mode 100644
index 0000000..03d91ec
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/include/h323sm.h
@@ -0,0 +1,30 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : H323SM.h *
+ * *
+ * Description : State Machine Data structure definitions and function *
+ * prototypes *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+
+#ifndef H323SM_HDR_INC
+#define H323SM_HDR_INC
+
+
+
+#endif /* #ifndef H323SM_HDR_INC */ \ No newline at end of file
diff --git a/data/mnet/GP10/Host/voip/include/h323task.h b/data/mnet/GP10/Host/voip/include/h323task.h
new file mode 100644
index 0000000..9754679
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/include/h323task.h
@@ -0,0 +1,58 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : H323Task.H *
+ * *
+ * Description : *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+#ifndef H323TASK_HDR_INC
+#define H323TASK_HDR_INC
+
+#include <ci.h>
+#include <cibuf.h>
+#include "ccb.h"
+#include "voip\voipapi.h"
+#include "util.h"
+
+#define LOCK_CCB_LIST();
+#define LOCK_MCB_LIST();
+
+#define UNLOCK_CCB_LIST();
+#define UNLOCK_MCB_LIST();
+
+
+int H323Task(void);
+int InitializeH323Task(void);
+void ShutdownH323Task(void);
+HAPP InitializeStackInstance();
+
+
+BOOL StackConfigSetQ931Parameters(HCFG hCfg,unsigned long ResponseTimeout,
+ unsigned long ConnectTimeout,unsigned long SignallingPort);
+BOOL StackConfigSetCountryCode(HCFG hCfg,unsigned long CountryCode);
+BOOL StackConfigSetGateKeeperAddress(HCFG hCfg,unsigned char *ipAddress, unsigned long port);
+void ShowStackConfigSettings(void);
+
+
+
+
+
+#endif /* #ifndef H323TASK_HDR_INC */
+
+
+
diff --git a/data/mnet/GP10/Host/voip/include/rtptask.h b/data/mnet/GP10/Host/voip/include/rtptask.h
new file mode 100644
index 0000000..b0c9451
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/include/rtptask.h
@@ -0,0 +1,67 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : RtpTask.h *
+ * *
+ * Description : Hdr file containing data structures etc for file RtpTask.cpp *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+#ifndef RTPTASK_HDR_INC
+#define RTPTASK_HDR_INC
+
+#include <vxworks.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <tickLib.h>
+#include <drv\timer\timerDev.h>
+#include <taskLib.h>
+
+#include "voip\jetrtp.h"
+
+
+
+typedef enum
+{
+ /* ?? -> RTP */
+ RtpInputMessageTypeTaskShutdown,
+
+}RtpInputMessageType;
+
+typedef struct
+{
+ RtpInputMessageType Type;
+/*
+ union
+ {
+ };
+*/
+}RtpInputMessage_t;
+
+
+
+/*
+ * Common function prototypes
+ */
+void SignalRtpTaskShutdown(void);
+int RtpTask(void);
+void RtpEventHandler(HJCRTPSESSION RtpHandle,void *);
+void RtpInputMessageHandler(RtpInputMessage_t* pMsg );
+void ShutdownRtpTask( void );
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/voip/include/smroutines.h b/data/mnet/GP10/Host/voip/include/smroutines.h
new file mode 100644
index 0000000..7dd3a65
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/include/smroutines.h
@@ -0,0 +1,75 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : smroutines.h *
+ * *
+ * Description : State Machine functions/procedures header *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+
+#ifndef SMROUTINES_HDR_INC
+#define SMROUTINES_HDR_INC
+
+#include "ccb.h"
+#include "ril3/ie_called_bcd.h"
+#include "ril3/ie_calling_bcd.h"
+
+
+void RunStateMachine(PCALL_CONTROL_BLOCK pCCB,PVOID Context, H323_CALL_EVENT Event);
+STATUS smCallOffering(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smCallSetup(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smSetupFastChannels(PCALL_CONTROL_BLOCK pCCB);
+STATUS smDropCall(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smAnswerCall(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smCallConnected(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smCallDisconnected(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smCallProceeding(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smCallRingBack(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smCallDestinationRejected(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smCallIdle(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smRecvRemoteCapabilities(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smH245TransportConnected(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smH245Connected(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smRecvCapabilitiesAck(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smRecvCapabilitiesNak(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smChannelOffering(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smInChannelDisconnected(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smInChannelConnected(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smOutChannelConnected(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smOutChannelDisconnected(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+char *GetH323CallStateName(H323_CALL_STATE CallState);
+char *GetH323EventName(H323_CALL_EVENT CallEvent);
+char* GetCallStateModeName(int Mode);
+void UpdateStateTransitionHistory(PCALL_CONTROL_BLOCK pCCB,H323_CALL_STATE LatestState,H323_CALL_EVENT LatestEvent,H323_CALL_STATE NextState);
+STATUS smFatalStateMachineViolation(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+STATUS smNonFatalStateMachineViolation(PCALL_CONTROL_BLOCK pCCB,PVOID Context);
+void SendLocalTermCapSet(PCALL_CONTROL_BLOCK pCCB);
+void SendCodecInfo(PCALL_CONTROL_BLOCK pCCB);
+BOOL SendProgressMessageToCC(PCALL_CONTROL_BLOCK pCCB);
+char *GetVoipNumTypeStr(Q931_IE_CALL_PARTY_NO_TYPE numType);
+char *GetVoipNumPlanStr(Q931_IE_CALL_PARTY_NO_PLAN numPlan);
+char *GetVoipPIStr(Q931_IE_CALLING_PARTY_NO_PI PI);
+char *GetVoipSIStr(Q931_IE_CALLING_PARTY_NO_SI SI);
+void VoipDisplayCallParties(PCALL_CONTROL_BLOCK pCCB);
+void VoipToGsmNumType(Q931_IE_CALL_PARTY_NO_TYPE voipNumType,T_CNI_RIL3_TYPE_OF_NUMBER *gsmNumType);
+void VoipToGsmNumPlan(Q931_IE_CALL_PARTY_NO_PLAN voipNumPlan,T_CNI_RIL3_NUMBERING_PLAN_ID *gsmNumPlan);
+void VoipToGsmPI(Q931_IE_CALLING_PARTY_NO_PI voipPI,T_CNI_RIL3_PRESENTATION_INDICATOR *gsmPI);
+void VoipToGsmSI(Q931_IE_CALLING_PARTY_NO_SI voipSI,T_CNI_RIL3_SCREENING_INDICATOR *gsmSI);
+void GsmToVoipNumType(T_CNI_RIL3_TYPE_OF_NUMBER gsmNumType,Q931_IE_CALL_PARTY_NO_TYPE *voipNumType);
+void GsmToVoipNumPlan(T_CNI_RIL3_NUMBERING_PLAN_ID gsmNumPlan,Q931_IE_CALL_PARTY_NO_PLAN *voipNumPlan);
+void GsmToVoipPI(T_CNI_RIL3_PRESENTATION_INDICATOR gsmPI,Q931_IE_CALLING_PARTY_NO_PI *voipPI);
+void GsmToVoipSI(T_CNI_RIL3_SCREENING_INDICATOR gsmSI,Q931_IE_CALLING_PARTY_NO_SI *voipSI);
+
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/voip/include/util.h b/data/mnet/GP10/Host/voip/include/util.h
new file mode 100644
index 0000000..e2b5c86
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/include/util.h
@@ -0,0 +1,72 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : Util.h *
+ * *
+ * Description : Hdr file for utilities program file *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+
+#ifndef UTIL_HDR_INC
+#define UTIL_HDR_INC
+
+#include "ccb.h"
+
+
+
+
+#define ArraySize( Array ) ( sizeof( Array ) / sizeof( Array[0] ) )
+
+
+PRADPIPE RadPipeOpen( char* Name, int nMsgSize, int nMaxMsgs, pfnCallBackFunction pfnUserCallBack);
+BOOL RadPipeWrite( PRADPIPE pPipe, PVOID pMessage);
+void RadPipeCallBack( int hPipe, piEvents Event, BOOL Error, void* pData);
+BOOL RadPipeClose( PRADPIPE pPipe);
+REMOTE_TERMINAL_TYPE DetectRemoteTerminalType(PCALL_CONTROL_BLOCK pCCB);
+char* GetCallStateName( int State);
+char* GetCallStateModeName(int Mode);
+char* GetRASEventName( int Event);
+char* GetChannelStateName( int State);
+char* GetChannelStateModeName(int Mode);
+char* GetControlStateName(int State);
+void CapabilityPrint(cmCapStruct* pCaps);
+void jcULongPack( ULONG uLong, UCHAR** ppszBuffer, int* pnSize);
+ULONG jcULongUnpack( UCHAR** ppszBuffer);
+void jcUShortPack( USHORT uShort, UCHAR** ppszBuffer, int* pnSize);
+USHORT jcUShortUnpack( UCHAR** ppszBuffer);
+void jcBufferPack( PVOID pData, USHORT nDataSize, UCHAR** ppszBuffer, int* pnSize );
+PVOID jcBufferUnpack( USHORT nDataSize, UCHAR** ppszBuffer );
+char* jcIpToString( UINT32 addr, UINT16 port );
+void jcStringPack( char* pszString, UCHAR** ppszBuffer, int* pnSize );
+char* jcStringUnpack( UCHAR** ppszBuffer );
+PJCTIMER TimerCreate(UINT32 tmInterval, pfnCommonCallBack pfnCallBack, PVOID pData, BOOL bMultiple );
+void VxWorksTimerCallBack( PVOID pData );
+BOOL TimerDelete( PJCTIMER pTimer );
+void DumpCCBAndRtp(void);
+char* jcBCDToString( char* String, unsigned char* Digits, short nDigits );
+PAPI_MESSAGE GetFreeMsgFromPool(void);
+void PutMsgIntoPool(PAPI_MESSAGE pMsg);
+
+PJCTIMER AllocTimerFromPool(void);
+void ReturnTimerToPool(PJCTIMER pTimer);
+void TimerArrayInit(void);
+void PipeArrayInit(void);
+void jcStringToBCD(char *string,unsigned char *digits, short *nDigits);
+char *ExtractTelString(char *buffer);
+char *GetQ850CauseCodeName(unsigned char cause_value);
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/voip/include/viperip.h b/data/mnet/GP10/Host/voip/include/viperip.h
new file mode 100644
index 0000000..0899201
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/include/viperip.h
@@ -0,0 +1,113 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : viperip.h *
+ * *
+ * Description : Data Structures for IP pkt framing for viperip *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+#ifndef VIPER_IP_HDR_INC
+#define VIPER_IP_HDR_INC
+
+
+
+#include "vxworks.h"
+#include "etherlib.h"
+#include "netinet\if_ether.h"
+#include "stdlib.h"
+#include "stdio.h"
+#include "semlib.h"
+
+/*
+ * Definitions
+ */
+
+#define VIPERCELL_ETHERNET_INTERFACE "motfec0"
+#define VIPER_IP_PROTOCOL_TYPE 0x0800
+#define VIPER_IP_PROTOCOL_VERSION 4
+#define VIPER_IP_HDR_OFFSET 14
+#define VIPER_IP_HDR_SIZE 20
+#define VIPER_IP_UDP_HDR_OFFSET VIPER_IP_HDR_OFFSET+VIPER_IP_HDR_SIZE
+#define VIPER_IP_UDP_HDR_SIZE 8
+#define VIPER_IP_TYPE_OF_SERVICE 0xa0 /* For CRITIC/ECP IP Packet precedence */
+#define VIPER_IP_PROTOCOL_TYPE_UDP IPPROTO_UDP
+#define VIPER_IP_DEFAULT_TTL 32
+
+/*
+ * Data structures
+ *
+ */
+typedef struct {
+ unsigned char version:4;
+ unsigned char hdrLength:4;
+ unsigned char tos;
+ unsigned short totalLength;
+ unsigned short id;
+ unsigned short flags:3;
+ unsigned short fragOffset:13;
+ unsigned char ttl;
+ unsigned char protocol;
+ unsigned short checksum;
+ unsigned char sourceAddress[4];
+ unsigned char destAddress[4];
+}VIPER_IP_HDR, *PVIPER_IP_HDR;
+
+
+typedef struct {
+ unsigned short sourcePort;
+ unsigned short destPort;
+ unsigned short udpLength;
+ unsigned short udpChecksum;
+}VIPER_UDP_HDR, *PVIPER_UDP_HDR;
+
+
+
+typedef struct {
+ union {
+ unsigned long s_addr;
+ unsigned char s_bytes[4];
+ } addr;
+}internetAddress;
+
+
+
+
+/*
+ * Function prototypes
+ */
+void vipInit();
+void vipSetDefaultGateway(char *gwIpAddress);
+void vipGetEthernetAddress(char *ipAddress, unsigned char *etherAddress);
+BOOL vipIsPeerOnSameSubnet(char *peerAddress);
+void vipConstructNetHeaders(unsigned long remoteIp,
+ unsigned short remotePort,
+ unsigned short localPort,
+ unsigned char *pktBuffer,
+ unsigned short *dataOffset
+ );
+char *vipGetLocalIpAddress(void);
+unsigned short vipComputeIpCksum(unsigned short *addr,int len);
+void vipSend(unsigned char *pktBuffer, int dataLength);
+void vipAddRtpPort(unsigned short rtpPort, SEM_ID rtpSemId,unsigned char *recvBuffPtr);
+
+
+#ifdef DEBUG
+void StartVipTest(int pkts,int ticks, char *destAddr);
+void VipTesterProc(void);
+#endif
+
+#endif /* #ifndef VIPER_IP_HDR_INC */ \ No newline at end of file
diff --git a/data/mnet/GP10/Host/voip/include/vipermem.h b/data/mnet/GP10/Host/voip/include/vipermem.h
new file mode 100644
index 0000000..77723ea
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/include/vipermem.h
@@ -0,0 +1,30 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : vipermem.h *
+ * *
+ * Description : *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+#ifndef VIPERMEM_HDR_INC
+#define VIPERMEM_HDR_INC
+
+
+void *ViperAlloc(int BlockSize, unsigned char InitValue);
+void ViperFree(void *Block);
+
+#endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/voip/makefile b/data/mnet/GP10/Host/voip/makefile
new file mode 100644
index 0000000..84f21f7
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/makefile
@@ -0,0 +1,16 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+SUBDIRS= src rtp
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+copyall:
+ $(CP) bin\*.out $(TOP_OF_VOB)\bin\*.out \ No newline at end of file
diff --git a/data/mnet/GP10/Host/voip/rtp/Makefile b/data/mnet/GP10/Host/voip/rtp/Makefile
new file mode 100644
index 0000000..0eb1d89
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/rtp/Makefile
@@ -0,0 +1,52 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+
+# These Must be Properly Defined
+THIS_APP_DIR = voip
+THIS_DIRECTORY = rtp
+MY_OUTPUT = $(OBJDIR)\jetrtp.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o)
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS)
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/voip/rtp/jetrtp.cpp b/data/mnet/GP10/Host/voip/rtp/jetrtp.cpp
new file mode 100644
index 0000000..496c9a9
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/rtp/jetrtp.cpp
@@ -0,0 +1,1445 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : jetrtp.cpp *
+ * *
+ * Description : Rtp Module *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <vxWorks.h>
+#include <sockLib.h>
+#include <zbuflib.h>
+#include <zbufsocklib.h>
+#include <inetLib.h>
+#include <tasklib.h>
+#include <memlib.h>
+#include <semlib.h>
+#include <drv\timer\timerdev.h>
+
+#include "Os/JCTask.h"
+#include "GP10OsTune.h"
+#include "VOIP/jetrtp.h"
+#include "voip/voipapi.h"
+#include "cc/hortp.h"
+#include "LOGGING/vcmodules.h"
+#include "LOGGING/vclogging.h"
+#include "MnetModuleId.h"
+#ifdef VIPER_IP
+#include "viperip.h"
+#endif
+
+#define IN
+#define OUT
+
+/*
+ * Global Variables
+ */
+int RtpThreadCounter=0;
+int RtpPortToDebug=0;
+static BOOL RtpDebugPacketIntervalsOn=FALSE;
+int DebugRecvCount=0,DebugSendCount=0;
+static rtpPacketBuffer_t *headFreeRtpBufferList,*tailFreeRtpBufferList;
+static RTP_BUFFERS_LOCK rtpBuffersLock;
+static RTP_SESSION_INFO RtpSessions[MAX_RTP_SESSIONS];
+static int RtpSessionCount=0;
+static UINT32 maxInterPacketInterval,sysClockTicksPerSecond;
+static char addrStrBuff[INET_ADDR_LEN];
+
+UINT32 BitfieldSet(
+ IN UINT32 value,
+ IN UINT32 bitfield,
+ IN int nStartBit,
+ IN int nBits);
+UINT32 BitfieldGet(
+ IN UINT32 value,
+ IN int nStartBit,
+ IN int nBits);
+int ConvertHeader2l (UINT8 *buff,int startIndex,int size);
+int ConvertHeader2h (UINT8 *buff,int startIndex,int size);
+void jcRtpThread(int Context, int threadIndex);
+
+
+JCTask *RTPTaskThreads[MAX_ACTIVE_CALLS+MAX_HANDOVER_CHANNELS];
+
+
+/*
+ * InitializeJetRtp
+ */
+void
+InitializeJetRtp()
+{
+ memset(RtpSessions,0,(sizeof(RTP_SESSION_INFO)*MAX_RTP_SESSIONS));
+ RtpSessionCount=0;
+ vipInit();
+ sysTimestampEnable();
+ sysClockTicksPerSecond = sysTimestampFreq();
+ maxInterPacketInterval = (sysClockTicksPerSecond / 1000) * 40 ;
+}
+
+
+/*
+ * jcRtpInit
+ */
+INT32
+jcRtpInit(void)
+{
+ return 0;
+}
+
+
+/*
+ * jcRtpEnd
+ */
+void
+jcRtpEnd(void)
+{
+ return;
+}
+
+
+/*
+ * jcRtpGetAllocationSide
+ */
+int
+jcRtpGetAllocationSize(void)
+{
+ return sizeof(jcRtpSession);
+}
+
+
+/*
+ * jcRtpOpenFrom
+ */
+HJCRTPSESSION
+jcRtpOpenFrom(
+ IN UINT16 port,
+ IN UINT32 ssrcPattern,
+ IN UINT32 ssrcMask,
+ IN void* buffer,
+ IN int bufferSize)
+{
+ jcRtpSession *s = (jcRtpSession *)buffer;
+ int sockAddrSize=0;
+ struct sockaddr_in serverAddr;
+
+ if (bufferSize < jcRtpGetAllocationSize())
+ return NULL;
+
+ memset(buffer, 0 , jcRtpGetAllocationSize());
+
+ s->isAllocated = FALSE;
+ s->sSrcPattern = ssrcPattern;
+ s->sSrcMask = ssrcMask;
+ s->sequenceNumber = (UINT16)rand();
+
+
+ s->socket = socket (AF_INET, SOCK_DGRAM, 0);
+ if (s->socket == ERROR)
+ {
+ perror ("socket");
+ return (NULL);
+ }
+/*
+ s->sendSocket = socket (AF_INET, SOCK_DGRAM, 0);
+ if (s->sendSocket == ERROR)
+ {
+ perror ("socket");
+ close(s->socket);
+ return (NULL);
+ }
+*/
+ sockAddrSize = sizeof (struct sockaddr_in);
+ bzero ((char *) &serverAddr, sockAddrSize);
+ serverAddr.sin_family = AF_INET;
+ serverAddr.sin_port = htons (port);
+
+ s->localPort = port;
+#ifndef VIPER_IP
+ bind (s->socket, (struct sockaddr *) &serverAddr, sockAddrSize);
+#endif
+ s->sendSocket = s->socket;
+/*
+ serverAddr.sin_port = 0;
+
+ bind (s->sendSocket, (struct sockaddr *) &serverAddr, sockAddrSize);
+*/
+ jcRtpRegenSSRC((HJCRTPSESSION)s);
+
+ return (HJCRTPSESSION)s;
+}
+
+
+
+
+/*
+ * jcRtpOpen
+ */
+HJCRTPSESSION
+jcRtpOpen(
+ IN UINT16 port,
+ IN UINT32 ssrcPattern,
+ IN UINT32 ssrcMask)
+{
+ return jcRtpOpenEx(port, ssrcPattern, ssrcMask, NULL);
+}
+
+
+
+/*
+ * jcRtpOpenEx
+ */
+HJCRTPSESSION
+jcRtpOpenEx(
+ IN UINT16 port,
+ IN UINT32 ssrcPattern,
+ IN UINT32 ssrcMask,
+ IN char * cname)
+{
+ jcRtpSession *s = (jcRtpSession *)calloc(sizeof(jcRtpSession),1);
+
+ if (s==NULL)
+ return NULL;
+
+ s->Magic = JCRTP_MAGIC;
+ s->RtpThreadId = 0;
+ s->useFastReadHandler = FALSE;
+
+ if ((jcRtpSession *)jcRtpOpenFrom(port, ssrcPattern, ssrcMask, (void*)s, jcRtpGetAllocationSize())==NULL)
+ {
+ cfree((char *)s);
+ return NULL;
+ }
+ else {
+ s->bytesSent = s->bytesReceived = s->sendErrors = s->recvErrors = 0;
+ AddNewRtpSession(s);
+ }
+ return (HJCRTPSESSION)s;
+}
+
+
+
+/*
+ * jcRtpClose
+ */
+UINT32
+jcRtpClose(
+ IN HJCRTPSESSION hRTP)
+{
+ jcRtpSession *s = (jcRtpSession *)hRTP;
+
+
+ shutdown(s->socket,1);
+ if (s->RtpThreadId)
+ {
+ taskDelete(s->RtpThreadId);
+ RtpThreadCounter--;
+ }
+ if (s->isAllocated) {
+ RemoveRtpSession(s);
+ cfree((char *)s);
+ }
+
+ return 0;
+}
+
+
+
+
+/*
+ * jcRtpGetSSRC
+ */
+UINT32
+jcRtpGetSSRC(
+ IN HJCRTPSESSION hRTP)
+{
+ jcRtpSession *s = (jcRtpSession *)hRTP;
+
+ return s->sSrc;
+}
+
+
+
+
+/*
+ * jcRtpSetEventHandler
+ */
+void
+jcRtpSetEventHandler(
+ IN HJCRTPSESSION hRTP,
+ IN LPJCRTPEVENTHANDLER eventHandler,
+ IN void * context,
+ IN char * taskName)
+{
+ DBG_FUNC("jcRtpSetEventHandler",H323_RTP_LAYER);
+ DBG_ENTER();
+
+ jcRtpSession *s = (jcRtpSession *)hRTP;
+ static char jcRtpThreadName[200];
+
+
+ if (s)
+ {
+
+ s->Magic = JCRTP_MAGIC;
+ s->eventHandler = eventHandler;
+ s->context = context;
+
+ memset(jcRtpThreadName,0,200);
+ sprintf(jcRtpThreadName,"Rtp%d%s",RtpThreadCounter++,taskName);
+ memset(s->RtpThreadName,0,MAX_RTP_THREAD_NAME_LENGTH);
+ if (strlen(jcRtpThreadName) < MAX_RTP_THREAD_NAME_LENGTH) {
+ strcpy(s->RtpThreadName,jcRtpThreadName);
+ }
+ DBG_TRACE("Spawning RTP thread %s; handle 0x%x\n",jcRtpThreadName,s);
+
+#ifdef VIPER_IP
+ s->semRtpRecv = semBCreate(SEM_Q_FIFO, SEM_EMPTY);
+ if (s->semRtpRecv == NULL) {
+ DBG_ERROR("Could not create message q for RTP thread %s\n",jcRtpThreadName);
+ return;
+ }
+ else {
+ vipAddRtpPort(s->localPort,s->semRtpRecv,s->rtpRecvPacketBuffer);
+ }
+#endif
+ RTPTaskThreads[RtpThreadCounter-1] = new JCTask(jcRtpThreadName);
+ s->RtpThreadId=RTPTaskThreads[RtpThreadCounter-1]->JCTaskSpawn(RTPSUB_TASK_PRIORITY, RTPSUB_TASK_OPTION, RTPSUB_TASK_STACK_SIZE,
+ (FUNCPTR)jcRtpThread, (int)s,RtpThreadCounter-1,0,0, 0, 0, 0, 0, 0, 0, MODULE_H323,JC_CRITICAL_TASK);
+
+
+ }
+ DBG_LEAVE();
+}
+
+
+/*
+ * jcRtpSetFastReadHandler
+ */
+void
+jcRtpSetFastReadHandler(HJCRTPSESSION hRTP,fastReadCallBack readHandlerFunction)
+{
+ DBG_FUNC("jcRtpSetFastReadHandler",H323_RTP_LAYER);
+ DBG_ENTER();
+ jcRtpSession *s = (jcRtpSession *)hRTP;
+
+ DBG_TRACE("Fast read handler specified for RTP Handle 0x%x\n",hRTP);
+
+ s->fastReadHandler = readHandlerFunction;
+ s->useFastReadHandler = TRUE;
+
+ DBG_LEAVE();
+}
+
+/*
+ * jcRtpThread
+ */
+void
+jcRtpThread(int Context, int threadIndex)
+{
+ DBG_FUNC("jcRtpThread",H323_RTP_LAYER);
+ DBG_ENTER();
+ jcRtpSession *s = (jcRtpSession *)Context;
+ struct sockaddr_in FromAddress;
+ int AddrSize;
+ int Status;
+ unsigned short *readCount;
+ RTP_READ_STATUS ReadStatus;
+ rtpParam RtpParam;
+
+ if (s->Magic != JCRTP_MAGIC)
+ {
+ return;
+ }
+
+ RTPTaskThreads[threadIndex]->JCTaskEnterLoop();
+
+ while(TRUE)
+ {
+
+#ifdef VIPER_IP
+ memset(&RtpParam,0,sizeof(RtpParam));
+ if (semTake(s->semRtpRecv, WAIT_FOREVER) != ERROR) {
+ readCount = (unsigned short *)&s->rtpRecvPacketBuffer[0];
+ jcRtpProcessFastReadPacket(s,(char *)&s->rtpRecvPacketBuffer[sizeof(unsigned short)],*readCount,&RtpParam,(struct sockaddr_in *)&FromAddress);
+ s->bytesReceived += *readCount;
+ (*s->fastReadHandler)(s,(unsigned char *)&s->rtpRecvPacketBuffer[sizeof(unsigned short)],*readCount,RtpParam,s->context);
+ }
+ else {
+ DBG_ERROR("Error receiving packet from MSG_Q in RTP thread %s\n",s->RtpThreadName);
+ }
+#else
+ AddrSize = sizeof(FromAddress);
+ memset(&FromAddress,0,AddrSize);
+
+ if (s->useFastReadHandler) {
+ ZBUF_ID zId;
+ memset(&RtpParam,0,sizeof(RtpParam));
+ int readBytes=MAX_RTP_PAYLOAD_SIZE;
+ zId = zbufSockRecvfrom(s->socket,0,&readBytes,(struct sockaddr *)&FromAddress,&AddrSize);
+ char *packetBuffer = zbufSegData(zId,NULL);
+ jcRtpProcessFastReadPacket(s,(char *)packetBuffer,readBytes,&RtpParam,(struct sockaddr_in *)&FromAddress);
+ s->bytesReceived += readBytes;
+ (*s->fastReadHandler)(s,(unsigned char *)packetBuffer,readBytes,RtpParam,s->context);
+ zbufDelete(zId);
+ }
+ else {
+ Status = recvfrom(s->socket,buf,1,MSG_PEEK,(struct sockaddr *)&FromAddress,&AddrSize);
+ if (Status != ERROR) {
+ ReadStatus = (*s->eventHandler)(s,s->context);
+ if (ReadStatus != RTP_READ_STATUS_OK) {
+ switch(ReadStatus) {
+ case RTP_READ_STATUS_NOT_CONNECTED:
+ inet_ntoa_b(FromAddress.sin_addr,addrStrBuff);
+ DBG_ERROR("RTP packet received from %s,Read routine returns NOT_CONNECTED\n",addrStrBuff);
+ break;
+ case RTP_READ_STATUS_READ_FAILED:
+ inet_ntoa_b(FromAddress.sin_addr,addrStrBuff);
+ DBG_ERROR("RTP packet received from %s,Read routine returns READ_FAILED\n",addrStrBuff);
+ break;
+ }
+ }
+ }
+ else {
+ DBG_ERROR("Error reading RTP packet; error %d\n",errno);
+ }
+ }
+#endif
+
+ }
+
+ RTPTaskThreads[threadIndex]->JCTaskNormExit();
+
+ DBG_LEAVE();
+ exit(1);
+}
+
+
+
+
+/*
+ * jcRtpSetRemoteAddress
+ */
+void
+jcRtpSetRemoteAddress(
+ IN HJCRTPSESSION hRTP, /* RTP Session Opaque Handle */
+ IN UINT32 ip,
+ IN UINT16 port)
+{
+ DBG_FUNC("jcRtpSetRemoteAddress",H323_RTP_LAYER);
+ DBG_ENTER();
+ jcRtpSession *s = (jcRtpSession *)hRTP;
+ struct sockaddr_in remoteAddress;
+
+ s->ip = ip;
+ s->port = port;
+ memset(&remoteAddress,0,sizeof(remoteAddress));
+ remoteAddress.sin_family = AF_INET;
+ remoteAddress.sin_port = htons(port);
+ remoteAddress.sin_addr.s_addr = ip;
+ if (connect(s->sendSocket,(struct sockaddr *)&remoteAddress,sizeof(remoteAddress)) == ERROR) {
+ /*
+ * No complains for now
+ * DBG_ERROR("Connect failed!!\n");
+ */
+ }
+
+
+#ifdef VIPER_IP
+
+
+
+
+ struct in_addr remoteAddr,localAddr;
+
+ remoteAddr.s_addr = ip;
+ localAddr.s_addr = s->remoteIp = inet_addr(vipGetLocalIpAddress());
+
+ /*
+ * Ok, it is a mobile-to-mobile call within the same
+ * ViperCell
+ */
+ if (localAddr.s_addr == remoteAddr.s_addr) {
+ int count;
+ for(count=0;count<MAX_RTP_SESSIONS;count++) {
+ if (RtpSessions[count].used == TRUE) {
+ if (RtpSessions[count].rtpSession->localPort == port) {
+ s->IsLocalLoop = TRUE;
+ s->localSession = RtpSessions[count].rtpSession;
+ break;
+ }
+ }
+ else continue;
+ }
+ }
+ else {
+ s->IsLocalLoop = FALSE;
+ s->localSession = NULL;
+ }
+
+
+ memset(&s->rtpPacketBuffer,0,512);
+ s->rtpPacketDataOffset = 0;
+
+ vipConstructNetHeaders(remoteAddr.s_addr,
+ port,
+ s->localPort,
+ s->rtpPacketBuffer,
+ &s->rtpPacketDataOffset);
+#endif
+ DBG_LEAVE();
+}
+
+
+
+
+/*
+ * jcRtpWrite
+ */
+INT32
+jcRtpWrite(
+ IN HJCRTPSESSION hRTP,
+ IN void * buf,
+ IN INT32 len,
+ IN rtpParam * p)
+{
+
+ INT32 status;
+ status = jcRtpFastWrite(hRTP,buf,len,p,FALSE,NULL);
+ return(status);
+}
+
+
+
+/*
+ * jcRtpFastWrite
+ */
+INT32
+jcRtpFastWrite(IN HJCRTPSESSION hRTP,
+ IN void *buf,
+ IN INT32 len,
+ IN rtpParam *p,
+ BOOL fastWrite,
+ VOIDFUNCPTR callbackFunction)
+{
+ int retVal;
+
+ jcRtpSession *s = (jcRtpSession *)hRTP;
+ struct sockaddr_in DestAddress;
+ int AddrSize;
+ RTP_HEADER *rtpHdr;
+ UINT32 *header=(UINT32*)((char*)buf+p->sByte-12);
+ if (s->useSequenceNumber)
+ s->sequenceNumber=p->sequenceNumber;
+ p->sequenceNumber=s->sequenceNumber;
+
+ header[0]=0;
+ rtpHdr = (RTP_HEADER *)header;
+
+ rtpHdr->RtpProtocolVersion = 2;
+ rtpHdr->Marker = p->marker;
+ rtpHdr->PayloadType = p->payload;
+ rtpHdr->SequenceNumber = s->sequenceNumber++;
+/*
+ header[0]=BitfieldSet(header[0],2,30,2);
+ header[0]=BitfieldSet(header[0],p->marker,23,1);
+ header[0]=BitfieldSet(header[0],p->payload,16,7);
+ header[0]=BitfieldSet(header[0],s->sequenceNumber++,0,16);
+*/
+
+
+ header[1]=p->timestamp;
+ header[2]=s->sSrc;
+ if (p->payload != 3) {
+ rtpHdr->Marker = 1;
+ }
+
+ ConvertHeader2l((UINT8*)header,0,3);
+
+ AddrSize = sizeof(DestAddress);
+ memset(&DestAddress,0,AddrSize);
+ DestAddress.sin_family = AF_INET;
+ DestAddress.sin_port = htons (s->port);
+ DestAddress.sin_addr.s_addr = s->ip;
+
+ if (RtpPortToDebug == s->localPort) {
+ DebugSendCount++;
+ if (DebugSendCount == 20) {
+ inet_ntoa_b(DestAddress.sin_addr,addrStrBuff);
+ printf("Sent 20 packets; now sending to %d bytes of data to %s address, port %d\n",
+ len,addrStrBuff,s->port);
+ DebugSendCount=0;
+ }
+ }
+
+ if (RtpDebugPacketIntervalsOn) {
+ s->currentTimestamp = sysTimestamp();
+ s->currentInterval = s->currentTimestamp-s->previousTimestamp;
+ if ( s->currentInterval > (maxInterPacketInterval) ) {
+ printf("Send drifted on RTP Handle 0x%x\n",s);
+ s->previousTimestamp=sysTimestamp();
+ }
+ else
+ s->previousTimestamp = s->currentTimestamp;
+ if (s->currentInterval > s->maxInterPacketDelay)
+ s->maxInterPacketDelay = s->currentInterval;
+ }
+
+ if (fastWrite == TRUE) {
+ int packetLength=len-((char*)header-(char*)buf);
+
+ /*
+ retVal = zbufSockBufSendto(s->sendSocket,(char *)buf,packetLength,(VOIDFUNCPTR)callbackFunction,(int)buf,0,(struct sockaddr *)&DestAddress, AddrSize);
+ */
+ retVal = zbufSockBufSend(s->sendSocket,(char *)buf,packetLength,(VOIDFUNCPTR)callbackFunction,(int)buf,0);
+ if (retVal == ERROR) {
+ printf("Error in zbufSockSendTo\n");
+ s->sendErrors++;
+ }
+ else {
+ s->bytesSent += packetLength;
+ }
+ }
+ else {
+
+#ifdef VIPER_IP
+ int pktLength=len-((char*)header-(char*)buf);
+ if (s->IsLocalLoop == TRUE) {
+ jcRtpSession *peer= (jcRtpSession*)s->localSession;
+ unsigned short *count;
+
+ count = (unsigned short *)peer->rtpRecvPacketBuffer;
+ *count = pktLength;
+
+ memcpy((char *)&peer->rtpRecvPacketBuffer[sizeof(unsigned short)],
+ header,pktLength);
+ semGive(peer->semRtpRecv);
+ }
+ else {
+ memcpy(&s->rtpPacketBuffer[s->rtpPacketDataOffset],header,pktLength);
+ vipSend(s->rtpPacketBuffer,pktLength);
+ }
+ s->bytesSent += pktLength;
+#else
+ /*
+ retVal = sendto(s->sendSocket, (char *)header,
+ len-((char*)header-(char*)buf), 0,(struct sockaddr *)&DestAddress, AddrSize);
+ */
+ retVal = send(s->sendSocket,(char *)header,len-((char*)header-(char*)buf), 0);
+ if (retVal == ERROR) {
+ printf("Error in sendto, error %d!\n",errno);
+ s->sendErrors++;
+ }
+ else {
+ s->bytesSent += len;
+ }
+#endif
+ }
+ if (s->hRTCP && retVal >= 0)
+ {
+ jcRtcpRTPPacketSent(s->hRTCP, p->len, p->timestamp);
+ }
+
+ return retVal;
+}
+
+
+
+/*
+ * jcRtpRead
+ */
+INT32
+jcRtpRead(
+ IN HJCRTPSESSION hRTP,
+ IN void *buf,
+ IN INT32 len,
+ OUT rtpParam* p)
+{
+ INT32 readStatus;
+
+ readStatus=jcRtpReadPacket(hRTP,(char *)buf,len,p,TRUE,NULL);
+ return(readStatus);
+}
+
+
+/*
+ * jcRtpReadPacket
+ */
+INT32
+jcRtpReadPacket(
+ IN HJCRTPSESSION hRTP,
+ IN char *buf,
+ IN INT32 len,
+ OUT rtpParam* p,
+ BOOL readPacket,
+ struct sockaddr_in *fromAddress)
+{
+ jcRtpSession *s = (jcRtpSession *)hRTP;
+ UINT32 ip;
+ UINT16 port;
+ UINT32 *header=(UINT32 *)buf;
+ struct sockaddr_in FromAddress;
+ int AddrSize;
+
+ AddrSize = sizeof(FromAddress);
+ memset(&FromAddress,0,AddrSize);
+
+ if (readPacket) {
+ p->len=recvfrom(s->socket,(char *)buf,len,0,(struct sockaddr *)&FromAddress,&AddrSize);
+ if (p->len == ERROR) {
+ s->recvErrors++;
+ }
+ else {
+ s->bytesReceived += p->len;
+ }
+
+ }
+ else {
+ memcpy(&FromAddress,fromAddress,sizeof(FromAddress));
+ p->len = len;
+ }
+
+ ip = FromAddress.sin_addr.s_addr;
+ port = ntohs(FromAddress.sin_port);
+
+ ConvertHeader2h((UINT8*)buf,0,3);
+
+ if (RtpPortToDebug == s->localPort) {
+ DebugRecvCount++;
+ if (DebugRecvCount == 20) {
+ inet_ntoa_b(FromAddress.sin_addr,addrStrBuff);
+ printf("Received 20 packets; now received %d bytes of data from %s address, port %d\n",
+ p->len,addrStrBuff,port);
+ DebugRecvCount=0;
+ }
+ }
+
+ if (p->len==ERROR) return ERROR;
+ if (p->len<12) return ERROR;
+
+ ConvertHeader2h((UINT8*)buf,3,BitfieldGet(header[0],24,4));
+ p->timestamp=header[1];
+ p->sequenceNumber=(UINT16)BitfieldGet(header[0],0,16);
+ p->sSrc=header[2];
+ p->marker=BitfieldGet(header[0],23,1);
+ p->payload=(unsigned char)BitfieldGet(header[0],16,7);
+
+ p->sByte=12+BitfieldGet(header[0],24,4)*sizeof(UINT32);
+ if (BitfieldGet(header[0],28,1))
+ {
+ int xStart=p->sByte/sizeof(UINT32);
+ ConvertHeader2h((UINT8*)buf,xStart,1);
+ ConvertHeader2h((UINT8*)buf,xStart+1,BitfieldGet(header[xStart],0,16));
+ p->sByte+=BitfieldGet(header[xStart],0,16)*sizeof(UINT32);
+ }
+
+ return 0;
+}
+
+
+
+/*
+ * jcRtpProcessFastReadPacket
+ */
+void
+jcRtpProcessFastReadPacket(
+ IN HJCRTPSESSION hRTP,
+ IN char *buf,
+ IN INT32 len,
+ OUT rtpParam* p,
+ struct sockaddr_in *fromAddress)
+{
+ INT32 readStatus;
+
+ readStatus=jcRtpReadPacket(hRTP,(char *)buf,len,p,FALSE,fromAddress);
+ return;
+
+}
+
+/*
+ * jcRtpReadEx
+ */
+INT32
+jcRtpReadEx(
+ IN HJCRTPSESSION hRTP,
+ IN void * buf,
+ IN INT32 len,
+ IN UINT32 timestamp,
+ OUT rtpParam * p)
+{
+ jcRtpSession *s = (jcRtpSession *)hRTP;
+ int retVal;
+
+ retVal = jcRtpRead(hRTP, buf, len, p);
+
+ if (s->hRTCP && retVal >= 0)
+ {
+ jcRtcpRTPPacketRecv(s->hRTCP, p->sSrc, timestamp, p->timestamp, p->sequenceNumber);
+ }
+
+ return retVal;
+}
+
+
+
+/*
+ * jcRtpGetPort
+ */
+UINT16
+jcRtpGetPort(
+ IN HJCRTPSESSION hRTP) /* RTP Session Opaque Handle */
+{
+ jcRtpSession *s = (jcRtpSession *)hRTP;
+ return (s->localPort);
+}
+
+
+
+
+
+
+/*
+ * jcRtpGetRTCPSession
+ */
+HJCRTCPSESSION
+jcRtpGetRTCPSession(
+ IN HJCRTPSESSION hRTP)
+{
+ jcRtpSession *s = (jcRtpSession *)hRTP;
+
+ return (s->hRTCP);
+}
+
+
+
+/*
+ * jcRtpSetRTCPSession
+ */
+INT32
+jcRtpSetRTCPSession(
+ IN HJCRTPSESSION hRTP,
+ IN HJCRTCPSESSION hRTCP)
+{
+ jcRtpSession *s = (jcRtpSession *)hRTP;
+
+ s->hRTCP = hRTCP;
+
+ return 0;
+}
+
+
+/*
+ * jcRtpGetHeaderLength
+ */
+INT32
+jcRtpGetHeaderLength(void)
+{
+ return 12;
+}
+
+
+
+/*
+ * jcRtpRegenSSRC
+ */
+UINT32
+jcRtpRegenSSRC(
+ IN HJCRTPSESSION hRTP)
+{
+ jcRtpSession *s = (jcRtpSession *)hRTP;
+
+ s->sSrc = rand() ;
+ s->sSrc &= ~s->sSrcMask;
+ s->sSrc |= s->sSrcPattern;
+
+ return s->sSrc;
+}
+
+
+
+
+/*
+ * jcRtpUseSequenceNumber
+ */
+INT32
+jcRtpUseSequenceNumber(
+ IN HJCRTPSESSION hRTP)
+{
+ jcRtpSession *s = (jcRtpSession *)hRTP;
+
+ s->useSequenceNumber = 1;
+
+ return 0;
+}
+
+
+
+/*
+ * jcRtcpSetRemoteAddress
+ */
+void
+jcRtcpSetRemoteAddress(
+ IN HJCRTCPSESSION hRTCP, /* RTCP Session Opaque Handle */
+ IN UINT32 ip, /* target ip address */
+ IN UINT16 port) /* target UDP port */
+{
+ return;
+}
+
+
+/*
+ * jcRtcpRTPPacketSent
+ */
+void
+jcRtcpRTPPacketSent(HJCRTCPSESSION What, int Len, UINT32 timestamp)
+{
+ return;
+}
+
+/*
+ * jcRtcpRTPPacketRecv
+ */
+void
+jcRtcpRTPPacketRecv(HJCRTCPSESSION What, UINT32 sSrc, UINT32 timestamp, UINT32 timestamp2, UINT16 sequenceNumber)
+{
+ return;
+}
+
+
+/*
+ * jcRtcpInit
+ */
+INT32
+jcRtcpInit(void)
+{
+ return 0;
+}
+
+
+/*
+ * jcRtcpEnd
+ */
+INT32
+jcRtcpEnd(void)
+{
+ return (0);
+}
+
+
+
+/*
+ * BitfieldSet
+ */
+UINT32
+BitfieldSet(
+ IN UINT32 value,
+ IN UINT32 bitfield,
+ IN int nStartBit,
+ IN int nBits)
+{
+ int mask = (1 << nBits) - 1;
+
+ return (value & ~(mask << nStartBit)) +
+ ((bitfield & mask) << nStartBit);
+}
+
+/*
+ * BitfieldGet
+ */
+UINT32
+BitfieldGet(
+ IN UINT32 value,
+ IN int nStartBit,
+ IN int nBits)
+{
+ int mask = (1 << nBits) - 1;
+
+ return (value >> nStartBit) & mask;
+}
+
+
+
+/*
+ * ConvertHeader2l
+ */
+int
+ConvertHeader2l (UINT8 *buff,int startIndex,int size)
+{
+ int i;
+
+ for (i=startIndex;i< (startIndex+size);i++)
+ ((UINT32*)buff)[i]=htonl(((UINT32*)buff)[i]);
+
+ return (0);
+}
+
+
+/*
+ * ConvertHeader2h
+ */
+int
+ConvertHeader2h (UINT8 *buff,int startIndex,int size)
+{
+ int i;
+
+ for (i=startIndex;i< (startIndex+size);i++)
+ ((UINT32*)buff)[i]= ntohl (((UINT32*)buff)[i]);
+
+ return (0);
+}
+
+
+
+/*
+ * VoipCallGetRtpPayloadType
+ */
+int
+VoipCallGetRtpPayloadType(HJCRTPSESSION RtpHandle)
+{
+ jcRtpSession *RtpSession = (jcRtpSession*)RtpHandle;
+ return(RtpSession->RtpPayloadType);
+}
+
+
+/*
+ * jcRtpSetPayloadType
+ */
+void
+jcRtpSetPayloadType(HJCRTPSESSION RtpHandle,BYTE Payload)
+{
+ jcRtpSession *RtpSession = (jcRtpSession*)RtpHandle;
+ RtpSession->RtpPayloadType = Payload;
+}
+
+
+/*
+ * RtpPrintHandleInfo
+ */
+void
+RtpPrintHandleInfo(HJCRTPSESSION hRTP)
+{
+ struct sockaddr_in DestAddress;
+ jcRtpSession *RtpHandle = (jcRtpSession*)hRTP;
+
+ if (RtpHandle->Magic != JCRTP_MAGIC) {
+ printf("Invalid RTP Handle specified\n");
+ return;
+ }
+ memset(&DestAddress,0,sizeof(struct sockaddr_in));
+
+ DestAddress.sin_family = AF_INET;
+ DestAddress.sin_port = htons(RtpHandle->localPort);
+ DestAddress.sin_addr.s_addr = RtpHandle->ip;
+
+ inet_ntoa_b(DestAddress.sin_addr,addrStrBuff);
+ printf("Remote IP %s, remote port %d, local port %d, task name %s\n",
+ addrStrBuff,RtpHandle->port,RtpHandle->localPort,RtpHandle->RtpThreadName);
+
+ return;
+}
+
+
+
+
+
+
+/*
+ * RtpDebugPort
+ */
+void
+RtpDebugPort(UINT16 port)
+{
+ RtpPortToDebug = port;
+ printf("Turning on debugging on RTP port %d\n",RtpPortToDebug);
+}
+
+
+
+/*
+ * RtpDebugHandle
+ */
+void
+RtpDebugHandle(HJCRTPSESSION hRTP)
+{
+ jcRtpSession *RtpHandle = (jcRtpSession*)hRTP;
+
+ if (RtpHandle->Magic != JCRTP_MAGIC) {
+ printf("Invalid RTP Handle specified\n");
+ return;
+ }
+ RtpPortToDebug = RtpHandle->localPort;
+ printf("Turning on debugging on RTP port %d\n",RtpPortToDebug);
+
+ DebugRecvCount = DebugSendCount=0;
+}
+
+
+
+
+
+
+
+/*
+ * InitializeRtpPacketBuffers
+ */
+void
+InitializeRtpPacketBuffers()
+{
+ int count;
+ rtpPacketBuffer_t *newBuffer;
+
+ headFreeRtpBufferList = tailFreeRtpBufferList = NULL;
+
+ INIT_RTP_PACKET_BUFFER_LIST();
+
+ for(count=0;count<MAX_RTP_PACKET_BUFFERS;count++) {
+ newBuffer=(rtpPacketBuffer_t *)malloc(sizeof(rtpPacketBuffer_t));
+ if (newBuffer == NULL) {
+ printf("Unable to allocate buffers for speech frames!\n");
+ assert(0);
+ }
+ else {
+ memset(newBuffer->packetData,0,MAX_RTP_PAYLOAD_SIZE);
+ newBuffer->magic = RTP_PACKET_BUFFER_MAGIC;
+ InsertPacketBufferIntoFreePool(newBuffer->packetData);
+ }
+ }
+}
+
+
+
+/*
+ * ShutdownRtpPacketBuffers
+ */
+void
+ShutdownRtpPacketBuffers()
+{
+ LOCK_RTP_PACKET_BUFFER_LIST();
+ rtpPacketBuffer_t *tempBuffer;
+ int count=0;
+
+ tempBuffer = headFreeRtpBufferList;
+
+ while(tempBuffer != NULL) {
+ headFreeRtpBufferList = headFreeRtpBufferList->next;
+ free(tempBuffer);
+ tempBuffer = headFreeRtpBufferList;
+ count++;
+ if (count == 48) {
+ printf("Freed all buffers\n");
+ }
+ }
+ headFreeRtpBufferList = tailFreeRtpBufferList = NULL;
+
+ UNLOCK_RTP_PACKET_BUFFER_LIST();
+ DELETE_RTP_PACKET_BUFFER_LIST();
+}
+
+
+/*
+ * InsertPacketBufferIntoFreePool
+ */
+void
+InsertPacketBufferIntoFreePool(unsigned char *Buffer)
+{
+ LOCK_RTP_PACKET_BUFFER_LIST();
+ rtpPacketBuffer_t *newBuffer;
+ unsigned char *tempByte;
+ short offSet;
+
+ offSet = sizeof(int);
+ tempByte = (unsigned char *)&Buffer[-offSet];
+ newBuffer = (rtpPacketBuffer_t*)tempByte;
+ assert(newBuffer->magic = RTP_PACKET_BUFFER_MAGIC);
+ if ( (headFreeRtpBufferList == NULL) && (tailFreeRtpBufferList == NULL) ){
+ /*
+ * First element in list
+ */
+ headFreeRtpBufferList = tailFreeRtpBufferList = newBuffer;
+ newBuffer->previous = newBuffer->next = NULL;
+ }
+ else if (tailFreeRtpBufferList != NULL) {
+ tailFreeRtpBufferList->next = newBuffer;
+ newBuffer->previous = tailFreeRtpBufferList;
+ tailFreeRtpBufferList = newBuffer;
+ tailFreeRtpBufferList->next = NULL;
+ }
+ UNLOCK_RTP_PACKET_BUFFER_LIST();
+}
+
+
+/*
+ * GetPacketBufferFromFreePool
+ */
+unsigned char *
+GetPacketBufferFromFreePool()
+{
+ unsigned char *retVal=NULL;
+ if (headFreeRtpBufferList != NULL) {
+ retVal = headFreeRtpBufferList->packetData;
+ headFreeRtpBufferList = headFreeRtpBufferList->next;
+ headFreeRtpBufferList->previous = NULL;
+ }
+ return(retVal);
+}
+
+
+ jcRtpSession *rtpSession;
+ BOOL used;
+
+
+/*
+ * AddNewRtpSession
+ */
+void
+AddNewRtpSession(jcRtpSession *rtpSession)
+{
+ int Count;
+ for(Count=0;Count<MAX_RTP_SESSIONS;Count++) {
+ if (RtpSessions[Count].used == FALSE) {
+ RtpSessions[Count].rtpSession = rtpSession;
+ RtpSessions[Count].used = TRUE;
+ RtpSessionCount++;
+ break;
+ }
+ }
+}
+
+
+
+/*
+ * RemoveRtpSession
+ */
+void
+RemoveRtpSession(jcRtpSession *rtpSession)
+{
+ int Count;
+ for(Count=0;Count<MAX_RTP_SESSIONS;Count++) {
+ if (RtpSessions[Count].rtpSession == rtpSession) {
+ RtpSessions[Count].used = FALSE;
+ RtpSessions[Count].rtpSession = NULL;
+ RtpSessionCount--;
+ break;
+ }
+ }
+}
+
+
+
+/*
+ * RtpResetAllCounters
+ */
+void
+RtpResetAllCounters()
+{
+ int Count;
+ for(Count=0;Count<MAX_RTP_SESSIONS;Count++) {
+ if (RtpSessions[Count].used == TRUE) {
+ RtpResetSessionCounters((HJCRTPSESSION)RtpSessions[Count].rtpSession);
+ }
+ }
+ printf("All RTP Counters reset\n");
+}
+
+
+/*
+ * RtpResetSessionCounters
+ */
+void
+RtpResetSessionCounters(HJCRTPSESSION hRTP)
+{
+ jcRtpSession *rtpSession = (jcRtpSession*)hRTP;
+
+ if (rtpSession->Magic != JCRTP_MAGIC)
+ {
+ printf("Invalid RTP handle specified\n");
+ return;
+ }
+ rtpSession->bytesSent = rtpSession->bytesReceived =
+ rtpSession->sendErrors = rtpSession->recvErrors = 0;
+}
+
+
+/*
+ * RtpDisplaySessions
+ */
+void
+RtpDisplaySessions()
+{
+ BOOL headerDisplayed=FALSE;
+ int Count,counter,sessionCounter=0;;
+ jcRtpSession *s;
+ char displayBuffer[RTP_DISP_TOTAL_WIDTH];
+
+ for(Count=0;Count<MAX_RTP_SESSIONS;Count++) {
+ if (RtpSessions[Count].used == TRUE) {
+ sessionCounter++;
+ if (!headerDisplayed) { RtpDisplayHeader(); headerDisplayed=TRUE; }
+ s = (jcRtpSession *)RtpSessions[Count].rtpSession;
+ memset(displayBuffer,0,RTP_DISP_TOTAL_WIDTH);
+ sprintf(&displayBuffer[RTP_DISP_NAME_OFFSET],"%s",s->RtpThreadName);
+ sprintf(&displayBuffer[RTP_DISP_HANDLE_OFFSET],"0x%x",s);
+ sprintf(&displayBuffer[RTP_DISP_SENT_OFFSET],"%8ld",s->bytesSent);
+ sprintf(&displayBuffer[RTP_DISP_RECV_OFFSET],"%8ld",s->bytesReceived);
+
+ sprintf(&displayBuffer[RTP_DISP_SERR_OFFSET],"%s",
+ RtpGetRemoteTsapString(RtpSessions[Count].rtpSession));
+
+ for(counter=0;counter<RTP_DISP_TOTAL_WIDTH;counter++) {
+ if (displayBuffer[counter] == 0) displayBuffer[counter] = 32;
+ }
+ displayBuffer[RTP_DISP_TOTAL_WIDTH-1] = 0;
+ printf("%s\n",displayBuffer);
+ }
+ }
+ RtpDisplayLine();
+ printf("Total RTP Sessions %d\n",sessionCounter);
+ RtpDisplayLine();
+}
+
+
+
+
+/*
+ * RtpDisplayHeader
+ */
+void
+RtpDisplayHeader()
+{
+ RtpDisplayLine();
+ printf(" RTP TASK HANDLE BYTES SENT BYTES RECVD REMOTE ADDRESS:PORT \n");
+ RtpDisplayLine();
+}
+
+
+/*
+ * RtpDisplayLine
+ */
+void
+RtpDisplayLine()
+{
+ printf("**********************************************************************************\n");
+}
+
+
+
+/*
+ * RtpGetRemoteTsapString
+ */
+char *
+RtpGetRemoteTsapString(HJCRTPSESSION hRTP)
+{
+ static char remoteTsapStr[128];
+ jcRtpSession *s = (jcRtpSession*)hRTP;
+ struct in_addr addr;
+ memset(remoteTsapStr,0,128);
+
+ addr.s_addr = s->ip;
+ inet_ntoa_b(addr,addrStrBuff);
+ sprintf(remoteTsapStr,"%s:%d",addrStrBuff,s->port);
+
+ return(remoteTsapStr);
+}
+
+/*
+ * RtpGetLocalTsapString
+ */
+char *
+RtpGetLocalTsapString(HJCRTPSESSION hRTP)
+{
+ static char localTsapStr[128];
+ jcRtpSession *s = (jcRtpSession*)hRTP;
+ struct in_addr addr;
+ memset(localTsapStr,0,128);
+
+ addr.s_addr = s->remoteIp;
+ inet_ntoa_b(addr,addrStrBuff);
+ sprintf(localTsapStr,"%s:%d",addrStrBuff,s->localPort);
+
+ return(localTsapStr);
+}
+
+/*
+ * RtpGetSessionBytesSent
+ */
+unsigned long
+RtpGetSessionBytesSent(HJCRTPSESSION hRTP)
+{
+ jcRtpSession *s = (jcRtpSession*)hRTP;
+ return(s->bytesSent);
+}
+
+/*
+ * RtpGetSessionBytesRecvd
+ */
+unsigned long
+RtpGetSessionBytesRecvd(HJCRTPSESSION hRTP)
+{
+ jcRtpSession *s = (jcRtpSession*)hRTP;
+ return(s->bytesReceived);
+}
+
+
+
+
+/*
+ * RtpDebugPacketIntervalsOn
+ */
+void
+RtpDebugPacketIntervals(int value)
+{
+ if (value > 0) {
+ printf("Turned ON debugs of packet intervals on all RTP ports\n");
+ RtpDebugPacketIntervalsOn = TRUE;
+ }
+ else {
+ printf("Turned OFF debugs of packet intervals on all RTP ports\n");
+ RtpDebugPacketIntervalsOn = FALSE;
+ }
+}
+
+
+/*
+ * RtpDebugSetIntervalWatermark
+ */
+void
+RtpDebugSetIntervalWatermark(int maxMilliseconds)
+{
+ maxInterPacketInterval = (sysClockTicksPerSecond / 1000) * maxMilliseconds;
+ printf("MAX inter-packet delay watermark now set to %d milliseconds\n",maxMilliseconds);
+}
+
+
+/*
+ * RtpDebugShowMaxIntervals
+ */
+void
+RtpDebugShowMaxIntervals()
+{
+ int Count;
+ jcRtpSession *s;
+ unsigned long ticksPerMs = sysClockTicksPerSecond/1000;
+ printf("\n********************************************************************\n");
+ for(Count=0;Count<MAX_RTP_SESSIONS;Count++) {
+ if (RtpSessions[Count].used == TRUE) {
+ s = (jcRtpSession *)RtpSessions[Count].rtpSession;
+ printf("RTP Handle 0x%x : max delay %ld ms\n",s,s->maxInterPacketDelay/ticksPerMs);
+ }
+ }
+ printf("********************************************************************\n");
+} \ No newline at end of file
diff --git a/data/mnet/GP10/Host/voip/rtp/viperip.cpp b/data/mnet/GP10/Host/voip/rtp/viperip.cpp
new file mode 100644
index 0000000..70887ee
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/rtp/viperip.cpp
@@ -0,0 +1,512 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : ViperIp.cpp *
+ * *
+ * Description : Interface library to permit RTP to directly call the motFec *
+ * Ethernet controller driver on the ViperCell system *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |08/28/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+#include <sockLib.h>
+#include <inetLib.h>
+#include <vxworks.h>
+#include <etherlib.h>
+#include <netinet\if_ether.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <taskLib.h>
+#include <semlib.h>
+#include <wdLib.h>
+#include <sysLib.h>
+#include <tasklib.h>
+#include <iv.h>
+#include <vme.h>
+#include <net/mbuf.h>
+#include <net/unixLib.h>
+#include <net/protosw.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <errno.h>
+#include <memLib.h>
+#include <intLib.h>
+#include <net/route.h>
+#include <iosLib.h>
+#include <errnoLib.h>
+#include <vxLib.h>
+#include <private/funcBindP.h>
+
+#include <cacheLib.h>
+#include <logLib.h>
+#include <netLib.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sysLib.h>
+
+#include <etherLib.h>
+#include <net/systm.h>
+#include <sys/times.h>
+#include <net/if_subr.h>
+
+#undef ETHER_MAP_IP_MULTICAST
+#include <etherMultiLib.h>
+#include <end.h>
+#include <semLib.h>
+#define END_MACROS
+#include <endLib.h>
+#include <lstLib.h>
+#include <drv\end\motfecend.h>
+
+#include "viperip.h"
+
+
+/*
+ * Global variables
+ */
+struct ifnet *pInterface;
+static unsigned long ipPacketIdentifier=0;
+static unsigned char defaultGatewayEther[6];
+static char defaultGatewayIpAddress[32];
+DRV_CTRL *jetFecController;
+
+
+
+
+
+
+/*
+ * vipInit
+ */
+void
+vipInit()
+{
+ jetFecController=getJetFecHandle();
+ ipPacketIdentifier = 0;
+ memset(defaultGatewayIpAddress,0,32);
+ jetFecInit();
+#ifdef DEBUG
+ printf("jetFec driver handle returned as 0x%x\n",jetFecController);
+#endif
+}
+
+
+
+/*
+ * vipSetDefaultGateway
+ */
+void
+vipSetDefaultGateway(char *gwIpAddress)
+{
+ strcpy(defaultGatewayIpAddress,gwIpAddress);
+ memset(defaultGatewayEther,0,6);
+ vipGetEthernetAddress(defaultGatewayIpAddress,defaultGatewayEther);
+#ifdef DEBUG
+ printf("Default gateway set to %s with ethernet address %02x.%02x.%02x.%02x.%02x.%02x for ViperIp\n",
+ defaultGatewayIpAddress,defaultGatewayEther[0],defaultGatewayEther[1],defaultGatewayEther[2],
+ defaultGatewayEther[3],defaultGatewayEther[4],defaultGatewayEther[5]);
+#endif
+}
+
+
+
+/*
+ * vipGetEthernetAddress
+ */
+void
+vipGetEthernetAddress(char *ipAddress, unsigned char *etherAddress)
+{
+ STATUS status;
+ unsigned char targetAddress[10];
+ int count;
+
+ /*
+ * If the remote address is not even on the same subnet
+ * no point in 'arping about it...;-)
+ */
+ if(vipIsPeerOnSameSubnet(ipAddress)!=TRUE) {
+ for(count=0;count<6;count++)
+ etherAddress[count] = defaultGatewayEther[count];
+ return;
+ }
+
+ pInterface = ifunit(VIPERCELL_ETHERNET_INTERFACE);
+ if (pInterface != NULL) {
+ memset(targetAddress,0,10);
+ status = etherAddrResolve(pInterface,ipAddress,(char *)targetAddress,2,20);
+ if (status == OK){
+#ifdef DEBUG
+ printf("Ethernet address of %s returned as %02x.%02x.%02x.%02x.%02x.%02x\n",
+ ipAddress,
+ targetAddress[0],targetAddress[1],targetAddress[2],targetAddress[3],
+ targetAddress[4],targetAddress[5]);
+#endif
+ for(count=0;count<6;count++)
+ etherAddress[count] = targetAddress[count];
+ }
+ else {
+#ifdef DEBUG
+ printf("Returning default gateway ethernet address for %s\n",ipAddress);
+#endif
+ for(count=0;count<6;count++)
+ etherAddress[count] = defaultGatewayEther[count];
+ }
+ }
+ return;
+}
+
+
+
+/*
+ * vipIsPeerOnSameSubnet
+ */
+BOOL
+vipIsPeerOnSameSubnet(char *peerAddress)
+{
+ BOOL retStatus=FALSE;
+ static char InterfaceName[50],localAddress[20];
+ int Status,netMask;
+ struct in_addr nLocalAddress,nPeerAddress;
+ unsigned long maskedRemote, maskedLocal;
+
+ memset(InterfaceName,0,50);
+ memset(localAddress,0,20);
+
+ memset(&nLocalAddress,0,sizeof(struct in_addr));
+ memset(&nPeerAddress,0,sizeof(struct in_addr));
+
+ netMask=0;
+
+ strcpy(InterfaceName,VIPERCELL_ETHERNET_INTERFACE);
+ Status = ifMaskGet(InterfaceName,&netMask);
+ if (Status == ERROR) {
+ printf("Unable to get local netMask!!\n");
+ return(retStatus);
+ }
+
+ strcpy(localAddress,vipGetLocalIpAddress());
+
+ nLocalAddress.s_addr = inet_addr(localAddress);
+ nPeerAddress.s_addr = inet_addr(peerAddress);
+
+ maskedLocal = nLocalAddress.s_addr & netMask;
+ maskedRemote = nPeerAddress.s_addr & netMask;
+
+ if (maskedLocal != maskedRemote) {
+ }
+ else {
+ retStatus=TRUE;
+ }
+
+ return(retStatus);
+}
+
+
+
+
+/*
+ * vipConstructNetHeaders
+ */
+void
+vipConstructNetHeaders(unsigned long remoteIp,
+ unsigned short remotePort,
+ unsigned short localPort,
+ unsigned char *pktBuffer,
+ unsigned short *dataOffset
+ )
+{
+ char remoteIpString[20],localIpString[20];
+ struct internetAddress remoteInAddr,localInAddr;
+ int count;
+ struct in_addr destAddress;
+ struct ether_header *etherHeader;
+ PVIPER_IP_HDR ipHdr;
+ PVIPER_UDP_HDR udpHdr;
+ unsigned char *offsetPtr;
+
+ destAddress.s_addr = remoteIp;
+
+ memset(remoteIpString,0,20);
+ memset(localIpString,0,20);
+ inet_ntoa_b(destAddress,remoteIpString);
+ strcpy(localIpString,vipGetLocalIpAddress());
+
+ etherHeader = (struct ether_header *)pktBuffer;
+ offsetPtr = (unsigned char *)&pktBuffer[VIPER_IP_HDR_OFFSET];
+ ipHdr = (PVIPER_IP_HDR)offsetPtr;
+ offsetPtr = (unsigned char *)&pktBuffer[VIPER_IP_UDP_HDR_OFFSET];
+ udpHdr = (PVIPER_UDP_HDR)offsetPtr;
+ *dataOffset = (unsigned short)(VIPER_IP_UDP_HDR_OFFSET+VIPER_IP_UDP_HDR_SIZE);
+
+
+ /* Validate the default gw's MAC everytime we setup a call : for DDTS CSCdt23589 */
+ vipSetDefaultGateway(defaultGatewayIpAddress);
+
+
+ /*
+ * fill in the Ethernet header
+ */
+ vipGetEthernetAddress(remoteIpString,etherHeader->ether_dhost);
+ vipGetEthernetAddress(localIpString,etherHeader->ether_shost);
+ etherHeader->ether_type = VIPER_IP_PROTOCOL_TYPE;
+
+ /*
+ * fill in the UDP/IP header
+ */
+ ipHdr->version = VIPER_IP_PROTOCOL_VERSION;
+ ipHdr->hdrLength = VIPER_IP_HDR_SIZE/4; /* 5 = 20 bytes divided by 32 bit words */
+ ipHdr->tos = VIPER_IP_TYPE_OF_SERVICE;
+ ipHdr->flags = 0;
+ ipHdr->fragOffset = 0;
+ ipHdr->ttl = VIPER_IP_DEFAULT_TTL;
+ ipHdr->protocol = VIPER_IP_PROTOCOL_TYPE_UDP;
+
+ memset(&remoteInAddr,0,sizeof(remoteInAddr));
+ memset(&localInAddr,0,sizeof(localInAddr));
+ remoteInAddr.addr.s_addr = remoteIp;
+ localInAddr.addr.s_addr = inet_addr(localIpString);
+
+ memcpy(ipHdr->sourceAddress,localInAddr.addr.s_bytes,4);
+ memcpy(ipHdr->destAddress,remoteInAddr.addr.s_bytes,4);
+
+ ipHdr->checksum = 0;
+
+ udpHdr->sourcePort = htons(localPort);
+ udpHdr->destPort = htons(remotePort);
+ udpHdr->udpChecksum = 0;
+}
+
+
+/*
+ * vipSend
+ */
+void
+vipSend(unsigned char *pktBuffer,int dataLength)
+{
+ PVIPER_IP_HDR ipHdr;
+ PVIPER_UDP_HDR udpHdr;
+ unsigned char *offsetPtr;
+ unsigned short totalEtherPktLength=0;
+ offsetPtr = (unsigned char *)&pktBuffer[VIPER_IP_HDR_OFFSET];
+ ipHdr = (PVIPER_IP_HDR)offsetPtr;
+ offsetPtr = (unsigned char *)&pktBuffer[VIPER_IP_UDP_HDR_OFFSET];
+ udpHdr = (PVIPER_UDP_HDR)offsetPtr;
+
+ udpHdr->udpLength = dataLength+8;
+ ipHdr->id = htons(ipPacketIdentifier++);
+ ipHdr->totalLength = htons(VIPER_IP_HDR_SIZE+VIPER_IP_UDP_HDR_SIZE+dataLength);
+ totalEtherPktLength = ipHdr->totalLength + VIPER_IP_HDR_OFFSET;
+ ipHdr->checksum = 0;
+ ipHdr->checksum = vipComputeIpCksum((unsigned short *)ipHdr,VIPER_IP_HDR_SIZE);
+ jetFecSend(jetFecController,pktBuffer,totalEtherPktLength);
+}
+
+
+
+
+/*
+ * vipGetLocalIpAddress
+ */
+char *
+vipGetLocalIpAddress()
+{
+ static char DirtyBuffer[50],InterfaceName[50];
+ int Status;
+
+ memset(DirtyBuffer,0,50);
+ memset(InterfaceName,0,50);
+
+ strcpy(InterfaceName,VIPERCELL_ETHERNET_INTERFACE);
+ Status = ifAddrGet(InterfaceName,DirtyBuffer);
+ if (Status == ERROR)
+ {
+ printf("Error retrieving interface %s's IP address!\n",InterfaceName);
+ return "";
+ }
+ return(DirtyBuffer);
+
+}
+
+
+
+/*
+ * vipComputeIpCksum
+ */
+unsigned short
+vipComputeIpCksum(unsigned short *addr,int len)
+{
+ register int nleft = len;
+ register unsigned short *w = addr;
+ register int sum = 0;
+ unsigned short answer = 0;
+
+ while (nleft > 1) {
+ sum += *w++;
+ nleft -= 2;
+ }
+ if (nleft == 1) {
+ *(u_char *)(&answer) = *(u_char *)w ;
+ sum += answer;
+ }
+ sum = (sum >> 16) + (sum & 0xffff);
+ sum += (sum >> 16);
+ answer = ~sum;
+ return(answer);
+}
+
+
+void
+vipAddRtpPort(unsigned short rtpPort, SEM_ID rtpSemId,unsigned char *recvBuffPtr)
+{
+ jetFecAddRtpPort(rtpPort,rtpSemId,recvBuffPtr);
+}
+
+
+int
+vipShowDefaultGateway()
+{
+ printf("Default Gateway IP address is set as %s\n",defaultGatewayIpAddress);
+ return (0);
+}
+
+
+/*---------------------------------- TEST CODE SECTION BEGIN -------------------------------------------*/
+
+#ifdef DEBUG
+
+#define MAX_VIPER_IP_TEST_DATA_SIZE 60
+
+unsigned char testPktBuffer[2000];
+unsigned char testRecvPktBuffer[2000];
+unsigned short testDataOffset;
+int testInterPktDelay;
+unsigned long testTotalPkts,recvPktCount;
+SEM_ID testRecvSem;
+
+
+void VipRecvProc(void);
+void VipShowRecv(void);
+
+
+
+/*
+ * StartVipTest
+ */
+void
+StartVipTest(int pkts,int ticks, char *destAddr)
+{
+ struct in_addr remoteAddr;
+
+ testInterPktDelay = ticks;
+ testTotalPkts = pkts;
+ recvPktCount=0;
+
+ vipInit();
+
+ printf("Ip Test will send %ld packets to IP %s :UDP port 2200 with inter packet delay of %d ticks \n",
+ testTotalPkts,destAddr,testInterPktDelay);
+
+
+ remoteAddr.s_addr = inet_addr(destAddr);
+
+ memset(testPktBuffer,0,2000);
+
+ testDataOffset = 0;
+
+ vipConstructNetHeaders(remoteAddr.s_addr,
+ 2200,
+ 2100,
+ testPktBuffer,
+ &testDataOffset);
+
+ printf("RTP Data offset specified as %d\n",testDataOffset);
+ testPktBuffer[testDataOffset] = 0x80;
+ memset(&testPktBuffer[testDataOffset+1],'A',MAX_VIPER_IP_TEST_DATA_SIZE);
+
+ if(taskSpawn("VipTask",
+ 10,
+ 0,
+ 20480,
+ (FUNCPTR) VipTesterProc,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) == ERROR)
+ {
+
+ printf("Error:Could not spawn VipTesterProc\n");
+
+ }
+ testRecvSem = semBCreate(SEM_Q_FIFO, SEM_EMPTY);
+ if (testRecvSem==NULL) {
+ printf("Could not create receiver semaphore\n");
+ return;
+ }
+ vipAddRtpPort(2200,testRecvSem,testRecvPktBuffer);
+ if(taskSpawn("VipRecv",
+ 10,
+ 0,
+ 20480,
+ (FUNCPTR)VipRecvProc,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) == ERROR)
+ {
+
+ printf("Error:Could not spawn VipTesterProc\n");
+
+ }
+
+}
+
+
+void
+VipTesterProc()
+{
+ unsigned long count=0;
+ unsigned char *testRtpType;
+
+ testRtpType = (unsigned char *)testPktBuffer[42];
+ *testRtpType = 0x80;
+ while(1) {
+ count++;
+ if (count == testTotalPkts) {
+ printf("Completed sending %ld packets\n",testTotalPkts);
+ return;
+ }
+ vipSend(testPktBuffer,45);
+ taskDelay(1);
+ }
+}
+
+void
+VipRecvProc()
+{
+ unsigned long count=0;
+ while(1) {
+ count++;
+ if (count == testTotalPkts) {
+ printf("Completed receiving %ld packets\n",testTotalPkts);
+ return;
+ }
+ if (semTake(testRecvSem, WAIT_FOREVER) != ERROR) {
+ recvPktCount++;
+ }
+ }
+}
+
+void
+VipShowRecv()
+{
+ printf("Received %ld packets so far\n",recvPktCount);
+}
+
+#endif /* #ifdef DEBUG */
+/*---------------------------------- TEST CODE SECTION END ----------------------------------------------*/
diff --git a/data/mnet/GP10/Host/voip/src/Makefile b/data/mnet/GP10/Host/voip/src/Makefile
new file mode 100644
index 0000000..d751d8b
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/src/Makefile
@@ -0,0 +1,59 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = ..\..\..
+RADVISION = $(TOP_OF_VOB)\..\THIRD_PARTY\RadVision
+
+# These Must be Properly Defined
+THIS_APP_DIR = voip
+THIS_DIRECTORY = src
+MY_OUTPUT = $(OBJDIR)\voiptask.out
+
+# Name(s) of Common VOB directories to include
+COMMON_BLD_DIR =
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+all: makeCommonObjs $(MY_OUTPUT)
+
+CC_INCLUDE += -I$(RADVISION)/include -mstrict-align -ansi
+
+$(OBJDIR)/%.o : %.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(CXX) $(C++FLAGS) -c -o $@ $<
+
+# Adds the .o file(s) list needed from the Common VOB
+makeCommonObjs:
+ifneq ($(COMMON_BLD_DIR),)
+ @for %f in ($(COMMON_BLD_DIR)) do \
+ make -C $(COMMON_VOB_APP_DIR)\%f \
+ all VOB=$(VOBNAME) APPDIR=Host\$(THIS_APP_DIR)\$(THIS_DIRECTORY)
+endif
+
+# If Common VOB directories to include get the .o files from bin
+$(MY_OUTPUT): $(MODULE_OBJS)
+ifneq ($(COMMON_BLD_DIR),)
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(wildcard ./bin/*.o) $(RADVISION)/lib/radvxppc.a
+else
+ $(LD) -r -o $@.tmp $() $(MODULE_OBJS) $(RADVISION)/lib/radvxppc.a
+endif
+ $(NM) $@.tmp | munch > _ctdt.c
+ $(CC) -traditional $(CC_ARCH_SPEC) -c _ctdt.c
+ $(LD) -r -o $@ _ctdt.o $@.tmp
+ $(RM)$(subst /,$(DIRCHAR), _ctdt.c _ctdt.o $@.tmp)
+
+cleanall:
+ @for %f in ($(notdir $(MODULE_OBJS))) do \
+ $(RM) ..\bin\%f
+
+ $(RM) $(MY_OUTPUT)
+
+ifneq ($(COMMON_BLD_DIR),)
+ $(RM) bin\*.o
+ $(RM) bin\*.out
+endif \ No newline at end of file
diff --git a/data/mnet/GP10/Host/voip/src/ccb.cpp b/data/mnet/GP10/Host/voip/src/ccb.cpp
new file mode 100644
index 0000000..ee340ef
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/src/ccb.cpp
@@ -0,0 +1,201 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : ccb.cpp *
+ * *
+ * Description : The Call control block manipulation functions *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+#include <stdlib.h>
+#include <string.h>
+#include <cm.h>
+#include <stkutils.h>
+
+#include <tickLib.h>
+#include <drv\timer\timerDev.h>
+#include <taskLib.h>
+#include <seli.h>
+
+#include "logging\vcmodules.h"
+#include "logging\vclogging.h"
+#include "vipermem.h"
+#include "h323task.h"
+#include "ccb.h"
+
+extern PH323TASK_CONFIG pVoipTaskConfig;
+extern CALL_CONTROL_BLOCK CCBArray[MAX_ACTIVE_CALLS];
+
+static int CCBCount=0;
+
+/*
+ ************ Call Control Block Management functions *************************
+ */
+
+
+void
+InitializeCallControlBlocks()
+{
+ DBG_FUNC("InitializeCallControlBlocks",H323_LAYER);
+ DBG_ENTER();
+
+ PCALL_CONTROL_BLOCK NewCCB;
+ int Count;
+
+ for(Count=0;Count<MAX_ACTIVE_CALLS;Count++)
+ {
+ NewCCB = &CCBArray[Count];
+ InitializeCCB(NewCCB,Count);
+ }
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * GetCCBFromPool
+ */
+PCALL_CONTROL_BLOCK GetCCBFromPool()
+{
+ DBG_FUNC("GetCCBFromPool",H323_LAYER);
+ DBG_ENTER();
+ PCALL_CONTROL_BLOCK pCCB=NULL;
+ int Count;
+ HJCRTPSESSION RtpHandle;
+
+ LOCK_CCB_LIST();
+ for(Count=0;Count<MAX_ACTIVE_CALLS;Count++)
+ {
+ pCCB = &CCBArray[Count];
+ if (pCCB->Used == FALSE) break;
+ else continue;
+ }
+ if (pCCB->Used == TRUE)
+ {
+ DBG_ERROR("All CCBs exhausted!! total %d\n",Count);
+ pCCB = NULL;
+ }
+ else
+ {
+ RtpHandle = pCCB->RtpHandle;
+ InitializeCCB(pCCB,pCCB->Index);
+ pCCB->RtpHandle = RtpHandle;
+ pCCB->Used = TRUE;
+ }
+
+ UNLOCK_CCB_LIST();
+
+ DBG_LEAVE();
+ return pCCB;
+}
+
+
+
+
+/*
+ * ReturnCCBToPool
+ */
+void ReturnCCBToPool(PCALL_CONTROL_BLOCK pCCB)
+{
+ DBG_FUNC("ReturnCCBToPool",H323_LAYER);
+ DBG_ENTER();
+ HJCRTPSESSION RtpHandle;
+
+ LOCK_CCB_LIST();
+
+ RtpHandle = pCCB->RtpHandle;
+
+ InitializeCCB(pCCB,pCCB->Index);
+ pCCB->LastTxnId = VOIP_API_NULL_TXN_ID;
+ pCCB->Used = FALSE;
+ pCCB->RtpHandle = RtpHandle;
+ pCCB->CanDropCall = FALSE;
+ UNLOCK_CCB_LIST();
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+
+
+
+/*
+ * InitializeCCB
+ */
+void
+InitializeCCB(PCALL_CONTROL_BLOCK pCCB,short Index)
+{
+ STATE_TRANSITION_HISTORY HistoryBackup;
+
+ /*
+ * Stash the history for now; remember, we always need it !!!
+ */
+ memcpy(&HistoryBackup,&pCCB->StateTransitionHistory,sizeof(STATE_TRANSITION_HISTORY));
+
+ memset(pCCB,0,sizeof(CALL_CONTROL_BLOCK));
+ pCCB->H323CallState = H323_CALL_STATE_IDLE;
+ pCCB->LudbId = VOIP_NULL_MOBILE_HANDLE;
+ pCCB->Magic = H323TASK_MAGIC_VALUE;
+ pCCB->H323CRV = 0;
+ pCCB->Used = FALSE;
+ pCCB->CanDropCall = FALSE;
+ pCCB->Index = Index;
+ pCCB->Q931Connected = FALSE;
+ pCCB->CodecInfoSent = FALSE;
+ pCCB->OutChannelConnected = FALSE;
+ pCCB->IsSuppCall = FALSE;
+ pCCB->CallTransferred = FALSE;
+ /*
+ * Now copy back the history
+ */
+ memcpy(&pCCB->StateTransitionHistory,&HistoryBackup,sizeof(STATE_TRANSITION_HISTORY));
+
+}
+
+
+
+/*
+ * GetCCBByTpktHandle
+ */
+PCALL_CONTROL_BLOCK
+GetCCBByTpktHandle(HPROTCONN TpktHandle)
+{
+ DBG_FUNC("GetCCBByTpktHandle",H323_LAYER);
+ DBG_ENTER();
+ PCALL_CONTROL_BLOCK pCCB=NULL;
+ int Count;
+
+ LOCK_CCB_LIST();
+ for(Count=0;Count<MAX_ACTIVE_CALLS;Count++)
+ {
+ pCCB = &CCBArray[Count];
+ if (pCCB->Used == TRUE) {
+ if (pCCB->TpktHandle == TpktHandle) {
+ DBG_LEAVE();
+ return (pCCB);
+ }
+ }
+ else continue;
+ }
+
+ UNLOCK_CCB_LIST();
+
+ DBG_LEAVE();
+ return pCCB;
+}
diff --git a/data/mnet/GP10/Host/voip/src/eventhandlers.cpp b/data/mnet/GP10/Host/voip/src/eventhandlers.cpp
new file mode 100644
index 0000000..f9a3a3a
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/src/eventhandlers.cpp
@@ -0,0 +1,1775 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : EventHandlers.cpp *
+ * *
+ * Description : Functions for processing the H.323 protocol events *
+ * reported by the RadVision H.323 stack *
+ * *
+ * Author : Dinesh Nambisan *
+ * [Code borrowed liberally from original work *
+ * of Oleg Turovski] *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <cm.h>
+#include <stkutils.h>
+#include <tickLib.h>
+#include <drv\timer\timerDev.h>
+#include <taskLib.h>
+#include <time.h>
+
+#include "h323task.h"
+#include "ccb.h"
+#include "util.h"
+#include "eventhandlers.h"
+#include "rtptask.h"
+#include "smroutines.h"
+#include "voip\vblink.h"
+#include "voip\voipapi.h"
+#include "jcc\ludbapi.h"
+
+extern PH323TASK_CONFIG pVoipTaskConfig;
+
+
+/*
+ * NewCallHandler
+ */
+int CALLCONV NewCallHandler(
+ IN HAPP hApp,
+ IN HCALL hsCall,
+ OUT LPHAPPCALL lphaCall )
+{
+ DBG_FUNC("NewCallHandler",H323_LAYER);
+ DBG_ENTER();
+ PCALL_CONTROL_BLOCK pCCB;
+ LUDB_ID LudbId;
+
+ cmAlias Alias;
+ char CalledPartyNumber[256];
+
+ memset(CalledPartyNumber,0,256);
+ *lphaCall = NULL;
+
+ Alias.string = CalledPartyNumber;
+
+ if( cmCallGetParam( hsCall, cmParamCalledPartyNumber, 0, NULL, (char*)&Alias ) < 0 ||
+ Alias.length <= 0 )
+ {
+ DBG_ERROR( "Error in cmCallGetParam()\n" );
+ if( cmCallGetParam( hsCall, cmParamDestinationAddress, 0, NULL, (char*)&Alias ) < 0 ||
+ Alias.length <= 0 ) {
+ DBG_ERROR( "Cannot retrieve called party number or destination address of incoming call\n" );
+ DBG_LEAVE();
+ return ERROR;
+ }
+ }
+
+ DBG_TRACE( "New Incoming Call to %s\n", CalledPartyNumber );
+
+ LudbId = 0;
+ if (!ludbIsMobileRegistered(CalledPartyNumber,&LudbId))
+ {
+ DBG_TRACE("Called mobile is not online now\n" );
+ LudbId = -1;
+ }
+
+
+ pCCB = GetCCBFromPool();
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB!=NULL);
+#endif
+ if (pCCB == NULL)
+ {
+ DBG_ERROR("No more call blocks available to handle call!\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+
+ pCCB->LanCallHandle = hsCall;
+ pCCB->LudbId = LudbId;
+ pCCB->TpktHandle = cmGetTpktChanHandle(pCCB->LanCallHandle,cmQ931TpktChannel);
+ strcpy(pCCB->MobileNumber,CalledPartyNumber);
+
+
+ sseCreateCall(pVoipTaskConfig->SuppStackHandle,&(pCCB->SuppCallHandle),(HSSEAPPCALL)pCCB,
+ pCCB->LanCallHandle);
+ sseCallImplementTransfer(pCCB->SuppCallHandle,TRUE);
+ sseCallImplementForward(pCCB->SuppCallHandle);
+
+
+ *lphaCall = (HAPPCALL)pCCB;
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : New incoming call \n",pCCB->MobileNumber);
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+/*
+ * RASEventHandler
+ */
+int CALLCONV RASEventHandler(
+ IN HAPP hApp,
+ IN cmRegState regState,
+ IN cmRegEvent regEvent,
+ IN int regEventHandle )
+{
+ DBG_FUNC("RASEventHandler",H323_LAYER);
+ DBG_ENTER();
+ int retStatus=OK;
+
+ if( regEvent == -1 )
+ {
+ DBG_LEAVE();
+ return OK;
+ }
+
+
+ switch( regEvent )
+ {
+ case cmRegistrationConfirm:
+ {
+ DBG_ERROR("Registration confirmation received from GK\n");
+ }
+ break;
+
+ case cmUnregistrationConfirm:
+ {
+ DBG_ERROR("Unregistration Confirmation received from GK!\n");
+ }
+ break;
+
+ case cmRegistrationReject:
+ DBG_ERROR("Registration Reject received from GK!\n");
+ break;
+
+ case cmUnregistrationReject:
+ DBG_ERROR("Unregistration Reject received from GK!\n");
+ break;
+
+ case cmUnregistrationRequest:
+ DBG_ERROR("Unregistration Request received from GK!\n");
+ break;
+
+ case cmGatekeeperConfirm:
+ DBG_ERROR("GateKeeper confirm received \n");
+ break;
+ case cmGatekeeperReject:
+ DBG_ERROR("GateKeeper reject received \n");
+ break;
+ case cmNonStandardMessage:
+ DBG_ERROR("NonStandard Message received \n");
+ break;
+ default:
+ DBG_ERROR("UNKNOWN RAS event received \n");
+ break;
+ }
+ DBG_LEAVE();
+ return retStatus;
+}
+
+
+
+
+
+
+/*
+ * EventCallStateChanged
+ */
+int CALLCONV EventCallStateChanged(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN UINT32 State,
+ IN UINT32 StateMode )
+{
+ DBG_FUNC("EventCallStateChanged",H323_LAYER);
+ DBG_ENTER();
+ if( NULL == haCall)
+ { /* to drop "over capacity" and "wrong number" calls */
+ switch( State )
+ {
+ case cmCallStateOffering:
+ DBG_WARNING("Dropping Call since capacity exceeded or number not found!\n");
+ cmCallDrop( hsCall );
+ break;
+
+ default:
+ cmCallClose( hsCall );
+ break;
+ }
+ DBG_LEAVE();
+ return OK;
+ }
+
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)haCall;
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Invalid CCB returned !\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ sseCallStateChanged(pCCB->SuppCallHandle,State,StateMode);
+
+
+
+ DBG_TRACE("Mobile '%s' : Call 0x%x : State %s, Mode %s\n",
+ pCCB->MobileNumber, pCCB, GetCallStateName( State ), GetCallStateModeName( StateMode ) );
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : State %s : Mode %s\n",pCCB->MobileNumber,
+ GetCallStateName( State ), GetCallStateModeName( StateMode ) );
+
+
+ switch( State )
+ {
+ case cmCallStateOffering:
+ {
+ CALL_OFFERING_DETAILS CallOfferingDetails;
+ memset(CallOfferingDetails.pszCallingPartyId,0,MAX_CALLING_PARTY_ADDRESS_SIZE );
+ memset(CallOfferingDetails.pszCalledPartyId,0,MAX_CALLED_PARTY_ADDRESS_SIZE );
+
+ cmCallGetCallingPartyId( hsCall, CallOfferingDetails.pszCallingPartyId, MAX_CALLING_PARTY_ADDRESS_SIZE );
+ cmCallGetCalledPartyId( hsCall, CallOfferingDetails.pszCalledPartyId, MAX_CALLED_PARTY_ADDRESS_SIZE );
+
+ DBG_TRACE("Call Offering : CallingParty: '%s', CalledParty: '%s'\n",
+ CallOfferingDetails.pszCallingPartyId,
+ CallOfferingDetails.pszCalledPartyId);
+
+ /*
+ * FIXME::PUT IN CODE TO CHECK WHETHER THIS IS A FAST-START CALL
+ *
+ * pCCB->FastStart = FALSE;
+ */
+ RunStateMachine(pCCB,(PVOID)&CallOfferingDetails,H323_EVENT_RECV_CALL_OFFERING);
+ }
+ break;
+
+
+ case cmCallStateDialtone:
+ {
+ DBG_TRACE("CallState = DIALTONE\n");
+ if (pCCB->FastStart) {
+ if (smSetupFastChannels(pCCB) != STATUS_SUCCESS) {
+ cmCallDrop(pCCB->LanCallHandle);
+ }
+ }
+ pCCB->TpktHandle = cmGetTpktChanHandle(pCCB->LanCallHandle,cmQ931TpktChannel);
+
+ }
+ break;
+
+
+ case cmCallStateProceeding:
+ {
+ DBG_TRACE("Call proceeding\n");
+ RunStateMachine(pCCB,NULL,H323_EVENT_RECV_CALL_PROCEEDING);
+ }
+ break;
+
+ case cmCallStateRingBack:
+ {
+ DBG_TRACE("Call RingBack\n");
+ RunStateMachine(pCCB,NULL,H323_EVENT_RECV_CALL_RINGBACK);
+ }
+ break;
+
+ case cmCallStateConnected:
+ {
+
+
+ BOOL fs;
+
+
+ fs = ((cmCallGetParam((HCALL)hsCall,cmParamConnectFastStart,0,NULL,NULL)>=0)
+ || (cmCallGetParam((HCALL)hsCall,cmParamAlertingFastStart,0,NULL,NULL)>=0)
+ || (cmCallGetParam((HCALL)hsCall,cmParamCallProcFastStart,0,NULL,NULL)>=0));
+
+ if(fs) {
+ DBG_TRACE("FastStart returns TRUE\n");
+ pCCB->FastStart = TRUE;
+ }
+ else {
+ DBG_TRACE("FastStart returns FALSE\n");
+ pCCB->FastStart = FALSE;
+ }
+
+
+ switch( StateMode )
+ {
+
+ case cmCallStateModeCallSetupConnected: /* Q.931 is completed; comes first */
+ DetectRemoteTerminalType(pCCB);
+ RunStateMachine(pCCB,NULL,H323_EVENT_RECV_CALL_CONNECTED);
+ break;
+
+ case cmCallStateModeControlConnected: /* not always sent */
+ break;
+
+ case cmCallStateModeCallConnected:
+ DBG_TRACE("CallStateModeCallConnected roeceived\n");
+ break;
+
+ default:
+ break;
+ }
+ }
+ break;
+
+ case cmCallStateDisconnected:
+ {
+ if (pCCB->CallTransferred) {
+ DBG_TRACE("Transferred call-leg disconnected\n");
+ }
+ int CauseValue=-1;
+ unsigned char CauseCode=0;
+ cmCallGetParam(hsCall,cmParamReleaseCompleteCause,0,&CauseValue,NULL);
+ CauseCode = (unsigned char)CauseValue;
+ pVoipTaskConfig->CallStats.CallDisconnectStats.VoipDisconnects[CauseValue]++;
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : Call Disconnected with Q.850 Cause %d\n",pCCB->MobileNumber,CauseCode);
+ RunStateMachine(pCCB,&CauseCode,H323_EVENT_RECV_CALL_DISCONNECTED);
+ }
+ break;
+
+ case cmCallStateIncompleteAddress:
+ case cmCallStateAdmissionReject:
+ {
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : Call Destination Rejected\n",pCCB->MobileNumber);
+ RunStateMachine(pCCB,NULL,H323_EVENT_RECV_CALL_DEST_REJECTED);
+ }
+ break;
+
+
+ case cmCallStateIdle:
+ {
+ if (pCCB->IsSuppCall) {
+ DBG_TRACE("Supplementary call leg disconnected\n");
+ return OK;
+ }
+ RunStateMachine(pCCB,NULL,H323_EVENT_RECV_CALL_IDLE);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+
+
+
+
+/*
+ * EventCallInfo
+ */
+int CALLCONV EventCallInfo(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN char* Display,
+ IN char* User,
+ IN int UserSize )
+{
+ DBG_FUNC("EventCallInfo",H323_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("Display = %s, User = %s\n",
+ Display ? Display : "<no>", User ? User : "<no>" );
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+
+/*
+ * EventCallCapabilities
+ */
+int CALLCONV EventCallCapabilities(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN cmCapStruct* capabilities[] )
+{
+ DBG_FUNC("EventCallCapabilities",H323_LAYER);
+ DBG_ENTER();
+
+ int i;
+ REMOTE_CAPABILITIES_DETAILS RemoteCapabilities;
+
+ PCALL_CONTROL_BLOCK pCCB= (PCALL_CONTROL_BLOCK)haCall;
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Invalid CCB value returned!\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+#ifdef DEBUG_CAPABILITIES
+ DBG_WARNING("Capabilities reported by remote:\n" );
+ for( i = 0; capabilities[i]; i++ )
+ CapabilityPrint( capabilities[i] );
+
+ DBG_WARNING("End of Remote capabilities\n");
+#endif /* #ifdef DEBUG_CAPABILITIES */
+
+ RemoteCapabilities.GSMCodecCapability = FALSE;
+ RemoteCapabilities.GSMFullRateCapability = FALSE;
+ RemoteCapabilities.GSMEnhancedFullRateCapability= FALSE;
+
+ /*
+ * looking for GSM audio cap
+ */
+
+ for( i = 0; capabilities[i]; i++ )
+ {
+ if (capabilities[i]->type == cmCapAudio)
+ {
+ if (strcmp( capabilities[i]->name, "gsmFullRate" ) == 0) {
+ RemoteCapabilities.GSMCodecCapability=TRUE;
+ RemoteCapabilities.GSMFullRateCapability = TRUE;
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : H.323 V2 GSM FR Codec capability reported by remote endpoint\n",
+ pCCB->MobileNumber);
+ break;
+ }
+ if (strcmp( capabilities[i]->name, "gsmEnhancedFullRate" ) == 0) {
+ RemoteCapabilities.GSMCodecCapability=TRUE;
+ RemoteCapabilities.GSMEnhancedFullRateCapability = TRUE;
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : H.323 V2 GSM EFR Codec capability reported by remote endpoint\n",
+ pCCB->MobileNumber);
+ break;
+ }
+
+ }
+ }
+
+ if (!RemoteCapabilities.GSMCodecCapability) {
+ DBG_WARNING("GSM Capability NOT found!!\n");
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : No H.323 V2 GSM Codecs capability reported by remote endpoint\n",
+ pCCB->MobileNumber);
+ }
+
+
+
+
+ RunStateMachine(pCCB,(PVOID)&RemoteCapabilities,H323_EVENT_RECV_REMOTE_CAPABILITIES);
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+/*
+ * EventCallCapabilitiesExt
+ */
+int CALLCONV EventCallCapabilitiesExt(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN cmCapStruct*** capabilities[] )
+{
+ DBG_FUNC("EventCallCapabilitiesExt",H323_LAYER);
+ DBG_ENTER();
+
+ int i, j, k;
+ cmCapStruct* pCaps;
+#ifdef DEBUG_CAPABILITIES
+ DBG_TRACE("Capability Descriptors:\n" );
+
+ for( i = 0; capabilities[i]; i++ )
+ {
+ DBG_TRACE("Simultaneous Capabilities:\n" );
+
+ for( j = 0; capabilities[i][j]; j++ )
+ {
+ DBG_TRACE("Alternative Capabilities:\n" );
+
+ for( k = 0; capabilities[i][j][k]; k++ )
+ {
+ CapabilityPrint( pCaps = capabilities[i][j][k] );
+
+ }
+
+ }
+
+ }
+
+#endif /* #ifdef DEBUG_CAPABILITIES */
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+/*
+ * EventCallNewChannel
+ */
+int CALLCONV EventCallNewChannel(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN HCHAN hsChan,
+ OUT LPHAPPCHAN lphaChan )
+{
+ DBG_FUNC("EventCallNewChannel",H323_LAYER);
+ DBG_ENTER();
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)haCall;
+ BOOL origin;
+ char direction[128];
+
+
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Invalid CCB returned!\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ cmChannelGetOrigin(hsChan,&origin);
+
+ if (origin) {
+ strcpy(direction,"outgoing");
+ }
+ else {
+ strcpy(direction,"incoming");
+ }
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : New %s channel 0x%x\n",pCCB->MobileNumber,direction,hsChan);
+ DBG_TRACE("New %s channel 0x%x for '%s'\n", direction,hsChan,
+ pCCB->MobileNumber);
+
+ *lphaChan = (HAPPCHAN)pCCB;
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+
+
+/*
+ * EventCallCapabilitiesResponse
+ */
+int CALLCONV EventCallCapabilitiesResponse(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN UINT32 status )
+{
+ DBG_FUNC("EventCallCapabilitiesResponse",H323_LAYER);
+ DBG_ENTER();
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)haCall;
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Invalid CCB returned!\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+
+ switch(status )
+ {
+ case cmCapAccept:
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : H.245 TermCapSet Accepted by remote endpoint\n",pCCB->MobileNumber);
+ RunStateMachine(pCCB,NULL,H323_EVENT_RECV_CAPABILITIES_ACK);
+ break;
+
+ case cmCapReject:
+ DBG_WARNING("H.245 TermCapSet REJECTED by remote endpoint\n");
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : H.245 TermCapSet REJECTED by remote endpoint\n",pCCB->MobileNumber);
+ RunStateMachine(pCCB,NULL,H323_EVENT_RECV_CAPABILITIES_NAK);
+ break;
+
+ default:
+ DBG_WARNING("Unknown Capabilities response by remote station\n");
+ break;
+ }
+
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+/*
+ * EventCallMasterSlaveStatus
+ */
+int CALLCONV EventCallMasterSlaveStatus(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN UINT32 status )
+{
+ DBG_FUNC("EventCallMasterSlaveStatus",H323_LAYER);
+ DBG_ENTER();
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)haCall;
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Invalid CCB returned!\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ char* psz;
+
+ switch( status )
+ {
+ case cmMSMaster:
+ psz = "Master";
+ break;
+
+ case cmMSSlave:
+ psz = "Slave";
+ break;
+
+ case cmMSError:
+ psz = "Error!";
+ break;
+
+ default:
+ psz = "Unknown!";
+ break;
+ }
+
+ DBG_TRACE("Master-Slave determination: Remote station is %s\n", psz );
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : Remote station is %s for the call\n",pCCB->MobileNumber,psz);
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+/*
+ * EventCallRoundTripDelay
+ */
+int CALLCONV EventCallRoundTripDelay(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN INT32 delay )
+{
+ DBG_FUNC("EventCallRoundTripDelay",H323_LAYER);
+ DBG_ENTER();
+ DBG_TRACE( "Round Trip Delay: %d\n", delay );
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+
+
+/*
+ * EventCallUserInput
+ */
+int CALLCONV EventCallUserInput(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN INT32 userInputId )
+{
+ DBG_FUNC("EventCallUserInput",H323_LAYER);
+ DBG_ENTER();
+
+ DBG_ERROR("Received USER INPUT !!!\n");
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+/*
+ * EventCallRequestMode
+ */
+int CALLCONV EventCallRequestMode(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN cmReqModeStatus status,
+ IN INT32 nodeId )
+{
+ DBG_FUNC("EventCallRequestMode",H323_LAYER);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+
+
+/*
+ * EventCallMiscStatus
+ */
+int CALLCONV EventCallMiscStatus(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN cmMiscStatus status )
+{
+ DBG_FUNC("EventCallMiscStatus",H323_LAYER);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+
+
+/*
+ * EventCallControlStateChanged
+ */
+int CALLCONV EventCallControlStateChanged(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN UINT32 State,
+ IN UINT32 StateMode )
+{
+ DBG_FUNC("EventCallControlStateChanged",H323_LAYER);
+ DBG_ENTER();
+
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)haCall;
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Invalid CCB returned!\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : Control State %s\n",pCCB->MobileNumber,GetControlStateName( State ) );
+
+ switch( State )
+ {
+/*
+ cmControlStateConnected,
+ cmControlStateConference,
+ cmControlStateTransportConnected,
+ cmControlStateTransportDisconnected,
+*/
+ case cmControlStateFastStart:
+ {
+ DBG_TRACE("Fast Setup successful\n");
+ pCCB->FastStart = TRUE;
+ }
+ break;
+
+
+ case cmControlStateTransportConnected:
+ {
+ DBG_TRACE("H.245 Transport connected\n");
+ RunStateMachine(pCCB,NULL,H323_EVENT_RECV_H245_TRANSPORT_CONNECTED);
+ }
+ break;
+ case cmControlStateConnected:
+ {
+ DBG_TRACE("H.245 Connected\n");
+ RunStateMachine(pCCB,NULL,H323_EVENT_RECV_H245_CONNECTED);
+ }
+ break;
+
+ default:
+ break;
+ }
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+
+
+
+/*
+ * EventCallMasterSlave
+ */
+int CALLCONV EventCallMasterSlave(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN UINT32 terminalType,
+ IN UINT32 statusDeterminationNumber )
+{
+ DBG_FUNC("EventCallMasterSlave",H323_LAYER);
+ DBG_ENTER();
+ DBG_TRACE("Remote terminalType = %d, SDN = %d\n",
+ terminalType, statusDeterminationNumber );
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+
+
+/*
+ * EventCallFacility
+ */
+int CALLCONV
+EventCallFacility(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN int handle,
+ OUT IN BOOL *proceed)
+{
+ DBG_FUNC("EventCallFacility",H323_LAYER);
+ DBG_ENTER();
+ INT32 valueAlt=0;
+ INT32 valueAlias=0;
+ int nodeId;
+
+ *proceed = TRUE;
+
+
+ nodeId = pvtGetByPath(cmGetValTree(pVoipTaskConfig->StackHandle),handle,"message.*.userUser.h323-UserInformation.h323-uu-pdu.h323-message-body.*.alternativeAddress",NULL,&valueAlt,NULL);
+ DBG_TRACE("Facility : node id %d, Alternate %d\n",nodeId,valueAlt);
+
+ nodeId = pvtGetByPath(cmGetValTree(pVoipTaskConfig->StackHandle),handle,"message.*.userUser.h323-UserInformation.h323-uu-pdu.h323-message-body.*.alternativeAliasAddress",NULL,&valueAlias,NULL);
+ DBG_TRACE("Facility : node id %d,Alias %d\n",nodeId,valueAlias);
+
+ DBG_LEAVE();
+ return 0;
+}
+
+
+/*
+ * EventCallFastStartSetup
+ */
+int CALLCONV
+EventCallFastStartSetup(HAPPCALL haCall, HCALL hsCall,cmFastStartMessage *fsMessage)
+{
+ DBG_FUNC("EventCallFastStartSetup",H323_LAYER);
+ DBG_ENTER();
+
+ cmTransportAddress rtp;
+ cmTransportAddress rtcp;
+ int i,j,k;
+
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)haCall;
+
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Invalid CCB returned!\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ pCCB->FastStart = TRUE;
+
+
+
+ for (i=0;i<fsMessage->partnerChannelsNum;i++) {
+ if (fsMessage->partnerChannels[i].type != cmCapAudio) continue;
+ else {
+ /* Search for gsmFullRate first */
+ for (j=0;j<fsMessage->partnerChannels[i].transmit.altChannelNumber;j++) {
+ if (strcmp(fsMessage->partnerChannels[i].transmit.channels[j].channelName,"gsmFullRate")==0) {
+ pCCB->remoteGsmFrTxIndex = fsMessage->partnerChannels[i].transmit.channels[j].index;
+ DBG_TRACE("GSM Full Rate codec transmit capability found\n");
+ }
+ }
+ for (k=0;k<fsMessage->partnerChannels[i].receive.altChannelNumber;k++) {
+ if (strcmp(fsMessage->partnerChannels[i].receive.channels[k].channelName,"gsmFullRate")==0) {
+ pCCB->remoteGsmFrRxIndex = fsMessage->partnerChannels[i].receive.channels[k].index;
+ DBG_TRACE("GSM Full Rate codec receive capability found\n");
+ pCCB->RemoteGSMFullRateCapability=TRUE;
+ }
+ }
+
+
+ /* Search for gsmEnhancedFullRate first */
+ for (j=0;j<fsMessage->partnerChannels[i].transmit.altChannelNumber;j++) {
+ if (strcmp(fsMessage->partnerChannels[i].transmit.channels[j].channelName,"gsmEnhancedFullRate")==0) {
+ pCCB->remoteGsmEfrTxIndex = fsMessage->partnerChannels[i].transmit.channels[j].index;
+ DBG_TRACE("GSM Enhanced Full Rate codec transmit capability found\n");
+ }
+ }
+ for (k=0;k<fsMessage->partnerChannels[i].receive.altChannelNumber;k++) {
+ if (strcmp(fsMessage->partnerChannels[i].receive.channels[k].channelName,"gsmEnhancedFullRate")==0) {
+ pCCB->remoteGsmEfrRxIndex = fsMessage->partnerChannels[i].receive.channels[k].index;
+ DBG_TRACE("GSM Enhanced Full Rate codec receive capability found\n");
+ pCCB->RemoteGSMEnhancedFullRateCapability=TRUE;
+ }
+ }
+ }
+ }
+
+ DBG_LEAVE();
+ return TRUE;
+}
+
+
+
+
+
+/*
+ * suppEventForwardActivated
+ */
+int CALLCONV
+suppEventForwardActivated(
+ IN HSSEAPPCALL hSSEaCall,
+ IN HSSECALL hSSECall
+ )
+{
+ DBG_FUNC("suppEventForwardActivated",H323_LAYER);
+ DBG_ENTER();
+ DBG_TRACE("Forwarding activated\n");
+ DBG_LEAVE();
+ return (0);
+}
+
+
+/*
+ * suppEventForwardDeactivated
+ */
+int CALLCONV
+suppEventForwardDeactivated(
+ IN HSSEAPPCALL hSSEaCall,
+ IN HSSECALL hSSECall
+ )
+{
+ DBG_FUNC("suppEventForwardDeactivated",H323_LAYER);
+ DBG_ENTER();
+ DBG_TRACE("Forwarding De-activated\n");
+ DBG_LEAVE();
+ return (0);
+}
+
+
+/*
+ * suppEventCallReroute
+ */
+int CALLCONV
+suppEventCallReroute(
+ IN HSSEAPPCALL hSSEaCallPri,
+ IN HSSECALL hSSECallPri,
+ OUT HSSECALL *hSSECallSec)
+{
+
+ DBG_FUNC("suppEventCallReroute",H323_LAYER);
+ DBG_ENTER();
+ DBG_TRACE("Call rerouting started\n");
+/*
+ cmCallNew(hApp,(HAPPCALL)&theCall[fr],&(theCall[fr].hsCall));
+ sseCreateCall(hSSEApp,&(theCall[fr].hSSECall),(HSSEAPPCALL)&theCall[fr],
+ theCall[fr].hsCall);
+
+ sseCallImplementTransfer(theCall[fr].hSSECall,TRUE);
+ sseCallImplementForward(theCall[fr].hSSECall);
+ *hSSECallSec=theCall[fr].hSSECall;
+*/
+ DBG_LEAVE();
+ return (0);
+}
+
+
+
+/*
+ * suppEventCallTransfer
+ */
+int CALLCONV
+suppEventCallTransfer(
+ IN HSSEAPPCALL hSSEaCallPri,
+ IN HSSECALL hSSECallPri,
+ OUT HSSECALL* hSSECallSec)
+{
+
+ DBG_FUNC("suppEventCallTransfer",H323_LAYER);
+ DBG_ENTER();
+ PCALL_CONTROL_BLOCK pOrigCCB,pCCB;
+ STATUS Status;
+
+ pOrigCCB = (PCALL_CONTROL_BLOCK)hSSEaCallPri;
+ if (pOrigCCB->Magic != H323TASK_MAGIC_VALUE) {
+ DBG_ERROR("Unknown handle returned by callback!\n");
+ return ERROR;
+ }
+
+
+ DBG_TRACE("Call of mobile %s being transferred\n",pOrigCCB->MobileNumber);
+
+ pCCB = GetCCBFromPool();
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB != NULL);
+#endif
+ if (pCCB == NULL) {
+ DBG_ERROR("No more call blocks available in pool\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ pCCB->IsSuppCall = TRUE;
+ pOrigCCB->CallTransferred = TRUE;
+
+ if(cmCallNew(pVoipTaskConfig->StackHandle,(HAPPCALL)pCCB,&pCCB->LanCallHandle) < 0) {
+ DBG_ERROR("Call capacity exhausted in RadVision stack\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+ sseCreateCall(pVoipTaskConfig->SuppStackHandle,&(pCCB->SuppCallHandle),(HSSEAPPCALL)pCCB,
+ pCCB->LanCallHandle);
+ sseCallImplementTransfer(pCCB->SuppCallHandle,TRUE);
+ sseCallImplementForward(pCCB->SuppCallHandle);
+
+ pCCB->H323CRV = pOrigCCB->H323CRV;
+ pCCB->LudbId = pOrigCCB->LudbId;
+ pCCB->LastTxnId = pOrigCCB->LastTxnId;
+ pCCB->CodecUsed = pOrigCCB->CodecUsed;
+ pCCB->OldIndex = pOrigCCB->Index;
+
+ pCCB->CallingNumberType = pOrigCCB->CallingNumberType;
+ pCCB->CallingNumberingPlan = pOrigCCB->CallingNumberingPlan;
+ pCCB->CallingPartyPI = pOrigCCB->CallingPartyPI;
+ pCCB->CallingPartySI = pOrigCCB->CallingPartySI;
+
+
+
+ pCCB->GSMFullRateCapability = pOrigCCB->GSMFullRateCapability;
+ pCCB->GSMEnhancedFullRateCapability = pOrigCCB->GSMEnhancedFullRateCapability;
+
+ pCCB->FastStart = TRUE;
+ strcpy(pCCB->MobileNumber,pOrigCCB->MobileNumber);
+ /* cc note */
+ /* don't cat the -TRDSE, since it will be used to setup fast channel
+ strcat(pCCB->MobileNumber,"-TRDSE");
+ */
+
+ strcpy(pCCB->TransferringPartyId,pOrigCCB->RemotePartyId);
+
+ *hSSECallSec = pCCB->SuppCallHandle;
+
+ pCCB->H323CallState = H323_CALL_STATE_WAIT_FOR_PROCEEDING;
+
+
+ PAPI_MESSAGE ApiMsg;
+ ApiMsg = GetFreeMsgFromPool();
+ if (ApiMsg == NULL) {
+ DBG_ERROR("All API messages used up from pool!\n");
+ DBG_LEAVE();
+ return FALSE;
+ }
+ PVOIP_API_MESSAGE pMsg = (PVOIP_API_MESSAGE)&ApiMsg->VoipMsg;
+
+ pMsg->Magic = VOIP_API_MAGIC_VALUE;
+ pMsg->H323CRV = pCCB->H323CRV;
+ pMsg->LudbId = pCCB->LudbId;
+ pMsg->VoipMobileHandle = ludbGetVoipMobileHandle(pCCB->LudbId);
+ pMsg->VoipCallHandle = pCCB->OldIndex;
+ pMsg->TxnId = pCCB->LastTxnId;
+ pMsg->MessageType = VOIP_API_CALL_UPDATE_HANDLES;
+ pMsg->CallUpdateHandles.NewHandle = pCCB->Index;
+ pMsg->CallUpdateHandles.ReconnectOnTransferFailure = FALSE;
+ DBG_TRACE("Mobile %s: Sending Update Handles to CC\n",pCCB->MobileNumber);
+ Status=VoipSendMessageToCc(pMsg);
+
+ DBG_LEAVE();
+ return (0);
+}
+
+
+
+
+
+/*
+ * EventCallH450SupplementaryService
+ */
+int CALLCONV
+EventCallH450SupplementaryService(
+ IN HAPPCALL haCall,
+ IN HCALL hsCall,
+ IN cmCallQ931MsgType msgType,
+ IN int nodeId,
+ IN int size)
+{
+ DBG_FUNC("EventCallH450SupplementaryService",H323_LAYER);
+ DBG_ENTER();
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)haCall;
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Invalid CCB returned!\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ sseCallH450SupplServ(pCCB->SuppCallHandle,msgType,nodeId,size);
+ DBG_LEAVE();
+ return 0;
+}
+
+
+
+
+/*
+ *
+ * EventChannelSetRTCPAddress
+ */
+int CALLCONV EventChannelSetRTCPAddress(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN UINT32 ip,
+ IN UINT16 port )
+{
+ DBG_FUNC("jcEvChannelSetRTCPAddress",H323_LAYER);
+ DBG_ENTER();
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)haChan;
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Invalid CCB returned!\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : RTCP address %s for channel 0x%x\n",
+ pCCB->MobileNumber,jcIpToString( ip, port ), hsChan );
+
+ jcRtcpSetRemoteAddress( jcRtpGetRTCPSession( pCCB->RtpHandle ), ip, port );
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+/*
+ * EventChannelRTPDynamicPayloadType
+ */
+int CALLCONV EventChannelRTPDynamicPayloadType(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN INT8 dynamicPayloadType )
+{
+ DBG_FUNC("EventChannelRTPDynamicPayloadType",H323_LAYER);
+ DBG_ENTER();
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)haChan;
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Invalid CCB returned!\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : RTP payload type value %d for channel 0x%x\n",
+ pCCB->MobileNumber,(int)dynamicPayloadType, hsChan );
+ DBG_LEAVE();
+ return OK;
+}
+
+
+/*
+ * EventChannelGetRTCPAddress
+ */
+int CALLCONV EventChannelGetRTCPAddress(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN UINT32* ip,
+ IN UINT16* port )
+{
+ DBG_FUNC("EventChannelGetRTCPAddress",H323_LAYER);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+/*
+ * EventChannelSetAddress
+ */
+int CALLCONV EventChannelSetAddress(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN UINT32 ip,
+ IN UINT16 port )
+{
+ DBG_FUNC("EventChannelSetAddress",H323_LAYER);
+ DBG_ENTER();
+
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)haChan;
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Invalid CCB returned!\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : RTP address %s for channel 0x%x\n",
+ pCCB->MobileNumber,jcIpToString( ip, port ), hsChan );
+ jcRtpSetRemoteAddress( pCCB->RtpHandle, ip, port );
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+
+/*
+ * EventChannelStateChanged
+ */
+int CALLCONV EventChannelStateChanged(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN UINT32 State,
+ IN UINT32 StateMode )
+{
+ DBG_FUNC("EventChannelStateChanged",H323_LAYER);
+ DBG_ENTER();
+
+
+ DBG_TRACE("Channel State Changed() for %x channel: State '%s', StateMode '%s'\n", hsChan,
+ GetChannelStateName( State ), GetChannelStateModeName( StateMode ) );
+
+ switch( State )
+ {
+
+ case cmChannelStateDisconnected:
+ {
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)haChan;
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Invalid CCB returned!\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+ if (pCCB->InChannelHandle == hsChan)
+ {
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : IN Channel 0x%x disconnected\n",pCCB->MobileNumber,hsChan);
+ RunStateMachine(pCCB,NULL,H323_EVENT_RECV_IN_CHANNEL_DISCONNECTED);
+ }
+ else if (pCCB->OutChannelHandle == hsChan)
+ {
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : OUT Channel 0x%x disconnected\n",pCCB->MobileNumber,hsChan);
+ RunStateMachine(pCCB,NULL,H323_EVENT_RECV_OUT_CHANNEL_DISCONNECTED);
+ }
+ else if (pCCB->NonAudioChannelHandle == hsChan)
+ {
+ DBG_TRACE("Non audio channel %x disconnected\n");
+ }
+ else
+ {
+ DBG_ERROR("Unknown channel disconnected!!\n");
+ }
+ }
+ break;
+ case cmChannelStateOffering:
+ {
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)haChan;
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Invalid CCB returned!\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+ if (pCCB->NonAudioChannelHandle == hsChan)
+ {
+ DBG_TRACE("Non audio channel %x disconnected\n");
+ }
+ else
+ {
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : 0x%x Channel offering\n",pCCB->MobileNumber,hsChan);
+ DBG_TRACE("%x Channel offering \n",hsChan);
+ pCCB->InChannelHandle = hsChan;
+ RunStateMachine(pCCB,NULL,H323_EVENT_RECV_CHANNEL_OFFERING);
+ }
+ }
+ break;
+
+ case cmChannelStateConnected:
+ {
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)haChan;
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Invalid CCB returned!\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+ if (hsChan == pCCB->NonAudioChannelHandle)
+ break;
+
+ BOOL origin;
+ cmChannelGetOrigin(hsChan,&origin);
+ if (origin)
+ {
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : OUT Channel 0x%x Connected\n",pCCB->MobileNumber,hsChan);
+ DBG_TRACE("OutChannel %x connected\n",hsChan);
+ RunStateMachine(pCCB,NULL,H323_EVENT_RECV_OUT_CHANNEL_CONNECTED);
+ }
+ else
+ {
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : IN Channel 0x%x Connected\n",pCCB->MobileNumber,hsChan);
+ DBG_TRACE("InChannel %x connected\n",hsChan);
+ RunStateMachine(pCCB,NULL,H323_EVENT_RECV_IN_CHANNEL_CONNECTED);
+ }
+ }
+ break;
+
+ case cmChannelStateDialtone:
+ case cmChannelStateRingBack:
+ {
+ }
+ break;
+ case cmChannelStateIdle:
+ {
+ cmChannelClose(hsChan);
+ }
+ break;
+
+ default:
+ {
+ DBG_WARNING("Unknown channel state change reported!\n");
+ }
+ break;
+ }
+ DBG_LEAVE();
+ return OK;
+}
+
+/*
+ * EventChannelNewRate
+ */
+int CALLCONV EventChannelNewRate(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN UINT32 rate )
+{
+ DBG_FUNC("EventChannelNewRate",H323_LAYER);
+ DBG_ENTER();
+ DBG_TRACE( "Rate = %d\n", rate );
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+/*
+ * EventChannelMaxSkew
+ */
+int CALLCONV EventChannelMaxSkew(
+ IN HAPPCHAN haChan1,
+ IN HCHAN hsChan1,
+ IN HAPPCHAN haChan2,
+ IN HCHAN hsChan2,
+ IN UINT32 skew )
+{
+ DBG_FUNC("EventChannelMaxSkew",H323_LAYER);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+
+
+
+/*
+ * EventChannelParameters
+ */
+int CALLCONV EventChannelParameters(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN char* channelName,
+ IN HAPPCHAN haChanSameSession,
+ IN HCHAN hsChanSameSession,
+ IN HAPPCHAN haChanAssociated,
+ IN HCHAN hsChanAssociated,
+ IN UINT32 rate )
+{
+ DBG_FUNC("EventChannelParameters",H323_LAYER);
+ DBG_ENTER();
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)haChan;
+
+
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Invalid CCB returned!\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+
+
+ DBG_TRACE( "Parameters for %x channel. Name: '%s', Rate: %d\n",
+ hsChan, channelName, rate );
+
+ if (pCCB->FastStart) {
+
+ if (strcmp(channelName, "gsmFullRate" ) == 0) {
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : GSM FullRate Codec selected by remote endpoint\n",
+ pCCB->MobileNumber);
+ pCCB->RemoteGSMFullRateCapability=TRUE;
+ jcRtpSetPayloadType(pCCB->RtpHandle,(BYTE)RTP_GSM_PAYLOAD_TYPE);
+ }
+ if (strcmp(channelName, "gsmEnhancedFullRate" ) == 0) {
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : GSM Enhanced FullRate Codec selected by remote endpoint\n",
+ pCCB->MobileNumber);
+ pCCB->RemoteGSMEnhancedFullRateCapability=TRUE;
+ jcRtpSetPayloadType(pCCB->RtpHandle,(BYTE)RTP_GSM_EFR_PAYLOAD_TYPE);
+ }
+
+ }
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+/*
+ * EventChannelVideoFastUpdatePicture
+ */
+int CALLCONV EventChannelVideoFastUpdatePicture(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan )
+{
+ DBG_FUNC("EventChannelVideoFastUpdatePicture",H323_LAYER);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+/*
+ * EventChannelVideoFastUpdateGOB
+ */
+int CALLCONV EventChannelVideoFastUpdateGOB(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN int firstGOB,
+ IN int numberOfGOBs )
+{
+ DBG_FUNC("EventChannelVideoFastUpdateGOB",H323_LAYER);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+/*
+ * EventChannelVideoFastUpdateMB
+ */
+int CALLCONV EventChannelVideoFastUpdateMB(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN int firstGOB,
+ IN int firstMB,
+ IN int numberOfMBs )
+{
+ DBG_FUNC("EventChannelVideoFastUpdateMB",H323_LAYER);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+/*
+ * EventChannelHandle
+ */
+int CALLCONV EventChannelHandle(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN int dataTypeHandle,
+ IN cmCapDataType dataType )
+{
+ DBG_FUNC("EventChannelHandle",H323_LAYER);
+ DBG_ENTER();
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)haChan;
+ BOOL origin;
+
+ cmChannelGetOrigin(hsChan,&origin);
+
+
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Invalid CCB returned!\n");
+ DBG_LEAVE();
+ return ERROR;
+ }
+ if( dataType != cmCapAudio )
+ {
+ DBG_WARNING("Dropping non-audio channel %x\n",hsChan);
+ cmChannelDrop( hsChan );
+ pCCB->NonAudioChannelHandle = hsChan;
+ DBG_LEAVE();
+ return OK;
+ }
+ else {
+ if (origin) {
+ pCCB->OutChannelHandle = hsChan;
+ }
+ else {
+ pCCB->InChannelHandle = hsChan;
+ }
+ }
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+/*
+ * EventChannelRequestCloseStatus
+ */
+int CALLCONV EventChannelRequestCloseStatus(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN cmRequestCloseStatus status )
+{
+ DBG_FUNC("EventChannelRequestCloseStatus",H323_LAYER);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return OK;
+}
+
+/*
+ *
+ */
+int CALLCONV EventChannelTSTO(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN INT8 isCommand,
+ IN INT8 tradeoffValue )
+{
+ DBG_FUNC("EventChannelTSTO",H323_LAYER);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+/*
+ * EventChannelMediaLoopStatus
+ */
+int CALLCONV EventChannelMediaLoopStatus(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN cmMediaLoopStatus status )
+{
+ DBG_FUNC("EventChannelMediaLoopStatus",H323_LAYER);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+/*
+ * EventChannelReplace
+ */
+int CALLCONV EventChannelReplace(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan,
+ IN HAPPCHAN haReplacedChannel,
+ IN HCHAN hsReplacedChannel )
+{
+ DBG_FUNC("EventChannelReplace",H323_LAYER);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+/*
+ * EventChannelFlowControlToZero
+ */
+int CALLCONV EventChannelFlowControlToZero(
+ IN HAPPCHAN haChan,
+ IN HCHAN hsChan )
+{
+ DBG_FUNC("EventChannelFlowControlToZero",H323_LAYER);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return OK;
+}
+
+
+/*
+ * EventHookSendTo
+ */
+BOOL CALLCONV
+EventHookSendTo(
+ IN HPROTCONN hConn,
+ IN int nodeId,
+ IN int nodeIdTo,
+ IN BOOL error
+ )
+{
+ DBG_FUNC("EventHookSendTo",H323_PROTOCOL_LAYER);
+ DBG_ENTER();
+ char messageName[256],protocolName[256];
+
+ memset(messageName,0,256);
+ memset(protocolName,0,256);
+
+ strcpy(messageName,cmGetProtocolMessageName(pVoipTaskConfig->StackHandle,nodeId));
+ strcpy(protocolName,cmProtocolGetProtocolName(cmProtocolGetProtocol(pVoipTaskConfig->StackHandle,nodeId)));
+
+ DBG_TRACE("SENTTO message --> %s on %s \n",
+ messageName,
+ protocolName
+ );
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+/*
+ * EventHookSend
+ */
+int CALLCONV EventHookSend(
+ IN HPROTCONN hConn,
+ IN int nodeId,
+ IN BOOL error )
+{
+ DBG_FUNC("EventHookSend",H323_PROTOCOL_LAYER);
+ DBG_ENTER();
+ char messageName[256],protocolName[256];
+
+ memset(messageName,0,256);
+ memset(protocolName,0,256);
+
+ strcpy(messageName,cmGetProtocolMessageName( pVoipTaskConfig->StackHandle, nodeId ));
+ strcpy(protocolName,cmProtocolGetProtocolName( cmProtocolGetProtocol( pVoipTaskConfig->StackHandle, nodeId ) ) );
+
+ DBG_TRACE( "Message sent -> %s on %s\n",
+ messageName,
+ protocolName);
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+
+/*
+ * EventHookRecv
+ */
+int CALLCONV EventHookRecv(
+ IN HPROTCONN hConn,
+ IN int nodeId,
+ IN BOOL error )
+{
+ DBG_FUNC("EventHookRecv",H323_PROTOCOL_LAYER);
+ DBG_ENTER();
+ char messageName[256],protocolName[256];
+ PCALL_CONTROL_BLOCK pCCB;
+
+ memset(messageName,0,256);
+ memset(protocolName,0,256);
+
+ strcpy(messageName,cmGetProtocolMessageName(pVoipTaskConfig->StackHandle,nodeId));
+ strcpy(protocolName,cmProtocolGetProtocolName(cmProtocolGetProtocol(pVoipTaskConfig->StackHandle,nodeId)));
+
+ DBG_TRACE("Message recv <- %s on %s\n", messageName,protocolName);
+
+ if (!strcmp("progress",messageName)){
+ pCCB = GetCCBByTpktHandle((HPROTCONN)hConn);
+ if (pCCB != NULL) {
+ if (!SendProgressMessageToCC(pCCB)) {
+ DBG_ERROR("Could not send Progress message to CC!!\n");
+ }
+ }
+ else {
+ DBG_ERROR("Progress message received but could not find call handle for TPK handle %#x\n",hConn);
+ }
+ }
+
+ DBG_LEAVE();
+ return OK;
+}
+
+
+
+BOOL CALLCONV EventHookRecvFrom(
+ IN HPROTCONN hConn,
+ IN int nodeId,
+ IN int nodeIdFrom,
+ IN BOOL multicast,
+ IN BOOL error
+ )
+{
+ DBG_FUNC("EventHookRecvFrom",H323_PROTOCOL_LAYER);
+ DBG_ENTER();
+
+ char messageName[256],protocolName[256];
+
+ memset(messageName,0,256);
+ memset(protocolName,0,256);
+
+ strcpy(messageName,cmGetProtocolMessageName(pVoipTaskConfig->StackHandle,nodeId));
+ strcpy(protocolName,cmProtocolGetProtocolName(cmProtocolGetProtocol(pVoipTaskConfig->StackHandle,nodeId)));
+
+ DBG_TRACE("Message recv <- %s on %s\n", messageName,protocolName);
+ DBG_LEAVE();
+ return 0;
+}
+
+
diff --git a/data/mnet/GP10/Host/voip/src/h323interface.cpp b/data/mnet/GP10/Host/voip/src/h323interface.cpp
new file mode 100644
index 0000000..2d0245e
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/src/h323interface.cpp
@@ -0,0 +1,915 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : H323Interface.cpp *
+ * *
+ * Description : API Interface for the H323 task *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+#include <stdlib.h>
+#include <string.h>
+#include <cm.h>
+#include <stkutils.h>
+
+#include <tickLib.h>
+#include <drv\timer\timerDev.h>
+#include <taskLib.h>
+#include <seli.h>
+
+#include "Os/JCTask.h"
+#include "Os/JCModule.h"
+#include "GP10OsTune.h"
+#include "logging\vcmodules.h"
+#include "logging\vclogging.h"
+#include "vipermem.h"
+
+#include "voip\voipapi.h"
+#include "h323task.h"
+#include "rtptask.h"
+#include "util.h"
+#include "eventhandlers.h"
+#include "smroutines.h"
+#include "h323interface.h"
+#include "mnetmoduleid.h"
+#include "Jcc/LudbApi.h"
+
+
+extern PH323TASK_CONFIG pVoipTaskConfig;
+extern CALL_CONTROL_BLOCK CCBArray[MAX_ACTIVE_CALLS];
+
+extern JCTask VOIPTaskObj;
+
+
+
+
+
+
+/*
+ * H323MessageHandler
+ */
+void H323MessageHandler(PVOIP_API_MESSAGE pMsg)
+{
+ DBG_FUNC("H323MessageHandler",H323_LAYER);
+ DBG_ENTER();
+ BOOL FreeMsg=TRUE;
+
+
+
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pMsg->Magic == VOIP_API_MAGIC_VALUE);
+#endif
+ if (pMsg->Magic != VOIP_API_MAGIC_VALUE)
+ {
+ DBG_ERROR("Invalid msg received!!\n");
+ DBG_LEAVE();
+ return;
+ }
+
+ switch( pMsg->MessageType )
+ {
+ case VOIP_API_SHUTDOWN_VOIP_TASK:
+ {
+ InterfaceShutdownH323Task();
+ }
+ break;
+
+ case VOIP_API_CALL_SETUP:
+ {
+ InterfaceCallSetup(pMsg);
+ }
+ break;
+
+ case VOIP_API_CALL_ANSWER:
+ {
+ InterfaceCallAnswer(pMsg);
+ }
+ break;
+
+ case VOIP_API_CALL_RELEASE:
+ {
+ InterfaceCallRelease(pMsg);
+ }
+ break;
+
+ case VOIP_API_CALL_DTMF:
+ {
+ InterfaceSendDtmf(pMsg);
+ }
+ break;
+
+ case VOIP_API_CALL_ALERTING:
+ {
+ InterfaceCallAlerting(pMsg);
+ }
+ break;
+ case VOIP_API_CALL_PROCEEDING:
+ {
+ InterfaceCallProceeding(pMsg);
+ }
+ break;
+ case VOIP_API_CALL_TRANSFER:
+ {
+ InterfaceCallTransfer(pMsg);
+ }
+ break;
+ default:
+ DBG_ERROR("Unknown message type %d on input pipe!\n", pMsg->MessageType );
+ break;
+ }
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+
+
+
+
+
+/*
+ * H323CallGetRtpHandle
+ */
+HJCRTPSESSION
+H323CallGetRTPHandle(PCALL_CONTROL_BLOCK pCCB)
+{
+ DBG_FUNC("H323CallGetRTPHandle",H323_LAYER);
+ DBG_ENTER();
+
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Invalid CCB value returned!\n");
+ DBG_LEAVE();
+ return NULL;
+ }
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->RtpHandle!=NULL);
+#endif
+ DBG_LEAVE();
+ return(pCCB->RtpHandle);
+
+}
+
+
+
+/*
+ * InterfaceCallSetup
+ */
+void
+InterfaceCallSetup(PVOIP_API_MESSAGE pMsg)
+{
+ DBG_FUNC("InterfaceCallSetup",H323_LAYER);
+ DBG_ENTER();
+ BOOL Status=FALSE;
+
+ /*
+ * FIXME: Lock for glare avoidance
+ */
+ PCALL_CONTROL_BLOCK pCCB;
+ pCCB = GetCCBFromPool();
+ if (pCCB == NULL) {
+ DBG_ERROR("Trying to place more calls than the no of CCBs available!!!\n");
+ pMsg->MessageType = VOIP_API_CALL_EVENT;
+ pMsg->CallEvent.CallEvent = VOIP_MOBILE_CALL_EVENT_DISCONNECTED;
+ pMsg->CallEvent.ReasonCode = Q850_CAUSE_PROTOCOL_ERROR_UNSPECIFIED;
+ pMsg->H323CRV = pCCB->H323CRV;
+ Status=VoipSendMessageToCc( pMsg);
+ }
+ else {
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB!=NULL);
+#endif
+ if (pCCB == NULL)
+ {
+ DBG_ERROR("No more call blocks available to handle call!\n");
+ }
+ pCCB->LudbId = pMsg->LudbId;
+ pCCB->LastTxnId = pMsg->TxnId;
+ RunStateMachine(pCCB,(PVOID)pMsg,H323_EVENT_RECV_CC_CALL_SETUP);
+ }
+ DBG_LEAVE();
+ return;
+}
+
+
+/*
+ * InterfaceCallAnswer
+ */
+void
+InterfaceCallAnswer(PVOIP_API_MESSAGE pMsg)
+{
+ DBG_FUNC("InterfaceCallAnswer",H323_LAYER);
+ DBG_ENTER();
+ BOOL Status=FALSE;
+
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(!((pMsg->VoipCallHandle > MAX_ACTIVE_CALLS) || (pMsg->VoipCallHandle < 0)));
+#endif
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)&CCBArray[pMsg->VoipCallHandle];
+
+ DBG_TRACE("CallAnswer message received for CCB %x\n",pCCB);
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Unknown CCB returned by CC!\n");
+ pMsg->MessageType = VOIP_API_CALL_EVENT;
+ pMsg->CallEvent.CallEvent = VOIP_MOBILE_CALL_EVENT_DISCONNECTED;
+ pMsg->CallEvent.ReasonCode = Q850_CAUSE_PROTOCOL_ERROR_UNSPECIFIED;
+ pMsg->H323CRV = pCCB->H323CRV;
+ Status=VoipSendMessageToCc( pMsg);
+ }
+ else
+ {
+ pCCB->LastTxnId = pMsg->TxnId;
+ RunStateMachine(pCCB,(PVOID)pMsg,H323_EVENT_RECV_CC_ANSWER_CALL);
+ }
+ DBG_LEAVE();
+ return;
+}
+
+
+
+
+/*
+ * InterfaceCallAlerting
+ */
+void
+InterfaceCallAlerting(PVOIP_API_MESSAGE pMsg)
+{
+ DBG_FUNC("InterfaceCallAlerting",H323_LAYER);
+ DBG_ENTER();
+ BOOL Status=FALSE;
+
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(!((pMsg->VoipCallHandle > MAX_ACTIVE_CALLS) || (pMsg->VoipCallHandle < 0)));
+#endif
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)&CCBArray[pMsg->VoipCallHandle];
+
+ DBG_TRACE("CallAlerting message received for CCB %x\n",pCCB);
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Unknown CCB returned by CC!\n");
+ pMsg->MessageType = VOIP_API_CALL_EVENT;
+ pMsg->CallEvent.CallEvent = VOIP_MOBILE_CALL_EVENT_DISCONNECTED;
+ pMsg->CallEvent.ReasonCode = Q850_CAUSE_PROTOCOL_ERROR_UNSPECIFIED;
+ pMsg->H323CRV = pCCB->H323CRV;
+ Status=VoipSendMessageToCc( pMsg);
+ }
+ else
+ {
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : --> Q.931 ALERTING being sent\n",pCCB->MobileNumber);
+ pCCB->LastTxnId = pMsg->TxnId;
+ cmCallAccept(pCCB->LanCallHandle);
+ }
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * InterfaceCallRelease
+ */
+void
+InterfaceCallRelease(PVOIP_API_MESSAGE pMsg)
+{
+ DBG_FUNC("InterfaceCallRelease",H323_LAYER);
+ DBG_ENTER();
+ PCALL_CONTROL_BLOCK pCCB ;
+ BOOL Status=FALSE;
+
+ if (pMsg->VoipCallHandle != VOIP_NULL_CALL_HANDLE) {
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(!((pMsg->VoipCallHandle > MAX_ACTIVE_CALLS) || (pMsg->VoipCallHandle < 0)));
+#endif
+ pCCB = (PCALL_CONTROL_BLOCK)&CCBArray[pMsg->VoipCallHandle];
+ DBG_TRACE("CallRelease message received for CCB %x\n",pCCB);
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Unknown CCB returned by CC!\n");
+ pMsg->MessageType = VOIP_API_CALL_EVENT;
+ pMsg->CallEvent.CallEvent = VOIP_MOBILE_CALL_EVENT_DISCONNECTED;
+ pMsg->CallEvent.ReasonCode = Q850_CAUSE_PROTOCOL_ERROR_UNSPECIFIED;
+ pMsg->H323CRV = pCCB->H323CRV;
+ Status=VoipSendMessageToCc( pMsg);
+ }
+ else
+ {
+ /*
+ * Check for glare avoidance
+ */
+ if (pCCB->H323CallState==H323_CALL_STATE_IDLE) {
+ DBG_ERROR("Received CC Call Release for an IDLE CCB!!\n");
+ //DumpStateTransitionHistory(pCCB);
+ }
+ else {
+ pCCB->LastTxnId = pMsg->TxnId;
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : --> Q.931 RELEASE being sent\n",pCCB->MobileNumber);
+ RunStateMachine(pCCB,(PVOID)pMsg,H323_EVENT_RECV_CC_CALL_RELEASE);
+ }
+ }
+ }
+ else {
+ int Count;
+
+ for(Count=0;Count<MAX_ACTIVE_CALLS;Count++)
+ {
+ pCCB = &CCBArray[Count];
+ if (pCCB->LastTxnId != pMsg->TxnId) continue;
+ else break;
+ }
+ if (pCCB->LastTxnId != pMsg->TxnId) {
+ DBG_ERROR("CC requested call release with NULL VOIP handle, cant find CCB !!!\n");
+ }
+ else {
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : --> Q.931 RELEASE being sent\n",pCCB->MobileNumber);
+ RunStateMachine(pCCB,(PVOID)pMsg,H323_EVENT_RECV_CC_CALL_RELEASE);
+ }
+
+ }
+ DBG_LEAVE();
+ return;
+}
+
+
+
+
+/*
+ * InterfaceSendDtmf
+ */
+void
+InterfaceSendDtmf(PVOIP_API_MESSAGE pMsg)
+{
+ DBG_FUNC("InterfaceSendDtmf",H323_LAYER);
+ DBG_ENTER();
+ char userInput[10];
+ PCALL_CONTROL_BLOCK pCCB;
+
+ memset(userInput,0,10);
+
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(!((pMsg->VoipCallHandle > MAX_ACTIVE_CALLS) || (pMsg->VoipCallHandle < 0)));
+#endif
+ pCCB = (PCALL_CONTROL_BLOCK)&CCBArray[pMsg->VoipCallHandle];
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ switch(pMsg->CallDtmf.Digit)
+ {
+ case DTMF_DIGIT_0:strcpy(userInput,"0");break;
+ case DTMF_DIGIT_1:strcpy(userInput,"1");break;
+ case DTMF_DIGIT_2:strcpy(userInput,"2");break;
+ case DTMF_DIGIT_3:strcpy(userInput,"3");break;
+ case DTMF_DIGIT_4:strcpy(userInput,"4");break;
+ case DTMF_DIGIT_5:strcpy(userInput,"5");break;
+ case DTMF_DIGIT_6:strcpy(userInput,"6");break;
+ case DTMF_DIGIT_7:strcpy(userInput,"7");break;
+ case DTMF_DIGIT_8:strcpy(userInput,"8");break;
+ case DTMF_DIGIT_9:strcpy(userInput,"9");break;
+ case DTMF_DIGIT_HASH:strcpy(userInput,"#");break;
+ case DTMF_DIGIT_STAR:strcpy(userInput,"*");break;
+ default:DBG_ERROR("Unknown DTMF digit %d specified\n",pMsg->CallDtmf.Digit);break;
+ }
+ pCCB->LastTxnId = pMsg->TxnId;
+
+ DBG_TRACE("Sending DTMF digit %s\n",userInput);
+ cmUserInputData userData={userInput,strlen(userInput)};
+ cmCallSendUserInput(pCCB->LanCallHandle,cmUserInputBuildAlphanumeric(pVoipTaskConfig->StackHandle, &userData));
+
+ DBG_LEAVE();
+}
+
+
+
+/*
+ * InterfaceShutdownH323Task
+ */
+void InterfaceShutdownH323Task()
+{
+ DBG_FUNC("InterfaceShutdownH323Task",H323_LAYER);
+ DBG_ENTER();
+
+ DBG_TRACE("Shutting down H323 task!\n");
+
+ SignalRtpTaskShutdown();
+
+ cmUnregister(pVoipTaskConfig->StackHandle);
+ cmEnd(pVoipTaskConfig->StackHandle);
+
+ RadPipeClose(pVoipTaskConfig->pH323TaskInputPipe);
+
+ DBG_LEAVE();
+ exit(1);
+}
+
+
+
+/*
+ * InterfaceCallProceeding
+ */
+void
+InterfaceCallProceeding(PVOIP_API_MESSAGE pMsg)
+{
+ DBG_FUNC("InterfaceCallProceeding",H323_LAYER);
+ DBG_ENTER();
+ BOOL Status=FALSE;
+
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(!((pMsg->VoipCallHandle > MAX_ACTIVE_CALLS) || (pMsg->VoipCallHandle < 0)));
+#endif
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)&CCBArray[pMsg->VoipCallHandle];
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Unknown CCB returned by CC!\n");
+ }
+ else
+ {
+ pCCB->LastTxnId = pMsg->TxnId;
+ int count;
+ for(count=0;count<3;count++) {
+ if (pMsg->CallProceeding.bearerCap.speechVersionInd[count].fieldPresent) {
+ if (pMsg->CallProceeding.bearerCap.speechVersionInd[count].version == CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1) {
+ pCCB->GSMFullRateCapability=TRUE;
+ }
+ if (pMsg->CallProceeding.bearerCap.speechVersionInd[count].version == CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_2) {
+ pCCB->GSMEnhancedFullRateCapability=TRUE;
+ }
+ }
+ }
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : --> Q.931 PROCEEDING being sent\n",pCCB->MobileNumber);
+ if (cmCallSendCallProceeding(pCCB->LanCallHandle) != TRUE) {
+ DBG_ERROR("Error sending call proceeding on mobile %s\n",pCCB->MobileNumber);
+ }
+ }
+
+ if (pCCB->FastStart) {
+ cmTransportAddress rtp;
+ cmTransportAddress rtcp;
+
+ rtp.port = jcRtpGetPort(pCCB->RtpHandle)+1;
+ rtp.ip = 0;
+ rtcp.port = jcRtpGetPort(pCCB->RtpHandle);
+ rtcp.ip = 0;
+
+
+ if (pCCB->RemoteGSMEnhancedFullRateCapability && pCCB->GSMEnhancedFullRateCapability) {
+ pCCB->CodecUsed = VOIP_CALL_CODEC_GSM_EFR;
+ cmFastStartChannelsAckIndex(pCCB->LanCallHandle,pCCB->remoteGsmEfrTxIndex,&rtp,&rtcp);
+ cmFastStartChannelsAckIndex(pCCB->LanCallHandle,pCCB->remoteGsmEfrRxIndex,&rtp,&rtcp);
+ cmFastStartChannelsReady(pCCB->LanCallHandle);
+ jcRtpSetPayloadType(pCCB->RtpHandle,(BYTE)RTP_GSM_EFR_PAYLOAD_TYPE);
+ SendCodecInfo(pCCB);
+ }
+ else if (pCCB->RemoteGSMFullRateCapability && pCCB->GSMFullRateCapability) {
+ pCCB->CodecUsed = VOIP_CALL_CODEC_GSM_FR;
+ cmFastStartChannelsAckIndex(pCCB->LanCallHandle,pCCB->remoteGsmFrTxIndex,&rtp,&rtcp);
+ cmFastStartChannelsAckIndex(pCCB->LanCallHandle,pCCB->remoteGsmFrRxIndex,&rtp,&rtcp);
+ cmFastStartChannelsReady(pCCB->LanCallHandle);
+ jcRtpSetPayloadType(pCCB->RtpHandle,(BYTE)RTP_GSM_PAYLOAD_TYPE);
+ SendCodecInfo(pCCB);
+ }
+ else {
+ DBG_ERROR("Capabilities mismatch!!\n");
+ RunStateMachine(pCCB,(PVOID)pMsg,H323_EVENT_RECV_CC_CALL_RELEASE);
+ }
+ }
+ else {
+ if (pCCB->GSMEnhancedFullRateCapability) {
+ if (pVoipTaskConfig->DefaultCodecGsmFullRate) {
+ DBG_TRACE("Remote is Non-FastStart endpoint, defaulting to FullRate codec\n");
+ pCCB->CodecUsed = VOIP_CALL_CODEC_GSM_FR;
+ jcRtpSetPayloadType(pCCB->RtpHandle,(BYTE)RTP_GSM_PAYLOAD_TYPE);
+ }
+ else {
+ DBG_TRACE("Remote is Non-FastStart endpoint, defaulting to EnhancedFullRate codec\n");
+ pCCB->CodecUsed = VOIP_CALL_CODEC_GSM_EFR;
+ jcRtpSetPayloadType(pCCB->RtpHandle,(BYTE)RTP_GSM_EFR_PAYLOAD_TYPE);
+ }
+ SendCodecInfo(pCCB);
+ }
+ else if (pCCB->GSMFullRateCapability) {
+ pCCB->CodecUsed = VOIP_CALL_CODEC_GSM_FR;
+ jcRtpSetPayloadType(pCCB->RtpHandle,(BYTE)RTP_GSM_PAYLOAD_TYPE);
+ SendCodecInfo(pCCB);
+ }
+ else {
+ DBG_ERROR("Neither FullRate NOR EnhancedFullRate codec supported by mobile %s\n",pCCB->MobileNumber);
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(0);
+#endif
+ }
+ }
+
+
+ DBG_LEAVE();
+}
+
+
+static int dropTrdCallTimer=5;
+
+/*
+ * InterfaceCallTransfer
+ */
+void
+InterfaceCallTransfer(PVOIP_API_MESSAGE pMsg)
+{
+ DBG_FUNC("InterfaceCallTransfer",H323_LAYER);
+ DBG_ENTER();
+ BOOL Status=FALSE;
+ char NumberBuffer[256],DestinationNumber[256];
+
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(!((pMsg->VoipCallHandle > MAX_ACTIVE_CALLS) || (pMsg->VoipCallHandle < 0)));
+#endif
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)&CCBArray[pMsg->VoipCallHandle];
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+#endif
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE)
+ {
+ DBG_ERROR("Unknown CCB returned by CC!\n");
+ }
+ else
+ {
+ memset(NumberBuffer,0,256);
+ memset(DestinationNumber,0,256);
+ jcBCDToString(NumberBuffer, pMsg->CallTransfer.CalledPartyNumber.digits,
+ pMsg->CallSetup.CalledPartyNumber.numDigits );
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : Transferring active call to %s\n",pCCB->MobileNumber,NumberBuffer);
+ DBG_TRACE("Mobile %s : Transferring active call to %s\n",pCCB->MobileNumber,NumberBuffer);
+
+ sprintf(DestinationNumber,"TEL:%s,TA:%s:1720",NumberBuffer,pVoipTaskConfig->szGatekeeperAddress);
+ /*sprintf(DestinationNumber,"TEL:%s,TA:127.0.0.1:1720",NumberBuffer);*/
+ DBG_TRACE("Transfer destination address given as %s\n",DestinationNumber);
+ sseCallTransfer(pCCB->SuppCallHandle,NULL,DestinationNumber);
+
+ }
+
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+
+/*
+ * SendMessage
+ */
+bool SendMessage(PRADPIPE pInputPipe,PVOIP_API_MESSAGE pMsg)
+{
+ return (RadPipeWrite( pInputPipe, pMsg));
+}
+
+
+/*
+ * SendMessageToRtp
+ */
+bool SendMessageToRtp(PRADPIPE pInputPipe,RtpInputMessage_t *pMsg)
+{
+ return (RadPipeWrite(pInputPipe,pMsg));
+}
+
+
+
+
+
+
+
+
+/*
+ * VoipShowAllCalls
+ */
+void
+VoipShowAllCalls()
+{
+ DBG_FUNC("VoipShowAllCalls",H323_LAYER);
+ DBG_ENTER();
+ PCALL_CONTROL_BLOCK pCCB;
+ int Count,TotalCalls=0;
+ BOOL Show=FALSE;
+
+ for(Count=0;Count<MAX_ACTIVE_CALLS;Count++)
+ {
+ pCCB = &CCBArray[Count];
+ if (pCCB->H323CallState != H323_CALL_STATE_IDLE) {
+ TotalCalls++;
+ DisplayCallInfo(pCCB,Count,TotalCalls);
+ Show=TRUE;
+ }
+ }
+ if (Show==TRUE) {
+ printf("--------------------------------------------------------------------------\n");
+ printf("Total : %d : All other VOIP Call Control Blocks IDLE/Unused\n",TotalCalls);
+ printf("--------------------------------------------------------------------------\n");
+ }
+ else {
+ printf("No Calls active\n");
+ }
+ DBG_LEAVE();
+ return;
+}
+
+
+/*
+ * VoipShowCall
+ */
+void
+VoipShowCall(PCALL_CONTROL_BLOCK pCCB)
+{
+ DBG_FUNC("VoipShowCall",H323_LAYER);
+ DBG_ENTER();
+ char DisplayBuffer[8000];
+ memset(DisplayBuffer,0,8000);
+
+ if (pCCB->Magic != H323TASK_MAGIC_VALUE) {
+ printf("Invalid CCB specified\n");
+ DBG_ERROR("Invalid CCB specified\n");
+ DBG_LEAVE();
+ return;
+ }
+ if (pCCB->H323CallState != H323_CALL_STATE_IDLE) {
+ PCALL_CONTROL_BLOCK NewCCB;
+ int Count;
+ for(Count=0;Count<MAX_ACTIVE_CALLS;Count++)
+ {
+ NewCCB = &CCBArray[Count];
+ if (NewCCB==pCCB) break;
+ }
+ if (NewCCB==pCCB) {
+ DisplayCallInfo(pCCB,Count,0);
+ printf("--------------------------------------------------------------------------\n");
+ }
+ }
+ else {
+ printf("CCB not in use");
+ }
+ DBG_LEAVE();
+}
+
+
+
+
+
+
+/*
+ * DisplayCallInfo
+ */
+void
+DisplayCallInfo(PCALL_CONTROL_BLOCK pCCB,int index, int displayIndex)
+{
+
+ char stateBuffer[128];
+ int stripLen;
+
+ printf("------------------------- Call Block Index %02d---------------------------\n",pCCB->Index);
+ printf(" Call Control Block : %#x\n",pCCB);
+ printf(" Call Direction :");
+ if (pCCB->CallDirection == H323_CALL_TERMINATED) {
+ printf(" Locally Terminated\n");
+ }
+ else {
+ printf(" Locally Originated\n");
+ }
+
+ memset(stateBuffer,0,128);
+ strncpy(stateBuffer,GetH323CallStateName(pCCB->H323CallState),128);
+ stripLen = strlen("H323_CALL_STATE_");
+ memset(stateBuffer,0,stripLen);
+ printf(" Call State : %s\n",&stateBuffer[stripLen]);
+ printf(" Local MS-ISDN Number : %s\n",pCCB->MobileNumber);
+ if (pCCB->IsSuppCall) {
+ printf(" Remote Party Number : %s; transferred from %s\n",pCCB->RemotePartyId,
+ pCCB->TransferringPartyId);
+ }
+ else {
+ printf(" Remote Party Number : %s\n",pCCB->RemotePartyId);
+ }
+ printf(" Negotiated Codec :");
+ if (pCCB->CodecUsed == VOIP_CALL_CODEC_GSM_FR) {
+ printf(" GSM Full Rate\n");
+ }
+ else {
+ printf(" GSM Enhanced Full Rate\n");
+ }
+
+ printf(" H.323 Calling Method :");
+ if (pCCB->FastStart) {
+ printf(" FastSetup\n");
+ }
+ else {
+ printf(" Slow Start\n");
+ }
+
+ printf(" H.323 Call Reference Val : %#x\n",pCCB->H323CRV);
+ printf(" Associated RTP Handle : %#x\n",pCCB->RtpHandle);
+ printf(" RTP remote IP-Port : %s\n",
+ RtpGetRemoteTsapString(pCCB->RtpHandle));
+ printf(" RTP local IP-Port : %s\n",
+ RtpGetLocalTsapString(pCCB->RtpHandle));
+ printf(" RTP octets TX : %8ld\n",
+ RtpGetSessionBytesSent(pCCB->RtpHandle));
+ printf(" RTP octets RX : %8ld\n",
+ RtpGetSessionBytesRecvd(pCCB->RtpHandle));
+
+
+}
+
+
+
+
+
+
+
+
+
+/*
+ * VoipShowCallCounters
+ */
+void
+VoipShowCallCounters()
+{
+ double IncomingPercentage,OutgoingPercentage;
+
+
+ IncomingPercentage = (double)pVoipTaskConfig->CallStats.CallCompletionStats.IncomingCallsConnected/pVoipTaskConfig->CallStats.CallCompletionStats.IncomingCallAttempts;
+ OutgoingPercentage = (double)pVoipTaskConfig->CallStats.CallCompletionStats.OutgoingCallsConnected/pVoipTaskConfig->CallStats.CallCompletionStats.OutgoingCallAttempts;
+
+ IncomingPercentage = IncomingPercentage*100;
+ OutgoingPercentage = OutgoingPercentage*100;
+
+ printf("\n*************************** VOIP CALL COUNTERS *********************\n");
+ printf("Incoming call attempts : %ld ; Incoming calls connected %ld; Success rate %00.4f\n",
+ pVoipTaskConfig->CallStats.CallCompletionStats.IncomingCallAttempts,pVoipTaskConfig->CallStats.CallCompletionStats.IncomingCallsConnected,IncomingPercentage);
+ printf("Outgoing call attempts : %ld ; Outgoing calls connected %ld; Success rate %00.4f\n",
+ pVoipTaskConfig->CallStats.CallCompletionStats.OutgoingCallAttempts,pVoipTaskConfig->CallStats.CallCompletionStats.OutgoingCallsConnected,OutgoingPercentage);
+ printf("********************************************************************\n");
+}
+
+
+/*
+ * VoipClearCallStats
+ */
+void
+VoipClearCallStats()
+{
+ memset(&pVoipTaskConfig->CallStats,0,sizeof(pVoipTaskConfig->CallStats));
+
+ printf("\nVoip Call Statistics cleared\n");
+
+}
+
+
+/*
+ * VoipShowCallStats
+ */
+void
+VoipShowCallStats()
+{
+
+ double IncomingPercentage,OutgoingPercentage;
+ int count;
+ unsigned long remoteDiscs;
+
+ if (pVoipTaskConfig->CallStats.CallCompletionStats.IncomingCallAttempts != 0) {
+ IncomingPercentage = (double)pVoipTaskConfig->CallStats.CallCompletionStats.IncomingCallsConnected/pVoipTaskConfig->CallStats.CallCompletionStats.IncomingCallAttempts;
+ IncomingPercentage = IncomingPercentage*100;
+ }
+ else {
+ IncomingPercentage = 0;
+ }
+ if (pVoipTaskConfig->CallStats.CallCompletionStats.OutgoingCallAttempts != 0) {
+ OutgoingPercentage = (double)pVoipTaskConfig->CallStats.CallCompletionStats.OutgoingCallsConnected/pVoipTaskConfig->CallStats.CallCompletionStats.OutgoingCallAttempts;
+ OutgoingPercentage = OutgoingPercentage*100;
+ }
+ else {
+ OutgoingPercentage = 0;
+ }
+
+ printf("\n*************************** VOIP CALL STATS ************************\n");
+ printf("--------------------------- VOIP CALL COUNTERS ---------------------\n");
+ printf("Incoming call attempts : %ld ; Incoming calls connected %ld; Success rate %00.4f\n",
+ pVoipTaskConfig->CallStats.CallCompletionStats.IncomingCallAttempts,pVoipTaskConfig->CallStats.CallCompletionStats.IncomingCallsConnected,IncomingPercentage);
+ printf("Outgoing call attempts : %ld ; Outgoing calls connected %ld; Success rate %00.4f\n",
+ pVoipTaskConfig->CallStats.CallCompletionStats.OutgoingCallAttempts,pVoipTaskConfig->CallStats.CallCompletionStats.OutgoingCallsConnected,OutgoingPercentage);
+
+ printf("------------------------ LOCALLY INITIATED DISCONNECTS -----------------------\n");
+ for(count=0;count<Q850_MAX_CAUSES;count++) {
+ if (pVoipTaskConfig->CallStats.CallDisconnectStats.MobileDisconnects[count] > 0) {
+ printf("%d : %s\n",pVoipTaskConfig->CallStats.CallDisconnectStats.MobileDisconnects[count],
+ GetQ850CauseCodeName(count));
+ }
+ }
+
+
+ printf("------------------------- DISCONNECTS FROM REMOTE ENDPOINT -------------------\n");
+ /*
+ * Keep in mind that every disconnect, whether locally initiated or
+ * from the remote side triggers the VOIP call state disconnected state change,
+ * where we increment the counter; so for an accurate picture of remote discs
+ * we need to subtract local from total
+ */
+ for(count=0;count<Q850_MAX_CAUSES;count++) {
+ remoteDiscs = pVoipTaskConfig->CallStats.CallDisconnectStats.VoipDisconnects[count] -
+ pVoipTaskConfig->CallStats.CallDisconnectStats.MobileDisconnects[count];
+
+ if (remoteDiscs > 0) {
+ printf("%d : %s\n",remoteDiscs,
+ GetQ850CauseCodeName(count));
+ }
+ }
+
+ printf("********************************************************************\n");
+
+
+
+}
+
+
+
+#ifndef LOOPBACK_MODE
+
+/*
+ * SysCommand_Voip
+ */
+int SysCommand_Voip(T_SYS_CMD action)
+{
+ DBG_FUNC("SysCommand_VOIP",H323_LAYER);
+ DBG_ENTER();
+ switch(action){
+ case SYS_SHUTDOWN:
+ {
+ STATUS Status = STATUS_FAILURE;
+ printf("VOIP TASK shutdown notification received\n");
+ DBG_WARNING("VOIP TASK shutdown notification received\n");
+ PAPI_MESSAGE ApiMsg;
+ ApiMsg = GetFreeMsgFromPool();
+ if (ApiMsg == NULL) {
+ DBG_ERROR("All API messages used up from pool!\n");
+ DBG_LEAVE();
+ return FALSE;
+ }
+ PVOIP_API_MESSAGE pMsg = (PVOIP_API_MESSAGE)&ApiMsg->VoipMsg;
+ pMsg->Magic = VOIP_API_MAGIC_VALUE;
+ pMsg->MessageType = VOIP_API_SHUTDOWN_VOIP_TASK;
+ Status = VoipApiMessageHandler(pMsg);
+
+ PutMsgIntoPool(ApiMsg);
+ }
+ break;
+ case SYS_START:
+ {
+ printf("Initializing JetRtp<-->MotFec Interface first\n");
+ InitializeJetRtp();
+
+ printf("Spawning VOIP Task now\n");
+
+
+ if (VOIPTaskObj.JCTaskSpawn( H323_TASK_PRIORITY, H323_TASK_OPTION, H323_TASK_STACK_SIZE,
+ (FUNCPTR) InitializeH323Task, 0,0,0,0, 0, 0, 0, 0, 0, 0,MODULE_H323,JC_CRITICAL_TASK) == ERROR){
+ printf("Unable to spawn VOIP task!!\n");
+ }
+ else {
+ printf("Spawned VOIPTask successfully!\n");
+ }
+
+
+
+ break;
+ }
+ }
+ DBG_LEAVE();
+ return 0;
+
+}
+#endif /* #ifndef LOOPBACK_MODE */
diff --git a/data/mnet/GP10/Host/voip/src/h323sm.cpp b/data/mnet/GP10/Host/voip/src/h323sm.cpp
new file mode 100644
index 0000000..098b153
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/src/h323sm.cpp
@@ -0,0 +1,765 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : H323SM.cpp *
+ * *
+ * Description : State Machine table for the H.323 task *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+
+
+#include <stdlib.h>
+#include <string.h>
+#include <cm.h>
+#include <stkutils.h>
+#include <tickLib.h>
+#include <drv\timer\timerDev.h>
+#include <taskLib.h>
+
+
+#include "h323task.h"
+#include "ccb.h"
+#include "util.h"
+#include "eventhandlers.h"
+#include "rtptask.h"
+#include "smroutines.h"
+
+
+#define INVALID_EVENT \
+{ \
+ smFatalStateMachineViolation, \
+ H323_CALL_STATE_IDLE \
+}
+
+#define DISCARD_EVENT \
+{ \
+ smNonFatalStateMachineViolation, \
+ H323_CALL_STATE_SAME_STATE \
+}
+
+
+
+
+/*
+ *
+ * The state machine table: This can be modified as and when required:DSN
+ */
+H323_CALL_STATE_INFO
+H323_CALL_STATE_TABLE
+[H323_MAX_CALL_STATES][H323_MAX_CALL_EVENTS] = {
+
+ /* BEGIN: State = H323_CALL_STATE_IDLE */
+ {
+ {
+ smCallOffering, /* H323_EVENT_RECV_CALL_OFFERING */
+ H323_CALL_STATE_WAIT_FOR_CC_ANSWER
+ },
+
+ DISCARD_EVENT, /* H323_EVENT_RECV_CC_CALL_RELEASE */
+ DISCARD_EVENT, /* H323_EVENT_RECV_CC_ANSWER_CALL */
+ {
+ smCallSetup, /* H323_EVENT_RECV_CC_CALL_SETUP */
+ H323_CALL_STATE_WAIT_FOR_PROCEEDING
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_PROCEEDING */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_RINGBACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_CONNECTED */
+ {
+ smCallDisconnected, /* H323_EVENT_RECV_CALL_DISCONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_DEST_REJECTED */
+ {
+ smCallIdle, /* H323_EVENT_RECV_CALL_IDLE */
+ H323_CALL_STATE_SAME_STATE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_REMOTE_CAPABILITIES */
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_TRANSPORT_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_ACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_NAK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CHANNEL_OFFERING */
+ INVALID_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_CONNECTED */
+ DISCARD_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_CONNECTED */
+ DISCARD_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_DISCONNECTED */
+ DISCARD_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_DISCONNECTED */
+ },/* END: State = H323_CALL_STATE_IDLE */
+
+ /* BEGIN: State = H323_CALL_STATE_WAIT_FOR_CC_ANSWER */
+ {
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_OFFERING */
+ {
+ smDropCall, /* H323_EVENT_RECV_CC_CALL_RELEASE */
+ H323_CALL_STATE_IDLE
+ },
+ {
+ smAnswerCall, /* H323_EVENT_RECV_CC_ANSWER_CALL */
+ H323_CALL_STATE_WAIT_FOR_CONNECTION
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_CALL_SETUP */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_PROCEEDING */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_RINGBACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_CONNECTED */
+ {
+ smCallDisconnected, /* H323_EVENT_RECV_CALL_DISCONNECTED */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_DEST_REJECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_IDLE */
+ INVALID_EVENT, /* H323_EVENT_RECV_REMOTE_CAPABILITIES */
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_TRANSPORT_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_ACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_NAK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CHANNEL_OFFERING */
+ INVALID_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_DISCONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_DISCONNECTED */
+ },/* END: State = H323_CALL_STATE_WAIT_FOR_CC_ANSWER */
+
+ /* BEGIN: State = H323_CALL_STATE_WAIT_FOR_PROCEEDING */
+ {
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_OFFERING */
+ {
+ smDropCall, /* H323_EVENT_RECV_CC_CALL_RELEASE */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_ANSWER_CALL */
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_CALL_SETUP */
+ {
+ smCallProceeding, /* H323_EVENT_RECV_CALL_PROCEEDING */
+ H323_CALL_STATE_WAIT_FOR_CONNECTION
+ },
+ {
+ smCallRingBack, /* H323_EVENT_RECV_CALL_RINGBACK */
+ H323_CALL_STATE_SAME_STATE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_CONNECTED */
+ {
+ smCallDisconnected, /* H323_EVENT_RECV_CALL_DISCONNECTED */
+ H323_CALL_STATE_IDLE
+ },
+ {
+ smCallDestinationRejected, /* H323_EVENT_RECV_CALL_DEST_REJECTED */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_IDLE */
+ INVALID_EVENT, /* H323_EVENT_RECV_REMOTE_CAPABILITIES */
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_TRANSPORT_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_ACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_NAK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CHANNEL_OFFERING */
+ INVALID_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_DISCONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_DISCONNECTED */
+ },/* END: State = H323_CALL_STATE_WAIT_FOR_PROCEEDING */
+
+ /* BEGIN: State = H323_CALL_STATE_WAIT_FOR_CONNECTION */
+ {
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_OFFERING */
+ {
+ smDropCall, /* H323_EVENT_RECV_CC_CALL_RELEASE */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_ANSWER_CALL */
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_CALL_SETUP */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_PROCEEDING */
+ {
+ smCallRingBack, /* H323_EVENT_RECV_CALL_RINGBACK */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smCallConnected, /* H323_EVENT_RECV_CALL_CONNECTED */
+ H323_CALL_STATE_CALL_CONNECTED
+ },
+ {
+ smCallDisconnected, /* H323_EVENT_RECV_CALL_DISCONNECTED */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_DEST_REJECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_IDLE */
+ INVALID_EVENT, /* H323_EVENT_RECV_REMOTE_CAPABILITIES */
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_TRANSPORT_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_ACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_NAK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CHANNEL_OFFERING */
+ INVALID_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_DISCONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_DISCONNECTED */
+ },/* END: State = H323_CALL_STATE_WAIT_FOR_CONNECTION */
+
+ /* BEGIN: State = H323_CALL_STATE_CALL_CONNECTED */
+ {
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_OFFERING */
+ {
+ smDropCall, /* H323_EVENT_RECV_CC_CALL_RELEASE */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_ANSWER_CALL */
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_CALL_SETUP */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_PROCEEDING */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_RINGBACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_CONNECTED */
+ {
+ smCallDisconnected, /* H323_EVENT_RECV_CALL_DISCONNECTED */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_DEST_REJECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_IDLE */
+ INVALID_EVENT, /* H323_EVENT_RECV_REMOTE_CAPABILITIES */
+ {
+ smH245TransportConnected, /* H323_EVENT_RECV_H245_TRANSPORT_CONNECTED */
+ H323_CALL_STATE_WAIT_FOR_CAP_EXCHANGE_ACK
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_ACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_NAK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CHANNEL_OFFERING */
+ INVALID_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_DISCONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_DISCONNECTED */
+ },/* END: State = H323_CALL_STATE_CALL_CONNECTED */
+
+ /* BEGIN: State = H323_CALL_STATE_WAIT_FOR_CAP_EXCHANGE_ACK */
+ {
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_OFFERING */
+ {
+ smDropCall, /* H323_EVENT_RECV_CC_CALL_RELEASE */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_ANSWER_CALL */
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_CALL_SETUP */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_PROCEEDING */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_RINGBACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_CONNECTED */
+ {
+ smCallDisconnected, /* H323_EVENT_RECV_CALL_DISCONNECTED */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_DEST_REJECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_IDLE */
+ {
+ smRecvRemoteCapabilities, /* H323_EVENT_RECV_REMOTE_CAPABILITIES */
+ H323_CALL_STATE_SAME_STATE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_TRANSPORT_CONNECTED */
+ {
+ smH245Connected, /* H323_EVENT_RECV_H245_CONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smRecvCapabilitiesAck, /* H323_EVENT_RECV_CAPABILITIES_ACK */
+ H323_CALL_STATE_WAIT_FOR_CHANNELS_CONNECTION
+ },
+ {
+ smRecvCapabilitiesNak, /* H323_EVENT_RECV_CAPABILITIES_NAK */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CHANNEL_OFFERING */
+ INVALID_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_DISCONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_DISCONNECTED */
+ },/* END: State = H323_CALL_STATE_WAIT_FOR_CAP_EXCHANGE_ACK */
+
+ /* BEGIN: State = H323_CALL_STATE_WAIT_FOR_CHANNELS_CONNECTION */
+ {
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_OFFERING */
+ {
+ smDropCall, /* H323_EVENT_RECV_CC_CALL_RELEASE */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_ANSWER_CALL */
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_CALL_SETUP */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_PROCEEDING */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_RINGBACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_CONNECTED */
+ {
+ smCallDisconnected, /* H323_EVENT_RECV_CALL_DISCONNECTED */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_DEST_REJECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_IDLE */
+ INVALID_EVENT, /* H323_EVENT_RECV_REMOTE_CAPABILITIES */
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_TRANSPORT_CONNECTED */
+ {
+ smH245Connected, /* H323_EVENT_RECV_H245_CONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_ACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_NAK */
+ {
+ smChannelOffering, /* H323_EVENT_RECV_CHANNEL_OFFERING */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smInChannelConnected, /* H323_EVENT_RECV_IN_CHANNEL_CONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smOutChannelConnected, /* H323_EVENT_RECV_OUT_CHANNEL_CONNECTED */
+ H323_CALL_STATE_CHANNELS_CONNECTED
+ },
+ {
+ smInChannelDisconnected, /* H323_EVENT_RECV_IN_CHANNEL_DISCONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smOutChannelDisconnected, /* H323_EVENT_RECV_OUT_CHANNEL_DISCONNECTED */
+ H323_CALL_STATE_IDLE
+ },
+ },/* END: State = H323_CALL_STATE_WAIT_FOR_CHANNELS_CONNECTION */
+
+ /* BEGIN: State = H323_CALL_STATE_CHANNELS_CONNECTED */
+ {
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_OFFERING */
+ {
+ smDropCall, /* H323_EVENT_RECV_CC_CALL_RELEASE */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_ANSWER_CALL */
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_CALL_SETUP */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_PROCEEDING */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_RINGBACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_CONNECTED */
+ {
+ smCallDisconnected, /* H323_EVENT_RECV_CALL_DISCONNECTED */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_DEST_REJECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_IDLE */
+ INVALID_EVENT, /* H323_EVENT_RECV_REMOTE_CAPABILITIES */
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_TRANSPORT_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_ACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_NAK */
+ {
+ smChannelOffering, /* H323_EVENT_RECV_CHANNEL_OFFERING */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smInChannelConnected, /* H323_EVENT_RECV_IN_CHANNEL_CONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smOutChannelConnected, /* H323_EVENT_RECV_OUT_CHANNEL_CONNECTED */
+ H323_CALL_STATE_CHANNELS_CONNECTED
+ },
+ {
+ smInChannelDisconnected, /* H323_EVENT_RECV_IN_CHANNEL_DISCONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smOutChannelDisconnected, /* H323_EVENT_RECV_OUT_CHANNEL_DISCONNECTED */
+ H323_CALL_STATE_IDLE
+ }
+ }/* END: State = H323_CALL_STATE_CHANNELS_CONNECTED */
+
+};
+
+
+
+
+
+
+
+
+/*
+ *
+ * The Fast Setup state machine table: This can be modified as and when required:DSN
+ */
+H323_CALL_STATE_INFO
+H323_FASTCALL_STATE_TABLE
+[H323_MAX_CALL_STATES][H323_MAX_CALL_EVENTS] = {
+
+ /* BEGIN: State = H323_CALL_STATE_IDLE */
+ {
+ {
+ smCallOffering, /* H323_EVENT_RECV_CALL_OFFERING */
+ H323_CALL_STATE_WAIT_FOR_CC_ANSWER
+ },
+
+ DISCARD_EVENT, /* H323_EVENT_RECV_CC_CALL_RELEASE */
+ DISCARD_EVENT, /* H323_EVENT_RECV_CC_ANSWER_CALL */
+ {
+ smCallSetup, /* H323_EVENT_RECV_CC_CALL_SETUP */
+ H323_CALL_STATE_WAIT_FOR_PROCEEDING
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_PROCEEDING */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_RINGBACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_CONNECTED */
+ {
+ smCallDisconnected, /* H323_EVENT_RECV_CALL_DISCONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_DEST_REJECTED */
+ {
+ smCallIdle, /* H323_EVENT_RECV_CALL_IDLE */
+ H323_CALL_STATE_SAME_STATE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_REMOTE_CAPABILITIES */
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_TRANSPORT_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_ACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_NAK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CHANNEL_OFFERING */
+ INVALID_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_CONNECTED */
+ DISCARD_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_CONNECTED */
+ DISCARD_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_DISCONNECTED */
+ DISCARD_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_DISCONNECTED */
+ },/* END: State = H323_CALL_STATE_IDLE */
+
+ /* BEGIN: State = H323_CALL_STATE_WAIT_FOR_CC_ANSWER */
+ {
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_OFFERING */
+ {
+ smDropCall, /* H323_EVENT_RECV_CC_CALL_RELEASE */
+ H323_CALL_STATE_IDLE
+ },
+ {
+ smAnswerCall, /* H323_EVENT_RECV_CC_ANSWER_CALL */
+ H323_CALL_STATE_WAIT_FOR_CONNECTION
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_CALL_SETUP */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_PROCEEDING */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_RINGBACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_CONNECTED */
+ {
+ smCallDisconnected, /* H323_EVENT_RECV_CALL_DISCONNECTED */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_DEST_REJECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_IDLE */
+ INVALID_EVENT, /* H323_EVENT_RECV_REMOTE_CAPABILITIES */
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_TRANSPORT_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_ACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_NAK */
+ {
+ smChannelOffering, /* H323_EVENT_RECV_CHANNEL_OFFERING */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smInChannelConnected, /* H323_EVENT_RECV_IN_CHANNEL_CONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smOutChannelConnected, /* H323_EVENT_RECV_OUT_CHANNEL_CONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smInChannelDisconnected, /* H323_EVENT_RECV_IN_CHANNEL_DISCONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_DISCONNECTED */
+ },/* END: State = H323_CALL_STATE_WAIT_FOR_CC_ANSWER */
+
+ /* BEGIN: State = H323_CALL_STATE_WAIT_FOR_PROCEEDING */
+ {
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_OFFERING */
+ {
+ smDropCall, /* H323_EVENT_RECV_CC_CALL_RELEASE */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_ANSWER_CALL */
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_CALL_SETUP */
+ {
+ smCallProceeding, /* H323_EVENT_RECV_CALL_PROCEEDING */
+ H323_CALL_STATE_WAIT_FOR_CONNECTION
+ },
+ {
+ smCallRingBack, /* H323_EVENT_RECV_CALL_RINGBACK */
+ H323_CALL_STATE_WAIT_FOR_CONNECTION
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_CONNECTED */
+ {
+ smCallDisconnected, /* H323_EVENT_RECV_CALL_DISCONNECTED */
+ H323_CALL_STATE_IDLE
+ },
+ {
+ smCallDestinationRejected, /* H323_EVENT_RECV_CALL_DEST_REJECTED */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_IDLE */
+ INVALID_EVENT, /* H323_EVENT_RECV_REMOTE_CAPABILITIES */
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_TRANSPORT_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_ACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_NAK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CHANNEL_OFFERING */
+ INVALID_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_DISCONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_DISCONNECTED */
+ },/* END: State = H323_CALL_STATE_WAIT_FOR_PROCEEDING */
+
+ /* BEGIN: State = H323_CALL_STATE_WAIT_FOR_CONNECTION */
+ {
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_OFFERING */
+ {
+ smDropCall, /* H323_EVENT_RECV_CC_CALL_RELEASE */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_ANSWER_CALL */
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_CALL_SETUP */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_PROCEEDING */
+ {
+ smCallRingBack, /* H323_EVENT_RECV_CALL_RINGBACK */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smCallConnected, /* H323_EVENT_RECV_CALL_CONNECTED */
+ H323_CALL_STATE_CHANNELS_CONNECTED
+ },
+ {
+ smCallDisconnected, /* H323_EVENT_RECV_CALL_DISCONNECTED */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_DEST_REJECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_IDLE */
+ {
+ smRecvRemoteCapabilities, /* H323_EVENT_RECV_REMOTE_CAPABILITIES */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smH245TransportConnected, /* H323_EVENT_RECV_H245_TRANSPORT_CONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smH245Connected, /* H323_EVENT_RECV_H245_CONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smRecvCapabilitiesAck, /* H323_EVENT_RECV_CAPABILITIES_ACK */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smRecvCapabilitiesNak, /* H323_EVENT_RECV_CAPABILITIES_NAK */
+ H323_CALL_STATE_IDLE
+ },
+ {
+ smChannelOffering, /* H323_EVENT_RECV_CHANNEL_OFFERING */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smInChannelConnected, /* H323_EVENT_RECV_IN_CHANNEL_CONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smOutChannelConnected, /* H323_EVENT_RECV_OUT_CHANNEL_CONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smInChannelDisconnected, /* H323_EVENT_RECV_IN_CHANNEL_DISCONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smOutChannelDisconnected, /* H323_EVENT_RECV_OUT_CHANNEL_DISCONNECTED */
+ H323_CALL_STATE_IDLE
+ },
+ },/* END: State = H323_CALL_STATE_WAIT_FOR_CONNECTION */
+
+ /* BEGIN: State = H323_CALL_STATE_CALL_CONNECTED */
+ {
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_OFFERING */
+ {
+ smDropCall, /* H323_EVENT_RECV_CC_CALL_RELEASE */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_ANSWER_CALL */
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_CALL_SETUP */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_PROCEEDING */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_RINGBACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_CONNECTED */
+ {
+ smCallDisconnected, /* H323_EVENT_RECV_CALL_DISCONNECTED */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_DEST_REJECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_IDLE */
+ INVALID_EVENT, /* H323_EVENT_RECV_REMOTE_CAPABILITIES */
+ {
+ smH245TransportConnected, /* H323_EVENT_RECV_H245_TRANSPORT_CONNECTED */
+ H323_CALL_STATE_WAIT_FOR_CAP_EXCHANGE_ACK
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_ACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_NAK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CHANNEL_OFFERING */
+ INVALID_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_DISCONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_DISCONNECTED */
+ },/* END: State = H323_CALL_STATE_CALL_CONNECTED */
+
+ /* BEGIN: State = H323_CALL_STATE_WAIT_FOR_CAP_EXCHANGE_ACK */
+ {
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_OFFERING */
+ {
+ smDropCall, /* H323_EVENT_RECV_CC_CALL_RELEASE */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_ANSWER_CALL */
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_CALL_SETUP */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_PROCEEDING */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_RINGBACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_CONNECTED */
+ {
+ smCallDisconnected, /* H323_EVENT_RECV_CALL_DISCONNECTED */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_DEST_REJECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_IDLE */
+ {
+ smRecvRemoteCapabilities, /* H323_EVENT_RECV_REMOTE_CAPABILITIES */
+ H323_CALL_STATE_SAME_STATE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_TRANSPORT_CONNECTED */
+ {
+ smH245Connected, /* H323_EVENT_RECV_H245_CONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smRecvCapabilitiesAck, /* H323_EVENT_RECV_CAPABILITIES_ACK */
+ H323_CALL_STATE_WAIT_FOR_CHANNELS_CONNECTION
+ },
+ {
+ smRecvCapabilitiesNak, /* H323_EVENT_RECV_CAPABILITIES_NAK */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CHANNEL_OFFERING */
+ INVALID_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_CONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_IN_CHANNEL_DISCONNECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_OUT_CHANNEL_DISCONNECTED */
+ },/* END: State = H323_CALL_STATE_WAIT_FOR_CAP_EXCHANGE_ACK */
+
+ /* BEGIN: State = H323_CALL_STATE_WAIT_FOR_CHANNELS_CONNECTION */
+ {
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_OFFERING */
+ {
+ smDropCall, /* H323_EVENT_RECV_CC_CALL_RELEASE */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_ANSWER_CALL */
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_CALL_SETUP */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_PROCEEDING */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_RINGBACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_CONNECTED */
+ {
+ smCallDisconnected, /* H323_EVENT_RECV_CALL_DISCONNECTED */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_DEST_REJECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_IDLE */
+ INVALID_EVENT, /* H323_EVENT_RECV_REMOTE_CAPABILITIES */
+ INVALID_EVENT, /* H323_EVENT_RECV_H245_TRANSPORT_CONNECTED */
+ {
+ smH245Connected, /* H323_EVENT_RECV_H245_CONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_ACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CAPABILITIES_NAK */
+ {
+ smChannelOffering, /* H323_EVENT_RECV_CHANNEL_OFFERING */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smInChannelConnected, /* H323_EVENT_RECV_IN_CHANNEL_CONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smOutChannelConnected, /* H323_EVENT_RECV_OUT_CHANNEL_CONNECTED */
+ H323_CALL_STATE_CHANNELS_CONNECTED
+ },
+ {
+ smInChannelDisconnected, /* H323_EVENT_RECV_IN_CHANNEL_DISCONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smOutChannelDisconnected, /* H323_EVENT_RECV_OUT_CHANNEL_DISCONNECTED */
+ H323_CALL_STATE_IDLE
+ },
+ },/* END: State = H323_CALL_STATE_WAIT_FOR_CHANNELS_CONNECTION */
+
+ /* BEGIN: State = H323_CALL_STATE_CHANNELS_CONNECTED */
+ {
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_OFFERING */
+ {
+ smDropCall, /* H323_EVENT_RECV_CC_CALL_RELEASE */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_ANSWER_CALL */
+ INVALID_EVENT, /* H323_EVENT_RECV_CC_CALL_SETUP */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_PROCEEDING */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_RINGBACK */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_CONNECTED */
+ {
+ smCallDisconnected, /* H323_EVENT_RECV_CALL_DISCONNECTED */
+ H323_CALL_STATE_IDLE
+ },
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_DEST_REJECTED */
+ INVALID_EVENT, /* H323_EVENT_RECV_CALL_IDLE */
+ {
+ smRecvRemoteCapabilities, /* H323_EVENT_RECV_REMOTE_CAPABILITIES */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smH245TransportConnected, /* H323_EVENT_RECV_H245_TRANSPORT_CONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smH245Connected, /* H323_EVENT_RECV_H245_CONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smRecvCapabilitiesAck, /* H323_EVENT_RECV_CAPABILITIES_ACK */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smRecvCapabilitiesNak, /* H323_EVENT_RECV_CAPABILITIES_NAK */
+ H323_CALL_STATE_IDLE
+ },
+ {
+ smChannelOffering, /* H323_EVENT_RECV_CHANNEL_OFFERING */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smInChannelConnected, /* H323_EVENT_RECV_IN_CHANNEL_CONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smOutChannelConnected, /* H323_EVENT_RECV_OUT_CHANNEL_CONNECTED */
+ H323_CALL_STATE_CHANNELS_CONNECTED
+ },
+ {
+ smInChannelDisconnected, /* H323_EVENT_RECV_IN_CHANNEL_DISCONNECTED */
+ H323_CALL_STATE_SAME_STATE
+ },
+ {
+ smOutChannelDisconnected, /* H323_EVENT_RECV_OUT_CHANNEL_DISCONNECTED */
+ H323_CALL_STATE_IDLE
+ }
+ }/* END: State = H323_CALL_STATE_CHANNELS_CONNECTED */
+
+};
diff --git a/data/mnet/GP10/Host/voip/src/h323task.cpp b/data/mnet/GP10/Host/voip/src/h323task.cpp
new file mode 100644
index 0000000..ece9b8e
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/src/h323task.cpp
@@ -0,0 +1,1094 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : H323Task.cpp *
+ * *
+ * Description : The "main" H.323 task entry point functions *
+ * *
+ * Author : Dinesh Nambisan *
+ * [Code borrowed liberally from original work *
+ * of Oleg Turovski] *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <cm.h>
+#include <stkutils.h>
+
+#include <tickLib.h>
+#include <drv\timer\timerDev.h>
+#include <taskLib.h>
+#include <errnolib.h>
+#include <time.h>
+extern "C" {
+#include <mti.h>
+#include <seli.h>
+#include <pi.h>
+#include <ci.h>
+#include <cibuf.h>
+}
+
+#include "Os/JCTask.h"
+#include "GP10OsTune.h"
+#include "logging\vcmodules.h"
+#include "logging\vclogging.h"
+#include "vipermem.h"
+#include "h323task.h"
+#include "ccb.h"
+#include "rtptask.h"
+#include "eventhandlers.h"
+#include "voip\vblink.h"
+#include "voip\voipapi.h"
+#include "h323interface.h"
+#include "viperip.h"
+
+#ifndef LOOPBACK_MODE
+#include "oam_api.h"
+#include "alarmcode.h"
+#include "mnetmoduleid.h"
+#endif
+
+
+/************* THE RADVISION H.323 STACK CONFIGURATION IN A BUFFER *********************/
+/************* PLEASE DO NOT MODIFY !!! ************************************************/
+unsigned char RadConfigBuffer[] = {
+ 0x2a, 0x2a, 0x42, 0x55, 0x46, 0x2a, 0x2a, 0x00, 0x00, 0x00,
+ 0x10, 0x10, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x08, 0xc4,
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x0a, 0x68, 0x34, 0x35, 0x30, 0x73, 0x79, 0x73,
+ 0x74, 0x65, 0x6d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x64, 0x00, 0x00, 0x00, 0x08, 0x6d, 0x61, 0x78, 0x43,
+ 0x61, 0x6c, 0x6c, 0x73, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
+ 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x0b, 0x6d, 0x61, 0x78,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x06, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b,
+ 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x64,
+ 0x00, 0x00, 0x00, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x61, 0x6c,
+ 0x6c, 0x73, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x0b, 0x6d, 0x61, 0x78, 0x43, 0x68,
+ 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x52,
+ 0x41, 0x53, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74,
+ 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x09, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x52,
+ 0x41, 0x53, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x07, 0x6d, 0x61, 0x78, 0x46, 0x61,
+ 0x69, 0x6c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x12, 0x6d, 0x61, 0x6e, 0x75, 0x61,
+ 0x6c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x6d, 0x61, 0x6e, 0x75,
+ 0x61, 0x6c, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72,
+ 0x79, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x11, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
+ 0x74, 0x47, 0x61, 0x74, 0x65, 0x6b, 0x65, 0x65, 0x70, 0x65,
+ 0x72, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x09, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72,
+ 0x65, 0x73, 0x73, 0x00, 0x00, 0x00, 0x05, 0x01, 0x00, 0x00,
+ 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x69, 0x70, 0x0a, 0x01,
+ 0x02, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06,
+ 0xb7, 0x00, 0x00, 0x00, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x00,
+ 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x10, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x00, 0x00,
+ 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x54,
+ 0x79, 0x70, 0x65, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x76, 0x65, 0x6e, 0x64,
+ 0x6f, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f,
+ 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0xb5,
+ 0x00, 0x00, 0x00, 0x0e, 0x74, 0x33, 0x35, 0x43, 0x6f, 0x75,
+ 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x00, 0x00,
+ 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x74, 0x33, 0x35, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
+ 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x53, 0x4c, 0x00, 0x00, 0x00, 0x10, 0x6d, 0x61, 0x6e, 0x75,
+ 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x43, 0x6f,
+ 0x64, 0x65, 0x00, 0x00, 0x00, 0x05, 0x01, 0x00, 0x00, 0x00,
+ 0x0b, 0x00, 0x00, 0x00, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75,
+ 0x63, 0x74, 0x49, 0x64, 0x43, 0x69, 0x73, 0x63, 0x6f, 0x20,
+ 0x47, 0x50, 0x2d, 0x31, 0x30, 0x00, 0x00, 0x00, 0x05, 0x01,
+ 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x09, 0x76, 0x65,
+ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x31, 0x2e, 0x30,
+ 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61,
+ 0x6c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x6d, 0x63, 0x00, 0x00, 0x00, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x75,
+ 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x4e, 0x6f,
+ 0x64, 0x65, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0d, 0x74, 0x65, 0x72, 0x6d, 0x69,
+ 0x6e, 0x61, 0x6c, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x00, 0x00,
+ 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x31, 0x00, 0x00, 0x00, 0x05, 0x01, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x07, 0x68, 0x33, 0x32, 0x33, 0x2d,
+ 0x49, 0x44, 0x00, 0x49, 0x00, 0x4d, 0x00, 0x53, 0x00, 0x49,
+ 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00,
+ 0x00, 0x00, 0x14, 0x67, 0x61, 0x74, 0x65, 0x6b, 0x65, 0x65,
+ 0x70, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66,
+ 0x69, 0x65, 0x72, 0x00, 0x47, 0x00, 0x4d, 0x00, 0x43, 0x00,
+ 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x0e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74,
+ 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x76,
+ 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00,
+ 0x00, 0x00, 0x00, 0xb5, 0x00, 0x00, 0x00, 0x0e, 0x74, 0x33,
+ 0x35, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f,
+ 0x64, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0c, 0x74, 0x33, 0x35, 0x45, 0x78,
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00,
+ 0x04, 0x01, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x09,
+ 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x4a,
+ 0x65, 0x74, 0x43, 0x65, 0x6c, 0x6c, 0x20, 0x56, 0x69, 0x70,
+ 0x65, 0x72, 0x43, 0x65, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00,
+ 0x04, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x09,
+ 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x31,
+ 0x2e, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x13, 0x72, 0x61, 0x73, 0x4d, 0x75,
+ 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x41, 0x64, 0x64,
+ 0x72, 0x65, 0x73, 0x73, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x69, 0x70, 0x41,
+ 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x00, 0x00, 0x00, 0x04,
+ 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x69,
+ 0x70, 0xe0, 0x00, 0x01, 0x29, 0x00, 0x00, 0x00, 0x04, 0x00,
+ 0x00, 0x00, 0x06, 0xb6, 0x00, 0x00, 0x00, 0x04, 0x70, 0x6f,
+ 0x72, 0x74, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x07, 0x72, 0x61, 0x73, 0x50, 0x6f,
+ 0x72, 0x74, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x0a, 0x6d, 0x61, 0x78, 0x52, 0x65,
+ 0x74, 0x72, 0x69, 0x65, 0x73, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x51, 0x39,
+ 0x33, 0x31, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+ 0x96, 0x00, 0x00, 0x00, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74,
+ 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0xf4, 0x00,
+ 0x00, 0x00, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x06, 0xb8, 0x00, 0x00, 0x00, 0x11,
+ 0x63, 0x61, 0x6c, 0x6c, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c,
+ 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x08,
+ 0x6d, 0x61, 0x78, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x00, 0x00,
+ 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x41, 0x63, 0x63,
+ 0x65, 0x70, 0x74, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x6d, 0x61, 0x6e, 0x75,
+ 0x61, 0x6c, 0x43, 0x61, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x63,
+ 0x65, 0x65, 0x64, 0x69, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x68,
+ 0x32, 0x34, 0x35, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x6d, 0x61, 0x73, 0x74,
+ 0x65, 0x72, 0x53, 0x6c, 0x61, 0x76, 0x65, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x0c,
+ 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x79,
+ 0x70, 0x65, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+ 0x64, 0x00, 0x00, 0x00, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f,
+ 0x75, 0x74, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62,
+ 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15,
+ 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x43, 0x61,
+ 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x65,
+ 0x74, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x0e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e,
+ 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x00, 0x00,
+ 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x12, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49,
+ 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x00,
+ 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x13, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c,
+ 0x65, 0x78, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69,
+ 0x74, 0x79, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x0f, 0x68, 0x32, 0x32, 0x35, 0x30,
+ 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
+ 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00,
+ 0x00, 0x00, 0x17, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d,
+ 0x41, 0x75, 0x64, 0x69, 0x6f, 0x44, 0x65, 0x6c, 0x61, 0x79,
+ 0x4a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x72,
+ 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x75, 0x6c, 0x74,
+ 0x69, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x61,
+ 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x6d,
+ 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x43, 0x61,
+ 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x00, 0x00,
+ 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x16, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x55, 0x6e, 0x69, 0x43,
+ 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x65, 0x72, 0x65,
+ 0x6e, 0x63, 0x65, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x6d, 0x65, 0x64, 0x69,
+ 0x61, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
+ 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x31, 0x00, 0x00, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12,
+ 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65,
+ 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x00, 0x00,
+ 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x12, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x00,
+ 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x10, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69,
+ 0x7a, 0x65, 0x64, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x00, 0x00,
+ 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x64, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x00, 0x00, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
+ 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65,
+ 0x64, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x00, 0x00, 0x00, 0x09,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x64,
+ 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64,
+ 0x56, 0x69, 0x64, 0x65, 0x6f, 0x00, 0x00, 0x00, 0x06, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x74, 0x72,
+ 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x4d, 0x75, 0x6c, 0x74,
+ 0x69, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x61,
+ 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x6d,
+ 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x43, 0x61,
+ 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x00, 0x00,
+ 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x16, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x55, 0x6e, 0x69, 0x43,
+ 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x65, 0x72, 0x65,
+ 0x6e, 0x63, 0x65, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x6d, 0x65, 0x64, 0x69,
+ 0x61, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
+ 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x31, 0x00, 0x00, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12,
+ 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65,
+ 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x00, 0x00,
+ 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x12, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x00,
+ 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x10, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69,
+ 0x7a, 0x65, 0x64, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x00, 0x00,
+ 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x64, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x00, 0x00, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
+ 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65,
+ 0x64, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x00, 0x00, 0x00, 0x09,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x64,
+ 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64,
+ 0x56, 0x69, 0x64, 0x65, 0x6f, 0x00, 0x00, 0x00, 0x06, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x72, 0x65,
+ 0x63, 0x65, 0x69, 0x76, 0x65, 0x41, 0x6e, 0x64, 0x54, 0x72,
+ 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x4d, 0x75, 0x6c, 0x74,
+ 0x69, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x61, 0x70, 0x61,
+ 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x6d,
+ 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x43, 0x61,
+ 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x00, 0x00,
+ 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x16, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x55, 0x6e, 0x69, 0x43,
+ 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x65, 0x72, 0x65,
+ 0x6e, 0x63, 0x65, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x6d, 0x65, 0x64, 0x69,
+ 0x61, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
+ 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x31, 0x00, 0x00, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12,
+ 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65,
+ 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x00, 0x00,
+ 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x12, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x00,
+ 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x10, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69,
+ 0x7a, 0x65, 0x64, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x00, 0x00,
+ 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x64, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x00, 0x00, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
+ 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a, 0x65,
+ 0x64, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x00, 0x00, 0x00, 0x09,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x64,
+ 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64,
+ 0x56, 0x69, 0x64, 0x65, 0x6f, 0x00, 0x00, 0x00, 0x06, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x6d, 0x63,
+ 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
+ 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x17, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c,
+ 0x69, 0x7a, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x65, 0x72,
+ 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x43, 0x00, 0x00, 0x00, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x64,
+ 0x65, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x7a,
+ 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e,
+ 0x63, 0x65, 0x4d, 0x43, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x72, 0x74, 0x63,
+ 0x70, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6f, 0x6e, 0x74,
+ 0x72, 0x6f, 0x6c, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
+ 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x6d, 0x65, 0x64, 0x69,
+ 0x61, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69,
+ 0x6c, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x68, 0x32, 0x36,
+ 0x31, 0x61, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x50, 0x61, 0x63,
+ 0x6b, 0x65, 0x74, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x0f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
+ 0x69, 0x74, 0x79, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x00, 0x00,
+ 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x31, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x1a, 0x63, 0x61, 0x70, 0x61, 0x62,
+ 0x69, 0x6c, 0x69, 0x74, 0x79, 0x54, 0x61, 0x62, 0x6c, 0x65,
+ 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4e, 0x75, 0x6d, 0x62, 0x65,
+ 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69,
+ 0x6c, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x72, 0x65, 0x63,
+ 0x65, 0x69, 0x76, 0x65, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x43,
+ 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x00,
+ 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x0b, 0x67, 0x73, 0x6d, 0x46, 0x75, 0x6c, 0x6c, 0x52,
+ 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
+ 0x00, 0x21, 0x00, 0x00, 0x00, 0x0d, 0x61, 0x75, 0x64, 0x69,
+ 0x6f, 0x55, 0x6e, 0x69, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x00,
+ 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x0c, 0x63, 0x6f, 0x6d, 0x66, 0x6f, 0x72, 0x74, 0x4e,
+ 0x6f, 0x69, 0x73, 0x65, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x73, 0x63, 0x72,
+ 0x61, 0x6d, 0x62, 0x6c, 0x65, 0x64, 0x00, 0x00, 0x00, 0x05,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x32,
+ 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
+ 0x00, 0x00, 0x1a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
+ 0x69, 0x74, 0x79, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6e,
+ 0x74, 0x72, 0x79, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x00,
+ 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69,
+ 0x74, 0x79, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x16, 0x72, 0x65, 0x63, 0x65, 0x69,
+ 0x76, 0x65, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x43, 0x61, 0x70,
+ 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13,
+ 0x67, 0x73, 0x6d, 0x45, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65,
+ 0x64, 0x46, 0x75, 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x00,
+ 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
+ 0x00, 0x0d, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x55, 0x6e, 0x69,
+ 0x74, 0x53, 0x69, 0x7a, 0x65, 0x00, 0x00, 0x00, 0x09, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x63, 0x6f,
+ 0x6d, 0x66, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x69, 0x73, 0x65,
+ 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x09, 0x73, 0x63, 0x72, 0x61, 0x6d, 0x62, 0x6c,
+ 0x65, 0x64, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x33, 0x00, 0x00, 0x00, 0x06,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1a, 0x63,
+ 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x54,
+ 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4e,
+ 0x75, 0x6d, 0x62, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x63, 0x61,
+ 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x00, 0x00,
+ 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x1b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74, 0x55,
+ 0x73, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x61,
+ 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x00, 0x00,
+ 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0b, 0x62, 0x61, 0x73, 0x69, 0x63, 0x53, 0x74, 0x72, 0x69,
+ 0x6e, 0x67, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62,
+ 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x73, 0x63, 0x72,
+ 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x00, 0x00, 0x00, 0x05,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x31,
+ 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x1a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
+ 0x69, 0x74, 0x79, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
+ 0x74, 0x6f, 0x72, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x00,
+ 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x18, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x74, 0x61, 0x6e,
+ 0x65, 0x6f, 0x75, 0x73, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69,
+ 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x00, 0x00, 0x00, 0x07,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x31,
+ 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x01, 0x31, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
+ 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x32, 0x00, 0x00,
+ 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x32, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x01, 0x31, 0x00, 0x00, 0x00, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x32,
+ 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x0f, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x4f,
+ 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00,
+ 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
+ 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x00, 0x00,
+ 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x00,
+ 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x31, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00,
+ 0x00, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x67, 0x73, 0x6d, 0x46, 0x75, 0x6c, 0x6c, 0x52, 0x61, 0x74,
+ 0x65, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79,
+ 0x70, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x09, 0x61, 0x75, 0x64, 0x69, 0x6f,
+ 0x44, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x67, 0x73, 0x6d,
+ 0x46, 0x75, 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x00, 0x00,
+ 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00,
+ 0x0d, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x55, 0x6e, 0x69, 0x74,
+ 0x53, 0x69, 0x7a, 0x65, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x63, 0x6f, 0x6d,
+ 0x66, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x69, 0x73, 0x65, 0x00,
+ 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x09, 0x73, 0x63, 0x72, 0x61, 0x6d, 0x62, 0x6c, 0x65,
+ 0x64, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x14, 0x69, 0x73, 0x44, 0x79, 0x6e, 0x61,
+ 0x6d, 0x69, 0x63, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,
+ 0x54, 0x79, 0x70, 0x65, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x32, 0x00, 0x00,
+ 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x67, 0x73, 0x6d, 0x45, 0x6e,
+ 0x68, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x46, 0x75, 0x6c, 0x6c,
+ 0x52, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x64, 0x61, 0x74,
+ 0x61, 0x54, 0x79, 0x70, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x61, 0x75,
+ 0x64, 0x69, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13,
+ 0x67, 0x73, 0x6d, 0x45, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65,
+ 0x64, 0x46, 0x75, 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x00,
+ 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
+ 0x00, 0x0d, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x55, 0x6e, 0x69,
+ 0x74, 0x53, 0x69, 0x7a, 0x65, 0x00, 0x00, 0x00, 0x07, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x63, 0x6f,
+ 0x6d, 0x66, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x69, 0x73, 0x65,
+ 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x09, 0x73, 0x63, 0x72, 0x61, 0x6d, 0x62, 0x6c,
+ 0x65, 0x64
+};
+
+
+unsigned char padding_begin_chars[2048];
+PH323TASK_CONFIG pVoipTaskConfig;
+H323TASK_CONFIG VoipTaskConfiguration;
+CALL_CONTROL_BLOCK CCBArray[MAX_ACTIVE_CALLS];
+RADPIPE RadPipeArray[MAX_PIPES_IN_ARRAY];
+JCTIMER VoipTaskTimerArray[MAX_TIMERS_IN_ARRAY];
+API_MESSAGE VoipMessageArray[MAX_VOIP_API_MSGS_IN_ARRAY];
+unsigned char padding_end_chars[2048];
+
+JCTask RTPMainTaskObj("RTPmain");
+JCTask VOIPTaskObj("VOIPTask");
+
+
+long int ViperCellIdentifier=0;
+char *StackConfigBuffer;
+/*
+ ************ H.323 Task Management functions *************************
+ */
+
+/*
+ * H323Task
+ */
+int H323Task()
+{
+
+#ifdef LOOPBACK_MODE
+
+ if ((taskSpawn( "H323Task", 100, 0, 20000, (FUNCPTR)InitializeH323Task,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) )== ERROR )
+ {
+ printf("Unable to spawn H323 Task!!\n");
+ }
+ return (1);
+#else
+ return(InitializeH323Task());
+#endif
+
+}
+
+
+/*
+ * InitializeH323Task : The main entry point for this task
+ */
+int InitializeH323Task()
+{
+ DBG_FUNC("InitializeH323Task",H323_LAYER);
+ DBG_ENTER();
+ PCALL_CONTROL_BLOCK pCCB;
+ int RetStatus=FALSE,Count=0;
+ HCFG hCfg;
+ BOOL retVal=FALSE;
+ char ConfigBuffer[MAX_STACK_CONFIG_BUFFER_SIZE];
+
+
+
+ pVoipTaskConfig = (PH323TASK_CONFIG)&VoipTaskConfiguration;
+ ASSERT(pVoipTaskConfig!=NULL);
+ if (pVoipTaskConfig == NULL)
+ {
+ DBG_ERROR("Error in allocating memory for TaskConfig !!\n");
+ DBG_LEAVE();
+ return RetStatus;
+ }
+ memset(pVoipTaskConfig,0,sizeof(H323TASK_CONFIG));
+ pVoipTaskConfig->Magic = H323TASK_MAGIC_VALUE;
+
+#ifndef LOOPBACK_MODE
+ /*
+ * Read in all these values from the OAM and
+ * set them accordingly.
+ */
+
+ if (oam_getMibIntVar(MIB_h323_GKPort, (long int*)&pVoipTaskConfig->GKPort) != STATUS_OK)
+ {
+ DBG_ERROR("Unable to get GateKeeper signalling port from OAM!!\n");
+ DBG_LEAVE();
+ return RetStatus;
+ }
+ else {
+ DBG_TRACE("GateKeeper signalling port OAM value %ld\n",pVoipTaskConfig->GKPort);
+ }
+
+ if (oam_getMibIntVar(MIB_h323_GKIPAddress, (long int*)&pVoipTaskConfig->GKIPAddress) != STATUS_OK)
+ {
+ DBG_ERROR("Unable to get GateKeeper IP address from OAM!!\n");
+ DBG_LEAVE();
+ return RetStatus;
+ }
+ else {
+ DBG_TRACE("GateKeeper IP address OAM value %ld\n",pVoipTaskConfig->GKIPAddress);
+ }
+
+ if (oam_getMibIntVar(MIB_h323_Q931ResponseTimeOut, (long int*)&pVoipTaskConfig->Q931ResponseTimeOut) != STATUS_OK)
+ {
+ DBG_ERROR("Unable to get Q.931 response timeout from OAM!!\n");
+ DBG_LEAVE();
+ return RetStatus;
+ }
+ else {
+ DBG_TRACE("Q.931 response timeout OAM value %ld\n",pVoipTaskConfig->Q931ResponseTimeOut);
+ }
+
+
+ /*
+ * Temporary hack to set default IP gateway's address from OAM through VoIP for now: DSN
+ */
+ {
+ long int DefGateway;
+ unsigned char DefGwIp[4];
+ char DefGwIpStr[64];
+
+ if (oam_getMibIntVar(MIB_viperCellDefGateway, (long int*)&DefGateway) != STATUS_OK)
+ {
+ DBG_ERROR("Unable to get Default Gateway IP address from OAM!!\n");
+ DBG_LEAVE();
+ return RetStatus;
+ }
+
+ DefGwIp[0] = (DefGateway >> 24) & 0x000000ff;
+ DefGwIp[1] = (DefGateway >> 16) & 0x000000ff;
+ DefGwIp[2] = (DefGateway >> 8) & 0x000000ff;
+ DefGwIp[3] = (DefGateway) & 0x000000ff;
+
+ memset(DefGwIpStr,0,64);
+ sprintf(DefGwIpStr,"%d.%d.%d.%d",DefGwIp[0],DefGwIp[1],DefGwIp[2],DefGwIp[3]);
+
+ printf("Setting the default gateway IP address to %s\n",DefGwIpStr);
+ vipSetDefaultGateway(DefGwIpStr);
+
+ }
+
+ pVoipTaskConfig->Q931ConnectTimeOut = 500 ; /* Hard coded for now */
+ DBG_TRACE("Q.931 connect timeout OAM value %ld\n",pVoipTaskConfig->Q931ConnectTimeOut);
+
+
+
+
+
+
+
+
+ if (oam_getMibIntVar(MIB_h323_Q931CallSignalingPort, (long int*)&pVoipTaskConfig->Q931CallSignalingPort) != STATUS_OK)
+ {
+ DBG_ERROR("Unable to get Q.931 call signalling port from OAM!!\n");
+ DBG_LEAVE();
+ return RetStatus;
+ }
+ else {
+ DBG_TRACE("Q.931 call signalling port OAM value %ld\n",pVoipTaskConfig->Q931CallSignalingPort);
+ }
+
+
+ if (oam_getMibIntVar(MIB_h323_t35CountryCode, (long int*)&pVoipTaskConfig->t35CountryCode) != STATUS_OK)
+ {
+ DBG_ERROR("Unable to get t35 country code from OAM!!\n");
+ DBG_LEAVE();
+ return RetStatus;
+ }
+ else {
+ DBG_TRACE("t35 country code OAM value %ld\n",pVoipTaskConfig->t35CountryCode);
+ }
+
+
+
+ pVoipTaskConfig->gkIpAddrOctets[0] = (pVoipTaskConfig->GKIPAddress >> 24) & 0x000000ff;
+ pVoipTaskConfig->gkIpAddrOctets[1] = (pVoipTaskConfig->GKIPAddress >> 16) & 0x000000ff;
+ pVoipTaskConfig->gkIpAddrOctets[2] = (pVoipTaskConfig->GKIPAddress >> 8) & 0x000000ff;
+ pVoipTaskConfig->gkIpAddrOctets[3] = (pVoipTaskConfig->GKIPAddress) & 0x000000ff;
+#else
+ pVoipTaskConfig->GKPort = 1719;
+ pVoipTaskConfig->Q931ResponseTimeOut = 150;
+ pVoipTaskConfig->Q931ConnectTimeOut = 500;
+ pVoipTaskConfig->Q931CallSignalingPort = 1720;
+ pVoipTaskConfig->t35CountryCode = 181;
+
+ pVoipTaskConfig->gkIpAddrOctets[0] = 10;
+ pVoipTaskConfig->gkIpAddrOctets[1] = 1;
+ pVoipTaskConfig->gkIpAddrOctets[2] = 2;
+ pVoipTaskConfig->gkIpAddrOctets[3] = 2;
+
+#endif
+ pVoipTaskConfig->DefaultCodecGsmFullRate = TRUE;
+
+ memset(pVoipTaskConfig->szGatekeeperAddress,0,MAX_IP_ADDRESS_STRING_LENGTH);
+
+ sprintf(pVoipTaskConfig->szGatekeeperAddress,"%d.%d.%d.%d",
+ pVoipTaskConfig->gkIpAddrOctets[0],pVoipTaskConfig->gkIpAddrOctets[1],
+ pVoipTaskConfig->gkIpAddrOctets[2],pVoipTaskConfig->gkIpAddrOctets[3]);
+
+ DBG_TRACE("Gatekeeper address reported as %s by OAM\n",pVoipTaskConfig->szGatekeeperAddress);
+
+ hCfg = ciConstructEx((char *)RadConfigBuffer,1024,30);
+ if (hCfg < 0) {
+ DBG_ERROR("Unable to get configuration handle\n");
+ DBG_LEAVE();
+ return(RetStatus);
+ }
+ /*
+ *
+ */
+ StackConfigSetGateKeeperAddress(hCfg,pVoipTaskConfig->gkIpAddrOctets,pVoipTaskConfig->GKPort);
+
+ StackConfigSetQ931Parameters(hCfg,pVoipTaskConfig->Q931ResponseTimeOut,pVoipTaskConfig->Q931ConnectTimeOut,
+ pVoipTaskConfig->Q931CallSignalingPort);
+
+ StackConfigSetCountryCode(hCfg,pVoipTaskConfig->t35CountryCode);
+
+ memset(ConfigBuffer,0,MAX_STACK_CONFIG_BUFFER_SIZE);
+ ciPrepareTargetBuffer(ConfigBuffer,MAX_STACK_CONFIG_BUFFER_SIZE);
+ int val = ciSave(hCfg,ConfigBuffer);
+ if (val < 0) {
+ DBG_ERROR("Unable to save H.323 Stack configuration context\n");
+ DBG_LEAVE();
+ return(RetStatus);
+ }
+
+ StackConfigBuffer = (char *)ConfigBuffer;
+
+ /*InitializeJetRtp();*/
+ PipeArrayInit();
+
+
+ pVoipTaskConfig->pH323TaskInputPipe=NULL;
+
+ pVoipTaskConfig->pH323TaskInputPipe = RadPipeOpen(
+ "H323MainInputPipe",
+ sizeof(VOIP_API_MESSAGE),
+ 100,
+ (pfnCallBackFunction)H323MessageHandler
+ ) ;
+ if(pVoipTaskConfig->pH323TaskInputPipe== NULL)
+ {
+ DBG_ERROR( "Error creating Input Pipe\n" );
+ return FALSE;
+ }
+
+ pVoipTaskConfig->StackHandle = InitializeStackInstance();
+ ASSERT(pVoipTaskConfig->StackHandle != NULL);
+ if (pVoipTaskConfig->StackHandle == NULL)
+ {
+ DBG_ERROR("Unable to initialize Stack Instance!!\n");
+ DBG_LEAVE();
+ return RetStatus;
+ }
+
+
+ TimerArrayInit();
+
+ InitializeCallControlBlocks();
+
+ /* Initialize the RTP task */
+ if( ( pVoipTaskConfig->RtpTaskHandle = RTPMainTaskObj.JCTaskSpawn( RTPMAIN_TASK_PRIORITY,
+ RTPMAIN_TASK_OPTION, RTPMAIN_TASK_STACK_SIZE, (FUNCPTR)RtpTask,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, MODULE_H323,JC_CRITICAL_TASK ) )== ERROR )
+ {
+ DBG_ERROR("Error creating RTP Task\n" );
+ DBG_LEAVE();
+ return FALSE;
+ }
+ int ArraySize ;
+
+ ArraySize = sizeof(API_MESSAGE) * MAX_VOIP_API_MSGS_IN_ARRAY;
+ memset(VoipMessageArray,0,ArraySize);
+
+
+ ShowStackConfigSettings();
+
+ VOIPTaskObj.JCTaskEnterLoop();
+
+ WAIT_FOREVER_FOR_H323_EVENTS();
+
+ VOIPTaskObj.JCTaskNormExit();
+
+ DBG_LEAVE();
+ return TRUE;
+}
+
+
+
+
+/*
+ * InitializeStackInstance
+ */
+HAPP InitializeStackInstance()
+{
+ DBG_FUNC("InitializeStackInstance",H323_LAYER);
+ DBG_ENTER();
+ HAPP StackHandle=NULL;
+ char* pszInitFile;
+ pszInitFile = "config.val";
+ HPVT hPVT;
+ INT32 hRAS;
+ BYTE bmpString[256],bmpString2[256];
+
+ SCMEVENT cmEvent =
+ {
+ NewCallHandler,
+ RASEventHandler
+ };
+
+
+
+ SCMCALLEVENT cmCallEvent =
+ {
+ EventCallStateChanged,
+ NULL,
+ EventCallInfo,
+ NULL,
+ EventCallFacility,
+ EventCallFastStartSetup,
+ NULL,
+ NULL,
+ EventCallH450SupplementaryService,
+ NULL
+ };
+
+
+ SCMCONTROLEVENT cmControlEvent =
+ {
+ EventCallCapabilities,
+ EventCallCapabilitiesExt,
+ EventCallNewChannel,
+ EventCallCapabilitiesResponse,
+ EventCallMasterSlaveStatus,
+ EventCallRoundTripDelay,
+ EventCallUserInput,
+ EventCallRequestMode,
+ EventCallMiscStatus,
+ EventCallControlStateChanged,
+ EventCallMasterSlave
+ };
+
+
+ SCMCHANEVENT cmChannelEvent =
+ {
+ EventChannelStateChanged,
+ EventChannelNewRate,
+ EventChannelMaxSkew,
+ EventChannelSetAddress,
+ EventChannelSetRTCPAddress,
+ EventChannelParameters,
+ EventChannelRTPDynamicPayloadType,
+ EventChannelVideoFastUpdatePicture,
+ EventChannelVideoFastUpdateGOB,
+ EventChannelVideoFastUpdateMB,
+ EventChannelHandle,
+ EventChannelGetRTCPAddress,
+ EventChannelRequestCloseStatus,
+ EventChannelTSTO,
+ EventChannelMediaLoopStatus,
+ EventChannelReplace,
+ EventChannelFlowControlToZero
+ };
+
+ SCMPROTOCOLEVENT cmProtocolEvent =
+ {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ EventHookSend ,
+ EventHookRecv,
+ EventHookSendTo,
+ EventHookRecvFrom,
+ NULL
+ };
+
+
+SSSECALLEVENT cmSupplementaryServiceEvent=
+ {
+ suppEventForwardActivated,
+ suppEventForwardDeactivated,
+ suppEventCallTransfer,
+ suppEventCallReroute
+ };
+
+
+
+
+ /* make sure config.val has the following keys:
+ * system.manualStart - NOT defined
+ * RAS.manualRAS - NOT defined
+ * RAS.manualRegistration - defined
+ * and correct settings for keys common to all terminals
+ */
+#ifdef USE_RAD_CONFIG_FILE
+ if( cmInitialize( pszInitFile, &StackHandle ) < 0 )
+#else
+ if( cmInitialize((char *)StackConfigBuffer, &StackHandle ) < 0 )
+#endif
+ {
+ DBG_ERROR( "Error in cmInitialize(), error : %d \n", errnoGet());
+ DBG_LEAVE();
+ return NULL;
+ }
+
+
+
+ sseInit(StackConfigBuffer,&pVoipTaskConfig->SuppStackHandle,NULL,StackHandle,100);
+ pVoipTaskConfig->SuppAppHandle = sseGetSSHandle(pVoipTaskConfig->SuppStackHandle);
+
+
+ cmSetGenEventHandler( StackHandle, &cmEvent, sizeof( SCMEVENT ) );
+ cmSetCallEventHandler( StackHandle, &cmCallEvent, sizeof( SCMCALLEVENT ) );
+ cmSetControlEventHandler( StackHandle, &cmControlEvent, sizeof( SCMCONTROLEVENT ) );
+ cmSetChannelEventHandler( StackHandle, &cmChannelEvent, sizeof( SCMCHANEVENT ) );
+ cmSetProtocolEventHandler( StackHandle, &cmProtocolEvent, sizeof( SCMPROTOCOLEVENT ) );
+
+ if( 0 == ( pVoipTaskConfig->hsTimer = mtimerInit( RAD_MAX_TIMERS, NULL ) ) )
+ {
+ DBG_ERROR("Unable to create timer!!\n");
+ DBG_LEAVE();
+ return NULL;
+ }
+
+ {
+ char localAddrStr[64];
+ cmRASTransport tr;
+ sseSetCallEventHandler(pVoipTaskConfig->SuppStackHandle,&cmSupplementaryServiceEvent,
+ sizeof(SSSECALLEVENT));
+ cmGetLocalCallSignalAddress(StackHandle,&tr);
+ sprintf(localAddrStr,"TA:%d.%d.%d.%d:%d",
+ (int)((unsigned char*)&(tr.ip))[0],(int)((unsigned char*)&(tr.ip))[1],
+ (int)((unsigned char*)&(tr.ip))[2],(int)((unsigned char*)&(tr.ip))[3],tr.port);
+ sseSetDefaultAddress(pVoipTaskConfig->SuppStackHandle,localAddrStr);
+ }
+
+
+ DBG_LEAVE();
+ return StackHandle;
+}
+
+
+
+
+
+
+
+
+/*
+ * StackConfigSetQ931Parameters
+ */
+BOOL
+StackConfigSetQ931Parameters(HCFG hCfg,unsigned long OAMResponseTimeout,
+ unsigned long OAMConnectTimeout,unsigned long OAMSignallingPort)
+{
+ DBG_FUNC("StackConfigSetQ931Parameters",H323_LAYER);
+ DBG_ENTER();
+ int retCode,len=100;
+ BOOL retStatus=FALSE;
+ char *responseTimeoutPath="Q931.responseTimeOut";
+ char *connectTimeoutPath="Q931.connectTimeOut";
+ char *signallingPortPath="Q931.callSignalingPort";
+
+ int ResponseTimeout, ConnectTimeout,SignallingPort;
+
+ ResponseTimeout = OAMResponseTimeout;
+ ConnectTimeout = OAMConnectTimeout;
+ SignallingPort = OAMSignallingPort;
+
+ retCode=ciSetValue(hCfg,responseTimeoutPath,FALSE,ResponseTimeout,NULL);
+ if (retCode < 0) {
+ DBG_ERROR("Unable to set Q.931 Response timeout\n");
+ DBG_LEAVE();
+ return(retStatus);
+ }
+
+ retCode=ciSetValue(hCfg,connectTimeoutPath,FALSE,ConnectTimeout,NULL);
+ if (retCode < 0) {
+ DBG_ERROR("Unable to set Q.931 Response timeout\n");
+ DBG_LEAVE();
+ return(retStatus);
+ }
+
+ retCode=ciSetValue(hCfg,signallingPortPath,FALSE,SignallingPort,NULL);
+ if (retCode < 0) {
+ DBG_ERROR("Unable to set Q.931 call signalling port\n");
+ DBG_LEAVE();
+ return(retStatus);
+ }
+ else {
+ DBG_TRACE("Q.931 parameters configured successfully\n");
+ retStatus = TRUE;
+ }
+ DBG_LEAVE();
+ return(retStatus);
+}
+
+
+/*
+ * StackConfigSetCountryCode
+ */
+BOOL
+StackConfigSetCountryCode(HCFG hCfg,unsigned long OAMCountryCode)
+{
+ DBG_FUNC("StackConfigSetCountryCode",H323_LAYER);
+ DBG_ENTER();
+ int CountryCode = OAMCountryCode;
+
+ char *CountryCodePath="RAS.registrationInfo.terminalType.vendor.vendor.t35CountryCode";
+ int retCode,len=100;
+ BOOL retStatus =FALSE;
+
+ retCode=ciSetValue(hCfg,CountryCodePath,FALSE,CountryCode,NULL);
+ if (retCode < 0) {
+ DBG_ERROR("Unable to set Country Code\n");
+ DBG_LEAVE();
+ return(retStatus);
+ }
+ else {
+ retStatus=TRUE;
+ }
+
+ DBG_LEAVE();
+ return(retStatus);
+}
+
+
+
+/*
+ * StackConfigSetGateKeeperAddress
+ */
+BOOL
+StackConfigSetGateKeeperAddress(HCFG hCfg,unsigned char *ipAddress, unsigned long port)
+{
+ DBG_FUNC("StackConfigSetGateKeeperAddress",H323_LAYER);
+ DBG_ENTER();
+
+ unsigned char buf[100];
+ int retCode,len=100;
+ BOOL isString,retStatus=FALSE;
+ char *gkIpAddrPath="RAS.manualDiscovery.defaultGatekeeper.ipAddress.ip";
+ char *gkIpPortPath="RAS.manualDiscovery.defaultGatekeeper.ipAddress.port";
+
+ memset(buf,0,100);
+ memcpy(buf,ipAddress,4);
+
+ retCode=ciSetValue(hCfg,gkIpAddrPath,TRUE,4,(char *)buf);
+ if (retCode < 0) {
+ DBG_ERROR("Unable to set gatekeeper ip address\n");
+ DBG_LEAVE();
+ return(retStatus);
+ }
+ memset(buf,0,100);
+ retCode=ciGetValue(hCfg,gkIpAddrPath,&isString,&len);
+ retCode=ciGetString(hCfg,gkIpAddrPath,(char *)buf,100);
+ if (retCode > 0) {
+ DBG_TRACE("Gatekeeper IP address set to %d.%d.%d.%d\n",
+ buf[0],buf[1],buf[2],buf[3]);
+ }
+
+ retCode=ciSetValue(hCfg,gkIpPortPath,FALSE,port,NULL);
+ if (retCode < 0) {
+ DBG_ERROR("Unable to set gatekeeper ip port\n");
+ DBG_LEAVE();
+ return(retStatus);
+ }
+ else {
+ retStatus=TRUE;
+ }
+ DBG_LEAVE();
+ return(retStatus);
+}
+
+
+
+
+/*
+ * ShowStackConfigSettings
+ */
+void
+ShowStackConfigSettings()
+{
+ DBG_FUNC("ShowStackConfigSettings",H323_LAYER);
+ DBG_ENTER();
+
+ BOOL isString;
+ unsigned char buf[100];
+ int len;
+ INT32 gkPort=0;
+ int ResponseTimeout=0, ConnectTimeout=0, SignallingPort=0,CountryCode=0;
+
+ HPVT hVal=cmGetValTree(pVoipTaskConfig->StackHandle);
+ int i=cmGetRASConfigurationHandle(pVoipTaskConfig->StackHandle);
+ int nodeId=pvtGetByPath(hVal,i,"manualDiscovery.defaultGatekeeper.ipAddress.ip",NULL,&len,&isString);
+ if (isString) {
+ memset(buf,0,100);
+ buf[min(99,len)]=0;
+ pvtGetString(hVal,nodeId,min(99,len),(char *)buf);
+ }
+ pvtGetByPath(hVal, i, "manualDiscovery.defaultGatekeeper.ipAddress.port", NULL, &gkPort, NULL);
+
+ DBG_TRACE("GK Address currently set to %d.%d.%d.%d, port %d\n",buf[0],buf[1],buf[2],buf[3],gkPort);
+
+ pvtGetByPath(hVal, i, "registrationInfo.terminalType.vendor.vendor.t35CountryCode", NULL, &CountryCode, NULL);
+
+ i = cmGetQ931ConfigurationHandle(pVoipTaskConfig->StackHandle);
+
+ pvtGetByPath(hVal, i, "responseTimeOut", NULL, &ResponseTimeout, NULL);
+ pvtGetByPath(hVal, i, "connectTimeOut", NULL, &ConnectTimeout, NULL);
+ pvtGetByPath(hVal, i, "callSignalingPort", NULL, &SignallingPort, NULL);
+
+ DBG_TRACE("Q.931 params:-\n responseTimeout %d ; connectTimeout %d ; callSignallingPort %d\n",
+ ResponseTimeout,ConnectTimeout,SignallingPort);
+ DBG_TRACE("Country code set to %d\n",CountryCode);
+
+ DBG_LEAVE();
+}
+
+
+
diff --git a/data/mnet/GP10/Host/voip/src/rtptask.cpp b/data/mnet/GP10/Host/voip/src/rtptask.cpp
new file mode 100644
index 0000000..bf17d87
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/src/rtptask.cpp
@@ -0,0 +1,232 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : RtpTask.cpp *
+ * *
+ * Description : All the functions pertaining to RTP *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |04/1/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+
+#include <vxworks.h>
+#include <socklib.h>
+#include <inetlib.h>
+#include <stdiolib.h>
+#include <iolib.h>
+#include <fiolib.h>
+
+#include "Os/JCTask.h"
+#include "logging\vcmodules.h"
+#include "logging\vclogging.h"
+#include "ccb.h"
+#include "voip\voipapi.h"
+#include "h323interface.h"
+#include "util.h"
+#include "rtptask.h"
+
+#ifndef LOOPBACK_MODE
+#include "csunew\csu_intf.h"
+#endif
+
+extern PH323TASK_CONFIG pVoipTaskConfig;
+extern CALL_CONTROL_BLOCK CCBArray[MAX_ACTIVE_CALLS];
+extern JCTask RTPMainTaskObj;
+
+#ifdef FAST_RTP_READ
+void RtpFastReadHandler(HJCRTPSESSION RtpHandle,unsigned char *newPacket,int packetLength,rtpParam RtpParam,void *Context);
+#endif
+
+
+/*
+ * SignalRtpTaskShutdown
+ */
+void SignalRtpTaskShutdown()
+{
+ DBG_FUNC("SignalRtpTaskShutdown",H323_RTP_LAYER);
+ DBG_ENTER();
+
+ RtpInputMessage_t Msg;
+ Msg.Type = RtpInputMessageTypeTaskShutdown;
+ DBG_LEAVE();
+ SendMessageToRtp(pVoipTaskConfig->pRtpInputPipe, &Msg );
+ return ;
+}
+
+
+
+/*
+ * RtpTask
+ */
+int RtpTask( void )
+{
+ DBG_FUNC("RTPTask",H323_RTP_LAYER);
+ DBG_ENTER();
+
+ PCALL_CONTROL_BLOCK pCCB;
+
+ pVoipTaskConfig->pRtpInputPipe = RadPipeOpen("RTPInputPipe", sizeof( RtpInputMessage_t ),
+ 30, (pfnCallBackFunction)RtpInputMessageHandler) ;
+
+ if( pVoipTaskConfig->pRtpInputPipe == NULL)
+ {
+ DBG_ERROR( "Error creating RTP Input Pipe\n" );
+ DBG_LEAVE();
+ return FALSE;
+ }
+
+ if( jcRtpInit() < 0 || jcRtcpInit() < 0 )
+ {
+ DBG_ERROR( "Error initializing RTP/RTCP layer\n" );
+ DBG_LEAVE();
+ return FALSE;
+ }
+ int Counter=0;
+
+ for(Counter=0;Counter<MAX_ACTIVE_CALLS;Counter++)
+ {
+ pCCB = &CCBArray[Counter];
+
+ pCCB->RtpHandle = jcRtpOpenEx((17000 + 2 * Counter), 1, 0xff, "JetCellBTS" );
+ ASSERT(pCCB->RtpHandle != NULL);
+ if (pCCB->RtpHandle == NULL)
+ {
+ DBG_ERROR("Could not open RTP port !!\n");
+ DBG_LEAVE();
+ return FALSE;
+ }
+ jcRtpSetEventHandler(pCCB->RtpHandle,(LPJCRTPEVENTHANDLER)RtpEventHandler,pCCB,"Voip");
+#ifdef FAST_RTP_READ
+ jcRtpSetFastReadHandler(pCCB->RtpHandle,RtpFastReadHandler);
+#endif
+ DBG_TRACE("CCB %x RTP %X\n",pCCB,pCCB->RtpHandle);
+#ifndef LOOPBACK_MODE
+ T_CSU_PORT_ID CsuPort;
+ CsuPort.portType = CSU_RTP_PORT;
+ CsuPort.portId.rtpHandler = pCCB->RtpHandle;
+ if (csu_RegSrcSnkPort(&CsuPort) != CSU_RESULT_REG_SUCCESS) {
+ DBG_ERROR("Unable to register RTP port with CSU!!\n");
+ }
+#endif
+
+ }
+
+ DBG_TRACE( "RTP Task: Initialization Successful\n" );
+ RTPMainTaskObj.JCTaskEnterLoop();
+ WAIT_FOREVER_FOR_RTP_EVENTS();
+ RTPMainTaskObj.JCTaskNormExit();
+
+ DBG_LEAVE();
+ return TRUE;
+}
+
+#ifdef LOOPBACK_MODE_FAST_RTP_READ
+void RTPFastReadHandler(HJCRTPSESSION RtpHandle,unsigned char *newPacket,
+ int packetLength,rtpParam RtpParam,VOIP_CALL_HANDLE CallHandle,T_CNI_IRT_ID MobileHandle);
+#endif
+
+
+/*
+ * RtpEventHandler
+ */
+void RtpEventHandler(HJCRTPSESSION RtpHandle,void *Context)
+{
+
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)Context;
+ ASSERT(pCCB->Magic == H323TASK_MAGIC_VALUE);
+
+ RTPEventHandler(RtpHandle, pCCB->Index, (T_CNI_IRT_ID)pCCB->LudbId);
+
+
+}
+
+
+#ifdef FAST_RTP_READ
+/*
+ * RtpFastReadHandler
+ */
+void
+RtpFastReadHandler(HJCRTPSESSION RtpHandle,unsigned char *newPacket,int packetLength,rtpParam RtpParam,void *Context)
+{
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)Context;
+
+ RTPFastReadHandler(RtpHandle,newPacket,packetLength,RtpParam,pCCB->Index,(T_CNI_IRT_ID)pCCB->LudbId);
+
+}
+#endif
+
+
+/*
+ * RtpInputMessageHandler
+ */
+void RtpInputMessageHandler(RtpInputMessage_t* pMsg )
+{
+ DBG_FUNC("RtpInputMessageHandler",H323_RTP_LAYER);
+ DBG_ENTER();
+
+ switch( pMsg->Type )
+ {
+ case RtpInputMessageTypeTaskShutdown:
+ ShutdownRtpTask();
+ break;
+ default:
+ DBG_ERROR( "Unknown message type %d\n", pMsg->Type );
+ break;
+ }
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * ShutdownRtpTask
+ */
+void ShutdownRtpTask( void )
+{
+ DBG_FUNC("ShutdownRtpTask",H323_RTP_LAYER);
+ DBG_ENTER();
+
+ int i;
+ PCALL_CONTROL_BLOCK pCCB;
+
+ DBG_TRACE("RTP Task is going down...\n");
+
+ RadPipeClose( pVoipTaskConfig->pRtpInputPipe );
+
+ for(i=0;i<MAX_ACTIVE_CALLS;i++)
+ {
+ pCCB = &CCBArray[i];
+ if (pCCB != NULL)
+ {
+ if (pCCB->RtpHandle!=NULL)
+ jcRtpClose(pCCB->RtpHandle);
+ }
+ }
+
+ jcRtcpEnd();
+ jcRtpEnd();
+
+ DBG_LEAVE();
+ exit(1);
+
+}
+
+
+
+
+
+
+
diff --git a/data/mnet/GP10/Host/voip/src/smroutines.cpp b/data/mnet/GP10/Host/voip/src/smroutines.cpp
new file mode 100644
index 0000000..45e676b
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/src/smroutines.cpp
@@ -0,0 +1,2565 @@
+
+/****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ * File : smroutines.cpp *
+ * *
+ * Description : State Machine functions/procedures *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ ****************************************************************************************
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <cm.h>
+#include <stkutils.h>
+#include <tickLib.h>
+#include <drv\timer\timerDev.h>
+#include <taskLib.h>
+
+
+#include "h323task.h"
+#include "ccb.h"
+#include "util.h"
+#include "eventhandlers.h"
+#include "rtptask.h"
+#include "smroutines.h"
+#include "voip\voipapi.h"
+#include "voip\vblink.h"
+#include "voip\jetrtp.h"
+#include "jcc\ludbapi.h"
+
+extern H323_CALL_STATE_INFO H323_CALL_STATE_TABLE[H323_MAX_CALL_STATES][H323_MAX_CALL_EVENTS];
+extern H323_CALL_STATE_INFO H323_FASTCALL_STATE_TABLE[H323_MAX_CALL_STATES][H323_MAX_CALL_EVENTS];
+extern PH323TASK_CONFIG pVoipTaskConfig;
+
+#define LOCK_H323_CALL_STATE_MACHINE() semTake(pCCB->H323CallStateMachineLock,WAIT_FOREVER)
+#define UNLOCK_H323_CALL_STATE_MACHINE() semGive(pCCB->H323CallStateMachineLock)
+
+
+
+
+
+extern CALL_CONTROL_BLOCK CCBArray[MAX_ACTIVE_CALLS];
+
+
+
+
+
+
+/*
+ * RunStateMachine : This function is the heart of the entire H.323 Task
+ */
+void
+RunStateMachine(PCALL_CONTROL_BLOCK pCCB,PVOID Context, H323_CALL_EVENT Event)
+{
+ DBG_FUNC("RunStateMachine",H323_PROTOCOL_LAYER);
+ DBG_ENTER();
+
+ PH323_CALL_STATE_INFO CallStateInfo;
+ STATUS Status;
+ H323_CALL_STATE CurrentCallState;
+
+ CurrentCallState = pCCB->H323CallState;
+
+ /* Use different state machines for FastStart & non-FastStart calls */
+ if (pCCB->FastStart) {
+ CallStateInfo = (PH323_CALL_STATE_INFO)&H323_FASTCALL_STATE_TABLE[pCCB->H323CallState][Event];
+ }
+ else {
+ CallStateInfo = (PH323_CALL_STATE_INFO)&H323_CALL_STATE_TABLE[pCCB->H323CallState][Event];
+ }
+
+
+ UpdateStateTransitionHistory(pCCB,pCCB->H323CallState,Event, CallStateInfo->NextState);
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : State Transition : Current State %s, Event %s, Next State = %s\n",
+ pCCB->MobileNumber,
+ GetH323CallStateName(pCCB->H323CallState),
+ GetH323EventName(Event),
+ GetH323CallStateName(CallStateInfo->NextState));
+
+ if (CallStateInfo->NextState != H323_CALL_STATE_SAME_STATE)
+ {
+ pCCB->PreviousCallState = CurrentCallState;
+ pCCB->CurrentEvent = Event;
+ pCCB->H323CallState = CallStateInfo->NextState;
+ }
+ Status = (*CallStateInfo->smFunc)(pCCB,Context);
+
+ if (Status != STATUS_SUCCESS)
+ {
+ DBG_ERROR("CCB 0x%x: ActionRoutine Error: Event %s in state %s",
+ pCCB,GetH323EventName(Event),
+ GetH323CallStateName(CurrentCallState));
+ DumpStateTransitionHistory(pCCB);
+ /*
+ * FIXME!!!! Got to do something here for all cases.!!
+ */
+ /*
+ * Cleanup the CCB in case of cmCallNew error
+ */
+ if ((pCCB->CurrentEvent == H323_EVENT_RECV_CC_CALL_SETUP) && (pCCB->H323CallState == H323_CALL_STATE_WAIT_FOR_PROCEEDING)) {
+ ReturnCCBToPool(pCCB);
+ }
+
+ }
+
+
+
+ DBG_LEAVE();
+}
+
+
+
+
+
+
+
+/*
+ * smCallOffering
+ */
+STATUS
+smCallOffering(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smCallOffering",H323_LAYER);
+ DBG_ENTER();
+ BOOL Status;
+ int CRV;
+ cmAlias CalledPartyAlias,CallingPartyAlias;
+ unsigned char callingNumber[256];
+ char calledNumber[256];
+ PCALL_OFFERING_DETAILS CallOfferingDetails;
+ PAPI_MESSAGE ApiMsg;
+
+ CallOfferingDetails = (PCALL_OFFERING_DETAILS)Context;
+
+ pCCB->CallDirection = H323_CALL_TERMINATED;
+ pCCB->ControlConnected = FALSE;
+
+
+ /*
+ * FIXME:: conversion !!
+ */
+
+ cmCallGetParam(pCCB->LanCallHandle,cmParamCRV,0,
+ &CRV,NULL);
+
+ pCCB->H323CRV = (unsigned short)CRV;
+
+ DBG_TRACE("H.323 Call Reference value %#x\n",pCCB->H323CRV);
+
+
+ ApiMsg = GetFreeMsgFromPool();
+ if (ApiMsg == NULL) {
+ DBG_ERROR("All API messages used up from pool!\n");
+ DBG_LEAVE();
+ return FALSE;
+ }
+ PVOIP_API_MESSAGE pMsg = (PVOIP_API_MESSAGE)&ApiMsg->VoipMsg;
+
+ pMsg->Magic = VOIP_API_MAGIC_VALUE;
+ pMsg->LudbId = pCCB->LudbId;
+ pMsg->VoipMobileHandle = ludbGetVoipMobileHandle(pCCB->LudbId);
+ pMsg->VoipCallHandle = pCCB->Index;
+ pMsg->TxnId = pCCB->LastTxnId = VOIP_API_NULL_TXN_ID;
+ pMsg->MessageType = VOIP_API_CALL_OFFERING;
+ pMsg->H323CRV = pCCB->H323CRV;
+
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : Call OFFERING\n",pCCB->MobileNumber);
+
+
+ memset(calledNumber,0,256);
+ memset(callingNumber,0,256);
+ CallingPartyAlias.string = (char*)callingNumber;
+ CallingPartyAlias.type = cmAliasTypeE164;
+ CallingPartyAlias.length = 256;
+
+ CalledPartyAlias.string = calledNumber;
+ CalledPartyAlias.type = cmAliasTypeE164;
+
+ if (cmCallGetParam(pCCB->LanCallHandle,cmParamCallingPartyNumber,0,0,(char *)&CallingPartyAlias)>=0)
+ {
+ /*
+ * Check for the Cisco special hack for presentation/screening
+ * indicators
+ */
+ if (callingNumber[0] > 127) {
+
+ strncpy(pCCB->RemotePartyId,(char*)&callingNumber[sizeof(Q931_MSG_IE_CALLING_PARTY_RES_INDICATORS)],
+ VOIP_MAX_REMOTE_PARTY_ID_LENGTH);
+
+ DBG_TRACE("Calling party number retrieved as %s\n",pCCB->RemotePartyId);
+ PQ931_MSG_IE_CALLING_PARTY_RES_INDICATORS res_ind;
+ res_ind = (PQ931_MSG_IE_CALLING_PARTY_RES_INDICATORS)&callingNumber[0];
+ pCCB->CallingPartyPI = (Q931_IE_CALLING_PARTY_NO_PI)res_ind->presentation_indicator;
+ pCCB->CallingPartySI = (Q931_IE_CALLING_PARTY_NO_SI)res_ind->screening_indicator;
+
+ }
+ else {
+ int fieldId,value;
+ BOOL isString;
+
+ strncpy(pCCB->RemotePartyId,(char*)callingNumber,VOIP_MAX_REMOTE_PARTY_ID_LENGTH);
+ DBG_TRACE("Calling party number retrieved as %s\n",pCCB->RemotePartyId);
+
+ if (pvtGetByPath(cmGetValTree(pVoipTaskConfig->StackHandle),cmGetProperty((HPROTOCOL)pCCB->LanCallHandle),
+ "setup.message.*.callingPartyNumber.octet3.presentationIndicator",&fieldId,&value,&isString) < 0) {
+ DBG_TRACE("No Presentation/Screening indicator present in calling party number : %s,\n setting to defaults\n",pCCB->RemotePartyId);
+ /*
+ * FIXME : Hardcoding PI/SI for now
+ */
+ pCCB->CallingPartyPI = Q931_IE_CALLING_PARTY_NO_PI_ALLOWED;
+ pCCB->CallingPartySI = Q931_IE_CALLING_PARTY_NO_SI_NETWORK_PROVIDED;
+ }
+ else {
+ pCCB->CallingPartyPI = (Q931_IE_CALLING_PARTY_NO_PI)value;
+ if (pvtGetByPath(cmGetValTree(pVoipTaskConfig->StackHandle),cmGetProperty((HPROTOCOL)pCCB->LanCallHandle),
+ "setup.message.*.callingPartyNumber.octet3.screeningIndicator",&fieldId,&value,&isString) < 0) {
+ DBG_TRACE("No Presentation/Screening indicator present in calling party number : %s,\n setting to defaults\n",pCCB->RemotePartyId);
+ /*
+ * FIXME : Hardcoding PI/SI for now
+ */
+ pCCB->CallingPartyPI = Q931_IE_CALLING_PARTY_NO_PI_ALLOWED;
+ pCCB->CallingPartySI = Q931_IE_CALLING_PARTY_NO_SI_NETWORK_PROVIDED;
+ }
+ else {
+ pCCB->CallingPartySI = (Q931_IE_CALLING_PARTY_NO_SI)value;
+ }
+ }
+
+ }
+
+
+ }
+ else {
+ DBG_ERROR("Mobile %s : For incoming call, failed to get Calling Party Number: %s!\n",
+ pCCB->MobileNumber,callingNumber);
+ }
+
+ if (ludbIsProvCLIP(pCCB->LudbId) && (strlen(pCCB->RemotePartyId) > 0) ) {
+
+ if (pCCB->CallingPartyPI != Q931_IE_CALLING_PARTY_NO_PI_ALLOWED) {
+ DBG_TRACE("Calling Party Presentation restricted, so not sending Clng Party Number\n");
+ pMsg->CallOffering.CallingPartyNumber.ie_present = FALSE;
+ }
+ else {
+ pMsg->CallOffering.CallingPartyNumber.ie_present = TRUE;
+ jcStringToBCD(pCCB->RemotePartyId,pMsg->CallOffering.CallingPartyNumber.digits,
+ &pMsg->CallOffering.CallingPartyNumber.numDigits);
+ }
+ }
+ else {
+ pMsg->CallOffering.CallingPartyNumber.ie_present = FALSE;
+ }
+
+
+ jcStringToBCD(pCCB->MobileNumber,pMsg->CallOffering.CalledPartyNumber.digits,
+ &pMsg->CallOffering.CalledPartyNumber.numDigits);
+
+ pMsg->CallOffering.CalledPartyNumber.ie_present = TRUE;
+
+
+ int fieldId,value;
+ BOOL isString;
+
+ if (pvtGetByPath(cmGetValTree(pVoipTaskConfig->StackHandle),cmGetProperty((HPROTOCOL)pCCB->LanCallHandle),
+ "setup.message.*.callingPartyNumber.octet3.numberingPlanIdentification",&fieldId,&value,&isString) >= 0) {
+ pCCB->CallingNumberingPlan = value;
+
+ }
+ else {
+ DBG_WARNING("Could not retrieve calling party numbering plan\n");
+ pCCB->CallingNumberingPlan = (int)Q931_IE_CALL_PARTY_NO_PLAN_ISDN;
+ }
+
+ if (pvtGetByPath(cmGetValTree(pVoipTaskConfig->StackHandle),cmGetProperty((HPROTOCOL)pCCB->LanCallHandle),
+ "setup.message.*.callingPartyNumber.octet3.typeOfNumber",&fieldId,&value,&isString) >= 0) {
+ pCCB->CallingNumberType = value;
+
+ }
+ else {
+ DBG_WARNING("Could not retrieved calling party number type\n");
+ pCCB->CallingNumberType = (int)Q931_IE_CALL_PARTY_NO_TYPE_INTERNATIONAL;
+ }
+
+
+ if (pvtGetByPath(cmGetValTree(pVoipTaskConfig->StackHandle),cmGetProperty((HPROTOCOL)pCCB->LanCallHandle),
+ "setup.message.*.calledPartyNumber.octet3.numberingPlanIdentification",&fieldId,&value,&isString) >= 0) {
+ pCCB->CalledNumberingPlan = value;
+
+ }
+ else {
+ DBG_WARNING("Could not retrieve called party numbering plan\n");
+ pCCB->CalledNumberingPlan = (int)Q931_IE_CALL_PARTY_NO_PLAN_ISDN;
+ }
+
+ if (pvtGetByPath(cmGetValTree(pVoipTaskConfig->StackHandle),cmGetProperty((HPROTOCOL)pCCB->LanCallHandle),
+ "setup.message.*.calledPartyNumber.octet3.typeOfNumber",&fieldId,&value,&isString) >= 0) {
+ pCCB->CalledNumberType = value;
+
+ }
+ else {
+ DBG_WARNING("Could not retrieved called party number type\n");
+ pCCB->CalledNumberType = (int)Q931_IE_CALL_PARTY_NO_TYPE_INTERNATIONAL;
+ }
+
+ VoipToGsmNumType((Q931_IE_CALL_PARTY_NO_TYPE)pCCB->CallingNumberType,
+ &pMsg->CallOffering.CallingPartyNumber.numberType);
+ VoipToGsmNumPlan((Q931_IE_CALL_PARTY_NO_PLAN)pCCB->CallingNumberingPlan,
+ &pMsg->CallOffering.CallingPartyNumber.numberingPlan);
+
+ VoipToGsmSI((Q931_IE_CALLING_PARTY_NO_SI)pCCB->CallingPartySI,
+ &pMsg->CallSetup.CallingPartyNumber.screeningInd);
+ VoipToGsmPI((Q931_IE_CALLING_PARTY_NO_PI)pCCB->CallingPartyPI,
+ &pMsg->CallSetup.CallingPartyNumber.presentationInd);
+
+
+ VoipToGsmNumType((Q931_IE_CALL_PARTY_NO_TYPE)pCCB->CalledNumberType,
+ &pMsg->CallOffering.CalledPartyNumber.numberType);
+ VoipToGsmNumPlan((Q931_IE_CALL_PARTY_NO_PLAN)pCCB->CalledNumberingPlan,
+ &pMsg->CallOffering.CalledPartyNumber.numberingPlan);
+
+
+ DBG_TRACE("---------- For Incoming call to Mobile %s --------\n",pCCB->MobileNumber);
+ VoipDisplayCallParties(pCCB);
+ DBG_TRACE("----------------------------------------------------\n",pCCB->MobileNumber);
+
+
+
+ pVoipTaskConfig->CallStats.CallCompletionStats.IncomingCallAttempts++;
+
+ Status=VoipSendMessageToCc(pMsg);
+
+ PutMsgIntoPool(ApiMsg);
+ if (Status != FALSE) {
+ pCCB->CanDropCall = TRUE;
+ }
+ DBG_LEAVE();
+ return (Status);
+}
+
+
+
+
+
+
+/*
+ * smCallSetup
+ */
+STATUS
+smCallSetup(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smCallSetup",H323_LAYER);
+ DBG_ENTER();
+ STATUS Status=STATUS_FAILURE;
+
+ PVOIP_API_MESSAGE pMsg = (PVOIP_API_MESSAGE)Context;
+ char subscriberName[512],CalledPartyNumber[256];
+ unsigned char NumberBuffer[256];
+ cmAlias Alias;
+ char EmergencyNumber[32];
+
+ cmTransportAddress qAddress={cmTransportTypeIP,0,1720};
+
+
+
+ memset(CalledPartyNumber,0,256);
+ memset(NumberBuffer,0,256);
+ jcBCDToString((char*)NumberBuffer, pMsg->CallSetup.CalledPartyNumber.digits,
+ pMsg->CallSetup.CalledPartyNumber.numDigits );
+ /*
+ * If this is an international number; add a + sign before the number
+ */
+ if (pMsg->CallSetup.CalledPartyNumber.numberType==CNI_RIL3_NUMBER_TYPE_INTERNATIONAL) {
+ strcpy(CalledPartyNumber,"+");
+ strcat(CalledPartyNumber,(char*)NumberBuffer);
+ }
+ else {
+ strcat(CalledPartyNumber,(char*)NumberBuffer);
+ }
+
+
+ memset(subscriberName,0,512);
+ if (!ludbGetMobileName(pCCB->LudbId,subscriberName)) {
+ /*
+ * DBG_WARNING("Unable to retrieve subscriber name from ludb!!\n");
+ */
+ strcpy(subscriberName,"Cisco GP-10");
+ }
+
+ if (!ludbGetMobileNumber(pCCB->LudbId,pCCB->MobileNumber)) {
+ DBG_ERROR("Unable to get mobile no from ludb !!!\n");
+ /*strcpy(pCCB->MobileNumber,"911");*/
+ }
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : Call SETUP to %s requested\n",pCCB->MobileNumber,CalledPartyNumber);
+
+ strncpy(pCCB->RemotePartyId,CalledPartyNumber,VOIP_MAX_REMOTE_PARTY_ID_LENGTH);
+
+ if(cmCallNew( pVoipTaskConfig->StackHandle, (HAPPCALL)pCCB, &pCCB->LanCallHandle) < 0)
+ {
+ DBG_ERROR("Error in cmCallNew()\n");
+ pMsg->MessageType = VOIP_API_CALL_EVENT;
+ pMsg->H323CRV = pCCB->H323CRV;
+ pMsg->CallEvent.CallEvent = VOIP_MOBILE_CALL_EVENT_DISCONNECTED;
+ pMsg->CallEvent.ReasonCode = Q850_CAUSE_PROTOCOL_ERROR_UNSPECIFIED;
+ Status=VoipSendMessageToCc(pMsg);
+ DBG_LEAVE();
+ return Status;
+ }
+
+ pCCB->ControlConnected = FALSE;
+
+ sseCreateCall(pVoipTaskConfig->SuppStackHandle,&(pCCB->SuppCallHandle),(HSSEAPPCALL)pCCB,
+ pCCB->LanCallHandle);
+ sseCallImplementTransfer(pCCB->SuppCallHandle,TRUE);
+ sseCallImplementForward(pCCB->SuppCallHandle);
+
+
+
+ pVoipTaskConfig->CallStats.CallCompletionStats.OutgoingCallAttempts++;
+
+ pCCB->CallDirection = H323_CALL_ORIGINATED;
+
+ /*
+ * Setup call-signalling address
+ */
+ qAddress.ip=inet_addr(pVoipTaskConfig->szGatekeeperAddress);
+
+ cmCallSetParam(pCCB->LanCallHandle,cmParamDestinationIpAddress,0,sizeof(cmTransportAddress),(char*)&qAddress);
+
+ cmCallSetParam(pCCB->LanCallHandle,cmParamDestCallSignalAddress,0,sizeof(cmTransportAddress),(char*)&qAddress);
+
+ cmCallSetParam(pCCB->LanCallHandle,cmParamInformationTransferCapability,0,cmITCSpeech, 0);
+
+
+ /*
+ * Setup CALLED PARTY number
+ */
+ memset(&Alias,0,sizeof(cmAlias));
+ Alias.type = cmAliasTypeE164;
+
+ if (pMsg->CallSetup.IsEmergencyCall) {
+ /*
+ * For emergency call we set the number to a null-terminated string of 30 zeros;
+ * which ViperBase will recognize and map to appropriate local emergency number
+ * This number is theoretically not possible in GSM
+ */
+ memset(EmergencyNumber,'0',30);
+ EmergencyNumber[30] = 0;
+ Alias.string = EmergencyNumber;
+ Alias.length = strlen(EmergencyNumber);
+ cmCallSetParam( pCCB->LanCallHandle, cmParamCalledPartyNumber,0,0, (char*)&Alias );
+ }
+ else {
+ Alias.string = CalledPartyNumber;
+ Alias.length = strlen(CalledPartyNumber);
+ cmCallSetParam( pCCB->LanCallHandle, cmParamCalledPartyNumber,0,0, (char*)&Alias );
+ }
+
+ GsmToVoipNumType(pMsg->CallSetup.CalledPartyNumber.numberType,
+ (Q931_IE_CALL_PARTY_NO_TYPE*)&pCCB->CalledNumberType);
+ GsmToVoipNumPlan(pMsg->CallSetup.CalledPartyNumber.numberingPlan,
+ (Q931_IE_CALL_PARTY_NO_PLAN*)&pCCB->CalledNumberingPlan);
+
+
+
+
+ /*
+ * Setup CALLING PARTY number
+ */
+ memset(NumberBuffer,0,256);
+
+ strcpy((char*)NumberBuffer,pCCB->MobileNumber);
+
+ //CLIR <xxu:07-26-01>
+ /*
+ * Check for CLIR provisioning
+ */
+ //if (!ludbIsProvCLIR(pCCB->LudbId)) {
+ // pMsg->CallSetup.CallingPartyNumber.presentationInd = CNI_RIL3_PRESENTATION_ALLOWED;
+ //}
+ //else {
+ // pMsg->CallSetup.CallingPartyNumber.presentationInd = CNI_RIL3_PRESENTATION_RESTRICTED;
+ //}
+ if ( (pMsg->CallSetup.clir.ie_present) && (!pMsg->CallSetup.IsEmergencyCall) )
+ pMsg->CallSetup.CallingPartyNumber.presentationInd = pMsg->CallSetup.clir.clirSetting;
+
+
+ /*
+ * These values are not filled by CC/RIL3, so we need to hardcode it for now...
+ */
+ pMsg->CallSetup.CallingPartyNumber.screeningInd = CNI_RIL3_SCREENING_NETWORK_PROVIDED;
+ pMsg->CallSetup.CallingPartyNumber.numberingPlan = CNI_RIL3_NUMBERING_PLAN_ISDN_TELEPHONY;
+ pMsg->CallSetup.CallingPartyNumber.numberType = CNI_RIL3_NUMBER_TYPE_INTERNATIONAL;
+
+ GsmToVoipNumType(pMsg->CallSetup.CallingPartyNumber.numberType,
+ (Q931_IE_CALL_PARTY_NO_TYPE*)&pCCB->CallingNumberType);
+ GsmToVoipNumPlan(pMsg->CallSetup.CallingPartyNumber.numberingPlan,
+ (Q931_IE_CALL_PARTY_NO_PLAN*)&pCCB->CallingNumberingPlan);
+
+ GsmToVoipPI(pMsg->CallSetup.CallingPartyNumber.presentationInd,
+ (Q931_IE_CALLING_PARTY_NO_PI*)&pCCB->CallingPartyPI);
+ GsmToVoipSI(pMsg->CallSetup.CallingPartyNumber.screeningInd,
+ (Q931_IE_CALLING_PARTY_NO_SI*)&pCCB->CallingPartySI);
+
+
+
+ memset(&Alias,0,sizeof(cmAlias));
+ Alias.type = cmAliasTypeE164;
+ Alias.string = (char*)NumberBuffer;
+ Alias.length = strlen((char*)NumberBuffer);
+
+ cmCallSetParam( pCCB->LanCallHandle, cmParamCallingPartyNumber,1,0, (char*)&Alias );
+
+
+ int count=0;
+ for(count=0;count<3;count++) {
+ if (pMsg->CallSetup.bearerCap.speechVersionInd[count].fieldPresent) {
+ if (pMsg->CallSetup.bearerCap.speechVersionInd[count].version == CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1) {
+ pCCB->GSMFullRateCapability=TRUE;
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : supports GSM FR codec \n",pCCB->MobileNumber);
+ }
+ if (pMsg->CallSetup.bearerCap.speechVersionInd[count].version == CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_2) {
+ pCCB->GSMEnhancedFullRateCapability=TRUE;
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : supports GSM EFR codec \n",pCCB->MobileNumber);
+ }
+ }
+
+ }
+
+ if ((pCCB->GSMFullRateCapability==FALSE) && (pCCB->GSMEnhancedFullRateCapability==FALSE)) {
+ DBG_ERROR("Error : No GSM Codec capabilities specified by Mobile %s while trying to make call\n",
+ pCCB->MobileNumber);
+ pMsg->MessageType = VOIP_API_CALL_EVENT;
+ pMsg->CallEvent.CallEvent = VOIP_MOBILE_CALL_EVENT_DISCONNECTED;
+ pMsg->CallEvent.ReasonCode = Q850_CAUSE_PROTOCOL_ERROR_UNSPECIFIED;
+ pMsg->H323CRV = pCCB->H323CRV;
+ Status=VoipSendMessageToCc(pMsg);
+ return Status;
+ }
+
+ DBG_TRACE("---------- For Outgoing call from Mobile %s --------\n",pCCB->MobileNumber);
+ VoipDisplayCallParties(pCCB);
+ DBG_TRACE("----------------------------------------------------\n",pCCB->MobileNumber);
+
+
+ pCCB->FastStart = TRUE; /* Always try FastStart first*/
+
+ if(cmCallDial(pCCB->LanCallHandle) < 0 )
+ {
+ DBG_ERROR("Error in cmCallMake()\n" );
+ pMsg->MessageType = VOIP_API_CALL_EVENT;
+ pMsg->CallEvent.CallEvent = VOIP_MOBILE_CALL_EVENT_DISCONNECTED;
+ pMsg->CallEvent.ReasonCode = Q850_CAUSE_PROTOCOL_ERROR_UNSPECIFIED;
+ pMsg->H323CRV = pCCB->H323CRV;
+ Status=VoipSendMessageToCc(pMsg);
+ return Status;
+ }
+ else
+ {
+ Status = STATUS_SUCCESS;
+ }
+
+
+ pCCB->CanDropCall = TRUE;
+
+ /* DumpCCBAndRtp(); */
+ DBG_LEAVE();
+ return Status;
+}
+
+
+
+/*
+ * smSetupFastChannels
+ */
+STATUS
+smSetupFastChannels(PCALL_CONTROL_BLOCK pCCB)
+{
+ DBG_FUNC("smSetupFastChannels",H323_LAYER);
+ DBG_ENTER();
+ int FastStartStatus=0;
+ STATUS Status=STATUS_FAILURE;
+ cmFastStartMessage fsMessage, *t;
+
+
+ fsMessage.partnerChannelsNum=1;
+
+
+ fsMessage.partnerChannels[0].transmit.channels[0].rtp.port = jcRtpGetPort(pCCB->RtpHandle);
+ fsMessage.partnerChannels[0].transmit.channels[0].rtp.ip = 0;
+ fsMessage.partnerChannels[0].transmit.channels[0].rtcp.port = jcRtpGetPort(pCCB->RtpHandle) + 1;
+ fsMessage.partnerChannels[0].transmit.channels[0].rtcp.ip = 0;
+ fsMessage.partnerChannels[0].transmit.channels[0].dataTypeHandle = -1;
+
+
+ fsMessage.partnerChannels[0].receive.channels[0].rtp.port = jcRtpGetPort(pCCB->RtpHandle);
+ fsMessage.partnerChannels[0].receive.channels[0].rtp.ip = 0;
+ fsMessage.partnerChannels[0].receive.channels[0].rtcp.port = jcRtpGetPort(pCCB->RtpHandle)+1;
+ fsMessage.partnerChannels[0].receive.channels[0].rtcp.ip = 0;
+ fsMessage.partnerChannels[0].receive.channels[0].dataTypeHandle = -1;
+
+
+
+ /*
+ * There are three possibilities here, MS supports :-
+ * * FR only
+ * * EFR only, or
+ * * both FR & EFR [with neither FR nor EFR case being filtered out during smCallSetup]
+ */
+
+
+ if ( (pCCB->GSMFullRateCapability == TRUE) && (pCCB->GSMEnhancedFullRateCapability == FALSE)) {
+ /* Supports FR only */
+ fsMessage.partnerChannels[0].receive.channels[0].channelName = "gsmFullRate";
+ fsMessage.partnerChannels[0].transmit.channels[0].channelName = "gsmFullRate";
+ fsMessage.partnerChannels[0].transmit.altChannelNumber = 1;
+ fsMessage.partnerChannels[0].receive.altChannelNumber = 1;
+ }
+ else if ( (pCCB->GSMFullRateCapability == FALSE) && (pCCB->GSMEnhancedFullRateCapability == TRUE)) {
+ /* Supports EFR only */
+ fsMessage.partnerChannels[0].receive.channels[0].channelName = "gsmEnhancedFullRate";
+ fsMessage.partnerChannels[0].transmit.channels[0].channelName = "gsmEnhancedFullRate";
+ fsMessage.partnerChannels[0].transmit.altChannelNumber = 1;
+ fsMessage.partnerChannels[0].receive.altChannelNumber = 1;
+ }
+ else if ( (pCCB->GSMFullRateCapability == TRUE) && (pCCB->GSMEnhancedFullRateCapability == TRUE)) {
+ /* Supports BOTH FR & EFR */
+ fsMessage.partnerChannels[0].receive.channels[0].channelName = "gsmFullRate";
+ fsMessage.partnerChannels[0].transmit.channels[0].channelName = "gsmFullRate";
+
+ fsMessage.partnerChannels[0].transmit.altChannelNumber=2;
+
+ fsMessage.partnerChannels[0].transmit.channels[1].rtp.port = jcRtpGetPort(pCCB->RtpHandle);
+ fsMessage.partnerChannels[0].transmit.channels[1].rtp.ip = 0;
+ fsMessage.partnerChannels[0].transmit.channels[1].rtcp.port = jcRtpGetPort(pCCB->RtpHandle)+1;
+ fsMessage.partnerChannels[0].transmit.channels[1].rtcp.ip = 0;
+ fsMessage.partnerChannels[0].transmit.channels[1].dataTypeHandle= -1;
+ fsMessage.partnerChannels[0].transmit.channels[1].channelName = "gsmEnhancedFullRate";
+
+
+ fsMessage.partnerChannels[0].receive.altChannelNumber=2;
+
+ fsMessage.partnerChannels[0].receive.channels[1].rtp.port = jcRtpGetPort(pCCB->RtpHandle);
+ fsMessage.partnerChannels[0].receive.channels[1].rtp.ip = 0;
+ fsMessage.partnerChannels[0].receive.channels[1].rtcp.port = jcRtpGetPort(pCCB->RtpHandle)+1;
+ fsMessage.partnerChannels[0].receive.channels[1].rtcp.ip = 0;
+ fsMessage.partnerChannels[0].receive.channels[1].dataTypeHandle = -1;
+ fsMessage.partnerChannels[0].receive.channels[1].channelName = "gsmEnhancedFullRate";
+
+ }
+
+ fsMessage.partnerChannels[0].type = cmCapAudio;
+
+ t = &fsMessage;
+
+
+ if ((FastStartStatus=cmFastStartOpenChannels(pCCB->LanCallHandle,&fsMessage)) < 0) {
+ DBG_ERROR("Error opening fast start channels; status %d, call handle %x!!!!\n",
+ FastStartStatus,pCCB);
+ }
+ else {
+ DBG_TRACE("FastStart channels opened successfully\n");
+ if (pCCB->IsSuppCall) {
+ cmAlias Alias;
+ memset(&Alias,0,sizeof(Alias));
+ Alias.type = cmAliasTypeE164;
+ /* cc note, use the original party, instead of the transferring party */
+ Alias.string = (char *)pCCB->MobileNumber;
+ Alias.length = strlen(pCCB->MobileNumber);
+ /*
+ Alias.string = (char *)pCCB->TransferringPartyId;
+ Alias.length = strlen(pCCB->TransferringPartyId);
+ */
+ cmCallSetParam(pCCB->LanCallHandle,cmParamCallingPartyNumber,1,0,(char*)&Alias);
+
+ char CalledPartyNumber[256];
+
+ memset(CalledPartyNumber,0,256);
+ Alias.string = CalledPartyNumber;
+
+ if( cmCallGetParam(pCCB->LanCallHandle, cmParamCalledPartyNumber, 0, NULL, (char*)&Alias ) < 0 ||
+ Alias.length <= 0 ) {
+ if( cmCallGetParam(pCCB->LanCallHandle, cmParamDestinationAddress, 0, NULL, (char*)&Alias ) < 0 ||
+ Alias.length <= 0 ) {
+ DBG_WARNING("Could not copy DestinationAddress to CalledParty Number for transferred call\n");
+ }
+ else {
+ cmCallSetParam(pCCB->LanCallHandle,cmParamCalledPartyNumber,1,0,(char*)&Alias);
+ DBG_TRACE("Copied DestinationAddress to CalledPartyNumber %s\n",CalledPartyNumber);
+ /* cc note , update the remote party number*/
+ { /* remote party should be the called party number*/
+ /*
+ DBG_TRACE("Call transfer: local is %s, remote is \n",
+ pCCB->MobileNumber,
+ pCCB->RemotePartyId);
+ */
+ strcpy(pCCB->RemotePartyId,CalledPartyNumber);
+ }
+ }
+
+ }
+
+ }
+ else {
+ DBG_TRACE("Regular setup\n");
+ }
+
+ /*
+ * Set the calling party number types/plan and presentation/screening indicators here
+ * this is because even if it a transferred call it will execute the code below
+ */
+ if (pvtBuildByPath(cmGetValTree(pVoipTaskConfig->StackHandle),cmGetProperty((HPROTOCOL)pCCB->LanCallHandle),
+ "setup.message.*.callingPartyNumber.octet3.presentationIndicator",pCCB->CallingPartyPI,NULL) < 0)
+ {
+ DBG_WARNING("Could not set calling party # presentation indicator\n");
+ }
+
+ if (pvtBuildByPath(cmGetValTree(pVoipTaskConfig->StackHandle),cmGetProperty((HPROTOCOL)pCCB->LanCallHandle),
+ "setup.message.*.callingPartyNumber.octet3.screeningIndicator",
+ pCCB->CallingPartySI,NULL) < 0)
+ {
+ DBG_WARNING("Could not set calling party # screening indicator\n");
+ }
+ else {
+ DBG_TRACE("Set the Calling Party Screening Indicator to %d value\n",pCCB->CallingPartySI);
+ }
+
+
+ if (pvtBuildByPath(cmGetValTree(pVoipTaskConfig->StackHandle),cmGetProperty((HPROTOCOL)pCCB->LanCallHandle),
+ "setup.message.*.callingPartyNumber.octet3.typeOfNumber",pCCB->CallingNumberType,NULL) < 0)
+ {
+ DBG_WARNING("Could not set calling party # number type \n");
+ }
+
+ if (pvtBuildByPath(cmGetValTree(pVoipTaskConfig->StackHandle),cmGetProperty((HPROTOCOL)pCCB->LanCallHandle),
+ "setup.message.*.callingPartyNumber.octet3.numberingPlanIdentification",pCCB->CallingNumberingPlan,NULL) < 0)
+ {
+ DBG_WARNING("Could not set calling party # numbering plan\n");
+ }
+
+ if (pvtBuildByPath(cmGetValTree(pVoipTaskConfig->StackHandle),cmGetProperty((HPROTOCOL)pCCB->LanCallHandle),
+ "setup.message.*.calledPartyNumber.octet3.typeOfNumber",pCCB->CalledNumberType,NULL) < 0)
+ {
+ DBG_WARNING("Could not set calling party # number type \n");
+ }
+
+ if (pvtBuildByPath(cmGetValTree(pVoipTaskConfig->StackHandle),cmGetProperty((HPROTOCOL)pCCB->LanCallHandle),
+ "setup.message.*.calledPartyNumber.octet3.numberingPlanIdentification",pCCB->CalledNumberingPlan,NULL) < 0)
+ {
+ DBG_WARNING("Could not set calling party # numbering plan\n");
+ }
+
+
+ Status = STATUS_SUCCESS;
+ }
+
+ pCCB->FastStart = FALSE;
+
+ DBG_LEAVE();
+ return (Status);
+
+}
+
+
+
+
+/*
+ * smDropCall
+ */
+STATUS
+smDropCall(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smDropCall",H323_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_SUCCESS;
+ PVOIP_API_MESSAGE pMsg = (PVOIP_API_MESSAGE)Context;
+ int Q850CauseCode;
+
+
+ pCCB->CanDropCall = FALSE;
+
+ pCCB->LocalRelease = TRUE;
+
+ if(pMsg->CallRelease.cause >= Q850_MAX_CAUSES) {
+ DBG_ERROR("Invalid disconnect cause %d specified!!\n",pMsg->CallRelease.cause);
+ Q850CauseCode = Q850_CAUSE_PROTOCOL_ERROR_UNSPECIFIED;
+ }
+ else {
+ Q850CauseCode = pMsg->CallRelease.cause;
+ }
+
+ pVoipTaskConfig->CallStats.CallDisconnectStats.MobileDisconnects[Q850CauseCode]++;
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : Dropping call, cause %d : %s\n",
+ pCCB->MobileNumber,Q850CauseCode,GetQ850CauseCodeName(Q850CauseCode));
+
+ cmCallSetParam(pCCB->LanCallHandle,cmParamReleaseCompleteCause,0,Q850CauseCode,NULL);
+
+ cmCallDrop(pCCB->LanCallHandle);
+
+
+ if (pCCB->InChannelHandle != NULL)
+ cmChannelDrop(pCCB->InChannelHandle);
+
+ if (pCCB->OutChannelHandle != NULL)
+ cmChannelDrop(pCCB->OutChannelHandle);
+
+ DBG_LEAVE();
+ return Status;
+}
+
+
+/*
+ * smAnswerCall
+ */
+STATUS
+smAnswerCall(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smAnswerCall",H323_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_SUCCESS;
+
+ char Display[256],CalledParty[256];
+
+ memset(CalledParty,0,256);
+ memset(Display,0,256);
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : Answering incoming call\n",pCCB->MobileNumber);
+
+ strcpy(Display,"ViperCell");
+ sprintf(CalledParty,"NAME:%s,TEL:%s,",pCCB->MobileNumber,"ViperCell");
+
+ cmCallAnswerExt(pCCB->LanCallHandle ,Display,CalledParty,strlen(CalledParty));
+
+ DBG_LEAVE();
+ return Status;
+}
+
+/*
+ * smCallConnected
+ */
+STATUS
+smCallConnected(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smCallConnected",H323_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_SUCCESS;
+ char id[255];
+
+ /*
+ * Cleanup the RTP counters
+ */
+ RtpResetSessionCounters(pCCB->RtpHandle);
+
+ memset(id,0,255);
+ cmCallGetDisplayInfo(pCCB->LanCallHandle,id,255);
+ strcpy(pCCB->DisplayInfo,id);
+
+ pCCB->LocalRelease = FALSE;
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : Q.931 connected on call\n",pCCB->MobileNumber);
+
+ if ( (pCCB->CallDirection == H323_CALL_ORIGINATED) && (!pCCB->FastStart) ){
+
+ /*
+ * In this case we will assume for now that the remote endpoint supports
+ * only the codec that our endpoint supports and carry on, and in case
+ * we find out through H.245 that the remote does not, we will drop the
+ * call : DineshN
+ */
+ if (pCCB->GSMEnhancedFullRateCapability)
+ {
+ if (pVoipTaskConfig->DefaultCodecGsmFullRate) {
+ DBG_TRACE("Remote is Non-FastStart endpoint, defaulting to FullRate codec\n");
+ pCCB->RemoteGSMFullRateCapability=TRUE;
+ pCCB->CodecUsed = VOIP_CALL_CODEC_GSM_FR;
+ }
+ else {
+ DBG_TRACE("Remote is Non-FastStart endpoint, defaulting to EnhancedFullRate codec\n");
+ pCCB->RemoteGSMEnhancedFullRateCapability=TRUE;
+ pCCB->CodecUsed = VOIP_CALL_CODEC_GSM_EFR;
+ }
+ }
+ else if (pCCB->GSMFullRateCapability) {
+ pCCB->RemoteGSMFullRateCapability=TRUE;
+ pCCB->CodecUsed = VOIP_CALL_CODEC_GSM_FR;
+ }
+ else {
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(0);
+#endif
+ DBG_ERROR("Local Mobile %s reported invalid codecs\n",pCCB->MobileNumber);
+ return STATUS_FAILURE;
+ }
+
+ SendCodecInfo(pCCB);
+ }
+
+ pCCB->Q931Connected = TRUE;
+
+ if ((pCCB->CallDirection == H323_CALL_ORIGINATED) && (pCCB->OutChannelConnected)){
+ PAPI_MESSAGE ApiMsg;
+ ApiMsg = GetFreeMsgFromPool();
+ if (ApiMsg == NULL) {
+ DBG_ERROR("All API messages used up from pool!\n");
+ DBG_LEAVE();
+ return FALSE;
+ }
+ PVOIP_API_MESSAGE pMsg = (PVOIP_API_MESSAGE)&ApiMsg->VoipMsg;
+
+ pMsg->Magic = VOIP_API_MAGIC_VALUE;
+ pMsg->H323CRV = pCCB->H323CRV;
+ pMsg->LudbId = pCCB->LudbId;
+ pMsg->VoipMobileHandle = ludbGetVoipMobileHandle(pCCB->LudbId);
+ pMsg->VoipCallHandle = pCCB->Index;
+ pMsg->TxnId = pCCB->LastTxnId;
+ pMsg->MessageType = VOIP_API_CALL_EVENT;
+ pMsg->CallEvent.CallEvent = VOIP_MOBILE_CALL_EVENT_CONNECTED;
+ DBG_TRACE("Mobile %s: Sending Call Connected to CC\n",pCCB->MobileNumber);
+ if (!pCCB->IsSuppCall)
+ Status=VoipSendMessageToCc(pMsg);
+ PutMsgIntoPool(ApiMsg);
+
+ if (pCCB->FastStart) {
+ /* Lets try out this hack for now */
+ if (!pCCB->ControlConnected) {
+ cmCallConnectControl(pCCB->LanCallHandle);
+ pCCB->ControlConnected = TRUE;
+ }
+ }
+
+ }
+
+ DBG_LEAVE();
+ return Status;
+}
+
+
+
+/*
+ * smCallDisconnected
+ */
+STATUS
+smCallDisconnected(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smCallDisconnected",H323_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_SUCCESS;
+
+
+
+ if (pCCB->CallTransferred) {
+ DBG_LEAVE();
+ return (Status);
+ }
+
+ PAPI_MESSAGE ApiMsg;
+ ApiMsg = GetFreeMsgFromPool();
+ if (ApiMsg == NULL) {
+ DBG_ERROR("All API messages used up from pool!\n");
+ DBG_LEAVE();
+ return FALSE;
+ }
+ PVOIP_API_MESSAGE pMsg = (PVOIP_API_MESSAGE)&ApiMsg->VoipMsg;
+
+ pCCB->CanDropCall = FALSE;
+
+ /*
+ * Depending upon the state we are in, we
+ * may need to perform additional cleanup functions
+ */
+ if(pCCB->H323CallState==H323_CALL_STATE_WAIT_FOR_CC_ANSWER)
+ {
+ DBG_TRACE("Call offering followed by disconnect, sending null txn id\n");
+ pCCB->LastTxnId = VOIP_API_NULL_TXN_ID;
+ }
+ else {
+ DBG_TRACE("Regular disconnect\n");
+ }
+
+ unsigned char *DisconnectReason = (unsigned char *)Context;
+
+
+ /*
+ * If this is a transfer attempt which failed,
+ * we need to inform CC to swap back to the orignal
+ * VOIP call handle
+ */
+ if (pCCB->IsSuppCall) {
+ PCALL_CONTROL_BLOCK pOrigCCB = &CCBArray[pCCB->OldIndex];
+ /*
+ * If the original call-leg is still up, we swap the handles
+ */
+ if ((pOrigCCB->CallTransferred) && (pOrigCCB->H323CallState == H323_CALL_STATE_CHANNELS_CONNECTED)) {
+
+ pMsg->Magic = VOIP_API_MAGIC_VALUE;
+ pMsg->H323CRV = pCCB->H323CRV;
+ pMsg->LudbId = pCCB->LudbId;
+ pMsg->VoipMobileHandle = ludbGetVoipMobileHandle(pCCB->LudbId);
+ pMsg->VoipCallHandle = pCCB->Index;
+ pMsg->TxnId = pCCB->LastTxnId;
+ pMsg->MessageType = VOIP_API_CALL_UPDATE_HANDLES;
+ pMsg->CallUpdateHandles.NewHandle = pCCB->OldIndex;
+ pMsg->CallUpdateHandles.ReconnectOnTransferFailure = TRUE;
+ Status=VoipSendMessageToCc(pMsg);
+ PutMsgIntoPool(ApiMsg);
+ pCCB->Q931Connected = FALSE;
+ DBG_TRACE("Mobile %s : Transfer attempt callleg disconnected, reverting to old Callleg\n",pCCB->MobileNumber);
+ pCCB->IsSuppCall = FALSE;
+ pOrigCCB->CallTransferred = FALSE;
+ DBG_LEAVE();
+ return(Status);
+ }
+
+ }
+
+ pMsg->TxnId = pCCB->LastTxnId;
+ pMsg->Magic = VOIP_API_MAGIC_VALUE;
+ pMsg->H323CRV = pCCB->H323CRV;
+ pMsg->LudbId = pCCB->LudbId;
+ pMsg->VoipMobileHandle = ludbGetVoipMobileHandle(pCCB->LudbId);
+ pMsg->VoipCallHandle = pCCB->Index;
+ pMsg->MessageType = VOIP_API_CALL_EVENT;
+ pMsg->CallEvent.CallEvent = VOIP_MOBILE_CALL_EVENT_DISCONNECTED;
+ pMsg->CallEvent.ReasonCode = (unsigned char)*DisconnectReason;
+
+ /*
+ * CC does NOT need this message if it is locally initiated drop
+ */
+ if (pCCB->LocalRelease != TRUE) {
+ Status=VoipSendMessageToCc(pMsg);
+ }
+
+ PutMsgIntoPool(ApiMsg);
+
+ pCCB->Q931Connected = FALSE;
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : Call disconnected\n",pCCB->MobileNumber);
+
+ DBG_LEAVE();
+ return(Status);
+}
+
+
+
+
+/*
+ * smCallProceeding
+ */
+STATUS
+smCallProceeding(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smCallProceeding",H323_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_SUCCESS;
+ int CRV;
+
+ cmCallGetParam(pCCB->LanCallHandle,cmParamCRV,0,
+ &CRV,NULL);
+
+ pCCB->H323CRV = (unsigned short)CRV;
+ DBG_CALL_TRACE((unsigned long)pCCB,"H.32\3 Call Reference value %#x\n",pCCB->H323CRV);
+ DBG_TRACE("H.323 Call Reference value %#x\n",pCCB->H323CRV);
+
+ PAPI_MESSAGE ApiMsg;
+ ApiMsg = GetFreeMsgFromPool();
+ if (ApiMsg == NULL) {
+ DBG_ERROR("All API messages used up from pool!\n");
+ DBG_LEAVE();
+ return FALSE;
+ }
+ PVOIP_API_MESSAGE pMsg = (PVOIP_API_MESSAGE)&ApiMsg->VoipMsg;
+
+ pMsg->Magic = VOIP_API_MAGIC_VALUE;
+ pMsg->H323CRV = pCCB->H323CRV;
+ pMsg->LudbId = pCCB->LudbId;
+ pMsg->VoipMobileHandle = ludbGetVoipMobileHandle(pCCB->LudbId);
+ pMsg->VoipCallHandle = pCCB->Index;
+ pMsg->TxnId = pCCB->LastTxnId;
+ pMsg->MessageType = VOIP_API_CALL_EVENT;
+ pMsg->CallEvent.CallEvent = VOIP_MOBILE_CALL_EVENT_PROCEEDING;
+ if (!pCCB->IsSuppCall)
+ Status=VoipSendMessageToCc(pMsg);
+
+ PutMsgIntoPool(ApiMsg);
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : <-- Q.931 PROCEEDING received\n",pCCB->MobileNumber);
+
+ DBG_LEAVE();
+ return Status;
+}
+
+
+
+
+
+
+/*
+ * smCallRingBack
+ */
+STATUS
+smCallRingBack(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smCallRingBack",H323_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_SUCCESS;
+ int fieldId,value;
+ BOOL isString;
+ PAPI_MESSAGE ApiMsg;
+
+
+ ApiMsg = GetFreeMsgFromPool();
+ if (ApiMsg == NULL) {
+ DBG_ERROR("All API messages used up from pool!\n");
+ DBG_LEAVE();
+ return FALSE;
+ }
+ PVOIP_API_MESSAGE pMsg = (PVOIP_API_MESSAGE)&ApiMsg->VoipMsg;
+
+ pCCB->InBandInfo = FALSE;
+
+ /*
+ * Check the alerting msg to see if progress IE is present along with description;
+ * and if the description indicates inband-information; we gotta be ready...
+ */
+ if (pvtGetByPath(cmGetValTree(pVoipTaskConfig->StackHandle),cmGetProperty((HPROTOCOL)pCCB->LanCallHandle),
+ "alerting.message.*.progressIndicator.octet4.ext",&fieldId,&value,&isString) < 0)
+ {
+ DBG_TRACE("Could not get Progress Indicator in Alerting msg : octet4.ext bit is not set\n");
+ }
+ else {
+ /* octet4.progressDescription */
+ if (pvtGetByPath(cmGetValTree(pVoipTaskConfig->StackHandle),cmGetProperty((HPROTOCOL)pCCB->LanCallHandle),
+ "alerting.message.*.progressIndicator.octet4.progressDescription",&fieldId,&value,&isString) < 0)
+ {
+ DBG_WARNING("Could not get Progress Indicator description in Alerting msg\n");
+ }
+ else {
+ if (value = Q931_IE_PROGRESS_DESC_INBAND_INFO) {
+ DBG_TRACE("Received in-band information indication via Progress IE\n");
+ pCCB->InBandInfo = TRUE;
+ }
+ }
+ }
+
+ if (pCCB->InBandInfo) {
+ pMsg->CallEvent.EventInfo.AlertingProgressIE.ie_present = TRUE;
+ pMsg->CallEvent.EventInfo.AlertingProgressIE.codingStandard = CNI_RIL3_GSMPLMN_CODING;
+ pMsg->CallEvent.EventInfo.AlertingProgressIE.location = CNI_RIL3_LOCATION_PUBLIC_NETWORK_LOCAL_USER;
+ pMsg->CallEvent.EventInfo.AlertingProgressIE.progressDesp = CNI_RIL3_PROGRESS_IN_BAND_INFO_AVAILABLE;
+ }
+ else {
+ pMsg->CallEvent.EventInfo.AlertingProgressIE.ie_present = FALSE;
+ }
+
+ pMsg->Magic = VOIP_API_MAGIC_VALUE;
+ pMsg->H323CRV = pCCB->H323CRV;
+ pMsg->LudbId = pCCB->LudbId;
+ pMsg->VoipMobileHandle = ludbGetVoipMobileHandle(pCCB->LudbId);
+ pMsg->VoipCallHandle = pCCB->Index;
+ pMsg->TxnId = pCCB->LastTxnId;
+ pMsg->MessageType = VOIP_API_CALL_EVENT;
+ pMsg->CallEvent.CallEvent = VOIP_MOBILE_CALL_EVENT_ALERTING;
+ Status=VoipSendMessageToCc(pMsg);
+
+ PutMsgIntoPool(ApiMsg);
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : <-- Q.931 ALERTING received\n",pCCB->MobileNumber);
+
+ DBG_LEAVE();
+ return Status;
+}
+
+
+
+
+/*
+ * smDestinationRejected
+ */
+STATUS
+smCallDestinationRejected(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smCallDestinationRejected",H323_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_SUCCESS;
+
+ PAPI_MESSAGE ApiMsg;
+ ApiMsg = GetFreeMsgFromPool();
+ if (ApiMsg == NULL) {
+ DBG_ERROR("All API messages used up from pool!\n");
+ DBG_LEAVE();
+ return FALSE;
+ }
+ PVOIP_API_MESSAGE pMsg = (PVOIP_API_MESSAGE)&ApiMsg->VoipMsg;
+
+ pMsg->Magic = VOIP_API_MAGIC_VALUE;
+ pMsg->H323CRV = pCCB->H323CRV;
+ pMsg->LudbId = pCCB->LudbId;
+ pMsg->VoipMobileHandle = ludbGetVoipMobileHandle(pCCB->LudbId);
+ pMsg->VoipCallHandle = pCCB->Index;
+ pMsg->TxnId = pCCB->LastTxnId;
+ pMsg->MessageType = VOIP_API_CALL_EVENT;
+ pMsg->CallEvent.CallEvent = VOIP_MOBILE_CALL_EVENT_DISCONNECTED;
+ pMsg->CallEvent.ReasonCode = Q850_CAUSE_PROTOCOL_ERROR_UNSPECIFIED;
+ Status=VoipSendMessageToCc(pMsg);
+
+ PutMsgIntoPool(ApiMsg);
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : Call Destination REJECTED\n",pCCB->MobileNumber);
+
+ DBG_LEAVE();
+ return Status;
+}
+
+
+/*
+ * smCallIdle
+ */
+STATUS
+smCallIdle(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smCallIdle",H323_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_SUCCESS;
+
+ /* FIXME:: should we be doing this ??!! */
+ if (pCCB->LanCallHandle)
+ {
+ cmCallClose(pCCB->LanCallHandle);
+ sseCallClose(pCCB->SuppCallHandle);
+ ReturnCCBToPool(pCCB);
+ }
+ else
+ {
+
+ }
+ DBG_LEAVE();
+ return Status;
+}
+
+
+
+/*
+ * smRecvRemoteCapabilities
+ */
+STATUS
+smRecvRemoteCapabilities(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smRecvRemoteCapabilities",H323_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_FAILURE;
+ PREMOTE_CAPABILITIES_DETAILS RemoteCapabilities= (PREMOTE_CAPABILITIES_DETAILS)Context;
+
+
+ if (pCCB->FastStart) {
+ if (pCCB->CodecUsed == VOIP_CALL_CODEC_GSM_EFR)
+ jcRtpSetPayloadType(pCCB->RtpHandle,(BYTE)RTP_GSM_EFR_PAYLOAD_TYPE);
+ else
+ jcRtpSetPayloadType(pCCB->RtpHandle,(BYTE)RTP_GSM_PAYLOAD_TYPE);
+ Status = STATUS_SUCCESS;
+ DBG_LEAVE();
+ return Status;
+ }
+
+ /* First check whether remote endpoint has any GSM capability */
+ if (RemoteCapabilities->GSMCodecCapability) {
+ if ( (RemoteCapabilities->GSMEnhancedFullRateCapability) &&
+ (pCCB->CodecUsed == VOIP_CALL_CODEC_GSM_EFR) ) {
+ jcRtpSetPayloadType(pCCB->RtpHandle,(BYTE)RTP_GSM_EFR_PAYLOAD_TYPE);
+ Status = STATUS_SUCCESS;
+ }
+ else if ((RemoteCapabilities->GSMFullRateCapability) &&
+ (pCCB->CodecUsed==VOIP_CALL_CODEC_GSM_FR)) {
+ jcRtpSetPayloadType(pCCB->RtpHandle,(BYTE)RTP_GSM_PAYLOAD_TYPE);
+ Status = STATUS_SUCCESS;
+ }
+ else {
+ DBG_ERROR("Capabilities mismatch\n");
+ }
+ }
+ else {
+ DBG_ERROR("Capabilities mismatch\n");
+ }
+
+
+ DBG_LEAVE();
+ return (Status);
+}
+
+
+
+/*
+ * smH245TransportConnected
+ */
+STATUS
+smH245TransportConnected(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smH245TransportConnected",H323_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_SUCCESS;
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : <-- H.245 Transport connected\n",pCCB->MobileNumber);
+
+ SendLocalTermCapSet(pCCB);
+
+ DBG_LEAVE();
+ return Status;
+}
+
+
+/*
+ * smH245Connected
+ */
+STATUS
+smH245Connected(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smH245Connected",H323_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_FAILURE;
+ /* possible to open logical channel now */
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : <-- H.245 connected\n",pCCB->MobileNumber);
+
+ if (pCCB->FastStart) {
+ /* In this case we dont really need to open channels
+ since they would already be open */
+ Status = STATUS_SUCCESS;
+ DBG_LEAVE();
+ return Status;
+ }
+
+
+ cmChannelNew(pCCB->LanCallHandle, (HAPPCHAN)pCCB, &pCCB->OutChannelHandle);
+
+ DBG_TRACE("Opening outgoing channel %x ; CCB 0x%x\n", pCCB->OutChannelHandle, pCCB);
+
+ cmChannelSetRTCPAddress( pCCB->OutChannelHandle, 0, jcRtpGetPort( pCCB->RtpHandle ) + 1 );
+
+ cmChannelSetDynamicRTPPayloadType( pCCB->OutChannelHandle, 96 );
+
+ if (pCCB->CodecUsed == VOIP_CALL_CODEC_GSM_FR)
+ {
+ if( cmChannelOpen( pCCB->OutChannelHandle, "gsmFullRate", NULL, NULL, 0 ) < 0 )
+ {
+ DBG_ERROR("Error in cmChannelOpen()\n" );
+ }
+ else
+ {
+ Status = STATUS_SUCCESS;
+ }
+ }
+ else if (pCCB->CodecUsed == VOIP_CALL_CODEC_GSM_EFR)
+ {
+ if( cmChannelOpen( pCCB->OutChannelHandle, "gsmEnhancedFullRate", NULL, NULL, 0 ) < 0 )
+ {
+ DBG_ERROR("Error in cmChannelOpen()\n" );
+ }
+ else
+ {
+ Status = STATUS_SUCCESS;
+ }
+ }
+
+ DBG_LEAVE();
+ return Status;
+}
+
+
+/*
+ * smRecvCapabilitiesAck
+ */
+STATUS
+smRecvCapabilitiesAck(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smRecvCapabilitiesAck",H323_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_SUCCESS;
+ DBG_TRACE("Capabilities accepted by remote terminal\n");
+
+ DBG_LEAVE();
+ return Status;
+}
+
+
+/*
+ * smRecvCapabilitiesNak
+ */
+STATUS
+smRecvCapabilitiesNak(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smRecvCapabilitiesNak",H323_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_SUCCESS;
+
+ DBG_ERROR("Capabilities REJECTED by remote terminal; dropping call\n");
+ if (pCCB->CanDropCall) {
+ cmCallDropParam(pCCB->LanCallHandle, cmReasonTypeDestinationRejection);
+ }
+
+ DBG_LEAVE();
+ return Status;
+}
+
+
+/*
+ * smChannelOffering
+ */
+STATUS
+smChannelOffering(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smChannelOffering",H323_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_SUCCESS;
+
+
+ cmChannelSetAddress(pCCB->InChannelHandle, 0, jcRtpGetPort( pCCB->RtpHandle ) );
+
+ cmChannelSetRTCPAddress( pCCB->InChannelHandle, 0, jcRtpGetPort( pCCB->RtpHandle ) + 1 );
+
+ cmChannelAnswer(pCCB->InChannelHandle);
+
+ DBG_LEAVE();
+ return Status;
+
+}
+
+/*
+ * smInChannelDisconnected
+ */
+STATUS
+smInChannelDisconnected(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smInChannelDisconnected",H323_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_SUCCESS;
+
+ cmChannelClose(pCCB->InChannelHandle);
+
+ pCCB->InChannelHandle = NULL;
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : IN Channel 0x%x DISCONNECTED\n",pCCB->MobileNumber,pCCB->InChannelHandle);
+
+ DBG_LEAVE();
+ return Status;
+
+
+}
+
+
+/*
+ * smInChannelConnected
+ */
+STATUS
+smInChannelConnected(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smInChannelConnected",H323_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_SUCCESS;
+
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : IN Channel 0x%x CONNECTED\n",pCCB->MobileNumber,pCCB->InChannelHandle);
+
+ /*
+ * If this is a fast-start call, and we received early indication
+ * of media via progress ie with description of in-band info,
+ * we should be ready to accept a media stream now
+ *
+ */
+ if ((pCCB->FastStart) && (pCCB->InBandInfo)) {
+ if (pCCB->RemoteGSMEnhancedFullRateCapability && pCCB->GSMEnhancedFullRateCapability) {
+ pCCB->CodecUsed = VOIP_CALL_CODEC_GSM_EFR;
+ SendCodecInfo(pCCB);
+ }
+ else if (pCCB->RemoteGSMFullRateCapability && pCCB->GSMFullRateCapability) {
+ pCCB->CodecUsed = VOIP_CALL_CODEC_GSM_FR;
+ SendCodecInfo(pCCB);
+ }
+
+ PAPI_MESSAGE ApiMsg;
+ ApiMsg = GetFreeMsgFromPool();
+ if (ApiMsg == NULL) {
+ DBG_ERROR("All API messages used up from pool!\n");
+ DBG_LEAVE();
+ return FALSE;
+ }
+ PVOIP_API_MESSAGE pMsg = (PVOIP_API_MESSAGE)&ApiMsg->VoipMsg;
+
+ pMsg->Magic = VOIP_API_MAGIC_VALUE;
+ pMsg->H323CRV = pCCB->H323CRV;
+ pMsg->LudbId = pCCB->LudbId;
+ pMsg->VoipMobileHandle = ludbGetVoipMobileHandle(pCCB->LudbId);
+ pMsg->VoipCallHandle = pCCB->Index;
+ pMsg->TxnId = pCCB->LastTxnId;
+ pMsg->MessageType = VOIP_API_CALL_EVENT;
+ pMsg->CallEvent.CallEvent = VOIP_MOBILE_CALL_EVENT_VOICE_CONNECTED;
+ DBG_TRACE("Mobile %s: Sending Voice Connected to CC\n",pCCB->MobileNumber);
+ Status=VoipSendMessageToCc(pMsg);
+
+ DBG_TRACE("Inchannel connected, setting up voice path early 'cos in-band information indicated\n");
+ PutMsgIntoPool(ApiMsg);
+
+ }
+ else {
+ DBG_TRACE("In channel connected\n");
+ }
+ DBG_LEAVE();
+ return Status;
+}
+
+
+/*
+ * smOutChannelConnected
+ */
+STATUS
+smOutChannelConnected(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smOutChannelConnected",H323_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_SUCCESS;
+
+ DBG_TRACE("Out channel connected\n");
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : OUT Channel 0x%x CONNECTED\n",pCCB->MobileNumber,pCCB->OutChannelHandle);
+
+ /* Increment call counters only if this is not a supplementary call */
+ if (!pCCB->IsSuppCall) {
+ if (pCCB->CallDirection == H323_CALL_ORIGINATED) {
+ pVoipTaskConfig->CallStats.CallCompletionStats.OutgoingCallsConnected++;
+ }
+ else {
+ pVoipTaskConfig->CallStats.CallCompletionStats.IncomingCallsConnected++;
+ }
+ }
+
+
+ /*
+ * If the call is fast-start and there was no indication
+ * of in-band information via progress IE in alerting,
+ * we fix the preferred-negotiated codec first.
+ * otherwise in case of in-band info we already have
+ * setup the voice-patch in the in-channel connection above
+ */
+ if ((pCCB->FastStart) && (!pCCB->InBandInfo)) {
+ if (pCCB->RemoteGSMEnhancedFullRateCapability && pCCB->GSMEnhancedFullRateCapability) {
+ pCCB->CodecUsed = VOIP_CALL_CODEC_GSM_EFR;
+ SendCodecInfo(pCCB);
+ }
+ else if (pCCB->RemoteGSMFullRateCapability && pCCB->GSMFullRateCapability) {
+ pCCB->CodecUsed = VOIP_CALL_CODEC_GSM_FR;
+ SendCodecInfo(pCCB);
+ }
+ if (pCCB->CallDirection == H323_CALL_ORIGINATED) {
+ if (!pCCB->ControlConnected) {
+ cmCallConnectControl(pCCB->LanCallHandle);
+ pCCB->ControlConnected = TRUE;
+ }
+ }
+ }
+
+ PAPI_MESSAGE ApiMsg;
+ ApiMsg = GetFreeMsgFromPool();
+ if (ApiMsg == NULL) {
+ DBG_ERROR("All API messages used up from pool!\n");
+ DBG_LEAVE();
+ return FALSE;
+ }
+ PVOIP_API_MESSAGE pMsg = (PVOIP_API_MESSAGE)&ApiMsg->VoipMsg;
+
+
+ /*
+ * again, no need to indicate voice-path setup if the
+ * in-band-info indicator has already caused us
+ * to do so earlier...
+ */
+ if (!pCCB->InBandInfo) {
+
+ pMsg->Magic = VOIP_API_MAGIC_VALUE;
+ pMsg->H323CRV = pCCB->H323CRV;
+ pMsg->LudbId = pCCB->LudbId;
+ pMsg->VoipMobileHandle = ludbGetVoipMobileHandle(pCCB->LudbId);
+ pMsg->VoipCallHandle = pCCB->Index;
+ pMsg->TxnId = pCCB->LastTxnId;
+ pMsg->MessageType = VOIP_API_CALL_EVENT;
+ pMsg->CallEvent.CallEvent = VOIP_MOBILE_CALL_EVENT_VOICE_CONNECTED;
+ DBG_TRACE("Mobile %s: Sending Voice Connected to CC\n",pCCB->MobileNumber);
+ Status=VoipSendMessageToCc(pMsg);
+
+ pCCB->OutChannelConnected = TRUE;
+ }
+
+ if (pCCB->IsSuppCall) {
+ PutMsgIntoPool(ApiMsg);
+ DBG_LEAVE();
+ return (Status);
+ }
+
+ /*
+ * CC needs this event only if we are originating the call
+ */
+ if ((pCCB->CallDirection == H323_CALL_ORIGINATED) && (pCCB->Q931Connected)){
+ pMsg->Magic = VOIP_API_MAGIC_VALUE;
+ pMsg->H323CRV = pCCB->H323CRV;
+ pMsg->LudbId = pCCB->LudbId;
+ pMsg->VoipMobileHandle = ludbGetVoipMobileHandle(pCCB->LudbId);
+ pMsg->VoipCallHandle = pCCB->Index;
+ pMsg->TxnId = pCCB->LastTxnId;
+ pMsg->MessageType = VOIP_API_CALL_EVENT;
+ pMsg->CallEvent.CallEvent = VOIP_MOBILE_CALL_EVENT_CONNECTED;
+ DBG_TRACE("Mobile %s: Sending Call Connected to CC\n",pCCB->MobileNumber);
+ Status=VoipSendMessageToCc(pMsg);
+ }
+ PutMsgIntoPool(ApiMsg);
+
+
+
+ DBG_LEAVE();
+ return Status;
+}
+
+
+/*
+ * smOutChannelDisconnected
+ */
+STATUS
+smOutChannelDisconnected(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smOutChannelDisconnected",H323_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_SUCCESS;
+
+ DBG_CALL_TRACE((unsigned long)pCCB,"Mobile %s : OUT Channel 0x%x DISCONNECTED\n",pCCB->MobileNumber,pCCB->OutChannelHandle);
+
+ DBG_TRACE("Out Channel Disconnected");
+
+ pCCB->OutChannelConnected = FALSE;
+
+ pCCB->OutChannelHandle = NULL;
+
+ DBG_LEAVE();
+ return Status;
+}
+
+
+
+/*
+ * VoipDropAllCalls
+ */
+void
+VoipDropAllCalls()
+{
+ DBG_FUNC("VoipDropAllCalls",H323_LAYER);
+ DBG_ENTER();
+ int Count;
+ PCALL_CONTROL_BLOCK pCCB;
+
+ for(Count=0;Count<MAX_ACTIVE_CALLS;Count++) {
+ pCCB = &CCBArray[Count];
+ if ( (pCCB->H323CallState!=H323_CALL_STATE_IDLE) && (pCCB->LanCallHandle != NULL) )
+ {
+ if (pCCB->CanDropCall == TRUE)
+ cmCallDrop(pCCB->LanCallHandle);
+
+ if (pCCB->InChannelHandle != NULL)
+ cmChannelDrop(pCCB->InChannelHandle);
+
+ if (pCCB->OutChannelHandle != NULL)
+ cmChannelDrop(pCCB->OutChannelHandle);
+
+ pCCB->LocalRelease = TRUE;
+ }
+ }
+ DBG_LEAVE();
+}
+
+
+
+
+#define BASE_OFFSET 0
+#define STATE_STR_OFFSET BASE_OFFSET
+#define STATE_STR_WIDTH 58
+#define EVENT_STR_OFFSET STATE_STR_OFFSET+STATE_STR_WIDTH
+#define EVENT_STR_WIDTH 52
+#define NEXT_STATE_STR_OFFSET EVENT_STR_OFFSET+EVENT_STR_WIDTH
+#define NEXT_STATE_STR_WIDTH 68
+#define NULL_VALUE_OFFSET NEXT_STATE_STR_OFFSET+NEXT_STATE_STR_WIDTH
+
+STATUS
+smFatalStateMachineViolation(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smFatalStateMachineViolation",H323_PROTOCOL_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_SUCCESS;
+
+ DBG_ERROR("Call %#x : State Machine Violation : Current State : %s : Event %s : Next State %s\n",
+ pCCB,GetH323CallStateName(pCCB->PreviousCallState),
+ GetH323EventName(pCCB->CurrentEvent),GetH323CallStateName(pCCB->H323CallState));
+ DBG_ERROR("State transition history:-\n");
+ DumpStateTransitionHistory(pCCB);
+ /*
+ * ASSERT(0);
+ */
+
+ DBG_LEAVE();
+ return Status;
+}
+
+
+STATUS
+smNonFatalStateMachineViolation(PCALL_CONTROL_BLOCK pCCB,PVOID Context)
+{
+ DBG_FUNC("smNonFatalStateMachineViolation",H323_PROTOCOL_LAYER);
+ DBG_ENTER();
+ STATUS Status = STATUS_SUCCESS;
+
+ /*
+ DBG_WARNING("Non Fatal State Machine Violation: -\n");
+ DumpStateTransitionHistory(pCCB);
+ */
+ DBG_LEAVE();
+ return Status;
+}
+
+
+
+
+
+
+
+
+
+
+/*
+ * GetH323CallStateName
+ */
+char *GetH323CallStateName(H323_CALL_STATE CallState)
+{
+
+ static char* StateNames[] =
+ {
+ "H323_CALL_STATE_IDLE",
+ "H323_CALL_STATE_WAIT_FOR_CC_ANSWER",
+ "H323_CALL_STATE_WAIT_FOR_PROCEEDING",
+ "H323_CALL_STATE_WAIT_FOR_CONNECTION",
+ "H323_CALL_STATE_CALL_CONNECTED",
+ "H323_CALL_STATE_WAIT_FOR_CAP_EXCHANGE_ACK",
+ "H323_CALL_STATE_WAIT_FOR_CHANNELS_CONNECTION",
+ "H323_CALL_STATE_CHANNELS_CONNECTED",
+ };
+ static char* UnknownStateString = "UNKNOWN STATE";
+ static char* SameStateString = "H323_CALL_STATE_SAME_STATE";
+
+
+ if( CallState >= 0 && CallState < H323_MAX_CALL_STATES)
+ {
+ return StateNames[CallState];
+ }
+ else if (CallState == H323_CALL_STATE_SAME_STATE)
+ {
+ return SameStateString;
+ }
+
+ return UnknownStateString;
+}
+
+
+/*
+ * GetH323EventName
+ */
+char *GetH323EventName(H323_CALL_EVENT CallEvent)
+{
+
+ static char* EventNames[] =
+ {
+ "H323_EVENT_RECV_CALL_OFFERING",
+ "H323_EVENT_RECV_CC_CALL_RELEASE",
+ "H323_EVENT_RECV_CC_ANSWER_CALL",
+ "H323_EVENT_RECV_CC_CALL_SETUP",
+ "H323_EVENT_RECV_CALL_PROCEEDING",
+ "H323_EVENT_RECV_CALL_RINGBACK",
+ "H323_EVENT_RECV_CALL_CONNECTED",
+ "H323_EVENT_RECV_CALL_DISCONNECTED",
+ "H323_EVENT_RECV_CALL_DEST_REJECTED",
+ "H323_EVENT_RECV_CALL_IDLE",
+ "H323_EVENT_RECV_REMOTE_CAPABILITIES",
+ "H323_EVENT_RECV_H245_TRANSPORT_CONNECTED",
+ "H323_EVENT_RECV_H245_CONNECTED",
+ "H323_EVENT_RECV_CAPABILITIES_ACK",
+ "H323_EVENT_RECV_CAPABILITIES_NAK",
+ "H323_EVENT_RECV_CHANNEL_OFFERING",
+ "H323_EVENT_RECV_IN_CHANNEL_CONNECTED",
+ "H323_EVENT_RECV_OUT_CHANNEL_CONNECTED",
+ "H323_EVENT_RECV_IN_CHANNEL_DISCONNECTED",
+ "H323_EVENT_RECV_OUT_CHANNEL_DISCONNECTED",
+ };
+ static char* UnknownEventString = "UNKNOWN EVENT";
+
+ if( CallEvent >= 0 && CallEvent < H323_MAX_CALL_EVENTS )
+ {
+ return EventNames[CallEvent];
+ }
+
+ return UnknownEventString;
+}
+
+
+
+
+/*
+ * UpdateStateTransitionHistory
+ */
+void
+UpdateStateTransitionHistory(PCALL_CONTROL_BLOCK pCCB,H323_CALL_STATE LatestState,H323_CALL_EVENT LatestEvent,H323_CALL_STATE NextState)
+{
+ int Index;
+ pCCB->StateTransitionHistory.PairIndex++;
+
+ if (pCCB->StateTransitionHistory.PairIndex >= MAX_STATE_TRANSITION_HISTORY)
+ {
+ pCCB->StateTransitionHistory.PairIndex = Index = 0;
+ }
+ else
+ Index = pCCB->StateTransitionHistory.PairIndex;
+
+ pCCB->StateTransitionHistory.CallStates[Index] = LatestState;
+ pCCB->StateTransitionHistory.NextCallStates[Index] = NextState;
+ pCCB->StateTransitionHistory.CallEvents[Index] = LatestEvent;
+}
+
+
+
+/*
+ * DumpStateTransitionHistory
+ */
+void
+DumpStateTransitionHistory(PCALL_CONTROL_BLOCK pCCB)
+{
+ DBG_FUNC("DumpStateTransitionHistory",H323_PROTOCOL_LAYER);
+ DBG_ENTER();
+
+ int Count,Index;
+ char TempString[256];
+ Index = pCCB->StateTransitionHistory.PairIndex;
+
+ DBG_ERROR("State machine transition history dump for CCB 0x%x\n",pCCB);
+
+ for(Count=0;Count<MAX_STATE_TRANSITION_HISTORY;Count++)
+ {
+ if (Index < MAX_STATE_TRANSITION_HISTORY)
+ {
+ memset(TempString,32,256);
+ sprintf(&TempString[STATE_STR_OFFSET],"State %s",GetH323CallStateName(pCCB->StateTransitionHistory.CallStates[Index]));
+ sprintf(&TempString[EVENT_STR_OFFSET],": Event %s",GetH323EventName(pCCB->StateTransitionHistory.CallEvents[Index]));
+ sprintf(&TempString[NEXT_STATE_STR_OFFSET]," --> State %s",GetH323CallStateName(pCCB->StateTransitionHistory.NextCallStates[Index]));
+ for(int Count=0;Count<256;Count++)
+ if (TempString[Count] == 0) TempString[Count] = 32;
+ TempString[NULL_VALUE_OFFSET] = 0;
+ DBG_ERROR("%s\n",TempString);
+ }
+
+ Index++;
+ /*
+ * Roll back
+ */
+ if (Index >= MAX_STATE_TRANSITION_HISTORY)
+ {
+ Index = 0;
+ }
+ }
+
+ DBG_LEAVE();
+ return;
+ }
+
+
+
+
+/*
+ * SendLocalTermCapSet
+ */
+void
+SendLocalTermCapSet(PCALL_CONTROL_BLOCK pCCB)
+{
+ DBG_FUNC("SendLocalTermCapSet",H323_LAYER);
+ DBG_ENTER();
+ BOOL SpecifyFullRateCodec=FALSE,SpecifyEnhancedFullRateCodec=FALSE;
+
+ if (pCCB->CodecUsed == VOIP_CALL_CODEC_GSM_FR) {
+ SpecifyFullRateCodec = TRUE;
+ }
+ else {
+ SpecifyEnhancedFullRateCodec = TRUE;
+ }
+
+ char nameToRemove[100];
+
+ memset(nameToRemove,0,100);
+
+ HPVT hVal=cmGetValTree(pVoipTaskConfig->StackHandle);
+ HPST h245Syn=cmGetSynTreeByRootName(pVoipTaskConfig->StackHandle,"h245");
+ int nodeId=pvtGetNodeIdByPath(hVal,cmGetH245ConfigurationHandle(pVoipTaskConfig->StackHandle),"capabilities.terminalCapabilitySet");
+
+ if ((SpecifyFullRateCodec) && (SpecifyEnhancedFullRateCodec)) {
+ cmCallSendCapability(pCCB->LanCallHandle, nodeId);
+ return;
+ }
+
+ if (SpecifyFullRateCodec != TRUE) {
+ strcpy(nameToRemove,"gsmFullRate");
+ }
+ else if (SpecifyEnhancedFullRateCodec != TRUE) {
+ strcpy(nameToRemove,"gsmEnhancedFullRate");
+ }
+ else {
+ DBG_ERROR("Invalid case specified whether neither FullRate nor EnhancedFullRateCodec is to be specified\n");
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(0);
+#endif
+ return;
+ }
+
+ int newNodeId=pvtAddRootByPath(hVal,h245Syn, "request.terminalCapabilitySet", 0, NULL);
+ pvtSetTree(hVal,newNodeId,hVal,nodeId);
+ {
+ int capTab=pvtGetNodeIdByPath(hVal,newNodeId,"capabilityTable");
+ int capDesc=pvtGetNodeIdByPath(hVal,newNodeId,"capabilityDescriptors");
+ int child=pvtChild(hVal,capTab);
+ int pChild;
+ while(child>=0)
+ {
+ int fieldId;
+ char name[100];
+ int mediaNodeId=pvtGetByPath(hVal,child,"capability.*.*",(int *)&fieldId,NULL,NULL);
+ pstGetFieldName(h245Syn,fieldId,sizeof(name),name);
+ pChild=child;
+ child=pvtBrother(hVal,child);
+ if (!strcmp(name,"application"))
+ {
+ pvtGetByPath(hVal,mediaNodeId,"*",(int *)&fieldId,NULL,NULL);
+ pstGetFieldName(h245Syn,fieldId,sizeof(name),name);
+ }
+ if (!strcmp(name,nameToRemove))
+ {
+ int indexToRemove;
+ int next=pvtNext(hVal,capDesc,capDesc);
+ int pNext;
+ int synNodeId1,synNodeId2;
+ int value;
+ pvtGet(hVal,pvtGetNodeIdByPath(hVal,capDesc,"*.simultaneousCapabilities.*.*"),NULL,&synNodeId1,NULL,NULL);
+ pvtGetByPath(hVal,pChild,"capabilityTableEntryNumber",NULL,&indexToRemove,NULL);
+
+ while(next>0)
+ {
+ pNext=next;
+ next=pvtNext(hVal,capDesc,next);
+ pvtGet(hVal,pNext,NULL,&synNodeId2,&value,NULL);
+ if (value==indexToRemove && synNodeId1==synNodeId2)
+ {
+ int parent=pvtParent(hVal,pNext);
+ int grandParent=pvtParent(hVal,parent);
+ pvtDelete(hVal,(pvtNumChilds(hVal,parent)==1)?parent:pNext);
+ if (pvtNumChilds(hVal,grandParent)==0)
+ pvtDelete(hVal,pvtParent(hVal,grandParent));
+ }
+ }
+ pvtDelete(hVal,pChild);
+ }
+ }
+
+ }
+ cmCallSendCapability(pCCB->LanCallHandle, newNodeId);
+ pvtDelete(hVal,newNodeId);
+ DBG_LEAVE();
+ }
+
+
+
+/*
+ * SendCodecInfo
+ */
+void
+SendCodecInfo(PCALL_CONTROL_BLOCK pCCB)
+{
+ DBG_FUNC("SendCodecInfo",H323_LAYER);
+ DBG_ENTER();
+
+ if (!pCCB->CodecInfoSent) {
+ PAPI_MESSAGE ApiMsg;
+ ApiMsg = GetFreeMsgFromPool();
+ if (ApiMsg == NULL) {
+ DBG_ERROR("All API messages used up from pool!\n");
+ DBG_LEAVE();
+ return;
+ }
+ PVOIP_API_MESSAGE pMsg = (PVOIP_API_MESSAGE)&ApiMsg->VoipMsg;
+
+ pMsg->Magic = VOIP_API_MAGIC_VALUE;
+ pMsg->H323CRV = pCCB->H323CRV;
+ pMsg->LudbId = pCCB->LudbId;
+ pMsg->VoipMobileHandle = ludbGetVoipMobileHandle(pCCB->LudbId);
+ pMsg->VoipCallHandle = pCCB->Index;
+ pMsg->TxnId = pCCB->LastTxnId;
+ pMsg->MessageType = VOIP_API_CODEC_SELECTED;
+
+
+
+ if (pCCB->CodecUsed == VOIP_CALL_CODEC_GSM_FR) {
+ pMsg->CodecSelected.Codec = CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_1;
+ DBG_TRACE("GSM Full rate codec to be used for call CCB= %x\n",pCCB);
+ }
+ else if (pCCB->CodecUsed == VOIP_CALL_CODEC_GSM_EFR) {
+ pMsg->CodecSelected.Codec = CNI_RIL3_GSM_FULL_RATE_SPEECH_VERSION_2;
+ DBG_TRACE("GSM Enhanced Full rate codec to be used for call CCB= %x\n",pCCB);
+ }
+ else {
+ DBG_ERROR("Invalid codec specified\n");
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(0);
+#endif
+ }
+
+
+ /*
+ * Send the message now
+ */
+ BOOL Status=VoipSendMessageToCc(pMsg);
+ PutMsgIntoPool(ApiMsg);
+ pCCB->CodecInfoSent = TRUE;
+ }
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * SendProgressMessageToCC
+ */
+BOOL
+SendProgressMessageToCC(PCALL_CONTROL_BLOCK pCCB)
+{
+ DBG_FUNC("SendProgressMessageToCC",H323_LAYER);
+ DBG_ENTER();
+ BOOL status = FALSE, valueRetrieved=FALSE;
+ int fieldId,value;
+ BOOL isString;
+
+ if (pCCB->Magic == H323TASK_MAGIC_VALUE) {
+ PAPI_MESSAGE ApiMsg;
+ ApiMsg = GetFreeMsgFromPool();
+ if (ApiMsg == NULL) {
+ DBG_ERROR("All API messages used up from pool!\n");
+ DBG_LEAVE();
+ return(FALSE);
+ }
+ PVOIP_API_MESSAGE pMsg = (PVOIP_API_MESSAGE)&ApiMsg->VoipMsg;
+
+ if (pvtGetByPath(cmGetValTree(pVoipTaskConfig->StackHandle),cmGetProperty((HPROTOCOL)pCCB->LanCallHandle),
+ "progress.message.*.progressIndicator.octet4.ext",&fieldId,&value,&isString) < 0)
+ {
+ DBG_TRACE("Could not get Progress Indicator in Progress msg : octet4.ext bit is not set\n");
+ }
+ else {
+ /* octet4.progressDescription */
+ if (pvtGetByPath(cmGetValTree(pVoipTaskConfig->StackHandle),cmGetProperty((HPROTOCOL)pCCB->LanCallHandle),
+ "progress.message.*.progressIndicator.octet4.progressDescription",&fieldId,&value,&isString) < 0)
+ {
+ DBG_WARNING("Could not get Progress Indicator description in Progress msg\n");
+ }
+ else {
+ pMsg->CallEvent.EventInfo.AlertingProgressIE.ie_present = TRUE;
+ pMsg->CallEvent.EventInfo.AlertingProgressIE.codingStandard = CNI_RIL3_GSMPLMN_CODING;
+ pMsg->CallEvent.EventInfo.AlertingProgressIE.location = CNI_RIL3_LOCATION_PUBLIC_NETWORK_LOCAL_USER;
+ pMsg->CallEvent.EventInfo.AlertingProgressIE.progressDesp = (T_CNI_RIL3_PROGRESS_DESCRIPTION)value;
+ DBG_TRACE("Progress Indicator retrieved from Progress msg, value %#x\n",value);
+ valueRetrieved = TRUE;
+ }
+ }
+
+
+ pMsg->Magic = VOIP_API_MAGIC_VALUE;
+ pMsg->H323CRV = pCCB->H323CRV;
+ pMsg->LudbId = pCCB->LudbId;
+ pMsg->VoipMobileHandle = ludbGetVoipMobileHandle(pCCB->LudbId);
+ pMsg->VoipCallHandle = pCCB->Index;
+ pMsg->TxnId = pCCB->LastTxnId;
+ pMsg->MessageType = VOIP_API_CALL_EVENT;
+ pMsg->CallEvent.CallEvent = VOIP_MOBILE_CALL_EVENT_PROGRESS;
+ if (!valueRetrieved) {
+ /*
+ * We default to in-band information, which is the most likely suspect
+ */
+ DBG_TRACE("Defaulting to in-band information value in progressIE in progress msg\n");
+ pMsg->CallEvent.EventInfo.AlertingProgressIE.ie_present = TRUE;
+ pMsg->CallEvent.EventInfo.AlertingProgressIE.codingStandard = CNI_RIL3_GSMPLMN_CODING;
+ pMsg->CallEvent.EventInfo.AlertingProgressIE.location = CNI_RIL3_LOCATION_PUBLIC_NETWORK_LOCAL_USER;
+ pMsg->CallEvent.EventInfo.AlertingProgressIE.progressDesp = CNI_RIL3_PROGRESS_IN_BAND_INFO_AVAILABLE;
+ }
+ DBG_TRACE("Mobile %s: Sending Progress Message to CC\n",pCCB->MobileNumber);
+ status=VoipSendMessageToCc(pMsg);
+ PutMsgIntoPool(ApiMsg);
+ }
+
+ DBG_LEAVE();
+ return (status);
+}
+
+
+/*
+ * VoipDisplayCallParties
+ */
+void
+VoipDisplayCallParties(PCALL_CONTROL_BLOCK pCCB)
+{
+ DBG_FUNC("VoipDisplayCallParties",H323_LAYER);
+ DBG_ENTER();
+
+ if (pCCB->CallDirection == H323_CALL_TERMINATED) {
+ DBG_TRACE("Calling party %s : Plan %s, Type %s, PI %s, SI %s\n",
+ pCCB->RemotePartyId,
+ GetVoipNumPlanStr((Q931_IE_CALL_PARTY_NO_PLAN)pCCB->CallingNumberingPlan),
+ GetVoipNumTypeStr((Q931_IE_CALL_PARTY_NO_TYPE)pCCB->CallingNumberType),
+ GetVoipPIStr((Q931_IE_CALLING_PARTY_NO_PI)pCCB->CallingPartyPI),
+ GetVoipSIStr((Q931_IE_CALLING_PARTY_NO_SI)pCCB->CallingPartySI)
+ );
+ DBG_TRACE("Called party %s : Plan %s, Type %s\n",
+ pCCB->MobileNumber,
+ GetVoipNumPlanStr((Q931_IE_CALL_PARTY_NO_PLAN)pCCB->CalledNumberingPlan),
+ GetVoipNumTypeStr((Q931_IE_CALL_PARTY_NO_TYPE)pCCB->CalledNumberType));
+ }
+ else {
+ DBG_TRACE("Calling party %s : Plan %s, Type %s, PI %s, SI %s\n",
+ pCCB->MobileNumber,
+ GetVoipNumPlanStr((Q931_IE_CALL_PARTY_NO_PLAN)pCCB->CallingNumberingPlan),
+ GetVoipNumTypeStr((Q931_IE_CALL_PARTY_NO_TYPE)pCCB->CallingNumberType),
+ GetVoipPIStr((Q931_IE_CALLING_PARTY_NO_PI)pCCB->CallingPartyPI),
+ GetVoipSIStr((Q931_IE_CALLING_PARTY_NO_SI)pCCB->CallingPartySI)
+ );
+ DBG_TRACE("Called party %s : Plan %s, Type %s\n",
+ pCCB->RemotePartyId,
+ GetVoipNumPlanStr((Q931_IE_CALL_PARTY_NO_PLAN)pCCB->CalledNumberingPlan),
+ GetVoipNumTypeStr((Q931_IE_CALL_PARTY_NO_TYPE)pCCB->CalledNumberType));
+ }
+
+ DBG_LEAVE();
+}
+
+
+
+
+
+
+
+
+
+/*
+ * GetVoipNumTypeStr
+ */
+char *
+GetVoipNumTypeStr(Q931_IE_CALL_PARTY_NO_TYPE numType)
+{
+ static char NumTypeStr[128];
+ switch(numType) {
+ case Q931_IE_CALL_PARTY_NO_TYPE_UNKNOWN:{
+ strncpy(NumTypeStr,"UNKNOWN",128);
+ }
+ break;
+ case Q931_IE_CALL_PARTY_NO_TYPE_INTERNATIONAL:{
+ strncpy(NumTypeStr,"INTERNATIONAL",128);
+ }
+ break;
+ case Q931_IE_CALL_PARTY_NO_TYPE_NATIONAL:{
+ strncpy(NumTypeStr,"NATIONAL",128);
+ }
+ break;
+ case Q931_IE_CALL_PARTY_NO_TYPE_NETWK_SPECIFIC:{
+ strncpy(NumTypeStr,"NETWORK SPECIFIC",128);
+ }
+ break;
+ case Q931_IE_CALL_PARTY_NO_TYPE_SUBS_NO:{
+ strncpy(NumTypeStr,"SUBSCRIBER",128);
+ }
+ break;
+ case Q931_IE_CALL_PARTY_NO_TYPE_ABBR_NO:{
+ strncpy(NumTypeStr,"ABBRIEVATED NUMBER",128);
+ }
+ break;
+ case Q931_IE_CALL_PARTY_NO_TYPE_RESERVED:{
+ strncpy(NumTypeStr,"RESERVED",128);
+ }
+ break;
+ default:{
+ strncpy(NumTypeStr,"UNKNOWN NUMBER TYPE",128);
+ }
+ break;
+ }
+ return (NumTypeStr);
+}
+
+
+/*
+ * GetVoipNumPlanStr
+ */
+char *
+GetVoipNumPlanStr(Q931_IE_CALL_PARTY_NO_PLAN numPlan)
+{
+ static char NumPlanStr[128];
+ switch(numPlan) {
+ case Q931_IE_CALL_PARTY_NO_PLAN_UNKNOWN:{
+ strncpy(NumPlanStr,"UNKNOWN",128);
+ }
+ break;
+ case Q931_IE_CALL_PARTY_NO_PLAN_ISDN:{
+ strncpy(NumPlanStr,"ISDN",128);
+ }
+ break;
+ case Q931_IE_CALL_PARTY_NO_PLAN_DATA:{
+ strncpy(NumPlanStr,"DATA",128);
+ }
+ break;
+ case Q931_IE_CALL_PARTY_NO_PLAN_TELEX:{
+ strncpy(NumPlanStr,"TELEX",128);
+ }
+ break;
+ case Q931_IE_CALL_PARTY_NO_PLAN_NATIONAL:{
+ strncpy(NumPlanStr,"NATIONAL",128);
+ }
+ break;
+ case Q931_IE_CALL_PARTY_NO_PLAN_PRIVATE:{
+ strncpy(NumPlanStr,"PRIVATE",128);
+ }
+ break;
+ case Q931_IE_CALL_PARTY_NO_PLAN_RESERVED:{
+ strncpy(NumPlanStr,"RESERVED",128);
+ }
+ break;
+ default:{
+ strncpy(NumPlanStr,"UNKNOWN NUMBERING PLAN",128);
+ }
+ break;
+ }
+ return (NumPlanStr);
+}
+
+/*
+ * GetVoipPIStr
+ */
+char *
+GetVoipPIStr(Q931_IE_CALLING_PARTY_NO_PI PI)
+{
+ static char presentationIndicatorStr[128];
+ switch (PI) {
+ case Q931_IE_CALLING_PARTY_NO_PI_ALLOWED:{
+ strncpy(presentationIndicatorStr,"PRESENTATION ALLOWED",128);
+ }
+ break;
+ case Q931_IE_CALLING_PARTY_NO_PI_RESTRICTED:{
+ strncpy(presentationIndicatorStr,"PRESENTATION RESTRICTED",128);
+ }
+ break;
+ case Q931_IE_CALLING_PARTY_NO_PI_NOT_AVAIL:{
+ strncpy(presentationIndicatorStr,"NOT AVAILABLE",128);
+ }
+ break;
+ case Q931_IE_CALLING_PARTY_NO_PI_RESERVED:{
+ strncpy(presentationIndicatorStr,"PRESENTATION RESERVED",128);
+ }
+ break;
+ default:{
+ strncpy(presentationIndicatorStr,"UNKNOWN PRESENTATION INDICATOR",128);
+ }
+ break;
+ }
+ return (presentationIndicatorStr);
+}
+
+/*
+ * GetVoipSIStr
+ */
+char *
+GetVoipSIStr(Q931_IE_CALLING_PARTY_NO_SI SI)
+{
+ static char screeningIndicatorStr[128];
+ switch (SI) {
+ case Q931_IE_CALLING_PARTY_NO_SI_UP_NOT_SCREENED:{
+ strncpy(screeningIndicatorStr,"USER PROVIDED, NOT SCREENED",128);
+ }
+ break;
+ case Q931_IE_CALLING_PARTY_NO_SI_UP_VERIFIED_PASSED:{
+ strncpy(screeningIndicatorStr,"USER PROVIDED,PASSED",128);
+ }
+ break;
+ case Q931_IE_CALLING_PARTY_NO_SI_UP_VERIFIED_FAILED:{
+ strncpy(screeningIndicatorStr,"USER PROVIDED,VERIFIED,FAILED",128);
+ }
+ break;
+ case Q931_IE_CALLING_PARTY_NO_SI_NETWORK_PROVIDED:{
+ strncpy(screeningIndicatorStr,"NETWORK PROVIDED",128);
+ }
+ break;
+ default:{
+ strncpy(screeningIndicatorStr,"UNKNOWN SCREENING INDICATOR",128);
+ }
+ break;
+ }
+ return (screeningIndicatorStr);
+}
+
+
+
+
+
+
+/*
+ * VoipToGsmNumType
+ */
+void
+VoipToGsmNumType(Q931_IE_CALL_PARTY_NO_TYPE voipNumType,T_CNI_RIL3_TYPE_OF_NUMBER *gsmNumType)
+{
+ switch (voipNumType) {
+ case Q931_IE_CALL_PARTY_NO_TYPE_INTERNATIONAL:
+ *gsmNumType = CNI_RIL3_NUMBER_TYPE_INTERNATIONAL;
+ break;
+ case Q931_IE_CALL_PARTY_NO_TYPE_NATIONAL:
+ *gsmNumType = CNI_RIL3_NUMBER_TYPE_NATIONAL;
+ break;
+ case Q931_IE_CALL_PARTY_NO_TYPE_NETWK_SPECIFIC:
+ *gsmNumType = CNI_RIL3_NUMBER_TYPE_NETWORK_SPECIFIC;
+ break;
+ /*
+ * No mappings for these guys
+ */
+ case Q931_IE_CALL_PARTY_NO_TYPE_SUBS_NO:
+ case Q931_IE_CALL_PARTY_NO_TYPE_ABBR_NO:
+ case Q931_IE_CALL_PARTY_NO_TYPE_RESERVED:
+ default:
+ case Q931_IE_CALL_PARTY_NO_TYPE_UNKNOWN:
+ *gsmNumType = CNI_RIL3_NUMBER_TYPE_UNKNOWN;
+ break;
+ }
+ return;
+}
+
+
+/*
+ * VoipToGsmNumPlan
+ */
+void
+VoipToGsmNumPlan(Q931_IE_CALL_PARTY_NO_PLAN voipNumPlan,T_CNI_RIL3_NUMBERING_PLAN_ID *gsmNumPlan)
+{
+ switch(voipNumPlan) {
+
+ case Q931_IE_CALL_PARTY_NO_PLAN_ISDN:
+ *gsmNumPlan = CNI_RIL3_NUMBERING_PLAN_ISDN_TELEPHONY;
+ break;
+
+ case Q931_IE_CALL_PARTY_NO_PLAN_DATA:
+ *gsmNumPlan = CNI_RIL3_NUMBERING_PLAN_DATA;
+ break;
+
+ case Q931_IE_CALL_PARTY_NO_PLAN_TELEX:
+ *gsmNumPlan = CNI_RIL3_NUMBERING_PLAN_TELEX;
+ break;
+
+ case Q931_IE_CALL_PARTY_NO_PLAN_NATIONAL:
+ *gsmNumPlan = CNI_RIL3_NUMBERING_PLAN_NATIONAL;
+ break;
+
+ case Q931_IE_CALL_PARTY_NO_PLAN_PRIVATE:
+ *gsmNumPlan = CNI_RIL3_NUMBERING_PLAN_PRIVATE;
+ break;
+
+ case Q931_IE_CALL_PARTY_NO_PLAN_RESERVED:
+ case Q931_IE_CALL_PARTY_NO_PLAN_UNKNOWN:
+ default:
+ *gsmNumPlan = CNI_RIL3_NUMBERING_PLAN_UNKNOWN;
+ break;
+ }
+ return;
+}
+
+
+/*
+ * VoipToGsmPI
+ */
+void
+VoipToGsmPI(Q931_IE_CALLING_PARTY_NO_PI voipPI,T_CNI_RIL3_PRESENTATION_INDICATOR *gsmPI)
+{
+ switch(voipPI) {
+ case Q931_IE_CALLING_PARTY_NO_PI_ALLOWED:
+ *gsmPI = CNI_RIL3_PRESENTATION_ALLOWED;
+ break;
+
+ case Q931_IE_CALLING_PARTY_NO_PI_RESTRICTED:
+ *gsmPI = CNI_RIL3_PRESENTATION_RESTRICTED;
+ break;
+
+ case Q931_IE_CALLING_PARTY_NO_PI_NOT_AVAIL:
+ case Q931_IE_CALLING_PARTY_NO_PI_RESERVED:
+ default:
+ *gsmPI = CNI_RIL3_PRESENTATION_NUMBER_NOT_AVAILABLE;
+ break;
+ }
+ return;
+}
+
+
+/*
+ * VoipToGsmSI
+ */
+void
+VoipToGsmSI(Q931_IE_CALLING_PARTY_NO_SI voipSI,T_CNI_RIL3_SCREENING_INDICATOR *gsmSI)
+{
+ switch(voipSI) {
+ default:
+ case Q931_IE_CALLING_PARTY_NO_SI_UP_NOT_SCREENED:
+ *gsmSI = CNI_RIL3_SCREENING_USER_PROVIDED_NOT_SCREENED;
+ break;
+ case Q931_IE_CALLING_PARTY_NO_SI_UP_VERIFIED_PASSED:
+ *gsmSI = CNI_RIL3_SCREENING_USER_PROVIDED_PASSED;
+ break;
+ case Q931_IE_CALLING_PARTY_NO_SI_UP_VERIFIED_FAILED:
+ *gsmSI = CNI_RIL3_SCREENING_USER_PROVIDED_FAILED;
+ break;
+ case Q931_IE_CALLING_PARTY_NO_SI_NETWORK_PROVIDED:
+ *gsmSI = CNI_RIL3_SCREENING_NETWORK_PROVIDED;
+ break;
+ }
+ return;
+}
+
+
+
+/*
+ * GsmToVoipNumType
+ */
+void
+GsmToVoipNumType(T_CNI_RIL3_TYPE_OF_NUMBER gsmNumType,Q931_IE_CALL_PARTY_NO_TYPE *voipNumType)
+{
+
+
+ switch (gsmNumType) {
+ case CNI_RIL3_NUMBER_TYPE_INTERNATIONAL:
+ *voipNumType = Q931_IE_CALL_PARTY_NO_TYPE_INTERNATIONAL;
+ break;
+ case CNI_RIL3_NUMBER_TYPE_NATIONAL:
+ *voipNumType = Q931_IE_CALL_PARTY_NO_TYPE_NATIONAL;
+ break;
+ case CNI_RIL3_NUMBER_TYPE_NETWORK_SPECIFIC:
+ *voipNumType = Q931_IE_CALL_PARTY_NO_TYPE_NETWK_SPECIFIC;
+ break;
+ case CNI_RIL3_NUMBER_TYPE_DEDICATED_ACCESS:
+ case CNI_RIL3_NUMBER_TYPE_UNKNOWN:
+ default:
+ *voipNumType = Q931_IE_CALL_PARTY_NO_TYPE_UNKNOWN;
+ break;
+ }
+ return;
+}
+
+
+/*
+ * GsmToVoipNumPlan
+ */
+void
+GsmToVoipNumPlan(T_CNI_RIL3_NUMBERING_PLAN_ID gsmNumPlan,Q931_IE_CALL_PARTY_NO_PLAN *voipNumPlan)
+{
+ switch(gsmNumPlan){
+ case CNI_RIL3_NUMBERING_PLAN_ISDN_TELEPHONY:
+ *voipNumPlan = Q931_IE_CALL_PARTY_NO_PLAN_ISDN;
+ break;
+
+ case CNI_RIL3_NUMBERING_PLAN_DATA:
+ *voipNumPlan = Q931_IE_CALL_PARTY_NO_PLAN_DATA;
+ break;
+
+ case CNI_RIL3_NUMBERING_PLAN_TELEX:
+ *voipNumPlan = Q931_IE_CALL_PARTY_NO_PLAN_TELEX;
+ break;
+
+ case CNI_RIL3_NUMBERING_PLAN_NATIONAL:
+ *voipNumPlan = Q931_IE_CALL_PARTY_NO_PLAN_NATIONAL;
+ break;
+
+ case CNI_RIL3_NUMBERING_PLAN_PRIVATE:
+ *voipNumPlan = Q931_IE_CALL_PARTY_NO_PLAN_PRIVATE;
+ break;
+
+ case CNI_RIL3_NUMBERING_PLAN_UNKNOWN:
+ default:
+ *voipNumPlan = Q931_IE_CALL_PARTY_NO_PLAN_UNKNOWN;
+ break;
+
+ }
+ return;
+}
+
+
+
+/*
+ * GsmToVoipPI
+ */
+void
+GsmToVoipPI(T_CNI_RIL3_PRESENTATION_INDICATOR gsmPI,Q931_IE_CALLING_PARTY_NO_PI *voipPI)
+{
+ switch(gsmPI) {
+ case CNI_RIL3_PRESENTATION_ALLOWED:
+ *voipPI = Q931_IE_CALLING_PARTY_NO_PI_ALLOWED;
+ break;
+ case CNI_RIL3_PRESENTATION_RESTRICTED:
+ *voipPI = Q931_IE_CALLING_PARTY_NO_PI_RESTRICTED;
+ break;
+ case CNI_RIL3_PRESENTATION_NUMBER_NOT_AVAILABLE:
+ default:
+ *voipPI = Q931_IE_CALLING_PARTY_NO_PI_NOT_AVAIL;
+ break;
+ }
+ return;
+}
+
+/*
+ * GsmToVoipSI
+ */
+void
+GsmToVoipSI(T_CNI_RIL3_SCREENING_INDICATOR gsmSI,Q931_IE_CALLING_PARTY_NO_SI *voipSI)
+{
+
+ /*
+ * Since we provide the number from the LUDB, we have to hardcode
+ * the screening Indicator to network provided
+ */
+
+ *voipSI = Q931_IE_CALLING_PARTY_NO_SI_NETWORK_PROVIDED;
+ return;
+
+
+ switch(gsmSI) {
+
+ case CNI_RIL3_SCREENING_USER_PROVIDED_NOT_SCREENED:
+ *voipSI = Q931_IE_CALLING_PARTY_NO_SI_UP_NOT_SCREENED;
+ break;
+ case CNI_RIL3_SCREENING_USER_PROVIDED_PASSED:
+ *voipSI = Q931_IE_CALLING_PARTY_NO_SI_UP_VERIFIED_PASSED;
+ break;
+ case CNI_RIL3_SCREENING_USER_PROVIDED_FAILED:
+ *voipSI = Q931_IE_CALLING_PARTY_NO_SI_UP_VERIFIED_FAILED;
+ break;
+ case CNI_RIL3_SCREENING_NETWORK_PROVIDED:
+ *voipSI = Q931_IE_CALLING_PARTY_NO_SI_NETWORK_PROVIDED;
+ break;
+ }
+ return;
+
+}
+
diff --git a/data/mnet/GP10/Host/voip/src/util.cpp b/data/mnet/GP10/Host/voip/src/util.cpp
new file mode 100644
index 0000000..180f928
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/src/util.cpp
@@ -0,0 +1,1189 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : Util.cpp *
+ * *
+ * Description : Various utility functions required by the H.323 task *
+ * *
+ * Author : Dinesh Nambisan *
+ * [Code borrowed liberally from original work *
+ * of Oleg Turovski] *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+#include <stdlib.h>
+#include <string.h>
+extern "C" {
+#include <cm.h>
+#include <stkutils.h>
+}
+
+#include <tickLib.h>
+#include <drv\timer\timerDev.h>
+#include <taskLib.h>
+extern "C" {
+#include <mti.h>
+#include <seli.h>
+#include <pi.h>
+}
+#include "logging\vcmodules.h"
+#include "logging\vclogging.h"
+
+#include "ccb.h"
+#include "util.h"
+
+extern PH323TASK_CONFIG pVoipTaskConfig;
+extern CALL_CONTROL_BLOCK CCBArray[MAX_ACTIVE_CALLS];
+
+extern RADPIPE RadPipeArray[MAX_PIPES_IN_ARRAY];
+extern JCTIMER VoipTaskTimerArray[MAX_TIMERS_IN_ARRAY];
+extern API_MESSAGE VoipMessageArray[MAX_VOIP_API_MSGS_IN_ARRAY];
+
+
+/*
+ * RadPipeOpen
+ */
+PRADPIPE
+RadPipeOpen( char* Name, int nMsgSize, int nMaxMsgs, pfnCallBackFunction pfnUserCallBack )
+{
+ DBG_FUNC("RadPipeOpen",H323_LAYER);
+ DBG_ENTER();
+ int hPipe;
+ PRADPIPE pPipe=NULL;
+
+
+ if(piInit()==ERROR)
+ {
+ DBG_ERROR( "Error in piInit()\n" );
+ DBG_LEAVE();
+ return pPipe;
+ }
+
+ if(( hPipe = piOpen( Name, nMsgSize, nMaxMsgs ) ) &&
+ 0 > ( hPipe = open( Name, O_RDWR, 644 ) ) == ERROR )
+ {
+ DBG_ERROR( "Error in piOpen()\n" );
+ DBG_LEAVE();
+ return pPipe;
+ }
+
+ pPipe = (PRADPIPE)GetPipeFromPool();
+ ASSERT(pPipe != NULL);
+ if (pPipe == NULL)
+ {
+ DBG_ERROR("Cannot allocate memory for pipe!\n");
+ DBG_LEAVE();
+ return pPipe;
+ }
+ pPipe->hPipe = hPipe;
+ pPipe->pfnUserCallBackFunction = pfnUserCallBack;
+ pPipe->nMsgSize = nMsgSize;
+ DBG_TRACE("Pipe message size %d = %d\n",pPipe->nMsgSize,nMsgSize);
+ //pPipe->pMsg = (PVOID)jcMalloc(H323_LAYER,nMsgSize);
+
+ piCallOn( hPipe, piEvRead, (piCallback)RadPipeCallBack, pPipe );
+
+ DBG_LEAVE();
+ return pPipe;
+}
+
+
+
+/*
+ * GetPipeFromPool
+ */
+PRADPIPE
+GetPipeFromPool()
+{
+ int Count;
+ PRADPIPE pPipe=NULL;
+
+ for(Count=0;Count<MAX_PIPES_IN_ARRAY;Count++) {
+ pPipe = (PRADPIPE)&RadPipeArray[Count];
+ if (pPipe->Used == FALSE) {
+ pPipe->Used = TRUE;
+ pPipe->Magic = H323TASK_MAGIC_VALUE;
+ memset(pPipe->pMsg,0,MAX_PIPE_MSG_SIZE);
+ return (pPipe);
+ }
+ }
+ return(NULL);
+}
+
+/*
+ * ReturnPipeToPool
+ */
+void
+ReturnPipeToPool(PRADPIPE pRadPipe)
+{
+ memset(pRadPipe->pMsg,0,MAX_PIPE_MSG_SIZE);
+ pRadPipe->Used = FALSE;
+
+}
+
+/*
+ * PipeArrayInit
+ */
+void
+PipeArrayInit()
+{
+ int ArraySize;
+
+ ArraySize = sizeof(RADPIPE) * MAX_PIPES_IN_ARRAY;
+
+ memset(RadPipeArray,0,ArraySize);
+
+}
+
+/*
+ * RadPipeWrite
+ */
+BOOL
+RadPipeWrite( PRADPIPE pPipe, PVOID pMessage )
+{
+ DBG_FUNC("RadPipeWrite",H323_LAYER);
+ DBG_ENTER();
+
+ ASSERT(pPipe->Magic == H323TASK_MAGIC_VALUE);
+ if( pPipe->nMsgSize != piWrite( pPipe->hPipe, (UINT8*)pMessage, pPipe->nMsgSize ) )
+ {
+ DBG_ERROR( "Error in piWrite()\n" );
+ DBG_LEAVE();
+ return FALSE;
+ }
+
+ DBG_LEAVE();
+ return TRUE;
+}
+
+
+
+/*
+ * RadPipeCallBack
+ */
+void
+RadPipeCallBack( int hPipe, piEvents Event, BOOL Error, void* pData )
+{
+ DBG_FUNC("RadPipeCallBack",H323_LAYER);
+ DBG_ENTER();
+
+ PRADPIPE pPipe;
+ int i, nPipeMsgs;
+ int BytesRead;
+
+ pPipe = (PRADPIPE)pData;
+
+ if( Error || (pPipe->hPipe != hPipe))
+ {
+ DBG_ERROR( "Error in RadPipeCallBack()\n" );
+ DBG_LEAVE();
+ return;
+ }
+
+ ioctl( hPipe, FIONMSGS, (int)&nPipeMsgs );
+
+ for( i = 0; i < nPipeMsgs; i++ )
+ {
+ BytesRead = piRead( hPipe, (UINT8*)pPipe->pMsg, pPipe->nMsgSize ) ;
+ if( pPipe->nMsgSize != BytesRead)
+ {
+ DBG_ERROR( "Error in piRead(), expected size %d, read size %d\n",pPipe->nMsgSize,BytesRead);
+ DBG_LEAVE();
+ return;
+ }
+
+ (*pPipe->pfnUserCallBackFunction)( pPipe->pMsg );
+ }
+
+ DBG_LEAVE();
+ return;
+}
+
+
+/*
+ * RadPipeClose
+ */
+BOOL
+RadPipeClose( PRADPIPE pPipe )
+{
+ DBG_FUNC("RadPipeClose",H323_LAYER);
+ DBG_ENTER();
+
+ piClose( pPipe->hPipe );
+ piEnd();
+
+/*
+ jcFree(H323_LAYER, pPipe->pMsg );
+ jcFree(H323_LAYER,pPipe);
+*/
+ ReturnPipeToPool(pPipe);
+
+ DBG_LEAVE();
+ return TRUE;
+}
+
+
+
+/*
+ * DetectRemoteTerminalType
+ */
+REMOTE_TERMINAL_TYPE
+DetectRemoteTerminalType(PCALL_CONTROL_BLOCK pCCB)
+{
+ DBG_FUNC("DetectRemoteTerminalType",H323_LAYER);
+ DBG_ENTER();
+ HPVT hPVT;
+ int hRemoteInfo, hNodeID, nLen;
+ BOOL bString;
+ char ProductID[100], VersionID[100];
+
+ hRemoteInfo = cmCallGetRemoteEndpointInfoHandle( pCCB->LanCallHandle);
+ hPVT = cmGetValTree( pVoipTaskConfig->StackHandle );
+
+ hNodeID = pvtGetByPath( hPVT, hRemoteInfo, "vendor.productId", NULL, &nLen, &bString );
+ if( bString )
+ {
+ pvtGetString( hPVT, hNodeID, 100, ProductID );
+ ProductID[nLen] = 0;
+ DBG_TRACE("Remote endpoint product ID : %s\n",ProductID);
+ }
+ else
+ strcpy( ProductID, "<unknown>" );
+
+ hNodeID = pvtGetByPath( hPVT, hRemoteInfo, "vendor.versionId", NULL, &nLen, &bString );
+ if( bString )
+ {
+ pvtGetString( hPVT, hNodeID, 100, VersionID );
+ VersionID[nLen] = 0;
+ }
+ else
+ strcpy( VersionID, "<unknown>" );
+
+ DBG_TRACE( "Remote Terminal Info for (call %x):\n\tProductID: '%s', VersionID: '%s'\n",
+ pCCB->LanCallHandle, ProductID, VersionID );
+
+ if ( 0 == strncmp( ProductID, "Microsoft", 9 )) {
+ DBG_TRACE("Remote Terminal type MS-NetMeeting \n");
+ pCCB->RemoteType = REMOTE_TERMINAL_NETMEETING;
+ }
+ else if ( 0 == strncmp( ProductID, "IPLink", 6 ))
+ {
+ DBG_TRACE("Remote Terminal type Dialogic-based\n");
+ pCCB->RemoteType = REMOTE_TERMINAL_NETMEETING;
+ }
+ else
+ pCCB->RemoteType = REMOTE_TERMINAL_GSM; /* at least we hope so :-) */
+
+ DBG_LEAVE();
+ return pCCB->RemoteType;
+}
+
+
+
+
+/*
+ * GetCallStateName
+ */
+char*
+GetCallStateName( int State )
+{
+
+ static char* Names[] =
+ {
+ "Dialtone",
+ "Proceeding",
+ "RingBack",
+ "Connected",
+ "Disconnected",
+ "Idle",
+ "Offering",
+ "Transfering",
+ "AdmissionConfirm",
+ "AdmissionReject",
+ "IncompleteAddress"
+ };
+
+ if( State >= 0 && State < 11)
+ {
+ return Names[State];
+ }
+ else
+ {
+ return "<unknown>";
+ }
+}
+
+/*
+ * GetCallStateModeName
+ */
+char*
+GetCallStateModeName(int Mode)
+{
+
+ static char* Names[] =
+ {
+ "DisconnectedBusy",
+ "DisconnectedNormal",
+ "DisconnectedReject",
+ "DisconnectedUnreachable",
+ "DisconnectedUnknown",
+ "DisconnectedLocal",
+ "ConnectedControl",
+ "ConnectedCallSetup",
+ "ConnectedCall",
+ "ConnectedConference",
+ "OfferingCreate",
+ "OfferingInvite",
+ "OfferingJoin",
+ "OfferingCapabilityNegotiation",
+ "OfferingCallIndependentSupplService"
+ };
+
+ if( Mode >= 0 && Mode < 15)
+ {
+ return Names[Mode];
+ }
+ else
+ {
+ return "<unknown>";
+ }
+}
+
+
+
+/*
+ * GetRASEventName
+ */
+char*
+GetRASEventName( int Event )
+{
+ static char* Names[] =
+ {
+ "GatekeeperConfirm",
+ "GatekeeperReject",
+ "RegistrationConfirm",
+ "RegistrationReject",
+ "UnregistrationRequest",
+ "UnregistrationConfirm",
+ "UnregistrationReject",
+ "NonStandardMessage"
+ };
+
+ if( Event >= 0 && Event < 8 )
+ {
+ return Names[Event];
+ }
+ else
+ {
+ return "<unknown>";
+ }
+}
+
+
+
+/*
+ * GetChannelStateName
+ */
+char*
+GetChannelStateName( int State )
+{
+ static char* Names[] =
+ {
+ "Dialtone",
+ "RingBack",
+ "Connected",
+ "Disconnected",
+ "Idle",
+ "Offering"
+ };
+
+ if( State >= 0 && State < 6 )
+ {
+ return Names[State];
+ }
+ else
+ {
+ return "<unknown>";
+ }
+}
+
+
+
+/*
+ * GetChannelStateModeName
+ */
+char*
+GetChannelStateModeName(int Mode)
+{
+
+ static char* Names[] =
+ {
+ "On",
+ "Off",
+ "DisconnectedLocal",
+ "DisconnectedRemote",
+ "DisconnectedMasterSlaveConflict",
+ "Duplex",
+ "DisconnectedReasonUnknown",
+ "DisconnectedReasonReopen",
+ "DisconnectedReasonReservationFailure"
+ };
+
+ if( Mode >= 0 && Mode < 9 )
+ {
+ return Names[Mode];
+ }
+ else
+ {
+ return "<unknown>";
+ }
+}
+
+
+
+
+
+/*
+ * GetControlStateName
+ */
+char*
+GetControlStateName(int State)
+{
+ static char* Names[] =
+ {
+ "Connected",
+ "Conference",
+ "TransportConnected",
+ "TransportDisconnected",
+ "FastStart"
+ };
+
+ if( State >= 0 && State < 5 )
+ {
+ return Names[State];
+ }
+ else
+ {
+ return "<unknown>";
+ }
+}
+
+
+
+/*
+ * CapabilityPrint
+ */
+void
+CapabilityPrint(cmCapStruct* pCaps )
+{
+ DBG_FUNC("CapabilityPrint",H323_LAYER);
+ DBG_ENTER();
+
+ static char* pszDirection[] =
+ {
+ "UNKNOWN",
+ "RECEIVE",
+ "TRANSMIT",
+ "BIDIRECTIONAL"
+ };
+ static char* pszDataType[] =
+ {
+ "UNKNOWN",
+ "AUDIO",
+ "VIDEO",
+ "DATA",
+ "NON-STANDARD"
+ };
+
+ if ( (pCaps->direction >= 0) && (pCaps->direction < 4) &&
+ (pCaps->type >= 0) && (pCaps->type < 5) )
+ DBG_TRACE("Capability Name: %s, Direction: %s, Data Type: %s\n",
+ pCaps->name, pszDirection[pCaps->direction], pszDataType[pCaps->type] );
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+
+/*
+ * jcULongPack
+ */
+void
+jcULongPack( ULONG uLong, UCHAR** ppszBuffer, int* pnSize )
+{
+ UCHAR* pszBuffer = *ppszBuffer;
+
+ pszBuffer[0] = (UCHAR)( ( uLong >> 0 ) & 0xFF );
+ pszBuffer[1] = (UCHAR)( ( uLong >> 8 ) & 0xFF );
+ pszBuffer[2] = (UCHAR)( ( uLong >> 16 ) & 0xFF );
+ pszBuffer[3] = (UCHAR)( ( uLong >> 24 ) & 0xFF );
+
+ *ppszBuffer += 4;
+ *pnSize += 4;
+
+ return;
+}
+
+/*
+ * jcULongUnpack
+ */
+ULONG
+jcULongUnpack( UCHAR** ppszBuffer )
+{
+ ULONG uLong;
+ UCHAR* pszBuffer = *ppszBuffer;
+
+ uLong = ( (ULONG)pszBuffer[0] << 0 ) |
+ ( (ULONG)pszBuffer[1] << 8 ) |
+ ( (ULONG)pszBuffer[2] << 16 ) |
+ ( (ULONG)pszBuffer[3] << 24 );
+
+ *ppszBuffer += 4;
+
+ return uLong;
+}
+
+/*
+ * jcUShortPack
+ */
+void
+jcUShortPack( USHORT uShort, UCHAR** ppszBuffer, int* pnSize )
+{
+ UCHAR* pszBuffer = *ppszBuffer;
+
+ pszBuffer[0] = (UCHAR)( ( uShort >> 0 ) & 0xFF );
+ pszBuffer[1] = (UCHAR)( ( uShort >> 8 ) & 0xFF );
+
+ *ppszBuffer += 2;
+ *pnSize += 2;
+
+ return;
+}
+
+/*
+ * jcUShortUnpack
+ */
+USHORT
+jcUShortUnpack( UCHAR** ppszBuffer )
+{
+ USHORT uShort;
+ UCHAR* pszBuffer = *ppszBuffer;
+
+ uShort = ( (USHORT)pszBuffer[0] << 0 ) |
+ ( (USHORT)pszBuffer[1] << 8 );
+
+ *ppszBuffer += 2;
+
+ return uShort;
+}
+
+/*
+ * jcBufferPack
+ */
+void
+jcBufferPack( PVOID pData, USHORT nDataSize, UCHAR** ppszBuffer, int* pnSize )
+{
+ if( nDataSize == 0 ) return;
+
+ memcpy( *ppszBuffer, pData, nDataSize );
+
+ *ppszBuffer += nDataSize;
+ *pnSize += nDataSize;
+
+ return;
+}
+
+/*
+ * jcBufferUnpack
+ */
+PVOID
+jcBufferUnpack( USHORT nDataSize, UCHAR** ppszBuffer )
+{
+ PVOID pData;
+
+ if( nDataSize == 0 ) return NULL;
+
+ pData = *ppszBuffer;
+ *ppszBuffer += nDataSize;
+
+ return pData;
+}
+
+
+
+/*
+ * jcIpToString
+ */
+char*
+jcIpToString( UINT32 addr, UINT16 port )
+{
+ static char buf[22];
+ BYTE* ip=(BYTE*)&addr;
+ sprintf( buf, "%d.%d.%d.%d:%d", (int)ip[0], (int)ip[1], (int)ip[2], (int)ip[3], port );
+ return buf;
+}
+
+
+
+
+/*
+ * jcStringPack
+ */
+void
+jcStringPack( char* pszString, UCHAR** ppszBuffer, int* pnSize )
+{
+ size_t nSize;
+
+ nSize = strlen( pszString ) + 1;
+ strcpy((char*)*ppszBuffer, pszString );
+
+ *ppszBuffer += nSize;
+ *pnSize += nSize;
+
+ return;
+}
+
+/*
+ * jcStringUnpack
+ */
+char*
+jcStringUnpack( UCHAR** ppszBuffer )
+{
+ char* pszString = (char*)*ppszBuffer;
+
+ *ppszBuffer += strlen( pszString ) + 1;
+
+ return pszString;
+}
+
+
+/*
+ * TimerCreate
+ */
+PJCTIMER
+TimerCreate(UINT32 tmInterval, pfnCommonCallBack pfnCallBack, PVOID pData, BOOL bMultiple )
+{
+ PJCTIMER pTimer;
+
+
+ pTimer = (PJCTIMER)AllocTimerFromPool();
+ ASSERT(pTimer!=NULL);
+ pTimer->pData = pData;
+ pTimer->pfnCallBack = pfnCallBack;
+ pTimer->bMultiple = bMultiple;
+ pTimer->tmInterval = tmInterval;
+ if( 0 > mtimerSet(pVoipTaskConfig->hsTimer, (LPMTIMEREVENTHANDLER)VxWorksTimerCallBack,
+ (PVOID)pTimer, 1000 * tmInterval ) )
+ {
+ ReturnTimerToPool(pTimer );
+ return NULL;
+ }
+
+ return pTimer;
+}
+
+
+
+/*
+ * AllocTimerFromPool
+ */
+PJCTIMER
+AllocTimerFromPool()
+{
+ int Count;
+ PJCTIMER pTimer=NULL;
+
+ for(Count=0;Count<MAX_TIMERS_IN_ARRAY;Count++) {
+ pTimer = &VoipTaskTimerArray[Count];
+ if (pTimer->Used == FALSE) {
+ pTimer->Used = TRUE;
+ pTimer->Magic = H323TASK_MAGIC_VALUE;
+ return(pTimer);
+ }
+ }
+ return NULL;
+}
+
+/*
+ * ReturnTimerToPool
+ */
+void
+ReturnTimerToPool(PJCTIMER pTimer)
+{
+ pTimer->Used = FALSE;
+}
+
+/*
+ * TimerArrayInit
+ */
+void
+TimerArrayInit()
+{
+ int ArraySize;
+
+ ArraySize = sizeof(JCTIMER) * MAX_TIMERS_IN_ARRAY;
+
+ memset(VoipTaskTimerArray,0,ArraySize);
+
+}
+
+/*
+ * VxWorksTimerCallBack
+ */
+void
+VxWorksTimerCallBack( PVOID pData )
+{
+ PJCTIMER pTimer = (PJCTIMER)pData;
+
+ (*pTimer->pfnCallBack)( pTimer->pData );
+
+ if( FALSE == pTimer->bMultiple )
+ TimerDelete( pTimer );
+
+ return;
+}
+
+
+/*
+ * TimerDelete
+ */
+BOOL
+TimerDelete( PJCTIMER pTimer )
+{
+ if( NULL == pTimer )
+ return FALSE;
+
+ mtimerResetByValue( pVoipTaskConfig->hsTimer, (LPMTIMEREVENTHANDLER)VxWorksTimerCallBack, (PVOID)pTimer );
+
+ ReturnTimerToPool(pTimer);
+
+ return TRUE;
+}
+
+
+
+/*
+ * DumpCCBAndRtp
+ */
+void
+DumpCCBAndRtp()
+{
+ DBG_FUNC("DumpCCBAndRtp",H323_LAYER);
+ DBG_ENTER();
+ PCALL_CONTROL_BLOCK pCCB;
+ int Count;
+
+ for(Count=0;Count<MAX_ACTIVE_CALLS;Count++)
+ {
+ pCCB = &CCBArray[Count];
+ DBG_ERROR("CCB = %x: RTP = %x\n",pCCB,pCCB->RtpHandle);
+ }
+ DBG_LEAVE();
+ return;
+}
+
+
+/*
+ * jcBCDToString
+ */
+char*
+jcBCDToString( char* String, unsigned char* Digits, short nDigits )
+{
+ static char Translation[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
+ '*', '#', 'a', 'b', 'c', 'd' };
+
+ for( short i = 0; i < nDigits; i++ )
+ String[i] = Translation[Digits[i]];
+
+ String[nDigits] = '\0';
+
+ return String;
+}
+
+
+/*
+ * jcStringToBCD
+ */
+void
+jcStringToBCD(char *string,unsigned char *digits, short *nDigits)
+{
+ static char Translation[16] = {
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
+ '*', '#', 'a', 'b', 'c', 'd' };
+ int Count,index;
+ for(index=0;index<strlen(string);index++) {
+ for(Count=0;Count<16;Count++) {
+ if (Translation[Count] == string[index]) {
+ digits[index] = Count;
+ }
+ }
+ }
+ *nDigits = strlen(string);
+ return;
+}
+
+
+
+/*
+ * GetFreeMsgFromPool
+ */
+PAPI_MESSAGE
+GetFreeMsgFromPool()
+{
+ PAPI_MESSAGE pRetValue=NULL;
+ int Count;
+ for(Count=0;Count<MAX_VOIP_API_MSGS_IN_ARRAY;Count++) {
+ if (VoipMessageArray[Count].Used == FALSE) {
+ pRetValue = &VoipMessageArray[Count];
+ pRetValue->Used = TRUE;
+ pRetValue->VoipMsg.TxnId = VOIP_API_NULL_TXN_ID;
+ break;
+ }
+ }
+ return (pRetValue);
+}
+
+
+/*
+ * PutMsgIntoPool
+ */
+void
+PutMsgIntoPool(PAPI_MESSAGE pMsg)
+{
+ memset(pMsg,0,sizeof(API_MESSAGE));
+ pMsg->Used = FALSE;
+}
+
+
+
+
+
+/*
+ * ExtractTelString
+ */
+char *
+ExtractTelString(char *buffer)
+{
+ static char telString[100];
+ char *tempPtr;
+
+ memset(telString,0,100);
+ strcpy(telString,"0000");
+
+ if (buffer != NULL) {
+ if ((tempPtr=strstr(buffer,"TEL:"))!=NULL) {
+ tempPtr += 4;
+ int remainderLen = strlen(tempPtr);
+ int count;
+ for(count=0;count<remainderLen;count++) {
+ if (tempPtr[count] != ',') {
+ telString[count] = tempPtr[count];
+ }
+ else break;
+ }
+ }
+ }
+ return(telString);
+
+}
+
+
+/*
+ * GetQ850CauseCodeName
+ */
+char *
+GetQ850CauseCodeName(unsigned char cause_value)
+{
+ DBG_FUNC("GetQ850CauseCodeName",H323_LAYER);
+ DBG_ENTER();
+ static char cause_value_str[100];
+ memset(cause_value_str,0,100);
+ switch(cause_value) {
+ case Q850_CAUSE_UNALLOCATED_NUM:{
+ strncpy(cause_value_str,"Unallocated (unassigned) number",100);
+ }
+ break;
+ case Q850_CAUSE_NO_ROUTE_TO_NET:{
+ strncpy(cause_value_str,"No route to specified transit network",100);
+ }
+ break;
+ case Q850_CAUSE_NO_ROUTE_TO_DEST:{
+ strncpy(cause_value_str,"No route to destination",100);
+ }
+ break;
+ case Q850_CAUSE_SEND_SPECIAL_TONE:{
+ strncpy(cause_value_str,"Send special information tone",100);
+ }
+ break;
+ case Q850_CAUSE_MISDIALED_TRUNK_PREFIX:{
+ strncpy(cause_value_str,"Misdialled trunk prefix",100);
+ }
+ break;
+ case Q850_CAUSE_CHANNEL_UNACCEPTABLE:{
+ strncpy(cause_value_str,"Channel unacceptable",100);
+ }
+ break;
+ case Q850_CAUSE_CALL_AWARDED_IN_EST_CHANNEL:{
+ strncpy(cause_value_str,"Call awarded and being delivered in an established channel",100);
+ }
+ break;
+ case Q850_CAUSE_PREEMPTION:{
+ strncpy(cause_value_str,"Preemption",100);
+ }
+ break;
+ case Q850_CAUSE_PREEMTION_CKT_RESVD:{
+ strncpy(cause_value_str,"Preemption - circuit reserved for reuse",100);
+ }
+ break;
+ case Q850_CAUSE_NORMAL_CLEARING:{
+ strncpy(cause_value_str,"Normal call clearing",100);
+ }
+ break;
+ case Q850_CAUSE_USER_BUSY:{
+ strncpy(cause_value_str,"User busy",100);
+ }
+ break;
+ case Q850_CAUSE_NO_USER_RESPONDING:{
+ strncpy(cause_value_str,"No user responding",100);
+ }
+ break;
+ case Q850_CAUSE_NO_ANSWER:{
+ strncpy(cause_value_str,"No answer from user (user alerted)",100);
+ }
+ break;
+ case Q850_CAUSE_SUBS_ABSENT:{
+ strncpy(cause_value_str,"Subscriber absent",100);
+ }
+ break;
+ case Q850_CAUSE_CALL_REJECTED:{
+ strncpy(cause_value_str,"Call rejected",100);
+ }
+ break;
+ case Q850_CAUSE_NUM_CHANGED:{
+ strncpy(cause_value_str,"Number changed",100);
+ }
+ break;
+ case Q850_CAUSE_NON_SELECTED_USER_CLEARING:{
+ strncpy(cause_value_str,"Non-selected user clearing",100);
+ }
+ break;
+ case Q850_CAUSE_DEST_OUT_OF_ORDER:{
+ strncpy(cause_value_str,"Destination out of order",100);
+ }
+ break;
+ case Q850_CAUSE_INVALID_NUM_FORMAT:{
+ strncpy(cause_value_str,"Invalid number format (address incomplete)",100);
+ }
+ break;
+ case Q850_CAUSE_FACILITY_REJECTED:{
+ strncpy(cause_value_str,"Facility rejected",100);
+ }
+ break;
+ case Q850_CAUSE_STATUS_ENQUIRY_RESPONSE:{
+ strncpy(cause_value_str,"Response to STATUS ENQUIRY",100);
+ }
+ break;
+ case Q850_CAUSE_NORMAL_UNSPECIFIED:{
+ strncpy(cause_value_str,"Normal, unspecified",100);
+ }
+ case Q850_CAUSE_NO_CIRCUIT_AVAILABLE:{
+ strncpy(cause_value_str,"No ciruit/channel available",100);
+ }
+ break;
+ case Q850_CAUSE_NET_OUT_OF_ORDER:{
+ strncpy(cause_value_str,"Network out of order",100);
+ }
+ break;
+ case Q850_CAUSE_PFMC_OUT_OF_SERVICE:{
+ strncpy(cause_value_str,"Permanent frame mode connection out of service",100);
+ }
+ break;
+ case Q850_CAUSE_PFMC_OPERATIONAL:{
+ strncpy(cause_value_str,"Permanent frame mode connection operational",100);
+ }
+ break;
+ case Q850_CAUSE_TEMP_FAILURE:{
+ strncpy(cause_value_str,"Temporary failure",100);
+ }
+ break;
+ case Q850_CAUSE_SWITCH_CONGESTION:{
+ strncpy(cause_value_str,"Switching equipment congestion",100);
+ }
+ break;
+ case Q850_CAUSE_ACCESS_INFO_DISCARDED:{
+ strncpy(cause_value_str,"Access information discarded",100);
+ }
+ break;
+ case Q850_CAUSE_REQUESTED_CKT_UNAVAILABLE:{
+ strncpy(cause_value_str,"Requested circuit/channel not available",100);
+ }
+ break;
+ case Q850_CAUSE_PRECEDENCE_CALL_BLOCKED:{
+ strncpy(cause_value_str,"Precedence call blocked",100);
+ }
+ break;
+ case Q850_CAUSE_RESOURCE_UNAVAIL_UNSPECIFIED:{
+ strncpy(cause_value_str,"Resource unavailable, unspecified",100);
+ }
+ break;
+ case Q850_CAUSE_QOS_UNAVAILABLE:{
+ strncpy(cause_value_str,"Quality of service unavailable",100);
+ }
+ break;
+ case Q850_CAUSE_REQ_FACILITY_NOT_SUBSCRIBED:{
+ strncpy(cause_value_str,"Requested facility not subscribed",100);
+ }
+ break;
+ case Q850_CAUSE_CUG_OUTCALL_BARRED:{
+ strncpy(cause_value_str,"Outgoing calls barred within CUG",100);
+ }
+ break;
+ case Q850_CAUSE_CUG_INCALL_BARRED:{
+ strncpy(cause_value_str,"Incoming calls barred within CUG",100);
+ }
+ break;
+ case Q850_CAUSE_BEARER_CAP_NOT_AUTH:{
+ strncpy(cause_value_str,"Bearer capability not authorized",100);
+ }
+ break;
+ case Q850_CAUSE_BEARER_CAP_NOT_AVAIL:{
+ strncpy(cause_value_str,"Bearer capability not presently available",100);
+ }
+ break;
+ case Q850_CAUSE_INCONSISTENCY_ACCESS_INFO:{
+ strncpy(cause_value_str,"Inconsistency in designated outgoing access information and subscriber class",100);
+ }
+ break;
+ case Q850_CAUSE_SERVICE_NOT_AVAILABLE:{
+ strncpy(cause_value_str,"Service or option not available, unspecified",100);
+ }
+ break;
+ case Q850_CAUSE_BEARER_CAP_NOT_IMPLEMENTED:{
+ strncpy(cause_value_str,"Bearer capability not implemented",100);
+ }
+ break;
+ case Q850_CAUSE_CHANNEL_TYPE_NOT_IMPLEMENTED:{
+ strncpy(cause_value_str,"Channel type not implemented",100);
+ }
+ break;
+ case Q850_CAUSE_REQ_FACILITY_NOT_IMPLEMENTED:{
+ strncpy(cause_value_str,"Requested facility not implemented",100);
+ }
+ break;
+ case Q850_CAUSE_RESTRICTED_CAP_AVAILABLE:{
+ strncpy(cause_value_str,"Only restricted digital information bearer capability is available",100);
+ }
+ break;
+ case Q850_CAUSE_SERVICE_NOT_IMPL_UNSPECIFIED:{
+ strncpy(cause_value_str,"Service or option not implemented, unspecified",100);
+ }
+ break;
+ case Q850_CAUSE_INVALID_CRV:{
+ strncpy(cause_value_str,"Invalid call reference value",100);
+ }
+ break;
+ case Q850_CAUSE_IDENTIFIED_CHANNEL_NOT_EXIST:{
+ strncpy(cause_value_str,"Identified channel does not exist",100);
+ }
+ break;
+ case Q850_CAUSE_SUSPENDED_CALL_EXISTS:{
+ strncpy(cause_value_str,"A suspended call exists, but this call identity does not",100);
+ }
+ break;
+ case Q850_CAUSE_CALL_ID_IN_USE:{
+ strncpy(cause_value_str,"Call identity in use",100);
+ }
+ break;
+ case Q850_CAUSE_NO_CALL_SUSPENDED:{
+ strncpy(cause_value_str,"No call suspended",100);
+ }
+ break;
+ case Q850_CAUSE_REQ_CALL_ID_CLEARED:{
+ strncpy(cause_value_str,"Call having requested call identity has been cleared",100);
+ }
+ break;
+ case Q850_CAUSE_USER_NOT_CUG_MEMBER:{
+ strncpy(cause_value_str,"User not member of CUG",100);
+ }
+ break;
+ case Q850_CAUSE_INCOMPATIBLE_DEST:{
+ strncpy(cause_value_str,"Incompatible destination",100);
+ }
+ break;
+ case Q850_CAUSE_NON_EXISTENT_CUG:{
+ strncpy(cause_value_str,"Non-existent CUG",100);
+ }
+ break;
+ case Q850_CAUSE_INVALID_TRANSIT_NETWORK:{
+ strncpy(cause_value_str,"Invalid transit network selection",100);
+ }
+ break;
+ case Q850_CAUSE_INVALID_MSG:{
+ strncpy(cause_value_str,"Invalid message, unspecified",100);
+ }
+ break;
+ case Q850_CAUSE_MANDATORY_IE_MISSING:{
+ strncpy(cause_value_str,"Mandatory Information Element is missing",100);
+ }
+ break;
+ case Q850_CAUSE_MSG_TYPE_NON_EXISTENT:{
+ strncpy(cause_value_str,"Message type non-existent or not implemented",100);
+ }
+ break;
+ case Q850_CAUSE_MSG_NOT_COMPAT_STATE_NOT_IMPL:{
+ strncpy(cause_value_str,"Message not compatible with call state or message type non-existent or not implemented",100);
+ }
+ break;
+ case Q850_CAUSE_IE_PARAM_NON_EXISTENT:{
+ strncpy(cause_value_str,"Information Element/parameter non-existent or not implemented",100);
+ }
+ break;
+ case Q850_CAUSE_INVALID_IE_CONTENTS:{
+ strncpy(cause_value_str,"Invalid Information Element contents",100);
+ }
+ break;
+ case Q850_CAUSE_MSG_NOT_COMPAT_STATE:{
+ strncpy(cause_value_str,"Message not compatible with call state",100);
+ }
+ break;
+ case Q850_CAUSE_TIMER_EXPIRY_RECOVER:{
+ strncpy(cause_value_str,"Recover on timer expiry",100);
+ }
+ break;
+ case Q850_CAUSE_PARAM_NOT_IMPL_PASSED_ON:{
+ strncpy(cause_value_str,"Parameter non-existent or not implemented, passed on",100);
+ }
+ break;
+ case Q850_CAUSE_MSG_PARAM_UNRECOGNIZED_DISCARDED:{
+ strncpy(cause_value_str,"Message with unrecognized parameter, discarded",100);
+ }
+ break;
+ case Q850_CAUSE_PROTOCOL_ERROR_UNSPECIFIED:{
+ strncpy(cause_value_str,"Protocol error, unspecified",100);
+ }
+ break;
+ case Q850_CAUSE_INTERWORKING_UNSPECIFIED:{
+ strncpy(cause_value_str,"Interworking, unspecified",100);
+ }
+ break;
+ default: {
+ strncpy(cause_value_str,"UNKNOWN cause value",100);
+ }
+ break;
+ }
+ DBG_LEAVE();
+ return(cause_value_str);
+}
diff --git a/data/mnet/GP10/Host/voip/src/vblink.cpp b/data/mnet/GP10/Host/voip/src/vblink.cpp
new file mode 100644
index 0000000..6b448b7
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/src/vblink.cpp
@@ -0,0 +1,3658 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : vblink.cpp *
+ * *
+ * Description : Socket interface for proprietary msging between VC & VB *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <vxworks.h>
+#include <socklib.h>
+#include <tasklib.h>
+#include <sysLib.h>
+#include <string.h>
+#include <time.h>
+
+#include "Os/JCTask.h"
+#include "Os/JCModule.h"
+#include "GP10OsTune.h"
+#include "logging/vcmodules.h"
+#include "logging/vclogging.h"
+#include "voip/vblink.h"
+#include "voip/mncalxfr.h"
+#include "Jcc/LudbApi.h"
+#include "oam_api.h"
+#include "AlarmCode.h"
+#include "MnetModuleId.h"
+#include "util.h"
+
+// ext-HO <chenj:05-15-01>
+#include "Jcc/JCCEHoMsg.h"
+
+// Instead of including JcVcToVc.h, just define the types that
+// are needed in this module. For the long term, must solve
+// this cyclical include problem
+// #include "Jcc/JcVcToVc.h"
+
+#include "voip/exchangeho.h"
+
+
+VBLINK_CONFIG VBLinkConfig;
+JCTask VBLinkTaskObj("VBLink");
+static int KeepAliveInterval=20,MaxKeepAliveTxCount=3;
+
+
+// ext-HO <chenj:06-15-01>
+extern MSG_Q_ID ccMsgQId;
+
+// MGPLA <chenj:08-07-01>
+extern MSG_Q_ID mmMsgQId;
+
+
+/*
+ * SysCommand_VBLink
+ */
+
+int SysCommand_VBLink(T_SYS_CMD action)
+{
+ int tid;
+
+ switch(action){
+ case SYS_SHUTDOWN:
+ printf("[VBLink] Received system shutdown notification\n");
+ break;
+ case SYS_START:
+ printf("[VBLink] Received task start notification\n");
+ if(!InitializeVBLink())
+ printf("VBLink initialization failed\n");
+ break;
+ case SYS_REBOOT:
+ printf("[VBLink] Reboot ready.\n");
+ break;
+ default:
+ printf("[VBLink] Unknown system command received\n");
+ }
+ return 0;
+}
+
+/*
+ * InitializeVBLink
+ */
+BOOL
+InitializeVBLink()
+{
+ DBG_FUNC("InitializeVBLink",VBLINK_LAYER);
+ DBG_ENTER();
+ BOOL retStatus = FALSE;
+ unsigned long GKIPAddress;
+ unsigned char gkIpAddrOctets[4];
+
+ VBLinkSetOAMTrap(VBLINK_VIPERBASE_LINK_NOT_UP);
+
+ memset(&VBLinkConfig,0,sizeof(VBLinkConfig));
+
+ VBLinkConfig.ConnectedToViperBase = FALSE;
+ VBLinkConfig.RetryConnects = TRUE;
+
+ if (oam_getMibIntVar(MIB_h323_GKIPAddress, (long int*)&GKIPAddress) != STATUS_OK)
+ {
+ DBG_ERROR("Unable to get GateKeeper IP address from OAM!!\n");
+ return retStatus;
+ }
+ else {
+ DBG_TRACE("GateKeeper IP address OAM value %ld\n",GKIPAddress);
+ }
+
+ gkIpAddrOctets[0] = (GKIPAddress >> 24) & 0x000000ff;
+ gkIpAddrOctets[1] = (GKIPAddress >> 16) & 0x000000ff;
+ gkIpAddrOctets[2] = (GKIPAddress >> 8) & 0x000000ff;
+ gkIpAddrOctets[3] = (GKIPAddress) & 0x000000ff;
+
+ memset(VBLinkConfig.szViperBaseAddress,0,VBLINK_MAX_IP_ADDR_STR_LEN);
+ sprintf(VBLinkConfig.szViperBaseAddress,"%u.%u.%u.%u",gkIpAddrOctets[0],gkIpAddrOctets[1],gkIpAddrOctets[2],gkIpAddrOctets[3]);
+
+
+ if (!VBLinkPrepareSocket()) {
+ DBG_ERROR("Unable to connect to GMC, cannot proceed!!\n");
+ DBG_LEAVE();
+ return(retStatus);
+ }
+ if (VBLinkTaskObj.JCTaskSpawn(VBLINK_TASK_PRIORITY, VBLINK_TASK_OPTION, VBLINK_TASK_STACK_SIZE,
+ (FUNCPTR) VBLink, 0,0,0,0, 0, 0, 0, 0, 0, 0,MODULE_VBLINK,JC_CRITICAL_TASK) == ERROR){
+ DBG_ERROR("Unable to spawn VBLink task!!\n");
+ close(VBLinkConfig.VBSocket);
+ }
+ else {
+ DBG_TRACE("Spawned VBLink Task successfully!\n");
+ retStatus=TRUE;
+ }
+
+ DBG_LEAVE();
+ return(retStatus);
+}
+
+
+
+/*
+ * VBLinkPrepareSocket
+ */
+BOOL
+VBLinkPrepareSocket()
+{
+ DBG_FUNC("VBLinkPrepareSocket",VBLINK_LAYER);
+ DBG_ENTER();
+
+ struct sockaddr_in localAddress;
+ int AddrSize,KeepAliveOn= 1;
+ BOOL retStatus=FALSE;
+
+ VBLinkConfig.VBSocket = socket(AF_INET,SOCK_STREAM,0);
+
+ if (VBLinkConfig.VBSocket == ERROR) {
+ DBG_ERROR("Unable to allocate socket for connecting to GMC!!\n");
+ perror("VBLink Socket");
+ DBG_LEAVE();
+ return(retStatus);
+ }
+
+ setsockopt(VBLinkConfig.VBSocket, SOL_SOCKET, SO_KEEPALIVE, (char *)&KeepAliveOn, sizeof(KeepAliveOn));
+
+ AddrSize = sizeof(localAddress);
+ memset(&localAddress,0,sizeof(localAddress));
+
+ localAddress.sin_family = AF_INET;
+ localAddress.sin_addr.s_addr = INADDR_ANY;
+ localAddress.sin_port = 0;
+
+ if (bind(VBLinkConfig.VBSocket,(struct sockaddr *)&localAddress,AddrSize)==ERROR) {
+ DBG_ERROR("Unable to bind VBLink socket\n");
+ perror("VBApi Bind");
+ close(VBLinkConfig.VBSocket);
+ DBG_LEAVE();
+ return(retStatus);
+ }
+
+ memset(&VBLinkConfig.ViperBaseAddress,0,sizeof(VBLinkConfig.ViperBaseAddress));
+
+ VBLinkConfig.ViperBaseAddress.sin_family = AF_INET;
+ VBLinkConfig.ViperBaseAddress.sin_addr.s_addr = inet_addr(VBLinkConfig.szViperBaseAddress);
+ VBLinkConfig.ViperBaseAddress.sin_port = htons(VBLINK_PORT);
+
+ /* Need to read these values from somewhere */
+ VBLinkConfig.LastKeepAliveTimestamp = 0;
+ VBLinkConfig.KeepAliveInterval = KeepAliveInterval;
+ VBLinkConfig.MaxKeepAliveTxCount = MaxKeepAliveTxCount;
+ VBLinkConfig.KeepAliveTxCount = 0;
+
+
+ retStatus = TRUE;
+ DBG_LEAVE();
+ return(retStatus);
+}
+
+
+/*
+ * VBLinkStatus
+ */
+BOOL
+VBLinkStatus()
+{
+ DBG_FUNC("VBLinkStatus",VBLINK_LAYER);
+ DBG_ENTER();
+ DBG_LEAVE();
+ return(VBLinkConfig.ConnectedToViperBase);
+}
+
+
+
+
+
+
+/*
+ * VBLinkGetInterval
+ */
+BOOL
+VBLinkGetInterval(struct timeval *WaitTime)
+{
+ DBG_FUNC("VBLinkGetInterval",VBLINK_LAYER);
+ DBG_ENTER();
+ time_t TimeNow;
+ unsigned long delta;
+
+ WaitTime->tv_usec = 0;
+ /*
+ * First check the time now and see if you need
+ * to send the keepalive now
+ */
+ time(&TimeNow);
+
+ if (TimeNow >= (VBLinkConfig.LastKeepAliveTimestamp+VBLinkConfig.KeepAliveInterval)) {
+ /*
+ * Yes, we should send one immediately
+ */
+ if (!VBLinkSendKeepAlive()) {
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ VBLinkConfig.LastKeepAliveTimestamp = TimeNow;
+ if (VBLinkConfig.KeepAliveTxCount >= VBLinkConfig.MaxKeepAliveTxCount) {
+ /*
+ * Looks like we sent the max permitted without getting
+ * an ack back, so we should declare the GMC as dead ;-)
+ */
+ DBG_ERROR("Timed out on VBLINK Application Keep Alives with GMC\n",
+ VBLinkConfig.KeepAliveTxCount,VBLinkConfig.MaxKeepAliveTxCount);
+ DBG_LEAVE();
+ return (FALSE);
+ }
+ DBG_TRACE("Last Timestamp %#x\n",VBLinkConfig.LastKeepAliveTimestamp);
+ WaitTime->tv_sec = VBLinkConfig.KeepAliveInterval;
+ DBG_LEAVE();
+ return(TRUE);
+ }
+
+
+ delta = (VBLinkConfig.LastKeepAliveTimestamp + VBLinkConfig.KeepAliveInterval) - TimeNow;
+
+ if (delta > VBLinkConfig.KeepAliveInterval) {
+ DBG_ERROR("Error in VBLink Keepalives, last keep alive at %#x, time now %#x, delta %#x, configured interval %#xu\n",
+ VBLinkConfig.LastKeepAliveTimestamp,TimeNow,delta,VBLinkConfig.KeepAliveInterval);
+ WaitTime->tv_sec = VBLinkConfig.KeepAliveInterval;
+ }
+ else {
+ DBG_TRACE("KeepAlive Delta %#x seconds\n",delta);
+ WaitTime->tv_sec = delta;
+ }
+
+ DBG_LEAVE();
+ return(TRUE);
+}
+
+
+
+
+/*
+ * VBLinkSendKeepAlive
+ */
+BOOL
+VBLinkSendKeepAlive()
+{
+ DBG_FUNC("VBLinkSendKeepAlive",VBLINK_LAYER);
+ DBG_ENTER();
+ time_t ltime;
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short *pActualDataLen;
+ STATUS status;
+ BOOL ret_status = FALSE;
+
+ /* Get UNIX-style time and display as number and string. */
+ time(&ltime);
+ DBG_TRACE("Sending KeepAlive to GMC at %s: %#x UTC\n",ctime(&ltime),ltime);
+
+
+ /* packing and sending echo back */
+ pszBuffer = buffer;
+ nSize = 0;
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypeKeepAlive, &pszBuffer, &nSize );
+
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *)sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)],buffer,nSize);
+
+ status = send(VBLinkConfig.VBSocket,sendBuffer,(nSize+2),0);
+ if (status == ERROR) {
+ DBG_ERROR("Unable to send KeepAlive to GMC, %d!\n",errno);
+ }
+ else {
+ ret_status = TRUE;
+ VBLinkConfig.KeepAliveTxCount++;
+ DBG_TRACE("Sent KeepAlive, UnAcked KeepAlive count %d\n",VBLinkConfig.KeepAliveTxCount);
+ }
+
+ DBG_LEAVE();
+ return(ret_status);
+}
+
+
+
+
+
+
+
+
+
+
+
+/*
+ * VBLinkShowStatus
+ */
+int
+VBLinkShowStatus()
+{
+ DBG_FUNC("VBLinkShowStatus",VBLINK_LAYER);
+ DBG_ENTER();
+
+ printf("VBLink status = ");
+ if (VBLinkConfig.ConnectedToViperBase) {
+ printf("CONNECTED\n");
+ }
+ else {
+ printf("DISCONNECTED\n");
+ }
+
+ DBG_LEAVE();
+ return(0);
+}
+
+
+/*
+ * VBLinkSetRetryConnect
+ */
+int
+VBLinkSetRetryConnect(int a)
+{
+ if (a>0) {
+ VBLinkConfig.RetryConnects = TRUE;
+ printf("Will keep on retrying connecting to GMC forever\n");
+ }
+ else {
+ VBLinkConfig.RetryConnects = FALSE;
+ printf("Will no longer retry connecting to GMC\n");
+ }
+ return(0);
+}
+
+
+/*
+ * VBLink
+ */
+void
+VBLink()
+{
+ DBG_FUNC("VBLink",VBLINK_LAYER);
+ DBG_ENTER();
+ STATUS status;
+ BOOL retStatus,WaitingForFragment;
+ char recvBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short totalLen, reqdSize, *actualPktLen,expectedLen;
+ struct timeval WaitTime;
+
+ VBLinkTaskObj.JCTaskEnterLoop();
+
+ if (!VBLinkConfig.ConnectedToViperBase) {
+ if (!VBLinkReconnectLoop()) {
+ close(VBLinkConfig.VBSocket);
+ return;
+ }
+ }
+
+ totalLen = 0;
+ reqdSize = VBLINK_MAX_MESSAGE_SIZE;
+ WaitingForFragment = FALSE;
+
+ VBLinkGetInterval(&WaitTime);
+
+ while(1) {
+
+ FD_ZERO(&VBLinkConfig.ReadSet);
+ FD_SET(VBLinkConfig.VBSocket,&VBLinkConfig.ReadSet);
+ status = select(FD_SETSIZE,&VBLinkConfig.ReadSet,0,0,&WaitTime);
+
+ if (status == 0) {
+ if (!VBLinkGetInterval(&WaitTime)) {
+ /* Looks like the connection has timed out */
+ DBG_ERROR("KeepAlive timed out, connection to GMC broken!!!\n");
+ VBLinkConfig.ConnectedToViperBase = FALSE;
+ VBLinkSetOAMTrap(VBLINK_VIPERBASE_LINK_LOST);
+ close(VBLinkConfig.VBSocket);
+ FD_CLR(VBLinkConfig.VBSocket,&VBLinkConfig.ReadSet);
+ if (!VBLinkPrepareSocket()) {
+ printf("Exiting VBLink application\n");
+ DBG_LEAVE();
+ return;
+ }
+ if (!VBLinkReconnectLoop()) {
+ printf("Exiting VBLink application\n");
+ DBG_LEAVE();
+ return;
+ }
+ }
+
+ }
+ else {
+ status = recv(VBLinkConfig.VBSocket,(char *)&recvBuffer[totalLen],reqdSize,0);
+ if ((status == ERROR) || (status == 0)){
+ /* Looks like the connection was reset */
+ DBG_ERROR("Connection to GMC broken!!!\n");
+ VBLinkConfig.ConnectedToViperBase = FALSE;
+ VBLinkSetOAMTrap(VBLINK_VIPERBASE_LINK_LOST);
+ close(VBLinkConfig.VBSocket);
+ FD_CLR(VBLinkConfig.VBSocket,&VBLinkConfig.ReadSet);
+ if (!VBLinkPrepareSocket()) {
+ printf("Exiting VBLink application\n");
+ DBG_LEAVE();
+ return;
+ }
+ if (!VBLinkReconnectLoop()) {
+ printf("Exiting VBLink application\n");
+ DBG_LEAVE();
+ return;
+ }
+ }
+ else {
+ /* successful reception of data */
+ totalLen += status;
+ if (!WaitingForFragment) {
+ /* beginning of request msg, get the expected length */
+ actualPktLen = (unsigned short *)recvBuffer;
+ expectedLen = ntohs(*actualPktLen)+2;
+ }
+ DBG_TRACE("Received msg of %d bytes, expected msg size %d bytes\n",totalLen,expectedLen);
+ reevaluate:
+ if (totalLen == expectedLen) {
+ /* Looks like we have received the complete packet */
+ DBG_TRACE("Received complete message of size %d bytes\n",expectedLen);
+ retStatus=ProcessViperBaseMessage((unsigned char *)&recvBuffer[sizeof(short)],totalLen);
+ totalLen = 0;
+ reqdSize = VBLINK_MAX_MESSAGE_SIZE;
+ WaitingForFragment = FALSE;
+ memset(recvBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ }
+ else if (totalLen > expectedLen) {
+ DBG_TRACE("Received multiple msgs in packet, recvd size %d expected size %d\n",totalLen,expectedLen);
+ char scrapBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ memcpy(scrapBuffer,recvBuffer,expectedLen);
+ retStatus=ProcessViperBaseMessage((unsigned char *)&scrapBuffer[sizeof(short)],expectedLen);
+ totalLen = totalLen - expectedLen;
+ DBG_TRACE("Second fragment size %d\n",totalLen);
+ memcpy(scrapBuffer,&recvBuffer[expectedLen],totalLen);
+ memset(recvBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ memcpy(recvBuffer,scrapBuffer,totalLen);
+ actualPktLen = (unsigned short *)recvBuffer;
+ expectedLen = ntohs(*actualPktLen)+2;
+ goto reevaluate;
+ }
+ else {
+ /* Received only a fragment, wait for the rest */
+ WaitingForFragment = TRUE;
+ reqdSize = expectedLen - totalLen;
+ }
+
+ }
+ }
+ }
+ VBLinkTaskObj.JCTaskNormExit();
+ DBG_LEAVE();
+}
+
+
+
+
+
+
+/*
+ * ProcessViperBaseMessage
+ */
+BOOL
+ProcessViperBaseMessage(unsigned char *buffer,int nDataSize)
+{
+ DBG_FUNC("ProcessViperBaseMessage",VBLINK_LAYER);
+ DBG_ENTER();
+
+ UCHAR* pszBuffer;
+ NonStdRasMessageType Msg;
+ unsigned short nonStdMsgType;
+ MOBILE_ID MobileId;
+ LUDB_ID LudbId;
+ int nonStdProtocolValue;
+ DBG_TRACE("GMC message %d bytes long\n",nDataSize);
+
+ pszBuffer = buffer;
+
+ nonStdProtocolValue = jcUShortUnpack( &pszBuffer );
+ if (nonStdProtocolValue != NON_STD_RAS_PROTOCOL) {
+ DBG_ERROR("Non std protocol not specified in GMC message (buffer value=%d)!!!\n", nonStdProtocolValue);
+ DBG_TRACE(" \nbuffer hexdump: ");
+ DBG_HEXDUMP((unsigned char*) buffer, nDataSize );
+ DBG_TRACE("\n");
+ }
+ nonStdMsgType = jcUShortUnpack( &pszBuffer );
+
+
+ switch(nonStdMsgType) /* message type */
+ {
+ case NonStdRasMessageTypeKeepAlive:
+ {
+ VBLinkConfig.KeepAliveTxCount--;
+ DBG_TRACE("Received KeepAlive ACK from GMC; UnAcked KeepAlive count %d\n",VBLinkConfig.KeepAliveTxCount);
+ break;
+ }
+
+
+ case NonStdRasMessageTypeRCF:
+ {
+ NonStdRasMessageRCF_t MsgRCF;
+
+ jcNonStdRasMessageRCFUnpack( &MsgRCF, &pszBuffer );
+ jcStringToBCD(MsgRCF.pszMobileID, MobileId.digits, &MobileId.numDigits);
+
+ DBG_TRACE("RCF received for %s\n",MsgRCF.pszMobileID);
+
+ SendVBLinkRegEvent(VBLINK_MOBILE_REG_EVENT_RECV_RCF, MobileId);
+
+ break;
+ }
+
+ case NonStdRasMessageTypeRRJ:
+ {
+ NonStdRasMessageRRJ_t MsgRRJ;
+
+ jcNonStdRasMessageRRJUnpack( &MsgRRJ, &pszBuffer );
+ jcStringToBCD(MsgRRJ.pszMobileID, MobileId.digits, &MobileId.numDigits);
+
+ DBG_TRACE("RRJ received for %s\n", MsgRRJ.pszMobileID);
+
+ SendVBLinkRegEvent(VBLINK_MOBILE_REG_EVENT_RECV_RRJ, MobileId);
+
+
+ break;
+ }
+
+ case NonStdRasMessageTypeUCF:
+ {
+ NonStdRasMessageUCF_t MsgUCF;
+
+ jcNonStdRasMessageUCFUnpack( &MsgUCF, &pszBuffer );
+ jcStringToBCD(MsgUCF.pszMobileID, MobileId.digits, &MobileId.numDigits);
+
+ DBG_TRACE("UCF received for %s\n", MsgUCF.pszMobileID);
+
+ SendVBLinkRegEvent(VBLINK_MOBILE_REG_EVENT_RECV_UCF, MobileId);
+
+ break;
+ }
+
+ case NonStdRasMessageTypeURQ:
+ {
+ NonStdRasMessageURQ_t MsgURQ;
+
+ jcNonStdRasMessageURQUnpack( &MsgURQ, &pszBuffer );
+ jcStringToBCD(MsgURQ.pszMobileID, MobileId.digits, &MobileId.numDigits);
+
+ DBG_TRACE("URQ received for %s\n", MsgURQ.pszMobileID);
+
+ SendVBLinkRegEvent(VBLINK_MOBILE_REG_EVENT_RECV_URQ, MobileId);
+
+ break;
+ }
+
+ case NonStdRasMessageTypeCellLRJ:
+ {
+ NonStdRasMessageCellLRJ_t CellLRJ;
+
+ jcNonStdRasMessageCellLRJUnpack(&CellLRJ, &pszBuffer);
+
+ DBG_TRACE("Could not get IP for Cell id %s, Location Request rejected!!\n",CellLRJ.pszCellID);
+
+ // PR CSCdv18197 <chenj:08-27-01>
+ // Send a string "0" instead of NULL for rejected case
+ SendIpAddressResponse(CellLRJ.pszCellID,"0\n",CellLRJ.hCell);
+
+ break;
+ }
+ case NonStdRasMessageTypeCellLCF:
+ {
+ NonStdRasMessageCellLCF_t CellLCF;
+
+ jcNonStdRasMessageCellLCFUnpack( &CellLCF, &pszBuffer);
+
+ DBG_TRACE("Received IP %s for Cell Id %s\n",CellLCF.pszIpAddress,CellLCF.pszCellID);
+
+ SendIpAddressResponse(CellLCF.pszCellID,CellLCF.pszIpAddress,CellLCF.hCell);
+
+ break;
+ }
+
+ case NonStdRasMessageTypeMobileProfile:
+ {
+ NonStdRasMessageMobileProfile_t MobileProfile;
+ BOOL ludbProfileUpdateStatus;
+
+ jcNonStdRasMessageMobileProfileUnpack(&MobileProfile, &pszBuffer);
+ jcStringToBCD(MobileProfile.pszMobileID, MobileId.digits, &MobileId.numDigits);
+
+ DBG_TRACE("Mobile profile received for %s\n", MobileProfile.pszMobileID);
+
+ ludbProfileUpdateStatus=ludbProfileUpdate(MobileId, MobileProfile.nProfileSize, (char *)MobileProfile.pProfileData);
+ if (!ludbProfileUpdateStatus) {
+ DBG_ERROR("LUDB returned error for Profile Update!!\n");
+ }
+ else {
+ DBG_TRACE("Updated LUDB with Mobile Profile successfully\n");
+ }
+ break;
+ }
+
+ /* CISS message Network -> Mobile Station */
+ case NonStdRasMessageTypeNetToMsCISS:
+ {
+ NonStdRasMessageCISS_t cissMsg;
+ bool status;
+
+ jcNonStdRasMessageMobileCISSUnpack(&cissMsg, &pszBuffer);
+ jcStringToBCD(cissMsg.pszMobileID, MobileId.digits, &MobileId.numDigits);
+
+ LudbId = ludbGetEntryByMobileId(MobileId);
+
+ DBG_TRACE("Network to Mobile message (ludb ID = %d)\n", LudbId);
+
+ status = ccCissProcessViperBaseMsg(LudbId, (char *) cissMsg.pMsgData, cissMsg.nMsgSize);
+ if (status) {
+ DBG_TRACE("CISS Mobile message was sent successfully\n");
+ } else {
+ DBG_ERROR("Sending CISS mobile message failure\n");
+ }
+ break;
+ }
+
+ /* SMSPP message SMR -> SMC at network side */
+ case NonStdRasMessageTypeNetToMsSMSPP:
+ {
+ NonStdRasMessageSMSPP_t smsppNonStdRasMsg;
+ bool status;
+
+ jcNonStdRasMessageMobileSmsppUnpack(&smsppNonStdRasMsg, &pszBuffer);
+ jcStringToBCD(smsppNonStdRasMsg.pszMobileID, MobileId.digits, &MobileId.numDigits);
+
+ LudbId = ludbGetEntryByMobileId(MobileId);
+
+ DBG_TRACE("SMSPP messgage from SMR to SMC at network side (ludb ID = %d)\n", LudbId);
+
+ status = smsReceiveSmrMsg(LudbId, (unsigned char *) smsppNonStdRasMsg.pMsgData, smsppNonStdRasMsg.nMsgSize);
+ if (status) {
+ DBG_TRACE("SMSPP SMR->SMC message was sent successfully\n");
+ } else {
+ DBG_ERROR("SMSPP SMR->SMC message delivery failure\n");
+ }
+ break;
+ }
+
+
+ case NonStdRasMessageTypeCellSynchronize:
+ {
+ NonStdRasMessageCellSynchronize_t CellSync;
+ BOOL Status=FALSE;
+ VOIP_API_MESSAGE ApiMsg;
+
+ jcNonStdRasMessageCellSynchronizeUnpack(&CellSync,&pszBuffer);
+ if (CellSync.nMode == jcCellDown) {
+ DBG_TRACE("ViperCell with cell id %s has gone down!!\n",CellSync.pszCellID);
+ Status=CcVBLinkCellStatusUpdate(CellSync.pszCellID,VC_STATUS_DOWN);
+ if (!Status) {
+ DBG_ERROR("CC returned error for ViperCell %s down msg!!\n",CellSync.pszCellID);
+ }
+ }
+ else {
+ DBG_ERROR("VBLink :: Unsupported case!!!\n");
+ }
+ }
+ break;
+
+
+ case NonStdRasMessageTypeSRS:
+ {
+
+ NonStdRasMessageSRS_t MobileSRS;
+
+ jcNonStdRasMessageSRSUnpack(&MobileSRS,&pszBuffer);
+ jcStringToBCD(MobileSRS.pszMobileID, MobileId.digits, &MobileId.numDigits);
+
+ ludbSRSUpdate(MobileId, MobileSRS.nAuthSets, MobileSRS.pAuthSets);
+ }
+ break;
+
+ case NonStdRasMessageTypeTransferConfirm:
+ {
+ MnetRasTransferConfirm_t transferConfirm;
+ bool status;
+ VOIP_CALL_DESTINATION_ADDRESS CalledParty;
+ char destNumBuffer[256];
+
+ memset(&CalledParty,0,sizeof(VOIP_CALL_DESTINATION_ADDRESS));
+
+ jcNonStdRasMessageTransferConfirmUnpack(&transferConfirm,&pszBuffer );
+
+ VBLinkGetGsmNumberType(&CalledParty.numberType,transferConfirm.destinationAliasAddress);
+
+ jcStringToBCD(transferConfirm.destinationAliasAddress.numberDigits,
+ CalledParty.digits,&CalledParty.numDigits);
+
+ DBG_TRACE("Transfer request confirmation received for dest %s, seq num %d\n",
+ transferConfirm.destinationAliasAddress.numberDigits,
+ transferConfirm.requestSeqNum);
+
+ status = CcVBLinkTransferResponse(transferConfirm.requestSeqNum,0,CalledParty);
+ if (!status) {
+ DBG_ERROR("CC returns error for Transfer confirmation from GMC\n");
+ }
+
+ }
+ break;
+
+ case NonStdRasMessageTypeTransferReject:
+ {
+ MnetRasTransferReject_t transferReject;
+ bool status;
+ VOIP_CALL_DESTINATION_ADDRESS CalledParty;
+
+ memset(&CalledParty,0,sizeof(VOIP_CALL_DESTINATION_ADDRESS));
+
+ jcNonStdRasMessageTransferRejecttUnpack(&transferReject,&pszBuffer );
+
+ DBG_TRACE("Transfer request rejected for request seq num %d, cause %d\n",
+ transferReject.requestSeqNum,
+ transferReject.rejectCause);
+
+ status = CcVBLinkTransferResponse(transferReject.requestSeqNum,transferReject.rejectCause,CalledParty);
+ if (!status) {
+ DBG_ERROR("CC returns error for Transfer confirmation from GMC\n");
+ }
+ }
+ break;
+
+ // ext-HO <chenj:05-15-01>
+ case NonStdRasMessageTypePerformHandoverRQ:
+ {
+ NonStdRasMessagePerformHandoverRQ_t MsgPerformHandoverRQ;
+ InterHoaVcMsg_t MsgtoCC;
+ bool status;
+
+ jcNonStdRasMessagePerformHandoverRQUnpack( &MsgPerformHandoverRQ, &pszBuffer );
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::ProcessViperBaseMessage): PerformHandoverRQ received.\n}\n");
+
+ copyGenericToGP10Header( &MsgPerformHandoverRQ.header, &MsgtoCC );
+
+ MsgtoCC.msgType = INTER_EHO_PERFORM_HANDOVER_REQUEST;
+ MsgtoCC.msgData.perfExtHandoverReq.globalCellID = MsgPerformHandoverRQ.globalCellID;
+ MsgtoCC.msgData.perfExtHandoverReq.hoCause = MsgPerformHandoverRQ.hoCause;
+ MsgtoCC.msgData.perfExtHandoverReq.hoNumberReqd = MsgPerformHandoverRQ.hoNumberReqd;
+ MsgtoCC.msgData.perfExtHandoverReq.handoverNumber = MsgPerformHandoverRQ.handoverNumber;
+ MsgtoCC.msgData.perfExtHandoverReq.mscNumber = MsgPerformHandoverRQ.mscNumber;
+ MsgtoCC.msgData.perfExtHandoverReq.A_HANDOVER_REQUEST = MsgPerformHandoverRQ.A_HANDOVER_REQUEST;
+
+
+ DBG_TRACE(" VBLINK MESSAGE DATA: VBLinkPerformHandoverRequest\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" MsgtoCC.msgData.perfExtHandoverReq hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &MsgtoCC.msgData.perfExtHandoverReq, sizeof (InterHoaVcPerformHandover_t) );
+ DBG_TRACE("\n }\n");
+
+ DBG_TRACE(" VBLINK MESSAGE DATA: VBLinkPerformHandoverRequest\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" MsgtoCC.msgData.perfExtHandoverReq.A_HANDOVER_REQUEST hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &MsgtoCC.msgData.perfExtHandoverReq.A_HANDOVER_REQUEST, sizeof (A_INTERFACE_MSG_STRUCT_t) );
+ DBG_TRACE("\n }\n");
+
+ status=ExtHOGenericMessageHandler( &MsgtoCC );
+
+ if (!status) {
+ DBG_ERROR("{\nMNEThoERROR(vblink::ProcessViperBaseMessage): CC returned error for Perform Handover Request!\n}\n");
+ }
+ }
+ break;
+
+ case NonStdRasMessageTypeEndHandover:
+ {
+ NonStdRasMessageEndHandover_t MsgEndHandover;
+ InterHoaVcMsg_t MsgtoCC;
+ bool status;
+
+ jcNonStdRasMessageEndHandoverUnpack( &MsgEndHandover, &pszBuffer );
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::ProcessViperBaseMessage): EndHandover received.\n}\n");
+
+ copyGenericToGP10Header( &MsgEndHandover.header, &MsgtoCC );
+
+ MsgtoCC.msgType = INTER_EHO_END_HANDOVER;
+ MsgtoCC.msgData.extEndHandover.reason = MsgEndHandover.reason;
+
+ DBG_TRACE(" VBLINK MESSAGE DATA: VBLinkEndHandover\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" MsgtoCC.msgData.extEndHandover hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &MsgtoCC.msgData.extEndHandover, sizeof (InterHoaVcEndHandover_t) );
+ DBG_TRACE("\n }\n");
+
+ status=ExtHOGenericMessageHandler( &MsgtoCC );
+
+ if (!status) {
+ DBG_ERROR("{\nMNEThoERROR(vblink::ProcessViperBaseMessage): CC returned error for End Handover!\n}\n");
+ }
+ }
+ break;
+
+ case NonStdRasMessageTypePostHandoverMobEvent:
+ {
+ NonStdRasMessagePostHandoverMobEvent_t MsgMobEvent;
+ InterHoaVcMsg_t MsgtoCC;
+ bool status;
+
+ jcNonStdRasMessagePostHandoverMobEventUnpack( &MsgMobEvent, &pszBuffer );
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::ProcessViperBaseMessage): PostHandoverMobEvent received.\n}\n");
+
+ copyGenericToGP10Header( &MsgMobEvent.header, &MsgtoCC );
+
+ MsgtoCC.msgType = INTER_EHO_HANDOVER_MOB_EVENT;
+ MsgtoCC.msgData.postExtHoMobEventData.LAYER3PDU = MsgMobEvent.LAYER3PDU;
+
+ DBG_TRACE(" VBLINK MESSAGE DATA: VBLinkPostHandoverMobEvent\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" MsgtoCC.msgData.postExtHoMobEventData hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &MsgtoCC.msgData.postExtHoMobEventData, sizeof (InterHoaVcPostHoMobEventData_t) );
+ DBG_TRACE("\n }\n");
+
+ status=ExtHOGenericMessageHandler( &MsgtoCC );
+
+ if (!status) {
+ DBG_ERROR("{\nMNEThoERROR(vblink::ProcessViperBaseMessage): CC returned error for Post Handover Mob Event!\n}\n");
+ }
+ }
+ break;
+
+ case NonStdRasMessageTypePerformHandoverAck:
+ {
+ NonStdRasMessagePerformHandoverAck_t MsgHandoverAck;
+ InterHoaVcMsg_t MsgtoCC;
+ bool status;
+
+ jcNonStdRasMessagePerformHandoverAckUnpack( &MsgHandoverAck, &pszBuffer );
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::ProcessViperBaseMessage): Handover Ack received.\n}\n");
+
+ copyGenericToGP10Header( &MsgHandoverAck.header, &MsgtoCC );
+
+ MsgtoCC.msgType = INTER_EHO_PERFORM_HANDOVER_ACK;
+ MsgtoCC.msgData.perfExtHandoverAck.handoverNumber = MsgHandoverAck.handoverNumber;
+ MsgtoCC.msgData.perfExtHandoverAck.reason = MsgHandoverAck.reason;
+ MsgtoCC.msgData.perfExtHandoverAck.A_INTERFACE_MSG = MsgHandoverAck.A_INTERFACE_MSG;
+
+ DBG_TRACE(" VBLINK MESSAGE DATA: VBLinkPerformHandoverAck\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" MsgtoCC.msgData.perfExtHandoverAck hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &MsgtoCC.msgData.perfExtHandoverAck, sizeof (InterHoaVcPerformHandoverAck_t) );
+ DBG_TRACE("\n }\n");
+
+ status=ExtHOGenericMessageHandler( &MsgtoCC );
+
+ if (!status) {
+ DBG_ERROR("{\nMNEThoERROR(vblink::ProcessViperBaseMessage): CC returned error for Handover Ack!\n}\n");
+ }
+ }
+ break;
+
+ case NonStdRasMessageTypeHandoverAccessMsg:
+ {
+ NonStdRasMessageHandoverAccess_t MsgHandoverAccess;
+ InterHoaVcMsg_t MsgtoCC;
+ bool status;
+
+ jcNonStdRasMessageHandoverAccessUnpack( &MsgHandoverAccess, &pszBuffer );
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::ProcessViperBaseMessage): Handover Access received.\n}\n");
+
+ copyGenericToGP10Header( &MsgHandoverAccess.header, &MsgtoCC );
+
+ MsgtoCC.msgType = INTER_EHO_HANDOVER_ACCESS;
+ MsgtoCC.msgData.extHandoverAccess.A_INTERFACE_MSG = MsgHandoverAccess.A_INTERFACE_MSG;
+
+ DBG_TRACE(" VBLINK MESSAGE DATA: VBLinkHandoverAccess\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" MsgtoCC.msgData.extHandoverAccess hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &MsgtoCC.msgData.extHandoverAccess, sizeof (InterHoaVcHandoverAccess_t) );
+ DBG_TRACE("\n }\n");
+
+ status=ExtHOGenericMessageHandler( &MsgtoCC );
+
+ if (!status) {
+ DBG_ERROR("{\nMNEThoERROR(vblink::ProcessViperBaseMessage): CC returned error for Handover Access!\n}\n");
+ }
+ }
+ break;
+
+ case NonStdRasMessageTypeHandoverSuccessMsg:
+ {
+ NonStdRasMessageHandoverSuccess_t MsgHandoverSuccess;
+ InterHoaVcMsg_t MsgtoCC;
+ bool status;
+
+ jcNonStdRasMessageHandoverSuccessUnpack( &MsgHandoverSuccess, &pszBuffer );
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::ProcessViperBaseMessage): Handover Success received.\n}\n");
+
+ copyGenericToGP10Header( &MsgHandoverSuccess.header, &MsgtoCC );
+
+ MsgtoCC.msgType = INTER_EHO_HANDOVER_SUCCESS;
+ MsgtoCC.msgData.extHandoverSuccess.A_INTERFACE_MSG = MsgHandoverSuccess.A_INTERFACE_MSG;
+
+ DBG_TRACE(" VBLINK MESSAGE DATA: VBLinkHandoverSuccess\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" MsgtoCC.msgData.extHandoverSuccess hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &MsgtoCC.msgData.extHandoverSuccess, sizeof (InterHoaVcHandoverSuccess_t) );
+ DBG_TRACE("\n }\n");
+
+ status=ExtHOGenericMessageHandler( &MsgtoCC );
+
+ if (!status) {
+ DBG_ERROR("{\nMNEThoERROR(vblink::ProcessViperBaseMessage): CC returned error for Handover Success!\n}\n");
+ }
+ }
+ break;
+
+ case NonStdRasMessageTypePerformHandBackRQ:
+ {
+ NonStdRasMessagePerformHandbackRQ_t MsgPerformHandback;
+ InterHoaVcMsg_t MsgtoCC;
+ bool status;
+
+ jcNonStdRasMessagePerformHandbackRQUnpack( &MsgPerformHandback, &pszBuffer );
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::ProcessViperBaseMessage): Perform Handback RQ received.\n}\n");
+
+ copyGenericToGP10Header( &MsgPerformHandback.header, &MsgtoCC );
+
+ MsgtoCC.msgType = INTER_EHO_PERFORM_HANDBACK_REQUEST;
+ MsgtoCC.msgData.perfExtHandbackReq.globalCellID = MsgPerformHandback.globalCellID;
+ MsgtoCC.msgData.perfExtHandbackReq.hoCause = MsgPerformHandback.hoCause;
+ MsgtoCC.msgData.perfExtHandbackReq.externalCell = MsgPerformHandback.externalCell;
+ MsgtoCC.msgData.perfExtHandbackReq.mscNumber = MsgPerformHandback.mscNumber;
+ MsgtoCC.msgData.perfExtHandbackReq.A_HANDOVER_REQUEST = MsgPerformHandback.A_HANDOVER_REQUEST;
+
+ DBG_TRACE(" VBLINK MESSAGE DATA: VBLinkPerformHandbackReq\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" MsgtoCC.msgData.perfExtHandbackReq hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &MsgtoCC.msgData.perfExtHandbackReq, sizeof (InterHoaVcPerformHandback_t) );
+ DBG_TRACE("\n }\n");
+
+ DBG_TRACE(" VBLINK MESSAGE DATA: VBLinkPerformHandbackReq\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" MsgtoCC.msgData.perfExtHandoverReq.A_HANDOVER_REQUEST hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &MsgtoCC.msgData.perfExtHandbackReq.A_HANDOVER_REQUEST, sizeof (A_INTERFACE_MSG_STRUCT_t) );
+ DBG_TRACE("\n }\n");
+
+ status=ExtHOGenericMessageHandler( &MsgtoCC );
+
+ if (!status) {
+ DBG_ERROR("{\nMNEThoERROR(vblink::ProcessViperBaseMessage): CC returned error for Perform Handback RQ!\n}\n");
+ }
+ }
+ break;
+
+ case NonStdRasMessageTypePerformHandBackAck:
+ {
+ NonStdRasMessagePerformHandbackAck_t MsgPerformHandbackAck;
+ InterHoaVcMsg_t MsgtoCC;
+ bool status;
+
+ jcNonStdRasMessagePerformHandbackAckUnpack( &MsgPerformHandbackAck, &pszBuffer );
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::ProcessViperBaseMessage): Handback Ack received.\n}\n");
+
+ copyGenericToGP10Header( &MsgPerformHandbackAck.header, &MsgtoCC );
+
+ MsgtoCC.msgType = INTER_EHO_PERFORM_HANDBACK_ACK;
+ MsgtoCC.msgData.perfExtHandbackAck.A_INTERFACE_MSG = MsgPerformHandbackAck.A_INTERFACE_MSG;
+ MsgtoCC.msgData.perfExtHandbackAck.reason = MsgPerformHandbackAck.reason;
+
+ status=ExtHOGenericMessageHandler( &MsgtoCC );
+
+ DBG_TRACE(" VBLINK MESSAGE DATA: VBLinkPerformHandbackAck\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" MsgtoCC.msgData.perfExtHandbackAck hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &MsgtoCC.msgData.perfExtHandbackAck, sizeof (InterHoaVcPerformHandbackAck_t) );
+ DBG_TRACE("\n }\n");
+
+ if (!status) {
+ DBG_ERROR("{\nMNEThoERROR(vblink::ProcessViperBaseMessage): CC returned error for Handback Ack!\n}\n");
+ }
+ }
+ break;
+
+ case NonStdRasMessageTypePageRequest:
+ {
+ NonStdRasMessagePageRequest_t MsgPageRequest;
+ VblinkMsg_t MsgtoMM;
+ MSG_Q_ID qid;
+
+ jcNonStdRasMessagePageRequestUnpack( &MsgPageRequest, &pszBuffer );
+
+ DBG_TRACE("{\nMGPLA(vblink::ProcessViperBaseMessage): Page Request received.\n}\n");
+
+ MsgtoMM.module_id = (T_CNI_MODULE_ID) MODULE_VBLINK;
+ MsgtoMM.message_type = VBLINK_RR_PAGE_REQ;
+ MsgtoMM.message_data.pageReq.imsi = MsgPageRequest.imsi;
+ MsgtoMM.message_data.pageReq.req_id = MsgPageRequest.req_id;
+ MsgtoMM.message_data.pageReq.channel_needed = MsgPageRequest.channel_needed;
+ MsgtoMM.message_data.pageReq.paging_timeout = MsgPageRequest.paging_timeout;
+
+ DBG_TRACE(" VBLINK MESSAGE DATA: VBLinkPageRequest\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" MsgtoMM.message_data.pageReq hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &MsgtoMM.message_data.pageReq, sizeof (IntraL3PageRequest_t) );
+ DBG_TRACE("\n }\n");
+
+ DBG_TRACE("{\nMGPLA(vblink::PageMessageHandler):Sending Msg(%d) to MMTASK\n}\n",
+ (int)MsgtoMM.message_type);
+
+ qid = mmMsgQId;
+
+ // send the message.
+ if (ERROR == msgQSend( qid,
+ (char *) &MsgtoMM,
+ sizeof(struct VblinkMsg_t),
+ NO_WAIT, //PR1553 <xxu> WAIT_FOREVER,
+ MSG_PRI_NORMAL
+ ) )
+ {
+ DBG_ERROR("{\nMGPLA(vblink::ProcessViperBaseMessage): MM returned error for Page Request!\n}\n");
+ }
+ }
+ break;
+
+ default:
+ DBG_ERROR( "Non standard message from GMC : Error : unrecognized message %d received\n",nonStdMsgType);
+ DBG_LEAVE();
+ return FALSE;
+ }
+
+ DBG_LEAVE();
+ return TRUE;
+}
+
+
+
+/*
+ * VBLinkRegisterMobile
+ */
+BOOL
+VBLinkRegisterMobile(MOBILE_ID MobileId)
+{
+ DBG_FUNC("VBLinkRegisterMobile",VBLINK_LAYER);
+ DBG_ENTER();
+
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+ NonStdRasMessageRRQ_t MsgRRQ;
+ char pszMobileId[MAX_MOBILE_ID_LENGTH];
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short *pActualDataLen;
+ STATUS status;
+ BOOL retStatus = FALSE;
+
+ memset(pszMobileId,0,MAX_MOBILE_ID_LENGTH);
+ jcBCDToString(pszMobileId, MobileId.digits, MobileId.numDigits );
+
+
+ DBG_TRACE("Registering Mobile %s\n", pszMobileId);
+
+ MsgRRQ.pszMobileID = pszMobileId;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypeRRQ, &pszBuffer, &nSize );
+ jcNonStdRasMessageRRQPack( &MsgRRQ, &pszBuffer, &nSize );
+
+
+
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *)sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)],buffer,nSize);
+
+ status = send(VBLinkConfig.VBSocket,sendBuffer,(nSize+2),0);
+ if (status == ERROR) {
+ DBG_ERROR("Unable to send registration message to GMC, %d!\n",errno);
+ }
+ else {
+ retStatus = TRUE;
+ }
+ DBG_LEAVE();
+ return (retStatus);
+}
+
+
+
+
+/*
+ * VBLinkUnregisterMobile
+ */
+BOOL
+VBLinkUnregisterMobile(MOBILE_ID MobileId)
+{
+ DBG_FUNC("VBLinkUnregisterMobile",VBLINK_LAYER);
+ DBG_ENTER();
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+ int nSize;
+ NonStdRasMessageURQ_t MsgURQ;
+ char pszMobileId[MAX_MOBILE_ID_LENGTH];
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short *pActualDataLen;
+ STATUS status;
+ BOOL retStatus = FALSE;
+
+ memset(pszMobileId,0,MAX_MOBILE_ID_LENGTH);
+ jcBCDToString(pszMobileId, MobileId.digits, MobileId.numDigits );
+
+
+ DBG_TRACE( "Unregistering Mobile %s\n", pszMobileId );
+
+ MsgURQ.pszMobileID = pszMobileId;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypeURQ, &pszBuffer, &nSize );
+ jcNonStdRasMessageURQPack( &MsgURQ, &pszBuffer, &nSize );
+
+
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *)sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)],buffer,nSize);
+
+ status = send(VBLinkConfig.VBSocket,sendBuffer,(nSize+2),0);
+ if (status == ERROR) {
+ DBG_ERROR("Unable to send registration message to GMC, %d!\n",errno);
+ }
+ else {
+ retStatus = TRUE;
+ }
+ DBG_LEAVE();
+ return (retStatus);
+
+}
+
+
+
+/*
+ * VBLinkSecurityRequest
+ */
+BOOL
+VBLinkSecurityRequest(MOBILE_ID MobileId)
+{
+ DBG_FUNC("VBLinkSecurityRequest",VBLINK_LAYER);
+ DBG_ENTER();
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+ int nSize;
+ NonStdRasMessageSRQ_t SecurityRequest;
+ char pszMobileId[MAX_MOBILE_ID_LENGTH];
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short *pActualDataLen;
+ STATUS status;
+ BOOL retStatus = FALSE;
+
+ memset(pszMobileId,0,MAX_MOBILE_ID_LENGTH);
+ jcBCDToString(pszMobileId, MobileId.digits, MobileId.numDigits );
+
+ DBG_TRACE( "Security Request for %s\n", pszMobileId );
+
+ SecurityRequest.pszMobileID = pszMobileId;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack(NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack(NonStdRasMessageTypeSRQ, &pszBuffer, &nSize );
+ jcNonStdRasMessageSRQPack(&SecurityRequest,&pszBuffer,&nSize );
+
+
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *)sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)],buffer,nSize);
+
+ status = send(VBLinkConfig.VBSocket,sendBuffer,(nSize+2),0);
+ if (status == ERROR) {
+ DBG_ERROR("Unable to send registration message to GMC, %d!\n",errno);
+ }
+ else {
+ retStatus = TRUE;
+ }
+
+
+ DBG_LEAVE();
+ return(status);
+}
+
+
+
+
+/*
+ * VBLinkCellLocationRequest
+ */
+BOOL
+VBLinkLocationRequest(VBLINK_API_CELL_LOCATION_REQUEST_MSG Msg)
+{
+ DBG_FUNC("VBLinkLocationRequest",VBLINK_LAYER);
+ DBG_ENTER();
+
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+ NonStdRasMessageCellLRQ_t MsgLRQ;
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short *pActualDataLen;
+ STATUS status;
+ BOOL retStatus = FALSE;
+
+ ASSERT(strlen(Msg.ViperCellId) <= MAX_VC_ID_STRING_LENGTH);
+
+ MsgLRQ.pszCellID = Msg.ViperCellId;
+ MsgLRQ.hCell = Msg.TxnId;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypeCellLRQ, &pszBuffer, &nSize );
+ jcNonStdRasMessageCellLRQPack( &MsgLRQ, &pszBuffer, &nSize );
+
+ DBG_TRACE("Sending LRQ message to GMC\n");
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *)sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)],buffer,nSize);
+
+ status = send(VBLinkConfig.VBSocket,sendBuffer,(nSize+2),0);
+ if (status == ERROR) {
+ DBG_ERROR("Unable to send registration message to GMC, %d!\n",errno);
+ }
+ else {
+ retStatus = TRUE;
+ }
+ DBG_LEAVE();
+ return (retStatus);
+}
+
+
+/*
+ * VBLinkSendCellId
+ */
+void
+VBLinkSendCellId()
+{
+ DBG_FUNC("VBLinkSendCellId",VBLINK_LAYER);
+ DBG_ENTER();
+ unsigned long ViperCellIdentifier=0;
+ char ViperCellId[MAX_VC_ID_STRING_LENGTH];
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ char szViperCellName[100];
+ char szViperCellIp[20];
+ UCHAR* pszBuffer;
+ int nSize;
+ NonStdRasMessageCellInfo_t CellInfo;
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short *pActualDataLen;
+ STATUS status;
+ BtsBasicPackage vbBtsBasicPackage;
+ long int sgsnIpAddress, sgsnRac;
+ unsigned char gs_ip_octets[4];
+
+ /*
+ * memset(szViperCellName,0,100);
+ * strcpy(szViperCellName,"VIPERCELL");
+ */
+
+ if (oam_getMibByteAry(MIB_viperCellName,(unsigned char *)szViperCellName,100) != STATUS_OK) {
+ DBG_ERROR("Unable to get ViperCell Name from OAM!!\n");
+ return ;
+ }
+
+
+ status = getMibStruct(MIB_btsBasicPackage, (unsigned char*)&vbBtsBasicPackage,
+ sizeof(BtsBasicPackage));
+ if (status != STATUS_OK)
+ {
+ // failed to get btsBasicPackage data.
+ DBG_ERROR("OAM->Call FATAL ERROR: failed(status = %d) to get vbBtsBasicPackage\n",
+ status);
+ printf("OAM->Call FATAL ERROR: failed(status = %d) to get vbBtsBasicPackage\n",
+ status);
+ }
+
+ // Routing Area Code
+ if (oam_getMibIntVar(MIB_gprsRac, (long int*)&sgsnRac) != STATUS_OK) {
+ DBG_ERROR("Unable to get gprs RAC from OAM!!\n");
+ DBG_LEAVE();
+ return;
+ }
+ else {
+
+ DBG_TRACE("gprs RAC OAM value %ld\n",sgsnRac);
+ }
+
+ // SGSN IP Address
+ if (oam_getMibIntVar(MIB_gprsServerIpAddress, (long int*)&sgsnIpAddress) != STATUS_OK) {
+ DBG_ERROR("Unable to get GS's IP Address from OAM!!\n");
+ DBG_LEAVE();
+ return;
+ }
+ else {
+ gs_ip_octets[0] = (sgsnIpAddress >> 24) & 0x000000ff;
+ gs_ip_octets[1] = (sgsnIpAddress >> 16) & 0x000000ff;
+ gs_ip_octets[2] = (sgsnIpAddress >> 8) & 0x000000ff;
+ gs_ip_octets[3] = (sgsnIpAddress) & 0x000000ff;
+
+ sprintf(szViperCellIp,"%d.%d.%d.%d\n",gs_ip_octets[0],gs_ip_octets[1],
+ gs_ip_octets[2],gs_ip_octets[3]);
+
+ CellInfo.pszSgsnIP = szViperCellIp;
+ DBG_TRACE("gprs IP OAM value %s\n",CellInfo.pszSgsnIP);
+ }
+
+ memset(ViperCellId,0,MAX_VC_ID_STRING_LENGTH);
+
+ sprintf(ViperCellId,"%d:%d",vbBtsBasicPackage.bts_lac,vbBtsBasicPackage.bts_ci);
+
+ DBG_TRACE( "Sending cell id %s\n", ViperCellId );
+
+ CellInfo.pszCellID = ViperCellId;
+ CellInfo.pszCellName = szViperCellName;
+ CellInfo.sgsnRAC = sgsnRac;
+
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypeCellInfo, &pszBuffer, &nSize );
+ jcNonStdRasMessageCellInfoPack(&CellInfo,&pszBuffer,&nSize);
+
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *)sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)],buffer,nSize);
+
+ status = send(VBLinkConfig.VBSocket,sendBuffer,(nSize+2),0);
+ if (status == ERROR) {
+ DBG_ERROR("Unable to send registration message to GMC, %d!\n",errno);
+ }
+
+ DBG_TRACE(" VBLinkSendCellId \n");
+ DBG_TRACE(" {\n");
+ DBG_HEXDUMP((unsigned char*) &sendBuffer, nSize+2 );
+ DBG_TRACE("\n }\n");
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+/*
+ * NonStdRasMessageTypeMsToNetCISS (Register CISS)
+ */
+bool
+VBLinkMsToNetCiss(LUDB_ID ludbIdx, unsigned char *cissMsg, int msgLen)
+{
+
+ DBG_FUNC("VBLinkMsToNetCiss",VBLINK_LAYER);
+ DBG_ENTER();
+
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+ NonStdRasMessageCISS_t cissReg;
+
+ char pszMobileId[MAX_MOBILE_ID_LENGTH];
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short *pActualDataLen;
+
+ STATUS status;
+ bool retStatus = false;
+
+ MOBILE_ID MobileId = ludbGetMobileId(ludbIdx);
+ memset(pszMobileId,0,MAX_MOBILE_ID_LENGTH);
+ jcBCDToString(pszMobileId, MobileId.digits, MobileId.numDigits );
+ cissReg.pszMobileID = pszMobileId;
+
+ cissReg.nMsgSize = msgLen;
+ cissReg.pMsgData = (PVOID) cissMsg;
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypeMsToNetCISS, &pszBuffer, &nSize );
+ jcNonStdRasMessageMobileCISSPack( &cissReg, &pszBuffer, &nSize );
+
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *) sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)], buffer, nSize);
+ DBG_TRACE("Sending CISS Register Message (LudbId = %d)\n", ludbIdx);
+
+ status = send(VBLinkConfig.VBSocket, sendBuffer, (nSize+2), 0);
+
+ if (status == ERROR) {
+ DBG_ERROR("Unable to send CISS registration message (errno = %d)\n", errno);
+ }
+ else {
+ retStatus = true;
+ }
+
+ DBG_LEAVE();
+ return (retStatus);
+}
+
+/*
+ * NonStdRasMessageTypeMsToNetSMSPP (SMC -> SMR)
+ */
+bool
+VBLinkMsToNetSmspp(LUDB_ID ludbIdx, unsigned char *smsppMsg, unsigned int msgLen)
+{
+
+ DBG_FUNC("VBLinkMsToNetSmspp",VBLINK_LAYER);
+ DBG_ENTER();
+
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+ NonStdRasMessageSMSPP_t smsppNonStdRasMsg;
+
+ char pszMobileId[MAX_MOBILE_ID_LENGTH];
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short *pActualDataLen;
+
+ STATUS status;
+ bool retStatus = false;
+
+ MOBILE_ID MobileId = ludbGetMobileId(ludbIdx);
+ memset(pszMobileId,0,MAX_MOBILE_ID_LENGTH);
+ jcBCDToString(pszMobileId, MobileId.digits, MobileId.numDigits );
+ smsppNonStdRasMsg.pszMobileID = pszMobileId;
+
+ smsppNonStdRasMsg.nMsgSize = msgLen;
+ smsppNonStdRasMsg.pMsgData = (PVOID) smsppMsg;
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypeMsToNetSMSPP, &pszBuffer, &nSize );
+ jcNonStdRasMessageMobileSmsppPack( &smsppNonStdRasMsg, &pszBuffer, &nSize );
+
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *) sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)], buffer, nSize);
+ DBG_TRACE("Sending SMSPP message from SMC->SMR at network side (LudbId = %d)\n", ludbIdx);
+
+ status = send(VBLinkConfig.VBSocket, sendBuffer, (nSize+2), 0);
+
+ if (status == ERROR) {
+ DBG_ERROR("Unable to send SMSPP message from SMC->SMR at network side (errno = %d)\n", errno);
+ }
+ else {
+ retStatus = true;
+ }
+
+ DBG_LEAVE();
+ return (retStatus);
+}
+
+
+
+/*
+ * VBLinkTransferRequest
+ */
+bool
+VBLinkTransferRequest(unsigned short transferReqSeqNum,VOIP_CALL_DESTINATION_ADDRESS CalledPartyNumber,
+ VOIP_CALL_CALLING_PARTY_NUMBER CallingPartyNumber)
+{
+ DBG_FUNC("VBLinkTransferRequest",VBLINK_LAYER);
+ DBG_ENTER();
+ bool retStatus = FALSE;
+ STATUS status;
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+ MnetRasTransferRequest_t transferRequest;
+
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ char origNumBuffer[256],destNumBuffer[256];
+ unsigned short *pActualDataLen;
+
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+
+ memset(origNumBuffer,0,256);
+ memset(destNumBuffer,0,256);
+ jcBCDToString(origNumBuffer, CallingPartyNumber.digits, CallingPartyNumber.numDigits);
+ jcBCDToString(destNumBuffer, CalledPartyNumber.digits, CalledPartyNumber.numDigits);
+
+ DBG_TRACE("Call Transfer request from %s to %s; sequence number %d\n",
+ origNumBuffer,destNumBuffer,transferReqSeqNum);
+
+ transferRequest.requestSeqNum = transferReqSeqNum;
+
+ transferRequest.destinationAliasAddress.numberDigits = destNumBuffer;
+
+ transferRequest.sourceAliasAddress.numberDigits = origNumBuffer;
+
+ VBLinkGetVoipNumberType(CallingPartyNumber.numberType,&transferRequest.sourceAliasAddress);
+
+ VBLinkGetVoipNumberType(CalledPartyNumber.numberType,&transferRequest.destinationAliasAddress);
+
+
+ jcUShortPack(NON_STD_RAS_PROTOCOL,&pszBuffer,&nSize);
+ jcUShortPack(NonStdRasMessageTypeTransferRequest,&pszBuffer,&nSize);
+ jcNonStdRasMessageTransferRequestPack(&transferRequest, &pszBuffer, &nSize );
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *) sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)], buffer, nSize);
+
+ status = send(VBLinkConfig.VBSocket, sendBuffer, (nSize+2), 0);
+
+ if (status == ERROR) {
+ DBG_ERROR("Unable to send transfer request message from %s to %s \n",origNumBuffer,destNumBuffer);
+ }
+ else {
+ retStatus = true;
+ }
+
+
+ DBG_LEAVE();
+ return (retStatus);
+}
+
+
+
+/*
+ * VBLinkGetVoipNumberType
+ */
+void
+VBLinkGetVoipNumberType(
+ T_CNI_RIL3_TYPE_OF_NUMBER numType,
+ MnetH323AliasAddress_t *address
+ )
+{
+ DBG_FUNC("VBLinkGetVoipNumberType",VBLINK_LAYER);
+ DBG_ENTER();
+
+
+ switch(numType) {
+ case CNI_RIL3_NUMBER_TYPE_UNKNOWN:
+ {
+ address->publicType = MNET_H323_PUBLIC_UNKNOWN;
+ address->partyNumber = MNET_H323_PUBLIC_PARTY_NUMBER;
+ }
+ break;
+ case CNI_RIL3_NUMBER_TYPE_INTERNATIONAL:
+ {
+ address->publicType = MNET_H323_PUBLIC_INTERNATIONAL;
+ address->partyNumber = MNET_H323_PUBLIC_PARTY_NUMBER;
+ }
+ break;
+ case CNI_RIL3_NUMBER_TYPE_NATIONAL:
+ {
+ address->publicType = MNET_H323_PUBLIC_NATIONAL;
+ address->partyNumber = MNET_H323_PUBLIC_PARTY_NUMBER;
+ }
+ break;
+ case CNI_RIL3_NUMBER_TYPE_NETWORK_SPECIFIC:
+ {
+ address->publicType = MNET_H323_PUBLIC_NETWORK_SPECIFIC;
+ address->partyNumber = MNET_H323_PUBLIC_PARTY_NUMBER;
+ }
+ break;
+ case CNI_RIL3_NUMBER_TYPE_DEDICATED_ACCESS:
+ {
+ address->privateType = MNET_H323_PRIVATE_LOCAL;
+ address->partyNumber = MNET_H323_PRIVATE_PARTY_NUMBER;
+ }
+ break;
+ default:
+ {
+ }
+ break;
+ }
+
+ DBG_LEAVE();
+}
+
+
+/*
+ * VBLinkGetGsmNumberType
+ */
+void
+VBLinkGetGsmNumberType(
+ T_CNI_RIL3_TYPE_OF_NUMBER *numType,
+ MnetH323AliasAddress_t address
+ )
+{
+ DBG_FUNC("VBLinkGetGsmNumberType",VBLINK_LAYER);
+ DBG_ENTER();
+
+
+ if (address.publicType == MNET_H323_PUBLIC_UNKNOWN) {
+ *numType = CNI_RIL3_NUMBER_TYPE_UNKNOWN;
+ }
+ else if (address.publicType == MNET_H323_PUBLIC_INTERNATIONAL) {
+ *numType = CNI_RIL3_NUMBER_TYPE_INTERNATIONAL;
+ }
+ else if (address.publicType == MNET_H323_PUBLIC_NATIONAL) {
+ *numType = CNI_RIL3_NUMBER_TYPE_NATIONAL;
+ }
+ else if (address.publicType == MNET_H323_PUBLIC_NETWORK_SPECIFIC) {
+ *numType = CNI_RIL3_NUMBER_TYPE_NETWORK_SPECIFIC;
+ }
+ else if (address.publicType == MNET_H323_PRIVATE_LOCAL) {
+ *numType = CNI_RIL3_NUMBER_TYPE_DEDICATED_ACCESS;
+ }
+ else {
+ *numType = CNI_RIL3_NUMBER_TYPE_UNKNOWN;
+ }
+
+ DBG_LEAVE();
+}
+
+
+
+
+
+
+/*
+ * VBLinkReconnectLoop
+ */
+BOOL
+VBLinkReconnectLoop()
+{
+ DBG_FUNC("VBLinkReconnectLoop",VBLINK_LAYER);
+ DBG_ENTER();
+ BOOL retStatus = FALSE;
+ BOOL connectStatus;
+ /*
+ * The only way we get out of here is through an
+ * error or if connection is succesful
+ */
+ while (VBLinkConfig.RetryConnects) {
+ DBG_TRACE("Attempting to connect to GMC..\n");
+ connectStatus = VBLinkConnect();
+ if (connectStatus) {
+ retStatus=TRUE;
+ DBG_LEAVE();
+ return(retStatus);
+ }
+ }
+ DBG_TRACE("Not attempting to connect to GMC any more..\n");
+ DBG_LEAVE();
+ return(retStatus);
+}
+
+
+
+
+
+
+
+/*
+ * VBLinkConnect
+ */
+BOOL
+VBLinkConnect()
+{
+ DBG_FUNC("VBLinkConnect",VBLINK_LAYER);
+ DBG_ENTER();
+ BOOL retStatus=FALSE;
+
+
+ if (connect(VBLinkConfig.VBSocket,(struct sockaddr *)&VBLinkConfig.ViperBaseAddress,sizeof(VBLinkConfig.ViperBaseAddress)) == ERROR) {
+ DBG_ERROR("Unable to connect to GMC at %s : %d ; error %d\n",VBLinkConfig.szViperBaseAddress,ntohs(VBLinkConfig.ViperBaseAddress.sin_port),errno);
+ VBLinkConfig.ConnectedToViperBase = FALSE;
+ if (close(VBLinkConfig.VBSocket)==ERROR) {
+ DBG_ERROR("Unable to close VBSocket!! error %d\n",errno);
+ }
+ FD_CLR(VBLinkConfig.VBSocket,&VBLinkConfig.ReadSet);
+ if (!VBLinkPrepareSocket()) {
+ printf("Cannot create socket!! error %d\n",errno);
+ DBG_LEAVE();
+ return(retStatus);
+ }
+ taskDelay(VBLINK_CONNECT_TIMEOUT_SECS*sysClkRateGet());
+ }
+ else {
+ FD_SET(VBLinkConfig.VBSocket,&VBLinkConfig.ReadSet);
+ DBG_TRACE("Connected to GMC at %s : %d\n successfully\n",VBLinkConfig.szViperBaseAddress,ntohs(VBLinkConfig.ViperBaseAddress.sin_port));
+ VBLinkSetOAMTrap(VBLINK_VIPERBASE_LINK_RESTORED);
+ VBLinkConfig.ConnectedToViperBase = TRUE;
+ VBLinkSendCellId();
+ retStatus = TRUE;
+ }
+
+
+ DBG_LEAVE();
+ return(retStatus);
+}
+
+
+
+
+/*
+ * VBLinkSetOAMTrap
+ */
+void
+VBLinkSetOAMTrap(VBLINK_OAM_TRAP Message)
+{
+ DBG_FUNC("VBLinkSetOAMTrap",VBLINK_LAYER);
+ DBG_ENTER();
+
+ printf("OAM event required to be indicated\n");
+
+ switch(Message) {
+ case VBLINK_VIPERBASE_LINK_LOST:
+ {
+ printf("Indicating VIPERBASE_LINK_DOWN to OAM!!\n");
+ if (alarm_raise(MODULE_H323,MIB_errorCode_H323, EC_VIPERBASE_LINKDOWN) != STATUS_OK)
+ {
+ printf("Unable to indicate VIPERBASE_LINK_DOWN to OAM!!\n");
+ DBG_LEAVE();
+ return;
+ }
+ else {
+ printf("Indicated VIPERBASE_LINK_DOWN to OAM successfully!!\n");
+ }
+ }
+ break;
+
+
+ case VBLINK_VIPERBASE_LINK_RESTORED:
+ {
+ printf("Indicating VIPERBASE_LINK_RESTORED to OAM!!\n");
+ if (alarm_clear(MODULE_H323,MIB_errorCode_H323, EC_NOERROR) != STATUS_OK)
+ {
+ printf("Unable to indicate VIPERBASE_LINK_RESTORED to OAM!!\n");
+ DBG_LEAVE();
+ return ;
+ }
+ else {
+ printf("Indicated VIPERBASE_LINK_RESTORED to OAM successfully!!\n");
+ }
+ }
+ break;
+
+
+ case VBLINK_VIPERBASE_LINK_NOT_UP:
+ {
+ printf("Indicating VIPERBASE_LINK_NOT_UP to OAM!!\n");
+ if (alarm_raise(MODULE_H323,MIB_errorCode_H323, EC_BOOTING_UP) != STATUS_OK)
+ {
+ printf("Unable to indicate VIPERBASE_LINK_NOT_UP to OAM!!\n");
+ DBG_LEAVE();
+ return ;
+ }
+ else {
+ printf("Indicated VIPERBASE_LINK_NOT_UP to OAM successfully!!\n");
+ }
+ }
+ break;
+
+
+ default:
+ {
+ printf("Unknown message specified to be sent to OAM !!\n");
+ }
+ break;
+ }
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+ * SendVBLinkRegEvent
+ */
+void
+SendVBLinkRegEvent(VBLINK_MOBILE_REG_EVENT RegEvent, MOBILE_ID MobileId)
+{
+ DBG_FUNC("SendVBLinkRegEvent",VBLINK_LAYER);
+ DBG_ENTER();
+ BOOL Status;
+
+ DBG_TRACE("Sending registration event to ludb \n");
+
+ Status=LudbVBLinkMessageHandler(RegEvent,MobileId);
+
+ if (!Status) {
+ DBG_ERROR("LUDB returned error for registration event %d from GK!!\n",RegEvent);
+ }
+
+ DBG_LEAVE();
+ return;
+}
+
+
+
+
+/*
+ * SendIpAddressResponse
+ */
+void
+SendIpAddressResponse(char *CellId,char *IpAddress,TXN_ID TxnId)
+{
+ DBG_FUNC("SendIpAddressResponse",VBLINK_LAYER);
+ DBG_ENTER();
+ bool Status=FALSE;
+ Status=CcVBLinkMessageHandler(CellId,IpAddress,TxnId);
+
+ if (!Status) {
+ DBG_ERROR("CC returned error for Cell Location response!!\n");
+ }
+
+ DBG_LEAVE();
+ return;
+
+}
+
+
+
+
+
+
+/*
+ * jcNonStdRasMessageRRQPack
+ */
+void
+jcNonStdRasMessageRRQPack( NonStdRasMessageRRQ_t* pMsgRRQ, UCHAR** ppszBuffer, int* pnSize )
+{
+ jcStringPack( pMsgRRQ->pszMobileID, ppszBuffer, pnSize );
+
+ return;
+}
+
+
+
+/*
+ * jcNonStdRasMessageRCFUnpack
+ */
+void
+jcNonStdRasMessageRCFUnpack( NonStdRasMessageRCF_t* pMsgRCF, UCHAR** ppszBuffer )
+{
+ pMsgRCF->pszMobileID = jcStringUnpack( ppszBuffer );
+ pMsgRCF->pszNumber = jcStringUnpack( ppszBuffer );
+
+ return;
+}
+
+
+
+/*
+ * jcNonStdRasMessageRRJUnpack
+ */
+void
+jcNonStdRasMessageRRJUnpack( NonStdRasMessageRRJ_t* pMsgRRJ, UCHAR** ppszBuffer )
+{
+ pMsgRRJ->pszMobileID = jcStringUnpack( ppszBuffer );
+
+ return;
+}
+
+
+/*
+ * jcNonStdRasMessageURQPack
+ */
+void
+jcNonStdRasMessageURQPack( NonStdRasMessageURQ_t* pMsgURQ, UCHAR** ppszBuffer, int* pnSize )
+{
+ jcStringPack( pMsgURQ->pszMobileID, ppszBuffer, pnSize );
+
+ return;
+}
+
+
+/*
+ * jcNonStdRasMessageURQUnpack
+ */
+void
+jcNonStdRasMessageURQUnpack( NonStdRasMessageURQ_t* pMsgURQ, UCHAR** ppszBuffer )
+{
+ pMsgURQ->pszMobileID = jcStringUnpack( ppszBuffer );
+
+ return;
+}
+
+
+/*
+ * jcNonStdRasMessageUCFUnpack
+ */
+void
+jcNonStdRasMessageUCFUnpack( NonStdRasMessageUCF_t* pMsgUCF, UCHAR** ppszBuffer )
+{
+ pMsgUCF->pszMobileID = jcStringUnpack( ppszBuffer );
+
+ return;
+}
+
+
+/*
+ * jcNonStdRasMessageCellLRQPack
+ */
+void
+jcNonStdRasMessageCellLRQPack( NonStdRasMessageCellLRQ_t* pMsgCellLRQ,
+ UCHAR** ppszBuffer, int* pnSize )
+{
+ jcStringPack( pMsgCellLRQ->pszCellID, ppszBuffer, pnSize );
+ jcULongPack( pMsgCellLRQ->hCell, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageCellLRQUnpack
+ */
+void
+jcNonStdRasMessageCellLRQUnpack( NonStdRasMessageCellLRQ_t* pMsgCellLRQ, UCHAR** ppszBuffer )
+{
+ pMsgCellLRQ->pszCellID = jcStringUnpack( ppszBuffer );
+ pMsgCellLRQ->hCell = jcULongUnpack( ppszBuffer );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageCellLCFPack
+ */
+void
+jcNonStdRasMessageCellLCFPack( NonStdRasMessageCellLCF_t* pMsgCellLCF,
+ UCHAR** ppszBuffer, int* pnSize )
+{
+ jcStringPack( pMsgCellLCF->pszCellID, ppszBuffer, pnSize );
+ jcStringPack( pMsgCellLCF->pszIpAddress, ppszBuffer, pnSize );
+ jcULongPack( pMsgCellLCF->hCell, ppszBuffer, pnSize );
+
+ return;
+}
+
+
+/*
+ * jcNonStdRasMessageCellLCFUnpack
+ */
+void
+jcNonStdRasMessageCellLCFUnpack( NonStdRasMessageCellLCF_t* pMsgCellLCF, UCHAR** ppszBuffer )
+{
+ pMsgCellLCF->pszCellID = jcStringUnpack( ppszBuffer );
+ pMsgCellLCF->pszIpAddress = jcStringUnpack( ppszBuffer );
+ pMsgCellLCF->hCell = jcULongUnpack( ppszBuffer );
+
+ return;
+}
+
+
+
+/*
+ * jcNonStdRasMessageCellLRJPack
+ */
+void
+jcNonStdRasMessageCellLRJPack( NonStdRasMessageCellLRJ_t* pMsgCellLRJ,
+ UCHAR** ppszBuffer, int* pnSize )
+{
+ jcStringPack( pMsgCellLRJ->pszCellID, ppszBuffer, pnSize );
+ jcULongPack( pMsgCellLRJ->hCell, ppszBuffer, pnSize );
+
+ return;
+}
+
+
+/*
+ * jcNonStdRasMessageCellLRJUnpack
+ */
+void
+jcNonStdRasMessageCellLRJUnpack( NonStdRasMessageCellLRJ_t* pMsgCellLRJ, UCHAR** ppszBuffer )
+{
+ pMsgCellLRJ->pszCellID = jcStringUnpack( ppszBuffer );
+ pMsgCellLRJ->hCell = jcULongUnpack( ppszBuffer );
+
+ return;
+}
+
+
+
+/*
+ * jcNonStdRasMessageMobileProfilePack
+ */
+void
+jcNonStdRasMessageMobileProfilePack( NonStdRasMessageMobileProfile_t* pMsg,
+ UCHAR** ppszBuffer, int* pnSize )
+{
+ jcStringPack( pMsg->pszMobileID, ppszBuffer, pnSize );
+ jcUShortPack( pMsg->nProfileSize, ppszBuffer, pnSize );
+ jcBufferPack( pMsg->pProfileData, pMsg->nProfileSize, ppszBuffer, pnSize );
+
+ return;
+}
+
+
+/*
+ * jcNonStdRasMessageMobileProfileUnpack
+ */
+void
+jcNonStdRasMessageMobileProfileUnpack( NonStdRasMessageMobileProfile_t* pMsg,
+ UCHAR** ppszBuffer )
+{
+ pMsg->pszMobileID = jcStringUnpack( ppszBuffer );
+ pMsg->nProfileSize = jcUShortUnpack( ppszBuffer );
+ pMsg->pProfileData = jcBufferUnpack( pMsg->nProfileSize, ppszBuffer );
+
+ return;
+}
+
+
+/*
+ * jcNonStdRasMessageCellInfoPack
+ */
+void
+jcNonStdRasMessageCellInfoPack( NonStdRasMessageCellInfo_t* pMsgCellInfo,
+ UCHAR** ppszBuffer, int* pnSize )
+{
+ jcStringPack( pMsgCellInfo->pszCellID, ppszBuffer, pnSize );
+ jcStringPack( pMsgCellInfo->pszCellName, ppszBuffer, pnSize );
+ jcUShortPack( pMsgCellInfo->sgsnRAC, ppszBuffer, pnSize ); // shmin 09/17
+ jcStringPack( pMsgCellInfo->pszSgsnIP, ppszBuffer, pnSize );
+
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageCellInfoUnpack
+ */
+void
+jcNonStdRasMessageCellInfoUnpack( NonStdRasMessageCellInfo_t* pMsgCellInfo, UCHAR** ppszBuffer )
+{
+ pMsgCellInfo->pszCellID = jcStringUnpack( ppszBuffer );
+ pMsgCellInfo->pszCellName = jcStringUnpack( ppszBuffer );
+
+ if( pMsgCellInfo->pszCellName && strlen( pMsgCellInfo->pszCellName ) > 32 )
+ pMsgCellInfo->pszCellName = NULL; /* !! patch for older version */
+
+ pMsgCellInfo->sgsnRAC = jcUShortUnpack( ppszBuffer ); // shmin 09/17
+ pMsgCellInfo->pszSgsnIP = jcStringUnpack( ppszBuffer );
+
+ return;
+}
+
+
+/*
+ * jcNonStdRasMessageMobileCISSPack
+ */
+void
+jcNonStdRasMessageMobileCISSPack( NonStdRasMessageCISS_t* pMsg,
+ UCHAR** ppszBuffer, int* pnSize )
+{
+ jcStringPack( pMsg->pszMobileID, ppszBuffer, pnSize );
+ jcUShortPack( pMsg->nMsgSize, ppszBuffer, pnSize );
+ jcBufferPack( pMsg->pMsgData, pMsg->nMsgSize, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageMobileCISSUnpack
+ */
+void
+jcNonStdRasMessageMobileCISSUnpack( NonStdRasMessageCISS_t* pMsg, UCHAR** ppszBuffer )
+{
+ pMsg->pszMobileID = jcStringUnpack( ppszBuffer );
+ pMsg->nMsgSize = jcUShortUnpack( ppszBuffer );
+ pMsg->pMsgData = jcBufferUnpack( pMsg->nMsgSize, ppszBuffer );
+
+ return;
+}
+
+
+/*
+ * jcNonStdRasMessageCellSynchronizePack
+ */
+void
+jcNonStdRasMessageCellSynchronizePack( NonStdRasMessageCellSynchronize_t* pMsg,
+ UCHAR** ppszBuffer, int* pnSize )
+{
+ jcStringPack( pMsg->pszCellID, ppszBuffer, pnSize );
+ jcUShortPack( pMsg->nMode, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageCellSynchronizeUnpack
+ */
+void
+jcNonStdRasMessageCellSynchronizeUnpack( NonStdRasMessageCellSynchronize_t* pMsg,
+ UCHAR** ppszBuffer )
+{
+ pMsg->pszCellID = jcStringUnpack( ppszBuffer );
+ pMsg->nMode = jcUShortUnpack( ppszBuffer );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageSRQPack
+ */
+void
+jcNonStdRasMessageSRQPack( NonStdRasMessageSRQ_t* pMsg, UCHAR** ppszBuffer, int* pnSize )
+{
+ jcStringPack( pMsg->pszMobileID, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageSRQUnpack
+ */
+void
+jcNonStdRasMessageSRQUnpack( NonStdRasMessageSRQ_t* pMsg, UCHAR** ppszBuffer )
+{
+ pMsg->pszMobileID = jcStringUnpack( ppszBuffer );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageSRSPack
+ */
+void
+jcNonStdRasMessageSRSPack( NonStdRasMessageSRS_t* pMsg, UCHAR** ppszBuffer, int* pnSize )
+{
+ jcStringPack( pMsg->pszMobileID, ppszBuffer, pnSize );
+ jcUShortPack( pMsg->nAuthSets, ppszBuffer, pnSize );
+ jcBufferPack( pMsg->pAuthSets, (USHORT)( pMsg->nAuthSets * sizeof( T_AUTH_TRIPLET ) ),
+ ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageSRSUnpack
+ */
+void
+jcNonStdRasMessageSRSUnpack( NonStdRasMessageSRS_t* pMsg, UCHAR** ppszBuffer )
+{
+ pMsg->pszMobileID = jcStringUnpack( ppszBuffer );
+ pMsg->nAuthSets = jcUShortUnpack( ppszBuffer );
+ pMsg->pAuthSets = (T_AUTH_TRIPLET*)jcBufferUnpack(
+ (USHORT)( pMsg->nAuthSets * sizeof( T_AUTH_TRIPLET ) ), ppszBuffer );
+ return;
+}
+
+/*
+ * jcNonStdRasMessageMobileSmsppPack
+ */
+void
+jcNonStdRasMessageMobileSmsppPack( NonStdRasMessageSMSPP_t* pMsg,
+ UCHAR** ppszBuffer, int* pnSize)
+{
+ jcNonStdRasMessageMobileCISSPack(pMsg, ppszBuffer, pnSize);
+}
+
+/*
+ * jcNonStdRasMessageMobileSmsppUnpack
+ */
+void
+jcNonStdRasMessageMobileSmsppUnpack(NonStdRasMessageSMSPP_t* pMsg,
+ UCHAR** ppszBuffer)
+{
+ jcNonStdRasMessageMobileCISSUnpack(pMsg, ppszBuffer);
+}
+
+/*
+ * jcNonStdRasMessageTransferRequestPack
+ */
+void
+jcNonStdRasMessageTransferRequestPack( MnetRasTransferRequest_t* pMsg,
+ UCHAR** ppszBuffer, int* pnSize )
+{
+ jcUShortPack( pMsg->requestSeqNum, ppszBuffer, pnSize );
+ jcNonStdRasMessageH323AliasAddressPack( &pMsg->destinationAliasAddress, ppszBuffer, pnSize );
+ jcNonStdRasMessageH323AliasAddressPack( &pMsg->sourceAliasAddress, ppszBuffer, pnSize );
+ return;
+}
+
+/*
+ * jcNonStdRasMessageTransferRequestUnpack
+ */
+void
+jcNonStdRasMessageTransferRequestUnpack( MnetRasTransferRequest_t* pMsg, UCHAR** ppszBuffer )
+{
+ pMsg->requestSeqNum = jcUShortUnpack( ppszBuffer );
+ jcNonStdRasMessageH323AliasAddressUnpack( &pMsg->destinationAliasAddress, ppszBuffer );
+ jcNonStdRasMessageH323AliasAddressUnpack( &pMsg->sourceAliasAddress, ppszBuffer );
+ return;
+}
+
+/*
+ * jcNonStdRasMessageTransferConfirmPack
+ */
+void
+jcNonStdRasMessageTransferConfirmPack( MnetRasTransferConfirm_t* pMsg,
+ UCHAR** ppszBuffer, int* pnSize )
+{
+ jcUShortPack( pMsg->requestSeqNum, ppszBuffer, pnSize );
+ jcNonStdRasMessageH323AliasAddressPack( &pMsg->destinationAliasAddress, ppszBuffer, pnSize );
+ return;
+}
+
+/*
+ * jcNonStdRasMessageTransferConfirmUnpack
+ */
+void
+jcNonStdRasMessageTransferConfirmUnpack( MnetRasTransferConfirm_t* pMsg, UCHAR** ppszBuffer )
+{
+ pMsg->requestSeqNum = jcUShortUnpack( ppszBuffer );
+ jcNonStdRasMessageH323AliasAddressUnpack( &pMsg->destinationAliasAddress, ppszBuffer );
+ return;
+}
+
+/*
+ * jcNonStdRasMessageTransferRejectPack
+ */
+void
+jcNonStdRasMessageTransferRejectPack( MnetRasTransferReject_t* pMsg,
+ UCHAR** ppszBuffer, int* pnSize )
+{
+ jcUShortPack( pMsg->requestSeqNum, ppszBuffer, pnSize );
+ jcUShortPack( (USHORT)pMsg->rejectCause, ppszBuffer, pnSize );
+ return;
+}
+
+/*
+ * jcNonStdRasMessageTransferRejecttUnpack
+ */
+void
+jcNonStdRasMessageTransferRejecttUnpack( MnetRasTransferReject_t* pMsg, UCHAR** ppszBuffer )
+{
+ pMsg->requestSeqNum = jcUShortUnpack( ppszBuffer );
+ pMsg->rejectCause = (MnetRasRejectCause_t)jcUShortUnpack( ppszBuffer );
+ return;
+}
+
+/*
+ * jcNonStdRasMessageH323AliasAddressPack
+ */
+void
+jcNonStdRasMessageH323AliasAddressPack( MnetH323AliasAddress_t* pMsg,
+ UCHAR** ppszBuffer, int* pnSize )
+{
+ jcStringPack( pMsg->numberDigits, ppszBuffer, pnSize );
+ jcUShortPack( (USHORT)pMsg->partyNumber, ppszBuffer, pnSize );
+ jcUShortPack( (USHORT)pMsg->publicType, ppszBuffer, pnSize );
+ return;
+}
+
+/*
+ * jcNonStdRasMessageH323AliasAddressUnpack
+ */
+void
+jcNonStdRasMessageH323AliasAddressUnpack( MnetH323AliasAddress_t* pMsg, UCHAR** ppszBuffer )
+{
+ pMsg->numberDigits = jcStringUnpack( ppszBuffer );
+ pMsg->partyNumber = (MnetH323PartyNumber_t)jcUShortUnpack( ppszBuffer );
+ pMsg->publicType = (MnetH323PublicTypeOfNumber_t)jcUShortUnpack( ppszBuffer );
+ return;
+}
+
+
+
+/*
+ * VBLinkShowKeepAliveInterval
+ */
+int
+VBLinkShowKeepAliveInterval()
+{
+ printf("Using KeepAlive Interval of %d seconds\n",KeepAliveInterval);
+}
+
+/*
+ * VBLinkShowMaxKeepAliveCount
+ */
+int
+VBLinkShowMaxKeepAliveCount()
+{
+ printf("Maximum number of Unacknowledged KeepAlives : %d \n",MaxKeepAliveTxCount);
+}
+
+
+
+/*
+ * VBLinkSetKeepAliveInterval
+ */
+int
+VBLinkSetKeepAliveInterval(int interval)
+{
+ KeepAliveInterval = VBLinkConfig.KeepAliveInterval = interval;
+ VBLinkShowKeepAliveInterval();
+}
+
+
+/*
+ * VBLinkSetMaxKeepAliveCount
+ */
+int
+VBLinkSetMaxKeepAliveCount(int count)
+{
+ MaxKeepAliveTxCount = VBLinkConfig.MaxKeepAliveTxCount = count;
+ VBLinkShowMaxKeepAliveCount();
+}
+
+// -------------------------------- EXTERNAL HANDOVER ------------------------------
+// ext-HO <chenj:05-15-01>
+/*
+ * jcNonStdRasMessageGlobalCellIdPack
+ */
+void
+jcNonStdRasMessageGlobalCellIdPack( GlobalCellId_t* pMsg, UCHAR** ppszBuffer, int* pnSize )
+{
+ jcUShortPack( (USHORT)pMsg->ci_disc, ppszBuffer, pnSize );
+ jcBufferPack( (PVOID)pMsg->mcc, (USHORT) NUM_MCC_DIGITS, ppszBuffer, pnSize );
+ jcBufferPack( (PVOID)pMsg->mnc, (USHORT) NUM_MNC_DIGITS, ppszBuffer, pnSize );
+ jcUShortPack( (USHORT)pMsg->lac, ppszBuffer, pnSize );
+ jcUShortPack( (USHORT)pMsg->ci, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageGlobalCellIdUnpack
+ */
+void
+jcNonStdRasMessageGlobalCellIdUnpack( GlobalCellId_t* pMsg, UCHAR** ppszBuffer )
+{
+ PVOID pdata;
+
+ pMsg->ci_disc = (char) jcUShortUnpack( ppszBuffer );
+ pdata = jcBufferUnpack( (USHORT) NUM_MCC_DIGITS, ppszBuffer );
+ memcpy( pMsg->mcc, (char *)pdata, NUM_MCC_DIGITS );
+ pdata = jcBufferUnpack( (USHORT) NUM_MNC_DIGITS, ppszBuffer );
+ memcpy( pMsg->mnc, (char *)pdata, NUM_MNC_DIGITS );
+ pMsg->lac = (unsigned short) jcUShortUnpack( ppszBuffer );
+ pMsg->ci = (unsigned short) jcUShortUnpack( ppszBuffer );
+
+ return;
+}
+
+
+/*
+ * jcNonStdRasMessageHoaVcHeaderPack
+ */
+void
+jcNonStdRasMessageHoaVcHeaderPack( InterHoaVcHeader_t* pMsg, UCHAR** ppszBuffer, int* pnSize )
+{
+ // Orig Info
+ jcUShortPack( (USHORT)pMsg->origSubId, ppszBuffer, pnSize );
+
+ // Dest Info
+ jcUShortPack( (USHORT)pMsg->destSubId, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageHoaVcHeaderUnpack
+ */
+void
+jcNonStdRasMessageHoaVcHeaderUnpack( InterHoaVcHeader_t* pMsg, UCHAR** ppszBuffer )
+{
+ // Orig Info
+ pMsg->origSubId = (short) jcUShortUnpack( ppszBuffer );
+
+ // Dest Info
+ pMsg->destSubId = (short) jcUShortUnpack( ppszBuffer );
+
+ return;
+}
+
+
+/*
+ * jcNonStdRasMessageAInterfaceMsgPack
+ */
+void
+jcNonStdRasMessageAInterfaceMsgPack( A_INTERFACE_MSG_STRUCT_t* pMsg,
+ UCHAR** ppszBuffer, int* pnSize )
+{
+ jcUShortPack( pMsg->msglength, ppszBuffer, pnSize );
+ jcBufferPack( (PVOID) pMsg->A_INTERFACE_DATA, pMsg->msglength, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageAInterfaceMsgUnpack
+ */
+void
+jcNonStdRasMessageAInterfaceMsgUnpack( A_INTERFACE_MSG_STRUCT_t* pMsg, UCHAR** ppszBuffer )
+{
+ PVOID pdata;
+
+ pMsg->msglength = jcUShortUnpack( ppszBuffer );
+
+ if (pMsg->msglength < MAX_A_INTERFACE_LEN) {
+ pdata = jcBufferUnpack( pMsg->msglength, ppszBuffer );
+ memcpy( pMsg->A_INTERFACE_DATA, (char *)pdata, pMsg->msglength);
+ } else
+ memset( pMsg->A_INTERFACE_DATA, 0, MAX_A_INTERFACE_LEN);
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageE164NumberPack
+ */
+void
+jcNonStdRasMessageE164NumberPack( T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER* pMsg,
+ UCHAR** ppszBuffer, int* pnSize )
+{
+ // Store boolean in a USHORT
+ if (pMsg->ie_present)
+ jcUShortPack( (USHORT) 1, ppszBuffer, pnSize );
+ else
+ jcUShortPack( (USHORT) 0, ppszBuffer, pnSize );
+
+ jcULongPack( (ULONG)pMsg->numberType, ppszBuffer, pnSize );
+ jcULongPack( (ULONG)pMsg->numberingPlan, ppszBuffer, pnSize );
+ jcUShortPack( (USHORT)pMsg->numDigits, ppszBuffer, pnSize );
+ jcBufferPack( (PVOID) pMsg->digits, (USHORT) CNI_RIL3_MAX_BCD_DIGITS, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageE164NumberUnpack
+ */
+void
+jcNonStdRasMessageE164NumberUnpack( T_CNI_RIL3_IE_CALLED_PARTY_BCD_NUMBER* pMsg, UCHAR** ppszBuffer )
+{
+ PVOID pdata;
+
+ // Unpack boolean from USHORT
+ if (jcUShortUnpack( ppszBuffer ) == 1)
+ pMsg->ie_present = TRUE;
+ else
+ pMsg->ie_present = FALSE;
+
+ pMsg->numberType = (T_CNI_RIL3_TYPE_OF_NUMBER) jcULongUnpack( ppszBuffer );
+ pMsg->numberingPlan = (T_CNI_RIL3_NUMBERING_PLAN_ID) jcULongUnpack( ppszBuffer );
+ pMsg->numDigits = (short) jcUShortUnpack( ppszBuffer );
+
+ pdata = jcBufferUnpack( (USHORT) CNI_RIL3_MAX_BCD_DIGITS, ppszBuffer );
+ memcpy( pMsg->digits, (unsigned char *)pdata, CNI_RIL3_MAX_BCD_DIGITS);
+
+ return;
+}
+
+
+
+/*
+ * jcNonStdRasMessagePerformHandoverRQPack
+ */
+void
+jcNonStdRasMessagePerformHandoverRQPack( NonStdRasMessagePerformHandoverRQ_t* pMsg,
+ UCHAR** ppszBuffer,
+ int* pnSize )
+{
+
+DBG_FUNC("jcNonStdRasMessagePerformHandoverRQPack",VBLINK_LAYER);
+DBG_ENTER();
+ jcNonStdRasMessageHoaVcHeaderPack ( &(pMsg->header), ppszBuffer, pnSize );
+ jcNonStdRasMessageGlobalCellIdPack( &(pMsg->globalCellID), ppszBuffer, pnSize );
+ jcUShortPack( (USHORT)pMsg->hoCause, ppszBuffer, pnSize );
+
+ // Store boolean in a USHORT
+ if (pMsg->hoNumberReqd)
+ jcUShortPack( (USHORT) 1, ppszBuffer, pnSize );
+ else
+ jcUShortPack( (USHORT) 0, ppszBuffer, pnSize );
+
+ jcNonStdRasMessageE164NumberPack( &(pMsg->handoverNumber), ppszBuffer, pnSize );
+ jcNonStdRasMessageE164NumberPack( &(pMsg->mscNumber), ppszBuffer, pnSize );
+ jcNonStdRasMessageAInterfaceMsgPack( &(pMsg->A_HANDOVER_REQUEST), ppszBuffer, pnSize );
+
+DBG_LEAVE();
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessagePerformHandoverRQUnpack
+ */
+void
+jcNonStdRasMessagePerformHandoverRQUnpack( NonStdRasMessagePerformHandoverRQ_t* pMsg, UCHAR** ppszBuffer )
+{
+ jcNonStdRasMessageHoaVcHeaderUnpack ( &(pMsg->header), ppszBuffer );
+ jcNonStdRasMessageGlobalCellIdUnpack ( &(pMsg->globalCellID), ppszBuffer );
+ pMsg->hoCause = (short) jcUShortUnpack( ppszBuffer );
+
+ // Unpack boolean from USHORT
+ if (jcUShortUnpack( ppszBuffer ) == 1)
+ pMsg->hoNumberReqd = TRUE;
+ else
+ pMsg->hoNumberReqd = FALSE;
+
+ jcNonStdRasMessageE164NumberUnpack( &(pMsg->handoverNumber), ppszBuffer);
+ jcNonStdRasMessageE164NumberUnpack( &(pMsg->mscNumber), ppszBuffer);
+ jcNonStdRasMessageAInterfaceMsgUnpack( &(pMsg->A_HANDOVER_REQUEST), ppszBuffer);
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageEndHandoverPack
+ */
+void
+jcNonStdRasMessageEndHandoverPack( NonStdRasMessageEndHandover_t* pMsg,
+ UCHAR** ppszBuffer,
+ int* pnSize )
+{
+ jcNonStdRasMessageHoaVcHeaderPack ( &(pMsg->header), ppszBuffer, pnSize );
+ jcUShortPack( pMsg->reason, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageEndHandoverUnpack
+ */
+void
+jcNonStdRasMessageEndHandoverUnpack( NonStdRasMessageEndHandover_t* pMsg, UCHAR** ppszBuffer )
+{
+ jcNonStdRasMessageHoaVcHeaderUnpack ( &(pMsg->header), ppszBuffer );
+ pMsg->reason = jcUShortUnpack( ppszBuffer );
+
+ return;
+}
+
+
+/*
+ * jcNonStdRasMessageLayer3MsgPack
+ */
+void
+jcNonStdRasMessageLayer3MsgPack( LAYER3PDU_STRUCT_t* pMsg,
+ UCHAR** ppszBuffer, int* pnSize )
+{
+ jcUShortPack( pMsg->msglength, ppszBuffer, pnSize );
+ jcBufferPack( (PVOID) pMsg->LAYER3DATA, pMsg->msglength, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageLayer3MsgUnpack
+ */
+void
+jcNonStdRasMessageLayer3MsgUnpack( LAYER3PDU_STRUCT_t* pMsg, UCHAR** ppszBuffer )
+{
+ PVOID pdata;
+
+ pMsg->msglength = jcUShortUnpack( ppszBuffer );
+
+ if (pMsg->msglength < MAX_LAYER3_PDU_LEN) {
+ pdata = jcBufferUnpack( pMsg->msglength, ppszBuffer );
+ memcpy( pMsg->LAYER3DATA, (char *)pdata, pMsg->msglength);
+ } else
+ memset( pMsg->LAYER3DATA, 0, MAX_A_INTERFACE_LEN);
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessagePostHandoverMobEventPack
+ */
+void
+jcNonStdRasMessagePostHandoverMobEventPack( NonStdRasMessagePostHandoverMobEvent_t* pMsg,
+ UCHAR** ppszBuffer,
+ int* pnSize )
+{
+ jcNonStdRasMessageHoaVcHeaderPack ( &(pMsg->header), ppszBuffer, pnSize );
+ jcNonStdRasMessageLayer3MsgPack ( &(pMsg->LAYER3PDU), ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessagePostHandoverMobEventUnpack
+ */
+void
+jcNonStdRasMessagePostHandoverMobEventUnpack( NonStdRasMessagePostHandoverMobEvent_t* pMsg, UCHAR** ppszBuffer )
+{
+ jcNonStdRasMessageHoaVcHeaderUnpack ( &(pMsg->header), ppszBuffer );
+ jcNonStdRasMessageLayer3MsgUnpack( &(pMsg->LAYER3PDU), ppszBuffer);
+
+ return;
+}
+
+
+/*
+ * jcNonStdRasMessagePerformHandoverAckPack
+ */
+void
+jcNonStdRasMessagePerformHandoverAckPack( NonStdRasMessagePerformHandoverAck_t* pMsg,
+ UCHAR** ppszBuffer,
+ int* pnSize )
+{
+ jcNonStdRasMessageHoaVcHeaderPack ( &(pMsg->header), ppszBuffer, pnSize );
+ jcNonStdRasMessageE164NumberPack( &(pMsg->handoverNumber), ppszBuffer, pnSize );
+ jcNonStdRasMessageAInterfaceMsgPack( &(pMsg->A_INTERFACE_MSG), ppszBuffer, pnSize );
+ jcUShortPack(pMsg->reason, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessagePerformHandoverAckUnpack
+ */
+void
+jcNonStdRasMessagePerformHandoverAckUnpack( NonStdRasMessagePerformHandoverAck_t* pMsg, UCHAR** ppszBuffer )
+{
+ jcNonStdRasMessageHoaVcHeaderUnpack ( &(pMsg->header), ppszBuffer );
+ jcNonStdRasMessageE164NumberUnpack( &(pMsg->handoverNumber), ppszBuffer);
+ jcNonStdRasMessageAInterfaceMsgUnpack( &(pMsg->A_INTERFACE_MSG), ppszBuffer);
+ pMsg->reason = jcUShortUnpack( ppszBuffer );
+
+ return;
+}
+
+
+/*
+ * jcNonStdRasMessageHandoverAccessPack
+ */
+void
+jcNonStdRasMessageHandoverAccessPack( NonStdRasMessageHandoverAccess_t* pMsg,
+ UCHAR** ppszBuffer,
+ int* pnSize )
+{
+ jcNonStdRasMessageHoaVcHeaderPack ( &(pMsg->header), ppszBuffer, pnSize );
+ jcNonStdRasMessageAInterfaceMsgPack( &(pMsg->A_INTERFACE_MSG), ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageHandoverAccessUnpack
+ */
+void
+jcNonStdRasMessageHandoverAccessUnpack( NonStdRasMessageHandoverAccess_t* pMsg, UCHAR** ppszBuffer )
+{
+ jcNonStdRasMessageHoaVcHeaderUnpack ( &(pMsg->header), ppszBuffer );
+ jcNonStdRasMessageAInterfaceMsgUnpack( &(pMsg->A_INTERFACE_MSG), ppszBuffer);
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageHandoverSuccessPack
+ */
+void
+jcNonStdRasMessageHandoverSuccessPack( NonStdRasMessageHandoverSuccess_t* pMsg,
+ UCHAR** ppszBuffer,
+ int* pnSize )
+{
+ jcNonStdRasMessageHoaVcHeaderPack ( &(pMsg->header), ppszBuffer, pnSize );
+ jcNonStdRasMessageAInterfaceMsgPack( &(pMsg->A_INTERFACE_MSG), ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageHandoverSuccessUnpack
+ */
+void
+jcNonStdRasMessageHandoverSuccessUnpack( NonStdRasMessageHandoverSuccess_t* pMsg, UCHAR** ppszBuffer )
+{
+ jcNonStdRasMessageHoaVcHeaderUnpack ( &(pMsg->header), ppszBuffer );
+ jcNonStdRasMessageAInterfaceMsgUnpack( &(pMsg->A_INTERFACE_MSG), ppszBuffer);
+
+ return;
+}
+
+
+/*
+ * jcNonStdRasMessagePerformHandbackRQPack
+ */
+void
+jcNonStdRasMessagePerformHandbackRQPack( NonStdRasMessagePerformHandbackRQ_t* pMsg,
+ UCHAR** ppszBuffer,
+ int* pnSize )
+{
+ jcNonStdRasMessageHoaVcHeaderPack ( &(pMsg->header), ppszBuffer, pnSize );
+
+ jcUShortPack( (USHORT) pMsg->hoCause, ppszBuffer, pnSize );
+
+ jcNonStdRasMessageGlobalCellIdPack( &(pMsg->globalCellID), ppszBuffer, pnSize );
+
+ // Store boolean in a USHORT
+ if (pMsg->externalCell)
+ jcUShortPack( (USHORT) 1, ppszBuffer, pnSize );
+ else
+ jcUShortPack( (USHORT) 0, ppszBuffer, pnSize );
+
+ jcNonStdRasMessageE164NumberPack( &(pMsg->mscNumber), ppszBuffer, pnSize );
+ jcNonStdRasMessageAInterfaceMsgPack( &(pMsg->A_HANDOVER_REQUEST), ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessagePerformHandbackRQUnpack
+ */
+void
+jcNonStdRasMessagePerformHandbackRQUnpack( NonStdRasMessagePerformHandbackRQ_t* pMsg, UCHAR** ppszBuffer )
+{
+ jcNonStdRasMessageHoaVcHeaderUnpack ( &(pMsg->header), ppszBuffer );
+
+ pMsg->hoCause = jcUShortUnpack( ppszBuffer );
+
+ jcNonStdRasMessageGlobalCellIdUnpack ( &(pMsg->globalCellID), ppszBuffer );
+
+ // Unpack boolean from USHORT
+ if (jcUShortUnpack( ppszBuffer ) == 1)
+ pMsg->externalCell = TRUE;
+ else
+ pMsg->externalCell = FALSE;
+
+ jcNonStdRasMessageE164NumberUnpack( &(pMsg->mscNumber), ppszBuffer);
+ jcNonStdRasMessageAInterfaceMsgUnpack( &(pMsg->A_HANDOVER_REQUEST), ppszBuffer);
+
+ return;
+}
+
+
+/*
+ * jcNonStdRasMessagePerformHandbackAckPack
+ */
+void
+jcNonStdRasMessagePerformHandbackAckPack( NonStdRasMessagePerformHandbackAck_t* pMsg,
+ UCHAR** ppszBuffer,
+ int* pnSize )
+{
+ jcNonStdRasMessageHoaVcHeaderPack ( &(pMsg->header), ppszBuffer, pnSize );
+ jcNonStdRasMessageAInterfaceMsgPack( &(pMsg->A_INTERFACE_MSG), ppszBuffer, pnSize );
+ jcUShortPack(pMsg->reason, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessagePerformHandbackAckUnpack
+ */
+void
+jcNonStdRasMessagePerformHandbackAckUnpack( NonStdRasMessagePerformHandbackAck_t* pMsg, UCHAR** ppszBuffer )
+{
+ jcNonStdRasMessageHoaVcHeaderUnpack ( &(pMsg->header), ppszBuffer );
+ jcNonStdRasMessageAInterfaceMsgUnpack( &(pMsg->A_INTERFACE_MSG), ppszBuffer);
+ pMsg->reason = jcUShortUnpack( ppszBuffer );
+
+ return;
+}
+
+
+/*
+ * jcNonStdRasMessageReleaseHOAPack
+ */
+void
+jcNonStdRasMessageReleaseHOAPack( NonStdRasMessageReleaseHOA_t* pMsg,
+ UCHAR** ppszBuffer,
+ int* pnSize )
+{
+ jcNonStdRasMessageHoaVcHeaderPack ( &(pMsg->header), ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageReleaseHOAUnpack
+ */
+void
+jcNonStdRasMessageReleaseHOAUnpack( NonStdRasMessageReleaseHOA_t* pMsg, UCHAR** ppszBuffer )
+{
+ jcNonStdRasMessageHoaVcHeaderUnpack ( &(pMsg->header), ppszBuffer );
+
+ return;
+}
+
+
+
+/*
+ * VBLinkPerformHandoverRequest
+ */
+BOOL
+VBLinkPerformHandoverRequest(NonStdRasMessagePerformHandoverRQ_t* Msg)
+{
+ DBG_FUNC("VBLinkPerformHandoverRequest",VBLINK_LAYER);
+ DBG_ENTER();
+
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short *pActualDataLen;
+ STATUS status;
+ BOOL retStatus = FALSE;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypePerformHandoverRQ, &pszBuffer, &nSize );
+
+ jcNonStdRasMessagePerformHandoverRQPack( Msg, &pszBuffer, &nSize );
+
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::VBLinkPerformHandoverRequest): Sending Perform Handover message to GMC\n}\n");
+
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *)sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)],buffer,nSize);
+
+ DBG_TRACE(" VBLINK MESSAGE DATA:\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" \nMsg hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &sendBuffer, nSize+2 );
+ DBG_TRACE("\n }\n");
+
+ status = send(VBLinkConfig.VBSocket,sendBuffer,(nSize+2),0);
+ if (status == ERROR) {
+ DBG_ERROR("{\nMNEThoTRACE(vblink::VBLinkPerformHandoverRequest): Unable to send Perform Handover Request message to GMC, %d!\n}\n",errno);
+ }
+ else {
+ retStatus = TRUE;
+ }
+ DBG_LEAVE();
+ return (retStatus);
+}
+
+/*
+ * VBLinkEndHandover
+ */
+BOOL
+VBLinkEndHandover(NonStdRasMessageEndHandover_t* Msg)
+{
+ DBG_FUNC("VBLinkEndHandover",VBLINK_LAYER);
+ DBG_ENTER();
+
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short *pActualDataLen;
+ STATUS status;
+ BOOL retStatus = FALSE;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypeEndHandover, &pszBuffer, &nSize );
+ jcNonStdRasMessageEndHandoverPack( Msg, &pszBuffer, &nSize );
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::VBLinkPerformHandoverRequest): Sending End Handover message to GMC\n}\n");
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *)sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)],buffer,nSize);
+
+ DBG_TRACE(" VBLINK MESSAGE DATA: PART I\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" \nMsg hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &sendBuffer, nSize+2 );
+ DBG_TRACE("\n }\n");
+
+ status = send(VBLinkConfig.VBSocket,sendBuffer,(nSize+2),0);
+ if (status == ERROR) {
+ DBG_ERROR("{\nMNEThoTRACE(vblink::VBLinkPerformHandoverRequest): Unable to send End Handover message to GMC, %d!\n}\n",errno);
+ }
+ else {
+ retStatus = TRUE;
+ }
+ DBG_LEAVE();
+ return (retStatus);
+}
+
+
+/*
+ * VBLinkPostHandoverMobEvent
+ */
+BOOL
+VBLinkPostHandoverMobEvent(NonStdRasMessagePostHandoverMobEvent_t* Msg)
+{
+ DBG_FUNC("VBLinkPostHandoverMobEvent",VBLINK_LAYER);
+ DBG_ENTER();
+
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short *pActualDataLen;
+ STATUS status;
+ BOOL retStatus = FALSE;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypePostHandoverMobEvent, &pszBuffer, &nSize );
+ jcNonStdRasMessagePostHandoverMobEventPack( Msg, &pszBuffer, &nSize );
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::VBLinkPostHandoverMobEvent): Sending Post Handover Mob Event to GMC\n}\n");
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *)sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)],buffer,nSize);
+
+ DBG_TRACE(" VBLINK MESSAGE DATA: PART I\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" \nMsg hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &sendBuffer, nSize+2 );
+ DBG_TRACE("\n }\n");
+
+ status = send(VBLinkConfig.VBSocket,sendBuffer,(nSize+2),0);
+ if (status == ERROR) {
+ DBG_ERROR("{\nMNEThoTRACE(vblink::VBLinkPostHandoverMobEvent): Unable to send Post Handover Mob Event to GMC, %d!\n}\n",errno);
+ }
+ else {
+ retStatus = TRUE;
+ }
+ DBG_LEAVE();
+ return (retStatus);
+}
+
+
+/*
+ * VBLinkPerformHandoverAck
+ */
+BOOL
+VBLinkPerformHandoverAck(NonStdRasMessagePerformHandoverAck_t* Msg)
+{
+ DBG_FUNC("VBLinkPerformHandoverAck",VBLINK_LAYER);
+ DBG_ENTER();
+
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short *pActualDataLen;
+ STATUS status;
+ BOOL retStatus = FALSE;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypePerformHandoverAck, &pszBuffer, &nSize );
+
+ jcNonStdRasMessagePerformHandoverAckPack( Msg, &pszBuffer, &nSize );
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::VBLinkPerformHandoverAck): Sending Handover Ack to GMC\n}\n");
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *)sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)],buffer,nSize);
+
+ DBG_TRACE(" VBLINK MESSAGE DATA: PART I\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" \nMsg hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &sendBuffer, nSize+2 );
+ DBG_TRACE("\n }\n");
+
+ status = send(VBLinkConfig.VBSocket,sendBuffer,(nSize+2),0);
+ if (status == ERROR) {
+ DBG_ERROR("{\nMNEThoTRACE(vblink::VBLinkPerformHandoverAck): Unable to send Handover Ack to GMC, %d!\n}\n",errno);
+ }
+ else {
+ retStatus = TRUE;
+ }
+ DBG_LEAVE();
+ return (retStatus);
+}
+
+
+/*
+ * VBLinkHandoverAccess
+ */
+BOOL
+VBLinkHandoverAccess(NonStdRasMessageHandoverAccess_t* Msg)
+{
+ DBG_FUNC("VBLinkHandoverAccess",VBLINK_LAYER);
+ DBG_ENTER();
+
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short *pActualDataLen;
+ STATUS status;
+ BOOL retStatus = FALSE;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypeHandoverAccessMsg, &pszBuffer, &nSize );
+
+ jcNonStdRasMessageHandoverAccessPack( Msg, &pszBuffer, &nSize );
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::VBLinkHandoverAccess): Sending Handover Access to GMC\n}\n");
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *)sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)],buffer,nSize);
+
+ DBG_TRACE(" VBLINK MESSAGE DATA: PART I\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" \nMsg hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &sendBuffer, nSize+2 );
+ DBG_TRACE("\n }\n");
+
+ status = send(VBLinkConfig.VBSocket,sendBuffer,(nSize+2),0);
+ if (status == ERROR) {
+ DBG_ERROR("{\nMNEThoTRACE(vblink::VBLinkHandoverAccess): Unable to send Handover Access to GMC, %d!\n}\n",errno);
+ }
+ else {
+ retStatus = TRUE;
+ }
+ DBG_TRACE("{\nMNEThoTRACE(vblink::VBLinkHandoverAccess): leaving......\n}\n");
+ DBG_LEAVE();
+ return (retStatus);
+}
+
+
+/*
+ * VBLinkHandoverSuccess
+ */
+BOOL
+VBLinkHandoverSuccess(NonStdRasMessageHandoverSuccess_t* Msg)
+{
+ DBG_FUNC("VBLinkHandoverSuccess",VBLINK_LAYER);
+ DBG_ENTER();
+
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short *pActualDataLen;
+ STATUS status;
+ BOOL retStatus = FALSE;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypeHandoverSuccessMsg, &pszBuffer, &nSize );
+
+ jcNonStdRasMessageHandoverSuccessPack( Msg, &pszBuffer, &nSize );
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::VBLinkHandoverSuccess): Sending Handover Success to GMC\n}\n");
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *)sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)],buffer,nSize);
+
+ DBG_TRACE(" VBLINK MESSAGE DATA: PART I\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" \nMsg hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &sendBuffer, nSize+2 );
+ DBG_TRACE("\n }\n");
+
+ status = send(VBLinkConfig.VBSocket,sendBuffer,(nSize+2),0);
+ if (status == ERROR) {
+ DBG_ERROR("{\nMNEThoTRACE(vblink::VBLinkHandoverSuccess): Unable to send Handover Success to GMC, %d!\n}\n",errno);
+ }
+ else {
+ retStatus = TRUE;
+ }
+ DBG_TRACE("{\nMNEThoTRACE(vblink::VBLinkHandoverSuccess): leaving......\n}\n");
+ DBG_LEAVE();
+ return (retStatus);
+}
+
+
+
+/*
+ * VBLinkPerformHandback
+ */
+BOOL
+VBLinkPerformHandback(NonStdRasMessagePerformHandbackRQ_t* Msg)
+{
+ DBG_FUNC("VBLinkPerformHandback",VBLINK_LAYER);
+ DBG_ENTER();
+
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short *pActualDataLen;
+ STATUS status;
+ BOOL retStatus = FALSE;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypePerformHandBackRQ, &pszBuffer, &nSize );
+
+ jcNonStdRasMessagePerformHandbackRQPack( Msg, &pszBuffer, &nSize );
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::VBLinkPerformHandback): Sending Handback Request to GMC\n}\n");
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *)sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)],buffer,nSize);
+
+ DBG_TRACE(" VBLINK MESSAGE DATA: PART I\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" \nMsg hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &sendBuffer, nSize+2 );
+ DBG_TRACE("\n }\n");
+
+ status = send(VBLinkConfig.VBSocket,sendBuffer,(nSize+2),0);
+ if (status == ERROR) {
+ DBG_ERROR("{\nMNEThoTRACE(vblink::VBLinkPerformHandback): Unable to send Handback Request to GMC, %d!\n}\n",errno);
+ }
+ else {
+ retStatus = TRUE;
+ }
+ DBG_TRACE("{\nMNEThoTRACE(vblink::VBLinkPerformHandback): leaving......\n}\n");
+ DBG_LEAVE();
+ return (retStatus);
+}
+
+
+/*
+ * VBLinkPerformHandbackAck
+ */
+BOOL
+VBLinkPerformHandbackAck(NonStdRasMessagePerformHandbackAck_t* Msg)
+{
+ DBG_FUNC("VBLinkPerformHandbackAck",VBLINK_LAYER);
+ DBG_ENTER();
+
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short *pActualDataLen;
+ STATUS status;
+ BOOL retStatus = FALSE;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypePerformHandBackAck, &pszBuffer, &nSize );
+
+ jcNonStdRasMessagePerformHandbackAckPack( Msg, &pszBuffer, &nSize );
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::VBLinkPerformHandbackAck): Sending Handback Ack to GMC\n}\n");
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *)sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)],buffer,nSize);
+
+ DBG_TRACE(" VBLINK MESSAGE DATA: PART I\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" \nMsg hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &sendBuffer, nSize+2 );
+ DBG_TRACE("\n }\n");
+
+ status = send(VBLinkConfig.VBSocket,sendBuffer,(nSize+2),0);
+ if (status == ERROR) {
+ DBG_ERROR("{\nMNEThoTRACE(vblink::VBLinkPerformHandbackAck): Unable to send Handback Ack to GMC, %d!\n}\n",errno);
+ }
+ else {
+ retStatus = TRUE;
+ }
+ DBG_TRACE("{\nMNEThoTRACE(vblink::VBLinkPerformHandbackAck): leaving......\n}\n");
+ DBG_LEAVE();
+ return (retStatus);
+}
+
+
+/*
+ * VBLinkReleaseHOA
+ */
+BOOL
+VBLinkReleaseHOA(NonStdRasMessageReleaseHOA_t* Msg)
+{
+ DBG_FUNC("VBLinkReleaseHOA",VBLINK_LAYER);
+ DBG_ENTER();
+
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short *pActualDataLen;
+ STATUS status;
+ BOOL retStatus = FALSE;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypeReleaseHOA, &pszBuffer, &nSize );
+
+ jcNonStdRasMessageReleaseHOAPack( Msg, &pszBuffer, &nSize );
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::VBLinkReleaseHOA): Sending Release HOA to GMC\n}\n");
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *)sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)],buffer,nSize);
+
+ DBG_TRACE(" VBLINK MESSAGE DATA: PART I\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" \nMsg hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &sendBuffer, nSize+2 );
+ DBG_TRACE("\n }\n");
+
+ status = send(VBLinkConfig.VBSocket,sendBuffer,(nSize+2),0);
+ if (status == ERROR) {
+ DBG_ERROR("{\nMNEThoTRACE(vblink::VBLinkReleaseHOA): Unable to send Release HOA to GMC, %d!\n}\n",errno);
+ }
+ else {
+ retStatus = TRUE;
+ }
+ DBG_TRACE("{\nMNEThoTRACE(vblink::VBLinkReleaseHOA): leaving......\n}\n");
+ DBG_LEAVE();
+ return (retStatus);
+}
+
+
+/*
+ * copyGenericToGP10Header
+ */
+void
+copyGenericToGP10Header( InterHoaVcHeader_t* genheader,
+ InterHoaVcMsg_t* gp10header )
+{
+ gp10header->origSubId = (JcSubId_t) genheader->origSubId;
+ gp10header->destSubId = (JcSubId_t) genheader->destSubId;
+
+ return;
+}
+
+
+bool
+ExtHOGenericMessageHandler(InterHoaVcMsg_t* Msg)
+{
+ MSG_Q_ID qid;
+
+ DBG_FUNC("ExtHOGenericMessageHandler",VBLINK_LAYER);
+ DBG_ENTER()
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::ExtHOGenericMessageHandler):Sending Msg(%d)\n}\n", (int)Msg->msgType);
+
+ if (Msg->destSubId == -1)
+ { // First msg from HOA, send to CCTASK
+ DBG_TRACE(" First message from HOA (destSubId=-1), sending to CCTASK (ccMsgQid=%d)\n", (int)ccMsgQId);
+ qid = ccMsgQId;
+ }
+ else
+ { // Send directly to appropriate CCSESSION
+
+ DBG_TRACE(" Destination SubID known (destSubId=%d), sending to CALLTASK\n", (int)Msg->destSubId);
+
+ if ((0 <= Msg->destSubId) &&
+ ( Msg->destSubId < CC_MAX_CC_CALLS))
+ {
+ qid = ccSession[Msg->destSubId].msgQId;
+ }
+ else
+ {
+ // send it to the cc main task so it can print out a log.
+ // Don't log from here.
+ DBG_TRACE(" Destination SubID OUT OF RANGE ERROR (destSubId=%d), sending to CCTASK\n", (int)Msg->destSubId);
+ qid = ccMsgQId;
+ }
+ }
+
+
+ Msg->module_id = (T_CNI_MODULE_ID) MODULE_EXTHOA;
+
+ DBG_TRACE(" Setting Module ID: (MODULE_EXTHOA=%x) (Msg->module_id=%x)\n",
+ MODULE_EXTHOA, Msg->module_id);
+
+ // send the message.
+ if (ERROR == msgQSend( qid,
+ (char *) Msg,
+ sizeof(struct InterHoaVcMsg_t),
+ NO_WAIT, //PR1553 <xxu> WAIT_FOREVER,
+ MSG_PRI_NORMAL
+ ) )
+ {
+ DBG_ERROR(" SendCC msgQSend (QID = %p) ERROR\n", (int)qid);
+ DBG_LEAVE();
+ return(false);
+ }
+ else
+ {
+ DBG_LEAVE();
+ return(true);
+ }
+}
+
+
+// ----------------------- MULTIPLE GP10 PER LAC --------------------------
+// MGPLA <chenj:08-06-01>
+
+/*
+ * jcNonStdRasMessageIMSIPack
+ */
+void
+jcNonStdRasMessageIMSIPack( T_CNI_RIL3_IE_MOBILE_ID* pMsg, UCHAR** ppszBuffer, int* pnSize )
+{
+ // Store boolean in a USHORT
+ if (pMsg->ie_present)
+ jcUShortPack( (USHORT) 1, ppszBuffer, pnSize );
+ else
+ jcUShortPack( (USHORT) 0, ppszBuffer, pnSize );
+
+ jcUShortPack( (USHORT)pMsg->mobileIdType, ppszBuffer, pnSize );
+
+ switch (pMsg->mobileIdType)
+ {
+ case CNI_RIL3_IMSI:
+ case CNI_RIL3_IMEI:
+ case CNI_RIL3_IMEISV:
+ jcUShortPack( (USHORT)pMsg->numDigits, ppszBuffer, pnSize );
+ jcBufferPack( (PVOID)pMsg->digits, (USHORT) CNI_RIL3_MAX_ID_DIGITS, ppszBuffer, pnSize );
+ break;
+
+ case CNI_RIL3_TMSI:
+ jcULongPack( (USHORT)pMsg->tmsi, ppszBuffer, pnSize );
+ break;
+
+ default:
+ // Don't pack anything
+ break;
+ }
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessageIMSIUnpack
+ */
+void
+jcNonStdRasMessageIMSIUnpack( T_CNI_RIL3_IE_MOBILE_ID* pMsg, UCHAR** ppszBuffer )
+{
+ PVOID pdata;
+
+ // Unpack boolean from USHORT
+ if (jcUShortUnpack( ppszBuffer ) == 1)
+ pMsg->ie_present = TRUE;
+ else
+ pMsg->ie_present = FALSE;
+
+ pMsg->mobileIdType = (T_CNI_RIL3_MOBILE_ID_TYPE) jcUShortUnpack( ppszBuffer );
+
+ switch (pMsg->mobileIdType)
+ {
+ case CNI_RIL3_IMSI:
+ case CNI_RIL3_IMEI:
+ case CNI_RIL3_IMEISV:
+ pMsg->numDigits = jcUShortUnpack( ppszBuffer );
+ pdata = jcBufferUnpack( (USHORT) CNI_RIL3_MAX_ID_DIGITS, ppszBuffer );
+ memcpy( pMsg->digits, (char *)pdata, CNI_RIL3_MAX_ID_DIGITS );
+ break;
+
+ case CNI_RIL3_TMSI:
+ pMsg->tmsi = jcULongUnpack( ppszBuffer );
+ break;
+
+ default:
+ // Don't unpack anything
+ break;
+ }
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessagePageRequestPack
+ */
+void
+jcNonStdRasMessagePageRequestPack( NonStdRasMessagePageRequest_t* pMsg,
+ UCHAR** ppszBuffer,
+ int* pnSize )
+{
+ jcULongPack(pMsg->req_id, ppszBuffer, pnSize );
+
+ jcNonStdRasMessageIMSIPack( &(pMsg->imsi), ppszBuffer, pnSize );
+
+ jcUShortPack(pMsg->channel_needed, ppszBuffer, pnSize );
+ jcULongPack(pMsg->paging_timeout, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessagePageRequestUnpack
+ */
+void
+jcNonStdRasMessagePageRequestUnpack( NonStdRasMessagePageRequest_t* pMsg, UCHAR** ppszBuffer )
+{
+ pMsg->req_id = (UINT) jcULongUnpack( ppszBuffer );
+
+ jcNonStdRasMessageIMSIUnpack( &(pMsg->imsi), ppszBuffer );
+
+ pMsg->channel_needed = (short) jcUShortUnpack( ppszBuffer );
+ pMsg->paging_timeout = (UINT) jcULongUnpack( ppszBuffer );
+
+ return;
+}
+
+
+/*
+ * jcNonStdRasMessagePageResponsePack
+ */
+void
+jcNonStdRasMessagePageResponsePack( NonStdRasMessagePageResponse_t* pMsg,
+ UCHAR** ppszBuffer,
+ int* pnSize )
+{
+ jcULongPack(pMsg->req_id, ppszBuffer, pnSize );
+
+ // Store boolean in a USHORT
+ if (pMsg->need_profile)
+ jcUShortPack( (USHORT) 1, ppszBuffer, pnSize );
+ else
+ jcUShortPack( (USHORT) 0, ppszBuffer, pnSize );
+
+ return;
+}
+
+/*
+ * jcNonStdRasMessagePageResponseUnpack
+ */
+void
+jcNonStdRasMessagePageResponseUnpack( NonStdRasMessagePageResponse_t* pMsg, UCHAR** ppszBuffer )
+{
+ pMsg->req_id = (UINT) jcULongUnpack( ppszBuffer );
+
+ // Unpack boolean from USHORT
+ if (jcUShortUnpack( ppszBuffer ) == 1)
+ pMsg->need_profile = TRUE;
+ else
+ pMsg->need_profile = FALSE;
+
+ return;
+}
+
+
+/*
+ * VBLinkPageRequest
+ */
+BOOL
+VBLinkPageRequest(NonStdRasMessagePageRequest_t* Msg)
+{
+ DBG_FUNC("VBLinkPageRequest",VBLINK_LAYER);
+ DBG_ENTER();
+
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short *pActualDataLen;
+ STATUS status;
+ BOOL retStatus = FALSE;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypePageRequest, &pszBuffer, &nSize );
+
+ jcNonStdRasMessagePageRequestPack( Msg, &pszBuffer, &nSize );
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::VBLinkPageRequest): Sending Page Request to GP10\n}\n");
+
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *)sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)],buffer,nSize);
+
+ DBG_TRACE(" VBLINK MESSAGE DATA:\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" \nMsg hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &sendBuffer, nSize+2 );
+ DBG_TRACE("\n }\n");
+
+ status = send(VBLinkConfig.VBSocket,sendBuffer,(nSize+2),0);
+ if (status == ERROR) {
+ DBG_ERROR("{\nMNEThoTRACE(vblink::VBLinkPageResponse): Unable to send Page Request to GP10, %d!\n}\n",errno);
+ }
+ else {
+ retStatus = TRUE;
+ }
+ DBG_LEAVE();
+ return (retStatus);
+}
+
+/*
+ * VBLinkPageResponse
+ */
+BOOL
+VBLinkPageResponse(NonStdRasMessagePageResponse_t* Msg)
+{
+ DBG_FUNC("VBLinkPageResponse",VBLINK_LAYER);
+ DBG_ENTER();
+
+ int nSize;
+ UCHAR buffer[NON_STD_MSG_MAX_LEN];
+ UCHAR* pszBuffer;
+
+ char sendBuffer[VBLINK_MAX_MESSAGE_SIZE];
+ unsigned short *pActualDataLen;
+ STATUS status;
+ BOOL retStatus = FALSE;
+
+ pszBuffer = buffer;
+ nSize = 0;
+
+ jcUShortPack( NON_STD_RAS_PROTOCOL, &pszBuffer, &nSize );
+ jcUShortPack( NonStdRasMessageTypePageResponse, &pszBuffer, &nSize );
+
+ jcNonStdRasMessagePageResponsePack( Msg, &pszBuffer, &nSize );
+
+ DBG_TRACE("{\nMNEThoTRACE(vblink::VBLinkPageResponse): Sending Page Response to GMC\n}\n");
+
+ memset(sendBuffer,0,VBLINK_MAX_MESSAGE_SIZE);
+ pActualDataLen = (unsigned short *)sendBuffer;
+ *pActualDataLen = htons(nSize);
+
+ memcpy((char*)&sendBuffer[sizeof(short)],buffer,nSize);
+
+ DBG_TRACE(" VBLINK MESSAGE DATA:\n");
+ DBG_TRACE(" {\n");
+ DBG_TRACE(" \nMsg hexdump: ");
+ DBG_HEXDUMP((unsigned char*) &sendBuffer, nSize+2 );
+ DBG_TRACE("\n }\n");
+
+ status = send(VBLinkConfig.VBSocket,sendBuffer,(nSize+2),0);
+ if (status == ERROR) {
+ DBG_ERROR("{\nMNEThoTRACE(vblink::VBLinkPageResponse): Unable to send Page Response to GMC, %d!\n}\n",errno);
+ }
+ else {
+ retStatus = TRUE;
+ }
+ DBG_LEAVE();
+ return (retStatus);
+}
diff --git a/data/mnet/GP10/Host/voip/src/vipermem.cpp b/data/mnet/GP10/Host/voip/src/vipermem.cpp
new file mode 100644
index 0000000..a377385
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/src/vipermem.cpp
@@ -0,0 +1,46 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : vipermem.cpp *
+ * *
+ * Description : Wrapper functions for memory allocation *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <vxworks.h>
+
+
+
+void *ViperAlloc(int BlockSize, unsigned char InitValue)
+{
+ void *NewBlock=NULL;
+ NewBlock = malloc(BlockSize);
+ if (NewBlock == NULL)
+ return NewBlock;
+
+ memset(NewBlock,InitValue,BlockSize);
+
+ return NewBlock;
+}
+
+
+void ViperFree(void *Block)
+{
+ free(Block);
+}
diff --git a/data/mnet/GP10/Host/voip/src/voipapi.cpp b/data/mnet/GP10/Host/voip/src/voipapi.cpp
new file mode 100644
index 0000000..bbaedc5
--- /dev/null
+++ b/data/mnet/GP10/Host/voip/src/voipapi.cpp
@@ -0,0 +1,461 @@
+
+/*
+ ****************************************************************************************
+ * *
+ * Copyright Cisco Systems, Inc 2000 All rights reserved *
+ * *
+ *--------------------------------------------------------------------------------------*
+ * *
+ * File : VoipAPI.cpp *
+ * *
+ * Description : API Library for the Voip task *
+ * *
+ * Author : Dinesh Nambisan *
+ * *
+ *----------------------- Revision history ---------------------------------------------*
+ * Time | Date | Name | Description *
+ *--------------------------------------------------------------------------------------*
+ * 00:00 |03/24/99 | DSN | File created *
+ * | | | *
+ * | | | *
+ ****************************************************************************************
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <vxworks.h>
+#include <ticklib.h>
+#include <drv\timer\timerDev.h>
+#include <taskLib.h>
+#include "msg.h"
+#include "logging/vcmodules.h"
+#include "logging/vclogging.h"
+#include "vipermem.h"
+
+#include "voip/voipapi.h"
+#include "voip/vblink.h"
+#include "h323task.h"
+#include "h323interface.h"
+#include "Jcc/LudbApi.h"
+
+
+extern PH323TASK_CONFIG pVoipTaskConfig;
+extern CALL_CONTROL_BLOCK CCBArray[MAX_ACTIVE_CALLS];
+
+
+
+/*
+ * VoipApiMessageHandler
+ */
+bool
+VoipApiMessageHandler(PVOIP_API_MESSAGE VoipRequest)
+{
+ DBG_FUNC("VoipApiMessageHandler",H323_LAYER);
+ DBG_ENTER();
+
+ if (VoipRequest->MessageType == VOIP_API_CALL_EVENT) {
+ DBG_TRACE("VOIP <<--- CallEvent : %s ---- CC : Txn ID %d \n",GetVoipApiCallEventName(VoipRequest->CallEvent.CallEvent),
+ VoipRequest->TxnId);
+ }
+ else {
+ DBG_TRACE("VOIP <<--- %s ---- CC : Txn ID %d \n",GetVoipApiMessageName(VoipRequest->MessageType),
+ VoipRequest->TxnId);
+ }
+
+
+ if (!VBLinkStatus()) {
+ DBG_ERROR("API Function called when ViperCell still NOT connected with ViperBase!\n");
+ DBG_LEAVE();
+ return FALSE;
+ }
+
+ /*
+ * Perform basic validations on the request so that
+ * we can return an error from here itself
+ */
+ if (VoipRequest->Magic != VOIP_API_MAGIC_VALUE) {
+ DBG_ERROR("Invalid API message received!\n");
+ DBG_LEAVE();
+ return(FALSE);
+ }
+
+
+ /*
+ * Check VOIP handle for all msgs for which it is expected to be valid
+ */
+ switch(VoipRequest->MessageType) {
+ case VOIP_API_CALL_ALERTING:
+ case VOIP_API_CALL_ANSWER:
+ case VOIP_API_CALL_DTMF:
+ case VOIP_API_CALL_PROCEEDING:
+ if( (VoipRequest->VoipCallHandle > MAX_ACTIVE_CALLS) || (VoipRequest->VoipCallHandle < 0) ) {
+ DBG_ERROR("Unknown call handle %d returned for msg %s\n",VoipRequest->VoipCallHandle,GetVoipApiMessageName(VoipRequest->MessageType));
+ return(FALSE);
+ }
+ }
+
+
+
+ switch(VoipRequest->MessageType) {
+ case VOIP_API_CALL_SETUP:
+ {
+ if(VoipRequest->CallSetup.CalledPartyNumber.numDigits <= 0) {
+ DBG_ERROR("Invalid no specified for call setup!\n");
+ return FALSE;
+ }
+ }
+ break;
+ case VOIP_API_CALL_ALERTING:
+ case VOIP_API_CALL_ANSWER:
+ case VOIP_API_CALL_DTMF:
+ case VOIP_API_CALL_PROCEEDING:
+ {
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(!((VoipRequest->VoipCallHandle > MAX_ACTIVE_CALLS) || (VoipRequest->VoipCallHandle < 0)));
+#endif
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)&CCBArray[VoipRequest->VoipCallHandle];
+ if ((pCCB != NULL) && (pCCB->Magic == H323TASK_MAGIC_VALUE)) {
+ if (pCCB->H323CallState==H323_CALL_STATE_IDLE) {
+ DBG_ERROR("Call %#x : Received msg %s from CC when call idle\n",pCCB,GetVoipApiMessageName(VoipRequest->MessageType));
+ DumpStateTransitionHistory(pCCB);
+ return(FALSE);
+ }
+ }
+
+ }
+ break;
+ }
+ if (VoipRequest->MessageType==VOIP_API_CALL_RELEASE) {
+ if (VoipRequest->VoipCallHandle != VOIP_NULL_CALL_HANDLE) {
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(!((VoipRequest->VoipCallHandle > MAX_ACTIVE_CALLS) || (VoipRequest->VoipCallHandle < 0)));
+#endif
+ if ((VoipRequest->VoipCallHandle > MAX_ACTIVE_CALLS) || (VoipRequest->VoipCallHandle < 0))
+ return (false);
+ }
+ }
+
+ DBG_LEAVE();
+ return(SendMessage(pVoipTaskConfig->pH323TaskInputPipe,VoipRequest));
+}
+
+
+
+/*
+ * VoipSendMessageToCc
+ */
+BOOL
+VoipSendMessageToCc(PVOIP_API_MESSAGE pMsg)
+{
+ DBG_FUNC("VoipSendMessageToCc",H323_LAYER);
+ DBG_ENTER();
+ BOOL retStatus=FALSE;
+
+
+ if (pMsg->MessageType == VOIP_API_CALL_EVENT) {
+ DBG_TRACE("VOIP --- CallEvent : %s ---->> CC : Txn ID %d \n",GetVoipApiCallEventName(pMsg->CallEvent.CallEvent),
+ pMsg->TxnId);
+ }
+ else {
+ DBG_TRACE("VOIP --- %s ---->> CC : Txn ID %d \n",GetVoipApiMessageName(pMsg->MessageType),
+ pMsg->TxnId);
+ }
+
+
+ retStatus= CcVoipMessageHandler(pMsg);
+ if (!retStatus) {
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(pMsg->VoipCallHandle < MAX_ACTIVE_CALLS);
+#endif
+ if (pMsg->VoipCallHandle > MAX_ACTIVE_CALLS) {
+ return (FALSE);
+ }
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK)&CCBArray[pMsg->VoipCallHandle];
+ char call_event_msg[256];
+ memset(call_event_msg,0,256);
+ if (pMsg->MessageType == VOIP_API_CALL_EVENT) {
+ switch(pMsg->CallEvent.CallEvent) {
+ case VOIP_MOBILE_CALL_EVENT_PROCEEDING:strcpy(call_event_msg,"PROCEEDING");break;
+ case VOIP_MOBILE_CALL_EVENT_RINGBACK:strcpy(call_event_msg,"RINGBACK");break;
+ case VOIP_MOBILE_CALL_EVENT_ALERTING:strcpy(call_event_msg,"ALERTING");break;
+ case VOIP_MOBILE_CALL_EVENT_CONNECTED:strcpy(call_event_msg,"CONNECTED");break;
+ case VOIP_MOBILE_CALL_EVENT_VOICE_CONNECTED:strcpy(call_event_msg,"VOICE_CONNECTED");break;
+ case VOIP_MOBILE_CALL_EVENT_DISCONNECTED:strcpy(call_event_msg,"DISCONNECTED");break;
+
+ }
+ DBG_ERROR("Call %#x : CC returned error for VOIP_API_CALL_EVENT msg %s; going to drop call!!!!\n",
+ pCCB,call_event_msg);
+ }
+ else {
+ DBG_ERROR("CC returned error for msg %s; going to drop call!!!!\n",GetVoipApiMessageName(pMsg->MessageType));
+ }
+ if(pCCB->H323CallState!=H323_CALL_STATE_IDLE) {
+ pMsg->MessageType = VOIP_API_CALL_RELEASE;
+ pMsg->CallRelease.cause = Q850_CAUSE_PROTOCOL_ERROR_UNSPECIFIED;
+ VoipApiMessageHandler(pMsg);
+ }
+ }
+
+ DBG_LEAVE();
+ return(retStatus);
+}
+
+
+
+/*
+ * VoipCallGetRTPHandle
+ */
+HJCRTPSESSION
+VoipCallGetRTPHandle(VOIP_CALL_HANDLE VoipCallHandle)
+{
+#ifdef VOIP_DEVELOP_DEBUG
+ ASSERT(!((VoipCallHandle > MAX_ACTIVE_CALLS) || (VoipCallHandle < 0)));
+#endif
+ if ((VoipCallHandle > MAX_ACTIVE_CALLS) || (VoipCallHandle < 0)) {
+ return (NULL);
+ }
+ PCALL_CONTROL_BLOCK pCCB = (PCALL_CONTROL_BLOCK )&CCBArray[VoipCallHandle];
+ return(H323CallGetRTPHandle(pCCB));
+}
+
+
+
+
+/*
+ * GetVoipApiMessageName
+ */
+char
+*GetVoipApiMessageName(VOIP_API_MESSAGE_TYPE MessageType)
+{
+ static char *ApiNames[] = {
+ "VOIP_API_CALL_OFFERING",
+ "VOIP_API_CALL_ALERTING",
+ "VOIP_API_CALL_SETUP",
+ "VOIP_API_CALL_RELEASE",
+ "VOIP_API_CALL_ANSWER",
+ "VOIP_API_CALL_EVENT",
+ "VOIP_API_CALL_DTMF",
+ "VOIP_API_SHUTDOWN_VOIP_TASK",
+ "VOIP_API_CALL_PROCEEDING",
+ "VOIP_API_CODEC_SELECTED",
+ "VOIP_API_CALL_TRANSFER",
+ "VOIP_API_CALL_FORWARD",
+ "VOIP_API_UPDATE_HANDLES"
+ };
+ if ((MessageType >= 0) && (MessageType < MAX_VOIP_API_MESSAGES)) {
+ return (ApiNames[MessageType]);
+ }
+}
+
+
+/*
+ * GetVoipApiCallEventName
+ */
+char *
+GetVoipApiCallEventName(VOIP_MOBILE_CALL_EVENT CallEvent)
+{
+ static char *CallEventNames[] = {
+ "VOIP_MOBILE_CALL_EVENT_BASE",
+ "VOIP_MOBILE_CALL_EVENT_PROCEEDING",
+ "VOIP_MOBILE_CALL_EVENT_RINGBACK",
+ "VOIP_MOBILE_CALL_EVENT_ALERTING",
+ "VOIP_MOBILE_CALL_EVENT_CONNECTED",
+ "VOIP_MOBILE_CALL_EVENT_VOICE_CONNECTED",
+ "VOIP_MOBILE_CALL_EVENT_DISCONNECTED",
+ "VOIP_MOBILE_CALL_EVENT_TRANSFER_STATUS",
+ "VOIP_MOBILE_CALL_EVENT_PROGRESS"
+ };
+ if ((CallEvent >= 0) && (CallEvent < MAX_VOIP_MOBILE_CALL_EVENTS)) {
+ return (CallEventNames[CallEvent]);
+ }
+
+}
+
+/*
+ * VoipStackSetDefaultCodec
+ */
+int
+VoipStackSetDefaultCodec(int a)
+{
+ if (!a) {
+ pVoipTaskConfig->DefaultCodecGsmFullRate = TRUE;
+ printf("Default Codec set to GSM Full Rate for non-fastStart endpoints\n");
+ }
+ else {
+ pVoipTaskConfig->DefaultCodecGsmFullRate = FALSE;
+ printf("Default Codec set to GSM Enhanced Full Rate for non-fastStart endpoints\n");
+ }
+ return (0);
+}
+
+/*
+ * VoipStackLogEnableModule
+ */
+int
+VoipStackLogEnableModule(char *moduleName)
+{
+ return(msAdd(moduleName));
+}
+
+/*
+ * VoipStackLogDisableModule
+ */
+int
+VoipStackLogDisableModule(char *moduleName)
+{
+ return(msDelete(moduleName));
+}
+
+
+/*
+ * VoipStackLogDisableAll
+ */
+int
+VoipStackLogDisableAll()
+{
+ return(msDeleteAll());
+}
+
+
+/*
+ * VoipStackLogGetDebugLevel
+ */
+int
+VoipStackLogGetDebugLevel()
+{
+ return(msGetDebugLevel());
+}
+
+/*
+ * VoipStackLogSetLogFile
+ */
+void
+VoipStackLogSetLogFile(char *logFile)
+{
+ msLogFile(logFile);
+ return;
+}
+
+
+/*
+ * VoipStackLogSetDebugLevel
+ */
+int
+VoipStackLogSetDebugLevel(int debugLevel)
+{
+ return(msSetDebugLevel(debugLevel));
+}
+
+
+
+/*
+ * VoipStackLogAddSink
+ */
+int
+VoipStackLogAddSink(char *sinkName)
+{
+ return(msSinkAdd(sinkName));
+}
+
+
+/*
+ * VoipStackLogRemoveSink
+ */
+int
+VoipStackLogRemoveSink(char *sinkName)
+{
+ return(msSinkDelete(sinkName));
+}
+
+
+
+/*
+ * VoipHelp
+ */
+int
+VoipHelp()
+{
+ printf("\n*****************************************************************************");
+ printf("\n* VOIP Task Help *");
+ printf("\n*****************************************************************************");
+ printf("\n* *");
+ printf("\n* VoipStackSetDefaultCodec(x) : x non-zero sets codec to EFR; otherwise*");
+ printf("\n* the default codec is FullRate *");
+ printf("\n* *");
+ printf("\n* VoipShowAllCalls() : Shows all calls currently active within*");
+ printf("\n* the VOIP task *");
+ printf("\n* VoipShowCall(CCB) : Shows the state of the call having *");
+ printf("\n* the control block CCB *");
+ printf("\n* VoipShowCallCounters() : Shows the VOIP call counters *");
+ printf("\n* *");
+ printf("\n* VoipShowCallStats() : Displays VOIP call statistics *");
+ printf("\n* *");
+ printf("\n* VoipClearCallStats() : Clears the VOIP call statistics *");
+ printf("\n* *");
+ printf("\n* VoipStackLogEnableModule(Name) : Enables stack logging of module *");
+ printf("\n* *");
+ printf("\n* VoipStackLogDisableModule(Name) : Disables stack logging of module *");
+ printf("\n* *");
+ printf("\n* VoipStackLogDisableAll() : Disables all stack logging *");
+ printf("\n* *");
+ printf("\n* VoipStackLogGetDebugLevel() : Shows the current debug level of stack *");
+ printf("\n* logging *");
+ printf("\n* VoipStackLogSetDebugLevel(x) : Sets the debug level of stack logs to x*");
+ printf("\n* *");
+ printf("\n* VoipStackLogSetLogFile(File) : Sets the output stack log file *");
+ printf("\n* *");
+ printf("\n* VoipStackLogAddSink(Name) : Adds log output device to log *");
+ printf("\n* *");
+ printf("\n* VoipStackLogRemoveSink(Name) : Removes log output device *");
+ printf("\n* *");
+ printf("\n* VoipOptionsHelp() : Displays help on options for CLID & *");
+ printf("\n* Stack Logging *");
+ printf("\n* *");
+ printf("\n* VoipHelp() : Shows this screen *");
+ printf("\n* *");
+ printf("\n*****************************************************************************\n");
+
+
+
+
+ return(0);
+}
+
+
+/*
+ * VoipOptionsHelp
+ */
+int
+VoipOptionsHelp()
+{
+ printf("\n*****************************************************************************");
+ printf("\n* VOIP STACK TRACING/LOGGING HELP *");
+ printf("\n*****************************************************************************");
+ printf("\n* *");
+ printf("\n*------------------- Stack Logging options ---------------------------------*");
+ printf("\n* Sink options : 'terminal','file','logger' *");
+ printf("\n* *");
+ printf("\n* Debug levels :- *");
+ printf("\n* 0 : All debugging turned off; default value *");
+ printf("\n* 1 : Filter WITHOUT checks and trees *");
+ printf("\n* 2 : Filter WITHOUT checks *");
+ printf("\n* 3 : Filter WITH checks and trees *");
+ printf("\n* 4 : Dont filter, display all messages *");
+ printf("\n* *");
+ printf("\n* Module Names :- *");
+ printf("\n* 'PERERR','CMERR','PDLERR','VT','RA','CMAPI','CMAPICB','CM','TPKTCHAN', *");
+ printf("\n* 'UDPCHAN','CHANNELS','PDL','PER','Q931','PDLPRINT','PDLPRNERR','LI', *");
+ printf("\n* 'PDLPRNWRN','PDLERROR','PDLTIMER','PDLSM','PDLMISC','PDLSRC','SELI', *");
+ printf("\n* 'PDLFNERR','PDLAPI','PDLCONF','PDLMTASK','PDLAPI','PDLCOMM','PDLCHAN', *");
+ printf("\n* 'LOOPBACK','CONF','TIMER','LIINFO' *");
+ printf("\n* *");
+ printf("\n* *");
+ printf("\n*****************************************************************************\n");
+
+}
+
+#ifdef LOOPBACK_MODE
+
+#include "voipapitest.cpp"
+
+#endif /* #ifdef LOOPBACK_MODE */
diff --git a/data/mnet/GP10/Makefile b/data/mnet/GP10/Makefile
new file mode 100644
index 0000000..dca3454
--- /dev/null
+++ b/data/mnet/GP10/Makefile
@@ -0,0 +1,184 @@
+##########################################################
+#
+# (c) Copyright Cisco 2000
+# All Rights Reserved
+#
+##########################################################
+
+
+SUBDIRS = Dsp Host
+
+# TOP_OF_VOB must be defined before including l3defs.mk
+TOP_OF_VOB = .
+
+include $(TOP_OF_VOB)\l3defs.mk
+
+GP10_DIR = GP10
+GP10_CRYPTO_DIR= GP10_CRYPTO
+VIPERBASE_DIR = ViperBase
+BIN_DIR = bin
+BIN_CRYPTO_DIR = bin\crypto
+VX_DIR = vx
+VIPERWATCH_DIR = GPManager
+VBWATCH_DIR = VBWatch
+VIPERWATCH_SRC_DIR = Host\ViperWatch
+SCRIPT_DIR = Host\scripts
+MIB_DIR = Host\mib
+FPGA_DIR = Host\fpga
+VXBOOT_DIR = Host\cdc_bsp
+VXBOOT_DST_DIR = vxBoot
+ENCRYPTION = GSM_Encryption
+
+GP10_ROOT = $(TO)\$(GP10_DIR)
+GP10_CRYPTO_ROOT = $(TO)\$(GP10_CRYPTO_DIR)
+VIPER_BASE_ROOT = $(TOP_OF_VOB)\..\$(VIPERBASE_DIR)
+HOST_DIR = Host
+
+DST_BIN_DIR = $(GP10_ROOT)\$(BIN_DIR)
+DST_VX_DIR = $(GP10_ROOT)\$(VX_DIR)
+DST_VIPERWATCH_DIR = $(GP10_ROOT)\$(VIPERWATCH_DIR)
+DST_SCRIPT_DIR = $(GP10_ROOT)\scripts
+DST_FPGA_DIR = $(GP10_ROOT)\fpga
+DST_MIB_DIR = $(GP10_ROOT)\mib
+DST_ALARM_DIR = $(GP10_ROOT)\alarm
+DST_VXBOOT_DIR = $(GP10_ROOT)\$(VXBOOT_DST_DIR)
+
+DST_BIN_CRYPTO_DIR = $(GP10_CRYPTO_ROOT)\$(BIN_DIR)
+DST_SCRIPT_CRYPTO_DIR = $(GP10_CRYPTO_ROOT)\scripts
+DST_ENCRYPTION = $(GP10_CRYPTO_ROOT)\$(ENCRYPTION)
+DST_MIB_CRYPTO_DIR = $(GP10_CRYPTO_ROOT)\mib
+
+SRC_VBWATCH_DIR = $(VIPER_BASE_ROOT)\$(VBWATCH_DIR)
+SRC_CERT_DIR = $(COMMON_VOB_APP_DIR)\cdr\certificate
+
+MV = move
+CP = copy
+XCP = xcopy
+MD = mkdir
+NMAKE = nmake
+
+all: buildcommon
+
+# Add each of the Common VOB directories that produce a .out file
+# Example: vxTemplate
+
+COMMON_DIRS = Os ssh
+
+buildcommon:
+ -@for %f in ($(COMMON_DIRS)) do \
+ $(MAKE) -C $(COMMON_VOB_APP_DIR)\%f all VOB=GP10
+
+cleanall:
+ $(RM) $(BIN_DIR)\*.out
+ $(RM) $(BIN_DIR)\*.map
+ $(RM) $(BIN_DIR)\vxWorks.*
+ $(RM) $(BIN_CRYPTO_DIR)\*.out
+ $(RM) $(BIN_CRYPTO_DIR)\*.map
+
+ - @for %f in ($(COMMON_DIRS)) do \
+ $(MAKE) -C $(COMMON_VOB_APP_DIR)\%f cleanall VOB=GP10
+ - @for %f in ($(SUBDIRS)) do \
+ $(MAKE) -C %f cleanall
+
+copyall:
+ - @for %f in ($(SUBDIRS)) do \
+ $(MAKE) -C %f copyall
+
+
+pack:
+ @echo Copying binaries
+ -$(MD) $(DST_BIN_DIR)
+ -$(MD) $(DST_VX_DIR)
+ @$(CP) $(BIN_DIR)\*.out $(DST_BIN_DIR)\*.out
+
+ @echo Copying vxWorks Symbol file
+ @$(CP) $(BIN_DIR)\vxWorks.* $(DST_VX_DIR)\
+
+ @echo Copying ViperWatch html files
+ -$(MD) $(DST_VIPERWATCH_DIR)
+ @$(CP) $(VIPERWATCH_SRC_DIR)\*.* $(DST_VIPERWATCH_DIR)\
+
+ @echo Copying ViperWatch text files
+ -$(MD) $(DST_VIPERWATCH_DIR)\Text
+ @$(CP) $(VIPERWATCH_SRC_DIR)\Text\*.* $(DST_VIPERWATCH_DIR)\Text\
+
+ @echo Copying ViperWatch Images files
+ -$(MD) $(DST_VIPERWATCH_DIR)\Images
+ @$(CP) $(VIPERWATCH_SRC_DIR)\Images\*.* $(DST_VIPERWATCH_DIR)\Images\
+
+ @echo Copying ViperWatch js files
+ -$(MD) $(DST_VIPERWATCH_DIR)\js
+ @$(CP) $(VIPERWATCH_SRC_DIR)\js\*.* $(DST_VIPERWATCH_DIR)\js\
+
+ @echo Copying ViperWatch Java files
+ -$(MD) $(DST_VIPERWATCH_DIR)\Java
+ @$(CP) $(VIPERWATCH_SRC_DIR)\Java\*.* $(DST_VIPERWATCH_DIR)\Java\
+
+ @echo Copying Scripts files
+ -$(MD) $(DST_SCRIPT_DIR)
+ @$(CP) $(SCRIPT_DIR)\*.* $(DST_SCRIPT_DIR)\
+
+ @echo Copying Fpga Files
+ -$(MD) $(DST_FPGA_DIR)
+ @$(CP) $(FPGA_DIR)\*.rbf $(DST_FPGA_DIR)\
+
+ @echo Copying bootrom Files
+ -$(MD) $(DST_VXBOOT_DIR)
+ @$(CP) $(VXBOOT_DIR)\*.hex $(DST_VXBOOT_DIR)\*.hex
+ @$(CP) $(VXBOOT_DIR)\bootflash.o $(DST_VXBOOT_DIR)\*.o
+ @$(CP) $(VXBOOT_DIR)\nvram2.o $(DST_VXBOOT_DIR)\nvram2.*
+ @$(CP) $(VXBOOT_DIR)\bootrom_updating.txt $(DST_VXBOOT_DIR)\*.txt
+
+ @echo Copying vipercell.cfg file
+ -$(MD) $(GP10_ROOT)
+ @$(CP) $(HOST_DIR)\vipercell.cfg $(GP10_ROOT)
+
+ @echo Copying version.txt file and marking as Non-Crypto version
+ -$(MD) $(GP10_ROOT)
+ @$(CP) $(HOST_DIR)\version.txt $(GP10_ROOT)
+ @echo [CRYPTO] >> $(GP10_ROOT)\version.txt
+ @echo NON-CRYPTO VERSION >> $(GP10_ROOT)\version.txt
+
+
+ @echo Copying mib files
+ -$(MD) $(DST_MIB_DIR)
+ @$(CP) $(HOST_DIR)\mib.txt $(DST_MIB_DIR)
+ @$(CP) $(HOST_DIR)\snmp\Asn1\vipercell.mib $(DST_MIB_DIR)\gp10.mib
+
+ @echo Copying default AlarmCode.English file
+ -$(MD) $(DST_ALARM_DIR)
+ @$(CP) $(HOST_DIR)\Alarm\AlarmCode.English $(DST_ALARM_DIR)
+
+ @echo Preparing encryption enabled option
+ -$(MD) $(GP10_CRYPTO_ROOT)
+ @$(XCP) /E /C /R /Y $(GP10_ROOT) $(GP10_CRYPTO_ROOT)
+
+ @echo Mark version.txt as CRYPTO version
+ @$(CP) $(HOST_DIR)\version.txt $(GP10_CRYPTO_ROOT)
+ @echo [CRYPTO] >> $(GP10_CRYPTO_ROOT)\version.txt
+ @echo CRYPTO VERSION >> $(GP10_CRYPTO_ROOT)\version.txt
+
+ @echo Update encryption modules
+ @$(RM) $(DST_BIN_CRYPTO_DIR)\dsp*.out
+ @$(MV) /Y $(DST_BIN_CRYPTO_DIR)\soc.out $(DST_BIN_CRYPTO_DIR)\soc_k8.out
+ @$(MV) /Y $(DST_BIN_CRYPTO_DIR)\ssh.out $(DST_BIN_CRYPTO_DIR)\ssh_k8.out
+
+ @$(CP) $(BIN_CRYPTO_DIR)\*.out $(DST_BIN_CRYPTO_DIR)
+
+ @echo Copying DSP Encryption Objects
+ -$(MD) $(DST_ENCRYPTION)\encrypt_a51a52
+ -$(MD) $(DST_ENCRYPTION)\encrypt_a52only
+ @$(CP) .\$(BIN_DIR)\encrypt_a51a52\* $(DST_ENCRYPTION)\encrypt_a51a52
+ @$(CP) $(DST_ENCRYPTION)\encrypt_a51a52 $(DST_BIN_CRYPTO_DIR)
+ @$(CP) .\$(BIN_DIR)\encrypt_a52only\* $(DST_ENCRYPTION)\encrypt_a52only
+
+ @echo Prepare load scripts
+ @$(MV) $(DST_SCRIPT_CRYPTO_DIR)\module_list $(DST_SCRIPT_CRYPTO_DIR)\module_list_noencrypt
+ @$(MV) $(DST_SCRIPT_CRYPTO_DIR)\module_list_crypto $(DST_SCRIPT_CRYPTO_DIR)\module_list
+ @$(MV) $(DST_SCRIPT_CRYPTO_DIR)\viperstart $(DST_SCRIPT_CRYPTO_DIR)\viperstart_noencrypt
+ @$(MV) $(DST_SCRIPT_CRYPTO_DIR)\viperstart_crypto $(DST_SCRIPT_CRYPTO_DIR)\viperstart
+ @$(MV) $(DST_SCRIPT_CRYPTO_DIR)\iosinit.ini $(DST_SCRIPT_CRYPTO_DIR)\iosinit_noencrypt.ini
+ @$(MV) $(DST_SCRIPT_CRYPTO_DIR)\iosinit_crypto.ini $(DST_SCRIPT_CRYPTO_DIR)\iosinit.ini
+
+ @echo Copying certificate files
+ @$(CP) $(SRC_CERT_DIR)\*.* $(GP10_CRYPTO_ROOT)
diff --git a/data/mnet/GP10/l3defs.mk b/data/mnet/GP10/l3defs.mk
new file mode 100644
index 0000000..d64f5c4
--- /dev/null
+++ b/data/mnet/GP10/l3defs.mk
@@ -0,0 +1,176 @@
+# Makefile - makefile skeleton by Wind River
+#
+# Copyright (C) 1996 Wind River Systems, Inc.
+#
+# This file was generated via the Tornado Project Facility.
+#
+CPU = PPC860
+TOOL = gnu
+OUTSUF = .out
+MD = mkdir
+MK = make
+CD = cd
+MV = move
+
+# Enables .o files being used from the common vob to be delivered to this VOB
+ifeq ($(APPDIR),)
+ OBJDIR = ..\bin
+else
+ OBJDIR = $(VOB2DIR)\$(APPDIR)\bin
+endif
+
+VOBNAME = GP10
+
+VOB_COMMON_DIR = $(TOP_OF_VOB)\..\$(VOBNAME)\Common_To_Vob
+HOST_COMMON_DIR = $(TOP_OF_VOB)\..\$(VOBNAME)\Host\Common_To_Host
+
+COMMON_VOB_APP_DIR = $(TOP_OF_VOB)\..\Common
+COMMON_VOB_DIR = $(TOP_OF_VOB)\..\Common\include
+APP_INCLUDE_DIR = ../include
+
+ifeq ($(OBJSUF),)
+ OBJSUF = .o
+endif
+export DEP
+
+# following line added by SY 1999-03-15
+ADDED_C++FLAGS = -D__PROTOTYPE_5_0
+
+include $(WIND_BASE)/target/h/make/defs.bsp
+include $(WIND_BASE)/target/h/make/make.$(CPU)$(TOOL)
+include $(WIND_BASE)/target/h/make/defs.$(WIND_HOST_TYPE)
+include $(WIND_BASE)/target/h/make/rules.bsp
+
+SOURCE_LIST_CPP = $(wildcard *.cpp)
+OBJ_LIST_CPP = $(SOURCE_LIST_CPP:.cpp=.o)
+
+SOURCE_LIST_C = $(wildcard *.c)
+OBJ_LIST_C = $(SOURCE_LIST_C:.c=.o)
+
+SOURCE_LIST = $(SOURCE_LIST_CPP) $(SOURCE_LIST_C)
+OBJ_LIST = $(OBJ_LIST_CPP) $(OBJ_LIST_C)
+MODULE_OBJS = $(foreach file, $(OBJ_LIST), $(OBJDIR)/$(file))
+
+# This is to make everyting relative from this directory
+
+# Included optimization parameters
+CC_INCLUDE += -I$(COMMON_VOB_APP_DIR)\$(THIS_APP_DIR)\include
+CC_INCLUDE += -I\$(VOBNAME)\Host\$(THIS_APP_DIR)\include -I$(VOB_COMMON_DIR)
+CC_INCLUDE += -I$(HOST_COMMON_DIR) -I$(HOST_COMMON_DIR)\include
+CC_INCLUDE += -I$(APP_INCLUDE_DIR)
+CC_INCLUDE += -I$(COMMON_VOB_APP_DIR) -I$(COMMON_VOB_DIR) -I$(WIND_BASE)\target\h\snmp
+CC_INCLUDE += -DH323_Exist -D__VXWORKS__ -DVX_IGNORE_GNU_LIBS -DVXWORKS
+CC_INCLUDE += -O2 -DVIPER_IP -DFAST_RTP_READ -DMNET_GP10
+
+# Can be added in the make command line
+C++FLAGS += $(EXTRA)
+
+# to workaround forward slash problem to get the target "clean" to work
+RM_MODULE_OBJS = $(subst /,$(DIRCHAR), $(MODULE_OBJS))
+
+# rule for recursive make
+SUBDIR_TARGETS = $(foreach dir, $(SUBDIRS), $(dir).sub)
+CLEAN_TARGETS = $(foreach dir, $(SUBDIRS), $(dir).clean)
+COPY_TARGETS = $(foreach dir, $(SUBDIRS), $(dir).copy)
+OUTPUT_TARGETS = $(foreach dir, $(SUBDIRS), $(dir).output)
+
+all: $(SUBDIR_TARGETS)
+
+%.sub: %
+ @ $(MAKE) -C $< all
+
+# rule for C++ compiles
+$(OBJDIR)/%.o : %.cpp
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(CXX) $(C++FLAGS) -c -o $@ $<
+
+# rule for C compiles
+$(OBJDIR)/%.o : %.c
+ @ $(RM) $(subst /,$(DIRCHAR),$@)
+ $(CXX) $(C++FLAGS) -c -o $@ $<
+
+ifeq ($(TO),)
+TO = bin
+endif
+
+# Copy All Command
+copyall:
+override OUTLIST = $(wildcard bin/*$(OUTSUF))
+ifneq ($(OUTLIST), )
+ @$(CP) bin\*$(OUTSUF) $(TO)
+else
+ifneq ($(findstring 860, $(wildcard *)), 860)
+ echo ($(wildcard bin/*), )
+ifneq ($(SUBDIRS),)
+ for %f in ($(SUBDIRS)) do \
+ $(MAKE) -C %f copyall
+endif
+endif
+endif
+
+
+# cleanall
+
+cleanall:
+ifeq ($(SUBDIRS),)
+ -$(RM) $(RM_MODULE_OBJS)
+ -$(RM) $(subst /,$(DIRCHAR), $(MY_OUTPUT))
+else
+ - @for %f in ($(SUBDIRS)) do \
+ $(MAKE) -C %f cleanall
+endif
+
+
+# Create Output directories
+output:
+ - $(MD) bin
+ - @for %f in ($(SUBDIRS)) do \
+ $(MD) %f\$(Bin)
+
+
+depend.$(CPU)$(TOOL):
+ifeq ($(SUBDIRS),)
+ @ echo Creating depend.$(CPU)$(TOOL)
+ifneq ($(SOURCE_LIST),)
+ @ for %f in ($(SOURCE_LIST)) do \
+ $(CXX) -MM $(C++FLAGS) -c %f \
+ | $(TCL) $(PROJECT)/depend.tcl $(TGT_DIR) 1>>$@
+else
+ifneq ($(wildcard *.c),)
+ @ for %f in ($(wildcard *.c)) do \
+ $(CXX) -MM $(C++FLAGS) -c %f \
+ | $(TCL) $(PROJECT)/depend.tcl $(TGT_DIR) 1>>$@
+endif
+ifneq ($(wildcard *.cpp),)
+ @ for %f in ($(wildcard *.cpp)) do \
+ $(CXX) -MM $(C++FLAGS) %f \
+ | $(TCL) $(PROJECT)/depend.tcl $(TGT_DIR) 1>>$@
+endif
+endif
+ @echo Created depend file
+else
+ @for %f in ($(SUBDIRS)) do \
+ $(MAKE) -C %f depend
+endif
+
+# Force to regenerate dependencies
+depend:
+ $(RM) depend.$(CPU)$(TOOL)
+ $(MAKE) depend.$(CPU)$(TOOL)
+
+
+# Add include depend.$(CPU)$(TOOL) to make dependencies.
+ifeq ($(DEP), YES)
+ifeq ($(SUBDIRS),)
+-include depend.$(CPU)$(TOOL)
+endif
+endif
+
+
+$(OBJDIR):
+ mkdir $(subst /,$(DIRCHAR), $@)
+
+
+
+
+